@adyen/kyc-components 4.6.0 → 4.7.0-beta.0

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 (279) hide show
  1. package/dist/{AcceptTermsOfServiceComponent-D61bfNW0.js → AcceptTermsOfServiceComponent-RYwThKmu.js} +17 -16
  2. package/dist/{AccountSetupRejected-zD_ccBqS.js → AccountSetupRejected-DhwwBH0S.js} +2 -2
  3. package/dist/{ActionBar-DkXjAAQ1.js → ActionBar-u-Qc7Y4w.js} +1 -1
  4. package/dist/{Address-Csavi1J2.js → Address-TGZeMCUA.js} +15 -15
  5. package/dist/{Avatar-D-VHGhFL.js → Avatar-LSd9cIJV.js} +1 -1
  6. package/dist/{BusinessFinancingComponent-DG0EWNk6.js → BusinessFinancingComponent-DAeZTKW1.js} +6 -6
  7. package/dist/{BusinessFinancingDropin-5UqhwnOX.js → BusinessFinancingDropin-BVgSTmUm.js} +27 -27
  8. package/dist/BusinessFinancingPage-vKWY2gWN.js +43 -0
  9. package/dist/{BusinessTypeSelectionPage-D4SBQDqJ.js → BusinessTypeSelectionPage-DhpGpgac.js} +9 -9
  10. package/dist/{Checkbox-BKM1WPHa.js → Checkbox-D5-_dw4-.js} +1 -1
  11. package/dist/{Confirm-gEhhWD8f.js → Confirm-BoQbVMKQ.js} +2 -2
  12. package/dist/{ConstitutionalDocument-CCw9a-FU.js → ConstitutionalDocument-CjUSPI6f.js} +37 -26
  13. package/dist/{ContactDetails-CGBkZMAt.js → ContactDetails-Bj1jL-WF.js} +9 -19
  14. package/dist/{ContextGuidance-B4qWRid4.js → ContextGuidance-CoDkF9Kh.js} +1 -1
  15. package/dist/{CountryField-pznzB7Uq.js → CountryField-DPtohqO0.js} +3 -3
  16. package/dist/{CreateIndividualComponent-yT3Rqlai.js → CreateIndividualComponent-DnDxRY8S.js} +6 -6
  17. package/dist/{CreateTransferInstrumentComponent-BbWiq2fM.js → CreateTransferInstrumentComponent-BB1v1vPR.js} +4 -4
  18. package/dist/{Currency-DJCryqqJ.js → Currency-DjKXc6D1.js} +7 -7
  19. package/dist/{CustomerSupport-CJy8LS0W.js → CustomerSupport-nxoB2aXL.js} +9 -9
  20. package/dist/{DebugModal-BMXSCZDm.js → DebugModal-DK9xbFjU.js} +7 -7
  21. package/dist/{DecisionMakerDetails-BAniwLCh.js → DecisionMakerDetails-D-POvfJr.js} +9 -9
  22. package/dist/{DecisionMakerDetailsPage-CloS-QIg.js → DecisionMakerDetailsPage-CABFACYm.js} +8 -8
  23. package/dist/{DecisionMakers-DrnBmtOE.js → DecisionMakers-B4gmdJ-s.js} +20 -20
  24. package/dist/{Dropzone-DCTHmJn2.js → Dropzone-IwRNw22i.js} +3 -3
  25. package/dist/{EmbeddedStatus-sF6FG18F.js → EmbeddedStatus-BU2hma9l.js} +2 -2
  26. package/dist/{EndStateLayout-D23FWrbD.js → EndStateLayout-DURCt96r.js} +1 -1
  27. package/dist/{EntityAssociation-eiVdh677.js → EntityAssociation-TBvPBEGa.js} +4 -4
  28. package/dist/{EntityGuidanceStatus-Chbgo62U.js → EntityGuidanceStatus-CFRY8Yia.js} +4 -4
  29. package/dist/{ErrorPanel-B8fHWJ7W.js → ErrorPanel-ALBlWg3_.js} +2 -2
  30. package/dist/{Field-BguffV12.js → Field--T3FQepj.js} +1 -1
  31. package/dist/{FormNavigation-D5KYMYO0.js → FormNavigation-nE2uj2oQ.js} +3 -3
  32. package/dist/{Individual.rules-2HzSnI41.js → Individual.rules-DotRDPTM.js} +6 -6
  33. package/dist/{IndividualDropin-CybsCeUw.js → IndividualDropin-eiRXQvS_.js} +164 -119
  34. package/dist/{InputDate-BjWLJfR1.js → InputDate-BAzF-upe.js} +1 -1
  35. package/dist/{InputText-C6-NIYzH.js → InputText-CywP4Ojh.js} +2 -2
  36. package/dist/{Introduction-UMqxmd6N.js → Introduction-CKoQlTAr.js} +3 -3
  37. package/dist/{InvitedDecisionMakerComponent-XyPQK6mU.js → InvitedDecisionMakerComponent-CV8OExOI.js} +18 -13
  38. package/dist/{JpAddress-C8wbZfE0.js → JpAddress-BIgqDfQ0.js} +10 -10
  39. package/dist/{LandingLayout-Dr28QxoC.js → LandingLayout-DEgZw1-N.js} +5 -3
  40. package/dist/{LegalCompanyNameField-DHyMLbZc.js → LegalCompanyNameField-CblBotGC.js} +5 -5
  41. package/dist/{LegalRepresentativeDetailsPage-CusLAG25.js → LegalRepresentativeDetailsPage-BYgKGZL1.js} +4 -4
  42. package/dist/{Link-C1szPOri.js → Link-BVdY7Jkl.js} +1 -1
  43. package/dist/{ListItem-nK0xrija.js → ListItem-CNuX4D7n.js} +2 -2
  44. package/dist/{LoaderWrapper-BEzoHtmn.js → LoaderWrapper-CU0bf3jD.js} +1 -1
  45. package/dist/ManageIndividualComponent-BYBvuHfj.js +46 -0
  46. package/dist/{ManageTermsOfServiceComponent-HijCyHGy.js → ManageTermsOfServiceComponent-CfN53LIT.js} +3 -3
  47. package/dist/{ManageTransferInstrumentComponent-C1f0GAQr.js → ManageTransferInstrumentComponent-B7gKGWHz.js} +10 -10
  48. package/dist/{MaskedInput-Ckb7nz68.js → MaskedInput-BNceotwn.js} +4 -4
  49. package/dist/{MaybeModal-DolShkyo.js → MaybeModal-hVrKDPDU.js} +2 -2
  50. package/dist/{Modal-EL9MXgbw.js → Modal-C8kGCLbp.js} +3 -3
  51. package/dist/{Name-BSak9KXo.js → Name-GILpP1SS.js} +4 -4
  52. package/dist/{NewSummary-Buy5WzoM.js → NewSummary-C5UR_Xj1.js} +2 -2
  53. package/dist/{OnboardingDropinComponent-BRlY6KUs.js → OnboardingDropinComponent-CK5KIhNx.js} +74 -74
  54. package/dist/{PayoutDetailsDropin-nXxBue_s.js → PayoutDetailsDropin-CLdEm9BA.js} +465 -226
  55. package/dist/PayoutDetailsPage-s-_gJFC2.js +914 -0
  56. package/dist/{RadioGroup-BTCmUbA0.js → RadioGroup-PEWX2KAj.js} +1 -1
  57. package/dist/{Review-CYOIXbFm.js → Review-CFnIOiZT.js} +6 -6
  58. package/dist/{RootBusinessDetailsPage-BZ1QnczY.js → RootBusinessDetailsPage-mnrfIy0-.js} +4 -4
  59. package/dist/{RootBusinessLinesPage-CcUJQEkg.js → RootBusinessLinesPage-BH3Lns3X.js} +28 -35
  60. package/dist/{RootIndividualDetailsPage-C2GvNs12.js → RootIndividualDetailsPage-BzgHIe3h.js} +7 -7
  61. package/dist/{Select-BgkHFapB.js → Select-C4C8R-Ci.js} +4 -4
  62. package/dist/{SignPCIComponent-CpAtbAKc.js → SignPCIComponent-B7rKUpjS.js} +11 -11
  63. package/dist/{SingpassSelection-DxXIwmVH.js → SingpassSelection-WxIUEYNK.js} +4 -4
  64. package/dist/{SoleProprietorshipPage-C8ENenc3.js → SoleProprietorshipPage-C_fewFI3.js} +3 -3
  65. package/dist/{SourceOfFundsPage-D3dzjyGw.js → SourceOfFundsPage-UeXmtQEJ.js} +33 -33
  66. package/dist/{StepProgressIndicator-ZWEENbMM.js → StepProgressIndicator-DiB-t9hK.js} +1 -1
  67. package/dist/{StoreProvider-DKCxUPee.js → StoreProvider-C4og8Y8I.js} +111 -91
  68. package/dist/{Summary-BMM1xjqy.js → Summary-DkZ_an9u.js} +7 -20
  69. package/dist/{TaxInformationField-DkZhHedg.js → TaxInformationField-BOZj8YLo.js} +27 -23
  70. package/dist/{TaxReportingDropin-gAAULI4S.js → TaxReportingDropin-9HGGrPyM.js} +14 -14
  71. package/dist/{TextArea-u_xiMf1c.js → TextArea-Bu9ppy0I.js} +2 -2
  72. package/dist/{TileGroup-r_3ClexW.js → TileGroup-BRzhDdL0.js} +2 -2
  73. package/dist/{TrustDetailsPage-B-5f_JZn.js → TrustDetailsPage-C3gYEzPT.js} +32 -38
  74. package/dist/{TrustMemberCompanyPage-CyjbjBSw.js → TrustMemberCompanyPage-BK54Of_F.js} +5 -5
  75. package/dist/{TrustMemberIndividualPage-Cfrri13a.js → TrustMemberIndividualPage-fVZrXJjA.js} +5 -5
  76. package/dist/{TrustMemberRoleAndTypePage-D4DQm-6B.js → TrustMemberRoleAndTypePage-BVHOuXP3.js} +22 -22
  77. package/dist/{TrustMembersOverview-DdCvtsr1.js → TrustMembersOverview-Ab-dwNTz.js} +11 -11
  78. package/dist/{UnincorporatedPartnershipIndividualPage-BF6xWHcg.js → UnincorporatedPartnershipIndividualPage-C32LEyHG.js} +4 -4
  79. package/dist/{UnincorporatedPartnershipMemberCompanyPage-DX_M1Ynr.js → UnincorporatedPartnershipMemberCompanyPage-22Bl_EUP.js} +4 -4
  80. package/dist/{UnincorporatedPartnershipMemberRoleAndTypePage-7gGtWzqV.js → UnincorporatedPartnershipMemberRoleAndTypePage-BjywaZQe.js} +10 -10
  81. package/dist/{UnincorporatedPartnershipMembersOverview-qYm3eukg.js → UnincorporatedPartnershipMembersOverview-RY7m4iC5.js} +7 -7
  82. package/dist/{VerificationErrorAlert-CwjcCtq7.js → VerificationErrorAlert-CCJ0vNsY.js} +2 -2
  83. package/dist/{ViewVerificationStatusComponent-Z8OcoBMo.js → ViewVerificationStatusComponent-Bg1I1q10.js} +2 -2
  84. package/dist/adyen-business-financing.js +2 -2
  85. package/dist/adyen-individual-configuration.js +2 -2
  86. package/dist/adyen-individual-status.js +2 -2
  87. package/dist/adyen-invited-decision-maker.js +2 -2
  88. package/dist/adyen-kyc-components.js +15 -15
  89. package/dist/adyen-onboarding.js +2 -2
  90. package/dist/adyen-terms-of-service-management.js +2 -2
  91. package/dist/adyen-terms-of-service-status.js +2 -2
  92. package/dist/adyen-transfer-instrument-configuration.js +2 -2
  93. package/dist/adyen-transfer-instrument-management.js +2 -2
  94. package/dist/adyen-verification-status.js +2 -2
  95. package/dist/{bafinUtils-Dsw4DufE.js → bafinUtils-DkCSO6ft.js} +1 -1
  96. package/dist/{bg-BG-DMNRRZZE.js → bg-BG-89Mw-9Lv.js} +7 -7
  97. package/dist/{bg-BG-Cj3_UGTi.js → bg-BG-C9zrgb_c.js} +7 -1
  98. package/dist/{bg-BG-C6dSR1jk.js → bg-BG-dmpv4Zom.js} +2 -2
  99. package/dist/{commonValidators-dPJjXT_8.js → commonValidators-Dd4wegC9.js} +1 -1
  100. package/dist/{cs-CZ-B6atm9_Q.js → cs-CZ-6rOIfRJu.js} +2 -2
  101. package/dist/{cs-CZ-DxfB5dcV.js → cs-CZ-B-zm6HVH.js} +7 -1
  102. package/dist/{cs-CZ-DXSMRqPu.js → cs-CZ-CTxXvHtH.js} +7 -7
  103. package/dist/{da-DK-BfsYpvel.js → da-DK-CGhsIGZt.js} +7 -1
  104. package/dist/{da-DK-Cv6XUSoW.js → da-DK-C_GqHCay.js} +2 -2
  105. package/dist/{da-DK-CMVthpSr.js → da-DK-D_TOcmOO.js} +7 -7
  106. package/dist/{de-DE-BplDsJEb.js → de-DE-BmWBo3gX.js} +2 -2
  107. package/dist/{de-DE-B5TOuf7l.js → de-DE-DYzAiXHM.js} +7 -7
  108. package/dist/{de-DE-CEsDXBn-.js → de-DE-K9FyOJiI.js} +7 -1
  109. package/dist/{dropinUtils-14DNwEiI.js → dropinUtils-vsDEK6cs.js} +17 -6
  110. package/dist/{el-GR-BNNlN4l2.js → el-GR-DItzpoar.js} +7 -7
  111. package/dist/{el-GR-dRK7xHn2.js → el-GR-Fo7-xCrc.js} +2 -2
  112. package/dist/{el-GR-CM3bIzr7.js → el-GR-L-39cQfz.js} +7 -1
  113. package/dist/en-US-qlQTJNiL.js +13 -0
  114. package/dist/{es-ES-DRsix_Xn.js → es-ES-BkqlH093.js} +2 -2
  115. package/dist/{es-ES-Wcpc6fm1.js → es-ES-BmH6eADf.js} +7 -7
  116. package/dist/{es-ES-BWFP5itn.js → es-ES-TUyeIp6F.js} +7 -1
  117. package/dist/{et-EE-CcXrAAc7.js → et-EE-Cw_VydGb.js} +7 -1
  118. package/dist/{et-EE-DNC4hcxm.js → et-EE-DSZa_33d.js} +7 -7
  119. package/dist/{et-EE-BXiYapXy.js → et-EE-H8yxvhQj.js} +2 -2
  120. package/dist/{fi-FI-BftTiz0c.js → fi-FI-BfwJVwi9.js} +2 -2
  121. package/dist/{fi-FI-BJLU1JHw.js → fi-FI-DJ8BbVPT.js} +7 -7
  122. package/dist/{fi-FI-DenK0WPz.js → fi-FI-tgvQX_Iq.js} +7 -1
  123. package/dist/{formUtils-DkgXgXMP.js → formUtils-DFuc8i5Q.js} +3 -3
  124. package/dist/{fr-FR-C6jxjXAI.js → fr-FR-CzjsW73Q.js} +2 -2
  125. package/dist/{fr-FR-DodNoPid.js → fr-FR-D533_MOG.js} +7 -7
  126. package/dist/{fr-FR-BmTswZU5.js → fr-FR-ynC19lSF.js} +7 -1
  127. package/dist/{getName-Z2gJognf.js → getName-D3Sba-PI.js} +1 -1
  128. package/dist/{getProblemsForEntity-DAFLyYyP.js → getProblemsForEntity-Db-ejW4z.js} +1 -1
  129. package/dist/{getTrustedFields-Yhy_d5h0.js → getTrustedFields-DUXTMWcg.js} +1 -1
  130. package/dist/{hr-HR-SDrDZRLV.js → hr-HR--5syrowD.js} +7 -1
  131. package/dist/{hr-HR-C0NLgF1r.js → hr-HR-CIxdonpk.js} +7 -7
  132. package/dist/{hr-HR-B_TEU3r4.js → hr-HR-ZrpQrsik.js} +2 -2
  133. package/dist/{hu-HU-C3ZiFh1F.js → hu-HU--6ZxXlbV.js} +7 -7
  134. package/dist/{hu-HU-DSVf2zbX.js → hu-HU-BFiGk_QT.js} +7 -1
  135. package/dist/{hu-HU-CX83V9tu.js → hu-HU-Ds3go4h4.js} +2 -2
  136. package/dist/{isEmpty-boSQX897.js → isEmpty-DFqK5kY2.js} +2 -2
  137. package/dist/{it-IT-CZ4aDoVQ.js → it-IT-B5cf2VTN.js} +7 -7
  138. package/dist/{it-IT-DJe5OflH.js → it-IT-C0Zv5ms9.js} +7 -1
  139. package/dist/{it-IT-CXlaZNIj.js → it-IT-Dx15tkIe.js} +2 -2
  140. package/dist/{ja-JP-GGV_-V6p.js → ja-JP--u211vje.js} +7 -1
  141. package/dist/{ja-JP-BpeNsNhn.js → ja-JP-DY4CJlUf.js} +7 -7
  142. package/dist/{ja-JP-A6ArIIZ8.js → ja-JP-Qu7oEIEy.js} +2 -2
  143. package/dist/{japanSupportUtils-DC6ssQNc.js → japanSupportUtils-DqXOWm97.js} +1 -1
  144. package/dist/{localizeDateString-6qoF3x9R.js → localizeDateString-D8JgUqw2.js} +1 -1
  145. package/dist/{lt-LT-ww192lYg.js → lt-LT-BebOeKIA.js} +2 -2
  146. package/dist/{lt-LT-C8n1GZoU.js → lt-LT-CkjEvGSp.js} +7 -7
  147. package/dist/{lt-LT-C9nsCODy.js → lt-LT-D2Hrhr7v.js} +7 -1
  148. package/dist/{lv-LV-BdPdaVGy.js → lv-LV-BdZK9nQA.js} +7 -7
  149. package/dist/{lv-LV-CpHy-ZoF.js → lv-LV-CYcrO-6d.js} +2 -2
  150. package/dist/{lv-LV-Bue450PR.js → lv-LV-D04q9r-y.js} +7 -1
  151. package/dist/{mapExistingFile-BMJL0nyv.js → mapExistingFile-BIYg1E5G.js} +2 -2
  152. package/dist/{mapJpAddressSchemaToAddressLocalizations-B-YIRvOK.js → mapJpAddressSchemaToAddressLocalizations-D5xnQLSI.js} +2 -2
  153. package/dist/{mapLegalEntityToIndividualSchema-CS9_Bo3k.js → mapLegalEntityToIndividualSchema-By5v9v9G.js} +4 -4
  154. package/dist/{mapTransferInstrumentToPayoutAccount-DnaL9hYo.js → mapTransferInstrumentToPayoutAccount-BM24JYqT.js} +2 -2
  155. package/dist/{nl-NL-4Mv4rnYy.js → nl-NL-CJ7MoBj2.js} +7 -1
  156. package/dist/{nl-NL-BwWFlBOs.js → nl-NL-FbJ2sHba.js} +2 -2
  157. package/dist/{nl-NL-B2Uku0lw.js → nl-NL-YcL7Gufl.js} +7 -7
  158. package/dist/{no-NO-JWsSd7iY.js → no-NO-B5BjEy8n.js} +2 -2
  159. package/dist/{no-NO-ByCZ3mhz.js → no-NO-C20s6CoP.js} +7 -1
  160. package/dist/{no-NO-DjOcJWnC.js → no-NO-KkYB-VQD.js} +7 -7
  161. package/dist/{omitObscuredFieldsIfUnchanged-Bbes2BVX.js → omitObscuredFieldsIfUnchanged-CyJfNYkP.js} +2 -2
  162. package/dist/{patternValidators-B7j6YIOy.js → patternValidators-DRSnA1z7.js} +2 -2
  163. package/dist/{pl-PL-DCi5Lf4k.js → pl-PL-C19Btj2D.js} +7 -1
  164. package/dist/{pl-PL-Bmaq3IC3.js → pl-PL-CPdKf-J0.js} +7 -7
  165. package/dist/{pl-PL-CLmmSNgn.js → pl-PL-DuM6hbqZ.js} +2 -2
  166. package/dist/{process-field-configurations-BxJae0v4.js → process-field-configurations-Cl2nqpBp.js} +2 -2
  167. package/dist/{pt-BR-BJOww8U1.js → pt-BR-BKKQIUJP.js} +2 -2
  168. package/dist/{pt-BR-BKdT0Bpl.js → pt-BR-ERWeus3c.js} +7 -7
  169. package/dist/{pt-BR-DRz5cG4o.js → pt-BR-zOjPTIPu.js} +7 -1
  170. package/dist/{pt-PT-CL9VzmZE.js → pt-PT-CC7zlk3R.js} +2 -2
  171. package/dist/{pt-PT-C2li07N1.js → pt-PT-DUTGt5L5.js} +7 -7
  172. package/dist/{pt-PT-ChRbnn0k.js → pt-PT-t5M8xwTU.js} +7 -1
  173. package/dist/{resolveEnvironment-_hyPvH0e.js → resolveEnvironment-BIF7mwM5.js} +3 -3
  174. package/dist/{ro-RO-iPjOeKwM.js → ro-RO-BnFjok5O.js} +7 -7
  175. package/dist/{ro-RO-Cu1T3z6k.js → ro-RO-CuabgXj1.js} +2 -2
  176. package/dist/{ro-RO-Dgie5z3m.js → ro-RO-DK9gVwS9.js} +7 -1
  177. package/dist/{roleMetadata-C9fdKfQp.js → roleMetadata-BAURfCmh.js} +3 -3
  178. package/dist/{sk-SK-bMDoNP19.js → sk-SK-2J6iKfmK.js} +7 -1
  179. package/dist/{sk-SK-3_SoEn6P.js → sk-SK-CLPd85I3.js} +7 -7
  180. package/dist/{sk-SK-CEjJ-qZG.js → sk-SK-DM1yY8DA.js} +2 -2
  181. package/dist/{sl-SI-BfO3xEJx.js → sl-SI--pDTatHh.js} +2 -2
  182. package/dist/{sl-SI-DKSu25rO.js → sl-SI-D82ccY62.js} +7 -1
  183. package/dist/{sl-SI-DbfswGh0.js → sl-SI-T9_Ty-NS.js} +7 -7
  184. package/dist/style.css +9 -21
  185. package/dist/styles-CLV89_hH.js +9 -21
  186. package/dist/{sv-SE-Blw4s8bC.js → sv-SE-3-h2VlYi.js} +7 -7
  187. package/dist/{sv-SE-CMLKzwtj.js → sv-SE-CDxyyNV0.js} +2 -2
  188. package/dist/{sv-SE-Co7Nkd06.js → sv-SE-CrBkos0z.js} +7 -1
  189. package/dist/types/api/companySearch/useCompanySearch.d.ts +289 -0
  190. package/dist/types/api/companySelection/useCompanySelection.d.ts +2 -4
  191. package/dist/types/api/configurations/useScenarios.d.ts +1 -1
  192. package/dist/types/api/idVerificationProviders/useExtractDocumentInformation.d.ts +4 -4
  193. package/dist/types/api/queryKeys.d.ts +1 -2
  194. package/dist/types/api/tinVerification/useVerifyTin.d.ts +245 -1
  195. package/dist/types/api/uiAnalytics/uiAnalytics.types.d.ts +6 -1
  196. package/dist/types/components/BankAccount/forms/BankVerification/store.d.ts +1 -0
  197. package/dist/types/components/BankAccount/forms/PayoutCountryDetails/PayoutCountryDetails.d.ts +3 -0
  198. package/dist/types/components/BankAccount/forms/PayoutDetails/PayoutDetailsMultiform.d.ts +27 -0
  199. package/dist/types/components/BankAccount/forms/PayoutDetails/rules.d.ts +2 -2
  200. package/dist/types/components/BankAccount/mapping/payoutKeyMappings.d.ts +25 -25
  201. package/dist/types/components/BankAccount/tasks/PayoutDetailsDropin/PayoutDetailsDropin.d.ts +0 -1
  202. package/dist/types/components/BankAccount/tasks/PayoutDetailsDropin/PayoutDetailsDropinMultiForm.d.ts +2 -0
  203. package/dist/types/components/BankAccount/tasks/PayoutDetailsDropin/utils.d.ts +7 -0
  204. package/dist/types/components/BankAccount/tasks/PayoutDetailsDropin/validate.d.ts +23 -0
  205. package/dist/types/components/Business/forms/BusinessSelection/BusinessInformationCard/BusinessInformationCard.d.ts +3 -4
  206. package/dist/types/components/Business/forms/rules.d.ts +6 -6
  207. package/dist/types/components/Business/mapping/businessDetails/businessBankAccountTaxIdUtils.d.ts +10 -0
  208. package/dist/types/components/Business/tasks/BusinessDetailsDropin/businessDetailsStore.d.ts +0 -1
  209. package/dist/types/components/Business/tasks/BusinessDetailsDropin/types.d.ts +1 -4
  210. package/dist/types/components/Business/tasks/BusinessDetailsDropin/utils.d.ts +2 -3
  211. package/dist/types/components/BusinessLines/fields/SalesChannels/SalesChannels.d.ts +1 -1
  212. package/dist/types/components/BusinessLines/fields/SalesChannels/types.d.ts +1 -1
  213. package/dist/types/components/Contract/tasks/ServiceAgreementDropin/types.d.ts +2 -1
  214. package/dist/types/components/EFP/mapping/businessFinancingKeyMappings.d.ts +499 -487
  215. package/dist/types/components/Individual/forms/Individual.rules.d.ts +2 -2
  216. package/dist/types/components/Individual/forms/InviteDetails/utils.d.ts +2 -0
  217. package/dist/types/components/Individual/forms/InviteDetails/validate.d.ts +2 -1
  218. package/dist/types/components/Shared/fields/BusinessRegistrationNumberField/fieldConfig.d.ts +1 -2
  219. package/dist/types/components/Shared/fields/BusinessRegistrationNumberField/registrationNumberTypes.d.ts +5 -0
  220. package/dist/types/components/Shared/fields/DBANameField/DBANameField.d.ts +1 -1
  221. package/dist/types/components/Shared/fields/DBANameField/types.d.ts +1 -1
  222. package/dist/types/components/Shared/fields/DateOfIncorporationField/DateOfIncorporationField.d.ts +1 -1
  223. package/dist/types/components/Shared/fields/DateOfIncorporationField/types.d.ts +1 -1
  224. package/dist/types/components/Shared/fields/IndustryCodeField/IndustryCodeField.d.ts +1 -1
  225. package/dist/types/components/Shared/fields/IndustryCodeField/types.d.ts +1 -1
  226. package/dist/types/components/Shared/fields/Name/validate.d.ts +2 -1
  227. package/dist/types/components/Shared/fields/PhoneField/PhoneField.d.ts +1 -1
  228. package/dist/types/components/Shared/fields/PhoneField/types.d.ts +1 -1
  229. package/dist/types/components/Shared/fields/StockExchangeMICField/StockExchangeMICField.d.ts +1 -1
  230. package/dist/types/components/Shared/fields/StockExchangeMICField/types.d.ts +1 -1
  231. package/dist/types/components/Shared/fields/StockISINField/StockISINField.d.ts +1 -1
  232. package/dist/types/components/Shared/fields/StockISINField/types.d.ts +1 -1
  233. package/dist/types/components/Shared/fields/StockTickerSymbol/StockTickerSymbolField.d.ts +1 -1
  234. package/dist/types/components/Shared/fields/StockTickerSymbol/types.d.ts +1 -1
  235. package/dist/types/components/Shared/forms/Address/utils.d.ts +1 -1
  236. package/dist/types/components/Shared/forms/Address/validate.d.ts +1 -1
  237. package/dist/types/components/Trust/forms/Trust/rules.d.ts +2 -2
  238. package/dist/types/context/ToggleContext/types.d.ts +51 -56
  239. package/dist/types/core/models/api/branchAllocation.d.ts +5 -0
  240. package/dist/types/core/models/api/get-scenarios.d.ts +2 -0
  241. package/dist/types/core/models/api/organization.d.ts +2 -0
  242. package/dist/types/core/user-events.d.ts +1 -1
  243. package/dist/types/hooks/useForm/types.d.ts +1 -0
  244. package/dist/types/hooks/usePageLandedEvent.d.ts +3 -3
  245. package/dist/types/utils/entityStatusUtil.d.ts +1 -1
  246. package/dist/types/utils/validatorUtils.d.ts +1 -0
  247. package/dist/{types-CTwBMnPB.js → types-C7ANBXKc.js} +56 -61
  248. package/dist/{types-DO_d6cVD.js → types-DsA42AXS.js} +1 -1
  249. package/dist/{types-DR1UyHuL.js → types-DxlKs1U5.js} +1 -1
  250. package/dist/{types-BxcVVfxO.js → types-VsWq4EjV.js} +1 -1
  251. package/dist/{unincorporated-partnership-DYTYq9It.js → unincorporated-partnership-uA1X2l53.js} +1 -1
  252. package/dist/{useAssociatedLegalEntity-CuVMzeS0.js → useAssociatedLegalEntity-3LNpnrN6.js} +1 -1
  253. package/dist/{useBusinessDetailsData-BDvJiv0U.js → useBusinessDetailsData-dZbZQSmY.js} +330 -314
  254. package/dist/{useCreateLegalEntity-BqiM6Z4D.js → useCreateLegalEntity-DDkkYr4O.js} +1 -1
  255. package/dist/{useForm-C1botkQ9.js → useForm-Y4-kimHb.js} +3 -3
  256. package/dist/{useFormContext-DLkJgmS9.js → useFormContext-TKoF8IdB.js} +7 -7
  257. package/dist/{useGlobalData-BydN0B8P.js → useGlobalData-DZvXyS0l.js} +9 -9
  258. package/dist/{useMultiForm-ZSjb-MNl.js → useMultiForm-ieaYM7hW.js} +4 -4
  259. package/dist/{useOnboardingStatus-CpkyRoX9.js → useOnboardingStatus-DhxCTR8e.js} +1 -1
  260. package/dist/{useScenarios-DNnpIr7b.js → useScenarios-CwSfXmoW.js} +1 -1
  261. package/dist/{useTermsOfServiceStatus-BH74ie3Z.js → useTermsOfServiceStatus-DPGw4QdQ.js} +1 -1
  262. package/dist/{useToastContext-CN6SzXSt.js → useToastContext-BdsMS3mt.js} +1 -1
  263. package/dist/{useUnincorporatedPartnershipMembers-z5aGwc0I.js → useUnincorporatedPartnershipMembers-D5ndPAbv.js} +4 -4
  264. package/dist/{useUpdateBusinessLines-D5WMs9_g.js → useUpdateBusinessLines-Dwk23sZB.js} +5 -7
  265. package/dist/{useUpdateLegalEntity-8Sn5DTcn.js → useUpdateLegalEntity-5lOidXXX.js} +2 -2
  266. package/dist/{utils-CL8Y2cxl.js → utils-BwwVW2aU.js} +6 -6
  267. package/dist/{utils-CKmUVF30.js → utils-C5ekxdx1.js} +1 -1
  268. package/dist/{utils-Cbs8k6wy.js → utils-C_Fyu6Kr.js} +1 -1
  269. package/dist/{utils-TMcBiPzX.js → utils-CdhuiXMy.js} +1 -1
  270. package/dist/{utils-Bx0ZXntJ.js → utils-Dny5dbku.js} +2 -2
  271. package/dist/{validate-Dy8GuvEF.js → validate-CFI052fe.js} +3 -3
  272. package/dist/{validate-Bz4kAnZq.js → validate-bZBB2yOu.js} +2 -2
  273. package/dist/{validationError-Cl6ZvFO8.js → validationError-XxBa8ECY.js} +2 -2
  274. package/package.json +10 -10
  275. package/dist/BusinessFinancingPage-CMoJlPym.js +0 -43
  276. package/dist/ManageIndividualComponent-DJE85k3F.js +0 -46
  277. package/dist/PayoutDetailsPage-DHEVWO5C.js +0 -55
  278. package/dist/en-US-CJDkXFZ6.js +0 -13
  279. package/dist/types/components/BankAccount/tasks/PayoutDetailsDropin/formatAccountVerificationSummary.d.ts +0 -7
@@ -2,63 +2,63 @@
2
2
  {
3
3
  try {
4
4
  let e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
5
- n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "ab442435-ec41-4648-9d4d-3ece62dd3646", e._sentryDebugIdIdentifier = "sentry-dbid-ab442435-ec41-4648-9d4d-3ece62dd3646");
5
+ n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "5eb48620-f6c7-48d5-8ace-540fe735d5b6", e._sentryDebugIdIdentifier = "sentry-dbid-5eb48620-f6c7-48d5-8ace-540fe735d5b6");
6
6
  } catch (e) {
7
7
  }
8
8
  }
9
9
  ;
10
10
  import { jsxs, jsx, Fragment } from "preact/jsx-runtime";
11
- import { signal } from "@preact/signals";
12
11
  import { useQuery, useMutation, useQueryClient, skipToken } from "@tanstack/preact-query";
13
12
  import { useState, useEffect, useRef, useCallback, useContext, useMemo as useMemo$1 } from "preact/hooks";
14
- import { b as useApiContext, j as httpPost, k as httpGet, ae as createLogger, a9 as CountryCodes, u as useTranslation, x as useAnalyticsContext, z as Icon, N as Typography, V as Button, ah as objectsDeepEqual, H as useToggleContext, aB as Header, ax as isEmpty, ab as translateTranslatable, q as hasOwnEntityAssociationOfType, L as LegalEntityTypes, t as useAccountHolder, m as useSettingsContext, C as Alert, a8 as getLegalEntityCountry, aQ as Trans, b3 as EEA_Countries, ap as useDataset, O as StackLayout, aq as datasetIdentifier, b4 as isAccountIdentifierObscured, b5 as hasEmptyFields, b6 as extractFieldName, b7 as concatenateFieldNames, aS as keysOf, ak as getCapabilityProblems, w as TaskTypes, an as cloneObject, am as datasetUtilities } from "./StoreProvider-DKCxUPee.js";
15
- import { u as useTransferInstrument, m as mapTransferInstrumentToPayoutAccount } from "./mapTransferInstrumentToPayoutAccount-DnaL9hYo.js";
16
- import { L as LoaderWrapper } from "./LoaderWrapper-BEzoHtmn.js";
13
+ import { b as useApiContext, j as httpPost, k as httpGet, ae as createLogger, a9 as CountryCodes, u as useTranslation, x as useAnalyticsContext, z as Icon, N as Typography, V as Button, ah as objectsDeepEqual, H as useToggleContext, aB as Header, ax as isEmpty, ab as translateTranslatable, q as hasOwnEntityAssociationOfType, L as LegalEntityTypes, t as useAccountHolder, m as useSettingsContext, C as Alert, a8 as getLegalEntityCountry, aR as Trans, b4 as EEA_Countries, ap as useDataset, O as StackLayout, aq as datasetIdentifier, b5 as isAccountIdentifierObscured, b6 as hasEmptyFields, b7 as extractFieldName, b8 as concatenateFieldNames, aT as keysOf, ak as getCapabilityProblems, w as TaskTypes, an as cloneObject, am as datasetUtilities } from "./StoreProvider-C4og8Y8I.js";
14
+ import { u as useTransferInstrument, m as mapTransferInstrumentToPayoutAccount } from "./mapTransferInstrumentToPayoutAccount-BM24JYqT.js";
15
+ import { L as LoaderWrapper } from "./LoaderWrapper-CU0bf3jD.js";
17
16
  import { S as SettingNames } from "./types-Dv0COrvY.js";
18
- import { u as useGlobalDataSlice, a as useGlobalData, b as useResetGlobalData, c as useStateContext, F as FormWrapper } from "./useGlobalData-BydN0B8P.js";
19
- import { a as useInvalidateRootLegalEntity, u as useToastContext } from "./useToastContext-CN6SzXSt.js";
20
- import { F as FeatureNames } from "./types-CTwBMnPB.js";
21
- import { a as augmentWithCountryConfigs, g as getPropsFromConfigurations } from "./process-field-configurations-BxJae0v4.js";
22
- import { g as getRequiredForms, a as addValidityToForms, u as useFormComposer } from "./dropinUtils-14DNwEiI.js";
23
- import { u as uppercase, p as payoutAccountFormat, m as mapExistingFile, g as getPageName, b as useScenarioConfiguration, c as useUnifyLoadingStatus } from "./mapExistingFile-BMJL0nyv.js";
24
- import { C as Confirm } from "./Confirm-gEhhWD8f.js";
25
- import { c as currencyByCountry } from "./types-DO_d6cVD.js";
26
- import { i as isValidationError, p as processValidationErrors, b as isIdDocumentUploadError, c as isBankStatementUploadError, a as isMaintenanceModeError, m as mapCreateOrUpdateTransferInstrumentErrorMessageToTranslatable } from "./validationError-Cl6ZvFO8.js";
17
+ import { u as useGlobalDataSlice, a as useGlobalData, b as useResetGlobalData, c as useStateContext, F as FormWrapper } from "./useGlobalData-DZvXyS0l.js";
18
+ import { a as useInvalidateRootLegalEntity, u as useToastContext } from "./useToastContext-BdsMS3mt.js";
19
+ import { F as FeatureNames } from "./types-C7ANBXKc.js";
20
+ import { a as augmentWithCountryConfigs, g as getPropsFromConfigurations } from "./process-field-configurations-Cl2nqpBp.js";
21
+ import { g as getRequiredForms, a as addValidityToForms, u as useFormComposer } from "./dropinUtils-vsDEK6cs.js";
22
+ import { u as uppercase, p as payoutAccountFormat, m as mapExistingFile, g as getPageName, b as useScenarioConfiguration, c as useUnifyLoadingStatus } from "./mapExistingFile-BIYg1E5G.js";
23
+ import { C as Confirm } from "./Confirm-BoQbVMKQ.js";
24
+ import { c as currencyByCountry } from "./types-DsA42AXS.js";
25
+ import { i as isValidationError, p as processValidationErrors, b as isIdDocumentUploadError, c as isBankStatementUploadError, a as isMaintenanceModeError, m as mapCreateOrUpdateTransferInstrumentErrorMessageToTranslatable } from "./validationError-XxBa8ECY.js";
27
26
  import { t as trackNavigation } from "./trackNavigation-db_h46BT.js";
28
- import { D as DropzoneFile, e as bytesToSize, f as defaultFileValidationOptions, h as fileValidationRules, S as StateContextSetter, i as fileToBase64, a as getDocument, c as createDocumentRequest, d as documentApiUtils, b as getFileExtention } from "./validate-Dy8GuvEF.js";
29
- import { b as getPayoutAccountHolderName, g as getLegalEntityNameBasedOnType } from "./getName-Z2gJognf.js";
30
- import { o as omitObscuredFieldsIfUnchanged } from "./omitObscuredFieldsIfUnchanged-Bbes2BVX.js";
27
+ import { D as DropzoneFile, e as bytesToSize, f as defaultFileValidationOptions, h as fileValidationRules, S as StateContextSetter, i as fileToBase64, a as getDocument, c as createDocumentRequest, d as documentApiUtils, b as getFileExtention } from "./validate-CFI052fe.js";
28
+ import { b as getPayoutAccountHolderName, g as getLegalEntityNameBasedOnType } from "./getName-D3Sba-PI.js";
29
+ import { o as omitObscuredFieldsIfUnchanged } from "./omitObscuredFieldsIfUnchanged-CyJfNYkP.js";
30
+ import { signal } from "@preact/signals";
31
31
  import { Show } from "@preact/signals/utils";
32
- import { s as summaryStep } from "./Summary-BMM1xjqy.js";
32
+ import { s as summaryStep } from "./Summary-DkZ_an9u.js";
33
33
  import { g as getFieldProps, a as getFormProps } from "./getProps-Cc3J2-z9.js";
34
- import { c as createFormRules } from "./form-rules-DhbF2mY4.js";
35
- import { s as summaryItem } from "./summaryItem-CAQCQSkt.js";
36
34
  import cx from "classnames";
37
35
  import { memo, useRef as useRef$1, useState as useState$1, useMemo, useEffect as useEffect$1, lazy } from "preact/compat";
38
- import { F as Field } from "./Field-BguffV12.js";
39
- import { M as Modal } from "./Modal-EL9MXgbw.js";
40
- import { T as TextArea } from "./TextArea-u_xiMf1c.js";
41
- import { u as useForm } from "./useForm-C1botkQ9.js";
42
- import { E as EndStateLayout } from "./EndStateLayout-D23FWrbD.js";
43
- import { E as ErrorPanel } from "./ErrorPanel-B8fHWJ7W.js";
44
- import { c as createFormUtils, m as mergeFieldMetadataIntoProps } from "./formUtils-DkgXgXMP.js";
36
+ import { F as Field } from "./Field--T3FQepj.js";
37
+ import { M as Modal } from "./Modal-C8kGCLbp.js";
38
+ import { T as TextArea } from "./TextArea-Bu9ppy0I.js";
39
+ import { u as useForm } from "./useForm-Y4-kimHb.js";
40
+ import { E as EndStateLayout } from "./EndStateLayout-DURCt96r.js";
41
+ import { E as ErrorPanel } from "./ErrorPanel-ALBlWg3_.js";
42
+ import { c as createFormUtils, m as mergeFieldMetadataIntoProps } from "./formUtils-DFuc8i5Q.js";
45
43
  import { b as bankStatementDescriptionPattern } from "./basePatterns-BwdnMQxI.js";
46
44
  import { createContext } from "preact";
47
45
  import OpenBankingSDK from "@adyen/openbankingsdk";
48
- import { S as Select } from "./Select-BgkHFapB.js";
49
- import { m as makeMask, n as numericInputs, a as nonInputs, s as spacer, c as customInputs, M as MaskedInput, d as alphanumericInputs, b as alphaInputs } from "./MaskedInput-Ckb7nz68.js";
46
+ import { S as Select } from "./Select-C4C8R-Ci.js";
47
+ import { m as makeMask, n as numericInputs, a as nonInputs, s as spacer, c as customInputs, M as MaskedInput, d as alphanumericInputs, b as alphaInputs } from "./MaskedInput-BNceotwn.js";
50
48
  import { r as resolveFieldMetadata } from "./fieldConfigurations-BUT9DTUH.js";
51
- import { v as validatePatternOnBlur } from "./patternValidators-B7j6YIOy.js";
52
- import { a as isNotEmptyValidator } from "./commonValidators-dPJjXT_8.js";
53
- import { I as InputText } from "./InputText-C6-NIYzH.js";
49
+ import { v as validatePatternOnBlur } from "./patternValidators-DRSnA1z7.js";
50
+ import { a as isNotEmptyValidator } from "./commonValidators-Dd4wegC9.js";
51
+ import { I as InputText } from "./InputText-CywP4Ojh.js";
54
52
  import { C as Currencies } from "./currency-CrdnaaDu.js";
55
- import { u as useUnincorporatedPartnershipMembers } from "./useUnincorporatedPartnershipMembers-z5aGwc0I.js";
56
- import { I as Image } from "./unincorporated-partnership-DYTYq9It.js";
57
- import { C as CountryField } from "./CountryField-pznzB7Uq.js";
53
+ import { u as useUnincorporatedPartnershipMembers } from "./useUnincorporatedPartnershipMembers-D5ndPAbv.js";
54
+ import { I as Image } from "./unincorporated-partnership-uA1X2l53.js";
55
+ import { C as CountryField } from "./CountryField-DPtohqO0.js";
58
56
  import { C as Card } from "./Card-OQuFzmxm.js";
59
- import { L as Link } from "./Link-C1szPOri.js";
57
+ import { L as Link } from "./Link-BVdY7Jkl.js";
60
58
  import { T as Tag } from "./Tag-DdkVScyr.js";
61
- import { C as ContextGuidance } from "./ContextGuidance-B4qWRid4.js";
59
+ import { C as ContextGuidance } from "./ContextGuidance-CoDkF9Kh.js";
60
+ import { c as createFormRules } from "./form-rules-DhbF2mY4.js";
61
+ import { s as summaryItem } from "./summaryItem-CAQCQSkt.js";
62
62
  const getCheck = async (legalEntityId, baseUrl, data) => {
63
63
  return httpPost(
64
64
  {
@@ -189,6 +189,7 @@ const getAccountFormatsForCountry = async (country) => {
189
189
  };
190
190
  return expandedBankFormats;
191
191
  };
192
+ const showInstantVerificationPayoutModal = signal(false);
192
193
  const validateAccountIdentification = async (baseUrl, data) => {
193
194
  return httpPost(
194
195
  {
@@ -567,7 +568,10 @@ function BankDocumentClassification(props) {
567
568
  fieldValidationErrors,
568
569
  formVerificationErrors,
569
570
  shouldValidate,
570
- country
571
+ country,
572
+ handleFieldChange,
573
+ valid: propValid,
574
+ errors: propErrors
571
575
  } = props;
572
576
  const { t } = useTranslation("banking");
573
577
  const { t: commonT } = useTranslation("common");
@@ -602,7 +606,7 @@ function BankDocumentClassification(props) {
602
606
  }),
603
607
  [bankStatementValidationOptions, validators]
604
608
  );
605
- const { handleChangeFor, data, setData, valid, fieldProblems, errors, triggerValidation } = useForm({
609
+ const localForm = useForm({
606
610
  ...props,
607
611
  schema: bankDocumentClassificationFields,
608
612
  defaultData: bankData,
@@ -610,6 +614,13 @@ function BankDocumentClassification(props) {
610
614
  fieldProblems: fieldValidationErrors,
611
615
  shouldValidate
612
616
  });
617
+ const useMultiFormMode = !!handleFieldChange;
618
+ const data = useMultiFormMode ? bankData : localForm.data;
619
+ const valid = useMultiFormMode ? propValid : localForm.valid;
620
+ const errors = useMultiFormMode ? propErrors : localForm.errors;
621
+ const fieldProblems = useMultiFormMode ? fieldValidationErrors : localForm.fieldProblems;
622
+ const handleChange = useMultiFormMode ? handleFieldChange : localForm.handleChangeFor;
623
+ const { triggerValidation, setData } = localForm;
613
624
  const validateDocumentMutation = useValidateDocument({
614
625
  onSuccess: (response) => {
615
626
  userEvents.addEvent("Success", {
@@ -652,8 +663,10 @@ function BankDocumentClassification(props) {
652
663
  }
653
664
  });
654
665
  const handleDocumentUpload = async (files) => {
655
- setData("bankStatementDocument", files);
656
- triggerValidation();
666
+ handleChange("bankStatementDocument")(files);
667
+ if (!useMultiFormMode) {
668
+ triggerValidation();
669
+ }
657
670
  if (!enableBankDocumentClassification && !isShadowMode) return;
658
671
  if (files.length > 0) {
659
672
  const file = files[0];
@@ -679,34 +692,42 @@ function BankDocumentClassification(props) {
679
692
  }
680
693
  };
681
694
  useEffect$1(() => {
682
- if (formIsActive && isBankStatementOptional) {
695
+ if (!useMultiFormMode && formIsActive && isBankStatementOptional) {
683
696
  triggerValidation();
684
697
  }
685
- }, [formIsActive, isBankStatementOptional, triggerValidation]);
698
+ }, [formIsActive, isBankStatementOptional, triggerValidation, useMultiFormMode]);
686
699
  const alreadyUploadedDocuments = useMemo(
687
700
  () => bankData?.bankStatementDocument ?? [],
688
701
  [bankData?.bankStatementDocument]
689
702
  );
690
703
  useEffect$1(() => {
691
- if (alreadyUploadedDocuments.length > 0) {
704
+ if (!useMultiFormMode && alreadyUploadedDocuments.length > 0) {
692
705
  setData("bankStatementDocument", alreadyUploadedDocuments);
693
706
  if (bankData?.description) setData("description", bankData.description);
694
707
  triggerValidation();
695
708
  }
696
- }, [alreadyUploadedDocuments, bankData?.description, setData, triggerValidation]);
709
+ }, [
710
+ alreadyUploadedDocuments,
711
+ bankData?.description,
712
+ setData,
713
+ triggerValidation,
714
+ useMultiFormMode
715
+ ]);
697
716
  useEffect$1(() => {
698
- stateRef.current?.setState?.({
699
- type: "addToState",
700
- value: {
701
- data,
702
- valid,
703
- errors,
704
- fieldProblems,
705
- dataStoreId: id,
706
- schema: bankDocumentClassificationFields
707
- }
708
- });
709
- }, [data, valid, errors, fieldProblems, id]);
717
+ if (!useMultiFormMode) {
718
+ stateRef.current?.setState?.({
719
+ type: "addToState",
720
+ value: {
721
+ data,
722
+ valid,
723
+ errors,
724
+ fieldProblems,
725
+ dataStoreId: id,
726
+ schema: bankDocumentClassificationFields
727
+ }
728
+ });
729
+ }
730
+ }, [data, valid, errors, fieldProblems, id, useMultiFormMode]);
710
731
  const handleUploadNewDocument = () => {
711
732
  userEvents.addEvent("Clicked button", {
712
733
  actionType: "next",
@@ -731,7 +752,7 @@ function BankDocumentClassification(props) {
731
752
  });
732
753
  };
733
754
  const documentPreview = useMemo(() => {
734
- if (!data.bankStatementDocument?.[0] || !showReviewModal) return null;
755
+ if (!data?.bankStatementDocument?.[0] || !showReviewModal) return null;
735
756
  const file = data.bankStatementDocument?.[0];
736
757
  return file.type === "application/pdf" || file.name.toLowerCase().endsWith(".pdf") ? /* @__PURE__ */ jsx(
737
758
  "object",
@@ -747,7 +768,7 @@ function BankDocumentClassification(props) {
747
768
  }, [data?.bankStatementDocument, showReviewModal, t]);
748
769
  return /* @__PURE__ */ jsxs("div", { className: styles$3.bankDocumentPage, children: [
749
770
  /* @__PURE__ */ jsxs("form", { className: styles$3.bankDocumentClassification, children: [
750
- /* @__PURE__ */ jsx(StateContextSetter, { owner: id, stateRef }),
771
+ !useMultiFormMode && /* @__PURE__ */ jsx(StateContextSetter, { owner: id, stateRef }),
751
772
  /* @__PURE__ */ jsx(
752
773
  Header,
753
774
  {
@@ -780,7 +801,7 @@ function BankDocumentClassification(props) {
780
801
  {
781
802
  className: cx("adyen-kyc-upload-field"),
782
803
  name: "bankStatementDocument",
783
- isValid: valid.bankStatementDocument,
804
+ isValid: valid?.bankStatementDocument ?? true,
784
805
  children: (childProps) => /* @__PURE__ */ jsx(
785
806
  "div",
786
807
  {
@@ -790,10 +811,10 @@ function BankDocumentClassification(props) {
790
811
  {
791
812
  ...childProps,
792
813
  name: "bankStatementDocument",
793
- files: data.bankStatementDocument ?? [],
814
+ files: data?.bankStatementDocument ?? [],
794
815
  setFiles: handleDocumentUpload,
795
- isValid: valid.bankStatementDocument ?? isBankStatementOptional,
796
- errorMessage: errors.bankStatementDocument?.errorMessage,
816
+ isValid: valid?.bankStatementDocument ?? isBankStatementOptional,
817
+ errorMessage: errors?.bankStatementDocument?.errorMessage,
797
818
  loading: validateDocumentMutation.isPending && !isShadowMode,
798
819
  ...bankStatementValidationOptions
799
820
  }
@@ -802,23 +823,23 @@ function BankDocumentClassification(props) {
802
823
  )
803
824
  }
804
825
  ),
805
- data.bankStatementDocument?.length ? /* @__PURE__ */ jsx(
826
+ data?.bankStatementDocument?.length ? /* @__PURE__ */ jsx(
806
827
  Field,
807
828
  {
808
829
  className: "adyen-kyc-document-description",
809
830
  name: "description",
810
831
  label: formUtils.getLabel("bankDocumentFileDescription"),
811
832
  errorMessage: formUtils.getErrorMessage("description", errors, fieldProblems),
812
- isValid: valid.description,
833
+ isValid: valid?.description,
813
834
  children: (childProps) => /* @__PURE__ */ jsx(
814
835
  TextArea,
815
836
  {
816
837
  ...childProps,
817
838
  name: "description",
818
- value: data.description,
839
+ value: data?.description,
819
840
  maxLength: CHARACTERS_LIMIT,
820
- onInput: handleChangeFor("description"),
821
- "aria-invalid": !valid.description
841
+ onInput: handleChange("description"),
842
+ "aria-invalid": valid?.description === false
822
843
  }
823
844
  )
824
845
  }
@@ -1132,55 +1153,68 @@ function BankVerification(props) {
1132
1153
  data: propData,
1133
1154
  provider,
1134
1155
  id,
1135
- fieldValidationErrors
1156
+ fieldValidationErrors,
1157
+ handleFieldChange,
1158
+ valid: propValid,
1159
+ errors: propErrors
1136
1160
  } = props;
1137
1161
  const invalidateRootLegalEntity = useInvalidateRootLegalEntity();
1138
1162
  const schema = accountVerificationFields;
1139
1163
  const stateRef = useRef({ setState: null });
1140
- const { handleChangeFor, data, valid, errors, isValid, triggerValidation, fieldProblems } = useForm({
1164
+ const localForm = useForm({
1141
1165
  ...props,
1142
1166
  schema,
1143
1167
  defaultData: propData,
1144
1168
  rules: bankVerificationValidationRules,
1145
1169
  fieldProblems: fieldValidationErrors
1146
1170
  });
1171
+ const useMultiFormMode = !!handleFieldChange;
1172
+ const data = useMultiFormMode ? propData : localForm.data;
1173
+ const valid = useMultiFormMode ? propValid : localForm.valid;
1174
+ const errors = useMultiFormMode ? propErrors : localForm.errors;
1175
+ const fieldProblems = useMultiFormMode ? fieldValidationErrors : localForm.fieldProblems;
1176
+ const handleChange = useMultiFormMode ? handleFieldChange : localForm.handleChangeFor;
1147
1177
  const retrieveBankAccountInfo = async ({
1148
1178
  realLastFour,
1149
1179
  number,
1150
1180
  bankName
1151
1181
  }) => {
1152
- handleChangeFor("verifiedBankAccountNumber")(realLastFour ? `*******${realLastFour}` : number);
1153
- handleChangeFor("verifiedBankName")(bankName);
1154
- handleChangeFor("verifiedBankCountry")(country);
1155
- handleChangeFor("verifiedAccountHolder")(propData?.verifiedAccountHolder);
1156
- handleChangeFor("verifiedCurrencyCode")(
1182
+ handleChange("verifiedBankAccountNumber")(realLastFour ? `*******${realLastFour}` : number);
1183
+ handleChange("verifiedBankName")(bankName);
1184
+ handleChange("verifiedBankCountry")(country);
1185
+ handleChange("verifiedAccountHolder")(propData?.verifiedAccountHolder);
1186
+ handleChange("verifiedCurrencyCode")(
1157
1187
  propData?.verifiedCurrencyCode ?? currencyByCountry[country]?.[0]
1158
1188
  );
1159
1189
  setBankInfoValidated?.(true);
1160
1190
  hideSidebar?.(false);
1161
- triggerValidation();
1191
+ if (!useMultiFormMode) {
1192
+ localForm.triggerValidation();
1193
+ }
1162
1194
  await invalidateRootLegalEntity();
1163
1195
  showInstantVerificationPayoutModal.value = false;
1164
1196
  };
1165
1197
  useEffect(() => {
1166
- stateRef.current.setState?.({
1167
- type: "addToState",
1168
- value: {
1169
- data,
1170
- valid,
1171
- errors,
1172
- fieldProblems,
1173
- dataStoreId: id,
1174
- schema
1175
- }
1176
- });
1177
- }, [data, valid, errors, isValid]);
1198
+ if (!useMultiFormMode) {
1199
+ stateRef.current.setState?.({
1200
+ type: "addToState",
1201
+ value: {
1202
+ data,
1203
+ valid,
1204
+ errors,
1205
+ fieldProblems,
1206
+ dataStoreId: id,
1207
+ schema
1208
+ }
1209
+ });
1210
+ }
1211
+ }, [data, valid, errors, localForm.isValid, useMultiFormMode]);
1178
1212
  if (provider) {
1179
1213
  if (bankInfoValidated || !showInstantVerificationPayoutModal.value) {
1180
1214
  return null;
1181
1215
  }
1182
1216
  return /* @__PURE__ */ jsxs(Fragment, { children: [
1183
- /* @__PURE__ */ jsx(StateContextSetter, { owner: id, stateRef }),
1217
+ !useMultiFormMode && /* @__PURE__ */ jsx(StateContextSetter, { owner: id, stateRef }),
1184
1218
  /* @__PURE__ */ jsx(
1185
1219
  BankVerificationOverlay,
1186
1220
  {
@@ -1223,7 +1257,6 @@ function BankAccountFormat(props) {
1223
1257
  const simpleBankAccountNumberMetadata = (example, length, maxLength) => {
1224
1258
  if (maxLength) {
1225
1259
  return {
1226
- label: "bankAccountNumber",
1227
1260
  validators: validatePatternOnBlur(new RegExp(`^\\d{${length},${maxLength}}$`)),
1228
1261
  mask: {
1229
1262
  mask: makeMask(...numericInputs(length), ...numericInputs(maxLength - length, true))
@@ -1238,7 +1271,6 @@ const simpleBankAccountNumberMetadata = (example, length, maxLength) => {
1238
1271
  };
1239
1272
  }
1240
1273
  return {
1241
- label: "bankAccountNumber",
1242
1274
  validators: validatePatternOnBlur(new RegExp(`^\\d{${length}}$`)),
1243
1275
  mask: { mask: makeMask(...numericInputs(length)) },
1244
1276
  guidanceText: {
@@ -1251,13 +1283,11 @@ const simpleBankAccountNumberMetadata = (example, length, maxLength) => {
1251
1283
  };
1252
1284
  };
1253
1285
  const defaultFieldMetadata$3 = {
1254
- label: "bankAccountNumber",
1255
1286
  validators: isNotEmptyValidator
1256
1287
  };
1257
1288
  const defaultFieldConfig$3 = {
1258
1289
  [CountryCodes.CzechRepublic]: {
1259
1290
  // Validators & masks pulled from https://docs.adyen.com/api-explorer/legalentity/4/post/transferInstruments#request-bankAccount-accountIdentification-CZLocalAccountIdentification
1260
- label: "bankAccountNumber",
1261
1291
  validators: validatePatternOnBlur(/^((\d{2}|\d{6})-)?\d*\d{2}$/),
1262
1292
  mask: {
1263
1293
  mask: makeMask(
@@ -1285,7 +1315,6 @@ const defaultFieldConfig$3 = {
1285
1315
  [CountryCodes.Brazil]: simpleBankAccountNumberMetadata("0009795493", 4, 12),
1286
1316
  [CountryCodes.Canada]: simpleBankAccountNumberMetadata("10220001111", 5, 12),
1287
1317
  [CountryCodes.HongKong]: {
1288
- label: "bankAccountNumber",
1289
1318
  validators: validatePatternOnBlur(new RegExp(`^\\d{${6},${18}}$`)),
1290
1319
  mask: {
1291
1320
  mask: makeMask(...numericInputs(6), ...numericInputs(12, true))
@@ -1304,7 +1333,6 @@ const defaultFieldConfig$3 = {
1304
1333
  [CountryCodes.Sweden]: simpleBankAccountNumberMetadata("123456789", 7, 10),
1305
1334
  [CountryCodes.UnitedStates]: simpleBankAccountNumberMetadata("10220001111", 3, 17),
1306
1335
  [CountryCodes.Poland]: {
1307
- label: "bankAccountNumber",
1308
1336
  validators: validatePatternOnBlur(/^\d{26}$/),
1309
1337
  mask: {
1310
1338
  mask: makeMask(
@@ -1332,7 +1360,6 @@ const defaultFieldConfig$3 = {
1332
1360
  }
1333
1361
  },
1334
1362
  [CountryCodes.NewZealand]: {
1335
- label: "bankAccountNumber",
1336
1363
  validators: validatePatternOnBlur(/^\d{15,16}$/),
1337
1364
  mask: {
1338
1365
  mask: makeMask(
@@ -1359,10 +1386,20 @@ const defaultFieldConfig$3 = {
1359
1386
  const bankAccountNumberFields = ["bankAccountNumber"];
1360
1387
  function BankAccountNumber(props) {
1361
1388
  const { t } = useTranslation("common");
1362
- const { country, fieldConfig = defaultFieldConfig$3, onFocus, onBlur } = props;
1389
+ const {
1390
+ country,
1391
+ fieldConfig = defaultFieldConfig$3,
1392
+ onFocus,
1393
+ onBlur,
1394
+ handleFieldChange,
1395
+ data: propsData,
1396
+ valid: propsValid,
1397
+ errors: propsErrors,
1398
+ fieldValidationErrors: propsFieldValidationErrors
1399
+ } = props;
1363
1400
  const metadata = resolveFieldMetadata(fieldConfig[country], {}, defaultFieldMetadata$3);
1364
1401
  const mergedProps = mergeFieldMetadataIntoProps("bankAccountNumber", metadata, props);
1365
- const { handleChangeFor, data, valid, errors, fieldProblems } = useForm({
1402
+ const localForm = useForm({
1366
1403
  ...mergedProps,
1367
1404
  schema: bankAccountNumberFields,
1368
1405
  rules: mergedProps.validators,
@@ -1370,34 +1407,42 @@ function BankAccountNumber(props) {
1370
1407
  fieldProblems: mergedProps?.fieldValidationErrors,
1371
1408
  obscuredFields: mergedProps.obscuredFields
1372
1409
  });
1410
+ const useMultiFormMode = !!handleFieldChange;
1411
+ const data = useMultiFormMode ? propsData : localForm.data;
1412
+ const valid = useMultiFormMode ? propsValid : localForm.valid;
1413
+ const errors = useMultiFormMode ? propsErrors : localForm.errors;
1414
+ const fieldProblems = useMultiFormMode ? propsFieldValidationErrors : localForm.fieldProblems;
1415
+ const handleChange = useMultiFormMode ? handleFieldChange : localForm.handleChangeFor;
1373
1416
  const handleBlur = () => {
1374
1417
  onBlur?.();
1375
- handleChangeFor("bankAccountNumber", "blur");
1418
+ handleChange("bankAccountNumber", "blur");
1376
1419
  };
1377
1420
  const { updateStateSlice } = useGlobalDataSlice(
1378
1421
  "payoutAccountDetails"
1379
1422
  );
1380
1423
  useEffect(() => {
1381
- updateStateSlice({ data, valid, errors, fieldProblems });
1382
- }, [data, valid, errors]);
1424
+ if (!useMultiFormMode) {
1425
+ updateStateSlice({ data, valid, errors, fieldProblems });
1426
+ }
1427
+ }, [data, valid, errors, fieldProblems, useMultiFormMode]);
1383
1428
  const formUtils = createFormUtils(mergedProps, t);
1384
1429
  return /* @__PURE__ */ jsx(
1385
1430
  MaskedInput,
1386
1431
  {
1387
1432
  name: "bankAccountNumber",
1388
1433
  type: "text",
1389
- label: formUtils.getLabel("bankAccountNumber"),
1434
+ label: t(($) => $["bankAccountNumber"]),
1390
1435
  formatGuidance: translateTranslatable(t, metadata.guidanceText),
1391
1436
  ...formUtils.getMask("bankAccountNumber"),
1392
- isValid: valid.bankAccountNumber,
1437
+ isValid: valid?.bankAccountNumber ?? true,
1393
1438
  errorMessage: formUtils.getErrorMessage("bankAccountNumber", errors, fieldProblems),
1394
1439
  "aria-required": true,
1395
- "aria-invalid": !valid.bankAccountNumber,
1440
+ "aria-invalid": !valid?.bankAccountNumber,
1396
1441
  onBlur: handleBlur,
1397
- onInput: handleChangeFor("bankAccountNumber", "input"),
1442
+ onInput: handleChange("bankAccountNumber", "input"),
1398
1443
  onFocus,
1399
1444
  readonly: formUtils.isReadOnly("bankAccountNumber"),
1400
- value: data.bankAccountNumber ?? "",
1445
+ value: data?.bankAccountNumber ?? "",
1401
1446
  acceptObscuredValue: formUtils.isObscured("bankAccountNumber")
1402
1447
  }
1403
1448
  );
@@ -1405,39 +1450,54 @@ function BankAccountNumber(props) {
1405
1450
  const bankCityFields = ["bankCity"];
1406
1451
  function BankCity(props) {
1407
1452
  const { t } = useTranslation("common");
1408
- const { validators, data: bankCityData, fieldValidationErrors } = props;
1409
- const { handleChangeFor, data, valid, errors, fieldProblems } = useForm({
1453
+ const {
1454
+ validators,
1455
+ data: bankCityData,
1456
+ valid: propsValid,
1457
+ errors: propsErrors,
1458
+ fieldValidationErrors,
1459
+ handleFieldChange
1460
+ } = props;
1461
+ const localForm = useForm({
1410
1462
  ...props,
1411
1463
  schema: bankCityFields,
1412
1464
  rules: validators,
1413
1465
  defaultData: bankCityData,
1414
1466
  fieldProblems: fieldValidationErrors
1415
1467
  });
1468
+ const useMultiFormMode = !!handleFieldChange;
1469
+ const data = useMultiFormMode ? bankCityData : localForm.data;
1470
+ const valid = useMultiFormMode ? propsValid : localForm.valid;
1471
+ const errors = useMultiFormMode ? propsErrors : localForm.errors;
1472
+ const fieldProblems = useMultiFormMode ? fieldValidationErrors : localForm.fieldProblems;
1473
+ const handleChange = useMultiFormMode ? handleFieldChange : localForm.handleChangeFor;
1416
1474
  const { updateStateSlice } = useGlobalDataSlice(
1417
1475
  "payoutAccountDetails"
1418
1476
  );
1419
1477
  useEffect(() => {
1420
- updateStateSlice({ data, valid, errors, fieldProblems });
1421
- }, [data, valid, errors]);
1478
+ if (!useMultiFormMode) {
1479
+ updateStateSlice({ data, valid, errors, fieldProblems });
1480
+ }
1481
+ }, [data, valid, errors, fieldProblems, useMultiFormMode]);
1422
1482
  const formUtils = createFormUtils(props, t);
1423
1483
  return /* @__PURE__ */ jsx(
1424
1484
  Field,
1425
1485
  {
1426
1486
  name: "bankCity",
1427
- label: formUtils.getLabel("bankCity"),
1487
+ label: t(($) => $["bankCityTown"]),
1428
1488
  errorMessage: formUtils.getErrorMessage("bankCity", errors, fieldProblems),
1429
- isValid: valid.bankCity,
1489
+ isValid: valid?.bankCity ?? true,
1430
1490
  children: (childProps) => /* @__PURE__ */ jsx(
1431
1491
  InputText,
1432
1492
  {
1433
1493
  ...childProps,
1434
1494
  name: "bankCity",
1435
- value: data.bankCity,
1495
+ value: data?.bankCity,
1436
1496
  readonly: formUtils.isReadOnly("bankCity"),
1437
- onInput: handleChangeFor("bankCity", "input"),
1438
- onBlur: handleChangeFor("bankCity", "blur"),
1497
+ onInput: handleChange("bankCity", "input"),
1498
+ onBlur: handleChange("bankCity", "blur"),
1439
1499
  "aria-required": true,
1440
- "aria-invalid": !valid.bankCity
1500
+ "aria-invalid": !valid?.bankCity
1441
1501
  }
1442
1502
  )
1443
1503
  }
@@ -1466,7 +1526,7 @@ const defaultFieldConfig$2 = {
1466
1526
  [CountryCodes.Canada]: simpleBankCodeMetadata(3, "100", "institutionNumber"),
1467
1527
  [CountryCodes.CzechRepublic]: simpleBankCodeMetadata(4, "0800"),
1468
1528
  [CountryCodes.Denmark]: simpleBankCodeMetadata(4, "5051"),
1469
- [CountryCodes.HongKong]: simpleBankCodeMetadata(3, "250", "bankCode"),
1529
+ [CountryCodes.HongKong]: simpleBankCodeMetadata(3, "250"),
1470
1530
  [CountryCodes.Norway]: simpleBankCodeMetadata(4, "8601"),
1471
1531
  // Not yet implemented
1472
1532
  [CountryCodes.Ecuador]: simpleBankCodeMetadata(4, "1234"),
@@ -1476,22 +1536,38 @@ const defaultFieldConfig$2 = {
1476
1536
  const bankCodeFields = ["bankCode"];
1477
1537
  function BankCode(props) {
1478
1538
  const { t } = useTranslation("common");
1479
- const { country, fieldConfig = defaultFieldConfig$2 } = props;
1539
+ const {
1540
+ country,
1541
+ fieldConfig = defaultFieldConfig$2,
1542
+ handleFieldChange,
1543
+ data: propsData,
1544
+ valid: propsValid,
1545
+ errors: propsErrors,
1546
+ fieldValidationErrors: propsFieldValidationErrors
1547
+ } = props;
1480
1548
  const metadata = resolveFieldMetadata(fieldConfig[country], {}, defaultFieldMetadata$2);
1481
1549
  const mergedProps = mergeFieldMetadataIntoProps("bankCode", metadata, props);
1482
- const { handleChangeFor, data, valid, errors, fieldProblems } = useForm({
1550
+ const localForm = useForm({
1483
1551
  ...mergedProps,
1484
1552
  schema: bankCodeFields,
1485
1553
  rules: mergedProps.validators,
1486
1554
  defaultData: mergedProps.data,
1487
1555
  fieldProblems: mergedProps.fieldValidationErrors
1488
1556
  });
1557
+ const useMultiFormMode = !!handleFieldChange;
1558
+ const data = useMultiFormMode ? propsData : localForm.data;
1559
+ const valid = useMultiFormMode ? propsValid : localForm.valid;
1560
+ const errors = useMultiFormMode ? propsErrors : localForm.errors;
1561
+ const fieldProblems = useMultiFormMode ? propsFieldValidationErrors : localForm.fieldProblems;
1562
+ const handleChange = useMultiFormMode ? handleFieldChange : localForm.handleChangeFor;
1489
1563
  const { updateStateSlice } = useGlobalDataSlice(
1490
1564
  "payoutAccountDetails"
1491
1565
  );
1492
1566
  useEffect(() => {
1493
- updateStateSlice({ data, valid, errors, fieldProblems });
1494
- }, [data, valid, errors]);
1567
+ if (!useMultiFormMode) {
1568
+ updateStateSlice({ data, valid, errors, fieldProblems });
1569
+ }
1570
+ }, [data, valid, errors, fieldProblems, useMultiFormMode]);
1495
1571
  const formUtils = createFormUtils(mergedProps, t);
1496
1572
  return /* @__PURE__ */ jsx(
1497
1573
  MaskedInput,
@@ -1502,52 +1578,67 @@ function BankCode(props) {
1502
1578
  errorMessage: formUtils.getErrorMessage("bankCode", errors, fieldProblems),
1503
1579
  formatGuidance: translateTranslatable(t, metadata.guidanceText),
1504
1580
  ...formUtils.getMask("bankCode"),
1505
- isValid: valid.bankCode,
1506
- value: data.bankCode ?? "",
1581
+ isValid: valid?.bankCode ?? true,
1582
+ value: data?.bankCode ?? "",
1507
1583
  readonly: formUtils.isReadOnly("bankCode"),
1508
- onInput: handleChangeFor("bankCode", "input"),
1509
- onBlur: handleChangeFor("bankCode", "blur"),
1584
+ onInput: handleChange("bankCode", "input"),
1585
+ onBlur: handleChange("bankCode", "blur"),
1510
1586
  "aria-required": true,
1511
- "aria-invalid": !valid.bankCode
1587
+ "aria-invalid": !valid?.bankCode
1512
1588
  }
1513
1589
  );
1514
1590
  }
1515
1591
  const bankNameFields = ["bankName"];
1516
1592
  function BankName(props) {
1517
1593
  const { t } = useTranslation("common");
1518
- const { validators, data: bankNameData, fieldValidationErrors } = props;
1519
- const { handleChangeFor, data, valid, errors, fieldProblems } = useForm({
1594
+ const {
1595
+ validators,
1596
+ data: bankNameData,
1597
+ valid: propsValid,
1598
+ errors: propsErrors,
1599
+ fieldValidationErrors,
1600
+ handleFieldChange
1601
+ } = props;
1602
+ const localForm = useForm({
1520
1603
  ...props,
1521
1604
  schema: bankNameFields,
1522
1605
  rules: validators,
1523
1606
  defaultData: bankNameData,
1524
1607
  fieldProblems: fieldValidationErrors
1525
1608
  });
1609
+ const useMultiFormMode = !!handleFieldChange;
1610
+ const data = useMultiFormMode ? bankNameData : localForm.data;
1611
+ const valid = useMultiFormMode ? propsValid : localForm.valid;
1612
+ const errors = useMultiFormMode ? propsErrors : localForm.errors;
1613
+ const fieldProblems = useMultiFormMode ? fieldValidationErrors : localForm.fieldProblems;
1614
+ const handleChange = useMultiFormMode ? handleFieldChange : localForm.handleChangeFor;
1526
1615
  const { updateStateSlice } = useGlobalDataSlice(
1527
1616
  "payoutAccountDetails"
1528
1617
  );
1529
1618
  useEffect(() => {
1530
- updateStateSlice({ data, valid, errors, fieldProblems });
1531
- }, [data, valid, errors]);
1619
+ if (!useMultiFormMode) {
1620
+ updateStateSlice({ data, valid, errors, fieldProblems });
1621
+ }
1622
+ }, [data, valid, errors, fieldProblems, useMultiFormMode]);
1532
1623
  const formUtils = createFormUtils(props, t);
1533
1624
  return /* @__PURE__ */ jsx(
1534
1625
  Field,
1535
1626
  {
1536
1627
  name: "bankName",
1537
- label: formUtils.getLabel("bankName"),
1628
+ label: t(($) => $["bankName"]),
1538
1629
  errorMessage: formUtils.getErrorMessage("bankName", errors, fieldProblems),
1539
- isValid: valid.bankName,
1630
+ isValid: valid?.bankName ?? true,
1540
1631
  children: (childProps) => /* @__PURE__ */ jsx(
1541
1632
  InputText,
1542
1633
  {
1543
1634
  ...childProps,
1544
1635
  name: "bankName",
1545
- value: data.bankName,
1636
+ value: data?.bankName,
1546
1637
  readonly: formUtils.isReadOnly("bankName"),
1547
- onInput: handleChangeFor("bankName", "input"),
1548
- onBlur: handleChangeFor("bankName", "blur"),
1638
+ onInput: handleChange("bankName", "input"),
1639
+ onBlur: handleChange("bankName", "blur"),
1549
1640
  "aria-required": true,
1550
- "aria-invalid": !valid.bankName
1641
+ "aria-invalid": !valid?.bankName
1551
1642
  }
1552
1643
  )
1553
1644
  }
@@ -1646,26 +1737,44 @@ const defaultFieldConfig$1 = {
1646
1737
  const branchCodeFields = ["branchCode"];
1647
1738
  function BranchCode(props) {
1648
1739
  const { t } = useTranslation("common");
1649
- const { country, fieldConfig = defaultFieldConfig$1, onFocus, onBlur } = props;
1740
+ const {
1741
+ country,
1742
+ fieldConfig = defaultFieldConfig$1,
1743
+ onFocus,
1744
+ onBlur,
1745
+ handleFieldChange,
1746
+ data: propsData,
1747
+ valid: propsValid,
1748
+ errors: propsErrors,
1749
+ fieldValidationErrors: propsFieldValidationErrors
1750
+ } = props;
1650
1751
  const metadata = resolveFieldMetadata(fieldConfig[country], {}, defaultFieldMetadata$1);
1651
1752
  const mergedProps = mergeFieldMetadataIntoProps("branchCode", metadata, props);
1652
- const { handleChangeFor, data, valid, errors, fieldProblems } = useForm({
1753
+ const localForm = useForm({
1653
1754
  ...mergedProps,
1654
1755
  schema: branchCodeFields,
1655
1756
  rules: mergedProps.validators,
1656
1757
  defaultData: mergedProps.data,
1657
1758
  fieldProblems: mergedProps?.fieldValidationErrors
1658
1759
  });
1760
+ const useMultiFormMode = !!handleFieldChange;
1761
+ const data = useMultiFormMode ? propsData : localForm.data;
1762
+ const valid = useMultiFormMode ? propsValid : localForm.valid;
1763
+ const errors = useMultiFormMode ? propsErrors : localForm.errors;
1764
+ const fieldProblems = useMultiFormMode ? propsFieldValidationErrors : localForm.fieldProblems;
1765
+ const handleChange = useMultiFormMode ? handleFieldChange : localForm.handleChangeFor;
1659
1766
  const { updateStateSlice } = useGlobalDataSlice(
1660
1767
  "payoutAccountDetails"
1661
1768
  );
1662
1769
  const handleBlur = () => {
1663
1770
  onBlur?.();
1664
- handleChangeFor("branchCode", "blur");
1771
+ handleChange("branchCode", "blur");
1665
1772
  };
1666
1773
  useEffect(() => {
1667
- updateStateSlice({ data, valid, errors, fieldProblems });
1668
- }, [data, valid, errors]);
1774
+ if (!useMultiFormMode) {
1775
+ updateStateSlice({ data, valid, errors, fieldProblems });
1776
+ }
1777
+ }, [data, valid, errors, fieldProblems, useMultiFormMode]);
1669
1778
  const formUtils = createFormUtils(mergedProps, t);
1670
1779
  return /* @__PURE__ */ jsx(
1671
1780
  MaskedInput,
@@ -1676,14 +1785,14 @@ function BranchCode(props) {
1676
1785
  formatGuidance: translateTranslatable(t, metadata.guidanceText),
1677
1786
  ...formUtils.getMask("branchCode"),
1678
1787
  errorMessage: formUtils.getErrorMessage("branchCode", errors, fieldProblems),
1679
- isValid: valid.branchCode,
1680
- value: data.branchCode ?? "",
1788
+ isValid: valid?.branchCode ?? true,
1789
+ value: data?.branchCode ?? "",
1681
1790
  readonly: formUtils.isReadOnly("branchCode"),
1682
- onInput: handleChangeFor("branchCode", "input"),
1791
+ onInput: handleChange("branchCode", "input"),
1683
1792
  onBlur: handleBlur,
1684
1793
  onFocus,
1685
1794
  "aria-required": true,
1686
- "aria-invalid": !valid.branchCode
1795
+ "aria-invalid": !valid?.branchCode
1687
1796
  }
1688
1797
  );
1689
1798
  }
@@ -1841,7 +1950,6 @@ const ibanGuidance = (type, numDigitsOrChars, example) => type === "digits" ? {
1841
1950
  }
1842
1951
  };
1843
1952
  const ibanMetadata = (country, inputLength, example, allowLettersInBban) => ({
1844
- label: "iban",
1845
1953
  validators: validateIbanOnBlurAndInput(country),
1846
1954
  mask: ibanMask(country, inputLength, allowLettersInBban),
1847
1955
  guidanceText: ibanGuidance(allowLettersInBban ? "characters" : "digits", inputLength, example)
@@ -1853,7 +1961,6 @@ const gbIbanMetadata = ibanMetadata(
1853
1961
  true
1854
1962
  );
1855
1963
  const defaultFieldMetadata = {
1856
- label: "iban",
1857
1964
  validators: isNotEmptyValidator
1858
1965
  };
1859
1966
  const defaultFieldConfig = {
@@ -1978,12 +2085,15 @@ function Iban(props) {
1978
2085
  country,
1979
2086
  fieldConfig = defaultFieldConfig,
1980
2087
  data: ibanData,
2088
+ valid: propsValid,
2089
+ errors: propsErrors,
1981
2090
  obscuredFields,
1982
- fieldValidationErrors
2091
+ fieldValidationErrors,
2092
+ handleFieldChange
1983
2093
  } = props;
1984
2094
  const metadata = resolveFieldMetadata(fieldConfig[country], {}, defaultFieldMetadata);
1985
2095
  const mergedProps = mergeFieldMetadataIntoProps("iban", metadata, props);
1986
- const { handleChangeFor, data, valid, errors, fieldProblems } = useForm({
2096
+ const localForm = useForm({
1987
2097
  ...mergedProps,
1988
2098
  schema: ibanFields,
1989
2099
  rules: mergedProps.validators,
@@ -1991,35 +2101,42 @@ function Iban(props) {
1991
2101
  fieldProblems: fieldValidationErrors,
1992
2102
  obscuredFields
1993
2103
  });
2104
+ const useMultiFormMode = !!handleFieldChange;
2105
+ const data = useMultiFormMode ? ibanData : localForm.data;
2106
+ const valid = useMultiFormMode ? propsValid : localForm.valid;
2107
+ const errors = useMultiFormMode ? propsErrors : localForm.errors;
2108
+ const fieldProblems = useMultiFormMode ? fieldValidationErrors : localForm.fieldProblems;
2109
+ const handleChange = useMultiFormMode ? handleFieldChange : localForm.handleChangeFor;
1994
2110
  const { updateStateSlice } = useGlobalDataSlice(
1995
2111
  "payoutAccountDetails"
1996
2112
  );
1997
2113
  useEffect(() => {
1998
- updateStateSlice({ data, valid, errors, fieldProblems });
1999
- }, [data, errors, valid]);
2114
+ if (!useMultiFormMode) {
2115
+ updateStateSlice({ data, valid, errors, fieldProblems });
2116
+ }
2117
+ }, [data, errors, valid, fieldProblems, useMultiFormMode]);
2000
2118
  const formUtils = createFormUtils(mergedProps, t);
2001
2119
  return /* @__PURE__ */ jsx(
2002
2120
  MaskedInput,
2003
2121
  {
2004
2122
  name: "iban",
2005
2123
  type: "text",
2006
- label: formUtils.getLabel("iban"),
2124
+ label: t(($) => $["iban"]),
2007
2125
  formatGuidance: translateTranslatable(t, metadata.guidanceText),
2008
2126
  ...formUtils.getMask("iban"),
2009
2127
  errorMessage: formUtils.getErrorMessage("iban", errors, fieldProblems),
2010
- isValid: valid.iban,
2011
- value: data.iban ?? "",
2128
+ isValid: valid?.iban ?? true,
2129
+ value: data?.iban ?? "",
2012
2130
  readonly: formUtils.isReadOnly("iban"),
2013
- onInput: handleChangeFor("iban", "blur"),
2014
- onBlur: handleChangeFor("iban", "blur"),
2131
+ onInput: handleChange("iban", "input"),
2132
+ onBlur: handleChange("iban", "blur"),
2015
2133
  "aria-required": true,
2016
- "aria-invalid": !valid.iban,
2134
+ "aria-invalid": valid?.iban === false,
2017
2135
  acceptObscuredValue: formUtils.isObscured("iban")
2018
2136
  }
2019
2137
  );
2020
2138
  }
2021
2139
  const swiftCodeFieldMetadata = {
2022
- label: "bicSwift",
2023
2140
  validators: validatePatternOnBlur(/^([a-zA-Z0-9]{8}|[a-zA-Z0-9]{11})$/),
2024
2141
  mask: {
2025
2142
  mask: makeMask(...alphaInputs(6), ...alphanumericInputs(2), ...alphanumericInputs(3, true)),
@@ -2029,27 +2146,42 @@ const swiftCodeFieldMetadata = {
2029
2146
  const swiftCodeFields = ["swiftCode"];
2030
2147
  function SwiftCode(props) {
2031
2148
  const { t } = useTranslation("common");
2149
+ const {
2150
+ handleFieldChange,
2151
+ data: propsData,
2152
+ valid: propsValid,
2153
+ errors: propsErrors,
2154
+ fieldValidationErrors: propsFieldValidationErrors
2155
+ } = props;
2032
2156
  const mergedProps = mergeFieldMetadataIntoProps("swiftCode", swiftCodeFieldMetadata, props);
2033
- const { handleChangeFor, data, valid, errors, fieldProblems } = useForm({
2157
+ const localForm = useForm({
2034
2158
  ...mergedProps,
2035
2159
  schema: swiftCodeFields,
2036
2160
  rules: mergedProps.validators,
2037
2161
  defaultData: mergedProps.data,
2038
2162
  fieldProblems: mergedProps?.fieldValidationErrors
2039
2163
  });
2164
+ const useMultiFormMode = !!handleFieldChange;
2165
+ const data = useMultiFormMode ? propsData : localForm.data;
2166
+ const valid = useMultiFormMode ? propsValid : localForm.valid;
2167
+ const errors = useMultiFormMode ? propsErrors : localForm.errors;
2168
+ const fieldProblems = useMultiFormMode ? propsFieldValidationErrors : localForm.fieldProblems;
2169
+ const handleChange = useMultiFormMode ? handleFieldChange : localForm.handleChangeFor;
2040
2170
  const { updateStateSlice } = useGlobalDataSlice(
2041
2171
  "payoutAccountDetails"
2042
2172
  );
2043
2173
  useEffect(() => {
2044
- updateStateSlice({ data, valid, errors, fieldProblems });
2045
- }, [data, valid, errors]);
2174
+ if (!useMultiFormMode) {
2175
+ updateStateSlice({ data, valid, errors, fieldProblems });
2176
+ }
2177
+ }, [data, valid, errors, fieldProblems, useMultiFormMode]);
2046
2178
  const formUtils = createFormUtils(mergedProps, t);
2047
2179
  return /* @__PURE__ */ jsx(
2048
2180
  MaskedInput,
2049
2181
  {
2050
2182
  name: "swiftCode",
2051
2183
  type: "text",
2052
- label: formUtils.getLabel("swiftCode"),
2184
+ label: t(($) => $["bicSwift"]),
2053
2185
  formatGuidance: t(($) => $["enterXOrYCharactersForExample"], {
2054
2186
  xChars: "8",
2055
2187
  yChars: "11",
@@ -2057,13 +2189,13 @@ function SwiftCode(props) {
2057
2189
  }),
2058
2190
  ...formUtils.getMask("swiftCode"),
2059
2191
  errorMessage: formUtils.getErrorMessage("swiftCode", errors, fieldProblems),
2060
- isValid: valid.swiftCode,
2061
- value: data.swiftCode ?? "",
2192
+ isValid: valid?.swiftCode ?? true,
2193
+ value: data?.swiftCode ?? "",
2062
2194
  readonly: formUtils.isReadOnly("swiftCode"),
2063
- onInput: handleChangeFor("swiftCode", "input"),
2064
- onBlur: handleChangeFor("swiftCode", "blur"),
2195
+ onInput: handleChange("swiftCode", "input"),
2196
+ onBlur: handleChange("swiftCode", "blur"),
2065
2197
  "aria-required": true,
2066
- "aria-invalid": !valid.swiftCode
2198
+ "aria-invalid": valid?.swiftCode === false
2067
2199
  }
2068
2200
  );
2069
2201
  }
@@ -2295,7 +2427,10 @@ function PayoutAccount(props) {
2295
2427
  formVerificationErrors,
2296
2428
  fieldValidationErrors,
2297
2429
  preferredCurrencyCode,
2298
- data
2430
+ data,
2431
+ errors,
2432
+ valid,
2433
+ handleFieldChange
2299
2434
  } = props;
2300
2435
  const showCheckGuidance = shouldShowCheckGuidance(country);
2301
2436
  const formUtils = createFormUtils({ ...props, requiredFields }, commonT);
@@ -2330,6 +2465,13 @@ function PayoutAccount(props) {
2330
2465
  handleAccountFormatChange?.("numberAndBic");
2331
2466
  }
2332
2467
  }, [country, preferredCurrencyCode]);
2468
+ const multiFormProps = handleFieldChange ? {
2469
+ data,
2470
+ valid,
2471
+ errors,
2472
+ fieldValidationErrors,
2473
+ handleFieldChange
2474
+ } : {};
2333
2475
  return /* @__PURE__ */ jsxs("form", { className: "adyen-kyc-individual__payout-account", "aria-describedby": "ariaErrorField", children: [
2334
2476
  heading && /* @__PURE__ */ jsx(Header, { title: heading, children: /* @__PURE__ */ jsx(
2335
2477
  AccountHolderDescriptionFragment,
@@ -2362,7 +2504,8 @@ function PayoutAccount(props) {
2362
2504
  country,
2363
2505
  dataStoreId: id,
2364
2506
  onFocus: showCheckGuidance ? () => setCheckAnnotation("routing") : void 0,
2365
- onBlur: showCheckGuidance ? () => setCheckAnnotation(void 0) : void 0
2507
+ onBlur: showCheckGuidance ? () => setCheckAnnotation(void 0) : void 0,
2508
+ ...multiFormProps
2366
2509
  }
2367
2510
  ),
2368
2511
  formUtils.isRequiredField("bankAccountNumber") && /* @__PURE__ */ jsx(
@@ -2372,14 +2515,15 @@ function PayoutAccount(props) {
2372
2515
  country,
2373
2516
  dataStoreId: id,
2374
2517
  onFocus: showCheckGuidance ? () => setCheckAnnotation("account") : void 0,
2375
- onBlur: showCheckGuidance ? () => setCheckAnnotation(void 0) : void 0
2518
+ onBlur: showCheckGuidance ? () => setCheckAnnotation(void 0) : void 0,
2519
+ ...multiFormProps
2376
2520
  }
2377
2521
  ),
2378
- formUtils.isRequiredField("iban") && /* @__PURE__ */ jsx(Iban, { ...ibanProps, dataStoreId: id, country }),
2379
- formUtils.isRequiredField("swiftCode") && /* @__PURE__ */ jsx(SwiftCode, { ...swiftCodeProps, dataStoreId: id }),
2380
- formUtils.isRequiredField("bankName") && /* @__PURE__ */ jsx(BankName, { ...bankNameProps, dataStoreId: id }),
2381
- formUtils.isRequiredField("bankCode") && /* @__PURE__ */ jsx(BankCode, { ...bankCodeProps, country, dataStoreId: id }),
2382
- formUtils.isRequiredField("bankCity") && /* @__PURE__ */ jsx(BankCity, { ...bankCityProps, dataStoreId: id }),
2522
+ formUtils.isRequiredField("iban") && /* @__PURE__ */ jsx(Iban, { ...ibanProps, dataStoreId: id, country, ...multiFormProps }),
2523
+ formUtils.isRequiredField("swiftCode") && /* @__PURE__ */ jsx(SwiftCode, { ...swiftCodeProps, dataStoreId: id, ...multiFormProps }),
2524
+ formUtils.isRequiredField("bankName") && /* @__PURE__ */ jsx(BankName, { ...bankNameProps, dataStoreId: id, ...multiFormProps }),
2525
+ formUtils.isRequiredField("bankCode") && /* @__PURE__ */ jsx(BankCode, { ...bankCodeProps, country, dataStoreId: id, ...multiFormProps }),
2526
+ formUtils.isRequiredField("bankCity") && /* @__PURE__ */ jsx(BankCity, { ...bankCityProps, dataStoreId: id, ...multiFormProps }),
2383
2527
  shouldShowPayoutAlert(country) && !isCrossBorderPayoutsEnabled && /* @__PURE__ */ jsx(
2384
2528
  Alert,
2385
2529
  {
@@ -2552,7 +2696,15 @@ const DEFAULT_CURRENCY_FALLBACK = "USD";
2552
2696
  const getDefaultCurrencyForCountry = (country) => currencyByCountry[country]?.[0] ?? DEFAULT_CURRENCY_FALLBACK;
2553
2697
  const getCountryCodeFromEvent = (event) => event?.target?.value;
2554
2698
  function PayoutCountryDetails(props) {
2555
- const { legalEntityResponse, data: propData, provider } = props;
2699
+ const {
2700
+ legalEntityResponse,
2701
+ data: propData,
2702
+ provider,
2703
+ handleFieldChange,
2704
+ valid: propValid,
2705
+ errors: propErrors,
2706
+ fieldValidationErrors: propFieldValidationErrors
2707
+ } = props;
2556
2708
  const { t: commonT } = useTranslation("common");
2557
2709
  const { t } = useTranslation("banking");
2558
2710
  const { isSettingEnabled } = useSettingsContext();
@@ -2560,7 +2712,7 @@ function PayoutCountryDetails(props) {
2560
2712
  const [isModalOpen, setIsModalOpen] = useState(false);
2561
2713
  const legalEntityType = legalEntityResponse.type;
2562
2714
  const defaultCurrency = getDefaultCurrencyForCountry(country);
2563
- const { handleChangeFor, data, valid, errors, fieldProblems } = useForm({
2715
+ const localForm = useForm({
2564
2716
  ...props,
2565
2717
  schema: payoutCountryDetailsFields,
2566
2718
  defaultData: {
@@ -2569,6 +2721,12 @@ function PayoutCountryDetails(props) {
2569
2721
  },
2570
2722
  shouldValidate: true
2571
2723
  });
2724
+ const useMultiFormMode = !!handleFieldChange;
2725
+ const data = useMultiFormMode ? propData : localForm.data;
2726
+ const valid = useMultiFormMode ? propValid : localForm.valid;
2727
+ const errors = useMultiFormMode ? propErrors : localForm.errors;
2728
+ const fieldProblems = useMultiFormMode ? propFieldValidationErrors : localForm.fieldProblems;
2729
+ const handleChange = useMultiFormMode ? handleFieldChange : localForm.handleChangeFor;
2572
2730
  const formUtils = createFormUtils(props, commonT);
2573
2731
  const allowedBankCountries = Object.keys(currencyByCountry);
2574
2732
  const canChangeEntityType = isSettingEnabled(SettingNames.AllowLegalEntityTypeChange);
@@ -2616,12 +2774,26 @@ function PayoutCountryDetails(props) {
2616
2774
  "payoutCountryDetails"
2617
2775
  );
2618
2776
  useEffect(() => {
2619
- updateStateSlice({ data, valid, errors, fieldProblems });
2620
- }, [data, valid, errors, updateStateSlice, fieldProblems]);
2777
+ if (!useMultiFormMode) {
2778
+ updateStateSlice({
2779
+ data: localForm.data,
2780
+ valid: localForm.valid,
2781
+ errors: localForm.errors,
2782
+ fieldProblems: localForm.fieldProblems
2783
+ });
2784
+ }
2785
+ }, [
2786
+ localForm.data,
2787
+ localForm.valid,
2788
+ localForm.errors,
2789
+ updateStateSlice,
2790
+ localForm.fieldProblems,
2791
+ useMultiFormMode
2792
+ ]);
2621
2793
  const updateCountryField = (event) => {
2622
2794
  const updatedCountry = getCountryCodeFromEvent(event);
2623
- handleChangeFor("bankCountry", "input")(updatedCountry);
2624
- handleChangeFor("preferredCurrency", "input")(getDefaultCurrencyForCountry(updatedCountry));
2795
+ handleChange("bankCountry", "input")(updatedCountry);
2796
+ handleChange("preferredCurrency", "input")(getDefaultCurrencyForCountry(updatedCountry));
2625
2797
  };
2626
2798
  return /* @__PURE__ */ jsxs(Fragment, { children: [
2627
2799
  /* @__PURE__ */ jsxs("form", { style: { minHeight: "480px" }, children: [
@@ -2632,8 +2804,8 @@ function PayoutCountryDetails(props) {
2632
2804
  /* @__PURE__ */ jsx(
2633
2805
  CountryField,
2634
2806
  {
2635
- data: { country: data.bankCountry },
2636
- valid: { country: valid?.bankCountry },
2807
+ data: { country: data?.bankCountry },
2808
+ valid: { country: valid?.bankCountry ?? true },
2637
2809
  errors: { country: formUtils.getErrorMessage("bankCountry", errors, fieldProblems) },
2638
2810
  labels: { country: t(($) => $["bankAccountCountryRegion"]) },
2639
2811
  readonly: false,
@@ -2644,9 +2816,9 @@ function PayoutCountryDetails(props) {
2644
2816
  /* @__PURE__ */ jsx(
2645
2817
  PreferredCurrency,
2646
2818
  {
2647
- country: data.bankCountry,
2648
- preferredCurrency: data.preferredCurrency ?? defaultCurrency,
2649
- handleChangeFor
2819
+ country: data?.bankCountry ?? country,
2820
+ preferredCurrency: data?.preferredCurrency ?? defaultCurrency,
2821
+ handleChangeFor: handleChange
2650
2822
  }
2651
2823
  )
2652
2824
  ] }),
@@ -2811,7 +2983,10 @@ function PayoutVerificationMethod(props) {
2811
2983
  bankInfoValidated,
2812
2984
  data: payoutVerificationMethodData,
2813
2985
  fieldValidationErrors,
2814
- formVerificationErrors
2986
+ formVerificationErrors,
2987
+ handleFieldChange,
2988
+ valid: propValid,
2989
+ errors: propErrors
2815
2990
  } = props;
2816
2991
  const { type: legalEntityType } = legalEntityResponse;
2817
2992
  const { t } = useTranslation("banking");
@@ -2824,7 +2999,7 @@ function PayoutVerificationMethod(props) {
2824
2999
  SettingNames.AllowIntraRegionCrossBorderPayout
2825
3000
  );
2826
3001
  const [hasSelectedMethod, setHasSelectedMethod] = useState(false);
2827
- const { handleChangeFor, data, valid, errors, fieldProblems } = useForm({
3002
+ const localForm = useForm({
2828
3003
  ...props,
2829
3004
  schema: payoutVerificationMethodFields,
2830
3005
  defaultData: {
@@ -2841,48 +3016,62 @@ function PayoutVerificationMethod(props) {
2841
3016
  },
2842
3017
  fieldProblems: fieldValidationErrors
2843
3018
  });
3019
+ const useMultiFormMode = !!handleFieldChange;
3020
+ const data = useMultiFormMode ? payoutVerificationMethodData : localForm.data;
3021
+ const valid = useMultiFormMode ? propValid : localForm.valid;
3022
+ const errors = useMultiFormMode ? propErrors : localForm.errors;
3023
+ const fieldProblems = useMultiFormMode ? fieldValidationErrors : localForm.fieldProblems;
3024
+ const handleChange = useMultiFormMode ? handleFieldChange : localForm.handleChangeFor;
2844
3025
  const formUtils = createFormUtils(props, commonT);
2845
3026
  const { sliceData, updateStateSlice } = useGlobalDataSlice("payoutVerificationMethod");
2846
3027
  const { clearStateSlice: clearPayoutAccountDetails } = useGlobalDataSlice("payoutAccountDetails");
2847
- useEffect(
2848
- () => updateStateSlice({ data: { ...sliceData, ...data }, errors, valid, fieldProblems }),
2849
- [data, errors, fieldProblems, valid]
2850
- );
3028
+ useEffect(() => {
3029
+ if (!useMultiFormMode) {
3030
+ updateStateSlice({
3031
+ data: { ...sliceData, ...localForm.data },
3032
+ errors: localForm.errors,
3033
+ valid: localForm.valid,
3034
+ fieldProblems: localForm.fieldProblems
3035
+ });
3036
+ }
3037
+ }, [localForm.data, localForm.errors, localForm.fieldProblems, localForm.valid]);
2851
3038
  const methodsMetadata = makePayoutVerificationMethodsMetadata(provider?.name);
2852
3039
  const selectVerificationMethod = (method) => {
2853
3040
  setHasSelectedMethod(true);
2854
- handleChangeFor("payoutVerificationMethod")(method);
3041
+ handleChange("payoutVerificationMethod")(method);
2855
3042
  };
2856
3043
  useEffect(() => {
2857
3044
  if (bankInfoValidated) return;
2858
- if (!hasSelectedMethod && instantVerificationAvailable && data.payoutVerificationMethod !== "instantVerification") {
2859
- handleChangeFor("payoutVerificationMethod")("instantVerification");
3045
+ if (!hasSelectedMethod && instantVerificationAvailable && data?.payoutVerificationMethod !== "instantVerification") {
3046
+ handleChange("payoutVerificationMethod")("instantVerification");
2860
3047
  }
2861
- if (!instantVerificationAvailable && data.payoutVerificationMethod !== "manualVerification") {
2862
- handleChangeFor("payoutVerificationMethod")("manualVerification");
3048
+ if (!instantVerificationAvailable && data?.payoutVerificationMethod !== "manualVerification") {
3049
+ handleChange("payoutVerificationMethod")("manualVerification");
2863
3050
  }
2864
3051
  }, [
2865
- data.payoutVerificationMethod,
2866
- handleChangeFor,
3052
+ data?.payoutVerificationMethod,
3053
+ handleChange,
2867
3054
  instantVerificationAvailable,
2868
3055
  hasSelectedMethod,
2869
3056
  bankInfoValidated
2870
3057
  ]);
2871
3058
  const { dataset: countries } = useDataset(datasetIdentifier.country);
2872
- const bankCountryName = countries.find((country2) => country2.id === data.bankCountry)?.name ?? data.bankCountry;
3059
+ const bankCountryName = countries.find((country2) => country2.id === data?.bankCountry)?.name ?? data?.bankCountry;
2873
3060
  const allowedBankCountries = getAllowedBankCountries(country);
2874
3061
  const countryField = /* @__PURE__ */ jsx(
2875
3062
  CountryField,
2876
3063
  {
2877
- data: { country: data.bankCountry },
2878
- valid: { country: valid?.bankCountry },
3064
+ data: { country: data?.bankCountry },
3065
+ valid: { country: valid?.bankCountry ?? true },
2879
3066
  errors: { country: formUtils.getErrorMessage("bankCountry", errors, fieldProblems) },
2880
3067
  labels: { country: t(($) => $["bankAccountCountryRegion"]) },
2881
3068
  readonly: !intraRegionCrossBorderPayoutsAllowed || allowedBankCountries.length === 1 || bankInfoValidated,
2882
3069
  allowedCountries: allowedBankCountries,
2883
3070
  handleChangeFor: () => (e) => {
2884
- clearPayoutAccountDetails();
2885
- return handleChangeFor("bankCountry", "input")(e);
3071
+ if (!useMultiFormMode) {
3072
+ clearPayoutAccountDetails();
3073
+ }
3074
+ return handleChange("bankCountry", "input")(e);
2886
3075
  },
2887
3076
  helperText: intraRegionCrossBorderPayoutsAllowed ? void 0 : t(
2888
3077
  ($) => $[legalEntityType === LegalEntityTypes.INDIVIDUAL ? "youCanOnlyUseABankAccountInTheCountryRegionWhereYouLive" : "youCanOnlyUseABankAccountInTheCountryRegionWhereYourCompanyIsRegistered"]
@@ -2935,7 +3124,7 @@ function PayoutVerificationMethod(props) {
2935
3124
  tag: /* @__PURE__ */ jsx(Tag, { variant: "blue", className: "adyen-kyc-u-margin-bottom-8", children: t(($) => $["recommended"]) }),
2936
3125
  selectVerificationMethod,
2937
3126
  methodsMetadata,
2938
- payoutVerificationMethod: data.payoutVerificationMethod,
3127
+ payoutVerificationMethod: data?.payoutVerificationMethod,
2939
3128
  instantVerificationAvailable,
2940
3129
  bankInfoValidated
2941
3130
  }
@@ -2948,7 +3137,7 @@ function PayoutVerificationMethod(props) {
2948
3137
  subtitle: t(($) => $["enterYourAccountsDetailsOnYourOwn"]),
2949
3138
  selectVerificationMethod,
2950
3139
  methodsMetadata,
2951
- payoutVerificationMethod: data.payoutVerificationMethod
3140
+ payoutVerificationMethod: data?.payoutVerificationMethod
2952
3141
  }
2953
3142
  )
2954
3143
  ] })
@@ -3181,7 +3370,11 @@ function PayoutDetails(props) {
3181
3370
  ) })
3182
3371
  ] });
3183
3372
  }
3184
- const rules = ({ data, requiredFields }) => createFormRules({
3373
+ const rules = ({
3374
+ data,
3375
+ requiredFields,
3376
+ isFeatureEnabled
3377
+ }) => createFormRules({
3185
3378
  whenUsingManualVerification: () => {
3186
3379
  if (!data.payoutVerificationMethod) return;
3187
3380
  if (data?.payoutVerificationMethod?.payoutVerificationMethod === "manualVerification") {
@@ -3202,6 +3395,9 @@ const rules = ({ data, requiredFields }) => createFormRules({
3202
3395
  }
3203
3396
  },
3204
3397
  bankStatementRequirement: () => {
3398
+ if (isFeatureEnabled?.("EnablePayoutDetailsMultiForm")) {
3399
+ return "REQUIRED";
3400
+ }
3205
3401
  if (data?.payoutVerificationMethod?.payoutVerificationMethod === "manualVerification") {
3206
3402
  return requiredFields?.bankStatementRequirement;
3207
3403
  }
@@ -3264,22 +3460,6 @@ const mapPayoutDocumentsToApiDocuments = async (data, entityId) => {
3264
3460
  existingDocument
3265
3461
  });
3266
3462
  };
3267
- const CUSTOM_LABELS = {
3268
- verifiedAccountHolder: "accountHolder",
3269
- verifiedBankCountry: "bankCountry",
3270
- verifiedBankName: "bankName",
3271
- verifiedCurrencyCode: "currencyCode",
3272
- verifiedBankAccountNumber: "bankAccountNumber"
3273
- };
3274
- const formatAccountVerificationSummary = (data) => {
3275
- if (!data) return {};
3276
- const summary = {};
3277
- keysOf(CUSTOM_LABELS).forEach((key) => {
3278
- if (!data[key]) return;
3279
- summary[key] = summaryItem(CUSTOM_LABELS[key], data[key]);
3280
- });
3281
- return summary;
3282
- };
3283
3463
  const obscuredPayoutFields = ["bankAccountNumber", "iban"];
3284
3464
  const payoutDetailsCountryConfig = {
3285
3465
  [CountryCodes.Canada]: {
@@ -3318,6 +3498,9 @@ function parsePayoutScenarios({
3318
3498
  bankCountry: {
3319
3499
  rule: "REQUIRED"
3320
3500
  },
3501
+ preferredCurrency: {
3502
+ rule: "REQUIRED"
3503
+ },
3321
3504
  bankStatementDocument: {
3322
3505
  rule: "bankStatementRequirement"
3323
3506
  },
@@ -3369,6 +3552,13 @@ const getAppropriatePayoutDetailsSteps = (isEditing, instantVerificationAvailabl
3369
3552
  }
3370
3553
  return dependentSteps;
3371
3554
  };
3555
+ const CUSTOM_LABELS = {
3556
+ verifiedAccountHolder: "accountHolder",
3557
+ verifiedBankCountry: "bankCountry",
3558
+ verifiedBankName: "bankName",
3559
+ verifiedCurrencyCode: "currencyCode",
3560
+ verifiedBankAccountNumber: "bankAccountNumber"
3561
+ };
3372
3562
  const getInvalidFieldsErrorHeader = (invalidField) => {
3373
3563
  switch (invalidField) {
3374
3564
  case "LEGAL_BUSINESS_NAME":
@@ -3416,7 +3606,15 @@ const getPayoutVerificationMethod = (transferInstrument, instantVerificationEnab
3416
3606
  return instantVerificationEnabled ? "instantVerification" : "manualVerification";
3417
3607
  }
3418
3608
  };
3419
- const showInstantVerificationPayoutModal = signal(false);
3609
+ const formatAccountVerificationSummary = (data) => {
3610
+ if (!data) return {};
3611
+ const summary = {};
3612
+ keysOf(CUSTOM_LABELS).forEach((key) => {
3613
+ if (!data[key]) return;
3614
+ summary[key] = summaryItem(CUSTOM_LABELS[key], data[key]);
3615
+ });
3616
+ return summary;
3617
+ };
3420
3618
  function PayoutDetailsDropin({
3421
3619
  legalEntityResponse,
3422
3620
  problems: propProblems,
@@ -3562,7 +3760,8 @@ function PayoutDetailsDropin({
3562
3760
  const fieldsFromCustomRules = useMemo$1(
3563
3761
  () => rules({
3564
3762
  data,
3565
- requiredFields
3763
+ requiredFields,
3764
+ isFeatureEnabled
3566
3765
  }),
3567
3766
  [bankAccountCountry, data, taskType, isFeatureEnabled]
3568
3767
  );
@@ -3983,5 +4182,45 @@ function PayoutDetailsDropin({
3983
4182
  );
3984
4183
  }
3985
4184
  export {
3986
- PayoutDetailsDropin as P
4185
+ rules as A,
4186
+ BankVerification as B,
4187
+ mapPayoutAccountSchemaToApiBankAccount as C,
4188
+ useCheck as D,
4189
+ getAppropriatePayoutDetailsSteps as E,
4190
+ mapApiDocumentToPayoutDocuments as F,
4191
+ getInvalidFieldsErrorMessage as G,
4192
+ parseConfiguration as H,
4193
+ InstantVerificationErrorContext as I,
4194
+ mapPayoutDetailsToTransferInstrument as J,
4195
+ createTransferInstrument as K,
4196
+ formatAccountVerificationSummary as L,
4197
+ MemoizedBankDocumentClassification as M,
4198
+ mapPayoutDocumentsToApiDocuments as N,
4199
+ PayoutDetailsDropin as P,
4200
+ useAsyncAccountDetailsValidationRules as a,
4201
+ PayoutAccount as b,
4202
+ PayoutVerificationMethod as c,
4203
+ PayoutCountryDetails as d,
4204
+ bankVerificationValidationRules as e,
4205
+ bankDocumentValidationRules as f,
4206
+ getAccountIdentificationFromPayoutAccountSchema as g,
4207
+ defaultFieldMetadata$1 as h,
4208
+ defaultFieldConfig$1 as i,
4209
+ defaultFieldMetadata$3 as j,
4210
+ defaultFieldConfig$3 as k,
4211
+ defaultFieldMetadata as l,
4212
+ defaultFieldConfig as m,
4213
+ defaultFieldMetadata$2 as n,
4214
+ defaultFieldConfig$2 as o,
4215
+ payoutSteps as p,
4216
+ swiftCodeFieldMetadata as q,
4217
+ useUpdateTransferInstrument as r,
4218
+ showInstantVerificationPayoutModal as s,
4219
+ useUpdateTrustedTransferInstrument as t,
4220
+ useInstantVerificationErrorNotification as u,
4221
+ useCreateTrustedTransferInstrument as v,
4222
+ getPayoutVerificationMethod as w,
4223
+ getDefaultCurrencyForCountry as x,
4224
+ useBankVerificationProviders as y,
4225
+ getAccountFormatsForCountry as z
3987
4226
  };