@os-team/profile 1.0.36 → 1.0.39

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/dist/cjs/components/profile/ProfileDrawer.js +19 -232
  2. package/dist/cjs/components/profile/ProfileDrawer.js.map +1 -1
  3. package/dist/cjs/components/profile/ProfileDrawerContent.js +259 -0
  4. package/dist/cjs/components/profile/ProfileDrawerContent.js.map +1 -0
  5. package/dist/cjs/components/profile/ProfileUpdateNameForm.js.map +1 -1
  6. package/dist/cjs/components/profile/ProfileUpdatePasswordForm.js.map +1 -1
  7. package/dist/cjs/components/profile/ProtectedWrapper.js.map +1 -1
  8. package/dist/cjs/components/profile/__generated__/ProfileDrawerContentSignOutMutation.graphql.js +70 -0
  9. package/dist/cjs/components/profile/__generated__/ProfileDrawerContentSignOutMutation.graphql.js.map +1 -0
  10. package/dist/cjs/components/profile/__generated__/ProfileDrawerContentUpdateAvatarMutation.graphql.js +89 -0
  11. package/dist/cjs/components/profile/__generated__/ProfileDrawerContentUpdateAvatarMutation.graphql.js.map +1 -0
  12. package/dist/cjs/components/session/SessionDrawer.js +17 -10
  13. package/dist/cjs/components/session/SessionDrawer.js.map +1 -1
  14. package/dist/cjs/components/session/SessionDrawerContent.js +1 -4
  15. package/dist/cjs/components/session/SessionDrawerContent.js.map +1 -1
  16. package/dist/esm/components/profile/ProfileDrawer.js +12 -196
  17. package/dist/esm/components/profile/ProfileDrawer.js.map +1 -1
  18. package/dist/esm/components/profile/ProfileDrawerContent.js +201 -0
  19. package/dist/esm/components/profile/ProfileDrawerContent.js.map +1 -0
  20. package/dist/esm/components/profile/ProfileUpdateNameForm.js.map +1 -1
  21. package/dist/esm/components/profile/ProfileUpdatePasswordForm.js.map +1 -1
  22. package/dist/esm/components/profile/ProtectedWrapper.js.map +1 -1
  23. package/dist/esm/components/profile/__generated__/ProfileDrawerContentSignOutMutation.graphql.js +62 -0
  24. package/dist/esm/components/profile/__generated__/ProfileDrawerContentSignOutMutation.graphql.js.map +1 -0
  25. package/dist/esm/components/profile/__generated__/ProfileDrawerContentUpdateAvatarMutation.graphql.js +81 -0
  26. package/dist/esm/components/profile/__generated__/ProfileDrawerContentUpdateAvatarMutation.graphql.js.map +1 -0
  27. package/dist/esm/components/session/SessionDrawer.js +7 -4
  28. package/dist/esm/components/session/SessionDrawer.js.map +1 -1
  29. package/dist/esm/components/session/SessionDrawerContent.js +0 -1
  30. package/dist/esm/components/session/SessionDrawerContent.js.map +1 -1
  31. package/dist/types/components/profile/ProfileDrawer.d.ts +2 -3
  32. package/dist/types/components/profile/ProfileDrawer.d.ts.map +1 -1
  33. package/dist/types/components/profile/ProfileDrawerContent.d.ts +8 -0
  34. package/dist/types/components/profile/ProfileDrawerContent.d.ts.map +1 -0
  35. package/dist/types/components/profile/ProfileUpdateNameForm.d.ts +4 -1
  36. package/dist/types/components/profile/ProfileUpdateNameForm.d.ts.map +1 -1
  37. package/dist/types/components/profile/ProfileUpdatePasswordForm.d.ts +4 -1
  38. package/dist/types/components/profile/ProfileUpdatePasswordForm.d.ts.map +1 -1
  39. package/dist/types/components/profile/ProtectedWrapper.d.ts +1 -0
  40. package/dist/types/components/profile/ProtectedWrapper.d.ts.map +1 -1
  41. package/dist/types/components/profile/__generated__/ProfileDrawerContentSignOutMutation.graphql.d.ts +14 -0
  42. package/dist/types/components/profile/__generated__/ProfileDrawerContentSignOutMutation.graphql.d.ts.map +1 -0
  43. package/dist/types/components/profile/__generated__/ProfileDrawerContentUpdateAvatarMutation.graphql.d.ts +20 -0
  44. package/dist/types/components/profile/__generated__/ProfileDrawerContentUpdateAvatarMutation.graphql.d.ts.map +1 -0
  45. package/dist/types/components/session/SessionDrawer.d.ts.map +1 -1
  46. package/dist/types/components/session/SessionDrawerContent.d.ts +0 -1
  47. package/dist/types/components/session/SessionDrawerContent.d.ts.map +1 -1
  48. package/package.json +47 -47
@@ -0,0 +1,201 @@
1
+ var _ProfileDrawerContentUpdateAvatarMutation, _ProfileDrawerContentSignOutMutation;
2
+
3
+ import React, { useCallback, useMemo, useRef, useState } from 'react';
4
+ import { message, ThemeSwitcher } from '@os-design/core';
5
+ import styled from '@emotion/styled';
6
+ import { clr } from '@os-design/theming';
7
+ import { useTranslation } from 'react-i18next';
8
+ import { useMutation } from 'react-relay/hooks';
9
+ import UserAvatar from './UserAvatar';
10
+ import { useProfile } from './ProfileContext';
11
+ import ProfileButton from './ProfileButton';
12
+ import ProfileUpdateNameModal from './ProfileUpdateNameModal';
13
+ import ProfileUpdatePasswordModal from './ProfileUpdatePasswordModal';
14
+ const AvatarContainer = styled.div`
15
+ display: flex;
16
+ flex-direction: column;
17
+ justify-content: center;
18
+ align-items: center;
19
+ `;
20
+ const UserContent = styled.div`
21
+ margin-top: 1em;
22
+ `;
23
+ const FullName = styled.div`
24
+ font-size: ${p => p.theme.sizes.large}em;
25
+ font-weight: 500;
26
+ text-align: center;
27
+ line-height: 1.2;
28
+ `;
29
+ const Email = styled.div`
30
+ color: ${p => clr(p.theme.inputColorPlaceholder)};
31
+ margin-top: 0.2em;
32
+ text-align: center;
33
+ `;
34
+ const ActionsContainer = styled.div`
35
+ margin-top: 1.5em;
36
+ `;
37
+ const Footer = styled.div`
38
+ display: flex;
39
+ justify-content: center;
40
+ margin-top: auto;
41
+ padding-top: 1.5em;
42
+ `;
43
+ const HiddenInput = styled.input`
44
+ display: none;
45
+ `;
46
+ const profileDrawerContentUpdateAvatarMutation = _ProfileDrawerContentUpdateAvatarMutation !== void 0 ? _ProfileDrawerContentUpdateAvatarMutation : (_ProfileDrawerContentUpdateAvatarMutation = require("./__generated__/ProfileDrawerContentUpdateAvatarMutation.graphql"), _ProfileDrawerContentUpdateAvatarMutation.hash && _ProfileDrawerContentUpdateAvatarMutation.hash !== "cf72a6314772ed0d1f182b197c858505" && console.error("The definition of 'ProfileDrawerContentUpdateAvatarMutation' appears to have changed. Run `relay-compiler` to update the generated files to receive the expected data."), _ProfileDrawerContentUpdateAvatarMutation);
47
+
48
+ const DeleteAvatarButton = () => {
49
+ const {
50
+ t
51
+ } = useTranslation('profile');
52
+ const [commit, loading] = useMutation(profileDrawerContentUpdateAvatarMutation);
53
+ const handler = useCallback(() => {
54
+ commit({
55
+ variables: {
56
+ input: {
57
+ avatar: null
58
+ }
59
+ },
60
+ onError: error => {
61
+ var _source, _source$errors, _source$errors$;
62
+
63
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
64
+ message.error((_source = error.source) === null || _source === void 0 ? void 0 : (_source$errors = _source.errors) === null || _source$errors === void 0 ? void 0 : (_source$errors$ = _source$errors[0]) === null || _source$errors$ === void 0 ? void 0 : _source$errors$.message);
65
+ },
66
+ onCompleted: () => {
67
+ message.success(t('profile:updated'));
68
+ }
69
+ });
70
+ }, [commit, t]);
71
+ return /*#__PURE__*/React.createElement(ProfileButton, {
72
+ loading: loading,
73
+ onClick: handler
74
+ }, t('profile:deleteAvatar'));
75
+ };
76
+
77
+ const UpdateAvatarButton = ({
78
+ hasAvatar
79
+ }) => {
80
+ const {
81
+ t
82
+ } = useTranslation('profile');
83
+ const fileInputRef = useRef(null);
84
+ const [commit, loading] = useMutation(profileDrawerContentUpdateAvatarMutation);
85
+ const handler = useCallback(e => {
86
+ const target = e.target;
87
+ if (!target) return;
88
+ const {
89
+ files
90
+ } = target;
91
+ if (!files) return;
92
+ const file = files[0];
93
+ commit({
94
+ variables: {
95
+ input: {}
96
+ },
97
+ uploadables: {
98
+ avatar: file
99
+ },
100
+ onError: error => {
101
+ var _source2, _source2$errors, _source2$errors$;
102
+
103
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
104
+ message.error((_source2 = error.source) === null || _source2 === void 0 ? void 0 : (_source2$errors = _source2.errors) === null || _source2$errors === void 0 ? void 0 : (_source2$errors$ = _source2$errors[0]) === null || _source2$errors$ === void 0 ? void 0 : _source2$errors$.message);
105
+ },
106
+ onCompleted: () => {
107
+ message.success(t('profile:updated'));
108
+ }
109
+ });
110
+ }, [commit, t]);
111
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(ProfileButton, {
112
+ loading: loading,
113
+ onClick: () => {
114
+ if (!fileInputRef.current) return;
115
+ fileInputRef.current.value = '';
116
+ fileInputRef.current.click();
117
+ }
118
+ }, t(`profile:${hasAvatar ? 'changeAvatar' : 'setAvatar'}`)), /*#__PURE__*/React.createElement(HiddenInput, {
119
+ type: "file",
120
+ accept: "image/jpeg,image/png,image/webp",
121
+ onChange: handler,
122
+ ref: fileInputRef
123
+ }));
124
+ };
125
+
126
+ const UpdateNameButton = ({
127
+ hasName
128
+ }) => {
129
+ const {
130
+ t
131
+ } = useTranslation('profile');
132
+ const [modalVisibility, setModalVisibility] = useState(false);
133
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(ProfileButton, {
134
+ onClick: () => setModalVisibility(true)
135
+ }, t(`profile:${hasName ? 'changeName' : 'setName'}`)), /*#__PURE__*/React.createElement(ProfileUpdateNameModal, {
136
+ visibility: modalVisibility,
137
+ onClose: () => setModalVisibility(false)
138
+ }));
139
+ };
140
+
141
+ const ChangePasswordButton = () => {
142
+ const {
143
+ t
144
+ } = useTranslation('profile');
145
+ const [modalVisibility, setModalVisibility] = useState(false);
146
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(ProfileButton, {
147
+ onClick: () => setModalVisibility(true)
148
+ }, t('profile:changePassword')), /*#__PURE__*/React.createElement(ProfileUpdatePasswordModal, {
149
+ visibility: modalVisibility,
150
+ onClose: () => setModalVisibility(false)
151
+ }));
152
+ };
153
+
154
+ const SignOutButton = () => {
155
+ const {
156
+ t
157
+ } = useTranslation('profile');
158
+ const [commit, loading] = useMutation(_ProfileDrawerContentSignOutMutation !== void 0 ? _ProfileDrawerContentSignOutMutation : (_ProfileDrawerContentSignOutMutation = require("./__generated__/ProfileDrawerContentSignOutMutation.graphql"), _ProfileDrawerContentSignOutMutation.hash && _ProfileDrawerContentSignOutMutation.hash !== "c7ca96e9e713315606b0c22d196b6f7b" && console.error("The definition of 'ProfileDrawerContentSignOutMutation' appears to have changed. Run `relay-compiler` to update the generated files to receive the expected data."), _ProfileDrawerContentSignOutMutation));
159
+ const handler = useCallback(() => {
160
+ commit({
161
+ variables: {},
162
+ onError: error => {
163
+ var _source3, _source3$errors, _source3$errors$;
164
+
165
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
166
+ message.error((_source3 = error.source) === null || _source3 === void 0 ? void 0 : (_source3$errors = _source3.errors) === null || _source3$errors === void 0 ? void 0 : (_source3$errors$ = _source3$errors[0]) === null || _source3$errors$ === void 0 ? void 0 : _source3$errors$.message);
167
+ },
168
+ onCompleted: () => {
169
+ window.location.href = '/auth/';
170
+ }
171
+ });
172
+ }, [commit]);
173
+ return /*#__PURE__*/React.createElement(ProfileButton, {
174
+ danger: true,
175
+ loading: loading,
176
+ onClick: handler
177
+ }, t('profile:signOut'));
178
+ };
179
+
180
+ const ProfileDrawerContent = ({
181
+ actions,
182
+ children
183
+ }) => {
184
+ const {
185
+ email,
186
+ firstName,
187
+ lastName,
188
+ avatar
189
+ } = useProfile();
190
+ const fullName = useMemo(() => [firstName, lastName].filter(i => i).join(' '), [firstName, lastName]);
191
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(AvatarContainer, null, /*#__PURE__*/React.createElement(UserAvatar, {
192
+ size: "10em"
193
+ }), /*#__PURE__*/React.createElement(UserContent, null, fullName && /*#__PURE__*/React.createElement(FullName, null, fullName), /*#__PURE__*/React.createElement(Email, null, email))), /*#__PURE__*/React.createElement(ActionsContainer, null, avatar && /*#__PURE__*/React.createElement(DeleteAvatarButton, null), /*#__PURE__*/React.createElement(UpdateAvatarButton, {
194
+ hasAvatar: !!avatar
195
+ }), /*#__PURE__*/React.createElement(UpdateNameButton, {
196
+ hasName: !!fullName
197
+ }), /*#__PURE__*/React.createElement(ChangePasswordButton, null), actions, /*#__PURE__*/React.createElement(SignOutButton, null), children), /*#__PURE__*/React.createElement(Footer, null, /*#__PURE__*/React.createElement(ThemeSwitcher, null)));
198
+ };
199
+
200
+ export default ProfileDrawerContent;
201
+ //# sourceMappingURL=ProfileDrawerContent.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/lib/components/profile/ProfileDrawerContent.tsx"],"names":["React","useCallback","useMemo","useRef","useState","message","ThemeSwitcher","styled","clr","useTranslation","useMutation","UserAvatar","useProfile","ProfileButton","ProfileUpdateNameModal","ProfileUpdatePasswordModal","AvatarContainer","div","UserContent","FullName","p","theme","sizes","large","Email","inputColorPlaceholder","ActionsContainer","Footer","HiddenInput","input","profileDrawerContentUpdateAvatarMutation","DeleteAvatarButton","t","commit","loading","handler","variables","avatar","onError","error","source","errors","onCompleted","success","UpdateAvatarButton","hasAvatar","fileInputRef","e","target","files","file","uploadables","current","value","click","UpdateNameButton","hasName","modalVisibility","setModalVisibility","ChangePasswordButton","SignOutButton","window","location","href","ProfileDrawerContent","actions","children","email","firstName","lastName","fullName","filter","i","join"],"mappings":"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","sourcesContent":["import React, { useCallback, useMemo, useRef, useState } from 'react';\nimport { message, ThemeSwitcher } from '@os-design/core';\nimport styled from '@emotion/styled';\nimport { clr } from '@os-design/theming';\nimport { useTranslation } from 'react-i18next';\nimport { useMutation } from 'react-relay/hooks';\nimport { graphql } from 'babel-plugin-relay/macro';\nimport UserAvatar from './UserAvatar';\nimport { useProfile } from './ProfileContext';\nimport ProfileButton from './ProfileButton';\nimport ProfileUpdateNameModal from './ProfileUpdateNameModal';\nimport ProfileUpdatePasswordModal from './ProfileUpdatePasswordModal';\nimport { ProfileDrawerContentSignOutMutation } from './__generated__/ProfileDrawerContentSignOutMutation.graphql';\nimport { ProfileDrawerContentUpdateAvatarMutation } from './__generated__/ProfileDrawerContentUpdateAvatarMutation.graphql';\n\nexport interface ProfileDrawerContentProps {\n /**\n * Additional actions placed under the avatar.\n * @default undefined\n */\n actions?: React.ReactNode;\n /**\n * The children.\n */\n children?: React.ReactNode;\n}\n\nconst AvatarContainer = styled.div`\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n`;\n\nconst UserContent = styled.div`\n margin-top: 1em;\n`;\n\nconst FullName = styled.div`\n font-size: ${(p) => p.theme.sizes.large}em;\n font-weight: 500;\n text-align: center;\n line-height: 1.2;\n`;\n\nconst Email = styled.div`\n color: ${(p) => clr(p.theme.inputColorPlaceholder)};\n margin-top: 0.2em;\n text-align: center;\n`;\n\nconst ActionsContainer = styled.div`\n margin-top: 1.5em;\n`;\n\nconst Footer = styled.div`\n display: flex;\n justify-content: center;\n margin-top: auto;\n padding-top: 1.5em;\n`;\n\nconst HiddenInput = styled.input`\n display: none;\n`;\n\nconst profileDrawerContentUpdateAvatarMutation = graphql`\n mutation ProfileDrawerContentUpdateAvatarMutation(\n $input: UpdateAvatarInput!\n ) {\n updateAvatar(input: $input) {\n id\n avatar\n }\n }\n`;\n\nconst DeleteAvatarButton: React.FC = () => {\n const { t } = useTranslation('profile');\n\n const [commit, loading] =\n useMutation<ProfileDrawerContentUpdateAvatarMutation>(\n profileDrawerContentUpdateAvatarMutation\n );\n\n const handler = useCallback(() => {\n commit({\n variables: {\n input: { avatar: null },\n },\n onError: (error) => {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n message.error((error as any).source?.errors?.[0]?.message);\n },\n onCompleted: () => {\n message.success(t('profile:updated'));\n },\n });\n }, [commit, t]);\n\n return (\n <ProfileButton loading={loading} onClick={handler}>\n {t('profile:deleteAvatar')}\n </ProfileButton>\n );\n};\n\ninterface UpdateAvatarButtonProps {\n hasAvatar: boolean;\n}\n\nconst UpdateAvatarButton: React.FC<UpdateAvatarButtonProps> = ({\n hasAvatar,\n}) => {\n const { t } = useTranslation('profile');\n const fileInputRef = useRef<HTMLInputElement>(null);\n\n const [commit, loading] =\n useMutation<ProfileDrawerContentUpdateAvatarMutation>(\n profileDrawerContentUpdateAvatarMutation\n );\n\n const handler = useCallback(\n (e) => {\n const target = e.target as HTMLInputElement | null;\n if (!target) return;\n\n const { files } = target;\n if (!files) return;\n\n const file = files[0];\n\n commit({\n variables: {\n input: {},\n },\n uploadables: { avatar: file },\n onError: (error) => {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n message.error((error as any).source?.errors?.[0]?.message);\n },\n onCompleted: () => {\n message.success(t('profile:updated'));\n },\n });\n },\n [commit, t]\n );\n\n return (\n <>\n <ProfileButton\n loading={loading}\n onClick={() => {\n if (!fileInputRef.current) return;\n fileInputRef.current.value = '';\n fileInputRef.current.click();\n }}\n >\n {t(`profile:${hasAvatar ? 'changeAvatar' : 'setAvatar'}`)}\n </ProfileButton>\n\n <HiddenInput\n type='file'\n accept='image/jpeg,image/png,image/webp'\n onChange={handler}\n ref={fileInputRef}\n />\n </>\n );\n};\n\ninterface UpdateNameButtonProps {\n hasName: boolean;\n}\n\nconst UpdateNameButton: React.FC<UpdateNameButtonProps> = ({ hasName }) => {\n const { t } = useTranslation('profile');\n const [modalVisibility, setModalVisibility] = useState(false);\n\n return (\n <>\n <ProfileButton onClick={() => setModalVisibility(true)}>\n {t(`profile:${hasName ? 'changeName' : 'setName'}`)}\n </ProfileButton>\n\n <ProfileUpdateNameModal\n visibility={modalVisibility}\n onClose={() => setModalVisibility(false)}\n />\n </>\n );\n};\n\nconst ChangePasswordButton: React.FC = () => {\n const { t } = useTranslation('profile');\n const [modalVisibility, setModalVisibility] = useState(false);\n\n return (\n <>\n <ProfileButton onClick={() => setModalVisibility(true)}>\n {t('profile:changePassword')}\n </ProfileButton>\n\n <ProfileUpdatePasswordModal\n visibility={modalVisibility}\n onClose={() => setModalVisibility(false)}\n />\n </>\n );\n};\n\nconst SignOutButton: React.FC = () => {\n const { t } = useTranslation('profile');\n\n const [commit, loading] =\n useMutation<ProfileDrawerContentSignOutMutation>(graphql`\n mutation ProfileDrawerContentSignOutMutation {\n signOut {\n ok\n }\n }\n `);\n\n const handler = useCallback(() => {\n commit({\n variables: {},\n onError: (error) => {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n message.error((error as any).source?.errors?.[0]?.message);\n },\n onCompleted: () => {\n window.location.href = '/auth/';\n },\n });\n }, [commit]);\n\n return (\n <ProfileButton danger loading={loading} onClick={handler}>\n {t('profile:signOut')}\n </ProfileButton>\n );\n};\n\nconst ProfileDrawerContent: React.FC<ProfileDrawerContentProps> = ({\n actions,\n children,\n}) => {\n const { email, firstName, lastName, avatar } = useProfile();\n\n const fullName = useMemo(\n () => [firstName, lastName].filter((i) => i).join(' '),\n [firstName, lastName]\n );\n\n return (\n <>\n <AvatarContainer>\n <UserAvatar size='10em' />\n <UserContent>\n {fullName && <FullName>{fullName}</FullName>}\n <Email>{email}</Email>\n </UserContent>\n </AvatarContainer>\n\n <ActionsContainer>\n {avatar && <DeleteAvatarButton />}\n\n <UpdateAvatarButton hasAvatar={!!avatar} />\n <UpdateNameButton hasName={!!fullName} />\n <ChangePasswordButton />\n\n {actions}\n\n <SignOutButton />\n\n {children}\n </ActionsContainer>\n\n <Footer>\n <ThemeSwitcher />\n </Footer>\n </>\n );\n};\n\nexport default ProfileDrawerContent;\n"],"file":"ProfileDrawerContent.js"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/lib/components/profile/ProfileUpdateNameForm.tsx"],"names":["React","useForm","useFormItem","Alert","Form","FormItem","Input","useTranslation","ProfileUpdateNameForm","children","t","formError","firstName","lastName"],"mappings":";;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SAASC,OAAT,EAAkBC,WAAlB,QAAqC,qBAArC;AACA,SAASC,KAAT,EAAgBC,IAAhB,EAAsBC,QAAtB,EAAgCC,KAAhC,QAA6C,iBAA7C;AACA,SAASC,cAAT,QAA+B,eAA/B;;AAOA,MAAMC,qBAA+B,GAAG,CAAC;AAAEC,EAAAA;AAAF,CAAD,KAAkB;AACxD,QAAM;AAAEC,IAAAA;AAAF,MAAQH,cAAc,CAAC,SAAD,CAA5B;AACA,QAAM;AAAEI,IAAAA;AAAF,MAAgBV,OAAO,EAA7B;AAEA,QAAMW,SAAS,GAAGV,WAAW,CAAC,WAAD,CAA7B;AACA,QAAMW,QAAQ,GAAGX,WAAW,CAAC,UAAD,CAA5B;AAEA,sBACE,oBAAC,IAAD,qBACE,oBAAC,QAAD;AACE,IAAA,KAAK,EAAEQ,CAAC,CAAC,yCAAD;AADV,KAEME,SAAS,CAAC,CAAD,CAFf,gBAIE,oBAAC,KAAD;AACE,IAAA,WAAW,EAAEF,CAAC,CAAC,+CAAD;AADhB,KAEME,SAAS,CAAC,CAAD,CAFf,EAJF,CADF,eAWE,oBAAC,QAAD;AACE,IAAA,KAAK,EAAEF,CAAC,CAAC,wCAAD;AADV,KAEMG,QAAQ,CAAC,CAAD,CAFd,gBAIE,oBAAC,KAAD;AACE,IAAA,WAAW,EAAEH,CAAC,CAAC,8CAAD;AADhB,KAEMG,QAAQ,CAAC,CAAD,CAFd,EAJF,CAXF,EAqBGF,SAAS,iBAAI,oBAAC,KAAD;AAAO,IAAA,IAAI,EAAC;AAAZ,KAAqBA,SAArB,CArBhB,EAuBGF,QAvBH,CADF;AA2BD,CAlCD;;AAoCA,eAAeD,qBAAf","sourcesContent":["import React from 'react';\nimport { useForm, useFormItem } from '@os-team/form-utils';\nimport { Alert, Form, FormItem, Input } from '@os-design/core';\nimport { useTranslation } from 'react-i18next';\n\nexport interface ProfileUpdateNameFormData {\n firstName: string;\n lastName: string;\n}\n\nconst ProfileUpdateNameForm: React.FC = ({ children }) => {\n const { t } = useTranslation('profile');\n const { formError } = useForm();\n\n const firstName = useFormItem('firstName');\n const lastName = useFormItem('lastName');\n\n return (\n <Form>\n <FormItem\n label={t('profile:updateNameModal.firstName.label')}\n {...firstName[0]}\n >\n <Input\n placeholder={t('profile:updateNameModal.firstName.placeholder')}\n {...firstName[1]}\n />\n </FormItem>\n\n <FormItem\n label={t('profile:updateNameModal.lastName.label')}\n {...lastName[0]}\n >\n <Input\n placeholder={t('profile:updateNameModal.lastName.placeholder')}\n {...lastName[1]}\n />\n </FormItem>\n\n {formError && <Alert type='error'>{formError}</Alert>}\n\n {children}\n </Form>\n );\n};\n\nexport default ProfileUpdateNameForm;\n"],"file":"ProfileUpdateNameForm.js"}
1
+ {"version":3,"sources":["../../../../src/lib/components/profile/ProfileUpdateNameForm.tsx"],"names":["React","useForm","useFormItem","Alert","Form","FormItem","Input","useTranslation","ProfileUpdateNameForm","children","t","formError","firstName","lastName"],"mappings":";;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SAASC,OAAT,EAAkBC,WAAlB,QAAqC,qBAArC;AACA,SAASC,KAAT,EAAgBC,IAAhB,EAAsBC,QAAtB,EAAgCC,KAAhC,QAA6C,iBAA7C;AACA,SAASC,cAAT,QAA+B,eAA/B;;AAWA,MAAMC,qBAA2D,GAAG,CAAC;AACnEC,EAAAA;AADmE,CAAD,KAE9D;AACJ,QAAM;AAAEC,IAAAA;AAAF,MAAQH,cAAc,CAAC,SAAD,CAA5B;AACA,QAAM;AAAEI,IAAAA;AAAF,MAAgBV,OAAO,EAA7B;AAEA,QAAMW,SAAS,GAAGV,WAAW,CAAC,WAAD,CAA7B;AACA,QAAMW,QAAQ,GAAGX,WAAW,CAAC,UAAD,CAA5B;AAEA,sBACE,oBAAC,IAAD,qBACE,oBAAC,QAAD;AACE,IAAA,KAAK,EAAEQ,CAAC,CAAC,yCAAD;AADV,KAEME,SAAS,CAAC,CAAD,CAFf,gBAIE,oBAAC,KAAD;AACE,IAAA,WAAW,EAAEF,CAAC,CAAC,+CAAD;AADhB,KAEME,SAAS,CAAC,CAAD,CAFf,EAJF,CADF,eAWE,oBAAC,QAAD;AACE,IAAA,KAAK,EAAEF,CAAC,CAAC,wCAAD;AADV,KAEMG,QAAQ,CAAC,CAAD,CAFd,gBAIE,oBAAC,KAAD;AACE,IAAA,WAAW,EAAEH,CAAC,CAAC,8CAAD;AADhB,KAEMG,QAAQ,CAAC,CAAD,CAFd,EAJF,CAXF,EAqBGF,SAAS,iBAAI,oBAAC,KAAD;AAAO,IAAA,IAAI,EAAC;AAAZ,KAAqBA,SAArB,CArBhB,EAuBGF,QAvBH,CADF;AA2BD,CApCD;;AAsCA,eAAeD,qBAAf","sourcesContent":["import React from 'react';\nimport { useForm, useFormItem } from '@os-team/form-utils';\nimport { Alert, Form, FormItem, Input } from '@os-design/core';\nimport { useTranslation } from 'react-i18next';\n\nexport interface ProfileUpdateNameFormData {\n firstName: string;\n lastName: string;\n}\n\ninterface ProfileUpdateNameFormProps {\n children?: React.ReactNode;\n}\n\nconst ProfileUpdateNameForm: React.FC<ProfileUpdateNameFormProps> = ({\n children,\n}) => {\n const { t } = useTranslation('profile');\n const { formError } = useForm();\n\n const firstName = useFormItem('firstName');\n const lastName = useFormItem('lastName');\n\n return (\n <Form>\n <FormItem\n label={t('profile:updateNameModal.firstName.label')}\n {...firstName[0]}\n >\n <Input\n placeholder={t('profile:updateNameModal.firstName.placeholder')}\n {...firstName[1]}\n />\n </FormItem>\n\n <FormItem\n label={t('profile:updateNameModal.lastName.label')}\n {...lastName[0]}\n >\n <Input\n placeholder={t('profile:updateNameModal.lastName.placeholder')}\n {...lastName[1]}\n />\n </FormItem>\n\n {formError && <Alert type='error'>{formError}</Alert>}\n\n {children}\n </Form>\n );\n};\n\nexport default ProfileUpdateNameForm;\n"],"file":"ProfileUpdateNameForm.js"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/lib/components/profile/ProfileUpdatePasswordForm.tsx"],"names":["React","useForm","useFormItem","Alert","Form","FormItem","InputPassword","useTranslation","ProfileUpdatePasswordForm","children","t","formError","currentPassword","password","returnObjects"],"mappings":";;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SAASC,OAAT,EAAkBC,WAAlB,QAAqC,qBAArC;AACA,SAASC,KAAT,EAAgBC,IAAhB,EAAsBC,QAAtB,EAAgCC,aAAhC,QAAqD,iBAArD;AACA,SAASC,cAAT,QAA+B,eAA/B;;AAOA,MAAMC,yBAAmC,GAAG,CAAC;AAAEC,EAAAA;AAAF,CAAD,KAAkB;AAC5D,QAAM;AAAEC,IAAAA;AAAF,MAAQH,cAAc,CAAC,SAAD,CAA5B;AACA,QAAM;AAAEI,IAAAA;AAAF,MAAgBV,OAAO,EAA7B;AAEA,QAAMW,eAAe,GAAGV,WAAW,CAAC,iBAAD,CAAnC;AACA,QAAMW,QAAQ,GAAGX,WAAW,CAAC,UAAD,CAA5B;AAEA,sBACE,oBAAC,IAAD,qBACE,oBAAC,QAAD;AACE,IAAA,KAAK,EAAEQ,CAAC,CAAC,mDAAD;AADV,KAEME,eAAe,CAAC,CAAD,CAFrB,gBAIE,oBAAC,aAAD;AACE,IAAA,WAAW,EAAEF,CAAC,CACZ,yDADY;AADhB,KAIME,eAAe,CAAC,CAAD,CAJrB,EAJF,CADF,eAaE,oBAAC,QAAD;AACE,IAAA,KAAK,EAAEF,CAAC,CAAC,+CAAD;AADV,KAEMG,QAAQ,CAAC,CAAD,CAFd,gBAIE,oBAAC,aAAD;AACE,IAAA,WAAW,EAAEH,CAAC,CAAC,qDAAD,CADhB;AAEE,IAAA,iBAAiB,MAFnB;AAGE,IAAA,aAAa,EAAEA,CAAC,CACd,mDADc,EAEd;AACEI,MAAAA,aAAa,EAAE;AADjB,KAFc;AAHlB,KASMD,QAAQ,CAAC,CAAD,CATd,EAJF,CAbF,EA8BGF,SAAS,iBAAI,oBAAC,KAAD;AAAO,IAAA,IAAI,EAAC;AAAZ,KAAqBA,SAArB,CA9BhB,EAgCGF,QAhCH,CADF;AAoCD,CA3CD;;AA6CA,eAAeD,yBAAf","sourcesContent":["import React from 'react';\nimport { useForm, useFormItem } from '@os-team/form-utils';\nimport { Alert, Form, FormItem, InputPassword } from '@os-design/core';\nimport { useTranslation } from 'react-i18next';\n\nexport interface ProfileUpdatePasswordFormData {\n currentPassword: string;\n password: string;\n}\n\nconst ProfileUpdatePasswordForm: React.FC = ({ children }) => {\n const { t } = useTranslation('profile');\n const { formError } = useForm();\n\n const currentPassword = useFormItem('currentPassword');\n const password = useFormItem('password');\n\n return (\n <Form>\n <FormItem\n label={t('profile:updatePasswordModal.currentPassword.label')}\n {...currentPassword[0]}\n >\n <InputPassword\n placeholder={t(\n 'profile:updatePasswordModal.currentPassword.placeholder'\n )}\n {...currentPassword[1]}\n />\n </FormItem>\n\n <FormItem\n label={t('profile:updatePasswordModal.newPassword.label')}\n {...password[0]}\n >\n <InputPassword\n placeholder={t('profile:updatePasswordModal.newPassword.placeholder')}\n showStrengthMeter\n strengthNames={t(\n 'profile:updatePasswordModal.passwordStrengthNames',\n {\n returnObjects: true,\n }\n )}\n {...password[1]}\n />\n </FormItem>\n\n {formError && <Alert type='error'>{formError}</Alert>}\n\n {children}\n </Form>\n );\n};\n\nexport default ProfileUpdatePasswordForm;\n"],"file":"ProfileUpdatePasswordForm.js"}
1
+ {"version":3,"sources":["../../../../src/lib/components/profile/ProfileUpdatePasswordForm.tsx"],"names":["React","useForm","useFormItem","Alert","Form","FormItem","InputPassword","useTranslation","ProfileUpdatePasswordForm","children","t","formError","currentPassword","password","returnObjects"],"mappings":";;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SAASC,OAAT,EAAkBC,WAAlB,QAAqC,qBAArC;AACA,SAASC,KAAT,EAAgBC,IAAhB,EAAsBC,QAAtB,EAAgCC,aAAhC,QAAqD,iBAArD;AACA,SAASC,cAAT,QAA+B,eAA/B;;AAWA,MAAMC,yBAAmE,GAAG,CAAC;AAC3EC,EAAAA;AAD2E,CAAD,KAEtE;AACJ,QAAM;AAAEC,IAAAA;AAAF,MAAQH,cAAc,CAAC,SAAD,CAA5B;AACA,QAAM;AAAEI,IAAAA;AAAF,MAAgBV,OAAO,EAA7B;AAEA,QAAMW,eAAe,GAAGV,WAAW,CAAC,iBAAD,CAAnC;AACA,QAAMW,QAAQ,GAAGX,WAAW,CAAC,UAAD,CAA5B;AAEA,sBACE,oBAAC,IAAD,qBACE,oBAAC,QAAD;AACE,IAAA,KAAK,EAAEQ,CAAC,CAAC,mDAAD;AADV,KAEME,eAAe,CAAC,CAAD,CAFrB,gBAIE,oBAAC,aAAD;AACE,IAAA,WAAW,EAAEF,CAAC,CACZ,yDADY;AADhB,KAIME,eAAe,CAAC,CAAD,CAJrB,EAJF,CADF,eAaE,oBAAC,QAAD;AACE,IAAA,KAAK,EAAEF,CAAC,CAAC,+CAAD;AADV,KAEMG,QAAQ,CAAC,CAAD,CAFd,gBAIE,oBAAC,aAAD;AACE,IAAA,WAAW,EAAEH,CAAC,CAAC,qDAAD,CADhB;AAEE,IAAA,iBAAiB,MAFnB;AAGE,IAAA,aAAa,EAAEA,CAAC,CACd,mDADc,EAEd;AACEI,MAAAA,aAAa,EAAE;AADjB,KAFc;AAHlB,KASMD,QAAQ,CAAC,CAAD,CATd,EAJF,CAbF,EA8BGF,SAAS,iBAAI,oBAAC,KAAD;AAAO,IAAA,IAAI,EAAC;AAAZ,KAAqBA,SAArB,CA9BhB,EAgCGF,QAhCH,CADF;AAoCD,CA7CD;;AA+CA,eAAeD,yBAAf","sourcesContent":["import React from 'react';\nimport { useForm, useFormItem } from '@os-team/form-utils';\nimport { Alert, Form, FormItem, InputPassword } from '@os-design/core';\nimport { useTranslation } from 'react-i18next';\n\nexport interface ProfileUpdatePasswordFormData {\n currentPassword: string;\n password: string;\n}\n\ninterface ProfileUpdatePasswordFormProps {\n children?: React.ReactNode;\n}\n\nconst ProfileUpdatePasswordForm: React.FC<ProfileUpdatePasswordFormProps> = ({\n children,\n}) => {\n const { t } = useTranslation('profile');\n const { formError } = useForm();\n\n const currentPassword = useFormItem('currentPassword');\n const password = useFormItem('password');\n\n return (\n <Form>\n <FormItem\n label={t('profile:updatePasswordModal.currentPassword.label')}\n {...currentPassword[0]}\n >\n <InputPassword\n placeholder={t(\n 'profile:updatePasswordModal.currentPassword.placeholder'\n )}\n {...currentPassword[1]}\n />\n </FormItem>\n\n <FormItem\n label={t('profile:updatePasswordModal.newPassword.label')}\n {...password[0]}\n >\n <InputPassword\n placeholder={t('profile:updatePasswordModal.newPassword.placeholder')}\n showStrengthMeter\n strengthNames={t(\n 'profile:updatePasswordModal.passwordStrengthNames',\n {\n returnObjects: true,\n }\n )}\n {...password[1]}\n />\n </FormItem>\n\n {formError && <Alert type='error'>{formError}</Alert>}\n\n {children}\n </Form>\n );\n};\n\nexport default ProfileUpdatePasswordForm;\n"],"file":"ProfileUpdatePasswordForm.js"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/lib/components/profile/ProtectedWrapper.tsx"],"names":["React","useMemo","useLazyLoadQuery","ErrorBoundary","ProfileConfigContext","ProfileContext","ProtectedWrapperLoader","children","profile","fetchPolicy","profileContext","id","email","firstName","undefined","lastName","avatar","ProtectedWrapper","bucketId","profileConfigContext","window","location","href"],"mappings":";;AAAA,OAAOA,KAAP,IAAgBC,OAAhB,QAA+B,OAA/B;AAEA,SAASC,gBAAT,QAAiC,mBAAjC;AACA,SAASC,aAAT,QAA8B,kBAA9B;AACA,OAAOC,oBAAP,MAAiC,wBAAjC;AACA,OAAOC,cAAP,MAA2B,kBAA3B;;AAGA,MAAMC,sBAAgC,GAAG,CAAC;AAAEC,EAAAA;AAAF,CAAD,KAAkB;AACzD,QAAM;AAAEC,IAAAA;AAAF,MAAcN,gBAAgB,sbAYlC,EAZkC,EAalC;AAAEO,IAAAA,WAAW,EAAE;AAAf,GAbkC,CAApC;AAgBA,QAAMC,cAAc,GAAGT,OAAO,CAC5B,OAAO;AACLU,IAAAA,EAAE,EAAEH,OAAO,CAACG,EADP;AAELC,IAAAA,KAAK,EAAEJ,OAAO,CAACI,KAFV;AAGLC,IAAAA,SAAS,EAAEL,OAAO,CAACK,SAAR,IAAqBC,SAH3B;AAILC,IAAAA,QAAQ,EAAEP,OAAO,CAACO,QAAR,IAAoBD,SAJzB;AAKLE,IAAAA,MAAM,EAAER,OAAO,CAACQ,MAAR,IAAkBF;AALrB,GAAP,CAD4B,EAQ5B,CACEN,OAAO,CAACQ,MADV,EAEER,OAAO,CAACI,KAFV,EAGEJ,OAAO,CAACK,SAHV,EAIEL,OAAO,CAACG,EAJV,EAKEH,OAAO,CAACO,QALV,CAR4B,CAA9B;AAiBA,sBACE,oBAAC,cAAD,CAAgB,QAAhB;AAAyB,IAAA,KAAK,EAAEL;AAAhC,KACGH,QADH,CADF;AAKD,CAvCD;;AA6CA,MAAMU,gBAAiD,GAAG,CAAC;AACzDC,EAAAA,QADyD;AAEzDX,EAAAA;AAFyD,CAAD,KAGpD;AACJ,QAAMY,oBAAoB,GAAGlB,OAAO,CAAC,OAAO;AAAEiB,IAAAA;AAAF,GAAP,CAAD,EAAuB,CAACA,QAAD,CAAvB,CAApC;AAEA,sBACE,oBAAC,oBAAD,CAAsB,QAAtB;AAA+B,IAAA,KAAK,EAAEC;AAAtC,kBACE,oBAAC,aAAD;AACE,IAAA,QAAQ,EAAE,MAAM;AACdC,MAAAA,MAAM,CAACC,QAAP,CAAgBC,IAAhB,GAAuB,QAAvB;AACA,aAAO,IAAP;AACD;AAJH,kBAME,oBAAC,sBAAD,QAAyBf,QAAzB,CANF,CADF,CADF;AAYD,CAlBD;;AAoBA,eAAeU,gBAAf","sourcesContent":["import React, { useMemo } from 'react';\nimport graphql from 'babel-plugin-relay/macro';\nimport { useLazyLoadQuery } from 'react-relay/hooks';\nimport { ErrorBoundary } from '@os-design/utils';\nimport ProfileConfigContext from './ProfileConfigContext';\nimport ProfileContext from './ProfileContext';\nimport { ProtectedWrapperQuery } from './__generated__/ProtectedWrapperQuery.graphql';\n\nconst ProtectedWrapperLoader: React.FC = ({ children }) => {\n const { profile } = useLazyLoadQuery<ProtectedWrapperQuery>(\n graphql`\n query ProtectedWrapperQuery {\n profile {\n id\n email\n firstName\n lastName\n avatar\n }\n }\n `,\n {},\n { fetchPolicy: 'store-or-network' }\n );\n\n const profileContext = useMemo(\n () => ({\n id: profile.id,\n email: profile.email,\n firstName: profile.firstName || undefined,\n lastName: profile.lastName || undefined,\n avatar: profile.avatar || undefined,\n }),\n [\n profile.avatar,\n profile.email,\n profile.firstName,\n profile.id,\n profile.lastName,\n ]\n );\n\n return (\n <ProfileContext.Provider value={profileContext}>\n {children}\n </ProfileContext.Provider>\n );\n};\n\nexport interface ProtectedWrapperProps {\n bucketId: string;\n}\n\nconst ProtectedWrapper: React.FC<ProtectedWrapperProps> = ({\n bucketId,\n children,\n}) => {\n const profileConfigContext = useMemo(() => ({ bucketId }), [bucketId]);\n\n return (\n <ProfileConfigContext.Provider value={profileConfigContext}>\n <ErrorBoundary\n fallback={() => {\n window.location.href = '/auth/';\n return null;\n }}\n >\n <ProtectedWrapperLoader>{children}</ProtectedWrapperLoader>\n </ErrorBoundary>\n </ProfileConfigContext.Provider>\n );\n};\n\nexport default ProtectedWrapper;\n"],"file":"ProtectedWrapper.js"}
1
+ {"version":3,"sources":["../../../../src/lib/components/profile/ProtectedWrapper.tsx"],"names":["React","useMemo","useLazyLoadQuery","ErrorBoundary","ProfileConfigContext","ProfileContext","ProtectedWrapperLoader","children","profile","fetchPolicy","profileContext","id","email","firstName","undefined","lastName","avatar","ProtectedWrapper","bucketId","profileConfigContext","window","location","href"],"mappings":";;AAAA,OAAOA,KAAP,IAAgBC,OAAhB,QAA+B,OAA/B;AAEA,SAASC,gBAAT,QAAiC,mBAAjC;AACA,SAASC,aAAT,QAA8B,kBAA9B;AACA,OAAOC,oBAAP,MAAiC,wBAAjC;AACA,OAAOC,cAAP,MAA2B,kBAA3B;;AAOA,MAAMC,sBAA6D,GAAG,CAAC;AACrEC,EAAAA;AADqE,CAAD,KAEhE;AACJ,QAAM;AAAEC,IAAAA;AAAF,MAAcN,gBAAgB,sbAYlC,EAZkC,EAalC;AAAEO,IAAAA,WAAW,EAAE;AAAf,GAbkC,CAApC;AAgBA,QAAMC,cAAc,GAAGT,OAAO,CAC5B,OAAO;AACLU,IAAAA,EAAE,EAAEH,OAAO,CAACG,EADP;AAELC,IAAAA,KAAK,EAAEJ,OAAO,CAACI,KAFV;AAGLC,IAAAA,SAAS,EAAEL,OAAO,CAACK,SAAR,IAAqBC,SAH3B;AAILC,IAAAA,QAAQ,EAAEP,OAAO,CAACO,QAAR,IAAoBD,SAJzB;AAKLE,IAAAA,MAAM,EAAER,OAAO,CAACQ,MAAR,IAAkBF;AALrB,GAAP,CAD4B,EAQ5B,CACEN,OAAO,CAACQ,MADV,EAEER,OAAO,CAACI,KAFV,EAGEJ,OAAO,CAACK,SAHV,EAIEL,OAAO,CAACG,EAJV,EAKEH,OAAO,CAACO,QALV,CAR4B,CAA9B;AAiBA,sBACE,oBAAC,cAAD,CAAgB,QAAhB;AAAyB,IAAA,KAAK,EAAEL;AAAhC,KACGH,QADH,CADF;AAKD,CAzCD;;AAgDA,MAAMU,gBAAiD,GAAG,CAAC;AACzDC,EAAAA,QADyD;AAEzDX,EAAAA;AAFyD,CAAD,KAGpD;AACJ,QAAMY,oBAAoB,GAAGlB,OAAO,CAAC,OAAO;AAAEiB,IAAAA;AAAF,GAAP,CAAD,EAAuB,CAACA,QAAD,CAAvB,CAApC;AAEA,sBACE,oBAAC,oBAAD,CAAsB,QAAtB;AAA+B,IAAA,KAAK,EAAEC;AAAtC,kBACE,oBAAC,aAAD;AACE,IAAA,QAAQ,EAAE,MAAM;AACdC,MAAAA,MAAM,CAACC,QAAP,CAAgBC,IAAhB,GAAuB,QAAvB;AACA,aAAO,IAAP;AACD;AAJH,kBAME,oBAAC,sBAAD,QAAyBf,QAAzB,CANF,CADF,CADF;AAYD,CAlBD;;AAoBA,eAAeU,gBAAf","sourcesContent":["import React, { useMemo } from 'react';\nimport graphql from 'babel-plugin-relay/macro';\nimport { useLazyLoadQuery } from 'react-relay/hooks';\nimport { ErrorBoundary } from '@os-design/utils';\nimport ProfileConfigContext from './ProfileConfigContext';\nimport ProfileContext from './ProfileContext';\nimport { ProtectedWrapperQuery } from './__generated__/ProtectedWrapperQuery.graphql';\n\ninterface ProtectedWrapperLoaderProps {\n children?: React.ReactNode;\n}\n\nconst ProtectedWrapperLoader: React.FC<ProtectedWrapperLoaderProps> = ({\n children,\n}) => {\n const { profile } = useLazyLoadQuery<ProtectedWrapperQuery>(\n graphql`\n query ProtectedWrapperQuery {\n profile {\n id\n email\n firstName\n lastName\n avatar\n }\n }\n `,\n {},\n { fetchPolicy: 'store-or-network' }\n );\n\n const profileContext = useMemo(\n () => ({\n id: profile.id,\n email: profile.email,\n firstName: profile.firstName || undefined,\n lastName: profile.lastName || undefined,\n avatar: profile.avatar || undefined,\n }),\n [\n profile.avatar,\n profile.email,\n profile.firstName,\n profile.id,\n profile.lastName,\n ]\n );\n\n return (\n <ProfileContext.Provider value={profileContext}>\n {children}\n </ProfileContext.Provider>\n );\n};\n\nexport interface ProtectedWrapperProps {\n bucketId: string;\n children?: React.ReactNode;\n}\n\nconst ProtectedWrapper: React.FC<ProtectedWrapperProps> = ({\n bucketId,\n children,\n}) => {\n const profileConfigContext = useMemo(() => ({ bucketId }), [bucketId]);\n\n return (\n <ProfileConfigContext.Provider value={profileConfigContext}>\n <ErrorBoundary\n fallback={() => {\n window.location.href = '/auth/';\n return null;\n }}\n >\n <ProtectedWrapperLoader>{children}</ProtectedWrapperLoader>\n </ErrorBoundary>\n </ProfileConfigContext.Provider>\n );\n};\n\nexport default ProtectedWrapper;\n"],"file":"ProtectedWrapper.js"}
@@ -0,0 +1,62 @@
1
+ /**
2
+ * @generated SignedSource<<832737ac96fa474b0ed0902ff8d86b14>>
3
+ * @lightSyntaxTransform
4
+ * @nogrep
5
+ */
6
+
7
+ /* tslint:disable */
8
+
9
+ /* eslint-disable */
10
+ // @ts-nocheck
11
+ const node = function () {
12
+ var v0 = [{
13
+ "alias": null,
14
+ "args": null,
15
+ "concreteType": "StatusPayload",
16
+ "kind": "LinkedField",
17
+ "name": "signOut",
18
+ "plural": false,
19
+ "selections": [{
20
+ "alias": null,
21
+ "args": null,
22
+ "kind": "ScalarField",
23
+ "name": "ok",
24
+ "storageKey": null
25
+ }],
26
+ "storageKey": null
27
+ }];
28
+ return {
29
+ "fragment": {
30
+ "argumentDefinitions": [],
31
+ "kind": "Fragment",
32
+ "metadata": null,
33
+ "name": "ProfileDrawerContentSignOutMutation",
34
+ "selections": v0
35
+ /*: any*/
36
+ ,
37
+ "type": "Mutation",
38
+ "abstractKey": null
39
+ },
40
+ "kind": "Request",
41
+ "operation": {
42
+ "argumentDefinitions": [],
43
+ "kind": "Operation",
44
+ "name": "ProfileDrawerContentSignOutMutation",
45
+ "selections": v0
46
+ /*: any*/
47
+
48
+ },
49
+ "params": {
50
+ "cacheID": "f5241cc562af19628cf38a9731067807",
51
+ "id": null,
52
+ "metadata": {},
53
+ "name": "ProfileDrawerContentSignOutMutation",
54
+ "operationKind": "mutation",
55
+ "text": "mutation ProfileDrawerContentSignOutMutation {\n signOut {\n ok\n }\n}\n"
56
+ }
57
+ };
58
+ }();
59
+
60
+ node.hash = "c7ca96e9e713315606b0c22d196b6f7b";
61
+ export default node;
62
+ //# sourceMappingURL=ProfileDrawerContentSignOutMutation.graphql.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../src/lib/components/profile/__generated__/ProfileDrawerContentSignOutMutation.graphql.ts"],"names":["node","v0","hash"],"mappings":"AAAA;AACA;AACA;AACA;AACA;;AAEA;;AACA;AACA;AAcA,MAAMA,IAAqB,GAAI,YAAU;AACzC,MAAIC,EAAE,GAAG,CACP;AACE,aAAS,IADX;AAEE,YAAQ,IAFV;AAGE,oBAAgB,eAHlB;AAIE,YAAQ,aAJV;AAKE,YAAQ,SALV;AAME,cAAU,KANZ;AAOE,kBAAc,CACZ;AACE,eAAS,IADX;AAEE,cAAQ,IAFV;AAGE,cAAQ,aAHV;AAIE,cAAQ,IAJV;AAKE,oBAAc;AALhB,KADY,CAPhB;AAgBE,kBAAc;AAhBhB,GADO,CAAT;AAoBA,SAAO;AACL,gBAAY;AACV,6BAAuB,EADb;AAEV,cAAQ,UAFE;AAGV,kBAAY,IAHF;AAIV,cAAQ,qCAJE;AAKV,oBAAeA;AAAE;AALP;AAMV,cAAQ,UANE;AAOV,qBAAe;AAPL,KADP;AAUL,YAAQ,SAVH;AAWL,iBAAa;AACX,6BAAuB,EADZ;AAEX,cAAQ,WAFG;AAGX,cAAQ,qCAHG;AAIX,oBAAeA;AAAE;;AAJN,KAXR;AAiBL,cAAU;AACR,iBAAW,kCADH;AAER,YAAM,IAFE;AAGR,kBAAY,EAHJ;AAIR,cAAQ,qCAJA;AAKR,uBAAiB,UALT;AAMR,cAAQ;AANA;AAjBL,GAAP;AA0BC,CA/C6B,EAA9B;;AAiDCD,IAAD,CAAcE,IAAd,GAAqB,kCAArB;AAEA,eAAeF,IAAf","sourcesContent":["/**\n * @generated SignedSource<<832737ac96fa474b0ed0902ff8d86b14>>\n * @lightSyntaxTransform\n * @nogrep\n */\n\n/* tslint:disable */\n/* eslint-disable */\n// @ts-nocheck\n\nimport { ConcreteRequest, Mutation } from 'relay-runtime';\nexport type ProfileDrawerContentSignOutMutation$variables = {};\nexport type ProfileDrawerContentSignOutMutation$data = {\n readonly signOut: {\n readonly ok: boolean;\n };\n};\nexport type ProfileDrawerContentSignOutMutation = {\n variables: ProfileDrawerContentSignOutMutation$variables;\n response: ProfileDrawerContentSignOutMutation$data;\n};\n\nconst node: ConcreteRequest = (function(){\nvar v0 = [\n {\n \"alias\": null,\n \"args\": null,\n \"concreteType\": \"StatusPayload\",\n \"kind\": \"LinkedField\",\n \"name\": \"signOut\",\n \"plural\": false,\n \"selections\": [\n {\n \"alias\": null,\n \"args\": null,\n \"kind\": \"ScalarField\",\n \"name\": \"ok\",\n \"storageKey\": null\n }\n ],\n \"storageKey\": null\n }\n];\nreturn {\n \"fragment\": {\n \"argumentDefinitions\": [],\n \"kind\": \"Fragment\",\n \"metadata\": null,\n \"name\": \"ProfileDrawerContentSignOutMutation\",\n \"selections\": (v0/*: any*/),\n \"type\": \"Mutation\",\n \"abstractKey\": null\n },\n \"kind\": \"Request\",\n \"operation\": {\n \"argumentDefinitions\": [],\n \"kind\": \"Operation\",\n \"name\": \"ProfileDrawerContentSignOutMutation\",\n \"selections\": (v0/*: any*/)\n },\n \"params\": {\n \"cacheID\": \"f5241cc562af19628cf38a9731067807\",\n \"id\": null,\n \"metadata\": {},\n \"name\": \"ProfileDrawerContentSignOutMutation\",\n \"operationKind\": \"mutation\",\n \"text\": \"mutation ProfileDrawerContentSignOutMutation {\\n signOut {\\n ok\\n }\\n}\\n\"\n }\n};\n})();\n\n(node as any).hash = \"c7ca96e9e713315606b0c22d196b6f7b\";\n\nexport default node;\n"],"file":"ProfileDrawerContentSignOutMutation.graphql.js"}
@@ -0,0 +1,81 @@
1
+ /**
2
+ * @generated SignedSource<<dfa244a4ba1902852ff99f94a3333fa7>>
3
+ * @lightSyntaxTransform
4
+ * @nogrep
5
+ */
6
+
7
+ /* tslint:disable */
8
+
9
+ /* eslint-disable */
10
+ // @ts-nocheck
11
+ const node = function () {
12
+ var v0 = [{
13
+ "defaultValue": null,
14
+ "kind": "LocalArgument",
15
+ "name": "input"
16
+ }],
17
+ v1 = [{
18
+ "alias": null,
19
+ "args": [{
20
+ "kind": "Variable",
21
+ "name": "input",
22
+ "variableName": "input"
23
+ }],
24
+ "concreteType": "User",
25
+ "kind": "LinkedField",
26
+ "name": "updateAvatar",
27
+ "plural": false,
28
+ "selections": [{
29
+ "alias": null,
30
+ "args": null,
31
+ "kind": "ScalarField",
32
+ "name": "id",
33
+ "storageKey": null
34
+ }, {
35
+ "alias": null,
36
+ "args": null,
37
+ "kind": "ScalarField",
38
+ "name": "avatar",
39
+ "storageKey": null
40
+ }],
41
+ "storageKey": null
42
+ }];
43
+ return {
44
+ "fragment": {
45
+ "argumentDefinitions": v0
46
+ /*: any*/
47
+ ,
48
+ "kind": "Fragment",
49
+ "metadata": null,
50
+ "name": "ProfileDrawerContentUpdateAvatarMutation",
51
+ "selections": v1
52
+ /*: any*/
53
+ ,
54
+ "type": "Mutation",
55
+ "abstractKey": null
56
+ },
57
+ "kind": "Request",
58
+ "operation": {
59
+ "argumentDefinitions": v0
60
+ /*: any*/
61
+ ,
62
+ "kind": "Operation",
63
+ "name": "ProfileDrawerContentUpdateAvatarMutation",
64
+ "selections": v1
65
+ /*: any*/
66
+
67
+ },
68
+ "params": {
69
+ "cacheID": "b749732615af9f8027386d69ffb57b63",
70
+ "id": null,
71
+ "metadata": {},
72
+ "name": "ProfileDrawerContentUpdateAvatarMutation",
73
+ "operationKind": "mutation",
74
+ "text": "mutation ProfileDrawerContentUpdateAvatarMutation(\n $input: UpdateAvatarInput!\n) {\n updateAvatar(input: $input) {\n id\n avatar\n }\n}\n"
75
+ }
76
+ };
77
+ }();
78
+
79
+ node.hash = "cf72a6314772ed0d1f182b197c858505";
80
+ export default node;
81
+ //# sourceMappingURL=ProfileDrawerContentUpdateAvatarMutation.graphql.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../src/lib/components/profile/__generated__/ProfileDrawerContentUpdateAvatarMutation.graphql.ts"],"names":["node","v0","v1","hash"],"mappings":"AAAA;AACA;AACA;AACA;AACA;;AAEA;;AACA;AACA;AAoBA,MAAMA,IAAqB,GAAI,YAAU;AACzC,MAAIC,EAAE,GAAG,CACP;AACE,oBAAgB,IADlB;AAEE,YAAQ,eAFV;AAGE,YAAQ;AAHV,GADO,CAAT;AAAA,MAOAC,EAAE,GAAG,CACH;AACE,aAAS,IADX;AAEE,YAAQ,CACN;AACE,cAAQ,UADV;AAEE,cAAQ,OAFV;AAGE,sBAAgB;AAHlB,KADM,CAFV;AASE,oBAAgB,MATlB;AAUE,YAAQ,aAVV;AAWE,YAAQ,cAXV;AAYE,cAAU,KAZZ;AAaE,kBAAc,CACZ;AACE,eAAS,IADX;AAEE,cAAQ,IAFV;AAGE,cAAQ,aAHV;AAIE,cAAQ,IAJV;AAKE,oBAAc;AALhB,KADY,EAQZ;AACE,eAAS,IADX;AAEE,cAAQ,IAFV;AAGE,cAAQ,aAHV;AAIE,cAAQ,QAJV;AAKE,oBAAc;AALhB,KARY,CAbhB;AA6BE,kBAAc;AA7BhB,GADG,CAPL;AAwCA,SAAO;AACL,gBAAY;AACV,6BAAwBD;AAAE;AADhB;AAEV,cAAQ,UAFE;AAGV,kBAAY,IAHF;AAIV,cAAQ,0CAJE;AAKV,oBAAeC;AAAE;AALP;AAMV,cAAQ,UANE;AAOV,qBAAe;AAPL,KADP;AAUL,YAAQ,SAVH;AAWL,iBAAa;AACX,6BAAwBD;AAAE;AADf;AAEX,cAAQ,WAFG;AAGX,cAAQ,0CAHG;AAIX,oBAAeC;AAAE;;AAJN,KAXR;AAiBL,cAAU;AACR,iBAAW,kCADH;AAER,YAAM,IAFE;AAGR,kBAAY,EAHJ;AAIR,cAAQ,0CAJA;AAKR,uBAAiB,UALT;AAMR,cAAQ;AANA;AAjBL,GAAP;AA0BC,CAnE6B,EAA9B;;AAqECF,IAAD,CAAcG,IAAd,GAAqB,kCAArB;AAEA,eAAeH,IAAf","sourcesContent":["/**\n * @generated SignedSource<<dfa244a4ba1902852ff99f94a3333fa7>>\n * @lightSyntaxTransform\n * @nogrep\n */\n\n/* tslint:disable */\n/* eslint-disable */\n// @ts-nocheck\n\nimport { ConcreteRequest, Mutation } from 'relay-runtime';\nexport type UpdateAvatarInput = {\n avatar?: any | null;\n};\nexport type ProfileDrawerContentUpdateAvatarMutation$variables = {\n input: UpdateAvatarInput;\n};\nexport type ProfileDrawerContentUpdateAvatarMutation$data = {\n readonly updateAvatar: {\n readonly id: string;\n readonly avatar: string | null;\n };\n};\nexport type ProfileDrawerContentUpdateAvatarMutation = {\n variables: ProfileDrawerContentUpdateAvatarMutation$variables;\n response: ProfileDrawerContentUpdateAvatarMutation$data;\n};\n\nconst node: ConcreteRequest = (function(){\nvar v0 = [\n {\n \"defaultValue\": null,\n \"kind\": \"LocalArgument\",\n \"name\": \"input\"\n }\n],\nv1 = [\n {\n \"alias\": null,\n \"args\": [\n {\n \"kind\": \"Variable\",\n \"name\": \"input\",\n \"variableName\": \"input\"\n }\n ],\n \"concreteType\": \"User\",\n \"kind\": \"LinkedField\",\n \"name\": \"updateAvatar\",\n \"plural\": false,\n \"selections\": [\n {\n \"alias\": null,\n \"args\": null,\n \"kind\": \"ScalarField\",\n \"name\": \"id\",\n \"storageKey\": null\n },\n {\n \"alias\": null,\n \"args\": null,\n \"kind\": \"ScalarField\",\n \"name\": \"avatar\",\n \"storageKey\": null\n }\n ],\n \"storageKey\": null\n }\n];\nreturn {\n \"fragment\": {\n \"argumentDefinitions\": (v0/*: any*/),\n \"kind\": \"Fragment\",\n \"metadata\": null,\n \"name\": \"ProfileDrawerContentUpdateAvatarMutation\",\n \"selections\": (v1/*: any*/),\n \"type\": \"Mutation\",\n \"abstractKey\": null\n },\n \"kind\": \"Request\",\n \"operation\": {\n \"argumentDefinitions\": (v0/*: any*/),\n \"kind\": \"Operation\",\n \"name\": \"ProfileDrawerContentUpdateAvatarMutation\",\n \"selections\": (v1/*: any*/)\n },\n \"params\": {\n \"cacheID\": \"b749732615af9f8027386d69ffb57b63\",\n \"id\": null,\n \"metadata\": {},\n \"name\": \"ProfileDrawerContentUpdateAvatarMutation\",\n \"operationKind\": \"mutation\",\n \"text\": \"mutation ProfileDrawerContentUpdateAvatarMutation(\\n $input: UpdateAvatarInput!\\n) {\\n updateAvatar(input: $input) {\\n id\\n avatar\\n }\\n}\\n\"\n }\n};\n})();\n\n(node as any).hash = \"cf72a6314772ed0d1f182b197c858505\";\n\nexport default node;\n"],"file":"ProfileDrawerContentUpdateAvatarMutation.graphql.js"}
@@ -1,12 +1,13 @@
1
1
  function _extends() { _extends = Object.assign || 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
2
 
3
- import React from 'react';
3
+ import React, { lazy, Suspense } from 'react';
4
4
  import styled from '@emotion/styled';
5
5
  import { Alert, Drawer, Layout, PageHeader } from '@os-design/core';
6
6
  import { useTranslation } from 'react-i18next';
7
7
  import { ThemeOverrider } from '@os-design/theming';
8
8
  import { useIsMinWidth } from '@os-design/media';
9
- import SessionDrawerContent, { SESSION_HORIZONTAL_PADDING } from './SessionDrawerContent';
9
+ import SessionListSkeleton from './SessionListSkeleton';
10
+ const LazySessionDrawerContent = /*#__PURE__*/lazy(() => import('./SessionDrawerContent'));
10
11
  const StyledPageHeader = styled(PageHeader)`
11
12
  position: relative;
12
13
  `;
@@ -24,14 +25,16 @@ const SessionDrawer = props => {
24
25
  width: isMinSm ? '24em' : '90%'
25
26
  }, props), /*#__PURE__*/React.createElement(ThemeOverrider, {
26
27
  overrides: {
27
- horizontalPadding: [SESSION_HORIZONTAL_PADDING, SESSION_HORIZONTAL_PADDING]
28
+ horizontalPadding: [1, 1]
28
29
  }
29
30
  }, /*#__PURE__*/React.createElement(Layout, null, /*#__PURE__*/React.createElement(StyledPageHeader, {
30
31
  title: t('profile:sessions.title')
31
32
  }), /*#__PURE__*/React.createElement(StyledAlert, {
32
33
  type: "info",
33
34
  size: "small"
34
- }, t('profile:sessions.description')), /*#__PURE__*/React.createElement(SessionDrawerContent, null))));
35
+ }, t('profile:sessions.description')), /*#__PURE__*/React.createElement(Suspense, {
36
+ fallback: /*#__PURE__*/React.createElement(SessionListSkeleton, null)
37
+ }, /*#__PURE__*/React.createElement(LazySessionDrawerContent, null)))));
35
38
  };
36
39
 
37
40
  export default SessionDrawer;
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/lib/components/session/SessionDrawer.tsx"],"names":["React","styled","Alert","Drawer","Layout","PageHeader","useTranslation","ThemeOverrider","useIsMinWidth","SessionDrawerContent","SESSION_HORIZONTAL_PADDING","StyledPageHeader","StyledAlert","SessionDrawer","props","t","isMinSm","horizontalPadding"],"mappings":";;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,MAAP,MAAmB,iBAAnB;AACA,SACEC,KADF,EAEEC,MAFF,EAIEC,MAJF,EAKEC,UALF,QAMO,iBANP;AAOA,SAASC,cAAT,QAA+B,eAA/B;AACA,SAASC,cAAT,QAA+B,oBAA/B;AACA,SAASC,aAAT,QAA8B,kBAA9B;AACA,OAAOC,oBAAP,IACEC,0BADF,QAEO,wBAFP;AAIA,MAAMC,gBAAgB,GAAGV,MAAM,CAACI,UAAD,CAAa;AAC5C;AACA,CAFA;AAIA,MAAMO,WAAW,GAAGX,MAAM,CAACC,KAAD,CAAQ;AAClC;AACA,CAFA;;AAIA,MAAMW,aAAoC,GAAIC,KAAD,IAAW;AACtD,QAAM;AAAEC,IAAAA;AAAF,MAAQT,cAAc,CAAC,SAAD,CAA5B;AACA,QAAMU,OAAO,GAAGR,aAAa,CAAC,IAAD,CAA7B;AAEA,sBACE,oBAAC,MAAD;AAAQ,IAAA,SAAS,EAAC,OAAlB;AAA0B,IAAA,KAAK,EAAEQ,OAAO,GAAG,MAAH,GAAY;AAApD,KAA+DF,KAA/D,gBACE,oBAAC,cAAD;AACE,IAAA,SAAS,EAAE;AACTG,MAAAA,iBAAiB,EAAE,CACjBP,0BADiB,EAEjBA,0BAFiB;AADV;AADb,kBAQE,oBAAC,MAAD,qBACE,oBAAC,gBAAD;AAAkB,IAAA,KAAK,EAAEK,CAAC,CAAC,wBAAD;AAA1B,IADF,eAGE,oBAAC,WAAD;AAAa,IAAA,IAAI,EAAC,MAAlB;AAAyB,IAAA,IAAI,EAAC;AAA9B,KACGA,CAAC,CAAC,8BAAD,CADJ,CAHF,eAOE,oBAAC,oBAAD,OAPF,CARF,CADF,CADF;AAsBD,CA1BD;;AA4BA,eAAeF,aAAf","sourcesContent":["import React from 'react';\nimport styled from '@emotion/styled';\nimport {\n Alert,\n Drawer,\n DrawerProps,\n Layout,\n PageHeader,\n} from '@os-design/core';\nimport { useTranslation } from 'react-i18next';\nimport { ThemeOverrider } from '@os-design/theming';\nimport { useIsMinWidth } from '@os-design/media';\nimport SessionDrawerContent, {\n SESSION_HORIZONTAL_PADDING,\n} from './SessionDrawerContent';\n\nconst StyledPageHeader = styled(PageHeader)`\n position: relative;\n`;\n\nconst StyledAlert = styled(Alert)`\n border-radius: 0;\n`;\n\nconst SessionDrawer: React.FC<DrawerProps> = (props) => {\n const { t } = useTranslation('profile');\n const isMinSm = useIsMinWidth('sm');\n\n return (\n <Drawer placement='right' width={isMinSm ? '24em' : '90%'} {...props}>\n <ThemeOverrider\n overrides={{\n horizontalPadding: [\n SESSION_HORIZONTAL_PADDING,\n SESSION_HORIZONTAL_PADDING,\n ],\n }}\n >\n <Layout>\n <StyledPageHeader title={t('profile:sessions.title')} />\n\n <StyledAlert type='info' size='small'>\n {t('profile:sessions.description')}\n </StyledAlert>\n\n <SessionDrawerContent />\n </Layout>\n </ThemeOverrider>\n </Drawer>\n );\n};\n\nexport default SessionDrawer;\n"],"file":"SessionDrawer.js"}
1
+ {"version":3,"sources":["../../../../src/lib/components/session/SessionDrawer.tsx"],"names":["React","lazy","Suspense","styled","Alert","Drawer","Layout","PageHeader","useTranslation","ThemeOverrider","useIsMinWidth","SessionListSkeleton","LazySessionDrawerContent","StyledPageHeader","StyledAlert","SessionDrawer","props","t","isMinSm","horizontalPadding"],"mappings":";;AAAA,OAAOA,KAAP,IAAgBC,IAAhB,EAAsBC,QAAtB,QAAsC,OAAtC;AACA,OAAOC,MAAP,MAAmB,iBAAnB;AACA,SACEC,KADF,EAEEC,MAFF,EAIEC,MAJF,EAKEC,UALF,QAMO,iBANP;AAOA,SAASC,cAAT,QAA+B,eAA/B;AACA,SAASC,cAAT,QAA+B,oBAA/B;AACA,SAASC,aAAT,QAA8B,kBAA9B;AACA,OAAOC,mBAAP,MAAgC,uBAAhC;AAEA,MAAMC,wBAAwB,gBAAGX,IAAI,CAAC,MAAM,OAAO,wBAAP,CAAP,CAArC;AAEA,MAAMY,gBAAgB,GAAGV,MAAM,CAACI,UAAD,CAAa;AAC5C;AACA,CAFA;AAIA,MAAMO,WAAW,GAAGX,MAAM,CAACC,KAAD,CAAQ;AAClC;AACA,CAFA;;AAIA,MAAMW,aAAoC,GAAIC,KAAD,IAAW;AACtD,QAAM;AAAEC,IAAAA;AAAF,MAAQT,cAAc,CAAC,SAAD,CAA5B;AACA,QAAMU,OAAO,GAAGR,aAAa,CAAC,IAAD,CAA7B;AAEA,sBACE,oBAAC,MAAD;AAAQ,IAAA,SAAS,EAAC,OAAlB;AAA0B,IAAA,KAAK,EAAEQ,OAAO,GAAG,MAAH,GAAY;AAApD,KAA+DF,KAA/D,gBACE,oBAAC,cAAD;AAAgB,IAAA,SAAS,EAAE;AAAEG,MAAAA,iBAAiB,EAAE,CAAC,CAAD,EAAI,CAAJ;AAArB;AAA3B,kBACE,oBAAC,MAAD,qBACE,oBAAC,gBAAD;AAAkB,IAAA,KAAK,EAAEF,CAAC,CAAC,wBAAD;AAA1B,IADF,eAGE,oBAAC,WAAD;AAAa,IAAA,IAAI,EAAC,MAAlB;AAAyB,IAAA,IAAI,EAAC;AAA9B,KACGA,CAAC,CAAC,8BAAD,CADJ,CAHF,eAOE,oBAAC,QAAD;AAAU,IAAA,QAAQ,eAAE,oBAAC,mBAAD;AAApB,kBACE,oBAAC,wBAAD,OADF,CAPF,CADF,CADF,CADF;AAiBD,CArBD;;AAuBA,eAAeF,aAAf","sourcesContent":["import React, { lazy, Suspense } from 'react';\nimport styled from '@emotion/styled';\nimport {\n Alert,\n Drawer,\n DrawerProps,\n Layout,\n PageHeader,\n} from '@os-design/core';\nimport { useTranslation } from 'react-i18next';\nimport { ThemeOverrider } from '@os-design/theming';\nimport { useIsMinWidth } from '@os-design/media';\nimport SessionListSkeleton from './SessionListSkeleton';\n\nconst LazySessionDrawerContent = lazy(() => import('./SessionDrawerContent'));\n\nconst StyledPageHeader = styled(PageHeader)`\n position: relative;\n`;\n\nconst StyledAlert = styled(Alert)`\n border-radius: 0;\n`;\n\nconst SessionDrawer: React.FC<DrawerProps> = (props) => {\n const { t } = useTranslation('profile');\n const isMinSm = useIsMinWidth('sm');\n\n return (\n <Drawer placement='right' width={isMinSm ? '24em' : '90%'} {...props}>\n <ThemeOverrider overrides={{ horizontalPadding: [1, 1] }}>\n <Layout>\n <StyledPageHeader title={t('profile:sessions.title')} />\n\n <StyledAlert type='info' size='small'>\n {t('profile:sessions.description')}\n </StyledAlert>\n\n <Suspense fallback={<SessionListSkeleton />}>\n <LazySessionDrawerContent />\n </Suspense>\n </Layout>\n </ThemeOverrider>\n </Drawer>\n );\n};\n\nexport default SessionDrawer;\n"],"file":"SessionDrawer.js"}
@@ -6,7 +6,6 @@ import { ErrorBoundary } from '@os-design/utils';
6
6
  import ErrorResult from '../shared/ErrorResult';
7
7
  import SessionList from './SessionList';
8
8
  import SessionListSkeleton from './SessionListSkeleton';
9
- export const SESSION_HORIZONTAL_PADDING = 1;
10
9
 
11
10
  const SessionDrawerContentLoader = () => {
12
11
  const props = useLazyLoadQuery(_SessionDrawerContentQuery !== void 0 ? _SessionDrawerContentQuery : (_SessionDrawerContentQuery = require("./__generated__/SessionDrawerContentQuery.graphql"), _SessionDrawerContentQuery.hash && _SessionDrawerContentQuery.hash !== "1643ac6b9bd324d389dab9011e55b1ba" && console.error("The definition of 'SessionDrawerContentQuery' appears to have changed. Run `relay-compiler` to update the generated files to receive the expected data."), _SessionDrawerContentQuery), {}, {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/lib/components/session/SessionDrawerContent.tsx"],"names":["React","Suspense","useLazyLoadQuery","ErrorBoundary","ErrorResult","SessionList","SessionListSkeleton","SESSION_HORIZONTAL_PADDING","SessionDrawerContentLoader","props","fetchPolicy","errorFallback","error","SessionDrawerContent"],"mappings":";;AAAA,OAAOA,KAAP,IAAgBC,QAAhB,QAAgC,OAAhC;AACA,SAASC,gBAAT,QAAiC,mBAAjC;AACA,SAASC,aAAT,QAA8B,kBAA9B;AAEA,OAAOC,WAAP,MAAwB,uBAAxB;AACA,OAAOC,WAAP,MAAwB,eAAxB;AACA,OAAOC,mBAAP,MAAgC,uBAAhC;AAGA,OAAO,MAAMC,0BAA0B,GAAG,CAAnC;;AAEP,MAAMC,0BAAoC,GAAG,MAAM;AACjD,QAAMC,KAAK,GAAGP,gBAAgB,sdAM5B,EAN4B,EAO5B;AAAEQ,IAAAA,WAAW,EAAE;AAAf,GAP4B,CAA9B;AAUA,sBAAO,oBAAC,WAAD;AAAa,IAAA,WAAW,EAAED;AAA1B,IAAP;AACD,CAZD;;AAcA,MAAME,aAAa,GAAG,CAAC;AAAEC,EAAAA;AAAF,CAAD,kBAAe,oBAAC,WAAD;AAAa,EAAA,KAAK,EAAEA;AAApB,EAArC;;AAEA,MAAMC,oBAA8B,GAAG,mBACrC,oBAAC,aAAD;AAAe,EAAA,QAAQ,EAAEF;AAAzB,gBACE,oBAAC,QAAD;AAAU,EAAA,QAAQ,eAAE,oBAAC,mBAAD;AAApB,gBACE,oBAAC,0BAAD,OADF,CADF,CADF;;AAQA,eAAeE,oBAAf","sourcesContent":["import React, { Suspense } from 'react';\nimport { useLazyLoadQuery } from 'react-relay/hooks';\nimport { ErrorBoundary } from '@os-design/utils';\nimport graphql from 'babel-plugin-relay/macro';\nimport ErrorResult from '../shared/ErrorResult';\nimport SessionList from './SessionList';\nimport SessionListSkeleton from './SessionListSkeleton';\nimport { SessionDrawerContentQuery } from './__generated__/SessionDrawerContentQuery.graphql';\n\nexport const SESSION_HORIZONTAL_PADDING = 1;\n\nconst SessionDrawerContentLoader: React.FC = () => {\n const props = useLazyLoadQuery<SessionDrawerContentQuery>(\n graphql`\n query SessionDrawerContentQuery {\n ...SessionList_sessions\n }\n `,\n {},\n { fetchPolicy: 'network-only' }\n );\n\n return <SessionList sessionsKey={props} />;\n};\n\nconst errorFallback = ({ error }) => <ErrorResult error={error} />;\n\nconst SessionDrawerContent: React.FC = () => (\n <ErrorBoundary fallback={errorFallback}>\n <Suspense fallback={<SessionListSkeleton />}>\n <SessionDrawerContentLoader />\n </Suspense>\n </ErrorBoundary>\n);\n\nexport default SessionDrawerContent;\n"],"file":"SessionDrawerContent.js"}
1
+ {"version":3,"sources":["../../../../src/lib/components/session/SessionDrawerContent.tsx"],"names":["React","Suspense","useLazyLoadQuery","ErrorBoundary","ErrorResult","SessionList","SessionListSkeleton","SessionDrawerContentLoader","props","fetchPolicy","errorFallback","error","SessionDrawerContent"],"mappings":";;AAAA,OAAOA,KAAP,IAAgBC,QAAhB,QAAgC,OAAhC;AACA,SAASC,gBAAT,QAAiC,mBAAjC;AACA,SAASC,aAAT,QAA8B,kBAA9B;AAEA,OAAOC,WAAP,MAAwB,uBAAxB;AACA,OAAOC,WAAP,MAAwB,eAAxB;AACA,OAAOC,mBAAP,MAAgC,uBAAhC;;AAGA,MAAMC,0BAAoC,GAAG,MAAM;AACjD,QAAMC,KAAK,GAAGN,gBAAgB,sdAM5B,EAN4B,EAO5B;AAAEO,IAAAA,WAAW,EAAE;AAAf,GAP4B,CAA9B;AAUA,sBAAO,oBAAC,WAAD;AAAa,IAAA,WAAW,EAAED;AAA1B,IAAP;AACD,CAZD;;AAcA,MAAME,aAAa,GAAG,CAAC;AAAEC,EAAAA;AAAF,CAAD,kBAAe,oBAAC,WAAD;AAAa,EAAA,KAAK,EAAEA;AAApB,EAArC;;AAEA,MAAMC,oBAA8B,GAAG,mBACrC,oBAAC,aAAD;AAAe,EAAA,QAAQ,EAAEF;AAAzB,gBACE,oBAAC,QAAD;AAAU,EAAA,QAAQ,eAAE,oBAAC,mBAAD;AAApB,gBACE,oBAAC,0BAAD,OADF,CADF,CADF;;AAQA,eAAeE,oBAAf","sourcesContent":["import React, { Suspense } from 'react';\nimport { useLazyLoadQuery } from 'react-relay/hooks';\nimport { ErrorBoundary } from '@os-design/utils';\nimport graphql from 'babel-plugin-relay/macro';\nimport ErrorResult from '../shared/ErrorResult';\nimport SessionList from './SessionList';\nimport SessionListSkeleton from './SessionListSkeleton';\nimport { SessionDrawerContentQuery } from './__generated__/SessionDrawerContentQuery.graphql';\n\nconst SessionDrawerContentLoader: React.FC = () => {\n const props = useLazyLoadQuery<SessionDrawerContentQuery>(\n graphql`\n query SessionDrawerContentQuery {\n ...SessionList_sessions\n }\n `,\n {},\n { fetchPolicy: 'network-only' }\n );\n\n return <SessionList sessionsKey={props} />;\n};\n\nconst errorFallback = ({ error }) => <ErrorResult error={error} />;\n\nconst SessionDrawerContent: React.FC = () => (\n <ErrorBoundary fallback={errorFallback}>\n <Suspense fallback={<SessionListSkeleton />}>\n <SessionDrawerContentLoader />\n </Suspense>\n </ErrorBoundary>\n);\n\nexport default SessionDrawerContent;\n"],"file":"SessionDrawerContent.js"}
@@ -1,8 +1,7 @@
1
1
  import React from 'react';
2
2
  import { DrawerProps } from '@os-design/core';
3
- export interface ProfileDrawerProps extends DrawerProps {
4
- actions?: React.ReactNode;
5
- }
3
+ import { ProfileDrawerContentProps } from './ProfileDrawerContent';
4
+ export declare type ProfileDrawerProps = ProfileDrawerContentProps & DrawerProps;
6
5
  declare const ProfileDrawer: React.FC<ProfileDrawerProps>;
7
6
  export default ProfileDrawer;
8
7
  //# sourceMappingURL=ProfileDrawer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ProfileDrawer.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/profile/ProfileDrawer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAiD,MAAM,OAAO,CAAC;AACtE,OAAO,EAAU,WAAW,EAA0B,MAAM,iBAAiB,CAAC;AAc9E,MAAM,WAAW,kBAAmB,SAAQ,WAAW;IAKrD,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AA4ND,QAAA,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAyC/C,CAAC;AAEF,eAAe,aAAa,CAAC"}
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,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAEtD,OAAO,EAAE,yBAAyB,EAAE,MAAM,wBAAwB,CAAC;AAKnE,oBAAY,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,8 @@
1
+ import React from 'react';
2
+ export interface ProfileDrawerContentProps {
3
+ actions?: React.ReactNode;
4
+ children?: React.ReactNode;
5
+ }
6
+ declare const ProfileDrawerContent: React.FC<ProfileDrawerContentProps>;
7
+ export default ProfileDrawerContent;
8
+ //# sourceMappingURL=ProfileDrawerContent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ProfileDrawerContent.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/profile/ProfileDrawerContent.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAiD,MAAM,OAAO,CAAC;AAetE,MAAM,WAAW,yBAAyB;IAKxC,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAI1B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AA2ND,QAAA,MAAM,oBAAoB,EAAE,KAAK,CAAC,EAAE,CAAC,yBAAyB,CAwC7D,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
@@ -3,6 +3,9 @@ export interface ProfileUpdateNameFormData {
3
3
  firstName: string;
4
4
  lastName: string;
5
5
  }
6
- declare const ProfileUpdateNameForm: React.FC;
6
+ interface ProfileUpdateNameFormProps {
7
+ children?: React.ReactNode;
8
+ }
9
+ declare const ProfileUpdateNameForm: React.FC<ProfileUpdateNameFormProps>;
7
10
  export default ProfileUpdateNameForm;
8
11
  //# sourceMappingURL=ProfileUpdateNameForm.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ProfileUpdateNameForm.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/profile/ProfileUpdateNameForm.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,MAAM,WAAW,yBAAyB;IACxC,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,QAAA,MAAM,qBAAqB,EAAE,KAAK,CAAC,EAkClC,CAAC;AAEF,eAAe,qBAAqB,CAAC"}
1
+ {"version":3,"file":"ProfileUpdateNameForm.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/profile/ProfileUpdateNameForm.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,MAAM,WAAW,yBAAyB;IACxC,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,UAAU,0BAA0B;IAClC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED,QAAA,MAAM,qBAAqB,EAAE,KAAK,CAAC,EAAE,CAAC,0BAA0B,CAoC/D,CAAC;AAEF,eAAe,qBAAqB,CAAC"}
@@ -3,6 +3,9 @@ export interface ProfileUpdatePasswordFormData {
3
3
  currentPassword: string;
4
4
  password: string;
5
5
  }
6
- declare const ProfileUpdatePasswordForm: React.FC;
6
+ interface ProfileUpdatePasswordFormProps {
7
+ children?: React.ReactNode;
8
+ }
9
+ declare const ProfileUpdatePasswordForm: React.FC<ProfileUpdatePasswordFormProps>;
7
10
  export default ProfileUpdatePasswordForm;
8
11
  //# sourceMappingURL=ProfileUpdatePasswordForm.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ProfileUpdatePasswordForm.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/profile/ProfileUpdatePasswordForm.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,MAAM,WAAW,6BAA6B;IAC5C,eAAe,EAAE,MAAM,CAAC;IACxB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,QAAA,MAAM,yBAAyB,EAAE,KAAK,CAAC,EA2CtC,CAAC;AAEF,eAAe,yBAAyB,CAAC"}
1
+ {"version":3,"file":"ProfileUpdatePasswordForm.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/profile/ProfileUpdatePasswordForm.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,MAAM,WAAW,6BAA6B;IAC5C,eAAe,EAAE,MAAM,CAAC;IACxB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,UAAU,8BAA8B;IACtC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED,QAAA,MAAM,yBAAyB,EAAE,KAAK,CAAC,EAAE,CAAC,8BAA8B,CA6CvE,CAAC;AAEF,eAAe,yBAAyB,CAAC"}
@@ -1,6 +1,7 @@
1
1
  import React from 'react';
2
2
  export interface ProtectedWrapperProps {
3
3
  bucketId: string;
4
+ children?: React.ReactNode;
4
5
  }
5
6
  declare const ProtectedWrapper: React.FC<ProtectedWrapperProps>;
6
7
  export default ProtectedWrapper;
@@ -1 +1 @@
1
- {"version":3,"file":"ProtectedWrapper.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/profile/ProtectedWrapper.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkB,MAAM,OAAO,CAAC;AAiDvC,MAAM,WAAW,qBAAqB;IACpC,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,QAAA,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,qBAAqB,CAkBrD,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
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"}