@adyen/kyc-components 4.0.0-beta.5 → 4.0.0-beta.7

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 (453) hide show
  1. package/dist/{AcceptTermsOfServiceComponent-Bjj3cdYk.js → AcceptTermsOfServiceComponent-BPD80NBV.js} +43 -15
  2. package/dist/{AccountSetupRejected-CSQTnRkO.js → AccountSetupRejected-DMxK6_NZ.js} +6 -4
  3. package/dist/Address-BxCJg97r.js +1076 -0
  4. package/dist/Alert-JxANwoOi.js +231 -0
  5. package/dist/{Avatar-DL_WbHEO.js → Avatar-BEsogKxf.js} +2 -2
  6. package/dist/BusinessDetailsDropin-3EfuXcxm.js +5088 -0
  7. package/dist/BusinessFinancingComponent-C7-oATO_.js +45 -0
  8. package/dist/{BusinessFinancingDropin-MrOVSlPu.js → BusinessFinancingDropin-Cszqojtx.js} +51 -26
  9. package/dist/BusinessFinancingPage-BcmQhmS2.js +40 -0
  10. package/dist/{BusinessTypeSelectionPage-DJ5bfr8m.js → BusinessTypeSelectionPage-CkX2PhOw.js} +9 -5
  11. package/dist/Card-DPXJw_ou.js +145 -0
  12. package/dist/Confirm-C6hGSEWi.js +64 -0
  13. package/dist/{ContractViewer-z3KbE1Vf.js → ContractViewer-Byp71k2e.js} +34 -46
  14. package/dist/CountryField-ziRVRc5r.js +864 -0
  15. package/dist/CreateIndividualComponent-C87nTEy0.js +72 -0
  16. package/dist/CreateTransferInstrumentComponent-BH92eRcz.js +67 -0
  17. package/dist/Currency-DAbA2YTu.js +238 -0
  18. package/dist/{CustomerSupport-CUPUElh7.js → CustomerSupport-C2Ugl1ZJ.js} +10 -6
  19. package/dist/{DebugModal-BC-xS3Y1.js → DebugModal-BiGsN2MR.js} +8 -5
  20. package/dist/DecisionMakerDetailsPage-BKqkZ5TL.js +100 -0
  21. package/dist/{DecisionMakers-5m_hI3ko.js → DecisionMakers-Dfub_FaY.js} +247 -134
  22. package/dist/DetailViewLayout-Z9cuUp4X.js +65 -0
  23. package/dist/Dropzone-DwdkWB-s.js +218 -0
  24. package/dist/{EmbeddedStatus-8yA_zZvi.js → EmbeddedStatus-C2FaB1kG.js} +4 -4
  25. package/dist/EndStateLayout-BhU2LTbj.js +71 -0
  26. package/dist/{FormFlow-6j8qCSuK.js → FormFlow-BaU8ND7m.js} +8 -2
  27. package/dist/FormNavigation-BAN7IHi5.js +162 -0
  28. package/dist/{IndividualOnfidoDropin-B0G_nHXY.js → IndividualOnfidoDropin-ZdnLLkuv.js} +3240 -258
  29. package/dist/InputDate-DgqNliIM.js +43 -0
  30. package/dist/InputGroup-WBfGDV5F.js +32 -0
  31. package/dist/InputText-CufyDwPI.js +161 -0
  32. package/dist/{Introduction-aPZmTW68.js → Introduction-BMLVCUN7.js} +58 -4
  33. package/dist/LegalRepresentativeDetailsPage-Z1TS1eMK.js +61 -0
  34. package/dist/Link-D6KEr49t.js +35 -0
  35. package/dist/ManageIndividualComponent-B0P2UcYb.js +47 -0
  36. package/dist/ManageTermsOfServiceComponent-BVGYJlbf.js +47 -0
  37. package/dist/{ManageTransferInstrumentComponent-Ds1QZxxR.js → ManageTransferInstrumentComponent-BLOM9_st.js} +37 -42
  38. package/dist/MaskedInput-CMGa4-AZ.js +799 -0
  39. package/dist/MaybeModal-C32AiZaM.js +25 -0
  40. package/dist/Modal-BvBRzt44.js +136 -0
  41. package/dist/{OnboardingDropinComponent-DLvTQVTE.js → OnboardingDropinComponent-BdhXxmZJ.js} +235 -90
  42. package/dist/PayoutDetailsDropin-CFOc-3Cg.js +3694 -0
  43. package/dist/RadioGroup-CnXRr_Ap.js +143 -0
  44. package/dist/RegistrationAddress-C48VQay3.js +2334 -0
  45. package/dist/{Review-DEeOefPe.js → Review-Dp8VRYjm.js} +8 -4
  46. package/dist/{RootBusinessDetailsPage-B2VBJ6x2.js → RootBusinessDetailsPage-C9oZvSeQ.js} +66 -44
  47. package/dist/RootIndividualDetailsPage-BHTLpnk6.js +77 -0
  48. package/dist/SignPCIComponent-Mtb9Ipxw.js +294 -0
  49. package/dist/{SingpassSelection--f8TDTJH.js → SingpassSelection-C5WwyGgd.js} +19 -11
  50. package/dist/SoleProprietorshipPage-Dweeg8jm.js +50 -0
  51. package/dist/{SourceOfFundsPage-avNGxkCP.js → SourceOfFundsPage-PEf5WB77.js} +49 -32
  52. package/dist/Spacer-BK3jDget.js +18 -0
  53. package/dist/StepProgressIndicator-D-k_XSe0.js +78 -0
  54. package/dist/StoreProvider-_YW7glEh.js +7072 -0
  55. package/dist/StructuredList-DaepaiVE.js +38 -0
  56. package/dist/{TaskItemStatus-DMPUHtWU.js → TaskItemStatus-3Xrr8mL4.js} +4 -3
  57. package/dist/{TaskStatusIndicator-Bfc4X_jG.js → TaskStatusIndicator-B1ZRr1qx.js} +3 -3
  58. package/dist/TaxInformationField-Cc4iBLBk.js +3062 -0
  59. package/dist/{TaxReportingDropin-B7FXPbLq.js → TaxReportingDropin-yiL_vTaE.js} +28 -17
  60. package/dist/{TileGroup-DUoq3Lh4.js → TileGroup-C0Rfm3yy.js} +4 -2
  61. package/dist/{TrustDetailsPage-J4MShc8J.js → TrustDetailsPage-D_ZIBi6O.js} +506 -19
  62. package/dist/TrustMemberCompanyPage-DkzAv8u6.js +60 -0
  63. package/dist/TrustMemberIndividualPage-DXWrDuq4.js +66 -0
  64. package/dist/UnincorporatedPartnershipIndividualPage-B6tWGs6K.js +66 -0
  65. package/dist/UnincorporatedPartnershipMemberCompanyPage-C_awQ-ZH.js +64 -0
  66. package/dist/{ViewVerificationStatusComponent-ZtYIqtnO.js → ViewVerificationStatusComponent-DjO4MIbD.js} +4 -3
  67. package/dist/adyen-business-financing.js +33 -22
  68. package/dist/adyen-individual-configuration.js +59 -0
  69. package/dist/adyen-individual-status.js +47 -0
  70. package/dist/adyen-kyc-components.js +28 -15
  71. package/dist/adyen-onboarding.js +3 -3
  72. package/dist/adyen-terms-of-service-management.js +63 -0
  73. package/dist/adyen-terms-of-service-status.js +47 -0
  74. package/dist/adyen-transfer-instrument-configuration.js +73 -0
  75. package/dist/adyen-transfer-instrument-management.js +61 -0
  76. package/dist/adyen-verification-status.js +44 -36
  77. package/dist/analytics-BY--2-JY.js +61 -0
  78. package/dist/{LandingLayout-Xi3iuRMx.js → bafinUtils-DJvocoVP.js} +218 -8
  79. package/dist/basePatterns-BwdnMQxI.js +15 -0
  80. package/dist/bg-BG-B0-ZcjR0.js +22 -0
  81. package/dist/{bg-BG-BiYtb1Tz.js → bg-BG-BYkC3yKf.js} +4 -1
  82. package/dist/bg-BG-CW9c658c.js +13 -0
  83. package/dist/bg-BG-CZ8v3rdy.js +30 -0
  84. package/dist/{bg-BG-Dy6-IwuZ.js → bg-BG-D5192UVe.js} +9 -2
  85. package/dist/{bg-BG-NMIts2sa.js → bg-BG-QC5irNEG.js} +2 -4
  86. package/dist/commonValidators-DcQ7Z0J8.js +24 -0
  87. package/dist/{cs-CZ-Dbow28-o.js → cs-CZ-DOqH0WeT.js} +9 -2
  88. package/dist/cs-CZ-Dk1ePReM.js +22 -0
  89. package/dist/cs-CZ-Dx6momCa.js +30 -0
  90. package/dist/cs-CZ-dU9fnQ1g.js +13 -0
  91. package/dist/{cs-CZ-Csr_35T-.js → cs-CZ-t297LwYw.js} +2 -4
  92. package/dist/{cs-CZ-wdftovLe.js → cs-CZ-zTkICtXj.js} +4 -1
  93. package/dist/currency-BGwQyxBo.js +36 -0
  94. package/dist/{da-DK-Adj8R5Qn.js → da-DK-B45X2VaJ.js} +9 -2
  95. package/dist/da-DK-BJ7aTPir.js +13 -0
  96. package/dist/{da-DK-Dm8o1giq.js → da-DK-BoQic3Gy.js} +2 -4
  97. package/dist/{da-DK-4QAKic_C.js → da-DK-D0N1TVVU.js} +4 -1
  98. package/dist/da-DK-D4H69PX3.js +30 -0
  99. package/dist/da-DK-DStNe471.js +22 -0
  100. package/dist/de-DE-C78RLE2G.js +13 -0
  101. package/dist/de-DE-CGoBPCPv.js +22 -0
  102. package/dist/{de-DE-BG0tKqvi.js → de-DE-CWvgMDqU.js} +9 -2
  103. package/dist/{de-DE-BzumFI3T.js → de-DE-Dtuu-nE7.js} +4 -1
  104. package/dist/{de-DE-DMFaycio.js → de-DE-Dwagawx1.js} +2 -4
  105. package/dist/de-DE-wp5-H-ov.js +30 -0
  106. package/dist/{digital-wallet-with-local-currencies-POeLD54e.js → digital-wallet-D_IpxnkN.js} +3 -3
  107. package/dist/dropinUtils-CMGrblnm.js +192 -0
  108. package/dist/el-GR-B69zcWyB.js +22 -0
  109. package/dist/el-GR-BZRKurtr.js +13 -0
  110. package/dist/{el-GR-DerT143K.js → el-GR-C3rkK_oc.js} +9 -2
  111. package/dist/el-GR-CK2heqPJ.js +30 -0
  112. package/dist/{el-GR-CGeBAkDN.js → el-GR-CxwhV-TX.js} +2 -4
  113. package/dist/{el-GR-CXmTklMq.js → el-GR-DaO38A1s.js} +4 -1
  114. package/dist/emitEvent-CzZf80Am.js +28 -0
  115. package/dist/{en-US-DLm6gy6T.js → en-US-546hB2Wn.js} +3 -1
  116. package/dist/{en-US-CkZcSKGh.js → en-US-BbAzROHT.js} +5 -4
  117. package/dist/en-US-CAm3meB1.js +30 -0
  118. package/dist/{en-US-SbE0c1gn.js → en-US-DIdQJky-.js} +1 -2
  119. package/dist/en-US.instructions-Ddr7AO05.js +22 -0
  120. package/dist/{es-ES-BhQOdKge.js → es-ES-BsQpwaPN.js} +4 -1
  121. package/dist/{es-ES-pXHx3ODy.js → es-ES-Bsoco8Fj.js} +2 -4
  122. package/dist/es-ES-BtUSEzkE.js +13 -0
  123. package/dist/es-ES-CKMfS8Yy.js +22 -0
  124. package/dist/{es-ES-BM4U0hT3.js → es-ES-DKCCgVF8.js} +9 -2
  125. package/dist/es-ES-Ds3-DtqZ.js +30 -0
  126. package/dist/et-EE-BCnK305R.js +13 -0
  127. package/dist/{et-EE-OJg_PSHf.js → et-EE-Bc6ioJRG.js} +9 -2
  128. package/dist/et-EE-Co-8akjV.js +30 -0
  129. package/dist/{et-EE-CFlzRBEx.js → et-EE-DF_GqBgK.js} +4 -1
  130. package/dist/{et-EE-QLVnr6Vl.js → et-EE-DdGlUpaQ.js} +2 -4
  131. package/dist/et-EE-Dw-aPF7J.js +22 -0
  132. package/dist/{fi-FI-Djollt2G.js → fi-FI-BJ9RzrL3.js} +4 -1
  133. package/dist/{fi-FI-DT351N-G.js → fi-FI-ClnsYt3L.js} +2 -4
  134. package/dist/fi-FI-Cvar63RH.js +13 -0
  135. package/dist/fi-FI-DPNeTsJS.js +30 -0
  136. package/dist/{fi-FI-BJ2l42Pj.js → fi-FI-Hhku9Lmc.js} +9 -2
  137. package/dist/fi-FI-REYOX46I.js +22 -0
  138. package/dist/fieldConfigurations-Bct_fXIF.js +458 -0
  139. package/dist/form-rules-DhbF2mY4.js +13 -0
  140. package/dist/fr-FR-B5543Fe-.js +13 -0
  141. package/dist/{fr-FR-g7lmxEsI.js → fr-FR-BYuKsZIb.js} +9 -2
  142. package/dist/{fr-FR-BNXXNUX_.js → fr-FR-CJI0bIig.js} +2 -4
  143. package/dist/{fr-FR-l36qBV3a.js → fr-FR-CNR5-s9g.js} +4 -1
  144. package/dist/fr-FR-ChmNQciP.js +30 -0
  145. package/dist/fr-FR-D9qaP6nx.js +22 -0
  146. package/dist/getName-BfigaSFZ.js +41 -0
  147. package/dist/{hasDataChanged-CTE9vdfO.js → hasDataChanged-D5Rq4ntg.js} +2 -2
  148. package/dist/{hr-HR-B8AZ4eHJ.js → hr-HR-C0yWizOX.js} +2 -4
  149. package/dist/{hr-HR-CDUE36Dg.js → hr-HR-CPO5Yw2B.js} +9 -2
  150. package/dist/hr-HR-CbxEvbrE.js +22 -0
  151. package/dist/{hr-HR-DTCY4iL8.js → hr-HR-CjA4MWAU.js} +4 -1
  152. package/dist/hr-HR-DqC8Cgs6.js +30 -0
  153. package/dist/hr-HR-ZreFlbK9.js +13 -0
  154. package/dist/hu-HU-B3BihdGh.js +13 -0
  155. package/dist/hu-HU-BOanVlKb.js +30 -0
  156. package/dist/hu-HU-D0C6UfXB.js +22 -0
  157. package/dist/{hu-HU-BznXPoc2.js → hu-HU-NhwFr6o-.js} +4 -1
  158. package/dist/{hu-HU-Bmf13NMf.js → hu-HU-mo_0ULJG.js} +9 -2
  159. package/dist/{hu-HU-DRi6Dz9U.js → hu-HU-wnSie9tz.js} +2 -4
  160. package/dist/iframeWidget-D2bi8wJe.js +234 -0
  161. package/dist/{payout-verification-instant-BIcnFP-p.js → instant-verification-Dvvkyfmp.js} +3 -3
  162. package/dist/isEmpty-Ck0I6out.js +23 -0
  163. package/dist/{it-IT-BEWyAQUU.js → it-IT-BV9K87FK.js} +4 -1
  164. package/dist/{it-IT-BeYbInCQ.js → it-IT-BeC2Y1F8.js} +2 -4
  165. package/dist/it-IT-Biduphjt.js +22 -0
  166. package/dist/it-IT-Dd6xGSe-.js +13 -0
  167. package/dist/{it-IT-DYIx7myn.js → it-IT-Nl57jui-.js} +9 -2
  168. package/dist/it-IT-eCrTB65E.js +30 -0
  169. package/dist/ja-JP-B2txEVPx.js +22 -0
  170. package/dist/ja-JP-BJljbFIZ.js +30 -0
  171. package/dist/{ja-JP-BhS-_dIx.js → ja-JP-CbgaW99b.js} +2 -2
  172. package/dist/{ja-JP-tx1DbZYD.js → ja-JP-D3oQAH7z.js} +10 -3
  173. package/dist/{ja-JP-D7oL6xGY.js → ja-JP-DXcP0ojZ.js} +13 -10
  174. package/dist/{ja-JP-C1OQ16fo.js → ja-JP-YoU7mNrK.js} +2 -4
  175. package/dist/ja-JP-iTbqSPNL.js +13 -0
  176. package/dist/keys-BpNgnAsD.js +23 -0
  177. package/dist/{localizeDateString-DaAGYSWR.js → localizeDateString-DmnKzDGI.js} +2 -2
  178. package/dist/{lt-LT-BxScCodJ.js → lt-LT-CVasDmF3.js} +9 -2
  179. package/dist/lt-LT-C_YMgjp9.js +22 -0
  180. package/dist/lt-LT-DE-4IXNG.js +13 -0
  181. package/dist/{lt-LT-_MzAcXJo.js → lt-LT-DIe4cKlu.js} +2 -4
  182. package/dist/lt-LT-DckQGgoT.js +30 -0
  183. package/dist/{lt-LT-De7dLXxI.js → lt-LT-tXTApHm2.js} +4 -1
  184. package/dist/lv-LV-B3sT3_cw.js +22 -0
  185. package/dist/lv-LV-CeivEZms.js +13 -0
  186. package/dist/lv-LV-DP9oRTFv.js +30 -0
  187. package/dist/{lv-LV-De9rdme0.js → lv-LV-DSaQNC67.js} +4 -1
  188. package/dist/{lv-LV-CRhXAjn6.js → lv-LV-DXgW5zWl.js} +2 -4
  189. package/dist/{lv-LV-F9_Fiu3w.js → lv-LV-Sbsv8-nD.js} +9 -2
  190. package/dist/{payout-verification-manual-DH9-DdlZ.js → manual-verification-BvZWqA00.js} +3 -3
  191. package/dist/mapExistingFile-qQ4y79Lm.js +231 -0
  192. package/dist/mapScriptLocalization-D7RKQgK6.js +72 -0
  193. package/dist/mapTransferInstrumentToPayoutAccount-BbdTQhjr.js +30 -0
  194. package/dist/{nl-NL-Cht7cSwD.js → nl-NL-BHkRnVrj.js} +9 -2
  195. package/dist/{nl-NL-Dbx0ZmI7.js → nl-NL-Cysslsh2.js} +2 -4
  196. package/dist/nl-NL-D2QKudfh.js +30 -0
  197. package/dist/nl-NL-DVENFpd5.js +13 -0
  198. package/dist/{nl-NL-lZcJhRsP.js → nl-NL-DywVQ9km.js} +4 -1
  199. package/dist/nl-NL-G1wVnmzT.js +22 -0
  200. package/dist/{no-NO-BEIyAMmZ.js → no-NO-B8oxqfNI.js} +4 -1
  201. package/dist/no-NO-BTtAuqCb.js +22 -0
  202. package/dist/no-NO-C_snYWBc.js +30 -0
  203. package/dist/no-NO-Dn2UkdoI.js +13 -0
  204. package/dist/{no-NO-BQAqVzF4.js → no-NO-kaAdT9B8.js} +9 -2
  205. package/dist/{no-NO-C0sfkp82.js → no-NO-zSnPtrDi.js} +2 -4
  206. package/dist/pl-PL--qPaNyJD.js +22 -0
  207. package/dist/{pl-PL-DD3wVcKc.js → pl-PL-C89s21hn.js} +4 -1
  208. package/dist/pl-PL-CQ6c2Qz_.js +30 -0
  209. package/dist/{pl-PL-CqxMKpBm.js → pl-PL-DD8JN4Qf.js} +9 -2
  210. package/dist/pl-PL-DFAzuceF.js +13 -0
  211. package/dist/{pl-PL-DAPGaxWi.js → pl-PL-UB5J5JcB.js} +2 -4
  212. package/dist/{pt-PT-BsDCHbWN.js → pt-PT-BvK00TeI.js} +4 -1
  213. package/dist/pt-PT-C-hbNnsB.js +30 -0
  214. package/dist/{pt-PT-BY9rcwcF.js → pt-PT-CjsyP_OK.js} +2 -4
  215. package/dist/pt-PT-Dk48OVtf.js +22 -0
  216. package/dist/{pt-PT-CBbmkr_J.js → pt-PT-Xm-pm3mb.js} +9 -2
  217. package/dist/pt-PT-_o5xgnxS.js +13 -0
  218. package/dist/{resolveEnvironment-D0tYcn_s.js → resolveEnvironment-D4ONN9a2.js} +3 -3
  219. package/dist/ro-RO-BLuOjrS0.js +22 -0
  220. package/dist/ro-RO-BrTWk1Ui.js +30 -0
  221. package/dist/{ro-RO-IY3AMhwm.js → ro-RO-C3m6aJVP.js} +9 -2
  222. package/dist/{ro-RO-DJLWmWZ4.js → ro-RO-C8yYXQc_.js} +2 -4
  223. package/dist/{ro-RO-CUg8-CQ8.js → ro-RO-CpGd9emB.js} +4 -1
  224. package/dist/ro-RO-D7c_Rj8V.js +13 -0
  225. package/dist/{rules-DXnRkeBJ.js → rules-DD7cnV-t.js} +5 -2
  226. package/dist/sk-SK-BBSuh2fA.js +13 -0
  227. package/dist/sk-SK-BTFtoPmI.js +30 -0
  228. package/dist/{sk-SK-BDKRZ2mM.js → sk-SK-BVc-vNQm.js} +9 -2
  229. package/dist/sk-SK-C1Ky2nl_.js +22 -0
  230. package/dist/{sk-SK-B7o3L57C.js → sk-SK-DbOE9C6n.js} +2 -4
  231. package/dist/{sk-SK-Cjrkrb85.js → sk-SK-DlX5KvBV.js} +4 -1
  232. package/dist/sl-SI-BB7iVcFI.js +22 -0
  233. package/dist/sl-SI-BLTuWNf5.js +13 -0
  234. package/dist/sl-SI-BhVTSmhQ.js +30 -0
  235. package/dist/{sl-SI-C8CMAkD0.js → sl-SI-Br0UEUPL.js} +2 -4
  236. package/dist/{sl-SI-BB0suyr1.js → sl-SI-D_rqR0D7.js} +9 -2
  237. package/dist/{sl-SI-BE_ndzZ2.js → sl-SI-NI2OJAvm.js} +4 -1
  238. package/dist/style.css +3226 -2972
  239. package/dist/styles-CLV89_hH.js +3226 -2972
  240. package/dist/sv-SE-66rqYTxi.js +30 -0
  241. package/dist/{sv-SE-DYruQSzt.js → sv-SE-B3zoXMuH.js} +9 -2
  242. package/dist/sv-SE-BUfESAQK.js +13 -0
  243. package/dist/{sv-SE-Bwh0wKFk.js → sv-SE-BtXmvxx4.js} +2 -4
  244. package/dist/{sv-SE-BryiIPVv.js → sv-SE-CAZpDX9G.js} +4 -1
  245. package/dist/sv-SE-DbI-1JqN.js +22 -0
  246. package/dist/translation-CpuWYSlU.js +472 -0
  247. package/dist/types/api/configurations/useScenarios.d.ts +8 -7
  248. package/dist/types/api/idNowProvider/idNowProvider.types.d.ts +1 -1
  249. package/dist/types/api/idNowProvider/useIdNowProvider.d.ts +9 -5
  250. package/dist/types/api/industryCodes/industryCodes.types.d.ts +2 -0
  251. package/dist/types/api/industryCodes/useIndustryCodes.d.ts +6 -0
  252. package/dist/types/api/queryKeys.d.ts +2 -1
  253. package/dist/types/components/BankAccount/forms/PayoutDetails/PayoutDetails.d.ts +1 -0
  254. package/dist/types/components/BankAccount/forms/PayoutVerificationMethod/payoutVerificationMethodMetadata.d.ts +3 -3
  255. package/dist/types/components/BankAccount/tasks/PayoutDetailsDropin/payoutDetailsFormConfig.d.ts +0 -9
  256. package/dist/types/components/Business/forms/BasicInformation/BasicInformationMultiform.d.ts +0 -1
  257. package/dist/types/components/Business/forms/BusinessDetails/forms.d.ts +7 -1
  258. package/dist/types/components/Business/forms/rules.d.ts +1 -3
  259. package/dist/types/components/Business/tasks/BusinessDetailsDropin/utils.d.ts +1 -2
  260. package/dist/types/components/Business/tasks/BusinessDetailsMultiformDropin/BusinessDetailsMultiform.d.ts +1 -1
  261. package/dist/types/components/Contract/tasks/ServiceAgreementDropin/ServiceAgreementDropin.d.ts +1 -1
  262. package/dist/types/components/Contract/tasks/ServiceAgreementDropin/types.d.ts +1 -0
  263. package/dist/types/components/EFP/mapping/businessFinancingKeyMappings.d.ts +0 -3
  264. package/dist/types/components/EFP/tasks/SourceOfFundsDropin/utils.d.ts +0 -1
  265. package/dist/types/components/EmbeddedDropins/AcceptTermsOfServiceComponent/AcceptTermsOfServiceComponent.d.ts +4 -3
  266. package/dist/types/components/EmbeddedDropins/ManageTransferInstrumentComponent/ManageTransferInstrumentOverviewItemModal/ManageTransferInstrumentOverviewItemModal.d.ts +0 -1
  267. package/dist/types/components/Individual/fields/NameFields/types.d.ts +4 -18
  268. package/dist/types/components/Individual/forms/Individual/IdVerificationMethod/idVerificationMethodMetadata.d.ts +3 -3
  269. package/dist/types/components/Individual/forms/Individual/Individual.d.ts +4 -0
  270. package/dist/types/components/Individual/forms/Individual/ProofOfRelationship/types.d.ts +0 -5
  271. package/dist/types/components/Individual/forms/IndividualOnfido/AdditionalPersonalDetails/AdditionalPersonalDetails.types.d.ts +1 -1
  272. package/dist/types/components/Individual/forms/IndividualOnfido/BasicDetails/BasicDetails.types.d.ts +1 -1
  273. package/dist/types/components/Individual/forms/IndividualOnfido/IdNowVerificationModal/IdNowVerificationModal.d.ts +4 -0
  274. package/dist/types/components/Individual/forms/IndividualOnfido/IdNowVerificationModal/isIdNowModalOpen.d.ts +17 -0
  275. package/dist/types/components/Individual/forms/IndividualOnfido/IdVerificationMethod/IdVerificationMethod.types.d.ts +2 -0
  276. package/dist/types/components/Individual/forms/IndividualOnfido/IdVerificationMethod/mapExtractionResultToSchema.d.ts +2 -1
  277. package/dist/types/components/Individual/forms/IndividualOnfido/IdVerificationMethod/validateExtractionResult.d.ts +12 -0
  278. package/dist/types/components/Individual/forms/IndividualOnfido/IndividualOnfido.types.d.ts +5 -3
  279. package/dist/types/components/Individual/helpers/bafinUtils.d.ts +35 -0
  280. package/dist/types/components/Individual/helpers/isDecisionMakerTask.d.ts +2 -0
  281. package/dist/types/components/Individual/helpers/shouldShowMotionCapture.d.ts +2 -2
  282. package/dist/types/components/Individual/pages/DecisionMakerDetailsPage.d.ts +2 -1
  283. package/dist/types/components/Shared/SingpassBanner/ProviderButton/ProviderButton.d.ts +7 -0
  284. package/dist/types/components/Shared/fields/IdFieldTypeSelector/countryIdNumberTypes.d.ts +1 -1
  285. package/dist/types/components/Shared/fields/LocalizedLegalCompanyNameField/fieldConfig.d.ts +4 -5
  286. package/dist/types/components/Shared/fields/LocalizedLegalCompanyNameField/types.d.ts +4 -5
  287. package/dist/types/components/Shared/forms/Address/utils.d.ts +1 -1
  288. package/dist/types/components/Trust/forms/Trust/Trust.d.ts +1 -0
  289. package/dist/types/components/Trust/forms/TrustRegistrationDetails/types.d.ts +1 -2
  290. package/dist/types/components/Trust/tasks/TrustMembers/TrustMembersOverview.d.ts +2 -1
  291. package/dist/types/components/UnincorporatedPartnership/pages/UnincorporatedPartnershipMemberCompanyPage.d.ts +2 -1
  292. package/dist/types/components/ui/atoms/ActionsMenu/ActionsMenu.d.ts +2 -1
  293. package/dist/types/components/ui/atoms/Button/Button.types.d.ts +4 -5
  294. package/dist/types/components/ui/atoms/Image/Image.d.ts +18 -0
  295. package/dist/types/components/ui/atoms/ListItem/ListItem.d.ts +2 -1
  296. package/dist/types/components/ui/atoms/Modal/MaybeModal.d.ts +1 -1
  297. package/dist/types/components/ui/atoms/RadioGroupCard/RadioGroupCard.types.d.ts +0 -14
  298. package/dist/types/components/ui/atoms/RadioWithLabel/RadioWithLabel.d.ts +2 -1
  299. package/dist/types/components/ui/atoms/Remove/Remove.d.ts +1 -1
  300. package/dist/types/components/ui/atoms/SelectList/SelectList.d.ts +1 -0
  301. package/dist/types/components/ui/atoms/StepProgressIndicator/StepProgressIndicator.d.ts +2 -1
  302. package/dist/types/components/ui/atoms/StructuredList/StructuredList.d.ts +2 -1
  303. package/dist/types/components/ui/atoms/Svg/svgs.d.ts +0 -76
  304. package/dist/types/components/ui/atoms/TaskStatusIndicator/TaskStatusIndicator.d.ts +4 -4
  305. package/dist/types/components/ui/layout/DetailViewLayout/DetailViewLayout.d.ts +12 -0
  306. package/dist/types/components/ui/layout/EndStateLayout/EndStateLayout.d.ts +13 -0
  307. package/dist/types/components/ui/layout/LandingLayout/LandingLayout.d.ts +8 -3
  308. package/dist/types/components/ui/layout/StackLayout/StackLayout.d.ts +2 -1
  309. package/dist/types/components/ui/molecules/DocumentGuidance/DocumentGuidance.types.d.ts +2 -3
  310. package/dist/types/components/ui/molecules/InputCurrency/InputCurrency.d.ts +2 -1
  311. package/dist/types/components/ui/molecules/InputEmail/InputEmail.d.ts +2 -1
  312. package/dist/types/components/ui/molecules/InputGroup/InputGroup.d.ts +2 -1
  313. package/dist/types/components/ui/molecules/InputTelephone/InputTelephone.d.ts +2 -1
  314. package/dist/types/components/ui/molecules/InputText/InputText.d.ts +2 -0
  315. package/dist/types/components/ui/molecules/MaskedInput/MaskedInput.d.ts +0 -1
  316. package/dist/types/components/ui/molecules/Tabs/Tabs.d.ts +1 -1
  317. package/dist/types/context/StateContext/types.d.ts +1 -1
  318. package/dist/types/core/models/api/accountIdentification.d.ts +5 -4
  319. package/dist/types/core/models/api/contracts.d.ts +1 -1
  320. package/dist/types/core/models/api/get-scenarios.d.ts +11 -5
  321. package/dist/types/core/models/api/individual.d.ts +5 -10
  322. package/dist/types/core/models/api/legal-arrangement.d.ts +0 -8
  323. package/dist/types/core/models/api/organization.d.ts +4 -8
  324. package/dist/types/core/models/api/scriptLocalization.d.ts +9 -0
  325. package/dist/types/core/process-field-configurations.d.ts +14 -3
  326. package/dist/types/embeds/business-financing/AdyenBusinessFinancing.d.ts +1 -1
  327. package/dist/types/embeds/business-financing/adyen-business-financing.types.d.ts +1 -5
  328. package/dist/types/embeds/emitEvent.d.ts +14 -0
  329. package/dist/types/embeds/{individual → individual-configuration}/AdyenIndividual.d.ts +4 -4
  330. package/dist/types/embeds/{individual/adyen-individual.types.d.ts → individual-configuration/adyen-individual-configuration.types.d.ts} +7 -7
  331. package/dist/types/embeds/{manage-individual → individual-status}/AdyenManageIndividual.d.ts +5 -5
  332. package/dist/types/embeds/{manage-individual/adyen-manage-individual.types.d.ts → individual-status/adyen-individual-status.types.d.ts} +6 -6
  333. package/dist/types/embeds/{terms-of-service → terms-of-service-management}/AdyenTermsOfService.d.ts +4 -4
  334. package/dist/types/embeds/{terms-of-service/adyen-terms-of-service.types.d.ts → terms-of-service-management/adyen-terms-of-service-management.types.d.ts} +9 -8
  335. package/dist/types/embeds/{manage-terms-of-service → terms-of-service-status}/AdyenManageTermsOfService.d.ts +5 -5
  336. package/dist/types/embeds/{manage-terms-of-service/adyen-manage-terms-of-service.types.d.ts → terms-of-service-status/adyen-terms-of-service-status.types.d.ts} +6 -6
  337. package/dist/types/embeds/{transfer-instrument → transfer-instrument-configuration}/AdyenTransferInstrument.d.ts +4 -4
  338. package/dist/types/embeds/{transfer-instrument/adyen-transfer-instrument.types.d.ts → transfer-instrument-configuration/adyen-transfer-instrument-configuration.types.d.ts} +7 -7
  339. package/dist/types/embeds/{manage-transfer-instruments → transfer-instrument-management}/AdyenManageTransferInstrument.d.ts +7 -8
  340. package/dist/types/embeds/{manage-transfer-instruments/adyen-manage-transfer-instruments.types.d.ts → transfer-instrument-management/adyen-transfer-instrument-management.types.d.ts} +8 -9
  341. package/dist/types/embeds/verification-status/adyen-verification-status.types.d.ts +3 -3
  342. package/dist/types/hooks/introduction/useIntroductionScreens.d.ts +2 -1
  343. package/dist/types/hooks/introduction/useShouldShowIntroduction.d.ts +2 -1
  344. package/dist/types/hooks/useMultiForm/types.d.ts +4 -4
  345. package/dist/types/language/utils.d.ts +1 -1
  346. package/dist/types/types/localizedScriptSchema.d.ts +22 -0
  347. package/dist/types/utils/addLinkedFields.d.ts +7 -1
  348. package/dist/types/utils/entityStatusUtil.d.ts +1 -1
  349. package/dist/types/utils/formUtils.d.ts +1 -1
  350. package/dist/types/utils/getDisplayErrorMessage.d.ts +1 -1
  351. package/dist/types/utils/getName.d.ts +2 -1
  352. package/dist/types/utils/makeSelectItemForRole.d.ts +1 -1
  353. package/dist/types/utils/mapScriptLocalization.d.ts +55 -0
  354. package/dist/types/utils/masking/masks/businessRegistrationNumberMasks.d.ts +5 -0
  355. package/dist/types/utils/translation.d.ts +6 -0
  356. package/dist/types-CAznNNSI.js +160 -0
  357. package/dist/types-Cj8YOGeo.js +64 -0
  358. package/dist/types-DW8AoV0s.js +74 -0
  359. package/dist/useAssociatedLegalEntity-DpMCDRB2.js +33 -0
  360. package/dist/useDataset-DgGo4v2J.js +120 -0
  361. package/dist/useForm-C66YXYZG.js +1694 -0
  362. package/dist/useFormContext-beqGS11A.js +23 -0
  363. package/dist/useGlobalData-CLK6kHPg.js +205 -0
  364. package/dist/{useMultiForm-CuBrV4Tk.js → useMultiForm-C2Py7qyc.js} +8 -3
  365. package/dist/{useOnboardingStatus-DUB9BH7M.js → useOnboardingStatus-CAefy-E-.js} +2 -2
  366. package/dist/useScenarios-B9C3euGm.js +46 -0
  367. package/dist/{useTermsOfServiceStatus-BblV2n-A.js → useTermsOfServiceStatus-BoQcnXHY.js} +2 -2
  368. package/dist/useToastContext-DGtAfUak.js +51 -0
  369. package/dist/useUnincorporatedPartnershipMembers-DWYujkfV.js +99 -0
  370. package/dist/utils-398Z4KKf.js +29 -0
  371. package/dist/utils-DNSfZiio.js +70 -0
  372. package/dist/utils-DgGLUM4O.js +159 -0
  373. package/dist/{utils-CoNP20Mi.js → utils-DxvZeEUH.js} +46 -4
  374. package/dist/{validate-BPEF-9EC.js → validate--KA-U0Fs.js} +2 -2
  375. package/dist/validate-BrsSh5ej.js +382 -0
  376. package/dist/validate-ZwWxhap7.js +605 -0
  377. package/dist/validationError-DeiIFLRV.js +86 -0
  378. package/package.json +67 -70
  379. package/dist/BusinessDetailsDropin-JZ29P1pI.js +0 -2163
  380. package/dist/BusinessFinancingComponent-AAD0wzc0.js +0 -38
  381. package/dist/BusinessFinancingPage-DWvnRK3f.js +0 -35
  382. package/dist/CreateIndividualComponent-CO0NnimV.js +0 -64
  383. package/dist/CreateTransferInstrumentComponent-CpUB63yl.js +0 -55
  384. package/dist/DecisionMakerDetailsPage-DBsCSIAU.js +0 -80
  385. package/dist/FormEndState-s8NUp0x5.js +0 -59
  386. package/dist/LegalRepresentativeDetailsPage-Beh9_16w.js +0 -55
  387. package/dist/ManageIndividualComponent-C5ll1EKq.js +0 -42
  388. package/dist/ManageTermsOfServiceComponent-BYgWiamd.js +0 -40
  389. package/dist/RootIndividualDetailsPage-Bi7xeUYJ.js +0 -71
  390. package/dist/SignPCIComponent-Dgnvmjbr.js +0 -279
  391. package/dist/SoleProprietorshipPage-DMYrwSK2.js +0 -44
  392. package/dist/StoreProvider-QThALSrj.js +0 -31918
  393. package/dist/TrustMemberCompanyPage-DKNQ_vHF.js +0 -54
  394. package/dist/TrustMemberIndividualPage-CFo3Is4F.js +0 -60
  395. package/dist/UnincorporatedPartnershipIndividualPage-CfllAxUK.js +0 -60
  396. package/dist/UnincorporatedPartnershipMemberCompanyPage-779IUOW2.js +0 -57
  397. package/dist/VerificationErrorAlert-BtsLa_Ty.js +0 -77
  398. package/dist/adyen-a-filled-czhSM_bc.js +0 -14
  399. package/dist/adyen-individual.js +0 -50
  400. package/dist/adyen-manage-individual.js +0 -48
  401. package/dist/adyen-manage-terms-of-service.js +0 -48
  402. package/dist/adyen-manage-transfer-instruments.js +0 -63
  403. package/dist/adyen-terms-of-service.js +0 -60
  404. package/dist/adyen-transfer-instrument.js +0 -64
  405. package/dist/arrow-left-Dtc2gya1.js +0 -14
  406. package/dist/bg-BG-BvSUDgGF.js +0 -13
  407. package/dist/cs-CZ-y4mvq4Lv.js +0 -13
  408. package/dist/da-DK-qgQOVjDp.js +0 -13
  409. package/dist/de-DE-pSdsxBpQ.js +0 -13
  410. package/dist/document-plus-NwgAdjyB.js +0 -17
  411. package/dist/el-GR-Bvjk5Sw8.js +0 -13
  412. package/dist/en-US-Bq2Twy6x.js +0 -54
  413. package/dist/es-ES-Dy1uR2H_.js +0 -13
  414. package/dist/et-EE-d9V24rcf.js +0 -13
  415. package/dist/fi-FI-B0fnAFV2.js +0 -13
  416. package/dist/fr-FR-BoKzVp2q.js +0 -13
  417. package/dist/getFieldsWithExistingData-CUMH8N-C.js +0 -22
  418. package/dist/hide-CigAXbWC.js +0 -18
  419. package/dist/hr-HR-CF0AHQzi.js +0 -13
  420. package/dist/hu-HU-CSPhOvLC.js +0 -13
  421. package/dist/idea-DwJIwJHR.js +0 -18
  422. package/dist/instant-verification-method-BGfknV9x.js +0 -28
  423. package/dist/it-IT-BH-eqIKH.js +0 -13
  424. package/dist/ja-JP-B3yqM_FM.js +0 -13
  425. package/dist/lt-LT-Lzl_Cbw-.js +0 -13
  426. package/dist/lv-LV-y00wN1pj.js +0 -13
  427. package/dist/mapFinancialReportsToFinancialInformation-Bo2uW3j7.js +0 -66
  428. package/dist/nl-NL-DmnFXAQC.js +0 -13
  429. package/dist/no-NO-DbvFfP96.js +0 -13
  430. package/dist/pl-PL--mmxopYA.js +0 -13
  431. package/dist/plus-small-Dj1WRyFM.js +0 -14
  432. package/dist/pt-PT-BVzXBFp7.js +0 -13
  433. package/dist/ro-RO-Cdmevo9A.js +0 -13
  434. package/dist/ru-RU-FZb2upqh.js +0 -13
  435. package/dist/sk-SK-nfeuTcY5.js +0 -13
  436. package/dist/sl-SI-DUTZDqkP.js +0 -13
  437. package/dist/sv-SE-BTx2XKAp.js +0 -13
  438. package/dist/types/components/Individual/mapping/mapLocalization.d.ts +0 -3
  439. package/dist/types/components/ui/atoms/OutlinedIcon/OutlinedIcon.d.ts +0 -5
  440. package/dist/types/components/ui/atoms/ProviderButton/ProviderButton.d.ts +0 -3
  441. package/dist/types/components/ui/atoms/ProviderButton/ProviderButton.types.d.ts +0 -5
  442. package/dist/types/components/ui/molecules/FormEndState/FormEndState.d.ts +0 -2
  443. package/dist/types/components/ui/molecules/FormEndState/types.d.ts +0 -8
  444. package/dist/useUpdateLegalEntity-56mDjaQA.js +0 -57
  445. package/dist/validate-Bgc1XuQl.js +0 -40
  446. package/dist/zh-CN-wUb4MmTZ.js +0 -13
  447. package/dist/zh-TW-DNTXHLKa.js +0 -13
  448. /package/dist/types/embeds/{individual/adyen-individual.d.ts → individual-configuration/adyen-individual-configuration.d.ts} +0 -0
  449. /package/dist/types/embeds/{manage-individual/adyen-manage-individual.d.ts → individual-status/adyen-individual-status.d.ts} +0 -0
  450. /package/dist/types/embeds/{manage-terms-of-service/adyen-manage-terms-of-service.d.ts → terms-of-service-management/adyen-terms-of-service-management.d.ts} +0 -0
  451. /package/dist/types/embeds/{manage-transfer-instruments/adyen-manage-transfer-instruments.d.ts → terms-of-service-status/adyen-terms-of-service-status.d.ts} +0 -0
  452. /package/dist/types/embeds/{terms-of-service/adyen-terms-of-service.d.ts → transfer-instrument-configuration/adyen-transfer-instrument-configuration.d.ts} +0 -0
  453. /package/dist/types/embeds/{transfer-instrument/adyen-transfer-instrument.d.ts → transfer-instrument-management/adyen-transfer-instrument-management.d.ts} +0 -0
@@ -1,2163 +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] = "1a3b023c-3908-44e4-985c-207da904ebf9", e._sentryDebugIdIdentifier = "sentry-dbid-1a3b023c-3908-44e4-985c-207da904ebf9");
6
- } catch (e) {
7
- }
8
- }
9
- ;
10
- import { jsx, jsxs, Fragment } from "preact/jsx-runtime";
11
- import { u as useI18nContext, dw as MemoizedDocumentUpload, G as Button, bc as Modal, be as ModalContent, N as Typography, as as CountryCodes, Y as CompanyTypesValues, e_ as useGlobalData, eQ as getForms, $ as TaskTypes, e$ as BasicInformation, dq as getFormProps, f0 as CompanyStructure, f1 as AdditionalInformation, eK as MemoizedConstitutionalDocument, O as LegalEntityTypes, eJ as FinancialInformation, cg as getDocument, ch as mapExistingFile, ci as getPageName, bA as formatObject, bm as entriesOf, b8 as businessDetailsComponentsKeyMapping, f2 as solePropBusinessDetailsKeyMapping, f3 as getDefaultRegistrationNumberType, f4 as getDefaultVatNumberType, b3 as objectsDeepEqual, dY as operationalAddressIsSameIds, eM as COUNTRIES_USING_COMPANY_SEARCH, f5 as FIELDS_NEEDED_FOR_COMPANY_SEARCH, dg as keysOf, i as isUndefinedOrNull, dJ as isDateOlderThanAYear, aN as summaryItem, f6 as solePropBusinessDetailsApiKeyMapping, eZ as businessDetailsApiKeyMapping, f7 as isRegistrationNumberAbsentStateV4Scenario, dh as isEmpty, f8 as COUNTRIES_THAT_USE_TAX_ID_INSTEAD_OF_VAT, cl as createDocumentRequest, ba as datasetUtilities, cG as mapAddressLabels, eI as companyTypeMetadata, a0 as createLogger, cF as filterOutUnwantedAssociationsIfRootLE, bU as isValidationError, bV as processValidationErrors, bW as isMaintenanceModeError, f9 as getProp, at as isEmpty$1, fa as documentFormsIds, av as resolveFieldMetadata, e6 as registrationNumberDefaultFieldMetadata, fb as inferCompanyRegistrationNumberType, fc as getCompanyRegistrationNumberOptions, e7 as registrationNumberDefaultFieldConfig, cb as taxInformationDefaultFieldMetadata, fd as countryToTaxInfoTypeMap, cc as taxInformationDefaultFieldConfig, fe as getKeyForField, co as drop, ao as getOwnEntityAssociations, cP as doArraysMatch, cL as getFileExtention, X as useAccountHolder, a9 as useToastContext, a3 as useAnalyticsContext, aa as useExperimentsContext, v as useSettingsContext, a as useApiContext, dT as verifiedBusiness, br as useQueryClient, ff as useStateContext, w as SettingNames, fg as setIsBankAccountRequestedForOrganization, bP as getAssociatedLeAnalyticsPayload, bb as getCapabilityProblems, cp as documentApiUtils, cD as composePerScenarioFormConfigurations, cx as useScenarioConfiguration, eU as rules, cy as getPropsFromConfigurations, eV as useCompanySearch, fh as useCompanySelection, eW as useVerifyTin, bQ as getRequiredForms, bR as addValidityToForms, fi as useClearCompanyData, bS as useFormComposer, fj as setVerifiedBusiness, fk as FormWrapper, bi as Confirm, fl as solePropBusinessDetailsDocumentMapping, eY as businessDetailsDocumentMapping } from "./StoreProvider-QThALSrj.js";
12
- import { useState, useEffect, useRef, useMemo, useCallback } from "preact/hooks";
13
- import { u as useCreateLegalEntity, a as useUpdateLegalEntity } from "./useUpdateLegalEntity-56mDjaQA.js";
14
- import { h as hasDataChanged } from "./hasDataChanged-CTE9vdfO.js";
15
- import { o as organizationTypesToSkipCompanyStructureForm } from "./utils-CoNP20Mi.js";
16
- import { g as getFieldsWithExistingData } from "./getFieldsWithExistingData-CUMH8N-C.js";
17
- import cx from "classnames";
18
- import { m as mapFinancialReportsToFinancialInformation, a as mapFinancialInformationToFinancialReport } from "./mapFinancialReportsToFinancialInformation-Bo2uW3j7.js";
19
- import { f as formatCurrency } from "./formatCurrency-CMOSdJMB.js";
20
- const stripWhitespace = (str) => str.replace(/\s/g, "");
21
- const toNormalizedString = (s) => stripWhitespace(s.toLowerCase());
22
- const isNormalizedStringMatch = (s1, s2) => toNormalizedString(s1) === toNormalizedString(s2);
23
- const documentTypes$2 = [
24
- { id: "Internal company document", name: "internalCompanyDocument" },
25
- { id: "Business registry statement", name: "businessRegistryStatement" }
26
- ];
27
- const GuidanceContent$4 = () => {
28
- const { i18n } = useI18nContext();
29
- return /* @__PURE__ */ jsx("div", { className: "adyen-kyc-upload-field__guidance", children: /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-u-margin-bottom-24", children: [
30
- /* @__PURE__ */ jsx("strong", { children: i18n.get("documentRequirements") }),
31
- /* @__PURE__ */ jsxs("ul", { children: [
32
- /* @__PURE__ */ jsx("li", { children: i18n.get("includesTheDirectorsFullName") }),
33
- /* @__PURE__ */ jsx("li", { children: i18n.get("includesEvidenceOfTheIndividualsRole") }),
34
- /* @__PURE__ */ jsx("li", { children: i18n.get("issuedOrSignedByALegalRepresentative") })
35
- ] })
36
- ] }) });
37
- };
38
- function ProofOfDirectorDocument({
39
- id,
40
- country,
41
- heading = "uploadYourOrganizationProofOfDirector",
42
- description = "weNeedAnOfficialDocument",
43
- ...props
44
- }) {
45
- const { i18n } = useI18nContext();
46
- const [selectedDocumentName, setSelectedDocumentName] = useState(documentTypes$2[0].id);
47
- return /* @__PURE__ */ jsx(
48
- MemoizedDocumentUpload,
49
- {
50
- ...props,
51
- id,
52
- heading: i18n.get(heading),
53
- description: i18n.get(description),
54
- documentField: "proofOfDirector",
55
- documentType: "proofOfDirector",
56
- guidanceContent: /* @__PURE__ */ jsx(GuidanceContent$4, {}),
57
- country,
58
- hidePageCount: true,
59
- documentTypeSelect: {
60
- selectedType: selectedDocumentName,
61
- setSelectedType: setSelectedDocumentName,
62
- options: documentTypes$2
63
- }
64
- }
65
- );
66
- }
67
- const DOC_TYPE_FOR_MULTI_UPLOAD = "Organizational chart and supporting document";
68
- const documentTypes$1 = [
69
- { id: "Certified Organizational chart", name: "certifiedOrganizationalChart" },
70
- {
71
- id: "Organizational chart and supporting document",
72
- name: "organizationalChartAndSupportingDocument"
73
- }
74
- ];
75
- const GuidanceContent$3 = ({ selectedDocumentName }) => {
76
- const { i18n } = useI18nContext();
77
- const [showGuidanceModal, setShowGuidanceModal] = useState(false);
78
- return /* @__PURE__ */ jsx("div", { className: "adyen-kyc-upload-field__guidance", children: /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-u-margin-bottom-24", children: [
79
- /* @__PURE__ */ jsx("strong", { children: i18n.get("documentRequirements") }),
80
- selectedDocumentName === "Certified Organizational chart" ? /* @__PURE__ */ jsxs("ul", { children: [
81
- /* @__PURE__ */ jsx("li", { children: i18n.get("showsOwnershipAndControllingRelations") }),
82
- /* @__PURE__ */ jsx("li", { children: i18n.get("entitiesMustIncludeANameLegalStructureAndCountryRegionOfRegistration") }),
83
- /* @__PURE__ */ jsx("li", { children: i18n.get("signedByALawyerAccountantAuditorWithinTheLast6Months") })
84
- ] }) : /* @__PURE__ */ jsxs("ul", { children: [
85
- /* @__PURE__ */ jsx("li", { children: i18n.get("oneOrganizationalChartShowingOwnershipAndControllingRelations") }),
86
- /* @__PURE__ */ jsxs("ul", { children: [
87
- /* @__PURE__ */ jsx("li", { children: i18n.get("entitiesMustIncludeANameLegalStructureAndCountryRegionOfRegistration") }),
88
- /* @__PURE__ */ jsxs("li", { children: [
89
- /* @__PURE__ */ jsxs("span", { children: [
90
- i18n.get("one"),
91
- " "
92
- ] }),
93
- /* @__PURE__ */ jsx(Button, { onClick: () => setShowGuidanceModal(true), variant: "link", children: i18n.get("supportingDocument") }),
94
- /* @__PURE__ */ jsxs("span", { children: [
95
- " ",
96
- i18n.get("describingTheOrganizationAndItsUBOSignedWithinTheLast6Months")
97
- ] })
98
- ] })
99
- ] })
100
- ] }),
101
- showGuidanceModal && /* @__PURE__ */ jsx(
102
- Modal,
103
- {
104
- size: "small",
105
- onClose: () => setShowGuidanceModal(false),
106
- ariaLabel: i18n.get("whichDocumentsQualifyToProveOwnership"),
107
- children: /* @__PURE__ */ jsxs(ModalContent, { children: [
108
- /* @__PURE__ */ jsx(
109
- Typography,
110
- {
111
- el: "h1",
112
- variant: "title-l",
113
- className: "adyen-kyc-u-margin-bottom-32 adyen-kyc-u-margin-top-32",
114
- children: i18n.get("whichDocumentsQualifyToProveOwnership")
115
- }
116
- ),
117
- /* @__PURE__ */ jsx(Typography, { el: "p", variant: "body", children: i18n.get("theDocumentsWeCanAcceptToProveOwnershipAre") }),
118
- /* @__PURE__ */ jsxs("ul", { children: [
119
- /* @__PURE__ */ jsx("li", { children: i18n.get("securitiesRegister") }),
120
- /* @__PURE__ */ jsx("li", { children: i18n.get("shareholderRegister") }),
121
- /* @__PURE__ */ jsx("li", { children: i18n.get("ultimateBeneficialOwnerRegister") }),
122
- /* @__PURE__ */ jsx("li", { children: i18n.get("articlesOfIncorporation") }),
123
- /* @__PURE__ */ jsx("li", { children: i18n.get("annualReports") }),
124
- /* @__PURE__ */ jsx("li", { children: i18n.get("annualReturns") }),
125
- /* @__PURE__ */ jsx("li", { children: i18n.get("certificateOfCorporateStatus") }),
126
- /* @__PURE__ */ jsx("li", { children: i18n.get("shareholderAgreements") }),
127
- /* @__PURE__ */ jsx("li", { children: i18n.get("assignmentAgreements") }),
128
- /* @__PURE__ */ jsx("li", { children: i18n.get("partnershipAgreements") }),
129
- /* @__PURE__ */ jsx("li", { children: i18n.get("boardOfDirectorsMeetingRecords") }),
130
- /* @__PURE__ */ jsx("li", { children: i18n.get("registrationDocument") }),
131
- /* @__PURE__ */ jsx("li", { children: i18n.get("certificateOfIncumbency") })
132
- ] })
133
- ] })
134
- }
135
- )
136
- ] }) });
137
- };
138
- function ProofOfOwnershipDocument({
139
- id,
140
- country,
141
- heading = "uploadYourOrganizationProofOfOwnership",
142
- description = "weNeedAnOfficialDocumentForOwnership",
143
- ...props
144
- }) {
145
- const { i18n } = useI18nContext();
146
- const [selectedDocumentName, setSelectedDocumentName] = useState(documentTypes$1[0].id);
147
- const supportsMultiple = selectedDocumentName === DOC_TYPE_FOR_MULTI_UPLOAD;
148
- useEffect(() => {
149
- if (props.data?.proofOfOwnership?.length === 2) {
150
- setSelectedDocumentName(DOC_TYPE_FOR_MULTI_UPLOAD);
151
- }
152
- }, [props.data?.proofOfOwnership]);
153
- return /* @__PURE__ */ jsx(
154
- MemoizedDocumentUpload,
155
- {
156
- ...props,
157
- id,
158
- heading: i18n.get(heading),
159
- description: i18n.get(description),
160
- documentField: "proofOfOwnership",
161
- documentType: "proofOfOwnership",
162
- guidanceContent: /* @__PURE__ */ jsx(GuidanceContent$3, { selectedDocumentName }),
163
- country,
164
- label: i18n.get("uploadYourDocuments"),
165
- documentTypeSelect: {
166
- selectedType: selectedDocumentName,
167
- setSelectedType: setSelectedDocumentName,
168
- options: documentTypes$1
169
- },
170
- hidePageCount: true,
171
- supportsMultipleUploads: supportsMultiple,
172
- maxNumberOfFiles: supportsMultiple ? 2 : 1,
173
- extraDropzoneDescription: supportsMultiple ? i18n.get("oneOrganizationalChartAndOneSupportingDocument") : void 0
174
- }
175
- );
176
- }
177
- const documentTypes = [
178
- { id: "Trade registry document", name: "tradeRegistryDocument" },
179
- { id: "Internal company document", name: "internalCompanyDocument" }
180
- ];
181
- const GuidanceContent$2 = () => {
182
- const { i18n } = useI18nContext();
183
- return /* @__PURE__ */ jsx("div", { className: "adyen-kyc-upload-field__guidance", children: /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-u-margin-bottom-24", children: [
184
- /* @__PURE__ */ jsx("strong", { children: i18n.get("documentRequirements") }),
185
- /* @__PURE__ */ jsxs("ul", { children: [
186
- /* @__PURE__ */ jsx("li", { children: i18n.get("includesTheSignatorysFullName") }),
187
- /* @__PURE__ */ jsx("li", { children: i18n.get("includesEvidenceOfTheIndividualsRoleSignatory") }),
188
- /* @__PURE__ */ jsx("li", { children: i18n.get("issuedOrSignedByALegalRepresentative") })
189
- ] })
190
- ] }) });
191
- };
192
- function ProofOfSignatoryDocument({
193
- id,
194
- country,
195
- heading = "uploadYourOrganizationProofOfSignatory",
196
- description = "weNeedAnOfficialDocumentSignatory",
197
- ...props
198
- }) {
199
- const { i18n } = useI18nContext();
200
- const [selectedDocumentName, setSelectedDocumentName] = useState(documentTypes[0].id);
201
- return /* @__PURE__ */ jsx(
202
- MemoizedDocumentUpload,
203
- {
204
- ...props,
205
- id,
206
- heading: i18n.get(heading),
207
- description: i18n.get(description),
208
- documentField: "proofOfSignatory",
209
- documentType: "proofOfSignatory",
210
- guidanceContent: /* @__PURE__ */ jsx(GuidanceContent$2, {}),
211
- country,
212
- hidePageCount: true,
213
- documentTypeSelect: {
214
- selectedType: selectedDocumentName,
215
- setSelectedType: setSelectedDocumentName,
216
- options: documentTypes
217
- }
218
- }
219
- );
220
- }
221
- const ACCEPTED_DOCUMENTS_MAP$1 = {
222
- [CountryCodes.PuertoRico]: {
223
- // should exactly match CountryCodes.UnitedStates
224
- [CompanyTypesValues.PRIVATE_COMPANY]: {
225
- header: "acceptedDocumentsForPrivateCompanies",
226
- documents: [
227
- "certificateOfIncorporation",
228
- "certificateOfFormation",
229
- "secretaryOfStateFiling__PR"
230
- ]
231
- },
232
- [CompanyTypesValues.PUBLIC_COMPANY]: {
233
- header: "acceptedDocumentsForPublicCompanies",
234
- documents: ["certificateOfIncorporation", "certificateOfFormation"]
235
- },
236
- [CompanyTypesValues.UNLISTED_PUBLIC_COMPANY]: {
237
- header: "acceptedDocumentsForPublicCompanies",
238
- documents: ["certificateOfIncorporation", "certificateOfFormation"]
239
- },
240
- [CompanyTypesValues.GOVERNMENTAL_ORGANIZATION]: {
241
- header: "acceptedDocumentsForGovernment",
242
- documents: ["charter"]
243
- },
244
- [CompanyTypesValues.NON_PROFIT_OR_CHARITABLE]: {
245
- header: "acceptedDocumentsForNonProfit",
246
- documents: [
247
- "articlesOfIncorporation",
248
- "meetingRecords",
249
- "secretaryOfStateRegDoc__PR",
250
- "certificateOfIncumbency"
251
- ]
252
- },
253
- [CompanyTypesValues.INCORPORATED_PARTNERSHIP]: {
254
- header: "acceptedDocumentsForPartnerships",
255
- documents: ["partnerShipAgreement", "secretaryOfStateFiling__PR"]
256
- }
257
- },
258
- [CountryCodes.UnitedStates]: {
259
- [CompanyTypesValues.PRIVATE_COMPANY]: {
260
- header: "acceptedDocumentsForPrivateCompanies",
261
- documents: ["certificateOfIncorporation", "certificateOfFormation", "secretaryOfStateFiling"]
262
- },
263
- [CompanyTypesValues.PUBLIC_COMPANY]: {
264
- header: "acceptedDocumentsForPublicCompanies",
265
- documents: ["certificateOfIncorporation", "certificateOfFormation"]
266
- },
267
- [CompanyTypesValues.UNLISTED_PUBLIC_COMPANY]: {
268
- header: "acceptedDocumentsForPublicCompanies",
269
- documents: ["certificateOfIncorporation", "certificateOfFormation"]
270
- },
271
- [CompanyTypesValues.GOVERNMENTAL_ORGANIZATION]: {
272
- header: "acceptedDocumentsForGovernment",
273
- documents: ["charter"]
274
- },
275
- [CompanyTypesValues.NON_PROFIT_OR_CHARITABLE]: {
276
- header: "acceptedDocumentsForNonProfit",
277
- documents: [
278
- "articlesOfIncorporation",
279
- "meetingRecords",
280
- "secretaryOfStateRegDoc",
281
- "certificateOfIncumbency"
282
- ]
283
- },
284
- [CompanyTypesValues.INCORPORATED_PARTNERSHIP]: {
285
- header: "acceptedDocumentsForPartnerships",
286
- documents: ["partnerShipAgreement", "secretaryOfStateFiling"]
287
- }
288
- }
289
- };
290
- const GuidanceContent$1 = ({
291
- country,
292
- companyType
293
- }) => {
294
- const { i18n } = useI18nContext();
295
- const acceptedDocGuidance = ACCEPTED_DOCUMENTS_MAP$1[country]?.[companyType];
296
- return /* @__PURE__ */ jsx("div", { className: "adyen-kyc-upload-field__guidance", children: country === "US" ? /* @__PURE__ */ jsxs(Fragment, { children: [
297
- acceptedDocGuidance && /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-u-margin-bottom-24", children: [
298
- /* @__PURE__ */ jsx("strong", { children: i18n.get(acceptedDocGuidance.header) }),
299
- /* @__PURE__ */ jsx("ul", { children: acceptedDocGuidance.documents.map((document, i) => /* @__PURE__ */ jsx("li", { children: i18n.get(document) }, i)) })
300
- ] }),
301
- /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-u-margin-bottom-24", children: [
302
- /* @__PURE__ */ jsx("strong", { children: i18n.get("documentRequirements") }),
303
- /* @__PURE__ */ jsx("ul", { children: /* @__PURE__ */ jsx("li", { children: i18n.get("includesLegalCompanyName") }) })
304
- ] })
305
- ] }) : /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-u-margin-bottom-24", children: [
306
- /* @__PURE__ */ jsxs("strong", { children: [
307
- " ",
308
- i18n.get("documentRequirements")
309
- ] }),
310
- /* @__PURE__ */ jsx("ul", { children: /* @__PURE__ */ jsx("li", { children: i18n.get("documentIssuedByGovernmentAuthority") }) })
311
- ] }) });
312
- };
313
- function RegistrationDocument({
314
- id,
315
- country,
316
- companyType = CompanyTypesValues.PRIVATE_COMPANY,
317
- heading = "companyRegistrationDocumentFormHeading",
318
- description = "companyRegistrationDocumentFormDescription",
319
- ...props
320
- }) {
321
- const { i18n } = useI18nContext();
322
- return /* @__PURE__ */ jsx(
323
- MemoizedDocumentUpload,
324
- {
325
- ...props,
326
- id,
327
- heading: i18n.get(heading),
328
- description: i18n.get(description),
329
- documentField: "registrationDocument",
330
- documentType: "registrationDocument",
331
- guidanceContent: /* @__PURE__ */ jsx(GuidanceContent$1, { country, companyType }),
332
- companyType,
333
- country,
334
- hidePageCount: true
335
- }
336
- );
337
- }
338
- const ACCEPTED_DOCUMENTS_MAP = {
339
- [CountryCodes.PuertoRico]: {
340
- // should exactly match CountryCodes.UnitedStates
341
- [CompanyTypesValues.PRIVATE_COMPANY]: {
342
- header: "acceptedDocumentsForPrivateCompanies",
343
- documents: ["irsCP575"]
344
- },
345
- [CompanyTypesValues.PUBLIC_COMPANY]: {
346
- header: "acceptedDocumentsForPublicCompanies",
347
- documents: ["annualReport", "secForm10k"]
348
- },
349
- [CompanyTypesValues.UNLISTED_PUBLIC_COMPANY]: {
350
- header: "acceptedDocumentsForPublicCompanies",
351
- documents: ["annualReport", "secForm10k"]
352
- },
353
- [CompanyTypesValues.NON_PROFIT_OR_CHARITABLE]: {
354
- header: "acceptedDocumentsForNonProfit",
355
- documents: ["annualReport"]
356
- },
357
- [CompanyTypesValues.INCORPORATED_PARTNERSHIP]: {
358
- header: "acceptedDocumentsForPartnerships",
359
- documents: ["irsScheduleK1"]
360
- }
361
- },
362
- [CountryCodes.UnitedStates]: {
363
- [CompanyTypesValues.PRIVATE_COMPANY]: {
364
- header: "acceptedDocumentsForPrivateCompanies",
365
- documents: ["irsCP575"]
366
- },
367
- [CompanyTypesValues.PUBLIC_COMPANY]: {
368
- header: "acceptedDocumentsForPublicCompanies",
369
- documents: ["annualReport", "secForm10k"]
370
- },
371
- [CompanyTypesValues.UNLISTED_PUBLIC_COMPANY]: {
372
- header: "acceptedDocumentsForPublicCompanies",
373
- documents: ["annualReport", "secForm10k"]
374
- },
375
- [CompanyTypesValues.NON_PROFIT_OR_CHARITABLE]: {
376
- header: "acceptedDocumentsForNonProfit",
377
- documents: ["annualReport"]
378
- },
379
- [CompanyTypesValues.INCORPORATED_PARTNERSHIP]: {
380
- header: "acceptedDocumentsForPartnerships",
381
- documents: ["irsScheduleK1"]
382
- }
383
- }
384
- };
385
- const GuidanceContent = ({
386
- country,
387
- companyType
388
- }) => {
389
- const { i18n } = useI18nContext();
390
- const acceptedDocGuidance = ACCEPTED_DOCUMENTS_MAP[country]?.[companyType];
391
- return /* @__PURE__ */ jsx("div", { className: "adyen-kyc-upload-field__guidance", children: country === "US" ? /* @__PURE__ */ jsxs(Fragment, { children: [
392
- acceptedDocGuidance && /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-u-margin-bottom-24", children: [
393
- /* @__PURE__ */ jsx("strong", { children: i18n.get(acceptedDocGuidance.header) }),
394
- /* @__PURE__ */ jsx("ul", { children: acceptedDocGuidance.documents.map((document, i) => /* @__PURE__ */ jsx("li", { children: i18n.get(document) }, i)) })
395
- ] }),
396
- /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-u-margin-bottom-24", children: [
397
- /* @__PURE__ */ jsx("strong", { children: i18n.get("documentRequirements") }),
398
- /* @__PURE__ */ jsxs("ul", { children: [
399
- /* @__PURE__ */ jsx("li", { children: i18n.get("includesLegalCompanyName") }),
400
- /* @__PURE__ */ jsx("li", { children: i18n.get("includesEIN") })
401
- ] })
402
- ] })
403
- ] }) : /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-u-margin-bottom-24", children: [
404
- /* @__PURE__ */ jsx("div", { className: "adyen-kyc-upload-field__subtitle", children: i18n.get("documentRequirements") }),
405
- /* @__PURE__ */ jsxs("ul", { children: [
406
- /* @__PURE__ */ jsx("li", { children: i18n.get("containsNameOfCompany") }),
407
- /* @__PURE__ */ jsx("li", { children: i18n.get("documentShowsTaxIdOfCompany") }),
408
- /* @__PURE__ */ jsx("li", { children: i18n.get("issuedByTheTaxAuthority") })
409
- ] })
410
- ] }) });
411
- };
412
- function TaxDocument({
413
- id,
414
- country,
415
- companyType = CompanyTypesValues.PRIVATE_COMPANY,
416
- heading = "companyTaxDocumentFormHeading",
417
- description = "companyTaxDocumentFormDescription",
418
- ...props
419
- }) {
420
- const { i18n } = useI18nContext();
421
- return /* @__PURE__ */ jsx(
422
- MemoizedDocumentUpload,
423
- {
424
- ...props,
425
- id,
426
- heading: i18n.get(heading),
427
- description: i18n.get(description),
428
- documentField: "taxDocument",
429
- documentType: "proofOfOrganizationTaxInfo",
430
- guidanceContent: /* @__PURE__ */ jsx(GuidanceContent, { country, companyType }),
431
- companyType,
432
- country,
433
- hidePageCount: true
434
- }
435
- );
436
- }
437
- function BusinessDetails(props) {
438
- const { i18n } = useI18nContext();
439
- const { companyStructure } = useGlobalData();
440
- const {
441
- country,
442
- isTopLevelEntity,
443
- activeForm,
444
- showCompanyStructure,
445
- showBusinessSelection,
446
- setShowBusinessSelection,
447
- setShowCompanyStructure,
448
- loading,
449
- searchResults,
450
- taskType,
451
- handleNextClick,
452
- proceedToManualDataEntry
453
- } = props;
454
- const forms = getForms(country);
455
- const formWrapperClasses = (formId) => activeForm?.formId !== formId ? "adyen-kyc-form-wrapper adyen-kyc-form-wrapper--hidden" : "adyen-kyc-form-wrapper";
456
- const classNames = cx("adyen-kyc-business-details", {
457
- "adyen-kyc-business-details--hide": activeForm?.formId === "summary"
458
- });
459
- const companyType = taskType === TaskTypes.SOLE_PROPRIETOR_COMPANY ? CompanyTypesValues.SOLE_PROPRIETORSHIP : companyStructure?.entityType;
460
- return /* @__PURE__ */ jsxs("div", { className: classNames, children: [
461
- /* @__PURE__ */ jsx("div", { className: formWrapperClasses(forms.basicInformation.formId), children: /* @__PURE__ */ jsx(
462
- BasicInformation,
463
- {
464
- ...getFormProps(props, forms.basicInformation.formId),
465
- id: forms.basicInformation.formId,
466
- heading: i18n.get(activeForm?.formHeading || forms.basicInformation.formHeading),
467
- description: activeForm?.formDescription ? i18n.get(activeForm?.formDescription) : void 0,
468
- country,
469
- companyType,
470
- isTopLevelEntity,
471
- showBusinessSelection,
472
- showCompanyStructure,
473
- isActiveForm: activeForm?.formId === forms.basicInformation.formId,
474
- loading,
475
- proceedToManualDataEntry,
476
- searchResults,
477
- setShowBusinessSelection,
478
- setShowCompanyStructure,
479
- handleNextClick,
480
- disableCountry: taskType === TaskTypes.SOLE_PROPRIETOR_COMPANY
481
- }
482
- ) }),
483
- /* @__PURE__ */ jsx("div", { className: formWrapperClasses(forms.companyStructure.formId), children: /* @__PURE__ */ jsx(
484
- CompanyStructure,
485
- {
486
- ...getFormProps(props, forms.companyStructure.formId),
487
- id: forms.companyStructure.formId,
488
- heading: i18n.get(activeForm?.formHeading ?? forms.companyStructure.formHeading),
489
- description: i18n.get(
490
- activeForm?.formDescription ?? forms.companyStructure.formDescription
491
- ),
492
- country,
493
- showCompanyStructure
494
- }
495
- ) }),
496
- /* @__PURE__ */ jsx("div", { className: formWrapperClasses(forms.additionalInformation.formId), children: /* @__PURE__ */ jsx(
497
- AdditionalInformation,
498
- {
499
- ...getFormProps(props, forms.additionalInformation.formId),
500
- id: forms.additionalInformation.formId,
501
- heading: i18n.get(activeForm?.formHeading ?? forms.additionalInformation.formHeading),
502
- country,
503
- companyType,
504
- showCompanyStructure
505
- }
506
- ) }),
507
- /* @__PURE__ */ jsx("div", { className: formWrapperClasses(forms.companyRegistrationDocument.formId), children: /* @__PURE__ */ jsx(
508
- RegistrationDocument,
509
- {
510
- ...getFormProps(props, forms.companyRegistrationDocument.formId),
511
- id: forms.companyRegistrationDocument.formId,
512
- heading: forms.companyRegistrationDocument.formHeading,
513
- description: forms.companyRegistrationDocument.formDescription,
514
- country,
515
- companyType
516
- }
517
- ) }),
518
- /* @__PURE__ */ jsx("div", { className: formWrapperClasses(forms.companyTaxDocument.formId), children: country === "US" ? /* @__PURE__ */ jsx(
519
- TaxDocument,
520
- {
521
- ...getFormProps(props, forms.companyTaxDocument.formId),
522
- id: forms.companyTaxDocument.formId,
523
- heading: forms.companyTaxDocument.formHeading,
524
- description: forms.companyTaxDocument.formDescription,
525
- country,
526
- companyType
527
- }
528
- ) : /* @__PURE__ */ jsx(
529
- MemoizedDocumentUpload,
530
- {
531
- ...getFormProps(props, forms.companyTaxDocument.formId),
532
- id: forms.companyTaxDocument.formId,
533
- heading: i18n.get(forms.companyTaxDocument.formHeading),
534
- description: i18n.get(forms.companyTaxDocument.formDescription),
535
- documentField: "taxDocument",
536
- documentType: "vatDocument",
537
- hidePageCount: true,
538
- guidanceContent: /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-u-margin-bottom-24", children: [
539
- /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-upload-field__subtitle", children: [
540
- " ",
541
- i18n.get("requirements")
542
- ] }),
543
- /* @__PURE__ */ jsxs("ul", { children: [
544
- /* @__PURE__ */ jsx("li", { children: i18n.get("containsNameOfCompany") }),
545
- /* @__PURE__ */ jsx("li", { children: i18n.get("documentShowsTaxIdOfCompany") }),
546
- /* @__PURE__ */ jsx("li", { children: i18n.get("issuedByTheTaxAuthority") })
547
- ] })
548
- ] })
549
- }
550
- ) }),
551
- /* @__PURE__ */ jsx("div", { className: formWrapperClasses(forms.companyProofOfDirectorDocument.formId), children: /* @__PURE__ */ jsx(
552
- ProofOfDirectorDocument,
553
- {
554
- ...getFormProps(props, forms.companyProofOfDirectorDocument.formId),
555
- id: forms.companyProofOfDirectorDocument.formId,
556
- heading: forms.companyProofOfDirectorDocument.formHeading,
557
- description: forms.companyProofOfDirectorDocument.formDescription,
558
- country
559
- }
560
- ) }),
561
- /* @__PURE__ */ jsx("div", { className: formWrapperClasses(forms.companyProofOfSignatoryDocument.formId), children: /* @__PURE__ */ jsx(
562
- ProofOfSignatoryDocument,
563
- {
564
- ...getFormProps(props, forms.companyProofOfSignatoryDocument.formId),
565
- id: forms.companyProofOfSignatoryDocument.formId,
566
- heading: forms.companyProofOfSignatoryDocument.formHeading,
567
- description: forms.companyProofOfSignatoryDocument.formDescription,
568
- country
569
- }
570
- ) }),
571
- /* @__PURE__ */ jsx("div", { className: formWrapperClasses(forms.companyProofOfOwnershipDocument.formId), children: /* @__PURE__ */ jsx(
572
- ProofOfOwnershipDocument,
573
- {
574
- ...getFormProps(props, forms.companyProofOfOwnershipDocument.formId),
575
- id: forms.companyProofOfOwnershipDocument.formId,
576
- heading: forms.companyProofOfOwnershipDocument.formHeading,
577
- description: forms.companyProofOfOwnershipDocument.formDescription,
578
- country
579
- }
580
- ) }),
581
- /* @__PURE__ */ jsx("div", { className: formWrapperClasses(forms.companyConstitutionalDocument.formId), children: /* @__PURE__ */ jsx(
582
- MemoizedConstitutionalDocument,
583
- {
584
- ...getFormProps(props, forms.companyConstitutionalDocument.formId),
585
- id: forms.companyConstitutionalDocument.formId,
586
- legalEntityType: LegalEntityTypes.SOLE_PROPRIETORSHIP,
587
- country
588
- }
589
- ) }),
590
- /* @__PURE__ */ jsx("div", { className: formWrapperClasses(forms.companyFinancialInformation.formId), children: /* @__PURE__ */ jsx(
591
- FinancialInformation,
592
- {
593
- ...getFormProps(props, forms.companyFinancialInformation.formId),
594
- heading: i18n.get("financialInformation"),
595
- id: forms.companyFinancialInformation.formId,
596
- country
597
- }
598
- ) })
599
- ] });
600
- }
601
- const mapApiDocumentToBusinessDetailsDocuments = (entityId) => {
602
- const registrationDocument = getDocument(entityId, "registrationDocument") ?? null;
603
- const taxDocument = getDocument(entityId, "vatDocument") ?? getDocument(entityId, "proofOfOrganizationTaxInfo") ?? null;
604
- const proofOfDirector = getDocument(entityId, "proofOfDirector") ?? null;
605
- const proofOfSignatory = getDocument(entityId, "proofOfSignatory") ?? null;
606
- const proofOfOwnership = getDocument(entityId, "proofOfOwnership") ?? null;
607
- const constitutionalDocument = getDocument(entityId, "constitutionalDocument") ?? null;
608
- return {
609
- companyRegistrationDocument: registrationDocument ? { registrationDocument: [mapExistingFile(getPageName(registrationDocument))] } : void 0,
610
- companyTaxDocument: taxDocument ? { taxDocument: [mapExistingFile(getPageName(taxDocument))] } : void 0,
611
- companyProofOfDirectorDocument: proofOfDirector ? { proofOfDirector: [mapExistingFile(getPageName(proofOfDirector))] } : void 0,
612
- companyProofOfSignatoryDocument: proofOfSignatory ? { proofOfSignatory: [mapExistingFile(getPageName(proofOfSignatory))] } : void 0,
613
- companyProofOfOwnershipDocument: proofOfOwnership ? { proofOfOwnership: [mapExistingFile(getPageName(proofOfOwnership))] } : void 0,
614
- companyConstitutionalDocument: constitutionalDocument ? {
615
- constitutionalDocument: [mapExistingFile(getPageName(constitutionalDocument))]
616
- } : void 0
617
- };
618
- };
619
- const mapBasicInformation = (data) => {
620
- if (!data) return;
621
- return !!data.country && COUNTRIES_USING_COMPANY_SEARCH.includes(data.country) ? data : entriesOf(data).reduce((acc, [field]) => {
622
- if (!FIELDS_NEEDED_FOR_COMPANY_SEARCH.includes(field)) {
623
- return {
624
- ...acc,
625
- [field]: data[field]
626
- };
627
- }
628
- return acc;
629
- }, {});
630
- };
631
- const mapDbaName = (legalEntity) => {
632
- const entity = legalEntity.type === "organization" ? legalEntity.organization : legalEntity.soleProprietorship;
633
- const dbaName = {};
634
- if (typeof entity?.doingBusinessAsAbsent !== "undefined") {
635
- dbaName.hasDoingBusinessAs = !entity.doingBusinessAsAbsent;
636
- } else {
637
- if (entity?.doingBusinessAs) {
638
- dbaName.hasDoingBusinessAs = entity?.doingBusinessAs !== (legalEntity.type === "organization" ? legalEntity.organization?.legalName : legalEntity.soleProprietorship?.name);
639
- } else {
640
- dbaName.hasDoingBusinessAs = void 0;
641
- }
642
- }
643
- if (legalEntity.organization?.doingBusinessAs) {
644
- dbaName.doingBusinessAs = legalEntity.organization?.doingBusinessAs;
645
- }
646
- return dbaName;
647
- };
648
- const mapIsUen = (taxInformation, registrationNumber, country) => {
649
- const currentCountryTaxInfo = taxInformation?.find((taxInfo) => taxInfo.country === country);
650
- if (!currentCountryTaxInfo || country !== "SG") return {};
651
- return {
652
- registrationNumber: currentCountryTaxInfo.type === "UEN" ? currentCountryTaxInfo.number : registrationNumber,
653
- isUen: currentCountryTaxInfo.type === "UEN"
654
- };
655
- };
656
- const mapAdditionalInformation = (data, legalEntity) => {
657
- if (!data) return;
658
- const entity = legalEntity.type === "organization" ? legalEntity.organization : legalEntity.soleProprietorship;
659
- const currentCountry = entity?.registeredAddress.country;
660
- const dbaNameFields = mapDbaName(legalEntity);
661
- const isUen = mapIsUen(
662
- data.taxInformation,
663
- data.registrationNumber,
664
- currentCountry
665
- );
666
- const companyType = legalEntity.type === "organization" ? legalEntity.organization?.type : CompanyTypesValues.SOLE_PROPRIETORSHIP;
667
- const registrationNumberType = getDefaultRegistrationNumberType(
668
- entity?.registrationNumber,
669
- currentCountry,
670
- companyType
671
- );
672
- const vatNumberType = getDefaultVatNumberType(entity?.vatNumber, currentCountry);
673
- const operationalAddressIsSame = entity?.principalPlaceOfBusiness && !objectsDeepEqual(entity?.principalPlaceOfBusiness, entity?.registeredAddress) ? operationalAddressIsSameIds.OPERATIONAL_ADDRESS_IS_NOT_SAME : operationalAddressIsSameIds.OPERATIONAL_ADDRESS_IS_SAME;
674
- const result = entriesOf(data).reduce(
675
- (acc, [field]) => {
676
- if (!COUNTRIES_USING_COMPANY_SEARCH.includes(currentCountry)) {
677
- return {
678
- ...acc,
679
- [field]: data[field]
680
- };
681
- }
682
- if (!FIELDS_NEEDED_FOR_COMPANY_SEARCH.includes(field)) {
683
- return {
684
- ...acc,
685
- [field]: data[field]
686
- };
687
- }
688
- return acc;
689
- },
690
- { operationalAddressIsSame, registrationNumberType, vatNumberType }
691
- );
692
- return { ...result, ...dbaNameFields, ...isUen };
693
- };
694
- const mapLocalization = (data) => {
695
- const mappings = [
696
- { formField: "jaHaniLegalCompanyName", script: "ja-Hani", legalEntityField: "legalName" },
697
- { formField: "jaKanaLegalCompanyName", script: "ja-Kana", legalEntityField: "legalName" }
698
- ];
699
- const localizedScriptsAndFields = data.organization?.localization || data.soleProprietorship?.localization;
700
- if (!localizedScriptsAndFields) {
701
- return;
702
- }
703
- const result = {};
704
- mappings.forEach((mapping) => {
705
- const value = localizedScriptsAndFields.find(
706
- (localization) => localization.script === mapping.script
707
- )?.fields?.[mapping.legalEntityField];
708
- result[mapping.formField] = value;
709
- });
710
- return result;
711
- };
712
- const mapLegalEntityToBusinessDetailsSchema = (legalEntity, parentEntity, isExperimentEnabled) => {
713
- if (!legalEntity) return {};
714
- const {
715
- companyRegistrationDocument,
716
- companyTaxDocument,
717
- companyProofOfDirectorDocument,
718
- companyProofOfSignatoryDocument,
719
- companyProofOfOwnershipDocument,
720
- companyConstitutionalDocument
721
- } = mapApiDocumentToBusinessDetailsDocuments(legalEntity.id);
722
- const buildSolePropSchema = () => {
723
- const solePropData = formatObject(
724
- legalEntity,
725
- solePropBusinessDetailsKeyMapping
726
- );
727
- const country = solePropData?.additionalInformation?.registrationAddress?.country ?? parentEntity?.individual?.residentialAddress.country;
728
- if (legalEntity?.soleProprietorship?.financialReports && solePropData) {
729
- solePropData.companyFinancialInformation = mapFinancialReportsToFinancialInformation(
730
- legalEntity.soleProprietorship.financialReports
731
- );
732
- }
733
- return {
734
- ...solePropData,
735
- basicInformation: {
736
- ...solePropData?.basicInformation,
737
- country
738
- },
739
- companyConstitutionalDocument
740
- };
741
- };
742
- const orgSchema = isExperimentEnabled?.("EnableBusinessDetailsMultiForm") ? {
743
- ...formatObject(legalEntity, businessDetailsComponentsKeyMapping),
744
- businessSelection: {},
745
- companyRegistrationDocument,
746
- companyTaxDocument,
747
- companyProofOfDirectorDocument,
748
- companyProofOfSignatoryDocument,
749
- companyProofOfOwnershipDocument,
750
- companyFinancialInformation: {}
751
- } : {
752
- ...formatObject(legalEntity, businessDetailsComponentsKeyMapping),
753
- companyRegistrationDocument,
754
- companyTaxDocument,
755
- companyProofOfDirectorDocument,
756
- companyProofOfSignatoryDocument,
757
- companyProofOfOwnershipDocument,
758
- companyFinancialInformation: {}
759
- };
760
- const businessDetailsSchema = legalEntity.type === "organization" ? orgSchema : buildSolePropSchema();
761
- const localization = mapLocalization(legalEntity);
762
- return entriesOf(businessDetailsSchema).reduce((componentData, [key]) => {
763
- switch (key) {
764
- case "basicInformation": {
765
- return {
766
- ...componentData,
767
- [key]: { ...mapBasicInformation(businessDetailsSchema[key]), ...localization ?? {} }
768
- };
769
- }
770
- case "businessSelection": {
771
- return {
772
- ...componentData,
773
- [key]: {
774
- hasSelectedBusiness: false
775
- }
776
- };
777
- }
778
- case "companyStructure": {
779
- return {
780
- ...componentData,
781
- [key]: {
782
- ...businessDetailsSchema[key]
783
- }
784
- };
785
- }
786
- case "additionalInformation": {
787
- return {
788
- ...componentData,
789
- [key]: mapAdditionalInformation(businessDetailsSchema[key], legalEntity)
790
- };
791
- }
792
- case "companyRegistrationDocument": {
793
- return {
794
- ...componentData,
795
- [key]: businessDetailsSchema[key]
796
- };
797
- }
798
- case "companyTaxDocument": {
799
- return {
800
- ...componentData,
801
- [key]: businessDetailsSchema[key]
802
- };
803
- }
804
- case "companyProofOfDirectorDocument": {
805
- return {
806
- ...componentData,
807
- [key]: businessDetailsSchema[key]
808
- };
809
- }
810
- case "companyProofOfSignatoryDocument": {
811
- return {
812
- ...componentData,
813
- [key]: businessDetailsSchema[key]
814
- };
815
- }
816
- case "companyProofOfOwnershipDocument": {
817
- return {
818
- ...componentData,
819
- [key]: businessDetailsSchema[key]
820
- };
821
- }
822
- case "companyConstitutionalDocument": {
823
- return {
824
- ...componentData,
825
- [key]: businessDetailsSchema[key]
826
- };
827
- }
828
- case "companyFinancialInformation": {
829
- const financialReports = legalEntity.type === "organization" ? legalEntity?.organization?.financialReports : legalEntity?.soleProprietorship?.financialReports;
830
- return financialReports?.length ? {
831
- ...componentData,
832
- [key]: mapFinancialReportsToFinancialInformation(financialReports)
833
- } : componentData;
834
- }
835
- default:
836
- return componentData;
837
- }
838
- }, {});
839
- };
840
- const businessDetailsBase = {
841
- /* Base required fields */
842
- country: { rule: "REQUIRED" },
843
- entityType: { rule: "businessRequiresCompanyType" },
844
- legalCompanyName: { rule: "REQUIRED" },
845
- jaHaniLegalCompanyName: { rule: "japaneseLegalCompanyName" },
846
- jaKanaLegalCompanyName: { rule: "japaneseLegalCompanyName" },
847
- hasDoingBusinessAs: { rule: "REQUIRED" },
848
- doingBusinessAs: { rule: "requireDoingBusinessAsName" },
849
- registrationAddress: { rule: "REQUIRED" },
850
- operationalAddressIsSame: { rule: "REQUIRED" },
851
- /* Base optional fields */
852
- operationalAddress: { rule: "OPTIONAL" },
853
- /* Fields with custom country specific rules */
854
- hasSelectedBusiness: { rule: "requireBusinessSelection" },
855
- stockExchangeMIC: { rule: "ifPubliclyTradedCompany" },
856
- stockISIN: { rule: "ifPubliclyTradedCompany" },
857
- stockTickerSymbol: { rule: "ifPubliclyTradedCompany" },
858
- dateOfIncorporation: { rule: "isDateOfIncorporationRequired" },
859
- stateOrProvince: { rule: "countryUsingCompanySearch" },
860
- registrationNumber: { rule: "countryRequiresRegistrationNumber" },
861
- registrationNumberType: { rule: "registrationNumberType" },
862
- exemptedFromRegistrationNumber: { rule: "companyRegistrationNumberExemptionAllowed" },
863
- eInvoicingCode: { rule: "isEInvoicingCodeEnabled" },
864
- countryOfGoverningLaw: { rule: "countryOfGoverningLawRequired" },
865
- taxDocument: { rule: "ifCountryUsAndTinFailed" }
866
- };
867
- const taxInformationBase = {
868
- vatNumber: { rule: "countryUsesVat" },
869
- vatNumberType: { rule: "vatNumberType" },
870
- exemptedFromVat: { rule: "isVatExempt" },
871
- vatAbsenceReason: { rule: "isVatExempt" },
872
- taxInformation: { rule: "countryUsesTaxId" },
873
- exemptedFromTax: { rule: "countryHasTaxExemptions" },
874
- isUen: { rule: "countryUsesUenOrGst" }
875
- };
876
- const financialInformationBase = {
877
- numberOfEmployees: { rule: "countryRequiresFinancialInformation" },
878
- financialReportingDate: { rule: "isFinancialReportingFieldsRequired" },
879
- currency: { rule: "isFinancialReportingFieldsRequired" },
880
- reportedValueOption: { rule: "isFinancialReportingFieldsRequired" },
881
- annualTurnover: { rule: "annualTurnoverRequired" },
882
- netAssets: { rule: "netAssetsRequired" },
883
- balanceSheetTotal: { rule: "balanceSheetTotalRequired" }
884
- };
885
- const businessDetailsFieldsPerScenario = {
886
- L0: {
887
- country: { rule: "REQUIRED" },
888
- legalCompanyName: { rule: "REQUIRED" },
889
- stateOrProvince: { rule: "countryUsingCompanySearch" },
890
- ...financialInformationBase
891
- },
892
- L1: {
893
- ...businessDetailsBase,
894
- ...financialInformationBase
895
- },
896
- L: {
897
- ...businessDetailsBase,
898
- ...taxInformationBase,
899
- ...financialInformationBase
900
- },
901
- L_PROOFOFADDRESS: {
902
- // TODO this field does not exist
903
- // proofOfAddressDocument: { rule: 'REQUIRED' },
904
- },
905
- L_REGDOC: {
906
- registrationDocument: { rule: "REQUIRED" }
907
- },
908
- L_TAXDOC: {
909
- taxDocument: { rule: "REQUIRED" }
910
- },
911
- L_BAFIN: {
912
- legalForm: { rule: "REQUIRED" }
913
- }
914
- };
915
- const adjustFormData = (oldFormData, newFormData) => {
916
- const schema = Array.from((/* @__PURE__ */ new Set([...keysOf(oldFormData), ...keysOf(newFormData)])).keys());
917
- return schema.reduce((acc, key) => {
918
- const oldValue = oldFormData[key];
919
- const newValue = newFormData[key];
920
- if (!isUndefinedOrNull(newValue)) return { ...acc, [key]: newValue };
921
- if (Array.isArray(oldValue)) return { ...acc, [key]: [] };
922
- if (typeof oldValue === "number") return { ...acc, [key]: null };
923
- if (typeof oldValue === "string") return { ...acc, [key]: "" };
924
- return { ...acc, [key]: "" };
925
- }, {});
926
- };
927
- const setRemovedFieldsOnSchemaToDeletedValue = (newData, existingData) => {
928
- const formIds = Array.from((/* @__PURE__ */ new Set([...keysOf(existingData), ...keysOf(newData)])).keys());
929
- return formIds.reduce((adjusted, formId) => {
930
- const oldFormData = existingData[formId];
931
- const newFormData = newData[formId];
932
- if (isUndefinedOrNull(oldFormData)) return { ...adjusted, [formId]: newFormData };
933
- if (isUndefinedOrNull(newFormData)) return adjusted;
934
- return { ...adjusted, [formId]: adjustFormData(oldFormData, newFormData) };
935
- }, {});
936
- };
937
- const formatFinancialInformationSummary = (data, i18n, country, dateOfIncorporation) => {
938
- let summary;
939
- if (!data) return void 0;
940
- if (dateOfIncorporation && !isDateOlderThanAYear(dateOfIncorporation)) {
941
- if (country === CountryCodes.UnitedKingdom) {
942
- summary = { numberOfEmployees: `${data.numberOfEmployees}` };
943
- return summary;
944
- }
945
- return void 0;
946
- }
947
- summary = {
948
- currency: data.currency,
949
- financialReportingDate: data.financialReportingDate
950
- };
951
- if (country === CountryCodes.UnitedKingdom) {
952
- summary.numberOfEmployees = `${data.numberOfEmployees}`;
953
- }
954
- if (data.balanceSheetTotal) {
955
- summary.balanceSheetTotal = summaryItem(
956
- "balanceSheetTotal",
957
- formatCurrency(data.balanceSheetTotal, data.currency, i18n.locale)
958
- );
959
- }
960
- if (data.annualTurnover) {
961
- summary.annualTurnover = formatCurrency(data.annualTurnover, data.currency, i18n.locale);
962
- }
963
- return summary;
964
- };
965
- const mapBusinessDetailsDocumentToApiDocument = async (data, entityId) => {
966
- const {
967
- companyRegistrationDocument,
968
- companyTaxDocument,
969
- companyProofOfDirectorDocument,
970
- companyConstitutionalDocument,
971
- companyProofOfSignatoryDocument,
972
- companyProofOfOwnershipDocument,
973
- basicInformation
974
- } = data;
975
- const taxDocumentType = COUNTRIES_THAT_USE_TAX_ID_INSTEAD_OF_VAT.includes(
976
- basicInformation?.country
977
- ) ? "proofOfOrganizationTaxInfo" : "vatDocument";
978
- const documents = await Promise.all([
979
- createDocumentRequest({
980
- entityId,
981
- entityType: "legalEntity",
982
- documentType: "registrationDocument",
983
- page1: companyRegistrationDocument?.registrationDocument?.[0]
984
- }),
985
- createDocumentRequest({
986
- entityId,
987
- entityType: "legalEntity",
988
- documentType: taxDocumentType,
989
- page1: companyTaxDocument?.taxDocument?.[0]
990
- }),
991
- createDocumentRequest({
992
- entityId,
993
- entityType: "legalEntity",
994
- documentType: "proofOfDirector",
995
- page1: companyProofOfDirectorDocument?.proofOfDirector?.[0]
996
- }),
997
- createDocumentRequest({
998
- entityId,
999
- entityType: "legalEntity",
1000
- documentType: "constitutionalDocument",
1001
- page1: companyConstitutionalDocument?.constitutionalDocument?.[0]
1002
- }),
1003
- createDocumentRequest({
1004
- entityId,
1005
- entityType: "legalEntity",
1006
- documentType: "proofOfSignatory",
1007
- page1: companyProofOfSignatoryDocument?.proofOfSignatory?.[0]
1008
- }),
1009
- createDocumentRequest({
1010
- entityId,
1011
- entityType: "legalEntity",
1012
- documentType: "proofOfOwnership",
1013
- page1: companyProofOfOwnershipDocument?.proofOfOwnership?.[0],
1014
- page2: companyProofOfOwnershipDocument?.proofOfOwnership?.[1]
1015
- })
1016
- ]);
1017
- return documents.filter(Boolean);
1018
- };
1019
- const mapBusinessDetailsSchemaToLegalEntity = (data, accountHolder, isExperimentEnabled) => {
1020
- const requestObj = {
1021
- ...formatObject(
1022
- data,
1023
- accountHolder === "mySoleProprietorName" ? solePropBusinessDetailsApiKeyMapping : businessDetailsApiKeyMapping
1024
- )
1025
- };
1026
- delete requestObj.organization?.legalFormDescription;
1027
- const canSaveRegNumberAbsentState = isExperimentEnabled("EnableRegistrationAndTaxAbsentStatesV4") && isRegistrationNumberAbsentStateV4Scenario(
1028
- data.basicInformation?.country,
1029
- data.companyStructure?.entityType
1030
- );
1031
- const taxData = COUNTRIES_USING_COMPANY_SEARCH.includes(
1032
- data.basicInformation?.country
1033
- ) ? data.basicInformation?.taxInformation : data.additionalInformation?.taxInformation;
1034
- const registrationNumber = COUNTRIES_USING_COMPANY_SEARCH.includes(
1035
- data.basicInformation?.country
1036
- ) ? data.basicInformation?.registrationNumber : data.additionalInformation?.registrationNumber;
1037
- const localization = processLocalizationFields(data.basicInformation);
1038
- const doingBusinessAs = data.additionalInformation?.doingBusinessAs ?? "";
1039
- const entityObject = isEmpty(data.companyStructure) ? requestObj.soleProprietorship : requestObj.organization;
1040
- if (entityObject) {
1041
- if (taxData) {
1042
- entityObject.taxInformation = taxData;
1043
- }
1044
- if (!!requestObj.soleProprietorship && !requestObj.soleProprietorship?.countryOfGoverningLaw && !!data.basicInformation?.country) {
1045
- requestObj.soleProprietorship.countryOfGoverningLaw = data.basicInformation.country;
1046
- }
1047
- if (registrationNumber) {
1048
- entityObject.registrationNumber = registrationNumber;
1049
- if (canSaveRegNumberAbsentState && requestObj.organization) {
1050
- requestObj.organization.registrationNumberAbsent = false;
1051
- }
1052
- }
1053
- if (localization) {
1054
- entityObject.localization = localization;
1055
- }
1056
- if (data.additionalInformation?.exemptedFromRegistrationNumber && canSaveRegNumberAbsentState && requestObj.organization) {
1057
- requestObj.organization.registrationNumberAbsent = data.additionalInformation?.exemptedFromRegistrationNumber;
1058
- }
1059
- if (data.additionalInformation?.vatAbsenceReason) {
1060
- entityObject.vatNumber = "";
1061
- }
1062
- if (isExperimentEnabled("EnableDoingBusinessAsNameV4")) {
1063
- if (typeof data.additionalInformation?.hasDoingBusinessAs !== "undefined") {
1064
- entityObject.doingBusinessAsAbsent = !data.additionalInformation?.hasDoingBusinessAs;
1065
- }
1066
- } else {
1067
- entityObject.doingBusinessAs = doingBusinessAs || data.basicInformation?.legalCompanyName;
1068
- delete entityObject.doingBusinessAsAbsent;
1069
- }
1070
- if (data.additionalInformation?.operationalAddressIsSame === operationalAddressIsSameIds.OPERATIONAL_ADDRESS_IS_SAME && entityObject.principalPlaceOfBusiness) {
1071
- entityObject.principalPlaceOfBusiness = entityObject.registeredAddress;
1072
- }
1073
- if (!isEmpty(data.companyFinancialInformation)) {
1074
- const isIncorporationDateDependencyEnabled = isExperimentEnabled(
1075
- "EnableIncorporationDateBasedFinancialValidationForHO"
1076
- );
1077
- entityObject.financialReports = [
1078
- mapFinancialInformationToFinancialReport(
1079
- data.companyFinancialInformation,
1080
- isIncorporationDateDependencyEnabled ? data?.additionalInformation?.dateOfIncorporation : void 0
1081
- )
1082
- ];
1083
- }
1084
- }
1085
- requestObj.type = requestObj.organization ? LegalEntityTypes.ORGANIZATION : LegalEntityTypes.SOLE_PROPRIETORSHIP;
1086
- if (entityObject?.registeredAddress.country === "US") {
1087
- delete entityObject.registrationNumber;
1088
- }
1089
- if (!canSaveRegNumberAbsentState) {
1090
- delete requestObj.organization?.registrationNumberAbsent;
1091
- }
1092
- return requestObj;
1093
- };
1094
- const processLocalizationFields = (data) => {
1095
- if (!data) {
1096
- return;
1097
- }
1098
- const LOCALIZATION_FIELDS = {
1099
- jaHaniLegalCompanyName: { script: "ja-Hani", fieldName: "legalName" },
1100
- jaKanaLegalCompanyName: { script: "ja-Kana", fieldName: "legalName" }
1101
- };
1102
- const localization = {};
1103
- Object.keys(LOCALIZATION_FIELDS).forEach((field) => {
1104
- const basicInformationFieldSchemaField = field;
1105
- if (data[basicInformationFieldSchemaField]) {
1106
- const script = LOCALIZATION_FIELDS[basicInformationFieldSchemaField]?.script;
1107
- const fieldName = LOCALIZATION_FIELDS[basicInformationFieldSchemaField]?.fieldName;
1108
- if (script && localization[script]) {
1109
- localization[script] = {
1110
- fields: {
1111
- ...localization[script].fields,
1112
- [fieldName]: data[basicInformationFieldSchemaField]
1113
- }
1114
- };
1115
- } else if (script && !localization[script]) {
1116
- localization[script] = {
1117
- fields: {
1118
- [fieldName]: data[basicInformationFieldSchemaField]
1119
- }
1120
- };
1121
- }
1122
- }
1123
- });
1124
- if (Object.keys(localization).length === 0) {
1125
- return;
1126
- }
1127
- return Object.keys(localization).map((script) => ({
1128
- script,
1129
- fields: { ...localization[script].fields }
1130
- }));
1131
- };
1132
- const MANDATORY_FIELDS_BUSINESS_DETAILS = [
1133
- "basicInformation.legalCompanyName",
1134
- "basicInformation.country"
1135
- ];
1136
- const canSubmit = (data) => MANDATORY_FIELDS_BUSINESS_DETAILS.every((detail) => {
1137
- const value = getProp(data, detail);
1138
- return !isEmpty$1(value);
1139
- });
1140
- const isDocumentsRequired = (forms) => forms.some((form) => documentFormsIds.includes(form.formId));
1141
- const removeConditionalForms = (forms, isSkippingCompanyStructure) => isSkippingCompanyStructure ? forms.filter((f) => f.formId !== "companyStructure" && f.formId !== "companyType") : forms;
1142
- const formatBasicInformation = (data, labels, datasetUtils, companyType, isCountryOfGoverningLawEnabled) => {
1143
- const country = data?.country;
1144
- const registrationNumberLabel = resolveFieldMetadata(
1145
- registrationNumberDefaultFieldConfig[country],
1146
- {
1147
- companyType,
1148
- registrationNumberType: data.registrationNumber ? inferCompanyRegistrationNumberType(data?.registrationNumber, country, companyType) : getCompanyRegistrationNumberOptions(country, companyType)?.[0]?.id
1149
- },
1150
- registrationNumberDefaultFieldMetadata
1151
- ).label;
1152
- const taxIdLabel = resolveFieldMetadata(
1153
- taxInformationDefaultFieldConfig[country],
1154
- {
1155
- taxIdNumberType: countryToTaxInfoTypeMap[country] ?? void 0,
1156
- // TODO use type selector
1157
- companyType: void 0
1158
- },
1159
- taxInformationDefaultFieldMetadata
1160
- ).label;
1161
- const countryOfGoverningLaw = getCountryOfGoverningLaw(isCountryOfGoverningLawEnabled, data);
1162
- return {
1163
- [labels?.basicInformation?.legalCompanyName ?? "legalCompanyName"]: data.legalCompanyName,
1164
- country: datasetUtils.getCountryName(data.country),
1165
- [getKeyForField("stateOrProvince", data.country)]: datasetUtils.getStateName(
1166
- data.stateOrProvince,
1167
- data.country
1168
- ),
1169
- [taxIdLabel]: data.taxInformation?.find((taxId) => data.country === taxId.country)?.number,
1170
- [registrationNumberLabel]: data.registrationNumber,
1171
- countryOfGoverningLaw: datasetUtils.getCountryName(countryOfGoverningLaw)
1172
- };
1173
- };
1174
- const formatAdditionalInformation = (data, labels, country, companyType, i18n) => {
1175
- const registrationNumberLabel = resolveFieldMetadata(
1176
- registrationNumberDefaultFieldConfig[country],
1177
- {
1178
- companyType,
1179
- registrationNumberType: data.registrationNumber ? inferCompanyRegistrationNumberType(data?.registrationNumber, country, companyType) : getCompanyRegistrationNumberOptions(country, companyType)?.[0]?.id
1180
- },
1181
- registrationNumberDefaultFieldMetadata
1182
- ).label;
1183
- const taxIdLabel = resolveFieldMetadata(
1184
- taxInformationDefaultFieldConfig[country],
1185
- {
1186
- taxIdNumberType: countryToTaxInfoTypeMap[country] ?? void 0,
1187
- // TODO use type selector
1188
- companyType: void 0
1189
- },
1190
- taxInformationDefaultFieldMetadata
1191
- ).label;
1192
- return {
1193
- [labels?.additionalInformation?.legalForm ?? "businessStructure"]: data.legalFormLabel,
1194
- [labels?.additionalInformation?.doingBusinessAs ?? "doingBusinessAs"]: data.doingBusinessAs,
1195
- [registrationNumberLabel]: data.registrationNumber,
1196
- [taxIdLabel]: data.isUen ? void 0 : data.taxInformation?.find((taxId) => country === taxId.country)?.number,
1197
- [labels?.additionalInformation?.vatNumber ?? "vatNumber"]: data.vatNumber,
1198
- [labels?.additionalInformation?.vatAbsenceReason ?? "vatAbsenceReason"]: data.vatAbsenceReason ? i18n.get(data.vatAbsenceReason) : void 0,
1199
- [labels?.additionalInformation?.dateOfIncorporation ?? "dateOfIncorporation"]: data.dateOfIncorporation,
1200
- [labels?.additionalInformation?.stockExchangeMIC ?? "stockExchangeMIC"]: data.stockExchangeMIC,
1201
- [labels?.additionalInformation?.stockISIN ?? "stockISIN"]: data.stockISIN,
1202
- [labels?.additionalInformation?.stockTickerSymbol ?? "stockTickerSymbol"]: data.stockTickerSymbol,
1203
- [labels?.additionalInformation?.eInvoicingCode ?? "eInvoicingCode"]: data.eInvoicingCode
1204
- };
1205
- };
1206
- const formatDataForSummary = (data, forms, labels, i18n, isExperimentEnabled) => {
1207
- const datasetUtils = datasetUtilities(i18n.locale);
1208
- return entriesOf(data).reduce((summaryData, [form]) => {
1209
- if (!form || !data[form]) return summaryData;
1210
- const isCountryOfGoverningLawEnabled = isExperimentEnabled(
1211
- "EnableCountryOfGoverningLawForUKCompanies"
1212
- );
1213
- switch (form) {
1214
- case "basicInformation":
1215
- return {
1216
- ...summaryData,
1217
- [form]: formatBasicInformation(
1218
- data[form],
1219
- labels,
1220
- datasetUtils,
1221
- data.companyStructure?.entityType,
1222
- isCountryOfGoverningLawEnabled
1223
- )
1224
- };
1225
- case "companyStructure":
1226
- return {
1227
- ...summaryData,
1228
- [form]: {
1229
- entityType: i18n.get(
1230
- companyTypeMetadata[data[form]?.entityType]?.name
1231
- )
1232
- }
1233
- };
1234
- case "additionalInformation":
1235
- return {
1236
- ...summaryData,
1237
- [form]: {
1238
- hasInnerForms: true,
1239
- additionalInformationFormName: formatAdditionalInformation(
1240
- data[form],
1241
- labels,
1242
- data.basicInformation?.country,
1243
- data.companyStructure?.entityType,
1244
- i18n
1245
- ),
1246
- registrationAddress: mapAddressLabels(data[form].registrationAddress, datasetUtils),
1247
- operationalAddress: data[form].operationalAddressIsSame === operationalAddressIsSameIds.OPERATIONAL_ADDRESS_IS_NOT_SAME ? mapAddressLabels(data[form].operationalAddress, datasetUtils) : void 0
1248
- }
1249
- };
1250
- case "companyRegistrationDocument":
1251
- if (!isDocumentsRequired(forms)) return summaryData;
1252
- return {
1253
- ...summaryData,
1254
- [form]: {
1255
- companyRegistrationDocument: {
1256
- fileName: data[form].registrationDocument?.[0]?.name
1257
- }
1258
- }
1259
- };
1260
- case "companyTaxDocument":
1261
- if (!isDocumentsRequired(forms)) return summaryData;
1262
- return {
1263
- ...summaryData,
1264
- [form]: {
1265
- companyTaxDocument: {
1266
- fileName: data[form].taxDocument?.[0]?.name
1267
- }
1268
- }
1269
- };
1270
- case "companyProofOfDirectorDocument":
1271
- if (!isDocumentsRequired(forms)) return summaryData;
1272
- return {
1273
- ...summaryData,
1274
- [form]: {
1275
- companyProofOfDirectorDocument: {
1276
- fileName: data[form].proofOfDirector?.[0]?.name
1277
- }
1278
- }
1279
- };
1280
- case "companyProofOfSignatoryDocument":
1281
- if (!isDocumentsRequired(forms)) return summaryData;
1282
- return {
1283
- ...summaryData,
1284
- [form]: {
1285
- companyProofOfSignatoryDocument: {
1286
- fileName: data[form].proofOfSignatory?.[0]?.name
1287
- }
1288
- }
1289
- };
1290
- case "companyProofOfOwnershipDocument":
1291
- if (!isDocumentsRequired(forms)) return summaryData;
1292
- return {
1293
- ...summaryData,
1294
- [form]: {
1295
- companyProofOfOwnershipDocument: {
1296
- fileName: data[form].proofOfOwnership?.map((doc) => doc.name).join("\n")
1297
- }
1298
- }
1299
- };
1300
- case "companyFinancialInformation": {
1301
- const isIncorporationDateDependencyEnabled = isExperimentEnabled(
1302
- "EnableIncorporationDateBasedFinancialValidationForHO"
1303
- );
1304
- return {
1305
- ...summaryData,
1306
- [form]: formatFinancialInformationSummary(
1307
- data[form],
1308
- i18n,
1309
- data?.basicInformation?.country,
1310
- isIncorporationDateDependencyEnabled ? data?.additionalInformation?.dateOfIncorporation : void 0
1311
- )
1312
- };
1313
- }
1314
- default:
1315
- return summaryData;
1316
- }
1317
- }, {});
1318
- };
1319
- async function submitDocuments({
1320
- data,
1321
- legalEntity,
1322
- forms,
1323
- documentUtils,
1324
- additionalTrackingParams,
1325
- userEvents
1326
- }) {
1327
- if (!isDocumentsRequired(forms)) return;
1328
- const logger = createLogger();
1329
- const formattedDocument = await mapBusinessDetailsDocumentToApiDocument(data, legalEntity.id);
1330
- try {
1331
- if (formattedDocument) {
1332
- await documentUtils.uploadDocuments(formattedDocument, legalEntity.id);
1333
- formattedDocument.forEach((doc) => {
1334
- userEvents?.addTaskEvent("Success", {
1335
- ...additionalTrackingParams,
1336
- actionType: "upload",
1337
- documentType: doc.type,
1338
- fileExtention: doc.attachments?.map((item) => getFileExtention(item.pageName)).filter((item) => item !== void 0) ?? []
1339
- });
1340
- });
1341
- }
1342
- } catch (err) {
1343
- logger.error(err);
1344
- userEvents.addTaskEvent("Encountered error", {
1345
- ...additionalTrackingParams,
1346
- actionType: "upload",
1347
- returnType: err.errorCode,
1348
- returnValue: err.title ?? err.message
1349
- });
1350
- }
1351
- }
1352
- async function submit({
1353
- additionalTrackingParams,
1354
- data,
1355
- legalEntityResponse,
1356
- associatedLegalArrangement,
1357
- nestedLegalEntity,
1358
- nestedLegalEntityDetails,
1359
- problems,
1360
- taskType,
1361
- accountHolder,
1362
- forms,
1363
- documentUtils,
1364
- i18n,
1365
- showToast,
1366
- setLoadingStatus,
1367
- setProblems,
1368
- handleUpdateLegalEntity,
1369
- createLegalEntity,
1370
- onExternalSubmit,
1371
- isExperimentEnabled,
1372
- userEvents
1373
- }) {
1374
- const logger = createLogger();
1375
- setLoadingStatus("loading");
1376
- let trackingPayload = {
1377
- ...additionalTrackingParams,
1378
- actionType: "submit",
1379
- companyStructure: data.companyStructure?.entityType ?? null,
1380
- countryOfRegistration: data.basicInformation?.country ?? null,
1381
- legalEntityName: accountHolder === "theCompanyIWorkFor" ? data.basicInformation?.legalCompanyName ?? null : null,
1382
- // Only send legalCompanyName for organizations
1383
- usedAdditionalAddress: data.additionalInformation?.operationalAddressIsSame === operationalAddressIsSameIds.OPERATIONAL_ADDRESS_IS_NOT_SAME
1384
- };
1385
- const entityToUpdate = (() => {
1386
- switch (taskType) {
1387
- case TaskTypes.SOLE_PROPRIETOR_COMPANY:
1388
- return associatedLegalArrangement;
1389
- case TaskTypes.TRUST_MEMBER_COMPANY:
1390
- case TaskTypes.UNINCORPORATED_PARTNERSHIP_MEMBER_COMPANY:
1391
- return nestedLegalEntity;
1392
- case TaskTypes.BUSINESS_DETAILS:
1393
- default:
1394
- return legalEntityResponse;
1395
- }
1396
- })();
1397
- const handleSubmitLegalEntity = async (legalEntity) => {
1398
- if (taskType === TaskTypes.TRUST_MEMBER_COMPANY && !nestedLegalEntity?.id || taskType === TaskTypes.UNINCORPORATED_PARTNERSHIP_MEMBER_COMPANY && !nestedLegalEntity?.id || taskType === TaskTypes.SOLE_PROPRIETOR_COMPANY && !associatedLegalArrangement?.id) {
1399
- return await createLegalEntity(legalEntity);
1400
- } else {
1401
- return handleUpdateLegalEntity({
1402
- ...drop("type").from(legalEntity),
1403
- id: entityToUpdate?.id ?? legalEntityResponse.id
1404
- });
1405
- }
1406
- };
1407
- const associateLegalEntityWithParent = async ({
1408
- legalEntity,
1409
- associatedLegalArrangement: associatedLegalArrangement2,
1410
- nestedLegalEntityDetails: nestedLegalEntityDetails2
1411
- }) => {
1412
- if (nestedLegalEntityDetails2 && associatedLegalArrangement2) {
1413
- const existingEntityAssociations = getOwnEntityAssociations(associatedLegalArrangement2);
1414
- const existingRoles = existingEntityAssociations.filter((ea) => ea.legalEntityId === associatedLegalArrangement2.id).map(({ type }) => type);
1415
- const newRoles = nestedLegalEntityDetails2?.roles ?? [];
1416
- const rolesChanged = !doArraysMatch(existingRoles, newRoles);
1417
- if (rolesChanged) {
1418
- const updatedAssociations = {
1419
- entityAssociations: [
1420
- ...newRoles.map((role) => ({
1421
- type: role,
1422
- legalEntityId: legalEntity.id
1423
- })) || [],
1424
- ...existingEntityAssociations.filter((ea) => ea.legalEntityId !== legalEntity.id) || []
1425
- ]
1426
- };
1427
- await handleUpdateLegalEntity({
1428
- ...updatedAssociations,
1429
- id: associatedLegalArrangement2.id
1430
- });
1431
- }
1432
- return;
1433
- } else {
1434
- const updatedAssociations = {
1435
- entityAssociations: [
1436
- {
1437
- type: LegalEntityTypes.SOLE_PROPRIETORSHIP,
1438
- legalEntityId: legalEntity.id
1439
- }
1440
- ]
1441
- };
1442
- await handleUpdateLegalEntity({ ...updatedAssociations, id: legalEntityResponse.id });
1443
- }
1444
- };
1445
- const savedLegalEntityData = legalEntityResponse ? mapLegalEntityToBusinessDetailsSchema(legalEntityResponse, void 0, isExperimentEnabled) : null;
1446
- const filteredData = savedLegalEntityData ? setRemovedFieldsOnSchemaToDeletedValue(data, savedLegalEntityData) : data;
1447
- if (filteredData?.additionalInformation && !filteredData?.additionalInformation?.taxInformation) {
1448
- filteredData.additionalInformation.taxInformation = void 0;
1449
- }
1450
- const isCountryOfGoverningLawEnabled = isExperimentEnabled(
1451
- "EnableCountryOfGoverningLawForUKCompanies"
1452
- );
1453
- const countryOfGoverningLaw = getCountryOfGoverningLaw(
1454
- isCountryOfGoverningLawEnabled,
1455
- filteredData?.basicInformation
1456
- );
1457
- if (filteredData?.basicInformation) {
1458
- if (countryOfGoverningLaw) {
1459
- filteredData.basicInformation.countryOfGoverningLaw = countryOfGoverningLaw;
1460
- } else {
1461
- delete filteredData.basicInformation.countryOfGoverningLaw;
1462
- }
1463
- }
1464
- try {
1465
- const mappedLegalEntity = {
1466
- ...mapBusinessDetailsSchemaToLegalEntity(filteredData, accountHolder, isExperimentEnabled),
1467
- entityAssociations: filterOutUnwantedAssociationsIfRootLE(
1468
- taskType,
1469
- entityToUpdate,
1470
- accountHolder
1471
- )
1472
- };
1473
- const legalEntity = await handleSubmitLegalEntity(mappedLegalEntity);
1474
- if (taskType === TaskTypes.TRUST_MEMBER_COMPANY || taskType === TaskTypes.UNINCORPORATED_PARTNERSHIP_MEMBER_COMPANY || taskType === TaskTypes.SOLE_PROPRIETOR_COMPANY && !associatedLegalArrangement?.id) {
1475
- await associateLegalEntityWithParent({
1476
- legalEntity,
1477
- associatedLegalArrangement,
1478
- nestedLegalEntityDetails
1479
- });
1480
- }
1481
- await submitDocuments({
1482
- data,
1483
- legalEntity,
1484
- additionalTrackingParams,
1485
- documentUtils,
1486
- forms,
1487
- userEvents
1488
- });
1489
- userEvents?.addTaskEvent("Success", trackingPayload);
1490
- showToast({ label: i18n.get("successfullyUpdatedDetails"), variant: "success" });
1491
- onExternalSubmit?.(data);
1492
- } catch (err) {
1493
- if (isValidationError(err)) {
1494
- const getErrors = processValidationErrors(err, TaskTypes.BUSINESS_DETAILS);
1495
- if (getErrors && !Object.keys(getErrors).length) {
1496
- showToast({ label: i18n.get("failedToUpdateDetails"), variant: "error" });
1497
- const unmappedErrorNames = err.invalidFields?.map((field) => field.name).filter(Boolean) ?? [];
1498
- if (unmappedErrorNames.length) {
1499
- trackingPayload = {
1500
- ...trackingPayload,
1501
- additionalData: { unmappedErrorNames }
1502
- };
1503
- }
1504
- } else {
1505
- setProblems({
1506
- ...problems,
1507
- validationErrors: getErrors
1508
- });
1509
- }
1510
- }
1511
- if (isMaintenanceModeError(err)) {
1512
- showToast({
1513
- label: i18n.get("maintenanceModeMessage"),
1514
- variant: "error",
1515
- duration: "indefinite"
1516
- });
1517
- }
1518
- if (!isValidationError(err) && !isMaintenanceModeError(err)) {
1519
- showToast({ label: i18n.get("failedToUpdateDetails"), variant: "error" });
1520
- }
1521
- logger.error(err);
1522
- userEvents?.addTaskEvent("Encountered error", {
1523
- ...trackingPayload,
1524
- returnType: err?.errorCode,
1525
- returnValue: err?.title || "backend"
1526
- });
1527
- } finally {
1528
- setLoadingStatus("success");
1529
- }
1530
- }
1531
- const getCountryOfGoverningLaw = (isCountryOfGoverningLawEnabled, basicData) => {
1532
- if (!isCountryOfGoverningLawEnabled || basicData?.country !== CountryCodes.UnitedKingdom) {
1533
- return void 0;
1534
- }
1535
- if (isCountryOfGoverningLawEnabled && basicData?.country === CountryCodes.UnitedKingdom && !basicData?.countryOfGoverningLaw) {
1536
- return CountryCodes.UnitedKingdom;
1537
- }
1538
- return basicData?.countryOfGoverningLaw;
1539
- };
1540
- function BusinessDetailsDropin({
1541
- country,
1542
- problems,
1543
- legalEntityResponse,
1544
- associatedLegalArrangement,
1545
- // initially undefined when creating entity
1546
- nestedLegalEntity,
1547
- // initially undefined when creating entity
1548
- nestedLegalEntityDetails,
1549
- // has entity roles for association logic
1550
- taskName,
1551
- hideSidebar,
1552
- taskType,
1553
- onChange,
1554
- onSubmit: onExternalSubmit,
1555
- handleHomeClick
1556
- }) {
1557
- const formRef = useRef(null);
1558
- const { accountHolder, setAccountHolder } = useAccountHolder();
1559
- const { showToast } = useToastContext();
1560
- const { i18n } = useI18nContext();
1561
- const userEvents = useAnalyticsContext();
1562
- const { isExperimentEnabled } = useExperimentsContext();
1563
- const { isSettingEnabled } = useSettingsContext();
1564
- const { baseUrl, rootLegalEntityId } = useApiContext();
1565
- const verifiedBusiness$1 = verifiedBusiness.value;
1566
- const queryClient = useQueryClient();
1567
- const {
1568
- state: { currentState }
1569
- } = useStateContext();
1570
- useEffect(() => {
1571
- onChange?.(currentState);
1572
- }, [currentState, onChange]);
1573
- const isSoleProp = accountHolder === "mySoleProprietorName";
1574
- const formWith2Views = "basicInformation";
1575
- const isAssociationTaskType = !taskType ? accountHolder !== "theCompanyIWorkFor" : taskType !== TaskTypes.BUSINESS_DETAILS;
1576
- const legalEntityType = !isSoleProp ? LegalEntityTypes.ORGANIZATION : LegalEntityTypes.SOLE_PROPRIETORSHIP;
1577
- const isUS = country === CountryCodes.UnitedStates;
1578
- const currentCountry = currentState.data.basicInformation?.country ?? country;
1579
- const isSkippingCompanyStructure = isSettingEnabled(SettingNames.AllowLegalEntityTypeChange) && organizationTypesToSkipCompanyStructureForm.includes(
1580
- legalEntityResponse?.organization?.type
1581
- ) && accountHolder !== "aTrust" && accountHolder !== "anUnincorporatedPartnership" || isSoleProp;
1582
- useEffect(() => {
1583
- const isBankAccountRequested = legalEntityResponse?.capabilities?.issueBankAccount?.requested;
1584
- setIsBankAccountRequestedForOrganization(isBankAccountRequested);
1585
- }, [legalEntityResponse]);
1586
- const subjectEntity = !isAssociationTaskType ? legalEntityResponse : isSoleProp ? associatedLegalArrangement : nestedLegalEntity;
1587
- const associatedLeTrackingParams = useMemo(
1588
- () => getAssociatedLeAnalyticsPayload({
1589
- associatedLegalEntity: associatedLegalArrangement
1590
- }),
1591
- [associatedLegalArrangement]
1592
- );
1593
- useEffect(() => {
1594
- userEvents.updateBaseTrackingPayload({ task: taskType });
1595
- userEvents.addTaskEvent("Landed on page", {
1596
- actionType: "start",
1597
- ...subjectEntity?.id && subjectEntity?.type && {
1598
- legalEntityId: subjectEntity.id,
1599
- entityType: subjectEntity.type
1600
- },
1601
- ...associatedLeTrackingParams
1602
- });
1603
- }, []);
1604
- const [tinMatched, setTinMatched] = useState(void 0);
1605
- const [initialData, setInitialData] = useState(() => {
1606
- return mapLegalEntityToBusinessDetailsSchema(
1607
- !isAssociationTaskType ? legalEntityResponse : isSoleProp ? associatedLegalArrangement ?? legalEntityResponse : nestedLegalEntity,
1608
- isSoleProp ? legalEntityResponse : void 0,
1609
- isExperimentEnabled
1610
- );
1611
- });
1612
- const [trustedFields, setTrustedFields] = useState(subjectEntity?.trustedFields ?? void 0);
1613
- const [currentProblems, setCurrentProblems] = useState(
1614
- problems ?? getCapabilityProblems(legalEntityResponse, currentCountry)?.LegalEntity?.[legalEntityResponse.id] ?? {}
1615
- );
1616
- const [showCompanyStructure, setShowCompanyStructure] = useState(
1617
- currentCountry !== "US" && !isSoleProp
1618
- );
1619
- const [showBusinessSelection, setShowBusinessSelection] = useState(false);
1620
- const [loadingStatus, setLoadingStatus] = useState("success");
1621
- const [businessMismatchModalOpen, setBusinessMismatchModalOpen] = useState(false);
1622
- const [companySearchParams, setCompanySearchParams] = useState({
1623
- legalCompanyName: void 0,
1624
- country: void 0,
1625
- stateOrProvince: void 0,
1626
- registrationNumber: void 0
1627
- });
1628
- const [singleCompanyDatasetParams, setSingleCompanyDatasetParams] = useState();
1629
- const documentUtils = documentApiUtils({
1630
- baseUrl: baseUrl.value,
1631
- rootLegalEntityId: rootLegalEntityId.value
1632
- });
1633
- useEffect(() => {
1634
- if (!subjectEntity?.documentDetails?.length) return;
1635
- documentUtils.fetchDocuments(subjectEntity.documentDetails, subjectEntity.id).then(() => {
1636
- setInitialData(
1637
- mapLegalEntityToBusinessDetailsSchema(
1638
- subjectEntity,
1639
- isSoleProp ? legalEntityResponse : void 0
1640
- )
1641
- );
1642
- }).catch(
1643
- () => showToast({ label: i18n.get("failedToFetchRelevantDocuments"), variant: "error" })
1644
- );
1645
- }, []);
1646
- const parseConfiguration = useCallback(
1647
- ({ scenarios }) => composePerScenarioFormConfigurations(scenarios, businessDetailsFieldsPerScenario),
1648
- []
1649
- );
1650
- const {
1651
- fieldConfigurations
1652
- } = useScenarioConfiguration({
1653
- legalEntityType,
1654
- parseConfiguration,
1655
- setLoadingStatus,
1656
- country: currentCountry
1657
- });
1658
- const customRules = useMemo(
1659
- () => rules({
1660
- data: currentState.data,
1661
- country: currentCountry,
1662
- taskType: taskType ?? TaskTypes.BUSINESS_DETAILS,
1663
- isExperimentEnabled,
1664
- accountHolder,
1665
- tinMatched,
1666
- rootLegalEntity: legalEntityResponse
1667
- }),
1668
- [
1669
- currentState.data,
1670
- currentCountry,
1671
- taskType,
1672
- isExperimentEnabled,
1673
- accountHolder,
1674
- tinMatched,
1675
- legalEntityResponse
1676
- ]
1677
- );
1678
- const initialForms = useMemo(() => getForms(currentCountry), [currentCountry]);
1679
- const derivedProps = useMemo(
1680
- () => getPropsFromConfigurations(
1681
- fieldConfigurations,
1682
- initialForms,
1683
- currentProblems?.remediationActions ? Object.values(currentProblems?.remediationActions) : [],
1684
- currentProblems?.missingData ?? [],
1685
- subjectEntity ? subjectEntity.type === LegalEntityTypes.SOLE_PROPRIETORSHIP ? getFieldsWithExistingData(
1686
- subjectEntity,
1687
- solePropBusinessDetailsApiKeyMapping,
1688
- solePropBusinessDetailsDocumentMapping
1689
- ) : getFieldsWithExistingData(
1690
- subjectEntity,
1691
- businessDetailsApiKeyMapping,
1692
- businessDetailsDocumentMapping
1693
- ) : [],
1694
- customRules,
1695
- {},
1696
- {},
1697
- subjectEntity?.type,
1698
- trustedFields
1699
- ),
1700
- [
1701
- fieldConfigurations,
1702
- initialForms,
1703
- currentProblems?.remediationActions,
1704
- currentProblems?.missingData,
1705
- subjectEntity,
1706
- customRules,
1707
- trustedFields
1708
- ]
1709
- );
1710
- const {
1711
- data: companySearchResponse,
1712
- isLoading: searchingCompanies,
1713
- isError: searchingError
1714
- } = useCompanySearch(
1715
- {
1716
- name: companySearchParams.legalCompanyName ?? "",
1717
- country: companySearchParams.country,
1718
- state: companySearchParams.stateOrProvince,
1719
- registrationNumber: companySearchParams.registrationNumber
1720
- },
1721
- {
1722
- enabled: showBusinessSelection
1723
- }
1724
- );
1725
- const companySearchResults = companySearchResponse?.results;
1726
- const businessName = currentState?.data?.basicInformation?.legalCompanyName || "";
1727
- const nameMatch = isNormalizedStringMatch(businessName, companySearchResults?.[0]?.name ?? "");
1728
- const taxInformation = currentState?.data?.basicInformation?.taxInformation;
1729
- const tin = taxInformation?.find((taxId) => currentCountry === taxId.country)?.number || "";
1730
- const [prevCompanySearchResults, setPrevCompanySearchResults] = useState(companySearchResults);
1731
- useEffect(() => {
1732
- if (!searchingCompanies && companySearchResults) {
1733
- userEvents.addPageEvent("Success", {
1734
- actionType: "submit",
1735
- label: "companySearch",
1736
- additionalData: {
1737
- numberOfResults: companySearchResults.length
1738
- },
1739
- ...subjectEntity?.id && subjectEntity?.type && {
1740
- legalEntityId: subjectEntity.id,
1741
- entityType: subjectEntity.type
1742
- },
1743
- ...associatedLeTrackingParams
1744
- });
1745
- }
1746
- }, [
1747
- searchingCompanies,
1748
- companySearchResults,
1749
- userEvents,
1750
- subjectEntity,
1751
- associatedLeTrackingParams
1752
- ]);
1753
- const {
1754
- data: singleCompanyDatasetAndTinResponse,
1755
- isLoading: fetchingDataset,
1756
- refetch: getCompanySelection
1757
- } = useCompanySelection(singleCompanyDatasetParams, {
1758
- enabled: !!singleCompanyDatasetParams && showBusinessSelection
1759
- });
1760
- const { refetch: fetchTin } = useVerifyTin({ name: businessName, tin }, { enabled: false });
1761
- const forms = useMemo(() => {
1762
- const requiredForms = getRequiredForms(
1763
- initialForms,
1764
- derivedProps?.requiredFields,
1765
- derivedProps?.optionalFields
1766
- );
1767
- const validityAddedForms = addValidityToForms(
1768
- requiredForms,
1769
- currentState.validityByForm,
1770
- currentProblems
1771
- );
1772
- return removeConditionalForms(
1773
- validityAddedForms,
1774
- currentCountry !== "US" || accountHolder !== "theCompanyIWorkFor" ? isSkippingCompanyStructure : !showCompanyStructure
1775
- );
1776
- }, [
1777
- initialForms,
1778
- derivedProps?.requiredFields,
1779
- derivedProps?.optionalFields,
1780
- currentState.validityByForm,
1781
- currentProblems,
1782
- currentCountry,
1783
- isSkippingCompanyStructure,
1784
- showCompanyStructure
1785
- ]);
1786
- const summaryData = useMemo(
1787
- () => ({
1788
- data: formatDataForSummary(
1789
- currentState.data,
1790
- forms,
1791
- derivedProps?.labels,
1792
- i18n,
1793
- isExperimentEnabled
1794
- ),
1795
- omitted: {
1796
- keys: ["operationalAddressIsSame"]
1797
- }
1798
- }),
1799
- [currentState.data, derivedProps?.labels, forms, i18n, isExperimentEnabled]
1800
- );
1801
- const canSubmitForm = useMemo(
1802
- () => canSubmit(currentState.data) && hasDataChanged(initialData, currentState.data),
1803
- [initialData, currentState.data]
1804
- );
1805
- const { mutateAsync: createLegalEntity } = useCreateLegalEntity();
1806
- const { mutateAsync: updateLegalEntity } = useUpdateLegalEntity();
1807
- const { mutateAsync: clearCompanyData, isPending: resettingTrustedData } = useClearCompanyData();
1808
- const submitTask = useCallback(() => {
1809
- setAccountHolder(accountHolder);
1810
- return submit({
1811
- additionalTrackingParams: associatedLeTrackingParams,
1812
- data: currentState.data,
1813
- legalEntityResponse,
1814
- associatedLegalArrangement,
1815
- nestedLegalEntity,
1816
- nestedLegalEntityDetails,
1817
- problems: currentProblems,
1818
- taskType: taskType ?? TaskTypes.BUSINESS_DETAILS,
1819
- accountHolder: accountHolder ?? "theCompanyIWorkFor",
1820
- forms,
1821
- documentUtils,
1822
- i18n,
1823
- showToast,
1824
- setLoadingStatus,
1825
- setProblems: setCurrentProblems,
1826
- handleUpdateLegalEntity: updateLegalEntity,
1827
- createLegalEntity,
1828
- onExternalSubmit,
1829
- isExperimentEnabled,
1830
- userEvents
1831
- });
1832
- }, [
1833
- setAccountHolder,
1834
- accountHolder,
1835
- associatedLeTrackingParams,
1836
- currentState.data,
1837
- legalEntityResponse,
1838
- associatedLegalArrangement,
1839
- nestedLegalEntity,
1840
- nestedLegalEntityDetails,
1841
- currentProblems,
1842
- taskType,
1843
- forms,
1844
- documentUtils,
1845
- i18n,
1846
- showToast,
1847
- updateLegalEntity,
1848
- createLegalEntity,
1849
- onExternalSubmit,
1850
- isExperimentEnabled,
1851
- userEvents
1852
- ]);
1853
- const {
1854
- handleNextClick,
1855
- handleBackClick,
1856
- activeForm,
1857
- shouldValidate,
1858
- setShouldValidate,
1859
- gotoFormByFormIndex,
1860
- steps
1861
- } = useFormComposer({
1862
- problems: currentProblems,
1863
- navigationTrackingParams: associatedLeTrackingParams,
1864
- forms,
1865
- onSubmit: submitTask
1866
- });
1867
- const loading = fetchingDataset || searchingCompanies || resettingTrustedData;
1868
- const proceedToManualDataEntry = useCallback(async () => {
1869
- await clearCompanyData().then(async () => {
1870
- if (!isUS) {
1871
- setShowCompanyStructure(true);
1872
- return;
1873
- }
1874
- if (!businessName || !tin) {
1875
- setShowCompanyStructure(true);
1876
- return;
1877
- }
1878
- const { data: refetchedTinResponse } = await fetchTin();
1879
- if (refetchedTinResponse?.matched === true) {
1880
- setShowCompanyStructure(true);
1881
- setBusinessMismatchModalOpen(false);
1882
- } else {
1883
- setBusinessMismatchModalOpen(true);
1884
- setTinMatched(false);
1885
- if (subjectEntity?.id && subjectEntity?.type) {
1886
- userEvents.addPageEvent("Encountered error", {
1887
- actionType: "submit",
1888
- label: "tinVerificationFailure",
1889
- legalEntityId: subjectEntity.id,
1890
- entityType: subjectEntity.type,
1891
- ...associatedLeTrackingParams
1892
- });
1893
- }
1894
- }
1895
- });
1896
- }, [
1897
- clearCompanyData,
1898
- isUS,
1899
- businessName,
1900
- tin,
1901
- getCompanySelection,
1902
- subjectEntity?.id,
1903
- subjectEntity?.type,
1904
- associatedLeTrackingParams,
1905
- userEvents
1906
- ]);
1907
- if (prevCompanySearchResults !== companySearchResults) {
1908
- if (companySearchResults?.length === 1 && nameMatch) {
1909
- setSingleCompanyDatasetParams({
1910
- company: companySearchResults[0],
1911
- state: currentState.data.basicInformation?.stateOrProvince,
1912
- name: businessName,
1913
- tin
1914
- });
1915
- } else if (companySearchResults?.length === 0 && !searchingCompanies && showBusinessSelection) {
1916
- proceedToManualDataEntry();
1917
- }
1918
- setPrevCompanySearchResults(companySearchResults);
1919
- }
1920
- const [prevSingleCompanyDatasetResponse, setPrevSingleCompanyDatasetResponse] = useState(
1921
- singleCompanyDatasetAndTinResponse
1922
- );
1923
- if (prevSingleCompanyDatasetResponse !== singleCompanyDatasetAndTinResponse) {
1924
- if (singleCompanyDatasetAndTinResponse?.tinMatched === true) {
1925
- setVerifiedBusiness(singleCompanyDatasetAndTinResponse);
1926
- handleNextClick();
1927
- } else {
1928
- setBusinessMismatchModalOpen(true);
1929
- setTinMatched(false);
1930
- }
1931
- setPrevSingleCompanyDatasetResponse(singleCompanyDatasetAndTinResponse);
1932
- }
1933
- useEffect(() => {
1934
- if (searchingError) {
1935
- proceedToManualDataEntry();
1936
- }
1937
- }, [searchingError]);
1938
- const isBusinessSelection = showBusinessSelection && activeForm.formId === formWith2Views;
1939
- const hideFooter = isBusinessSelection === true && loading;
1940
- const hideNextButton = activeForm.formId === formWith2Views ? isBusinessSelection : false;
1941
- const showBackButton = !COUNTRIES_USING_COMPANY_SEARCH.includes(currentCountry) ? false : isBusinessSelection ? loading : false;
1942
- const goToForm = useCallback(
1943
- (index) => {
1944
- if (!COUNTRIES_USING_COMPANY_SEARCH.includes(currentCountry)) {
1945
- return gotoFormByFormIndex(index);
1946
- }
1947
- const selectedFormId = forms[index].formId;
1948
- if (selectedFormId === formWith2Views) {
1949
- if (verifiedBusiness$1) setShowBusinessSelection(false);
1950
- if (activeForm.formId === "companyStructure" && companySearchResults?.length) {
1951
- setShowCompanyStructure(false);
1952
- }
1953
- return gotoFormByFormIndex(index);
1954
- } else {
1955
- if (verifiedBusiness$1) return gotoFormByFormIndex(index);
1956
- if (activeForm.formId !== formWith2Views) return gotoFormByFormIndex(index);
1957
- if (activeForm.formId === formWith2Views && !isBusinessSelection) {
1958
- setShowBusinessSelection(true);
1959
- }
1960
- }
1961
- },
1962
- [
1963
- currentCountry,
1964
- forms,
1965
- gotoFormByFormIndex,
1966
- verifiedBusiness$1,
1967
- activeForm.formId,
1968
- companySearchResults?.length,
1969
- isBusinessSelection
1970
- ]
1971
- );
1972
- const nextClick = useCallback(() => {
1973
- if (!COUNTRIES_USING_COMPANY_SEARCH.includes(currentCountry) || accountHolder !== "theCompanyIWorkFor")
1974
- return handleNextClick();
1975
- if (activeForm.formId === formWith2Views && currentState.validityByForm?.basicInformation && !isBusinessSelection && !verifiedBusiness$1) {
1976
- setCompanySearchParams({
1977
- legalCompanyName: currentState?.data?.basicInformation?.legalCompanyName ?? "",
1978
- country: currentState?.data.basicInformation?.country ?? country,
1979
- stateOrProvince: currentState?.data.basicInformation?.stateOrProvince,
1980
- registrationNumber: currentState?.data.basicInformation?.registrationNumber
1981
- });
1982
- setShowBusinessSelection(true);
1983
- } else {
1984
- handleNextClick();
1985
- }
1986
- }, [
1987
- currentCountry,
1988
- isSoleProp,
1989
- handleNextClick,
1990
- activeForm.formId,
1991
- currentState.validityByForm?.basicInformation,
1992
- currentState?.data.basicInformation?.legalCompanyName,
1993
- currentState?.data.basicInformation?.country,
1994
- currentState?.data.basicInformation?.stateOrProvince,
1995
- currentState?.data.basicInformation?.registrationNumber,
1996
- isBusinessSelection,
1997
- verifiedBusiness$1,
1998
- country
1999
- ]);
2000
- const backClick = useCallback(() => {
2001
- if (!COUNTRIES_USING_COMPANY_SEARCH.includes(currentCountry)) handleBackClick?.();
2002
- else {
2003
- switch (activeForm.formId) {
2004
- case formWith2Views: {
2005
- if (showBusinessSelection) setShowBusinessSelection(false);
2006
- break;
2007
- }
2008
- case "companyStructure": {
2009
- if (searchingError) {
2010
- setShowBusinessSelection(false);
2011
- setShowCompanyStructure(false);
2012
- handleBackClick?.();
2013
- break;
2014
- }
2015
- if (!searchingCompanies && companySearchResults && !companySearchResults.length) {
2016
- setShowBusinessSelection(false);
2017
- } else if (!verifiedBusiness$1) setShowCompanyStructure(false);
2018
- handleBackClick?.();
2019
- break;
2020
- }
2021
- case "additionalInformation": {
2022
- if (verifiedBusiness$1) setShowBusinessSelection(false);
2023
- handleBackClick?.();
2024
- break;
2025
- }
2026
- default:
2027
- handleBackClick?.();
2028
- break;
2029
- }
2030
- }
2031
- }, [
2032
- currentCountry,
2033
- handleBackClick,
2034
- activeForm.formId,
2035
- showBusinessSelection,
2036
- searchingError,
2037
- searchingCompanies,
2038
- companySearchResults,
2039
- verifiedBusiness$1
2040
- ]);
2041
- const homeClick = () => {
2042
- handleHomeClick?.();
2043
- };
2044
- const handleBusinessMismatchContinue = useCallback(() => {
2045
- setShowCompanyStructure(true);
2046
- setTrustedFields([]);
2047
- setBusinessMismatchModalOpen(false);
2048
- }, [setShowCompanyStructure, setTrustedFields, setBusinessMismatchModalOpen]);
2049
- const handleBusinessMismatchCancel = useCallback(() => {
2050
- backClick?.();
2051
- setBusinessMismatchModalOpen(false);
2052
- setTinMatched(void 0);
2053
- }, [backClick, setTinMatched, setBusinessMismatchModalOpen]);
2054
- const resetBusinessData = useCallback(() => {
2055
- queryClient.resetQueries({
2056
- queryKey: [
2057
- "companySearch",
2058
- {
2059
- name: companySearchParams.legalCompanyName ?? "",
2060
- country: companySearchParams.country,
2061
- state: companySearchParams.stateOrProvince,
2062
- registrationNumber: companySearchParams.registrationNumber
2063
- }
2064
- ]
2065
- });
2066
- setVerifiedBusiness(void 0);
2067
- }, [
2068
- companySearchParams.country,
2069
- companySearchParams.legalCompanyName,
2070
- companySearchParams.registrationNumber,
2071
- companySearchParams.stateOrProvince,
2072
- queryClient
2073
- ]);
2074
- useEffect(() => {
2075
- if (verifiedBusiness$1?.name && currentState.data.basicInformation?.legalCompanyName !== verifiedBusiness$1?.name && (currentState.data.basicInformation?.legalCompanyName !== companySearchParams.legalCompanyName || currentState.data.basicInformation?.stateOrProvince !== companySearchParams.stateOrProvince)) {
2076
- setShowCompanyStructure(false);
2077
- resetBusinessData();
2078
- }
2079
- }, [
2080
- companySearchParams,
2081
- currentState.data.basicInformation,
2082
- currentState.data.basicInformation?.legalCompanyName,
2083
- resetBusinessData,
2084
- verifiedBusiness$1
2085
- ]);
2086
- const [prevCurrentCountry, setPrevCurrentCountry] = useState(currentCountry);
2087
- if (prevCurrentCountry !== currentCountry && trustedFields?.length && legalEntityResponse.organization?.registeredAddress.country !== currentCountry) {
2088
- setTrustedFields(void 0);
2089
- setPrevCurrentCountry(currentCountry);
2090
- }
2091
- return /* @__PURE__ */ jsxs(
2092
- FormWrapper,
2093
- {
2094
- taskName: taskName ?? "businessDetails",
2095
- gotoFormByFormIndex: goToForm,
2096
- hideSidebar,
2097
- hideFooter,
2098
- loadingStatus,
2099
- forms,
2100
- activeForm,
2101
- validateForm: () => setShouldValidate(true),
2102
- navigationTrackingParams: associatedLeTrackingParams,
2103
- onSubmit: submitTask,
2104
- problems: currentProblems,
2105
- canSubmit: canSubmitForm,
2106
- summary: summaryData,
2107
- handleNextClick: nextClick,
2108
- handleBackClick: backClick,
2109
- handleHomeClick: homeClick,
2110
- steps,
2111
- showBackButton,
2112
- hideNextButton,
2113
- children: [
2114
- /* @__PURE__ */ jsx(
2115
- BusinessDetails,
2116
- {
2117
- ...derivedProps,
2118
- ref: formRef,
2119
- data: initialData,
2120
- country: currentCountry,
2121
- problems: currentProblems,
2122
- activeForm,
2123
- shouldValidate,
2124
- isTopLevelEntity: taskType === TaskTypes.BUSINESS_DETAILS,
2125
- showBusinessSelection,
2126
- setShowBusinessSelection,
2127
- showCompanyStructure,
2128
- setShowCompanyStructure,
2129
- searchResults: companySearchResults,
2130
- loading,
2131
- proceedToManualDataEntry,
2132
- handleNextClick: nextClick,
2133
- taskType
2134
- }
2135
- ),
2136
- businessMismatchModalOpen && /* @__PURE__ */ jsx(
2137
- Confirm,
2138
- {
2139
- title: i18n.get("businessSelection__tinVerificationFailureModalHeader"),
2140
- description: i18n.get("businessSelection__tinVerificationFailureModalContent"),
2141
- cancelText: i18n.get("businessSelection__tinVerificationFailureModalSecondaryButton"),
2142
- confirmText: i18n.get("businessSelection__tinVerificationFailureModalPrimaryButton"),
2143
- onCancel: handleBusinessMismatchCancel,
2144
- onConfirm: handleBusinessMismatchContinue
2145
- }
2146
- )
2147
- ]
2148
- }
2149
- );
2150
- }
2151
- export {
2152
- BusinessDetailsDropin as B,
2153
- ProofOfOwnershipDocument as P,
2154
- RegistrationDocument as R,
2155
- TaxDocument as T,
2156
- ProofOfSignatoryDocument as a,
2157
- ProofOfDirectorDocument as b,
2158
- mapLegalEntityToBusinessDetailsSchema as c,
2159
- businessDetailsFieldsPerScenario as d,
2160
- formatDataForSummary as f,
2161
- mapApiDocumentToBusinessDetailsDocuments as m,
2162
- submit as s
2163
- };