@contember/react-client-tenant 2.1.0-beta.2 → 2.2.0-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (557) hide show
  1. package/dist/development/index.cjs +18 -0
  2. package/dist/development/index.cjs.map +1 -1
  3. package/dist/development/index.js +19 -1
  4. package/dist/development/index.js.map +1 -1
  5. package/dist/development/src/components/IdentityProvider.cjs.map +1 -1
  6. package/dist/development/src/components/IdentityProvider.js.map +1 -1
  7. package/dist/development/src/components/IdentityState.cjs.map +1 -1
  8. package/dist/development/src/components/IdentityState.js.map +1 -1
  9. package/dist/development/src/components/forms/ChangeMyPasswordForm.cjs.map +1 -1
  10. package/dist/development/src/components/forms/ChangeMyPasswordForm.js.map +1 -1
  11. package/dist/development/src/components/forms/ConfirmEmailChangeForm.cjs +52 -0
  12. package/dist/development/src/components/forms/ConfirmEmailChangeForm.cjs.map +1 -0
  13. package/dist/development/src/components/forms/ConfirmEmailChangeForm.js +52 -0
  14. package/dist/development/src/components/forms/ConfirmEmailChangeForm.js.map +1 -0
  15. package/dist/development/src/components/forms/CreateApiKeyForm.cjs.map +1 -1
  16. package/dist/development/src/components/forms/CreateApiKeyForm.js.map +1 -1
  17. package/dist/development/src/components/forms/CreateSessionTokenForm.cjs.map +1 -1
  18. package/dist/development/src/components/forms/CreateSessionTokenForm.js.map +1 -1
  19. package/dist/development/src/components/forms/InviteForm.cjs.map +1 -1
  20. package/dist/development/src/components/forms/InviteForm.js.map +1 -1
  21. package/dist/development/src/components/forms/LoginForm.cjs +3 -1
  22. package/dist/development/src/components/forms/LoginForm.cjs.map +1 -1
  23. package/dist/development/src/components/forms/LoginForm.js +3 -1
  24. package/dist/development/src/components/forms/LoginForm.js.map +1 -1
  25. package/dist/development/src/components/forms/OtpConfirmForm.cjs.map +1 -1
  26. package/dist/development/src/components/forms/OtpConfirmForm.js.map +1 -1
  27. package/dist/development/src/components/forms/OtpPrepareForm.cjs.map +1 -1
  28. package/dist/development/src/components/forms/OtpPrepareForm.js.map +1 -1
  29. package/dist/development/src/components/forms/PasswordResetForm.cjs.map +1 -1
  30. package/dist/development/src/components/forms/PasswordResetForm.js.map +1 -1
  31. package/dist/development/src/components/forms/PasswordResetRequestForm.cjs +3 -1
  32. package/dist/development/src/components/forms/PasswordResetRequestForm.cjs.map +1 -1
  33. package/dist/development/src/components/forms/PasswordResetRequestForm.js +3 -1
  34. package/dist/development/src/components/forms/PasswordResetRequestForm.js.map +1 -1
  35. package/dist/development/src/components/forms/PasswordlessSignInForm.cjs +2 -1
  36. package/dist/development/src/components/forms/PasswordlessSignInForm.cjs.map +1 -1
  37. package/dist/development/src/components/forms/PasswordlessSignInForm.js +2 -1
  38. package/dist/development/src/components/forms/PasswordlessSignInForm.js.map +1 -1
  39. package/dist/development/src/components/forms/PasswordlessSignInInitForm.cjs +3 -1
  40. package/dist/development/src/components/forms/PasswordlessSignInInitForm.cjs.map +1 -1
  41. package/dist/development/src/components/forms/PasswordlessSignInInitForm.js +3 -1
  42. package/dist/development/src/components/forms/PasswordlessSignInInitForm.js.map +1 -1
  43. package/dist/development/src/components/forms/RequestEmailVerificationForm.cjs +50 -0
  44. package/dist/development/src/components/forms/RequestEmailVerificationForm.cjs.map +1 -0
  45. package/dist/development/src/components/forms/RequestEmailVerificationForm.js +50 -0
  46. package/dist/development/src/components/forms/RequestEmailVerificationForm.js.map +1 -0
  47. package/dist/development/src/components/forms/TenantForm.cjs.map +1 -1
  48. package/dist/development/src/components/forms/TenantForm.js.map +1 -1
  49. package/dist/development/src/components/forms/UpdateProjectMemberForm.cjs.map +1 -1
  50. package/dist/development/src/components/forms/UpdateProjectMemberForm.js.map +1 -1
  51. package/dist/development/src/components/forms/VerifyEmailForm.cjs +50 -0
  52. package/dist/development/src/components/forms/VerifyEmailForm.cjs.map +1 -0
  53. package/dist/development/src/components/forms/VerifyEmailForm.js +50 -0
  54. package/dist/development/src/components/forms/VerifyEmailForm.js.map +1 -0
  55. package/dist/development/src/components/idp/IDP.cjs.map +1 -1
  56. package/dist/development/src/components/idp/IDP.js.map +1 -1
  57. package/dist/development/src/components/idp/IDPInitTrigger.cjs.map +1 -1
  58. package/dist/development/src/components/idp/IDPInitTrigger.js.map +1 -1
  59. package/dist/development/src/components/idp/IDPState.cjs.map +1 -1
  60. package/dist/development/src/components/idp/IDPState.js.map +1 -1
  61. package/dist/development/src/components/triggers/DisableOtpTrigger.cjs.map +1 -1
  62. package/dist/development/src/components/triggers/DisableOtpTrigger.js.map +1 -1
  63. package/dist/development/src/components/triggers/LogoutTrigger.cjs +3 -3
  64. package/dist/development/src/components/triggers/LogoutTrigger.cjs.map +1 -1
  65. package/dist/development/src/components/triggers/LogoutTrigger.js +3 -3
  66. package/dist/development/src/components/triggers/LogoutTrigger.js.map +1 -1
  67. package/dist/development/src/components/triggers/RemoveProjectMemberTrigger.cjs.map +1 -1
  68. package/dist/development/src/components/triggers/RemoveProjectMemberTrigger.js.map +1 -1
  69. package/dist/development/src/contexts.cjs.map +1 -1
  70. package/dist/development/src/contexts.js.map +1 -1
  71. package/dist/development/src/hooks/mutations/apiKey/useCreateApiKeyMutation.cjs.map +1 -1
  72. package/dist/development/src/hooks/mutations/apiKey/useCreateApiKeyMutation.js.map +1 -1
  73. package/dist/development/src/hooks/mutations/apiKey/useCreateGlobalApiKeyMutation.cjs.map +1 -1
  74. package/dist/development/src/hooks/mutations/apiKey/useCreateGlobalApiKeyMutation.js.map +1 -1
  75. package/dist/development/src/hooks/mutations/apiKey/useCreateSessionTokenMutation.cjs.map +1 -1
  76. package/dist/development/src/hooks/mutations/apiKey/useCreateSessionTokenMutation.js.map +1 -1
  77. package/dist/development/src/hooks/mutations/apiKey/useDisableApiKeyMutation.cjs.map +1 -1
  78. package/dist/development/src/hooks/mutations/apiKey/useDisableApiKeyMutation.js.map +1 -1
  79. package/dist/development/src/hooks/mutations/auth/useChangeMyPasswordMutation.cjs.map +1 -1
  80. package/dist/development/src/hooks/mutations/auth/useChangeMyPasswordMutation.js.map +1 -1
  81. package/dist/development/src/hooks/mutations/auth/useSignInMutation.cjs.map +1 -1
  82. package/dist/development/src/hooks/mutations/auth/useSignInMutation.js.map +1 -1
  83. package/dist/development/src/hooks/mutations/auth/useSignOutMutation.cjs.map +1 -1
  84. package/dist/development/src/hooks/mutations/auth/useSignOutMutation.js.map +1 -1
  85. package/dist/development/src/hooks/mutations/emailVerification/useConfirmEmailChangeMutation.cjs +32 -0
  86. package/dist/development/src/hooks/mutations/emailVerification/useConfirmEmailChangeMutation.cjs.map +1 -0
  87. package/dist/development/src/hooks/mutations/emailVerification/useConfirmEmailChangeMutation.js +15 -0
  88. package/dist/development/src/hooks/mutations/emailVerification/useConfirmEmailChangeMutation.js.map +1 -0
  89. package/dist/development/src/hooks/mutations/emailVerification/useRequestEmailVerificationMutation.cjs +32 -0
  90. package/dist/development/src/hooks/mutations/emailVerification/useRequestEmailVerificationMutation.cjs.map +1 -0
  91. package/dist/development/src/hooks/mutations/emailVerification/useRequestEmailVerificationMutation.js +15 -0
  92. package/dist/development/src/hooks/mutations/emailVerification/useRequestEmailVerificationMutation.js.map +1 -0
  93. package/dist/development/src/hooks/mutations/emailVerification/useVerifyEmailMutation.cjs +32 -0
  94. package/dist/development/src/hooks/mutations/emailVerification/useVerifyEmailMutation.cjs.map +1 -0
  95. package/dist/development/src/hooks/mutations/emailVerification/useVerifyEmailMutation.js +15 -0
  96. package/dist/development/src/hooks/mutations/emailVerification/useVerifyEmailMutation.js.map +1 -0
  97. package/dist/development/src/hooks/mutations/idp/useInitSignInIDPMutation.cjs.map +1 -1
  98. package/dist/development/src/hooks/mutations/idp/useInitSignInIDPMutation.js.map +1 -1
  99. package/dist/development/src/hooks/mutations/idp/useSignInIdpMutation.cjs.map +1 -1
  100. package/dist/development/src/hooks/mutations/idp/useSignInIdpMutation.js.map +1 -1
  101. package/dist/development/src/hooks/mutations/invite/useInviteMutation.cjs.map +1 -1
  102. package/dist/development/src/hooks/mutations/invite/useInviteMutation.js.map +1 -1
  103. package/dist/development/src/hooks/mutations/memberships/useAddProjectMemberMutation.cjs.map +1 -1
  104. package/dist/development/src/hooks/mutations/memberships/useAddProjectMemberMutation.js.map +1 -1
  105. package/dist/development/src/hooks/mutations/memberships/useRemoveProjectMemberMutation.cjs.map +1 -1
  106. package/dist/development/src/hooks/mutations/memberships/useRemoveProjectMemberMutation.js.map +1 -1
  107. package/dist/development/src/hooks/mutations/memberships/useUpdateProjectMemberMutation.cjs.map +1 -1
  108. package/dist/development/src/hooks/mutations/memberships/useUpdateProjectMemberMutation.js.map +1 -1
  109. package/dist/development/src/hooks/mutations/otp/useConfirmOtpMutation.cjs.map +1 -1
  110. package/dist/development/src/hooks/mutations/otp/useConfirmOtpMutation.js.map +1 -1
  111. package/dist/development/src/hooks/mutations/otp/useDisableOtpMutation.cjs.map +1 -1
  112. package/dist/development/src/hooks/mutations/otp/useDisableOtpMutation.js.map +1 -1
  113. package/dist/development/src/hooks/mutations/otp/usePrepareOtpMutation.cjs.map +1 -1
  114. package/dist/development/src/hooks/mutations/otp/usePrepareOtpMutation.js.map +1 -1
  115. package/dist/development/src/hooks/mutations/passwordReset/useCreateResetPasswordRequestMutation.cjs.map +1 -1
  116. package/dist/development/src/hooks/mutations/passwordReset/useCreateResetPasswordRequestMutation.js.map +1 -1
  117. package/dist/development/src/hooks/mutations/passwordReset/useResetPasswordMutation.cjs.map +1 -1
  118. package/dist/development/src/hooks/mutations/passwordReset/useResetPasswordMutation.js.map +1 -1
  119. package/dist/development/src/hooks/mutations/passwordless/useActivatePasswordlessOtpMutation.cjs.map +1 -1
  120. package/dist/development/src/hooks/mutations/passwordless/useActivatePasswordlessOtpMutation.js.map +1 -1
  121. package/dist/development/src/hooks/mutations/passwordless/useDisableMyPasswordlessMutation.cjs.map +1 -1
  122. package/dist/development/src/hooks/mutations/passwordless/useDisableMyPasswordlessMutation.js.map +1 -1
  123. package/dist/development/src/hooks/mutations/passwordless/useEnableMyPasswordlessMutation.cjs.map +1 -1
  124. package/dist/development/src/hooks/mutations/passwordless/useEnableMyPasswordlessMutation.js.map +1 -1
  125. package/dist/development/src/hooks/mutations/passwordless/useInitSignInPasswordlessMutation.cjs.map +1 -1
  126. package/dist/development/src/hooks/mutations/passwordless/useInitSignInPasswordlessMutation.js.map +1 -1
  127. package/dist/development/src/hooks/mutations/passwordless/useSignInPasswordlessMutation.cjs.map +1 -1
  128. package/dist/development/src/hooks/mutations/passwordless/useSignInPasswordlessMutation.js.map +1 -1
  129. package/dist/development/src/hooks/mutations/profile/useChangeMyProfile.cjs.map +1 -1
  130. package/dist/development/src/hooks/mutations/profile/useChangeMyProfile.js.map +1 -1
  131. package/dist/development/src/hooks/mutations/profile/useChangeProfile.cjs.map +1 -1
  132. package/dist/development/src/hooks/mutations/profile/useChangeProfile.js.map +1 -1
  133. package/dist/development/src/hooks/queries/useMeQuery.cjs.map +1 -1
  134. package/dist/development/src/hooks/queries/useMeQuery.js.map +1 -1
  135. package/dist/development/src/hooks/queries/useProjectMembersQuery.cjs.map +1 -1
  136. package/dist/development/src/hooks/queries/useProjectMembersQuery.js.map +1 -1
  137. package/dist/development/src/hooks/queries/useProjectMembershipsQuery.cjs.map +1 -1
  138. package/dist/development/src/hooks/queries/useProjectMembershipsQuery.js.map +1 -1
  139. package/dist/development/src/hooks/queries/useProjectRolesDefinitionQuery.cjs.map +1 -1
  140. package/dist/development/src/hooks/queries/useProjectRolesDefinitionQuery.js.map +1 -1
  141. package/dist/development/src/hooks/useFetchIdentity.cjs.map +1 -1
  142. package/dist/development/src/hooks/useFetchIdentity.js.map +1 -1
  143. package/dist/development/src/hooks/useLogout.cjs.map +1 -1
  144. package/dist/development/src/hooks/useLogout.js.map +1 -1
  145. package/dist/development/src/hooks/usePasswordlessOtpActivator.cjs.map +1 -1
  146. package/dist/development/src/hooks/usePasswordlessOtpActivator.js.map +1 -1
  147. package/dist/development/src/hooks/useTenantMutation.cjs.map +1 -1
  148. package/dist/development/src/hooks/useTenantMutation.js.map +1 -1
  149. package/dist/development/src/internal/hooks/useHandleIDPResponse.cjs.map +1 -1
  150. package/dist/development/src/internal/hooks/useHandleIDPResponse.js.map +1 -1
  151. package/dist/development/src/internal/hooks/useInitIDPRedirect.cjs.map +1 -1
  152. package/dist/development/src/internal/hooks/useInitIDPRedirect.js.map +1 -1
  153. package/dist/development/src/internal/hooks/useLogoutInternal.cjs +12 -7
  154. package/dist/development/src/internal/hooks/useLogoutInternal.cjs.map +1 -1
  155. package/dist/development/src/internal/hooks/useLogoutInternal.js +13 -8
  156. package/dist/development/src/internal/hooks/useLogoutInternal.js.map +1 -1
  157. package/dist/development/src/internal/hooks/useRedirectToBacklink.cjs.map +1 -1
  158. package/dist/development/src/internal/hooks/useRedirectToBacklink.js.map +1 -1
  159. package/dist/production/index.cjs +18 -0
  160. package/dist/production/index.cjs.map +1 -1
  161. package/dist/production/index.js +19 -1
  162. package/dist/production/index.js.map +1 -1
  163. package/dist/production/src/components/IdentityProvider.cjs.map +1 -1
  164. package/dist/production/src/components/IdentityProvider.js.map +1 -1
  165. package/dist/production/src/components/IdentityState.cjs.map +1 -1
  166. package/dist/production/src/components/IdentityState.js.map +1 -1
  167. package/dist/production/src/components/forms/ChangeMyPasswordForm.cjs.map +1 -1
  168. package/dist/production/src/components/forms/ChangeMyPasswordForm.js.map +1 -1
  169. package/dist/production/src/components/forms/ConfirmEmailChangeForm.cjs +44 -0
  170. package/dist/production/src/components/forms/ConfirmEmailChangeForm.cjs.map +1 -0
  171. package/dist/production/src/components/forms/ConfirmEmailChangeForm.js +44 -0
  172. package/dist/production/src/components/forms/ConfirmEmailChangeForm.js.map +1 -0
  173. package/dist/production/src/components/forms/CreateApiKeyForm.cjs.map +1 -1
  174. package/dist/production/src/components/forms/CreateApiKeyForm.js.map +1 -1
  175. package/dist/production/src/components/forms/CreateSessionTokenForm.cjs.map +1 -1
  176. package/dist/production/src/components/forms/CreateSessionTokenForm.js.map +1 -1
  177. package/dist/production/src/components/forms/InviteForm.cjs.map +1 -1
  178. package/dist/production/src/components/forms/InviteForm.js.map +1 -1
  179. package/dist/production/src/components/forms/LoginForm.cjs +3 -1
  180. package/dist/production/src/components/forms/LoginForm.cjs.map +1 -1
  181. package/dist/production/src/components/forms/LoginForm.js +3 -1
  182. package/dist/production/src/components/forms/LoginForm.js.map +1 -1
  183. package/dist/production/src/components/forms/OtpConfirmForm.cjs.map +1 -1
  184. package/dist/production/src/components/forms/OtpConfirmForm.js.map +1 -1
  185. package/dist/production/src/components/forms/OtpPrepareForm.cjs.map +1 -1
  186. package/dist/production/src/components/forms/OtpPrepareForm.js.map +1 -1
  187. package/dist/production/src/components/forms/PasswordResetForm.cjs.map +1 -1
  188. package/dist/production/src/components/forms/PasswordResetForm.js.map +1 -1
  189. package/dist/production/src/components/forms/PasswordResetRequestForm.cjs +3 -1
  190. package/dist/production/src/components/forms/PasswordResetRequestForm.cjs.map +1 -1
  191. package/dist/production/src/components/forms/PasswordResetRequestForm.js +3 -1
  192. package/dist/production/src/components/forms/PasswordResetRequestForm.js.map +1 -1
  193. package/dist/production/src/components/forms/PasswordlessSignInForm.cjs +2 -1
  194. package/dist/production/src/components/forms/PasswordlessSignInForm.cjs.map +1 -1
  195. package/dist/production/src/components/forms/PasswordlessSignInForm.js +2 -1
  196. package/dist/production/src/components/forms/PasswordlessSignInForm.js.map +1 -1
  197. package/dist/production/src/components/forms/PasswordlessSignInInitForm.cjs +3 -1
  198. package/dist/production/src/components/forms/PasswordlessSignInInitForm.cjs.map +1 -1
  199. package/dist/production/src/components/forms/PasswordlessSignInInitForm.js +3 -1
  200. package/dist/production/src/components/forms/PasswordlessSignInInitForm.js.map +1 -1
  201. package/dist/production/src/components/forms/RequestEmailVerificationForm.cjs +42 -0
  202. package/dist/production/src/components/forms/RequestEmailVerificationForm.cjs.map +1 -0
  203. package/dist/production/src/components/forms/RequestEmailVerificationForm.js +42 -0
  204. package/dist/production/src/components/forms/RequestEmailVerificationForm.js.map +1 -0
  205. package/dist/production/src/components/forms/TenantForm.cjs.map +1 -1
  206. package/dist/production/src/components/forms/TenantForm.js.map +1 -1
  207. package/dist/production/src/components/forms/UpdateProjectMemberForm.cjs.map +1 -1
  208. package/dist/production/src/components/forms/UpdateProjectMemberForm.js.map +1 -1
  209. package/dist/production/src/components/forms/VerifyEmailForm.cjs +42 -0
  210. package/dist/production/src/components/forms/VerifyEmailForm.cjs.map +1 -0
  211. package/dist/production/src/components/forms/VerifyEmailForm.js +42 -0
  212. package/dist/production/src/components/forms/VerifyEmailForm.js.map +1 -0
  213. package/dist/production/src/components/idp/IDP.cjs.map +1 -1
  214. package/dist/production/src/components/idp/IDP.js.map +1 -1
  215. package/dist/production/src/components/idp/IDPInitTrigger.cjs.map +1 -1
  216. package/dist/production/src/components/idp/IDPInitTrigger.js.map +1 -1
  217. package/dist/production/src/components/idp/IDPState.cjs.map +1 -1
  218. package/dist/production/src/components/idp/IDPState.js.map +1 -1
  219. package/dist/production/src/components/triggers/DisableOtpTrigger.cjs.map +1 -1
  220. package/dist/production/src/components/triggers/DisableOtpTrigger.js.map +1 -1
  221. package/dist/production/src/components/triggers/LogoutTrigger.cjs +2 -2
  222. package/dist/production/src/components/triggers/LogoutTrigger.cjs.map +1 -1
  223. package/dist/production/src/components/triggers/LogoutTrigger.js +2 -2
  224. package/dist/production/src/components/triggers/LogoutTrigger.js.map +1 -1
  225. package/dist/production/src/components/triggers/RemoveProjectMemberTrigger.cjs.map +1 -1
  226. package/dist/production/src/components/triggers/RemoveProjectMemberTrigger.js.map +1 -1
  227. package/dist/production/src/contexts.cjs.map +1 -1
  228. package/dist/production/src/contexts.js.map +1 -1
  229. package/dist/production/src/hooks/mutations/apiKey/useCreateApiKeyMutation.cjs.map +1 -1
  230. package/dist/production/src/hooks/mutations/apiKey/useCreateApiKeyMutation.js.map +1 -1
  231. package/dist/production/src/hooks/mutations/apiKey/useCreateGlobalApiKeyMutation.cjs.map +1 -1
  232. package/dist/production/src/hooks/mutations/apiKey/useCreateGlobalApiKeyMutation.js.map +1 -1
  233. package/dist/production/src/hooks/mutations/apiKey/useCreateSessionTokenMutation.cjs.map +1 -1
  234. package/dist/production/src/hooks/mutations/apiKey/useCreateSessionTokenMutation.js.map +1 -1
  235. package/dist/production/src/hooks/mutations/apiKey/useDisableApiKeyMutation.cjs.map +1 -1
  236. package/dist/production/src/hooks/mutations/apiKey/useDisableApiKeyMutation.js.map +1 -1
  237. package/dist/production/src/hooks/mutations/auth/useChangeMyPasswordMutation.cjs.map +1 -1
  238. package/dist/production/src/hooks/mutations/auth/useChangeMyPasswordMutation.js.map +1 -1
  239. package/dist/production/src/hooks/mutations/auth/useSignInMutation.cjs.map +1 -1
  240. package/dist/production/src/hooks/mutations/auth/useSignInMutation.js.map +1 -1
  241. package/dist/production/src/hooks/mutations/auth/useSignOutMutation.cjs.map +1 -1
  242. package/dist/production/src/hooks/mutations/auth/useSignOutMutation.js.map +1 -1
  243. package/dist/production/src/hooks/mutations/emailVerification/useConfirmEmailChangeMutation.cjs +32 -0
  244. package/dist/production/src/hooks/mutations/emailVerification/useConfirmEmailChangeMutation.cjs.map +1 -0
  245. package/dist/production/src/hooks/mutations/emailVerification/useConfirmEmailChangeMutation.js +15 -0
  246. package/dist/production/src/hooks/mutations/emailVerification/useConfirmEmailChangeMutation.js.map +1 -0
  247. package/dist/production/src/hooks/mutations/emailVerification/useRequestEmailVerificationMutation.cjs +32 -0
  248. package/dist/production/src/hooks/mutations/emailVerification/useRequestEmailVerificationMutation.cjs.map +1 -0
  249. package/dist/production/src/hooks/mutations/emailVerification/useRequestEmailVerificationMutation.js +15 -0
  250. package/dist/production/src/hooks/mutations/emailVerification/useRequestEmailVerificationMutation.js.map +1 -0
  251. package/dist/production/src/hooks/mutations/emailVerification/useVerifyEmailMutation.cjs +32 -0
  252. package/dist/production/src/hooks/mutations/emailVerification/useVerifyEmailMutation.cjs.map +1 -0
  253. package/dist/production/src/hooks/mutations/emailVerification/useVerifyEmailMutation.js +15 -0
  254. package/dist/production/src/hooks/mutations/emailVerification/useVerifyEmailMutation.js.map +1 -0
  255. package/dist/production/src/hooks/mutations/idp/useInitSignInIDPMutation.cjs.map +1 -1
  256. package/dist/production/src/hooks/mutations/idp/useInitSignInIDPMutation.js.map +1 -1
  257. package/dist/production/src/hooks/mutations/idp/useSignInIdpMutation.cjs.map +1 -1
  258. package/dist/production/src/hooks/mutations/idp/useSignInIdpMutation.js.map +1 -1
  259. package/dist/production/src/hooks/mutations/invite/useInviteMutation.cjs.map +1 -1
  260. package/dist/production/src/hooks/mutations/invite/useInviteMutation.js.map +1 -1
  261. package/dist/production/src/hooks/mutations/memberships/useAddProjectMemberMutation.cjs.map +1 -1
  262. package/dist/production/src/hooks/mutations/memberships/useAddProjectMemberMutation.js.map +1 -1
  263. package/dist/production/src/hooks/mutations/memberships/useRemoveProjectMemberMutation.cjs.map +1 -1
  264. package/dist/production/src/hooks/mutations/memberships/useRemoveProjectMemberMutation.js.map +1 -1
  265. package/dist/production/src/hooks/mutations/memberships/useUpdateProjectMemberMutation.cjs.map +1 -1
  266. package/dist/production/src/hooks/mutations/memberships/useUpdateProjectMemberMutation.js.map +1 -1
  267. package/dist/production/src/hooks/mutations/otp/useConfirmOtpMutation.cjs.map +1 -1
  268. package/dist/production/src/hooks/mutations/otp/useConfirmOtpMutation.js.map +1 -1
  269. package/dist/production/src/hooks/mutations/otp/useDisableOtpMutation.cjs.map +1 -1
  270. package/dist/production/src/hooks/mutations/otp/useDisableOtpMutation.js.map +1 -1
  271. package/dist/production/src/hooks/mutations/otp/usePrepareOtpMutation.cjs.map +1 -1
  272. package/dist/production/src/hooks/mutations/otp/usePrepareOtpMutation.js.map +1 -1
  273. package/dist/production/src/hooks/mutations/passwordReset/useCreateResetPasswordRequestMutation.cjs.map +1 -1
  274. package/dist/production/src/hooks/mutations/passwordReset/useCreateResetPasswordRequestMutation.js.map +1 -1
  275. package/dist/production/src/hooks/mutations/passwordReset/useResetPasswordMutation.cjs.map +1 -1
  276. package/dist/production/src/hooks/mutations/passwordReset/useResetPasswordMutation.js.map +1 -1
  277. package/dist/production/src/hooks/mutations/passwordless/useActivatePasswordlessOtpMutation.cjs.map +1 -1
  278. package/dist/production/src/hooks/mutations/passwordless/useActivatePasswordlessOtpMutation.js.map +1 -1
  279. package/dist/production/src/hooks/mutations/passwordless/useDisableMyPasswordlessMutation.cjs.map +1 -1
  280. package/dist/production/src/hooks/mutations/passwordless/useDisableMyPasswordlessMutation.js.map +1 -1
  281. package/dist/production/src/hooks/mutations/passwordless/useEnableMyPasswordlessMutation.cjs.map +1 -1
  282. package/dist/production/src/hooks/mutations/passwordless/useEnableMyPasswordlessMutation.js.map +1 -1
  283. package/dist/production/src/hooks/mutations/passwordless/useInitSignInPasswordlessMutation.cjs.map +1 -1
  284. package/dist/production/src/hooks/mutations/passwordless/useInitSignInPasswordlessMutation.js.map +1 -1
  285. package/dist/production/src/hooks/mutations/passwordless/useSignInPasswordlessMutation.cjs.map +1 -1
  286. package/dist/production/src/hooks/mutations/passwordless/useSignInPasswordlessMutation.js.map +1 -1
  287. package/dist/production/src/hooks/mutations/profile/useChangeMyProfile.cjs.map +1 -1
  288. package/dist/production/src/hooks/mutations/profile/useChangeMyProfile.js.map +1 -1
  289. package/dist/production/src/hooks/mutations/profile/useChangeProfile.cjs.map +1 -1
  290. package/dist/production/src/hooks/mutations/profile/useChangeProfile.js.map +1 -1
  291. package/dist/production/src/hooks/queries/useMeQuery.cjs.map +1 -1
  292. package/dist/production/src/hooks/queries/useMeQuery.js.map +1 -1
  293. package/dist/production/src/hooks/queries/useProjectMembersQuery.cjs.map +1 -1
  294. package/dist/production/src/hooks/queries/useProjectMembersQuery.js.map +1 -1
  295. package/dist/production/src/hooks/queries/useProjectMembershipsQuery.cjs.map +1 -1
  296. package/dist/production/src/hooks/queries/useProjectMembershipsQuery.js.map +1 -1
  297. package/dist/production/src/hooks/queries/useProjectRolesDefinitionQuery.cjs.map +1 -1
  298. package/dist/production/src/hooks/queries/useProjectRolesDefinitionQuery.js.map +1 -1
  299. package/dist/production/src/hooks/useFetchIdentity.cjs.map +1 -1
  300. package/dist/production/src/hooks/useFetchIdentity.js.map +1 -1
  301. package/dist/production/src/hooks/useLogout.cjs.map +1 -1
  302. package/dist/production/src/hooks/useLogout.js.map +1 -1
  303. package/dist/production/src/hooks/usePasswordlessOtpActivator.cjs.map +1 -1
  304. package/dist/production/src/hooks/usePasswordlessOtpActivator.js.map +1 -1
  305. package/dist/production/src/hooks/useTenantMutation.cjs.map +1 -1
  306. package/dist/production/src/hooks/useTenantMutation.js.map +1 -1
  307. package/dist/production/src/internal/hooks/useHandleIDPResponse.cjs.map +1 -1
  308. package/dist/production/src/internal/hooks/useHandleIDPResponse.js.map +1 -1
  309. package/dist/production/src/internal/hooks/useInitIDPRedirect.cjs.map +1 -1
  310. package/dist/production/src/internal/hooks/useInitIDPRedirect.js.map +1 -1
  311. package/dist/production/src/internal/hooks/useLogoutInternal.cjs +12 -7
  312. package/dist/production/src/internal/hooks/useLogoutInternal.cjs.map +1 -1
  313. package/dist/production/src/internal/hooks/useLogoutInternal.js +13 -8
  314. package/dist/production/src/internal/hooks/useLogoutInternal.js.map +1 -1
  315. package/dist/production/src/internal/hooks/useRedirectToBacklink.cjs.map +1 -1
  316. package/dist/production/src/internal/hooks/useRedirectToBacklink.js.map +1 -1
  317. package/dist/types/components/IdentityState.d.ts +1 -1
  318. package/dist/types/components/IdentityState.d.ts.map +1 -1
  319. package/dist/types/components/forms/ChangeMyPasswordForm.d.ts +1 -1
  320. package/dist/types/components/forms/ChangeMyPasswordForm.d.ts.map +1 -1
  321. package/dist/types/components/forms/ConfirmEmailChangeForm.d.ts +18 -0
  322. package/dist/types/components/forms/ConfirmEmailChangeForm.d.ts.map +1 -0
  323. package/dist/types/components/forms/CreateApiKeyForm.d.ts +2 -2
  324. package/dist/types/components/forms/CreateApiKeyForm.d.ts.map +1 -1
  325. package/dist/types/components/forms/CreateSessionTokenForm.d.ts +2 -2
  326. package/dist/types/components/forms/CreateSessionTokenForm.d.ts.map +1 -1
  327. package/dist/types/components/forms/InviteForm.d.ts +2 -2
  328. package/dist/types/components/forms/InviteForm.d.ts.map +1 -1
  329. package/dist/types/components/forms/LoginForm.d.ts +1 -1
  330. package/dist/types/components/forms/LoginForm.d.ts.map +1 -1
  331. package/dist/types/components/forms/OtpConfirmForm.d.ts +1 -1
  332. package/dist/types/components/forms/OtpConfirmForm.d.ts.map +1 -1
  333. package/dist/types/components/forms/OtpPrepareForm.d.ts +2 -2
  334. package/dist/types/components/forms/OtpPrepareForm.d.ts.map +1 -1
  335. package/dist/types/components/forms/PasswordResetForm.d.ts +1 -1
  336. package/dist/types/components/forms/PasswordResetForm.d.ts.map +1 -1
  337. package/dist/types/components/forms/PasswordResetRequestForm.d.ts +1 -1
  338. package/dist/types/components/forms/PasswordResetRequestForm.d.ts.map +1 -1
  339. package/dist/types/components/forms/PasswordlessSignInForm.d.ts +1 -1
  340. package/dist/types/components/forms/PasswordlessSignInForm.d.ts.map +1 -1
  341. package/dist/types/components/forms/PasswordlessSignInInitForm.d.ts +2 -2
  342. package/dist/types/components/forms/PasswordlessSignInInitForm.d.ts.map +1 -1
  343. package/dist/types/components/forms/RequestEmailVerificationForm.d.ts +17 -0
  344. package/dist/types/components/forms/RequestEmailVerificationForm.d.ts.map +1 -0
  345. package/dist/types/components/forms/TenantForm.d.ts +1 -1
  346. package/dist/types/components/forms/TenantForm.d.ts.map +1 -1
  347. package/dist/types/components/forms/UpdateProjectMemberForm.d.ts +1 -1
  348. package/dist/types/components/forms/UpdateProjectMemberForm.d.ts.map +1 -1
  349. package/dist/types/components/forms/VerifyEmailForm.d.ts +18 -0
  350. package/dist/types/components/forms/VerifyEmailForm.d.ts.map +1 -0
  351. package/dist/types/components/forms/index.d.ts +15 -12
  352. package/dist/types/components/forms/index.d.ts.map +1 -1
  353. package/dist/types/components/idp/IDP.d.ts +1 -1
  354. package/dist/types/components/idp/IDP.d.ts.map +1 -1
  355. package/dist/types/components/idp/IDPState.d.ts +1 -1
  356. package/dist/types/components/idp/IDPState.d.ts.map +1 -1
  357. package/dist/types/components/idp/index.d.ts +3 -3
  358. package/dist/types/components/idp/index.d.ts.map +1 -1
  359. package/dist/types/components/index.d.ts +5 -5
  360. package/dist/types/components/index.d.ts.map +1 -1
  361. package/dist/types/components/triggers/LogoutTrigger.d.ts +7 -1
  362. package/dist/types/components/triggers/LogoutTrigger.d.ts.map +1 -1
  363. package/dist/types/components/triggers/RemoveProjectMemberTrigger.d.ts +1 -1
  364. package/dist/types/components/triggers/RemoveProjectMemberTrigger.d.ts.map +1 -1
  365. package/dist/types/components/triggers/index.d.ts +3 -3
  366. package/dist/types/components/triggers/index.d.ts.map +1 -1
  367. package/dist/types/contexts.d.ts +1 -1
  368. package/dist/types/contexts.d.ts.map +1 -1
  369. package/dist/types/hooks/index.d.ts +8 -8
  370. package/dist/types/hooks/index.d.ts.map +1 -1
  371. package/dist/types/hooks/mutations/apiKey/index.d.ts +4 -4
  372. package/dist/types/hooks/mutations/apiKey/index.d.ts.map +1 -1
  373. package/dist/types/hooks/mutations/apiKey/useCreateApiKeyMutation.d.ts +4 -2
  374. package/dist/types/hooks/mutations/apiKey/useCreateApiKeyMutation.d.ts.map +1 -1
  375. package/dist/types/hooks/mutations/apiKey/useCreateGlobalApiKeyMutation.d.ts +4 -2
  376. package/dist/types/hooks/mutations/apiKey/useCreateGlobalApiKeyMutation.d.ts.map +1 -1
  377. package/dist/types/hooks/mutations/apiKey/useCreateSessionTokenMutation.d.ts +4 -2
  378. package/dist/types/hooks/mutations/apiKey/useCreateSessionTokenMutation.d.ts.map +1 -1
  379. package/dist/types/hooks/mutations/apiKey/useDisableApiKeyMutation.d.ts +2 -2
  380. package/dist/types/hooks/mutations/apiKey/useDisableApiKeyMutation.d.ts.map +1 -1
  381. package/dist/types/hooks/mutations/auth/index.d.ts +3 -3
  382. package/dist/types/hooks/mutations/auth/index.d.ts.map +1 -1
  383. package/dist/types/hooks/mutations/auth/useChangeMyPasswordMutation.d.ts +2 -2
  384. package/dist/types/hooks/mutations/auth/useChangeMyPasswordMutation.d.ts.map +1 -1
  385. package/dist/types/hooks/mutations/auth/useSignInMutation.d.ts +12 -2
  386. package/dist/types/hooks/mutations/auth/useSignInMutation.d.ts.map +1 -1
  387. package/dist/types/hooks/mutations/auth/useSignOutMutation.d.ts +4 -2
  388. package/dist/types/hooks/mutations/auth/useSignOutMutation.d.ts.map +1 -1
  389. package/dist/types/hooks/mutations/emailVerification/index.d.ts +4 -0
  390. package/dist/types/hooks/mutations/emailVerification/index.d.ts.map +1 -0
  391. package/dist/types/hooks/mutations/emailVerification/useConfirmEmailChangeMutation.d.ts +19 -0
  392. package/dist/types/hooks/mutations/emailVerification/useConfirmEmailChangeMutation.d.ts.map +1 -0
  393. package/dist/types/hooks/mutations/emailVerification/useRequestEmailVerificationMutation.d.ts +23 -0
  394. package/dist/types/hooks/mutations/emailVerification/useRequestEmailVerificationMutation.d.ts.map +1 -0
  395. package/dist/types/hooks/mutations/emailVerification/useVerifyEmailMutation.d.ts +19 -0
  396. package/dist/types/hooks/mutations/emailVerification/useVerifyEmailMutation.d.ts.map +1 -0
  397. package/dist/types/hooks/mutations/idp/index.d.ts +2 -2
  398. package/dist/types/hooks/mutations/idp/index.d.ts.map +1 -1
  399. package/dist/types/hooks/mutations/idp/useInitSignInIDPMutation.d.ts +1 -1
  400. package/dist/types/hooks/mutations/idp/useSignInIdpMutation.d.ts +2 -1
  401. package/dist/types/hooks/mutations/idp/useSignInIdpMutation.d.ts.map +1 -1
  402. package/dist/types/hooks/mutations/index.d.ts +10 -9
  403. package/dist/types/hooks/mutations/index.d.ts.map +1 -1
  404. package/dist/types/hooks/mutations/invite/index.d.ts +1 -1
  405. package/dist/types/hooks/mutations/invite/index.d.ts.map +1 -1
  406. package/dist/types/hooks/mutations/invite/useInviteMutation.d.ts +2 -2
  407. package/dist/types/hooks/mutations/memberships/index.d.ts +3 -3
  408. package/dist/types/hooks/mutations/memberships/index.d.ts.map +1 -1
  409. package/dist/types/hooks/mutations/memberships/useAddProjectMemberMutation.d.ts +2 -2
  410. package/dist/types/hooks/mutations/memberships/useAddProjectMemberMutation.d.ts.map +1 -1
  411. package/dist/types/hooks/mutations/memberships/useRemoveProjectMemberMutation.d.ts +2 -2
  412. package/dist/types/hooks/mutations/memberships/useRemoveProjectMemberMutation.d.ts.map +1 -1
  413. package/dist/types/hooks/mutations/memberships/useUpdateProjectMemberMutation.d.ts +2 -2
  414. package/dist/types/hooks/mutations/memberships/useUpdateProjectMemberMutation.d.ts.map +1 -1
  415. package/dist/types/hooks/mutations/otp/index.d.ts +3 -3
  416. package/dist/types/hooks/mutations/otp/index.d.ts.map +1 -1
  417. package/dist/types/hooks/mutations/otp/useConfirmOtpMutation.d.ts +2 -2
  418. package/dist/types/hooks/mutations/otp/useConfirmOtpMutation.d.ts.map +1 -1
  419. package/dist/types/hooks/mutations/otp/useDisableOtpMutation.d.ts +1 -1
  420. package/dist/types/hooks/mutations/otp/useDisableOtpMutation.d.ts.map +1 -1
  421. package/dist/types/hooks/mutations/otp/usePrepareOtpMutation.d.ts +2 -2
  422. package/dist/types/hooks/mutations/passwordReset/index.d.ts +2 -2
  423. package/dist/types/hooks/mutations/passwordReset/index.d.ts.map +1 -1
  424. package/dist/types/hooks/mutations/passwordReset/useCreateResetPasswordRequestMutation.d.ts +4 -2
  425. package/dist/types/hooks/mutations/passwordReset/useCreateResetPasswordRequestMutation.d.ts.map +1 -1
  426. package/dist/types/hooks/mutations/passwordReset/useResetPasswordMutation.d.ts +2 -2
  427. package/dist/types/hooks/mutations/passwordReset/useResetPasswordMutation.d.ts.map +1 -1
  428. package/dist/types/hooks/mutations/passwordless/index.d.ts +5 -5
  429. package/dist/types/hooks/mutations/passwordless/index.d.ts.map +1 -1
  430. package/dist/types/hooks/mutations/passwordless/useActivatePasswordlessOtpMutation.d.ts +2 -2
  431. package/dist/types/hooks/mutations/passwordless/useActivatePasswordlessOtpMutation.d.ts.map +1 -1
  432. package/dist/types/hooks/mutations/passwordless/useDisableMyPasswordlessMutation.d.ts +1 -1
  433. package/dist/types/hooks/mutations/passwordless/useDisableMyPasswordlessMutation.d.ts.map +1 -1
  434. package/dist/types/hooks/mutations/passwordless/useEnableMyPasswordlessMutation.d.ts +1 -1
  435. package/dist/types/hooks/mutations/passwordless/useEnableMyPasswordlessMutation.d.ts.map +1 -1
  436. package/dist/types/hooks/mutations/passwordless/useInitSignInPasswordlessMutation.d.ts +3 -2
  437. package/dist/types/hooks/mutations/passwordless/useInitSignInPasswordlessMutation.d.ts.map +1 -1
  438. package/dist/types/hooks/mutations/passwordless/useSignInPasswordlessMutation.d.ts +4 -2
  439. package/dist/types/hooks/mutations/passwordless/useSignInPasswordlessMutation.d.ts.map +1 -1
  440. package/dist/types/hooks/mutations/profile/index.d.ts +2 -2
  441. package/dist/types/hooks/mutations/profile/index.d.ts.map +1 -1
  442. package/dist/types/hooks/mutations/profile/useChangeMyProfile.d.ts +2 -2
  443. package/dist/types/hooks/mutations/profile/useChangeMyProfile.d.ts.map +1 -1
  444. package/dist/types/hooks/mutations/profile/useChangeProfile.d.ts +2 -2
  445. package/dist/types/hooks/mutations/profile/useChangeProfile.d.ts.map +1 -1
  446. package/dist/types/hooks/queries/index.d.ts +4 -4
  447. package/dist/types/hooks/queries/index.d.ts.map +1 -1
  448. package/dist/types/hooks/queries/useMeQuery.d.ts +1 -1
  449. package/dist/types/hooks/queries/useMeQuery.d.ts.map +1 -1
  450. package/dist/types/hooks/queries/useProjectMembersQuery.d.ts +15 -3
  451. package/dist/types/hooks/queries/useProjectMembersQuery.d.ts.map +1 -1
  452. package/dist/types/hooks/queries/useProjectMembershipsQuery.d.ts +1 -1
  453. package/dist/types/hooks/queries/useProjectMembershipsQuery.d.ts.map +1 -1
  454. package/dist/types/hooks/queries/useProjectRolesDefinitionQuery.d.ts +1 -1
  455. package/dist/types/hooks/queries/useProjectRolesDefinitionQuery.d.ts.map +1 -1
  456. package/dist/types/hooks/useFetchIdentity.d.ts +1 -1
  457. package/dist/types/hooks/useFetchIdentity.d.ts.map +1 -1
  458. package/dist/types/hooks/useLogout.d.ts +2 -1
  459. package/dist/types/hooks/useLogout.d.ts.map +1 -1
  460. package/dist/types/hooks/useTenantMutation.d.ts +1 -1
  461. package/dist/types/hooks/useTenantMutation.d.ts.map +1 -1
  462. package/dist/types/index.d.ts +4 -4
  463. package/dist/types/index.d.ts.map +1 -1
  464. package/dist/types/internal/hooks/useHandleIDPResponse.d.ts +1 -1
  465. package/dist/types/internal/hooks/useHandleIDPResponse.d.ts.map +1 -1
  466. package/dist/types/internal/hooks/useInitIDPRedirect.d.ts +1 -1
  467. package/dist/types/internal/hooks/useInitIDPRedirect.d.ts.map +1 -1
  468. package/dist/types/internal/hooks/useLogoutInternal.d.ts +2 -1
  469. package/dist/types/internal/hooks/useLogoutInternal.d.ts.map +1 -1
  470. package/dist/types/tsconfig.tsbuildinfo +1 -1
  471. package/dist/types/types/index.d.ts +5 -5
  472. package/dist/types/types/index.d.ts.map +1 -1
  473. package/package.json +4 -4
  474. package/src/components/IdentityProvider.tsx +2 -2
  475. package/src/components/IdentityState.tsx +2 -2
  476. package/src/components/forms/ChangeMyPasswordForm.tsx +4 -4
  477. package/src/components/forms/ConfirmEmailChangeForm.tsx +66 -0
  478. package/src/components/forms/CreateApiKeyForm.tsx +4 -4
  479. package/src/components/forms/CreateSessionTokenForm.tsx +4 -4
  480. package/src/components/forms/InviteForm.tsx +4 -4
  481. package/src/components/forms/LoginForm.tsx +7 -5
  482. package/src/components/forms/OtpConfirmForm.tsx +4 -4
  483. package/src/components/forms/OtpPrepareForm.tsx +4 -4
  484. package/src/components/forms/PasswordResetForm.tsx +4 -4
  485. package/src/components/forms/PasswordResetRequestForm.tsx +6 -4
  486. package/src/components/forms/PasswordlessSignInForm.tsx +6 -5
  487. package/src/components/forms/PasswordlessSignInInitForm.tsx +8 -6
  488. package/src/components/forms/RequestEmailVerificationForm.tsx +62 -0
  489. package/src/components/forms/TenantForm.tsx +2 -2
  490. package/src/components/forms/UpdateProjectMemberForm.tsx +4 -4
  491. package/src/components/forms/VerifyEmailForm.tsx +64 -0
  492. package/src/components/forms/index.ts +15 -12
  493. package/src/components/idp/IDP.tsx +5 -5
  494. package/src/components/idp/IDPInitTrigger.tsx +1 -1
  495. package/src/components/idp/IDPState.tsx +2 -2
  496. package/src/components/idp/index.ts +3 -3
  497. package/src/components/index.ts +5 -5
  498. package/src/components/triggers/DisableOtpTrigger.tsx +3 -3
  499. package/src/components/triggers/LogoutTrigger.tsx +9 -3
  500. package/src/components/triggers/RemoveProjectMemberTrigger.tsx +2 -2
  501. package/src/components/triggers/index.ts +3 -3
  502. package/src/contexts.ts +1 -1
  503. package/src/hooks/index.ts +8 -8
  504. package/src/hooks/mutations/apiKey/index.ts +4 -4
  505. package/src/hooks/mutations/apiKey/useCreateApiKeyMutation.tsx +1 -1
  506. package/src/hooks/mutations/apiKey/useCreateGlobalApiKeyMutation.tsx +1 -1
  507. package/src/hooks/mutations/apiKey/useCreateSessionTokenMutation.tsx +1 -1
  508. package/src/hooks/mutations/apiKey/useDisableApiKeyMutation.tsx +1 -1
  509. package/src/hooks/mutations/auth/index.ts +3 -3
  510. package/src/hooks/mutations/auth/useChangeMyPasswordMutation.ts +1 -1
  511. package/src/hooks/mutations/auth/useSignInMutation.ts +2 -2
  512. package/src/hooks/mutations/auth/useSignOutMutation.ts +1 -1
  513. package/src/hooks/mutations/emailVerification/index.ts +3 -0
  514. package/src/hooks/mutations/emailVerification/useConfirmEmailChangeMutation.ts +17 -0
  515. package/src/hooks/mutations/emailVerification/useRequestEmailVerificationMutation.ts +17 -0
  516. package/src/hooks/mutations/emailVerification/useVerifyEmailMutation.ts +17 -0
  517. package/src/hooks/mutations/idp/index.ts +2 -2
  518. package/src/hooks/mutations/idp/useInitSignInIDPMutation.ts +2 -2
  519. package/src/hooks/mutations/idp/useSignInIdpMutation.ts +2 -2
  520. package/src/hooks/mutations/index.ts +10 -9
  521. package/src/hooks/mutations/invite/index.ts +1 -1
  522. package/src/hooks/mutations/invite/useInviteMutation.tsx +1 -1
  523. package/src/hooks/mutations/memberships/index.ts +3 -3
  524. package/src/hooks/mutations/memberships/useAddProjectMemberMutation.ts +1 -1
  525. package/src/hooks/mutations/memberships/useRemoveProjectMemberMutation.ts +1 -1
  526. package/src/hooks/mutations/memberships/useUpdateProjectMemberMutation.ts +1 -1
  527. package/src/hooks/mutations/otp/index.ts +3 -3
  528. package/src/hooks/mutations/otp/useConfirmOtpMutation.ts +1 -1
  529. package/src/hooks/mutations/otp/useDisableOtpMutation.ts +1 -1
  530. package/src/hooks/mutations/otp/usePrepareOtpMutation.ts +1 -1
  531. package/src/hooks/mutations/passwordReset/index.ts +2 -2
  532. package/src/hooks/mutations/passwordReset/useCreateResetPasswordRequestMutation.ts +2 -2
  533. package/src/hooks/mutations/passwordReset/useResetPasswordMutation.ts +2 -2
  534. package/src/hooks/mutations/passwordless/index.ts +5 -5
  535. package/src/hooks/mutations/passwordless/useActivatePasswordlessOtpMutation.ts +2 -2
  536. package/src/hooks/mutations/passwordless/useDisableMyPasswordlessMutation.ts +1 -1
  537. package/src/hooks/mutations/passwordless/useEnableMyPasswordlessMutation.ts +1 -1
  538. package/src/hooks/mutations/passwordless/useInitSignInPasswordlessMutation.ts +2 -2
  539. package/src/hooks/mutations/passwordless/useSignInPasswordlessMutation.ts +2 -2
  540. package/src/hooks/mutations/profile/index.ts +2 -2
  541. package/src/hooks/mutations/profile/useChangeMyProfile.ts +1 -1
  542. package/src/hooks/mutations/profile/useChangeProfile.ts +1 -1
  543. package/src/hooks/queries/index.ts +4 -4
  544. package/src/hooks/queries/useMeQuery.ts +1 -1
  545. package/src/hooks/queries/useProjectMembersQuery.ts +1 -1
  546. package/src/hooks/queries/useProjectMembershipsQuery.ts +1 -1
  547. package/src/hooks/queries/useProjectRolesDefinitionQuery.ts +1 -1
  548. package/src/hooks/useFetchIdentity.ts +3 -3
  549. package/src/hooks/useLogout.ts +2 -2
  550. package/src/hooks/usePasswordlessOtpActivator.ts +4 -4
  551. package/src/hooks/useTenantMutation.ts +1 -1
  552. package/src/index.ts +4 -4
  553. package/src/internal/hooks/useHandleIDPResponse.ts +5 -5
  554. package/src/internal/hooks/useInitIDPRedirect.ts +5 -5
  555. package/src/internal/hooks/useLogoutInternal.ts +18 -8
  556. package/src/internal/hooks/useRedirectToBacklink.ts +1 -1
  557. package/src/types/index.ts +5 -5
@@ -1,6 +1,6 @@
1
- export * from './forms';
2
- export * from './IdentityMethods';
3
- export * from './IdentityStateValue';
4
- export * from './Identity';
5
- export * from './idp';
1
+ export * from './forms.js';
2
+ export * from './IdentityMethods.js';
3
+ export * from './IdentityStateValue.js';
4
+ export * from './Identity.js';
5
+ export * from './idp.js';
6
6
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAA;AACvB,cAAc,mBAAmB,CAAA;AACjC,cAAc,sBAAsB,CAAA;AACpC,cAAc,YAAY,CAAA;AAC1B,cAAc,OAAO,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAA;AAC1B,cAAc,sBAAsB,CAAA;AACpC,cAAc,yBAAyB,CAAA;AACvC,cAAc,eAAe,CAAA;AAC7B,cAAc,UAAU,CAAA"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@contember/react-client-tenant",
3
3
  "license": "Apache-2.0",
4
- "version": "2.1.0-beta.2",
4
+ "version": "2.2.0-alpha.1",
5
5
  "type": "module",
6
6
  "sideEffects": false,
7
7
  "main": "./dist/production/index.js",
@@ -34,9 +34,9 @@
34
34
  "directory": "packages/react-client-tenant"
35
35
  },
36
36
  "dependencies": {
37
- "@contember/graphql-client-tenant": "2.1.0-beta.1",
38
- "@contember/react-client": "2.1.0-beta.1",
39
- "@contember/react-utils": "2.1.0-beta.1",
37
+ "@contember/graphql-client-tenant": "2.1.0-beta.2",
38
+ "@contember/react-client": "2.1.0-beta.2",
39
+ "@contember/react-utils": "2.1.0-beta.2",
40
40
  "@radix-ui/primitive": "^1.1.3",
41
41
  "@radix-ui/react-slot": "^1.2.4",
42
42
  "graphql-ts-client-api": "^3.1.17"
@@ -1,7 +1,7 @@
1
1
  import { useSessionToken } from '@contember/react-client'
2
2
  import { ReactNode, useEffect } from 'react'
3
- import { useFetchIdentity } from '../hooks'
4
- import { IdentityContext, IdentityMethodsContext, IdentityStateContext } from '../contexts'
3
+ import { useFetchIdentity } from '../hooks/index.js'
4
+ import { IdentityContext, IdentityMethodsContext, IdentityStateContext } from '../contexts.js'
5
5
 
6
6
  export interface IdentityProviderProps {
7
7
  children: ReactNode
@@ -1,6 +1,6 @@
1
1
  import React, { ReactNode } from 'react'
2
- import { IdentityStateValue } from '../types'
3
- import { useIdentityState } from '../contexts'
2
+ import { IdentityStateValue } from '../types/index.js'
3
+ import { useIdentityState } from '../contexts.js'
4
4
 
5
5
  export interface IdentityStateProps {
6
6
  state: IdentityStateValue | IdentityStateValue[]
@@ -1,9 +1,9 @@
1
1
  import { ReactElement } from 'react'
2
2
  import { ChangeMyPasswordErrorCode } from '@contember/graphql-client-tenant'
3
- import { TenantForm } from './TenantForm'
4
- import { FormContextValue, FormError, FormState } from '../../types'
5
- import { useForm } from '../../contexts'
6
- import { useChangeMyPasswordMutation } from '../../hooks'
3
+ import { TenantForm } from './TenantForm.js'
4
+ import { FormContextValue, FormError, FormState } from '../../types/index.js'
5
+ import { useForm } from '../../contexts.js'
6
+ import { useChangeMyPasswordMutation } from '../../hooks/index.js'
7
7
 
8
8
  export type ChangeMyPasswordFormValues = {
9
9
  currentPassword: string
@@ -0,0 +1,66 @@
1
+ import { ReactElement } from 'react'
2
+ import * as TenantApi from '@contember/graphql-client-tenant'
3
+ import { ConfirmEmailChangeErrorCode } from '@contember/graphql-client-tenant'
4
+ import { TenantForm } from './TenantForm.js'
5
+ import { FormContextValue, FormError, FormState } from '../../types/index.js'
6
+ import { useForm } from '../../contexts.js'
7
+ import { useConfirmEmailChangeMutation } from '../../hooks/index.js'
8
+
9
+ export type ConfirmEmailChangeFormValues = {
10
+ token: string
11
+ }
12
+
13
+ export type ConfirmEmailChangeFormErrorCode =
14
+ | ConfirmEmailChangeErrorCode
15
+ | 'FIELD_REQUIRED'
16
+ | 'INVALID_VALUE'
17
+ | 'UNKNOWN_ERROR'
18
+
19
+ export type ConfirmEmailChangeFormState = FormState
20
+
21
+ export type ConfirmEmailChangeFormError = FormError<ConfirmEmailChangeFormValues, ConfirmEmailChangeFormErrorCode>
22
+
23
+ export type ConfirmEmailChangeFormContextValue = FormContextValue<ConfirmEmailChangeFormValues, ConfirmEmailChangeFormErrorCode>
24
+
25
+ export interface ConfirmEmailChangeFormProps {
26
+ children: ReactElement
27
+ onSuccess?: () => void
28
+ token?: string
29
+ }
30
+
31
+ export const useConfirmEmailChangeForm = useForm as () => ConfirmEmailChangeFormContextValue
32
+
33
+ export const ConfirmEmailChangeForm = ({ children, onSuccess, token }: ConfirmEmailChangeFormProps) => {
34
+ const confirmEmailChange = useConfirmEmailChangeMutation()
35
+ return (
36
+ <TenantForm<ConfirmEmailChangeFormContextValue>
37
+ onSuccess={onSuccess}
38
+ errorMapping={errorToField}
39
+ initialValues={{
40
+ token: token ?? '',
41
+ }}
42
+ validate={({ values }) => {
43
+ const errors: ConfirmEmailChangeFormError[] = []
44
+ if (!values.token) {
45
+ errors.push({ code: 'FIELD_REQUIRED', field: 'token' })
46
+ }
47
+ return errors
48
+ }}
49
+ execute={async ({ values }) => {
50
+ return await confirmEmailChange({
51
+ token: values.token,
52
+ })
53
+ }}
54
+ >
55
+ {children}
56
+ </TenantForm>
57
+ )
58
+ }
59
+ const errorToField: Record<TenantApi.ConfirmEmailChangeErrorCode, keyof ConfirmEmailChangeFormValues | undefined> = {
60
+ TOKEN_EXPIRED: 'token',
61
+ TOKEN_NOT_FOUND: 'token',
62
+ TOKEN_USED: 'token',
63
+ TOKEN_INVALID: 'token',
64
+ EMAIL_ALREADY_EXISTS: undefined,
65
+ INVALID_EMAIL_FORMAT: undefined,
66
+ }
@@ -1,9 +1,9 @@
1
1
  import { ReactElement } from 'react'
2
- import { TenantForm } from './TenantForm'
3
- import { FormContextValue, FormError, FormState } from '../../types'
4
- import { useForm } from '../../contexts'
2
+ import { TenantForm } from './TenantForm.js'
3
+ import { FormContextValue, FormError, FormState } from '../../types/index.js'
4
+ import { useForm } from '../../contexts.js'
5
5
  import { CreateApiKeyErrorCode, MembershipInput } from '@contember/graphql-client-tenant'
6
- import { CreateApiKeyMutationResult, useCreateApiKeyMutation } from '../../hooks'
6
+ import { CreateApiKeyMutationResult, useCreateApiKeyMutation } from '../../hooks/index.js'
7
7
 
8
8
  export type CreateApiKeyFormValues = {
9
9
  description: string
@@ -1,9 +1,9 @@
1
1
  import { ReactElement } from 'react'
2
- import { TenantForm } from './TenantForm'
3
- import { FormContextValue, FormError, FormState } from '../../types'
4
- import { useForm } from '../../contexts'
2
+ import { TenantForm } from './TenantForm.js'
3
+ import { FormContextValue, FormError, FormState } from '../../types/index.js'
4
+ import { useForm } from '../../contexts.js'
5
5
  import { CreateSessionTokenErrorCode } from '@contember/graphql-client-tenant'
6
- import { CreateSessionTokenMutationResult, useCreateSessionTokenMutation } from '../../hooks'
6
+ import { CreateSessionTokenMutationResult, useCreateSessionTokenMutation } from '../../hooks/index.js'
7
7
 
8
8
  export type CreateSessionTokenFormValues = {
9
9
  email: string
@@ -1,9 +1,9 @@
1
1
  import { ReactElement } from 'react'
2
- import { TenantForm } from './TenantForm'
3
- import { FormContextValue, FormError, FormState } from '../../types'
4
- import { useForm } from '../../contexts'
2
+ import { TenantForm } from './TenantForm.js'
3
+ import { FormContextValue, FormError, FormState } from '../../types/index.js'
4
+ import { useForm } from '../../contexts.js'
5
5
  import { InviteErrorCode, InviteOptions, MembershipInput } from '@contember/graphql-client-tenant'
6
- import { InviteMutationResult, useInviteMutation } from '../../hooks'
6
+ import { InviteMutationResult, useInviteMutation } from '../../hooks/index.js'
7
7
 
8
8
  export type InviteFormValues = {
9
9
  email: string
@@ -1,12 +1,12 @@
1
1
  import { ReactElement, useCallback, useMemo } from 'react'
2
2
  import * as TenantApi from '@contember/graphql-client-tenant'
3
- import { TenantForm } from './TenantForm'
3
+ import { TenantForm } from './TenantForm.js'
4
4
  import { SignInErrorCode } from '@contember/graphql-client-tenant'
5
- import { FormContextValue, FormError, FormState } from '../../types'
6
- import { useForm } from '../../contexts'
5
+ import { FormContextValue, FormError, FormState } from '../../types/index.js'
6
+ import { useForm } from '../../contexts.js'
7
7
  import { useSetSessionToken } from '@contember/react-client'
8
- import { SignInMutationResult, useSignInMutation } from '../../hooks'
9
- import { useRedirectToBacklinkCallback } from '../../internal/hooks/useRedirectToBacklink'
8
+ import { SignInMutationResult, useSignInMutation } from '../../hooks/index.js'
9
+ import { useRedirectToBacklinkCallback } from '../../internal/hooks/useRedirectToBacklink.js'
10
10
 
11
11
  export type LoginFormValues = {
12
12
  email: string
@@ -107,4 +107,6 @@ const errorToField: Record<TenantApi.SignInErrorCode, keyof LoginFormValues | un
107
107
  'INVALID_CREDENTIALS': 'password',
108
108
  'RATE_LIMIT_EXCEEDED': 'password',
109
109
  'OTP_REQUIRED': undefined,
110
+ 'MFA_ENROLLMENT_REQUIRED': undefined,
111
+ 'EMAIL_NOT_VERIFIED': 'email',
110
112
  }
@@ -1,9 +1,9 @@
1
1
  import { ReactElement } from 'react'
2
- import { TenantForm } from './TenantForm'
3
- import { FormContextValue, FormError, FormState } from '../../types'
4
- import { useForm, useIdentityMethods } from '../../contexts'
2
+ import { TenantForm } from './TenantForm.js'
3
+ import { FormContextValue, FormError, FormState } from '../../types/index.js'
4
+ import { useForm, useIdentityMethods } from '../../contexts.js'
5
5
  import { ConfirmOtpErrorCode } from '@contember/graphql-client-tenant'
6
- import { useConfirmOtpMutation } from '../../hooks'
6
+ import { useConfirmOtpMutation } from '../../hooks/index.js'
7
7
 
8
8
  export type OtpConfirmFormValues = {
9
9
  otpToken: string
@@ -1,8 +1,8 @@
1
1
  import { ReactElement, useCallback, useMemo } from 'react'
2
- import { TenantForm } from './TenantForm'
3
- import { FormContextValue, FormError, FormState } from '../../types'
4
- import { useForm } from '../../contexts'
5
- import { PrepareOtpMutationResult, usePrepareOtpMutation } from '../../hooks'
2
+ import { TenantForm } from './TenantForm.js'
3
+ import { FormContextValue, FormError, FormState } from '../../types/index.js'
4
+ import { useForm } from '../../contexts.js'
5
+ import { PrepareOtpMutationResult, usePrepareOtpMutation } from '../../hooks/index.js'
6
6
 
7
7
  export type OtpPrepareFormValues = {
8
8
  label: string
@@ -1,10 +1,10 @@
1
1
  import { ReactElement } from 'react'
2
2
  import * as TenantApi from '@contember/graphql-client-tenant'
3
3
  import { ResetPasswordErrorCode } from '@contember/graphql-client-tenant'
4
- import { TenantForm } from './TenantForm'
5
- import { FormContextValue, FormError, FormState } from '../../types'
6
- import { useForm } from '../../contexts'
7
- import { useResetPasswordMutation } from '../../hooks'
4
+ import { TenantForm } from './TenantForm.js'
5
+ import { FormContextValue, FormError, FormState } from '../../types/index.js'
6
+ import { useForm } from '../../contexts.js'
7
+ import { useResetPasswordMutation } from '../../hooks/index.js'
8
8
 
9
9
  export type PasswordResetFormValues = {
10
10
  token: string
@@ -1,10 +1,10 @@
1
1
  import { ReactElement, useCallback, useMemo } from 'react'
2
2
  import * as TenantApi from '@contember/graphql-client-tenant'
3
3
  import { CreatePasswordResetRequestErrorCode } from '@contember/graphql-client-tenant'
4
- import { TenantForm } from './TenantForm'
5
- import { FormContextValue, FormError, FormState } from '../../types/forms'
6
- import { useForm } from '../../contexts'
7
- import { useCreateResetPasswordRequestMutation } from '../../hooks'
4
+ import { TenantForm } from './TenantForm.js'
5
+ import { FormContextValue, FormError, FormState } from '../../types/forms.js'
6
+ import { useForm } from '../../contexts.js'
7
+ import { useCreateResetPasswordRequestMutation } from '../../hooks/index.js'
8
8
 
9
9
  export type PasswordResetRequestFormValues = {
10
10
  email: string
@@ -58,4 +58,6 @@ export const PasswordResetRequestForm = ({ children, onSuccess }: PasswordResetR
58
58
  }
59
59
  const errorToField: Record<TenantApi.CreatePasswordResetRequestErrorCode, keyof PasswordResetRequestFormValues | undefined> = {
60
60
  PERSON_NOT_FOUND: 'email',
61
+ RATE_LIMIT_EXCEEDED: undefined,
62
+ INVALID_CAPTCHA: undefined,
61
63
  }
@@ -1,11 +1,11 @@
1
1
  import * as TenantApi from '@contember/graphql-client-tenant'
2
2
  import { useSetSessionToken } from '@contember/react-client'
3
3
  import { ReactElement, useCallback, useMemo } from 'react'
4
- import { useForm } from '../../contexts'
5
- import { SignInPasswordlessMutationResult, useSignInPasswordlessMutation } from '../../hooks'
6
- import { useRedirectToBacklinkCallback } from '../../internal/hooks/useRedirectToBacklink'
7
- import { FormContextValue, FormError, FormState } from '../../types/forms'
8
- import { TenantForm } from './TenantForm'
4
+ import { useForm } from '../../contexts.js'
5
+ import { SignInPasswordlessMutationResult, useSignInPasswordlessMutation } from '../../hooks/index.js'
6
+ import { useRedirectToBacklinkCallback } from '../../internal/hooks/useRedirectToBacklink.js'
7
+ import { FormContextValue, FormError, FormState } from '../../types/forms.js'
8
+ import { TenantForm } from './TenantForm.js'
9
9
 
10
10
  export type PasswordlessSignInFormValues = {
11
11
  token: string
@@ -102,4 +102,5 @@ const errorToField: Record<TenantApi.SignInPasswordlessErrorCode, keyof Password
102
102
  TOKEN_INVALID: 'token',
103
103
  INVALID_OTP_TOKEN: 'otpToken',
104
104
  OTP_REQUIRED: undefined,
105
+ MFA_ENROLLMENT_REQUIRED: undefined,
105
106
  }
@@ -1,11 +1,11 @@
1
1
  import { ReactElement, useCallback, useMemo } from 'react'
2
2
  import * as TenantApi from '@contember/graphql-client-tenant'
3
- import { TenantForm } from './TenantForm'
4
- import { FormContextValue, FormError, FormState } from '../../types/forms'
5
- import { useForm } from '../../contexts'
6
- import { InitSignInPasswordlessMutationResult, useInitSignInPasswordlessMutation } from '../../hooks'
7
- import { PASSWORDLESS_REQUEST_STORAGE_KEY } from '../../consts'
8
- import { useSaveBacklink } from '../../internal/hooks/useRedirectToBacklink'
3
+ import { TenantForm } from './TenantForm.js'
4
+ import { FormContextValue, FormError, FormState } from '../../types/forms.js'
5
+ import { useForm } from '../../contexts.js'
6
+ import { InitSignInPasswordlessMutationResult, useInitSignInPasswordlessMutation } from '../../hooks/index.js'
7
+ import { PASSWORDLESS_REQUEST_STORAGE_KEY } from '../../consts.js'
8
+ import { useSaveBacklink } from '../../internal/hooks/useRedirectToBacklink.js'
9
9
 
10
10
  export type PasswordlessSignInInitFormValues = {
11
11
  email: string
@@ -68,4 +68,6 @@ export const PasswordlessSignInInitForm = ({ children, onSuccess }: Passwordless
68
68
  const errorToField: Record<TenantApi.InitSignInPasswordlessErrorCode, keyof PasswordlessSignInInitFormValues | undefined> = {
69
69
  PERSON_NOT_FOUND: 'email',
70
70
  PASSWORDLESS_DISABLED: undefined,
71
+ RATE_LIMIT_EXCEEDED: undefined,
72
+ INVALID_CAPTCHA: undefined,
71
73
  }
@@ -0,0 +1,62 @@
1
+ import { ReactElement, useCallback, useMemo } from 'react'
2
+ import * as TenantApi from '@contember/graphql-client-tenant'
3
+ import { RequestEmailVerificationErrorCode } from '@contember/graphql-client-tenant'
4
+ import { TenantForm } from './TenantForm.js'
5
+ import { FormContextValue, FormError, FormState } from '../../types/forms.js'
6
+ import { useForm } from '../../contexts.js'
7
+ import { useRequestEmailVerificationMutation } from '../../hooks/index.js'
8
+
9
+ export type RequestEmailVerificationFormValues = {
10
+ email: string
11
+ }
12
+
13
+ export type RequestEmailVerificationFormErrorCode =
14
+ | RequestEmailVerificationErrorCode
15
+ | 'FIELD_REQUIRED'
16
+ | 'INVALID_VALUE'
17
+ | 'UNKNOWN_ERROR'
18
+
19
+ export type RequestEmailVerificationFormState = FormState
20
+
21
+ export type RequestEmailVerificationFormError = FormError<RequestEmailVerificationFormValues, RequestEmailVerificationFormErrorCode>
22
+
23
+ export type RequestEmailVerificationFormContextValue = FormContextValue<RequestEmailVerificationFormValues, RequestEmailVerificationFormErrorCode>
24
+
25
+ export interface RequestEmailVerificationFormProps {
26
+ children: ReactElement
27
+ onSuccess?: () => void
28
+ }
29
+
30
+ export const useRequestEmailVerificationForm = useForm as () => RequestEmailVerificationFormContextValue
31
+
32
+ export const RequestEmailVerificationForm = ({ children, onSuccess }: RequestEmailVerificationFormProps) => {
33
+ const requestEmailVerification = useRequestEmailVerificationMutation()
34
+ return (
35
+ <TenantForm<RequestEmailVerificationFormContextValue>
36
+ onSuccess={onSuccess}
37
+ errorMapping={errorToField}
38
+ initialValues={useMemo(() => ({
39
+ email: '',
40
+ }), [])}
41
+ validate={({ values }) => {
42
+ if (!values.email) {
43
+ return [{ code: 'FIELD_REQUIRED', field: 'email' }]
44
+ } else if (!values.email.match(/^.+@.+$/)) {
45
+ return [{ code: 'INVALID_VALUE', field: 'email' }]
46
+ }
47
+ return []
48
+ }}
49
+ execute={useCallback(async ({ values }) => {
50
+ return await requestEmailVerification({
51
+ email: values.email,
52
+ })
53
+ }, [requestEmailVerification])}
54
+ >
55
+ {children}
56
+ </TenantForm>
57
+ )
58
+ }
59
+ const errorToField: Record<TenantApi.RequestEmailVerificationErrorCode, keyof RequestEmailVerificationFormValues | undefined> = {
60
+ RATE_LIMIT_EXCEEDED: undefined,
61
+ INVALID_CAPTCHA: undefined,
62
+ }
@@ -1,7 +1,7 @@
1
1
  import { ComponentType, ReactElement, useCallback, useEffect, useState } from 'react'
2
2
  import { Slot } from '@radix-ui/react-slot'
3
- import { FormContextValue } from '../../types/forms'
4
- import { FormContext } from '../../contexts'
3
+ import { FormContextValue } from '../../types/forms.js'
4
+ import { FormContext } from '../../contexts.js'
5
5
  import { useReferentiallyStableCallback } from '@contember/react-utils'
6
6
 
7
7
  const SlotForm = Slot as ComponentType<React.FormHTMLAttributes<HTMLFormElement>>
@@ -1,9 +1,9 @@
1
1
  import { ReactElement, useEffect, useState } from 'react'
2
- import { TenantForm } from './TenantForm'
3
- import { FormContextValue, FormError, FormState } from '../../types'
4
- import { useForm } from '../../contexts'
2
+ import { TenantForm } from './TenantForm.js'
3
+ import { FormContextValue, FormError, FormState } from '../../types/index.js'
4
+ import { useForm } from '../../contexts.js'
5
5
  import { MembershipInput, UpdateProjectMemberErrorCode } from '@contember/graphql-client-tenant'
6
- import { useProjectMembershipsQuery, useTenantQueryLoader, useUpdateProjectMemberMutation } from '../../hooks'
6
+ import { useProjectMembershipsQuery, useTenantQueryLoader, useUpdateProjectMemberMutation } from '../../hooks/index.js'
7
7
 
8
8
  export type UpdateProjectMemberFormValues = {
9
9
  memberships: readonly MembershipInput[]
@@ -0,0 +1,64 @@
1
+ import { ReactElement } from 'react'
2
+ import * as TenantApi from '@contember/graphql-client-tenant'
3
+ import { VerifyEmailErrorCode } from '@contember/graphql-client-tenant'
4
+ import { TenantForm } from './TenantForm.js'
5
+ import { FormContextValue, FormError, FormState } from '../../types/index.js'
6
+ import { useForm } from '../../contexts.js'
7
+ import { useVerifyEmailMutation } from '../../hooks/index.js'
8
+
9
+ export type VerifyEmailFormValues = {
10
+ token: string
11
+ }
12
+
13
+ export type VerifyEmailFormErrorCode =
14
+ | VerifyEmailErrorCode
15
+ | 'FIELD_REQUIRED'
16
+ | 'INVALID_VALUE'
17
+ | 'UNKNOWN_ERROR'
18
+
19
+ export type VerifyEmailFormState = FormState
20
+
21
+ export type VerifyEmailFormError = FormError<VerifyEmailFormValues, VerifyEmailFormErrorCode>
22
+
23
+ export type VerifyEmailFormContextValue = FormContextValue<VerifyEmailFormValues, VerifyEmailFormErrorCode>
24
+
25
+ export interface VerifyEmailFormProps {
26
+ children: ReactElement
27
+ onSuccess?: () => void
28
+ token?: string
29
+ }
30
+
31
+ export const useVerifyEmailForm = useForm as () => VerifyEmailFormContextValue
32
+
33
+ export const VerifyEmailForm = ({ children, onSuccess, token }: VerifyEmailFormProps) => {
34
+ const verifyEmail = useVerifyEmailMutation()
35
+ return (
36
+ <TenantForm<VerifyEmailFormContextValue>
37
+ onSuccess={onSuccess}
38
+ errorMapping={errorToField}
39
+ initialValues={{
40
+ token: token ?? '',
41
+ }}
42
+ validate={({ values }) => {
43
+ const errors: VerifyEmailFormError[] = []
44
+ if (!values.token) {
45
+ errors.push({ code: 'FIELD_REQUIRED', field: 'token' })
46
+ }
47
+ return errors
48
+ }}
49
+ execute={async ({ values }) => {
50
+ return await verifyEmail({
51
+ token: values.token,
52
+ })
53
+ }}
54
+ >
55
+ {children}
56
+ </TenantForm>
57
+ )
58
+ }
59
+ const errorToField: Record<TenantApi.VerifyEmailErrorCode, keyof VerifyEmailFormValues | undefined> = {
60
+ TOKEN_EXPIRED: 'token',
61
+ TOKEN_NOT_FOUND: 'token',
62
+ TOKEN_USED: 'token',
63
+ TOKEN_INVALID: 'token',
64
+ }
@@ -1,12 +1,15 @@
1
- export * from './CreateApiKeyForm'
2
- export * from './CreateSessionTokenForm'
3
- export * from './ChangeMyPasswordForm'
4
- export * from './InviteForm'
5
- export * from './LoginForm'
6
- export * from './PasswordResetForm'
7
- export * from './PasswordResetRequestForm'
8
- export * from './PasswordlessSignInForm'
9
- export * from './PasswordlessSignInInitForm'
10
- export * from './OtpPrepareForm'
11
- export * from './OtpConfirmForm'
12
- export * from './UpdateProjectMemberForm'
1
+ export * from './CreateApiKeyForm.js'
2
+ export * from './CreateSessionTokenForm.js'
3
+ export * from './ChangeMyPasswordForm.js'
4
+ export * from './InviteForm.js'
5
+ export * from './LoginForm.js'
6
+ export * from './PasswordResetForm.js'
7
+ export * from './PasswordResetRequestForm.js'
8
+ export * from './VerifyEmailForm.js'
9
+ export * from './ConfirmEmailChangeForm.js'
10
+ export * from './RequestEmailVerificationForm.js'
11
+ export * from './PasswordlessSignInForm.js'
12
+ export * from './PasswordlessSignInInitForm.js'
13
+ export * from './OtpPrepareForm.js'
14
+ export * from './OtpConfirmForm.js'
15
+ export * from './UpdateProjectMemberForm.js'
@@ -1,9 +1,9 @@
1
1
  import { ReactNode, useEffect, useMemo, useRef, useState } from 'react'
2
- import { IDPMethodsContextProvider, IDPStateContextProvider } from '../../contexts'
3
- import { IDPInitError, IDPResponseError, IDPStateValue } from '../../types/idp'
4
- import { useHandleIDPResponse } from '../../internal/hooks/useHandleIDPResponse'
5
- import { useIDPAutoInitProvider } from '../../internal/hooks/useIDPAutoInit'
6
- import { useInitIDPRedirect } from '../../internal/hooks/useInitIDPRedirect'
2
+ import { IDPMethodsContextProvider, IDPStateContextProvider } from '../../contexts.js'
3
+ import { IDPInitError, IDPResponseError, IDPStateValue } from '../../types/idp.js'
4
+ import { useHandleIDPResponse } from '../../internal/hooks/useHandleIDPResponse.js'
5
+ import { useIDPAutoInitProvider } from '../../internal/hooks/useIDPAutoInit.js'
6
+ import { useInitIDPRedirect } from '../../internal/hooks/useInitIDPRedirect.js'
7
7
 
8
8
  export interface IDPProps {
9
9
  children: ReactNode
@@ -1,6 +1,6 @@
1
1
  import { Slot } from '@radix-ui/react-slot'
2
2
  import { ComponentType, ReactElement } from 'react'
3
- import { useIDPMethods } from '../../contexts'
3
+ import { useIDPMethods } from '../../contexts.js'
4
4
 
5
5
  const SlotButton = Slot as ComponentType<React.ButtonHTMLAttributes<HTMLButtonElement>>
6
6
 
@@ -1,6 +1,6 @@
1
1
  import React, { ReactNode } from 'react'
2
- import { IDPStateType } from '../../types'
3
- import { useIDPState } from '../../contexts'
2
+ import { IDPStateType } from '../../types/index.js'
3
+ import { useIDPState } from '../../contexts.js'
4
4
 
5
5
  export interface IDPStateProps {
6
6
  state: IDPStateType | IDPStateType[]
@@ -1,3 +1,3 @@
1
- export * from './IDPState'
2
- export * from './IDP'
3
- export * from './IDPInitTrigger'
1
+ export * from './IDPState.js'
2
+ export * from './IDP.js'
3
+ export * from './IDPInitTrigger.js'
@@ -1,5 +1,5 @@
1
- export * from './IdentityProvider'
2
- export * from './IdentityState'
3
- export * from './forms'
4
- export * from './idp'
5
- export * from './triggers'
1
+ export * from './IdentityProvider.js'
2
+ export * from './IdentityState.js'
3
+ export * from './forms/index.js'
4
+ export * from './idp/index.js'
5
+ export * from './triggers/index.js'
@@ -1,7 +1,7 @@
1
1
  import { ReactElement, useCallback } from 'react'
2
- import { useDisableOtpMutation } from '../../hooks'
3
- import { TenantActionTrigger } from './TenantActionTrigger'
4
- import { useIdentityMethods } from '../../contexts'
2
+ import { useDisableOtpMutation } from '../../hooks/index.js'
3
+ import { TenantActionTrigger } from './TenantActionTrigger.js'
4
+ import { useIdentityMethods } from '../../contexts.js'
5
5
 
6
6
  export interface DisableOtpTriggerProps {
7
7
  children: ReactElement
@@ -1,10 +1,16 @@
1
1
  import { ReactNode, useCallback } from 'react'
2
2
  import { Slot } from '@radix-ui/react-slot'
3
- import { useLogout } from '../../hooks/useLogout'
3
+ import { useLogout } from '../../hooks/useLogout.js'
4
4
 
5
- export const LogoutTrigger = ({ children }: {
5
+ export const LogoutTrigger = ({ children, idpLogout }: {
6
6
  children: ReactNode
7
+ /**
8
+ * Opt in to OIDC front-channel Single Logout: when the session was federated via an OIDC IdP
9
+ * that advertises an end_session_endpoint, redirect the browser to the IdP's logout URL so the
10
+ * user is also signed out at the IdP. Defaults to a local-only logout.
11
+ */
12
+ idpLogout?: boolean
7
13
  }) => {
8
14
  const logout = useLogout()
9
- return <Slot onClick={useCallback(() => logout(), [logout])}>{children}</Slot>
15
+ return <Slot onClick={useCallback(() => logout({ idpLogout }), [logout, idpLogout])}>{children}</Slot>
10
16
  }
@@ -1,6 +1,6 @@
1
1
  import { ReactElement, useCallback } from 'react'
2
- import { TenantActionTrigger } from './TenantActionTrigger'
3
- import { RemoveProjectMemberMutationVariables, useRemoveProjectMemberMutation } from '../../hooks'
2
+ import { TenantActionTrigger } from './TenantActionTrigger.js'
3
+ import { RemoveProjectMemberMutationVariables, useRemoveProjectMemberMutation } from '../../hooks/index.js'
4
4
 
5
5
  export type RemoveProjectMemberTriggerProps =
6
6
  & RemoveProjectMemberMutationVariables
@@ -1,3 +1,3 @@
1
- export * from './DisableOtpTrigger'
2
- export * from './LogoutTrigger'
3
- export * from './RemoveProjectMemberTrigger'
1
+ export * from './DisableOtpTrigger.js'
2
+ export * from './LogoutTrigger.js'
3
+ export * from './RemoveProjectMemberTrigger.js'
package/src/contexts.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { createContext, createRequiredContext } from '@contember/react-utils'
2
- import { FormContextValue, Identity, IdentityMethods, IdentityStateValue, IDPMethods, IDPStateValue } from './types'
2
+ import { FormContextValue, Identity, IdentityMethods, IdentityStateValue, IDPMethods, IDPStateValue } from './types/index.js'
3
3
 
4
4
  const IdentityContext_ = createContext<Identity | undefined>('IdentityContext', undefined)
5
5
  /** @internal */