@adyen/kyc-components 4.0.0-compact.4 → 4.0.0-compact.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 (754) hide show
  1. package/dist/{4-people-BzyXLUF9.js → 4-people-BtDi7O9A.js} +2 -2
  2. package/dist/{AcceptTermsOfServiceComponent-BpEgUWXz.js → AcceptTermsOfServiceComponent-BFqDontt.js} +37 -29
  3. package/dist/{Accordion-C7tT1-lq.js → Accordion-B2vSnESS.js} +2 -2
  4. package/dist/{AccountSetupRejected-Bx9bf2P2.js → AccountSetupRejected-f8rcBzZj.js} +4 -4
  5. package/dist/{ActionBar-BYag3Mhx.js → ActionBar-CijauUSe.js} +2 -2
  6. package/dist/{Address-BG5_sFfZ.js → Address-Bj7zJ6yZ.js} +83 -288
  7. package/dist/{Alert-CjdHpM1t.js → Alert-CFmX9yNV.js} +3 -3
  8. package/dist/{Avatar-BbYg2DuO.js → Avatar-DWU7t_0U.js} +2 -2
  9. package/dist/{BusinessFinancingComponent-C6IiU1SV.js → BusinessFinancingComponent-_DvatBRp.js} +7 -7
  10. package/dist/{BusinessFinancingDropin-BGSfIRyw.js → BusinessFinancingDropin-BuATaIOz.js} +691 -300
  11. package/dist/{BusinessFinancingPage-B6B4tyGt.js → BusinessFinancingPage-Bpu78Ynn.js} +5 -5
  12. package/dist/{BusinessTypeSelectionPage-0jkL0xW-.js → BusinessTypeSelectionPage-gsT7g7u8.js} +59 -39
  13. package/dist/Card-OQuFzmxm.js +90 -0
  14. package/dist/{debouncedInputEvent-BdLyqQK5.js → Checkbox-5Sc5pzsh.js} +3 -38
  15. package/dist/Confirm-C0J_JwMM.js +64 -0
  16. package/dist/ConstitutionalDocument-Bw5T0g5Q.js +2361 -0
  17. package/dist/ContactDetails-CXTim9KR.js +396 -0
  18. package/dist/ContextGuidance-074d6FWy.js +34 -0
  19. package/dist/{ContractViewer-Byp71k2e.js → ContractViewer-DcQHIGMU.js} +2 -2
  20. package/dist/CountryField-DxZlK1rV.js +66 -0
  21. package/dist/CreateIndividualComponent-BppUrKMC.js +65 -0
  22. package/dist/{CreateTransferInstrumentComponent-BNvXg6_9.js → CreateTransferInstrumentComponent-Cl2NOJb6.js} +6 -13
  23. package/dist/{Currency-DpseKPZa.js → Currency-CIgj9KwH.js} +68 -13
  24. package/dist/{CustomerSupport-BzpGH7XC.js → CustomerSupport-UenL9SqQ.js} +13 -10
  25. package/dist/{DebugModal-DyH69DXv.js → DebugModal-KXKodU9u.js} +12 -9
  26. package/dist/{DecisionMakerDetailsPage-BiCWUl-E.js → DecisionMakerDetailsPage-Xwe1qYtH.js} +19 -21
  27. package/dist/{DecisionMakers-WTQe_49J.js → DecisionMakers-CJDodZSl.js} +41 -25
  28. package/dist/Dropzone-kpihpy7N.js +224 -0
  29. package/dist/{EmbeddedStatus-CcwyilpG.js → EmbeddedStatus-BJjPDUeS.js} +3 -3
  30. package/dist/{EndStateLayout-DUFAp0sp.js → EndStateLayout-Cx1NUGVq.js} +2 -2
  31. package/dist/EntityAssociation-BtQeHZOq.js +178 -0
  32. package/dist/{EntityGuidanceStatus-Bpa8WnR_.js → EntityGuidanceStatus-DyMVy3R4.js} +4 -3
  33. package/dist/ErrorPanel-CAALFKmE.js +194 -0
  34. package/dist/Field-Bs7wGDqk.js +141 -0
  35. package/dist/{FormNavigation-BP2ZV8AF.js → FormNavigation-BtSvWPRY.js} +3 -3
  36. package/dist/{FormWrapper-D2abCVld.js → FormWrapper-B3N3YosC.js} +10 -10
  37. package/dist/Header-vslG1ugE.js +83 -0
  38. package/dist/Image-CAucF9wz.js +27 -0
  39. package/dist/Individual.rules-CP2tzjmO.js +383 -0
  40. package/dist/IndividualDropin-xfXkDkrM.js +5168 -0
  41. package/dist/InputDate-CLxqciJA.js +43 -0
  42. package/dist/InputGroup-WBfGDV5F.js +32 -0
  43. package/dist/InputText-BdCbTzL9.js +134 -0
  44. package/dist/{Introduction-Ee8931m9.js → Introduction-BRWdnVv5.js} +4 -4
  45. package/dist/{JpAddress-Br78ZY9o.js → JpAddress-BSEenMj0.js} +62 -28
  46. package/dist/LandingLayout-kl7TkBGx.js +60 -0
  47. package/dist/LegalCompanyNameField-DzAxAnD9.js +138 -0
  48. package/dist/{LegalRepresentativeDetailsPage-kZbXv8m2.js → LegalRepresentativeDetailsPage--yY_D66i.js} +7 -12
  49. package/dist/Link-CXYU8cLY.js +35 -0
  50. package/dist/List-BAzyC6sw.js +83 -0
  51. package/dist/{ListItem-DKLPtRMQ.js → ListItem-HD5_HiQ2.js} +3 -3
  52. package/dist/LoaderWrapper-C2PvjjQc.js +42 -0
  53. package/dist/{ManageIndividualComponent-CrAC6lmI.js → ManageIndividualComponent-BGaAbJjj.js} +5 -5
  54. package/dist/{ManageTermsOfServiceComponent-D188174Y.js → ManageTermsOfServiceComponent-DFjaajE4.js} +5 -5
  55. package/dist/{ManageTransferInstrumentComponent-DDIhJrq3.js → ManageTransferInstrumentComponent-Dndkwh_d.js} +20 -15
  56. package/dist/{Spacer-BT5nYRXK.js → MaskedInput-BSW18fxr.js} +29 -635
  57. package/dist/{MaybeModal-QG3JQV0A.js → MaybeModal-xIjl3I31.js} +3 -3
  58. package/dist/{Modal-B8fxl0iP.js → Modal-CZ-HuGUO.js} +5 -5
  59. package/dist/Name-D6EhveoK.js +81 -0
  60. package/dist/OnboardingDropinComponent-CHtcVTHh.js +2672 -0
  61. package/dist/{PayoutDetailsDropin-D_ee4PgW.js → PayoutDetailsDropin-C2pNMAZS.js} +257 -161
  62. package/dist/Radio-BMtxBpnn.js +39 -0
  63. package/dist/RadioGroup-CxcIXYzs.js +100 -0
  64. package/dist/RadioGroupCard-Y214QWmQ.js +152 -0
  65. package/dist/{Review-BDXmgIlE.js → Review-B2NCN4h_.js} +8 -7
  66. package/dist/RootBusinessDetailsPage-hr5fLCIH.js +50 -0
  67. package/dist/{RootBusinessLinesPage-CbaRG8zg.js → RootBusinessLinesPage-DSna9haW.js} +166 -82
  68. package/dist/{RootIndividualDetailsPage-D4hpO1W0.js → RootIndividualDetailsPage-BItguz9n.js} +10 -19
  69. package/dist/{useForm-BsQfbbso.js → Select-DaCJsYNl.js} +22 -779
  70. package/dist/{SignPCIComponent-4qzKpijW.js → SignPCIComponent-C2YjBxQM.js} +16 -13
  71. package/dist/{SingpassSelection-BB6R98e_.js → SingpassSelection-B3ozCH9I.js} +9 -7
  72. package/dist/{SoleProprietorshipPage-Z5lqmwWa.js → SoleProprietorshipPage-DIzzhgjr.js} +6 -5
  73. package/dist/{SourceOfFundsPage-BA638WTW.js → SourceOfFundsPage-C3kXyE7G.js} +200 -421
  74. package/dist/Spacer-BK3jDget.js +18 -0
  75. package/dist/{StepProgressIndicator-Bs1V38Kt.js → StepProgressIndicator-BSGlNU3K.js} +2 -2
  76. package/dist/StoreProvider-99-ewU62.js +4793 -0
  77. package/dist/StructuredList-CVMZBzwq.js +61 -0
  78. package/dist/{Summary-BOSxxPjv.js → Summary-D0GcSMNn.js} +22 -6
  79. package/dist/{InputText-qTMbrUXW.js → TaskVerificationStatus-DZIw2ztV.js} +3 -123
  80. package/dist/TaxInformationField-BxQvx1zK.js +3741 -0
  81. package/dist/{TaxReportingDropin-CQzNhf9Q.js → TaxReportingDropin-BqvAQH2c.js} +38 -37
  82. package/dist/TextArea-BjsWgkR-.js +103 -0
  83. package/dist/TileGroup-C-5-VREz.js +203 -0
  84. package/dist/{TrustDetailsPage-BLNK52Za.js → TrustDetailsPage-YROGiuFJ.js} +59 -37
  85. package/dist/TrustMemberCompanyPage-Z2EuqPEI.js +68 -0
  86. package/dist/{TrustMemberIndividualPage-q2iayL78.js → TrustMemberIndividualPage-DmNp3D89.js} +13 -15
  87. package/dist/{TrustMemberRoleAndTypePage-C1WVoqKI.js → TrustMemberRoleAndTypePage-BEOtdItr.js} +136 -35
  88. package/dist/{TrustMembersOverview-5UGm_iG9.js → TrustMembersOverview-GybHMIEU.js} +14 -13
  89. package/dist/{UnincorporatedPartnershipIndividualPage-CyqUGlhC.js → UnincorporatedPartnershipIndividualPage-BCYxSTlv.js} +12 -14
  90. package/dist/{UnincorporatedPartnershipMemberCompanyPage-D_J_JQ00.js → UnincorporatedPartnershipMemberCompanyPage-Buez4OHl.js} +11 -7
  91. package/dist/{UnincorporatedPartnershipMemberRoleAndTypePage-C98KZ4pT.js → UnincorporatedPartnershipMemberRoleAndTypePage-Cfpe0BuU.js} +28 -17
  92. package/dist/{UnincorporatedPartnershipMembersOverview-C5jfbcPJ.js → UnincorporatedPartnershipMembersOverview-B3Vi088r.js} +10 -9
  93. package/dist/{VerificationErrorAlert-BJ9X1Bkv.js → VerificationErrorAlert-C6_ewC7c.js} +4 -23
  94. package/dist/{ViewVerificationStatusComponent-KnTqf4d6.js → ViewVerificationStatusComponent-DpA4jlct.js} +5 -4
  95. package/dist/accountHolderUtils-Btu9mMnM.js +66 -0
  96. package/dist/adyen-business-financing.js +8 -4
  97. package/dist/adyen-individual-configuration.js +8 -4
  98. package/dist/adyen-individual-status.js +5 -4
  99. package/dist/adyen-invited-decision-maker.js +87 -0
  100. package/dist/adyen-kyc-components.js +22 -20
  101. package/dist/adyen-onboarding.js +8 -4
  102. package/dist/adyen-terms-of-service-management.js +8 -4
  103. package/dist/adyen-terms-of-service-status.js +5 -4
  104. package/dist/adyen-transfer-instrument-configuration.js +8 -4
  105. package/dist/adyen-transfer-instrument-management.js +5 -4
  106. package/dist/adyen-verification-status.js +8 -4
  107. package/dist/{arrow-right-KxA3SvQj.js → arrow-right-BoqwUH_d.js} +2 -2
  108. package/dist/bafinUtils-CIGv_BK8.js +80 -0
  109. package/dist/{bag-BPumznWh.js → bag-BXVWLrwo.js} +2 -2
  110. package/dist/{bank-D6FiNBhs.js → bank-1GvaHPAZ.js} +2 -2
  111. package/dist/{bin-Bz6KOIeE.js → bin-Ba-3ll8T.js} +2 -2
  112. package/dist/{business-lines-DboUCbXw.js → business-lines-BAqTbnBw.js} +2 -2
  113. package/dist/{capital-GVQ3svwN.js → capital-9TKHySO7.js} +2 -2
  114. package/dist/{cash-stack-D9AoDDwt.js → cash-stack-DwYu4xNy.js} +2 -2
  115. package/dist/{certificate-CdEWgHQf.js → certificate-N2YFedpI.js} +2 -2
  116. package/dist/{checkmark-Q7x6tGhy.js → checkmark-D9dGhGpG.js} +2 -2
  117. package/dist/{checkmark-circle-x7dzbp3I.js → checkmark-circle-CFWClLQ6.js} +2 -2
  118. package/dist/{checkmark-circle-fill-CsvN5_PL.js → checkmark-circle-fill-DEB-tuGl.js} +2 -2
  119. package/dist/{checkmark-small-D35myntq.js → checkmark-small-D3VNx2lo.js} +2 -2
  120. package/dist/{chevron-down-C2iDorpW.js → chevron-down-C7SUSYfl.js} +2 -2
  121. package/dist/{chevron-left-ztPO84q-.js → chevron-left-BXmd-S46.js} +2 -2
  122. package/dist/{chevron-right-C_JN0oDt.js → chevron-right-jE6RwM2B.js} +2 -2
  123. package/dist/{chevron-up-CgG8n25g.js → chevron-up-BdfNcqzq.js} +2 -2
  124. package/dist/{circle-Bt3Nlr3q.js → circle-BJPTMCWB.js} +2 -2
  125. package/dist/{circle-small-filled-YMzP6yQU.js → circle-small-filled-BuO8Vg8j.js} +2 -2
  126. package/dist/{clock-BZHremOA.js → clock-DAzaBRWk.js} +2 -2
  127. package/dist/{coins-fkAk6dCo.js → coins-DYdzG5e_.js} +2 -2
  128. package/dist/commonValidators-DTt6he7v.js +24 -0
  129. package/dist/company-types-value-D_mKv5PT.js +23 -0
  130. package/dist/{contract-BTa4HltT.js → contract-BfJb1t6M.js} +2 -2
  131. package/dist/{cross-Cn09MtQ_.js → cross-CDS_eot4.js} +2 -2
  132. package/dist/{cross-circle-fill-maan7Z5S.js → cross-circle-fill-C-EJ57Yn.js} +2 -2
  133. package/dist/{cross-circle-fill-small-DCz52AuN.js → cross-circle-fill-small-DkPjsuBH.js} +2 -2
  134. package/dist/currency-CrdnaaDu.js +35 -0
  135. package/dist/da-DK-B3Pg-MWO.js +13 -0
  136. package/dist/{da-DK-Dc0QYG8m.js → da-DK-Cd5IQPv3.js} +8 -1
  137. package/dist/{da-DK-CoTdzXlA.js → da-DK-DQ4ZYSea.js} +2 -2
  138. package/dist/da-DK-DzcTI92X.js +13 -0
  139. package/dist/datasetUtil-BHQp0-xL.js +58 -0
  140. package/dist/{de-DE-Dz2OsS1F.js → de-DE-C9NH2zMh.js} +8 -1
  141. package/dist/{de-DE-z0cPgxGN.js → de-DE-CkbOZ6S_.js} +2 -2
  142. package/dist/de-DE-S6qDey1L.js +13 -0
  143. package/dist/de-DE-dPfrbCii.js +13 -0
  144. package/dist/debouncedInputEvent-Cv2S512Y.js +46 -0
  145. package/dist/{decision-makers-group-CgddXgrx.js → decision-makers-group-DrvpnEqj.js} +2 -2
  146. package/dist/{digital-wallet-D_IpxnkN.js → digital-wallet-Bx5YM1LY.js} +2 -2
  147. package/dist/{document-1-C08ut-Dt.js → document-1-qlSTF558.js} +2 -2
  148. package/dist/{document-blurred-2Zpodj3_.js → document-blurred-BiWap0xs.js} +2 -2
  149. package/dist/{document-cut-off-ClS7RiOp.js → document-cut-off-aQezqOif.js} +2 -2
  150. package/dist/{document-expired-CjksBq-N.js → document-expired-BhBXaWWQ.js} +2 -2
  151. package/dist/{document-front-DiAairT3.js → document-front-DYuhZGeQ.js} +2 -2
  152. package/dist/{document-person-vxlA6C5f.js → document-person-CDbnTOdV.js} +2 -2
  153. package/dist/{download-Drhk9k1f.js → download-BZQB1WkZ.js} +2 -2
  154. package/dist/{dropinUtils-BYk71qFP.js → dropinUtils--st1YpV6.js} +4 -4
  155. package/dist/{edit-1-CFoDTMvQ.js → edit-1-DAqtnOIx.js} +2 -2
  156. package/dist/{en-US-BzrLvydZ.js → en-US-CjjPhkB5.js} +2 -2
  157. package/dist/{en-US-CzEL6t1W.js → en-US-D1sB335h.js} +9 -3
  158. package/dist/en-US-DLY20x1O.js +13 -0
  159. package/dist/{en-US-D-B35AoN.js → en-US-DYP6rAvA.js} +8 -1
  160. package/dist/{en-US-fyGPkcqX.js → en-US-cVpRgdC8.js} +2 -2
  161. package/dist/es-ES--IvNed_Q.js +13 -0
  162. package/dist/{es-ES-DUn82eVS.js → es-ES-BAolMrZ0.js} +2 -2
  163. package/dist/es-ES-BYl5-PFR.js +13 -0
  164. package/dist/{es-ES-BI_jdT67.js → es-ES-DK-7qtDf.js} +8 -1
  165. package/dist/{external-link-DCMYUMfW.js → external-link-Cg6pJaSJ.js} +2 -2
  166. package/dist/{fi-FI-hwzizPnr.js → fi-FI-BJLU1JHw.js} +8 -1
  167. package/dist/fi-FI-BUixKfXH.js +13 -0
  168. package/dist/{fi-FI-C3TTCFBv.js → fi-FI-D8WrLxxq.js} +2 -2
  169. package/dist/fi-FI-DFxljML-.js +13 -0
  170. package/dist/fieldConfigurations-BUT9DTUH.js +21 -0
  171. package/dist/filterProblemsByTaskForms-Cz7iQtms.js +30 -0
  172. package/dist/form-rules-DhbF2mY4.js +13 -0
  173. package/dist/formUtils-C_sWWLS3.js +107 -0
  174. package/dist/{fr-FR-CYZXbwc9.js → fr-FR-B2je0smB.js} +8 -1
  175. package/dist/fr-FR-BM-qNLci.js +13 -0
  176. package/dist/{fr-FR-BbKadiaZ.js → fr-FR-Beljeilc.js} +2 -2
  177. package/dist/fr-FR-DPehHVb6.js +13 -0
  178. package/dist/{funds-in-D8bj0aoE.js → funds-in-CInoUdmG.js} +2 -2
  179. package/dist/{getName-9MyzlDpt.js → getName-CnZDw7kV.js} +2 -2
  180. package/dist/getProblemsForEntity-D8qEVVOM.js +24 -0
  181. package/dist/getProps-Cc3J2-z9.js +148 -0
  182. package/dist/getTrustedFields-C5-mXl-l.js +64 -0
  183. package/dist/{gift-CQ_DEma7.js → gift-omNInZeB.js} +2 -2
  184. package/dist/{graph-BJmqglH2.js → graph-DunG_uu1.js} +2 -2
  185. package/dist/{graph-up-Bq6adtlX.js → graph-up-BZze4i6m.js} +2 -2
  186. package/dist/{headquarter-DNYyuuFq.js → headquarter-BhpSibFO.js} +2 -2
  187. package/dist/{hotel-BuNql78Z.js → hotel-Cp7VgGCJ.js} +2 -2
  188. package/dist/{house-B6sNRj-B.js → house-BhyBQdR3.js} +2 -2
  189. package/dist/{id-blurred-9dzBOWCE.js → id-blurred-B5lHEP8M.js} +2 -2
  190. package/dist/{id-cut-off-CohJCI2h.js → id-cut-off-Ba1FRzKO.js} +2 -2
  191. package/dist/{id-front-CSZfvdRg.js → id-front-CpNWN6nG.js} +2 -2
  192. package/dist/{id-glare-Q2JWo5ts.js → id-glare-DgCQON8k.js} +2 -2
  193. package/dist/{iframeWidget-OATZoluK.js → iframeWidget-DqeucjDU.js} +4 -4
  194. package/dist/{image-BSihO8lR.js → image-CmB0ioUM.js} +2 -2
  195. package/dist/{info-vHTZWoJ7.js → info-Bb_-xIEK.js} +2 -2
  196. package/dist/{info-filled-SQotHmT9.js → info-filled-CK8LB339.js} +2 -2
  197. package/dist/{instant-verification-Dvvkyfmp.js → instant-verification-UrnuHTYn.js} +2 -2
  198. package/dist/isEmpty-CUuXL9Na.js +23 -0
  199. package/dist/isNewEntity-7Vw_eQBr.js +13 -0
  200. package/dist/{it-IT-CGhQqmiU.js → it-IT-5a7NHVFo.js} +2 -2
  201. package/dist/it-IT-D63gRTDc.js +13 -0
  202. package/dist/it-IT-DOBp2-MP.js +13 -0
  203. package/dist/{it-IT-Erh1DIlj.js → it-IT-Dhwa9Ecj.js} +8 -1
  204. package/dist/{ja-JP-D1vtig2x.js → ja-JP-B3wVYIJU.js} +38 -38
  205. package/dist/{ja-JP-ThzG9vIo.js → ja-JP-Bc4U0S8-.js} +9 -2
  206. package/dist/{ja-JP-DGNXrNMK.js → ja-JP-Bv3ru9Xq.js} +21 -14
  207. package/dist/{ja-JP-CSz7fEkn.js → ja-JP-CceCDXLB.js} +2 -2
  208. package/dist/ja-JP-DL0IjTzn.js +13 -0
  209. package/dist/{ja-JP-CvREJ56h.js → ja-JP-DSvZhFNY.js} +5 -5
  210. package/dist/{ja-JP-C6Go-kaC.js → ja-JP-g6VOUGXZ.js} +4 -4
  211. package/dist/japanSupportUtils-CGWcXGP2.js +16 -0
  212. package/dist/jpAddressSchema-DEOyz9Yo.js +26 -0
  213. package/dist/{localizeDateString-CtnAUzr_.js → localizeDateString-D6tFShQu.js} +2 -2
  214. package/dist/{location-Q4oKvnkl.js → location-itJfxrDQ.js} +2 -2
  215. package/dist/{mail-BOdyoVqB.js → mail-VHTlAusn.js} +2 -2
  216. package/dist/{manual-verification-BvZWqA00.js → manual-verification-BO8zgAYT.js} +2 -2
  217. package/dist/{mapExistingFile-Iep6Rez8.js → mapExistingFile-BM9f5AeG.js} +81 -7
  218. package/dist/mapJpAddressSchemaToAddressLocalizations-Cu4hdrYE.js +162 -0
  219. package/dist/{mapLegalEntityToIndividualOnfidoSchema-BGAZ4tOn.js → mapLegalEntityToIndividualSchema-DVKTWyvx.js} +63 -3
  220. package/dist/{mapTransferInstrumentToPayoutAccount-C6ha6E0S.js → mapTransferInstrumentToPayoutAccount--gtugk3J.js} +3 -2
  221. package/dist/{minus-circle-filled-kC2IUvKz.js → minus-circle-filled-ZhtJ0GD3.js} +2 -2
  222. package/dist/{nl-NL-O9GCHMDA.js → nl-NL-B0fvINJj.js} +8 -1
  223. package/dist/{nl-NL-OHlJx2bn.js → nl-NL-CmURERx_.js} +2 -2
  224. package/dist/nl-NL-KQ6bciOb.js +13 -0
  225. package/dist/nl-NL-SjOGmGk5.js +13 -0
  226. package/dist/no-NO-BAWVf0GX.js +13 -0
  227. package/dist/no-NO-Ds3VioxT.js +13 -0
  228. package/dist/{no-NO-CA1aR6Wh.js → no-NO-Jw7Gae-a.js} +8 -1
  229. package/dist/{no-NO-DEYydng4.js → no-NO-qyqWODMp.js} +2 -2
  230. package/dist/{onfido-logo-BWSv__sQ.js → onfido-logo-BSkKPH10.js} +2 -2
  231. package/dist/{options-horizontal-CBmbNv7R.js → options-horizontal-GuXvLvV3.js} +2 -2
  232. package/dist/{partner-CPjsrePY.js → partner-QD27Vy4w.js} +2 -2
  233. package/dist/{passport-blurred-B4UDQfmc.js → passport-blurred-CVG493IJ.js} +2 -2
  234. package/dist/{passport-cut-off-C0N2mgLk.js → passport-cut-off-COzA_TmB.js} +2 -2
  235. package/dist/{passport-front-BwA7wR91.js → passport-front-WJleLixT.js} +2 -2
  236. package/dist/{passport-front-green-BL4HmtsB.js → passport-front-green-CZVkCa1n.js} +2 -2
  237. package/dist/{passport-glare-Mg2ixsYA.js → passport-glare-BP5WnJZj.js} +2 -2
  238. package/dist/patternValidators-vYKnE5-t.js +83 -0
  239. package/dist/{pay-by-link-plane-BVZndh67.js → pay-by-link-plane-BpY8Q6-B.js} +2 -2
  240. package/dist/{payout-ChUEoLjt.js → payout-DtB68BcZ.js} +2 -2
  241. package/dist/{payout-verification-instant-5u-wvFKv.js → payout-verification-instant-BzpfOQLD.js} +2 -2
  242. package/dist/{payout-verification-manual-BH2mu0UW.js → payout-verification-manual-gNEoeZkV.js} +2 -2
  243. package/dist/{person-DGjUU4S4.js → person-IVZG3t3_.js} +2 -2
  244. package/dist/{plaid-logo-CtActXTN.js → plaid-logo-FsZ7kfL-.js} +2 -2
  245. package/dist/{plus-CWXA5wdX.js → plus-DiALAL8-.js} +2 -2
  246. package/dist/{plus-circle-filled-CbC0u2Y1.js → plus-circle-filled-BzHtTqEN.js} +2 -2
  247. package/dist/{process-field-configurations-BBc1EBeB.js → process-field-configurations-Dl2Isz78.js} +4 -4
  248. package/dist/{pt-BR-NtLaWlnZ.js → pt-BR-BaTE6BB_.js} +8 -1
  249. package/dist/pt-BR-BfDe_8iW.js +13 -0
  250. package/dist/{pt-BR-DWAziFjb.js → pt-BR-BxoOF8jB.js} +2 -2
  251. package/dist/pt-BR-Ct4s4jXV.js +13 -0
  252. package/dist/{recurring-CkL4cCM2.js → recurring-DKNs9K3x.js} +2 -2
  253. package/dist/{reporting-DerosUNm.js → reporting-D5ABpLO_.js} +2 -2
  254. package/dist/resolveEnvironment-B_JokQ0n.js +84 -0
  255. package/dist/{revenue-accelerate-Dp4Ns_5c.js → revenue-accelerate-D7Sp0V4a.js} +2 -2
  256. package/dist/{review-CxIN9azU.js → review-D4TUjcWF.js} +2 -2
  257. package/dist/roleMetadata-eM6T7GeQ.js +66 -0
  258. package/dist/{save-Fgy7EDid.js → save-BfqO2JBI.js} +2 -2
  259. package/dist/{search-C4GZ-Rc1.js → search-Cmzbf5zI.js} +2 -2
  260. package/dist/{show-yPjPmEf8.js → show-IdbU1C6P.js} +2 -2
  261. package/dist/{singpass-logo-BkMSwiGY.js → singpass-logo-wY4xsmTX.js} +2 -2
  262. package/dist/{singpass-verification-instant-hY4eGFwl.js → singpass-verification-instant-JCqTr7Mv.js} +2 -2
  263. package/dist/{singpass-verification-manual-DwhRpy5Q.js → singpass-verification-manual-DQ7XW6R3.js} +2 -2
  264. package/dist/sl-SI-BAIm-qBe.js +13 -0
  265. package/dist/{sl-SI-C5vfq7vv.js → sl-SI-DTvJT7fC.js} +2 -2
  266. package/dist/{sl-SI-tPwbFvOI.js → sl-SI-DbfswGh0.js} +8 -1
  267. package/dist/sl-SI-hxwQIw_i.js +13 -0
  268. package/dist/{solution-payments-CNAat9h7.js → solution-payments-DpyE_sdS.js} +2 -2
  269. package/dist/{store-IuAkDRAp.js → store-Btc4GcmU.js} +2 -2
  270. package/dist/style.css +1364 -1368
  271. package/dist/styles-CLV89_hH.js +1364 -1368
  272. package/dist/summaryItem-CAQCQSkt.js +18 -0
  273. package/dist/sv-SE-0PQ-U1u6.js +13 -0
  274. package/dist/sv-SE-BZNey_8S.js +13 -0
  275. package/dist/{sv-SE-K1QT1cOt.js → sv-SE-D_Efxy3s.js} +8 -1
  276. package/dist/{sv-SE-BrO9NKWs.js → sv-SE-N-Hqwcjq.js} +2 -2
  277. package/dist/{tax-reporting-graph-DjzwRgE6.js → tax-reporting-graph-hgoilCHZ.js} +2 -2
  278. package/dist/{terminal-1-_me9J9h0.js → terminal-1-D1pwXCoi.js} +2 -2
  279. package/dist/{tink-logo-BcIv93ND.js → tink-logo-DDyjz5eJ.js} +2 -2
  280. package/dist/types/api/address/useAddressCleanse.d.ts +1 -1
  281. package/dist/types/api/address/useRetrieveAddress.d.ts +1 -1
  282. package/dist/types/api/address/useRetrieveFromPostcodeJp.d.ts +1 -1
  283. package/dist/types/api/address/useSearchAddress.d.ts +1 -2
  284. package/dist/types/api/businessLines/useBusinessLines.d.ts +3 -3
  285. package/dist/types/api/businessLines/useCreateBusinessLine.d.ts +2 -2
  286. package/dist/types/api/businessLines/useDeleteBusinessLine.d.ts +2 -2
  287. package/dist/types/api/businessLines/useUpdateBusinessLines.d.ts +2 -2
  288. package/dist/types/api/businessLines/useUpdateSourceOfFunds.d.ts +2 -2
  289. package/dist/types/api/check/useCheck.d.ts +1 -2
  290. package/dist/types/api/companyDataSet/useClearCompanyData.d.ts +2 -2
  291. package/dist/types/api/companySearch/useCompanySearch.d.ts +1 -2
  292. package/dist/types/api/companySelection/useCompanySelection.d.ts +1 -1
  293. package/dist/types/api/configurations/useScenarios.d.ts +3 -161
  294. package/dist/types/api/configurations/useSupportedCountries.d.ts +1 -1
  295. package/dist/types/api/configurations/useTaskTypes.d.ts +1 -1
  296. package/dist/types/api/configurations/useVersionConfiguration.d.ts +1 -1
  297. package/dist/types/api/createLegalEntity/useCreateLegalEntity.d.ts +2 -2
  298. package/dist/types/api/datasets/useLegalForms.d.ts +1 -1
  299. package/dist/types/api/datasets/useNaceCodes.d.ts +1 -1
  300. package/dist/types/api/datasets/useSourceOfFundsTypes.d.ts +1 -1
  301. package/dist/types/api/documentValidation/useDocumentValidate.d.ts +2 -4
  302. package/dist/types/api/documents/useCreateDocument.d.ts +2 -2
  303. package/dist/types/api/documents/useDeleteDocument.d.ts +2 -2
  304. package/dist/types/api/documents/useDocument.d.ts +2 -2
  305. package/dist/types/api/documents/useDocuments.d.ts +1 -1
  306. package/dist/types/api/documents/useUpdateDocument.d.ts +2 -2
  307. package/dist/types/api/entityVerifications/useVerifyIdNumber.d.ts +2 -2
  308. package/dist/types/api/idNowProvider/useIdNowProvider.d.ts +3 -4
  309. package/dist/types/api/idVerificationProviders/idVerificationStartCheck.d.ts +2 -2
  310. package/dist/types/api/idVerificationProviders/useExtractDocumentInformation.d.ts +2 -2
  311. package/dist/types/api/idVerificationProviders/useIdVerificationToken.d.ts +3 -3
  312. package/dist/types/api/industryCodes/useIndustryCodes.d.ts +1 -2
  313. package/dist/types/api/legalEntity/useConfirmReview.d.ts +2 -2
  314. package/dist/types/api/legalEntity/useLegalEntity.d.ts +8 -389
  315. package/dist/types/api/legalEntity/useUpdateLegalEntity.d.ts +2 -2
  316. package/dist/types/api/onboardingStatus/useGenerateOnboardingLink.d.ts +2 -2
  317. package/dist/types/api/onboardingStatus/useOnboardingStatus.d.ts +1 -1
  318. package/dist/types/api/openId/useOpenIdAuthorizationLink.d.ts +1 -2
  319. package/dist/types/api/pci/usePciQuestionnaireList.d.ts +1 -1
  320. package/dist/types/api/pci/usePciStatus.d.ts +1 -1
  321. package/dist/types/api/pci/usePciTemplate.d.ts +1 -1
  322. package/dist/types/api/pci/useSignPci.d.ts +2 -3
  323. package/dist/types/api/providersConfiguration/useProviderStatus.d.ts +1 -1
  324. package/dist/types/api/queryKeys.d.ts +1 -1
  325. package/dist/types/api/taskStatus/useTaskStatus.d.ts +2 -2
  326. package/dist/types/api/taxClassification/useTaxClassification.d.ts +1 -1
  327. package/dist/types/api/termsOfService/useAcceptTermsOfService.d.ts +2 -3
  328. package/dist/types/api/termsOfService/useAcceptedTermsOfService.d.ts +1 -7
  329. package/dist/types/api/termsOfService/useTermsOfService.d.ts +1 -1
  330. package/dist/types/api/termsOfService/useTermsOfServiceAcceptanceInfos.d.ts +1 -1
  331. package/dist/types/api/termsOfService/useTermsOfServiceStatus.d.ts +1 -1
  332. package/dist/types/api/tinVerification/useVerifyTin.d.ts +1 -1
  333. package/dist/types/api/transferInstruments/useBankVerificationProviders.d.ts +1 -1
  334. package/dist/types/api/transferInstruments/useCreateTrustedTransferInstrument.d.ts +1 -1
  335. package/dist/types/api/transferInstruments/useDeleteTransferInstrument.d.ts +1 -1
  336. package/dist/types/api/transferInstruments/useHandleBankVerificationError.d.ts +1 -1
  337. package/dist/types/api/transferInstruments/useTransferInstrument.d.ts +2 -2
  338. package/dist/types/api/transferInstruments/useTransferInstruments.d.ts +1 -1
  339. package/dist/types/api/transferInstruments/useUpdateTransferInstrument.d.ts +1 -1
  340. package/dist/types/api/transferInstruments/useUpdateTrustedTransferInstrument.d.ts +1 -1
  341. package/dist/types/api/types.d.ts +3 -2
  342. package/dist/types/api/uiAnalytics/useAnalyticsSession.d.ts +2 -2
  343. package/dist/types/api/uiAnalytics/usePushAnalyticEvent.d.ts +2 -2
  344. package/dist/types/api/validation/useValidateAccountIdentification.d.ts +2 -3
  345. package/dist/types/api/validation/useValidatePhoneNumber.d.ts +1 -1
  346. package/dist/types/components/{Shared → Apps}/tasks/TaskList/utils.d.ts +1 -5
  347. package/dist/types/components/BankAccount/forms/BankDocument/BankDocumentClassification.d.ts +1 -2
  348. package/dist/types/components/BankAccount/forms/BankDocument/types.d.ts +0 -1
  349. package/dist/types/components/BankAccount/forms/BankVerification/types.d.ts +1 -0
  350. package/dist/types/components/BankAccount/forms/BankVerification/verification/overlay/BankVerificationOverlay.d.ts +1 -1
  351. package/dist/types/components/BankAccount/forms/PayoutDetails/rules.d.ts +1 -1
  352. package/dist/types/components/BankAccount/forms/PayoutDetails/types.d.ts +0 -1
  353. package/dist/types/components/BankAccount/mapping/payoutKeyMappings.d.ts +439 -439
  354. package/dist/types/components/BankAccount/pages/PayoutDetailsPage.d.ts +3 -3
  355. package/dist/types/components/BankAccount/tasks/PayoutDetailsDropin/PayoutDetailsDropin.d.ts +1 -1
  356. package/dist/types/components/BankAccount/tasks/PayoutDetailsDropin/utils.d.ts +1 -1
  357. package/dist/types/components/BankAccount/utils/payoutAccountUtil.d.ts +1 -1
  358. package/dist/types/components/Business/forms/AdditionalInformation/AdditionalInformation.d.ts +0 -2
  359. package/dist/types/components/Business/forms/AdditionalInformation/utils.d.ts +0 -3
  360. package/dist/types/components/Business/forms/BusinessDetails/form-ids.d.ts +2 -0
  361. package/dist/types/components/Business/forms/BusinessDetails/forms.d.ts +12 -11
  362. package/dist/types/components/Business/forms/BusinessDetails/types.d.ts +2 -1
  363. package/dist/types/components/Business/forms/BusinessSelection/BusinessInformationCard/BusinessInformationCard.d.ts +4 -4
  364. package/dist/types/components/Business/forms/CompanyStructure/CompanyStructure.d.ts +0 -1
  365. package/dist/types/components/{Shared → Business}/forms/FinancialInformation/formatFinancialInformationSummary.d.ts +1 -1
  366. package/dist/types/components/{Shared → Business}/forms/FinancialInformation/mapping/mapFinancialInformationToFinancialReport.d.ts +1 -1
  367. package/dist/types/components/{Shared → Business}/forms/FinancialInformation/mapping/mapFinancialReportsToFinancialInformation.d.ts +1 -1
  368. package/dist/types/components/Business/forms/rules.d.ts +11 -11
  369. package/dist/types/components/Business/mapping/businessDetails/businessBankAccountTaxIdUtils.d.ts +7 -0
  370. package/dist/types/components/Business/mapping/businessDetails/mapBusinessDetailsSchemaToLegalEntity.d.ts +4 -2
  371. package/dist/types/components/Business/mapping/businessDetails/mapLegalEntityToBusinessDetailsSchema.d.ts +8 -1
  372. package/dist/types/components/Business/pages/RootBusinessDetailsPage.d.ts +1 -2
  373. package/dist/types/components/Business/tasks/BusinessDetailsDropin/businessDetailsStore.d.ts +0 -2
  374. package/dist/types/components/Business/tasks/BusinessDetailsDropin/types.d.ts +4 -2
  375. package/dist/types/components/Business/tasks/BusinessDetailsDropin/utils.d.ts +3 -4
  376. package/dist/types/components/Business/utils/companyUtil.d.ts +0 -10
  377. package/dist/types/components/BusinessLines/constants.d.ts +2 -0
  378. package/dist/types/components/BusinessLines/fields/SctaField/types.d.ts +1 -1
  379. package/dist/types/components/BusinessLines/fields/WebDataField/types.d.ts +1 -1
  380. package/dist/types/components/BusinessLines/pages/RootBusinessLinesPage.d.ts +1 -2
  381. package/dist/types/components/BusinessLines/tasks/BusinessLines/BusinessLineModal/BusinessLineModal.d.ts +2 -1
  382. package/dist/types/components/BusinessLines/tasks/BusinessLines/BusinessLinesDropin.d.ts +1 -1
  383. package/dist/types/components/BusinessLines/tasks/types.d.ts +2 -0
  384. package/dist/types/components/BusinessLines/tasks/utils.d.ts +8 -4
  385. package/dist/types/components/BusinessLines/tasks/validate.d.ts +0 -2
  386. package/dist/types/components/Contract/tasks/ServiceAgreementDropin/types.d.ts +1 -1
  387. package/dist/types/components/EFP/fields/LegalFormField/LegalFormField.d.ts +1 -1
  388. package/dist/types/components/EFP/fields/NaceCodeField/NaceCodeField.d.ts +1 -1
  389. package/dist/types/components/EFP/mapping/businessFinancingKeyMappings.d.ts +5771 -541
  390. package/dist/types/components/EFP/mapping/mapBusinessFinancingToLegalEntity.d.ts +3 -2
  391. package/dist/types/components/EFP/mapping/mapLegalEntityToBusinessFinancing.d.ts +1 -1
  392. package/dist/types/components/EFP/pages/BusinessFinancingPage.d.ts +1 -2
  393. package/dist/types/components/EFP/pages/SourceOfFundsPage.d.ts +1 -2
  394. package/dist/types/components/EFP/tasks/BusinessFinancingDropin/AdditionalFieldsForBusinessFinancingSoleProprietor.d.ts +2 -0
  395. package/dist/types/components/EFP/tasks/BusinessFinancingDropin/BusinessFinancingSoleProprietorPersonalInformation.d.ts +4 -0
  396. package/dist/types/components/EFP/tasks/BusinessFinancingDropin/types.d.ts +28 -0
  397. package/dist/types/components/EFP/tasks/BusinessFinancingDropin/utils.d.ts +14 -3
  398. package/dist/types/components/EFP/tasks/BusinessFinancingDropin/validate.d.ts +10 -1
  399. package/dist/types/components/EFP/tasks/SourceOfFundsDropin/types.d.ts +20 -21
  400. package/dist/types/components/EFP/tasks/SourceOfFundsDropin/utils.d.ts +6 -4
  401. package/dist/types/components/EFP/tasks/TaxReportingDropin/utils.d.ts +1 -2
  402. package/dist/types/components/EmbeddedDropins/BusinessFinancingComponent/utils.d.ts +2 -1
  403. package/dist/types/components/EmbeddedDropins/CreateIndividualComponent/CreateIndividualComponent.d.ts +2 -2
  404. package/dist/types/components/EmbeddedDropins/InvitedDecisionMakerComponent/InvitedDecisionMakerComponent.d.ts +4 -0
  405. package/dist/types/components/EmbeddedDropins/OnboardingDropinComponent/DropinComposer/DropinComposer.d.ts +1 -1
  406. package/dist/types/components/EmbeddedDropins/OnboardingDropinComponent/DropinComposer/RouterDropinComposer.d.ts +4 -0
  407. package/dist/types/components/Individual/fields/DriversLicense/DriversLicense.types.d.ts +1 -1
  408. package/dist/types/components/Individual/fields/IdentityNumber/fieldConfig.d.ts +4 -3
  409. package/dist/types/components/Individual/forms/AdditionalPersonalDetails/AdditionalPersonalDetails.types.d.ts +29 -0
  410. package/dist/types/components/Individual/forms/{IndividualOnfido/AdditionalPersonalDetails → AdditionalPersonalDetails}/Identity/Identity.types.d.ts +3 -3
  411. package/dist/types/components/Individual/forms/{IndividualOnfido/AdditionalPersonalDetails → AdditionalPersonalDetails}/Identity/TypeOfIdentity/index.d.ts +2 -2
  412. package/dist/types/components/Individual/forms/AdditionalPersonalDetails/Identity/validate.d.ts +4 -0
  413. package/dist/types/components/Individual/forms/{IndividualOnfido/AdditionalPersonalDetails → AdditionalPersonalDetails}/validate.d.ts +8 -8
  414. package/dist/types/components/Individual/forms/BasicDetails/BasicDetails.types.d.ts +22 -0
  415. package/dist/types/components/Individual/forms/BasicDetails/validate.d.ts +8 -0
  416. package/dist/types/components/Individual/forms/{IndividualOnfido/DataConflictsModal → DataConflictsModal}/ConflictRow.d.ts +1 -1
  417. package/dist/types/components/Individual/forms/{IndividualOnfido/DataConflictsModal → DataConflictsModal}/DataConflictsModal.d.ts +1 -1
  418. package/dist/types/components/Individual/forms/{Individual/IdDocumentUpload → IdDocumentUpload}/types.d.ts +5 -15
  419. package/dist/types/components/Individual/forms/{Individual/IdDocumentUpload → IdDocumentUpload}/utils.d.ts +1 -1
  420. package/dist/types/components/Individual/forms/IdNowVerificationModal/isIdNowModalOpen.d.ts +18 -0
  421. package/dist/types/components/Individual/forms/{IndividualOnfido/IdVerificationMethod → IdVerificationMethod}/IdVerificationMethod.types.d.ts +5 -4
  422. package/dist/types/components/Individual/forms/{IndividualOnfido/IdVerificationMethod → IdVerificationMethod}/OnfidoVerificationModal/OnfidoVerificationModal.d.ts +1 -1
  423. package/dist/types/components/Individual/forms/{IndividualOnfido/IdVerificationMethod → IdVerificationMethod}/UploadedDocument/UploadedDocument.d.ts +1 -1
  424. package/dist/types/components/Individual/forms/{IndividualOnfido/IdVerificationMethod → IdVerificationMethod}/individualOnfidoConflictsSchema.d.ts +5 -5
  425. package/dist/types/components/Individual/forms/IdVerificationMethod/mapExtractionResultToSchema.d.ts +4 -0
  426. package/dist/types/components/Individual/forms/{IndividualOnfido/IdVerificationMethod → IdVerificationMethod}/validateExtractionResult.d.ts +3 -3
  427. package/dist/types/components/Individual/forms/{IndividualOnfido/IndividualOnfido.d.ts → Individual.d.ts} +6 -2
  428. package/dist/types/components/Individual/forms/{IndividualOnfido/IndividualOnfido.rules.d.ts → Individual.rules.d.ts} +8 -9
  429. package/dist/types/components/Individual/forms/{IndividualOnfido/IndividualOnfido.types.d.ts → Individual.types.d.ts} +16 -15
  430. package/dist/types/components/Individual/forms/{Individual/ProofOfRelationship → ProofOfRelationship}/types.d.ts +1 -1
  431. package/dist/types/components/Individual/forms/{Individual/ProofOfResidency → ProofOfResidency}/types.d.ts +1 -1
  432. package/dist/types/components/Individual/forms/{IndividualOnfido/SignatoryQuestionnaire → SignatoryQuestionnaire}/SignatoryQuestionnaire.types.d.ts +1 -1
  433. package/dist/types/components/Individual/forms/{IndividualOnfido/UboQuestionnaire → UboQuestionnaire}/UboQuestionnaire.types.d.ts +2 -2
  434. package/dist/types/components/Individual/forms/{IndividualOnfido/UboQuestionnaire → UboQuestionnaire}/UboQuestionnaireModalContent.d.ts +1 -1
  435. package/dist/types/components/Individual/forms/form-ids.d.ts +2 -0
  436. package/dist/types/components/Individual/helpers/bafinUtils.d.ts +3 -2
  437. package/dist/types/components/Individual/helpers/mandateIdVerificationForMotionCapture.d.ts +2 -3
  438. package/dist/types/components/Individual/helpers/roleUtils.d.ts +1 -1
  439. package/dist/types/components/Individual/mapping/adjustOnfidoIdentificationData.d.ts +1 -1
  440. package/dist/types/components/Individual/mapping/getOnfidoIdentityTypeToApiIdentityTypeMap.d.ts +1 -1
  441. package/dist/types/components/Individual/mapping/individualKeyMappings.d.ts +6 -12
  442. package/dist/types/components/Individual/mapping/mapApiDocumentToIndividualDocuments.d.ts +2 -2
  443. package/dist/types/components/Individual/mapping/mapIndividualDocumentToApiDocument.d.ts +2 -3
  444. package/dist/types/components/Individual/mapping/{mapIndividualOnfidoSchemaToLegalEntity.d.ts → mapIndividualSchemaToLegalEntity.d.ts} +1 -1
  445. package/dist/types/components/Individual/mapping/{mapLegalEntityToIndividualOnfidoSchema.d.ts → mapLegalEntityToIndividualSchema.d.ts} +1 -1
  446. package/dist/types/components/Individual/pages/DecisionMakerDetailsPage.d.ts +6 -7
  447. package/dist/types/components/Individual/pages/LegalRepresentativeDetailsPage.d.ts +2 -2
  448. package/dist/types/components/Individual/pages/RootIndividualDetailsPage.d.ts +2 -2
  449. package/dist/types/components/Individual/tasks/DecisionMakers/DecisionMakerDetails/utils.d.ts +2 -14
  450. package/dist/types/components/Individual/tasks/DecisionMakers/RemediationAlerts/remediation.config.d.ts +0 -2
  451. package/dist/types/components/Individual/tasks/DecisionMakers/types.d.ts +8 -0
  452. package/dist/types/components/Individual/tasks/DecisionMakers/utils.d.ts +1 -1
  453. package/dist/types/components/Individual/tasks/IndividualDropin/IndividualDropin.d.ts +2 -2
  454. package/dist/types/components/Individual/tasks/IndividualDropin/individualFormConfig.d.ts +3 -3
  455. package/dist/types/components/Shared/EntityAssociation/EntityAssociation.d.ts +0 -1
  456. package/dist/types/components/Shared/Introduction/copy.d.ts +1 -1
  457. package/dist/types/components/Shared/fields/BusinessRegistrationNumberField/BusinessRegistrationNumberField.d.ts +1 -1
  458. package/dist/types/components/Shared/fields/BusinessRegistrationNumberField/fieldConfig.d.ts +10 -0
  459. package/dist/types/components/Shared/fields/BusinessRegistrationNumberField/types.d.ts +2 -1
  460. package/dist/types/components/Shared/fields/CountryField/types.d.ts +2 -1
  461. package/dist/types/components/Shared/fields/CountryOfGoverningLawField/CountryOfGoverningLawField.d.ts +1 -1
  462. package/dist/types/components/Shared/fields/CountryOfGoverningLawField/types.d.ts +1 -1
  463. package/dist/types/components/Shared/fields/Currency/Currency.d.ts +1 -1
  464. package/dist/types/components/Shared/fields/Currency/types.d.ts +1 -1
  465. package/dist/types/components/Shared/fields/DBANameField/DBANameField.d.ts +1 -1
  466. package/dist/types/components/Shared/fields/DBANameField/types.d.ts +1 -1
  467. package/dist/types/components/Shared/fields/DateOfIncorporationField/DateOfIncorporationField.d.ts +1 -1
  468. package/dist/types/components/Shared/fields/DateOfIncorporationField/types.d.ts +3 -1
  469. package/dist/types/components/Shared/fields/EInvoicingCodeField/EInvoicingCodeField.d.ts +1 -1
  470. package/dist/types/components/Shared/fields/EInvoicingCodeField/types.d.ts +1 -1
  471. package/dist/types/components/Shared/fields/IdFieldTypeSelector/countryIdNumberTypes.d.ts +119 -1
  472. package/dist/types/components/Shared/fields/IndustryCodeField/IndustryCodeField.d.ts +1 -1
  473. package/dist/types/components/Shared/fields/IndustryCodeField/types.d.ts +1 -1
  474. package/dist/types/components/Shared/fields/LegalCompanyNameField/fieldConfig.d.ts +12 -6
  475. package/dist/types/components/Shared/fields/LegalCompanyNameField/types.d.ts +3 -1
  476. package/dist/types/components/{Individual → Shared}/fields/LocalizedNameFields/types.d.ts +2 -2
  477. package/dist/types/components/Shared/fields/LocalizedNameFields/validate.d.ts +5 -0
  478. package/dist/types/components/Shared/fields/NumberOfEmployees/NumberOfEmployees.d.ts +1 -1
  479. package/dist/types/components/Shared/fields/NumberOfEmployees/types.d.ts +1 -1
  480. package/dist/types/components/Shared/fields/PhoneField/PhoneField.d.ts +1 -1
  481. package/dist/types/components/Shared/fields/PhoneField/fieldConfig.d.ts +5 -0
  482. package/dist/types/components/Shared/fields/PhoneField/types.d.ts +2 -1
  483. package/dist/types/components/Shared/fields/StateField/StateField.d.ts +1 -1
  484. package/dist/types/components/Shared/fields/StateField/fieldConfig.d.ts +8 -0
  485. package/dist/types/components/Shared/fields/StateField/types.d.ts +1 -1
  486. package/dist/types/components/Shared/fields/StockExchangeMICField/StockExchangeMICField.d.ts +1 -1
  487. package/dist/types/components/Shared/fields/StockExchangeMICField/types.d.ts +1 -1
  488. package/dist/types/components/Shared/fields/StockISINField/StockISINField.d.ts +1 -1
  489. package/dist/types/components/Shared/fields/StockISINField/types.d.ts +1 -1
  490. package/dist/types/components/Shared/fields/StockTickerSymbol/StockTickerSymbolField.d.ts +1 -1
  491. package/dist/types/components/Shared/fields/StockTickerSymbol/types.d.ts +1 -1
  492. package/dist/types/components/Shared/fields/TaxInformationField/TaxInformationField.d.ts +1 -1
  493. package/dist/types/components/Shared/fields/TaxInformationField/fieldConfig.d.ts +6 -0
  494. package/dist/types/components/Shared/fields/TaxInformationField/types.d.ts +2 -1
  495. package/dist/types/components/Shared/fields/VatNumberField/VatNumberField.d.ts +1 -1
  496. package/dist/types/components/Shared/fields/VatNumberField/types.d.ts +1 -1
  497. package/dist/types/components/Shared/forms/Address/Address.d.ts +1 -1
  498. package/dist/types/components/Shared/forms/Address/utils.d.ts +1 -1
  499. package/dist/types/components/Shared/forms/BusinessTypeSelection/utils.d.ts +1 -1
  500. package/dist/types/components/Trust/forms/Trust/rules.d.ts +2 -2
  501. package/dist/types/components/Trust/hooks/useTrustMemberNavigation.hook.d.ts +1 -1
  502. package/dist/types/components/Trust/pages/TrustDetailsPage.d.ts +1 -2
  503. package/dist/types/components/Trust/pages/TrustMemberCompanyPage.d.ts +3 -3
  504. package/dist/types/components/Trust/pages/TrustMemberIndividualPage.d.ts +5 -5
  505. package/dist/types/components/Trust/pages/TrustMemberRoleAndTypePage.d.ts +2 -2
  506. package/dist/types/components/Trust/tasks/RoleAndTypeDropin/formatRoleAndEntityTypeSummary.d.ts +1 -1
  507. package/dist/types/components/Trust/tasks/TrustDropin/TrustMultiform.d.ts +2 -1
  508. package/dist/types/components/Trust/tasks/TrustMembers/TrustMembersOverview.d.ts +1 -2
  509. package/dist/types/components/UnincorporatedPartnership/hooks/useUnincorporatedPartnershipNavigation.d.ts +1 -1
  510. package/dist/types/components/UnincorporatedPartnership/pages/UnincorporatedPartnershipIndividualPage.d.ts +5 -5
  511. package/dist/types/components/UnincorporatedPartnership/pages/UnincorporatedPartnershipMemberCompanyPage.d.ts +3 -3
  512. package/dist/types/components/UnincorporatedPartnership/pages/UnincorporatedPartnershipMemberRoleAndTypePage.d.ts +1 -1
  513. package/dist/types/components/ui/atoms/Card/Card.d.ts +19 -0
  514. package/dist/types/components/ui/atoms/Loader/Loader.d.ts +11 -1
  515. package/dist/types/components/ui/atoms/MultiSelectList/MultiSelectList.d.ts +0 -1
  516. package/dist/types/components/ui/atoms/Svg/Svg.d.ts +0 -1
  517. package/dist/types/components/ui/molecules/EmbeddedStatus/statusToTag.d.ts +1 -1
  518. package/dist/types/components/ui/molecules/ErrorPanel/ErrorPanel.d.ts +0 -1
  519. package/dist/types/context/ExperimentContext/types.d.ts +19 -42
  520. package/dist/types/context/QueryContext/QueryClient.d.ts +1 -1
  521. package/dist/types/context/StateContext/types.d.ts +2 -3
  522. package/dist/types/core/models/api/individual.d.ts +3 -0
  523. package/dist/types/core/models/api/instant-id-verification.d.ts +1 -1
  524. package/dist/types/core/models/api/legal-arrangement.d.ts +3 -0
  525. package/dist/types/core/models/api/legal-entity-association.d.ts +1 -1
  526. package/dist/types/core/process-field-configurations.d.ts +0 -5
  527. package/dist/types/core/services/types.d.ts +1 -1
  528. package/dist/types/core/user-events.d.ts +4 -2
  529. package/dist/types/embeds/baseEmbedProps.d.ts +0 -21
  530. package/dist/types/embeds/business-financing/adyen-business-financing.d.ts +2 -1
  531. package/dist/types/embeds/individual-configuration/adyen-individual-configuration.d.ts +5 -1
  532. package/dist/types/embeds/individual-configuration/adyen-individual-configuration.types.d.ts +2 -2
  533. package/dist/types/embeds/invited-decision-maker/adyen-invited-decision-maker.d.ts +5 -0
  534. package/dist/types/embeds/invited-decision-maker/adyen-invited-decision-maker.types.d.ts +34 -0
  535. package/dist/types/embeds/onboarding/adyen-onboarding.d.ts +2 -1
  536. package/dist/types/embeds/terms-of-service-management/adyen-terms-of-service-management.d.ts +5 -1
  537. package/dist/types/embeds/transfer-instrument-configuration/adyen-transfer-instrument-configuration.d.ts +2 -1
  538. package/dist/types/embeds/verification-status/adyen-verification-status.d.ts +2 -1
  539. package/dist/types/hooks/useAssociatedLegalEntity.d.ts +1 -1
  540. package/dist/types/hooks/useForm/types.d.ts +0 -8
  541. package/dist/types/hooks/useLegalCompanyNameField/useLegalCompanyNameField.d.ts +4 -2
  542. package/dist/types/hooks/usePageLandedEvent.d.ts +7 -0
  543. package/dist/types/hooks/useUboQuestionnaire.d.ts +2 -2
  544. package/dist/types/language/types.d.ts +7 -2
  545. package/dist/types/language/utils.d.ts +1 -2
  546. package/dist/types/router/DefaultRouteRedirect.d.ts +8 -0
  547. package/dist/types/router/MemoryRouterContext.d.ts +9 -0
  548. package/dist/types/router/OnboardingRouter.d.ts +39 -0
  549. package/dist/types/router/SuspenseRoute.d.ts +7 -0
  550. package/dist/types/router/getDefaultTask.d.ts +16 -0
  551. package/dist/types/router/routeConfig.d.ts +68 -0
  552. package/dist/types/router/useCurrentTask.d.ts +5 -0
  553. package/dist/types/router/useNavigate.d.ts +7 -0
  554. package/dist/types/stores/formState.d.ts +1 -1
  555. package/dist/types/stores/globalStore/taskStatus.d.ts +5 -3
  556. package/dist/types/types/assert.d.ts +1 -0
  557. package/dist/types/types/form-rules.d.ts +0 -1
  558. package/dist/types/utils/addLinkedFields.d.ts +0 -2
  559. package/dist/types/utils/analytics/debouncedInputEvent.d.ts +1 -0
  560. package/dist/types/utils/analytics/getPrefilledDetails.d.ts +28 -0
  561. package/dist/types/utils/api/processCapabilitites.d.ts +14 -2
  562. package/dist/types/utils/birthDateUtils.d.ts +0 -17
  563. package/dist/types/utils/entityAssociationUtil.d.ts +3 -4
  564. package/dist/types/utils/entityStatusUtil.d.ts +1 -1
  565. package/dist/types/utils/fieldConfigurations.d.ts +0 -2
  566. package/dist/types/utils/formUtils.d.ts +1 -6
  567. package/dist/types/utils/getDisplayErrorMessage.d.ts +1 -2
  568. package/dist/types/utils/getFieldsWithExistingData.d.ts +2 -3
  569. package/dist/types/utils/getName.d.ts +1 -1
  570. package/dist/types/utils/japanSupportUtils.d.ts +2 -1
  571. package/dist/types/utils/logger.d.ts +0 -1
  572. package/dist/types/utils/makeSelectItemForRole.d.ts +1 -1
  573. package/dist/types/utils/performance.d.ts +64 -0
  574. package/dist/types/utils/regex/patternValidators.d.ts +1 -1
  575. package/dist/types/utils/translation.d.ts +3 -2
  576. package/dist/types/utils/validatorUtils.d.ts +2 -1
  577. package/dist/types/utils/verification/helpers/verifyIdNumber.d.ts +3 -2
  578. package/dist/{types-Dk94b8kx.js → types-B7GElie6.js} +21 -44
  579. package/dist/{types-Q8QbiVOz.js → types-BQL9Lsg4.js} +2 -2
  580. package/dist/{types-DtV30rT3.js → types-C8io4KaH.js} +3 -26
  581. package/dist/{types-fRMvVcuU.js → types-DwXc_yI8.js} +2 -2
  582. package/dist/unincorporated-partnership-MeN1dp53.js +97 -0
  583. package/dist/{upload-BF65P4KM.js → upload-BmUXjsaU.js} +2 -2
  584. package/dist/{us-check-CYY6Crhr.js → us-check-C1rTBsCY.js} +2 -2
  585. package/dist/{us-check-account-number-C7KE5YzX.js → us-check-account-number-9lI1dXNC.js} +2 -2
  586. package/dist/{us-check-routing-number-DUbhsYAR.js → us-check-routing-number-s_KaAGSM.js} +2 -2
  587. package/dist/{useAssociatedLegalEntity-CtNg5gYS.js → useAssociatedLegalEntity-ETDoz1H2.js} +3 -2
  588. package/dist/useBusinessDetailsData-FrL0b9Ni.js +5197 -0
  589. package/dist/useBusinessLines-C5NQ5pE8.js +29 -0
  590. package/dist/useCanSeeIntroduction-BdZJ7k-_.js +48 -0
  591. package/dist/{useCreateLegalEntity-DIzVLIrw.js → useCreateLegalEntity-DrcLoNYT.js} +3 -2
  592. package/dist/useDataMissingRemediations-Zgtpw7uZ.js +41 -0
  593. package/dist/useDataset-Cap5ZjTr.js +76 -0
  594. package/dist/useDeleteTransferInstrument-B2wRj-qL.js +32 -0
  595. package/dist/useForm-DqUW2TbW.js +582 -0
  596. package/dist/{FormFlow-DX2A0gcf.js → useFormContext-CkuaJPUI.js} +26 -31
  597. package/dist/{useGlobalData-CO2a2RhB.js → useGlobalData-5Z6W3or1.js} +3 -3
  598. package/dist/useId-BZ0PA7jP.js +24 -0
  599. package/dist/{useMultiForm-BkNgL1zi.js → useMultiForm-Dm2IEMH9.js} +46 -37
  600. package/dist/useNavigate-CI0N-POy.js +265 -0
  601. package/dist/{useOnboardingStatus-BB5IzxTg.js → useOnboardingStatus-H7Xqe2GC.js} +3 -2
  602. package/dist/usePciQuestionnaireList-BF7TPjbQ.js +29 -0
  603. package/dist/useSalesChannels-DYGRfKeh.js +65 -0
  604. package/dist/{useScenarios-yIXrDacU.js → useScenarios-CibP5LVa.js} +7 -5
  605. package/dist/useSetting-CbBaitp6.js +19 -0
  606. package/dist/useTaskStatus-1OZ2clnm.js +51 -0
  607. package/dist/{useTermsOfServiceStatus-BRdLkis6.js → useTermsOfServiceStatus-Dg_nBQgt.js} +3 -2
  608. package/dist/{useToastContext-BQYYaLd-.js → useToastContext-D643iewp.js} +6 -17
  609. package/dist/useTrustMembers-BTCDIu6B.js +163 -0
  610. package/dist/{useUnincorporatedPartnershipMembers-fl3LbBcx.js → useUnincorporatedPartnershipMembers-BM9dNg4i.js} +5 -5
  611. package/dist/useUpdateBusinessLines-BuW6Vnof.js +339 -0
  612. package/dist/{useUpdateLegalEntity-CIZP-vhE.js → useUpdateLegalEntity-tRw1V_Mt.js} +4 -3
  613. package/dist/utils-BasWTkqk.js +159 -0
  614. package/dist/{utils-_N6wjH1k.js → utils-BnolcW6V.js} +6 -6
  615. package/dist/{utils-BtBmicYe.js → utils-D9h2Aq2w.js} +26 -22
  616. package/dist/utils-PkTZS9uf.js +58 -0
  617. package/dist/utils-b_KUV0wb.js +29 -0
  618. package/dist/{documentUtils-CmY7W1gB.js → validate-CtxacqMv.js} +171 -6
  619. package/dist/{validate-yIqc2enK.js → validate-K0fmvoFj.js} +10 -2
  620. package/dist/{validationError-BcmQ2z0b.js → validationError-DdlWONz2.js} +3 -3
  621. package/dist/{warning-circle-fill-CEN1WL7A.js → warning-circle-fill-DBvt921B.js} +2 -2
  622. package/dist/{warning-diamond-filled-BfXMlVrG.js → warning-diamond-filled-Lb2od2ry.js} +2 -2
  623. package/dist/{webinar-DqjqrNEv.js → webinar-m9nuFZBt.js} +2 -2
  624. package/dist/{yapily-logo-CZ4ywjwA.js → yapily-logo-BduxhNRA.js} +2 -2
  625. package/package.json +88 -56
  626. package/dist/Card-BHab7Kyt.js +0 -82
  627. package/dist/ConstitutionalDocument--Z--xpF7.js +0 -143
  628. package/dist/CountryField-BIYJvEAW.js +0 -843
  629. package/dist/CreateIndividualComponent-3t1p_6gB.js +0 -71
  630. package/dist/EntityAssociation-0B8bfpR4.js +0 -159
  631. package/dist/IndividualOnfido-BxhmIQwc.js +0 -9662
  632. package/dist/IndividualOnfidoDropin-Cy08-w8F.js +0 -2575
  633. package/dist/OnboardingDropinComponent-Cu2pv74K.js +0 -7623
  634. package/dist/RootBusinessDetailsPage-ChobUam3.js +0 -49
  635. package/dist/StoreProvider-DTMSAVgy.js +0 -7707
  636. package/dist/TrustMemberCompanyPage-DwVARA6c.js +0 -64
  637. package/dist/da-DK-CrtuBoDC.js +0 -118
  638. package/dist/da-DK-uHPPFvD-.js +0 -13
  639. package/dist/de-DE-SMf6w4NJ.js +0 -13
  640. package/dist/de-DE-mH3MobT9.js +0 -13
  641. package/dist/en-US-d4WBvUW7.js +0 -118
  642. package/dist/es-ES-BqpvBqmR.js +0 -13
  643. package/dist/es-ES-CnyVffM-.js +0 -118
  644. package/dist/fi-FI-DPegZzTc.js +0 -13
  645. package/dist/fi-FI-kXC-0USa.js +0 -118
  646. package/dist/fr-FR-6YOKsDLQ.js +0 -13
  647. package/dist/fr-FR-BPGwsLDa.js +0 -13
  648. package/dist/getFieldsWithExistingData-D6K7_vTh.js +0 -22
  649. package/dist/hasDataChanged-6p9Ib-IH.js +0 -19
  650. package/dist/id-verification-instant-BUVBO4R3.js +0 -58
  651. package/dist/id-verification-manual-B3YZALYU.js +0 -55
  652. package/dist/it-IT-B1eJg9RL.js +0 -13
  653. package/dist/it-IT-DyCHFg-b.js +0 -118
  654. package/dist/ja-JP-PnqAHl14.js +0 -13
  655. package/dist/mapFinancialReportsToFinancialInformation-CeqxQKYv.js +0 -67
  656. package/dist/mapJpAddressSchemaToAddressLocalizations-C22nFO39.js +0 -63
  657. package/dist/nl-NL-DkbhmJAw.js +0 -118
  658. package/dist/nl-NL-cVVIDG7s.js +0 -13
  659. package/dist/no-NO-C_tmZ39d.js +0 -13
  660. package/dist/no-NO-Df5qUoTc.js +0 -118
  661. package/dist/pt-BR-BOOm5lRR.js +0 -118
  662. package/dist/pt-BR-CMiGlY3k.js +0 -13
  663. package/dist/resolveEnvironment-DV8jSeQ4.js +0 -164
  664. package/dist/rules-Cu3mKCzh.js +0 -317
  665. package/dist/sl-SI-C3nGkfNb.js +0 -13
  666. package/dist/sl-SI-CGvCdquD.js +0 -118
  667. package/dist/sv-SE-BP2Oun8l.js +0 -118
  668. package/dist/sv-SE-CXn28ybc.js +0 -13
  669. package/dist/types/components/Business/tasks/BusinessDetailsDropin/mandatoryFields.d.ts +0 -3
  670. package/dist/types/components/Individual/fields/DecisionMakerRole/DecisionMakerRole.d.ts +0 -3
  671. package/dist/types/components/Individual/fields/DecisionMakerRole/NomineeDecisionMakerRole.d.ts +0 -10
  672. package/dist/types/components/Individual/fields/DecisionMakerRole/types.d.ts +0 -23
  673. package/dist/types/components/Individual/fields/NameFields/validate.d.ts +0 -4
  674. package/dist/types/components/Individual/forms/Individual/IdDocumentUpload/IdDocumentAlreadyUpload.d.ts +0 -2
  675. package/dist/types/components/Individual/forms/Individual/IdDocumentUpload/IdDocumentInstantVerification.d.ts +0 -3
  676. package/dist/types/components/Individual/forms/Individual/IdDocumentUpload/IdDocumentUpload.d.ts +0 -3
  677. package/dist/types/components/Individual/forms/Individual/IdVerificationMethod/IdVerificationMethod.d.ts +0 -3
  678. package/dist/types/components/Individual/forms/Individual/IdVerificationMethod/idVerificationMethodMetadata.d.ts +0 -15
  679. package/dist/types/components/Individual/forms/Individual/IdVerificationMethod/types.d.ts +0 -14
  680. package/dist/types/components/Individual/forms/Individual/Individual.d.ts +0 -9
  681. package/dist/types/components/Individual/forms/Individual/PersonalDetails/Identity/Identity.d.ts +0 -2
  682. package/dist/types/components/Individual/forms/Individual/PersonalDetails/Identity/IdentityAu/IdentityAu.d.ts +0 -2
  683. package/dist/types/components/Individual/forms/Individual/PersonalDetails/Identity/IdentityAu/validate.d.ts +0 -3
  684. package/dist/types/components/Individual/forms/Individual/PersonalDetails/Identity/IdentityHK/IdentityHK.d.ts +0 -2
  685. package/dist/types/components/Individual/forms/Individual/PersonalDetails/Identity/IdentityHK/validate.d.ts +0 -3
  686. package/dist/types/components/Individual/forms/Individual/PersonalDetails/Identity/IdentityNZ/IdentityNZ.d.ts +0 -2
  687. package/dist/types/components/Individual/forms/Individual/PersonalDetails/Identity/IdentityNZ/validate.d.ts +0 -3
  688. package/dist/types/components/Individual/forms/Individual/PersonalDetails/Identity/TypeOfIdentity/index.d.ts +0 -11
  689. package/dist/types/components/Individual/forms/Individual/PersonalDetails/Identity/identityUS/IdentityUS.d.ts +0 -4
  690. package/dist/types/components/Individual/forms/Individual/PersonalDetails/Identity/types.d.ts +0 -14
  691. package/dist/types/components/Individual/forms/Individual/PersonalDetails/PersonalDetails.d.ts +0 -3
  692. package/dist/types/components/Individual/forms/Individual/PersonalDetails/types.d.ts +0 -41
  693. package/dist/types/components/Individual/forms/Individual/PersonalDetails/validate.d.ts +0 -21
  694. package/dist/types/components/Individual/forms/Individual/rules.d.ts +0 -40
  695. package/dist/types/components/Individual/forms/Individual/types.d.ts +0 -51
  696. package/dist/types/components/Individual/forms/IndividualOnfido/AdditionalPersonalDetails/AdditionalPersonalDetails.types.d.ts +0 -29
  697. package/dist/types/components/Individual/forms/IndividualOnfido/AdditionalPersonalDetails/Identity/validate.d.ts +0 -4
  698. package/dist/types/components/Individual/forms/IndividualOnfido/BasicDetails/BasicDetails.types.d.ts +0 -22
  699. package/dist/types/components/Individual/forms/IndividualOnfido/BasicDetails/validate.d.ts +0 -6
  700. package/dist/types/components/Individual/forms/IndividualOnfido/IdNowVerificationModal/isIdNowModalOpen.d.ts +0 -17
  701. package/dist/types/components/Individual/forms/IndividualOnfido/IdVerificationMethod/mapExtractionResultToSchema.d.ts +0 -4
  702. package/dist/types/components/Individual/helpers/isOnfidoAutofillFlowEnabled.d.ts +0 -4
  703. package/dist/types/components/Individual/mapping/adjustIdentificationData.d.ts +0 -3
  704. package/dist/types/components/Individual/mapping/getIdentityTypeToApiIdentityTypeMap.d.ts +0 -3
  705. package/dist/types/components/Individual/mapping/individualOnfidoKeyMappings.d.ts +0 -8
  706. package/dist/types/components/Individual/mapping/mapIndividualToLegalEntity.d.ts +0 -3
  707. package/dist/types/components/Individual/mapping/mapLegalEntityToIndividual.d.ts +0 -3
  708. package/dist/types/components/Individual/tasks/IndividualOnfidoDropin/IndividualOnfidoDropin.d.ts +0 -2
  709. package/dist/types/components/Individual/tasks/IndividualOnfidoDropin/individualOnfidoFormConfig.d.ts +0 -4
  710. package/dist/types/components/Shared/forms/BusinessTypeSelection/EntityTypeRadioGroupCard.d.ts +0 -11
  711. package/dist/types/components/ui/molecules/Card/Card.d.ts +0 -3
  712. package/dist/types/components/ui/molecules/Card/types.d.ts +0 -26
  713. package/dist/types/embeds/EmbedBaseElement.d.ts +0 -41
  714. package/dist/types/embeds/EmbedCore.d.ts +0 -22
  715. package/dist/types/embeds/business-financing/AdyenBusinessFinancing.d.ts +0 -14
  716. package/dist/types/embeds/individual-configuration/AdyenIndividual.d.ts +0 -12
  717. package/dist/types/embeds/individual-status/AdyenManageIndividual.d.ts +0 -12
  718. package/dist/types/embeds/onboarding/AdyenOnboarding.d.ts +0 -12
  719. package/dist/types/embeds/terms-of-service-management/AdyenTermsOfService.d.ts +0 -12
  720. package/dist/types/embeds/terms-of-service-status/AdyenManageTermsOfService.d.ts +0 -12
  721. package/dist/types/embeds/transfer-instrument-configuration/AdyenTransferInstrument.d.ts +0 -16
  722. package/dist/types/embeds/transfer-instrument-management/AdyenManageTransferInstrument.d.ts +0 -14
  723. package/dist/types/embeds/verification-status/AdyenVerificationStatus.d.ts +0 -20
  724. package/dist/useBusinessDetailsData-kMDQy2r1.js +0 -2441
  725. package/dist/useDataset-D1R4kueP.js +0 -220
  726. package/dist/useUpdateBusinessLines-DWsML109.js +0 -46
  727. package/dist/validate-C4R1LPcu.js +0 -41
  728. /package/dist/types/components/{Shared → Apps}/tasks/TaskList/PayoutAccountTaskListItem.d.ts +0 -0
  729. /package/dist/types/components/{Shared → Apps}/tasks/TaskList/TaskList.d.ts +0 -0
  730. /package/dist/types/components/{Shared → Apps}/tasks/TaskList/TaskListGroup.d.ts +0 -0
  731. /package/dist/types/components/{Shared → Apps}/tasks/TaskList/TaskListItem.d.ts +0 -0
  732. /package/dist/types/components/{Shared → Apps}/tasks/TaskList/types.d.ts +0 -0
  733. /package/dist/types/components/{Shared → Business}/forms/FinancialInformation/FinancialInformation.d.ts +0 -0
  734. /package/dist/types/components/{Shared → Business}/forms/FinancialInformation/ReportedValue.d.ts +0 -0
  735. /package/dist/types/components/{Shared → Business}/forms/FinancialInformation/types.d.ts +0 -0
  736. /package/dist/types/components/{Shared → Business}/forms/FinancialInformation/validate.d.ts +0 -0
  737. /package/dist/types/components/Individual/forms/{IndividualOnfido/AdditionalPersonalDetails → AdditionalPersonalDetails}/AdditionalPersonalDetails.d.ts +0 -0
  738. /package/dist/types/components/Individual/forms/{IndividualOnfido/AdditionalPersonalDetails → AdditionalPersonalDetails}/Identity/Identity.d.ts +0 -0
  739. /package/dist/types/components/Individual/forms/{IndividualOnfido/BasicDetails → BasicDetails}/BasicDetails.d.ts +0 -0
  740. /package/dist/types/components/Individual/forms/{IndividualOnfido/GuidanceQuestion → GuidanceQuestion}/GuidanceQuestion.d.ts +0 -0
  741. /package/dist/types/components/Individual/forms/{Individual/IdDocumentUpload → IdDocumentUpload}/IdDocumentManualUpload.d.ts +0 -0
  742. /package/dist/types/components/Individual/forms/{IndividualOnfido/IdNowVerificationModal → IdNowVerificationModal}/IdNowVerificationModal.d.ts +0 -0
  743. /package/dist/types/components/Individual/forms/{Individual/IdVerification → IdVerification}/IdVerification.d.ts +0 -0
  744. /package/dist/types/components/Individual/forms/{Individual/IdVerification → IdVerification}/idVerificationProviderId.d.ts +0 -0
  745. /package/dist/types/components/Individual/forms/{Individual/IdVerification → IdVerification}/types.d.ts +0 -0
  746. /package/dist/types/components/Individual/forms/{IndividualOnfido/IdVerificationMethod → IdVerificationMethod}/IdVerificationMethod.d.ts +0 -0
  747. /package/dist/types/components/Individual/forms/{IndividualOnfido/ManualIdUpload → ManualIdUpload}/ManualIdUpload.d.ts +0 -0
  748. /package/dist/types/components/Individual/forms/{Individual/ProofOfRelationship → ProofOfRelationship}/index.d.ts +0 -0
  749. /package/dist/types/components/Individual/forms/{Individual/ProofOfResidency → ProofOfResidency}/ProofOfResidency.d.ts +0 -0
  750. /package/dist/types/components/Individual/forms/{IndividualOnfido/SignatoryQuestionnaire → SignatoryQuestionnaire}/SignatoryQuestionnaire.d.ts +0 -0
  751. /package/dist/types/components/Individual/forms/{IndividualOnfido/SignatoryQuestionnaire → SignatoryQuestionnaire}/SignatoryQuestionnaireModalContent.d.ts +0 -0
  752. /package/dist/types/components/Individual/forms/{IndividualOnfido/UboQuestionnaire → UboQuestionnaire}/UboQuestionnaire.d.ts +0 -0
  753. /package/dist/types/components/Individual/tasks/{IndividualOnfidoDropin/IndividualOnfidoStore.d.ts → IndividualDropin/IndividualStore.d.ts} +0 -0
  754. /package/dist/types/components/{Individual → Shared}/fields/LocalizedNameFields/LocalizedNameFields.d.ts +0 -0
@@ -1,2441 +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] = "0a845048-7bdd-49b8-81c7-eed544674d16", e._sentryDebugIdIdentifier = "sentry-dbid-0a845048-7bdd-49b8-81c7-eed544674d16");
6
- } catch (e) {
7
- }
8
- }
9
- ;
10
- import { jsx, jsxs, Fragment } from "preact/jsx-runtime";
11
- import { u as useTranslation, B as Button, G as Typography, C as CountryCodes, O as TaskTypes, r as LegalEntityTypes, W as isEmpty, a1 as entriesOf, bC as businessDetailsComponentsKeyMapping, bD as solePropBusinessDetailsKeyMapping, ak as objectsDeepEqual, aq as keysOf, i as isUndefinedOrNull, bE as solePropBusinessDetailsApiKeyMapping, bp as businessDetailsApiKeyMapping, P as createLogger, b8 as filterOutUnwantedAssociationsIfRootLE, b6 as drop, ag as getOwnEntityAssociations, aV as doArraysMatch, b as useApiContext, a3 as useAnalyticsContext, a2 as useQueryClient, X as useExperimentsContext, $ as useVersionConfiguration, o as useSettingsContext, K as useAccountHolder, bF as solePropBusinessDetailsDocumentMapping, bG as businessDetailsDocumentMapping, j as useQuery, c as useLegalEntity, R as ROOT_LE } from "./StoreProvider-DTMSAVgy.js";
12
- import { useState, useEffect, useMemo, useCallback } from "preact/hooks";
13
- import { u as useCreateBusinessLine, a as useUpdateBusinessLine } from "./useUpdateBusinessLines-DWsML109.js";
14
- import { F as FinancialInformation, A as AdditionalInformation, C as CompanyStructure, B as BusinessSelection, h as BasicInformation, i as getDefaultRegistrationNumberType, j as getDefaultVatNumberType, o as operationalAddressIsSameIds, k as FIELDS_NEEDED_FOR_COMPANY_SEARCH, v as verifiedBusiness, l as isVerifiedSingleCompanySearchResult, m as companyTypeMetadata, p as documentFormsIds, r as registrationNumberDefaultFieldMetadata, q as inferCompanyRegistrationNumberType, s as registrationNumberDefaultFieldConfig, t as stockTickerSymbolFieldMetadata, w as stockISINFieldMetadata, x as stockExchangeMICFieldMetadata, y as dateOfIncorporationFieldMetadata, z as industryCodeFieldMetadata, D as eInvoicingCodeFieldMetadata, G as vatAbsenceReasonMetadata, H as exemptFromRegistrationNumberDefaultFieldMetadata, I as doingBusinessAsFieldMetadata, J as doingBusinessAsAbsentFieldMetadata, K as defaultFieldMetadata, L as defaultFieldConfig, M as defaultFieldMetadata$1, N as defaultFieldConfig$1, P as defaultFieldMetadataV4, Q as defaultFieldMetadata$2, R as defaultFieldConfigV4, S as defaultFieldConfig$2, g as getForms, T as financialInfoValidationWithEmployeesRules, U as tinMatched, V as businessMismatchModalOpen, W as useCompanySearch, X as useVerifyTin, Y as handleCompanySelection, Z as applyVerifiedBusinessData, _ as useBusinessLines } from "./OnboardingDropinComponent-Cu2pv74K.js";
15
- import { u as useCreateLegalEntity } from "./useCreateLegalEntity-DIzVLIrw.js";
16
- import { u as useUpdateLegalEntity } from "./useUpdateLegalEntity-CIZP-vhE.js";
17
- import { F as FormContextProvider, a as FormFlow } from "./FormFlow-DX2A0gcf.js";
18
- import { a as useToastContext } from "./useToastContext-BQYYaLd-.js";
19
- import { _ as MemoizedDocumentUpload, C as CompanyTypesValues, m as COUNTRIES_USING_COMPANY_SEARCH, $ as isRegistrationNumberAbsentStateV4Scenario, D as isEmpty$1, a0 as COUNTRIES_THAT_USE_TAX_ID_INSTEAD_OF_VAT, r as requestingBanking, e as requestingIssuing, a as getCompanyRegistrationNumberOptions, t as taxInformationDefaultFieldMetadata, a1 as countryToTaxInfoTypeMap, f as taxInformationDefaultFieldConfig, a2 as rules } from "./IndividualOnfido-BxhmIQwc.js";
20
- import { c as composePerScenarioFormConfigurations, g as getPropsFromConfigurations } from "./process-field-configurations-BBc1EBeB.js";
21
- import { a as addValidityToForms, u as useFormComposer } from "./dropinUtils-BYk71qFP.js";
22
- import { u as useMultiForm } from "./useMultiForm-BkNgL1zi.js";
23
- import { m as mapExistingFile, g as getPageName, u as useScenarioConfiguration } from "./mapExistingFile-Iep6Rez8.js";
24
- import { a as datasetUtilities, C as Confirm } from "./useDataset-D1R4kueP.js";
25
- import { a as getDocument, e as getDocuments, c as createDocumentRequest, h as mergeProofOfOwnershipAttachments, b as getFileExtention, d as documentApiUtils } from "./documentUtils-CmY7W1gB.js";
26
- import { g as getFieldsWithExistingData } from "./getFieldsWithExistingData-D6K7_vTh.js";
27
- import { u as useFormContext, i as isDateOlderThanAYear, o as mapAddressLabels, p as getKeyForField } from "./Address-BG5_sFfZ.js";
28
- import { M as MemoizedConstitutionalDocument } from "./ConstitutionalDocument--Z--xpF7.js";
29
- import { M as Modal, a as ModalContent } from "./Modal-B8fxl0iP.js";
30
- import { S as SettingNames } from "./InputText-qTMbrUXW.js";
31
- import { m as mapJpAddressSchemaToAddressLocalizations, a as mapJpAddressSummary } from "./mapJpAddressSchemaToAddressLocalizations-C22nFO39.js";
32
- import { o as organizationTypesToSkipCompanyStructureForm } from "./utils-_N6wjH1k.js";
33
- import { f as formatCurrency, A as ALLOWED_SOF_SERVICES } from "./utils-BtBmicYe.js";
34
- import { s as summaryItem } from "./CountryField-BIYJvEAW.js";
35
- import { s as summaryStep } from "./Summary-BOSxxPjv.js";
36
- import { i as isValidationError, p as processValidationErrors, a as isMaintenanceModeError } from "./validationError-BcmQ2z0b.js";
37
- import { r as resolveFieldMetadata } from "./Spacer-BT5nYRXK.js";
38
- import { m as mapFinancialReportsToFinancialInformation, a as mapFinancialInformationToFinancialReport } from "./mapFinancialReportsToFinancialInformation-CeqxQKYv.js";
39
- import { f as formatObject } from "./utils-DNSfZiio.js";
40
- import { b as mapAddressLocalizationToJpAddressSchema, a as mapApiScriptLocalizationToSchemaFields, m as mapSchemaFieldsToApiScriptLocalization } from "./mapAddressLocalizationToJpAddressSchema-vJWbpAyq.js";
41
- const stripWhitespace = (str) => str.replace(/\s/g, "");
42
- const toNormalizedString = (s) => stripWhitespace(s.toLowerCase());
43
- const isNormalizedStringMatch = (s1, s2) => toNormalizedString(s1) === toNormalizedString(s2);
44
- const documentTypes$2 = [
45
- { id: "Internal company document", name: "internalCompanyDocument" },
46
- { id: "Business registry statement", name: "businessRegistryStatement" }
47
- ];
48
- const GuidanceContent$4 = ({ t }) => {
49
- return /* @__PURE__ */ jsx("div", { className: "adyen-kyc-upload-field__guidance", children: /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-u-margin-bottom-24", children: [
50
- /* @__PURE__ */ jsx("strong", { children: t(($) => $["documentRequirements"], { ns: "common" }) }),
51
- /* @__PURE__ */ jsxs("ul", { children: [
52
- /* @__PURE__ */ jsx("li", { children: t(($) => $["includesTheDirectorsFullName"], { ns: "business" }) }),
53
- /* @__PURE__ */ jsx("li", { children: t(($) => $["includesEvidenceOfTheIndividualsRole"], { ns: "business" }) }),
54
- /* @__PURE__ */ jsx("li", { children: t(($) => $["issuedOrSignedByALegalRepresentative"], { ns: "business" }) })
55
- ] })
56
- ] }) });
57
- };
58
- function ProofOfDirectorDocument({ id, country, ...props }) {
59
- const { t } = useTranslation(["common", "business"]);
60
- const [selectedDocumentName, setSelectedDocumentName] = useState(documentTypes$2[0].id);
61
- return /* @__PURE__ */ jsx(
62
- MemoizedDocumentUpload,
63
- {
64
- ...props,
65
- id,
66
- heading: t(($) => $["uploadYourOrganizationProofOfDirector"], { ns: "business" }),
67
- description: t(($) => $["weNeedAnOfficialDocument"], { ns: "business" }),
68
- documentField: "proofOfDirector",
69
- documentType: "proofOfDirector",
70
- guidanceContent: /* @__PURE__ */ jsx(GuidanceContent$4, { t }),
71
- country,
72
- hidePageCount: true,
73
- documentTypeSelect: {
74
- selectedType: selectedDocumentName,
75
- setSelectedType: setSelectedDocumentName,
76
- options: documentTypes$2
77
- }
78
- }
79
- );
80
- }
81
- const DOC_TYPE_FOR_MULTI_UPLOAD = "Organizational chart and supporting document";
82
- const documentTypes$1 = [
83
- { id: "Certified Organizational chart", name: "certifiedOrganizationalChart" },
84
- {
85
- id: "Organizational chart and supporting document",
86
- name: "organizationalChartAndSupportingDocument"
87
- }
88
- ];
89
- const GuidanceContent$3 = ({
90
- selectedDocumentName,
91
- t
92
- }) => {
93
- const [showGuidanceModal, setShowGuidanceModal] = useState(false);
94
- return /* @__PURE__ */ jsx("div", { className: "adyen-kyc-upload-field__guidance", children: /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-u-margin-bottom-24", children: [
95
- /* @__PURE__ */ jsx("strong", { children: t(($) => $["documentRequirements"], { ns: "common" }) }),
96
- selectedDocumentName === "Certified Organizational chart" ? /* @__PURE__ */ jsxs("ul", { children: [
97
- /* @__PURE__ */ jsx("li", { children: t(($) => $["showsOwnershipAndControllingRelations"], { ns: "business" }) }),
98
- /* @__PURE__ */ jsx("li", { children: t(($) => $["entitiesMustIncludeANameLegalStructureAndCountryRegionOfRegistration"], {
99
- ns: "business"
100
- }) }),
101
- /* @__PURE__ */ jsx("li", { children: t(($) => $["signedByALawyerAccountantAuditorWithinTheLast6Months"], {
102
- ns: "business"
103
- }) })
104
- ] }) : /* @__PURE__ */ jsxs("ul", { children: [
105
- /* @__PURE__ */ jsx("li", { children: t(($) => $["oneOrganizationalChartShowingOwnershipAndControllingRelations"], {
106
- ns: "business"
107
- }) }),
108
- /* @__PURE__ */ jsxs("ul", { children: [
109
- /* @__PURE__ */ jsx("li", { children: t(
110
- ($) => $["entitiesMustIncludeANameLegalStructureAndCountryRegionOfRegistration"],
111
- {
112
- ns: "business"
113
- }
114
- ) }),
115
- /* @__PURE__ */ jsxs("li", { children: [
116
- /* @__PURE__ */ jsxs("span", { children: [
117
- t(($) => $["one"], { ns: "common" }),
118
- " "
119
- ] }),
120
- /* @__PURE__ */ jsx(Button, { onClick: () => setShowGuidanceModal(true), variant: "link", children: t(($) => $["supportingDocument"], { ns: "common" }) }),
121
- /* @__PURE__ */ jsxs("span", { children: [
122
- " ",
123
- t(($) => $["describingTheOrganizationAndItsUBOSignedWithinTheLast6Months"], {
124
- ns: "business"
125
- })
126
- ] })
127
- ] })
128
- ] })
129
- ] }),
130
- showGuidanceModal && /* @__PURE__ */ jsx(
131
- Modal,
132
- {
133
- size: "small",
134
- onClose: () => setShowGuidanceModal(false),
135
- ariaLabel: t(($) => $["whichDocumentsQualifyToProveOwnership"], { ns: "business" }),
136
- children: /* @__PURE__ */ jsxs(ModalContent, { children: [
137
- /* @__PURE__ */ jsx(
138
- Typography,
139
- {
140
- el: "h1",
141
- variant: "title-l",
142
- className: "adyen-kyc-u-margin-bottom-32 adyen-kyc-u-margin-top-32",
143
- children: t(($) => $["whichDocumentsQualifyToProveOwnership"], { ns: "business" })
144
- }
145
- ),
146
- /* @__PURE__ */ jsx(Typography, { el: "p", variant: "body", children: t(($) => $["theDocumentsWeCanAcceptToProveOwnershipAre"], { ns: "business" }) }),
147
- /* @__PURE__ */ jsxs("ul", { children: [
148
- /* @__PURE__ */ jsx("li", { children: t(($) => $["securitiesRegister"], { ns: "business" }) }),
149
- /* @__PURE__ */ jsx("li", { children: t(($) => $["shareholderRegister"], { ns: "business" }) }),
150
- /* @__PURE__ */ jsx("li", { children: t(($) => $["ultimateBeneficialOwnerRegister"], { ns: "business" }) }),
151
- /* @__PURE__ */ jsx("li", { children: t(($) => $["articlesOfIncorporation"], { ns: "business" }) }),
152
- /* @__PURE__ */ jsx("li", { children: t(($) => $["annualReports"], { ns: "business" }) }),
153
- /* @__PURE__ */ jsx("li", { children: t(($) => $["annualReturns"], { ns: "business" }) }),
154
- /* @__PURE__ */ jsx("li", { children: t(($) => $["certificateOfCorporateStatus"], { ns: "business" }) }),
155
- /* @__PURE__ */ jsx("li", { children: t(($) => $["shareholderAgreements"], { ns: "business" }) }),
156
- /* @__PURE__ */ jsx("li", { children: t(($) => $["assignmentAgreements"], { ns: "business" }) }),
157
- /* @__PURE__ */ jsx("li", { children: t(($) => $["partnershipAgreements"], { ns: "business" }) }),
158
- /* @__PURE__ */ jsx("li", { children: t(($) => $["boardOfDirectorsMeetingRecords"], { ns: "business" }) }),
159
- /* @__PURE__ */ jsx("li", { children: t(($) => $["registrationDocument"], { ns: "business" }) }),
160
- /* @__PURE__ */ jsx("li", { children: t(($) => $["certificateOfIncumbency"], { ns: "business" }) })
161
- ] })
162
- ] })
163
- }
164
- )
165
- ] }) });
166
- };
167
- function ProofOfOwnershipDocument({ id, country, ...props }) {
168
- const { t } = useTranslation(["common", "business"]);
169
- const [selectedDocumentName, setSelectedDocumentName] = useState(documentTypes$1[0].id);
170
- const supportsMultiple = selectedDocumentName === DOC_TYPE_FOR_MULTI_UPLOAD;
171
- useEffect(() => {
172
- if (props.data?.proofOfOwnership?.length === 2) {
173
- setSelectedDocumentName(DOC_TYPE_FOR_MULTI_UPLOAD);
174
- }
175
- }, [props.data?.proofOfOwnership]);
176
- return /* @__PURE__ */ jsx(
177
- MemoizedDocumentUpload,
178
- {
179
- ...props,
180
- id,
181
- heading: t(($) => $["uploadYourOrganizationProofOfOwnership"], { ns: "business" }),
182
- description: t(($) => $["weNeedAnOfficialDocumentForOwnership"], { ns: "business" }),
183
- documentField: "proofOfOwnership",
184
- documentType: "proofOfOwnership",
185
- guidanceContent: /* @__PURE__ */ jsx(GuidanceContent$3, { selectedDocumentName, t }),
186
- country,
187
- label: t(($) => $["uploadYourDocuments"], { ns: "business" }),
188
- documentTypeSelect: {
189
- selectedType: selectedDocumentName,
190
- setSelectedType: setSelectedDocumentName,
191
- options: documentTypes$1
192
- },
193
- hidePageCount: true,
194
- supportsMultipleUploads: supportsMultiple,
195
- maxNumberOfFiles: supportsMultiple ? 2 : 1,
196
- extraDropzoneDescription: supportsMultiple ? t(($) => $["oneOrganizationalChartAndOneSupportingDocument"], { ns: "business" }) : void 0
197
- }
198
- );
199
- }
200
- const documentTypes = [
201
- { id: "Trade registry document", name: "tradeRegistryDocument" },
202
- { id: "Internal company document", name: "internalCompanyDocument" }
203
- ];
204
- const GuidanceContent$2 = ({ t }) => {
205
- return /* @__PURE__ */ jsx("div", { className: "adyen-kyc-upload-field__guidance", children: /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-u-margin-bottom-24", children: [
206
- /* @__PURE__ */ jsx("strong", { children: t(($) => $["documentRequirements"], { ns: "common" }) }),
207
- /* @__PURE__ */ jsxs("ul", { children: [
208
- /* @__PURE__ */ jsx("li", { children: t(($) => $["includesTheSignatorysFullName"], { ns: "business" }) }),
209
- /* @__PURE__ */ jsx("li", { children: t(($) => $["includesEvidenceOfTheIndividualsRoleSignatory"], { ns: "business" }) }),
210
- /* @__PURE__ */ jsx("li", { children: t(($) => $["issuedOrSignedByALegalRepresentative"], { ns: "business" }) })
211
- ] })
212
- ] }) });
213
- };
214
- function ProofOfSignatoryDocument({ id, country, ...props }) {
215
- const { t } = useTranslation(["common", "business"]);
216
- const [selectedDocumentName, setSelectedDocumentName] = useState(documentTypes[0].id);
217
- return /* @__PURE__ */ jsx(
218
- MemoizedDocumentUpload,
219
- {
220
- ...props,
221
- id,
222
- heading: t(($) => $["uploadYourOrganizationProofOfSignatory"], { ns: "business" }),
223
- description: t(($) => $["weNeedAnOfficialDocumentSignatory"], { ns: "business" }),
224
- documentField: "proofOfSignatory",
225
- documentType: "proofOfSignatory",
226
- guidanceContent: /* @__PURE__ */ jsx(GuidanceContent$2, { t }),
227
- country,
228
- hidePageCount: true,
229
- documentTypeSelect: {
230
- selectedType: selectedDocumentName,
231
- setSelectedType: setSelectedDocumentName,
232
- options: documentTypes
233
- }
234
- }
235
- );
236
- }
237
- const ACCEPTED_DOCUMENTS_MAP$1 = {
238
- [CountryCodes.PuertoRico]: {
239
- // should exactly match CountryCodes.UnitedStates
240
- [CompanyTypesValues.PRIVATE_COMPANY]: {
241
- header: "acceptedDocumentsForPrivateCompanies",
242
- documents: [
243
- "certificateOfIncorporation",
244
- "certificateOfFormation",
245
- "secretaryOfStateFiling__PR"
246
- ]
247
- },
248
- [CompanyTypesValues.PUBLIC_COMPANY]: {
249
- header: "acceptedDocumentsForPublicCompanies",
250
- documents: ["certificateOfIncorporation", "certificateOfFormation"]
251
- },
252
- [CompanyTypesValues.UNLISTED_PUBLIC_COMPANY]: {
253
- header: "acceptedDocumentsForPublicCompanies",
254
- documents: ["certificateOfIncorporation", "certificateOfFormation"]
255
- },
256
- [CompanyTypesValues.GOVERNMENTAL_ORGANIZATION]: {
257
- header: "acceptedDocumentsForGovernment",
258
- documents: ["charter"]
259
- },
260
- [CompanyTypesValues.NON_PROFIT_OR_CHARITABLE]: {
261
- header: "acceptedDocumentsForNonProfit",
262
- documents: [
263
- "articlesOfIncorporation",
264
- "meetingRecords",
265
- "secretaryOfStateRegDoc__PR",
266
- "certificateOfIncumbency"
267
- ]
268
- },
269
- [CompanyTypesValues.INCORPORATED_PARTNERSHIP]: {
270
- header: "acceptedDocumentsForPartnerships",
271
- documents: ["partnerShipAgreement", "secretaryOfStateFiling__PR"]
272
- }
273
- },
274
- [CountryCodes.UnitedStates]: {
275
- [CompanyTypesValues.PRIVATE_COMPANY]: {
276
- header: "acceptedDocumentsForPrivateCompanies",
277
- documents: ["certificateOfIncorporation", "certificateOfFormation", "secretaryOfStateFiling"]
278
- },
279
- [CompanyTypesValues.PUBLIC_COMPANY]: {
280
- header: "acceptedDocumentsForPublicCompanies",
281
- documents: ["certificateOfIncorporation", "certificateOfFormation"]
282
- },
283
- [CompanyTypesValues.UNLISTED_PUBLIC_COMPANY]: {
284
- header: "acceptedDocumentsForPublicCompanies",
285
- documents: ["certificateOfIncorporation", "certificateOfFormation"]
286
- },
287
- [CompanyTypesValues.GOVERNMENTAL_ORGANIZATION]: {
288
- header: "acceptedDocumentsForGovernment",
289
- documents: ["charter"]
290
- },
291
- [CompanyTypesValues.NON_PROFIT_OR_CHARITABLE]: {
292
- header: "acceptedDocumentsForNonProfit",
293
- documents: [
294
- "articlesOfIncorporation",
295
- "meetingRecords",
296
- "secretaryOfStateRegDoc",
297
- "certificateOfIncumbency"
298
- ]
299
- },
300
- [CompanyTypesValues.INCORPORATED_PARTNERSHIP]: {
301
- header: "acceptedDocumentsForPartnerships",
302
- documents: ["partnerShipAgreement", "secretaryOfStateFiling"]
303
- }
304
- }
305
- };
306
- const GuidanceContent$1 = ({
307
- country,
308
- companyType,
309
- t
310
- }) => {
311
- const acceptedDocGuidance = ACCEPTED_DOCUMENTS_MAP$1[country]?.[companyType];
312
- return /* @__PURE__ */ jsx("div", { className: "adyen-kyc-upload-field__guidance", children: country === "US" ? /* @__PURE__ */ jsxs(Fragment, { children: [
313
- acceptedDocGuidance && /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-u-margin-bottom-24", children: [
314
- /* @__PURE__ */ jsx("strong", { children: t(($) => $[acceptedDocGuidance.header], { ns: "business" }) }),
315
- /* @__PURE__ */ jsx("ul", { children: acceptedDocGuidance.documents.map((document, i) => /* @__PURE__ */ jsx("li", { children: t(($) => $[document], { ns: "business" }) }, i)) })
316
- ] }),
317
- /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-u-margin-bottom-24", children: [
318
- /* @__PURE__ */ jsx("strong", { children: t(($) => $["documentRequirements"], { ns: "common" }) }),
319
- /* @__PURE__ */ jsx("ul", { children: /* @__PURE__ */ jsx("li", { children: t(($) => $["includesLegalCompanyName"], { ns: "business" }) }) })
320
- ] })
321
- ] }) : /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-u-margin-bottom-24", children: [
322
- /* @__PURE__ */ jsx("strong", { children: t(($) => $["documentRequirements"], { ns: "common" }) }),
323
- /* @__PURE__ */ jsx("ul", { children: /* @__PURE__ */ jsx("li", { children: t(($) => $["documentIssuedByGovernmentAuthority"], { ns: "business" }) }) })
324
- ] }) });
325
- };
326
- function RegistrationDocument({
327
- id,
328
- country,
329
- companyType = CompanyTypesValues.PRIVATE_COMPANY,
330
- ...props
331
- }) {
332
- const { t } = useTranslation(["common", "business"]);
333
- return /* @__PURE__ */ jsx(
334
- MemoizedDocumentUpload,
335
- {
336
- ...props,
337
- id,
338
- heading: t(($) => $["companyRegistrationDocumentFormHeading"], { ns: "business" }),
339
- description: t(($) => $["companyRegistrationDocumentFormDescription"], { ns: "business" }),
340
- documentField: "registrationDocument",
341
- documentType: "registrationDocument",
342
- guidanceContent: /* @__PURE__ */ jsx(GuidanceContent$1, { country, companyType, t }),
343
- companyType,
344
- country,
345
- hidePageCount: true
346
- }
347
- );
348
- }
349
- const ACCEPTED_DOCUMENTS_MAP = {
350
- [CountryCodes.PuertoRico]: {
351
- // should exactly match CountryCodes.UnitedStates
352
- [CompanyTypesValues.PRIVATE_COMPANY]: {
353
- header: "acceptedDocumentsForPrivateCompanies",
354
- documents: ["irsCP575"]
355
- },
356
- [CompanyTypesValues.PUBLIC_COMPANY]: {
357
- header: "acceptedDocumentsForPublicCompanies",
358
- documents: ["annualReport", "secForm10k"]
359
- },
360
- [CompanyTypesValues.UNLISTED_PUBLIC_COMPANY]: {
361
- header: "acceptedDocumentsForPublicCompanies",
362
- documents: ["annualReport", "secForm10k"]
363
- },
364
- [CompanyTypesValues.NON_PROFIT_OR_CHARITABLE]: {
365
- header: "acceptedDocumentsForNonProfit",
366
- documents: ["annualReport"]
367
- },
368
- [CompanyTypesValues.INCORPORATED_PARTNERSHIP]: {
369
- header: "acceptedDocumentsForPartnerships",
370
- documents: ["irsScheduleK1"]
371
- }
372
- },
373
- [CountryCodes.UnitedStates]: {
374
- [CompanyTypesValues.PRIVATE_COMPANY]: {
375
- header: "acceptedDocumentsForPrivateCompanies",
376
- documents: ["irsCP575"]
377
- },
378
- [CompanyTypesValues.PUBLIC_COMPANY]: {
379
- header: "acceptedDocumentsForPublicCompanies",
380
- documents: ["annualReport", "secForm10k"]
381
- },
382
- [CompanyTypesValues.UNLISTED_PUBLIC_COMPANY]: {
383
- header: "acceptedDocumentsForPublicCompanies",
384
- documents: ["annualReport", "secForm10k"]
385
- },
386
- [CompanyTypesValues.NON_PROFIT_OR_CHARITABLE]: {
387
- header: "acceptedDocumentsForNonProfit",
388
- documents: ["annualReport"]
389
- },
390
- [CompanyTypesValues.INCORPORATED_PARTNERSHIP]: {
391
- header: "acceptedDocumentsForPartnerships",
392
- documents: ["irsScheduleK1"]
393
- }
394
- }
395
- };
396
- const GuidanceContent = ({
397
- country,
398
- companyType
399
- }) => {
400
- const { t } = useTranslation(["common", "business"]);
401
- const acceptedDocGuidance = ACCEPTED_DOCUMENTS_MAP[country]?.[companyType];
402
- return /* @__PURE__ */ jsx("div", { className: "adyen-kyc-upload-field__guidance", children: country === "US" ? /* @__PURE__ */ jsxs(Fragment, { children: [
403
- acceptedDocGuidance && /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-u-margin-bottom-24", children: [
404
- /* @__PURE__ */ jsx("strong", { children: t(($) => $[acceptedDocGuidance.header], { ns: "business" }) }),
405
- /* @__PURE__ */ jsx("ul", { children: acceptedDocGuidance.documents.map((document, i) => /* @__PURE__ */ jsx("li", { children: t(($) => $[document], { ns: "business" }) }, i)) })
406
- ] }),
407
- /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-u-margin-bottom-24", children: [
408
- /* @__PURE__ */ jsx("strong", { children: t(($) => $["documentRequirements"], { ns: "common" }) }),
409
- /* @__PURE__ */ jsxs("ul", { children: [
410
- /* @__PURE__ */ jsx("li", { children: t(($) => $["includesLegalCompanyName"], { ns: "business" }) }),
411
- /* @__PURE__ */ jsx("li", { children: t(($) => $["includesEIN"], { ns: "business" }) })
412
- ] })
413
- ] })
414
- ] }) : /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-u-margin-bottom-24", children: [
415
- /* @__PURE__ */ jsx("div", { className: "adyen-kyc-upload-field__subtitle", children: t(($) => $["documentRequirements"], { ns: "common" }) }),
416
- /* @__PURE__ */ jsxs("ul", { children: [
417
- /* @__PURE__ */ jsx("li", { children: t(($) => $["containsNameOfCompany"], { ns: "business" }) }),
418
- /* @__PURE__ */ jsx("li", { children: t(($) => $["documentShowsTaxIdOfCompany"], { ns: "business" }) }),
419
- /* @__PURE__ */ jsx("li", { children: t(($) => $["issuedByTheTaxAuthority"], { ns: "business" }) })
420
- ] })
421
- ] }) });
422
- };
423
- function TaxDocument({
424
- id,
425
- country,
426
- companyType = CompanyTypesValues.PRIVATE_COMPANY,
427
- ...props
428
- }) {
429
- const { t } = useTranslation("business");
430
- return /* @__PURE__ */ jsx(
431
- MemoizedDocumentUpload,
432
- {
433
- ...props,
434
- id,
435
- heading: t(($) => $["companyTaxDocumentFormHeading"]),
436
- description: t(($) => $["companyTaxDocumentFormDescription"]),
437
- documentField: "taxDocument",
438
- documentType: "proofOfOrganizationTaxInfo",
439
- guidanceContent: /* @__PURE__ */ jsx(GuidanceContent, { country, companyType }),
440
- companyType,
441
- country,
442
- hidePageCount: true
443
- }
444
- );
445
- }
446
- function BusinessDetailsMultiform({
447
- taskType,
448
- country,
449
- activeForm,
450
- shouldValidate,
451
- problems = {},
452
- handleNextClick,
453
- handleBackClick,
454
- setLoadingStatus,
455
- isTopLevelEntity
456
- }) {
457
- const { t } = useTranslation(["common", "business"]);
458
- const { form } = useFormContext();
459
- const companyType = taskType === TaskTypes.SOLE_PROPRIETOR_COMPANY ? CompanyTypesValues.SOLE_PROPRIETORSHIP : form.data.companyStructure?.entityType;
460
- function handleChange(formName, fieldName, mode) {
461
- return form.handleChangeFor(fieldName, formName, mode);
462
- }
463
- const renderActiveForm = (activeForm2) => {
464
- switch (activeForm2.formId) {
465
- case "basicInformation":
466
- return /* @__PURE__ */ jsx(
467
- BasicInformation,
468
- {
469
- id: activeForm2.formId,
470
- country,
471
- shouldValidate,
472
- validationErrors: problems.validationErrors?.[activeForm2.formId],
473
- verificationErrors: problems.verificationErrors?.[activeForm2.formId],
474
- companyType,
475
- isTopLevelEntity,
476
- disableCountry: taskType === TaskTypes.SOLE_PROPRIETOR_COMPANY
477
- }
478
- );
479
- case "businessSelection":
480
- return /* @__PURE__ */ jsx(
481
- BusinessSelection,
482
- {
483
- id: activeForm2.formId,
484
- country,
485
- shouldValidate,
486
- validationErrors: problems.validationErrors?.[activeForm2.formId],
487
- verificationErrors: problems.verificationErrors?.[activeForm2.formId],
488
- handleNextClick,
489
- handleBackClick,
490
- setLoadingStatus
491
- }
492
- );
493
- case "companyStructure":
494
- return /* @__PURE__ */ jsx(
495
- CompanyStructure,
496
- {
497
- id: activeForm2.formId,
498
- country,
499
- shouldValidate,
500
- validationErrors: problems.validationErrors?.[activeForm2.formId],
501
- verificationErrors: problems.verificationErrors?.[activeForm2.formId]
502
- }
503
- );
504
- case "additionalInformation":
505
- return /* @__PURE__ */ jsx(
506
- AdditionalInformation,
507
- {
508
- id: activeForm2.formId,
509
- country,
510
- companyType,
511
- shouldValidate,
512
- validationErrors: problems.validationErrors?.[activeForm2.formId],
513
- verificationErrors: problems.verificationErrors?.[activeForm2.formId]
514
- }
515
- );
516
- case "companyTaxDocument":
517
- return country === "US" ? /* @__PURE__ */ jsx(
518
- TaxDocument,
519
- {
520
- id: activeForm2.formId,
521
- country,
522
- companyType,
523
- shouldValidate,
524
- fieldValidationErrors: problems.validationErrors?.[activeForm2.formId] ?? {},
525
- formVerificationErrors: problems.verificationErrors?.[activeForm2.formId] ?? {},
526
- data: form.data.companyTaxDocument,
527
- errors: form.errors.companyTaxDocument,
528
- valid: form.valid.companyTaxDocument,
529
- allFields: form.allFields?.companyTaxDocument,
530
- requiredFields: form.requiredFields?.companyTaxDocument,
531
- optionalFields: form.optionalFields?.companyTaxDocument,
532
- trustedFields: form.trustedFields?.companyTaxDocument,
533
- handleFieldChange: () => handleChange("companyTaxDocument", "taxDocument")
534
- }
535
- ) : /* @__PURE__ */ jsx(
536
- MemoizedDocumentUpload,
537
- {
538
- id: activeForm2.formId,
539
- country,
540
- companyType,
541
- shouldValidate,
542
- heading: t(($) => $["companyTaxDocumentFormHeading"], { ns: "business" }),
543
- description: t(($) => $["companyTaxDocumentFormDescription"], { ns: "business" }),
544
- fieldValidationErrors: problems.validationErrors?.[activeForm2.formId] ?? {},
545
- formVerificationErrors: problems.verificationErrors?.[activeForm2.formId] ?? {},
546
- data: form.data.companyTaxDocument,
547
- errors: form.errors.companyTaxDocument,
548
- valid: form.valid.companyTaxDocument,
549
- allFields: form.allFields?.companyTaxDocument,
550
- requiredFields: form.requiredFields?.companyTaxDocument,
551
- optionalFields: form.optionalFields?.companyTaxDocument,
552
- trustedFields: form.trustedFields?.companyTaxDocument,
553
- handleFieldChange: (fieldName) => handleChange("companyTaxDocument", fieldName),
554
- documentField: "taxDocument",
555
- documentType: "vatDocument",
556
- hidePageCount: true,
557
- guidanceContent: /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-u-margin-bottom-24", children: [
558
- /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-upload-field__subtitle", children: [
559
- " ",
560
- t(($) => $["requirements"], { ns: "common" })
561
- ] }),
562
- /* @__PURE__ */ jsxs("ul", { children: [
563
- /* @__PURE__ */ jsx("li", { children: t(($) => $["containsNameOfCompany"], { ns: "business" }) }),
564
- /* @__PURE__ */ jsx("li", { children: t(($) => $["documentShowsTaxIdOfCompany"], { ns: "business" }) }),
565
- /* @__PURE__ */ jsx("li", { children: t(($) => $["issuedByTheTaxAuthority"], { ns: "business" }) })
566
- ] })
567
- ] })
568
- }
569
- );
570
- case "companyRegistrationDocument":
571
- return /* @__PURE__ */ jsx(
572
- RegistrationDocument,
573
- {
574
- id: activeForm2.formId,
575
- country,
576
- companyType,
577
- data: form.data.companyRegistrationDocument,
578
- errors: form.errors.companyRegistrationDocument,
579
- valid: form.valid.companyRegistrationDocument,
580
- allFields: form.allFields?.companyRegistrationDocument,
581
- requiredFields: form.requiredFields?.companyRegistrationDocument,
582
- optionalFields: form.optionalFields?.companyRegistrationDocument,
583
- trustedFields: form.trustedFields?.companyRegistrationDocument,
584
- handleFieldChange: (fieldName) => handleChange("companyRegistrationDocument", fieldName),
585
- shouldValidate,
586
- fieldValidationErrors: problems.validationErrors?.[activeForm2.formId] ?? {},
587
- formVerificationErrors: problems.verificationErrors?.[activeForm2.formId] ?? {}
588
- }
589
- );
590
- case "companyProofOfDirectorDocument":
591
- return /* @__PURE__ */ jsx(
592
- ProofOfDirectorDocument,
593
- {
594
- id: activeForm2.formId,
595
- country,
596
- data: form.data?.companyProofOfDirectorDocument,
597
- errors: form.errors.companyProofOfDirectorDocument,
598
- valid: form.valid.companyProofOfDirectorDocument,
599
- allFields: form.allFields?.companyProofOfDirectorDocument,
600
- requiredFields: form.requiredFields?.companyProofOfDirectorDocument,
601
- optionalFields: form.optionalFields?.companyProofOfDirectorDocument,
602
- trustedFields: form.trustedFields?.companyProofOfDirectorDocument,
603
- handleFieldChange: (fieldName) => handleChange("companyProofOfDirectorDocument", fieldName),
604
- shouldValidate,
605
- fieldValidationErrors: problems.validationErrors?.[activeForm2.formId] ?? {},
606
- formVerificationErrors: problems.verificationErrors?.[activeForm2.formId] ?? {}
607
- }
608
- );
609
- case "companyProofOfSignatoryDocument":
610
- return /* @__PURE__ */ jsx(
611
- ProofOfSignatoryDocument,
612
- {
613
- id: activeForm2.formId,
614
- country,
615
- data: form.data?.companyProofOfSignatoryDocument,
616
- errors: form.errors.companyProofOfSignatoryDocument,
617
- valid: form.valid.companyProofOfSignatoryDocument,
618
- allFields: form.allFields?.companyProofOfSignatoryDocument,
619
- requiredFields: form.requiredFields?.companyProofOfSignatoryDocument,
620
- optionalFields: form.optionalFields?.companyProofOfSignatoryDocument,
621
- trustedFields: form.trustedFields?.companyProofOfSignatoryDocument,
622
- handleFieldChange: (fieldName) => handleChange("companyProofOfSignatoryDocument", fieldName),
623
- shouldValidate,
624
- fieldValidationErrors: problems.validationErrors?.[activeForm2.formId] ?? {},
625
- formVerificationErrors: problems.verificationErrors?.[activeForm2.formId] ?? {}
626
- }
627
- );
628
- case "companyProofOfOwnershipDocument":
629
- return /* @__PURE__ */ jsx(
630
- ProofOfOwnershipDocument,
631
- {
632
- id: activeForm2.formId,
633
- country,
634
- data: form.data?.companyProofOfOwnershipDocument,
635
- errors: form.errors.companyProofOfOwnershipDocument,
636
- valid: form.valid.companyProofOfOwnershipDocument,
637
- allFields: form.allFields?.companyProofOfOwnershipDocument,
638
- requiredFields: form.requiredFields?.companyProofOfOwnershipDocument,
639
- optionalFields: form.optionalFields?.companyProofOfOwnershipDocument,
640
- trustedFields: form.trustedFields?.companyProofOfOwnershipDocument,
641
- handleFieldChange: (fieldName) => handleChange("companyProofOfOwnershipDocument", fieldName),
642
- shouldValidate,
643
- fieldValidationErrors: problems.validationErrors?.[activeForm2.formId] ?? {},
644
- formVerificationErrors: problems.verificationErrors?.[activeForm2.formId] ?? {}
645
- }
646
- );
647
- case "companyConstitutionalDocument":
648
- return /* @__PURE__ */ jsx(
649
- MemoizedConstitutionalDocument,
650
- {
651
- id: activeForm2.formId,
652
- legalEntityType: LegalEntityTypes.SOLE_PROPRIETORSHIP,
653
- country,
654
- data: form.data?.companyConstitutionalDocument,
655
- errors: form.errors.companyConstitutionalDocument,
656
- valid: form.valid.companyConstitutionalDocument,
657
- allFields: form.allFields?.companyConstitutionalDocument,
658
- requiredFields: form.requiredFields?.companyConstitutionalDocument,
659
- optionalFields: form.optionalFields?.companyConstitutionalDocument,
660
- trustedFields: form.trustedFields?.companyConstitutionalDocument,
661
- handleFieldChange: (fieldName) => handleChange("companyConstitutionalDocument", fieldName),
662
- shouldValidate,
663
- fieldValidationErrors: problems.validationErrors?.[activeForm2.formId] ?? {},
664
- formVerificationErrors: problems.verificationErrors?.[activeForm2.formId] ?? {}
665
- }
666
- );
667
- case "companyFinancialInformation":
668
- return /* @__PURE__ */ jsx(
669
- FinancialInformation,
670
- {
671
- multiForm: form,
672
- id: activeForm2.formId,
673
- country,
674
- data: form.data?.companyFinancialInformation,
675
- allFields: form.allFields?.companyFinancialInformation,
676
- requiredFields: form.requiredFields?.companyFinancialInformation,
677
- optionalFields: form.optionalFields?.companyFinancialInformation,
678
- trustedFields: form.trustedFields?.companyFinancialInformation,
679
- shouldValidate
680
- }
681
- );
682
- default:
683
- return null;
684
- }
685
- };
686
- return /* @__PURE__ */ jsx("div", { className: "adyen-kyc-business-details", children: /* @__PURE__ */ jsx("div", { className: "adyen-kyc-form-wrapper", children: renderActiveForm(activeForm) }) });
687
- }
688
- const CompanyStructureValidation = {
689
- entityType: {
690
- modes: ["blur"],
691
- validate: (entityType) => !isEmpty(entityType),
692
- errorMessage: "fieldIsRequired"
693
- }
694
- };
695
- const mapApiDocumentToBusinessDetailsDocuments = (entityId) => {
696
- const registrationDocument = getDocument(entityId, "registrationDocument") ?? null;
697
- const taxDocument = getDocument(entityId, "vatDocument") ?? getDocument(entityId, "proofOfOrganizationTaxInfo") ?? null;
698
- const proofOfDirector = getDocument(entityId, "proofOfDirector") ?? null;
699
- const proofOfSignatory = getDocument(entityId, "proofOfSignatory") ?? null;
700
- const proofOfOwnership = getDocuments(entityId, "proofOfOwnership") ?? null;
701
- const constitutionalDocument = getDocument(entityId, "constitutionalDocument") ?? null;
702
- const mergedProofOfOwnershipAttachments = proofOfOwnership?.flatMap((doc) => doc.attachments ?? []) ?? [];
703
- return {
704
- companyRegistrationDocument: registrationDocument ? { registrationDocument: [mapExistingFile(getPageName(registrationDocument))] } : void 0,
705
- companyTaxDocument: taxDocument ? { taxDocument: [mapExistingFile(getPageName(taxDocument))] } : void 0,
706
- companyProofOfDirectorDocument: proofOfDirector ? { proofOfDirector: [mapExistingFile(getPageName(proofOfDirector))] } : void 0,
707
- companyProofOfSignatoryDocument: proofOfSignatory ? { proofOfSignatory: [mapExistingFile(getPageName(proofOfSignatory))] } : void 0,
708
- companyProofOfOwnershipDocument: mergedProofOfOwnershipAttachments.length > 0 ? {
709
- proofOfOwnership: mergedProofOfOwnershipAttachments.map(
710
- (attachment) => mapExistingFile(attachment.pageName ?? "")
711
- )
712
- } : void 0,
713
- companyConstitutionalDocument: constitutionalDocument ? {
714
- constitutionalDocument: [mapExistingFile(getPageName(constitutionalDocument))]
715
- } : void 0
716
- };
717
- };
718
- const mapBasicInformation = (data) => {
719
- if (!data) return;
720
- return !!data.country && COUNTRIES_USING_COMPANY_SEARCH.includes(data.country) ? data : entriesOf(data).reduce((acc, [field]) => {
721
- if (!FIELDS_NEEDED_FOR_COMPANY_SEARCH.includes(field)) {
722
- return {
723
- ...acc,
724
- [field]: data[field]
725
- };
726
- }
727
- return acc;
728
- }, {});
729
- };
730
- const mapDbaName = (legalEntity) => {
731
- const entity = legalEntity.type === "organization" ? legalEntity.organization : legalEntity.soleProprietorship;
732
- const dbaName = {};
733
- if (typeof entity?.doingBusinessAsAbsent !== "undefined") {
734
- dbaName.hasDoingBusinessAs = !entity.doingBusinessAsAbsent;
735
- } else {
736
- if (entity?.doingBusinessAs) {
737
- dbaName.hasDoingBusinessAs = entity?.doingBusinessAs !== (legalEntity.type === "organization" ? legalEntity.organization?.legalName : legalEntity.soleProprietorship?.name);
738
- } else {
739
- dbaName.hasDoingBusinessAs = void 0;
740
- }
741
- }
742
- if (legalEntity.organization?.doingBusinessAs) {
743
- dbaName.doingBusinessAs = legalEntity.organization?.doingBusinessAs;
744
- }
745
- return dbaName;
746
- };
747
- const mapIsUen = (taxInformation, registrationNumber, country) => {
748
- const currentCountryTaxInfo = taxInformation?.find((taxInfo) => taxInfo.country === country);
749
- if (!currentCountryTaxInfo || country !== "SG") return {};
750
- return {
751
- registrationNumber: currentCountryTaxInfo.type === "UEN" ? currentCountryTaxInfo.number : registrationNumber,
752
- isUen: currentCountryTaxInfo.type === "UEN"
753
- };
754
- };
755
- const mapAdditionalInformation = (data, legalEntity) => {
756
- if (!data) return;
757
- const entity = legalEntity.type === "organization" ? legalEntity.organization : legalEntity.soleProprietorship;
758
- const currentCountry = entity?.registeredAddress.country;
759
- const dbaNameFields = mapDbaName(legalEntity);
760
- const isUen = mapIsUen(
761
- data.taxInformation,
762
- data.registrationNumber,
763
- currentCountry
764
- );
765
- const companyType = legalEntity.type === "organization" ? legalEntity.organization?.type : CompanyTypesValues.SOLE_PROPRIETORSHIP;
766
- const registrationNumberType = getDefaultRegistrationNumberType(
767
- entity?.registrationNumber,
768
- currentCountry,
769
- companyType
770
- );
771
- const vatNumberType = getDefaultVatNumberType(entity?.vatNumber, currentCountry);
772
- const operationalAddressIsSame = entity?.principalPlaceOfBusiness && !objectsDeepEqual(entity?.principalPlaceOfBusiness, entity?.registeredAddress) ? operationalAddressIsSameIds.OPERATIONAL_ADDRESS_IS_NOT_SAME : operationalAddressIsSameIds.OPERATIONAL_ADDRESS_IS_SAME;
773
- if (entity?.registeredAddress?.localization) {
774
- data.registrationAddress = {
775
- ...data.registrationAddress,
776
- ...mapAddressLocalizationToJpAddressSchema(entity.registeredAddress.localization)
777
- };
778
- }
779
- if (entity?.principalPlaceOfBusiness?.localization) {
780
- data.operationalAddress = {
781
- ...data.operationalAddress,
782
- ...mapAddressLocalizationToJpAddressSchema(entity.principalPlaceOfBusiness.localization)
783
- };
784
- }
785
- const result = entriesOf(data).reduce(
786
- (acc, [field]) => {
787
- if (!COUNTRIES_USING_COMPANY_SEARCH.includes(currentCountry)) {
788
- return {
789
- ...acc,
790
- [field]: data[field]
791
- };
792
- }
793
- if (!FIELDS_NEEDED_FOR_COMPANY_SEARCH.includes(field)) {
794
- return {
795
- ...acc,
796
- [field]: data[field]
797
- };
798
- }
799
- return acc;
800
- },
801
- { operationalAddressIsSame, registrationNumberType, vatNumberType }
802
- );
803
- return { ...result, ...dbaNameFields, ...isUen };
804
- };
805
- const mapLegalNameLocalization = (data) => {
806
- const localization = data.organization?.localization;
807
- if (!localization) return {};
808
- let result = {};
809
- for (const { script, fields } of localization) {
810
- const schemaFieldsFromLocalization = mapApiScriptLocalizationToSchemaFields({
811
- script,
812
- fields: {
813
- // mismatch between API `legalName` and schema `legalCompanyName`
814
- legalCompanyName: fields.legalName
815
- }
816
- });
817
- result = {
818
- ...result,
819
- ...schemaFieldsFromLocalization
820
- };
821
- }
822
- return result;
823
- };
824
- const mapLegalEntityToBusinessDetailsSchema = (legalEntity, parentEntity) => {
825
- if (!legalEntity) return {};
826
- const {
827
- companyRegistrationDocument,
828
- companyTaxDocument,
829
- companyProofOfDirectorDocument,
830
- companyProofOfSignatoryDocument,
831
- companyProofOfOwnershipDocument,
832
- companyConstitutionalDocument
833
- } = mapApiDocumentToBusinessDetailsDocuments(legalEntity.id);
834
- const buildSolePropSchema = () => {
835
- const solePropData = formatObject(
836
- legalEntity,
837
- solePropBusinessDetailsKeyMapping
838
- );
839
- const country = solePropData?.additionalInformation?.registrationAddress?.country ?? parentEntity?.individual?.residentialAddress.country;
840
- if (legalEntity?.soleProprietorship?.financialReports && solePropData) {
841
- solePropData.companyFinancialInformation = mapFinancialReportsToFinancialInformation(
842
- legalEntity.soleProprietorship.financialReports
843
- );
844
- }
845
- return {
846
- ...solePropData,
847
- basicInformation: {
848
- ...solePropData?.basicInformation,
849
- country
850
- },
851
- companyConstitutionalDocument
852
- };
853
- };
854
- const orgSchema = {
855
- ...formatObject(legalEntity, businessDetailsComponentsKeyMapping),
856
- businessSelection: {},
857
- companyRegistrationDocument,
858
- companyTaxDocument,
859
- companyProofOfDirectorDocument,
860
- companyProofOfSignatoryDocument,
861
- companyProofOfOwnershipDocument,
862
- companyFinancialInformation: {}
863
- };
864
- const businessDetailsSchema = legalEntity.type === "organization" ? orgSchema : buildSolePropSchema();
865
- return entriesOf(businessDetailsSchema).reduce((componentData, [key]) => {
866
- switch (key) {
867
- case "basicInformation": {
868
- return {
869
- ...componentData,
870
- [key]: {
871
- ...mapBasicInformation(businessDetailsSchema[key]),
872
- ...mapLegalNameLocalization(legalEntity)
873
- }
874
- };
875
- }
876
- case "businessSelection": {
877
- return {
878
- ...componentData,
879
- [key]: {
880
- hasSelectedBusiness: false
881
- }
882
- };
883
- }
884
- case "companyStructure": {
885
- return {
886
- ...componentData,
887
- [key]: {
888
- ...businessDetailsSchema[key]
889
- }
890
- };
891
- }
892
- case "additionalInformation": {
893
- return {
894
- ...componentData,
895
- [key]: mapAdditionalInformation(businessDetailsSchema[key], legalEntity)
896
- };
897
- }
898
- case "companyRegistrationDocument": {
899
- return {
900
- ...componentData,
901
- [key]: businessDetailsSchema[key]
902
- };
903
- }
904
- case "companyTaxDocument": {
905
- return {
906
- ...componentData,
907
- [key]: businessDetailsSchema[key]
908
- };
909
- }
910
- case "companyProofOfDirectorDocument": {
911
- return {
912
- ...componentData,
913
- [key]: businessDetailsSchema[key]
914
- };
915
- }
916
- case "companyProofOfSignatoryDocument": {
917
- return {
918
- ...componentData,
919
- [key]: businessDetailsSchema[key]
920
- };
921
- }
922
- case "companyProofOfOwnershipDocument": {
923
- return {
924
- ...componentData,
925
- [key]: businessDetailsSchema[key]
926
- };
927
- }
928
- case "companyConstitutionalDocument": {
929
- return {
930
- ...componentData,
931
- [key]: businessDetailsSchema[key]
932
- };
933
- }
934
- case "companyFinancialInformation": {
935
- const financialReports = legalEntity.type === "organization" ? legalEntity?.organization?.financialReports : legalEntity?.soleProprietorship?.financialReports;
936
- return financialReports?.length ? {
937
- ...componentData,
938
- [key]: mapFinancialReportsToFinancialInformation(financialReports)
939
- } : componentData;
940
- }
941
- default:
942
- return componentData;
943
- }
944
- }, {});
945
- };
946
- const businessDetailsBase = {
947
- /* Base required fields */
948
- country: { rule: "REQUIRED" },
949
- entityType: { rule: "businessRequiresCompanyType" },
950
- legalCompanyName: { rule: "REQUIRED" },
951
- jaHaniLegalCompanyName: { rule: "japaneseLegalCompanyName" },
952
- jaKanaLegalCompanyName: { rule: "japaneseLegalCompanyName" },
953
- hasDoingBusinessAs: { rule: "REQUIRED" },
954
- doingBusinessAs: { rule: "requireDoingBusinessAsName" },
955
- registrationAddress: { rule: "REQUIRED" },
956
- operationalAddressIsSame: { rule: "REQUIRED" },
957
- /* Base optional fields */
958
- operationalAddress: { rule: "OPTIONAL" },
959
- /* Fields with custom country specific rules */
960
- hasSelectedBusiness: { rule: "requireBusinessSelection" },
961
- stockExchangeMIC: { rule: "ifPubliclyTradedCompany" },
962
- stockISIN: { rule: "ifPubliclyTradedCompany" },
963
- stockTickerSymbol: { rule: "ifPubliclyTradedCompany" },
964
- dateOfIncorporation: { rule: "isDateOfIncorporationRequired" },
965
- stateOrProvince: { rule: "countryUsingCompanySearch" },
966
- registrationNumber: { rule: "countryRequiresRegistrationNumber" },
967
- registrationNumberType: { rule: "registrationNumberType" },
968
- exemptedFromRegistrationNumber: { rule: "companyRegistrationNumberExemptionAllowed" },
969
- eInvoicingCode: { rule: "isEInvoicingCodeEnabled" },
970
- countryOfGoverningLaw: { rule: "countryOfGoverningLawRequired" },
971
- taxDocument: { rule: "ifCountryUsAndTinFailed" },
972
- /* Fields derived from capabilities */
973
- industryCodes: { rule: "isIndustryCodeRequired" }
974
- };
975
- const taxInformationBase = {
976
- vatNumber: { rule: "countryUsesVat" },
977
- vatNumberType: { rule: "vatNumberType" },
978
- exemptedFromVat: { rule: "isVatExempt" },
979
- vatAbsenceReason: { rule: "isVatExempt" },
980
- taxInformation: { rule: "countryUsesTaxId" },
981
- exemptedFromTax: { rule: "countryHasTaxExemptions" },
982
- isUen: { rule: "countryUsesUenOrGst" }
983
- };
984
- const financialInformationBase = {
985
- numberOfEmployees: { rule: "countryRequiresFinancialInformation" },
986
- financialReportingDate: { rule: "isFinancialReportingFieldsRequired" },
987
- currency: { rule: "isFinancialReportingFieldsRequired" },
988
- reportedValueOption: { rule: "isFinancialReportingFieldsRequired" },
989
- annualTurnover: { rule: "annualTurnoverRequired" },
990
- netAssets: { rule: "netAssetsRequired" },
991
- balanceSheetTotal: { rule: "balanceSheetTotalRequired" }
992
- };
993
- const businessDetailsFieldsPerScenario = {
994
- L0: {
995
- country: { rule: "REQUIRED" },
996
- legalCompanyName: { rule: "REQUIRED" },
997
- stateOrProvince: { rule: "countryUsingCompanySearch" },
998
- ...financialInformationBase
999
- },
1000
- L1: {
1001
- ...businessDetailsBase,
1002
- ...financialInformationBase
1003
- },
1004
- L: {
1005
- ...businessDetailsBase,
1006
- ...taxInformationBase,
1007
- ...financialInformationBase
1008
- },
1009
- L_PROOFOFADDRESS: {
1010
- // TODO this field does not exist
1011
- // proofOfAddressDocument: { rule: 'REQUIRED' },
1012
- },
1013
- L_REGDOC: {
1014
- registrationDocument: { rule: "REQUIRED" }
1015
- },
1016
- L_TAXDOC: {
1017
- taxDocument: { rule: "REQUIRED" }
1018
- },
1019
- L_BAFIN: {
1020
- legalForm: { rule: "REQUIRED" }
1021
- }
1022
- };
1023
- const adjustFormData = (oldFormData, newFormData) => {
1024
- const schema = Array.from((/* @__PURE__ */ new Set([...keysOf(oldFormData), ...keysOf(newFormData)])).keys());
1025
- return schema.reduce((acc, key) => {
1026
- const oldValue = oldFormData[key];
1027
- const newValue = newFormData[key];
1028
- if (!isUndefinedOrNull(newValue)) return { ...acc, [key]: newValue };
1029
- if (Array.isArray(oldValue)) return { ...acc, [key]: [] };
1030
- if (typeof oldValue === "number") return { ...acc, [key]: null };
1031
- if (typeof oldValue === "string") return { ...acc, [key]: "" };
1032
- return { ...acc, [key]: "" };
1033
- }, {});
1034
- };
1035
- const setRemovedFieldsOnSchemaToDeletedValue = (newData, existingData) => {
1036
- const formIds = Array.from((/* @__PURE__ */ new Set([...keysOf(existingData), ...keysOf(newData)])).keys());
1037
- return formIds.reduce((adjusted, formId) => {
1038
- const oldFormData = existingData[formId];
1039
- const newFormData = newData[formId];
1040
- if (isUndefinedOrNull(oldFormData)) return { ...adjusted, [formId]: newFormData };
1041
- if (isUndefinedOrNull(newFormData)) return adjusted;
1042
- return { ...adjusted, [formId]: adjustFormData(oldFormData, newFormData) };
1043
- }, {});
1044
- };
1045
- const formatFinancialInformationSummary = (data, language, country, dateOfIncorporation) => {
1046
- let summary;
1047
- if (!data) return void 0;
1048
- if (dateOfIncorporation && !isDateOlderThanAYear(dateOfIncorporation)) {
1049
- if (country === CountryCodes.UnitedKingdom) {
1050
- summary = { numberOfEmployees: `${data.numberOfEmployees}` };
1051
- return summary;
1052
- }
1053
- return void 0;
1054
- }
1055
- summary = {
1056
- currency: data.currency,
1057
- financialReportingDate: data.financialReportingDate
1058
- };
1059
- if (country === CountryCodes.UnitedKingdom) {
1060
- summary.numberOfEmployees = `${data.numberOfEmployees}`;
1061
- }
1062
- if (data.balanceSheetTotal) {
1063
- summary.balanceSheetTotal = summaryItem(
1064
- "balanceSheetTotal",
1065
- formatCurrency(data.balanceSheetTotal, data.currency, language)
1066
- );
1067
- }
1068
- if (data.annualTurnover) {
1069
- summary.annualTurnover = formatCurrency(data.annualTurnover, data.currency, language);
1070
- }
1071
- return summary;
1072
- };
1073
- const mapBusinessDetailsDocumentToApiDocument = async (data, entityId) => {
1074
- const {
1075
- companyRegistrationDocument,
1076
- companyTaxDocument,
1077
- companyProofOfDirectorDocument,
1078
- companyConstitutionalDocument,
1079
- companyProofOfSignatoryDocument,
1080
- companyProofOfOwnershipDocument,
1081
- basicInformation
1082
- } = data;
1083
- const taxDocumentType = COUNTRIES_THAT_USE_TAX_ID_INSTEAD_OF_VAT.includes(
1084
- basicInformation?.country
1085
- ) ? "proofOfOrganizationTaxInfo" : "vatDocument";
1086
- const documents = await Promise.all([
1087
- createDocumentRequest({
1088
- entityId,
1089
- entityType: "legalEntity",
1090
- documentType: "registrationDocument",
1091
- description: companyRegistrationDocument?.description,
1092
- page1: companyRegistrationDocument?.registrationDocument?.[0]
1093
- }),
1094
- createDocumentRequest({
1095
- entityId,
1096
- entityType: "legalEntity",
1097
- documentType: taxDocumentType,
1098
- description: companyTaxDocument?.description,
1099
- page1: companyTaxDocument?.taxDocument?.[0]
1100
- }),
1101
- createDocumentRequest({
1102
- entityId,
1103
- entityType: "legalEntity",
1104
- documentType: "proofOfDirector",
1105
- description: companyProofOfDirectorDocument?.description,
1106
- page1: companyProofOfDirectorDocument?.proofOfDirector?.[0]
1107
- }),
1108
- createDocumentRequest({
1109
- entityId,
1110
- entityType: "legalEntity",
1111
- documentType: "constitutionalDocument",
1112
- description: companyConstitutionalDocument?.description,
1113
- page1: companyConstitutionalDocument?.constitutionalDocument?.[0]
1114
- }),
1115
- createDocumentRequest({
1116
- entityId,
1117
- entityType: "legalEntity",
1118
- documentType: "proofOfSignatory",
1119
- description: companyProofOfSignatoryDocument?.description,
1120
- page1: companyProofOfSignatoryDocument?.proofOfSignatory?.[0]
1121
- }),
1122
- createDocumentRequest({
1123
- entityId,
1124
- entityType: "legalEntity",
1125
- documentType: "proofOfOwnership",
1126
- description: companyProofOfOwnershipDocument?.description,
1127
- page1: companyProofOfOwnershipDocument?.proofOfOwnership?.[0],
1128
- page2: companyProofOfOwnershipDocument?.proofOfOwnership?.[1]
1129
- })
1130
- ]);
1131
- return documents.filter(Boolean);
1132
- };
1133
- const mapBusinessDetailsSchemaToLegalEntity = (data, accountHolder, isExperimentEnabled) => {
1134
- const requestObj = {
1135
- ...formatObject(
1136
- data,
1137
- accountHolder === "mySoleProprietorName" ? solePropBusinessDetailsApiKeyMapping : businessDetailsApiKeyMapping
1138
- )
1139
- };
1140
- delete requestObj.organization?.legalFormDescription;
1141
- const canSaveRegNumberAbsentState = isExperimentEnabled("EnableRegistrationAndTaxAbsentStatesV4") && isRegistrationNumberAbsentStateV4Scenario(
1142
- data.basicInformation?.country,
1143
- data.companyStructure?.entityType
1144
- );
1145
- const taxData = COUNTRIES_USING_COMPANY_SEARCH.includes(
1146
- data.basicInformation?.country
1147
- ) ? data.basicInformation?.taxInformation : data.additionalInformation?.taxInformation;
1148
- const registrationNumber = COUNTRIES_USING_COMPANY_SEARCH.includes(
1149
- data.basicInformation?.country
1150
- ) ? data.basicInformation?.registrationNumber : data.additionalInformation?.registrationNumber;
1151
- const localization = [
1152
- mapSchemaFieldsToApiScriptLocalization(data.basicInformation ?? {}, "jaHani"),
1153
- mapSchemaFieldsToApiScriptLocalization(data.basicInformation ?? {}, "jaKana")
1154
- ].filter(({ fields }) => !isEmpty$1(fields)).map(({ script, fields }) => ({
1155
- script,
1156
- // mismatch between API `legalName` and schema `legalCompanyName`
1157
- fields: { legalName: fields.legalCompanyName }
1158
- }));
1159
- const doingBusinessAs = data.additionalInformation?.doingBusinessAs ?? "";
1160
- const entityObject = isEmpty$1(data.companyStructure) ? requestObj.soleProprietorship : requestObj.organization;
1161
- if (entityObject) {
1162
- if (taxData) {
1163
- entityObject.taxInformation = taxData;
1164
- }
1165
- if (!!requestObj.soleProprietorship && !requestObj.soleProprietorship?.countryOfGoverningLaw && !!data.basicInformation?.country) {
1166
- requestObj.soleProprietorship.countryOfGoverningLaw = data.basicInformation.country;
1167
- }
1168
- if (registrationNumber) {
1169
- entityObject.registrationNumber = registrationNumber;
1170
- if (canSaveRegNumberAbsentState && requestObj.organization) {
1171
- requestObj.organization.registrationNumberAbsent = false;
1172
- }
1173
- }
1174
- if (requestObj.organization && entityObject && localization.length > 0) {
1175
- entityObject.localization = localization;
1176
- }
1177
- if (data.additionalInformation?.exemptedFromRegistrationNumber && canSaveRegNumberAbsentState && requestObj.organization) {
1178
- requestObj.organization.registrationNumberAbsent = data.additionalInformation?.exemptedFromRegistrationNumber;
1179
- }
1180
- if (data.additionalInformation?.vatAbsenceReason) {
1181
- entityObject.vatNumber = "";
1182
- }
1183
- if (isExperimentEnabled("EnableDoingBusinessAsNameV4")) {
1184
- if (typeof data.additionalInformation?.hasDoingBusinessAs !== "undefined") {
1185
- entityObject.doingBusinessAsAbsent = !data.additionalInformation?.hasDoingBusinessAs;
1186
- }
1187
- } else {
1188
- entityObject.doingBusinessAs = doingBusinessAs || data.basicInformation?.legalCompanyName;
1189
- delete entityObject.doingBusinessAsAbsent;
1190
- }
1191
- if (data.additionalInformation?.operationalAddressIsSame === operationalAddressIsSameIds.OPERATIONAL_ADDRESS_IS_SAME && entityObject.principalPlaceOfBusiness) {
1192
- entityObject.principalPlaceOfBusiness = entityObject.registeredAddress;
1193
- }
1194
- if (entityObject.registeredAddress) {
1195
- const addressLocalizations = mapJpAddressSchemaToAddressLocalizations(
1196
- data.additionalInformation?.registrationAddress
1197
- );
1198
- if (addressLocalizations.length > 0)
1199
- entityObject.registeredAddress.localization = addressLocalizations;
1200
- }
1201
- if (!isEmpty$1(data.companyFinancialInformation)) {
1202
- const isIncorporationDateDependencyEnabled = isExperimentEnabled(
1203
- "EnableIncorporationDateBasedFinancialValidationForHO"
1204
- );
1205
- entityObject.financialReports = [
1206
- mapFinancialInformationToFinancialReport(
1207
- data.companyFinancialInformation,
1208
- isIncorporationDateDependencyEnabled ? data?.additionalInformation?.dateOfIncorporation : void 0
1209
- )
1210
- ];
1211
- }
1212
- }
1213
- requestObj.type = requestObj.organization ? LegalEntityTypes.ORGANIZATION : LegalEntityTypes.SOLE_PROPRIETORSHIP;
1214
- if (entityObject?.registeredAddress.country === "US") {
1215
- delete entityObject.registrationNumber;
1216
- }
1217
- if (!canSaveRegNumberAbsentState) {
1218
- delete requestObj.organization?.registrationNumberAbsent;
1219
- }
1220
- return requestObj;
1221
- };
1222
- function buildRequiredForms({
1223
- config: {
1224
- forms,
1225
- requiredFields,
1226
- optionalFields,
1227
- isValid,
1228
- problems,
1229
- isSettingEnabled,
1230
- accountHolder,
1231
- legalEntityResponse
1232
- },
1233
- options
1234
- }) {
1235
- const skipCompanyStructure = !!verifiedBusiness.value?.legalForm || isSettingEnabled(SettingNames.AllowLegalEntityTypeChange) && organizationTypesToSkipCompanyStructureForm.includes(
1236
- legalEntityResponse?.organization?.type ?? ""
1237
- ) && accountHolder !== "aTrust" && accountHolder !== "anUnincorporatedPartnership";
1238
- const filteredForms = Object.values(forms).filter(({ formId }) => {
1239
- if (formId === "businessSelection") {
1240
- if (options?.hasNoSearchResults || isVerifiedSingleCompanySearchResult.value) return false;
1241
- }
1242
- if (formId === "companyStructure") {
1243
- if (skipCompanyStructure) return false;
1244
- }
1245
- if (requiredFields || optionalFields) {
1246
- return Boolean(requiredFields?.[formId]) || Boolean(optionalFields?.[formId]);
1247
- }
1248
- return true;
1249
- });
1250
- const requiredForms = options?.skipSummary ? filteredForms : [...filteredForms, summaryStep];
1251
- return addValidityToForms(requiredForms, isValid, problems);
1252
- }
1253
- const isDocumentsRequired = (forms) => forms.some((form) => documentFormsIds.includes(form.formId));
1254
- const formatBasicInformation = (data, datasetUtils, companyType, isCountryOfGoverningLawEnabled) => {
1255
- const country = data?.country;
1256
- const registrationNumberLabel = resolveFieldMetadata(
1257
- registrationNumberDefaultFieldConfig[country],
1258
- {
1259
- companyType,
1260
- registrationNumberType: data.registrationNumber ? inferCompanyRegistrationNumberType(data?.registrationNumber, country, companyType) : getCompanyRegistrationNumberOptions(country, companyType)?.[0]?.id
1261
- },
1262
- registrationNumberDefaultFieldMetadata
1263
- ).label;
1264
- const taxIdLabel = resolveFieldMetadata(
1265
- taxInformationDefaultFieldConfig[country],
1266
- {
1267
- taxIdNumberType: countryToTaxInfoTypeMap[country] ?? void 0,
1268
- // TODO use type selector
1269
- companyType: void 0
1270
- },
1271
- taxInformationDefaultFieldMetadata
1272
- ).label;
1273
- const countryOfGoverningLaw = getCountryOfGoverningLaw(isCountryOfGoverningLawEnabled, data);
1274
- return {
1275
- ["legalCompanyName"]: data.legalCompanyName,
1276
- country: datasetUtils.getCountryName(data.country),
1277
- [getKeyForField("stateOrProvince", data.country)]: datasetUtils.getStateName(
1278
- data.stateOrProvince,
1279
- data.country
1280
- ),
1281
- [taxIdLabel]: data.taxInformation?.find((taxId) => data.country === taxId.country)?.number,
1282
- [registrationNumberLabel]: data.registrationNumber,
1283
- countryOfGoverningLaw: datasetUtils.getCountryName(countryOfGoverningLaw)
1284
- };
1285
- };
1286
- const formatAdditionalInformation = (data, country, companyType, t) => {
1287
- const registrationNumberLabel = resolveFieldMetadata(
1288
- registrationNumberDefaultFieldConfig[country],
1289
- {
1290
- companyType,
1291
- registrationNumberType: data.registrationNumber ? inferCompanyRegistrationNumberType(data?.registrationNumber, country, companyType) : getCompanyRegistrationNumberOptions(country, companyType)?.[0]?.id
1292
- },
1293
- registrationNumberDefaultFieldMetadata
1294
- ).label;
1295
- const taxIdLabel = resolveFieldMetadata(
1296
- taxInformationDefaultFieldConfig[country],
1297
- {
1298
- taxIdNumberType: countryToTaxInfoTypeMap[country] ?? void 0,
1299
- // TODO use type selector
1300
- companyType: void 0
1301
- },
1302
- taxInformationDefaultFieldMetadata
1303
- ).label;
1304
- return {
1305
- ["businessStructure"]: data.legalFormLabel,
1306
- ["doingBusinessAs"]: data.doingBusinessAs,
1307
- ["industry"]: data.industryCodes?.[0].name,
1308
- [registrationNumberLabel]: data.registrationNumber,
1309
- [taxIdLabel]: data.isUen ? void 0 : data.taxInformation?.find((taxId) => country === taxId.country)?.number,
1310
- ["vatNumber"]: data.vatNumber,
1311
- ["vatAbsenceReason"]: data.vatAbsenceReason ? t(($) => $[data.vatAbsenceReason], { ns: "common" }) : void 0,
1312
- ["dateOfIncorporation"]: data.dateOfIncorporation,
1313
- ["stockExchangeMIC"]: data.stockExchangeMIC,
1314
- ["stockISIN"]: data.stockISIN,
1315
- ["stockTickerSymbol"]: data.stockTickerSymbol,
1316
- ["eInvoicingCode"]: data.eInvoicingCode
1317
- };
1318
- };
1319
- const formatDataForSummary = (data, forms, t, language, isExperimentEnabled, version) => {
1320
- const datasetUtils = datasetUtilities(language);
1321
- return entriesOf(data).reduce((summaryData, [form]) => {
1322
- if (!form || !data[form]) return summaryData;
1323
- const isCountryOfGoverningLawEnabled = isExperimentEnabled(
1324
- "EnableCountryOfGoverningLawForUKCompanies"
1325
- );
1326
- switch (form) {
1327
- case "basicInformation":
1328
- return {
1329
- ...summaryData,
1330
- [form]: formatBasicInformation(
1331
- data[form],
1332
- datasetUtils,
1333
- data.companyStructure?.entityType,
1334
- isCountryOfGoverningLawEnabled
1335
- )
1336
- };
1337
- case "companyStructure":
1338
- return {
1339
- ...summaryData,
1340
- [form]: {
1341
- entityType: t(
1342
- ($) => $[companyTypeMetadata[data["companyStructure"]?.entityType]?.name],
1343
- {
1344
- ns: "business"
1345
- }
1346
- )
1347
- }
1348
- };
1349
- case "additionalInformation":
1350
- return {
1351
- ...summaryData,
1352
- [form]: {
1353
- hasInnerForms: true,
1354
- additionalInformationFormName: formatAdditionalInformation(
1355
- data[form],
1356
- data.basicInformation?.country,
1357
- data.companyStructure?.entityType,
1358
- t
1359
- ),
1360
- registrationAddress: data.basicInformation?.country === CountryCodes.Japan && version === 4 ? mapJpAddressSummary(data[form].registrationAddress, datasetUtils) : mapAddressLabels(data[form].registrationAddress, datasetUtils),
1361
- operationalAddress: data[form].operationalAddressIsSame === operationalAddressIsSameIds.OPERATIONAL_ADDRESS_IS_NOT_SAME ? data.basicInformation?.country === CountryCodes.Japan && version === 4 ? mapJpAddressSummary(data[form].operationalAddress, datasetUtils) : mapAddressLabels(data[form].operationalAddress, datasetUtils) : void 0
1362
- }
1363
- };
1364
- case "companyRegistrationDocument":
1365
- if (!isDocumentsRequired(forms)) return summaryData;
1366
- return {
1367
- ...summaryData,
1368
- [form]: {
1369
- companyRegistrationDocument: {
1370
- fileName: data[form].registrationDocument?.[0]?.name,
1371
- description: data[form]?.description
1372
- }
1373
- }
1374
- };
1375
- case "companyTaxDocument":
1376
- if (!isDocumentsRequired(forms)) return summaryData;
1377
- return {
1378
- ...summaryData,
1379
- [form]: {
1380
- companyTaxDocument: {
1381
- fileName: data[form].taxDocument?.[0]?.name,
1382
- description: data[form]?.description
1383
- }
1384
- }
1385
- };
1386
- case "companyProofOfDirectorDocument":
1387
- if (!isDocumentsRequired(forms)) return summaryData;
1388
- return {
1389
- ...summaryData,
1390
- [form]: {
1391
- companyProofOfDirectorDocument: {
1392
- fileName: data[form].proofOfDirector?.[0]?.name,
1393
- description: data[form]?.description
1394
- }
1395
- }
1396
- };
1397
- case "companyProofOfSignatoryDocument":
1398
- if (!isDocumentsRequired(forms)) return summaryData;
1399
- return {
1400
- ...summaryData,
1401
- [form]: {
1402
- companyProofOfSignatoryDocument: {
1403
- fileName: data[form].proofOfSignatory?.[0]?.name,
1404
- description: data[form]?.description
1405
- }
1406
- }
1407
- };
1408
- case "companyProofOfOwnershipDocument":
1409
- if (!isDocumentsRequired(forms)) return summaryData;
1410
- return {
1411
- ...summaryData,
1412
- [form]: {
1413
- companyProofOfOwnershipDocument: {
1414
- fileName: data[form].proofOfOwnership?.map((doc) => doc.name).join("\n"),
1415
- description: data[form]?.description
1416
- }
1417
- }
1418
- };
1419
- case "companyFinancialInformation": {
1420
- const isIncorporationDateDependencyEnabled = isExperimentEnabled(
1421
- "EnableIncorporationDateBasedFinancialValidationForHO"
1422
- );
1423
- return {
1424
- ...summaryData,
1425
- [form]: formatFinancialInformationSummary(
1426
- data[form],
1427
- language,
1428
- data?.basicInformation?.country,
1429
- isIncorporationDateDependencyEnabled ? data?.additionalInformation?.dateOfIncorporation : void 0
1430
- )
1431
- };
1432
- }
1433
- default:
1434
- return summaryData;
1435
- }
1436
- }, {});
1437
- };
1438
- async function submitDocuments({
1439
- data,
1440
- legalEntity,
1441
- forms,
1442
- documentUtils,
1443
- userEvents
1444
- }) {
1445
- if (!isDocumentsRequired(forms)) return;
1446
- const logger = createLogger();
1447
- const formattedDocument = await mapBusinessDetailsDocumentToApiDocument(data, legalEntity.id);
1448
- formattedDocument.forEach((doc) => {
1449
- const existingDoc = getDocument(legalEntity.id, doc.type);
1450
- if (doc.type === "proofOfOwnership" && existingDoc && doc.attachments?.length) {
1451
- doc.attachments = mergeProofOfOwnershipAttachments(
1452
- existingDoc.attachments ?? [],
1453
- doc.attachments
1454
- ).filter((attachment) => attachment.pageName);
1455
- }
1456
- });
1457
- try {
1458
- if (formattedDocument) {
1459
- await documentUtils.uploadDocuments(formattedDocument, legalEntity.id);
1460
- formattedDocument.forEach((doc) => {
1461
- userEvents?.addTaskEvent("Success", {
1462
- actionType: "upload",
1463
- documentType: doc.type,
1464
- fileExtention: doc.attachments?.map((item) => getFileExtention(item.pageName)).filter((item) => item !== void 0) ?? []
1465
- });
1466
- });
1467
- }
1468
- } catch (err) {
1469
- logger.error(err);
1470
- userEvents.addTaskEvent("Encountered error", {
1471
- actionType: "upload",
1472
- returnType: err.errorCode,
1473
- returnValue: err.title ?? err.message
1474
- });
1475
- }
1476
- }
1477
- async function submit({
1478
- data,
1479
- legalEntityResponse,
1480
- associatedLegalArrangement,
1481
- nestedLegalEntity,
1482
- nestedLegalEntityDetails,
1483
- problems,
1484
- taskType,
1485
- accountHolder,
1486
- forms,
1487
- documentUtils,
1488
- t,
1489
- showToast,
1490
- setLoadingStatus,
1491
- setProblems,
1492
- handleUpdateLegalEntity,
1493
- createLegalEntity,
1494
- onExternalSubmit,
1495
- isExperimentEnabled,
1496
- userEvents,
1497
- efpBusinessLines,
1498
- createBusinessLine,
1499
- updateBusinessLine
1500
- }) {
1501
- const logger = createLogger();
1502
- setLoadingStatus("loading");
1503
- let trackingPayload = {
1504
- actionType: "submit",
1505
- companyStructure: data.companyStructure?.entityType,
1506
- countryOfRegistration: data.basicInformation?.country,
1507
- legalEntityName: accountHolder === "theCompanyIWorkFor" ? data.basicInformation?.legalCompanyName : void 0,
1508
- // Only send legalCompanyName for organizations
1509
- usedAdditionalAddress: data.additionalInformation?.operationalAddressIsSame === operationalAddressIsSameIds.OPERATIONAL_ADDRESS_IS_NOT_SAME
1510
- };
1511
- const entityToUpdate = (() => {
1512
- switch (taskType) {
1513
- case TaskTypes.SOLE_PROPRIETOR_COMPANY:
1514
- return associatedLegalArrangement;
1515
- case TaskTypes.TRUST_MEMBER_COMPANY:
1516
- case TaskTypes.UNINCORPORATED_PARTNERSHIP_MEMBER_COMPANY:
1517
- return nestedLegalEntity;
1518
- case TaskTypes.BUSINESS_DETAILS:
1519
- default:
1520
- return legalEntityResponse;
1521
- }
1522
- })();
1523
- const handleSubmitLegalEntity = async (legalEntity) => {
1524
- if (taskType === TaskTypes.TRUST_MEMBER_COMPANY && !nestedLegalEntity?.id || taskType === TaskTypes.UNINCORPORATED_PARTNERSHIP_MEMBER_COMPANY && !nestedLegalEntity?.id || taskType === TaskTypes.SOLE_PROPRIETOR_COMPANY && !associatedLegalArrangement?.id) {
1525
- return await createLegalEntity(legalEntity);
1526
- } else {
1527
- return handleUpdateLegalEntity({
1528
- ...drop("type").from(legalEntity),
1529
- id: entityToUpdate?.id ?? legalEntityResponse.id
1530
- });
1531
- }
1532
- };
1533
- const associateLegalEntityWithParent = async ({
1534
- legalEntity,
1535
- associatedLegalArrangement: associatedLegalArrangement2,
1536
- nestedLegalEntityDetails: nestedLegalEntityDetails2
1537
- }) => {
1538
- if (nestedLegalEntityDetails2 && associatedLegalArrangement2) {
1539
- const existingEntityAssociations = getOwnEntityAssociations(associatedLegalArrangement2);
1540
- const existingRoles = existingEntityAssociations.filter((ea) => ea.legalEntityId === associatedLegalArrangement2.id).map(({ type }) => type);
1541
- const newRoles = nestedLegalEntityDetails2?.roles ?? [];
1542
- const rolesChanged = !doArraysMatch(existingRoles, newRoles);
1543
- if (rolesChanged) {
1544
- const updatedAssociations = {
1545
- entityAssociations: [
1546
- ...newRoles.map((role) => ({
1547
- type: role,
1548
- legalEntityId: legalEntity.id
1549
- })) || [],
1550
- ...existingEntityAssociations.filter((ea) => ea.legalEntityId !== legalEntity.id) || []
1551
- ]
1552
- };
1553
- await handleUpdateLegalEntity({
1554
- ...updatedAssociations,
1555
- id: associatedLegalArrangement2.id
1556
- });
1557
- }
1558
- return;
1559
- } else {
1560
- const updatedAssociations = {
1561
- entityAssociations: [
1562
- {
1563
- type: LegalEntityTypes.SOLE_PROPRIETORSHIP,
1564
- legalEntityId: legalEntity.id
1565
- }
1566
- ]
1567
- };
1568
- await handleUpdateLegalEntity({ ...updatedAssociations, id: legalEntityResponse.id });
1569
- }
1570
- };
1571
- const savedLegalEntityData = legalEntityResponse ? mapLegalEntityToBusinessDetailsSchema(legalEntityResponse, void 0) : null;
1572
- const filteredData = savedLegalEntityData ? setRemovedFieldsOnSchemaToDeletedValue(data, savedLegalEntityData) : data;
1573
- if (filteredData?.additionalInformation && !filteredData?.additionalInformation?.taxInformation) {
1574
- filteredData.additionalInformation.taxInformation = void 0;
1575
- }
1576
- const isCountryOfGoverningLawEnabled = isExperimentEnabled(
1577
- "EnableCountryOfGoverningLawForUKCompanies"
1578
- );
1579
- const countryOfGoverningLaw = getCountryOfGoverningLaw(
1580
- isCountryOfGoverningLawEnabled,
1581
- filteredData?.basicInformation
1582
- );
1583
- if (filteredData?.basicInformation) {
1584
- if (countryOfGoverningLaw) {
1585
- filteredData.basicInformation.countryOfGoverningLaw = countryOfGoverningLaw;
1586
- } else {
1587
- delete filteredData.basicInformation.countryOfGoverningLaw;
1588
- }
1589
- }
1590
- const primaryIndustryCode = data.additionalInformation?.industryCodes && data.additionalInformation.industryCodes[0].id;
1591
- if (createBusinessLine && updateBusinessLine && primaryIndustryCode) {
1592
- const bankingBusinessLines = [];
1593
- const issuingBusinessLines = [];
1594
- if (efpBusinessLines) {
1595
- for (const bl of efpBusinessLines) {
1596
- if (bl.service === "banking") bankingBusinessLines.push(bl);
1597
- else issuingBusinessLines.push(bl);
1598
- }
1599
- }
1600
- const promises = [];
1601
- const operations = [];
1602
- const updateOrCreateBusinessLinesIfNeeded = (businessLines, requestedCapability, service) => {
1603
- if (businessLines.length) {
1604
- for (const bl of businessLines) {
1605
- if (bl.industryCode === primaryIndustryCode) continue;
1606
- const payload = {
1607
- id: bl.id,
1608
- legalEntityId: legalEntityResponse.id,
1609
- industryCode: primaryIndustryCode,
1610
- service
1611
- };
1612
- promises.push(updateBusinessLine(payload));
1613
- operations.push(payload);
1614
- }
1615
- } else if (requestedCapability) {
1616
- const payload = {
1617
- legalEntityId: legalEntityResponse.id,
1618
- industryCode: primaryIndustryCode,
1619
- service
1620
- };
1621
- promises.push(createBusinessLine(payload));
1622
- operations.push(payload);
1623
- }
1624
- };
1625
- updateOrCreateBusinessLinesIfNeeded(
1626
- bankingBusinessLines,
1627
- requestingBanking(legalEntityResponse),
1628
- "banking"
1629
- );
1630
- updateOrCreateBusinessLinesIfNeeded(
1631
- issuingBusinessLines,
1632
- requestingIssuing(legalEntityResponse),
1633
- "issuing"
1634
- );
1635
- let hadRejection = false;
1636
- (await Promise.allSettled(promises)).forEach((result, idx) => {
1637
- if (result.status !== "rejected") return;
1638
- const op = operations[idx];
1639
- logger.log(
1640
- `Failed to ${op.id ? "update" : "create"} business line with payload: ${JSON.stringify(op)}`
1641
- );
1642
- hadRejection = true;
1643
- });
1644
- const eventPayload = {
1645
- actionType: trackingPayload.actionType,
1646
- legalEntityName: trackingPayload.legalEntityName
1647
- };
1648
- if (!hadRejection) {
1649
- userEvents?.addTaskEvent("Success", eventPayload);
1650
- } else {
1651
- userEvents?.addTaskEvent("Encountered error", {
1652
- ...eventPayload,
1653
- returnType: "businessLines",
1654
- returnValue: "couldNotCreateOrUpdateBusinessLine"
1655
- });
1656
- showToast({
1657
- label: t(($) => $["failedToUpdateEfpBusinessLines"], { ns: "business" }),
1658
- variant: "error"
1659
- });
1660
- return setLoadingStatus("success");
1661
- }
1662
- }
1663
- try {
1664
- const mappedLegalEntity = {
1665
- ...mapBusinessDetailsSchemaToLegalEntity(filteredData, accountHolder, isExperimentEnabled),
1666
- entityAssociations: filterOutUnwantedAssociationsIfRootLE(
1667
- taskType,
1668
- entityToUpdate,
1669
- accountHolder
1670
- )
1671
- };
1672
- if (mappedLegalEntity.type === LegalEntityTypes.ORGANIZATION && legalEntityResponse.organization?.countryOfGoverningLaw !== mappedLegalEntity.organization?.countryOfGoverningLaw && legalEntityResponse.organization?.support) {
1673
- mappedLegalEntity.organization.support = determineCustomerSupport(
1674
- legalEntityResponse.organization.support,
1675
- mappedLegalEntity.organization?.countryOfGoverningLaw
1676
- );
1677
- }
1678
- const legalEntity = await handleSubmitLegalEntity(mappedLegalEntity);
1679
- if (taskType === TaskTypes.TRUST_MEMBER_COMPANY || taskType === TaskTypes.UNINCORPORATED_PARTNERSHIP_MEMBER_COMPANY || taskType === TaskTypes.SOLE_PROPRIETOR_COMPANY && !associatedLegalArrangement?.id) {
1680
- await associateLegalEntityWithParent({
1681
- legalEntity,
1682
- associatedLegalArrangement,
1683
- nestedLegalEntityDetails
1684
- });
1685
- }
1686
- await submitDocuments({
1687
- data,
1688
- legalEntity,
1689
- documentUtils,
1690
- forms,
1691
- userEvents
1692
- });
1693
- userEvents?.addTaskEvent("Success", trackingPayload);
1694
- showToast({
1695
- label: t(($) => $["successfullyUpdatedDetails"], { ns: "common" }),
1696
- variant: "success"
1697
- });
1698
- onExternalSubmit?.(data);
1699
- } catch (err) {
1700
- if (isValidationError(err)) {
1701
- const getErrors = processValidationErrors(err, TaskTypes.BUSINESS_DETAILS);
1702
- if (getErrors && !Object.keys(getErrors).length) {
1703
- showToast({
1704
- label: t(($) => $["failedToUpdateDetails"], { ns: "common" }),
1705
- variant: "error"
1706
- });
1707
- const unmappedErrorNames = err.invalidFields?.map((field) => field.name).filter(Boolean) ?? [];
1708
- if (unmappedErrorNames.length) {
1709
- trackingPayload = {
1710
- ...trackingPayload,
1711
- additionalData: { unmappedErrorNames }
1712
- };
1713
- }
1714
- } else {
1715
- setProblems({
1716
- ...problems,
1717
- validationErrors: getErrors
1718
- });
1719
- }
1720
- }
1721
- if (isMaintenanceModeError(err)) {
1722
- showToast({
1723
- label: t(($) => $["maintenanceModeMessage"], { ns: "common" }),
1724
- variant: "error",
1725
- duration: "indefinite"
1726
- });
1727
- }
1728
- if (!isValidationError(err) && !isMaintenanceModeError(err)) {
1729
- showToast({
1730
- label: t(($) => $["failedToUpdateDetails"], { ns: "common" }),
1731
- variant: "error"
1732
- });
1733
- }
1734
- logger.error(err);
1735
- userEvents?.addTaskEvent("Encountered error", {
1736
- ...trackingPayload,
1737
- returnType: err?.errorCode,
1738
- returnValue: err?.title || "backend"
1739
- });
1740
- } finally {
1741
- setLoadingStatus("success");
1742
- }
1743
- }
1744
- const getCountryOfGoverningLaw = (isCountryOfGoverningLawEnabled, basicData) => {
1745
- if (!isCountryOfGoverningLawEnabled || basicData?.country !== CountryCodes.UnitedKingdom) {
1746
- return void 0;
1747
- }
1748
- if (isCountryOfGoverningLawEnabled && basicData?.country === CountryCodes.UnitedKingdom && !basicData?.countryOfGoverningLaw) {
1749
- return CountryCodes.UnitedKingdom;
1750
- }
1751
- return basicData?.countryOfGoverningLaw;
1752
- };
1753
- const determineCustomerSupport = (customerSupport, country) => {
1754
- switch (country) {
1755
- case CountryCodes.Japan:
1756
- return unsetCustomerSupportNumber(customerSupport);
1757
- default:
1758
- return customerSupport;
1759
- }
1760
- };
1761
- const unsetCustomerSupportNumber = (customerSupport) => {
1762
- return customerSupport ? {
1763
- email: customerSupport.email,
1764
- phone: { number: "", type: "mobile" }
1765
- } : void 0;
1766
- };
1767
- const CountryFieldValidation = () => ({
1768
- country: {
1769
- modes: ["blur"],
1770
- validate: (country) => !isEmpty(country),
1771
- errorMessage: "fieldIsRequired"
1772
- }
1773
- });
1774
- const CountryOfGoverningLawFieldValidation = () => ({
1775
- countryOfGoverningLaw: {
1776
- modes: ["blur"],
1777
- validate: (countryOfGoverningLaw) => !isEmpty(countryOfGoverningLaw),
1778
- errorMessage: "fieldIsRequired"
1779
- }
1780
- });
1781
- function basicInformationValidators({
1782
- country,
1783
- taxIdNumberType,
1784
- companyType,
1785
- registrationNumberType,
1786
- state,
1787
- isExperimentEnabled
1788
- }) {
1789
- return {
1790
- country: CountryFieldValidation().country,
1791
- countryOfGoverningLaw: CountryOfGoverningLawFieldValidation().countryOfGoverningLaw,
1792
- legalCompanyName: resolveFieldMetadata(
1793
- isExperimentEnabled("StrictNameAndAddressValidationV4") ? defaultFieldConfigV4[country] : defaultFieldConfig$2[country],
1794
- { isBusiness: true },
1795
- isExperimentEnabled("StrictNameAndAddressValidationV4") ? defaultFieldMetadataV4 : defaultFieldMetadata$2
1796
- )?.validators,
1797
- taxInformation: resolveFieldMetadata(
1798
- taxInformationDefaultFieldConfig[country],
1799
- {
1800
- taxIdNumberType,
1801
- companyType
1802
- },
1803
- taxInformationDefaultFieldMetadata
1804
- )?.validators,
1805
- stateOrProvince: resolveFieldMetadata(
1806
- defaultFieldConfig$1[country],
1807
- { isBusiness: true },
1808
- defaultFieldMetadata$1
1809
- )?.validators,
1810
- registrationNumber: resolveFieldMetadata(
1811
- registrationNumberDefaultFieldConfig[country],
1812
- {
1813
- companyType,
1814
- registrationNumberType,
1815
- state,
1816
- isExperimentEnabled
1817
- },
1818
- registrationNumberDefaultFieldMetadata
1819
- )?.validators
1820
- };
1821
- }
1822
- function businessSelectionValidators() {
1823
- return {
1824
- hasSelectedBusiness: {
1825
- modes: ["blur", "input"],
1826
- validate: (value) => typeof value === "boolean",
1827
- // indicates a selection was made
1828
- errorMessage: "fieldIsRequired"
1829
- }
1830
- };
1831
- }
1832
- function additionalInformationValidators({
1833
- country,
1834
- taxIdNumberType,
1835
- companyType,
1836
- registrationNumberType,
1837
- vatNumberType,
1838
- isExperimentEnabled
1839
- }) {
1840
- return {
1841
- hasDoingBusinessAs: doingBusinessAsAbsentFieldMetadata.validators,
1842
- doingBusinessAs: doingBusinessAsFieldMetadata.validators,
1843
- registrationNumber: resolveFieldMetadata(
1844
- registrationNumberDefaultFieldConfig[country],
1845
- {
1846
- companyType,
1847
- registrationNumberType,
1848
- isExperimentEnabled
1849
- },
1850
- registrationNumberDefaultFieldMetadata
1851
- )?.validators,
1852
- exemptedFromRegistrationNumber: exemptFromRegistrationNumberDefaultFieldMetadata.validators,
1853
- taxInformation: resolveFieldMetadata(
1854
- taxInformationDefaultFieldConfig[country],
1855
- {
1856
- taxIdNumberType,
1857
- companyType
1858
- },
1859
- taxInformationDefaultFieldMetadata
1860
- ).validators,
1861
- vatNumber: resolveFieldMetadata(
1862
- defaultFieldConfig[country],
1863
- { vatNumberType },
1864
- defaultFieldMetadata
1865
- ).validators,
1866
- vatAbsenceReason: vatAbsenceReasonMetadata.validators,
1867
- eInvoicingCode: eInvoicingCodeFieldMetadata.validators,
1868
- industryCodes: industryCodeFieldMetadata.validators,
1869
- dateOfIncorporation: dateOfIncorporationFieldMetadata.validators,
1870
- stockExchangeMIC: stockExchangeMICFieldMetadata.validators,
1871
- stockISIN: stockISINFieldMetadata.validators,
1872
- stockTickerSymbol: stockTickerSymbolFieldMetadata.validators
1873
- };
1874
- }
1875
- function BusinessDetailsDropin({
1876
- taskType,
1877
- country: propCountry,
1878
- problems: propProblems,
1879
- legalEntityResponse,
1880
- efpBusinessLines,
1881
- documents,
1882
- associatedLegalArrangement,
1883
- // initially undefined when creating entity
1884
- nestedLegalEntity,
1885
- // initially undefined when creating entity
1886
- nestedLegalEntityDetails,
1887
- // has entity roles for association logic
1888
- onSubmit: onExternalSubmit,
1889
- handleHomeClick,
1890
- asModal = false
1891
- }) {
1892
- const { t, i18n } = useTranslation(["common", "business"]);
1893
- const { baseUrl, rootLegalEntityId } = useApiContext();
1894
- const userEvents = useAnalyticsContext();
1895
- const { showToast } = useToastContext();
1896
- const queryClient = useQueryClient();
1897
- const { isExperimentEnabled } = useExperimentsContext();
1898
- const { data: versionData } = useVersionConfiguration();
1899
- const { isSettingEnabled } = useSettingsContext();
1900
- const { accountHolder, setAccountHolder } = useAccountHolder();
1901
- const { mutateAsync: createLegalEntity } = useCreateLegalEntity();
1902
- const { mutateAsync: updateLegalEntity } = useUpdateLegalEntity();
1903
- const logger = createLogger();
1904
- const isSoleProp = accountHolder === "mySoleProprietorName";
1905
- const isAssociationTaskType = taskType !== TaskTypes.BUSINESS_DETAILS;
1906
- const legalEntityType = !isSoleProp ? LegalEntityTypes.ORGANIZATION : LegalEntityTypes.SOLE_PROPRIETORSHIP;
1907
- const subjectEntity = !isAssociationTaskType ? legalEntityResponse : isSoleProp ? associatedLegalArrangement : nestedLegalEntity;
1908
- const [country, setCountry] = useState(propCountry);
1909
- const [problems, setProblems] = useState(propProblems ?? {});
1910
- const [loadingStatus, setLoadingStatus] = useState("success");
1911
- const [derivedProps, setDerivedProps] = useState();
1912
- const [trustedFields, setTrustedFields] = useState(subjectEntity?.trustedFields ?? void 0);
1913
- const defaultForms = useMemo(() => getForms(country), [country]);
1914
- const documentUtils = documentApiUtils({
1915
- baseUrl: baseUrl.value,
1916
- rootLegalEntityId: rootLegalEntityId.value
1917
- });
1918
- useEffect(() => {
1919
- userEvents.updateBaseTrackingPayload({ task: taskType });
1920
- userEvents.addTaskEvent("Landed on page", {
1921
- actionType: "start"
1922
- });
1923
- }, []);
1924
- const parseConfiguration = useCallback(
1925
- ({ scenarios }) => composePerScenarioFormConfigurations(scenarios, businessDetailsFieldsPerScenario),
1926
- []
1927
- );
1928
- const { fieldConfigurations } = useScenarioConfiguration({
1929
- legalEntityType,
1930
- parseConfiguration,
1931
- setLoadingStatus,
1932
- country
1933
- });
1934
- const defaultData = useMemo(() => {
1935
- const mapped = mapLegalEntityToBusinessDetailsSchema(
1936
- !isAssociationTaskType ? legalEntityResponse : isSoleProp ? associatedLegalArrangement ?? legalEntityResponse : nestedLegalEntity,
1937
- isSoleProp ? legalEntityResponse : void 0
1938
- );
1939
- const initialEfpBusinessLineData = isSettingEnabled("allowBusinessLines") && efpBusinessLines && efpBusinessLines.length > 0 ? {
1940
- additionalInformation: {
1941
- ...mapped.additionalInformation,
1942
- industryCodes: [
1943
- {
1944
- id: efpBusinessLines[0].industryCode,
1945
- name: `${efpBusinessLines[0].industryCode} - ${efpBusinessLines[0].industryCodeDescription}`
1946
- }
1947
- ]
1948
- }
1949
- } : {};
1950
- return {
1951
- ...mapped,
1952
- ...documents,
1953
- ...initialEfpBusinessLineData
1954
- };
1955
- }, [
1956
- isAssociationTaskType,
1957
- legalEntityResponse,
1958
- isSoleProp,
1959
- associatedLegalArrangement,
1960
- nestedLegalEntity,
1961
- documents,
1962
- efpBusinessLines,
1963
- isSettingEnabled
1964
- ]);
1965
- const buildFieldValidations = useCallback(
1966
- (data) => {
1967
- const taxInfo = data?.basicInformation?.taxInformation ?? data?.additionalInformation?.taxInformation;
1968
- const taxIdType = taxInfo?.length ? taxInfo.find((taxId) => taxId.country === country)?.type : void 0;
1969
- const regNumberType = data?.basicInformation?.registrationNumberType ?? data?.additionalInformation?.registrationNumberType;
1970
- const companyType = taskType === TaskTypes.SOLE_PROPRIETOR_COMPANY ? CompanyTypesValues.SOLE_PROPRIETORSHIP : data?.companyStructure?.entityType;
1971
- return {
1972
- basicInformation: basicInformationValidators({
1973
- country,
1974
- state: data?.basicInformation?.stateOrProvince,
1975
- companyType,
1976
- taxIdNumberType: taxIdType,
1977
- registrationNumberType: regNumberType,
1978
- isExperimentEnabled
1979
- }),
1980
- businessSelection: businessSelectionValidators(),
1981
- companyStructure: CompanyStructureValidation,
1982
- additionalInformation: additionalInformationValidators({
1983
- country,
1984
- taxIdNumberType: taxIdType,
1985
- companyType,
1986
- registrationNumberType: regNumberType,
1987
- vatNumberType: data?.additionalInformation?.vatNumberType,
1988
- isExperimentEnabled
1989
- }),
1990
- financialInformation: financialInfoValidationWithEmployeesRules
1991
- };
1992
- },
1993
- [country, isExperimentEnabled, taskType]
1994
- );
1995
- const multiForm = useMultiForm({
1996
- defaultData,
1997
- allFields: derivedProps?.allFields,
1998
- requiredFields: derivedProps?.requiredFields,
1999
- optionalFields: derivedProps?.optionalFields,
2000
- obscuredFields: derivedProps?.obscuredFields,
2001
- trustedFields: derivedProps?.trustedFields,
2002
- rules: buildFieldValidations
2003
- });
2004
- const isTinMatched = tinMatched.value;
2005
- const customRules = useMemo(
2006
- () => rules({
2007
- data: multiForm.data,
2008
- country,
2009
- taskType,
2010
- isExperimentEnabled,
2011
- isSettingEnabled,
2012
- accountHolder,
2013
- tinMatched: isTinMatched,
2014
- rootLegalEntity: legalEntityResponse,
2015
- version: versionData?.version
2016
- }),
2017
- [
2018
- multiForm.data,
2019
- country,
2020
- taskType,
2021
- isExperimentEnabled,
2022
- isSettingEnabled,
2023
- accountHolder,
2024
- isTinMatched,
2025
- legalEntityResponse,
2026
- versionData?.version
2027
- ]
2028
- );
2029
- useEffect(() => {
2030
- const props = getPropsFromConfigurations({
2031
- scenarioConfiguration: fieldConfigurations,
2032
- forms: defaultForms,
2033
- remediationActions: problems?.remediationActions ? Object.values(problems?.remediationActions) : [],
2034
- dataMissingErrors: problems?.missingData ?? [],
2035
- fieldsWithExistingData: subjectEntity ? subjectEntity.type === LegalEntityTypes.SOLE_PROPRIETORSHIP ? getFieldsWithExistingData(
2036
- subjectEntity,
2037
- solePropBusinessDetailsApiKeyMapping,
2038
- solePropBusinessDetailsDocumentMapping
2039
- ) : getFieldsWithExistingData(
2040
- subjectEntity,
2041
- businessDetailsApiKeyMapping,
2042
- businessDetailsDocumentMapping
2043
- ) : [],
2044
- customRules,
2045
- legalEntityType: subjectEntity?.type,
2046
- legalEntityTrustedFields: trustedFields
2047
- });
2048
- setDerivedProps(props);
2049
- }, [
2050
- customRules,
2051
- defaultForms,
2052
- subjectEntity,
2053
- problems?.missingData,
2054
- problems?.remediationActions,
2055
- trustedFields,
2056
- fieldConfigurations
2057
- ]);
2058
- const [prevCountry, setPrevCountry] = useState(multiForm.data.basicInformation?.country);
2059
- if (multiForm.data.basicInformation?.country && prevCountry !== multiForm.data.basicInformation?.country) {
2060
- setCountry(multiForm.data?.basicInformation?.country);
2061
- setPrevCountry(multiForm.data.basicInformation?.country);
2062
- setTrustedFields(void 0);
2063
- verifiedBusiness.value = void 0;
2064
- tinMatched.value = void 0;
2065
- businessMismatchModalOpen.value = false;
2066
- }
2067
- const [forms, setForms] = useState(
2068
- buildRequiredForms({
2069
- config: {
2070
- forms: defaultForms,
2071
- requiredFields: derivedProps?.requiredFields,
2072
- optionalFields: derivedProps?.optionalFields,
2073
- isValid: multiForm.isValid ?? {},
2074
- problems,
2075
- isSettingEnabled,
2076
- accountHolder,
2077
- legalEntityResponse
2078
- },
2079
- options: {
2080
- hasNoSearchResults: false
2081
- }
2082
- })
2083
- );
2084
- const updateForms = useCallback(
2085
- ({ searchResults }) => {
2086
- const updatedForms = buildRequiredForms({
2087
- config: {
2088
- forms: defaultForms,
2089
- requiredFields: derivedProps?.requiredFields,
2090
- optionalFields: derivedProps?.optionalFields,
2091
- isValid: multiForm.isValid ?? {},
2092
- problems,
2093
- isSettingEnabled,
2094
- accountHolder,
2095
- legalEntityResponse
2096
- },
2097
- options: {
2098
- hasNoSearchResults: searchResults && !searchResults.length
2099
- }
2100
- });
2101
- setForms(updatedForms);
2102
- return updatedForms;
2103
- },
2104
- [
2105
- defaultForms,
2106
- derivedProps?.optionalFields,
2107
- derivedProps?.requiredFields,
2108
- multiForm.isValid,
2109
- problems,
2110
- isSettingEnabled,
2111
- accountHolder,
2112
- legalEntityResponse
2113
- ]
2114
- );
2115
- const summaryData = useMemo(
2116
- () => formatDataForSummary(multiForm.data, forms, t, i18n.language, isExperimentEnabled),
2117
- [multiForm.data, forms, t, i18n.language, isExperimentEnabled]
2118
- );
2119
- const { mutateAsync: createBusinessLine } = useCreateBusinessLine();
2120
- const { mutateAsync: updateBusinessLine } = useUpdateBusinessLine();
2121
- const submitTask = useCallback(() => {
2122
- setAccountHolder(accountHolder);
2123
- return submit({
2124
- data: multiForm.data,
2125
- legalEntityResponse,
2126
- associatedLegalArrangement,
2127
- nestedLegalEntity,
2128
- nestedLegalEntityDetails,
2129
- problems,
2130
- taskType,
2131
- accountHolder: accountHolder ?? "theCompanyIWorkFor",
2132
- forms,
2133
- documentUtils,
2134
- t,
2135
- showToast,
2136
- setLoadingStatus,
2137
- setProblems,
2138
- handleUpdateLegalEntity: updateLegalEntity,
2139
- createLegalEntity,
2140
- onExternalSubmit,
2141
- isExperimentEnabled,
2142
- userEvents,
2143
- efpBusinessLines,
2144
- createBusinessLine,
2145
- updateBusinessLine
2146
- });
2147
- }, [
2148
- setAccountHolder,
2149
- accountHolder,
2150
- multiForm.data,
2151
- legalEntityResponse,
2152
- associatedLegalArrangement,
2153
- nestedLegalEntity,
2154
- nestedLegalEntityDetails,
2155
- problems,
2156
- taskType,
2157
- forms,
2158
- documentUtils,
2159
- t,
2160
- showToast,
2161
- updateLegalEntity,
2162
- createLegalEntity,
2163
- onExternalSubmit,
2164
- isExperimentEnabled,
2165
- userEvents,
2166
- efpBusinessLines,
2167
- createBusinessLine,
2168
- updateBusinessLine
2169
- ]);
2170
- const {
2171
- handleNextClick,
2172
- handleBackClick,
2173
- activeForm,
2174
- shouldValidate,
2175
- gotoFormByFormIndex,
2176
- steps
2177
- } = useFormComposer({
2178
- problems,
2179
- forms,
2180
- onSubmit: submitTask,
2181
- triggerValidation: multiForm.triggerValidation
2182
- });
2183
- const handleBusinessMismatchContinue = () => {
2184
- setTrustedFields([]);
2185
- businessMismatchModalOpen.value = false;
2186
- handleNextClick();
2187
- };
2188
- const handleBusinessMismatchCancel = () => {
2189
- handleBackClick?.();
2190
- businessMismatchModalOpen.value = false;
2191
- tinMatched.value = false;
2192
- };
2193
- const companySearchQueryInput = {
2194
- name: multiForm.data?.basicInformation?.legalCompanyName ?? "",
2195
- country: multiForm.data?.basicInformation?.country,
2196
- state: multiForm.data?.basicInformation?.stateOrProvince,
2197
- registrationNumber: multiForm.data?.basicInformation?.registrationNumber
2198
- };
2199
- const verifyTinQueryInput = {
2200
- name: multiForm.data.basicInformation?.legalCompanyName ?? "",
2201
- tin: multiForm.data?.basicInformation?.taxInformation?.find((taxId) => taxId.country === country)?.number ?? ""
2202
- };
2203
- const {
2204
- data: companySearchResponse,
2205
- isLoading: searchingCompanies,
2206
- isError: searchingError
2207
- } = useCompanySearch(companySearchQueryInput, {
2208
- enabled: false
2209
- });
2210
- useEffect(() => {
2211
- if (!searchingCompanies && companySearchResponse?.results) {
2212
- userEvents.addPageEvent("Success", {
2213
- actionType: "submit",
2214
- returnValue: "companySearch",
2215
- additionalData: {
2216
- numberOfResults: companySearchResponse?.results.length
2217
- }
2218
- });
2219
- }
2220
- }, [searchingCompanies, userEvents, subjectEntity, companySearchResponse?.results]);
2221
- const companySelectionInput = {
2222
- company: companySearchResponse?.results[0],
2223
- state: multiForm.data.basicInformation?.stateOrProvince,
2224
- name: multiForm.data?.basicInformation?.legalCompanyName ?? "",
2225
- tin: multiForm.data?.basicInformation?.taxInformation?.find((taxId) => taxId.country === country)?.number ?? ""
2226
- };
2227
- useVerifyTin(verifyTinQueryInput, { enabled: false });
2228
- const attemptBusinessSearch = async () => {
2229
- if (customRules.countryUsingCompanySearch() !== "REQUIRED") {
2230
- const currentForms = updateForms({ searchResults: [] });
2231
- return handleNextClick(currentForms);
2232
- }
2233
- try {
2234
- setLoadingStatus("loading");
2235
- tinMatched.value = void 0;
2236
- verifiedBusiness.value = void 0;
2237
- isVerifiedSingleCompanySearchResult.value = false;
2238
- const searchResponse = await queryClient.fetchQuery({
2239
- queryKey: ["companySearch", companySearchQueryInput]
2240
- });
2241
- let currentForms = updateForms({ searchResults: searchResponse.results });
2242
- const handleTinResponse = (matched) => {
2243
- if (matched) {
2244
- tinMatched.value = true;
2245
- } else {
2246
- businessMismatchModalOpen.value = true;
2247
- tinMatched.value = false;
2248
- }
2249
- return tinMatched.value;
2250
- };
2251
- if (searchResponse?.results.length === 1 && isNormalizedStringMatch(
2252
- multiForm.data?.basicInformation?.legalCompanyName ?? "",
2253
- searchResponse.results[0].name
2254
- )) {
2255
- const companySelectionResponse = await handleCompanySelection(
2256
- rootLegalEntityId.value,
2257
- baseUrl.value,
2258
- { ...companySelectionInput, company: searchResponse.results[0] }
2259
- );
2260
- if (handleTinResponse(!!companySelectionResponse.tinMatched)) {
2261
- verifiedBusiness.value = companySelectionResponse;
2262
- isVerifiedSingleCompanySearchResult.value = true;
2263
- applyVerifiedBusinessData(multiForm, country, verifiedBusiness.value);
2264
- currentForms = updateForms({ searchResults: searchResponse.results });
2265
- } else {
2266
- return setLoadingStatus("success");
2267
- }
2268
- }
2269
- if (!searchResponse.results.length) {
2270
- const tinVerificationResponse = await queryClient.fetchQuery({
2271
- queryKey: ["verifyTin", verifyTinQueryInput]
2272
- });
2273
- if (!handleTinResponse(!!tinVerificationResponse?.matched)) {
2274
- return setLoadingStatus("success");
2275
- }
2276
- }
2277
- setLoadingStatus("success");
2278
- return handleNextClick(currentForms);
2279
- } catch (e) {
2280
- logger.error(e);
2281
- setLoadingStatus("error");
2282
- const currentForms = updateForms({ searchResults: [] });
2283
- return handleNextClick(currentForms);
2284
- }
2285
- };
2286
- const overrideNextClick = async () => {
2287
- if (!activeForm.isValid) return handleNextClick();
2288
- if (!COUNTRIES_USING_COMPANY_SEARCH.includes(country) || isSoleProp) {
2289
- return handleNextClick();
2290
- }
2291
- switch (activeForm.formId) {
2292
- case "basicInformation": {
2293
- return await attemptBusinessSearch();
2294
- }
2295
- case "businessSelection": {
2296
- const currentForms = updateForms({
2297
- searchResults: companySearchResponse?.results
2298
- });
2299
- return handleNextClick(currentForms);
2300
- }
2301
- default:
2302
- return handleNextClick();
2303
- }
2304
- };
2305
- useEffect(() => {
2306
- updateForms({
2307
- searchResults: searchingError ? [] : companySearchResponse?.results
2308
- });
2309
- }, [updateForms, companySearchResponse?.results, searchingError]);
2310
- return /* @__PURE__ */ jsx(FormContextProvider, { form: multiForm, children: /* @__PURE__ */ jsxs(
2311
- FormFlow,
2312
- {
2313
- summary: {
2314
- data: summaryData,
2315
- omitted: {
2316
- keys: ["operationalAddressIsSame"],
2317
- forms: ["businessSelection"]
2318
- },
2319
- problems,
2320
- showLegalCaption: true
2321
- },
2322
- asModal,
2323
- currentStep: steps.current,
2324
- totalSteps: steps.total,
2325
- forms,
2326
- activeForm,
2327
- disableNextButton: activeForm.formId === "businessSelection",
2328
- gotoFormByFormIndex,
2329
- handleNextClick: overrideNextClick,
2330
- handleBackClick,
2331
- handleCancelClick: handleHomeClick,
2332
- loadingStatus,
2333
- children: [
2334
- /* @__PURE__ */ jsx(
2335
- BusinessDetailsMultiform,
2336
- {
2337
- taskType,
2338
- activeForm,
2339
- country,
2340
- shouldValidate,
2341
- problems,
2342
- handleNextClick: overrideNextClick,
2343
- handleBackClick,
2344
- setLoadingStatus,
2345
- isTopLevelEntity: taskType === TaskTypes.BUSINESS_DETAILS
2346
- }
2347
- ),
2348
- businessMismatchModalOpen.value && /* @__PURE__ */ jsx(
2349
- Confirm,
2350
- {
2351
- title: t(($) => $["businessSelection__tinVerificationFailureModalHeader"], {
2352
- ns: "business"
2353
- }),
2354
- description: t(($) => $["businessSelection__tinVerificationFailureModalContent"], {
2355
- ns: "business"
2356
- }),
2357
- cancelText: t(
2358
- ($) => $["businessSelection__tinVerificationFailureModalSecondaryButton"],
2359
- { ns: "business" }
2360
- ),
2361
- confirmText: t(
2362
- ($) => $["businessSelection__tinVerificationFailureModalPrimaryButton"],
2363
- { ns: "business" }
2364
- ),
2365
- onCancel: handleBusinessMismatchCancel,
2366
- onConfirm: handleBusinessMismatchContinue,
2367
- analyticsEventLabel: "tinVerificationFailureModal"
2368
- }
2369
- )
2370
- ]
2371
- }
2372
- ) });
2373
- }
2374
- const useDocuments = (documentDetails, entityId, options) => {
2375
- const { rootLegalEntityId, baseUrl } = useApiContext();
2376
- const documentUtils = documentApiUtils({
2377
- baseUrl: baseUrl.value,
2378
- rootLegalEntityId: rootLegalEntityId.value
2379
- });
2380
- const documentDetailsKey = (documentDetails || []).map((details) => details.id).sort((a, b) => a.localeCompare(b)).join(",");
2381
- return useQuery({
2382
- queryKey: ["documents", documentDetailsKey, entityId + ""],
2383
- queryFn: () => documentUtils.fetchDocuments(documentDetails, entityId),
2384
- retry: 0,
2385
- ...options
2386
- });
2387
- };
2388
- function useBusinessDetailsData(taskType, associatedLegalArrangement, nestedLegalEntity) {
2389
- const { t } = useTranslation(["common"]);
2390
- const { data: rootLe } = useLegalEntity(ROOT_LE);
2391
- const { accountHolder } = useAccountHolder();
2392
- const { showToast } = useToastContext();
2393
- const { isSettingEnabled } = useSettingsContext();
2394
- const { data: efpBusinessLines, isLoading: fetchingEfpBusinessLines } = useBusinessLines(
2395
- ALLOWED_SOF_SERVICES,
2396
- {
2397
- enabled: isSettingEnabled("allowBusinessLines")
2398
- }
2399
- );
2400
- const isSoleProp = accountHolder === "mySoleProprietorName";
2401
- const isAssociationTaskType = taskType !== TaskTypes.BUSINESS_DETAILS;
2402
- const subjectEntity = !isAssociationTaskType ? rootLe : isSoleProp ? associatedLegalArrangement : nestedLegalEntity;
2403
- const { isLoading: fetchingDocuments, isError } = useDocuments(
2404
- subjectEntity?.documentDetails || [],
2405
- subjectEntity?.id || "",
2406
- {
2407
- enabled: subjectEntity?.documentDetails && subjectEntity?.documentDetails.length > 0
2408
- }
2409
- );
2410
- useEffect(() => {
2411
- if (isError) {
2412
- showToast({
2413
- label: t(($) => $["failedToFetchRelevantDocuments"], { ns: "common" }),
2414
- variant: "error"
2415
- });
2416
- }
2417
- }, [isError, showToast, t]);
2418
- let mappedDocs;
2419
- if (subjectEntity?.id) {
2420
- mappedDocs = mapApiDocumentToBusinessDetailsDocuments(subjectEntity.id);
2421
- }
2422
- return rootLe && !fetchingEfpBusinessLines && !fetchingDocuments ? {
2423
- data: {
2424
- rootLe,
2425
- efpBusinessLines,
2426
- documents: mappedDocs
2427
- },
2428
- isLoading: false
2429
- } : {
2430
- data: {
2431
- rootLe,
2432
- efpBusinessLines,
2433
- documents: mappedDocs
2434
- },
2435
- isLoading: true
2436
- };
2437
- }
2438
- export {
2439
- BusinessDetailsDropin as B,
2440
- useBusinessDetailsData as u
2441
- };