@adyen/kyc-components 4.0.0 → 4.2.0-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1393) hide show
  1. package/README.md +43 -30
  2. package/dist/4-people-BtDi7O9A.js +24 -0
  3. package/dist/AcceptTermsOfServiceComponent-DBf9qvsO.js +650 -0
  4. package/dist/Accordion-CqtzWVjL.js +88 -0
  5. package/dist/AccountSetupRejected-B_bbYtM2.js +26 -0
  6. package/dist/ActionBar-Dnv6j3rc.js +31 -0
  7. package/dist/Address-CbJvGOYV.js +1112 -0
  8. package/dist/Alert-uX8GYjqW.js +169 -0
  9. package/dist/Avatar-Cj2W0_1v.js +60 -0
  10. package/dist/BG-HKzabLqZ.js +27 -0
  11. package/dist/BusinessFinancingComponent-Bx2K8iN3.js +55 -0
  12. package/dist/BusinessFinancingDropin-CKsHfJ2J.js +2235 -0
  13. package/dist/BusinessFinancingPage-DmnaOPvo.js +43 -0
  14. package/dist/BusinessTypeSelectionPage-Bz0czSjO.js +440 -0
  15. package/dist/Card-OQuFzmxm.js +90 -0
  16. package/dist/Checkbox-BSxszx-9.js +74 -0
  17. package/dist/Confirm-DviRmz4e.js +64 -0
  18. package/dist/ConstitutionalDocument-hcS_-kxn.js +2361 -0
  19. package/dist/ContactDetails-BHn4lDFA.js +396 -0
  20. package/dist/ContextGuidance-BgMTeWIT.js +34 -0
  21. package/dist/ContractViewer-DcQHIGMU.js +935 -0
  22. package/dist/CountryField-D-WDIPSz.js +66 -0
  23. package/dist/CreateIndividualComponent-BJnGALzE.js +65 -0
  24. package/dist/CreateTransferInstrumentComponent-BudZmP_i.js +56 -0
  25. package/dist/Currency-BmTfhWzY.js +238 -0
  26. package/dist/CustomerSupport-C5g_pNY4.js +156 -0
  27. package/dist/DebugModal-C46w3DN5.js +416 -0
  28. package/dist/DecisionMakerDetailsPage-CMDK81px.js +104 -0
  29. package/dist/DecisionMakers-BbHkdcWY.js +858 -0
  30. package/dist/Dropzone-DMzbyRRZ.js +224 -0
  31. package/dist/EmbeddedStatus-Cto-qd3u.js +97 -0
  32. package/dist/EndStateLayout-Ds-6EhEu.js +71 -0
  33. package/dist/EntityAssociation-CAyTgh0S.js +178 -0
  34. package/dist/EntityGuidanceStatus-BdYW3yoc.js +106 -0
  35. package/dist/ErrorPanel-Doqj6bY8.js +194 -0
  36. package/dist/Field-CpaVW2RZ.js +141 -0
  37. package/dist/FormNavigation-D8lokOpO.js +144 -0
  38. package/dist/FormWrapper--B4boODe.js +135 -0
  39. package/dist/Header-hKHJmYRN.js +83 -0
  40. package/dist/Image-DIxxTupT.js +27 -0
  41. package/dist/Individual.rules-BAgQIMbK.js +383 -0
  42. package/dist/IndividualDropin-CpAEsMsL.js +5168 -0
  43. package/dist/InputDate-CoQAEyvT.js +43 -0
  44. package/dist/InputGroup-WBfGDV5F.js +32 -0
  45. package/dist/InputText-DmFCHVKa.js +134 -0
  46. package/dist/Introduction-DlnfG2qx.js +256 -0
  47. package/dist/JpAddress-D9wzTLlZ.js +329 -0
  48. package/dist/LandingLayout-pnTFiHf3.js +60 -0
  49. package/dist/LegalCompanyNameField-BOTkQIk6.js +138 -0
  50. package/dist/LegalRepresentativeDetailsPage-CnYE0t7-.js +55 -0
  51. package/dist/Link-B1s8_T7-.js +35 -0
  52. package/dist/List-BAzyC6sw.js +83 -0
  53. package/dist/ListItem-Coa9aGdN.js +69 -0
  54. package/dist/LoaderWrapper-YTarCjI9.js +42 -0
  55. package/dist/ManageIndividualComponent-D_RLxMfQ.js +46 -0
  56. package/dist/ManageTermsOfServiceComponent-VzhHb2cE.js +52 -0
  57. package/dist/ManageTransferInstrumentComponent-DevLP2pk.js +292 -0
  58. package/dist/MaskedInput-DEaltj9a.js +811 -0
  59. package/dist/MaybeModal-BcNIbjko.js +36 -0
  60. package/dist/Modal-sn2wYRN6.js +147 -0
  61. package/dist/Name-0TfRqG2t.js +81 -0
  62. package/dist/OnboardingDropinComponent-xFXjVEe0.js +2672 -0
  63. package/dist/PayoutDetailsDropin-popMzwBb.js +4972 -0
  64. package/dist/ProgressBar-B7gTQncy.js +47 -0
  65. package/dist/Radio-BMtxBpnn.js +39 -0
  66. package/dist/RadioGroup-B7fMJqmd.js +100 -0
  67. package/dist/RadioGroupCard-BqnCzi0b.js +152 -0
  68. package/dist/Review-DiV6r3gZ.js +84 -0
  69. package/dist/RootBusinessDetailsPage-BfQ4Pwdu.js +50 -0
  70. package/dist/RootBusinessLinesPage-CiZs8smP.js +1553 -0
  71. package/dist/RootIndividualDetailsPage-C92QtbjO.js +62 -0
  72. package/dist/Select-Cb77B0ji.js +868 -0
  73. package/dist/SignPCIComponent-B83OWndG.js +307 -0
  74. package/dist/SingpassSelection-Cc-ulD5h.js +132 -0
  75. package/dist/SoleProprietorshipPage-BYZkXtGh.js +50 -0
  76. package/dist/SourceOfFundsPage-DorVNEQ9.js +2162 -0
  77. package/dist/Spacer-BK3jDget.js +18 -0
  78. package/dist/StepProgressIndicator-DJ9FpFXO.js +78 -0
  79. package/dist/StoreProvider-qjyWZhxu.js +4845 -0
  80. package/dist/StructuredList-BNLhk_zV.js +61 -0
  81. package/dist/Summary-Bgq_Kcjg.js +220 -0
  82. package/dist/TaskVerificationStatus-DOZKjK09.js +129 -0
  83. package/dist/TaxInformationField-Dxx36AGr.js +3735 -0
  84. package/dist/TaxReportingDropin-tQf3UTtj.js +503 -0
  85. package/dist/TextArea-B4QNgWAM.js +103 -0
  86. package/dist/TileGroup-Dwrh9ZxO.js +203 -0
  87. package/dist/TrustDetailsPage-CKFlO2Ug.js +2187 -0
  88. package/dist/TrustMemberCompanyPage-BeeQ4TlK.js +68 -0
  89. package/dist/TrustMemberIndividualPage-cPDpa-cf.js +64 -0
  90. package/dist/TrustMemberRoleAndTypePage-C_isMpuS.js +1081 -0
  91. package/dist/TrustMembersOverview-CixBpWbT.js +439 -0
  92. package/dist/UnincorporatedPartnershipIndividualPage-BvVu1mfm.js +63 -0
  93. package/dist/UnincorporatedPartnershipMemberCompanyPage-HFF2AWev.js +71 -0
  94. package/dist/UnincorporatedPartnershipMemberRoleAndTypePage-DWRiDapM.js +292 -0
  95. package/dist/UnincorporatedPartnershipMembersOverview-BgxWBXQP.js +173 -0
  96. package/dist/VerificationErrorAlert-DjNgDy5_.js +60 -0
  97. package/dist/ViewVerificationStatusComponent-BZWz8bMd.js +181 -0
  98. package/dist/accountHolderUtils-dRujT8-D.js +66 -0
  99. package/dist/adyen-business-financing.js +13 -5
  100. package/dist/adyen-individual-configuration.js +8 -4
  101. package/dist/adyen-individual-status.js +5 -4
  102. package/dist/adyen-invited-decision-maker.js +87 -0
  103. package/dist/adyen-kyc-components.js +23 -21
  104. package/dist/adyen-onboarding.js +8 -4
  105. package/dist/adyen-terms-of-service-management.js +8 -4
  106. package/dist/adyen-terms-of-service-status.js +5 -4
  107. package/dist/adyen-transfer-instrument-configuration.js +8 -4
  108. package/dist/adyen-transfer-instrument-management.js +5 -4
  109. package/dist/adyen-verification-status.js +8 -4
  110. package/dist/arrow-right-BoqwUH_d.js +14 -0
  111. package/dist/bafinUtils-CyvEB6AP.js +80 -0
  112. package/dist/bag-BXVWLrwo.js +14 -0
  113. package/dist/bank-1GvaHPAZ.js +14 -0
  114. package/dist/bg-BG-6XzbmxcW.js +13 -0
  115. package/dist/bg-BG-C6kad3Qr.js +61 -0
  116. package/dist/bg-BG-CEipapl4.js +63 -0
  117. package/dist/bg-BG-CFuVZnaC.js +13 -0
  118. package/dist/bg-BG-DAqp35Dx.js +13 -0
  119. package/dist/bg-BG-DMNRRZZE.js +75 -0
  120. package/dist/bg-BG-DyX-yYYI.js +13 -0
  121. package/dist/bg-BG-K7feXvEc.js +38 -0
  122. package/dist/bg-BG-zZhDshGi.js +65 -0
  123. package/dist/bin-Ba-3ll8T.js +18 -0
  124. package/dist/business-lines-BAqTbnBw.js +135 -0
  125. package/dist/capital-9TKHySO7.js +17 -0
  126. package/dist/cash-stack-DwYu4xNy.js +22 -0
  127. package/dist/certificate-N2YFedpI.js +17 -0
  128. package/dist/checkmark-D9dGhGpG.js +14 -0
  129. package/dist/checkmark-circle-CFWClLQ6.js +20 -0
  130. package/dist/checkmark-circle-fill-DEB-tuGl.js +17 -0
  131. package/dist/checkmark-small-D3VNx2lo.js +14 -0
  132. package/dist/chevron-down-C7SUSYfl.js +14 -0
  133. package/dist/chevron-left-BXmd-S46.js +14 -0
  134. package/dist/chevron-right-jE6RwM2B.js +14 -0
  135. package/dist/chevron-up-BdfNcqzq.js +14 -0
  136. package/dist/circle-BJPTMCWB.js +17 -0
  137. package/dist/circle-small-filled-BuO8Vg8j.js +14 -0
  138. package/dist/clock-DAzaBRWk.js +20 -0
  139. package/dist/coins-DYdzG5e_.js +17 -0
  140. package/dist/commonValidators-C9eSN1bv.js +24 -0
  141. package/dist/company-types-value-D_mKv5PT.js +23 -0
  142. package/dist/contract-BfJb1t6M.js +14 -0
  143. package/dist/cross-CDS_eot4.js +14 -0
  144. package/dist/cross-circle-fill-C-EJ57Yn.js +17 -0
  145. package/dist/cross-circle-fill-small-DkPjsuBH.js +14 -0
  146. package/dist/cs-CZ-BD5bYeuJ.js +13 -0
  147. package/dist/cs-CZ-BHbWTH_v.js +63 -0
  148. package/dist/cs-CZ-C6vEQ8P9.js +13 -0
  149. package/dist/cs-CZ-CYQO0o5V.js +38 -0
  150. package/dist/cs-CZ-CYsR__kj.js +13 -0
  151. package/dist/cs-CZ-C_GFp3nV.js +61 -0
  152. package/dist/cs-CZ-Ck22NTT9.js +65 -0
  153. package/dist/cs-CZ-DXSMRqPu.js +75 -0
  154. package/dist/cs-CZ-Ke47w0bj.js +13 -0
  155. package/dist/currency-CrdnaaDu.js +35 -0
  156. package/dist/da-DK-B3Pg-MWO.js +13 -0
  157. package/dist/da-DK-C60mLiV1.js +61 -0
  158. package/dist/da-DK-CGWvmdkq.js +38 -0
  159. package/dist/da-DK-Cd5IQPv3.js +75 -0
  160. package/dist/da-DK-Cx4-hLO1.js +13 -0
  161. package/dist/da-DK-DQ4ZYSea.js +65 -0
  162. package/dist/da-DK-DzcTI92X.js +13 -0
  163. package/dist/da-DK-h8DYQ_Iq.js +13 -0
  164. package/dist/da-DK-vcVNQJbX.js +63 -0
  165. package/dist/datasetUtil-BHQp0-xL.js +58 -0
  166. package/dist/de-DE-C9NH2zMh.js +75 -0
  167. package/dist/de-DE-CL8D8vKZ.js +13 -0
  168. package/dist/de-DE-CWEW2yqg.js +63 -0
  169. package/dist/de-DE-CkbOZ6S_.js +65 -0
  170. package/dist/de-DE-Cvz1TGdB.js +61 -0
  171. package/dist/de-DE-DHDJhahG.js +38 -0
  172. package/dist/de-DE-LQE_LFFL.js +13 -0
  173. package/dist/de-DE-S6qDey1L.js +13 -0
  174. package/dist/de-DE-dPfrbCii.js +13 -0
  175. package/dist/debouncedInputEvent-Cv2S512Y.js +46 -0
  176. package/dist/decision-makers-group-DrvpnEqj.js +1944 -0
  177. package/dist/digital-wallet-Bx5YM1LY.js +46 -0
  178. package/dist/document-1-qlSTF558.js +14 -0
  179. package/dist/document-blurred-BiWap0xs.js +37 -0
  180. package/dist/document-cut-off-aQezqOif.js +32 -0
  181. package/dist/document-expired-BhBXaWWQ.js +38 -0
  182. package/dist/document-front-DYuhZGeQ.js +30 -0
  183. package/dist/document-person-CDbnTOdV.js +20 -0
  184. package/dist/download-BZQB1WkZ.js +17 -0
  185. package/dist/dropinUtils-CAGEedke.js +200 -0
  186. package/dist/edit-1-DAqtnOIx.js +14 -0
  187. package/dist/el-GR-B78b9rSH.js +63 -0
  188. package/dist/el-GR-DGbzdIL0.js +13 -0
  189. package/dist/el-GR-DHNlnOwf.js +38 -0
  190. package/dist/el-GR-DSlgFwLb.js +61 -0
  191. package/dist/el-GR-DTHQslLc.js +75 -0
  192. package/dist/el-GR-Dazirlmt.js +13 -0
  193. package/dist/el-GR-DoS_Va-n.js +13 -0
  194. package/dist/el-GR-DudORw4U.js +65 -0
  195. package/dist/el-GR-Dvv3-Qib.js +13 -0
  196. package/dist/en-US-AgtwE4Fl.js +63 -0
  197. package/dist/en-US-BSQXKu6d.js +54 -0
  198. package/dist/en-US-CjjPhkB5.js +65 -0
  199. package/dist/en-US-D1sB335h.js +61 -0
  200. package/dist/en-US-DLY20x1O.js +13 -0
  201. package/dist/en-US-DoiQhi0j.js +38 -0
  202. package/dist/en-US-G607HIyo.js +75 -0
  203. package/dist/en-US-cVpRgdC8.js +13 -0
  204. package/dist/es-ES--IvNed_Q.js +13 -0
  205. package/dist/es-ES-BAolMrZ0.js +65 -0
  206. package/dist/es-ES-BYl5-PFR.js +13 -0
  207. package/dist/es-ES-CDgjGql5.js +63 -0
  208. package/dist/es-ES-CxnsKEh4.js +38 -0
  209. package/dist/es-ES-DK-7qtDf.js +75 -0
  210. package/dist/es-ES-DdGmXdxO.js +13 -0
  211. package/dist/es-ES-Dj5-YMmZ.js +61 -0
  212. package/dist/es-ES-Vn4AcK9-.js +13 -0
  213. package/dist/et-EE-4fHYOoff.js +13 -0
  214. package/dist/et-EE-BOIrYrz9.js +65 -0
  215. package/dist/et-EE-BQixWUEV.js +38 -0
  216. package/dist/et-EE-BeZJ4Ub1.js +13 -0
  217. package/dist/et-EE-Bij5j-z5.js +61 -0
  218. package/dist/et-EE-CsTXSlnY.js +13 -0
  219. package/dist/et-EE-D0PMC4ie.js +63 -0
  220. package/dist/et-EE-D5SNtVsM.js +13 -0
  221. package/dist/et-EE-DNC4hcxm.js +75 -0
  222. package/dist/external-link-Cg6pJaSJ.js +14 -0
  223. package/dist/fi-FI-57-xkioo.js +38 -0
  224. package/dist/fi-FI-B2xHiSHi.js +61 -0
  225. package/dist/fi-FI-BJLU1JHw.js +75 -0
  226. package/dist/fi-FI-BUixKfXH.js +13 -0
  227. package/dist/fi-FI-CIYa9SyS.js +13 -0
  228. package/dist/fi-FI-CWIaV6Iz.js +13 -0
  229. package/dist/fi-FI-CsZlDJFb.js +63 -0
  230. package/dist/fi-FI-D8WrLxxq.js +65 -0
  231. package/dist/fi-FI-DFxljML-.js +13 -0
  232. package/dist/fieldConfigurations-BUT9DTUH.js +21 -0
  233. package/dist/filterProblemsByTaskForms-Cz7iQtms.js +30 -0
  234. package/dist/form-rules-DhbF2mY4.js +13 -0
  235. package/dist/formUtils-BYIcPMjp.js +107 -0
  236. package/dist/fr-FR-B2je0smB.js +75 -0
  237. package/dist/fr-FR-BM-qNLci.js +13 -0
  238. package/dist/fr-FR-Beljeilc.js +65 -0
  239. package/dist/fr-FR-BxiX8Zfi.js +38 -0
  240. package/dist/fr-FR-CCb4Oux7.js +13 -0
  241. package/dist/fr-FR-CNQtWSXx.js +61 -0
  242. package/dist/fr-FR-DPehHVb6.js +13 -0
  243. package/dist/fr-FR-VoxPkXSc.js +63 -0
  244. package/dist/fr-FR-l5z31r7i.js +13 -0
  245. package/dist/funds-in-CInoUdmG.js +21 -0
  246. package/dist/getName-BIUEu4TI.js +41 -0
  247. package/dist/getProblemsForEntity-BFrbrf8n.js +24 -0
  248. package/dist/getProps-Cc3J2-z9.js +148 -0
  249. package/dist/getTrustedFields-C5-mXl-l.js +64 -0
  250. package/dist/gift-omNInZeB.js +14 -0
  251. package/dist/graph-DunG_uu1.js +21 -0
  252. package/dist/graph-up-BZze4i6m.js +20 -0
  253. package/dist/headquarter-BhpSibFO.js +21 -0
  254. package/dist/hotel-Cp7VgGCJ.js +22 -0
  255. package/dist/house-BhyBQdR3.js +21 -0
  256. package/dist/hr-HR-B6U5Rzzw.js +61 -0
  257. package/dist/hr-HR-BAI0N9bo.js +13 -0
  258. package/dist/hr-HR-BF74vdPD.js +13 -0
  259. package/dist/hr-HR-Bjx-KdVs.js +13 -0
  260. package/dist/hr-HR-BtowKWUi.js +13 -0
  261. package/dist/hr-HR-BynZTNSB.js +38 -0
  262. package/dist/hr-HR-C0NLgF1r.js +75 -0
  263. package/dist/hr-HR-CbdP2tk-.js +63 -0
  264. package/dist/hr-HR-lIHN6Yl2.js +65 -0
  265. package/dist/hu-HU-B-lUkFnQ.js +13 -0
  266. package/dist/hu-HU-BLLoj5CX.js +61 -0
  267. package/dist/hu-HU-BpNDP1I8.js +13 -0
  268. package/dist/hu-HU-BtRIDozk.js +38 -0
  269. package/dist/hu-HU-CWdwNCev.js +65 -0
  270. package/dist/hu-HU-DU-5ujQK.js +75 -0
  271. package/dist/hu-HU-DYhMVR_c.js +13 -0
  272. package/dist/hu-HU-MHIPehPS.js +13 -0
  273. package/dist/hu-HU-pFpTvMiD.js +63 -0
  274. package/dist/id-blurred-B5lHEP8M.js +59 -0
  275. package/dist/id-cut-off-Ba1FRzKO.js +55 -0
  276. package/dist/id-front-CpNWN6nG.js +52 -0
  277. package/dist/id-glare-DgCQON8k.js +49 -0
  278. package/dist/iframeWidget-7rZG5Ja-.js +234 -0
  279. package/dist/image-CmB0ioUM.js +17 -0
  280. package/dist/info-Bb_-xIEK.js +21 -0
  281. package/dist/info-filled-CK8LB339.js +17 -0
  282. package/dist/instant-verification-UrnuHTYn.js +40 -0
  283. package/dist/isEmpty-DhGVlmpA.js +23 -0
  284. package/dist/isNewEntity-7Vw_eQBr.js +13 -0
  285. package/dist/it-IT-5a7NHVFo.js +65 -0
  286. package/dist/it-IT-BAvmkEF8.js +13 -0
  287. package/dist/it-IT-BRO0Hf5X.js +13 -0
  288. package/dist/it-IT-Cr20JO4o.js +61 -0
  289. package/dist/it-IT-D63gRTDc.js +13 -0
  290. package/dist/it-IT-DOBp2-MP.js +13 -0
  291. package/dist/it-IT-DZjw9LNC.js +63 -0
  292. package/dist/it-IT-Dhwa9Ecj.js +75 -0
  293. package/dist/it-IT-masgjk9F.js +38 -0
  294. package/dist/ja-JP-B3Y0VVpN.js +152 -0
  295. package/dist/ja-JP-BZb5ndp9.js +75 -0
  296. package/dist/ja-JP-BeeuQ_LL.js +61 -0
  297. package/dist/ja-JP-BqluCflj.js +63 -0
  298. package/dist/ja-JP-CaUe8KW7.js +27 -0
  299. package/dist/ja-JP-DL0IjTzn.js +13 -0
  300. package/dist/ja-JP-DSvZhFNY.js +65 -0
  301. package/dist/ja-JP-GX3l4yqn.js +125 -0
  302. package/dist/ja-JP-g6VOUGXZ.js +136 -0
  303. package/dist/ja-JP-vv3-YsHU.js +38 -0
  304. package/dist/japanSupportUtils-vwyJ0OrD.js +16 -0
  305. package/dist/jpAddressSchema-DEOyz9Yo.js +26 -0
  306. package/dist/localizeDateString-BjYXf_CF.js +27 -0
  307. package/dist/location-itJfxrDQ.js +17 -0
  308. package/dist/lt-LT-0WbfHH_o.js +61 -0
  309. package/dist/lt-LT-2BMif2Bk.js +38 -0
  310. package/dist/lt-LT-BX8dOAzK.js +13 -0
  311. package/dist/lt-LT-C8n1GZoU.js +75 -0
  312. package/dist/lt-LT-CXw4ywLM.js +63 -0
  313. package/dist/lt-LT-CgalYpUh.js +65 -0
  314. package/dist/lt-LT-DDs3ngzd.js +13 -0
  315. package/dist/lt-LT-DpszrZ9m.js +13 -0
  316. package/dist/lt-LT-WRulV980.js +13 -0
  317. package/dist/lv-LV-B3IqVQos.js +13 -0
  318. package/dist/lv-LV-BZN4-Xat.js +75 -0
  319. package/dist/lv-LV-BuuUUumH.js +61 -0
  320. package/dist/lv-LV-C9Dhkruv.js +13 -0
  321. package/dist/lv-LV-CHdEDRVO.js +38 -0
  322. package/dist/lv-LV-CmB2-IO5.js +13 -0
  323. package/dist/lv-LV-DYqBaW2-.js +63 -0
  324. package/dist/lv-LV-aAd9SEqx.js +65 -0
  325. package/dist/lv-LV-dA8yYdKe.js +13 -0
  326. package/dist/mail-VHTlAusn.js +14 -0
  327. package/dist/manual-verification-BO8zgAYT.js +41 -0
  328. package/dist/mapExistingFile-1MUQJf2c.js +230 -0
  329. package/dist/mapJpAddressSchemaToAddressLocalizations-BCWDaJEu.js +162 -0
  330. package/dist/mapLegalEntityToIndividualSchema-D7Eku9KI.js +206 -0
  331. package/dist/mapTransferInstrumentToPayoutAccount-BYNYjRzc.js +34 -0
  332. package/dist/minus-circle-filled-ZhtJ0GD3.js +17 -0
  333. package/dist/nl-NL-B0fvINJj.js +75 -0
  334. package/dist/nl-NL-CmURERx_.js +65 -0
  335. package/dist/nl-NL-CnvvqAEg.js +13 -0
  336. package/dist/nl-NL-D1b5RUJ0.js +38 -0
  337. package/dist/nl-NL-DV4NqPVW.js +13 -0
  338. package/dist/nl-NL-KQ6bciOb.js +13 -0
  339. package/dist/nl-NL-KsfqCp2v.js +61 -0
  340. package/dist/nl-NL-SjOGmGk5.js +13 -0
  341. package/dist/nl-NL-lcNM54vV.js +63 -0
  342. package/dist/no-NO-B9618F4_.js +13 -0
  343. package/dist/no-NO-BAWVf0GX.js +13 -0
  344. package/dist/no-NO-BdG6WnpB.js +61 -0
  345. package/dist/no-NO-CIKbQbKT.js +13 -0
  346. package/dist/no-NO-CTrVITNu.js +63 -0
  347. package/dist/no-NO-Dkh4SWbB.js +38 -0
  348. package/dist/no-NO-Ds3VioxT.js +13 -0
  349. package/dist/no-NO-Jw7Gae-a.js +75 -0
  350. package/dist/no-NO-qyqWODMp.js +65 -0
  351. package/dist/onfido-logo-BSkKPH10.js +14 -0
  352. package/dist/options-horizontal-GuXvLvV3.js +18 -0
  353. package/dist/partner-QD27Vy4w.js +18 -0
  354. package/dist/passport-blurred-CVG493IJ.js +59 -0
  355. package/dist/passport-cut-off-COzA_TmB.js +56 -0
  356. package/dist/passport-front-WJleLixT.js +52 -0
  357. package/dist/passport-front-green-CZVkCa1n.js +232 -0
  358. package/dist/passport-glare-BP5WnJZj.js +50 -0
  359. package/dist/patternValidators-Ddoxs0Q5.js +83 -0
  360. package/dist/pay-by-link-plane-BpY8Q6-B.js +22 -0
  361. package/dist/payout-DtB68BcZ.js +20 -0
  362. package/dist/payout-verification-instant-BzpfOQLD.js +41 -0
  363. package/dist/payout-verification-manual-gNEoeZkV.js +90 -0
  364. package/dist/person-IVZG3t3_.js +17 -0
  365. package/dist/pl-PL-BgbxWHGE.js +13 -0
  366. package/dist/pl-PL-BkGihn5Q.js +38 -0
  367. package/dist/pl-PL-Bmaq3IC3.js +75 -0
  368. package/dist/pl-PL-CErRPlR2.js +63 -0
  369. package/dist/pl-PL-CTOkaDMG.js +13 -0
  370. package/dist/pl-PL-DEMxxz7h.js +13 -0
  371. package/dist/pl-PL-DW9eaUml.js +61 -0
  372. package/dist/pl-PL-DqzUSnFK.js +13 -0
  373. package/dist/pl-PL-q9azN24o.js +65 -0
  374. package/dist/plaid-logo-FsZ7kfL-.js +14 -0
  375. package/dist/plus-DiALAL8-.js +14 -0
  376. package/dist/plus-circle-filled-BzHtTqEN.js +17 -0
  377. package/dist/process-field-configurations-BgkGx8kj.js +324 -0
  378. package/dist/pt-BR-BRdIEO2O.js +38 -0
  379. package/dist/pt-BR-BaTE6BB_.js +75 -0
  380. package/dist/pt-BR-BdfWE-a1.js +61 -0
  381. package/dist/pt-BR-BfDe_8iW.js +13 -0
  382. package/dist/pt-BR-BxoOF8jB.js +65 -0
  383. package/dist/pt-BR-CLUsrQAl.js +13 -0
  384. package/dist/pt-BR-Ct4s4jXV.js +13 -0
  385. package/dist/pt-BR-DA44Wgbt.js +63 -0
  386. package/dist/pt-BR-zuqB_CBf.js +13 -0
  387. package/dist/pt-PT-BLRgiqFj.js +13 -0
  388. package/dist/pt-PT-BfL7qUzo.js +38 -0
  389. package/dist/pt-PT-CFY1O_K0.js +13 -0
  390. package/dist/pt-PT-DBEsmXQX.js +13 -0
  391. package/dist/pt-PT-F1qPZJ2c.js +13 -0
  392. package/dist/pt-PT-PIiikho9.js +63 -0
  393. package/dist/pt-PT-c0ap84_F.js +75 -0
  394. package/dist/pt-PT-ej54BPbB.js +61 -0
  395. package/dist/pt-PT-pIChDwiI.js +65 -0
  396. package/dist/recurring-DKNs9K3x.js +17 -0
  397. package/dist/reporting-D5ABpLO_.js +16 -0
  398. package/dist/resolveEnvironment-BOoObZUD.js +84 -0
  399. package/dist/revenue-accelerate-D7Sp0V4a.js +17 -0
  400. package/dist/review-D4TUjcWF.js +17 -0
  401. package/dist/ro-RO-0vx6ZLWV.js +13 -0
  402. package/dist/ro-RO-1ZFmLikG.js +61 -0
  403. package/dist/ro-RO-7CJ4F5iB.js +13 -0
  404. package/dist/ro-RO-BPOHV6Wp.js +75 -0
  405. package/dist/ro-RO-BeA_YyJ8.js +13 -0
  406. package/dist/ro-RO-Bv9hZxwD.js +63 -0
  407. package/dist/ro-RO-C00Ig8CL.js +13 -0
  408. package/dist/ro-RO-C2yBVFht.js +38 -0
  409. package/dist/ro-RO-DRsaNX9j.js +65 -0
  410. package/dist/roleMetadata-45H_XXPF.js +66 -0
  411. package/dist/save-BfqO2JBI.js +14 -0
  412. package/dist/search-Cmzbf5zI.js +17 -0
  413. package/dist/show-IdbU1C6P.js +17 -0
  414. package/dist/singpass-logo-wY4xsmTX.js +17 -0
  415. package/dist/singpass-verification-instant-JCqTr7Mv.js +40 -0
  416. package/dist/singpass-verification-manual-DQ7XW6R3.js +34 -0
  417. package/dist/sk-SK-3_SoEn6P.js +75 -0
  418. package/dist/sk-SK-7-enbO1N.js +65 -0
  419. package/dist/sk-SK-BbJWayDh.js +13 -0
  420. package/dist/sk-SK-C74EF23u.js +38 -0
  421. package/dist/sk-SK-ChVwlbp0.js +63 -0
  422. package/dist/sk-SK-Dm-pif_7.js +61 -0
  423. package/dist/sk-SK-DuLm2CVx.js +13 -0
  424. package/dist/sk-SK-DubwJifw.js +13 -0
  425. package/dist/sk-SK-Og9MJXpR.js +13 -0
  426. package/dist/sl-SI-59OQIZ3f.js +13 -0
  427. package/dist/sl-SI-BAIm-qBe.js +13 -0
  428. package/dist/sl-SI-CoI7iOco.js +13 -0
  429. package/dist/sl-SI-CvUzNn9Z.js +38 -0
  430. package/dist/sl-SI-DTvJT7fC.js +65 -0
  431. package/dist/sl-SI-DZHePXbK.js +63 -0
  432. package/dist/sl-SI-DbfswGh0.js +75 -0
  433. package/dist/sl-SI-HO7231cu.js +61 -0
  434. package/dist/sl-SI-hxwQIw_i.js +13 -0
  435. package/dist/solution-payments-DpyE_sdS.js +14 -0
  436. package/dist/store-Btc4GcmU.js +14 -0
  437. package/dist/style.css +2846 -2814
  438. package/dist/styles-CLV89_hH.js +2846 -2814
  439. package/dist/summaryItem-CAQCQSkt.js +18 -0
  440. package/dist/sv-SE-0PQ-U1u6.js +13 -0
  441. package/dist/sv-SE-BZNey_8S.js +13 -0
  442. package/dist/sv-SE-BcJ8p_Tx.js +61 -0
  443. package/dist/sv-SE-BsLkPEzn.js +38 -0
  444. package/dist/sv-SE-CQWBP7n1.js +13 -0
  445. package/dist/sv-SE-ChoPzG_G.js +13 -0
  446. package/dist/sv-SE-D_Efxy3s.js +75 -0
  447. package/dist/sv-SE-Dq56vGlB.js +63 -0
  448. package/dist/sv-SE-N-Hqwcjq.js +65 -0
  449. package/dist/tax-reporting-graph-hgoilCHZ.js +504 -0
  450. package/dist/terminal-1-D1pwXCoi.js +18 -0
  451. package/dist/tink-logo-DDyjz5eJ.js +17 -0
  452. package/dist/types/api/address/useAddressCleanse.d.ts +1 -1
  453. package/dist/types/api/address/useRetrieveAddress.d.ts +1 -1
  454. package/dist/types/api/address/useRetrieveFromPostcodeJp.d.ts +1 -1
  455. package/dist/types/api/address/useSearchAddress.d.ts +1 -2
  456. package/dist/types/api/businessLines/businessLines.types.d.ts +6 -1
  457. package/dist/types/api/businessLines/useBusinessLines.d.ts +3 -3
  458. package/dist/types/api/businessLines/useCreateBusinessLine.d.ts +2 -2
  459. package/dist/types/api/businessLines/useDeleteBusinessLine.d.ts +2 -2
  460. package/dist/types/api/businessLines/useUpdateBusinessLines.d.ts +2 -2
  461. package/dist/types/api/businessLines/useUpdateSourceOfFunds.d.ts +2 -2
  462. package/dist/types/api/check/useCheck.d.ts +1 -2
  463. package/dist/types/api/companyDataSet/companyDataset.types.d.ts +5 -0
  464. package/dist/types/api/companyDataSet/handleCompanyDataset.d.ts +6 -3
  465. package/dist/types/api/companyDataSet/useClearCompanyData.d.ts +2 -2
  466. package/dist/types/api/companySearch/companySearch.types.d.ts +8 -0
  467. package/dist/types/api/companySearch/useCompanySearch.d.ts +9 -4
  468. package/dist/types/api/companySelection/companySelection.types.d.ts +3 -3
  469. package/dist/types/api/companySelection/useCompanySelection.d.ts +2 -18
  470. package/dist/types/api/configurations/useScenarios.d.ts +3 -161
  471. package/dist/types/api/configurations/useSupportedCountries.d.ts +1 -1
  472. package/dist/types/api/configurations/useTaskTypes.d.ts +1 -1
  473. package/dist/types/api/configurations/useVersionConfiguration.d.ts +1 -1
  474. package/dist/types/api/createLegalEntity/useCreateLegalEntity.d.ts +2 -2
  475. package/dist/types/api/datasets/useLegalForms.d.ts +1 -1
  476. package/dist/types/api/datasets/useNaceCodes.d.ts +1 -1
  477. package/dist/types/api/datasets/useSourceOfFundsTypes.d.ts +1 -1
  478. package/dist/types/api/documentValidation/useDocumentValidate.d.ts +2 -4
  479. package/dist/types/api/documents/useCreateDocument.d.ts +2 -2
  480. package/dist/types/api/documents/useDeleteDocument.d.ts +2 -2
  481. package/dist/types/api/documents/useDocument.d.ts +2 -2
  482. package/dist/types/api/documents/useDocuments.d.ts +4 -0
  483. package/dist/types/api/documents/useUpdateDocument.d.ts +2 -2
  484. package/dist/types/api/entityVerifications/useVerifyIdNumber.d.ts +2 -2
  485. package/dist/types/api/idNowProvider/useIdNowProvider.d.ts +3 -4
  486. package/dist/types/api/idVerificationProviders/idVerificationStartCheck.d.ts +2 -2
  487. package/dist/types/api/idVerificationProviders/useExtractDocumentInformation.d.ts +2 -2
  488. package/dist/types/api/idVerificationProviders/useIdVerificationToken.d.ts +3 -3
  489. package/dist/types/api/industryCodes/useIndustryCodes.d.ts +1 -2
  490. package/dist/types/api/legalEntity/useConfirmReview.d.ts +2 -2
  491. package/dist/types/api/legalEntity/useLegalEntity.d.ts +8 -389
  492. package/dist/types/api/legalEntity/useUpdateLegalEntity.d.ts +5 -5
  493. package/dist/types/api/onboardingStatus/useGenerateOnboardingLink.d.ts +2 -2
  494. package/dist/types/api/onboardingStatus/useOnboardingStatus.d.ts +1 -1
  495. package/dist/types/api/openId/useOpenIdAuthorizationLink.d.ts +1 -2
  496. package/dist/types/api/pci/usePciQuestionnaireList.d.ts +1 -1
  497. package/dist/types/api/pci/usePciStatus.d.ts +1 -1
  498. package/dist/types/api/pci/usePciTemplate.d.ts +1 -1
  499. package/dist/types/api/pci/useSignPci.d.ts +2 -3
  500. package/dist/types/api/providersConfiguration/useProviderStatus.d.ts +1 -1
  501. package/dist/types/api/queryKeys.d.ts +4 -2
  502. package/dist/types/api/taskStatus/useTaskStatus.d.ts +2 -2
  503. package/dist/types/api/taxClassification/useTaxClassification.d.ts +1 -1
  504. package/dist/types/api/termsOfService/useAcceptTermsOfService.d.ts +2 -3
  505. package/dist/types/api/termsOfService/useAcceptedTermsOfService.d.ts +1 -7
  506. package/dist/types/api/termsOfService/useTermsOfService.d.ts +1 -1
  507. package/dist/types/api/termsOfService/useTermsOfServiceAcceptanceInfos.d.ts +1 -1
  508. package/dist/types/api/termsOfService/useTermsOfServiceStatus.d.ts +1 -1
  509. package/dist/types/api/tinVerification/useVerifyTin.d.ts +1 -1
  510. package/dist/types/api/transferInstruments/useBankVerificationProviders.d.ts +1 -1
  511. package/dist/types/api/transferInstruments/useCreateTrustedTransferInstrument.d.ts +1 -1
  512. package/dist/types/api/transferInstruments/useDeleteTransferInstrument.d.ts +1 -1
  513. package/dist/types/api/transferInstruments/useHandleBankVerificationError.d.ts +1 -1
  514. package/dist/types/api/transferInstruments/useTransferInstrument.d.ts +2 -2
  515. package/dist/types/api/transferInstruments/useTransferInstruments.d.ts +1 -1
  516. package/dist/types/api/transferInstruments/useUpdateTransferInstrument.d.ts +1 -1
  517. package/dist/types/api/transferInstruments/useUpdateTrustedTransferInstrument.d.ts +15 -0
  518. package/dist/types/api/types.d.ts +3 -2
  519. package/dist/types/api/uiAnalytics/useAnalyticsSession.d.ts +2 -2
  520. package/dist/types/api/uiAnalytics/usePushAnalyticEvent.d.ts +2 -2
  521. package/dist/types/api/validation/useValidateAccountIdentification.d.ts +2 -3
  522. package/dist/types/api/validation/useValidatePhoneNumber.d.ts +1 -1
  523. package/dist/types/components/Apps/tasks/TaskList/utils.d.ts +4 -0
  524. package/dist/types/components/BankAccount/forms/BankDocument/BankDocumentClassification.d.ts +1 -2
  525. package/dist/types/components/BankAccount/forms/BankDocument/types.d.ts +0 -1
  526. package/dist/types/components/BankAccount/forms/BankVerification/types.d.ts +1 -0
  527. package/dist/types/components/BankAccount/forms/BankVerification/verification/overlay/BankVerificationOverlay.d.ts +1 -1
  528. package/dist/types/components/BankAccount/forms/PayoutDetails/rules.d.ts +2 -2
  529. package/dist/types/components/BankAccount/forms/PayoutDetails/types.d.ts +0 -1
  530. package/dist/types/components/BankAccount/mapping/payoutKeyMappings.d.ts +439 -439
  531. package/dist/types/components/BankAccount/pages/PayoutDetailsPage.d.ts +3 -3
  532. package/dist/types/components/BankAccount/tasks/PayoutDetailsDropin/PayoutDetailsDropin.d.ts +1 -1
  533. package/dist/types/components/BankAccount/tasks/PayoutDetailsDropin/utils.d.ts +1 -1
  534. package/dist/types/components/BankAccount/utils/payoutAccountUtil.d.ts +1 -1
  535. package/dist/types/components/Business/forms/AdditionalInformation/AdditionalInformation.d.ts +1 -4
  536. package/dist/types/components/Business/forms/AdditionalInformation/VerifiedBusinessCard/VerifiedBusinessCard.d.ts +8 -0
  537. package/dist/types/components/Business/forms/AdditionalInformation/types.d.ts +4 -6
  538. package/dist/types/components/Business/forms/AdditionalInformation/utils.d.ts +2 -5
  539. package/dist/types/components/Business/forms/BasicInformation/BasicInformation.d.ts +1 -4
  540. package/dist/types/components/Business/forms/BasicInformation/types.d.ts +5 -18
  541. package/dist/types/components/Business/forms/BusinessDetails/form-ids.d.ts +2 -0
  542. package/dist/types/components/Business/forms/BusinessDetails/forms.d.ts +12 -46
  543. package/dist/types/components/Business/forms/BusinessDetails/types.d.ts +2 -22
  544. package/dist/types/components/Business/forms/BusinessSelection/BusinessInformationCard/BusinessInformationCard.d.ts +8 -9
  545. package/dist/types/components/Business/forms/BusinessSelection/BusinessSelection.d.ts +13 -3
  546. package/dist/types/components/Business/forms/BusinessSelection/types.d.ts +0 -11
  547. package/dist/types/components/Business/forms/CompanyStructure/CompanyStructure.d.ts +3 -4
  548. package/dist/types/components/Business/forms/CompanyStructure/types.d.ts +0 -6
  549. package/dist/types/components/Business/forms/FinancialInformation/formatFinancialInformationSummary.d.ts +4 -0
  550. package/dist/types/components/Business/forms/FinancialInformation/mapping/mapFinancialInformationToFinancialReport.d.ts +3 -0
  551. package/dist/types/components/Business/forms/FinancialInformation/mapping/mapFinancialReportsToFinancialInformation.d.ts +3 -0
  552. package/dist/types/components/Business/forms/ProofOfDirectorDocument/ProofOfDirectorDocument.d.ts +1 -1
  553. package/dist/types/components/Business/forms/ProofOfDirectorDocument/types.d.ts +0 -3
  554. package/dist/types/components/Business/forms/ProofOfOwnershipDocument/ProofOfOwnershipDocument.d.ts +1 -1
  555. package/dist/types/components/Business/forms/ProofOfOwnershipDocument/types.d.ts +0 -3
  556. package/dist/types/components/Business/forms/ProofOfSignatoryDocument/ProofOfSignatoryDocument.d.ts +1 -1
  557. package/dist/types/components/Business/forms/ProofOfSignatoryDocument/types.d.ts +0 -3
  558. package/dist/types/components/Business/forms/RegistrationDocument/RegistrationDocument.d.ts +1 -1
  559. package/dist/types/components/Business/forms/RegistrationDocument/types.d.ts +1 -3
  560. package/dist/types/components/Business/forms/TaxDocument/TaxDocument.d.ts +1 -1
  561. package/dist/types/components/Business/forms/TaxDocument/types.d.ts +1 -3
  562. package/dist/types/components/Business/forms/forms.types.d.ts +0 -3
  563. package/dist/types/components/Business/forms/rules.d.ts +10 -10
  564. package/dist/types/components/Business/mapping/businessDetails/businessBankAccountTaxIdUtils.d.ts +7 -0
  565. package/dist/types/components/Business/mapping/businessDetails/mapBusinessDetailsSchemaToLegalEntity.d.ts +4 -2
  566. package/dist/types/components/Business/mapping/businessDetails/mapLegalEntityToBusinessDetailsSchema.d.ts +8 -2
  567. package/dist/types/components/Business/pages/RootBusinessDetailsPage.d.ts +1 -2
  568. package/dist/types/components/Business/tasks/BusinessDetailsDropin/BusinessDetailsDropin.d.ts +3 -3
  569. package/dist/types/components/Business/tasks/BusinessDetailsDropin/businessDetailsStore.d.ts +0 -2
  570. package/dist/types/components/Business/tasks/BusinessDetailsDropin/types.d.ts +14 -6
  571. package/dist/types/components/Business/tasks/BusinessDetailsDropin/utils.d.ts +24 -9
  572. package/dist/types/components/Business/utils/applyVerifiedBusinessData.d.ts +1 -1
  573. package/dist/types/components/Business/utils/companyUtil.d.ts +0 -10
  574. package/dist/types/components/Business/utils/formatDataForSummary.d.ts +5 -0
  575. package/dist/types/components/Business/utils/submit.d.ts +2 -0
  576. package/dist/types/components/Business/utils/useBusinessDetailsData.d.ts +21 -0
  577. package/dist/types/components/BusinessLines/constants.d.ts +10 -0
  578. package/dist/types/components/BusinessLines/fields/Carousel/Carousel.d.ts +10 -10
  579. package/dist/types/components/BusinessLines/fields/SctaField/SctaField.d.ts +2 -0
  580. package/dist/types/components/BusinessLines/fields/SctaField/types.d.ts +6 -0
  581. package/dist/types/components/BusinessLines/fields/WebDataField/types.d.ts +1 -1
  582. package/dist/types/components/BusinessLines/forms/IndustryCodesForm/IndustryCodesForm.d.ts +1 -1
  583. package/dist/types/components/BusinessLines/forms/SctaForm/SctaForm.d.ts +2 -0
  584. package/dist/types/components/BusinessLines/forms/SctaForm/SctaInfoModal.d.ts +3 -0
  585. package/dist/types/components/BusinessLines/forms/SctaForm/types.d.ts +2 -0
  586. package/dist/types/components/BusinessLines/forms/rules.d.ts +2 -1
  587. package/dist/types/components/BusinessLines/pages/RootBusinessLinesPage.d.ts +1 -2
  588. package/dist/types/components/BusinessLines/tasks/BusinessLines/BusinessLineModal/BusinessLineModal.d.ts +2 -1
  589. package/dist/types/components/BusinessLines/tasks/BusinessLines/BusinessLinesDropin.d.ts +1 -1
  590. package/dist/types/components/BusinessLines/tasks/types.d.ts +4 -0
  591. package/dist/types/components/BusinessLines/tasks/utils.d.ts +26 -4
  592. package/dist/types/components/BusinessLines/tasks/validate.d.ts +2 -0
  593. package/dist/types/components/Contract/tasks/ServiceAgreementDropin/ServiceAgreementDropin.d.ts +1 -1
  594. package/dist/types/components/Contract/tasks/ServiceAgreementDropin/types.d.ts +3 -3
  595. package/dist/types/components/EFP/fields/LegalFormField/LegalFormField.d.ts +1 -1
  596. package/dist/types/components/EFP/fields/NaceCodeField/NaceCodeField.d.ts +1 -1
  597. package/dist/types/components/EFP/mapping/businessFinancingKeyMappings.d.ts +5812 -582
  598. package/dist/types/components/EFP/mapping/mapBusinessFinancingToLegalEntity.d.ts +3 -2
  599. package/dist/types/components/EFP/mapping/mapLegalEntityToBusinessFinancing.d.ts +1 -1
  600. package/dist/types/components/EFP/pages/BusinessFinancingPage.d.ts +1 -2
  601. package/dist/types/components/EFP/pages/SourceOfFundsPage.d.ts +1 -2
  602. package/dist/types/components/EFP/tasks/BusinessFinancingDropin/AdditionalFieldsForBusinessFinancingSoleProprietor.d.ts +2 -0
  603. package/dist/types/components/EFP/tasks/BusinessFinancingDropin/BusinessFinancingSoleProprietorPersonalInformation.d.ts +4 -0
  604. package/dist/types/components/EFP/tasks/BusinessFinancingDropin/types.d.ts +28 -0
  605. package/dist/types/components/EFP/tasks/BusinessFinancingDropin/utils.d.ts +15 -4
  606. package/dist/types/components/EFP/tasks/BusinessFinancingDropin/validate.d.ts +10 -1
  607. package/dist/types/components/EFP/tasks/SourceOfFundsDropin/types.d.ts +20 -21
  608. package/dist/types/components/EFP/tasks/SourceOfFundsDropin/utils.d.ts +6 -4
  609. package/dist/types/components/EFP/tasks/TaxReportingDropin/utils.d.ts +1 -2
  610. package/dist/types/components/EmbeddedDropins/BusinessFinancingComponent/utils.d.ts +2 -1
  611. package/dist/types/components/EmbeddedDropins/CreateIndividualComponent/CreateIndividualComponent.d.ts +2 -2
  612. package/dist/types/components/EmbeddedDropins/InvitedDecisionMakerComponent/InvitedDecisionMakerComponent.d.ts +4 -0
  613. package/dist/types/components/EmbeddedDropins/OnboardingDropinComponent/DropinComposer/DropinComposer.d.ts +1 -1
  614. package/dist/types/components/EmbeddedDropins/OnboardingDropinComponent/DropinComposer/RouterDropinComposer.d.ts +4 -0
  615. package/dist/types/components/Individual/fields/DriversLicense/DriversLicense.types.d.ts +1 -1
  616. package/dist/types/components/Individual/fields/IdentityNumber/fieldConfig.d.ts +4 -3
  617. package/dist/types/components/Individual/forms/AdditionalPersonalDetails/AdditionalPersonalDetails.types.d.ts +29 -0
  618. package/dist/types/components/Individual/forms/AdditionalPersonalDetails/Identity/Identity.types.d.ts +13 -0
  619. package/dist/types/components/Individual/forms/AdditionalPersonalDetails/Identity/TypeOfIdentity/index.d.ts +11 -0
  620. package/dist/types/components/Individual/forms/AdditionalPersonalDetails/Identity/validate.d.ts +4 -0
  621. package/dist/types/components/Individual/forms/AdditionalPersonalDetails/validate.d.ts +22 -0
  622. package/dist/types/components/Individual/forms/BasicDetails/BasicDetails.types.d.ts +22 -0
  623. package/dist/types/components/Individual/forms/BasicDetails/validate.d.ts +8 -0
  624. package/dist/types/components/Individual/forms/DataConflictsModal/ConflictRow.d.ts +12 -0
  625. package/dist/types/components/Individual/forms/DataConflictsModal/DataConflictsModal.d.ts +24 -0
  626. package/dist/types/components/Individual/forms/IdDocumentUpload/types.d.ts +43 -0
  627. package/dist/types/components/Individual/forms/IdDocumentUpload/utils.d.ts +3 -0
  628. package/dist/types/components/Individual/forms/IdNowVerificationModal/isIdNowModalOpen.d.ts +18 -0
  629. package/dist/types/components/Individual/forms/IdVerificationMethod/IdVerificationMethod.types.d.ts +21 -0
  630. package/dist/types/components/Individual/forms/IdVerificationMethod/OnfidoVerificationModal/OnfidoVerificationModal.d.ts +7 -0
  631. package/dist/types/components/Individual/forms/IdVerificationMethod/UploadedDocument/UploadedDocument.d.ts +7 -0
  632. package/dist/types/components/Individual/forms/IdVerificationMethod/individualOnfidoConflictsSchema.d.ts +46 -0
  633. package/dist/types/components/Individual/forms/IdVerificationMethod/mapExtractionResultToSchema.d.ts +4 -0
  634. package/dist/types/components/Individual/forms/IdVerificationMethod/validateExtractionResult.d.ts +12 -0
  635. package/dist/types/components/Individual/forms/Individual.d.ts +56 -0
  636. package/dist/types/components/Individual/forms/Individual.rules.d.ts +45 -0
  637. package/dist/types/components/Individual/forms/Individual.types.d.ts +60 -0
  638. package/dist/types/components/Individual/forms/ProofOfRelationship/types.d.ts +14 -0
  639. package/dist/types/components/Individual/forms/ProofOfResidency/types.d.ts +39 -0
  640. package/dist/types/components/Individual/forms/SignatoryQuestionnaire/SignatoryQuestionnaire.types.d.ts +6 -0
  641. package/dist/types/components/Individual/forms/UboQuestionnaire/UboQuestionnaire.types.d.ts +13 -0
  642. package/dist/types/components/Individual/forms/UboQuestionnaire/UboQuestionnaireModalContent.d.ts +7 -0
  643. package/dist/types/components/Individual/forms/form-ids.d.ts +2 -0
  644. package/dist/types/components/Individual/helpers/bafinUtils.d.ts +3 -2
  645. package/dist/types/components/Individual/helpers/mandateIdVerificationForMotionCapture.d.ts +2 -3
  646. package/dist/types/components/Individual/helpers/roleUtils.d.ts +1 -1
  647. package/dist/types/components/Individual/mapping/adjustOnfidoIdentificationData.d.ts +1 -1
  648. package/dist/types/components/Individual/mapping/getOnfidoIdentityTypeToApiIdentityTypeMap.d.ts +1 -1
  649. package/dist/types/components/Individual/mapping/individualKeyMappings.d.ts +6 -12
  650. package/dist/types/components/Individual/mapping/mapApiDocumentToIndividualDocuments.d.ts +2 -2
  651. package/dist/types/components/Individual/mapping/mapIndividualDocumentToApiDocument.d.ts +2 -3
  652. package/dist/types/components/Individual/mapping/mapIndividualSchemaToLegalEntity.d.ts +5 -0
  653. package/dist/types/components/Individual/mapping/mapLegalEntityToIndividualSchema.d.ts +3 -0
  654. package/dist/types/components/Individual/pages/DecisionMakerDetailsPage.d.ts +6 -7
  655. package/dist/types/components/Individual/pages/LegalRepresentativeDetailsPage.d.ts +2 -2
  656. package/dist/types/components/Individual/pages/RootIndividualDetailsPage.d.ts +2 -2
  657. package/dist/types/components/Individual/tasks/DecisionMakers/DecisionMakerDetails/utils.d.ts +2 -14
  658. package/dist/types/components/Individual/tasks/DecisionMakers/RemediationAlerts/remediation.config.d.ts +0 -2
  659. package/dist/types/components/Individual/tasks/DecisionMakers/types.d.ts +8 -0
  660. package/dist/types/components/Individual/tasks/DecisionMakers/utils.d.ts +1 -1
  661. package/dist/types/components/Individual/tasks/IndividualDropin/IndividualDropin.d.ts +2 -2
  662. package/dist/types/components/Individual/tasks/IndividualDropin/individualFormConfig.d.ts +3 -3
  663. package/dist/types/components/Shared/EntityAssociation/EntityAssociation.d.ts +0 -1
  664. package/dist/types/components/Shared/FormFlow/FormFlow.d.ts +1 -1
  665. package/dist/types/components/Shared/FormFlow/FormFlow.types.d.ts +2 -2
  666. package/dist/types/components/Shared/Introduction/copy.d.ts +3 -3
  667. package/dist/types/components/Shared/fields/BusinessRegistrationNumberField/BusinessRegistrationNumberField.d.ts +1 -1
  668. package/dist/types/components/Shared/fields/BusinessRegistrationNumberField/fieldConfig.d.ts +10 -0
  669. package/dist/types/components/Shared/fields/BusinessRegistrationNumberField/types.d.ts +2 -1
  670. package/dist/types/components/Shared/fields/CountryField/types.d.ts +2 -1
  671. package/dist/types/components/Shared/fields/CountryOfGoverningLawField/CountryOfGoverningLawField.d.ts +1 -1
  672. package/dist/types/components/Shared/fields/CountryOfGoverningLawField/types.d.ts +1 -1
  673. package/dist/types/components/Shared/fields/Currency/Currency.d.ts +1 -1
  674. package/dist/types/components/Shared/fields/Currency/types.d.ts +1 -1
  675. package/dist/types/components/Shared/fields/DBANameField/DBANameField.d.ts +1 -1
  676. package/dist/types/components/Shared/fields/DBANameField/types.d.ts +1 -1
  677. package/dist/types/components/Shared/fields/DateOfIncorporationField/DateOfIncorporationField.d.ts +1 -1
  678. package/dist/types/components/Shared/fields/DateOfIncorporationField/types.d.ts +3 -1
  679. package/dist/types/components/Shared/fields/EInvoicingCodeField/EInvoicingCodeField.d.ts +1 -1
  680. package/dist/types/components/Shared/fields/EInvoicingCodeField/types.d.ts +1 -1
  681. package/dist/types/components/Shared/fields/IdFieldTypeSelector/countryIdNumberTypes.d.ts +117 -1
  682. package/dist/types/components/Shared/fields/IndustryCodeField/IndustryCodeField.d.ts +1 -1
  683. package/dist/types/components/Shared/fields/IndustryCodeField/types.d.ts +1 -1
  684. package/dist/types/components/Shared/fields/LegalCompanyNameField/fieldConfig.d.ts +12 -6
  685. package/dist/types/components/Shared/fields/LegalCompanyNameField/types.d.ts +3 -1
  686. package/dist/types/components/Shared/fields/LocalizedNameFields/types.d.ts +9 -0
  687. package/dist/types/components/Shared/fields/LocalizedNameFields/validate.d.ts +5 -0
  688. package/dist/types/components/Shared/fields/NumberOfEmployees/NumberOfEmployees.d.ts +1 -1
  689. package/dist/types/components/Shared/fields/NumberOfEmployees/types.d.ts +1 -1
  690. package/dist/types/components/Shared/fields/PhoneField/PhoneField.d.ts +1 -1
  691. package/dist/types/components/Shared/fields/PhoneField/fieldConfig.d.ts +5 -0
  692. package/dist/types/components/Shared/fields/PhoneField/types.d.ts +2 -1
  693. package/dist/types/components/Shared/fields/StateField/StateField.d.ts +1 -1
  694. package/dist/types/components/Shared/fields/StateField/fieldConfig.d.ts +8 -0
  695. package/dist/types/components/Shared/fields/StateField/types.d.ts +1 -1
  696. package/dist/types/components/Shared/fields/StockExchangeMICField/StockExchangeMICField.d.ts +1 -1
  697. package/dist/types/components/Shared/fields/StockExchangeMICField/types.d.ts +1 -1
  698. package/dist/types/components/Shared/fields/StockISINField/StockISINField.d.ts +1 -1
  699. package/dist/types/components/Shared/fields/StockISINField/types.d.ts +1 -1
  700. package/dist/types/components/Shared/fields/StockTickerSymbol/StockTickerSymbolField.d.ts +1 -1
  701. package/dist/types/components/Shared/fields/StockTickerSymbol/types.d.ts +1 -1
  702. package/dist/types/components/Shared/fields/TaxInformationField/TaxInformationField.d.ts +1 -1
  703. package/dist/types/components/Shared/fields/TaxInformationField/fieldConfig.d.ts +6 -0
  704. package/dist/types/components/Shared/fields/TaxInformationField/types.d.ts +2 -1
  705. package/dist/types/components/Shared/fields/VatNumberField/VatNumberField.d.ts +1 -1
  706. package/dist/types/components/Shared/fields/VatNumberField/types.d.ts +1 -1
  707. package/dist/types/components/Shared/forms/Address/Address.d.ts +1 -1
  708. package/dist/types/components/Shared/forms/Address/localized/jp/jpAddressSchema.d.ts +3 -1
  709. package/dist/types/components/Shared/forms/Address/types.d.ts +2 -2
  710. package/dist/types/components/Shared/forms/Address/utils.d.ts +1 -1
  711. package/dist/types/components/Shared/forms/BusinessTypeSelection/utils.d.ts +1 -1
  712. package/dist/types/components/Trust/forms/Trust/rules.d.ts +5 -4
  713. package/dist/types/components/Trust/hooks/useTrustMemberNavigation.hook.d.ts +1 -1
  714. package/dist/types/components/Trust/pages/TrustDetailsPage.d.ts +1 -2
  715. package/dist/types/components/Trust/pages/TrustMemberCompanyPage.d.ts +3 -3
  716. package/dist/types/components/Trust/pages/TrustMemberIndividualPage.d.ts +5 -5
  717. package/dist/types/components/Trust/pages/TrustMemberRoleAndTypePage.d.ts +2 -2
  718. package/dist/types/components/Trust/tasks/RoleAndTypeDropin/formatRoleAndEntityTypeSummary.d.ts +1 -1
  719. package/dist/types/components/Trust/tasks/TrustDropin/TrustMultiform.d.ts +2 -1
  720. package/dist/types/components/Trust/tasks/TrustDropin/TrustMultiformDropin.d.ts +1 -1
  721. package/dist/types/components/Trust/tasks/TrustMembers/TrustMembersOverview.d.ts +1 -2
  722. package/dist/types/components/UnincorporatedPartnership/hooks/useUnincorporatedPartnershipNavigation.d.ts +1 -1
  723. package/dist/types/components/UnincorporatedPartnership/pages/UnincorporatedPartnershipIndividualPage.d.ts +5 -5
  724. package/dist/types/components/UnincorporatedPartnership/pages/UnincorporatedPartnershipMemberCompanyPage.d.ts +3 -3
  725. package/dist/types/components/UnincorporatedPartnership/pages/UnincorporatedPartnershipMemberRoleAndTypePage.d.ts +1 -1
  726. package/dist/types/components/ui/atoms/Card/Card.d.ts +19 -0
  727. package/dist/types/components/ui/atoms/Link/Link.types.d.ts +1 -1
  728. package/dist/types/components/ui/atoms/Loader/Loader.d.ts +11 -5
  729. package/dist/types/components/ui/atoms/Modal/MaybeModal.d.ts +1 -1
  730. package/dist/types/components/ui/atoms/MultiSelectList/MultiSelectList.d.ts +0 -1
  731. package/dist/types/components/ui/atoms/Svg/Svg.d.ts +0 -1
  732. package/dist/types/components/ui/atoms/Svg/svgs.d.ts +4 -0
  733. package/dist/types/components/ui/atoms/Tile/Tile.d.ts +2 -1
  734. package/dist/types/components/ui/molecules/EmbeddedStatus/statusToTag.d.ts +2 -2
  735. package/dist/types/components/ui/molecules/ErrorPanel/ErrorPanel.d.ts +0 -1
  736. package/dist/types/context/ExperimentContext/types.d.ts +28 -50
  737. package/dist/types/context/QueryContext/QueryClient.d.ts +1 -1
  738. package/dist/types/context/StateContext/types.d.ts +2 -3
  739. package/dist/types/core/models/api/individual.d.ts +3 -0
  740. package/dist/types/core/models/api/instant-id-verification.d.ts +1 -1
  741. package/dist/types/core/models/api/legal-arrangement.d.ts +3 -0
  742. package/dist/types/core/models/api/legal-entity-association.d.ts +1 -1
  743. package/dist/types/core/models/api/legal-entity.d.ts +1 -6
  744. package/dist/types/core/process-field-configurations.d.ts +0 -5
  745. package/dist/types/core/services/types.d.ts +1 -1
  746. package/dist/types/core/user-events.d.ts +4 -2
  747. package/dist/types/embeds/baseEmbedProps.d.ts +0 -21
  748. package/dist/types/embeds/business-financing/adyen-business-financing.d.ts +2 -1
  749. package/dist/types/embeds/business-financing/adyen-business-financing.types.d.ts +2 -0
  750. package/dist/types/embeds/individual-configuration/adyen-individual-configuration.d.ts +5 -1
  751. package/dist/types/embeds/individual-configuration/adyen-individual-configuration.types.d.ts +2 -2
  752. package/dist/types/embeds/invited-decision-maker/adyen-invited-decision-maker.d.ts +5 -0
  753. package/dist/types/embeds/invited-decision-maker/adyen-invited-decision-maker.types.d.ts +34 -0
  754. package/dist/types/embeds/onboarding/adyen-onboarding.d.ts +2 -1
  755. package/dist/types/embeds/terms-of-service-management/adyen-terms-of-service-management.d.ts +5 -1
  756. package/dist/types/embeds/transfer-instrument-configuration/adyen-transfer-instrument-configuration.d.ts +2 -1
  757. package/dist/types/embeds/verification-status/adyen-verification-status.d.ts +2 -1
  758. package/dist/types/hooks/useAssociatedLegalEntity.d.ts +1 -1
  759. package/dist/types/hooks/useForm/types.d.ts +0 -8
  760. package/dist/types/hooks/useLegalCompanyNameField/useLegalCompanyNameField.d.ts +4 -2
  761. package/dist/types/hooks/usePageLandedEvent.d.ts +7 -0
  762. package/dist/types/hooks/useUboQuestionnaire.d.ts +2 -2
  763. package/dist/types/language/types.d.ts +7 -2
  764. package/dist/types/language/utils.d.ts +1 -2
  765. package/dist/types/router/DefaultRouteRedirect.d.ts +8 -0
  766. package/dist/types/router/MemoryRouterContext.d.ts +9 -0
  767. package/dist/types/router/OnboardingRouter.d.ts +39 -0
  768. package/dist/types/router/SuspenseRoute.d.ts +7 -0
  769. package/dist/types/router/getDefaultTask.d.ts +16 -0
  770. package/dist/types/router/routeConfig.d.ts +68 -0
  771. package/dist/types/router/useCurrentTask.d.ts +5 -0
  772. package/dist/types/router/useNavigate.d.ts +7 -0
  773. package/dist/types/stores/formState.d.ts +2 -0
  774. package/dist/types/stores/globalStore/get-task-status.d.ts +6 -0
  775. package/dist/types/stores/globalStore/taskStatus.d.ts +5 -3
  776. package/dist/types/types/assert.d.ts +1 -0
  777. package/dist/types/types/datasets/currency.d.ts +0 -1
  778. package/dist/types/types/form.d.ts +0 -2
  779. package/dist/types/utils/addLinkedFields.d.ts +0 -2
  780. package/dist/types/utils/analytics/debouncedInputEvent.d.ts +1 -0
  781. package/dist/types/utils/analytics/getPrefilledDetails.d.ts +28 -0
  782. package/dist/types/utils/api/documentUtils.d.ts +6 -0
  783. package/dist/types/utils/api/processCapabilitites.d.ts +14 -2
  784. package/dist/types/utils/birthDateUtils.d.ts +0 -17
  785. package/dist/types/utils/customerSupportUtils.d.ts +3 -0
  786. package/dist/types/utils/entityAssociationUtil.d.ts +3 -4
  787. package/dist/types/utils/entityStatusUtil.d.ts +1 -1
  788. package/dist/types/utils/fieldConfigurations.d.ts +0 -2
  789. package/dist/types/utils/formUtils.d.ts +1 -6
  790. package/dist/types/utils/getDisplayErrorMessage.d.ts +1 -2
  791. package/dist/types/utils/getFieldsWithExistingData.d.ts +2 -3
  792. package/dist/types/utils/getName.d.ts +1 -1
  793. package/dist/types/utils/japanSupportUtils.d.ts +3 -0
  794. package/dist/types/utils/logger.d.ts +0 -1
  795. package/dist/types/utils/makeSelectItemForRole.d.ts +1 -1
  796. package/dist/types/utils/performance.d.ts +64 -0
  797. package/dist/types/utils/regex/patternValidators.d.ts +1 -1
  798. package/dist/types/utils/translation.d.ts +3 -2
  799. package/dist/types/utils/validatorUtils.d.ts +3 -1
  800. package/dist/types/utils/verification/helpers/verifyIdNumber.d.ts +3 -2
  801. package/dist/types-BW4HQI5X.js +142 -0
  802. package/dist/types-D7ibfssA.js +74 -0
  803. package/dist/types-DRjaiEYd.js +64 -0
  804. package/dist/types-DSsQZPmi.js +34 -0
  805. package/dist/unincorporated-partnership-MeN1dp53.js +97 -0
  806. package/dist/upload-BmUXjsaU.js +17 -0
  807. package/dist/us-check-C1rTBsCY.js +46 -0
  808. package/dist/us-check-account-number-9lI1dXNC.js +48 -0
  809. package/dist/us-check-routing-number-s_KaAGSM.js +49 -0
  810. package/dist/useAssociatedLegalEntity-jaSfQ9rQ.js +34 -0
  811. package/dist/useBusinessDetailsData-5O2km9MB.js +5310 -0
  812. package/dist/useBusinessLines-DuBQrvIQ.js +29 -0
  813. package/dist/useCanSeeIntroduction-Boj-VdF4.js +48 -0
  814. package/dist/useCreateLegalEntity-DQx1byaP.js +32 -0
  815. package/dist/useDataMissingRemediations-Drava4pQ.js +41 -0
  816. package/dist/useDataset-3t4wCptb.js +76 -0
  817. package/dist/useDeleteTransferInstrument-CUjrvIfw.js +32 -0
  818. package/dist/useForm-CsrT0zKF.js +582 -0
  819. package/dist/useFormContext-D1NuWw_2.js +201 -0
  820. package/dist/useGlobalData-vS5GxkpZ.js +68 -0
  821. package/dist/useId-BZ0PA7jP.js +24 -0
  822. package/dist/useMultiForm-82RYFvCF.js +873 -0
  823. package/dist/useNavigate-DLBqtyNN.js +265 -0
  824. package/dist/useOnboardingStatus-B3HSS36K.js +28 -0
  825. package/dist/usePciQuestionnaireList-B2425Wiw.js +29 -0
  826. package/dist/useSalesChannels-B9Z_g_9G.js +65 -0
  827. package/dist/useScenarios-DCRvLaxV.js +48 -0
  828. package/dist/useSetting-C108TWwa.js +19 -0
  829. package/dist/useTaskStatus-DjHWxlNL.js +51 -0
  830. package/dist/useTermsOfServiceStatus-BTLQKn3X.js +43 -0
  831. package/dist/useToastContext-CYdZ2BD2.js +49 -0
  832. package/dist/useTrustMembers-BvFhj1PW.js +163 -0
  833. package/dist/useUnincorporatedPartnershipMembers-wCGUg18Y.js +99 -0
  834. package/dist/useUpdateBusinessLines-DAHY8qXu.js +339 -0
  835. package/dist/useUpdateLegalEntity-B7VJAlhD.js +40 -0
  836. package/dist/utils-BCit-Kzj.js +58 -0
  837. package/dist/utils-BU2KHXr7.js +237 -0
  838. package/dist/utils-BiqRkf5f.js +159 -0
  839. package/dist/utils-C4cwFCf5.js +778 -0
  840. package/dist/utils-Cc8niKnm.js +29 -0
  841. package/dist/validate-BnkIeDb7.js +434 -0
  842. package/dist/validate-fYuz9-yq.js +108 -0
  843. package/dist/validationError-Bod1gd-k.js +86 -0
  844. package/dist/warning-circle-fill-DBvt921B.js +17 -0
  845. package/dist/warning-diamond-filled-Lb2od2ry.js +17 -0
  846. package/dist/webinar-m9nuFZBt.js +22 -0
  847. package/dist/yapily-logo-BduxhNRA.js +17 -0
  848. package/package.json +78 -57
  849. package/dist/4-people-BzyXLUF9.js +0 -24
  850. package/dist/AcceptTermsOfServiceComponent-CmHBNGjM.js +0 -659
  851. package/dist/Accordion-Cp_VkxR6.js +0 -88
  852. package/dist/AccountSetupRejected-CoxWTlar.js +0 -26
  853. package/dist/ActionBar-CxUKVmTE.js +0 -31
  854. package/dist/Address-Db6Q_KUo.js +0 -1348
  855. package/dist/Alert-DEiOX0nw.js +0 -159
  856. package/dist/Avatar-3K6S_tIS.js +0 -60
  857. package/dist/BG-DlvaKo4n.js +0 -27
  858. package/dist/BusinessDetailsMultiformDropin-CYoIN4Fa.js +0 -4220
  859. package/dist/BusinessFinancingComponent-DyvM-fsY.js +0 -54
  860. package/dist/BusinessFinancingDropin-BOvR4LwU.js +0 -1853
  861. package/dist/BusinessFinancingPage-8C0ztBfS.js +0 -43
  862. package/dist/BusinessTypeSelectionPage-DpZAsa8K.js +0 -427
  863. package/dist/Card-CdpPhK9y.js +0 -82
  864. package/dist/ConstitutionalDocument-NLs6ka9K.js +0 -143
  865. package/dist/ContractViewer-Byp71k2e.js +0 -935
  866. package/dist/CountryField-9w8wRZMW.js +0 -843
  867. package/dist/CreateIndividualComponent-zGcoEyq0.js +0 -71
  868. package/dist/CreateTransferInstrumentComponent-Ct_v-IyH.js +0 -63
  869. package/dist/Currency-53s7DEeh.js +0 -183
  870. package/dist/CustomerSupport-BRcUQ4fR.js +0 -153
  871. package/dist/DebugModal-CokbXGK9.js +0 -413
  872. package/dist/DecisionMakerDetailsPage-B5cLY8iP.js +0 -106
  873. package/dist/DecisionMakers-BQ24LfqB.js +0 -830
  874. package/dist/EmbeddedStatus-DB9B_u3L.js +0 -99
  875. package/dist/EndStateLayout-BWC5aqVS.js +0 -71
  876. package/dist/EntityAssociation-gzYdcHoL.js +0 -159
  877. package/dist/EntityGuidanceStatus-BKeZKnbP.js +0 -105
  878. package/dist/FormFlow-Cf3Ff2qw.js +0 -224
  879. package/dist/FormNavigation-CjgZbv9G.js +0 -144
  880. package/dist/FormWrapper-dbBZegkX.js +0 -135
  881. package/dist/IndividualOnfido-Cc7dydKq.js +0 -9594
  882. package/dist/IndividualOnfidoDropin-BpU2cL4E.js +0 -2497
  883. package/dist/InputText-Dsw9kiwL.js +0 -249
  884. package/dist/Introduction-C8mTk4l_.js +0 -300
  885. package/dist/JpAddress-R81eO-aY.js +0 -280
  886. package/dist/LegalRepresentativeDetailsPage-DIQX18v2.js +0 -60
  887. package/dist/ListItem-D3p6EgP_.js +0 -69
  888. package/dist/ManageIndividualComponent-CmM-vP9E.js +0 -46
  889. package/dist/ManageTermsOfServiceComponent-C3hXZJx5.js +0 -52
  890. package/dist/ManageTransferInstrumentComponent-co6LYrVY.js +0 -287
  891. package/dist/MaybeModal-BVQOzETz.js +0 -25
  892. package/dist/Modal-CloeVnNp.js +0 -149
  893. package/dist/OnboardingDropinComponent-CDAK4v1o.js +0 -7908
  894. package/dist/PayoutDetailsDropin-DCrlrNki.js +0 -4841
  895. package/dist/Review-Dqn49vJM.js +0 -83
  896. package/dist/RootBusinessDetailsPage-DSEq3TIn.js +0 -61
  897. package/dist/RootBusinessLinesPage-CbPhOber.js +0 -1118
  898. package/dist/RootIndividualDetailsPage-Bp_7gSIB.js +0 -71
  899. package/dist/SignPCIComponent-B6kYuqT_.js +0 -304
  900. package/dist/SingpassSelection-aDrNTYr3.js +0 -130
  901. package/dist/SoleProprietorshipPage-HnUsyjKp.js +0 -60
  902. package/dist/SourceOfFundsPage-BkMEIV_L.js +0 -2383
  903. package/dist/StepProgressIndicator-BgeMe93n.js +0 -78
  904. package/dist/StoreProvider-BFN15Go9.js +0 -7674
  905. package/dist/Summary-BkE_c8pU.js +0 -204
  906. package/dist/TaxReportingDropin-LG9zvOMN.js +0 -502
  907. package/dist/TrustDetailsPage-C8w8pEvB.js +0 -2149
  908. package/dist/TrustMemberCompanyPage-IDEwpLW3.js +0 -73
  909. package/dist/TrustMemberIndividualPage-rKB3iVFk.js +0 -66
  910. package/dist/TrustMemberRoleAndTypePage-CLtX8V0M.js +0 -985
  911. package/dist/TrustMembersOverview-Bs203hm0.js +0 -438
  912. package/dist/UnincorporatedPartnershipIndividualPage-CBTaUEld.js +0 -65
  913. package/dist/UnincorporatedPartnershipMemberCompanyPage-ZnLe9Uq3.js +0 -76
  914. package/dist/UnincorporatedPartnershipMemberRoleAndTypePage-BXImA2c_.js +0 -281
  915. package/dist/UnincorporatedPartnershipMembersOverview-c7k2JzcO.js +0 -172
  916. package/dist/VerificationErrorAlert-uubpHQGE.js +0 -79
  917. package/dist/ViewVerificationStatusComponent-DO9L2hEO.js +0 -180
  918. package/dist/arrow-right-KxA3SvQj.js +0 -14
  919. package/dist/bag-BPumznWh.js +0 -14
  920. package/dist/bank-D6FiNBhs.js +0 -14
  921. package/dist/bg-BG-B7Xs_t04.js +0 -13
  922. package/dist/bg-BG-CepHap8j.js +0 -68
  923. package/dist/bg-BG-D9J6LnkI.js +0 -57
  924. package/dist/bg-BG-DH45-0B-.js +0 -29
  925. package/dist/bg-BG-DRkMqyL8.js +0 -13
  926. package/dist/bg-BG-Dp4LxSP7.js +0 -37
  927. package/dist/bg-BG-DpIAKQve.js +0 -113
  928. package/dist/bg-BG-mLSjG76Q.js +0 -13
  929. package/dist/bg-BG-wVquMNtT.js +0 -55
  930. package/dist/bin-Bz6KOIeE.js +0 -18
  931. package/dist/business-lines-DboUCbXw.js +0 -135
  932. package/dist/capital-GVQ3svwN.js +0 -17
  933. package/dist/cash-stack-D9AoDDwt.js +0 -22
  934. package/dist/certificate-CdEWgHQf.js +0 -17
  935. package/dist/checkmark-Q7x6tGhy.js +0 -14
  936. package/dist/checkmark-circle-fill-CsvN5_PL.js +0 -17
  937. package/dist/checkmark-circle-x7dzbp3I.js +0 -20
  938. package/dist/checkmark-small-D35myntq.js +0 -14
  939. package/dist/chevron-down-C2iDorpW.js +0 -14
  940. package/dist/chevron-left-ztPO84q-.js +0 -14
  941. package/dist/chevron-right-C_JN0oDt.js +0 -14
  942. package/dist/chevron-up-CgG8n25g.js +0 -14
  943. package/dist/circle-Bt3Nlr3q.js +0 -17
  944. package/dist/circle-small-filled-YMzP6yQU.js +0 -14
  945. package/dist/clock-BZHremOA.js +0 -20
  946. package/dist/coins-fkAk6dCo.js +0 -17
  947. package/dist/contract-BTa4HltT.js +0 -14
  948. package/dist/cross-Cn09MtQ_.js +0 -14
  949. package/dist/cross-circle-fill-small-DCz52AuN.js +0 -14
  950. package/dist/cs-CZ--jOkoHVS.js +0 -55
  951. package/dist/cs-CZ-BDf9m4Rw.js +0 -113
  952. package/dist/cs-CZ-BP7niQM9.js +0 -68
  953. package/dist/cs-CZ-BSWXexr4.js +0 -13
  954. package/dist/cs-CZ-BsV9NiQ2.js +0 -13
  955. package/dist/cs-CZ-CyLqoG1j.js +0 -37
  956. package/dist/cs-CZ-DPVMeRye.js +0 -29
  957. package/dist/cs-CZ-DY_pQqAT.js +0 -57
  958. package/dist/cs-CZ-DalFZigH.js +0 -13
  959. package/dist/da-DK-CI-vfqPo.js +0 -113
  960. package/dist/da-DK-D4Ojw97o.js +0 -13
  961. package/dist/da-DK-DU4dCNEw.js +0 -29
  962. package/dist/da-DK-DYpfNZdP.js +0 -37
  963. package/dist/da-DK-Dc0QYG8m.js +0 -68
  964. package/dist/da-DK-JHZnsI59.js +0 -55
  965. package/dist/da-DK-P3YSaBqs.js +0 -13
  966. package/dist/da-DK-R_y7YwqQ.js +0 -13
  967. package/dist/da-DK-jK7c9UL0.js +0 -57
  968. package/dist/de-DE-BR6CLZw6.js +0 -13
  969. package/dist/de-DE-BXt1K0Tr.js +0 -37
  970. package/dist/de-DE-BcuLmcC8.js +0 -13
  971. package/dist/de-DE-Dz2OsS1F.js +0 -68
  972. package/dist/de-DE-Dz2l6jRl.js +0 -29
  973. package/dist/de-DE-VGGEkxUT.js +0 -55
  974. package/dist/de-DE-nG2MBigU.js +0 -113
  975. package/dist/de-DE-opyC1JO-.js +0 -13
  976. package/dist/de-DE-wmerDL2e.js +0 -57
  977. package/dist/debouncedInputEvent-Dlbc7VjU.js +0 -109
  978. package/dist/decision-makers-group-CgddXgrx.js +0 -1944
  979. package/dist/digital-wallet-D_IpxnkN.js +0 -46
  980. package/dist/document-1-C08ut-Dt.js +0 -14
  981. package/dist/document-blurred-2Zpodj3_.js +0 -37
  982. package/dist/document-cut-off-ClS7RiOp.js +0 -32
  983. package/dist/document-expired-CjksBq-N.js +0 -38
  984. package/dist/document-front-DiAairT3.js +0 -30
  985. package/dist/document-person-vxlA6C5f.js +0 -20
  986. package/dist/documentUtils-CUgKVLK4.js +0 -218
  987. package/dist/download-Drhk9k1f.js +0 -17
  988. package/dist/dropinUtils-D2lBlNWp.js +0 -202
  989. package/dist/edit-1-CFoDTMvQ.js +0 -14
  990. package/dist/el-GR-B3FHqTOX.js +0 -13
  991. package/dist/el-GR-B90M6tcZ.js +0 -37
  992. package/dist/el-GR-BHG69mXl.js +0 -68
  993. package/dist/el-GR-BX-MyQZY.js +0 -113
  994. package/dist/el-GR-Btrk_npt.js +0 -57
  995. package/dist/el-GR-CWd7XYDU.js +0 -13
  996. package/dist/el-GR-CofvCav-.js +0 -13
  997. package/dist/el-GR-MLFY-Gg7.js +0 -29
  998. package/dist/el-GR-gkaKwnln.js +0 -55
  999. package/dist/en-US-BPI4FZwa.js +0 -113
  1000. package/dist/en-US-CzEL6t1W.js +0 -55
  1001. package/dist/en-US-D-B35AoN.js +0 -68
  1002. package/dist/en-US-DYo4OF-P.js +0 -29
  1003. package/dist/en-US-Dg505Oh3.js +0 -37
  1004. package/dist/en-US-fyGPkcqX.js +0 -13
  1005. package/dist/en-US-gsp7CD_E.js +0 -57
  1006. package/dist/es-ES-0ROz-BJh.js +0 -29
  1007. package/dist/es-ES-BAg3NqQO.js +0 -13
  1008. package/dist/es-ES-BI_jdT67.js +0 -68
  1009. package/dist/es-ES-BhINIOee.js +0 -13
  1010. package/dist/es-ES-BhNhIf08.js +0 -37
  1011. package/dist/es-ES-Bn9_0wK0.js +0 -55
  1012. package/dist/es-ES-CEp-ttVJ.js +0 -13
  1013. package/dist/es-ES-Q16q2JJ6.js +0 -113
  1014. package/dist/es-ES-Qnc0Q6JH.js +0 -57
  1015. package/dist/et-EE-BMgFCxds.js +0 -37
  1016. package/dist/et-EE-BYSnV6Iq.js +0 -55
  1017. package/dist/et-EE-Bk2IHQWP.js +0 -13
  1018. package/dist/et-EE-C_PZO2aI.js +0 -68
  1019. package/dist/et-EE-Ci8RU2wg.js +0 -13
  1020. package/dist/et-EE-DmShD6oS.js +0 -113
  1021. package/dist/et-EE-TzXANcP2.js +0 -57
  1022. package/dist/et-EE-esci5847.js +0 -29
  1023. package/dist/et-EE-x29FUaYN.js +0 -118
  1024. package/dist/external-link-DCMYUMfW.js +0 -14
  1025. package/dist/fi-FI-B_P4BAda.js +0 -113
  1026. package/dist/fi-FI-CDISJifz.js +0 -13
  1027. package/dist/fi-FI-DjlB2a7k.js +0 -13
  1028. package/dist/fi-FI-Dn2MC8uW.js +0 -57
  1029. package/dist/fi-FI-MiyuQqH8.js +0 -13
  1030. package/dist/fi-FI-PVFqd5Ra.js +0 -55
  1031. package/dist/fi-FI-hwzizPnr.js +0 -68
  1032. package/dist/fi-FI-xXrvDLFe.js +0 -29
  1033. package/dist/fi-FI-ysUrBilO.js +0 -37
  1034. package/dist/fieldConfigurations-C38LzPl3.js +0 -1402
  1035. package/dist/fr-FR-BSvSKazD.js +0 -37
  1036. package/dist/fr-FR-BWX14yb7.js +0 -57
  1037. package/dist/fr-FR-Bw9O-QAU.js +0 -29
  1038. package/dist/fr-FR-CUdiBCVB.js +0 -113
  1039. package/dist/fr-FR-CYZXbwc9.js +0 -68
  1040. package/dist/fr-FR-DGMVrsJv.js +0 -13
  1041. package/dist/fr-FR-Dx-CiPdB.js +0 -13
  1042. package/dist/fr-FR-aJ3cg4x0.js +0 -13
  1043. package/dist/fr-FR-mJK4hjwD.js +0 -55
  1044. package/dist/funds-in-D8bj0aoE.js +0 -21
  1045. package/dist/getFieldsWithExistingData-B0l_1eCG.js +0 -22
  1046. package/dist/getName-CIw0MR9e.js +0 -48
  1047. package/dist/gift-CQ_DEma7.js +0 -14
  1048. package/dist/graph-BJmqglH2.js +0 -21
  1049. package/dist/graph-up-Bq6adtlX.js +0 -20
  1050. package/dist/hasDataChanged-B-_hLK5I.js +0 -19
  1051. package/dist/headquarter-DNYyuuFq.js +0 -21
  1052. package/dist/hotel-BuNql78Z.js +0 -22
  1053. package/dist/house-B6sNRj-B.js +0 -21
  1054. package/dist/hr-HR-BHt_jklG.js +0 -13
  1055. package/dist/hr-HR-BLpGb4f2.js +0 -37
  1056. package/dist/hr-HR-CXpCIMhI.js +0 -113
  1057. package/dist/hr-HR-CZLSQruE.js +0 -57
  1058. package/dist/hr-HR-D8_yhtIo.js +0 -29
  1059. package/dist/hr-HR-VivDwwdW.js +0 -13
  1060. package/dist/hr-HR-bE6cvRCQ.js +0 -68
  1061. package/dist/hr-HR-n7aMHIpM.js +0 -13
  1062. package/dist/hr-HR-qmYyO-nT.js +0 -55
  1063. package/dist/hu-HU-CS-7iNS4.js +0 -55
  1064. package/dist/hu-HU-Ca9Hex26.js +0 -37
  1065. package/dist/hu-HU-DDsdPI5V.js +0 -13
  1066. package/dist/hu-HU-DG-NUDx4.js +0 -68
  1067. package/dist/hu-HU-D_DvlCMw.js +0 -13
  1068. package/dist/hu-HU-DqEBeq-w.js +0 -113
  1069. package/dist/hu-HU-KliQetm5.js +0 -29
  1070. package/dist/hu-HU-WEtpzb41.js +0 -13
  1071. package/dist/hu-HU-kp8Go5hZ.js +0 -57
  1072. package/dist/id-blurred-9dzBOWCE.js +0 -59
  1073. package/dist/id-cut-off-CohJCI2h.js +0 -55
  1074. package/dist/id-front-CSZfvdRg.js +0 -52
  1075. package/dist/id-glare-Q2JWo5ts.js +0 -49
  1076. package/dist/id-verification-instant-BUVBO4R3.js +0 -58
  1077. package/dist/id-verification-manual-B3YZALYU.js +0 -55
  1078. package/dist/iframeWidget-yBLSAmf8.js +0 -234
  1079. package/dist/image-BSihO8lR.js +0 -17
  1080. package/dist/info-vHTZWoJ7.js +0 -21
  1081. package/dist/instant-verification-Dvvkyfmp.js +0 -40
  1082. package/dist/it-IT-B0YGvVgW.js +0 -57
  1083. package/dist/it-IT-BTWkWSJq.js +0 -55
  1084. package/dist/it-IT-C2MZo4KT.js +0 -13
  1085. package/dist/it-IT-DLm11dH5.js +0 -13
  1086. package/dist/it-IT-Erh1DIlj.js +0 -68
  1087. package/dist/it-IT-MwpjRAG6.js +0 -29
  1088. package/dist/it-IT-NCFAqV1F.js +0 -113
  1089. package/dist/it-IT-Qfzc8jnW.js +0 -37
  1090. package/dist/it-IT-yV7ewjWU.js +0 -13
  1091. package/dist/ja-JP-2u5fqLWF.js +0 -29
  1092. package/dist/ja-JP-Bktpl_2b.js +0 -118
  1093. package/dist/ja-JP-CHQ64lw1.js +0 -37
  1094. package/dist/ja-JP-CSz7fEkn.js +0 -55
  1095. package/dist/ja-JP-CWe8f7m4.js +0 -13
  1096. package/dist/ja-JP-C_-moDrA.js +0 -113
  1097. package/dist/ja-JP-Ctsk4z4q.js +0 -151
  1098. package/dist/ja-JP-Dz9IVH4p.js +0 -57
  1099. package/dist/ja-JP-ThzG9vIo.js +0 -68
  1100. package/dist/ja-JP-bz7ekGnF.js +0 -27
  1101. package/dist/localizeDateString-C-G2nUor.js +0 -27
  1102. package/dist/location-Q4oKvnkl.js +0 -17
  1103. package/dist/lt-LT-0RKZeraM.js +0 -37
  1104. package/dist/lt-LT-B6XmKUXx.js +0 -55
  1105. package/dist/lt-LT-BEsBoIQ9.js +0 -29
  1106. package/dist/lt-LT-CU5qHa7a.js +0 -113
  1107. package/dist/lt-LT-CYiW52tl.js +0 -13
  1108. package/dist/lt-LT-Cg9c0kae.js +0 -13
  1109. package/dist/lt-LT-Nd1uRoIj.js +0 -68
  1110. package/dist/lt-LT-W6fTjwB5.js +0 -13
  1111. package/dist/lt-LT-l9rzkFg9.js +0 -57
  1112. package/dist/lv-LV-Bh-WQp0K.js +0 -37
  1113. package/dist/lv-LV-CgMxfFK8.js +0 -13
  1114. package/dist/lv-LV-CpGkmcLz.js +0 -113
  1115. package/dist/lv-LV-CxUmQHF9.js +0 -13
  1116. package/dist/lv-LV-DKhV24CI.js +0 -68
  1117. package/dist/lv-LV-DYbb5pkt.js +0 -57
  1118. package/dist/lv-LV-DsSpy50n.js +0 -55
  1119. package/dist/lv-LV-DsxFGThp.js +0 -13
  1120. package/dist/lv-LV-Veji7-on.js +0 -29
  1121. package/dist/mail-BOdyoVqB.js +0 -14
  1122. package/dist/manual-verification-BvZWqA00.js +0 -41
  1123. package/dist/mapExistingFile-BhW5UmN9.js +0 -156
  1124. package/dist/mapFinancialReportsToFinancialInformation-Dl-cl9eQ.js +0 -67
  1125. package/dist/mapJpAddressSchemaToAddressLocalizations-KFAvfuC1.js +0 -63
  1126. package/dist/mapLegalEntityToIndividualOnfidoSchema-D51tRiYd.js +0 -143
  1127. package/dist/mapTransferInstrumentToPayoutAccount-CU5wx0wJ.js +0 -33
  1128. package/dist/minus-circle-filled-kC2IUvKz.js +0 -17
  1129. package/dist/nl-NL-BMUYBqlF.js +0 -57
  1130. package/dist/nl-NL-Bk-1-C0e.js +0 -13
  1131. package/dist/nl-NL-BuW3jWdI.js +0 -29
  1132. package/dist/nl-NL-CMw-FwQV.js +0 -13
  1133. package/dist/nl-NL-CTf7zH4M.js +0 -55
  1134. package/dist/nl-NL-D7gBNWEY.js +0 -37
  1135. package/dist/nl-NL-DKMs4pB2.js +0 -13
  1136. package/dist/nl-NL-DMpB18Te.js +0 -113
  1137. package/dist/nl-NL-O9GCHMDA.js +0 -68
  1138. package/dist/no-NO-B-oUwe9q.js +0 -13
  1139. package/dist/no-NO-C-gCYc9q.js +0 -37
  1140. package/dist/no-NO-CA0EizAy.js +0 -29
  1141. package/dist/no-NO-CA1aR6Wh.js +0 -68
  1142. package/dist/no-NO-Ca5qoVaU.js +0 -113
  1143. package/dist/no-NO-DKbWxgF-.js +0 -57
  1144. package/dist/no-NO-DN9qf-_I.js +0 -13
  1145. package/dist/no-NO-Dhj0Fh__.js +0 -13
  1146. package/dist/no-NO-RfTK9KAV.js +0 -55
  1147. package/dist/onfido-logo-BWSv__sQ.js +0 -14
  1148. package/dist/options-horizontal-CBmbNv7R.js +0 -18
  1149. package/dist/partner-CPjsrePY.js +0 -18
  1150. package/dist/passport-blurred-B4UDQfmc.js +0 -59
  1151. package/dist/passport-cut-off-C0N2mgLk.js +0 -56
  1152. package/dist/passport-front-BwA7wR91.js +0 -52
  1153. package/dist/passport-front-green-BL4HmtsB.js +0 -232
  1154. package/dist/passport-glare-Mg2ixsYA.js +0 -50
  1155. package/dist/pay-by-link-plane-BVZndh67.js +0 -22
  1156. package/dist/payout-ChUEoLjt.js +0 -20
  1157. package/dist/payout-verification-instant-5u-wvFKv.js +0 -41
  1158. package/dist/payout-verification-manual-BH2mu0UW.js +0 -90
  1159. package/dist/person-DGjUU4S4.js +0 -17
  1160. package/dist/pl-PL-B0zGy_b4.js +0 -57
  1161. package/dist/pl-PL-BKDK0_G8.js +0 -68
  1162. package/dist/pl-PL-BSI0zHO1.js +0 -113
  1163. package/dist/pl-PL-D7nhdbfR.js +0 -29
  1164. package/dist/pl-PL-DGSYzOx6.js +0 -13
  1165. package/dist/pl-PL-Duj3tncM.js +0 -13
  1166. package/dist/pl-PL-Dy8qWH39.js +0 -55
  1167. package/dist/pl-PL-LnVPufjb.js +0 -37
  1168. package/dist/pl-PL-p8YxqOFg.js +0 -13
  1169. package/dist/plaid-logo-CtActXTN.js +0 -14
  1170. package/dist/plus-CWXA5wdX.js +0 -14
  1171. package/dist/plus-circle-filled-CbC0u2Y1.js +0 -17
  1172. package/dist/process-field-configurations-DoOFQqtn.js +0 -324
  1173. package/dist/pt-BR--kaJvtE6.js +0 -57
  1174. package/dist/pt-BR-BbFJsIVX.js +0 -55
  1175. package/dist/pt-BR-Be5ZycMV.js +0 -13
  1176. package/dist/pt-BR-Cj8MlQyq.js +0 -113
  1177. package/dist/pt-BR-Cm4vZocb.js +0 -13
  1178. package/dist/pt-BR-D1nTSLod.js +0 -29
  1179. package/dist/pt-BR-DKrMpM6v.js +0 -13
  1180. package/dist/pt-BR-NtLaWlnZ.js +0 -68
  1181. package/dist/pt-BR-ur86nRrK.js +0 -37
  1182. package/dist/pt-PT-B4F_5NWi.js +0 -55
  1183. package/dist/pt-PT-B9L50746.js +0 -29
  1184. package/dist/pt-PT-BJjCTMYf.js +0 -13
  1185. package/dist/pt-PT-BJkVzfAJ.js +0 -113
  1186. package/dist/pt-PT-BR-BI5Jn.js +0 -13
  1187. package/dist/pt-PT-BZ5ZZm6G.js +0 -57
  1188. package/dist/pt-PT-Bh7v8xbp.js +0 -13
  1189. package/dist/pt-PT-CVNEcs32.js +0 -37
  1190. package/dist/pt-PT-DSxxVA0f.js +0 -68
  1191. package/dist/recurring-CkL4cCM2.js +0 -17
  1192. package/dist/reporting-DerosUNm.js +0 -16
  1193. package/dist/resolveEnvironment-Dyejukh7.js +0 -164
  1194. package/dist/revenue-accelerate-Dp4Ns_5c.js +0 -17
  1195. package/dist/review-CxIN9azU.js +0 -17
  1196. package/dist/ro-RO-5I4Q_FyK.js +0 -13
  1197. package/dist/ro-RO-B8leE4ZJ.js +0 -13
  1198. package/dist/ro-RO-Bybq8JFn.js +0 -68
  1199. package/dist/ro-RO-CICjAFys.js +0 -55
  1200. package/dist/ro-RO-CdSsgoUG.js +0 -57
  1201. package/dist/ro-RO-DjGku_3y.js +0 -13
  1202. package/dist/ro-RO-DvG65dTt.js +0 -29
  1203. package/dist/ro-RO-RgC5M6CE.js +0 -113
  1204. package/dist/ro-RO-i7lojG2G.js +0 -37
  1205. package/dist/rules-DP604XPJ.js +0 -314
  1206. package/dist/save-Fgy7EDid.js +0 -14
  1207. package/dist/search-C4GZ-Rc1.js +0 -17
  1208. package/dist/show-yPjPmEf8.js +0 -17
  1209. package/dist/singpass-logo-BkMSwiGY.js +0 -17
  1210. package/dist/singpass-verification-instant-hY4eGFwl.js +0 -40
  1211. package/dist/singpass-verification-manual-DwhRpy5Q.js +0 -34
  1212. package/dist/sk-SK-0BVxI7bf.js +0 -113
  1213. package/dist/sk-SK-B5brxU1N.js +0 -37
  1214. package/dist/sk-SK-BMJgOJoa.js +0 -29
  1215. package/dist/sk-SK-BRd5TN22.js +0 -55
  1216. package/dist/sk-SK-BVmoP_EU.js +0 -13
  1217. package/dist/sk-SK-BWwRIx2d.js +0 -13
  1218. package/dist/sk-SK-Bb18qPBw.js +0 -13
  1219. package/dist/sk-SK-BiBWPJUf.js +0 -57
  1220. package/dist/sk-SK-C6rMIxpz.js +0 -68
  1221. package/dist/sl-SI-6s8xycKg.js +0 -13
  1222. package/dist/sl-SI-BMF8YtOm.js +0 -29
  1223. package/dist/sl-SI-BxImW_RL.js +0 -113
  1224. package/dist/sl-SI-CUCrzJQv.js +0 -37
  1225. package/dist/sl-SI-CaJmYb6p.js +0 -13
  1226. package/dist/sl-SI-D8dDckrW.js +0 -55
  1227. package/dist/sl-SI-DtdGMD6i.js +0 -57
  1228. package/dist/sl-SI-ZxyvdgdS.js +0 -13
  1229. package/dist/sl-SI-tPwbFvOI.js +0 -68
  1230. package/dist/solution-payments-CNAat9h7.js +0 -14
  1231. package/dist/store-IuAkDRAp.js +0 -14
  1232. package/dist/sv-SE-B1sbgsnh.js +0 -13
  1233. package/dist/sv-SE-BUq1X9F0.js +0 -113
  1234. package/dist/sv-SE-BYC_f8r7.js +0 -29
  1235. package/dist/sv-SE-C6uPh9g5.js +0 -37
  1236. package/dist/sv-SE-CCFIf86P.js +0 -13
  1237. package/dist/sv-SE-DGpvVvWj.js +0 -55
  1238. package/dist/sv-SE-D_ZnGxiQ.js +0 -13
  1239. package/dist/sv-SE-K1QT1cOt.js +0 -68
  1240. package/dist/sv-SE-kR514dO1.js +0 -57
  1241. package/dist/tax-reporting-graph-DjzwRgE6.js +0 -504
  1242. package/dist/terminal-1-_me9J9h0.js +0 -18
  1243. package/dist/tink-logo-BcIv93ND.js +0 -17
  1244. package/dist/types/components/Business/forms/AdditionalInformation/AdditionalInformationMultiform.d.ts +0 -9
  1245. package/dist/types/components/Business/forms/AdditionalInformation/VerifiedBusinessCard.d.ts +0 -9
  1246. package/dist/types/components/Business/forms/BasicInformation/BasicInformationMultiform.d.ts +0 -11
  1247. package/dist/types/components/Business/forms/BusinessDetails/BusinessDetails.d.ts +0 -3
  1248. package/dist/types/components/Business/forms/BusinessSelection/BusinessSelectionMultiform.d.ts +0 -14
  1249. package/dist/types/components/Business/forms/CompanyStructure/CompanyStructureMultiform.d.ts +0 -4
  1250. package/dist/types/components/Business/tasks/BusinessDetailsDropin/mandatoryFields.d.ts +0 -3
  1251. package/dist/types/components/Business/tasks/BusinessDetailsMultiformDropin/BusinessDetailsMultiformDropin.d.ts +0 -5
  1252. package/dist/types/components/Business/tasks/BusinessDetailsMultiformDropin/types.d.ts +0 -2
  1253. package/dist/types/components/Business/tasks/BusinessDetailsMultiformDropin/utils.d.ts +0 -19
  1254. package/dist/types/components/Individual/fields/DecisionMakerRole/DecisionMakerRole.d.ts +0 -3
  1255. package/dist/types/components/Individual/fields/DecisionMakerRole/NomineeDecisionMakerRole.d.ts +0 -10
  1256. package/dist/types/components/Individual/fields/DecisionMakerRole/types.d.ts +0 -23
  1257. package/dist/types/components/Individual/fields/LocalizedNameFields/types.d.ts +0 -9
  1258. package/dist/types/components/Individual/fields/NameFields/validate.d.ts +0 -4
  1259. package/dist/types/components/Individual/forms/Individual/IdDocumentUpload/IdDocumentAlreadyUpload.d.ts +0 -2
  1260. package/dist/types/components/Individual/forms/Individual/IdDocumentUpload/IdDocumentInstantVerification.d.ts +0 -3
  1261. package/dist/types/components/Individual/forms/Individual/IdDocumentUpload/IdDocumentUpload.d.ts +0 -3
  1262. package/dist/types/components/Individual/forms/Individual/IdDocumentUpload/types.d.ts +0 -53
  1263. package/dist/types/components/Individual/forms/Individual/IdDocumentUpload/utils.d.ts +0 -3
  1264. package/dist/types/components/Individual/forms/Individual/IdVerificationMethod/IdVerificationMethod.d.ts +0 -3
  1265. package/dist/types/components/Individual/forms/Individual/IdVerificationMethod/idVerificationMethodMetadata.d.ts +0 -15
  1266. package/dist/types/components/Individual/forms/Individual/IdVerificationMethod/types.d.ts +0 -14
  1267. package/dist/types/components/Individual/forms/Individual/Individual.d.ts +0 -9
  1268. package/dist/types/components/Individual/forms/Individual/PersonalDetails/Identity/Identity.d.ts +0 -2
  1269. package/dist/types/components/Individual/forms/Individual/PersonalDetails/Identity/IdentityAu/IdentityAu.d.ts +0 -2
  1270. package/dist/types/components/Individual/forms/Individual/PersonalDetails/Identity/IdentityAu/validate.d.ts +0 -3
  1271. package/dist/types/components/Individual/forms/Individual/PersonalDetails/Identity/IdentityHK/IdentityHK.d.ts +0 -2
  1272. package/dist/types/components/Individual/forms/Individual/PersonalDetails/Identity/IdentityHK/validate.d.ts +0 -3
  1273. package/dist/types/components/Individual/forms/Individual/PersonalDetails/Identity/IdentityNZ/IdentityNZ.d.ts +0 -2
  1274. package/dist/types/components/Individual/forms/Individual/PersonalDetails/Identity/IdentityNZ/validate.d.ts +0 -3
  1275. package/dist/types/components/Individual/forms/Individual/PersonalDetails/Identity/TypeOfIdentity/index.d.ts +0 -11
  1276. package/dist/types/components/Individual/forms/Individual/PersonalDetails/Identity/identityUS/IdentityUS.d.ts +0 -4
  1277. package/dist/types/components/Individual/forms/Individual/PersonalDetails/Identity/types.d.ts +0 -14
  1278. package/dist/types/components/Individual/forms/Individual/PersonalDetails/PersonalDetails.d.ts +0 -3
  1279. package/dist/types/components/Individual/forms/Individual/PersonalDetails/types.d.ts +0 -39
  1280. package/dist/types/components/Individual/forms/Individual/PersonalDetails/validate.d.ts +0 -21
  1281. package/dist/types/components/Individual/forms/Individual/ProofOfRelationship/types.d.ts +0 -14
  1282. package/dist/types/components/Individual/forms/Individual/ProofOfResidency/types.d.ts +0 -39
  1283. package/dist/types/components/Individual/forms/Individual/rules.d.ts +0 -40
  1284. package/dist/types/components/Individual/forms/Individual/types.d.ts +0 -51
  1285. package/dist/types/components/Individual/forms/IndividualOnfido/AdditionalPersonalDetails/AdditionalPersonalDetails.types.d.ts +0 -29
  1286. package/dist/types/components/Individual/forms/IndividualOnfido/AdditionalPersonalDetails/Identity/Identity.types.d.ts +0 -13
  1287. package/dist/types/components/Individual/forms/IndividualOnfido/AdditionalPersonalDetails/Identity/TypeOfIdentity/index.d.ts +0 -11
  1288. package/dist/types/components/Individual/forms/IndividualOnfido/AdditionalPersonalDetails/Identity/validate.d.ts +0 -4
  1289. package/dist/types/components/Individual/forms/IndividualOnfido/AdditionalPersonalDetails/validate.d.ts +0 -22
  1290. package/dist/types/components/Individual/forms/IndividualOnfido/BasicDetails/BasicDetails.types.d.ts +0 -22
  1291. package/dist/types/components/Individual/forms/IndividualOnfido/BasicDetails/validate.d.ts +0 -6
  1292. package/dist/types/components/Individual/forms/IndividualOnfido/DataConflictsModal/ConflictRow.d.ts +0 -12
  1293. package/dist/types/components/Individual/forms/IndividualOnfido/DataConflictsModal/DataConflictsModal.d.ts +0 -24
  1294. package/dist/types/components/Individual/forms/IndividualOnfido/IdNowVerificationModal/isIdNowModalOpen.d.ts +0 -17
  1295. package/dist/types/components/Individual/forms/IndividualOnfido/IdVerificationMethod/IdVerificationMethod.types.d.ts +0 -20
  1296. package/dist/types/components/Individual/forms/IndividualOnfido/IdVerificationMethod/OnfidoVerificationModal/OnfidoVerificationModal.d.ts +0 -7
  1297. package/dist/types/components/Individual/forms/IndividualOnfido/IdVerificationMethod/UploadedDocument/UploadedDocument.d.ts +0 -7
  1298. package/dist/types/components/Individual/forms/IndividualOnfido/IdVerificationMethod/individualOnfidoConflictsSchema.d.ts +0 -46
  1299. package/dist/types/components/Individual/forms/IndividualOnfido/IdVerificationMethod/mapExtractionResultToSchema.d.ts +0 -4
  1300. package/dist/types/components/Individual/forms/IndividualOnfido/IdVerificationMethod/validateExtractionResult.d.ts +0 -12
  1301. package/dist/types/components/Individual/forms/IndividualOnfido/IndividualOnfido.d.ts +0 -52
  1302. package/dist/types/components/Individual/forms/IndividualOnfido/IndividualOnfido.rules.d.ts +0 -46
  1303. package/dist/types/components/Individual/forms/IndividualOnfido/IndividualOnfido.types.d.ts +0 -59
  1304. package/dist/types/components/Individual/forms/IndividualOnfido/SignatoryQuestionnaire/SignatoryQuestionnaire.types.d.ts +0 -6
  1305. package/dist/types/components/Individual/forms/IndividualOnfido/UboQuestionnaire/UboQuestionnaire.types.d.ts +0 -13
  1306. package/dist/types/components/Individual/forms/IndividualOnfido/UboQuestionnaire/UboQuestionnaireModalContent.d.ts +0 -7
  1307. package/dist/types/components/Individual/helpers/isOnfidoAutofillFlowEnabled.d.ts +0 -4
  1308. package/dist/types/components/Individual/mapping/adjustIdentificationData.d.ts +0 -3
  1309. package/dist/types/components/Individual/mapping/getIdentityTypeToApiIdentityTypeMap.d.ts +0 -3
  1310. package/dist/types/components/Individual/mapping/individualOnfidoKeyMappings.d.ts +0 -8
  1311. package/dist/types/components/Individual/mapping/mapIndividualOnfidoSchemaToLegalEntity.d.ts +0 -5
  1312. package/dist/types/components/Individual/mapping/mapIndividualToLegalEntity.d.ts +0 -3
  1313. package/dist/types/components/Individual/mapping/mapLegalEntityToIndividual.d.ts +0 -3
  1314. package/dist/types/components/Individual/mapping/mapLegalEntityToIndividualOnfidoSchema.d.ts +0 -3
  1315. package/dist/types/components/Individual/tasks/IndividualOnfidoDropin/IndividualOnfidoDropin.d.ts +0 -2
  1316. package/dist/types/components/Individual/tasks/IndividualOnfidoDropin/individualOnfidoFormConfig.d.ts +0 -4
  1317. package/dist/types/components/Shared/forms/BusinessTypeSelection/EntityTypeRadioGroupCard.d.ts +0 -11
  1318. package/dist/types/components/Shared/forms/FinancialInformation/formatFinancialInformationSummary.d.ts +0 -4
  1319. package/dist/types/components/Shared/forms/FinancialInformation/mapping/mapFinancialInformationToFinancialReport.d.ts +0 -3
  1320. package/dist/types/components/Shared/forms/FinancialInformation/mapping/mapFinancialReportsToFinancialInformation.d.ts +0 -3
  1321. package/dist/types/components/Shared/tasks/TaskList/utils.d.ts +0 -8
  1322. package/dist/types/components/ui/molecules/Card/Card.d.ts +0 -3
  1323. package/dist/types/components/ui/molecules/Card/types.d.ts +0 -26
  1324. package/dist/types/embeds/EmbedBaseElement.d.ts +0 -41
  1325. package/dist/types/embeds/EmbedCore.d.ts +0 -22
  1326. package/dist/types/embeds/business-financing/AdyenBusinessFinancing.d.ts +0 -13
  1327. package/dist/types/embeds/individual-configuration/AdyenIndividual.d.ts +0 -12
  1328. package/dist/types/embeds/individual-status/AdyenManageIndividual.d.ts +0 -12
  1329. package/dist/types/embeds/onboarding/AdyenOnboarding.d.ts +0 -12
  1330. package/dist/types/embeds/terms-of-service-management/AdyenTermsOfService.d.ts +0 -12
  1331. package/dist/types/embeds/terms-of-service-status/AdyenManageTermsOfService.d.ts +0 -12
  1332. package/dist/types/embeds/transfer-instrument-configuration/AdyenTransferInstrument.d.ts +0 -16
  1333. package/dist/types/embeds/transfer-instrument-management/AdyenManageTransferInstrument.d.ts +0 -14
  1334. package/dist/types/embeds/verification-status/AdyenVerificationStatus.d.ts +0 -20
  1335. package/dist/types-C972Lk6s.js +0 -34
  1336. package/dist/types-CLz74bOT.js +0 -88
  1337. package/dist/types-Ctv8hbzY.js +0 -74
  1338. package/dist/types-f66rmUFy.js +0 -164
  1339. package/dist/upload-BF65P4KM.js +0 -17
  1340. package/dist/us-check-CYY6Crhr.js +0 -46
  1341. package/dist/us-check-account-number-C7KE5YzX.js +0 -48
  1342. package/dist/us-check-routing-number-DUbhsYAR.js +0 -49
  1343. package/dist/useAssociatedLegalEntity-DAB1oG6O.js +0 -33
  1344. package/dist/useCreateLegalEntity-BK5YcHA-.js +0 -31
  1345. package/dist/useDataset-BtfHQp4w.js +0 -220
  1346. package/dist/useForm-wQyeWa1b.js +0 -1623
  1347. package/dist/useGlobalData-B33uuhtd.js +0 -68
  1348. package/dist/useMultiForm-rZmCYsI4.js +0 -864
  1349. package/dist/useOnboardingStatus-BbIpiZR4.js +0 -27
  1350. package/dist/useScenarios-DPOodENA.js +0 -46
  1351. package/dist/useTermsOfServiceStatus-DKeMR4Xi.js +0 -42
  1352. package/dist/useToastContext-BK9oGWtb.js +0 -60
  1353. package/dist/useUnincorporatedPartnershipMembers-Cdts5Hbn.js +0 -99
  1354. package/dist/useUpdateBusinessLines-CWYtpMwr.js +0 -46
  1355. package/dist/useUpdateLegalEntity-oa8qEzc4.js +0 -39
  1356. package/dist/utils-AP5TpAhf.js +0 -774
  1357. package/dist/utils-COz1RbbA.js +0 -237
  1358. package/dist/validate-BYwVLb-X.js +0 -41
  1359. package/dist/validate-CBVdP51L.js +0 -100
  1360. package/dist/validationError-CvZLhw5H.js +0 -86
  1361. package/dist/warning-circle-fill-CEN1WL7A.js +0 -17
  1362. package/dist/warning-diamond-filled-BfXMlVrG.js +0 -17
  1363. package/dist/webinar-DqjqrNEv.js +0 -22
  1364. package/dist/yapily-logo-CZ4ywjwA.js +0 -17
  1365. /package/dist/types/components/{Shared → Apps}/tasks/TaskList/PayoutAccountTaskListItem.d.ts +0 -0
  1366. /package/dist/types/components/{Shared → Apps}/tasks/TaskList/TaskList.d.ts +0 -0
  1367. /package/dist/types/components/{Shared → Apps}/tasks/TaskList/TaskListGroup.d.ts +0 -0
  1368. /package/dist/types/components/{Shared → Apps}/tasks/TaskList/TaskListItem.d.ts +0 -0
  1369. /package/dist/types/components/{Shared → Apps}/tasks/TaskList/types.d.ts +0 -0
  1370. /package/dist/types/components/Business/{tasks/BusinessDetailsMultiformDropin → forms/BusinessDetails}/BusinessDetailsMultiform.d.ts +0 -0
  1371. /package/dist/types/components/{Shared → Business}/forms/FinancialInformation/FinancialInformation.d.ts +0 -0
  1372. /package/dist/types/components/{Shared → Business}/forms/FinancialInformation/ReportedValue.d.ts +0 -0
  1373. /package/dist/types/components/{Shared → Business}/forms/FinancialInformation/types.d.ts +0 -0
  1374. /package/dist/types/components/{Shared → Business}/forms/FinancialInformation/validate.d.ts +0 -0
  1375. /package/dist/types/components/Business/tasks/{BusinessDetailsMultiformDropin → BusinessDetailsDropin}/validate.d.ts +0 -0
  1376. /package/dist/types/components/Individual/forms/{IndividualOnfido/AdditionalPersonalDetails → AdditionalPersonalDetails}/AdditionalPersonalDetails.d.ts +0 -0
  1377. /package/dist/types/components/Individual/forms/{IndividualOnfido/AdditionalPersonalDetails → AdditionalPersonalDetails}/Identity/Identity.d.ts +0 -0
  1378. /package/dist/types/components/Individual/forms/{IndividualOnfido/BasicDetails → BasicDetails}/BasicDetails.d.ts +0 -0
  1379. /package/dist/types/components/Individual/forms/{IndividualOnfido/GuidanceQuestion → GuidanceQuestion}/GuidanceQuestion.d.ts +0 -0
  1380. /package/dist/types/components/Individual/forms/{Individual/IdDocumentUpload → IdDocumentUpload}/IdDocumentManualUpload.d.ts +0 -0
  1381. /package/dist/types/components/Individual/forms/{IndividualOnfido/IdNowVerificationModal → IdNowVerificationModal}/IdNowVerificationModal.d.ts +0 -0
  1382. /package/dist/types/components/Individual/forms/{Individual/IdVerification → IdVerification}/IdVerification.d.ts +0 -0
  1383. /package/dist/types/components/Individual/forms/{Individual/IdVerification → IdVerification}/idVerificationProviderId.d.ts +0 -0
  1384. /package/dist/types/components/Individual/forms/{Individual/IdVerification → IdVerification}/types.d.ts +0 -0
  1385. /package/dist/types/components/Individual/forms/{IndividualOnfido/IdVerificationMethod → IdVerificationMethod}/IdVerificationMethod.d.ts +0 -0
  1386. /package/dist/types/components/Individual/forms/{IndividualOnfido/ManualIdUpload → ManualIdUpload}/ManualIdUpload.d.ts +0 -0
  1387. /package/dist/types/components/Individual/forms/{Individual/ProofOfRelationship → ProofOfRelationship}/index.d.ts +0 -0
  1388. /package/dist/types/components/Individual/forms/{Individual/ProofOfResidency → ProofOfResidency}/ProofOfResidency.d.ts +0 -0
  1389. /package/dist/types/components/Individual/forms/{IndividualOnfido/SignatoryQuestionnaire → SignatoryQuestionnaire}/SignatoryQuestionnaire.d.ts +0 -0
  1390. /package/dist/types/components/Individual/forms/{IndividualOnfido/SignatoryQuestionnaire → SignatoryQuestionnaire}/SignatoryQuestionnaireModalContent.d.ts +0 -0
  1391. /package/dist/types/components/Individual/forms/{IndividualOnfido/UboQuestionnaire → UboQuestionnaire}/UboQuestionnaire.d.ts +0 -0
  1392. /package/dist/types/components/Individual/tasks/{IndividualOnfidoDropin/IndividualOnfidoStore.d.ts → IndividualDropin/IndividualStore.d.ts} +0 -0
  1393. /package/dist/types/components/{Individual → Shared}/fields/LocalizedNameFields/LocalizedNameFields.d.ts +0 -0
@@ -1,4220 +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] = "0059a976-3037-4a0f-9425-c9a18524fcf5", e._sentryDebugIdIdentifier = "sentry-dbid-0059a976-3037-4a0f-9425-c9a18524fcf5");
6
- } catch (e) {
7
- }
8
- }
9
- ;
10
- import { jsx, jsxs, Fragment } from "preact/jsx-runtime";
11
- import { u as useTranslation, B as Button, H as Typography, C as CountryCodes, W as useI18nContext, P as TaskTypes, t as LegalEntityTypes, $ as entriesOf, bB as businessDetailsComponentsKeyMapping, bC as solePropBusinessDetailsKeyMapping, aj as objectsDeepEqual, ap as keysOf, i as isUndefinedOrNull, bD as solePropBusinessDetailsApiKeyMapping, bo as businessDetailsApiKeyMapping, U as createLogger, b7 as filterOutUnwantedAssociationsIfRootLE, X as isEmpty$1, b5 as drop, af as getOwnEntityAssociations, aU as doArraysMatch, M as useAccountHolder, a0 as useAnalyticsContext, p as useExperimentsContext, o as useSettingsContext, b as useApiContext, a2 as useQueryClient, bE as solePropBusinessDetailsDocumentMapping, bF as businessDetailsDocumentMapping, c as useLegalEntity, R as ROOT_LE, L as Loader } from "./StoreProvider-BFN15Go9.js";
12
- import { useState, useEffect, useRef, useCallback, useMemo } from "preact/hooks";
13
- import { g as getForms, B as BasicInformation, C as CompanyStructure, A as AdditionalInformation, F as FinancialInformation, h as getDefaultRegistrationNumberType, i as getDefaultVatNumberType, j as FIELDS_NEEDED_FOR_COMPANY_SEARCH, k as companyTypeMetadata, l as documentFormsIds, r as registrationNumberDefaultFieldMetadata, m as inferCompanyRegistrationNumberType, o as registrationNumberDefaultFieldConfig, v as verifiedBusiness, s as setIsBankAccountRequestedForOrganization, p as useCompanySearch, q as useCompanySelection, t as useVerifyTin, w as useClearCompanyData, x as useBusinessLines, y as isNormalizedStringMatch, z as setVerifiedBusiness, D as useIndustryCodes, G as useDebouncedState, H as legalFormFieldMetadata, I as stockTickerSymbolFieldMetadata, J as stockISINFieldMetadata, K as stockExchangeMICFieldMetadata, L as dateOfIncorporationFieldMetadata, M as industryCodeFieldMetadata, N as eInvoicingCodeFieldMetadata, P as vatAbsenceReasonMetadata, Q as defaultFieldMetadata, R as defaultFieldConfig, S as doingBusinessAsFieldMetadata, T as doingBusinessAsAbsentFieldMetadata, V as VerifiedBusinessCard, U as LEGAL_FORM_FIELDS, W as DBA_NAME_FIELD, X as DBANameField, Y as BUSINESS_REGISTRATION_NUMBER_FIELD, Z as BusinessRegistrationNumberField, _ as VAT_NUMBER_FIELD, $ as VatNumberField, a0 as EInvoicingCodeField, a1 as EINVOICING_CODE_FIELD, a2 as INDUSTRY_CODE_FIELD, a3 as IndustryCodeField, a4 as DATE_OF_INCORPORATION_FIELD, a5 as DateOfIncorporationField, a6 as STOCK_EXCHANGE_MIC_FIELD, a7 as StockExchangeMICField, a8 as STOCK_ISIN_FIELD, a9 as StockISINField, aa as STOCK_TICKER_SYMBOL_FIELD, ab as StockTickerSymbolField, ac as ADDITIONAL_INFORMATION_FORM_ID, ad as localizedLegalCompanyNameFieldConfig, ae as defaultFieldMetadata$1, af as defaultFieldConfig$1, ag as defaultFieldMetadataV4, ah as defaultFieldMetadata$2, ai as defaultFieldConfigV4, aj as defaultFieldConfig$2, ak as useLegalCompanyNameField, al as COUNTRY_OF_GOVERNING_LAW_FIELD, am as CountryOfGoverningLawField, an as LEGAL_COMPANY_NAME_FIELD, ao as isBankAccountRequestedForOrganization, ap as companyTypeOptions, aq as useCompanyTypeExamples, E as EntityTypeRadioGroupCard, ar as BusinessSelectionMultiform, as as isVerifiedSingleCompanySearchResult, at as exemptFromRegistrationNumberDefaultFieldMetadata, au as CountryOfGoverningLawFieldValidation, av as CountryFieldValidation, aw as financialInfoValidationWithEmployeesRules, ax as CompanyStructureValidation, ay as tinMatched, az as businessMismatchModalOpen, aA as applyVerifiedBusinessData, aB as KOMPANY_SEARCH_FAILURE } from "./OnboardingDropinComponent-CDAK4v1o.js";
14
- import { u as useCreateBusinessLine, a as useUpdateBusinessLine } from "./useUpdateBusinessLines-CWYtpMwr.js";
15
- import { u as useCreateLegalEntity } from "./useCreateLegalEntity-BK5YcHA-.js";
16
- import { u as useUpdateLegalEntity } from "./useUpdateLegalEntity-oa8qEzc4.js";
17
- import { S as SettingNames, I as InputText } from "./InputText-Dsw9kiwL.js";
18
- import { h as hasDataChanged } from "./hasDataChanged-B-_hLK5I.js";
19
- import { a as useGlobalData, b as useStateContext } from "./useGlobalData-B33uuhtd.js";
20
- import { a as useToastContext } from "./useToastContext-BK9oGWtb.js";
21
- import { c as composePerScenarioFormConfigurations, g as getPropsFromConfigurations } from "./process-field-configurations-DoOFQqtn.js";
22
- import { g as getRequiredForms, a as addValidityToForms, u as useFormComposer } from "./dropinUtils-D2lBlNWp.js";
23
- import { m as mapExistingFile, g as getPageName, u as useScenarioConfiguration } from "./mapExistingFile-BhW5UmN9.js";
24
- import { a as datasetUtilities, C as Confirm } from "./useDataset-BtfHQp4w.js";
25
- import { o as organizationTypesToSkipCompanyStructureForm } from "./utils-COz1RbbA.js";
26
- import { F as FormWrapper } from "./FormWrapper-dbBZegkX.js";
27
- import { a as getDocument, c as createDocumentRequest, b as getFileExtention, d as documentApiUtils } from "./documentUtils-CUgKVLK4.js";
28
- import { g as getFieldsWithExistingData } from "./getFieldsWithExistingData-B0l_1eCG.js";
29
- import { f as formatCurrency, A as ALLOWED_SOF_SERVICES } from "./utils-AP5TpAhf.js";
30
- import cx from "classnames";
31
- import { $ as MemoizedDocumentUpload, C as CompanyTypesValues, n as COUNTRIES_USING_COMPANY_SEARCH, a0 as isRegistrationNumberAbsentStateV4Scenario, E as isEmpty, a1 as COUNTRIES_THAT_USE_TAX_ID_INSTEAD_OF_VAT, r as requestingBanking, e as requestingIssuing, a as getCompanyRegistrationNumberOptions, t as taxInformationDefaultFieldMetadata, a2 as countryToTaxInfoTypeMap, i as taxInformationDefaultFieldConfig, a3 as rules, T as TAX_INFORMATION_FIELD, j as TaxInformationField, u as useAllowedCountries, m as COUNTRY_OF_GOVERNING_LAW_POSSIBLE } from "./IndividualOnfido-Cc7dydKq.js";
32
- import { M as MemoizedConstitutionalDocument } from "./ConstitutionalDocument-NLs6ka9K.js";
33
- import { g as getFormProps, s as summaryItem, m as mergeFieldMetadataIntoProps, c as createFormUtils, H as Header, E as ErrorPanel, C as CountryField, b as COUNTRY_FIELD, a as Link } from "./CountryField-9w8wRZMW.js";
34
- import { F as FormContextProvider, a as FormFlow } from "./FormFlow-Cf3Ff2qw.js";
35
- import { u as useMultiForm } from "./useMultiForm-rZmCYsI4.js";
36
- import { b as mapAddressLocalizationToJpAddressSchema, a as mapApiScriptLocalizationToSchemaFields, m as mapSchemaFieldsToApiScriptLocalization } from "./mapAddressLocalizationToJpAddressSchema-vJWbpAyq.js";
37
- import { m as mapFinancialReportsToFinancialInformation, a as mapFinancialInformationToFinancialReport } from "./mapFinancialReportsToFinancialInformation-Dl-cl9eQ.js";
38
- import { o as operationalAddressIsSameIds, k as isDateOlderThanAYear, r as mapAddressLabels, s as getKeyForField, i as useFormContext, g as getAddressSchemaForCountry, C as COUNTRIES_WITH_STATES_DATASET, u as useAddressCleanse, b as formatAddressForCleanse, m as mapAddressData, A as Address, d as getNestedTrustedFields, e as getAddressSchemaLabelsByCountry, S as STATE_FIELD, h as StateField } from "./Address-Db6Q_KUo.js";
39
- import { f as formatObject, g as getProp } from "./utils-DNSfZiio.js";
40
- import { m as mapJpAddressSchemaToAddressLocalizations, a as mapJpAddressSummary } from "./mapJpAddressSchemaToAddressLocalizations-KFAvfuC1.js";
41
- import { i as isValidationError, p as processValidationErrors, a as isMaintenanceModeError } from "./validationError-CvZLhw5H.js";
42
- import { r as resolveFieldMetadata } from "./fieldConfigurations-C38LzPl3.js";
43
- import { Suspense, lazy } from "preact/compat";
44
- import { C as Checkbox } from "./debouncedInputEvent-Dlbc7VjU.js";
45
- import { F as Field } from "./useForm-wQyeWa1b.js";
46
- import { L as LegalFormField } from "./Currency-53s7DEeh.js";
47
- import { M as Modal, a as ModalContent } from "./Modal-CloeVnNp.js";
48
- import { s as summaryStep } from "./Summary-BkE_c8pU.js";
49
- const documentTypes$2 = [
50
- { id: "Internal company document", name: "internalCompanyDocument" },
51
- { id: "Business registry statement", name: "businessRegistryStatement" }
52
- ];
53
- const GuidanceContent$4 = () => {
54
- const { t } = useTranslation(["common", "business"]);
55
- return /* @__PURE__ */ jsx("div", { className: "adyen-kyc-upload-field__guidance", children: /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-u-margin-bottom-24", children: [
56
- /* @__PURE__ */ jsx("strong", { children: t(($) => $["documentRequirements"], { ns: "common" }) }),
57
- /* @__PURE__ */ jsxs("ul", { children: [
58
- /* @__PURE__ */ jsx("li", { children: t(($) => $["includesTheDirectorsFullName"], { ns: "business" }) }),
59
- /* @__PURE__ */ jsx("li", { children: t(($) => $["includesEvidenceOfTheIndividualsRole"], { ns: "business" }) }),
60
- /* @__PURE__ */ jsx("li", { children: t(($) => $["issuedOrSignedByALegalRepresentative"], { ns: "business" }) })
61
- ] })
62
- ] }) });
63
- };
64
- function ProofOfDirectorDocument({
65
- id,
66
- country,
67
- heading = "uploadYourOrganizationProofOfDirector",
68
- description = "weNeedAnOfficialDocument",
69
- ...props
70
- }) {
71
- const { t } = useTranslation("common");
72
- const [selectedDocumentName, setSelectedDocumentName] = useState(documentTypes$2[0].id);
73
- return /* @__PURE__ */ jsx(
74
- MemoizedDocumentUpload,
75
- {
76
- ...props,
77
- id,
78
- heading: t(($) => $[heading]),
79
- description: t(($) => $[description]),
80
- documentField: "proofOfDirector",
81
- documentType: "proofOfDirector",
82
- guidanceContent: /* @__PURE__ */ jsx(GuidanceContent$4, {}),
83
- country,
84
- hidePageCount: true,
85
- documentTypeSelect: {
86
- selectedType: selectedDocumentName,
87
- setSelectedType: setSelectedDocumentName,
88
- options: documentTypes$2
89
- }
90
- }
91
- );
92
- }
93
- const DOC_TYPE_FOR_MULTI_UPLOAD = "Organizational chart and supporting document";
94
- const documentTypes$1 = [
95
- { id: "Certified Organizational chart", name: "certifiedOrganizationalChart" },
96
- {
97
- id: "Organizational chart and supporting document",
98
- name: "organizationalChartAndSupportingDocument"
99
- }
100
- ];
101
- const GuidanceContent$3 = ({ selectedDocumentName }) => {
102
- const { t } = useTranslation(["common", "business"]);
103
- const [showGuidanceModal, setShowGuidanceModal] = useState(false);
104
- return /* @__PURE__ */ jsx("div", { className: "adyen-kyc-upload-field__guidance", children: /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-u-margin-bottom-24", children: [
105
- /* @__PURE__ */ jsx("strong", { children: t(($) => $["documentRequirements"], { ns: "common" }) }),
106
- selectedDocumentName === "Certified Organizational chart" ? /* @__PURE__ */ jsxs("ul", { children: [
107
- /* @__PURE__ */ jsx("li", { children: t(($) => $["showsOwnershipAndControllingRelations"], { ns: "business" }) }),
108
- /* @__PURE__ */ jsx("li", { children: t(($) => $["entitiesMustIncludeANameLegalStructureAndCountryRegionOfRegistration"], {
109
- ns: "business"
110
- }) }),
111
- /* @__PURE__ */ jsx("li", { children: t(($) => $["signedByALawyerAccountantAuditorWithinTheLast6Months"], {
112
- ns: "business"
113
- }) })
114
- ] }) : /* @__PURE__ */ jsxs("ul", { children: [
115
- /* @__PURE__ */ jsx("li", { children: t(($) => $["oneOrganizationalChartShowingOwnershipAndControllingRelations"], {
116
- ns: "business"
117
- }) }),
118
- /* @__PURE__ */ jsxs("ul", { children: [
119
- /* @__PURE__ */ jsx("li", { children: t(
120
- ($) => $["entitiesMustIncludeANameLegalStructureAndCountryRegionOfRegistration"],
121
- {
122
- ns: "business"
123
- }
124
- ) }),
125
- /* @__PURE__ */ jsxs("li", { children: [
126
- /* @__PURE__ */ jsxs("span", { children: [
127
- t(($) => $["one"]),
128
- " "
129
- ] }),
130
- /* @__PURE__ */ jsx(Button, { onClick: () => setShowGuidanceModal(true), variant: "link", children: t(($) => $["supportingDocument"], { ns: "common" }) }),
131
- /* @__PURE__ */ jsxs("span", { children: [
132
- " ",
133
- t(($) => $["describingTheOrganizationAndItsUBOSignedWithinTheLast6Months"], {
134
- ns: "business"
135
- })
136
- ] })
137
- ] })
138
- ] })
139
- ] }),
140
- showGuidanceModal && /* @__PURE__ */ jsx(
141
- Modal,
142
- {
143
- size: "small",
144
- onClose: () => setShowGuidanceModal(false),
145
- ariaLabel: t(($) => $["whichDocumentsQualifyToProveOwnership"], { ns: "business" }),
146
- children: /* @__PURE__ */ jsxs(ModalContent, { children: [
147
- /* @__PURE__ */ jsx(
148
- Typography,
149
- {
150
- el: "h1",
151
- variant: "title-l",
152
- className: "adyen-kyc-u-margin-bottom-32 adyen-kyc-u-margin-top-32",
153
- children: t(($) => $["whichDocumentsQualifyToProveOwnership"], { ns: "business" })
154
- }
155
- ),
156
- /* @__PURE__ */ jsx(Typography, { el: "p", variant: "body", children: t(($) => $["theDocumentsWeCanAcceptToProveOwnershipAre"], { ns: "business" }) }),
157
- /* @__PURE__ */ jsxs("ul", { children: [
158
- /* @__PURE__ */ jsx("li", { children: t(($) => $["securitiesRegister"], { ns: "business" }) }),
159
- /* @__PURE__ */ jsx("li", { children: t(($) => $["shareholderRegister"], { ns: "business" }) }),
160
- /* @__PURE__ */ jsx("li", { children: t(($) => $["ultimateBeneficialOwnerRegister"], { ns: "business" }) }),
161
- /* @__PURE__ */ jsx("li", { children: t(($) => $["articlesOfIncorporation"], { ns: "business" }) }),
162
- /* @__PURE__ */ jsx("li", { children: t(($) => $["annualReports"], { ns: "business" }) }),
163
- /* @__PURE__ */ jsx("li", { children: t(($) => $["annualReturns"], { ns: "business" }) }),
164
- /* @__PURE__ */ jsx("li", { children: t(($) => $["certificateOfCorporateStatus"], { ns: "business" }) }),
165
- /* @__PURE__ */ jsx("li", { children: t(($) => $["shareholderAgreements"], { ns: "business" }) }),
166
- /* @__PURE__ */ jsx("li", { children: t(($) => $["assignmentAgreements"], { ns: "business" }) }),
167
- /* @__PURE__ */ jsx("li", { children: t(($) => $["partnershipAgreements"], { ns: "business" }) }),
168
- /* @__PURE__ */ jsx("li", { children: t(($) => $["boardOfDirectorsMeetingRecords"], { ns: "business" }) }),
169
- /* @__PURE__ */ jsx("li", { children: t(($) => $["registrationDocument"], { ns: "business" }) }),
170
- /* @__PURE__ */ jsx("li", { children: t(($) => $["certificateOfIncumbency"], { ns: "business" }) })
171
- ] })
172
- ] })
173
- }
174
- )
175
- ] }) });
176
- };
177
- function ProofOfOwnershipDocument({
178
- id,
179
- country,
180
- heading = "uploadYourOrganizationProofOfOwnership",
181
- description = "weNeedAnOfficialDocumentForOwnership",
182
- ...props
183
- }) {
184
- const { t } = useTranslation(["common", "business"]);
185
- const [selectedDocumentName, setSelectedDocumentName] = useState(documentTypes$1[0].id);
186
- const supportsMultiple = selectedDocumentName === DOC_TYPE_FOR_MULTI_UPLOAD;
187
- useEffect(() => {
188
- if (props.data?.proofOfOwnership?.length === 2) {
189
- setSelectedDocumentName(DOC_TYPE_FOR_MULTI_UPLOAD);
190
- }
191
- }, [props.data?.proofOfOwnership]);
192
- return /* @__PURE__ */ jsx(
193
- MemoizedDocumentUpload,
194
- {
195
- ...props,
196
- id,
197
- heading: t(($) => $[heading]),
198
- description: t(($) => $[description]),
199
- documentField: "proofOfOwnership",
200
- documentType: "proofOfOwnership",
201
- guidanceContent: /* @__PURE__ */ jsx(GuidanceContent$3, { selectedDocumentName }),
202
- country,
203
- label: t(($) => $["uploadYourDocuments"], { ns: "business" }),
204
- documentTypeSelect: {
205
- selectedType: selectedDocumentName,
206
- setSelectedType: setSelectedDocumentName,
207
- options: documentTypes$1
208
- },
209
- hidePageCount: true,
210
- supportsMultipleUploads: supportsMultiple,
211
- maxNumberOfFiles: supportsMultiple ? 2 : 1,
212
- extraDropzoneDescription: supportsMultiple ? t(($) => $["oneOrganizationalChartAndOneSupportingDocument"], { ns: "business" }) : void 0
213
- }
214
- );
215
- }
216
- const documentTypes = [
217
- { id: "Trade registry document", name: "tradeRegistryDocument" },
218
- { id: "Internal company document", name: "internalCompanyDocument" }
219
- ];
220
- const GuidanceContent$2 = () => {
221
- const { t } = useTranslation(["common", "business"]);
222
- return /* @__PURE__ */ jsx("div", { className: "adyen-kyc-upload-field__guidance", children: /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-u-margin-bottom-24", children: [
223
- /* @__PURE__ */ jsx("strong", { children: t(($) => $["documentRequirements"], { ns: "common" }) }),
224
- /* @__PURE__ */ jsxs("ul", { children: [
225
- /* @__PURE__ */ jsx("li", { children: t(($) => $["includesTheSignatorysFullName"], { ns: "business" }) }),
226
- /* @__PURE__ */ jsx("li", { children: t(($) => $["includesEvidenceOfTheIndividualsRoleSignatory"], { ns: "business" }) }),
227
- /* @__PURE__ */ jsx("li", { children: t(($) => $["issuedOrSignedByALegalRepresentative"], { ns: "business" }) })
228
- ] })
229
- ] }) });
230
- };
231
- function ProofOfSignatoryDocument({
232
- id,
233
- country,
234
- heading = "uploadYourOrganizationProofOfSignatory",
235
- description = "weNeedAnOfficialDocumentSignatory",
236
- ...props
237
- }) {
238
- const { t } = useTranslation("common");
239
- const [selectedDocumentName, setSelectedDocumentName] = useState(documentTypes[0].id);
240
- return /* @__PURE__ */ jsx(
241
- MemoizedDocumentUpload,
242
- {
243
- ...props,
244
- id,
245
- heading: t(($) => $[heading]),
246
- description: t(($) => $[description]),
247
- documentField: "proofOfSignatory",
248
- documentType: "proofOfSignatory",
249
- guidanceContent: /* @__PURE__ */ jsx(GuidanceContent$2, {}),
250
- country,
251
- hidePageCount: true,
252
- documentTypeSelect: {
253
- selectedType: selectedDocumentName,
254
- setSelectedType: setSelectedDocumentName,
255
- options: documentTypes
256
- }
257
- }
258
- );
259
- }
260
- const ACCEPTED_DOCUMENTS_MAP$1 = {
261
- [CountryCodes.PuertoRico]: {
262
- // should exactly match CountryCodes.UnitedStates
263
- [CompanyTypesValues.PRIVATE_COMPANY]: {
264
- header: "acceptedDocumentsForPrivateCompanies",
265
- documents: [
266
- "certificateOfIncorporation",
267
- "certificateOfFormation",
268
- "secretaryOfStateFiling__PR"
269
- ]
270
- },
271
- [CompanyTypesValues.PUBLIC_COMPANY]: {
272
- header: "acceptedDocumentsForPublicCompanies",
273
- documents: ["certificateOfIncorporation", "certificateOfFormation"]
274
- },
275
- [CompanyTypesValues.UNLISTED_PUBLIC_COMPANY]: {
276
- header: "acceptedDocumentsForPublicCompanies",
277
- documents: ["certificateOfIncorporation", "certificateOfFormation"]
278
- },
279
- [CompanyTypesValues.GOVERNMENTAL_ORGANIZATION]: {
280
- header: "acceptedDocumentsForGovernment",
281
- documents: ["charter"]
282
- },
283
- [CompanyTypesValues.NON_PROFIT_OR_CHARITABLE]: {
284
- header: "acceptedDocumentsForNonProfit",
285
- documents: [
286
- "articlesOfIncorporation",
287
- "meetingRecords",
288
- "secretaryOfStateRegDoc__PR",
289
- "certificateOfIncumbency"
290
- ]
291
- },
292
- [CompanyTypesValues.INCORPORATED_PARTNERSHIP]: {
293
- header: "acceptedDocumentsForPartnerships",
294
- documents: ["partnerShipAgreement", "secretaryOfStateFiling__PR"]
295
- }
296
- },
297
- [CountryCodes.UnitedStates]: {
298
- [CompanyTypesValues.PRIVATE_COMPANY]: {
299
- header: "acceptedDocumentsForPrivateCompanies",
300
- documents: ["certificateOfIncorporation", "certificateOfFormation", "secretaryOfStateFiling"]
301
- },
302
- [CompanyTypesValues.PUBLIC_COMPANY]: {
303
- header: "acceptedDocumentsForPublicCompanies",
304
- documents: ["certificateOfIncorporation", "certificateOfFormation"]
305
- },
306
- [CompanyTypesValues.UNLISTED_PUBLIC_COMPANY]: {
307
- header: "acceptedDocumentsForPublicCompanies",
308
- documents: ["certificateOfIncorporation", "certificateOfFormation"]
309
- },
310
- [CompanyTypesValues.GOVERNMENTAL_ORGANIZATION]: {
311
- header: "acceptedDocumentsForGovernment",
312
- documents: ["charter"]
313
- },
314
- [CompanyTypesValues.NON_PROFIT_OR_CHARITABLE]: {
315
- header: "acceptedDocumentsForNonProfit",
316
- documents: [
317
- "articlesOfIncorporation",
318
- "meetingRecords",
319
- "secretaryOfStateRegDoc",
320
- "certificateOfIncumbency"
321
- ]
322
- },
323
- [CompanyTypesValues.INCORPORATED_PARTNERSHIP]: {
324
- header: "acceptedDocumentsForPartnerships",
325
- documents: ["partnerShipAgreement", "secretaryOfStateFiling"]
326
- }
327
- }
328
- };
329
- const GuidanceContent$1 = ({
330
- country,
331
- companyType
332
- }) => {
333
- const { t } = useTranslation(["common", "business"]);
334
- const acceptedDocGuidance = ACCEPTED_DOCUMENTS_MAP$1[country]?.[companyType];
335
- return /* @__PURE__ */ jsx("div", { className: "adyen-kyc-upload-field__guidance", children: country === "US" ? /* @__PURE__ */ jsxs(Fragment, { children: [
336
- acceptedDocGuidance && /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-u-margin-bottom-24", children: [
337
- /* @__PURE__ */ jsx("strong", { children: t(($) => $[acceptedDocGuidance.header], { ns: "business" }) }),
338
- /* @__PURE__ */ jsx("ul", { children: acceptedDocGuidance.documents.map((document, i) => /* @__PURE__ */ jsx("li", { children: t(($) => $[document], { ns: "business" }) }, i)) })
339
- ] }),
340
- /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-u-margin-bottom-24", children: [
341
- /* @__PURE__ */ jsx("strong", { children: t(($) => $["documentRequirements"], { ns: "common" }) }),
342
- /* @__PURE__ */ jsx("ul", { children: /* @__PURE__ */ jsx("li", { children: t(($) => $["includesLegalCompanyName"], { ns: "business" }) }) })
343
- ] })
344
- ] }) : /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-u-margin-bottom-24", children: [
345
- /* @__PURE__ */ jsx("strong", { children: t(($) => $["documentRequirements"], { ns: "common" }) }),
346
- /* @__PURE__ */ jsx("ul", { children: /* @__PURE__ */ jsx("li", { children: t(($) => $["documentIssuedByGovernmentAuthority"], { ns: "business" }) }) })
347
- ] }) });
348
- };
349
- function RegistrationDocument({
350
- id,
351
- country,
352
- companyType = CompanyTypesValues.PRIVATE_COMPANY,
353
- heading = "companyRegistrationDocumentFormHeading",
354
- description = "companyRegistrationDocumentFormDescription",
355
- ...props
356
- }) {
357
- const { t } = useTranslation("common");
358
- return /* @__PURE__ */ jsx(
359
- MemoizedDocumentUpload,
360
- {
361
- ...props,
362
- id,
363
- heading: t(($) => $[heading]),
364
- description: t(($) => $[description]),
365
- documentField: "registrationDocument",
366
- documentType: "registrationDocument",
367
- guidanceContent: /* @__PURE__ */ jsx(GuidanceContent$1, { country, companyType }),
368
- companyType,
369
- country,
370
- hidePageCount: true
371
- }
372
- );
373
- }
374
- const ACCEPTED_DOCUMENTS_MAP = {
375
- [CountryCodes.PuertoRico]: {
376
- // should exactly match CountryCodes.UnitedStates
377
- [CompanyTypesValues.PRIVATE_COMPANY]: {
378
- header: "acceptedDocumentsForPrivateCompanies",
379
- documents: ["irsCP575"]
380
- },
381
- [CompanyTypesValues.PUBLIC_COMPANY]: {
382
- header: "acceptedDocumentsForPublicCompanies",
383
- documents: ["annualReport", "secForm10k"]
384
- },
385
- [CompanyTypesValues.UNLISTED_PUBLIC_COMPANY]: {
386
- header: "acceptedDocumentsForPublicCompanies",
387
- documents: ["annualReport", "secForm10k"]
388
- },
389
- [CompanyTypesValues.NON_PROFIT_OR_CHARITABLE]: {
390
- header: "acceptedDocumentsForNonProfit",
391
- documents: ["annualReport"]
392
- },
393
- [CompanyTypesValues.INCORPORATED_PARTNERSHIP]: {
394
- header: "acceptedDocumentsForPartnerships",
395
- documents: ["irsScheduleK1"]
396
- }
397
- },
398
- [CountryCodes.UnitedStates]: {
399
- [CompanyTypesValues.PRIVATE_COMPANY]: {
400
- header: "acceptedDocumentsForPrivateCompanies",
401
- documents: ["irsCP575"]
402
- },
403
- [CompanyTypesValues.PUBLIC_COMPANY]: {
404
- header: "acceptedDocumentsForPublicCompanies",
405
- documents: ["annualReport", "secForm10k"]
406
- },
407
- [CompanyTypesValues.UNLISTED_PUBLIC_COMPANY]: {
408
- header: "acceptedDocumentsForPublicCompanies",
409
- documents: ["annualReport", "secForm10k"]
410
- },
411
- [CompanyTypesValues.NON_PROFIT_OR_CHARITABLE]: {
412
- header: "acceptedDocumentsForNonProfit",
413
- documents: ["annualReport"]
414
- },
415
- [CompanyTypesValues.INCORPORATED_PARTNERSHIP]: {
416
- header: "acceptedDocumentsForPartnerships",
417
- documents: ["irsScheduleK1"]
418
- }
419
- }
420
- };
421
- const GuidanceContent = ({
422
- country,
423
- companyType
424
- }) => {
425
- const { t } = useTranslation(["common", "business"]);
426
- const acceptedDocGuidance = ACCEPTED_DOCUMENTS_MAP[country]?.[companyType];
427
- return /* @__PURE__ */ jsx("div", { className: "adyen-kyc-upload-field__guidance", children: country === "US" ? /* @__PURE__ */ jsxs(Fragment, { children: [
428
- acceptedDocGuidance && /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-u-margin-bottom-24", children: [
429
- /* @__PURE__ */ jsx("strong", { children: t(($) => $[acceptedDocGuidance.header], { ns: "business" }) }),
430
- /* @__PURE__ */ jsx("ul", { children: acceptedDocGuidance.documents.map((document, i) => /* @__PURE__ */ jsx("li", { children: t(($) => $[document], { ns: "business" }) }, i)) })
431
- ] }),
432
- /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-u-margin-bottom-24", children: [
433
- /* @__PURE__ */ jsx("strong", { children: t(($) => $["documentRequirements"], { ns: "common" }) }),
434
- /* @__PURE__ */ jsxs("ul", { children: [
435
- /* @__PURE__ */ jsx("li", { children: t(($) => $["includesLegalCompanyName"], { ns: "business" }) }),
436
- /* @__PURE__ */ jsx("li", { children: t(($) => $["includesEIN"], { ns: "business" }) })
437
- ] })
438
- ] })
439
- ] }) : /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-u-margin-bottom-24", children: [
440
- /* @__PURE__ */ jsx("div", { className: "adyen-kyc-upload-field__subtitle", children: t(($) => $["documentRequirements"], { ns: "common" }) }),
441
- /* @__PURE__ */ jsxs("ul", { children: [
442
- /* @__PURE__ */ jsx("li", { children: t(($) => $["containsNameOfCompany"], { ns: "business" }) }),
443
- /* @__PURE__ */ jsx("li", { children: t(($) => $["documentShowsTaxIdOfCompany"], { ns: "business" }) }),
444
- /* @__PURE__ */ jsx("li", { children: t(($) => $["issuedByTheTaxAuthority"], { ns: "business" }) })
445
- ] })
446
- ] }) });
447
- };
448
- function TaxDocument({
449
- id,
450
- country,
451
- companyType = CompanyTypesValues.PRIVATE_COMPANY,
452
- heading = "companyTaxDocumentFormHeading",
453
- description = "companyTaxDocumentFormDescription",
454
- ...props
455
- }) {
456
- const { t } = useTranslation("common");
457
- return /* @__PURE__ */ jsx(
458
- MemoizedDocumentUpload,
459
- {
460
- ...props,
461
- id,
462
- heading: t(($) => $[heading]),
463
- description: t(($) => $[description]),
464
- documentField: "taxDocument",
465
- documentType: "proofOfOrganizationTaxInfo",
466
- guidanceContent: /* @__PURE__ */ jsx(GuidanceContent, { country, companyType }),
467
- companyType,
468
- country,
469
- hidePageCount: true
470
- }
471
- );
472
- }
473
- function BusinessDetails(props) {
474
- const { i18n } = useI18nContext();
475
- const { t } = useTranslation("business");
476
- const { companyStructure } = useGlobalData();
477
- const {
478
- country,
479
- isTopLevelEntity,
480
- activeForm,
481
- showCompanyStructure,
482
- showBusinessSelection,
483
- setShowBusinessSelection,
484
- setShowCompanyStructure,
485
- loading,
486
- searchResults,
487
- taskType,
488
- handleNextClick,
489
- proceedToManualDataEntry
490
- } = props;
491
- const forms = getForms(country);
492
- const formWrapperClasses = (formId) => activeForm?.formId !== formId ? "adyen-kyc-form-wrapper adyen-kyc-form-wrapper--hidden" : "adyen-kyc-form-wrapper";
493
- const classNames = cx("adyen-kyc-business-details", {
494
- "adyen-kyc-business-details--hide": activeForm?.formId === "summary"
495
- });
496
- const companyType = taskType === TaskTypes.SOLE_PROPRIETOR_COMPANY ? CompanyTypesValues.SOLE_PROPRIETORSHIP : companyStructure?.entityType;
497
- return /* @__PURE__ */ jsxs("div", { className: classNames, children: [
498
- /* @__PURE__ */ jsx("div", { className: formWrapperClasses(forms.basicInformation.formId), children: /* @__PURE__ */ jsx(
499
- BasicInformation,
500
- {
501
- ...getFormProps(props, forms.basicInformation.formId),
502
- id: forms.basicInformation.formId,
503
- heading: i18n.get(activeForm?.formHeading || forms.basicInformation.formHeading),
504
- description: activeForm?.formDescription ? i18n.get(activeForm?.formDescription) : void 0,
505
- country,
506
- companyType,
507
- isTopLevelEntity,
508
- showBusinessSelection,
509
- showCompanyStructure,
510
- isActiveForm: activeForm?.formId === forms.basicInformation.formId,
511
- loading,
512
- proceedToManualDataEntry,
513
- searchResults,
514
- setShowBusinessSelection,
515
- setShowCompanyStructure,
516
- handleNextClick,
517
- disableCountry: taskType === TaskTypes.SOLE_PROPRIETOR_COMPANY
518
- }
519
- ) }),
520
- /* @__PURE__ */ jsx("div", { className: formWrapperClasses(forms.companyStructure.formId), children: /* @__PURE__ */ jsx(
521
- CompanyStructure,
522
- {
523
- ...getFormProps(props, forms.companyStructure.formId),
524
- id: forms.companyStructure.formId,
525
- heading: i18n.get(activeForm?.formHeading ?? forms.companyStructure.formHeading),
526
- description: i18n.get(
527
- activeForm?.formDescription ?? forms.companyStructure.formDescription
528
- ),
529
- country,
530
- showCompanyStructure
531
- }
532
- ) }),
533
- /* @__PURE__ */ jsx("div", { className: formWrapperClasses(forms.additionalInformation.formId), children: /* @__PURE__ */ jsx(
534
- AdditionalInformation,
535
- {
536
- ...getFormProps(props, forms.additionalInformation.formId),
537
- id: forms.additionalInformation.formId,
538
- heading: i18n.get(activeForm?.formHeading ?? forms.additionalInformation.formHeading),
539
- country,
540
- companyType,
541
- showCompanyStructure
542
- }
543
- ) }),
544
- /* @__PURE__ */ jsx("div", { className: formWrapperClasses(forms.companyRegistrationDocument.formId), children: /* @__PURE__ */ jsx(
545
- RegistrationDocument,
546
- {
547
- ...getFormProps(props, forms.companyRegistrationDocument.formId),
548
- id: forms.companyRegistrationDocument.formId,
549
- heading: forms.companyRegistrationDocument.formHeading,
550
- description: forms.companyRegistrationDocument.formDescription,
551
- country,
552
- companyType
553
- }
554
- ) }),
555
- /* @__PURE__ */ jsx("div", { className: formWrapperClasses(forms.companyTaxDocument.formId), children: country === "US" ? /* @__PURE__ */ jsx(
556
- TaxDocument,
557
- {
558
- ...getFormProps(props, forms.companyTaxDocument.formId),
559
- id: forms.companyTaxDocument.formId,
560
- heading: forms.companyTaxDocument.formHeading,
561
- description: forms.companyTaxDocument.formDescription,
562
- country,
563
- companyType
564
- }
565
- ) : /* @__PURE__ */ jsx(
566
- MemoizedDocumentUpload,
567
- {
568
- ...getFormProps(props, forms.companyTaxDocument.formId),
569
- id: forms.companyTaxDocument.formId,
570
- heading: i18n.get(forms.companyTaxDocument.formHeading),
571
- description: i18n.get(forms.companyTaxDocument.formDescription),
572
- documentField: "taxDocument",
573
- documentType: "vatDocument",
574
- hidePageCount: true,
575
- guidanceContent: /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-u-margin-bottom-24", children: [
576
- /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-upload-field__subtitle", children: [
577
- " ",
578
- i18n.get("requirements")
579
- ] }),
580
- /* @__PURE__ */ jsxs("ul", { children: [
581
- /* @__PURE__ */ jsx("li", { children: t(($) => $["containsNameOfCompany"], { ns: "business" }) }),
582
- /* @__PURE__ */ jsx("li", { children: t(($) => $["documentShowsTaxIdOfCompany"], { ns: "business" }) }),
583
- /* @__PURE__ */ jsx("li", { children: t(($) => $["issuedByTheTaxAuthority"], { ns: "business" }) })
584
- ] })
585
- ] })
586
- }
587
- ) }),
588
- /* @__PURE__ */ jsx("div", { className: formWrapperClasses(forms.companyProofOfDirectorDocument.formId), children: /* @__PURE__ */ jsx(
589
- ProofOfDirectorDocument,
590
- {
591
- ...getFormProps(props, forms.companyProofOfDirectorDocument.formId),
592
- id: forms.companyProofOfDirectorDocument.formId,
593
- heading: forms.companyProofOfDirectorDocument.formHeading,
594
- description: forms.companyProofOfDirectorDocument.formDescription,
595
- country
596
- }
597
- ) }),
598
- /* @__PURE__ */ jsx("div", { className: formWrapperClasses(forms.companyProofOfSignatoryDocument.formId), children: /* @__PURE__ */ jsx(
599
- ProofOfSignatoryDocument,
600
- {
601
- ...getFormProps(props, forms.companyProofOfSignatoryDocument.formId),
602
- id: forms.companyProofOfSignatoryDocument.formId,
603
- heading: forms.companyProofOfSignatoryDocument.formHeading,
604
- description: forms.companyProofOfSignatoryDocument.formDescription,
605
- country
606
- }
607
- ) }),
608
- /* @__PURE__ */ jsx("div", { className: formWrapperClasses(forms.companyProofOfOwnershipDocument.formId), children: /* @__PURE__ */ jsx(
609
- ProofOfOwnershipDocument,
610
- {
611
- ...getFormProps(props, forms.companyProofOfOwnershipDocument.formId),
612
- id: forms.companyProofOfOwnershipDocument.formId,
613
- heading: forms.companyProofOfOwnershipDocument.formHeading,
614
- description: forms.companyProofOfOwnershipDocument.formDescription,
615
- country
616
- }
617
- ) }),
618
- /* @__PURE__ */ jsx("div", { className: formWrapperClasses(forms.companyConstitutionalDocument.formId), children: /* @__PURE__ */ jsx(
619
- MemoizedConstitutionalDocument,
620
- {
621
- ...getFormProps(props, forms.companyConstitutionalDocument.formId),
622
- id: forms.companyConstitutionalDocument.formId,
623
- legalEntityType: LegalEntityTypes.SOLE_PROPRIETORSHIP,
624
- country
625
- }
626
- ) }),
627
- /* @__PURE__ */ jsx("div", { className: formWrapperClasses(forms.companyFinancialInformation.formId), children: /* @__PURE__ */ jsx(
628
- FinancialInformation,
629
- {
630
- ...getFormProps(props, forms.companyFinancialInformation.formId),
631
- heading: i18n.get("financialInformation"),
632
- id: forms.companyFinancialInformation.formId,
633
- country
634
- }
635
- ) })
636
- ] });
637
- }
638
- const mapApiDocumentToBusinessDetailsDocuments = (entityId) => {
639
- const registrationDocument = getDocument(entityId, "registrationDocument") ?? null;
640
- const taxDocument = getDocument(entityId, "vatDocument") ?? getDocument(entityId, "proofOfOrganizationTaxInfo") ?? null;
641
- const proofOfDirector = getDocument(entityId, "proofOfDirector") ?? null;
642
- const proofOfSignatory = getDocument(entityId, "proofOfSignatory") ?? null;
643
- const proofOfOwnership = getDocument(entityId, "proofOfOwnership") ?? null;
644
- const constitutionalDocument = getDocument(entityId, "constitutionalDocument") ?? null;
645
- return {
646
- companyRegistrationDocument: registrationDocument ? { registrationDocument: [mapExistingFile(getPageName(registrationDocument))] } : void 0,
647
- companyTaxDocument: taxDocument ? { taxDocument: [mapExistingFile(getPageName(taxDocument))] } : void 0,
648
- companyProofOfDirectorDocument: proofOfDirector ? { proofOfDirector: [mapExistingFile(getPageName(proofOfDirector))] } : void 0,
649
- companyProofOfSignatoryDocument: proofOfSignatory ? { proofOfSignatory: [mapExistingFile(getPageName(proofOfSignatory))] } : void 0,
650
- companyProofOfOwnershipDocument: proofOfOwnership ? { proofOfOwnership: [mapExistingFile(getPageName(proofOfOwnership))] } : void 0,
651
- companyConstitutionalDocument: constitutionalDocument ? {
652
- constitutionalDocument: [mapExistingFile(getPageName(constitutionalDocument))]
653
- } : void 0
654
- };
655
- };
656
- const mapBasicInformation = (data) => {
657
- if (!data) return;
658
- return !!data.country && COUNTRIES_USING_COMPANY_SEARCH.includes(data.country) ? data : entriesOf(data).reduce((acc, [field]) => {
659
- if (!FIELDS_NEEDED_FOR_COMPANY_SEARCH.includes(field)) {
660
- return {
661
- ...acc,
662
- [field]: data[field]
663
- };
664
- }
665
- return acc;
666
- }, {});
667
- };
668
- const mapDbaName = (legalEntity) => {
669
- const entity = legalEntity.type === "organization" ? legalEntity.organization : legalEntity.soleProprietorship;
670
- const dbaName = {};
671
- if (typeof entity?.doingBusinessAsAbsent !== "undefined") {
672
- dbaName.hasDoingBusinessAs = !entity.doingBusinessAsAbsent;
673
- } else {
674
- if (entity?.doingBusinessAs) {
675
- dbaName.hasDoingBusinessAs = entity?.doingBusinessAs !== (legalEntity.type === "organization" ? legalEntity.organization?.legalName : legalEntity.soleProprietorship?.name);
676
- } else {
677
- dbaName.hasDoingBusinessAs = void 0;
678
- }
679
- }
680
- if (legalEntity.organization?.doingBusinessAs) {
681
- dbaName.doingBusinessAs = legalEntity.organization?.doingBusinessAs;
682
- }
683
- return dbaName;
684
- };
685
- const mapIsUen = (taxInformation, registrationNumber, country) => {
686
- const currentCountryTaxInfo = taxInformation?.find((taxInfo) => taxInfo.country === country);
687
- if (!currentCountryTaxInfo || country !== "SG") return {};
688
- return {
689
- registrationNumber: currentCountryTaxInfo.type === "UEN" ? currentCountryTaxInfo.number : registrationNumber,
690
- isUen: currentCountryTaxInfo.type === "UEN"
691
- };
692
- };
693
- const mapAdditionalInformation = (data, legalEntity) => {
694
- if (!data) return;
695
- const entity = legalEntity.type === "organization" ? legalEntity.organization : legalEntity.soleProprietorship;
696
- const currentCountry = entity?.registeredAddress.country;
697
- const dbaNameFields = mapDbaName(legalEntity);
698
- const isUen = mapIsUen(
699
- data.taxInformation,
700
- data.registrationNumber,
701
- currentCountry
702
- );
703
- const companyType = legalEntity.type === "organization" ? legalEntity.organization?.type : CompanyTypesValues.SOLE_PROPRIETORSHIP;
704
- const registrationNumberType = getDefaultRegistrationNumberType(
705
- entity?.registrationNumber,
706
- currentCountry,
707
- companyType
708
- );
709
- const vatNumberType = getDefaultVatNumberType(entity?.vatNumber, currentCountry);
710
- const operationalAddressIsSame = entity?.principalPlaceOfBusiness && !objectsDeepEqual(entity?.principalPlaceOfBusiness, entity?.registeredAddress) ? operationalAddressIsSameIds.OPERATIONAL_ADDRESS_IS_NOT_SAME : operationalAddressIsSameIds.OPERATIONAL_ADDRESS_IS_SAME;
711
- if (entity?.registeredAddress?.localization) {
712
- data.registrationAddress = {
713
- ...data.registrationAddress,
714
- ...mapAddressLocalizationToJpAddressSchema(entity.registeredAddress.localization)
715
- };
716
- }
717
- if (entity?.principalPlaceOfBusiness?.localization) {
718
- data.operationalAddress = {
719
- ...data.operationalAddress,
720
- ...mapAddressLocalizationToJpAddressSchema(entity.principalPlaceOfBusiness.localization)
721
- };
722
- }
723
- const result = entriesOf(data).reduce(
724
- (acc, [field]) => {
725
- if (!COUNTRIES_USING_COMPANY_SEARCH.includes(currentCountry)) {
726
- return {
727
- ...acc,
728
- [field]: data[field]
729
- };
730
- }
731
- if (!FIELDS_NEEDED_FOR_COMPANY_SEARCH.includes(field)) {
732
- return {
733
- ...acc,
734
- [field]: data[field]
735
- };
736
- }
737
- return acc;
738
- },
739
- { operationalAddressIsSame, registrationNumberType, vatNumberType }
740
- );
741
- return { ...result, ...dbaNameFields, ...isUen };
742
- };
743
- const mapLegalNameLocalization = (data) => {
744
- const localization = data.organization?.localization;
745
- if (!localization) return {};
746
- let result = {};
747
- for (const { script, fields } of localization) {
748
- const schemaFieldsFromLocalization = mapApiScriptLocalizationToSchemaFields({
749
- script,
750
- fields: {
751
- // mismatch between API `legalName` and schema `legalCompanyName`
752
- legalCompanyName: fields.legalName
753
- }
754
- });
755
- result = {
756
- ...result,
757
- ...schemaFieldsFromLocalization
758
- };
759
- }
760
- return result;
761
- };
762
- const mapLegalEntityToBusinessDetailsSchema = (legalEntity, parentEntity, isExperimentEnabled) => {
763
- if (!legalEntity) return {};
764
- const {
765
- companyRegistrationDocument,
766
- companyTaxDocument,
767
- companyProofOfDirectorDocument,
768
- companyProofOfSignatoryDocument,
769
- companyProofOfOwnershipDocument,
770
- companyConstitutionalDocument
771
- } = mapApiDocumentToBusinessDetailsDocuments(legalEntity.id);
772
- const buildSolePropSchema = () => {
773
- const solePropData = formatObject(
774
- legalEntity,
775
- solePropBusinessDetailsKeyMapping
776
- );
777
- const country = solePropData?.additionalInformation?.registrationAddress?.country ?? parentEntity?.individual?.residentialAddress.country;
778
- if (legalEntity?.soleProprietorship?.financialReports && solePropData) {
779
- solePropData.companyFinancialInformation = mapFinancialReportsToFinancialInformation(
780
- legalEntity.soleProprietorship.financialReports
781
- );
782
- }
783
- return {
784
- ...solePropData,
785
- basicInformation: {
786
- ...solePropData?.basicInformation,
787
- country
788
- },
789
- companyConstitutionalDocument
790
- };
791
- };
792
- const orgSchema = isExperimentEnabled?.("EnableBusinessDetailsMultiForm") ? {
793
- ...formatObject(legalEntity, businessDetailsComponentsKeyMapping),
794
- businessSelection: {},
795
- companyRegistrationDocument,
796
- companyTaxDocument,
797
- companyProofOfDirectorDocument,
798
- companyProofOfSignatoryDocument,
799
- companyProofOfOwnershipDocument,
800
- companyFinancialInformation: {}
801
- } : {
802
- ...formatObject(legalEntity, businessDetailsComponentsKeyMapping),
803
- companyRegistrationDocument,
804
- companyTaxDocument,
805
- companyProofOfDirectorDocument,
806
- companyProofOfSignatoryDocument,
807
- companyProofOfOwnershipDocument,
808
- companyFinancialInformation: {}
809
- };
810
- const businessDetailsSchema = legalEntity.type === "organization" ? orgSchema : buildSolePropSchema();
811
- return entriesOf(businessDetailsSchema).reduce((componentData, [key]) => {
812
- switch (key) {
813
- case "basicInformation": {
814
- return {
815
- ...componentData,
816
- [key]: {
817
- ...mapBasicInformation(businessDetailsSchema[key]),
818
- ...mapLegalNameLocalization(legalEntity)
819
- }
820
- };
821
- }
822
- case "businessSelection": {
823
- return {
824
- ...componentData,
825
- [key]: {
826
- hasSelectedBusiness: false
827
- }
828
- };
829
- }
830
- case "companyStructure": {
831
- return {
832
- ...componentData,
833
- [key]: {
834
- ...businessDetailsSchema[key]
835
- }
836
- };
837
- }
838
- case "additionalInformation": {
839
- return {
840
- ...componentData,
841
- [key]: mapAdditionalInformation(businessDetailsSchema[key], legalEntity)
842
- };
843
- }
844
- case "companyRegistrationDocument": {
845
- return {
846
- ...componentData,
847
- [key]: businessDetailsSchema[key]
848
- };
849
- }
850
- case "companyTaxDocument": {
851
- return {
852
- ...componentData,
853
- [key]: businessDetailsSchema[key]
854
- };
855
- }
856
- case "companyProofOfDirectorDocument": {
857
- return {
858
- ...componentData,
859
- [key]: businessDetailsSchema[key]
860
- };
861
- }
862
- case "companyProofOfSignatoryDocument": {
863
- return {
864
- ...componentData,
865
- [key]: businessDetailsSchema[key]
866
- };
867
- }
868
- case "companyProofOfOwnershipDocument": {
869
- return {
870
- ...componentData,
871
- [key]: businessDetailsSchema[key]
872
- };
873
- }
874
- case "companyConstitutionalDocument": {
875
- return {
876
- ...componentData,
877
- [key]: businessDetailsSchema[key]
878
- };
879
- }
880
- case "companyFinancialInformation": {
881
- const financialReports = legalEntity.type === "organization" ? legalEntity?.organization?.financialReports : legalEntity?.soleProprietorship?.financialReports;
882
- return financialReports?.length ? {
883
- ...componentData,
884
- [key]: mapFinancialReportsToFinancialInformation(financialReports)
885
- } : componentData;
886
- }
887
- default:
888
- return componentData;
889
- }
890
- }, {});
891
- };
892
- const businessDetailsBase = {
893
- /* Base required fields */
894
- country: { rule: "REQUIRED" },
895
- entityType: { rule: "businessRequiresCompanyType" },
896
- legalCompanyName: { rule: "REQUIRED" },
897
- jaHaniLegalCompanyName: { rule: "japaneseLegalCompanyName" },
898
- jaKanaLegalCompanyName: { rule: "japaneseLegalCompanyName" },
899
- hasDoingBusinessAs: { rule: "REQUIRED" },
900
- doingBusinessAs: { rule: "requireDoingBusinessAsName" },
901
- registrationAddress: { rule: "REQUIRED" },
902
- operationalAddressIsSame: { rule: "REQUIRED" },
903
- /* Base optional fields */
904
- operationalAddress: { rule: "OPTIONAL" },
905
- /* Fields with custom country specific rules */
906
- hasSelectedBusiness: { rule: "requireBusinessSelection" },
907
- stockExchangeMIC: { rule: "ifPubliclyTradedCompany" },
908
- stockISIN: { rule: "ifPubliclyTradedCompany" },
909
- stockTickerSymbol: { rule: "ifPubliclyTradedCompany" },
910
- dateOfIncorporation: { rule: "isDateOfIncorporationRequired" },
911
- stateOrProvince: { rule: "countryUsingCompanySearch" },
912
- registrationNumber: { rule: "countryRequiresRegistrationNumber" },
913
- registrationNumberType: { rule: "registrationNumberType" },
914
- exemptedFromRegistrationNumber: { rule: "companyRegistrationNumberExemptionAllowed" },
915
- eInvoicingCode: { rule: "isEInvoicingCodeEnabled" },
916
- countryOfGoverningLaw: { rule: "countryOfGoverningLawRequired" },
917
- taxDocument: { rule: "ifCountryUsAndTinFailed" },
918
- /* Fields derived from capabilities */
919
- industryCodes: { rule: "isIndustryCodeRequired" }
920
- };
921
- const taxInformationBase = {
922
- vatNumber: { rule: "countryUsesVat" },
923
- vatNumberType: { rule: "vatNumberType" },
924
- exemptedFromVat: { rule: "isVatExempt" },
925
- vatAbsenceReason: { rule: "isVatExempt" },
926
- taxInformation: { rule: "countryUsesTaxId" },
927
- exemptedFromTax: { rule: "countryHasTaxExemptions" },
928
- isUen: { rule: "countryUsesUenOrGst" }
929
- };
930
- const financialInformationBase = {
931
- numberOfEmployees: { rule: "countryRequiresFinancialInformation" },
932
- financialReportingDate: { rule: "isFinancialReportingFieldsRequired" },
933
- currency: { rule: "isFinancialReportingFieldsRequired" },
934
- reportedValueOption: { rule: "isFinancialReportingFieldsRequired" },
935
- annualTurnover: { rule: "annualTurnoverRequired" },
936
- netAssets: { rule: "netAssetsRequired" },
937
- balanceSheetTotal: { rule: "balanceSheetTotalRequired" }
938
- };
939
- const businessDetailsFieldsPerScenario = {
940
- L0: {
941
- country: { rule: "REQUIRED" },
942
- legalCompanyName: { rule: "REQUIRED" },
943
- stateOrProvince: { rule: "countryUsingCompanySearch" },
944
- ...financialInformationBase
945
- },
946
- L1: {
947
- ...businessDetailsBase,
948
- ...financialInformationBase
949
- },
950
- L: {
951
- ...businessDetailsBase,
952
- ...taxInformationBase,
953
- ...financialInformationBase
954
- },
955
- L_PROOFOFADDRESS: {
956
- // TODO this field does not exist
957
- // proofOfAddressDocument: { rule: 'REQUIRED' },
958
- },
959
- L_REGDOC: {
960
- registrationDocument: { rule: "REQUIRED" }
961
- },
962
- L_TAXDOC: {
963
- taxDocument: { rule: "REQUIRED" }
964
- },
965
- L_BAFIN: {
966
- legalForm: { rule: "REQUIRED" }
967
- }
968
- };
969
- const adjustFormData = (oldFormData, newFormData) => {
970
- const schema = Array.from((/* @__PURE__ */ new Set([...keysOf(oldFormData), ...keysOf(newFormData)])).keys());
971
- return schema.reduce((acc, key) => {
972
- const oldValue = oldFormData[key];
973
- const newValue = newFormData[key];
974
- if (!isUndefinedOrNull(newValue)) return { ...acc, [key]: newValue };
975
- if (Array.isArray(oldValue)) return { ...acc, [key]: [] };
976
- if (typeof oldValue === "number") return { ...acc, [key]: null };
977
- if (typeof oldValue === "string") return { ...acc, [key]: "" };
978
- return { ...acc, [key]: "" };
979
- }, {});
980
- };
981
- const setRemovedFieldsOnSchemaToDeletedValue = (newData, existingData) => {
982
- const formIds = Array.from((/* @__PURE__ */ new Set([...keysOf(existingData), ...keysOf(newData)])).keys());
983
- return formIds.reduce((adjusted, formId) => {
984
- const oldFormData = existingData[formId];
985
- const newFormData = newData[formId];
986
- if (isUndefinedOrNull(oldFormData)) return { ...adjusted, [formId]: newFormData };
987
- if (isUndefinedOrNull(newFormData)) return adjusted;
988
- return { ...adjusted, [formId]: adjustFormData(oldFormData, newFormData) };
989
- }, {});
990
- };
991
- const formatFinancialInformationSummary = (data, language, country, dateOfIncorporation) => {
992
- let summary;
993
- if (!data) return void 0;
994
- if (dateOfIncorporation && !isDateOlderThanAYear(dateOfIncorporation)) {
995
- if (country === CountryCodes.UnitedKingdom) {
996
- summary = { numberOfEmployees: `${data.numberOfEmployees}` };
997
- return summary;
998
- }
999
- return void 0;
1000
- }
1001
- summary = {
1002
- currency: data.currency,
1003
- financialReportingDate: data.financialReportingDate
1004
- };
1005
- if (country === CountryCodes.UnitedKingdom) {
1006
- summary.numberOfEmployees = `${data.numberOfEmployees}`;
1007
- }
1008
- if (data.balanceSheetTotal) {
1009
- summary.balanceSheetTotal = summaryItem(
1010
- "balanceSheetTotal",
1011
- formatCurrency(data.balanceSheetTotal, data.currency, language)
1012
- );
1013
- }
1014
- if (data.annualTurnover) {
1015
- summary.annualTurnover = formatCurrency(data.annualTurnover, data.currency, language);
1016
- }
1017
- return summary;
1018
- };
1019
- const mapBusinessDetailsDocumentToApiDocument = async (data, entityId) => {
1020
- const {
1021
- companyRegistrationDocument,
1022
- companyTaxDocument,
1023
- companyProofOfDirectorDocument,
1024
- companyConstitutionalDocument,
1025
- companyProofOfSignatoryDocument,
1026
- companyProofOfOwnershipDocument,
1027
- basicInformation
1028
- } = data;
1029
- const taxDocumentType = COUNTRIES_THAT_USE_TAX_ID_INSTEAD_OF_VAT.includes(
1030
- basicInformation?.country
1031
- ) ? "proofOfOrganizationTaxInfo" : "vatDocument";
1032
- const documents = await Promise.all([
1033
- createDocumentRequest({
1034
- entityId,
1035
- entityType: "legalEntity",
1036
- documentType: "registrationDocument",
1037
- page1: companyRegistrationDocument?.registrationDocument?.[0]
1038
- }),
1039
- createDocumentRequest({
1040
- entityId,
1041
- entityType: "legalEntity",
1042
- documentType: taxDocumentType,
1043
- page1: companyTaxDocument?.taxDocument?.[0]
1044
- }),
1045
- createDocumentRequest({
1046
- entityId,
1047
- entityType: "legalEntity",
1048
- documentType: "proofOfDirector",
1049
- page1: companyProofOfDirectorDocument?.proofOfDirector?.[0]
1050
- }),
1051
- createDocumentRequest({
1052
- entityId,
1053
- entityType: "legalEntity",
1054
- documentType: "constitutionalDocument",
1055
- page1: companyConstitutionalDocument?.constitutionalDocument?.[0]
1056
- }),
1057
- createDocumentRequest({
1058
- entityId,
1059
- entityType: "legalEntity",
1060
- documentType: "proofOfSignatory",
1061
- page1: companyProofOfSignatoryDocument?.proofOfSignatory?.[0]
1062
- }),
1063
- createDocumentRequest({
1064
- entityId,
1065
- entityType: "legalEntity",
1066
- documentType: "proofOfOwnership",
1067
- page1: companyProofOfOwnershipDocument?.proofOfOwnership?.[0],
1068
- page2: companyProofOfOwnershipDocument?.proofOfOwnership?.[1]
1069
- })
1070
- ]);
1071
- return documents.filter(Boolean);
1072
- };
1073
- const mapBusinessDetailsSchemaToLegalEntity = (data, accountHolder, isExperimentEnabled) => {
1074
- const requestObj = {
1075
- ...formatObject(
1076
- data,
1077
- accountHolder === "mySoleProprietorName" ? solePropBusinessDetailsApiKeyMapping : businessDetailsApiKeyMapping
1078
- )
1079
- };
1080
- delete requestObj.organization?.legalFormDescription;
1081
- const canSaveRegNumberAbsentState = isExperimentEnabled("EnableRegistrationAndTaxAbsentStatesV4") && isRegistrationNumberAbsentStateV4Scenario(
1082
- data.basicInformation?.country,
1083
- data.companyStructure?.entityType
1084
- );
1085
- const taxData = COUNTRIES_USING_COMPANY_SEARCH.includes(
1086
- data.basicInformation?.country
1087
- ) ? data.basicInformation?.taxInformation : data.additionalInformation?.taxInformation;
1088
- const registrationNumber = COUNTRIES_USING_COMPANY_SEARCH.includes(
1089
- data.basicInformation?.country
1090
- ) ? data.basicInformation?.registrationNumber : data.additionalInformation?.registrationNumber;
1091
- const localization = [
1092
- mapSchemaFieldsToApiScriptLocalization(data.basicInformation ?? {}, "jaHani"),
1093
- mapSchemaFieldsToApiScriptLocalization(data.basicInformation ?? {}, "jaKana")
1094
- ].filter(({ fields }) => !isEmpty(fields)).map(({ script, fields }) => ({
1095
- script,
1096
- // mismatch between API `legalName` and schema `legalCompanyName`
1097
- fields: { legalName: fields.legalCompanyName }
1098
- }));
1099
- const doingBusinessAs = data.additionalInformation?.doingBusinessAs ?? "";
1100
- const entityObject = isEmpty(data.companyStructure) ? requestObj.soleProprietorship : requestObj.organization;
1101
- if (entityObject) {
1102
- if (taxData) {
1103
- entityObject.taxInformation = taxData;
1104
- }
1105
- if (!!requestObj.soleProprietorship && !requestObj.soleProprietorship?.countryOfGoverningLaw && !!data.basicInformation?.country) {
1106
- requestObj.soleProprietorship.countryOfGoverningLaw = data.basicInformation.country;
1107
- }
1108
- if (registrationNumber) {
1109
- entityObject.registrationNumber = registrationNumber;
1110
- if (canSaveRegNumberAbsentState && requestObj.organization) {
1111
- requestObj.organization.registrationNumberAbsent = false;
1112
- }
1113
- }
1114
- if (requestObj.organization && entityObject && localization.length > 0) {
1115
- entityObject.localization = localization;
1116
- }
1117
- if (data.additionalInformation?.exemptedFromRegistrationNumber && canSaveRegNumberAbsentState && requestObj.organization) {
1118
- requestObj.organization.registrationNumberAbsent = data.additionalInformation?.exemptedFromRegistrationNumber;
1119
- }
1120
- if (data.additionalInformation?.vatAbsenceReason) {
1121
- entityObject.vatNumber = "";
1122
- }
1123
- if (isExperimentEnabled("EnableDoingBusinessAsNameV4")) {
1124
- if (typeof data.additionalInformation?.hasDoingBusinessAs !== "undefined") {
1125
- entityObject.doingBusinessAsAbsent = !data.additionalInformation?.hasDoingBusinessAs;
1126
- }
1127
- } else {
1128
- entityObject.doingBusinessAs = doingBusinessAs || data.basicInformation?.legalCompanyName;
1129
- delete entityObject.doingBusinessAsAbsent;
1130
- }
1131
- if (data.additionalInformation?.operationalAddressIsSame === operationalAddressIsSameIds.OPERATIONAL_ADDRESS_IS_SAME && entityObject.principalPlaceOfBusiness) {
1132
- entityObject.principalPlaceOfBusiness = entityObject.registeredAddress;
1133
- }
1134
- if (entityObject.registeredAddress) {
1135
- const addressLocalizations = mapJpAddressSchemaToAddressLocalizations(
1136
- data.additionalInformation?.registrationAddress
1137
- );
1138
- if (addressLocalizations.length > 0)
1139
- entityObject.registeredAddress.localization = addressLocalizations;
1140
- }
1141
- if (!isEmpty(data.companyFinancialInformation)) {
1142
- const isIncorporationDateDependencyEnabled = isExperimentEnabled(
1143
- "EnableIncorporationDateBasedFinancialValidationForHO"
1144
- );
1145
- entityObject.financialReports = [
1146
- mapFinancialInformationToFinancialReport(
1147
- data.companyFinancialInformation,
1148
- isIncorporationDateDependencyEnabled ? data?.additionalInformation?.dateOfIncorporation : void 0
1149
- )
1150
- ];
1151
- }
1152
- }
1153
- requestObj.type = requestObj.organization ? LegalEntityTypes.ORGANIZATION : LegalEntityTypes.SOLE_PROPRIETORSHIP;
1154
- if (entityObject?.registeredAddress.country === "US") {
1155
- delete entityObject.registrationNumber;
1156
- }
1157
- if (!canSaveRegNumberAbsentState) {
1158
- delete requestObj.organization?.registrationNumberAbsent;
1159
- }
1160
- return requestObj;
1161
- };
1162
- const MANDATORY_FIELDS_BUSINESS_DETAILS = [
1163
- "basicInformation.legalCompanyName",
1164
- "basicInformation.country"
1165
- ];
1166
- const canSubmit = (data) => MANDATORY_FIELDS_BUSINESS_DETAILS.every((detail) => {
1167
- const value = getProp(data, detail);
1168
- return !isEmpty$1(value);
1169
- });
1170
- const isDocumentsRequired = (forms) => forms.some((form) => documentFormsIds.includes(form.formId));
1171
- const removeConditionalForms = (forms, isSkippingCompanyStructure) => isSkippingCompanyStructure ? forms.filter((f) => f.formId !== "companyStructure" && f.formId !== "companyType") : forms;
1172
- const formatBasicInformation = (data, datasetUtils, companyType, isCountryOfGoverningLawEnabled) => {
1173
- const country = data?.country;
1174
- const registrationNumberLabel = resolveFieldMetadata(
1175
- registrationNumberDefaultFieldConfig[country],
1176
- {
1177
- companyType,
1178
- registrationNumberType: data.registrationNumber ? inferCompanyRegistrationNumberType(data?.registrationNumber, country, companyType) : getCompanyRegistrationNumberOptions(country, companyType)?.[0]?.id
1179
- },
1180
- registrationNumberDefaultFieldMetadata
1181
- ).label;
1182
- const taxIdLabel = resolveFieldMetadata(
1183
- taxInformationDefaultFieldConfig[country],
1184
- {
1185
- taxIdNumberType: countryToTaxInfoTypeMap[country] ?? void 0,
1186
- // TODO use type selector
1187
- companyType: void 0
1188
- },
1189
- taxInformationDefaultFieldMetadata
1190
- ).label;
1191
- const countryOfGoverningLaw = getCountryOfGoverningLaw(isCountryOfGoverningLawEnabled, data);
1192
- return {
1193
- ["legalCompanyName"]: data.legalCompanyName,
1194
- country: datasetUtils.getCountryName(data.country),
1195
- [getKeyForField("stateOrProvince", data.country)]: datasetUtils.getStateName(
1196
- data.stateOrProvince,
1197
- data.country
1198
- ),
1199
- [taxIdLabel]: data.taxInformation?.find((taxId) => data.country === taxId.country)?.number,
1200
- [registrationNumberLabel]: data.registrationNumber,
1201
- countryOfGoverningLaw: datasetUtils.getCountryName(countryOfGoverningLaw)
1202
- };
1203
- };
1204
- const formatAdditionalInformation = (data, country, companyType, t) => {
1205
- const registrationNumberLabel = resolveFieldMetadata(
1206
- registrationNumberDefaultFieldConfig[country],
1207
- {
1208
- companyType,
1209
- registrationNumberType: data.registrationNumber ? inferCompanyRegistrationNumberType(data?.registrationNumber, country, companyType) : getCompanyRegistrationNumberOptions(country, companyType)?.[0]?.id
1210
- },
1211
- registrationNumberDefaultFieldMetadata
1212
- ).label;
1213
- const taxIdLabel = resolveFieldMetadata(
1214
- taxInformationDefaultFieldConfig[country],
1215
- {
1216
- taxIdNumberType: countryToTaxInfoTypeMap[country] ?? void 0,
1217
- // TODO use type selector
1218
- companyType: void 0
1219
- },
1220
- taxInformationDefaultFieldMetadata
1221
- ).label;
1222
- return {
1223
- ["businessStructure"]: data.legalFormLabel,
1224
- ["doingBusinessAs"]: data.doingBusinessAs,
1225
- ["industry"]: data.industryCodes?.[0].name,
1226
- [registrationNumberLabel]: data.registrationNumber,
1227
- [taxIdLabel]: data.isUen ? void 0 : data.taxInformation?.find((taxId) => country === taxId.country)?.number,
1228
- ["vatNumber"]: data.vatNumber,
1229
- ["vatAbsenceReason"]: data.vatAbsenceReason ? t(($) => $[data.vatAbsenceReason], { ns: "common" }) : void 0,
1230
- ["dateOfIncorporation"]: data.dateOfIncorporation,
1231
- ["stockExchangeMIC"]: data.stockExchangeMIC,
1232
- ["stockISIN"]: data.stockISIN,
1233
- ["stockTickerSymbol"]: data.stockTickerSymbol,
1234
- ["eInvoicingCode"]: data.eInvoicingCode
1235
- };
1236
- };
1237
- const formatDataForSummary = (data, forms, t, language, isExperimentEnabled) => {
1238
- const datasetUtils = datasetUtilities(language);
1239
- return entriesOf(data).reduce((summaryData, [form]) => {
1240
- if (!form || !data[form]) return summaryData;
1241
- const isCountryOfGoverningLawEnabled = isExperimentEnabled(
1242
- "EnableCountryOfGoverningLawForUKCompanies"
1243
- );
1244
- switch (form) {
1245
- case "basicInformation":
1246
- return {
1247
- ...summaryData,
1248
- [form]: formatBasicInformation(
1249
- data[form],
1250
- datasetUtils,
1251
- data.companyStructure?.entityType,
1252
- isCountryOfGoverningLawEnabled
1253
- )
1254
- };
1255
- case "companyStructure":
1256
- return {
1257
- ...summaryData,
1258
- [form]: {
1259
- entityType: t(
1260
- ($) => $[companyTypeMetadata[data["companyStructure"]?.entityType]?.name],
1261
- {
1262
- ns: "business"
1263
- }
1264
- )
1265
- }
1266
- };
1267
- case "additionalInformation":
1268
- return {
1269
- ...summaryData,
1270
- [form]: {
1271
- hasInnerForms: true,
1272
- additionalInformationFormName: formatAdditionalInformation(
1273
- data[form],
1274
- data.basicInformation?.country,
1275
- data.companyStructure?.entityType,
1276
- t
1277
- ),
1278
- registrationAddress: data.basicInformation?.country === CountryCodes.Japan ? mapJpAddressSummary(data[form].registrationAddress, datasetUtils) : mapAddressLabels(data[form].registrationAddress, datasetUtils),
1279
- operationalAddress: data[form].operationalAddressIsSame === operationalAddressIsSameIds.OPERATIONAL_ADDRESS_IS_NOT_SAME ? data.basicInformation?.country === CountryCodes.Japan ? mapJpAddressSummary(data[form].operationalAddress, datasetUtils) : mapAddressLabels(data[form].operationalAddress, datasetUtils) : void 0
1280
- }
1281
- };
1282
- case "companyRegistrationDocument":
1283
- if (!isDocumentsRequired(forms)) return summaryData;
1284
- return {
1285
- ...summaryData,
1286
- [form]: {
1287
- companyRegistrationDocument: {
1288
- fileName: data[form].registrationDocument?.[0]?.name
1289
- }
1290
- }
1291
- };
1292
- case "companyTaxDocument":
1293
- if (!isDocumentsRequired(forms)) return summaryData;
1294
- return {
1295
- ...summaryData,
1296
- [form]: {
1297
- companyTaxDocument: {
1298
- fileName: data[form].taxDocument?.[0]?.name
1299
- }
1300
- }
1301
- };
1302
- case "companyProofOfDirectorDocument":
1303
- if (!isDocumentsRequired(forms)) return summaryData;
1304
- return {
1305
- ...summaryData,
1306
- [form]: {
1307
- companyProofOfDirectorDocument: {
1308
- fileName: data[form].proofOfDirector?.[0]?.name
1309
- }
1310
- }
1311
- };
1312
- case "companyProofOfSignatoryDocument":
1313
- if (!isDocumentsRequired(forms)) return summaryData;
1314
- return {
1315
- ...summaryData,
1316
- [form]: {
1317
- companyProofOfSignatoryDocument: {
1318
- fileName: data[form].proofOfSignatory?.[0]?.name
1319
- }
1320
- }
1321
- };
1322
- case "companyProofOfOwnershipDocument":
1323
- if (!isDocumentsRequired(forms)) return summaryData;
1324
- return {
1325
- ...summaryData,
1326
- [form]: {
1327
- companyProofOfOwnershipDocument: {
1328
- fileName: data[form].proofOfOwnership?.map((doc) => doc.name).join("\n")
1329
- }
1330
- }
1331
- };
1332
- case "companyFinancialInformation": {
1333
- const isIncorporationDateDependencyEnabled = isExperimentEnabled(
1334
- "EnableIncorporationDateBasedFinancialValidationForHO"
1335
- );
1336
- return {
1337
- ...summaryData,
1338
- [form]: formatFinancialInformationSummary(
1339
- data[form],
1340
- language,
1341
- data?.basicInformation?.country,
1342
- isIncorporationDateDependencyEnabled ? data?.additionalInformation?.dateOfIncorporation : void 0
1343
- )
1344
- };
1345
- }
1346
- default:
1347
- return summaryData;
1348
- }
1349
- }, {});
1350
- };
1351
- async function submitDocuments({
1352
- data,
1353
- legalEntity,
1354
- forms,
1355
- documentUtils,
1356
- userEvents
1357
- }) {
1358
- if (!isDocumentsRequired(forms)) return;
1359
- const logger = createLogger();
1360
- const formattedDocument = await mapBusinessDetailsDocumentToApiDocument(data, legalEntity.id);
1361
- try {
1362
- if (formattedDocument) {
1363
- await documentUtils.uploadDocuments(formattedDocument, legalEntity.id);
1364
- formattedDocument.forEach((doc) => {
1365
- userEvents?.addTaskEvent("Success", {
1366
- actionType: "upload",
1367
- documentType: doc.type,
1368
- fileExtention: doc.attachments?.map((item) => getFileExtention(item.pageName)).filter((item) => item !== void 0) ?? []
1369
- });
1370
- });
1371
- }
1372
- } catch (err) {
1373
- logger.error(err);
1374
- userEvents.addTaskEvent("Encountered error", {
1375
- actionType: "upload",
1376
- returnType: err.errorCode,
1377
- returnValue: err.title ?? err.message
1378
- });
1379
- }
1380
- }
1381
- async function submit({
1382
- data,
1383
- legalEntityResponse,
1384
- associatedLegalArrangement,
1385
- nestedLegalEntity,
1386
- nestedLegalEntityDetails,
1387
- problems,
1388
- taskType,
1389
- accountHolder,
1390
- forms,
1391
- documentUtils,
1392
- t,
1393
- showToast,
1394
- setLoadingStatus,
1395
- setProblems,
1396
- handleUpdateLegalEntity,
1397
- createLegalEntity,
1398
- onExternalSubmit,
1399
- isExperimentEnabled,
1400
- userEvents,
1401
- efpBusinessLines,
1402
- createBusinessLine,
1403
- updateBusinessLine
1404
- }) {
1405
- const logger = createLogger();
1406
- setLoadingStatus("loading");
1407
- let trackingPayload = {
1408
- actionType: "submit",
1409
- companyStructure: data.companyStructure?.entityType,
1410
- countryOfRegistration: data.basicInformation?.country,
1411
- legalEntityName: accountHolder === "theCompanyIWorkFor" ? data.basicInformation?.legalCompanyName : void 0,
1412
- // Only send legalCompanyName for organizations
1413
- usedAdditionalAddress: data.additionalInformation?.operationalAddressIsSame === operationalAddressIsSameIds.OPERATIONAL_ADDRESS_IS_NOT_SAME
1414
- };
1415
- const entityToUpdate = (() => {
1416
- switch (taskType) {
1417
- case TaskTypes.SOLE_PROPRIETOR_COMPANY:
1418
- return associatedLegalArrangement;
1419
- case TaskTypes.TRUST_MEMBER_COMPANY:
1420
- case TaskTypes.UNINCORPORATED_PARTNERSHIP_MEMBER_COMPANY:
1421
- return nestedLegalEntity;
1422
- case TaskTypes.BUSINESS_DETAILS:
1423
- default:
1424
- return legalEntityResponse;
1425
- }
1426
- })();
1427
- const handleSubmitLegalEntity = async (legalEntity) => {
1428
- if (taskType === TaskTypes.TRUST_MEMBER_COMPANY && !nestedLegalEntity?.id || taskType === TaskTypes.UNINCORPORATED_PARTNERSHIP_MEMBER_COMPANY && !nestedLegalEntity?.id || taskType === TaskTypes.SOLE_PROPRIETOR_COMPANY && !associatedLegalArrangement?.id) {
1429
- return await createLegalEntity(legalEntity);
1430
- } else {
1431
- return handleUpdateLegalEntity({
1432
- ...drop("type").from(legalEntity),
1433
- id: entityToUpdate?.id ?? legalEntityResponse.id
1434
- });
1435
- }
1436
- };
1437
- const associateLegalEntityWithParent = async ({
1438
- legalEntity,
1439
- associatedLegalArrangement: associatedLegalArrangement2,
1440
- nestedLegalEntityDetails: nestedLegalEntityDetails2
1441
- }) => {
1442
- if (nestedLegalEntityDetails2 && associatedLegalArrangement2) {
1443
- const existingEntityAssociations = getOwnEntityAssociations(associatedLegalArrangement2);
1444
- const existingRoles = existingEntityAssociations.filter((ea) => ea.legalEntityId === associatedLegalArrangement2.id).map(({ type }) => type);
1445
- const newRoles = nestedLegalEntityDetails2?.roles ?? [];
1446
- const rolesChanged = !doArraysMatch(existingRoles, newRoles);
1447
- if (rolesChanged) {
1448
- const updatedAssociations = {
1449
- entityAssociations: [
1450
- ...newRoles.map((role) => ({
1451
- type: role,
1452
- legalEntityId: legalEntity.id
1453
- })) || [],
1454
- ...existingEntityAssociations.filter((ea) => ea.legalEntityId !== legalEntity.id) || []
1455
- ]
1456
- };
1457
- await handleUpdateLegalEntity({
1458
- ...updatedAssociations,
1459
- id: associatedLegalArrangement2.id
1460
- });
1461
- }
1462
- return;
1463
- } else {
1464
- const updatedAssociations = {
1465
- entityAssociations: [
1466
- {
1467
- type: LegalEntityTypes.SOLE_PROPRIETORSHIP,
1468
- legalEntityId: legalEntity.id
1469
- }
1470
- ]
1471
- };
1472
- await handleUpdateLegalEntity({ ...updatedAssociations, id: legalEntityResponse.id });
1473
- }
1474
- };
1475
- const savedLegalEntityData = legalEntityResponse ? mapLegalEntityToBusinessDetailsSchema(legalEntityResponse, void 0, isExperimentEnabled) : null;
1476
- const filteredData = savedLegalEntityData ? setRemovedFieldsOnSchemaToDeletedValue(data, savedLegalEntityData) : data;
1477
- if (filteredData?.additionalInformation && !filteredData?.additionalInformation?.taxInformation) {
1478
- filteredData.additionalInformation.taxInformation = void 0;
1479
- }
1480
- const isCountryOfGoverningLawEnabled = isExperimentEnabled(
1481
- "EnableCountryOfGoverningLawForUKCompanies"
1482
- );
1483
- const countryOfGoverningLaw = getCountryOfGoverningLaw(
1484
- isCountryOfGoverningLawEnabled,
1485
- filteredData?.basicInformation
1486
- );
1487
- if (filteredData?.basicInformation) {
1488
- if (countryOfGoverningLaw) {
1489
- filteredData.basicInformation.countryOfGoverningLaw = countryOfGoverningLaw;
1490
- } else {
1491
- delete filteredData.basicInformation.countryOfGoverningLaw;
1492
- }
1493
- }
1494
- const primaryIndustryCode = data.additionalInformation?.industryCodes && data.additionalInformation.industryCodes[0].id;
1495
- if (createBusinessLine && updateBusinessLine && primaryIndustryCode) {
1496
- const bankingBusinessLines = [];
1497
- const issuingBusinessLines = [];
1498
- if (efpBusinessLines) {
1499
- for (const bl of efpBusinessLines) {
1500
- if (bl.service === "banking") bankingBusinessLines.push(bl);
1501
- else issuingBusinessLines.push(bl);
1502
- }
1503
- }
1504
- const promises = [];
1505
- const operations = [];
1506
- const updateOrCreateBusinessLinesIfNeeded = (businessLines, requestedCapability, service) => {
1507
- if (businessLines.length) {
1508
- for (const bl of businessLines) {
1509
- if (bl.industryCode === primaryIndustryCode) continue;
1510
- const payload = {
1511
- id: bl.id,
1512
- legalEntityId: legalEntityResponse.id,
1513
- industryCode: primaryIndustryCode,
1514
- service
1515
- };
1516
- promises.push(updateBusinessLine(payload));
1517
- operations.push(payload);
1518
- }
1519
- } else if (requestedCapability) {
1520
- const payload = {
1521
- legalEntityId: legalEntityResponse.id,
1522
- industryCode: primaryIndustryCode,
1523
- service
1524
- };
1525
- promises.push(createBusinessLine(payload));
1526
- operations.push(payload);
1527
- }
1528
- };
1529
- updateOrCreateBusinessLinesIfNeeded(
1530
- bankingBusinessLines,
1531
- requestingBanking(legalEntityResponse),
1532
- "banking"
1533
- );
1534
- updateOrCreateBusinessLinesIfNeeded(
1535
- issuingBusinessLines,
1536
- requestingIssuing(legalEntityResponse),
1537
- "issuing"
1538
- );
1539
- let hadRejection = false;
1540
- (await Promise.allSettled(promises)).forEach((result, idx) => {
1541
- if (result.status !== "rejected") return;
1542
- const op = operations[idx];
1543
- logger.log(
1544
- `Failed to ${op.id ? "update" : "create"} business line with payload: ${JSON.stringify(op)}`
1545
- );
1546
- hadRejection = true;
1547
- });
1548
- const eventPayload = {
1549
- actionType: trackingPayload.actionType,
1550
- legalEntityName: trackingPayload.legalEntityName
1551
- };
1552
- if (!hadRejection) {
1553
- userEvents?.addTaskEvent("Success", eventPayload);
1554
- } else {
1555
- userEvents?.addTaskEvent("Encountered error", {
1556
- ...eventPayload,
1557
- returnType: "businessLines",
1558
- returnValue: "couldNotCreateOrUpdateBusinessLine"
1559
- });
1560
- showToast({
1561
- label: t(($) => $["failedToUpdateEfpBusinessLines"], { ns: "business" }),
1562
- variant: "error"
1563
- });
1564
- return setLoadingStatus("success");
1565
- }
1566
- }
1567
- try {
1568
- const mappedLegalEntity = {
1569
- ...mapBusinessDetailsSchemaToLegalEntity(filteredData, accountHolder, isExperimentEnabled),
1570
- entityAssociations: filterOutUnwantedAssociationsIfRootLE(
1571
- taskType,
1572
- entityToUpdate,
1573
- accountHolder
1574
- )
1575
- };
1576
- if (mappedLegalEntity.type === LegalEntityTypes.ORGANIZATION && legalEntityResponse.organization?.countryOfGoverningLaw !== mappedLegalEntity.organization?.countryOfGoverningLaw && legalEntityResponse.organization?.support) {
1577
- mappedLegalEntity.organization.support = determineCustomerSupport(
1578
- legalEntityResponse.organization.support,
1579
- mappedLegalEntity.organization?.countryOfGoverningLaw
1580
- );
1581
- }
1582
- const legalEntity = await handleSubmitLegalEntity(mappedLegalEntity);
1583
- if (taskType === TaskTypes.TRUST_MEMBER_COMPANY || taskType === TaskTypes.UNINCORPORATED_PARTNERSHIP_MEMBER_COMPANY || taskType === TaskTypes.SOLE_PROPRIETOR_COMPANY && !associatedLegalArrangement?.id) {
1584
- await associateLegalEntityWithParent({
1585
- legalEntity,
1586
- associatedLegalArrangement,
1587
- nestedLegalEntityDetails
1588
- });
1589
- }
1590
- await submitDocuments({
1591
- data,
1592
- legalEntity,
1593
- documentUtils,
1594
- forms,
1595
- userEvents
1596
- });
1597
- userEvents?.addTaskEvent("Success", trackingPayload);
1598
- showToast({
1599
- label: t(($) => $["successfullyUpdatedDetails"], { ns: "common" }),
1600
- variant: "success"
1601
- });
1602
- onExternalSubmit?.(data);
1603
- } catch (err) {
1604
- if (isValidationError(err)) {
1605
- const getErrors = processValidationErrors(err, TaskTypes.BUSINESS_DETAILS);
1606
- if (getErrors && !Object.keys(getErrors).length) {
1607
- showToast({
1608
- label: t(($) => $["failedToUpdateDetails"], { ns: "common" }),
1609
- variant: "error"
1610
- });
1611
- const unmappedErrorNames = err.invalidFields?.map((field) => field.name).filter(Boolean) ?? [];
1612
- if (unmappedErrorNames.length) {
1613
- trackingPayload = {
1614
- ...trackingPayload,
1615
- additionalData: { unmappedErrorNames }
1616
- };
1617
- }
1618
- } else {
1619
- setProblems({
1620
- ...problems,
1621
- validationErrors: getErrors
1622
- });
1623
- }
1624
- }
1625
- if (isMaintenanceModeError(err)) {
1626
- showToast({
1627
- label: t(($) => $["maintenanceModeMessage"], { ns: "common" }),
1628
- variant: "error",
1629
- duration: "indefinite"
1630
- });
1631
- }
1632
- if (!isValidationError(err) && !isMaintenanceModeError(err)) {
1633
- showToast({
1634
- label: t(($) => $["failedToUpdateDetails"], { ns: "common" }),
1635
- variant: "error"
1636
- });
1637
- }
1638
- logger.error(err);
1639
- userEvents?.addTaskEvent("Encountered error", {
1640
- ...trackingPayload,
1641
- returnType: err?.errorCode,
1642
- returnValue: err?.title || "backend"
1643
- });
1644
- } finally {
1645
- setLoadingStatus("success");
1646
- }
1647
- }
1648
- const getCountryOfGoverningLaw = (isCountryOfGoverningLawEnabled, basicData) => {
1649
- if (!isCountryOfGoverningLawEnabled || basicData?.country !== CountryCodes.UnitedKingdom) {
1650
- return void 0;
1651
- }
1652
- if (isCountryOfGoverningLawEnabled && basicData?.country === CountryCodes.UnitedKingdom && !basicData?.countryOfGoverningLaw) {
1653
- return CountryCodes.UnitedKingdom;
1654
- }
1655
- return basicData?.countryOfGoverningLaw;
1656
- };
1657
- const determineCustomerSupport = (customerSupport, country) => {
1658
- switch (country) {
1659
- case CountryCodes.Japan:
1660
- return unsetCustomerSupportNumber(customerSupport);
1661
- default:
1662
- return customerSupport;
1663
- }
1664
- };
1665
- const unsetCustomerSupportNumber = (customerSupport) => {
1666
- return customerSupport ? {
1667
- email: customerSupport.email,
1668
- phone: { number: "", type: "mobile" }
1669
- } : void 0;
1670
- };
1671
- function BusinessDetailsDropin({
1672
- country,
1673
- problems,
1674
- legalEntityResponse,
1675
- associatedLegalArrangement,
1676
- // initially undefined when creating entity
1677
- nestedLegalEntity,
1678
- // initially undefined when creating entity
1679
- nestedLegalEntityDetails,
1680
- // has entity roles for association logic
1681
- taskName,
1682
- hideSidebar,
1683
- taskType,
1684
- onChange,
1685
- onSubmit: onExternalSubmit,
1686
- handleHomeClick
1687
- }) {
1688
- const formRef = useRef(null);
1689
- const { accountHolder, setAccountHolder } = useAccountHolder();
1690
- const { showToast } = useToastContext();
1691
- const { t, i18n } = useTranslation(["common", "business"]);
1692
- const userEvents = useAnalyticsContext();
1693
- const { isExperimentEnabled } = useExperimentsContext();
1694
- const { isSettingEnabled } = useSettingsContext();
1695
- const { baseUrl, rootLegalEntityId } = useApiContext();
1696
- const verifiedBusiness$1 = verifiedBusiness.value;
1697
- const queryClient = useQueryClient();
1698
- const {
1699
- state: { currentState }
1700
- } = useStateContext();
1701
- useEffect(() => {
1702
- onChange?.(currentState);
1703
- }, [currentState, onChange]);
1704
- const isSoleProp = accountHolder === "mySoleProprietorName";
1705
- const formWith2Views = "basicInformation";
1706
- const isAssociationTaskType = !taskType ? accountHolder !== "theCompanyIWorkFor" : taskType !== TaskTypes.BUSINESS_DETAILS;
1707
- const legalEntityType = !isSoleProp ? LegalEntityTypes.ORGANIZATION : LegalEntityTypes.SOLE_PROPRIETORSHIP;
1708
- const isUS = country === CountryCodes.UnitedStates;
1709
- const currentCountry = currentState.data.basicInformation?.country ?? country;
1710
- const isSkippingCompanyStructure = isSettingEnabled(SettingNames.AllowLegalEntityTypeChange) && organizationTypesToSkipCompanyStructureForm.includes(
1711
- legalEntityResponse?.organization?.type
1712
- ) && accountHolder !== "aTrust" && accountHolder !== "anUnincorporatedPartnership" || isSoleProp;
1713
- useEffect(() => {
1714
- const isBankAccountRequested = legalEntityResponse?.capabilities?.issueBankAccount?.requested;
1715
- setIsBankAccountRequestedForOrganization(isBankAccountRequested);
1716
- }, [legalEntityResponse]);
1717
- const subjectEntity = !isAssociationTaskType ? legalEntityResponse : isSoleProp ? associatedLegalArrangement : nestedLegalEntity;
1718
- useEffect(() => {
1719
- userEvents.updateBaseTrackingPayload({ task: taskType });
1720
- userEvents.addTaskEvent("Landed on page", {
1721
- actionType: "start"
1722
- });
1723
- }, []);
1724
- const [tinMatched2, setTinMatched] = useState(void 0);
1725
- const [initialData, setInitialData] = useState(() => {
1726
- return mapLegalEntityToBusinessDetailsSchema(
1727
- !isAssociationTaskType ? legalEntityResponse : isSoleProp ? associatedLegalArrangement ?? legalEntityResponse : nestedLegalEntity,
1728
- isSoleProp ? legalEntityResponse : void 0,
1729
- isExperimentEnabled
1730
- );
1731
- });
1732
- const [trustedFields, setTrustedFields] = useState(subjectEntity?.trustedFields ?? void 0);
1733
- const [currentProblems, setCurrentProblems] = useState(problems ?? {});
1734
- const [showCompanyStructure, setShowCompanyStructure] = useState(
1735
- currentCountry !== "US" && !isSoleProp
1736
- );
1737
- const [showBusinessSelection, setShowBusinessSelection] = useState(false);
1738
- const [loadingStatus, setLoadingStatus] = useState("success");
1739
- const [businessMismatchModalOpen2, setBusinessMismatchModalOpen] = useState(false);
1740
- const [companySearchParams, setCompanySearchParams] = useState({
1741
- legalCompanyName: void 0,
1742
- country: void 0,
1743
- stateOrProvince: void 0,
1744
- registrationNumber: void 0
1745
- });
1746
- const [singleCompanyDatasetParams, setSingleCompanyDatasetParams] = useState();
1747
- const documentUtils = documentApiUtils({
1748
- baseUrl: baseUrl.value,
1749
- rootLegalEntityId: rootLegalEntityId.value
1750
- });
1751
- useEffect(() => {
1752
- if (!subjectEntity?.documentDetails?.length) return;
1753
- documentUtils.fetchDocuments(subjectEntity.documentDetails, subjectEntity.id).then(() => {
1754
- setInitialData(
1755
- mapLegalEntityToBusinessDetailsSchema(
1756
- subjectEntity,
1757
- isSoleProp ? legalEntityResponse : void 0
1758
- )
1759
- );
1760
- }).catch(
1761
- () => showToast({
1762
- label: t(($) => $["failedToFetchRelevantDocuments"], { ns: "common" }),
1763
- variant: "error"
1764
- })
1765
- );
1766
- }, []);
1767
- const parseConfiguration = useCallback(
1768
- ({ scenarios }) => composePerScenarioFormConfigurations(scenarios, businessDetailsFieldsPerScenario),
1769
- []
1770
- );
1771
- const {
1772
- fieldConfigurations
1773
- } = useScenarioConfiguration({
1774
- legalEntityType,
1775
- parseConfiguration,
1776
- setLoadingStatus,
1777
- country: currentCountry
1778
- });
1779
- const customRules = useMemo(
1780
- () => rules({
1781
- data: currentState.data,
1782
- country: currentCountry,
1783
- taskType: taskType ?? TaskTypes.BUSINESS_DETAILS,
1784
- isExperimentEnabled,
1785
- isSettingEnabled,
1786
- accountHolder,
1787
- tinMatched: tinMatched2,
1788
- rootLegalEntity: legalEntityResponse
1789
- }),
1790
- [
1791
- currentState.data,
1792
- currentCountry,
1793
- taskType,
1794
- isExperimentEnabled,
1795
- isSettingEnabled,
1796
- accountHolder,
1797
- tinMatched2,
1798
- legalEntityResponse
1799
- ]
1800
- );
1801
- const initialForms = useMemo(() => getForms(currentCountry), [currentCountry]);
1802
- const derivedProps = useMemo(
1803
- () => getPropsFromConfigurations({
1804
- scenarioConfiguration: fieldConfigurations,
1805
- forms: initialForms,
1806
- remediationActions: currentProblems?.remediationActions ? Object.values(currentProblems?.remediationActions) : [],
1807
- dataMissingErrors: currentProblems?.missingData ?? [],
1808
- fieldsWithExistingData: subjectEntity ? subjectEntity.type === LegalEntityTypes.SOLE_PROPRIETORSHIP ? getFieldsWithExistingData(
1809
- subjectEntity,
1810
- solePropBusinessDetailsApiKeyMapping,
1811
- solePropBusinessDetailsDocumentMapping
1812
- ) : getFieldsWithExistingData(
1813
- subjectEntity,
1814
- businessDetailsApiKeyMapping,
1815
- businessDetailsDocumentMapping
1816
- ) : [],
1817
- customRules,
1818
- legalEntityType: subjectEntity?.type,
1819
- legalEntityTrustedFields: trustedFields
1820
- }),
1821
- [
1822
- fieldConfigurations,
1823
- initialForms,
1824
- currentProblems?.remediationActions,
1825
- currentProblems?.missingData,
1826
- subjectEntity,
1827
- customRules,
1828
- trustedFields
1829
- ]
1830
- );
1831
- const {
1832
- data: companySearchResponse,
1833
- isLoading: searchingCompanies,
1834
- isError: searchingError
1835
- } = useCompanySearch(
1836
- {
1837
- name: companySearchParams.legalCompanyName ?? "",
1838
- country: companySearchParams.country,
1839
- state: companySearchParams.stateOrProvince,
1840
- registrationNumber: companySearchParams.registrationNumber
1841
- },
1842
- {
1843
- enabled: showBusinessSelection
1844
- }
1845
- );
1846
- const companySearchResults = companySearchResponse?.results;
1847
- const businessName = currentState?.data?.basicInformation?.legalCompanyName || "";
1848
- const taxInformation = currentState?.data?.basicInformation?.taxInformation;
1849
- const tin = taxInformation?.find((taxId) => currentCountry === taxId.country)?.number || "";
1850
- const [prevCompanySearchResults, setPrevCompanySearchResults] = useState(companySearchResults);
1851
- useEffect(() => {
1852
- if (!searchingCompanies && companySearchResults) {
1853
- userEvents.addPageEvent("Success", {
1854
- actionType: "submit",
1855
- returnValue: "companySearch",
1856
- additionalData: {
1857
- numberOfResults: companySearchResults.length
1858
- }
1859
- });
1860
- }
1861
- }, [searchingCompanies, companySearchResults, userEvents, subjectEntity]);
1862
- const {
1863
- data: singleCompanyDatasetAndTinResponse,
1864
- isLoading: fetchingDataset,
1865
- refetch: getCompanySelection
1866
- } = useCompanySelection(singleCompanyDatasetParams, {
1867
- enabled: !!singleCompanyDatasetParams && showBusinessSelection
1868
- });
1869
- const { refetch: fetchTin } = useVerifyTin({ name: businessName, tin }, { enabled: false });
1870
- const forms = useMemo(() => {
1871
- const requiredForms = getRequiredForms(
1872
- initialForms,
1873
- derivedProps?.requiredFields,
1874
- derivedProps?.optionalFields
1875
- );
1876
- const validityAddedForms = addValidityToForms(
1877
- requiredForms,
1878
- currentState.validityByForm,
1879
- currentProblems
1880
- );
1881
- return removeConditionalForms(
1882
- validityAddedForms,
1883
- currentCountry !== "US" || accountHolder !== "theCompanyIWorkFor" ? isSkippingCompanyStructure : !showCompanyStructure
1884
- );
1885
- }, [
1886
- initialForms,
1887
- derivedProps?.requiredFields,
1888
- derivedProps?.optionalFields,
1889
- currentState.validityByForm,
1890
- currentProblems,
1891
- currentCountry,
1892
- isSkippingCompanyStructure,
1893
- showCompanyStructure
1894
- ]);
1895
- const summaryData = useMemo(
1896
- () => ({
1897
- data: formatDataForSummary(currentState.data, forms, t, i18n.language, isExperimentEnabled),
1898
- omitted: {
1899
- keys: ["operationalAddressIsSame"]
1900
- }
1901
- }),
1902
- [currentState.data, forms, t, i18n.language, isExperimentEnabled]
1903
- );
1904
- const canSubmitForm = useMemo(
1905
- () => canSubmit(currentState.data) && hasDataChanged(initialData, currentState.data),
1906
- [initialData, currentState.data]
1907
- );
1908
- const { mutateAsync: createLegalEntity } = useCreateLegalEntity();
1909
- const { mutateAsync: updateLegalEntity } = useUpdateLegalEntity();
1910
- const { mutateAsync: clearCompanyData, isPending: resettingTrustedData } = useClearCompanyData();
1911
- const { data: businessLines } = useBusinessLines(ALLOWED_SOF_SERVICES, {
1912
- enabled: isSettingEnabled("allowBusinessLines")
1913
- });
1914
- const efpBusinessLines = businessLines?.filter((bl) => bl.service !== "paymentProcessing");
1915
- const { mutateAsync: createBusinessLine } = useCreateBusinessLine();
1916
- const { mutateAsync: updateBusinessLine } = useUpdateBusinessLine();
1917
- const submitTask = useCallback(() => {
1918
- setAccountHolder(accountHolder);
1919
- return submit({
1920
- data: currentState.data,
1921
- legalEntityResponse,
1922
- associatedLegalArrangement,
1923
- nestedLegalEntity,
1924
- nestedLegalEntityDetails,
1925
- problems: currentProblems,
1926
- taskType: taskType ?? TaskTypes.BUSINESS_DETAILS,
1927
- accountHolder: accountHolder ?? "theCompanyIWorkFor",
1928
- forms,
1929
- documentUtils,
1930
- t,
1931
- showToast,
1932
- setLoadingStatus,
1933
- setProblems: setCurrentProblems,
1934
- handleUpdateLegalEntity: updateLegalEntity,
1935
- createLegalEntity,
1936
- onExternalSubmit,
1937
- isExperimentEnabled,
1938
- userEvents,
1939
- efpBusinessLines,
1940
- createBusinessLine,
1941
- updateBusinessLine
1942
- });
1943
- }, [
1944
- setAccountHolder,
1945
- accountHolder,
1946
- currentState.data,
1947
- legalEntityResponse,
1948
- associatedLegalArrangement,
1949
- nestedLegalEntity,
1950
- nestedLegalEntityDetails,
1951
- currentProblems,
1952
- taskType,
1953
- forms,
1954
- documentUtils,
1955
- t,
1956
- showToast,
1957
- updateLegalEntity,
1958
- createLegalEntity,
1959
- onExternalSubmit,
1960
- isExperimentEnabled,
1961
- userEvents,
1962
- efpBusinessLines,
1963
- createBusinessLine,
1964
- updateBusinessLine
1965
- ]);
1966
- const {
1967
- handleNextClick,
1968
- handleBackClick,
1969
- activeForm,
1970
- shouldValidate,
1971
- setShouldValidate,
1972
- gotoFormByFormIndex,
1973
- steps
1974
- } = useFormComposer({
1975
- problems: currentProblems,
1976
- forms,
1977
- onSubmit: submitTask
1978
- });
1979
- const loading = fetchingDataset || searchingCompanies || resettingTrustedData;
1980
- const proceedToManualDataEntry = useCallback(async () => {
1981
- await clearCompanyData().then(async () => {
1982
- if (!isUS) {
1983
- setShowCompanyStructure(true);
1984
- return;
1985
- }
1986
- if (!businessName || !tin) {
1987
- setShowCompanyStructure(true);
1988
- return;
1989
- }
1990
- const { data: refetchedTinResponse } = await fetchTin();
1991
- if (refetchedTinResponse?.matched === true) {
1992
- setShowCompanyStructure(true);
1993
- setBusinessMismatchModalOpen(false);
1994
- } else {
1995
- setBusinessMismatchModalOpen(true);
1996
- setTinMatched(false);
1997
- if (subjectEntity?.id && subjectEntity?.type) {
1998
- userEvents.addPageEvent("Encountered error", {
1999
- actionType: "submit",
2000
- returnValue: "tinVerificationFailure"
2001
- });
2002
- }
2003
- }
2004
- });
2005
- }, [
2006
- clearCompanyData,
2007
- isUS,
2008
- businessName,
2009
- tin,
2010
- getCompanySelection,
2011
- subjectEntity?.id,
2012
- subjectEntity?.type,
2013
- userEvents
2014
- ]);
2015
- if (prevCompanySearchResults !== companySearchResults) {
2016
- if (companySearchResults?.length === 1 && isNormalizedStringMatch(businessName, companySearchResults[0].name)) {
2017
- setSingleCompanyDatasetParams({
2018
- company: companySearchResults[0],
2019
- state: currentState.data.basicInformation?.stateOrProvince,
2020
- name: businessName,
2021
- tin
2022
- });
2023
- } else if (companySearchResults?.length === 0 && !searchingCompanies && showBusinessSelection) {
2024
- proceedToManualDataEntry();
2025
- }
2026
- setPrevCompanySearchResults(companySearchResults);
2027
- }
2028
- const [prevSingleCompanyDatasetResponse, setPrevSingleCompanyDatasetResponse] = useState(
2029
- singleCompanyDatasetAndTinResponse
2030
- );
2031
- if (prevSingleCompanyDatasetResponse !== singleCompanyDatasetAndTinResponse) {
2032
- if (singleCompanyDatasetAndTinResponse?.tinMatched === true) {
2033
- setVerifiedBusiness(singleCompanyDatasetAndTinResponse);
2034
- handleNextClick();
2035
- } else {
2036
- setBusinessMismatchModalOpen(true);
2037
- setTinMatched(false);
2038
- }
2039
- setPrevSingleCompanyDatasetResponse(singleCompanyDatasetAndTinResponse);
2040
- }
2041
- useEffect(() => {
2042
- if (searchingError) {
2043
- proceedToManualDataEntry();
2044
- }
2045
- }, [searchingError]);
2046
- const isBusinessSelection = showBusinessSelection && activeForm.formId === formWith2Views;
2047
- const hideFooter = isBusinessSelection === true && loading;
2048
- const hideNextButton = activeForm.formId === formWith2Views ? isBusinessSelection : false;
2049
- const showBackButton = !COUNTRIES_USING_COMPANY_SEARCH.includes(currentCountry) ? false : isBusinessSelection ? loading : false;
2050
- const goToForm = useCallback(
2051
- (index) => {
2052
- if (!COUNTRIES_USING_COMPANY_SEARCH.includes(currentCountry)) {
2053
- return gotoFormByFormIndex(index);
2054
- }
2055
- const selectedFormId = forms[index].formId;
2056
- if (selectedFormId === formWith2Views) {
2057
- if (verifiedBusiness$1) setShowBusinessSelection(false);
2058
- if (activeForm.formId === "companyStructure" && companySearchResults?.length) {
2059
- setShowCompanyStructure(false);
2060
- }
2061
- return gotoFormByFormIndex(index);
2062
- } else {
2063
- if (verifiedBusiness$1) return gotoFormByFormIndex(index);
2064
- if (activeForm.formId !== formWith2Views) return gotoFormByFormIndex(index);
2065
- if (activeForm.formId === formWith2Views && !isBusinessSelection) {
2066
- setShowBusinessSelection(true);
2067
- }
2068
- }
2069
- },
2070
- [
2071
- currentCountry,
2072
- forms,
2073
- gotoFormByFormIndex,
2074
- verifiedBusiness$1,
2075
- activeForm.formId,
2076
- companySearchResults?.length,
2077
- isBusinessSelection
2078
- ]
2079
- );
2080
- const nextClick = useCallback(() => {
2081
- if (!COUNTRIES_USING_COMPANY_SEARCH.includes(currentCountry) || accountHolder !== "theCompanyIWorkFor")
2082
- return handleNextClick();
2083
- if (activeForm.formId === formWith2Views && currentState.validityByForm?.basicInformation && !isBusinessSelection && !verifiedBusiness$1) {
2084
- setCompanySearchParams({
2085
- legalCompanyName: currentState?.data?.basicInformation?.legalCompanyName ?? "",
2086
- country: currentState?.data.basicInformation?.country ?? country,
2087
- stateOrProvince: currentState?.data.basicInformation?.stateOrProvince,
2088
- registrationNumber: currentState?.data.basicInformation?.registrationNumber
2089
- });
2090
- setShowBusinessSelection(true);
2091
- } else {
2092
- handleNextClick();
2093
- }
2094
- }, [
2095
- currentCountry,
2096
- isSoleProp,
2097
- handleNextClick,
2098
- activeForm.formId,
2099
- currentState.validityByForm?.basicInformation,
2100
- currentState?.data.basicInformation?.legalCompanyName,
2101
- currentState?.data.basicInformation?.country,
2102
- currentState?.data.basicInformation?.stateOrProvince,
2103
- currentState?.data.basicInformation?.registrationNumber,
2104
- isBusinessSelection,
2105
- verifiedBusiness$1,
2106
- country
2107
- ]);
2108
- const backClick = useCallback(() => {
2109
- if (!COUNTRIES_USING_COMPANY_SEARCH.includes(currentCountry)) handleBackClick?.();
2110
- else {
2111
- switch (activeForm.formId) {
2112
- case formWith2Views: {
2113
- if (showBusinessSelection) setShowBusinessSelection(false);
2114
- break;
2115
- }
2116
- case "companyStructure": {
2117
- if (searchingError) {
2118
- setShowBusinessSelection(false);
2119
- setShowCompanyStructure(false);
2120
- handleBackClick?.();
2121
- break;
2122
- }
2123
- if (!searchingCompanies && companySearchResults && !companySearchResults.length) {
2124
- setShowBusinessSelection(false);
2125
- } else if (!verifiedBusiness$1) setShowCompanyStructure(false);
2126
- handleBackClick?.();
2127
- break;
2128
- }
2129
- case "additionalInformation": {
2130
- if (verifiedBusiness$1) setShowBusinessSelection(false);
2131
- handleBackClick?.();
2132
- break;
2133
- }
2134
- default:
2135
- handleBackClick?.();
2136
- break;
2137
- }
2138
- }
2139
- }, [
2140
- currentCountry,
2141
- handleBackClick,
2142
- activeForm.formId,
2143
- showBusinessSelection,
2144
- searchingError,
2145
- searchingCompanies,
2146
- companySearchResults,
2147
- verifiedBusiness$1
2148
- ]);
2149
- const homeClick = () => {
2150
- handleHomeClick?.();
2151
- };
2152
- const handleBusinessMismatchContinue = useCallback(() => {
2153
- setShowCompanyStructure(true);
2154
- setTrustedFields([]);
2155
- setBusinessMismatchModalOpen(false);
2156
- }, [setShowCompanyStructure, setTrustedFields, setBusinessMismatchModalOpen]);
2157
- const handleBusinessMismatchCancel = useCallback(() => {
2158
- backClick?.();
2159
- setBusinessMismatchModalOpen(false);
2160
- setTinMatched(void 0);
2161
- }, [backClick, setTinMatched, setBusinessMismatchModalOpen]);
2162
- const resetBusinessData = useCallback(() => {
2163
- queryClient.resetQueries({
2164
- queryKey: [
2165
- "companySearch",
2166
- {
2167
- name: companySearchParams.legalCompanyName ?? "",
2168
- country: companySearchParams.country,
2169
- state: companySearchParams.stateOrProvince,
2170
- registrationNumber: companySearchParams.registrationNumber
2171
- }
2172
- ]
2173
- });
2174
- setVerifiedBusiness(void 0);
2175
- }, [
2176
- companySearchParams.country,
2177
- companySearchParams.legalCompanyName,
2178
- companySearchParams.registrationNumber,
2179
- companySearchParams.stateOrProvince,
2180
- queryClient
2181
- ]);
2182
- useEffect(() => {
2183
- if (verifiedBusiness$1?.name && currentState.data.basicInformation?.legalCompanyName !== verifiedBusiness$1?.name && (currentState.data.basicInformation?.legalCompanyName !== companySearchParams.legalCompanyName || currentState.data.basicInformation?.stateOrProvince !== companySearchParams.stateOrProvince)) {
2184
- setShowCompanyStructure(false);
2185
- resetBusinessData();
2186
- }
2187
- }, [
2188
- companySearchParams,
2189
- currentState.data.basicInformation,
2190
- currentState.data.basicInformation?.legalCompanyName,
2191
- resetBusinessData,
2192
- verifiedBusiness$1
2193
- ]);
2194
- const [prevCurrentCountry, setPrevCurrentCountry] = useState(currentCountry);
2195
- if (prevCurrentCountry !== currentCountry && trustedFields?.length && legalEntityResponse.organization?.registeredAddress.country !== currentCountry) {
2196
- setTrustedFields(void 0);
2197
- setPrevCurrentCountry(currentCountry);
2198
- }
2199
- return /* @__PURE__ */ jsxs(
2200
- FormWrapper,
2201
- {
2202
- taskName: taskName ?? "businessDetails",
2203
- gotoFormByFormIndex: goToForm,
2204
- hideSidebar,
2205
- hideFooter,
2206
- loadingStatus,
2207
- forms,
2208
- activeForm,
2209
- validateForm: () => setShouldValidate(true),
2210
- onSubmit: submitTask,
2211
- problems: currentProblems,
2212
- canSubmit: canSubmitForm,
2213
- summary: summaryData,
2214
- handleNextClick: nextClick,
2215
- handleBackClick: backClick,
2216
- handleHomeClick: homeClick,
2217
- steps,
2218
- showBackButton,
2219
- hideNextButton,
2220
- children: [
2221
- /* @__PURE__ */ jsx(
2222
- BusinessDetails,
2223
- {
2224
- ...derivedProps,
2225
- ref: formRef,
2226
- data: initialData,
2227
- country: currentCountry,
2228
- problems: currentProblems,
2229
- activeForm,
2230
- shouldValidate,
2231
- isTopLevelEntity: taskType === TaskTypes.BUSINESS_DETAILS,
2232
- showBusinessSelection,
2233
- setShowBusinessSelection,
2234
- showCompanyStructure,
2235
- setShowCompanyStructure,
2236
- searchResults: companySearchResults,
2237
- loading,
2238
- proceedToManualDataEntry,
2239
- handleNextClick: nextClick,
2240
- taskType
2241
- }
2242
- ),
2243
- businessMismatchModalOpen2 && /* @__PURE__ */ jsx(
2244
- Confirm,
2245
- {
2246
- title: t(($) => $["businessSelection__tinVerificationFailureModalHeader"], {
2247
- ns: "business"
2248
- }),
2249
- description: t(($) => $["businessSelection__tinVerificationFailureModalContent"], {
2250
- ns: "business"
2251
- }),
2252
- cancelText: t(($) => $["businessSelection__tinVerificationFailureModalSecondaryButton"], {
2253
- ns: "business"
2254
- }),
2255
- confirmText: t(($) => $["businessSelection__tinVerificationFailureModalPrimaryButton"], {
2256
- ns: "business"
2257
- }),
2258
- onCancel: handleBusinessMismatchCancel,
2259
- onConfirm: handleBusinessMismatchContinue
2260
- }
2261
- )
2262
- ]
2263
- }
2264
- );
2265
- }
2266
- const LazyJpAddress = lazy(
2267
- async () => (await import("./JpAddress-R81eO-aY.js")).JpAddress
2268
- );
2269
- function AdditionalInformationMultiform({
2270
- id,
2271
- country,
2272
- companyType,
2273
- shouldValidate,
2274
- heading = "additionalInformationFormHeading",
2275
- description,
2276
- validationErrors = {},
2277
- verificationErrors = {}
2278
- }) {
2279
- const { t, i18n } = useTranslation(["common", "business"]);
2280
- const { form } = useFormContext();
2281
- const { isExperimentEnabled } = useExperimentsContext();
2282
- const { data: rootLegalEntity } = useLegalEntity(ROOT_LE);
2283
- const verifiedBusiness$1 = verifiedBusiness.value;
2284
- const showVerified = !!verifiedBusiness$1;
2285
- const showStockData = companyType === CompanyTypesValues.PUBLIC_COMPANY;
2286
- const addressSchema = getAddressSchemaForCountry(country).filter(
2287
- (field) => !COUNTRIES_WITH_STATES_DATASET.includes(country) ? field !== "stateOrProvince" : true
2288
- );
2289
- const currentCountryTaxInformation = form.data?.additionalInformation?.taxInformation?.find(
2290
- (taxId) => taxId.country === country
2291
- );
2292
- const businessLineTypes = [];
2293
- if (requestingBanking(rootLegalEntity)) {
2294
- businessLineTypes.push("banking");
2295
- }
2296
- if (requestingIssuing(rootLegalEntity)) {
2297
- businessLineTypes.push("issuing");
2298
- }
2299
- const { data: industryCodes } = useIndustryCodes(businessLineTypes, i18n.language);
2300
- const [addressToCheck, setAddressToCheck] = useDebouncedState(500);
2301
- const { data: cleansedRegistrationAddress } = useAddressCleanse(
2302
- {
2303
- text: addressToCheck,
2304
- country
2305
- },
2306
- { enabled: Boolean(addressToCheck) }
2307
- );
2308
- const mustProvideOperationalAddress = cleansedRegistrationAddress?.poBox ?? false;
2309
- useEffect(
2310
- () => setAddressToCheck(
2311
- formatAddressForCleanse(form.data?.additionalInformation?.registrationAddress ?? {})
2312
- ),
2313
- [form.data?.additionalInformation?.registrationAddress, setAddressToCheck]
2314
- );
2315
- const verifiedAddress = useMemo(() => {
2316
- if (!verifiedBusiness$1) return void 0;
2317
- return verifiedBusiness$1.isPrincipalAddress || verifiedBusiness$1.state && form.data?.basicInformation?.stateOrProvince !== verifiedBusiness$1.state ? { operationalAddress: { ...mapAddressData(verifiedBusiness$1), country } } : {
2318
- registrationAddress: {
2319
- ...mapAddressData(verifiedBusiness$1),
2320
- country,
2321
- stateOrProvince: form.data?.basicInformation?.stateOrProvince
2322
- }
2323
- };
2324
- }, [verifiedBusiness$1, form.data?.basicInformation?.stateOrProvince, country]);
2325
- const handleChangeFor = useCallback(
2326
- (fieldName, mode) => form.handleChangeFor(fieldName, "additionalInformation", mode),
2327
- [form]
2328
- );
2329
- const handleRegistrationAddressChange = (state) => {
2330
- handleChangeFor("registrationAddress")(state.data);
2331
- form.setValid("registrationAddress", Boolean(state.isValid), "additionalInformation");
2332
- };
2333
- const handleOperationalAddressChange = (state) => {
2334
- handleChangeFor("operationalAddress")(state.data);
2335
- form.setValid("operationalAddress", Boolean(state.isValid), "additionalInformation");
2336
- };
2337
- const handleOperationalAddressIsSameChange = useCallback(
2338
- (isChecked) => {
2339
- if (isChecked) {
2340
- handleChangeFor("operationalAddressIsSame")(
2341
- operationalAddressIsSameIds.OPERATIONAL_ADDRESS_IS_SAME
2342
- );
2343
- form.setValid("operationalAddress", true, "additionalInformation");
2344
- } else {
2345
- handleChangeFor("operationalAddressIsSame")(
2346
- operationalAddressIsSameIds.OPERATIONAL_ADDRESS_IS_NOT_SAME
2347
- );
2348
- }
2349
- },
2350
- [form, handleChangeFor]
2351
- );
2352
- if (form.data?.additionalInformation?.operationalAddressIsSame === null) {
2353
- handleOperationalAddressIsSameChange(true);
2354
- }
2355
- useEffect(() => {
2356
- if (mustProvideOperationalAddress && form.data?.additionalInformation?.operationalAddressIsSame !== operationalAddressIsSameIds.OPERATIONAL_ADDRESS_IS_NOT_SAME) {
2357
- handleOperationalAddressIsSameChange(false);
2358
- }
2359
- }, [
2360
- handleOperationalAddressIsSameChange,
2361
- mustProvideOperationalAddress,
2362
- form.data?.additionalInformation?.operationalAddressIsSame
2363
- ]);
2364
- const formUtils = useMemo(() => {
2365
- const initialProps = {
2366
- data: form.data?.additionalInformation ?? {},
2367
- fieldValidationErrors: validationErrors,
2368
- formVerificationErrors: verificationErrors,
2369
- allFields: form.allFields?.additionalInformation ?? [],
2370
- requiredFields: form.requiredFields?.additionalInformation ?? [],
2371
- optionalFields: form.optionalFields?.additionalInformation ?? [],
2372
- trustedFields: form.trustedFields?.additionalInformation ?? [],
2373
- obscuredFields: form.obscuredFields?.additionalInformation ?? [],
2374
- errors: form.errors?.additionalInformation ?? {},
2375
- valid: form.valid?.additionalInformation ?? {},
2376
- handleFieldChange: handleChangeFor
2377
- };
2378
- const formUtilProps = initialProps.allFields?.reduce((acc, field) => {
2379
- switch (field) {
2380
- case "hasDoingBusinessAs":
2381
- return mergeFieldMetadataIntoProps(
2382
- "hasDoingBusinessAs",
2383
- doingBusinessAsAbsentFieldMetadata,
2384
- acc
2385
- );
2386
- case "doingBusinessAs":
2387
- return mergeFieldMetadataIntoProps("doingBusinessAs", doingBusinessAsFieldMetadata, acc);
2388
- case "registrationNumber":
2389
- return mergeFieldMetadataIntoProps(
2390
- field,
2391
- resolveFieldMetadata(
2392
- registrationNumberDefaultFieldConfig[country],
2393
- {
2394
- companyType,
2395
- registrationNumberType: form.data?.additionalInformation?.registrationNumberType,
2396
- isExperimentEnabled
2397
- },
2398
- registrationNumberDefaultFieldMetadata
2399
- ),
2400
- acc
2401
- );
2402
- case "taxInformation":
2403
- return mergeFieldMetadataIntoProps(
2404
- field,
2405
- resolveFieldMetadata(
2406
- taxInformationDefaultFieldConfig[country],
2407
- {
2408
- taxIdNumberType: currentCountryTaxInformation?.type,
2409
- companyType
2410
- },
2411
- taxInformationDefaultFieldMetadata
2412
- ),
2413
- acc
2414
- );
2415
- case "vatNumber":
2416
- return mergeFieldMetadataIntoProps(
2417
- field,
2418
- resolveFieldMetadata(
2419
- defaultFieldConfig[country],
2420
- { vatNumberType: form.data?.additionalInformation?.vatNumberType },
2421
- defaultFieldMetadata
2422
- ),
2423
- acc
2424
- );
2425
- case "vatAbsenceReason":
2426
- return mergeFieldMetadataIntoProps("vatAbsenceReason", vatAbsenceReasonMetadata, acc);
2427
- case "eInvoicingCode":
2428
- return mergeFieldMetadataIntoProps("eInvoicingCode", eInvoicingCodeFieldMetadata, acc);
2429
- case "industryCodes":
2430
- return mergeFieldMetadataIntoProps("industryCodes", industryCodeFieldMetadata, acc);
2431
- case "dateOfIncorporation":
2432
- return mergeFieldMetadataIntoProps(
2433
- "dateOfIncorporation",
2434
- dateOfIncorporationFieldMetadata,
2435
- acc
2436
- );
2437
- case "stockExchangeMIC":
2438
- return mergeFieldMetadataIntoProps(
2439
- "stockExchangeMIC",
2440
- stockExchangeMICFieldMetadata,
2441
- acc
2442
- );
2443
- case "stockISIN":
2444
- return mergeFieldMetadataIntoProps("stockISIN", stockISINFieldMetadata, acc);
2445
- case "stockTickerSymbol":
2446
- return mergeFieldMetadataIntoProps(
2447
- "stockTickerSymbol",
2448
- stockTickerSymbolFieldMetadata,
2449
- acc
2450
- );
2451
- case "legalForm":
2452
- return mergeFieldMetadataIntoProps("legalForm", legalFormFieldMetadata, acc);
2453
- default:
2454
- return acc;
2455
- }
2456
- }, initialProps);
2457
- return createFormUtils(formUtilProps ?? initialProps, t);
2458
- }, [
2459
- companyType,
2460
- country,
2461
- currentCountryTaxInformation?.type,
2462
- form.allFields?.additionalInformation,
2463
- form.data?.additionalInformation,
2464
- form.errors?.additionalInformation,
2465
- form.obscuredFields?.additionalInformation,
2466
- form.optionalFields?.additionalInformation,
2467
- form.requiredFields?.additionalInformation,
2468
- form.trustedFields?.additionalInformation,
2469
- form.valid?.additionalInformation,
2470
- handleChangeFor,
2471
- t,
2472
- isExperimentEnabled,
2473
- validationErrors,
2474
- verificationErrors
2475
- ]);
2476
- const showField = (fieldKeys) => fieldKeys.some((field) => formUtils.isRequiredField(field) || formUtils.isOptionalField(field));
2477
- const datasetUtils = datasetUtilities(i18n.language);
2478
- const registrationAddressDescription = useMemo(() => {
2479
- if (country) {
2480
- return ["US", "NL", "CZ"].includes(country) ? t(($) => $["youBusinessOfficalAddressInTheCounty"], {
2481
- ns: "business",
2482
- country: datasetUtils.getCountryName(country)
2483
- }) : t(($) => $["youBusinessOfficalAddressInCounty"], {
2484
- ns: "business",
2485
- country: datasetUtils.getCountryName(country)
2486
- });
2487
- }
2488
- return t(($) => $["youBusinessOfficalAddress"], { ns: "business" });
2489
- }, [country, datasetUtils, t]);
2490
- return /* @__PURE__ */ jsxs("form", { id, className: "adyen-kyc-additional-information", children: [
2491
- /* @__PURE__ */ jsx(
2492
- Header,
2493
- {
2494
- title: t(($) => $[heading], { ns: "common" }),
2495
- description: description ? t(($) => $[description], { ns: "common" }) : void 0
2496
- }
2497
- ),
2498
- /* @__PURE__ */ jsx(
2499
- ErrorPanel,
2500
- {
2501
- id: "ariaErrorField",
2502
- verificationErrors,
2503
- validationErrors,
2504
- formUtils
2505
- }
2506
- ),
2507
- /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-additional-information__content", children: [
2508
- showVerified && /* @__PURE__ */ jsxs("section", { children: [
2509
- /* @__PURE__ */ jsx("div", { className: "adyen-kyc-additional-information__section-heading", children: /* @__PURE__ */ jsx(Typography, { el: "h3", variant: "title", children: t(($) => $["verifiedInformation"], { ns: "business" }) }) }),
2510
- /* @__PURE__ */ jsx(
2511
- VerifiedBusinessCard,
2512
- {
2513
- verifiedBusiness: verifiedBusiness$1,
2514
- verifiedAddress: verifiedAddress?.registrationAddress ?? verifiedAddress?.operationalAddress
2515
- }
2516
- )
2517
- ] }),
2518
- /* @__PURE__ */ jsxs("section", { children: [
2519
- showVerified && /* @__PURE__ */ jsx("div", { className: "adyen-kyc-additional-information__section-heading", children: /* @__PURE__ */ jsx(Typography, { el: "h3", variant: "title", children: t(($) => $["otherBusinessInformation"], { ns: "business" }) }) }),
2520
- /* @__PURE__ */ jsxs("fieldset", { children: [
2521
- showField(LEGAL_FORM_FIELDS) && /* @__PURE__ */ jsx("div", { className: "adyen-kyc-field-wrapper", children: /* @__PURE__ */ jsx(
2522
- LegalFormField,
2523
- {
2524
- name: "legalForm",
2525
- countryCode: country,
2526
- data: {
2527
- legalForm: formUtils.getFieldData(
2528
- form.data?.additionalInformation ?? {},
2529
- LEGAL_FORM_FIELDS
2530
- )?.legalForm
2531
- },
2532
- valid: formUtils.getFieldValid(
2533
- form.valid?.additionalInformation ?? {},
2534
- LEGAL_FORM_FIELDS
2535
- ),
2536
- errorMessage: form.errors.additionalInformation?.legalForm?.errorMessage,
2537
- handleChangeFor,
2538
- readonly: false,
2539
- label: formUtils.getLabel("legalForm", "businessStructure")
2540
- }
2541
- ) }),
2542
- showField(DBA_NAME_FIELD) && /* @__PURE__ */ jsx("div", { className: "adyen-kyc-field-wrapper", children: /* @__PURE__ */ jsx(
2543
- DBANameField,
2544
- {
2545
- data: formUtils.getFieldData(
2546
- form.data?.additionalInformation ?? {},
2547
- DBA_NAME_FIELD
2548
- ),
2549
- valid: formUtils.getFieldValid(
2550
- form.valid?.additionalInformation ?? {},
2551
- DBA_NAME_FIELD
2552
- ),
2553
- errors: formUtils.getFieldErrors(
2554
- form.errors?.additionalInformation ?? {},
2555
- validationErrors,
2556
- DBA_NAME_FIELD
2557
- ),
2558
- labels: formUtils.getFieldLabels(DBA_NAME_FIELD, {
2559
- hasDoingBusinessAs: "hasDba"
2560
- }),
2561
- readonly: formUtils.isReadOnly("doingBusinessAs"),
2562
- handleChangeFor
2563
- }
2564
- ) }),
2565
- showField(BUSINESS_REGISTRATION_NUMBER_FIELD) && /* @__PURE__ */ jsx("div", { className: "adyen-kyc-field-wrapper", children: /* @__PURE__ */ jsx(
2566
- BusinessRegistrationNumberField,
2567
- {
2568
- data: formUtils.getFieldData(
2569
- form.data?.additionalInformation ?? {},
2570
- BUSINESS_REGISTRATION_NUMBER_FIELD
2571
- ),
2572
- valid: formUtils.getFieldValid(
2573
- form.valid?.additionalInformation ?? {},
2574
- BUSINESS_REGISTRATION_NUMBER_FIELD
2575
- ),
2576
- errors: formUtils.getFieldErrors(
2577
- form.errors?.additionalInformation ?? {},
2578
- validationErrors,
2579
- BUSINESS_REGISTRATION_NUMBER_FIELD
2580
- ),
2581
- labels: formUtils.getFieldLabels(BUSINESS_REGISTRATION_NUMBER_FIELD, {
2582
- exemptedFromRegistrationNumber: "iDontHaveARegistrationNumber"
2583
- }),
2584
- mask: formUtils.getMask("registrationNumber"),
2585
- guidanceText: formUtils.getFieldGuidanceText(BUSINESS_REGISTRATION_NUMBER_FIELD),
2586
- placeholders: formUtils.getFieldPlaceholders(BUSINESS_REGISTRATION_NUMBER_FIELD),
2587
- helperText: formUtils.getFieldHelperText(BUSINESS_REGISTRATION_NUMBER_FIELD),
2588
- readonly: formUtils.isReadOnly("registrationNumber"),
2589
- optional: formUtils.isOptionalField("registrationNumber"),
2590
- shouldValidate,
2591
- handleChangeFor,
2592
- country,
2593
- canExempt: showField(["exemptedFromRegistrationNumber"]),
2594
- companyType
2595
- }
2596
- ) }),
2597
- showField(TAX_INFORMATION_FIELD) && /* @__PURE__ */ jsx("div", { className: "adyen-kyc-field-wrapper", children: /* @__PURE__ */ jsx(
2598
- TaxInformationField,
2599
- {
2600
- data: formUtils.getFieldData(
2601
- form.data?.additionalInformation ?? {},
2602
- TAX_INFORMATION_FIELD
2603
- ),
2604
- valid: formUtils.getFieldValid(
2605
- form.valid?.additionalInformation ?? {},
2606
- TAX_INFORMATION_FIELD
2607
- ),
2608
- errors: formUtils.getFieldErrors(
2609
- form.errors?.additionalInformation ?? {},
2610
- validationErrors,
2611
- TAX_INFORMATION_FIELD
2612
- ),
2613
- labels: formUtils.getFieldLabels(TAX_INFORMATION_FIELD, {
2614
- exemptedFromTax: "iDontHaveATaxId"
2615
- }),
2616
- mask: formUtils.getMask("taxInformation"),
2617
- guidanceText: formUtils.getFieldGuidanceText(TAX_INFORMATION_FIELD),
2618
- readonly: formUtils.isReadOnly("taxInformation"),
2619
- shouldValidate,
2620
- handleChangeFor,
2621
- canExempt: showField(["exemptedFromTax"]),
2622
- country,
2623
- entityType: companyType,
2624
- defaultData: form.defaultData?.additionalInformation?.taxInformation,
2625
- registrationNumber: form.data?.additionalInformation?.registrationNumber
2626
- }
2627
- ) }),
2628
- showField(VAT_NUMBER_FIELD) && /* @__PURE__ */ jsx("div", { className: "adyen-kyc-field-wrapper", children: /* @__PURE__ */ jsx(
2629
- VatNumberField,
2630
- {
2631
- data: formUtils.getFieldData(
2632
- form.data?.additionalInformation ?? {},
2633
- VAT_NUMBER_FIELD
2634
- ),
2635
- valid: formUtils.getFieldValid(
2636
- form.valid?.additionalInformation ?? {},
2637
- VAT_NUMBER_FIELD
2638
- ),
2639
- errors: formUtils.getFieldErrors(
2640
- form.errors?.additionalInformation ?? {},
2641
- validationErrors,
2642
- VAT_NUMBER_FIELD
2643
- ),
2644
- labels: formUtils.getFieldLabels(VAT_NUMBER_FIELD, {
2645
- exemptedFromVat: "iDontHaveAVatNumber"
2646
- }),
2647
- mask: formUtils.getMask("vatNumber"),
2648
- guidanceText: formUtils.getFieldGuidanceText(VAT_NUMBER_FIELD),
2649
- placeholders: formUtils.getFieldPlaceholders(VAT_NUMBER_FIELD),
2650
- readonly: formUtils.isReadOnly("vatNumber"),
2651
- handleChangeFor,
2652
- country,
2653
- canExempt: showField(["exemptedFromVat"]),
2654
- shouldValidate
2655
- }
2656
- ) }),
2657
- formUtils.isRequiredField("eInvoicingCode", false) && /* @__PURE__ */ jsx("div", { className: "adyen-kyc-field-wrapper", children: /* @__PURE__ */ jsx(
2658
- EInvoicingCodeField,
2659
- {
2660
- data: formUtils.getFieldData(
2661
- form.data?.additionalInformation ?? {},
2662
- EINVOICING_CODE_FIELD
2663
- ),
2664
- valid: formUtils.getFieldValid(
2665
- form.valid?.additionalInformation ?? {},
2666
- EINVOICING_CODE_FIELD
2667
- ),
2668
- errors: formUtils.getFieldErrors(
2669
- form.errors?.additionalInformation ?? {},
2670
- validationErrors,
2671
- EINVOICING_CODE_FIELD
2672
- ),
2673
- labels: formUtils.getFieldLabels(EINVOICING_CODE_FIELD),
2674
- placeholders: formUtils.getFieldPlaceholders(EINVOICING_CODE_FIELD),
2675
- mask: formUtils.getMask("eInvoicingCode"),
2676
- guidanceText: formUtils.getFieldGuidanceText(EINVOICING_CODE_FIELD),
2677
- readonly: formUtils.isReadOnly("eInvoicingCode"),
2678
- handleChangeFor
2679
- }
2680
- ) }),
2681
- showField(INDUSTRY_CODE_FIELD) && /* @__PURE__ */ jsx("div", { className: "adyen-kyc-field-wrapper", "data-testid": "industryCode", children: /* @__PURE__ */ jsx(
2682
- IndustryCodeField,
2683
- {
2684
- data: formUtils.getFieldData(
2685
- form.data?.additionalInformation ?? {},
2686
- INDUSTRY_CODE_FIELD
2687
- ),
2688
- valid: formUtils.getFieldValid(
2689
- form.valid?.additionalInformation ?? {},
2690
- INDUSTRY_CODE_FIELD
2691
- ),
2692
- errors: formUtils.getFieldErrors(
2693
- form.errors?.additionalInformation ?? {},
2694
- validationErrors,
2695
- INDUSTRY_CODE_FIELD
2696
- ),
2697
- labels: {
2698
- industryCodes: t(($) => $["industry"], {
2699
- ns: "business"
2700
- })
2701
- },
2702
- guidanceText: {
2703
- industryCodes: t(($) => $["primaryIndustryCodeGuidance"], {
2704
- ns: "business"
2705
- })
2706
- },
2707
- readonly: formUtils.isReadOnly("industryCodes"),
2708
- handleChangeFor,
2709
- businessLineTypes,
2710
- single: true,
2711
- industryCodes: industryCodes ?? []
2712
- }
2713
- ) }),
2714
- showField(DATE_OF_INCORPORATION_FIELD) && /* @__PURE__ */ jsx("div", { className: "adyen-kyc-field-wrapper", children: /* @__PURE__ */ jsx(
2715
- DateOfIncorporationField,
2716
- {
2717
- data: formUtils.getFieldData(
2718
- form.data?.additionalInformation ?? {},
2719
- DATE_OF_INCORPORATION_FIELD
2720
- ),
2721
- valid: formUtils.getFieldValid(
2722
- form.valid?.additionalInformation ?? {},
2723
- DATE_OF_INCORPORATION_FIELD
2724
- ),
2725
- errors: formUtils.getFieldErrors(
2726
- form.errors?.additionalInformation ?? {},
2727
- validationErrors,
2728
- DATE_OF_INCORPORATION_FIELD
2729
- ),
2730
- labels: formUtils.getFieldLabels(DATE_OF_INCORPORATION_FIELD),
2731
- placeholders: formUtils.getFieldPlaceholders(DATE_OF_INCORPORATION_FIELD, {
2732
- dateOfIncorporation: "datePlaceholder"
2733
- }),
2734
- readonly: formUtils.isReadOnly("dateOfIncorporation"),
2735
- handleChangeFor
2736
- }
2737
- ) })
2738
- ] })
2739
- ] }),
2740
- showStockData && /* @__PURE__ */ jsxs("section", { children: [
2741
- /* @__PURE__ */ jsx("div", { className: "adyen-kyc-additional-information__section-heading", children: /* @__PURE__ */ jsx(Typography, { el: "h3", variant: "title", children: t(($) => $["stockExchangeInformation"], { ns: "business" }) }) }),
2742
- /* @__PURE__ */ jsxs("fieldset", { children: [
2743
- showField(STOCK_EXCHANGE_MIC_FIELD) && /* @__PURE__ */ jsx("div", { className: "adyen-kyc-field-wrapper", children: /* @__PURE__ */ jsx(
2744
- StockExchangeMICField,
2745
- {
2746
- data: formUtils.getFieldData(
2747
- form.data?.additionalInformation ?? {},
2748
- STOCK_EXCHANGE_MIC_FIELD
2749
- ),
2750
- valid: formUtils.getFieldValid(
2751
- form.valid?.additionalInformation ?? {},
2752
- STOCK_EXCHANGE_MIC_FIELD
2753
- ),
2754
- errors: formUtils.getFieldErrors(
2755
- form.errors?.additionalInformation ?? {},
2756
- validationErrors,
2757
- STOCK_EXCHANGE_MIC_FIELD
2758
- ),
2759
- labels: formUtils.getFieldLabels(STOCK_EXCHANGE_MIC_FIELD),
2760
- placeholders: formUtils.getFieldPlaceholders(STOCK_EXCHANGE_MIC_FIELD),
2761
- mask: formUtils.getMask("stockExchangeMIC"),
2762
- guidanceText: formUtils.getFieldGuidanceText(STOCK_EXCHANGE_MIC_FIELD),
2763
- readonly: formUtils.isReadOnly("stockExchangeMIC"),
2764
- shouldValidate,
2765
- handleChangeFor
2766
- }
2767
- ) }),
2768
- showField(STOCK_ISIN_FIELD) && /* @__PURE__ */ jsx("div", { className: "adyen-kyc-field-wrapper", children: /* @__PURE__ */ jsx(
2769
- StockISINField,
2770
- {
2771
- data: formUtils.getFieldData(
2772
- form.data?.additionalInformation ?? {},
2773
- STOCK_ISIN_FIELD
2774
- ),
2775
- valid: formUtils.getFieldValid(
2776
- form.valid?.additionalInformation ?? {},
2777
- STOCK_ISIN_FIELD
2778
- ),
2779
- errors: formUtils.getFieldErrors(
2780
- form.errors?.additionalInformation ?? {},
2781
- validationErrors,
2782
- STOCK_ISIN_FIELD
2783
- ),
2784
- labels: formUtils.getFieldLabels(STOCK_ISIN_FIELD),
2785
- placeholders: formUtils.getFieldPlaceholders(STOCK_ISIN_FIELD),
2786
- mask: formUtils.getMask("stockISIN"),
2787
- guidanceText: formUtils.getFieldGuidanceText(STOCK_ISIN_FIELD),
2788
- readonly: formUtils.isReadOnly("stockISIN"),
2789
- shouldValidate,
2790
- handleChangeFor
2791
- }
2792
- ) }),
2793
- showField(STOCK_TICKER_SYMBOL_FIELD) && /* @__PURE__ */ jsx("div", { className: "adyen-kyc-field-wrapper", children: /* @__PURE__ */ jsx(
2794
- StockTickerSymbolField,
2795
- {
2796
- data: formUtils.getFieldData(
2797
- form.data?.additionalInformation ?? {},
2798
- STOCK_TICKER_SYMBOL_FIELD
2799
- ),
2800
- valid: formUtils.getFieldValid(
2801
- form.valid?.additionalInformation ?? {},
2802
- STOCK_TICKER_SYMBOL_FIELD
2803
- ),
2804
- errors: formUtils.getFieldErrors(
2805
- form.errors?.additionalInformation ?? {},
2806
- validationErrors,
2807
- STOCK_TICKER_SYMBOL_FIELD
2808
- ),
2809
- labels: formUtils.getFieldLabels(STOCK_TICKER_SYMBOL_FIELD),
2810
- placeholders: formUtils.getFieldPlaceholders(STOCK_TICKER_SYMBOL_FIELD),
2811
- mask: formUtils.getMask("stockTickerSymbol"),
2812
- guidanceText: formUtils.getFieldGuidanceText(STOCK_TICKER_SYMBOL_FIELD),
2813
- readonly: formUtils.isReadOnly("stockTickerSymbol"),
2814
- shouldValidate,
2815
- handleChangeFor
2816
- }
2817
- ) })
2818
- ] })
2819
- ] }),
2820
- /* @__PURE__ */ jsxs("section", { "data-testid": "registeredBusinessAddress", children: [
2821
- /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-additional-information__section-heading", children: [
2822
- /* @__PURE__ */ jsx(Typography, { el: "h3", variant: "title", children: t(($) => $["registeredBusinessAddress"], { ns: "business" }) }),
2823
- /* @__PURE__ */ jsx(Typography, { el: "p", variant: "body", children: registrationAddressDescription })
2824
- ] }),
2825
- country === CountryCodes.Japan ? /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(Loader, {}), children: /* @__PURE__ */ jsx(
2826
- LazyJpAddress,
2827
- {
2828
- id: ADDITIONAL_INFORMATION_FORM_ID,
2829
- addressType: "registrationAddress",
2830
- data: { ...form.data.additionalInformation?.registrationAddress, country },
2831
- shouldValidate,
2832
- onChange: handleRegistrationAddressChange
2833
- }
2834
- ) }) : /* @__PURE__ */ jsx(
2835
- Address,
2836
- {
2837
- id: ADDITIONAL_INFORMATION_FORM_ID,
2838
- addressType: "registrationAddress",
2839
- data: {
2840
- ...form.data.additionalInformation?.registrationAddress,
2841
- country
2842
- },
2843
- labels: getAddressSchemaLabelsByCountry(country),
2844
- requiredFields: addressSchema,
2845
- shouldValidate,
2846
- hideCountry: true,
2847
- optionalFields: ["otherAddressInformation"],
2848
- readOnlyFields: verifiedBusiness$1?.state && verifiedBusiness$1?.state === form.data.basicInformation?.stateOrProvince ? ["stateOrProvince"] : [],
2849
- trustedFields: getNestedTrustedFields(
2850
- "registrationAddress",
2851
- form.data.additionalInformation,
2852
- form.trustedFields?.additionalInformation
2853
- ),
2854
- onChange: handleRegistrationAddressChange,
2855
- verifiedBusiness: verifiedBusiness$1,
2856
- verifiedAddress: verifiedAddress?.registrationAddress,
2857
- condensed: true
2858
- }
2859
- )
2860
- ] }),
2861
- /* @__PURE__ */ jsxs("section", { "data-testid": "principalPlaceOfBusiness", children: [
2862
- /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-additional-information__section-heading", children: [
2863
- /* @__PURE__ */ jsx(Typography, { el: "h3", variant: "title", children: t(($) => $["principalPlaceOfBusiness"], { ns: "business" }) }),
2864
- /* @__PURE__ */ jsx(Typography, { el: "p", variant: "body", children: t(($) => $["thePhysicalLocationWhereABusiness"], { ns: "business" }) })
2865
- ] }),
2866
- !mustProvideOperationalAddress && /* @__PURE__ */ jsx(
2867
- Field,
2868
- {
2869
- el: "fieldset",
2870
- name: "operationalAddressIsSame",
2871
- errorMessage: form.errors?.additionalInformation?.operationalAddressIsSame?.errorMessage,
2872
- isValid: form.valid?.additionalInformation?.operationalAddressIsSame,
2873
- children: (childProps) => /* @__PURE__ */ jsx(
2874
- Checkbox,
2875
- {
2876
- ...childProps,
2877
- "aria-required": formUtils.isRequiredField("operationalAddressIsSame"),
2878
- "aria-invalid": !form.valid?.additionalInformation?.operationalAddressIsSame,
2879
- name: "operationalAddressIsSame",
2880
- label: formUtils.getLabel("sameAsRegisteredAddress"),
2881
- checked: form.data?.additionalInformation?.operationalAddressIsSame ? form.data?.additionalInformation?.operationalAddressIsSame === operationalAddressIsSameIds.OPERATIONAL_ADDRESS_IS_SAME : true,
2882
- onChange: handleOperationalAddressIsSameChange
2883
- }
2884
- )
2885
- }
2886
- ),
2887
- form.data?.additionalInformation?.operationalAddressIsSame === operationalAddressIsSameIds.OPERATIONAL_ADDRESS_IS_NOT_SAME && (country === CountryCodes.Japan ? /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(Loader, {}), children: /* @__PURE__ */ jsx(
2888
- LazyJpAddress,
2889
- {
2890
- id: ADDITIONAL_INFORMATION_FORM_ID,
2891
- addressType: "operationalAddress",
2892
- data: { ...form.data.additionalInformation.operationalAddress, country },
2893
- shouldValidate,
2894
- onChange: handleOperationalAddressChange
2895
- }
2896
- ) }) : /* @__PURE__ */ jsx(
2897
- Address,
2898
- {
2899
- id: ADDITIONAL_INFORMATION_FORM_ID,
2900
- addressType: "operationalAddress",
2901
- data: {
2902
- ...form.defaultData?.additionalInformation?.operationalAddress,
2903
- country
2904
- },
2905
- labels: getAddressSchemaLabelsByCountry(country),
2906
- requiredFields: addressSchema,
2907
- shouldValidate,
2908
- hideCountry: true,
2909
- optionalFields: ["otherAddressInformation"],
2910
- trustedFields: getNestedTrustedFields(
2911
- "operationalAddress",
2912
- form.data?.additionalInformation,
2913
- form.trustedFields?.additionalInformation
2914
- ),
2915
- onChange: handleOperationalAddressChange,
2916
- verifiedBusiness: verifiedBusiness$1,
2917
- verifiedAddress: verifiedAddress?.operationalAddress,
2918
- condensed: true
2919
- }
2920
- ))
2921
- ] })
2922
- ] })
2923
- ] });
2924
- }
2925
- [
2926
- ...COUNTRY_FIELD,
2927
- ...LEGAL_COMPANY_NAME_FIELD,
2928
- "jaHaniLegalCompanyName",
2929
- "jaKanaLegalCompanyName",
2930
- ...TAX_INFORMATION_FIELD,
2931
- ...STATE_FIELD,
2932
- ...BUSINESS_REGISTRATION_NUMBER_FIELD,
2933
- ...COUNTRY_OF_GOVERNING_LAW_FIELD
2934
- ];
2935
- const FormDescription = ({ description }) => {
2936
- const { t } = useTranslation("common");
2937
- return /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-form-header__description", children: [
2938
- t(($) => $[description]),
2939
- " ",
2940
- /* @__PURE__ */ jsx(Link, { href: "https://www.adyen.com/privacy-policy", external: true, children: t(($) => $["privacyStatement"]) })
2941
- ] });
2942
- };
2943
- function BasicInformationMultiform({
2944
- id,
2945
- country,
2946
- shouldValidate,
2947
- heading = "basicInformationFormHeading",
2948
- description = "basicInformationFormDescription",
2949
- validationErrors = {},
2950
- verificationErrors = {},
2951
- isTopLevelEntity,
2952
- disableCountry,
2953
- companyType
2954
- }) {
2955
- const { t } = useTranslation("common");
2956
- const { isSettingEnabled } = useSettingsContext();
2957
- const { isExperimentEnabled } = useExperimentsContext();
2958
- const { form } = useFormContext();
2959
- const allowedCountries = useAllowedCountries();
2960
- const isAllowedEditPrefilledCountry = isSettingEnabled(SettingNames.AllowPrefilledCountryEdit);
2961
- const state = form.data?.basicInformation?.stateOrProvince;
2962
- const currentCountryTaxInformation = form.data?.basicInformation?.taxInformation?.find(
2963
- (tax) => tax.country === country
2964
- );
2965
- const handleChangeFor = useCallback(
2966
- (fieldName, mode) => form.handleChangeFor(fieldName, "basicInformation", mode),
2967
- [form]
2968
- );
2969
- const formUtils = useMemo(() => {
2970
- const initialProps = {
2971
- data: form.data?.basicInformation ?? {},
2972
- fieldValidationErrors: validationErrors,
2973
- formVerificationErrors: verificationErrors,
2974
- allFields: form.allFields?.basicInformation ?? [],
2975
- requiredFields: form.requiredFields?.basicInformation ?? [],
2976
- optionalFields: form.optionalFields?.basicInformation ?? [],
2977
- trustedFields: form.trustedFields?.basicInformation ?? [],
2978
- obscuredFields: form.obscuredFields?.basicInformation ?? [],
2979
- errors: form.errors?.basicInformation ?? {},
2980
- valid: form.valid?.basicInformation ?? {},
2981
- handleFieldChange: handleChangeFor
2982
- };
2983
- const formUtilProps = initialProps.allFields?.reduce((acc, field) => {
2984
- switch (field) {
2985
- case "country":
2986
- return acc;
2987
- case "legalCompanyName":
2988
- return mergeFieldMetadataIntoProps(
2989
- field,
2990
- resolveFieldMetadata(
2991
- isExperimentEnabled("StrictNameAndAddressValidationV4") ? defaultFieldConfigV4[country] : defaultFieldConfig$2[country],
2992
- { isBusiness: true },
2993
- isExperimentEnabled("StrictNameAndAddressValidationV4") ? defaultFieldMetadataV4 : defaultFieldMetadata$2
2994
- ),
2995
- acc
2996
- );
2997
- case "countryOfGoverningLaw":
2998
- return acc;
2999
- case "stateOrProvince":
3000
- return mergeFieldMetadataIntoProps(
3001
- field,
3002
- resolveFieldMetadata(
3003
- defaultFieldConfig$1[country],
3004
- { isBusiness: true },
3005
- defaultFieldMetadata$1
3006
- ),
3007
- acc
3008
- );
3009
- case "taxInformation":
3010
- return mergeFieldMetadataIntoProps(
3011
- field,
3012
- resolveFieldMetadata(
3013
- taxInformationDefaultFieldConfig[country],
3014
- {
3015
- taxIdNumberType: currentCountryTaxInformation?.type,
3016
- companyType
3017
- },
3018
- taxInformationDefaultFieldMetadata
3019
- ),
3020
- acc
3021
- );
3022
- case "registrationNumber":
3023
- return mergeFieldMetadataIntoProps(
3024
- field,
3025
- resolveFieldMetadata(
3026
- registrationNumberDefaultFieldConfig[country],
3027
- {
3028
- companyType,
3029
- registrationNumberType: form.data?.additionalInformation?.registrationNumberType,
3030
- state,
3031
- isExperimentEnabled
3032
- },
3033
- registrationNumberDefaultFieldMetadata
3034
- ),
3035
- acc
3036
- );
3037
- case "jaHaniLegalCompanyName":
3038
- return mergeFieldMetadataIntoProps(
3039
- field,
3040
- resolveFieldMetadata(
3041
- localizedLegalCompanyNameFieldConfig.jaHaniLegalCompanyName.config,
3042
- {},
3043
- localizedLegalCompanyNameFieldConfig.jaHaniLegalCompanyName.metadata
3044
- ),
3045
- acc
3046
- );
3047
- case "jaKanaLegalCompanyName":
3048
- return mergeFieldMetadataIntoProps(
3049
- field,
3050
- resolveFieldMetadata(
3051
- localizedLegalCompanyNameFieldConfig.jaKanaLegalCompanyName.config,
3052
- {},
3053
- localizedLegalCompanyNameFieldConfig.jaKanaLegalCompanyName.metadata
3054
- ),
3055
- acc
3056
- );
3057
- default:
3058
- return acc;
3059
- }
3060
- }, initialProps);
3061
- return createFormUtils(formUtilProps ?? initialProps, t);
3062
- }, [
3063
- companyType,
3064
- country,
3065
- currentCountryTaxInformation?.type,
3066
- form.allFields?.basicInformation,
3067
- form.data?.additionalInformation?.registrationNumberType,
3068
- form.data?.basicInformation,
3069
- form.errors?.basicInformation,
3070
- form.obscuredFields?.basicInformation,
3071
- form.optionalFields?.basicInformation,
3072
- form.requiredFields?.basicInformation,
3073
- form.trustedFields?.basicInformation,
3074
- form.valid?.basicInformation,
3075
- handleChangeFor,
3076
- isExperimentEnabled,
3077
- state,
3078
- t,
3079
- validationErrors,
3080
- verificationErrors
3081
- ]);
3082
- const showField = (fieldKeys) => fieldKeys.some((field) => {
3083
- switch (field) {
3084
- case "registrationNumberType":
3085
- case "registrationNumber": {
3086
- return (formUtils.isRequiredField(field) || formUtils.isOptionalField(field)) && form.data.basicInformation?.stateOrProvince;
3087
- }
3088
- default:
3089
- return formUtils.isRequiredField(field) || formUtils.isOptionalField(field);
3090
- }
3091
- });
3092
- const legalCompanyNameFields = useLegalCompanyNameField({
3093
- data: form.data.basicInformation ?? {},
3094
- valid: form.valid.basicInformation ?? {},
3095
- errors: form.errors.basicInformation ?? {},
3096
- fieldProblems: form.fieldProblems.basicInformation ?? {},
3097
- country,
3098
- formUtils,
3099
- handleChange: handleChangeFor
3100
- });
3101
- return /* @__PURE__ */ jsxs("form", { id, className: "adyen-kyc-basic-information", children: [
3102
- /* @__PURE__ */ jsx(Header, { title: t(($) => $[heading]), children: /* @__PURE__ */ jsx(FormDescription, { slot: "description", description }) }),
3103
- /* @__PURE__ */ jsx(
3104
- ErrorPanel,
3105
- {
3106
- id: "ariaErrorField",
3107
- verificationErrors,
3108
- validationErrors,
3109
- formUtils
3110
- }
3111
- ),
3112
- /* @__PURE__ */ jsx("fieldset", { children: /* @__PURE__ */ jsx("div", { className: "adyen-kyc-field-wrapper", children: /* @__PURE__ */ jsx(
3113
- CountryField,
3114
- {
3115
- data: formUtils.getFieldData(form.data?.basicInformation ?? {}, COUNTRY_FIELD),
3116
- valid: formUtils.getFieldValid(form.valid?.basicInformation ?? {}, COUNTRY_FIELD),
3117
- errors: formUtils.getFieldErrors(
3118
- form.errors?.basicInformation ?? {},
3119
- validationErrors,
3120
- COUNTRY_FIELD
3121
- ),
3122
- labels: formUtils.getFieldLabels(COUNTRY_FIELD, {
3123
- country: "countryRegionOfEstablishment"
3124
- }),
3125
- readonly: formUtils.isReadOnly("country") || !isAllowedEditPrefilledCountry || Boolean(disableCountry),
3126
- handleChangeFor,
3127
- allowedCountries: isTopLevelEntity ? allowedCountries : void 0
3128
- }
3129
- ) }) }),
3130
- /* @__PURE__ */ jsxs("fieldset", { children: [
3131
- COUNTRY_OF_GOVERNING_LAW_POSSIBLE.includes(country) && showField(COUNTRY_OF_GOVERNING_LAW_FIELD) && /* @__PURE__ */ jsx("div", { className: "adyen-kyc-field-wrapper", children: /* @__PURE__ */ jsx(
3132
- CountryOfGoverningLawField,
3133
- {
3134
- data: formUtils.getFieldData(
3135
- form.data?.basicInformation ?? {},
3136
- COUNTRY_OF_GOVERNING_LAW_FIELD
3137
- ),
3138
- country,
3139
- valid: formUtils.getFieldValid(
3140
- form.valid?.basicInformation ?? {},
3141
- COUNTRY_OF_GOVERNING_LAW_FIELD
3142
- ),
3143
- errors: formUtils.getFieldErrors(
3144
- form.errors?.basicInformation ?? {},
3145
- validationErrors,
3146
- COUNTRY_OF_GOVERNING_LAW_FIELD
3147
- ),
3148
- labels: formUtils.getFieldLabels(COUNTRY_OF_GOVERNING_LAW_FIELD),
3149
- readonly: false,
3150
- allowedCountries: isTopLevelEntity ? allowedCountries : void 0,
3151
- handleChangeFor
3152
- }
3153
- ) }),
3154
- // fields shown here are abstracted by useLegalCompanyNameField
3155
- legalCompanyNameFields.map((field) => /* @__PURE__ */ jsx("div", { className: "adyen-kyc-field-wrapper", children: /* @__PURE__ */ jsx(
3156
- Field,
3157
- {
3158
- name: field?.name ?? "",
3159
- label: field?.label,
3160
- helper: field?.helper,
3161
- errorMessage: field?.errorMessage,
3162
- isValid: Boolean(field?.isValid),
3163
- children: (childProps) => /* @__PURE__ */ jsx(
3164
- InputText,
3165
- {
3166
- ...childProps,
3167
- "aria-required": true,
3168
- "aria-invalid": !field?.isValid,
3169
- name: field?.name,
3170
- value: field?.value,
3171
- readonly: field?.readonly,
3172
- onInput: field ? field.onInput : () => {
3173
- },
3174
- transformInput: field?.transformInput,
3175
- transformMode: field?.transformMode,
3176
- onBlur: field?.onBlur,
3177
- onKeyDown: field?.onKeyDown
3178
- }
3179
- )
3180
- },
3181
- field?.name
3182
- ) }, field?.name)),
3183
- showField(TAX_INFORMATION_FIELD) && /* @__PURE__ */ jsx("div", { className: "adyen-kyc-field-wrapper", children: /* @__PURE__ */ jsx(
3184
- TaxInformationField,
3185
- {
3186
- data: formUtils.getFieldData(
3187
- form.data?.basicInformation ?? {},
3188
- TAX_INFORMATION_FIELD
3189
- ),
3190
- valid: formUtils.getFieldValid(
3191
- form.valid?.basicInformation ?? {},
3192
- TAX_INFORMATION_FIELD
3193
- ),
3194
- errors: formUtils.getFieldErrors(
3195
- form.errors?.basicInformation ?? {},
3196
- validationErrors,
3197
- TAX_INFORMATION_FIELD
3198
- ),
3199
- labels: formUtils.getFieldLabels(TAX_INFORMATION_FIELD, {
3200
- exemptedFromTax: "iDontHaveATaxId"
3201
- }),
3202
- mask: formUtils.getMask("taxInformation"),
3203
- placeholders: formUtils.getFieldPlaceholders(TAX_INFORMATION_FIELD),
3204
- guidanceText: formUtils.getFieldGuidanceText(TAX_INFORMATION_FIELD),
3205
- readonly: formUtils.isReadOnly("taxInformation"),
3206
- shouldValidate,
3207
- handleChangeFor,
3208
- canExempt: showField(["exemptedFromTax"]),
3209
- registrationNumber: form.data.additionalInformation?.registrationNumber,
3210
- country,
3211
- entityType: companyType,
3212
- defaultData: form.defaultData?.basicInformation?.taxInformation
3213
- }
3214
- ) }),
3215
- showField(STATE_FIELD) && /* @__PURE__ */ jsx("div", { className: "adyen-kyc-field-wrapper", children: /* @__PURE__ */ jsx(
3216
- StateField,
3217
- {
3218
- data: formUtils.getFieldData(form.data?.basicInformation ?? {}, STATE_FIELD),
3219
- valid: formUtils.getFieldValid(form.valid?.basicInformation ?? {}, STATE_FIELD),
3220
- errors: formUtils.getFieldErrors(
3221
- form.errors?.basicInformation ?? {},
3222
- validationErrors,
3223
- STATE_FIELD
3224
- ),
3225
- labels: formUtils.getFieldLabels(STATE_FIELD),
3226
- placeholders: formUtils.getFieldPlaceholders(STATE_FIELD),
3227
- readonly: formUtils.isReadOnly("stateOrProvince"),
3228
- handleChangeFor,
3229
- selectedCountry: country
3230
- }
3231
- ) }),
3232
- showField(BUSINESS_REGISTRATION_NUMBER_FIELD) && /* @__PURE__ */ jsx("div", { className: "adyen-kyc-field-wrapper", children: /* @__PURE__ */ jsx(
3233
- BusinessRegistrationNumberField,
3234
- {
3235
- data: formUtils.getFieldData(
3236
- form.data?.basicInformation ?? {},
3237
- BUSINESS_REGISTRATION_NUMBER_FIELD
3238
- ),
3239
- valid: formUtils.getFieldValid(
3240
- form.valid?.basicInformation ?? {},
3241
- BUSINESS_REGISTRATION_NUMBER_FIELD
3242
- ),
3243
- errors: formUtils.getFieldErrors(
3244
- form.errors?.basicInformation ?? {},
3245
- validationErrors,
3246
- BUSINESS_REGISTRATION_NUMBER_FIELD
3247
- ),
3248
- labels: formUtils.getFieldLabels(BUSINESS_REGISTRATION_NUMBER_FIELD, {
3249
- exemptedFromRegistrationNumber: "iDontHaveARegistrationNumber"
3250
- }),
3251
- mask: formUtils.getMask("registrationNumber"),
3252
- guidanceText: formUtils.getFieldGuidanceText(BUSINESS_REGISTRATION_NUMBER_FIELD),
3253
- placeholders: formUtils.getFieldPlaceholders(BUSINESS_REGISTRATION_NUMBER_FIELD),
3254
- helperText: formUtils.getFieldHelperText(BUSINESS_REGISTRATION_NUMBER_FIELD),
3255
- readonly: formUtils.isReadOnly("registrationNumber"),
3256
- optional: formUtils.isOptionalField("registrationNumber"),
3257
- shouldValidate,
3258
- handleChangeFor,
3259
- country,
3260
- canExempt: showField(["exemptedFromRegistrationNumber"]),
3261
- companyType
3262
- }
3263
- ) })
3264
- ] })
3265
- ] });
3266
- }
3267
- function CompanyStructureMultiform({
3268
- id,
3269
- country,
3270
- heading = "companyStructureFormName",
3271
- description = "companyStructureFormDescription",
3272
- validationErrors = {},
3273
- verificationErrors = {}
3274
- }) {
3275
- const { t } = useTranslation(["common", "business"]);
3276
- const { form } = useFormContext();
3277
- const { accountHolder } = useAccountHolder();
3278
- const { isSettingEnabled } = useSettingsContext();
3279
- const canChangeEntityType = isSettingEnabled(SettingNames.AllowLegalEntityTypeChange);
3280
- const formUtils = createFormUtils(
3281
- { requiredFields: form.requiredFields?.companyStructure ?? [] },
3282
- t
3283
- );
3284
- const excludedTypes = [
3285
- CompanyTypesValues.INCORPORATED_PARTNERSHIP,
3286
- CompanyTypesValues.INCORPORATED_ASSOCIATION
3287
- ];
3288
- if (isBankAccountRequestedForOrganization.value) {
3289
- excludedTypes.push(CompanyTypesValues.GOVERNMENTAL_ORGANIZATION);
3290
- }
3291
- const companyTypeRadioOptions = canChangeEntityType && accountHolder !== "aTrust" && accountHolder !== "anUnincorporatedPartnership" ? companyTypeOptions.filter((companyType) => !excludedTypes.includes(companyType)) : companyTypeOptions;
3292
- const companyTypeExamples = useCompanyTypeExamples(country);
3293
- return /* @__PURE__ */ jsxs("form", { id, className: "adyen-kyc-company-structure", children: [
3294
- /* @__PURE__ */ jsx(Header, { title: t(($) => $[heading]), description: t(($) => $[description]) }),
3295
- /* @__PURE__ */ jsx(
3296
- ErrorPanel,
3297
- {
3298
- id: "ariaErrorField",
3299
- verificationErrors,
3300
- validationErrors,
3301
- formUtils
3302
- }
3303
- ),
3304
- /* @__PURE__ */ jsx(
3305
- Field,
3306
- {
3307
- el: "fieldset",
3308
- name: "entityType",
3309
- errorMessage: formUtils.getErrorMessage(
3310
- "entityType",
3311
- form.errors?.companyStructure,
3312
- validationErrors
3313
- ),
3314
- isValid: form.valid?.companyStructure?.entityType,
3315
- children: (childProps) => /* @__PURE__ */ jsx(
3316
- EntityTypeRadioGroupCard,
3317
- {
3318
- ...childProps,
3319
- name: "entityType",
3320
- options: companyTypeRadioOptions,
3321
- optionId: (option) => companyTypeMetadata[option].id,
3322
- optionName: (option) => t(($) => $[companyTypeMetadata[option].name], { ns: "business" }),
3323
- optionDescription: (option) => t(($) => $[companyTypeMetadata[option].description], { ns: "business" }),
3324
- selected: form.data?.companyStructure?.entityType,
3325
- onSelect: form.handleChangeFor("entityType", "companyStructure"),
3326
- examples: companyTypeExamples,
3327
- "aria-required": true,
3328
- "aria-invalid": !form.valid?.companyStructure?.entityType
3329
- }
3330
- )
3331
- }
3332
- )
3333
- ] });
3334
- }
3335
- function BusinessDetailsMultiform({
3336
- taskType,
3337
- country,
3338
- activeForm,
3339
- shouldValidate,
3340
- problems = {},
3341
- handleNextClick,
3342
- handleBackClick,
3343
- setLoadingStatus,
3344
- isTopLevelEntity
3345
- }) {
3346
- const { t } = useTranslation(["common", "business"]);
3347
- const { form } = useFormContext();
3348
- const companyType = taskType === TaskTypes.SOLE_PROPRIETOR_COMPANY ? CompanyTypesValues.SOLE_PROPRIETORSHIP : form.data.companyStructure?.entityType;
3349
- function handleChange(formName, fieldName, mode) {
3350
- return form.handleChangeFor(fieldName, formName, mode);
3351
- }
3352
- const renderActiveForm = (activeForm2) => {
3353
- switch (activeForm2.formId) {
3354
- case "basicInformation":
3355
- return /* @__PURE__ */ jsx(
3356
- BasicInformationMultiform,
3357
- {
3358
- id: activeForm2.formId,
3359
- country,
3360
- shouldValidate,
3361
- heading: activeForm2.formHeading,
3362
- description: activeForm2.formDescription,
3363
- validationErrors: problems.validationErrors?.[activeForm2.formId],
3364
- verificationErrors: problems.verificationErrors?.[activeForm2.formId],
3365
- companyType,
3366
- isTopLevelEntity,
3367
- disableCountry: taskType === TaskTypes.SOLE_PROPRIETOR_COMPANY
3368
- }
3369
- );
3370
- case "businessSelection":
3371
- return /* @__PURE__ */ jsx(
3372
- BusinessSelectionMultiform,
3373
- {
3374
- id: activeForm2.formId,
3375
- country,
3376
- shouldValidate,
3377
- heading: activeForm2.formHeading,
3378
- description: activeForm2.formDescription,
3379
- validationErrors: problems.validationErrors?.[activeForm2.formId],
3380
- verificationErrors: problems.verificationErrors?.[activeForm2.formId],
3381
- handleNextClick,
3382
- handleBackClick,
3383
- setLoadingStatus
3384
- }
3385
- );
3386
- case "companyStructure":
3387
- return /* @__PURE__ */ jsx(
3388
- CompanyStructureMultiform,
3389
- {
3390
- id: activeForm2.formId,
3391
- country,
3392
- shouldValidate,
3393
- heading: activeForm2.formHeading,
3394
- description: activeForm2.formDescription,
3395
- validationErrors: problems.validationErrors?.[activeForm2.formId],
3396
- verificationErrors: problems.verificationErrors?.[activeForm2.formId]
3397
- }
3398
- );
3399
- case "additionalInformation":
3400
- return /* @__PURE__ */ jsx(
3401
- AdditionalInformationMultiform,
3402
- {
3403
- id: activeForm2.formId,
3404
- country,
3405
- companyType,
3406
- shouldValidate,
3407
- heading: activeForm2.formHeading,
3408
- description: activeForm2.formDescription,
3409
- validationErrors: problems.validationErrors?.[activeForm2.formId],
3410
- verificationErrors: problems.verificationErrors?.[activeForm2.formId]
3411
- }
3412
- );
3413
- case "companyTaxDocument":
3414
- return country === "US" ? /* @__PURE__ */ jsx(
3415
- TaxDocument,
3416
- {
3417
- id: activeForm2.formId,
3418
- country,
3419
- companyType,
3420
- shouldValidate,
3421
- heading: activeForm2.formHeading,
3422
- description: activeForm2.formDescription,
3423
- fieldValidationErrors: problems.validationErrors?.[activeForm2.formId] ?? {},
3424
- formVerificationErrors: problems.verificationErrors?.[activeForm2.formId] ?? {},
3425
- data: form.data.companyTaxDocument,
3426
- errors: form.errors.companyTaxDocument,
3427
- valid: form.valid.companyTaxDocument,
3428
- allFields: form.allFields?.companyTaxDocument,
3429
- requiredFields: form.requiredFields?.companyTaxDocument,
3430
- optionalFields: form.optionalFields?.companyTaxDocument,
3431
- trustedFields: form.trustedFields?.companyTaxDocument,
3432
- handleFieldChange: () => handleChange("companyTaxDocument", "taxDocument")
3433
- }
3434
- ) : /* @__PURE__ */ jsx(
3435
- MemoizedDocumentUpload,
3436
- {
3437
- id: activeForm2.formId,
3438
- country,
3439
- companyType,
3440
- shouldValidate,
3441
- heading: activeForm2.formHeading,
3442
- description: activeForm2.formDescription,
3443
- fieldValidationErrors: problems.validationErrors?.[activeForm2.formId] ?? {},
3444
- formVerificationErrors: problems.verificationErrors?.[activeForm2.formId] ?? {},
3445
- data: form.data.companyTaxDocument,
3446
- errors: form.errors.companyTaxDocument,
3447
- valid: form.valid.companyTaxDocument,
3448
- allFields: form.allFields?.companyTaxDocument,
3449
- requiredFields: form.requiredFields?.companyTaxDocument,
3450
- optionalFields: form.optionalFields?.companyTaxDocument,
3451
- trustedFields: form.trustedFields?.companyTaxDocument,
3452
- handleFieldChange: () => handleChange("companyTaxDocument", "taxDocument"),
3453
- documentField: "taxDocument",
3454
- documentType: "vatDocument",
3455
- hidePageCount: true,
3456
- guidanceContent: /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-u-margin-bottom-24", children: [
3457
- /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-upload-field__subtitle", children: [
3458
- " ",
3459
- t(($) => $["requirements"], { ns: "common" })
3460
- ] }),
3461
- /* @__PURE__ */ jsxs("ul", { children: [
3462
- /* @__PURE__ */ jsx("li", { children: t(($) => $["containsNameOfCompany"], { ns: "business" }) }),
3463
- /* @__PURE__ */ jsx("li", { children: t(($) => $["documentShowsTaxIdOfCompany"], { ns: "business" }) }),
3464
- /* @__PURE__ */ jsx("li", { children: t(($) => $["issuedByTheTaxAuthority"], { ns: "business" }) })
3465
- ] })
3466
- ] })
3467
- }
3468
- );
3469
- case "companyRegistrationDocument":
3470
- return /* @__PURE__ */ jsx(
3471
- RegistrationDocument,
3472
- {
3473
- id: activeForm2.formId,
3474
- heading: activeForm2.formHeading,
3475
- description: activeForm2.formDescription,
3476
- country,
3477
- companyType,
3478
- data: form.data.companyRegistrationDocument,
3479
- errors: form.errors.companyRegistrationDocument,
3480
- valid: form.valid.companyRegistrationDocument,
3481
- allFields: form.allFields?.companyRegistrationDocument,
3482
- requiredFields: form.requiredFields?.companyRegistrationDocument,
3483
- optionalFields: form.optionalFields?.companyRegistrationDocument,
3484
- trustedFields: form.trustedFields?.companyRegistrationDocument,
3485
- handleFieldChange: () => handleChange("companyRegistrationDocument", "registrationDocument"),
3486
- shouldValidate,
3487
- fieldValidationErrors: problems.validationErrors?.[activeForm2.formId] ?? {},
3488
- formVerificationErrors: problems.verificationErrors?.[activeForm2.formId] ?? {}
3489
- }
3490
- );
3491
- case "companyProofOfDirectorDocument":
3492
- return /* @__PURE__ */ jsx(
3493
- ProofOfDirectorDocument,
3494
- {
3495
- id: activeForm2.formId,
3496
- heading: activeForm2.formHeading,
3497
- description: activeForm2.formDescription,
3498
- country,
3499
- data: form.data?.companyProofOfDirectorDocument,
3500
- errors: form.errors.companyProofOfDirectorDocument,
3501
- valid: form.valid.companyProofOfDirectorDocument,
3502
- allFields: form.allFields?.companyProofOfDirectorDocument,
3503
- requiredFields: form.requiredFields?.companyProofOfDirectorDocument,
3504
- optionalFields: form.optionalFields?.companyProofOfDirectorDocument,
3505
- trustedFields: form.trustedFields?.companyProofOfDirectorDocument,
3506
- handleFieldChange: () => handleChange("companyProofOfDirectorDocument", "proofOfDirector"),
3507
- shouldValidate,
3508
- fieldValidationErrors: problems.validationErrors?.[activeForm2.formId] ?? {},
3509
- formVerificationErrors: problems.verificationErrors?.[activeForm2.formId] ?? {}
3510
- }
3511
- );
3512
- case "companyProofOfSignatoryDocument":
3513
- return /* @__PURE__ */ jsx(
3514
- ProofOfSignatoryDocument,
3515
- {
3516
- id: activeForm2.formId,
3517
- heading: activeForm2.formHeading,
3518
- description: activeForm2.formDescription,
3519
- country,
3520
- data: form.data?.companyProofOfSignatoryDocument,
3521
- errors: form.errors.companyProofOfSignatoryDocument,
3522
- valid: form.valid.companyProofOfSignatoryDocument,
3523
- allFields: form.allFields?.companyProofOfSignatoryDocument,
3524
- requiredFields: form.requiredFields?.companyProofOfSignatoryDocument,
3525
- optionalFields: form.optionalFields?.companyProofOfSignatoryDocument,
3526
- trustedFields: form.trustedFields?.companyProofOfSignatoryDocument,
3527
- handleFieldChange: () => handleChange("companyProofOfSignatoryDocument", "proofOfSignatory"),
3528
- shouldValidate,
3529
- fieldValidationErrors: problems.validationErrors?.[activeForm2.formId] ?? {},
3530
- formVerificationErrors: problems.verificationErrors?.[activeForm2.formId] ?? {}
3531
- }
3532
- );
3533
- case "companyProofOfOwnershipDocument":
3534
- return /* @__PURE__ */ jsx(
3535
- ProofOfOwnershipDocument,
3536
- {
3537
- id: activeForm2.formId,
3538
- heading: activeForm2.formHeading,
3539
- description: activeForm2.formDescription,
3540
- country,
3541
- data: form.data?.companyProofOfOwnershipDocument,
3542
- errors: form.errors.companyProofOfOwnershipDocument,
3543
- valid: form.valid.companyProofOfOwnershipDocument,
3544
- allFields: form.allFields?.companyProofOfOwnershipDocument,
3545
- requiredFields: form.requiredFields?.companyProofOfOwnershipDocument,
3546
- optionalFields: form.optionalFields?.companyProofOfOwnershipDocument,
3547
- trustedFields: form.trustedFields?.companyProofOfOwnershipDocument,
3548
- handleFieldChange: () => handleChange("companyProofOfOwnershipDocument", "proofOfOwnership"),
3549
- shouldValidate,
3550
- fieldValidationErrors: problems.validationErrors?.[activeForm2.formId] ?? {},
3551
- formVerificationErrors: problems.verificationErrors?.[activeForm2.formId] ?? {}
3552
- }
3553
- );
3554
- case "companyConstitutionalDocument":
3555
- return /* @__PURE__ */ jsx(
3556
- MemoizedConstitutionalDocument,
3557
- {
3558
- id: activeForm2.formId,
3559
- legalEntityType: LegalEntityTypes.SOLE_PROPRIETORSHIP,
3560
- country,
3561
- data: form.data?.companyConstitutionalDocument,
3562
- errors: form.errors.companyConstitutionalDocument,
3563
- valid: form.valid.companyConstitutionalDocument,
3564
- allFields: form.allFields?.companyConstitutionalDocument,
3565
- requiredFields: form.requiredFields?.companyConstitutionalDocument,
3566
- optionalFields: form.optionalFields?.companyConstitutionalDocument,
3567
- trustedFields: form.trustedFields?.companyConstitutionalDocument,
3568
- handleFieldChange: () => handleChange("companyConstitutionalDocument", "constitutionalDocument"),
3569
- shouldValidate,
3570
- fieldValidationErrors: problems.validationErrors?.[activeForm2.formId] ?? {},
3571
- formVerificationErrors: problems.verificationErrors?.[activeForm2.formId] ?? {}
3572
- }
3573
- );
3574
- case "companyFinancialInformation":
3575
- return /* @__PURE__ */ jsx(
3576
- FinancialInformation,
3577
- {
3578
- multiForm: form,
3579
- id: activeForm2.formId,
3580
- country,
3581
- heading: t(($) => $[activeForm2.formHeading]),
3582
- description: activeForm2.formDescription,
3583
- data: form.data?.companyFinancialInformation,
3584
- allFields: form.allFields?.companyFinancialInformation,
3585
- requiredFields: form.requiredFields?.companyFinancialInformation,
3586
- optionalFields: form.optionalFields?.companyFinancialInformation,
3587
- trustedFields: form.trustedFields?.companyFinancialInformation,
3588
- shouldValidate
3589
- }
3590
- );
3591
- default:
3592
- return null;
3593
- }
3594
- };
3595
- return /* @__PURE__ */ jsx("div", { className: "adyen-kyc-business-details", children: /* @__PURE__ */ jsx("div", { className: "adyen-kyc-form-wrapper", children: renderActiveForm(activeForm) }) });
3596
- }
3597
- function buildRequiredForms({
3598
- config: { country, forms, requiredFields, optionalFields, isValid, problems },
3599
- options
3600
- }) {
3601
- const usesBusinessSelection = COUNTRIES_USING_COMPANY_SEARCH.includes(country);
3602
- const filteredForms = Object.values(forms).filter(({ formId }) => {
3603
- if (usesBusinessSelection) {
3604
- if (formId === "businessSelection" && (options?.hasNoSearchResults || isVerifiedSingleCompanySearchResult.value))
3605
- return false;
3606
- if (formId === "companyStructure" && verifiedBusiness.value?.legalForm) return false;
3607
- }
3608
- if (requiredFields || optionalFields) {
3609
- return Boolean(requiredFields?.[formId]) || Boolean(optionalFields?.[formId]);
3610
- }
3611
- return true;
3612
- });
3613
- const requiredForms = options?.skipSummary ? filteredForms : [...filteredForms, summaryStep];
3614
- return addValidityToForms(requiredForms, isValid, problems);
3615
- }
3616
- function basicInformationValidators({
3617
- country,
3618
- taxIdNumberType,
3619
- companyType,
3620
- registrationNumberType,
3621
- state,
3622
- isExperimentEnabled
3623
- }) {
3624
- return {
3625
- country: CountryFieldValidation().country,
3626
- countryOfGoverningLaw: CountryOfGoverningLawFieldValidation().countryOfGoverningLaw,
3627
- legalCompanyName: resolveFieldMetadata(
3628
- isExperimentEnabled("StrictNameAndAddressValidationV4") ? defaultFieldConfigV4[country] : defaultFieldConfig$2[country],
3629
- { isBusiness: true },
3630
- isExperimentEnabled("StrictNameAndAddressValidationV4") ? defaultFieldMetadataV4 : defaultFieldMetadata$2
3631
- )?.validators,
3632
- taxInformation: resolveFieldMetadata(
3633
- taxInformationDefaultFieldConfig[country],
3634
- {
3635
- taxIdNumberType,
3636
- companyType
3637
- },
3638
- taxInformationDefaultFieldMetadata
3639
- )?.validators,
3640
- stateOrProvince: resolveFieldMetadata(
3641
- defaultFieldConfig$1[country],
3642
- { isBusiness: true },
3643
- defaultFieldMetadata$1
3644
- )?.validators,
3645
- registrationNumber: resolveFieldMetadata(
3646
- registrationNumberDefaultFieldConfig[country],
3647
- {
3648
- companyType,
3649
- registrationNumberType,
3650
- state,
3651
- isExperimentEnabled
3652
- },
3653
- registrationNumberDefaultFieldMetadata
3654
- )?.validators
3655
- };
3656
- }
3657
- function businessSelectionValidators() {
3658
- return {
3659
- hasSelectedBusiness: {
3660
- modes: ["blur", "input"],
3661
- validate: (value) => typeof value === "boolean",
3662
- // indicates a selection was made
3663
- errorMessage: "fieldIsRequired"
3664
- }
3665
- };
3666
- }
3667
- function additionalInformationValidators({
3668
- country,
3669
- taxIdNumberType,
3670
- companyType,
3671
- registrationNumberType,
3672
- vatNumberType,
3673
- isExperimentEnabled
3674
- }) {
3675
- return {
3676
- hasDoingBusinessAs: doingBusinessAsAbsentFieldMetadata.validators,
3677
- doingBusinessAs: doingBusinessAsFieldMetadata.validators,
3678
- registrationNumber: resolveFieldMetadata(
3679
- registrationNumberDefaultFieldConfig[country],
3680
- {
3681
- companyType,
3682
- registrationNumberType,
3683
- isExperimentEnabled
3684
- },
3685
- registrationNumberDefaultFieldMetadata
3686
- )?.validators,
3687
- exemptedFromRegistrationNumber: exemptFromRegistrationNumberDefaultFieldMetadata.validators,
3688
- taxInformation: resolveFieldMetadata(
3689
- taxInformationDefaultFieldConfig[country],
3690
- {
3691
- taxIdNumberType,
3692
- companyType
3693
- },
3694
- taxInformationDefaultFieldMetadata
3695
- ).validators,
3696
- vatNumber: resolveFieldMetadata(
3697
- defaultFieldConfig[country],
3698
- { vatNumberType },
3699
- defaultFieldMetadata
3700
- ).validators,
3701
- vatAbsenceReason: vatAbsenceReasonMetadata.validators,
3702
- eInvoicingCode: eInvoicingCodeFieldMetadata.validators,
3703
- industryCodes: industryCodeFieldMetadata.validators,
3704
- dateOfIncorporation: dateOfIncorporationFieldMetadata.validators,
3705
- stockExchangeMIC: stockExchangeMICFieldMetadata.validators,
3706
- stockISIN: stockISINFieldMetadata.validators,
3707
- stockTickerSymbol: stockTickerSymbolFieldMetadata.validators
3708
- };
3709
- }
3710
- function BusinessDetailsMultiformDropin({
3711
- taskType = TaskTypes.BUSINESS_DETAILS,
3712
- country: propCountry,
3713
- problems: propProblems,
3714
- legalEntityResponse,
3715
- associatedLegalArrangement,
3716
- // initially undefined when creating entity
3717
- nestedLegalEntity,
3718
- // initially undefined when creating entity
3719
- nestedLegalEntityDetails,
3720
- // has entity roles for association logic
3721
- onSubmit: onExternalSubmit,
3722
- handleHomeClick,
3723
- asModal = false
3724
- }) {
3725
- const { t, i18n } = useTranslation(["common", "business"]);
3726
- const { baseUrl, rootLegalEntityId } = useApiContext();
3727
- const userEvents = useAnalyticsContext();
3728
- const { showToast } = useToastContext();
3729
- const queryClient = useQueryClient();
3730
- const { isExperimentEnabled } = useExperimentsContext();
3731
- const { isSettingEnabled } = useSettingsContext();
3732
- const { accountHolder, setAccountHolder } = useAccountHolder();
3733
- const { mutateAsync: createLegalEntity } = useCreateLegalEntity();
3734
- const { mutateAsync: updateLegalEntity } = useUpdateLegalEntity();
3735
- const isSoleProp = accountHolder === "mySoleProprietorName";
3736
- const isAssociationTaskType = !taskType ? accountHolder !== "theCompanyIWorkFor" : taskType !== TaskTypes.BUSINESS_DETAILS;
3737
- const legalEntityType = !isSoleProp ? LegalEntityTypes.ORGANIZATION : LegalEntityTypes.SOLE_PROPRIETORSHIP;
3738
- const subjectEntity = !isAssociationTaskType ? legalEntityResponse : isSoleProp ? associatedLegalArrangement : nestedLegalEntity;
3739
- const [country, setCountry] = useState(propCountry);
3740
- const [documents, setDocuments] = useState();
3741
- const [problems, setProblems] = useState(propProblems ?? {});
3742
- const [loadingStatus, setLoadingStatus] = useState("success");
3743
- const [derivedProps, setDerivedProps] = useState();
3744
- const [trustedFields, setTrustedFields] = useState(subjectEntity?.trustedFields ?? void 0);
3745
- const defaultForms = useMemo(() => getForms(country), [country]);
3746
- const documentUtils = documentApiUtils({
3747
- baseUrl: baseUrl.value,
3748
- rootLegalEntityId: rootLegalEntityId.value
3749
- });
3750
- useEffect(() => {
3751
- if (!subjectEntity?.documentDetails?.length) return;
3752
- documentUtils.fetchDocuments(subjectEntity.documentDetails, subjectEntity?.id).then(() => {
3753
- setDocuments(mapApiDocumentToBusinessDetailsDocuments(subjectEntity?.id));
3754
- }).catch(() => {
3755
- showToast({
3756
- label: t(($) => $["failedToFetchRelevantDocuments"], { ns: "common" }),
3757
- variant: "error"
3758
- });
3759
- });
3760
- }, [subjectEntity?.documentDetails, subjectEntity?.id]);
3761
- useEffect(() => {
3762
- userEvents.updateBaseTrackingPayload({ task: taskType });
3763
- userEvents.addTaskEvent("Landed on page", {
3764
- actionType: "start"
3765
- });
3766
- }, []);
3767
- const parseConfiguration = useCallback(
3768
- ({ scenarios }) => composePerScenarioFormConfigurations(scenarios, businessDetailsFieldsPerScenario),
3769
- []
3770
- );
3771
- const { fieldConfigurations } = useScenarioConfiguration({
3772
- legalEntityType,
3773
- parseConfiguration,
3774
- setLoadingStatus,
3775
- country
3776
- });
3777
- const { data: efpBusinessLines } = useBusinessLines(ALLOWED_SOF_SERVICES, {
3778
- enabled: isSettingEnabled("allowBusinessLines")
3779
- });
3780
- const defaultData = useMemo(() => {
3781
- const mapped = mapLegalEntityToBusinessDetailsSchema(
3782
- !isAssociationTaskType ? legalEntityResponse : isSoleProp ? associatedLegalArrangement ?? legalEntityResponse : nestedLegalEntity,
3783
- isSoleProp ? legalEntityResponse : void 0,
3784
- isExperimentEnabled
3785
- );
3786
- const initialEfpBusinessLineData = isSettingEnabled("allowBusinessLines") && efpBusinessLines && efpBusinessLines.length > 0 ? {
3787
- additionalInformation: {
3788
- ...mapped.additionalInformation,
3789
- industryCodes: [
3790
- {
3791
- id: efpBusinessLines[0].industryCode,
3792
- name: `${efpBusinessLines[0].industryCode} - ${efpBusinessLines[0].industryCodeDescription}`
3793
- }
3794
- ]
3795
- }
3796
- } : {};
3797
- return {
3798
- ...mapped,
3799
- ...documents,
3800
- ...initialEfpBusinessLineData
3801
- };
3802
- }, [
3803
- isAssociationTaskType,
3804
- legalEntityResponse,
3805
- isSoleProp,
3806
- associatedLegalArrangement,
3807
- nestedLegalEntity,
3808
- isExperimentEnabled,
3809
- documents,
3810
- efpBusinessLines,
3811
- isSettingEnabled
3812
- ]);
3813
- const buildFieldValidations = useCallback(
3814
- (data) => {
3815
- const taxInfo = data?.basicInformation?.taxInformation ?? data?.additionalInformation?.taxInformation;
3816
- const taxIdType = taxInfo?.length ? taxInfo.find((taxId) => taxId.country === country)?.type : void 0;
3817
- const regNumberType = data?.basicInformation?.registrationNumberType ?? data?.additionalInformation?.registrationNumberType;
3818
- return {
3819
- basicInformation: basicInformationValidators({
3820
- country,
3821
- state: data?.basicInformation?.stateOrProvince,
3822
- companyType: data?.companyStructure?.entityType,
3823
- taxIdNumberType: taxIdType,
3824
- registrationNumberType: regNumberType,
3825
- isExperimentEnabled
3826
- }),
3827
- businessSelection: businessSelectionValidators(),
3828
- companyStructure: CompanyStructureValidation,
3829
- additionalInformation: additionalInformationValidators({
3830
- country,
3831
- taxIdNumberType: taxIdType,
3832
- companyType: data?.companyStructure?.entityType,
3833
- registrationNumberType: regNumberType,
3834
- vatNumberType: data?.additionalInformation?.vatNumberType,
3835
- isExperimentEnabled
3836
- }),
3837
- financialInformation: financialInfoValidationWithEmployeesRules
3838
- };
3839
- },
3840
- [country, isExperimentEnabled]
3841
- );
3842
- const multiForm = useMultiForm({
3843
- defaultData,
3844
- allFields: derivedProps?.allFields,
3845
- requiredFields: derivedProps?.requiredFields,
3846
- optionalFields: derivedProps?.optionalFields,
3847
- obscuredFields: derivedProps?.obscuredFields,
3848
- trustedFields: derivedProps?.trustedFields,
3849
- rules: buildFieldValidations
3850
- });
3851
- const isTinMatched = tinMatched.value;
3852
- const customRules = useMemo(
3853
- () => rules({
3854
- data: multiForm.data,
3855
- country,
3856
- taskType,
3857
- isExperimentEnabled,
3858
- isSettingEnabled,
3859
- accountHolder,
3860
- tinMatched: isTinMatched,
3861
- rootLegalEntity: legalEntityResponse
3862
- }),
3863
- [
3864
- multiForm.data,
3865
- country,
3866
- taskType,
3867
- isExperimentEnabled,
3868
- isSettingEnabled,
3869
- accountHolder,
3870
- isTinMatched,
3871
- legalEntityResponse
3872
- ]
3873
- );
3874
- useEffect(() => {
3875
- const props = getPropsFromConfigurations({
3876
- scenarioConfiguration: fieldConfigurations,
3877
- forms: defaultForms,
3878
- remediationActions: problems?.remediationActions ? Object.values(problems?.remediationActions) : [],
3879
- dataMissingErrors: problems?.missingData ?? [],
3880
- fieldsWithExistingData: subjectEntity ? subjectEntity.type === LegalEntityTypes.SOLE_PROPRIETORSHIP ? getFieldsWithExistingData(
3881
- subjectEntity,
3882
- solePropBusinessDetailsApiKeyMapping,
3883
- solePropBusinessDetailsDocumentMapping
3884
- ) : getFieldsWithExistingData(
3885
- subjectEntity,
3886
- businessDetailsApiKeyMapping,
3887
- businessDetailsDocumentMapping
3888
- ) : [],
3889
- customRules,
3890
- legalEntityType: subjectEntity?.type,
3891
- legalEntityTrustedFields: trustedFields
3892
- });
3893
- setDerivedProps(props);
3894
- }, [
3895
- customRules,
3896
- defaultForms,
3897
- subjectEntity,
3898
- problems?.missingData,
3899
- problems?.remediationActions,
3900
- trustedFields,
3901
- fieldConfigurations
3902
- ]);
3903
- const [prevCountry, setPrevCountry] = useState(multiForm.data.basicInformation?.country);
3904
- if (multiForm.data.basicInformation?.country && prevCountry !== multiForm.data.basicInformation?.country) {
3905
- setCountry(multiForm.data?.basicInformation?.country);
3906
- setPrevCountry(multiForm.data.basicInformation?.country);
3907
- setTrustedFields(void 0);
3908
- verifiedBusiness.value = void 0;
3909
- tinMatched.value = void 0;
3910
- businessMismatchModalOpen.value = false;
3911
- }
3912
- const [forms, setForms] = useState(
3913
- buildRequiredForms({
3914
- config: {
3915
- country,
3916
- forms: defaultForms,
3917
- requiredFields: derivedProps?.requiredFields,
3918
- optionalFields: derivedProps?.optionalFields,
3919
- isValid: multiForm.isValid ?? {},
3920
- problems
3921
- },
3922
- options: {
3923
- hasNoSearchResults: false
3924
- }
3925
- })
3926
- );
3927
- const updateForms = useCallback(
3928
- ({ searchResults }) => {
3929
- const updatedForms = buildRequiredForms({
3930
- config: {
3931
- country,
3932
- forms: defaultForms,
3933
- requiredFields: derivedProps?.requiredFields,
3934
- optionalFields: derivedProps?.optionalFields,
3935
- isValid: multiForm.isValid ?? {},
3936
- problems
3937
- },
3938
- options: {
3939
- hasNoSearchResults: searchResults && !searchResults.length
3940
- }
3941
- });
3942
- setForms(updatedForms);
3943
- return updatedForms;
3944
- },
3945
- [
3946
- country,
3947
- defaultForms,
3948
- derivedProps?.optionalFields,
3949
- derivedProps?.requiredFields,
3950
- multiForm.isValid,
3951
- problems
3952
- ]
3953
- );
3954
- const summaryData = useMemo(
3955
- () => formatDataForSummary(multiForm.data, forms, t, i18n.language, isExperimentEnabled),
3956
- [multiForm.data, forms, t, i18n.language, isExperimentEnabled]
3957
- );
3958
- const { mutateAsync: createBusinessLine } = useCreateBusinessLine();
3959
- const { mutateAsync: updateBusinessLine } = useUpdateBusinessLine();
3960
- const submitTask = useCallback(() => {
3961
- setAccountHolder(accountHolder);
3962
- return submit({
3963
- data: multiForm.data,
3964
- legalEntityResponse,
3965
- associatedLegalArrangement,
3966
- nestedLegalEntity,
3967
- nestedLegalEntityDetails,
3968
- problems,
3969
- taskType: taskType ?? TaskTypes.BUSINESS_DETAILS,
3970
- accountHolder: accountHolder ?? "theCompanyIWorkFor",
3971
- forms,
3972
- documentUtils,
3973
- t,
3974
- showToast,
3975
- setLoadingStatus,
3976
- setProblems,
3977
- handleUpdateLegalEntity: updateLegalEntity,
3978
- createLegalEntity,
3979
- onExternalSubmit,
3980
- isExperimentEnabled,
3981
- userEvents,
3982
- efpBusinessLines,
3983
- createBusinessLine,
3984
- updateBusinessLine
3985
- });
3986
- }, [
3987
- setAccountHolder,
3988
- accountHolder,
3989
- multiForm.data,
3990
- legalEntityResponse,
3991
- associatedLegalArrangement,
3992
- nestedLegalEntity,
3993
- nestedLegalEntityDetails,
3994
- problems,
3995
- taskType,
3996
- forms,
3997
- documentUtils,
3998
- t,
3999
- showToast,
4000
- updateLegalEntity,
4001
- createLegalEntity,
4002
- onExternalSubmit,
4003
- isExperimentEnabled,
4004
- userEvents,
4005
- efpBusinessLines,
4006
- createBusinessLine,
4007
- updateBusinessLine
4008
- ]);
4009
- const {
4010
- handleNextClick,
4011
- handleBackClick,
4012
- activeForm,
4013
- shouldValidate,
4014
- gotoFormByFormIndex,
4015
- steps
4016
- } = useFormComposer({
4017
- problems,
4018
- forms,
4019
- onSubmit: submitTask,
4020
- triggerValidation: multiForm.triggerValidation
4021
- });
4022
- const handleBusinessMismatchContinue = () => {
4023
- setTrustedFields([]);
4024
- businessMismatchModalOpen.value = false;
4025
- handleNextClick();
4026
- };
4027
- const handleBusinessMismatchCancel = () => {
4028
- handleBackClick?.();
4029
- businessMismatchModalOpen.value = false;
4030
- tinMatched.value = false;
4031
- };
4032
- const companySearchQueryInput = {
4033
- name: multiForm.data?.basicInformation?.legalCompanyName ?? "",
4034
- country: multiForm.data?.basicInformation?.country,
4035
- state: multiForm.data?.basicInformation?.stateOrProvince,
4036
- registrationNumber: multiForm.data?.basicInformation?.registrationNumber
4037
- };
4038
- const verifyTinQueryInput = {
4039
- name: multiForm.data.basicInformation?.legalCompanyName ?? "",
4040
- tin: multiForm.data?.basicInformation?.taxInformation?.find((taxId) => taxId.country === country)?.number ?? ""
4041
- };
4042
- const {
4043
- data: companySearchResponse,
4044
- isLoading: searchingCompanies,
4045
- isError: searchingError
4046
- } = useCompanySearch(companySearchQueryInput, {
4047
- enabled: false
4048
- });
4049
- useEffect(() => {
4050
- if (!searchingCompanies && companySearchResponse?.results) {
4051
- userEvents.addPageEvent("Success", {
4052
- actionType: "submit",
4053
- returnValue: "companySearch",
4054
- additionalData: {
4055
- numberOfResults: companySearchResponse?.results.length
4056
- }
4057
- });
4058
- }
4059
- }, [searchingCompanies, userEvents, subjectEntity, companySearchResponse?.results]);
4060
- const companySelectionInput = {
4061
- company: companySearchResponse?.results[0],
4062
- state: multiForm.data.basicInformation?.stateOrProvince,
4063
- name: multiForm.data?.basicInformation?.legalCompanyName ?? "",
4064
- tin: multiForm.data?.basicInformation?.taxInformation?.find((taxId) => taxId.country === country)?.number ?? ""
4065
- };
4066
- useVerifyTin(verifyTinQueryInput, { enabled: false });
4067
- useCompanySelection(companySelectionInput, {
4068
- enabled: false
4069
- });
4070
- const attemptBusinessSearch = async () => {
4071
- if (customRules.countryUsingCompanySearch() !== "REQUIRED") {
4072
- const currentForms = updateForms({ searchResults: [] });
4073
- return handleNextClick(currentForms);
4074
- }
4075
- try {
4076
- setLoadingStatus("loading");
4077
- tinMatched.value = void 0;
4078
- verifiedBusiness.value = void 0;
4079
- isVerifiedSingleCompanySearchResult.value = false;
4080
- const searchResponse = await queryClient.fetchQuery({
4081
- queryKey: ["companySearch", companySearchQueryInput]
4082
- });
4083
- let currentForms = updateForms({ searchResults: searchResponse.results });
4084
- const handleTinResponse = (matched) => {
4085
- if (matched) {
4086
- tinMatched.value = true;
4087
- } else {
4088
- businessMismatchModalOpen.value = true;
4089
- tinMatched.value = false;
4090
- }
4091
- return tinMatched.value;
4092
- };
4093
- if (searchResponse?.results.length === 1 && isNormalizedStringMatch(
4094
- multiForm.data?.basicInformation?.legalCompanyName ?? "",
4095
- searchResponse.results[0].name
4096
- )) {
4097
- const companySelectionResponse = await queryClient.fetchQuery({
4098
- queryKey: [
4099
- "companySelection",
4100
- { ...companySelectionInput, company: searchResponse.results[0] }
4101
- ]
4102
- });
4103
- if (handleTinResponse(!!companySelectionResponse.tinMatched)) {
4104
- verifiedBusiness.value = companySelectionResponse;
4105
- isVerifiedSingleCompanySearchResult.value = true;
4106
- applyVerifiedBusinessData(multiForm, country, verifiedBusiness.value);
4107
- currentForms = updateForms({ searchResults: searchResponse.results });
4108
- } else {
4109
- return setLoadingStatus("success");
4110
- }
4111
- }
4112
- if (!searchResponse.results.length) {
4113
- const tinVerificationResponse = await queryClient.fetchQuery({
4114
- queryKey: ["verifyTin", verifyTinQueryInput]
4115
- });
4116
- if (!handleTinResponse(!!tinVerificationResponse?.matched)) {
4117
- return setLoadingStatus("success");
4118
- }
4119
- }
4120
- setLoadingStatus("success");
4121
- return handleNextClick(currentForms);
4122
- } catch (e) {
4123
- setLoadingStatus("error");
4124
- if (e instanceof Error && e.message === KOMPANY_SEARCH_FAILURE) {
4125
- const currentForms = updateForms({ searchResults: [] });
4126
- return handleNextClick(currentForms);
4127
- }
4128
- }
4129
- };
4130
- const overrideNextClick = async () => {
4131
- if (!activeForm.isValid) return handleNextClick();
4132
- if (!COUNTRIES_USING_COMPANY_SEARCH.includes(country) || isSoleProp) {
4133
- return handleNextClick();
4134
- }
4135
- switch (activeForm.formId) {
4136
- case "basicInformation": {
4137
- return await attemptBusinessSearch();
4138
- }
4139
- case "businessSelection": {
4140
- const currentForms = updateForms({
4141
- searchResults: companySearchResponse?.results
4142
- });
4143
- return handleNextClick(currentForms);
4144
- }
4145
- default:
4146
- return handleNextClick();
4147
- }
4148
- };
4149
- useEffect(() => {
4150
- updateForms({
4151
- searchResults: searchingError ? [] : companySearchResponse?.results
4152
- });
4153
- }, [updateForms, companySearchResponse?.results, searchingError]);
4154
- return /* @__PURE__ */ jsx(FormContextProvider, { form: multiForm, children: /* @__PURE__ */ jsxs(
4155
- FormFlow,
4156
- {
4157
- summary: {
4158
- data: summaryData,
4159
- omitted: {
4160
- keys: ["operationalAddressIsSame"],
4161
- forms: ["businessSelection"]
4162
- },
4163
- problems,
4164
- showLegalCaption: true
4165
- },
4166
- asModal,
4167
- currentStep: steps.current,
4168
- totalSteps: steps.total,
4169
- forms,
4170
- disableNextButton: activeForm.formId === "businessSelection",
4171
- gotoFormByFormIndex,
4172
- handleNextClick: overrideNextClick,
4173
- handleBackClick,
4174
- handleCancelClick: handleHomeClick,
4175
- loadingStatus,
4176
- children: [
4177
- /* @__PURE__ */ jsx(
4178
- BusinessDetailsMultiform,
4179
- {
4180
- taskType,
4181
- activeForm,
4182
- country,
4183
- shouldValidate,
4184
- problems,
4185
- handleNextClick: overrideNextClick,
4186
- handleBackClick,
4187
- setLoadingStatus,
4188
- isTopLevelEntity: taskType === TaskTypes.BUSINESS_DETAILS
4189
- }
4190
- ),
4191
- businessMismatchModalOpen.value && /* @__PURE__ */ jsx(
4192
- Confirm,
4193
- {
4194
- title: t(($) => $["businessSelection__tinVerificationFailureModalHeader"], {
4195
- ns: "business"
4196
- }),
4197
- description: t(($) => $["businessSelection__tinVerificationFailureModalContent"], {
4198
- ns: "business"
4199
- }),
4200
- cancelText: t(
4201
- ($) => $["businessSelection__tinVerificationFailureModalSecondaryButton"],
4202
- { ns: "business" }
4203
- ),
4204
- confirmText: t(
4205
- ($) => $["businessSelection__tinVerificationFailureModalPrimaryButton"],
4206
- { ns: "business" }
4207
- ),
4208
- onCancel: handleBusinessMismatchCancel,
4209
- onConfirm: handleBusinessMismatchContinue,
4210
- analyticsEventLabel: "tinVerificationFailureModal"
4211
- }
4212
- )
4213
- ]
4214
- }
4215
- ) });
4216
- }
4217
- export {
4218
- BusinessDetailsMultiformDropin as B,
4219
- BusinessDetailsDropin as a
4220
- };