@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
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@emotion/react';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import 'i18next';
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProfileButton.d.ts","sourceRoot":"","sources":["../../../src/lib/components/profile/ProfileButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAU,KAAK,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE3D,QAAA,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,CAExC,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Button } from '@os-design/core';
|
|
3
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
4
|
+
const ProfileButton = props => /*#__PURE__*/_jsx(Button, {
|
|
5
|
+
type: "ghost",
|
|
6
|
+
wide: "always",
|
|
7
|
+
...props
|
|
8
|
+
});
|
|
9
|
+
export default ProfileButton;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProfileConfigContext.d.ts","sourceRoot":"","sources":["../../../src/lib/components/profile/ProfileConfigContext.ts"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAE1C,MAAM,WAAW,kBAAkB;IACjC,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,QAAA,MAAM,aAAa,mCAEjB,CAAC;AAIH,eAAO,MAAM,gBAAgB,QAAO,kBACT,CAAC;AAE5B,eAAe,aAAa,CAAC"}
|
|
@@ -4,5 +4,4 @@ const ProfileConfig = /*#__PURE__*/React.createContext({
|
|
|
4
4
|
});
|
|
5
5
|
ProfileConfig.displayName = 'ProfileConfig';
|
|
6
6
|
export const useProfileConfig = () => useContext(ProfileConfig);
|
|
7
|
-
export default ProfileConfig;
|
|
8
|
-
//# sourceMappingURL=ProfileConfigContext.js.map
|
|
7
|
+
export default ProfileConfig;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProfileContext.d.ts","sourceRoot":"","sources":["../../../src/lib/components/profile/ProfileContext.ts"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAE1C,MAAM,WAAW,mBAAmB;IAClC,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,QAAA,MAAM,cAAc,oCAGlB,CAAC;AAIH,eAAO,MAAM,UAAU,QAAO,mBAAiD,CAAC;AAEhF,eAAe,cAAc,CAAC"}
|
|
@@ -5,5 +5,4 @@ const ProfileContext = /*#__PURE__*/React.createContext({
|
|
|
5
5
|
});
|
|
6
6
|
ProfileContext.displayName = 'ProfileContext';
|
|
7
7
|
export const useProfile = () => useContext(ProfileContext);
|
|
8
|
-
export default ProfileContext;
|
|
9
|
-
//# sourceMappingURL=ProfileContext.js.map
|
|
8
|
+
export default ProfileContext;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { DrawerProps } from '@os-design/core';
|
|
3
|
-
import { ProfileDrawerContentProps } from './ProfileDrawerContent';
|
|
2
|
+
import { type DrawerProps } from '@os-design/core';
|
|
3
|
+
import { type ProfileDrawerContentProps } from './ProfileDrawerContent';
|
|
4
4
|
export type ProfileDrawerProps = ProfileDrawerContentProps & DrawerProps;
|
|
5
5
|
declare const ProfileDrawer: React.FC<ProfileDrawerProps>;
|
|
6
6
|
export default ProfileDrawer;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProfileDrawer.d.ts","sourceRoot":"","sources":["../../../src/lib/components/profile/ProfileDrawer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAyB,MAAM,OAAO,CAAC;AAC9C,OAAO,EAAU,KAAK,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE3D,OAAO,EAAE,KAAK,yBAAyB,EAAE,MAAM,wBAAwB,CAAC;AAKxE,MAAM,MAAM,kBAAkB,GAAG,yBAAyB,GAAG,WAAW,CAAC;AAQzE,QAAA,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAY/C,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import React, { lazy, Suspense } from 'react';
|
|
2
|
+
import { Drawer } from '@os-design/core';
|
|
3
|
+
import styled from '@emotion/styled';
|
|
4
|
+
import MainLoader from '../shared/MainLoader';
|
|
5
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
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__*/_jsx(StyledDrawer, {
|
|
17
|
+
placement: "right",
|
|
18
|
+
width: "15em",
|
|
19
|
+
...rest,
|
|
20
|
+
children: /*#__PURE__*/_jsx(Suspense, {
|
|
21
|
+
fallback: /*#__PURE__*/_jsx(MainLoader, {}),
|
|
22
|
+
children: /*#__PURE__*/_jsx(LazyProfileDrawerContent, {
|
|
23
|
+
actions: actions,
|
|
24
|
+
children: children
|
|
25
|
+
})
|
|
26
|
+
})
|
|
27
|
+
});
|
|
28
|
+
export default ProfileDrawer;
|
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
export interface ProfileDrawerContentProps {
|
|
3
|
+
/**
|
|
4
|
+
* Additional actions placed under the avatar.
|
|
5
|
+
* @default undefined
|
|
6
|
+
*/
|
|
3
7
|
actions?: React.ReactNode;
|
|
8
|
+
/**
|
|
9
|
+
* The children.
|
|
10
|
+
*/
|
|
4
11
|
children?: React.ReactNode;
|
|
5
12
|
}
|
|
6
13
|
declare const ProfileDrawerContent: React.FC<ProfileDrawerContentProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProfileDrawerContent.d.ts","sourceRoot":"","sources":["../../../src/lib/components/profile/ProfileDrawerContent.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAiD,MAAM,OAAO,CAAC;AAYtE,MAAM,WAAW,yBAAyB;IACxC;;;OAGG;IACH,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AA+MD,QAAA,MAAM,oBAAoB,EAAE,KAAK,CAAC,EAAE,CAAC,yBAAyB,CAwC7D,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
|
|
@@ -4,13 +4,14 @@ import { ThemeSwitcher, message } from '@os-design/core';
|
|
|
4
4
|
import { clr } from '@os-design/theming';
|
|
5
5
|
import React, { useCallback, useMemo, useRef, useState } from 'react';
|
|
6
6
|
import { useTranslation } from 'react-i18next';
|
|
7
|
-
import { useMutation } from 'react-relay
|
|
7
|
+
import { useMutation } from 'react-relay';
|
|
8
8
|
import getError from '../../utils/getError';
|
|
9
9
|
import ProfileButton from './ProfileButton';
|
|
10
10
|
import { useProfile } from './ProfileContext';
|
|
11
11
|
import ProfileUpdateNameModal from './ProfileUpdateNameModal';
|
|
12
12
|
import ProfileUpdatePasswordModal from './ProfileUpdatePasswordModal';
|
|
13
13
|
import UserAvatar from './UserAvatar';
|
|
14
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
14
15
|
const AvatarContainer = styled.div`
|
|
15
16
|
display: flex;
|
|
16
17
|
flex-direction: column;
|
|
@@ -62,10 +63,11 @@ const DeleteAvatarButton = () => {
|
|
|
62
63
|
}
|
|
63
64
|
});
|
|
64
65
|
}, [commit, t]);
|
|
65
|
-
return /*#__PURE__*/
|
|
66
|
+
return /*#__PURE__*/_jsx(ProfileButton, {
|
|
66
67
|
loading: loading,
|
|
67
|
-
onClick: handler
|
|
68
|
-
|
|
68
|
+
onClick: handler,
|
|
69
|
+
children: t('profile:deleteAvatar')
|
|
70
|
+
});
|
|
69
71
|
};
|
|
70
72
|
const UpdateAvatarButton = ({
|
|
71
73
|
hasAvatar
|
|
@@ -96,19 +98,22 @@ const UpdateAvatarButton = ({
|
|
|
96
98
|
}
|
|
97
99
|
});
|
|
98
100
|
}, [commit, t]);
|
|
99
|
-
return /*#__PURE__*/
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
101
|
+
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
102
|
+
children: [/*#__PURE__*/_jsx(ProfileButton, {
|
|
103
|
+
loading: loading,
|
|
104
|
+
onClick: () => {
|
|
105
|
+
if (!fileInputRef.current) return;
|
|
106
|
+
fileInputRef.current.value = '';
|
|
107
|
+
fileInputRef.current.click();
|
|
108
|
+
},
|
|
109
|
+
children: t(`profile:${hasAvatar ? 'changeAvatar' : 'setAvatar'}`)
|
|
110
|
+
}), /*#__PURE__*/_jsx(HiddenInput, {
|
|
111
|
+
type: "file",
|
|
112
|
+
accept: "image/jpeg,image/png,image/webp",
|
|
113
|
+
onChange: handler,
|
|
114
|
+
ref: fileInputRef
|
|
115
|
+
})]
|
|
116
|
+
});
|
|
112
117
|
};
|
|
113
118
|
const UpdateNameButton = ({
|
|
114
119
|
hasName
|
|
@@ -117,24 +122,30 @@ const UpdateNameButton = ({
|
|
|
117
122
|
t
|
|
118
123
|
} = useTranslation(['profile']);
|
|
119
124
|
const [modalVisible, setModalVisible] = useState(false);
|
|
120
|
-
return /*#__PURE__*/
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
125
|
+
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
126
|
+
children: [/*#__PURE__*/_jsx(ProfileButton, {
|
|
127
|
+
onClick: () => setModalVisible(true),
|
|
128
|
+
children: t(`profile:${hasName ? 'changeName' : 'setName'}`)
|
|
129
|
+
}), /*#__PURE__*/_jsx(ProfileUpdateNameModal, {
|
|
130
|
+
visible: modalVisible,
|
|
131
|
+
onClose: () => setModalVisible(false)
|
|
132
|
+
})]
|
|
133
|
+
});
|
|
126
134
|
};
|
|
127
135
|
const ChangePasswordButton = () => {
|
|
128
136
|
const {
|
|
129
137
|
t
|
|
130
138
|
} = useTranslation(['profile']);
|
|
131
139
|
const [modalVisible, setModalVisible] = useState(false);
|
|
132
|
-
return /*#__PURE__*/
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
140
|
+
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
141
|
+
children: [/*#__PURE__*/_jsx(ProfileButton, {
|
|
142
|
+
onClick: () => setModalVisible(true),
|
|
143
|
+
children: t('profile:changePassword')
|
|
144
|
+
}), /*#__PURE__*/_jsx(ProfileUpdatePasswordModal, {
|
|
145
|
+
visible: modalVisible,
|
|
146
|
+
onClose: () => setModalVisible(false)
|
|
147
|
+
})]
|
|
148
|
+
});
|
|
138
149
|
};
|
|
139
150
|
const SignOutButton = () => {
|
|
140
151
|
const {
|
|
@@ -150,11 +161,12 @@ const SignOutButton = () => {
|
|
|
150
161
|
}
|
|
151
162
|
});
|
|
152
163
|
}, [commit]);
|
|
153
|
-
return /*#__PURE__*/
|
|
164
|
+
return /*#__PURE__*/_jsx(ProfileButton, {
|
|
154
165
|
danger: true,
|
|
155
166
|
loading: loading,
|
|
156
|
-
onClick: handler
|
|
157
|
-
|
|
167
|
+
onClick: handler,
|
|
168
|
+
children: t('profile:signOut')
|
|
169
|
+
});
|
|
158
170
|
};
|
|
159
171
|
const ProfileDrawerContent = ({
|
|
160
172
|
actions,
|
|
@@ -167,13 +179,26 @@ const ProfileDrawerContent = ({
|
|
|
167
179
|
avatar
|
|
168
180
|
} = useProfile();
|
|
169
181
|
const fullName = useMemo(() => [firstName, lastName].filter(i => i).join(' '), [firstName, lastName]);
|
|
170
|
-
return /*#__PURE__*/
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
182
|
+
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
183
|
+
children: [/*#__PURE__*/_jsxs(AvatarContainer, {
|
|
184
|
+
children: [/*#__PURE__*/_jsx(UserAvatar, {
|
|
185
|
+
size: "10em"
|
|
186
|
+
}), /*#__PURE__*/_jsxs(UserContent, {
|
|
187
|
+
children: [fullName && /*#__PURE__*/_jsx(FullName, {
|
|
188
|
+
children: fullName
|
|
189
|
+
}), /*#__PURE__*/_jsx(Email, {
|
|
190
|
+
children: email
|
|
191
|
+
})]
|
|
192
|
+
})]
|
|
193
|
+
}), /*#__PURE__*/_jsxs(ActionsContainer, {
|
|
194
|
+
children: [avatar && /*#__PURE__*/_jsx(DeleteAvatarButton, {}), /*#__PURE__*/_jsx(UpdateAvatarButton, {
|
|
195
|
+
hasAvatar: !!avatar
|
|
196
|
+
}), /*#__PURE__*/_jsx(UpdateNameButton, {
|
|
197
|
+
hasName: !!fullName
|
|
198
|
+
}), /*#__PURE__*/_jsx(ChangePasswordButton, {}), actions, /*#__PURE__*/_jsx(SignOutButton, {}), children]
|
|
199
|
+
}), /*#__PURE__*/_jsx(Footer, {
|
|
200
|
+
children: /*#__PURE__*/_jsx(ThemeSwitcher, {})
|
|
201
|
+
})]
|
|
202
|
+
});
|
|
177
203
|
};
|
|
178
|
-
export default ProfileDrawerContent;
|
|
179
|
-
//# sourceMappingURL=ProfileDrawerContent.js.map
|
|
204
|
+
export default ProfileDrawerContent;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProfileNavigationItem.d.ts","sourceRoot":"","sources":["../../../src/lib/components/profile/ProfileNavigationItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAkB,KAAK,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAI3E,MAAM,WAAW,0BACf,SAAQ,OAAO,CAAC,mBAAmB,CAAC;IACpC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,QAAA,MAAM,qBAAqB,EAAE,KAAK,CAAC,EAAE,CAAC,0BAA0B,CAsB/D,CAAC;AAEF,eAAe,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { useIsMinWidth } from '@os-design/media';
|
|
3
|
+
import { NavigationItem } from '@os-design/core';
|
|
4
|
+
import { useTranslation } from 'react-i18next';
|
|
5
|
+
import ProfileIcon from '../shared/icons/ProfileIcon';
|
|
6
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
|
+
const ProfileNavigationItem = ({
|
|
8
|
+
onClick = () => {},
|
|
9
|
+
...rest
|
|
10
|
+
}) => {
|
|
11
|
+
const {
|
|
12
|
+
t
|
|
13
|
+
} = useTranslation(['profile']);
|
|
14
|
+
const isMinMd = useIsMinWidth('md');
|
|
15
|
+
if (isMinMd) return null;
|
|
16
|
+
return /*#__PURE__*/_jsx(NavigationItem, {
|
|
17
|
+
href: "#" // To make focusable
|
|
18
|
+
,
|
|
19
|
+
icon: /*#__PURE__*/_jsx(ProfileIcon, {}),
|
|
20
|
+
onClick: onClick,
|
|
21
|
+
onKeyDown: e => {
|
|
22
|
+
if (e.key === 'Enter') onClick();
|
|
23
|
+
},
|
|
24
|
+
...rest,
|
|
25
|
+
children: t('profile:menu')
|
|
26
|
+
});
|
|
27
|
+
};
|
|
28
|
+
export default ProfileNavigationItem;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProfileUpdateNameModal.d.ts","sourceRoot":"","sources":["../../../src/lib/components/profile/ProfileUpdateNameModal.tsx"],"names":[],"mappings":"AAGA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAa/D,UAAU,2BAA2B;IACnC,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED,QAAA,MAAM,sBAAsB,EAAE,KAAK,CAAC,EAAE,CAAC,2BAA2B,CA6FjE,CAAC;AAEF,eAAe,sBAAsB,CAAC"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
var _ProfileUpdateNameModalMutation;
|
|
2
|
-
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); }
|
|
3
2
|
import { Form, FormItem, Input, message, Modal } from '@os-design/core';
|
|
4
3
|
import { FormProvider, useForm } from '@os-design/form';
|
|
5
4
|
import React, { useCallback, useEffect, useMemo } from 'react';
|
|
6
5
|
import { useTranslation } from 'react-i18next';
|
|
7
|
-
import { useMutation } from 'react-relay
|
|
6
|
+
import { useMutation } from 'react-relay';
|
|
8
7
|
import handleFormErrors from '../../utils/handleFormErrors';
|
|
9
8
|
import FormError from '../shared/FormError';
|
|
10
9
|
import { useProfile } from './ProfileContext';
|
|
10
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
11
11
|
const ProfileUpdateNameModal = ({
|
|
12
12
|
visible,
|
|
13
13
|
onClose
|
|
@@ -53,38 +53,45 @@ const ProfileUpdateNameModal = ({
|
|
|
53
53
|
label: t('profile:updateNameModal.lastName.label'),
|
|
54
54
|
placeholder: t('profile:updateNameModal.lastName.placeholder')
|
|
55
55
|
}), [t]);
|
|
56
|
-
return /*#__PURE__*/
|
|
56
|
+
return /*#__PURE__*/_jsx(Modal, {
|
|
57
57
|
title: t('profile:updateNameModal.title'),
|
|
58
58
|
visible: visible,
|
|
59
59
|
okText: t('profile:update'),
|
|
60
60
|
okLoading: loading,
|
|
61
61
|
onOk: onSubmit,
|
|
62
|
-
onClose: onClose
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
62
|
+
onClose: onClose,
|
|
63
|
+
children: /*#__PURE__*/_jsx(FormProvider, {
|
|
64
|
+
form: form,
|
|
65
|
+
children: /*#__PURE__*/_jsxs(Form, {
|
|
66
|
+
children: [/*#__PURE__*/_jsx(Field, {
|
|
67
|
+
name: "firstName",
|
|
68
|
+
data: firstNameData,
|
|
69
|
+
render: (props, {
|
|
70
|
+
error
|
|
71
|
+
}, data) => /*#__PURE__*/_jsx(FormItem, {
|
|
72
|
+
label: data.label,
|
|
73
|
+
error: error,
|
|
74
|
+
children: /*#__PURE__*/_jsx(Input, {
|
|
75
|
+
placeholder: data.placeholder,
|
|
76
|
+
...props
|
|
77
|
+
})
|
|
78
|
+
})
|
|
79
|
+
}), /*#__PURE__*/_jsx(Field, {
|
|
80
|
+
name: "lastName",
|
|
81
|
+
data: lastNameData,
|
|
82
|
+
render: (props, {
|
|
83
|
+
error
|
|
84
|
+
}, data) => /*#__PURE__*/_jsx(FormItem, {
|
|
85
|
+
label: data.label,
|
|
86
|
+
error: error,
|
|
87
|
+
children: /*#__PURE__*/_jsx(Input, {
|
|
88
|
+
placeholder: data.placeholder,
|
|
89
|
+
...props
|
|
90
|
+
})
|
|
91
|
+
})
|
|
92
|
+
}), /*#__PURE__*/_jsx(FormError, {})]
|
|
93
|
+
})
|
|
94
|
+
})
|
|
95
|
+
});
|
|
88
96
|
};
|
|
89
|
-
export default ProfileUpdateNameModal;
|
|
90
|
-
//# sourceMappingURL=ProfileUpdateNameModal.js.map
|
|
97
|
+
export default ProfileUpdateNameModal;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProfileUpdatePasswordModal.d.ts","sourceRoot":"","sources":["../../../src/lib/components/profile/ProfileUpdatePasswordModal.tsx"],"names":[],"mappings":"AAGA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAY/D,UAAU,+BAA+B;IACvC,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED,QAAA,MAAM,0BAA0B,EAAE,KAAK,CAAC,EAAE,CAAC,+BAA+B,CA0GzE,CAAC;AAEF,eAAe,0BAA0B,CAAC"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
var _ProfileUpdatePasswordModalMutation;
|
|
2
|
-
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); }
|
|
3
2
|
import { Form, FormItem, InputPassword, message, Modal } from '@os-design/core';
|
|
4
3
|
import { FormProvider, useForm } from '@os-design/form';
|
|
5
4
|
import React, { useCallback, useEffect, useMemo } from 'react';
|
|
6
5
|
import { useTranslation } from 'react-i18next';
|
|
7
|
-
import { useMutation } from 'react-relay
|
|
6
|
+
import { useMutation } from 'react-relay';
|
|
8
7
|
import handleFormErrors from '../../utils/handleFormErrors';
|
|
9
8
|
import FormError from '../shared/FormError';
|
|
9
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
10
10
|
const ProfileUpdatePasswordModal = ({
|
|
11
11
|
visible,
|
|
12
12
|
onClose
|
|
@@ -51,40 +51,47 @@ const ProfileUpdatePasswordModal = ({
|
|
|
51
51
|
returnObjects: true
|
|
52
52
|
})
|
|
53
53
|
}), [t]);
|
|
54
|
-
return /*#__PURE__*/
|
|
54
|
+
return /*#__PURE__*/_jsx(Modal, {
|
|
55
55
|
title: t('profile:updatePasswordModal.title'),
|
|
56
56
|
visible: visible,
|
|
57
57
|
okText: t('profile:updatePasswordModal.button'),
|
|
58
58
|
okLoading: loading,
|
|
59
59
|
onOk: onSubmit,
|
|
60
|
-
onClose: onClose
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
60
|
+
onClose: onClose,
|
|
61
|
+
children: /*#__PURE__*/_jsx(FormProvider, {
|
|
62
|
+
form: form,
|
|
63
|
+
children: /*#__PURE__*/_jsxs(Form, {
|
|
64
|
+
children: [/*#__PURE__*/_jsx(Field, {
|
|
65
|
+
name: "currentPassword",
|
|
66
|
+
data: currentPasswordData,
|
|
67
|
+
render: (props, {
|
|
68
|
+
error
|
|
69
|
+
}, data) => /*#__PURE__*/_jsx(FormItem, {
|
|
70
|
+
label: data.label,
|
|
71
|
+
error: error,
|
|
72
|
+
children: /*#__PURE__*/_jsx(InputPassword, {
|
|
73
|
+
placeholder: data.placeholder,
|
|
74
|
+
...props
|
|
75
|
+
})
|
|
76
|
+
})
|
|
77
|
+
}), /*#__PURE__*/_jsx(Field, {
|
|
78
|
+
name: "password",
|
|
79
|
+
data: passwordData,
|
|
80
|
+
render: (props, {
|
|
81
|
+
error
|
|
82
|
+
}, data) => /*#__PURE__*/_jsx(FormItem, {
|
|
83
|
+
label: data.label,
|
|
84
|
+
error: error,
|
|
85
|
+
children: /*#__PURE__*/_jsx(InputPassword, {
|
|
86
|
+
placeholder: data.placeholder,
|
|
87
|
+
showStrengthMeter: true,
|
|
88
|
+
strengthNames: data.strengthNames,
|
|
89
|
+
...props
|
|
90
|
+
})
|
|
91
|
+
})
|
|
92
|
+
}), /*#__PURE__*/_jsx(FormError, {})]
|
|
93
|
+
})
|
|
94
|
+
})
|
|
95
|
+
});
|
|
88
96
|
};
|
|
89
|
-
export default ProfileUpdatePasswordModal;
|
|
90
|
-
//# sourceMappingURL=ProfileUpdatePasswordModal.js.map
|
|
97
|
+
export default ProfileUpdatePasswordModal;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProtectedWrapper.d.ts","sourceRoot":"","sources":["../../../src/lib/components/profile/ProtectedWrapper.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkB,MAAM,OAAO,CAAC;AAuDvC,MAAM,WAAW,qBAAqB;IACpC,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED,QAAA,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,qBAAqB,CAkBrD,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
var _ProtectedWrapperQuery;
|
|
2
2
|
import React, { useMemo } from 'react';
|
|
3
|
-
import { useLazyLoadQuery } from 'react-relay
|
|
3
|
+
import { useLazyLoadQuery } from 'react-relay';
|
|
4
4
|
import { ErrorBoundary } from '@os-design/utils';
|
|
5
5
|
import ProfileConfigContext from './ProfileConfigContext';
|
|
6
6
|
import ProfileContext from './ProfileContext';
|
|
7
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
8
|
const ProtectedWrapperLoader = ({
|
|
8
9
|
children
|
|
9
10
|
}) => {
|
|
@@ -19,9 +20,10 @@ const ProtectedWrapperLoader = ({
|
|
|
19
20
|
lastName: profile.lastName || undefined,
|
|
20
21
|
avatar: profile.avatar || undefined
|
|
21
22
|
}), [profile.avatar, profile.email, profile.firstName, profile.id, profile.lastName]);
|
|
22
|
-
return /*#__PURE__*/
|
|
23
|
-
value: profileContext
|
|
24
|
-
|
|
23
|
+
return /*#__PURE__*/_jsx(ProfileContext.Provider, {
|
|
24
|
+
value: profileContext,
|
|
25
|
+
children: children
|
|
26
|
+
});
|
|
25
27
|
};
|
|
26
28
|
const ProtectedWrapper = ({
|
|
27
29
|
bucketId,
|
|
@@ -30,14 +32,17 @@ const ProtectedWrapper = ({
|
|
|
30
32
|
const profileConfigContext = useMemo(() => ({
|
|
31
33
|
bucketId
|
|
32
34
|
}), [bucketId]);
|
|
33
|
-
return /*#__PURE__*/
|
|
34
|
-
value: profileConfigContext
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
35
|
+
return /*#__PURE__*/_jsx(ProfileConfigContext.Provider, {
|
|
36
|
+
value: profileConfigContext,
|
|
37
|
+
children: /*#__PURE__*/_jsx(ErrorBoundary, {
|
|
38
|
+
fallback: () => {
|
|
39
|
+
window.location.href = '/auth/';
|
|
40
|
+
return null;
|
|
41
|
+
},
|
|
42
|
+
children: /*#__PURE__*/_jsx(ProtectedWrapperLoader, {
|
|
43
|
+
children: children
|
|
44
|
+
})
|
|
45
|
+
})
|
|
46
|
+
});
|
|
41
47
|
};
|
|
42
|
-
export default ProtectedWrapper;
|
|
43
|
-
//# sourceMappingURL=ProtectedWrapper.js.map
|
|
48
|
+
export default ProtectedWrapper;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UserAvatar.d.ts","sourceRoot":"","sources":["../../../src/lib/components/profile/UserAvatar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkB,MAAM,OAAO,CAAC;AACvC,OAAO,EAAU,KAAK,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAI3D,QAAA,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,CAerC,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
1
|
import React, { useMemo } from 'react';
|
|
3
2
|
import { Avatar } from '@os-design/core';
|
|
4
3
|
import { useProfile } from './ProfileContext';
|
|
5
4
|
import { useProfileConfig } from './ProfileConfigContext';
|
|
5
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
6
|
const UserAvatar = props => {
|
|
7
7
|
const {
|
|
8
8
|
email,
|
|
@@ -26,9 +26,10 @@ const UserAvatar = props => {
|
|
|
26
26
|
if (!avatar) return undefined;
|
|
27
27
|
return `https://storage.yandexcloud.net/${bucketId}/users/${avatar}`;
|
|
28
28
|
}, [avatar, bucketId]);
|
|
29
|
-
return /*#__PURE__*/
|
|
30
|
-
|
|
31
|
-
|
|
29
|
+
return /*#__PURE__*/_jsx(Avatar, {
|
|
30
|
+
...avatarProps,
|
|
31
|
+
image: image,
|
|
32
|
+
...props
|
|
33
|
+
});
|
|
32
34
|
};
|
|
33
|
-
export default UserAvatar;
|
|
34
|
-
//# sourceMappingURL=UserAvatar.js.map
|
|
35
|
+
export default UserAvatar;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UserAvatarAddon.d.ts","sourceRoot":"","sources":["../../../src/lib/components/profile/UserAvatarAddon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAGnD,MAAM,WAAW,oBAAqB,SAAQ,WAAW;IACvD,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AA0BD,QAAA,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CAwBnD,CAAC;AAEF,eAAe,eAAe,CAAC"}
|