@os-team/profile 1.0.46 → 1.0.48
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/README.md +1 -1
- package/dist/cjs/{emotion.d.js → @types/emotion.d.js} +0 -0
- package/dist/cjs/@types/emotion.d.js.map +1 -0
- package/dist/cjs/@types/i18next.d.js +4 -0
- package/dist/cjs/@types/i18next.d.js.map +1 -0
- package/dist/cjs/components/profile/ProfileButton.js +0 -6
- package/dist/cjs/components/profile/ProfileButton.js.map +1 -1
- package/dist/cjs/components/profile/ProfileConfigContext.js +0 -8
- package/dist/cjs/components/profile/ProfileConfigContext.js.map +1 -1
- package/dist/cjs/components/profile/ProfileContext.js +0 -8
- package/dist/cjs/components/profile/ProfileContext.js.map +1 -1
- package/dist/cjs/components/profile/ProfileDrawer.js +2 -20
- package/dist/cjs/components/profile/ProfileDrawer.js.map +1 -1
- package/dist/cjs/components/profile/ProfileDrawerContent.js +30 -86
- package/dist/cjs/components/profile/ProfileDrawerContent.js.map +1 -1
- package/dist/cjs/components/profile/ProfileNavigationItem.js +4 -18
- package/dist/cjs/components/profile/ProfileNavigationItem.js.map +1 -1
- package/dist/cjs/components/profile/ProfileUpdateNameForm.js +3 -14
- package/dist/cjs/components/profile/ProfileUpdateNameForm.js.map +1 -1
- package/dist/cjs/components/profile/ProfileUpdateNameModal.js +21 -49
- package/dist/cjs/components/profile/ProfileUpdateNameModal.js.map +1 -1
- package/dist/cjs/components/profile/ProfileUpdatePasswordForm.js +3 -14
- package/dist/cjs/components/profile/ProfileUpdatePasswordForm.js.map +1 -1
- package/dist/cjs/components/profile/ProfileUpdatePasswordModal.js +19 -45
- package/dist/cjs/components/profile/ProfileUpdatePasswordModal.js.map +1 -1
- package/dist/cjs/components/profile/ProtectedWrapper.js +4 -19
- package/dist/cjs/components/profile/ProtectedWrapper.js.map +1 -1
- package/dist/cjs/components/profile/UserAvatar.js +5 -17
- package/dist/cjs/components/profile/UserAvatar.js.map +1 -1
- package/dist/cjs/components/profile/UserAvatarAddon.js +2 -19
- package/dist/cjs/components/profile/UserAvatarAddon.js.map +1 -1
- package/dist/cjs/components/profile/__generated__/ProfileDrawerContentSignOutMutation.graphql.js +4 -9
- package/dist/cjs/components/profile/__generated__/ProfileDrawerContentSignOutMutation.graphql.js.map +1 -1
- package/dist/cjs/components/profile/__generated__/ProfileDrawerContentUpdateAvatarMutation.graphql.js +33 -42
- package/dist/cjs/components/profile/__generated__/ProfileDrawerContentUpdateAvatarMutation.graphql.js.map +1 -1
- package/dist/cjs/components/profile/__generated__/ProfileDrawerSignOutMutation.graphql.js +4 -9
- package/dist/cjs/components/profile/__generated__/ProfileDrawerSignOutMutation.graphql.js.map +1 -1
- package/dist/cjs/components/profile/__generated__/ProfileDrawerUpdateAvatarMutation.graphql.js +33 -42
- package/dist/cjs/components/profile/__generated__/ProfileDrawerUpdateAvatarMutation.graphql.js.map +1 -1
- package/dist/cjs/components/profile/__generated__/ProfileUpdateNameModalMutation.graphql.js +31 -48
- package/dist/cjs/components/profile/__generated__/ProfileUpdateNameModalMutation.graphql.js.map +1 -1
- package/dist/cjs/components/profile/__generated__/ProfileUpdatePasswordModalMutation.graphql.js +27 -36
- package/dist/cjs/components/profile/__generated__/ProfileUpdatePasswordModalMutation.graphql.js.map +1 -1
- package/dist/cjs/components/profile/__generated__/ProtectedWrapperQuery.graphql.js +4 -9
- package/dist/cjs/components/profile/__generated__/ProtectedWrapperQuery.graphql.js.map +1 -1
- package/dist/cjs/components/session/SessionDrawer.js +2 -20
- package/dist/cjs/components/session/SessionDrawer.js.map +1 -1
- package/dist/cjs/components/session/SessionDrawerContent.js +0 -15
- package/dist/cjs/components/session/SessionDrawerContent.js.map +1 -1
- package/dist/cjs/components/session/SessionList.js +6 -39
- package/dist/cjs/components/session/SessionList.js.map +1 -1
- package/dist/cjs/components/session/SessionListItem.js +22 -84
- package/dist/cjs/components/session/SessionListItem.js.map +1 -1
- package/dist/cjs/components/session/SessionListSkeleton.js +2 -15
- package/dist/cjs/components/session/SessionListSkeleton.js.map +1 -1
- package/dist/cjs/components/session/__generated__/SessionDrawerContentQuery.graphql.js +1 -2
- package/dist/cjs/components/session/__generated__/SessionDrawerContentQuery.graphql.js.map +1 -1
- package/dist/cjs/components/session/__generated__/SessionListDestroyAllOtherSessionsMutation.graphql.js +4 -9
- package/dist/cjs/components/session/__generated__/SessionListDestroyAllOtherSessionsMutation.graphql.js.map +1 -1
- package/dist/cjs/components/session/__generated__/SessionListItemDestroySessionMutation.graphql.js +27 -36
- package/dist/cjs/components/session/__generated__/SessionListItemDestroySessionMutation.graphql.js.map +1 -1
- package/dist/cjs/components/session/__generated__/SessionListItem_session.graphql.js +1 -2
- package/dist/cjs/components/session/__generated__/SessionListItem_session.graphql.js.map +1 -1
- package/dist/cjs/components/session/__generated__/SessionListRefetchQuery.graphql.js +1 -2
- package/dist/cjs/components/session/__generated__/SessionListRefetchQuery.graphql.js.map +1 -1
- package/dist/cjs/components/session/__generated__/SessionList_sessions.graphql.js +1 -2
- package/dist/cjs/components/session/__generated__/SessionList_sessions.graphql.js.map +1 -1
- package/dist/cjs/components/session/formatDate.js +0 -2
- package/dist/cjs/components/session/formatDate.js.map +1 -1
- package/dist/cjs/components/session/getLastSeen.js +0 -2
- package/dist/cjs/components/session/getLastSeen.js.map +1 -1
- package/dist/cjs/components/shared/ButtonUpdate.js +2 -9
- package/dist/cjs/components/shared/ButtonUpdate.js.map +1 -1
- package/dist/cjs/components/shared/ErrorResult.js +4 -17
- package/dist/cjs/components/shared/ErrorResult.js.map +1 -1
- package/dist/cjs/components/shared/MainLoader.js +0 -10
- package/dist/cjs/components/shared/MainLoader.js.map +1 -1
- package/dist/cjs/components/shared/icons/AndroidIcon.js +0 -6
- package/dist/cjs/components/shared/icons/AndroidIcon.js.map +1 -1
- package/dist/cjs/components/shared/icons/AppleIcon.js +0 -6
- package/dist/cjs/components/shared/icons/AppleIcon.js.map +1 -1
- package/dist/cjs/components/shared/icons/BrowserIcon.js +0 -6
- package/dist/cjs/components/shared/icons/BrowserIcon.js.map +1 -1
- package/dist/cjs/components/shared/icons/ProfileIcon.js +0 -6
- package/dist/cjs/components/shared/icons/ProfileIcon.js.map +1 -1
- package/dist/cjs/components/shared/icons/UnknownDeviceIcon.js +0 -6
- package/dist/cjs/components/shared/icons/UnknownDeviceIcon.js.map +1 -1
- package/dist/cjs/index.js +0 -19
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/utils/getUserFullName.js +2 -4
- package/dist/cjs/utils/getUserFullName.js.map +1 -1
- package/dist/esm/{emotion.d.js → @types/emotion.d.js} +0 -0
- package/dist/esm/@types/emotion.d.js.map +1 -0
- package/dist/esm/@types/i18next.d.js +2 -0
- package/dist/esm/@types/i18next.d.js.map +1 -0
- package/dist/esm/components/profile/ProfileButton.js +0 -3
- package/dist/esm/components/profile/ProfileButton.js.map +1 -1
- package/dist/esm/components/profile/ProfileConfigContext.js.map +1 -1
- package/dist/esm/components/profile/ProfileContext.js.map +1 -1
- package/dist/esm/components/profile/ProfileDrawer.js +0 -3
- package/dist/esm/components/profile/ProfileDrawer.js.map +1 -1
- package/dist/esm/components/profile/ProfileDrawerContent.js +5 -16
- package/dist/esm/components/profile/ProfileDrawerContent.js.map +1 -1
- package/dist/esm/components/profile/ProfileNavigationItem.js +1 -4
- package/dist/esm/components/profile/ProfileNavigationItem.js.map +1 -1
- package/dist/esm/components/profile/ProfileUpdateNameForm.js +1 -4
- package/dist/esm/components/profile/ProfileUpdateNameForm.js.map +1 -1
- package/dist/esm/components/profile/ProfileUpdateNameModal.js +3 -5
- package/dist/esm/components/profile/ProfileUpdateNameModal.js.map +1 -1
- package/dist/esm/components/profile/ProfileUpdatePasswordForm.js +1 -4
- package/dist/esm/components/profile/ProfileUpdatePasswordForm.js.map +1 -1
- package/dist/esm/components/profile/ProfileUpdatePasswordModal.js +3 -5
- package/dist/esm/components/profile/ProfileUpdatePasswordModal.js.map +1 -1
- package/dist/esm/components/profile/ProtectedWrapper.js +0 -4
- package/dist/esm/components/profile/ProtectedWrapper.js.map +1 -1
- package/dist/esm/components/profile/UserAvatar.js +0 -3
- package/dist/esm/components/profile/UserAvatar.js.map +1 -1
- package/dist/esm/components/profile/UserAvatarAddon.js +0 -3
- package/dist/esm/components/profile/UserAvatarAddon.js.map +1 -1
- package/dist/esm/components/profile/__generated__/ProfileDrawerContentSignOutMutation.graphql.js +4 -8
- package/dist/esm/components/profile/__generated__/ProfileDrawerContentSignOutMutation.graphql.js.map +1 -1
- package/dist/esm/components/profile/__generated__/ProfileDrawerContentUpdateAvatarMutation.graphql.js +33 -41
- package/dist/esm/components/profile/__generated__/ProfileDrawerContentUpdateAvatarMutation.graphql.js.map +1 -1
- package/dist/esm/components/profile/__generated__/ProfileDrawerSignOutMutation.graphql.js +4 -8
- package/dist/esm/components/profile/__generated__/ProfileDrawerSignOutMutation.graphql.js.map +1 -1
- package/dist/esm/components/profile/__generated__/ProfileDrawerUpdateAvatarMutation.graphql.js +33 -41
- package/dist/esm/components/profile/__generated__/ProfileDrawerUpdateAvatarMutation.graphql.js.map +1 -1
- package/dist/esm/components/profile/__generated__/ProfileUpdateNameModalMutation.graphql.js +31 -47
- package/dist/esm/components/profile/__generated__/ProfileUpdateNameModalMutation.graphql.js.map +1 -1
- package/dist/esm/components/profile/__generated__/ProfileUpdatePasswordModalMutation.graphql.js +27 -35
- package/dist/esm/components/profile/__generated__/ProfileUpdatePasswordModalMutation.graphql.js.map +1 -1
- package/dist/esm/components/profile/__generated__/ProtectedWrapperQuery.graphql.js +4 -8
- package/dist/esm/components/profile/__generated__/ProtectedWrapperQuery.graphql.js.map +1 -1
- package/dist/esm/components/session/SessionDrawer.js +1 -4
- package/dist/esm/components/session/SessionDrawer.js.map +1 -1
- package/dist/esm/components/session/SessionDrawerContent.js +0 -5
- package/dist/esm/components/session/SessionDrawerContent.js.map +1 -1
- package/dist/esm/components/session/SessionList.js +1 -4
- package/dist/esm/components/session/SessionList.js.map +1 -1
- package/dist/esm/components/session/SessionListItem.js +3 -17
- package/dist/esm/components/session/SessionListItem.js.map +1 -1
- package/dist/esm/components/session/SessionListSkeleton.js +1 -3
- package/dist/esm/components/session/SessionListSkeleton.js.map +1 -1
- package/dist/esm/components/session/__generated__/SessionDrawerContentQuery.graphql.js +1 -1
- package/dist/esm/components/session/__generated__/SessionDrawerContentQuery.graphql.js.map +1 -1
- package/dist/esm/components/session/__generated__/SessionListDestroyAllOtherSessionsMutation.graphql.js +4 -8
- package/dist/esm/components/session/__generated__/SessionListDestroyAllOtherSessionsMutation.graphql.js.map +1 -1
- package/dist/esm/components/session/__generated__/SessionListItemDestroySessionMutation.graphql.js +27 -35
- package/dist/esm/components/session/__generated__/SessionListItemDestroySessionMutation.graphql.js.map +1 -1
- package/dist/esm/components/session/__generated__/SessionListItem_session.graphql.js +1 -1
- package/dist/esm/components/session/__generated__/SessionListItem_session.graphql.js.map +1 -1
- package/dist/esm/components/session/__generated__/SessionListRefetchQuery.graphql.js +1 -1
- package/dist/esm/components/session/__generated__/SessionListRefetchQuery.graphql.js.map +1 -1
- package/dist/esm/components/session/__generated__/SessionList_sessions.graphql.js +1 -1
- package/dist/esm/components/session/__generated__/SessionList_sessions.graphql.js.map +1 -1
- package/dist/esm/components/session/formatDate.js +0 -1
- package/dist/esm/components/session/formatDate.js.map +1 -1
- package/dist/esm/components/session/getLastSeen.js +0 -1
- package/dist/esm/components/session/getLastSeen.js.map +1 -1
- package/dist/esm/components/shared/ButtonUpdate.js +1 -3
- package/dist/esm/components/shared/ButtonUpdate.js.map +1 -1
- package/dist/esm/components/shared/ErrorResult.js +3 -5
- package/dist/esm/components/shared/ErrorResult.js.map +1 -1
- package/dist/esm/components/shared/MainLoader.js +0 -2
- package/dist/esm/components/shared/MainLoader.js.map +1 -1
- package/dist/esm/components/shared/icons/AndroidIcon.js +0 -1
- package/dist/esm/components/shared/icons/AndroidIcon.js.map +1 -1
- package/dist/esm/components/shared/icons/AppleIcon.js +0 -1
- package/dist/esm/components/shared/icons/AppleIcon.js.map +1 -1
- package/dist/esm/components/shared/icons/BrowserIcon.js +0 -1
- package/dist/esm/components/shared/icons/BrowserIcon.js.map +1 -1
- package/dist/esm/components/shared/icons/ProfileIcon.js +0 -1
- package/dist/esm/components/shared/icons/ProfileIcon.js.map +1 -1
- package/dist/esm/components/shared/icons/UnknownDeviceIcon.js +0 -1
- package/dist/esm/components/shared/icons/UnknownDeviceIcon.js.map +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/utils/getUserFullName.js +0 -1
- package/dist/esm/utils/getUserFullName.js.map +1 -1
- package/dist/types/{components → src/lib/components}/profile/ProfileButton.d.ts +0 -0
- package/dist/types/src/lib/components/profile/ProfileButton.d.ts.map +1 -0
- package/dist/types/{components → src/lib/components}/profile/ProfileConfigContext.d.ts +0 -0
- package/dist/types/src/lib/components/profile/ProfileConfigContext.d.ts.map +1 -0
- package/dist/types/{components → src/lib/components}/profile/ProfileContext.d.ts +0 -0
- package/dist/types/src/lib/components/profile/ProfileContext.d.ts.map +1 -0
- package/dist/types/{components → src/lib/components}/profile/ProfileDrawer.d.ts +0 -0
- package/dist/types/src/lib/components/profile/ProfileDrawer.d.ts.map +1 -0
- package/dist/types/{components → src/lib/components}/profile/ProfileDrawerContent.d.ts +0 -0
- package/dist/types/src/lib/components/profile/ProfileDrawerContent.d.ts.map +1 -0
- package/dist/types/{components → src/lib/components}/profile/ProfileNavigationItem.d.ts +0 -0
- package/dist/types/src/lib/components/profile/ProfileNavigationItem.d.ts.map +1 -0
- package/dist/types/{components → src/lib/components}/profile/ProfileUpdateNameForm.d.ts +0 -0
- package/dist/types/src/lib/components/profile/ProfileUpdateNameForm.d.ts.map +1 -0
- package/dist/types/{components → src/lib/components}/profile/ProfileUpdateNameModal.d.ts +0 -0
- package/dist/types/src/lib/components/profile/ProfileUpdateNameModal.d.ts.map +1 -0
- package/dist/types/{components → src/lib/components}/profile/ProfileUpdatePasswordForm.d.ts +0 -0
- package/dist/types/src/lib/components/profile/ProfileUpdatePasswordForm.d.ts.map +1 -0
- package/dist/types/{components → src/lib/components}/profile/ProfileUpdatePasswordModal.d.ts +0 -0
- package/dist/types/src/lib/components/profile/ProfileUpdatePasswordModal.d.ts.map +1 -0
- package/dist/types/{components → src/lib/components}/profile/ProtectedWrapper.d.ts +0 -0
- package/dist/types/src/lib/components/profile/ProtectedWrapper.d.ts.map +1 -0
- package/dist/types/{components → src/lib/components}/profile/UserAvatar.d.ts +0 -0
- package/dist/types/src/lib/components/profile/UserAvatar.d.ts.map +1 -0
- package/dist/types/{components → src/lib/components}/profile/UserAvatarAddon.d.ts +0 -0
- package/dist/types/src/lib/components/profile/UserAvatarAddon.d.ts.map +1 -0
- package/dist/types/{components → src/lib/components}/profile/__generated__/ProfileDrawerContentSignOutMutation.graphql.d.ts +0 -0
- package/dist/types/src/lib/components/profile/__generated__/ProfileDrawerContentSignOutMutation.graphql.d.ts.map +1 -0
- package/dist/types/{components → src/lib/components}/profile/__generated__/ProfileDrawerContentUpdateAvatarMutation.graphql.d.ts +0 -0
- package/dist/types/src/lib/components/profile/__generated__/ProfileDrawerContentUpdateAvatarMutation.graphql.d.ts.map +1 -0
- package/dist/types/{components → src/lib/components}/profile/__generated__/ProfileDrawerSignOutMutation.graphql.d.ts +0 -0
- package/dist/types/src/lib/components/profile/__generated__/ProfileDrawerSignOutMutation.graphql.d.ts.map +1 -0
- package/dist/types/{components → src/lib/components}/profile/__generated__/ProfileDrawerUpdateAvatarMutation.graphql.d.ts +0 -0
- package/dist/types/src/lib/components/profile/__generated__/ProfileDrawerUpdateAvatarMutation.graphql.d.ts.map +1 -0
- package/dist/types/{components → src/lib/components}/profile/__generated__/ProfileUpdateNameModalMutation.graphql.d.ts +0 -0
- package/dist/types/src/lib/components/profile/__generated__/ProfileUpdateNameModalMutation.graphql.d.ts.map +1 -0
- package/dist/types/{components → src/lib/components}/profile/__generated__/ProfileUpdatePasswordModalMutation.graphql.d.ts +0 -0
- package/dist/types/src/lib/components/profile/__generated__/ProfileUpdatePasswordModalMutation.graphql.d.ts.map +1 -0
- package/dist/types/{components → src/lib/components}/profile/__generated__/ProtectedWrapperQuery.graphql.d.ts +0 -0
- package/dist/types/src/lib/components/profile/__generated__/ProtectedWrapperQuery.graphql.d.ts.map +1 -0
- package/dist/types/{components → src/lib/components}/session/SessionDrawer.d.ts +0 -0
- package/dist/types/src/lib/components/session/SessionDrawer.d.ts.map +1 -0
- package/dist/types/{components → src/lib/components}/session/SessionDrawerContent.d.ts +0 -0
- package/dist/types/src/lib/components/session/SessionDrawerContent.d.ts.map +1 -0
- package/dist/types/{components → src/lib/components}/session/SessionList.d.ts +0 -0
- package/dist/types/src/lib/components/session/SessionList.d.ts.map +1 -0
- package/dist/types/{components → src/lib/components}/session/SessionListItem.d.ts +0 -0
- package/dist/types/src/lib/components/session/SessionListItem.d.ts.map +1 -0
- package/dist/types/{components → src/lib/components}/session/SessionListSkeleton.d.ts +0 -0
- package/dist/types/src/lib/components/session/SessionListSkeleton.d.ts.map +1 -0
- package/dist/types/{components → src/lib/components}/session/__generated__/SessionDrawerContentQuery.graphql.d.ts +0 -0
- package/dist/types/src/lib/components/session/__generated__/SessionDrawerContentQuery.graphql.d.ts.map +1 -0
- package/dist/types/{components → src/lib/components}/session/__generated__/SessionListDestroyAllOtherSessionsMutation.graphql.d.ts +0 -0
- package/dist/types/src/lib/components/session/__generated__/SessionListDestroyAllOtherSessionsMutation.graphql.d.ts.map +1 -0
- package/dist/types/{components → src/lib/components}/session/__generated__/SessionListItemDestroySessionMutation.graphql.d.ts +0 -0
- package/dist/types/src/lib/components/session/__generated__/SessionListItemDestroySessionMutation.graphql.d.ts.map +1 -0
- package/dist/types/{components → src/lib/components}/session/__generated__/SessionListItem_session.graphql.d.ts +0 -0
- package/dist/types/src/lib/components/session/__generated__/SessionListItem_session.graphql.d.ts.map +1 -0
- package/dist/types/{components → src/lib/components}/session/__generated__/SessionListRefetchQuery.graphql.d.ts +0 -0
- package/dist/types/src/lib/components/session/__generated__/SessionListRefetchQuery.graphql.d.ts.map +1 -0
- package/dist/types/{components → src/lib/components}/session/__generated__/SessionList_sessions.graphql.d.ts +0 -0
- package/dist/types/src/lib/components/session/__generated__/SessionList_sessions.graphql.d.ts.map +1 -0
- package/dist/types/{components → src/lib/components}/session/formatDate.d.ts +0 -0
- package/dist/types/src/lib/components/session/formatDate.d.ts.map +1 -0
- package/dist/types/{components → src/lib/components}/session/getLastSeen.d.ts +0 -0
- package/dist/types/src/lib/components/session/getLastSeen.d.ts.map +1 -0
- package/dist/types/{components → src/lib/components}/shared/ButtonUpdate.d.ts +0 -0
- package/dist/types/src/lib/components/shared/ButtonUpdate.d.ts.map +1 -0
- package/dist/types/{components → src/lib/components}/shared/ErrorResult.d.ts +0 -0
- package/dist/types/src/lib/components/shared/ErrorResult.d.ts.map +1 -0
- package/dist/types/{components → src/lib/components}/shared/MainLoader.d.ts +0 -0
- package/dist/types/src/lib/components/shared/MainLoader.d.ts.map +1 -0
- package/dist/types/{components → src/lib/components}/shared/icons/AndroidIcon.d.ts +0 -0
- package/dist/types/src/lib/components/shared/icons/AndroidIcon.d.ts.map +1 -0
- package/dist/types/{components → src/lib/components}/shared/icons/AppleIcon.d.ts +0 -0
- package/dist/types/src/lib/components/shared/icons/AppleIcon.d.ts.map +1 -0
- package/dist/types/{components → src/lib/components}/shared/icons/BrowserIcon.d.ts +0 -0
- package/dist/types/src/lib/components/shared/icons/BrowserIcon.d.ts.map +1 -0
- package/dist/types/{components → src/lib/components}/shared/icons/ProfileIcon.d.ts +0 -0
- package/dist/types/src/lib/components/shared/icons/ProfileIcon.d.ts.map +1 -0
- package/dist/types/{components → src/lib/components}/shared/icons/UnknownDeviceIcon.d.ts +0 -0
- package/dist/types/src/lib/components/shared/icons/UnknownDeviceIcon.d.ts.map +1 -0
- package/dist/types/{index.d.ts → src/lib/index.d.ts} +0 -0
- package/dist/types/src/lib/index.d.ts.map +1 -0
- package/dist/types/{utils → src/lib/utils}/getUserFullName.d.ts +0 -0
- package/dist/types/src/lib/utils/getUserFullName.d.ts.map +1 -0
- package/package.json +32 -34
- package/dist/cjs/emotion.d.js.map +0 -1
- package/dist/esm/emotion.d.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/ProfileUpdateNameForm.d.ts.map +0 -1
- package/dist/types/components/profile/ProfileUpdateNameModal.d.ts.map +0 -1
- package/dist/types/components/profile/ProfileUpdatePasswordForm.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__/ProfileDrawerSignOutMutation.graphql.d.ts.map +0 -1
- package/dist/types/components/profile/__generated__/ProfileDrawerUpdateAvatarMutation.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.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/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/getUserFullName.d.ts.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SessionList.js","names":["React","useCallback","useMemo","useFragment","useMutation","Button","message","styled","useTranslation","clr","SessionListItem","sessionListFragment","Title","div","List","p","theme","listItemColorBorder","DestroyAllOtherSessionsButton","OtherSessions","SESSION_LIST_PADDING_VERTICAL","SessionList","sessionsKey","sessions","t","currentSession","find","session","current","otherSessions","filter","sort","a","b","Date","lastSeenAt","getTime","commitDestroyAllOtherSessions","loadingDestroyAllOtherSessions","destroyAllOtherSessions","variables","updater","store","record","get","sessionRecords","getLinkedRecords","setLinkedRecords","item","getDataID","id","onError","error","onCompleted","success","length","map"],"sources":["../../../../src/lib/components/session/SessionList.tsx"],"sourcesContent":["import React, { useCallback, useMemo } from 'react';\nimport graphql from 'babel-plugin-relay/macro';\nimport { useFragment, useMutation } from 'react-relay/hooks';\nimport { Button, message } from '@os-design/core';\nimport styled from '@emotion/styled';\nimport { useTranslation } from 'react-i18next';\nimport { clr } from '@os-design/theming';\nimport { SessionList_sessions$key } from './__generated__/SessionList_sessions.graphql';\nimport SessionListItem from './SessionListItem';\nimport { SessionListDestroyAllOtherSessionsMutation } from './__generated__/SessionListDestroyAllOtherSessionsMutation.graphql';\n\nconst sessionListFragment = graphql`\n fragment SessionList_sessions on Query\n @refetchable(queryName: \"SessionListRefetchQuery\") {\n sessions {\n id\n current\n lastSeenAt\n ...SessionListItem_session\n }\n }\n`;\n\ninterface SessionListProps {\n sessionsKey: SessionList_sessions$key;\n}\n\nexport const Title = styled.div`\n font-weight: 500;\n margin: 1em 1em 0.5em;\n`;\n\nexport const List = styled.div`\n border-top: 1px solid ${(p) => clr(p.theme.listItemColorBorder)};\n border-bottom: 1px solid ${(p) => clr(p.theme.listItemColorBorder)};\n`;\n\nconst DestroyAllOtherSessionsButton = styled(Button)`\n & > span {\n flex: 1;\n text-align: left;\n }\n`;\n\nconst OtherSessions = styled.div`\n margin-top: 2em;\n`;\n\nexport const SESSION_LIST_PADDING_VERTICAL = 0.5;\n\nconst SessionList: React.FC<SessionListProps> = ({ sessionsKey }) => {\n const { sessions } = useFragment(sessionListFragment, sessionsKey);\n const { t } = useTranslation('profile');\n\n const currentSession = useMemo(\n () => sessions.find((session) => session.current),\n [sessions]\n );\n\n const otherSessions = useMemo(\n () =>\n sessions\n .filter((session) => !session.current)\n .sort(\n (a, b) =>\n new Date(b.lastSeenAt).getTime() - new Date(a.lastSeenAt).getTime()\n ),\n [sessions]\n );\n\n const [commitDestroyAllOtherSessions, loadingDestroyAllOtherSessions] =\n useMutation<SessionListDestroyAllOtherSessionsMutation>(graphql`\n mutation SessionListDestroyAllOtherSessionsMutation {\n destroyAllOtherSessions {\n ok\n }\n }\n `);\n\n const destroyAllOtherSessions = useCallback(() => {\n commitDestroyAllOtherSessions({\n variables: {},\n updater: (store) => {\n const record = store.get('client:root');\n if (!record) return;\n\n const sessionRecords = record.getLinkedRecords('sessions');\n if (!sessionRecords) return;\n\n record.setLinkedRecords(\n sessionRecords.filter(\n (item) => item.getDataID() === currentSession?.id\n ),\n 'sessions'\n );\n },\n onError: (error) => {\n message.error(error.message);\n },\n onCompleted: () => {\n message.success(t('profile:sessions.destroyedAllOther'));\n },\n });\n }, [commitDestroyAllOtherSessions, currentSession?.id, t]);\n\n return (\n <>\n {currentSession && (\n <>\n <Title>{t('profile:sessions.current')}</Title>\n <List>\n <SessionListItem sessionKey={currentSession} hideLastSeenAt />\n </List>\n </>\n )}\n\n {otherSessions.length > 0 && (\n <>\n <DestroyAllOtherSessionsButton\n type='ghost'\n danger\n size='small'\n wide='always'\n loading={loadingDestroyAllOtherSessions}\n onClick={destroyAllOtherSessions}\n >\n {t('profile:sessions.destroyAllOther')}\n </DestroyAllOtherSessionsButton>\n\n <OtherSessions>\n <Title>\n {t('profile:sessions.other')} ({otherSessions.length})\n </Title>\n <List>\n {otherSessions.map((session) => (\n <SessionListItem key={session.id} sessionKey={session} />\n ))}\n </List>\n </OtherSessions>\n </>\n )}\n </>\n );\n};\n\nexport default SessionList;\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"SessionList.js","names":["React","useCallback","useMemo","useFragment","useMutation","Button","message","styled","useTranslation","clr","SessionListItem","sessionListFragment","Title","div","List","p","theme","listItemColorBorder","DestroyAllOtherSessionsButton","OtherSessions","SESSION_LIST_PADDING_VERTICAL","SessionList","sessionsKey","sessions","t","currentSession","find","session","current","otherSessions","filter","sort","a","b","Date","lastSeenAt","getTime","commitDestroyAllOtherSessions","loadingDestroyAllOtherSessions","destroyAllOtherSessions","variables","updater","store","record","get","sessionRecords","getLinkedRecords","setLinkedRecords","item","getDataID","id","onError","error","onCompleted","success","length","map"],"sources":["../../../../src/lib/components/session/SessionList.tsx"],"sourcesContent":["import React, { useCallback, useMemo } from 'react';\nimport graphql from 'babel-plugin-relay/macro';\nimport { useFragment, useMutation } from 'react-relay/hooks';\nimport { Button, message } from '@os-design/core';\nimport styled from '@emotion/styled';\nimport { useTranslation } from 'react-i18next';\nimport { clr } from '@os-design/theming';\nimport { SessionList_sessions$key } from './__generated__/SessionList_sessions.graphql';\nimport SessionListItem from './SessionListItem';\nimport { SessionListDestroyAllOtherSessionsMutation } from './__generated__/SessionListDestroyAllOtherSessionsMutation.graphql';\n\nconst sessionListFragment = graphql`\n fragment SessionList_sessions on Query\n @refetchable(queryName: \"SessionListRefetchQuery\") {\n sessions {\n id\n current\n lastSeenAt\n ...SessionListItem_session\n }\n }\n`;\n\ninterface SessionListProps {\n sessionsKey: SessionList_sessions$key;\n}\n\nexport const Title = styled.div`\n font-weight: 500;\n margin: 1em 1em 0.5em;\n`;\n\nexport const List = styled.div`\n border-top: 1px solid ${(p) => clr(p.theme.listItemColorBorder)};\n border-bottom: 1px solid ${(p) => clr(p.theme.listItemColorBorder)};\n`;\n\nconst DestroyAllOtherSessionsButton = styled(Button)`\n & > span {\n flex: 1;\n text-align: left;\n }\n`;\n\nconst OtherSessions = styled.div`\n margin-top: 2em;\n`;\n\nexport const SESSION_LIST_PADDING_VERTICAL = 0.5;\n\nconst SessionList: React.FC<SessionListProps> = ({ sessionsKey }) => {\n const { sessions } = useFragment(sessionListFragment, sessionsKey);\n const { t } = useTranslation(['profile']);\n\n const currentSession = useMemo(\n () => sessions.find((session) => session.current),\n [sessions]\n );\n\n const otherSessions = useMemo(\n () =>\n sessions\n .filter((session) => !session.current)\n .sort(\n (a, b) =>\n new Date(b.lastSeenAt).getTime() - new Date(a.lastSeenAt).getTime()\n ),\n [sessions]\n );\n\n const [commitDestroyAllOtherSessions, loadingDestroyAllOtherSessions] =\n useMutation<SessionListDestroyAllOtherSessionsMutation>(graphql`\n mutation SessionListDestroyAllOtherSessionsMutation {\n destroyAllOtherSessions {\n ok\n }\n }\n `);\n\n const destroyAllOtherSessions = useCallback(() => {\n commitDestroyAllOtherSessions({\n variables: {},\n updater: (store) => {\n const record = store.get('client:root');\n if (!record) return;\n\n const sessionRecords = record.getLinkedRecords('sessions');\n if (!sessionRecords) return;\n\n record.setLinkedRecords(\n sessionRecords.filter(\n (item) => item.getDataID() === currentSession?.id\n ),\n 'sessions'\n );\n },\n onError: (error) => {\n message.error(error.message);\n },\n onCompleted: () => {\n message.success(t('profile:sessions.destroyedAllOther'));\n },\n });\n }, [commitDestroyAllOtherSessions, currentSession?.id, t]);\n\n return (\n <>\n {currentSession && (\n <>\n <Title>{t('profile:sessions.current')}</Title>\n <List>\n <SessionListItem sessionKey={currentSession} hideLastSeenAt />\n </List>\n </>\n )}\n\n {otherSessions.length > 0 && (\n <>\n <DestroyAllOtherSessionsButton\n type='ghost'\n danger\n size='small'\n wide='always'\n loading={loadingDestroyAllOtherSessions}\n onClick={destroyAllOtherSessions}\n >\n {t('profile:sessions.destroyAllOther')}\n </DestroyAllOtherSessionsButton>\n\n <OtherSessions>\n <Title>\n {t('profile:sessions.other')} ({otherSessions.length})\n </Title>\n <List>\n {otherSessions.map((session) => (\n <SessionListItem key={session.id} sessionKey={session} />\n ))}\n </List>\n </OtherSessions>\n </>\n )}\n </>\n );\n};\n\nexport default SessionList;\n"],"mappings":";AAAA,OAAOA,KAAK,IAAIC,WAAW,EAAEC,OAAO,QAAQ,OAAO;AAEnD,SAASC,WAAW,EAAEC,WAAW,QAAQ,mBAAmB;AAC5D,SAASC,MAAM,EAAEC,OAAO,QAAQ,iBAAiB;AACjD,OAAOC,MAAM,MAAM,iBAAiB;AACpC,SAASC,cAAc,QAAQ,eAAe;AAC9C,SAASC,GAAG,QAAQ,oBAAoB;AAExC,OAAOC,eAAe,MAAM,mBAAmB;AAG/C,MAAMC,mBAAmB,8aAUxB;AAMD,OAAO,MAAMC,KAAK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hCf,CAAC,CAAC,kCAAkC,CAAC,CACR,eAEhC,oBAAC,aAAa,qBACZ,oBAAC,KAAK,QACHA,CAAC,CAAC,wBAAwB,CAAC,QAAIK,aAAa,CAAC0B,MAAM,MAC9C,eACR,oBAAC,IAAI,QACF1B,aAAa,CAAC2B,GAAG,CAAE7B,OAAO,iBACzB,oBAAC,eAAe;IAAC,GAAG,EAAEA,OAAO,CAACuB,EAAG;IAAC,UAAU,EAAEvB;EAAQ,EACvD,CAAC,CACG,CACO,CAEnB,CACA;AAEP,CAAC;AAED,eAAeN,WAAW"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
var _SessionListItem_session, _SessionListItemDestroySessionMutation;
|
|
2
|
-
|
|
3
2
|
import React, { useCallback, useMemo } from 'react';
|
|
4
3
|
import { useFragment, useMutation } from 'react-relay/hooks';
|
|
5
4
|
import styled from '@emotion/styled';
|
|
@@ -59,16 +58,13 @@ const Title = styled(Info)`
|
|
|
59
58
|
const LastSeen = styled(Info)`
|
|
60
59
|
color: ${p => clr(p.theme.inputColorPlaceholder)};
|
|
61
60
|
`;
|
|
62
|
-
|
|
63
61
|
const hasSwipeStyles = p => p.hasSwipe && css`
|
|
64
62
|
transform: translateX(100%);
|
|
65
63
|
${transitionStyles('transform')(p)};
|
|
66
64
|
`;
|
|
67
|
-
|
|
68
65
|
const openedStyles = p => p.opened && css`
|
|
69
66
|
transform: translateX(0);
|
|
70
67
|
`;
|
|
71
|
-
|
|
72
68
|
const Actions = styled('nav', omitEmotionProps('hasSwipe', 'opened'))`
|
|
73
69
|
position: absolute;
|
|
74
70
|
top: 0;
|
|
@@ -112,14 +108,11 @@ export const Icon = styled('div', omitEmotionProps('bgColor'))`
|
|
|
112
108
|
background-color: ${p => p.bgColor};
|
|
113
109
|
color: hsl(0, 0%, 100%);
|
|
114
110
|
`;
|
|
115
|
-
|
|
116
111
|
const nameVersionToString = (name, version) => {
|
|
117
112
|
if (!name) return null;
|
|
118
113
|
return `${name}${version ? ` ${version}` : ''}`;
|
|
119
114
|
};
|
|
120
|
-
|
|
121
115
|
const mergeInfo = (...args) => args.filter(item => item !== null).join(', ') || null;
|
|
122
|
-
|
|
123
116
|
const SessionListItem = ({
|
|
124
117
|
sessionKey,
|
|
125
118
|
hideLastSeenAt
|
|
@@ -128,7 +121,7 @@ const SessionListItem = ({
|
|
|
128
121
|
const {
|
|
129
122
|
t,
|
|
130
123
|
i18n
|
|
131
|
-
} = useTranslation('profile');
|
|
124
|
+
} = useTranslation(['profile']);
|
|
132
125
|
const touchDevice = useMemo(() => isTouchDevice(), []);
|
|
133
126
|
const {
|
|
134
127
|
opened,
|
|
@@ -137,13 +130,12 @@ const SessionListItem = ({
|
|
|
137
130
|
const browser = useMemo(() => nameVersionToString(session.browserName, session.browserVersion), [session.browserName, session.browserVersion]);
|
|
138
131
|
const os = useMemo(() => nameVersionToString(session.osName, session.osVersion), [session.osName, session.osVersion]);
|
|
139
132
|
const deviceBrandModel = useMemo(() => {
|
|
140
|
-
const arr = [session.deviceBrand, session.deviceModel];
|
|
133
|
+
const arr = [session.deviceBrand, session.deviceModel];
|
|
134
|
+
// Include the manufacturer name only if it does not equal to the brand name.
|
|
141
135
|
// For example, it allows to avoid "Apple Apple iPhone 6".
|
|
142
|
-
|
|
143
136
|
if (session.deviceManufacturer !== session.deviceBrand) {
|
|
144
137
|
arr.unshift(session.deviceManufacturer);
|
|
145
138
|
}
|
|
146
|
-
|
|
147
139
|
return arr.filter(item => item !== null).join(' ') || null;
|
|
148
140
|
}, [session.deviceBrand, session.deviceManufacturer, session.deviceModel]);
|
|
149
141
|
const title = useMemo(() => {
|
|
@@ -161,11 +153,9 @@ const SessionListItem = ({
|
|
|
161
153
|
}, [session.city, session.country, session.ip]);
|
|
162
154
|
const lastSeen = useMemo(() => {
|
|
163
155
|
const lsa = getLastSeen(session.lastSeenAt);
|
|
164
|
-
|
|
165
156
|
if (!lsa) {
|
|
166
157
|
return `${t('profile:sessions.lastSeenOn')} ${formatDate(session.lastSeenAt, t, i18n.language)}`;
|
|
167
158
|
}
|
|
168
|
-
|
|
169
159
|
return `${t('profile:sessions.lastSeen')} ${lsa[0]} ${pluralForms({
|
|
170
160
|
language: i18n.language,
|
|
171
161
|
forms: t(`profile:sessions.${lsa[1]}`, {
|
|
@@ -176,15 +166,12 @@ const SessionListItem = ({
|
|
|
176
166
|
}, [i18n.language, session.lastSeenAt, t]);
|
|
177
167
|
const [iconComponent, iconColor] = useMemo(() => {
|
|
178
168
|
if (browser) return [/*#__PURE__*/React.createElement(BrowserIcon, null), 'hsl(30, 60%, 50%)'];
|
|
179
|
-
|
|
180
169
|
if (session.isApp) {
|
|
181
170
|
if (session.osName === 'iOS' || session.osName === 'iPhone OS') {
|
|
182
171
|
return [/*#__PURE__*/React.createElement(AppleIcon, null), 'hsl(0, 0%, 50%)'];
|
|
183
172
|
}
|
|
184
|
-
|
|
185
173
|
if (session.osName === 'Android') return [/*#__PURE__*/React.createElement(AndroidIcon, null), 'hsl(150, 60%, 50%)'];
|
|
186
174
|
}
|
|
187
|
-
|
|
188
175
|
return [/*#__PURE__*/React.createElement(UnknownDeviceIcon, null), 'hsl(5, 60%, 50%)'];
|
|
189
176
|
}, [browser, session.isApp, session.osName]);
|
|
190
177
|
const [commitDestroySession, loadingDestroySession] = useMutation(_SessionListItemDestroySessionMutation !== void 0 ? _SessionListItemDestroySessionMutation : (_SessionListItemDestroySessionMutation = require("./__generated__/SessionListItemDestroySessionMutation.graphql"), _SessionListItemDestroySessionMutation.hash && _SessionListItemDestroySessionMutation.hash !== "ad6c0d1313a70dd63c0baccc2f7abd6e" && console.error("The definition of 'SessionListItemDestroySessionMutation' appears to have changed. Run `relay-compiler` to update the generated files to receive the expected data."), _SessionListItemDestroySessionMutation));
|
|
@@ -223,6 +210,5 @@ const SessionListItem = ({
|
|
|
223
210
|
onClick: destroySession
|
|
224
211
|
}, /*#__PURE__*/React.createElement(SignOut, null))));
|
|
225
212
|
};
|
|
226
|
-
|
|
227
213
|
export default SessionListItem;
|
|
228
214
|
//# sourceMappingURL=SessionListItem.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SessionListItem.js","names":["React","useCallback","useMemo","useFragment","useMutation","styled","useTranslation","pluralForms","Button","message","ellipsisStyles","horizontalPaddingStyles","transitionStyles","clr","isTouchDevice","omitEmotionProps","useSwipe","SignOut","css","getLastSeen","formatDate","UnknownDeviceIcon","BrowserIcon","AppleIcon","AndroidIcon","sessionListItemFragment","Container","div","p","theme","listItemColorBorder","Info","sizes","small","Content","Title","LastSeen","inputColorPlaceholder","hasSwipeStyles","hasSwipe","openedStyles","opened","Actions","colorBg","slice","listItemActionsPaddingLeft","IconContainer","Icon","borderRadius","bgColor","nameVersionToString","name","version","mergeInfo","args","filter","item","join","SessionListItem","sessionKey","hideLastSeenAt","session","t","i18n","touchDevice","handlers","browser","browserName","browserVersion","os","osName","osVersion","deviceBrandModel","arr","deviceBrand","deviceModel","deviceManufacturer","unshift","title","deviceType","toLowerCase","returnObjects","deviceName","deviceInfo","isApp","ip","location","city","country","lastSeen","lsa","lastSeenAt","language","forms","number","iconComponent","iconColor","commitDestroySession","loadingDestroySession","destroySession","variables","input","id","updater","store","record","get","sessionRecords","getLinkedRecords","setLinkedRecords","getDataID","onError","error","onCompleted","success"],"sources":["../../../../src/lib/components/session/SessionListItem.tsx"],"sourcesContent":["import React, { useCallback, useMemo } from 'react';\nimport graphql from 'babel-plugin-relay/macro';\nimport { useFragment, useMutation } from 'react-relay/hooks';\nimport styled from '@emotion/styled';\nimport { useTranslation } from 'react-i18next';\nimport pluralForms from '@os-team/plural-forms';\nimport { Button, message } from '@os-design/core';\nimport {\n ellipsisStyles,\n horizontalPaddingStyles,\n transitionStyles,\n} from '@os-design/styles';\nimport { clr, Color } from '@os-design/theming';\nimport { isTouchDevice, omitEmotionProps, useSwipe } from '@os-design/utils';\nimport { SignOut } from '@os-design/icons';\nimport { css } from '@emotion/react';\nimport { SessionListItem_session$key } from './__generated__/SessionListItem_session.graphql';\nimport getLastSeen from './getLastSeen';\nimport formatDate from './formatDate';\nimport { SessionListItemDestroySessionMutation } from './__generated__/SessionListItemDestroySessionMutation.graphql';\nimport UnknownDeviceIcon from '../shared/icons/UnknownDeviceIcon';\nimport BrowserIcon from '../shared/icons/BrowserIcon';\nimport AppleIcon from '../shared/icons/AppleIcon';\nimport AndroidIcon from '../shared/icons/AndroidIcon';\n\nconst sessionListItemFragment = graphql`\n fragment SessionListItem_session on SessionPayload {\n id\n isApp\n browserName\n browserVersion\n osName\n osVersion\n deviceType\n deviceName\n deviceManufacturer\n deviceBrand\n deviceModel\n ip\n country\n city\n lastSeenAt\n }\n`;\n\ninterface SessionListItemProps {\n sessionKey: SessionListItem_session$key;\n hideLastSeenAt?: boolean;\n}\n\nexport const Container = styled.div`\n display: flex;\n position: relative;\n padding: 0.5em 0;\n overflow: hidden;\n\n &:not(:last-of-type) {\n border-bottom: 1px solid ${(p) => clr(p.theme.listItemColorBorder)};\n }\n\n @media (hover: hover) {\n // Hide actions by default\n & > nav {\n opacity: 0;\n }\n\n // Display actions either on focus, or on hover\n &:hover,\n &:focus-within {\n & > nav {\n opacity: 1;\n }\n }\n }\n\n ${horizontalPaddingStyles()};\n`;\n\nconst Info = styled.div`\n font-size: ${(p) => p.theme.sizes.small}em;\n ${ellipsisStyles};\n`;\n\nexport const Content = styled.div`\n flex: 1;\n overflow: hidden;\n`;\n\nconst Title = styled(Info)`\n font-weight: 500;\n`;\n\nconst LastSeen = styled(Info)`\n color: ${(p) => clr(p.theme.inputColorPlaceholder)};\n`;\n\nconst hasSwipeStyles = (p) =>\n p.hasSwipe &&\n css`\n transform: translateX(100%);\n ${transitionStyles('transform')(p)};\n `;\n\nconst openedStyles = (p) =>\n p.opened &&\n css`\n transform: translateX(0);\n `;\n\ninterface ActionsProps {\n hasSwipe: boolean;\n opened: boolean;\n}\nconst Actions = styled(\n 'nav',\n omitEmotionProps('hasSwipe', 'opened')\n)<ActionsProps>`\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n\n display: flex;\n align-items: center;\n\n background: linear-gradient(\n to right,\n ${(p) => clr([...p.theme.colorBg.slice(0, 3), 0] as Color)},\n ${(p) => clr(p.theme.colorBg)}\n ${(p) => p.theme.listItemActionsPaddingLeft}em\n );\n\n ${hasSwipeStyles};\n ${openedStyles};\n ${horizontalPaddingStyles('right')};\n`;\n\nexport const IconContainer = styled.div`\n display: flex;\n justify-content: center;\n align-items: center;\n margin-right: 0.6em;\n`;\n\ninterface IconProps {\n bgColor: string;\n}\nexport const Icon = styled('div', omitEmotionProps('bgColor'))<IconProps>`\n font-size: 1.4em;\n width: 1.3em;\n height: 1.3em;\n\n svg {\n height: 1.3em;\n }\n\n display: flex;\n justify-content: center;\n align-items: center;\n\n border-radius: ${(p) => p.theme.borderRadius}em;\n background-color: ${(p) => p.bgColor};\n color: hsl(0, 0%, 100%);\n`;\n\nconst nameVersionToString = (\n name: string | null,\n version: string | null\n): string | null => {\n if (!name) return null;\n return `${name}${version ? ` ${version}` : ''}`;\n};\n\nconst mergeInfo = (...args: Array<string | null>): string | null =>\n args.filter((item) => item !== null).join(', ') || null;\n\nconst SessionListItem: React.FC<SessionListItemProps> = ({\n sessionKey,\n hideLastSeenAt,\n}) => {\n const session = useFragment(sessionListItemFragment, sessionKey);\n const { t, i18n } = useTranslation('profile');\n const touchDevice = useMemo(() => isTouchDevice(), []);\n const { opened, handlers } = useSwipe();\n\n const browser = useMemo(\n () => nameVersionToString(session.browserName, session.browserVersion),\n [session.browserName, session.browserVersion]\n );\n\n const os = useMemo(\n () => nameVersionToString(session.osName, session.osVersion),\n [session.osName, session.osVersion]\n );\n\n const deviceBrandModel = useMemo(() => {\n const arr = [session.deviceBrand, session.deviceModel];\n // Include the manufacturer name only if it does not equal to the brand name.\n // For example, it allows to avoid \"Apple Apple iPhone 6\".\n if (session.deviceManufacturer !== session.deviceBrand) {\n arr.unshift(session.deviceManufacturer);\n }\n return arr.filter((item) => item !== null).join(' ') || null;\n }, [session.deviceBrand, session.deviceManufacturer, session.deviceModel]);\n\n const title = useMemo(() => {\n let deviceType = (session.deviceType || 'unknown').toLowerCase();\n if (browser) deviceType = 'browser';\n return `${\n t('profile:sessions.deviceType', { returnObjects: true })[deviceType]\n }${session.deviceName ? ` ${session.deviceName}` : ''}`;\n }, [browser, session.deviceName, session.deviceType, t]);\n\n const deviceInfo = useMemo(\n () =>\n session.isApp ? mergeInfo(deviceBrandModel, os) : mergeInfo(browser, os),\n [browser, deviceBrandModel, os, session.isApp]\n );\n\n const ip = useMemo(() => {\n if (!session.ip) return null;\n const location = mergeInfo(session.city, session.country);\n return `${session.ip}${location ? ` (${location})` : ''}`;\n }, [session.city, session.country, session.ip]);\n\n const lastSeen = useMemo(() => {\n const lsa = getLastSeen(session.lastSeenAt);\n if (!lsa) {\n return `${t('profile:sessions.lastSeenOn')} ${formatDate(\n session.lastSeenAt,\n t,\n i18n.language\n )}`;\n }\n return `${t('profile:sessions.lastSeen')} ${lsa[0]} ${pluralForms({\n language: i18n.language,\n forms: t(`profile:sessions.${lsa[1]}`, { returnObjects: true }),\n number: lsa[0],\n })} ${t('profile:sessions.ago')}`;\n }, [i18n.language, session.lastSeenAt, t]);\n\n const [iconComponent, iconColor] = useMemo(() => {\n if (browser) return [<BrowserIcon />, 'hsl(30, 60%, 50%)'];\n if (session.isApp) {\n if (session.osName === 'iOS' || session.osName === 'iPhone OS') {\n return [<AppleIcon />, 'hsl(0, 0%, 50%)'];\n }\n if (session.osName === 'Android')\n return [<AndroidIcon />, 'hsl(150, 60%, 50%)'];\n }\n return [<UnknownDeviceIcon />, 'hsl(5, 60%, 50%)'];\n }, [browser, session.isApp, session.osName]);\n\n const [commitDestroySession, loadingDestroySession] =\n useMutation<SessionListItemDestroySessionMutation>(graphql`\n mutation SessionListItemDestroySessionMutation(\n $input: DestroySessionInput!\n ) {\n destroySession(input: $input) {\n ok\n }\n }\n `);\n\n const destroySession = useCallback(() => {\n commitDestroySession({\n variables: {\n input: {\n id: session.id,\n },\n },\n updater: (store) => {\n const record = store.get('client:root');\n if (!record) return;\n\n const sessionRecords = record.getLinkedRecords('sessions');\n if (!sessionRecords) return;\n\n record.setLinkedRecords(\n sessionRecords.filter((item) => item.getDataID() !== session.id),\n 'sessions'\n );\n },\n onError: (error) => {\n message.error(error.message);\n },\n onCompleted: () => {\n message.success(t('profile:sessions.destroyed'));\n },\n });\n }, [commitDestroySession, session.id, t]);\n\n return (\n <Container {...handlers}>\n <IconContainer>\n <Icon bgColor={iconColor}>{iconComponent}</Icon>\n </IconContainer>\n\n <Content>\n <Title>{title}</Title>\n {deviceInfo && <Info>{deviceInfo}</Info>}\n {ip && <Info>{ip}</Info>}\n {!hideLastSeenAt && <LastSeen>{lastSeen}</LastSeen>}\n </Content>\n\n <Actions hasSwipe={touchDevice} opened={opened}>\n <Button\n type='ghost'\n wide='never'\n size='small'\n loading={loadingDestroySession}\n onClick={destroySession}\n >\n <SignOut />\n </Button>\n </Actions>\n </Container>\n );\n};\n\nexport default SessionListItem;\n"],"mappings":";;AAAA,OAAOA,KAAP,IAAgBC,WAAhB,EAA6BC,OAA7B,QAA4C,OAA5C;AAEA,SAASC,WAAT,EAAsBC,WAAtB,QAAyC,mBAAzC;AACA,OAAOC,MAAP,MAAmB,iBAAnB;AACA,SAASC,cAAT,QAA+B,eAA/B;AACA,OAAOC,WAAP,MAAwB,uBAAxB;AACA,SAASC,MAAT,EAAiBC,OAAjB,QAAgC,iBAAhC;AACA,SACEC,cADF,EAEEC,uBAFF,EAGEC,gBAHF,QAIO,mBAJP;AAKA,SAASC,GAAT,QAA2B,oBAA3B;AACA,SAASC,aAAT,EAAwBC,gBAAxB,EAA0CC,QAA1C,QAA0D,kBAA1D;AACA,SAASC,OAAT,QAAwB,kBAAxB;AACA,SAASC,GAAT,QAAoB,gBAApB;AAEA,OAAOC,WAAP,MAAwB,eAAxB;AACA,OAAOC,UAAP,MAAuB,cAAvB;AAEA,OAAOC,iBAAP,MAA8B,mCAA9B;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,EAAE,iBAAI,oBAAC,IAAD,QAAOA,EAAP,CAHT,EAIG,CAACzB,cAAD,iBAAmB,oBAAC,QAAD,QAAW6B,QAAX,CAJtB,CALF,eAYE,oBAAC,OAAD;IAAS,QAAQ,EAAEzB,WAAnB;IAAgC,MAAM,EAAEvB;EAAxC,gBACE,oBAAC,MAAD;IACE,IAAI,EAAC,OADP;IAEE,IAAI,EAAC,OAFP;IAGE,IAAI,EAAC,OAHP;IAIE,OAAO,EAAEyD,qBAJX;IAKE,OAAO,EAAEC;EALX,gBAOE,oBAAC,OAAD,OAPF,CADF,CAZF,CADF;AA0BD,CA9ID;;AAgJA,eAAezC,eAAf"}
|
|
1
|
+
{"version":3,"file":"SessionListItem.js","names":["React","useCallback","useMemo","useFragment","useMutation","styled","useTranslation","pluralForms","Button","message","ellipsisStyles","horizontalPaddingStyles","transitionStyles","clr","isTouchDevice","omitEmotionProps","useSwipe","SignOut","css","getLastSeen","formatDate","UnknownDeviceIcon","BrowserIcon","AppleIcon","AndroidIcon","sessionListItemFragment","Container","div","p","theme","listItemColorBorder","Info","sizes","small","Content","Title","LastSeen","inputColorPlaceholder","hasSwipeStyles","hasSwipe","openedStyles","opened","Actions","colorBg","slice","listItemActionsPaddingLeft","IconContainer","Icon","borderRadius","bgColor","nameVersionToString","name","version","mergeInfo","args","filter","item","join","SessionListItem","sessionKey","hideLastSeenAt","session","t","i18n","touchDevice","handlers","browser","browserName","browserVersion","os","osName","osVersion","deviceBrandModel","arr","deviceBrand","deviceModel","deviceManufacturer","unshift","title","deviceType","toLowerCase","returnObjects","deviceName","deviceInfo","isApp","ip","location","city","country","lastSeen","lsa","lastSeenAt","language","forms","number","iconComponent","iconColor","commitDestroySession","loadingDestroySession","destroySession","variables","input","id","updater","store","record","get","sessionRecords","getLinkedRecords","setLinkedRecords","getDataID","onError","error","onCompleted","success"],"sources":["../../../../src/lib/components/session/SessionListItem.tsx"],"sourcesContent":["import React, { useCallback, useMemo } from 'react';\nimport graphql from 'babel-plugin-relay/macro';\nimport { useFragment, useMutation } from 'react-relay/hooks';\nimport styled from '@emotion/styled';\nimport { useTranslation } from 'react-i18next';\nimport pluralForms from '@os-team/plural-forms';\nimport { Button, message } from '@os-design/core';\nimport {\n ellipsisStyles,\n horizontalPaddingStyles,\n transitionStyles,\n} from '@os-design/styles';\nimport { clr, Color } from '@os-design/theming';\nimport { isTouchDevice, omitEmotionProps, useSwipe } from '@os-design/utils';\nimport { SignOut } from '@os-design/icons';\nimport { css } from '@emotion/react';\nimport { SessionListItem_session$key } from './__generated__/SessionListItem_session.graphql';\nimport getLastSeen from './getLastSeen';\nimport formatDate from './formatDate';\nimport { SessionListItemDestroySessionMutation } from './__generated__/SessionListItemDestroySessionMutation.graphql';\nimport UnknownDeviceIcon from '../shared/icons/UnknownDeviceIcon';\nimport BrowserIcon from '../shared/icons/BrowserIcon';\nimport AppleIcon from '../shared/icons/AppleIcon';\nimport AndroidIcon from '../shared/icons/AndroidIcon';\n\nconst sessionListItemFragment = graphql`\n fragment SessionListItem_session on SessionPayload {\n id\n isApp\n browserName\n browserVersion\n osName\n osVersion\n deviceType\n deviceName\n deviceManufacturer\n deviceBrand\n deviceModel\n ip\n country\n city\n lastSeenAt\n }\n`;\n\ninterface SessionListItemProps {\n sessionKey: SessionListItem_session$key;\n hideLastSeenAt?: boolean;\n}\n\nexport const Container = styled.div`\n display: flex;\n position: relative;\n padding: 0.5em 0;\n overflow: hidden;\n\n &:not(:last-of-type) {\n border-bottom: 1px solid ${(p) => clr(p.theme.listItemColorBorder)};\n }\n\n @media (hover: hover) {\n // Hide actions by default\n & > nav {\n opacity: 0;\n }\n\n // Display actions either on focus, or on hover\n &:hover,\n &:focus-within {\n & > nav {\n opacity: 1;\n }\n }\n }\n\n ${horizontalPaddingStyles()};\n`;\n\nconst Info = styled.div`\n font-size: ${(p) => p.theme.sizes.small}em;\n ${ellipsisStyles};\n`;\n\nexport const Content = styled.div`\n flex: 1;\n overflow: hidden;\n`;\n\nconst Title = styled(Info)`\n font-weight: 500;\n`;\n\nconst LastSeen = styled(Info)`\n color: ${(p) => clr(p.theme.inputColorPlaceholder)};\n`;\n\nconst hasSwipeStyles = (p) =>\n p.hasSwipe &&\n css`\n transform: translateX(100%);\n ${transitionStyles('transform')(p)};\n `;\n\nconst openedStyles = (p) =>\n p.opened &&\n css`\n transform: translateX(0);\n `;\n\ninterface ActionsProps {\n hasSwipe: boolean;\n opened: boolean;\n}\nconst Actions = styled(\n 'nav',\n omitEmotionProps('hasSwipe', 'opened')\n)<ActionsProps>`\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n\n display: flex;\n align-items: center;\n\n background: linear-gradient(\n to right,\n ${(p) => clr([...p.theme.colorBg.slice(0, 3), 0] as Color)},\n ${(p) => clr(p.theme.colorBg)}\n ${(p) => p.theme.listItemActionsPaddingLeft}em\n );\n\n ${hasSwipeStyles};\n ${openedStyles};\n ${horizontalPaddingStyles('right')};\n`;\n\nexport const IconContainer = styled.div`\n display: flex;\n justify-content: center;\n align-items: center;\n margin-right: 0.6em;\n`;\n\ninterface IconProps {\n bgColor: string;\n}\nexport const Icon = styled('div', omitEmotionProps('bgColor'))<IconProps>`\n font-size: 1.4em;\n width: 1.3em;\n height: 1.3em;\n\n svg {\n height: 1.3em;\n }\n\n display: flex;\n justify-content: center;\n align-items: center;\n\n border-radius: ${(p) => p.theme.borderRadius}em;\n background-color: ${(p) => p.bgColor};\n color: hsl(0, 0%, 100%);\n`;\n\nconst nameVersionToString = (\n name: string | null,\n version: string | null\n): string | null => {\n if (!name) return null;\n return `${name}${version ? ` ${version}` : ''}`;\n};\n\nconst mergeInfo = (...args: Array<string | null>): string | null =>\n args.filter((item) => item !== null).join(', ') || null;\n\nconst SessionListItem: React.FC<SessionListItemProps> = ({\n sessionKey,\n hideLastSeenAt,\n}) => {\n const session = useFragment(sessionListItemFragment, sessionKey);\n const { t, i18n } = useTranslation(['profile']);\n const touchDevice = useMemo(() => isTouchDevice(), []);\n const { opened, handlers } = useSwipe();\n\n const browser = useMemo(\n () => nameVersionToString(session.browserName, session.browserVersion),\n [session.browserName, session.browserVersion]\n );\n\n const os = useMemo(\n () => nameVersionToString(session.osName, session.osVersion),\n [session.osName, session.osVersion]\n );\n\n const deviceBrandModel = useMemo(() => {\n const arr = [session.deviceBrand, session.deviceModel];\n // Include the manufacturer name only if it does not equal to the brand name.\n // For example, it allows to avoid \"Apple Apple iPhone 6\".\n if (session.deviceManufacturer !== session.deviceBrand) {\n arr.unshift(session.deviceManufacturer);\n }\n return arr.filter((item) => item !== null).join(' ') || null;\n }, [session.deviceBrand, session.deviceManufacturer, session.deviceModel]);\n\n const title = useMemo(() => {\n let deviceType = (session.deviceType || 'unknown').toLowerCase();\n if (browser) deviceType = 'browser';\n return `${\n t('profile:sessions.deviceType', { returnObjects: true })[deviceType]\n }${session.deviceName ? ` ${session.deviceName}` : ''}`;\n }, [browser, session.deviceName, session.deviceType, t]);\n\n const deviceInfo = useMemo(\n () =>\n session.isApp ? mergeInfo(deviceBrandModel, os) : mergeInfo(browser, os),\n [browser, deviceBrandModel, os, session.isApp]\n );\n\n const ip = useMemo(() => {\n if (!session.ip) return null;\n const location = mergeInfo(session.city, session.country);\n return `${session.ip}${location ? ` (${location})` : ''}`;\n }, [session.city, session.country, session.ip]);\n\n const lastSeen = useMemo(() => {\n const lsa = getLastSeen(session.lastSeenAt);\n if (!lsa) {\n return `${t('profile:sessions.lastSeenOn')} ${formatDate(\n session.lastSeenAt,\n t,\n i18n.language\n )}`;\n }\n return `${t('profile:sessions.lastSeen')} ${lsa[0]} ${pluralForms({\n language: i18n.language,\n forms: t(`profile:sessions.${lsa[1]}`, { returnObjects: true }),\n number: lsa[0],\n })} ${t('profile:sessions.ago')}`;\n }, [i18n.language, session.lastSeenAt, t]);\n\n const [iconComponent, iconColor] = useMemo(() => {\n if (browser) return [<BrowserIcon />, 'hsl(30, 60%, 50%)'];\n if (session.isApp) {\n if (session.osName === 'iOS' || session.osName === 'iPhone OS') {\n return [<AppleIcon />, 'hsl(0, 0%, 50%)'];\n }\n if (session.osName === 'Android')\n return [<AndroidIcon />, 'hsl(150, 60%, 50%)'];\n }\n return [<UnknownDeviceIcon />, 'hsl(5, 60%, 50%)'];\n }, [browser, session.isApp, session.osName]);\n\n const [commitDestroySession, loadingDestroySession] =\n useMutation<SessionListItemDestroySessionMutation>(graphql`\n mutation SessionListItemDestroySessionMutation(\n $input: DestroySessionInput!\n ) {\n destroySession(input: $input) {\n ok\n }\n }\n `);\n\n const destroySession = useCallback(() => {\n commitDestroySession({\n variables: {\n input: {\n id: session.id,\n },\n },\n updater: (store) => {\n const record = store.get('client:root');\n if (!record) return;\n\n const sessionRecords = record.getLinkedRecords('sessions');\n if (!sessionRecords) return;\n\n record.setLinkedRecords(\n sessionRecords.filter((item) => item.getDataID() !== session.id),\n 'sessions'\n );\n },\n onError: (error) => {\n message.error(error.message);\n },\n onCompleted: () => {\n message.success(t('profile:sessions.destroyed'));\n },\n });\n }, [commitDestroySession, session.id, t]);\n\n return (\n <Container {...handlers}>\n <IconContainer>\n <Icon bgColor={iconColor}>{iconComponent}</Icon>\n </IconContainer>\n\n <Content>\n <Title>{title}</Title>\n {deviceInfo && <Info>{deviceInfo}</Info>}\n {ip && <Info>{ip}</Info>}\n {!hideLastSeenAt && <LastSeen>{lastSeen}</LastSeen>}\n </Content>\n\n <Actions hasSwipe={touchDevice} opened={opened}>\n <Button\n type='ghost'\n wide='never'\n size='small'\n loading={loadingDestroySession}\n onClick={destroySession}\n >\n <SignOut />\n </Button>\n </Actions>\n </Container>\n );\n};\n\nexport default SessionListItem;\n"],"mappings":";AAAA,OAAOA,KAAK,IAAIC,WAAW,EAAEC,OAAO,QAAQ,OAAO;AAEnD,SAASC,WAAW,EAAEC,WAAW,QAAQ,mBAAmB;AAC5D,OAAOC,MAAM,MAAM,iBAAiB;AACpC,SAASC,cAAc,QAAQ,eAAe;AAC9C,OAAOC,WAAW,MAAM,uBAAuB;AAC/C,SAASC,MAAM,EAAEC,OA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ACrB,oBAAC,aAAa,qBACZ,oBAAC,IAAI;IAAC,OAAO,EAAE+B;EAAU,GAAED,aAAa,CAAQ,CAClC,eAEhB,oBAAC,OAAO,qBACN,oBAAC,KAAK,QAAEjB,KAAK,CAAS,EACrBK,UAAU,iBAAI,oBAAC,IAAI,QAAEA,UAAU,CAAQ,EACvCE,EAAE,iBAAI,oBAAC,IAAI,QAAEA,EAAE,CAAQ,EACvB,CAACzB,cAAc,iBAAI,oBAAC,QAAQ,QAAE6B,QAAQ,CAAY,CAC3C,eAEV,oBAAC,OAAO;IAAC,QAAQ,EAAEzB,WAAY;IAAC,MAAM,EAAEvB;EAAO,gBAC7C,oBAAC,MAAM;IACL,IAAI,EAAC,OAAO;IACZ,IAAI,EAAC,OAAO;IACZ,IAAI,EAAC,OAAO;IACZ,OAAO,EAAEyD,qBAAsB;IAC/B,OAAO,EAAEC;EAAe,gBAExB,oBAAC,OAAO,OAAG,CACJ,CACD,CACA;AAEhB,CAAC;AAED,eAAezC,eAAe"}
|
|
@@ -17,17 +17,15 @@ const TitleSkeleton = styled(Skeleton)`
|
|
|
17
17
|
const InfoSkeleton = styled(TitleSkeleton)`
|
|
18
18
|
margin-top: 0.3em;
|
|
19
19
|
`;
|
|
20
|
-
|
|
21
20
|
const SessionListSkeleton = () => {
|
|
22
21
|
const {
|
|
23
22
|
t
|
|
24
|
-
} = useTranslation('profile');
|
|
23
|
+
} = useTranslation(['profile']);
|
|
25
24
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Title, null, t('profile:sessions.current')), /*#__PURE__*/React.createElement(List, null, /*#__PURE__*/React.createElement(ContainerSkeleton, null, /*#__PURE__*/React.createElement(IconContainer, null, /*#__PURE__*/React.createElement(IconSkeleton, null)), /*#__PURE__*/React.createElement(Content, null, /*#__PURE__*/React.createElement(TitleSkeleton, {
|
|
26
25
|
width: "50%"
|
|
27
26
|
}), /*#__PURE__*/React.createElement(InfoSkeleton, null), /*#__PURE__*/React.createElement(InfoSkeleton, {
|
|
28
27
|
width: "90%"
|
|
29
28
|
})))));
|
|
30
29
|
};
|
|
31
|
-
|
|
32
30
|
export default SessionListSkeleton;
|
|
33
31
|
//# sourceMappingURL=SessionListSkeleton.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SessionListSkeleton.js","names":["React","useTranslation","Skeleton","styled","Container","Content","IconContainer","Title","List","IconSkeleton","ContainerSkeleton","TitleSkeleton","p","theme","sizes","small","InfoSkeleton","SessionListSkeleton","t"],"sources":["../../../../src/lib/components/session/SessionListSkeleton.tsx"],"sourcesContent":["import React from 'react';\nimport { useTranslation } from 'react-i18next';\nimport { Skeleton } from '@os-design/core';\nimport styled from '@emotion/styled';\nimport { Container, Content, IconContainer } from './SessionListItem';\nimport { Title, List } from './SessionList';\n\nconst IconSkeleton = styled(Skeleton)`\n width: 1.82em;\n height: 1.82em;\n`;\n\nconst ContainerSkeleton = styled(Container)`\n padding: 0.8em 0;\n`;\n\nconst TitleSkeleton = styled(Skeleton)`\n height: ${(p) => p.theme.sizes.small}em;\n`;\n\nconst InfoSkeleton = styled(TitleSkeleton)`\n margin-top: 0.3em;\n`;\n\nconst SessionListSkeleton: React.FC = () => {\n const { t } = useTranslation('profile');\n\n return (\n <>\n <Title>{t('profile:sessions.current')}</Title>\n <List>\n <ContainerSkeleton>\n <IconContainer>\n <IconSkeleton />\n </IconContainer>\n\n <Content>\n <TitleSkeleton width='50%' />\n <InfoSkeleton />\n <InfoSkeleton width='90%' />\n </Content>\n </ContainerSkeleton>\n </List>\n </>\n );\n};\n\nexport default SessionListSkeleton;\n"],"mappings":"AAAA,OAAOA,
|
|
1
|
+
{"version":3,"file":"SessionListSkeleton.js","names":["React","useTranslation","Skeleton","styled","Container","Content","IconContainer","Title","List","IconSkeleton","ContainerSkeleton","TitleSkeleton","p","theme","sizes","small","InfoSkeleton","SessionListSkeleton","t"],"sources":["../../../../src/lib/components/session/SessionListSkeleton.tsx"],"sourcesContent":["import React from 'react';\nimport { useTranslation } from 'react-i18next';\nimport { Skeleton } from '@os-design/core';\nimport styled from '@emotion/styled';\nimport { Container, Content, IconContainer } from './SessionListItem';\nimport { Title, List } from './SessionList';\n\nconst IconSkeleton = styled(Skeleton)`\n width: 1.82em;\n height: 1.82em;\n`;\n\nconst ContainerSkeleton = styled(Container)`\n padding: 0.8em 0;\n`;\n\nconst TitleSkeleton = styled(Skeleton)`\n height: ${(p) => p.theme.sizes.small}em;\n`;\n\nconst InfoSkeleton = styled(TitleSkeleton)`\n margin-top: 0.3em;\n`;\n\nconst SessionListSkeleton: React.FC = () => {\n const { t } = useTranslation(['profile']);\n\n return (\n <>\n <Title>{t('profile:sessions.current')}</Title>\n <List>\n <ContainerSkeleton>\n <IconContainer>\n <IconSkeleton />\n </IconContainer>\n\n <Content>\n <TitleSkeleton width='50%' />\n <InfoSkeleton />\n <InfoSkeleton width='90%' />\n </Content>\n </ContainerSkeleton>\n </List>\n </>\n );\n};\n\nexport default SessionListSkeleton;\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,cAAc,QAAQ,eAAe;AAC9C,SAASC,QAAQ,QAAQ,iBAAiB;AAC1C,OAAOC,MAAM,MAAM,iBAAiB;AACpC,SAASC,SAAS,EAAEC,OAAO,EAAEC,aAAa,QAAQ,mBAAmB;AACrE,SAASC,KAAK,EAAEC,IAAI,QAAQ,eAAe;AAE3C,MAAMC,YAAY,GAAGN,MAAM,CAACD,QAAQ,CAAE;AACtC;AACA;AACA,CAAC;AAED,MAAMQ,iBAAiB,GAAGP,MAAM,CAACC,SAAS,CAAE;AAC5C;AACA,CAAC;AAED,MAAMO,aAAa,GAAGR,MAAM,CAACD,QAAQ,CAAE;AACvC,YAAaU,CAAC,IAAKA,CAAC,CAACC,KAAK,CAACC,KAAK,CAACC,KAAM;AACvC,CAAC;AAED,MAAMC,YAAY,GAAGb,MAAM,CAACQ,aAAa,CAAE;AAC3C;AACA,CAAC;AAED,MAAMM,mBAA6B,GAAG,MAAM;EAC1C,MAAM;IAAEC;EAAE,CAAC,GAAGjB,cAAc,CAAC,CAAC,SAAS,CAAC,CAAC;EAEzC,oBACE,uDACE,oBAAC,KAAK,QAAEiB,CAAC,CAAC,0BAA0B,CAAC,CAAS,eAC9C,oBAAC,IAAI,qBACH,oBAAC,iBAAiB,qBAChB,oBAAC,aAAa,qBACZ,oBAAC,YAAY,OAAG,CACF,eAEhB,oBAAC,OAAO,qBACN,oBAAC,aAAa;IAAC,KAAK,EAAC;EAAK,EAAG,eAC7B,oBAAC,YAAY,OAAG,eAChB,oBAAC,YAAY;IAAC,KAAK,EAAC;EAAK,EAAG,CACpB,CACQ,CACf,CACN;AAEP,CAAC;AAED,eAAeD,mBAAmB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SessionDrawerContentQuery.graphql.js","names":["node","hash"],"sources":["../../../../../src/lib/components/session/__generated__/SessionDrawerContentQuery.graphql.ts"],"sourcesContent":["/**\n * @generated SignedSource<<3d3e12b4f2082ce4b7758021424fdae3>>\n * @lightSyntaxTransform\n * @nogrep\n */\n\n/* tslint:disable */\n/* eslint-disable */\n// @ts-nocheck\n\nimport { ConcreteRequest, Query } from 'relay-runtime';\nimport { FragmentRefs } from \"relay-runtime\";\nexport type SessionDrawerContentQuery$variables = {};\nexport type SessionDrawerContentQuery$data = {\n readonly \" $fragmentSpreads\": FragmentRefs<\"SessionList_sessions\">;\n};\nexport type SessionDrawerContentQuery = {\n response: SessionDrawerContentQuery$data;\n variables: SessionDrawerContentQuery$variables;\n};\n\nconst node: ConcreteRequest = {\n \"fragment\": {\n \"argumentDefinitions\": [],\n \"kind\": \"Fragment\",\n \"metadata\": null,\n \"name\": \"SessionDrawerContentQuery\",\n \"selections\": [\n {\n \"args\": null,\n \"kind\": \"FragmentSpread\",\n \"name\": \"SessionList_sessions\"\n }\n ],\n \"type\": \"Query\",\n \"abstractKey\": null\n },\n \"kind\": \"Request\",\n \"operation\": {\n \"argumentDefinitions\": [],\n \"kind\": \"Operation\",\n \"name\": \"SessionDrawerContentQuery\",\n \"selections\": [\n {\n \"alias\": null,\n \"args\": null,\n \"concreteType\": \"SessionPayload\",\n \"kind\": \"LinkedField\",\n \"name\": \"sessions\",\n \"plural\": true,\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\": \"current\",\n \"storageKey\": null\n },\n {\n \"alias\": null,\n \"args\": null,\n \"kind\": \"ScalarField\",\n \"name\": \"lastSeenAt\",\n \"storageKey\": null\n },\n {\n \"alias\": null,\n \"args\": null,\n \"kind\": \"ScalarField\",\n \"name\": \"isApp\",\n \"storageKey\": null\n },\n {\n \"alias\": null,\n \"args\": null,\n \"kind\": \"ScalarField\",\n \"name\": \"browserName\",\n \"storageKey\": null\n },\n {\n \"alias\": null,\n \"args\": null,\n \"kind\": \"ScalarField\",\n \"name\": \"browserVersion\",\n \"storageKey\": null\n },\n {\n \"alias\": null,\n \"args\": null,\n \"kind\": \"ScalarField\",\n \"name\": \"osName\",\n \"storageKey\": null\n },\n {\n \"alias\": null,\n \"args\": null,\n \"kind\": \"ScalarField\",\n \"name\": \"osVersion\",\n \"storageKey\": null\n },\n {\n \"alias\": null,\n \"args\": null,\n \"kind\": \"ScalarField\",\n \"name\": \"deviceType\",\n \"storageKey\": null\n },\n {\n \"alias\": null,\n \"args\": null,\n \"kind\": \"ScalarField\",\n \"name\": \"deviceName\",\n \"storageKey\": null\n },\n {\n \"alias\": null,\n \"args\": null,\n \"kind\": \"ScalarField\",\n \"name\": \"deviceManufacturer\",\n \"storageKey\": null\n },\n {\n \"alias\": null,\n \"args\": null,\n \"kind\": \"ScalarField\",\n \"name\": \"deviceBrand\",\n \"storageKey\": null\n },\n {\n \"alias\": null,\n \"args\": null,\n \"kind\": \"ScalarField\",\n \"name\": \"deviceModel\",\n \"storageKey\": null\n },\n {\n \"alias\": null,\n \"args\": null,\n \"kind\": \"ScalarField\",\n \"name\": \"ip\",\n \"storageKey\": null\n },\n {\n \"alias\": null,\n \"args\": null,\n \"kind\": \"ScalarField\",\n \"name\": \"country\",\n \"storageKey\": null\n },\n {\n \"alias\": null,\n \"args\": null,\n \"kind\": \"ScalarField\",\n \"name\": \"city\",\n \"storageKey\": null\n }\n ],\n \"storageKey\": null\n }\n ]\n },\n \"params\": {\n \"cacheID\": \"cc7ef83584759c724bbad21b528477c2\",\n \"id\": null,\n \"metadata\": {},\n \"name\": \"SessionDrawerContentQuery\",\n \"operationKind\": \"query\",\n \"text\": \"query SessionDrawerContentQuery {\\n ...SessionList_sessions\\n}\\n\\nfragment SessionListItem_session on SessionPayload {\\n id\\n isApp\\n browserName\\n browserVersion\\n osName\\n osVersion\\n deviceType\\n deviceName\\n deviceManufacturer\\n deviceBrand\\n deviceModel\\n ip\\n country\\n city\\n lastSeenAt\\n}\\n\\nfragment SessionList_sessions on Query {\\n sessions {\\n id\\n current\\n lastSeenAt\\n ...SessionListItem_session\\n }\\n}\\n\"\n }\n};\n\n(node as any).hash = \"1643ac6b9bd324d389dab9011e55b1ba\";\n\nexport default node;\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;;AAEA
|
|
1
|
+
{"version":3,"file":"SessionDrawerContentQuery.graphql.js","names":["node","hash"],"sources":["../../../../../src/lib/components/session/__generated__/SessionDrawerContentQuery.graphql.ts"],"sourcesContent":["/**\n * @generated SignedSource<<3d3e12b4f2082ce4b7758021424fdae3>>\n * @lightSyntaxTransform\n * @nogrep\n */\n\n/* tslint:disable */\n/* eslint-disable */\n// @ts-nocheck\n\nimport { ConcreteRequest, Query } from 'relay-runtime';\nimport { FragmentRefs } from \"relay-runtime\";\nexport type SessionDrawerContentQuery$variables = {};\nexport type SessionDrawerContentQuery$data = {\n readonly \" $fragmentSpreads\": FragmentRefs<\"SessionList_sessions\">;\n};\nexport type SessionDrawerContentQuery = {\n response: SessionDrawerContentQuery$data;\n variables: SessionDrawerContentQuery$variables;\n};\n\nconst node: ConcreteRequest = {\n \"fragment\": {\n \"argumentDefinitions\": [],\n \"kind\": \"Fragment\",\n \"metadata\": null,\n \"name\": \"SessionDrawerContentQuery\",\n \"selections\": [\n {\n \"args\": null,\n \"kind\": \"FragmentSpread\",\n \"name\": \"SessionList_sessions\"\n }\n ],\n \"type\": \"Query\",\n \"abstractKey\": null\n },\n \"kind\": \"Request\",\n \"operation\": {\n \"argumentDefinitions\": [],\n \"kind\": \"Operation\",\n \"name\": \"SessionDrawerContentQuery\",\n \"selections\": [\n {\n \"alias\": null,\n \"args\": null,\n \"concreteType\": \"SessionPayload\",\n \"kind\": \"LinkedField\",\n \"name\": \"sessions\",\n \"plural\": true,\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\": \"current\",\n \"storageKey\": null\n },\n {\n \"alias\": null,\n \"args\": null,\n \"kind\": \"ScalarField\",\n \"name\": \"lastSeenAt\",\n \"storageKey\": null\n },\n {\n \"alias\": null,\n \"args\": null,\n \"kind\": \"ScalarField\",\n \"name\": \"isApp\",\n \"storageKey\": null\n },\n {\n \"alias\": null,\n \"args\": null,\n \"kind\": \"ScalarField\",\n \"name\": \"browserName\",\n \"storageKey\": null\n },\n {\n \"alias\": null,\n \"args\": null,\n \"kind\": \"ScalarField\",\n \"name\": \"browserVersion\",\n \"storageKey\": null\n },\n {\n \"alias\": null,\n \"args\": null,\n \"kind\": \"ScalarField\",\n \"name\": \"osName\",\n \"storageKey\": null\n },\n {\n \"alias\": null,\n \"args\": null,\n \"kind\": \"ScalarField\",\n \"name\": \"osVersion\",\n \"storageKey\": null\n },\n {\n \"alias\": null,\n \"args\": null,\n \"kind\": \"ScalarField\",\n \"name\": \"deviceType\",\n \"storageKey\": null\n },\n {\n \"alias\": null,\n \"args\": null,\n \"kind\": \"ScalarField\",\n \"name\": \"deviceName\",\n \"storageKey\": null\n },\n {\n \"alias\": null,\n \"args\": null,\n \"kind\": \"ScalarField\",\n \"name\": \"deviceManufacturer\",\n \"storageKey\": null\n },\n {\n \"alias\": null,\n \"args\": null,\n \"kind\": \"ScalarField\",\n \"name\": \"deviceBrand\",\n \"storageKey\": null\n },\n {\n \"alias\": null,\n \"args\": null,\n \"kind\": \"ScalarField\",\n \"name\": \"deviceModel\",\n \"storageKey\": null\n },\n {\n \"alias\": null,\n \"args\": null,\n \"kind\": \"ScalarField\",\n \"name\": \"ip\",\n \"storageKey\": null\n },\n {\n \"alias\": null,\n \"args\": null,\n \"kind\": \"ScalarField\",\n \"name\": \"country\",\n \"storageKey\": null\n },\n {\n \"alias\": null,\n \"args\": null,\n \"kind\": \"ScalarField\",\n \"name\": \"city\",\n \"storageKey\": null\n }\n ],\n \"storageKey\": null\n }\n ]\n },\n \"params\": {\n \"cacheID\": \"cc7ef83584759c724bbad21b528477c2\",\n \"id\": null,\n \"metadata\": {},\n \"name\": \"SessionDrawerContentQuery\",\n \"operationKind\": \"query\",\n \"text\": \"query SessionDrawerContentQuery {\\n ...SessionList_sessions\\n}\\n\\nfragment SessionListItem_session on SessionPayload {\\n id\\n isApp\\n browserName\\n browserVersion\\n osName\\n osVersion\\n deviceType\\n deviceName\\n deviceManufacturer\\n deviceBrand\\n deviceModel\\n ip\\n country\\n city\\n lastSeenAt\\n}\\n\\nfragment SessionList_sessions on Query {\\n sessions {\\n id\\n current\\n lastSeenAt\\n ...SessionListItem_session\\n }\\n}\\n\"\n }\n};\n\n(node as any).hash = \"1643ac6b9bd324d389dab9011e55b1ba\";\n\nexport default node;\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAaA,MAAMA,IAAqB,GAAG;EAC5B,UAAU,EAAE;IACV,qBAAqB,EAAE,EAAE;IACzB,MAAM,EAAE,UAAU;IAClB,UAAU,EAAE,IAAI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M,EAAE,IAAI;QACZ,MAAM,EAAE,aAAa;QACrB,MAAM,EAAE,MAAM;QACd,YAAY,EAAE;MAChB,CAAC,CACF;MACD,YAAY,EAAE;IAChB,CAAC;EAEL,CAAC;EACD,QAAQ,EAAE;IACR,SAAS,EAAE,kCAAkC;IAC7C,IAAI,EAAE,IAAI;IACV,UAAU,EAAE,CAAC,CAAC;IACd,MAAM,EAAE,2BAA2B;IACnC,eAAe,EAAE,OAAO;IACxB,MAAM,EAAE;EACV;AACF,CAAC;AAEAA,IAAI,CAASC,IAAI,GAAG,kCAAkC;AAEvD,eAAeD,IAAI"}
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
/* tslint:disable */
|
|
8
|
-
|
|
9
8
|
/* eslint-disable */
|
|
10
9
|
// @ts-nocheck
|
|
10
|
+
|
|
11
11
|
const node = function () {
|
|
12
12
|
var v0 = [{
|
|
13
13
|
"alias": null,
|
|
@@ -31,9 +31,7 @@ const node = function () {
|
|
|
31
31
|
"kind": "Fragment",
|
|
32
32
|
"metadata": null,
|
|
33
33
|
"name": "SessionListDestroyAllOtherSessionsMutation",
|
|
34
|
-
"selections": v0
|
|
35
|
-
/*: any*/
|
|
36
|
-
,
|
|
34
|
+
"selections": v0 /*: any*/,
|
|
37
35
|
"type": "Mutation",
|
|
38
36
|
"abstractKey": null
|
|
39
37
|
},
|
|
@@ -42,10 +40,9 @@ const node = function () {
|
|
|
42
40
|
"argumentDefinitions": [],
|
|
43
41
|
"kind": "Operation",
|
|
44
42
|
"name": "SessionListDestroyAllOtherSessionsMutation",
|
|
45
|
-
"selections": v0
|
|
46
|
-
/*: any*/
|
|
47
|
-
|
|
43
|
+
"selections": v0 /*: any*/
|
|
48
44
|
},
|
|
45
|
+
|
|
49
46
|
"params": {
|
|
50
47
|
"cacheID": "c6f556336ccb31f27b1c2f13c2ea9c06",
|
|
51
48
|
"id": null,
|
|
@@ -56,7 +53,6 @@ const node = function () {
|
|
|
56
53
|
}
|
|
57
54
|
};
|
|
58
55
|
}();
|
|
59
|
-
|
|
60
56
|
node.hash = "016b6b5e7ae228f7df552d97fa43bd40";
|
|
61
57
|
export default node;
|
|
62
58
|
//# sourceMappingURL=SessionListDestroyAllOtherSessionsMutation.graphql.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SessionListDestroyAllOtherSessionsMutation.graphql.js","names":["node","v0","hash"],"sources":["../../../../../src/lib/components/session/__generated__/SessionListDestroyAllOtherSessionsMutation.graphql.ts"],"sourcesContent":["/**\n * @generated SignedSource<<6494414e61957261dfdc6fec7a9a1df7>>\n * @lightSyntaxTransform\n * @nogrep\n */\n\n/* tslint:disable */\n/* eslint-disable */\n// @ts-nocheck\n\nimport { ConcreteRequest, Mutation } from 'relay-runtime';\nexport type SessionListDestroyAllOtherSessionsMutation$variables = {};\nexport type SessionListDestroyAllOtherSessionsMutation$data = {\n readonly destroyAllOtherSessions: {\n readonly ok: boolean;\n };\n};\nexport type SessionListDestroyAllOtherSessionsMutation = {\n response: SessionListDestroyAllOtherSessionsMutation$data;\n variables: SessionListDestroyAllOtherSessionsMutation$variables;\n};\n\nconst node: ConcreteRequest = (function(){\nvar v0 = [\n {\n \"alias\": null,\n \"args\": null,\n \"concreteType\": \"StatusPayload\",\n \"kind\": \"LinkedField\",\n \"name\": \"destroyAllOtherSessions\",\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\": \"SessionListDestroyAllOtherSessionsMutation\",\n \"selections\": (v0/*: any*/),\n \"type\": \"Mutation\",\n \"abstractKey\": null\n },\n \"kind\": \"Request\",\n \"operation\": {\n \"argumentDefinitions\": [],\n \"kind\": \"Operation\",\n \"name\": \"SessionListDestroyAllOtherSessionsMutation\",\n \"selections\": (v0/*: any*/)\n },\n \"params\": {\n \"cacheID\": \"c6f556336ccb31f27b1c2f13c2ea9c06\",\n \"id\": null,\n \"metadata\": {},\n \"name\": \"SessionListDestroyAllOtherSessionsMutation\",\n \"operationKind\": \"mutation\",\n \"text\": \"mutation SessionListDestroyAllOtherSessionsMutation {\\n destroyAllOtherSessions {\\n ok\\n }\\n}\\n\"\n }\n};\n})();\n\n(node as any).hash = \"016b6b5e7ae228f7df552d97fa43bd40\";\n\nexport default node;\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;;AAEA
|
|
1
|
+
{"version":3,"file":"SessionListDestroyAllOtherSessionsMutation.graphql.js","names":["node","v0","hash"],"sources":["../../../../../src/lib/components/session/__generated__/SessionListDestroyAllOtherSessionsMutation.graphql.ts"],"sourcesContent":["/**\n * @generated SignedSource<<6494414e61957261dfdc6fec7a9a1df7>>\n * @lightSyntaxTransform\n * @nogrep\n */\n\n/* tslint:disable */\n/* eslint-disable */\n// @ts-nocheck\n\nimport { ConcreteRequest, Mutation } from 'relay-runtime';\nexport type SessionListDestroyAllOtherSessionsMutation$variables = {};\nexport type SessionListDestroyAllOtherSessionsMutation$data = {\n readonly destroyAllOtherSessions: {\n readonly ok: boolean;\n };\n};\nexport type SessionListDestroyAllOtherSessionsMutation = {\n response: SessionListDestroyAllOtherSessionsMutation$data;\n variables: SessionListDestroyAllOtherSessionsMutation$variables;\n};\n\nconst node: ConcreteRequest = (function(){\nvar v0 = [\n {\n \"alias\": null,\n \"args\": null,\n \"concreteType\": \"StatusPayload\",\n \"kind\": \"LinkedField\",\n \"name\": \"destroyAllOtherSessions\",\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\": \"SessionListDestroyAllOtherSessionsMutation\",\n \"selections\": (v0/*: any*/),\n \"type\": \"Mutation\",\n \"abstractKey\": null\n },\n \"kind\": \"Request\",\n \"operation\": {\n \"argumentDefinitions\": [],\n \"kind\": \"Operation\",\n \"name\": \"SessionListDestroyAllOtherSessionsMutation\",\n \"selections\": (v0/*: any*/)\n },\n \"params\": {\n \"cacheID\": \"c6f556336ccb31f27b1c2f13c2ea9c06\",\n \"id\": null,\n \"metadata\": {},\n \"name\": \"SessionListDestroyAllOtherSessionsMutation\",\n \"operationKind\": \"mutation\",\n \"text\": \"mutation SessionListDestroyAllOtherSessionsMutation {\\n destroyAllOtherSessions {\\n ok\\n }\\n}\\n\"\n }\n};\n})();\n\n(node as any).hash = \"016b6b5e7ae228f7df552d97fa43bd40\";\n\nexport default node;\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAcA,MAAMA,IAAqB,GAAI,YAAU;EACzC,IAAIC,EAAE,GAAG,CACP;IACE,OAAO,EAAE,IAAI;IACb,MAAM,EAAE,IAAI;IACZ,cAAc,EAAE,eAAe;IAC/B,MAAM,EAAE,aAAa;IACrB,MAAM,EAAE,yBAAyB;IACjC,QAAQ,EAAE,KAAK;IACf,YAAY,EAAE,CACZ;MACE,OAAO,EAAE,IAAI;MACb,MAAM,EAAE,IAAI;MACZ,MAAM,EAAE,aAAa;MACrB,MAAM,EAAE,IAAI;MACZ,YAAY,EAAE;IAChB,CAAC,CACF;IACD,YAAY,EAAE;EAChB,CAAC,CACF;EACD,OAAO;IACL,UAAU,EAAE;MACV,qBAAqB,EAAE,EAAE;MACzB,MAAM,EAAE,UAAU;MAClB,UAAU,EAAE,IAAI;MAChB,MAAM,EAAE,4CAA4C;MACpD,YAAY,EAAGA,EAAE,UAAU;MAC3B,MAAM,EAAE,UAAU;MAClB,aAAa,EAAE;IACjB,CAAC;IACD,MAAM,EAAE,SAAS;IACjB,WAAW,EAAE;MACX,qBAAqB,EAAE,EAAE;MACzB,MAAM,EAAE,WAAW;MACnB,MAAM,EAAE,4CAA4C;MACpD,YAAY,EAAGA,EAAE;IACnB,CAAC;;IACD,QAAQ,EAAE;MACR,SAAS,EAAE,kCAAkC;MAC7C,IAAI,EAAE,IAAI;MACV,UAAU,EAAE,CAAC,CAAC;MACd,MAAM,EAAE,4CAA4C;MACpD,eAAe,EAAE,UAAU;MAC3B,MAAM,EAAE;IACV;EACF,CAAC;AACD,CAAC,EAAG;AAEHD,IAAI,CAASE,IAAI,GAAG,kCAAkC;AAEvD,eAAeF,IAAI"}
|
package/dist/esm/components/session/__generated__/SessionListItemDestroySessionMutation.graphql.js
CHANGED
|
@@ -5,60 +5,53 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
/* tslint:disable */
|
|
8
|
-
|
|
9
8
|
/* eslint-disable */
|
|
10
9
|
// @ts-nocheck
|
|
10
|
+
|
|
11
11
|
const node = function () {
|
|
12
12
|
var v0 = [{
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
}],
|
|
17
|
-
v1 = [{
|
|
18
|
-
"alias": null,
|
|
19
|
-
"args": [{
|
|
20
|
-
"kind": "Variable",
|
|
21
|
-
"name": "input",
|
|
22
|
-
"variableName": "input"
|
|
13
|
+
"defaultValue": null,
|
|
14
|
+
"kind": "LocalArgument",
|
|
15
|
+
"name": "input"
|
|
23
16
|
}],
|
|
24
|
-
|
|
25
|
-
"kind": "LinkedField",
|
|
26
|
-
"name": "destroySession",
|
|
27
|
-
"plural": false,
|
|
28
|
-
"selections": [{
|
|
17
|
+
v1 = [{
|
|
29
18
|
"alias": null,
|
|
30
|
-
"args":
|
|
31
|
-
|
|
32
|
-
|
|
19
|
+
"args": [{
|
|
20
|
+
"kind": "Variable",
|
|
21
|
+
"name": "input",
|
|
22
|
+
"variableName": "input"
|
|
23
|
+
}],
|
|
24
|
+
"concreteType": "StatusPayload",
|
|
25
|
+
"kind": "LinkedField",
|
|
26
|
+
"name": "destroySession",
|
|
27
|
+
"plural": false,
|
|
28
|
+
"selections": [{
|
|
29
|
+
"alias": null,
|
|
30
|
+
"args": null,
|
|
31
|
+
"kind": "ScalarField",
|
|
32
|
+
"name": "ok",
|
|
33
|
+
"storageKey": null
|
|
34
|
+
}],
|
|
33
35
|
"storageKey": null
|
|
34
|
-
}]
|
|
35
|
-
"storageKey": null
|
|
36
|
-
}];
|
|
36
|
+
}];
|
|
37
37
|
return {
|
|
38
38
|
"fragment": {
|
|
39
|
-
"argumentDefinitions": v0
|
|
40
|
-
/*: any*/
|
|
41
|
-
,
|
|
39
|
+
"argumentDefinitions": v0 /*: any*/,
|
|
42
40
|
"kind": "Fragment",
|
|
43
41
|
"metadata": null,
|
|
44
42
|
"name": "SessionListItemDestroySessionMutation",
|
|
45
|
-
"selections": v1
|
|
46
|
-
/*: any*/
|
|
47
|
-
,
|
|
43
|
+
"selections": v1 /*: any*/,
|
|
48
44
|
"type": "Mutation",
|
|
49
45
|
"abstractKey": null
|
|
50
46
|
},
|
|
51
47
|
"kind": "Request",
|
|
52
48
|
"operation": {
|
|
53
|
-
"argumentDefinitions": v0
|
|
54
|
-
/*: any*/
|
|
55
|
-
,
|
|
49
|
+
"argumentDefinitions": v0 /*: any*/,
|
|
56
50
|
"kind": "Operation",
|
|
57
51
|
"name": "SessionListItemDestroySessionMutation",
|
|
58
|
-
"selections": v1
|
|
59
|
-
/*: any*/
|
|
60
|
-
|
|
52
|
+
"selections": v1 /*: any*/
|
|
61
53
|
},
|
|
54
|
+
|
|
62
55
|
"params": {
|
|
63
56
|
"cacheID": "e967c31f65aa17e8ed5d6184f1f37c9d",
|
|
64
57
|
"id": null,
|
|
@@ -69,7 +62,6 @@ const node = function () {
|
|
|
69
62
|
}
|
|
70
63
|
};
|
|
71
64
|
}();
|
|
72
|
-
|
|
73
65
|
node.hash = "ad6c0d1313a70dd63c0baccc2f7abd6e";
|
|
74
66
|
export default node;
|
|
75
67
|
//# sourceMappingURL=SessionListItemDestroySessionMutation.graphql.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SessionListItemDestroySessionMutation.graphql.js","names":["node","v0","v1","hash"],"sources":["../../../../../src/lib/components/session/__generated__/SessionListItemDestroySessionMutation.graphql.ts"],"sourcesContent":["/**\n * @generated SignedSource<<18abf6e996d326f8baadb8c340dc8b9d>>\n * @lightSyntaxTransform\n * @nogrep\n */\n\n/* tslint:disable */\n/* eslint-disable */\n// @ts-nocheck\n\nimport { ConcreteRequest, Mutation } from 'relay-runtime';\nexport type DestroySessionInput = {\n id: string;\n};\nexport type SessionListItemDestroySessionMutation$variables = {\n input: DestroySessionInput;\n};\nexport type SessionListItemDestroySessionMutation$data = {\n readonly destroySession: {\n readonly ok: boolean;\n };\n};\nexport type SessionListItemDestroySessionMutation = {\n response: SessionListItemDestroySessionMutation$data;\n variables: SessionListItemDestroySessionMutation$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\": \"StatusPayload\",\n \"kind\": \"LinkedField\",\n \"name\": \"destroySession\",\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\": (v0/*: any*/),\n \"kind\": \"Fragment\",\n \"metadata\": null,\n \"name\": \"SessionListItemDestroySessionMutation\",\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\": \"SessionListItemDestroySessionMutation\",\n \"selections\": (v1/*: any*/)\n },\n \"params\": {\n \"cacheID\": \"e967c31f65aa17e8ed5d6184f1f37c9d\",\n \"id\": null,\n \"metadata\": {},\n \"name\": \"SessionListItemDestroySessionMutation\",\n \"operationKind\": \"mutation\",\n \"text\": \"mutation SessionListItemDestroySessionMutation(\\n $input: DestroySessionInput!\\n) {\\n destroySession(input: $input) {\\n ok\\n }\\n}\\n\"\n }\n};\n})();\n\n(node as any).hash = \"ad6c0d1313a70dd63c0baccc2f7abd6e\";\n\nexport default node;\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;;AAEA
|
|
1
|
+
{"version":3,"file":"SessionListItemDestroySessionMutation.graphql.js","names":["node","v0","v1","hash"],"sources":["../../../../../src/lib/components/session/__generated__/SessionListItemDestroySessionMutation.graphql.ts"],"sourcesContent":["/**\n * @generated SignedSource<<18abf6e996d326f8baadb8c340dc8b9d>>\n * @lightSyntaxTransform\n * @nogrep\n */\n\n/* tslint:disable */\n/* eslint-disable */\n// @ts-nocheck\n\nimport { ConcreteRequest, Mutation } from 'relay-runtime';\nexport type DestroySessionInput = {\n id: string;\n};\nexport type SessionListItemDestroySessionMutation$variables = {\n input: DestroySessionInput;\n};\nexport type SessionListItemDestroySessionMutation$data = {\n readonly destroySession: {\n readonly ok: boolean;\n };\n};\nexport type SessionListItemDestroySessionMutation = {\n response: SessionListItemDestroySessionMutation$data;\n variables: SessionListItemDestroySessionMutation$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\": \"StatusPayload\",\n \"kind\": \"LinkedField\",\n \"name\": \"destroySession\",\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\": (v0/*: any*/),\n \"kind\": \"Fragment\",\n \"metadata\": null,\n \"name\": \"SessionListItemDestroySessionMutation\",\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\": \"SessionListItemDestroySessionMutation\",\n \"selections\": (v1/*: any*/)\n },\n \"params\": {\n \"cacheID\": \"e967c31f65aa17e8ed5d6184f1f37c9d\",\n \"id\": null,\n \"metadata\": {},\n \"name\": \"SessionListItemDestroySessionMutation\",\n \"operationKind\": \"mutation\",\n \"text\": \"mutation SessionListItemDestroySessionMutation(\\n $input: DestroySessionInput!\\n) {\\n destroySession(input: $input) {\\n ok\\n }\\n}\\n\"\n }\n};\n})();\n\n(node as any).hash = \"ad6c0d1313a70dd63c0baccc2f7abd6e\";\n\nexport default node;\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAmBA,MAAMA,IAAqB,GAAI,YAAU;EACzC,IAAIC,EAAE,GAAG,CACP;MACE,cAAc,EAAE,IAAI;MACpB,MAAM,EAAE,eAAe;MACvB,MAAM,EAAE;IACV,CAAC,CACF;IACDC,EAAE,GAAG,CACH;MACE,OAAO,EAAE,IAAI;MACb,MAAM,EAAE,CACN;QACE,MAAM,EAAE,UAAU;QAClB,MAAM,EAAE,OAAO;QACf,cAAc,EAAE;MAClB,CAAC,CACF;MACD,cAAc,EAAE,eAAe;MAC/B,MAAM,EAAE,aAAa;MACrB,MAAM,EAAE,gBAAgB;MACxB,QAAQ,EAAE,KAAK;MACf,YAAY,EAAE,CACZ;QACE,OAAO,EAAE,IAAI;QACb,MAAM,EAAE,IAAI;QACZ,MAAM,EAAE,aAAa;QACrB,MAAM,EAAE,IAAI;QACZ,YAAY,EAAE;MAChB,CAAC,CACF;MACD,YAAY,EAAE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