@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 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../../../src/components/Auth/AuthModal/index.tsx"],"sourcesContent":["'use client';\n\nimport type { UserAPI } from '@intlayer/backend';\nimport { useState, type FC } from 'react';\nimport {\n useAskResetPassword,\n useChangePassword,\n useLogin,\n useRegister,\n} from '../../../hooks';\nimport { Modal } from '../../Modal/Modal';\nimport { type ChangePassword, ChangePasswordForm } from '../ChangePasswordForm';\nimport { type ResetPassword, ResetPasswordForm } from '../ResetPasswordForm';\nimport { type SignIn, SignInForm } from '../SignInForm';\nimport { type SignUp, SignUpForm } from '../SignUpForm';\n\nenum AuthState {\n SignIn,\n SignUp,\n ResetPassword,\n ChangePassword,\n}\n\ntype AuthModalProps = {\n onClose: () => void;\n isOpen: boolean;\n state?: AuthState.SignIn;\n onSignInSuccess?: (data: UserAPI) => Promise<void>;\n onSignUpSuccess?: (data: UserAPI) => Promise<void>;\n onResetPasswordSuccess?: (data: UserAPI) => Promise<void>;\n onChangePasswordSuccess?: (data: UserAPI) => Promise<void>;\n};\n\nexport const AuthModal: FC<AuthModalProps> = ({\n onClose,\n isOpen,\n state: initialState = AuthState.SignIn,\n onSignInSuccess,\n onSignUpSuccess,\n onResetPasswordSuccess,\n onChangePasswordSuccess,\n}) => {\n const [state, setState] = useState<AuthState>(initialState);\n const { login } = useLogin();\n const { register } = useRegister();\n const { askResetPassword } = useAskResetPassword();\n const { changePassword } = useChangePassword();\n\n const onSubmitSignInSuccess = async ({ email, password }: SignIn) =>\n await login({\n email,\n password,\n }).then(async (response) => {\n if (response?.data) {\n await onSignInSuccess?.(response.data);\n }\n });\n\n const onSubmitSignUpSuccess = async ({ email, password }: SignUp) =>\n await register({\n email,\n password,\n }).then(async (response) => {\n if (response?.data) {\n await onSignUpSuccess?.(response.data);\n }\n });\n\n const onSubmitResetPasswordSuccess = async ({ email }: ResetPassword) =>\n await askResetPassword(email).then(async (response) => {\n if (response?.data) {\n await onResetPasswordSuccess?.(response.data);\n }\n });\n\n const onSubmitChangePasswordSuccess = async ({\n currentPassword,\n newPassword,\n }: ChangePassword) =>\n await changePassword({\n oldPassword: currentPassword,\n newPassword,\n }).then(async (response) => {\n if (response?.data) {\n await onChangePasswordSuccess?.(response.data);\n }\n });\n\n return (\n <Modal onClose={onClose} isOpen={isOpen}>\n {state === AuthState.SignIn && (\n <SignInForm\n onSubmitSuccess={onSubmitSignInSuccess}\n onClickForgotPassword={() => setState(AuthState.ResetPassword)}\n onClickSignUp={() => setState(AuthState.SignUp)}\n />\n )}\n {state === AuthState.SignUp && (\n <SignUpForm\n onSubmitSuccess={onSubmitSignUpSuccess}\n onClickBackToSignIn={() => setState(AuthState.SignIn)}\n />\n )}\n {state === AuthState.ResetPassword && (\n <ResetPasswordForm\n onSubmitSuccess={onSubmitResetPasswordSuccess}\n onClickBackToLogin={() => setState(AuthState.SignIn)}\n />\n )}\n {state === AuthState.ChangePassword && (\n <ChangePasswordForm onSubmitSuccess={onSubmitChangePasswordSuccess} />\n )}\n </Modal>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAiCO,MAAM,YAAgC,CAAC;AAAA,EAC5C;AAAA,EACA;AAAA,EACA,OAAO,eAAe;AAAA,EACtB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MAAM;AACJ,QAAM,CAAC,OAAO,QAAQ,IAAI,SAAoB,YAAY;AACpD,QAAA,EAAE,MAAM,IAAI,SAAS;AACrB,QAAA,EAAE,SAAS,IAAI,YAAY;AAC3B,QAAA,EAAE,iBAAiB,IAAI,oBAAoB;AAC3C,QAAA,EAAE,eAAe,IAAI,kBAAkB;AAE7C,QAAM,wBAAwB,OAAO,EAAE,OAAO,SAAS,MACrD,MAAM,MAAM;AAAA,IACV;AAAA,IACA;AAAA,EAAA,CACD,EAAE,KAAK,OAAO,aAAa;AAC1B,QAAI,UAAU,MAAM;AACZ,YAAA,kBAAkB,SAAS,IAAI;AAAA,IAAA;AAAA,EACvC,CACD;AAEH,QAAM,wBAAwB,OAAO,EAAE,OAAO,SAAS,MACrD,MAAM,SAAS;AAAA,IACb;AAAA,IACA;AAAA,EAAA,CACD,EAAE,KAAK,OAAO,aAAa;AAC1B,QAAI,UAAU,MAAM;AACZ,YAAA,kBAAkB,SAAS,IAAI;AAAA,IAAA;AAAA,EACvC,CACD;AAEG,QAAA,+BAA+B,OAAO,EAAE,YAC5C,MAAM,iBAAiB,KAAK,EAAE,KAAK,OAAO,aAAa;AACrD,QAAI,UAAU,MAAM;AACZ,YAAA,yBAAyB,SAAS,IAAI;AAAA,IAAA;AAAA,EAC9C,CACD;AAEH,QAAM,gCAAgC,OAAO;AAAA,IAC3C;AAAA,IACA;AAAA,EACF,MACE,MAAM,eAAe;AAAA,IACnB,aAAa;AAAA,IACb;AAAA,EAAA,CACD,EAAE,KAAK,OAAO,aAAa;AAC1B,QAAI,UAAU,MAAM;AACZ,YAAA,0BAA0B,SAAS,IAAI;AAAA,IAAA;AAAA,EAC/C,CACD;AAGD,SAAA,qBAAC,OAAM,EAAA,SAAkB,QACtB,UAAA;AAAA,IAAA,UAAU,KACT;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,iBAAiB;AAAA,QACjB,uBAAuB,MAAM;AAAA,UAAS;AAAA;AAAA,QAAuB;AAAA,QAC7D,eAAe,MAAM;AAAA,UAAS;AAAA;AAAA,QAAgB;AAAA,MAAA;AAAA,IAChD;AAAA,IAED,UAAU,KACT;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,iBAAiB;AAAA,QACjB,qBAAqB,MAAM;AAAA,UAAS;AAAA;AAAA,QAAgB;AAAA,MAAA;AAAA,IACtD;AAAA,IAED,UAAU,KACT;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,iBAAiB;AAAA,QACjB,oBAAoB,MAAM;AAAA,UAAS;AAAA;AAAA,QAAgB;AAAA,MAAA;AAAA,IACrD;AAAA,IAED,UAAU,KACR,oBAAA,oBAAA,EAAmB,iBAAiB,8BAA+B,CAAA;AAAA,EAAA,GAExE;AAEJ;"}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
"use strict";
|
|
3
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
4
|
-
const jsxRuntime = require("react/jsx-runtime");
|
|
5
|
-
const ReactExports = require("react");
|
|
6
|
-
const components_Loader_index = require("../../Loader/index.cjs");
|
|
7
|
-
const components_Auth_useAuth_useSession = require("../useAuth/useSession.cjs");
|
|
8
|
-
const components_Auth_AuthenticationBarrier_accessValidation = require("./accessValidation.cjs");
|
|
9
|
-
const AuthenticationBarrierClient = ({
|
|
10
|
-
children,
|
|
11
|
-
accessRule = "public",
|
|
12
|
-
redirectionRoute = "/",
|
|
13
|
-
session: sessionProp,
|
|
14
|
-
redirectionFunction
|
|
15
|
-
}) => {
|
|
16
|
-
const { session: sessionClient, setSession } = components_Auth_useAuth_useSession.useSession(sessionProp);
|
|
17
|
-
const isLoading = sessionClient === void 0 && sessionProp === void 0;
|
|
18
|
-
ReactExports.useEffect(() => {
|
|
19
|
-
if (!sessionClient && sessionProp) {
|
|
20
|
-
setSession(sessionProp ?? null);
|
|
21
|
-
}
|
|
22
|
-
}, [sessionClient, sessionProp, setSession]);
|
|
23
|
-
ReactExports.useEffect(() => {
|
|
24
|
-
if (typeof sessionClient !== "undefined") {
|
|
25
|
-
components_Auth_AuthenticationBarrier_accessValidation.accessValidation(
|
|
26
|
-
accessRule,
|
|
27
|
-
sessionClient,
|
|
28
|
-
redirectionFunction,
|
|
29
|
-
redirectionRoute
|
|
30
|
-
);
|
|
31
|
-
}
|
|
32
|
-
}, [accessRule, redirectionRoute, redirectionFunction, sessionClient]);
|
|
33
|
-
return /* @__PURE__ */ jsxRuntime.jsx(components_Loader_index.Loader, { isLoading, children });
|
|
34
|
-
};
|
|
35
|
-
exports.AuthenticationBarrierClient = AuthenticationBarrierClient;
|
|
36
|
-
//# sourceMappingURL=AuthenticationBarrierClient.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AuthenticationBarrierClient.cjs","sources":["../../../../src/components/Auth/AuthenticationBarrier/AuthenticationBarrierClient.tsx"],"sourcesContent":["'use client';\n\nimport { useEffect, type FC } from 'react';\nimport { Loader } from '../../Loader';\nimport { useSession } from '../useAuth/useSession';\nimport { accessValidation } from './accessValidation';\nimport type { AuthenticationBarrierProps } from '.';\n\nexport type AuthenticationBarrierClientProps = Omit<\n AuthenticationBarrierProps,\n 'sessionToken'\n>;\n\nexport const AuthenticationBarrierClient: FC<\n AuthenticationBarrierClientProps\n> = ({\n children,\n accessRule = 'public',\n redirectionRoute = '/',\n session: sessionProp,\n redirectionFunction,\n}) => {\n const { session: sessionClient, setSession } = useSession(sessionProp);\n const isLoading = sessionClient === undefined && sessionProp === undefined;\n\n useEffect(() => {\n if (!sessionClient && sessionProp) {\n setSession(sessionProp ?? null);\n }\n }, [sessionClient, sessionProp, setSession]);\n\n useEffect(() => {\n if (typeof sessionClient !== 'undefined') {\n accessValidation(\n accessRule,\n sessionClient,\n redirectionFunction,\n redirectionRoute\n );\n }\n }, [accessRule, redirectionRoute, redirectionFunction, sessionClient]);\n\n return <Loader isLoading={isLoading}>{children}</Loader>;\n};\n"],"names":["useSession","useEffect","accessValidation","jsx","Loader"],"mappings":";;;;;;;;AAaO,MAAM,8BAET,CAAC;AAAA,EACH;AAAA,EACA,aAAa;AAAA,EACb,mBAAmB;AAAA,EACnB,SAAS;AAAA,EACT;AACF,MAAM;AACJ,QAAM,EAAE,SAAS,eAAe,WAAW,IAAIA,mCAAAA,WAAW,WAAW;AAC/D,QAAA,YAAY,kBAAkB,UAAa,gBAAgB;AAEjEC,eAAAA,UAAU,MAAM;AACV,QAAA,CAAC,iBAAiB,aAAa;AACjC,iBAAW,eAAe,IAAI;AAAA,IAAA;AAAA,EAE/B,GAAA,CAAC,eAAe,aAAa,UAAU,CAAC;AAE3CA,eAAAA,UAAU,MAAM;AACV,QAAA,OAAO,kBAAkB,aAAa;AACxCC,6DAAA;AAAA,QACE;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MACF;AAAA,IAAA;AAAA,KAED,CAAC,YAAY,kBAAkB,qBAAqB,aAAa,CAAC;AAE9D,SAAAC,2BAAA,IAACC,wBAAO,QAAA,EAAA,WAAuB,SAAS,CAAA;AACjD;;"}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { FC } from 'react';
|
|
2
|
-
import { AuthenticationBarrierProps } from '.';
|
|
3
|
-
export type AuthenticationBarrierClientProps = Omit<AuthenticationBarrierProps, 'sessionToken'>;
|
|
4
|
-
export declare const AuthenticationBarrierClient: FC<AuthenticationBarrierClientProps>;
|
|
5
|
-
//# sourceMappingURL=AuthenticationBarrierClient.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AuthenticationBarrierClient.d.ts","sourceRoot":"","sources":["../../../../src/components/Auth/AuthenticationBarrier/AuthenticationBarrierClient.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAa,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAI3C,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,GAAG,CAAC;AAEpD,MAAM,MAAM,gCAAgC,GAAG,IAAI,CACjD,0BAA0B,EAC1B,cAAc,CACf,CAAC;AAEF,eAAO,MAAM,2BAA2B,EAAE,EAAE,CAC1C,gCAAgC,CA6BjC,CAAC"}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsx } from "react/jsx-runtime";
|
|
3
|
-
import { useEffect } from "react";
|
|
4
|
-
import { Loader } from "../../Loader/index.mjs";
|
|
5
|
-
import { useSession } from "../useAuth/useSession.mjs";
|
|
6
|
-
import { accessValidation } from "./accessValidation.mjs";
|
|
7
|
-
const AuthenticationBarrierClient = ({
|
|
8
|
-
children,
|
|
9
|
-
accessRule = "public",
|
|
10
|
-
redirectionRoute = "/",
|
|
11
|
-
session: sessionProp,
|
|
12
|
-
redirectionFunction
|
|
13
|
-
}) => {
|
|
14
|
-
const { session: sessionClient, setSession } = useSession(sessionProp);
|
|
15
|
-
const isLoading = sessionClient === void 0 && sessionProp === void 0;
|
|
16
|
-
useEffect(() => {
|
|
17
|
-
if (!sessionClient && sessionProp) {
|
|
18
|
-
setSession(sessionProp ?? null);
|
|
19
|
-
}
|
|
20
|
-
}, [sessionClient, sessionProp, setSession]);
|
|
21
|
-
useEffect(() => {
|
|
22
|
-
if (typeof sessionClient !== "undefined") {
|
|
23
|
-
accessValidation(
|
|
24
|
-
accessRule,
|
|
25
|
-
sessionClient,
|
|
26
|
-
redirectionFunction,
|
|
27
|
-
redirectionRoute
|
|
28
|
-
);
|
|
29
|
-
}
|
|
30
|
-
}, [accessRule, redirectionRoute, redirectionFunction, sessionClient]);
|
|
31
|
-
return /* @__PURE__ */ jsx(Loader, { isLoading, children });
|
|
32
|
-
};
|
|
33
|
-
export {
|
|
34
|
-
AuthenticationBarrierClient
|
|
35
|
-
};
|
|
36
|
-
//# sourceMappingURL=AuthenticationBarrierClient.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AuthenticationBarrierClient.mjs","sources":["../../../../src/components/Auth/AuthenticationBarrier/AuthenticationBarrierClient.tsx"],"sourcesContent":["'use client';\n\nimport { useEffect, type FC } from 'react';\nimport { Loader } from '../../Loader';\nimport { useSession } from '../useAuth/useSession';\nimport { accessValidation } from './accessValidation';\nimport type { AuthenticationBarrierProps } from '.';\n\nexport type AuthenticationBarrierClientProps = Omit<\n AuthenticationBarrierProps,\n 'sessionToken'\n>;\n\nexport const AuthenticationBarrierClient: FC<\n AuthenticationBarrierClientProps\n> = ({\n children,\n accessRule = 'public',\n redirectionRoute = '/',\n session: sessionProp,\n redirectionFunction,\n}) => {\n const { session: sessionClient, setSession } = useSession(sessionProp);\n const isLoading = sessionClient === undefined && sessionProp === undefined;\n\n useEffect(() => {\n if (!sessionClient && sessionProp) {\n setSession(sessionProp ?? null);\n }\n }, [sessionClient, sessionProp, setSession]);\n\n useEffect(() => {\n if (typeof sessionClient !== 'undefined') {\n accessValidation(\n accessRule,\n sessionClient,\n redirectionFunction,\n redirectionRoute\n );\n }\n }, [accessRule, redirectionRoute, redirectionFunction, sessionClient]);\n\n return <Loader isLoading={isLoading}>{children}</Loader>;\n};\n"],"names":[],"mappings":";;;;;;AAaO,MAAM,8BAET,CAAC;AAAA,EACH;AAAA,EACA,aAAa;AAAA,EACb,mBAAmB;AAAA,EACnB,SAAS;AAAA,EACT;AACF,MAAM;AACJ,QAAM,EAAE,SAAS,eAAe,WAAW,IAAI,WAAW,WAAW;AAC/D,QAAA,YAAY,kBAAkB,UAAa,gBAAgB;AAEjE,YAAU,MAAM;AACV,QAAA,CAAC,iBAAiB,aAAa;AACjC,iBAAW,eAAe,IAAI;AAAA,IAAA;AAAA,EAE/B,GAAA,CAAC,eAAe,aAAa,UAAU,CAAC;AAE3C,YAAU,MAAM;AACV,QAAA,OAAO,kBAAkB,aAAa;AACxC;AAAA,QACE;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MACF;AAAA,IAAA;AAAA,KAED,CAAC,YAAY,kBAAkB,qBAAqB,aAAa,CAAC;AAE9D,SAAA,oBAAC,QAAO,EAAA,WAAuB,SAAS,CAAA;AACjD;"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const components_Auth_AuthenticationBarrier_accessValidation = require("./accessValidation.cjs");
|
|
4
|
-
const AuthenticationBarrierServer = ({
|
|
5
|
-
children,
|
|
6
|
-
accessRule = "public",
|
|
7
|
-
redirectionRoute = "/",
|
|
8
|
-
session,
|
|
9
|
-
redirectionFunction
|
|
10
|
-
}) => {
|
|
11
|
-
if (typeof session !== "undefined") {
|
|
12
|
-
components_Auth_AuthenticationBarrier_accessValidation.accessValidation(
|
|
13
|
-
accessRule,
|
|
14
|
-
session,
|
|
15
|
-
redirectionFunction,
|
|
16
|
-
redirectionRoute
|
|
17
|
-
);
|
|
18
|
-
}
|
|
19
|
-
return children;
|
|
20
|
-
};
|
|
21
|
-
exports.AuthenticationBarrierServer = AuthenticationBarrierServer;
|
|
22
|
-
//# sourceMappingURL=AuthenticationBarrierServer.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AuthenticationBarrierServer.cjs","sources":["../../../../src/components/Auth/AuthenticationBarrier/AuthenticationBarrierServer.tsx"],"sourcesContent":["import type { FC } from 'react';\nimport type { Session } from '../useAuth';\nimport { accessValidation } from './accessValidation';\nimport type { AuthenticationBarrierProps } from '.';\n\nexport type AuthenticationBarrierClientProps = Omit<\n AuthenticationBarrierProps,\n 'sessionToken'\n> & {\n session: Session;\n};\n\nexport const AuthenticationBarrierServer: FC<AuthenticationBarrierProps> = ({\n children,\n accessRule = 'public',\n redirectionRoute = '/',\n session,\n redirectionFunction,\n}) => {\n if (typeof session !== 'undefined') {\n accessValidation(\n accessRule,\n session,\n redirectionFunction,\n redirectionRoute\n );\n }\n\n return children;\n};\n"],"names":["accessValidation"],"mappings":";;;AAYO,MAAM,8BAA8D,CAAC;AAAA,EAC1E;AAAA,EACA,aAAa;AAAA,EACb,mBAAmB;AAAA,EACnB;AAAA,EACA;AACF,MAAM;AACA,MAAA,OAAO,YAAY,aAAa;AAClCA,2DAAA;AAAA,MACE;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,EAAA;AAGK,SAAA;AACT;;"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { FC } from 'react';
|
|
2
|
-
import { Session } from '../useAuth';
|
|
3
|
-
import { AuthenticationBarrierProps } from '.';
|
|
4
|
-
export type AuthenticationBarrierClientProps = Omit<AuthenticationBarrierProps, 'sessionToken'> & {
|
|
5
|
-
session: Session;
|
|
6
|
-
};
|
|
7
|
-
export declare const AuthenticationBarrierServer: FC<AuthenticationBarrierProps>;
|
|
8
|
-
//# sourceMappingURL=AuthenticationBarrierServer.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AuthenticationBarrierServer.d.ts","sourceRoot":"","sources":["../../../../src/components/Auth/AuthenticationBarrier/AuthenticationBarrierServer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAChC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAE1C,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,GAAG,CAAC;AAEpD,MAAM,MAAM,gCAAgC,GAAG,IAAI,CACjD,0BAA0B,EAC1B,cAAc,CACf,GAAG;IACF,OAAO,EAAE,OAAO,CAAC;CAClB,CAAC;AAEF,eAAO,MAAM,2BAA2B,EAAE,EAAE,CAAC,0BAA0B,CAiBtE,CAAC"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { accessValidation } from "./accessValidation.mjs";
|
|
2
|
-
const AuthenticationBarrierServer = ({
|
|
3
|
-
children,
|
|
4
|
-
accessRule = "public",
|
|
5
|
-
redirectionRoute = "/",
|
|
6
|
-
session,
|
|
7
|
-
redirectionFunction
|
|
8
|
-
}) => {
|
|
9
|
-
if (typeof session !== "undefined") {
|
|
10
|
-
accessValidation(
|
|
11
|
-
accessRule,
|
|
12
|
-
session,
|
|
13
|
-
redirectionFunction,
|
|
14
|
-
redirectionRoute
|
|
15
|
-
);
|
|
16
|
-
}
|
|
17
|
-
return children;
|
|
18
|
-
};
|
|
19
|
-
export {
|
|
20
|
-
AuthenticationBarrierServer
|
|
21
|
-
};
|
|
22
|
-
//# sourceMappingURL=AuthenticationBarrierServer.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AuthenticationBarrierServer.mjs","sources":["../../../../src/components/Auth/AuthenticationBarrier/AuthenticationBarrierServer.tsx"],"sourcesContent":["import type { FC } from 'react';\nimport type { Session } from '../useAuth';\nimport { accessValidation } from './accessValidation';\nimport type { AuthenticationBarrierProps } from '.';\n\nexport type AuthenticationBarrierClientProps = Omit<\n AuthenticationBarrierProps,\n 'sessionToken'\n> & {\n session: Session;\n};\n\nexport const AuthenticationBarrierServer: FC<AuthenticationBarrierProps> = ({\n children,\n accessRule = 'public',\n redirectionRoute = '/',\n session,\n redirectionFunction,\n}) => {\n if (typeof session !== 'undefined') {\n accessValidation(\n accessRule,\n session,\n redirectionFunction,\n redirectionRoute\n );\n }\n\n return children;\n};\n"],"names":[],"mappings":";AAYO,MAAM,8BAA8D,CAAC;AAAA,EAC1E;AAAA,EACA,aAAa;AAAA,EACb,mBAAmB;AAAA,EACnB;AAAA,EACA;AACF,MAAM;AACA,MAAA,OAAO,YAAY,aAAa;AAClC;AAAA,MACE;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,EAAA;AAGK,SAAA;AACT;"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const accessValidation = (accessRule, session, redirectionFunction, redirectionRoute) => {
|
|
4
|
-
if (!session?.user && (accessRule === "authenticated" || accessRule === "admin")) {
|
|
5
|
-
redirectionFunction(redirectionRoute);
|
|
6
|
-
}
|
|
7
|
-
if (session?.user && accessRule === "none-authenticated") {
|
|
8
|
-
redirectionFunction(redirectionRoute);
|
|
9
|
-
}
|
|
10
|
-
if (session?.user && accessRule === "admin" && !session.user?.role.includes("admin")) {
|
|
11
|
-
redirectionFunction(redirectionRoute);
|
|
12
|
-
}
|
|
13
|
-
};
|
|
14
|
-
exports.accessValidation = accessValidation;
|
|
15
|
-
//# sourceMappingURL=accessValidation.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"accessValidation.cjs","sources":["../../../../src/components/Auth/AuthenticationBarrier/accessValidation.ts"],"sourcesContent":["import type { Session } from '../useAuth';\nimport type { AuthenticationBarrierProps } from '.';\n\nexport const accessValidation = (\n accessRule: AuthenticationBarrierProps['accessRule'],\n session: Session | null,\n redirectionFunction: (redirectionRoute: string) => void,\n redirectionRoute: string\n) => {\n if (\n !session?.user &&\n (accessRule === 'authenticated' || accessRule === 'admin')\n ) {\n redirectionFunction(redirectionRoute);\n }\n\n if (session?.user && accessRule === 'none-authenticated') {\n redirectionFunction(redirectionRoute);\n }\n\n if (\n session?.user &&\n accessRule === 'admin' &&\n !session.user?.role.includes('admin')\n ) {\n redirectionFunction(redirectionRoute);\n }\n};\n"],"names":[],"mappings":";;AAGO,MAAM,mBAAmB,CAC9B,YACA,SACA,qBACA,qBACG;AACH,MACE,CAAC,SAAS,SACT,eAAe,mBAAmB,eAAe,UAClD;AACA,wBAAoB,gBAAgB;AAAA,EAAA;AAGlC,MAAA,SAAS,QAAQ,eAAe,sBAAsB;AACxD,wBAAoB,gBAAgB;AAAA,EAAA;AAIpC,MAAA,SAAS,QACT,eAAe,WACf,CAAC,QAAQ,MAAM,KAAK,SAAS,OAAO,GACpC;AACA,wBAAoB,gBAAgB;AAAA,EAAA;AAExC;;"}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { Session } from '../useAuth';
|
|
2
|
-
import { AuthenticationBarrierProps } from '.';
|
|
3
|
-
export declare const accessValidation: (accessRule: AuthenticationBarrierProps["accessRule"], session: Session | null, redirectionFunction: (redirectionRoute: string) => void, redirectionRoute: string) => void;
|
|
4
|
-
//# sourceMappingURL=accessValidation.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"accessValidation.d.ts","sourceRoot":"","sources":["../../../../src/components/Auth/AuthenticationBarrier/accessValidation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAC1C,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,GAAG,CAAC;AAEpD,eAAO,MAAM,gBAAgB,GAC3B,YAAY,0BAA0B,CAAC,YAAY,CAAC,EACpD,SAAS,OAAO,GAAG,IAAI,EACvB,qBAAqB,CAAC,gBAAgB,EAAE,MAAM,KAAK,IAAI,EACvD,kBAAkB,MAAM,SAoBzB,CAAC"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
const accessValidation = (accessRule, session, redirectionFunction, redirectionRoute) => {
|
|
2
|
-
if (!session?.user && (accessRule === "authenticated" || accessRule === "admin")) {
|
|
3
|
-
redirectionFunction(redirectionRoute);
|
|
4
|
-
}
|
|
5
|
-
if (session?.user && accessRule === "none-authenticated") {
|
|
6
|
-
redirectionFunction(redirectionRoute);
|
|
7
|
-
}
|
|
8
|
-
if (session?.user && accessRule === "admin" && !session.user?.role.includes("admin")) {
|
|
9
|
-
redirectionFunction(redirectionRoute);
|
|
10
|
-
}
|
|
11
|
-
};
|
|
12
|
-
export {
|
|
13
|
-
accessValidation
|
|
14
|
-
};
|
|
15
|
-
//# sourceMappingURL=accessValidation.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"accessValidation.mjs","sources":["../../../../src/components/Auth/AuthenticationBarrier/accessValidation.ts"],"sourcesContent":["import type { Session } from '../useAuth';\nimport type { AuthenticationBarrierProps } from '.';\n\nexport const accessValidation = (\n accessRule: AuthenticationBarrierProps['accessRule'],\n session: Session | null,\n redirectionFunction: (redirectionRoute: string) => void,\n redirectionRoute: string\n) => {\n if (\n !session?.user &&\n (accessRule === 'authenticated' || accessRule === 'admin')\n ) {\n redirectionFunction(redirectionRoute);\n }\n\n if (session?.user && accessRule === 'none-authenticated') {\n redirectionFunction(redirectionRoute);\n }\n\n if (\n session?.user &&\n accessRule === 'admin' &&\n !session.user?.role.includes('admin')\n ) {\n redirectionFunction(redirectionRoute);\n }\n};\n"],"names":[],"mappings":"AAGO,MAAM,mBAAmB,CAC9B,YACA,SACA,qBACA,qBACG;AACH,MACE,CAAC,SAAS,SACT,eAAe,mBAAmB,eAAe,UAClD;AACA,wBAAoB,gBAAgB;AAAA,EAAA;AAGlC,MAAA,SAAS,QAAQ,eAAe,sBAAsB;AACxD,wBAAoB,gBAAgB;AAAA,EAAA;AAIpC,MAAA,SAAS,QACT,eAAe,WACf,CAAC,QAAQ,MAAM,KAAK,SAAS,OAAO,GACpC;AACA,wBAAoB,gBAAgB;AAAA,EAAA;AAExC;"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const components_Auth_AuthenticationBarrier_AuthenticationBarrierServer = require("./AuthenticationBarrierServer.cjs");
|
|
4
|
-
const components_Auth_AuthenticationBarrier_AuthenticationBarrierClient = require("./AuthenticationBarrierClient.cjs");
|
|
5
|
-
exports.AuthenticationBarrierServer = components_Auth_AuthenticationBarrier_AuthenticationBarrierServer.AuthenticationBarrierServer;
|
|
6
|
-
exports.AuthenticationBarrierClient = components_Auth_AuthenticationBarrier_AuthenticationBarrierClient.AuthenticationBarrierClient;
|
|
7
|
-
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
import { Session } from '../useAuth';
|
|
3
|
-
export { AuthenticationBarrierServer } from './AuthenticationBarrierServer';
|
|
4
|
-
export { AuthenticationBarrierClient } from './AuthenticationBarrierClient';
|
|
5
|
-
export type AuthenticationBarrierProps = {
|
|
6
|
-
children?: ReactNode;
|
|
7
|
-
accessRule?: 'public' | 'authenticated' | 'admin' | 'none-authenticated';
|
|
8
|
-
redirectionRoute?: string;
|
|
9
|
-
session?: Session | null;
|
|
10
|
-
sessionToken?: string;
|
|
11
|
-
/**
|
|
12
|
-
* Function to replace for a nextjs redirection
|
|
13
|
-
*
|
|
14
|
-
* Example:
|
|
15
|
-
* ```js
|
|
16
|
-
* import { redirect } from 'next/navigation';
|
|
17
|
-
* ...
|
|
18
|
-
* redirectionMethod={(url) => redirect(url)}
|
|
19
|
-
* ```
|
|
20
|
-
*/
|
|
21
|
-
redirectionFunction: (redirectionRoute: string) => void;
|
|
22
|
-
};
|
|
23
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Auth/AuthenticationBarrier/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAE1C,OAAO,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAC5E,OAAO,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAE5E,MAAM,MAAM,0BAA0B,GAAG;IACvC,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,UAAU,CAAC,EAAE,QAAQ,GAAG,eAAe,GAAG,OAAO,GAAG,oBAAoB,CAAC;IACzE,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,OAAO,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;IACzB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;;;;;;;OASG;IACH,mBAAmB,EAAE,CAAC,gBAAgB,EAAE,MAAM,KAAK,IAAI,CAAC;CACzD,CAAC"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { AuthenticationBarrierServer } from "./AuthenticationBarrierServer.mjs";
|
|
2
|
-
import { AuthenticationBarrierClient } from "./AuthenticationBarrierClient.mjs";
|
|
3
|
-
export {
|
|
4
|
-
AuthenticationBarrierClient,
|
|
5
|
-
AuthenticationBarrierServer
|
|
6
|
-
};
|
|
7
|
-
//# sourceMappingURL=index.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
|
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const jsxRuntime = require("react/jsx-runtime");
|
|
4
|
-
const reactIntlayer = require("react-intlayer");
|
|
5
|
-
const components_Form_FormBase = require("../../Form/FormBase.cjs");
|
|
6
|
-
require("../../Form/FormField.cjs");
|
|
7
|
-
const components_Form_layout_FormItemLayout = require("../../../Form-DJrUK3mm.cjs");
|
|
8
|
-
const components_Auth_useUser_index = require("../useUser/index.cjs");
|
|
9
|
-
const components_Auth_ChangePasswordForm_changePasswordForm_content = require("./changePasswordForm.content.cjs");
|
|
10
|
-
const components_Auth_ChangePasswordForm_useChangePasswordSchema = require("./useChangePasswordSchema.cjs");
|
|
11
|
-
const ChangePasswordForm = ({
|
|
12
|
-
onSubmitSuccess,
|
|
13
|
-
onSubmitError
|
|
14
|
-
}) => {
|
|
15
|
-
const {
|
|
16
|
-
currentPasswordInput,
|
|
17
|
-
newPasswordInput,
|
|
18
|
-
confirmPasswordInput,
|
|
19
|
-
changePasswordButton
|
|
20
|
-
} = reactIntlayer.useDictionary(components_Auth_ChangePasswordForm_changePasswordForm_content.changePasswordContent);
|
|
21
|
-
const { user } = components_Auth_useUser_index.useUser();
|
|
22
|
-
const ChangePasswordSchema = components_Auth_ChangePasswordForm_useChangePasswordSchema.useChangePasswordSchema();
|
|
23
|
-
const { form, isSubmitting, isValid } = components_Form_FormBase.useForm(ChangePasswordSchema);
|
|
24
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
25
|
-
components_Form_layout_FormItemLayout.Form,
|
|
26
|
-
{
|
|
27
|
-
schema: ChangePasswordSchema,
|
|
28
|
-
onSubmitSuccess,
|
|
29
|
-
onSubmitError,
|
|
30
|
-
autoComplete: true,
|
|
31
|
-
className: "gap-y-0",
|
|
32
|
-
...form,
|
|
33
|
-
children: [
|
|
34
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-y-6", children: [
|
|
35
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
36
|
-
components_Form_layout_FormItemLayout.Form.Input,
|
|
37
|
-
{
|
|
38
|
-
type: "text",
|
|
39
|
-
name: "email",
|
|
40
|
-
value: user?.email ?? "",
|
|
41
|
-
autoComplete: "username email",
|
|
42
|
-
disabled: true,
|
|
43
|
-
hidden: true,
|
|
44
|
-
className: "hidden"
|
|
45
|
-
}
|
|
46
|
-
),
|
|
47
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
48
|
-
components_Form_layout_FormItemLayout.Form.InputPassword,
|
|
49
|
-
{
|
|
50
|
-
name: "currentPassword",
|
|
51
|
-
label: currentPasswordInput.label.value,
|
|
52
|
-
placeholder: currentPasswordInput.placeholder.value,
|
|
53
|
-
autoComplete: "current-password",
|
|
54
|
-
isRequired: true
|
|
55
|
-
}
|
|
56
|
-
),
|
|
57
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
58
|
-
components_Form_layout_FormItemLayout.Form.InputPassword,
|
|
59
|
-
{
|
|
60
|
-
name: "newPassword",
|
|
61
|
-
label: newPasswordInput.label.value,
|
|
62
|
-
placeholder: newPasswordInput.placeholder.value,
|
|
63
|
-
autoComplete: "new-password",
|
|
64
|
-
isRequired: true
|
|
65
|
-
}
|
|
66
|
-
),
|
|
67
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
68
|
-
components_Form_layout_FormItemLayout.Form.InputPassword,
|
|
69
|
-
{
|
|
70
|
-
name: "newPasswordConfirmation",
|
|
71
|
-
label: confirmPasswordInput.label.value,
|
|
72
|
-
placeholder: confirmPasswordInput.placeholder.value,
|
|
73
|
-
autoComplete: "new-password",
|
|
74
|
-
isRequired: true
|
|
75
|
-
}
|
|
76
|
-
)
|
|
77
|
-
] }),
|
|
78
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
79
|
-
components_Form_layout_FormItemLayout.Form.Button,
|
|
80
|
-
{
|
|
81
|
-
className: "mt-12 w-full",
|
|
82
|
-
type: "submit",
|
|
83
|
-
color: "text",
|
|
84
|
-
isLoading: isSubmitting,
|
|
85
|
-
disabled: !isValid,
|
|
86
|
-
label: changePasswordButton.ariaLabel.value,
|
|
87
|
-
children: changePasswordButton.text.value
|
|
88
|
-
}
|
|
89
|
-
)
|
|
90
|
-
]
|
|
91
|
-
}
|
|
92
|
-
);
|
|
93
|
-
};
|
|
94
|
-
exports.ChangePasswordForm = ChangePasswordForm;
|
|
95
|
-
//# sourceMappingURL=ChangePasswordForm.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ChangePasswordForm.cjs","sources":["../../../../src/components/Auth/ChangePasswordForm/ChangePasswordForm.tsx"],"sourcesContent":["import type { FC } from 'react';\nimport { useDictionary } from 'react-intlayer';\nimport { Form, useForm } from '../../Form';\nimport { useUser } from '../useUser';\nimport { changePasswordContent } from './changePasswordForm.content';\nimport {\n useChangePasswordSchema,\n type ChangePassword,\n} from './useChangePasswordSchema';\n\ntype ChangePasswordFormProps = {\n onSubmitSuccess: (data: ChangePassword) => Promise<void>;\n onSubmitError?: (error: Error) => void;\n};\n\nexport const ChangePasswordForm: FC<ChangePasswordFormProps> = ({\n onSubmitSuccess,\n onSubmitError,\n}) => {\n const {\n currentPasswordInput,\n newPasswordInput,\n confirmPasswordInput,\n changePasswordButton,\n } = useDictionary(changePasswordContent);\n const { user } = useUser();\n const ChangePasswordSchema = useChangePasswordSchema();\n\n const { form, isSubmitting, isValid } = useForm(ChangePasswordSchema);\n\n return (\n <Form\n schema={ChangePasswordSchema}\n onSubmitSuccess={onSubmitSuccess}\n onSubmitError={onSubmitError}\n autoComplete\n className=\"gap-y-0\"\n {...form}\n >\n <div className=\"flex flex-col gap-y-6\">\n <Form.Input\n type=\"text\"\n name=\"email\"\n value={user?.email ?? ''}\n autoComplete=\"username email\"\n disabled\n hidden\n className=\"hidden\"\n />\n <Form.InputPassword\n name=\"currentPassword\"\n label={currentPasswordInput.label.value}\n placeholder={currentPasswordInput.placeholder.value}\n autoComplete=\"current-password\"\n isRequired\n />\n <Form.InputPassword\n name=\"newPassword\"\n label={newPasswordInput.label.value}\n placeholder={newPasswordInput.placeholder.value}\n autoComplete=\"new-password\"\n isRequired\n />\n <Form.InputPassword\n name=\"newPasswordConfirmation\"\n label={confirmPasswordInput.label.value}\n placeholder={confirmPasswordInput.placeholder.value}\n autoComplete=\"new-password\"\n isRequired\n />\n </div>\n\n <Form.Button\n className=\"mt-12 w-full\"\n type=\"submit\"\n color=\"text\"\n isLoading={isSubmitting}\n disabled={!isValid}\n label={changePasswordButton.ariaLabel.value}\n >\n {changePasswordButton.text.value}\n </Form.Button>\n </Form>\n );\n};\n"],"names":["useDictionary","changePasswordContent","useUser","useChangePasswordSchema","useForm","jsxs","Form","jsx"],"mappings":";;;;;;;;;;AAeO,MAAM,qBAAkD,CAAC;AAAA,EAC9D;AAAA,EACA;AACF,MAAM;AACE,QAAA;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EAAA,IACEA,cAAAA,cAAcC,8DAAAA,qBAAqB;AACjC,QAAA,EAAE,KAAK,IAAIC,sCAAQ;AACzB,QAAM,uBAAuBC,2DAAAA,wBAAwB;AAErD,QAAM,EAAE,MAAM,cAAc,QAAQ,IAAIC,yBAAAA,QAAQ,oBAAoB;AAGlE,SAAAC,2BAAA;AAAA,IAACC,sCAAA;AAAA,IAAA;AAAA,MACC,QAAQ;AAAA,MACR;AAAA,MACA;AAAA,MACA,cAAY;AAAA,MACZ,WAAU;AAAA,MACT,GAAG;AAAA,MAEJ,UAAA;AAAA,QAACD,2BAAAA,KAAA,OAAA,EAAI,WAAU,yBACb,UAAA;AAAA,UAAAE,2BAAA;AAAA,YAACD,sCAAAA,KAAK;AAAA,YAAL;AAAA,cACC,MAAK;AAAA,cACL,MAAK;AAAA,cACL,OAAO,MAAM,SAAS;AAAA,cACtB,cAAa;AAAA,cACb,UAAQ;AAAA,cACR,QAAM;AAAA,cACN,WAAU;AAAA,YAAA;AAAA,UACZ;AAAA,UACAC,2BAAA;AAAA,YAACD,sCAAAA,KAAK;AAAA,YAAL;AAAA,cACC,MAAK;AAAA,cACL,OAAO,qBAAqB,MAAM;AAAA,cAClC,aAAa,qBAAqB,YAAY;AAAA,cAC9C,cAAa;AAAA,cACb,YAAU;AAAA,YAAA;AAAA,UACZ;AAAA,UACAC,2BAAA;AAAA,YAACD,sCAAAA,KAAK;AAAA,YAAL;AAAA,cACC,MAAK;AAAA,cACL,OAAO,iBAAiB,MAAM;AAAA,cAC9B,aAAa,iBAAiB,YAAY;AAAA,cAC1C,cAAa;AAAA,cACb,YAAU;AAAA,YAAA;AAAA,UACZ;AAAA,UACAC,2BAAA;AAAA,YAACD,sCAAAA,KAAK;AAAA,YAAL;AAAA,cACC,MAAK;AAAA,cACL,OAAO,qBAAqB,MAAM;AAAA,cAClC,aAAa,qBAAqB,YAAY;AAAA,cAC9C,cAAa;AAAA,cACb,YAAU;AAAA,YAAA;AAAA,UAAA;AAAA,QACZ,GACF;AAAA,QAEAC,2BAAA;AAAA,UAACD,sCAAAA,KAAK;AAAA,UAAL;AAAA,YACC,WAAU;AAAA,YACV,MAAK;AAAA,YACL,OAAM;AAAA,YACN,WAAW;AAAA,YACX,UAAU,CAAC;AAAA,YACX,OAAO,qBAAqB,UAAU;AAAA,YAErC,+BAAqB,KAAK;AAAA,UAAA;AAAA,QAAA;AAAA,MAC7B;AAAA,IAAA;AAAA,EACF;AAEJ;;"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { FC } from 'react';
|
|
2
|
-
import { ChangePassword } from './useChangePasswordSchema';
|
|
3
|
-
type ChangePasswordFormProps = {
|
|
4
|
-
onSubmitSuccess: (data: ChangePassword) => Promise<void>;
|
|
5
|
-
onSubmitError?: (error: Error) => void;
|
|
6
|
-
};
|
|
7
|
-
export declare const ChangePasswordForm: FC<ChangePasswordFormProps>;
|
|
8
|
-
export {};
|
|
9
|
-
//# sourceMappingURL=ChangePasswordForm.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ChangePasswordForm.d.ts","sourceRoot":"","sources":["../../../../src/components/Auth/ChangePasswordForm/ChangePasswordForm.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAKhC,OAAO,EAEL,KAAK,cAAc,EACpB,MAAM,2BAA2B,CAAC;AAEnC,KAAK,uBAAuB,GAAG;IAC7B,eAAe,EAAE,CAAC,IAAI,EAAE,cAAc,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACzD,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;CACxC,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,EAAE,CAAC,uBAAuB,CAqE1D,CAAC"}
|
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
-
import { useDictionary } from "react-intlayer";
|
|
3
|
-
import { useForm } from "../../Form/FormBase.mjs";
|
|
4
|
-
import "../../Form/FormField.mjs";
|
|
5
|
-
import { F as Form } from "../../../Form-CriPBaZk.js";
|
|
6
|
-
import { useUser } from "../useUser/index.mjs";
|
|
7
|
-
import { changePasswordContent } from "./changePasswordForm.content.mjs";
|
|
8
|
-
import { useChangePasswordSchema } from "./useChangePasswordSchema.mjs";
|
|
9
|
-
const ChangePasswordForm = ({
|
|
10
|
-
onSubmitSuccess,
|
|
11
|
-
onSubmitError
|
|
12
|
-
}) => {
|
|
13
|
-
const {
|
|
14
|
-
currentPasswordInput,
|
|
15
|
-
newPasswordInput,
|
|
16
|
-
confirmPasswordInput,
|
|
17
|
-
changePasswordButton
|
|
18
|
-
} = useDictionary(changePasswordContent);
|
|
19
|
-
const { user } = useUser();
|
|
20
|
-
const ChangePasswordSchema = useChangePasswordSchema();
|
|
21
|
-
const { form, isSubmitting, isValid } = useForm(ChangePasswordSchema);
|
|
22
|
-
return /* @__PURE__ */ jsxs(
|
|
23
|
-
Form,
|
|
24
|
-
{
|
|
25
|
-
schema: ChangePasswordSchema,
|
|
26
|
-
onSubmitSuccess,
|
|
27
|
-
onSubmitError,
|
|
28
|
-
autoComplete: true,
|
|
29
|
-
className: "gap-y-0",
|
|
30
|
-
...form,
|
|
31
|
-
children: [
|
|
32
|
-
/* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-y-6", children: [
|
|
33
|
-
/* @__PURE__ */ jsx(
|
|
34
|
-
Form.Input,
|
|
35
|
-
{
|
|
36
|
-
type: "text",
|
|
37
|
-
name: "email",
|
|
38
|
-
value: user?.email ?? "",
|
|
39
|
-
autoComplete: "username email",
|
|
40
|
-
disabled: true,
|
|
41
|
-
hidden: true,
|
|
42
|
-
className: "hidden"
|
|
43
|
-
}
|
|
44
|
-
),
|
|
45
|
-
/* @__PURE__ */ jsx(
|
|
46
|
-
Form.InputPassword,
|
|
47
|
-
{
|
|
48
|
-
name: "currentPassword",
|
|
49
|
-
label: currentPasswordInput.label.value,
|
|
50
|
-
placeholder: currentPasswordInput.placeholder.value,
|
|
51
|
-
autoComplete: "current-password",
|
|
52
|
-
isRequired: true
|
|
53
|
-
}
|
|
54
|
-
),
|
|
55
|
-
/* @__PURE__ */ jsx(
|
|
56
|
-
Form.InputPassword,
|
|
57
|
-
{
|
|
58
|
-
name: "newPassword",
|
|
59
|
-
label: newPasswordInput.label.value,
|
|
60
|
-
placeholder: newPasswordInput.placeholder.value,
|
|
61
|
-
autoComplete: "new-password",
|
|
62
|
-
isRequired: true
|
|
63
|
-
}
|
|
64
|
-
),
|
|
65
|
-
/* @__PURE__ */ jsx(
|
|
66
|
-
Form.InputPassword,
|
|
67
|
-
{
|
|
68
|
-
name: "newPasswordConfirmation",
|
|
69
|
-
label: confirmPasswordInput.label.value,
|
|
70
|
-
placeholder: confirmPasswordInput.placeholder.value,
|
|
71
|
-
autoComplete: "new-password",
|
|
72
|
-
isRequired: true
|
|
73
|
-
}
|
|
74
|
-
)
|
|
75
|
-
] }),
|
|
76
|
-
/* @__PURE__ */ jsx(
|
|
77
|
-
Form.Button,
|
|
78
|
-
{
|
|
79
|
-
className: "mt-12 w-full",
|
|
80
|
-
type: "submit",
|
|
81
|
-
color: "text",
|
|
82
|
-
isLoading: isSubmitting,
|
|
83
|
-
disabled: !isValid,
|
|
84
|
-
label: changePasswordButton.ariaLabel.value,
|
|
85
|
-
children: changePasswordButton.text.value
|
|
86
|
-
}
|
|
87
|
-
)
|
|
88
|
-
]
|
|
89
|
-
}
|
|
90
|
-
);
|
|
91
|
-
};
|
|
92
|
-
export {
|
|
93
|
-
ChangePasswordForm
|
|
94
|
-
};
|
|
95
|
-
//# sourceMappingURL=ChangePasswordForm.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ChangePasswordForm.mjs","sources":["../../../../src/components/Auth/ChangePasswordForm/ChangePasswordForm.tsx"],"sourcesContent":["import type { FC } from 'react';\nimport { useDictionary } from 'react-intlayer';\nimport { Form, useForm } from '../../Form';\nimport { useUser } from '../useUser';\nimport { changePasswordContent } from './changePasswordForm.content';\nimport {\n useChangePasswordSchema,\n type ChangePassword,\n} from './useChangePasswordSchema';\n\ntype ChangePasswordFormProps = {\n onSubmitSuccess: (data: ChangePassword) => Promise<void>;\n onSubmitError?: (error: Error) => void;\n};\n\nexport const ChangePasswordForm: FC<ChangePasswordFormProps> = ({\n onSubmitSuccess,\n onSubmitError,\n}) => {\n const {\n currentPasswordInput,\n newPasswordInput,\n confirmPasswordInput,\n changePasswordButton,\n } = useDictionary(changePasswordContent);\n const { user } = useUser();\n const ChangePasswordSchema = useChangePasswordSchema();\n\n const { form, isSubmitting, isValid } = useForm(ChangePasswordSchema);\n\n return (\n <Form\n schema={ChangePasswordSchema}\n onSubmitSuccess={onSubmitSuccess}\n onSubmitError={onSubmitError}\n autoComplete\n className=\"gap-y-0\"\n {...form}\n >\n <div className=\"flex flex-col gap-y-6\">\n <Form.Input\n type=\"text\"\n name=\"email\"\n value={user?.email ?? ''}\n autoComplete=\"username email\"\n disabled\n hidden\n className=\"hidden\"\n />\n <Form.InputPassword\n name=\"currentPassword\"\n label={currentPasswordInput.label.value}\n placeholder={currentPasswordInput.placeholder.value}\n autoComplete=\"current-password\"\n isRequired\n />\n <Form.InputPassword\n name=\"newPassword\"\n label={newPasswordInput.label.value}\n placeholder={newPasswordInput.placeholder.value}\n autoComplete=\"new-password\"\n isRequired\n />\n <Form.InputPassword\n name=\"newPasswordConfirmation\"\n label={confirmPasswordInput.label.value}\n placeholder={confirmPasswordInput.placeholder.value}\n autoComplete=\"new-password\"\n isRequired\n />\n </div>\n\n <Form.Button\n className=\"mt-12 w-full\"\n type=\"submit\"\n color=\"text\"\n isLoading={isSubmitting}\n disabled={!isValid}\n label={changePasswordButton.ariaLabel.value}\n >\n {changePasswordButton.text.value}\n </Form.Button>\n </Form>\n );\n};\n"],"names":[],"mappings":";;;;;;;;AAeO,MAAM,qBAAkD,CAAC;AAAA,EAC9D;AAAA,EACA;AACF,MAAM;AACE,QAAA;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EAAA,IACE,cAAc,qBAAqB;AACjC,QAAA,EAAE,KAAK,IAAI,QAAQ;AACzB,QAAM,uBAAuB,wBAAwB;AAErD,QAAM,EAAE,MAAM,cAAc,QAAQ,IAAI,QAAQ,oBAAoB;AAGlE,SAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,QAAQ;AAAA,MACR;AAAA,MACA;AAAA,MACA,cAAY;AAAA,MACZ,WAAU;AAAA,MACT,GAAG;AAAA,MAEJ,UAAA;AAAA,QAAC,qBAAA,OAAA,EAAI,WAAU,yBACb,UAAA;AAAA,UAAA;AAAA,YAAC,KAAK;AAAA,YAAL;AAAA,cACC,MAAK;AAAA,cACL,MAAK;AAAA,cACL,OAAO,MAAM,SAAS;AAAA,cACtB,cAAa;AAAA,cACb,UAAQ;AAAA,cACR,QAAM;AAAA,cACN,WAAU;AAAA,YAAA;AAAA,UACZ;AAAA,UACA;AAAA,YAAC,KAAK;AAAA,YAAL;AAAA,cACC,MAAK;AAAA,cACL,OAAO,qBAAqB,MAAM;AAAA,cAClC,aAAa,qBAAqB,YAAY;AAAA,cAC9C,cAAa;AAAA,cACb,YAAU;AAAA,YAAA;AAAA,UACZ;AAAA,UACA;AAAA,YAAC,KAAK;AAAA,YAAL;AAAA,cACC,MAAK;AAAA,cACL,OAAO,iBAAiB,MAAM;AAAA,cAC9B,aAAa,iBAAiB,YAAY;AAAA,cAC1C,cAAa;AAAA,cACb,YAAU;AAAA,YAAA;AAAA,UACZ;AAAA,UACA;AAAA,YAAC,KAAK;AAAA,YAAL;AAAA,cACC,MAAK;AAAA,cACL,OAAO,qBAAqB,MAAM;AAAA,cAClC,aAAa,qBAAqB,YAAY;AAAA,cAC9C,cAAa;AAAA,cACb,YAAU;AAAA,YAAA;AAAA,UAAA;AAAA,QACZ,GACF;AAAA,QAEA;AAAA,UAAC,KAAK;AAAA,UAAL;AAAA,YACC,WAAU;AAAA,YACV,MAAK;AAAA,YACL,OAAM;AAAA,YACN,WAAW;AAAA,YACX,UAAU,CAAC;AAAA,YACX,OAAO,qBAAqB,UAAU;AAAA,YAErC,+BAAqB,KAAK;AAAA,UAAA;AAAA,QAAA;AAAA,MAC7B;AAAA,IAAA;AAAA,EACF;AAEJ;"}
|