@contember/react-client-tenant 2.1.0-beta.2 → 2.2.0-alpha.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/development/index.cjs +18 -0
- package/dist/development/index.cjs.map +1 -1
- package/dist/development/index.js +19 -1
- package/dist/development/index.js.map +1 -1
- package/dist/development/src/components/IdentityProvider.cjs.map +1 -1
- package/dist/development/src/components/IdentityProvider.js.map +1 -1
- package/dist/development/src/components/IdentityState.cjs.map +1 -1
- package/dist/development/src/components/IdentityState.js.map +1 -1
- package/dist/development/src/components/forms/ChangeMyPasswordForm.cjs.map +1 -1
- package/dist/development/src/components/forms/ChangeMyPasswordForm.js.map +1 -1
- package/dist/development/src/components/forms/ConfirmEmailChangeForm.cjs +52 -0
- package/dist/development/src/components/forms/ConfirmEmailChangeForm.cjs.map +1 -0
- package/dist/development/src/components/forms/ConfirmEmailChangeForm.js +52 -0
- package/dist/development/src/components/forms/ConfirmEmailChangeForm.js.map +1 -0
- package/dist/development/src/components/forms/CreateApiKeyForm.cjs.map +1 -1
- package/dist/development/src/components/forms/CreateApiKeyForm.js.map +1 -1
- package/dist/development/src/components/forms/CreateSessionTokenForm.cjs.map +1 -1
- package/dist/development/src/components/forms/CreateSessionTokenForm.js.map +1 -1
- package/dist/development/src/components/forms/InviteForm.cjs.map +1 -1
- package/dist/development/src/components/forms/InviteForm.js.map +1 -1
- package/dist/development/src/components/forms/LoginForm.cjs +3 -1
- package/dist/development/src/components/forms/LoginForm.cjs.map +1 -1
- package/dist/development/src/components/forms/LoginForm.js +3 -1
- package/dist/development/src/components/forms/LoginForm.js.map +1 -1
- package/dist/development/src/components/forms/OtpConfirmForm.cjs.map +1 -1
- package/dist/development/src/components/forms/OtpConfirmForm.js.map +1 -1
- package/dist/development/src/components/forms/OtpPrepareForm.cjs.map +1 -1
- package/dist/development/src/components/forms/OtpPrepareForm.js.map +1 -1
- package/dist/development/src/components/forms/PasswordResetForm.cjs.map +1 -1
- package/dist/development/src/components/forms/PasswordResetForm.js.map +1 -1
- package/dist/development/src/components/forms/PasswordResetRequestForm.cjs +3 -1
- package/dist/development/src/components/forms/PasswordResetRequestForm.cjs.map +1 -1
- package/dist/development/src/components/forms/PasswordResetRequestForm.js +3 -1
- package/dist/development/src/components/forms/PasswordResetRequestForm.js.map +1 -1
- package/dist/development/src/components/forms/PasswordlessSignInForm.cjs +2 -1
- package/dist/development/src/components/forms/PasswordlessSignInForm.cjs.map +1 -1
- package/dist/development/src/components/forms/PasswordlessSignInForm.js +2 -1
- package/dist/development/src/components/forms/PasswordlessSignInForm.js.map +1 -1
- package/dist/development/src/components/forms/PasswordlessSignInInitForm.cjs +3 -1
- package/dist/development/src/components/forms/PasswordlessSignInInitForm.cjs.map +1 -1
- package/dist/development/src/components/forms/PasswordlessSignInInitForm.js +3 -1
- package/dist/development/src/components/forms/PasswordlessSignInInitForm.js.map +1 -1
- package/dist/development/src/components/forms/RequestEmailVerificationForm.cjs +50 -0
- package/dist/development/src/components/forms/RequestEmailVerificationForm.cjs.map +1 -0
- package/dist/development/src/components/forms/RequestEmailVerificationForm.js +50 -0
- package/dist/development/src/components/forms/RequestEmailVerificationForm.js.map +1 -0
- package/dist/development/src/components/forms/TenantForm.cjs.map +1 -1
- package/dist/development/src/components/forms/TenantForm.js.map +1 -1
- package/dist/development/src/components/forms/UpdateProjectMemberForm.cjs.map +1 -1
- package/dist/development/src/components/forms/UpdateProjectMemberForm.js.map +1 -1
- package/dist/development/src/components/forms/VerifyEmailForm.cjs +50 -0
- package/dist/development/src/components/forms/VerifyEmailForm.cjs.map +1 -0
- package/dist/development/src/components/forms/VerifyEmailForm.js +50 -0
- package/dist/development/src/components/forms/VerifyEmailForm.js.map +1 -0
- package/dist/development/src/components/idp/IDP.cjs.map +1 -1
- package/dist/development/src/components/idp/IDP.js.map +1 -1
- package/dist/development/src/components/idp/IDPInitTrigger.cjs.map +1 -1
- package/dist/development/src/components/idp/IDPInitTrigger.js.map +1 -1
- package/dist/development/src/components/idp/IDPState.cjs.map +1 -1
- package/dist/development/src/components/idp/IDPState.js.map +1 -1
- package/dist/development/src/components/triggers/DisableOtpTrigger.cjs.map +1 -1
- package/dist/development/src/components/triggers/DisableOtpTrigger.js.map +1 -1
- package/dist/development/src/components/triggers/LogoutTrigger.cjs +3 -3
- package/dist/development/src/components/triggers/LogoutTrigger.cjs.map +1 -1
- package/dist/development/src/components/triggers/LogoutTrigger.js +3 -3
- package/dist/development/src/components/triggers/LogoutTrigger.js.map +1 -1
- package/dist/development/src/components/triggers/RemoveProjectMemberTrigger.cjs.map +1 -1
- package/dist/development/src/components/triggers/RemoveProjectMemberTrigger.js.map +1 -1
- package/dist/development/src/contexts.cjs.map +1 -1
- package/dist/development/src/contexts.js.map +1 -1
- package/dist/development/src/hooks/mutations/apiKey/useCreateApiKeyMutation.cjs.map +1 -1
- package/dist/development/src/hooks/mutations/apiKey/useCreateApiKeyMutation.js.map +1 -1
- package/dist/development/src/hooks/mutations/apiKey/useCreateGlobalApiKeyMutation.cjs.map +1 -1
- package/dist/development/src/hooks/mutations/apiKey/useCreateGlobalApiKeyMutation.js.map +1 -1
- package/dist/development/src/hooks/mutations/apiKey/useCreateSessionTokenMutation.cjs.map +1 -1
- package/dist/development/src/hooks/mutations/apiKey/useCreateSessionTokenMutation.js.map +1 -1
- package/dist/development/src/hooks/mutations/apiKey/useDisableApiKeyMutation.cjs.map +1 -1
- package/dist/development/src/hooks/mutations/apiKey/useDisableApiKeyMutation.js.map +1 -1
- package/dist/development/src/hooks/mutations/auth/useChangeMyPasswordMutation.cjs.map +1 -1
- package/dist/development/src/hooks/mutations/auth/useChangeMyPasswordMutation.js.map +1 -1
- package/dist/development/src/hooks/mutations/auth/useSignInMutation.cjs.map +1 -1
- package/dist/development/src/hooks/mutations/auth/useSignInMutation.js.map +1 -1
- package/dist/development/src/hooks/mutations/auth/useSignOutMutation.cjs.map +1 -1
- package/dist/development/src/hooks/mutations/auth/useSignOutMutation.js.map +1 -1
- package/dist/development/src/hooks/mutations/emailVerification/useConfirmEmailChangeMutation.cjs +32 -0
- package/dist/development/src/hooks/mutations/emailVerification/useConfirmEmailChangeMutation.cjs.map +1 -0
- package/dist/development/src/hooks/mutations/emailVerification/useConfirmEmailChangeMutation.js +15 -0
- package/dist/development/src/hooks/mutations/emailVerification/useConfirmEmailChangeMutation.js.map +1 -0
- package/dist/development/src/hooks/mutations/emailVerification/useRequestEmailVerificationMutation.cjs +32 -0
- package/dist/development/src/hooks/mutations/emailVerification/useRequestEmailVerificationMutation.cjs.map +1 -0
- package/dist/development/src/hooks/mutations/emailVerification/useRequestEmailVerificationMutation.js +15 -0
- package/dist/development/src/hooks/mutations/emailVerification/useRequestEmailVerificationMutation.js.map +1 -0
- package/dist/development/src/hooks/mutations/emailVerification/useVerifyEmailMutation.cjs +32 -0
- package/dist/development/src/hooks/mutations/emailVerification/useVerifyEmailMutation.cjs.map +1 -0
- package/dist/development/src/hooks/mutations/emailVerification/useVerifyEmailMutation.js +15 -0
- package/dist/development/src/hooks/mutations/emailVerification/useVerifyEmailMutation.js.map +1 -0
- package/dist/development/src/hooks/mutations/idp/useInitSignInIDPMutation.cjs.map +1 -1
- package/dist/development/src/hooks/mutations/idp/useInitSignInIDPMutation.js.map +1 -1
- package/dist/development/src/hooks/mutations/idp/useSignInIdpMutation.cjs.map +1 -1
- package/dist/development/src/hooks/mutations/idp/useSignInIdpMutation.js.map +1 -1
- package/dist/development/src/hooks/mutations/invite/useInviteMutation.cjs.map +1 -1
- package/dist/development/src/hooks/mutations/invite/useInviteMutation.js.map +1 -1
- package/dist/development/src/hooks/mutations/memberships/useAddProjectMemberMutation.cjs.map +1 -1
- package/dist/development/src/hooks/mutations/memberships/useAddProjectMemberMutation.js.map +1 -1
- package/dist/development/src/hooks/mutations/memberships/useRemoveProjectMemberMutation.cjs.map +1 -1
- package/dist/development/src/hooks/mutations/memberships/useRemoveProjectMemberMutation.js.map +1 -1
- package/dist/development/src/hooks/mutations/memberships/useUpdateProjectMemberMutation.cjs.map +1 -1
- package/dist/development/src/hooks/mutations/memberships/useUpdateProjectMemberMutation.js.map +1 -1
- package/dist/development/src/hooks/mutations/otp/useConfirmOtpMutation.cjs.map +1 -1
- package/dist/development/src/hooks/mutations/otp/useConfirmOtpMutation.js.map +1 -1
- package/dist/development/src/hooks/mutations/otp/useDisableOtpMutation.cjs.map +1 -1
- package/dist/development/src/hooks/mutations/otp/useDisableOtpMutation.js.map +1 -1
- package/dist/development/src/hooks/mutations/otp/usePrepareOtpMutation.cjs.map +1 -1
- package/dist/development/src/hooks/mutations/otp/usePrepareOtpMutation.js.map +1 -1
- package/dist/development/src/hooks/mutations/passwordReset/useCreateResetPasswordRequestMutation.cjs.map +1 -1
- package/dist/development/src/hooks/mutations/passwordReset/useCreateResetPasswordRequestMutation.js.map +1 -1
- package/dist/development/src/hooks/mutations/passwordReset/useResetPasswordMutation.cjs.map +1 -1
- package/dist/development/src/hooks/mutations/passwordReset/useResetPasswordMutation.js.map +1 -1
- package/dist/development/src/hooks/mutations/passwordless/useActivatePasswordlessOtpMutation.cjs.map +1 -1
- package/dist/development/src/hooks/mutations/passwordless/useActivatePasswordlessOtpMutation.js.map +1 -1
- package/dist/development/src/hooks/mutations/passwordless/useDisableMyPasswordlessMutation.cjs.map +1 -1
- package/dist/development/src/hooks/mutations/passwordless/useDisableMyPasswordlessMutation.js.map +1 -1
- package/dist/development/src/hooks/mutations/passwordless/useEnableMyPasswordlessMutation.cjs.map +1 -1
- package/dist/development/src/hooks/mutations/passwordless/useEnableMyPasswordlessMutation.js.map +1 -1
- package/dist/development/src/hooks/mutations/passwordless/useInitSignInPasswordlessMutation.cjs.map +1 -1
- package/dist/development/src/hooks/mutations/passwordless/useInitSignInPasswordlessMutation.js.map +1 -1
- package/dist/development/src/hooks/mutations/passwordless/useSignInPasswordlessMutation.cjs.map +1 -1
- package/dist/development/src/hooks/mutations/passwordless/useSignInPasswordlessMutation.js.map +1 -1
- package/dist/development/src/hooks/mutations/profile/useChangeMyProfile.cjs.map +1 -1
- package/dist/development/src/hooks/mutations/profile/useChangeMyProfile.js.map +1 -1
- package/dist/development/src/hooks/mutations/profile/useChangeProfile.cjs.map +1 -1
- package/dist/development/src/hooks/mutations/profile/useChangeProfile.js.map +1 -1
- package/dist/development/src/hooks/queries/useMeQuery.cjs.map +1 -1
- package/dist/development/src/hooks/queries/useMeQuery.js.map +1 -1
- package/dist/development/src/hooks/queries/useProjectMembersQuery.cjs.map +1 -1
- package/dist/development/src/hooks/queries/useProjectMembersQuery.js.map +1 -1
- package/dist/development/src/hooks/queries/useProjectMembershipsQuery.cjs.map +1 -1
- package/dist/development/src/hooks/queries/useProjectMembershipsQuery.js.map +1 -1
- package/dist/development/src/hooks/queries/useProjectRolesDefinitionQuery.cjs.map +1 -1
- package/dist/development/src/hooks/queries/useProjectRolesDefinitionQuery.js.map +1 -1
- package/dist/development/src/hooks/useFetchIdentity.cjs.map +1 -1
- package/dist/development/src/hooks/useFetchIdentity.js.map +1 -1
- package/dist/development/src/hooks/useLogout.cjs.map +1 -1
- package/dist/development/src/hooks/useLogout.js.map +1 -1
- package/dist/development/src/hooks/usePasswordlessOtpActivator.cjs.map +1 -1
- package/dist/development/src/hooks/usePasswordlessOtpActivator.js.map +1 -1
- package/dist/development/src/hooks/useTenantMutation.cjs.map +1 -1
- package/dist/development/src/hooks/useTenantMutation.js.map +1 -1
- package/dist/development/src/internal/hooks/useHandleIDPResponse.cjs.map +1 -1
- package/dist/development/src/internal/hooks/useHandleIDPResponse.js.map +1 -1
- package/dist/development/src/internal/hooks/useInitIDPRedirect.cjs.map +1 -1
- package/dist/development/src/internal/hooks/useInitIDPRedirect.js.map +1 -1
- package/dist/development/src/internal/hooks/useLogoutInternal.cjs +12 -7
- package/dist/development/src/internal/hooks/useLogoutInternal.cjs.map +1 -1
- package/dist/development/src/internal/hooks/useLogoutInternal.js +13 -8
- package/dist/development/src/internal/hooks/useLogoutInternal.js.map +1 -1
- package/dist/development/src/internal/hooks/useRedirectToBacklink.cjs.map +1 -1
- package/dist/development/src/internal/hooks/useRedirectToBacklink.js.map +1 -1
- package/dist/production/index.cjs +18 -0
- package/dist/production/index.cjs.map +1 -1
- package/dist/production/index.js +19 -1
- package/dist/production/index.js.map +1 -1
- package/dist/production/src/components/IdentityProvider.cjs.map +1 -1
- package/dist/production/src/components/IdentityProvider.js.map +1 -1
- package/dist/production/src/components/IdentityState.cjs.map +1 -1
- package/dist/production/src/components/IdentityState.js.map +1 -1
- package/dist/production/src/components/forms/ChangeMyPasswordForm.cjs.map +1 -1
- package/dist/production/src/components/forms/ChangeMyPasswordForm.js.map +1 -1
- package/dist/production/src/components/forms/ConfirmEmailChangeForm.cjs +44 -0
- package/dist/production/src/components/forms/ConfirmEmailChangeForm.cjs.map +1 -0
- package/dist/production/src/components/forms/ConfirmEmailChangeForm.js +44 -0
- package/dist/production/src/components/forms/ConfirmEmailChangeForm.js.map +1 -0
- package/dist/production/src/components/forms/CreateApiKeyForm.cjs.map +1 -1
- package/dist/production/src/components/forms/CreateApiKeyForm.js.map +1 -1
- package/dist/production/src/components/forms/CreateSessionTokenForm.cjs.map +1 -1
- package/dist/production/src/components/forms/CreateSessionTokenForm.js.map +1 -1
- package/dist/production/src/components/forms/InviteForm.cjs.map +1 -1
- package/dist/production/src/components/forms/InviteForm.js.map +1 -1
- package/dist/production/src/components/forms/LoginForm.cjs +3 -1
- package/dist/production/src/components/forms/LoginForm.cjs.map +1 -1
- package/dist/production/src/components/forms/LoginForm.js +3 -1
- package/dist/production/src/components/forms/LoginForm.js.map +1 -1
- package/dist/production/src/components/forms/OtpConfirmForm.cjs.map +1 -1
- package/dist/production/src/components/forms/OtpConfirmForm.js.map +1 -1
- package/dist/production/src/components/forms/OtpPrepareForm.cjs.map +1 -1
- package/dist/production/src/components/forms/OtpPrepareForm.js.map +1 -1
- package/dist/production/src/components/forms/PasswordResetForm.cjs.map +1 -1
- package/dist/production/src/components/forms/PasswordResetForm.js.map +1 -1
- package/dist/production/src/components/forms/PasswordResetRequestForm.cjs +3 -1
- package/dist/production/src/components/forms/PasswordResetRequestForm.cjs.map +1 -1
- package/dist/production/src/components/forms/PasswordResetRequestForm.js +3 -1
- package/dist/production/src/components/forms/PasswordResetRequestForm.js.map +1 -1
- package/dist/production/src/components/forms/PasswordlessSignInForm.cjs +2 -1
- package/dist/production/src/components/forms/PasswordlessSignInForm.cjs.map +1 -1
- package/dist/production/src/components/forms/PasswordlessSignInForm.js +2 -1
- package/dist/production/src/components/forms/PasswordlessSignInForm.js.map +1 -1
- package/dist/production/src/components/forms/PasswordlessSignInInitForm.cjs +3 -1
- package/dist/production/src/components/forms/PasswordlessSignInInitForm.cjs.map +1 -1
- package/dist/production/src/components/forms/PasswordlessSignInInitForm.js +3 -1
- package/dist/production/src/components/forms/PasswordlessSignInInitForm.js.map +1 -1
- package/dist/production/src/components/forms/RequestEmailVerificationForm.cjs +42 -0
- package/dist/production/src/components/forms/RequestEmailVerificationForm.cjs.map +1 -0
- package/dist/production/src/components/forms/RequestEmailVerificationForm.js +42 -0
- package/dist/production/src/components/forms/RequestEmailVerificationForm.js.map +1 -0
- package/dist/production/src/components/forms/TenantForm.cjs.map +1 -1
- package/dist/production/src/components/forms/TenantForm.js.map +1 -1
- package/dist/production/src/components/forms/UpdateProjectMemberForm.cjs.map +1 -1
- package/dist/production/src/components/forms/UpdateProjectMemberForm.js.map +1 -1
- package/dist/production/src/components/forms/VerifyEmailForm.cjs +42 -0
- package/dist/production/src/components/forms/VerifyEmailForm.cjs.map +1 -0
- package/dist/production/src/components/forms/VerifyEmailForm.js +42 -0
- package/dist/production/src/components/forms/VerifyEmailForm.js.map +1 -0
- package/dist/production/src/components/idp/IDP.cjs.map +1 -1
- package/dist/production/src/components/idp/IDP.js.map +1 -1
- package/dist/production/src/components/idp/IDPInitTrigger.cjs.map +1 -1
- package/dist/production/src/components/idp/IDPInitTrigger.js.map +1 -1
- package/dist/production/src/components/idp/IDPState.cjs.map +1 -1
- package/dist/production/src/components/idp/IDPState.js.map +1 -1
- package/dist/production/src/components/triggers/DisableOtpTrigger.cjs.map +1 -1
- package/dist/production/src/components/triggers/DisableOtpTrigger.js.map +1 -1
- package/dist/production/src/components/triggers/LogoutTrigger.cjs +2 -2
- package/dist/production/src/components/triggers/LogoutTrigger.cjs.map +1 -1
- package/dist/production/src/components/triggers/LogoutTrigger.js +2 -2
- package/dist/production/src/components/triggers/LogoutTrigger.js.map +1 -1
- package/dist/production/src/components/triggers/RemoveProjectMemberTrigger.cjs.map +1 -1
- package/dist/production/src/components/triggers/RemoveProjectMemberTrigger.js.map +1 -1
- package/dist/production/src/contexts.cjs.map +1 -1
- package/dist/production/src/contexts.js.map +1 -1
- package/dist/production/src/hooks/mutations/apiKey/useCreateApiKeyMutation.cjs.map +1 -1
- package/dist/production/src/hooks/mutations/apiKey/useCreateApiKeyMutation.js.map +1 -1
- package/dist/production/src/hooks/mutations/apiKey/useCreateGlobalApiKeyMutation.cjs.map +1 -1
- package/dist/production/src/hooks/mutations/apiKey/useCreateGlobalApiKeyMutation.js.map +1 -1
- package/dist/production/src/hooks/mutations/apiKey/useCreateSessionTokenMutation.cjs.map +1 -1
- package/dist/production/src/hooks/mutations/apiKey/useCreateSessionTokenMutation.js.map +1 -1
- package/dist/production/src/hooks/mutations/apiKey/useDisableApiKeyMutation.cjs.map +1 -1
- package/dist/production/src/hooks/mutations/apiKey/useDisableApiKeyMutation.js.map +1 -1
- package/dist/production/src/hooks/mutations/auth/useChangeMyPasswordMutation.cjs.map +1 -1
- package/dist/production/src/hooks/mutations/auth/useChangeMyPasswordMutation.js.map +1 -1
- package/dist/production/src/hooks/mutations/auth/useSignInMutation.cjs.map +1 -1
- package/dist/production/src/hooks/mutations/auth/useSignInMutation.js.map +1 -1
- package/dist/production/src/hooks/mutations/auth/useSignOutMutation.cjs.map +1 -1
- package/dist/production/src/hooks/mutations/auth/useSignOutMutation.js.map +1 -1
- package/dist/production/src/hooks/mutations/emailVerification/useConfirmEmailChangeMutation.cjs +32 -0
- package/dist/production/src/hooks/mutations/emailVerification/useConfirmEmailChangeMutation.cjs.map +1 -0
- package/dist/production/src/hooks/mutations/emailVerification/useConfirmEmailChangeMutation.js +15 -0
- package/dist/production/src/hooks/mutations/emailVerification/useConfirmEmailChangeMutation.js.map +1 -0
- package/dist/production/src/hooks/mutations/emailVerification/useRequestEmailVerificationMutation.cjs +32 -0
- package/dist/production/src/hooks/mutations/emailVerification/useRequestEmailVerificationMutation.cjs.map +1 -0
- package/dist/production/src/hooks/mutations/emailVerification/useRequestEmailVerificationMutation.js +15 -0
- package/dist/production/src/hooks/mutations/emailVerification/useRequestEmailVerificationMutation.js.map +1 -0
- package/dist/production/src/hooks/mutations/emailVerification/useVerifyEmailMutation.cjs +32 -0
- package/dist/production/src/hooks/mutations/emailVerification/useVerifyEmailMutation.cjs.map +1 -0
- package/dist/production/src/hooks/mutations/emailVerification/useVerifyEmailMutation.js +15 -0
- package/dist/production/src/hooks/mutations/emailVerification/useVerifyEmailMutation.js.map +1 -0
- package/dist/production/src/hooks/mutations/idp/useInitSignInIDPMutation.cjs.map +1 -1
- package/dist/production/src/hooks/mutations/idp/useInitSignInIDPMutation.js.map +1 -1
- package/dist/production/src/hooks/mutations/idp/useSignInIdpMutation.cjs.map +1 -1
- package/dist/production/src/hooks/mutations/idp/useSignInIdpMutation.js.map +1 -1
- package/dist/production/src/hooks/mutations/invite/useInviteMutation.cjs.map +1 -1
- package/dist/production/src/hooks/mutations/invite/useInviteMutation.js.map +1 -1
- package/dist/production/src/hooks/mutations/memberships/useAddProjectMemberMutation.cjs.map +1 -1
- package/dist/production/src/hooks/mutations/memberships/useAddProjectMemberMutation.js.map +1 -1
- package/dist/production/src/hooks/mutations/memberships/useRemoveProjectMemberMutation.cjs.map +1 -1
- package/dist/production/src/hooks/mutations/memberships/useRemoveProjectMemberMutation.js.map +1 -1
- package/dist/production/src/hooks/mutations/memberships/useUpdateProjectMemberMutation.cjs.map +1 -1
- package/dist/production/src/hooks/mutations/memberships/useUpdateProjectMemberMutation.js.map +1 -1
- package/dist/production/src/hooks/mutations/otp/useConfirmOtpMutation.cjs.map +1 -1
- package/dist/production/src/hooks/mutations/otp/useConfirmOtpMutation.js.map +1 -1
- package/dist/production/src/hooks/mutations/otp/useDisableOtpMutation.cjs.map +1 -1
- package/dist/production/src/hooks/mutations/otp/useDisableOtpMutation.js.map +1 -1
- package/dist/production/src/hooks/mutations/otp/usePrepareOtpMutation.cjs.map +1 -1
- package/dist/production/src/hooks/mutations/otp/usePrepareOtpMutation.js.map +1 -1
- package/dist/production/src/hooks/mutations/passwordReset/useCreateResetPasswordRequestMutation.cjs.map +1 -1
- package/dist/production/src/hooks/mutations/passwordReset/useCreateResetPasswordRequestMutation.js.map +1 -1
- package/dist/production/src/hooks/mutations/passwordReset/useResetPasswordMutation.cjs.map +1 -1
- package/dist/production/src/hooks/mutations/passwordReset/useResetPasswordMutation.js.map +1 -1
- package/dist/production/src/hooks/mutations/passwordless/useActivatePasswordlessOtpMutation.cjs.map +1 -1
- package/dist/production/src/hooks/mutations/passwordless/useActivatePasswordlessOtpMutation.js.map +1 -1
- package/dist/production/src/hooks/mutations/passwordless/useDisableMyPasswordlessMutation.cjs.map +1 -1
- package/dist/production/src/hooks/mutations/passwordless/useDisableMyPasswordlessMutation.js.map +1 -1
- package/dist/production/src/hooks/mutations/passwordless/useEnableMyPasswordlessMutation.cjs.map +1 -1
- package/dist/production/src/hooks/mutations/passwordless/useEnableMyPasswordlessMutation.js.map +1 -1
- package/dist/production/src/hooks/mutations/passwordless/useInitSignInPasswordlessMutation.cjs.map +1 -1
- package/dist/production/src/hooks/mutations/passwordless/useInitSignInPasswordlessMutation.js.map +1 -1
- package/dist/production/src/hooks/mutations/passwordless/useSignInPasswordlessMutation.cjs.map +1 -1
- package/dist/production/src/hooks/mutations/passwordless/useSignInPasswordlessMutation.js.map +1 -1
- package/dist/production/src/hooks/mutations/profile/useChangeMyProfile.cjs.map +1 -1
- package/dist/production/src/hooks/mutations/profile/useChangeMyProfile.js.map +1 -1
- package/dist/production/src/hooks/mutations/profile/useChangeProfile.cjs.map +1 -1
- package/dist/production/src/hooks/mutations/profile/useChangeProfile.js.map +1 -1
- package/dist/production/src/hooks/queries/useMeQuery.cjs.map +1 -1
- package/dist/production/src/hooks/queries/useMeQuery.js.map +1 -1
- package/dist/production/src/hooks/queries/useProjectMembersQuery.cjs.map +1 -1
- package/dist/production/src/hooks/queries/useProjectMembersQuery.js.map +1 -1
- package/dist/production/src/hooks/queries/useProjectMembershipsQuery.cjs.map +1 -1
- package/dist/production/src/hooks/queries/useProjectMembershipsQuery.js.map +1 -1
- package/dist/production/src/hooks/queries/useProjectRolesDefinitionQuery.cjs.map +1 -1
- package/dist/production/src/hooks/queries/useProjectRolesDefinitionQuery.js.map +1 -1
- package/dist/production/src/hooks/useFetchIdentity.cjs.map +1 -1
- package/dist/production/src/hooks/useFetchIdentity.js.map +1 -1
- package/dist/production/src/hooks/useLogout.cjs.map +1 -1
- package/dist/production/src/hooks/useLogout.js.map +1 -1
- package/dist/production/src/hooks/usePasswordlessOtpActivator.cjs.map +1 -1
- package/dist/production/src/hooks/usePasswordlessOtpActivator.js.map +1 -1
- package/dist/production/src/hooks/useTenantMutation.cjs.map +1 -1
- package/dist/production/src/hooks/useTenantMutation.js.map +1 -1
- package/dist/production/src/internal/hooks/useHandleIDPResponse.cjs.map +1 -1
- package/dist/production/src/internal/hooks/useHandleIDPResponse.js.map +1 -1
- package/dist/production/src/internal/hooks/useInitIDPRedirect.cjs.map +1 -1
- package/dist/production/src/internal/hooks/useInitIDPRedirect.js.map +1 -1
- package/dist/production/src/internal/hooks/useLogoutInternal.cjs +12 -7
- package/dist/production/src/internal/hooks/useLogoutInternal.cjs.map +1 -1
- package/dist/production/src/internal/hooks/useLogoutInternal.js +13 -8
- package/dist/production/src/internal/hooks/useLogoutInternal.js.map +1 -1
- package/dist/production/src/internal/hooks/useRedirectToBacklink.cjs.map +1 -1
- package/dist/production/src/internal/hooks/useRedirectToBacklink.js.map +1 -1
- package/dist/types/components/IdentityState.d.ts +1 -1
- package/dist/types/components/IdentityState.d.ts.map +1 -1
- package/dist/types/components/forms/ChangeMyPasswordForm.d.ts +1 -1
- package/dist/types/components/forms/ChangeMyPasswordForm.d.ts.map +1 -1
- package/dist/types/components/forms/ConfirmEmailChangeForm.d.ts +18 -0
- package/dist/types/components/forms/ConfirmEmailChangeForm.d.ts.map +1 -0
- package/dist/types/components/forms/CreateApiKeyForm.d.ts +2 -2
- package/dist/types/components/forms/CreateApiKeyForm.d.ts.map +1 -1
- package/dist/types/components/forms/CreateSessionTokenForm.d.ts +2 -2
- package/dist/types/components/forms/CreateSessionTokenForm.d.ts.map +1 -1
- package/dist/types/components/forms/InviteForm.d.ts +2 -2
- package/dist/types/components/forms/InviteForm.d.ts.map +1 -1
- package/dist/types/components/forms/LoginForm.d.ts +1 -1
- package/dist/types/components/forms/LoginForm.d.ts.map +1 -1
- package/dist/types/components/forms/OtpConfirmForm.d.ts +1 -1
- package/dist/types/components/forms/OtpConfirmForm.d.ts.map +1 -1
- package/dist/types/components/forms/OtpPrepareForm.d.ts +2 -2
- package/dist/types/components/forms/OtpPrepareForm.d.ts.map +1 -1
- package/dist/types/components/forms/PasswordResetForm.d.ts +1 -1
- package/dist/types/components/forms/PasswordResetForm.d.ts.map +1 -1
- package/dist/types/components/forms/PasswordResetRequestForm.d.ts +1 -1
- package/dist/types/components/forms/PasswordResetRequestForm.d.ts.map +1 -1
- package/dist/types/components/forms/PasswordlessSignInForm.d.ts +1 -1
- package/dist/types/components/forms/PasswordlessSignInForm.d.ts.map +1 -1
- package/dist/types/components/forms/PasswordlessSignInInitForm.d.ts +2 -2
- package/dist/types/components/forms/PasswordlessSignInInitForm.d.ts.map +1 -1
- package/dist/types/components/forms/RequestEmailVerificationForm.d.ts +17 -0
- package/dist/types/components/forms/RequestEmailVerificationForm.d.ts.map +1 -0
- package/dist/types/components/forms/TenantForm.d.ts +1 -1
- package/dist/types/components/forms/TenantForm.d.ts.map +1 -1
- package/dist/types/components/forms/UpdateProjectMemberForm.d.ts +1 -1
- package/dist/types/components/forms/UpdateProjectMemberForm.d.ts.map +1 -1
- package/dist/types/components/forms/VerifyEmailForm.d.ts +18 -0
- package/dist/types/components/forms/VerifyEmailForm.d.ts.map +1 -0
- package/dist/types/components/forms/index.d.ts +15 -12
- package/dist/types/components/forms/index.d.ts.map +1 -1
- package/dist/types/components/idp/IDP.d.ts +1 -1
- package/dist/types/components/idp/IDP.d.ts.map +1 -1
- package/dist/types/components/idp/IDPState.d.ts +1 -1
- package/dist/types/components/idp/IDPState.d.ts.map +1 -1
- package/dist/types/components/idp/index.d.ts +3 -3
- package/dist/types/components/idp/index.d.ts.map +1 -1
- package/dist/types/components/index.d.ts +5 -5
- package/dist/types/components/index.d.ts.map +1 -1
- package/dist/types/components/triggers/LogoutTrigger.d.ts +7 -1
- package/dist/types/components/triggers/LogoutTrigger.d.ts.map +1 -1
- package/dist/types/components/triggers/RemoveProjectMemberTrigger.d.ts +1 -1
- package/dist/types/components/triggers/RemoveProjectMemberTrigger.d.ts.map +1 -1
- package/dist/types/components/triggers/index.d.ts +3 -3
- package/dist/types/components/triggers/index.d.ts.map +1 -1
- package/dist/types/contexts.d.ts +1 -1
- package/dist/types/contexts.d.ts.map +1 -1
- package/dist/types/hooks/index.d.ts +8 -8
- package/dist/types/hooks/index.d.ts.map +1 -1
- package/dist/types/hooks/mutations/apiKey/index.d.ts +4 -4
- package/dist/types/hooks/mutations/apiKey/index.d.ts.map +1 -1
- package/dist/types/hooks/mutations/apiKey/useCreateApiKeyMutation.d.ts +4 -2
- package/dist/types/hooks/mutations/apiKey/useCreateApiKeyMutation.d.ts.map +1 -1
- package/dist/types/hooks/mutations/apiKey/useCreateGlobalApiKeyMutation.d.ts +4 -2
- package/dist/types/hooks/mutations/apiKey/useCreateGlobalApiKeyMutation.d.ts.map +1 -1
- package/dist/types/hooks/mutations/apiKey/useCreateSessionTokenMutation.d.ts +4 -2
- package/dist/types/hooks/mutations/apiKey/useCreateSessionTokenMutation.d.ts.map +1 -1
- package/dist/types/hooks/mutations/apiKey/useDisableApiKeyMutation.d.ts +2 -2
- package/dist/types/hooks/mutations/apiKey/useDisableApiKeyMutation.d.ts.map +1 -1
- package/dist/types/hooks/mutations/auth/index.d.ts +3 -3
- package/dist/types/hooks/mutations/auth/index.d.ts.map +1 -1
- package/dist/types/hooks/mutations/auth/useChangeMyPasswordMutation.d.ts +2 -2
- package/dist/types/hooks/mutations/auth/useChangeMyPasswordMutation.d.ts.map +1 -1
- package/dist/types/hooks/mutations/auth/useSignInMutation.d.ts +12 -2
- package/dist/types/hooks/mutations/auth/useSignInMutation.d.ts.map +1 -1
- package/dist/types/hooks/mutations/auth/useSignOutMutation.d.ts +4 -2
- package/dist/types/hooks/mutations/auth/useSignOutMutation.d.ts.map +1 -1
- package/dist/types/hooks/mutations/emailVerification/index.d.ts +4 -0
- package/dist/types/hooks/mutations/emailVerification/index.d.ts.map +1 -0
- package/dist/types/hooks/mutations/emailVerification/useConfirmEmailChangeMutation.d.ts +19 -0
- package/dist/types/hooks/mutations/emailVerification/useConfirmEmailChangeMutation.d.ts.map +1 -0
- package/dist/types/hooks/mutations/emailVerification/useRequestEmailVerificationMutation.d.ts +23 -0
- package/dist/types/hooks/mutations/emailVerification/useRequestEmailVerificationMutation.d.ts.map +1 -0
- package/dist/types/hooks/mutations/emailVerification/useVerifyEmailMutation.d.ts +19 -0
- package/dist/types/hooks/mutations/emailVerification/useVerifyEmailMutation.d.ts.map +1 -0
- package/dist/types/hooks/mutations/idp/index.d.ts +2 -2
- package/dist/types/hooks/mutations/idp/index.d.ts.map +1 -1
- package/dist/types/hooks/mutations/idp/useInitSignInIDPMutation.d.ts +1 -1
- package/dist/types/hooks/mutations/idp/useSignInIdpMutation.d.ts +2 -1
- package/dist/types/hooks/mutations/idp/useSignInIdpMutation.d.ts.map +1 -1
- package/dist/types/hooks/mutations/index.d.ts +10 -9
- package/dist/types/hooks/mutations/index.d.ts.map +1 -1
- package/dist/types/hooks/mutations/invite/index.d.ts +1 -1
- package/dist/types/hooks/mutations/invite/index.d.ts.map +1 -1
- package/dist/types/hooks/mutations/invite/useInviteMutation.d.ts +2 -2
- package/dist/types/hooks/mutations/memberships/index.d.ts +3 -3
- package/dist/types/hooks/mutations/memberships/index.d.ts.map +1 -1
- package/dist/types/hooks/mutations/memberships/useAddProjectMemberMutation.d.ts +2 -2
- package/dist/types/hooks/mutations/memberships/useAddProjectMemberMutation.d.ts.map +1 -1
- package/dist/types/hooks/mutations/memberships/useRemoveProjectMemberMutation.d.ts +2 -2
- package/dist/types/hooks/mutations/memberships/useRemoveProjectMemberMutation.d.ts.map +1 -1
- package/dist/types/hooks/mutations/memberships/useUpdateProjectMemberMutation.d.ts +2 -2
- package/dist/types/hooks/mutations/memberships/useUpdateProjectMemberMutation.d.ts.map +1 -1
- package/dist/types/hooks/mutations/otp/index.d.ts +3 -3
- package/dist/types/hooks/mutations/otp/index.d.ts.map +1 -1
- package/dist/types/hooks/mutations/otp/useConfirmOtpMutation.d.ts +2 -2
- package/dist/types/hooks/mutations/otp/useConfirmOtpMutation.d.ts.map +1 -1
- package/dist/types/hooks/mutations/otp/useDisableOtpMutation.d.ts +1 -1
- package/dist/types/hooks/mutations/otp/useDisableOtpMutation.d.ts.map +1 -1
- package/dist/types/hooks/mutations/otp/usePrepareOtpMutation.d.ts +2 -2
- package/dist/types/hooks/mutations/passwordReset/index.d.ts +2 -2
- package/dist/types/hooks/mutations/passwordReset/index.d.ts.map +1 -1
- package/dist/types/hooks/mutations/passwordReset/useCreateResetPasswordRequestMutation.d.ts +4 -2
- package/dist/types/hooks/mutations/passwordReset/useCreateResetPasswordRequestMutation.d.ts.map +1 -1
- package/dist/types/hooks/mutations/passwordReset/useResetPasswordMutation.d.ts +2 -2
- package/dist/types/hooks/mutations/passwordReset/useResetPasswordMutation.d.ts.map +1 -1
- package/dist/types/hooks/mutations/passwordless/index.d.ts +5 -5
- package/dist/types/hooks/mutations/passwordless/index.d.ts.map +1 -1
- package/dist/types/hooks/mutations/passwordless/useActivatePasswordlessOtpMutation.d.ts +2 -2
- package/dist/types/hooks/mutations/passwordless/useActivatePasswordlessOtpMutation.d.ts.map +1 -1
- package/dist/types/hooks/mutations/passwordless/useDisableMyPasswordlessMutation.d.ts +1 -1
- package/dist/types/hooks/mutations/passwordless/useDisableMyPasswordlessMutation.d.ts.map +1 -1
- package/dist/types/hooks/mutations/passwordless/useEnableMyPasswordlessMutation.d.ts +1 -1
- package/dist/types/hooks/mutations/passwordless/useEnableMyPasswordlessMutation.d.ts.map +1 -1
- package/dist/types/hooks/mutations/passwordless/useInitSignInPasswordlessMutation.d.ts +3 -2
- package/dist/types/hooks/mutations/passwordless/useInitSignInPasswordlessMutation.d.ts.map +1 -1
- package/dist/types/hooks/mutations/passwordless/useSignInPasswordlessMutation.d.ts +4 -2
- package/dist/types/hooks/mutations/passwordless/useSignInPasswordlessMutation.d.ts.map +1 -1
- package/dist/types/hooks/mutations/profile/index.d.ts +2 -2
- package/dist/types/hooks/mutations/profile/index.d.ts.map +1 -1
- package/dist/types/hooks/mutations/profile/useChangeMyProfile.d.ts +2 -2
- package/dist/types/hooks/mutations/profile/useChangeMyProfile.d.ts.map +1 -1
- package/dist/types/hooks/mutations/profile/useChangeProfile.d.ts +2 -2
- package/dist/types/hooks/mutations/profile/useChangeProfile.d.ts.map +1 -1
- package/dist/types/hooks/queries/index.d.ts +4 -4
- package/dist/types/hooks/queries/index.d.ts.map +1 -1
- package/dist/types/hooks/queries/useMeQuery.d.ts +1 -1
- package/dist/types/hooks/queries/useMeQuery.d.ts.map +1 -1
- package/dist/types/hooks/queries/useProjectMembersQuery.d.ts +15 -3
- package/dist/types/hooks/queries/useProjectMembersQuery.d.ts.map +1 -1
- package/dist/types/hooks/queries/useProjectMembershipsQuery.d.ts +1 -1
- package/dist/types/hooks/queries/useProjectMembershipsQuery.d.ts.map +1 -1
- package/dist/types/hooks/queries/useProjectRolesDefinitionQuery.d.ts +1 -1
- package/dist/types/hooks/queries/useProjectRolesDefinitionQuery.d.ts.map +1 -1
- package/dist/types/hooks/useFetchIdentity.d.ts +1 -1
- package/dist/types/hooks/useFetchIdentity.d.ts.map +1 -1
- package/dist/types/hooks/useLogout.d.ts +2 -1
- package/dist/types/hooks/useLogout.d.ts.map +1 -1
- package/dist/types/hooks/useTenantMutation.d.ts +1 -1
- package/dist/types/hooks/useTenantMutation.d.ts.map +1 -1
- package/dist/types/index.d.ts +4 -4
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/internal/hooks/useHandleIDPResponse.d.ts +1 -1
- package/dist/types/internal/hooks/useHandleIDPResponse.d.ts.map +1 -1
- package/dist/types/internal/hooks/useInitIDPRedirect.d.ts +1 -1
- package/dist/types/internal/hooks/useInitIDPRedirect.d.ts.map +1 -1
- package/dist/types/internal/hooks/useLogoutInternal.d.ts +2 -1
- package/dist/types/internal/hooks/useLogoutInternal.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/dist/types/types/index.d.ts +5 -5
- package/dist/types/types/index.d.ts.map +1 -1
- package/package.json +4 -4
- package/src/components/IdentityProvider.tsx +2 -2
- package/src/components/IdentityState.tsx +2 -2
- package/src/components/forms/ChangeMyPasswordForm.tsx +4 -4
- package/src/components/forms/ConfirmEmailChangeForm.tsx +66 -0
- package/src/components/forms/CreateApiKeyForm.tsx +4 -4
- package/src/components/forms/CreateSessionTokenForm.tsx +4 -4
- package/src/components/forms/InviteForm.tsx +4 -4
- package/src/components/forms/LoginForm.tsx +7 -5
- package/src/components/forms/OtpConfirmForm.tsx +4 -4
- package/src/components/forms/OtpPrepareForm.tsx +4 -4
- package/src/components/forms/PasswordResetForm.tsx +4 -4
- package/src/components/forms/PasswordResetRequestForm.tsx +6 -4
- package/src/components/forms/PasswordlessSignInForm.tsx +6 -5
- package/src/components/forms/PasswordlessSignInInitForm.tsx +8 -6
- package/src/components/forms/RequestEmailVerificationForm.tsx +62 -0
- package/src/components/forms/TenantForm.tsx +2 -2
- package/src/components/forms/UpdateProjectMemberForm.tsx +4 -4
- package/src/components/forms/VerifyEmailForm.tsx +64 -0
- package/src/components/forms/index.ts +15 -12
- package/src/components/idp/IDP.tsx +5 -5
- package/src/components/idp/IDPInitTrigger.tsx +1 -1
- package/src/components/idp/IDPState.tsx +2 -2
- package/src/components/idp/index.ts +3 -3
- package/src/components/index.ts +5 -5
- package/src/components/triggers/DisableOtpTrigger.tsx +3 -3
- package/src/components/triggers/LogoutTrigger.tsx +9 -3
- package/src/components/triggers/RemoveProjectMemberTrigger.tsx +2 -2
- package/src/components/triggers/index.ts +3 -3
- package/src/contexts.ts +1 -1
- package/src/hooks/index.ts +8 -8
- package/src/hooks/mutations/apiKey/index.ts +4 -4
- package/src/hooks/mutations/apiKey/useCreateApiKeyMutation.tsx +1 -1
- package/src/hooks/mutations/apiKey/useCreateGlobalApiKeyMutation.tsx +1 -1
- package/src/hooks/mutations/apiKey/useCreateSessionTokenMutation.tsx +1 -1
- package/src/hooks/mutations/apiKey/useDisableApiKeyMutation.tsx +1 -1
- package/src/hooks/mutations/auth/index.ts +3 -3
- package/src/hooks/mutations/auth/useChangeMyPasswordMutation.ts +1 -1
- package/src/hooks/mutations/auth/useSignInMutation.ts +2 -2
- package/src/hooks/mutations/auth/useSignOutMutation.ts +1 -1
- package/src/hooks/mutations/emailVerification/index.ts +3 -0
- package/src/hooks/mutations/emailVerification/useConfirmEmailChangeMutation.ts +17 -0
- package/src/hooks/mutations/emailVerification/useRequestEmailVerificationMutation.ts +17 -0
- package/src/hooks/mutations/emailVerification/useVerifyEmailMutation.ts +17 -0
- package/src/hooks/mutations/idp/index.ts +2 -2
- package/src/hooks/mutations/idp/useInitSignInIDPMutation.ts +2 -2
- package/src/hooks/mutations/idp/useSignInIdpMutation.ts +2 -2
- package/src/hooks/mutations/index.ts +10 -9
- package/src/hooks/mutations/invite/index.ts +1 -1
- package/src/hooks/mutations/invite/useInviteMutation.tsx +1 -1
- package/src/hooks/mutations/memberships/index.ts +3 -3
- package/src/hooks/mutations/memberships/useAddProjectMemberMutation.ts +1 -1
- package/src/hooks/mutations/memberships/useRemoveProjectMemberMutation.ts +1 -1
- package/src/hooks/mutations/memberships/useUpdateProjectMemberMutation.ts +1 -1
- package/src/hooks/mutations/otp/index.ts +3 -3
- package/src/hooks/mutations/otp/useConfirmOtpMutation.ts +1 -1
- package/src/hooks/mutations/otp/useDisableOtpMutation.ts +1 -1
- package/src/hooks/mutations/otp/usePrepareOtpMutation.ts +1 -1
- package/src/hooks/mutations/passwordReset/index.ts +2 -2
- package/src/hooks/mutations/passwordReset/useCreateResetPasswordRequestMutation.ts +2 -2
- package/src/hooks/mutations/passwordReset/useResetPasswordMutation.ts +2 -2
- package/src/hooks/mutations/passwordless/index.ts +5 -5
- package/src/hooks/mutations/passwordless/useActivatePasswordlessOtpMutation.ts +2 -2
- package/src/hooks/mutations/passwordless/useDisableMyPasswordlessMutation.ts +1 -1
- package/src/hooks/mutations/passwordless/useEnableMyPasswordlessMutation.ts +1 -1
- package/src/hooks/mutations/passwordless/useInitSignInPasswordlessMutation.ts +2 -2
- package/src/hooks/mutations/passwordless/useSignInPasswordlessMutation.ts +2 -2
- package/src/hooks/mutations/profile/index.ts +2 -2
- package/src/hooks/mutations/profile/useChangeMyProfile.ts +1 -1
- package/src/hooks/mutations/profile/useChangeProfile.ts +1 -1
- package/src/hooks/queries/index.ts +4 -4
- package/src/hooks/queries/useMeQuery.ts +1 -1
- package/src/hooks/queries/useProjectMembersQuery.ts +1 -1
- package/src/hooks/queries/useProjectMembershipsQuery.ts +1 -1
- package/src/hooks/queries/useProjectRolesDefinitionQuery.ts +1 -1
- package/src/hooks/useFetchIdentity.ts +3 -3
- package/src/hooks/useLogout.ts +2 -2
- package/src/hooks/usePasswordlessOtpActivator.ts +4 -4
- package/src/hooks/useTenantMutation.ts +1 -1
- package/src/index.ts +4 -4
- package/src/internal/hooks/useHandleIDPResponse.ts +5 -5
- package/src/internal/hooks/useInitIDPRedirect.ts +5 -5
- package/src/internal/hooks/useLogoutInternal.ts +18 -8
- package/src/internal/hooks/useRedirectToBacklink.ts +1 -1
- package/src/types/index.ts +5 -5
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export * from './forms';
|
|
2
|
-
export * from './IdentityMethods';
|
|
3
|
-
export * from './IdentityStateValue';
|
|
4
|
-
export * from './Identity';
|
|
5
|
-
export * from './idp';
|
|
1
|
+
export * from './forms.js';
|
|
2
|
+
export * from './IdentityMethods.js';
|
|
3
|
+
export * from './IdentityStateValue.js';
|
|
4
|
+
export * from './Identity.js';
|
|
5
|
+
export * from './idp.js';
|
|
6
6
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAA;AAC1B,cAAc,sBAAsB,CAAA;AACpC,cAAc,yBAAyB,CAAA;AACvC,cAAc,eAAe,CAAA;AAC7B,cAAc,UAAU,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contember/react-client-tenant",
|
|
3
3
|
"license": "Apache-2.0",
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.2.0-alpha.1",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"main": "./dist/production/index.js",
|
|
@@ -34,9 +34,9 @@
|
|
|
34
34
|
"directory": "packages/react-client-tenant"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@contember/graphql-client-tenant": "2.1.0-beta.
|
|
38
|
-
"@contember/react-client": "2.1.0-beta.
|
|
39
|
-
"@contember/react-utils": "2.1.0-beta.
|
|
37
|
+
"@contember/graphql-client-tenant": "2.1.0-beta.2",
|
|
38
|
+
"@contember/react-client": "2.1.0-beta.2",
|
|
39
|
+
"@contember/react-utils": "2.1.0-beta.2",
|
|
40
40
|
"@radix-ui/primitive": "^1.1.3",
|
|
41
41
|
"@radix-ui/react-slot": "^1.2.4",
|
|
42
42
|
"graphql-ts-client-api": "^3.1.17"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useSessionToken } from '@contember/react-client'
|
|
2
2
|
import { ReactNode, useEffect } from 'react'
|
|
3
|
-
import { useFetchIdentity } from '../hooks'
|
|
4
|
-
import { IdentityContext, IdentityMethodsContext, IdentityStateContext } from '../contexts'
|
|
3
|
+
import { useFetchIdentity } from '../hooks/index.js'
|
|
4
|
+
import { IdentityContext, IdentityMethodsContext, IdentityStateContext } from '../contexts.js'
|
|
5
5
|
|
|
6
6
|
export interface IdentityProviderProps {
|
|
7
7
|
children: ReactNode
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { ReactNode } from 'react'
|
|
2
|
-
import { IdentityStateValue } from '../types'
|
|
3
|
-
import { useIdentityState } from '../contexts'
|
|
2
|
+
import { IdentityStateValue } from '../types/index.js'
|
|
3
|
+
import { useIdentityState } from '../contexts.js'
|
|
4
4
|
|
|
5
5
|
export interface IdentityStateProps {
|
|
6
6
|
state: IdentityStateValue | IdentityStateValue[]
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { ReactElement } from 'react'
|
|
2
2
|
import { ChangeMyPasswordErrorCode } from '@contember/graphql-client-tenant'
|
|
3
|
-
import { TenantForm } from './TenantForm'
|
|
4
|
-
import { FormContextValue, FormError, FormState } from '../../types'
|
|
5
|
-
import { useForm } from '../../contexts'
|
|
6
|
-
import { useChangeMyPasswordMutation } from '../../hooks'
|
|
3
|
+
import { TenantForm } from './TenantForm.js'
|
|
4
|
+
import { FormContextValue, FormError, FormState } from '../../types/index.js'
|
|
5
|
+
import { useForm } from '../../contexts.js'
|
|
6
|
+
import { useChangeMyPasswordMutation } from '../../hooks/index.js'
|
|
7
7
|
|
|
8
8
|
export type ChangeMyPasswordFormValues = {
|
|
9
9
|
currentPassword: string
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { ReactElement } from 'react'
|
|
2
|
+
import * as TenantApi from '@contember/graphql-client-tenant'
|
|
3
|
+
import { ConfirmEmailChangeErrorCode } from '@contember/graphql-client-tenant'
|
|
4
|
+
import { TenantForm } from './TenantForm.js'
|
|
5
|
+
import { FormContextValue, FormError, FormState } from '../../types/index.js'
|
|
6
|
+
import { useForm } from '../../contexts.js'
|
|
7
|
+
import { useConfirmEmailChangeMutation } from '../../hooks/index.js'
|
|
8
|
+
|
|
9
|
+
export type ConfirmEmailChangeFormValues = {
|
|
10
|
+
token: string
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export type ConfirmEmailChangeFormErrorCode =
|
|
14
|
+
| ConfirmEmailChangeErrorCode
|
|
15
|
+
| 'FIELD_REQUIRED'
|
|
16
|
+
| 'INVALID_VALUE'
|
|
17
|
+
| 'UNKNOWN_ERROR'
|
|
18
|
+
|
|
19
|
+
export type ConfirmEmailChangeFormState = FormState
|
|
20
|
+
|
|
21
|
+
export type ConfirmEmailChangeFormError = FormError<ConfirmEmailChangeFormValues, ConfirmEmailChangeFormErrorCode>
|
|
22
|
+
|
|
23
|
+
export type ConfirmEmailChangeFormContextValue = FormContextValue<ConfirmEmailChangeFormValues, ConfirmEmailChangeFormErrorCode>
|
|
24
|
+
|
|
25
|
+
export interface ConfirmEmailChangeFormProps {
|
|
26
|
+
children: ReactElement
|
|
27
|
+
onSuccess?: () => void
|
|
28
|
+
token?: string
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export const useConfirmEmailChangeForm = useForm as () => ConfirmEmailChangeFormContextValue
|
|
32
|
+
|
|
33
|
+
export const ConfirmEmailChangeForm = ({ children, onSuccess, token }: ConfirmEmailChangeFormProps) => {
|
|
34
|
+
const confirmEmailChange = useConfirmEmailChangeMutation()
|
|
35
|
+
return (
|
|
36
|
+
<TenantForm<ConfirmEmailChangeFormContextValue>
|
|
37
|
+
onSuccess={onSuccess}
|
|
38
|
+
errorMapping={errorToField}
|
|
39
|
+
initialValues={{
|
|
40
|
+
token: token ?? '',
|
|
41
|
+
}}
|
|
42
|
+
validate={({ values }) => {
|
|
43
|
+
const errors: ConfirmEmailChangeFormError[] = []
|
|
44
|
+
if (!values.token) {
|
|
45
|
+
errors.push({ code: 'FIELD_REQUIRED', field: 'token' })
|
|
46
|
+
}
|
|
47
|
+
return errors
|
|
48
|
+
}}
|
|
49
|
+
execute={async ({ values }) => {
|
|
50
|
+
return await confirmEmailChange({
|
|
51
|
+
token: values.token,
|
|
52
|
+
})
|
|
53
|
+
}}
|
|
54
|
+
>
|
|
55
|
+
{children}
|
|
56
|
+
</TenantForm>
|
|
57
|
+
)
|
|
58
|
+
}
|
|
59
|
+
const errorToField: Record<TenantApi.ConfirmEmailChangeErrorCode, keyof ConfirmEmailChangeFormValues | undefined> = {
|
|
60
|
+
TOKEN_EXPIRED: 'token',
|
|
61
|
+
TOKEN_NOT_FOUND: 'token',
|
|
62
|
+
TOKEN_USED: 'token',
|
|
63
|
+
TOKEN_INVALID: 'token',
|
|
64
|
+
EMAIL_ALREADY_EXISTS: undefined,
|
|
65
|
+
INVALID_EMAIL_FORMAT: undefined,
|
|
66
|
+
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { ReactElement } from 'react'
|
|
2
|
-
import { TenantForm } from './TenantForm'
|
|
3
|
-
import { FormContextValue, FormError, FormState } from '../../types'
|
|
4
|
-
import { useForm } from '../../contexts'
|
|
2
|
+
import { TenantForm } from './TenantForm.js'
|
|
3
|
+
import { FormContextValue, FormError, FormState } from '../../types/index.js'
|
|
4
|
+
import { useForm } from '../../contexts.js'
|
|
5
5
|
import { CreateApiKeyErrorCode, MembershipInput } from '@contember/graphql-client-tenant'
|
|
6
|
-
import { CreateApiKeyMutationResult, useCreateApiKeyMutation } from '../../hooks'
|
|
6
|
+
import { CreateApiKeyMutationResult, useCreateApiKeyMutation } from '../../hooks/index.js'
|
|
7
7
|
|
|
8
8
|
export type CreateApiKeyFormValues = {
|
|
9
9
|
description: string
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { ReactElement } from 'react'
|
|
2
|
-
import { TenantForm } from './TenantForm'
|
|
3
|
-
import { FormContextValue, FormError, FormState } from '../../types'
|
|
4
|
-
import { useForm } from '../../contexts'
|
|
2
|
+
import { TenantForm } from './TenantForm.js'
|
|
3
|
+
import { FormContextValue, FormError, FormState } from '../../types/index.js'
|
|
4
|
+
import { useForm } from '../../contexts.js'
|
|
5
5
|
import { CreateSessionTokenErrorCode } from '@contember/graphql-client-tenant'
|
|
6
|
-
import { CreateSessionTokenMutationResult, useCreateSessionTokenMutation } from '../../hooks'
|
|
6
|
+
import { CreateSessionTokenMutationResult, useCreateSessionTokenMutation } from '../../hooks/index.js'
|
|
7
7
|
|
|
8
8
|
export type CreateSessionTokenFormValues = {
|
|
9
9
|
email: string
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { ReactElement } from 'react'
|
|
2
|
-
import { TenantForm } from './TenantForm'
|
|
3
|
-
import { FormContextValue, FormError, FormState } from '../../types'
|
|
4
|
-
import { useForm } from '../../contexts'
|
|
2
|
+
import { TenantForm } from './TenantForm.js'
|
|
3
|
+
import { FormContextValue, FormError, FormState } from '../../types/index.js'
|
|
4
|
+
import { useForm } from '../../contexts.js'
|
|
5
5
|
import { InviteErrorCode, InviteOptions, MembershipInput } from '@contember/graphql-client-tenant'
|
|
6
|
-
import { InviteMutationResult, useInviteMutation } from '../../hooks'
|
|
6
|
+
import { InviteMutationResult, useInviteMutation } from '../../hooks/index.js'
|
|
7
7
|
|
|
8
8
|
export type InviteFormValues = {
|
|
9
9
|
email: string
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { ReactElement, useCallback, useMemo } from 'react'
|
|
2
2
|
import * as TenantApi from '@contember/graphql-client-tenant'
|
|
3
|
-
import { TenantForm } from './TenantForm'
|
|
3
|
+
import { TenantForm } from './TenantForm.js'
|
|
4
4
|
import { SignInErrorCode } from '@contember/graphql-client-tenant'
|
|
5
|
-
import { FormContextValue, FormError, FormState } from '../../types'
|
|
6
|
-
import { useForm } from '../../contexts'
|
|
5
|
+
import { FormContextValue, FormError, FormState } from '../../types/index.js'
|
|
6
|
+
import { useForm } from '../../contexts.js'
|
|
7
7
|
import { useSetSessionToken } from '@contember/react-client'
|
|
8
|
-
import { SignInMutationResult, useSignInMutation } from '../../hooks'
|
|
9
|
-
import { useRedirectToBacklinkCallback } from '../../internal/hooks/useRedirectToBacklink'
|
|
8
|
+
import { SignInMutationResult, useSignInMutation } from '../../hooks/index.js'
|
|
9
|
+
import { useRedirectToBacklinkCallback } from '../../internal/hooks/useRedirectToBacklink.js'
|
|
10
10
|
|
|
11
11
|
export type LoginFormValues = {
|
|
12
12
|
email: string
|
|
@@ -107,4 +107,6 @@ const errorToField: Record<TenantApi.SignInErrorCode, keyof LoginFormValues | un
|
|
|
107
107
|
'INVALID_CREDENTIALS': 'password',
|
|
108
108
|
'RATE_LIMIT_EXCEEDED': 'password',
|
|
109
109
|
'OTP_REQUIRED': undefined,
|
|
110
|
+
'MFA_ENROLLMENT_REQUIRED': undefined,
|
|
111
|
+
'EMAIL_NOT_VERIFIED': 'email',
|
|
110
112
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { ReactElement } from 'react'
|
|
2
|
-
import { TenantForm } from './TenantForm'
|
|
3
|
-
import { FormContextValue, FormError, FormState } from '../../types'
|
|
4
|
-
import { useForm, useIdentityMethods } from '../../contexts'
|
|
2
|
+
import { TenantForm } from './TenantForm.js'
|
|
3
|
+
import { FormContextValue, FormError, FormState } from '../../types/index.js'
|
|
4
|
+
import { useForm, useIdentityMethods } from '../../contexts.js'
|
|
5
5
|
import { ConfirmOtpErrorCode } from '@contember/graphql-client-tenant'
|
|
6
|
-
import { useConfirmOtpMutation } from '../../hooks'
|
|
6
|
+
import { useConfirmOtpMutation } from '../../hooks/index.js'
|
|
7
7
|
|
|
8
8
|
export type OtpConfirmFormValues = {
|
|
9
9
|
otpToken: string
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ReactElement, useCallback, useMemo } from 'react'
|
|
2
|
-
import { TenantForm } from './TenantForm'
|
|
3
|
-
import { FormContextValue, FormError, FormState } from '../../types'
|
|
4
|
-
import { useForm } from '../../contexts'
|
|
5
|
-
import { PrepareOtpMutationResult, usePrepareOtpMutation } from '../../hooks'
|
|
2
|
+
import { TenantForm } from './TenantForm.js'
|
|
3
|
+
import { FormContextValue, FormError, FormState } from '../../types/index.js'
|
|
4
|
+
import { useForm } from '../../contexts.js'
|
|
5
|
+
import { PrepareOtpMutationResult, usePrepareOtpMutation } from '../../hooks/index.js'
|
|
6
6
|
|
|
7
7
|
export type OtpPrepareFormValues = {
|
|
8
8
|
label: string
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { ReactElement } from 'react'
|
|
2
2
|
import * as TenantApi from '@contember/graphql-client-tenant'
|
|
3
3
|
import { ResetPasswordErrorCode } from '@contember/graphql-client-tenant'
|
|
4
|
-
import { TenantForm } from './TenantForm'
|
|
5
|
-
import { FormContextValue, FormError, FormState } from '../../types'
|
|
6
|
-
import { useForm } from '../../contexts'
|
|
7
|
-
import { useResetPasswordMutation } from '../../hooks'
|
|
4
|
+
import { TenantForm } from './TenantForm.js'
|
|
5
|
+
import { FormContextValue, FormError, FormState } from '../../types/index.js'
|
|
6
|
+
import { useForm } from '../../contexts.js'
|
|
7
|
+
import { useResetPasswordMutation } from '../../hooks/index.js'
|
|
8
8
|
|
|
9
9
|
export type PasswordResetFormValues = {
|
|
10
10
|
token: string
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { ReactElement, useCallback, useMemo } from 'react'
|
|
2
2
|
import * as TenantApi from '@contember/graphql-client-tenant'
|
|
3
3
|
import { CreatePasswordResetRequestErrorCode } from '@contember/graphql-client-tenant'
|
|
4
|
-
import { TenantForm } from './TenantForm'
|
|
5
|
-
import { FormContextValue, FormError, FormState } from '../../types/forms'
|
|
6
|
-
import { useForm } from '../../contexts'
|
|
7
|
-
import { useCreateResetPasswordRequestMutation } from '../../hooks'
|
|
4
|
+
import { TenantForm } from './TenantForm.js'
|
|
5
|
+
import { FormContextValue, FormError, FormState } from '../../types/forms.js'
|
|
6
|
+
import { useForm } from '../../contexts.js'
|
|
7
|
+
import { useCreateResetPasswordRequestMutation } from '../../hooks/index.js'
|
|
8
8
|
|
|
9
9
|
export type PasswordResetRequestFormValues = {
|
|
10
10
|
email: string
|
|
@@ -58,4 +58,6 @@ export const PasswordResetRequestForm = ({ children, onSuccess }: PasswordResetR
|
|
|
58
58
|
}
|
|
59
59
|
const errorToField: Record<TenantApi.CreatePasswordResetRequestErrorCode, keyof PasswordResetRequestFormValues | undefined> = {
|
|
60
60
|
PERSON_NOT_FOUND: 'email',
|
|
61
|
+
RATE_LIMIT_EXCEEDED: undefined,
|
|
62
|
+
INVALID_CAPTCHA: undefined,
|
|
61
63
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import * as TenantApi from '@contember/graphql-client-tenant'
|
|
2
2
|
import { useSetSessionToken } from '@contember/react-client'
|
|
3
3
|
import { ReactElement, useCallback, useMemo } from 'react'
|
|
4
|
-
import { useForm } from '../../contexts'
|
|
5
|
-
import { SignInPasswordlessMutationResult, useSignInPasswordlessMutation } from '../../hooks'
|
|
6
|
-
import { useRedirectToBacklinkCallback } from '../../internal/hooks/useRedirectToBacklink'
|
|
7
|
-
import { FormContextValue, FormError, FormState } from '../../types/forms'
|
|
8
|
-
import { TenantForm } from './TenantForm'
|
|
4
|
+
import { useForm } from '../../contexts.js'
|
|
5
|
+
import { SignInPasswordlessMutationResult, useSignInPasswordlessMutation } from '../../hooks/index.js'
|
|
6
|
+
import { useRedirectToBacklinkCallback } from '../../internal/hooks/useRedirectToBacklink.js'
|
|
7
|
+
import { FormContextValue, FormError, FormState } from '../../types/forms.js'
|
|
8
|
+
import { TenantForm } from './TenantForm.js'
|
|
9
9
|
|
|
10
10
|
export type PasswordlessSignInFormValues = {
|
|
11
11
|
token: string
|
|
@@ -102,4 +102,5 @@ const errorToField: Record<TenantApi.SignInPasswordlessErrorCode, keyof Password
|
|
|
102
102
|
TOKEN_INVALID: 'token',
|
|
103
103
|
INVALID_OTP_TOKEN: 'otpToken',
|
|
104
104
|
OTP_REQUIRED: undefined,
|
|
105
|
+
MFA_ENROLLMENT_REQUIRED: undefined,
|
|
105
106
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { ReactElement, useCallback, useMemo } from 'react'
|
|
2
2
|
import * as TenantApi from '@contember/graphql-client-tenant'
|
|
3
|
-
import { TenantForm } from './TenantForm'
|
|
4
|
-
import { FormContextValue, FormError, FormState } from '../../types/forms'
|
|
5
|
-
import { useForm } from '../../contexts'
|
|
6
|
-
import { InitSignInPasswordlessMutationResult, useInitSignInPasswordlessMutation } from '../../hooks'
|
|
7
|
-
import { PASSWORDLESS_REQUEST_STORAGE_KEY } from '../../consts'
|
|
8
|
-
import { useSaveBacklink } from '../../internal/hooks/useRedirectToBacklink'
|
|
3
|
+
import { TenantForm } from './TenantForm.js'
|
|
4
|
+
import { FormContextValue, FormError, FormState } from '../../types/forms.js'
|
|
5
|
+
import { useForm } from '../../contexts.js'
|
|
6
|
+
import { InitSignInPasswordlessMutationResult, useInitSignInPasswordlessMutation } from '../../hooks/index.js'
|
|
7
|
+
import { PASSWORDLESS_REQUEST_STORAGE_KEY } from '../../consts.js'
|
|
8
|
+
import { useSaveBacklink } from '../../internal/hooks/useRedirectToBacklink.js'
|
|
9
9
|
|
|
10
10
|
export type PasswordlessSignInInitFormValues = {
|
|
11
11
|
email: string
|
|
@@ -68,4 +68,6 @@ export const PasswordlessSignInInitForm = ({ children, onSuccess }: Passwordless
|
|
|
68
68
|
const errorToField: Record<TenantApi.InitSignInPasswordlessErrorCode, keyof PasswordlessSignInInitFormValues | undefined> = {
|
|
69
69
|
PERSON_NOT_FOUND: 'email',
|
|
70
70
|
PASSWORDLESS_DISABLED: undefined,
|
|
71
|
+
RATE_LIMIT_EXCEEDED: undefined,
|
|
72
|
+
INVALID_CAPTCHA: undefined,
|
|
71
73
|
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { ReactElement, useCallback, useMemo } from 'react'
|
|
2
|
+
import * as TenantApi from '@contember/graphql-client-tenant'
|
|
3
|
+
import { RequestEmailVerificationErrorCode } from '@contember/graphql-client-tenant'
|
|
4
|
+
import { TenantForm } from './TenantForm.js'
|
|
5
|
+
import { FormContextValue, FormError, FormState } from '../../types/forms.js'
|
|
6
|
+
import { useForm } from '../../contexts.js'
|
|
7
|
+
import { useRequestEmailVerificationMutation } from '../../hooks/index.js'
|
|
8
|
+
|
|
9
|
+
export type RequestEmailVerificationFormValues = {
|
|
10
|
+
email: string
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export type RequestEmailVerificationFormErrorCode =
|
|
14
|
+
| RequestEmailVerificationErrorCode
|
|
15
|
+
| 'FIELD_REQUIRED'
|
|
16
|
+
| 'INVALID_VALUE'
|
|
17
|
+
| 'UNKNOWN_ERROR'
|
|
18
|
+
|
|
19
|
+
export type RequestEmailVerificationFormState = FormState
|
|
20
|
+
|
|
21
|
+
export type RequestEmailVerificationFormError = FormError<RequestEmailVerificationFormValues, RequestEmailVerificationFormErrorCode>
|
|
22
|
+
|
|
23
|
+
export type RequestEmailVerificationFormContextValue = FormContextValue<RequestEmailVerificationFormValues, RequestEmailVerificationFormErrorCode>
|
|
24
|
+
|
|
25
|
+
export interface RequestEmailVerificationFormProps {
|
|
26
|
+
children: ReactElement
|
|
27
|
+
onSuccess?: () => void
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export const useRequestEmailVerificationForm = useForm as () => RequestEmailVerificationFormContextValue
|
|
31
|
+
|
|
32
|
+
export const RequestEmailVerificationForm = ({ children, onSuccess }: RequestEmailVerificationFormProps) => {
|
|
33
|
+
const requestEmailVerification = useRequestEmailVerificationMutation()
|
|
34
|
+
return (
|
|
35
|
+
<TenantForm<RequestEmailVerificationFormContextValue>
|
|
36
|
+
onSuccess={onSuccess}
|
|
37
|
+
errorMapping={errorToField}
|
|
38
|
+
initialValues={useMemo(() => ({
|
|
39
|
+
email: '',
|
|
40
|
+
}), [])}
|
|
41
|
+
validate={({ values }) => {
|
|
42
|
+
if (!values.email) {
|
|
43
|
+
return [{ code: 'FIELD_REQUIRED', field: 'email' }]
|
|
44
|
+
} else if (!values.email.match(/^.+@.+$/)) {
|
|
45
|
+
return [{ code: 'INVALID_VALUE', field: 'email' }]
|
|
46
|
+
}
|
|
47
|
+
return []
|
|
48
|
+
}}
|
|
49
|
+
execute={useCallback(async ({ values }) => {
|
|
50
|
+
return await requestEmailVerification({
|
|
51
|
+
email: values.email,
|
|
52
|
+
})
|
|
53
|
+
}, [requestEmailVerification])}
|
|
54
|
+
>
|
|
55
|
+
{children}
|
|
56
|
+
</TenantForm>
|
|
57
|
+
)
|
|
58
|
+
}
|
|
59
|
+
const errorToField: Record<TenantApi.RequestEmailVerificationErrorCode, keyof RequestEmailVerificationFormValues | undefined> = {
|
|
60
|
+
RATE_LIMIT_EXCEEDED: undefined,
|
|
61
|
+
INVALID_CAPTCHA: undefined,
|
|
62
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ComponentType, ReactElement, useCallback, useEffect, useState } from 'react'
|
|
2
2
|
import { Slot } from '@radix-ui/react-slot'
|
|
3
|
-
import { FormContextValue } from '../../types/forms'
|
|
4
|
-
import { FormContext } from '../../contexts'
|
|
3
|
+
import { FormContextValue } from '../../types/forms.js'
|
|
4
|
+
import { FormContext } from '../../contexts.js'
|
|
5
5
|
import { useReferentiallyStableCallback } from '@contember/react-utils'
|
|
6
6
|
|
|
7
7
|
const SlotForm = Slot as ComponentType<React.FormHTMLAttributes<HTMLFormElement>>
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { ReactElement, useEffect, useState } from 'react'
|
|
2
|
-
import { TenantForm } from './TenantForm'
|
|
3
|
-
import { FormContextValue, FormError, FormState } from '../../types'
|
|
4
|
-
import { useForm } from '../../contexts'
|
|
2
|
+
import { TenantForm } from './TenantForm.js'
|
|
3
|
+
import { FormContextValue, FormError, FormState } from '../../types/index.js'
|
|
4
|
+
import { useForm } from '../../contexts.js'
|
|
5
5
|
import { MembershipInput, UpdateProjectMemberErrorCode } from '@contember/graphql-client-tenant'
|
|
6
|
-
import { useProjectMembershipsQuery, useTenantQueryLoader, useUpdateProjectMemberMutation } from '../../hooks'
|
|
6
|
+
import { useProjectMembershipsQuery, useTenantQueryLoader, useUpdateProjectMemberMutation } from '../../hooks/index.js'
|
|
7
7
|
|
|
8
8
|
export type UpdateProjectMemberFormValues = {
|
|
9
9
|
memberships: readonly MembershipInput[]
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { ReactElement } from 'react'
|
|
2
|
+
import * as TenantApi from '@contember/graphql-client-tenant'
|
|
3
|
+
import { VerifyEmailErrorCode } from '@contember/graphql-client-tenant'
|
|
4
|
+
import { TenantForm } from './TenantForm.js'
|
|
5
|
+
import { FormContextValue, FormError, FormState } from '../../types/index.js'
|
|
6
|
+
import { useForm } from '../../contexts.js'
|
|
7
|
+
import { useVerifyEmailMutation } from '../../hooks/index.js'
|
|
8
|
+
|
|
9
|
+
export type VerifyEmailFormValues = {
|
|
10
|
+
token: string
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export type VerifyEmailFormErrorCode =
|
|
14
|
+
| VerifyEmailErrorCode
|
|
15
|
+
| 'FIELD_REQUIRED'
|
|
16
|
+
| 'INVALID_VALUE'
|
|
17
|
+
| 'UNKNOWN_ERROR'
|
|
18
|
+
|
|
19
|
+
export type VerifyEmailFormState = FormState
|
|
20
|
+
|
|
21
|
+
export type VerifyEmailFormError = FormError<VerifyEmailFormValues, VerifyEmailFormErrorCode>
|
|
22
|
+
|
|
23
|
+
export type VerifyEmailFormContextValue = FormContextValue<VerifyEmailFormValues, VerifyEmailFormErrorCode>
|
|
24
|
+
|
|
25
|
+
export interface VerifyEmailFormProps {
|
|
26
|
+
children: ReactElement
|
|
27
|
+
onSuccess?: () => void
|
|
28
|
+
token?: string
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export const useVerifyEmailForm = useForm as () => VerifyEmailFormContextValue
|
|
32
|
+
|
|
33
|
+
export const VerifyEmailForm = ({ children, onSuccess, token }: VerifyEmailFormProps) => {
|
|
34
|
+
const verifyEmail = useVerifyEmailMutation()
|
|
35
|
+
return (
|
|
36
|
+
<TenantForm<VerifyEmailFormContextValue>
|
|
37
|
+
onSuccess={onSuccess}
|
|
38
|
+
errorMapping={errorToField}
|
|
39
|
+
initialValues={{
|
|
40
|
+
token: token ?? '',
|
|
41
|
+
}}
|
|
42
|
+
validate={({ values }) => {
|
|
43
|
+
const errors: VerifyEmailFormError[] = []
|
|
44
|
+
if (!values.token) {
|
|
45
|
+
errors.push({ code: 'FIELD_REQUIRED', field: 'token' })
|
|
46
|
+
}
|
|
47
|
+
return errors
|
|
48
|
+
}}
|
|
49
|
+
execute={async ({ values }) => {
|
|
50
|
+
return await verifyEmail({
|
|
51
|
+
token: values.token,
|
|
52
|
+
})
|
|
53
|
+
}}
|
|
54
|
+
>
|
|
55
|
+
{children}
|
|
56
|
+
</TenantForm>
|
|
57
|
+
)
|
|
58
|
+
}
|
|
59
|
+
const errorToField: Record<TenantApi.VerifyEmailErrorCode, keyof VerifyEmailFormValues | undefined> = {
|
|
60
|
+
TOKEN_EXPIRED: 'token',
|
|
61
|
+
TOKEN_NOT_FOUND: 'token',
|
|
62
|
+
TOKEN_USED: 'token',
|
|
63
|
+
TOKEN_INVALID: 'token',
|
|
64
|
+
}
|
|
@@ -1,12 +1,15 @@
|
|
|
1
|
-
export * from './CreateApiKeyForm'
|
|
2
|
-
export * from './CreateSessionTokenForm'
|
|
3
|
-
export * from './ChangeMyPasswordForm'
|
|
4
|
-
export * from './InviteForm'
|
|
5
|
-
export * from './LoginForm'
|
|
6
|
-
export * from './PasswordResetForm'
|
|
7
|
-
export * from './PasswordResetRequestForm'
|
|
8
|
-
export * from './
|
|
9
|
-
export * from './
|
|
10
|
-
export * from './
|
|
11
|
-
export * from './
|
|
12
|
-
export * from './
|
|
1
|
+
export * from './CreateApiKeyForm.js'
|
|
2
|
+
export * from './CreateSessionTokenForm.js'
|
|
3
|
+
export * from './ChangeMyPasswordForm.js'
|
|
4
|
+
export * from './InviteForm.js'
|
|
5
|
+
export * from './LoginForm.js'
|
|
6
|
+
export * from './PasswordResetForm.js'
|
|
7
|
+
export * from './PasswordResetRequestForm.js'
|
|
8
|
+
export * from './VerifyEmailForm.js'
|
|
9
|
+
export * from './ConfirmEmailChangeForm.js'
|
|
10
|
+
export * from './RequestEmailVerificationForm.js'
|
|
11
|
+
export * from './PasswordlessSignInForm.js'
|
|
12
|
+
export * from './PasswordlessSignInInitForm.js'
|
|
13
|
+
export * from './OtpPrepareForm.js'
|
|
14
|
+
export * from './OtpConfirmForm.js'
|
|
15
|
+
export * from './UpdateProjectMemberForm.js'
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { ReactNode, useEffect, useMemo, useRef, useState } from 'react'
|
|
2
|
-
import { IDPMethodsContextProvider, IDPStateContextProvider } from '../../contexts'
|
|
3
|
-
import { IDPInitError, IDPResponseError, IDPStateValue } from '../../types/idp'
|
|
4
|
-
import { useHandleIDPResponse } from '../../internal/hooks/useHandleIDPResponse'
|
|
5
|
-
import { useIDPAutoInitProvider } from '../../internal/hooks/useIDPAutoInit'
|
|
6
|
-
import { useInitIDPRedirect } from '../../internal/hooks/useInitIDPRedirect'
|
|
2
|
+
import { IDPMethodsContextProvider, IDPStateContextProvider } from '../../contexts.js'
|
|
3
|
+
import { IDPInitError, IDPResponseError, IDPStateValue } from '../../types/idp.js'
|
|
4
|
+
import { useHandleIDPResponse } from '../../internal/hooks/useHandleIDPResponse.js'
|
|
5
|
+
import { useIDPAutoInitProvider } from '../../internal/hooks/useIDPAutoInit.js'
|
|
6
|
+
import { useInitIDPRedirect } from '../../internal/hooks/useInitIDPRedirect.js'
|
|
7
7
|
|
|
8
8
|
export interface IDPProps {
|
|
9
9
|
children: ReactNode
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Slot } from '@radix-ui/react-slot'
|
|
2
2
|
import { ComponentType, ReactElement } from 'react'
|
|
3
|
-
import { useIDPMethods } from '../../contexts'
|
|
3
|
+
import { useIDPMethods } from '../../contexts.js'
|
|
4
4
|
|
|
5
5
|
const SlotButton = Slot as ComponentType<React.ButtonHTMLAttributes<HTMLButtonElement>>
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { ReactNode } from 'react'
|
|
2
|
-
import { IDPStateType } from '../../types'
|
|
3
|
-
import { useIDPState } from '../../contexts'
|
|
2
|
+
import { IDPStateType } from '../../types/index.js'
|
|
3
|
+
import { useIDPState } from '../../contexts.js'
|
|
4
4
|
|
|
5
5
|
export interface IDPStateProps {
|
|
6
6
|
state: IDPStateType | IDPStateType[]
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from './IDPState'
|
|
2
|
-
export * from './IDP'
|
|
3
|
-
export * from './IDPInitTrigger'
|
|
1
|
+
export * from './IDPState.js'
|
|
2
|
+
export * from './IDP.js'
|
|
3
|
+
export * from './IDPInitTrigger.js'
|
package/src/components/index.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export * from './IdentityProvider'
|
|
2
|
-
export * from './IdentityState'
|
|
3
|
-
export * from './forms'
|
|
4
|
-
export * from './idp'
|
|
5
|
-
export * from './triggers'
|
|
1
|
+
export * from './IdentityProvider.js'
|
|
2
|
+
export * from './IdentityState.js'
|
|
3
|
+
export * from './forms/index.js'
|
|
4
|
+
export * from './idp/index.js'
|
|
5
|
+
export * from './triggers/index.js'
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ReactElement, useCallback } from 'react'
|
|
2
|
-
import { useDisableOtpMutation } from '../../hooks'
|
|
3
|
-
import { TenantActionTrigger } from './TenantActionTrigger'
|
|
4
|
-
import { useIdentityMethods } from '../../contexts'
|
|
2
|
+
import { useDisableOtpMutation } from '../../hooks/index.js'
|
|
3
|
+
import { TenantActionTrigger } from './TenantActionTrigger.js'
|
|
4
|
+
import { useIdentityMethods } from '../../contexts.js'
|
|
5
5
|
|
|
6
6
|
export interface DisableOtpTriggerProps {
|
|
7
7
|
children: ReactElement
|
|
@@ -1,10 +1,16 @@
|
|
|
1
1
|
import { ReactNode, useCallback } from 'react'
|
|
2
2
|
import { Slot } from '@radix-ui/react-slot'
|
|
3
|
-
import { useLogout } from '../../hooks/useLogout'
|
|
3
|
+
import { useLogout } from '../../hooks/useLogout.js'
|
|
4
4
|
|
|
5
|
-
export const LogoutTrigger = ({ children }: {
|
|
5
|
+
export const LogoutTrigger = ({ children, idpLogout }: {
|
|
6
6
|
children: ReactNode
|
|
7
|
+
/**
|
|
8
|
+
* Opt in to OIDC front-channel Single Logout: when the session was federated via an OIDC IdP
|
|
9
|
+
* that advertises an end_session_endpoint, redirect the browser to the IdP's logout URL so the
|
|
10
|
+
* user is also signed out at the IdP. Defaults to a local-only logout.
|
|
11
|
+
*/
|
|
12
|
+
idpLogout?: boolean
|
|
7
13
|
}) => {
|
|
8
14
|
const logout = useLogout()
|
|
9
|
-
return <Slot onClick={useCallback(() => logout(), [logout])}>{children}</Slot>
|
|
15
|
+
return <Slot onClick={useCallback(() => logout({ idpLogout }), [logout, idpLogout])}>{children}</Slot>
|
|
10
16
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ReactElement, useCallback } from 'react'
|
|
2
|
-
import { TenantActionTrigger } from './TenantActionTrigger'
|
|
3
|
-
import { RemoveProjectMemberMutationVariables, useRemoveProjectMemberMutation } from '../../hooks'
|
|
2
|
+
import { TenantActionTrigger } from './TenantActionTrigger.js'
|
|
3
|
+
import { RemoveProjectMemberMutationVariables, useRemoveProjectMemberMutation } from '../../hooks/index.js'
|
|
4
4
|
|
|
5
5
|
export type RemoveProjectMemberTriggerProps =
|
|
6
6
|
& RemoveProjectMemberMutationVariables
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from './DisableOtpTrigger'
|
|
2
|
-
export * from './LogoutTrigger'
|
|
3
|
-
export * from './RemoveProjectMemberTrigger'
|
|
1
|
+
export * from './DisableOtpTrigger.js'
|
|
2
|
+
export * from './LogoutTrigger.js'
|
|
3
|
+
export * from './RemoveProjectMemberTrigger.js'
|
package/src/contexts.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createContext, createRequiredContext } from '@contember/react-utils'
|
|
2
|
-
import { FormContextValue, Identity, IdentityMethods, IdentityStateValue, IDPMethods, IDPStateValue } from './types'
|
|
2
|
+
import { FormContextValue, Identity, IdentityMethods, IdentityStateValue, IDPMethods, IDPStateValue } from './types/index.js'
|
|
3
3
|
|
|
4
4
|
const IdentityContext_ = createContext<Identity | undefined>('IdentityContext', undefined)
|
|
5
5
|
/** @internal */
|