@adyen/kyc-components 3.84.3 → 3.85.0-beta.2

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 (336) hide show
  1. package/dist/{AcceptTermsOfServiceComponent-CBGVGhCW.js → AcceptTermsOfServiceComponent-CJR2_QBv.js} +15 -13
  2. package/dist/Accordion-CiEmIhNX.js +88 -0
  3. package/dist/{AccountSetupRejected-iWgw_f_y.js → AccountSetupRejected-BjJaN_L0.js} +4 -4
  4. package/dist/{Address-t4VOfLT-.js → Address-DvpndZyX.js} +10 -10
  5. package/dist/{Alert-BeizfGIR.js → Alert-ZQaJKZwM.js} +3 -75
  6. package/dist/{Avatar-DuU-qQK8.js → Avatar-Bg9ZnJVR.js} +1 -1
  7. package/dist/{BusinessDetailsDropin-DvcYg_X0.js → BusinessDetailsMultiformDropin-FeI19Yeu.js} +2124 -250
  8. package/dist/{BusinessFinancingComponent-CtKIHS5N.js → BusinessFinancingComponent-P6tUs_cF.js} +5 -5
  9. package/dist/{BusinessFinancingDropin-lPPamXGa.js → BusinessFinancingDropin-5PQROpGM.js} +105 -62
  10. package/dist/{BusinessFinancingPage-Di-Nv2Ml.js → BusinessFinancingPage-Z7KdR2Wb.js} +4 -4
  11. package/dist/{BusinessTypeSelectionPage-BXdmcFx7.js → BusinessTypeSelectionPage-CEiJxKFT.js} +7 -7
  12. package/dist/{Card-B1eYN1iZ.js → Card-DeKeyEgr.js} +4 -4
  13. package/dist/{CountryField-DePvueIq.js → CountryField-DpZS-UHE.js} +82 -291
  14. package/dist/{CreateIndividualComponent-BF8U9HmX.js → CreateIndividualComponent-uV41ZKqu.js} +6 -6
  15. package/dist/{CreateTransferInstrumentComponent-Rd6n91ch.js → CreateTransferInstrumentComponent--fLgxkGc.js} +6 -6
  16. package/dist/{Currency-CCNB-Owq.js → Currency-dvDSJvr6.js} +6 -6
  17. package/dist/{CustomerSupport-dzWyAxLD.js → CustomerSupport-BsSMzVHV.js} +9 -8
  18. package/dist/{DebugModal-Db4z3HFJ.js → DebugModal-CDJit0my.js} +128 -42
  19. package/dist/{DecisionMakerDetailsPage-CQ5uaVPM.js → DecisionMakerDetailsPage-WUOxEF2W.js} +7 -7
  20. package/dist/{DecisionMakers-BjZNaC3U.js → DecisionMakers--fCz0mrC.js} +149 -115
  21. package/dist/Divider-CQmSV-3K.js +239 -0
  22. package/dist/{Dropzone-DS3DzY-A.js → Dropzone-CjTl0Cl4.js} +4 -4
  23. package/dist/{EmbeddedStatus-COuKpXSJ.js → EmbeddedStatus-BfyrjDBn.js} +3 -3
  24. package/dist/{EndStateLayout-DHbUjBQL.js → EndStateLayout-DtnC_jmT.js} +1 -1
  25. package/dist/{FormNavigation-C8985odz.js → FormNavigation-BVFCNan3.js} +3 -3
  26. package/dist/Image-3OQ_b33w.js +22 -0
  27. package/dist/{IndividualOnfidoDropin-BnPU46GN.js → IndividualOnfidoDropin-DxGZH7qE.js} +64 -41
  28. package/dist/{InputDate-BqYvvnqX.js → InputDate-Lj3IQq5B.js} +2 -2
  29. package/dist/{InputText-rkMNHFYM.js → InputText-DqycMV0z.js} +3 -3
  30. package/dist/{Introduction-BsZibeHx.js → Introduction-B_eEyK4D.js} +4 -4
  31. package/dist/{JpAddress-7_Wvn6w-.js → JpAddress-DbmfH7ao.js} +7 -7
  32. package/dist/LandingLayout-DAR4uCsx.js +60 -0
  33. package/dist/{LegalRepresentativeDetailsPage-BLoNELP2.js → LegalRepresentativeDetailsPage-JtrwqFp_.js} +5 -5
  34. package/dist/Link-BePoWmqK.js +35 -0
  35. package/dist/ListItem-AIDLbwJg.js +69 -0
  36. package/dist/{ManageIndividualComponent-DuMx-hok.js → ManageIndividualComponent-CdI1XXUO.js} +5 -5
  37. package/dist/{ManageTermsOfServiceComponent-BPJJxecg.js → ManageTermsOfServiceComponent-C9C7j-Ig.js} +5 -5
  38. package/dist/{ManageTransferInstrumentComponent-D13HhKpC.js → ManageTransferInstrumentComponent-j3e19U67.js} +12 -12
  39. package/dist/{MaskedInput-DK17jkn8.js → MaskedInput-BBpUba4Q.js} +5 -5
  40. package/dist/MaybeModal-BfUZzrFT.js +25 -0
  41. package/dist/{Modal-CeWqn3jD.js → Modal-QC3t2pZm.js} +1 -1
  42. package/dist/OnboardingDropinComponent-CR_pOocw.js +4274 -0
  43. package/dist/{PayoutDetailsDropin-CxXIfBo2.js → PayoutDetailsDropin-C4ZOkpq_.js} +311 -81
  44. package/dist/RadioGroup-B0eqJ4-H.js +144 -0
  45. package/dist/{RegistrationAddress-coO57t4c.js → RegistrationAddress-DEZgJ98J.js} +36 -33
  46. package/dist/{Review-BFb6Ykw1.js → Review-BH30PNwx.js} +8 -7
  47. package/dist/RootBusinessDetailsPage-CB6RWU2g.js +61 -0
  48. package/dist/{OnboardingDropinComponent-BlMzaK2Z.js → RootBusinessLinesPage-CtY_KP7f.js} +845 -5342
  49. package/dist/{RootIndividualDetailsPage-BEe-U1FO.js → RootIndividualDetailsPage-C6TUZLlV.js} +5 -5
  50. package/dist/{SignPCIComponent-D5KQ4t2I.js → SignPCIComponent-Lc4CIjC7.js} +10 -8
  51. package/dist/{SingpassSelection-wIFBjJkx.js → SingpassSelection-Cwocy94c.js} +5 -4
  52. package/dist/SoleProprietorshipPage-DIotXS-E.js +60 -0
  53. package/dist/{SourceOfFundsPage-B0js4JTw.js → SourceOfFundsPage-D6X8IktQ.js} +37 -32
  54. package/dist/{StepProgressIndicator-axxG6zQK.js → StepProgressIndicator-BRtUTJA2.js} +1 -1
  55. package/dist/{StoreProvider-BulXd4Hf.js → StoreProvider-DX9X_rtC.js} +107 -102
  56. package/dist/{TaskItemStatus-DykYxx-L.js → TaskItemStatus-DTxnqkA5.js} +3 -3
  57. package/dist/{TaxInformationField-vBwS4Gdq.js → TaxInformationField-CAhkfn-Q.js} +28 -26
  58. package/dist/{TaxReportingDropin-T-05itkR.js → TaxReportingDropin-zqqyQfEx.js} +17 -13
  59. package/dist/{TileGroup-CWIb67Fa.js → TileGroup-DPM4gpzr.js} +4 -4
  60. package/dist/{TrustDetailsPage-XpVwVUFb.js → TrustDetailsPage-BaqBKpei.js} +24 -22
  61. package/dist/{TrustMemberCompanyPage-CPZ8ZzqF.js → TrustMemberCompanyPage-DQvZ4BOf.js} +22 -9
  62. package/dist/{TrustMemberIndividualPage-um9OLnSy.js → TrustMemberIndividualPage-Du6IjMHg.js} +5 -5
  63. package/dist/{UnincorporatedPartnershipIndividualPage-CvQOUpDy.js → UnincorporatedPartnershipIndividualPage-ii0O1m-J.js} +5 -5
  64. package/dist/UnincorporatedPartnershipMemberCompanyPage-X3m8PR8H.js +76 -0
  65. package/dist/{ViewVerificationStatusComponent-aOEFCjUd.js → ViewVerificationStatusComponent-wM09RJoi.js} +4 -4
  66. package/dist/adyen-business-financing.js +3 -3
  67. package/dist/adyen-individual-configuration.js +3 -3
  68. package/dist/adyen-individual-status.js +3 -3
  69. package/dist/adyen-kyc-components.js +20 -20
  70. package/dist/adyen-onboarding.js +2 -2
  71. package/dist/adyen-terms-of-service-management.js +3 -3
  72. package/dist/adyen-terms-of-service-status.js +3 -3
  73. package/dist/adyen-transfer-instrument-configuration.js +3 -3
  74. package/dist/adyen-transfer-instrument-management.js +3 -3
  75. package/dist/adyen-verification-status.js +3 -3
  76. package/dist/analytics-CSO2dqDO.js +123 -0
  77. package/dist/{bafinUtils-DOsm2O1i.js → bafinUtils-lxvWZZEW.js} +8 -57
  78. package/dist/{bg-BG-B37z4fjM.js → bg-BG-BIOMFPaW.js} +3 -1
  79. package/dist/bg-BG-BLe6BCNz.js +13 -0
  80. package/dist/bg-BG-BPsOhDfg.js +13 -0
  81. package/dist/bg-BG-fr-xfUBV.js +110 -0
  82. package/dist/commonValidators-B3Rif_Pi.js +24 -0
  83. package/dist/cs-CZ-C0sNB1Fm.js +110 -0
  84. package/dist/cs-CZ-CHzJM-ii.js +13 -0
  85. package/dist/{cs-CZ-2D8o2KB0.js → cs-CZ-DNWTRefA.js} +3 -1
  86. package/dist/cs-CZ-xoLsda7i.js +13 -0
  87. package/dist/da-DK-8dk9Q_Wk.js +110 -0
  88. package/dist/{da-DK-CplImqOX.js → da-DK-D-PlwKvZ.js} +3 -1
  89. package/dist/da-DK-D-TJghBi.js +13 -0
  90. package/dist/da-DK-XNMYSp7w.js +13 -0
  91. package/dist/{de-DE-DNOzlYEY.js → de-DE-4GAd_srm.js} +3 -1
  92. package/dist/de-DE-BI7AAdOv.js +13 -0
  93. package/dist/de-DE-CCmlaL2F.js +13 -0
  94. package/dist/de-DE-CCyKie8B.js +110 -0
  95. package/dist/debugStore-BvbyN1Oi.js +14 -0
  96. package/dist/dropinUtils-BB4B9BSv.js +196 -0
  97. package/dist/el-GR-D7zMcBtK.js +110 -0
  98. package/dist/{el-GR-DAFcmbwE.js → el-GR-Ddnh0NhQ.js} +3 -1
  99. package/dist/el-GR-DoCIcce-.js +13 -0
  100. package/dist/el-GR-kYiInIQ9.js +13 -0
  101. package/dist/{en-US-CEc3gxgl.js → en-US-BCFNoF5y.js} +2 -1
  102. package/dist/en-US-BwDZ0WHW.js +110 -0
  103. package/dist/en-US-DYpvuCLO.js +13 -0
  104. package/dist/{en-US-xHi63gSK.js → en-US-DjF6iC7G.js} +12 -1
  105. package/dist/{es-ES-BPI-KmDv.js → es-ES-C4lENXHH.js} +3 -1
  106. package/dist/es-ES-CJMsyMAc.js +13 -0
  107. package/dist/es-ES-CnNU6AJv.js +13 -0
  108. package/dist/es-ES-JvAvmB2A.js +110 -0
  109. package/dist/{et-EE-CMXpGRz8.js → et-EE-3EQr-1cj.js} +3 -1
  110. package/dist/et-EE-BR4OXRfV.js +13 -0
  111. package/dist/et-EE-SJf3_Ega.js +110 -0
  112. package/dist/et-EE-sB7wkSA3.js +13 -0
  113. package/dist/fi-FI-BbqwYcLI.js +13 -0
  114. package/dist/{fi-FI-C5SwgUIc.js → fi-FI-Byvvcxxq.js} +3 -1
  115. package/dist/fi-FI-Cy2hAl0B.js +110 -0
  116. package/dist/fi-FI-u5GxMZsq.js +13 -0
  117. package/dist/{fieldConfigurations-BBmPG-CS.js → fieldConfigurations-QIDm3nkC.js} +12 -306
  118. package/dist/fr-FR-BmW46mYd.js +110 -0
  119. package/dist/fr-FR-CMjrAkKl.js +13 -0
  120. package/dist/fr-FR-Cr-Y1vIy.js +13 -0
  121. package/dist/{fr-FR-CAqqgh3X.js → fr-FR-E_UubsZ-.js} +3 -1
  122. package/dist/{getName-N_Hu5gE7.js → getName-DQuF2UWl.js} +2 -2
  123. package/dist/{hasDataChanged-C32ujCoA.js → hasDataChanged-QgzClnGa.js} +2 -2
  124. package/dist/hr-HR-Bhsop3CT.js +13 -0
  125. package/dist/hr-HR-D8cBxUFa.js +13 -0
  126. package/dist/{hr-HR-oTvJUvqr.js → hr-HR-TVOgDkBf.js} +3 -1
  127. package/dist/hr-HR-c1Si_0s4.js +110 -0
  128. package/dist/hu-HU-BVfkOdJe.js +13 -0
  129. package/dist/hu-HU-CibGC8KY.js +110 -0
  130. package/dist/hu-HU-D2j1ISVk.js +13 -0
  131. package/dist/{hu-HU-DA-bZKop.js → hu-HU-DRONW_47.js} +3 -1
  132. package/dist/{iframeWidget-iA0G4IZI.js → iframeWidget-LY36YmR3.js} +4 -4
  133. package/dist/{isEmpty-CD8E4UFi.js → isEmpty-uIgxe5k7.js} +2 -2
  134. package/dist/it-IT-BMjuva_2.js +110 -0
  135. package/dist/it-IT-C7Sg1k4p.js +13 -0
  136. package/dist/it-IT-CwA8megO.js +13 -0
  137. package/dist/{it-IT-CpKAGuyU.js → it-IT-DuBLJIdz.js} +3 -1
  138. package/dist/{ja-JP-7DhgV_0J.js → ja-JP-CCnzjx-u.js} +28 -2
  139. package/dist/{ja-JP-C4569I8p.js → ja-JP-CJ_j_HAA.js} +3 -1
  140. package/dist/ja-JP-Cr_qjpZ2.js +110 -0
  141. package/dist/ja-JP-GSbqID7o.js +13 -0
  142. package/dist/{localizeDateString-DHsCnGIt.js → localizeDateString-BKtxO1zQ.js} +1 -1
  143. package/dist/lt-LT-C5nNCk4_.js +13 -0
  144. package/dist/{lt-LT-DfJ0ojxY.js → lt-LT-CBBDNCnp.js} +3 -1
  145. package/dist/lt-LT-DSiutpRl.js +13 -0
  146. package/dist/lt-LT-DjNjg3Pl.js +110 -0
  147. package/dist/lv-LV-BpRfRfMz.js +110 -0
  148. package/dist/lv-LV-C62XiDE5.js +13 -0
  149. package/dist/lv-LV-CEK8Re4d.js +13 -0
  150. package/dist/{lv-LV-d0ldbfMh.js → lv-LV-CtIe38WU.js} +3 -1
  151. package/dist/{mapExistingFile-CZ8JIq0y.js → mapExistingFile-BfHRGybY.js} +4 -4
  152. package/dist/{mapJpAddressSchemaToAddressLocalizations-CYDc6_WR.js → mapJpAddressSchemaToAddressLocalizations-Bh2EFFbk.js} +53 -6
  153. package/dist/{mapLegalEntityToIndividualOnfidoSchema-DpDvE22C.js → mapLegalEntityToIndividualOnfidoSchema-ixUzJxt_.js} +4 -4
  154. package/dist/{mapTransferInstrumentToPayoutAccount-B_Z8lux3.js → mapTransferInstrumentToPayoutAccount-DqDMLrLp.js} +6 -3
  155. package/dist/nl-NL-BOJ6zuBr.js +13 -0
  156. package/dist/{nl-NL-DdVmtkAu.js → nl-NL-CE4l8R5l.js} +3 -1
  157. package/dist/nl-NL-DOQPxTX-.js +13 -0
  158. package/dist/nl-NL-oaBDOlm6.js +110 -0
  159. package/dist/{no-NO-C0WUoV9N.js → no-NO-B1_YJlMP.js} +3 -1
  160. package/dist/no-NO-BTrfxWS7.js +110 -0
  161. package/dist/no-NO-Cp3-tDMw.js +13 -0
  162. package/dist/no-NO-CuwTDFSf.js +13 -0
  163. package/dist/pl-PL-1-MrLPXu.js +13 -0
  164. package/dist/pl-PL-C72GTDxW.js +110 -0
  165. package/dist/pl-PL-CtDHmbhp.js +13 -0
  166. package/dist/{pl-PL-Byfw9EGz.js → pl-PL-DGYFY42P.js} +3 -1
  167. package/dist/process-field-configurations-CPiaN7XP.js +304 -0
  168. package/dist/pt-BR-Br_cHzGx.js +13 -0
  169. package/dist/{pt-BR-DUUAs_Pm.js → pt-BR-Co8OqKh-.js} +3 -1
  170. package/dist/pt-BR-CtFCi7U4.js +110 -0
  171. package/dist/pt-BR-DnKEuslh.js +13 -0
  172. package/dist/pt-PT-CLwCij2I.js +13 -0
  173. package/dist/pt-PT-XAn7WGle.js +110 -0
  174. package/dist/pt-PT-cjbtYBUX.js +13 -0
  175. package/dist/{pt-PT-BVZxK7ae.js → pt-PT-pKLoM66X.js} +3 -1
  176. package/dist/{resolveEnvironment-HVVOrOBr.js → resolveEnvironment-B9LzegI4.js} +3 -3
  177. package/dist/ro-RO-CGhIjlpU.js +13 -0
  178. package/dist/ro-RO-Cmk-sVDr.js +13 -0
  179. package/dist/{ro-RO-Ck3Azc56.js → ro-RO-D3rQ93wa.js} +3 -1
  180. package/dist/ro-RO-qX8X1Q1m.js +110 -0
  181. package/dist/{rules-CpkxtBrw.js → rules-BMGZ46_e.js} +9 -5
  182. package/dist/sk-SK-Bo5nvxWQ.js +13 -0
  183. package/dist/sk-SK-CjdK4BKW.js +110 -0
  184. package/dist/{sk-SK-jxAlqkeI.js → sk-SK-CmH1I1tp.js} +3 -1
  185. package/dist/sk-SK-Do6CKNU4.js +13 -0
  186. package/dist/sl-SI-CrTRlNnN.js +13 -0
  187. package/dist/sl-SI-cY-L2ma-.js +13 -0
  188. package/dist/{sl-SI-CjvFCQ3H.js → sl-SI-hnlbW1OT.js} +3 -1
  189. package/dist/sl-SI-lPxRRPsh.js +110 -0
  190. package/dist/style.css +577 -544
  191. package/dist/styles-CLV89_hH.js +577 -544
  192. package/dist/{sv-SE-CSjJPRt1.js → sv-SE-7Cbo1oic.js} +3 -1
  193. package/dist/sv-SE-BPpQ-05i.js +110 -0
  194. package/dist/sv-SE-BtwPrLEA.js +13 -0
  195. package/dist/sv-SE-WPziDPQa.js +13 -0
  196. package/dist/types/components/BankAccount/fields/BankAccountFormat/types.d.ts +2 -1
  197. package/dist/types/components/BankAccount/fields/PreferredCurrency/PreferredCurrency.d.ts +10 -0
  198. package/dist/types/components/BankAccount/forms/PayoutAccount/types.d.ts +2 -0
  199. package/dist/types/components/BankAccount/forms/PayoutCountryDetails/PayoutCountryDetails.d.ts +3 -0
  200. package/dist/types/components/BankAccount/forms/PayoutCountryDetails/types.d.ts +11 -0
  201. package/dist/types/components/BankAccount/forms/PayoutDetails/PayoutDetails.d.ts +6 -0
  202. package/dist/types/components/BankAccount/forms/PayoutDetails/types.d.ts +2 -0
  203. package/dist/types/components/BankAccount/forms/PayoutVerificationMethod/utils.d.ts +2 -0
  204. package/dist/types/components/BankAccount/mapping/mapPayoutAccountSchemaToApiBankAccount.d.ts +3 -2
  205. package/dist/types/components/BankAccount/mapping/mapPayoutDetailsToTransferInstrument.d.ts +2 -1
  206. package/dist/types/components/BankAccount/mapping/mapTransferInstrumentToPayoutAccount.d.ts +1 -1
  207. package/dist/types/components/BankAccount/mapping/payoutKeyMappings.d.ts +2 -0
  208. package/dist/types/components/BankAccount/tasks/PayoutDetailsDropin/payoutDetailsFormConfig.d.ts +1 -1
  209. package/dist/types/components/BankAccount/utils/payoutAccountUtil.d.ts +3 -2
  210. package/dist/types/components/Business/forms/BasicInformation/BasicInformationMultiform.d.ts +5 -3
  211. package/dist/types/components/Business/forms/RegistrationDocument/types.d.ts +3 -3
  212. package/dist/types/components/Business/forms/TaxDocument/types.d.ts +3 -3
  213. package/dist/types/components/Business/pages/RootBusinessDetailsPage.d.ts +1 -1
  214. package/dist/types/components/Business/tasks/BusinessDetailsDropin/types.d.ts +0 -1
  215. package/dist/types/components/Business/tasks/BusinessDetailsMultiformDropin/BusinessDetailsMultiform.d.ts +2 -1
  216. package/dist/types/components/Business/utils/applyVerifiedBusinessData.d.ts +5 -0
  217. package/dist/types/components/EFP/tasks/BusinessFinancingDropin/BusinessFinancingBasicCompanyInformation.d.ts +0 -1
  218. package/dist/types/components/EFP/tasks/BusinessFinancingDropin/BusinessFinancingBusinessInformation.d.ts +0 -1
  219. package/dist/types/components/EFP/tasks/BusinessFinancingDropin/BusinessFinancingFinancialInformation.d.ts +0 -1
  220. package/dist/types/components/EFP/tasks/BusinessFinancingDropin/BusinessFinancingOwnershipStructure.d.ts +0 -1
  221. package/dist/types/components/EFP/tasks/BusinessFinancingDropin/BusinessFinancingRegisteredAddress.d.ts +0 -1
  222. package/dist/types/components/Individual/fields/NameFields/NameFields.d.ts +3 -0
  223. package/dist/types/components/Individual/tasks/DecisionMakers/utils.d.ts +3 -0
  224. package/dist/types/components/Shared/devex/DebugListener/DebugFormData.d.ts +1 -0
  225. package/dist/types/components/Shared/devex/DebugListener/debugStore.d.ts +5 -0
  226. package/dist/types/components/Shared/forms/Address/utils.d.ts +1 -1
  227. package/dist/types/components/SoleProprietorship/pages/SoleProprietorshipPage.d.ts +1 -2
  228. package/dist/types/components/Trust/pages/TrustMemberCompanyPage.d.ts +1 -2
  229. package/dist/types/components/UnincorporatedPartnership/pages/UnincorporatedPartnershipMemberCompanyPage.d.ts +1 -2
  230. package/dist/types/components/ui/atoms/ListItem/ListItem.d.ts +1 -2
  231. package/dist/types/context/ExperimentContext/types.d.ts +4 -8
  232. package/dist/types/core/models/api/transfer-instrument.d.ts +2 -0
  233. package/dist/types/core/process-field-configurations.d.ts +2 -2
  234. package/dist/types/datasets/generators/getAccountFormatForCountry.d.ts +1 -0
  235. package/dist/types/stores/globalStore/taskTypes.d.ts +1 -1
  236. package/dist/types/{core → utils}/analytics.d.ts +5 -5
  237. package/dist/types/utils/entityStatusUtil.d.ts +1 -1
  238. package/dist/{types-YZCbv6wT.js → types-B8B2a7MQ.js} +2 -2
  239. package/dist/{types-Cnytncbd.js → types-DHmyPbAn.js} +5 -9
  240. package/dist/{types-DREIZpxT.js → types-DhTTtRCo.js} +2 -2
  241. package/dist/{useAssociatedLegalEntity-CtPwbvkG.js → useAssociatedLegalEntity-Ga-FKuMn.js} +1 -1
  242. package/dist/{useDataset-BhtLJw8i.js → useDataset-DZSHpx6s.js} +3 -3
  243. package/dist/{useForm-CkDciBI3.js → useForm-Dj2YKs6k.js} +8 -79
  244. package/dist/useFormContext-DW_Slas-.js +222 -0
  245. package/dist/{useGlobalData-BUgIp9O-.js → useGlobalData-DpDm0x5x.js} +10 -8
  246. package/dist/{RadioGroup-CDIi5JOR.js → useMultiForm-B07GoQbD.js} +6 -339
  247. package/dist/{useOnboardingStatus-C617NeV-.js → useOnboardingStatus-Cn0R_NIZ.js} +1 -1
  248. package/dist/{useScenarios-pcYq7HkO.js → useScenarios-Dt2xmzlt.js} +2 -2
  249. package/dist/{useTermsOfServiceStatus-DAhlGfSf.js → useTermsOfServiceStatus-D6iXFeAp.js} +1 -1
  250. package/dist/{useToastContext-SPgtDHvP.js → useToastContext-9176-zEj.js} +2 -2
  251. package/dist/{useUnincorporatedPartnershipMembers-AfBFy7Yl.js → useUnincorporatedPartnershipMembers-6JvFEoTe.js} +5 -5
  252. package/dist/{utils-C6VZF1lW.js → utils-BbfCeKoQ.js} +7 -7
  253. package/dist/{utils-DKPIAe71.js → utils-C3YOzi3q.js} +2 -2
  254. package/dist/{utils-CfNHCh35.js → utils-Cnzy9BrL.js} +3 -3
  255. package/dist/{validate-0hhEAEOS.js → validate-3hlm9O5d.js} +7 -7
  256. package/dist/{validate-nQU_m5nS.js → validate-C5RnmxAh.js} +2 -2
  257. package/dist/{validate-zp9cKIZQ.js → validate-CchLxW_F.js} +3 -3
  258. package/dist/{validationError-C4LAQpBz.js → validationError-9xZhdWqV.js} +2 -2
  259. package/package.json +4 -4
  260. package/dist/RootBusinessDetailsPage-BsbiSuH4.js +0 -1977
  261. package/dist/SoleProprietorshipPage-BKxqOwer.js +0 -49
  262. package/dist/UnincorporatedPartnershipMemberCompanyPage-BPEUAWOw.js +0 -63
  263. package/dist/analytics-_iYLDAnN.js +0 -61
  264. package/dist/bg-BG-B8A8D_hg.js +0 -47
  265. package/dist/bg-BG-CC5Y7izP.js +0 -13
  266. package/dist/bg-BG-DPkib_ah.js +0 -13
  267. package/dist/cs-CZ-B0dmNTJm.js +0 -13
  268. package/dist/cs-CZ-B7A0WNBx.js +0 -47
  269. package/dist/cs-CZ-E0sZTsrs.js +0 -13
  270. package/dist/da-DK-9M2wm0kt.js +0 -47
  271. package/dist/da-DK-HNKnBXb5.js +0 -13
  272. package/dist/da-DK-quX5LuPc.js +0 -13
  273. package/dist/de-DE-1wVDROIy.js +0 -13
  274. package/dist/de-DE-B2QaSUv3.js +0 -13
  275. package/dist/de-DE-CLuLBUrb.js +0 -47
  276. package/dist/el-GR-BKT02owO.js +0 -13
  277. package/dist/el-GR-BN7mIwED.js +0 -47
  278. package/dist/el-GR-C2BsVqjY.js +0 -13
  279. package/dist/en-US-BEgdeTV4.js +0 -13
  280. package/dist/en-US-BWtUZoXL.js +0 -47
  281. package/dist/es-ES-DCkqCwAK.js +0 -13
  282. package/dist/es-ES-Dc4Z3rGg.js +0 -13
  283. package/dist/es-ES-i_Fk7A9r.js +0 -47
  284. package/dist/et-EE-DKJ8Kn8O.js +0 -47
  285. package/dist/et-EE-DbRebqzm.js +0 -13
  286. package/dist/et-EE-sGRn_-QJ.js +0 -13
  287. package/dist/fi-FI-BQxUuIP0.js +0 -13
  288. package/dist/fi-FI-BXJbm9sZ.js +0 -13
  289. package/dist/fi-FI-CF4-CyIe.js +0 -47
  290. package/dist/fr-FR-C4LPqbx5.js +0 -47
  291. package/dist/fr-FR-DvgcaqM8.js +0 -13
  292. package/dist/fr-FR-t2k348rx.js +0 -13
  293. package/dist/hr-HR-BiZNiGG9.js +0 -13
  294. package/dist/hr-HR-Dlw8mrQW.js +0 -13
  295. package/dist/hr-HR-TslbqIeE.js +0 -47
  296. package/dist/hu-HU-6VmfqBr5.js +0 -13
  297. package/dist/hu-HU-CgBQ5Skc.js +0 -47
  298. package/dist/hu-HU-DLynQejq.js +0 -13
  299. package/dist/it-IT-BXsakLEg.js +0 -47
  300. package/dist/it-IT-BgdxIaNM.js +0 -13
  301. package/dist/it-IT-PJbf57vA.js +0 -13
  302. package/dist/ja-JP-B--vgrAi.js +0 -47
  303. package/dist/ja-JP-BBzuYv6e.js +0 -13
  304. package/dist/lt-LT-57A37eCA.js +0 -13
  305. package/dist/lt-LT-C_sT0Isz.js +0 -13
  306. package/dist/lt-LT-UnMr3oB3.js +0 -47
  307. package/dist/lv-LV-7VOOOEZ-.js +0 -13
  308. package/dist/lv-LV-C54zKY0H.js +0 -47
  309. package/dist/lv-LV-Cwzt1ESp.js +0 -13
  310. package/dist/nl-NL-A444CaCG.js +0 -47
  311. package/dist/nl-NL-D0wVWeHf.js +0 -13
  312. package/dist/nl-NL-DiH4q7K-.js +0 -13
  313. package/dist/no-NO-BeVzpadb.js +0 -13
  314. package/dist/no-NO-D57T2p2M.js +0 -47
  315. package/dist/no-NO-JHMzV-ae.js +0 -13
  316. package/dist/pl-PL-0BphD78z.js +0 -13
  317. package/dist/pl-PL-B3RxZ32y.js +0 -47
  318. package/dist/pl-PL-De41L6O6.js +0 -13
  319. package/dist/pt-BR-BvAy7bfZ.js +0 -13
  320. package/dist/pt-BR-CjfX1fDM.js +0 -47
  321. package/dist/pt-BR-D7RCymsU.js +0 -13
  322. package/dist/pt-PT-BH1abg6H.js +0 -13
  323. package/dist/pt-PT-CgXkfMUc.js +0 -13
  324. package/dist/pt-PT-D79GMAC5.js +0 -47
  325. package/dist/ro-RO-1W3Bw0U7.js +0 -13
  326. package/dist/ro-RO-Dj-2um-k.js +0 -47
  327. package/dist/ro-RO-raS4E2ww.js +0 -13
  328. package/dist/sk-SK-BTujkOgF.js +0 -13
  329. package/dist/sk-SK-Es-5xiuY.js +0 -13
  330. package/dist/sk-SK-JN-Ll7bm.js +0 -47
  331. package/dist/sl-SI-BT9PpQII.js +0 -13
  332. package/dist/sl-SI-Cq4LxAvb.js +0 -13
  333. package/dist/sl-SI-nUZNETVU.js +0 -47
  334. package/dist/sv-SE-8dFj9z4D.js +0 -47
  335. package/dist/sv-SE-Csib2Zj_.js +0 -13
  336. package/dist/sv-SE-EbNvb_L7.js +0 -13
@@ -1,1977 +0,0 @@
1
- ;
2
- {
3
- try {
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] = "250fd3be-447b-4c3f-a7ec-c242c2c9d2c4", e._sentryDebugIdIdentifier = "sentry-dbid-250fd3be-447b-4c3f-a7ec-c242c2c9d2c4");
6
- } catch (e) {
7
- }
8
- }
9
- ;
10
- import { u as useTranslation, X as useExperimentsContext, c as useLegalEntity, R as ROOT_LE, x as Typography, ac as CountryCodes, L as Loader, m as useSettingsContext, ah as useI18nContext, M as TaskTypes, y as LegalEntityTypes, b as useApiContext, P as useAnalyticsContext, aK as useQueryClient, bz as businessDetailsDocumentMapping, as as businessDetailsApiKeyMapping, a as addResourceBundles, z as isPartOfTrustFromLegalEntity, J as EntityTypes, g as getLegalEntityCountry, _ as __variableDynamicImportRuntimeHelper } from "./StoreProvider-BulXd4Hf.js";
11
- import { jsxs, jsx } from "preact/jsx-runtime";
12
- import { r as resolveFieldMetadata, a as useAccountHolder, i as composePerScenarioFormConfigurations, c as getPropsFromConfigurations, b as useCapabilityProblems, g as getProblemsForEntity } from "./fieldConfigurations-BBmPG-CS.js";
13
- import { v as verifiedBusiness, u as useDebouncedState, l as legalFormFieldMetadata, s as stockTickerSymbolFieldMetadata, a as stockISINFieldMetadata, b as stockExchangeMICFieldMetadata, d as dateOfIncorporationFieldMetadata, e as eInvoicingCodeFieldMetadata, V as VerifiedBusinessCard, L as LEGAL_FORM_FIELDS, E as EInvoicingCodeField, c as EINVOICING_CODE_FIELD, D as DATE_OF_INCORPORATION_FIELD, f as DateOfIncorporationField, S as STOCK_EXCHANGE_MIC_FIELD, g as StockExchangeMICField, h as STOCK_ISIN_FIELD, i as StockISINField, j as STOCK_TICKER_SYMBOL_FIELD, k as StockTickerSymbolField, A as ADDITIONAL_INFORMATION_FORM_ID, m as localizedLegalCompanyNameFieldConfig, n as defaultFieldMetadata$1, o as defaultFieldConfig$1, p as useLegalCompanyNameField, C as COUNTRY_OF_GOVERNING_LAW_FIELD, q as CountryOfGoverningLawField, r as isBankAccountRequestedForOrganization, t as companyTypeOptions, w as useCompanyTypeExamples, x as companyTypeMetadata, F as FinancialInformation, P as ProofOfOwnershipDocument, y as ProofOfSignatoryDocument, z as ProofOfDirectorDocument, R as RegistrationDocument, T as TaxDocument, B as BusinessSelectionMultiform, G as isVerifiedSingleCompanySearchResult, H as tinMatched, I as CountryOfGoverningLawFieldValidation, J as CountryFieldValidation, K as getForms, M as mapApiDocumentToBusinessDetailsDocuments, N as mapLegalEntityToBusinessDetailsSchema, O as financialInfoValidationWithEmployeesRules, Q as CompanyStructureValidation, U as businessMismatchModalOpen, W as formatDataForSummary, X as submit, Y as useCompanySearch, Z as useVerifyTin, _ as useCompanySelection, $ as businessDetailsFieldsPerScenario, a0 as isNormalizedStringMatch, a1 as KOMPANY_SEARCH_FAILURE, a2 as BusinessDetailsDropin } from "./BusinessDetailsDropin-DvcYg_X0.js";
14
- import { useEffect, useMemo, useCallback, useState } from "preact/hooks";
15
- import { u as useFormContext, c as useCreateLegalEntity, d as useUpdateLegalEntity, a as useMultiForm, F as FormContextProvider, b as FormFlow } from "./RadioGroup-CDIi5JOR.js";
16
- import { u as useToastContext } from "./useToastContext-SPgtDHvP.js";
17
- import { g as getAssociatedLeAnalyticsPayload } from "./analytics-_iYLDAnN.js";
18
- import { m as mergeFieldMetadataIntoProps, c as createFormUtils, H as Header, E as ErrorPanel, C as CountryField, e as COUNTRY_FIELD, a as Link, h as summaryStep, b as addValidityToForms, t as trackNavigation, u as useFormComposer } from "./CountryField-DePvueIq.js";
19
- import { b as useScenarioConfiguration } from "./mapExistingFile-CZ8JIq0y.js";
20
- import { a as datasetUtilities, C as Confirm } from "./useDataset-BhtLJw8i.js";
21
- import { d as documentApiUtils } from "./validate-zp9cKIZQ.js";
22
- import { r as requestingBanking, c as requestingIssuing, t as taxInformationDefaultFieldMetadata, b as taxInformationDefaultFieldConfig, d as TAX_INFORMATION_FIELD, T as TaxInformationField, M as MemoizedDocumentUpload, C as COUNTRIES_USING_COMPANY_SEARCH, e as rules, g as getFieldsWithExistingData } from "./TaxInformationField-vBwS4Gdq.js";
23
- import { C as CompanyTypesValues } from "./bafinUtils-DOsm2O1i.js";
24
- import { v as vatAbsenceReasonMetadata, d as defaultFieldMetadata, a as defaultFieldConfig, r as registrationNumberDefaultFieldMetadata, b as registrationNumberDefaultFieldConfig, c as doingBusinessAsFieldMetadata, e as doingBusinessAsAbsentFieldMetadata, D as DBA_NAME_FIELD, f as DBANameField, B as BUSINESS_REGISTRATION_NUMBER_FIELD, g as BusinessRegistrationNumberField, V as VAT_NUMBER_FIELD, h as VatNumberField, M as MemoizedConstitutionalDocument, i as exemptFromRegistrationNumberDefaultFieldMetadata } from "./RegistrationAddress-coO57t4c.js";
25
- import { Suspense, lazy } from "preact/compat";
26
- import { c as useAddressCleanse, f as formatAddressForCleanse, m as mapAddressData, o as operationalAddressIsSameIds, A as Address, g as getNestedTrustedFields, S as STATE_FIELD, d as StateField } from "./Address-t4VOfLT-.js";
27
- import { F as Field, C as Checkbox } from "./useForm-CkDciBI3.js";
28
- import { g as industryCodeFieldMetadata, I as INDUSTRY_CODE_FIELD, h as IndustryCodeField, j as defaultFieldMetadataV4, k as defaultFieldMetadata$2, l as defaultFieldConfigV4, m as defaultFieldConfig$2, o as LEGAL_COMPANY_NAME_FIELD } from "./OnboardingDropinComponent-BlMzaK2Z.js";
29
- import { g as getAddressSchemaForCountry, C as COUNTRIES_WITH_STATES_DATASET, a as getAddressSchemaLabelsByCountry } from "./utils-CfNHCh35.js";
30
- import { L as LegalFormField } from "./Currency-CCNB-Owq.js";
31
- import { S as SettingNames, I as InputText } from "./InputText-rkMNHFYM.js";
32
- import { u as useAllowedCountries } from "./mapJpAddressSchemaToAddressLocalizations-CYDc6_WR.js";
33
- import { E as EntityTypeRadioGroupCard } from "./utils-C6VZF1lW.js";
34
- const LazyJpAddress = lazy(
35
- async () => (await import("./JpAddress-7_Wvn6w-.js")).JpAddress
36
- );
37
- function AdditionalInformationMultiform({
38
- id,
39
- country,
40
- companyType,
41
- shouldValidate,
42
- heading = "additionalInformationFormHeading",
43
- description,
44
- validationErrors = {},
45
- verificationErrors = {}
46
- }) {
47
- const { t, i18n } = useTranslation(["business", "businessLines"]);
48
- const { t: commonT } = useTranslation("common");
49
- const { form } = useFormContext();
50
- const { isExperimentEnabled } = useExperimentsContext();
51
- const { data: rootLegalEntity } = useLegalEntity(ROOT_LE);
52
- const verifiedBusiness$1 = verifiedBusiness.value;
53
- const showVerified = !!verifiedBusiness$1;
54
- const showStockData = companyType === CompanyTypesValues.PUBLIC_COMPANY;
55
- const addressSchema = getAddressSchemaForCountry(country).filter(
56
- (field) => !COUNTRIES_WITH_STATES_DATASET.includes(country) ? field !== "stateOrProvince" : true
57
- );
58
- const currentCountryTaxInformation = form.data?.additionalInformation?.taxInformation?.find(
59
- (taxId) => taxId.country === country
60
- );
61
- const businessLineTypes = [];
62
- if (requestingBanking(rootLegalEntity)) {
63
- businessLineTypes.push("banking");
64
- }
65
- if (requestingIssuing(rootLegalEntity)) {
66
- businessLineTypes.push("issuing");
67
- }
68
- const [addressToCheck, setAddressToCheck] = useDebouncedState(500);
69
- const { data: cleansedRegistrationAddress } = useAddressCleanse(
70
- {
71
- text: addressToCheck,
72
- country
73
- },
74
- { enabled: Boolean(addressToCheck) }
75
- );
76
- const mustProvideOperationalAddress = cleansedRegistrationAddress?.poBox ?? false;
77
- useEffect(
78
- () => setAddressToCheck(
79
- formatAddressForCleanse(form.data?.additionalInformation?.registrationAddress ?? {})
80
- ),
81
- [form.data?.additionalInformation?.registrationAddress, setAddressToCheck]
82
- );
83
- const verifiedAddress = useMemo(() => {
84
- if (!verifiedBusiness$1) return void 0;
85
- return verifiedBusiness$1.isPrincipalAddress || verifiedBusiness$1.state && form.data?.basicInformation?.stateOrProvince !== verifiedBusiness$1.state ? { operationalAddress: { ...mapAddressData(verifiedBusiness$1), country } } : {
86
- registrationAddress: {
87
- ...mapAddressData(verifiedBusiness$1),
88
- country,
89
- stateOrProvince: form.data?.basicInformation?.stateOrProvince
90
- }
91
- };
92
- }, [verifiedBusiness$1, form.data?.basicInformation?.stateOrProvince, country]);
93
- const handleChangeFor = useCallback(
94
- (fieldName, mode) => form.handleChangeFor(fieldName, "additionalInformation", mode),
95
- [form]
96
- );
97
- const handleRegistrationAddressChange = (state) => {
98
- handleChangeFor("registrationAddress")(state.data);
99
- form.setValid("registrationAddress", Boolean(state.isValid), "additionalInformation");
100
- };
101
- const handleOperationalAddressChange = (state) => {
102
- handleChangeFor("operationalAddress")(state.data);
103
- form.setValid("operationalAddress", Boolean(state.isValid), "additionalInformation");
104
- };
105
- const handleOperationalAddressIsSameChange = useCallback(
106
- (isChecked) => {
107
- if (isChecked) {
108
- handleChangeFor("operationalAddressIsSame")(
109
- operationalAddressIsSameIds.OPERATIONAL_ADDRESS_IS_SAME
110
- );
111
- form.setValid("operationalAddress", true, "additionalInformation");
112
- } else {
113
- handleChangeFor("operationalAddressIsSame")(
114
- operationalAddressIsSameIds.OPERATIONAL_ADDRESS_IS_NOT_SAME
115
- );
116
- }
117
- },
118
- [form, handleChangeFor]
119
- );
120
- useEffect(() => {
121
- if (mustProvideOperationalAddress && form.data?.additionalInformation?.operationalAddressIsSame !== operationalAddressIsSameIds.OPERATIONAL_ADDRESS_IS_NOT_SAME) {
122
- handleOperationalAddressIsSameChange(false);
123
- }
124
- }, [
125
- handleOperationalAddressIsSameChange,
126
- mustProvideOperationalAddress,
127
- form.data?.additionalInformation?.operationalAddressIsSame
128
- ]);
129
- const formUtils = useMemo(() => {
130
- const initialProps = {
131
- data: form.data?.additionalInformation ?? {},
132
- fieldValidationErrors: validationErrors,
133
- formVerificationErrors: verificationErrors,
134
- allFields: form.allFields?.additionalInformation ?? [],
135
- requiredFields: form.requiredFields?.additionalInformation ?? [],
136
- optionalFields: form.optionalFields?.additionalInformation ?? [],
137
- trustedFields: form.trustedFields?.additionalInformation ?? [],
138
- obscuredFields: form.obscuredFields?.additionalInformation ?? [],
139
- errors: form.errors?.additionalInformation ?? {},
140
- valid: form.valid?.additionalInformation ?? {},
141
- handleFieldChange: handleChangeFor
142
- };
143
- const formUtilProps = initialProps.allFields?.reduce((acc, field) => {
144
- switch (field) {
145
- case "hasDoingBusinessAs":
146
- return mergeFieldMetadataIntoProps(
147
- "hasDoingBusinessAs",
148
- doingBusinessAsAbsentFieldMetadata,
149
- acc
150
- );
151
- case "doingBusinessAs":
152
- return mergeFieldMetadataIntoProps("doingBusinessAs", doingBusinessAsFieldMetadata, acc);
153
- case "registrationNumber":
154
- return mergeFieldMetadataIntoProps(
155
- field,
156
- resolveFieldMetadata(
157
- registrationNumberDefaultFieldConfig[country],
158
- {
159
- companyType,
160
- registrationNumberType: form.data?.additionalInformation?.registrationNumberType,
161
- isExperimentEnabled
162
- },
163
- registrationNumberDefaultFieldMetadata
164
- ),
165
- acc
166
- );
167
- case "taxInformation":
168
- return mergeFieldMetadataIntoProps(
169
- field,
170
- resolveFieldMetadata(
171
- taxInformationDefaultFieldConfig[country],
172
- {
173
- taxIdNumberType: currentCountryTaxInformation?.type,
174
- companyType
175
- },
176
- taxInformationDefaultFieldMetadata
177
- ),
178
- acc
179
- );
180
- case "vatNumber":
181
- return mergeFieldMetadataIntoProps(
182
- field,
183
- resolveFieldMetadata(
184
- defaultFieldConfig[country],
185
- { vatNumberType: form.data?.additionalInformation?.vatNumberType },
186
- defaultFieldMetadata
187
- ),
188
- acc
189
- );
190
- case "vatAbsenceReason":
191
- return mergeFieldMetadataIntoProps("vatAbsenceReason", vatAbsenceReasonMetadata, acc);
192
- case "eInvoicingCode":
193
- return mergeFieldMetadataIntoProps("eInvoicingCode", eInvoicingCodeFieldMetadata, acc);
194
- case "industryCodes":
195
- return mergeFieldMetadataIntoProps("industryCodes", industryCodeFieldMetadata, acc);
196
- case "dateOfIncorporation":
197
- return mergeFieldMetadataIntoProps(
198
- "dateOfIncorporation",
199
- dateOfIncorporationFieldMetadata,
200
- acc
201
- );
202
- case "stockExchangeMIC":
203
- return mergeFieldMetadataIntoProps(
204
- "stockExchangeMIC",
205
- stockExchangeMICFieldMetadata,
206
- acc
207
- );
208
- case "stockISIN":
209
- return mergeFieldMetadataIntoProps("stockISIN", stockISINFieldMetadata, acc);
210
- case "stockTickerSymbol":
211
- return mergeFieldMetadataIntoProps(
212
- "stockTickerSymbol",
213
- stockTickerSymbolFieldMetadata,
214
- acc
215
- );
216
- case "legalForm":
217
- return mergeFieldMetadataIntoProps("legalForm", legalFormFieldMetadata, acc);
218
- default:
219
- return acc;
220
- }
221
- }, initialProps);
222
- return createFormUtils(formUtilProps ?? initialProps, commonT);
223
- }, [
224
- companyType,
225
- country,
226
- currentCountryTaxInformation?.type,
227
- form.allFields?.additionalInformation,
228
- form.data?.additionalInformation,
229
- form.errors?.additionalInformation,
230
- form.obscuredFields?.additionalInformation,
231
- form.optionalFields?.additionalInformation,
232
- form.requiredFields?.additionalInformation,
233
- form.trustedFields?.additionalInformation,
234
- form.valid?.additionalInformation,
235
- handleChangeFor,
236
- commonT,
237
- isExperimentEnabled,
238
- validationErrors,
239
- verificationErrors
240
- ]);
241
- const showField = (fieldKeys) => fieldKeys.some((field) => formUtils.isRequiredField(field) || formUtils.isOptionalField(field));
242
- const datasetUtils = datasetUtilities(i18n.language);
243
- const registrationAddressDescription = useMemo(() => {
244
- if (country) {
245
- return ["US", "NL", "CZ"].includes(country) ? t(($) => $["youBusinessOfficalAddressInTheCounty"], {
246
- country: datasetUtils.getCountryName(country)
247
- }) : t(($) => $["youBusinessOfficalAddressInCounty"], {
248
- country: datasetUtils.getCountryName(country)
249
- });
250
- }
251
- return t(($) => $["youBusinessOfficalAddress"]);
252
- }, [country, datasetUtils, t]);
253
- return /* @__PURE__ */ jsxs("form", { id, className: "adyen-kyc-additional-information", children: [
254
- /* @__PURE__ */ jsx(
255
- Header,
256
- {
257
- title: commonT(($) => $[heading]),
258
- description: description ? commonT(($) => $[description]) : void 0
259
- }
260
- ),
261
- /* @__PURE__ */ jsx(
262
- ErrorPanel,
263
- {
264
- id: "ariaErrorField",
265
- verificationErrors,
266
- validationErrors,
267
- formUtils
268
- }
269
- ),
270
- /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-additional-information__content", children: [
271
- showVerified && /* @__PURE__ */ jsxs("section", { children: [
272
- /* @__PURE__ */ jsx("div", { className: "adyen-kyc-additional-information__section-heading", children: /* @__PURE__ */ jsx(Typography, { el: "h3", variant: "title", children: t(($) => $["verifiedInformation"]) }) }),
273
- /* @__PURE__ */ jsx(
274
- VerifiedBusinessCard,
275
- {
276
- verifiedBusiness: verifiedBusiness$1,
277
- verifiedAddress: verifiedAddress?.registrationAddress ?? verifiedAddress?.operationalAddress
278
- }
279
- )
280
- ] }),
281
- /* @__PURE__ */ jsxs("section", { children: [
282
- showVerified && /* @__PURE__ */ jsx("div", { className: "adyen-kyc-additional-information__section-heading", children: /* @__PURE__ */ jsx(Typography, { el: "h3", variant: "title", children: t(($) => $["otherBusinessInformation"]) }) }),
283
- /* @__PURE__ */ jsxs("fieldset", { children: [
284
- showField(LEGAL_FORM_FIELDS) && /* @__PURE__ */ jsx("div", { className: "adyen-kyc-field-wrapper", children: /* @__PURE__ */ jsx(
285
- LegalFormField,
286
- {
287
- name: "legalForm",
288
- countryCode: country,
289
- data: {
290
- legalForm: formUtils.getFieldData(
291
- form.data?.additionalInformation ?? {},
292
- LEGAL_FORM_FIELDS
293
- )?.legalForm
294
- },
295
- valid: formUtils.getFieldValid(
296
- form.valid?.additionalInformation ?? {},
297
- LEGAL_FORM_FIELDS
298
- ),
299
- errorMessage: form.errors.additionalInformation?.legalForm?.errorMessage,
300
- handleChangeFor,
301
- readonly: false,
302
- label: formUtils.getLabel("legalForm", "businessStructure")
303
- }
304
- ) }),
305
- showField(DBA_NAME_FIELD) && /* @__PURE__ */ jsx("div", { className: "adyen-kyc-field-wrapper", children: /* @__PURE__ */ jsx(
306
- DBANameField,
307
- {
308
- data: formUtils.getFieldData(
309
- form.data?.additionalInformation ?? {},
310
- DBA_NAME_FIELD
311
- ),
312
- valid: formUtils.getFieldValid(
313
- form.valid?.additionalInformation ?? {},
314
- DBA_NAME_FIELD
315
- ),
316
- errors: formUtils.getFieldErrors(
317
- form.errors?.additionalInformation ?? {},
318
- validationErrors,
319
- DBA_NAME_FIELD
320
- ),
321
- labels: formUtils.getFieldLabels(DBA_NAME_FIELD, {
322
- hasDoingBusinessAs: "hasDba"
323
- }),
324
- readonly: formUtils.isReadOnly("doingBusinessAs"),
325
- handleChangeFor
326
- }
327
- ) }),
328
- showField(BUSINESS_REGISTRATION_NUMBER_FIELD) && /* @__PURE__ */ jsx("div", { className: "adyen-kyc-field-wrapper", children: /* @__PURE__ */ jsx(
329
- BusinessRegistrationNumberField,
330
- {
331
- data: formUtils.getFieldData(
332
- form.data?.additionalInformation ?? {},
333
- BUSINESS_REGISTRATION_NUMBER_FIELD
334
- ),
335
- valid: formUtils.getFieldValid(
336
- form.valid?.additionalInformation ?? {},
337
- BUSINESS_REGISTRATION_NUMBER_FIELD
338
- ),
339
- errors: formUtils.getFieldErrors(
340
- form.errors?.additionalInformation ?? {},
341
- validationErrors,
342
- BUSINESS_REGISTRATION_NUMBER_FIELD
343
- ),
344
- labels: formUtils.getFieldLabels(BUSINESS_REGISTRATION_NUMBER_FIELD, {
345
- exemptedFromRegistrationNumber: "iDontHaveARegistrationNumber"
346
- }),
347
- mask: formUtils.getMask("registrationNumber"),
348
- guidanceText: formUtils.getFieldGuidanceText(BUSINESS_REGISTRATION_NUMBER_FIELD),
349
- placeholders: formUtils.getFieldPlaceholders(BUSINESS_REGISTRATION_NUMBER_FIELD),
350
- helperText: formUtils.getFieldHelperText(BUSINESS_REGISTRATION_NUMBER_FIELD),
351
- readonly: formUtils.isReadOnly("registrationNumber"),
352
- optional: formUtils.isOptionalField("registrationNumber"),
353
- shouldValidate,
354
- handleChangeFor,
355
- country,
356
- canExempt: showField(["exemptedFromRegistrationNumber"]),
357
- companyType
358
- }
359
- ) }),
360
- showField(TAX_INFORMATION_FIELD) && /* @__PURE__ */ jsx("div", { className: "adyen-kyc-field-wrapper", children: /* @__PURE__ */ jsx(
361
- TaxInformationField,
362
- {
363
- data: formUtils.getFieldData(
364
- form.data?.additionalInformation ?? {},
365
- TAX_INFORMATION_FIELD
366
- ),
367
- valid: formUtils.getFieldValid(
368
- form.valid?.additionalInformation ?? {},
369
- TAX_INFORMATION_FIELD
370
- ),
371
- errors: formUtils.getFieldErrors(
372
- form.errors?.additionalInformation ?? {},
373
- validationErrors,
374
- TAX_INFORMATION_FIELD
375
- ),
376
- labels: formUtils.getFieldLabels(TAX_INFORMATION_FIELD, {
377
- exemptedFromTax: "iDontHaveATaxId"
378
- }),
379
- mask: formUtils.getMask("taxInformation"),
380
- guidanceText: formUtils.getFieldGuidanceText(TAX_INFORMATION_FIELD),
381
- readonly: formUtils.isReadOnly("taxInformation"),
382
- shouldValidate,
383
- handleChangeFor,
384
- canExempt: showField(["exemptedFromTax"]),
385
- country,
386
- entityType: companyType,
387
- defaultData: form.defaultData?.additionalInformation?.taxInformation,
388
- registrationNumber: form.data?.additionalInformation?.registrationNumber
389
- }
390
- ) }),
391
- showField(VAT_NUMBER_FIELD) && /* @__PURE__ */ jsx("div", { className: "adyen-kyc-field-wrapper", children: /* @__PURE__ */ jsx(
392
- VatNumberField,
393
- {
394
- data: formUtils.getFieldData(
395
- form.data?.additionalInformation ?? {},
396
- VAT_NUMBER_FIELD
397
- ),
398
- valid: formUtils.getFieldValid(
399
- form.valid?.additionalInformation ?? {},
400
- VAT_NUMBER_FIELD
401
- ),
402
- errors: formUtils.getFieldErrors(
403
- form.errors?.additionalInformation ?? {},
404
- validationErrors,
405
- VAT_NUMBER_FIELD
406
- ),
407
- labels: formUtils.getFieldLabels(VAT_NUMBER_FIELD, {
408
- exemptedFromVat: "iDontHaveAVatNumber"
409
- }),
410
- mask: formUtils.getMask("vatNumber"),
411
- guidanceText: formUtils.getFieldGuidanceText(VAT_NUMBER_FIELD),
412
- placeholders: formUtils.getFieldPlaceholders(VAT_NUMBER_FIELD),
413
- readonly: formUtils.isReadOnly("vatNumber"),
414
- handleChangeFor,
415
- country,
416
- canExempt: showField(["exemptedFromVat"]),
417
- shouldValidate
418
- }
419
- ) }),
420
- formUtils.isRequiredField("eInvoicingCode", false) && /* @__PURE__ */ jsx("div", { className: "adyen-kyc-field-wrapper", children: /* @__PURE__ */ jsx(
421
- EInvoicingCodeField,
422
- {
423
- data: formUtils.getFieldData(
424
- form.data?.additionalInformation ?? {},
425
- EINVOICING_CODE_FIELD
426
- ),
427
- valid: formUtils.getFieldValid(
428
- form.valid?.additionalInformation ?? {},
429
- EINVOICING_CODE_FIELD
430
- ),
431
- errors: formUtils.getFieldErrors(
432
- form.errors?.additionalInformation ?? {},
433
- validationErrors,
434
- EINVOICING_CODE_FIELD
435
- ),
436
- labels: formUtils.getFieldLabels(EINVOICING_CODE_FIELD),
437
- placeholders: formUtils.getFieldPlaceholders(EINVOICING_CODE_FIELD),
438
- mask: formUtils.getMask("eInvoicingCode"),
439
- guidanceText: formUtils.getFieldGuidanceText(EINVOICING_CODE_FIELD),
440
- readonly: formUtils.isReadOnly("eInvoicingCode"),
441
- handleChangeFor
442
- }
443
- ) }),
444
- showField(INDUSTRY_CODE_FIELD) && /* @__PURE__ */ jsx("div", { className: "adyen-kyc-field-wrapper", children: /* @__PURE__ */ jsx(
445
- IndustryCodeField,
446
- {
447
- data: formUtils.getFieldData(
448
- form.data?.additionalInformation ?? {},
449
- INDUSTRY_CODE_FIELD
450
- ),
451
- valid: formUtils.getFieldValid(
452
- form.valid?.additionalInformation ?? {},
453
- INDUSTRY_CODE_FIELD
454
- ),
455
- errors: formUtils.getFieldErrors(
456
- form.errors?.additionalInformation ?? {},
457
- validationErrors,
458
- INDUSTRY_CODE_FIELD
459
- ),
460
- labels: {
461
- industryCodes: t(($) => $["industry"], {
462
- ns: "businessLines"
463
- })
464
- },
465
- guidanceText: {
466
- industryCodes: t(($) => $["primaryIndustryCodeGuidance"], {
467
- ns: "businessLines"
468
- })
469
- },
470
- readonly: formUtils.isReadOnly("industryCodes"),
471
- handleChangeFor,
472
- businessLineTypes,
473
- single: true
474
- }
475
- ) }),
476
- showField(DATE_OF_INCORPORATION_FIELD) && /* @__PURE__ */ jsx("div", { className: "adyen-kyc-field-wrapper", children: /* @__PURE__ */ jsx(
477
- DateOfIncorporationField,
478
- {
479
- data: formUtils.getFieldData(
480
- form.data?.additionalInformation ?? {},
481
- DATE_OF_INCORPORATION_FIELD
482
- ),
483
- valid: formUtils.getFieldValid(
484
- form.valid?.additionalInformation ?? {},
485
- DATE_OF_INCORPORATION_FIELD
486
- ),
487
- errors: formUtils.getFieldErrors(
488
- form.errors?.additionalInformation ?? {},
489
- validationErrors,
490
- DATE_OF_INCORPORATION_FIELD
491
- ),
492
- labels: formUtils.getFieldLabels(DATE_OF_INCORPORATION_FIELD),
493
- placeholders: formUtils.getFieldPlaceholders(DATE_OF_INCORPORATION_FIELD, {
494
- dateOfIncorporation: "datePlaceholder"
495
- }),
496
- readonly: formUtils.isReadOnly("dateOfIncorporation"),
497
- handleChangeFor
498
- }
499
- ) })
500
- ] })
501
- ] }),
502
- showStockData && /* @__PURE__ */ jsxs("section", { children: [
503
- /* @__PURE__ */ jsx("div", { className: "adyen-kyc-additional-information__section-heading", children: /* @__PURE__ */ jsx(Typography, { el: "h3", variant: "title", children: t(($) => $["stockExchangeInformation"]) }) }),
504
- /* @__PURE__ */ jsxs("fieldset", { children: [
505
- showField(STOCK_EXCHANGE_MIC_FIELD) && /* @__PURE__ */ jsx("div", { className: "adyen-kyc-field-wrapper", children: /* @__PURE__ */ jsx(
506
- StockExchangeMICField,
507
- {
508
- data: formUtils.getFieldData(
509
- form.data?.additionalInformation ?? {},
510
- STOCK_EXCHANGE_MIC_FIELD
511
- ),
512
- valid: formUtils.getFieldValid(
513
- form.valid?.additionalInformation ?? {},
514
- STOCK_EXCHANGE_MIC_FIELD
515
- ),
516
- errors: formUtils.getFieldErrors(
517
- form.errors?.additionalInformation ?? {},
518
- validationErrors,
519
- STOCK_EXCHANGE_MIC_FIELD
520
- ),
521
- labels: formUtils.getFieldLabels(STOCK_EXCHANGE_MIC_FIELD),
522
- placeholders: formUtils.getFieldPlaceholders(STOCK_EXCHANGE_MIC_FIELD),
523
- mask: formUtils.getMask("stockExchangeMIC"),
524
- guidanceText: formUtils.getFieldGuidanceText(STOCK_EXCHANGE_MIC_FIELD),
525
- readonly: formUtils.isReadOnly("stockExchangeMIC"),
526
- shouldValidate,
527
- handleChangeFor
528
- }
529
- ) }),
530
- showField(STOCK_ISIN_FIELD) && /* @__PURE__ */ jsx("div", { className: "adyen-kyc-field-wrapper", children: /* @__PURE__ */ jsx(
531
- StockISINField,
532
- {
533
- data: formUtils.getFieldData(
534
- form.data?.additionalInformation ?? {},
535
- STOCK_ISIN_FIELD
536
- ),
537
- valid: formUtils.getFieldValid(
538
- form.valid?.additionalInformation ?? {},
539
- STOCK_ISIN_FIELD
540
- ),
541
- errors: formUtils.getFieldErrors(
542
- form.errors?.additionalInformation ?? {},
543
- validationErrors,
544
- STOCK_ISIN_FIELD
545
- ),
546
- labels: formUtils.getFieldLabels(STOCK_ISIN_FIELD),
547
- placeholders: formUtils.getFieldPlaceholders(STOCK_ISIN_FIELD),
548
- mask: formUtils.getMask("stockISIN"),
549
- guidanceText: formUtils.getFieldGuidanceText(STOCK_ISIN_FIELD),
550
- readonly: formUtils.isReadOnly("stockISIN"),
551
- shouldValidate,
552
- handleChangeFor
553
- }
554
- ) }),
555
- showField(STOCK_TICKER_SYMBOL_FIELD) && /* @__PURE__ */ jsx("div", { className: "adyen-kyc-field-wrapper", children: /* @__PURE__ */ jsx(
556
- StockTickerSymbolField,
557
- {
558
- data: formUtils.getFieldData(
559
- form.data?.additionalInformation ?? {},
560
- STOCK_TICKER_SYMBOL_FIELD
561
- ),
562
- valid: formUtils.getFieldValid(
563
- form.valid?.additionalInformation ?? {},
564
- STOCK_TICKER_SYMBOL_FIELD
565
- ),
566
- errors: formUtils.getFieldErrors(
567
- form.errors?.additionalInformation ?? {},
568
- validationErrors,
569
- STOCK_TICKER_SYMBOL_FIELD
570
- ),
571
- labels: formUtils.getFieldLabels(STOCK_TICKER_SYMBOL_FIELD),
572
- placeholders: formUtils.getFieldPlaceholders(STOCK_TICKER_SYMBOL_FIELD),
573
- mask: formUtils.getMask("stockTickerSymbol"),
574
- guidanceText: formUtils.getFieldGuidanceText(STOCK_TICKER_SYMBOL_FIELD),
575
- readonly: formUtils.isReadOnly("stockTickerSymbol"),
576
- shouldValidate,
577
- handleChangeFor
578
- }
579
- ) })
580
- ] })
581
- ] }),
582
- /* @__PURE__ */ jsxs("section", { "data-testid": "registeredBusinessAddress", children: [
583
- /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-additional-information__section-heading", children: [
584
- /* @__PURE__ */ jsx(Typography, { el: "h3", variant: "title", children: t(($) => $["registeredBusinessAddress"]) }),
585
- /* @__PURE__ */ jsx(Typography, { el: "p", variant: "body", children: registrationAddressDescription })
586
- ] }),
587
- country === CountryCodes.Japan ? /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(Loader, {}), children: /* @__PURE__ */ jsx(
588
- LazyJpAddress,
589
- {
590
- id: ADDITIONAL_INFORMATION_FORM_ID,
591
- addressType: "registrationAddress",
592
- data: { ...form.data.additionalInformation?.registrationAddress, country },
593
- shouldValidate,
594
- onChange: handleRegistrationAddressChange
595
- }
596
- ) }) : /* @__PURE__ */ jsx(
597
- Address,
598
- {
599
- id: ADDITIONAL_INFORMATION_FORM_ID,
600
- addressType: "registrationAddress",
601
- data: {
602
- ...form.data.additionalInformation?.registrationAddress,
603
- country
604
- },
605
- labels: getAddressSchemaLabelsByCountry(country),
606
- requiredFields: addressSchema,
607
- shouldValidate,
608
- hideCountry: true,
609
- optionalFields: ["otherAddressInformation"],
610
- readOnlyFields: verifiedBusiness$1?.state && verifiedBusiness$1?.state === form.data.basicInformation?.stateOrProvince ? ["stateOrProvince"] : [],
611
- trustedFields: getNestedTrustedFields(
612
- "registrationAddress",
613
- form.data.additionalInformation,
614
- form.trustedFields?.additionalInformation
615
- ),
616
- onChange: handleRegistrationAddressChange,
617
- verifiedBusiness: verifiedBusiness$1,
618
- verifiedAddress: verifiedAddress?.registrationAddress,
619
- condensed: true
620
- }
621
- )
622
- ] }),
623
- /* @__PURE__ */ jsxs("section", { "data-testid": "principalPlaceOfBusiness", children: [
624
- /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-additional-information__section-heading", children: [
625
- /* @__PURE__ */ jsx(Typography, { el: "h3", variant: "title", children: t(($) => $["principalPlaceOfBusiness"]) }),
626
- /* @__PURE__ */ jsx(Typography, { el: "p", variant: "body", children: t(($) => $["thePhysicalLocationWhereABusiness"]) })
627
- ] }),
628
- !mustProvideOperationalAddress && /* @__PURE__ */ jsx(
629
- Field,
630
- {
631
- el: "fieldset",
632
- name: "operationalAddressIsSame",
633
- errorMessage: form.errors?.additionalInformation?.operationalAddressIsSame?.errorMessage,
634
- isValid: form.valid?.additionalInformation?.operationalAddressIsSame,
635
- children: (childProps) => /* @__PURE__ */ jsx(
636
- Checkbox,
637
- {
638
- ...childProps,
639
- "aria-required": formUtils.isRequiredField("operationalAddressIsSame"),
640
- "aria-invalid": !form.valid?.additionalInformation?.operationalAddressIsSame,
641
- name: "operationalAddressIsSame",
642
- label: formUtils.getLabel("sameAsRegisteredAddress"),
643
- checked: form.data?.additionalInformation?.operationalAddressIsSame ? form.data?.additionalInformation?.operationalAddressIsSame === operationalAddressIsSameIds.OPERATIONAL_ADDRESS_IS_SAME : true,
644
- onChange: handleOperationalAddressIsSameChange
645
- }
646
- )
647
- }
648
- ),
649
- form.data?.additionalInformation?.operationalAddressIsSame === operationalAddressIsSameIds.OPERATIONAL_ADDRESS_IS_NOT_SAME && (country === CountryCodes.Japan ? /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(Loader, {}), children: /* @__PURE__ */ jsx(
650
- LazyJpAddress,
651
- {
652
- id: ADDITIONAL_INFORMATION_FORM_ID,
653
- addressType: "operationalAddress",
654
- data: { ...form.data.additionalInformation.operationalAddress, country },
655
- shouldValidate,
656
- onChange: handleOperationalAddressChange
657
- }
658
- ) }) : /* @__PURE__ */ jsx(
659
- Address,
660
- {
661
- id: ADDITIONAL_INFORMATION_FORM_ID,
662
- addressType: "operationalAddress",
663
- data: {
664
- ...form.defaultData?.additionalInformation?.operationalAddress,
665
- country
666
- },
667
- labels: getAddressSchemaLabelsByCountry(country),
668
- requiredFields: addressSchema,
669
- shouldValidate,
670
- hideCountry: true,
671
- optionalFields: ["otherAddressInformation"],
672
- trustedFields: getNestedTrustedFields(
673
- "operationalAddress",
674
- form.data?.additionalInformation,
675
- form.trustedFields?.additionalInformation
676
- ),
677
- onChange: handleOperationalAddressChange,
678
- verifiedBusiness: verifiedBusiness$1,
679
- verifiedAddress: verifiedAddress?.operationalAddress,
680
- condensed: true
681
- }
682
- ))
683
- ] })
684
- ] })
685
- ] });
686
- }
687
- [
688
- ...COUNTRY_FIELD,
689
- ...LEGAL_COMPANY_NAME_FIELD,
690
- "jaHaniLegalCompanyName",
691
- "jaKanaLegalCompanyName",
692
- ...TAX_INFORMATION_FIELD,
693
- ...STATE_FIELD,
694
- ...BUSINESS_REGISTRATION_NUMBER_FIELD,
695
- ...COUNTRY_OF_GOVERNING_LAW_FIELD
696
- ];
697
- const FormDescription = ({ description }) => {
698
- const { t } = useTranslation("common");
699
- return /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-form-header__description", children: [
700
- t(($) => $[description]),
701
- " ",
702
- /* @__PURE__ */ jsx(Link, { href: "https://www.adyen.com/privacy-policy", external: true, children: t(($) => $["privacyStatement"]) })
703
- ] });
704
- };
705
- function BasicInformationMultiform({
706
- id,
707
- country,
708
- shouldValidate,
709
- heading = "basicInformationFormHeading",
710
- description = "basicInformationFormDescription",
711
- validationErrors = {},
712
- verificationErrors = {},
713
- disableCountry = false,
714
- isTopLevelEntity = true
715
- }) {
716
- const { t } = useTranslation("common");
717
- const { isSettingEnabled } = useSettingsContext();
718
- const { isExperimentEnabled } = useExperimentsContext();
719
- const { form } = useFormContext();
720
- const allowedCountries = useAllowedCountries();
721
- const isAllowedEditPrefilledCountry = isSettingEnabled(SettingNames.AllowPrefilledCountryEdit);
722
- const state = form.data?.basicInformation?.stateOrProvince;
723
- const companyType = form.data?.companyStructure?.entityType;
724
- const currentCountryTaxInformation = form.data?.basicInformation?.taxInformation?.find(
725
- (tax) => tax.country === country
726
- );
727
- const handleChangeFor = useCallback(
728
- (fieldName, mode) => form.handleChangeFor(fieldName, "basicInformation", mode),
729
- [form]
730
- );
731
- const formUtils = useMemo(() => {
732
- const initialProps = {
733
- data: form.data?.basicInformation ?? {},
734
- fieldValidationErrors: validationErrors,
735
- formVerificationErrors: verificationErrors,
736
- allFields: form.allFields?.basicInformation ?? [],
737
- requiredFields: form.requiredFields?.basicInformation ?? [],
738
- optionalFields: form.optionalFields?.basicInformation ?? [],
739
- trustedFields: form.trustedFields?.basicInformation ?? [],
740
- obscuredFields: form.obscuredFields?.basicInformation ?? [],
741
- errors: form.errors?.basicInformation ?? {},
742
- valid: form.valid?.basicInformation ?? {},
743
- handleFieldChange: handleChangeFor
744
- };
745
- const formUtilProps = initialProps.allFields?.reduce((acc, field) => {
746
- switch (field) {
747
- case "country":
748
- return acc;
749
- case "legalCompanyName":
750
- return mergeFieldMetadataIntoProps(
751
- field,
752
- resolveFieldMetadata(
753
- isExperimentEnabled("StrictNameAndAddressValidationV4") ? defaultFieldConfigV4[country] : defaultFieldConfig$2[country],
754
- { isBusiness: true },
755
- isExperimentEnabled("StrictNameAndAddressValidationV4") ? defaultFieldMetadataV4 : defaultFieldMetadata$2
756
- ),
757
- acc
758
- );
759
- case "countryOfGoverningLaw":
760
- return acc;
761
- case "stateOrProvince":
762
- return mergeFieldMetadataIntoProps(
763
- field,
764
- resolveFieldMetadata(
765
- defaultFieldConfig$1[country],
766
- { isBusiness: true },
767
- defaultFieldMetadata$1
768
- ),
769
- acc
770
- );
771
- case "taxInformation":
772
- return mergeFieldMetadataIntoProps(
773
- field,
774
- resolveFieldMetadata(
775
- taxInformationDefaultFieldConfig[country],
776
- {
777
- taxIdNumberType: currentCountryTaxInformation?.type,
778
- companyType
779
- },
780
- taxInformationDefaultFieldMetadata
781
- ),
782
- acc
783
- );
784
- case "registrationNumber":
785
- return mergeFieldMetadataIntoProps(
786
- field,
787
- resolveFieldMetadata(
788
- registrationNumberDefaultFieldConfig[country],
789
- {
790
- companyType,
791
- registrationNumberType: form.data?.additionalInformation?.registrationNumberType,
792
- state,
793
- isExperimentEnabled
794
- },
795
- registrationNumberDefaultFieldMetadata
796
- ),
797
- acc
798
- );
799
- case "jaHaniLegalCompanyName":
800
- return mergeFieldMetadataIntoProps(
801
- field,
802
- resolveFieldMetadata(
803
- localizedLegalCompanyNameFieldConfig.jaHaniLegalCompanyName.config,
804
- {},
805
- localizedLegalCompanyNameFieldConfig.jaHaniLegalCompanyName.metadata
806
- ),
807
- acc
808
- );
809
- case "jaKanaLegalCompanyName":
810
- return mergeFieldMetadataIntoProps(
811
- field,
812
- resolveFieldMetadata(
813
- localizedLegalCompanyNameFieldConfig.jaKanaLegalCompanyName.config,
814
- {},
815
- localizedLegalCompanyNameFieldConfig.jaKanaLegalCompanyName.metadata
816
- ),
817
- acc
818
- );
819
- default:
820
- return acc;
821
- }
822
- }, initialProps);
823
- return createFormUtils(formUtilProps ?? initialProps, t);
824
- }, [
825
- companyType,
826
- country,
827
- currentCountryTaxInformation?.type,
828
- form.allFields?.basicInformation,
829
- form.data?.additionalInformation?.registrationNumberType,
830
- form.data?.basicInformation,
831
- form.errors?.basicInformation,
832
- form.obscuredFields?.basicInformation,
833
- form.optionalFields?.basicInformation,
834
- form.requiredFields?.basicInformation,
835
- form.trustedFields?.basicInformation,
836
- form.valid?.basicInformation,
837
- handleChangeFor,
838
- isExperimentEnabled,
839
- state,
840
- t,
841
- validationErrors,
842
- verificationErrors
843
- ]);
844
- const showField = (fieldKeys) => fieldKeys.some((field) => {
845
- switch (field) {
846
- case "registrationNumberType":
847
- case "registrationNumber": {
848
- return (formUtils.isRequiredField(field) || formUtils.isOptionalField(field)) && form.data.basicInformation?.stateOrProvince;
849
- }
850
- default:
851
- return formUtils.isRequiredField(field) || formUtils.isOptionalField(field);
852
- }
853
- });
854
- const legalCompanyNameFields = useLegalCompanyNameField({
855
- data: form.data.basicInformation ?? {},
856
- valid: form.valid.basicInformation ?? {},
857
- errors: form.errors.basicInformation ?? {},
858
- fieldProblems: form.fieldProblems.basicInformation ?? {},
859
- country,
860
- formUtils,
861
- handleChange: handleChangeFor
862
- });
863
- return /* @__PURE__ */ jsxs("form", { id, className: "adyen-kyc-basic-information", children: [
864
- /* @__PURE__ */ jsx(Header, { title: t(($) => $[heading]), children: /* @__PURE__ */ jsx(FormDescription, { slot: "description", description }) }),
865
- /* @__PURE__ */ jsx(
866
- ErrorPanel,
867
- {
868
- id: "ariaErrorField",
869
- verificationErrors,
870
- validationErrors,
871
- formUtils
872
- }
873
- ),
874
- /* @__PURE__ */ jsx("fieldset", { children: /* @__PURE__ */ jsx("div", { className: "adyen-kyc-field-wrapper", children: /* @__PURE__ */ jsx(
875
- CountryField,
876
- {
877
- data: formUtils.getFieldData(form.data?.basicInformation ?? {}, COUNTRY_FIELD),
878
- valid: formUtils.getFieldValid(form.valid?.basicInformation ?? {}, COUNTRY_FIELD),
879
- errors: formUtils.getFieldErrors(
880
- form.errors?.basicInformation ?? {},
881
- validationErrors,
882
- COUNTRY_FIELD
883
- ),
884
- labels: formUtils.getFieldLabels(COUNTRY_FIELD, {
885
- country: "countryRegionOfEstablishment"
886
- }),
887
- readonly: formUtils.isReadOnly("country") || !isAllowedEditPrefilledCountry || Boolean(disableCountry),
888
- handleChangeFor,
889
- allowedCountries: isTopLevelEntity ? allowedCountries : void 0
890
- }
891
- ) }) }),
892
- /* @__PURE__ */ jsxs("fieldset", { children: [
893
- showField(COUNTRY_OF_GOVERNING_LAW_FIELD) && /* @__PURE__ */ jsx("div", { className: "adyen-kyc-field-wrapper", children: /* @__PURE__ */ jsx(
894
- CountryOfGoverningLawField,
895
- {
896
- data: formUtils.getFieldData(
897
- form.data?.basicInformation ?? {},
898
- COUNTRY_OF_GOVERNING_LAW_FIELD
899
- ),
900
- country,
901
- valid: formUtils.getFieldValid(
902
- form.valid?.basicInformation ?? {},
903
- COUNTRY_OF_GOVERNING_LAW_FIELD
904
- ),
905
- errors: formUtils.getFieldErrors(
906
- form.errors?.basicInformation ?? {},
907
- validationErrors,
908
- COUNTRY_OF_GOVERNING_LAW_FIELD
909
- ),
910
- labels: formUtils.getFieldLabels(COUNTRY_OF_GOVERNING_LAW_FIELD),
911
- readonly: false,
912
- allowedCountries: isTopLevelEntity ? allowedCountries : void 0,
913
- handleChangeFor
914
- }
915
- ) }),
916
- // fields shown here are abstracted by useLegalCompanyNameField
917
- legalCompanyNameFields.map((field) => /* @__PURE__ */ jsx("div", { className: "adyen-kyc-field-wrapper", children: /* @__PURE__ */ jsx(
918
- Field,
919
- {
920
- name: field?.name ?? "",
921
- label: field?.label,
922
- helper: field?.helper,
923
- errorMessage: field?.errorMessage,
924
- isValid: Boolean(field?.isValid),
925
- children: (childProps) => /* @__PURE__ */ jsx(
926
- InputText,
927
- {
928
- ...childProps,
929
- "aria-required": true,
930
- "aria-invalid": !field?.isValid,
931
- name: field?.name,
932
- value: field?.value,
933
- readonly: field?.readonly,
934
- onInput: field ? field.onInput : () => {
935
- },
936
- transformInput: field?.transformInput,
937
- transformMode: field?.transformMode,
938
- onBlur: field?.onBlur,
939
- onKeyDown: field?.onKeyDown
940
- }
941
- )
942
- },
943
- field?.name
944
- ) }, field?.name)),
945
- showField(TAX_INFORMATION_FIELD) && /* @__PURE__ */ jsx("div", { className: "adyen-kyc-field-wrapper", children: /* @__PURE__ */ jsx(
946
- TaxInformationField,
947
- {
948
- data: formUtils.getFieldData(
949
- form.data?.basicInformation ?? {},
950
- TAX_INFORMATION_FIELD
951
- ),
952
- valid: formUtils.getFieldValid(
953
- form.valid?.basicInformation ?? {},
954
- TAX_INFORMATION_FIELD
955
- ),
956
- errors: formUtils.getFieldErrors(
957
- form.errors?.basicInformation ?? {},
958
- validationErrors,
959
- TAX_INFORMATION_FIELD
960
- ),
961
- labels: formUtils.getFieldLabels(TAX_INFORMATION_FIELD, {
962
- exemptedFromTax: "iDontHaveATaxId"
963
- }),
964
- mask: formUtils.getMask("taxInformation"),
965
- placeholders: formUtils.getFieldPlaceholders(TAX_INFORMATION_FIELD),
966
- guidanceText: formUtils.getFieldGuidanceText(TAX_INFORMATION_FIELD),
967
- readonly: formUtils.isReadOnly("taxInformation"),
968
- shouldValidate,
969
- handleChangeFor,
970
- canExempt: showField(["exemptedFromTax"]),
971
- registrationNumber: form.data.additionalInformation?.registrationNumber,
972
- country,
973
- entityType: companyType,
974
- defaultData: form.defaultData?.basicInformation?.taxInformation
975
- }
976
- ) }),
977
- showField(STATE_FIELD) && /* @__PURE__ */ jsx("div", { className: "adyen-kyc-field-wrapper", children: /* @__PURE__ */ jsx(
978
- StateField,
979
- {
980
- data: formUtils.getFieldData(form.data?.basicInformation ?? {}, STATE_FIELD),
981
- valid: formUtils.getFieldValid(form.valid?.basicInformation ?? {}, STATE_FIELD),
982
- errors: formUtils.getFieldErrors(
983
- form.errors?.basicInformation ?? {},
984
- validationErrors,
985
- STATE_FIELD
986
- ),
987
- labels: formUtils.getFieldLabels(STATE_FIELD),
988
- placeholders: formUtils.getFieldPlaceholders(STATE_FIELD),
989
- readonly: formUtils.isReadOnly("stateOrProvince"),
990
- handleChangeFor,
991
- selectedCountry: country
992
- }
993
- ) }),
994
- showField(BUSINESS_REGISTRATION_NUMBER_FIELD) && /* @__PURE__ */ jsx("div", { className: "adyen-kyc-field-wrapper", children: /* @__PURE__ */ jsx(
995
- BusinessRegistrationNumberField,
996
- {
997
- data: formUtils.getFieldData(
998
- form.data?.basicInformation ?? {},
999
- BUSINESS_REGISTRATION_NUMBER_FIELD
1000
- ),
1001
- valid: formUtils.getFieldValid(
1002
- form.valid?.basicInformation ?? {},
1003
- BUSINESS_REGISTRATION_NUMBER_FIELD
1004
- ),
1005
- errors: formUtils.getFieldErrors(
1006
- form.errors?.basicInformation ?? {},
1007
- validationErrors,
1008
- BUSINESS_REGISTRATION_NUMBER_FIELD
1009
- ),
1010
- labels: formUtils.getFieldLabels(BUSINESS_REGISTRATION_NUMBER_FIELD, {
1011
- exemptedFromRegistrationNumber: "iDontHaveARegistrationNumber"
1012
- }),
1013
- mask: formUtils.getMask("registrationNumber"),
1014
- guidanceText: formUtils.getFieldGuidanceText(BUSINESS_REGISTRATION_NUMBER_FIELD),
1015
- placeholders: formUtils.getFieldPlaceholders(BUSINESS_REGISTRATION_NUMBER_FIELD),
1016
- helperText: formUtils.getFieldHelperText(BUSINESS_REGISTRATION_NUMBER_FIELD),
1017
- readonly: formUtils.isReadOnly("registrationNumber"),
1018
- optional: formUtils.isOptionalField("registrationNumber"),
1019
- shouldValidate,
1020
- handleChangeFor,
1021
- country,
1022
- canExempt: showField(["exemptedFromRegistrationNumber"]),
1023
- companyType
1024
- }
1025
- ) })
1026
- ] })
1027
- ] });
1028
- }
1029
- function CompanyStructureMultiform({
1030
- id,
1031
- country,
1032
- heading = "companyStructureFormName",
1033
- description = "companyStructureFormDescription",
1034
- validationErrors = {},
1035
- verificationErrors = {}
1036
- }) {
1037
- const { t } = useTranslation(["common", "business"]);
1038
- const { form } = useFormContext();
1039
- const { accountHolder } = useAccountHolder();
1040
- const { isSettingEnabled } = useSettingsContext();
1041
- const canChangeEntityType = isSettingEnabled(SettingNames.AllowLegalEntityTypeChange);
1042
- const formUtils = createFormUtils(
1043
- { requiredFields: form.requiredFields?.companyStructure ?? [] },
1044
- t
1045
- );
1046
- const excludedTypes = [
1047
- CompanyTypesValues.INCORPORATED_PARTNERSHIP,
1048
- CompanyTypesValues.INCORPORATED_ASSOCIATION
1049
- ];
1050
- if (isBankAccountRequestedForOrganization.value) {
1051
- excludedTypes.push(CompanyTypesValues.GOVERNMENTAL_ORGANIZATION);
1052
- }
1053
- const companyTypeRadioOptions = canChangeEntityType && accountHolder !== "aTrust" && accountHolder !== "anUnincorporatedPartnership" ? companyTypeOptions.filter((companyType) => !excludedTypes.includes(companyType)) : companyTypeOptions;
1054
- const companyTypeExamples = useCompanyTypeExamples(country);
1055
- return /* @__PURE__ */ jsxs("form", { id, className: "adyen-kyc-company-structure", children: [
1056
- /* @__PURE__ */ jsx(Header, { title: t(($) => $[heading]), description: t(($) => $[description]) }),
1057
- /* @__PURE__ */ jsx(
1058
- ErrorPanel,
1059
- {
1060
- id: "ariaErrorField",
1061
- verificationErrors,
1062
- validationErrors,
1063
- formUtils
1064
- }
1065
- ),
1066
- /* @__PURE__ */ jsx(
1067
- Field,
1068
- {
1069
- el: "fieldset",
1070
- name: "entityType",
1071
- errorMessage: formUtils.getErrorMessage(
1072
- "entityType",
1073
- form.errors?.companyStructure,
1074
- validationErrors
1075
- ),
1076
- isValid: form.valid?.companyStructure?.entityType,
1077
- children: (childProps) => /* @__PURE__ */ jsx(
1078
- EntityTypeRadioGroupCard,
1079
- {
1080
- ...childProps,
1081
- name: "entityType",
1082
- options: companyTypeRadioOptions,
1083
- optionId: (option) => companyTypeMetadata[option].id,
1084
- optionName: (option) => t(($) => $[companyTypeMetadata[option].name], { ns: "business" }),
1085
- optionDescription: (option) => t(($) => $[companyTypeMetadata[option].description], { ns: "business" }),
1086
- selected: form.data?.companyStructure?.entityType,
1087
- onSelect: form.handleChangeFor("entityType", "companyStructure"),
1088
- examples: companyTypeExamples,
1089
- "aria-required": true,
1090
- "aria-invalid": !form.valid?.companyStructure?.entityType
1091
- }
1092
- )
1093
- }
1094
- )
1095
- ] });
1096
- }
1097
- function BusinessDetailsMultiform({
1098
- taskType,
1099
- country,
1100
- activeForm,
1101
- shouldValidate,
1102
- problems = {},
1103
- handleNextClick,
1104
- handleBackClick,
1105
- setLoadingStatus
1106
- }) {
1107
- const { i18n } = useI18nContext();
1108
- const { form } = useFormContext();
1109
- const companyType = taskType === TaskTypes.SOLE_PROPRIETOR_COMPANY ? CompanyTypesValues.SOLE_PROPRIETORSHIP : form.data.companyStructure?.entityType;
1110
- function handleChange(formName, fieldName, mode) {
1111
- return form.handleChangeFor(fieldName, formName, mode);
1112
- }
1113
- const renderActiveForm = (activeForm2) => {
1114
- switch (activeForm2.formId) {
1115
- case "basicInformation":
1116
- return /* @__PURE__ */ jsx(
1117
- BasicInformationMultiform,
1118
- {
1119
- id: activeForm2.formId,
1120
- country,
1121
- shouldValidate,
1122
- heading: activeForm2.formHeading,
1123
- description: activeForm2.formDescription,
1124
- validationErrors: problems.validationErrors?.[activeForm2.formId],
1125
- verificationErrors: problems.verificationErrors?.[activeForm2.formId]
1126
- }
1127
- );
1128
- case "businessSelection":
1129
- return /* @__PURE__ */ jsx(
1130
- BusinessSelectionMultiform,
1131
- {
1132
- id: activeForm2.formId,
1133
- country,
1134
- shouldValidate,
1135
- heading: activeForm2.formHeading,
1136
- description: activeForm2.formDescription,
1137
- validationErrors: problems.validationErrors?.[activeForm2.formId],
1138
- verificationErrors: problems.verificationErrors?.[activeForm2.formId],
1139
- handleNextClick,
1140
- handleBackClick,
1141
- setLoadingStatus
1142
- }
1143
- );
1144
- case "companyStructure":
1145
- return /* @__PURE__ */ jsx(
1146
- CompanyStructureMultiform,
1147
- {
1148
- id: activeForm2.formId,
1149
- country,
1150
- shouldValidate,
1151
- heading: activeForm2.formHeading,
1152
- description: activeForm2.formDescription,
1153
- validationErrors: problems.validationErrors?.[activeForm2.formId],
1154
- verificationErrors: problems.verificationErrors?.[activeForm2.formId]
1155
- }
1156
- );
1157
- case "additionalInformation":
1158
- return /* @__PURE__ */ jsx(
1159
- AdditionalInformationMultiform,
1160
- {
1161
- id: activeForm2.formId,
1162
- country,
1163
- companyType,
1164
- shouldValidate,
1165
- heading: activeForm2.formHeading,
1166
- description: activeForm2.formDescription,
1167
- validationErrors: problems.validationErrors?.[activeForm2.formId],
1168
- verificationErrors: problems.verificationErrors?.[activeForm2.formId]
1169
- }
1170
- );
1171
- case "companyTaxDocument":
1172
- return country === "US" ? /* @__PURE__ */ jsx(
1173
- TaxDocument,
1174
- {
1175
- id: activeForm2.formId,
1176
- country,
1177
- companyType,
1178
- shouldValidate,
1179
- heading: activeForm2.formHeading,
1180
- description: activeForm2.formDescription,
1181
- fieldValidationErrors: problems.validationErrors?.[activeForm2.formId] ?? {},
1182
- formVerificationErrors: problems.verificationErrors?.[activeForm2.formId] ?? {},
1183
- data: form.data.companyTaxDocument,
1184
- errors: form.errors.companyTaxDocument,
1185
- valid: form.valid.companyTaxDocument,
1186
- allFields: form.allFields?.companyTaxDocument,
1187
- requiredFields: form.requiredFields?.companyTaxDocument,
1188
- optionalFields: form.optionalFields?.companyTaxDocument,
1189
- trustedFields: form.trustedFields?.companyTaxDocument,
1190
- handleFieldChange: () => handleChange("companyTaxDocument", "taxDocument")
1191
- }
1192
- ) : /* @__PURE__ */ jsx(
1193
- MemoizedDocumentUpload,
1194
- {
1195
- id: activeForm2.formId,
1196
- country,
1197
- companyType,
1198
- shouldValidate,
1199
- heading: activeForm2.formHeading,
1200
- description: activeForm2.formDescription,
1201
- fieldValidationErrors: problems.validationErrors?.[activeForm2.formId] ?? {},
1202
- formVerificationErrors: problems.verificationErrors?.[activeForm2.formId] ?? {},
1203
- data: form.data.companyTaxDocument,
1204
- errors: form.errors.companyTaxDocument,
1205
- valid: form.valid.companyTaxDocument,
1206
- allFields: form.allFields?.companyTaxDocument,
1207
- requiredFields: form.requiredFields?.companyTaxDocument,
1208
- optionalFields: form.optionalFields?.companyTaxDocument,
1209
- trustedFields: form.trustedFields?.companyTaxDocument,
1210
- handleFieldChange: () => handleChange("companyTaxDocument", "taxDocument"),
1211
- documentField: "taxDocument",
1212
- documentType: "vatDocument",
1213
- hidePageCount: true,
1214
- guidanceContent: /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-u-margin-bottom-24", children: [
1215
- /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-upload-field__subtitle", children: [
1216
- " ",
1217
- i18n.get("requirements")
1218
- ] }),
1219
- /* @__PURE__ */ jsxs("ul", { children: [
1220
- /* @__PURE__ */ jsx("li", { children: i18n.get("containsNameOfCompany") }),
1221
- /* @__PURE__ */ jsx("li", { children: i18n.get("documentShowsTaxIdOfCompany") }),
1222
- /* @__PURE__ */ jsx("li", { children: i18n.get("issuedByTheTaxAuthority") })
1223
- ] })
1224
- ] })
1225
- }
1226
- );
1227
- case "companyRegistrationDocument":
1228
- return /* @__PURE__ */ jsx(
1229
- RegistrationDocument,
1230
- {
1231
- id: activeForm2.formId,
1232
- heading: activeForm2.formHeading,
1233
- description: activeForm2.formDescription,
1234
- country,
1235
- companyType,
1236
- data: form.data.companyRegistrationDocument,
1237
- errors: form.errors.companyRegistrationDocument,
1238
- valid: form.valid.companyRegistrationDocument,
1239
- allFields: form.allFields?.companyRegistrationDocument,
1240
- requiredFields: form.requiredFields?.companyRegistrationDocument,
1241
- optionalFields: form.optionalFields?.companyRegistrationDocument,
1242
- trustedFields: form.trustedFields?.companyRegistrationDocument,
1243
- handleFieldChange: () => handleChange("companyRegistrationDocument", "registrationDocument"),
1244
- shouldValidate,
1245
- fieldValidationErrors: problems.validationErrors?.[activeForm2.formId] ?? {},
1246
- formVerificationErrors: problems.verificationErrors?.[activeForm2.formId] ?? {}
1247
- }
1248
- );
1249
- case "companyProofOfDirectorDocument":
1250
- return /* @__PURE__ */ jsx(
1251
- ProofOfDirectorDocument,
1252
- {
1253
- id: activeForm2.formId,
1254
- heading: activeForm2.formHeading,
1255
- description: activeForm2.formDescription,
1256
- country,
1257
- data: form.data?.companyProofOfDirectorDocument,
1258
- errors: form.errors.companyProofOfDirectorDocument,
1259
- valid: form.valid.companyProofOfDirectorDocument,
1260
- allFields: form.allFields?.companyProofOfDirectorDocument,
1261
- requiredFields: form.requiredFields?.companyProofOfDirectorDocument,
1262
- optionalFields: form.optionalFields?.companyProofOfDirectorDocument,
1263
- trustedFields: form.trustedFields?.companyProofOfDirectorDocument,
1264
- handleFieldChange: () => handleChange("companyProofOfDirectorDocument", "proofOfDirector"),
1265
- shouldValidate,
1266
- fieldValidationErrors: problems.validationErrors?.[activeForm2.formId] ?? {},
1267
- formVerificationErrors: problems.verificationErrors?.[activeForm2.formId] ?? {}
1268
- }
1269
- );
1270
- case "companyProofOfSignatoryDocument":
1271
- return /* @__PURE__ */ jsx(
1272
- ProofOfSignatoryDocument,
1273
- {
1274
- id: activeForm2.formId,
1275
- heading: activeForm2.formHeading,
1276
- description: activeForm2.formDescription,
1277
- country,
1278
- data: form.data?.companyProofOfSignatoryDocument,
1279
- errors: form.errors.companyProofOfSignatoryDocument,
1280
- valid: form.valid.companyProofOfSignatoryDocument,
1281
- allFields: form.allFields?.companyProofOfSignatoryDocument,
1282
- requiredFields: form.requiredFields?.companyProofOfSignatoryDocument,
1283
- optionalFields: form.optionalFields?.companyProofOfSignatoryDocument,
1284
- trustedFields: form.trustedFields?.companyProofOfSignatoryDocument,
1285
- handleFieldChange: () => handleChange("companyProofOfSignatoryDocument", "proofOfSignatory"),
1286
- shouldValidate,
1287
- fieldValidationErrors: problems.validationErrors?.[activeForm2.formId] ?? {},
1288
- formVerificationErrors: problems.verificationErrors?.[activeForm2.formId] ?? {}
1289
- }
1290
- );
1291
- case "companyProofOfOwnershipDocument":
1292
- return /* @__PURE__ */ jsx(
1293
- ProofOfOwnershipDocument,
1294
- {
1295
- id: activeForm2.formId,
1296
- heading: activeForm2.formHeading,
1297
- description: activeForm2.formDescription,
1298
- country,
1299
- data: form.data?.companyProofOfOwnershipDocument,
1300
- errors: form.errors.companyProofOfOwnershipDocument,
1301
- valid: form.valid.companyProofOfOwnershipDocument,
1302
- allFields: form.allFields?.companyProofOfOwnershipDocument,
1303
- requiredFields: form.requiredFields?.companyProofOfOwnershipDocument,
1304
- optionalFields: form.optionalFields?.companyProofOfOwnershipDocument,
1305
- trustedFields: form.trustedFields?.companyProofOfOwnershipDocument,
1306
- handleFieldChange: () => handleChange("companyProofOfOwnershipDocument", "proofOfOwnership"),
1307
- shouldValidate,
1308
- fieldValidationErrors: problems.validationErrors?.[activeForm2.formId] ?? {},
1309
- formVerificationErrors: problems.verificationErrors?.[activeForm2.formId] ?? {}
1310
- }
1311
- );
1312
- case "companyConstitutionalDocument":
1313
- return /* @__PURE__ */ jsx(
1314
- MemoizedConstitutionalDocument,
1315
- {
1316
- id: activeForm2.formId,
1317
- legalEntityType: LegalEntityTypes.SOLE_PROPRIETORSHIP,
1318
- country,
1319
- data: form.data?.companyConstitutionalDocument,
1320
- errors: form.errors.companyConstitutionalDocument,
1321
- valid: form.valid.companyConstitutionalDocument,
1322
- allFields: form.allFields?.companyConstitutionalDocument,
1323
- requiredFields: form.requiredFields?.companyConstitutionalDocument,
1324
- optionalFields: form.optionalFields?.companyConstitutionalDocument,
1325
- trustedFields: form.trustedFields?.companyConstitutionalDocument,
1326
- handleFieldChange: () => handleChange("companyConstitutionalDocument", "constitutionalDocument"),
1327
- shouldValidate,
1328
- fieldValidationErrors: problems.validationErrors?.[activeForm2.formId] ?? {},
1329
- formVerificationErrors: problems.verificationErrors?.[activeForm2.formId] ?? {}
1330
- }
1331
- );
1332
- case "companyFinancialInformation":
1333
- return /* @__PURE__ */ jsx(
1334
- FinancialInformation,
1335
- {
1336
- multiForm: form,
1337
- id: activeForm2.formId,
1338
- country,
1339
- heading: i18n.get(activeForm2.formHeading),
1340
- description: activeForm2.formDescription,
1341
- data: form.data?.companyFinancialInformation,
1342
- allFields: form.allFields?.companyFinancialInformation,
1343
- requiredFields: form.requiredFields?.companyFinancialInformation,
1344
- optionalFields: form.optionalFields?.companyFinancialInformation,
1345
- trustedFields: form.trustedFields?.companyFinancialInformation,
1346
- shouldValidate
1347
- }
1348
- );
1349
- default:
1350
- return null;
1351
- }
1352
- };
1353
- return /* @__PURE__ */ jsx("div", { className: "adyen-kyc-business-details", children: /* @__PURE__ */ jsx("div", { className: "adyen-kyc-form-wrapper", children: renderActiveForm(activeForm) }) });
1354
- }
1355
- function buildRequiredForms({
1356
- config: { country, forms, requiredFields, optionalFields, isValid, problems },
1357
- options
1358
- }) {
1359
- const usesBusinessSelection = COUNTRIES_USING_COMPANY_SEARCH.includes(country);
1360
- const filteredForms = Object.values(forms).filter(({ formId }) => {
1361
- if (usesBusinessSelection) {
1362
- if (formId === "businessSelection" && (options?.hasNoSearchResults || isVerifiedSingleCompanySearchResult.value || tinMatched.value === false))
1363
- return false;
1364
- if (formId === "companyStructure" && verifiedBusiness.value?.legalForm) return false;
1365
- }
1366
- if (requiredFields || optionalFields) {
1367
- return Boolean(requiredFields?.[formId]) || Boolean(optionalFields?.[formId]);
1368
- }
1369
- return true;
1370
- });
1371
- const requiredForms = options?.skipSummary ? filteredForms : [...filteredForms, summaryStep];
1372
- return addValidityToForms(requiredForms, isValid, problems);
1373
- }
1374
- function basicInformationValidators({
1375
- country,
1376
- taxIdNumberType,
1377
- companyType,
1378
- registrationNumberType,
1379
- state,
1380
- isExperimentEnabled
1381
- }) {
1382
- return {
1383
- country: CountryFieldValidation().country,
1384
- countryOfGoverningLaw: CountryOfGoverningLawFieldValidation().countryOfGoverningLaw,
1385
- legalCompanyName: resolveFieldMetadata(
1386
- isExperimentEnabled("StrictNameAndAddressValidationV4") ? defaultFieldConfigV4[country] : defaultFieldConfig$2[country],
1387
- { isBusiness: true },
1388
- isExperimentEnabled("StrictNameAndAddressValidationV4") ? defaultFieldMetadataV4 : defaultFieldMetadata$2
1389
- )?.validators,
1390
- taxInformation: resolveFieldMetadata(
1391
- taxInformationDefaultFieldConfig[country],
1392
- {
1393
- taxIdNumberType,
1394
- companyType
1395
- },
1396
- taxInformationDefaultFieldMetadata
1397
- )?.validators,
1398
- stateOrProvince: resolveFieldMetadata(
1399
- defaultFieldConfig$1[country],
1400
- { isBusiness: true },
1401
- defaultFieldMetadata$1
1402
- )?.validators,
1403
- registrationNumber: resolveFieldMetadata(
1404
- registrationNumberDefaultFieldConfig[country],
1405
- {
1406
- companyType,
1407
- registrationNumberType,
1408
- state,
1409
- isExperimentEnabled
1410
- },
1411
- registrationNumberDefaultFieldMetadata
1412
- )?.validators
1413
- };
1414
- }
1415
- function businessSelectionValidators() {
1416
- return {
1417
- hasSelectedBusiness: {
1418
- modes: ["blur", "input"],
1419
- validate: (value) => typeof value === "boolean",
1420
- // indicates a selection was made
1421
- errorMessage: "fieldIsRequired"
1422
- }
1423
- };
1424
- }
1425
- function additionalInformationValidators({
1426
- country,
1427
- taxIdNumberType,
1428
- companyType,
1429
- registrationNumberType,
1430
- vatNumberType,
1431
- isExperimentEnabled
1432
- }) {
1433
- return {
1434
- hasDoingBusinessAs: doingBusinessAsAbsentFieldMetadata.validators,
1435
- doingBusinessAs: doingBusinessAsFieldMetadata.validators,
1436
- registrationNumber: resolveFieldMetadata(
1437
- registrationNumberDefaultFieldConfig[country],
1438
- {
1439
- companyType,
1440
- registrationNumberType,
1441
- isExperimentEnabled
1442
- },
1443
- registrationNumberDefaultFieldMetadata
1444
- )?.validators,
1445
- exemptedFromRegistrationNumber: exemptFromRegistrationNumberDefaultFieldMetadata.validators,
1446
- taxInformation: resolveFieldMetadata(
1447
- taxInformationDefaultFieldConfig[country],
1448
- {
1449
- taxIdNumberType,
1450
- companyType
1451
- },
1452
- taxInformationDefaultFieldMetadata
1453
- ).validators,
1454
- vatNumber: resolveFieldMetadata(
1455
- defaultFieldConfig[country],
1456
- { vatNumberType },
1457
- defaultFieldMetadata
1458
- ).validators,
1459
- vatAbsenceReason: vatAbsenceReasonMetadata.validators,
1460
- eInvoicingCode: eInvoicingCodeFieldMetadata.validators,
1461
- industryCodes: industryCodeFieldMetadata.validators,
1462
- dateOfIncorporation: dateOfIncorporationFieldMetadata.validators,
1463
- stockExchangeMIC: stockExchangeMICFieldMetadata.validators,
1464
- stockISIN: stockISINFieldMetadata.validators,
1465
- stockTickerSymbol: stockTickerSymbolFieldMetadata.validators
1466
- };
1467
- }
1468
- function BusinessDetailsMultiformDropin({
1469
- taskType = TaskTypes.BUSINESS_DETAILS,
1470
- country: propCountry,
1471
- problems: propProblems,
1472
- legalEntityResponse,
1473
- associatedLegalArrangement,
1474
- // initially undefined when creating entity
1475
- nestedLegalEntity,
1476
- // initially undefined when creating entity
1477
- nestedLegalEntityDetails,
1478
- // has entity roles for association logic
1479
- onSubmit: onExternalSubmit,
1480
- handleHomeClick,
1481
- asModal = false
1482
- }) {
1483
- const { t, i18n } = useTranslation(["common", "business"]);
1484
- const { baseUrl, rootLegalEntityId } = useApiContext();
1485
- const userEvents = useAnalyticsContext();
1486
- const { showToast } = useToastContext();
1487
- const queryClient = useQueryClient();
1488
- const { isExperimentEnabled } = useExperimentsContext();
1489
- const { isSettingEnabled } = useSettingsContext();
1490
- const { accountHolder, setAccountHolder } = useAccountHolder();
1491
- const { mutateAsync: createLegalEntity } = useCreateLegalEntity();
1492
- const { mutateAsync: updateLegalEntity } = useUpdateLegalEntity();
1493
- const [country, setCountry] = useState(propCountry);
1494
- const [documents, setDocuments] = useState();
1495
- const [problems, setProblems] = useState(propProblems ?? {});
1496
- const [loadingStatus, setLoadingStatus] = useState("success");
1497
- const [derivedProps, setDerivedProps] = useState();
1498
- const [trustedFields, setTrustedFields] = useState(
1499
- legalEntityResponse?.trustedFields ?? void 0
1500
- );
1501
- const defaultForms = useMemo(() => getForms(country), [country]);
1502
- const documentUtils = documentApiUtils({
1503
- baseUrl: baseUrl.value,
1504
- rootLegalEntityId: rootLegalEntityId.value
1505
- });
1506
- useEffect(() => {
1507
- if (!legalEntityResponse?.documentDetails?.length) return;
1508
- documentUtils.fetchDocuments(legalEntityResponse.documentDetails, legalEntityResponse?.id).then(() => {
1509
- setDocuments(mapApiDocumentToBusinessDetailsDocuments(legalEntityResponse?.id));
1510
- }).catch(() => {
1511
- showToast({
1512
- label: t(($) => $["failedToFetchRelevantDocuments"], { ns: "common" }),
1513
- variant: "error"
1514
- });
1515
- });
1516
- }, [legalEntityResponse.documentDetails, legalEntityResponse?.id]);
1517
- const parseConfiguration = useCallback(
1518
- ({ scenarios }) => composePerScenarioFormConfigurations(scenarios, businessDetailsFieldsPerScenario),
1519
- []
1520
- );
1521
- const { fieldConfigurations } = useScenarioConfiguration({
1522
- legalEntityType: LegalEntityTypes.ORGANIZATION,
1523
- parseConfiguration,
1524
- setLoadingStatus,
1525
- country
1526
- });
1527
- const defaultData = useMemo(
1528
- () => ({
1529
- ...mapLegalEntityToBusinessDetailsSchema(legalEntityResponse, {}, isExperimentEnabled),
1530
- ...documents
1531
- }),
1532
- [legalEntityResponse, documents, isExperimentEnabled]
1533
- );
1534
- const buildFieldValidations = useCallback(
1535
- (data) => {
1536
- const taxInfo = data?.basicInformation?.taxInformation ?? data?.additionalInformation?.taxInformation;
1537
- const taxIdType = taxInfo?.length ? taxInfo.find((taxId) => taxId.country === country)?.type : void 0;
1538
- const regNumberType = data?.basicInformation?.registrationNumberType ?? data?.additionalInformation?.registrationNumberType;
1539
- return {
1540
- basicInformation: basicInformationValidators({
1541
- country,
1542
- state: data?.basicInformation?.stateOrProvince,
1543
- companyType: data?.companyStructure?.entityType,
1544
- taxIdNumberType: taxIdType,
1545
- registrationNumberType: regNumberType,
1546
- isExperimentEnabled
1547
- }),
1548
- businessSelection: businessSelectionValidators(),
1549
- companyStructure: CompanyStructureValidation,
1550
- additionalInformation: additionalInformationValidators({
1551
- country,
1552
- taxIdNumberType: taxIdType,
1553
- companyType: data?.companyStructure?.entityType,
1554
- registrationNumberType: regNumberType,
1555
- vatNumberType: data?.additionalInformation?.vatNumberType,
1556
- isExperimentEnabled
1557
- }),
1558
- financialInformation: financialInfoValidationWithEmployeesRules
1559
- };
1560
- },
1561
- [country, isExperimentEnabled]
1562
- );
1563
- const multiForm = useMultiForm({
1564
- defaultData,
1565
- allFields: derivedProps?.allFields,
1566
- requiredFields: derivedProps?.requiredFields,
1567
- optionalFields: derivedProps?.optionalFields,
1568
- obscuredFields: derivedProps?.obscuredFields,
1569
- trustedFields: derivedProps?.trustedFields,
1570
- rules: buildFieldValidations
1571
- });
1572
- const isTinMatched = tinMatched.value;
1573
- const customRules = useMemo(
1574
- () => rules({
1575
- data: multiForm.data,
1576
- country,
1577
- taskType,
1578
- isExperimentEnabled,
1579
- isSettingEnabled,
1580
- accountHolder,
1581
- tinMatched: isTinMatched,
1582
- rootLegalEntity: legalEntityResponse
1583
- }),
1584
- [
1585
- multiForm.data,
1586
- country,
1587
- taskType,
1588
- isExperimentEnabled,
1589
- isSettingEnabled,
1590
- accountHolder,
1591
- isTinMatched,
1592
- legalEntityResponse
1593
- ]
1594
- );
1595
- useEffect(() => {
1596
- const props = getPropsFromConfigurations({
1597
- scenarioConfiguration: fieldConfigurations,
1598
- forms: defaultForms,
1599
- remediationActions: problems?.remediationActions ? Object.values(problems?.remediationActions) : [],
1600
- dataMissingErrors: problems?.missingData ?? [],
1601
- fieldsWithExistingData: getFieldsWithExistingData(
1602
- legalEntityResponse,
1603
- businessDetailsApiKeyMapping,
1604
- businessDetailsDocumentMapping
1605
- ),
1606
- customRules,
1607
- legalEntityType: legalEntityResponse?.type,
1608
- legalEntityTrustedFields: trustedFields
1609
- });
1610
- setDerivedProps(props);
1611
- }, [
1612
- customRules,
1613
- defaultForms,
1614
- fieldConfigurations,
1615
- legalEntityResponse,
1616
- problems?.missingData,
1617
- problems?.remediationActions,
1618
- trustedFields
1619
- ]);
1620
- const [prevCountry, setPrevCountry] = useState(multiForm.data.basicInformation?.country);
1621
- if (multiForm.data.basicInformation?.country && prevCountry !== multiForm.data.basicInformation?.country) {
1622
- setCountry(multiForm.data?.basicInformation?.country);
1623
- setPrevCountry(multiForm.data.basicInformation?.country);
1624
- setTrustedFields(void 0);
1625
- verifiedBusiness.value = void 0;
1626
- tinMatched.value = void 0;
1627
- businessMismatchModalOpen.value = false;
1628
- }
1629
- const [forms, setForms] = useState(
1630
- buildRequiredForms({
1631
- config: {
1632
- country,
1633
- forms: defaultForms,
1634
- requiredFields: derivedProps?.requiredFields,
1635
- optionalFields: derivedProps?.optionalFields,
1636
- isValid: multiForm.isValid ?? {},
1637
- problems
1638
- },
1639
- options: {
1640
- hasNoSearchResults: false
1641
- }
1642
- })
1643
- );
1644
- const updateForms = useCallback(
1645
- ({ searchResults }) => {
1646
- const updatedForms = buildRequiredForms({
1647
- config: {
1648
- country,
1649
- forms: defaultForms,
1650
- requiredFields: derivedProps?.requiredFields,
1651
- optionalFields: derivedProps?.optionalFields,
1652
- isValid: multiForm.isValid ?? {},
1653
- problems
1654
- },
1655
- options: {
1656
- hasNoSearchResults: searchResults && !searchResults.length
1657
- }
1658
- });
1659
- setForms(updatedForms);
1660
- return updatedForms;
1661
- },
1662
- [
1663
- country,
1664
- defaultForms,
1665
- derivedProps?.optionalFields,
1666
- derivedProps?.requiredFields,
1667
- multiForm.isValid,
1668
- problems
1669
- ]
1670
- );
1671
- const summaryData = useMemo(
1672
- () => formatDataForSummary(multiForm.data, forms, t, i18n.language, isExperimentEnabled),
1673
- [multiForm.data, forms, t, i18n.language, isExperimentEnabled]
1674
- );
1675
- const associatedLeTrackingParams = useMemo(
1676
- () => getAssociatedLeAnalyticsPayload({
1677
- associatedLegalEntity: associatedLegalArrangement
1678
- }),
1679
- [associatedLegalArrangement]
1680
- );
1681
- const handleTrackNavigation = useCallback(
1682
- (props) => {
1683
- trackNavigation({
1684
- ...props,
1685
- additionalTrackingParams: associatedLeTrackingParams
1686
- });
1687
- },
1688
- [associatedLeTrackingParams]
1689
- );
1690
- const submitTask = useCallback(() => {
1691
- setAccountHolder(accountHolder);
1692
- return submit({
1693
- additionalTrackingParams: associatedLeTrackingParams,
1694
- data: multiForm.data,
1695
- legalEntityResponse,
1696
- associatedLegalArrangement,
1697
- nestedLegalEntity,
1698
- nestedLegalEntityDetails,
1699
- problems,
1700
- taskType: taskType ?? TaskTypes.BUSINESS_DETAILS,
1701
- accountHolder: accountHolder ?? "theCompanyIWorkFor",
1702
- forms,
1703
- documentUtils,
1704
- t,
1705
- showToast,
1706
- setLoadingStatus,
1707
- setProblems,
1708
- handleUpdateLegalEntity: updateLegalEntity,
1709
- createLegalEntity,
1710
- onExternalSubmit,
1711
- isExperimentEnabled,
1712
- userEvents
1713
- });
1714
- }, [
1715
- setAccountHolder,
1716
- accountHolder,
1717
- associatedLeTrackingParams,
1718
- multiForm.data,
1719
- legalEntityResponse,
1720
- associatedLegalArrangement,
1721
- nestedLegalEntity,
1722
- nestedLegalEntityDetails,
1723
- problems,
1724
- taskType,
1725
- forms,
1726
- documentUtils,
1727
- t,
1728
- showToast,
1729
- updateLegalEntity,
1730
- createLegalEntity,
1731
- onExternalSubmit,
1732
- isExperimentEnabled,
1733
- userEvents
1734
- ]);
1735
- const {
1736
- handleNextClick,
1737
- handleBackClick,
1738
- activeForm,
1739
- shouldValidate,
1740
- gotoFormByFormIndex,
1741
- steps
1742
- } = useFormComposer({
1743
- problems,
1744
- navigationTrackingParams: associatedLeTrackingParams,
1745
- forms,
1746
- onSubmit: submitTask,
1747
- triggerValidation: multiForm.triggerValidation
1748
- });
1749
- const handleBusinessMismatchContinue = () => {
1750
- setTrustedFields([]);
1751
- businessMismatchModalOpen.value = false;
1752
- const currentForms = updateForms({});
1753
- handleNextClick(currentForms);
1754
- };
1755
- const handleBusinessMismatchCancel = () => {
1756
- handleBackClick?.();
1757
- businessMismatchModalOpen.value = false;
1758
- tinMatched.value = false;
1759
- };
1760
- const companySearchQueryInput = {
1761
- name: multiForm.data?.basicInformation?.legalCompanyName ?? "",
1762
- country: multiForm.data?.basicInformation?.country,
1763
- state: multiForm.data?.basicInformation?.stateOrProvince,
1764
- registrationNumber: multiForm.data?.basicInformation?.registrationNumber
1765
- };
1766
- const verifyTinQueryInput = {
1767
- name: multiForm.data.basicInformation?.legalCompanyName ?? "",
1768
- tin: multiForm.data?.basicInformation?.taxInformation?.find((taxId) => taxId.country === country)?.number ?? ""
1769
- };
1770
- const { data: companySearchResponse, isError: searchingError } = useCompanySearch(
1771
- companySearchQueryInput,
1772
- {
1773
- enabled: false
1774
- }
1775
- );
1776
- useVerifyTin(verifyTinQueryInput, { enabled: false });
1777
- const companySelectionInput = {
1778
- company: companySearchResponse?.results[0],
1779
- state: multiForm.data.basicInformation?.stateOrProvince,
1780
- name: multiForm.data?.basicInformation?.legalCompanyName ?? "",
1781
- tin: multiForm.data?.basicInformation?.taxInformation?.find((taxId) => taxId.country === country)?.number ?? ""
1782
- };
1783
- useCompanySelection(companySelectionInput, {
1784
- enabled: false
1785
- });
1786
- const attemptBusinessSearch = async () => {
1787
- try {
1788
- setLoadingStatus("loading");
1789
- tinMatched.value = void 0;
1790
- verifiedBusiness.value = void 0;
1791
- isVerifiedSingleCompanySearchResult.value = false;
1792
- const searchResponse = await queryClient.fetchQuery({
1793
- queryKey: ["companySearch", companySearchQueryInput]
1794
- });
1795
- let currentForms = updateForms({ searchResults: searchResponse.results });
1796
- const handleTinResponse = (matched) => {
1797
- if (matched) {
1798
- tinMatched.value = true;
1799
- } else {
1800
- businessMismatchModalOpen.value = true;
1801
- tinMatched.value = false;
1802
- }
1803
- return tinMatched.value;
1804
- };
1805
- if (searchResponse?.results.length === 1 && isNormalizedStringMatch(
1806
- multiForm.data?.basicInformation?.legalCompanyName ?? "",
1807
- searchResponse.results[0].name
1808
- )) {
1809
- const companySelectionResponse = await queryClient.fetchQuery({
1810
- queryKey: [
1811
- "companySelection",
1812
- { ...companySelectionInput, company: searchResponse.results[0] }
1813
- ]
1814
- });
1815
- if (handleTinResponse(!!companySelectionResponse.tinMatched)) {
1816
- verifiedBusiness.value = companySelectionResponse;
1817
- isVerifiedSingleCompanySearchResult.value = true;
1818
- currentForms = updateForms({ searchResults: searchResponse.results });
1819
- } else {
1820
- return setLoadingStatus("success");
1821
- }
1822
- }
1823
- if (!searchResponse.results.length) {
1824
- const tinVerificationResponse = await queryClient.fetchQuery({
1825
- queryKey: ["verifyTin", verifyTinQueryInput]
1826
- });
1827
- if (!handleTinResponse(!!tinVerificationResponse?.matched)) {
1828
- return setLoadingStatus("success");
1829
- }
1830
- }
1831
- setLoadingStatus("success");
1832
- return handleNextClick(currentForms);
1833
- } catch (e) {
1834
- setLoadingStatus("error");
1835
- if (e instanceof Error && e.message === KOMPANY_SEARCH_FAILURE) {
1836
- const currentForms = updateForms({ searchResults: [] });
1837
- return handleNextClick(currentForms);
1838
- }
1839
- }
1840
- };
1841
- const overrideNextClick = async () => {
1842
- if (!activeForm.isValid) return handleNextClick();
1843
- if (!COUNTRIES_USING_COMPANY_SEARCH.includes(country)) {
1844
- return handleNextClick();
1845
- }
1846
- switch (activeForm.formId) {
1847
- case "basicInformation": {
1848
- return await attemptBusinessSearch();
1849
- }
1850
- case "businessSelection": {
1851
- const currentForms = updateForms({
1852
- searchResults: companySearchResponse?.results
1853
- });
1854
- return handleNextClick(currentForms);
1855
- }
1856
- default:
1857
- return handleNextClick();
1858
- }
1859
- };
1860
- useEffect(() => {
1861
- updateForms({
1862
- searchResults: searchingError ? [] : companySearchResponse?.results
1863
- });
1864
- }, [updateForms, companySearchResponse?.results, searchingError]);
1865
- return /* @__PURE__ */ jsx(FormContextProvider, { form: multiForm, children: /* @__PURE__ */ jsxs(
1866
- FormFlow,
1867
- {
1868
- summary: {
1869
- data: summaryData,
1870
- omitted: {
1871
- keys: ["operationalAddressIsSame"],
1872
- forms: ["businessSelection"]
1873
- },
1874
- problems,
1875
- trackNavigation: handleTrackNavigation,
1876
- showLegalCaption: true
1877
- },
1878
- asModal,
1879
- currentStep: steps.current,
1880
- totalSteps: steps.total,
1881
- forms,
1882
- disableNextButton: activeForm.formId === "businessSelection",
1883
- gotoFormByFormIndex,
1884
- handleNextClick: overrideNextClick,
1885
- handleBackClick,
1886
- handleCancelClick: handleHomeClick,
1887
- loadingStatus,
1888
- children: [
1889
- /* @__PURE__ */ jsx(
1890
- BusinessDetailsMultiform,
1891
- {
1892
- taskType,
1893
- activeForm,
1894
- country,
1895
- shouldValidate,
1896
- problems,
1897
- handleNextClick: overrideNextClick,
1898
- handleBackClick,
1899
- setLoadingStatus
1900
- }
1901
- ),
1902
- businessMismatchModalOpen.value && /* @__PURE__ */ jsx(
1903
- Confirm,
1904
- {
1905
- title: t(($) => $["businessSelection__tinVerificationFailureModalHeader"], {
1906
- ns: "business"
1907
- }),
1908
- description: t(($) => $["businessSelection__tinVerificationFailureModalContent"], {
1909
- ns: "business"
1910
- }),
1911
- cancelText: t(
1912
- ($) => $["businessSelection__tinVerificationFailureModalSecondaryButton"],
1913
- { ns: "business" }
1914
- ),
1915
- confirmText: t(
1916
- ($) => $["businessSelection__tinVerificationFailureModalPrimaryButton"],
1917
- { ns: "business" }
1918
- ),
1919
- onCancel: handleBusinessMismatchCancel,
1920
- onConfirm: handleBusinessMismatchContinue
1921
- }
1922
- )
1923
- ]
1924
- }
1925
- ) });
1926
- }
1927
- const RootBusinessDetailsPage = ({
1928
- isTargetLegalEntityType = false,
1929
- onSubmit,
1930
- handleHomeClick
1931
- }) => {
1932
- const { i18n } = useTranslation();
1933
- const { accountHolder } = useAccountHolder();
1934
- const { data: rootLe } = useLegalEntity(ROOT_LE);
1935
- const capabilityProblems = useCapabilityProblems();
1936
- const { isExperimentEnabled } = useExperimentsContext();
1937
- addResourceBundles(i18n, i18n.language, [
1938
- { ns: "business", importFn: () => __variableDynamicImportRuntimeHelper(/* @__PURE__ */ Object.assign({ "../language/bg-BG.json": () => import("./bg-BG-B8A8D_hg.js"), "../language/cs-CZ.json": () => import("./cs-CZ-B7A0WNBx.js"), "../language/da-DK.json": () => import("./da-DK-9M2wm0kt.js"), "../language/de-DE.json": () => import("./de-DE-CLuLBUrb.js"), "../language/el-GR.json": () => import("./el-GR-BN7mIwED.js"), "../language/en-US.json": () => import("./en-US-BWtUZoXL.js"), "../language/es-ES.json": () => import("./es-ES-i_Fk7A9r.js"), "../language/et-EE.json": () => import("./et-EE-DKJ8Kn8O.js"), "../language/fi-FI.json": () => import("./fi-FI-CF4-CyIe.js"), "../language/fr-FR.json": () => import("./fr-FR-C4LPqbx5.js"), "../language/hr-HR.json": () => import("./hr-HR-TslbqIeE.js"), "../language/hu-HU.json": () => import("./hu-HU-CgBQ5Skc.js"), "../language/it-IT.json": () => import("./it-IT-BXsakLEg.js"), "../language/ja-JP.json": () => import("./ja-JP-B--vgrAi.js"), "../language/lt-LT.json": () => import("./lt-LT-UnMr3oB3.js"), "../language/lv-LV.json": () => import("./lv-LV-C54zKY0H.js"), "../language/nl-NL.json": () => import("./nl-NL-A444CaCG.js"), "../language/no-NO.json": () => import("./no-NO-D57T2p2M.js"), "../language/pl-PL.json": () => import("./pl-PL-B3RxZ32y.js"), "../language/pt-BR.json": () => import("./pt-BR-CjfX1fDM.js"), "../language/pt-PT.json": () => import("./pt-PT-D79GMAC5.js"), "../language/ro-RO.json": () => import("./ro-RO-Dj-2um-k.js"), "../language/sk-SK.json": () => import("./sk-SK-JN-Ll7bm.js"), "../language/sl-SI.json": () => import("./sl-SI-nUZNETVU.js"), "../language/sv-SE.json": () => import("./sv-SE-8dFj9z4D.js") }), `../language/${i18n.language}.json`, 3) },
1939
- {
1940
- ns: "businessLines",
1941
- importFn: () => __variableDynamicImportRuntimeHelper(/* @__PURE__ */ Object.assign({ "../../BusinessLines/language/bg-BG.json": () => import("./bg-BG-B37z4fjM.js"), "../../BusinessLines/language/cs-CZ.json": () => import("./cs-CZ-2D8o2KB0.js"), "../../BusinessLines/language/da-DK.json": () => import("./da-DK-CplImqOX.js"), "../../BusinessLines/language/de-DE.json": () => import("./de-DE-DNOzlYEY.js"), "../../BusinessLines/language/el-GR.json": () => import("./el-GR-DAFcmbwE.js"), "../../BusinessLines/language/en-US.json": () => import("./en-US-CEc3gxgl.js"), "../../BusinessLines/language/es-ES.json": () => import("./es-ES-BPI-KmDv.js"), "../../BusinessLines/language/et-EE.json": () => import("./et-EE-CMXpGRz8.js"), "../../BusinessLines/language/fi-FI.json": () => import("./fi-FI-C5SwgUIc.js"), "../../BusinessLines/language/fr-FR.json": () => import("./fr-FR-CAqqgh3X.js"), "../../BusinessLines/language/hr-HR.json": () => import("./hr-HR-oTvJUvqr.js"), "../../BusinessLines/language/hu-HU.json": () => import("./hu-HU-DA-bZKop.js"), "../../BusinessLines/language/it-IT.json": () => import("./it-IT-CpKAGuyU.js"), "../../BusinessLines/language/ja-JP.json": () => import("./ja-JP-C4569I8p.js"), "../../BusinessLines/language/lt-LT.json": () => import("./lt-LT-DfJ0ojxY.js"), "../../BusinessLines/language/lv-LV.json": () => import("./lv-LV-d0ldbfMh.js"), "../../BusinessLines/language/nl-NL.json": () => import("./nl-NL-DdVmtkAu.js"), "../../BusinessLines/language/no-NO.json": () => import("./no-NO-C0WUoV9N.js"), "../../BusinessLines/language/pl-PL.json": () => import("./pl-PL-Byfw9EGz.js"), "../../BusinessLines/language/pt-BR.json": () => import("./pt-BR-DUUAs_Pm.js"), "../../BusinessLines/language/pt-PT.json": () => import("./pt-PT-BVZxK7ae.js"), "../../BusinessLines/language/ro-RO.json": () => import("./ro-RO-Ck3Azc56.js"), "../../BusinessLines/language/sk-SK.json": () => import("./sk-SK-jxAlqkeI.js"), "../../BusinessLines/language/sl-SI.json": () => import("./sl-SI-CjvFCQ3H.js"), "../../BusinessLines/language/sv-SE.json": () => import("./sv-SE-CSjJPRt1.js") }), `../../BusinessLines/language/${i18n.language}.json`, 5)
1942
- }
1943
- ]);
1944
- if (!rootLe) {
1945
- return /* @__PURE__ */ jsx(Loader, {});
1946
- }
1947
- const hasTrust = accountHolder === "aTrust" || isPartOfTrustFromLegalEntity(rootLe);
1948
- const problems = capabilityProblems ? getProblemsForEntity(capabilityProblems, EntityTypes.LEGAL_ENTITY, rootLe.id) : void 0;
1949
- return isExperimentEnabled("EnableBusinessDetailsMultiForm") ? /* @__PURE__ */ jsx(
1950
- BusinessDetailsMultiformDropin,
1951
- {
1952
- taskType: TaskTypes.BUSINESS_DETAILS,
1953
- taskName: hasTrust ? "businessTrusteeDetails" : "businessDetails",
1954
- legalEntityResponse: rootLe,
1955
- problems,
1956
- country: getLegalEntityCountry(rootLe),
1957
- isTargetLegalEntityType,
1958
- onSubmit,
1959
- handleHomeClick
1960
- }
1961
- ) : /* @__PURE__ */ jsx(
1962
- BusinessDetailsDropin,
1963
- {
1964
- taskType: TaskTypes.BUSINESS_DETAILS,
1965
- taskName: hasTrust ? "businessTrusteeDetails" : "businessDetails",
1966
- legalEntityResponse: rootLe,
1967
- problems,
1968
- country: getLegalEntityCountry(rootLe),
1969
- isTargetLegalEntityType,
1970
- onSubmit,
1971
- handleHomeClick
1972
- }
1973
- );
1974
- };
1975
- export {
1976
- RootBusinessDetailsPage
1977
- };