@os-team/profile 1.2.1 → 1.2.2

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 (374) hide show
  1. package/dist/@types/emotion.d.js +1 -0
  2. package/dist/@types/i18next.d.js +1 -0
  3. package/dist/@types/relay.d.js +0 -0
  4. package/dist/{types/components → components}/profile/ProfileButton.d.ts +1 -1
  5. package/dist/components/profile/ProfileButton.d.ts.map +1 -0
  6. package/dist/components/profile/ProfileButton.js +9 -0
  7. package/dist/components/profile/ProfileConfigContext.d.ts.map +1 -0
  8. package/dist/{esm/components → components}/profile/ProfileConfigContext.js +1 -2
  9. package/dist/components/profile/ProfileContext.d.ts.map +1 -0
  10. package/dist/{esm/components → components}/profile/ProfileContext.js +1 -2
  11. package/dist/{types/components → components}/profile/ProfileDrawer.d.ts +2 -2
  12. package/dist/components/profile/ProfileDrawer.d.ts.map +1 -0
  13. package/dist/components/profile/ProfileDrawer.js +28 -0
  14. package/dist/{types/components → components}/profile/ProfileDrawerContent.d.ts +7 -0
  15. package/dist/components/profile/ProfileDrawerContent.d.ts.map +1 -0
  16. package/dist/{esm/components → components}/profile/ProfileDrawerContent.js +66 -41
  17. package/dist/{types/components → components}/profile/ProfileNavigationItem.d.ts +1 -1
  18. package/dist/components/profile/ProfileNavigationItem.d.ts.map +1 -0
  19. package/dist/{esm/components → components}/profile/ProfileNavigationItem.js +8 -7
  20. package/dist/components/profile/ProfileUpdateNameModal.d.ts.map +1 -0
  21. package/dist/{esm/components → components}/profile/ProfileUpdateNameModal.js +38 -31
  22. package/dist/components/profile/ProfileUpdatePasswordModal.d.ts.map +1 -0
  23. package/dist/{esm/components → components}/profile/ProfileUpdatePasswordModal.js +40 -33
  24. package/dist/components/profile/ProtectedWrapper.d.ts.map +1 -0
  25. package/dist/{esm/components → components}/profile/ProtectedWrapper.js +19 -14
  26. package/dist/{types/components → components}/profile/UserAvatar.d.ts +1 -1
  27. package/dist/components/profile/UserAvatar.d.ts.map +1 -0
  28. package/dist/{esm/components → components}/profile/UserAvatar.js +7 -6
  29. package/dist/{types/components → components}/profile/UserAvatarAddon.d.ts +1 -1
  30. package/dist/components/profile/UserAvatarAddon.d.ts.map +1 -0
  31. package/dist/components/profile/UserAvatarAddon.js +50 -0
  32. package/dist/{types/components → components}/profile/__generated__/ProfileDrawerContentSignOutMutation.graphql.d.ts +5 -0
  33. package/dist/components/profile/__generated__/ProfileDrawerContentSignOutMutation.graphql.d.ts.map +1 -0
  34. package/dist/{esm/components → components}/profile/__generated__/ProfileDrawerContentSignOutMutation.graphql.js +2 -3
  35. package/dist/{types/components → components}/profile/__generated__/ProfileDrawerContentUpdateAvatarMutation.graphql.d.ts +5 -0
  36. package/dist/components/profile/__generated__/ProfileDrawerContentUpdateAvatarMutation.graphql.d.ts.map +1 -0
  37. package/dist/{esm/components → components}/profile/__generated__/ProfileDrawerContentUpdateAvatarMutation.graphql.js +2 -3
  38. package/dist/{types/components → components}/profile/__generated__/ProfileUpdateNameModalMutation.graphql.d.ts +5 -0
  39. package/dist/components/profile/__generated__/ProfileUpdateNameModalMutation.graphql.d.ts.map +1 -0
  40. package/dist/{esm/components → components}/profile/__generated__/ProfileUpdateNameModalMutation.graphql.js +2 -3
  41. package/dist/{types/components → components}/profile/__generated__/ProfileUpdatePasswordModalMutation.graphql.d.ts +5 -0
  42. package/dist/components/profile/__generated__/ProfileUpdatePasswordModalMutation.graphql.d.ts.map +1 -0
  43. package/dist/{esm/components → components}/profile/__generated__/ProfileUpdatePasswordModalMutation.graphql.js +2 -3
  44. package/dist/{types/components → components}/profile/__generated__/ProtectedWrapperQuery.graphql.d.ts +5 -0
  45. package/dist/components/profile/__generated__/ProtectedWrapperQuery.graphql.d.ts.map +1 -0
  46. package/dist/{esm/components → components}/profile/__generated__/ProtectedWrapperQuery.graphql.js +2 -3
  47. package/dist/{types/components → components}/session/SessionDrawer.d.ts +1 -1
  48. package/dist/components/session/SessionDrawer.d.ts.map +1 -0
  49. package/dist/components/session/SessionDrawer.js +45 -0
  50. package/dist/components/session/SessionDrawerContent.d.ts.map +1 -0
  51. package/dist/{esm/components → components}/session/SessionDrawerContent.js +12 -10
  52. package/dist/{types/components → components}/session/SessionList.d.ts +5 -5
  53. package/dist/components/session/SessionList.d.ts.map +1 -0
  54. package/dist/{esm/components → components}/session/SessionList.js +33 -17
  55. package/dist/{types/components → components}/session/SessionListItem.d.ts +9 -9
  56. package/dist/components/session/SessionListItem.d.ts.map +1 -0
  57. package/dist/{esm/components → components}/session/SessionListItem.js +37 -19
  58. package/dist/components/session/SessionListSkeleton.d.ts.map +1 -0
  59. package/dist/components/session/SessionListSkeleton.js +43 -0
  60. package/dist/{types/components → components}/session/__generated__/SessionDrawerContentQuery.graphql.d.ts +5 -0
  61. package/dist/components/session/__generated__/SessionDrawerContentQuery.graphql.d.ts.map +1 -0
  62. package/dist/{esm/components → components}/session/__generated__/SessionDrawerContentQuery.graphql.js +2 -3
  63. package/dist/{types/components → components}/session/__generated__/SessionListDestroyAllOtherSessionsMutation.graphql.d.ts +5 -0
  64. package/dist/components/session/__generated__/SessionListDestroyAllOtherSessionsMutation.graphql.d.ts.map +1 -0
  65. package/dist/{esm/components → components}/session/__generated__/SessionListDestroyAllOtherSessionsMutation.graphql.js +2 -3
  66. package/dist/{types/components → components}/session/__generated__/SessionListItemDestroySessionMutation.graphql.d.ts +5 -0
  67. package/dist/components/session/__generated__/SessionListItemDestroySessionMutation.graphql.d.ts.map +1 -0
  68. package/dist/{esm/components → components}/session/__generated__/SessionListItemDestroySessionMutation.graphql.js +2 -3
  69. package/dist/{types/components → components}/session/__generated__/SessionListItem_session.graphql.d.ts +5 -0
  70. package/dist/components/session/__generated__/SessionListItem_session.graphql.d.ts.map +1 -0
  71. package/dist/{esm/components → components}/session/__generated__/SessionListItem_session.graphql.js +2 -3
  72. package/dist/{types/components → components}/session/__generated__/SessionListRefetchQuery.graphql.d.ts +5 -0
  73. package/dist/components/session/__generated__/SessionListRefetchQuery.graphql.d.ts.map +1 -0
  74. package/dist/{esm/components → components}/session/__generated__/SessionListRefetchQuery.graphql.js +2 -3
  75. package/dist/{types/components → components}/session/__generated__/SessionList_sessions.graphql.d.ts +5 -0
  76. package/dist/components/session/__generated__/SessionList_sessions.graphql.d.ts.map +1 -0
  77. package/dist/{esm/components → components}/session/__generated__/SessionList_sessions.graphql.js +2 -3
  78. package/dist/{types/components → components}/session/formatDate.d.ts +1 -1
  79. package/dist/components/session/formatDate.d.ts.map +1 -0
  80. package/dist/{esm/components → components}/session/formatDate.js +1 -2
  81. package/dist/components/session/getLastSeen.d.ts +3 -0
  82. package/dist/components/session/getLastSeen.d.ts.map +1 -0
  83. package/dist/{esm/components → components}/session/getLastSeen.js +1 -2
  84. package/dist/{types/components → components}/shared/ButtonUpdate.d.ts +1 -1
  85. package/dist/components/shared/ButtonUpdate.d.ts.map +1 -0
  86. package/dist/{esm/components → components}/shared/ButtonUpdate.js +6 -3
  87. package/dist/components/shared/ErrorResult.d.ts.map +1 -0
  88. package/dist/{esm/components → components}/shared/ErrorResult.js +4 -4
  89. package/dist/components/shared/FormError.d.ts.map +1 -0
  90. package/dist/{esm/components → components}/shared/FormError.js +6 -5
  91. package/dist/components/shared/MainLoader.d.ts.map +1 -0
  92. package/dist/{esm/components → components}/shared/MainLoader.js +5 -3
  93. package/dist/{types/components → components}/shared/icons/AndroidIcon.d.ts +1 -1
  94. package/dist/components/shared/icons/AndroidIcon.d.ts.map +1 -0
  95. package/dist/components/shared/icons/AndroidIcon.js +12 -0
  96. package/dist/{types/components → components}/shared/icons/AppleIcon.d.ts +1 -1
  97. package/dist/components/shared/icons/AppleIcon.d.ts.map +1 -0
  98. package/dist/components/shared/icons/AppleIcon.js +12 -0
  99. package/dist/{types/components → components}/shared/icons/BrowserIcon.d.ts +1 -1
  100. package/dist/components/shared/icons/BrowserIcon.d.ts.map +1 -0
  101. package/dist/components/shared/icons/BrowserIcon.js +12 -0
  102. package/dist/{types/components → components}/shared/icons/ProfileIcon.d.ts +1 -1
  103. package/dist/components/shared/icons/ProfileIcon.d.ts.map +1 -0
  104. package/dist/components/shared/icons/ProfileIcon.js +12 -0
  105. package/dist/{types/components → components}/shared/icons/UnknownDeviceIcon.d.ts +1 -1
  106. package/dist/components/shared/icons/UnknownDeviceIcon.d.ts.map +1 -0
  107. package/dist/components/shared/icons/UnknownDeviceIcon.js +12 -0
  108. package/dist/index.d.ts.map +1 -0
  109. package/dist/index.js +14 -0
  110. package/dist/utils/getError.d.ts.map +1 -0
  111. package/dist/{esm/utils → utils}/getError.js +1 -2
  112. package/dist/utils/getUserFullName.d.ts.map +1 -0
  113. package/dist/{esm/utils → utils}/getUserFullName.js +1 -2
  114. package/dist/{types/utils → utils}/handleFormErrors.d.ts +1 -1
  115. package/dist/utils/handleFormErrors.d.ts.map +1 -0
  116. package/dist/{esm/utils → utils}/handleFormErrors.js +1 -2
  117. package/package.json +50 -56
  118. package/src/@types/react-app-env.d.ts +3 -0
  119. package/src/App.tsx +42 -0
  120. package/src/AppRouter.tsx +12 -0
  121. package/src/components/ErrorResult.tsx +23 -0
  122. package/src/components/Layout.tsx +70 -0
  123. package/src/components/MainLoader.tsx +22 -0
  124. package/src/components/icons/HomeIcon.tsx +12 -0
  125. package/src/i18next.ts +34 -0
  126. package/src/index.tsx +6 -0
  127. package/src/lib/@types/emotion.d.ts +7 -0
  128. package/src/lib/@types/i18next.d.ts +12 -0
  129. package/src/lib/@types/relay.d.ts +3 -0
  130. package/src/lib/components/profile/ProfileButton.tsx +8 -0
  131. package/src/lib/components/profile/ProfileConfigContext.ts +16 -0
  132. package/src/lib/components/profile/ProfileContext.ts +20 -0
  133. package/src/lib/components/profile/ProfileDrawer.tsx +31 -0
  134. package/src/lib/components/profile/ProfileDrawerContent.tsx +276 -0
  135. package/src/lib/components/profile/ProfileNavigationItem.tsx +36 -0
  136. package/src/lib/components/profile/ProfileUpdateNameModal.tsx +117 -0
  137. package/src/lib/components/profile/ProfileUpdatePasswordModal.tsx +129 -0
  138. package/src/lib/components/profile/ProtectedWrapper.tsx +81 -0
  139. package/src/lib/components/profile/UserAvatar.tsx +23 -0
  140. package/src/lib/components/profile/UserAvatarAddon.tsx +62 -0
  141. package/src/lib/components/profile/__generated__/ProfileDrawerContentSignOutMutation.graphql.ts +74 -0
  142. package/src/lib/components/profile/__generated__/ProfileDrawerContentUpdateAvatarMutation.graphql.ts +100 -0
  143. package/src/lib/components/profile/__generated__/ProfileUpdateNameModalMutation.graphql.ts +124 -0
  144. package/src/lib/components/profile/__generated__/ProfileUpdatePasswordModalMutation.graphql.ts +93 -0
  145. package/src/lib/components/profile/__generated__/ProtectedWrapperQuery.graphql.ts +106 -0
  146. package/src/lib/components/session/SessionDrawer.tsx +50 -0
  147. package/src/lib/components/session/SessionDrawerContent.tsx +34 -0
  148. package/src/lib/components/session/SessionList.tsx +138 -0
  149. package/src/lib/components/session/SessionListItem.tsx +318 -0
  150. package/src/lib/components/session/SessionListSkeleton.tsx +48 -0
  151. package/src/lib/components/session/__generated__/SessionDrawerContentQuery.graphql.ts +181 -0
  152. package/src/lib/components/session/__generated__/SessionListDestroyAllOtherSessionsMutation.graphql.ts +74 -0
  153. package/src/lib/components/session/__generated__/SessionListItemDestroySessionMutation.graphql.ts +92 -0
  154. package/src/lib/components/session/__generated__/SessionListItem_session.graphql.ts +154 -0
  155. package/src/lib/components/session/__generated__/SessionListRefetchQuery.graphql.ts +181 -0
  156. package/src/lib/components/session/__generated__/SessionList_sessions.graphql.ts +83 -0
  157. package/src/lib/components/session/formatDate.ts +21 -0
  158. package/{dist/cjs/components/session/getLastSeen.js → src/lib/components/session/getLastSeen.ts} +9 -9
  159. package/src/lib/components/shared/ButtonUpdate.tsx +10 -0
  160. package/src/lib/components/shared/ErrorResult.tsx +28 -0
  161. package/src/lib/components/shared/FormError.tsx +11 -0
  162. package/src/lib/components/shared/MainLoader.tsx +22 -0
  163. package/src/lib/components/shared/icons/AndroidIcon.tsx +12 -0
  164. package/src/lib/components/shared/icons/AppleIcon.tsx +12 -0
  165. package/src/lib/components/shared/icons/BrowserIcon.tsx +12 -0
  166. package/src/lib/components/shared/icons/ProfileIcon.tsx +12 -0
  167. package/src/lib/components/shared/icons/UnknownDeviceIcon.tsx +14 -0
  168. package/{dist/esm/index.js → src/lib/index.ts} +1 -1
  169. package/src/lib/utils/getError.ts +101 -0
  170. package/src/lib/utils/getUserFullName.ts +14 -0
  171. package/src/lib/utils/handleFormErrors.ts +16 -0
  172. package/src/pages/HomePage.tsx +11 -0
  173. package/src/schema.graphql +2494 -0
  174. package/src/utils/createRelayEnvironment.ts +22 -0
  175. package/src/utils/getError.ts +101 -0
  176. package/dist/cjs/@types/emotion.d.js +0 -4
  177. package/dist/cjs/@types/emotion.d.js.map +0 -1
  178. package/dist/cjs/@types/i18next.d.js +0 -4
  179. package/dist/cjs/@types/i18next.d.js.map +0 -1
  180. package/dist/cjs/components/profile/ProfileButton.js +0 -16
  181. package/dist/cjs/components/profile/ProfileButton.js.map +0 -1
  182. package/dist/cjs/components/profile/ProfileConfigContext.js +0 -17
  183. package/dist/cjs/components/profile/ProfileConfigContext.js.map +0 -1
  184. package/dist/cjs/components/profile/ProfileContext.js +0 -18
  185. package/dist/cjs/components/profile/ProfileContext.js.map +0 -1
  186. package/dist/cjs/components/profile/ProfileDrawer.js +0 -35
  187. package/dist/cjs/components/profile/ProfileDrawer.js.map +0 -1
  188. package/dist/cjs/components/profile/ProfileDrawerContent.js +0 -167
  189. package/dist/cjs/components/profile/ProfileDrawerContent.js.map +0 -1
  190. package/dist/cjs/components/profile/ProfileNavigationItem.js +0 -35
  191. package/dist/cjs/components/profile/ProfileNavigationItem.js.map +0 -1
  192. package/dist/cjs/components/profile/ProfileUpdateNameModal.js +0 -106
  193. package/dist/cjs/components/profile/ProfileUpdateNameModal.js.map +0 -1
  194. package/dist/cjs/components/profile/ProfileUpdatePasswordModal.js +0 -106
  195. package/dist/cjs/components/profile/ProfileUpdatePasswordModal.js.map +0 -1
  196. package/dist/cjs/components/profile/ProtectedWrapper.js +0 -54
  197. package/dist/cjs/components/profile/ProtectedWrapper.js.map +0 -1
  198. package/dist/cjs/components/profile/UserAvatar.js +0 -42
  199. package/dist/cjs/components/profile/UserAvatar.js.map +0 -1
  200. package/dist/cjs/components/profile/UserAvatarAddon.js +0 -41
  201. package/dist/cjs/components/profile/UserAvatarAddon.js.map +0 -1
  202. package/dist/cjs/components/profile/__generated__/ProfileDrawerContentSignOutMutation.graphql.js +0 -63
  203. package/dist/cjs/components/profile/__generated__/ProfileDrawerContentSignOutMutation.graphql.js.map +0 -1
  204. package/dist/cjs/components/profile/__generated__/ProfileDrawerContentUpdateAvatarMutation.graphql.js +0 -78
  205. package/dist/cjs/components/profile/__generated__/ProfileDrawerContentUpdateAvatarMutation.graphql.js.map +0 -1
  206. package/dist/cjs/components/profile/__generated__/ProfileUpdateNameModalMutation.graphql.js +0 -95
  207. package/dist/cjs/components/profile/__generated__/ProfileUpdateNameModalMutation.graphql.js.map +0 -1
  208. package/dist/cjs/components/profile/__generated__/ProfileUpdatePasswordModalMutation.graphql.js +0 -72
  209. package/dist/cjs/components/profile/__generated__/ProfileUpdatePasswordModalMutation.graphql.js.map +0 -1
  210. package/dist/cjs/components/profile/__generated__/ProtectedWrapperQuery.graphql.js +0 -87
  211. package/dist/cjs/components/profile/__generated__/ProtectedWrapperQuery.graphql.js.map +0 -1
  212. package/dist/cjs/components/session/SessionDrawer.js +0 -46
  213. package/dist/cjs/components/session/SessionDrawer.js.map +0 -1
  214. package/dist/cjs/components/session/SessionDrawerContent.js +0 -39
  215. package/dist/cjs/components/session/SessionDrawerContent.js.map +0 -1
  216. package/dist/cjs/components/session/SessionList.js +0 -73
  217. package/dist/cjs/components/session/SessionList.js.map +0 -1
  218. package/dist/cjs/components/session/SessionListItem.js +0 -150
  219. package/dist/cjs/components/session/SessionListItem.js.map +0 -1
  220. package/dist/cjs/components/session/SessionListSkeleton.js +0 -31
  221. package/dist/cjs/components/session/SessionListSkeleton.js.map +0 -1
  222. package/dist/cjs/components/session/__generated__/SessionDrawerContentQuery.graphql.js +0 -154
  223. package/dist/cjs/components/session/__generated__/SessionDrawerContentQuery.graphql.js.map +0 -1
  224. package/dist/cjs/components/session/__generated__/SessionListDestroyAllOtherSessionsMutation.graphql.js +0 -63
  225. package/dist/cjs/components/session/__generated__/SessionListDestroyAllOtherSessionsMutation.graphql.js.map +0 -1
  226. package/dist/cjs/components/session/__generated__/SessionListItemDestroySessionMutation.graphql.js +0 -72
  227. package/dist/cjs/components/session/__generated__/SessionListItemDestroySessionMutation.graphql.js.map +0 -1
  228. package/dist/cjs/components/session/__generated__/SessionListItem_session.graphql.js +0 -118
  229. package/dist/cjs/components/session/__generated__/SessionListItem_session.graphql.js.map +0 -1
  230. package/dist/cjs/components/session/__generated__/SessionListRefetchQuery.graphql.js +0 -154
  231. package/dist/cjs/components/session/__generated__/SessionListRefetchQuery.graphql.js.map +0 -1
  232. package/dist/cjs/components/session/__generated__/SessionList_sessions.graphql.js +0 -65
  233. package/dist/cjs/components/session/__generated__/SessionList_sessions.graphql.js.map +0 -1
  234. package/dist/cjs/components/session/formatDate.js +0 -19
  235. package/dist/cjs/components/session/formatDate.js.map +0 -1
  236. package/dist/cjs/components/session/getLastSeen.js.map +0 -1
  237. package/dist/cjs/components/shared/ButtonUpdate.js +0 -18
  238. package/dist/cjs/components/shared/ButtonUpdate.js.map +0 -1
  239. package/dist/cjs/components/shared/ErrorResult.js +0 -31
  240. package/dist/cjs/components/shared/ErrorResult.js.map +0 -1
  241. package/dist/cjs/components/shared/FormError.js +0 -21
  242. package/dist/cjs/components/shared/FormError.js.map +0 -1
  243. package/dist/cjs/components/shared/MainLoader.js +0 -17
  244. package/dist/cjs/components/shared/MainLoader.js.map +0 -1
  245. package/dist/cjs/components/shared/icons/AndroidIcon.js +0 -18
  246. package/dist/cjs/components/shared/icons/AndroidIcon.js.map +0 -1
  247. package/dist/cjs/components/shared/icons/AppleIcon.js +0 -18
  248. package/dist/cjs/components/shared/icons/AppleIcon.js.map +0 -1
  249. package/dist/cjs/components/shared/icons/BrowserIcon.js +0 -18
  250. package/dist/cjs/components/shared/icons/BrowserIcon.js.map +0 -1
  251. package/dist/cjs/components/shared/icons/ProfileIcon.js +0 -18
  252. package/dist/cjs/components/shared/icons/ProfileIcon.js.map +0 -1
  253. package/dist/cjs/components/shared/icons/UnknownDeviceIcon.js +0 -18
  254. package/dist/cjs/components/shared/icons/UnknownDeviceIcon.js.map +0 -1
  255. package/dist/cjs/index.js +0 -142
  256. package/dist/cjs/index.js.map +0 -1
  257. package/dist/cjs/utils/getError.js +0 -59
  258. package/dist/cjs/utils/getError.js.map +0 -1
  259. package/dist/cjs/utils/getUserFullName.js +0 -19
  260. package/dist/cjs/utils/getUserFullName.js.map +0 -1
  261. package/dist/cjs/utils/handleFormErrors.js +0 -25
  262. package/dist/cjs/utils/handleFormErrors.js.map +0 -1
  263. package/dist/esm/@types/emotion.d.js +0 -2
  264. package/dist/esm/@types/emotion.d.js.map +0 -1
  265. package/dist/esm/@types/i18next.d.js +0 -2
  266. package/dist/esm/@types/i18next.d.js.map +0 -1
  267. package/dist/esm/components/profile/ProfileButton.js +0 -9
  268. package/dist/esm/components/profile/ProfileButton.js.map +0 -1
  269. package/dist/esm/components/profile/ProfileConfigContext.js.map +0 -1
  270. package/dist/esm/components/profile/ProfileContext.js.map +0 -1
  271. package/dist/esm/components/profile/ProfileDrawer.js +0 -25
  272. package/dist/esm/components/profile/ProfileDrawer.js.map +0 -1
  273. package/dist/esm/components/profile/ProfileDrawerContent.js.map +0 -1
  274. package/dist/esm/components/profile/ProfileNavigationItem.js.map +0 -1
  275. package/dist/esm/components/profile/ProfileUpdateNameModal.js.map +0 -1
  276. package/dist/esm/components/profile/ProfileUpdatePasswordModal.js.map +0 -1
  277. package/dist/esm/components/profile/ProtectedWrapper.js.map +0 -1
  278. package/dist/esm/components/profile/UserAvatar.js.map +0 -1
  279. package/dist/esm/components/profile/UserAvatarAddon.js +0 -47
  280. package/dist/esm/components/profile/UserAvatarAddon.js.map +0 -1
  281. package/dist/esm/components/profile/__generated__/ProfileDrawerContentSignOutMutation.graphql.js.map +0 -1
  282. package/dist/esm/components/profile/__generated__/ProfileDrawerContentUpdateAvatarMutation.graphql.js.map +0 -1
  283. package/dist/esm/components/profile/__generated__/ProfileUpdateNameModalMutation.graphql.js.map +0 -1
  284. package/dist/esm/components/profile/__generated__/ProfileUpdatePasswordModalMutation.graphql.js.map +0 -1
  285. package/dist/esm/components/profile/__generated__/ProtectedWrapperQuery.graphql.js.map +0 -1
  286. package/dist/esm/components/session/SessionDrawer.js +0 -39
  287. package/dist/esm/components/session/SessionDrawer.js.map +0 -1
  288. package/dist/esm/components/session/SessionDrawerContent.js.map +0 -1
  289. package/dist/esm/components/session/SessionList.js.map +0 -1
  290. package/dist/esm/components/session/SessionListItem.js.map +0 -1
  291. package/dist/esm/components/session/SessionListSkeleton.js +0 -31
  292. package/dist/esm/components/session/SessionListSkeleton.js.map +0 -1
  293. package/dist/esm/components/session/__generated__/SessionDrawerContentQuery.graphql.js.map +0 -1
  294. package/dist/esm/components/session/__generated__/SessionListDestroyAllOtherSessionsMutation.graphql.js.map +0 -1
  295. package/dist/esm/components/session/__generated__/SessionListItemDestroySessionMutation.graphql.js.map +0 -1
  296. package/dist/esm/components/session/__generated__/SessionListItem_session.graphql.js.map +0 -1
  297. package/dist/esm/components/session/__generated__/SessionListRefetchQuery.graphql.js.map +0 -1
  298. package/dist/esm/components/session/__generated__/SessionList_sessions.graphql.js.map +0 -1
  299. package/dist/esm/components/session/formatDate.js.map +0 -1
  300. package/dist/esm/components/session/getLastSeen.js.map +0 -1
  301. package/dist/esm/components/shared/ButtonUpdate.js.map +0 -1
  302. package/dist/esm/components/shared/ErrorResult.js.map +0 -1
  303. package/dist/esm/components/shared/FormError.js.map +0 -1
  304. package/dist/esm/components/shared/MainLoader.js.map +0 -1
  305. package/dist/esm/components/shared/icons/AndroidIcon.js +0 -11
  306. package/dist/esm/components/shared/icons/AndroidIcon.js.map +0 -1
  307. package/dist/esm/components/shared/icons/AppleIcon.js +0 -11
  308. package/dist/esm/components/shared/icons/AppleIcon.js.map +0 -1
  309. package/dist/esm/components/shared/icons/BrowserIcon.js +0 -11
  310. package/dist/esm/components/shared/icons/BrowserIcon.js.map +0 -1
  311. package/dist/esm/components/shared/icons/ProfileIcon.js +0 -11
  312. package/dist/esm/components/shared/icons/ProfileIcon.js.map +0 -1
  313. package/dist/esm/components/shared/icons/UnknownDeviceIcon.js +0 -11
  314. package/dist/esm/components/shared/icons/UnknownDeviceIcon.js.map +0 -1
  315. package/dist/esm/index.js.map +0 -1
  316. package/dist/esm/utils/getError.js.map +0 -1
  317. package/dist/esm/utils/getUserFullName.js.map +0 -1
  318. package/dist/esm/utils/handleFormErrors.js.map +0 -1
  319. package/dist/types/components/profile/ProfileButton.d.ts.map +0 -1
  320. package/dist/types/components/profile/ProfileConfigContext.d.ts.map +0 -1
  321. package/dist/types/components/profile/ProfileContext.d.ts.map +0 -1
  322. package/dist/types/components/profile/ProfileDrawer.d.ts.map +0 -1
  323. package/dist/types/components/profile/ProfileDrawerContent.d.ts.map +0 -1
  324. package/dist/types/components/profile/ProfileNavigationItem.d.ts.map +0 -1
  325. package/dist/types/components/profile/ProfileUpdateNameModal.d.ts.map +0 -1
  326. package/dist/types/components/profile/ProfileUpdatePasswordModal.d.ts.map +0 -1
  327. package/dist/types/components/profile/ProtectedWrapper.d.ts.map +0 -1
  328. package/dist/types/components/profile/UserAvatar.d.ts.map +0 -1
  329. package/dist/types/components/profile/UserAvatarAddon.d.ts.map +0 -1
  330. package/dist/types/components/profile/__generated__/ProfileDrawerContentSignOutMutation.graphql.d.ts.map +0 -1
  331. package/dist/types/components/profile/__generated__/ProfileDrawerContentUpdateAvatarMutation.graphql.d.ts.map +0 -1
  332. package/dist/types/components/profile/__generated__/ProfileUpdateNameModalMutation.graphql.d.ts.map +0 -1
  333. package/dist/types/components/profile/__generated__/ProfileUpdatePasswordModalMutation.graphql.d.ts.map +0 -1
  334. package/dist/types/components/profile/__generated__/ProtectedWrapperQuery.graphql.d.ts.map +0 -1
  335. package/dist/types/components/session/SessionDrawer.d.ts.map +0 -1
  336. package/dist/types/components/session/SessionDrawerContent.d.ts.map +0 -1
  337. package/dist/types/components/session/SessionList.d.ts.map +0 -1
  338. package/dist/types/components/session/SessionListItem.d.ts.map +0 -1
  339. package/dist/types/components/session/SessionListSkeleton.d.ts.map +0 -1
  340. package/dist/types/components/session/__generated__/SessionDrawerContentQuery.graphql.d.ts.map +0 -1
  341. package/dist/types/components/session/__generated__/SessionListDestroyAllOtherSessionsMutation.graphql.d.ts.map +0 -1
  342. package/dist/types/components/session/__generated__/SessionListItemDestroySessionMutation.graphql.d.ts.map +0 -1
  343. package/dist/types/components/session/__generated__/SessionListItem_session.graphql.d.ts.map +0 -1
  344. package/dist/types/components/session/__generated__/SessionListRefetchQuery.graphql.d.ts.map +0 -1
  345. package/dist/types/components/session/__generated__/SessionList_sessions.graphql.d.ts.map +0 -1
  346. package/dist/types/components/session/formatDate.d.ts.map +0 -1
  347. package/dist/types/components/session/getLastSeen.d.ts +0 -3
  348. package/dist/types/components/session/getLastSeen.d.ts.map +0 -1
  349. package/dist/types/components/shared/ButtonUpdate.d.ts.map +0 -1
  350. package/dist/types/components/shared/ErrorResult.d.ts.map +0 -1
  351. package/dist/types/components/shared/FormError.d.ts.map +0 -1
  352. package/dist/types/components/shared/MainLoader.d.ts.map +0 -1
  353. package/dist/types/components/shared/icons/AndroidIcon.d.ts.map +0 -1
  354. package/dist/types/components/shared/icons/AppleIcon.d.ts.map +0 -1
  355. package/dist/types/components/shared/icons/BrowserIcon.d.ts.map +0 -1
  356. package/dist/types/components/shared/icons/ProfileIcon.d.ts.map +0 -1
  357. package/dist/types/components/shared/icons/UnknownDeviceIcon.d.ts.map +0 -1
  358. package/dist/types/index.d.ts.map +0 -1
  359. package/dist/types/utils/getError.d.ts.map +0 -1
  360. package/dist/types/utils/getUserFullName.d.ts.map +0 -1
  361. package/dist/types/utils/handleFormErrors.d.ts.map +0 -1
  362. /package/dist/{types/components → components}/profile/ProfileConfigContext.d.ts +0 -0
  363. /package/dist/{types/components → components}/profile/ProfileContext.d.ts +0 -0
  364. /package/dist/{types/components → components}/profile/ProfileUpdateNameModal.d.ts +0 -0
  365. /package/dist/{types/components → components}/profile/ProfileUpdatePasswordModal.d.ts +0 -0
  366. /package/dist/{types/components → components}/profile/ProtectedWrapper.d.ts +0 -0
  367. /package/dist/{types/components → components}/session/SessionDrawerContent.d.ts +0 -0
  368. /package/dist/{types/components → components}/session/SessionListSkeleton.d.ts +0 -0
  369. /package/dist/{types/components → components}/shared/ErrorResult.d.ts +0 -0
  370. /package/dist/{types/components → components}/shared/FormError.d.ts +0 -0
  371. /package/dist/{types/components → components}/shared/MainLoader.d.ts +0 -0
  372. /package/dist/{types/index.d.ts → index.d.ts} +0 -0
  373. /package/dist/{types/utils → utils}/getError.d.ts +0 -0
  374. /package/dist/{types/utils → utils}/getUserFullName.d.ts +0 -0
package/dist/cjs/index.js DELETED
@@ -1,142 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- var _exportNames = {
7
- ProfileButton: true,
8
- ProfileDrawer: true,
9
- ProfileNavigationItem: true,
10
- ProtectedWrapper: true,
11
- UserAvatar: true,
12
- UserAvatarAddon: true,
13
- SessionDrawer: true,
14
- getUserFullName: true
15
- };
16
- Object.defineProperty(exports, "ProfileButton", {
17
- enumerable: true,
18
- get: function () {
19
- return _ProfileButton.default;
20
- }
21
- });
22
- Object.defineProperty(exports, "ProfileDrawer", {
23
- enumerable: true,
24
- get: function () {
25
- return _ProfileDrawer.default;
26
- }
27
- });
28
- Object.defineProperty(exports, "ProfileNavigationItem", {
29
- enumerable: true,
30
- get: function () {
31
- return _ProfileNavigationItem.default;
32
- }
33
- });
34
- Object.defineProperty(exports, "ProtectedWrapper", {
35
- enumerable: true,
36
- get: function () {
37
- return _ProtectedWrapper.default;
38
- }
39
- });
40
- Object.defineProperty(exports, "SessionDrawer", {
41
- enumerable: true,
42
- get: function () {
43
- return _SessionDrawer.default;
44
- }
45
- });
46
- Object.defineProperty(exports, "UserAvatar", {
47
- enumerable: true,
48
- get: function () {
49
- return _UserAvatar.default;
50
- }
51
- });
52
- Object.defineProperty(exports, "UserAvatarAddon", {
53
- enumerable: true,
54
- get: function () {
55
- return _UserAvatarAddon.default;
56
- }
57
- });
58
- Object.defineProperty(exports, "getUserFullName", {
59
- enumerable: true,
60
- get: function () {
61
- return _getUserFullName.default;
62
- }
63
- });
64
- var _ProfileButton = _interopRequireDefault(require("./components/profile/ProfileButton"));
65
- var _ProfileDrawer = _interopRequireWildcard(require("./components/profile/ProfileDrawer"));
66
- Object.keys(_ProfileDrawer).forEach(function (key) {
67
- if (key === "default" || key === "__esModule") return;
68
- if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
69
- if (key in exports && exports[key] === _ProfileDrawer[key]) return;
70
- Object.defineProperty(exports, key, {
71
- enumerable: true,
72
- get: function () {
73
- return _ProfileDrawer[key];
74
- }
75
- });
76
- });
77
- var _ProfileNavigationItem = _interopRequireWildcard(require("./components/profile/ProfileNavigationItem"));
78
- Object.keys(_ProfileNavigationItem).forEach(function (key) {
79
- if (key === "default" || key === "__esModule") return;
80
- if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
81
- if (key in exports && exports[key] === _ProfileNavigationItem[key]) return;
82
- Object.defineProperty(exports, key, {
83
- enumerable: true,
84
- get: function () {
85
- return _ProfileNavigationItem[key];
86
- }
87
- });
88
- });
89
- var _ProtectedWrapper = _interopRequireWildcard(require("./components/profile/ProtectedWrapper"));
90
- Object.keys(_ProtectedWrapper).forEach(function (key) {
91
- if (key === "default" || key === "__esModule") return;
92
- if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
93
- if (key in exports && exports[key] === _ProtectedWrapper[key]) return;
94
- Object.defineProperty(exports, key, {
95
- enumerable: true,
96
- get: function () {
97
- return _ProtectedWrapper[key];
98
- }
99
- });
100
- });
101
- var _UserAvatar = _interopRequireDefault(require("./components/profile/UserAvatar"));
102
- var _UserAvatarAddon = _interopRequireWildcard(require("./components/profile/UserAvatarAddon"));
103
- Object.keys(_UserAvatarAddon).forEach(function (key) {
104
- if (key === "default" || key === "__esModule") return;
105
- if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
106
- if (key in exports && exports[key] === _UserAvatarAddon[key]) return;
107
- Object.defineProperty(exports, key, {
108
- enumerable: true,
109
- get: function () {
110
- return _UserAvatarAddon[key];
111
- }
112
- });
113
- });
114
- var _SessionDrawer = _interopRequireDefault(require("./components/session/SessionDrawer"));
115
- var _getUserFullName = _interopRequireWildcard(require("./utils/getUserFullName"));
116
- Object.keys(_getUserFullName).forEach(function (key) {
117
- if (key === "default" || key === "__esModule") return;
118
- if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
119
- if (key in exports && exports[key] === _getUserFullName[key]) return;
120
- Object.defineProperty(exports, key, {
121
- enumerable: true,
122
- get: function () {
123
- return _getUserFullName[key];
124
- }
125
- });
126
- });
127
- var _ProfileContext = require("./components/profile/ProfileContext");
128
- Object.keys(_ProfileContext).forEach(function (key) {
129
- if (key === "default" || key === "__esModule") return;
130
- if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
131
- if (key in exports && exports[key] === _ProfileContext[key]) return;
132
- Object.defineProperty(exports, key, {
133
- enumerable: true,
134
- get: function () {
135
- return _ProfileContext[key];
136
- }
137
- });
138
- });
139
- function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
140
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
141
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
142
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","names":["_ProfileButton","_interopRequireDefault","require","_ProfileDrawer","_interopRequireWildcard","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_ProfileNavigationItem","_ProtectedWrapper","_UserAvatar","_UserAvatarAddon","_SessionDrawer","_getUserFullName","_ProfileContext","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","n","__proto__","a","getOwnPropertyDescriptor","u","i","set"],"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,IAAAA,cAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,cAAA,GAAAC,uBAAA,CAAAF,OAAA;AASAG,MAAA,CAAAC,IAAA,CAAAH,cAAA,EAAAI,OAAA,WAAAC,GAA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AA,IAAAX,CAAA,CAAAW,CAAA,YAAAJ,CAAA,CAAAF,OAAA,GAAAL,CAAA,EAAAG,CAAA,IAAAA,CAAA,CAAAU,GAAA,CAAAb,CAAA,EAAAO,CAAA,GAAAA,CAAA;AAAA,SAAA/B,uBAAAwB,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAI,UAAA,GAAAJ,CAAA,KAAAK,OAAA,EAAAL,CAAA","ignoreList":[]}
@@ -1,59 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
- const DEFAULT_CODE = 'no_code';
8
- const DEFAULT_MESSAGE = 'Error';
9
- const isObject = value => typeof value === 'object' && !Array.isArray(value) && value !== null;
10
- const isData = value => isObject(value) && Object.values(value).every(constraint => isObject(constraint) && 'code' in constraint && typeof constraint.code === 'string' && 'message' in constraint && typeof constraint.message === 'string');
11
- const getError = error => {
12
- // Trying to find the message of an error
13
- if (!isObject(error) || !('message' in error) || typeof error.message !== 'string') {
14
- return {
15
- code: DEFAULT_CODE,
16
- message: DEFAULT_MESSAGE
17
- };
18
- }
19
-
20
- // Trying to find the first GraphQL error
21
- if (!('source' in error) || !isObject(error.source) || !('errors' in error.source) || !Array.isArray(error.source.errors) || error.source.errors.length === 0) {
22
- return {
23
- code: DEFAULT_CODE,
24
- message: error.message
25
- };
26
- }
27
- const firstError = error.source.errors[0];
28
-
29
- // Trying to find the message of the GraphQL error
30
- if (!isObject(firstError) || !('message' in firstError) || typeof firstError.message !== 'string') {
31
- return {
32
- code: DEFAULT_CODE,
33
- message: error.message
34
- };
35
- }
36
-
37
- // Trying to find the code of the GraphQL message
38
- if (!('extensions' in firstError) || !isObject(firstError.extensions) || !('code' in firstError.extensions) || typeof firstError.extensions.code !== 'string') {
39
- return {
40
- code: DEFAULT_CODE,
41
- message: firstError.message
42
- };
43
- }
44
-
45
- // Trying to find the data in the GraphQL message
46
- if (!('data' in firstError.extensions) || !isData(firstError.extensions.data)) {
47
- return {
48
- code: firstError.extensions.code,
49
- message: firstError.message
50
- };
51
- }
52
- return {
53
- code: firstError.extensions.code,
54
- message: firstError.message,
55
- data: firstError.extensions.data
56
- };
57
- };
58
- var _default = exports.default = getError;
59
- //# sourceMappingURL=getError.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"getError.js","names":["DEFAULT_CODE","DEFAULT_MESSAGE","isObject","value","Array","isArray","isData","Object","values","every","constraint","code","message","getError","error","source","errors","length","firstError","extensions","data","_default","exports","default"],"sources":["../../../src/lib/utils/getError.ts"],"sourcesContent":["interface Constraint {\n code: string;\n message: string;\n}\n\ninterface ErrorObject {\n code: string;\n message: string;\n data?: Record<string, Constraint>;\n}\n\nconst DEFAULT_CODE = 'no_code';\nconst DEFAULT_MESSAGE = 'Error';\n\nconst isObject = (value: unknown): value is object =>\n typeof value === 'object' && !Array.isArray(value) && value !== null;\n\nconst isData = (value: unknown): value is Record<string, Constraint> =>\n isObject(value) &&\n Object.values(value).every(\n (constraint: unknown) =>\n isObject(constraint) &&\n 'code' in constraint &&\n typeof constraint.code === 'string' &&\n 'message' in constraint &&\n typeof constraint.message === 'string'\n );\n\nconst getError = (error: unknown): ErrorObject => {\n // Trying to find the message of an error\n if (\n !isObject(error) ||\n !('message' in error) ||\n typeof error.message !== 'string'\n ) {\n return {\n code: DEFAULT_CODE,\n message: DEFAULT_MESSAGE,\n };\n }\n\n // Trying to find the first GraphQL error\n if (\n !('source' in error) ||\n !isObject(error.source) ||\n !('errors' in error.source) ||\n !Array.isArray(error.source.errors) ||\n error.source.errors.length === 0\n ) {\n return {\n code: DEFAULT_CODE,\n message: error.message,\n };\n }\n\n const firstError = error.source.errors[0] as unknown;\n\n // Trying to find the message of the GraphQL error\n if (\n !isObject(firstError) ||\n !('message' in firstError) ||\n typeof firstError.message !== 'string'\n ) {\n return {\n code: DEFAULT_CODE,\n message: error.message,\n };\n }\n\n // Trying to find the code of the GraphQL message\n if (\n !('extensions' in firstError) ||\n !isObject(firstError.extensions) ||\n !('code' in firstError.extensions) ||\n typeof firstError.extensions.code !== 'string'\n ) {\n return {\n code: DEFAULT_CODE,\n message: firstError.message,\n };\n }\n\n // Trying to find the data in the GraphQL message\n if (\n !('data' in firstError.extensions) ||\n !isData(firstError.extensions.data)\n ) {\n return {\n code: firstError.extensions.code,\n message: firstError.message,\n };\n }\n\n return {\n code: firstError.extensions.code,\n message: firstError.message,\n data: firstError.extensions.data,\n };\n};\n\nexport default getError;\n"],"mappings":";;;;;;AAWA,MAAMA,YAAY,GAAG,SAAS;AAC9B,MAAMC,eAAe,GAAG,OAAO;AAE/B,MAAMC,QAAQ,GAAIC,KAAc,IAC9B,OAAOA,KAAK,KAAK,QAAQ,IAAI,CAACC,KAAK,CAACC,OAAO,CAACF,KAAK,CAAC,IAAIA,KAAK,KAAK,IAAI;AAEtE,MAAMG,MAAM,GAAIH,KAAc,IAC5BD,QAAQ,CAACC,KAAK,CAAC,IACfI,MAAM,CAACC,MAAM,CAACL,KAAK,CAAC,CAACM,KAAK,CACvBC,UAAmB,IAClBR,QAAQ,CAACQ,UAAU,CAAC,IACpB,MAAM,IAAIA,UAAU,IACpB,OAAOA,UAAU,CAACC,IAAI,KAAK,QAAQ,IACnC,SAAS,IAAID,UAAU,IACvB,OAAOA,UAAU,CAACE,OAAO,KAAK,QAClC,CAAC;AAEH,MAAMC,QAAQ,GAAIC,KAAc,IAAkB;EAChD;EACA,IACE,CAACZ,QAAQ,CAACY,KAAK,CAAC,IAChB,EAAE,SAAS,IAAIA,KAAK,CAAC,IACrB,OAAOA,KAAK,CAACF,OAAO,KAAK,QAAQ,EACjC;IACA,OAAO;MACLD,IAAI,EAAEX,YAAY;MAClBY,OAAO,EAAEX;IACX,CAAC;EACH;;EAEA;EACA,IACE,EAAE,QAAQ,IAAIa,KAAK,CAAC,IACpB,CAACZ,QAAQ,CAACY,KAAK,CAACC,MAAM,CAAC,IACvB,EAAE,QAAQ,IAAID,KAAK,CAACC,MAAM,CAAC,IAC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C,IAAAC,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEaV,QAAQ","ignoreList":[]}
@@ -1,19 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
- const getUserFullName = _ref => {
8
- let {
9
- email,
10
- firstName,
11
- lastName
12
- } = _ref;
13
- const parts = [];
14
- if (firstName) parts.push(firstName);
15
- if (lastName) parts.push(lastName);
16
- return parts.length > 0 ? parts.join(' ') : email;
17
- };
18
- var _default = exports.default = getUserFullName;
19
- //# sourceMappingURL=getUserFullName.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"getUserFullName.js","names":["getUserFullName","_ref","email","firstName","lastName","parts","push","length","join","_default","exports","default"],"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,MAAMA,eAAe,GAAGC,IAAA,IAAkD;EAAA,IAAjD;IAAEC,KAAK;IAAEC,SAAS;IAAEC;EAAe,CAAC,GAAAH,IAAA;EAC3D,MAAMI,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,IAAAO,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEaX,eAAe","ignoreList":[]}
@@ -1,25 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
- var _getError = _interopRequireDefault(require("./getError"));
8
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
9
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
10
- const handleFormErrors = (form, error) => {
11
- const {
12
- message,
13
- data
14
- } = (0, _getError.default)(error);
15
- if (data) {
16
- Object.entries(data).forEach(_ref => {
17
- let [key, constraint] = _ref;
18
- form.errors.set(key, constraint.message);
19
- });
20
- } else {
21
- form.errors.set('_error', message);
22
- }
23
- };
24
- var _default = exports.default = handleFormErrors;
25
- //# sourceMappingURL=handleFormErrors.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"handleFormErrors.js","names":["_getError","_interopRequireDefault","require","e","__esModule","default","handleFormErrors","form","error","message","data","getError","Object","entries","forEach","_ref","key","constraint","errors","set","_default","exports"],"sources":["../../../src/lib/utils/handleFormErrors.ts"],"sourcesContent":["import { Form } from '@os-design/form';\nimport getError from './getError';\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst handleFormErrors = (form: Form<any>, error: unknown): void => {\n const { message, data } = getError(error);\n if (data) {\n Object.entries(data).forEach(([key, constraint]) => {\n form.errors.set(key, constraint.message);\n });\n } else {\n form.errors.set('_error', message);\n }\n};\n\nexport default handleFormErrors;\n"],"mappings":";;;;;;AACA,IAAAA,SAAA,GAAAC,sBAAA,CAAAC,OAAA;AAAkC,SAAAD,uBAAAE,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAElC;AACA,MAAMG,gBAAgB,GAAGA,CAACC,IAAe,EAAEC,KAAc,KAAW;EAClE,MAAM;IAAEC,OAAO;IAAEC;EAAK,CAAC,GAAG,IAAAC,iBAAQ,EAACH,KAAK,CAAC;EACzC,IAAIE,IAAI,EAAE;IACRE,MAAM,CAACC,OAAO,CAACH,IAAI,CAAC,CAACI,OAAO,CAACC,IAAA,IAAuB;MAAA,IAAtB,CAACC,GAAG,EAAEC,UAAU,CAAC,GAAAF,IAAA;MAC7CR,IAAI,CAACW,MAAM,CAACC,GAAG,CAACH,GAAG,EAAEC,UAAU,CAACR,OAAO,CAAC;IAC1C,CAAC,CAAC;EACJ,CAAC,MAAM;IACLF,IAAI,CAACW,MAAM,CAACC,GAAG,CAAC,QAAQ,EAAEV,OAAO,CAAC;EACpC;AACF,CAAC;AAAC,IAAAW,QAAA,GAAAC,OAAA,CAAAhB,OAAA,GAEaC,gBAAgB","ignoreList":[]}
@@ -1,2 +0,0 @@
1
- import '@emotion/react';
2
- //# sourceMappingURL=emotion.d.js.map
@@ -1 +0,0 @@
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","ignoreList":[]}
@@ -1,2 +0,0 @@
1
- import 'i18next';
2
- //# sourceMappingURL=i18next.d.js.map
@@ -1 +0,0 @@
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","ignoreList":[]}
@@ -1,9 +0,0 @@
1
- function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
2
- import React from 'react';
3
- import { Button } from '@os-design/core';
4
- const ProfileButton = props => /*#__PURE__*/React.createElement(Button, _extends({
5
- type: "ghost",
6
- wide: "always"
7
- }, props));
8
- export default ProfileButton;
9
- //# sourceMappingURL=ProfileButton.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ProfileButton.js","names":["React","Button","ProfileButton","props","createElement","_extends","type","wide"],"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,iBACjDH,KAAA,CAAAI,aAAA,CAACH,MAAM,EAAAI,QAAA;EAACC,IAAI,EAAC,OAAO;EAACC,IAAI,EAAC;AAAQ,GAAKJ,KAAK,CAAG,CAChD;AAED,eAAeD,aAAa","ignoreList":[]}
@@ -1 +0,0 @@
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,GAAGA,CAAA,KAC9BL,UAAU,CAACC,aAAa,CAAC;AAE3B,eAAeA,aAAa","ignoreList":[]}
@@ -1 +0,0 @@
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,GAAGA,CAAA,KAA2BN,UAAU,CAACC,cAAc,CAAC;AAE/E,eAAeA,cAAc","ignoreList":[]}
@@ -1,25 +0,0 @@
1
- function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
2
- import React, { lazy, Suspense } from 'react';
3
- import { Drawer } from '@os-design/core';
4
- import styled from '@emotion/styled';
5
- import MainLoader from '../shared/MainLoader';
6
- const LazyProfileDrawerContent = /*#__PURE__*/lazy(() => import('./ProfileDrawerContent'));
7
- const StyledDrawer = styled(Drawer)`
8
- display: flex;
9
- flex-direction: column;
10
- padding: 2em 1em;
11
- `;
12
- const ProfileDrawer = ({
13
- actions,
14
- children,
15
- ...rest
16
- }) => /*#__PURE__*/React.createElement(StyledDrawer, _extends({
17
- placement: "right",
18
- width: "15em"
19
- }, rest), /*#__PURE__*/React.createElement(Suspense, {
20
- fallback: /*#__PURE__*/React.createElement(MainLoader, null)
21
- }, /*#__PURE__*/React.createElement(LazyProfileDrawerContent, {
22
- actions: actions
23
- }, children)));
24
- export default ProfileDrawer;
25
- //# sourceMappingURL=ProfileDrawer.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ProfileDrawer.js","names":["React","lazy","Suspense","Drawer","styled","MainLoader","LazyProfileDrawerContent","StyledDrawer","ProfileDrawer","actions","children","rest","createElement","_extends","placement","width","fallback"],"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,CAAC;AACnC;AACA;AACA;AACA,CAAC;AAED,MAAMK,aAA2C,GAAGA,CAAC;EACnDC,OAAO;EACPC,QAAQ;EACR,GAAGC;AACL,CAAC,kBACCX,KAAA,CAAAY,aAAA,CAACL,YAAY,EAAAM,QAAA;EAACC,SAAS,EAAC,OAAO;EAACC,KAAK,EAAC;AAAM,GAAKJ,IAAI,gBACnDX,KAAA,CAAAY,aAAA,CAACV,QAAQ;EAACc,QAAQ,eAAEhB,KAAA,CAAAY,aAAA,CAACP,UAAU,MAAE;AAAE,gBACjCL,KAAA,CAAAY,aAAA,CAACN,wBAAwB;EAACG,OAAO,EAAEA;AAAQ,GACxCC,QACuB,CAClB,CACE,CACf;AAED,eAAeF,aAAa","ignoreList":[]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"ProfileDrawerContent.js","names":["styled","ThemeSwitcher","message","clr","React","useCallback","useMemo","useRef","useState","useTranslation","useMutation","getError","ProfileButton","useProfile","ProfileUpdateNameModal","ProfileUpdatePasswordModal","UserAvatar","AvatarContainer","div","UserContent","FullName","p","theme","sizes","large","Email","inputColorPlaceholder","ActionsContainer","Footer","HiddenInput","input","query","_ProfileDrawerContentUpdateAvatarMutation","require","hash","console","error","DeleteAvatarButton","t","commit","loading","handler","variables","avatar","onError","e","onCompleted","success","createElement","onClick","UpdateAvatarButton","hasAvatar","fileInputRef","target","files","file","uploadables","Fragment","current","value","click","type","accept","onChange","ref","UpdateNameButton","hasName","modalVisible","setModalVisible","visible","onClose","ChangePasswordButton","SignOutButton","_ProfileDrawerContentSignOutMutation","window","location","href","danger","ProfileDrawerContent","actions","children","email","firstName","lastName","fullName","filter","i","join","size"],"sources":["../../../../src/lib/components/profile/ProfileDrawerContent.tsx"],"sourcesContent":["import styled from '@emotion/styled';\nimport { ThemeSwitcher, message } from '@os-design/core';\nimport { clr } from '@os-design/theming';\nimport { graphql } from 'babel-plugin-relay/macro';\nimport React, { useCallback, useMemo, useRef, useState } from 'react';\nimport { useTranslation } from 'react-i18next';\nimport { useMutation } from 'react-relay/hooks';\nimport getError from '../../utils/getError';\nimport ProfileButton from './ProfileButton';\nimport { useProfile } from './ProfileContext';\nimport ProfileUpdateNameModal from './ProfileUpdateNameModal';\nimport ProfileUpdatePasswordModal from './ProfileUpdatePasswordModal';\nimport UserAvatar from './UserAvatar';\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 query = 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>(query);\n\n const handler = useCallback(() => {\n commit({\n variables: {\n input: { avatar: null },\n },\n onError: (e) => message.error(getError(e).message),\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>(query);\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) => message.error(getError(error).message),\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 [modalVisible, setModalVisible] = useState(false);\n\n return (\n <>\n <ProfileButton onClick={() => setModalVisible(true)}>\n {t(`profile:${hasName ? 'changeName' : 'setName'}`)}\n </ProfileButton>\n\n <ProfileUpdateNameModal\n visible={modalVisible}\n onClose={() => setModalVisible(false)}\n />\n </>\n );\n};\n\nconst ChangePasswordButton: React.FC = () => {\n const { t } = useTranslation(['profile']);\n const [modalVisible, setModalVisible] = useState(false);\n\n return (\n <>\n <ProfileButton onClick={() => setModalVisible(true)}>\n {t('profile:changePassword')}\n </ProfileButton>\n\n <ProfileUpdatePasswordModal\n visible={modalVisible}\n onClose={() => setModalVisible(false)}\n />\n </>\n );\n};\n\nconst SignOutButton: React.FC = () => {\n const { t } = useTranslation(['profile']);\n\n const [commit, loading] = useMutation<ProfileDrawerContentSignOutMutation>(\n graphql`\n mutation ProfileDrawerContentSignOutMutation {\n signOut {\n ok\n }\n }\n `\n );\n\n const handler = useCallback(() => {\n commit({\n variables: {},\n onError: (e) => message.error(getError(e).message),\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,MAAM,MAAM,iBAAiB;AACpC,SAASC,aAAa,EAAEC,OAAO,QAAQ,iBAAiB;AACxD,SAASC,GAAG,QAAQ,oBAAoB;AAExC,OAAOC,KAAK,IAAIC,WAAW,EAAEC,OAAO,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,OAAO;AACrE,SAASC,cAAc,QAAQ,eAAe;AAC9C,SAASC,WAAW,QAAQ,mBAAmB;AAC/C,OAAOC,QAAQ,MAAM,sBAAsB;AAC3C,OAAOC,aAAa,MAAM,iBAAiB;AAC3C,SAASC,UAAU,QAAQ,kBAAkB;AAC7C,OAAOC,sBAAsB,MAAM,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ACE,kBAAkB;IAACC,SAAS,EAAE,CAAC,CAACR;EAAO,CAAE,CAAC,eAC3CvC,KAAA,CAAA4C,aAAA,CAACiB,gBAAgB;IAACC,OAAO,EAAE,CAAC,CAACkB;EAAS,CAAE,CAAC,eACzChF,KAAA,CAAA4C,aAAA,CAACuB,oBAAoB,MAAE,CAAC,EAEvBQ,OAAO,eAER3E,KAAA,CAAA4C,aAAA,CAACwB,aAAa,MAAE,CAAC,EAEhBQ,QACe,CAAC,eAEnB5E,KAAA,CAAA4C,aAAA,CAACpB,MAAM,qBACLxB,KAAA,CAAA4C,aAAA,CAAC/C,aAAa,MAAE,CACV,CACR,CAAC;AAEP,CAAC;AAED,eAAe6E,oBAAoB","ignoreList":[]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"ProfileNavigationItem.js","names":["React","useIsMinWidth","NavigationItem","useTranslation","ProfileIcon","ProfileNavigationItem","onClick","rest","t","isMinMd","createElement","_extends","href","icon","onKeyDown","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,GAAGA,CAAC;EACnEC,OAAO,GAAGA,CAAA,KAAM,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,oBACET,KAAA,CAAAU,aAAA,CAACR,cAAc,EAAAS,QAAA;IACbC,IAAI,EAAC,GAAG,CAAC;IAAA;IACTC,IAAI,eAAEb,KAAA,CAAAU,aAAA,CAACN,WAAW,MAAE,CAAE;IACtBE,OAAO,EAAEA,OAAQ;IACjBQ,SAAS,EAAGC,CAAC,IAAK;MAChB,IAAIA,CAAC,CAACC,GAAG,KAAK,OAAO,EAAEV,OAAO,CAAC,CAAC;IAClC;EAAE,GACEC,IAAI,GAEPC,CAAC,CAAC,cAAc,CACH,CAAC;AAErB,CAAC;AAED,eAAeH,qBAAqB","ignoreList":[]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"ProfileUpdateNameModal.js","names":["Form","FormItem","Input","message","Modal","FormProvider","useForm","React","useCallback","useEffect","useMemo","useTranslation","useMutation","handleFormErrors","FormError","useProfile","ProfileUpdateNameModal","visible","onClose","t","firstName","lastName","initValues","form","Field","commit","loading","_ProfileUpdateNameModalMutation","require","hash","console","error","reset","onSubmit","variables","input","values","getAll","onError","onCompleted","success","firstNameData","label","placeholder","lastNameData","createElement","title","okText","okLoading","onOk","name","data","render","props","_extends"],"sources":["../../../../src/lib/components/profile/ProfileUpdateNameModal.tsx"],"sourcesContent":["import { Form, FormItem, Input, message, Modal } from '@os-design/core';\nimport { FormProvider, useForm } from '@os-design/form';\nimport { graphql } from 'babel-plugin-relay/macro';\nimport React, { useCallback, useEffect, useMemo } from 'react';\nimport { useTranslation } from 'react-i18next';\nimport { useMutation } from 'react-relay/hooks';\nimport handleFormErrors from '../../utils/handleFormErrors';\nimport FormError from '../shared/FormError';\nimport { ProfileUpdateNameModalMutation } from './__generated__/ProfileUpdateNameModalMutation.graphql';\nimport { useProfile } from './ProfileContext';\n\ninterface ProfileUpdateNameFormData {\n firstName: string;\n lastName: string;\n}\n\ninterface ProfileUpdateNameModalProps {\n visible: boolean;\n onClose: () => void;\n}\n\nconst ProfileUpdateNameModal: React.FC<ProfileUpdateNameModalProps> = ({\n visible,\n onClose,\n}) => {\n const { t } = useTranslation(['profile']);\n const { firstName = '', lastName = '' } = useProfile();\n\n const initValues = useMemo<ProfileUpdateNameFormData>(\n () => ({ firstName, lastName }),\n [firstName, lastName]\n );\n\n const { form, Field } = useForm(initValues);\n\n const [commit, loading] = useMutation<ProfileUpdateNameModalMutation>(graphql`\n mutation ProfileUpdateNameModalMutation($input: UpdateProfileInput!) {\n updateProfile(input: $input) {\n firstName\n lastName\n }\n }\n `);\n\n // Reset the form when the modal is opened\n useEffect(() => {\n if (visible) form.reset();\n }, [form, visible]);\n\n const onSubmit = useCallback(() => {\n commit({\n variables: {\n input: form.values.getAll(),\n },\n onError: (error) => handleFormErrors(form, error),\n onCompleted: () => {\n message.success(t('profile:updated'));\n onClose();\n },\n });\n }, [commit, form, onClose, t]);\n\n const firstNameData = useMemo(\n () => ({\n label: t('profile:updateNameModal.firstName.label'),\n placeholder: t('profile:updateNameModal.firstName.placeholder'),\n }),\n [t]\n );\n\n const lastNameData = useMemo(\n () => ({\n label: t('profile:updateNameModal.lastName.label'),\n placeholder: t('profile:updateNameModal.lastName.placeholder'),\n }),\n [t]\n );\n\n return (\n <Modal\n title={t('profile:updateNameModal.title')}\n visible={visible}\n okText={t('profile:update')}\n okLoading={loading}\n onOk={onSubmit}\n onClose={onClose}\n >\n <FormProvider form={form}>\n <Form>\n <Field\n name='firstName'\n data={firstNameData}\n render={(props, { error }, data) => (\n <FormItem label={data.label} error={error}>\n <Input placeholder={data.placeholder} {...props} />\n </FormItem>\n )}\n />\n\n <Field\n name='lastName'\n data={lastNameData}\n render={(props, { error }, data) => (\n <FormItem label={data.label} error={error}>\n <Input placeholder={data.placeholder} {...props} />\n </FormItem>\n )}\n />\n\n <FormError />\n </Form>\n </FormProvider>\n </Modal>\n );\n};\n\nexport default ProfileUpdateNameModal;\n"],"mappings":";;AAAA,SAASA,IAAI,EAAEC,QAAQ,EAAEC,KAAK,EAAEC,OAAO,EAAEC,KAAK,QAAQ,iBAAiB;AACvE,SAASC,YAAY,EAAEC,OAAO,QAAQ,iBAAiB;AAEvD,OAAOC,KAAK,IAAIC,WAAW,EAAEC,SAAS,EAAEC,OAAO,QAAQ,OAAO;AAC9D,SAASC,cAAc,QAAQ,eAAe;AAC9C,SAASC,WAAW,QAAQ,mBAAmB;AAC/C,OAAOC,gBAAgB,MAAM,8BAA8B;AAC3D,OAAOC,SAAS,MAAM,qBAAqB;AAE3C,SAASC,UAAU,QAAQ,kBAAkB;AAY7C,MAAMC,sBAA6D,GAAGA,CAAC;EACrEC,OAAO;EACPC;AACF,CAAC,KAAK;EACJ,MAAM;IAAEC;EAAE,CAAC,GAAGR,cAAc,CAAC,CAAC,SAAS,CAAC,CAAC;EACzC,MAAM;IAAES,SAAS,GAAG,EAAE;IAAEC,QAAQ,GAAG;EAAG,CAAC,GAAGN,UAAU,CAAC,CAAC;EAEtD,MAAMO,UAAU,GAAGZ,OAAO,CACxB,OAAO;IAAEU,SAAS;IAAEC;EAAS,CAAC,CAAC,EAC/B,CAACD,SAAS,EAAEC,QAAQ,CACtB,CAAC;EAED,MAAM;IAAEE,IAAI;IAAEC;EAAM,CAAC,GAAGlB,OAAO,CAACgB,UAAU,CAAC;EAE3C,MAAM,CAACG,MAAM,EAAEC,OAAO,CAAC,GAAGd,WAAW,CAAAe,+BAAA,cAAAA,+BAAA,IAAAA,+BAAA,GAAAC,OAA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swordModal.js","names":["Form","FormItem","InputPassword","message","Modal","FormProvider","useForm","React","useCallback","useEffect","useMemo","useTranslation","useMutation","handleFormErrors","FormError","ProfileUpdatePasswordModal","visible","onClose","t","initValues","currentPassword","password","form","Field","commit","loading","_ProfileUpdatePasswordModalMutation","require","hash","console","error","reset","onSubmit","variables","input","values","getAll","onError","onCompleted","success","currentPasswordData","label","placeholder","passwordData","strengthNames","returnObjects","createElement","title","okText","okLoading","onOk","name","data","render","props","_extends","showStrengthMeter"],"sources":["../../../../src/lib/components/profile/ProfileUpdatePasswordModal.tsx"],"sourcesContent":["import { Form, FormItem, InputPassword, message, Modal } from '@os-design/core';\nimport { FormProvider, useForm } from '@os-design/form';\nimport { graphql } from 'babel-plugin-relay/macro';\nimport React, { useCallback, useEffect, useMemo } from 'react';\nimport { useTranslation } from 'react-i18next';\nimport { useMutation } from 'react-relay/hooks';\nimport handleFormErrors from '../../utils/handleFormErrors';\nimport FormError from '../shared/FormError';\nimport { ProfileUpdatePasswordModalMutation } from './__generated__/ProfileUpdatePasswordModalMutation.graphql';\n\ninterface ProfileUpdatePasswordFormData {\n currentPassword: string;\n password: string;\n}\n\ninterface ProfileUpdatePasswordModalProps {\n visible: boolean;\n onClose: () => void;\n}\n\nconst ProfileUpdatePasswordModal: React.FC<ProfileUpdatePasswordModalProps> = ({\n visible,\n onClose,\n}) => {\n const { t } = useTranslation(['profile']);\n\n const initValues = useMemo<ProfileUpdatePasswordFormData>(\n () => ({\n currentPassword: '',\n password: '',\n }),\n []\n );\n\n const { form, Field } = useForm(initValues);\n\n const [commit, loading] = useMutation<ProfileUpdatePasswordModalMutation>(\n graphql`\n mutation ProfileUpdatePasswordModalMutation(\n $input: UpdatePasswordInput!\n ) {\n updatePassword(input: $input) {\n id\n }\n }\n `\n );\n\n // Reset the form when the modal is opened\n useEffect(() => {\n if (visible) form.reset();\n }, [form, visible]);\n\n const onSubmit = useCallback(() => {\n commit({\n variables: {\n input: form.values.getAll(),\n },\n onError: (error) => handleFormErrors(form, error),\n onCompleted: () => {\n message.success(t('profile:updatePasswordModal.success'));\n onClose();\n },\n });\n }, [commit, form, onClose, t]);\n\n const currentPasswordData = useMemo(\n () => ({\n label: t('profile:updatePasswordModal.currentPassword.label'),\n placeholder: t('profile:updatePasswordModal.currentPassword.placeholder'),\n }),\n [t]\n );\n\n const passwordData = useMemo(\n () => ({\n label: t('profile:updatePasswordModal.newPassword.label'),\n placeholder: t('profile:updatePasswordModal.newPassword.placeholder'),\n strengthNames: t('profile:updatePasswordModal.passwordStrengthNames', {\n returnObjects: true,\n }),\n }),\n [t]\n );\n\n return (\n <Modal\n title={t('profile:updatePasswordModal.title')}\n visible={visible}\n okText={t('profile:updatePasswordModal.button')}\n okLoading={loading}\n onOk={onSubmit}\n onClose={onClose}\n >\n <FormProvider form={form}>\n <Form>\n <Field\n name='currentPassword'\n data={currentPasswordData}\n render={(props, { error }, data) => (\n <FormItem label={data.label} error={error}>\n <InputPassword placeholder={data.placeholder} {...props} />\n </FormItem>\n )}\n />\n\n <Field\n name='password'\n data={passwordData}\n render={(props, { error }, data) => (\n <FormItem label={data.label} error={error}>\n <InputPassword\n placeholder={data.placeholder}\n showStrengthMeter\n strengthNames={data.strengthNames}\n {...props}\n />\n </FormItem>\n )}\n />\n\n <FormError />\n </Form>\n </FormProvider>\n </Modal>\n );\n};\n\nexport default ProfileUpdatePasswordModal;\n"],"mappings":";;AAAA,SAASA,IAAI,EAAEC,QAAQ,EAAEC,aAAa,EAAEC,OAAO,EAAEC,KAAK,QAAQ,iBAAiB;AAC/E,SAASC,YAAY,EAAEC,OAAO,QAAQ,iBAAiB;AAEvD,OAAOC,KAAK,IAAIC,WAAW,EAAEC,SAAS,EAAEC,OAAO,QAAQ,OAAO;AAC9D,SAASC,cAAc,QAAQ,eAAe;AAC9C,SAASC,WAAW,QAAQ,mBAAmB;AAC/C,OAAOC,gBAAgB,MAAM,8BAA8B;AAC3D,OAAOC,SAAS,MAAM,qBAAqB;AAa3C,MAAMC,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IACJ4B,IAAI,EAAC,UAAU;IACfC,IAAI,EAAET,YAAa;IACnBU,MAAM,EAAEA,CAACC,KAAK,EAAE;MAAExB;IAAM,CAAC,EAAEsB,IAAI,kBAC7B7C,KAAA,CAAAuC,aAAA,CAAC7C,QAAQ;MAACwC,KAAK,EAAEW,IAAI,CAACX,KAAM;MAACX,KAAK,EAAEA;IAAM,gBACxCvB,KAAA,CAAAuC,aAAA,CAAC5C,aAAa,EAAAqD,QAAA;MACZb,WAAW,EAAEU,IAAI,CAACV,WAAY;MAC9Bc,iBAAiB;MACjBZ,aAAa,EAAEQ,IAAI,CAACR;IAAc,GAC9BU,KAAK,CACV,CACO;EACV,CACH,CAAC,eAEF/C,KAAA,CAAAuC,aAAA,CAAChC,SAAS,MAAE,CACR,CACM,CACT,CAAC;AAEZ,CAAC;AAED,eAAeC,0BAA0B","ignoreList":[]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"ProtectedWrapper.js","names":["React","useMemo","useLazyLoadQuery","ErrorBoundary","ProfileConfigContext","ProfileContext","ProtectedWrapperLoader","children","profile","_ProtectedWrapperQuery","require","hash","console","error","fetchPolicy","profileContext","id","email","firstName","undefined","lastName","avatar","createElement","Provider","value","ProtectedWrapper","bucketId","profileConfigContext","fallback","window","location","href"],"sources":["../../../../src/lib/components/profile/ProtectedWrapper.tsx"],"sourcesContent":["import React, { useMemo } from 'react';\nimport graphql from 'babel-plugin-relay/macro';\nimport { useLazyLoadQuery } from 'react-relay/hooks';\nimport { ErrorBoundary } from '@os-design/utils';\nimport ProfileConfigContext from './ProfileConfigContext';\nimport ProfileContext from './ProfileContext';\nimport { ProtectedWrapperQuery } from './__generated__/ProtectedWrapperQuery.graphql';\n\ninterface ProtectedWrapperLoaderProps {\n children?: React.ReactNode;\n}\n\nconst ProtectedWrapperLoader: React.FC<ProtectedWrapperLoaderProps> = ({\n children,\n}) => {\n const { profile } = useLazyLoadQuery<ProtectedWrapperQuery>(\n graphql`\n query ProtectedWrapperQuery {\n profile {\n id\n email\n firstName\n lastName\n avatar\n }\n }\n `,\n {},\n { fetchPolicy: 'store-or-network' }\n );\n\n const profileContext = useMemo(\n () => ({\n id: profile.id,\n email: profile.email,\n firstName: profile.firstName || undefined,\n lastName: profile.lastName || undefined,\n avatar: profile.avatar || undefined,\n }),\n [\n profile.avatar,\n profile.email,\n profile.firstName,\n profile.id,\n profile.lastName,\n ]\n );\n\n return (\n <ProfileContext.Provider value={profileContext}>\n {children}\n </ProfileContext.Provider>\n );\n};\n\nexport interface ProtectedWrapperProps {\n bucketId: string;\n children?: React.ReactNode;\n}\n\nconst ProtectedWrapper: React.FC<ProtectedWrapperProps> = ({\n bucketId,\n children,\n}) => {\n const profileConfigContext = useMemo(() => ({ bucketId }), [bucketId]);\n\n return (\n <ProfileConfigContext.Provider value={profileConfigContext}>\n <ErrorBoundary\n fallback={() => {\n window.location.href = '/auth/';\n return null;\n }}\n >\n <ProtectedWrapperLoader>{children}</ProtectedWrapperLoader>\n </ErrorBoundary>\n </ProfileConfigContext.Provider>\n );\n};\n\nexport default ProtectedWrapper;\n"],"mappings":";AAAA,OAAOA,KAAK,IAAIC,OAAO,QAAQ,OAAO;AAEtC,SAASC,gBAAgB,QAAQ,mBAAmB;AACpD,SAASC,aAAa,QAAQ,kBAAkB;AAChD,OAAOC,oBAAoB,MAAM,wBAAwB;AACzD,OAAOC,cAAc,MAAM,kBAAkB;AAO7C,MAAMC,sBAA6D,GAAGA,CAAC;EACrEC;AACF,CAAC,KAAK;EACJ,MAAM;IAAEC;EAAQ,CAAC,GAAGN,gBAAgB,CAAAO,sBAAA,cAAAA,sBAAA,IAAAA,sBAAA,GAAAC,OAAA,mDAAAD,sBAAA,CAAAE,IAAA,IAAAF,sBAAA,CAAAE,IAAA,2CAAAC,OAAA,CAAAC,KAAA,yJAAAJ,sBAAA,GAYlC,CAAC,CAAC,EACF;IAAEK,WAAW,EAAE;EAAmB,CACpC,CAAC;EAED,MAAMC,cAAc,GAAGd,OAAO,CAC5B,OAAO;IACLe,EAAE,EAAER,OAAO,CAACQ,EAAE;IACdC,KAAK,EAAET,OAAO,CAACS,KAAK;IACpBC,SAAS,EAAEV,OAAO,CAACU,SAAS,IAAIC,SAAS;IACzCC,QAAQ,EAAEZ,OAAO,CAACY,QAAQ,IAAID,SAAS;IACvCE,MAAM,EAAEb,OAAO,CAACa,MAAM,IAAIF;EAC5B,CAAC,CAAC,EACF,CACEX,OAAO,CAACa,MAAM,EACdb,OAAO,CAACS,KAAK,EACbT,OAAO,CAACU,SAAS,EACjBV,OAAO,CAACQ,EAAE,EACVR,OAAO,CAACY,QAAQ,CAEpB,CAAC;EAED,oBACEpB,KAAA,CAAAsB,aAAA,CAACjB,cAAc,CAACkB,QAAQ;IAACC,KAAK,EAAET;EAAe,GAC5CR,QACsB,CAAC;AAE9B,CAAC;AAOD,MAAMkB,gBAAiD,GAAGA,CAAC;EACzDC,QAAQ;EACRnB;AACF,CAAC,KAAK;EACJ,MAAMoB,oBAAoB,GAAG1B,OAAO,CAAC,OAAO;IAAEyB;EAAS,CAAC,CAAC,EAAE,CAACA,QAAQ,CAAC,CAAC;EAEtE,oBACE1B,KAAA,CAAAsB,aAAA,CAAClB,oBAAoB,CAACmB,QAAQ;IAACC,KAAK,EAAEG;EAAqB,gBACzD3B,KAAA,CAAAsB,aAAA,CAACnB,aAAa;IACZyB,QAAQ,EAAEA,CAAA,KAAM;MACdC,MAAM,CAACC,QAAQ,CAACC,IAAI,GAAG,QAAQ;MAC/B,OAAO,IAAI;IACb;EAAE,gBAEF/B,KAAA,CAAAsB,aAAA,CAAChB,sBAAsB,QAAEC,QAAiC,CAC7C,CACc,CAAC;AAEpC,CAAC;AAED,eAAekB,gBAAgB","ignoreList":[]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"UserAvatar.js","names":["React","useMemo","Avatar","useProfile","useProfileConfig","UserAvatar","props","email","firstName","lastName","avatar","bucketId","avatarProps","image","undefined","createElement","_extends"],"sources":["../../../../src/lib/components/profile/UserAvatar.tsx"],"sourcesContent":["import React, { useMemo } from 'react';\nimport { Avatar, AvatarProps } from '@os-design/core';\nimport { useProfile } from './ProfileContext';\nimport { useProfileConfig } from './ProfileConfigContext';\n\nconst UserAvatar: React.FC<AvatarProps> = (props) => {\n const { email, firstName, lastName, avatar } = useProfile();\n const { bucketId } = useProfileConfig();\n\n const avatarProps = useMemo(() => {\n if (firstName || lastName) return { firstName, lastName };\n return { firstName: email };\n }, [email, firstName, lastName]);\n\n const image = useMemo(() => {\n if (!avatar) return undefined;\n return `https://storage.yandexcloud.net/${bucketId}/users/${avatar}`;\n }, [avatar, bucketId]);\n\n return <Avatar {...avatarProps} image={image} {...props} />;\n};\n\nexport default UserAvatar;\n"],"mappings":";AAAA,OAAOA,KAAK,IAAIC,OAAO,QAAQ,OAAO;AACtC,SAASC,MAAM,QAAqB,iBAAiB;AACrD,SAASC,UAAU,QAAQ,kBAAkB;AAC7C,SAASC,gBAAgB,QAAQ,wBAAwB;AAEzD,MAAMC,UAAiC,GAAIC,KAAK,IAAK;EACnD,MAAM;IAAEC,KAAK;IAAEC,SAAS;IAAEC,QAAQ;IAAEC;EAAO,CAAC,GAAGP,UAAU,CAAC,CAAC;EAC3D,MAAM;IAAEQ;EAAS,CAAC,GAAGP,gBAAgB,CAAC,CAAC;EAEvC,MAAMQ,WAAW,GAAGX,OAAO,CAAC,MAAM;IAChC,IAAIO,SAAS,IAAIC,QAAQ,EAAE,OAAO;MAAED,SAAS;MAAEC;IAAS,CAAC;IACzD,OAAO;MAAED,SAAS,EAAED;IAAM,CAAC;EAC7B,CAAC,EAAE,CAACA,KAAK,EAAEC,SAAS,EAAEC,QAAQ,CAAC,CAAC;EAEhC,MAAMI,KAAK,GAAGZ,OAAO,CAAC,MAAM;IAC1B,IAAI,CAACS,MAAM,EAAE,OAAOI,SAAS;IAC7B,OAAO,mCAAmCH,QAAQ,UAAUD,MAAM,EAAE;EACtE,CAAC,EAAE,CAACA,MAAM,EAAEC,QAAQ,CAAC,CAAC;EAEtB,oBAAOX,KAAA,CAAAe,aAAA,CAACb,MAAM,EAAAc,QAAA,KAAKJ,WAAW;IAAEC,KAAK,EAAEA;EAAM,GAAKP,KAAK,CAAG,CAAC;AAC7D,CAAC;AAED,eAAeD,UAAU","ignoreList":[]}
@@ -1,47 +0,0 @@
1
- function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
2
- import React from 'react';
3
- import { ThemeOverrider } from '@os-design/theming';
4
- import styled from '@emotion/styled';
5
- import { resetFocusStyles, transitionStyles } from '@os-design/styles';
6
- import UserAvatar from './UserAvatar';
7
- const Addon = styled.div`
8
- width: 100%;
9
- height: ${p => p.theme.navigationSideWidth}em;
10
- min-height: ${p => p.theme.navigationSideWidth}em;
11
- display: flex;
12
- justify-content: center;
13
- align-items: center;
14
- `;
15
- const AVATAR_SIZE = 2.5;
16
- const StyledUserAvatar = styled(UserAvatar)`
17
- ${resetFocusStyles};
18
- cursor: pointer;
19
-
20
- @media (hover: hover) {
21
- &:hover,
22
- &:focus {
23
- opacity: 0.7;
24
- }
25
- ${transitionStyles('opacity')};
26
- }
27
- `;
28
- const UserAvatarAddon = ({
29
- onClick = () => {},
30
- ...rest
31
- }) => /*#__PURE__*/React.createElement(Addon, null, /*#__PURE__*/React.createElement(ThemeOverrider, {
32
- overrides: theme => ({
33
- avatarOnlineColorScoop: theme.navigationColorBg
34
- })
35
- }, /*#__PURE__*/React.createElement(StyledUserAvatar, _extends({
36
- online: true,
37
- size: `${AVATAR_SIZE}em`,
38
- tabIndex: 0,
39
- role: "button",
40
- onClick: onClick,
41
- onKeyDown: e => {
42
- if (e.key === 'Enter') onClick();
43
- },
44
- onMouseDown: e => e.preventDefault()
45
- }, rest))));
46
- export default UserAvatarAddon;
47
- //# sourceMappingURL=UserAvatarAddon.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"UserAvatarAddon.js","names":["React","ThemeOverrider","styled","resetFocusStyles","transitionStyles","UserAvatar","Addon","div","p","theme","navigationSideWidth","AVATAR_SIZE","StyledUserAvatar","UserAvatarAddon","onClick","rest","createElement","overrides","avatarOnlineColorScoop","navigationColorBg","_extends","online","size","tabIndex","role","onKeyDown","e","key","onMouseDown","preventDefault"],"sources":["../../../../src/lib/components/profile/UserAvatarAddon.tsx"],"sourcesContent":["import React from 'react';\nimport { ThemeOverrider } from '@os-design/theming';\nimport styled from '@emotion/styled';\nimport { resetFocusStyles, transitionStyles } from '@os-design/styles';\nimport { AvatarProps } from '@os-design/core';\nimport UserAvatar from './UserAvatar';\n\nexport interface UserAvatarAddonProps extends AvatarProps {\n onClick?: () => void;\n}\n\nconst Addon = styled.div`\n width: 100%;\n height: ${(p) => p.theme.navigationSideWidth}em;\n min-height: ${(p) => p.theme.navigationSideWidth}em;\n display: flex;\n justify-content: center;\n align-items: center;\n`;\n\nconst AVATAR_SIZE = 2.5;\n\nconst StyledUserAvatar = styled(UserAvatar)`\n ${resetFocusStyles};\n cursor: pointer;\n\n @media (hover: hover) {\n &:hover,\n &:focus {\n opacity: 0.7;\n }\n ${transitionStyles('opacity')};\n }\n`;\n\nconst UserAvatarAddon: React.FC<UserAvatarAddonProps> = ({\n onClick = () => {},\n ...rest\n}) => (\n <Addon>\n <ThemeOverrider\n overrides={(theme) => ({\n avatarOnlineColorScoop: theme.navigationColorBg,\n })}\n >\n <StyledUserAvatar\n online\n size={`${AVATAR_SIZE}em`}\n tabIndex={0}\n role='button'\n onClick={onClick}\n onKeyDown={(e) => {\n if (e.key === 'Enter') onClick();\n }}\n onMouseDown={(e) => e.preventDefault()}\n {...rest}\n />\n </ThemeOverrider>\n </Addon>\n);\n\nexport default UserAvatarAddon;\n"],"mappings":";AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,cAAc,QAAQ,oBAAoB;AACnD,OAAOC,MAAM,MAAM,iBAAiB;AACpC,SAASC,gBAAgB,EAAEC,gBAAgB,QAAQ,mBAAmB;AAEtE,OAAOC,UAAU,MAAM,cAAc;AAMrC,MAAMC,KAAK,GAAGJ,MAAM,CAACK,GAAG;AACxB;AACA,YAAaC,CAAC,IAAKA,CAAC,CAACC,KAAK,CAACC,mBAAmB;AAC9C,gBAAiBF,CAAC,IAAKA,CAAC,CAACC,KAAK,CAACC,mBAAmB;AAClD;AACA;AACA;AACA,CAAC;AAED,MAAMC,WAAW,GAAG,GAAG;AAEvB,MAAMC,gBAAgB,GAAGV,MAAM,CAACG,UAAU,CAAC;AAC3C,IAAIF,gBAAgB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,gBAAgB,CAAC,SAAS,CAAC;AACjC;AACA,CAAC;AAED,MAAMS,eAA+C,GAAGA,CAAC;EACvDC,OAAO,GAAGA,CAAA,KAAM,CAAC,CAAC;EAClB,GAAGC;AACL,CAAC,kBACCf,KAAA,CAAAgB,aAAA,CAACV,KAAK,qBACJN,KAAA,CAAAgB,aAAA,CAACf,cAAc;EACbgB,SAAS,EAAGR,KAAK,KAAM;IACrBS,sBAAsB,EAAET,KAAK,CAACU;EAChC,CAAC;AAAE,gBAEHnB,KAAA,CAAAgB,aAAA,CAACJ,gBAAgB,EAAAQ,QAAA;EACfC,MAAM;EACNC,IAAI,EAAE,GAAGX,WAAW,IAAK;EACzBY,QAAQ,EAAE,CAAE;EACZC,IAAI,EAAC,QAAQ;EACbV,OAAO,EAAEA,OAAQ;EACjBW,SAAS,EAAGC,CAAC,IAAK;IAChB,IAAIA,CAAC,CAACC,GAAG,KAAK,OAAO,EAAEb,OAAO,CAAC,CAAC;EAClC,CAAE;EACFc,WAAW,EAAGF,CAAC,IAAKA,CAAC,CAACG,cAAc,CAAC;AAAE,GACnCd,IAAI,CACT,CACa,CACX,CACR;AAED,eAAeF,eAAe","ignoreList":[]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"ProfileDrawerContentSignOutMutation.graphql.js","names":["node","v0","hash"],"sources":["../../../../../src/lib/components/profile/__generated__/ProfileDrawerContentSignOutMutation.graphql.ts"],"sourcesContent":["/**\n * @generated SignedSource<<e33309fd987bdd6745cb67403591410c>>\n * @lightSyntaxTransform\n * @nogrep\n */\n\n/* tslint:disable */\n/* eslint-disable */\n// @ts-nocheck\n\nimport { ConcreteRequest, Mutation } from 'relay-runtime';\nexport type ProfileDrawerContentSignOutMutation$variables = Record<PropertyKey, never>;\nexport type ProfileDrawerContentSignOutMutation$data = {\n readonly signOut: {\n readonly ok: boolean;\n };\n};\nexport type ProfileDrawerContentSignOutMutation = {\n response: ProfileDrawerContentSignOutMutation$data;\n variables: ProfileDrawerContentSignOutMutation$variables;\n};\n\nconst node: ConcreteRequest = (function(){\nvar v0 = [\n {\n \"alias\": null,\n \"args\": null,\n \"concreteType\": \"StatusPayload\",\n \"kind\": \"LinkedField\",\n \"name\": \"signOut\",\n \"plural\": false,\n \"selections\": [\n {\n \"alias\": null,\n \"args\": null,\n \"kind\": \"ScalarField\",\n \"name\": \"ok\",\n \"storageKey\": null\n }\n ],\n \"storageKey\": null\n }\n];\nreturn {\n \"fragment\": {\n \"argumentDefinitions\": [],\n \"kind\": \"Fragment\",\n \"metadata\": null,\n \"name\": \"ProfileDrawerContentSignOutMutation\",\n \"selections\": (v0/*: any*/),\n \"type\": \"Mutation\",\n \"abstractKey\": null\n },\n \"kind\": \"Request\",\n \"operation\": {\n \"argumentDefinitions\": [],\n \"kind\": \"Operation\",\n \"name\": \"ProfileDrawerContentSignOutMutation\",\n \"selections\": (v0/*: any*/)\n },\n \"params\": {\n \"cacheID\": \"f5241cc562af19628cf38a9731067807\",\n \"id\": null,\n \"metadata\": {},\n \"name\": \"ProfileDrawerContentSignOutMutation\",\n \"operationKind\": \"mutation\",\n \"text\": \"mutation ProfileDrawerContentSignOutMutation {\\n signOut {\\n ok\\n }\\n}\\n\"\n }\n};\n})();\n\n(node as any).hash = \"c7ca96e9e713315606b0c22d196b6f7b\";\n\nexport default node;\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAcA,MAAMA,IAAqB,GAAI,YAAU;EACzC,IAAIC,EAAE,GAAG,CACP;IACE,OAAO,EAAE,IAAI;IACb,MAAM,EAAE,IAAI;IACZ,cAAc,EAAE,eAAe;IAC/B,MAAM,EAAE,aAAa;IACrB,MAAM,EAAE,SAAS;IACjB,QAAQ,EAAE,KAAK;IACf,YAAY,EAAE,CACZ;MACE,OAAO,EAAE,IAAI;MACb,MAAM,EAAE,IAAI;MACZ,MAAM,EAAE,aAAa;MACrB,MAAM,EAAE,IAAI;MACZ,YAAY,EAAE;IAChB,CAAC,CACF;IACD,YAAY,EAAE;EAChB,CAAC,CACF;EACD,OAAO;IACL,UAAU,EAAE;MACV,qBAAqB,EAAE,EAAE;MACzB,MAAM,EAAE,UAAU;MAClB,UAAU,EAAE,IAAI;MAChB,MAAM,EAAE,qCAAqC;MAC7C,YAAY,EAAGA,EAAE,UAAU;MAC3B,MAAM,EAAE,UAAU;MAClB,aAAa,EAAE;IACjB,CAAC;IACD,MAAM,EAAE,SAAS;IACjB,WAAW,EAAE;MACX,qBAAqB,EAAE,EAAE;MACzB,MAAM,EAAE,WAAW;MACnB,MAAM,EAAE,qCAAqC;MAC7C,YAAY,EAAGA,EAAE;IACnB,CAAC;IACD,QAAQ,EAAE;MACR,SAAS,EAAE,kCAAkC;MAC7C,IAAI,EAAE,IAAI;MACV,UAAU,EAAE,CAAC,CAAC;MACd,MAAM,EAAE,qCAAqC;MAC7C,eAAe,EAAE,UAAU;MAC3B,MAAM,EAAE;IACV;EACF,CAAC;AACD,CAAC,CAAE,CAAC;AAEHD,IAAI,CAASE,IAAI,GAAG,kCAAkC;AAEvD,eAAeF,IAAI","ignoreList":[]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"ProfileDrawerContentUpdateAvatarMutation.graphql.js","names":["node","v0","v1","hash"],"sources":["../../../../../src/lib/components/profile/__generated__/ProfileDrawerContentUpdateAvatarMutation.graphql.ts"],"sourcesContent":["/**\n * @generated SignedSource<<f226c7545c1a2047606c6dcebdb03728>>\n * @lightSyntaxTransform\n * @nogrep\n */\n\n/* tslint:disable */\n/* eslint-disable */\n// @ts-nocheck\n\nimport { ConcreteRequest, Mutation } from 'relay-runtime';\nexport type UpdateAvatarInput = {\n avatar?: any | null | undefined;\n};\nexport type ProfileDrawerContentUpdateAvatarMutation$variables = {\n input: UpdateAvatarInput;\n};\nexport type ProfileDrawerContentUpdateAvatarMutation$data = {\n readonly updateAvatar: {\n readonly avatar: string | null | undefined;\n readonly id: string;\n };\n};\nexport type ProfileDrawerContentUpdateAvatarMutation = {\n response: ProfileDrawerContentUpdateAvatarMutation$data;\n variables: ProfileDrawerContentUpdateAvatarMutation$variables;\n};\n\nconst node: ConcreteRequest = (function(){\nvar v0 = [\n {\n \"defaultValue\": null,\n \"kind\": \"LocalArgument\",\n \"name\": \"input\"\n }\n],\nv1 = [\n {\n \"alias\": null,\n \"args\": [\n {\n \"kind\": \"Variable\",\n \"name\": \"input\",\n \"variableName\": \"input\"\n }\n ],\n \"concreteType\": \"User\",\n \"kind\": \"LinkedField\",\n \"name\": \"updateAvatar\",\n \"plural\": false,\n \"selections\": [\n {\n \"alias\": null,\n \"args\": null,\n \"kind\": \"ScalarField\",\n \"name\": \"id\",\n \"storageKey\": null\n },\n {\n \"alias\": null,\n \"args\": null,\n \"kind\": \"ScalarField\",\n \"name\": \"avatar\",\n \"storageKey\": null\n }\n ],\n \"storageKey\": null\n }\n];\nreturn {\n \"fragment\": {\n \"argumentDefinitions\": (v0/*: any*/),\n \"kind\": \"Fragment\",\n \"metadata\": null,\n \"name\": \"ProfileDrawerContentUpdateAvatarMutation\",\n \"selections\": (v1/*: any*/),\n \"type\": \"Mutation\",\n \"abstractKey\": null\n },\n \"kind\": \"Request\",\n \"operation\": {\n \"argumentDefinitions\": (v0/*: any*/),\n \"kind\": \"Operation\",\n \"name\": \"ProfileDrawerContentUpdateAvatarMutation\",\n \"selections\": (v1/*: any*/)\n },\n \"params\": {\n \"cacheID\": \"b749732615af9f8027386d69ffb57b63\",\n \"id\": null,\n \"metadata\": {},\n \"name\": \"ProfileDrawerContentUpdateAvatarMutation\",\n \"operationKind\": \"mutation\",\n \"text\": \"mutation ProfileDrawerContentUpdateAvatarMutation(\\n $input: UpdateAvatarInput!\\n) {\\n updateAvatar(input: $input) {\\n id\\n avatar\\n }\\n}\\n\"\n }\n};\n})();\n\n(node as any).hash = \"cf72a6314772ed0d1f182b197c858505\";\n\nexport default node;\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAoBA,MAAMA,IAAqB,GAAI,YAAU;EACzC,IAAIC,EAAE,GAAG,CACP;MACE,cAAc,EAAE,IAAI;MACpB,MAAM,EAAE,eAAe;MACvB,MAAM,EAAE;IACV,CAAC,CACF;IACDC,EAAE,GAAG,CACH;MACE,OAAO,EAAE,IAAI;MACb,MAAM,EAAE,CACN;QACE,MAAM,EAAE,UAAU;QAClB,MAAM,EAAE,OAAO;QACf,cAAc,EAAE;MAClB,CAAC,CACF;MACD,cAAc,EAAE,MAAM;MACtB,MAAM,EAAE,aAAa;MACrB,MAAM,EAAE,cAAc;MACtB,QAAQ,EAAE,KAAK;MACf,YAAY,EAAE,CACZ;QACE,OAAO,EAAE,IAAI;QACb,MAAM,EAAE,IAAI;QACZ,MAAM,EAAE,aAAa;QACrB,MAAM,EAAE,IAAI;QACZ,YAAY,EAAE;MAChB,CAAC,EACD;QACE,OAAO,EAAE,IAAI;QACb,MAAM,EAAE,IAAI;QACZ,MAAM,EAAE,aAAa;QACrB,MAAM,EAAE,QAAQ;QAChB,YAAY,EAAE;MAChB,CAAC,CACF;MACD,YAAY,EAAE;IAChB,CAAC,CACF;EACD,OAAO;IACL,UAAU,EAAE;MACV,qBAAqB,EAAGD,EAAE,UAAU;MACpC,MAAM,EAAE,UAAU;MAClB,UAAU,EAAE,IAAI;MAChB,MAAM,EAAE,0CAA0C;MAClD,YAAY,EAAGC,EAAE,UAAU;MAC3B,MAAM,EAAE,UAAU;MAClB,aAAa,EAAE;IACjB,CAAC;IACD,MAAM,EAAE,SAAS;IACjB,WAAW,EAAE;MACX,qBAAqB,EAAGD,EAAE,UAAU;MACpC,MAAM,EAAE,WAAW;MACnB,MAAM,EAAE,0CAA0C;MAClD,YAAY,EAAGC,EAAE;IACnB,CAAC;IACD,QAAQ,EAAE;MACR,SAAS,EAAE,kCAAkC;MAC7C,IAAI,EAAE,IAAI;MACV,UAAU,EAAE,CAAC,CAAC;MACd,MAAM,EAAE,0CAA0C;MAClD,eAAe,EAAE,UAAU;MAC3B,MAAM,EAAE;IACV;EACF,CAAC;AACD,CAAC,CAAE,CAAC;AAEHF,IAAI,CAASG,IAAI,GAAG,kCAAkC;AAEvD,eAAeH,IAAI","ignoreList":[]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"ProfileUpdateNameModalMutation.graphql.js","names":["node","v0","v1","v2","v3","hash"],"sources":["../../../../../src/lib/components/profile/__generated__/ProfileUpdateNameModalMutation.graphql.ts"],"sourcesContent":["/**\n * @generated SignedSource<<26e40d9447fce4f5b8a56a5ff2f1fc8e>>\n * @lightSyntaxTransform\n * @nogrep\n */\n\n/* tslint:disable */\n/* eslint-disable */\n// @ts-nocheck\n\nimport { ConcreteRequest, Mutation } from 'relay-runtime';\nexport type UpdateProfileInput = {\n firstName?: string | null | undefined;\n lastName?: string | null | undefined;\n};\nexport type ProfileUpdateNameModalMutation$variables = {\n input: UpdateProfileInput;\n};\nexport type ProfileUpdateNameModalMutation$data = {\n readonly updateProfile: {\n readonly firstName: string | null | undefined;\n readonly lastName: string | null | undefined;\n };\n};\nexport type ProfileUpdateNameModalMutation = {\n response: ProfileUpdateNameModalMutation$data;\n variables: ProfileUpdateNameModalMutation$variables;\n};\n\nconst node: ConcreteRequest = (function(){\nvar v0 = [\n {\n \"defaultValue\": null,\n \"kind\": \"LocalArgument\",\n \"name\": \"input\"\n }\n],\nv1 = [\n {\n \"kind\": \"Variable\",\n \"name\": \"input\",\n \"variableName\": \"input\"\n }\n],\nv2 = {\n \"alias\": null,\n \"args\": null,\n \"kind\": \"ScalarField\",\n \"name\": \"firstName\",\n \"storageKey\": null\n},\nv3 = {\n \"alias\": null,\n \"args\": null,\n \"kind\": \"ScalarField\",\n \"name\": \"lastName\",\n \"storageKey\": null\n};\nreturn {\n \"fragment\": {\n \"argumentDefinitions\": (v0/*: any*/),\n \"kind\": \"Fragment\",\n \"metadata\": null,\n \"name\": \"ProfileUpdateNameModalMutation\",\n \"selections\": [\n {\n \"alias\": null,\n \"args\": (v1/*: any*/),\n \"concreteType\": \"User\",\n \"kind\": \"LinkedField\",\n \"name\": \"updateProfile\",\n \"plural\": false,\n \"selections\": [\n (v2/*: any*/),\n (v3/*: any*/)\n ],\n \"storageKey\": null\n }\n ],\n \"type\": \"Mutation\",\n \"abstractKey\": null\n },\n \"kind\": \"Request\",\n \"operation\": {\n \"argumentDefinitions\": (v0/*: any*/),\n \"kind\": \"Operation\",\n \"name\": \"ProfileUpdateNameModalMutation\",\n \"selections\": [\n {\n \"alias\": null,\n \"args\": (v1/*: any*/),\n \"concreteType\": \"User\",\n \"kind\": \"LinkedField\",\n \"name\": \"updateProfile\",\n \"plural\": false,\n \"selections\": [\n (v2/*: any*/),\n (v3/*: any*/),\n {\n \"alias\": null,\n \"args\": null,\n \"kind\": \"ScalarField\",\n \"name\": \"id\",\n \"storageKey\": null\n }\n ],\n \"storageKey\": null\n }\n ]\n },\n \"params\": {\n \"cacheID\": \"f70f0aaabf917dc446c3a71cf7b4f25f\",\n \"id\": null,\n \"metadata\": {},\n \"name\": \"ProfileUpdateNameModalMutation\",\n \"operationKind\": \"mutation\",\n \"text\": \"mutation ProfileUpdateNameModalMutation(\\n $input: UpdateProfileInput!\\n) {\\n updateProfile(input: $input) {\\n firstName\\n lastName\\n id\\n }\\n}\\n\"\n }\n};\n})();\n\n(node as any).hash = \"7264a05b6738d5417df9f1dc462486aa\";\n\n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AAU;QACrB,cAAc,EAAE,MAAM;QACtB,MAAM,EAAE,aAAa;QACrB,MAAM,EAAE,eAAe;QACvB,QAAQ,EAAE,KAAK;QACf,YAAY,EAAE,CACXC,EAAE,YACFC,EAAE,YACH;UACE,OAAO,EAAE,IAAI;UACb,MAAM,EAAE,IAAI;UACZ,MAAM,EAAE,aAAa;UACrB,MAAM,EAAE,IAAI;UACZ,YAAY,EAAE;QAChB,CAAC,CACF;QACD,YAAY,EAAE;MAChB,CAAC;IAEL,CAAC;IACD,QAAQ,EAAE;MACR,SAAS,EAAE,kCAAkC;MAC7C,IAAI,EAAE,IAAI;MACV,UAAU,EAAE,CAAC,CAAC;MACd,MAAM,EAAE,gCAAgC;MACxC,eAAe,EAAE,UAAU;MAC3B,MAAM,EAAE;IACV;EACF,CAAC;AACD,CAAC,CAAE,CAAC;AAEHJ,IAAI,CAASK,IAAI,GAAG,kCAAkC;AAEvD,eAAeL,IAAI","ignoreList":[]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"ProfileUpdatePasswordModalMutation.graphql.js","names":["node","v0","v1","hash"],"sources":["../../../../../src/lib/components/profile/__generated__/ProfileUpdatePasswordModalMutation.graphql.ts"],"sourcesContent":["/**\n * @generated SignedSource<<9f61f220f29facf328ddeea77698279f>>\n * @lightSyntaxTransform\n * @nogrep\n */\n\n/* tslint:disable */\n/* eslint-disable */\n// @ts-nocheck\n\nimport { ConcreteRequest, Mutation } from 'relay-runtime';\nexport type UpdatePasswordInput = {\n currentPassword: string;\n password: string;\n};\nexport type ProfileUpdatePasswordModalMutation$variables = {\n input: UpdatePasswordInput;\n};\nexport type ProfileUpdatePasswordModalMutation$data = {\n readonly updatePassword: {\n readonly id: string;\n };\n};\nexport type ProfileUpdatePasswordModalMutation = {\n response: ProfileUpdatePasswordModalMutation$data;\n variables: ProfileUpdatePasswordModalMutation$variables;\n};\n\nconst node: ConcreteRequest = (function(){\nvar v0 = [\n {\n \"defaultValue\": null,\n \"kind\": \"LocalArgument\",\n \"name\": \"input\"\n }\n],\nv1 = [\n {\n \"alias\": null,\n \"args\": [\n {\n \"kind\": \"Variable\",\n \"name\": \"input\",\n \"variableName\": \"input\"\n }\n ],\n \"concreteType\": \"User\",\n \"kind\": \"LinkedField\",\n \"name\": \"updatePassword\",\n \"plural\": false,\n \"selections\": [\n {\n \"alias\": null,\n \"args\": null,\n \"kind\": \"ScalarField\",\n \"name\": \"id\",\n \"storageKey\": null\n }\n ],\n \"storageKey\": null\n }\n];\nreturn {\n \"fragment\": {\n \"argumentDefinitions\": (v0/*: any*/),\n \"kind\": \"Fragment\",\n \"metadata\": null,\n \"name\": \"ProfileUpdatePasswordModalMutation\",\n \"selections\": (v1/*: any*/),\n \"type\": \"Mutation\",\n \"abstractKey\": null\n },\n \"kind\": \"Request\",\n \"operation\": {\n \"argumentDefinitions\": (v0/*: any*/),\n \"kind\": \"Operation\",\n \"name\": \"ProfileUpdatePasswordModalMutation\",\n \"selections\": (v1/*: any*/)\n },\n \"params\": {\n \"cacheID\": \"64308136a7a18e3fb1ab2d16aa93add7\",\n \"id\": null,\n \"metadata\": {},\n \"name\": \"ProfileUpdatePasswordModalMutation\",\n \"operationKind\": \"mutation\",\n \"text\": \"mutation ProfileUpdatePasswordModalMutation(\\n $input: UpdatePasswordInput!\\n) {\\n updatePassword(input: $input) {\\n id\\n }\\n}\\n\"\n }\n};\n})();\n\n(node as any).hash = \"efa37ccbe82fbace709f7e3992643c05\";\n\nexport default node;\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAoBA,MAAMA,IAAqB,GAAI,YAAU;EACzC,IAAIC,EAAE,GAAG,CACP;MACE,cAAc,EAAE,IAAI;MACpB,MAAM,EAAE,eAAe;MACvB,MAAM,EAAE;IACV,CAAC,CACF;IACDC,EAAE,GAAG,CACH;MACE,OAAO,EAAE,IAAI;MACb,MAAM,EAAE,CACN;QACE,MAAM,EAAE,UAAU;QAClB,MAAM,EAAE,OAAO;QACf,cAAc,EAAE;MAClB,CAAC,CACF;MACD,cAAc,EAAE,MAAM;MACtB,MAAM,EAAE,aAAa;MACrB,MAAM,EAAE,gBAAgB;MACxB,QAAQ,EAAE,KAAK;MACf,YAAY,EAAE,CACZ;QACE,OAAO,EAAE,IAAI;QACb,MAAM,EAAE,IAAI;QACZ,MAAM,EAAE,aAAa;QACrB,MAAM,EAAE,IAAI;QACZ,YAAY,EAAE;MAChB,CAAC,CACF;MACD,YAAY,EAAE;IAChB,CAAC,CACF;EACD,OAAO;IACL,UAAU,EAAE;MACV,qBAAqB,EAAGD,EAAE,UAAU;MACpC,MAAM,EAAE,UAAU;MAClB,UAAU,EAAE,IAAI;MAChB,MAAM,EAAE,oCAAoC;MAC5C,YAAY,EAAGC,EAAE,UAAU;MAC3B,MAAM,EAAE,UAAU;MAClB,aAAa,EAAE;IACjB,CAAC;IACD,MAAM,EAAE,SAAS;IACjB,WAAW,EAAE;MACX,qBAAqB,EAAGD,EAAE,UAAU;MACpC,MAAM,EAAE,WAAW;MACnB,MAAM,EAAE,oCAAoC;MAC5C,YAAY,EAAGC,EAAE;IACnB,CAAC;IACD,QAAQ,EAAE;MACR,SAAS,EAAE,kCAAkC;MAC7C,IAAI,EAAE,IAAI;MACV,UAAU,EAAE,CAAC,CAAC;MACd,MAAM,EAAE,oCAAoC;MAC5C,eAAe,EAAE,UAAU;MAC3B,MAAM,EAAE;IACV;EACF,CAAC;AACD,CAAC,CAAE,CAAC;AAEHF,IAAI,CAASG,IAAI,GAAG,kCAAkC;AAEvD,eAAeH,IAAI","ignoreList":[]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"ProtectedWrapperQuery.graphql.js","names":["node","v0","hash"],"sources":["../../../../../src/lib/components/profile/__generated__/ProtectedWrapperQuery.graphql.ts"],"sourcesContent":["/**\n * @generated SignedSource<<0489a6f56dfca495d1c3633c9a224274>>\n * @lightSyntaxTransform\n * @nogrep\n */\n\n/* tslint:disable */\n/* eslint-disable */\n// @ts-nocheck\n\nimport { ConcreteRequest, Query } from 'relay-runtime';\nexport type ProtectedWrapperQuery$variables = Record<PropertyKey, never>;\nexport type ProtectedWrapperQuery$data = {\n readonly profile: {\n readonly avatar: string | null | undefined;\n readonly email: string;\n readonly firstName: string | null | undefined;\n readonly id: string;\n readonly lastName: string | null | undefined;\n };\n};\nexport type ProtectedWrapperQuery = {\n response: ProtectedWrapperQuery$data;\n variables: ProtectedWrapperQuery$variables;\n};\n\nconst node: ConcreteRequest = (function(){\nvar v0 = [\n {\n \"alias\": null,\n \"args\": null,\n \"concreteType\": \"User\",\n \"kind\": \"LinkedField\",\n \"name\": \"profile\",\n \"plural\": false,\n \"selections\": [\n {\n \"alias\": null,\n \"args\": null,\n \"kind\": \"ScalarField\",\n \"name\": \"id\",\n \"storageKey\": null\n },\n {\n \"alias\": null,\n \"args\": null,\n \"kind\": \"ScalarField\",\n \"name\": \"email\",\n \"storageKey\": null\n },\n {\n \"alias\": null,\n \"args\": null,\n \"kind\": \"ScalarField\",\n \"name\": \"firstName\",\n \"storageKey\": null\n },\n {\n \"alias\": null,\n \"args\": null,\n \"kind\": \"ScalarField\",\n \"name\": \"lastName\",\n \"storageKey\": null\n },\n {\n \"alias\": null,\n \"args\": null,\n \"kind\": \"ScalarField\",\n \"name\": \"avatar\",\n \"storageKey\": null\n }\n ],\n \"storageKey\": null\n }\n];\nreturn {\n \"fragment\": {\n \"argumentDefinitions\": [],\n \"kind\": \"Fragment\",\n \"metadata\": null,\n \"name\": \"ProtectedWrapperQuery\",\n \"selections\": (v0/*: any*/),\n \"type\": \"Query\",\n \"abstractKey\": null\n },\n \"kind\": \"Request\",\n \"operation\": {\n \"argumentDefinitions\": [],\n \"kind\": \"Operation\",\n \"name\": \"ProtectedWrapperQuery\",\n \"selections\": (v0/*: any*/)\n },\n \"params\": {\n \"cacheID\": \"c77ada94a5456167ef4c0c17a1fd7cd7\",\n \"id\": null,\n \"metadata\": {},\n \"name\": \"ProtectedWrapperQuery\",\n \"operationKind\": \"query\",\n \"text\": \"query ProtectedWrapperQuery {\\n profile {\\n id\\n email\\n firstName\\n lastName\\n avatar\\n }\\n}\\n\"\n }\n};\n})();\n\n(node as any).hash = \"903b234e48f53b4a44dc0b4974ebc521\";\n\nexport default node;\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAkBA,MAAMA,IAAqB,GAAI,YAAU;EACzC,IAAIC,EAAE,GAAG,CACP;IACE,OAAO,EAAE,IAAI;IACb,MAAM,EAAE,IAAI;IACZ,cAAc,EAAE,MAAM;IACtB,MAAM,EAAE,aAAa;IACrB,MAAM,EAAE,SAAS;IACjB,QAAQ,EAAE,KAAK;IACf,YAAY,EAAE,CACZ;MACE,OAAO,EAAE,IAAI;MACb,MAAM,EAAE,IAAI;MACZ,MAAM,EAAE,aAAa;MACrB,MAAM,EAAE,IAAI;MACZ,YAAY,EAAE;IAChB,CAAC,EACD;MACE,OAAO,EAAE,IAAI;MACb,MAAM,EAAE,IAAI;MACZ,MAAM,EAAE,aAAa;MACrB,MAAM,EAAE,OAAO;MACf,YAAY,EAAE;IAChB,CAAC,EACD;MACE,OAAO,EAAE,IAAI;MACb,MAAM,EAAE,IAAI;MACZ,MAAM,EAAE,aAAa;MACrB,MAAM,EAAE,WAAW;MACnB,YAAY,EAAE;IAChB,CAAC,EACD;MACE,OAAO,EAAE,IAAI;MACb,MAAM,EAAE,IAAI;MACZ,MAAM,EAAE,aAAa;MACrB,MAAM,EAAE,UAAU;MAClB,YAAY,EAAE;IAChB,CAAC,EACD;MACE,OAAO,EAAE,IAAI;MACb,MAAM,EAAE,IAAI;MACZ,MAAM,EAAE,aAAa;MACrB,MAAM,EAAE,QAAQ;MAChB,YAAY,EAAE;IAChB,CAAC,CACF;IACD,YAAY,EAAE;EAChB,CAAC,CACF;EACD,OAAO;IACL,UAAU,EAAE;MACV,qBAAqB,EAAE,EAAE;MACzB,MAAM,EAAE,UAAU;MAClB,UAAU,EAAE,IAAI;MAChB,MAAM,EAAE,uBAAuB;MA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