@intlayer/design-system 5.5.11 → 5.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/.vite/manifest.json +126 -570
- package/dist/components/Command/index.d.ts +5 -5
- package/dist/components/Container/index.cjs +2 -1
- package/dist/components/Container/index.cjs.map +1 -1
- package/dist/components/Container/index.d.ts +2 -3
- package/dist/components/Container/index.d.ts.map +1 -1
- package/dist/components/Container/index.mjs +3 -2
- package/dist/components/Container/index.mjs.map +1 -1
- 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/{IDE/CopyButton.cjs → CopyButton/index.cjs} +6 -5
- package/dist/components/CopyButton/index.cjs.map +1 -0
- package/dist/components/{IDE/CopyButton.d.ts → CopyButton/index.d.ts} +3 -2
- package/dist/components/CopyButton/index.d.ts.map +1 -0
- package/dist/components/{IDE/CopyButton.mjs → CopyButton/index.mjs} +6 -5
- package/dist/components/CopyButton/index.mjs.map +1 -0
- 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/Code.cjs +3 -3
- package/dist/components/IDE/Code.cjs.map +1 -1
- package/dist/components/IDE/Code.d.ts +1 -1
- package/dist/components/IDE/Code.d.ts.map +1 -1
- package/dist/components/IDE/Code.mjs +3 -3
- package/dist/components/IDE/Code.mjs.map +1 -1
- package/dist/components/IDE/CodeContext.cjs +2 -2
- package/dist/components/IDE/CodeContext.mjs +2 -2
- package/dist/components/IDE/CopyCode.cjs +28 -0
- package/dist/components/IDE/CopyCode.cjs.map +1 -0
- package/dist/components/IDE/CopyCode.d.ts +7 -0
- package/dist/components/IDE/CopyCode.d.ts.map +1 -0
- package/dist/components/IDE/CopyCode.mjs +28 -0
- package/dist/components/IDE/CopyCode.mjs.map +1 -0
- package/dist/components/IDE/MonacoCode.cjs +2 -2
- package/dist/components/IDE/MonacoCode.cjs.map +1 -1
- package/dist/components/IDE/MonacoCode.mjs +1 -1
- package/dist/components/IDE/MonacoCode.mjs.map +1 -1
- package/dist/components/IDE/code.content.cjs +39 -0
- package/dist/components/IDE/code.content.cjs.map +1 -0
- package/dist/components/{Auth/ResetPasswordForm/useResetPasswordSchema.content.d.ts → IDE/code.content.d.ts} +23 -56
- package/dist/components/IDE/code.content.d.ts.map +1 -0
- package/dist/components/IDE/code.content.mjs +40 -0
- package/dist/components/IDE/code.content.mjs.map +1 -0
- package/dist/components/IDE/copyCode.content.cjs +39 -0
- package/dist/components/IDE/copyCode.content.cjs.map +1 -0
- package/dist/components/IDE/copyCode.content.d.ts +73 -0
- package/dist/components/IDE/copyCode.content.d.ts.map +1 -0
- package/dist/components/IDE/copyCode.content.mjs +40 -0
- package/dist/components/IDE/copyCode.content.mjs.map +1 -0
- 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/Popover/index.cjs +59 -15
- package/dist/components/Popover/index.cjs.map +1 -1
- package/dist/components/Popover/index.d.ts +32 -6
- package/dist/components/Popover/index.d.ts.map +1 -1
- package/dist/components/Popover/index.mjs +60 -16
- package/dist/components/Popover/index.mjs.map +1 -1
- package/dist/components/SocialNetworks/index.cjs +1 -1
- package/dist/components/SocialNetworks/index.cjs.map +1 -1
- package/dist/components/SocialNetworks/index.mjs +1 -1
- package/dist/components/SocialNetworks/index.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 +3 -38
- package/dist/components/index.cjs.map +1 -1
- package/dist/components/index.d.ts +1 -2
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.mjs +4 -39
- 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 +18 -18
- 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.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/IDE/CopyButton.cjs.map +0 -1
- package/dist/components/IDE/CopyButton.d.ts.map +0 -1
- package/dist/components/IDE/CopyButton.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
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
4
|
+
const hooks_useAuth_useOAuth2 = require("./useOAuth2.cjs");
|
|
5
|
+
const hooks_useAuth_useSession = require("./useSession.cjs");
|
|
6
|
+
const useAuth = ({
|
|
7
|
+
session: sessionProp,
|
|
8
|
+
intlayerConfiguration
|
|
9
|
+
} = {}) => {
|
|
10
|
+
const { session, fetchSession, revalidateSession, setSession } = hooks_useAuth_useSession.useSession(
|
|
11
|
+
sessionProp,
|
|
12
|
+
intlayerConfiguration
|
|
13
|
+
);
|
|
14
|
+
const { oAuth2AccessToken } = hooks_useAuth_useOAuth2.useOAuth2(intlayerConfiguration);
|
|
15
|
+
return {
|
|
16
|
+
session,
|
|
17
|
+
fetchSession,
|
|
18
|
+
setSession,
|
|
19
|
+
revalidateSession,
|
|
20
|
+
oAuth2AccessToken,
|
|
21
|
+
isAuthenticated: Boolean(session?.user || oAuth2AccessToken)
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
exports.useAuth = useAuth;
|
|
25
|
+
//# sourceMappingURL=useAuth.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useAuth.cjs","sources":["../../../src/hooks/useAuth/useAuth.ts"],"sourcesContent":["'use client';\n\nimport { OAuth2Token } from '@intlayer/backend';\nimport type { IntlayerConfig } from '@intlayer/config/client';\nimport { Session } from './index';\nimport { useOAuth2 } from './useOAuth2';\nimport { useSession } from './useSession';\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 isAuthenticated: boolean;\n oAuth2AccessToken: OAuth2Token | null | undefined;\n};\n\nexport const useAuth = ({\n session: sessionProp,\n intlayerConfiguration,\n}: {\n session?: Session | null;\n intlayerConfiguration?: IntlayerConfig;\n} = {}): SessionContextProps => {\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 oAuth2AccessToken,\n isAuthenticated: Boolean(session?.user || oAuth2AccessToken),\n };\n};\n"],"names":["useSession","useOAuth2"],"mappings":";;;;;AAiBO,MAAM,UAAU,CAAC;AAAA,EACtB,SAAS;AAAA,EACT;AACF,IAGI,OAA4B;AAC9B,QAAM,EAAE,SAAS,cAAc,mBAAmB,WAAe,IAAAA,yBAAA;AAAA,IAC/D;AAAA,IACA;AAAA,EACF;AACA,QAAM,EAAE,kBAAA,IAAsBC,wBAAA,UAAU,qBAAqB;AAEtD,SAAA;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,iBAAiB,QAAQ,SAAS,QAAQ,iBAAiB;AAAA,EAC7D;AACF;;"}
|
|
@@ -1,27 +1,17 @@
|
|
|
1
|
-
import { OAuth2Token
|
|
1
|
+
import { OAuth2Token } from '@intlayer/backend';
|
|
2
2
|
import { IntlayerConfig } from '@intlayer/config/client';
|
|
3
|
-
|
|
4
|
-
user: UserAPI | null;
|
|
5
|
-
organization: OrganizationAPI | null;
|
|
6
|
-
project: ProjectAPI | null;
|
|
7
|
-
isOrganizationAdmin: boolean;
|
|
8
|
-
isProjectAdmin: boolean;
|
|
9
|
-
};
|
|
3
|
+
import { Session } from './index';
|
|
10
4
|
type SessionContextProps = {
|
|
11
5
|
session: Session | null | undefined;
|
|
12
6
|
setSession: (session: Session | null) => void;
|
|
13
7
|
fetchSession: () => Promise<Session | null | undefined>;
|
|
14
8
|
revalidateSession: () => Promise<Session | null | undefined>;
|
|
15
|
-
csrfToken: string | null | undefined;
|
|
16
|
-
csrfTokenFetched: boolean;
|
|
17
9
|
isAuthenticated: boolean;
|
|
18
10
|
oAuth2AccessToken: OAuth2Token | null | undefined;
|
|
19
|
-
isProjectAdmin: boolean | null | undefined;
|
|
20
|
-
isOrganizationAdmin: boolean | null | undefined;
|
|
21
11
|
};
|
|
22
12
|
export declare const useAuth: ({ session: sessionProp, intlayerConfiguration, }?: {
|
|
23
13
|
session?: Session | null;
|
|
24
14
|
intlayerConfiguration?: IntlayerConfig;
|
|
25
15
|
}) => SessionContextProps;
|
|
26
16
|
export {};
|
|
27
|
-
//# sourceMappingURL=
|
|
17
|
+
//# sourceMappingURL=useAuth.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useAuth.d.ts","sourceRoot":"","sources":["../../../src/hooks/useAuth/useAuth.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAIlC,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,eAAe,EAAE,OAAO,CAAC;IACzB,iBAAiB,EAAE,WAAW,GAAG,IAAI,GAAG,SAAS,CAAC;CACnD,CAAC;AAEF,eAAO,MAAM,OAAO,GAAI,mDAGrB;IACD,OAAO,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;IACzB,qBAAqB,CAAC,EAAE,cAAc,CAAC;CACnC,KAAG,mBAeR,CAAC"}
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { useCSRF } from "./useCSRF.mjs";
|
|
3
2
|
import { useOAuth2 } from "./useOAuth2.mjs";
|
|
4
3
|
import { useSession } from "./useSession.mjs";
|
|
5
4
|
const useAuth = ({
|
|
6
5
|
session: sessionProp,
|
|
7
6
|
intlayerConfiguration
|
|
8
7
|
} = {}) => {
|
|
9
|
-
const { csrfToken, csrfTokenFetched } = useCSRF(intlayerConfiguration);
|
|
10
8
|
const { session, fetchSession, revalidateSession, setSession } = useSession(
|
|
11
9
|
sessionProp,
|
|
12
10
|
intlayerConfiguration
|
|
@@ -17,15 +15,11 @@ const useAuth = ({
|
|
|
17
15
|
fetchSession,
|
|
18
16
|
setSession,
|
|
19
17
|
revalidateSession,
|
|
20
|
-
csrfToken,
|
|
21
|
-
csrfTokenFetched,
|
|
22
18
|
oAuth2AccessToken,
|
|
23
|
-
isAuthenticated: Boolean(session?.user || oAuth2AccessToken)
|
|
24
|
-
isProjectAdmin: session?.isProjectAdmin,
|
|
25
|
-
isOrganizationAdmin: session?.isOrganizationAdmin
|
|
19
|
+
isAuthenticated: Boolean(session?.user || oAuth2AccessToken)
|
|
26
20
|
};
|
|
27
21
|
};
|
|
28
22
|
export {
|
|
29
23
|
useAuth
|
|
30
24
|
};
|
|
31
|
-
//# sourceMappingURL=
|
|
25
|
+
//# sourceMappingURL=useAuth.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useAuth.mjs","sources":["../../../src/hooks/useAuth/useAuth.ts"],"sourcesContent":["'use client';\n\nimport { OAuth2Token } from '@intlayer/backend';\nimport type { IntlayerConfig } from '@intlayer/config/client';\nimport { Session } from './index';\nimport { useOAuth2 } from './useOAuth2';\nimport { useSession } from './useSession';\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 isAuthenticated: boolean;\n oAuth2AccessToken: OAuth2Token | null | undefined;\n};\n\nexport const useAuth = ({\n session: sessionProp,\n intlayerConfiguration,\n}: {\n session?: Session | null;\n intlayerConfiguration?: IntlayerConfig;\n} = {}): SessionContextProps => {\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 oAuth2AccessToken,\n isAuthenticated: Boolean(session?.user || oAuth2AccessToken),\n };\n};\n"],"names":[],"mappings":";;;AAiBO,MAAM,UAAU,CAAC;AAAA,EACtB,SAAS;AAAA,EACT;AACF,IAGI,OAA4B;AAC9B,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,iBAAiB,QAAQ,SAAS,QAAQ,iBAAiB;AAAA,EAC7D;AACF;"}
|
|
@@ -4,14 +4,14 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
|
4
4
|
const api = require("@intlayer/api");
|
|
5
5
|
const defaultConfiguration = require("@intlayer/config/built");
|
|
6
6
|
const editorReact = require("@intlayer/editor-react");
|
|
7
|
-
const hooks_useAsync_useAsync = require("
|
|
7
|
+
const hooks_useAsync_useAsync = require("../useAsync/useAsync.cjs");
|
|
8
8
|
const useOAuth2 = (intlayerConfiguration) => {
|
|
9
9
|
const configuration = editorReact.useConfiguration();
|
|
10
10
|
const config = intlayerConfiguration ?? configuration ?? defaultConfiguration;
|
|
11
|
-
const intlayerAPI = api.
|
|
11
|
+
const intlayerAPI = api.getAuthAPI(config);
|
|
12
12
|
const { data } = hooks_useAsync_useAsync.useAsync(
|
|
13
13
|
"getOAuth2AccessToken",
|
|
14
|
-
intlayerAPI.
|
|
14
|
+
intlayerAPI.getOAuth2AccessToken,
|
|
15
15
|
{
|
|
16
16
|
cache: true,
|
|
17
17
|
autoFetch: true,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useOAuth2.cjs","sources":["../../../src/hooks/useAuth/useOAuth2.ts"],"sourcesContent":["'use client';\n\nimport { getAuthAPI } from '@intlayer/api';\nimport defaultConfiguration from '@intlayer/config/built';\nimport type { IntlayerConfig } from '@intlayer/config/client';\nimport { useConfiguration } from '@intlayer/editor-react';\nimport { useAsync } from '../useAsync/useAsync';\n\nexport const useOAuth2 = (intlayerConfiguration?: IntlayerConfig) => {\n const configuration = useConfiguration();\n const config = intlayerConfiguration ?? configuration ?? defaultConfiguration;\n const intlayerAPI = getAuthAPI(config);\n\n const { data } = useAsync(\n 'getOAuth2AccessToken',\n intlayerAPI.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","getAuthAPI","useAsync"],"mappings":";;;;;;;AAQa,MAAA,YAAY,CAAC,0BAA2C;AACnE,QAAM,gBAAgBA,YAAAA,iBAAiB;AACjC,QAAA,SAAS,yBAAyB,iBAAiB;AACnD,QAAA,cAAcC,eAAW,MAAM;AAE/B,QAAA,EAAE,SAASC,wBAAA;AAAA,IACf;AAAA,IACA,YAAY;AAAA,IACZ;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,5 +1,5 @@
|
|
|
1
1
|
import { IntlayerConfig } from '@intlayer/config/client';
|
|
2
2
|
export declare const useOAuth2: (intlayerConfiguration?: IntlayerConfig) => {
|
|
3
|
-
oAuth2AccessToken:
|
|
3
|
+
oAuth2AccessToken: any;
|
|
4
4
|
};
|
|
5
5
|
//# sourceMappingURL=useOAuth2.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useOAuth2.d.ts","sourceRoot":"","sources":["../../../src/hooks/useAuth/useOAuth2.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAI9D,eAAO,MAAM,SAAS,GAAI,wBAAwB,cAAc;;CAoB/D,CAAC"}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
2
|
+
import { getAuthAPI } from "@intlayer/api";
|
|
3
3
|
import defaultConfiguration from "@intlayer/config/built";
|
|
4
4
|
import { useConfiguration } from "@intlayer/editor-react";
|
|
5
|
-
import { useAsync } from "
|
|
5
|
+
import { useAsync } from "../useAsync/useAsync.mjs";
|
|
6
6
|
const useOAuth2 = (intlayerConfiguration) => {
|
|
7
7
|
const configuration = useConfiguration();
|
|
8
8
|
const config = intlayerConfiguration ?? configuration ?? defaultConfiguration;
|
|
9
|
-
const intlayerAPI =
|
|
9
|
+
const intlayerAPI = getAuthAPI(config);
|
|
10
10
|
const { data } = useAsync(
|
|
11
11
|
"getOAuth2AccessToken",
|
|
12
|
-
intlayerAPI.
|
|
12
|
+
intlayerAPI.getOAuth2AccessToken,
|
|
13
13
|
{
|
|
14
14
|
cache: true,
|
|
15
15
|
autoFetch: true,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useOAuth2.mjs","sources":["../../../src/hooks/useAuth/useOAuth2.ts"],"sourcesContent":["'use client';\n\nimport { getAuthAPI } from '@intlayer/api';\nimport defaultConfiguration from '@intlayer/config/built';\nimport type { IntlayerConfig } from '@intlayer/config/client';\nimport { useConfiguration } from '@intlayer/editor-react';\nimport { useAsync } from '../useAsync/useAsync';\n\nexport const useOAuth2 = (intlayerConfiguration?: IntlayerConfig) => {\n const configuration = useConfiguration();\n const config = intlayerConfiguration ?? configuration ?? defaultConfiguration;\n const intlayerAPI = getAuthAPI(config);\n\n const { data } = useAsync(\n 'getOAuth2AccessToken',\n intlayerAPI.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":";;;;;AAQa,MAAA,YAAY,CAAC,0BAA2C;AACnE,QAAM,gBAAgB,iBAAiB;AACjC,QAAA,SAAS,yBAAyB,iBAAiB;AACnD,QAAA,cAAc,WAAW,MAAM;AAE/B,QAAA,EAAE,SAAS;AAAA,IACf;AAAA,IACA,YAAY;AAAA,IACZ;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;"}
|
|
@@ -4,13 +4,12 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
|
4
4
|
const api = require("@intlayer/api");
|
|
5
5
|
const defaultConfiguration = require("@intlayer/config/built");
|
|
6
6
|
const editorReact = require("@intlayer/editor-react");
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
require("../../../hooks/useAsync/useAsyncStateStore.cjs");
|
|
7
|
+
const hooks_useAsync_useAsync = require("../useAsync/useAsync.cjs");
|
|
8
|
+
require("../useAsync/useAsyncStateStore.cjs");
|
|
10
9
|
const useSession = (sessionProp, intlayerConfiguration) => {
|
|
11
10
|
const configuration = editorReact.useConfiguration();
|
|
12
11
|
const config = intlayerConfiguration ?? configuration ?? defaultConfiguration;
|
|
13
|
-
const intlayerAPI = api.
|
|
12
|
+
const intlayerAPI = api.getAuthAPI(config);
|
|
14
13
|
const {
|
|
15
14
|
getSession,
|
|
16
15
|
revalidate,
|
|
@@ -20,23 +19,8 @@ const useSession = (sessionProp, intlayerConfiguration) => {
|
|
|
20
19
|
} = hooks_useAsync_useAsync.useAsync(
|
|
21
20
|
"getSession",
|
|
22
21
|
async () => {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
if (result.data) {
|
|
26
|
-
const { user, organization, project } = result.data;
|
|
27
|
-
const formattedSession = {
|
|
28
|
-
user,
|
|
29
|
-
organization,
|
|
30
|
-
isOrganizationAdmin: (user && (organization?.adminsIds ?? []).includes(user._id)) ?? false,
|
|
31
|
-
project,
|
|
32
|
-
isProjectAdmin: (user && (project?.adminsIds ?? []).includes(user._id)) ?? false
|
|
33
|
-
};
|
|
34
|
-
return formattedSession;
|
|
35
|
-
}
|
|
36
|
-
} catch (_error) {
|
|
37
|
-
console.error(_error);
|
|
38
|
-
}
|
|
39
|
-
return null;
|
|
22
|
+
const result = await intlayerAPI.getSession();
|
|
23
|
+
return result.data;
|
|
40
24
|
},
|
|
41
25
|
{
|
|
42
26
|
cache: true,
|
|
@@ -51,10 +35,7 @@ const useSession = (sessionProp, intlayerConfiguration) => {
|
|
|
51
35
|
]
|
|
52
36
|
}
|
|
53
37
|
);
|
|
54
|
-
const session =
|
|
55
|
-
() => data ?? (isFetched ? null : void 0),
|
|
56
|
-
[data, isFetched]
|
|
57
|
-
);
|
|
38
|
+
const session = data ?? (isFetched ? null : void 0);
|
|
58
39
|
return {
|
|
59
40
|
session,
|
|
60
41
|
fetchSession: getSession,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useSession.cjs","sources":["../../../src/hooks/useAuth/useSession.ts"],"sourcesContent":["'use client';\n\nimport { getAuthAPI } from '@intlayer/api';\nimport type { Session } from '@intlayer/backend';\nimport defaultConfiguration from '@intlayer/config/built';\nimport type { IntlayerConfig } from '@intlayer/config/client';\nimport { useConfiguration } from '@intlayer/editor-react';\nimport { useAsync } from '../useAsync';\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 = getAuthAPI(config);\n\n const {\n getSession,\n revalidate,\n data,\n setData: setSession,\n isFetched,\n } = useAsync(\n 'getSession',\n async () => {\n const result = await intlayerAPI.getSession();\n return result.data as unknown as Session;\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 = data ?? (isFetched ? null : undefined);\n\n return {\n session,\n fetchSession: getSession,\n revalidateSession: revalidate,\n setSession,\n };\n};\n"],"names":["useConfiguration","getAuthAPI","useAsync"],"mappings":";;;;;;;;AASa,MAAA,aAAa,CACxB,aACA,0BACG;AACH,QAAM,gBAAgBA,YAAAA,iBAAiB;AACjC,QAAA,SAAS,yBAAyB,iBAAiB;AACnD,QAAA,cAAcC,eAAW,MAAM;AAE/B,QAAA;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA,SAAS;AAAA,IACT;AAAA,EAAA,IACEC,wBAAA;AAAA,IACF;AAAA,IACA,YAAY;AACJ,YAAA,SAAS,MAAM,YAAY,WAAW;AAC5C,aAAO,OAAO;AAAA,IAChB;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;AAEM,QAAA,UAAU,SAAS,YAAY,OAAO;AAErC,SAAA;AAAA,IACL;AAAA,IACA,cAAc;AAAA,IACd,mBAAmB;AAAA,IACnB;AAAA,EACF;AACF;;"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import { Session } from '@intlayer/backend';
|
|
1
2
|
import { IntlayerConfig } from '@intlayer/config/client';
|
|
2
|
-
import { Session } from './index';
|
|
3
3
|
export declare const useSession: (sessionProp?: Session | null, intlayerConfiguration?: IntlayerConfig) => {
|
|
4
4
|
session: Session | null | undefined;
|
|
5
|
-
fetchSession: () => Promise<Session
|
|
6
|
-
revalidateSession: () => Promise<Session
|
|
5
|
+
fetchSession: () => Promise<Session>;
|
|
6
|
+
revalidateSession: () => Promise<Session>;
|
|
7
7
|
setSession: (data: Session | null) => void;
|
|
8
8
|
};
|
|
9
9
|
//# sourceMappingURL=useSession.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useSession.d.ts","sourceRoot":"","sources":["../../../src/hooks/useAuth/useSession.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAEjD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAI9D,eAAO,MAAM,UAAU,GACrB,cAAc,OAAO,GAAG,IAAI,EAC5B,wBAAwB,cAAc;;;;;CAwCvC,CAAC"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { getAuthAPI } from "@intlayer/api";
|
|
3
|
+
import defaultConfiguration from "@intlayer/config/built";
|
|
4
|
+
import { useConfiguration } from "@intlayer/editor-react";
|
|
5
|
+
import { useAsync } from "../useAsync/useAsync.mjs";
|
|
6
|
+
import "../useAsync/useAsyncStateStore.mjs";
|
|
7
|
+
const useSession = (sessionProp, intlayerConfiguration) => {
|
|
8
|
+
const configuration = useConfiguration();
|
|
9
|
+
const config = intlayerConfiguration ?? configuration ?? defaultConfiguration;
|
|
10
|
+
const intlayerAPI = getAuthAPI(config);
|
|
11
|
+
const {
|
|
12
|
+
getSession,
|
|
13
|
+
revalidate,
|
|
14
|
+
data,
|
|
15
|
+
setData: setSession,
|
|
16
|
+
isFetched
|
|
17
|
+
} = useAsync(
|
|
18
|
+
"getSession",
|
|
19
|
+
async () => {
|
|
20
|
+
const result = await intlayerAPI.getSession();
|
|
21
|
+
return result.data;
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
cache: true,
|
|
25
|
+
store: true,
|
|
26
|
+
autoFetch: true,
|
|
27
|
+
enable: !sessionProp,
|
|
28
|
+
invalidateQueries: [
|
|
29
|
+
"getOrganizations",
|
|
30
|
+
"getProjects",
|
|
31
|
+
"getUsers",
|
|
32
|
+
"getDictionaries"
|
|
33
|
+
]
|
|
34
|
+
}
|
|
35
|
+
);
|
|
36
|
+
const session = data ?? (isFetched ? null : void 0);
|
|
37
|
+
return {
|
|
38
|
+
session,
|
|
39
|
+
fetchSession: getSession,
|
|
40
|
+
revalidateSession: revalidate,
|
|
41
|
+
setSession
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
export {
|
|
45
|
+
useSession
|
|
46
|
+
};
|
|
47
|
+
//# sourceMappingURL=useSession.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useSession.mjs","sources":["../../../src/hooks/useAuth/useSession.ts"],"sourcesContent":["'use client';\n\nimport { getAuthAPI } from '@intlayer/api';\nimport type { Session } from '@intlayer/backend';\nimport defaultConfiguration from '@intlayer/config/built';\nimport type { IntlayerConfig } from '@intlayer/config/client';\nimport { useConfiguration } from '@intlayer/editor-react';\nimport { useAsync } from '../useAsync';\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 = getAuthAPI(config);\n\n const {\n getSession,\n revalidate,\n data,\n setData: setSession,\n isFetched,\n } = useAsync(\n 'getSession',\n async () => {\n const result = await intlayerAPI.getSession();\n return result.data as unknown as Session;\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 = data ?? (isFetched ? null : undefined);\n\n return {\n session,\n fetchSession: getSession,\n revalidateSession: revalidate,\n setSession,\n };\n};\n"],"names":[],"mappings":";;;;;;AASa,MAAA,aAAa,CACxB,aACA,0BACG;AACH,QAAM,gBAAgB,iBAAiB;AACjC,QAAA,SAAS,yBAAyB,iBAAiB;AACnD,QAAA,cAAc,WAAW,MAAM;AAE/B,QAAA;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA,SAAS;AAAA,IACT;AAAA,EAAA,IACE;AAAA,IACF;AAAA,IACA,YAAY;AACJ,YAAA,SAAS,MAAM,YAAY,WAAW;AAC5C,aAAO,OAAO;AAAA,IAChB;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;AAEM,QAAA,UAAU,SAAS,YAAY,OAAO;AAErC,SAAA;AAAA,IACL;AAAA,IACA,cAAc;AAAA,IACd,mBAAmB;AAAA,IACnB;AAAA,EACF;AACF;"}
|
|
@@ -2,11 +2,13 @@
|
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const api = require("@intlayer/api");
|
|
4
4
|
const editorReact = require("@intlayer/editor-react");
|
|
5
|
-
const
|
|
5
|
+
const hooks_useAuth_useAuth = require("./useAuth/useAuth.cjs");
|
|
6
|
+
require("@intlayer/config/built");
|
|
7
|
+
require("react");
|
|
8
|
+
require("./useAsync/useAsyncStateStore.cjs");
|
|
6
9
|
const useIntlayerAuth = (props) => {
|
|
7
10
|
const configuration = editorReact.useConfiguration();
|
|
8
|
-
const {
|
|
9
|
-
const body = csrfToken ? { csrf_token: csrfToken } : void 0;
|
|
11
|
+
const { oAuth2AccessToken } = hooks_useAuth_useAuth.useAuth();
|
|
10
12
|
return api.getIntlayerAPI(
|
|
11
13
|
{
|
|
12
14
|
...oAuth2AccessToken && {
|
|
@@ -14,7 +16,6 @@ const useIntlayerAuth = (props) => {
|
|
|
14
16
|
Authorization: `Bearer ${oAuth2AccessToken}`
|
|
15
17
|
}
|
|
16
18
|
},
|
|
17
|
-
body,
|
|
18
19
|
...props?.options ?? {}
|
|
19
20
|
},
|
|
20
21
|
props?.intlayerConfiguration ?? configuration
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useIntlayerAPI.cjs","sources":["../../src/hooks/useIntlayerAPI.ts"],"sourcesContent":["import { getIntlayerAPI, type FetcherOptions } from '@intlayer/api';\nimport { type IntlayerConfig } from '@intlayer/config/client';\nimport { useConfiguration } from '@intlayer/editor-react';\nimport { useAuth } from '
|
|
1
|
+
{"version":3,"file":"useIntlayerAPI.cjs","sources":["../../src/hooks/useIntlayerAPI.ts"],"sourcesContent":["import { getIntlayerAPI, type FetcherOptions } from '@intlayer/api';\nimport { type IntlayerConfig } from '@intlayer/config/client';\nimport { useConfiguration } from '@intlayer/editor-react';\nimport { useAuth } from './useAuth';\n\ntype UseIntlayerAuthProps = {\n options?: FetcherOptions;\n intlayerConfiguration?: IntlayerConfig;\n};\n\nexport const useIntlayerAuth = (props?: UseIntlayerAuthProps) => {\n const configuration = useConfiguration();\n const { oAuth2AccessToken } = useAuth();\n\n return getIntlayerAPI(\n {\n ...(oAuth2AccessToken && {\n headers: {\n Authorization: `Bearer ${oAuth2AccessToken}`,\n },\n }),\n ...(props?.options ?? {}),\n },\n props?.intlayerConfiguration ?? configuration\n );\n};\n"],"names":["useConfiguration","useAuth","getIntlayerAPI"],"mappings":";;;;;;;;AAUa,MAAA,kBAAkB,CAAC,UAAiC;AAC/D,QAAM,gBAAgBA,YAAAA,iBAAiB;AACjC,QAAA,EAAE,kBAAkB,IAAIC,8BAAQ;AAE/B,SAAAC,IAAA;AAAA,IACL;AAAA,MACE,GAAI,qBAAqB;AAAA,QACvB,SAAS;AAAA,UACP,eAAe,UAAU,iBAAiB;AAAA,QAAA;AAAA,MAE9C;AAAA,MACA,GAAI,OAAO,WAAW,CAAA;AAAA,IACxB;AAAA,IACA,OAAO,yBAAyB;AAAA,EAClC;AACF;;"}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { getIntlayerAPI } from "@intlayer/api";
|
|
2
2
|
import { useConfiguration } from "@intlayer/editor-react";
|
|
3
|
-
import { useAuth } from "
|
|
3
|
+
import { useAuth } from "./useAuth/useAuth.mjs";
|
|
4
|
+
import "@intlayer/config/built";
|
|
5
|
+
import "react";
|
|
6
|
+
import "./useAsync/useAsyncStateStore.mjs";
|
|
4
7
|
const useIntlayerAuth = (props) => {
|
|
5
8
|
const configuration = useConfiguration();
|
|
6
|
-
const {
|
|
7
|
-
const body = csrfToken ? { csrf_token: csrfToken } : void 0;
|
|
9
|
+
const { oAuth2AccessToken } = useAuth();
|
|
8
10
|
return getIntlayerAPI(
|
|
9
11
|
{
|
|
10
12
|
...oAuth2AccessToken && {
|
|
@@ -12,7 +14,6 @@ const useIntlayerAuth = (props) => {
|
|
|
12
14
|
Authorization: `Bearer ${oAuth2AccessToken}`
|
|
13
15
|
}
|
|
14
16
|
},
|
|
15
|
-
body,
|
|
16
17
|
...props?.options ?? {}
|
|
17
18
|
},
|
|
18
19
|
props?.intlayerConfiguration ?? configuration
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useIntlayerAPI.mjs","sources":["../../src/hooks/useIntlayerAPI.ts"],"sourcesContent":["import { getIntlayerAPI, type FetcherOptions } from '@intlayer/api';\nimport { type IntlayerConfig } from '@intlayer/config/client';\nimport { useConfiguration } from '@intlayer/editor-react';\nimport { useAuth } from '
|
|
1
|
+
{"version":3,"file":"useIntlayerAPI.mjs","sources":["../../src/hooks/useIntlayerAPI.ts"],"sourcesContent":["import { getIntlayerAPI, type FetcherOptions } from '@intlayer/api';\nimport { type IntlayerConfig } from '@intlayer/config/client';\nimport { useConfiguration } from '@intlayer/editor-react';\nimport { useAuth } from './useAuth';\n\ntype UseIntlayerAuthProps = {\n options?: FetcherOptions;\n intlayerConfiguration?: IntlayerConfig;\n};\n\nexport const useIntlayerAuth = (props?: UseIntlayerAuthProps) => {\n const configuration = useConfiguration();\n const { oAuth2AccessToken } = useAuth();\n\n return getIntlayerAPI(\n {\n ...(oAuth2AccessToken && {\n headers: {\n Authorization: `Bearer ${oAuth2AccessToken}`,\n },\n }),\n ...(props?.options ?? {}),\n },\n props?.intlayerConfiguration ?? configuration\n );\n};\n"],"names":[],"mappings":";;;;;;AAUa,MAAA,kBAAkB,CAAC,UAAiC;AAC/D,QAAM,gBAAgB,iBAAiB;AACjC,QAAA,EAAE,kBAAkB,IAAI,QAAQ;AAE/B,SAAA;AAAA,IACL;AAAA,MACE,GAAI,qBAAqB;AAAA,QACvB,SAAS;AAAA,UACP,eAAe,UAAU,iBAAiB;AAAA,QAAA;AAAA,MAE9C;AAAA,MACA,GAAI,OAAO,WAAW,CAAA;AAAA,IACxB;AAAA,IACA,OAAO,yBAAyB;AAAA,EAClC;AACF;"}
|
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
"use strict";
|
|
3
3
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
4
|
-
const hooks_intlayerAPIHooks = require("
|
|
4
|
+
const hooks_intlayerAPIHooks = require("../intlayerAPIHooks.cjs");
|
|
5
5
|
require("react");
|
|
6
|
-
require("
|
|
6
|
+
require("../useAsync/useAsyncStateStore.cjs");
|
|
7
|
+
const hooks_useAuth_useAuth = require("../useAuth/useAuth.cjs");
|
|
8
|
+
require("@intlayer/api");
|
|
9
|
+
require("@intlayer/config/built");
|
|
7
10
|
require("@intlayer/editor-react");
|
|
8
11
|
require("deepmerge");
|
|
9
|
-
require("
|
|
10
|
-
const components_Auth_useAuth_index = require("../useAuth/index.cjs");
|
|
12
|
+
require("../useScrollBlockage/useScrollBlockageStore.cjs");
|
|
11
13
|
const useUser = () => {
|
|
12
|
-
const { session, revalidateSession, setSession } =
|
|
14
|
+
const { session, revalidateSession, setSession } = hooks_useAuth_useAuth.useAuth();
|
|
13
15
|
const { logout } = hooks_intlayerAPIHooks.useLogout();
|
|
14
16
|
const status = session?.user ? "authenticated" : "unauthenticated";
|
|
15
17
|
const isAuthenticated = status === "authenticated";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../../src/hooks/useUser/index.ts"],"sourcesContent":["'use client';\n\nimport { useLogout } from '..';\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,sBAAAA,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;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/useUser/index.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,OAAO;;;;;;CAuBnB,CAAC"}
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { useLogout } from "
|
|
2
|
+
import { useLogout } from "../intlayerAPIHooks.mjs";
|
|
3
3
|
import "react";
|
|
4
|
-
import "
|
|
4
|
+
import "../useAsync/useAsyncStateStore.mjs";
|
|
5
|
+
import { useAuth } from "../useAuth/useAuth.mjs";
|
|
6
|
+
import "@intlayer/api";
|
|
7
|
+
import "@intlayer/config/built";
|
|
5
8
|
import "@intlayer/editor-react";
|
|
6
9
|
import "deepmerge";
|
|
7
|
-
import "
|
|
8
|
-
import { useAuth } from "../useAuth/index.mjs";
|
|
10
|
+
import "../useScrollBlockage/useScrollBlockageStore.mjs";
|
|
9
11
|
const useUser = () => {
|
|
10
12
|
const { session, revalidateSession, setSession } = useAuth();
|
|
11
13
|
const { logout } = useLogout();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../../src/hooks/useUser/index.ts"],"sourcesContent":["'use client';\n\nimport { useLogout } from '..';\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;"}
|
|
@@ -12,7 +12,7 @@ const uuid = (version2) => {
|
|
|
12
12
|
return /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$/;
|
|
13
13
|
return new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${version2}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`);
|
|
14
14
|
};
|
|
15
|
-
const email
|
|
15
|
+
const email = /^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/;
|
|
16
16
|
const _emoji$1 = `^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`;
|
|
17
17
|
function emoji() {
|
|
18
18
|
return new RegExp(_emoji$1, "u");
|
|
@@ -443,7 +443,7 @@ const $ZodUUID = /* @__PURE__ */ $constructor("$ZodUUID", (inst, def) => {
|
|
|
443
443
|
$ZodStringFormat.init(inst, def);
|
|
444
444
|
});
|
|
445
445
|
const $ZodEmail = /* @__PURE__ */ $constructor("$ZodEmail", (inst, def) => {
|
|
446
|
-
def.pattern ?? (def.pattern = email
|
|
446
|
+
def.pattern ?? (def.pattern = email);
|
|
447
447
|
$ZodStringFormat.init(inst, def);
|
|
448
448
|
});
|
|
449
449
|
const $ZodURL = /* @__PURE__ */ $constructor("$ZodURL", (inst, def) => {
|
|
@@ -1880,9 +1880,6 @@ const ZodEmail = /* @__PURE__ */ $constructor("ZodEmail", (inst, def) => {
|
|
|
1880
1880
|
$ZodEmail.init(inst, def);
|
|
1881
1881
|
ZodStringFormat.init(inst, def);
|
|
1882
1882
|
});
|
|
1883
|
-
function email(params) {
|
|
1884
|
-
return _email(ZodEmail, params);
|
|
1885
|
-
}
|
|
1886
1883
|
const ZodGUID = /* @__PURE__ */ $constructor("ZodGUID", (inst, def) => {
|
|
1887
1884
|
$ZodGUID.init(inst, def);
|
|
1888
1885
|
ZodStringFormat.init(inst, def);
|
|
@@ -2252,8 +2249,7 @@ function superRefine(fn, params) {
|
|
|
2252
2249
|
}
|
|
2253
2250
|
export {
|
|
2254
2251
|
array as a,
|
|
2255
|
-
email as e,
|
|
2256
2252
|
object as o,
|
|
2257
2253
|
string as s
|
|
2258
2254
|
};
|
|
2259
|
-
//# sourceMappingURL=schemas-
|
|
2255
|
+
//# sourceMappingURL=schemas-BIuxHDyZ.js.map
|