@intlayer/design-system 3.1.0 → 3.2.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 +481 -455
- package/dist/TabSelector-BmkzVPXl.js +660 -0
- package/dist/TabSelector-BmkzVPXl.js.map +1 -0
- package/dist/TabSelector-o_NRBvPQ.cjs +659 -0
- package/dist/TabSelector-o_NRBvPQ.cjs.map +1 -0
- package/dist/components/Auth/AuthModal/index.cjs +17 -62
- package/dist/components/Auth/AuthModal/index.cjs.map +1 -1
- package/dist/components/Auth/AuthModal/index.d.ts.map +1 -1
- package/dist/components/Auth/AuthModal/index.mjs +17 -62
- package/dist/components/Auth/AuthModal/index.mjs.map +1 -1
- package/dist/components/Auth/AuthProvider/index.cjs.map +1 -1
- package/dist/components/Auth/AuthProvider/index.d.ts +3 -3
- package/dist/components/Auth/AuthProvider/index.d.ts.map +1 -1
- package/dist/components/Auth/AuthProvider/index.mjs.map +1 -1
- package/dist/components/Auth/AuthProvider/useSession.cjs +7 -8
- package/dist/components/Auth/AuthProvider/useSession.cjs.map +1 -1
- package/dist/components/Auth/AuthProvider/useSession.d.ts.map +1 -1
- package/dist/components/Auth/AuthProvider/useSession.mjs +7 -8
- package/dist/components/Auth/AuthProvider/useSession.mjs.map +1 -1
- package/dist/components/Auth/AuthenticationBarrier/AuthenticationBarrierClient.cjs +2 -2
- package/dist/components/Auth/AuthenticationBarrier/AuthenticationBarrierClient.cjs.map +1 -1
- package/dist/components/Auth/AuthenticationBarrier/AuthenticationBarrierClient.mjs +1 -1
- package/dist/components/Auth/AuthenticationBarrier/AuthenticationBarrierClient.mjs.map +1 -1
- package/dist/components/Auth/AuthenticationBarrier/AuthenticationBarrierServer.cjs.map +1 -1
- package/dist/components/Auth/AuthenticationBarrier/AuthenticationBarrierServer.d.ts +2 -2
- package/dist/components/Auth/AuthenticationBarrier/AuthenticationBarrierServer.d.ts.map +1 -1
- package/dist/components/Auth/AuthenticationBarrier/AuthenticationBarrierServer.mjs.map +1 -1
- package/dist/components/Auth/AuthenticationBarrier/accessValidation.cjs.map +1 -1
- package/dist/components/Auth/AuthenticationBarrier/accessValidation.d.ts +1 -1
- package/dist/components/Auth/AuthenticationBarrier/accessValidation.d.ts.map +1 -1
- package/dist/components/Auth/AuthenticationBarrier/accessValidation.mjs.map +1 -1
- package/dist/components/Auth/AuthenticationBarrier/index.d.ts +3 -3
- package/dist/components/Auth/AuthenticationBarrier/index.d.ts.map +1 -1
- package/dist/components/Auth/ChangePasswordForm/ChangePasswordForm.cjs +1 -0
- package/dist/components/Auth/ChangePasswordForm/ChangePasswordForm.cjs.map +1 -1
- package/dist/components/Auth/ChangePasswordForm/ChangePasswordForm.d.ts +1 -1
- package/dist/components/Auth/ChangePasswordForm/ChangePasswordForm.d.ts.map +1 -1
- package/dist/components/Auth/ChangePasswordForm/ChangePasswordForm.mjs +1 -0
- package/dist/components/Auth/ChangePasswordForm/ChangePasswordForm.mjs.map +1 -1
- package/dist/components/Auth/ChangePasswordForm/index.content.d.ts +10 -10
- package/dist/components/Auth/ExternalsLoginButtons/ExternalsLoginButtons.cjs +3 -2
- package/dist/components/Auth/ExternalsLoginButtons/ExternalsLoginButtons.cjs.map +1 -1
- package/dist/components/Auth/ExternalsLoginButtons/ExternalsLoginButtons.d.ts.map +1 -1
- package/dist/components/Auth/ExternalsLoginButtons/ExternalsLoginButtons.mjs +3 -2
- package/dist/components/Auth/ExternalsLoginButtons/ExternalsLoginButtons.mjs.map +1 -1
- package/dist/components/Auth/ExternalsLoginButtons/externalsLoginButtons.content.d.ts +5 -5
- package/dist/components/Auth/ResetPasswordForm/ResetPasswordForm.cjs +1 -0
- package/dist/components/Auth/ResetPasswordForm/ResetPasswordForm.cjs.map +1 -1
- package/dist/components/Auth/ResetPasswordForm/ResetPasswordForm.d.ts +1 -1
- package/dist/components/Auth/ResetPasswordForm/ResetPasswordForm.d.ts.map +1 -1
- package/dist/components/Auth/ResetPasswordForm/ResetPasswordForm.mjs +1 -0
- package/dist/components/Auth/ResetPasswordForm/ResetPasswordForm.mjs.map +1 -1
- package/dist/components/Auth/ResetPasswordForm/index.content.d.ts +7 -7
- package/dist/components/Auth/SignInForm/SignInForm.cjs +4 -3
- package/dist/components/Auth/SignInForm/SignInForm.cjs.map +1 -1
- package/dist/components/Auth/SignInForm/SignInForm.d.ts +1 -1
- package/dist/components/Auth/SignInForm/SignInForm.d.ts.map +1 -1
- package/dist/components/Auth/SignInForm/SignInForm.mjs +4 -3
- package/dist/components/Auth/SignInForm/SignInForm.mjs.map +1 -1
- package/dist/components/Auth/SignInForm/index.content.d.ts +13 -13
- package/dist/components/Auth/SignUpForm/SignUpForm.cjs +3 -3
- package/dist/components/Auth/SignUpForm/SignUpForm.cjs.map +1 -1
- package/dist/components/Auth/SignUpForm/SignUpForm.d.ts +1 -1
- package/dist/components/Auth/SignUpForm/SignUpForm.d.ts.map +1 -1
- package/dist/components/Auth/SignUpForm/SignUpForm.mjs +3 -3
- package/dist/components/Auth/SignUpForm/SignUpForm.mjs.map +1 -1
- package/dist/components/Auth/SignUpForm/index.content.d.ts +11 -11
- package/dist/components/Auth/index.cjs +2 -4
- package/dist/components/Auth/index.cjs.map +1 -1
- package/dist/components/Auth/index.d.ts +1 -1
- package/dist/components/Auth/index.d.ts.map +1 -1
- package/dist/components/Auth/index.mjs +1 -3
- package/dist/components/Auth/useAuth/index.cjs +39 -0
- package/dist/components/Auth/useAuth/index.cjs.map +1 -0
- package/dist/components/Auth/useAuth/index.d.ts +24 -0
- package/dist/components/Auth/useAuth/index.d.ts.map +1 -0
- package/dist/components/Auth/useAuth/index.mjs +39 -0
- package/dist/components/Auth/useAuth/index.mjs.map +1 -0
- package/dist/components/Auth/useAuth/useCSRF.cjs +22 -0
- package/dist/components/Auth/useAuth/useCSRF.cjs.map +1 -0
- package/dist/components/Auth/useAuth/useCSRF.d.ts +5 -0
- package/dist/components/Auth/useAuth/useCSRF.d.ts.map +1 -0
- package/dist/components/Auth/useAuth/useCSRF.mjs +22 -0
- package/dist/components/Auth/useAuth/useCSRF.mjs.map +1 -0
- package/dist/components/Auth/useAuth/useOAuth2.cjs +26 -0
- package/dist/components/Auth/useAuth/useOAuth2.cjs.map +1 -0
- package/dist/components/Auth/useAuth/useOAuth2.d.ts +4 -0
- package/dist/components/Auth/useAuth/useOAuth2.d.ts.map +1 -0
- package/dist/components/Auth/useAuth/useOAuth2.mjs +26 -0
- package/dist/components/Auth/useAuth/useOAuth2.mjs.map +1 -0
- package/dist/components/Auth/useAuth/useSession.cjs +60 -0
- package/dist/components/Auth/useAuth/useSession.cjs.map +1 -0
- package/dist/components/Auth/useAuth/useSession.d.ts +8 -0
- package/dist/components/Auth/useAuth/useSession.d.ts.map +1 -0
- package/dist/components/Auth/useAuth/useSession.mjs +60 -0
- package/dist/components/Auth/useAuth/useSession.mjs.map +1 -0
- package/dist/components/Auth/useUser/index.cjs +3 -3
- package/dist/components/Auth/useUser/index.cjs.map +1 -1
- package/dist/components/Auth/useUser/index.d.ts.map +1 -1
- package/dist/components/Auth/useUser/index.mjs +3 -3
- package/dist/components/Auth/useUser/index.mjs.map +1 -1
- package/dist/components/Badge/index.d.ts +1 -1
- package/dist/components/Button/Button.cjs.map +1 -1
- package/dist/components/Button/Button.d.ts +1 -2
- package/dist/components/Button/Button.d.ts.map +1 -1
- package/dist/components/Button/Button.mjs.map +1 -1
- package/dist/components/Command/index.d.ts +2 -2
- package/dist/components/Command/index.d.ts.map +1 -1
- package/dist/components/Container/index.cjs +1 -0
- package/dist/components/Container/index.cjs.map +1 -1
- package/dist/components/Container/index.d.ts +8 -8
- package/dist/components/Container/index.d.ts.map +1 -1
- package/dist/components/Container/index.mjs +1 -0
- package/dist/components/Container/index.mjs.map +1 -1
- package/dist/components/DictionaryEditor/ValidDictionaryChangeButtons.cjs +4 -17
- package/dist/components/DictionaryEditor/ValidDictionaryChangeButtons.cjs.map +1 -1
- package/dist/components/DictionaryEditor/ValidDictionaryChangeButtons.d.ts.map +1 -1
- package/dist/components/DictionaryEditor/ValidDictionaryChangeButtons.mjs +4 -17
- package/dist/components/DictionaryEditor/ValidDictionaryChangeButtons.mjs.map +1 -1
- package/dist/components/DictionaryEditor/validDictionaryChangeButtons.content.cjs +0 -21
- package/dist/components/DictionaryEditor/validDictionaryChangeButtons.content.cjs.map +1 -1
- package/dist/components/DictionaryEditor/validDictionaryChangeButtons.content.d.ts +0 -9
- package/dist/components/DictionaryEditor/validDictionaryChangeButtons.content.d.ts.map +1 -1
- package/dist/components/DictionaryEditor/validDictionaryChangeButtons.content.mjs +0 -21
- package/dist/components/DictionaryEditor/validDictionaryChangeButtons.content.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionariesSelector/DictionariesSelector.cjs +3 -2
- package/dist/components/DictionaryFieldEditor/DictionariesSelector/DictionariesSelector.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionariesSelector/DictionariesSelector.mjs +3 -2
- package/dist/components/DictionaryFieldEditor/DictionariesSelector/DictionariesSelector.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.cjs +7 -24
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.mjs +6 -23
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/dictionaryCreationForm.content.cjs +0 -42
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/dictionaryCreationForm.content.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/dictionaryCreationForm.content.d.ts +0 -18
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/dictionaryCreationForm.content.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/dictionaryCreationForm.content.mjs +0 -42
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/dictionaryCreationForm.content.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/dictionaryFormSchema.d.ts +2 -2
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.cjs +4 -36
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.mjs +3 -35
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsSchema.d.ts +4 -4
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/dictionaryDetails.content.cjs +0 -47
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/dictionaryDetails.content.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/dictionaryDetails.content.d.ts +0 -19
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/dictionaryDetails.content.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/dictionaryDetails.content.mjs +0 -47
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/dictionaryDetails.content.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.cjs +3 -2
- package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.mjs +3 -2
- package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/EditorView/EditorView.cjs +3 -2
- package/dist/components/DictionaryFieldEditor/EditorView/EditorView.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/EditorView/EditorView.mjs +3 -2
- package/dist/components/DictionaryFieldEditor/EditorView/EditorView.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/EditorView/TextEditor.cjs +2 -2
- package/dist/components/DictionaryFieldEditor/EditorView/TextEditor.mjs +2 -2
- package/dist/components/DictionaryFieldEditor/NavigationView/NavigationViewNode.cjs +2 -2
- package/dist/components/DictionaryFieldEditor/NavigationView/NavigationViewNode.mjs +2 -2
- package/dist/components/DictionaryFieldEditor/NodeTypeSelector.cjs +2 -2
- package/dist/components/DictionaryFieldEditor/NodeTypeSelector.mjs +2 -2
- package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.cjs +4 -17
- package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.mjs +4 -17
- package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/SaveForm/saveForm.content.cjs +0 -21
- package/dist/components/DictionaryFieldEditor/SaveForm/saveForm.content.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/SaveForm/saveForm.content.d.ts +0 -9
- package/dist/components/DictionaryFieldEditor/SaveForm/saveForm.content.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/SaveForm/saveForm.content.mjs +0 -21
- package/dist/components/DictionaryFieldEditor/SaveForm/saveForm.content.mjs.map +1 -1
- package/dist/components/Form/FormBase.cjs +4 -1
- package/dist/components/Form/FormBase.cjs.map +1 -1
- package/dist/components/Form/FormBase.d.ts +1 -1
- package/dist/components/Form/FormBase.d.ts.map +1 -1
- package/dist/components/Form/FormBase.mjs +4 -1
- package/dist/components/Form/FormBase.mjs.map +1 -1
- package/dist/components/Input/Checkbox.d.ts +1 -1
- package/dist/components/Input/Input.cjs +8 -2
- package/dist/components/Input/Input.cjs.map +1 -1
- package/dist/components/Input/Input.d.ts +1 -0
- package/dist/components/Input/Input.d.ts.map +1 -1
- package/dist/components/Input/Input.mjs +8 -2
- package/dist/components/Input/Input.mjs.map +1 -1
- package/dist/components/Link/Link.d.ts +1 -1
- package/dist/components/Modal/Modal.cjs +3 -1
- package/dist/components/Modal/Modal.cjs.map +1 -1
- package/dist/components/Modal/Modal.mjs +3 -1
- package/dist/components/Modal/Modal.mjs.map +1 -1
- package/dist/components/Navbar/MobileNavbar.cjs +3 -1
- package/dist/components/Navbar/MobileNavbar.cjs.map +1 -1
- package/dist/components/Navbar/MobileNavbar.mjs +3 -1
- package/dist/components/Navbar/MobileNavbar.mjs.map +1 -1
- package/dist/components/Navbar/index.cjs +3 -1
- package/dist/components/Navbar/index.cjs.map +1 -1
- package/dist/components/Navbar/index.mjs +3 -1
- package/dist/components/Navbar/index.mjs.map +1 -1
- package/dist/components/Select/Multiselect.d.ts +1 -1
- package/dist/components/Select/Multiselect.d.ts.map +1 -1
- package/dist/components/SwitchSelector/index.cjs +3 -1
- package/dist/components/SwitchSelector/index.cjs.map +1 -1
- package/dist/components/SwitchSelector/index.d.ts +1 -1
- package/dist/components/SwitchSelector/index.mjs +3 -1
- package/dist/components/SwitchSelector/index.mjs.map +1 -1
- package/dist/components/TabSelector/TabSelector.cjs +13 -10
- package/dist/components/TabSelector/TabSelector.cjs.map +1 -1
- package/dist/components/TabSelector/TabSelector.d.ts +1 -1
- package/dist/components/TabSelector/TabSelector.d.ts.map +1 -1
- package/dist/components/TabSelector/TabSelector.mjs +13 -10
- package/dist/components/TabSelector/TabSelector.mjs.map +1 -1
- package/dist/components/Tag/index.cjs +79 -0
- package/dist/components/Tag/index.cjs.map +1 -0
- package/dist/components/Tag/index.d.ts +12 -0
- package/dist/components/Tag/index.d.ts.map +1 -0
- package/dist/components/Tag/index.mjs +79 -0
- package/dist/components/Tag/index.mjs.map +1 -0
- package/dist/components/Toaster/Toast.d.ts +1 -1
- package/dist/components/index.cjs +4 -4
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.mjs +3 -3
- package/dist/components/index.mjs.map +1 -1
- package/dist/hooks/index.cjs +4 -1
- package/dist/hooks/index.cjs.map +1 -1
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.mjs +5 -2
- package/dist/hooks/index.mjs.map +1 -1
- package/dist/hooks/intlayerAPIHooks.cjs +257 -126
- package/dist/hooks/intlayerAPIHooks.cjs.map +1 -1
- package/dist/hooks/intlayerAPIHooks.d.ts +43 -38
- package/dist/hooks/intlayerAPIHooks.d.ts.map +1 -1
- package/dist/hooks/intlayerAPIHooks.mjs +258 -127
- package/dist/hooks/intlayerAPIHooks.mjs.map +1 -1
- package/dist/hooks/useAsync/useAsync.cjs +142 -104
- package/dist/hooks/useAsync/useAsync.cjs.map +1 -1
- package/dist/hooks/useAsync/useAsync.d.ts +0 -2
- package/dist/hooks/useAsync/useAsync.d.ts.map +1 -1
- package/dist/hooks/useAsync/useAsync.mjs +143 -105
- package/dist/hooks/useAsync/useAsync.mjs.map +1 -1
- package/dist/hooks/useAsync/useAsyncStateStore.cjs +50 -112
- package/dist/hooks/useAsync/useAsyncStateStore.cjs.map +1 -1
- package/dist/hooks/useAsync/useAsyncStateStore.d.ts +3 -9
- package/dist/hooks/useAsync/useAsyncStateStore.d.ts.map +1 -1
- package/dist/hooks/useAsync/useAsyncStateStore.mjs +50 -112
- package/dist/hooks/useAsync/useAsyncStateStore.mjs.map +1 -1
- package/dist/hooks/useAsync/useProxyState.d.ts +3 -0
- package/dist/hooks/useAsync/useProxyState.d.ts.map +1 -0
- package/dist/hooks/useIntlayerAPI.cjs +6 -5
- package/dist/hooks/useIntlayerAPI.cjs.map +1 -1
- package/dist/hooks/useIntlayerAPI.d.ts +51 -45
- package/dist/hooks/useIntlayerAPI.d.ts.map +1 -1
- package/dist/hooks/useIntlayerAPI.mjs +5 -4
- package/dist/hooks/useIntlayerAPI.mjs.map +1 -1
- package/dist/hooks/useItemSelector.cjs +11 -2
- package/dist/hooks/useItemSelector.cjs.map +1 -1
- package/dist/hooks/useItemSelector.d.ts +3 -2
- package/dist/hooks/useItemSelector.d.ts.map +1 -1
- package/dist/hooks/useItemSelector.mjs +11 -2
- package/dist/hooks/useItemSelector.mjs.map +1 -1
- package/dist/hooks/usePersistedStore.cjs +22 -0
- package/dist/hooks/usePersistedStore.cjs.map +1 -0
- package/dist/hooks/usePersistedStore.d.ts +2 -0
- package/dist/hooks/usePersistedStore.d.ts.map +1 -0
- package/dist/hooks/usePersistedStore.mjs +22 -0
- package/dist/hooks/usePersistedStore.mjs.map +1 -0
- package/dist/hooks/usePersistenceStore.cjs +22 -0
- package/dist/hooks/usePersistenceStore.cjs.map +1 -0
- package/dist/hooks/usePersistenceStore.d.ts +2 -0
- package/dist/hooks/usePersistenceStore.d.ts.map +1 -0
- package/dist/hooks/usePersistenceStore.mjs +22 -0
- package/dist/hooks/usePersistenceStore.mjs.map +1 -0
- package/dist/libs/intlayer-api/auth.cjs +14 -2
- package/dist/libs/intlayer-api/auth.cjs.map +1 -1
- package/dist/libs/intlayer-api/auth.d.ts +7 -3
- package/dist/libs/intlayer-api/auth.d.ts.map +1 -1
- package/dist/libs/intlayer-api/auth.mjs +14 -2
- package/dist/libs/intlayer-api/auth.mjs.map +1 -1
- package/dist/libs/intlayer-api/fetcher.cjs +7 -1
- package/dist/libs/intlayer-api/fetcher.cjs.map +1 -1
- package/dist/libs/intlayer-api/fetcher.d.ts.map +1 -1
- package/dist/libs/intlayer-api/fetcher.mjs +7 -1
- package/dist/libs/intlayer-api/fetcher.mjs.map +1 -1
- package/dist/libs/intlayer-api/index.cjs +3 -1
- package/dist/libs/intlayer-api/index.cjs.map +1 -1
- package/dist/libs/intlayer-api/index.d.ts +12 -2
- package/dist/libs/intlayer-api/index.d.ts.map +1 -1
- package/dist/libs/intlayer-api/index.mjs +3 -1
- package/dist/libs/intlayer-api/index.mjs.map +1 -1
- package/dist/libs/intlayer-api/stripe.cjs +22 -0
- package/dist/libs/intlayer-api/stripe.cjs.map +1 -0
- package/dist/libs/intlayer-api/stripe.d.ts +6 -0
- package/dist/libs/intlayer-api/stripe.d.ts.map +1 -0
- package/dist/libs/intlayer-api/stripe.mjs +22 -0
- package/dist/libs/intlayer-api/stripe.mjs.map +1 -0
- package/dist/stripe-BsI0lJWz.js +22 -0
- package/dist/stripe-BsI0lJWz.js.map +1 -0
- package/dist/stripe-C-u5RvGh.js +22 -0
- package/dist/stripe-C-u5RvGh.js.map +1 -0
- package/dist/stripe-CF_E65Vu.js +22 -0
- package/dist/stripe-CF_E65Vu.js.map +1 -0
- package/dist/stripe-CpGvfq6T.cjs +21 -0
- package/dist/stripe-CpGvfq6T.cjs.map +1 -0
- package/dist/stripe-DEv4DjAL.cjs +21 -0
- package/dist/stripe-DEv4DjAL.cjs.map +1 -0
- package/dist/stripe-DuG0uaEn.cjs +21 -0
- package/dist/stripe-DuG0uaEn.cjs.map +1 -0
- package/dist/tailwind.css +1 -1
- package/dist/useProxyState-D5GLrY2y.js +20 -0
- package/dist/useProxyState-D5GLrY2y.js.map +1 -0
- package/dist/useProxyState-DewdF3no.cjs +19 -0
- package/dist/useProxyState-DewdF3no.cjs.map +1 -0
- package/package.json +15 -11
|
@@ -54,7 +54,7 @@ const SignInForm = ({
|
|
|
54
54
|
className: "ml-auto mt-2 block",
|
|
55
55
|
variant: "link",
|
|
56
56
|
label: signInContent.forgotPasswordLink.ariaLabel,
|
|
57
|
-
color: "
|
|
57
|
+
color: "text",
|
|
58
58
|
onClick: onClickForgotPassword,
|
|
59
59
|
children: signInContent.forgotPasswordLink.text
|
|
60
60
|
}
|
|
@@ -64,19 +64,20 @@ const SignInForm = ({
|
|
|
64
64
|
{
|
|
65
65
|
className: "mt-12 w-full",
|
|
66
66
|
type: "submit",
|
|
67
|
+
color: "text",
|
|
67
68
|
isLoading: isSubmitting,
|
|
68
69
|
label: signInContent.loginButton.ariaLabel,
|
|
69
70
|
children: signInContent.loginButton.text
|
|
70
71
|
}
|
|
71
72
|
),
|
|
72
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "text-neutral dark:text-neutral-dark m-auto mt-3 flex w-full justify-center text-xs", children: [
|
|
73
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "text-neutral dark:text-neutral-dark m-auto mt-3 flex w-full items-center justify-center text-xs", children: [
|
|
73
74
|
signInContent.signUpLink.message,
|
|
74
75
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
75
76
|
Form.Button,
|
|
76
77
|
{
|
|
77
78
|
variant: "link",
|
|
78
79
|
label: signInContent.signUpLink.ariaLabel,
|
|
79
|
-
color: "
|
|
80
|
+
color: "text",
|
|
80
81
|
onClick: onClickSignUp,
|
|
81
82
|
children: signInContent.signUpLink.text
|
|
82
83
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SignInForm.mjs","sources":["../../../../src/components/Auth/SignInForm/SignInForm.tsx"],"sourcesContent":["'use client';\n\nimport type { FC } from 'react';\nimport { Form, useForm } from '../../Form';\nimport { ExternalsLoginButtons } from '../ExternalsLoginButtons';\nimport { getSignInContent } from './index.content';\nimport { getSignInSchema, type SignIn } from './SignInSchema';\n\ntype SignInFormProps = {\n onSubmitSuccess: (data: SignIn) => Promise<void>;\n
|
|
1
|
+
{"version":3,"file":"SignInForm.mjs","sources":["../../../../src/components/Auth/SignInForm/SignInForm.tsx"],"sourcesContent":["'use client';\n\nimport type { FC } from 'react';\nimport { Form, useForm } from '../../Form';\nimport { ExternalsLoginButtons } from '../ExternalsLoginButtons';\nimport { getSignInContent } from './index.content';\nimport { getSignInSchema, type SignIn } from './SignInSchema';\n\ntype SignInFormProps = {\n onSubmitSuccess: (data: SignIn) => Promise<void>;\n onClickForgotPassword: () => void;\n onClickSignUp: () => void;\n onSubmitError?: (error: Error) => void;\n};\n\nexport const SignInForm: FC<SignInFormProps> = ({\n onSubmitSuccess,\n onSubmitError,\n onClickForgotPassword,\n onClickSignUp,\n}) => {\n const SignInSchema = getSignInSchema();\n const { form, isSubmitting } = useForm(SignInSchema);\n const signInContent = getSignInContent();\n\n return (\n <>\n <Form\n schema={SignInSchema}\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 name=\"email\"\n label={signInContent.emailInput.label}\n placeholder={signInContent.emailInput.placeholder}\n isRequired\n autoComplete=\"email\"\n />\n\n <Form.InputPassword\n name=\"password\"\n label={signInContent.passwordInput.label}\n placeholder={signInContent.passwordInput.placeholder}\n isRequired\n autoComplete=\"current-password\"\n />\n </div>\n\n <Form.Button\n className=\"ml-auto mt-2 block\"\n variant=\"link\"\n label={signInContent.forgotPasswordLink.ariaLabel}\n color=\"text\"\n onClick={onClickForgotPassword}\n >\n {signInContent.forgotPasswordLink.text}\n </Form.Button>\n\n <Form.Button\n className=\"mt-12 w-full\"\n type=\"submit\"\n color=\"text\"\n isLoading={isSubmitting}\n label={signInContent.loginButton.ariaLabel}\n >\n {signInContent.loginButton.text}\n </Form.Button>\n\n <span className=\"text-neutral dark:text-neutral-dark m-auto mt-3 flex w-full items-center justify-center text-xs\">\n {signInContent.signUpLink.message}\n <Form.Button\n variant=\"link\"\n label={signInContent.signUpLink.ariaLabel}\n color=\"text\"\n onClick={onClickSignUp}\n >\n {signInContent.signUpLink.text}\n </Form.Button>\n </span>\n </Form>\n <ExternalsLoginButtons />\n </>\n );\n};\n"],"names":["jsxs","Fragment","jsx"],"mappings":";;;;;;;;AAeO,MAAM,aAAkC,CAAC;AAAA,EAC9C;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MAAM;AACJ,QAAM,eAAe;AACrB,QAAM,EAAE,MAAM,aAAa,IAAI,QAAQ,YAAY;AACnD,QAAM,gBAAgB;AAEtB,SAEIA,kCAAA,KAAAC,4BAAA,EAAA,UAAA;AAAA,IAAAD,kCAAA;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,QAAQ;AAAA,QACR;AAAA,QACA;AAAA,QACA,cAAY;AAAA,QACZ,WAAU;AAAA,QACT,GAAG;AAAA,QAEJ,UAAA;AAAA,UAACA,kCAAAA,KAAA,OAAA,EAAI,WAAU,yBACb,UAAA;AAAA,YAAAE,kCAAA;AAAA,cAAC,KAAK;AAAA,cAAL;AAAA,gBACC,MAAK;AAAA,gBACL,OAAO,cAAc,WAAW;AAAA,gBAChC,aAAa,cAAc,WAAW;AAAA,gBACtC,YAAU;AAAA,gBACV,cAAa;AAAA,cAAA;AAAA,YACf;AAAA,YAEAA,kCAAA;AAAA,cAAC,KAAK;AAAA,cAAL;AAAA,gBACC,MAAK;AAAA,gBACL,OAAO,cAAc,cAAc;AAAA,gBACnC,aAAa,cAAc,cAAc;AAAA,gBACzC,YAAU;AAAA,gBACV,cAAa;AAAA,cAAA;AAAA,YACf;AAAA,UAAA,GACF;AAAA,UAEAA,kCAAA;AAAA,YAAC,KAAK;AAAA,YAAL;AAAA,cACC,WAAU;AAAA,cACV,SAAQ;AAAA,cACR,OAAO,cAAc,mBAAmB;AAAA,cACxC,OAAM;AAAA,cACN,SAAS;AAAA,cAER,wBAAc,mBAAmB;AAAA,YAAA;AAAA,UACpC;AAAA,UAEAA,kCAAA;AAAA,YAAC,KAAK;AAAA,YAAL;AAAA,cACC,WAAU;AAAA,cACV,MAAK;AAAA,cACL,OAAM;AAAA,cACN,WAAW;AAAA,cACX,OAAO,cAAc,YAAY;AAAA,cAEhC,wBAAc,YAAY;AAAA,YAAA;AAAA,UAC7B;AAAA,UAEAF,kCAAAA,KAAC,QAAK,EAAA,WAAU,mGACb,UAAA;AAAA,YAAA,cAAc,WAAW;AAAA,YAC1BE,kCAAA;AAAA,cAAC,KAAK;AAAA,cAAL;AAAA,gBACC,SAAQ;AAAA,gBACR,OAAO,cAAc,WAAW;AAAA,gBAChC,OAAM;AAAA,gBACN,SAAS;AAAA,gBAER,wBAAc,WAAW;AAAA,cAAA;AAAA,YAC5B;AAAA,UAAA,GACF;AAAA,QAAA;AAAA,MAAA;AAAA,IACF;AAAA,0CACC,uBAAsB,EAAA;AAAA,EACzB,EAAA,CAAA;AAEJ;"}
|
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
export declare const getSignInContent: () => {
|
|
2
2
|
forgotPasswordLink: {
|
|
3
|
-
ariaLabel:
|
|
4
|
-
text:
|
|
3
|
+
ariaLabel: any;
|
|
4
|
+
text: any;
|
|
5
5
|
};
|
|
6
6
|
emailInput: {
|
|
7
|
-
label:
|
|
8
|
-
placeholder:
|
|
7
|
+
label: any;
|
|
8
|
+
placeholder: any;
|
|
9
9
|
};
|
|
10
10
|
passwordInput: {
|
|
11
|
-
label:
|
|
12
|
-
placeholder:
|
|
11
|
+
label: any;
|
|
12
|
+
placeholder: any;
|
|
13
13
|
};
|
|
14
14
|
loginButton: {
|
|
15
|
-
text:
|
|
16
|
-
ariaLabel:
|
|
15
|
+
text: any;
|
|
16
|
+
ariaLabel: any;
|
|
17
17
|
};
|
|
18
18
|
signInButton: {
|
|
19
|
-
text:
|
|
20
|
-
ariaLabel:
|
|
19
|
+
text: any;
|
|
20
|
+
ariaLabel: any;
|
|
21
21
|
};
|
|
22
22
|
signUpLink: {
|
|
23
|
-
message:
|
|
24
|
-
ariaLabel:
|
|
25
|
-
text:
|
|
23
|
+
message: any;
|
|
24
|
+
ariaLabel: any;
|
|
25
|
+
text: any;
|
|
26
26
|
};
|
|
27
27
|
};
|
|
28
28
|
//# sourceMappingURL=index.content.d.ts.map
|
|
@@ -69,21 +69,21 @@ const SignUpForm = ({
|
|
|
69
69
|
{
|
|
70
70
|
className: "mt-12 w-full",
|
|
71
71
|
type: "submit",
|
|
72
|
+
color: "text",
|
|
72
73
|
isLoading: isSubmitting,
|
|
73
74
|
label: signUpButton.ariaLabel,
|
|
74
75
|
children: signUpButton.text
|
|
75
76
|
}
|
|
76
77
|
),
|
|
77
|
-
/* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsxs("span", { className: "text-neutral dark:text-neutral-dark m-auto mt-3 flex w-full justify-center text-center align-middle text-xs", children: [
|
|
78
|
+
/* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsxs("span", { className: "text-neutral dark:text-neutral-dark m-auto mt-3 flex w-full items-center justify-center text-center align-middle text-xs", children: [
|
|
78
79
|
loginLink.message,
|
|
79
80
|
/* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(
|
|
80
81
|
components_Form_layout_FormItemLayout.Form.Button,
|
|
81
82
|
{
|
|
82
83
|
variant: "link",
|
|
83
84
|
label: loginLink.ariaLabel,
|
|
84
|
-
color: "
|
|
85
|
+
color: "text",
|
|
85
86
|
onClick: onClickBackToSignIn,
|
|
86
|
-
"aria-label": loginLink.ariaLabel,
|
|
87
87
|
children: loginLink.text
|
|
88
88
|
}
|
|
89
89
|
)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SignUpForm.cjs","sources":["../../../../src/components/Auth/SignUpForm/SignUpForm.tsx"],"sourcesContent":["'use client';\n\nimport type { FC } from 'react';\nimport { Form, useForm } from '../../Form';\nimport { getSignUpContent } from './index.content';\nimport { getSignUpSchema, type SignUp } from './SignUpSchema';\n\ntype SignUpFormProps = {\n onSubmitSuccess: (data: SignUp) => Promise<void>;\n
|
|
1
|
+
{"version":3,"file":"SignUpForm.cjs","sources":["../../../../src/components/Auth/SignUpForm/SignUpForm.tsx"],"sourcesContent":["'use client';\n\nimport type { FC } from 'react';\nimport { Form, useForm } from '../../Form';\nimport { getSignUpContent } from './index.content';\nimport { getSignUpSchema, type SignUp } from './SignUpSchema';\n\ntype SignUpFormProps = {\n onSubmitSuccess: (data: SignUp) => Promise<void>;\n onClickBackToSignIn: () => void;\n onSubmitError?: (error: Error) => void;\n};\n\nexport const SignUpForm: FC<SignUpFormProps> = ({\n onSubmitSuccess,\n onSubmitError,\n onClickBackToSignIn,\n}) => {\n const {\n emailInput,\n passwordInput,\n passwordConfirmationInput,\n signUpButton,\n loginLink,\n } = getSignUpContent();\n const SignUpSchema = getSignUpSchema();\n const { form, isSubmitting } = useForm(SignUpSchema);\n\n return (\n <Form\n schema={SignUpSchema}\n onSubmitSuccess={onSubmitSuccess}\n onSubmitError={onSubmitError}\n autoComplete\n {...form}\n >\n <div className=\"flex flex-col gap-y-6\">\n <Form.Input\n name=\"email\"\n label={emailInput.label}\n placeholder={emailInput.placeholder}\n isRequired\n autoComplete=\"email\"\n minLength={5}\n maxLength={50}\n />\n\n <Form.InputPassword\n name=\"password\"\n label={passwordInput.label}\n placeholder={passwordInput.placeholder}\n autoComplete=\"new-password\"\n isRequired\n />\n\n <Form.InputPassword\n name=\"passwordConfirmation\"\n label={passwordConfirmationInput.label}\n placeholder={passwordConfirmationInput.placeholder}\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 label={signUpButton.ariaLabel}\n >\n {signUpButton.text}\n </Form.Button>\n\n <span className=\"text-neutral dark:text-neutral-dark m-auto mt-3 flex w-full items-center justify-center text-center align-middle text-xs\">\n {loginLink.message}\n <Form.Button\n variant=\"link\"\n label={loginLink.ariaLabel}\n color=\"text\"\n onClick={onClickBackToSignIn}\n >\n {loginLink.text}\n </Form.Button>\n </span>\n </Form>\n );\n};\n"],"names":["getSignUpContent","getSignUpSchema","useForm","jsxs","Form","jsx"],"mappings":";;;;;;;;;AAaO,MAAM,aAAkC,CAAC;AAAA,EAC9C;AAAA,EACA;AAAA,EACA;AACF,MAAM;AACE,QAAA;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,MACEA,yCAAiB,iBAAA;AACrB,QAAM,eAAeC,wCAAAA;AACrB,QAAM,EAAE,MAAM,aAAa,IAAIC,iCAAQ,YAAY;AAGjD,SAAAC,2BAAA,kBAAA;AAAA,IAACC,sCAAA;AAAA,IAAA;AAAA,MACC,QAAQ;AAAA,MACR;AAAA,MACA;AAAA,MACA,cAAY;AAAA,MACX,GAAG;AAAA,MAEJ,UAAA;AAAA,QAACD,2BAAAA,kBAAAA,KAAA,OAAA,EAAI,WAAU,yBACb,UAAA;AAAA,UAAAE,2BAAA,kBAAA;AAAA,YAACD,sCAAAA,KAAK;AAAA,YAAL;AAAA,cACC,MAAK;AAAA,cACL,OAAO,WAAW;AAAA,cAClB,aAAa,WAAW;AAAA,cACxB,YAAU;AAAA,cACV,cAAa;AAAA,cACb,WAAW;AAAA,cACX,WAAW;AAAA,YAAA;AAAA,UACb;AAAA,UAEAC,2BAAA,kBAAA;AAAA,YAACD,sCAAAA,KAAK;AAAA,YAAL;AAAA,cACC,MAAK;AAAA,cACL,OAAO,cAAc;AAAA,cACrB,aAAa,cAAc;AAAA,cAC3B,cAAa;AAAA,cACb,YAAU;AAAA,YAAA;AAAA,UACZ;AAAA,UAEAC,2BAAA,kBAAA;AAAA,YAACD,sCAAAA,KAAK;AAAA,YAAL;AAAA,cACC,MAAK;AAAA,cACL,OAAO,0BAA0B;AAAA,cACjC,aAAa,0BAA0B;AAAA,cACvC,cAAa;AAAA,cACb,YAAU;AAAA,YAAA;AAAA,UACZ;AAAA,QAAA,GACF;AAAA,QAEAC,2BAAA,kBAAA;AAAA,UAACD,sCAAAA,KAAK;AAAA,UAAL;AAAA,YACC,WAAU;AAAA,YACV,MAAK;AAAA,YACL,OAAM;AAAA,YACN,WAAW;AAAA,YACX,OAAO,aAAa;AAAA,YAEnB,UAAa,aAAA;AAAA,UAAA;AAAA,QAChB;AAAA,QAEAD,2BAAAA,kBAAAA,KAAC,QAAK,EAAA,WAAU,4HACb,UAAA;AAAA,UAAU,UAAA;AAAA,UACXE,2BAAA,kBAAA;AAAA,YAACD,sCAAAA,KAAK;AAAA,YAAL;AAAA,cACC,SAAQ;AAAA,cACR,OAAO,UAAU;AAAA,cACjB,OAAM;AAAA,cACN,SAAS;AAAA,cAER,UAAU,UAAA;AAAA,YAAA;AAAA,UACb;AAAA,QAAA,GACF;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGN;;"}
|
|
@@ -2,8 +2,8 @@ import { FC } from 'react';
|
|
|
2
2
|
import { SignUp } from './SignUpSchema';
|
|
3
3
|
type SignUpFormProps = {
|
|
4
4
|
onSubmitSuccess: (data: SignUp) => Promise<void>;
|
|
5
|
-
onSubmitError: (error: Error) => void;
|
|
6
5
|
onClickBackToSignIn: () => void;
|
|
6
|
+
onSubmitError?: (error: Error) => void;
|
|
7
7
|
};
|
|
8
8
|
export declare const SignUpForm: FC<SignUpFormProps>;
|
|
9
9
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SignUpForm.d.ts","sourceRoot":"","sources":["../../../../src/components/Auth/SignUpForm/SignUpForm.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAGhC,OAAO,EAAmB,KAAK,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAE9D,KAAK,eAAe,GAAG;IACrB,eAAe,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACjD,
|
|
1
|
+
{"version":3,"file":"SignUpForm.d.ts","sourceRoot":"","sources":["../../../../src/components/Auth/SignUpForm/SignUpForm.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAGhC,OAAO,EAAmB,KAAK,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAE9D,KAAK,eAAe,GAAG;IACrB,eAAe,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACjD,mBAAmB,EAAE,MAAM,IAAI,CAAC;IAChC,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;CACxC,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,EAAE,CAAC,eAAe,CA0E1C,CAAC"}
|
|
@@ -67,21 +67,21 @@ const SignUpForm = ({
|
|
|
67
67
|
{
|
|
68
68
|
className: "mt-12 w-full",
|
|
69
69
|
type: "submit",
|
|
70
|
+
color: "text",
|
|
70
71
|
isLoading: isSubmitting,
|
|
71
72
|
label: signUpButton.ariaLabel,
|
|
72
73
|
children: signUpButton.text
|
|
73
74
|
}
|
|
74
75
|
),
|
|
75
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "text-neutral dark:text-neutral-dark m-auto mt-3 flex w-full justify-center text-center align-middle text-xs", children: [
|
|
76
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "text-neutral dark:text-neutral-dark m-auto mt-3 flex w-full items-center justify-center text-center align-middle text-xs", children: [
|
|
76
77
|
loginLink.message,
|
|
77
78
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
78
79
|
Form.Button,
|
|
79
80
|
{
|
|
80
81
|
variant: "link",
|
|
81
82
|
label: loginLink.ariaLabel,
|
|
82
|
-
color: "
|
|
83
|
+
color: "text",
|
|
83
84
|
onClick: onClickBackToSignIn,
|
|
84
|
-
"aria-label": loginLink.ariaLabel,
|
|
85
85
|
children: loginLink.text
|
|
86
86
|
}
|
|
87
87
|
)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SignUpForm.mjs","sources":["../../../../src/components/Auth/SignUpForm/SignUpForm.tsx"],"sourcesContent":["'use client';\n\nimport type { FC } from 'react';\nimport { Form, useForm } from '../../Form';\nimport { getSignUpContent } from './index.content';\nimport { getSignUpSchema, type SignUp } from './SignUpSchema';\n\ntype SignUpFormProps = {\n onSubmitSuccess: (data: SignUp) => Promise<void>;\n
|
|
1
|
+
{"version":3,"file":"SignUpForm.mjs","sources":["../../../../src/components/Auth/SignUpForm/SignUpForm.tsx"],"sourcesContent":["'use client';\n\nimport type { FC } from 'react';\nimport { Form, useForm } from '../../Form';\nimport { getSignUpContent } from './index.content';\nimport { getSignUpSchema, type SignUp } from './SignUpSchema';\n\ntype SignUpFormProps = {\n onSubmitSuccess: (data: SignUp) => Promise<void>;\n onClickBackToSignIn: () => void;\n onSubmitError?: (error: Error) => void;\n};\n\nexport const SignUpForm: FC<SignUpFormProps> = ({\n onSubmitSuccess,\n onSubmitError,\n onClickBackToSignIn,\n}) => {\n const {\n emailInput,\n passwordInput,\n passwordConfirmationInput,\n signUpButton,\n loginLink,\n } = getSignUpContent();\n const SignUpSchema = getSignUpSchema();\n const { form, isSubmitting } = useForm(SignUpSchema);\n\n return (\n <Form\n schema={SignUpSchema}\n onSubmitSuccess={onSubmitSuccess}\n onSubmitError={onSubmitError}\n autoComplete\n {...form}\n >\n <div className=\"flex flex-col gap-y-6\">\n <Form.Input\n name=\"email\"\n label={emailInput.label}\n placeholder={emailInput.placeholder}\n isRequired\n autoComplete=\"email\"\n minLength={5}\n maxLength={50}\n />\n\n <Form.InputPassword\n name=\"password\"\n label={passwordInput.label}\n placeholder={passwordInput.placeholder}\n autoComplete=\"new-password\"\n isRequired\n />\n\n <Form.InputPassword\n name=\"passwordConfirmation\"\n label={passwordConfirmationInput.label}\n placeholder={passwordConfirmationInput.placeholder}\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 label={signUpButton.ariaLabel}\n >\n {signUpButton.text}\n </Form.Button>\n\n <span className=\"text-neutral dark:text-neutral-dark m-auto mt-3 flex w-full items-center justify-center text-center align-middle text-xs\">\n {loginLink.message}\n <Form.Button\n variant=\"link\"\n label={loginLink.ariaLabel}\n color=\"text\"\n onClick={onClickBackToSignIn}\n >\n {loginLink.text}\n </Form.Button>\n </span>\n </Form>\n );\n};\n"],"names":["jsxs","jsx"],"mappings":";;;;;;;AAaO,MAAM,aAAkC,CAAC;AAAA,EAC9C;AAAA,EACA;AAAA,EACA;AACF,MAAM;AACE,QAAA;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,MACE,iBAAiB;AACrB,QAAM,eAAe;AACrB,QAAM,EAAE,MAAM,aAAa,IAAI,QAAQ,YAAY;AAGjD,SAAAA,kCAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,QAAQ;AAAA,MACR;AAAA,MACA;AAAA,MACA,cAAY;AAAA,MACX,GAAG;AAAA,MAEJ,UAAA;AAAA,QAACA,kCAAAA,KAAA,OAAA,EAAI,WAAU,yBACb,UAAA;AAAA,UAAAC,kCAAA;AAAA,YAAC,KAAK;AAAA,YAAL;AAAA,cACC,MAAK;AAAA,cACL,OAAO,WAAW;AAAA,cAClB,aAAa,WAAW;AAAA,cACxB,YAAU;AAAA,cACV,cAAa;AAAA,cACb,WAAW;AAAA,cACX,WAAW;AAAA,YAAA;AAAA,UACb;AAAA,UAEAA,kCAAA;AAAA,YAAC,KAAK;AAAA,YAAL;AAAA,cACC,MAAK;AAAA,cACL,OAAO,cAAc;AAAA,cACrB,aAAa,cAAc;AAAA,cAC3B,cAAa;AAAA,cACb,YAAU;AAAA,YAAA;AAAA,UACZ;AAAA,UAEAA,kCAAA;AAAA,YAAC,KAAK;AAAA,YAAL;AAAA,cACC,MAAK;AAAA,cACL,OAAO,0BAA0B;AAAA,cACjC,aAAa,0BAA0B;AAAA,cACvC,cAAa;AAAA,cACb,YAAU;AAAA,YAAA;AAAA,UACZ;AAAA,QAAA,GACF;AAAA,QAEAA,kCAAA;AAAA,UAAC,KAAK;AAAA,UAAL;AAAA,YACC,WAAU;AAAA,YACV,MAAK;AAAA,YACL,OAAM;AAAA,YACN,WAAW;AAAA,YACX,OAAO,aAAa;AAAA,YAEnB,UAAa,aAAA;AAAA,UAAA;AAAA,QAChB;AAAA,QAEAD,kCAAAA,KAAC,QAAK,EAAA,WAAU,4HACb,UAAA;AAAA,UAAU,UAAA;AAAA,UACXC,kCAAA;AAAA,YAAC,KAAK;AAAA,YAAL;AAAA,cACC,SAAQ;AAAA,cACR,OAAO,UAAU;AAAA,cACjB,OAAM;AAAA,cACN,SAAS;AAAA,cAER,UAAU,UAAA;AAAA,YAAA;AAAA,UACb;AAAA,QAAA,GACF;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGN;"}
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
export declare const getSignUpContent: () => {
|
|
2
2
|
emailInput: {
|
|
3
|
-
label:
|
|
4
|
-
placeholder:
|
|
3
|
+
label: any;
|
|
4
|
+
placeholder: any;
|
|
5
5
|
};
|
|
6
6
|
passwordInput: {
|
|
7
|
-
label:
|
|
8
|
-
placeholder:
|
|
7
|
+
label: any;
|
|
8
|
+
placeholder: any;
|
|
9
9
|
};
|
|
10
10
|
passwordConfirmationInput: {
|
|
11
|
-
label:
|
|
12
|
-
placeholder:
|
|
11
|
+
label: any;
|
|
12
|
+
placeholder: any;
|
|
13
13
|
};
|
|
14
14
|
signUpButton: {
|
|
15
|
-
text:
|
|
16
|
-
ariaLabel:
|
|
15
|
+
text: any;
|
|
16
|
+
ariaLabel: any;
|
|
17
17
|
};
|
|
18
18
|
loginLink: {
|
|
19
|
-
message:
|
|
20
|
-
text:
|
|
21
|
-
ariaLabel:
|
|
19
|
+
message: any;
|
|
20
|
+
text: any;
|
|
21
|
+
ariaLabel: any;
|
|
22
22
|
};
|
|
23
23
|
};
|
|
24
24
|
//# sourceMappingURL=index.content.d.ts.map
|
|
@@ -10,7 +10,7 @@ const components_Auth_ChangePasswordForm_ChangePasswordSchema = require("./Chang
|
|
|
10
10
|
const components_Auth_ResetPasswordForm_ResetPasswordForm = require("./ResetPasswordForm/ResetPasswordForm.cjs");
|
|
11
11
|
const components_Auth_ResetPasswordForm_ResetPasswordSchema = require("./ResetPasswordForm/ResetPasswordSchema.cjs");
|
|
12
12
|
const components_Auth_AuthModal_index = require("./AuthModal/index.cjs");
|
|
13
|
-
const
|
|
13
|
+
const components_Auth_useAuth_index = require("./useAuth/index.cjs");
|
|
14
14
|
const components_Auth_AuthenticationBarrier_AuthenticationBarrierServer = require("./AuthenticationBarrier/AuthenticationBarrierServer.cjs");
|
|
15
15
|
const components_Auth_AuthenticationBarrier_AuthenticationBarrierClient = require("./AuthenticationBarrier/AuthenticationBarrierClient.cjs");
|
|
16
16
|
const components_Auth_useUser_index = require("./useUser/index.cjs");
|
|
@@ -26,9 +26,7 @@ exports.getChangePasswordSchema = components_Auth_ChangePasswordForm_ChangePassw
|
|
|
26
26
|
exports.ResetPasswordForm = components_Auth_ResetPasswordForm_ResetPasswordForm.ResetPasswordForm;
|
|
27
27
|
exports.getResetPasswordSchema = components_Auth_ResetPasswordForm_ResetPasswordSchema.getResetPasswordSchema;
|
|
28
28
|
exports.AuthModal = components_Auth_AuthModal_index.AuthModal;
|
|
29
|
-
exports.
|
|
30
|
-
exports.AuthProvider = components_Auth_AuthProvider_index.AuthProvider;
|
|
31
|
-
exports.useAuth = components_Auth_AuthProvider_index.useAuth;
|
|
29
|
+
exports.useAuth = components_Auth_useAuth_index.useAuth;
|
|
32
30
|
exports.AuthenticationBarrierServer = components_Auth_AuthenticationBarrier_AuthenticationBarrierServer.AuthenticationBarrierServer;
|
|
33
31
|
exports.AuthenticationBarrierClient = components_Auth_AuthenticationBarrier_AuthenticationBarrierClient.AuthenticationBarrierClient;
|
|
34
32
|
exports.useUser = components_Auth_useUser_index.useUser;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -4,7 +4,7 @@ export * from './SignUpForm';
|
|
|
4
4
|
export * from './ChangePasswordForm';
|
|
5
5
|
export * from './ResetPasswordForm';
|
|
6
6
|
export * from './AuthModal';
|
|
7
|
-
export * from './
|
|
7
|
+
export * from './useAuth';
|
|
8
8
|
export * from './AuthenticationBarrier';
|
|
9
9
|
export * from './useUser';
|
|
10
10
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Auth/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC;AACxC,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,sBAAsB,CAAC;AACrC,cAAc,qBAAqB,CAAC;AACpC,cAAc,aAAa,CAAC;AAC5B,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Auth/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC;AACxC,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,sBAAsB,CAAC;AACrC,cAAc,qBAAqB,CAAC;AACpC,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,yBAAyB,CAAC;AACxC,cAAc,WAAW,CAAC"}
|
|
@@ -8,14 +8,12 @@ import { getChangePasswordSchema } from "./ChangePasswordForm/ChangePasswordSche
|
|
|
8
8
|
import { ResetPasswordForm } from "./ResetPasswordForm/ResetPasswordForm.mjs";
|
|
9
9
|
import { getResetPasswordSchema } from "./ResetPasswordForm/ResetPasswordSchema.mjs";
|
|
10
10
|
import { AuthModal } from "./AuthModal/index.mjs";
|
|
11
|
-
import {
|
|
11
|
+
import { useAuth } from "./useAuth/index.mjs";
|
|
12
12
|
import { AuthenticationBarrierServer } from "./AuthenticationBarrier/AuthenticationBarrierServer.mjs";
|
|
13
13
|
import { AuthenticationBarrierClient } from "./AuthenticationBarrier/AuthenticationBarrierClient.mjs";
|
|
14
14
|
import { useUser } from "./useUser/index.mjs";
|
|
15
15
|
export {
|
|
16
|
-
AuthContext,
|
|
17
16
|
AuthModal,
|
|
18
|
-
AuthProvider,
|
|
19
17
|
AuthenticationBarrierClient,
|
|
20
18
|
AuthenticationBarrierServer,
|
|
21
19
|
ChangePasswordForm,
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
4
|
+
const require$$0 = require("react");
|
|
5
|
+
const components_Auth_useAuth_useCSRF = require("./useCSRF.cjs");
|
|
6
|
+
const components_Auth_useAuth_useOAuth2 = require("./useOAuth2.cjs");
|
|
7
|
+
const components_Auth_useAuth_useSession = require("./useSession.cjs");
|
|
8
|
+
const useAuth = ({
|
|
9
|
+
session: sessionProp
|
|
10
|
+
} = {}) => {
|
|
11
|
+
const { csrfToken, csrfTokenFetched } = components_Auth_useAuth_useCSRF.useCSRF();
|
|
12
|
+
const { session, fetchSession, revalidateSession, setSession } = components_Auth_useAuth_useSession.useSession(sessionProp);
|
|
13
|
+
const { oAuth2AccessToken } = components_Auth_useAuth_useOAuth2.useOAuth2(csrfToken);
|
|
14
|
+
const memoValue = require$$0.useMemo(
|
|
15
|
+
() => ({
|
|
16
|
+
session,
|
|
17
|
+
fetchSession,
|
|
18
|
+
setSession,
|
|
19
|
+
revalidateSession,
|
|
20
|
+
csrfToken,
|
|
21
|
+
csrfTokenFetched,
|
|
22
|
+
oAuth2AccessToken,
|
|
23
|
+
isProjectAdmin: session?.isProjectAdmin,
|
|
24
|
+
isOrganizationAdmin: session?.isOrganizationAdmin
|
|
25
|
+
}),
|
|
26
|
+
[
|
|
27
|
+
session,
|
|
28
|
+
setSession,
|
|
29
|
+
fetchSession,
|
|
30
|
+
revalidateSession,
|
|
31
|
+
csrfToken,
|
|
32
|
+
csrfTokenFetched,
|
|
33
|
+
oAuth2AccessToken
|
|
34
|
+
]
|
|
35
|
+
);
|
|
36
|
+
return memoValue;
|
|
37
|
+
};
|
|
38
|
+
exports.useAuth = useAuth;
|
|
39
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../../../src/components/Auth/useAuth/index.tsx"],"sourcesContent":["'use client';\n\nimport type {\n OAuth2Token,\n OrganizationAPI,\n ProjectAPI,\n UserAPI,\n} from '@intlayer/backend';\nimport { useMemo } from 'react';\nimport { useCSRF } from './useCSRF';\nimport { useOAuth2 } from './useOAuth2';\nimport { useSession } from './useSession';\n\nexport type Session = {\n user: UserAPI | null;\n organization: OrganizationAPI | null;\n project: ProjectAPI | null;\n isOrganizationAdmin: boolean;\n isProjectAdmin: boolean;\n};\n\ntype SessionContextProps = {\n session: Session | null | undefined;\n setSession: (session: Session | null) => void;\n fetchSession: () => Promise<Session | null | undefined>;\n revalidateSession: () => Promise<Session | null | undefined>;\n csrfToken: string | null | undefined;\n csrfTokenFetched: boolean;\n oAuth2AccessToken: OAuth2Token | null | undefined;\n isProjectAdmin: boolean | null | undefined;\n isOrganizationAdmin: boolean | null | undefined;\n};\n\nexport const useAuth = ({\n session: sessionProp,\n}: {\n session?: Session | null;\n} = {}) => {\n const { csrfToken, csrfTokenFetched } = useCSRF();\n const { session, fetchSession, revalidateSession, setSession } =\n useSession(sessionProp);\n const { oAuth2AccessToken } = useOAuth2(csrfToken);\n\n const memoValue: SessionContextProps = useMemo(\n () => ({\n session,\n fetchSession,\n setSession,\n revalidateSession,\n csrfToken,\n csrfTokenFetched,\n oAuth2AccessToken,\n isProjectAdmin: session?.isProjectAdmin,\n isOrganizationAdmin: session?.isOrganizationAdmin,\n }),\n [\n session,\n setSession,\n fetchSession,\n revalidateSession,\n csrfToken,\n csrfTokenFetched,\n oAuth2AccessToken,\n ]\n );\n\n return memoValue;\n};\n"],"names":["useCSRF","useSession","useOAuth2","useMemo"],"mappings":";;;;;;;AAiCO,MAAM,UAAU,CAAC;AAAA,EACtB,SAAS;AACX,IAEI,OAAO;AACT,QAAM,EAAE,WAAW,iBAAiB,IAAIA,gCAAQ,QAAA;AAChD,QAAM,EAAE,SAAS,cAAc,mBAAmB,eAChDC,mCAAAA,WAAW,WAAW;AACxB,QAAM,EAAE,kBAAA,IAAsBC,kCAAA,UAAU,SAAS;AAEjD,QAAM,YAAiCC,WAAA;AAAA,IACrC,OAAO;AAAA,MACL;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA,gBAAgB,SAAS;AAAA,MACzB,qBAAqB,SAAS;AAAA,IAAA;AAAA,IAEhC;AAAA,MACE;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,EAAA;AAGK,SAAA;AACT;;"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { OAuth2Token, OrganizationAPI, ProjectAPI, UserAPI } from '@intlayer/backend';
|
|
2
|
+
export type Session = {
|
|
3
|
+
user: UserAPI | null;
|
|
4
|
+
organization: OrganizationAPI | null;
|
|
5
|
+
project: ProjectAPI | null;
|
|
6
|
+
isOrganizationAdmin: boolean;
|
|
7
|
+
isProjectAdmin: boolean;
|
|
8
|
+
};
|
|
9
|
+
type SessionContextProps = {
|
|
10
|
+
session: Session | null | undefined;
|
|
11
|
+
setSession: (session: Session | null) => void;
|
|
12
|
+
fetchSession: () => Promise<Session | null | undefined>;
|
|
13
|
+
revalidateSession: () => Promise<Session | null | undefined>;
|
|
14
|
+
csrfToken: string | null | undefined;
|
|
15
|
+
csrfTokenFetched: boolean;
|
|
16
|
+
oAuth2AccessToken: OAuth2Token | null | undefined;
|
|
17
|
+
isProjectAdmin: boolean | null | undefined;
|
|
18
|
+
isOrganizationAdmin: boolean | null | undefined;
|
|
19
|
+
};
|
|
20
|
+
export declare const useAuth: ({ session: sessionProp, }?: {
|
|
21
|
+
session?: Session | null;
|
|
22
|
+
}) => SessionContextProps;
|
|
23
|
+
export {};
|
|
24
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Auth/useAuth/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,WAAW,EACX,eAAe,EACf,UAAU,EACV,OAAO,EACR,MAAM,mBAAmB,CAAC;AAM3B,MAAM,MAAM,OAAO,GAAG;IACpB,IAAI,EAAE,OAAO,GAAG,IAAI,CAAC;IACrB,YAAY,EAAE,eAAe,GAAG,IAAI,CAAC;IACrC,OAAO,EAAE,UAAU,GAAG,IAAI,CAAC;IAC3B,mBAAmB,EAAE,OAAO,CAAC;IAC7B,cAAc,EAAE,OAAO,CAAC;CACzB,CAAC;AAEF,KAAK,mBAAmB,GAAG;IACzB,OAAO,EAAE,OAAO,GAAG,IAAI,GAAG,SAAS,CAAC;IACpC,UAAU,EAAE,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,KAAK,IAAI,CAAC;IAC9C,YAAY,EAAE,MAAM,OAAO,CAAC,OAAO,GAAG,IAAI,GAAG,SAAS,CAAC,CAAC;IACxD,iBAAiB,EAAE,MAAM,OAAO,CAAC,OAAO,GAAG,IAAI,GAAG,SAAS,CAAC,CAAC;IAC7D,SAAS,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACrC,gBAAgB,EAAE,OAAO,CAAC;IAC1B,iBAAiB,EAAE,WAAW,GAAG,IAAI,GAAG,SAAS,CAAC;IAClD,cAAc,EAAE,OAAO,GAAG,IAAI,GAAG,SAAS,CAAC;IAC3C,mBAAmB,EAAE,OAAO,GAAG,IAAI,GAAG,SAAS,CAAC;CACjD,CAAC;AAEF,eAAO,MAAM,OAAO,+BAEjB;IACD,OAAO,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;CAC1B,wBA8BA,CAAC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useMemo } from "react";
|
|
3
|
+
import { useCSRF } from "./useCSRF.mjs";
|
|
4
|
+
import { useOAuth2 } from "./useOAuth2.mjs";
|
|
5
|
+
import { useSession } from "./useSession.mjs";
|
|
6
|
+
const useAuth = ({
|
|
7
|
+
session: sessionProp
|
|
8
|
+
} = {}) => {
|
|
9
|
+
const { csrfToken, csrfTokenFetched } = useCSRF();
|
|
10
|
+
const { session, fetchSession, revalidateSession, setSession } = useSession(sessionProp);
|
|
11
|
+
const { oAuth2AccessToken } = useOAuth2(csrfToken);
|
|
12
|
+
const memoValue = useMemo(
|
|
13
|
+
() => ({
|
|
14
|
+
session,
|
|
15
|
+
fetchSession,
|
|
16
|
+
setSession,
|
|
17
|
+
revalidateSession,
|
|
18
|
+
csrfToken,
|
|
19
|
+
csrfTokenFetched,
|
|
20
|
+
oAuth2AccessToken,
|
|
21
|
+
isProjectAdmin: session?.isProjectAdmin,
|
|
22
|
+
isOrganizationAdmin: session?.isOrganizationAdmin
|
|
23
|
+
}),
|
|
24
|
+
[
|
|
25
|
+
session,
|
|
26
|
+
setSession,
|
|
27
|
+
fetchSession,
|
|
28
|
+
revalidateSession,
|
|
29
|
+
csrfToken,
|
|
30
|
+
csrfTokenFetched,
|
|
31
|
+
oAuth2AccessToken
|
|
32
|
+
]
|
|
33
|
+
);
|
|
34
|
+
return memoValue;
|
|
35
|
+
};
|
|
36
|
+
export {
|
|
37
|
+
useAuth
|
|
38
|
+
};
|
|
39
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../../../src/components/Auth/useAuth/index.tsx"],"sourcesContent":["'use client';\n\nimport type {\n OAuth2Token,\n OrganizationAPI,\n ProjectAPI,\n UserAPI,\n} from '@intlayer/backend';\nimport { useMemo } from 'react';\nimport { useCSRF } from './useCSRF';\nimport { useOAuth2 } from './useOAuth2';\nimport { useSession } from './useSession';\n\nexport type Session = {\n user: UserAPI | null;\n organization: OrganizationAPI | null;\n project: ProjectAPI | null;\n isOrganizationAdmin: boolean;\n isProjectAdmin: boolean;\n};\n\ntype SessionContextProps = {\n session: Session | null | undefined;\n setSession: (session: Session | null) => void;\n fetchSession: () => Promise<Session | null | undefined>;\n revalidateSession: () => Promise<Session | null | undefined>;\n csrfToken: string | null | undefined;\n csrfTokenFetched: boolean;\n oAuth2AccessToken: OAuth2Token | null | undefined;\n isProjectAdmin: boolean | null | undefined;\n isOrganizationAdmin: boolean | null | undefined;\n};\n\nexport const useAuth = ({\n session: sessionProp,\n}: {\n session?: Session | null;\n} = {}) => {\n const { csrfToken, csrfTokenFetched } = useCSRF();\n const { session, fetchSession, revalidateSession, setSession } =\n useSession(sessionProp);\n const { oAuth2AccessToken } = useOAuth2(csrfToken);\n\n const memoValue: SessionContextProps = useMemo(\n () => ({\n session,\n fetchSession,\n setSession,\n revalidateSession,\n csrfToken,\n csrfTokenFetched,\n oAuth2AccessToken,\n isProjectAdmin: session?.isProjectAdmin,\n isOrganizationAdmin: session?.isOrganizationAdmin,\n }),\n [\n session,\n setSession,\n fetchSession,\n revalidateSession,\n csrfToken,\n csrfTokenFetched,\n oAuth2AccessToken,\n ]\n );\n\n return memoValue;\n};\n"],"names":[],"mappings":";;;;;AAiCO,MAAM,UAAU,CAAC;AAAA,EACtB,SAAS;AACX,IAEI,OAAO;AACT,QAAM,EAAE,WAAW,iBAAiB,IAAI,QAAQ;AAChD,QAAM,EAAE,SAAS,cAAc,mBAAmB,eAChD,WAAW,WAAW;AACxB,QAAM,EAAE,kBAAA,IAAsB,UAAU,SAAS;AAEjD,QAAM,YAAiC;AAAA,IACrC,OAAO;AAAA,MACL;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA,gBAAgB,SAAS;AAAA,MACzB,qBAAqB,SAAS;AAAA,IAAA;AAAA,IAEhC;AAAA,MACE;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,EAAA;AAGK,SAAA;AACT;"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
4
|
+
const hooks_useAsync_useAsync = require("../../../hooks/useAsync/useAsync.cjs");
|
|
5
|
+
const libs_intlayerApi_index = require("../../../libs/intlayer-api/index.cjs");
|
|
6
|
+
const useCSRF = () => {
|
|
7
|
+
const { data, isFetched: csrfTokenFetched } = hooks_useAsync_useAsync.useAsync(
|
|
8
|
+
"getCSRFToken",
|
|
9
|
+
libs_intlayerApi_index.intlayerAPI.auth.getCSRFToken,
|
|
10
|
+
{
|
|
11
|
+
cache: true,
|
|
12
|
+
autoFetch: true
|
|
13
|
+
}
|
|
14
|
+
);
|
|
15
|
+
const csrfToken = data?.data?.csrf_token;
|
|
16
|
+
return {
|
|
17
|
+
csrfToken,
|
|
18
|
+
csrfTokenFetched
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
exports.useCSRF = useCSRF;
|
|
22
|
+
//# sourceMappingURL=useCSRF.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useCSRF.cjs","sources":["../../../../src/components/Auth/useAuth/useCSRF.ts"],"sourcesContent":["'use client';\n\nimport { useAsync } from '../../../hooks/useAsync/useAsync';\nimport { intlayerAPI } from '../../../libs/intlayer-api';\n\nexport const useCSRF = () => {\n const { data, isFetched: csrfTokenFetched } = useAsync(\n 'getCSRFToken',\n intlayerAPI.auth.getCSRFToken,\n {\n cache: true,\n autoFetch: true,\n }\n );\n\n const csrfToken = data?.data?.csrf_token;\n\n return {\n csrfToken,\n csrfTokenFetched,\n };\n};\n"],"names":["useAsync","intlayerAPI"],"mappings":";;;;;AAKO,MAAM,UAAU,MAAM;AAC3B,QAAM,EAAE,MAAM,WAAW,iBAAqB,IAAAA,wBAAA;AAAA,IAC5C;AAAA,IACAC,mCAAY,KAAK;AAAA,IACjB;AAAA,MACE,OAAO;AAAA,MACP,WAAW;AAAA,IACb;AAAA,EAAA;AAGI,QAAA,YAAY,MAAM,MAAM;AAEvB,SAAA;AAAA,IACL;AAAA,IACA;AAAA,EAAA;AAEJ;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useCSRF.d.ts","sourceRoot":"","sources":["../../../../src/components/Auth/useAuth/useCSRF.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,OAAO;;;CAgBnB,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useAsync } from "../../../hooks/useAsync/useAsync.mjs";
|
|
3
|
+
import { intlayerAPI } from "../../../libs/intlayer-api/index.mjs";
|
|
4
|
+
const useCSRF = () => {
|
|
5
|
+
const { data, isFetched: csrfTokenFetched } = useAsync(
|
|
6
|
+
"getCSRFToken",
|
|
7
|
+
intlayerAPI.auth.getCSRFToken,
|
|
8
|
+
{
|
|
9
|
+
cache: true,
|
|
10
|
+
autoFetch: true
|
|
11
|
+
}
|
|
12
|
+
);
|
|
13
|
+
const csrfToken = data?.data?.csrf_token;
|
|
14
|
+
return {
|
|
15
|
+
csrfToken,
|
|
16
|
+
csrfTokenFetched
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
export {
|
|
20
|
+
useCSRF
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=useCSRF.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useCSRF.mjs","sources":["../../../../src/components/Auth/useAuth/useCSRF.ts"],"sourcesContent":["'use client';\n\nimport { useAsync } from '../../../hooks/useAsync/useAsync';\nimport { intlayerAPI } from '../../../libs/intlayer-api';\n\nexport const useCSRF = () => {\n const { data, isFetched: csrfTokenFetched } = useAsync(\n 'getCSRFToken',\n intlayerAPI.auth.getCSRFToken,\n {\n cache: true,\n autoFetch: true,\n }\n );\n\n const csrfToken = data?.data?.csrf_token;\n\n return {\n csrfToken,\n csrfTokenFetched,\n };\n};\n"],"names":[],"mappings":";;;AAKO,MAAM,UAAU,MAAM;AAC3B,QAAM,EAAE,MAAM,WAAW,iBAAqB,IAAA;AAAA,IAC5C;AAAA,IACA,YAAY,KAAK;AAAA,IACjB;AAAA,MACE,OAAO;AAAA,MACP,WAAW;AAAA,IACb;AAAA,EAAA;AAGI,QAAA,YAAY,MAAM,MAAM;AAEvB,SAAA;AAAA,IACL;AAAA,IACA;AAAA,EAAA;AAEJ;"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
4
|
+
const client = require("@intlayer/config/client");
|
|
5
|
+
const hooks_useAsync_useAsync = require("../../../hooks/useAsync/useAsync.cjs");
|
|
6
|
+
const libs_intlayerApi_index = require("../../../libs/intlayer-api/index.cjs");
|
|
7
|
+
const useOAuth2 = (csrfToken) => {
|
|
8
|
+
const { clientId, clientSecret } = client.getConfiguration().editor;
|
|
9
|
+
const { data } = hooks_useAsync_useAsync.useAsync(
|
|
10
|
+
"getOAuth2AccessToken",
|
|
11
|
+
() => libs_intlayerApi_index.intlayerAPI.auth.getOAuth2AccessToken({
|
|
12
|
+
body: { csrf_token: csrfToken }
|
|
13
|
+
}),
|
|
14
|
+
{
|
|
15
|
+
cache: true,
|
|
16
|
+
autoFetch: true,
|
|
17
|
+
enable: !!(clientId && clientSecret && csrfToken)
|
|
18
|
+
}
|
|
19
|
+
);
|
|
20
|
+
const oAuth2AccessToken = data?.data;
|
|
21
|
+
return {
|
|
22
|
+
oAuth2AccessToken
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
exports.useOAuth2 = useOAuth2;
|
|
26
|
+
//# sourceMappingURL=useOAuth2.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useOAuth2.cjs","sources":["../../../../src/components/Auth/useAuth/useOAuth2.ts"],"sourcesContent":["'use client';\n\nimport { getConfiguration } from '@intlayer/config/client';\nimport { useAsync } from '../../../hooks/useAsync/useAsync';\nimport { intlayerAPI } from '../../../libs/intlayer-api';\n\nexport const useOAuth2 = (csrfToken: string | null | undefined) => {\n const { clientId, clientSecret } = getConfiguration().editor;\n\n const { data } = useAsync(\n 'getOAuth2AccessToken',\n () =>\n intlayerAPI.auth.getOAuth2AccessToken({\n body: { csrf_token: csrfToken },\n }),\n {\n cache: true,\n autoFetch: true,\n enable: !!(clientId && clientSecret && csrfToken),\n }\n );\n\n const oAuth2AccessToken = data?.data;\n\n return {\n oAuth2AccessToken,\n };\n};\n"],"names":["getConfiguration","useAsync","intlayerAPI"],"mappings":";;;;;;AAMa,MAAA,YAAY,CAAC,cAAyC;AACjE,QAAM,EAAE,UAAU,aAAa,IAAIA,0BAAmB;AAEhD,QAAA,EAAE,SAASC,wBAAA;AAAA,IACf;AAAA,IACA,MACEC,uBAAY,YAAA,KAAK,qBAAqB;AAAA,MACpC,MAAM,EAAE,YAAY,UAAU;AAAA,IAAA,CAC/B;AAAA,IACH;AAAA,MACE,OAAO;AAAA,MACP,WAAW;AAAA,MACX,QAAQ,CAAC,EAAE,YAAY,gBAAgB;AAAA,IACzC;AAAA,EAAA;AAGF,QAAM,oBAAoB,MAAM;AAEzB,SAAA;AAAA,IACL;AAAA,EAAA;AAEJ;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useOAuth2.d.ts","sourceRoot":"","sources":["../../../../src/components/Auth/useAuth/useOAuth2.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,SAAS,cAAe,MAAM,GAAG,IAAI,GAAG,SAAS;;CAqB7D,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { getConfiguration } from "@intlayer/config/client";
|
|
3
|
+
import { useAsync } from "../../../hooks/useAsync/useAsync.mjs";
|
|
4
|
+
import { intlayerAPI } from "../../../libs/intlayer-api/index.mjs";
|
|
5
|
+
const useOAuth2 = (csrfToken) => {
|
|
6
|
+
const { clientId, clientSecret } = getConfiguration().editor;
|
|
7
|
+
const { data } = useAsync(
|
|
8
|
+
"getOAuth2AccessToken",
|
|
9
|
+
() => intlayerAPI.auth.getOAuth2AccessToken({
|
|
10
|
+
body: { csrf_token: csrfToken }
|
|
11
|
+
}),
|
|
12
|
+
{
|
|
13
|
+
cache: true,
|
|
14
|
+
autoFetch: true,
|
|
15
|
+
enable: !!(clientId && clientSecret && csrfToken)
|
|
16
|
+
}
|
|
17
|
+
);
|
|
18
|
+
const oAuth2AccessToken = data?.data;
|
|
19
|
+
return {
|
|
20
|
+
oAuth2AccessToken
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
export {
|
|
24
|
+
useOAuth2
|
|
25
|
+
};
|
|
26
|
+
//# sourceMappingURL=useOAuth2.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useOAuth2.mjs","sources":["../../../../src/components/Auth/useAuth/useOAuth2.ts"],"sourcesContent":["'use client';\n\nimport { getConfiguration } from '@intlayer/config/client';\nimport { useAsync } from '../../../hooks/useAsync/useAsync';\nimport { intlayerAPI } from '../../../libs/intlayer-api';\n\nexport const useOAuth2 = (csrfToken: string | null | undefined) => {\n const { clientId, clientSecret } = getConfiguration().editor;\n\n const { data } = useAsync(\n 'getOAuth2AccessToken',\n () =>\n intlayerAPI.auth.getOAuth2AccessToken({\n body: { csrf_token: csrfToken },\n }),\n {\n cache: true,\n autoFetch: true,\n enable: !!(clientId && clientSecret && csrfToken),\n }\n );\n\n const oAuth2AccessToken = data?.data;\n\n return {\n oAuth2AccessToken,\n };\n};\n"],"names":[],"mappings":";;;;AAMa,MAAA,YAAY,CAAC,cAAyC;AACjE,QAAM,EAAE,UAAU,aAAa,IAAI,mBAAmB;AAEhD,QAAA,EAAE,SAAS;AAAA,IACf;AAAA,IACA,MACE,YAAY,KAAK,qBAAqB;AAAA,MACpC,MAAM,EAAE,YAAY,UAAU;AAAA,IAAA,CAC/B;AAAA,IACH;AAAA,MACE,OAAO;AAAA,MACP,WAAW;AAAA,MACX,QAAQ,CAAC,EAAE,YAAY,gBAAgB;AAAA,IACzC;AAAA,EAAA;AAGF,QAAM,oBAAoB,MAAM;AAEzB,SAAA;AAAA,IACL;AAAA,EAAA;AAEJ;"}
|