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