@os-team/profile 1.2.0 → 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.
- package/dist/@types/emotion.d.js +1 -0
- package/dist/@types/i18next.d.js +1 -0
- package/dist/@types/relay.d.js +0 -0
- package/dist/{types/components → components}/profile/ProfileButton.d.ts +1 -1
- package/dist/components/profile/ProfileButton.d.ts.map +1 -0
- package/dist/components/profile/ProfileButton.js +9 -0
- package/dist/components/profile/ProfileConfigContext.d.ts.map +1 -0
- package/dist/{esm/components → components}/profile/ProfileConfigContext.js +1 -2
- package/dist/components/profile/ProfileContext.d.ts.map +1 -0
- package/dist/{esm/components → components}/profile/ProfileContext.js +1 -2
- package/dist/{types/components → components}/profile/ProfileDrawer.d.ts +2 -2
- package/dist/components/profile/ProfileDrawer.d.ts.map +1 -0
- package/dist/components/profile/ProfileDrawer.js +28 -0
- package/dist/{types/components → components}/profile/ProfileDrawerContent.d.ts +7 -0
- package/dist/components/profile/ProfileDrawerContent.d.ts.map +1 -0
- package/dist/{esm/components → components}/profile/ProfileDrawerContent.js +66 -41
- package/dist/{types/components → components}/profile/ProfileNavigationItem.d.ts +1 -1
- package/dist/components/profile/ProfileNavigationItem.d.ts.map +1 -0
- package/dist/components/profile/ProfileNavigationItem.js +28 -0
- package/dist/components/profile/ProfileUpdateNameModal.d.ts.map +1 -0
- package/dist/{esm/components → components}/profile/ProfileUpdateNameModal.js +38 -31
- package/dist/components/profile/ProfileUpdatePasswordModal.d.ts.map +1 -0
- package/dist/{esm/components → components}/profile/ProfileUpdatePasswordModal.js +40 -33
- package/dist/components/profile/ProtectedWrapper.d.ts.map +1 -0
- package/dist/{esm/components → components}/profile/ProtectedWrapper.js +19 -14
- package/dist/{types/components → components}/profile/UserAvatar.d.ts +1 -1
- package/dist/components/profile/UserAvatar.d.ts.map +1 -0
- package/dist/{esm/components → components}/profile/UserAvatar.js +7 -6
- package/dist/{types/components → components}/profile/UserAvatarAddon.d.ts +1 -1
- package/dist/components/profile/UserAvatarAddon.d.ts.map +1 -0
- package/dist/components/profile/UserAvatarAddon.js +50 -0
- package/dist/{types/components → components}/profile/__generated__/ProfileDrawerContentSignOutMutation.graphql.d.ts +5 -0
- package/dist/components/profile/__generated__/ProfileDrawerContentSignOutMutation.graphql.d.ts.map +1 -0
- package/dist/{esm/components → components}/profile/__generated__/ProfileDrawerContentSignOutMutation.graphql.js +2 -3
- package/dist/{types/components → components}/profile/__generated__/ProfileDrawerContentUpdateAvatarMutation.graphql.d.ts +5 -0
- package/dist/components/profile/__generated__/ProfileDrawerContentUpdateAvatarMutation.graphql.d.ts.map +1 -0
- package/dist/{esm/components → components}/profile/__generated__/ProfileDrawerContentUpdateAvatarMutation.graphql.js +2 -3
- package/dist/{types/components → components}/profile/__generated__/ProfileUpdateNameModalMutation.graphql.d.ts +5 -0
- package/dist/components/profile/__generated__/ProfileUpdateNameModalMutation.graphql.d.ts.map +1 -0
- package/dist/{esm/components → components}/profile/__generated__/ProfileUpdateNameModalMutation.graphql.js +2 -3
- package/dist/{types/components → components}/profile/__generated__/ProfileUpdatePasswordModalMutation.graphql.d.ts +5 -0
- package/dist/components/profile/__generated__/ProfileUpdatePasswordModalMutation.graphql.d.ts.map +1 -0
- package/dist/{esm/components → components}/profile/__generated__/ProfileUpdatePasswordModalMutation.graphql.js +2 -3
- package/dist/{types/components → components}/profile/__generated__/ProtectedWrapperQuery.graphql.d.ts +5 -0
- package/dist/components/profile/__generated__/ProtectedWrapperQuery.graphql.d.ts.map +1 -0
- package/dist/{esm/components → components}/profile/__generated__/ProtectedWrapperQuery.graphql.js +2 -3
- package/dist/{types/components → components}/session/SessionDrawer.d.ts +1 -1
- package/dist/components/session/SessionDrawer.d.ts.map +1 -0
- package/dist/components/session/SessionDrawer.js +45 -0
- package/dist/components/session/SessionDrawerContent.d.ts.map +1 -0
- package/dist/{esm/components → components}/session/SessionDrawerContent.js +12 -10
- package/dist/{types/components → components}/session/SessionList.d.ts +5 -5
- package/dist/components/session/SessionList.d.ts.map +1 -0
- package/dist/{esm/components → components}/session/SessionList.js +33 -17
- package/dist/{types/components → components}/session/SessionListItem.d.ts +9 -9
- package/dist/components/session/SessionListItem.d.ts.map +1 -0
- package/dist/{esm/components → components}/session/SessionListItem.js +37 -19
- package/dist/components/session/SessionListSkeleton.d.ts.map +1 -0
- package/dist/components/session/SessionListSkeleton.js +43 -0
- package/dist/{types/components → components}/session/__generated__/SessionDrawerContentQuery.graphql.d.ts +5 -0
- package/dist/components/session/__generated__/SessionDrawerContentQuery.graphql.d.ts.map +1 -0
- package/dist/{esm/components → components}/session/__generated__/SessionDrawerContentQuery.graphql.js +2 -3
- package/dist/{types/components → components}/session/__generated__/SessionListDestroyAllOtherSessionsMutation.graphql.d.ts +5 -0
- package/dist/components/session/__generated__/SessionListDestroyAllOtherSessionsMutation.graphql.d.ts.map +1 -0
- package/dist/{esm/components → components}/session/__generated__/SessionListDestroyAllOtherSessionsMutation.graphql.js +2 -3
- package/dist/{types/components → components}/session/__generated__/SessionListItemDestroySessionMutation.graphql.d.ts +5 -0
- package/dist/components/session/__generated__/SessionListItemDestroySessionMutation.graphql.d.ts.map +1 -0
- package/dist/{esm/components → components}/session/__generated__/SessionListItemDestroySessionMutation.graphql.js +2 -3
- package/dist/{types/components → components}/session/__generated__/SessionListItem_session.graphql.d.ts +5 -0
- package/dist/components/session/__generated__/SessionListItem_session.graphql.d.ts.map +1 -0
- package/dist/{esm/components → components}/session/__generated__/SessionListItem_session.graphql.js +2 -3
- package/dist/{types/components → components}/session/__generated__/SessionListRefetchQuery.graphql.d.ts +5 -0
- package/dist/components/session/__generated__/SessionListRefetchQuery.graphql.d.ts.map +1 -0
- package/dist/{esm/components → components}/session/__generated__/SessionListRefetchQuery.graphql.js +2 -3
- package/dist/{types/components → components}/session/__generated__/SessionList_sessions.graphql.d.ts +5 -0
- package/dist/components/session/__generated__/SessionList_sessions.graphql.d.ts.map +1 -0
- package/dist/{esm/components → components}/session/__generated__/SessionList_sessions.graphql.js +2 -3
- package/dist/{types/components → components}/session/formatDate.d.ts +1 -1
- package/dist/components/session/formatDate.d.ts.map +1 -0
- package/dist/{esm/components → components}/session/formatDate.js +1 -2
- package/dist/components/session/getLastSeen.d.ts +3 -0
- package/dist/components/session/getLastSeen.d.ts.map +1 -0
- package/dist/{esm/components → components}/session/getLastSeen.js +1 -2
- package/dist/{types/components → components}/shared/ButtonUpdate.d.ts +1 -1
- package/dist/components/shared/ButtonUpdate.d.ts.map +1 -0
- package/dist/{esm/components → components}/shared/ButtonUpdate.js +6 -3
- package/dist/components/shared/ErrorResult.d.ts.map +1 -0
- package/dist/{esm/components → components}/shared/ErrorResult.js +4 -4
- package/dist/components/shared/FormError.d.ts.map +1 -0
- package/dist/{esm/components → components}/shared/FormError.js +6 -5
- package/dist/components/shared/MainLoader.d.ts.map +1 -0
- package/dist/{esm/components → components}/shared/MainLoader.js +5 -3
- package/dist/{types/components → components}/shared/icons/AndroidIcon.d.ts +1 -1
- package/dist/components/shared/icons/AndroidIcon.d.ts.map +1 -0
- package/dist/components/shared/icons/AndroidIcon.js +12 -0
- package/dist/{types/components → components}/shared/icons/AppleIcon.d.ts +1 -1
- package/dist/components/shared/icons/AppleIcon.d.ts.map +1 -0
- package/dist/components/shared/icons/AppleIcon.js +12 -0
- package/dist/{types/components → components}/shared/icons/BrowserIcon.d.ts +1 -1
- package/dist/components/shared/icons/BrowserIcon.d.ts.map +1 -0
- package/dist/components/shared/icons/BrowserIcon.js +12 -0
- package/dist/{types/components → components}/shared/icons/ProfileIcon.d.ts +1 -1
- package/dist/components/shared/icons/ProfileIcon.d.ts.map +1 -0
- package/dist/components/shared/icons/ProfileIcon.js +12 -0
- package/dist/{types/components → components}/shared/icons/UnknownDeviceIcon.d.ts +1 -1
- package/dist/components/shared/icons/UnknownDeviceIcon.d.ts.map +1 -0
- package/dist/components/shared/icons/UnknownDeviceIcon.js +12 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +14 -0
- package/dist/utils/getError.d.ts.map +1 -0
- package/dist/{esm/utils → utils}/getError.js +1 -2
- package/dist/utils/getUserFullName.d.ts.map +1 -0
- package/dist/{esm/utils → utils}/getUserFullName.js +1 -2
- package/dist/{types/utils → utils}/handleFormErrors.d.ts +1 -1
- package/dist/utils/handleFormErrors.d.ts.map +1 -0
- package/dist/{esm/utils → utils}/handleFormErrors.js +1 -2
- package/package.json +55 -61
- package/src/@types/react-app-env.d.ts +3 -0
- package/src/App.tsx +42 -0
- package/src/AppRouter.tsx +12 -0
- package/src/components/ErrorResult.tsx +23 -0
- package/src/components/Layout.tsx +70 -0
- package/src/components/MainLoader.tsx +22 -0
- package/src/components/icons/HomeIcon.tsx +12 -0
- package/src/i18next.ts +34 -0
- package/src/index.tsx +6 -0
- package/src/lib/@types/emotion.d.ts +7 -0
- package/src/lib/@types/i18next.d.ts +12 -0
- package/src/lib/@types/relay.d.ts +3 -0
- package/src/lib/components/profile/ProfileButton.tsx +8 -0
- package/src/lib/components/profile/ProfileConfigContext.ts +16 -0
- package/src/lib/components/profile/ProfileContext.ts +20 -0
- package/src/lib/components/profile/ProfileDrawer.tsx +31 -0
- package/src/lib/components/profile/ProfileDrawerContent.tsx +276 -0
- package/src/lib/components/profile/ProfileNavigationItem.tsx +36 -0
- package/src/lib/components/profile/ProfileUpdateNameModal.tsx +117 -0
- package/src/lib/components/profile/ProfileUpdatePasswordModal.tsx +129 -0
- package/src/lib/components/profile/ProtectedWrapper.tsx +81 -0
- package/src/lib/components/profile/UserAvatar.tsx +23 -0
- package/src/lib/components/profile/UserAvatarAddon.tsx +62 -0
- package/src/lib/components/profile/__generated__/ProfileDrawerContentSignOutMutation.graphql.ts +74 -0
- package/src/lib/components/profile/__generated__/ProfileDrawerContentUpdateAvatarMutation.graphql.ts +100 -0
- package/src/lib/components/profile/__generated__/ProfileUpdateNameModalMutation.graphql.ts +124 -0
- package/src/lib/components/profile/__generated__/ProfileUpdatePasswordModalMutation.graphql.ts +93 -0
- package/src/lib/components/profile/__generated__/ProtectedWrapperQuery.graphql.ts +106 -0
- package/src/lib/components/session/SessionDrawer.tsx +50 -0
- package/src/lib/components/session/SessionDrawerContent.tsx +34 -0
- package/src/lib/components/session/SessionList.tsx +138 -0
- package/src/lib/components/session/SessionListItem.tsx +318 -0
- package/src/lib/components/session/SessionListSkeleton.tsx +48 -0
- package/src/lib/components/session/__generated__/SessionDrawerContentQuery.graphql.ts +181 -0
- package/src/lib/components/session/__generated__/SessionListDestroyAllOtherSessionsMutation.graphql.ts +74 -0
- package/src/lib/components/session/__generated__/SessionListItemDestroySessionMutation.graphql.ts +92 -0
- package/src/lib/components/session/__generated__/SessionListItem_session.graphql.ts +154 -0
- package/src/lib/components/session/__generated__/SessionListRefetchQuery.graphql.ts +181 -0
- package/src/lib/components/session/__generated__/SessionList_sessions.graphql.ts +83 -0
- package/src/lib/components/session/formatDate.ts +21 -0
- package/{dist/cjs/components/session/getLastSeen.js → src/lib/components/session/getLastSeen.ts} +9 -9
- package/src/lib/components/shared/ButtonUpdate.tsx +10 -0
- package/src/lib/components/shared/ErrorResult.tsx +28 -0
- package/src/lib/components/shared/FormError.tsx +11 -0
- package/src/lib/components/shared/MainLoader.tsx +22 -0
- package/src/lib/components/shared/icons/AndroidIcon.tsx +12 -0
- package/src/lib/components/shared/icons/AppleIcon.tsx +12 -0
- package/src/lib/components/shared/icons/BrowserIcon.tsx +12 -0
- package/src/lib/components/shared/icons/ProfileIcon.tsx +12 -0
- package/src/lib/components/shared/icons/UnknownDeviceIcon.tsx +14 -0
- package/{dist/esm/index.js → src/lib/index.ts} +1 -1
- package/src/lib/utils/getError.ts +101 -0
- package/src/lib/utils/getUserFullName.ts +14 -0
- package/src/lib/utils/handleFormErrors.ts +16 -0
- package/src/pages/HomePage.tsx +11 -0
- package/src/schema.graphql +2494 -0
- package/src/utils/createRelayEnvironment.ts +22 -0
- package/src/utils/getError.ts +101 -0
- package/dist/cjs/@types/emotion.d.js +0 -4
- package/dist/cjs/@types/emotion.d.js.map +0 -1
- package/dist/cjs/@types/i18next.d.js +0 -4
- package/dist/cjs/@types/i18next.d.js.map +0 -1
- package/dist/cjs/components/profile/ProfileButton.js +0 -16
- package/dist/cjs/components/profile/ProfileButton.js.map +0 -1
- package/dist/cjs/components/profile/ProfileConfigContext.js +0 -17
- package/dist/cjs/components/profile/ProfileConfigContext.js.map +0 -1
- package/dist/cjs/components/profile/ProfileContext.js +0 -18
- package/dist/cjs/components/profile/ProfileContext.js.map +0 -1
- package/dist/cjs/components/profile/ProfileDrawer.js +0 -35
- package/dist/cjs/components/profile/ProfileDrawer.js.map +0 -1
- package/dist/cjs/components/profile/ProfileDrawerContent.js +0 -167
- package/dist/cjs/components/profile/ProfileDrawerContent.js.map +0 -1
- package/dist/cjs/components/profile/ProfileNavigationItem.js +0 -35
- package/dist/cjs/components/profile/ProfileNavigationItem.js.map +0 -1
- package/dist/cjs/components/profile/ProfileUpdateNameModal.js +0 -106
- package/dist/cjs/components/profile/ProfileUpdateNameModal.js.map +0 -1
- package/dist/cjs/components/profile/ProfileUpdatePasswordModal.js +0 -106
- package/dist/cjs/components/profile/ProfileUpdatePasswordModal.js.map +0 -1
- package/dist/cjs/components/profile/ProtectedWrapper.js +0 -54
- package/dist/cjs/components/profile/ProtectedWrapper.js.map +0 -1
- package/dist/cjs/components/profile/UserAvatar.js +0 -42
- package/dist/cjs/components/profile/UserAvatar.js.map +0 -1
- package/dist/cjs/components/profile/UserAvatarAddon.js +0 -41
- package/dist/cjs/components/profile/UserAvatarAddon.js.map +0 -1
- package/dist/cjs/components/profile/__generated__/ProfileDrawerContentSignOutMutation.graphql.js +0 -63
- package/dist/cjs/components/profile/__generated__/ProfileDrawerContentSignOutMutation.graphql.js.map +0 -1
- package/dist/cjs/components/profile/__generated__/ProfileDrawerContentUpdateAvatarMutation.graphql.js +0 -78
- package/dist/cjs/components/profile/__generated__/ProfileDrawerContentUpdateAvatarMutation.graphql.js.map +0 -1
- package/dist/cjs/components/profile/__generated__/ProfileUpdateNameModalMutation.graphql.js +0 -95
- package/dist/cjs/components/profile/__generated__/ProfileUpdateNameModalMutation.graphql.js.map +0 -1
- package/dist/cjs/components/profile/__generated__/ProfileUpdatePasswordModalMutation.graphql.js +0 -72
- package/dist/cjs/components/profile/__generated__/ProfileUpdatePasswordModalMutation.graphql.js.map +0 -1
- package/dist/cjs/components/profile/__generated__/ProtectedWrapperQuery.graphql.js +0 -87
- package/dist/cjs/components/profile/__generated__/ProtectedWrapperQuery.graphql.js.map +0 -1
- package/dist/cjs/components/session/SessionDrawer.js +0 -46
- package/dist/cjs/components/session/SessionDrawer.js.map +0 -1
- package/dist/cjs/components/session/SessionDrawerContent.js +0 -39
- package/dist/cjs/components/session/SessionDrawerContent.js.map +0 -1
- package/dist/cjs/components/session/SessionList.js +0 -73
- package/dist/cjs/components/session/SessionList.js.map +0 -1
- package/dist/cjs/components/session/SessionListItem.js +0 -150
- package/dist/cjs/components/session/SessionListItem.js.map +0 -1
- package/dist/cjs/components/session/SessionListSkeleton.js +0 -31
- package/dist/cjs/components/session/SessionListSkeleton.js.map +0 -1
- package/dist/cjs/components/session/__generated__/SessionDrawerContentQuery.graphql.js +0 -154
- package/dist/cjs/components/session/__generated__/SessionDrawerContentQuery.graphql.js.map +0 -1
- package/dist/cjs/components/session/__generated__/SessionListDestroyAllOtherSessionsMutation.graphql.js +0 -63
- package/dist/cjs/components/session/__generated__/SessionListDestroyAllOtherSessionsMutation.graphql.js.map +0 -1
- package/dist/cjs/components/session/__generated__/SessionListItemDestroySessionMutation.graphql.js +0 -72
- package/dist/cjs/components/session/__generated__/SessionListItemDestroySessionMutation.graphql.js.map +0 -1
- package/dist/cjs/components/session/__generated__/SessionListItem_session.graphql.js +0 -118
- package/dist/cjs/components/session/__generated__/SessionListItem_session.graphql.js.map +0 -1
- package/dist/cjs/components/session/__generated__/SessionListRefetchQuery.graphql.js +0 -154
- package/dist/cjs/components/session/__generated__/SessionListRefetchQuery.graphql.js.map +0 -1
- package/dist/cjs/components/session/__generated__/SessionList_sessions.graphql.js +0 -65
- package/dist/cjs/components/session/__generated__/SessionList_sessions.graphql.js.map +0 -1
- package/dist/cjs/components/session/formatDate.js +0 -19
- package/dist/cjs/components/session/formatDate.js.map +0 -1
- package/dist/cjs/components/session/getLastSeen.js.map +0 -1
- package/dist/cjs/components/shared/ButtonUpdate.js +0 -18
- package/dist/cjs/components/shared/ButtonUpdate.js.map +0 -1
- package/dist/cjs/components/shared/ErrorResult.js +0 -31
- package/dist/cjs/components/shared/ErrorResult.js.map +0 -1
- package/dist/cjs/components/shared/FormError.js +0 -21
- package/dist/cjs/components/shared/FormError.js.map +0 -1
- package/dist/cjs/components/shared/MainLoader.js +0 -17
- package/dist/cjs/components/shared/MainLoader.js.map +0 -1
- package/dist/cjs/components/shared/icons/AndroidIcon.js +0 -18
- package/dist/cjs/components/shared/icons/AndroidIcon.js.map +0 -1
- package/dist/cjs/components/shared/icons/AppleIcon.js +0 -18
- package/dist/cjs/components/shared/icons/AppleIcon.js.map +0 -1
- package/dist/cjs/components/shared/icons/BrowserIcon.js +0 -18
- package/dist/cjs/components/shared/icons/BrowserIcon.js.map +0 -1
- package/dist/cjs/components/shared/icons/ProfileIcon.js +0 -18
- package/dist/cjs/components/shared/icons/ProfileIcon.js.map +0 -1
- package/dist/cjs/components/shared/icons/UnknownDeviceIcon.js +0 -18
- package/dist/cjs/components/shared/icons/UnknownDeviceIcon.js.map +0 -1
- package/dist/cjs/index.js +0 -142
- package/dist/cjs/index.js.map +0 -1
- package/dist/cjs/utils/getError.js +0 -59
- package/dist/cjs/utils/getError.js.map +0 -1
- package/dist/cjs/utils/getUserFullName.js +0 -19
- package/dist/cjs/utils/getUserFullName.js.map +0 -1
- package/dist/cjs/utils/handleFormErrors.js +0 -25
- package/dist/cjs/utils/handleFormErrors.js.map +0 -1
- package/dist/esm/@types/emotion.d.js +0 -2
- package/dist/esm/@types/emotion.d.js.map +0 -1
- package/dist/esm/@types/i18next.d.js +0 -2
- package/dist/esm/@types/i18next.d.js.map +0 -1
- package/dist/esm/components/profile/ProfileButton.js +0 -9
- package/dist/esm/components/profile/ProfileButton.js.map +0 -1
- package/dist/esm/components/profile/ProfileConfigContext.js.map +0 -1
- package/dist/esm/components/profile/ProfileContext.js.map +0 -1
- package/dist/esm/components/profile/ProfileDrawer.js +0 -25
- package/dist/esm/components/profile/ProfileDrawer.js.map +0 -1
- package/dist/esm/components/profile/ProfileDrawerContent.js.map +0 -1
- package/dist/esm/components/profile/ProfileNavigationItem.js +0 -27
- package/dist/esm/components/profile/ProfileNavigationItem.js.map +0 -1
- package/dist/esm/components/profile/ProfileUpdateNameModal.js.map +0 -1
- package/dist/esm/components/profile/ProfileUpdatePasswordModal.js.map +0 -1
- package/dist/esm/components/profile/ProtectedWrapper.js.map +0 -1
- package/dist/esm/components/profile/UserAvatar.js.map +0 -1
- package/dist/esm/components/profile/UserAvatarAddon.js +0 -47
- package/dist/esm/components/profile/UserAvatarAddon.js.map +0 -1
- package/dist/esm/components/profile/__generated__/ProfileDrawerContentSignOutMutation.graphql.js.map +0 -1
- package/dist/esm/components/profile/__generated__/ProfileDrawerContentUpdateAvatarMutation.graphql.js.map +0 -1
- package/dist/esm/components/profile/__generated__/ProfileUpdateNameModalMutation.graphql.js.map +0 -1
- package/dist/esm/components/profile/__generated__/ProfileUpdatePasswordModalMutation.graphql.js.map +0 -1
- package/dist/esm/components/profile/__generated__/ProtectedWrapperQuery.graphql.js.map +0 -1
- package/dist/esm/components/session/SessionDrawer.js +0 -39
- package/dist/esm/components/session/SessionDrawer.js.map +0 -1
- package/dist/esm/components/session/SessionDrawerContent.js.map +0 -1
- package/dist/esm/components/session/SessionList.js.map +0 -1
- package/dist/esm/components/session/SessionListItem.js.map +0 -1
- package/dist/esm/components/session/SessionListSkeleton.js +0 -31
- package/dist/esm/components/session/SessionListSkeleton.js.map +0 -1
- package/dist/esm/components/session/__generated__/SessionDrawerContentQuery.graphql.js.map +0 -1
- package/dist/esm/components/session/__generated__/SessionListDestroyAllOtherSessionsMutation.graphql.js.map +0 -1
- package/dist/esm/components/session/__generated__/SessionListItemDestroySessionMutation.graphql.js.map +0 -1
- package/dist/esm/components/session/__generated__/SessionListItem_session.graphql.js.map +0 -1
- package/dist/esm/components/session/__generated__/SessionListRefetchQuery.graphql.js.map +0 -1
- package/dist/esm/components/session/__generated__/SessionList_sessions.graphql.js.map +0 -1
- package/dist/esm/components/session/formatDate.js.map +0 -1
- package/dist/esm/components/session/getLastSeen.js.map +0 -1
- package/dist/esm/components/shared/ButtonUpdate.js.map +0 -1
- package/dist/esm/components/shared/ErrorResult.js.map +0 -1
- package/dist/esm/components/shared/FormError.js.map +0 -1
- package/dist/esm/components/shared/MainLoader.js.map +0 -1
- package/dist/esm/components/shared/icons/AndroidIcon.js +0 -11
- package/dist/esm/components/shared/icons/AndroidIcon.js.map +0 -1
- package/dist/esm/components/shared/icons/AppleIcon.js +0 -11
- package/dist/esm/components/shared/icons/AppleIcon.js.map +0 -1
- package/dist/esm/components/shared/icons/BrowserIcon.js +0 -11
- package/dist/esm/components/shared/icons/BrowserIcon.js.map +0 -1
- package/dist/esm/components/shared/icons/ProfileIcon.js +0 -11
- package/dist/esm/components/shared/icons/ProfileIcon.js.map +0 -1
- package/dist/esm/components/shared/icons/UnknownDeviceIcon.js +0 -11
- package/dist/esm/components/shared/icons/UnknownDeviceIcon.js.map +0 -1
- package/dist/esm/index.js.map +0 -1
- package/dist/esm/utils/getError.js.map +0 -1
- package/dist/esm/utils/getUserFullName.js.map +0 -1
- package/dist/esm/utils/handleFormErrors.js.map +0 -1
- package/dist/types/components/profile/ProfileButton.d.ts.map +0 -1
- package/dist/types/components/profile/ProfileConfigContext.d.ts.map +0 -1
- package/dist/types/components/profile/ProfileContext.d.ts.map +0 -1
- package/dist/types/components/profile/ProfileDrawer.d.ts.map +0 -1
- package/dist/types/components/profile/ProfileDrawerContent.d.ts.map +0 -1
- package/dist/types/components/profile/ProfileNavigationItem.d.ts.map +0 -1
- package/dist/types/components/profile/ProfileUpdateNameModal.d.ts.map +0 -1
- package/dist/types/components/profile/ProfileUpdatePasswordModal.d.ts.map +0 -1
- package/dist/types/components/profile/ProtectedWrapper.d.ts.map +0 -1
- package/dist/types/components/profile/UserAvatar.d.ts.map +0 -1
- package/dist/types/components/profile/UserAvatarAddon.d.ts.map +0 -1
- package/dist/types/components/profile/__generated__/ProfileDrawerContentSignOutMutation.graphql.d.ts.map +0 -1
- package/dist/types/components/profile/__generated__/ProfileDrawerContentUpdateAvatarMutation.graphql.d.ts.map +0 -1
- package/dist/types/components/profile/__generated__/ProfileUpdateNameModalMutation.graphql.d.ts.map +0 -1
- package/dist/types/components/profile/__generated__/ProfileUpdatePasswordModalMutation.graphql.d.ts.map +0 -1
- package/dist/types/components/profile/__generated__/ProtectedWrapperQuery.graphql.d.ts.map +0 -1
- package/dist/types/components/session/SessionDrawer.d.ts.map +0 -1
- package/dist/types/components/session/SessionDrawerContent.d.ts.map +0 -1
- package/dist/types/components/session/SessionList.d.ts.map +0 -1
- package/dist/types/components/session/SessionListItem.d.ts.map +0 -1
- package/dist/types/components/session/SessionListSkeleton.d.ts.map +0 -1
- package/dist/types/components/session/__generated__/SessionDrawerContentQuery.graphql.d.ts.map +0 -1
- package/dist/types/components/session/__generated__/SessionListDestroyAllOtherSessionsMutation.graphql.d.ts.map +0 -1
- package/dist/types/components/session/__generated__/SessionListItemDestroySessionMutation.graphql.d.ts.map +0 -1
- package/dist/types/components/session/__generated__/SessionListItem_session.graphql.d.ts.map +0 -1
- package/dist/types/components/session/__generated__/SessionListRefetchQuery.graphql.d.ts.map +0 -1
- package/dist/types/components/session/__generated__/SessionList_sessions.graphql.d.ts.map +0 -1
- package/dist/types/components/session/formatDate.d.ts.map +0 -1
- package/dist/types/components/session/getLastSeen.d.ts +0 -3
- package/dist/types/components/session/getLastSeen.d.ts.map +0 -1
- package/dist/types/components/shared/ButtonUpdate.d.ts.map +0 -1
- package/dist/types/components/shared/ErrorResult.d.ts.map +0 -1
- package/dist/types/components/shared/FormError.d.ts.map +0 -1
- package/dist/types/components/shared/MainLoader.d.ts.map +0 -1
- package/dist/types/components/shared/icons/AndroidIcon.d.ts.map +0 -1
- package/dist/types/components/shared/icons/AppleIcon.d.ts.map +0 -1
- package/dist/types/components/shared/icons/BrowserIcon.d.ts.map +0 -1
- package/dist/types/components/shared/icons/ProfileIcon.d.ts.map +0 -1
- package/dist/types/components/shared/icons/UnknownDeviceIcon.d.ts.map +0 -1
- package/dist/types/index.d.ts.map +0 -1
- package/dist/types/utils/getError.d.ts.map +0 -1
- package/dist/types/utils/getUserFullName.d.ts.map +0 -1
- package/dist/types/utils/handleFormErrors.d.ts.map +0 -1
- /package/dist/{types/components → components}/profile/ProfileConfigContext.d.ts +0 -0
- /package/dist/{types/components → components}/profile/ProfileContext.d.ts +0 -0
- /package/dist/{types/components → components}/profile/ProfileUpdateNameModal.d.ts +0 -0
- /package/dist/{types/components → components}/profile/ProfileUpdatePasswordModal.d.ts +0 -0
- /package/dist/{types/components → components}/profile/ProtectedWrapper.d.ts +0 -0
- /package/dist/{types/components → components}/session/SessionDrawerContent.d.ts +0 -0
- /package/dist/{types/components → components}/session/SessionListSkeleton.d.ts +0 -0
- /package/dist/{types/components → components}/shared/ErrorResult.d.ts +0 -0
- /package/dist/{types/components → components}/shared/FormError.d.ts +0 -0
- /package/dist/{types/components → components}/shared/MainLoader.d.ts +0 -0
- /package/dist/{types/index.d.ts → index.d.ts} +0 -0
- /package/dist/{types/utils → utils}/getError.d.ts +0 -0
- /package/dist/{types/utils → utils}/getUserFullName.d.ts +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ProfileUpdateNameModal.js","names":["_core","require","_form","_react","_interopRequireWildcard","_reactI18next","_hooks","_handleFormErrors","_interopRequireDefault","_FormError","_ProfileContext","_ProfileUpdateNameModalMutation","obj","__esModule","default","_getRequireWildcardCache","e","WeakMap","r","t","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","_extends","assign","bind","target","arguments","length","source","key","apply","ProfileUpdateNameModal","_ref","visible","onClose","useTranslation","firstName","lastName","useProfile","initValues","useMemo","form","Field","useForm","commit","loading","useMutation","hash","console","error","useEffect","reset","onSubmit","useCallback","variables","input","values","getAll","onError","handleFormErrors","onCompleted","message","success","firstNameData","label","placeholder","lastNameData","createElement","Modal","title","okText","okLoading","onOk","FormProvider","Form","name","data","render","props","_ref2","FormItem","Input","_ref3","_default","exports"],"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,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AAEA,IAAAE,MAAA,GAAAC,uBAAA,CAAAH,OAAA;AACA,IAAAI,aAAA,GAAAJ,OAAA;AACA,IAAAK,MAAA,GAAAL,OAAA;AACA,IAAAM,iBAAA,GAAAC,sBAAA,CAAAP,OAAA;AACA,IAAAQ,UAAA,GAAAD,sBAAA,CAAAP,OAAA;AAEA,IAAAS,eAAA,GAAAT,OAAA;AAA8C,IAAAU,+BAAA;AAAA,SAAAH,uBAAAI,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAAA,SAAAG,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAA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B,sBAAsB"}
|
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
var _core = require("@os-design/core");
|
|
8
|
-
var _form = require("@os-design/form");
|
|
9
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
10
|
-
var _reactI18next = require("react-i18next");
|
|
11
|
-
var _hooks = require("react-relay/hooks");
|
|
12
|
-
var _handleFormErrors = _interopRequireDefault(require("../../utils/handleFormErrors"));
|
|
13
|
-
var _FormError = _interopRequireDefault(require("../shared/FormError"));
|
|
14
|
-
var _ProfileUpdatePasswordModalMutation;
|
|
15
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
16
|
-
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); }
|
|
17
|
-
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 && Object.prototype.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; }
|
|
18
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
19
|
-
const ProfileUpdatePasswordModal = _ref => {
|
|
20
|
-
let {
|
|
21
|
-
visible,
|
|
22
|
-
onClose
|
|
23
|
-
} = _ref;
|
|
24
|
-
const {
|
|
25
|
-
t
|
|
26
|
-
} = (0, _reactI18next.useTranslation)(['profile']);
|
|
27
|
-
const initValues = (0, _react.useMemo)(() => ({
|
|
28
|
-
currentPassword: '',
|
|
29
|
-
password: ''
|
|
30
|
-
}), []);
|
|
31
|
-
const {
|
|
32
|
-
form,
|
|
33
|
-
Field
|
|
34
|
-
} = (0, _form.useForm)(initValues);
|
|
35
|
-
const [commit, loading] = (0, _hooks.useMutation)(_ProfileUpdatePasswordModalMutation !== void 0 ? _ProfileUpdatePasswordModalMutation : (_ProfileUpdatePasswordModalMutation = require("./__generated__/ProfileUpdatePasswordModalMutation.graphql"), _ProfileUpdatePasswordModalMutation.hash && _ProfileUpdatePasswordModalMutation.hash !== "efa37ccbe82fbace709f7e3992643c05" && console.error("The definition of 'ProfileUpdatePasswordModalMutation' appears to have changed. Run `relay-compiler` to update the generated files to receive the expected data."), _ProfileUpdatePasswordModalMutation));
|
|
36
|
-
|
|
37
|
-
// Reset the form when the modal is opened
|
|
38
|
-
(0, _react.useEffect)(() => {
|
|
39
|
-
if (visible) form.reset();
|
|
40
|
-
}, [form, visible]);
|
|
41
|
-
const onSubmit = (0, _react.useCallback)(() => {
|
|
42
|
-
commit({
|
|
43
|
-
variables: {
|
|
44
|
-
input: form.values.getAll()
|
|
45
|
-
},
|
|
46
|
-
onError: error => (0, _handleFormErrors.default)(form, error),
|
|
47
|
-
onCompleted: () => {
|
|
48
|
-
_core.message.success(t('profile:updatePasswordModal.success'));
|
|
49
|
-
onClose();
|
|
50
|
-
}
|
|
51
|
-
});
|
|
52
|
-
}, [commit, form, onClose, t]);
|
|
53
|
-
const currentPasswordData = (0, _react.useMemo)(() => ({
|
|
54
|
-
label: t('profile:updatePasswordModal.currentPassword.label'),
|
|
55
|
-
placeholder: t('profile:updatePasswordModal.currentPassword.placeholder')
|
|
56
|
-
}), [t]);
|
|
57
|
-
const passwordData = (0, _react.useMemo)(() => ({
|
|
58
|
-
label: t('profile:updatePasswordModal.newPassword.label'),
|
|
59
|
-
placeholder: t('profile:updatePasswordModal.newPassword.placeholder'),
|
|
60
|
-
strengthNames: t('profile:updatePasswordModal.passwordStrengthNames', {
|
|
61
|
-
returnObjects: true
|
|
62
|
-
})
|
|
63
|
-
}), [t]);
|
|
64
|
-
return /*#__PURE__*/_react.default.createElement(_core.Modal, {
|
|
65
|
-
title: t('profile:updatePasswordModal.title'),
|
|
66
|
-
visible: visible,
|
|
67
|
-
okText: t('profile:updatePasswordModal.button'),
|
|
68
|
-
okLoading: loading,
|
|
69
|
-
onOk: onSubmit,
|
|
70
|
-
onClose: onClose
|
|
71
|
-
}, /*#__PURE__*/_react.default.createElement(_form.FormProvider, {
|
|
72
|
-
form: form
|
|
73
|
-
}, /*#__PURE__*/_react.default.createElement(_core.Form, null, /*#__PURE__*/_react.default.createElement(Field, {
|
|
74
|
-
name: "currentPassword",
|
|
75
|
-
data: currentPasswordData,
|
|
76
|
-
render: (props, _ref2, data) => {
|
|
77
|
-
let {
|
|
78
|
-
error
|
|
79
|
-
} = _ref2;
|
|
80
|
-
return /*#__PURE__*/_react.default.createElement(_core.FormItem, {
|
|
81
|
-
label: data.label,
|
|
82
|
-
error: error
|
|
83
|
-
}, /*#__PURE__*/_react.default.createElement(_core.InputPassword, _extends({
|
|
84
|
-
placeholder: data.placeholder
|
|
85
|
-
}, props)));
|
|
86
|
-
}
|
|
87
|
-
}), /*#__PURE__*/_react.default.createElement(Field, {
|
|
88
|
-
name: "password",
|
|
89
|
-
data: passwordData,
|
|
90
|
-
render: (props, _ref3, data) => {
|
|
91
|
-
let {
|
|
92
|
-
error
|
|
93
|
-
} = _ref3;
|
|
94
|
-
return /*#__PURE__*/_react.default.createElement(_core.FormItem, {
|
|
95
|
-
label: data.label,
|
|
96
|
-
error: error
|
|
97
|
-
}, /*#__PURE__*/_react.default.createElement(_core.InputPassword, _extends({
|
|
98
|
-
placeholder: data.placeholder,
|
|
99
|
-
showStrengthMeter: true,
|
|
100
|
-
strengthNames: data.strengthNames
|
|
101
|
-
}, props)));
|
|
102
|
-
}
|
|
103
|
-
}), /*#__PURE__*/_react.default.createElement(_FormError.default, null))));
|
|
104
|
-
};
|
|
105
|
-
var _default = exports.default = ProfileUpdatePasswordModal;
|
|
106
|
-
//# sourceMappingURL=ProfileUpdatePasswordModal.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ProfileUpdatePasswordModal.js","names":["_core","require","_form","_react","_interopRequireWildcard","_reactI18next","_hooks","_handleFormErrors","_interopRequireDefault","_FormError","_ProfileUpdatePasswordModalMutation","obj","__esModule","default","_getRequireWildcardCache","e","WeakMap","r","t","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","_extends","assign","bind","target","arguments","length","source","key","apply","ProfileUpdatePasswordModal","_ref","visible","onClose","useTranslation","initValues","useMemo","currentPassword","password","form","Field","useForm","commit","loading","useMutation","hash","console","error","useEffect","reset","onSubmit","useCallback","variables","input","values","getAll","onError","handleFormErrors","onCompleted","message","success","currentPasswordData","label","placeholder","passwordData","strengthNames","returnObjects","createElement","Modal","title","okText","okLoading","onOk","FormProvider","Form","name","data","render","props","_ref2","FormItem","InputPassword","_ref3","showStrengthMeter","_default","exports"],"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 showStrength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AM,EAAEA,CAACC,KAAK,EAAAI,KAAA,EAAaN,IAAI;MAAA,IAAf;QAAE7B;MAAM,CAAC,GAAAmC,KAAA;MAAA,oBACvB3F,MAAA,CAAAU,OAAA,CAAAkE,aAAA,CAAC/E,KAAA,CAAA4F,QAAQ;QAAClB,KAAK,EAAEc,IAAI,CAACd,KAAM;QAACf,KAAK,EAAEA;MAAM,gBACxCxD,MAAA,CAAAU,OAAA,CAAAkE,aAAA,CAAC/E,KAAA,CAAA6F,aAAa,EAAA5D,QAAA;QACZ0C,WAAW,EAAEa,IAAI,CAACb,WAAY;QAC9BoB,iBAAiB;QACjBlB,aAAa,EAAEW,IAAI,CAACX;MAAc,GAC9Ba,KAAK,CACV,CACO,CAAC;IAAA;EACX,CACH,CAAC,eAEFvF,MAAA,CAAAU,OAAA,CAAAkE,aAAA,CAACtE,UAAA,CAAAI,OAAS,MAAE,CACR,CACM,CACT,CAAC;AAEZ,CAAC;AAAC,IAAAmF,QAAA,GAAAC,OAAA,CAAApF,OAAA,GAEa6B,0BAA0B"}
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
8
|
-
var _hooks = require("react-relay/hooks");
|
|
9
|
-
var _utils = require("@os-design/utils");
|
|
10
|
-
var _ProfileConfigContext = _interopRequireDefault(require("./ProfileConfigContext"));
|
|
11
|
-
var _ProfileContext = _interopRequireDefault(require("./ProfileContext"));
|
|
12
|
-
var _ProtectedWrapperQuery;
|
|
13
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
14
|
-
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); }
|
|
15
|
-
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 && Object.prototype.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; }
|
|
16
|
-
const ProtectedWrapperLoader = _ref => {
|
|
17
|
-
let {
|
|
18
|
-
children
|
|
19
|
-
} = _ref;
|
|
20
|
-
const {
|
|
21
|
-
profile
|
|
22
|
-
} = (0, _hooks.useLazyLoadQuery)(_ProtectedWrapperQuery !== void 0 ? _ProtectedWrapperQuery : (_ProtectedWrapperQuery = require("./__generated__/ProtectedWrapperQuery.graphql"), _ProtectedWrapperQuery.hash && _ProtectedWrapperQuery.hash !== "903b234e48f53b4a44dc0b4974ebc521" && console.error("The definition of 'ProtectedWrapperQuery' appears to have changed. Run `relay-compiler` to update the generated files to receive the expected data."), _ProtectedWrapperQuery), {}, {
|
|
23
|
-
fetchPolicy: 'store-or-network'
|
|
24
|
-
});
|
|
25
|
-
const profileContext = (0, _react.useMemo)(() => ({
|
|
26
|
-
id: profile.id,
|
|
27
|
-
email: profile.email,
|
|
28
|
-
firstName: profile.firstName || undefined,
|
|
29
|
-
lastName: profile.lastName || undefined,
|
|
30
|
-
avatar: profile.avatar || undefined
|
|
31
|
-
}), [profile.avatar, profile.email, profile.firstName, profile.id, profile.lastName]);
|
|
32
|
-
return /*#__PURE__*/_react.default.createElement(_ProfileContext.default.Provider, {
|
|
33
|
-
value: profileContext
|
|
34
|
-
}, children);
|
|
35
|
-
};
|
|
36
|
-
const ProtectedWrapper = _ref2 => {
|
|
37
|
-
let {
|
|
38
|
-
bucketId,
|
|
39
|
-
children
|
|
40
|
-
} = _ref2;
|
|
41
|
-
const profileConfigContext = (0, _react.useMemo)(() => ({
|
|
42
|
-
bucketId
|
|
43
|
-
}), [bucketId]);
|
|
44
|
-
return /*#__PURE__*/_react.default.createElement(_ProfileConfigContext.default.Provider, {
|
|
45
|
-
value: profileConfigContext
|
|
46
|
-
}, /*#__PURE__*/_react.default.createElement(_utils.ErrorBoundary, {
|
|
47
|
-
fallback: () => {
|
|
48
|
-
window.location.href = '/auth/';
|
|
49
|
-
return null;
|
|
50
|
-
}
|
|
51
|
-
}, /*#__PURE__*/_react.default.createElement(ProtectedWrapperLoader, null, children)));
|
|
52
|
-
};
|
|
53
|
-
var _default = exports.default = ProtectedWrapper;
|
|
54
|
-
//# sourceMappingURL=ProtectedWrapper.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ProtectedWrapper.js","names":["_react","_interopRequireWildcard","require","_hooks","_utils","_ProfileConfigContext","_interopRequireDefault","_ProfileContext","_ProtectedWrapperQuery","obj","__esModule","default","_getRequireWildcardCache","e","WeakMap","r","t","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","ProtectedWrapperLoader","_ref","children","profile","useLazyLoadQuery","hash","console","error","fetchPolicy","profileContext","useMemo","id","email","firstName","undefined","lastName","avatar","createElement","Provider","value","ProtectedWrapper","_ref2","bucketId","profileConfigContext","ErrorBoundary","fallback","window","location","href","_default","exports"],"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,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAEA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AACA,IAAAG,qBAAA,GAAAC,sBAAA,CAAAJ,OAAA;AACA,IAAAK,eAAA,GAAAD,sBAAA,CAAAJ,OAAA;AAA8C,IAAAM,sBAAA;AAAA,SAAAF,uBAAAG,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAAA,SAAAG,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,C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AAA,CAAAqC,aAAA,CAACjB,sBAAsB,QAAEE,QAAiC,CAC7C,CACc,CAAC;AAEpC,CAAC;AAAC,IAAA2B,QAAA,GAAAC,OAAA,CAAAlD,OAAA,GAEawC,gBAAgB"}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
8
|
-
var _core = require("@os-design/core");
|
|
9
|
-
var _ProfileContext = require("./ProfileContext");
|
|
10
|
-
var _ProfileConfigContext = require("./ProfileConfigContext");
|
|
11
|
-
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); }
|
|
12
|
-
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 && Object.prototype.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; }
|
|
13
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
14
|
-
const UserAvatar = props => {
|
|
15
|
-
const {
|
|
16
|
-
email,
|
|
17
|
-
firstName,
|
|
18
|
-
lastName,
|
|
19
|
-
avatar
|
|
20
|
-
} = (0, _ProfileContext.useProfile)();
|
|
21
|
-
const {
|
|
22
|
-
bucketId
|
|
23
|
-
} = (0, _ProfileConfigContext.useProfileConfig)();
|
|
24
|
-
const avatarProps = (0, _react.useMemo)(() => {
|
|
25
|
-
if (firstName || lastName) return {
|
|
26
|
-
firstName,
|
|
27
|
-
lastName
|
|
28
|
-
};
|
|
29
|
-
return {
|
|
30
|
-
firstName: email
|
|
31
|
-
};
|
|
32
|
-
}, [email, firstName, lastName]);
|
|
33
|
-
const image = (0, _react.useMemo)(() => {
|
|
34
|
-
if (!avatar) return undefined;
|
|
35
|
-
return "https://storage.yandexcloud.net/".concat(bucketId, "/users/").concat(avatar);
|
|
36
|
-
}, [avatar, bucketId]);
|
|
37
|
-
return /*#__PURE__*/_react.default.createElement(_core.Avatar, _extends({}, avatarProps, {
|
|
38
|
-
image: image
|
|
39
|
-
}, props));
|
|
40
|
-
};
|
|
41
|
-
var _default = exports.default = UserAvatar;
|
|
42
|
-
//# sourceMappingURL=UserAvatar.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"UserAvatar.js","names":["_react","_interopRequireWildcard","require","_core","_ProfileContext","_ProfileConfigContext","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","_extends","assign","bind","target","arguments","length","source","key","apply","UserAvatar","props","email","firstName","lastName","avatar","useProfile","bucketId","useProfileConfig","avatarProps","useMemo","image","undefined","concat","createElement","Avatar","_default","exports"],"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,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,eAAA,GAAAF,OAAA;AACA,IAAAG,qBAAA,GAAAH,OAAA;AAA0D,SAAAI,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAN,wBAAAM,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAK,OAAA,EAAAL,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAG,GAAA,CAAAN,CAAA,UAAAG,CAAA,CAAAI,GAAA,CAAAP,CAAA,OAAAQ,CAAA,KAAAC,SAAA,UAAAC,CAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,CAAA,IAAAd,CAAA,oBAAAc,CAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAjB,CAAA,EAAAc,CAAA,SAAAI,CAAA,GAAAR,CAAA,GAAAC,MAAA,CAAAE,wBAAA,CAAAb,CAAA,EAAAc,CAAA,UAAAI,CAAA,KAAAA,CAAA,CAAAX,GAAA,IAAAW,CAAA,CAAAC,GAAA,IAAAR,MAAA,CAAAC,cAAA,CAAAJ,CAAA,EAAAM,CAAA,E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MAAM;EACpE,CAAC,EAAE,CAACA,MAAM,EAAEE,QAAQ,CAAC,CAAC;EAEtB,oBAAO3C,MAAA,CAAAY,OAAA,CAAAsC,aAAA,CAAC/C,KAAA,CAAAgD,MAAM,EAAAxB,QAAA,KAAKkB,WAAW;IAAEE,KAAK,EAAEA;EAAM,GAAKV,KAAK,CAAG,CAAC;AAC7D,CAAC;AAAC,IAAAe,QAAA,GAAAC,OAAA,CAAAzC,OAAA,GAEawB,UAAU"}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
var _react = _interopRequireDefault(require("react"));
|
|
8
|
-
var _theming = require("@os-design/theming");
|
|
9
|
-
var _styled = _interopRequireDefault(require("@emotion/styled"));
|
|
10
|
-
var _styles = require("@os-design/styles");
|
|
11
|
-
var _UserAvatar = _interopRequireDefault(require("./UserAvatar"));
|
|
12
|
-
var _templateObject, _templateObject2;
|
|
13
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
14
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
15
|
-
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
16
|
-
const Addon = _styled.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n width: 100%;\n height: ", "em;\n min-height: ", "em;\n display: flex;\n justify-content: center;\n align-items: center;\n"])), p => p.theme.navigationSideWidth, p => p.theme.navigationSideWidth);
|
|
17
|
-
const AVATAR_SIZE = 2.5;
|
|
18
|
-
const StyledUserAvatar = (0, _styled.default)(_UserAvatar.default)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n ", ";\n cursor: pointer;\n\n @media (hover: hover) {\n &:hover,\n &:focus {\n opacity: 0.7;\n }\n ", ";\n }\n"])), _styles.resetFocusStyles, (0, _styles.transitionStyles)('opacity'));
|
|
19
|
-
const UserAvatarAddon = _ref => {
|
|
20
|
-
let {
|
|
21
|
-
onClick = () => {},
|
|
22
|
-
...rest
|
|
23
|
-
} = _ref;
|
|
24
|
-
return /*#__PURE__*/_react.default.createElement(Addon, null, /*#__PURE__*/_react.default.createElement(_theming.ThemeOverrider, {
|
|
25
|
-
overrides: theme => ({
|
|
26
|
-
avatarOnlineColorScoop: theme.navigationColorBg
|
|
27
|
-
})
|
|
28
|
-
}, /*#__PURE__*/_react.default.createElement(StyledUserAvatar, _extends({
|
|
29
|
-
online: true,
|
|
30
|
-
size: "".concat(AVATAR_SIZE, "em"),
|
|
31
|
-
tabIndex: 0,
|
|
32
|
-
role: "button",
|
|
33
|
-
onClick: onClick,
|
|
34
|
-
onKeyDown: e => {
|
|
35
|
-
if (e.key === 'Enter') onClick();
|
|
36
|
-
},
|
|
37
|
-
onMouseDown: e => e.preventDefault()
|
|
38
|
-
}, rest))));
|
|
39
|
-
};
|
|
40
|
-
var _default = exports.default = UserAvatarAddon;
|
|
41
|
-
//# sourceMappingURL=UserAvatarAddon.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"UserAvatarAddon.js","names":["_react","_interopRequireDefault","require","_theming","_styled","_styles","_UserAvatar","_templateObject","_templateObject2","obj","__esModule","default","_extends","Object","assign","bind","target","i","arguments","length","source","key","prototype","hasOwnProperty","call","apply","_taggedTemplateLiteral","strings","raw","slice","freeze","defineProperties","value","Addon","styled","div","p","theme","navigationSideWidth","AVATAR_SIZE","StyledUserAvatar","UserAvatar","resetFocusStyles","transitionStyles","UserAvatarAddon","_ref","onClick","rest","createElement","ThemeOverrider","overrides","avatarOnlineColorScoop","navigationColorBg","online","size","concat","tabIndex","role","onKeyDown","e","onMouseDown","preventDefault","_default","exports"],"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,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AAEA,IAAAI,WAAA,GAAAL,sBAAA,CAAAC,OAAA;AAAsC,IAAAK,eAAA,EAAAC,gBAAA;AAAA,SAAAP,uBAAAQ,G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KAAM,CAAC,CAAC;IAClB,GAAGC;EACL,CAAC,GAAAF,IAAA;EAAA,oBACC7C,MAAA,CAAAW,OAAA,CAAAqC,aAAA,CAACf,KAAK,qBACJjC,MAAA,CAAAW,OAAA,CAAAqC,aAAA,CAAC7C,QAAA,CAAA8C,cAAc;IACbC,SAAS,EAAGb,KAAK,KAAM;MACrBc,sBAAsB,EAAEd,KAAK,CAACe;IAChC,CAAC;EAAE,gBAEHpD,MAAA,CAAAW,OAAA,CAAAqC,aAAA,CAACR,gBAAgB,EAAA5B,QAAA;IACfyC,MAAM;IACNC,IAAI,KAAAC,MAAA,CAAKhB,WAAW,OAAK;IACzBiB,QAAQ,EAAE,CAAE;IACZC,IAAI,EAAC,QAAQ;IACbX,OAAO,EAAEA,OAAQ;IACjBY,SAAS,EAAGC,CAAC,IAAK;MAChB,IAAIA,CAAC,CAACtC,GAAG,KAAK,OAAO,EAAEyB,OAAO,CAAC,CAAC;IAClC,CAAE;IACFc,WAAW,EAAGD,CAAC,IAAKA,CAAC,CAACE,cAAc,CAAC;EAAE,GACnCd,IAAI,CACT,CACa,CACX,CAAC;AAAA,CACT;AAAC,IAAAe,QAAA,GAAAC,OAAA,CAAApD,OAAA,GAEaiC,eAAe"}
|
package/dist/cjs/components/profile/__generated__/ProfileDrawerContentSignOutMutation.graphql.js
DELETED
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
/**
|
|
8
|
-
* @generated SignedSource<<e33309fd987bdd6745cb67403591410c>>
|
|
9
|
-
* @lightSyntaxTransform
|
|
10
|
-
* @nogrep
|
|
11
|
-
*/
|
|
12
|
-
|
|
13
|
-
/* tslint:disable */
|
|
14
|
-
/* eslint-disable */
|
|
15
|
-
// @ts-nocheck
|
|
16
|
-
|
|
17
|
-
const node = function () {
|
|
18
|
-
var v0 = [{
|
|
19
|
-
"alias": null,
|
|
20
|
-
"args": null,
|
|
21
|
-
"concreteType": "StatusPayload",
|
|
22
|
-
"kind": "LinkedField",
|
|
23
|
-
"name": "signOut",
|
|
24
|
-
"plural": false,
|
|
25
|
-
"selections": [{
|
|
26
|
-
"alias": null,
|
|
27
|
-
"args": null,
|
|
28
|
-
"kind": "ScalarField",
|
|
29
|
-
"name": "ok",
|
|
30
|
-
"storageKey": null
|
|
31
|
-
}],
|
|
32
|
-
"storageKey": null
|
|
33
|
-
}];
|
|
34
|
-
return {
|
|
35
|
-
"fragment": {
|
|
36
|
-
"argumentDefinitions": [],
|
|
37
|
-
"kind": "Fragment",
|
|
38
|
-
"metadata": null,
|
|
39
|
-
"name": "ProfileDrawerContentSignOutMutation",
|
|
40
|
-
"selections": v0 /*: any*/,
|
|
41
|
-
"type": "Mutation",
|
|
42
|
-
"abstractKey": null
|
|
43
|
-
},
|
|
44
|
-
"kind": "Request",
|
|
45
|
-
"operation": {
|
|
46
|
-
"argumentDefinitions": [],
|
|
47
|
-
"kind": "Operation",
|
|
48
|
-
"name": "ProfileDrawerContentSignOutMutation",
|
|
49
|
-
"selections": v0 /*: any*/
|
|
50
|
-
},
|
|
51
|
-
"params": {
|
|
52
|
-
"cacheID": "f5241cc562af19628cf38a9731067807",
|
|
53
|
-
"id": null,
|
|
54
|
-
"metadata": {},
|
|
55
|
-
"name": "ProfileDrawerContentSignOutMutation",
|
|
56
|
-
"operationKind": "mutation",
|
|
57
|
-
"text": "mutation ProfileDrawerContentSignOutMutation {\n signOut {\n ok\n }\n}\n"
|
|
58
|
-
}
|
|
59
|
-
};
|
|
60
|
-
}();
|
|
61
|
-
node.hash = "c7ca96e9e713315606b0c22d196b6f7b";
|
|
62
|
-
var _default = exports.default = node;
|
|
63
|
-
//# sourceMappingURL=ProfileDrawerContentSignOutMutation.graphql.js.map
|
package/dist/cjs/components/profile/__generated__/ProfileDrawerContentSignOutMutation.graphql.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ProfileDrawerContentSignOutMutation.graphql.js","names":["node","v0","hash","_default","exports","default"],"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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0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
/**
|
|
8
|
-
* @generated SignedSource<<f226c7545c1a2047606c6dcebdb03728>>
|
|
9
|
-
* @lightSyntaxTransform
|
|
10
|
-
* @nogrep
|
|
11
|
-
*/
|
|
12
|
-
|
|
13
|
-
/* tslint:disable */
|
|
14
|
-
/* eslint-disable */
|
|
15
|
-
// @ts-nocheck
|
|
16
|
-
|
|
17
|
-
const node = function () {
|
|
18
|
-
var v0 = [{
|
|
19
|
-
"defaultValue": null,
|
|
20
|
-
"kind": "LocalArgument",
|
|
21
|
-
"name": "input"
|
|
22
|
-
}],
|
|
23
|
-
v1 = [{
|
|
24
|
-
"alias": null,
|
|
25
|
-
"args": [{
|
|
26
|
-
"kind": "Variable",
|
|
27
|
-
"name": "input",
|
|
28
|
-
"variableName": "input"
|
|
29
|
-
}],
|
|
30
|
-
"concreteType": "User",
|
|
31
|
-
"kind": "LinkedField",
|
|
32
|
-
"name": "updateAvatar",
|
|
33
|
-
"plural": false,
|
|
34
|
-
"selections": [{
|
|
35
|
-
"alias": null,
|
|
36
|
-
"args": null,
|
|
37
|
-
"kind": "ScalarField",
|
|
38
|
-
"name": "id",
|
|
39
|
-
"storageKey": null
|
|
40
|
-
}, {
|
|
41
|
-
"alias": null,
|
|
42
|
-
"args": null,
|
|
43
|
-
"kind": "ScalarField",
|
|
44
|
-
"name": "avatar",
|
|
45
|
-
"storageKey": null
|
|
46
|
-
}],
|
|
47
|
-
"storageKey": null
|
|
48
|
-
}];
|
|
49
|
-
return {
|
|
50
|
-
"fragment": {
|
|
51
|
-
"argumentDefinitions": v0 /*: any*/,
|
|
52
|
-
"kind": "Fragment",
|
|
53
|
-
"metadata": null,
|
|
54
|
-
"name": "ProfileDrawerContentUpdateAvatarMutation",
|
|
55
|
-
"selections": v1 /*: any*/,
|
|
56
|
-
"type": "Mutation",
|
|
57
|
-
"abstractKey": null
|
|
58
|
-
},
|
|
59
|
-
"kind": "Request",
|
|
60
|
-
"operation": {
|
|
61
|
-
"argumentDefinitions": v0 /*: any*/,
|
|
62
|
-
"kind": "Operation",
|
|
63
|
-
"name": "ProfileDrawerContentUpdateAvatarMutation",
|
|
64
|
-
"selections": v1 /*: any*/
|
|
65
|
-
},
|
|
66
|
-
"params": {
|
|
67
|
-
"cacheID": "b749732615af9f8027386d69ffb57b63",
|
|
68
|
-
"id": null,
|
|
69
|
-
"metadata": {},
|
|
70
|
-
"name": "ProfileDrawerContentUpdateAvatarMutation",
|
|
71
|
-
"operationKind": "mutation",
|
|
72
|
-
"text": "mutation ProfileDrawerContentUpdateAvatarMutation(\n $input: UpdateAvatarInput!\n) {\n updateAvatar(input: $input) {\n id\n avatar\n }\n}\n"
|
|
73
|
-
}
|
|
74
|
-
};
|
|
75
|
-
}();
|
|
76
|
-
node.hash = "cf72a6314772ed0d1f182b197c858505";
|
|
77
|
-
var _default = exports.default = node;
|
|
78
|
-
//# sourceMappingURL=ProfileDrawerContentUpdateAvatarMutation.graphql.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ProfileDrawerContentUpdateAvatarMutation.graphql.js","names":["node","v0","v1","hash","_default","exports","default"],"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":";;;;;;AA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AM,EAAE,0CAA0C;MAClD,eAAe,EAAE,UAAU;MAC3B,MAAM,EAAE;IACV;EACF,CAAC;AACD,CAAC,CAAE,CAAC;AAEHF,IAAI,CAASG,IAAI,GAAG,kCAAkC;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEzCN,IAAI"}
|
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
/**
|
|
8
|
-
* @generated SignedSource<<26e40d9447fce4f5b8a56a5ff2f1fc8e>>
|
|
9
|
-
* @lightSyntaxTransform
|
|
10
|
-
* @nogrep
|
|
11
|
-
*/
|
|
12
|
-
|
|
13
|
-
/* tslint:disable */
|
|
14
|
-
/* eslint-disable */
|
|
15
|
-
// @ts-nocheck
|
|
16
|
-
|
|
17
|
-
const node = function () {
|
|
18
|
-
var v0 = [{
|
|
19
|
-
"defaultValue": null,
|
|
20
|
-
"kind": "LocalArgument",
|
|
21
|
-
"name": "input"
|
|
22
|
-
}],
|
|
23
|
-
v1 = [{
|
|
24
|
-
"kind": "Variable",
|
|
25
|
-
"name": "input",
|
|
26
|
-
"variableName": "input"
|
|
27
|
-
}],
|
|
28
|
-
v2 = {
|
|
29
|
-
"alias": null,
|
|
30
|
-
"args": null,
|
|
31
|
-
"kind": "ScalarField",
|
|
32
|
-
"name": "firstName",
|
|
33
|
-
"storageKey": null
|
|
34
|
-
},
|
|
35
|
-
v3 = {
|
|
36
|
-
"alias": null,
|
|
37
|
-
"args": null,
|
|
38
|
-
"kind": "ScalarField",
|
|
39
|
-
"name": "lastName",
|
|
40
|
-
"storageKey": null
|
|
41
|
-
};
|
|
42
|
-
return {
|
|
43
|
-
"fragment": {
|
|
44
|
-
"argumentDefinitions": v0 /*: any*/,
|
|
45
|
-
"kind": "Fragment",
|
|
46
|
-
"metadata": null,
|
|
47
|
-
"name": "ProfileUpdateNameModalMutation",
|
|
48
|
-
"selections": [{
|
|
49
|
-
"alias": null,
|
|
50
|
-
"args": v1 /*: any*/,
|
|
51
|
-
"concreteType": "User",
|
|
52
|
-
"kind": "LinkedField",
|
|
53
|
-
"name": "updateProfile",
|
|
54
|
-
"plural": false,
|
|
55
|
-
"selections": [v2 /*: any*/, v3 /*: any*/],
|
|
56
|
-
"storageKey": null
|
|
57
|
-
}],
|
|
58
|
-
"type": "Mutation",
|
|
59
|
-
"abstractKey": null
|
|
60
|
-
},
|
|
61
|
-
"kind": "Request",
|
|
62
|
-
"operation": {
|
|
63
|
-
"argumentDefinitions": v0 /*: any*/,
|
|
64
|
-
"kind": "Operation",
|
|
65
|
-
"name": "ProfileUpdateNameModalMutation",
|
|
66
|
-
"selections": [{
|
|
67
|
-
"alias": null,
|
|
68
|
-
"args": v1 /*: any*/,
|
|
69
|
-
"concreteType": "User",
|
|
70
|
-
"kind": "LinkedField",
|
|
71
|
-
"name": "updateProfile",
|
|
72
|
-
"plural": false,
|
|
73
|
-
"selections": [v2 /*: any*/, v3 /*: any*/, {
|
|
74
|
-
"alias": null,
|
|
75
|
-
"args": null,
|
|
76
|
-
"kind": "ScalarField",
|
|
77
|
-
"name": "id",
|
|
78
|
-
"storageKey": null
|
|
79
|
-
}],
|
|
80
|
-
"storageKey": null
|
|
81
|
-
}]
|
|
82
|
-
},
|
|
83
|
-
"params": {
|
|
84
|
-
"cacheID": "f70f0aaabf917dc446c3a71cf7b4f25f",
|
|
85
|
-
"id": null,
|
|
86
|
-
"metadata": {},
|
|
87
|
-
"name": "ProfileUpdateNameModalMutation",
|
|
88
|
-
"operationKind": "mutation",
|
|
89
|
-
"text": "mutation ProfileUpdateNameModalMutation(\n $input: UpdateProfileInput!\n) {\n updateProfile(input: $input) {\n firstName\n lastName\n id\n }\n}\n"
|
|
90
|
-
}
|
|
91
|
-
};
|
|
92
|
-
}();
|
|
93
|
-
node.hash = "7264a05b6738d5417df9f1dc462486aa";
|
|
94
|
-
var _default = exports.default = node;
|
|
95
|
-
//# sourceMappingURL=ProfileUpdateNameModalMutation.graphql.js.map
|
package/dist/cjs/components/profile/__generated__/ProfileUpdateNameModalMutation.graphql.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ProfileUpdateNameModalMutation.graphql.js","names":["node","v0","v1","v2","v3","hash","_default","exports","default"],"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\nexport default node;\n"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAqBA,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,MAAM,EAAE,UAAU;MAClB,MAAM,EAAE,OAAO;MACf,cAAc,EAAE;IAClB,CAAC,CACF;IACDC,EAAE,GAAG;MACH,OAAO,EA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