@os-team/profile 1.0.45 → 1.0.47

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (310) hide show
  1. package/README.md +1 -1
  2. package/dist/cjs/{emotion.d.js → @types/emotion.d.js} +0 -0
  3. package/dist/cjs/@types/emotion.d.js.map +1 -0
  4. package/dist/cjs/@types/i18next.d.js +4 -0
  5. package/dist/cjs/@types/i18next.d.js.map +1 -0
  6. package/dist/cjs/components/profile/ProfileButton.js +0 -6
  7. package/dist/cjs/components/profile/ProfileButton.js.map +1 -1
  8. package/dist/cjs/components/profile/ProfileConfigContext.js +0 -8
  9. package/dist/cjs/components/profile/ProfileConfigContext.js.map +1 -1
  10. package/dist/cjs/components/profile/ProfileContext.js +0 -8
  11. package/dist/cjs/components/profile/ProfileContext.js.map +1 -1
  12. package/dist/cjs/components/profile/ProfileDrawer.js +2 -20
  13. package/dist/cjs/components/profile/ProfileDrawer.js.map +1 -1
  14. package/dist/cjs/components/profile/ProfileDrawerContent.js +30 -86
  15. package/dist/cjs/components/profile/ProfileDrawerContent.js.map +1 -1
  16. package/dist/cjs/components/profile/ProfileNavigationItem.js +4 -18
  17. package/dist/cjs/components/profile/ProfileNavigationItem.js.map +1 -1
  18. package/dist/cjs/components/profile/ProfileUpdateNameForm.js +3 -14
  19. package/dist/cjs/components/profile/ProfileUpdateNameForm.js.map +1 -1
  20. package/dist/cjs/components/profile/ProfileUpdateNameModal.js +21 -49
  21. package/dist/cjs/components/profile/ProfileUpdateNameModal.js.map +1 -1
  22. package/dist/cjs/components/profile/ProfileUpdatePasswordForm.js +3 -14
  23. package/dist/cjs/components/profile/ProfileUpdatePasswordForm.js.map +1 -1
  24. package/dist/cjs/components/profile/ProfileUpdatePasswordModal.js +19 -45
  25. package/dist/cjs/components/profile/ProfileUpdatePasswordModal.js.map +1 -1
  26. package/dist/cjs/components/profile/ProtectedWrapper.js +4 -19
  27. package/dist/cjs/components/profile/ProtectedWrapper.js.map +1 -1
  28. package/dist/cjs/components/profile/UserAvatar.js +5 -17
  29. package/dist/cjs/components/profile/UserAvatar.js.map +1 -1
  30. package/dist/cjs/components/profile/UserAvatarAddon.js +2 -19
  31. package/dist/cjs/components/profile/UserAvatarAddon.js.map +1 -1
  32. package/dist/cjs/components/profile/__generated__/ProfileDrawerContentSignOutMutation.graphql.js +4 -9
  33. package/dist/cjs/components/profile/__generated__/ProfileDrawerContentSignOutMutation.graphql.js.map +1 -1
  34. package/dist/cjs/components/profile/__generated__/ProfileDrawerContentUpdateAvatarMutation.graphql.js +33 -42
  35. package/dist/cjs/components/profile/__generated__/ProfileDrawerContentUpdateAvatarMutation.graphql.js.map +1 -1
  36. package/dist/cjs/components/profile/__generated__/ProfileDrawerSignOutMutation.graphql.js +4 -9
  37. package/dist/cjs/components/profile/__generated__/ProfileDrawerSignOutMutation.graphql.js.map +1 -1
  38. package/dist/cjs/components/profile/__generated__/ProfileDrawerUpdateAvatarMutation.graphql.js +33 -42
  39. package/dist/cjs/components/profile/__generated__/ProfileDrawerUpdateAvatarMutation.graphql.js.map +1 -1
  40. package/dist/cjs/components/profile/__generated__/ProfileUpdateNameModalMutation.graphql.js +31 -48
  41. package/dist/cjs/components/profile/__generated__/ProfileUpdateNameModalMutation.graphql.js.map +1 -1
  42. package/dist/cjs/components/profile/__generated__/ProfileUpdatePasswordModalMutation.graphql.js +27 -36
  43. package/dist/cjs/components/profile/__generated__/ProfileUpdatePasswordModalMutation.graphql.js.map +1 -1
  44. package/dist/cjs/components/profile/__generated__/ProtectedWrapperQuery.graphql.js +4 -9
  45. package/dist/cjs/components/profile/__generated__/ProtectedWrapperQuery.graphql.js.map +1 -1
  46. package/dist/cjs/components/session/SessionDrawer.js +2 -20
  47. package/dist/cjs/components/session/SessionDrawer.js.map +1 -1
  48. package/dist/cjs/components/session/SessionDrawerContent.js +0 -15
  49. package/dist/cjs/components/session/SessionDrawerContent.js.map +1 -1
  50. package/dist/cjs/components/session/SessionList.js +6 -39
  51. package/dist/cjs/components/session/SessionList.js.map +1 -1
  52. package/dist/cjs/components/session/SessionListItem.js +22 -84
  53. package/dist/cjs/components/session/SessionListItem.js.map +1 -1
  54. package/dist/cjs/components/session/SessionListSkeleton.js +2 -15
  55. package/dist/cjs/components/session/SessionListSkeleton.js.map +1 -1
  56. package/dist/cjs/components/session/__generated__/SessionDrawerContentQuery.graphql.js +1 -2
  57. package/dist/cjs/components/session/__generated__/SessionDrawerContentQuery.graphql.js.map +1 -1
  58. package/dist/cjs/components/session/__generated__/SessionListDestroyAllOtherSessionsMutation.graphql.js +4 -9
  59. package/dist/cjs/components/session/__generated__/SessionListDestroyAllOtherSessionsMutation.graphql.js.map +1 -1
  60. package/dist/cjs/components/session/__generated__/SessionListItemDestroySessionMutation.graphql.js +27 -36
  61. package/dist/cjs/components/session/__generated__/SessionListItemDestroySessionMutation.graphql.js.map +1 -1
  62. package/dist/cjs/components/session/__generated__/SessionListItem_session.graphql.js +1 -2
  63. package/dist/cjs/components/session/__generated__/SessionListItem_session.graphql.js.map +1 -1
  64. package/dist/cjs/components/session/__generated__/SessionListRefetchQuery.graphql.js +1 -2
  65. package/dist/cjs/components/session/__generated__/SessionListRefetchQuery.graphql.js.map +1 -1
  66. package/dist/cjs/components/session/__generated__/SessionList_sessions.graphql.js +1 -2
  67. package/dist/cjs/components/session/__generated__/SessionList_sessions.graphql.js.map +1 -1
  68. package/dist/cjs/components/session/formatDate.js +0 -2
  69. package/dist/cjs/components/session/formatDate.js.map +1 -1
  70. package/dist/cjs/components/session/getLastSeen.js +0 -2
  71. package/dist/cjs/components/session/getLastSeen.js.map +1 -1
  72. package/dist/cjs/components/shared/ButtonUpdate.js +2 -9
  73. package/dist/cjs/components/shared/ButtonUpdate.js.map +1 -1
  74. package/dist/cjs/components/shared/ErrorResult.js +4 -17
  75. package/dist/cjs/components/shared/ErrorResult.js.map +1 -1
  76. package/dist/cjs/components/shared/MainLoader.js +0 -10
  77. package/dist/cjs/components/shared/MainLoader.js.map +1 -1
  78. package/dist/cjs/components/shared/icons/AndroidIcon.js +0 -6
  79. package/dist/cjs/components/shared/icons/AndroidIcon.js.map +1 -1
  80. package/dist/cjs/components/shared/icons/AppleIcon.js +0 -6
  81. package/dist/cjs/components/shared/icons/AppleIcon.js.map +1 -1
  82. package/dist/cjs/components/shared/icons/BrowserIcon.js +0 -6
  83. package/dist/cjs/components/shared/icons/BrowserIcon.js.map +1 -1
  84. package/dist/cjs/components/shared/icons/ProfileIcon.js +0 -6
  85. package/dist/cjs/components/shared/icons/ProfileIcon.js.map +1 -1
  86. package/dist/cjs/components/shared/icons/UnknownDeviceIcon.js +0 -6
  87. package/dist/cjs/components/shared/icons/UnknownDeviceIcon.js.map +1 -1
  88. package/dist/cjs/index.js +0 -19
  89. package/dist/cjs/index.js.map +1 -1
  90. package/dist/cjs/utils/getUserFullName.js +2 -4
  91. package/dist/cjs/utils/getUserFullName.js.map +1 -1
  92. package/dist/esm/{emotion.d.js → @types/emotion.d.js} +0 -0
  93. package/dist/esm/@types/emotion.d.js.map +1 -0
  94. package/dist/esm/@types/i18next.d.js +2 -0
  95. package/dist/esm/@types/i18next.d.js.map +1 -0
  96. package/dist/esm/components/profile/ProfileButton.js +0 -3
  97. package/dist/esm/components/profile/ProfileButton.js.map +1 -1
  98. package/dist/esm/components/profile/ProfileConfigContext.js.map +1 -1
  99. package/dist/esm/components/profile/ProfileContext.js.map +1 -1
  100. package/dist/esm/components/profile/ProfileDrawer.js +0 -3
  101. package/dist/esm/components/profile/ProfileDrawer.js.map +1 -1
  102. package/dist/esm/components/profile/ProfileDrawerContent.js +5 -16
  103. package/dist/esm/components/profile/ProfileDrawerContent.js.map +1 -1
  104. package/dist/esm/components/profile/ProfileNavigationItem.js +1 -4
  105. package/dist/esm/components/profile/ProfileNavigationItem.js.map +1 -1
  106. package/dist/esm/components/profile/ProfileUpdateNameForm.js +1 -4
  107. package/dist/esm/components/profile/ProfileUpdateNameForm.js.map +1 -1
  108. package/dist/esm/components/profile/ProfileUpdateNameModal.js +3 -5
  109. package/dist/esm/components/profile/ProfileUpdateNameModal.js.map +1 -1
  110. package/dist/esm/components/profile/ProfileUpdatePasswordForm.js +1 -4
  111. package/dist/esm/components/profile/ProfileUpdatePasswordForm.js.map +1 -1
  112. package/dist/esm/components/profile/ProfileUpdatePasswordModal.js +3 -5
  113. package/dist/esm/components/profile/ProfileUpdatePasswordModal.js.map +1 -1
  114. package/dist/esm/components/profile/ProtectedWrapper.js +0 -4
  115. package/dist/esm/components/profile/ProtectedWrapper.js.map +1 -1
  116. package/dist/esm/components/profile/UserAvatar.js +0 -3
  117. package/dist/esm/components/profile/UserAvatar.js.map +1 -1
  118. package/dist/esm/components/profile/UserAvatarAddon.js +0 -3
  119. package/dist/esm/components/profile/UserAvatarAddon.js.map +1 -1
  120. package/dist/esm/components/profile/__generated__/ProfileDrawerContentSignOutMutation.graphql.js +4 -8
  121. package/dist/esm/components/profile/__generated__/ProfileDrawerContentSignOutMutation.graphql.js.map +1 -1
  122. package/dist/esm/components/profile/__generated__/ProfileDrawerContentUpdateAvatarMutation.graphql.js +33 -41
  123. package/dist/esm/components/profile/__generated__/ProfileDrawerContentUpdateAvatarMutation.graphql.js.map +1 -1
  124. package/dist/esm/components/profile/__generated__/ProfileDrawerSignOutMutation.graphql.js +4 -8
  125. package/dist/esm/components/profile/__generated__/ProfileDrawerSignOutMutation.graphql.js.map +1 -1
  126. package/dist/esm/components/profile/__generated__/ProfileDrawerUpdateAvatarMutation.graphql.js +33 -41
  127. package/dist/esm/components/profile/__generated__/ProfileDrawerUpdateAvatarMutation.graphql.js.map +1 -1
  128. package/dist/esm/components/profile/__generated__/ProfileUpdateNameModalMutation.graphql.js +31 -47
  129. package/dist/esm/components/profile/__generated__/ProfileUpdateNameModalMutation.graphql.js.map +1 -1
  130. package/dist/esm/components/profile/__generated__/ProfileUpdatePasswordModalMutation.graphql.js +27 -35
  131. package/dist/esm/components/profile/__generated__/ProfileUpdatePasswordModalMutation.graphql.js.map +1 -1
  132. package/dist/esm/components/profile/__generated__/ProtectedWrapperQuery.graphql.js +4 -8
  133. package/dist/esm/components/profile/__generated__/ProtectedWrapperQuery.graphql.js.map +1 -1
  134. package/dist/esm/components/session/SessionDrawer.js +1 -4
  135. package/dist/esm/components/session/SessionDrawer.js.map +1 -1
  136. package/dist/esm/components/session/SessionDrawerContent.js +0 -5
  137. package/dist/esm/components/session/SessionDrawerContent.js.map +1 -1
  138. package/dist/esm/components/session/SessionList.js +1 -4
  139. package/dist/esm/components/session/SessionList.js.map +1 -1
  140. package/dist/esm/components/session/SessionListItem.js +3 -17
  141. package/dist/esm/components/session/SessionListItem.js.map +1 -1
  142. package/dist/esm/components/session/SessionListSkeleton.js +1 -3
  143. package/dist/esm/components/session/SessionListSkeleton.js.map +1 -1
  144. package/dist/esm/components/session/__generated__/SessionDrawerContentQuery.graphql.js +1 -1
  145. package/dist/esm/components/session/__generated__/SessionDrawerContentQuery.graphql.js.map +1 -1
  146. package/dist/esm/components/session/__generated__/SessionListDestroyAllOtherSessionsMutation.graphql.js +4 -8
  147. package/dist/esm/components/session/__generated__/SessionListDestroyAllOtherSessionsMutation.graphql.js.map +1 -1
  148. package/dist/esm/components/session/__generated__/SessionListItemDestroySessionMutation.graphql.js +27 -35
  149. package/dist/esm/components/session/__generated__/SessionListItemDestroySessionMutation.graphql.js.map +1 -1
  150. package/dist/esm/components/session/__generated__/SessionListItem_session.graphql.js +1 -1
  151. package/dist/esm/components/session/__generated__/SessionListItem_session.graphql.js.map +1 -1
  152. package/dist/esm/components/session/__generated__/SessionListRefetchQuery.graphql.js +1 -1
  153. package/dist/esm/components/session/__generated__/SessionListRefetchQuery.graphql.js.map +1 -1
  154. package/dist/esm/components/session/__generated__/SessionList_sessions.graphql.js +1 -1
  155. package/dist/esm/components/session/__generated__/SessionList_sessions.graphql.js.map +1 -1
  156. package/dist/esm/components/session/formatDate.js +0 -1
  157. package/dist/esm/components/session/formatDate.js.map +1 -1
  158. package/dist/esm/components/session/getLastSeen.js +0 -1
  159. package/dist/esm/components/session/getLastSeen.js.map +1 -1
  160. package/dist/esm/components/shared/ButtonUpdate.js +1 -3
  161. package/dist/esm/components/shared/ButtonUpdate.js.map +1 -1
  162. package/dist/esm/components/shared/ErrorResult.js +3 -5
  163. package/dist/esm/components/shared/ErrorResult.js.map +1 -1
  164. package/dist/esm/components/shared/MainLoader.js +0 -2
  165. package/dist/esm/components/shared/MainLoader.js.map +1 -1
  166. package/dist/esm/components/shared/icons/AndroidIcon.js +0 -1
  167. package/dist/esm/components/shared/icons/AndroidIcon.js.map +1 -1
  168. package/dist/esm/components/shared/icons/AppleIcon.js +0 -1
  169. package/dist/esm/components/shared/icons/AppleIcon.js.map +1 -1
  170. package/dist/esm/components/shared/icons/BrowserIcon.js +0 -1
  171. package/dist/esm/components/shared/icons/BrowserIcon.js.map +1 -1
  172. package/dist/esm/components/shared/icons/ProfileIcon.js +0 -1
  173. package/dist/esm/components/shared/icons/ProfileIcon.js.map +1 -1
  174. package/dist/esm/components/shared/icons/UnknownDeviceIcon.js +0 -1
  175. package/dist/esm/components/shared/icons/UnknownDeviceIcon.js.map +1 -1
  176. package/dist/esm/index.js.map +1 -1
  177. package/dist/esm/utils/getUserFullName.js +0 -1
  178. package/dist/esm/utils/getUserFullName.js.map +1 -1
  179. package/dist/types/{components → src/lib/components}/profile/ProfileButton.d.ts +0 -0
  180. package/dist/types/src/lib/components/profile/ProfileButton.d.ts.map +1 -0
  181. package/dist/types/{components → src/lib/components}/profile/ProfileConfigContext.d.ts +0 -0
  182. package/dist/types/src/lib/components/profile/ProfileConfigContext.d.ts.map +1 -0
  183. package/dist/types/{components → src/lib/components}/profile/ProfileContext.d.ts +0 -0
  184. package/dist/types/src/lib/components/profile/ProfileContext.d.ts.map +1 -0
  185. package/dist/types/{components → src/lib/components}/profile/ProfileDrawer.d.ts +0 -0
  186. package/dist/types/src/lib/components/profile/ProfileDrawer.d.ts.map +1 -0
  187. package/dist/types/{components → src/lib/components}/profile/ProfileDrawerContent.d.ts +0 -0
  188. package/dist/types/src/lib/components/profile/ProfileDrawerContent.d.ts.map +1 -0
  189. package/dist/types/{components → src/lib/components}/profile/ProfileNavigationItem.d.ts +0 -0
  190. package/dist/types/src/lib/components/profile/ProfileNavigationItem.d.ts.map +1 -0
  191. package/dist/types/{components → src/lib/components}/profile/ProfileUpdateNameForm.d.ts +0 -0
  192. package/dist/types/src/lib/components/profile/ProfileUpdateNameForm.d.ts.map +1 -0
  193. package/dist/types/{components → src/lib/components}/profile/ProfileUpdateNameModal.d.ts +0 -0
  194. package/dist/types/src/lib/components/profile/ProfileUpdateNameModal.d.ts.map +1 -0
  195. package/dist/types/{components → src/lib/components}/profile/ProfileUpdatePasswordForm.d.ts +0 -0
  196. package/dist/types/src/lib/components/profile/ProfileUpdatePasswordForm.d.ts.map +1 -0
  197. package/dist/types/{components → src/lib/components}/profile/ProfileUpdatePasswordModal.d.ts +0 -0
  198. package/dist/types/src/lib/components/profile/ProfileUpdatePasswordModal.d.ts.map +1 -0
  199. package/dist/types/{components → src/lib/components}/profile/ProtectedWrapper.d.ts +0 -0
  200. package/dist/types/src/lib/components/profile/ProtectedWrapper.d.ts.map +1 -0
  201. package/dist/types/{components → src/lib/components}/profile/UserAvatar.d.ts +0 -0
  202. package/dist/types/src/lib/components/profile/UserAvatar.d.ts.map +1 -0
  203. package/dist/types/{components → src/lib/components}/profile/UserAvatarAddon.d.ts +0 -0
  204. package/dist/types/src/lib/components/profile/UserAvatarAddon.d.ts.map +1 -0
  205. package/dist/types/{components → src/lib/components}/profile/__generated__/ProfileDrawerContentSignOutMutation.graphql.d.ts +0 -0
  206. package/dist/types/src/lib/components/profile/__generated__/ProfileDrawerContentSignOutMutation.graphql.d.ts.map +1 -0
  207. package/dist/types/{components → src/lib/components}/profile/__generated__/ProfileDrawerContentUpdateAvatarMutation.graphql.d.ts +0 -0
  208. package/dist/types/src/lib/components/profile/__generated__/ProfileDrawerContentUpdateAvatarMutation.graphql.d.ts.map +1 -0
  209. package/dist/types/{components → src/lib/components}/profile/__generated__/ProfileDrawerSignOutMutation.graphql.d.ts +0 -0
  210. package/dist/types/src/lib/components/profile/__generated__/ProfileDrawerSignOutMutation.graphql.d.ts.map +1 -0
  211. package/dist/types/{components → src/lib/components}/profile/__generated__/ProfileDrawerUpdateAvatarMutation.graphql.d.ts +0 -0
  212. package/dist/types/src/lib/components/profile/__generated__/ProfileDrawerUpdateAvatarMutation.graphql.d.ts.map +1 -0
  213. package/dist/types/{components → src/lib/components}/profile/__generated__/ProfileUpdateNameModalMutation.graphql.d.ts +0 -0
  214. package/dist/types/src/lib/components/profile/__generated__/ProfileUpdateNameModalMutation.graphql.d.ts.map +1 -0
  215. package/dist/types/{components → src/lib/components}/profile/__generated__/ProfileUpdatePasswordModalMutation.graphql.d.ts +0 -0
  216. package/dist/types/src/lib/components/profile/__generated__/ProfileUpdatePasswordModalMutation.graphql.d.ts.map +1 -0
  217. package/dist/types/{components → src/lib/components}/profile/__generated__/ProtectedWrapperQuery.graphql.d.ts +0 -0
  218. package/dist/types/src/lib/components/profile/__generated__/ProtectedWrapperQuery.graphql.d.ts.map +1 -0
  219. package/dist/types/{components → src/lib/components}/session/SessionDrawer.d.ts +0 -0
  220. package/dist/types/src/lib/components/session/SessionDrawer.d.ts.map +1 -0
  221. package/dist/types/{components → src/lib/components}/session/SessionDrawerContent.d.ts +0 -0
  222. package/dist/types/src/lib/components/session/SessionDrawerContent.d.ts.map +1 -0
  223. package/dist/types/{components → src/lib/components}/session/SessionList.d.ts +0 -0
  224. package/dist/types/src/lib/components/session/SessionList.d.ts.map +1 -0
  225. package/dist/types/{components → src/lib/components}/session/SessionListItem.d.ts +0 -0
  226. package/dist/types/src/lib/components/session/SessionListItem.d.ts.map +1 -0
  227. package/dist/types/{components → src/lib/components}/session/SessionListSkeleton.d.ts +0 -0
  228. package/dist/types/src/lib/components/session/SessionListSkeleton.d.ts.map +1 -0
  229. package/dist/types/{components → src/lib/components}/session/__generated__/SessionDrawerContentQuery.graphql.d.ts +0 -0
  230. package/dist/types/src/lib/components/session/__generated__/SessionDrawerContentQuery.graphql.d.ts.map +1 -0
  231. package/dist/types/{components → src/lib/components}/session/__generated__/SessionListDestroyAllOtherSessionsMutation.graphql.d.ts +0 -0
  232. package/dist/types/src/lib/components/session/__generated__/SessionListDestroyAllOtherSessionsMutation.graphql.d.ts.map +1 -0
  233. package/dist/types/{components → src/lib/components}/session/__generated__/SessionListItemDestroySessionMutation.graphql.d.ts +0 -0
  234. package/dist/types/src/lib/components/session/__generated__/SessionListItemDestroySessionMutation.graphql.d.ts.map +1 -0
  235. package/dist/types/{components → src/lib/components}/session/__generated__/SessionListItem_session.graphql.d.ts +0 -0
  236. package/dist/types/src/lib/components/session/__generated__/SessionListItem_session.graphql.d.ts.map +1 -0
  237. package/dist/types/{components → src/lib/components}/session/__generated__/SessionListRefetchQuery.graphql.d.ts +0 -0
  238. package/dist/types/src/lib/components/session/__generated__/SessionListRefetchQuery.graphql.d.ts.map +1 -0
  239. package/dist/types/{components → src/lib/components}/session/__generated__/SessionList_sessions.graphql.d.ts +0 -0
  240. package/dist/types/src/lib/components/session/__generated__/SessionList_sessions.graphql.d.ts.map +1 -0
  241. package/dist/types/{components → src/lib/components}/session/formatDate.d.ts +0 -0
  242. package/dist/types/src/lib/components/session/formatDate.d.ts.map +1 -0
  243. package/dist/types/{components → src/lib/components}/session/getLastSeen.d.ts +0 -0
  244. package/dist/types/src/lib/components/session/getLastSeen.d.ts.map +1 -0
  245. package/dist/types/{components → src/lib/components}/shared/ButtonUpdate.d.ts +0 -0
  246. package/dist/types/src/lib/components/shared/ButtonUpdate.d.ts.map +1 -0
  247. package/dist/types/{components → src/lib/components}/shared/ErrorResult.d.ts +0 -0
  248. package/dist/types/src/lib/components/shared/ErrorResult.d.ts.map +1 -0
  249. package/dist/types/{components → src/lib/components}/shared/MainLoader.d.ts +0 -0
  250. package/dist/types/src/lib/components/shared/MainLoader.d.ts.map +1 -0
  251. package/dist/types/{components → src/lib/components}/shared/icons/AndroidIcon.d.ts +0 -0
  252. package/dist/types/src/lib/components/shared/icons/AndroidIcon.d.ts.map +1 -0
  253. package/dist/types/{components → src/lib/components}/shared/icons/AppleIcon.d.ts +0 -0
  254. package/dist/types/src/lib/components/shared/icons/AppleIcon.d.ts.map +1 -0
  255. package/dist/types/{components → src/lib/components}/shared/icons/BrowserIcon.d.ts +0 -0
  256. package/dist/types/src/lib/components/shared/icons/BrowserIcon.d.ts.map +1 -0
  257. package/dist/types/{components → src/lib/components}/shared/icons/ProfileIcon.d.ts +0 -0
  258. package/dist/types/src/lib/components/shared/icons/ProfileIcon.d.ts.map +1 -0
  259. package/dist/types/{components → src/lib/components}/shared/icons/UnknownDeviceIcon.d.ts +0 -0
  260. package/dist/types/src/lib/components/shared/icons/UnknownDeviceIcon.d.ts.map +1 -0
  261. package/dist/types/{index.d.ts → src/lib/index.d.ts} +0 -0
  262. package/dist/types/src/lib/index.d.ts.map +1 -0
  263. package/dist/types/{utils → src/lib/utils}/getUserFullName.d.ts +0 -0
  264. package/dist/types/src/lib/utils/getUserFullName.d.ts.map +1 -0
  265. package/package.json +29 -29
  266. package/dist/cjs/emotion.d.js.map +0 -1
  267. package/dist/esm/emotion.d.js.map +0 -1
  268. package/dist/types/components/profile/ProfileButton.d.ts.map +0 -1
  269. package/dist/types/components/profile/ProfileConfigContext.d.ts.map +0 -1
  270. package/dist/types/components/profile/ProfileContext.d.ts.map +0 -1
  271. package/dist/types/components/profile/ProfileDrawer.d.ts.map +0 -1
  272. package/dist/types/components/profile/ProfileDrawerContent.d.ts.map +0 -1
  273. package/dist/types/components/profile/ProfileNavigationItem.d.ts.map +0 -1
  274. package/dist/types/components/profile/ProfileUpdateNameForm.d.ts.map +0 -1
  275. package/dist/types/components/profile/ProfileUpdateNameModal.d.ts.map +0 -1
  276. package/dist/types/components/profile/ProfileUpdatePasswordForm.d.ts.map +0 -1
  277. package/dist/types/components/profile/ProfileUpdatePasswordModal.d.ts.map +0 -1
  278. package/dist/types/components/profile/ProtectedWrapper.d.ts.map +0 -1
  279. package/dist/types/components/profile/UserAvatar.d.ts.map +0 -1
  280. package/dist/types/components/profile/UserAvatarAddon.d.ts.map +0 -1
  281. package/dist/types/components/profile/__generated__/ProfileDrawerContentSignOutMutation.graphql.d.ts.map +0 -1
  282. package/dist/types/components/profile/__generated__/ProfileDrawerContentUpdateAvatarMutation.graphql.d.ts.map +0 -1
  283. package/dist/types/components/profile/__generated__/ProfileDrawerSignOutMutation.graphql.d.ts.map +0 -1
  284. package/dist/types/components/profile/__generated__/ProfileDrawerUpdateAvatarMutation.graphql.d.ts.map +0 -1
  285. package/dist/types/components/profile/__generated__/ProfileUpdateNameModalMutation.graphql.d.ts.map +0 -1
  286. package/dist/types/components/profile/__generated__/ProfileUpdatePasswordModalMutation.graphql.d.ts.map +0 -1
  287. package/dist/types/components/profile/__generated__/ProtectedWrapperQuery.graphql.d.ts.map +0 -1
  288. package/dist/types/components/session/SessionDrawer.d.ts.map +0 -1
  289. package/dist/types/components/session/SessionDrawerContent.d.ts.map +0 -1
  290. package/dist/types/components/session/SessionList.d.ts.map +0 -1
  291. package/dist/types/components/session/SessionListItem.d.ts.map +0 -1
  292. package/dist/types/components/session/SessionListSkeleton.d.ts.map +0 -1
  293. package/dist/types/components/session/__generated__/SessionDrawerContentQuery.graphql.d.ts.map +0 -1
  294. package/dist/types/components/session/__generated__/SessionListDestroyAllOtherSessionsMutation.graphql.d.ts.map +0 -1
  295. package/dist/types/components/session/__generated__/SessionListItemDestroySessionMutation.graphql.d.ts.map +0 -1
  296. package/dist/types/components/session/__generated__/SessionListItem_session.graphql.d.ts.map +0 -1
  297. package/dist/types/components/session/__generated__/SessionListRefetchQuery.graphql.d.ts.map +0 -1
  298. package/dist/types/components/session/__generated__/SessionList_sessions.graphql.d.ts.map +0 -1
  299. package/dist/types/components/session/formatDate.d.ts.map +0 -1
  300. package/dist/types/components/session/getLastSeen.d.ts.map +0 -1
  301. package/dist/types/components/shared/ButtonUpdate.d.ts.map +0 -1
  302. package/dist/types/components/shared/ErrorResult.d.ts.map +0 -1
  303. package/dist/types/components/shared/MainLoader.d.ts.map +0 -1
  304. package/dist/types/components/shared/icons/AndroidIcon.d.ts.map +0 -1
  305. package/dist/types/components/shared/icons/AppleIcon.d.ts.map +0 -1
  306. package/dist/types/components/shared/icons/BrowserIcon.d.ts.map +0 -1
  307. package/dist/types/components/shared/icons/ProfileIcon.d.ts.map +0 -1
  308. package/dist/types/components/shared/icons/UnknownDeviceIcon.d.ts.map +0 -1
  309. package/dist/types/index.d.ts.map +0 -1
  310. package/dist/types/utils/getUserFullName.d.ts.map +0 -1
@@ -4,15 +4,10 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
-
8
7
  var _react = _interopRequireDefault(require("react"));
9
-
10
8
  var _icons = require("@os-design/icons");
11
-
12
9
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13
-
14
10
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
15
-
16
11
  var BrowserIcon = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
17
12
  return /*#__PURE__*/_react.default.createElement(_icons.Icon, _extends({}, props, {
18
13
  ref: ref
@@ -20,7 +15,6 @@ var BrowserIcon = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
20
15
  d: "M371.8 512c0 77.5 62.7 140.2 140.2 140.2S652.2 589.5 652.2 512S589.5 371.8 512 371.8S371.8 434.4 371.8 512zM900 362.4l-234.3 12.1c63.6 74.3 64.6 181.5 11.1 263.7l-188 289.2c78 4.2 158.4-12.9 231.2-55.2c180-104 253-322.1 180-509.8zM320.3 591.9L163.8 284.1A415.35 415.35 0 0 0 96 512c0 208 152.3 380.3 351.4 410.8l106.9-209.4c-96.6 18.2-189.9-34.8-234-121.5zm218.5-285.5l344.4 18.1C848 254.7 792.6 194 719.8 151.7C653.9 113.6 581.5 95.5 510.5 96c-122.5.5-242.2 55.2-322.1 154.5l128.2 196.9c32-91.9 124.8-146.7 222.2-141z"
21
16
  }));
22
17
  });
23
-
24
18
  BrowserIcon.displayName = 'BrowserIcon';
25
19
  var _default = BrowserIcon;
26
20
  exports.default = _default;
@@ -1 +1 @@
1
- {"version":3,"file":"BrowserIcon.js","names":["BrowserIcon","React","forwardRef","props","ref","displayName"],"sources":["../../../../../src/lib/components/shared/icons/BrowserIcon.tsx"],"sourcesContent":["import React from 'react';\nimport { Icon, IconProps } from '@os-design/icons';\n\nconst BrowserIcon = React.forwardRef<SVGSVGElement, IconProps>((props, ref) => (\n <Icon {...props} ref={ref}>\n <path d='M371.8 512c0 77.5 62.7 140.2 140.2 140.2S652.2 589.5 652.2 512S589.5 371.8 512 371.8S371.8 434.4 371.8 512zM900 362.4l-234.3 12.1c63.6 74.3 64.6 181.5 11.1 263.7l-188 289.2c78 4.2 158.4-12.9 231.2-55.2c180-104 253-322.1 180-509.8zM320.3 591.9L163.8 284.1A415.35 415.35 0 0 0 96 512c0 208 152.3 380.3 351.4 410.8l106.9-209.4c-96.6 18.2-189.9-34.8-234-121.5zm218.5-285.5l344.4 18.1C848 254.7 792.6 194 719.8 151.7C653.9 113.6 581.5 95.5 510.5 96c-122.5.5-242.2 55.2-322.1 154.5l128.2 196.9c32-91.9 124.8-146.7 222.2-141z' />\n </Icon>\n));\n\nBrowserIcon.displayName = 'BrowserIcon';\n\nexport default BrowserIcon;\n"],"mappings":";;;;;;;AAAA;;AACA;;;;;;AAEA,IAAMA,WAAW,gBAAGC,cAAA,CAAMC,UAAN,CAA2C,UAACC,KAAD,EAAQC,GAAR;EAAA,oBAC7D,6BAAC,WAAD,eAAUD,KAAV;IAAiB,GAAG,EAAEC;EAAtB,iBACE;IAAM,CAAC,EAAC;EAAR,EADF,CAD6D;AAAA,CAA3C,CAApB;;AAMAJ,WAAW,CAACK,WAAZ,GAA0B,aAA1B;eAEeL,W"}
1
+ {"version":3,"file":"BrowserIcon.js","names":["BrowserIcon","React","forwardRef","props","ref","displayName"],"sources":["../../../../../src/lib/components/shared/icons/BrowserIcon.tsx"],"sourcesContent":["import React from 'react';\nimport { Icon, IconProps } from '@os-design/icons';\n\nconst BrowserIcon = React.forwardRef<SVGSVGElement, IconProps>((props, ref) => (\n <Icon {...props} ref={ref}>\n <path d='M371.8 512c0 77.5 62.7 140.2 140.2 140.2S652.2 589.5 652.2 512S589.5 371.8 512 371.8S371.8 434.4 371.8 512zM900 362.4l-234.3 12.1c63.6 74.3 64.6 181.5 11.1 263.7l-188 289.2c78 4.2 158.4-12.9 231.2-55.2c180-104 253-322.1 180-509.8zM320.3 591.9L163.8 284.1A415.35 415.35 0 0 0 96 512c0 208 152.3 380.3 351.4 410.8l106.9-209.4c-96.6 18.2-189.9-34.8-234-121.5zm218.5-285.5l344.4 18.1C848 254.7 792.6 194 719.8 151.7C653.9 113.6 581.5 95.5 510.5 96c-122.5.5-242.2 55.2-322.1 154.5l128.2 196.9c32-91.9 124.8-146.7 222.2-141z' />\n </Icon>\n));\n\nBrowserIcon.displayName = 'BrowserIcon';\n\nexport default BrowserIcon;\n"],"mappings":";;;;;;AAAA;AACA;AAAmD;AAAA;AAEnD,IAAMA,WAAW,gBAAGC,cAAK,CAACC,UAAU,CAA2B,UAACC,KAAK,EAAEC,GAAG;EAAA,oBACxE,6BAAC,WAAI,eAAKD,KAAK;IAAE,GAAG,EAAEC;EAAI,iBACxB;IAAM,CAAC,EAAC;EAAwgB,EAAG,CAC9gB;AAAA,CACR,CAAC;AAEFJ,WAAW,CAACK,WAAW,GAAG,aAAa;AAAC,eAEzBL,WAAW;AAAA"}
@@ -4,15 +4,10 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
-
8
7
  var _react = _interopRequireDefault(require("react"));
9
-
10
8
  var _icons = require("@os-design/icons");
11
-
12
9
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13
-
14
10
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
15
-
16
11
  var ProfileIcon = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
17
12
  return /*#__PURE__*/_react.default.createElement(_icons.Icon, _extends({}, props, {
18
13
  ref: ref
@@ -20,7 +15,6 @@ var ProfileIcon = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
20
15
  d: "M373 411c-28.5 0-51.7 23.3-51.7 52s23.2 52 51.7 52s51.7-23.3 51.7-52s-23.2-52-51.7-52zm555-251H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zM608 420c0-4.4 1-8 2.3-8h123.4c1.3 0 2.3 3.6 2.3 8v48c0 4.4-1 8-2.3 8H610.3c-1.3 0-2.3-3.6-2.3-8v-48zm-86 253h-43.9c-4.2 0-7.6-3.3-7.9-7.5c-3.8-50.5-46-90.5-97.2-90.5s-93.4 40-97.2 90.5c-.3 4.2-3.7 7.5-7.9 7.5H224a8 8 0 0 1-8-8.4c2.8-53.3 32-99.7 74.6-126.1a111.8 111.8 0 0 1-29.1-75.5c0-61.9 49.9-112 111.4-112s111.4 50.1 111.4 112c0 29.1-11 55.5-29.1 75.5c42.7 26.5 71.8 72.8 74.6 126.1c.4 4.6-3.2 8.4-7.8 8.4zm278.9-53H615.1c-3.9 0-7.1-3.6-7.1-8v-48c0-4.4 3.2-8 7.1-8h185.7c3.9 0 7.1 3.6 7.1 8v48h.1c0 4.4-3.2 8-7.1 8z"
21
16
  }));
22
17
  });
23
-
24
18
  ProfileIcon.displayName = 'ProfileIcon';
25
19
  var _default = ProfileIcon;
26
20
  exports.default = _default;
@@ -1 +1 @@
1
- {"version":3,"file":"ProfileIcon.js","names":["ProfileIcon","React","forwardRef","props","ref","displayName"],"sources":["../../../../../src/lib/components/shared/icons/ProfileIcon.tsx"],"sourcesContent":["import React from 'react';\nimport { Icon, IconProps } from '@os-design/icons';\n\nconst ProfileIcon = React.forwardRef<SVGSVGElement, IconProps>((props, ref) => (\n <Icon {...props} ref={ref}>\n <path d='M373 411c-28.5 0-51.7 23.3-51.7 52s23.2 52 51.7 52s51.7-23.3 51.7-52s-23.2-52-51.7-52zm555-251H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zM608 420c0-4.4 1-8 2.3-8h123.4c1.3 0 2.3 3.6 2.3 8v48c0 4.4-1 8-2.3 8H610.3c-1.3 0-2.3-3.6-2.3-8v-48zm-86 253h-43.9c-4.2 0-7.6-3.3-7.9-7.5c-3.8-50.5-46-90.5-97.2-90.5s-93.4 40-97.2 90.5c-.3 4.2-3.7 7.5-7.9 7.5H224a8 8 0 0 1-8-8.4c2.8-53.3 32-99.7 74.6-126.1a111.8 111.8 0 0 1-29.1-75.5c0-61.9 49.9-112 111.4-112s111.4 50.1 111.4 112c0 29.1-11 55.5-29.1 75.5c42.7 26.5 71.8 72.8 74.6 126.1c.4 4.6-3.2 8.4-7.8 8.4zm278.9-53H615.1c-3.9 0-7.1-3.6-7.1-8v-48c0-4.4 3.2-8 7.1-8h185.7c3.9 0 7.1 3.6 7.1 8v48h.1c0 4.4-3.2 8-7.1 8z' />\n </Icon>\n));\n\nProfileIcon.displayName = 'ProfileIcon';\n\nexport default ProfileIcon;\n"],"mappings":";;;;;;;AAAA;;AACA;;;;;;AAEA,IAAMA,WAAW,gBAAGC,cAAA,CAAMC,UAAN,CAA2C,UAACC,KAAD,EAAQC,GAAR;EAAA,oBAC7D,6BAAC,WAAD,eAAUD,KAAV;IAAiB,GAAG,EAAEC;EAAtB,iBACE;IAAM,CAAC,EAAC;EAAR,EADF,CAD6D;AAAA,CAA3C,CAApB;;AAMAJ,WAAW,CAACK,WAAZ,GAA0B,aAA1B;eAEeL,W"}
1
+ {"version":3,"file":"ProfileIcon.js","names":["ProfileIcon","React","forwardRef","props","ref","displayName"],"sources":["../../../../../src/lib/components/shared/icons/ProfileIcon.tsx"],"sourcesContent":["import React from 'react';\nimport { Icon, IconProps } from '@os-design/icons';\n\nconst ProfileIcon = React.forwardRef<SVGSVGElement, IconProps>((props, ref) => (\n <Icon {...props} ref={ref}>\n <path d='M373 411c-28.5 0-51.7 23.3-51.7 52s23.2 52 51.7 52s51.7-23.3 51.7-52s-23.2-52-51.7-52zm555-251H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zM608 420c0-4.4 1-8 2.3-8h123.4c1.3 0 2.3 3.6 2.3 8v48c0 4.4-1 8-2.3 8H610.3c-1.3 0-2.3-3.6-2.3-8v-48zm-86 253h-43.9c-4.2 0-7.6-3.3-7.9-7.5c-3.8-50.5-46-90.5-97.2-90.5s-93.4 40-97.2 90.5c-.3 4.2-3.7 7.5-7.9 7.5H224a8 8 0 0 1-8-8.4c2.8-53.3 32-99.7 74.6-126.1a111.8 111.8 0 0 1-29.1-75.5c0-61.9 49.9-112 111.4-112s111.4 50.1 111.4 112c0 29.1-11 55.5-29.1 75.5c42.7 26.5 71.8 72.8 74.6 126.1c.4 4.6-3.2 8.4-7.8 8.4zm278.9-53H615.1c-3.9 0-7.1-3.6-7.1-8v-48c0-4.4 3.2-8 7.1-8h185.7c3.9 0 7.1 3.6 7.1 8v48h.1c0 4.4-3.2 8-7.1 8z' />\n </Icon>\n));\n\nProfileIcon.displayName = 'ProfileIcon';\n\nexport default ProfileIcon;\n"],"mappings":";;;;;;AAAA;AACA;AAAmD;AAAA;AAEnD,IAAMA,WAAW,gBAAGC,cAAK,CAACC,UAAU,CAA2B,UAACC,KAAK,EAAEC,GAAG;EAAA,oBACxE,6BAAC,WAAI,eAAKD,KAAK;IAAE,GAAG,EAAEC;EAAI,iBACxB;IAAM,CAAC,EAAC;EAA8sB,EAAG,CACptB;AAAA,CACR,CAAC;AAEFJ,WAAW,CAACK,WAAW,GAAG,aAAa;AAAC,eAEzBL,WAAW;AAAA"}
@@ -4,15 +4,10 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
-
8
7
  var _react = _interopRequireDefault(require("react"));
9
-
10
8
  var _icons = require("@os-design/icons");
11
-
12
9
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13
-
14
10
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
15
-
16
11
  var UnknownDeviceIcon = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
17
12
  return /*#__PURE__*/_react.default.createElement(_icons.Icon, _extends({}, props, {
18
13
  ref: ref
@@ -20,7 +15,6 @@ var UnknownDeviceIcon = /*#__PURE__*/_react.default.forwardRef(function (props,
20
15
  d: "M764 280.9c-14-30.6-33.9-58.1-59.3-81.6C653.1 151.4 584.6 125 512 125s-141.1 26.4-192.7 74.2c-25.4 23.6-45.3 51-59.3 81.7c-14.6 32-22 65.9-22 100.9v27c0 6.2 5 11.2 11.2 11.2h54c6.2 0 11.2-5 11.2-11.2v-27c0-99.5 88.6-180.4 197.6-180.4s197.6 80.9 197.6 180.4c0 40.8-14.5 79.2-42 111.2c-27.2 31.7-65.6 54.4-108.1 64c-24.3 5.5-46.2 19.2-61.7 38.8a110.85 110.85 0 0 0-23.9 68.6v31.4c0 6.2 5 11.2 11.2 11.2h54c6.2 0 11.2-5 11.2-11.2v-31.4c0-15.7 10.9-29.5 26-32.9c58.4-13.2 111.4-44.7 149.3-88.7c19.1-22.3 34-47.1 44.3-74c10.7-27.9 16.1-57.2 16.1-87c0-35-7.4-69-22-100.9zM512 787c-30.9 0-56 25.1-56 56s25.1 56 56 56s56-25.1 56-56s-25.1-56-56-56z"
21
16
  }));
22
17
  });
23
-
24
18
  UnknownDeviceIcon.displayName = 'UnknownDeviceIcon';
25
19
  var _default = UnknownDeviceIcon;
26
20
  exports.default = _default;
@@ -1 +1 @@
1
- {"version":3,"file":"UnknownDeviceIcon.js","names":["UnknownDeviceIcon","React","forwardRef","props","ref","displayName"],"sources":["../../../../../src/lib/components/shared/icons/UnknownDeviceIcon.tsx"],"sourcesContent":["import React from 'react';\nimport { Icon, IconProps } from '@os-design/icons';\n\nconst UnknownDeviceIcon = React.forwardRef<SVGSVGElement, IconProps>(\n (props, ref) => (\n <Icon {...props} ref={ref}>\n <path d='M764 280.9c-14-30.6-33.9-58.1-59.3-81.6C653.1 151.4 584.6 125 512 125s-141.1 26.4-192.7 74.2c-25.4 23.6-45.3 51-59.3 81.7c-14.6 32-22 65.9-22 100.9v27c0 6.2 5 11.2 11.2 11.2h54c6.2 0 11.2-5 11.2-11.2v-27c0-99.5 88.6-180.4 197.6-180.4s197.6 80.9 197.6 180.4c0 40.8-14.5 79.2-42 111.2c-27.2 31.7-65.6 54.4-108.1 64c-24.3 5.5-46.2 19.2-61.7 38.8a110.85 110.85 0 0 0-23.9 68.6v31.4c0 6.2 5 11.2 11.2 11.2h54c6.2 0 11.2-5 11.2-11.2v-31.4c0-15.7 10.9-29.5 26-32.9c58.4-13.2 111.4-44.7 149.3-88.7c19.1-22.3 34-47.1 44.3-74c10.7-27.9 16.1-57.2 16.1-87c0-35-7.4-69-22-100.9zM512 787c-30.9 0-56 25.1-56 56s25.1 56 56 56s56-25.1 56-56s-25.1-56-56-56z' />\n </Icon>\n )\n);\n\nUnknownDeviceIcon.displayName = 'UnknownDeviceIcon';\n\nexport default UnknownDeviceIcon;\n"],"mappings":";;;;;;;AAAA;;AACA;;;;;;AAEA,IAAMA,iBAAiB,gBAAGC,cAAA,CAAMC,UAAN,CACxB,UAACC,KAAD,EAAQC,GAAR;EAAA,oBACE,6BAAC,WAAD,eAAUD,KAAV;IAAiB,GAAG,EAAEC;EAAtB,iBACE;IAAM,CAAC,EAAC;EAAR,EADF,CADF;AAAA,CADwB,CAA1B;;AAQAJ,iBAAiB,CAACK,WAAlB,GAAgC,mBAAhC;eAEeL,iB"}
1
+ {"version":3,"file":"UnknownDeviceIcon.js","names":["UnknownDeviceIcon","React","forwardRef","props","ref","displayName"],"sources":["../../../../../src/lib/components/shared/icons/UnknownDeviceIcon.tsx"],"sourcesContent":["import React from 'react';\nimport { Icon, IconProps } from '@os-design/icons';\n\nconst UnknownDeviceIcon = React.forwardRef<SVGSVGElement, IconProps>(\n (props, ref) => (\n <Icon {...props} ref={ref}>\n <path d='M764 280.9c-14-30.6-33.9-58.1-59.3-81.6C653.1 151.4 584.6 125 512 125s-141.1 26.4-192.7 74.2c-25.4 23.6-45.3 51-59.3 81.7c-14.6 32-22 65.9-22 100.9v27c0 6.2 5 11.2 11.2 11.2h54c6.2 0 11.2-5 11.2-11.2v-27c0-99.5 88.6-180.4 197.6-180.4s197.6 80.9 197.6 180.4c0 40.8-14.5 79.2-42 111.2c-27.2 31.7-65.6 54.4-108.1 64c-24.3 5.5-46.2 19.2-61.7 38.8a110.85 110.85 0 0 0-23.9 68.6v31.4c0 6.2 5 11.2 11.2 11.2h54c6.2 0 11.2-5 11.2-11.2v-31.4c0-15.7 10.9-29.5 26-32.9c58.4-13.2 111.4-44.7 149.3-88.7c19.1-22.3 34-47.1 44.3-74c10.7-27.9 16.1-57.2 16.1-87c0-35-7.4-69-22-100.9zM512 787c-30.9 0-56 25.1-56 56s25.1 56 56 56s56-25.1 56-56s-25.1-56-56-56z' />\n </Icon>\n )\n);\n\nUnknownDeviceIcon.displayName = 'UnknownDeviceIcon';\n\nexport default UnknownDeviceIcon;\n"],"mappings":";;;;;;AAAA;AACA;AAAmD;AAAA;AAEnD,IAAMA,iBAAiB,gBAAGC,cAAK,CAACC,UAAU,CACxC,UAACC,KAAK,EAAEC,GAAG;EAAA,oBACT,6BAAC,WAAI,eAAKD,KAAK;IAAE,GAAG,EAAEC;EAAI,iBACxB;IAAM,CAAC,EAAC;EAAioB,EAAG,CACvoB;AAAA,CACR,CACF;AAEDJ,iBAAiB,CAACK,WAAW,GAAG,mBAAmB;AAAC,eAErCL,iBAAiB;AAAA"}
package/dist/cjs/index.js CHANGED
@@ -1,7 +1,6 @@
1
1
  "use strict";
2
2
 
3
3
  function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
4
-
5
4
  Object.defineProperty(exports, "__esModule", {
6
5
  value: true
7
6
  });
@@ -63,11 +62,8 @@ Object.defineProperty(exports, "getUserFullName", {
63
62
  return _getUserFullName.default;
64
63
  }
65
64
  });
66
-
67
65
  var _ProfileButton = _interopRequireDefault(require("./components/profile/ProfileButton"));
68
-
69
66
  var _ProfileDrawer = _interopRequireWildcard(require("./components/profile/ProfileDrawer"));
70
-
71
67
  Object.keys(_ProfileDrawer).forEach(function (key) {
72
68
  if (key === "default" || key === "__esModule") return;
73
69
  if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
@@ -79,9 +75,7 @@ Object.keys(_ProfileDrawer).forEach(function (key) {
79
75
  }
80
76
  });
81
77
  });
82
-
83
78
  var _ProfileNavigationItem = _interopRequireWildcard(require("./components/profile/ProfileNavigationItem"));
84
-
85
79
  Object.keys(_ProfileNavigationItem).forEach(function (key) {
86
80
  if (key === "default" || key === "__esModule") return;
87
81
  if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
@@ -93,9 +87,7 @@ Object.keys(_ProfileNavigationItem).forEach(function (key) {
93
87
  }
94
88
  });
95
89
  });
96
-
97
90
  var _ProtectedWrapper = _interopRequireWildcard(require("./components/profile/ProtectedWrapper"));
98
-
99
91
  Object.keys(_ProtectedWrapper).forEach(function (key) {
100
92
  if (key === "default" || key === "__esModule") return;
101
93
  if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
@@ -107,11 +99,8 @@ Object.keys(_ProtectedWrapper).forEach(function (key) {
107
99
  }
108
100
  });
109
101
  });
110
-
111
102
  var _UserAvatar = _interopRequireDefault(require("./components/profile/UserAvatar"));
112
-
113
103
  var _UserAvatarAddon = _interopRequireWildcard(require("./components/profile/UserAvatarAddon"));
114
-
115
104
  Object.keys(_UserAvatarAddon).forEach(function (key) {
116
105
  if (key === "default" || key === "__esModule") return;
117
106
  if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
@@ -123,11 +112,8 @@ Object.keys(_UserAvatarAddon).forEach(function (key) {
123
112
  }
124
113
  });
125
114
  });
126
-
127
115
  var _SessionDrawer = _interopRequireDefault(require("./components/session/SessionDrawer"));
128
-
129
116
  var _getUserFullName = _interopRequireWildcard(require("./utils/getUserFullName"));
130
-
131
117
  Object.keys(_getUserFullName).forEach(function (key) {
132
118
  if (key === "default" || key === "__esModule") return;
133
119
  if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
@@ -139,9 +125,7 @@ Object.keys(_getUserFullName).forEach(function (key) {
139
125
  }
140
126
  });
141
127
  });
142
-
143
128
  var _ProfileContext = require("./components/profile/ProfileContext");
144
-
145
129
  Object.keys(_ProfileContext).forEach(function (key) {
146
130
  if (key === "default" || key === "__esModule") return;
147
131
  if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
@@ -153,10 +137,7 @@ Object.keys(_ProfileContext).forEach(function (key) {
153
137
  }
154
138
  });
155
139
  });
156
-
157
140
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
158
-
159
141
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
160
-
161
142
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
162
143
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../src/lib/index.ts"],"sourcesContent":["export { default as ProfileButton } from './components/profile/ProfileButton';\nexport { default as ProfileDrawer } from './components/profile/ProfileDrawer';\nexport { default as ProfileNavigationItem } from './components/profile/ProfileNavigationItem';\nexport { default as ProtectedWrapper } from './components/profile/ProtectedWrapper';\nexport { default as UserAvatar } from './components/profile/UserAvatar';\nexport { default as UserAvatarAddon } from './components/profile/UserAvatarAddon';\nexport { default as SessionDrawer } from './components/session/SessionDrawer';\nexport { default as getUserFullName } from './utils/getUserFullName';\n\nexport * from './components/profile/ProfileContext';\nexport * from './components/profile/ProfileDrawer';\nexport * from './components/profile/ProfileNavigationItem';\nexport * from './components/profile/ProtectedWrapper';\nexport * from './components/profile/UserAvatarAddon';\nexport * from './utils/getUserFullName';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AASA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AARA;;AASA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AARA;;AASA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AARA;;AACA;;AAQA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AAPA;;AACA;;AAOA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AALA;;AAAA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../src/lib/index.ts"],"sourcesContent":["export { default as ProfileButton } from './components/profile/ProfileButton';\nexport { default as ProfileDrawer } from './components/profile/ProfileDrawer';\nexport { default as ProfileNavigationItem } from './components/profile/ProfileNavigationItem';\nexport { default as ProtectedWrapper } from './components/profile/ProtectedWrapper';\nexport { default as UserAvatar } from './components/profile/UserAvatar';\nexport { default as UserAvatarAddon } from './components/profile/UserAvatarAddon';\nexport { default as SessionDrawer } from './components/session/SessionDrawer';\nexport { default as getUserFullName } from './utils/getUserFullName';\n\nexport * from './components/profile/ProfileContext';\nexport * from './components/profile/ProfileDrawer';\nexport * from './components/profile/ProfileNavigationItem';\nexport * from './components/profile/ProtectedWrapper';\nexport * from './components/profile/UserAvatarAddon';\nexport * from './utils/getUserFullName';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AASA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AARA;AASA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AARA;AASA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AARA;AACA;AAQA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AAPA;AACA;AAOA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AALA;AAAA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AAAoD;AAAA;AAAA"}
@@ -4,17 +4,15 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
-
8
7
  var getUserFullName = function getUserFullName(_ref) {
9
8
  var email = _ref.email,
10
- firstName = _ref.firstName,
11
- lastName = _ref.lastName;
9
+ firstName = _ref.firstName,
10
+ lastName = _ref.lastName;
12
11
  var parts = [];
13
12
  if (firstName) parts.push(firstName);
14
13
  if (lastName) parts.push(lastName);
15
14
  return parts.length > 0 ? parts.join(' ') : email;
16
15
  };
17
-
18
16
  var _default = getUserFullName;
19
17
  exports.default = _default;
20
18
  //# sourceMappingURL=getUserFullName.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"getUserFullName.js","names":["getUserFullName","email","firstName","lastName","parts","push","length","join"],"sources":["../../../src/lib/utils/getUserFullName.ts"],"sourcesContent":["export interface User {\n email: string;\n firstName: string | null;\n lastName: string | null;\n}\n\nconst getUserFullName = ({ email, firstName, lastName }: User): string => {\n const parts: string[] = [];\n if (firstName) parts.push(firstName);\n if (lastName) parts.push(lastName);\n return parts.length > 0 ? parts.join(' ') : email;\n};\n\nexport default getUserFullName;\n"],"mappings":";;;;;;;AAMA,IAAMA,eAAe,GAAG,SAAlBA,eAAkB,OAAkD;EAAA,IAA/CC,KAA+C,QAA/CA,KAA+C;EAAA,IAAxCC,SAAwC,QAAxCA,SAAwC;EAAA,IAA7BC,QAA6B,QAA7BA,QAA6B;EACxE,IAAMC,KAAe,GAAG,EAAxB;EACA,IAAIF,SAAJ,EAAeE,KAAK,CAACC,IAAN,CAAWH,SAAX;EACf,IAAIC,QAAJ,EAAcC,KAAK,CAACC,IAAN,CAAWF,QAAX;EACd,OAAOC,KAAK,CAACE,MAAN,GAAe,CAAf,GAAmBF,KAAK,CAACG,IAAN,CAAW,GAAX,CAAnB,GAAqCN,KAA5C;AACD,CALD;;eAOeD,e"}
1
+ {"version":3,"file":"getUserFullName.js","names":["getUserFullName","email","firstName","lastName","parts","push","length","join"],"sources":["../../../src/lib/utils/getUserFullName.ts"],"sourcesContent":["export interface User {\n email: string;\n firstName: string | null;\n lastName: string | null;\n}\n\nconst getUserFullName = ({ email, firstName, lastName }: User): string => {\n const parts: string[] = [];\n if (firstName) parts.push(firstName);\n if (lastName) parts.push(lastName);\n return parts.length > 0 ? parts.join(' ') : email;\n};\n\nexport default getUserFullName;\n"],"mappings":";;;;;;AAMA,IAAMA,eAAe,GAAG,SAAlBA,eAAe,OAAqD;EAAA,IAA/CC,KAAK,QAALA,KAAK;IAAEC,SAAS,QAATA,SAAS;IAAEC,QAAQ,QAARA,QAAQ;EACnD,IAAMC,KAAe,GAAG,EAAE;EAC1B,IAAIF,SAAS,EAAEE,KAAK,CAACC,IAAI,CAACH,SAAS,CAAC;EACpC,IAAIC,QAAQ,EAAEC,KAAK,CAACC,IAAI,CAACF,QAAQ,CAAC;EAClC,OAAOC,KAAK,CAACE,MAAM,GAAG,CAAC,GAAGF,KAAK,CAACG,IAAI,CAAC,GAAG,CAAC,GAAGN,KAAK;AACnD,CAAC;AAAC,eAEaD,eAAe;AAAA"}
File without changes
@@ -0,0 +1 @@
1
+ {"version":3,"file":"emotion.d.js","names":[],"sources":["../../../src/lib/@types/emotion.d.ts"],"sourcesContent":["import '@emotion/react';\nimport { Theme as BaseTheme } from '@os-design/theming';\n\ndeclare module '@emotion/react' {\n // eslint-disable-next-line @typescript-eslint/no-empty-interface\n export interface Theme extends BaseTheme {}\n}\n"],"mappings":"AAAA,OAAO,gBAAgB"}
@@ -0,0 +1,2 @@
1
+ import 'i18next';
2
+ //# sourceMappingURL=i18next.d.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"i18next.d.js","names":[],"sources":["../../../src/lib/@types/i18next.d.ts"],"sourcesContent":["import 'i18next';\nimport common from '../../../public/locales/en/common.json';\nimport profile from '../../../public/locales/en/profile.json';\n\ndeclare module 'i18next' {\n interface CustomTypeOptions {\n resources: {\n common: typeof common;\n profile: typeof profile;\n };\n }\n}\n"],"mappings":"AAAA,OAAO,SAAS"}
@@ -1,12 +1,9 @@
1
1
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
-
3
2
  import React from 'react';
4
3
  import { Button } from '@os-design/core';
5
-
6
4
  const ProfileButton = props => /*#__PURE__*/React.createElement(Button, _extends({
7
5
  type: "ghost",
8
6
  wide: "always"
9
7
  }, props));
10
-
11
8
  export default ProfileButton;
12
9
  //# sourceMappingURL=ProfileButton.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ProfileButton.js","names":["React","Button","ProfileButton","props"],"sources":["../../../../src/lib/components/profile/ProfileButton.tsx"],"sourcesContent":["import React from 'react';\nimport { Button, ButtonProps } from '@os-design/core';\n\nconst ProfileButton: React.FC<ButtonProps> = (props) => (\n <Button type='ghost' wide='always' {...props} />\n);\n\nexport default ProfileButton;\n"],"mappings":";;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SAASC,MAAT,QAAoC,iBAApC;;AAEA,MAAMC,aAAoC,GAAIC,KAAD,iBAC3C,oBAAC,MAAD;EAAQ,IAAI,EAAC,OAAb;EAAqB,IAAI,EAAC;AAA1B,GAAuCA,KAAvC,EADF;;AAIA,eAAeD,aAAf"}
1
+ {"version":3,"file":"ProfileButton.js","names":["React","Button","ProfileButton","props"],"sources":["../../../../src/lib/components/profile/ProfileButton.tsx"],"sourcesContent":["import React from 'react';\nimport { Button, ButtonProps } from '@os-design/core';\n\nconst ProfileButton: React.FC<ButtonProps> = (props) => (\n <Button type='ghost' wide='always' {...props} />\n);\n\nexport default ProfileButton;\n"],"mappings":";AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,MAAM,QAAqB,iBAAiB;AAErD,MAAMC,aAAoC,GAAIC,KAAK,iBACjD,oBAAC,MAAM;EAAC,IAAI,EAAC,OAAO;EAAC,IAAI,EAAC;AAAQ,GAAKA,KAAK,EAC7C;AAED,eAAeD,aAAa"}
@@ -1 +1 @@
1
- {"version":3,"file":"ProfileConfigContext.js","names":["React","useContext","ProfileConfig","createContext","bucketId","displayName","useProfileConfig"],"sources":["../../../../src/lib/components/profile/ProfileConfigContext.ts"],"sourcesContent":["import React, { useContext } from 'react';\n\nexport interface ProfileConfigProps {\n bucketId: string;\n}\n\nconst ProfileConfig = React.createContext<ProfileConfigProps>({\n bucketId: '',\n});\n\nProfileConfig.displayName = 'ProfileConfig';\n\nexport const useProfileConfig = (): ProfileConfigProps =>\n useContext(ProfileConfig);\n\nexport default ProfileConfig;\n"],"mappings":"AAAA,OAAOA,KAAP,IAAgBC,UAAhB,QAAkC,OAAlC;AAMA,MAAMC,aAAa,gBAAGF,KAAK,CAACG,aAAN,CAAwC;EAC5DC,QAAQ,EAAE;AADkD,CAAxC,CAAtB;AAIAF,aAAa,CAACG,WAAd,GAA4B,eAA5B;AAEA,OAAO,MAAMC,gBAAgB,GAAG,MAC9BL,UAAU,CAACC,aAAD,CADL;AAGP,eAAeA,aAAf"}
1
+ {"version":3,"file":"ProfileConfigContext.js","names":["React","useContext","ProfileConfig","createContext","bucketId","displayName","useProfileConfig"],"sources":["../../../../src/lib/components/profile/ProfileConfigContext.ts"],"sourcesContent":["import React, { useContext } from 'react';\n\nexport interface ProfileConfigProps {\n bucketId: string;\n}\n\nconst ProfileConfig = React.createContext<ProfileConfigProps>({\n bucketId: '',\n});\n\nProfileConfig.displayName = 'ProfileConfig';\n\nexport const useProfileConfig = (): ProfileConfigProps =>\n useContext(ProfileConfig);\n\nexport default ProfileConfig;\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,UAAU,QAAQ,OAAO;AAMzC,MAAMC,aAAa,gBAAGF,KAAK,CAACG,aAAa,CAAqB;EAC5DC,QAAQ,EAAE;AACZ,CAAC,CAAC;AAEFF,aAAa,CAACG,WAAW,GAAG,eAAe;AAE3C,OAAO,MAAMC,gBAAgB,GAAG,MAC9BL,UAAU,CAACC,aAAa,CAAC;AAE3B,eAAeA,aAAa"}
@@ -1 +1 @@
1
- {"version":3,"file":"ProfileContext.js","names":["React","useContext","ProfileContext","createContext","id","email","displayName","useProfile"],"sources":["../../../../src/lib/components/profile/ProfileContext.ts"],"sourcesContent":["import React, { useContext } from 'react';\n\nexport interface ProfileContextProps {\n id: string;\n email: string;\n firstName?: string;\n lastName?: string;\n avatar?: string;\n}\n\nconst ProfileContext = React.createContext<ProfileContextProps>({\n id: '',\n email: '',\n});\n\nProfileContext.displayName = 'ProfileContext';\n\nexport const useProfile = (): ProfileContextProps => useContext(ProfileContext);\n\nexport default ProfileContext;\n"],"mappings":"AAAA,OAAOA,KAAP,IAAgBC,UAAhB,QAAkC,OAAlC;AAUA,MAAMC,cAAc,gBAAGF,KAAK,CAACG,aAAN,CAAyC;EAC9DC,EAAE,EAAE,EAD0D;EAE9DC,KAAK,EAAE;AAFuD,CAAzC,CAAvB;AAKAH,cAAc,CAACI,WAAf,GAA6B,gBAA7B;AAEA,OAAO,MAAMC,UAAU,GAAG,MAA2BN,UAAU,CAACC,cAAD,CAAxD;AAEP,eAAeA,cAAf"}
1
+ {"version":3,"file":"ProfileContext.js","names":["React","useContext","ProfileContext","createContext","id","email","displayName","useProfile"],"sources":["../../../../src/lib/components/profile/ProfileContext.ts"],"sourcesContent":["import React, { useContext } from 'react';\n\nexport interface ProfileContextProps {\n id: string;\n email: string;\n firstName?: string;\n lastName?: string;\n avatar?: string;\n}\n\nconst ProfileContext = React.createContext<ProfileContextProps>({\n id: '',\n email: '',\n});\n\nProfileContext.displayName = 'ProfileContext';\n\nexport const useProfile = (): ProfileContextProps => useContext(ProfileContext);\n\nexport default ProfileContext;\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,UAAU,QAAQ,OAAO;AAUzC,MAAMC,cAAc,gBAAGF,KAAK,CAACG,aAAa,CAAsB;EAC9DC,EAAE,EAAE,EAAE;EACNC,KAAK,EAAE;AACT,CAAC,CAAC;AAEFH,cAAc,CAACI,WAAW,GAAG,gBAAgB;AAE7C,OAAO,MAAMC,UAAU,GAAG,MAA2BN,UAAU,CAACC,cAAc,CAAC;AAE/E,eAAeA,cAAc"}
@@ -1,5 +1,4 @@
1
1
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
-
3
2
  import React, { lazy, Suspense } from 'react';
4
3
  import { Drawer } from '@os-design/core';
5
4
  import styled from '@emotion/styled';
@@ -10,7 +9,6 @@ const StyledDrawer = styled(Drawer)`
10
9
  flex-direction: column;
11
10
  padding: 2em 1em;
12
11
  `;
13
-
14
12
  const ProfileDrawer = ({
15
13
  actions,
16
14
  children,
@@ -23,6 +21,5 @@ const ProfileDrawer = ({
23
21
  }, /*#__PURE__*/React.createElement(LazyProfileDrawerContent, {
24
22
  actions: actions
25
23
  }, children)));
26
-
27
24
  export default ProfileDrawer;
28
25
  //# sourceMappingURL=ProfileDrawer.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ProfileDrawer.js","names":["React","lazy","Suspense","Drawer","styled","MainLoader","LazyProfileDrawerContent","StyledDrawer","ProfileDrawer","actions","children","rest"],"sources":["../../../../src/lib/components/profile/ProfileDrawer.tsx"],"sourcesContent":["import React, { lazy, Suspense } from 'react';\nimport { Drawer, DrawerProps } from '@os-design/core';\nimport styled from '@emotion/styled';\nimport { ProfileDrawerContentProps } from './ProfileDrawerContent';\nimport MainLoader from '../shared/MainLoader';\n\nconst LazyProfileDrawerContent = lazy(() => import('./ProfileDrawerContent'));\n\nexport type ProfileDrawerProps = ProfileDrawerContentProps & DrawerProps;\n\nconst StyledDrawer = styled(Drawer)`\n display: flex;\n flex-direction: column;\n padding: 2em 1em;\n`;\n\nconst ProfileDrawer: React.FC<ProfileDrawerProps> = ({\n actions,\n children,\n ...rest\n}) => (\n <StyledDrawer placement='right' width='15em' {...rest}>\n <Suspense fallback={<MainLoader />}>\n <LazyProfileDrawerContent actions={actions}>\n {children}\n </LazyProfileDrawerContent>\n </Suspense>\n </StyledDrawer>\n);\n\nexport default ProfileDrawer;\n"],"mappings":";;AAAA,OAAOA,KAAP,IAAgBC,IAAhB,EAAsBC,QAAtB,QAAsC,OAAtC;AACA,SAASC,MAAT,QAAoC,iBAApC;AACA,OAAOC,MAAP,MAAmB,iBAAnB;AAEA,OAAOC,UAAP,MAAuB,sBAAvB;AAEA,MAAMC,wBAAwB,gBAAGL,IAAI,CAAC,MAAM,OAAO,wBAAP,CAAP,CAArC;AAIA,MAAMM,YAAY,GAAGH,MAAM,CAACD,MAAD,CAAS;AACpC;AACA;AACA;AACA,CAJA;;AAMA,MAAMK,aAA2C,GAAG,CAAC;EACnDC,OADmD;EAEnDC,QAFmD;EAGnD,GAAGC;AAHgD,CAAD,kBAKlD,oBAAC,YAAD;EAAc,SAAS,EAAC,OAAxB;EAAgC,KAAK,EAAC;AAAtC,GAAiDA,IAAjD,gBACE,oBAAC,QAAD;EAAU,QAAQ,eAAE,oBAAC,UAAD;AAApB,gBACE,oBAAC,wBAAD;EAA0B,OAAO,EAAEF;AAAnC,GACGC,QADH,CADF,CADF,CALF;;AAcA,eAAeF,aAAf"}
1
+ {"version":3,"file":"ProfileDrawer.js","names":["React","lazy","Suspense","Drawer","styled","MainLoader","LazyProfileDrawerContent","StyledDrawer","ProfileDrawer","actions","children","rest"],"sources":["../../../../src/lib/components/profile/ProfileDrawer.tsx"],"sourcesContent":["import React, { lazy, Suspense } from 'react';\nimport { Drawer, DrawerProps } from '@os-design/core';\nimport styled from '@emotion/styled';\nimport { ProfileDrawerContentProps } from './ProfileDrawerContent';\nimport MainLoader from '../shared/MainLoader';\n\nconst LazyProfileDrawerContent = lazy(() => import('./ProfileDrawerContent'));\n\nexport type ProfileDrawerProps = ProfileDrawerContentProps & DrawerProps;\n\nconst StyledDrawer = styled(Drawer)`\n display: flex;\n flex-direction: column;\n padding: 2em 1em;\n`;\n\nconst ProfileDrawer: React.FC<ProfileDrawerProps> = ({\n actions,\n children,\n ...rest\n}) => (\n <StyledDrawer placement='right' width='15em' {...rest}>\n <Suspense fallback={<MainLoader />}>\n <LazyProfileDrawerContent actions={actions}>\n {children}\n </LazyProfileDrawerContent>\n </Suspense>\n </StyledDrawer>\n);\n\nexport default ProfileDrawer;\n"],"mappings":";AAAA,OAAOA,KAAK,IAAIC,IAAI,EAAEC,QAAQ,QAAQ,OAAO;AAC7C,SAASC,MAAM,QAAqB,iBAAiB;AACrD,OAAOC,MAAM,MAAM,iBAAiB;AAEpC,OAAOC,UAAU,MAAM,sBAAsB;AAE7C,MAAMC,wBAAwB,gBAAGL,IAAI,CAAC,MAAM,MAAM,CAAC,wBAAwB,CAAC,CAAC;AAI7E,MAAMM,YAAY,GAAGH,MAAM,CAACD,MAAM,CAAE;AACpC;AACA;AACA;AACA,CAAC;AAED,MAAMK,aAA2C,GAAG,CAAC;EACnDC,OAAO;EACPC,QAAQ;EACR,GAAGC;AACL,CAAC,kBACC,oBAAC,YAAY;EAAC,SAAS,EAAC,OAAO;EAAC,KAAK,EAAC;AAAM,GAAKA,IAAI,gBACnD,oBAAC,QAAQ;EAAC,QAAQ,eAAE,oBAAC,UAAU;AAAI,gBACjC,oBAAC,wBAAwB;EAAC,OAAO,EAAEF;AAAQ,GACxCC,QAAQ,CACgB,CAClB,CAEd;AAED,eAAeF,aAAa"}
@@ -1,5 +1,4 @@
1
1
  var _ProfileDrawerContentUpdateAvatarMutation, _ProfileDrawerContentSignOutMutation;
2
-
3
2
  import React, { useCallback, useMemo, useRef, useState } from 'react';
4
3
  import { message, ThemeSwitcher } from '@os-design/core';
5
4
  import styled from '@emotion/styled';
@@ -44,11 +43,10 @@ const HiddenInput = styled.input`
44
43
  display: none;
45
44
  `;
46
45
  const profileDrawerContentUpdateAvatarMutation = _ProfileDrawerContentUpdateAvatarMutation !== void 0 ? _ProfileDrawerContentUpdateAvatarMutation : (_ProfileDrawerContentUpdateAvatarMutation = require("./__generated__/ProfileDrawerContentUpdateAvatarMutation.graphql"), _ProfileDrawerContentUpdateAvatarMutation.hash && _ProfileDrawerContentUpdateAvatarMutation.hash !== "cf72a6314772ed0d1f182b197c858505" && console.error("The definition of 'ProfileDrawerContentUpdateAvatarMutation' appears to have changed. Run `relay-compiler` to update the generated files to receive the expected data."), _ProfileDrawerContentUpdateAvatarMutation);
47
-
48
46
  const DeleteAvatarButton = () => {
49
47
  const {
50
48
  t
51
- } = useTranslation('profile');
49
+ } = useTranslation(['profile']);
52
50
  const [commit, loading] = useMutation(profileDrawerContentUpdateAvatarMutation);
53
51
  const handler = useCallback(() => {
54
52
  commit({
@@ -59,7 +57,6 @@ const DeleteAvatarButton = () => {
59
57
  },
60
58
  onError: error => {
61
59
  var _source, _source$errors, _source$errors$;
62
-
63
60
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
64
61
  message.error((_source = error.source) === null || _source === void 0 ? void 0 : (_source$errors = _source.errors) === null || _source$errors === void 0 ? void 0 : (_source$errors$ = _source$errors[0]) === null || _source$errors$ === void 0 ? void 0 : _source$errors$.message);
65
62
  },
@@ -73,13 +70,12 @@ const DeleteAvatarButton = () => {
73
70
  onClick: handler
74
71
  }, t('profile:deleteAvatar'));
75
72
  };
76
-
77
73
  const UpdateAvatarButton = ({
78
74
  hasAvatar
79
75
  }) => {
80
76
  const {
81
77
  t
82
- } = useTranslation('profile');
78
+ } = useTranslation(['profile']);
83
79
  const fileInputRef = useRef(null);
84
80
  const [commit, loading] = useMutation(profileDrawerContentUpdateAvatarMutation);
85
81
  const handler = useCallback(e => {
@@ -99,7 +95,6 @@ const UpdateAvatarButton = ({
99
95
  },
100
96
  onError: error => {
101
97
  var _source2, _source2$errors, _source2$errors$;
102
-
103
98
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
104
99
  message.error((_source2 = error.source) === null || _source2 === void 0 ? void 0 : (_source2$errors = _source2.errors) === null || _source2$errors === void 0 ? void 0 : (_source2$errors$ = _source2$errors[0]) === null || _source2$errors$ === void 0 ? void 0 : _source2$errors$.message);
105
100
  },
@@ -122,13 +117,12 @@ const UpdateAvatarButton = ({
122
117
  ref: fileInputRef
123
118
  }));
124
119
  };
125
-
126
120
  const UpdateNameButton = ({
127
121
  hasName
128
122
  }) => {
129
123
  const {
130
124
  t
131
- } = useTranslation('profile');
125
+ } = useTranslation(['profile']);
132
126
  const [modalVisibility, setModalVisibility] = useState(false);
133
127
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(ProfileButton, {
134
128
  onClick: () => setModalVisibility(true)
@@ -137,11 +131,10 @@ const UpdateNameButton = ({
137
131
  onClose: () => setModalVisibility(false)
138
132
  }));
139
133
  };
140
-
141
134
  const ChangePasswordButton = () => {
142
135
  const {
143
136
  t
144
- } = useTranslation('profile');
137
+ } = useTranslation(['profile']);
145
138
  const [modalVisibility, setModalVisibility] = useState(false);
146
139
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(ProfileButton, {
147
140
  onClick: () => setModalVisibility(true)
@@ -150,18 +143,16 @@ const ChangePasswordButton = () => {
150
143
  onClose: () => setModalVisibility(false)
151
144
  }));
152
145
  };
153
-
154
146
  const SignOutButton = () => {
155
147
  const {
156
148
  t
157
- } = useTranslation('profile');
149
+ } = useTranslation(['profile']);
158
150
  const [commit, loading] = useMutation(_ProfileDrawerContentSignOutMutation !== void 0 ? _ProfileDrawerContentSignOutMutation : (_ProfileDrawerContentSignOutMutation = require("./__generated__/ProfileDrawerContentSignOutMutation.graphql"), _ProfileDrawerContentSignOutMutation.hash && _ProfileDrawerContentSignOutMutation.hash !== "c7ca96e9e713315606b0c22d196b6f7b" && console.error("The definition of 'ProfileDrawerContentSignOutMutation' appears to have changed. Run `relay-compiler` to update the generated files to receive the expected data."), _ProfileDrawerContentSignOutMutation));
159
151
  const handler = useCallback(() => {
160
152
  commit({
161
153
  variables: {},
162
154
  onError: error => {
163
155
  var _source3, _source3$errors, _source3$errors$;
164
-
165
156
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
166
157
  message.error((_source3 = error.source) === null || _source3 === void 0 ? void 0 : (_source3$errors = _source3.errors) === null || _source3$errors === void 0 ? void 0 : (_source3$errors$ = _source3$errors[0]) === null || _source3$errors$ === void 0 ? void 0 : _source3$errors$.message);
167
158
  },
@@ -176,7 +167,6 @@ const SignOutButton = () => {
176
167
  onClick: handler
177
168
  }, t('profile:signOut'));
178
169
  };
179
-
180
170
  const ProfileDrawerContent = ({
181
171
  actions,
182
172
  children
@@ -196,6 +186,5 @@ const ProfileDrawerContent = ({
196
186
  hasName: !!fullName
197
187
  }), /*#__PURE__*/React.createElement(ChangePasswordButton, null), actions, /*#__PURE__*/React.createElement(SignOutButton, null), children), /*#__PURE__*/React.createElement(Footer, null, /*#__PURE__*/React.createElement(ThemeSwitcher, null)));
198
188
  };
199
-
200
189
  export default ProfileDrawerContent;
201
190
  //# sourceMappingURL=ProfileDrawerContent.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ProfileDrawerContent.js","names":["React","useCallback","useMemo","useRef","useState","message","ThemeSwitcher","styled","clr","useTranslation","useMutation","UserAvatar","useProfile","ProfileButton","ProfileUpdateNameModal","ProfileUpdatePasswordModal","AvatarContainer","div","UserContent","FullName","p","theme","sizes","large","Email","inputColorPlaceholder","ActionsContainer","Footer","HiddenInput","input","profileDrawerContentUpdateAvatarMutation","DeleteAvatarButton","t","commit","loading","handler","variables","avatar","onError","error","source","errors","onCompleted","success","UpdateAvatarButton","hasAvatar","fileInputRef","e","target","files","file","uploadables","current","value","click","UpdateNameButton","hasName","modalVisibility","setModalVisibility","ChangePasswordButton","SignOutButton","window","location","href","ProfileDrawerContent","actions","children","email","firstName","lastName","fullName","filter","i","join"],"sources":["../../../../src/lib/components/profile/ProfileDrawerContent.tsx"],"sourcesContent":["import React, { useCallback, useMemo, useRef, useState } from 'react';\nimport { message, ThemeSwitcher } from '@os-design/core';\nimport styled from '@emotion/styled';\nimport { clr } from '@os-design/theming';\nimport { useTranslation } from 'react-i18next';\nimport { useMutation } from 'react-relay/hooks';\nimport { graphql } from 'babel-plugin-relay/macro';\nimport UserAvatar from './UserAvatar';\nimport { useProfile } from './ProfileContext';\nimport ProfileButton from './ProfileButton';\nimport ProfileUpdateNameModal from './ProfileUpdateNameModal';\nimport ProfileUpdatePasswordModal from './ProfileUpdatePasswordModal';\nimport { ProfileDrawerContentSignOutMutation } from './__generated__/ProfileDrawerContentSignOutMutation.graphql';\nimport { ProfileDrawerContentUpdateAvatarMutation } from './__generated__/ProfileDrawerContentUpdateAvatarMutation.graphql';\n\nexport interface ProfileDrawerContentProps {\n /**\n * Additional actions placed under the avatar.\n * @default undefined\n */\n actions?: React.ReactNode;\n /**\n * The children.\n */\n children?: React.ReactNode;\n}\n\nconst AvatarContainer = styled.div`\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n`;\n\nconst UserContent = styled.div`\n margin-top: 1em;\n`;\n\nconst FullName = styled.div`\n font-size: ${(p) => p.theme.sizes.large}em;\n font-weight: 500;\n text-align: center;\n line-height: 1.2;\n`;\n\nconst Email = styled.div`\n color: ${(p) => clr(p.theme.inputColorPlaceholder)};\n margin-top: 0.2em;\n text-align: center;\n`;\n\nconst ActionsContainer = styled.div`\n margin-top: 1.5em;\n`;\n\nconst Footer = styled.div`\n display: flex;\n justify-content: center;\n margin-top: auto;\n padding-top: 1.5em;\n`;\n\nconst HiddenInput = styled.input`\n display: none;\n`;\n\nconst profileDrawerContentUpdateAvatarMutation = graphql`\n mutation ProfileDrawerContentUpdateAvatarMutation(\n $input: UpdateAvatarInput!\n ) {\n updateAvatar(input: $input) {\n id\n avatar\n }\n }\n`;\n\nconst DeleteAvatarButton: React.FC = () => {\n const { t } = useTranslation('profile');\n\n const [commit, loading] =\n useMutation<ProfileDrawerContentUpdateAvatarMutation>(\n profileDrawerContentUpdateAvatarMutation\n );\n\n const handler = useCallback(() => {\n commit({\n variables: {\n input: { avatar: null },\n },\n onError: (error) => {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n message.error((error as any).source?.errors?.[0]?.message);\n },\n onCompleted: () => {\n message.success(t('profile:updated'));\n },\n });\n }, [commit, t]);\n\n return (\n <ProfileButton loading={loading} onClick={handler}>\n {t('profile:deleteAvatar')}\n </ProfileButton>\n );\n};\n\ninterface UpdateAvatarButtonProps {\n hasAvatar: boolean;\n}\n\nconst UpdateAvatarButton: React.FC<UpdateAvatarButtonProps> = ({\n hasAvatar,\n}) => {\n const { t } = useTranslation('profile');\n const fileInputRef = useRef<HTMLInputElement>(null);\n\n const [commit, loading] =\n useMutation<ProfileDrawerContentUpdateAvatarMutation>(\n profileDrawerContentUpdateAvatarMutation\n );\n\n const handler = useCallback(\n (e) => {\n const target = e.target as HTMLInputElement | null;\n if (!target) return;\n\n const { files } = target;\n if (!files) return;\n\n const file = files[0];\n\n commit({\n variables: {\n input: {},\n },\n uploadables: { avatar: file },\n onError: (error) => {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n message.error((error as any).source?.errors?.[0]?.message);\n },\n onCompleted: () => {\n message.success(t('profile:updated'));\n },\n });\n },\n [commit, t]\n );\n\n return (\n <>\n <ProfileButton\n loading={loading}\n onClick={() => {\n if (!fileInputRef.current) return;\n fileInputRef.current.value = '';\n fileInputRef.current.click();\n }}\n >\n {t(`profile:${hasAvatar ? 'changeAvatar' : 'setAvatar'}`)}\n </ProfileButton>\n\n <HiddenInput\n type='file'\n accept='image/jpeg,image/png,image/webp'\n onChange={handler}\n ref={fileInputRef}\n />\n </>\n );\n};\n\ninterface UpdateNameButtonProps {\n hasName: boolean;\n}\n\nconst UpdateNameButton: React.FC<UpdateNameButtonProps> = ({ hasName }) => {\n const { t } = useTranslation('profile');\n const [modalVisibility, setModalVisibility] = useState(false);\n\n return (\n <>\n <ProfileButton onClick={() => setModalVisibility(true)}>\n {t(`profile:${hasName ? 'changeName' : 'setName'}`)}\n </ProfileButton>\n\n <ProfileUpdateNameModal\n visibility={modalVisibility}\n onClose={() => setModalVisibility(false)}\n />\n </>\n );\n};\n\nconst ChangePasswordButton: React.FC = () => {\n const { t } = useTranslation('profile');\n const [modalVisibility, setModalVisibility] = useState(false);\n\n return (\n <>\n <ProfileButton onClick={() => setModalVisibility(true)}>\n {t('profile:changePassword')}\n </ProfileButton>\n\n <ProfileUpdatePasswordModal\n visibility={modalVisibility}\n onClose={() => setModalVisibility(false)}\n />\n </>\n );\n};\n\nconst SignOutButton: React.FC = () => {\n const { t } = useTranslation('profile');\n\n const [commit, loading] =\n useMutation<ProfileDrawerContentSignOutMutation>(graphql`\n mutation ProfileDrawerContentSignOutMutation {\n signOut {\n ok\n }\n }\n `);\n\n const handler = useCallback(() => {\n commit({\n variables: {},\n onError: (error) => {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n message.error((error as any).source?.errors?.[0]?.message);\n },\n onCompleted: () => {\n window.location.href = '/auth/';\n },\n });\n }, [commit]);\n\n return (\n <ProfileButton danger loading={loading} onClick={handler}>\n {t('profile:signOut')}\n </ProfileButton>\n );\n};\n\nconst ProfileDrawerContent: React.FC<ProfileDrawerContentProps> = ({\n actions,\n children,\n}) => {\n const { email, firstName, lastName, avatar } = useProfile();\n\n const fullName = useMemo(\n () => [firstName, lastName].filter((i) => i).join(' '),\n [firstName, lastName]\n );\n\n return (\n <>\n <AvatarContainer>\n <UserAvatar size='10em' />\n <UserContent>\n {fullName && <FullName>{fullName}</FullName>}\n <Email>{email}</Email>\n </UserContent>\n </AvatarContainer>\n\n <ActionsContainer>\n {avatar && <DeleteAvatarButton />}\n\n <UpdateAvatarButton hasAvatar={!!avatar} />\n <UpdateNameButton hasName={!!fullName} />\n <ChangePasswordButton />\n\n {actions}\n\n <SignOutButton />\n\n {children}\n </ActionsContainer>\n\n <Footer>\n <ThemeSwitcher />\n </Footer>\n </>\n );\n};\n\nexport default ProfileDrawerContent;\n"],"mappings":";;AAAA,OAAOA,KAAP,IAAgBC,WAAhB,EAA6BC,OAA7B,EAAsCC,MAAtC,EAA8CC,QAA9C,QAA8D,OAA9D;AACA,SAASC,OAAT,EAAkBC,aAAlB,QAAuC,iBAAvC;AACA,OAAOC,MAAP,MAAmB,iBAAnB;AACA,SAASC,GAAT,QAAoB,oBAApB;AACA,SAASC,cAAT,QAA+B,eAA/B;AACA,SAASC,WAAT,QAA4B,mBAA5B;AAEA,OAAOC,UAAP,MAAuB,cAAvB;AACA,SAASC,UAAT,QAA2B,kBAA3B;AACA,OAAOC,aAAP,MAA0B,iBAA1B;AACA,OAAOC,sBAAP,MAAmC,0BAAnC;AACA,OAAOC,0BAAP,MAAuC,8BAAvC;AAgBA,MAAMC,eAAe,GAAGT,MAAM,CAACU,GAAI;AACnC;AACA;AACA;AACA;AACA,CALA;AAOA,MAAMC,WAAW,GAAGX,MAAM,CAACU,GAAI;AAC/B;AACA,CAFA;AAIA,MAAME,QAAQ,GAAGZ,MAAM,CAACU,GAAI;AAC5B,eAAgBG,CAAD,IAAOA,CAAC,CAACC,KAAF,CAAQC,KAAR,CAAcC,KAAM;AAC1C;AACA;AACA;AACA,CALA;AAOA,MAAMC,KAAK,GAAGjB,MAAM,CAACU,GAAI;AACzB,WAAYG,CAAD,IAAOZ,GAAG,CAACY,CAAC,CAACC,KAAF,CAAQI,qBAAT,CAAgC;AACrD;AACA;AACA,CAJA;AAMA,MAAMC,gBAAgB,GAAGnB,MAAM,CAACU,GAAI;AACpC;AACA,CAFA;AAIA,MAAMU,MAAM,GAAGpB,MAAM,CAACU,GAAI;AAC1B;AACA;AACA;AACA;AACA,CAL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emeSwitcher","styled","clr","useTranslation","useMutation","UserAvatar","useProfile","ProfileButton","ProfileUpdateNameModal","ProfileUpdatePasswordModal","AvatarContainer","div","UserContent","FullName","p","theme","sizes","large","Email","inputColorPlaceholder","ActionsContainer","Footer","HiddenInput","input","profileDrawerContentUpdateAvatarMutation","DeleteAvatarButton","t","commit","loading","handler","variables","avatar","onError","error","source","errors","onCompleted","success","UpdateAvatarButton","hasAvatar","fileInputRef","e","target","files","file","uploadables","current","value","click","UpdateNameButton","hasName","modalVisibility","setModalVisibility","ChangePasswordButton","SignOutButton","window","location","href","ProfileDrawerContent","actions","children","email","firstName","lastName","fullName","filter","i","join"],"sources":["../../../../src/lib/components/profile/ProfileDrawerContent.tsx"],"sourcesContent":["import React, { useCallback, useMemo, useRef, useState } from 'react';\nimport { message, ThemeSwitcher } from '@os-design/core';\nimport styled from '@emotion/styled';\nimport { clr } from '@os-design/theming';\nimport { useTranslation } from 'react-i18next';\nimport { useMutation } from 'react-relay/hooks';\nimport { graphql } from 'babel-plugin-relay/macro';\nimport UserAvatar from './UserAvatar';\nimport { useProfile } from './ProfileContext';\nimport ProfileButton from './ProfileButton';\nimport ProfileUpdateNameModal from './ProfileUpdateNameModal';\nimport ProfileUpdatePasswordModal from './ProfileUpdatePasswordModal';\nimport { ProfileDrawerContentSignOutMutation } from './__generated__/ProfileDrawerContentSignOutMutation.graphql';\nimport { ProfileDrawerContentUpdateAvatarMutation } from './__generated__/ProfileDrawerContentUpdateAvatarMutation.graphql';\n\nexport interface ProfileDrawerContentProps {\n /**\n * Additional actions placed under the avatar.\n * @default undefined\n */\n actions?: React.ReactNode;\n /**\n * The children.\n */\n children?: React.ReactNode;\n}\n\nconst AvatarContainer = styled.div`\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n`;\n\nconst UserContent = styled.div`\n margin-top: 1em;\n`;\n\nconst FullName = styled.div`\n font-size: ${(p) => p.theme.sizes.large}em;\n font-weight: 500;\n text-align: center;\n line-height: 1.2;\n`;\n\nconst Email = styled.div`\n color: ${(p) => clr(p.theme.inputColorPlaceholder)};\n margin-top: 0.2em;\n text-align: center;\n`;\n\nconst ActionsContainer = styled.div`\n margin-top: 1.5em;\n`;\n\nconst Footer = styled.div`\n display: flex;\n justify-content: center;\n margin-top: auto;\n padding-top: 1.5em;\n`;\n\nconst HiddenInput = styled.input`\n display: none;\n`;\n\nconst profileDrawerContentUpdateAvatarMutation = graphql`\n mutation ProfileDrawerContentUpdateAvatarMutation(\n $input: UpdateAvatarInput!\n ) {\n updateAvatar(input: $input) {\n id\n avatar\n }\n }\n`;\n\nconst DeleteAvatarButton: React.FC = () => {\n const { t } = useTranslation(['profile']);\n\n const [commit, loading] =\n useMutation<ProfileDrawerContentUpdateAvatarMutation>(\n profileDrawerContentUpdateAvatarMutation\n );\n\n const handler = useCallback(() => {\n commit({\n variables: {\n input: { avatar: null },\n },\n onError: (error) => {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n message.error((error as any).source?.errors?.[0]?.message);\n },\n onCompleted: () => {\n message.success(t('profile:updated'));\n },\n });\n }, [commit, t]);\n\n return (\n <ProfileButton loading={loading} onClick={handler}>\n {t('profile:deleteAvatar')}\n </ProfileButton>\n );\n};\n\ninterface UpdateAvatarButtonProps {\n hasAvatar: boolean;\n}\n\nconst UpdateAvatarButton: React.FC<UpdateAvatarButtonProps> = ({\n hasAvatar,\n}) => {\n const { t } = useTranslation(['profile']);\n const fileInputRef = useRef<HTMLInputElement>(null);\n\n const [commit, loading] =\n useMutation<ProfileDrawerContentUpdateAvatarMutation>(\n profileDrawerContentUpdateAvatarMutation\n );\n\n const handler = useCallback(\n (e) => {\n const target = e.target as HTMLInputElement | null;\n if (!target) return;\n\n const { files } = target;\n if (!files) return;\n\n const file = files[0];\n\n commit({\n variables: {\n input: {},\n },\n uploadables: { avatar: file },\n onError: (error) => {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n message.error((error as any).source?.errors?.[0]?.message);\n },\n onCompleted: () => {\n message.success(t('profile:updated'));\n },\n });\n },\n [commit, t]\n );\n\n return (\n <>\n <ProfileButton\n loading={loading}\n onClick={() => {\n if (!fileInputRef.current) return;\n fileInputRef.current.value = '';\n fileInputRef.current.click();\n }}\n >\n {t(`profile:${hasAvatar ? 'changeAvatar' : 'setAvatar'}`)}\n </ProfileButton>\n\n <HiddenInput\n type='file'\n accept='image/jpeg,image/png,image/webp'\n onChange={handler}\n ref={fileInputRef}\n />\n </>\n );\n};\n\ninterface UpdateNameButtonProps {\n hasName: boolean;\n}\n\nconst UpdateNameButton: React.FC<UpdateNameButtonProps> = ({ hasName }) => {\n const { t } = useTranslation(['profile']);\n const [modalVisibility, setModalVisibility] = useState(false);\n\n return (\n <>\n <ProfileButton onClick={() => setModalVisibility(true)}>\n {t(`profile:${hasName ? 'changeName' : 'setName'}`)}\n </ProfileButton>\n\n <ProfileUpdateNameModal\n visibility={modalVisibility}\n onClose={() => setModalVisibility(false)}\n />\n </>\n );\n};\n\nconst ChangePasswordButton: React.FC = () => {\n const { t } = useTranslation(['profile']);\n const [modalVisibility, setModalVisibility] = useState(false);\n\n return (\n <>\n <ProfileButton onClick={() => setModalVisibility(true)}>\n {t('profile:changePassword')}\n </ProfileButton>\n\n <ProfileUpdatePasswordModal\n visibility={modalVisibility}\n onClose={() => setModalVisibility(false)}\n />\n </>\n );\n};\n\nconst SignOutButton: React.FC = () => {\n const { t } = useTranslation(['profile']);\n\n const [commit, loading] =\n useMutation<ProfileDrawerContentSignOutMutation>(graphql`\n mutation ProfileDrawerContentSignOutMutation {\n signOut {\n ok\n }\n }\n `);\n\n const handler = useCallback(() => {\n commit({\n variables: {},\n onError: (error) => {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n message.error((error as any).source?.errors?.[0]?.message);\n },\n onCompleted: () => {\n window.location.href = '/auth/';\n },\n });\n }, [commit]);\n\n return (\n <ProfileButton danger loading={loading} onClick={handler}>\n {t('profile:signOut')}\n </ProfileButton>\n );\n};\n\nconst ProfileDrawerContent: React.FC<ProfileDrawerContentProps> = ({\n actions,\n children,\n}) => {\n const { email, firstName, lastName, avatar } = useProfile();\n\n const fullName = useMemo(\n () => [firstName, lastName].filter((i) => i).join(' '),\n [firstName, lastName]\n );\n\n return (\n <>\n <AvatarContainer>\n <UserAvatar size='10em' />\n <UserContent>\n {fullName && <FullName>{fullName}</FullName>}\n <Email>{email}</Email>\n </UserContent>\n </AvatarContainer>\n\n <ActionsContainer>\n {avatar && <DeleteAvatarButton />}\n\n <UpdateAvatarButton hasAvatar={!!avatar} />\n <UpdateNameButton hasName={!!fullName} />\n <ChangePasswordButton />\n\n {actions}\n\n <SignOutButton />\n\n {children}\n </ActionsContainer>\n\n <Footer>\n <ThemeSwitcher />\n </Footer>\n </>\n );\n};\n\nexport default ProfileDrawerContent;\n"],"mappings":";AAAA,OAAOA,KAAK,IAAIC,WAAW,EAAEC,OAAO,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,OAAO;AACrE,SAASC,OAAO,EAAEC,aAAa,QAAQ,iBAAiB;AACxD,OAAOC,MAAM,MAAM,iBAAiB;AACpC,SAASC,GAAG,QAAQ,oBAAoB;AACxC,SAASC,cAAc,QAAQ,eAAe;AAC9C,SAASC,WAAW,QAAQ,mBAAmB;AAE/C,OAAOC,UAAU,MAAM,cAAc;AACrC,SAASC,UAAU,QAAQ,kBAAkB;AAC7C,OAAOC,aAAa,MAAM,iBAAiB;AAC3C,OAAOC,sBAAsB,MAAM,0BAA0B;AAC7D,OAAOC,0BAA0B,MAAM,8BAA8B;AAgBrE,MAAMC,eAAe,GAAGT,MAAM,CAACU,GAAI;AACnC;AACA;AACA;AACA;AACA,CAAC;AAED,MAAMC,WAAW,GAAGX,MAAM,CAACU,GAAI;AAC/B;AACA,CAAC;AAED,MAAME,QAAQ,GAAGZ,MAAM,CAACU,GAAI;AAC5B,eAAgBG,CAAC,IAAKA,CAAC,CAACC,KAAK,CAACC,KAAK,CAACC,KAAM;AAC1C;AACA;AACA;AACA,CAAC;AAED,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ElB,oBAAC,gBAAgB,QACd9B,MAAM,iBAAI,oBAAC,kBAAkB,OAAG,eAEjC,oBAAC,kBAAkB;IAAC,SAAS,EAAE,CAAC,CAACA;EAAO,EAAG,eAC3C,oBAAC,gBAAgB;IAAC,OAAO,EAAE,CAAC,CAACiC;EAAS,EAAG,eACzC,oBAAC,oBAAoB,OAAG,EAEvBL,OAAO,eAER,oBAAC,aAAa,OAAG,EAEhBC,QAAQ,CACQ,eAEnB,oBAAC,MAAM,qBACL,oBAAC,aAAa,OAAG,CACV,CACR;AAEP,CAAC;AAED,eAAeF,oBAAoB"}
@@ -1,18 +1,16 @@
1
1
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
-
3
2
  import React from 'react';
4
3
  import { useIsMinWidth } from '@os-design/media';
5
4
  import { NavigationItem } from '@os-design/core';
6
5
  import { useTranslation } from 'react-i18next';
7
6
  import ProfileIcon from '../shared/icons/ProfileIcon';
8
-
9
7
  const ProfileNavigationItem = ({
10
8
  onClick = () => {},
11
9
  ...rest
12
10
  }) => {
13
11
  const {
14
12
  t
15
- } = useTranslation('profile');
13
+ } = useTranslation(['profile']);
16
14
  const isMinMd = useIsMinWidth('md');
17
15
  if (isMinMd) return null;
18
16
  return /*#__PURE__*/React.createElement(NavigationItem, _extends({
@@ -25,6 +23,5 @@ const ProfileNavigationItem = ({
25
23
  }
26
24
  }, rest), t('profile:menu'));
27
25
  };
28
-
29
26
  export default ProfileNavigationItem;
30
27
  //# sourceMappingURL=ProfileNavigationItem.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ProfileNavigationItem.js","names":["React","useIsMinWidth","NavigationItem","useTranslation","ProfileIcon","ProfileNavigationItem","onClick","rest","t","isMinMd","e","key"],"sources":["../../../../src/lib/components/profile/ProfileNavigationItem.tsx"],"sourcesContent":["import React from 'react';\nimport { useIsMinWidth } from '@os-design/media';\nimport { NavigationItem, NavigationItemProps } from '@os-design/core';\nimport { useTranslation } from 'react-i18next';\nimport ProfileIcon from '../shared/icons/ProfileIcon';\n\nexport interface ProfileNavigationItemProps\n extends Partial<NavigationItemProps> {\n onClick?: () => void;\n}\n\nconst ProfileNavigationItem: React.FC<ProfileNavigationItemProps> = ({\n onClick = () => {},\n ...rest\n}) => {\n const { t } = useTranslation('profile');\n const isMinMd = useIsMinWidth('md');\n\n if (isMinMd) return null;\n\n return (\n <NavigationItem\n href='#' // To make focusable\n icon={<ProfileIcon />}\n onClick={onClick}\n onKeyDown={(e) => {\n if (e.key === 'Enter') onClick();\n }}\n {...rest}\n >\n {t('profile:menu')}\n </NavigationItem>\n );\n};\n\nexport default ProfileNavigationItem;\n"],"mappings":";;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SAASC,aAAT,QAA8B,kBAA9B;AACA,SAASC,cAAT,QAAoD,iBAApD;AACA,SAASC,cAAT,QAA+B,eAA/B;AACA,OAAOC,WAAP,MAAwB,6BAAxB;;AAOA,MAAMC,qBAA2D,GAAG,CAAC;EACnEC,OAAO,GAAG,MAAM,CAAE,CADiD;EAEnE,GAAGC;AAFgE,CAAD,KAG9D;EACJ,MAAM;IAAEC;EAAF,IAAQL,cAAc,CAAC,SAAD,CAA5B;EACA,MAAMM,OAAO,GAAGR,aAAa,CAAC,IAAD,CAA7B;EAEA,IAAIQ,OAAJ,EAAa,OAAO,IAAP;EAEb,oBACE,oBAAC,cAAD;IACE,IAAI,EAAC,GADP,CACW;IADX;IAEE,IAAI,eAAE,oBAAC,WAAD,OAFR;IAGE,OAAO,EAAEH,OAHX;IAIE,SAAS,EAAGI,CAAD,IAAO;MAChB,IAAIA,CAAC,CAACC,GAAF,KAAU,OAAd,EAAuBL,OAAO;IAC/B;EANH,GAOMC,IAPN,GASGC,CAAC,CAAC,cAAD,CATJ,CADF;AAaD,CAtBD;;AAwBA,eAAeH,qBAAf"}
1
+ {"version":3,"file":"ProfileNavigationItem.js","names":["React","useIsMinWidth","NavigationItem","useTranslation","ProfileIcon","ProfileNavigationItem","onClick","rest","t","isMinMd","e","key"],"sources":["../../../../src/lib/components/profile/ProfileNavigationItem.tsx"],"sourcesContent":["import React from 'react';\nimport { useIsMinWidth } from '@os-design/media';\nimport { NavigationItem, NavigationItemProps } from '@os-design/core';\nimport { useTranslation } from 'react-i18next';\nimport ProfileIcon from '../shared/icons/ProfileIcon';\n\nexport interface ProfileNavigationItemProps\n extends Partial<NavigationItemProps> {\n onClick?: () => void;\n}\n\nconst ProfileNavigationItem: React.FC<ProfileNavigationItemProps> = ({\n onClick = () => {},\n ...rest\n}) => {\n const { t } = useTranslation(['profile']);\n const isMinMd = useIsMinWidth('md');\n\n if (isMinMd) return null;\n\n return (\n <NavigationItem\n href='#' // To make focusable\n icon={<ProfileIcon />}\n onClick={onClick}\n onKeyDown={(e) => {\n if (e.key === 'Enter') onClick();\n }}\n {...rest}\n >\n {t('profile:menu')}\n </NavigationItem>\n );\n};\n\nexport default ProfileNavigationItem;\n"],"mappings":";AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,aAAa,QAAQ,kBAAkB;AAChD,SAASC,cAAc,QAA6B,iBAAiB;AACrE,SAASC,cAAc,QAAQ,eAAe;AAC9C,OAAOC,WAAW,MAAM,6BAA6B;AAOrD,MAAMC,qBAA2D,GAAG,CAAC;EACnEC,OAAO,GAAG,MAAM,CAAC,CAAC;EAClB,GAAGC;AACL,CAAC,KAAK;EACJ,MAAM;IAAEC;EAAE,CAAC,GAAGL,cAAc,CAAC,CAAC,SAAS,CAAC,CAAC;EACzC,MAAMM,OAAO,GAAGR,aAAa,CAAC,IAAI,CAAC;EAEnC,IAAIQ,OAAO,EAAE,OAAO,IAAI;EAExB,oBACE,oBAAC,cAAc;IACb,IAAI,EAAC,GAAG,CAAC;IAAA;IACT,IAAI,eAAE,oBAAC,WAAW,OAAI;IACtB,OAAO,EAAEH,OAAQ;IACjB,SAAS,EAAGI,CAAC,IAAK;MAChB,IAAIA,CAAC,CAACC,GAAG,KAAK,OAAO,EAAEL,OAAO,EAAE;IAClC;EAAE,GACEC,IAAI,GAEPC,CAAC,CAAC,cAAc,CAAC,CACH;AAErB,CAAC;AAED,eAAeH,qBAAqB"}
@@ -1,16 +1,14 @@
1
1
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
-
3
2
  import React from 'react';
4
3
  import { useForm, useFormItem } from '@os-team/form-utils';
5
4
  import { Alert, Form, FormItem, Input } from '@os-design/core';
6
5
  import { useTranslation } from 'react-i18next';
7
-
8
6
  const ProfileUpdateNameForm = ({
9
7
  children
10
8
  }) => {
11
9
  const {
12
10
  t
13
- } = useTranslation('profile');
11
+ } = useTranslation(['profile']);
14
12
  const {
15
13
  formError
16
14
  } = useForm();
@@ -28,6 +26,5 @@ const ProfileUpdateNameForm = ({
28
26
  type: "error"
29
27
  }, formError), children);
30
28
  };
31
-
32
29
  export default ProfileUpdateNameForm;
33
30
  //# sourceMappingURL=ProfileUpdateNameForm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ProfileUpdateNameForm.js","names":["React","useForm","useFormItem","Alert","Form","FormItem","Input","useTranslation","ProfileUpdateNameForm","children","t","formError","firstName","lastName"],"sources":["../../../../src/lib/components/profile/ProfileUpdateNameForm.tsx"],"sourcesContent":["import React from 'react';\nimport { useForm, useFormItem } from '@os-team/form-utils';\nimport { Alert, Form, FormItem, Input } from '@os-design/core';\nimport { useTranslation } from 'react-i18next';\n\nexport interface ProfileUpdateNameFormData {\n firstName: string;\n lastName: string;\n}\n\ninterface ProfileUpdateNameFormProps {\n children?: React.ReactNode;\n}\n\nconst ProfileUpdateNameForm: React.FC<ProfileUpdateNameFormProps> = ({\n children,\n}) => {\n const { t } = useTranslation('profile');\n const { formError } = useForm();\n\n const firstName = useFormItem('firstName');\n const lastName = useFormItem('lastName');\n\n return (\n <Form>\n <FormItem\n label={t('profile:updateNameModal.firstName.label')}\n {...firstName[0]}\n >\n <Input\n placeholder={t('profile:updateNameModal.firstName.placeholder')}\n {...firstName[1]}\n />\n </FormItem>\n\n <FormItem\n label={t('profile:updateNameModal.lastName.label')}\n {...lastName[0]}\n >\n <Input\n placeholder={t('profile:updateNameModal.lastName.placeholder')}\n {...lastName[1]}\n />\n </FormItem>\n\n {formError && <Alert type='error'>{formError}</Alert>}\n\n {children}\n </Form>\n );\n};\n\nexport default ProfileUpdateNameForm;\n"],"mappings":";;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SAASC,OAAT,EAAkBC,WAAlB,QAAqC,qBAArC;AACA,SAASC,KAAT,EAAgBC,IAAhB,EAAsBC,QAAtB,EAAgCC,KAAhC,QAA6C,iBAA7C;AACA,SAASC,cAAT,QAA+B,eAA/B;;AAWA,MAAMC,qBAA2D,GAAG,CAAC;EACnEC;AADmE,CAAD,KAE9D;EACJ,MAAM;IAAEC;EAAF,IAAQH,cAAc,CAAC,SAAD,CAA5B;EACA,MAAM;IAAEI;EAAF,IAAgBV,OAAO,EAA7B;EAEA,MAAMW,SAAS,GAAGV,WAAW,CAAC,WAAD,CAA7B;EACA,MAAMW,QAAQ,GAAGX,WAAW,CAAC,UAAD,CAA5B;EAEA,oBACE,oBAAC,IAAD,qBACE,oBAAC,QAAD;IACE,KAAK,EAAEQ,CAAC,CAAC,yCAAD;EADV,GAEME,SAAS,CAAC,CAAD,CAFf,gBAIE,oBAAC,KAAD;IACE,WAAW,EAAEF,CAAC,CAAC,+CAAD;EADhB,GAEME,SAAS,CAAC,CAAD,CAFf,EAJF,CADF,eAWE,oBAAC,QAAD;IACE,KAAK,EAAEF,CAAC,CAAC,wCAAD;EADV,GAEMG,QAAQ,CAAC,CAAD,CAFd,gBAIE,oBAAC,KAAD;IACE,WAAW,EAAEH,CAAC,CAAC,8CAAD;EADhB,GAEMG,QAAQ,CAAC,CAAD,CAFd,EAJF,CAXF,EAqBGF,SAAS,iBAAI,oBAAC,KAAD;IAAO,IAAI,EAAC;EAAZ,GAAqBA,SAArB,CArBhB,EAuBGF,QAvBH,CADF;AA2BD,CApCD;;AAsCA,eAAeD,qBAAf"}
1
+ {"version":3,"file":"ProfileUpdateNameForm.js","names":["React","useForm","useFormItem","Alert","Form","FormItem","Input","useTranslation","ProfileUpdateNameForm","children","t","formError","firstName","lastName"],"sources":["../../../../src/lib/components/profile/ProfileUpdateNameForm.tsx"],"sourcesContent":["import React from 'react';\nimport { useForm, useFormItem } from '@os-team/form-utils';\nimport { Alert, Form, FormItem, Input } from '@os-design/core';\nimport { useTranslation } from 'react-i18next';\n\nexport interface ProfileUpdateNameFormData {\n firstName: string;\n lastName: string;\n}\n\ninterface ProfileUpdateNameFormProps {\n children?: React.ReactNode;\n}\n\nconst ProfileUpdateNameForm: React.FC<ProfileUpdateNameFormProps> = ({\n children,\n}) => {\n const { t } = useTranslation(['profile']);\n const { formError } = useForm();\n\n const firstName = useFormItem('firstName');\n const lastName = useFormItem('lastName');\n\n return (\n <Form>\n <FormItem\n label={t('profile:updateNameModal.firstName.label')}\n {...firstName[0]}\n >\n <Input\n placeholder={t('profile:updateNameModal.firstName.placeholder')}\n {...firstName[1]}\n />\n </FormItem>\n\n <FormItem\n label={t('profile:updateNameModal.lastName.label')}\n {...lastName[0]}\n >\n <Input\n placeholder={t('profile:updateNameModal.lastName.placeholder')}\n {...lastName[1]}\n />\n </FormItem>\n\n {formError && <Alert type='error'>{formError}</Alert>}\n\n {children}\n </Form>\n );\n};\n\nexport default ProfileUpdateNameForm;\n"],"mappings":";AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,OAAO,EAAEC,WAAW,QAAQ,qBAAqB;AAC1D,SAASC,KAAK,EAAEC,IAAI,EAAEC,QAAQ,EAAEC,KAAK,QAAQ,iBAAiB;AAC9D,SAASC,cAAc,QAAQ,eAAe;AAW9C,MAAMC,qBAA2D,GAAG,CAAC;EACnEC;AACF,CAAC,KAAK;EACJ,MAAM;IAAEC;EAAE,CAAC,GAAGH,cAAc,CAAC,CAAC,SAAS,CAAC,CAAC;EACzC,MAAM;IAAEI;EAAU,CAAC,GAAGV,OAAO,EAAE;EAE/B,MAAMW,SAAS,GAAGV,WAAW,CAAC,WAAW,CAAC;EAC1C,MAAMW,QAAQ,GAAGX,WAAW,CAAC,UAAU,CAAC;EAExC,oBACE,oBAAC,IAAI,qBACH,oBAAC,QAAQ;IACP,KAAK,EAAEQ,CAAC,CAAC,yCAAyC;EAAE,GAChDE,SAAS,CAAC,CAAC,CAAC,gBAEhB,oBAAC,KAAK;IACJ,WAAW,EAAEF,CAAC,CAAC,+CAA+C;EAAE,GAC5DE,SAAS,CAAC,CAAC,CAAC,EAChB,CACO,eAEX,oBAAC,QAAQ;IACP,KAAK,EAAEF,CAAC,CAAC,wCAAwC;EAAE,GAC/CG,QAAQ,CAAC,CAAC,CAAC,gBAEf,oBAAC,KAAK;IACJ,WAAW,EAAEH,CAAC,CAAC,8CAA8C;EAAE,GAC3DG,QAAQ,CAAC,CAAC,CAAC,EACf,CACO,EAEVF,SAAS,iBAAI,oBAAC,KAAK;IAAC,IAAI,EAAC;EAAO,GAAEA,SAAS,CAAS,EAEpDF,QAAQ,CACJ;AAEX,CAAC;AAED,eAAeD,qBAAqB"}