@thunderid/react 0.2.0 → 0.3.3

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 (475) hide show
  1. package/dist/ThunderIDReactClient.d.ts +4 -4
  2. package/dist/ThunderIDReactClient.d.ts.map +1 -1
  3. package/dist/ThunderIDReactClient.js +6 -6
  4. package/dist/ThunderIDReactClient.js.map +1 -1
  5. package/dist/cjs/ThunderIDReactClient.cjs +5 -5
  6. package/dist/cjs/ThunderIDReactClient.cjs.map +1 -1
  7. package/dist/cjs/components/actions/SignInButton/SignInButton.cjs.map +1 -1
  8. package/dist/cjs/components/adapters/Consent.cjs.map +1 -1
  9. package/dist/cjs/components/adapters/ConsentCheckboxList.cjs +1 -1
  10. package/dist/cjs/components/adapters/ConsentCheckboxList.cjs.map +1 -1
  11. package/dist/cjs/components/auth/Callback/Callback.cjs +1 -1
  12. package/dist/cjs/components/auth/Callback/Callback.cjs.map +1 -1
  13. package/dist/cjs/components/auth/Callback/TokenCallback.cjs +3 -3
  14. package/dist/cjs/components/auth/Callback/TokenCallback.cjs.map +1 -1
  15. package/dist/cjs/components/factories/FieldFactory.cjs +2 -2
  16. package/dist/cjs/components/factories/FieldFactory.cjs.map +1 -1
  17. package/dist/cjs/components/presentation/CreateOrganization/BaseCreateOrganization.cjs +1 -1
  18. package/dist/cjs/components/presentation/OrganizationProfile/BaseOrganizationProfile.cjs +1 -1
  19. package/dist/cjs/components/presentation/UserProfile/BaseUserProfile.cjs +3 -3
  20. package/dist/cjs/components/presentation/auth/AcceptInvite/{v2/AcceptInvite.cjs → AcceptInvite.cjs} +2 -2
  21. package/dist/cjs/components/presentation/auth/AcceptInvite/AcceptInvite.cjs.map +1 -0
  22. package/dist/cjs/components/presentation/auth/AcceptInvite/{v2/BaseAcceptInvite.cjs → BaseAcceptInvite.cjs} +47 -18
  23. package/dist/cjs/components/presentation/auth/AcceptInvite/BaseAcceptInvite.cjs.map +1 -0
  24. package/dist/cjs/components/presentation/auth/AcceptInvite/{v2/BaseAcceptInvite.styles.cjs → BaseAcceptInvite.styles.cjs} +2 -2
  25. package/dist/cjs/components/presentation/auth/AcceptInvite/BaseAcceptInvite.styles.cjs.map +1 -0
  26. package/dist/cjs/components/presentation/auth/AuthOptionFactory.cjs +50 -32
  27. package/dist/cjs/components/presentation/auth/AuthOptionFactory.cjs.map +1 -1
  28. package/dist/cjs/components/presentation/auth/InviteUser/{v2/BaseInviteUser.cjs → BaseInviteUser.cjs} +44 -15
  29. package/dist/cjs/components/presentation/auth/InviteUser/BaseInviteUser.cjs.map +1 -0
  30. package/dist/cjs/components/presentation/auth/InviteUser/{v2/BaseInviteUser.styles.cjs → BaseInviteUser.styles.cjs} +2 -2
  31. package/dist/cjs/components/presentation/auth/InviteUser/BaseInviteUser.styles.cjs.map +1 -0
  32. package/dist/cjs/components/presentation/auth/InviteUser/{v2/InviteUser.cjs → InviteUser.cjs} +3 -3
  33. package/dist/cjs/components/presentation/auth/InviteUser/InviteUser.cjs.map +1 -0
  34. package/dist/cjs/components/presentation/auth/OrganizationUnitPicker/{v2/OrganizationUnitPicker.cjs → OrganizationUnitPicker.cjs} +3 -3
  35. package/dist/cjs/components/presentation/auth/OrganizationUnitPicker/OrganizationUnitPicker.cjs.map +1 -0
  36. package/dist/cjs/components/presentation/auth/OrganizationUnitPicker/{v2/OrganizationUnitPicker.styles.cjs → OrganizationUnitPicker.styles.cjs} +2 -2
  37. package/dist/cjs/components/presentation/auth/OrganizationUnitPicker/OrganizationUnitPicker.styles.cjs.map +1 -0
  38. package/dist/cjs/components/presentation/auth/Recovery/BaseRecovery.cjs +389 -8
  39. package/dist/cjs/components/presentation/auth/Recovery/BaseRecovery.cjs.map +1 -1
  40. package/dist/cjs/components/presentation/auth/Recovery/Recovery.cjs +51 -22
  41. package/dist/cjs/components/presentation/auth/Recovery/Recovery.cjs.map +1 -1
  42. package/dist/cjs/components/presentation/auth/SignIn/BaseSignIn.cjs +346 -8
  43. package/dist/cjs/components/presentation/auth/SignIn/BaseSignIn.cjs.map +1 -1
  44. package/dist/cjs/components/presentation/auth/SignIn/SignIn.cjs +547 -36
  45. package/dist/cjs/components/presentation/auth/SignIn/SignIn.cjs.map +1 -1
  46. package/dist/cjs/components/presentation/auth/SignUp/BaseSignUp.cjs +691 -8
  47. package/dist/cjs/components/presentation/auth/SignUp/BaseSignUp.cjs.map +1 -1
  48. package/dist/cjs/components/presentation/auth/SignUp/SignUp.cjs +66 -76
  49. package/dist/cjs/components/presentation/auth/SignUp/SignUp.cjs.map +1 -1
  50. package/dist/cjs/components/primitives/Alert/Alert.cjs +1 -1
  51. package/dist/cjs/components/primitives/Checkbox/Checkbox.cjs +1 -1
  52. package/dist/cjs/components/primitives/FormControl/FormControl.cjs +1 -1
  53. package/dist/cjs/components/primitives/Toggle/Toggle.cjs +1 -1
  54. package/dist/cjs/contexts/ComponentRenderer/ComponentRendererContext.cjs.map +1 -1
  55. package/dist/cjs/contexts/FlowMeta/FlowMetaProvider.cjs +5 -7
  56. package/dist/cjs/contexts/FlowMeta/FlowMetaProvider.cjs.map +1 -1
  57. package/dist/cjs/contexts/Theme/ThemeProvider.cjs +76 -37
  58. package/dist/cjs/contexts/Theme/ThemeProvider.cjs.map +1 -1
  59. package/dist/cjs/contexts/ThunderID/ThunderIDContext.cjs +0 -1
  60. package/dist/cjs/contexts/ThunderID/ThunderIDContext.cjs.map +1 -1
  61. package/dist/cjs/contexts/ThunderID/ThunderIDProvider.cjs +0 -3
  62. package/dist/cjs/contexts/ThunderID/ThunderIDProvider.cjs.map +1 -1
  63. package/dist/cjs/hooks/{v2/useOAuthCallback.cjs → useOAuthCallback.cjs} +2 -2
  64. package/dist/cjs/hooks/useOAuthCallback.cjs.map +1 -0
  65. package/dist/cjs/index.cjs +47 -50
  66. package/dist/cjs/utils/{v2/buildThemeConfigFromFlowMeta.cjs → buildThemeConfigFromFlowMeta.cjs} +1 -1
  67. package/dist/cjs/utils/buildThemeConfigFromFlowMeta.cjs.map +1 -0
  68. package/dist/cjs/utils/{v2/flowTransformer.cjs → flowTransformer.cjs} +1 -1
  69. package/dist/cjs/utils/flowTransformer.cjs.map +1 -0
  70. package/dist/cjs/utils/{v2/getAuthComponentHeadings.cjs → getAuthComponentHeadings.cjs} +1 -1
  71. package/dist/cjs/utils/getAuthComponentHeadings.cjs.map +1 -0
  72. package/dist/cjs/utils/{v2/passkey.cjs → passkey.cjs} +2 -2
  73. package/dist/cjs/utils/passkey.cjs.map +1 -0
  74. package/dist/cjs/utils/{v2/resolveTranslationsInArray.cjs → resolveTranslationsInArray.cjs} +1 -1
  75. package/dist/cjs/utils/resolveTranslationsInArray.cjs.map +1 -0
  76. package/dist/cjs/utils/{v2/resolveTranslationsInObject.cjs → resolveTranslationsInObject.cjs} +2 -2
  77. package/dist/cjs/utils/resolveTranslationsInObject.cjs.map +1 -0
  78. package/dist/components/actions/SignInButton/SignInButton.d.ts.map +1 -1
  79. package/dist/components/actions/SignInButton/SignInButton.js.map +1 -1
  80. package/dist/components/adapters/Consent.d.ts +1 -1
  81. package/dist/components/adapters/Consent.d.ts.map +1 -1
  82. package/dist/components/adapters/Consent.js.map +1 -1
  83. package/dist/components/adapters/ConsentCheckboxList.d.ts +1 -1
  84. package/dist/components/adapters/ConsentCheckboxList.d.ts.map +1 -1
  85. package/dist/components/adapters/ConsentCheckboxList.js +1 -1
  86. package/dist/components/adapters/ConsentCheckboxList.js.map +1 -1
  87. package/dist/components/auth/Callback/Callback.d.ts +1 -1
  88. package/dist/components/auth/Callback/Callback.js +1 -1
  89. package/dist/components/auth/Callback/Callback.js.map +1 -1
  90. package/dist/components/auth/Callback/TokenCallback.js +4 -4
  91. package/dist/components/auth/Callback/TokenCallback.js.map +1 -1
  92. package/dist/components/factories/FieldFactory.d.ts +2 -2
  93. package/dist/components/factories/FieldFactory.js +2 -2
  94. package/dist/components/factories/FieldFactory.js.map +1 -1
  95. package/dist/components/presentation/CreateOrganization/BaseCreateOrganization.js +1 -1
  96. package/dist/components/presentation/OrganizationProfile/BaseOrganizationProfile.js +1 -1
  97. package/dist/components/presentation/UserProfile/BaseUserProfile.js +3 -3
  98. package/dist/components/presentation/auth/AcceptInvite/AcceptInvite.d.ts.map +1 -0
  99. package/dist/components/presentation/auth/AcceptInvite/{v2/AcceptInvite.js → AcceptInvite.js} +1 -1
  100. package/dist/components/presentation/auth/AcceptInvite/AcceptInvite.js.map +1 -0
  101. package/dist/components/presentation/auth/AcceptInvite/{v2/BaseAcceptInvite.d.ts → BaseAcceptInvite.d.ts} +3 -2
  102. package/dist/components/presentation/auth/AcceptInvite/BaseAcceptInvite.d.ts.map +1 -0
  103. package/dist/components/presentation/auth/AcceptInvite/{v2/BaseAcceptInvite.js → BaseAcceptInvite.js} +45 -17
  104. package/dist/components/presentation/auth/AcceptInvite/BaseAcceptInvite.js.map +1 -0
  105. package/dist/components/presentation/auth/AcceptInvite/BaseAcceptInvite.styles.d.ts.map +1 -0
  106. package/dist/components/presentation/auth/AcceptInvite/{v2/BaseAcceptInvite.styles.js → BaseAcceptInvite.styles.js} +1 -1
  107. package/dist/components/presentation/auth/AcceptInvite/BaseAcceptInvite.styles.js.map +1 -0
  108. package/dist/components/presentation/auth/AcceptInvite/index.d.ts +4 -4
  109. package/dist/components/presentation/auth/AcceptInvite/index.d.ts.map +1 -1
  110. package/dist/components/presentation/auth/AuthOptionFactory.d.ts +1 -1
  111. package/dist/components/presentation/auth/AuthOptionFactory.d.ts.map +1 -1
  112. package/dist/components/presentation/auth/AuthOptionFactory.js +51 -33
  113. package/dist/components/presentation/auth/AuthOptionFactory.js.map +1 -1
  114. package/dist/components/presentation/auth/InviteUser/{v2/BaseInviteUser.d.ts → BaseInviteUser.d.ts} +3 -2
  115. package/dist/components/presentation/auth/InviteUser/BaseInviteUser.d.ts.map +1 -0
  116. package/dist/components/presentation/auth/InviteUser/{v2/BaseInviteUser.js → BaseInviteUser.js} +44 -15
  117. package/dist/components/presentation/auth/InviteUser/BaseInviteUser.js.map +1 -0
  118. package/dist/components/presentation/auth/InviteUser/BaseInviteUser.styles.d.ts.map +1 -0
  119. package/dist/components/presentation/auth/InviteUser/{v2/BaseInviteUser.styles.js → BaseInviteUser.styles.js} +1 -1
  120. package/dist/components/presentation/auth/InviteUser/BaseInviteUser.styles.js.map +1 -0
  121. package/dist/components/presentation/auth/InviteUser/InviteUser.d.ts.map +1 -0
  122. package/dist/components/presentation/auth/InviteUser/{v2/InviteUser.js → InviteUser.js} +2 -2
  123. package/dist/components/presentation/auth/InviteUser/InviteUser.js.map +1 -0
  124. package/dist/components/presentation/auth/InviteUser/index.d.ts +4 -4
  125. package/dist/components/presentation/auth/InviteUser/index.d.ts.map +1 -1
  126. package/dist/components/presentation/auth/OrganizationUnitPicker/OrganizationUnitPicker.d.ts.map +1 -0
  127. package/dist/components/presentation/auth/OrganizationUnitPicker/{v2/OrganizationUnitPicker.js → OrganizationUnitPicker.js} +2 -2
  128. package/dist/components/presentation/auth/OrganizationUnitPicker/OrganizationUnitPicker.js.map +1 -0
  129. package/dist/components/presentation/auth/OrganizationUnitPicker/OrganizationUnitPicker.styles.d.ts.map +1 -0
  130. package/dist/components/presentation/auth/OrganizationUnitPicker/{v2/OrganizationUnitPicker.styles.js → OrganizationUnitPicker.styles.js} +1 -1
  131. package/dist/components/presentation/auth/OrganizationUnitPicker/OrganizationUnitPicker.styles.js.map +1 -0
  132. package/dist/components/presentation/auth/OrganizationUnitPicker/index.d.ts +2 -2
  133. package/dist/components/presentation/auth/OrganizationUnitPicker/index.d.ts.map +1 -1
  134. package/dist/components/presentation/auth/Recovery/BaseRecovery.d.ts +63 -4
  135. package/dist/components/presentation/auth/Recovery/BaseRecovery.d.ts.map +1 -1
  136. package/dist/components/presentation/auth/Recovery/BaseRecovery.js +389 -10
  137. package/dist/components/presentation/auth/Recovery/BaseRecovery.js.map +1 -1
  138. package/dist/components/presentation/auth/Recovery/Recovery.d.ts +21 -22
  139. package/dist/components/presentation/auth/Recovery/Recovery.d.ts.map +1 -1
  140. package/dist/components/presentation/auth/Recovery/Recovery.js +51 -23
  141. package/dist/components/presentation/auth/Recovery/Recovery.js.map +1 -1
  142. package/dist/components/presentation/auth/SignIn/BaseSignIn.d.ts +213 -6
  143. package/dist/components/presentation/auth/SignIn/BaseSignIn.d.ts.map +1 -1
  144. package/dist/components/presentation/auth/SignIn/BaseSignIn.js +346 -10
  145. package/dist/components/presentation/auth/SignIn/BaseSignIn.js.map +1 -1
  146. package/dist/components/presentation/auth/SignIn/SignIn.d.ts +122 -13
  147. package/dist/components/presentation/auth/SignIn/SignIn.d.ts.map +1 -1
  148. package/dist/components/presentation/auth/SignIn/SignIn.js +548 -38
  149. package/dist/components/presentation/auth/SignIn/SignIn.js.map +1 -1
  150. package/dist/components/presentation/auth/SignUp/BaseSignUp.d.ts +164 -6
  151. package/dist/components/presentation/auth/SignUp/BaseSignUp.d.ts.map +1 -1
  152. package/dist/components/presentation/auth/SignUp/BaseSignUp.js +691 -10
  153. package/dist/components/presentation/auth/SignUp/BaseSignUp.js.map +1 -1
  154. package/dist/components/presentation/auth/SignUp/SignUp.d.ts +15 -74
  155. package/dist/components/presentation/auth/SignUp/SignUp.d.ts.map +1 -1
  156. package/dist/components/presentation/auth/SignUp/SignUp.js +67 -77
  157. package/dist/components/presentation/auth/SignUp/SignUp.js.map +1 -1
  158. package/dist/components/primitives/Alert/Alert.js +1 -1
  159. package/dist/components/primitives/Checkbox/Checkbox.js +1 -1
  160. package/dist/components/primitives/FormControl/FormControl.js +1 -1
  161. package/dist/components/primitives/Toggle/Toggle.js +1 -1
  162. package/dist/contexts/ComponentRenderer/ComponentRendererContext.d.ts +1 -1
  163. package/dist/contexts/ComponentRenderer/ComponentRendererContext.d.ts.map +1 -1
  164. package/dist/contexts/ComponentRenderer/ComponentRendererContext.js.map +1 -1
  165. package/dist/contexts/FlowMeta/FlowMetaProvider.d.ts.map +1 -1
  166. package/dist/contexts/FlowMeta/FlowMetaProvider.js +6 -8
  167. package/dist/contexts/FlowMeta/FlowMetaProvider.js.map +1 -1
  168. package/dist/contexts/Theme/ThemeProvider.d.ts +19 -39
  169. package/dist/contexts/Theme/ThemeProvider.d.ts.map +1 -1
  170. package/dist/contexts/Theme/ThemeProvider.js +76 -38
  171. package/dist/contexts/Theme/ThemeProvider.js.map +1 -1
  172. package/dist/contexts/ThunderID/ThunderIDContext.d.ts +1 -2
  173. package/dist/contexts/ThunderID/ThunderIDContext.d.ts.map +1 -1
  174. package/dist/contexts/ThunderID/ThunderIDContext.js +0 -1
  175. package/dist/contexts/ThunderID/ThunderIDContext.js.map +1 -1
  176. package/dist/contexts/ThunderID/ThunderIDProvider.d.ts.map +1 -1
  177. package/dist/contexts/ThunderID/ThunderIDProvider.js +1 -4
  178. package/dist/contexts/ThunderID/ThunderIDProvider.js.map +1 -1
  179. package/dist/hooks/useOAuthCallback.d.ts.map +1 -0
  180. package/dist/hooks/{v2/useOAuthCallback.js → useOAuthCallback.js} +1 -1
  181. package/dist/hooks/useOAuthCallback.js.map +1 -0
  182. package/dist/index.d.ts +3 -9
  183. package/dist/index.d.ts.map +1 -1
  184. package/dist/index.js +28 -35
  185. package/dist/utils/buildThemeConfigFromFlowMeta.d.ts.map +1 -0
  186. package/dist/utils/{v2/buildThemeConfigFromFlowMeta.js → buildThemeConfigFromFlowMeta.js} +1 -1
  187. package/dist/utils/buildThemeConfigFromFlowMeta.js.map +1 -0
  188. package/dist/utils/{v2/flowTransformer.d.ts → flowTransformer.d.ts} +3 -3
  189. package/dist/utils/flowTransformer.d.ts.map +1 -0
  190. package/dist/utils/{v2/flowTransformer.js → flowTransformer.js} +1 -1
  191. package/dist/utils/flowTransformer.js.map +1 -0
  192. package/dist/utils/{v2/getAuthComponentHeadings.d.ts → getAuthComponentHeadings.d.ts} +1 -1
  193. package/dist/utils/getAuthComponentHeadings.d.ts.map +1 -0
  194. package/dist/utils/{v2/getAuthComponentHeadings.js → getAuthComponentHeadings.js} +1 -1
  195. package/dist/utils/getAuthComponentHeadings.js.map +1 -0
  196. package/dist/utils/passkey.d.ts.map +1 -0
  197. package/dist/utils/{v2/passkey.js → passkey.js} +1 -1
  198. package/dist/utils/passkey.js.map +1 -0
  199. package/dist/utils/{v2/resolveTranslationsInArray.d.ts → resolveTranslationsInArray.d.ts} +1 -1
  200. package/dist/utils/resolveTranslationsInArray.d.ts.map +1 -0
  201. package/dist/utils/{v2/resolveTranslationsInArray.js → resolveTranslationsInArray.js} +1 -1
  202. package/dist/utils/resolveTranslationsInArray.js.map +1 -0
  203. package/dist/utils/{v2/resolveTranslationsInObject.d.ts → resolveTranslationsInObject.d.ts} +1 -1
  204. package/dist/utils/resolveTranslationsInObject.d.ts.map +1 -0
  205. package/dist/utils/{v2/resolveTranslationsInObject.js → resolveTranslationsInObject.js} +1 -1
  206. package/dist/utils/resolveTranslationsInObject.js.map +1 -0
  207. package/package.json +10 -10
  208. package/dist/cjs/components/adapters/CheckboxInput.cjs +0 -30
  209. package/dist/cjs/components/adapters/CheckboxInput.cjs.map +0 -1
  210. package/dist/cjs/components/adapters/DateInput.cjs +0 -30
  211. package/dist/cjs/components/adapters/DateInput.cjs.map +0 -1
  212. package/dist/cjs/components/adapters/DividerComponent.cjs +0 -24
  213. package/dist/cjs/components/adapters/DividerComponent.cjs.map +0 -1
  214. package/dist/cjs/components/adapters/EmailInput.cjs +0 -30
  215. package/dist/cjs/components/adapters/EmailInput.cjs.map +0 -1
  216. package/dist/cjs/components/adapters/FormContainer.cjs +0 -36
  217. package/dist/cjs/components/adapters/FormContainer.cjs.map +0 -1
  218. package/dist/cjs/components/adapters/NumberInput.cjs +0 -30
  219. package/dist/cjs/components/adapters/NumberInput.cjs.map +0 -1
  220. package/dist/cjs/components/adapters/PasswordInput.cjs +0 -52
  221. package/dist/cjs/components/adapters/PasswordInput.cjs.map +0 -1
  222. package/dist/cjs/components/adapters/SelectInput.cjs +0 -36
  223. package/dist/cjs/components/adapters/SelectInput.cjs.map +0 -1
  224. package/dist/cjs/components/adapters/SubmitButton.cjs +0 -61
  225. package/dist/cjs/components/adapters/SubmitButton.cjs.map +0 -1
  226. package/dist/cjs/components/adapters/TelephoneInput.cjs +0 -32
  227. package/dist/cjs/components/adapters/TelephoneInput.cjs.map +0 -1
  228. package/dist/cjs/components/adapters/TextInput.cjs +0 -30
  229. package/dist/cjs/components/adapters/TextInput.cjs.map +0 -1
  230. package/dist/cjs/components/adapters/Typography.cjs +0 -60
  231. package/dist/cjs/components/adapters/Typography.cjs.map +0 -1
  232. package/dist/cjs/components/presentation/auth/AcceptInvite/v2/AcceptInvite.cjs.map +0 -1
  233. package/dist/cjs/components/presentation/auth/AcceptInvite/v2/BaseAcceptInvite.cjs.map +0 -1
  234. package/dist/cjs/components/presentation/auth/AcceptInvite/v2/BaseAcceptInvite.styles.cjs.map +0 -1
  235. package/dist/cjs/components/presentation/auth/InviteUser/v2/BaseInviteUser.cjs.map +0 -1
  236. package/dist/cjs/components/presentation/auth/InviteUser/v2/BaseInviteUser.styles.cjs.map +0 -1
  237. package/dist/cjs/components/presentation/auth/InviteUser/v2/InviteUser.cjs.map +0 -1
  238. package/dist/cjs/components/presentation/auth/OrganizationUnitPicker/v2/OrganizationUnitPicker.cjs.map +0 -1
  239. package/dist/cjs/components/presentation/auth/OrganizationUnitPicker/v2/OrganizationUnitPicker.styles.cjs.map +0 -1
  240. package/dist/cjs/components/presentation/auth/Recovery/v1/BaseRecovery.cjs +0 -293
  241. package/dist/cjs/components/presentation/auth/Recovery/v1/BaseRecovery.cjs.map +0 -1
  242. package/dist/cjs/components/presentation/auth/Recovery/v1/Recovery.cjs +0 -43
  243. package/dist/cjs/components/presentation/auth/Recovery/v1/Recovery.cjs.map +0 -1
  244. package/dist/cjs/components/presentation/auth/Recovery/v1/RecoveryOptionFactory.cjs +0 -163
  245. package/dist/cjs/components/presentation/auth/Recovery/v1/RecoveryOptionFactory.cjs.map +0 -1
  246. package/dist/cjs/components/presentation/auth/Recovery/v2/BaseRecovery.cjs +0 -378
  247. package/dist/cjs/components/presentation/auth/Recovery/v2/BaseRecovery.cjs.map +0 -1
  248. package/dist/cjs/components/presentation/auth/Recovery/v2/Recovery.cjs +0 -78
  249. package/dist/cjs/components/presentation/auth/Recovery/v2/Recovery.cjs.map +0 -1
  250. package/dist/cjs/components/presentation/auth/SignIn/v1/BaseSignIn.cjs +0 -734
  251. package/dist/cjs/components/presentation/auth/SignIn/v1/BaseSignIn.cjs.map +0 -1
  252. package/dist/cjs/components/presentation/auth/SignIn/v1/options/EmailOtp.cjs +0 -68
  253. package/dist/cjs/components/presentation/auth/SignIn/v1/options/EmailOtp.cjs.map +0 -1
  254. package/dist/cjs/components/presentation/auth/SignIn/v1/options/IdentifierFirst.cjs +0 -59
  255. package/dist/cjs/components/presentation/auth/SignIn/v1/options/IdentifierFirst.cjs.map +0 -1
  256. package/dist/cjs/components/presentation/auth/SignIn/v1/options/MultiOptionButton.cjs +0 -139
  257. package/dist/cjs/components/presentation/auth/SignIn/v1/options/MultiOptionButton.cjs.map +0 -1
  258. package/dist/cjs/components/presentation/auth/SignIn/v1/options/SignInOptionFactory.cjs +0 -147
  259. package/dist/cjs/components/presentation/auth/SignIn/v1/options/SignInOptionFactory.cjs.map +0 -1
  260. package/dist/cjs/components/presentation/auth/SignIn/v1/options/SmsOtp.cjs +0 -68
  261. package/dist/cjs/components/presentation/auth/SignIn/v1/options/SmsOtp.cjs.map +0 -1
  262. package/dist/cjs/components/presentation/auth/SignIn/v1/options/SocialButton.cjs +0 -38
  263. package/dist/cjs/components/presentation/auth/SignIn/v1/options/SocialButton.cjs.map +0 -1
  264. package/dist/cjs/components/presentation/auth/SignIn/v1/options/Totp.cjs +0 -68
  265. package/dist/cjs/components/presentation/auth/SignIn/v1/options/Totp.cjs.map +0 -1
  266. package/dist/cjs/components/presentation/auth/SignIn/v1/options/UsernamePassword.cjs +0 -60
  267. package/dist/cjs/components/presentation/auth/SignIn/v1/options/UsernamePassword.cjs.map +0 -1
  268. package/dist/cjs/components/presentation/auth/SignIn/v2/BaseSignIn.cjs +0 -330
  269. package/dist/cjs/components/presentation/auth/SignIn/v2/BaseSignIn.cjs.map +0 -1
  270. package/dist/cjs/components/presentation/auth/SignIn/v2/SignIn.cjs +0 -560
  271. package/dist/cjs/components/presentation/auth/SignIn/v2/SignIn.cjs.map +0 -1
  272. package/dist/cjs/components/presentation/auth/SignUp/v1/BaseSignUp.cjs +0 -451
  273. package/dist/cjs/components/presentation/auth/SignUp/v1/BaseSignUp.cjs.map +0 -1
  274. package/dist/cjs/components/presentation/auth/SignUp/v1/SignUp.cjs +0 -54
  275. package/dist/cjs/components/presentation/auth/SignUp/v1/SignUp.cjs.map +0 -1
  276. package/dist/cjs/components/presentation/auth/SignUp/v1/SignUpOptionFactory.cjs +0 -164
  277. package/dist/cjs/components/presentation/auth/SignUp/v1/SignUpOptionFactory.cjs.map +0 -1
  278. package/dist/cjs/components/presentation/auth/SignUp/v2/BaseSignUp.cjs +0 -656
  279. package/dist/cjs/components/presentation/auth/SignUp/v2/BaseSignUp.cjs.map +0 -1
  280. package/dist/cjs/components/presentation/auth/SignUp/v2/SignUp.cjs +0 -80
  281. package/dist/cjs/components/presentation/auth/SignUp/v2/SignUp.cjs.map +0 -1
  282. package/dist/cjs/contexts/Theme/v1/ThemeProvider.cjs +0 -190
  283. package/dist/cjs/contexts/Theme/v1/ThemeProvider.cjs.map +0 -1
  284. package/dist/cjs/contexts/Theme/v2/ThemeProvider.cjs +0 -108
  285. package/dist/cjs/contexts/Theme/v2/ThemeProvider.cjs.map +0 -1
  286. package/dist/cjs/hooks/v2/useOAuthCallback.cjs.map +0 -1
  287. package/dist/cjs/utils/v2/buildThemeConfigFromFlowMeta.cjs.map +0 -1
  288. package/dist/cjs/utils/v2/flowTransformer.cjs.map +0 -1
  289. package/dist/cjs/utils/v2/getAuthComponentHeadings.cjs.map +0 -1
  290. package/dist/cjs/utils/v2/passkey.cjs.map +0 -1
  291. package/dist/cjs/utils/v2/resolveTranslationsInArray.cjs.map +0 -1
  292. package/dist/cjs/utils/v2/resolveTranslationsInObject.cjs.map +0 -1
  293. package/dist/components/adapters/CheckboxInput.d.ts +0 -25
  294. package/dist/components/adapters/CheckboxInput.d.ts.map +0 -1
  295. package/dist/components/adapters/CheckboxInput.js +0 -28
  296. package/dist/components/adapters/CheckboxInput.js.map +0 -1
  297. package/dist/components/adapters/DateInput.d.ts +0 -25
  298. package/dist/components/adapters/DateInput.d.ts.map +0 -1
  299. package/dist/components/adapters/DateInput.js +0 -28
  300. package/dist/components/adapters/DateInput.js.map +0 -1
  301. package/dist/components/adapters/DividerComponent.d.ts +0 -25
  302. package/dist/components/adapters/DividerComponent.d.ts.map +0 -1
  303. package/dist/components/adapters/DividerComponent.js +0 -22
  304. package/dist/components/adapters/DividerComponent.js.map +0 -1
  305. package/dist/components/adapters/EmailInput.d.ts +0 -25
  306. package/dist/components/adapters/EmailInput.d.ts.map +0 -1
  307. package/dist/components/adapters/EmailInput.js +0 -28
  308. package/dist/components/adapters/EmailInput.js.map +0 -1
  309. package/dist/components/adapters/FormContainer.d.ts +0 -25
  310. package/dist/components/adapters/FormContainer.d.ts.map +0 -1
  311. package/dist/components/adapters/FormContainer.js +0 -34
  312. package/dist/components/adapters/FormContainer.js.map +0 -1
  313. package/dist/components/adapters/NumberInput.d.ts +0 -25
  314. package/dist/components/adapters/NumberInput.d.ts.map +0 -1
  315. package/dist/components/adapters/NumberInput.js +0 -28
  316. package/dist/components/adapters/NumberInput.js.map +0 -1
  317. package/dist/components/adapters/PasswordInput.d.ts +0 -25
  318. package/dist/components/adapters/PasswordInput.d.ts.map +0 -1
  319. package/dist/components/adapters/PasswordInput.js +0 -50
  320. package/dist/components/adapters/PasswordInput.js.map +0 -1
  321. package/dist/components/adapters/SelectInput.d.ts +0 -25
  322. package/dist/components/adapters/SelectInput.d.ts.map +0 -1
  323. package/dist/components/adapters/SelectInput.js +0 -34
  324. package/dist/components/adapters/SelectInput.js.map +0 -1
  325. package/dist/components/adapters/SocialButton.d.ts +0 -25
  326. package/dist/components/adapters/SocialButton.d.ts.map +0 -1
  327. package/dist/components/adapters/SubmitButton.d.ts +0 -25
  328. package/dist/components/adapters/SubmitButton.d.ts.map +0 -1
  329. package/dist/components/adapters/SubmitButton.js +0 -59
  330. package/dist/components/adapters/SubmitButton.js.map +0 -1
  331. package/dist/components/adapters/TelephoneInput.d.ts +0 -25
  332. package/dist/components/adapters/TelephoneInput.d.ts.map +0 -1
  333. package/dist/components/adapters/TelephoneInput.js +0 -30
  334. package/dist/components/adapters/TelephoneInput.js.map +0 -1
  335. package/dist/components/adapters/TextInput.d.ts +0 -25
  336. package/dist/components/adapters/TextInput.d.ts.map +0 -1
  337. package/dist/components/adapters/TextInput.js +0 -28
  338. package/dist/components/adapters/TextInput.js.map +0 -1
  339. package/dist/components/adapters/Typography.d.ts +0 -25
  340. package/dist/components/adapters/Typography.d.ts.map +0 -1
  341. package/dist/components/adapters/Typography.js +0 -58
  342. package/dist/components/adapters/Typography.js.map +0 -1
  343. package/dist/components/presentation/auth/AcceptInvite/v2/AcceptInvite.d.ts.map +0 -1
  344. package/dist/components/presentation/auth/AcceptInvite/v2/AcceptInvite.js.map +0 -1
  345. package/dist/components/presentation/auth/AcceptInvite/v2/BaseAcceptInvite.d.ts.map +0 -1
  346. package/dist/components/presentation/auth/AcceptInvite/v2/BaseAcceptInvite.js.map +0 -1
  347. package/dist/components/presentation/auth/AcceptInvite/v2/BaseAcceptInvite.styles.d.ts.map +0 -1
  348. package/dist/components/presentation/auth/AcceptInvite/v2/BaseAcceptInvite.styles.js.map +0 -1
  349. package/dist/components/presentation/auth/InviteUser/v2/BaseInviteUser.d.ts.map +0 -1
  350. package/dist/components/presentation/auth/InviteUser/v2/BaseInviteUser.js.map +0 -1
  351. package/dist/components/presentation/auth/InviteUser/v2/BaseInviteUser.styles.d.ts.map +0 -1
  352. package/dist/components/presentation/auth/InviteUser/v2/BaseInviteUser.styles.js.map +0 -1
  353. package/dist/components/presentation/auth/InviteUser/v2/InviteUser.d.ts.map +0 -1
  354. package/dist/components/presentation/auth/InviteUser/v2/InviteUser.js.map +0 -1
  355. package/dist/components/presentation/auth/OrganizationUnitPicker/v2/OrganizationUnitPicker.d.ts.map +0 -1
  356. package/dist/components/presentation/auth/OrganizationUnitPicker/v2/OrganizationUnitPicker.js.map +0 -1
  357. package/dist/components/presentation/auth/OrganizationUnitPicker/v2/OrganizationUnitPicker.styles.d.ts.map +0 -1
  358. package/dist/components/presentation/auth/OrganizationUnitPicker/v2/OrganizationUnitPicker.styles.js.map +0 -1
  359. package/dist/components/presentation/auth/Recovery/v1/BaseRecovery.d.ts +0 -74
  360. package/dist/components/presentation/auth/Recovery/v1/BaseRecovery.d.ts.map +0 -1
  361. package/dist/components/presentation/auth/Recovery/v1/BaseRecovery.js +0 -288
  362. package/dist/components/presentation/auth/Recovery/v1/BaseRecovery.js.map +0 -1
  363. package/dist/components/presentation/auth/Recovery/v1/Recovery.d.ts +0 -26
  364. package/dist/components/presentation/auth/Recovery/v1/Recovery.d.ts.map +0 -1
  365. package/dist/components/presentation/auth/Recovery/v1/Recovery.js +0 -40
  366. package/dist/components/presentation/auth/Recovery/v1/Recovery.js.map +0 -1
  367. package/dist/components/presentation/auth/Recovery/v1/RecoveryOptionFactory.d.ts +0 -46
  368. package/dist/components/presentation/auth/Recovery/v1/RecoveryOptionFactory.d.ts.map +0 -1
  369. package/dist/components/presentation/auth/Recovery/v1/RecoveryOptionFactory.js +0 -160
  370. package/dist/components/presentation/auth/Recovery/v1/RecoveryOptionFactory.js.map +0 -1
  371. package/dist/components/presentation/auth/Recovery/v2/BaseRecovery.d.ts +0 -83
  372. package/dist/components/presentation/auth/Recovery/v2/BaseRecovery.d.ts.map +0 -1
  373. package/dist/components/presentation/auth/Recovery/v2/BaseRecovery.js +0 -373
  374. package/dist/components/presentation/auth/Recovery/v2/BaseRecovery.js.map +0 -1
  375. package/dist/components/presentation/auth/Recovery/v2/Recovery.d.ts +0 -56
  376. package/dist/components/presentation/auth/Recovery/v2/Recovery.d.ts.map +0 -1
  377. package/dist/components/presentation/auth/Recovery/v2/Recovery.js +0 -74
  378. package/dist/components/presentation/auth/Recovery/v2/Recovery.js.map +0 -1
  379. package/dist/components/presentation/auth/SignIn/v1/BaseSignIn.d.ts +0 -131
  380. package/dist/components/presentation/auth/SignIn/v1/BaseSignIn.d.ts.map +0 -1
  381. package/dist/components/presentation/auth/SignIn/v1/BaseSignIn.js +0 -729
  382. package/dist/components/presentation/auth/SignIn/v1/BaseSignIn.js.map +0 -1
  383. package/dist/components/presentation/auth/SignIn/v1/options/EmailOtp.d.ts +0 -26
  384. package/dist/components/presentation/auth/SignIn/v1/options/EmailOtp.d.ts.map +0 -1
  385. package/dist/components/presentation/auth/SignIn/v1/options/EmailOtp.js +0 -64
  386. package/dist/components/presentation/auth/SignIn/v1/options/EmailOtp.js.map +0 -1
  387. package/dist/components/presentation/auth/SignIn/v1/options/IdentifierFirst.d.ts +0 -26
  388. package/dist/components/presentation/auth/SignIn/v1/options/IdentifierFirst.d.ts.map +0 -1
  389. package/dist/components/presentation/auth/SignIn/v1/options/IdentifierFirst.js +0 -55
  390. package/dist/components/presentation/auth/SignIn/v1/options/IdentifierFirst.js.map +0 -1
  391. package/dist/components/presentation/auth/SignIn/v1/options/MultiOptionButton.d.ts +0 -27
  392. package/dist/components/presentation/auth/SignIn/v1/options/MultiOptionButton.d.ts.map +0 -1
  393. package/dist/components/presentation/auth/SignIn/v1/options/MultiOptionButton.js +0 -136
  394. package/dist/components/presentation/auth/SignIn/v1/options/MultiOptionButton.js.map +0 -1
  395. package/dist/components/presentation/auth/SignIn/v1/options/SignInOptionFactory.d.ts +0 -77
  396. package/dist/components/presentation/auth/SignIn/v1/options/SignInOptionFactory.d.ts.map +0 -1
  397. package/dist/components/presentation/auth/SignIn/v1/options/SignInOptionFactory.js +0 -143
  398. package/dist/components/presentation/auth/SignIn/v1/options/SignInOptionFactory.js.map +0 -1
  399. package/dist/components/presentation/auth/SignIn/v1/options/SmsOtp.d.ts +0 -26
  400. package/dist/components/presentation/auth/SignIn/v1/options/SmsOtp.d.ts.map +0 -1
  401. package/dist/components/presentation/auth/SignIn/v1/options/SmsOtp.js +0 -64
  402. package/dist/components/presentation/auth/SignIn/v1/options/SmsOtp.js.map +0 -1
  403. package/dist/components/presentation/auth/SignIn/v1/options/SocialButton.d.ts +0 -26
  404. package/dist/components/presentation/auth/SignIn/v1/options/SocialButton.d.ts.map +0 -1
  405. package/dist/components/presentation/auth/SignIn/v1/options/SocialButton.js +0 -36
  406. package/dist/components/presentation/auth/SignIn/v1/options/SocialButton.js.map +0 -1
  407. package/dist/components/presentation/auth/SignIn/v1/options/Totp.d.ts +0 -26
  408. package/dist/components/presentation/auth/SignIn/v1/options/Totp.d.ts.map +0 -1
  409. package/dist/components/presentation/auth/SignIn/v1/options/Totp.js +0 -64
  410. package/dist/components/presentation/auth/SignIn/v1/options/Totp.js.map +0 -1
  411. package/dist/components/presentation/auth/SignIn/v1/options/UsernamePassword.d.ts +0 -26
  412. package/dist/components/presentation/auth/SignIn/v1/options/UsernamePassword.d.ts.map +0 -1
  413. package/dist/components/presentation/auth/SignIn/v1/options/UsernamePassword.js +0 -56
  414. package/dist/components/presentation/auth/SignIn/v1/options/UsernamePassword.js.map +0 -1
  415. package/dist/components/presentation/auth/SignIn/v1/types.d.ts +0 -125
  416. package/dist/components/presentation/auth/SignIn/v1/types.d.ts.map +0 -1
  417. package/dist/components/presentation/auth/SignIn/v2/BaseSignIn.d.ts +0 -222
  418. package/dist/components/presentation/auth/SignIn/v2/BaseSignIn.d.ts.map +0 -1
  419. package/dist/components/presentation/auth/SignIn/v2/BaseSignIn.js +0 -325
  420. package/dist/components/presentation/auth/SignIn/v2/BaseSignIn.js.map +0 -1
  421. package/dist/components/presentation/auth/SignIn/v2/SignIn.d.ts +0 -165
  422. package/dist/components/presentation/auth/SignIn/v2/SignIn.d.ts.map +0 -1
  423. package/dist/components/presentation/auth/SignIn/v2/SignIn.js +0 -556
  424. package/dist/components/presentation/auth/SignIn/v2/SignIn.js.map +0 -1
  425. package/dist/components/presentation/auth/SignUp/v1/BaseSignUp.d.ts +0 -174
  426. package/dist/components/presentation/auth/SignUp/v1/BaseSignUp.d.ts.map +0 -1
  427. package/dist/components/presentation/auth/SignUp/v1/BaseSignUp.js +0 -446
  428. package/dist/components/presentation/auth/SignUp/v1/BaseSignUp.js.map +0 -1
  429. package/dist/components/presentation/auth/SignUp/v1/SignUp.d.ts +0 -39
  430. package/dist/components/presentation/auth/SignUp/v1/SignUp.d.ts.map +0 -1
  431. package/dist/components/presentation/auth/SignUp/v1/SignUp.js +0 -51
  432. package/dist/components/presentation/auth/SignUp/v1/SignUp.js.map +0 -1
  433. package/dist/components/presentation/auth/SignUp/v1/SignUpOptionFactory.d.ts +0 -46
  434. package/dist/components/presentation/auth/SignUp/v1/SignUpOptionFactory.d.ts.map +0 -1
  435. package/dist/components/presentation/auth/SignUp/v1/SignUpOptionFactory.js +0 -160
  436. package/dist/components/presentation/auth/SignUp/v1/SignUpOptionFactory.js.map +0 -1
  437. package/dist/components/presentation/auth/SignUp/v2/BaseSignUp.d.ts +0 -186
  438. package/dist/components/presentation/auth/SignUp/v2/BaseSignUp.d.ts.map +0 -1
  439. package/dist/components/presentation/auth/SignUp/v2/BaseSignUp.js +0 -651
  440. package/dist/components/presentation/auth/SignUp/v2/BaseSignUp.js.map +0 -1
  441. package/dist/components/presentation/auth/SignUp/v2/SignUp.d.ts +0 -39
  442. package/dist/components/presentation/auth/SignUp/v2/SignUp.d.ts.map +0 -1
  443. package/dist/components/presentation/auth/SignUp/v2/SignUp.js +0 -77
  444. package/dist/components/presentation/auth/SignUp/v2/SignUp.js.map +0 -1
  445. package/dist/contexts/Theme/v1/ThemeProvider.d.ts +0 -89
  446. package/dist/contexts/Theme/v1/ThemeProvider.d.ts.map +0 -1
  447. package/dist/contexts/Theme/v1/ThemeProvider.js +0 -186
  448. package/dist/contexts/Theme/v1/ThemeProvider.js.map +0 -1
  449. package/dist/contexts/Theme/v2/ThemeProvider.d.ts +0 -58
  450. package/dist/contexts/Theme/v2/ThemeProvider.d.ts.map +0 -1
  451. package/dist/contexts/Theme/v2/ThemeProvider.js +0 -104
  452. package/dist/contexts/Theme/v2/ThemeProvider.js.map +0 -1
  453. package/dist/hooks/v2/useOAuthCallback.d.ts.map +0 -1
  454. package/dist/hooks/v2/useOAuthCallback.js.map +0 -1
  455. package/dist/utils/v2/buildThemeConfigFromFlowMeta.d.ts.map +0 -1
  456. package/dist/utils/v2/buildThemeConfigFromFlowMeta.js.map +0 -1
  457. package/dist/utils/v2/flowTransformer.d.ts.map +0 -1
  458. package/dist/utils/v2/flowTransformer.js.map +0 -1
  459. package/dist/utils/v2/getAuthComponentHeadings.d.ts.map +0 -1
  460. package/dist/utils/v2/getAuthComponentHeadings.js.map +0 -1
  461. package/dist/utils/v2/passkey.d.ts.map +0 -1
  462. package/dist/utils/v2/passkey.js.map +0 -1
  463. package/dist/utils/v2/resolveTranslationsInArray.d.ts.map +0 -1
  464. package/dist/utils/v2/resolveTranslationsInArray.js.map +0 -1
  465. package/dist/utils/v2/resolveTranslationsInObject.d.ts.map +0 -1
  466. package/dist/utils/v2/resolveTranslationsInObject.js.map +0 -1
  467. /package/dist/components/presentation/auth/AcceptInvite/{v2/AcceptInvite.d.ts → AcceptInvite.d.ts} +0 -0
  468. /package/dist/components/presentation/auth/AcceptInvite/{v2/BaseAcceptInvite.styles.d.ts → BaseAcceptInvite.styles.d.ts} +0 -0
  469. /package/dist/components/presentation/auth/InviteUser/{v2/BaseInviteUser.styles.d.ts → BaseInviteUser.styles.d.ts} +0 -0
  470. /package/dist/components/presentation/auth/InviteUser/{v2/InviteUser.d.ts → InviteUser.d.ts} +0 -0
  471. /package/dist/components/presentation/auth/OrganizationUnitPicker/{v2/OrganizationUnitPicker.d.ts → OrganizationUnitPicker.d.ts} +0 -0
  472. /package/dist/components/presentation/auth/OrganizationUnitPicker/{v2/OrganizationUnitPicker.styles.d.ts → OrganizationUnitPicker.styles.d.ts} +0 -0
  473. /package/dist/hooks/{v2/useOAuthCallback.d.ts → useOAuthCallback.d.ts} +0 -0
  474. /package/dist/utils/{v2/buildThemeConfigFromFlowMeta.d.ts → buildThemeConfigFromFlowMeta.d.ts} +0 -0
  475. /package/dist/utils/{v2/passkey.d.ts → passkey.d.ts} +0 -0
@@ -1,20 +1,401 @@
1
1
  const require_rolldown_runtime = require('../../../../_virtual/rolldown_runtime.cjs');
2
+ const require_ComponentRendererContext = require('../../../../contexts/ComponentRenderer/ComponentRendererContext.cjs');
3
+ const require_FlowProvider = require('../../../../contexts/Flow/FlowProvider.cjs');
2
4
  const require_useThunderID = require('../../../../contexts/ThunderID/useThunderID.cjs');
3
- const require_BaseRecovery = require('./v1/BaseRecovery.cjs');
4
- const require_BaseRecovery$1 = require('./v2/BaseRecovery.cjs');
5
+ const require_useFlow = require('../../../../contexts/Flow/useFlow.cjs');
6
+ const require_useTheme = require('../../../../contexts/Theme/useTheme.cjs');
7
+ const require_ComponentPreferencesContext = require('../../../../contexts/I18n/ComponentPreferencesContext.cjs');
8
+ const require_useTranslation = require('../../../../hooks/useTranslation.cjs');
9
+ const require_useForm = require('../../../../hooks/useForm.cjs');
10
+ const require_Spinner = require('../../../primitives/Spinner/Spinner.cjs');
11
+ const require_flowTransformer = require('../../../../utils/flowTransformer.cjs');
12
+ const require_Typography = require('../../../primitives/Typography/Typography.cjs');
13
+ const require_Alert = require('../../../primitives/Alert/Alert.cjs');
14
+ const require_Card = require('../../../primitives/Card/Card.cjs');
15
+ const require_AuthOptionFactory = require('../AuthOptionFactory.cjs');
16
+ const require_BaseSignUp_styles = require('../SignUp/BaseSignUp.styles.cjs');
17
+ const require_getAuthComponentHeadings = require('../../../../utils/getAuthComponentHeadings.cjs');
18
+ const require_Logo = require('../../../primitives/Logo/Logo.cjs');
5
19
  let __thunderid_browser = require("@thunderid/browser");
6
20
  __thunderid_browser = require_rolldown_runtime.__toESM(__thunderid_browser);
21
+ let react = require("react");
22
+ react = require_rolldown_runtime.__toESM(react);
7
23
  let react_jsx_runtime = require("react/jsx-runtime");
8
24
  react_jsx_runtime = require_rolldown_runtime.__toESM(react_jsx_runtime);
25
+ let __emotion_css = require("@emotion/css");
26
+ __emotion_css = require_rolldown_runtime.__toESM(__emotion_css);
9
27
 
10
28
  //#region src/components/presentation/auth/Recovery/BaseRecovery.tsx
11
- const BaseRecovery = (props) => {
12
- const { platform } = require_useThunderID.default();
13
- if (platform === __thunderid_browser.Platform.ThunderID) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_BaseRecovery$1.default, { ...props });
14
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_BaseRecovery.default, { ...props });
29
+ /**
30
+ * Internal component that renders the V2 recovery UI and manages flow state.
31
+ *
32
+ * @internal
33
+ */
34
+ const BaseRecoveryContent = ({ onInitialize, onSubmit, onError, onFlowChange, onComplete, error: externalError, className = "", inputClassName = "", buttonClassName = "", errorClassName = "", messageClassName = "", size = "medium", variant = "outlined", isInitialized, children, showTitle = true, showSubtitle = true }) => {
35
+ const { theme, colorScheme } = require_useTheme.default();
36
+ const customRenderers = (0, react.useContext)(require_ComponentRendererContext.default);
37
+ const { t } = require_useTranslation.default();
38
+ const { subtitle: flowSubtitle, title: flowTitle, messages: flowMessages, addMessage, clearMessages } = require_useFlow.default();
39
+ const { meta } = require_useThunderID.default();
40
+ const styles = require_BaseSignUp_styles.default(theme, colorScheme);
41
+ const [isLoading, setIsLoading] = (0, react.useState)(false);
42
+ const [isFlowInitialized, setIsFlowInitialized] = (0, react.useState)(false);
43
+ const [currentFlow, setCurrentFlow] = (0, react.useState)(null);
44
+ const [apiError, setApiError] = (0, react.useState)(null);
45
+ const initializationAttemptedRef = (0, react.useRef)(false);
46
+ const challengeTokenRef = (0, react.useRef)(null);
47
+ const handleError = (0, react.useCallback)((error) => {
48
+ const errorMessage = require_flowTransformer.extractErrorMessage(error, t);
49
+ setApiError(error instanceof Error ? error : new Error(errorMessage));
50
+ clearMessages();
51
+ addMessage({
52
+ message: errorMessage,
53
+ type: "error"
54
+ });
55
+ }, [
56
+ t,
57
+ addMessage,
58
+ clearMessages
59
+ ]);
60
+ const normalizeFlowResponseLocal = (0, react.useCallback)((response) => {
61
+ if (response?.data?.components && Array.isArray(response.data.components)) return response;
62
+ if (response?.data) {
63
+ const { components } = require_flowTransformer.normalizeFlowResponse(response, t, {
64
+ defaultErrorKey: "components.recovery.errors.generic",
65
+ resolveTranslations: false
66
+ }, meta);
67
+ return {
68
+ ...response,
69
+ data: {
70
+ ...response.data,
71
+ components
72
+ }
73
+ };
74
+ }
75
+ return response;
76
+ }, [t, meta]);
77
+ const extractFormFields = (0, react.useCallback)((components) => {
78
+ const fields = [];
79
+ const processComponents = (comps) => {
80
+ comps.forEach((component) => {
81
+ if (component.type === __thunderid_browser.EmbeddedFlowComponentType.TextInput || component.type === __thunderid_browser.EmbeddedFlowComponentType.PasswordInput || component.type === __thunderid_browser.EmbeddedFlowComponentType.EmailInput || component.type === __thunderid_browser.EmbeddedFlowComponentType.Select || component.type === __thunderid_browser.EmbeddedFlowComponentType.DateInput) {
82
+ const fieldName = component.ref || component.id;
83
+ const ruleValidator = (0, __thunderid_browser.buildValidatorFromRules)(component.validation);
84
+ fields.push({
85
+ initialValue: "",
86
+ name: fieldName,
87
+ required: component.required || false,
88
+ validator: (value) => {
89
+ if (component.required && (!value || value.trim() === "")) return t("validations.required.field.error");
90
+ if ((component.type === __thunderid_browser.EmbeddedFlowComponentType.EmailInput || component.variant === "EMAIL") && value && !/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(value)) return t("field.email.invalid");
91
+ if (ruleValidator && value) {
92
+ const ruleMessage = ruleValidator(value);
93
+ if (ruleMessage) return t(ruleMessage);
94
+ }
95
+ return null;
96
+ }
97
+ });
98
+ }
99
+ if (component.components && Array.isArray(component.components)) processComponents(component.components);
100
+ });
101
+ };
102
+ processComponents(components);
103
+ return fields;
104
+ }, [t]);
105
+ const { values: formValues, touched: touchedFields, errors: formErrors, isValid: isFormValid, setValue: setFormValue, setTouched: setFormTouched, setErrors: setFormErrors, clearErrors: clearFormErrors, validateForm, touchAllFields, reset: resetForm } = require_useForm.useForm({
106
+ fields: currentFlow?.data?.components ? extractFormFields(currentFlow.data.components) : [],
107
+ initialValues: {},
108
+ requiredMessage: t("validations.required.field.error"),
109
+ validateOnBlur: true,
110
+ validateOnChange: false
111
+ });
112
+ /**
113
+ * Project server-side validation errors from the most recent flow response into the
114
+ * form's `errors` state. See BaseSignIn for the same pattern.
115
+ */
116
+ (0, react.useEffect)(() => {
117
+ clearFormErrors();
118
+ const responseFieldErrors = (currentFlow?.data)?.fieldErrors;
119
+ if (!responseFieldErrors || responseFieldErrors.length === 0) return;
120
+ const errors = {};
121
+ for (const fe of responseFieldErrors) if (!(fe.identifier in errors)) errors[fe.identifier] = fe.message;
122
+ setFormErrors(errors);
123
+ Object.keys(errors).forEach((field) => setFormTouched(field, true));
124
+ }, [
125
+ currentFlow,
126
+ setFormErrors,
127
+ setFormTouched,
128
+ clearFormErrors
129
+ ]);
130
+ const setupFormFields = (0, react.useCallback)((flowResponse) => {
131
+ const fields = extractFormFields(flowResponse.data?.components || []);
132
+ const initialValues = {};
133
+ fields.forEach((field) => {
134
+ initialValues[field.name] = field.initialValue || "";
135
+ });
136
+ resetForm();
137
+ Object.keys(initialValues).forEach((key) => setFormValue(key, initialValues[key]));
138
+ }, [
139
+ extractFormFields,
140
+ resetForm,
141
+ setFormValue
142
+ ]);
143
+ const handleInputChange = (name, value) => {
144
+ setFormValue(name, value);
145
+ };
146
+ const handleInputBlur = (name) => {
147
+ setFormTouched(name, true);
148
+ };
149
+ const handleSubmit = async (component, data, skipValidation) => {
150
+ if (!currentFlow) return;
151
+ if (!skipValidation) {
152
+ touchAllFields();
153
+ if (!validateForm().isValid) return;
154
+ }
155
+ setIsLoading(true);
156
+ setApiError(null);
157
+ clearMessages();
158
+ try {
159
+ const filteredInputs = {};
160
+ if (data) Object.entries(data).forEach(([key, value]) => {
161
+ if (value !== null && value !== void 0 && value !== "") filteredInputs[key] = value;
162
+ });
163
+ const payload = {
164
+ ...currentFlow.executionId && { executionId: currentFlow.executionId },
165
+ ...component.id && { action: component.id },
166
+ ...challengeTokenRef.current ? { challengeToken: challengeTokenRef.current } : {},
167
+ inputs: filteredInputs
168
+ };
169
+ const rawResponse = await onSubmit?.(payload);
170
+ if (!rawResponse) return;
171
+ const response = normalizeFlowResponseLocal(rawResponse);
172
+ onFlowChange?.(response);
173
+ if (response.challengeToken !== void 0) challengeTokenRef.current = response.challengeToken ?? null;
174
+ if (response.flowStatus === __thunderid_browser.EmbeddedRecoveryFlowStatus.Error) {
175
+ handleError(response);
176
+ onError?.(new Error(require_flowTransformer.extractErrorMessage(response, t)));
177
+ return;
178
+ }
179
+ if (response.flowStatus === __thunderid_browser.EmbeddedRecoveryFlowStatus.Complete) {
180
+ onComplete?.(response);
181
+ return;
182
+ }
183
+ if (response.flowStatus === __thunderid_browser.EmbeddedRecoveryFlowStatus.Incomplete) {
184
+ setCurrentFlow(response);
185
+ setupFormFields(response);
186
+ if (response?.error) handleError(response);
187
+ }
188
+ } catch (err) {
189
+ handleError(err);
190
+ onError?.(err);
191
+ } finally {
192
+ setIsLoading(false);
193
+ }
194
+ };
195
+ const containerClasses = (0, __emotion_css.cx)([
196
+ (0, __thunderid_browser.withVendorCSSClassPrefix)("recovery"),
197
+ (0, __thunderid_browser.withVendorCSSClassPrefix)(`recovery--${size}`),
198
+ (0, __thunderid_browser.withVendorCSSClassPrefix)(`recovery--${variant}`)
199
+ ], className);
200
+ const inputClasses = (0, __emotion_css.cx)([
201
+ (0, __thunderid_browser.withVendorCSSClassPrefix)("recovery__input"),
202
+ size === "small" && (0, __thunderid_browser.withVendorCSSClassPrefix)("recovery__input--small"),
203
+ size === "large" && (0, __thunderid_browser.withVendorCSSClassPrefix)("recovery__input--large")
204
+ ], inputClassName);
205
+ const buttonClasses = (0, __emotion_css.cx)([
206
+ (0, __thunderid_browser.withVendorCSSClassPrefix)("recovery__button"),
207
+ size === "small" && (0, __thunderid_browser.withVendorCSSClassPrefix)("recovery__button--small"),
208
+ size === "large" && (0, __thunderid_browser.withVendorCSSClassPrefix)("recovery__button--large")
209
+ ], buttonClassName);
210
+ const errorClasses = (0, __emotion_css.cx)([(0, __thunderid_browser.withVendorCSSClassPrefix)("recovery__error")], errorClassName);
211
+ const messageClasses = (0, __emotion_css.cx)([(0, __thunderid_browser.withVendorCSSClassPrefix)("recovery__messages")], messageClassName);
212
+ const renderComponents = (0, react.useCallback)((components) => require_AuthOptionFactory.renderRecoveryComponents(components, formValues, touchedFields, formErrors, isLoading, isFormValid, handleInputChange, {
213
+ _customRenderers: customRenderers,
214
+ _theme: theme,
215
+ buttonClassName: buttonClasses,
216
+ inputClassName: inputClasses,
217
+ meta,
218
+ onInputBlur: handleInputBlur,
219
+ onSubmit: handleSubmit,
220
+ size,
221
+ variant
222
+ }), [
223
+ customRenderers,
224
+ buttonClasses,
225
+ formErrors,
226
+ formValues,
227
+ handleInputBlur,
228
+ handleSubmit,
229
+ inputClasses,
230
+ isFormValid,
231
+ meta,
232
+ isLoading,
233
+ size,
234
+ theme,
235
+ touchedFields,
236
+ variant
237
+ ]);
238
+ (0, react.useEffect)(() => {
239
+ if (isInitialized && !isFlowInitialized && !initializationAttemptedRef.current) {
240
+ initializationAttemptedRef.current = true;
241
+ (async () => {
242
+ setIsLoading(true);
243
+ setApiError(null);
244
+ clearMessages();
245
+ try {
246
+ const rawResponse = await onInitialize?.();
247
+ if (!rawResponse) return;
248
+ const response = normalizeFlowResponseLocal(rawResponse);
249
+ if (response.challengeToken !== void 0) challengeTokenRef.current = response.challengeToken ?? null;
250
+ if (response.flowStatus === __thunderid_browser.EmbeddedRecoveryFlowStatus.Error) {
251
+ handleError(response);
252
+ onError?.(new Error(require_flowTransformer.extractErrorMessage(response, t)));
253
+ }
254
+ setCurrentFlow(response);
255
+ setIsFlowInitialized(true);
256
+ onFlowChange?.(response);
257
+ if (response.flowStatus === __thunderid_browser.EmbeddedRecoveryFlowStatus.Complete) {
258
+ onComplete?.(response);
259
+ return;
260
+ }
261
+ if (response.flowStatus === __thunderid_browser.EmbeddedRecoveryFlowStatus.Incomplete) {
262
+ setupFormFields(response);
263
+ if (response?.error) handleError(response);
264
+ }
265
+ } catch (err) {
266
+ handleError(err);
267
+ onError?.(err);
268
+ } finally {
269
+ setIsLoading(false);
270
+ }
271
+ })();
272
+ }
273
+ }, [
274
+ isFlowInitialized,
275
+ isInitialized,
276
+ normalizeFlowResponseLocal,
277
+ onComplete,
278
+ onError,
279
+ onFlowChange,
280
+ onInitialize,
281
+ setupFormFields,
282
+ t
283
+ ]);
284
+ if (children) {
285
+ if (typeof children === "function") return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
286
+ className: containerClasses,
287
+ children: children({
288
+ components: currentFlow?.data?.components || [],
289
+ error: apiError,
290
+ fieldErrors: formErrors,
291
+ handleInputChange,
292
+ handleSubmit,
293
+ isLoading,
294
+ isValid: isFormValid,
295
+ messages: flowMessages || [],
296
+ meta,
297
+ subtitle: flowSubtitle || t("recovery.subheading"),
298
+ title: flowTitle || t("recovery.heading"),
299
+ touched: touchedFields,
300
+ validateForm: () => {
301
+ const result = validateForm();
302
+ return {
303
+ fieldErrors: result.errors,
304
+ isValid: result.isValid
305
+ };
306
+ },
307
+ values: formValues
308
+ })
309
+ });
310
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
311
+ className: containerClasses,
312
+ children
313
+ });
314
+ }
315
+ if (!isFlowInitialized && isLoading) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Card.default, {
316
+ className: (0, __emotion_css.cx)(containerClasses, styles.card),
317
+ variant,
318
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Card.default.Content, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
319
+ className: styles.loadingContainer,
320
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Spinner.default, { size: "medium" })
321
+ }) })
322
+ });
323
+ if (!currentFlow) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Card.default, {
324
+ className: (0, __emotion_css.cx)(containerClasses, styles.card),
325
+ variant,
326
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Card.default.Content, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_Alert.default, {
327
+ variant: "error",
328
+ className: errorClasses,
329
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Alert.default.Title, { children: t("errors.heading") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Alert.default.Description, { children: t("errors.recovery.flow.initialization.failure") })]
330
+ }) })
331
+ });
332
+ const { title, subtitle, componentsWithoutHeadings } = require_getAuthComponentHeadings.default(currentFlow.data?.components || [], flowTitle, flowSubtitle, t("recovery.heading"), t("recovery.subheading"));
333
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_Card.default, {
334
+ className: (0, __emotion_css.cx)(containerClasses, styles.card),
335
+ variant,
336
+ children: [(showTitle || showSubtitle) && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_Card.default.Header, {
337
+ className: styles.header,
338
+ children: [showTitle && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Card.default.Title, {
339
+ level: 2,
340
+ className: styles.title,
341
+ children: title
342
+ }), showSubtitle && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Typography.default, {
343
+ variant: "body1",
344
+ className: styles.subtitle,
345
+ children: subtitle
346
+ })]
347
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_Card.default.Content, { children: [
348
+ externalError && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
349
+ className: styles.flowMessagesContainer,
350
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Alert.default, {
351
+ variant: "error",
352
+ className: (0, __emotion_css.cx)(styles.flowMessageItem, messageClasses),
353
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Alert.default.Description, { children: externalError.message })
354
+ })
355
+ }),
356
+ flowMessages && flowMessages.length > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
357
+ className: styles.flowMessagesContainer,
358
+ children: flowMessages.map((message, index) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Alert.default, {
359
+ variant: message.type?.toLowerCase() === "error" ? "error" : "info",
360
+ className: (0, __emotion_css.cx)(styles.flowMessageItem, messageClasses),
361
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Alert.default.Description, { children: message.message })
362
+ }, message.id || index))
363
+ }),
364
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
365
+ className: styles.contentContainer,
366
+ children: componentsWithoutHeadings && componentsWithoutHeadings.length > 0 ? renderComponents(componentsWithoutHeadings) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Alert.default, {
367
+ variant: "warning",
368
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Typography.default, {
369
+ variant: "body1",
370
+ children: t("errors.recovery.components.not.available")
371
+ })
372
+ })
373
+ })
374
+ ] })]
375
+ });
15
376
  };
16
- var BaseRecovery_default$2 = BaseRecovery;
377
+ /**
378
+ * BaseRecovery component for ThunderIDV2 that provides an embedded account/password recovery flow.
379
+ * Accepts API functions as props to maintain framework independence.
380
+ */
381
+ const BaseRecovery = ({ preferences, showLogo = true,...rest }) => {
382
+ const { theme, colorScheme } = require_useTheme.default();
383
+ const styles = require_BaseSignUp_styles.default(theme, colorScheme);
384
+ const content = /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [showLogo && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
385
+ className: styles.logoContainer,
386
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Logo.default, { size: "large" })
387
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_FlowProvider.default, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(BaseRecoveryContent, {
388
+ showLogo,
389
+ ...rest
390
+ }) })] });
391
+ if (!preferences) return content;
392
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ComponentPreferencesContext.default.Provider, {
393
+ value: preferences,
394
+ children: content
395
+ });
396
+ };
397
+ var BaseRecovery_default = BaseRecovery;
17
398
 
18
399
  //#endregion
19
- exports.default = BaseRecovery_default$2;
400
+ exports.default = BaseRecovery_default;
20
401
  //# sourceMappingURL=BaseRecovery.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"BaseRecovery.cjs","names":["BaseRecovery: FC<BaseRecoveryProps>","useThunderID","Platform","BaseRecoveryV2","BaseRecoveryV1"],"sources":["../../../../../../src/components/presentation/auth/Recovery/BaseRecovery.tsx"],"sourcesContent":["/**\n * Copyright (c) 2026, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {Platform} from '@thunderid/browser';\nimport {FC} from 'react';\nimport BaseRecoveryV1, {BaseRecoveryProps as BaseRecoveryV1Props} from './v1/BaseRecovery';\nimport BaseRecoveryV2, {BaseRecoveryProps as BaseRecoveryV2Props} from './v2/BaseRecovery';\nimport useThunderID from '../../../../contexts/ThunderID/useThunderID';\n\nexport type BaseRecoveryProps = BaseRecoveryV1Props | BaseRecoveryV2Props;\n\nconst BaseRecovery: FC<BaseRecoveryProps> = (props: BaseRecoveryProps) => {\n const {platform} = useThunderID();\n\n if (platform === Platform.ThunderID) {\n return <BaseRecoveryV2 {...(props as BaseRecoveryV2Props)} />;\n }\n\n return <BaseRecoveryV1 {...(props as BaseRecoveryV1Props)} />;\n};\n\nexport default BaseRecovery;\n"],"mappings":";;;;;;;;;;AA0BA,MAAMA,gBAAuC,UAA6B;CACxE,MAAM,EAAC,aAAYC,8BAAc;AAEjC,KAAI,aAAaC,6BAAS,UACxB,QAAO,2CAACC,kCAAe,GAAK,QAAiC;AAG/D,QAAO,2CAACC,gCAAe,GAAK,QAAiC;;AAG/D,6BAAe"}
1
+ {"version":3,"file":"BaseRecovery.cjs","names":["BaseRecoveryContent: FC<BaseRecoveryProps>","useTheme","customRenderers: ComponentRendererMap","ComponentRendererContext","useTranslation","useFlow","useThunderID","styles: any","useStyles","initializationAttemptedRef: any","challengeTokenRef: any","handleError: any","errorMessage: string","extractErrorMessage","normalizeFlowResponseLocal: any","normalizeFlowResponse","extractFormFields: any","fields: FormField[]","EmbeddedFlowComponentType","fieldName: any","useForm","responseFieldErrors: FieldError[] | undefined","errors: Record<string, string>","setupFormFields: any","fields: any","initialValues: Record<string, string>","filteredInputs: Record<string, any>","payload: EmbeddedRecoveryFlowRequest","rawResponse: any","response: any","EmbeddedRecoveryFlowStatus","containerClasses: any","inputClasses: any","buttonClasses: any","errorClasses: any","messageClasses: any","renderComponents: any","renderRecoveryComponents","result: ReturnType<typeof validateForm>","CardPrimitive","Spinner","AlertPrimitive","getAuthComponentHeadings","Typography","BaseRecovery: FC<BaseRecoveryProps>","content: ReactElement","Logo","FlowProvider","ComponentPreferencesContext"],"sources":["../../../../../../src/components/presentation/auth/Recovery/BaseRecovery.tsx"],"sourcesContent":["/**\n * Copyright (c) 2026, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {cx} from '@emotion/css';\nimport {\n EmbeddedRecoveryFlowRequest,\n EmbeddedRecoveryFlowResponse,\n EmbeddedRecoveryFlowStatus,\n EmbeddedFlowComponentType,\n FieldError,\n withVendorCSSClassPrefix,\n buildValidatorFromRules,\n Preferences,\n FlowMetadataResponse,\n} from '@thunderid/browser';\nimport {FC, ReactElement, ReactNode, useContext, useEffect, useState, useCallback, useRef} from 'react';\nimport ComponentRendererContext, {\n ComponentRendererMap,\n} from '../../../../contexts/ComponentRenderer/ComponentRendererContext';\nimport FlowProvider from '../../../../contexts/Flow/FlowProvider';\nimport useFlow from '../../../../contexts/Flow/useFlow';\nimport ComponentPreferencesContext from '../../../../contexts/I18n/ComponentPreferencesContext';\nimport useTheme from '../../../../contexts/Theme/useTheme';\nimport useThunderID from '../../../../contexts/ThunderID/useThunderID';\nimport {useForm, FormField} from '../../../../hooks/useForm';\nimport useTranslation from '../../../../hooks/useTranslation';\nimport {normalizeFlowResponse, extractErrorMessage} from '../../../../utils/flowTransformer';\nimport getAuthComponentHeadings from '../../../../utils/getAuthComponentHeadings';\nimport AlertPrimitive from '../../../primitives/Alert/Alert';\nimport CardPrimitive, {CardProps} from '../../../primitives/Card/Card';\nimport Logo from '../../../primitives/Logo/Logo';\nimport Spinner from '../../../primitives/Spinner/Spinner';\nimport Typography from '../../../primitives/Typography/Typography';\nimport {renderRecoveryComponents} from '../AuthOptionFactory';\nimport useStyles from '../SignUp/BaseSignUp.styles';\n\n/**\n * Render props for custom UI rendering.\n */\nexport interface BaseRecoveryRenderProps {\n components: any[];\n error?: Error | null;\n fieldErrors: Record<string, string>;\n handleInputChange: (name: string, value: string) => void;\n handleSubmit: (component: any, data?: Record<string, any>) => Promise<void>;\n isLoading: boolean;\n isValid: boolean;\n messages: {message: string; type: string}[];\n meta: FlowMetadataResponse | null;\n subtitle: string;\n title: string;\n touched: Record<string, boolean>;\n validateForm: () => {fieldErrors: Record<string, string>; isValid: boolean};\n values: Record<string, string>;\n}\n\n/**\n * Props for the BaseRecovery component.\n */\nexport interface BaseRecoveryProps {\n afterRecoveryUrl?: string;\n buttonClassName?: string;\n /**\n * Render props function for custom UI or static content\n */\n children?: ((props: BaseRecoveryRenderProps) => ReactNode) | ReactNode;\n className?: string;\n error?: Error | null;\n errorClassName?: string;\n inputClassName?: string;\n isInitialized?: boolean;\n messageClassName?: string;\n onComplete?: (response: EmbeddedRecoveryFlowResponse) => void;\n onError?: (error: Error) => void;\n onFlowChange?: (response: EmbeddedRecoveryFlowResponse) => void;\n onInitialize?: (payload?: EmbeddedRecoveryFlowRequest) => Promise<EmbeddedRecoveryFlowResponse>;\n onSubmit?: (payload: EmbeddedRecoveryFlowRequest) => Promise<EmbeddedRecoveryFlowResponse>;\n /**\n * Component-level preferences to override global i18n and theme settings.\n */\n preferences?: Preferences;\n showLogo?: boolean;\n showSubtitle?: boolean;\n showTitle?: boolean;\n size?: 'small' | 'medium' | 'large';\n variant?: CardProps['variant'];\n}\n\n/**\n * Internal component that renders the V2 recovery UI and manages flow state.\n *\n * @internal\n */\nconst BaseRecoveryContent: FC<BaseRecoveryProps> = ({\n onInitialize,\n onSubmit,\n onError,\n onFlowChange,\n onComplete,\n error: externalError,\n className = '',\n inputClassName = '',\n buttonClassName = '',\n errorClassName = '',\n messageClassName = '',\n size = 'medium',\n variant = 'outlined',\n isInitialized,\n children,\n showTitle = true,\n showSubtitle = true,\n}: BaseRecoveryProps): ReactElement => {\n const {theme, colorScheme} = useTheme();\n const customRenderers: ComponentRendererMap = useContext(ComponentRendererContext);\n const {t} = useTranslation();\n const {subtitle: flowSubtitle, title: flowTitle, messages: flowMessages, addMessage, clearMessages} = useFlow();\n const {meta} = useThunderID();\n const styles: any = useStyles(theme, colorScheme);\n\n const [isLoading, setIsLoading] = useState(false);\n const [isFlowInitialized, setIsFlowInitialized] = useState(false);\n const [currentFlow, setCurrentFlow] = useState<EmbeddedRecoveryFlowResponse | null>(null);\n const [apiError, setApiError] = useState<Error | null>(null);\n\n const initializationAttemptedRef: any = useRef(false);\n const challengeTokenRef: any = useRef<string | null>(null);\n\n const handleError: any = useCallback(\n (error: any) => {\n const errorMessage: string = extractErrorMessage(error, t);\n setApiError(error instanceof Error ? error : new Error(errorMessage));\n clearMessages();\n addMessage({message: errorMessage, type: 'error'});\n },\n [t, addMessage, clearMessages],\n );\n\n const normalizeFlowResponseLocal: any = useCallback(\n (response: EmbeddedRecoveryFlowResponse): EmbeddedRecoveryFlowResponse => {\n if (response?.data?.components && Array.isArray(response.data.components)) {\n return response;\n }\n\n if (response?.data) {\n const {components} = normalizeFlowResponse(\n response,\n t,\n {defaultErrorKey: 'components.recovery.errors.generic', resolveTranslations: false},\n meta,\n );\n\n return {...response, data: {...response.data, components: components as any}};\n }\n\n return response;\n },\n [t, meta],\n );\n\n const extractFormFields: any = useCallback(\n (components: any[]): FormField[] => {\n const fields: FormField[] = [];\n\n const processComponents = (comps: any[]): any => {\n comps.forEach((component: any) => {\n if (\n component.type === EmbeddedFlowComponentType.TextInput ||\n component.type === EmbeddedFlowComponentType.PasswordInput ||\n component.type === EmbeddedFlowComponentType.EmailInput ||\n component.type === EmbeddedFlowComponentType.Select ||\n component.type === EmbeddedFlowComponentType.DateInput\n ) {\n const fieldName: any = component.ref || component.id;\n const ruleValidator = buildValidatorFromRules(component.validation);\n fields.push({\n initialValue: '',\n name: fieldName,\n required: component.required || false,\n validator: (value: string) => {\n if (component.required && (!value || value.trim() === '')) {\n return t('validations.required.field.error');\n }\n if (\n (component.type === EmbeddedFlowComponentType.EmailInput || component.variant === 'EMAIL') &&\n value &&\n !/^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$/.test(value)\n ) {\n return t('field.email.invalid');\n }\n // Evaluate declarative validation rules from meta.components[].validation.\n if (ruleValidator && value) {\n const ruleMessage = ruleValidator(value);\n if (ruleMessage) {\n return t(ruleMessage);\n }\n }\n return null;\n },\n });\n }\n\n if (component.components && Array.isArray(component.components)) {\n processComponents(component.components);\n }\n });\n };\n\n processComponents(components);\n return fields;\n },\n [t],\n );\n\n const formFields: any = currentFlow?.data?.components ? extractFormFields(currentFlow.data.components) : [];\n\n const form: any = useForm<Record<string, string>>({\n fields: formFields,\n initialValues: {},\n requiredMessage: t('validations.required.field.error'),\n validateOnBlur: true,\n validateOnChange: false,\n });\n\n const {\n values: formValues,\n touched: touchedFields,\n errors: formErrors,\n isValid: isFormValid,\n setValue: setFormValue,\n setTouched: setFormTouched,\n setErrors: setFormErrors,\n clearErrors: clearFormErrors,\n validateForm,\n touchAllFields,\n reset: resetForm,\n } = form;\n\n /**\n * Project server-side validation errors from the most recent flow response into the\n * form's `errors` state. See BaseSignIn for the same pattern.\n */\n useEffect(() => {\n clearFormErrors();\n const responseFieldErrors: FieldError[] | undefined = (currentFlow?.data as any)?.fieldErrors;\n if (!responseFieldErrors || responseFieldErrors.length === 0) {\n return;\n }\n const errors: Record<string, string> = {};\n for (const fe of responseFieldErrors) {\n if (!(fe.identifier in errors)) {\n errors[fe.identifier] = fe.message;\n }\n }\n setFormErrors(errors);\n Object.keys(errors).forEach((field: string) => setFormTouched(field, true));\n }, [currentFlow, setFormErrors, setFormTouched, clearFormErrors]);\n\n const setupFormFields: any = useCallback(\n (flowResponse: EmbeddedRecoveryFlowResponse) => {\n const fields: any = extractFormFields(flowResponse.data?.components || []);\n const initialValues: Record<string, string> = {};\n fields.forEach((field: any) => {\n initialValues[field.name] = field.initialValue || '';\n });\n resetForm();\n Object.keys(initialValues).forEach((key: any) => setFormValue(key, initialValues[key]));\n },\n [extractFormFields, resetForm, setFormValue],\n );\n\n const handleInputChange = (name: string, value: string): void => {\n setFormValue(name, value);\n };\n\n const handleInputBlur = (name: string): void => {\n setFormTouched(name, true);\n };\n\n const handleSubmit = async (component: any, data?: Record<string, any>, skipValidation?: boolean): Promise<void> => {\n if (!currentFlow) return;\n\n if (!skipValidation) {\n touchAllFields();\n const validation: ReturnType<typeof validateForm> = validateForm();\n if (!validation.isValid) return;\n }\n\n setIsLoading(true);\n setApiError(null);\n clearMessages();\n\n try {\n const filteredInputs: Record<string, any> = {};\n if (data) {\n Object.entries(data).forEach(([key, value]: [string, any]) => {\n if (value !== null && value !== undefined && value !== '') {\n filteredInputs[key] = value;\n }\n });\n }\n\n const payload: EmbeddedRecoveryFlowRequest = {\n ...(currentFlow.executionId && {executionId: currentFlow.executionId}),\n ...(component.id && {action: component.id}),\n ...(challengeTokenRef.current ? {challengeToken: challengeTokenRef.current} : {}),\n inputs: filteredInputs,\n };\n\n const rawResponse: any = await onSubmit?.(payload);\n if (!rawResponse) return;\n const response: any = normalizeFlowResponseLocal(rawResponse);\n onFlowChange?.(response);\n\n if (response.challengeToken !== undefined) {\n challengeTokenRef.current = response.challengeToken ?? null;\n }\n\n if (response.flowStatus === EmbeddedRecoveryFlowStatus.Error) {\n handleError(response);\n onError?.(new Error(extractErrorMessage(response, t)));\n return;\n }\n\n if (response.flowStatus === EmbeddedRecoveryFlowStatus.Complete) {\n onComplete?.(response);\n return;\n }\n\n if (response.flowStatus === EmbeddedRecoveryFlowStatus.Incomplete) {\n setCurrentFlow(response);\n setupFormFields(response);\n\n // Display error from INCOMPLETE response\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n if (response?.error) {\n handleError(response);\n }\n }\n } catch (err) {\n handleError(err);\n onError?.(err as Error);\n } finally {\n setIsLoading(false);\n }\n };\n\n const containerClasses: any = cx(\n [\n withVendorCSSClassPrefix('recovery'),\n withVendorCSSClassPrefix(`recovery--${size}`),\n withVendorCSSClassPrefix(`recovery--${variant}`),\n ],\n className,\n );\n\n const inputClasses: any = cx(\n [\n withVendorCSSClassPrefix('recovery__input'),\n size === 'small' && withVendorCSSClassPrefix('recovery__input--small'),\n size === 'large' && withVendorCSSClassPrefix('recovery__input--large'),\n ],\n inputClassName,\n );\n\n const buttonClasses: any = cx(\n [\n withVendorCSSClassPrefix('recovery__button'),\n size === 'small' && withVendorCSSClassPrefix('recovery__button--small'),\n size === 'large' && withVendorCSSClassPrefix('recovery__button--large'),\n ],\n buttonClassName,\n );\n\n const errorClasses: any = cx([withVendorCSSClassPrefix('recovery__error')], errorClassName);\n const messageClasses: any = cx([withVendorCSSClassPrefix('recovery__messages')], messageClassName);\n\n const renderComponents: any = useCallback(\n (components: any[]): ReactElement[] =>\n renderRecoveryComponents(\n components,\n formValues,\n touchedFields,\n formErrors,\n isLoading,\n isFormValid,\n handleInputChange,\n {\n _customRenderers: customRenderers,\n _theme: theme,\n buttonClassName: buttonClasses,\n inputClassName: inputClasses,\n meta,\n onInputBlur: handleInputBlur,\n onSubmit: handleSubmit,\n size,\n variant,\n },\n ),\n [\n customRenderers,\n buttonClasses,\n formErrors,\n formValues,\n handleInputBlur,\n handleSubmit,\n inputClasses,\n isFormValid,\n meta,\n isLoading,\n size,\n theme,\n touchedFields,\n variant,\n ],\n );\n\n useEffect(() => {\n if (isInitialized && !isFlowInitialized && !initializationAttemptedRef.current) {\n initializationAttemptedRef.current = true;\n\n (async (): Promise<void> => {\n setIsLoading(true);\n setApiError(null);\n clearMessages();\n\n try {\n const rawResponse: any = await onInitialize?.();\n if (!rawResponse) return;\n const response: any = normalizeFlowResponseLocal(rawResponse);\n\n if (response.challengeToken !== undefined) {\n challengeTokenRef.current = response.challengeToken ?? null;\n }\n\n if (response.flowStatus === EmbeddedRecoveryFlowStatus.Error) {\n handleError(response);\n onError?.(new Error(extractErrorMessage(response, t)));\n }\n\n setCurrentFlow(response);\n setIsFlowInitialized(true);\n onFlowChange?.(response);\n\n if (response.flowStatus === EmbeddedRecoveryFlowStatus.Complete) {\n onComplete?.(response);\n return;\n }\n\n if (response.flowStatus === EmbeddedRecoveryFlowStatus.Incomplete) {\n setupFormFields(response);\n\n // Display error from INCOMPLETE response\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n if (response?.error) {\n handleError(response);\n }\n }\n } catch (err) {\n handleError(err);\n onError?.(err as Error);\n } finally {\n setIsLoading(false);\n }\n })();\n }\n }, [\n isFlowInitialized,\n isInitialized,\n normalizeFlowResponseLocal,\n onComplete,\n onError,\n onFlowChange,\n onInitialize,\n setupFormFields,\n t,\n ]);\n\n if (children) {\n if (typeof children === 'function') {\n const renderProps: BaseRecoveryRenderProps = {\n components: currentFlow?.data?.components || [],\n error: apiError,\n fieldErrors: formErrors,\n handleInputChange,\n handleSubmit,\n isLoading,\n isValid: isFormValid,\n messages: flowMessages || [],\n meta,\n subtitle: flowSubtitle || t('recovery.subheading'),\n title: flowTitle || t('recovery.heading'),\n touched: touchedFields,\n validateForm: (): {fieldErrors: Record<string, string>; isValid: boolean} => {\n const result: ReturnType<typeof validateForm> = validateForm();\n return {fieldErrors: result.errors, isValid: result.isValid};\n },\n values: formValues,\n };\n\n return <div className={containerClasses}>{(children as any)(renderProps)}</div>;\n }\n\n return <div className={containerClasses}>{children}</div>;\n }\n\n if (!isFlowInitialized && isLoading) {\n return (\n <CardPrimitive className={cx(containerClasses, styles.card)} variant={variant}>\n <CardPrimitive.Content>\n <div className={styles.loadingContainer}>\n <Spinner size=\"medium\" />\n </div>\n </CardPrimitive.Content>\n </CardPrimitive>\n );\n }\n\n if (!currentFlow) {\n return (\n <CardPrimitive className={cx(containerClasses, styles.card)} variant={variant}>\n <CardPrimitive.Content>\n <AlertPrimitive variant=\"error\" className={errorClasses}>\n <AlertPrimitive.Title>{t('errors.heading')}</AlertPrimitive.Title>\n <AlertPrimitive.Description>{t('errors.recovery.flow.initialization.failure')}</AlertPrimitive.Description>\n </AlertPrimitive>\n </CardPrimitive.Content>\n </CardPrimitive>\n );\n }\n\n const componentsToRender: any = currentFlow.data?.components || [];\n const {title, subtitle, componentsWithoutHeadings} = getAuthComponentHeadings(\n componentsToRender,\n flowTitle,\n flowSubtitle,\n t('recovery.heading'),\n t('recovery.subheading'),\n );\n\n return (\n <CardPrimitive className={cx(containerClasses, styles.card)} variant={variant}>\n {(showTitle || showSubtitle) && (\n <CardPrimitive.Header className={styles.header}>\n {showTitle && (\n <CardPrimitive.Title level={2} className={styles.title}>\n {title}\n </CardPrimitive.Title>\n )}\n {showSubtitle && (\n <Typography variant=\"body1\" className={styles.subtitle}>\n {subtitle}\n </Typography>\n )}\n </CardPrimitive.Header>\n )}\n <CardPrimitive.Content>\n {externalError && (\n <div className={styles.flowMessagesContainer}>\n <AlertPrimitive variant=\"error\" className={cx(styles.flowMessageItem, messageClasses)}>\n <AlertPrimitive.Description>{externalError.message}</AlertPrimitive.Description>\n </AlertPrimitive>\n </div>\n )}\n {flowMessages && flowMessages.length > 0 && (\n <div className={styles.flowMessagesContainer}>\n {flowMessages.map((message: any, index: number) => (\n <AlertPrimitive\n key={message.id || index}\n variant={message.type?.toLowerCase() === 'error' ? 'error' : 'info'}\n className={cx(styles.flowMessageItem, messageClasses)}\n >\n <AlertPrimitive.Description>{message.message}</AlertPrimitive.Description>\n </AlertPrimitive>\n ))}\n </div>\n )}\n <div className={styles.contentContainer}>\n {componentsWithoutHeadings && componentsWithoutHeadings.length > 0 ? (\n renderComponents(componentsWithoutHeadings)\n ) : (\n <AlertPrimitive variant=\"warning\">\n <Typography variant=\"body1\">{t('errors.recovery.components.not.available')}</Typography>\n </AlertPrimitive>\n )}\n </div>\n </CardPrimitive.Content>\n </CardPrimitive>\n );\n};\n\n/**\n * BaseRecovery component for ThunderIDV2 that provides an embedded account/password recovery flow.\n * Accepts API functions as props to maintain framework independence.\n */\nconst BaseRecovery: FC<BaseRecoveryProps> = ({\n preferences,\n showLogo = true,\n ...rest\n}: BaseRecoveryProps): ReactElement => {\n const {theme, colorScheme} = useTheme();\n const styles: any = useStyles(theme, colorScheme);\n\n const content: ReactElement = (\n <div>\n {showLogo && (\n <div className={styles.logoContainer}>\n <Logo size=\"large\" />\n </div>\n )}\n <FlowProvider>\n <BaseRecoveryContent showLogo={showLogo} {...rest} />\n </FlowProvider>\n </div>\n );\n\n if (!preferences) return content;\n\n return <ComponentPreferencesContext.Provider value={preferences}>{content}</ComponentPreferencesContext.Provider>;\n};\n\nexport default BaseRecovery;\n"],"mappings":";;;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Aa,KAAK,SAAc,UAC/B,2CAACA;KAEC,SAAS,QAAQ,MAAM,aAAa,KAAK,UAAU,UAAU;KAC7D,iCAAc,OAAO,iBAAiB,eAAe;eAErD,2CAACA,sBAAe,yBAAa,QAAQ,UAAqC;OAJrE,QAAQ,MAAM,MAKJ,CACjB;KACE;GAER,2CAAC;IAAI,WAAW,OAAO;cACpB,6BAA6B,0BAA0B,SAAS,IAC/D,iBAAiB,0BAA0B,GAE3C,2CAACA;KAAe,SAAQ;eACtB,2CAACE;MAAW,SAAQ;gBAAS,EAAE,2CAA2C;OAAc;MACzE;KAEf;MACgB;GACV;;;;;;AAQpB,MAAMC,gBAAuC,EAC3C,aACA,WAAW,KACX,GAAG,WACkC;CACrC,MAAM,EAAC,OAAO,gBAAe3C,0BAAU;CACvC,MAAMM,SAAcC,kCAAU,OAAO,YAAY;CAEjD,MAAMqC,UACJ,4CAAC,oBACE,YACC,2CAAC;EAAI,WAAW,OAAO;YACrB,2CAACC,wBAAK,MAAK,UAAU;GACjB,EAER,2CAACC,0CACC,2CAAC;EAA8B;EAAU,GAAI;GAAQ,GACxC,IACX;AAGR,KAAI,CAAC,YAAa,QAAO;AAEzB,QAAO,2CAACC,4CAA4B;EAAS,OAAO;YAAc;GAA+C;;AAGnH,2BAAe"}
@@ -1,33 +1,27 @@
1
1
  const require_rolldown_runtime = require('../../../../_virtual/rolldown_runtime.cjs');
2
2
  const require_useThunderID = require('../../../../contexts/ThunderID/useThunderID.cjs');
3
- const require_Recovery = require('./v1/Recovery.cjs');
4
- const require_Recovery$1 = require('./v2/Recovery.cjs');
3
+ const require_BaseRecovery = require('./BaseRecovery.cjs');
5
4
  let __thunderid_browser = require("@thunderid/browser");
6
5
  __thunderid_browser = require_rolldown_runtime.__toESM(__thunderid_browser);
6
+ let react = require("react");
7
+ react = require_rolldown_runtime.__toESM(react);
7
8
  let react_jsx_runtime = require("react/jsx-runtime");
8
9
  react_jsx_runtime = require_rolldown_runtime.__toESM(react_jsx_runtime);
9
10
 
10
11
  //#region src/components/presentation/auth/Recovery/Recovery.tsx
11
12
  /**
12
- * Recovery component that provides an embedded account/password recovery flow.
13
- * Routes to the appropriate version-specific implementation based on the platform.
13
+ * Recovery component for ThunderIDV2 that provides an embedded account/password recovery flow.
14
14
  *
15
15
  * @example
16
16
  * ```tsx
17
- * import { Recovery } from '@thunderid/react';
17
+ * // Default UI
18
+ * <Recovery
19
+ * afterRecoveryUrl="/sign-in"
20
+ * onComplete={(response) => console.log('Recovery complete', response)}
21
+ * onError={(error) => console.error('Recovery failed', error)}
22
+ * />
18
23
  *
19
- * const App = () => (
20
- * <Recovery
21
- * afterRecoveryUrl="/sign-in"
22
- * onComplete={(response) => console.log('Recovery complete', response)}
23
- * onError={(error) => console.error('Recovery failed', error)}
24
- * />
25
- * );
26
- * ```
27
- *
28
- * @example
29
24
  * // Custom UI with render props
30
- * ```tsx
31
25
  * <Recovery>
32
26
  * {({ values, fieldErrors, handleInputChange, handleSubmit, isLoading, components }) => (
33
27
  * <form onSubmit={(e) => { e.preventDefault(); handleSubmit(components[0], values); }}>
@@ -37,13 +31,48 @@ react_jsx_runtime = require_rolldown_runtime.__toESM(react_jsx_runtime);
37
31
  * </Recovery>
38
32
  * ```
39
33
  */
40
- const Recovery = (props) => {
41
- const { platform } = require_useThunderID.default();
42
- if (platform === __thunderid_browser.Platform.ThunderID) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Recovery$1.default, { ...props });
43
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Recovery.default, { ...props });
34
+ const Recovery = ({ className, size = "medium", afterRecoveryUrl, onError, onComplete, tokenUrlParam, children,...rest }) => {
35
+ const { recover, isInitialized, applicationId } = require_useThunderID.default();
36
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_BaseRecovery.default, {
37
+ afterRecoveryUrl,
38
+ onInitialize: (0, react.useCallback)(async (payload) => {
39
+ const urlParams = new URL(window.location.href).searchParams;
40
+ const applicationIdFromUrl = urlParams.get("applicationId");
41
+ const effectiveApplicationId = applicationId ?? applicationIdFromUrl;
42
+ if (tokenUrlParam) {
43
+ const executionId = urlParams.get("executionId");
44
+ const tokenValue = urlParams.get(tokenUrlParam);
45
+ if (executionId && tokenValue) return await recover({
46
+ executionId,
47
+ inputs: { [tokenUrlParam]: tokenValue }
48
+ });
49
+ }
50
+ return await recover(payload ?? {
51
+ flowType: __thunderid_browser.EmbeddedFlowType.Recovery,
52
+ ...effectiveApplicationId && { applicationId: effectiveApplicationId }
53
+ });
54
+ }, [
55
+ applicationId,
56
+ tokenUrlParam,
57
+ recover
58
+ ]),
59
+ onSubmit: (0, react.useCallback)(async (payload) => await recover(payload), [recover]),
60
+ onError,
61
+ onComplete: (0, react.useCallback)((response) => {
62
+ onComplete?.(response);
63
+ if (afterRecoveryUrl) window.location.href = afterRecoveryUrl;
64
+ }, [onComplete, afterRecoveryUrl]),
65
+ className,
66
+ size,
67
+ isInitialized,
68
+ showTitle: true,
69
+ showSubtitle: true,
70
+ children,
71
+ ...rest
72
+ });
44
73
  };
45
- var Recovery_default$2 = Recovery;
74
+ var Recovery_default = Recovery;
46
75
 
47
76
  //#endregion
48
- exports.default = Recovery_default$2;
77
+ exports.default = Recovery_default;
49
78
  //# sourceMappingURL=Recovery.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"Recovery.cjs","names":["Recovery: FC<RecoveryProps>","useThunderID","Platform","RecoveryV2","RecoveryV1"],"sources":["../../../../../../src/components/presentation/auth/Recovery/Recovery.tsx"],"sourcesContent":["/**\n * Copyright (c) 2026, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {Platform} from '@thunderid/browser';\nimport {FC} from 'react';\nimport RecoveryV1, {RecoveryProps as RecoveryV1Props} from './v1/Recovery';\nimport RecoveryV2, {RecoveryProps as RecoveryV2Props} from './v2/Recovery';\nimport useThunderID from '../../../../contexts/ThunderID/useThunderID';\n\n/**\n * Props for the Recovery component.\n * Extends RecoveryV1Props & RecoveryV2Props for full compatibility with both implementations.\n */\nexport type RecoveryProps = RecoveryV1Props | RecoveryV2Props;\n\n/**\n * Recovery component that provides an embedded account/password recovery flow.\n * Routes to the appropriate version-specific implementation based on the platform.\n *\n * @example\n * ```tsx\n * import { Recovery } from '@thunderid/react';\n *\n * const App = () => (\n * <Recovery\n * afterRecoveryUrl=\"/sign-in\"\n * onComplete={(response) => console.log('Recovery complete', response)}\n * onError={(error) => console.error('Recovery failed', error)}\n * />\n * );\n * ```\n *\n * @example\n * // Custom UI with render props\n * ```tsx\n * <Recovery>\n * {({ values, fieldErrors, handleInputChange, handleSubmit, isLoading, components }) => (\n * <form onSubmit={(e) => { e.preventDefault(); handleSubmit(components[0], values); }}>\n * ...\n * </form>\n * )}\n * </Recovery>\n * ```\n */\nconst Recovery: FC<RecoveryProps> = (props: RecoveryProps) => {\n const {platform} = useThunderID();\n\n if (platform === Platform.ThunderID) {\n return <RecoveryV2 {...(props as RecoveryV2Props)} />;\n }\n\n return <RecoveryV1 {...(props as RecoveryV1Props)} />;\n};\n\nexport default Recovery;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2DA,MAAMA,YAA+B,UAAyB;CAC5D,MAAM,EAAC,aAAYC,8BAAc;AAEjC,KAAI,aAAaC,6BAAS,UACxB,QAAO,2CAACC,8BAAW,GAAK,QAA6B;AAGvD,QAAO,2CAACC,4BAAW,GAAK,QAA6B;;AAGvD,yBAAe"}
1
+ {"version":3,"file":"Recovery.cjs","names":["Recovery: FC<RecoveryProps>","useThunderID","BaseRecovery","urlParams: URLSearchParams","applicationIdFromUrl: string | null","effectiveApplicationId: string | null","executionId: string | null","tokenValue: string | null","EmbeddedFlowType"],"sources":["../../../../../../src/components/presentation/auth/Recovery/Recovery.tsx"],"sourcesContent":["/**\n * Copyright (c) 2026, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {EmbeddedRecoveryFlowRequest, EmbeddedRecoveryFlowResponse, EmbeddedFlowType} from '@thunderid/browser';\nimport {FC, PropsWithChildren, ReactElement, useCallback} from 'react';\nimport BaseRecovery, {BaseRecoveryProps} from './BaseRecovery';\nimport useThunderID from '../../../../contexts/ThunderID/useThunderID';\n\nexport type RecoveryProps = PropsWithChildren<\n BaseRecoveryProps & {\n /**\n * URL query parameter name that carries the recovery token when the user lands via a recovery link.\n * When set and both `executionId` and this param are present in the URL, the component resumes the\n * existing flow instead of starting a new one.\n *\n * @example\n * // For a link like /recovery?executionId=xxx&recoveryToken=yyy\n * <Recovery tokenUrlParam=\"recoveryToken\" />\n */\n tokenUrlParam?: string;\n }\n>;\n\n/**\n * Recovery component for ThunderIDV2 that provides an embedded account/password recovery flow.\n *\n * @example\n * ```tsx\n * // Default UI\n * <Recovery\n * afterRecoveryUrl=\"/sign-in\"\n * onComplete={(response) => console.log('Recovery complete', response)}\n * onError={(error) => console.error('Recovery failed', error)}\n * />\n *\n * // Custom UI with render props\n * <Recovery>\n * {({ values, fieldErrors, handleInputChange, handleSubmit, isLoading, components }) => (\n * <form onSubmit={(e) => { e.preventDefault(); handleSubmit(components[0], values); }}>\n * ...\n * </form>\n * )}\n * </Recovery>\n * ```\n */\nconst Recovery: FC<RecoveryProps> = ({\n className,\n size = 'medium',\n afterRecoveryUrl,\n onError,\n onComplete,\n tokenUrlParam,\n children,\n ...rest\n}: RecoveryProps): ReactElement => {\n const {recover, isInitialized, applicationId} = useThunderID();\n\n const handleInitialize: (payload?: EmbeddedRecoveryFlowRequest) => Promise<EmbeddedRecoveryFlowResponse> =\n useCallback(\n async (payload?: EmbeddedRecoveryFlowRequest): Promise<EmbeddedRecoveryFlowResponse> => {\n const urlParams: URLSearchParams = new URL(window.location.href).searchParams;\n const applicationIdFromUrl: string | null = urlParams.get('applicationId');\n const effectiveApplicationId: string | null = applicationId ?? applicationIdFromUrl;\n\n if (tokenUrlParam) {\n const executionId: string | null = urlParams.get('executionId');\n const tokenValue: string | null = urlParams.get(tokenUrlParam);\n\n if (executionId && tokenValue) {\n const resumePayload: EmbeddedRecoveryFlowRequest = {\n executionId,\n inputs: {[tokenUrlParam]: tokenValue},\n };\n return (await recover(resumePayload)) as EmbeddedRecoveryFlowResponse;\n }\n }\n\n const initialPayload: EmbeddedRecoveryFlowRequest = payload ?? {\n flowType: EmbeddedFlowType.Recovery,\n ...(effectiveApplicationId && {applicationId: effectiveApplicationId}),\n };\n\n return (await recover(initialPayload)) as EmbeddedRecoveryFlowResponse;\n },\n [applicationId, tokenUrlParam, recover],\n );\n\n const handleOnSubmit: (payload: EmbeddedRecoveryFlowRequest) => Promise<EmbeddedRecoveryFlowResponse> = useCallback(\n async (payload: EmbeddedRecoveryFlowRequest): Promise<EmbeddedRecoveryFlowResponse> =>\n (await recover(payload)) as EmbeddedRecoveryFlowResponse,\n [recover],\n );\n\n const handleComplete: (response: EmbeddedRecoveryFlowResponse) => void = useCallback(\n (response: EmbeddedRecoveryFlowResponse): void => {\n onComplete?.(response);\n\n if (afterRecoveryUrl) {\n window.location.href = afterRecoveryUrl;\n }\n },\n [onComplete, afterRecoveryUrl],\n );\n\n return (\n <BaseRecovery\n afterRecoveryUrl={afterRecoveryUrl}\n onInitialize={handleInitialize}\n onSubmit={handleOnSubmit}\n onError={onError}\n onComplete={handleComplete}\n className={className}\n size={size}\n isInitialized={isInitialized}\n showTitle={true}\n showSubtitle={true}\n children={children}\n {...rest}\n />\n );\n};\n\nexport default Recovery;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4DA,MAAMA,YAA+B,EACnC,WACA,OAAO,UACP,kBACA,SACA,YACA,eACA,SACA,GAAG,WAC8B;CACjC,MAAM,EAAC,SAAS,eAAe,kBAAiBC,8BAAc;AAiD9D,QACE,2CAACC;EACmB;EAClB,qCAhDA,OAAO,YAAiF;GACtF,MAAMC,YAA6B,IAAI,IAAI,OAAO,SAAS,KAAK,CAAC;GACjE,MAAMC,uBAAsC,UAAU,IAAI,gBAAgB;GAC1E,MAAMC,yBAAwC,iBAAiB;AAE/D,OAAI,eAAe;IACjB,MAAMC,cAA6B,UAAU,IAAI,cAAc;IAC/D,MAAMC,aAA4B,UAAU,IAAI,cAAc;AAE9D,QAAI,eAAe,WAKjB,QAAQ,MAAM,QAJqC;KACjD;KACA,QAAQ,GAAE,gBAAgB,YAAW;KACtC,CACmC;;AASxC,UAAQ,MAAM,QALsC,WAAW;IAC7D,UAAUC,qCAAiB;IAC3B,GAAI,0BAA0B,EAAC,eAAe,wBAAuB;IACtE,CAEoC;KAEvC;GAAC;GAAe;GAAe;GAAQ,CACxC;EAuBC,iCApBF,OAAO,YACJ,MAAM,QAAQ,QAAQ,EACzB,CAAC,QAAQ,CACV;EAkBY;EACT,oCAhBD,aAAiD;AAChD,gBAAa,SAAS;AAEtB,OAAI,iBACF,QAAO,SAAS,OAAO;KAG3B,CAAC,YAAY,iBAAiB,CAC/B;EASc;EACL;EACS;EACf,WAAW;EACX,cAAc;EACJ;EACV,GAAI;GACJ;;AAIN,uBAAe"}