@adyen/kyc-components 4.23.0 → 4.24.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (798) hide show
  1. package/dist/{4-people-Dxu4nHSX.js → 4-people-DKuivE0m.js} +2 -2
  2. package/dist/{AcceptTermsOfServiceWorkflow-CvKbU2WY.js → AcceptTermsOfServiceWorkflow-CyMefc3t.js} +4 -4
  3. package/dist/{Accordion-Sjyj7C_t.js → Accordion-Dgdxfe-d.js} +1 -1
  4. package/dist/{AccountSetupRejected-Cq_nlmLn.js → AccountSetupRejected-D63dyojj.js} +4 -3
  5. package/dist/AdaptiveWorkflow-DC4QviLh.js +33 -0
  6. package/dist/{AdaptiveWorkflowComponent-tM1hJ1zF.js → AdaptiveWorkflowComponent-CsNPizq0.js} +62 -61
  7. package/dist/{AddressFields-BsxEdBvQ.js → AddressFields-BeeqIqdc.js} +15 -11
  8. package/dist/Alert-Cc7p0N5h.js +172 -0
  9. package/dist/AnalyticsContext-CpimDlw4.js +21 -0
  10. package/dist/{Avatar-Zp1T9qAL.js → Avatar-oTPu6Ejy.js} +1 -1
  11. package/dist/{BusinessFinancingDropin-vugW4Vvi.js → BusinessFinancingDropin-DYJS13vd.js} +50 -37
  12. package/dist/{BusinessFinancingPage-0J_LImeN.js → BusinessFinancingPage-DbTrQ1kt.js} +34 -34
  13. package/dist/{BusinessRegistrationNumberField-qdC_srMn.js → BusinessRegistrationNumberField-DKka8aVU.js} +8 -6
  14. package/dist/{BusinessRegistrationNumberFieldGroup-BvC9n4ou.js → BusinessRegistrationNumberFieldGroup-Df6_sDA0.js} +8 -6
  15. package/dist/{BusinessTypeSelectionPage-WCEqP4G2.js → BusinessTypeSelectionPage-C0xUipfe.js} +20 -20
  16. package/dist/{Button-DfRmINzF.js → Button-DPJ1k02w.js} +30 -30
  17. package/dist/{Checkbox-B730k3Yy.js → Checkbox-qfdF12cF.js} +3 -51
  18. package/dist/{ComponentGroup-CsnkYMbT.js → ComponentGroup-Cw_2w0Rf.js} +4 -4
  19. package/dist/Confirm-DoN9R9Z3.js +77 -0
  20. package/dist/{ConstitutionalDocument-D92EPGmG.js → ConstitutionalDocument-Bbo7P_gi.js} +30 -25
  21. package/dist/{ContactDetails-DDSd6X0z.js → ContactDetails-CUjFd94x.js} +12 -7
  22. package/dist/{ContextGuidance-B2ew1lzC.js → ContextGuidance-BQPwRscq.js} +3 -3
  23. package/dist/{ContractViewer-JtnAXSDa.js → ContractViewer-CG9UNGz1.js} +65 -14
  24. package/dist/CountryField-DT6-Jr_b.js +38 -0
  25. package/dist/{Currency-BKTf95Wp.js → Currency-C-sSDMn7.js} +8 -7
  26. package/dist/{CustomerSupport-CCFayyJG.js → CustomerSupport-C2DrnwDs.js} +19 -18
  27. package/dist/{DataConflictsModal-D-fP_eNs.js → DataConflictsModal-CCaMgguu.js} +10 -9
  28. package/dist/{DebugModal-CG6CvUnj.js → DebugModal-CDfvQRk6.js} +18 -12
  29. package/dist/{DecisionMakerDetails-DWC1nORL.js → DecisionMakerDetails-Dhi6hsrv.js} +90 -86
  30. package/dist/{DecisionMakerDetailsPage-BVXA74FO.js → DecisionMakerDetailsPage-DLgKrPA3.js} +43 -44
  31. package/dist/{DecisionMakers-Cvm_i6Uf.js → DecisionMakers-B6Qd9fuT.js} +53 -48
  32. package/dist/{Dropzone-CNHxDEc3.js → Dropzone-BhMYy4nr.js} +8 -8
  33. package/dist/{EmbeddedStatus-tbJfdxm8.js → EmbeddedStatus-CYd2p4sP.js} +4 -4
  34. package/dist/{EndStateLayout-BK1Hh02g.js → EndStateLayout-zZPm8S5M.js} +3 -3
  35. package/dist/{EntityAssociation-i903L9Dh.js → EntityAssociation-C2_Xuvf5.js} +7 -7
  36. package/dist/{ErrorPanel-tnFOlOZU.js → ErrorPanel-D4JNFkvi.js} +6 -6
  37. package/dist/Field-DwDJQVSS.js +154 -0
  38. package/dist/FormFlow.module-DqMxjYHl.js +20 -0
  39. package/dist/{GlobalEntryModal-DQoIIvGS.js → GlobalEntryModal-iZSUeMQf.js} +444 -216
  40. package/dist/{GlobalEntryPage-DLRGPpAu.js → GlobalEntryPage-w4KJOeYb.js} +11 -11
  41. package/dist/Header-DVLlJ6we.js +93 -0
  42. package/dist/Icon-4XR6gZzk.js +175 -0
  43. package/dist/{IdentityNumber-B8MXzXsO.js → IdentityNumber-3V6ZqvHB.js} +10 -6
  44. package/dist/{IdentityNumberFieldGroup-D7xb2TY7.js → IdentityNumberFieldGroup-CAjlgTWn.js} +2 -2
  45. package/dist/{IdentityScreeningWorkflow-BdGXtdns.js → IdentityScreeningWorkflow-Bx89cmUF.js} +15 -15
  46. package/dist/{Image-D82terx4.js → Image-Bn_Yyuof.js} +1 -1
  47. package/dist/{IndividualDropin-C0vTSDYU.js → IndividualDropin-BgOmBeoT.js} +126 -89
  48. package/dist/{IndustryCodeFieldGroup-CGcE5yYR.js → IndustryCodeFieldGroup-BDtoeaUz.js} +7 -6
  49. package/dist/{InputDate-Ci60MBrH.js → InputDate-ANdv1rKt.js} +3 -3
  50. package/dist/{InputText-CTpVF0Mu.js → InputText-CFDEmEtp.js} +4 -39
  51. package/dist/{Introduction-Dx6DDaL7.js → Introduction-D8hMB7Wb.js} +16 -17
  52. package/dist/{InvitedDecisionMakerComponent-Ckd26d6Y.js → InvitedDecisionMakerComponent-DZZe5Ruk.js} +76 -76
  53. package/dist/{JpAddressFields-C9MbL5XV.js → JpAddressFields-BIh4120-.js} +11 -10
  54. package/dist/LandingLayout-BsIoIFzs.js +76 -0
  55. package/dist/{LegalCompanyNameField-D0jM5LDT.js → LegalCompanyNameField-Cosyjk52.js} +5 -5
  56. package/dist/{LegalName-TjhII9_p.js → LegalName-CtqIpsfy.js} +4 -4
  57. package/dist/LegalRepresentativeDetailsPage-Mpm8AjdQ.js +73 -0
  58. package/dist/{Link-c2jAgGgc.js → Link-CvYhseSD.js} +1 -1
  59. package/dist/{ListItem-C35r8558.js → ListItem-CYTpdOMa.js} +4 -27
  60. package/dist/{Loader-BEpMlKm2.js → Loader-BVtlpTeo.js} +1 -1
  61. package/dist/LoaderWrapper-Dc88hY-P.js +34 -0
  62. package/dist/MaybeModal-C4ySaA8A.js +24 -0
  63. package/dist/{Modal-BsivDPTd.js → Modal-CHES6970.js} +5 -25
  64. package/dist/{Name-DMf8Uyof.js → Name-CdCsijr5.js} +5 -5
  65. package/dist/{NewSummary-DxWLTnJy.js → NewSummary-D55f70wB.js} +7 -7
  66. package/dist/{AdaptiveWorkflow-CM7ZVGXv.js → NodeRenderer-smgxe7Ni.js} +20 -45
  67. package/dist/{PatriotActDisclosure-ChZ_ePr2.js → PatriotActDisclosure-DA6nqTmC.js} +13 -12
  68. package/dist/{PayoutDetailsDropin-BhtJSFAS.js → PayoutDetailsDropin-BH1Sj6GM.js} +89 -58
  69. package/dist/PayoutDetailsPage-B7mZmc51.js +69 -0
  70. package/dist/ProgressBar-DWFxLMUA.js +38 -0
  71. package/dist/RadioGroup-Bf3DlQnZ.js +47 -0
  72. package/dist/RadioWithLabel-DQIOEYpF.js +45 -0
  73. package/dist/{Review-DImhCvoG.js → Review-9sjGKoQu.js} +7 -7
  74. package/dist/RootBusinessDetailsPage-DRN6p6wB.js +67 -0
  75. package/dist/{RootBusinessLinesPage-C_p-CtCH.js → RootBusinessLinesPage-uxn9f5K8.js} +39 -30
  76. package/dist/RootIndividualDetailsPage-BDoKkhcN.js +82 -0
  77. package/dist/{Select-ByVcS_J2.js → Select-phAxjMBQ.js} +46 -357
  78. package/dist/{SignPCIComponent-CAwp2xCC.js → SignPCIComponent-BNlTxxJz.js} +51 -48
  79. package/dist/{SingpassSelection-Txx3gp_g.js → SingpassSelection-B6_DsZtn.js} +12 -13
  80. package/dist/SoleProprietorshipPage-Dx-pfSwo.js +69 -0
  81. package/dist/{SourceOfFundsPage-B22iW1ow.js → SourceOfFundsPage-ChO-R9o4.js} +95 -76
  82. package/dist/{SourceOfFundsWorkflow-BKHZbLR_.js → SourceOfFundsWorkflow-DuU_n82x.js} +4 -4
  83. package/dist/StateContext-B2_Pqd_y.js +9 -0
  84. package/dist/StateField-BpMwetvd.js +55 -0
  85. package/dist/{Step-BUMarnLL.js → Step-CctAUYbs.js} +6 -6
  86. package/dist/StructuredList-nPasiuLi.js +56 -0
  87. package/dist/Summary-DM31WxLr.js +235 -0
  88. package/dist/{Task-Bj_CjiHG.js → Task-C12uuPWD.js} +8 -8
  89. package/dist/{TaskGroup-BMXhoq1Y.js → TaskGroup-z3ONGLnB.js} +4 -4
  90. package/dist/{TaskListItem-BIKdDEzU.js → TaskListItem-Dx3hKOqG.js} +11 -11
  91. package/dist/{TaskStepperContextProvider-D0tKJplv.js → TaskStepperContextProvider-DdcsqXT7.js} +1 -1
  92. package/dist/{TaskVerificationStatus-DPA4ZEPa.js → TaskVerificationStatus-DEXk_ndE.js} +3 -3
  93. package/dist/TaxInformationField-Cc-NDAVo.js +242 -0
  94. package/dist/{TaxInformationFieldGroup-D_6IRGj9.js → TaxInformationFieldGroup-DI2LzuNr.js} +16 -13
  95. package/dist/{TaxReportingDropin-DA475crP.js → TaxReportingDropin-LNgisxBc.js} +23 -18
  96. package/dist/{TaxReportingWorkflow-kcto0Ysw.js → TaxReportingWorkflow-9_9ECX6A.js} +4 -4
  97. package/dist/{TermsOfServiceManagement-HDnaIeWZ.js → TermsOfServiceManagement-BGrBal0j.js} +59 -50
  98. package/dist/{TextArea-qbFhi8Az.js → TextArea-qGEo3PFG.js} +5 -5
  99. package/dist/TileGroup-D1-M64Ul.js +172 -0
  100. package/dist/ToastContext-B_wd2IY2.js +13 -0
  101. package/dist/ToastContextProvider-DjYKMflX.js +103 -0
  102. package/dist/{TrustDetailsPage-BqVS0xOU.js → TrustDetailsPage-cx6yEd6Q.js} +68 -51
  103. package/dist/TrustMemberCompanyPage-DZh9Wn9-.js +108 -0
  104. package/dist/TrustMemberIndividualPage--tTWII4G.js +108 -0
  105. package/dist/{TrustMemberRoleAndTypePage-GXWuitmt.js → TrustMemberRoleAndTypePage-DEzesajA.js} +51 -41
  106. package/dist/{TrustMembersOverview-BjJ5fPcC.js → TrustMembersOverview-BpJGWVT5.js} +23 -19
  107. package/dist/{UboTaskItem-Aq3iNKX0.js → UboTaskItem-DP5LOGom.js} +8 -8
  108. package/dist/UnincorporatedPartnershipIndividualPage-DelW_XAz.js +78 -0
  109. package/dist/{UnincorporatedPartnershipMemberCompanyPage-h3OTr_91.js → UnincorporatedPartnershipMemberCompanyPage-BdnBsGK9.js} +36 -37
  110. package/dist/{UnincorporatedPartnershipMemberRoleAndTypePage-CwemN4fL.js → UnincorporatedPartnershipMemberRoleAndTypePage-DpdTiLc-.js} +20 -18
  111. package/dist/{UnincorporatedPartnershipMembersOverview-CUczPfUl.js → UnincorporatedPartnershipMembersOverview-BBeans9j.js} +17 -15
  112. package/dist/{VerificationErrorAlert-BBfoLMwb.js → VerificationErrorAlert-CixajVtq.js} +4 -30
  113. package/dist/{Workflow-Do7P-qDn.js → Workflow-BJbKhY38.js} +8 -8
  114. package/dist/_rolldown_dynamic_import_helper-sGNwd-kR.js +14 -0
  115. package/dist/{accountHolderUtils-DMi_DHCU.js → accountHolderUtils-CAu4V0ed.js} +11 -12
  116. package/dist/adyen-business-financing.js +37 -36
  117. package/dist/adyen-individual-configuration.js +64 -64
  118. package/dist/adyen-individual-status.js +32 -31
  119. package/dist/adyen-invited-decision-maker.js +3 -3
  120. package/dist/adyen-onboarding.js +104 -96
  121. package/dist/adyen-terms-of-service-management.js +3 -3
  122. package/dist/adyen-terms-of-service-status.js +7 -6
  123. package/dist/adyen-transfer-instrument-configuration.js +61 -60
  124. package/dist/adyen-transfer-instrument-management.js +75 -69
  125. package/dist/adyen-verification-status.js +8 -6
  126. package/dist/{arrow-right-Bk-ewsex.js → arrow-right-D2hul7WG.js} +2 -2
  127. package/dist/bafinUtils-DDrD6bfK.js +96 -0
  128. package/dist/{bag-9BNq_QQO.js → bag-CRRS1aow.js} +2 -2
  129. package/dist/{bank-BRbxxVK5.js → bank-BoirCLLW.js} +2 -2
  130. package/dist/bg-BG-B0Ia8sQm.js +7 -0
  131. package/dist/bg-BG-B2xaZ3wB.js +7 -0
  132. package/dist/bg-BG-DAR7_x2a.js +7 -0
  133. package/dist/bg-BG-DqfAUTUt.js +7 -0
  134. package/dist/bg-BG-ivZjQNJZ.js +7 -0
  135. package/dist/{bin-DE1613_5.js → bin-BOmfqfrr.js} +2 -2
  136. package/dist/birthDateUtils-D6uk7zwm.js +84 -0
  137. package/dist/{businessRegistrationNumberPatterns-C_MSKHlF.js → businessRegistrationNumberPatterns-A08SLm03.js} +3 -2
  138. package/dist/{capital-aNk7ragc.js → capital-DTjbiurV.js} +2 -2
  139. package/dist/{cash-stack-DuKKc4Qj.js → cash-stack-7KpYpBek.js} +2 -2
  140. package/dist/{certificate-9gDKvXCm.js → certificate-BPuoJ6Ip.js} +2 -2
  141. package/dist/{checkmark-BuqDN4WO.js → checkmark-BiSLf8M1.js} +2 -2
  142. package/dist/{checkmark-circle-OqcwA6N6.js → checkmark-circle-Ams7bSve.js} +2 -2
  143. package/dist/{checkmark-circle-fill-BfcUovCf.js → checkmark-circle-fill-_p4ss4ac.js} +2 -2
  144. package/dist/{checkmark-small-CBORXg_J.js → checkmark-small-3bw4ftPV.js} +2 -2
  145. package/dist/{chevron-down-CjRta08O.js → chevron-down-GgZawvoy.js} +2 -2
  146. package/dist/{chevron-left-BEm04mIh.js → chevron-left-TeZTTvo5.js} +2 -2
  147. package/dist/{chevron-right-B2GkHG0J.js → chevron-right-Cg8XlTxx.js} +2 -2
  148. package/dist/{chevron-up-BKfe5Btb.js → chevron-up-COQUTli0.js} +2 -2
  149. package/dist/{circle-C-uuRI8F.js → circle-CypWzg83.js} +2 -2
  150. package/dist/{circle-small-filled-Bkh5_ZEu.js → circle-small-filled-DfdK2A35.js} +2 -2
  151. package/dist/{clock-BWfWiMxz.js → clock-DmfGJ2r9.js} +2 -2
  152. package/dist/{coins-Cw-jDTUz.js → coins-CBvbB8_X.js} +2 -2
  153. package/dist/{constants-BSBlqXY7.js → constants-C8yo0_RA.js} +7 -5
  154. package/dist/{contract-PFVBW8xa.js → contract-D1_RJ_xh.js} +2 -2
  155. package/dist/{countries-BE4iGVAo.js → countries-BGMTpyJv.js} +1 -1
  156. package/dist/{country-zZC2TAQB.js → country-BEZkohEO.js} +2 -2
  157. package/dist/{cross-B37j1-r4.js → cross-BORHADVQ.js} +2 -2
  158. package/dist/{cross-circle-fill-CcjwpLj2.js → cross-circle-fill-CUXdo1x-.js} +2 -2
  159. package/dist/{cross-circle-fill-small-CJ4fddNo.js → cross-circle-fill-small-DdoPZZeo.js} +2 -2
  160. package/dist/cs-CZ-BwO4yrI4.js +7 -0
  161. package/dist/cs-CZ-CHMQYoMF.js +7 -0
  162. package/dist/cs-CZ-DsKlW7_D.js +7 -0
  163. package/dist/cs-CZ-NVntX32n.js +7 -0
  164. package/dist/cs-CZ-ywYpJk1F.js +7 -0
  165. package/dist/da-DK-BvT8Ob4A.js +7 -0
  166. package/dist/da-DK-BzBfkSME.js +7 -0
  167. package/dist/da-DK-CE7jnGea.js +7 -0
  168. package/dist/da-DK-DH5YNYFM.js +7 -0
  169. package/dist/da-DK-LPtdP8h0.js +7 -0
  170. package/dist/datasetUtil-BdHPWsxZ.js +45 -0
  171. package/dist/de-DE-C9cUCFOi.js +7 -0
  172. package/dist/de-DE-Cn866nnd.js +7 -0
  173. package/dist/de-DE-DA4LpyZI.js +7 -0
  174. package/dist/de-DE-DKkoZQ0X.js +7 -0
  175. package/dist/de-DE-DY_EJohI.js +7 -0
  176. package/dist/de-DE-vdy64knk.js +7 -0
  177. package/dist/debouncedInputEvent-Fwwp_K_-.js +54 -0
  178. package/dist/debugStore-Dwn1FXrh.js +9 -0
  179. package/dist/decision-makers-group-iEF9oKPp.js +2673 -0
  180. package/dist/{decisionMakerRoles-APTR-Ah_.js → decisionMakerRoles-C6LMC4mh.js} +2 -2
  181. package/dist/{document-1-B3vw8uuK.js → document-1-qvV57JdS.js} +2 -2
  182. package/dist/{document-person-CERdIfH0.js → document-person-DiJ7M8-D.js} +2 -2
  183. package/dist/{download-CthdK4dV.js → download-Ca4w0Yfr.js} +2 -2
  184. package/dist/dropinUtils-DTBezwYT.js +491 -0
  185. package/dist/{edit-1-BW7NwWP7.js → edit-1-D8VhDchs.js} +2 -2
  186. package/dist/el-GR-ChapyKa7.js +7 -0
  187. package/dist/el-GR-Cvms0L4K.js +7 -0
  188. package/dist/el-GR-D9PjIB9j.js +7 -0
  189. package/dist/el-GR-Ov9hqMNe.js +7 -0
  190. package/dist/el-GR-aelq5Q0a.js +7 -0
  191. package/dist/el-GR-zFv0QxMR.js +7 -0
  192. package/dist/en-US-B7HQdrn_.js +7 -0
  193. package/dist/en-US-CI7y0UEH.js +7 -0
  194. package/dist/en-US-C_VjFvk_.js +7 -0
  195. package/dist/{en-US-BUmtG-Wj.js → en-US-Cz4JoU20.js} +16 -2
  196. package/dist/en-US-DPr5RN3e.js +7 -0
  197. package/dist/en-US-U0d3NI20.js +7 -0
  198. package/dist/en-US-tFsDZf7y.js +7 -0
  199. package/dist/{entityAssociationUtil-CLBR9osP.js → entityAssociationUtil-CY0grcyH.js} +7 -8
  200. package/dist/{error-CpJV-CLa.js → error-BvgoQFEI.js} +4 -4
  201. package/dist/es-ES-BQrdtEfn.js +7 -0
  202. package/dist/es-ES-BdByhG4y.js +7 -0
  203. package/dist/es-ES-BzlHKYJK.js +7 -0
  204. package/dist/es-ES-DCUvAmKI.js +7 -0
  205. package/dist/es-ES-DdrA8McY.js +7 -0
  206. package/dist/es-ES-DhkTbihW.js +7 -0
  207. package/dist/es-LA-3WgncmHx.js +7 -0
  208. package/dist/es-LA-BxtxM3Ty.js +7 -0
  209. package/dist/es-LA-ChRHGYJP.js +7 -0
  210. package/dist/es-LA-JRuDva0n.js +7 -0
  211. package/dist/es-LA-i7tKJmA8.js +7 -0
  212. package/dist/et-EE-BXY66vAz.js +7 -0
  213. package/dist/et-EE-D8TSvkoE.js +7 -0
  214. package/dist/et-EE-DOgb4q9o.js +7 -0
  215. package/dist/et-EE-HHgM0CfO.js +7 -0
  216. package/dist/et-EE-V-YOCgoh.js +7 -0
  217. package/dist/{external-link-CFgynH5A.js → external-link-Dy4le-8Q.js} +2 -2
  218. package/dist/fi-FI-B-eTv4bG.js +7 -0
  219. package/dist/fi-FI-CClpbvJJ.js +7 -0
  220. package/dist/fi-FI-CVBmM-U1.js +7 -0
  221. package/dist/fi-FI-DCYPQ6vS.js +7 -0
  222. package/dist/fi-FI-DCbhu29J.js +7 -0
  223. package/dist/fieldConfigurations-CZCFghnK.js +11 -0
  224. package/dist/form-rules-B0RwhsVw.js +284 -0
  225. package/dist/formFieldsUtils-CnDkgahc.js +7 -0
  226. package/dist/formUtils-BHgG8yQZ.js +52 -0
  227. package/dist/formUtils-DVDcdZsP.js +84 -0
  228. package/dist/{formatCurrency-Cq3WFpdZ.js → formatCurrency-BetgkQKi.js} +1 -1
  229. package/dist/{formatValidationError-BHvKLMYZ.js → formatValidationError-q_w9DTrl.js} +2 -2
  230. package/dist/fr-FR-B-jA_cbo.js +7 -0
  231. package/dist/fr-FR-BIyJL6Jj.js +7 -0
  232. package/dist/fr-FR-BzyefnBh.js +7 -0
  233. package/dist/fr-FR-C1xYwHeC.js +7 -0
  234. package/dist/fr-FR-D0hY9V44.js +7 -0
  235. package/dist/fr-FR-Doo1FVx-.js +7 -0
  236. package/dist/{genUtils-Ce61IJs8.js → genUtils-nphCwt1A.js} +1 -1
  237. package/dist/{getDefaultRegistrationNumberType-CI1NVzJR.js → getDefaultRegistrationNumberType-CIu4WMln.js} +189 -188
  238. package/dist/getFormSlice-C1ma6Xd4.js +21 -0
  239. package/dist/getLegalEntityCountry-BK-HHa65.js +15 -0
  240. package/dist/{getName-s7qmFean.js → getName-DgxRqagk.js} +5 -6
  241. package/dist/{getProblemsForEntity-Bh9nSdOW.js → getProblemsForEntity-BY_voJ99.js} +3 -3
  242. package/dist/{getTrustedDecisionMakers-DX3nImM5.js → getTrustedDecisionMakers-Ta-pURcL.js} +2 -2
  243. package/dist/getTrustedFields-BJ88GlM-.js +28 -0
  244. package/dist/{gift-0jLCte2h.js → gift-Bs_mAgul.js} +2 -2
  245. package/dist/globalStore-WASei98w.js +418 -0
  246. package/dist/{graph-DrxuzQF7.js → graph-Co0JhGiY.js} +2 -2
  247. package/dist/{graph-up-4qLbS2Ds.js → graph-up-DIvH9haf.js} +2 -2
  248. package/dist/{headquarter-3o2GHW5H.js → headquarter-BESfDGKh.js} +2 -2
  249. package/dist/{hotel-pZlrEAK8.js → hotel-Vne7G5M6.js} +2 -2
  250. package/dist/hr-HR-6Wj5Tf60.js +7 -0
  251. package/dist/hr-HR-B4FRVzrd.js +7 -0
  252. package/dist/hr-HR-B6z7-PYE.js +7 -0
  253. package/dist/hr-HR-BOYktLQ2.js +7 -0
  254. package/dist/hr-HR-Ct_41fWV.js +7 -0
  255. package/dist/hu-HU-B7ofWKn_.js +7 -0
  256. package/dist/hu-HU-Bwm4UqZz.js +7 -0
  257. package/dist/hu-HU-CO_7jvk9.js +7 -0
  258. package/dist/hu-HU-CgJ_F3l2.js +7 -0
  259. package/dist/hu-HU-DXK7B0r_.js +7 -0
  260. package/dist/{image-tfgNnE3G.js → image-BQM21XCk.js} +2 -2
  261. package/dist/{info-DJW5JooY.js → info-DExoPRH5.js} +2 -2
  262. package/dist/{info-filled-C5mP6T4Z.js → info-filled-11KMeUso.js} +2 -2
  263. package/dist/{useId-oOIS1nsj.js → invalidateRootLegalEntity-B97dCa-s.js} +3 -31
  264. package/dist/isEmpty-Uewyl-r6.js +14 -0
  265. package/dist/isEmptyEntity-3OHnhXqG.js +43 -0
  266. package/dist/it-IT-BFIW0DCO.js +7 -0
  267. package/dist/it-IT-CNr6PIu3.js +7 -0
  268. package/dist/it-IT-CQVFYSVx.js +7 -0
  269. package/dist/it-IT-DfGdOsTs.js +7 -0
  270. package/dist/it-IT-DgRuEpeD.js +7 -0
  271. package/dist/it-IT-tZ7dP-Ia.js +7 -0
  272. package/dist/ja-JP--tMJF7eu.js +7 -0
  273. package/dist/ja-JP-BjMyxZiN.js +7 -0
  274. package/dist/ja-JP-Ct54-uwM.js +7 -0
  275. package/dist/ja-JP-CtX9NZKD.js +7 -0
  276. package/dist/ja-JP-DAClbueM.js +7 -0
  277. package/dist/ja-JP-DOuEAOlh.js +7 -0
  278. package/dist/keys-Ce8YnRP2.js +20 -0
  279. package/dist/{legalArrangementUtils-xvCxpgzJ.js → legalArrangementUtils-C68JdH6I.js} +2 -1
  280. package/dist/listToRecord-DumSkYDz.js +10 -0
  281. package/dist/{location-Dk0rAiaT.js → location-zRH5zJ8c.js} +2 -2
  282. package/dist/lt-LT-BUuouq_-.js +7 -0
  283. package/dist/lt-LT-Cs3cvyKf.js +7 -0
  284. package/dist/lt-LT-DQp7UGdC.js +7 -0
  285. package/dist/lt-LT-DoYCfhZU.js +7 -0
  286. package/dist/lt-LT-DqtpAjOg.js +7 -0
  287. package/dist/lv-LV-BCXqSzkk.js +7 -0
  288. package/dist/lv-LV-BW0BscAd.js +7 -0
  289. package/dist/lv-LV-C3p57pZV.js +7 -0
  290. package/dist/lv-LV-ZmyUvPst.js +7 -0
  291. package/dist/lv-LV-cKvnQI3j.js +7 -0
  292. package/dist/{mail-DG7MBDNE.js → mail-i1-zg-cv.js} +2 -2
  293. package/dist/{mapAddressLocalizationToJpAddressSchema-TUaHGQh6.js → mapAddressLocalizationToJpAddressSchema-DpOIaxj6.js} +2 -2
  294. package/dist/{mapExistingFile-CwGW1ru4.js → mapExistingFile-2QXrkhqJ.js} +2 -2
  295. package/dist/{mapJpAddressSchemaToAddressLocalizations-CdP6PRAO.js → mapJpAddressSchemaToAddressLocalizations-D3VO2nhc.js} +4 -3
  296. package/dist/{mapLegalEntityToIndividualSchema-ByhXwZqs.js → mapLegalEntityToIndividualSchema-Crz7aXZB.js} +49 -12
  297. package/dist/mapScriptLocalization-BCfkZo1y.js +46 -0
  298. package/dist/{mapTransferInstrumentToPayoutAccount-6eLKhumO.js → mapTransferInstrumentToPayoutAccount-BrbrK2wk.js} +3 -3
  299. package/dist/{form-rules-zzbZ2bV6.js → maskHelpers-C0wnCoJl.js} +9 -379
  300. package/dist/{minus-circle-filled-DglqAgJW.js → minus-circle-filled-CxUdRO8J.js} +2 -2
  301. package/dist/nl-NL-B77Xr99l.js +7 -0
  302. package/dist/nl-NL-BUwMAW5C.js +7 -0
  303. package/dist/nl-NL-B_MaTF5h.js +7 -0
  304. package/dist/nl-NL-CePL3t7P.js +7 -0
  305. package/dist/nl-NL-DR5SCDAF.js +7 -0
  306. package/dist/nl-NL-DqGE4Nz5.js +7 -0
  307. package/dist/no-NO-BePxpMbr.js +7 -0
  308. package/dist/no-NO-DGCfRiU8.js +7 -0
  309. package/dist/no-NO-DdI2BI_e.js +7 -0
  310. package/dist/no-NO-P8SZ1t-h.js +7 -0
  311. package/dist/no-NO-oL1v_O9N.js +7 -0
  312. package/dist/{options-horizontal-CTUn7IEx.js → options-horizontal-D86T_xAF.js} +2 -2
  313. package/dist/{partner-1StoI4_W.js → partner-Dje0ykF6.js} +2 -2
  314. package/dist/patternValidators-DsrZkuOO.js +73 -0
  315. package/dist/{pay-by-link-plane-Sa_qkL8C.js → pay-by-link-plane-DAiddPu6.js} +2 -2
  316. package/dist/{payout-BAYSxSqU.js → payout-DKiGv3F9.js} +2 -2
  317. package/dist/{pdf-uNYg4Mqz.js → pdf-CC8vqpTo.js} +37 -32
  318. package/dist/{pdf.worker.min-gK7UJW5a.js → pdf.worker.min-CdKJICZZ.js} +733 -253
  319. package/dist/{person-Da15_s3G.js → person-DgALGIIz.js} +2 -2
  320. package/dist/pl-PL-6Q3Ue3F5.js +7 -0
  321. package/dist/pl-PL-B5PBixAB.js +7 -0
  322. package/dist/pl-PL-BCkw9R28.js +7 -0
  323. package/dist/pl-PL-BY6KUTBO.js +7 -0
  324. package/dist/pl-PL-D-s-JI6X.js +7 -0
  325. package/dist/{plus-BQccvKkd.js → plus-DlQKP2C9.js} +2 -2
  326. package/dist/{plus-circle-filled-CqC30FRL.js → plus-circle-filled-BntUOVIJ.js} +2 -2
  327. package/dist/{processCapabilities-DRD0Aq2i.js → processCapabilities-CWE5UFt8.js} +50 -54
  328. package/dist/{processValidationErrors-oxuCOsth.js → processValidationErrors-CjsNfiRK.js} +4 -4
  329. package/dist/pt-BR-B_XHiDCU.js +7 -0
  330. package/dist/pt-BR-BvNR77Ru.js +7 -0
  331. package/dist/pt-BR-CrLCMcSz2.js +7 -0
  332. package/dist/pt-BR-MrUfWW4a.js +7 -0
  333. package/dist/pt-BR-vwt2tE7H.js +7 -0
  334. package/dist/pt-PT-B17is9TY.js +7 -0
  335. package/dist/pt-PT-BZNPd_Tb.js +7 -0
  336. package/dist/pt-PT-DDYnXawl.js +7 -0
  337. package/dist/pt-PT-DhF8wwYH.js +7 -0
  338. package/dist/pt-PT-Du2K44jh.js +7 -0
  339. package/dist/pt-PT-qAzFgjvF.js +7 -0
  340. package/dist/{recurring-DSR1fNMh.js → recurring-DZgT_ekJ.js} +2 -2
  341. package/dist/resolveEnvironment-mrb68kgW.js +1000 -0
  342. package/dist/{revenue-accelerate-CPhAVpPK.js → revenue-accelerate-aMLYFVW6.js} +2 -2
  343. package/dist/ro-RO-B3Fcn95o.js +7 -0
  344. package/dist/ro-RO-BA5GhaCE.js +7 -0
  345. package/dist/ro-RO-BmHe4pZ-.js +7 -0
  346. package/dist/ro-RO-DChAv29z.js +7 -0
  347. package/dist/ro-RO-W1t7Mnbn.js +7 -0
  348. package/dist/roleMetadata-Dm1FVuPT.js +56 -0
  349. package/dist/{save-DQ-mJX8e.js → save-uDNye08N.js} +2 -2
  350. package/dist/{search-DWqWTW_K.js → search-0OS6oe8N.js} +2 -2
  351. package/dist/{show-BbhlD3IY.js → show-BWoS9-Y1.js} +2 -2
  352. package/dist/sk-SK-BeNF_m_j.js +7 -0
  353. package/dist/sk-SK-C9CiQLgt.js +7 -0
  354. package/dist/sk-SK-CISCMQ2G.js +7 -0
  355. package/dist/sk-SK-CcoUWnJ4.js +7 -0
  356. package/dist/sk-SK-D10Kpths.js +7 -0
  357. package/dist/sl-SI-Bxu4m_5e.js +7 -0
  358. package/dist/sl-SI-DCMml0lX.js +7 -0
  359. package/dist/sl-SI-DmYiMn91.js +7 -0
  360. package/dist/sl-SI-DxomO9JQ.js +7 -0
  361. package/dist/sl-SI-Qe4hzx5a.js +7 -0
  362. package/dist/{solution-payments-D4BORMsX.js → solution-payments-BMal7uJZ.js} +2 -2
  363. package/dist/{store-DWaq3ZiC.js → store-N7ZA4FKy.js} +2 -2
  364. package/dist/style.css +2341 -2252
  365. package/dist/styles-DYaAeu4q.js +2337 -2248
  366. package/dist/summaryItem-uDWmtYtt.js +16 -0
  367. package/dist/sv-SE-B-CXDaXM.js +7 -0
  368. package/dist/sv-SE-BzPNBHOj.js +7 -0
  369. package/dist/sv-SE-C9SgeFv6.js +7 -0
  370. package/dist/sv-SE-DESDUMyu.js +7 -0
  371. package/dist/sv-SE-Dq6oK7B5.js +7 -0
  372. package/dist/sv-SE-issaSBHd.js +7 -0
  373. package/dist/{terminal-1-crR-pS_R.js → terminal-1-0RlQpbUC.js} +2 -2
  374. package/dist/toFullWidth-Dgy4X4i8.js +52 -0
  375. package/dist/{translation-BOm4lmPx.js → translation-DbATp_35.js} +91 -64
  376. package/dist/trustUtil-5cyXiJnX.js +98 -0
  377. package/dist/types/adaptiveWorkflow/components/Fields/TaxInformation/TaxIdTypeSelectorField.d.ts +1 -2
  378. package/dist/types/adaptiveWorkflow/components/Fields/TaxInformation/TaxInformationFieldGroup.d.ts +1 -2
  379. package/dist/types/adaptiveWorkflow/utils/utils.d.ts +1 -1
  380. package/dist/types/api/configurations/useScenarios.d.ts +1 -1
  381. package/dist/types/api/createLegalEntity/useCreateLegalEntity.d.ts +12 -12
  382. package/dist/types/api/documentValidation/useDocumentValidate.d.ts +2 -2
  383. package/dist/types/api/documents/documents.types.d.ts +9 -0
  384. package/dist/types/api/documents/useCreateDocument.d.ts +10 -3
  385. package/dist/types/api/documents/useDeleteDocument.d.ts +1 -1
  386. package/dist/types/api/documents/useDocument.d.ts +1 -1
  387. package/dist/types/api/documents/useDocuments.d.ts +10 -2
  388. package/dist/types/api/documents/useUpdateDocument.d.ts +3 -3
  389. package/dist/types/api/invitedEntity/getInvitedEntityProblems.d.ts +1 -1
  390. package/dist/types/api/legalEntity/legalEntity.types.d.ts +32 -0
  391. package/dist/types/api/legalEntity/useLegalEntity.d.ts +92 -92
  392. package/dist/types/api/legalEntity/useUpdateLegalEntity.d.ts +14 -14
  393. package/dist/types/api/taskStatus/useTaskStatuses.d.ts +1 -1
  394. package/dist/types/api/transferInstruments/transferInstruments.types.d.ts +18 -0
  395. package/dist/types/api/transferInstruments/useCreateTransferInstrument.d.ts +2 -2
  396. package/dist/types/api/transferInstruments/useTransferInstrument.d.ts +1 -1
  397. package/dist/types/api/transferInstruments/useUpdateTransferInstrument.d.ts +2 -2
  398. package/dist/types/api/transferInstruments/useUpdateTrustedTransferInstrument.d.ts +1 -1
  399. package/dist/types/components/Apps/tasks/TaskList/TaskList.d.ts +1 -1
  400. package/dist/types/components/BankAccount/fields/BankAccountNumber/fieldConfig.d.ts +2 -0
  401. package/dist/types/components/BankAccount/forms/BankDocument/types.d.ts +1 -1
  402. package/dist/types/components/BankAccount/forms/PayoutAccount/types.d.ts +1 -1
  403. package/dist/types/components/BankAccount/forms/PayoutCountryDetails/types.d.ts +1 -1
  404. package/dist/types/components/BankAccount/forms/PayoutDetails/PayoutDetails.d.ts +1 -1
  405. package/dist/types/components/BankAccount/forms/PayoutDetails/types.d.ts +1 -1
  406. package/dist/types/components/BankAccount/forms/PayoutVerificationMethod/AccountHolderDescriptionFragment.d.ts +1 -1
  407. package/dist/types/components/BankAccount/forms/PayoutVerificationMethod/types.d.ts +1 -1
  408. package/dist/types/components/BankAccount/forms/PayoutVerificationMethod/utils.d.ts +1 -1
  409. package/dist/types/components/BankAccount/mapping/mapPayoutAccountSchemaToApiBankAccount.d.ts +2 -2
  410. package/dist/types/components/BankAccount/mapping/mapPayoutDetailsToTransferInstrument.d.ts +3 -3
  411. package/dist/types/components/BankAccount/mapping/mapPayoutDocumentsToApiDocuments.d.ts +2 -2
  412. package/dist/types/components/BankAccount/mapping/mapTransferInstrumentToPayoutAccount.d.ts +1 -1
  413. package/dist/types/components/BankAccount/mapping/payoutKeyMappings.d.ts +8 -4
  414. package/dist/types/components/BankAccount/tasks/PayoutAccount/PayoutAccountTaskListItem.d.ts +2 -2
  415. package/dist/types/components/BankAccount/tasks/PayoutDetailsDropin/utils.d.ts +1 -1
  416. package/dist/types/components/Business/hooks/useBusinessDetailsData.d.ts +1 -1
  417. package/dist/types/components/Business/hooks/useSubmitBusinessDetails.types.d.ts +1 -1
  418. package/dist/types/components/Business/mapping/businessDetails/businessDetailsKeyMappings.d.ts +4 -4
  419. package/dist/types/components/Business/mapping/businessDetails/mapBusinessDetailsSchemaToLegalEntity.d.ts +4 -4
  420. package/dist/types/components/Business/mapping/businessDetails/mapLegalEntityToBusinessDetailsSchema.d.ts +1 -1
  421. package/dist/types/components/Business/mapping/businessDetails/solePropBusinessDetailsKeyMappings.d.ts +4 -4
  422. package/dist/types/components/Business/tasks/BusinessDetailsDropin/types.d.ts +1 -1
  423. package/dist/types/components/Business/utils/buildRequiredForms.d.ts +1 -1
  424. package/dist/types/components/Business/utils/getAvailableCompanyStructures.d.ts +1 -2
  425. package/dist/types/components/Business/utils/utils.d.ts +2 -15
  426. package/dist/types/components/BusinessLines/tasks/types.d.ts +1 -1
  427. package/dist/types/components/Contract/tasks/PciDropin/types.d.ts +1 -1
  428. package/dist/types/components/Contract/tasks/ServiceAgreementDropin/types.d.ts +1 -1
  429. package/dist/types/components/EFP/mapping/businessFinancingKeyMappings.d.ts +33 -33
  430. package/dist/types/components/EFP/mapping/mapBusinessFinancingToLegalEntity.d.ts +2 -2
  431. package/dist/types/components/EFP/mapping/mapLegalEntityToBusinessFinancing.d.ts +2 -2
  432. package/dist/types/components/EFP/tasks/BusinessFinancingDropin/types.d.ts +3 -3
  433. package/dist/types/components/EFP/tasks/BusinessFinancingDropin/utils.d.ts +3 -4
  434. package/dist/types/components/EFP/tasks/SourceOfFundsDropin/SourceOfFundsGettingStarted/SourceOfFundsGettingStarted.d.ts +2 -3
  435. package/dist/types/components/EFP/tasks/SourceOfFundsDropin/SourceOfFundsUploader/SourceOfFundsUpload.d.ts +1 -1
  436. package/dist/types/components/EFP/tasks/SourceOfFundsDropin/types.d.ts +1 -3
  437. package/dist/types/components/EFP/tasks/SourceOfFundsDropin/utils.d.ts +13 -5
  438. package/dist/types/components/EFP/tasks/TaxReportingDropin/TaxReportingGettingStarted.d.ts +2 -2
  439. package/dist/types/components/EmbeddedDropins/CreateTransferInstrumentComponent/CreateTransferInstrumentComponent.d.ts +1 -1
  440. package/dist/types/components/EmbeddedDropins/ManageIndividualComponent/ManageIndividualComponent.d.ts +1 -1
  441. package/dist/types/components/EmbeddedDropins/ManageTransferInstrumentComponent/ManageTransferInstrumentComponent.d.ts +1 -1
  442. package/dist/types/components/EmbeddedDropins/ManageTransferInstrumentComponent/ManageTransferInstrumentOverview/ManageTransferInstrumentOverview.d.ts +1 -2
  443. package/dist/types/components/EmbeddedDropins/ManageTransferInstrumentComponent/ManageTransferInstrumentOverviewItem/ManageTransferInstrumentOverviewItem.d.ts +1 -2
  444. package/dist/types/components/EmbeddedDropins/ManageTransferInstrumentComponent/ManageTransferInstrumentOverviewItemModal/ManageTransferInstrumentOverviewItemModal.d.ts +1 -2
  445. package/dist/types/components/EmbeddedDropins/OnboardingDropinComponent/DropinComposer/types.d.ts +1 -1
  446. package/dist/types/components/EmbeddedDropins/ViewVerificationStatus/ViewVerificationStatusComponent.d.ts +1 -1
  447. package/dist/types/components/GlobalEntry/companyTypeMetadata.d.ts +10 -0
  448. package/dist/types/components/GlobalEntry/forms/CompanyStructure/CompanyStructure.d.ts +3 -0
  449. package/dist/types/components/GlobalEntry/forms/CompanyStructure/types.d.ts +10 -0
  450. package/dist/types/components/GlobalEntry/forms/RegistrationInformation/RegistrationInformation.d.ts +1 -1
  451. package/dist/types/components/GlobalEntry/{globalEntryKeyMapping.d.ts → mapping/globalEntryKeyMapping.d.ts} +9 -9
  452. package/dist/types/components/GlobalEntry/mapping/mapGlobalEntrySchemaToLegalEntity.d.ts +6 -0
  453. package/dist/types/components/GlobalEntry/mapping/mapLegalEntityToGlobalEntrySchema.d.ts +9 -0
  454. package/dist/types/components/GlobalEntry/rules.d.ts +1 -0
  455. package/dist/types/components/GlobalEntry/tasks/GlobalEntry.d.ts +1 -1
  456. package/dist/types/components/GlobalEntry/tasks/GlobalEntryModal.d.ts +1 -1
  457. package/dist/types/components/GlobalEntry/tasks/types.d.ts +2 -0
  458. package/dist/types/components/GlobalEntry/utils/buildRequiredForms.d.ts +16 -0
  459. package/dist/types/components/GlobalEntry/utils/getAvailableCompanyStructures.d.ts +12 -0
  460. package/dist/types/components/GlobalEntry/utils/submitGlobalEntry.d.ts +20 -0
  461. package/dist/types/components/GlobalEntry/utils/utils.d.ts +18 -0
  462. package/dist/types/components/GlobalEntry/validate.d.ts +3 -1
  463. package/dist/types/components/Individual/forms/BasicDetails/BasicDetails.types.d.ts +3 -3
  464. package/dist/types/components/Individual/forms/IdDocumentUpload/types.d.ts +1 -1
  465. package/dist/types/components/Individual/forms/IdNowVerificationModal/isIdNowModalOpen.d.ts +8 -8
  466. package/dist/types/components/Individual/forms/Individual.types.d.ts +2 -3
  467. package/dist/types/components/Individual/helpers/bafinUtils.d.ts +3 -4
  468. package/dist/types/components/Individual/helpers/findRelevantTaxInformation.d.ts +28 -0
  469. package/dist/types/components/Individual/helpers/hasLiveSelfieError.d.ts +11 -0
  470. package/dist/types/components/Individual/helpers/isManualVerificationOrExistingDoc.d.ts +13 -0
  471. package/dist/types/components/Individual/mapping/individualKeyMappings.d.ts +4 -4
  472. package/dist/types/components/Individual/mapping/mapIndividualDocumentToApiDocument.d.ts +2 -2
  473. package/dist/types/components/Individual/mapping/mapIndividualSchemaToLegalEntity.d.ts +2 -2
  474. package/dist/types/components/Individual/mapping/mapLegalEntityToIndividualSchema.d.ts +1 -1
  475. package/dist/types/components/Individual/tasks/DecisionMakers/DecisionMakerDetails/DecisionMakerDetails.types.d.ts +1 -1
  476. package/dist/types/components/Individual/tasks/DecisionMakers/DecisionMakerDetails/utils.d.ts +34 -10
  477. package/dist/types/components/Individual/tasks/DecisionMakers/getTrustedDecisionMakers.d.ts +2 -3
  478. package/dist/types/components/Individual/tasks/DecisionMakers/hooks/useTaskStatusWithTimeout.d.ts +1 -0
  479. package/dist/types/components/Individual/tasks/DecisionMakers/types.d.ts +2 -3
  480. package/dist/types/components/Individual/tasks/DecisionMakers/utils.d.ts +1 -1
  481. package/dist/types/components/Shared/EntityAssociation/types.d.ts +2 -2
  482. package/dist/types/components/Shared/Introduction/Introduction.d.ts +1 -1
  483. package/dist/types/components/Shared/Introduction/IntroductionScreen.d.ts +1 -1
  484. package/dist/types/components/Shared/Introduction/constants.d.ts +1 -1
  485. package/dist/types/components/Shared/Introduction/copy.d.ts +1 -1
  486. package/dist/types/components/Shared/SingpassBanner/SingpassBanner.d.ts +1 -1
  487. package/dist/types/components/Shared/SingpassSelection/types.d.ts +1 -1
  488. package/dist/types/components/Shared/devex/DebugListener/debugInfo.d.ts +1 -2
  489. package/dist/types/components/Shared/fields/BusinessRegistrationNumberField/RegistrationNumberTypeSelector/getDefaultRegistrationNumberType.d.ts +1 -2
  490. package/dist/types/components/Shared/fields/TaxInformationField/TaxIdNumberTypeSelector/TaxIdNumberTypeSelector.d.ts +1 -2
  491. package/dist/types/components/Shared/fields/TaxInformationField/TaxIdNumberTypeSelector/findExistingTaxInformation.d.ts +10 -0
  492. package/dist/types/components/Shared/fields/TaxInformationField/fieldConfig.d.ts +3 -4
  493. package/dist/types/components/Shared/fields/TaxInformationField/taxIdNumberTypes.d.ts +107 -8
  494. package/dist/types/components/Shared/fields/TaxInformationField/types.d.ts +7 -6
  495. package/dist/types/components/Shared/fields/VatNumberField/VatNumberTypeSelector/VatNumberTypeSelector.d.ts +1 -2
  496. package/dist/types/components/Shared/forms/Address/utils.d.ts +1 -1
  497. package/dist/types/components/Shared/forms/BusinessTypeSelection/types.d.ts +1 -1
  498. package/dist/types/components/Shared/forms/BusinessTypeSelection/useUpdateLegalEntityAndSelectAccountHolder.d.ts +1 -2
  499. package/dist/types/components/Shared/forms/BusinessTypeSelection/utils.d.ts +2 -4
  500. package/dist/types/components/Shared/forms/ConstitutionalDocument/types.d.ts +1 -1
  501. package/dist/types/components/Shared/forms/DocumentUpload/types.d.ts +1 -1
  502. package/dist/types/components/Shared/tasks/CustomerSupport/mapping/customerSupportKeyMapping.d.ts +2 -2
  503. package/dist/types/components/Trust/hooks/useExemptSettlor.d.ts +1 -1
  504. package/dist/types/components/Trust/hooks/useTrustMemberNavigation.hook.d.ts +1 -1
  505. package/dist/types/components/Trust/mapping/mapLegalEntityToTrust.d.ts +1 -1
  506. package/dist/types/components/Trust/mapping/mapTrustDocumentToApiDocument.d.ts +2 -2
  507. package/dist/types/components/Trust/mapping/mapTrustToLegalEntity.d.ts +2 -2
  508. package/dist/types/components/Trust/mapping/trustKeyMappings.d.ts +4 -4
  509. package/dist/types/components/Trust/mapping/trustMembers/getTrustMembers.d.ts +1 -1
  510. package/dist/types/components/Trust/mapping/trustMembers/mapEntityAssociationsToTrustMembers.d.ts +3 -4
  511. package/dist/types/components/Trust/mapping/trustMembers/mapRootLegalEntityToTrustMember.d.ts +1 -1
  512. package/dist/types/components/Trust/tasks/RoleAndTypeDropin/types.d.ts +1 -1
  513. package/dist/types/components/Trust/tasks/TrustDropin/types.d.ts +1 -1
  514. package/dist/types/components/Trust/tasks/TrustMembers/types.d.ts +3 -4
  515. package/dist/types/components/Trust/utils/addOrUpdateAssociatedTrustMember.d.ts +1 -1
  516. package/dist/types/components/Trust/utils/addOrUpdateUndefinedBeneficiary.d.ts +1 -1
  517. package/dist/types/components/Trust/utils/createExemptSettlor.d.ts +1 -1
  518. package/dist/types/components/Trust/utils/deleteAssociatedTrustMember.d.ts +1 -1
  519. package/dist/types/components/Trust/utils/deleteUndefinedBeneficiary.d.ts +1 -1
  520. package/dist/types/components/Trust/utils/trustUtil.d.ts +5 -6
  521. package/dist/types/components/Trust/utils/updateExemptSettlorName.d.ts +1 -1
  522. package/dist/types/components/UnincorporatedPartnership/hooks/useUnincorporatedPartnershipNavigation.d.ts +1 -2
  523. package/dist/types/components/UnincorporatedPartnership/mapping/mapLegalEntityToUnincorporatedPartnership.d.ts +1 -1
  524. package/dist/types/components/UnincorporatedPartnership/mapping/mapUnincorporatedPartnershipToLegalEntity.d.ts +2 -2
  525. package/dist/types/components/UnincorporatedPartnership/mapping/unincorporatedPartnershipKeyMappings.d.ts +3 -3
  526. package/dist/types/components/UnincorporatedPartnership/tasks/UnincorporatedPartnershipMembers/types.d.ts +1 -2
  527. package/dist/types/components/UnincorporatedPartnership/tasks/UnincorporatedPartnershipRoleAndType/types.d.ts +1 -2
  528. package/dist/types/components/UnincorporatedPartnership/utils/unincorporatedPartnershipMembers.d.ts +3 -4
  529. package/dist/types/components/ui/molecules/DocumentGuidance/DocumentGuidance.types.d.ts +1 -1
  530. package/dist/types/context/ToggleContext/types.d.ts +0 -4
  531. package/dist/types/core/errorMapping.d.ts +3 -4
  532. package/dist/types/core/models/api/accountIdentification.d.ts +5 -1
  533. package/dist/types/core/models/api/legal-entity-association.d.ts +0 -19
  534. package/dist/types/core/process-field-configurations.d.ts +4 -6
  535. package/dist/types/core/user-events.d.ts +2 -4
  536. package/dist/types/hooks/introduction/useCanSeeIntroduction.d.ts +1 -1
  537. package/dist/types/hooks/introduction/useIntroductionScreens.d.ts +1 -1
  538. package/dist/types/hooks/introduction/useShouldShowIntroduction.d.ts +1 -1
  539. package/dist/types/hooks/singpass/useSingpassMyInfoLogin.d.ts +1 -1
  540. package/dist/types/hooks/useAssociatedLegalEntity.d.ts +1 -2
  541. package/dist/types/hooks/useAssociatedLegalRepresentative.d.ts +1 -1
  542. package/dist/types/hooks/useBusinessSetup.d.ts +1 -1
  543. package/dist/types/hooks/useForm/types.d.ts +1 -2
  544. package/dist/types/hooks/useLegalEntityType.d.ts +1 -2
  545. package/dist/types/hooks/useScenarioConfiguration.d.ts +1 -1
  546. package/dist/types/router/DefaultRouteRedirect.d.ts +1 -1
  547. package/dist/types/router/OnboardingRouter.d.ts +1 -2
  548. package/dist/types/router/getDefaultTask.d.ts +1 -1
  549. package/dist/types/stores/globalStore/calculateTaskStatus.d.ts +3 -5
  550. package/dist/types/stores/globalStore/determineTaskIdentifiers.d.ts +3 -5
  551. package/dist/types/stores/globalStore/get-task-status.d.ts +4 -4
  552. package/dist/types/stores/globalStore/globalStore.d.ts +3 -5
  553. package/dist/types/stores/globalStore/isEmptyEntity.d.ts +1 -1
  554. package/dist/types/types/businessEntityType.d.ts +1 -2
  555. package/dist/types/types/errors/capability-problems.d.ts +5 -1
  556. package/dist/types/types/errors/entity-problems.d.ts +8 -5
  557. package/dist/types/types/form-rules.d.ts +1 -1
  558. package/dist/types/utils/accountHolderUtils.d.ts +1 -1
  559. package/dist/types/utils/addLinkedFields.d.ts +2 -2
  560. package/dist/types/utils/analytics/debouncedInputEvent.d.ts +4 -4
  561. package/dist/types/utils/analytics/getAnalyticsAssociatedEntityDetails.d.ts +2 -3
  562. package/dist/types/utils/analytics/getPrefilledDetails.d.ts +2 -2
  563. package/dist/types/utils/api/documentUtils.d.ts +21 -10
  564. package/dist/types/utils/api/getProblemsForEntity.d.ts +1 -1
  565. package/dist/types/utils/api/processCapabilities.d.ts +11 -4
  566. package/dist/types/utils/bankUtils.d.ts +5 -0
  567. package/dist/types/utils/birthDateUtils.d.ts +6 -1
  568. package/dist/types/utils/businessUtils.d.ts +21 -6
  569. package/dist/types/utils/customerSupportUtils.d.ts +2 -3
  570. package/dist/types/utils/decisionMakerRoles.d.ts +4 -5
  571. package/dist/types/utils/entityAssociationUtil.d.ts +21 -12
  572. package/dist/types/utils/entityStatusUtil.d.ts +1 -1
  573. package/dist/types/utils/getFieldsWithExistingData.d.ts +2 -2
  574. package/dist/types/utils/getLegalEntityCountry.d.ts +1 -1
  575. package/dist/types/utils/getName.d.ts +3 -3
  576. package/dist/types/utils/getTrustedFields.d.ts +4 -5
  577. package/dist/types/utils/mapping/documentGuidanceMap.d.ts +2 -2
  578. package/dist/types/utils/mapping/getPage.d.ts +3 -4
  579. package/dist/types/utils/mapping/mappingRecord.d.ts +1 -1
  580. package/dist/types/utils/roleMetadata.d.ts +1 -1
  581. package/dist/types/utils/unincorporatedParnershipUtils.d.ts +4 -4
  582. package/dist/{types-BeveNAZK.js → types-B9zXzag-.js} +4 -5
  583. package/dist/{types-wRlt8bxb.js → types-BA3bcGAv.js} +1 -1
  584. package/dist/types-CZAHRt31.js +147 -0
  585. package/dist/types-Cwq1JAWT.js +31 -0
  586. package/dist/{upload-D85xAAAm.js → upload-C5NC1E4N.js} +2 -2
  587. package/dist/uppercase-DvjwUM0n.js +7 -0
  588. package/dist/useAccountHolder-BpIX1iBG.js +102 -0
  589. package/dist/useAllowedCountries-qyvo-c6A.js +80 -0
  590. package/dist/useAnalyticsContext-gSnRnYgV.js +12 -0
  591. package/dist/{getFormSlice-DzRO0UUx.js → useAssociatedLegalEntity-BdcoiUby.js} +2 -19
  592. package/dist/{useBusinessDetailsData-Bja80UYy.js → useBusinessDetailsData-sWGe796Y.js} +170 -160
  593. package/dist/{useCanSeeIntroduction-BcfQC4IP.js → useCanSeeIntroduction-DQbanJNE.js} +13 -13
  594. package/dist/useCreateLegalEntity-CYZd_62a.js +24 -0
  595. package/dist/{useDataMissingRemediations-msU1AJvo.js → useDataMissingRemediations-ttUrk09_.js} +4 -4
  596. package/dist/useDataset-CdLBLq98.js +98 -0
  597. package/dist/useDeleteTransferInstrument-C10xzHiO.js +31 -0
  598. package/dist/{useForm-DbDFfb2S.js → useForm-CWrbJG44.js} +7 -5
  599. package/dist/{useHideTaskStepper-CbMcV9mk.js → useHideTaskStepper-Dk7ZQ3U8.js} +1 -1
  600. package/dist/useId-BkDhUta2.js +28 -0
  601. package/dist/useMultiForm-BxASst0O.js +790 -0
  602. package/dist/{useNavigate-CiKOI5QV.js → useNavigate-DkfNV3JZ.js} +33 -33
  603. package/dist/{useSalesChannels-BvGJ9PT6.js → useSalesChannels-B06_h460.js} +3 -3
  604. package/dist/{useScenarios-CGcmXgJv.js → useScenarios-BfYE0clW.js} +2 -2
  605. package/dist/useSettingsContext-9O3Aqpfq.js +12 -0
  606. package/dist/{useTaskLandedEvent-pmN03gtI.js → useTaskLandedEvent-DwZHcMEQ.js} +2 -2
  607. package/dist/useToastContext-B6Mqc2HY.js +12 -0
  608. package/dist/useToggleContext-B_YexrbT.js +21 -0
  609. package/dist/{useTrustMembers-f13Kf1Zk.js → useTrustMembers-DtOJPaaV.js} +13 -14
  610. package/dist/{useUnincorporatedPartnershipMembers-K5jkCKfJ.js → useUnincorporatedPartnershipMembers-CxDZCOte.js} +8 -9
  611. package/dist/useUpdateLegalEntity-B7LRg8m0.js +29 -0
  612. package/dist/{StateField-CsO_28Co.js → utils-BWumuCvl.js} +3 -89
  613. package/dist/{utils-BUOt0VrX.js → utils-CJcGZvj1.js} +13 -14
  614. package/dist/utils-CYUYe54m.js +24 -0
  615. package/dist/{bafinUtils-M2AASP_e.js → utils-Ck_mZapQ.js} +1534 -1742
  616. package/dist/utils-DdHbAadK.js +80 -0
  617. package/dist/{utils-2tir5QtF.js → utils-SKYT7xU4.js} +2 -2
  618. package/dist/{validate-BpZBKknS.js → validate-96E_RrNB.js} +3 -3
  619. package/dist/{validate-u6nDNwf1.js → validate-BCNnfwPW.js} +2 -2
  620. package/dist/{validate-YBDlgvjy.js → validate-D-l4YRka.js} +7 -6
  621. package/dist/{validate-CPTQceEQ.js → validate-DKwCZSlM.js} +64 -37
  622. package/dist/{validateExtractionResult-dH4TewHf.js → validateExtractionResult-D3d0xx90.js} +4 -4
  623. package/dist/{validationError-B-B3GC86.js → validationError-DV6t8Ubb.js} +2 -2
  624. package/dist/validationResult-bjYBDjbU.js +29 -0
  625. package/dist/validatorUtils-D2O6AAZn.js +106 -0
  626. package/dist/{warning-circle-fill-BDTmKU1s.js → warning-circle-fill-C2lMYPJW.js} +2 -2
  627. package/dist/{warning-diamond-filled-BjDL-xa8.js → warning-diamond-filled-CQ2DdW5g.js} +2 -2
  628. package/dist/{webinar-YMbPoCx3.js → webinar-BpZWqd-g.js} +2 -2
  629. package/package.json +26 -26
  630. package/dist/Icon-C3S5_kkS.js +0 -175
  631. package/dist/LegalRepresentativeDetailsPage-CvGtANu3.js +0 -74
  632. package/dist/PayoutDetailsPage-MW5Pygp2.js +0 -70
  633. package/dist/RadioGroup-D8DRUJ2o.js +0 -1806
  634. package/dist/RootBusinessDetailsPage-Cmh9Z_4g.js +0 -68
  635. package/dist/RootIndividualDetailsPage-04cJ6C15.js +0 -80
  636. package/dist/SoleProprietorshipPage-CWegllTo.js +0 -70
  637. package/dist/TrustMemberCompanyPage-DTe7xWpj.js +0 -109
  638. package/dist/TrustMemberIndividualPage-C1BDs9Rm.js +0 -110
  639. package/dist/UnincorporatedPartnershipIndividualPage-DdPh2_sa.js +0 -79
  640. package/dist/bg-BG-BtgA44Ui.js +0 -7
  641. package/dist/bg-BG-DX5QKxJz.js +0 -7
  642. package/dist/bg-BG-DYkxVgeJ.js +0 -7
  643. package/dist/bg-BG-K6LIkCdf.js +0 -7
  644. package/dist/bg-BG-uuNDTOoN.js +0 -7
  645. package/dist/cs-CZ-BJSrh3Vp.js +0 -7
  646. package/dist/cs-CZ-CMXGY6Ep.js +0 -7
  647. package/dist/cs-CZ-Ci8c58xJ.js +0 -7
  648. package/dist/cs-CZ-Cu1v5FA8.js +0 -7
  649. package/dist/cs-CZ-lJQmuyHq.js +0 -7
  650. package/dist/da-DK-B9O3xbY6.js +0 -7
  651. package/dist/da-DK-BNwXg4DX.js +0 -7
  652. package/dist/da-DK-C1kmOHvo.js +0 -7
  653. package/dist/da-DK-D53M_d04.js +0 -7
  654. package/dist/da-DK-DjAV5d9A.js +0 -7
  655. package/dist/de-DE-B3sSNcDv.js +0 -7
  656. package/dist/de-DE-C9N6F5oM.js +0 -7
  657. package/dist/de-DE-CjMOQMqQ.js +0 -7
  658. package/dist/de-DE-qJPTCQlG.js +0 -7
  659. package/dist/de-DE-qSBQE-6M.js +0 -7
  660. package/dist/de-DE-w4l6boYT.js +0 -7
  661. package/dist/decision-makers-group-DAoxQRJ3.js +0 -4169
  662. package/dist/el-GR-BLNCX9mm.js +0 -7
  663. package/dist/el-GR-Bx996PXx.js +0 -7
  664. package/dist/el-GR-CgoxpC-Q.js +0 -7
  665. package/dist/el-GR-DaAMIpOR.js +0 -7
  666. package/dist/el-GR-DqTetsjB.js +0 -7
  667. package/dist/el-GR-pGsVWsOm.js +0 -7
  668. package/dist/en-US-B82BbZaB.js +0 -7
  669. package/dist/en-US-C3i5Oge2.js +0 -7
  670. package/dist/en-US-C8karqc5.js +0 -7
  671. package/dist/en-US-CJPD8qHc.js +0 -7
  672. package/dist/en-US-D0fscfsz.js +0 -7
  673. package/dist/en-US-DapC--Cs.js +0 -7
  674. package/dist/es-ES-C14ZT-97.js +0 -7
  675. package/dist/es-ES-DeT4zIDW.js +0 -7
  676. package/dist/es-ES-DyB2KXfT.js +0 -7
  677. package/dist/es-ES-U4-lDfZq.js +0 -7
  678. package/dist/es-ES-tVQDUTJN.js +0 -7
  679. package/dist/es-ES-wvcyuTNN.js +0 -7
  680. package/dist/es-LA-B5IRDCf_.js +0 -7
  681. package/dist/es-LA-B_hzWiiE.js +0 -7
  682. package/dist/es-LA-CG_cu1hM.js +0 -7
  683. package/dist/es-LA-ChLRkx-r.js +0 -7
  684. package/dist/es-LA-mFT_9PL_.js +0 -7
  685. package/dist/et-EE-4_ZUNt3W.js +0 -7
  686. package/dist/et-EE-BCWBT8XN.js +0 -7
  687. package/dist/et-EE-BQEyJFZb.js +0 -7
  688. package/dist/et-EE-DSK7kb3n.js +0 -7
  689. package/dist/et-EE-DWVzz1wR.js +0 -7
  690. package/dist/fi-FI-B-7uBAf5.js +0 -7
  691. package/dist/fi-FI-BeJtSWIh.js +0 -7
  692. package/dist/fi-FI-Caa9ydMd.js +0 -7
  693. package/dist/fi-FI-D06EzKrW.js +0 -7
  694. package/dist/fi-FI-DgMsQBRO.js +0 -7
  695. package/dist/fr-FR-8a-RK9xd.js +0 -7
  696. package/dist/fr-FR-BCfqr4jm.js +0 -7
  697. package/dist/fr-FR-BTJoQq71.js +0 -7
  698. package/dist/fr-FR-CDv300-8.js +0 -7
  699. package/dist/fr-FR-D7DTFYe4.js +0 -7
  700. package/dist/fr-FR-Dl4NL-Nc.js +0 -7
  701. package/dist/getLegalEntityCountry-CNE5uei8.js +0 -17
  702. package/dist/hr-HR-B11sggmG.js +0 -7
  703. package/dist/hr-HR-BjxPRJ1o.js +0 -7
  704. package/dist/hr-HR-COdiWKoq.js +0 -7
  705. package/dist/hr-HR-CXH5M5JZ.js +0 -7
  706. package/dist/hr-HR-me1zsMas.js +0 -7
  707. package/dist/hu-HU-BNlsrO-l.js +0 -7
  708. package/dist/hu-HU-BQ5310Yi.js +0 -7
  709. package/dist/hu-HU-D1ZZwcl0.js +0 -7
  710. package/dist/hu-HU-DkSsL94T.js +0 -7
  711. package/dist/hu-HU-Dp6xOBN_.js +0 -7
  712. package/dist/it-IT-BORQC-7u.js +0 -7
  713. package/dist/it-IT-BlaVymCj.js +0 -7
  714. package/dist/it-IT-CawjvBDX.js +0 -7
  715. package/dist/it-IT-Cnk7j_gC.js +0 -7
  716. package/dist/it-IT-DIIRAF4_.js +0 -7
  717. package/dist/it-IT-x4LV31GV.js +0 -7
  718. package/dist/ja-JP-CyXnoIu3.js +0 -7
  719. package/dist/ja-JP-DBne3dbI.js +0 -7
  720. package/dist/ja-JP-DS8zN3mY.js +0 -7
  721. package/dist/ja-JP-Dpe9Odla.js +0 -7
  722. package/dist/ja-JP-DrHQO_Se.js +0 -7
  723. package/dist/ja-JP-h3E8hgLv.js +0 -7
  724. package/dist/legal-entity-type-0MfCGzUf.js +0 -13
  725. package/dist/lt-LT-8kOI6QVq.js +0 -7
  726. package/dist/lt-LT-B18sQY9g.js +0 -7
  727. package/dist/lt-LT-Byl8QeWO.js +0 -7
  728. package/dist/lt-LT-D3ZUJfjr.js +0 -7
  729. package/dist/lt-LT-Fc1lOUlz.js +0 -7
  730. package/dist/lv-LV-C70c94CI.js +0 -7
  731. package/dist/lv-LV-CXifQKfG.js +0 -7
  732. package/dist/lv-LV-DctYQmfH.js +0 -7
  733. package/dist/lv-LV-Mj_iV56f.js +0 -7
  734. package/dist/lv-LV-adiXoKhv.js +0 -7
  735. package/dist/nl-NL-BIpptPn4.js +0 -7
  736. package/dist/nl-NL-BWGCqpWp.js +0 -7
  737. package/dist/nl-NL-Bv8Zk-6e.js +0 -7
  738. package/dist/nl-NL-DOB0b0m4.js +0 -7
  739. package/dist/nl-NL-ehxkZFQd.js +0 -7
  740. package/dist/nl-NL-jt4eYGEY.js +0 -7
  741. package/dist/no-NO-BG1sYkpp.js +0 -7
  742. package/dist/no-NO-CeZQnyyD.js +0 -7
  743. package/dist/no-NO-Chwg5Roi.js +0 -7
  744. package/dist/no-NO-Dx_Z3uoZ.js +0 -7
  745. package/dist/no-NO-P5tRWhV9.js +0 -7
  746. package/dist/pl-PL-BsXtscoI.js +0 -7
  747. package/dist/pl-PL-CWFdZf24.js +0 -7
  748. package/dist/pl-PL-DSbuyzBx.js +0 -7
  749. package/dist/pl-PL-J9S3_lCf.js +0 -7
  750. package/dist/pl-PL-_KG-ZD1N.js +0 -7
  751. package/dist/pt-BR-B2q9Nl16.js +0 -7
  752. package/dist/pt-BR-BYbyk6xS.js +0 -7
  753. package/dist/pt-BR-Cph-P8oH.js +0 -7
  754. package/dist/pt-BR-D1yTuXWd2.js +0 -7
  755. package/dist/pt-BR-fKlNUybd.js +0 -7
  756. package/dist/pt-PT-C1gtp2_N.js +0 -7
  757. package/dist/pt-PT-CQQkh5PS.js +0 -7
  758. package/dist/pt-PT-D8ldyR-j.js +0 -7
  759. package/dist/pt-PT-DAvsI-Tr.js +0 -7
  760. package/dist/pt-PT-DhokEMPi.js +0 -7
  761. package/dist/pt-PT-IPhkbQvT.js +0 -7
  762. package/dist/resolveEnvironment-BYEL10Nc.js +0 -2524
  763. package/dist/ro-RO-C6xoaASq.js +0 -7
  764. package/dist/ro-RO-CP_IrOlX.js +0 -7
  765. package/dist/ro-RO-CQJk7Cpo.js +0 -7
  766. package/dist/ro-RO-CnMe6Mfw.js +0 -7
  767. package/dist/ro-RO-_BLhsnIB.js +0 -7
  768. package/dist/sk-SK-BOc9IqyW.js +0 -7
  769. package/dist/sk-SK-Bb1CdAzD.js +0 -7
  770. package/dist/sk-SK-Br1Y4_CN.js +0 -7
  771. package/dist/sk-SK-Bx2_85dW.js +0 -7
  772. package/dist/sk-SK-C889qQFo.js +0 -7
  773. package/dist/sl-SI-B-Xa0hlk.js +0 -7
  774. package/dist/sl-SI-BQc61Sz2.js +0 -7
  775. package/dist/sl-SI-DHPadSTy.js +0 -7
  776. package/dist/sl-SI-DO9c7geI.js +0 -7
  777. package/dist/sl-SI-bkhhInrg.js +0 -7
  778. package/dist/sv-SE-BXrlr0X5.js +0 -7
  779. package/dist/sv-SE-Dk81lopg.js +0 -7
  780. package/dist/sv-SE-DzsWB30f.js +0 -7
  781. package/dist/sv-SE-IBYnJfbW.js +0 -7
  782. package/dist/sv-SE-X89Q6ZAq.js +0 -7
  783. package/dist/sv-SE-l_UVgmVu.js +0 -7
  784. package/dist/types/components/GlobalEntry/utils.d.ts +0 -30
  785. package/dist/types/components/Shared/fields/TaxInformationField/TaxIdNumberTypeSelector/getDefaultTaxIdNumberType.d.ts +0 -30
  786. package/dist/types/components/Shared/fields/TaxInformationField/TaxIdNumberTypeSelector/inferTaxIdNumberType.d.ts +0 -13
  787. package/dist/types/core/models/api/attachment.d.ts +0 -7
  788. package/dist/types/core/models/api/document.d.ts +0 -25
  789. package/dist/types/core/models/api/entity-type.d.ts +0 -5
  790. package/dist/types/core/models/api/legal-arrangement.d.ts +0 -24
  791. package/dist/types/core/models/api/legal-entity-type.d.ts +0 -8
  792. package/dist/types/core/models/api/legal-entity.d.ts +0 -36
  793. package/dist/types/core/models/api/problem.d.ts +0 -12
  794. package/dist/types/core/models/api/remediating-action.d.ts +0 -5
  795. package/dist/types/core/models/api/transfer-instrument.d.ts +0 -33
  796. package/dist/types/core/models/api/trusted-fields-provider.d.ts +0 -5
  797. package/dist/types/core/models/api/verification-error.d.ts +0 -19
  798. package/dist/utils-DBIDcVUN.js +0 -214
@@ -1,1806 +0,0 @@
1
- try {
2
- let e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
3
- n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "bc1618e6-a815-49e3-bac3-3bd488e61f54", e._sentryDebugIdIdentifier = "sentry-dbid-bc1618e6-a815-49e3-bac3-3bd488e61f54");
4
- } catch (e) {}
5
- import { r as useTranslation } from "./translation-BOm4lmPx.js";
6
- import { $ as hasRepeatedCharacters, C as useDataset, H as NO_ALPHABET_REGEX, V as LATIN_SPACE_MARK_PUNCTUATION_NUMBERS_REGEX, W as OTHER_ENTITIES_VALID_CHAR_REGEX, ct as standardKanjiValidator, et as hasText, it as isInvalidName, k as Header, lt as standardKatakanaValidator, nt as isEmpty, ot as isValidMinLength, st as matchesRegex, w as datasetIdentifier, z as EMOJI_REGEX } from "./resolveEnvironment-BYEL10Nc.js";
7
- import { t as createLogger } from "./logger-Z8AeTE4x.js";
8
- import { n as IconButton, t as Button } from "./Button-DfRmINzF.js";
9
- import { a as objectsDeepEqual, o as entriesOf } from "./genUtils-Ce61IJs8.js";
10
- import { t as DecisionMakerTypes } from "./decision-maker-type-NR4GFAeT.js";
11
- import { n as TrustMemberGuidanceLabels, r as TrustMemberTypes } from "./trustMemberGuidance-CgdU2v0j.js";
12
- import { i as useAnalyticsContext } from "./Modal-BsivDPTd.js";
13
- import { i as formDebugInfo } from "./InputText-CTpVF0Mu.js";
14
- import { t as useId } from "./useId-oOIS1nsj.js";
15
- import { a as MaybeModal, c as getDataByFields, d as isTranslationObject, f as translateTranslatable, i as ProgressBar, l as omitKeys, o as ValidationResult, p as LoaderWrapper, r as Field, s as addKeys, t as Select } from "./Select-ByVcS_J2.js";
16
- import { o as StructuredList, s as Confirm } from "./utils-DBIDcVUN.js";
17
- import { t as Image } from "./Image-D82terx4.js";
18
- import { t as List } from "./List-ywoRPg-q.js";
19
- import { r as FormRouterContext, t as ErrorPanel } from "./ErrorPanel-tnFOlOZU.js";
20
- import { t as UnincorporatedPartnershipMemberTypes } from "./unincorporated-partnership-DNTK5Y_5.js";
21
- import { lazy } from "preact/compat";
22
- import { useCallback as useCallback$1, useContext as useContext$1, useEffect as useEffect$1, useMemo as useMemo$1, useReducer, useRef as useRef$1, useState as useState$1 } from "preact/hooks";
23
- import cx from "classnames";
24
- import { jsx, jsxs } from "preact/jsx-runtime";
25
- import { createContext as createContext$1 } from "preact";
26
- //#region src/context/FormContext/FormContext.ts
27
- var FormContext = createContext$1(null);
28
- //#endregion
29
- //#region src/context/FormContext/FormContextProvider.tsx
30
- function FormContextProvider({ children, form }) {
31
- const contextValue = useMemo$1(() => ({ form }), [form]);
32
- return /* @__PURE__ */ jsx(FormContext.Provider, {
33
- value: contextValue,
34
- children
35
- });
36
- }
37
- //#endregion
38
- //#region src/hooks/usePageLandedEvent.ts
39
- /**
40
- * Hook that automatically sends a "Landed on page" analytics event on when active form changes.
41
- * Used on form component level (i.e. Basic information, Additional details etc.) to explicitly track page visits.
42
- * This centralizes the common analytics pattern used across form components.
43
- */
44
- var usePageLandedEvent = (formName) => {
45
- const userEvents = useAnalyticsContext();
46
- const oldFormNameRef = useRef$1(void 0);
47
- if (formName && oldFormNameRef.current !== formName) {
48
- userEvents.updateSharedEventProperties({ page: formName });
49
- userEvents.addPageEvent("Landed on page", { actionType: "navigate" });
50
- oldFormNameRef.current = formName;
51
- }
52
- };
53
- //#endregion
54
- //#region src/utils/analytics/trackNavigation.ts
55
- var trackNavigation = ({ userEvents, actionType, toForm, label, returnValue, additionalTrackingParams }) => {
56
- userEvents.addPageEvent("Clicked button", {
57
- actionType,
58
- toPage: toForm,
59
- label,
60
- returnValue,
61
- ...additionalTrackingParams
62
- });
63
- };
64
- //#endregion
65
- //#region src/utils/formUtils.ts
66
- var createFormUtils = (props, t) => ({
67
- getLabel: (field, fallbackLabelKey) => {
68
- let translationKey = props.labels?.[field] ?? fallbackLabelKey ?? field;
69
- if (props.labels && !props.labels?.[field] && Object.keys(props.labels).length) {
70
- const parentKey = Object.keys(props.labels).find((fieldKey) => typeof props.labels?.[fieldKey] === "object");
71
- if (parentKey) translationKey = props.labels[parentKey][field] ?? translationKey;
72
- }
73
- return t(($) => $[translationKey]);
74
- },
75
- getMask: (field) => props.masks?.[field],
76
- isRequiredField: (field, showIfNotInRequiredFields = true) => props.requiredFields ? props.requiredFields.includes(field) && (field !== "role" || field === "role" && props.taskType !== "individual") : showIfNotInRequiredFields,
77
- isOptionalField: (field) => props.optionalFields?.includes(field) ?? false,
78
- isVisibleField(field, showIfNotInRequiredFields = true) {
79
- return this.isRequiredField(field, showIfNotInRequiredFields) || this.isOptionalField(field);
80
- },
81
- isReadOnly: (field) => props.readOnly || (props.readOnlyFields ? props.readOnlyFields.includes(field) : false),
82
- isObscured: (field) => props.obscuredFields ? props.obscuredFields.includes(field) : false,
83
- isTrusted: (field) => props.trustedFields ? props.trustedFields.includes(field) : false,
84
- getErrorMessage: (field, errors, fieldProblems) => {
85
- const errorMessage = errors?.[field]?.errorMessage;
86
- if (!(!!errorMessage || Boolean(fieldProblems?.[field]))) return;
87
- return {
88
- key: (isTranslationObject(errorMessage) ? errorMessage.key : errorMessage) || "invalid",
89
- message: translateTranslatable(t, errorMessage)
90
- };
91
- },
92
- getFieldData: (formData, fieldKeys) => getDataByFields(formData, fieldKeys),
93
- getFieldValid: (formValid, fieldKeys) => entriesOf(formValid).reduce((acc, [key, val]) => fieldKeys.includes(key) ? {
94
- ...acc,
95
- [key]: val
96
- } : acc, {}),
97
- getFieldErrors: (formErrors, fieldProblems, fieldKeys) => Object.keys(formErrors).reduce((acc, key) => {
98
- if (!fieldKeys.includes(key)) return acc;
99
- const error = formErrors?.[key]?.errorMessage;
100
- if (!(!!error || Boolean(fieldProblems?.[key]))) return acc;
101
- const errorKey = isTranslationObject(error) ? error.key : error;
102
- return {
103
- ...acc,
104
- [key]: {
105
- key: errorKey || "invalid",
106
- message: translateTranslatable(t, error)
107
- }
108
- };
109
- }, {}),
110
- getFieldLabels: (fieldKeys, fallbackLabelKeys) => fieldKeys.reduce((acc, field) => {
111
- let translationKey = props.labels?.[field] ?? fallbackLabelKeys?.[field] ?? field;
112
- if (props.labels && !props.labels?.[field] && Object.keys(props.labels).length) {
113
- const parentKey = Object.keys(props.labels).find((fieldKey) => typeof props.labels?.[fieldKey] === "object");
114
- if (parentKey) translationKey = props.labels[parentKey][field] ?? translationKey;
115
- }
116
- return {
117
- ...acc,
118
- [field]: t(($) => $[translationKey])
119
- };
120
- }, {})
121
- });
122
- var mergeFieldMetadataIntoProps = (fieldName, metadata, otherProps) => {
123
- const existingProps = otherProps ?? {};
124
- return {
125
- ...existingProps,
126
- labels: {
127
- ...existingProps.labels,
128
- [fieldName]: metadata.label
129
- },
130
- masks: {
131
- ...existingProps.masks,
132
- [fieldName]: metadata.mask
133
- },
134
- validators: {
135
- ...existingProps.validators,
136
- [fieldName]: metadata.validators
137
- }
138
- };
139
- };
140
- //#endregion
141
- //#region src/utils/roleMetadata.ts
142
- var roleMetadata = {
143
- [DecisionMakerTypes.CONTROLLING_PERSON]: {
144
- name: "controllingPerson",
145
- description: "controllingPersonDescription"
146
- },
147
- [DecisionMakerTypes.OWNER]: {
148
- name: "owner",
149
- description: "ownerDescription"
150
- },
151
- [DecisionMakerTypes.SIGNATORY]: {
152
- name: "signatory",
153
- description: "signatoryDescription"
154
- },
155
- [DecisionMakerTypes.DIRECTOR]: {
156
- name: "director",
157
- description: "directorDescription"
158
- },
159
- [TrustMemberTypes.DEFINED_BENEFICIARY]: {
160
- name: "definedBeneficiary",
161
- description: "definedBeneficiaryDescription"
162
- },
163
- [TrustMemberTypes.UNDEFINED_BENEFICIARY]: {
164
- name: "undefinedBeneficiary",
165
- description: "undefinedBeneficiaryDescription"
166
- },
167
- [TrustMemberTypes.PROTECTOR]: {
168
- name: "protector",
169
- description: "personAppointmentUnderTrustInstrument"
170
- },
171
- [TrustMemberTypes.TRUSTEE]: {
172
- name: "trustee",
173
- description: "legalOwnerOfProperty"
174
- },
175
- [TrustMemberTypes.SETTLOR]: {
176
- name: "settlor",
177
- description: "entityEstablishingTrust"
178
- },
179
- [TrustMemberGuidanceLabels.BENEFICIARY]: { name: TrustMemberGuidanceLabels.BENEFICIARY },
180
- [TrustMemberGuidanceLabels.TRUSTEE]: { name: TrustMemberGuidanceLabels.TRUSTEE },
181
- [UnincorporatedPartnershipMemberTypes.SECONDARY_PARTNER]: {
182
- name: UnincorporatedPartnershipMemberTypes.SECONDARY_PARTNER,
183
- description: "secondaryPartnerGuideDescription"
184
- }
185
- };
186
- var getRoleTagVariant = (role) => roleMetadata[role]?.variant ?? "blue";
187
- var getRoleName = (role) => roleMetadata[role]?.name ?? role;
188
- var Summary_module_default = {
189
- summary: "_summary_1op7a_1",
190
- "summary-content": "_summary-content_1op7a_7",
191
- summaryContent: "_summary-content_1op7a_7",
192
- "summary-list": "_summary-list_1op7a_13",
193
- summaryList: "_summary-list_1op7a_13",
194
- "summary-list-header": "_summary-list-header_1op7a_27",
195
- summaryListHeader: "_summary-list-header_1op7a_27",
196
- "summary-list-header-title": "_summary-list-header-title_1op7a_32",
197
- summaryListHeaderTitle: "_summary-list-header-title_1op7a_32",
198
- "summary-list-item": "_summary-list-item_1op7a_41",
199
- summaryListItem: "_summary-list-item_1op7a_41",
200
- "summary-list-item-key": "_summary-list-item-key_1op7a_55",
201
- summaryListItemKey: "_summary-list-item-key_1op7a_55",
202
- "summary-list-item-value": "_summary-list-item-value_1op7a_67",
203
- summaryListItemValue: "_summary-list-item-value_1op7a_67",
204
- "summary-content-legal-caption": "_summary-content-legal-caption_1op7a_73",
205
- summaryContentLegalCaption: "_summary-content-legal-caption_1op7a_73",
206
- "summary-content-list": "_summary-content-list_1op7a_88",
207
- summaryContentList: "_summary-content-list_1op7a_88",
208
- "summary-content-logo": "_summary-content-logo_1op7a_92",
209
- summaryContentLogo: "_summary-content-logo_1op7a_92"
210
- };
211
- //#endregion
212
- //#region src/components/Shared/Summary/summaryItem.ts
213
- var isSummaryItem = (val) => typeof val === "object" && val !== null && "summaryLabel" in val && "summaryValue" in val;
214
- var summaryItem = (summaryLabel, summaryValue) => ({
215
- summaryLabel,
216
- summaryValue
217
- });
218
- var preTranslatedSummaryItem = (summaryLabel, summaryValue) => ({
219
- summaryLabel,
220
- summaryValue,
221
- preTranslated: true
222
- });
223
- //#endregion
224
- //#region src/components/Shared/Summary/Summary.tsx
225
- var onfidoLogo = lazy(() => import("./onfido-logo-CMRuSr8M.js"));
226
- var summaryStep = {
227
- formId: "summary",
228
- formName: "summary"
229
- };
230
- /** @deprecated, use NewSummary */
231
- function Summary({ data, forms, gotoForm, labels, problems, omitted = {}, showFormHeader = true, showSectionHeader = true, showLegalCaption = false, showTaxExemptedLegalCaption = false, useStructuredList = false }) {
232
- const { t } = useTranslation("common");
233
- const userEvents = useAnalyticsContext();
234
- const editForm = (formId) => {
235
- const formIndex = forms.findIndex((form) => form.formId === formId);
236
- if (formIndex >= 0) gotoForm(formIndex);
237
- };
238
- const allValidationErrors = problems?.validationErrors && Object.values(problems.validationErrors)?.reduce((acc, validError) => ({
239
- ...acc,
240
- ...validError
241
- }), {});
242
- const allVerificationErrors = problems?.verificationErrors && Object.values(problems.verificationErrors)?.reduce((acc, verifError) => ({
243
- ...acc,
244
- ...verifError
245
- }), {});
246
- const formUtils = createFormUtils({ labels }, t);
247
- const summarySectionHeader = (formName, formId) => /* @__PURE__ */ jsxs("header", {
248
- className: Summary_module_default.summaryListHeader,
249
- children: [/* @__PURE__ */ jsx("h2", {
250
- className: Summary_module_default.summaryListHeaderTitle,
251
- children: formName
252
- }), !omitted.summaryEditButton?.includes(formId) && /* @__PURE__ */ jsx(IconButton, {
253
- variant: "tertiary",
254
- icon: "edit",
255
- onClick: () => {
256
- trackNavigation({
257
- userEvents,
258
- actionType: "edit",
259
- toForm: formName,
260
- label: "Pencil icon"
261
- });
262
- editForm(formId);
263
- },
264
- ariaLabel: t(($) => $["editForm"], { formName })
265
- })]
266
- });
267
- const renderSummarySection = (fieldData, labelData = {}, formName, formId, useStructuredList) => {
268
- const structuredListItems = Object.entries(fieldData).map(([key, value]) => {
269
- return {
270
- term: t(($) => $[labelData[key] || key]),
271
- details: value
272
- };
273
- });
274
- return !useStructuredList ? /* @__PURE__ */ jsxs(List, {
275
- variant: "grouped-secondary",
276
- children: [showSectionHeader && summarySectionHeader(formName, formId), /* @__PURE__ */ jsx("dl", {
277
- className: Summary_module_default.summaryList,
278
- children: Array.isArray(fieldData) ? fieldData.map((item) => renderBulletedListField(item)) : renderSummaryItems(fieldData, labelData)
279
- })]
280
- }) : /* @__PURE__ */ jsxs(List, {
281
- variant: "grouped-secondary",
282
- children: [showSectionHeader && summarySectionHeader(formName, formId), /* @__PURE__ */ jsx(StructuredList, { items: structuredListItems })]
283
- });
284
- };
285
- const renderSummaryContent = (summaryData, useStructuredList) => {
286
- const summaryList = [];
287
- forms.forEach(({ formId, formName }) => {
288
- const currentFormData = summaryData[formId];
289
- if (!currentFormData || Object.values(currentFormData).every((value) => isEmpty(value)) || formId === summaryStep.formId || omitted.forms?.includes(formId)) return;
290
- const summaryItems = currentFormData.hasInnerForms ? renderInnerForms(labels?.[formId], formId, currentFormData) : renderSummarySection(currentFormData, labels?.[formId], t(($) => $[typeof labels?.[formId] === "string" ? labels[formId] : formName]), formId, useStructuredList);
291
- summaryList.push(summaryItems);
292
- });
293
- return summaryList;
294
- };
295
- const renderInnerForms = (labelData, parentFormId, innerForms = {}) => {
296
- if (!innerForms) return [];
297
- const dataList = [];
298
- Object.entries(innerForms).forEach(([innerFormName, innerFormFieldData]) => {
299
- const formName = t(($) => $[labelData?.[innerFormName] || innerFormName]);
300
- if (typeof innerFormFieldData === "object" && innerFormFieldData !== null) {
301
- if (Object.values(innerFormFieldData).every((value) => isEmpty(value))) return;
302
- dataList.push(renderSummarySection(innerFormFieldData, labelData, formName, parentFormId));
303
- }
304
- });
305
- return dataList;
306
- };
307
- /**
308
- * Renders a single label-value pair as a field in the summary section.
309
- *
310
- * This helper function creates the markup for a single piece of data,
311
- * displaying a label and its corresponding value using a definition list
312
- * for semantic correctness (`<dt>` for label, `<dd>` for data).
313
- *
314
- * @param label The translated label to display for the field.
315
- * @param value The value of the field, which can be a simple string or a JSX element for more complex rendering.
316
- * @returns A JSX element representing the summary field.
317
- */
318
- const renderField = (label, value) => /* @__PURE__ */ jsxs("div", {
319
- className: Summary_module_default.summaryListItem,
320
- children: [/* @__PURE__ */ jsx("dt", {
321
- className: Summary_module_default.summaryListItemKey,
322
- children: label
323
- }), /* @__PURE__ */ jsx("dd", {
324
- className: Summary_module_default.summaryListItemValue,
325
- children: value
326
- })]
327
- });
328
- const renderBulletedListField = (item) => /* @__PURE__ */ jsx("ul", {
329
- className: Summary_module_default.summaryContentList,
330
- children: /* @__PURE__ */ jsx("li", { children: item })
331
- });
332
- /**
333
- * Recursively renders the data fields for a summary section.
334
- *
335
- * This function iterates through the properties of the `formData` object.
336
- * It handles different data types by:
337
- * - Displaying simple string or number values with their corresponding labels.
338
- * - Handling 'role' arrays specifically to show a comma-separated list of roles.
339
- * - Recognizing and rendering `SummaryItem` objects with their custom labels and values.
340
- * - Recursively calling itself for nested objects to render their properties.
341
- *
342
- * Fields listed in the `omitted.keys` prop are skipped.
343
- *
344
- * @param formData The data object for the current section, containing key-value pairs to be rendered.
345
- * @param labelData A map of field keys to their corresponding translation keys for fetching display labels.
346
- * @returns An array of JSX elements representing the rendered summary fields for the section.
347
- */
348
- const renderSummaryItems = (formData = {}, labelData = {}) => {
349
- if (!formData) return [];
350
- if (formData?.idVerificationMethod === "instantVerification") return [renderField(t(($) => $["verificationMethod"]), /* @__PURE__ */ jsx(Image, {
351
- lazyLoadedImage: onfidoLogo,
352
- className: Summary_module_default.summaryContentLogo,
353
- alt: "onfido-logo"
354
- }))];
355
- const dataList = [];
356
- Object.entries(formData).forEach(([field, fieldData]) => {
357
- if (omitted.keys?.includes(field) || !fieldData) return;
358
- const fieldName = t(($) => $[labelData[field] || field]);
359
- if (field === "role" && Array.isArray(fieldData)) {
360
- const label = fieldData.length > 1 ? t(($) => $["roles"]) : fieldName;
361
- const roles = fieldData.map((role) => t(($) => $[getRoleName(role)])).join(", ");
362
- dataList.push(renderField(label, roles));
363
- } else if (isSummaryItem(fieldData)) {
364
- const { summaryLabel, summaryValue, preTranslated } = fieldData;
365
- if (preTranslated) dataList.push(renderField(summaryLabel, summaryValue));
366
- else dataList.push(renderField(translateTranslatable(t, summaryLabel) ?? "", summaryValue));
367
- } else if (typeof fieldData === "object") dataList.push(renderSummaryItems(fieldData, labelData));
368
- else if (["string", "number"].includes(typeof fieldData)) dataList.push(renderField(fieldName, fieldData));
369
- });
370
- return dataList;
371
- };
372
- return /* @__PURE__ */ jsxs("div", {
373
- role: "region",
374
- className: Summary_module_default.summary,
375
- children: [showFormHeader && /* @__PURE__ */ jsx(Header, {
376
- title: t(($) => $["summary"]),
377
- description: t(($) => $["summaryDescription"])
378
- }), /* @__PURE__ */ jsxs("div", {
379
- className: Summary_module_default.summaryContent,
380
- children: [
381
- /* @__PURE__ */ jsx(ErrorPanel, {
382
- validationErrors: allValidationErrors,
383
- verificationErrors: allVerificationErrors,
384
- formUtils,
385
- id: "ariaErrorField"
386
- }),
387
- renderSummaryContent(data, useStructuredList),
388
- showLegalCaption && /* @__PURE__ */ jsx("div", {
389
- className: Summary_module_default.summaryContentLegalCaption,
390
- children: t(($) => $["summaryLegalCaption"])
391
- }),
392
- showTaxExemptedLegalCaption && /* @__PURE__ */ jsxs("div", {
393
- className: Summary_module_default.summaryContentLegalCaption,
394
- children: [/* @__PURE__ */ jsx("p", { children: t(($) => $["summaryTaxExemptionLegalCaptionTitle"]) }), /* @__PURE__ */ jsxs("ul", { children: [
395
- /* @__PURE__ */ jsx("li", { children: t(($) => $["summaryTaxExemptionLegalCaption_1"]) }),
396
- /* @__PURE__ */ jsx("li", { children: t(($) => $["summaryTaxExemptionLegalCaption_2"]) }),
397
- /* @__PURE__ */ jsx("li", { children: t(($) => $["summaryTaxExemptionLegalCaption_3"]) })
398
- ] })]
399
- })
400
- ]
401
- })]
402
- });
403
- }
404
- //#endregion
405
- //#region src/utils/scrollToInvalidField.ts
406
- var INVALID_FIELD_SELECTOR = ".adyen-kyc-field--error, .adyen-kyc-label__text--error";
407
- var SCROLLABLE_OVERFLOW_VALUES = new Set([
408
- "auto",
409
- "scroll",
410
- "overlay"
411
- ]);
412
- var isWindow = (container) => container === window;
413
- var getInvalidFieldTarget = (element) => element.closest(".adyen-kyc-field") ?? element;
414
- var isCustomElement = (element) => element.tagName.includes("-");
415
- var queryInvalidField = (root) => {
416
- const invalidField = root.querySelector(INVALID_FIELD_SELECTOR);
417
- if (invalidField) return getInvalidFieldTarget(invalidField);
418
- for (const element of Array.from(root.querySelectorAll("*")).filter(isCustomElement)) {
419
- if (!element.shadowRoot) continue;
420
- const shadowInvalidField = queryInvalidField(element.shadowRoot);
421
- if (shadowInvalidField) return shadowInvalidField;
422
- }
423
- return null;
424
- };
425
- var isElementVisibleInContainer = (element, container) => {
426
- const elementRect = element.getBoundingClientRect();
427
- if (isWindow(container)) return elementRect.top >= 0 && elementRect.bottom <= window.innerHeight;
428
- const containerRect = container.getBoundingClientRect();
429
- return elementRect.top >= containerRect.top && elementRect.bottom <= containerRect.bottom;
430
- };
431
- var findScrollContainer = (element) => {
432
- let parent = element.parentElement;
433
- while (parent) {
434
- const style = window.getComputedStyle(parent);
435
- const canScroll = parent.scrollHeight > parent.clientHeight;
436
- const hasScrollableOverflow = SCROLLABLE_OVERFLOW_VALUES.has(style.overflowY);
437
- if (canScroll && hasScrollableOverflow) return parent;
438
- parent = parent.parentElement;
439
- }
440
- return window;
441
- };
442
- var scrollElementIntoContainer = (element, container) => {
443
- if (isWindow(container)) {
444
- element.scrollIntoView({
445
- behavior: "smooth",
446
- block: "center"
447
- });
448
- return;
449
- }
450
- const elementRect = element.getBoundingClientRect();
451
- const containerRect = container.getBoundingClientRect();
452
- const offset = elementRect.top - containerRect.top - containerRect.height / 3;
453
- container.scrollBy({
454
- top: offset,
455
- behavior: "smooth"
456
- });
457
- };
458
- var scrollToInvalidField = () => {
459
- const invalidField = queryInvalidField(document);
460
- if (!invalidField) return;
461
- const container = findScrollContainer(invalidField);
462
- if (isElementVisibleInContainer(invalidField, container)) return;
463
- scrollElementIntoContainer(invalidField, container);
464
- };
465
- //#endregion
466
- //#region src/hooks/useFormComposer.ts
467
- var logger$2 = createLogger();
468
- /**
469
- * The step we open to for editing an existing entity should be the summary if there are verification errors
470
- * Otherwise (including for a new entity), just show the first step
471
- */
472
- var getOpeningStep = (forms, remediationActions) => {
473
- if (remediationActions && Object.keys(remediationActions).length > 0) {
474
- const allRemediationActions = Object.values(remediationActions).flat().filter((rem) => rem.forms?.length > 0);
475
- if (allRemediationActions.length === 1 && allRemediationActions[0]?.forms.length === 1) {
476
- const form = forms.find((form) => form?.formId === allRemediationActions[0]?.forms[0]);
477
- if (form) return form;
478
- }
479
- return forms[forms.length - 1];
480
- }
481
- return forms[0];
482
- };
483
- var useFormComposer = ({ problems, navigationTrackingParams, forms, externalBackClick, onSubmit, triggerValidation }) => {
484
- const userEvents = useAnalyticsContext();
485
- const [shouldValidate, setShouldValidate] = useState$1(false);
486
- const [activeForm, setActiveForm] = useState$1(forms[0]);
487
- const isFormSummaryStep = (form) => form.formId === summaryStep.formId;
488
- const getFormIndex = (formId) => forms.findIndex((form) => form.formId === formId);
489
- const currentStep = getFormIndex(activeForm.formId);
490
- const totalSteps = forms.length;
491
- const isFinalStep = currentStep === totalSteps - 1;
492
- const isFirstStep = currentStep === 0;
493
- const firstStepId = forms[0]?.formId;
494
- usePageLandedEvent(activeForm.formName);
495
- const [oldForms, setOldForms] = useState$1(forms);
496
- if (oldForms !== forms) {
497
- setActiveForm((activeForm) => forms.find(({ formId }) => formId === activeForm.formId) ?? activeForm);
498
- setOldForms(forms);
499
- }
500
- /**
501
- * Opening step can be calculated once since the problems are already known on drop-in load
502
- */
503
- const [oldFirstStepId, setOldFirstStepId] = useState$1(void 0);
504
- if (oldFirstStepId !== firstStepId) {
505
- /** TODO: need a better solution
506
- * If firstStepId changes it means form configurations are being setup,
507
- * not able to put forms as the dependency here as it also updates whenever validity changes
508
- * should separate out forms into forms and validity
509
- ***/
510
- setActiveForm(getOpeningStep(forms, problems?.remediationActions));
511
- setOldFirstStepId(firstStepId);
512
- }
513
- const gotoFormByFormIndex = (nextFormIndex, currentForms) => {
514
- setActiveForm(currentForms?.[nextFormIndex] ?? forms[nextFormIndex]);
515
- };
516
- /**
517
- * We often run into a situation where we want to navigate to a specific form immediately after
518
- * rearranging the forms in the flow.
519
- *
520
- * The issue here is that the callback, (e.g. {@link IdVerificationMethod.handleVerifyByInvite})
521
- * has a reference only to the current forms, not what the forms will be post-rearrangement.
522
- * Hence, it is impossible to call {@link gotoFormByFormIndex} because we have no idea what the
523
- * eventual index of the form will be.
524
- *
525
- * The solution: set a desired form ID, then resolve the navigation as part of the render
526
- * once {@link forms} contains it. The subsequent {@link gotoFormByFormIndex} will immediately
527
- * cancel the current render and trigger a new one.
528
- */
529
- const [desiredFormId, setDesiredFormId] = useState$1();
530
- if (desiredFormId) {
531
- const targetFormIndex = forms.findIndex((form) => form.formId === desiredFormId);
532
- if (targetFormIndex === -1) logger$2.warn(`Desired form ${desiredFormId} not present. \nCurrent forms: ${forms.map((f) => f.formId).join(", ")}`);
533
- else {
534
- setDesiredFormId(void 0);
535
- gotoFormByFormIndex(targetFormIndex);
536
- }
537
- }
538
- const gotoFormByFormId = (formId) => {
539
- setDesiredFormId(formId);
540
- };
541
- const trackSubmitClick = () => {
542
- trackNavigation({
543
- userEvents,
544
- actionType: "submit",
545
- label: "submit",
546
- additionalTrackingParams: navigationTrackingParams
547
- });
548
- };
549
- const handleNextClick = async (updatedForms) => {
550
- const currentForms = updatedForms ?? forms;
551
- if (isFormSummaryStep(activeForm)) {
552
- trackSubmitClick();
553
- onSubmit();
554
- return;
555
- }
556
- /**
557
- * Returns validation result of async validators if any
558
- */
559
- const isAsyncValidationValid = await triggerValidation?.(activeForm.formId) ?? true;
560
- /**
561
- * Checks if both static validations and asyncValidations pass
562
- */
563
- if (!activeForm.isValid || !isAsyncValidationValid) {
564
- /**
565
- * shouldValidate is not required with useMultiForm
566
- */
567
- setShouldValidate(true);
568
- requestAnimationFrame(scrollToInvalidField);
569
- trackNavigation({
570
- userEvents,
571
- actionType: "next",
572
- label: "next",
573
- returnValue: "validation error",
574
- additionalTrackingParams: navigationTrackingParams
575
- });
576
- return;
577
- }
578
- if (isFinalStep) {
579
- trackSubmitClick();
580
- onSubmit();
581
- return;
582
- }
583
- setShouldValidate(false);
584
- const toFormIndex = currentStep + 1;
585
- gotoFormByFormIndex(toFormIndex, currentForms);
586
- trackNavigation({
587
- userEvents,
588
- actionType: "next",
589
- toForm: currentForms[toFormIndex]?.formName,
590
- label: "next",
591
- returnValue: "success",
592
- additionalTrackingParams: navigationTrackingParams
593
- });
594
- };
595
- const handleBackClick = () => {
596
- if (currentStep > 0) {
597
- const toForm = forms[currentStep - 1];
598
- setActiveForm(toForm);
599
- trackNavigation({
600
- userEvents,
601
- actionType: "back",
602
- toForm: toForm?.formName,
603
- label: "back",
604
- additionalTrackingParams: navigationTrackingParams
605
- });
606
- }
607
- };
608
- return {
609
- handleBackClick: isFirstStep ? externalBackClick : handleBackClick,
610
- handleNextClick,
611
- gotoFormByFormIndex,
612
- gotoFormByFormId,
613
- activeForm,
614
- shouldValidate,
615
- setShouldValidate,
616
- steps: {
617
- current: currentStep,
618
- total: totalSteps
619
- }
620
- };
621
- };
622
- //#endregion
623
- //#region src/hooks/useMultiForm/reducer.ts
624
- /** Checks if a field key exists on the nested data object (even if its value is undefined) */
625
- var hasOwnNestedField = (data, formName, fieldKey) => {
626
- const form = data?.[formName];
627
- return form != null && typeof form === "object" && Object.hasOwn(form, fieldKey);
628
- };
629
- var hasValueChanged = (newData, prevData) => {
630
- if (typeof newData === "object") return !objectsDeepEqual(newData, prevData);
631
- return newData !== prevData;
632
- };
633
- /** Formats and validates a field */
634
- var processField = ({ key, value, formName, mode, defaultData, data, fieldContext, formatters, staticValidate }) => {
635
- const formatterFn = formatters?.[key]?.formatter ? formatters[key]?.formatter : formatters?.[key];
636
- const formattedValue = formatterFn && typeof formatterFn === "function" ? formatterFn(value, fieldContext) : value;
637
- const fieldHasDefaultValue = key in (defaultData ?? {});
638
- const fieldHasChanged = defaultData?.[key] !== value;
639
- const validationResult = (fieldContext.state.obscuredFields?.includes(key) ? fieldHasChanged : fieldHasChanged || fieldHasDefaultValue) ? staticValidate({
640
- key,
641
- value: formattedValue,
642
- mode,
643
- formName
644
- }, data, fieldContext) : new ValidationResult([{
645
- isValid: true,
646
- hasError: false
647
- }]);
648
- const asyncValidationResult = fieldContext.state?.asyncErrors?.[key];
649
- /** Add any existing async validation result to validation result */
650
- if (asyncValidationResult) validationResult.addError(asyncValidationResult);
651
- return [formattedValue, validationResult];
652
- };
653
- /**
654
- * The function takes in the below params and spits out an initial state, by running the validations
655
- * across all forms and fields. It makes sure all validations are done and only sets the validity
656
- * instead of the errors, this is to avoid users seeing error immaturely on initial load.
657
- *
658
- * @param requiredFields
659
- * @param staticValidate
660
- * @param asyncValidate
661
- * @param defaultData
662
- * @param obscuredFields
663
- * @param optionalFields
664
- * @param trustedFields
665
- * @param fieldProblems
666
- * @param formatters
667
- * @param data
668
- */
669
- function init({ requiredFields, staticValidate, defaultData, obscuredFields, optionalFields, trustedFields, fieldProblems, formatters, data, asyncErrors }) {
670
- /**
671
- * Fetches the validation result of a field in a form
672
- * @param fieldKey
673
- * @param formName
674
- */
675
- const getProcessedState = (fieldKey, formName) => {
676
- const [formattedValue, validationResult] = processField({
677
- key: fieldKey,
678
- value: hasOwnNestedField(data, formName, fieldKey) ? data?.[formName]?.[fieldKey] ?? null : defaultData?.[formName]?.[fieldKey] ?? null,
679
- mode: "blur",
680
- formName,
681
- formatters: formatters?.[formName],
682
- defaultData: defaultData?.[formName],
683
- data,
684
- fieldContext: { state: {
685
- data: data?.[formName],
686
- obscuredFields: obscuredFields?.[formName],
687
- optionalFields: optionalFields?.[formName],
688
- trustedFields: trustedFields?.[formName],
689
- requiredFields: requiredFields?.[formName],
690
- asyncErrors: asyncErrors?.[formName]
691
- } },
692
- staticValidate
693
- });
694
- return {
695
- valid: validationResult.isValid && !fieldProblems?.[formName]?.[fieldKey] || false,
696
- errors: null,
697
- data: formattedValue,
698
- fieldProblems: fieldProblems?.[formName]?.[fieldKey]
699
- };
700
- };
701
- /**
702
- * requiredFields can be undefined if the configuration api call is not yet completed
703
- * returned default state in this case
704
- */
705
- if (!requiredFields) return {
706
- data: defaultData,
707
- errors: {},
708
- fieldProblems: {},
709
- valid: {},
710
- requiredFields: {},
711
- asyncErrors: {},
712
- defaultData
713
- };
714
- /**
715
- * Make sure forms containing only optional fields are also taken into account
716
- */
717
- const formsForOptionalFields = Object.keys(optionalFields ?? {});
718
- const formsForRequiredFields = Object.keys(requiredFields);
719
- /**
720
- * Visits every field and builds a state with the validity
721
- */
722
- return Array.from(new Set([...formsForOptionalFields, ...formsForRequiredFields])).reduce((acc, formName) => {
723
- const form = formName;
724
- const optionalsFormFields = optionalFields?.[form] ?? [];
725
- const requiredFormFields = requiredFields?.[form] ?? [];
726
- const formState = [...optionalsFormFields, ...requiredFormFields].reduce((acc, field) => {
727
- const { valid, errors, data, fieldProblems: processedFieldProblems } = getProcessedState(field, form);
728
- return {
729
- ...acc,
730
- data: {
731
- ...acc.data,
732
- [field]: data
733
- },
734
- valid: {
735
- ...acc.valid,
736
- [field]: valid
737
- },
738
- errors: {
739
- ...acc.errors,
740
- [field]: errors
741
- },
742
- fieldProblems: {
743
- ...acc.fieldProblems,
744
- ...processedFieldProblems ? { [field]: processedFieldProblems } : {}
745
- }
746
- };
747
- }, {});
748
- return {
749
- requiredFields,
750
- data: {
751
- ...acc.data,
752
- [formName]: formState.data
753
- },
754
- valid: {
755
- ...acc.valid,
756
- [formName]: formState.valid
757
- },
758
- errors: {
759
- ...acc.errors,
760
- [formName]: formState.errors
761
- },
762
- fieldProblems: {
763
- ...acc.fieldProblems,
764
- [formName]: formState.fieldProblems
765
- },
766
- asyncErrors: { ...acc.asyncErrors },
767
- obscuredFields,
768
- optionalFields,
769
- trustedFields,
770
- defaultData
771
- };
772
- }, {
773
- requiredFields,
774
- data: {},
775
- valid: {},
776
- errors: {},
777
- fieldProblems: {},
778
- obscuredFields,
779
- optionalFields,
780
- trustedFields,
781
- asyncErrors: {}
782
- });
783
- }
784
- function reducer({ staticValidate, obscuredFields, optionalFields, trustedFields, formatters, defaultData }) {
785
- return (state, { type, key, mode, value, formData, formName, selectedSchema, innerFormFields, requiredFields, optionalFields: newOptionalFields, asyncValidationResults }) => {
786
- const clonedState = structuredClone(state);
787
- switch (type) {
788
- case "setData":
789
- if (!key || !formName) return state;
790
- clonedState.data[formName] ??= {};
791
- clonedState.data[formName][key] = value;
792
- return clonedState;
793
- case "setFormData": {
794
- if (!formName || !formData) return state;
795
- const formRequiredFields = clonedState.requiredFields?.[formName] ?? [];
796
- const formOptionalFields = clonedState.optionalFields?.[formName] ?? [];
797
- const allowedFields = [...formRequiredFields, ...formOptionalFields];
798
- const filteredUpdates = {};
799
- for (const formDataKey in formData) if (allowedFields.includes(formDataKey)) filteredUpdates[formDataKey] = formData[formDataKey];
800
- clonedState.data[formName] = filteredUpdates;
801
- const formValidity = allowedFields.reduce((acc, field) => {
802
- const [, validation] = processField({
803
- key: field,
804
- value: filteredUpdates[field],
805
- mode: "blur",
806
- formName,
807
- defaultData: defaultData?.[formName],
808
- data: clonedState.data,
809
- formatters: formatters?.[formName],
810
- fieldContext: { state: {
811
- data: clonedState?.data?.[formName],
812
- obscuredFields: obscuredFields?.[formName],
813
- optionalFields: optionalFields?.[formName],
814
- trustedFields: trustedFields?.[formName],
815
- errors: clonedState.errors?.[formName],
816
- valid: clonedState.valid?.[formName],
817
- fieldProblems: clonedState.fieldProblems?.[formName],
818
- asyncErrors: clonedState.asyncErrors?.[formName]
819
- } },
820
- staticValidate
821
- });
822
- return {
823
- ...acc,
824
- [field]: validation.isValid
825
- };
826
- }, {});
827
- clonedState.data[formName] = filteredUpdates;
828
- clonedState.valid[formName] = formValidity;
829
- return clonedState;
830
- }
831
- case "setValid":
832
- if (!key || !formName || clonedState.valid[formName]?.[key] === value) return state;
833
- clonedState.valid[formName] ??= {};
834
- clonedState.valid[formName][key] = !!value;
835
- return clonedState;
836
- case "setErrors":
837
- if (!key || !formName) return state;
838
- clonedState.errors[formName] ??= {};
839
- clonedState.errors[formName][key] = value;
840
- return clonedState;
841
- case "setRequiredFields": {
842
- /**
843
- * If defaultData changes reset the data in the form to new defaultData
844
- * Fetching documents are bit delayed, this accomodates that delay
845
- */
846
- const hasDefaultDataChanged = !objectsDeepEqual(defaultData, state.defaultData);
847
- if (objectsDeepEqual(requiredFields, clonedState.requiredFields) && objectsDeepEqual(newOptionalFields, clonedState.optionalFields) && !hasDefaultDataChanged) return state;
848
- const updatedData = hasDefaultDataChanged ? defaultData : structuredClone(clonedState.data);
849
- /**
850
- * When schema changes without a defaultData refresh, re-add any fields that were
851
- * previously removed and are now reintroduced from the local stash.
852
- *
853
- * This preserves user-entered values across dynamic required/optional transitions,
854
- * such as when rule-driven fields are temporarily hidden and then shown again.
855
- */
856
- if (!hasDefaultDataChanged && updatedData) for (const formName in requiredFields) {
857
- const form = formName;
858
- const prevFields = [...clonedState.requiredFields?.[form] ?? [], ...clonedState.optionalFields?.[form] ?? []];
859
- [...requiredFields?.[form] ?? [], ...newOptionalFields?.[form] ?? []].filter((field) => !prevFields.includes(field)).forEach((field) => {
860
- const currentValue = updatedData?.[form]?.[field];
861
- const localValue = clonedState.local?.[form]?.data?.[field];
862
- if (typeof currentValue === "undefined" && typeof localValue !== "undefined") {
863
- if (!updatedData[form]) return;
864
- updatedData[form][field] = localValue;
865
- }
866
- });
867
- }
868
- const newState = init({
869
- requiredFields,
870
- data: updatedData,
871
- fieldProblems: clonedState.fieldProblems,
872
- obscuredFields,
873
- optionalFields: newOptionalFields,
874
- trustedFields,
875
- staticValidate,
876
- defaultData
877
- });
878
- if (hasDefaultDataChanged) return newState;
879
- /**
880
- * Persist values of fields that are being removed from the active schema into local.
881
- *
882
- * These values are later used to restore data for reintroduced fields in subsequent
883
- * schema transitions, avoiding silent data loss during dynamic form updates.
884
- */
885
- const local = Object.keys(requiredFields ?? {}).reduce((acc, formName) => {
886
- const form = formName;
887
- const prevFields = [...clonedState.requiredFields?.[form] ?? [], ...clonedState.optionalFields?.[form] ?? []];
888
- const nextFields = [...requiredFields?.[form] ?? [], ...newOptionalFields?.[form] ?? []];
889
- const removedFields = prevFields.filter((field) => !nextFields.includes(field));
890
- if (!removedFields.length) {
891
- if (clonedState.local?.[form]) return {
892
- ...acc,
893
- [form]: clonedState.local[form]
894
- };
895
- return acc;
896
- }
897
- const localFormData = {
898
- ...clonedState.local?.[form]?.data ?? {},
899
- ...removedFields.reduce((fieldAcc, field) => {
900
- const value = clonedState.data?.[form]?.[field];
901
- if (typeof value !== "undefined") return {
902
- ...fieldAcc,
903
- [field]: value
904
- };
905
- return fieldAcc;
906
- }, {})
907
- };
908
- return {
909
- ...acc,
910
- [form]: {
911
- ...clonedState.local?.[form] ?? {},
912
- data: localFormData
913
- }
914
- };
915
- }, {});
916
- return {
917
- ...newState,
918
- local
919
- };
920
- }
921
- case "setInnerFormRequiredFields": {
922
- /**
923
- * This sets the requiredFields in a single form.
924
- * Ideally this should not be used anywhere, as this goes against the idea of having all
925
- * the rules of calculating requiredFields in a single place. keeping this in case we have
926
- * any exceptional scenarios where this would be required. Can be removed once all forms
927
- * migrated to useMultiform
928
- */
929
- if (!innerFormFields || !formName) return state;
930
- const requiredFields = {
931
- ...clonedState.requiredFields,
932
- [formName]: innerFormFields
933
- };
934
- const defaultState = init({
935
- requiredFields,
936
- defaultData,
937
- fieldProblems: clonedState.fieldProblems,
938
- obscuredFields,
939
- optionalFields,
940
- trustedFields,
941
- staticValidate,
942
- data: defaultData
943
- });
944
- const removedFields = clonedState.optionalFields?.[formName].length ? [...(clonedState.requiredFields?.[formName] ?? []).filter((field) => !innerFormFields.includes(field)), ...clonedState.optionalFields[formName].filter((field) => !optionalFields?.[formName].includes(field))] : clonedState.requiredFields?.[formName].filter((field) => !innerFormFields.includes(field));
945
- const newFields = optionalFields?.[formName].length ? [...innerFormFields.filter((field) => !clonedState.requiredFields?.[formName].includes(field)), ...(optionalFields[formName] ?? []).filter((field) => !clonedState.optionalFields?.[formName].includes(field))] : innerFormFields.filter((field) => !clonedState.requiredFields?.[formName].includes(field));
946
- const formLocal = {
947
- data: omitKeys(clonedState.data?.[formName], newFields),
948
- errors: omitKeys(clonedState.errors?.[formName], newFields),
949
- valid: omitKeys(clonedState.valid?.[formName], newFields),
950
- fieldProblems: omitKeys(clonedState.fieldProblems?.[formName], newFields)
951
- };
952
- const local = {
953
- ...clonedState.local,
954
- [formName]: formLocal
955
- };
956
- const updatedFormData = addKeys(omitKeys(clonedState.data?.[formName], removedFields), newFields, null, defaultState.data?.[formName], clonedState.local?.[formName].data);
957
- const updatedData = {
958
- ...clonedState.data,
959
- [formName]: updatedFormData
960
- };
961
- const updatedFormValidity = addKeys(omitKeys(clonedState.valid?.[formName], removedFields), newFields, false, defaultState.valid?.[formName], clonedState.local?.[formName].valid);
962
- const updatedValidity = {
963
- ...clonedState.valid,
964
- [formName]: updatedFormValidity
965
- };
966
- const updatedFormErrors = addKeys(omitKeys(clonedState.errors?.[formName], removedFields), newFields, null, defaultState.errors?.[formName], clonedState.local?.[formName].errors);
967
- const updatedErrors = {
968
- ...clonedState.errors,
969
- [formName]: updatedFormErrors
970
- };
971
- const updatedFormFieldProblems = addKeys(omitKeys(clonedState.fieldProblems?.[formName], removedFields), newFields, false, defaultState.fieldProblems?.[formName], clonedState.local?.[formName].fieldProblems);
972
- return {
973
- requiredFields,
974
- data: updatedData,
975
- valid: updatedValidity,
976
- errors: updatedErrors,
977
- fieldProblems: {
978
- ...clonedState.fieldProblems,
979
- [formName]: updatedFormFieldProblems
980
- },
981
- asyncErrors: clonedState.asyncErrors,
982
- optionalFields,
983
- trustedFields,
984
- local,
985
- defaultData
986
- };
987
- }
988
- case "updateField": {
989
- /**
990
- * Called when a field value changes in form
991
- * Validates the field and updates data, validity, error in the state for the field
992
- */
993
- if (!key || !mode || !formName) return state;
994
- const updatedData = {
995
- ...clonedState.data,
996
- [formName]: {
997
- ...clonedState.data?.[formName],
998
- [key]: value
999
- }
1000
- };
1001
- /**
1002
- * Wipe async errors for the field if value has been changed
1003
- */
1004
- const updatedAsyncErrors = hasValueChanged(value, clonedState.data?.[formName]?.[key]) ? {
1005
- ...clonedState.asyncErrors,
1006
- [formName]: {
1007
- ...clonedState.asyncErrors?.[formName],
1008
- [key]: null
1009
- }
1010
- } : clonedState.asyncErrors;
1011
- const [formattedValue, validation] = processField({
1012
- key,
1013
- value,
1014
- mode,
1015
- formName,
1016
- defaultData: defaultData?.[formName],
1017
- data: updatedData,
1018
- formatters: formatters?.[formName],
1019
- fieldContext: { state: {
1020
- data: clonedState.data?.[formName],
1021
- obscuredFields: obscuredFields?.[formName],
1022
- optionalFields: optionalFields?.[formName],
1023
- trustedFields: trustedFields?.[formName],
1024
- errors: clonedState.errors[formName],
1025
- valid: clonedState.valid[formName],
1026
- fieldProblems: clonedState.fieldProblems[formName],
1027
- asyncErrors: updatedAsyncErrors[formName]
1028
- } },
1029
- staticValidate
1030
- });
1031
- const clearFieldProblems = (clonedState.data?.[formName])?.[key] !== formattedValue;
1032
- return {
1033
- ...clonedState,
1034
- data: {
1035
- ...clonedState.data,
1036
- [formName]: {
1037
- ...clonedState.data?.[formName],
1038
- [key]: formattedValue
1039
- }
1040
- },
1041
- asyncErrors: updatedAsyncErrors,
1042
- errors: {
1043
- ...clonedState.errors,
1044
- [formName]: {
1045
- ...clonedState.errors[formName],
1046
- [key]: validation.getError() ?? null
1047
- }
1048
- },
1049
- valid: {
1050
- ...clonedState.valid,
1051
- [formName]: {
1052
- ...clonedState?.valid?.[formName],
1053
- [key]: (validation.isValid && !clonedState.fieldProblems?.[formName]?.[key]) ?? false
1054
- }
1055
- },
1056
- fieldProblems: {
1057
- ...clonedState.fieldProblems,
1058
- [formName]: {
1059
- ...clonedState.fieldProblems[formName],
1060
- ...!clearFieldProblems && clonedState.fieldProblems?.[formName]?.[key] ? { [key]: true } : {}
1061
- }
1062
- }
1063
- };
1064
- }
1065
- case "validateForm": {
1066
- /**
1067
- * Called when triggerValidation('formName') is called, validates all the fields in the form
1068
- * and populates the errors in the state
1069
- */
1070
- if (!formName) return state;
1071
- const formFields = clonedState.requiredFields?.[formName];
1072
- if (!formFields) return state;
1073
- const formState = (selectedSchema || formFields).reduce((acc, field) => {
1074
- const formData = clonedState.data?.[formName];
1075
- const [formattedValue, validation] = processField({
1076
- key: field,
1077
- mode: "blur",
1078
- value: formData?.[field] ?? null,
1079
- formName,
1080
- defaultData: defaultData?.[formName],
1081
- data: clonedState.data,
1082
- formatters: formatters?.[formName],
1083
- fieldContext: { state: {
1084
- data: clonedState.data?.[formName],
1085
- obscuredFields: obscuredFields?.[formName],
1086
- optionalFields: optionalFields?.[formName],
1087
- trustedFields: trustedFields?.[formName],
1088
- errors: clonedState.errors[formName],
1089
- valid: clonedState.valid[formName],
1090
- fieldProblems: clonedState.fieldProblems[formName],
1091
- asyncErrors: clonedState.asyncErrors[formName]
1092
- } },
1093
- staticValidate
1094
- });
1095
- const clearFieldProblems = (clonedState?.data?.[formName])?.[field] !== formattedValue;
1096
- const fieldAsyncValidationResult = asyncValidationResults?.[field];
1097
- return {
1098
- data: formData,
1099
- asyncErrors: {
1100
- ...acc.asyncErrors,
1101
- [field]: fieldAsyncValidationResult?.getError() ?? null
1102
- },
1103
- errors: {
1104
- ...acc.errors,
1105
- [field]: validation.getError() ?? fieldAsyncValidationResult?.getError() ?? null
1106
- },
1107
- valid: {
1108
- ...acc.valid,
1109
- [field]: validation.isValid && (fieldAsyncValidationResult?.isValid ?? true) && !clonedState.fieldProblems[formName][field]
1110
- },
1111
- fieldProblems: {
1112
- ...acc.fieldProblems,
1113
- ...!clearFieldProblems && acc.fieldProblems?.[field] ? { [field]: true } : {}
1114
- }
1115
- };
1116
- }, {});
1117
- return {
1118
- ...clonedState,
1119
- errors: {
1120
- ...clonedState.errors,
1121
- [formName]: formState.errors
1122
- },
1123
- asyncErrors: {
1124
- ...clonedState.asyncErrors,
1125
- [formName]: formState.asyncErrors
1126
- },
1127
- valid: {
1128
- ...clonedState.valid,
1129
- [formName]: formState.valid
1130
- },
1131
- fieldProblems: {
1132
- ...clonedState.fieldProblems,
1133
- [formName]: formState.fieldProblems
1134
- }
1135
- };
1136
- }
1137
- default: throw new Error("Undefined useForm action");
1138
- }
1139
- };
1140
- }
1141
- //#endregion
1142
- //#region src/hooks/useMultiForm/useMultiFormAsyncValidator.ts
1143
- var logger$1 = createLogger();
1144
- /**
1145
- * Returns
1146
- * - triggerAsyncValidation function which can execute the async validation for a field and populate the sync validation results
1147
- * - asyncValidationResult state which keeps track of async validations of all fields.
1148
- * @param asyncRules
1149
- */
1150
- var useMultiFormAsyncValidator = (asyncRules) => {
1151
- const validResult = {
1152
- isValid: true,
1153
- hasError: false
1154
- };
1155
- const triggerAsyncValidation = useCallback$1(async (field, formName, data) => {
1156
- if (!asyncRules) return new ValidationResult([validResult]);
1157
- const rule = typeof asyncRules === "function" ? asyncRules(data)[formName]?.[field] : asyncRules[formName][field];
1158
- const value = data?.[formName]?.[field];
1159
- if (!rule || !value) return new ValidationResult([validResult]);
1160
- const isValid = await rule.asyncValidate(value).catch(logger$1.error);
1161
- if (isValid === false) return new ValidationResult([{
1162
- isValid,
1163
- errorMessage: typeof rule.errorMessage === "function" ? rule.errorMessage(value) : rule.errorMessage,
1164
- hasError: !isValid
1165
- }]);
1166
- return new ValidationResult([validResult]);
1167
- }, [asyncRules]);
1168
- const triggerAsyncFormValidation = async (formName, state, selectedSchema) => {
1169
- const fields = selectedSchema ?? state.requiredFields?.[formName];
1170
- if (!fields?.length) return { isValid: true };
1171
- const asyncValidationResults = await fields.reduce(async (accPromise, fieldName) => {
1172
- const acc = await accPromise;
1173
- const asyncValidationResult = await triggerAsyncValidation(fieldName, formName, state.data);
1174
- return {
1175
- ...acc,
1176
- [fieldName]: asyncValidationResult
1177
- };
1178
- }, Promise.resolve({}));
1179
- const isValid = Object.values(asyncValidationResults).every((validationResult) => validationResult.isValid);
1180
- return {
1181
- ...asyncValidationResults,
1182
- isValid
1183
- };
1184
- };
1185
- return { triggerAsyncFormValidation };
1186
- };
1187
- //#endregion
1188
- //#region src/utils/validation/commonValidators.ts
1189
- var isTruthyValidator = {
1190
- validate: (value) => !!value,
1191
- modes: ["blur"],
1192
- errorMessage: "fieldIsRequired"
1193
- };
1194
- var isNotEmptyValidator = {
1195
- validate: (value) => !isEmpty(value),
1196
- modes: ["blur"],
1197
- errorMessage: "fieldIsRequired"
1198
- };
1199
- //#endregion
1200
- //#region src/hooks/useMultiForm/useMultiFormStaticValidator.ts
1201
- var useMultiFormStaticValidator = (rules) => {
1202
- const getRulesForField = useCallback$1((field, form, data) => {
1203
- const fallbackRule = {
1204
- validate: () => true,
1205
- modes: ["blur", "input"]
1206
- };
1207
- if (!form) return [fallbackRule];
1208
- const fieldRules = typeof rules === "function" ? rules(data)?.[form]?.[field] ?? [fallbackRule] : rules?.[form]?.[field] ?? [fallbackRule];
1209
- return Array.isArray(fieldRules) ? fieldRules : [fieldRules];
1210
- }, [rules]);
1211
- return { triggerStaticValidation: useCallback$1(({ key, value, mode = "blur", formName }, data, context) => {
1212
- const fieldRules = getRulesForField(key, formName, data);
1213
- const isFieldOptional = !!context?.state.optionalFields?.includes(key);
1214
- const isFieldObscured = !!context?.state.obscuredFields?.includes(key);
1215
- if (!isFieldOptional) fieldRules.unshift(isNotEmptyValidator);
1216
- return new ValidationResult(fieldRules.map((rule) => {
1217
- const shouldValidate = rule.modes.includes(mode) && !isFieldObscured;
1218
- const isValid = isFieldOptional && isEmpty(value) ? true : rule.validate(value, context);
1219
- return {
1220
- isValid,
1221
- errorMessage: typeof rule.errorMessage === "function" ? rule.errorMessage(value, context) : rule.errorMessage,
1222
- hasError: shouldValidate && !isValid
1223
- };
1224
- }));
1225
- }, [getRulesForField]) };
1226
- };
1227
- //#endregion
1228
- //#region src/hooks/useMultiForm/useMultiForm.ts
1229
- function useMultiForm({ defaultData, rules, asyncRules, fieldProblems, allFields, requiredFields, obscuredFields, optionalFields, trustedFields, formatters }) {
1230
- const { triggerStaticValidation } = useMultiFormStaticValidator(rules);
1231
- const { triggerAsyncFormValidation } = useMultiFormAsyncValidator(asyncRules);
1232
- const getRequiredFields = useMemo$1(() => typeof requiredFields === "function" ? requiredFields : () => requiredFields, [requiredFields]);
1233
- const getSchema = useMemo$1(() => getRequiredFields(defaultData), [defaultData, getRequiredFields]);
1234
- const getReducer = useCallback$1(() => reducer({
1235
- staticValidate: triggerStaticValidation,
1236
- defaultData,
1237
- obscuredFields,
1238
- optionalFields,
1239
- trustedFields,
1240
- formatters
1241
- }), [
1242
- triggerStaticValidation,
1243
- obscuredFields,
1244
- optionalFields,
1245
- trustedFields,
1246
- formatters,
1247
- defaultData
1248
- ]);
1249
- const initialData = useMemo$1(() => ({
1250
- requiredFields: getSchema,
1251
- defaultData,
1252
- fieldProblems,
1253
- obscuredFields,
1254
- optionalFields,
1255
- trustedFields,
1256
- formatters,
1257
- staticValidate: triggerStaticValidation,
1258
- data: defaultData
1259
- }), [
1260
- getSchema,
1261
- defaultData,
1262
- fieldProblems,
1263
- obscuredFields,
1264
- optionalFields,
1265
- trustedFields,
1266
- formatters,
1267
- triggerStaticValidation
1268
- ]);
1269
- const [state, dispatch] = useReducer(getReducer(), initialData, init);
1270
- const isValid = useMemo$1(() => {
1271
- const formsForOptionalFields = Object.keys(state.optionalFields ?? {});
1272
- const formsForRequiredFields = Object.keys(state.requiredFields ?? {});
1273
- return Array.from(new Set([...formsForOptionalFields, ...formsForRequiredFields])).reduce((acc, formName) => {
1274
- const form = formName;
1275
- const optionalsFormFields = state.optionalFields?.[form] ?? [];
1276
- const requiredFormFields = state.requiredFields?.[form] ?? [];
1277
- const formFields = [...optionalsFormFields, ...requiredFormFields];
1278
- const formValidity = state.valid[formName] ?? {};
1279
- return {
1280
- ...acc,
1281
- [formName]: Object.entries(formValidity)?.every(([field, valid]) => formFields.includes(field) ? valid : true)
1282
- };
1283
- }, {});
1284
- }, [state.requiredFields, state.valid]);
1285
- const getTargetValue = useCallback$1((formName, key, e) => {
1286
- if (!e?.target) return e;
1287
- if (e.target.type === "checkbox") return !state.data?.[formName][key];
1288
- return e.target.value;
1289
- }, [state.data]);
1290
- const setErrors = useCallback$1((formName, key, value) => {
1291
- dispatch({
1292
- type: "setErrors",
1293
- key,
1294
- value,
1295
- formName
1296
- });
1297
- }, []);
1298
- const setValid = useCallback$1((formName, key, value) => {
1299
- dispatch({
1300
- type: "setValid",
1301
- key,
1302
- value,
1303
- formName
1304
- });
1305
- }, []);
1306
- const setData = useCallback$1((formName, key, value) => {
1307
- dispatch({
1308
- type: "setData",
1309
- key,
1310
- value,
1311
- formName
1312
- });
1313
- }, []);
1314
- const setFormData = useCallback$1((formName, formData) => {
1315
- dispatch({
1316
- type: "setFormData",
1317
- formName,
1318
- formData
1319
- });
1320
- }, []);
1321
- const handleChangeFor = useCallback$1((formName, key, mode = "blur") => (e) => {
1322
- dispatch({
1323
- type: "updateField",
1324
- key,
1325
- value: getTargetValue(formName, key, e),
1326
- mode,
1327
- formName
1328
- });
1329
- }, [getTargetValue]);
1330
- const triggerValidation = useCallback$1(async (formName, selectedSchema) => {
1331
- const asyncValidationResults = await triggerAsyncFormValidation(formName, state, selectedSchema);
1332
- dispatch({
1333
- type: "validateForm",
1334
- formName,
1335
- selectedSchema,
1336
- asyncValidationResults
1337
- });
1338
- return asyncValidationResults.isValid;
1339
- }, [state, triggerAsyncFormValidation]);
1340
- const resetToDefaultData = useCallback$1(() => {
1341
- if (!getSchema) return;
1342
- Object.entries(getSchema).forEach(([formName]) => {
1343
- const form = formName;
1344
- const formData = defaultData?.[form];
1345
- getSchema[form].forEach((field) => {
1346
- if (!formData || typeof formData[field] !== "undefined") {
1347
- handleChangeFor(form, field)(formData);
1348
- return;
1349
- }
1350
- setValid(form, field, false);
1351
- setErrors(form, field, null);
1352
- setData(form, field, formData[field]);
1353
- });
1354
- });
1355
- }, [
1356
- defaultData,
1357
- getSchema,
1358
- handleChangeFor,
1359
- setData,
1360
- setErrors,
1361
- setValid
1362
- ]);
1363
- useEffect$1(() => {
1364
- const requiredFields = getRequiredFields(state.data);
1365
- if (!requiredFields) return;
1366
- dispatch({
1367
- type: "setRequiredFields",
1368
- requiredFields,
1369
- defaultData,
1370
- optionalFields
1371
- });
1372
- }, [
1373
- getRequiredFields,
1374
- state.data,
1375
- defaultData,
1376
- optionalFields
1377
- ]);
1378
- return {
1379
- setData,
1380
- setFormData,
1381
- setValid,
1382
- setErrors,
1383
- handleChangeFor,
1384
- triggerValidation,
1385
- resetToDefaultData,
1386
- isValid,
1387
- allFields,
1388
- requiredFields: state.requiredFields,
1389
- optionalFields: state.optionalFields,
1390
- trustedFields: state.trustedFields,
1391
- obscuredFields: state.obscuredFields,
1392
- valid: state.valid,
1393
- errors: state.errors,
1394
- data: state.data,
1395
- fieldProblems: state.fieldProblems,
1396
- defaultData,
1397
- asyncErrors: state.asyncErrors
1398
- };
1399
- }
1400
- //#endregion
1401
- //#region src/context/FormRouterContext/FormRouterContextProvider.tsx
1402
- var logger = createLogger();
1403
- function FormRouterContextProvider({ children, forms, setFormIndex, goToFormByFormId }) {
1404
- const fieldActionsRef = useRef$1({});
1405
- const registerFieldAction = useCallback$1((fieldName, action) => {
1406
- fieldActionsRef.current[fieldName] = action;
1407
- }, []);
1408
- const unregisterFieldAction = useCallback$1((fieldName) => {
1409
- delete fieldActionsRef.current[fieldName];
1410
- }, []);
1411
- const getFieldAction = useCallback$1((fieldName) => {
1412
- return fieldActionsRef.current[fieldName];
1413
- }, []);
1414
- const contextValue = useMemo$1(() => ({
1415
- setFormIndex,
1416
- goToFormByFormId,
1417
- goToFormByFieldName: (fieldName) => {
1418
- if (fieldName === "idDocument") fieldName = "idVerificationMethod";
1419
- const formIndex = forms.findIndex((form) => form?.fields?.some((field) => field === fieldName));
1420
- if (formIndex > -1) setFormIndex(formIndex);
1421
- else logger.error("No form was found to have that field so form navigation failed.");
1422
- },
1423
- registerFieldAction,
1424
- unregisterFieldAction,
1425
- getFieldAction
1426
- }), [
1427
- setFormIndex,
1428
- goToFormByFormId,
1429
- registerFieldAction,
1430
- unregisterFieldAction,
1431
- getFieldAction,
1432
- forms
1433
- ]);
1434
- return /* @__PURE__ */ jsx(FormRouterContext.Provider, {
1435
- value: contextValue,
1436
- children
1437
- });
1438
- }
1439
- var FormFlow_module_default = {
1440
- "form-flow": "_form-flow_lhddu_1",
1441
- formFlow: "_form-flow_lhddu_1",
1442
- "form-flow-content": "_form-flow-content_lhddu_9",
1443
- formFlowContent: "_form-flow-content_lhddu_9",
1444
- "form-flow-footer": "_form-flow-footer_lhddu_30",
1445
- formFlowFooter: "_form-flow-footer_lhddu_30",
1446
- "form-flow-footer-border": "_form-flow-footer-border_lhddu_45",
1447
- formFlowFooterBorder: "_form-flow-footer-border_lhddu_45",
1448
- "form-flow-actions": "_form-flow-actions_lhddu_49",
1449
- formFlowActions: "_form-flow-actions_lhddu_49",
1450
- "form-flow-primary-actions": "_form-flow-primary-actions_lhddu_56",
1451
- formFlowPrimaryActions: "_form-flow-primary-actions_lhddu_56"
1452
- };
1453
- //#endregion
1454
- //#region src/components/Shared/FormFlow/FormFlow.tsx
1455
- var FormFlow = ({ asModal = false, children, currentStep = 0, disableBackButton, disableNextButton, nextButtonLoading = false, forms, activeForm, gotoFormByFormIndex, gotoFormByFormId, handleBackClick, handleCancelClick, handleNextClick, loadingStatus, summary, summaryComponent, totalSteps = 1, isGlobalEntry = false }) => {
1456
- const contentRef = useRef$1(null);
1457
- const userEvents = useAnalyticsContext();
1458
- const { t } = useTranslation("common");
1459
- const [isConfirmPresented, setIsConfirmPresented] = useState$1(false);
1460
- const [isSubmitting, setIsSubmitting] = useState$1(false);
1461
- const isActionDisabled = isSubmitting || isConfirmPresented || loadingStatus === "loading";
1462
- const hasBackButton = !!handleBackClick;
1463
- const hasCancelButton = !!handleCancelClick;
1464
- const isFirstStep = currentStep === 0;
1465
- const isLastStep = currentStep === totalSteps - 1;
1466
- const isSingleStepForm = totalSteps < 2;
1467
- const progress = Math.floor(currentStep / (totalSteps - 1) * 100);
1468
- const scrollToTop = () => {
1469
- if (contentRef.current) contentRef.current.scroll({
1470
- top: 0,
1471
- behavior: "smooth"
1472
- });
1473
- };
1474
- const handleSubmit = () => {
1475
- setIsSubmitting(true);
1476
- Promise.resolve(handleNextClick()).then(() => {
1477
- setIsSubmitting(false);
1478
- scrollToTop();
1479
- });
1480
- };
1481
- const handleNext = () => {
1482
- scrollToTop();
1483
- handleNextClick();
1484
- };
1485
- const handleBack = () => {
1486
- scrollToTop();
1487
- handleBackClick?.();
1488
- };
1489
- const handleDismiss = () => {
1490
- if (!hasCancelButton) return;
1491
- setIsConfirmPresented(true);
1492
- };
1493
- const handleCancelDismiss = () => {
1494
- userEvents.addPageEvent("Closed modal", {
1495
- actionType: "close",
1496
- label: "cancel"
1497
- });
1498
- setIsConfirmPresented(false);
1499
- };
1500
- const handleConfirmDismiss = () => {
1501
- userEvents.addPageEvent("Clicked button", {
1502
- actionType: "navigate",
1503
- label: "leave"
1504
- });
1505
- setIsConfirmPresented(false);
1506
- handleCancelClick?.();
1507
- };
1508
- const footerClassName = cx(FormFlow_module_default.formFlowFooter, { [FormFlow_module_default.formFlowFooterBorder]: isSingleStepForm });
1509
- return /* @__PURE__ */ jsxs(MaybeModal, {
1510
- inline: !asModal,
1511
- onClose: handleDismiss,
1512
- size: "large",
1513
- showCloseButton: hasCancelButton,
1514
- children: [/* @__PURE__ */ jsxs("div", {
1515
- ref: contentRef,
1516
- className: FormFlow_module_default.formFlow,
1517
- "data-form-valid": activeForm.isValid,
1518
- "data-testid": "form-flow",
1519
- children: [/* @__PURE__ */ jsx("div", {
1520
- className: FormFlow_module_default.formFlowContent,
1521
- children: /* @__PURE__ */ jsx(LoaderWrapper, {
1522
- status: loadingStatus,
1523
- formOpacityWhenLoading: 0,
1524
- loaderSize: "large",
1525
- children: /* @__PURE__ */ jsx(FormRouterContextProvider, {
1526
- forms,
1527
- setFormIndex: gotoFormByFormIndex,
1528
- goToFormByFormId: gotoFormByFormId,
1529
- children: isLastStep ? summaryComponent ? summaryComponent : summary !== void 0 ? /* @__PURE__ */ jsx(Summary, {
1530
- ...summary,
1531
- forms,
1532
- gotoForm: gotoFormByFormIndex
1533
- }) : children : children
1534
- })
1535
- })
1536
- }), /* @__PURE__ */ jsxs("div", {
1537
- className: footerClassName,
1538
- children: [!isSingleStepForm && /* @__PURE__ */ jsx(ProgressBar, {
1539
- ariaLabel: t(($) => $["progress"]),
1540
- progress
1541
- }), /* @__PURE__ */ jsxs("div", {
1542
- className: FormFlow_module_default.formFlowActions,
1543
- children: [
1544
- isFirstStep && hasCancelButton && /* @__PURE__ */ jsx(Button, {
1545
- disabled: isActionDisabled || disableBackButton,
1546
- onClick: handleDismiss,
1547
- variant: "secondary",
1548
- children: t(($) => $["cancel"])
1549
- }),
1550
- !isFirstStep && hasBackButton && /* @__PURE__ */ jsx(Button, {
1551
- disabled: isActionDisabled || disableBackButton,
1552
- icon: "chevron-left",
1553
- onClick: handleBack,
1554
- variant: "secondary",
1555
- children: t(($) => $["back"])
1556
- }),
1557
- /* @__PURE__ */ jsx("div", {
1558
- className: FormFlow_module_default.formFlowPrimaryActions,
1559
- children: isLastStep && !isGlobalEntry ? /* @__PURE__ */ jsx(Button, {
1560
- onClick: handleSubmit,
1561
- loading: isSubmitting,
1562
- children: t(($) => $["submit"])
1563
- }) : /* @__PURE__ */ jsx(Button, {
1564
- onClick: handleNext,
1565
- disabled: isActionDisabled || disableNextButton,
1566
- loading: nextButtonLoading,
1567
- children: t(($) => $["continue"])
1568
- })
1569
- })
1570
- ]
1571
- })]
1572
- })]
1573
- }), isConfirmPresented && /* @__PURE__ */ jsx(Confirm, {
1574
- confirmText: t(($) => $["leave"]),
1575
- description: t(($) => $["unsavedChangesDescription"]),
1576
- onCancel: handleCancelDismiss,
1577
- onConfirm: handleConfirmDismiss,
1578
- title: t(($) => $["unsavedChanges"])
1579
- })]
1580
- });
1581
- };
1582
- //#endregion
1583
- //#region src/utils/dropinUtils.ts
1584
- /**
1585
- * @@description Based requiredfields and optionalFields determine what forms need to be shown and add a summaryStep in the dropin
1586
- *
1587
- * @param forms
1588
- * @param requiredFields
1589
- * @param optionalFields
1590
- * @param skipSummary
1591
- */
1592
- var getRequiredForms = (forms, requiredFields, optionalFields, skipSummary) => {
1593
- const reasons = [];
1594
- const requiredForms = Object.values(forms).filter(({ formId }) => {
1595
- if (requiredFields || optionalFields) {
1596
- const hasRequired = Boolean(requiredFields?.[formId]?.length);
1597
- const hasOptional = Boolean(optionalFields?.[formId]?.length);
1598
- const isIncluded = hasRequired || hasOptional;
1599
- const inclusionReasons = [];
1600
- if (hasRequired) inclusionReasons.push("has required fields");
1601
- if (hasOptional) inclusionReasons.push("has optional fields");
1602
- if (isIncluded) reasons.push(`Form '${formId}': INCLUDED (${inclusionReasons.join(" & ")})`);
1603
- else reasons.push(`Form '${formId}': EXCLUDED (no required or optional fields)`);
1604
- return isIncluded;
1605
- }
1606
- reasons.push(`Form '${formId}': INCLUDED (no required/optional fields check)`);
1607
- return true;
1608
- });
1609
- formDebugInfo.value = {
1610
- ...formDebugInfo.value,
1611
- __FORMS__: {
1612
- status: "INFO",
1613
- reasons
1614
- }
1615
- };
1616
- if (skipSummary) return requiredForms;
1617
- return [...requiredForms, summaryStep];
1618
- };
1619
- /**
1620
- * @description Based on validity of fields from formValidity and existence of validationErrors/Verification errors from backend determine whether the forms needs to be shown as valid or not
1621
- *
1622
- * @param forms
1623
- * @param formValidity
1624
- * @param problems
1625
- */
1626
- var addValidityToForms = (forms, formValidity, problems) => forms.map(({ formId, formName, fields }) => ({
1627
- formId,
1628
- formName,
1629
- fields,
1630
- isValid: formValidity?.[formId] ?? false,
1631
- hasServerValidationErrors: Boolean(problems?.validationErrors?.[formId])
1632
- }));
1633
- //#endregion
1634
- //#region src/context/FormContext/useFormContext.ts
1635
- function useFormContext() {
1636
- return useContext$1(FormContext);
1637
- }
1638
- //#endregion
1639
- //#region src/components/Shared/fields/CountryField/CountryField.tsx
1640
- var COUNTRY_FIELD = ["country"];
1641
- function CountryField({ name = "country", data, valid, errors, labels, readonly, handleChangeFor, helperText, allowedCountries, handleBlur }) {
1642
- const { t } = useTranslation("common");
1643
- const { dataset: countriesFromApi } = useDataset(datasetIdentifier.country);
1644
- const countries = useMemo$1(() => countriesFromApi.filter((country) => allowedCountries ? allowedCountries.includes(country.id) : true), [allowedCountries, countriesFromApi]);
1645
- return /* @__PURE__ */ jsx(Field, {
1646
- name,
1647
- label: labels?.country || t(($) => $["country"]),
1648
- errorMessage: errors.country,
1649
- isValid: valid.country,
1650
- helper: helperText,
1651
- dataTestId: "country",
1652
- children: (childProps) => /* @__PURE__ */ jsx(Select, {
1653
- ...childProps,
1654
- name,
1655
- placeholder: t(($) => $["selectCountryRegion"]),
1656
- selected: data.country,
1657
- items: countries,
1658
- readonly: (countries.length === 1 || readonly) && !!data,
1659
- onChange: handleChangeFor("country"),
1660
- onBlur: handleBlur
1661
- })
1662
- });
1663
- }
1664
- //#endregion
1665
- //#region src/utils/regex/patternValidators.ts
1666
- var validateNotEmptyOnBlur = {
1667
- modes: ["blur"],
1668
- validate: (val) => !isEmpty(val),
1669
- errorMessage: "fieldIsRequired"
1670
- };
1671
- var validateLegalCompanyName = [
1672
- {
1673
- modes: ["blur"],
1674
- validate: hasText,
1675
- errorMessage: "fieldIsRequired"
1676
- },
1677
- {
1678
- modes: ["blur"],
1679
- validate: (input) => !matchesRegex(NO_ALPHABET_REGEX, input),
1680
- errorMessage: "nameMustContainLetters"
1681
- },
1682
- {
1683
- modes: ["blur"],
1684
- validate: (input) => !matchesRegex(EMOJI_REGEX, input) && !hasRepeatedCharacters(input) && isValidMinLength(input, 3) && !isInvalidName(input) && matchesRegex(OTHER_ENTITIES_VALID_CHAR_REGEX, input),
1685
- errorMessage: "checkForTypos"
1686
- }
1687
- ];
1688
- var validateJaHaniLegalCompanyName = [
1689
- {
1690
- modes: ["blur"],
1691
- validate: hasText,
1692
- errorMessage: "fieldIsRequired"
1693
- },
1694
- {
1695
- modes: ["blur"],
1696
- validate: (input) => standardKanjiValidator(input),
1697
- errorMessage: "nameMustContainLetters"
1698
- },
1699
- {
1700
- modes: ["blur"],
1701
- validate: (input) => !matchesRegex(EMOJI_REGEX, input) && !hasRepeatedCharacters(input) && isValidMinLength(input, 3) && !isInvalidName(input) && matchesRegex(OTHER_ENTITIES_VALID_CHAR_REGEX, input),
1702
- errorMessage: "checkForTypos"
1703
- }
1704
- ];
1705
- var validateJaKanaLegalCompanyName = [
1706
- {
1707
- modes: ["blur"],
1708
- validate: hasText,
1709
- errorMessage: "fieldIsRequired"
1710
- },
1711
- {
1712
- modes: ["blur"],
1713
- validate: (input) => standardKatakanaValidator(input),
1714
- errorMessage: "ensureValidFullWidthKatakana"
1715
- },
1716
- {
1717
- modes: ["blur"],
1718
- validate: (input) => !matchesRegex(EMOJI_REGEX, input) && !hasRepeatedCharacters(input) && isValidMinLength(input, 3) && !isInvalidName(input) && matchesRegex(OTHER_ENTITIES_VALID_CHAR_REGEX, input),
1719
- errorMessage: "checkForTypos"
1720
- }
1721
- ];
1722
- var validateLatinSpaceMarkPunctuationNumbersOnlyOnBlur = {
1723
- modes: ["blur"],
1724
- validate: (input) => matchesRegex(LATIN_SPACE_MARK_PUNCTUATION_NUMBERS_REGEX, input),
1725
- errorMessage: "kanjiAndKanaCharactersAreNotAllowed"
1726
- };
1727
- var validatePatternOnBlur = (pattern) => ({
1728
- modes: ["blur"],
1729
- validate: (val) => !!val && pattern.test(val)
1730
- });
1731
- //#endregion
1732
- //#region src/components/ui/atoms/Radio/Radio.tsx
1733
- var Radio = ({ id, value, groupName, checked = false, disabled = false, onClick, className, "aria-labelledby": ariaLabelledBy, "aria-describedby": ariaDescribedBy }) => /* @__PURE__ */ jsx("input", {
1734
- "aria-labelledby": ariaLabelledBy,
1735
- "aria-describedby": ariaDescribedBy,
1736
- className: cx(["adyen-kyc-input-radio adyen-kyc-input-radio__input", className]),
1737
- id,
1738
- type: "radio",
1739
- checked,
1740
- name: groupName,
1741
- onClick,
1742
- value,
1743
- disabled
1744
- });
1745
- //#endregion
1746
- //#region src/components/ui/atoms/RadioWithLabel/RadioWithLabel.tsx
1747
- var RadioWithLabel = ({ value, label, content, groupName, checked = false, disabled = false, onClick }) => {
1748
- const id = useId("radio");
1749
- return /* @__PURE__ */ jsxs("label", {
1750
- htmlFor: id,
1751
- className: "adyen-kyc-input-radio",
1752
- children: [/* @__PURE__ */ jsx(Radio, {
1753
- id,
1754
- checked,
1755
- groupName,
1756
- onClick,
1757
- value,
1758
- disabled
1759
- }), /* @__PURE__ */ jsxs("div", {
1760
- className: "adyen-kyc-input-radio__content",
1761
- children: [/* @__PURE__ */ jsx("span", {
1762
- className: "adyen-kyc-input-radio__label adyen-kyc-label__text",
1763
- children: label
1764
- }), content]
1765
- })]
1766
- });
1767
- };
1768
- //#endregion
1769
- //#region src/components/ui/atoms/RadioGroup/RadioGroup.tsx
1770
- function RadioGroup({ items, name, onChange, value, disabled = false, horizontal = false, showContentOnlyOnSelected = false, className, enableTracking = false }) {
1771
- const { t, i18n } = useTranslation("common");
1772
- const userEvents = useAnalyticsContext();
1773
- const handleChange = (id) => {
1774
- if (enableTracking) userEvents.addFieldEvent("Interacted with form field", {
1775
- actionType: "input",
1776
- field: name,
1777
- returnValue: value
1778
- });
1779
- onChange(id);
1780
- };
1781
- return /* @__PURE__ */ jsx("div", {
1782
- className: cx([
1783
- "adyen-kyc-radio-group",
1784
- { "adyen-kyc-radio-group--horizontal": horizontal },
1785
- className
1786
- ]),
1787
- children: items.map((item) => {
1788
- const isSelected = item.id === value;
1789
- const visibleContent = isSelected || !showContentOnlyOnSelected ? item.content : void 0;
1790
- const keyExists = i18n.exists?.(item.name, { ns: "common" });
1791
- return /* @__PURE__ */ jsx(RadioWithLabel, {
1792
- value: item.id,
1793
- label: keyExists ? t(($) => $[item.name]) : item.name,
1794
- content: visibleContent,
1795
- groupName: name,
1796
- checked: isSelected,
1797
- disabled,
1798
- onClick: () => {
1799
- handleChange(item.id);
1800
- }
1801
- }, item.id);
1802
- })
1803
- });
1804
- }
1805
- //#endregion
1806
- export { mergeFieldMetadataIntoProps as A, preTranslatedSummaryItem as C, getRoleTagVariant as D, getRoleName as E, FormContextProvider as M, roleMetadata as O, isSummaryItem as S, Summary_module_default as T, isNotEmptyValidator as _, validateLatinSpaceMarkPunctuationNumbersOnlyOnBlur as a, Summary as b, validatePatternOnBlur as c, useFormContext as d, addValidityToForms as f, useMultiForm as g, FormFlow_module_default as h, validateJaKanaLegalCompanyName as i, trackNavigation as j, createFormUtils as k, COUNTRY_FIELD as l, FormFlow as m, RadioWithLabel as n, validateLegalCompanyName as o, getRequiredForms as p, validateJaHaniLegalCompanyName as r, validateNotEmptyOnBlur as s, RadioGroup as t, CountryField as u, isTruthyValidator as v, summaryItem as w, summaryStep as x, useFormComposer as y };