@contember/react-client-tenant 2.2.0-alpha.3 → 2.2.0-alpha.5
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/CLAUDE.md +40 -0
- package/dist/development/index.cjs +123 -0
- package/dist/development/index.cjs.map +1 -1
- package/dist/development/index.js +123 -0
- package/dist/development/index.js.map +1 -1
- package/dist/development/src/components/forms/AddProjectMemberForm.cjs +59 -0
- package/dist/development/src/components/forms/AddProjectMemberForm.cjs.map +1 -0
- package/dist/development/src/components/forms/AddProjectMemberForm.js +59 -0
- package/dist/development/src/components/forms/AddProjectMemberForm.js.map +1 -0
- package/dist/development/src/components/forms/ChangeMyProfileForm.cjs +58 -0
- package/dist/development/src/components/forms/ChangeMyProfileForm.cjs.map +1 -0
- package/dist/development/src/components/forms/ChangeMyProfileForm.js +58 -0
- package/dist/development/src/components/forms/ChangeMyProfileForm.js.map +1 -0
- package/dist/development/src/components/forms/ChangePasswordForm.cjs +57 -0
- package/dist/development/src/components/forms/ChangePasswordForm.cjs.map +1 -0
- package/dist/development/src/components/forms/ChangePasswordForm.js +57 -0
- package/dist/development/src/components/forms/ChangePasswordForm.js.map +1 -0
- package/dist/development/src/components/forms/ChangeProfileForm.cjs +54 -0
- package/dist/development/src/components/forms/ChangeProfileForm.cjs.map +1 -0
- package/dist/development/src/components/forms/ChangeProfileForm.js +54 -0
- package/dist/development/src/components/forms/ChangeProfileForm.js.map +1 -0
- package/dist/development/src/components/forms/CreateGlobalApiKeyForm.cjs +53 -0
- package/dist/development/src/components/forms/CreateGlobalApiKeyForm.cjs.map +1 -0
- package/dist/development/src/components/forms/CreateGlobalApiKeyForm.js +53 -0
- package/dist/development/src/components/forms/CreateGlobalApiKeyForm.js.map +1 -0
- package/dist/development/src/components/forms/EmailOtpConfirmForm.cjs +51 -0
- package/dist/development/src/components/forms/EmailOtpConfirmForm.cjs.map +1 -0
- package/dist/development/src/components/forms/EmailOtpConfirmForm.js +51 -0
- package/dist/development/src/components/forms/EmailOtpConfirmForm.js.map +1 -0
- package/dist/development/src/components/forms/InviteForm.cjs +23 -3
- package/dist/development/src/components/forms/InviteForm.cjs.map +1 -1
- package/dist/development/src/components/forms/InviteForm.js +23 -3
- package/dist/development/src/components/forms/InviteForm.js.map +1 -1
- package/dist/development/src/components/forms/LoginForm.cjs +5 -3
- package/dist/development/src/components/forms/LoginForm.cjs.map +1 -1
- package/dist/development/src/components/forms/LoginForm.js +5 -3
- package/dist/development/src/components/forms/LoginForm.js.map +1 -1
- package/dist/development/src/components/forms/PasswordlessSignInForm.cjs +5 -3
- package/dist/development/src/components/forms/PasswordlessSignInForm.cjs.map +1 -1
- package/dist/development/src/components/forms/PasswordlessSignInForm.js +5 -3
- package/dist/development/src/components/forms/PasswordlessSignInForm.js.map +1 -1
- package/dist/development/src/components/forms/SetProjectSecretForm.cjs +53 -0
- package/dist/development/src/components/forms/SetProjectSecretForm.cjs.map +1 -0
- package/dist/development/src/components/forms/SetProjectSecretForm.js +53 -0
- package/dist/development/src/components/forms/SetProjectSecretForm.js.map +1 -0
- package/dist/development/src/components/forms/SignUpForm.cjs +66 -0
- package/dist/development/src/components/forms/SignUpForm.cjs.map +1 -0
- package/dist/development/src/components/forms/SignUpForm.js +66 -0
- package/dist/development/src/components/forms/SignUpForm.js.map +1 -0
- package/dist/development/src/components/forms/TenantForm.cjs +8 -4
- package/dist/development/src/components/forms/TenantForm.cjs.map +1 -1
- package/dist/development/src/components/forms/TenantForm.js +8 -4
- package/dist/development/src/components/forms/TenantForm.js.map +1 -1
- package/dist/development/src/components/triggers/DisableEmailOtpTrigger.cjs +32 -0
- package/dist/development/src/components/triggers/DisableEmailOtpTrigger.cjs.map +1 -0
- package/dist/development/src/components/triggers/DisableEmailOtpTrigger.js +32 -0
- package/dist/development/src/components/triggers/DisableEmailOtpTrigger.js.map +1 -0
- package/dist/development/src/components/triggers/DisableMyPasswordlessTrigger.cjs +32 -0
- package/dist/development/src/components/triggers/DisableMyPasswordlessTrigger.cjs.map +1 -0
- package/dist/development/src/components/triggers/DisableMyPasswordlessTrigger.js +32 -0
- package/dist/development/src/components/triggers/DisableMyPasswordlessTrigger.js.map +1 -0
- package/dist/development/src/components/triggers/DisableOtpTrigger.cjs +1 -1
- package/dist/development/src/components/triggers/DisableOtpTrigger.cjs.map +1 -1
- package/dist/development/src/components/triggers/DisableOtpTrigger.js +1 -1
- package/dist/development/src/components/triggers/DisableOtpTrigger.js.map +1 -1
- package/dist/development/src/components/triggers/DisablePersonTrigger.cjs +17 -0
- package/dist/development/src/components/triggers/DisablePersonTrigger.cjs.map +1 -0
- package/dist/development/src/components/triggers/DisablePersonTrigger.js +17 -0
- package/dist/development/src/components/triggers/DisablePersonTrigger.js.map +1 -0
- package/dist/development/src/components/triggers/EnableMyPasswordlessTrigger.cjs +32 -0
- package/dist/development/src/components/triggers/EnableMyPasswordlessTrigger.cjs.map +1 -0
- package/dist/development/src/components/triggers/EnableMyPasswordlessTrigger.js +32 -0
- package/dist/development/src/components/triggers/EnableMyPasswordlessTrigger.js.map +1 -0
- package/dist/development/src/components/triggers/EnablePersonTrigger.cjs +17 -0
- package/dist/development/src/components/triggers/EnablePersonTrigger.cjs.map +1 -0
- package/dist/development/src/components/triggers/EnablePersonTrigger.js +17 -0
- package/dist/development/src/components/triggers/EnablePersonTrigger.js.map +1 -0
- package/dist/development/src/components/triggers/ForceSignOutPersonTrigger.cjs +17 -0
- package/dist/development/src/components/triggers/ForceSignOutPersonTrigger.cjs.map +1 -0
- package/dist/development/src/components/triggers/ForceSignOutPersonTrigger.js +17 -0
- package/dist/development/src/components/triggers/ForceSignOutPersonTrigger.js.map +1 -0
- package/dist/development/src/components/triggers/InitEmailOtpTrigger.cjs +16 -0
- package/dist/development/src/components/triggers/InitEmailOtpTrigger.cjs.map +1 -0
- package/dist/development/src/components/triggers/InitEmailOtpTrigger.js +16 -0
- package/dist/development/src/components/triggers/InitEmailOtpTrigger.js.map +1 -0
- package/dist/development/src/components/triggers/RegenerateBackupCodesTrigger.cjs +26 -0
- package/dist/development/src/components/triggers/RegenerateBackupCodesTrigger.cjs.map +1 -0
- package/dist/development/src/components/triggers/RegenerateBackupCodesTrigger.js +26 -0
- package/dist/development/src/components/triggers/RegenerateBackupCodesTrigger.js.map +1 -0
- package/dist/development/src/components/triggers/RemoveProjectMemberTrigger.cjs +1 -1
- package/dist/development/src/components/triggers/RemoveProjectMemberTrigger.cjs.map +1 -1
- package/dist/development/src/components/triggers/RemoveProjectMemberTrigger.js +1 -1
- package/dist/development/src/components/triggers/RemoveProjectMemberTrigger.js.map +1 -1
- package/dist/development/src/components/triggers/ResetPersonMfaTrigger.cjs +17 -0
- package/dist/development/src/components/triggers/ResetPersonMfaTrigger.cjs.map +1 -0
- package/dist/development/src/components/triggers/ResetPersonMfaTrigger.js +17 -0
- package/dist/development/src/components/triggers/ResetPersonMfaTrigger.js.map +1 -0
- package/dist/development/src/components/triggers/RevokeSessionTrigger.cjs +17 -0
- package/dist/development/src/components/triggers/RevokeSessionTrigger.cjs.map +1 -0
- package/dist/development/src/components/triggers/RevokeSessionTrigger.js +17 -0
- package/dist/development/src/components/triggers/RevokeSessionTrigger.js.map +1 -0
- package/dist/development/src/components/triggers/TenantActionTrigger.cjs +7 -3
- package/dist/development/src/components/triggers/TenantActionTrigger.cjs.map +1 -1
- package/dist/development/src/components/triggers/TenantActionTrigger.js +7 -3
- package/dist/development/src/components/triggers/TenantActionTrigger.js.map +1 -1
- package/dist/development/src/hooks/mutations/auth/useSignUpMutation.cjs +30 -0
- package/dist/development/src/hooks/mutations/auth/useSignUpMutation.cjs.map +1 -0
- package/dist/development/src/hooks/mutations/auth/useSignUpMutation.js +13 -0
- package/dist/development/src/hooks/mutations/auth/useSignUpMutation.js.map +1 -0
- package/dist/development/src/hooks/mutations/emailOtp/useConfirmEmailOtpMutation.cjs +30 -0
- package/dist/development/src/hooks/mutations/emailOtp/useConfirmEmailOtpMutation.cjs.map +1 -0
- package/dist/development/src/hooks/mutations/emailOtp/useConfirmEmailOtpMutation.js +13 -0
- package/dist/development/src/hooks/mutations/emailOtp/useConfirmEmailOtpMutation.js.map +1 -0
- package/dist/development/src/hooks/mutations/emailOtp/useDisableEmailOtpMutation.cjs +29 -0
- package/dist/development/src/hooks/mutations/emailOtp/useDisableEmailOtpMutation.cjs.map +1 -0
- package/dist/development/src/hooks/mutations/emailOtp/useDisableEmailOtpMutation.js +12 -0
- package/dist/development/src/hooks/mutations/emailOtp/useDisableEmailOtpMutation.js.map +1 -0
- package/dist/development/src/hooks/mutations/emailOtp/useInitEmailOtpMutation.cjs +29 -0
- package/dist/development/src/hooks/mutations/emailOtp/useInitEmailOtpMutation.cjs.map +1 -0
- package/dist/development/src/hooks/mutations/emailOtp/useInitEmailOtpMutation.js +12 -0
- package/dist/development/src/hooks/mutations/emailOtp/useInitEmailOtpMutation.js.map +1 -0
- package/dist/development/src/hooks/mutations/identity/useAddGlobalIdentityRolesMutation.cjs +30 -0
- package/dist/development/src/hooks/mutations/identity/useAddGlobalIdentityRolesMutation.cjs.map +1 -0
- package/dist/development/src/hooks/mutations/identity/useAddGlobalIdentityRolesMutation.js +13 -0
- package/dist/development/src/hooks/mutations/identity/useAddGlobalIdentityRolesMutation.js.map +1 -0
- package/dist/development/src/hooks/mutations/identity/useRemoveGlobalIdentityRolesMutation.cjs +30 -0
- package/dist/development/src/hooks/mutations/identity/useRemoveGlobalIdentityRolesMutation.cjs.map +1 -0
- package/dist/development/src/hooks/mutations/identity/useRemoveGlobalIdentityRolesMutation.js +13 -0
- package/dist/development/src/hooks/mutations/identity/useRemoveGlobalIdentityRolesMutation.js.map +1 -0
- package/dist/development/src/hooks/mutations/idp/useDisconnectMyIdentityProviderMutation.cjs +29 -0
- package/dist/development/src/hooks/mutations/idp/useDisconnectMyIdentityProviderMutation.cjs.map +1 -0
- package/dist/development/src/hooks/mutations/idp/useDisconnectMyIdentityProviderMutation.js +12 -0
- package/dist/development/src/hooks/mutations/idp/useDisconnectMyIdentityProviderMutation.js.map +1 -0
- package/dist/development/src/hooks/mutations/invite/useUnmanagedInviteMutation.cjs +30 -0
- package/dist/development/src/hooks/mutations/invite/useUnmanagedInviteMutation.cjs.map +1 -0
- package/dist/development/src/hooks/mutations/invite/useUnmanagedInviteMutation.js +13 -0
- package/dist/development/src/hooks/mutations/invite/useUnmanagedInviteMutation.js.map +1 -0
- package/dist/development/src/hooks/mutations/otp/useRegenerateBackupCodesMutation.cjs +30 -0
- package/dist/development/src/hooks/mutations/otp/useRegenerateBackupCodesMutation.cjs.map +1 -0
- package/dist/development/src/hooks/mutations/otp/useRegenerateBackupCodesMutation.js +13 -0
- package/dist/development/src/hooks/mutations/otp/useRegenerateBackupCodesMutation.js.map +1 -0
- package/dist/development/src/hooks/mutations/person/useChangePasswordMutation.cjs +29 -0
- package/dist/development/src/hooks/mutations/person/useChangePasswordMutation.cjs.map +1 -0
- package/dist/development/src/hooks/mutations/person/useChangePasswordMutation.js +12 -0
- package/dist/development/src/hooks/mutations/person/useChangePasswordMutation.js.map +1 -0
- package/dist/development/src/hooks/mutations/person/useDisablePersonMutation.cjs +29 -0
- package/dist/development/src/hooks/mutations/person/useDisablePersonMutation.cjs.map +1 -0
- package/dist/development/src/hooks/mutations/person/useDisablePersonMutation.js +12 -0
- package/dist/development/src/hooks/mutations/person/useDisablePersonMutation.js.map +1 -0
- package/dist/development/src/hooks/mutations/person/useEnablePersonMutation.cjs +29 -0
- package/dist/development/src/hooks/mutations/person/useEnablePersonMutation.cjs.map +1 -0
- package/dist/development/src/hooks/mutations/person/useEnablePersonMutation.js +12 -0
- package/dist/development/src/hooks/mutations/person/useEnablePersonMutation.js.map +1 -0
- package/dist/development/src/hooks/mutations/person/useForceSignOutPersonMutation.cjs +29 -0
- package/dist/development/src/hooks/mutations/person/useForceSignOutPersonMutation.cjs.map +1 -0
- package/dist/development/src/hooks/mutations/person/useForceSignOutPersonMutation.js +12 -0
- package/dist/development/src/hooks/mutations/person/useForceSignOutPersonMutation.js.map +1 -0
- package/dist/development/src/hooks/mutations/person/useResetPersonMfaMutation.cjs +29 -0
- package/dist/development/src/hooks/mutations/person/useResetPersonMfaMutation.cjs.map +1 -0
- package/dist/development/src/hooks/mutations/person/useResetPersonMfaMutation.js +12 -0
- package/dist/development/src/hooks/mutations/person/useResetPersonMfaMutation.js.map +1 -0
- package/dist/development/src/hooks/mutations/project/useSetProjectSecretMutation.cjs +29 -0
- package/dist/development/src/hooks/mutations/project/useSetProjectSecretMutation.cjs.map +1 -0
- package/dist/development/src/hooks/mutations/project/useSetProjectSecretMutation.js +12 -0
- package/dist/development/src/hooks/mutations/project/useSetProjectSecretMutation.js.map +1 -0
- package/dist/development/src/hooks/mutations/session/useRevokeSessionMutation.cjs +29 -0
- package/dist/development/src/hooks/mutations/session/useRevokeSessionMutation.cjs.map +1 -0
- package/dist/development/src/hooks/mutations/session/useRevokeSessionMutation.js +12 -0
- package/dist/development/src/hooks/mutations/session/useRevokeSessionMutation.js.map +1 -0
- package/dist/development/src/hooks/queries/useAuthLogQuery.cjs +39 -0
- package/dist/development/src/hooks/queries/useAuthLogQuery.cjs.map +1 -0
- package/dist/development/src/hooks/queries/useAuthLogQuery.js +22 -0
- package/dist/development/src/hooks/queries/useAuthLogQuery.js.map +1 -0
- package/dist/development/src/hooks/queries/useAuthPoliciesQuery.cjs +32 -0
- package/dist/development/src/hooks/queries/useAuthPoliciesQuery.cjs.map +1 -0
- package/dist/development/src/hooks/queries/useAuthPoliciesQuery.js +15 -0
- package/dist/development/src/hooks/queries/useAuthPoliciesQuery.js.map +1 -0
- package/dist/development/src/hooks/queries/useConfigurationQuery.cjs +33 -0
- package/dist/development/src/hooks/queries/useConfigurationQuery.cjs.map +1 -0
- package/dist/development/src/hooks/queries/useConfigurationQuery.js +16 -0
- package/dist/development/src/hooks/queries/useConfigurationQuery.js.map +1 -0
- package/dist/development/src/hooks/queries/useGlobalApiKeysQuery.cjs +32 -0
- package/dist/development/src/hooks/queries/useGlobalApiKeysQuery.cjs.map +1 -0
- package/dist/development/src/hooks/queries/useGlobalApiKeysQuery.js +15 -0
- package/dist/development/src/hooks/queries/useGlobalApiKeysQuery.js.map +1 -0
- package/dist/development/src/hooks/queries/useIdentityProvidersQuery.cjs +32 -0
- package/dist/development/src/hooks/queries/useIdentityProvidersQuery.cjs.map +1 -0
- package/dist/development/src/hooks/queries/useIdentityProvidersQuery.js +15 -0
- package/dist/development/src/hooks/queries/useIdentityProvidersQuery.js.map +1 -0
- package/dist/development/src/hooks/queries/useMailTemplatesQuery.cjs +32 -0
- package/dist/development/src/hooks/queries/useMailTemplatesQuery.cjs.map +1 -0
- package/dist/development/src/hooks/queries/useMailTemplatesQuery.js +15 -0
- package/dist/development/src/hooks/queries/useMailTemplatesQuery.js.map +1 -0
- package/dist/development/src/hooks/queries/useMeQuery.cjs +4 -2
- package/dist/development/src/hooks/queries/useMeQuery.cjs.map +1 -1
- package/dist/development/src/hooks/queries/useMeQuery.js +4 -2
- package/dist/development/src/hooks/queries/useMeQuery.js.map +1 -1
- package/dist/development/src/hooks/queries/useMyIdentityProvidersQuery.cjs +38 -0
- package/dist/development/src/hooks/queries/useMyIdentityProvidersQuery.cjs.map +1 -0
- package/dist/development/src/hooks/queries/useMyIdentityProvidersQuery.js +21 -0
- package/dist/development/src/hooks/queries/useMyIdentityProvidersQuery.js.map +1 -0
- package/dist/development/src/hooks/queries/useMySessionsQuery.cjs +34 -0
- package/dist/development/src/hooks/queries/useMySessionsQuery.cjs.map +1 -0
- package/dist/development/src/hooks/queries/useMySessionsQuery.js +17 -0
- package/dist/development/src/hooks/queries/useMySessionsQuery.js.map +1 -0
- package/dist/development/src/hooks/queries/usePersonQuery.cjs +40 -0
- package/dist/development/src/hooks/queries/usePersonQuery.cjs.map +1 -0
- package/dist/development/src/hooks/queries/usePersonQuery.js +23 -0
- package/dist/development/src/hooks/queries/usePersonQuery.js.map +1 -0
- package/dist/development/src/hooks/queries/usePersonSessionsQuery.cjs +39 -0
- package/dist/development/src/hooks/queries/usePersonSessionsQuery.cjs.map +1 -0
- package/dist/development/src/hooks/queries/usePersonSessionsQuery.js +22 -0
- package/dist/development/src/hooks/queries/usePersonSessionsQuery.js.map +1 -0
- package/dist/development/src/hooks/queries/usePersonsQuery.cjs +45 -0
- package/dist/development/src/hooks/queries/usePersonsQuery.cjs.map +1 -0
- package/dist/development/src/hooks/queries/usePersonsQuery.js +28 -0
- package/dist/development/src/hooks/queries/usePersonsQuery.js.map +1 -0
- package/dist/development/src/hooks/queries/useProjectApiKeysQuery.cjs +49 -0
- package/dist/development/src/hooks/queries/useProjectApiKeysQuery.cjs.map +1 -0
- package/dist/development/src/hooks/queries/useProjectApiKeysQuery.js +32 -0
- package/dist/development/src/hooks/queries/useProjectApiKeysQuery.js.map +1 -0
- package/dist/development/src/hooks/queries/useProjectMembersQuery.cjs +1 -1
- package/dist/development/src/hooks/queries/useProjectMembersQuery.cjs.map +1 -1
- package/dist/development/src/hooks/queries/useProjectMembersQuery.js +1 -1
- package/dist/development/src/hooks/queries/useProjectMembersQuery.js.map +1 -1
- package/dist/development/src/hooks/queries/useProjectSecretsQuery.cjs +45 -0
- package/dist/development/src/hooks/queries/useProjectSecretsQuery.cjs.map +1 -0
- package/dist/development/src/hooks/queries/useProjectSecretsQuery.js +28 -0
- package/dist/development/src/hooks/queries/useProjectSecretsQuery.js.map +1 -0
- package/dist/development/src/hooks/useFetchIdentity.cjs +17 -3
- package/dist/development/src/hooks/useFetchIdentity.cjs.map +1 -1
- package/dist/development/src/hooks/useFetchIdentity.js +17 -3
- package/dist/development/src/hooks/useFetchIdentity.js.map +1 -1
- package/dist/development/src/types/forbidden.cjs +16 -0
- package/dist/development/src/types/forbidden.cjs.map +1 -0
- package/dist/development/src/types/forbidden.js +16 -0
- package/dist/development/src/types/forbidden.js.map +1 -0
- package/dist/production/index.cjs +123 -0
- package/dist/production/index.cjs.map +1 -1
- package/dist/production/index.js +123 -0
- package/dist/production/index.js.map +1 -1
- package/dist/production/src/components/forms/AddProjectMemberForm.cjs +51 -0
- package/dist/production/src/components/forms/AddProjectMemberForm.cjs.map +1 -0
- package/dist/production/src/components/forms/AddProjectMemberForm.js +51 -0
- package/dist/production/src/components/forms/AddProjectMemberForm.js.map +1 -0
- package/dist/production/src/components/forms/ChangeMyProfileForm.cjs +50 -0
- package/dist/production/src/components/forms/ChangeMyProfileForm.cjs.map +1 -0
- package/dist/production/src/components/forms/ChangeMyProfileForm.js +50 -0
- package/dist/production/src/components/forms/ChangeMyProfileForm.js.map +1 -0
- package/dist/production/src/components/forms/ChangePasswordForm.cjs +49 -0
- package/dist/production/src/components/forms/ChangePasswordForm.cjs.map +1 -0
- package/dist/production/src/components/forms/ChangePasswordForm.js +49 -0
- package/dist/production/src/components/forms/ChangePasswordForm.js.map +1 -0
- package/dist/production/src/components/forms/ChangeProfileForm.cjs +46 -0
- package/dist/production/src/components/forms/ChangeProfileForm.cjs.map +1 -0
- package/dist/production/src/components/forms/ChangeProfileForm.js +46 -0
- package/dist/production/src/components/forms/ChangeProfileForm.js.map +1 -0
- package/dist/production/src/components/forms/CreateGlobalApiKeyForm.cjs +45 -0
- package/dist/production/src/components/forms/CreateGlobalApiKeyForm.cjs.map +1 -0
- package/dist/production/src/components/forms/CreateGlobalApiKeyForm.js +45 -0
- package/dist/production/src/components/forms/CreateGlobalApiKeyForm.js.map +1 -0
- package/dist/production/src/components/forms/EmailOtpConfirmForm.cjs +43 -0
- package/dist/production/src/components/forms/EmailOtpConfirmForm.cjs.map +1 -0
- package/dist/production/src/components/forms/EmailOtpConfirmForm.js +43 -0
- package/dist/production/src/components/forms/EmailOtpConfirmForm.js.map +1 -0
- package/dist/production/src/components/forms/InviteForm.cjs +22 -2
- package/dist/production/src/components/forms/InviteForm.cjs.map +1 -1
- package/dist/production/src/components/forms/InviteForm.js +22 -2
- package/dist/production/src/components/forms/InviteForm.js.map +1 -1
- package/dist/production/src/components/forms/LoginForm.cjs +4 -2
- package/dist/production/src/components/forms/LoginForm.cjs.map +1 -1
- package/dist/production/src/components/forms/LoginForm.js +4 -2
- package/dist/production/src/components/forms/LoginForm.js.map +1 -1
- package/dist/production/src/components/forms/PasswordlessSignInForm.cjs +4 -2
- package/dist/production/src/components/forms/PasswordlessSignInForm.cjs.map +1 -1
- package/dist/production/src/components/forms/PasswordlessSignInForm.js +4 -2
- package/dist/production/src/components/forms/PasswordlessSignInForm.js.map +1 -1
- package/dist/production/src/components/forms/SetProjectSecretForm.cjs +45 -0
- package/dist/production/src/components/forms/SetProjectSecretForm.cjs.map +1 -0
- package/dist/production/src/components/forms/SetProjectSecretForm.js +45 -0
- package/dist/production/src/components/forms/SetProjectSecretForm.js.map +1 -0
- package/dist/production/src/components/forms/SignUpForm.cjs +58 -0
- package/dist/production/src/components/forms/SignUpForm.cjs.map +1 -0
- package/dist/production/src/components/forms/SignUpForm.js +58 -0
- package/dist/production/src/components/forms/SignUpForm.js.map +1 -0
- package/dist/production/src/components/forms/TenantForm.cjs +6 -2
- package/dist/production/src/components/forms/TenantForm.cjs.map +1 -1
- package/dist/production/src/components/forms/TenantForm.js +6 -2
- package/dist/production/src/components/forms/TenantForm.js.map +1 -1
- package/dist/production/src/components/triggers/DisableEmailOtpTrigger.cjs +24 -0
- package/dist/production/src/components/triggers/DisableEmailOtpTrigger.cjs.map +1 -0
- package/dist/production/src/components/triggers/DisableEmailOtpTrigger.js +24 -0
- package/dist/production/src/components/triggers/DisableEmailOtpTrigger.js.map +1 -0
- package/dist/production/src/components/triggers/DisableMyPasswordlessTrigger.cjs +24 -0
- package/dist/production/src/components/triggers/DisableMyPasswordlessTrigger.cjs.map +1 -0
- package/dist/production/src/components/triggers/DisableMyPasswordlessTrigger.js +24 -0
- package/dist/production/src/components/triggers/DisableMyPasswordlessTrigger.js.map +1 -0
- 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/DisablePersonTrigger.cjs +13 -0
- package/dist/production/src/components/triggers/DisablePersonTrigger.cjs.map +1 -0
- package/dist/production/src/components/triggers/DisablePersonTrigger.js +13 -0
- package/dist/production/src/components/triggers/DisablePersonTrigger.js.map +1 -0
- package/dist/production/src/components/triggers/EnableMyPasswordlessTrigger.cjs +24 -0
- package/dist/production/src/components/triggers/EnableMyPasswordlessTrigger.cjs.map +1 -0
- package/dist/production/src/components/triggers/EnableMyPasswordlessTrigger.js +24 -0
- package/dist/production/src/components/triggers/EnableMyPasswordlessTrigger.js.map +1 -0
- package/dist/production/src/components/triggers/EnablePersonTrigger.cjs +13 -0
- package/dist/production/src/components/triggers/EnablePersonTrigger.cjs.map +1 -0
- package/dist/production/src/components/triggers/EnablePersonTrigger.js +13 -0
- package/dist/production/src/components/triggers/EnablePersonTrigger.js.map +1 -0
- package/dist/production/src/components/triggers/ForceSignOutPersonTrigger.cjs +13 -0
- package/dist/production/src/components/triggers/ForceSignOutPersonTrigger.cjs.map +1 -0
- package/dist/production/src/components/triggers/ForceSignOutPersonTrigger.js +13 -0
- package/dist/production/src/components/triggers/ForceSignOutPersonTrigger.js.map +1 -0
- package/dist/production/src/components/triggers/InitEmailOtpTrigger.cjs +12 -0
- package/dist/production/src/components/triggers/InitEmailOtpTrigger.cjs.map +1 -0
- package/dist/production/src/components/triggers/InitEmailOtpTrigger.js +12 -0
- package/dist/production/src/components/triggers/InitEmailOtpTrigger.js.map +1 -0
- package/dist/production/src/components/triggers/RegenerateBackupCodesTrigger.cjs +18 -0
- package/dist/production/src/components/triggers/RegenerateBackupCodesTrigger.cjs.map +1 -0
- package/dist/production/src/components/triggers/RegenerateBackupCodesTrigger.js +18 -0
- package/dist/production/src/components/triggers/RegenerateBackupCodesTrigger.js.map +1 -0
- 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/components/triggers/ResetPersonMfaTrigger.cjs +13 -0
- package/dist/production/src/components/triggers/ResetPersonMfaTrigger.cjs.map +1 -0
- package/dist/production/src/components/triggers/ResetPersonMfaTrigger.js +13 -0
- package/dist/production/src/components/triggers/ResetPersonMfaTrigger.js.map +1 -0
- package/dist/production/src/components/triggers/RevokeSessionTrigger.cjs +13 -0
- package/dist/production/src/components/triggers/RevokeSessionTrigger.cjs.map +1 -0
- package/dist/production/src/components/triggers/RevokeSessionTrigger.js +13 -0
- package/dist/production/src/components/triggers/RevokeSessionTrigger.js.map +1 -0
- package/dist/production/src/components/triggers/TenantActionTrigger.cjs +6 -2
- package/dist/production/src/components/triggers/TenantActionTrigger.cjs.map +1 -1
- package/dist/production/src/components/triggers/TenantActionTrigger.js +6 -2
- package/dist/production/src/components/triggers/TenantActionTrigger.js.map +1 -1
- package/dist/production/src/hooks/mutations/auth/useSignUpMutation.cjs +30 -0
- package/dist/production/src/hooks/mutations/auth/useSignUpMutation.cjs.map +1 -0
- package/dist/production/src/hooks/mutations/auth/useSignUpMutation.js +13 -0
- package/dist/production/src/hooks/mutations/auth/useSignUpMutation.js.map +1 -0
- package/dist/production/src/hooks/mutations/emailOtp/useConfirmEmailOtpMutation.cjs +30 -0
- package/dist/production/src/hooks/mutations/emailOtp/useConfirmEmailOtpMutation.cjs.map +1 -0
- package/dist/production/src/hooks/mutations/emailOtp/useConfirmEmailOtpMutation.js +13 -0
- package/dist/production/src/hooks/mutations/emailOtp/useConfirmEmailOtpMutation.js.map +1 -0
- package/dist/production/src/hooks/mutations/emailOtp/useDisableEmailOtpMutation.cjs +29 -0
- package/dist/production/src/hooks/mutations/emailOtp/useDisableEmailOtpMutation.cjs.map +1 -0
- package/dist/production/src/hooks/mutations/emailOtp/useDisableEmailOtpMutation.js +12 -0
- package/dist/production/src/hooks/mutations/emailOtp/useDisableEmailOtpMutation.js.map +1 -0
- package/dist/production/src/hooks/mutations/emailOtp/useInitEmailOtpMutation.cjs +29 -0
- package/dist/production/src/hooks/mutations/emailOtp/useInitEmailOtpMutation.cjs.map +1 -0
- package/dist/production/src/hooks/mutations/emailOtp/useInitEmailOtpMutation.js +12 -0
- package/dist/production/src/hooks/mutations/emailOtp/useInitEmailOtpMutation.js.map +1 -0
- package/dist/production/src/hooks/mutations/identity/useAddGlobalIdentityRolesMutation.cjs +30 -0
- package/dist/production/src/hooks/mutations/identity/useAddGlobalIdentityRolesMutation.cjs.map +1 -0
- package/dist/production/src/hooks/mutations/identity/useAddGlobalIdentityRolesMutation.js +13 -0
- package/dist/production/src/hooks/mutations/identity/useAddGlobalIdentityRolesMutation.js.map +1 -0
- package/dist/production/src/hooks/mutations/identity/useRemoveGlobalIdentityRolesMutation.cjs +30 -0
- package/dist/production/src/hooks/mutations/identity/useRemoveGlobalIdentityRolesMutation.cjs.map +1 -0
- package/dist/production/src/hooks/mutations/identity/useRemoveGlobalIdentityRolesMutation.js +13 -0
- package/dist/production/src/hooks/mutations/identity/useRemoveGlobalIdentityRolesMutation.js.map +1 -0
- package/dist/production/src/hooks/mutations/idp/useDisconnectMyIdentityProviderMutation.cjs +29 -0
- package/dist/production/src/hooks/mutations/idp/useDisconnectMyIdentityProviderMutation.cjs.map +1 -0
- package/dist/production/src/hooks/mutations/idp/useDisconnectMyIdentityProviderMutation.js +12 -0
- package/dist/production/src/hooks/mutations/idp/useDisconnectMyIdentityProviderMutation.js.map +1 -0
- package/dist/production/src/hooks/mutations/invite/useUnmanagedInviteMutation.cjs +30 -0
- package/dist/production/src/hooks/mutations/invite/useUnmanagedInviteMutation.cjs.map +1 -0
- package/dist/production/src/hooks/mutations/invite/useUnmanagedInviteMutation.js +13 -0
- package/dist/production/src/hooks/mutations/invite/useUnmanagedInviteMutation.js.map +1 -0
- package/dist/production/src/hooks/mutations/otp/useRegenerateBackupCodesMutation.cjs +30 -0
- package/dist/production/src/hooks/mutations/otp/useRegenerateBackupCodesMutation.cjs.map +1 -0
- package/dist/production/src/hooks/mutations/otp/useRegenerateBackupCodesMutation.js +13 -0
- package/dist/production/src/hooks/mutations/otp/useRegenerateBackupCodesMutation.js.map +1 -0
- package/dist/production/src/hooks/mutations/person/useChangePasswordMutation.cjs +29 -0
- package/dist/production/src/hooks/mutations/person/useChangePasswordMutation.cjs.map +1 -0
- package/dist/production/src/hooks/mutations/person/useChangePasswordMutation.js +12 -0
- package/dist/production/src/hooks/mutations/person/useChangePasswordMutation.js.map +1 -0
- package/dist/production/src/hooks/mutations/person/useDisablePersonMutation.cjs +29 -0
- package/dist/production/src/hooks/mutations/person/useDisablePersonMutation.cjs.map +1 -0
- package/dist/production/src/hooks/mutations/person/useDisablePersonMutation.js +12 -0
- package/dist/production/src/hooks/mutations/person/useDisablePersonMutation.js.map +1 -0
- package/dist/production/src/hooks/mutations/person/useEnablePersonMutation.cjs +29 -0
- package/dist/production/src/hooks/mutations/person/useEnablePersonMutation.cjs.map +1 -0
- package/dist/production/src/hooks/mutations/person/useEnablePersonMutation.js +12 -0
- package/dist/production/src/hooks/mutations/person/useEnablePersonMutation.js.map +1 -0
- package/dist/production/src/hooks/mutations/person/useForceSignOutPersonMutation.cjs +29 -0
- package/dist/production/src/hooks/mutations/person/useForceSignOutPersonMutation.cjs.map +1 -0
- package/dist/production/src/hooks/mutations/person/useForceSignOutPersonMutation.js +12 -0
- package/dist/production/src/hooks/mutations/person/useForceSignOutPersonMutation.js.map +1 -0
- package/dist/production/src/hooks/mutations/person/useResetPersonMfaMutation.cjs +29 -0
- package/dist/production/src/hooks/mutations/person/useResetPersonMfaMutation.cjs.map +1 -0
- package/dist/production/src/hooks/mutations/person/useResetPersonMfaMutation.js +12 -0
- package/dist/production/src/hooks/mutations/person/useResetPersonMfaMutation.js.map +1 -0
- package/dist/production/src/hooks/mutations/project/useSetProjectSecretMutation.cjs +29 -0
- package/dist/production/src/hooks/mutations/project/useSetProjectSecretMutation.cjs.map +1 -0
- package/dist/production/src/hooks/mutations/project/useSetProjectSecretMutation.js +12 -0
- package/dist/production/src/hooks/mutations/project/useSetProjectSecretMutation.js.map +1 -0
- package/dist/production/src/hooks/mutations/session/useRevokeSessionMutation.cjs +29 -0
- package/dist/production/src/hooks/mutations/session/useRevokeSessionMutation.cjs.map +1 -0
- package/dist/production/src/hooks/mutations/session/useRevokeSessionMutation.js +12 -0
- package/dist/production/src/hooks/mutations/session/useRevokeSessionMutation.js.map +1 -0
- package/dist/production/src/hooks/queries/useAuthLogQuery.cjs +39 -0
- package/dist/production/src/hooks/queries/useAuthLogQuery.cjs.map +1 -0
- package/dist/production/src/hooks/queries/useAuthLogQuery.js +22 -0
- package/dist/production/src/hooks/queries/useAuthLogQuery.js.map +1 -0
- package/dist/production/src/hooks/queries/useAuthPoliciesQuery.cjs +32 -0
- package/dist/production/src/hooks/queries/useAuthPoliciesQuery.cjs.map +1 -0
- package/dist/production/src/hooks/queries/useAuthPoliciesQuery.js +15 -0
- package/dist/production/src/hooks/queries/useAuthPoliciesQuery.js.map +1 -0
- package/dist/production/src/hooks/queries/useConfigurationQuery.cjs +33 -0
- package/dist/production/src/hooks/queries/useConfigurationQuery.cjs.map +1 -0
- package/dist/production/src/hooks/queries/useConfigurationQuery.js +16 -0
- package/dist/production/src/hooks/queries/useConfigurationQuery.js.map +1 -0
- package/dist/production/src/hooks/queries/useGlobalApiKeysQuery.cjs +32 -0
- package/dist/production/src/hooks/queries/useGlobalApiKeysQuery.cjs.map +1 -0
- package/dist/production/src/hooks/queries/useGlobalApiKeysQuery.js +15 -0
- package/dist/production/src/hooks/queries/useGlobalApiKeysQuery.js.map +1 -0
- package/dist/production/src/hooks/queries/useIdentityProvidersQuery.cjs +32 -0
- package/dist/production/src/hooks/queries/useIdentityProvidersQuery.cjs.map +1 -0
- package/dist/production/src/hooks/queries/useIdentityProvidersQuery.js +15 -0
- package/dist/production/src/hooks/queries/useIdentityProvidersQuery.js.map +1 -0
- package/dist/production/src/hooks/queries/useMailTemplatesQuery.cjs +32 -0
- package/dist/production/src/hooks/queries/useMailTemplatesQuery.cjs.map +1 -0
- package/dist/production/src/hooks/queries/useMailTemplatesQuery.js +15 -0
- package/dist/production/src/hooks/queries/useMailTemplatesQuery.js.map +1 -0
- package/dist/production/src/hooks/queries/useMeQuery.cjs +4 -2
- package/dist/production/src/hooks/queries/useMeQuery.cjs.map +1 -1
- package/dist/production/src/hooks/queries/useMeQuery.js +4 -2
- package/dist/production/src/hooks/queries/useMeQuery.js.map +1 -1
- package/dist/production/src/hooks/queries/useMyIdentityProvidersQuery.cjs +38 -0
- package/dist/production/src/hooks/queries/useMyIdentityProvidersQuery.cjs.map +1 -0
- package/dist/production/src/hooks/queries/useMyIdentityProvidersQuery.js +21 -0
- package/dist/production/src/hooks/queries/useMyIdentityProvidersQuery.js.map +1 -0
- package/dist/production/src/hooks/queries/useMySessionsQuery.cjs +34 -0
- package/dist/production/src/hooks/queries/useMySessionsQuery.cjs.map +1 -0
- package/dist/production/src/hooks/queries/useMySessionsQuery.js +17 -0
- package/dist/production/src/hooks/queries/useMySessionsQuery.js.map +1 -0
- package/dist/production/src/hooks/queries/usePersonQuery.cjs +40 -0
- package/dist/production/src/hooks/queries/usePersonQuery.cjs.map +1 -0
- package/dist/production/src/hooks/queries/usePersonQuery.js +23 -0
- package/dist/production/src/hooks/queries/usePersonQuery.js.map +1 -0
- package/dist/production/src/hooks/queries/usePersonSessionsQuery.cjs +39 -0
- package/dist/production/src/hooks/queries/usePersonSessionsQuery.cjs.map +1 -0
- package/dist/production/src/hooks/queries/usePersonSessionsQuery.js +22 -0
- package/dist/production/src/hooks/queries/usePersonSessionsQuery.js.map +1 -0
- package/dist/production/src/hooks/queries/usePersonsQuery.cjs +45 -0
- package/dist/production/src/hooks/queries/usePersonsQuery.cjs.map +1 -0
- package/dist/production/src/hooks/queries/usePersonsQuery.js +28 -0
- package/dist/production/src/hooks/queries/usePersonsQuery.js.map +1 -0
- package/dist/production/src/hooks/queries/useProjectApiKeysQuery.cjs +49 -0
- package/dist/production/src/hooks/queries/useProjectApiKeysQuery.cjs.map +1 -0
- package/dist/production/src/hooks/queries/useProjectApiKeysQuery.js +32 -0
- package/dist/production/src/hooks/queries/useProjectApiKeysQuery.js.map +1 -0
- package/dist/production/src/hooks/queries/useProjectMembersQuery.cjs +1 -1
- package/dist/production/src/hooks/queries/useProjectMembersQuery.cjs.map +1 -1
- package/dist/production/src/hooks/queries/useProjectMembersQuery.js +1 -1
- package/dist/production/src/hooks/queries/useProjectMembersQuery.js.map +1 -1
- package/dist/production/src/hooks/queries/useProjectSecretsQuery.cjs +45 -0
- package/dist/production/src/hooks/queries/useProjectSecretsQuery.cjs.map +1 -0
- package/dist/production/src/hooks/queries/useProjectSecretsQuery.js +28 -0
- package/dist/production/src/hooks/queries/useProjectSecretsQuery.js.map +1 -0
- package/dist/production/src/hooks/useFetchIdentity.cjs +17 -3
- package/dist/production/src/hooks/useFetchIdentity.cjs.map +1 -1
- package/dist/production/src/hooks/useFetchIdentity.js +17 -3
- package/dist/production/src/hooks/useFetchIdentity.js.map +1 -1
- package/dist/production/src/types/forbidden.cjs +16 -0
- package/dist/production/src/types/forbidden.cjs.map +1 -0
- package/dist/production/src/types/forbidden.js +16 -0
- package/dist/production/src/types/forbidden.js.map +1 -0
- package/dist/types/components/IdentityState.d.ts.map +1 -1
- package/dist/types/components/forms/AddProjectMemberForm.d.ts +20 -0
- package/dist/types/components/forms/AddProjectMemberForm.d.ts.map +1 -0
- package/dist/types/components/forms/ChangeMyPasswordForm.d.ts.map +1 -1
- package/dist/types/components/forms/ChangeMyProfileForm.d.ts +20 -0
- package/dist/types/components/forms/ChangeMyProfileForm.d.ts.map +1 -0
- package/dist/types/components/forms/ChangePasswordForm.d.ts +19 -0
- package/dist/types/components/forms/ChangePasswordForm.d.ts.map +1 -0
- package/dist/types/components/forms/ChangeProfileForm.d.ts +21 -0
- package/dist/types/components/forms/ChangeProfileForm.d.ts.map +1 -0
- package/dist/types/components/forms/ConfirmEmailChangeForm.d.ts.map +1 -1
- package/dist/types/components/forms/CreateApiKeyForm.d.ts.map +1 -1
- package/dist/types/components/forms/CreateGlobalApiKeyForm.d.ts +22 -0
- package/dist/types/components/forms/CreateGlobalApiKeyForm.d.ts.map +1 -0
- package/dist/types/components/forms/CreateSessionTokenForm.d.ts.map +1 -1
- package/dist/types/components/forms/EmailOtpConfirmForm.d.ts +21 -0
- package/dist/types/components/forms/EmailOtpConfirmForm.d.ts.map +1 -0
- package/dist/types/components/forms/InviteForm.d.ts +12 -1
- package/dist/types/components/forms/InviteForm.d.ts.map +1 -1
- package/dist/types/components/forms/LoginForm.d.ts +2 -0
- package/dist/types/components/forms/LoginForm.d.ts.map +1 -1
- package/dist/types/components/forms/OtpConfirmForm.d.ts.map +1 -1
- package/dist/types/components/forms/OtpPrepareForm.d.ts.map +1 -1
- package/dist/types/components/forms/PasswordResetForm.d.ts.map +1 -1
- package/dist/types/components/forms/PasswordResetRequestForm.d.ts.map +1 -1
- package/dist/types/components/forms/PasswordlessSignInForm.d.ts +2 -0
- package/dist/types/components/forms/PasswordlessSignInForm.d.ts.map +1 -1
- package/dist/types/components/forms/PasswordlessSignInInitForm.d.ts.map +1 -1
- package/dist/types/components/forms/RequestEmailVerificationForm.d.ts.map +1 -1
- package/dist/types/components/forms/SetProjectSecretForm.d.ts +19 -0
- package/dist/types/components/forms/SetProjectSecretForm.d.ts.map +1 -0
- package/dist/types/components/forms/SignUpForm.d.ts +31 -0
- package/dist/types/components/forms/SignUpForm.d.ts.map +1 -0
- package/dist/types/components/forms/TenantForm.d.ts.map +1 -1
- package/dist/types/components/forms/UpdateProjectMemberForm.d.ts.map +1 -1
- package/dist/types/components/forms/VerifyEmailForm.d.ts.map +1 -1
- package/dist/types/components/forms/index.d.ts +8 -0
- package/dist/types/components/forms/index.d.ts.map +1 -1
- package/dist/types/components/idp/IDP.d.ts.map +1 -1
- package/dist/types/components/idp/IDPInitTrigger.d.ts.map +1 -1
- package/dist/types/components/idp/IDPState.d.ts.map +1 -1
- package/dist/types/components/triggers/DisableEmailOtpTrigger.d.ts +10 -0
- package/dist/types/components/triggers/DisableEmailOtpTrigger.d.ts.map +1 -0
- package/dist/types/components/triggers/DisableMyPasswordlessTrigger.d.ts +10 -0
- package/dist/types/components/triggers/DisableMyPasswordlessTrigger.d.ts.map +1 -0
- package/dist/types/components/triggers/DisableOtpTrigger.d.ts +3 -1
- package/dist/types/components/triggers/DisableOtpTrigger.d.ts.map +1 -1
- package/dist/types/components/triggers/DisablePersonTrigger.d.ts +11 -0
- package/dist/types/components/triggers/DisablePersonTrigger.d.ts.map +1 -0
- package/dist/types/components/triggers/EnableMyPasswordlessTrigger.d.ts +10 -0
- package/dist/types/components/triggers/EnableMyPasswordlessTrigger.d.ts.map +1 -0
- package/dist/types/components/triggers/EnablePersonTrigger.d.ts +11 -0
- package/dist/types/components/triggers/EnablePersonTrigger.d.ts.map +1 -0
- package/dist/types/components/triggers/ForceSignOutPersonTrigger.d.ts +11 -0
- package/dist/types/components/triggers/ForceSignOutPersonTrigger.d.ts.map +1 -0
- package/dist/types/components/triggers/InitEmailOtpTrigger.d.ts +10 -0
- package/dist/types/components/triggers/InitEmailOtpTrigger.d.ts.map +1 -0
- package/dist/types/components/triggers/LogoutTrigger.d.ts.map +1 -1
- package/dist/types/components/triggers/RegenerateBackupCodesTrigger.d.ts +14 -0
- package/dist/types/components/triggers/RegenerateBackupCodesTrigger.d.ts.map +1 -0
- package/dist/types/components/triggers/RemoveProjectMemberTrigger.d.ts +3 -1
- package/dist/types/components/triggers/RemoveProjectMemberTrigger.d.ts.map +1 -1
- package/dist/types/components/triggers/ResetPersonMfaTrigger.d.ts +11 -0
- package/dist/types/components/triggers/ResetPersonMfaTrigger.d.ts.map +1 -0
- package/dist/types/components/triggers/RevokeSessionTrigger.d.ts +11 -0
- package/dist/types/components/triggers/RevokeSessionTrigger.d.ts.map +1 -0
- package/dist/types/components/triggers/TenantActionTrigger.d.ts +7 -4
- package/dist/types/components/triggers/TenantActionTrigger.d.ts.map +1 -1
- package/dist/types/components/triggers/index.d.ts +11 -0
- package/dist/types/components/triggers/index.d.ts.map +1 -1
- package/dist/types/hooks/mutations/auth/index.d.ts +1 -0
- package/dist/types/hooks/mutations/auth/index.d.ts.map +1 -1
- package/dist/types/hooks/mutations/auth/useSignUpMutation.d.ts +95 -0
- package/dist/types/hooks/mutations/auth/useSignUpMutation.d.ts.map +1 -0
- package/dist/types/hooks/mutations/emailOtp/index.d.ts +4 -0
- package/dist/types/hooks/mutations/emailOtp/index.d.ts.map +1 -0
- package/dist/types/hooks/mutations/emailOtp/useConfirmEmailOtpMutation.d.ts +31 -0
- package/dist/types/hooks/mutations/emailOtp/useConfirmEmailOtpMutation.d.ts.map +1 -0
- package/dist/types/hooks/mutations/emailOtp/useDisableEmailOtpMutation.d.ts +15 -0
- package/dist/types/hooks/mutations/emailOtp/useDisableEmailOtpMutation.d.ts.map +1 -0
- package/dist/types/hooks/mutations/emailOtp/useInitEmailOtpMutation.d.ts +15 -0
- package/dist/types/hooks/mutations/emailOtp/useInitEmailOtpMutation.d.ts.map +1 -0
- package/dist/types/hooks/mutations/identity/index.d.ts +3 -0
- package/dist/types/hooks/mutations/identity/index.d.ts.map +1 -0
- package/dist/types/hooks/mutations/identity/useAddGlobalIdentityRolesMutation.d.ts +51 -0
- package/dist/types/hooks/mutations/identity/useAddGlobalIdentityRolesMutation.d.ts.map +1 -0
- package/dist/types/hooks/mutations/identity/useRemoveGlobalIdentityRolesMutation.d.ts +51 -0
- package/dist/types/hooks/mutations/identity/useRemoveGlobalIdentityRolesMutation.d.ts.map +1 -0
- package/dist/types/hooks/mutations/idp/index.d.ts +1 -0
- package/dist/types/hooks/mutations/idp/index.d.ts.map +1 -1
- package/dist/types/hooks/mutations/idp/useDisconnectMyIdentityProviderMutation.d.ts +19 -0
- package/dist/types/hooks/mutations/idp/useDisconnectMyIdentityProviderMutation.d.ts.map +1 -0
- package/dist/types/hooks/mutations/index.d.ts +5 -0
- package/dist/types/hooks/mutations/index.d.ts.map +1 -1
- package/dist/types/hooks/mutations/invite/index.d.ts +1 -0
- package/dist/types/hooks/mutations/invite/index.d.ts.map +1 -1
- package/dist/types/hooks/mutations/invite/useUnmanagedInviteMutation.d.ts +104 -0
- package/dist/types/hooks/mutations/invite/useUnmanagedInviteMutation.d.ts.map +1 -0
- package/dist/types/hooks/mutations/otp/index.d.ts +1 -0
- package/dist/types/hooks/mutations/otp/index.d.ts.map +1 -1
- package/dist/types/hooks/mutations/otp/useRegenerateBackupCodesMutation.d.ts +27 -0
- package/dist/types/hooks/mutations/otp/useRegenerateBackupCodesMutation.d.ts.map +1 -0
- package/dist/types/hooks/mutations/person/index.d.ts +6 -0
- package/dist/types/hooks/mutations/person/index.d.ts.map +1 -0
- package/dist/types/hooks/mutations/person/useChangePasswordMutation.d.ts +25 -0
- package/dist/types/hooks/mutations/person/useChangePasswordMutation.d.ts.map +1 -0
- package/dist/types/hooks/mutations/person/useDisablePersonMutation.d.ts +19 -0
- package/dist/types/hooks/mutations/person/useDisablePersonMutation.d.ts.map +1 -0
- package/dist/types/hooks/mutations/person/useEnablePersonMutation.d.ts +19 -0
- package/dist/types/hooks/mutations/person/useEnablePersonMutation.d.ts.map +1 -0
- package/dist/types/hooks/mutations/person/useForceSignOutPersonMutation.d.ts +21 -0
- package/dist/types/hooks/mutations/person/useForceSignOutPersonMutation.d.ts.map +1 -0
- package/dist/types/hooks/mutations/person/useResetPersonMfaMutation.d.ts +19 -0
- package/dist/types/hooks/mutations/person/useResetPersonMfaMutation.d.ts.map +1 -0
- package/dist/types/hooks/mutations/project/index.d.ts +2 -0
- package/dist/types/hooks/mutations/project/index.d.ts.map +1 -0
- package/dist/types/hooks/mutations/project/useSetProjectSecretMutation.d.ts +23 -0
- package/dist/types/hooks/mutations/project/useSetProjectSecretMutation.d.ts.map +1 -0
- package/dist/types/hooks/mutations/session/index.d.ts +2 -0
- package/dist/types/hooks/mutations/session/index.d.ts.map +1 -0
- package/dist/types/hooks/mutations/session/useRevokeSessionMutation.d.ts +19 -0
- package/dist/types/hooks/mutations/session/useRevokeSessionMutation.d.ts.map +1 -0
- package/dist/types/hooks/queries/index.d.ts +13 -0
- package/dist/types/hooks/queries/index.d.ts.map +1 -1
- package/dist/types/hooks/queries/useAuthLogQuery.d.ts +48 -0
- package/dist/types/hooks/queries/useAuthLogQuery.d.ts.map +1 -0
- package/dist/types/hooks/queries/useAuthPoliciesQuery.d.ts +35 -0
- package/dist/types/hooks/queries/useAuthPoliciesQuery.d.ts.map +1 -0
- package/dist/types/hooks/queries/useConfigurationQuery.d.ts +139 -0
- package/dist/types/hooks/queries/useConfigurationQuery.d.ts.map +1 -0
- package/dist/types/hooks/queries/useGlobalApiKeysQuery.d.ts +30 -0
- package/dist/types/hooks/queries/useGlobalApiKeysQuery.d.ts.map +1 -0
- package/dist/types/hooks/queries/useIdentityProvidersQuery.d.ts +41 -0
- package/dist/types/hooks/queries/useIdentityProvidersQuery.d.ts.map +1 -0
- package/dist/types/hooks/queries/useMailTemplatesQuery.d.ts +30 -0
- package/dist/types/hooks/queries/useMailTemplatesQuery.d.ts.map +1 -0
- package/dist/types/hooks/queries/useMeQuery.d.ts +42 -0
- package/dist/types/hooks/queries/useMeQuery.d.ts.map +1 -1
- package/dist/types/hooks/queries/useMyIdentityProvidersQuery.d.ts +22 -0
- package/dist/types/hooks/queries/useMyIdentityProvidersQuery.d.ts.map +1 -0
- package/dist/types/hooks/queries/useMySessionsQuery.d.ts +28 -0
- package/dist/types/hooks/queries/useMySessionsQuery.d.ts.map +1 -0
- package/dist/types/hooks/queries/usePersonQuery.d.ts +99 -0
- package/dist/types/hooks/queries/usePersonQuery.d.ts.map +1 -0
- package/dist/types/hooks/queries/usePersonSessionsQuery.d.ts +31 -0
- package/dist/types/hooks/queries/usePersonSessionsQuery.d.ts.map +1 -0
- package/dist/types/hooks/queries/usePersonsQuery.d.ts +41 -0
- package/dist/types/hooks/queries/usePersonsQuery.d.ts.map +1 -0
- package/dist/types/hooks/queries/useProjectApiKeysQuery.d.ts +55 -0
- package/dist/types/hooks/queries/useProjectApiKeysQuery.d.ts.map +1 -0
- package/dist/types/hooks/queries/useProjectMembersQuery.d.ts +4 -0
- package/dist/types/hooks/queries/useProjectMembersQuery.d.ts.map +1 -1
- package/dist/types/hooks/queries/useProjectMembershipsQuery.d.ts.map +1 -1
- package/dist/types/hooks/queries/useProjectRolesDefinitionQuery.d.ts +19 -19
- package/dist/types/hooks/queries/useProjectRolesDefinitionQuery.d.ts.map +1 -1
- package/dist/types/hooks/queries/useProjectSecretsQuery.d.ts +17 -0
- package/dist/types/hooks/queries/useProjectSecretsQuery.d.ts.map +1 -0
- package/dist/types/hooks/useFetchIdentity.d.ts.map +1 -1
- package/dist/types/hooks/useLogout.d.ts.map +1 -1
- package/dist/types/hooks/usePasswordlessOtpActivator.d.ts.map +1 -1
- package/dist/types/hooks/useTenantApi.d.ts +1 -1
- package/dist/types/hooks/useTenantApi.d.ts.map +1 -1
- package/dist/types/hooks/useTenantMutation.d.ts.map +1 -1
- package/dist/types/hooks/useTenantQueryLoader.d.ts.map +1 -1
- package/dist/types/internal/hooks/useHandleIDPResponse.d.ts.map +1 -1
- package/dist/types/internal/hooks/useInitIDPRedirect.d.ts.map +1 -1
- package/dist/types/internal/hooks/useLogoutInternal.d.ts.map +1 -1
- package/dist/types/internal/hooks/useRedirectToBacklink.d.ts +1 -1
- package/dist/types/internal/hooks/useRedirectToBacklink.d.ts.map +1 -1
- package/dist/types/internal/utils/hashing.d.ts.map +1 -1
- package/dist/types/internal/utils/randomInt.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/dist/types/types/Identity.d.ts +42 -3
- package/dist/types/types/Identity.d.ts.map +1 -1
- package/dist/types/types/forbidden.d.ts +21 -0
- package/dist/types/types/forbidden.d.ts.map +1 -0
- package/dist/types/types/forms.d.ts +6 -1
- package/dist/types/types/forms.d.ts.map +1 -1
- package/dist/types/types/index.d.ts +1 -0
- package/dist/types/types/index.d.ts.map +1 -1
- package/package.json +5 -4
- package/src/components/forms/AddProjectMemberForm.tsx +74 -0
- package/src/components/forms/ChangeMyProfileForm.tsx +73 -0
- package/src/components/forms/ChangePasswordForm.tsx +73 -0
- package/src/components/forms/ChangeProfileForm.tsx +70 -0
- package/src/components/forms/CreateGlobalApiKeyForm.tsx +67 -0
- package/src/components/forms/EmailOtpConfirmForm.tsx +64 -0
- package/src/components/forms/InviteForm.tsx +36 -2
- package/src/components/forms/LoginForm.tsx +6 -1
- package/src/components/forms/PasswordlessSignInForm.tsx +6 -1
- package/src/components/forms/SetProjectSecretForm.tsx +67 -0
- package/src/components/forms/SignUpForm.tsx +91 -0
- package/src/components/forms/TenantForm.tsx +6 -2
- package/src/components/forms/index.ts +8 -0
- package/src/components/triggers/DisableEmailOtpTrigger.tsx +27 -0
- package/src/components/triggers/DisableMyPasswordlessTrigger.tsx +27 -0
- package/src/components/triggers/DisableOtpTrigger.tsx +3 -2
- package/src/components/triggers/DisablePersonTrigger.tsx +18 -0
- package/src/components/triggers/EnableMyPasswordlessTrigger.tsx +27 -0
- package/src/components/triggers/EnablePersonTrigger.tsx +18 -0
- package/src/components/triggers/ForceSignOutPersonTrigger.tsx +18 -0
- package/src/components/triggers/InitEmailOtpTrigger.tsx +17 -0
- package/src/components/triggers/RegenerateBackupCodesTrigger.tsx +22 -0
- package/src/components/triggers/RemoveProjectMemberTrigger.tsx +3 -2
- package/src/components/triggers/ResetPersonMfaTrigger.tsx +18 -0
- package/src/components/triggers/RevokeSessionTrigger.tsx +18 -0
- package/src/components/triggers/TenantActionTrigger.tsx +11 -3
- package/src/components/triggers/index.ts +11 -0
- package/src/hooks/mutations/auth/index.ts +1 -0
- package/src/hooks/mutations/auth/useSignUpMutation.ts +28 -0
- package/src/hooks/mutations/emailOtp/index.ts +3 -0
- package/src/hooks/mutations/emailOtp/useConfirmEmailOtpMutation.ts +19 -0
- package/src/hooks/mutations/emailOtp/useDisableEmailOtpMutation.ts +13 -0
- package/src/hooks/mutations/emailOtp/useInitEmailOtpMutation.ts +13 -0
- package/src/hooks/mutations/identity/index.ts +2 -0
- package/src/hooks/mutations/identity/useAddGlobalIdentityRolesMutation.ts +19 -0
- package/src/hooks/mutations/identity/useRemoveGlobalIdentityRolesMutation.ts +19 -0
- package/src/hooks/mutations/idp/index.ts +1 -0
- package/src/hooks/mutations/idp/useDisconnectMyIdentityProviderMutation.tsx +13 -0
- package/src/hooks/mutations/index.ts +5 -0
- package/src/hooks/mutations/invite/index.ts +1 -0
- package/src/hooks/mutations/invite/useUnmanagedInviteMutation.tsx +25 -0
- package/src/hooks/mutations/otp/index.ts +1 -0
- package/src/hooks/mutations/otp/useRegenerateBackupCodesMutation.ts +19 -0
- package/src/hooks/mutations/person/index.ts +5 -0
- package/src/hooks/mutations/person/useChangePasswordMutation.ts +14 -0
- package/src/hooks/mutations/person/useDisablePersonMutation.ts +13 -0
- package/src/hooks/mutations/person/useEnablePersonMutation.ts +13 -0
- package/src/hooks/mutations/person/useForceSignOutPersonMutation.ts +13 -0
- package/src/hooks/mutations/person/useResetPersonMfaMutation.ts +13 -0
- package/src/hooks/mutations/project/index.ts +1 -0
- package/src/hooks/mutations/project/useSetProjectSecretMutation.ts +13 -0
- package/src/hooks/mutations/session/index.ts +1 -0
- package/src/hooks/mutations/session/useRevokeSessionMutation.ts +13 -0
- package/src/hooks/queries/index.ts +13 -0
- package/src/hooks/queries/useAuthLogQuery.ts +28 -0
- package/src/hooks/queries/useAuthPoliciesQuery.ts +26 -0
- package/src/hooks/queries/useConfigurationQuery.ts +42 -0
- package/src/hooks/queries/useGlobalApiKeysQuery.ts +19 -0
- package/src/hooks/queries/useIdentityProvidersQuery.ts +31 -0
- package/src/hooks/queries/useMailTemplatesQuery.ts +25 -0
- package/src/hooks/queries/useMeQuery.ts +6 -2
- package/src/hooks/queries/useMyIdentityProvidersQuery.ts +25 -0
- package/src/hooks/queries/useMySessionsQuery.ts +19 -0
- package/src/hooks/queries/usePersonQuery.ts +35 -0
- package/src/hooks/queries/usePersonSessionsQuery.ts +27 -0
- package/src/hooks/queries/usePersonsQuery.ts +37 -0
- package/src/hooks/queries/useProjectApiKeysQuery.ts +43 -0
- package/src/hooks/queries/useProjectMembersQuery.ts +1 -1
- package/src/hooks/queries/useProjectSecretsQuery.ts +33 -0
- package/src/hooks/useFetchIdentity.ts +18 -3
- package/src/tsconfig.json +1 -0
- package/src/types/Identity.ts +44 -3
- package/src/types/forbidden.ts +31 -0
- package/src/types/forms.ts +6 -1
- package/src/types/index.ts +1 -0
- package/tests/TenantForm.test.tsx +54 -0
package/dist/production/index.js
CHANGED
|
@@ -1,14 +1,27 @@
|
|
|
1
1
|
import { FormContext, IDPMethodsContextProvider, IDPStateContextProvider, IdentityContext, IdentityMethodsContext, IdentityStateContext, useForm, useIDPMethods, useIDPState, useIdentity, useIdentityMethods, useIdentityState } from "./src/contexts.js";
|
|
2
|
+
import { AddProjectMemberForm, useAddProjectMemberForm } from "./src/components/forms/AddProjectMemberForm.js";
|
|
2
3
|
import { ChangeMyPasswordForm, useChangeMyPasswordForm } from "./src/components/forms/ChangeMyPasswordForm.js";
|
|
4
|
+
import { ChangeMyProfileForm, useChangeMyProfileForm } from "./src/components/forms/ChangeMyProfileForm.js";
|
|
5
|
+
import { ChangePasswordForm, useChangePasswordForm } from "./src/components/forms/ChangePasswordForm.js";
|
|
6
|
+
import { ChangeProfileForm, useChangeProfileForm } from "./src/components/forms/ChangeProfileForm.js";
|
|
3
7
|
import { ConfirmEmailChangeForm, useConfirmEmailChangeForm } from "./src/components/forms/ConfirmEmailChangeForm.js";
|
|
4
8
|
import { CreateApiKeyForm, useCreateApiKeyForm } from "./src/components/forms/CreateApiKeyForm.js";
|
|
9
|
+
import { CreateGlobalApiKeyForm, useCreateGlobalApiKeyForm } from "./src/components/forms/CreateGlobalApiKeyForm.js";
|
|
5
10
|
import { CreateSessionTokenForm, useCreateSessionTokenForm } from "./src/components/forms/CreateSessionTokenForm.js";
|
|
11
|
+
import { DisableEmailOtpTrigger } from "./src/components/triggers/DisableEmailOtpTrigger.js";
|
|
12
|
+
import { DisableMyPasswordlessTrigger } from "./src/components/triggers/DisableMyPasswordlessTrigger.js";
|
|
6
13
|
import { DisableOtpTrigger } from "./src/components/triggers/DisableOtpTrigger.js";
|
|
14
|
+
import { DisablePersonTrigger } from "./src/components/triggers/DisablePersonTrigger.js";
|
|
15
|
+
import { EmailOtpConfirmForm, useEmailOtpConfirmForm } from "./src/components/forms/EmailOtpConfirmForm.js";
|
|
16
|
+
import { EnableMyPasswordlessTrigger } from "./src/components/triggers/EnableMyPasswordlessTrigger.js";
|
|
17
|
+
import { EnablePersonTrigger } from "./src/components/triggers/EnablePersonTrigger.js";
|
|
18
|
+
import { ForceSignOutPersonTrigger } from "./src/components/triggers/ForceSignOutPersonTrigger.js";
|
|
7
19
|
import { IDP } from "./src/components/idp/IDP.js";
|
|
8
20
|
import { IDPInitTrigger } from "./src/components/idp/IDPInitTrigger.js";
|
|
9
21
|
import { IDPState } from "./src/components/idp/IDPState.js";
|
|
10
22
|
import { IdentityProvider } from "./src/components/IdentityProvider.js";
|
|
11
23
|
import { IdentityState } from "./src/components/IdentityState.js";
|
|
24
|
+
import { InitEmailOtpTrigger } from "./src/components/triggers/InitEmailOtpTrigger.js";
|
|
12
25
|
import { InviteForm, useInviteForm } from "./src/components/forms/InviteForm.js";
|
|
13
26
|
import { LoginForm, useLoginForm } from "./src/components/forms/LoginForm.js";
|
|
14
27
|
import { LoginToken, useTenantApi } from "./src/hooks/useTenantApi.js";
|
|
@@ -19,15 +32,24 @@ import { PasswordResetForm, usePasswordResetForm } from "./src/components/forms/
|
|
|
19
32
|
import { PasswordResetRequestForm, usePasswordResetRequestForm } from "./src/components/forms/PasswordResetRequestForm.js";
|
|
20
33
|
import { PasswordlessSignInForm, usePasswordlessSignInForm } from "./src/components/forms/PasswordlessSignInForm.js";
|
|
21
34
|
import { PasswordlessSignInInitForm, usePasswordlessSignInInitForm } from "./src/components/forms/PasswordlessSignInInitForm.js";
|
|
35
|
+
import { RegenerateBackupCodesTrigger } from "./src/components/triggers/RegenerateBackupCodesTrigger.js";
|
|
22
36
|
import { RemoveProjectMemberTrigger } from "./src/components/triggers/RemoveProjectMemberTrigger.js";
|
|
23
37
|
import { RequestEmailVerificationForm, useRequestEmailVerificationForm } from "./src/components/forms/RequestEmailVerificationForm.js";
|
|
38
|
+
import { ResetPersonMfaTrigger } from "./src/components/triggers/ResetPersonMfaTrigger.js";
|
|
39
|
+
import { RevokeSessionTrigger } from "./src/components/triggers/RevokeSessionTrigger.js";
|
|
40
|
+
import { SetProjectSecretForm, useSetProjectSecretForm } from "./src/components/forms/SetProjectSecretForm.js";
|
|
41
|
+
import { SignUpForm, useSignUpForm } from "./src/components/forms/SignUpForm.js";
|
|
42
|
+
import { TenantActionTrigger } from "./src/components/triggers/TenantActionTrigger.js";
|
|
24
43
|
import { UpdateProjectMemberForm, useUpdateProjectMemberForm } from "./src/components/forms/UpdateProjectMemberForm.js";
|
|
25
44
|
import { VerifyEmailForm, useVerifyEmailForm } from "./src/components/forms/VerifyEmailForm.js";
|
|
45
|
+
import { addGlobalIdentityRolesMutation, useAddGlobalIdentityRolesMutation } from "./src/hooks/mutations/identity/useAddGlobalIdentityRolesMutation.js";
|
|
26
46
|
import { addProjectMemberMutation, useAddProjectMemberMutation } from "./src/hooks/mutations/memberships/useAddProjectMemberMutation.js";
|
|
27
47
|
import { changeMyPasswordMutation, useChangeMyPasswordMutation } from "./src/hooks/mutations/auth/useChangeMyPasswordMutation.js";
|
|
28
48
|
import { changeMyProfile, useChangeMyProfileMutation } from "./src/hooks/mutations/profile/useChangeMyProfile.js";
|
|
49
|
+
import { changePasswordMutation, useChangePasswordMutation } from "./src/hooks/mutations/person/useChangePasswordMutation.js";
|
|
29
50
|
import { changeProfile, useChangeProfileMutation } from "./src/hooks/mutations/profile/useChangeProfile.js";
|
|
30
51
|
import { confirmEmailChangeMutation, useConfirmEmailChangeMutation } from "./src/hooks/mutations/emailVerification/useConfirmEmailChangeMutation.js";
|
|
52
|
+
import { confirmEmailOtpMutation, useConfirmEmailOtpMutation } from "./src/hooks/mutations/emailOtp/useConfirmEmailOtpMutation.js";
|
|
31
53
|
import { confirmOtpMutation, useConfirmOtpMutation } from "./src/hooks/mutations/otp/useConfirmOtpMutation.js";
|
|
32
54
|
import { createApiKeyMutation, useCreateApiKeyMutation } from "./src/hooks/mutations/apiKey/useCreateApiKeyMutation.js";
|
|
33
55
|
import { createGlobalApiKeyMutation, useCreateGlobalApiKeyMutation } from "./src/hooks/mutations/apiKey/useCreateGlobalApiKeyMutation.js";
|
|
@@ -35,37 +57,76 @@ import { createResetPasswordRequestMutation, useCreateResetPasswordRequestMutati
|
|
|
35
57
|
import { createSessionTokenMutation, useCreateSessionTokenMutation } from "./src/hooks/mutations/apiKey/useCreateSessionTokenMutation.js";
|
|
36
58
|
import { createTenantMutation, useTenantMutation } from "./src/hooks/useTenantMutation.js";
|
|
37
59
|
import { disableApiKeyMutation, useDisableApiKeyMutation } from "./src/hooks/mutations/apiKey/useDisableApiKeyMutation.js";
|
|
60
|
+
import { disableEmailOtpMutation, useDisableEmailOtpMutation } from "./src/hooks/mutations/emailOtp/useDisableEmailOtpMutation.js";
|
|
38
61
|
import { disableOtpMutation, useDisableOtpMutation } from "./src/hooks/mutations/otp/useDisableOtpMutation.js";
|
|
62
|
+
import { disablePersonMutation, useDisablePersonMutation } from "./src/hooks/mutations/person/useDisablePersonMutation.js";
|
|
63
|
+
import { disconnectMyIdentityProviderMutation, useDisconnectMyIdentityProviderMutation } from "./src/hooks/mutations/idp/useDisconnectMyIdentityProviderMutation.js";
|
|
64
|
+
import { enablePersonMutation, useEnablePersonMutation } from "./src/hooks/mutations/person/useEnablePersonMutation.js";
|
|
65
|
+
import { forceSignOutPersonMutation, useForceSignOutPersonMutation } from "./src/hooks/mutations/person/useForceSignOutPersonMutation.js";
|
|
66
|
+
import { initEmailOtpMutation, useInitEmailOtpMutation } from "./src/hooks/mutations/emailOtp/useInitEmailOtpMutation.js";
|
|
39
67
|
import { inviteMutation, useInviteMutation } from "./src/hooks/mutations/invite/useInviteMutation.js";
|
|
68
|
+
import { isForbiddenError, toFormErrorCode } from "./src/types/forbidden.js";
|
|
40
69
|
import { prepareOtpMutation, usePrepareOtpMutation } from "./src/hooks/mutations/otp/usePrepareOtpMutation.js";
|
|
70
|
+
import { regenerateBackupCodesMutation, useRegenerateBackupCodesMutation } from "./src/hooks/mutations/otp/useRegenerateBackupCodesMutation.js";
|
|
71
|
+
import { removeGlobalIdentityRolesMutation, useRemoveGlobalIdentityRolesMutation } from "./src/hooks/mutations/identity/useRemoveGlobalIdentityRolesMutation.js";
|
|
41
72
|
import { removeProjectMemberMutation, useRemoveProjectMemberMutation } from "./src/hooks/mutations/memberships/useRemoveProjectMemberMutation.js";
|
|
42
73
|
import { requestEmailVerificationMutation, useRequestEmailVerificationMutation } from "./src/hooks/mutations/emailVerification/useRequestEmailVerificationMutation.js";
|
|
43
74
|
import { resetPasswordMutation, useResetPasswordMutation } from "./src/hooks/mutations/passwordReset/useResetPasswordMutation.js";
|
|
75
|
+
import { resetPersonMfaMutation, useResetPersonMfaMutation } from "./src/hooks/mutations/person/useResetPersonMfaMutation.js";
|
|
76
|
+
import { revokeSessionMutation, useRevokeSessionMutation } from "./src/hooks/mutations/session/useRevokeSessionMutation.js";
|
|
77
|
+
import { setProjectSecretMutation, useSetProjectSecretMutation } from "./src/hooks/mutations/project/useSetProjectSecretMutation.js";
|
|
44
78
|
import { signInIDPMutation, useSignInIDPMutation } from "./src/hooks/mutations/idp/useSignInIdpMutation.js";
|
|
45
79
|
import { signInMutation, useSignInMutation } from "./src/hooks/mutations/auth/useSignInMutation.js";
|
|
46
80
|
import { signOutMutation, useSignOutMutation } from "./src/hooks/mutations/auth/useSignOutMutation.js";
|
|
81
|
+
import { signUpMutation, useSignUpMutation } from "./src/hooks/mutations/auth/useSignUpMutation.js";
|
|
82
|
+
import { unmanagedInviteMutation, useUnmanagedInviteMutation } from "./src/hooks/mutations/invite/useUnmanagedInviteMutation.js";
|
|
47
83
|
import { updateProjectMemberMutation, useUpdateProjectMemberMutation } from "./src/hooks/mutations/memberships/useUpdateProjectMemberMutation.js";
|
|
48
84
|
import { useActivatePasswordlessOtpMutation } from "./src/hooks/mutations/passwordless/useActivatePasswordlessOtpMutation.js";
|
|
85
|
+
import { useAuthLogQuery } from "./src/hooks/queries/useAuthLogQuery.js";
|
|
86
|
+
import { useAuthPoliciesQuery } from "./src/hooks/queries/useAuthPoliciesQuery.js";
|
|
87
|
+
import { useConfigurationQuery } from "./src/hooks/queries/useConfigurationQuery.js";
|
|
49
88
|
import { useDisableMyPasswordlessMutation } from "./src/hooks/mutations/passwordless/useDisableMyPasswordlessMutation.js";
|
|
50
89
|
import { useEnableMyPasswordlessMutation } from "./src/hooks/mutations/passwordless/useEnableMyPasswordlessMutation.js";
|
|
51
90
|
import { useFetchIdentity } from "./src/hooks/useFetchIdentity.js";
|
|
91
|
+
import { useGlobalApiKeysQuery } from "./src/hooks/queries/useGlobalApiKeysQuery.js";
|
|
92
|
+
import { useIdentityProvidersQuery } from "./src/hooks/queries/useIdentityProvidersQuery.js";
|
|
52
93
|
import { useInitSignInIDPMutation } from "./src/hooks/mutations/idp/useInitSignInIDPMutation.js";
|
|
53
94
|
import { useInitSignInPasswordlessMutation } from "./src/hooks/mutations/passwordless/useInitSignInPasswordlessMutation.js";
|
|
54
95
|
import { useLogout } from "./src/hooks/useLogout.js";
|
|
96
|
+
import { useMailTemplatesQuery } from "./src/hooks/queries/useMailTemplatesQuery.js";
|
|
55
97
|
import { useMeQuery } from "./src/hooks/queries/useMeQuery.js";
|
|
98
|
+
import { useMyIdentityProvidersQuery } from "./src/hooks/queries/useMyIdentityProvidersQuery.js";
|
|
99
|
+
import { useMySessionsQuery } from "./src/hooks/queries/useMySessionsQuery.js";
|
|
56
100
|
import { usePasswordlessOtpActivator } from "./src/hooks/usePasswordlessOtpActivator.js";
|
|
101
|
+
import { usePersonQuery } from "./src/hooks/queries/usePersonQuery.js";
|
|
102
|
+
import { usePersonSessionsQuery } from "./src/hooks/queries/usePersonSessionsQuery.js";
|
|
103
|
+
import { usePersonsQuery } from "./src/hooks/queries/usePersonsQuery.js";
|
|
104
|
+
import { useProjectApiKeysQuery } from "./src/hooks/queries/useProjectApiKeysQuery.js";
|
|
57
105
|
import { useProjectMembersQuery } from "./src/hooks/queries/useProjectMembersQuery.js";
|
|
58
106
|
import { useProjectMembershipsQuery } from "./src/hooks/queries/useProjectMembershipsQuery.js";
|
|
59
107
|
import { useProjectRolesDefinitionQuery } from "./src/hooks/queries/useProjectRolesDefinitionQuery.js";
|
|
108
|
+
import { useProjectSecretsQuery } from "./src/hooks/queries/useProjectSecretsQuery.js";
|
|
60
109
|
import { useSignInPasswordlessMutation } from "./src/hooks/mutations/passwordless/useSignInPasswordlessMutation.js";
|
|
61
110
|
import { useTenantQueryLoader } from "./src/hooks/useTenantQueryLoader.js";
|
|
62
111
|
import { useVerifyEmailMutation, verifyEmailMutation } from "./src/hooks/mutations/emailVerification/useVerifyEmailMutation.js";
|
|
63
112
|
export {
|
|
113
|
+
AddProjectMemberForm,
|
|
64
114
|
ChangeMyPasswordForm,
|
|
115
|
+
ChangeMyProfileForm,
|
|
116
|
+
ChangePasswordForm,
|
|
117
|
+
ChangeProfileForm,
|
|
65
118
|
ConfirmEmailChangeForm,
|
|
66
119
|
CreateApiKeyForm,
|
|
120
|
+
CreateGlobalApiKeyForm,
|
|
67
121
|
CreateSessionTokenForm,
|
|
122
|
+
DisableEmailOtpTrigger,
|
|
123
|
+
DisableMyPasswordlessTrigger,
|
|
68
124
|
DisableOtpTrigger,
|
|
125
|
+
DisablePersonTrigger,
|
|
126
|
+
EmailOtpConfirmForm,
|
|
127
|
+
EnableMyPasswordlessTrigger,
|
|
128
|
+
EnablePersonTrigger,
|
|
129
|
+
ForceSignOutPersonTrigger,
|
|
69
130
|
FormContext,
|
|
70
131
|
IDP,
|
|
71
132
|
IDPInitTrigger,
|
|
@@ -77,6 +138,7 @@ export {
|
|
|
77
138
|
IdentityProvider,
|
|
78
139
|
IdentityState,
|
|
79
140
|
IdentityStateContext,
|
|
141
|
+
InitEmailOtpTrigger,
|
|
80
142
|
InviteForm,
|
|
81
143
|
LoginForm,
|
|
82
144
|
LoginToken,
|
|
@@ -87,15 +149,24 @@ export {
|
|
|
87
149
|
PasswordResetRequestForm,
|
|
88
150
|
PasswordlessSignInForm,
|
|
89
151
|
PasswordlessSignInInitForm,
|
|
152
|
+
RegenerateBackupCodesTrigger,
|
|
90
153
|
RemoveProjectMemberTrigger,
|
|
91
154
|
RequestEmailVerificationForm,
|
|
155
|
+
ResetPersonMfaTrigger,
|
|
156
|
+
RevokeSessionTrigger,
|
|
157
|
+
SetProjectSecretForm,
|
|
158
|
+
SignUpForm,
|
|
159
|
+
TenantActionTrigger,
|
|
92
160
|
UpdateProjectMemberForm,
|
|
93
161
|
VerifyEmailForm,
|
|
162
|
+
addGlobalIdentityRolesMutation,
|
|
94
163
|
addProjectMemberMutation,
|
|
95
164
|
changeMyPasswordMutation,
|
|
96
165
|
changeMyProfile,
|
|
166
|
+
changePasswordMutation,
|
|
97
167
|
changeProfile,
|
|
98
168
|
confirmEmailChangeMutation,
|
|
169
|
+
confirmEmailOtpMutation,
|
|
99
170
|
confirmOtpMutation,
|
|
100
171
|
createApiKeyMutation,
|
|
101
172
|
createGlobalApiKeyMutation,
|
|
@@ -103,49 +174,87 @@ export {
|
|
|
103
174
|
createSessionTokenMutation,
|
|
104
175
|
createTenantMutation,
|
|
105
176
|
disableApiKeyMutation,
|
|
177
|
+
disableEmailOtpMutation,
|
|
106
178
|
disableOtpMutation,
|
|
179
|
+
disablePersonMutation,
|
|
180
|
+
disconnectMyIdentityProviderMutation,
|
|
181
|
+
enablePersonMutation,
|
|
182
|
+
forceSignOutPersonMutation,
|
|
183
|
+
initEmailOtpMutation,
|
|
107
184
|
inviteMutation,
|
|
185
|
+
isForbiddenError,
|
|
108
186
|
prepareOtpMutation,
|
|
187
|
+
regenerateBackupCodesMutation,
|
|
188
|
+
removeGlobalIdentityRolesMutation,
|
|
109
189
|
removeProjectMemberMutation,
|
|
110
190
|
requestEmailVerificationMutation,
|
|
111
191
|
resetPasswordMutation,
|
|
192
|
+
resetPersonMfaMutation,
|
|
193
|
+
revokeSessionMutation,
|
|
194
|
+
setProjectSecretMutation,
|
|
112
195
|
signInIDPMutation,
|
|
113
196
|
signInMutation,
|
|
114
197
|
signOutMutation,
|
|
198
|
+
signUpMutation,
|
|
199
|
+
toFormErrorCode,
|
|
200
|
+
unmanagedInviteMutation,
|
|
115
201
|
updateProjectMemberMutation,
|
|
116
202
|
useActivatePasswordlessOtpMutation,
|
|
203
|
+
useAddGlobalIdentityRolesMutation,
|
|
204
|
+
useAddProjectMemberForm,
|
|
117
205
|
useAddProjectMemberMutation,
|
|
206
|
+
useAuthLogQuery,
|
|
207
|
+
useAuthPoliciesQuery,
|
|
118
208
|
useChangeMyPasswordForm,
|
|
119
209
|
useChangeMyPasswordMutation,
|
|
210
|
+
useChangeMyProfileForm,
|
|
120
211
|
useChangeMyProfileMutation,
|
|
212
|
+
useChangePasswordForm,
|
|
213
|
+
useChangePasswordMutation,
|
|
214
|
+
useChangeProfileForm,
|
|
121
215
|
useChangeProfileMutation,
|
|
216
|
+
useConfigurationQuery,
|
|
122
217
|
useConfirmEmailChangeForm,
|
|
123
218
|
useConfirmEmailChangeMutation,
|
|
219
|
+
useConfirmEmailOtpMutation,
|
|
124
220
|
useConfirmOtpMutation,
|
|
125
221
|
useCreateApiKeyForm,
|
|
126
222
|
useCreateApiKeyMutation,
|
|
223
|
+
useCreateGlobalApiKeyForm,
|
|
127
224
|
useCreateGlobalApiKeyMutation,
|
|
128
225
|
useCreateResetPasswordRequestMutation,
|
|
129
226
|
useCreateSessionTokenForm,
|
|
130
227
|
useCreateSessionTokenMutation,
|
|
131
228
|
useDisableApiKeyMutation,
|
|
229
|
+
useDisableEmailOtpMutation,
|
|
132
230
|
useDisableMyPasswordlessMutation,
|
|
133
231
|
useDisableOtpMutation,
|
|
232
|
+
useDisablePersonMutation,
|
|
233
|
+
useDisconnectMyIdentityProviderMutation,
|
|
234
|
+
useEmailOtpConfirmForm,
|
|
134
235
|
useEnableMyPasswordlessMutation,
|
|
236
|
+
useEnablePersonMutation,
|
|
135
237
|
useFetchIdentity,
|
|
238
|
+
useForceSignOutPersonMutation,
|
|
136
239
|
useForm,
|
|
240
|
+
useGlobalApiKeysQuery,
|
|
137
241
|
useIDPMethods,
|
|
138
242
|
useIDPState,
|
|
139
243
|
useIdentity,
|
|
140
244
|
useIdentityMethods,
|
|
245
|
+
useIdentityProvidersQuery,
|
|
141
246
|
useIdentityState,
|
|
247
|
+
useInitEmailOtpMutation,
|
|
142
248
|
useInitSignInIDPMutation,
|
|
143
249
|
useInitSignInPasswordlessMutation,
|
|
144
250
|
useInviteForm,
|
|
145
251
|
useInviteMutation,
|
|
146
252
|
useLoginForm,
|
|
147
253
|
useLogout,
|
|
254
|
+
useMailTemplatesQuery,
|
|
148
255
|
useMeQuery,
|
|
256
|
+
useMyIdentityProvidersQuery,
|
|
257
|
+
useMySessionsQuery,
|
|
149
258
|
useOtpConfirmForm,
|
|
150
259
|
useOtpPrepareForm,
|
|
151
260
|
usePasswordResetForm,
|
|
@@ -153,21 +262,35 @@ export {
|
|
|
153
262
|
usePasswordlessOtpActivator,
|
|
154
263
|
usePasswordlessSignInForm,
|
|
155
264
|
usePasswordlessSignInInitForm,
|
|
265
|
+
usePersonQuery,
|
|
266
|
+
usePersonSessionsQuery,
|
|
267
|
+
usePersonsQuery,
|
|
156
268
|
usePrepareOtpMutation,
|
|
269
|
+
useProjectApiKeysQuery,
|
|
157
270
|
useProjectMembersQuery,
|
|
158
271
|
useProjectMembershipsQuery,
|
|
159
272
|
useProjectRolesDefinitionQuery,
|
|
273
|
+
useProjectSecretsQuery,
|
|
274
|
+
useRegenerateBackupCodesMutation,
|
|
275
|
+
useRemoveGlobalIdentityRolesMutation,
|
|
160
276
|
useRemoveProjectMemberMutation,
|
|
161
277
|
useRequestEmailVerificationForm,
|
|
162
278
|
useRequestEmailVerificationMutation,
|
|
163
279
|
useResetPasswordMutation,
|
|
280
|
+
useResetPersonMfaMutation,
|
|
281
|
+
useRevokeSessionMutation,
|
|
282
|
+
useSetProjectSecretForm,
|
|
283
|
+
useSetProjectSecretMutation,
|
|
164
284
|
useSignInIDPMutation,
|
|
165
285
|
useSignInMutation,
|
|
166
286
|
useSignInPasswordlessMutation,
|
|
167
287
|
useSignOutMutation,
|
|
288
|
+
useSignUpForm,
|
|
289
|
+
useSignUpMutation,
|
|
168
290
|
useTenantApi,
|
|
169
291
|
useTenantMutation,
|
|
170
292
|
useTenantQueryLoader,
|
|
293
|
+
useUnmanagedInviteMutation,
|
|
171
294
|
useUpdateProjectMemberForm,
|
|
172
295
|
useUpdateProjectMemberMutation,
|
|
173
296
|
useVerifyEmailForm,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const jsxRuntime = require("react/jsx-runtime");
|
|
4
|
+
const TenantForm = require("./TenantForm.cjs");
|
|
5
|
+
const contexts = require("../../contexts.cjs");
|
|
6
|
+
const useAddProjectMemberMutation = require("../../hooks/mutations/memberships/useAddProjectMemberMutation.cjs");
|
|
7
|
+
const useAddProjectMemberForm = contexts.useForm;
|
|
8
|
+
const AddProjectMemberForm = ({ children, onSuccess, projectSlug, initialMemberships }) => {
|
|
9
|
+
const addProjectMember = useAddProjectMemberMutation.useAddProjectMemberMutation();
|
|
10
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
11
|
+
TenantForm.TenantForm,
|
|
12
|
+
{
|
|
13
|
+
onSuccess,
|
|
14
|
+
initialValues: {
|
|
15
|
+
identityId: "",
|
|
16
|
+
memberships: initialMemberships || []
|
|
17
|
+
},
|
|
18
|
+
validate: ({ values }) => {
|
|
19
|
+
const errors = [];
|
|
20
|
+
if (!values.identityId) {
|
|
21
|
+
errors.push({ code: "FIELD_REQUIRED", field: "identityId" });
|
|
22
|
+
}
|
|
23
|
+
if (values.memberships.length === 0) {
|
|
24
|
+
errors.push({ code: "FIELD_REQUIRED", field: "memberships" });
|
|
25
|
+
}
|
|
26
|
+
return errors;
|
|
27
|
+
},
|
|
28
|
+
execute: async ({ values }) => {
|
|
29
|
+
return await addProjectMember({
|
|
30
|
+
projectSlug,
|
|
31
|
+
identityId: values.identityId,
|
|
32
|
+
memberships: values.memberships
|
|
33
|
+
});
|
|
34
|
+
},
|
|
35
|
+
errorMapping: errorToField,
|
|
36
|
+
children
|
|
37
|
+
}
|
|
38
|
+
);
|
|
39
|
+
};
|
|
40
|
+
const errorToField = {
|
|
41
|
+
ALREADY_MEMBER: "identityId",
|
|
42
|
+
IDENTITY_NOT_FOUND: "identityId",
|
|
43
|
+
INVALID_MEMBERSHIP: "memberships",
|
|
44
|
+
PROJECT_NOT_FOUND: void 0,
|
|
45
|
+
ROLE_NOT_FOUND: "memberships",
|
|
46
|
+
VARIABLE_EMPTY: "memberships",
|
|
47
|
+
VARIABLE_NOT_FOUND: "memberships"
|
|
48
|
+
};
|
|
49
|
+
exports.AddProjectMemberForm = AddProjectMemberForm;
|
|
50
|
+
exports.useAddProjectMemberForm = useAddProjectMemberForm;
|
|
51
|
+
//# sourceMappingURL=AddProjectMemberForm.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AddProjectMemberForm.cjs","sources":["../../../../../../packages/react-client-tenant/src/components/forms/AddProjectMemberForm.tsx"],"sourcesContent":["import { ReactElement } from 'react'\nimport { TenantForm } from './TenantForm.js'\nimport { FormContextValue, FormError, FormState } from '../../types/index.js'\nimport { useForm } from '../../contexts.js'\nimport { AddProjectMemberErrorCode, MembershipInput } from '@contember/graphql-client-tenant'\nimport { useAddProjectMemberMutation } from '../../hooks/index.js'\n\nexport type AddProjectMemberFormValues = {\n\tidentityId: string\n\tmemberships: readonly MembershipInput[]\n}\n\nexport type AddProjectMemberFormErrorCode =\n\t| AddProjectMemberErrorCode\n\t| 'UNKNOWN_ERROR'\n\t| 'FIELD_REQUIRED'\n\nexport type AddProjectMemberFormState = FormState\n\nexport type AddProjectMemberFormError = FormError<AddProjectMemberFormValues, AddProjectMemberFormErrorCode>\n\nexport type AddProjectMemberFormContextValue = FormContextValue<AddProjectMemberFormValues, AddProjectMemberFormErrorCode>\n\nexport interface AddProjectMemberFormProps {\n\tchildren: ReactElement\n\tprojectSlug: string\n\tinitialMemberships?: readonly MembershipInput[]\n\tonSuccess?: (args: {}) => void\n}\n\nexport const useAddProjectMemberForm = useForm as () => AddProjectMemberFormContextValue\n\nexport const AddProjectMemberForm = ({ children, onSuccess, projectSlug, initialMemberships }: AddProjectMemberFormProps) => {\n\tconst addProjectMember = useAddProjectMemberMutation()\n\treturn (\n\t\t<TenantForm<AddProjectMemberFormContextValue>\n\t\t\tonSuccess={onSuccess}\n\t\t\tinitialValues={{\n\t\t\t\tidentityId: '',\n\t\t\t\tmemberships: initialMemberships || [],\n\t\t\t}}\n\t\t\tvalidate={({ values }) => {\n\t\t\t\tconst errors: AddProjectMemberFormError[] = []\n\t\t\t\tif (!values.identityId) {\n\t\t\t\t\terrors.push({ code: 'FIELD_REQUIRED', field: 'identityId' })\n\t\t\t\t}\n\t\t\t\tif (values.memberships.length === 0) {\n\t\t\t\t\terrors.push({ code: 'FIELD_REQUIRED', field: 'memberships' })\n\t\t\t\t}\n\t\t\t\treturn errors\n\t\t\t}}\n\t\t\texecute={async ({ values }) => {\n\t\t\t\treturn await addProjectMember({\n\t\t\t\t\tprojectSlug,\n\t\t\t\t\tidentityId: values.identityId,\n\t\t\t\t\tmemberships: values.memberships,\n\t\t\t\t})\n\t\t\t}}\n\t\t\terrorMapping={errorToField}\n\t\t>\n\t\t\t{children}\n\t\t</TenantForm>\n\t)\n}\n\nconst errorToField: Record<AddProjectMemberErrorCode, keyof AddProjectMemberFormValues | undefined> = {\n\tALREADY_MEMBER: 'identityId',\n\tIDENTITY_NOT_FOUND: 'identityId',\n\tINVALID_MEMBERSHIP: 'memberships',\n\tPROJECT_NOT_FOUND: undefined,\n\tROLE_NOT_FOUND: 'memberships',\n\tVARIABLE_EMPTY: 'memberships',\n\tVARIABLE_NOT_FOUND: 'memberships',\n}\n"],"names":["useForm","useAddProjectMemberMutation","jsx","TenantForm"],"mappings":";;;;;;AA8BO,MAAM,0BAA0BA,SAAAA;AAEhC,MAAM,uBAAuB,CAAC,EAAE,UAAU,WAAW,aAAa,yBAAoD;AAC5H,QAAM,mBAAmBC,4BAAAA,4BAAA;AACzB,SACCC,2BAAAA;AAAAA,IAACC,WAAAA;AAAAA,IAAA;AAAA,MACA;AAAA,MACA,eAAe;AAAA,QACd,YAAY;AAAA,QACZ,aAAa,sBAAsB,CAAA;AAAA,MAAC;AAAA,MAErC,UAAU,CAAC,EAAE,aAAa;AACzB,cAAM,SAAsC,CAAA;AAC5C,YAAI,CAAC,OAAO,YAAY;AACvB,iBAAO,KAAK,EAAE,MAAM,kBAAkB,OAAO,cAAc;AAAA,QAC5D;AACA,YAAI,OAAO,YAAY,WAAW,GAAG;AACpC,iBAAO,KAAK,EAAE,MAAM,kBAAkB,OAAO,eAAe;AAAA,QAC7D;AACA,eAAO;AAAA,MACR;AAAA,MACA,SAAS,OAAO,EAAE,aAAa;AAC9B,eAAO,MAAM,iBAAiB;AAAA,UAC7B;AAAA,UACA,YAAY,OAAO;AAAA,UACnB,aAAa,OAAO;AAAA,QAAA,CACpB;AAAA,MACF;AAAA,MACA,cAAc;AAAA,MAEb;AAAA,IAAA;AAAA,EAAA;AAGJ;AAEA,MAAM,eAAgG;AAAA,EACrG,gBAAgB;AAAA,EAChB,oBAAoB;AAAA,EACpB,oBAAoB;AAAA,EACpB,mBAAmB;AAAA,EACnB,gBAAgB;AAAA,EAChB,gBAAgB;AAAA,EAChB,oBAAoB;AACrB;;;"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { TenantForm } from "./TenantForm.js";
|
|
3
|
+
import { useForm } from "../../contexts.js";
|
|
4
|
+
import { useAddProjectMemberMutation } from "../../hooks/mutations/memberships/useAddProjectMemberMutation.js";
|
|
5
|
+
const useAddProjectMemberForm = useForm;
|
|
6
|
+
const AddProjectMemberForm = ({ children, onSuccess, projectSlug, initialMemberships }) => {
|
|
7
|
+
const addProjectMember = useAddProjectMemberMutation();
|
|
8
|
+
return /* @__PURE__ */ jsx(
|
|
9
|
+
TenantForm,
|
|
10
|
+
{
|
|
11
|
+
onSuccess,
|
|
12
|
+
initialValues: {
|
|
13
|
+
identityId: "",
|
|
14
|
+
memberships: initialMemberships || []
|
|
15
|
+
},
|
|
16
|
+
validate: ({ values }) => {
|
|
17
|
+
const errors = [];
|
|
18
|
+
if (!values.identityId) {
|
|
19
|
+
errors.push({ code: "FIELD_REQUIRED", field: "identityId" });
|
|
20
|
+
}
|
|
21
|
+
if (values.memberships.length === 0) {
|
|
22
|
+
errors.push({ code: "FIELD_REQUIRED", field: "memberships" });
|
|
23
|
+
}
|
|
24
|
+
return errors;
|
|
25
|
+
},
|
|
26
|
+
execute: async ({ values }) => {
|
|
27
|
+
return await addProjectMember({
|
|
28
|
+
projectSlug,
|
|
29
|
+
identityId: values.identityId,
|
|
30
|
+
memberships: values.memberships
|
|
31
|
+
});
|
|
32
|
+
},
|
|
33
|
+
errorMapping: errorToField,
|
|
34
|
+
children
|
|
35
|
+
}
|
|
36
|
+
);
|
|
37
|
+
};
|
|
38
|
+
const errorToField = {
|
|
39
|
+
ALREADY_MEMBER: "identityId",
|
|
40
|
+
IDENTITY_NOT_FOUND: "identityId",
|
|
41
|
+
INVALID_MEMBERSHIP: "memberships",
|
|
42
|
+
PROJECT_NOT_FOUND: void 0,
|
|
43
|
+
ROLE_NOT_FOUND: "memberships",
|
|
44
|
+
VARIABLE_EMPTY: "memberships",
|
|
45
|
+
VARIABLE_NOT_FOUND: "memberships"
|
|
46
|
+
};
|
|
47
|
+
export {
|
|
48
|
+
AddProjectMemberForm,
|
|
49
|
+
useAddProjectMemberForm
|
|
50
|
+
};
|
|
51
|
+
//# sourceMappingURL=AddProjectMemberForm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AddProjectMemberForm.js","sources":["../../../../../../packages/react-client-tenant/src/components/forms/AddProjectMemberForm.tsx"],"sourcesContent":["import { ReactElement } from 'react'\nimport { TenantForm } from './TenantForm.js'\nimport { FormContextValue, FormError, FormState } from '../../types/index.js'\nimport { useForm } from '../../contexts.js'\nimport { AddProjectMemberErrorCode, MembershipInput } from '@contember/graphql-client-tenant'\nimport { useAddProjectMemberMutation } from '../../hooks/index.js'\n\nexport type AddProjectMemberFormValues = {\n\tidentityId: string\n\tmemberships: readonly MembershipInput[]\n}\n\nexport type AddProjectMemberFormErrorCode =\n\t| AddProjectMemberErrorCode\n\t| 'UNKNOWN_ERROR'\n\t| 'FIELD_REQUIRED'\n\nexport type AddProjectMemberFormState = FormState\n\nexport type AddProjectMemberFormError = FormError<AddProjectMemberFormValues, AddProjectMemberFormErrorCode>\n\nexport type AddProjectMemberFormContextValue = FormContextValue<AddProjectMemberFormValues, AddProjectMemberFormErrorCode>\n\nexport interface AddProjectMemberFormProps {\n\tchildren: ReactElement\n\tprojectSlug: string\n\tinitialMemberships?: readonly MembershipInput[]\n\tonSuccess?: (args: {}) => void\n}\n\nexport const useAddProjectMemberForm = useForm as () => AddProjectMemberFormContextValue\n\nexport const AddProjectMemberForm = ({ children, onSuccess, projectSlug, initialMemberships }: AddProjectMemberFormProps) => {\n\tconst addProjectMember = useAddProjectMemberMutation()\n\treturn (\n\t\t<TenantForm<AddProjectMemberFormContextValue>\n\t\t\tonSuccess={onSuccess}\n\t\t\tinitialValues={{\n\t\t\t\tidentityId: '',\n\t\t\t\tmemberships: initialMemberships || [],\n\t\t\t}}\n\t\t\tvalidate={({ values }) => {\n\t\t\t\tconst errors: AddProjectMemberFormError[] = []\n\t\t\t\tif (!values.identityId) {\n\t\t\t\t\terrors.push({ code: 'FIELD_REQUIRED', field: 'identityId' })\n\t\t\t\t}\n\t\t\t\tif (values.memberships.length === 0) {\n\t\t\t\t\terrors.push({ code: 'FIELD_REQUIRED', field: 'memberships' })\n\t\t\t\t}\n\t\t\t\treturn errors\n\t\t\t}}\n\t\t\texecute={async ({ values }) => {\n\t\t\t\treturn await addProjectMember({\n\t\t\t\t\tprojectSlug,\n\t\t\t\t\tidentityId: values.identityId,\n\t\t\t\t\tmemberships: values.memberships,\n\t\t\t\t})\n\t\t\t}}\n\t\t\terrorMapping={errorToField}\n\t\t>\n\t\t\t{children}\n\t\t</TenantForm>\n\t)\n}\n\nconst errorToField: Record<AddProjectMemberErrorCode, keyof AddProjectMemberFormValues | undefined> = {\n\tALREADY_MEMBER: 'identityId',\n\tIDENTITY_NOT_FOUND: 'identityId',\n\tINVALID_MEMBERSHIP: 'memberships',\n\tPROJECT_NOT_FOUND: undefined,\n\tROLE_NOT_FOUND: 'memberships',\n\tVARIABLE_EMPTY: 'memberships',\n\tVARIABLE_NOT_FOUND: 'memberships',\n}\n"],"names":[],"mappings":";;;;AA8BO,MAAM,0BAA0B;AAEhC,MAAM,uBAAuB,CAAC,EAAE,UAAU,WAAW,aAAa,yBAAoD;AAC5H,QAAM,mBAAmB,4BAAA;AACzB,SACC;AAAA,IAAC;AAAA,IAAA;AAAA,MACA;AAAA,MACA,eAAe;AAAA,QACd,YAAY;AAAA,QACZ,aAAa,sBAAsB,CAAA;AAAA,MAAC;AAAA,MAErC,UAAU,CAAC,EAAE,aAAa;AACzB,cAAM,SAAsC,CAAA;AAC5C,YAAI,CAAC,OAAO,YAAY;AACvB,iBAAO,KAAK,EAAE,MAAM,kBAAkB,OAAO,cAAc;AAAA,QAC5D;AACA,YAAI,OAAO,YAAY,WAAW,GAAG;AACpC,iBAAO,KAAK,EAAE,MAAM,kBAAkB,OAAO,eAAe;AAAA,QAC7D;AACA,eAAO;AAAA,MACR;AAAA,MACA,SAAS,OAAO,EAAE,aAAa;AAC9B,eAAO,MAAM,iBAAiB;AAAA,UAC7B;AAAA,UACA,YAAY,OAAO;AAAA,UACnB,aAAa,OAAO;AAAA,QAAA,CACpB;AAAA,MACF;AAAA,MACA,cAAc;AAAA,MAEb;AAAA,IAAA;AAAA,EAAA;AAGJ;AAEA,MAAM,eAAgG;AAAA,EACrG,gBAAgB;AAAA,EAChB,oBAAoB;AAAA,EACpB,oBAAoB;AAAA,EACpB,mBAAmB;AAAA,EACnB,gBAAgB;AAAA,EAChB,gBAAgB;AAAA,EAChB,oBAAoB;AACrB;"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const jsxRuntime = require("react/jsx-runtime");
|
|
4
|
+
const React = require("react");
|
|
5
|
+
const TenantForm = require("./TenantForm.cjs");
|
|
6
|
+
const contexts = require("../../contexts.cjs");
|
|
7
|
+
const useChangeMyProfile = require("../../hooks/mutations/profile/useChangeMyProfile.cjs");
|
|
8
|
+
const useChangeMyProfileForm = contexts.useForm;
|
|
9
|
+
const ChangeMyProfileForm = ({ children, onSuccess, initialValues }) => {
|
|
10
|
+
const changeMyProfile = useChangeMyProfile.useChangeMyProfileMutation();
|
|
11
|
+
const { refreshIdentity } = contexts.useIdentityMethods();
|
|
12
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
13
|
+
TenantForm.TenantForm,
|
|
14
|
+
{
|
|
15
|
+
onSuccess: async () => {
|
|
16
|
+
await refreshIdentity();
|
|
17
|
+
onSuccess?.();
|
|
18
|
+
},
|
|
19
|
+
errorMapping: errorToField,
|
|
20
|
+
initialValues: React.useMemo(() => ({
|
|
21
|
+
email: initialValues?.email ?? "",
|
|
22
|
+
name: initialValues?.name ?? ""
|
|
23
|
+
}), [initialValues?.email, initialValues?.name]),
|
|
24
|
+
validate: ({ values }) => {
|
|
25
|
+
const errors = [];
|
|
26
|
+
if (values.email && !values.email.match(/^.+@.+$/)) {
|
|
27
|
+
errors.push({ code: "INVALID_VALUE", field: "email" });
|
|
28
|
+
}
|
|
29
|
+
return errors;
|
|
30
|
+
},
|
|
31
|
+
execute: async ({ values }) => {
|
|
32
|
+
return await changeMyProfile({
|
|
33
|
+
// An empty e-mail means "leave unchanged"; an empty name clears it (the API maps '' to null).
|
|
34
|
+
email: values.email || void 0,
|
|
35
|
+
name: values.name
|
|
36
|
+
});
|
|
37
|
+
},
|
|
38
|
+
children
|
|
39
|
+
}
|
|
40
|
+
);
|
|
41
|
+
};
|
|
42
|
+
const errorToField = {
|
|
43
|
+
INVALID_EMAIL_FORMAT: "email",
|
|
44
|
+
EMAIL_ALREADY_EXISTS: "email",
|
|
45
|
+
NOT_A_PERSON: void 0,
|
|
46
|
+
RATE_LIMIT_EXCEEDED: void 0
|
|
47
|
+
};
|
|
48
|
+
exports.ChangeMyProfileForm = ChangeMyProfileForm;
|
|
49
|
+
exports.useChangeMyProfileForm = useChangeMyProfileForm;
|
|
50
|
+
//# sourceMappingURL=ChangeMyProfileForm.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChangeMyProfileForm.cjs","sources":["../../../../../../packages/react-client-tenant/src/components/forms/ChangeMyProfileForm.tsx"],"sourcesContent":["import { ReactElement, useMemo } from 'react'\nimport { ChangeMyProfileErrorCode } from '@contember/graphql-client-tenant'\nimport { TenantForm } from './TenantForm.js'\nimport { FormContextValue, FormError, FormState } from '../../types/index.js'\nimport { useForm, useIdentityMethods } from '../../contexts.js'\nimport { useChangeMyProfileMutation } from '../../hooks/index.js'\n\nexport type ChangeMyProfileFormValues = {\n\temail: string\n\tname: string\n}\n\nexport type ChangeMyProfileFormErrorCode =\n\t| ChangeMyProfileErrorCode\n\t| 'FIELD_REQUIRED'\n\t| 'INVALID_VALUE'\n\t| 'UNKNOWN_ERROR'\n\nexport type ChangeMyProfileFormState = FormState\n\nexport type ChangeMyProfileFormError = FormError<ChangeMyProfileFormValues, ChangeMyProfileFormErrorCode>\n\nexport type ChangeMyProfileFormContextValue = FormContextValue<ChangeMyProfileFormValues, ChangeMyProfileFormErrorCode>\n\nexport interface ChangeMyProfileFormProps {\n\tchildren: ReactElement\n\t/** Prefill the fields, typically from `useIdentity()`. */\n\tinitialValues?: Partial<ChangeMyProfileFormValues>\n\tonSuccess?: () => void\n}\n\nexport const useChangeMyProfileForm = useForm as () => ChangeMyProfileFormContextValue\n\nexport const ChangeMyProfileForm = ({ children, onSuccess, initialValues }: ChangeMyProfileFormProps) => {\n\tconst changeMyProfile = useChangeMyProfileMutation()\n\tconst { refreshIdentity } = useIdentityMethods()\n\treturn (\n\t\t<TenantForm<ChangeMyProfileFormContextValue>\n\t\t\tonSuccess={async () => {\n\t\t\t\tawait refreshIdentity()\n\t\t\t\tonSuccess?.()\n\t\t\t}}\n\t\t\terrorMapping={errorToField}\n\t\t\tinitialValues={useMemo(() => ({\n\t\t\t\temail: initialValues?.email ?? '',\n\t\t\t\tname: initialValues?.name ?? '',\n\t\t\t}), [initialValues?.email, initialValues?.name])}\n\t\t\tvalidate={({ values }) => {\n\t\t\t\tconst errors: ChangeMyProfileFormError[] = []\n\t\t\t\tif (values.email && !values.email.match(/^.+@.+$/)) {\n\t\t\t\t\terrors.push({ code: 'INVALID_VALUE', field: 'email' })\n\t\t\t\t}\n\t\t\t\treturn errors\n\t\t\t}}\n\t\t\texecute={async ({ values }) => {\n\t\t\t\treturn await changeMyProfile({\n\t\t\t\t\t// An empty e-mail means \"leave unchanged\"; an empty name clears it (the API maps '' to null).\n\t\t\t\t\temail: values.email || undefined,\n\t\t\t\t\tname: values.name,\n\t\t\t\t})\n\t\t\t}}\n\t\t>\n\t\t\t{children}\n\t\t</TenantForm>\n\t)\n}\n\nconst errorToField: Record<ChangeMyProfileErrorCode, keyof ChangeMyProfileFormValues | undefined> = {\n\tINVALID_EMAIL_FORMAT: 'email',\n\tEMAIL_ALREADY_EXISTS: 'email',\n\tNOT_A_PERSON: undefined,\n\tRATE_LIMIT_EXCEEDED: undefined,\n}\n"],"names":["useForm","useChangeMyProfileMutation","useIdentityMethods","jsx","TenantForm","useMemo"],"mappings":";;;;;;;AA+BO,MAAM,yBAAyBA,SAAAA;AAE/B,MAAM,sBAAsB,CAAC,EAAE,UAAU,WAAW,oBAA8C;AACxG,QAAM,kBAAkBC,mBAAAA,2BAAA;AACxB,QAAM,EAAE,gBAAA,IAAoBC,4BAAA;AAC5B,SACCC,2BAAAA;AAAAA,IAACC,WAAAA;AAAAA,IAAA;AAAA,MACA,WAAW,YAAY;AACtB,cAAM,gBAAA;AACN,oBAAA;AAAA,MACD;AAAA,MACA,cAAc;AAAA,MACd,eAAeC,MAAAA,QAAQ,OAAO;AAAA,QAC7B,OAAO,eAAe,SAAS;AAAA,QAC/B,MAAM,eAAe,QAAQ;AAAA,MAAA,IAC1B,CAAC,eAAe,OAAO,eAAe,IAAI,CAAC;AAAA,MAC/C,UAAU,CAAC,EAAE,aAAa;AACzB,cAAM,SAAqC,CAAA;AAC3C,YAAI,OAAO,SAAS,CAAC,OAAO,MAAM,MAAM,SAAS,GAAG;AACnD,iBAAO,KAAK,EAAE,MAAM,iBAAiB,OAAO,SAAS;AAAA,QACtD;AACA,eAAO;AAAA,MACR;AAAA,MACA,SAAS,OAAO,EAAE,aAAa;AAC9B,eAAO,MAAM,gBAAgB;AAAA;AAAA,UAE5B,OAAO,OAAO,SAAS;AAAA,UACvB,MAAM,OAAO;AAAA,QAAA,CACb;AAAA,MACF;AAAA,MAEC;AAAA,IAAA;AAAA,EAAA;AAGJ;AAEA,MAAM,eAA8F;AAAA,EACnG,sBAAsB;AAAA,EACtB,sBAAsB;AAAA,EACtB,cAAc;AAAA,EACd,qBAAqB;AACtB;;;"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo } from "react";
|
|
3
|
+
import { TenantForm } from "./TenantForm.js";
|
|
4
|
+
import { useForm, useIdentityMethods } from "../../contexts.js";
|
|
5
|
+
import { useChangeMyProfileMutation } from "../../hooks/mutations/profile/useChangeMyProfile.js";
|
|
6
|
+
const useChangeMyProfileForm = useForm;
|
|
7
|
+
const ChangeMyProfileForm = ({ children, onSuccess, initialValues }) => {
|
|
8
|
+
const changeMyProfile = useChangeMyProfileMutation();
|
|
9
|
+
const { refreshIdentity } = useIdentityMethods();
|
|
10
|
+
return /* @__PURE__ */ jsx(
|
|
11
|
+
TenantForm,
|
|
12
|
+
{
|
|
13
|
+
onSuccess: async () => {
|
|
14
|
+
await refreshIdentity();
|
|
15
|
+
onSuccess?.();
|
|
16
|
+
},
|
|
17
|
+
errorMapping: errorToField,
|
|
18
|
+
initialValues: useMemo(() => ({
|
|
19
|
+
email: initialValues?.email ?? "",
|
|
20
|
+
name: initialValues?.name ?? ""
|
|
21
|
+
}), [initialValues?.email, initialValues?.name]),
|
|
22
|
+
validate: ({ values }) => {
|
|
23
|
+
const errors = [];
|
|
24
|
+
if (values.email && !values.email.match(/^.+@.+$/)) {
|
|
25
|
+
errors.push({ code: "INVALID_VALUE", field: "email" });
|
|
26
|
+
}
|
|
27
|
+
return errors;
|
|
28
|
+
},
|
|
29
|
+
execute: async ({ values }) => {
|
|
30
|
+
return await changeMyProfile({
|
|
31
|
+
// An empty e-mail means "leave unchanged"; an empty name clears it (the API maps '' to null).
|
|
32
|
+
email: values.email || void 0,
|
|
33
|
+
name: values.name
|
|
34
|
+
});
|
|
35
|
+
},
|
|
36
|
+
children
|
|
37
|
+
}
|
|
38
|
+
);
|
|
39
|
+
};
|
|
40
|
+
const errorToField = {
|
|
41
|
+
INVALID_EMAIL_FORMAT: "email",
|
|
42
|
+
EMAIL_ALREADY_EXISTS: "email",
|
|
43
|
+
NOT_A_PERSON: void 0,
|
|
44
|
+
RATE_LIMIT_EXCEEDED: void 0
|
|
45
|
+
};
|
|
46
|
+
export {
|
|
47
|
+
ChangeMyProfileForm,
|
|
48
|
+
useChangeMyProfileForm
|
|
49
|
+
};
|
|
50
|
+
//# sourceMappingURL=ChangeMyProfileForm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChangeMyProfileForm.js","sources":["../../../../../../packages/react-client-tenant/src/components/forms/ChangeMyProfileForm.tsx"],"sourcesContent":["import { ReactElement, useMemo } from 'react'\nimport { ChangeMyProfileErrorCode } from '@contember/graphql-client-tenant'\nimport { TenantForm } from './TenantForm.js'\nimport { FormContextValue, FormError, FormState } from '../../types/index.js'\nimport { useForm, useIdentityMethods } from '../../contexts.js'\nimport { useChangeMyProfileMutation } from '../../hooks/index.js'\n\nexport type ChangeMyProfileFormValues = {\n\temail: string\n\tname: string\n}\n\nexport type ChangeMyProfileFormErrorCode =\n\t| ChangeMyProfileErrorCode\n\t| 'FIELD_REQUIRED'\n\t| 'INVALID_VALUE'\n\t| 'UNKNOWN_ERROR'\n\nexport type ChangeMyProfileFormState = FormState\n\nexport type ChangeMyProfileFormError = FormError<ChangeMyProfileFormValues, ChangeMyProfileFormErrorCode>\n\nexport type ChangeMyProfileFormContextValue = FormContextValue<ChangeMyProfileFormValues, ChangeMyProfileFormErrorCode>\n\nexport interface ChangeMyProfileFormProps {\n\tchildren: ReactElement\n\t/** Prefill the fields, typically from `useIdentity()`. */\n\tinitialValues?: Partial<ChangeMyProfileFormValues>\n\tonSuccess?: () => void\n}\n\nexport const useChangeMyProfileForm = useForm as () => ChangeMyProfileFormContextValue\n\nexport const ChangeMyProfileForm = ({ children, onSuccess, initialValues }: ChangeMyProfileFormProps) => {\n\tconst changeMyProfile = useChangeMyProfileMutation()\n\tconst { refreshIdentity } = useIdentityMethods()\n\treturn (\n\t\t<TenantForm<ChangeMyProfileFormContextValue>\n\t\t\tonSuccess={async () => {\n\t\t\t\tawait refreshIdentity()\n\t\t\t\tonSuccess?.()\n\t\t\t}}\n\t\t\terrorMapping={errorToField}\n\t\t\tinitialValues={useMemo(() => ({\n\t\t\t\temail: initialValues?.email ?? '',\n\t\t\t\tname: initialValues?.name ?? '',\n\t\t\t}), [initialValues?.email, initialValues?.name])}\n\t\t\tvalidate={({ values }) => {\n\t\t\t\tconst errors: ChangeMyProfileFormError[] = []\n\t\t\t\tif (values.email && !values.email.match(/^.+@.+$/)) {\n\t\t\t\t\terrors.push({ code: 'INVALID_VALUE', field: 'email' })\n\t\t\t\t}\n\t\t\t\treturn errors\n\t\t\t}}\n\t\t\texecute={async ({ values }) => {\n\t\t\t\treturn await changeMyProfile({\n\t\t\t\t\t// An empty e-mail means \"leave unchanged\"; an empty name clears it (the API maps '' to null).\n\t\t\t\t\temail: values.email || undefined,\n\t\t\t\t\tname: values.name,\n\t\t\t\t})\n\t\t\t}}\n\t\t>\n\t\t\t{children}\n\t\t</TenantForm>\n\t)\n}\n\nconst errorToField: Record<ChangeMyProfileErrorCode, keyof ChangeMyProfileFormValues | undefined> = {\n\tINVALID_EMAIL_FORMAT: 'email',\n\tEMAIL_ALREADY_EXISTS: 'email',\n\tNOT_A_PERSON: undefined,\n\tRATE_LIMIT_EXCEEDED: undefined,\n}\n"],"names":[],"mappings":";;;;;AA+BO,MAAM,yBAAyB;AAE/B,MAAM,sBAAsB,CAAC,EAAE,UAAU,WAAW,oBAA8C;AACxG,QAAM,kBAAkB,2BAAA;AACxB,QAAM,EAAE,gBAAA,IAAoB,mBAAA;AAC5B,SACC;AAAA,IAAC;AAAA,IAAA;AAAA,MACA,WAAW,YAAY;AACtB,cAAM,gBAAA;AACN,oBAAA;AAAA,MACD;AAAA,MACA,cAAc;AAAA,MACd,eAAe,QAAQ,OAAO;AAAA,QAC7B,OAAO,eAAe,SAAS;AAAA,QAC/B,MAAM,eAAe,QAAQ;AAAA,MAAA,IAC1B,CAAC,eAAe,OAAO,eAAe,IAAI,CAAC;AAAA,MAC/C,UAAU,CAAC,EAAE,aAAa;AACzB,cAAM,SAAqC,CAAA;AAC3C,YAAI,OAAO,SAAS,CAAC,OAAO,MAAM,MAAM,SAAS,GAAG;AACnD,iBAAO,KAAK,EAAE,MAAM,iBAAiB,OAAO,SAAS;AAAA,QACtD;AACA,eAAO;AAAA,MACR;AAAA,MACA,SAAS,OAAO,EAAE,aAAa;AAC9B,eAAO,MAAM,gBAAgB;AAAA;AAAA,UAE5B,OAAO,OAAO,SAAS;AAAA,UACvB,MAAM,OAAO;AAAA,QAAA,CACb;AAAA,MACF;AAAA,MAEC;AAAA,IAAA;AAAA,EAAA;AAGJ;AAEA,MAAM,eAA8F;AAAA,EACnG,sBAAsB;AAAA,EACtB,sBAAsB;AAAA,EACtB,cAAc;AAAA,EACd,qBAAqB;AACtB;"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const jsxRuntime = require("react/jsx-runtime");
|
|
4
|
+
const TenantForm = require("./TenantForm.cjs");
|
|
5
|
+
const contexts = require("../../contexts.cjs");
|
|
6
|
+
const useChangePasswordMutation = require("../../hooks/mutations/person/useChangePasswordMutation.cjs");
|
|
7
|
+
const useChangePasswordForm = contexts.useForm;
|
|
8
|
+
const ChangePasswordForm = ({ children, onSuccess, personId }) => {
|
|
9
|
+
const changePassword = useChangePasswordMutation.useChangePasswordMutation();
|
|
10
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
11
|
+
TenantForm.TenantForm,
|
|
12
|
+
{
|
|
13
|
+
onSuccess,
|
|
14
|
+
errorMapping: errorToField,
|
|
15
|
+
initialValues: {
|
|
16
|
+
password: "",
|
|
17
|
+
passwordConfirmation: ""
|
|
18
|
+
},
|
|
19
|
+
validate: ({ values }) => {
|
|
20
|
+
const errors = [];
|
|
21
|
+
if (!values.password) {
|
|
22
|
+
errors.push({ code: "FIELD_REQUIRED", field: "password" });
|
|
23
|
+
} else if (values.password.length < 6) {
|
|
24
|
+
errors.push({ code: "INVALID_VALUE", field: "password" });
|
|
25
|
+
} else if (!values.passwordConfirmation) {
|
|
26
|
+
errors.push({ code: "FIELD_REQUIRED", field: "passwordConfirmation" });
|
|
27
|
+
} else if (values.password !== values.passwordConfirmation) {
|
|
28
|
+
errors.push({ code: "PASSWORD_MISMATCH", field: "passwordConfirmation" });
|
|
29
|
+
}
|
|
30
|
+
return errors;
|
|
31
|
+
},
|
|
32
|
+
execute: async ({ values }) => {
|
|
33
|
+
return await changePassword({
|
|
34
|
+
personId,
|
|
35
|
+
password: values.password
|
|
36
|
+
});
|
|
37
|
+
},
|
|
38
|
+
children
|
|
39
|
+
}
|
|
40
|
+
);
|
|
41
|
+
};
|
|
42
|
+
const errorToField = {
|
|
43
|
+
PASSWORD_MISMATCH: "passwordConfirmation",
|
|
44
|
+
TOO_WEAK: "password",
|
|
45
|
+
PERSON_NOT_FOUND: void 0
|
|
46
|
+
};
|
|
47
|
+
exports.ChangePasswordForm = ChangePasswordForm;
|
|
48
|
+
exports.useChangePasswordForm = useChangePasswordForm;
|
|
49
|
+
//# sourceMappingURL=ChangePasswordForm.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChangePasswordForm.cjs","sources":["../../../../../../packages/react-client-tenant/src/components/forms/ChangePasswordForm.tsx"],"sourcesContent":["import { ReactElement } from 'react'\nimport { ChangePasswordErrorCode } from '@contember/graphql-client-tenant'\nimport { TenantForm } from './TenantForm.js'\nimport { FormContextValue, FormError, FormState } from '../../types/index.js'\nimport { useForm } from '../../contexts.js'\nimport { useChangePasswordMutation } from '../../hooks/index.js'\n\nexport type ChangePasswordFormValues = {\n\tpassword: string\n\tpasswordConfirmation: string\n}\n\nexport type ChangePasswordFormErrorCode =\n\t| ChangePasswordErrorCode\n\t| 'FIELD_REQUIRED'\n\t| 'INVALID_VALUE'\n\t| 'PASSWORD_MISMATCH'\n\t| 'UNKNOWN_ERROR'\n\nexport type ChangePasswordFormState = FormState\n\nexport type ChangePasswordFormError = FormError<ChangePasswordFormValues, ChangePasswordFormErrorCode>\n\nexport type ChangePasswordFormContextValue = FormContextValue<ChangePasswordFormValues, ChangePasswordFormErrorCode>\n\nexport interface ChangePasswordFormProps {\n\tchildren: ReactElement\n\tpersonId: string\n\tonSuccess?: () => void\n}\n\nexport const useChangePasswordForm = useForm as () => ChangePasswordFormContextValue\n\nexport const ChangePasswordForm = ({ children, onSuccess, personId }: ChangePasswordFormProps) => {\n\tconst changePassword = useChangePasswordMutation()\n\treturn (\n\t\t<TenantForm<ChangePasswordFormContextValue>\n\t\t\tonSuccess={onSuccess}\n\t\t\terrorMapping={errorToField}\n\t\t\tinitialValues={{\n\t\t\t\tpassword: '',\n\t\t\t\tpasswordConfirmation: '',\n\t\t\t}}\n\t\t\tvalidate={({ values }) => {\n\t\t\t\tconst errors: ChangePasswordFormError[] = []\n\t\t\t\tif (!values.password) {\n\t\t\t\t\terrors.push({ code: 'FIELD_REQUIRED', field: 'password' })\n\t\t\t\t} else if (values.password.length < 6) {\n\t\t\t\t\terrors.push({ code: 'INVALID_VALUE', field: 'password' })\n\t\t\t\t} else if (!values.passwordConfirmation) {\n\t\t\t\t\terrors.push({ code: 'FIELD_REQUIRED', field: 'passwordConfirmation' })\n\t\t\t\t} else if (values.password !== values.passwordConfirmation) {\n\t\t\t\t\terrors.push({ code: 'PASSWORD_MISMATCH', field: 'passwordConfirmation' })\n\t\t\t\t}\n\t\t\t\treturn errors\n\t\t\t}}\n\t\t\texecute={async ({ values }) => {\n\t\t\t\treturn await changePassword({\n\t\t\t\t\tpersonId,\n\t\t\t\t\tpassword: values.password,\n\t\t\t\t})\n\t\t\t}}\n\t\t>\n\t\t\t{children}\n\t\t</TenantForm>\n\t)\n}\n\nconst errorToField: Partial<Record<ChangePasswordFormErrorCode, keyof ChangePasswordFormValues | undefined>> = {\n\tPASSWORD_MISMATCH: 'passwordConfirmation',\n\tTOO_WEAK: 'password',\n\tPERSON_NOT_FOUND: undefined,\n}\n"],"names":["useForm","useChangePasswordMutation","jsx","TenantForm"],"mappings":";;;;;;AA+BO,MAAM,wBAAwBA,SAAAA;AAE9B,MAAM,qBAAqB,CAAC,EAAE,UAAU,WAAW,eAAwC;AACjG,QAAM,iBAAiBC,0BAAAA,0BAAA;AACvB,SACCC,2BAAAA;AAAAA,IAACC,WAAAA;AAAAA,IAAA;AAAA,MACA;AAAA,MACA,cAAc;AAAA,MACd,eAAe;AAAA,QACd,UAAU;AAAA,QACV,sBAAsB;AAAA,MAAA;AAAA,MAEvB,UAAU,CAAC,EAAE,aAAa;AACzB,cAAM,SAAoC,CAAA;AAC1C,YAAI,CAAC,OAAO,UAAU;AACrB,iBAAO,KAAK,EAAE,MAAM,kBAAkB,OAAO,YAAY;AAAA,QAC1D,WAAW,OAAO,SAAS,SAAS,GAAG;AACtC,iBAAO,KAAK,EAAE,MAAM,iBAAiB,OAAO,YAAY;AAAA,QACzD,WAAW,CAAC,OAAO,sBAAsB;AACxC,iBAAO,KAAK,EAAE,MAAM,kBAAkB,OAAO,wBAAwB;AAAA,QACtE,WAAW,OAAO,aAAa,OAAO,sBAAsB;AAC3D,iBAAO,KAAK,EAAE,MAAM,qBAAqB,OAAO,wBAAwB;AAAA,QACzE;AACA,eAAO;AAAA,MACR;AAAA,MACA,SAAS,OAAO,EAAE,aAAa;AAC9B,eAAO,MAAM,eAAe;AAAA,UAC3B;AAAA,UACA,UAAU,OAAO;AAAA,QAAA,CACjB;AAAA,MACF;AAAA,MAEC;AAAA,IAAA;AAAA,EAAA;AAGJ;AAEA,MAAM,eAAyG;AAAA,EAC9G,mBAAmB;AAAA,EACnB,UAAU;AAAA,EACV,kBAAkB;AACnB;;;"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { TenantForm } from "./TenantForm.js";
|
|
3
|
+
import { useForm } from "../../contexts.js";
|
|
4
|
+
import { useChangePasswordMutation } from "../../hooks/mutations/person/useChangePasswordMutation.js";
|
|
5
|
+
const useChangePasswordForm = useForm;
|
|
6
|
+
const ChangePasswordForm = ({ children, onSuccess, personId }) => {
|
|
7
|
+
const changePassword = useChangePasswordMutation();
|
|
8
|
+
return /* @__PURE__ */ jsx(
|
|
9
|
+
TenantForm,
|
|
10
|
+
{
|
|
11
|
+
onSuccess,
|
|
12
|
+
errorMapping: errorToField,
|
|
13
|
+
initialValues: {
|
|
14
|
+
password: "",
|
|
15
|
+
passwordConfirmation: ""
|
|
16
|
+
},
|
|
17
|
+
validate: ({ values }) => {
|
|
18
|
+
const errors = [];
|
|
19
|
+
if (!values.password) {
|
|
20
|
+
errors.push({ code: "FIELD_REQUIRED", field: "password" });
|
|
21
|
+
} else if (values.password.length < 6) {
|
|
22
|
+
errors.push({ code: "INVALID_VALUE", field: "password" });
|
|
23
|
+
} else if (!values.passwordConfirmation) {
|
|
24
|
+
errors.push({ code: "FIELD_REQUIRED", field: "passwordConfirmation" });
|
|
25
|
+
} else if (values.password !== values.passwordConfirmation) {
|
|
26
|
+
errors.push({ code: "PASSWORD_MISMATCH", field: "passwordConfirmation" });
|
|
27
|
+
}
|
|
28
|
+
return errors;
|
|
29
|
+
},
|
|
30
|
+
execute: async ({ values }) => {
|
|
31
|
+
return await changePassword({
|
|
32
|
+
personId,
|
|
33
|
+
password: values.password
|
|
34
|
+
});
|
|
35
|
+
},
|
|
36
|
+
children
|
|
37
|
+
}
|
|
38
|
+
);
|
|
39
|
+
};
|
|
40
|
+
const errorToField = {
|
|
41
|
+
PASSWORD_MISMATCH: "passwordConfirmation",
|
|
42
|
+
TOO_WEAK: "password",
|
|
43
|
+
PERSON_NOT_FOUND: void 0
|
|
44
|
+
};
|
|
45
|
+
export {
|
|
46
|
+
ChangePasswordForm,
|
|
47
|
+
useChangePasswordForm
|
|
48
|
+
};
|
|
49
|
+
//# sourceMappingURL=ChangePasswordForm.js.map
|