@intlayer/design-system 5.6.0 → 5.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/.vite/manifest.json +88 -560
- package/dist/components/Command/index.d.ts +5 -5
- package/dist/components/ContentEditor/ContentEditorTextArea.cjs +2 -27
- package/dist/components/ContentEditor/ContentEditorTextArea.cjs.map +1 -1
- package/dist/components/ContentEditor/ContentEditorTextArea.d.ts +1 -1
- package/dist/components/ContentEditor/ContentEditorTextArea.d.ts.map +1 -1
- package/dist/components/ContentEditor/ContentEditorTextArea.mjs +1 -26
- package/dist/components/ContentEditor/ContentEditorTextArea.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/ContentEditorView/TextEditor.cjs +2 -0
- package/dist/components/DictionaryFieldEditor/ContentEditorView/TextEditor.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/ContentEditorView/TextEditor.mjs +2 -0
- package/dist/components/DictionaryFieldEditor/ContentEditorView/TextEditor.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.cjs +9 -28
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.mjs +8 -27
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/useDictionaryFormSchema.cjs +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/useDictionaryFormSchema.mjs +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.cjs +10 -26
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.mjs +9 -25
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.cjs +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.mjs +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.cjs +2 -2
- package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.mjs +2 -2
- package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.cjs +7 -20
- package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.mjs +6 -19
- package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/StructureView/StructureView.cjs +2 -2
- package/dist/components/DictionaryFieldEditor/StructureView/StructureView.mjs +2 -2
- package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/VersionSwitcherContext.cjs +2 -2
- package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/VersionSwitcherContext.mjs +2 -2
- package/dist/components/EditableField/EditableFieldTextArea.cjs +2 -2
- package/dist/components/EditableField/EditableFieldTextArea.mjs +2 -2
- package/dist/components/Form/elements/FormElementWrapper.cjs +1 -1
- package/dist/components/Form/elements/FormElementWrapper.mjs +1 -1
- package/dist/components/IDE/CodeContext.cjs +2 -2
- package/dist/components/IDE/CodeContext.mjs +2 -2
- package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContent.cjs +2 -2
- package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContent.mjs +2 -2
- package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContentContext.cjs +2 -2
- package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContentContext.mjs +2 -2
- package/dist/components/Modal/Modal.cjs +3 -3
- package/dist/components/Modal/Modal.mjs +3 -3
- package/dist/components/Navbar/MobileNavbar.cjs +2 -2
- package/dist/components/Navbar/MobileNavbar.mjs +2 -2
- package/dist/components/Navbar/index.cjs +3 -3
- package/dist/components/Navbar/index.mjs +3 -3
- package/dist/components/Pattern/GridPattern.cjs +45 -48
- package/dist/components/Pattern/GridPattern.cjs.map +1 -1
- package/dist/components/Pattern/GridPattern.d.ts.map +1 -1
- package/dist/components/Pattern/GridPattern.mjs +45 -48
- package/dist/components/Pattern/GridPattern.mjs.map +1 -1
- package/dist/components/SwitchSelector/index.cjs +2 -2
- package/dist/components/SwitchSelector/index.mjs +2 -2
- package/dist/components/TabSelector/TabSelector.cjs +2 -2
- package/dist/components/TabSelector/TabSelector.mjs +2 -2
- package/dist/components/TextArea/AutocompleteTextArea.cjs +90 -13
- package/dist/components/TextArea/AutocompleteTextArea.cjs.map +1 -1
- package/dist/components/TextArea/AutocompleteTextArea.d.ts.map +1 -1
- package/dist/components/TextArea/AutocompleteTextArea.mjs +92 -15
- package/dist/components/TextArea/AutocompleteTextArea.mjs.map +1 -1
- package/dist/components/index.cjs +0 -38
- package/dist/components/index.cjs.map +1 -1
- package/dist/components/index.d.ts +0 -2
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.mjs +0 -38
- package/dist/components/index.mjs.map +1 -1
- package/dist/hooks/index.cjs +8 -1
- package/dist/hooks/index.cjs.map +1 -1
- package/dist/hooks/index.d.ts +2 -0
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.mjs +9 -2
- package/dist/hooks/index.mjs.map +1 -1
- package/dist/hooks/intlayerAPIHooks.cjs +29 -31
- package/dist/hooks/intlayerAPIHooks.cjs.map +1 -1
- package/dist/hooks/intlayerAPIHooks.d.ts +678 -10
- package/dist/hooks/intlayerAPIHooks.d.ts.map +1 -1
- package/dist/hooks/intlayerAPIHooks.mjs +29 -31
- package/dist/hooks/intlayerAPIHooks.mjs.map +1 -1
- package/dist/hooks/useAsync/useAsync.cjs +0 -1
- package/dist/hooks/useAsync/useAsync.cjs.map +1 -1
- package/dist/hooks/useAsync/useAsync.d.ts.map +1 -1
- package/dist/hooks/useAsync/useAsync.mjs +0 -1
- package/dist/hooks/useAsync/useAsync.mjs.map +1 -1
- package/dist/hooks/useAuth/index.cjs +9 -0
- package/dist/{components/Auth/AuthenticationBarrier → hooks/useAuth}/index.cjs.map +1 -1
- package/dist/hooks/useAuth/index.d.ts +4 -0
- package/dist/hooks/useAuth/index.d.ts.map +1 -0
- package/dist/hooks/useAuth/index.mjs +9 -0
- package/dist/{components/Auth/ExternalsLoginButtons → hooks/useAuth}/index.mjs.map +1 -1
- package/dist/hooks/useAuth/useAuth.cjs +25 -0
- package/dist/hooks/useAuth/useAuth.cjs.map +1 -0
- package/dist/{components/Auth/useAuth/index.d.ts → hooks/useAuth/useAuth.d.ts} +3 -13
- package/dist/hooks/useAuth/useAuth.d.ts.map +1 -0
- package/dist/{components/Auth/useAuth/index.mjs → hooks/useAuth/useAuth.mjs} +2 -8
- package/dist/hooks/useAuth/useAuth.mjs.map +1 -0
- package/dist/{components/Auth → hooks}/useAuth/useOAuth2.cjs +3 -3
- package/dist/hooks/useAuth/useOAuth2.cjs.map +1 -0
- package/dist/{components/Auth → hooks}/useAuth/useOAuth2.d.ts +1 -1
- package/dist/hooks/useAuth/useOAuth2.d.ts.map +1 -0
- package/dist/{components/Auth → hooks}/useAuth/useOAuth2.mjs +4 -4
- package/dist/hooks/useAuth/useOAuth2.mjs.map +1 -0
- package/dist/{components/Auth → hooks}/useAuth/useSession.cjs +6 -25
- package/dist/hooks/useAuth/useSession.cjs.map +1 -0
- package/dist/{components/Auth → hooks}/useAuth/useSession.d.ts +3 -3
- package/dist/hooks/useAuth/useSession.d.ts.map +1 -0
- package/dist/hooks/useAuth/useSession.mjs +47 -0
- package/dist/hooks/useAuth/useSession.mjs.map +1 -0
- package/dist/hooks/useIntlayerAPI.cjs +5 -4
- package/dist/hooks/useIntlayerAPI.cjs.map +1 -1
- package/dist/hooks/useIntlayerAPI.mjs +5 -4
- package/dist/hooks/useIntlayerAPI.mjs.map +1 -1
- package/dist/{components/Auth → hooks}/useUser/index.cjs +7 -5
- package/dist/hooks/useUser/index.cjs.map +1 -0
- package/dist/hooks/useUser/index.d.ts +8 -0
- package/dist/hooks/useUser/index.d.ts.map +1 -0
- package/dist/{components/Auth → hooks}/useUser/index.mjs +6 -4
- package/dist/hooks/useUser/index.mjs.map +1 -0
- package/dist/{schemas-itjzX6bG.js → schemas-BIuxHDyZ.js} +3 -7
- package/dist/{schemas-itjzX6bG.js.map → schemas-BIuxHDyZ.js.map} +1 -1
- package/dist/{schemas-DlCjM5d_.cjs → schemas-Q6C7ZNs3.cjs} +3 -7
- package/dist/{schemas-DlCjM5d_.cjs.map → schemas-Q6C7ZNs3.cjs.map} +1 -1
- package/dist/tailwind.css +1 -1
- package/package.json +17 -17
- package/dist/components/Auth/AuthModal/index.cjs +0 -106
- package/dist/components/Auth/AuthModal/index.cjs.map +0 -1
- package/dist/components/Auth/AuthModal/index.d.ts +0 -20
- package/dist/components/Auth/AuthModal/index.d.ts.map +0 -1
- package/dist/components/Auth/AuthModal/index.mjs +0 -106
- package/dist/components/Auth/AuthModal/index.mjs.map +0 -1
- package/dist/components/Auth/AuthenticationBarrier/AuthenticationBarrierClient.cjs +0 -36
- package/dist/components/Auth/AuthenticationBarrier/AuthenticationBarrierClient.cjs.map +0 -1
- package/dist/components/Auth/AuthenticationBarrier/AuthenticationBarrierClient.d.ts +0 -5
- package/dist/components/Auth/AuthenticationBarrier/AuthenticationBarrierClient.d.ts.map +0 -1
- package/dist/components/Auth/AuthenticationBarrier/AuthenticationBarrierClient.mjs +0 -36
- package/dist/components/Auth/AuthenticationBarrier/AuthenticationBarrierClient.mjs.map +0 -1
- package/dist/components/Auth/AuthenticationBarrier/AuthenticationBarrierServer.cjs +0 -22
- package/dist/components/Auth/AuthenticationBarrier/AuthenticationBarrierServer.cjs.map +0 -1
- package/dist/components/Auth/AuthenticationBarrier/AuthenticationBarrierServer.d.ts +0 -8
- package/dist/components/Auth/AuthenticationBarrier/AuthenticationBarrierServer.d.ts.map +0 -1
- package/dist/components/Auth/AuthenticationBarrier/AuthenticationBarrierServer.mjs +0 -22
- package/dist/components/Auth/AuthenticationBarrier/AuthenticationBarrierServer.mjs.map +0 -1
- package/dist/components/Auth/AuthenticationBarrier/accessValidation.cjs +0 -15
- package/dist/components/Auth/AuthenticationBarrier/accessValidation.cjs.map +0 -1
- package/dist/components/Auth/AuthenticationBarrier/accessValidation.d.ts +0 -4
- package/dist/components/Auth/AuthenticationBarrier/accessValidation.d.ts.map +0 -1
- package/dist/components/Auth/AuthenticationBarrier/accessValidation.mjs +0 -15
- package/dist/components/Auth/AuthenticationBarrier/accessValidation.mjs.map +0 -1
- package/dist/components/Auth/AuthenticationBarrier/index.cjs +0 -7
- package/dist/components/Auth/AuthenticationBarrier/index.d.ts +0 -23
- package/dist/components/Auth/AuthenticationBarrier/index.d.ts.map +0 -1
- package/dist/components/Auth/AuthenticationBarrier/index.mjs +0 -7
- package/dist/components/Auth/AuthenticationBarrier/index.mjs.map +0 -1
- package/dist/components/Auth/ChangePasswordForm/ChangePasswordForm.cjs +0 -95
- package/dist/components/Auth/ChangePasswordForm/ChangePasswordForm.cjs.map +0 -1
- package/dist/components/Auth/ChangePasswordForm/ChangePasswordForm.d.ts +0 -9
- package/dist/components/Auth/ChangePasswordForm/ChangePasswordForm.d.ts.map +0 -1
- package/dist/components/Auth/ChangePasswordForm/ChangePasswordForm.mjs +0 -95
- package/dist/components/Auth/ChangePasswordForm/ChangePasswordForm.mjs.map +0 -1
- package/dist/components/Auth/ChangePasswordForm/changePasswordForm.content.cjs +0 -138
- package/dist/components/Auth/ChangePasswordForm/changePasswordForm.content.cjs.map +0 -1
- package/dist/components/Auth/ChangePasswordForm/changePasswordForm.content.d.ts +0 -278
- package/dist/components/Auth/ChangePasswordForm/changePasswordForm.content.d.ts.map +0 -1
- package/dist/components/Auth/ChangePasswordForm/changePasswordForm.content.mjs +0 -138
- package/dist/components/Auth/ChangePasswordForm/changePasswordForm.content.mjs.map +0 -1
- package/dist/components/Auth/ChangePasswordForm/index.cjs +0 -7
- package/dist/components/Auth/ChangePasswordForm/index.cjs.map +0 -1
- package/dist/components/Auth/ChangePasswordForm/index.d.ts +0 -3
- package/dist/components/Auth/ChangePasswordForm/index.d.ts.map +0 -1
- package/dist/components/Auth/ChangePasswordForm/index.mjs +0 -7
- package/dist/components/Auth/ChangePasswordForm/index.mjs.map +0 -1
- package/dist/components/Auth/ChangePasswordForm/useChangePasswordSchema.cjs +0 -34
- package/dist/components/Auth/ChangePasswordForm/useChangePasswordSchema.cjs.map +0 -1
- package/dist/components/Auth/ChangePasswordForm/useChangePasswordSchema.content.cjs +0 -131
- package/dist/components/Auth/ChangePasswordForm/useChangePasswordSchema.content.cjs.map +0 -1
- package/dist/components/Auth/ChangePasswordForm/useChangePasswordSchema.content.d.ts +0 -271
- package/dist/components/Auth/ChangePasswordForm/useChangePasswordSchema.content.d.ts.map +0 -1
- package/dist/components/Auth/ChangePasswordForm/useChangePasswordSchema.content.mjs +0 -131
- package/dist/components/Auth/ChangePasswordForm/useChangePasswordSchema.content.mjs.map +0 -1
- package/dist/components/Auth/ChangePasswordForm/useChangePasswordSchema.d.ts +0 -8
- package/dist/components/Auth/ChangePasswordForm/useChangePasswordSchema.d.ts.map +0 -1
- package/dist/components/Auth/ChangePasswordForm/useChangePasswordSchema.mjs +0 -34
- package/dist/components/Auth/ChangePasswordForm/useChangePasswordSchema.mjs.map +0 -1
- package/dist/components/Auth/DefineNewPasswordForm/DefineNewPasswordForm.cjs +0 -81
- package/dist/components/Auth/DefineNewPasswordForm/DefineNewPasswordForm.cjs.map +0 -1
- package/dist/components/Auth/DefineNewPasswordForm/DefineNewPasswordForm.d.ts +0 -9
- package/dist/components/Auth/DefineNewPasswordForm/DefineNewPasswordForm.d.ts.map +0 -1
- package/dist/components/Auth/DefineNewPasswordForm/DefineNewPasswordForm.mjs +0 -81
- package/dist/components/Auth/DefineNewPasswordForm/DefineNewPasswordForm.mjs.map +0 -1
- package/dist/components/Auth/DefineNewPasswordForm/defineNewPasswordForm.content.cjs +0 -106
- package/dist/components/Auth/DefineNewPasswordForm/defineNewPasswordForm.content.cjs.map +0 -1
- package/dist/components/Auth/DefineNewPasswordForm/defineNewPasswordForm.content.d.ts +0 -210
- package/dist/components/Auth/DefineNewPasswordForm/defineNewPasswordForm.content.d.ts.map +0 -1
- package/dist/components/Auth/DefineNewPasswordForm/defineNewPasswordForm.content.mjs +0 -106
- package/dist/components/Auth/DefineNewPasswordForm/defineNewPasswordForm.content.mjs.map +0 -1
- package/dist/components/Auth/DefineNewPasswordForm/index.cjs +0 -7
- package/dist/components/Auth/DefineNewPasswordForm/index.cjs.map +0 -1
- package/dist/components/Auth/DefineNewPasswordForm/index.d.ts +0 -3
- package/dist/components/Auth/DefineNewPasswordForm/index.d.ts.map +0 -1
- package/dist/components/Auth/DefineNewPasswordForm/index.mjs +0 -7
- package/dist/components/Auth/DefineNewPasswordForm/index.mjs.map +0 -1
- package/dist/components/Auth/DefineNewPasswordForm/useDefineNewPasswordSchema.cjs +0 -29
- package/dist/components/Auth/DefineNewPasswordForm/useDefineNewPasswordSchema.cjs.map +0 -1
- package/dist/components/Auth/DefineNewPasswordForm/useDefineNewPasswordSchema.content.cjs +0 -101
- package/dist/components/Auth/DefineNewPasswordForm/useDefineNewPasswordSchema.content.cjs.map +0 -1
- package/dist/components/Auth/DefineNewPasswordForm/useDefineNewPasswordSchema.content.d.ts +0 -205
- package/dist/components/Auth/DefineNewPasswordForm/useDefineNewPasswordSchema.content.d.ts.map +0 -1
- package/dist/components/Auth/DefineNewPasswordForm/useDefineNewPasswordSchema.content.mjs +0 -101
- package/dist/components/Auth/DefineNewPasswordForm/useDefineNewPasswordSchema.content.mjs.map +0 -1
- package/dist/components/Auth/DefineNewPasswordForm/useDefineNewPasswordSchema.d.ts +0 -7
- package/dist/components/Auth/DefineNewPasswordForm/useDefineNewPasswordSchema.d.ts.map +0 -1
- package/dist/components/Auth/DefineNewPasswordForm/useDefineNewPasswordSchema.mjs +0 -29
- package/dist/components/Auth/DefineNewPasswordForm/useDefineNewPasswordSchema.mjs.map +0 -1
- package/dist/components/Auth/ExternalsLoginButtons/ExternalsLoginButtons.cjs +0 -81
- package/dist/components/Auth/ExternalsLoginButtons/ExternalsLoginButtons.cjs.map +0 -1
- package/dist/components/Auth/ExternalsLoginButtons/ExternalsLoginButtons.d.ts +0 -9
- package/dist/components/Auth/ExternalsLoginButtons/ExternalsLoginButtons.d.ts.map +0 -1
- package/dist/components/Auth/ExternalsLoginButtons/ExternalsLoginButtons.mjs +0 -81
- package/dist/components/Auth/ExternalsLoginButtons/ExternalsLoginButtons.mjs.map +0 -1
- package/dist/components/Auth/ExternalsLoginButtons/assets/GithubLogo.cjs +0 -15
- package/dist/components/Auth/ExternalsLoginButtons/assets/GithubLogo.cjs.map +0 -1
- package/dist/components/Auth/ExternalsLoginButtons/assets/GithubLogo.d.ts +0 -3
- package/dist/components/Auth/ExternalsLoginButtons/assets/GithubLogo.d.ts.map +0 -1
- package/dist/components/Auth/ExternalsLoginButtons/assets/GithubLogo.mjs +0 -15
- package/dist/components/Auth/ExternalsLoginButtons/assets/GithubLogo.mjs.map +0 -1
- package/dist/components/Auth/ExternalsLoginButtons/assets/GoogleLogo.cjs +0 -23
- package/dist/components/Auth/ExternalsLoginButtons/assets/GoogleLogo.cjs.map +0 -1
- package/dist/components/Auth/ExternalsLoginButtons/assets/GoogleLogo.d.ts +0 -3
- package/dist/components/Auth/ExternalsLoginButtons/assets/GoogleLogo.d.ts.map +0 -1
- package/dist/components/Auth/ExternalsLoginButtons/assets/GoogleLogo.mjs +0 -23
- package/dist/components/Auth/ExternalsLoginButtons/assets/GoogleLogo.mjs.map +0 -1
- package/dist/components/Auth/ExternalsLoginButtons/externalsLoginButtons.content.cjs +0 -90
- package/dist/components/Auth/ExternalsLoginButtons/externalsLoginButtons.content.cjs.map +0 -1
- package/dist/components/Auth/ExternalsLoginButtons/externalsLoginButtons.content.d.ts +0 -176
- package/dist/components/Auth/ExternalsLoginButtons/externalsLoginButtons.content.d.ts.map +0 -1
- package/dist/components/Auth/ExternalsLoginButtons/externalsLoginButtons.content.mjs +0 -90
- package/dist/components/Auth/ExternalsLoginButtons/externalsLoginButtons.content.mjs.map +0 -1
- package/dist/components/Auth/ExternalsLoginButtons/index.cjs +0 -7
- package/dist/components/Auth/ExternalsLoginButtons/index.cjs.map +0 -1
- package/dist/components/Auth/ExternalsLoginButtons/index.d.ts +0 -2
- package/dist/components/Auth/ExternalsLoginButtons/index.d.ts.map +0 -1
- package/dist/components/Auth/ExternalsLoginButtons/index.mjs +0 -7
- package/dist/components/Auth/ResetPasswordForm/ResetPasswordForm.cjs +0 -113
- package/dist/components/Auth/ResetPasswordForm/ResetPasswordForm.cjs.map +0 -1
- package/dist/components/Auth/ResetPasswordForm/ResetPasswordForm.d.ts +0 -11
- package/dist/components/Auth/ResetPasswordForm/ResetPasswordForm.d.ts.map +0 -1
- package/dist/components/Auth/ResetPasswordForm/ResetPasswordForm.mjs +0 -113
- package/dist/components/Auth/ResetPasswordForm/ResetPasswordForm.mjs.map +0 -1
- package/dist/components/Auth/ResetPasswordForm/index.cjs +0 -7
- package/dist/components/Auth/ResetPasswordForm/index.cjs.map +0 -1
- package/dist/components/Auth/ResetPasswordForm/index.d.ts +0 -3
- package/dist/components/Auth/ResetPasswordForm/index.d.ts.map +0 -1
- package/dist/components/Auth/ResetPasswordForm/index.mjs +0 -7
- package/dist/components/Auth/ResetPasswordForm/index.mjs.map +0 -1
- package/dist/components/Auth/ResetPasswordForm/resetPasswordContent.content.cjs +0 -123
- package/dist/components/Auth/ResetPasswordForm/resetPasswordContent.content.cjs.map +0 -1
- package/dist/components/Auth/ResetPasswordForm/resetPasswordContent.content.d.ts +0 -245
- package/dist/components/Auth/ResetPasswordForm/resetPasswordContent.content.d.ts.map +0 -1
- package/dist/components/Auth/ResetPasswordForm/resetPasswordContent.content.mjs +0 -123
- package/dist/components/Auth/ResetPasswordForm/resetPasswordContent.content.mjs.map +0 -1
- package/dist/components/Auth/ResetPasswordForm/useResetPasswordSchema.cjs +0 -15
- package/dist/components/Auth/ResetPasswordForm/useResetPasswordSchema.cjs.map +0 -1
- package/dist/components/Auth/ResetPasswordForm/useResetPasswordSchema.content.cjs +0 -56
- package/dist/components/Auth/ResetPasswordForm/useResetPasswordSchema.content.cjs.map +0 -1
- package/dist/components/Auth/ResetPasswordForm/useResetPasswordSchema.content.d.ts +0 -106
- package/dist/components/Auth/ResetPasswordForm/useResetPasswordSchema.content.d.ts.map +0 -1
- package/dist/components/Auth/ResetPasswordForm/useResetPasswordSchema.content.mjs +0 -56
- package/dist/components/Auth/ResetPasswordForm/useResetPasswordSchema.content.mjs.map +0 -1
- package/dist/components/Auth/ResetPasswordForm/useResetPasswordSchema.d.ts +0 -6
- package/dist/components/Auth/ResetPasswordForm/useResetPasswordSchema.d.ts.map +0 -1
- package/dist/components/Auth/ResetPasswordForm/useResetPasswordSchema.mjs +0 -15
- package/dist/components/Auth/ResetPasswordForm/useResetPasswordSchema.mjs.map +0 -1
- package/dist/components/Auth/SignInForm/SignInForm.cjs +0 -105
- package/dist/components/Auth/SignInForm/SignInForm.cjs.map +0 -1
- package/dist/components/Auth/SignInForm/SignInForm.d.ts +0 -11
- package/dist/components/Auth/SignInForm/SignInForm.d.ts.map +0 -1
- package/dist/components/Auth/SignInForm/SignInForm.mjs +0 -105
- package/dist/components/Auth/SignInForm/SignInForm.mjs.map +0 -1
- package/dist/components/Auth/SignInForm/index.cjs +0 -7
- package/dist/components/Auth/SignInForm/index.cjs.map +0 -1
- package/dist/components/Auth/SignInForm/index.d.ts +0 -3
- package/dist/components/Auth/SignInForm/index.d.ts.map +0 -1
- package/dist/components/Auth/SignInForm/index.mjs +0 -7
- package/dist/components/Auth/SignInForm/index.mjs.map +0 -1
- package/dist/components/Auth/SignInForm/signIn.content.cjs +0 -217
- package/dist/components/Auth/SignInForm/signIn.content.cjs.map +0 -1
- package/dist/components/Auth/SignInForm/signIn.content.d.ts +0 -447
- package/dist/components/Auth/SignInForm/signIn.content.d.ts.map +0 -1
- package/dist/components/Auth/SignInForm/signIn.content.mjs +0 -217
- package/dist/components/Auth/SignInForm/signIn.content.mjs.map +0 -1
- package/dist/components/Auth/SignInForm/useSignInSchema.cjs +0 -23
- package/dist/components/Auth/SignInForm/useSignInSchema.cjs.map +0 -1
- package/dist/components/Auth/SignInForm/useSignInSchema.content.cjs +0 -71
- package/dist/components/Auth/SignInForm/useSignInSchema.content.cjs.map +0 -1
- package/dist/components/Auth/SignInForm/useSignInSchema.content.d.ts +0 -139
- package/dist/components/Auth/SignInForm/useSignInSchema.content.d.ts.map +0 -1
- package/dist/components/Auth/SignInForm/useSignInSchema.content.mjs +0 -71
- package/dist/components/Auth/SignInForm/useSignInSchema.content.mjs.map +0 -1
- package/dist/components/Auth/SignInForm/useSignInSchema.d.ts +0 -7
- package/dist/components/Auth/SignInForm/useSignInSchema.d.ts.map +0 -1
- package/dist/components/Auth/SignInForm/useSignInSchema.mjs +0 -23
- package/dist/components/Auth/SignInForm/useSignInSchema.mjs.map +0 -1
- package/dist/components/Auth/SignUpForm/SignUpForm.cjs +0 -98
- package/dist/components/Auth/SignUpForm/SignUpForm.cjs.map +0 -1
- package/dist/components/Auth/SignUpForm/SignUpForm.d.ts +0 -10
- package/dist/components/Auth/SignUpForm/SignUpForm.d.ts.map +0 -1
- package/dist/components/Auth/SignUpForm/SignUpForm.mjs +0 -98
- package/dist/components/Auth/SignUpForm/SignUpForm.mjs.map +0 -1
- package/dist/components/Auth/SignUpForm/index.cjs +0 -7
- package/dist/components/Auth/SignUpForm/index.cjs.map +0 -1
- package/dist/components/Auth/SignUpForm/index.d.ts +0 -3
- package/dist/components/Auth/SignUpForm/index.d.ts.map +0 -1
- package/dist/components/Auth/SignUpForm/index.mjs +0 -7
- package/dist/components/Auth/SignUpForm/index.mjs.map +0 -1
- package/dist/components/Auth/SignUpForm/signUpForm.content.cjs +0 -184
- package/dist/components/Auth/SignUpForm/signUpForm.content.cjs.map +0 -1
- package/dist/components/Auth/SignUpForm/signUpForm.content.d.ts +0 -380
- package/dist/components/Auth/SignUpForm/signUpForm.content.d.ts.map +0 -1
- package/dist/components/Auth/SignUpForm/signUpForm.content.mjs +0 -185
- package/dist/components/Auth/SignUpForm/signUpForm.content.mjs.map +0 -1
- package/dist/components/Auth/SignUpForm/useSignUpSchema.cjs +0 -33
- package/dist/components/Auth/SignUpForm/useSignUpSchema.cjs.map +0 -1
- package/dist/components/Auth/SignUpForm/useSignUpSchema.content.cjs +0 -116
- package/dist/components/Auth/SignUpForm/useSignUpSchema.content.cjs.map +0 -1
- package/dist/components/Auth/SignUpForm/useSignUpSchema.content.d.ts +0 -238
- package/dist/components/Auth/SignUpForm/useSignUpSchema.content.d.ts.map +0 -1
- package/dist/components/Auth/SignUpForm/useSignUpSchema.content.mjs +0 -116
- package/dist/components/Auth/SignUpForm/useSignUpSchema.content.mjs.map +0 -1
- package/dist/components/Auth/SignUpForm/useSignUpSchema.d.ts +0 -8
- package/dist/components/Auth/SignUpForm/useSignUpSchema.d.ts.map +0 -1
- package/dist/components/Auth/SignUpForm/useSignUpSchema.mjs +0 -33
- package/dist/components/Auth/SignUpForm/useSignUpSchema.mjs.map +0 -1
- package/dist/components/Auth/VerifyEmailForm/VerifyEmailForm.cjs +0 -79
- package/dist/components/Auth/VerifyEmailForm/VerifyEmailForm.cjs.map +0 -1
- package/dist/components/Auth/VerifyEmailForm/VerifyEmailForm.d.ts +0 -10
- package/dist/components/Auth/VerifyEmailForm/VerifyEmailForm.d.ts.map +0 -1
- package/dist/components/Auth/VerifyEmailForm/VerifyEmailForm.mjs +0 -79
- package/dist/components/Auth/VerifyEmailForm/VerifyEmailForm.mjs.map +0 -1
- package/dist/components/Auth/VerifyEmailForm/VerifyEmailSchema.cjs +0 -8
- package/dist/components/Auth/VerifyEmailForm/VerifyEmailSchema.cjs.map +0 -1
- package/dist/components/Auth/VerifyEmailForm/VerifyEmailSchema.d.ts +0 -4
- package/dist/components/Auth/VerifyEmailForm/VerifyEmailSchema.d.ts.map +0 -1
- package/dist/components/Auth/VerifyEmailForm/VerifyEmailSchema.mjs +0 -8
- package/dist/components/Auth/VerifyEmailForm/VerifyEmailSchema.mjs.map +0 -1
- package/dist/components/Auth/VerifyEmailForm/index.cjs +0 -5
- package/dist/components/Auth/VerifyEmailForm/index.cjs.map +0 -1
- package/dist/components/Auth/VerifyEmailForm/index.content.cjs +0 -73
- package/dist/components/Auth/VerifyEmailForm/index.content.cjs.map +0 -1
- package/dist/components/Auth/VerifyEmailForm/index.content.d.ts +0 -143
- package/dist/components/Auth/VerifyEmailForm/index.content.d.ts.map +0 -1
- package/dist/components/Auth/VerifyEmailForm/index.content.mjs +0 -74
- package/dist/components/Auth/VerifyEmailForm/index.content.mjs.map +0 -1
- package/dist/components/Auth/VerifyEmailForm/index.d.ts +0 -2
- package/dist/components/Auth/VerifyEmailForm/index.d.ts.map +0 -1
- package/dist/components/Auth/VerifyEmailForm/index.mjs +0 -5
- package/dist/components/Auth/VerifyEmailForm/index.mjs.map +0 -1
- package/dist/components/Auth/index.cjs +0 -39
- package/dist/components/Auth/index.cjs.map +0 -1
- package/dist/components/Auth/index.d.ts +0 -12
- package/dist/components/Auth/index.d.ts.map +0 -1
- package/dist/components/Auth/index.mjs +0 -39
- package/dist/components/Auth/index.mjs.map +0 -1
- package/dist/components/Auth/useAuth/index.cjs +0 -31
- package/dist/components/Auth/useAuth/index.cjs.map +0 -1
- package/dist/components/Auth/useAuth/index.d.ts.map +0 -1
- package/dist/components/Auth/useAuth/index.mjs.map +0 -1
- package/dist/components/Auth/useAuth/useCSRF.cjs +0 -27
- package/dist/components/Auth/useAuth/useCSRF.cjs.map +0 -1
- package/dist/components/Auth/useAuth/useCSRF.d.ts +0 -6
- package/dist/components/Auth/useAuth/useCSRF.d.ts.map +0 -1
- package/dist/components/Auth/useAuth/useCSRF.mjs +0 -27
- package/dist/components/Auth/useAuth/useCSRF.mjs.map +0 -1
- package/dist/components/Auth/useAuth/useOAuth2.cjs.map +0 -1
- package/dist/components/Auth/useAuth/useOAuth2.d.ts.map +0 -1
- package/dist/components/Auth/useAuth/useOAuth2.mjs.map +0 -1
- package/dist/components/Auth/useAuth/useSession.cjs.map +0 -1
- package/dist/components/Auth/useAuth/useSession.d.ts.map +0 -1
- package/dist/components/Auth/useAuth/useSession.mjs +0 -66
- package/dist/components/Auth/useAuth/useSession.mjs.map +0 -1
- package/dist/components/Auth/useUser/index.cjs.map +0 -1
- package/dist/components/Auth/useUser/index.d.ts +0 -8
- package/dist/components/Auth/useUser/index.d.ts.map +0 -1
- package/dist/components/Auth/useUser/index.mjs.map +0 -1
- package/dist/components/ProfileDropDown/index.cjs +0 -25
- package/dist/components/ProfileDropDown/index.cjs.map +0 -1
- package/dist/components/ProfileDropDown/index.d.ts +0 -6
- package/dist/components/ProfileDropDown/index.d.ts.map +0 -1
- package/dist/components/ProfileDropDown/index.mjs +0 -25
- package/dist/components/ProfileDropDown/index.mjs.map +0 -1
- package/dist/hooks/useIntlayerAPI.d.ts +0 -103
- package/dist/hooks/useIntlayerAPI.d.ts.map +0 -1
|
@@ -1,143 +0,0 @@
|
|
|
1
|
-
declare const verifyEmailFormContent: {
|
|
2
|
-
key: string;
|
|
3
|
-
content: {
|
|
4
|
-
verifyEmail: {
|
|
5
|
-
title: import('@intlayer/core').TypedNodeModel<import("@intlayer/core").NodeType.Translation, {
|
|
6
|
-
en: string;
|
|
7
|
-
'en-GB': string;
|
|
8
|
-
fr: string;
|
|
9
|
-
es: string;
|
|
10
|
-
de: string;
|
|
11
|
-
ja: string;
|
|
12
|
-
ko: string;
|
|
13
|
-
zh: string;
|
|
14
|
-
it: string;
|
|
15
|
-
pt: string;
|
|
16
|
-
hi: string;
|
|
17
|
-
ar: string;
|
|
18
|
-
ru: string;
|
|
19
|
-
}, {
|
|
20
|
-
nodeType: import("@intlayer/core").NodeType.Translation | "translation";
|
|
21
|
-
} & {
|
|
22
|
-
translation: {
|
|
23
|
-
en: string;
|
|
24
|
-
'en-GB': string;
|
|
25
|
-
fr: string;
|
|
26
|
-
es: string;
|
|
27
|
-
de: string;
|
|
28
|
-
ja: string;
|
|
29
|
-
ko: string;
|
|
30
|
-
zh: string;
|
|
31
|
-
it: string;
|
|
32
|
-
pt: string;
|
|
33
|
-
hi: string;
|
|
34
|
-
ar: string;
|
|
35
|
-
ru: string;
|
|
36
|
-
};
|
|
37
|
-
}>;
|
|
38
|
-
description: import('@intlayer/core').TypedNodeModel<import("@intlayer/core").NodeType.Translation, {
|
|
39
|
-
en: string;
|
|
40
|
-
'en-GB': string;
|
|
41
|
-
fr: string;
|
|
42
|
-
es: string;
|
|
43
|
-
de: string;
|
|
44
|
-
ja: string;
|
|
45
|
-
ko: string;
|
|
46
|
-
zh: string;
|
|
47
|
-
it: string;
|
|
48
|
-
pt: string;
|
|
49
|
-
hi: string;
|
|
50
|
-
ar: string;
|
|
51
|
-
ru: string;
|
|
52
|
-
}, {
|
|
53
|
-
nodeType: import("@intlayer/core").NodeType.Translation | "translation";
|
|
54
|
-
} & {
|
|
55
|
-
translation: {
|
|
56
|
-
en: string;
|
|
57
|
-
'en-GB': string;
|
|
58
|
-
fr: string;
|
|
59
|
-
es: string;
|
|
60
|
-
de: string;
|
|
61
|
-
ja: string;
|
|
62
|
-
ko: string;
|
|
63
|
-
zh: string;
|
|
64
|
-
it: string;
|
|
65
|
-
pt: string;
|
|
66
|
-
hi: string;
|
|
67
|
-
ar: string;
|
|
68
|
-
ru: string;
|
|
69
|
-
};
|
|
70
|
-
}>;
|
|
71
|
-
};
|
|
72
|
-
doneButton: {
|
|
73
|
-
text: import('@intlayer/core').TypedNodeModel<import("@intlayer/core").NodeType.Translation, {
|
|
74
|
-
en: string;
|
|
75
|
-
'en-GB': string;
|
|
76
|
-
fr: string;
|
|
77
|
-
es: string;
|
|
78
|
-
de: string;
|
|
79
|
-
ja: string;
|
|
80
|
-
ko: string;
|
|
81
|
-
zh: string;
|
|
82
|
-
it: string;
|
|
83
|
-
pt: string;
|
|
84
|
-
hi: string;
|
|
85
|
-
ar: string;
|
|
86
|
-
ru: string;
|
|
87
|
-
}, {
|
|
88
|
-
nodeType: import("@intlayer/core").NodeType.Translation | "translation";
|
|
89
|
-
} & {
|
|
90
|
-
translation: {
|
|
91
|
-
en: string;
|
|
92
|
-
'en-GB': string;
|
|
93
|
-
fr: string;
|
|
94
|
-
es: string;
|
|
95
|
-
de: string;
|
|
96
|
-
ja: string;
|
|
97
|
-
ko: string;
|
|
98
|
-
zh: string;
|
|
99
|
-
it: string;
|
|
100
|
-
pt: string;
|
|
101
|
-
hi: string;
|
|
102
|
-
ar: string;
|
|
103
|
-
ru: string;
|
|
104
|
-
};
|
|
105
|
-
}>;
|
|
106
|
-
ariaLabel: import('@intlayer/core').TypedNodeModel<import("@intlayer/core").NodeType.Translation, {
|
|
107
|
-
en: string;
|
|
108
|
-
'en-GB': string;
|
|
109
|
-
fr: string;
|
|
110
|
-
es: string;
|
|
111
|
-
de: string;
|
|
112
|
-
ja: string;
|
|
113
|
-
ko: string;
|
|
114
|
-
zh: string;
|
|
115
|
-
it: string;
|
|
116
|
-
pt: string;
|
|
117
|
-
hi: string;
|
|
118
|
-
ar: string;
|
|
119
|
-
ru: string;
|
|
120
|
-
}, {
|
|
121
|
-
nodeType: import("@intlayer/core").NodeType.Translation | "translation";
|
|
122
|
-
} & {
|
|
123
|
-
translation: {
|
|
124
|
-
en: string;
|
|
125
|
-
'en-GB': string;
|
|
126
|
-
fr: string;
|
|
127
|
-
es: string;
|
|
128
|
-
de: string;
|
|
129
|
-
ja: string;
|
|
130
|
-
ko: string;
|
|
131
|
-
zh: string;
|
|
132
|
-
it: string;
|
|
133
|
-
pt: string;
|
|
134
|
-
hi: string;
|
|
135
|
-
ar: string;
|
|
136
|
-
ru: string;
|
|
137
|
-
};
|
|
138
|
-
}>;
|
|
139
|
-
};
|
|
140
|
-
};
|
|
141
|
-
};
|
|
142
|
-
export default verifyEmailFormContent;
|
|
143
|
-
//# sourceMappingURL=index.content.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.content.d.ts","sourceRoot":"","sources":["../../../../src/components/Auth/VerifyEmailForm/index.content.ts"],"names":[],"mappings":"AAEA,QAAA,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqEN,CAAC;AAEvB,eAAe,sBAAsB,CAAC"}
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
import { t } from "intlayer";
|
|
2
|
-
const verifyEmailFormContent = {
|
|
3
|
-
key: "verify-email-form",
|
|
4
|
-
content: {
|
|
5
|
-
verifyEmail: {
|
|
6
|
-
title: t({
|
|
7
|
-
en: "Verify your email",
|
|
8
|
-
"en-GB": "Verify your email",
|
|
9
|
-
fr: "Vérifiez votre adresse e-mail",
|
|
10
|
-
es: "Verifique su correo electrónico",
|
|
11
|
-
de: "Bestätigen Sie Ihre E-Mail",
|
|
12
|
-
ja: "メールを確認してください",
|
|
13
|
-
ko: "이메일을 확인해주세요",
|
|
14
|
-
zh: "请验证您的电子邮件",
|
|
15
|
-
it: "Verifica la tua email",
|
|
16
|
-
pt: "Verifique seu e-mail",
|
|
17
|
-
hi: "अपने ईमेल की पुष्टि करें",
|
|
18
|
-
ar: "تحقق من بريدك الإلكتروني",
|
|
19
|
-
ru: "Подтвердите ваш адрес электронной почты"
|
|
20
|
-
}),
|
|
21
|
-
description: t({
|
|
22
|
-
en: "We sent you an email to verify your email address. Please check your inbox and click on the link to verify your email.",
|
|
23
|
-
"en-GB": "We sent you an email to verify your email address. Please check your inbox and click on the link to verify your email.",
|
|
24
|
-
fr: "Nous vous avons envoyé un e-mail pour vérifier votre adresse e-mail. Veuillez vérifier votre boîte de réception et cliquez sur le lien pour vérifier votre adresse e-mail.",
|
|
25
|
-
es: "Te hemos enviado un correo electrónico para verificar tu dirección de correo electrónico. Por favor, revisa tu bandeja de entrada y haz clic en el enlace para verificar tu dirección de correo electrónico.",
|
|
26
|
-
de: "Wir haben Ihnen eine E-Mail gesendet, um Ihre E-Mail-Adresse zu überprüfen. Bitte überprüfen Sie Ihren Posteingang und klicken Sie auf den Link, um Ihre E-Mail zu bestätigen.",
|
|
27
|
-
ja: "あなたのメールアドレスを確認するためにメールを送りました。受信トレイを確認し、メールを確認するためにリンクをクリックしてください。",
|
|
28
|
-
ko: "이메일 주소를 확인하기 위해 이메일을 보냈습니다. 받은 편지함을 확인하고 이메일을 확인하기 위해 링크를 클릭하세요.",
|
|
29
|
-
zh: "我们给您发送了一封电子邮件以验证您的电子邮件地址。请检查您的收件箱并点击链接以验证您的电子邮件。",
|
|
30
|
-
it: "Ti abbiamo inviato un'email per verificare il tuo indirizzo email. Controlla la tua casella di posta e fai clic sul link per verificare la tua email.",
|
|
31
|
-
pt: "Enviamos um e-mail para verificar seu endereço de e-mail. Verifique sua caixa de entrada e clique no link para verificar seu e-mail.",
|
|
32
|
-
hi: "हमने आपको आपके ईमेल पते की पुष्टि करने के लिए एक ईमेल भेजा है। कृपया अपने इनबॉक्स की जांच करें और अपने ईमेल की पुष्टि करने के लिए लिंक पर क्लिक करें।",
|
|
33
|
-
ar: "لقد أرسلنا إليك بريدًا إلكترونيًا للتحقق من عنوان بريدك الإلكتروني. يرجى التحقق من صندوق الوارد الخاص بك والنقر على الرابط للتحقق من بريدك الإلكتروني.",
|
|
34
|
-
ru: "Мы отправили вам письмо для подтверждения вашего адреса электронной почты. Пожалуйста, проверьте свой почтовый ящик и нажмите на ссылку, чтобы подтвердить электронную почту."
|
|
35
|
-
})
|
|
36
|
-
},
|
|
37
|
-
doneButton: {
|
|
38
|
-
text: t({
|
|
39
|
-
en: "Done",
|
|
40
|
-
"en-GB": "Done",
|
|
41
|
-
fr: "Terminé",
|
|
42
|
-
es: "Hecho",
|
|
43
|
-
de: "Fertig",
|
|
44
|
-
ja: "完了",
|
|
45
|
-
ko: "완료",
|
|
46
|
-
zh: "完成",
|
|
47
|
-
it: "Fatto",
|
|
48
|
-
pt: "Feito",
|
|
49
|
-
hi: "किया",
|
|
50
|
-
ar: "تم",
|
|
51
|
-
ru: "Готово"
|
|
52
|
-
}),
|
|
53
|
-
ariaLabel: t({
|
|
54
|
-
en: "Click to return to the previous page",
|
|
55
|
-
"en-GB": "Click to return to the previous page",
|
|
56
|
-
fr: "Cliquez pour revenir à la page précédente",
|
|
57
|
-
es: "Haga clic para volver a la página anterior",
|
|
58
|
-
de: "Klicken Sie, um zur vorherigen Seite zurückzukehren",
|
|
59
|
-
ja: "前のページに戻るにはクリックしてください",
|
|
60
|
-
ko: "이전 페이지로 돌아가려면 클릭하세요",
|
|
61
|
-
zh: "点击返回到上一页",
|
|
62
|
-
it: "Clicca per tornare alla pagina precedente",
|
|
63
|
-
pt: "Clique para voltar à página anterior",
|
|
64
|
-
hi: "पिछला पृष्ठ पर वापस जाने के लिए क्लिक करें",
|
|
65
|
-
ar: "انقر للرجوع إلى الصفحة السابقة",
|
|
66
|
-
ru: "Нажмите, чтобы вернуться на предыдущую страницу"
|
|
67
|
-
})
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
};
|
|
71
|
-
export {
|
|
72
|
-
verifyEmailFormContent as default
|
|
73
|
-
};
|
|
74
|
-
//# sourceMappingURL=index.content.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.content.mjs","sources":["../../../../src/components/Auth/VerifyEmailForm/index.content.ts"],"sourcesContent":["import { t, type Dictionary } from 'intlayer';\n\nconst verifyEmailFormContent = {\n key: 'verify-email-form',\n content: {\n verifyEmail: {\n title: t({\n en: 'Verify your email',\n 'en-GB': 'Verify your email',\n fr: 'Vérifiez votre adresse e-mail',\n es: 'Verifique su correo electrónico',\n de: 'Bestätigen Sie Ihre E-Mail',\n ja: 'メールを確認してください',\n ko: '이메일을 확인해주세요',\n zh: '请验证您的电子邮件',\n it: 'Verifica la tua email',\n pt: 'Verifique seu e-mail',\n hi: 'अपने ईमेल की पुष्टि करें',\n ar: 'تحقق من بريدك الإلكتروني',\n ru: 'Подтвердите ваш адрес электронной почты',\n }),\n description: t({\n en: 'We sent you an email to verify your email address. Please check your inbox and click on the link to verify your email.',\n 'en-GB':\n 'We sent you an email to verify your email address. Please check your inbox and click on the link to verify your email.',\n fr: 'Nous vous avons envoyé un e-mail pour vérifier votre adresse e-mail. Veuillez vérifier votre boîte de réception et cliquez sur le lien pour vérifier votre adresse e-mail.',\n es: 'Te hemos enviado un correo electrónico para verificar tu dirección de correo electrónico. Por favor, revisa tu bandeja de entrada y haz clic en el enlace para verificar tu dirección de correo electrónico.',\n de: 'Wir haben Ihnen eine E-Mail gesendet, um Ihre E-Mail-Adresse zu überprüfen. Bitte überprüfen Sie Ihren Posteingang und klicken Sie auf den Link, um Ihre E-Mail zu bestätigen.',\n ja: 'あなたのメールアドレスを確認するためにメールを送りました。受信トレイを確認し、メールを確認するためにリンクをクリックしてください。',\n ko: '이메일 주소를 확인하기 위해 이메일을 보냈습니다. 받은 편지함을 확인하고 이메일을 확인하기 위해 링크를 클릭하세요.',\n zh: '我们给您发送了一封电子邮件以验证您的电子邮件地址。请检查您的收件箱并点击链接以验证您的电子邮件。',\n it: \"Ti abbiamo inviato un'email per verificare il tuo indirizzo email. Controlla la tua casella di posta e fai clic sul link per verificare la tua email.\",\n pt: 'Enviamos um e-mail para verificar seu endereço de e-mail. Verifique sua caixa de entrada e clique no link para verificar seu e-mail.',\n hi: 'हमने आपको आपके ईमेल पते की पुष्टि करने के लिए एक ईमेल भेजा है। कृपया अपने इनबॉक्स की जांच करें और अपने ईमेल की पुष्टि करने के लिए लिंक पर क्लिक करें।',\n ar: 'لقد أرسلنا إليك بريدًا إلكترونيًا للتحقق من عنوان بريدك الإلكتروني. يرجى التحقق من صندوق الوارد الخاص بك والنقر على الرابط للتحقق من بريدك الإلكتروني.',\n ru: 'Мы отправили вам письмо для подтверждения вашего адреса электронной почты. Пожалуйста, проверьте свой почтовый ящик и нажмите на ссылку, чтобы подтвердить электронную почту.',\n }),\n },\n doneButton: {\n text: t({\n en: 'Done',\n 'en-GB': 'Done',\n fr: 'Terminé',\n es: 'Hecho',\n de: 'Fertig',\n ja: '完了',\n ko: '완료',\n zh: '完成',\n it: 'Fatto',\n pt: 'Feito',\n hi: 'किया',\n ar: 'تم',\n ru: 'Готово',\n }),\n ariaLabel: t({\n en: 'Click to return to the previous page',\n 'en-GB': 'Click to return to the previous page',\n fr: 'Cliquez pour revenir à la page précédente',\n es: 'Haga clic para volver a la página anterior',\n de: 'Klicken Sie, um zur vorherigen Seite zurückzukehren',\n ja: '前のページに戻るにはクリックしてください',\n ko: '이전 페이지로 돌아가려면 클릭하세요',\n zh: '点击返回到上一页',\n it: 'Clicca per tornare alla pagina precedente',\n pt: 'Clique para voltar à página anterior',\n hi: 'पिछला पृष्ठ पर वापस जाने के लिए क्लिक करें',\n ar: 'انقر للرجوع إلى الصفحة السابقة',\n ru: 'Нажмите, чтобы вернуться на предыдущую страницу',\n }),\n },\n },\n} satisfies Dictionary;\n\nexport default verifyEmailFormContent;\n"],"names":[],"mappings":";AAEA,MAAM,yBAAyB;AAAA,EAC7B,KAAK;AAAA,EACL,SAAS;AAAA,IACP,aAAa;AAAA,MACX,OAAO,EAAE;AAAA,QACP,IAAI;AAAA,QACJ,SAAS;AAAA,QACT,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,MAAA,CACL;AAAA,MACD,aAAa,EAAE;AAAA,QACb,IAAI;AAAA,QACJ,SACE;AAAA,QACF,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,MACL,CAAA;AAAA,IACH;AAAA,IACA,YAAY;AAAA,MACV,MAAM,EAAE;AAAA,QACN,IAAI;AAAA,QACJ,SAAS;AAAA,QACT,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,MAAA,CACL;AAAA,MACD,WAAW,EAAE;AAAA,QACX,IAAI;AAAA,QACJ,SAAS;AAAA,QACT,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,MACL,CAAA;AAAA,IAAA;AAAA,EACH;AAEJ;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Auth/VerifyEmailForm/index.tsx"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const components_Auth_ExternalsLoginButtons_ExternalsLoginButtons = require("./ExternalsLoginButtons/ExternalsLoginButtons.cjs");
|
|
4
|
-
const components_Auth_SignInForm_SignInForm = require("./SignInForm/SignInForm.cjs");
|
|
5
|
-
const components_Auth_SignInForm_useSignInSchema = require("./SignInForm/useSignInSchema.cjs");
|
|
6
|
-
const components_Auth_SignUpForm_SignUpForm = require("./SignUpForm/SignUpForm.cjs");
|
|
7
|
-
const components_Auth_SignUpForm_useSignUpSchema = require("./SignUpForm/useSignUpSchema.cjs");
|
|
8
|
-
const components_Auth_ChangePasswordForm_ChangePasswordForm = require("./ChangePasswordForm/ChangePasswordForm.cjs");
|
|
9
|
-
const components_Auth_ChangePasswordForm_useChangePasswordSchema = require("./ChangePasswordForm/useChangePasswordSchema.cjs");
|
|
10
|
-
const components_Auth_ResetPasswordForm_ResetPasswordForm = require("./ResetPasswordForm/ResetPasswordForm.cjs");
|
|
11
|
-
const components_Auth_ResetPasswordForm_useResetPasswordSchema = require("./ResetPasswordForm/useResetPasswordSchema.cjs");
|
|
12
|
-
const components_Auth_AuthModal_index = require("./AuthModal/index.cjs");
|
|
13
|
-
const components_Auth_useAuth_index = require("./useAuth/index.cjs");
|
|
14
|
-
const components_Auth_AuthenticationBarrier_AuthenticationBarrierServer = require("./AuthenticationBarrier/AuthenticationBarrierServer.cjs");
|
|
15
|
-
const components_Auth_AuthenticationBarrier_AuthenticationBarrierClient = require("./AuthenticationBarrier/AuthenticationBarrierClient.cjs");
|
|
16
|
-
const components_Auth_useUser_index = require("./useUser/index.cjs");
|
|
17
|
-
const components_Auth_VerifyEmailForm_VerifyEmailForm = require("./VerifyEmailForm/VerifyEmailForm.cjs");
|
|
18
|
-
const components_Auth_DefineNewPasswordForm_DefineNewPasswordForm = require("./DefineNewPasswordForm/DefineNewPasswordForm.cjs");
|
|
19
|
-
const components_Auth_DefineNewPasswordForm_useDefineNewPasswordSchema = require("./DefineNewPasswordForm/useDefineNewPasswordSchema.cjs");
|
|
20
|
-
exports.ExternalsLoginButtons = components_Auth_ExternalsLoginButtons_ExternalsLoginButtons.ExternalsLoginButtons;
|
|
21
|
-
exports.GitHubLoginButton = components_Auth_ExternalsLoginButtons_ExternalsLoginButtons.GitHubLoginButton;
|
|
22
|
-
exports.GoogleLoginButton = components_Auth_ExternalsLoginButtons_ExternalsLoginButtons.GoogleLoginButton;
|
|
23
|
-
exports.SignInForm = components_Auth_SignInForm_SignInForm.SignInForm;
|
|
24
|
-
exports.useSignInSchema = components_Auth_SignInForm_useSignInSchema.useSignInSchema;
|
|
25
|
-
exports.SignUpForm = components_Auth_SignUpForm_SignUpForm.SignUpForm;
|
|
26
|
-
exports.useSignUpSchema = components_Auth_SignUpForm_useSignUpSchema.useSignUpSchema;
|
|
27
|
-
exports.ChangePasswordForm = components_Auth_ChangePasswordForm_ChangePasswordForm.ChangePasswordForm;
|
|
28
|
-
exports.useChangePasswordSchema = components_Auth_ChangePasswordForm_useChangePasswordSchema.useChangePasswordSchema;
|
|
29
|
-
exports.ResetPasswordForm = components_Auth_ResetPasswordForm_ResetPasswordForm.ResetPasswordForm;
|
|
30
|
-
exports.useResetPasswordSchema = components_Auth_ResetPasswordForm_useResetPasswordSchema.useResetPasswordSchema;
|
|
31
|
-
exports.AuthModal = components_Auth_AuthModal_index.AuthModal;
|
|
32
|
-
exports.useAuth = components_Auth_useAuth_index.useAuth;
|
|
33
|
-
exports.AuthenticationBarrierServer = components_Auth_AuthenticationBarrier_AuthenticationBarrierServer.AuthenticationBarrierServer;
|
|
34
|
-
exports.AuthenticationBarrierClient = components_Auth_AuthenticationBarrier_AuthenticationBarrierClient.AuthenticationBarrierClient;
|
|
35
|
-
exports.useUser = components_Auth_useUser_index.useUser;
|
|
36
|
-
exports.VerifyEmailForm = components_Auth_VerifyEmailForm_VerifyEmailForm.VerifyEmailForm;
|
|
37
|
-
exports.DefineNewPasswordForm = components_Auth_DefineNewPasswordForm_DefineNewPasswordForm.DefineNewPasswordForm;
|
|
38
|
-
exports.useDefineNewPasswordSchema = components_Auth_DefineNewPasswordForm_useDefineNewPasswordSchema.useDefineNewPasswordSchema;
|
|
39
|
-
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export * from './ExternalsLoginButtons';
|
|
2
|
-
export * from './SignInForm';
|
|
3
|
-
export * from './SignUpForm';
|
|
4
|
-
export * from './ChangePasswordForm';
|
|
5
|
-
export * from './ResetPasswordForm';
|
|
6
|
-
export * from './AuthModal';
|
|
7
|
-
export * from './useAuth';
|
|
8
|
-
export * from './AuthenticationBarrier';
|
|
9
|
-
export * from './useUser';
|
|
10
|
-
export * from './VerifyEmailForm';
|
|
11
|
-
export * from './DefineNewPasswordForm';
|
|
12
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Auth/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC;AACxC,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,sBAAsB,CAAC;AACrC,cAAc,qBAAqB,CAAC;AACpC,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,yBAAyB,CAAC;AACxC,cAAc,WAAW,CAAC;AAC1B,cAAc,mBAAmB,CAAC;AAClC,cAAc,yBAAyB,CAAC"}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { ExternalsLoginButtons, GitHubLoginButton, GoogleLoginButton } from "./ExternalsLoginButtons/ExternalsLoginButtons.mjs";
|
|
2
|
-
import { SignInForm } from "./SignInForm/SignInForm.mjs";
|
|
3
|
-
import { useSignInSchema } from "./SignInForm/useSignInSchema.mjs";
|
|
4
|
-
import { SignUpForm } from "./SignUpForm/SignUpForm.mjs";
|
|
5
|
-
import { useSignUpSchema } from "./SignUpForm/useSignUpSchema.mjs";
|
|
6
|
-
import { ChangePasswordForm } from "./ChangePasswordForm/ChangePasswordForm.mjs";
|
|
7
|
-
import { useChangePasswordSchema } from "./ChangePasswordForm/useChangePasswordSchema.mjs";
|
|
8
|
-
import { ResetPasswordForm } from "./ResetPasswordForm/ResetPasswordForm.mjs";
|
|
9
|
-
import { useResetPasswordSchema } from "./ResetPasswordForm/useResetPasswordSchema.mjs";
|
|
10
|
-
import { AuthModal } from "./AuthModal/index.mjs";
|
|
11
|
-
import { useAuth } from "./useAuth/index.mjs";
|
|
12
|
-
import { AuthenticationBarrierServer } from "./AuthenticationBarrier/AuthenticationBarrierServer.mjs";
|
|
13
|
-
import { AuthenticationBarrierClient } from "./AuthenticationBarrier/AuthenticationBarrierClient.mjs";
|
|
14
|
-
import { useUser } from "./useUser/index.mjs";
|
|
15
|
-
import { VerifyEmailForm } from "./VerifyEmailForm/VerifyEmailForm.mjs";
|
|
16
|
-
import { DefineNewPasswordForm } from "./DefineNewPasswordForm/DefineNewPasswordForm.mjs";
|
|
17
|
-
import { useDefineNewPasswordSchema } from "./DefineNewPasswordForm/useDefineNewPasswordSchema.mjs";
|
|
18
|
-
export {
|
|
19
|
-
AuthModal,
|
|
20
|
-
AuthenticationBarrierClient,
|
|
21
|
-
AuthenticationBarrierServer,
|
|
22
|
-
ChangePasswordForm,
|
|
23
|
-
DefineNewPasswordForm,
|
|
24
|
-
ExternalsLoginButtons,
|
|
25
|
-
GitHubLoginButton,
|
|
26
|
-
GoogleLoginButton,
|
|
27
|
-
ResetPasswordForm,
|
|
28
|
-
SignInForm,
|
|
29
|
-
SignUpForm,
|
|
30
|
-
VerifyEmailForm,
|
|
31
|
-
useAuth,
|
|
32
|
-
useChangePasswordSchema,
|
|
33
|
-
useDefineNewPasswordSchema,
|
|
34
|
-
useResetPasswordSchema,
|
|
35
|
-
useSignInSchema,
|
|
36
|
-
useSignUpSchema,
|
|
37
|
-
useUser
|
|
38
|
-
};
|
|
39
|
-
//# sourceMappingURL=index.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;"}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
"use strict";
|
|
3
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
4
|
-
const components_Auth_useAuth_useCSRF = require("./useCSRF.cjs");
|
|
5
|
-
const components_Auth_useAuth_useOAuth2 = require("./useOAuth2.cjs");
|
|
6
|
-
const components_Auth_useAuth_useSession = require("./useSession.cjs");
|
|
7
|
-
const useAuth = ({
|
|
8
|
-
session: sessionProp,
|
|
9
|
-
intlayerConfiguration
|
|
10
|
-
} = {}) => {
|
|
11
|
-
const { csrfToken, csrfTokenFetched } = components_Auth_useAuth_useCSRF.useCSRF(intlayerConfiguration);
|
|
12
|
-
const { session, fetchSession, revalidateSession, setSession } = components_Auth_useAuth_useSession.useSession(
|
|
13
|
-
sessionProp,
|
|
14
|
-
intlayerConfiguration
|
|
15
|
-
);
|
|
16
|
-
const { oAuth2AccessToken } = components_Auth_useAuth_useOAuth2.useOAuth2(intlayerConfiguration);
|
|
17
|
-
return {
|
|
18
|
-
session,
|
|
19
|
-
fetchSession,
|
|
20
|
-
setSession,
|
|
21
|
-
revalidateSession,
|
|
22
|
-
csrfToken,
|
|
23
|
-
csrfTokenFetched,
|
|
24
|
-
oAuth2AccessToken,
|
|
25
|
-
isAuthenticated: Boolean(session?.user || oAuth2AccessToken),
|
|
26
|
-
isProjectAdmin: session?.isProjectAdmin,
|
|
27
|
-
isOrganizationAdmin: session?.isOrganizationAdmin
|
|
28
|
-
};
|
|
29
|
-
};
|
|
30
|
-
exports.useAuth = useAuth;
|
|
31
|
-
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../../../src/components/Auth/useAuth/index.tsx"],"sourcesContent":["'use client';\n\nimport type {\n OAuth2Token,\n OrganizationAPI,\n ProjectAPI,\n UserAPI,\n} from '@intlayer/backend';\nimport type { IntlayerConfig } from '@intlayer/config/client';\nimport { useCSRF } from './useCSRF';\nimport { useOAuth2 } from './useOAuth2';\nimport { useSession } from './useSession';\n\nexport type Session = {\n user: UserAPI | null;\n organization: OrganizationAPI | null;\n project: ProjectAPI | null;\n isOrganizationAdmin: boolean;\n isProjectAdmin: boolean;\n};\n\ntype SessionContextProps = {\n session: Session | null | undefined;\n setSession: (session: Session | null) => void;\n fetchSession: () => Promise<Session | null | undefined>;\n revalidateSession: () => Promise<Session | null | undefined>;\n csrfToken: string | null | undefined;\n csrfTokenFetched: boolean;\n isAuthenticated: boolean;\n oAuth2AccessToken: OAuth2Token | null | undefined;\n isProjectAdmin: boolean | null | undefined;\n isOrganizationAdmin: boolean | null | undefined;\n};\n\nexport const useAuth = ({\n session: sessionProp,\n intlayerConfiguration,\n}: {\n session?: Session | null;\n intlayerConfiguration?: IntlayerConfig;\n} = {}): SessionContextProps => {\n const { csrfToken, csrfTokenFetched } = useCSRF(intlayerConfiguration);\n const { session, fetchSession, revalidateSession, setSession } = useSession(\n sessionProp,\n intlayerConfiguration\n );\n const { oAuth2AccessToken } = useOAuth2(intlayerConfiguration);\n\n return {\n session,\n fetchSession,\n setSession,\n revalidateSession,\n csrfToken,\n csrfTokenFetched,\n oAuth2AccessToken,\n isAuthenticated: Boolean(session?.user || oAuth2AccessToken),\n isProjectAdmin: session?.isProjectAdmin,\n isOrganizationAdmin: session?.isOrganizationAdmin,\n };\n};\n"],"names":["useCSRF","useSession","useOAuth2"],"mappings":";;;;;;AAkCO,MAAM,UAAU,CAAC;AAAA,EACtB,SAAS;AAAA,EACT;AACF,IAGI,OAA4B;AAC9B,QAAM,EAAE,WAAW,qBAAqBA,gCAAAA,QAAQ,qBAAqB;AACrE,QAAM,EAAE,SAAS,cAAc,mBAAmB,WAAe,IAAAC,mCAAA;AAAA,IAC/D;AAAA,IACA;AAAA,EACF;AACA,QAAM,EAAE,kBAAA,IAAsBC,kCAAA,UAAU,qBAAqB;AAEtD,SAAA;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,iBAAiB,QAAQ,SAAS,QAAQ,iBAAiB;AAAA,IAC3D,gBAAgB,SAAS;AAAA,IACzB,qBAAqB,SAAS;AAAA,EAChC;AACF;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Auth/useAuth/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,WAAW,EACX,eAAe,EACf,UAAU,EACV,OAAO,EACR,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAK9D,MAAM,MAAM,OAAO,GAAG;IACpB,IAAI,EAAE,OAAO,GAAG,IAAI,CAAC;IACrB,YAAY,EAAE,eAAe,GAAG,IAAI,CAAC;IACrC,OAAO,EAAE,UAAU,GAAG,IAAI,CAAC;IAC3B,mBAAmB,EAAE,OAAO,CAAC;IAC7B,cAAc,EAAE,OAAO,CAAC;CACzB,CAAC;AAEF,KAAK,mBAAmB,GAAG;IACzB,OAAO,EAAE,OAAO,GAAG,IAAI,GAAG,SAAS,CAAC;IACpC,UAAU,EAAE,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,KAAK,IAAI,CAAC;IAC9C,YAAY,EAAE,MAAM,OAAO,CAAC,OAAO,GAAG,IAAI,GAAG,SAAS,CAAC,CAAC;IACxD,iBAAiB,EAAE,MAAM,OAAO,CAAC,OAAO,GAAG,IAAI,GAAG,SAAS,CAAC,CAAC;IAC7D,SAAS,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACrC,gBAAgB,EAAE,OAAO,CAAC;IAC1B,eAAe,EAAE,OAAO,CAAC;IACzB,iBAAiB,EAAE,WAAW,GAAG,IAAI,GAAG,SAAS,CAAC;IAClD,cAAc,EAAE,OAAO,GAAG,IAAI,GAAG,SAAS,CAAC;IAC3C,mBAAmB,EAAE,OAAO,GAAG,IAAI,GAAG,SAAS,CAAC;CACjD,CAAC;AAEF,eAAO,MAAM,OAAO,GAAI,mDAGrB;IACD,OAAO,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;IACzB,qBAAqB,CAAC,EAAE,cAAc,CAAC;CACnC,KAAG,mBAoBR,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../../../src/components/Auth/useAuth/index.tsx"],"sourcesContent":["'use client';\n\nimport type {\n OAuth2Token,\n OrganizationAPI,\n ProjectAPI,\n UserAPI,\n} from '@intlayer/backend';\nimport type { IntlayerConfig } from '@intlayer/config/client';\nimport { useCSRF } from './useCSRF';\nimport { useOAuth2 } from './useOAuth2';\nimport { useSession } from './useSession';\n\nexport type Session = {\n user: UserAPI | null;\n organization: OrganizationAPI | null;\n project: ProjectAPI | null;\n isOrganizationAdmin: boolean;\n isProjectAdmin: boolean;\n};\n\ntype SessionContextProps = {\n session: Session | null | undefined;\n setSession: (session: Session | null) => void;\n fetchSession: () => Promise<Session | null | undefined>;\n revalidateSession: () => Promise<Session | null | undefined>;\n csrfToken: string | null | undefined;\n csrfTokenFetched: boolean;\n isAuthenticated: boolean;\n oAuth2AccessToken: OAuth2Token | null | undefined;\n isProjectAdmin: boolean | null | undefined;\n isOrganizationAdmin: boolean | null | undefined;\n};\n\nexport const useAuth = ({\n session: sessionProp,\n intlayerConfiguration,\n}: {\n session?: Session | null;\n intlayerConfiguration?: IntlayerConfig;\n} = {}): SessionContextProps => {\n const { csrfToken, csrfTokenFetched } = useCSRF(intlayerConfiguration);\n const { session, fetchSession, revalidateSession, setSession } = useSession(\n sessionProp,\n intlayerConfiguration\n );\n const { oAuth2AccessToken } = useOAuth2(intlayerConfiguration);\n\n return {\n session,\n fetchSession,\n setSession,\n revalidateSession,\n csrfToken,\n csrfTokenFetched,\n oAuth2AccessToken,\n isAuthenticated: Boolean(session?.user || oAuth2AccessToken),\n isProjectAdmin: session?.isProjectAdmin,\n isOrganizationAdmin: session?.isOrganizationAdmin,\n };\n};\n"],"names":[],"mappings":";;;;AAkCO,MAAM,UAAU,CAAC;AAAA,EACtB,SAAS;AAAA,EACT;AACF,IAGI,OAA4B;AAC9B,QAAM,EAAE,WAAW,qBAAqB,QAAQ,qBAAqB;AACrE,QAAM,EAAE,SAAS,cAAc,mBAAmB,WAAe,IAAA;AAAA,IAC/D;AAAA,IACA;AAAA,EACF;AACA,QAAM,EAAE,kBAAA,IAAsB,UAAU,qBAAqB;AAEtD,SAAA;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,iBAAiB,QAAQ,SAAS,QAAQ,iBAAiB;AAAA,IAC3D,gBAAgB,SAAS;AAAA,IACzB,qBAAqB,SAAS;AAAA,EAChC;AACF;"}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
"use strict";
|
|
3
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
4
|
-
const api = require("@intlayer/api");
|
|
5
|
-
const defaultConfiguration = require("@intlayer/config/built");
|
|
6
|
-
const editorReact = require("@intlayer/editor-react");
|
|
7
|
-
const hooks_useAsync_useAsync = require("../../../hooks/useAsync/useAsync.cjs");
|
|
8
|
-
const useCSRF = (intlayerConfiguration) => {
|
|
9
|
-
const contextConfiguration = editorReact.useConfiguration();
|
|
10
|
-
const config = intlayerConfiguration ?? contextConfiguration ?? defaultConfiguration;
|
|
11
|
-
const intlayerAPI = api.getIntlayerAPI(void 0, config);
|
|
12
|
-
const { data, isFetched: csrfTokenFetched } = hooks_useAsync_useAsync.useAsync(
|
|
13
|
-
"getCSRFToken",
|
|
14
|
-
intlayerAPI.auth.getCSRFToken,
|
|
15
|
-
{
|
|
16
|
-
cache: true,
|
|
17
|
-
autoFetch: true
|
|
18
|
-
}
|
|
19
|
-
);
|
|
20
|
-
const csrfToken = data?.data?.csrf_token;
|
|
21
|
-
return {
|
|
22
|
-
csrfToken,
|
|
23
|
-
csrfTokenFetched
|
|
24
|
-
};
|
|
25
|
-
};
|
|
26
|
-
exports.useCSRF = useCSRF;
|
|
27
|
-
//# sourceMappingURL=useCSRF.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useCSRF.cjs","sources":["../../../../src/components/Auth/useAuth/useCSRF.ts"],"sourcesContent":["'use client';\n\nimport { getIntlayerAPI } from '@intlayer/api';\nimport type { IntlayerConfig } from '@intlayer/config/client';\nimport defaultConfiguration from '@intlayer/config/built';\n\nimport { useConfiguration } from '@intlayer/editor-react';\nimport { useAsync } from '../../../hooks/useAsync/useAsync';\n\nexport const useCSRF = (intlayerConfiguration?: IntlayerConfig) => {\n const contextConfiguration = useConfiguration();\n const config =\n intlayerConfiguration ?? contextConfiguration ?? defaultConfiguration;\n const intlayerAPI = getIntlayerAPI(undefined, config);\n\n const { data, isFetched: csrfTokenFetched } = useAsync(\n 'getCSRFToken',\n intlayerAPI.auth.getCSRFToken,\n {\n cache: true,\n autoFetch: true,\n }\n );\n\n const csrfToken = data?.data?.csrf_token;\n\n return {\n csrfToken,\n csrfTokenFetched,\n };\n};\n"],"names":["useConfiguration","getIntlayerAPI","useAsync"],"mappings":";;;;;;;AASa,MAAA,UAAU,CAAC,0BAA2C;AACjE,QAAM,uBAAuBA,YAAAA,iBAAiB;AACxC,QAAA,SACJ,yBAAyB,wBAAwB;AAC7C,QAAA,cAAcC,IAAAA,eAAe,QAAW,MAAM;AAEpD,QAAM,EAAE,MAAM,WAAW,iBAAqB,IAAAC,wBAAA;AAAA,IAC5C;AAAA,IACA,YAAY,KAAK;AAAA,IACjB;AAAA,MACE,OAAO;AAAA,MACP,WAAW;AAAA,IAAA;AAAA,EAEf;AAEM,QAAA,YAAY,MAAM,MAAM;AAEvB,SAAA;AAAA,IACL;AAAA,IACA;AAAA,EACF;AACF;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useCSRF.d.ts","sourceRoot":"","sources":["../../../../src/components/Auth/useAuth/useCSRF.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAM9D,eAAO,MAAM,OAAO,GAAI,wBAAwB,cAAc;;;CAqB7D,CAAC"}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { getIntlayerAPI } from "@intlayer/api";
|
|
3
|
-
import defaultConfiguration from "@intlayer/config/built";
|
|
4
|
-
import { useConfiguration } from "@intlayer/editor-react";
|
|
5
|
-
import { useAsync } from "../../../hooks/useAsync/useAsync.mjs";
|
|
6
|
-
const useCSRF = (intlayerConfiguration) => {
|
|
7
|
-
const contextConfiguration = useConfiguration();
|
|
8
|
-
const config = intlayerConfiguration ?? contextConfiguration ?? defaultConfiguration;
|
|
9
|
-
const intlayerAPI = getIntlayerAPI(void 0, config);
|
|
10
|
-
const { data, isFetched: csrfTokenFetched } = useAsync(
|
|
11
|
-
"getCSRFToken",
|
|
12
|
-
intlayerAPI.auth.getCSRFToken,
|
|
13
|
-
{
|
|
14
|
-
cache: true,
|
|
15
|
-
autoFetch: true
|
|
16
|
-
}
|
|
17
|
-
);
|
|
18
|
-
const csrfToken = data?.data?.csrf_token;
|
|
19
|
-
return {
|
|
20
|
-
csrfToken,
|
|
21
|
-
csrfTokenFetched
|
|
22
|
-
};
|
|
23
|
-
};
|
|
24
|
-
export {
|
|
25
|
-
useCSRF
|
|
26
|
-
};
|
|
27
|
-
//# sourceMappingURL=useCSRF.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useCSRF.mjs","sources":["../../../../src/components/Auth/useAuth/useCSRF.ts"],"sourcesContent":["'use client';\n\nimport { getIntlayerAPI } from '@intlayer/api';\nimport type { IntlayerConfig } from '@intlayer/config/client';\nimport defaultConfiguration from '@intlayer/config/built';\n\nimport { useConfiguration } from '@intlayer/editor-react';\nimport { useAsync } from '../../../hooks/useAsync/useAsync';\n\nexport const useCSRF = (intlayerConfiguration?: IntlayerConfig) => {\n const contextConfiguration = useConfiguration();\n const config =\n intlayerConfiguration ?? contextConfiguration ?? defaultConfiguration;\n const intlayerAPI = getIntlayerAPI(undefined, config);\n\n const { data, isFetched: csrfTokenFetched } = useAsync(\n 'getCSRFToken',\n intlayerAPI.auth.getCSRFToken,\n {\n cache: true,\n autoFetch: true,\n }\n );\n\n const csrfToken = data?.data?.csrf_token;\n\n return {\n csrfToken,\n csrfTokenFetched,\n };\n};\n"],"names":[],"mappings":";;;;;AASa,MAAA,UAAU,CAAC,0BAA2C;AACjE,QAAM,uBAAuB,iBAAiB;AACxC,QAAA,SACJ,yBAAyB,wBAAwB;AAC7C,QAAA,cAAc,eAAe,QAAW,MAAM;AAEpD,QAAM,EAAE,MAAM,WAAW,iBAAqB,IAAA;AAAA,IAC5C;AAAA,IACA,YAAY,KAAK;AAAA,IACjB;AAAA,MACE,OAAO;AAAA,MACP,WAAW;AAAA,IAAA;AAAA,EAEf;AAEM,QAAA,YAAY,MAAM,MAAM;AAEvB,SAAA;AAAA,IACL;AAAA,IACA;AAAA,EACF;AACF;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useOAuth2.cjs","sources":["../../../../src/components/Auth/useAuth/useOAuth2.ts"],"sourcesContent":["'use client';\n\nimport { getIntlayerAPI } from '@intlayer/api';\nimport defaultConfiguration from '@intlayer/config/built';\nimport type { IntlayerConfig } from '@intlayer/config/client';\n\nimport { useConfiguration } from '@intlayer/editor-react';\nimport { useAsync } from '../../../hooks/useAsync/useAsync';\n\nexport const useOAuth2 = (intlayerConfiguration?: IntlayerConfig) => {\n const configuration = useConfiguration();\n const config = intlayerConfiguration ?? configuration ?? defaultConfiguration;\n const intlayerAPI = getIntlayerAPI(undefined, config);\n\n const { data } = useAsync(\n 'getOAuth2AccessToken',\n intlayerAPI.auth.getOAuth2AccessToken,\n {\n cache: true,\n autoFetch: true,\n enable: !!(config.editor.clientId && config.editor.clientSecret),\n }\n );\n\n const oAuth2AccessToken = data?.data;\n\n return {\n oAuth2AccessToken,\n };\n};\n"],"names":["useConfiguration","getIntlayerAPI","useAsync"],"mappings":";;;;;;;AASa,MAAA,YAAY,CAAC,0BAA2C;AACnE,QAAM,gBAAgBA,YAAAA,iBAAiB;AACjC,QAAA,SAAS,yBAAyB,iBAAiB;AACnD,QAAA,cAAcC,IAAAA,eAAe,QAAW,MAAM;AAE9C,QAAA,EAAE,SAASC,wBAAA;AAAA,IACf;AAAA,IACA,YAAY,KAAK;AAAA,IACjB;AAAA,MACE,OAAO;AAAA,MACP,WAAW;AAAA,MACX,QAAQ,CAAC,EAAE,OAAO,OAAO,YAAY,OAAO,OAAO;AAAA,IAAA;AAAA,EAEvD;AAEA,QAAM,oBAAoB,MAAM;AAEzB,SAAA;AAAA,IACL;AAAA,EACF;AACF;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useOAuth2.d.ts","sourceRoot":"","sources":["../../../../src/components/Auth/useAuth/useOAuth2.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAK9D,eAAO,MAAM,SAAS,GAAI,wBAAwB,cAAc;;CAoB/D,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useOAuth2.mjs","sources":["../../../../src/components/Auth/useAuth/useOAuth2.ts"],"sourcesContent":["'use client';\n\nimport { getIntlayerAPI } from '@intlayer/api';\nimport defaultConfiguration from '@intlayer/config/built';\nimport type { IntlayerConfig } from '@intlayer/config/client';\n\nimport { useConfiguration } from '@intlayer/editor-react';\nimport { useAsync } from '../../../hooks/useAsync/useAsync';\n\nexport const useOAuth2 = (intlayerConfiguration?: IntlayerConfig) => {\n const configuration = useConfiguration();\n const config = intlayerConfiguration ?? configuration ?? defaultConfiguration;\n const intlayerAPI = getIntlayerAPI(undefined, config);\n\n const { data } = useAsync(\n 'getOAuth2AccessToken',\n intlayerAPI.auth.getOAuth2AccessToken,\n {\n cache: true,\n autoFetch: true,\n enable: !!(config.editor.clientId && config.editor.clientSecret),\n }\n );\n\n const oAuth2AccessToken = data?.data;\n\n return {\n oAuth2AccessToken,\n };\n};\n"],"names":[],"mappings":";;;;;AASa,MAAA,YAAY,CAAC,0BAA2C;AACnE,QAAM,gBAAgB,iBAAiB;AACjC,QAAA,SAAS,yBAAyB,iBAAiB;AACnD,QAAA,cAAc,eAAe,QAAW,MAAM;AAE9C,QAAA,EAAE,SAAS;AAAA,IACf;AAAA,IACA,YAAY,KAAK;AAAA,IACjB;AAAA,MACE,OAAO;AAAA,MACP,WAAW;AAAA,MACX,QAAQ,CAAC,EAAE,OAAO,OAAO,YAAY,OAAO,OAAO;AAAA,IAAA;AAAA,EAEvD;AAEA,QAAM,oBAAoB,MAAM;AAEzB,SAAA;AAAA,IACL;AAAA,EACF;AACF;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useSession.cjs","sources":["../../../../src/components/Auth/useAuth/useSession.ts"],"sourcesContent":["'use client';\n\nimport { getIntlayerAPI } from '@intlayer/api';\nimport type { IntlayerConfig } from '@intlayer/config/client';\nimport defaultConfiguration from '@intlayer/config/built';\n\nimport { useConfiguration } from '@intlayer/editor-react';\nimport { useMemo } from 'react';\nimport { useAsync } from '../../../hooks/useAsync';\nimport type { Session } from './index';\n\nexport const useSession = (\n sessionProp?: Session | null,\n intlayerConfiguration?: IntlayerConfig\n) => {\n const configuration = useConfiguration();\n const config = intlayerConfiguration ?? configuration ?? defaultConfiguration;\n const intlayerAPI = getIntlayerAPI(undefined, config);\n\n const {\n getSession,\n revalidate,\n data,\n setData: setSession,\n isFetched,\n } = useAsync(\n 'getSession',\n async () => {\n try {\n const result = await intlayerAPI.auth.getSession();\n\n if (result.data) {\n const { user, organization, project } = result.data;\n\n const formattedSession: Session = {\n user,\n organization,\n isOrganizationAdmin:\n (user && (organization?.adminsIds ?? []).includes(user._id!)) ??\n false,\n project,\n isProjectAdmin:\n (user && (project?.adminsIds ?? []).includes(user._id!)) ?? false,\n };\n\n return formattedSession;\n }\n } catch (_error) {\n console.error(_error);\n // Failed to fetch session\n }\n\n return null;\n },\n {\n cache: true,\n store: true,\n autoFetch: true,\n enable: !sessionProp,\n invalidateQueries: [\n 'getOrganizations',\n 'getProjects',\n 'getUsers',\n 'getDictionaries',\n ],\n }\n );\n\n const session = useMemo(\n () => data ?? (isFetched ? null : undefined),\n [data, isFetched]\n );\n\n return {\n session,\n fetchSession: getSession,\n revalidateSession: revalidate,\n setSession,\n };\n};\n"],"names":["useConfiguration","getIntlayerAPI","useAsync","useMemo"],"mappings":";;;;;;;;;AAWa,MAAA,aAAa,CACxB,aACA,0BACG;AACH,QAAM,gBAAgBA,YAAAA,iBAAiB;AACjC,QAAA,SAAS,yBAAyB,iBAAiB;AACnD,QAAA,cAAcC,IAAAA,eAAe,QAAW,MAAM;AAE9C,QAAA;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA,SAAS;AAAA,IACT;AAAA,EAAA,IACEC,wBAAA;AAAA,IACF;AAAA,IACA,YAAY;AACN,UAAA;AACF,cAAM,SAAS,MAAM,YAAY,KAAK,WAAW;AAEjD,YAAI,OAAO,MAAM;AACf,gBAAM,EAAE,MAAM,cAAc,YAAY,OAAO;AAE/C,gBAAM,mBAA4B;AAAA,YAChC;AAAA,YACA;AAAA,YACA,sBACG,SAAS,cAAc,aAAa,CAAI,GAAA,SAAS,KAAK,GAAI,MAC3D;AAAA,YACF;AAAA,YACA,iBACG,SAAS,SAAS,aAAa,CAAA,GAAI,SAAS,KAAK,GAAI,MAAM;AAAA,UAChE;AAEO,iBAAA;AAAA,QAAA;AAAA,eAEF,QAAQ;AACf,gBAAQ,MAAM,MAAM;AAAA,MAAA;AAIf,aAAA;AAAA,IACT;AAAA,IACA;AAAA,MACE,OAAO;AAAA,MACP,OAAO;AAAA,MACP,WAAW;AAAA,MACX,QAAQ,CAAC;AAAA,MACT,mBAAmB;AAAA,QACjB;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MAAA;AAAA,IACF;AAAA,EAEJ;AAEA,QAAM,UAAUC,aAAA;AAAA,IACd,MAAM,SAAS,YAAY,OAAO;AAAA,IAClC,CAAC,MAAM,SAAS;AAAA,EAClB;AAEO,SAAA;AAAA,IACL;AAAA,IACA,cAAc;AAAA,IACd,mBAAmB;AAAA,IACnB;AAAA,EACF;AACF;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useSession.d.ts","sourceRoot":"","sources":["../../../../src/components/Auth/useAuth/useSession.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAM9D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAEvC,eAAO,MAAM,UAAU,GACrB,cAAc,OAAO,GAAG,IAAI,EAC5B,wBAAwB,cAAc;;;;;CAkEvC,CAAC"}
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { getIntlayerAPI } from "@intlayer/api";
|
|
3
|
-
import defaultConfiguration from "@intlayer/config/built";
|
|
4
|
-
import { useConfiguration } from "@intlayer/editor-react";
|
|
5
|
-
import { useMemo } from "react";
|
|
6
|
-
import { useAsync } from "../../../hooks/useAsync/useAsync.mjs";
|
|
7
|
-
import "../../../hooks/useAsync/useAsyncStateStore.mjs";
|
|
8
|
-
const useSession = (sessionProp, intlayerConfiguration) => {
|
|
9
|
-
const configuration = useConfiguration();
|
|
10
|
-
const config = intlayerConfiguration ?? configuration ?? defaultConfiguration;
|
|
11
|
-
const intlayerAPI = getIntlayerAPI(void 0, config);
|
|
12
|
-
const {
|
|
13
|
-
getSession,
|
|
14
|
-
revalidate,
|
|
15
|
-
data,
|
|
16
|
-
setData: setSession,
|
|
17
|
-
isFetched
|
|
18
|
-
} = useAsync(
|
|
19
|
-
"getSession",
|
|
20
|
-
async () => {
|
|
21
|
-
try {
|
|
22
|
-
const result = await intlayerAPI.auth.getSession();
|
|
23
|
-
if (result.data) {
|
|
24
|
-
const { user, organization, project } = result.data;
|
|
25
|
-
const formattedSession = {
|
|
26
|
-
user,
|
|
27
|
-
organization,
|
|
28
|
-
isOrganizationAdmin: (user && (organization?.adminsIds ?? []).includes(user._id)) ?? false,
|
|
29
|
-
project,
|
|
30
|
-
isProjectAdmin: (user && (project?.adminsIds ?? []).includes(user._id)) ?? false
|
|
31
|
-
};
|
|
32
|
-
return formattedSession;
|
|
33
|
-
}
|
|
34
|
-
} catch (_error) {
|
|
35
|
-
console.error(_error);
|
|
36
|
-
}
|
|
37
|
-
return null;
|
|
38
|
-
},
|
|
39
|
-
{
|
|
40
|
-
cache: true,
|
|
41
|
-
store: true,
|
|
42
|
-
autoFetch: true,
|
|
43
|
-
enable: !sessionProp,
|
|
44
|
-
invalidateQueries: [
|
|
45
|
-
"getOrganizations",
|
|
46
|
-
"getProjects",
|
|
47
|
-
"getUsers",
|
|
48
|
-
"getDictionaries"
|
|
49
|
-
]
|
|
50
|
-
}
|
|
51
|
-
);
|
|
52
|
-
const session = useMemo(
|
|
53
|
-
() => data ?? (isFetched ? null : void 0),
|
|
54
|
-
[data, isFetched]
|
|
55
|
-
);
|
|
56
|
-
return {
|
|
57
|
-
session,
|
|
58
|
-
fetchSession: getSession,
|
|
59
|
-
revalidateSession: revalidate,
|
|
60
|
-
setSession
|
|
61
|
-
};
|
|
62
|
-
};
|
|
63
|
-
export {
|
|
64
|
-
useSession
|
|
65
|
-
};
|
|
66
|
-
//# sourceMappingURL=useSession.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useSession.mjs","sources":["../../../../src/components/Auth/useAuth/useSession.ts"],"sourcesContent":["'use client';\n\nimport { getIntlayerAPI } from '@intlayer/api';\nimport type { IntlayerConfig } from '@intlayer/config/client';\nimport defaultConfiguration from '@intlayer/config/built';\n\nimport { useConfiguration } from '@intlayer/editor-react';\nimport { useMemo } from 'react';\nimport { useAsync } from '../../../hooks/useAsync';\nimport type { Session } from './index';\n\nexport const useSession = (\n sessionProp?: Session | null,\n intlayerConfiguration?: IntlayerConfig\n) => {\n const configuration = useConfiguration();\n const config = intlayerConfiguration ?? configuration ?? defaultConfiguration;\n const intlayerAPI = getIntlayerAPI(undefined, config);\n\n const {\n getSession,\n revalidate,\n data,\n setData: setSession,\n isFetched,\n } = useAsync(\n 'getSession',\n async () => {\n try {\n const result = await intlayerAPI.auth.getSession();\n\n if (result.data) {\n const { user, organization, project } = result.data;\n\n const formattedSession: Session = {\n user,\n organization,\n isOrganizationAdmin:\n (user && (organization?.adminsIds ?? []).includes(user._id!)) ??\n false,\n project,\n isProjectAdmin:\n (user && (project?.adminsIds ?? []).includes(user._id!)) ?? false,\n };\n\n return formattedSession;\n }\n } catch (_error) {\n console.error(_error);\n // Failed to fetch session\n }\n\n return null;\n },\n {\n cache: true,\n store: true,\n autoFetch: true,\n enable: !sessionProp,\n invalidateQueries: [\n 'getOrganizations',\n 'getProjects',\n 'getUsers',\n 'getDictionaries',\n ],\n }\n );\n\n const session = useMemo(\n () => data ?? (isFetched ? null : undefined),\n [data, isFetched]\n );\n\n return {\n session,\n fetchSession: getSession,\n revalidateSession: revalidate,\n setSession,\n };\n};\n"],"names":[],"mappings":";;;;;;;AAWa,MAAA,aAAa,CACxB,aACA,0BACG;AACH,QAAM,gBAAgB,iBAAiB;AACjC,QAAA,SAAS,yBAAyB,iBAAiB;AACnD,QAAA,cAAc,eAAe,QAAW,MAAM;AAE9C,QAAA;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA,SAAS;AAAA,IACT;AAAA,EAAA,IACE;AAAA,IACF;AAAA,IACA,YAAY;AACN,UAAA;AACF,cAAM,SAAS,MAAM,YAAY,KAAK,WAAW;AAEjD,YAAI,OAAO,MAAM;AACf,gBAAM,EAAE,MAAM,cAAc,YAAY,OAAO;AAE/C,gBAAM,mBAA4B;AAAA,YAChC;AAAA,YACA;AAAA,YACA,sBACG,SAAS,cAAc,aAAa,CAAI,GAAA,SAAS,KAAK,GAAI,MAC3D;AAAA,YACF;AAAA,YACA,iBACG,SAAS,SAAS,aAAa,CAAA,GAAI,SAAS,KAAK,GAAI,MAAM;AAAA,UAChE;AAEO,iBAAA;AAAA,QAAA;AAAA,eAEF,QAAQ;AACf,gBAAQ,MAAM,MAAM;AAAA,MAAA;AAIf,aAAA;AAAA,IACT;AAAA,IACA;AAAA,MACE,OAAO;AAAA,MACP,OAAO;AAAA,MACP,WAAW;AAAA,MACX,QAAQ,CAAC;AAAA,MACT,mBAAmB;AAAA,QACjB;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MAAA;AAAA,IACF;AAAA,EAEJ;AAEA,QAAM,UAAU;AAAA,IACd,MAAM,SAAS,YAAY,OAAO;AAAA,IAClC,CAAC,MAAM,SAAS;AAAA,EAClB;AAEO,SAAA;AAAA,IACL;AAAA,IACA,cAAc;AAAA,IACd,mBAAmB;AAAA,IACnB;AAAA,EACF;AACF;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../../../src/components/Auth/useUser/index.ts"],"sourcesContent":["'use client';\n\nimport { useLogout } from '../../../hooks';\nimport { useAuth } from '../useAuth';\n\nexport const useUser = () => {\n const { session, revalidateSession, setSession } = useAuth();\n const { logout } = useLogout();\n\n const status = session?.user ? 'authenticated' : 'unauthenticated';\n\n const isAuthenticated = status === 'authenticated';\n const isUnauthenticated = status === 'unauthenticated';\n\n const user = session?.user;\n\n const logoutHandle = async () => {\n setSession(null);\n await logout();\n };\n\n return {\n isAuthenticated,\n isUnauthenticated,\n user,\n revalidateSession,\n logout: logoutHandle,\n };\n};\n"],"names":["useAuth","useLogout"],"mappings":";;;;;;;;;;AAKO,MAAM,UAAU,MAAM;AAC3B,QAAM,EAAE,SAAS,mBAAmB,WAAA,IAAeA,8BAAAA,QAAQ;AACrD,QAAA,EAAE,OAAO,IAAIC,iCAAU;AAEvB,QAAA,SAAS,SAAS,OAAO,kBAAkB;AAEjD,QAAM,kBAAkB,WAAW;AACnC,QAAM,oBAAoB,WAAW;AAErC,QAAM,OAAO,SAAS;AAEtB,QAAM,eAAe,YAAY;AAC/B,eAAW,IAAI;AACf,UAAM,OAAO;AAAA,EACf;AAEO,SAAA;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,QAAQ;AAAA,EACV;AACF;;"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export declare const useUser: () => {
|
|
2
|
-
isAuthenticated: boolean;
|
|
3
|
-
isUnauthenticated: boolean;
|
|
4
|
-
user: import('@intlayer/backend').UserAPI | null | undefined;
|
|
5
|
-
revalidateSession: () => Promise<import('..').Session | null | undefined>;
|
|
6
|
-
logout: () => Promise<void>;
|
|
7
|
-
};
|
|
8
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Auth/useUser/index.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,OAAO;;;;;;CAuBnB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../../../src/components/Auth/useUser/index.ts"],"sourcesContent":["'use client';\n\nimport { useLogout } from '../../../hooks';\nimport { useAuth } from '../useAuth';\n\nexport const useUser = () => {\n const { session, revalidateSession, setSession } = useAuth();\n const { logout } = useLogout();\n\n const status = session?.user ? 'authenticated' : 'unauthenticated';\n\n const isAuthenticated = status === 'authenticated';\n const isUnauthenticated = status === 'unauthenticated';\n\n const user = session?.user;\n\n const logoutHandle = async () => {\n setSession(null);\n await logout();\n };\n\n return {\n isAuthenticated,\n isUnauthenticated,\n user,\n revalidateSession,\n logout: logoutHandle,\n };\n};\n"],"names":[],"mappings":";;;;;;;;AAKO,MAAM,UAAU,MAAM;AAC3B,QAAM,EAAE,SAAS,mBAAmB,WAAA,IAAe,QAAQ;AACrD,QAAA,EAAE,OAAO,IAAI,UAAU;AAEvB,QAAA,SAAS,SAAS,OAAO,kBAAkB;AAEjD,QAAM,kBAAkB,WAAW;AACnC,QAAM,oBAAoB,WAAW;AAErC,QAAM,OAAO,SAAS;AAEtB,QAAM,eAAe,YAAY;AAC/B,eAAW,IAAI;AACf,UAAM,OAAO;AAAA,EACf;AAEO,SAAA;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,QAAQ;AAAA,EACV;AACF;"}
|