@adyen/kyc-components 4.0.0-compact.1 → 4.0.0-compact.3
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/dist/4-people-BzyXLUF9.js +24 -0
- package/dist/{AD-CyP5INSp.js → AD-BQAadLyG.js} +2 -2
- package/dist/{AT-DJLlevck.js → AT-BI8ju2NH.js} +2 -2
- package/dist/{AcceptTermsOfServiceComponent-Ddtg_ZHH.js → AcceptTermsOfServiceComponent-DmtE39CC.js} +51 -66
- package/dist/Accordion-C-BvE1VA.js +88 -0
- package/dist/{AccountSetupRejected-CvdEsdWe.js → AccountSetupRejected-DDoI43lB.js} +6 -6
- package/dist/ActionBar-Dzrzolec.js +31 -0
- package/dist/{Address-YjoUtTTT.js → Address-e41CN3CB.js} +292 -51
- package/dist/{Alert-C_-UwoDE.js → Alert-Dk-oZlnx.js} +7 -79
- package/dist/{Avatar-CeHhAxxR.js → Avatar-efxn8pKz.js} +2 -2
- package/dist/{BE-B-m_4F41.js → BE-nWHKW0xQ.js} +2 -2
- package/dist/{BG-BVR5ytc-.js → BG-HKzabLqZ.js} +3 -3
- package/dist/BusinessDetailsDropin-DDh_D2hv.js +2359 -0
- package/dist/BusinessFinancingComponent-C04uRrhE.js +55 -0
- package/dist/{BusinessFinancingDropin-B6Vpswcj.js → BusinessFinancingDropin-_OlSqohS.js} +186 -154
- package/dist/BusinessFinancingPage-DdMugwOa.js +43 -0
- package/dist/{BusinessTypeSelectionPage-CQxhI1B6.js → BusinessTypeSelectionPage-vkCTEFEJ.js} +13 -13
- package/dist/{CH-CesIKOYy.js → CH-TX4BTE2y.js} +2 -2
- package/dist/{CY-BnJ7k_mN.js → CY-D59Nypl7.js} +2 -2
- package/dist/{CZ-BiPeoA9G.js → CZ-B6iI1GbE.js} +3 -3
- package/dist/Card-CqXQA0AI.js +82 -0
- package/dist/ConstitutionalDocument-CcwyClZ7.js +143 -0
- package/dist/{CountryField-50Iboayh.js → CountryField-CzRN1OE8.js} +195 -216
- package/dist/CreateIndividualComponent-BNeY6u8q.js +71 -0
- package/dist/CreateTransferInstrumentComponent-B8cNHRdF.js +63 -0
- package/dist/{Currency-D-0ToVpS.js → Currency-BBt4yo5i.js} +10 -65
- package/dist/{CustomerSupport-DTw357Bq.js → CustomerSupport-CObTT8cH.js} +23 -11
- package/dist/{DE-DdcbG-CC.js → DE-CsuX_tSL.js} +2 -2
- package/dist/{DK-DA8qRrzq.js → DK-oQEFrF6o.js} +3 -3
- package/dist/{DebugModal-Dc6JIQeF.js → DebugModal-DJcim6UP.js} +128 -43
- package/dist/DecisionMakerDetailsPage-CrQgRW8X.js +106 -0
- package/dist/DecisionMakers-B-3aMddf.js +842 -0
- package/dist/DropinLayout-CBP_cHLC.js +17 -0
- package/dist/{EE-CaXoPgZz.js → EE-3WZV5Ejt.js} +2 -2
- package/dist/{ES-Bt_oaIaf.js → ES-NfxpqbC2.js} +2 -2
- package/dist/{EmbeddedStatus-DQXq53qv.js → EmbeddedStatus-C_5DguHv.js} +15 -16
- package/dist/{EndStateLayout-BPsmcrN3.js → EndStateLayout-CwdrDEYY.js} +2 -2
- package/dist/EntityAssociation-C413vcu6.js +159 -0
- package/dist/EntityGuidanceStatus-C6b8i7os.js +105 -0
- package/dist/{FI-C5V3lLuN.js → FI-CHQIvHa-.js} +2 -2
- package/dist/{FR-Bc1tLIC4.js → FR-MWZyWX3x.js} +2 -2
- package/dist/FormFlow-PppMJ6OA.js +186 -0
- package/dist/{FormNavigation-29vpexO6.js → FormNavigation-DL47b_QR.js} +6 -24
- package/dist/{useGlobalData-TJeJM5fq.js → FormWrapper-BOrTn1C8.js} +12 -82
- package/dist/{GG-BGuqxplU.js → GG-CPoMVQPc.js} +3 -3
- package/dist/{GI-CROkpYrU.js → GI-DxmBwVD_.js} +3 -3
- package/dist/{GR-B9c2boG8.js → GR-Rk0pXlNw.js} +2 -2
- package/dist/{HR-p4luVYpu.js → HR-WapHW2fw.js} +2 -2
- package/dist/{HU-D8vJYkDH.js → HU-DCOMuOhe.js} +3 -3
- package/dist/{IE-Cli_j7Al.js → IE-BkgtVgDi.js} +2 -2
- package/dist/{IM-mpIyBn16.js → IM-Wr4iDT94.js} +3 -3
- package/dist/{IS-02zCAdvq.js → IS-C-Cgc6zp.js} +2 -2
- package/dist/{IT-CzURFhrK.js → IT-CXekiddL.js} +2 -2
- package/dist/{IndividualOnfidoDropin-XYcD-6sb.js → IndividualOnfido-CmmyKC7J.js} +8212 -6455
- package/dist/IndividualOnfidoDropin-BsCb6dvy.js +2569 -0
- package/dist/{InputText-CnEQJihB.js → InputText-BfL9DgWp.js} +101 -13
- package/dist/{Introduction-BkGNoXvo.js → Introduction-CBMl7v2M.js} +7 -11
- package/dist/{JE-MFwIYti7.js → JE-B4gj54Hg.js} +3 -3
- package/dist/JpAddress-BCwWQ0Ul.js +271 -0
- package/dist/{LI-DA06W10W.js → LI-L0ZAALRT.js} +2 -2
- package/dist/{LT-DuU6E2Ct.js → LT-Ao2uagV9.js} +2 -2
- package/dist/{LU-BQHhNpDy.js → LU-B7LRUuc6.js} +2 -2
- package/dist/{LV-DN7wckbP.js → LV-DZeGjA2G.js} +2 -2
- package/dist/{LegalRepresentativeDetailsPage-D3Ld1xg7.js → LegalRepresentativeDetailsPage-CDURNY_v.js} +6 -7
- package/dist/ListItem-BhUSZdS5.js +69 -0
- package/dist/{MC-DtSWC4jS.js → MC-EDVNGWhy.js} +2 -2
- package/dist/{MT-DeDMQ1f_.js → MT-B9my7RlP.js} +2 -2
- package/dist/ManageIndividualComponent-wYIuZdQ8.js +46 -0
- package/dist/ManageTermsOfServiceComponent-6RBHbbsn.js +52 -0
- package/dist/{ManageTransferInstrumentComponent-D8e5YRiK.js → ManageTransferInstrumentComponent-BDyWbySW.js} +19 -26
- package/dist/{MaybeModal-D6lc_yUc.js → MaybeModal-CG0BAO68.js} +15 -4
- package/dist/{Modal-ltKHtBfL.js → Modal-CJ_hgcGb.js} +19 -6
- package/dist/{NL-aVL0NAp-.js → NL-VXAFOhV5.js} +2 -2
- package/dist/{NO-D7EOiQA1.js → NO-Cx1VSh2W.js} +3 -3
- package/dist/OnboardingDropinComponent-D3dYF_4W.js +7617 -0
- package/dist/{PL-Bg7axKQA.js → PL-BZW1hGvD.js} +3 -3
- package/dist/{PT-hB1HnBM2.js → PT-OpU4MU3L.js} +2 -2
- package/dist/{PayoutDetailsDropin-Ba4z1H8Y.js → PayoutDetailsDropin-DxALk48X.js} +1530 -384
- package/dist/ProgressBar-B7gTQncy.js +47 -0
- package/dist/{RO-BLlC4CKq.js → RO-Cz6Sh0ls.js} +2 -2
- package/dist/{Review-QGTwsuVG.js → Review-C_JnI94L.js} +9 -8
- package/dist/RootBusinessDetailsPage-BE3Uck1r.js +46 -0
- package/dist/RootBusinessLinesPage-DknXuZgi.js +1484 -0
- package/dist/RootIndividualDetailsPage-BIj988Sh.js +71 -0
- package/dist/{SE-q25Qt85B.js → SE-B5K-FkQd.js} +3 -3
- package/dist/{SI-BzA-ozn6.js → SI-BOGTNLPa.js} +2 -2
- package/dist/{SK-DOTdLJPw.js → SK-BOVrp_Av.js} +2 -2
- package/dist/{SM-B4BIgmhk.js → SM-meowwILA.js} +2 -2
- package/dist/{SignPCIComponent-BvOwbwCX.js → SignPCIComponent-BjVEKTlw.js} +29 -19
- package/dist/{SingpassSelection-CfMjudRn.js → SingpassSelection-Bkbz_bGo.js} +10 -10
- package/dist/SoleProprietorshipPage-DSOEsSfJ.js +46 -0
- package/dist/{SourceOfFundsPage-BOFtbQbF.js → SourceOfFundsPage-cWwthA_A.js} +238 -956
- package/dist/{MaskedInput-Cr4BEARC.js → Spacer-D4I0f08n.js} +641 -24
- package/dist/{StepProgressIndicator-D8I0VtoT.js → StepProgressIndicator-FNAEisRr.js} +2 -2
- package/dist/{StoreProvider-D4cRWOo4.js → StoreProvider-jtUYKLRz.js} +1195 -560
- package/dist/Summary-COehg8IT.js +204 -0
- package/dist/{TaxReportingDropin-CDqErRkl.js → TaxReportingDropin-BBkhMcPn.js} +76 -74
- package/dist/TrustDetailsPage-50i4_lFA.js +2149 -0
- package/dist/TrustMemberCompanyPage-v2Md1srF.js +57 -0
- package/dist/TrustMemberIndividualPage-Bn6TXkhN.js +66 -0
- package/dist/TrustMemberRoleAndTypePage-C_NPNe6_.js +985 -0
- package/dist/TrustMembersOverview-FcSsQZ3Z.js +438 -0
- package/dist/{UnincorporatedPartnershipIndividualPage-Dx1qdgZL.js → UnincorporatedPartnershipIndividualPage-zsyk9RTz.js} +6 -7
- package/dist/{UnincorporatedPartnershipMemberCompanyPage-B89QmXFf.js → UnincorporatedPartnershipMemberCompanyPage-FP75ZgOg.js} +7 -11
- package/dist/UnincorporatedPartnershipMemberRoleAndTypePage-n6SndOAj.js +281 -0
- package/dist/UnincorporatedPartnershipMembersOverview-BbW2q9EI.js +172 -0
- package/dist/{VA-bPXdCnwD.js → VA-DXsYTCoh.js} +2 -2
- package/dist/VerificationErrorAlert-B7jRGdgn.js +79 -0
- package/dist/{ViewVerificationStatusComponent-2jYPePEI.js → ViewVerificationStatusComponent-CuUmC319.js} +16 -13
- package/dist/adyen-business-financing.js +10 -7
- package/dist/adyen-individual-configuration.js +5 -6
- package/dist/adyen-individual-status.js +5 -6
- package/dist/adyen-kyc-components.js +38 -33
- package/dist/adyen-onboarding.js +4 -5
- package/dist/adyen-terms-of-service-management.js +5 -6
- package/dist/adyen-terms-of-service-status.js +5 -6
- package/dist/adyen-transfer-instrument-configuration.js +5 -6
- package/dist/adyen-transfer-instrument-management.js +5 -6
- package/dist/adyen-verification-status.js +5 -6
- package/dist/{arrow-right-D_mdkZmE.js → arrow-right-KxA3SvQj.js} +2 -2
- package/dist/{bag-DpxmyXfR.js → bag-BPumznWh.js} +2 -2
- package/dist/{bank-gyBvaSp4.js → bank-D6FiNBhs.js} +2 -2
- package/dist/bin-Bz6KOIeE.js +18 -0
- package/dist/capital-GVQ3svwN.js +17 -0
- package/dist/{cash-stack-Ds76Du8m.js → cash-stack-D9AoDDwt.js} +3 -3
- package/dist/{certificate-D6xjhThs.js → certificate-CdEWgHQf.js} +3 -3
- package/dist/{checkmark-tfEAu7lj.js → checkmark-Q7x6tGhy.js} +2 -2
- package/dist/checkmark-circle-fill-CsvN5_PL.js +17 -0
- package/dist/{checkmark-circle-nACBJ24q.js → checkmark-circle-x7dzbp3I.js} +3 -3
- package/dist/{checkmark-small-63w5fAxg.js → checkmark-small-D35myntq.js} +2 -2
- package/dist/{chevron-down-CkQS-knD.js → chevron-down-C2iDorpW.js} +2 -2
- package/dist/{chevron-left-CBCMdMx6.js → chevron-left-ztPO84q-.js} +2 -2
- package/dist/{chevron-right-dIVWvPJu.js → chevron-right-C_JN0oDt.js} +2 -2
- package/dist/{chevron-up-D93IGU9z.js → chevron-up-CgG8n25g.js} +2 -2
- 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-DI03_xrF.js → contract-BTa4HltT.js} +2 -2
- package/dist/{cross-o4n5KXxG.js → cross-Cn09MtQ_.js} +2 -2
- package/dist/cross-circle-fill-maan7Z5S.js +17 -0
- package/dist/{cross-circle-fill-small-CHMDaA3q.js → cross-circle-fill-small-DCz52AuN.js} +2 -2
- package/dist/da-DK-BlU1EczG.js +30 -0
- package/dist/da-DK-DCJhV2qS.js +32 -0
- package/dist/da-DK-DEdQ-QPp.js +13 -0
- package/dist/da-DK-DWA8uOd8.js +24 -0
- package/dist/{da-DK-BoQic3Gy.js → da-DK-DYpfNZdP.js} +5 -1
- package/dist/da-DK-DZwlENGe.js +13 -0
- package/dist/da-DK-Dc0QYG8m.js +68 -0
- package/dist/da-DK-DqkN5oIu.js +13 -0
- package/dist/da-DK-DvZ431fC.js +13 -0
- package/dist/{da-DK-B45X2VaJ.js → da-DK-JHZnsI59.js} +24 -4
- package/dist/da-DK-gnPgzwrG.js +27 -0
- package/dist/da-DK-h8DYQ_Iq.js +13 -0
- package/dist/da-DK-jK7c9UL0.js +57 -0
- package/dist/de-DE-0uSzhWg5.js +13 -0
- package/dist/{de-DE-Dwagawx1.js → de-DE-BXt1K0Tr.js} +5 -1
- package/dist/de-DE-COuUdtao.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-DrSSblam.js +13 -0
- package/dist/de-DE-DwOQKCuU.js +32 -0
- package/dist/de-DE-Dz2OsS1F.js +68 -0
- package/dist/de-DE-LQE_LFFL.js +13 -0
- package/dist/{de-DE-CWvgMDqU.js → de-DE-VGGEkxUT.js} +24 -4
- package/dist/de-DE-s0B-XZyp.js +30 -0
- package/dist/de-DE-wmerDL2e.js +57 -0
- package/dist/debouncedInputEvent-HhImBs4O.js +109 -0
- package/dist/{form-rules-DhbF2mY4.js → debugStore-BvbyN1Oi.js} +4 -3
- package/dist/{document-1-DsCi9vmX.js → document-1-C08ut-Dt.js} +2 -2
- package/dist/document-person-vxlA6C5f.js +20 -0
- package/dist/documentUtils-DIcRD9lR.js +218 -0
- package/dist/download-Drhk9k1f.js +17 -0
- package/dist/{dropinUtils-CXnvPFZN.js → dropinUtils-BK1u6OTG.js} +32 -24
- package/dist/edit-1-CFoDTMvQ.js +14 -0
- package/dist/en-US-AgtwE4Fl.js +63 -0
- package/dist/en-US-B96dpVon.js +27 -0
- package/dist/en-US-BQZhzROc.js +32 -0
- package/dist/en-US-CozY33On.js +13 -0
- package/dist/{en-US-DIdQJky-.js → en-US-CzEL6t1W.js} +24 -4
- package/dist/en-US-D-B35AoN.js +68 -0
- package/dist/en-US-D2yrwtzT.js +24 -0
- package/dist/{en-US-BbAzROHT.js → en-US-Dg505Oh3.js} +2 -1
- package/dist/en-US-d4WBvUW7.js +118 -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-B7dt4cn7.js +13 -0
- package/dist/es-ES-BI_jdT67.js +68 -0
- package/dist/es-ES-BOoPqnPI.js +32 -0
- package/dist/{es-ES-Bsoco8Fj.js → es-ES-BhNhIf08.js} +5 -1
- package/dist/{es-ES-DKCCgVF8.js → es-ES-Bn9_0wK0.js} +24 -4
- package/dist/es-ES-CXDJLKAI.js +27 -0
- package/dist/es-ES-DF_L5EDd.js +24 -0
- package/dist/es-ES-DNGEW6V_.js +13 -0
- package/dist/es-ES-DdGmXdxO.js +13 -0
- package/dist/es-ES-Qnc0Q6JH.js +57 -0
- package/dist/es-ES-ShWaSuJd.js +13 -0
- package/dist/es-ES-esfwvKwz.js +30 -0
- package/dist/es-ES-yMXcOjDL.js +13 -0
- package/dist/{external-link-BjladU3E.js → external-link-DCMYUMfW.js} +2 -2
- package/dist/fi-FI-CIYa9SyS.js +13 -0
- package/dist/fi-FI-ChApf7lf.js +13 -0
- package/dist/fi-FI-CjB6QC01.js +30 -0
- package/dist/fi-FI-CoI_94Fv.js +13 -0
- package/dist/fi-FI-DH6jpo9K.js +24 -0
- package/dist/fi-FI-Dn2MC8uW.js +57 -0
- package/dist/{fi-FI-Hhku9Lmc.js → fi-FI-PVFqd5Ra.js} +24 -4
- package/dist/fi-FI-REMsyTSr.js +13 -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-xqnQ38yC.js +13 -0
- package/dist/{fi-FI-ClnsYt3L.js → fi-FI-ysUrBilO.js} +5 -1
- package/dist/{fr-FR-CJI0bIig.js → fr-FR-BSvSKazD.js} +5 -1
- 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-Br7OeDIe.js +13 -0
- package/dist/fr-FR-C1XqLftn.js +30 -0
- package/dist/fr-FR-CYZXbwc9.js +68 -0
- package/dist/fr-FR-CiwkAb3E.js +27 -0
- package/dist/fr-FR-CvHWmim-.js +13 -0
- package/dist/fr-FR-Q3urMjbl.js +13 -0
- package/dist/fr-FR-cTKcuHqX.js +32 -0
- package/dist/fr-FR-l5z31r7i.js +13 -0
- package/dist/{fr-FR-BYuKsZIb.js → fr-FR-mJK4hjwD.js} +24 -4
- package/dist/getFieldsWithExistingData-DxCFyXNd.js +22 -0
- package/dist/{getName-BsaU8Hqr.js → getName-BS-pHwl0.js} +2 -2
- package/dist/gift-CQ_DEma7.js +14 -0
- package/dist/{graph-DwYwlplw.js → graph-BJmqglH2.js} +3 -3
- package/dist/{graph-up-DpbCSPbc.js → graph-up-Bq6adtlX.js} +6 -6
- package/dist/{hasDataChanged-CA7cMLCV.js → hasDataChanged-CWdnpJrE.js} +2 -2
- package/dist/headquarter-DNYyuuFq.js +21 -0
- package/dist/{hotel-JX0bjsSA.js → hotel-BuNql78Z.js} +3 -3
- package/dist/{iframeWidget-BPBJSJJt.js → iframeWidget-Uz4rHS0r.js} +4 -4
- package/dist/image-BSihO8lR.js +17 -0
- package/dist/info-filled-SQotHmT9.js +17 -0
- package/dist/info-vHTZWoJ7.js +21 -0
- package/dist/it-IT-B0YGvVgW.js +57 -0
- package/dist/it-IT-BAvmkEF8.js +13 -0
- package/dist/it-IT-BAvsF2TB.js +13 -0
- package/dist/{it-IT-Nl57jui-.js → it-IT-BTWkWSJq.js} +24 -4
- package/dist/it-IT-BeX7-OcD.js +13 -0
- package/dist/it-IT-C_651bEP.js +13 -0
- package/dist/it-IT-C_YDqVNT.js +30 -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-Erh1DIlj.js +68 -0
- package/dist/{it-IT-BeC2Y1F8.js → it-IT-Qfzc8jnW.js} +5 -1
- package/dist/it-IT-vdMlF0Ha.js +13 -0
- package/dist/{localizeDateString-cCOzCBvl.js → localizeDateString-DgSdo3D5.js} +2 -2
- package/dist/location-Q4oKvnkl.js +17 -0
- package/dist/mail-BOdyoVqB.js +14 -0
- package/dist/mapAddressLocalizationToJpAddressSchema-vJWbpAyq.js +56 -0
- package/dist/{mapExistingFile-B1UL2lZR.js → mapExistingFile-CqrlnmFQ.js} +5 -80
- package/dist/mapFinancialReportsToFinancialInformation-ZmhVRj3f.js +67 -0
- package/dist/mapJpAddressSchemaToAddressLocalizations-D6HjhjJT.js +63 -0
- package/dist/mapLegalEntityToIndividualOnfidoSchema-COcit7Hx.js +146 -0
- package/dist/{mapTransferInstrumentToPayoutAccount-BdPUh-FT.js → mapTransferInstrumentToPayoutAccount-DfJHF9H8.js} +6 -3
- package/dist/{minus-circle-filled-BGKeHaxJ.js → minus-circle-filled-kC2IUvKz.js} +3 -3
- package/dist/nl-NL-BMUYBqlF.js +57 -0
- package/dist/nl-NL-BwKrj-29.js +13 -0
- package/dist/nl-NL-Bx5p0nXL.js +24 -0
- package/dist/nl-NL-C3YJkSIj.js +13 -0
- package/dist/nl-NL-CM5U8ODq.js +13 -0
- package/dist/{nl-NL-BHkRnVrj.js → nl-NL-CTf7zH4M.js} +24 -4
- package/dist/nl-NL-Cjlmc0Ii.js +32 -0
- package/dist/{nl-NL-Cysslsh2.js → nl-NL-D7gBNWEY.js} +5 -1
- package/dist/nl-NL-DV4NqPVW.js +13 -0
- package/dist/nl-NL-DyeSX0PH.js +30 -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-B6OPS2CA.js +13 -0
- package/dist/no-NO-B9618F4_.js +13 -0
- package/dist/no-NO-BQL_M1pn.js +13 -0
- package/dist/no-NO-Bs3-6MDM.js +24 -0
- package/dist/{no-NO-zSnPtrDi.js → no-NO-C-gCYc9q.js} +5 -1
- package/dist/no-NO-CA1aR6Wh.js +68 -0
- package/dist/no-NO-CY_XHrYd.js +32 -0
- package/dist/no-NO-Crlsj6HG.js +27 -0
- package/dist/no-NO-D4BECLky.js +130 -0
- package/dist/no-NO-DKbWxgF-.js +57 -0
- package/dist/no-NO-DPRsAb_o.js +30 -0
- package/dist/{no-NO-kaAdT9B8.js → no-NO-RfTK9KAV.js} +24 -4
- package/dist/{options-horizontal-nJ9-ButA.js → options-horizontal-CBmbNv7R.js} +4 -4
- package/dist/partner-CPjsrePY.js +18 -0
- package/dist/pay-by-link-plane-BVZndh67.js +22 -0
- package/dist/{payout-iEmHhgQ4.js → payout-ChUEoLjt.js} +6 -6
- 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/{plus-CwLva7fq.js → plus-CWXA5wdX.js} +2 -2
- package/dist/plus-circle-filled-CbC0u2Y1.js +17 -0
- package/dist/process-field-configurations-N1jHgPa8.js +324 -0
- package/dist/pt-BR--kaJvtE6.js +57 -0
- package/dist/pt-BR-AZ3roErF.js +13 -0
- package/dist/pt-BR-BKQRvAfq.js +13 -0
- package/dist/pt-BR-BbFJsIVX.js +55 -0
- package/dist/pt-BR-BfxgHKY4.js +27 -0
- package/dist/pt-BR-C-C4ZJ9x.js +30 -0
- package/dist/pt-BR-C0I_kTQ6.js +13 -0
- package/dist/pt-BR-CBAe0SnK.js +32 -0
- package/dist/pt-BR-DSENwwGu.js +24 -0
- package/dist/pt-BR-NtLaWlnZ.js +68 -0
- package/dist/pt-BR-gh27BC86.js +13 -0
- package/dist/pt-BR-nU_2Wbo5.js +54 -0
- package/dist/pt-BR-ur86nRrK.js +37 -0
- package/dist/pt-BR-zuqB_CBf.js +13 -0
- package/dist/{pt-PT-Xm-pm3mb.js → pt-PT-B4F_5NWi.js} +24 -4
- package/dist/pt-PT-BZ5ZZm6G.js +57 -0
- package/dist/pt-PT-Bf4IV7wp.js +13 -0
- package/dist/pt-PT-CFY1O_K0.js +13 -0
- package/dist/pt-PT-CIo3mlXL.js +24 -0
- package/dist/{pt-PT-CjsyP_OK.js → pt-PT-CVNEcs32.js} +5 -1
- package/dist/pt-PT-D2Xe-OdG.js +13 -0
- package/dist/pt-PT-DSxxVA0f.js +68 -0
- package/dist/pt-PT-DVKtHjIY.js +13 -0
- package/dist/pt-PT-DYihdcJx.js +13 -0
- package/dist/pt-PT-Dm5DRDrd.js +32 -0
- package/dist/pt-PT-LbneTcRx.js +30 -0
- package/dist/pt-PT-TKg5FLat.js +27 -0
- package/dist/recurring-CkL4cCM2.js +17 -0
- package/dist/{reporting-DlRoibD7.js → reporting-DerosUNm.js} +1 -2
- package/dist/resolveEnvironment-DZ77JxLV.js +164 -0
- package/dist/revenue-accelerate-Dp4Ns_5c.js +17 -0
- package/dist/{rules-CkD4bHtQ.js → rules-_v8BprU3.js} +14 -8
- package/dist/save-Fgy7EDid.js +14 -0
- package/dist/search-C4GZ-Rc1.js +17 -0
- package/dist/{show-uL6I-rMo.js → show-yPjPmEf8.js} +3 -3
- package/dist/sl-SI-59OQIZ3f.js +13 -0
- package/dist/sl-SI-8SzKx7XD.js +30 -0
- package/dist/sl-SI-C-C-KJCX.js +27 -0
- package/dist/sl-SI-C0wSbuau.js +13 -0
- package/dist/{sl-SI-Br0UEUPL.js → sl-SI-CUCrzJQv.js} +5 -1
- package/dist/sl-SI-DdjgSySI.js +13 -0
- package/dist/sl-SI-DtdGMD6i.js +57 -0
- package/dist/{solution-payments-DTAuLSWF.js → solution-payments-CNAat9h7.js} +2 -2
- package/dist/store-IuAkDRAp.js +14 -0
- package/dist/style.css +2911 -2181
- package/dist/styles-CLV89_hH.js +2911 -2181
- package/dist/sv-SE-B7cpKp1l.js +30 -0
- package/dist/sv-SE-BHfydid5.js +27 -0
- package/dist/sv-SE-BHkYspm-.js +130 -0
- package/dist/{sv-SE-BtXmvxx4.js → sv-SE-C6uPh9g5.js} +5 -1
- package/dist/sv-SE-CQWBP7n1.js +13 -0
- package/dist/sv-SE-CRBRuE8Z.js +32 -0
- package/dist/sv-SE-CXaMlJCI.js +24 -0
- package/dist/{sv-SE-B3zoXMuH.js → sv-SE-DGpvVvWj.js} +24 -4
- package/dist/sv-SE-DsPdegWB.js +13 -0
- package/dist/sv-SE-DtKjf4Go.js +13 -0
- package/dist/sv-SE-K1QT1cOt.js +68 -0
- package/dist/sv-SE-kR514dO1.js +57 -0
- package/dist/sv-SE-zTiw1bUU.js +13 -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 +21 -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/companySelection/useCompanySelection.d.ts +2 -18
- 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/{pciTemplate/pciTemplate.types.d.ts → pci/pci.types.d.ts} +9 -1
- package/dist/types/api/{pciTemplate → pci}/usePciQuestionnaire.d.ts +1 -1
- package/dist/types/api/{pciTemplate → pci}/usePciQuestionnaireList.d.ts +1 -1
- package/dist/types/api/{pciTemplate → pci}/usePciStatus.d.ts +1 -1
- 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/rules.d.ts +1 -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/AdditionalInformation.d.ts +1 -2
- package/dist/types/components/Business/forms/AdditionalInformation/{VerifiedBusinessCard.d.ts → VerifiedBusinessCard/VerifiedBusinessCard.d.ts} +2 -3
- package/dist/types/components/Business/forms/AdditionalInformation/types.d.ts +6 -7
- package/dist/types/components/Business/forms/BasicInformation/BasicInformation.d.ts +1 -4
- package/dist/types/components/Business/forms/BasicInformation/types.d.ts +5 -18
- package/dist/types/components/Business/{tasks/BusinessDetailsMultiformDropin → forms/BusinessDetails}/BusinessDetailsMultiform.d.ts +2 -1
- package/dist/types/components/Business/forms/BusinessDetails/forms.d.ts +0 -35
- package/dist/types/components/Business/forms/BusinessDetails/types.d.ts +0 -21
- package/dist/types/components/Business/forms/BusinessSelection/BusinessInformationCard/BusinessInformationCard.d.ts +0 -1
- package/dist/types/components/Business/forms/BusinessSelection/BusinessSelection.d.ts +13 -3
- package/dist/types/components/Business/forms/BusinessSelection/types.d.ts +0 -11
- package/dist/types/components/Business/forms/CompanyStructure/CompanyStructure.d.ts +3 -3
- package/dist/types/components/Business/forms/CompanyStructure/types.d.ts +0 -6
- package/dist/types/components/Business/forms/ProofOfDirectorDocument/ProofOfDirectorDocument.d.ts +1 -1
- package/dist/types/components/Business/forms/ProofOfDirectorDocument/types.d.ts +0 -3
- package/dist/types/components/Business/forms/ProofOfOwnershipDocument/ProofOfOwnershipDocument.d.ts +1 -1
- package/dist/types/components/Business/forms/ProofOfOwnershipDocument/types.d.ts +0 -3
- package/dist/types/components/Business/forms/ProofOfSignatoryDocument/ProofOfSignatoryDocument.d.ts +1 -1
- package/dist/types/components/Business/forms/ProofOfSignatoryDocument/types.d.ts +0 -3
- package/dist/types/components/Business/forms/RegistrationDocument/RegistrationDocument.d.ts +1 -1
- package/dist/types/components/Business/forms/RegistrationDocument/types.d.ts +3 -5
- package/dist/types/components/Business/forms/TaxDocument/TaxDocument.d.ts +1 -1
- package/dist/types/components/Business/forms/TaxDocument/types.d.ts +3 -5
- package/dist/types/components/Business/forms/forms.types.d.ts +0 -3
- package/dist/types/components/Business/forms/rules.d.ts +3 -1
- package/dist/types/components/Business/mapping/businessDetails/mapLegalEntityToBusinessDetailsSchema.d.ts +1 -2
- package/dist/types/components/Business/pages/RootBusinessDetailsPage.d.ts +1 -1
- package/dist/types/components/Business/tasks/BusinessDetailsDropin/BusinessDetailsDropin.d.ts +3 -3
- package/dist/types/components/Business/tasks/BusinessDetailsDropin/businessDetailsStore.d.ts +5 -4
- package/dist/types/components/Business/tasks/BusinessDetailsDropin/types.d.ts +16 -10
- package/dist/types/components/Business/tasks/BusinessDetailsDropin/utils.d.ts +26 -5
- 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 +31 -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/SctaField/SctaField.d.ts +2 -0
- package/dist/types/components/BusinessLines/fields/SctaField/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/SctaForm/SctaForm.d.ts +2 -0
- package/dist/types/components/BusinessLines/forms/SctaForm/SctaInfoModal.d.ts +3 -0
- package/dist/types/components/BusinessLines/forms/SctaForm/types.d.ts +2 -0
- package/dist/types/components/BusinessLines/forms/rules.d.ts +6 -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 +19 -0
- package/dist/types/components/BusinessLines/tasks/utils.d.ts +40 -0
- package/dist/types/components/BusinessLines/tasks/validate.d.ts +11 -0
- package/dist/types/components/Contract/hooks/useSalesChannels.d.ts +2 -0
- package/dist/types/components/Contract/tasks/ServiceAgreementDropin/ServiceAgreementDropin.d.ts +1 -1
- package/dist/types/components/Contract/tasks/ServiceAgreementDropin/types.d.ts +2 -2
- 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/Individual/PersonalDetails/types.d.ts +2 -0
- package/dist/types/components/Individual/forms/Individual/rules.d.ts +1 -1
- 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 +2 -2
- 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/FormFlow/FormFlow.d.ts +1 -1
- package/dist/types/components/Shared/FormFlow/FormFlow.types.d.ts +0 -2
- 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/IdFieldTypeSelector/countryIdNumberTypes.d.ts +1 -0
- 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/Link/Link.types.d.ts +1 -1
- package/dist/types/components/ui/atoms/ListItem/ListItem.d.ts +1 -2
- package/dist/types/components/ui/atoms/Loader/Loader.d.ts +1 -5
- package/dist/types/components/ui/atoms/Modal/MaybeModal.d.ts +1 -1
- 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 +10 -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 -23
- 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/business-financing/AdyenBusinessFinancing.d.ts +1 -0
- package/dist/types/embeds/business-financing/adyen-business-financing.types.d.ts +2 -0
- package/dist/types/hooks/singpass/useSingpassMyInfoLogin.d.ts +2 -6
- package/dist/types/hooks/{useAnalytics.d.ts → useAnalytics/useAnalytics.d.ts} +1 -7
- 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/formState.d.ts +2 -0
- package/dist/types/stores/globalStore/taskTypes.d.ts +1 -1
- package/dist/types/types/datasets/currency.d.ts +0 -1
- package/dist/types/types/form-rules.d.ts +3 -0
- package/dist/types/types/form.d.ts +0 -2
- 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/{trackNavigation.d.ts → analytics/trackNavigation.d.ts} +1 -1
- package/dist/types/utils/api/documentUtils.d.ts +1 -0
- package/dist/types/utils/customerSupportUtils.d.ts +3 -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/japanSupportUtils.d.ts +2 -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-BnnF5_7m.js +34 -0
- package/dist/{types-BZdZSp82.js → types-D0u3f6aG.js} +27 -4
- package/dist/{types-CAznNNSI.js → types-Dk94b8kx.js} +27 -26
- package/dist/{types-CX7rD7X4.js → types-sYQKhaSL.js} +2 -2
- package/dist/upload-BF65P4KM.js +17 -0
- package/dist/{useAssociatedLegalEntity-DD2ldSE1.js → useAssociatedLegalEntity-00JVCmQ7.js} +2 -2
- package/dist/useCreateLegalEntity-BvvwB9r0.js +31 -0
- package/dist/{useDataset-B8uRm9G9.js → useDataset-8WyOJBhU.js} +102 -2
- package/dist/{useForm-Bikkn7wR.js → useForm-DLxHtZTP.js} +16 -86
- package/dist/useGlobalData-D9dz7GIi.js +68 -0
- package/dist/{useMultiForm-BvLkXMC6.js → useMultiForm--sSlt50X.js} +4 -4
- package/dist/{useOnboardingStatus-CHvOF6oX.js → useOnboardingStatus-91zhqzLd.js} +2 -2
- package/dist/{useScenarios-uUD1GHMT.js → useScenarios-CqKpYbe_.js} +2 -2
- package/dist/{useTermsOfServiceStatus-_0VSQK9K.js → useTermsOfServiceStatus-DLQVpbik.js} +2 -2
- package/dist/{useToastContext-kLS15CCB.js → useToastContext-FI3dwzzs.js} +17 -8
- package/dist/{useUnincorporatedPartnershipMembers-pxytkrwW.js → useUnincorporatedPartnershipMembers-CdQDPlZq.js} +5 -5
- package/dist/useUpdateBusinessLines-BulhyPjH.js +46 -0
- package/dist/useUpdateLegalEntity-Q3Icdeo6.js +39 -0
- package/dist/utils-DQLhii3U.js +774 -0
- package/dist/{utils-BI6oHlaw.js → utils-DV0_GilJ.js} +6 -46
- package/dist/{validate-DGgXfXyg.js → validate-BD3wn-YX.js} +2 -2
- package/dist/validate-H-iE__-w.js +41 -0
- package/dist/{validationError-CpKFQv28.js → validationError-B5aoMbe_.js} +2 -2
- 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 +77 -78
- package/dist/4-people-CCqdlDEw.js +0 -24
- package/dist/BusinessDetailsDropin-Be1nkzWx.js +0 -5088
- package/dist/BusinessFinancingComponent-BiFxtiME.js +0 -45
- package/dist/BusinessFinancingPage-C_3W8tC9.js +0 -40
- package/dist/Card-D0gduObT.js +0 -145
- package/dist/Confirm-DyWhqxmU.js +0 -64
- package/dist/CreateIndividualComponent-9-TP2x1D.js +0 -72
- package/dist/CreateTransferInstrumentComponent-U_HRSoZx.js +0 -67
- package/dist/DecisionMakerDetailsPage-vWtfPycT.js +0 -100
- package/dist/DecisionMakers-2aN_F-vt.js +0 -591
- package/dist/Dropzone-Cp2PTdED.js +0 -218
- package/dist/FormFlow-C95V54gu.js +0 -216
- package/dist/InputDate-DX90XEmr.js +0 -43
- package/dist/InputGroup-WBfGDV5F.js +0 -32
- package/dist/Link-Bn9pt52z.js +0 -35
- package/dist/ManageIndividualComponent-C5Epqe2I.js +0 -47
- package/dist/ManageTermsOfServiceComponent-zcuZm98f.js +0 -47
- package/dist/OnboardingDropinComponent-BgFPF-FG.js +0 -4301
- package/dist/RadioGroup-htJh3Lz5.js +0 -143
- package/dist/RegistrationAddress-DiVxWv-x.js +0 -2334
- package/dist/RootBusinessDetailsPage-DNGDa-xd.js +0 -1870
- package/dist/RootIndividualDetailsPage-DyWuruIM.js +0 -77
- package/dist/SoleProprietorshipPage-CYz0fHew.js +0 -50
- package/dist/Spacer-BK3jDget.js +0 -18
- package/dist/StructuredList-DaepaiVE.js +0 -38
- package/dist/TaskItemStatus-lQuiqU1e.js +0 -125
- package/dist/TaskStatusIndicator-8ug09mhu.js +0 -69
- package/dist/TaxInformationField-BfyN5nzh.js +0 -3062
- package/dist/TileGroup-CTesI0Vt.js +0 -174
- package/dist/TrustDetailsPage-CjG99ca_.js +0 -1205
- package/dist/TrustMemberCompanyPage-CiA3B0Ro.js +0 -60
- package/dist/TrustMemberIndividualPage-J1-6IFlZ.js +0 -66
- package/dist/analytics-Cg99WKif.js +0 -61
- package/dist/bafinUtils-Sy6B6Lec.js +0 -457
- package/dist/bin-Bgdj6KzC.js +0 -18
- package/dist/capital-CF9_Ev99.js +0 -17
- package/dist/checkmark-circle-fill-BhvuqTl9.js +0 -17
- package/dist/circle-Dgfa7GUy.js +0 -17
- package/dist/coins-CFu331p2.js +0 -17
- package/dist/commonValidators-cnXbus2a.js +0 -24
- package/dist/currency-BGwQyxBo.js +0 -36
- package/dist/da-DK-BJ7aTPir.js +0 -13
- package/dist/da-DK-BTpZzEgA.js +0 -15
- 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-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-JI-7mvxy.js +0 -23
- package/dist/de-DE-wp5-H-ov.js +0 -30
- package/dist/document-person-DBlLin9u.js +0 -20
- package/dist/download-B8_c4ARV.js +0 -17
- 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-CAm3meB1.js +0 -30
- package/dist/en-US-CQ3angjM.js +0 -22
- package/dist/en-US-DHq7VYFs.js +0 -23
- package/dist/es-ES-BsQpwaPN.js +0 -58
- 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-DOVPTeyf.js +0 -23
- package/dist/es-ES-Ds3-DtqZ.js +0 -30
- package/dist/es-ES-WWftn3JX.js +0 -35
- package/dist/fi-FI-BJ9RzrL3.js +0 -58
- package/dist/fi-FI-BNcnKrJ9.js +0 -15
- 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-REYOX46I.js +0 -22
- package/dist/fieldConfigurations-kDKvJ6je.js +0 -458
- package/dist/formatCurrency-CMOSdJMB.js +0 -29
- package/dist/fr-FR-B5543Fe-.js +0 -13
- package/dist/fr-FR-Bn3D6mmY.js +0 -15
- 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/gift-SdNY6AqI.js +0 -14
- package/dist/headquarter-C6AsewcP.js +0 -21
- package/dist/image-eUqBiRX_.js +0 -17
- package/dist/info-Wao3PEQK.js +0 -21
- package/dist/isEmpty-C9y5I8Tl.js +0 -23
- package/dist/it-IT-BV9K87FK.js +0 -58
- 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-eCrTB65E.js +0 -30
- package/dist/keys-BpNgnAsD.js +0 -23
- package/dist/location-YXhcBMDy.js +0 -17
- package/dist/mail-Z_IE_hkw.js +0 -14
- package/dist/mapScriptLocalization-B4Be11Tx.js +0 -72
- package/dist/nl-NL-BHqiO21q.js +0 -15
- 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/partner-COG2_Erh.js +0 -21
- package/dist/pay-by-link-plane-Pv7Babgn.js +0 -22
- package/dist/person-CdGfItMU.js +0 -17
- 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-D2elvnDU.js +0 -15
- package/dist/pt-PT-Dk48OVtf.js +0 -22
- package/dist/pt-PT-N0njcfLO.js +0 -23
- package/dist/pt-PT-_o5xgnxS.js +0 -13
- package/dist/resolveEnvironment-Il1uuuaq.js +0 -84
- package/dist/revenue-accelerate-rtXA-8EE.js +0 -17
- package/dist/save-BofgDbDX.js +0 -14
- package/dist/search-BjMkvQh0.js +0 -17
- package/dist/sl-SI-BB7iVcFI.js +0 -22
- package/dist/sl-SI-BhVTSmhQ.js +0 -30
- 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/store-CkhgQMl0.js +0 -14
- package/dist/sv-SE-66rqYTxi.js +0 -30
- package/dist/sv-SE-BUfESAQK.js +0 -13
- 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-RPPT5Bll.js +0 -472
- package/dist/types/api/pciTemplate/usePciTemplate.d.ts +0 -14
- package/dist/types/components/Business/forms/AdditionalInformation/AdditionalInformationMultiform.d.ts +0 -9
- package/dist/types/components/Business/forms/BasicInformation/BasicInformationMultiform.d.ts +0 -9
- package/dist/types/components/Business/forms/BusinessDetails/BusinessDetails.d.ts +0 -3
- package/dist/types/components/Business/forms/BusinessSelection/BusinessSelectionMultiform.d.ts +0 -14
- package/dist/types/components/Business/forms/CompanyStructure/CompanyStructureMultiform.d.ts +0 -4
- package/dist/types/components/Business/tasks/BusinessDetailsMultiformDropin/BusinessDetailsMultiformDropin.d.ts +0 -5
- package/dist/types/components/Business/tasks/BusinessDetailsMultiformDropin/types.d.ts +0 -2
- package/dist/types/components/Business/tasks/BusinessDetailsMultiformDropin/utils.d.ts +0 -21
- 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/utils/bankVerification/animation.d.ts +0 -2
- package/dist/upload-XDhHhAHV.js +0 -17
- package/dist/useFormContext-beqGS11A.js +0 -23
- package/dist/utils-B7kcMyYW.js +0 -159
- package/dist/utils-DvAaNu7U.js +0 -29
- package/dist/validate-DxfuzxT4.js +0 -382
- package/dist/validate-Dz7xvgxq.js +0 -605
- 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/Business/tasks/{BusinessDetailsMultiformDropin → BusinessDetailsDropin}/validate.d.ts +0 -0
- /package/dist/types/components/BusinessLines/tasks/{BusinessLinesGettingStarted → BusinessLines}/BusinessLinesGettingStarted.d.ts +0 -0
|
@@ -0,0 +1,2359 @@
|
|
|
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] = "6bd99c14-1e9d-4878-bca1-7c53c4630e16", e._sentryDebugIdIdentifier = "sentry-dbid-6bd99c14-1e9d-4878-bca1-7c53c4630e16");
|
|
6
|
+
} catch (e) {
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
;
|
|
10
|
+
import { jsx, jsxs, Fragment } from "preact/jsx-runtime";
|
|
11
|
+
import { u as useTranslation, B as Button, G as Typography, C as CountryCodes, O as TaskTypes, r as LegalEntityTypes, W as isEmpty, a0 as entriesOf, bC as businessDetailsComponentsKeyMapping, bD as solePropBusinessDetailsKeyMapping, aj as objectsDeepEqual, ap as keysOf, i as isUndefinedOrNull, bE as solePropBusinessDetailsApiKeyMapping, bp as businessDetailsApiKeyMapping, P as createLogger, b8 as filterOutUnwantedAssociationsIfRootLE, b6 as drop, af as getOwnEntityAssociations, aV as doArraysMatch, b as useApiContext, a2 as useAnalyticsContext, a1 as useQueryClient, X as useExperimentsContext, o as useSettingsContext, K as useAccountHolder, bF as solePropBusinessDetailsDocumentMapping, bG as businessDetailsDocumentMapping } from "./StoreProvider-jtUYKLRz.js";
|
|
12
|
+
import { useState, useEffect, useMemo, useCallback } from "preact/hooks";
|
|
13
|
+
import { F as FinancialInformation, A as AdditionalInformation, C as CompanyStructure, B as BusinessSelection, h as BasicInformation, i as getDefaultRegistrationNumberType, j as getDefaultVatNumberType, o as operationalAddressIsSameIds, k as FIELDS_NEEDED_FOR_COMPANY_SEARCH, v as verifiedBusiness, l as isVerifiedSingleCompanySearchResult, m as companyTypeMetadata, p as documentFormsIds, r as registrationNumberDefaultFieldMetadata, q as inferCompanyRegistrationNumberType, s as registrationNumberDefaultFieldConfig, t as stockTickerSymbolFieldMetadata, w as stockISINFieldMetadata, x as stockExchangeMICFieldMetadata, y as dateOfIncorporationFieldMetadata, z as industryCodeFieldMetadata, D as eInvoicingCodeFieldMetadata, G as vatAbsenceReasonMetadata, H as exemptFromRegistrationNumberDefaultFieldMetadata, I as doingBusinessAsFieldMetadata, J as doingBusinessAsAbsentFieldMetadata, K as defaultFieldMetadata, L as defaultFieldConfig, M as defaultFieldMetadata$1, N as defaultFieldConfig$1, P as defaultFieldMetadataV4, Q as defaultFieldMetadata$2, R as defaultFieldConfigV4, S as defaultFieldConfig$2, g as getForms, T as useBusinessLines, U as financialInfoValidationWithEmployeesRules, V as tinMatched, W as businessMismatchModalOpen, X as useCompanySearch, Y as useVerifyTin, Z as handleCompanySelection, _ as applyVerifiedBusinessData } from "./OnboardingDropinComponent-D3dYF_4W.js";
|
|
14
|
+
import { u as useCreateBusinessLine, a as useUpdateBusinessLine } from "./useUpdateBusinessLines-BulhyPjH.js";
|
|
15
|
+
import { u as useCreateLegalEntity } from "./useCreateLegalEntity-BvvwB9r0.js";
|
|
16
|
+
import { u as useUpdateLegalEntity } from "./useUpdateLegalEntity-Q3Icdeo6.js";
|
|
17
|
+
import { F as FormContextProvider, a as FormFlow } from "./FormFlow-PppMJ6OA.js";
|
|
18
|
+
import { a as useToastContext } from "./useToastContext-FI3dwzzs.js";
|
|
19
|
+
import { c as composePerScenarioFormConfigurations, g as getPropsFromConfigurations } from "./process-field-configurations-N1jHgPa8.js";
|
|
20
|
+
import { a as addValidityToForms, u as useFormComposer } from "./dropinUtils-BK1u6OTG.js";
|
|
21
|
+
import { u as useMultiForm } from "./useMultiForm--sSlt50X.js";
|
|
22
|
+
import { m as mapExistingFile, g as getPageName, u as useScenarioConfiguration } from "./mapExistingFile-CqrlnmFQ.js";
|
|
23
|
+
import { a as datasetUtilities, C as Confirm } from "./useDataset-8WyOJBhU.js";
|
|
24
|
+
import { a as getDocument, c as createDocumentRequest, b as getFileExtention, d as documentApiUtils } from "./documentUtils-DIcRD9lR.js";
|
|
25
|
+
import { g as getFieldsWithExistingData } from "./getFieldsWithExistingData-DxCFyXNd.js";
|
|
26
|
+
import { f as formatCurrency, A as ALLOWED_SOF_SERVICES } from "./utils-DQLhii3U.js";
|
|
27
|
+
import { u as useFormContext, i as isDateOlderThanAYear, o as mapAddressLabels, p as getKeyForField } from "./Address-e41CN3CB.js";
|
|
28
|
+
import { _ as MemoizedDocumentUpload, C as CompanyTypesValues, l as COUNTRIES_USING_COMPANY_SEARCH, $ as isRegistrationNumberAbsentStateV4Scenario, B as isEmpty$1, a0 as COUNTRIES_THAT_USE_TAX_ID_INSTEAD_OF_VAT, r as requestingBanking, e as requestingIssuing, a as getCompanyRegistrationNumberOptions, t as taxInformationDefaultFieldMetadata, a1 as countryToTaxInfoTypeMap, f as taxInformationDefaultFieldConfig, a2 as rules } from "./IndividualOnfido-CmmyKC7J.js";
|
|
29
|
+
import { M as MemoizedConstitutionalDocument } from "./ConstitutionalDocument-CcwyClZ7.js";
|
|
30
|
+
import { M as Modal, a as ModalContent } from "./Modal-CJ_hgcGb.js";
|
|
31
|
+
import { b as mapAddressLocalizationToJpAddressSchema, a as mapApiScriptLocalizationToSchemaFields, m as mapSchemaFieldsToApiScriptLocalization } from "./mapAddressLocalizationToJpAddressSchema-vJWbpAyq.js";
|
|
32
|
+
import { m as mapFinancialReportsToFinancialInformation, a as mapFinancialInformationToFinancialReport } from "./mapFinancialReportsToFinancialInformation-ZmhVRj3f.js";
|
|
33
|
+
import { f as formatObject } from "./utils-DNSfZiio.js";
|
|
34
|
+
import { S as SettingNames } from "./InputText-BfL9DgWp.js";
|
|
35
|
+
import { m as mapJpAddressSchemaToAddressLocalizations, a as mapJpAddressSummary } from "./mapJpAddressSchemaToAddressLocalizations-D6HjhjJT.js";
|
|
36
|
+
import { o as organizationTypesToSkipCompanyStructureForm } from "./utils-DV0_GilJ.js";
|
|
37
|
+
import { s as summaryItem } from "./CountryField-CzRN1OE8.js";
|
|
38
|
+
import { s as summaryStep } from "./Summary-COehg8IT.js";
|
|
39
|
+
import { i as isValidationError, p as processValidationErrors, a as isMaintenanceModeError } from "./validationError-B5aoMbe_.js";
|
|
40
|
+
import { r as resolveFieldMetadata } from "./Spacer-D4I0f08n.js";
|
|
41
|
+
const stripWhitespace = (str) => str.replace(/\s/g, "");
|
|
42
|
+
const toNormalizedString = (s) => stripWhitespace(s.toLowerCase());
|
|
43
|
+
const isNormalizedStringMatch = (s1, s2) => toNormalizedString(s1) === toNormalizedString(s2);
|
|
44
|
+
const documentTypes$2 = [
|
|
45
|
+
{ id: "Internal company document", name: "internalCompanyDocument" },
|
|
46
|
+
{ id: "Business registry statement", name: "businessRegistryStatement" }
|
|
47
|
+
];
|
|
48
|
+
const GuidanceContent$4 = ({ t }) => {
|
|
49
|
+
return /* @__PURE__ */ jsx("div", { className: "adyen-kyc-upload-field__guidance", children: /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-u-margin-bottom-24", children: [
|
|
50
|
+
/* @__PURE__ */ jsx("strong", { children: t(($) => $["documentRequirements"], { ns: "common" }) }),
|
|
51
|
+
/* @__PURE__ */ jsxs("ul", { children: [
|
|
52
|
+
/* @__PURE__ */ jsx("li", { children: t(($) => $["includesTheDirectorsFullName"], { ns: "business" }) }),
|
|
53
|
+
/* @__PURE__ */ jsx("li", { children: t(($) => $["includesEvidenceOfTheIndividualsRole"], { ns: "business" }) }),
|
|
54
|
+
/* @__PURE__ */ jsx("li", { children: t(($) => $["issuedOrSignedByALegalRepresentative"], { ns: "business" }) })
|
|
55
|
+
] })
|
|
56
|
+
] }) });
|
|
57
|
+
};
|
|
58
|
+
function ProofOfDirectorDocument({ id, country, ...props }) {
|
|
59
|
+
const { t } = useTranslation(["common", "business"]);
|
|
60
|
+
const [selectedDocumentName, setSelectedDocumentName] = useState(documentTypes$2[0].id);
|
|
61
|
+
return /* @__PURE__ */ jsx(
|
|
62
|
+
MemoizedDocumentUpload,
|
|
63
|
+
{
|
|
64
|
+
...props,
|
|
65
|
+
id,
|
|
66
|
+
heading: t(($) => $["uploadYourOrganizationProofOfDirector"], { ns: "business" }),
|
|
67
|
+
description: t(($) => $["weNeedAnOfficialDocument"], { ns: "business" }),
|
|
68
|
+
documentField: "proofOfDirector",
|
|
69
|
+
documentType: "proofOfDirector",
|
|
70
|
+
guidanceContent: /* @__PURE__ */ jsx(GuidanceContent$4, { t }),
|
|
71
|
+
country,
|
|
72
|
+
hidePageCount: true,
|
|
73
|
+
documentTypeSelect: {
|
|
74
|
+
selectedType: selectedDocumentName,
|
|
75
|
+
setSelectedType: setSelectedDocumentName,
|
|
76
|
+
options: documentTypes$2
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
);
|
|
80
|
+
}
|
|
81
|
+
const DOC_TYPE_FOR_MULTI_UPLOAD = "Organizational chart and supporting document";
|
|
82
|
+
const documentTypes$1 = [
|
|
83
|
+
{ id: "Certified Organizational chart", name: "certifiedOrganizationalChart" },
|
|
84
|
+
{
|
|
85
|
+
id: "Organizational chart and supporting document",
|
|
86
|
+
name: "organizationalChartAndSupportingDocument"
|
|
87
|
+
}
|
|
88
|
+
];
|
|
89
|
+
const GuidanceContent$3 = ({
|
|
90
|
+
selectedDocumentName,
|
|
91
|
+
t
|
|
92
|
+
}) => {
|
|
93
|
+
const [showGuidanceModal, setShowGuidanceModal] = useState(false);
|
|
94
|
+
return /* @__PURE__ */ jsx("div", { className: "adyen-kyc-upload-field__guidance", children: /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-u-margin-bottom-24", children: [
|
|
95
|
+
/* @__PURE__ */ jsx("strong", { children: t(($) => $["documentRequirements"], { ns: "common" }) }),
|
|
96
|
+
selectedDocumentName === "Certified Organizational chart" ? /* @__PURE__ */ jsxs("ul", { children: [
|
|
97
|
+
/* @__PURE__ */ jsx("li", { children: t(($) => $["showsOwnershipAndControllingRelations"], { ns: "business" }) }),
|
|
98
|
+
/* @__PURE__ */ jsx("li", { children: t(($) => $["entitiesMustIncludeANameLegalStructureAndCountryRegionOfRegistration"], {
|
|
99
|
+
ns: "business"
|
|
100
|
+
}) }),
|
|
101
|
+
/* @__PURE__ */ jsx("li", { children: t(($) => $["signedByALawyerAccountantAuditorWithinTheLast6Months"], {
|
|
102
|
+
ns: "business"
|
|
103
|
+
}) })
|
|
104
|
+
] }) : /* @__PURE__ */ jsxs("ul", { children: [
|
|
105
|
+
/* @__PURE__ */ jsx("li", { children: t(($) => $["oneOrganizationalChartShowingOwnershipAndControllingRelations"], {
|
|
106
|
+
ns: "business"
|
|
107
|
+
}) }),
|
|
108
|
+
/* @__PURE__ */ jsxs("ul", { children: [
|
|
109
|
+
/* @__PURE__ */ jsx("li", { children: t(
|
|
110
|
+
($) => $["entitiesMustIncludeANameLegalStructureAndCountryRegionOfRegistration"],
|
|
111
|
+
{
|
|
112
|
+
ns: "business"
|
|
113
|
+
}
|
|
114
|
+
) }),
|
|
115
|
+
/* @__PURE__ */ jsxs("li", { children: [
|
|
116
|
+
/* @__PURE__ */ jsxs("span", { children: [
|
|
117
|
+
t(($) => $["one"], { ns: "common" }),
|
|
118
|
+
" "
|
|
119
|
+
] }),
|
|
120
|
+
/* @__PURE__ */ jsx(Button, { onClick: () => setShowGuidanceModal(true), variant: "link", children: t(($) => $["supportingDocument"], { ns: "common" }) }),
|
|
121
|
+
/* @__PURE__ */ jsxs("span", { children: [
|
|
122
|
+
" ",
|
|
123
|
+
t(($) => $["describingTheOrganizationAndItsUBOSignedWithinTheLast6Months"], {
|
|
124
|
+
ns: "business"
|
|
125
|
+
})
|
|
126
|
+
] })
|
|
127
|
+
] })
|
|
128
|
+
] })
|
|
129
|
+
] }),
|
|
130
|
+
showGuidanceModal && /* @__PURE__ */ jsx(
|
|
131
|
+
Modal,
|
|
132
|
+
{
|
|
133
|
+
size: "small",
|
|
134
|
+
onClose: () => setShowGuidanceModal(false),
|
|
135
|
+
ariaLabel: t(($) => $["whichDocumentsQualifyToProveOwnership"], { ns: "business" }),
|
|
136
|
+
children: /* @__PURE__ */ jsxs(ModalContent, { children: [
|
|
137
|
+
/* @__PURE__ */ jsx(
|
|
138
|
+
Typography,
|
|
139
|
+
{
|
|
140
|
+
el: "h1",
|
|
141
|
+
variant: "title-l",
|
|
142
|
+
className: "adyen-kyc-u-margin-bottom-32 adyen-kyc-u-margin-top-32",
|
|
143
|
+
children: t(($) => $["whichDocumentsQualifyToProveOwnership"], { ns: "business" })
|
|
144
|
+
}
|
|
145
|
+
),
|
|
146
|
+
/* @__PURE__ */ jsx(Typography, { el: "p", variant: "body", children: t(($) => $["theDocumentsWeCanAcceptToProveOwnershipAre"], { ns: "business" }) }),
|
|
147
|
+
/* @__PURE__ */ jsxs("ul", { children: [
|
|
148
|
+
/* @__PURE__ */ jsx("li", { children: t(($) => $["securitiesRegister"], { ns: "business" }) }),
|
|
149
|
+
/* @__PURE__ */ jsx("li", { children: t(($) => $["shareholderRegister"], { ns: "business" }) }),
|
|
150
|
+
/* @__PURE__ */ jsx("li", { children: t(($) => $["ultimateBeneficialOwnerRegister"], { ns: "business" }) }),
|
|
151
|
+
/* @__PURE__ */ jsx("li", { children: t(($) => $["articlesOfIncorporation"], { ns: "business" }) }),
|
|
152
|
+
/* @__PURE__ */ jsx("li", { children: t(($) => $["annualReports"], { ns: "business" }) }),
|
|
153
|
+
/* @__PURE__ */ jsx("li", { children: t(($) => $["annualReturns"], { ns: "business" }) }),
|
|
154
|
+
/* @__PURE__ */ jsx("li", { children: t(($) => $["certificateOfCorporateStatus"], { ns: "business" }) }),
|
|
155
|
+
/* @__PURE__ */ jsx("li", { children: t(($) => $["shareholderAgreements"], { ns: "business" }) }),
|
|
156
|
+
/* @__PURE__ */ jsx("li", { children: t(($) => $["assignmentAgreements"], { ns: "business" }) }),
|
|
157
|
+
/* @__PURE__ */ jsx("li", { children: t(($) => $["partnershipAgreements"], { ns: "business" }) }),
|
|
158
|
+
/* @__PURE__ */ jsx("li", { children: t(($) => $["boardOfDirectorsMeetingRecords"], { ns: "business" }) }),
|
|
159
|
+
/* @__PURE__ */ jsx("li", { children: t(($) => $["registrationDocument"], { ns: "business" }) }),
|
|
160
|
+
/* @__PURE__ */ jsx("li", { children: t(($) => $["certificateOfIncumbency"], { ns: "business" }) })
|
|
161
|
+
] })
|
|
162
|
+
] })
|
|
163
|
+
}
|
|
164
|
+
)
|
|
165
|
+
] }) });
|
|
166
|
+
};
|
|
167
|
+
function ProofOfOwnershipDocument({ id, country, ...props }) {
|
|
168
|
+
const { t } = useTranslation(["common", "business"]);
|
|
169
|
+
const [selectedDocumentName, setSelectedDocumentName] = useState(documentTypes$1[0].id);
|
|
170
|
+
const supportsMultiple = selectedDocumentName === DOC_TYPE_FOR_MULTI_UPLOAD;
|
|
171
|
+
useEffect(() => {
|
|
172
|
+
if (props.data?.proofOfOwnership?.length === 2) {
|
|
173
|
+
setSelectedDocumentName(DOC_TYPE_FOR_MULTI_UPLOAD);
|
|
174
|
+
}
|
|
175
|
+
}, [props.data?.proofOfOwnership]);
|
|
176
|
+
return /* @__PURE__ */ jsx(
|
|
177
|
+
MemoizedDocumentUpload,
|
|
178
|
+
{
|
|
179
|
+
...props,
|
|
180
|
+
id,
|
|
181
|
+
heading: t(($) => $["uploadYourOrganizationProofOfOwnership"], { ns: "business" }),
|
|
182
|
+
description: t(($) => $["weNeedAnOfficialDocumentForOwnership"], { ns: "business" }),
|
|
183
|
+
documentField: "proofOfOwnership",
|
|
184
|
+
documentType: "proofOfOwnership",
|
|
185
|
+
guidanceContent: /* @__PURE__ */ jsx(GuidanceContent$3, { selectedDocumentName, t }),
|
|
186
|
+
country,
|
|
187
|
+
label: t(($) => $["uploadYourDocuments"], { ns: "business" }),
|
|
188
|
+
documentTypeSelect: {
|
|
189
|
+
selectedType: selectedDocumentName,
|
|
190
|
+
setSelectedType: setSelectedDocumentName,
|
|
191
|
+
options: documentTypes$1
|
|
192
|
+
},
|
|
193
|
+
hidePageCount: true,
|
|
194
|
+
supportsMultipleUploads: supportsMultiple,
|
|
195
|
+
maxNumberOfFiles: supportsMultiple ? 2 : 1,
|
|
196
|
+
extraDropzoneDescription: supportsMultiple ? t(($) => $["oneOrganizationalChartAndOneSupportingDocument"], { ns: "business" }) : void 0
|
|
197
|
+
}
|
|
198
|
+
);
|
|
199
|
+
}
|
|
200
|
+
const documentTypes = [
|
|
201
|
+
{ id: "Trade registry document", name: "tradeRegistryDocument" },
|
|
202
|
+
{ id: "Internal company document", name: "internalCompanyDocument" }
|
|
203
|
+
];
|
|
204
|
+
const GuidanceContent$2 = ({ t }) => {
|
|
205
|
+
return /* @__PURE__ */ jsx("div", { className: "adyen-kyc-upload-field__guidance", children: /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-u-margin-bottom-24", children: [
|
|
206
|
+
/* @__PURE__ */ jsx("strong", { children: t(($) => $["documentRequirements"], { ns: "common" }) }),
|
|
207
|
+
/* @__PURE__ */ jsxs("ul", { children: [
|
|
208
|
+
/* @__PURE__ */ jsx("li", { children: t(($) => $["includesTheSignatorysFullName"], { ns: "business" }) }),
|
|
209
|
+
/* @__PURE__ */ jsx("li", { children: t(($) => $["includesEvidenceOfTheIndividualsRoleSignatory"], { ns: "business" }) }),
|
|
210
|
+
/* @__PURE__ */ jsx("li", { children: t(($) => $["issuedOrSignedByALegalRepresentative"], { ns: "business" }) })
|
|
211
|
+
] })
|
|
212
|
+
] }) });
|
|
213
|
+
};
|
|
214
|
+
function ProofOfSignatoryDocument({ id, country, ...props }) {
|
|
215
|
+
const { t } = useTranslation(["common", "business"]);
|
|
216
|
+
const [selectedDocumentName, setSelectedDocumentName] = useState(documentTypes[0].id);
|
|
217
|
+
return /* @__PURE__ */ jsx(
|
|
218
|
+
MemoizedDocumentUpload,
|
|
219
|
+
{
|
|
220
|
+
...props,
|
|
221
|
+
id,
|
|
222
|
+
heading: t(($) => $["uploadYourOrganizationProofOfSignatory"], { ns: "business" }),
|
|
223
|
+
description: t(($) => $["weNeedAnOfficialDocumentSignatory"], { ns: "business" }),
|
|
224
|
+
documentField: "proofOfSignatory",
|
|
225
|
+
documentType: "proofOfSignatory",
|
|
226
|
+
guidanceContent: /* @__PURE__ */ jsx(GuidanceContent$2, { t }),
|
|
227
|
+
country,
|
|
228
|
+
hidePageCount: true,
|
|
229
|
+
documentTypeSelect: {
|
|
230
|
+
selectedType: selectedDocumentName,
|
|
231
|
+
setSelectedType: setSelectedDocumentName,
|
|
232
|
+
options: documentTypes
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
);
|
|
236
|
+
}
|
|
237
|
+
const ACCEPTED_DOCUMENTS_MAP$1 = {
|
|
238
|
+
[CountryCodes.PuertoRico]: {
|
|
239
|
+
// should exactly match CountryCodes.UnitedStates
|
|
240
|
+
[CompanyTypesValues.PRIVATE_COMPANY]: {
|
|
241
|
+
header: "acceptedDocumentsForPrivateCompanies",
|
|
242
|
+
documents: [
|
|
243
|
+
"certificateOfIncorporation",
|
|
244
|
+
"certificateOfFormation",
|
|
245
|
+
"secretaryOfStateFiling__PR"
|
|
246
|
+
]
|
|
247
|
+
},
|
|
248
|
+
[CompanyTypesValues.PUBLIC_COMPANY]: {
|
|
249
|
+
header: "acceptedDocumentsForPublicCompanies",
|
|
250
|
+
documents: ["certificateOfIncorporation", "certificateOfFormation"]
|
|
251
|
+
},
|
|
252
|
+
[CompanyTypesValues.UNLISTED_PUBLIC_COMPANY]: {
|
|
253
|
+
header: "acceptedDocumentsForPublicCompanies",
|
|
254
|
+
documents: ["certificateOfIncorporation", "certificateOfFormation"]
|
|
255
|
+
},
|
|
256
|
+
[CompanyTypesValues.GOVERNMENTAL_ORGANIZATION]: {
|
|
257
|
+
header: "acceptedDocumentsForGovernment",
|
|
258
|
+
documents: ["charter"]
|
|
259
|
+
},
|
|
260
|
+
[CompanyTypesValues.NON_PROFIT_OR_CHARITABLE]: {
|
|
261
|
+
header: "acceptedDocumentsForNonProfit",
|
|
262
|
+
documents: [
|
|
263
|
+
"articlesOfIncorporation",
|
|
264
|
+
"meetingRecords",
|
|
265
|
+
"secretaryOfStateRegDoc__PR",
|
|
266
|
+
"certificateOfIncumbency"
|
|
267
|
+
]
|
|
268
|
+
},
|
|
269
|
+
[CompanyTypesValues.INCORPORATED_PARTNERSHIP]: {
|
|
270
|
+
header: "acceptedDocumentsForPartnerships",
|
|
271
|
+
documents: ["partnerShipAgreement", "secretaryOfStateFiling__PR"]
|
|
272
|
+
}
|
|
273
|
+
},
|
|
274
|
+
[CountryCodes.UnitedStates]: {
|
|
275
|
+
[CompanyTypesValues.PRIVATE_COMPANY]: {
|
|
276
|
+
header: "acceptedDocumentsForPrivateCompanies",
|
|
277
|
+
documents: ["certificateOfIncorporation", "certificateOfFormation", "secretaryOfStateFiling"]
|
|
278
|
+
},
|
|
279
|
+
[CompanyTypesValues.PUBLIC_COMPANY]: {
|
|
280
|
+
header: "acceptedDocumentsForPublicCompanies",
|
|
281
|
+
documents: ["certificateOfIncorporation", "certificateOfFormation"]
|
|
282
|
+
},
|
|
283
|
+
[CompanyTypesValues.UNLISTED_PUBLIC_COMPANY]: {
|
|
284
|
+
header: "acceptedDocumentsForPublicCompanies",
|
|
285
|
+
documents: ["certificateOfIncorporation", "certificateOfFormation"]
|
|
286
|
+
},
|
|
287
|
+
[CompanyTypesValues.GOVERNMENTAL_ORGANIZATION]: {
|
|
288
|
+
header: "acceptedDocumentsForGovernment",
|
|
289
|
+
documents: ["charter"]
|
|
290
|
+
},
|
|
291
|
+
[CompanyTypesValues.NON_PROFIT_OR_CHARITABLE]: {
|
|
292
|
+
header: "acceptedDocumentsForNonProfit",
|
|
293
|
+
documents: [
|
|
294
|
+
"articlesOfIncorporation",
|
|
295
|
+
"meetingRecords",
|
|
296
|
+
"secretaryOfStateRegDoc",
|
|
297
|
+
"certificateOfIncumbency"
|
|
298
|
+
]
|
|
299
|
+
},
|
|
300
|
+
[CompanyTypesValues.INCORPORATED_PARTNERSHIP]: {
|
|
301
|
+
header: "acceptedDocumentsForPartnerships",
|
|
302
|
+
documents: ["partnerShipAgreement", "secretaryOfStateFiling"]
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
};
|
|
306
|
+
const GuidanceContent$1 = ({
|
|
307
|
+
country,
|
|
308
|
+
companyType,
|
|
309
|
+
t
|
|
310
|
+
}) => {
|
|
311
|
+
const acceptedDocGuidance = ACCEPTED_DOCUMENTS_MAP$1[country]?.[companyType];
|
|
312
|
+
return /* @__PURE__ */ jsx("div", { className: "adyen-kyc-upload-field__guidance", children: country === "US" ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
313
|
+
acceptedDocGuidance && /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-u-margin-bottom-24", children: [
|
|
314
|
+
/* @__PURE__ */ jsx("strong", { children: t(($) => $[acceptedDocGuidance.header], { ns: "business" }) }),
|
|
315
|
+
/* @__PURE__ */ jsx("ul", { children: acceptedDocGuidance.documents.map((document, i) => /* @__PURE__ */ jsx("li", { children: t(($) => $[document], { ns: "business" }) }, i)) })
|
|
316
|
+
] }),
|
|
317
|
+
/* @__PURE__ */ jsxs("div", { className: "adyen-kyc-u-margin-bottom-24", children: [
|
|
318
|
+
/* @__PURE__ */ jsx("strong", { children: t(($) => $["documentRequirements"], { ns: "common" }) }),
|
|
319
|
+
/* @__PURE__ */ jsx("ul", { children: /* @__PURE__ */ jsx("li", { children: t(($) => $["includesLegalCompanyName"], { ns: "business" }) }) })
|
|
320
|
+
] })
|
|
321
|
+
] }) : /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-u-margin-bottom-24", children: [
|
|
322
|
+
/* @__PURE__ */ jsx("strong", { children: t(($) => $["documentRequirements"], { ns: "common" }) }),
|
|
323
|
+
/* @__PURE__ */ jsx("ul", { children: /* @__PURE__ */ jsx("li", { children: t(($) => $["documentIssuedByGovernmentAuthority"], { ns: "business" }) }) })
|
|
324
|
+
] }) });
|
|
325
|
+
};
|
|
326
|
+
function RegistrationDocument({
|
|
327
|
+
id,
|
|
328
|
+
country,
|
|
329
|
+
companyType = CompanyTypesValues.PRIVATE_COMPANY,
|
|
330
|
+
...props
|
|
331
|
+
}) {
|
|
332
|
+
const { t } = useTranslation(["common", "business"]);
|
|
333
|
+
return /* @__PURE__ */ jsx(
|
|
334
|
+
MemoizedDocumentUpload,
|
|
335
|
+
{
|
|
336
|
+
...props,
|
|
337
|
+
id,
|
|
338
|
+
heading: t(($) => $["companyRegistrationDocumentFormHeading"], { ns: "business" }),
|
|
339
|
+
description: t(($) => $["companyRegistrationDocumentFormDescription"], { ns: "business" }),
|
|
340
|
+
documentField: "registrationDocument",
|
|
341
|
+
documentType: "registrationDocument",
|
|
342
|
+
guidanceContent: /* @__PURE__ */ jsx(GuidanceContent$1, { country, companyType, t }),
|
|
343
|
+
companyType,
|
|
344
|
+
country,
|
|
345
|
+
hidePageCount: true
|
|
346
|
+
}
|
|
347
|
+
);
|
|
348
|
+
}
|
|
349
|
+
const ACCEPTED_DOCUMENTS_MAP = {
|
|
350
|
+
[CountryCodes.PuertoRico]: {
|
|
351
|
+
// should exactly match CountryCodes.UnitedStates
|
|
352
|
+
[CompanyTypesValues.PRIVATE_COMPANY]: {
|
|
353
|
+
header: "acceptedDocumentsForPrivateCompanies",
|
|
354
|
+
documents: ["irsCP575"]
|
|
355
|
+
},
|
|
356
|
+
[CompanyTypesValues.PUBLIC_COMPANY]: {
|
|
357
|
+
header: "acceptedDocumentsForPublicCompanies",
|
|
358
|
+
documents: ["annualReport", "secForm10k"]
|
|
359
|
+
},
|
|
360
|
+
[CompanyTypesValues.UNLISTED_PUBLIC_COMPANY]: {
|
|
361
|
+
header: "acceptedDocumentsForPublicCompanies",
|
|
362
|
+
documents: ["annualReport", "secForm10k"]
|
|
363
|
+
},
|
|
364
|
+
[CompanyTypesValues.NON_PROFIT_OR_CHARITABLE]: {
|
|
365
|
+
header: "acceptedDocumentsForNonProfit",
|
|
366
|
+
documents: ["annualReport"]
|
|
367
|
+
},
|
|
368
|
+
[CompanyTypesValues.INCORPORATED_PARTNERSHIP]: {
|
|
369
|
+
header: "acceptedDocumentsForPartnerships",
|
|
370
|
+
documents: ["irsScheduleK1"]
|
|
371
|
+
}
|
|
372
|
+
},
|
|
373
|
+
[CountryCodes.UnitedStates]: {
|
|
374
|
+
[CompanyTypesValues.PRIVATE_COMPANY]: {
|
|
375
|
+
header: "acceptedDocumentsForPrivateCompanies",
|
|
376
|
+
documents: ["irsCP575"]
|
|
377
|
+
},
|
|
378
|
+
[CompanyTypesValues.PUBLIC_COMPANY]: {
|
|
379
|
+
header: "acceptedDocumentsForPublicCompanies",
|
|
380
|
+
documents: ["annualReport", "secForm10k"]
|
|
381
|
+
},
|
|
382
|
+
[CompanyTypesValues.UNLISTED_PUBLIC_COMPANY]: {
|
|
383
|
+
header: "acceptedDocumentsForPublicCompanies",
|
|
384
|
+
documents: ["annualReport", "secForm10k"]
|
|
385
|
+
},
|
|
386
|
+
[CompanyTypesValues.NON_PROFIT_OR_CHARITABLE]: {
|
|
387
|
+
header: "acceptedDocumentsForNonProfit",
|
|
388
|
+
documents: ["annualReport"]
|
|
389
|
+
},
|
|
390
|
+
[CompanyTypesValues.INCORPORATED_PARTNERSHIP]: {
|
|
391
|
+
header: "acceptedDocumentsForPartnerships",
|
|
392
|
+
documents: ["irsScheduleK1"]
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
};
|
|
396
|
+
const GuidanceContent = ({
|
|
397
|
+
country,
|
|
398
|
+
companyType
|
|
399
|
+
}) => {
|
|
400
|
+
const { t } = useTranslation(["common", "business"]);
|
|
401
|
+
const acceptedDocGuidance = ACCEPTED_DOCUMENTS_MAP[country]?.[companyType];
|
|
402
|
+
return /* @__PURE__ */ jsx("div", { className: "adyen-kyc-upload-field__guidance", children: country === "US" ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
403
|
+
acceptedDocGuidance && /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-u-margin-bottom-24", children: [
|
|
404
|
+
/* @__PURE__ */ jsx("strong", { children: t(($) => $[acceptedDocGuidance.header], { ns: "business" }) }),
|
|
405
|
+
/* @__PURE__ */ jsx("ul", { children: acceptedDocGuidance.documents.map((document, i) => /* @__PURE__ */ jsx("li", { children: t(($) => $[document], { ns: "business" }) }, i)) })
|
|
406
|
+
] }),
|
|
407
|
+
/* @__PURE__ */ jsxs("div", { className: "adyen-kyc-u-margin-bottom-24", children: [
|
|
408
|
+
/* @__PURE__ */ jsx("strong", { children: t(($) => $["documentRequirements"], { ns: "common" }) }),
|
|
409
|
+
/* @__PURE__ */ jsxs("ul", { children: [
|
|
410
|
+
/* @__PURE__ */ jsx("li", { children: t(($) => $["includesLegalCompanyName"], { ns: "business" }) }),
|
|
411
|
+
/* @__PURE__ */ jsx("li", { children: t(($) => $["includesEIN"], { ns: "business" }) })
|
|
412
|
+
] })
|
|
413
|
+
] })
|
|
414
|
+
] }) : /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-u-margin-bottom-24", children: [
|
|
415
|
+
/* @__PURE__ */ jsx("div", { className: "adyen-kyc-upload-field__subtitle", children: t(($) => $["documentRequirements"], { ns: "common" }) }),
|
|
416
|
+
/* @__PURE__ */ jsxs("ul", { children: [
|
|
417
|
+
/* @__PURE__ */ jsx("li", { children: t(($) => $["containsNameOfCompany"], { ns: "business" }) }),
|
|
418
|
+
/* @__PURE__ */ jsx("li", { children: t(($) => $["documentShowsTaxIdOfCompany"], { ns: "business" }) }),
|
|
419
|
+
/* @__PURE__ */ jsx("li", { children: t(($) => $["issuedByTheTaxAuthority"], { ns: "business" }) })
|
|
420
|
+
] })
|
|
421
|
+
] }) });
|
|
422
|
+
};
|
|
423
|
+
function TaxDocument({
|
|
424
|
+
id,
|
|
425
|
+
country,
|
|
426
|
+
companyType = CompanyTypesValues.PRIVATE_COMPANY,
|
|
427
|
+
...props
|
|
428
|
+
}) {
|
|
429
|
+
const { t } = useTranslation("business");
|
|
430
|
+
return /* @__PURE__ */ jsx(
|
|
431
|
+
MemoizedDocumentUpload,
|
|
432
|
+
{
|
|
433
|
+
...props,
|
|
434
|
+
id,
|
|
435
|
+
heading: t(($) => $["companyTaxDocumentFormHeading"]),
|
|
436
|
+
description: t(($) => $["companyTaxDocumentFormDescription"]),
|
|
437
|
+
documentField: "taxDocument",
|
|
438
|
+
documentType: "proofOfOrganizationTaxInfo",
|
|
439
|
+
guidanceContent: /* @__PURE__ */ jsx(GuidanceContent, { country, companyType }),
|
|
440
|
+
companyType,
|
|
441
|
+
country,
|
|
442
|
+
hidePageCount: true
|
|
443
|
+
}
|
|
444
|
+
);
|
|
445
|
+
}
|
|
446
|
+
function BusinessDetailsMultiform({
|
|
447
|
+
taskType,
|
|
448
|
+
country,
|
|
449
|
+
activeForm,
|
|
450
|
+
shouldValidate,
|
|
451
|
+
problems = {},
|
|
452
|
+
handleNextClick,
|
|
453
|
+
handleBackClick,
|
|
454
|
+
setLoadingStatus,
|
|
455
|
+
isTopLevelEntity
|
|
456
|
+
}) {
|
|
457
|
+
const { t } = useTranslation(["common", "business"]);
|
|
458
|
+
const { form } = useFormContext();
|
|
459
|
+
const companyType = taskType === TaskTypes.SOLE_PROPRIETOR_COMPANY ? CompanyTypesValues.SOLE_PROPRIETORSHIP : form.data.companyStructure?.entityType;
|
|
460
|
+
function handleChange(formName, fieldName, mode) {
|
|
461
|
+
return form.handleChangeFor(fieldName, formName, mode);
|
|
462
|
+
}
|
|
463
|
+
const renderActiveForm = (activeForm2) => {
|
|
464
|
+
switch (activeForm2.formId) {
|
|
465
|
+
case "basicInformation":
|
|
466
|
+
return /* @__PURE__ */ jsx(
|
|
467
|
+
BasicInformation,
|
|
468
|
+
{
|
|
469
|
+
id: activeForm2.formId,
|
|
470
|
+
country,
|
|
471
|
+
shouldValidate,
|
|
472
|
+
validationErrors: problems.validationErrors?.[activeForm2.formId],
|
|
473
|
+
verificationErrors: problems.verificationErrors?.[activeForm2.formId],
|
|
474
|
+
companyType,
|
|
475
|
+
isTopLevelEntity,
|
|
476
|
+
disableCountry: taskType === TaskTypes.SOLE_PROPRIETOR_COMPANY
|
|
477
|
+
}
|
|
478
|
+
);
|
|
479
|
+
case "businessSelection":
|
|
480
|
+
return /* @__PURE__ */ jsx(
|
|
481
|
+
BusinessSelection,
|
|
482
|
+
{
|
|
483
|
+
id: activeForm2.formId,
|
|
484
|
+
country,
|
|
485
|
+
shouldValidate,
|
|
486
|
+
validationErrors: problems.validationErrors?.[activeForm2.formId],
|
|
487
|
+
verificationErrors: problems.verificationErrors?.[activeForm2.formId],
|
|
488
|
+
handleNextClick,
|
|
489
|
+
handleBackClick,
|
|
490
|
+
setLoadingStatus
|
|
491
|
+
}
|
|
492
|
+
);
|
|
493
|
+
case "companyStructure":
|
|
494
|
+
return /* @__PURE__ */ jsx(
|
|
495
|
+
CompanyStructure,
|
|
496
|
+
{
|
|
497
|
+
id: activeForm2.formId,
|
|
498
|
+
country,
|
|
499
|
+
shouldValidate,
|
|
500
|
+
validationErrors: problems.validationErrors?.[activeForm2.formId],
|
|
501
|
+
verificationErrors: problems.verificationErrors?.[activeForm2.formId]
|
|
502
|
+
}
|
|
503
|
+
);
|
|
504
|
+
case "additionalInformation":
|
|
505
|
+
return /* @__PURE__ */ jsx(
|
|
506
|
+
AdditionalInformation,
|
|
507
|
+
{
|
|
508
|
+
id: activeForm2.formId,
|
|
509
|
+
country,
|
|
510
|
+
companyType,
|
|
511
|
+
shouldValidate,
|
|
512
|
+
validationErrors: problems.validationErrors?.[activeForm2.formId],
|
|
513
|
+
verificationErrors: problems.verificationErrors?.[activeForm2.formId]
|
|
514
|
+
}
|
|
515
|
+
);
|
|
516
|
+
case "companyTaxDocument":
|
|
517
|
+
return country === "US" ? /* @__PURE__ */ jsx(
|
|
518
|
+
TaxDocument,
|
|
519
|
+
{
|
|
520
|
+
id: activeForm2.formId,
|
|
521
|
+
country,
|
|
522
|
+
companyType,
|
|
523
|
+
shouldValidate,
|
|
524
|
+
fieldValidationErrors: problems.validationErrors?.[activeForm2.formId] ?? {},
|
|
525
|
+
formVerificationErrors: problems.verificationErrors?.[activeForm2.formId] ?? {},
|
|
526
|
+
data: form.data.companyTaxDocument,
|
|
527
|
+
errors: form.errors.companyTaxDocument,
|
|
528
|
+
valid: form.valid.companyTaxDocument,
|
|
529
|
+
allFields: form.allFields?.companyTaxDocument,
|
|
530
|
+
requiredFields: form.requiredFields?.companyTaxDocument,
|
|
531
|
+
optionalFields: form.optionalFields?.companyTaxDocument,
|
|
532
|
+
trustedFields: form.trustedFields?.companyTaxDocument,
|
|
533
|
+
handleFieldChange: () => handleChange("companyTaxDocument", "taxDocument")
|
|
534
|
+
}
|
|
535
|
+
) : /* @__PURE__ */ jsx(
|
|
536
|
+
MemoizedDocumentUpload,
|
|
537
|
+
{
|
|
538
|
+
id: activeForm2.formId,
|
|
539
|
+
country,
|
|
540
|
+
companyType,
|
|
541
|
+
shouldValidate,
|
|
542
|
+
heading: t(($) => $["companyTaxDocumentFormHeading"], { ns: "business" }),
|
|
543
|
+
description: t(($) => $["companyTaxDocumentFormDescription"], { ns: "business" }),
|
|
544
|
+
fieldValidationErrors: problems.validationErrors?.[activeForm2.formId] ?? {},
|
|
545
|
+
formVerificationErrors: problems.verificationErrors?.[activeForm2.formId] ?? {},
|
|
546
|
+
data: form.data.companyTaxDocument,
|
|
547
|
+
errors: form.errors.companyTaxDocument,
|
|
548
|
+
valid: form.valid.companyTaxDocument,
|
|
549
|
+
allFields: form.allFields?.companyTaxDocument,
|
|
550
|
+
requiredFields: form.requiredFields?.companyTaxDocument,
|
|
551
|
+
optionalFields: form.optionalFields?.companyTaxDocument,
|
|
552
|
+
trustedFields: form.trustedFields?.companyTaxDocument,
|
|
553
|
+
handleFieldChange: () => handleChange("companyTaxDocument", "taxDocument"),
|
|
554
|
+
documentField: "taxDocument",
|
|
555
|
+
documentType: "vatDocument",
|
|
556
|
+
hidePageCount: true,
|
|
557
|
+
guidanceContent: /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-u-margin-bottom-24", children: [
|
|
558
|
+
/* @__PURE__ */ jsxs("div", { className: "adyen-kyc-upload-field__subtitle", children: [
|
|
559
|
+
" ",
|
|
560
|
+
t(($) => $["requirements"], { ns: "common" })
|
|
561
|
+
] }),
|
|
562
|
+
/* @__PURE__ */ jsxs("ul", { children: [
|
|
563
|
+
/* @__PURE__ */ jsx("li", { children: t(($) => $["containsNameOfCompany"], { ns: "business" }) }),
|
|
564
|
+
/* @__PURE__ */ jsx("li", { children: t(($) => $["documentShowsTaxIdOfCompany"], { ns: "business" }) }),
|
|
565
|
+
/* @__PURE__ */ jsx("li", { children: t(($) => $["issuedByTheTaxAuthority"], { ns: "business" }) })
|
|
566
|
+
] })
|
|
567
|
+
] })
|
|
568
|
+
}
|
|
569
|
+
);
|
|
570
|
+
case "companyRegistrationDocument":
|
|
571
|
+
return /* @__PURE__ */ jsx(
|
|
572
|
+
RegistrationDocument,
|
|
573
|
+
{
|
|
574
|
+
id: activeForm2.formId,
|
|
575
|
+
country,
|
|
576
|
+
companyType,
|
|
577
|
+
data: form.data.companyRegistrationDocument,
|
|
578
|
+
errors: form.errors.companyRegistrationDocument,
|
|
579
|
+
valid: form.valid.companyRegistrationDocument,
|
|
580
|
+
allFields: form.allFields?.companyRegistrationDocument,
|
|
581
|
+
requiredFields: form.requiredFields?.companyRegistrationDocument,
|
|
582
|
+
optionalFields: form.optionalFields?.companyRegistrationDocument,
|
|
583
|
+
trustedFields: form.trustedFields?.companyRegistrationDocument,
|
|
584
|
+
handleFieldChange: () => handleChange("companyRegistrationDocument", "registrationDocument"),
|
|
585
|
+
shouldValidate,
|
|
586
|
+
fieldValidationErrors: problems.validationErrors?.[activeForm2.formId] ?? {},
|
|
587
|
+
formVerificationErrors: problems.verificationErrors?.[activeForm2.formId] ?? {}
|
|
588
|
+
}
|
|
589
|
+
);
|
|
590
|
+
case "companyProofOfDirectorDocument":
|
|
591
|
+
return /* @__PURE__ */ jsx(
|
|
592
|
+
ProofOfDirectorDocument,
|
|
593
|
+
{
|
|
594
|
+
id: activeForm2.formId,
|
|
595
|
+
country,
|
|
596
|
+
data: form.data?.companyProofOfDirectorDocument,
|
|
597
|
+
errors: form.errors.companyProofOfDirectorDocument,
|
|
598
|
+
valid: form.valid.companyProofOfDirectorDocument,
|
|
599
|
+
allFields: form.allFields?.companyProofOfDirectorDocument,
|
|
600
|
+
requiredFields: form.requiredFields?.companyProofOfDirectorDocument,
|
|
601
|
+
optionalFields: form.optionalFields?.companyProofOfDirectorDocument,
|
|
602
|
+
trustedFields: form.trustedFields?.companyProofOfDirectorDocument,
|
|
603
|
+
handleFieldChange: () => handleChange("companyProofOfDirectorDocument", "proofOfDirector"),
|
|
604
|
+
shouldValidate,
|
|
605
|
+
fieldValidationErrors: problems.validationErrors?.[activeForm2.formId] ?? {},
|
|
606
|
+
formVerificationErrors: problems.verificationErrors?.[activeForm2.formId] ?? {}
|
|
607
|
+
}
|
|
608
|
+
);
|
|
609
|
+
case "companyProofOfSignatoryDocument":
|
|
610
|
+
return /* @__PURE__ */ jsx(
|
|
611
|
+
ProofOfSignatoryDocument,
|
|
612
|
+
{
|
|
613
|
+
id: activeForm2.formId,
|
|
614
|
+
country,
|
|
615
|
+
data: form.data?.companyProofOfSignatoryDocument,
|
|
616
|
+
errors: form.errors.companyProofOfSignatoryDocument,
|
|
617
|
+
valid: form.valid.companyProofOfSignatoryDocument,
|
|
618
|
+
allFields: form.allFields?.companyProofOfSignatoryDocument,
|
|
619
|
+
requiredFields: form.requiredFields?.companyProofOfSignatoryDocument,
|
|
620
|
+
optionalFields: form.optionalFields?.companyProofOfSignatoryDocument,
|
|
621
|
+
trustedFields: form.trustedFields?.companyProofOfSignatoryDocument,
|
|
622
|
+
handleFieldChange: () => handleChange("companyProofOfSignatoryDocument", "proofOfSignatory"),
|
|
623
|
+
shouldValidate,
|
|
624
|
+
fieldValidationErrors: problems.validationErrors?.[activeForm2.formId] ?? {},
|
|
625
|
+
formVerificationErrors: problems.verificationErrors?.[activeForm2.formId] ?? {}
|
|
626
|
+
}
|
|
627
|
+
);
|
|
628
|
+
case "companyProofOfOwnershipDocument":
|
|
629
|
+
return /* @__PURE__ */ jsx(
|
|
630
|
+
ProofOfOwnershipDocument,
|
|
631
|
+
{
|
|
632
|
+
id: activeForm2.formId,
|
|
633
|
+
country,
|
|
634
|
+
data: form.data?.companyProofOfOwnershipDocument,
|
|
635
|
+
errors: form.errors.companyProofOfOwnershipDocument,
|
|
636
|
+
valid: form.valid.companyProofOfOwnershipDocument,
|
|
637
|
+
allFields: form.allFields?.companyProofOfOwnershipDocument,
|
|
638
|
+
requiredFields: form.requiredFields?.companyProofOfOwnershipDocument,
|
|
639
|
+
optionalFields: form.optionalFields?.companyProofOfOwnershipDocument,
|
|
640
|
+
trustedFields: form.trustedFields?.companyProofOfOwnershipDocument,
|
|
641
|
+
handleFieldChange: () => handleChange("companyProofOfOwnershipDocument", "proofOfOwnership"),
|
|
642
|
+
shouldValidate,
|
|
643
|
+
fieldValidationErrors: problems.validationErrors?.[activeForm2.formId] ?? {},
|
|
644
|
+
formVerificationErrors: problems.verificationErrors?.[activeForm2.formId] ?? {}
|
|
645
|
+
}
|
|
646
|
+
);
|
|
647
|
+
case "companyConstitutionalDocument":
|
|
648
|
+
return /* @__PURE__ */ jsx(
|
|
649
|
+
MemoizedConstitutionalDocument,
|
|
650
|
+
{
|
|
651
|
+
id: activeForm2.formId,
|
|
652
|
+
legalEntityType: LegalEntityTypes.SOLE_PROPRIETORSHIP,
|
|
653
|
+
country,
|
|
654
|
+
data: form.data?.companyConstitutionalDocument,
|
|
655
|
+
errors: form.errors.companyConstitutionalDocument,
|
|
656
|
+
valid: form.valid.companyConstitutionalDocument,
|
|
657
|
+
allFields: form.allFields?.companyConstitutionalDocument,
|
|
658
|
+
requiredFields: form.requiredFields?.companyConstitutionalDocument,
|
|
659
|
+
optionalFields: form.optionalFields?.companyConstitutionalDocument,
|
|
660
|
+
trustedFields: form.trustedFields?.companyConstitutionalDocument,
|
|
661
|
+
handleFieldChange: () => handleChange("companyConstitutionalDocument", "constitutionalDocument"),
|
|
662
|
+
shouldValidate,
|
|
663
|
+
fieldValidationErrors: problems.validationErrors?.[activeForm2.formId] ?? {},
|
|
664
|
+
formVerificationErrors: problems.verificationErrors?.[activeForm2.formId] ?? {}
|
|
665
|
+
}
|
|
666
|
+
);
|
|
667
|
+
case "companyFinancialInformation":
|
|
668
|
+
return /* @__PURE__ */ jsx(
|
|
669
|
+
FinancialInformation,
|
|
670
|
+
{
|
|
671
|
+
multiForm: form,
|
|
672
|
+
id: activeForm2.formId,
|
|
673
|
+
country,
|
|
674
|
+
data: form.data?.companyFinancialInformation,
|
|
675
|
+
allFields: form.allFields?.companyFinancialInformation,
|
|
676
|
+
requiredFields: form.requiredFields?.companyFinancialInformation,
|
|
677
|
+
optionalFields: form.optionalFields?.companyFinancialInformation,
|
|
678
|
+
trustedFields: form.trustedFields?.companyFinancialInformation,
|
|
679
|
+
shouldValidate
|
|
680
|
+
}
|
|
681
|
+
);
|
|
682
|
+
default:
|
|
683
|
+
return null;
|
|
684
|
+
}
|
|
685
|
+
};
|
|
686
|
+
return /* @__PURE__ */ jsx("div", { className: "adyen-kyc-business-details", children: /* @__PURE__ */ jsx("div", { className: "adyen-kyc-form-wrapper", children: renderActiveForm(activeForm) }) });
|
|
687
|
+
}
|
|
688
|
+
const CompanyStructureValidation = {
|
|
689
|
+
entityType: {
|
|
690
|
+
modes: ["blur"],
|
|
691
|
+
validate: (entityType) => !isEmpty(entityType),
|
|
692
|
+
errorMessage: "fieldIsRequired"
|
|
693
|
+
}
|
|
694
|
+
};
|
|
695
|
+
const mapApiDocumentToBusinessDetailsDocuments = (entityId) => {
|
|
696
|
+
const registrationDocument = getDocument(entityId, "registrationDocument") ?? null;
|
|
697
|
+
const taxDocument = getDocument(entityId, "vatDocument") ?? getDocument(entityId, "proofOfOrganizationTaxInfo") ?? null;
|
|
698
|
+
const proofOfDirector = getDocument(entityId, "proofOfDirector") ?? null;
|
|
699
|
+
const proofOfSignatory = getDocument(entityId, "proofOfSignatory") ?? null;
|
|
700
|
+
const proofOfOwnership = getDocument(entityId, "proofOfOwnership") ?? null;
|
|
701
|
+
const constitutionalDocument = getDocument(entityId, "constitutionalDocument") ?? null;
|
|
702
|
+
return {
|
|
703
|
+
companyRegistrationDocument: registrationDocument ? { registrationDocument: [mapExistingFile(getPageName(registrationDocument))] } : void 0,
|
|
704
|
+
companyTaxDocument: taxDocument ? { taxDocument: [mapExistingFile(getPageName(taxDocument))] } : void 0,
|
|
705
|
+
companyProofOfDirectorDocument: proofOfDirector ? { proofOfDirector: [mapExistingFile(getPageName(proofOfDirector))] } : void 0,
|
|
706
|
+
companyProofOfSignatoryDocument: proofOfSignatory ? { proofOfSignatory: [mapExistingFile(getPageName(proofOfSignatory))] } : void 0,
|
|
707
|
+
companyProofOfOwnershipDocument: proofOfOwnership ? { proofOfOwnership: [mapExistingFile(getPageName(proofOfOwnership))] } : void 0,
|
|
708
|
+
companyConstitutionalDocument: constitutionalDocument ? {
|
|
709
|
+
constitutionalDocument: [mapExistingFile(getPageName(constitutionalDocument))]
|
|
710
|
+
} : void 0
|
|
711
|
+
};
|
|
712
|
+
};
|
|
713
|
+
const mapBasicInformation = (data) => {
|
|
714
|
+
if (!data) return;
|
|
715
|
+
return !!data.country && COUNTRIES_USING_COMPANY_SEARCH.includes(data.country) ? data : entriesOf(data).reduce((acc, [field]) => {
|
|
716
|
+
if (!FIELDS_NEEDED_FOR_COMPANY_SEARCH.includes(field)) {
|
|
717
|
+
return {
|
|
718
|
+
...acc,
|
|
719
|
+
[field]: data[field]
|
|
720
|
+
};
|
|
721
|
+
}
|
|
722
|
+
return acc;
|
|
723
|
+
}, {});
|
|
724
|
+
};
|
|
725
|
+
const mapDbaName = (legalEntity) => {
|
|
726
|
+
const entity = legalEntity.type === "organization" ? legalEntity.organization : legalEntity.soleProprietorship;
|
|
727
|
+
const dbaName = {};
|
|
728
|
+
if (typeof entity?.doingBusinessAsAbsent !== "undefined") {
|
|
729
|
+
dbaName.hasDoingBusinessAs = !entity.doingBusinessAsAbsent;
|
|
730
|
+
} else {
|
|
731
|
+
if (entity?.doingBusinessAs) {
|
|
732
|
+
dbaName.hasDoingBusinessAs = entity?.doingBusinessAs !== (legalEntity.type === "organization" ? legalEntity.organization?.legalName : legalEntity.soleProprietorship?.name);
|
|
733
|
+
} else {
|
|
734
|
+
dbaName.hasDoingBusinessAs = void 0;
|
|
735
|
+
}
|
|
736
|
+
}
|
|
737
|
+
if (legalEntity.organization?.doingBusinessAs) {
|
|
738
|
+
dbaName.doingBusinessAs = legalEntity.organization?.doingBusinessAs;
|
|
739
|
+
}
|
|
740
|
+
return dbaName;
|
|
741
|
+
};
|
|
742
|
+
const mapIsUen = (taxInformation, registrationNumber, country) => {
|
|
743
|
+
const currentCountryTaxInfo = taxInformation?.find((taxInfo) => taxInfo.country === country);
|
|
744
|
+
if (!currentCountryTaxInfo || country !== "SG") return {};
|
|
745
|
+
return {
|
|
746
|
+
registrationNumber: currentCountryTaxInfo.type === "UEN" ? currentCountryTaxInfo.number : registrationNumber,
|
|
747
|
+
isUen: currentCountryTaxInfo.type === "UEN"
|
|
748
|
+
};
|
|
749
|
+
};
|
|
750
|
+
const mapAdditionalInformation = (data, legalEntity) => {
|
|
751
|
+
if (!data) return;
|
|
752
|
+
const entity = legalEntity.type === "organization" ? legalEntity.organization : legalEntity.soleProprietorship;
|
|
753
|
+
const currentCountry = entity?.registeredAddress.country;
|
|
754
|
+
const dbaNameFields = mapDbaName(legalEntity);
|
|
755
|
+
const isUen = mapIsUen(
|
|
756
|
+
data.taxInformation,
|
|
757
|
+
data.registrationNumber,
|
|
758
|
+
currentCountry
|
|
759
|
+
);
|
|
760
|
+
const companyType = legalEntity.type === "organization" ? legalEntity.organization?.type : CompanyTypesValues.SOLE_PROPRIETORSHIP;
|
|
761
|
+
const registrationNumberType = getDefaultRegistrationNumberType(
|
|
762
|
+
entity?.registrationNumber,
|
|
763
|
+
currentCountry,
|
|
764
|
+
companyType
|
|
765
|
+
);
|
|
766
|
+
const vatNumberType = getDefaultVatNumberType(entity?.vatNumber, currentCountry);
|
|
767
|
+
const operationalAddressIsSame = entity?.principalPlaceOfBusiness && !objectsDeepEqual(entity?.principalPlaceOfBusiness, entity?.registeredAddress) ? operationalAddressIsSameIds.OPERATIONAL_ADDRESS_IS_NOT_SAME : operationalAddressIsSameIds.OPERATIONAL_ADDRESS_IS_SAME;
|
|
768
|
+
if (entity?.registeredAddress?.localization) {
|
|
769
|
+
data.registrationAddress = {
|
|
770
|
+
...data.registrationAddress,
|
|
771
|
+
...mapAddressLocalizationToJpAddressSchema(entity.registeredAddress.localization)
|
|
772
|
+
};
|
|
773
|
+
}
|
|
774
|
+
if (entity?.principalPlaceOfBusiness?.localization) {
|
|
775
|
+
data.operationalAddress = {
|
|
776
|
+
...data.operationalAddress,
|
|
777
|
+
...mapAddressLocalizationToJpAddressSchema(entity.principalPlaceOfBusiness.localization)
|
|
778
|
+
};
|
|
779
|
+
}
|
|
780
|
+
const result = entriesOf(data).reduce(
|
|
781
|
+
(acc, [field]) => {
|
|
782
|
+
if (!COUNTRIES_USING_COMPANY_SEARCH.includes(currentCountry)) {
|
|
783
|
+
return {
|
|
784
|
+
...acc,
|
|
785
|
+
[field]: data[field]
|
|
786
|
+
};
|
|
787
|
+
}
|
|
788
|
+
if (!FIELDS_NEEDED_FOR_COMPANY_SEARCH.includes(field)) {
|
|
789
|
+
return {
|
|
790
|
+
...acc,
|
|
791
|
+
[field]: data[field]
|
|
792
|
+
};
|
|
793
|
+
}
|
|
794
|
+
return acc;
|
|
795
|
+
},
|
|
796
|
+
{ operationalAddressIsSame, registrationNumberType, vatNumberType }
|
|
797
|
+
);
|
|
798
|
+
return { ...result, ...dbaNameFields, ...isUen };
|
|
799
|
+
};
|
|
800
|
+
const mapLegalNameLocalization = (data) => {
|
|
801
|
+
const localization = data.organization?.localization;
|
|
802
|
+
if (!localization) return {};
|
|
803
|
+
let result = {};
|
|
804
|
+
for (const { script, fields } of localization) {
|
|
805
|
+
const schemaFieldsFromLocalization = mapApiScriptLocalizationToSchemaFields({
|
|
806
|
+
script,
|
|
807
|
+
fields: {
|
|
808
|
+
// mismatch between API `legalName` and schema `legalCompanyName`
|
|
809
|
+
legalCompanyName: fields.legalName
|
|
810
|
+
}
|
|
811
|
+
});
|
|
812
|
+
result = {
|
|
813
|
+
...result,
|
|
814
|
+
...schemaFieldsFromLocalization
|
|
815
|
+
};
|
|
816
|
+
}
|
|
817
|
+
return result;
|
|
818
|
+
};
|
|
819
|
+
const mapLegalEntityToBusinessDetailsSchema = (legalEntity, parentEntity) => {
|
|
820
|
+
if (!legalEntity) return {};
|
|
821
|
+
const {
|
|
822
|
+
companyRegistrationDocument,
|
|
823
|
+
companyTaxDocument,
|
|
824
|
+
companyProofOfDirectorDocument,
|
|
825
|
+
companyProofOfSignatoryDocument,
|
|
826
|
+
companyProofOfOwnershipDocument,
|
|
827
|
+
companyConstitutionalDocument
|
|
828
|
+
} = mapApiDocumentToBusinessDetailsDocuments(legalEntity.id);
|
|
829
|
+
const buildSolePropSchema = () => {
|
|
830
|
+
const solePropData = formatObject(
|
|
831
|
+
legalEntity,
|
|
832
|
+
solePropBusinessDetailsKeyMapping
|
|
833
|
+
);
|
|
834
|
+
const country = solePropData?.additionalInformation?.registrationAddress?.country ?? parentEntity?.individual?.residentialAddress.country;
|
|
835
|
+
if (legalEntity?.soleProprietorship?.financialReports && solePropData) {
|
|
836
|
+
solePropData.companyFinancialInformation = mapFinancialReportsToFinancialInformation(
|
|
837
|
+
legalEntity.soleProprietorship.financialReports
|
|
838
|
+
);
|
|
839
|
+
}
|
|
840
|
+
return {
|
|
841
|
+
...solePropData,
|
|
842
|
+
basicInformation: {
|
|
843
|
+
...solePropData?.basicInformation,
|
|
844
|
+
country
|
|
845
|
+
},
|
|
846
|
+
companyConstitutionalDocument
|
|
847
|
+
};
|
|
848
|
+
};
|
|
849
|
+
const orgSchema = {
|
|
850
|
+
...formatObject(legalEntity, businessDetailsComponentsKeyMapping),
|
|
851
|
+
businessSelection: {},
|
|
852
|
+
companyRegistrationDocument,
|
|
853
|
+
companyTaxDocument,
|
|
854
|
+
companyProofOfDirectorDocument,
|
|
855
|
+
companyProofOfSignatoryDocument,
|
|
856
|
+
companyProofOfOwnershipDocument,
|
|
857
|
+
companyFinancialInformation: {}
|
|
858
|
+
};
|
|
859
|
+
const businessDetailsSchema = legalEntity.type === "organization" ? orgSchema : buildSolePropSchema();
|
|
860
|
+
return entriesOf(businessDetailsSchema).reduce((componentData, [key]) => {
|
|
861
|
+
switch (key) {
|
|
862
|
+
case "basicInformation": {
|
|
863
|
+
return {
|
|
864
|
+
...componentData,
|
|
865
|
+
[key]: {
|
|
866
|
+
...mapBasicInformation(businessDetailsSchema[key]),
|
|
867
|
+
...mapLegalNameLocalization(legalEntity)
|
|
868
|
+
}
|
|
869
|
+
};
|
|
870
|
+
}
|
|
871
|
+
case "businessSelection": {
|
|
872
|
+
return {
|
|
873
|
+
...componentData,
|
|
874
|
+
[key]: {
|
|
875
|
+
hasSelectedBusiness: false
|
|
876
|
+
}
|
|
877
|
+
};
|
|
878
|
+
}
|
|
879
|
+
case "companyStructure": {
|
|
880
|
+
return {
|
|
881
|
+
...componentData,
|
|
882
|
+
[key]: {
|
|
883
|
+
...businessDetailsSchema[key]
|
|
884
|
+
}
|
|
885
|
+
};
|
|
886
|
+
}
|
|
887
|
+
case "additionalInformation": {
|
|
888
|
+
return {
|
|
889
|
+
...componentData,
|
|
890
|
+
[key]: mapAdditionalInformation(businessDetailsSchema[key], legalEntity)
|
|
891
|
+
};
|
|
892
|
+
}
|
|
893
|
+
case "companyRegistrationDocument": {
|
|
894
|
+
return {
|
|
895
|
+
...componentData,
|
|
896
|
+
[key]: businessDetailsSchema[key]
|
|
897
|
+
};
|
|
898
|
+
}
|
|
899
|
+
case "companyTaxDocument": {
|
|
900
|
+
return {
|
|
901
|
+
...componentData,
|
|
902
|
+
[key]: businessDetailsSchema[key]
|
|
903
|
+
};
|
|
904
|
+
}
|
|
905
|
+
case "companyProofOfDirectorDocument": {
|
|
906
|
+
return {
|
|
907
|
+
...componentData,
|
|
908
|
+
[key]: businessDetailsSchema[key]
|
|
909
|
+
};
|
|
910
|
+
}
|
|
911
|
+
case "companyProofOfSignatoryDocument": {
|
|
912
|
+
return {
|
|
913
|
+
...componentData,
|
|
914
|
+
[key]: businessDetailsSchema[key]
|
|
915
|
+
};
|
|
916
|
+
}
|
|
917
|
+
case "companyProofOfOwnershipDocument": {
|
|
918
|
+
return {
|
|
919
|
+
...componentData,
|
|
920
|
+
[key]: businessDetailsSchema[key]
|
|
921
|
+
};
|
|
922
|
+
}
|
|
923
|
+
case "companyConstitutionalDocument": {
|
|
924
|
+
return {
|
|
925
|
+
...componentData,
|
|
926
|
+
[key]: businessDetailsSchema[key]
|
|
927
|
+
};
|
|
928
|
+
}
|
|
929
|
+
case "companyFinancialInformation": {
|
|
930
|
+
const financialReports = legalEntity.type === "organization" ? legalEntity?.organization?.financialReports : legalEntity?.soleProprietorship?.financialReports;
|
|
931
|
+
return financialReports?.length ? {
|
|
932
|
+
...componentData,
|
|
933
|
+
[key]: mapFinancialReportsToFinancialInformation(financialReports)
|
|
934
|
+
} : componentData;
|
|
935
|
+
}
|
|
936
|
+
default:
|
|
937
|
+
return componentData;
|
|
938
|
+
}
|
|
939
|
+
}, {});
|
|
940
|
+
};
|
|
941
|
+
const businessDetailsBase = {
|
|
942
|
+
/* Base required fields */
|
|
943
|
+
country: { rule: "REQUIRED" },
|
|
944
|
+
entityType: { rule: "businessRequiresCompanyType" },
|
|
945
|
+
legalCompanyName: { rule: "REQUIRED" },
|
|
946
|
+
jaHaniLegalCompanyName: { rule: "japaneseLegalCompanyName" },
|
|
947
|
+
jaKanaLegalCompanyName: { rule: "japaneseLegalCompanyName" },
|
|
948
|
+
hasDoingBusinessAs: { rule: "REQUIRED" },
|
|
949
|
+
doingBusinessAs: { rule: "requireDoingBusinessAsName" },
|
|
950
|
+
registrationAddress: { rule: "REQUIRED" },
|
|
951
|
+
operationalAddressIsSame: { rule: "REQUIRED" },
|
|
952
|
+
/* Base optional fields */
|
|
953
|
+
operationalAddress: { rule: "OPTIONAL" },
|
|
954
|
+
/* Fields with custom country specific rules */
|
|
955
|
+
hasSelectedBusiness: { rule: "requireBusinessSelection" },
|
|
956
|
+
stockExchangeMIC: { rule: "ifPubliclyTradedCompany" },
|
|
957
|
+
stockISIN: { rule: "ifPubliclyTradedCompany" },
|
|
958
|
+
stockTickerSymbol: { rule: "ifPubliclyTradedCompany" },
|
|
959
|
+
dateOfIncorporation: { rule: "isDateOfIncorporationRequired" },
|
|
960
|
+
stateOrProvince: { rule: "countryUsingCompanySearch" },
|
|
961
|
+
registrationNumber: { rule: "countryRequiresRegistrationNumber" },
|
|
962
|
+
registrationNumberType: { rule: "registrationNumberType" },
|
|
963
|
+
exemptedFromRegistrationNumber: { rule: "companyRegistrationNumberExemptionAllowed" },
|
|
964
|
+
eInvoicingCode: { rule: "isEInvoicingCodeEnabled" },
|
|
965
|
+
countryOfGoverningLaw: { rule: "countryOfGoverningLawRequired" },
|
|
966
|
+
taxDocument: { rule: "ifCountryUsAndTinFailed" },
|
|
967
|
+
/* Fields derived from capabilities */
|
|
968
|
+
industryCodes: { rule: "isIndustryCodeRequired" }
|
|
969
|
+
};
|
|
970
|
+
const taxInformationBase = {
|
|
971
|
+
vatNumber: { rule: "countryUsesVat" },
|
|
972
|
+
vatNumberType: { rule: "vatNumberType" },
|
|
973
|
+
exemptedFromVat: { rule: "isVatExempt" },
|
|
974
|
+
vatAbsenceReason: { rule: "isVatExempt" },
|
|
975
|
+
taxInformation: { rule: "countryUsesTaxId" },
|
|
976
|
+
exemptedFromTax: { rule: "countryHasTaxExemptions" },
|
|
977
|
+
isUen: { rule: "countryUsesUenOrGst" }
|
|
978
|
+
};
|
|
979
|
+
const financialInformationBase = {
|
|
980
|
+
numberOfEmployees: { rule: "countryRequiresFinancialInformation" },
|
|
981
|
+
financialReportingDate: { rule: "isFinancialReportingFieldsRequired" },
|
|
982
|
+
currency: { rule: "isFinancialReportingFieldsRequired" },
|
|
983
|
+
reportedValueOption: { rule: "isFinancialReportingFieldsRequired" },
|
|
984
|
+
annualTurnover: { rule: "annualTurnoverRequired" },
|
|
985
|
+
netAssets: { rule: "netAssetsRequired" },
|
|
986
|
+
balanceSheetTotal: { rule: "balanceSheetTotalRequired" }
|
|
987
|
+
};
|
|
988
|
+
const businessDetailsFieldsPerScenario = {
|
|
989
|
+
L0: {
|
|
990
|
+
country: { rule: "REQUIRED" },
|
|
991
|
+
legalCompanyName: { rule: "REQUIRED" },
|
|
992
|
+
stateOrProvince: { rule: "countryUsingCompanySearch" },
|
|
993
|
+
...financialInformationBase
|
|
994
|
+
},
|
|
995
|
+
L1: {
|
|
996
|
+
...businessDetailsBase,
|
|
997
|
+
...financialInformationBase
|
|
998
|
+
},
|
|
999
|
+
L: {
|
|
1000
|
+
...businessDetailsBase,
|
|
1001
|
+
...taxInformationBase,
|
|
1002
|
+
...financialInformationBase
|
|
1003
|
+
},
|
|
1004
|
+
L_PROOFOFADDRESS: {
|
|
1005
|
+
// TODO this field does not exist
|
|
1006
|
+
// proofOfAddressDocument: { rule: 'REQUIRED' },
|
|
1007
|
+
},
|
|
1008
|
+
L_REGDOC: {
|
|
1009
|
+
registrationDocument: { rule: "REQUIRED" }
|
|
1010
|
+
},
|
|
1011
|
+
L_TAXDOC: {
|
|
1012
|
+
taxDocument: { rule: "REQUIRED" }
|
|
1013
|
+
},
|
|
1014
|
+
L_BAFIN: {
|
|
1015
|
+
legalForm: { rule: "REQUIRED" }
|
|
1016
|
+
}
|
|
1017
|
+
};
|
|
1018
|
+
const adjustFormData = (oldFormData, newFormData) => {
|
|
1019
|
+
const schema = Array.from((/* @__PURE__ */ new Set([...keysOf(oldFormData), ...keysOf(newFormData)])).keys());
|
|
1020
|
+
return schema.reduce((acc, key) => {
|
|
1021
|
+
const oldValue = oldFormData[key];
|
|
1022
|
+
const newValue = newFormData[key];
|
|
1023
|
+
if (!isUndefinedOrNull(newValue)) return { ...acc, [key]: newValue };
|
|
1024
|
+
if (Array.isArray(oldValue)) return { ...acc, [key]: [] };
|
|
1025
|
+
if (typeof oldValue === "number") return { ...acc, [key]: null };
|
|
1026
|
+
if (typeof oldValue === "string") return { ...acc, [key]: "" };
|
|
1027
|
+
return { ...acc, [key]: "" };
|
|
1028
|
+
}, {});
|
|
1029
|
+
};
|
|
1030
|
+
const setRemovedFieldsOnSchemaToDeletedValue = (newData, existingData) => {
|
|
1031
|
+
const formIds = Array.from((/* @__PURE__ */ new Set([...keysOf(existingData), ...keysOf(newData)])).keys());
|
|
1032
|
+
return formIds.reduce((adjusted, formId) => {
|
|
1033
|
+
const oldFormData = existingData[formId];
|
|
1034
|
+
const newFormData = newData[formId];
|
|
1035
|
+
if (isUndefinedOrNull(oldFormData)) return { ...adjusted, [formId]: newFormData };
|
|
1036
|
+
if (isUndefinedOrNull(newFormData)) return adjusted;
|
|
1037
|
+
return { ...adjusted, [formId]: adjustFormData(oldFormData, newFormData) };
|
|
1038
|
+
}, {});
|
|
1039
|
+
};
|
|
1040
|
+
const formatFinancialInformationSummary = (data, language, country, dateOfIncorporation) => {
|
|
1041
|
+
let summary;
|
|
1042
|
+
if (!data) return void 0;
|
|
1043
|
+
if (dateOfIncorporation && !isDateOlderThanAYear(dateOfIncorporation)) {
|
|
1044
|
+
if (country === CountryCodes.UnitedKingdom) {
|
|
1045
|
+
summary = { numberOfEmployees: `${data.numberOfEmployees}` };
|
|
1046
|
+
return summary;
|
|
1047
|
+
}
|
|
1048
|
+
return void 0;
|
|
1049
|
+
}
|
|
1050
|
+
summary = {
|
|
1051
|
+
currency: data.currency,
|
|
1052
|
+
financialReportingDate: data.financialReportingDate
|
|
1053
|
+
};
|
|
1054
|
+
if (country === CountryCodes.UnitedKingdom) {
|
|
1055
|
+
summary.numberOfEmployees = `${data.numberOfEmployees}`;
|
|
1056
|
+
}
|
|
1057
|
+
if (data.balanceSheetTotal) {
|
|
1058
|
+
summary.balanceSheetTotal = summaryItem(
|
|
1059
|
+
"balanceSheetTotal",
|
|
1060
|
+
formatCurrency(data.balanceSheetTotal, data.currency, language)
|
|
1061
|
+
);
|
|
1062
|
+
}
|
|
1063
|
+
if (data.annualTurnover) {
|
|
1064
|
+
summary.annualTurnover = formatCurrency(data.annualTurnover, data.currency, language);
|
|
1065
|
+
}
|
|
1066
|
+
return summary;
|
|
1067
|
+
};
|
|
1068
|
+
const mapBusinessDetailsDocumentToApiDocument = async (data, entityId) => {
|
|
1069
|
+
const {
|
|
1070
|
+
companyRegistrationDocument,
|
|
1071
|
+
companyTaxDocument,
|
|
1072
|
+
companyProofOfDirectorDocument,
|
|
1073
|
+
companyConstitutionalDocument,
|
|
1074
|
+
companyProofOfSignatoryDocument,
|
|
1075
|
+
companyProofOfOwnershipDocument,
|
|
1076
|
+
basicInformation
|
|
1077
|
+
} = data;
|
|
1078
|
+
const taxDocumentType = COUNTRIES_THAT_USE_TAX_ID_INSTEAD_OF_VAT.includes(
|
|
1079
|
+
basicInformation?.country
|
|
1080
|
+
) ? "proofOfOrganizationTaxInfo" : "vatDocument";
|
|
1081
|
+
const documents = await Promise.all([
|
|
1082
|
+
createDocumentRequest({
|
|
1083
|
+
entityId,
|
|
1084
|
+
entityType: "legalEntity",
|
|
1085
|
+
documentType: "registrationDocument",
|
|
1086
|
+
page1: companyRegistrationDocument?.registrationDocument?.[0]
|
|
1087
|
+
}),
|
|
1088
|
+
createDocumentRequest({
|
|
1089
|
+
entityId,
|
|
1090
|
+
entityType: "legalEntity",
|
|
1091
|
+
documentType: taxDocumentType,
|
|
1092
|
+
page1: companyTaxDocument?.taxDocument?.[0]
|
|
1093
|
+
}),
|
|
1094
|
+
createDocumentRequest({
|
|
1095
|
+
entityId,
|
|
1096
|
+
entityType: "legalEntity",
|
|
1097
|
+
documentType: "proofOfDirector",
|
|
1098
|
+
page1: companyProofOfDirectorDocument?.proofOfDirector?.[0]
|
|
1099
|
+
}),
|
|
1100
|
+
createDocumentRequest({
|
|
1101
|
+
entityId,
|
|
1102
|
+
entityType: "legalEntity",
|
|
1103
|
+
documentType: "constitutionalDocument",
|
|
1104
|
+
page1: companyConstitutionalDocument?.constitutionalDocument?.[0]
|
|
1105
|
+
}),
|
|
1106
|
+
createDocumentRequest({
|
|
1107
|
+
entityId,
|
|
1108
|
+
entityType: "legalEntity",
|
|
1109
|
+
documentType: "proofOfSignatory",
|
|
1110
|
+
page1: companyProofOfSignatoryDocument?.proofOfSignatory?.[0]
|
|
1111
|
+
}),
|
|
1112
|
+
createDocumentRequest({
|
|
1113
|
+
entityId,
|
|
1114
|
+
entityType: "legalEntity",
|
|
1115
|
+
documentType: "proofOfOwnership",
|
|
1116
|
+
page1: companyProofOfOwnershipDocument?.proofOfOwnership?.[0],
|
|
1117
|
+
page2: companyProofOfOwnershipDocument?.proofOfOwnership?.[1]
|
|
1118
|
+
})
|
|
1119
|
+
]);
|
|
1120
|
+
return documents.filter(Boolean);
|
|
1121
|
+
};
|
|
1122
|
+
const mapBusinessDetailsSchemaToLegalEntity = (data, accountHolder, isExperimentEnabled) => {
|
|
1123
|
+
const requestObj = {
|
|
1124
|
+
...formatObject(
|
|
1125
|
+
data,
|
|
1126
|
+
accountHolder === "mySoleProprietorName" ? solePropBusinessDetailsApiKeyMapping : businessDetailsApiKeyMapping
|
|
1127
|
+
)
|
|
1128
|
+
};
|
|
1129
|
+
delete requestObj.organization?.legalFormDescription;
|
|
1130
|
+
const canSaveRegNumberAbsentState = isExperimentEnabled("EnableRegistrationAndTaxAbsentStatesV4") && isRegistrationNumberAbsentStateV4Scenario(
|
|
1131
|
+
data.basicInformation?.country,
|
|
1132
|
+
data.companyStructure?.entityType
|
|
1133
|
+
);
|
|
1134
|
+
const taxData = COUNTRIES_USING_COMPANY_SEARCH.includes(
|
|
1135
|
+
data.basicInformation?.country
|
|
1136
|
+
) ? data.basicInformation?.taxInformation : data.additionalInformation?.taxInformation;
|
|
1137
|
+
const registrationNumber = COUNTRIES_USING_COMPANY_SEARCH.includes(
|
|
1138
|
+
data.basicInformation?.country
|
|
1139
|
+
) ? data.basicInformation?.registrationNumber : data.additionalInformation?.registrationNumber;
|
|
1140
|
+
const localization = [
|
|
1141
|
+
mapSchemaFieldsToApiScriptLocalization(data.basicInformation ?? {}, "jaHani"),
|
|
1142
|
+
mapSchemaFieldsToApiScriptLocalization(data.basicInformation ?? {}, "jaKana")
|
|
1143
|
+
].filter(({ fields }) => !isEmpty$1(fields)).map(({ script, fields }) => ({
|
|
1144
|
+
script,
|
|
1145
|
+
// mismatch between API `legalName` and schema `legalCompanyName`
|
|
1146
|
+
fields: { legalName: fields.legalCompanyName }
|
|
1147
|
+
}));
|
|
1148
|
+
const doingBusinessAs = data.additionalInformation?.doingBusinessAs ?? "";
|
|
1149
|
+
const entityObject = isEmpty$1(data.companyStructure) ? requestObj.soleProprietorship : requestObj.organization;
|
|
1150
|
+
if (entityObject) {
|
|
1151
|
+
if (taxData) {
|
|
1152
|
+
entityObject.taxInformation = taxData;
|
|
1153
|
+
}
|
|
1154
|
+
if (!!requestObj.soleProprietorship && !requestObj.soleProprietorship?.countryOfGoverningLaw && !!data.basicInformation?.country) {
|
|
1155
|
+
requestObj.soleProprietorship.countryOfGoverningLaw = data.basicInformation.country;
|
|
1156
|
+
}
|
|
1157
|
+
if (registrationNumber) {
|
|
1158
|
+
entityObject.registrationNumber = registrationNumber;
|
|
1159
|
+
if (canSaveRegNumberAbsentState && requestObj.organization) {
|
|
1160
|
+
requestObj.organization.registrationNumberAbsent = false;
|
|
1161
|
+
}
|
|
1162
|
+
}
|
|
1163
|
+
if (requestObj.organization && entityObject && localization.length > 0) {
|
|
1164
|
+
entityObject.localization = localization;
|
|
1165
|
+
}
|
|
1166
|
+
if (data.additionalInformation?.exemptedFromRegistrationNumber && canSaveRegNumberAbsentState && requestObj.organization) {
|
|
1167
|
+
requestObj.organization.registrationNumberAbsent = data.additionalInformation?.exemptedFromRegistrationNumber;
|
|
1168
|
+
}
|
|
1169
|
+
if (data.additionalInformation?.vatAbsenceReason) {
|
|
1170
|
+
entityObject.vatNumber = "";
|
|
1171
|
+
}
|
|
1172
|
+
if (isExperimentEnabled("EnableDoingBusinessAsNameV4")) {
|
|
1173
|
+
if (typeof data.additionalInformation?.hasDoingBusinessAs !== "undefined") {
|
|
1174
|
+
entityObject.doingBusinessAsAbsent = !data.additionalInformation?.hasDoingBusinessAs;
|
|
1175
|
+
}
|
|
1176
|
+
} else {
|
|
1177
|
+
entityObject.doingBusinessAs = doingBusinessAs || data.basicInformation?.legalCompanyName;
|
|
1178
|
+
delete entityObject.doingBusinessAsAbsent;
|
|
1179
|
+
}
|
|
1180
|
+
if (data.additionalInformation?.operationalAddressIsSame === operationalAddressIsSameIds.OPERATIONAL_ADDRESS_IS_SAME && entityObject.principalPlaceOfBusiness) {
|
|
1181
|
+
entityObject.principalPlaceOfBusiness = entityObject.registeredAddress;
|
|
1182
|
+
}
|
|
1183
|
+
if (entityObject.registeredAddress) {
|
|
1184
|
+
const addressLocalizations = mapJpAddressSchemaToAddressLocalizations(
|
|
1185
|
+
data.additionalInformation?.registrationAddress
|
|
1186
|
+
);
|
|
1187
|
+
if (addressLocalizations.length > 0)
|
|
1188
|
+
entityObject.registeredAddress.localization = addressLocalizations;
|
|
1189
|
+
}
|
|
1190
|
+
if (!isEmpty$1(data.companyFinancialInformation)) {
|
|
1191
|
+
const isIncorporationDateDependencyEnabled = isExperimentEnabled(
|
|
1192
|
+
"EnableIncorporationDateBasedFinancialValidationForHO"
|
|
1193
|
+
);
|
|
1194
|
+
entityObject.financialReports = [
|
|
1195
|
+
mapFinancialInformationToFinancialReport(
|
|
1196
|
+
data.companyFinancialInformation,
|
|
1197
|
+
isIncorporationDateDependencyEnabled ? data?.additionalInformation?.dateOfIncorporation : void 0
|
|
1198
|
+
)
|
|
1199
|
+
];
|
|
1200
|
+
}
|
|
1201
|
+
}
|
|
1202
|
+
requestObj.type = requestObj.organization ? LegalEntityTypes.ORGANIZATION : LegalEntityTypes.SOLE_PROPRIETORSHIP;
|
|
1203
|
+
if (entityObject?.registeredAddress.country === "US") {
|
|
1204
|
+
delete entityObject.registrationNumber;
|
|
1205
|
+
}
|
|
1206
|
+
if (!canSaveRegNumberAbsentState) {
|
|
1207
|
+
delete requestObj.organization?.registrationNumberAbsent;
|
|
1208
|
+
}
|
|
1209
|
+
return requestObj;
|
|
1210
|
+
};
|
|
1211
|
+
function buildRequiredForms({
|
|
1212
|
+
config: {
|
|
1213
|
+
forms,
|
|
1214
|
+
requiredFields,
|
|
1215
|
+
optionalFields,
|
|
1216
|
+
isValid,
|
|
1217
|
+
problems,
|
|
1218
|
+
isSettingEnabled,
|
|
1219
|
+
accountHolder,
|
|
1220
|
+
legalEntityResponse
|
|
1221
|
+
},
|
|
1222
|
+
options
|
|
1223
|
+
}) {
|
|
1224
|
+
const skipCompanyStructure = !!verifiedBusiness.value?.legalForm || isSettingEnabled(SettingNames.AllowLegalEntityTypeChange) && organizationTypesToSkipCompanyStructureForm.includes(
|
|
1225
|
+
legalEntityResponse?.organization?.type ?? ""
|
|
1226
|
+
) && accountHolder !== "aTrust" && accountHolder !== "anUnincorporatedPartnership";
|
|
1227
|
+
const filteredForms = Object.values(forms).filter(({ formId }) => {
|
|
1228
|
+
if (formId === "businessSelection") {
|
|
1229
|
+
if (options?.hasNoSearchResults || isVerifiedSingleCompanySearchResult.value) return false;
|
|
1230
|
+
}
|
|
1231
|
+
if (formId === "companyStructure") {
|
|
1232
|
+
if (skipCompanyStructure) return false;
|
|
1233
|
+
}
|
|
1234
|
+
if (requiredFields || optionalFields) {
|
|
1235
|
+
return Boolean(requiredFields?.[formId]) || Boolean(optionalFields?.[formId]);
|
|
1236
|
+
}
|
|
1237
|
+
return true;
|
|
1238
|
+
});
|
|
1239
|
+
const requiredForms = options?.skipSummary ? filteredForms : [...filteredForms, summaryStep];
|
|
1240
|
+
return addValidityToForms(requiredForms, isValid, problems);
|
|
1241
|
+
}
|
|
1242
|
+
const isDocumentsRequired = (forms) => forms.some((form) => documentFormsIds.includes(form.formId));
|
|
1243
|
+
const formatBasicInformation = (data, datasetUtils, companyType, isCountryOfGoverningLawEnabled) => {
|
|
1244
|
+
const country = data?.country;
|
|
1245
|
+
const registrationNumberLabel = resolveFieldMetadata(
|
|
1246
|
+
registrationNumberDefaultFieldConfig[country],
|
|
1247
|
+
{
|
|
1248
|
+
companyType,
|
|
1249
|
+
registrationNumberType: data.registrationNumber ? inferCompanyRegistrationNumberType(data?.registrationNumber, country, companyType) : getCompanyRegistrationNumberOptions(country, companyType)?.[0]?.id
|
|
1250
|
+
},
|
|
1251
|
+
registrationNumberDefaultFieldMetadata
|
|
1252
|
+
).label;
|
|
1253
|
+
const taxIdLabel = resolveFieldMetadata(
|
|
1254
|
+
taxInformationDefaultFieldConfig[country],
|
|
1255
|
+
{
|
|
1256
|
+
taxIdNumberType: countryToTaxInfoTypeMap[country] ?? void 0,
|
|
1257
|
+
// TODO use type selector
|
|
1258
|
+
companyType: void 0
|
|
1259
|
+
},
|
|
1260
|
+
taxInformationDefaultFieldMetadata
|
|
1261
|
+
).label;
|
|
1262
|
+
const countryOfGoverningLaw = getCountryOfGoverningLaw(isCountryOfGoverningLawEnabled, data);
|
|
1263
|
+
return {
|
|
1264
|
+
["legalCompanyName"]: data.legalCompanyName,
|
|
1265
|
+
country: datasetUtils.getCountryName(data.country),
|
|
1266
|
+
[getKeyForField("stateOrProvince", data.country)]: datasetUtils.getStateName(
|
|
1267
|
+
data.stateOrProvince,
|
|
1268
|
+
data.country
|
|
1269
|
+
),
|
|
1270
|
+
[taxIdLabel]: data.taxInformation?.find((taxId) => data.country === taxId.country)?.number,
|
|
1271
|
+
[registrationNumberLabel]: data.registrationNumber,
|
|
1272
|
+
countryOfGoverningLaw: datasetUtils.getCountryName(countryOfGoverningLaw)
|
|
1273
|
+
};
|
|
1274
|
+
};
|
|
1275
|
+
const formatAdditionalInformation = (data, country, companyType, t) => {
|
|
1276
|
+
const registrationNumberLabel = resolveFieldMetadata(
|
|
1277
|
+
registrationNumberDefaultFieldConfig[country],
|
|
1278
|
+
{
|
|
1279
|
+
companyType,
|
|
1280
|
+
registrationNumberType: data.registrationNumber ? inferCompanyRegistrationNumberType(data?.registrationNumber, country, companyType) : getCompanyRegistrationNumberOptions(country, companyType)?.[0]?.id
|
|
1281
|
+
},
|
|
1282
|
+
registrationNumberDefaultFieldMetadata
|
|
1283
|
+
).label;
|
|
1284
|
+
const taxIdLabel = resolveFieldMetadata(
|
|
1285
|
+
taxInformationDefaultFieldConfig[country],
|
|
1286
|
+
{
|
|
1287
|
+
taxIdNumberType: countryToTaxInfoTypeMap[country] ?? void 0,
|
|
1288
|
+
// TODO use type selector
|
|
1289
|
+
companyType: void 0
|
|
1290
|
+
},
|
|
1291
|
+
taxInformationDefaultFieldMetadata
|
|
1292
|
+
).label;
|
|
1293
|
+
return {
|
|
1294
|
+
["businessStructure"]: data.legalFormLabel,
|
|
1295
|
+
["doingBusinessAs"]: data.doingBusinessAs,
|
|
1296
|
+
["industry"]: data.industryCodes?.[0].name,
|
|
1297
|
+
[registrationNumberLabel]: data.registrationNumber,
|
|
1298
|
+
[taxIdLabel]: data.isUen ? void 0 : data.taxInformation?.find((taxId) => country === taxId.country)?.number,
|
|
1299
|
+
["vatNumber"]: data.vatNumber,
|
|
1300
|
+
["vatAbsenceReason"]: data.vatAbsenceReason ? t(($) => $[data.vatAbsenceReason], { ns: "common" }) : void 0,
|
|
1301
|
+
["dateOfIncorporation"]: data.dateOfIncorporation,
|
|
1302
|
+
["stockExchangeMIC"]: data.stockExchangeMIC,
|
|
1303
|
+
["stockISIN"]: data.stockISIN,
|
|
1304
|
+
["stockTickerSymbol"]: data.stockTickerSymbol,
|
|
1305
|
+
["eInvoicingCode"]: data.eInvoicingCode
|
|
1306
|
+
};
|
|
1307
|
+
};
|
|
1308
|
+
const formatDataForSummary = (data, forms, t, language, isExperimentEnabled) => {
|
|
1309
|
+
const datasetUtils = datasetUtilities(language);
|
|
1310
|
+
return entriesOf(data).reduce((summaryData, [form]) => {
|
|
1311
|
+
if (!form || !data[form]) return summaryData;
|
|
1312
|
+
const isCountryOfGoverningLawEnabled = isExperimentEnabled(
|
|
1313
|
+
"EnableCountryOfGoverningLawForUKCompanies"
|
|
1314
|
+
);
|
|
1315
|
+
switch (form) {
|
|
1316
|
+
case "basicInformation":
|
|
1317
|
+
return {
|
|
1318
|
+
...summaryData,
|
|
1319
|
+
[form]: formatBasicInformation(
|
|
1320
|
+
data[form],
|
|
1321
|
+
datasetUtils,
|
|
1322
|
+
data.companyStructure?.entityType,
|
|
1323
|
+
isCountryOfGoverningLawEnabled
|
|
1324
|
+
)
|
|
1325
|
+
};
|
|
1326
|
+
case "companyStructure":
|
|
1327
|
+
return {
|
|
1328
|
+
...summaryData,
|
|
1329
|
+
[form]: {
|
|
1330
|
+
entityType: t(
|
|
1331
|
+
($) => $[companyTypeMetadata[data["companyStructure"]?.entityType]?.name],
|
|
1332
|
+
{
|
|
1333
|
+
ns: "business"
|
|
1334
|
+
}
|
|
1335
|
+
)
|
|
1336
|
+
}
|
|
1337
|
+
};
|
|
1338
|
+
case "additionalInformation":
|
|
1339
|
+
return {
|
|
1340
|
+
...summaryData,
|
|
1341
|
+
[form]: {
|
|
1342
|
+
hasInnerForms: true,
|
|
1343
|
+
additionalInformationFormName: formatAdditionalInformation(
|
|
1344
|
+
data[form],
|
|
1345
|
+
data.basicInformation?.country,
|
|
1346
|
+
data.companyStructure?.entityType,
|
|
1347
|
+
t
|
|
1348
|
+
),
|
|
1349
|
+
registrationAddress: data.basicInformation?.country === CountryCodes.Japan ? mapJpAddressSummary(data[form].registrationAddress, datasetUtils) : mapAddressLabels(data[form].registrationAddress, datasetUtils),
|
|
1350
|
+
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
|
|
1351
|
+
}
|
|
1352
|
+
};
|
|
1353
|
+
case "companyRegistrationDocument":
|
|
1354
|
+
if (!isDocumentsRequired(forms)) return summaryData;
|
|
1355
|
+
return {
|
|
1356
|
+
...summaryData,
|
|
1357
|
+
[form]: {
|
|
1358
|
+
companyRegistrationDocument: {
|
|
1359
|
+
fileName: data[form].registrationDocument?.[0]?.name
|
|
1360
|
+
}
|
|
1361
|
+
}
|
|
1362
|
+
};
|
|
1363
|
+
case "companyTaxDocument":
|
|
1364
|
+
if (!isDocumentsRequired(forms)) return summaryData;
|
|
1365
|
+
return {
|
|
1366
|
+
...summaryData,
|
|
1367
|
+
[form]: {
|
|
1368
|
+
companyTaxDocument: {
|
|
1369
|
+
fileName: data[form].taxDocument?.[0]?.name
|
|
1370
|
+
}
|
|
1371
|
+
}
|
|
1372
|
+
};
|
|
1373
|
+
case "companyProofOfDirectorDocument":
|
|
1374
|
+
if (!isDocumentsRequired(forms)) return summaryData;
|
|
1375
|
+
return {
|
|
1376
|
+
...summaryData,
|
|
1377
|
+
[form]: {
|
|
1378
|
+
companyProofOfDirectorDocument: {
|
|
1379
|
+
fileName: data[form].proofOfDirector?.[0]?.name
|
|
1380
|
+
}
|
|
1381
|
+
}
|
|
1382
|
+
};
|
|
1383
|
+
case "companyProofOfSignatoryDocument":
|
|
1384
|
+
if (!isDocumentsRequired(forms)) return summaryData;
|
|
1385
|
+
return {
|
|
1386
|
+
...summaryData,
|
|
1387
|
+
[form]: {
|
|
1388
|
+
companyProofOfSignatoryDocument: {
|
|
1389
|
+
fileName: data[form].proofOfSignatory?.[0]?.name
|
|
1390
|
+
}
|
|
1391
|
+
}
|
|
1392
|
+
};
|
|
1393
|
+
case "companyProofOfOwnershipDocument":
|
|
1394
|
+
if (!isDocumentsRequired(forms)) return summaryData;
|
|
1395
|
+
return {
|
|
1396
|
+
...summaryData,
|
|
1397
|
+
[form]: {
|
|
1398
|
+
companyProofOfOwnershipDocument: {
|
|
1399
|
+
fileName: data[form].proofOfOwnership?.map((doc) => doc.name).join("\n")
|
|
1400
|
+
}
|
|
1401
|
+
}
|
|
1402
|
+
};
|
|
1403
|
+
case "companyFinancialInformation": {
|
|
1404
|
+
const isIncorporationDateDependencyEnabled = isExperimentEnabled(
|
|
1405
|
+
"EnableIncorporationDateBasedFinancialValidationForHO"
|
|
1406
|
+
);
|
|
1407
|
+
return {
|
|
1408
|
+
...summaryData,
|
|
1409
|
+
[form]: formatFinancialInformationSummary(
|
|
1410
|
+
data[form],
|
|
1411
|
+
language,
|
|
1412
|
+
data?.basicInformation?.country,
|
|
1413
|
+
isIncorporationDateDependencyEnabled ? data?.additionalInformation?.dateOfIncorporation : void 0
|
|
1414
|
+
)
|
|
1415
|
+
};
|
|
1416
|
+
}
|
|
1417
|
+
default:
|
|
1418
|
+
return summaryData;
|
|
1419
|
+
}
|
|
1420
|
+
}, {});
|
|
1421
|
+
};
|
|
1422
|
+
async function submitDocuments({
|
|
1423
|
+
data,
|
|
1424
|
+
legalEntity,
|
|
1425
|
+
forms,
|
|
1426
|
+
documentUtils,
|
|
1427
|
+
userEvents
|
|
1428
|
+
}) {
|
|
1429
|
+
if (!isDocumentsRequired(forms)) return;
|
|
1430
|
+
const logger = createLogger();
|
|
1431
|
+
const formattedDocument = await mapBusinessDetailsDocumentToApiDocument(data, legalEntity.id);
|
|
1432
|
+
try {
|
|
1433
|
+
if (formattedDocument) {
|
|
1434
|
+
await documentUtils.uploadDocuments(formattedDocument, legalEntity.id);
|
|
1435
|
+
formattedDocument.forEach((doc) => {
|
|
1436
|
+
userEvents?.addTaskEvent("Success", {
|
|
1437
|
+
actionType: "upload",
|
|
1438
|
+
documentType: doc.type,
|
|
1439
|
+
fileExtention: doc.attachments?.map((item) => getFileExtention(item.pageName)).filter((item) => item !== void 0) ?? []
|
|
1440
|
+
});
|
|
1441
|
+
});
|
|
1442
|
+
}
|
|
1443
|
+
} catch (err) {
|
|
1444
|
+
logger.error(err);
|
|
1445
|
+
userEvents.addTaskEvent("Encountered error", {
|
|
1446
|
+
actionType: "upload",
|
|
1447
|
+
returnType: err.errorCode,
|
|
1448
|
+
returnValue: err.title ?? err.message
|
|
1449
|
+
});
|
|
1450
|
+
}
|
|
1451
|
+
}
|
|
1452
|
+
async function submit({
|
|
1453
|
+
data,
|
|
1454
|
+
legalEntityResponse,
|
|
1455
|
+
associatedLegalArrangement,
|
|
1456
|
+
nestedLegalEntity,
|
|
1457
|
+
nestedLegalEntityDetails,
|
|
1458
|
+
problems,
|
|
1459
|
+
taskType,
|
|
1460
|
+
accountHolder,
|
|
1461
|
+
forms,
|
|
1462
|
+
documentUtils,
|
|
1463
|
+
t,
|
|
1464
|
+
showToast,
|
|
1465
|
+
setLoadingStatus,
|
|
1466
|
+
setProblems,
|
|
1467
|
+
handleUpdateLegalEntity,
|
|
1468
|
+
createLegalEntity,
|
|
1469
|
+
onExternalSubmit,
|
|
1470
|
+
isExperimentEnabled,
|
|
1471
|
+
userEvents,
|
|
1472
|
+
efpBusinessLines,
|
|
1473
|
+
createBusinessLine,
|
|
1474
|
+
updateBusinessLine
|
|
1475
|
+
}) {
|
|
1476
|
+
const logger = createLogger();
|
|
1477
|
+
setLoadingStatus("loading");
|
|
1478
|
+
let trackingPayload = {
|
|
1479
|
+
actionType: "submit",
|
|
1480
|
+
companyStructure: data.companyStructure?.entityType,
|
|
1481
|
+
countryOfRegistration: data.basicInformation?.country,
|
|
1482
|
+
legalEntityName: accountHolder === "theCompanyIWorkFor" ? data.basicInformation?.legalCompanyName : void 0,
|
|
1483
|
+
// Only send legalCompanyName for organizations
|
|
1484
|
+
usedAdditionalAddress: data.additionalInformation?.operationalAddressIsSame === operationalAddressIsSameIds.OPERATIONAL_ADDRESS_IS_NOT_SAME
|
|
1485
|
+
};
|
|
1486
|
+
const entityToUpdate = (() => {
|
|
1487
|
+
switch (taskType) {
|
|
1488
|
+
case TaskTypes.SOLE_PROPRIETOR_COMPANY:
|
|
1489
|
+
return associatedLegalArrangement;
|
|
1490
|
+
case TaskTypes.TRUST_MEMBER_COMPANY:
|
|
1491
|
+
case TaskTypes.UNINCORPORATED_PARTNERSHIP_MEMBER_COMPANY:
|
|
1492
|
+
return nestedLegalEntity;
|
|
1493
|
+
case TaskTypes.BUSINESS_DETAILS:
|
|
1494
|
+
default:
|
|
1495
|
+
return legalEntityResponse;
|
|
1496
|
+
}
|
|
1497
|
+
})();
|
|
1498
|
+
const handleSubmitLegalEntity = async (legalEntity) => {
|
|
1499
|
+
if (taskType === TaskTypes.TRUST_MEMBER_COMPANY && !nestedLegalEntity?.id || taskType === TaskTypes.UNINCORPORATED_PARTNERSHIP_MEMBER_COMPANY && !nestedLegalEntity?.id || taskType === TaskTypes.SOLE_PROPRIETOR_COMPANY && !associatedLegalArrangement?.id) {
|
|
1500
|
+
return await createLegalEntity(legalEntity);
|
|
1501
|
+
} else {
|
|
1502
|
+
return handleUpdateLegalEntity({
|
|
1503
|
+
...drop("type").from(legalEntity),
|
|
1504
|
+
id: entityToUpdate?.id ?? legalEntityResponse.id
|
|
1505
|
+
});
|
|
1506
|
+
}
|
|
1507
|
+
};
|
|
1508
|
+
const associateLegalEntityWithParent = async ({
|
|
1509
|
+
legalEntity,
|
|
1510
|
+
associatedLegalArrangement: associatedLegalArrangement2,
|
|
1511
|
+
nestedLegalEntityDetails: nestedLegalEntityDetails2
|
|
1512
|
+
}) => {
|
|
1513
|
+
if (nestedLegalEntityDetails2 && associatedLegalArrangement2) {
|
|
1514
|
+
const existingEntityAssociations = getOwnEntityAssociations(associatedLegalArrangement2);
|
|
1515
|
+
const existingRoles = existingEntityAssociations.filter((ea) => ea.legalEntityId === associatedLegalArrangement2.id).map(({ type }) => type);
|
|
1516
|
+
const newRoles = nestedLegalEntityDetails2?.roles ?? [];
|
|
1517
|
+
const rolesChanged = !doArraysMatch(existingRoles, newRoles);
|
|
1518
|
+
if (rolesChanged) {
|
|
1519
|
+
const updatedAssociations = {
|
|
1520
|
+
entityAssociations: [
|
|
1521
|
+
...newRoles.map((role) => ({
|
|
1522
|
+
type: role,
|
|
1523
|
+
legalEntityId: legalEntity.id
|
|
1524
|
+
})) || [],
|
|
1525
|
+
...existingEntityAssociations.filter((ea) => ea.legalEntityId !== legalEntity.id) || []
|
|
1526
|
+
]
|
|
1527
|
+
};
|
|
1528
|
+
await handleUpdateLegalEntity({
|
|
1529
|
+
...updatedAssociations,
|
|
1530
|
+
id: associatedLegalArrangement2.id
|
|
1531
|
+
});
|
|
1532
|
+
}
|
|
1533
|
+
return;
|
|
1534
|
+
} else {
|
|
1535
|
+
const updatedAssociations = {
|
|
1536
|
+
entityAssociations: [
|
|
1537
|
+
{
|
|
1538
|
+
type: LegalEntityTypes.SOLE_PROPRIETORSHIP,
|
|
1539
|
+
legalEntityId: legalEntity.id
|
|
1540
|
+
}
|
|
1541
|
+
]
|
|
1542
|
+
};
|
|
1543
|
+
await handleUpdateLegalEntity({ ...updatedAssociations, id: legalEntityResponse.id });
|
|
1544
|
+
}
|
|
1545
|
+
};
|
|
1546
|
+
const savedLegalEntityData = legalEntityResponse ? mapLegalEntityToBusinessDetailsSchema(legalEntityResponse, void 0) : null;
|
|
1547
|
+
const filteredData = savedLegalEntityData ? setRemovedFieldsOnSchemaToDeletedValue(data, savedLegalEntityData) : data;
|
|
1548
|
+
if (filteredData?.additionalInformation && !filteredData?.additionalInformation?.taxInformation) {
|
|
1549
|
+
filteredData.additionalInformation.taxInformation = void 0;
|
|
1550
|
+
}
|
|
1551
|
+
const isCountryOfGoverningLawEnabled = isExperimentEnabled(
|
|
1552
|
+
"EnableCountryOfGoverningLawForUKCompanies"
|
|
1553
|
+
);
|
|
1554
|
+
const countryOfGoverningLaw = getCountryOfGoverningLaw(
|
|
1555
|
+
isCountryOfGoverningLawEnabled,
|
|
1556
|
+
filteredData?.basicInformation
|
|
1557
|
+
);
|
|
1558
|
+
if (filteredData?.basicInformation) {
|
|
1559
|
+
if (countryOfGoverningLaw) {
|
|
1560
|
+
filteredData.basicInformation.countryOfGoverningLaw = countryOfGoverningLaw;
|
|
1561
|
+
} else {
|
|
1562
|
+
delete filteredData.basicInformation.countryOfGoverningLaw;
|
|
1563
|
+
}
|
|
1564
|
+
}
|
|
1565
|
+
const primaryIndustryCode = data.additionalInformation?.industryCodes && data.additionalInformation.industryCodes[0].id;
|
|
1566
|
+
if (createBusinessLine && updateBusinessLine && primaryIndustryCode) {
|
|
1567
|
+
const bankingBusinessLines = [];
|
|
1568
|
+
const issuingBusinessLines = [];
|
|
1569
|
+
if (efpBusinessLines) {
|
|
1570
|
+
for (const bl of efpBusinessLines) {
|
|
1571
|
+
if (bl.service === "banking") bankingBusinessLines.push(bl);
|
|
1572
|
+
else issuingBusinessLines.push(bl);
|
|
1573
|
+
}
|
|
1574
|
+
}
|
|
1575
|
+
const promises = [];
|
|
1576
|
+
const operations = [];
|
|
1577
|
+
const updateOrCreateBusinessLinesIfNeeded = (businessLines, requestedCapability, service) => {
|
|
1578
|
+
if (businessLines.length) {
|
|
1579
|
+
for (const bl of businessLines) {
|
|
1580
|
+
if (bl.industryCode === primaryIndustryCode) continue;
|
|
1581
|
+
const payload = {
|
|
1582
|
+
id: bl.id,
|
|
1583
|
+
legalEntityId: legalEntityResponse.id,
|
|
1584
|
+
industryCode: primaryIndustryCode,
|
|
1585
|
+
service
|
|
1586
|
+
};
|
|
1587
|
+
promises.push(updateBusinessLine(payload));
|
|
1588
|
+
operations.push(payload);
|
|
1589
|
+
}
|
|
1590
|
+
} else if (requestedCapability) {
|
|
1591
|
+
const payload = {
|
|
1592
|
+
legalEntityId: legalEntityResponse.id,
|
|
1593
|
+
industryCode: primaryIndustryCode,
|
|
1594
|
+
service
|
|
1595
|
+
};
|
|
1596
|
+
promises.push(createBusinessLine(payload));
|
|
1597
|
+
operations.push(payload);
|
|
1598
|
+
}
|
|
1599
|
+
};
|
|
1600
|
+
updateOrCreateBusinessLinesIfNeeded(
|
|
1601
|
+
bankingBusinessLines,
|
|
1602
|
+
requestingBanking(legalEntityResponse),
|
|
1603
|
+
"banking"
|
|
1604
|
+
);
|
|
1605
|
+
updateOrCreateBusinessLinesIfNeeded(
|
|
1606
|
+
issuingBusinessLines,
|
|
1607
|
+
requestingIssuing(legalEntityResponse),
|
|
1608
|
+
"issuing"
|
|
1609
|
+
);
|
|
1610
|
+
let hadRejection = false;
|
|
1611
|
+
(await Promise.allSettled(promises)).forEach((result, idx) => {
|
|
1612
|
+
if (result.status !== "rejected") return;
|
|
1613
|
+
const op = operations[idx];
|
|
1614
|
+
logger.log(
|
|
1615
|
+
`Failed to ${op.id ? "update" : "create"} business line with payload: ${JSON.stringify(op)}`
|
|
1616
|
+
);
|
|
1617
|
+
hadRejection = true;
|
|
1618
|
+
});
|
|
1619
|
+
const eventPayload = {
|
|
1620
|
+
actionType: trackingPayload.actionType,
|
|
1621
|
+
legalEntityName: trackingPayload.legalEntityName
|
|
1622
|
+
};
|
|
1623
|
+
if (!hadRejection) {
|
|
1624
|
+
userEvents?.addTaskEvent("Success", eventPayload);
|
|
1625
|
+
} else {
|
|
1626
|
+
userEvents?.addTaskEvent("Encountered error", {
|
|
1627
|
+
...eventPayload,
|
|
1628
|
+
returnType: "businessLines",
|
|
1629
|
+
returnValue: "couldNotCreateOrUpdateBusinessLine"
|
|
1630
|
+
});
|
|
1631
|
+
showToast({
|
|
1632
|
+
label: t(($) => $["failedToUpdateEfpBusinessLines"], { ns: "business" }),
|
|
1633
|
+
variant: "error"
|
|
1634
|
+
});
|
|
1635
|
+
return setLoadingStatus("success");
|
|
1636
|
+
}
|
|
1637
|
+
}
|
|
1638
|
+
try {
|
|
1639
|
+
const mappedLegalEntity = {
|
|
1640
|
+
...mapBusinessDetailsSchemaToLegalEntity(filteredData, accountHolder, isExperimentEnabled),
|
|
1641
|
+
entityAssociations: filterOutUnwantedAssociationsIfRootLE(
|
|
1642
|
+
taskType,
|
|
1643
|
+
entityToUpdate,
|
|
1644
|
+
accountHolder
|
|
1645
|
+
)
|
|
1646
|
+
};
|
|
1647
|
+
if (mappedLegalEntity.type === LegalEntityTypes.ORGANIZATION && legalEntityResponse.organization?.countryOfGoverningLaw !== mappedLegalEntity.organization?.countryOfGoverningLaw && legalEntityResponse.organization?.support) {
|
|
1648
|
+
mappedLegalEntity.organization.support = determineCustomerSupport(
|
|
1649
|
+
legalEntityResponse.organization.support,
|
|
1650
|
+
mappedLegalEntity.organization?.countryOfGoverningLaw
|
|
1651
|
+
);
|
|
1652
|
+
}
|
|
1653
|
+
const legalEntity = await handleSubmitLegalEntity(mappedLegalEntity);
|
|
1654
|
+
if (taskType === TaskTypes.TRUST_MEMBER_COMPANY || taskType === TaskTypes.UNINCORPORATED_PARTNERSHIP_MEMBER_COMPANY || taskType === TaskTypes.SOLE_PROPRIETOR_COMPANY && !associatedLegalArrangement?.id) {
|
|
1655
|
+
await associateLegalEntityWithParent({
|
|
1656
|
+
legalEntity,
|
|
1657
|
+
associatedLegalArrangement,
|
|
1658
|
+
nestedLegalEntityDetails
|
|
1659
|
+
});
|
|
1660
|
+
}
|
|
1661
|
+
await submitDocuments({
|
|
1662
|
+
data,
|
|
1663
|
+
legalEntity,
|
|
1664
|
+
documentUtils,
|
|
1665
|
+
forms,
|
|
1666
|
+
userEvents
|
|
1667
|
+
});
|
|
1668
|
+
userEvents?.addTaskEvent("Success", trackingPayload);
|
|
1669
|
+
showToast({
|
|
1670
|
+
label: t(($) => $["successfullyUpdatedDetails"], { ns: "common" }),
|
|
1671
|
+
variant: "success"
|
|
1672
|
+
});
|
|
1673
|
+
onExternalSubmit?.(data);
|
|
1674
|
+
} catch (err) {
|
|
1675
|
+
if (isValidationError(err)) {
|
|
1676
|
+
const getErrors = processValidationErrors(err, TaskTypes.BUSINESS_DETAILS);
|
|
1677
|
+
if (getErrors && !Object.keys(getErrors).length) {
|
|
1678
|
+
showToast({
|
|
1679
|
+
label: t(($) => $["failedToUpdateDetails"], { ns: "common" }),
|
|
1680
|
+
variant: "error"
|
|
1681
|
+
});
|
|
1682
|
+
const unmappedErrorNames = err.invalidFields?.map((field) => field.name).filter(Boolean) ?? [];
|
|
1683
|
+
if (unmappedErrorNames.length) {
|
|
1684
|
+
trackingPayload = {
|
|
1685
|
+
...trackingPayload,
|
|
1686
|
+
additionalData: { unmappedErrorNames }
|
|
1687
|
+
};
|
|
1688
|
+
}
|
|
1689
|
+
} else {
|
|
1690
|
+
setProblems({
|
|
1691
|
+
...problems,
|
|
1692
|
+
validationErrors: getErrors
|
|
1693
|
+
});
|
|
1694
|
+
}
|
|
1695
|
+
}
|
|
1696
|
+
if (isMaintenanceModeError(err)) {
|
|
1697
|
+
showToast({
|
|
1698
|
+
label: t(($) => $["maintenanceModeMessage"], { ns: "common" }),
|
|
1699
|
+
variant: "error",
|
|
1700
|
+
duration: "indefinite"
|
|
1701
|
+
});
|
|
1702
|
+
}
|
|
1703
|
+
if (!isValidationError(err) && !isMaintenanceModeError(err)) {
|
|
1704
|
+
showToast({
|
|
1705
|
+
label: t(($) => $["failedToUpdateDetails"], { ns: "common" }),
|
|
1706
|
+
variant: "error"
|
|
1707
|
+
});
|
|
1708
|
+
}
|
|
1709
|
+
logger.error(err);
|
|
1710
|
+
userEvents?.addTaskEvent("Encountered error", {
|
|
1711
|
+
...trackingPayload,
|
|
1712
|
+
returnType: err?.errorCode,
|
|
1713
|
+
returnValue: err?.title || "backend"
|
|
1714
|
+
});
|
|
1715
|
+
} finally {
|
|
1716
|
+
setLoadingStatus("success");
|
|
1717
|
+
}
|
|
1718
|
+
}
|
|
1719
|
+
const getCountryOfGoverningLaw = (isCountryOfGoverningLawEnabled, basicData) => {
|
|
1720
|
+
if (!isCountryOfGoverningLawEnabled || basicData?.country !== CountryCodes.UnitedKingdom) {
|
|
1721
|
+
return void 0;
|
|
1722
|
+
}
|
|
1723
|
+
if (isCountryOfGoverningLawEnabled && basicData?.country === CountryCodes.UnitedKingdom && !basicData?.countryOfGoverningLaw) {
|
|
1724
|
+
return CountryCodes.UnitedKingdom;
|
|
1725
|
+
}
|
|
1726
|
+
return basicData?.countryOfGoverningLaw;
|
|
1727
|
+
};
|
|
1728
|
+
const determineCustomerSupport = (customerSupport, country) => {
|
|
1729
|
+
switch (country) {
|
|
1730
|
+
case CountryCodes.Japan:
|
|
1731
|
+
return unsetCustomerSupportNumber(customerSupport);
|
|
1732
|
+
default:
|
|
1733
|
+
return customerSupport;
|
|
1734
|
+
}
|
|
1735
|
+
};
|
|
1736
|
+
const unsetCustomerSupportNumber = (customerSupport) => {
|
|
1737
|
+
return customerSupport ? {
|
|
1738
|
+
email: customerSupport.email,
|
|
1739
|
+
phone: { number: "", type: "mobile" }
|
|
1740
|
+
} : void 0;
|
|
1741
|
+
};
|
|
1742
|
+
const CountryFieldValidation = () => ({
|
|
1743
|
+
country: {
|
|
1744
|
+
modes: ["blur"],
|
|
1745
|
+
validate: (country) => !isEmpty(country),
|
|
1746
|
+
errorMessage: "fieldIsRequired"
|
|
1747
|
+
}
|
|
1748
|
+
});
|
|
1749
|
+
const CountryOfGoverningLawFieldValidation = () => ({
|
|
1750
|
+
countryOfGoverningLaw: {
|
|
1751
|
+
modes: ["blur"],
|
|
1752
|
+
validate: (countryOfGoverningLaw) => !isEmpty(countryOfGoverningLaw),
|
|
1753
|
+
errorMessage: "fieldIsRequired"
|
|
1754
|
+
}
|
|
1755
|
+
});
|
|
1756
|
+
function basicInformationValidators({
|
|
1757
|
+
country,
|
|
1758
|
+
taxIdNumberType,
|
|
1759
|
+
companyType,
|
|
1760
|
+
registrationNumberType,
|
|
1761
|
+
state,
|
|
1762
|
+
isExperimentEnabled
|
|
1763
|
+
}) {
|
|
1764
|
+
return {
|
|
1765
|
+
country: CountryFieldValidation().country,
|
|
1766
|
+
countryOfGoverningLaw: CountryOfGoverningLawFieldValidation().countryOfGoverningLaw,
|
|
1767
|
+
legalCompanyName: resolveFieldMetadata(
|
|
1768
|
+
isExperimentEnabled("StrictNameAndAddressValidationV4") ? defaultFieldConfigV4[country] : defaultFieldConfig$2[country],
|
|
1769
|
+
{ isBusiness: true },
|
|
1770
|
+
isExperimentEnabled("StrictNameAndAddressValidationV4") ? defaultFieldMetadataV4 : defaultFieldMetadata$2
|
|
1771
|
+
)?.validators,
|
|
1772
|
+
taxInformation: resolveFieldMetadata(
|
|
1773
|
+
taxInformationDefaultFieldConfig[country],
|
|
1774
|
+
{
|
|
1775
|
+
taxIdNumberType,
|
|
1776
|
+
companyType
|
|
1777
|
+
},
|
|
1778
|
+
taxInformationDefaultFieldMetadata
|
|
1779
|
+
)?.validators,
|
|
1780
|
+
stateOrProvince: resolveFieldMetadata(
|
|
1781
|
+
defaultFieldConfig$1[country],
|
|
1782
|
+
{ isBusiness: true },
|
|
1783
|
+
defaultFieldMetadata$1
|
|
1784
|
+
)?.validators,
|
|
1785
|
+
registrationNumber: resolveFieldMetadata(
|
|
1786
|
+
registrationNumberDefaultFieldConfig[country],
|
|
1787
|
+
{
|
|
1788
|
+
companyType,
|
|
1789
|
+
registrationNumberType,
|
|
1790
|
+
state,
|
|
1791
|
+
isExperimentEnabled
|
|
1792
|
+
},
|
|
1793
|
+
registrationNumberDefaultFieldMetadata
|
|
1794
|
+
)?.validators
|
|
1795
|
+
};
|
|
1796
|
+
}
|
|
1797
|
+
function businessSelectionValidators() {
|
|
1798
|
+
return {
|
|
1799
|
+
hasSelectedBusiness: {
|
|
1800
|
+
modes: ["blur", "input"],
|
|
1801
|
+
validate: (value) => typeof value === "boolean",
|
|
1802
|
+
// indicates a selection was made
|
|
1803
|
+
errorMessage: "fieldIsRequired"
|
|
1804
|
+
}
|
|
1805
|
+
};
|
|
1806
|
+
}
|
|
1807
|
+
function additionalInformationValidators({
|
|
1808
|
+
country,
|
|
1809
|
+
taxIdNumberType,
|
|
1810
|
+
companyType,
|
|
1811
|
+
registrationNumberType,
|
|
1812
|
+
vatNumberType,
|
|
1813
|
+
isExperimentEnabled
|
|
1814
|
+
}) {
|
|
1815
|
+
return {
|
|
1816
|
+
hasDoingBusinessAs: doingBusinessAsAbsentFieldMetadata.validators,
|
|
1817
|
+
doingBusinessAs: doingBusinessAsFieldMetadata.validators,
|
|
1818
|
+
registrationNumber: resolveFieldMetadata(
|
|
1819
|
+
registrationNumberDefaultFieldConfig[country],
|
|
1820
|
+
{
|
|
1821
|
+
companyType,
|
|
1822
|
+
registrationNumberType,
|
|
1823
|
+
isExperimentEnabled
|
|
1824
|
+
},
|
|
1825
|
+
registrationNumberDefaultFieldMetadata
|
|
1826
|
+
)?.validators,
|
|
1827
|
+
exemptedFromRegistrationNumber: exemptFromRegistrationNumberDefaultFieldMetadata.validators,
|
|
1828
|
+
taxInformation: resolveFieldMetadata(
|
|
1829
|
+
taxInformationDefaultFieldConfig[country],
|
|
1830
|
+
{
|
|
1831
|
+
taxIdNumberType,
|
|
1832
|
+
companyType
|
|
1833
|
+
},
|
|
1834
|
+
taxInformationDefaultFieldMetadata
|
|
1835
|
+
).validators,
|
|
1836
|
+
vatNumber: resolveFieldMetadata(
|
|
1837
|
+
defaultFieldConfig[country],
|
|
1838
|
+
{ vatNumberType },
|
|
1839
|
+
defaultFieldMetadata
|
|
1840
|
+
).validators,
|
|
1841
|
+
vatAbsenceReason: vatAbsenceReasonMetadata.validators,
|
|
1842
|
+
eInvoicingCode: eInvoicingCodeFieldMetadata.validators,
|
|
1843
|
+
industryCodes: industryCodeFieldMetadata.validators,
|
|
1844
|
+
dateOfIncorporation: dateOfIncorporationFieldMetadata.validators,
|
|
1845
|
+
stockExchangeMIC: stockExchangeMICFieldMetadata.validators,
|
|
1846
|
+
stockISIN: stockISINFieldMetadata.validators,
|
|
1847
|
+
stockTickerSymbol: stockTickerSymbolFieldMetadata.validators
|
|
1848
|
+
};
|
|
1849
|
+
}
|
|
1850
|
+
function BusinessDetailsDropin({
|
|
1851
|
+
taskType = TaskTypes.BUSINESS_DETAILS,
|
|
1852
|
+
country: propCountry,
|
|
1853
|
+
problems: propProblems,
|
|
1854
|
+
legalEntityResponse,
|
|
1855
|
+
associatedLegalArrangement,
|
|
1856
|
+
// initially undefined when creating entity
|
|
1857
|
+
nestedLegalEntity,
|
|
1858
|
+
// initially undefined when creating entity
|
|
1859
|
+
nestedLegalEntityDetails,
|
|
1860
|
+
// has entity roles for association logic
|
|
1861
|
+
onSubmit: onExternalSubmit,
|
|
1862
|
+
handleHomeClick,
|
|
1863
|
+
asModal = false
|
|
1864
|
+
}) {
|
|
1865
|
+
const { t, i18n } = useTranslation(["common", "business"]);
|
|
1866
|
+
const { baseUrl, rootLegalEntityId } = useApiContext();
|
|
1867
|
+
const userEvents = useAnalyticsContext();
|
|
1868
|
+
const { showToast } = useToastContext();
|
|
1869
|
+
const queryClient = useQueryClient();
|
|
1870
|
+
const { isExperimentEnabled } = useExperimentsContext();
|
|
1871
|
+
const { isSettingEnabled } = useSettingsContext();
|
|
1872
|
+
const { accountHolder, setAccountHolder } = useAccountHolder();
|
|
1873
|
+
const { mutateAsync: createLegalEntity } = useCreateLegalEntity();
|
|
1874
|
+
const { mutateAsync: updateLegalEntity } = useUpdateLegalEntity();
|
|
1875
|
+
const logger = createLogger();
|
|
1876
|
+
const isSoleProp = accountHolder === "mySoleProprietorName";
|
|
1877
|
+
const isAssociationTaskType = !taskType ? accountHolder !== "theCompanyIWorkFor" : taskType !== TaskTypes.BUSINESS_DETAILS;
|
|
1878
|
+
const legalEntityType = !isSoleProp ? LegalEntityTypes.ORGANIZATION : LegalEntityTypes.SOLE_PROPRIETORSHIP;
|
|
1879
|
+
const subjectEntity = !isAssociationTaskType ? legalEntityResponse : isSoleProp ? associatedLegalArrangement : nestedLegalEntity;
|
|
1880
|
+
const [country, setCountry] = useState(propCountry);
|
|
1881
|
+
const [documents, setDocuments] = useState();
|
|
1882
|
+
const [problems, setProblems] = useState(propProblems ?? {});
|
|
1883
|
+
const [loadingStatus, setLoadingStatus] = useState("success");
|
|
1884
|
+
const [derivedProps, setDerivedProps] = useState();
|
|
1885
|
+
const [trustedFields, setTrustedFields] = useState(subjectEntity?.trustedFields ?? void 0);
|
|
1886
|
+
const defaultForms = useMemo(() => getForms(country), [country]);
|
|
1887
|
+
const documentUtils = documentApiUtils({
|
|
1888
|
+
baseUrl: baseUrl.value,
|
|
1889
|
+
rootLegalEntityId: rootLegalEntityId.value
|
|
1890
|
+
});
|
|
1891
|
+
useEffect(() => {
|
|
1892
|
+
if (!subjectEntity?.documentDetails?.length) return;
|
|
1893
|
+
documentUtils.fetchDocuments(subjectEntity.documentDetails, subjectEntity?.id).then(() => {
|
|
1894
|
+
setDocuments(mapApiDocumentToBusinessDetailsDocuments(subjectEntity?.id));
|
|
1895
|
+
}).catch(() => {
|
|
1896
|
+
showToast({
|
|
1897
|
+
label: t(($) => $["failedToFetchRelevantDocuments"], { ns: "common" }),
|
|
1898
|
+
variant: "error"
|
|
1899
|
+
});
|
|
1900
|
+
});
|
|
1901
|
+
}, [subjectEntity?.documentDetails, subjectEntity?.id]);
|
|
1902
|
+
useEffect(() => {
|
|
1903
|
+
userEvents.updateBaseTrackingPayload({ task: taskType });
|
|
1904
|
+
userEvents.addTaskEvent("Landed on page", {
|
|
1905
|
+
actionType: "start"
|
|
1906
|
+
});
|
|
1907
|
+
}, []);
|
|
1908
|
+
const parseConfiguration = useCallback(
|
|
1909
|
+
({ scenarios }) => composePerScenarioFormConfigurations(scenarios, businessDetailsFieldsPerScenario),
|
|
1910
|
+
[]
|
|
1911
|
+
);
|
|
1912
|
+
const { fieldConfigurations } = useScenarioConfiguration({
|
|
1913
|
+
legalEntityType,
|
|
1914
|
+
parseConfiguration,
|
|
1915
|
+
setLoadingStatus,
|
|
1916
|
+
country
|
|
1917
|
+
});
|
|
1918
|
+
const { data: efpBusinessLines } = useBusinessLines(ALLOWED_SOF_SERVICES, {
|
|
1919
|
+
enabled: isSettingEnabled("allowBusinessLines")
|
|
1920
|
+
});
|
|
1921
|
+
const defaultData = useMemo(() => {
|
|
1922
|
+
const mapped = mapLegalEntityToBusinessDetailsSchema(
|
|
1923
|
+
!isAssociationTaskType ? legalEntityResponse : isSoleProp ? associatedLegalArrangement ?? legalEntityResponse : nestedLegalEntity,
|
|
1924
|
+
isSoleProp ? legalEntityResponse : void 0
|
|
1925
|
+
);
|
|
1926
|
+
const initialEfpBusinessLineData = isSettingEnabled("allowBusinessLines") && efpBusinessLines && efpBusinessLines.length > 0 ? {
|
|
1927
|
+
additionalInformation: {
|
|
1928
|
+
...mapped.additionalInformation,
|
|
1929
|
+
industryCodes: [
|
|
1930
|
+
{
|
|
1931
|
+
id: efpBusinessLines[0].industryCode,
|
|
1932
|
+
name: `${efpBusinessLines[0].industryCode} - ${efpBusinessLines[0].industryCodeDescription}`
|
|
1933
|
+
}
|
|
1934
|
+
]
|
|
1935
|
+
}
|
|
1936
|
+
} : {};
|
|
1937
|
+
return {
|
|
1938
|
+
...mapped,
|
|
1939
|
+
...documents,
|
|
1940
|
+
...initialEfpBusinessLineData
|
|
1941
|
+
};
|
|
1942
|
+
}, [
|
|
1943
|
+
isAssociationTaskType,
|
|
1944
|
+
legalEntityResponse,
|
|
1945
|
+
isSoleProp,
|
|
1946
|
+
associatedLegalArrangement,
|
|
1947
|
+
nestedLegalEntity,
|
|
1948
|
+
documents,
|
|
1949
|
+
efpBusinessLines,
|
|
1950
|
+
isSettingEnabled
|
|
1951
|
+
]);
|
|
1952
|
+
const buildFieldValidations = useCallback(
|
|
1953
|
+
(data) => {
|
|
1954
|
+
const taxInfo = data?.basicInformation?.taxInformation ?? data?.additionalInformation?.taxInformation;
|
|
1955
|
+
const taxIdType = taxInfo?.length ? taxInfo.find((taxId) => taxId.country === country)?.type : void 0;
|
|
1956
|
+
const regNumberType = data?.basicInformation?.registrationNumberType ?? data?.additionalInformation?.registrationNumberType;
|
|
1957
|
+
return {
|
|
1958
|
+
basicInformation: basicInformationValidators({
|
|
1959
|
+
country,
|
|
1960
|
+
state: data?.basicInformation?.stateOrProvince,
|
|
1961
|
+
companyType: data?.companyStructure?.entityType,
|
|
1962
|
+
taxIdNumberType: taxIdType,
|
|
1963
|
+
registrationNumberType: regNumberType,
|
|
1964
|
+
isExperimentEnabled
|
|
1965
|
+
}),
|
|
1966
|
+
businessSelection: businessSelectionValidators(),
|
|
1967
|
+
companyStructure: CompanyStructureValidation,
|
|
1968
|
+
additionalInformation: additionalInformationValidators({
|
|
1969
|
+
country,
|
|
1970
|
+
taxIdNumberType: taxIdType,
|
|
1971
|
+
companyType: data?.companyStructure?.entityType,
|
|
1972
|
+
registrationNumberType: regNumberType,
|
|
1973
|
+
vatNumberType: data?.additionalInformation?.vatNumberType,
|
|
1974
|
+
isExperimentEnabled
|
|
1975
|
+
}),
|
|
1976
|
+
financialInformation: financialInfoValidationWithEmployeesRules
|
|
1977
|
+
};
|
|
1978
|
+
},
|
|
1979
|
+
[country, isExperimentEnabled]
|
|
1980
|
+
);
|
|
1981
|
+
const multiForm = useMultiForm({
|
|
1982
|
+
defaultData,
|
|
1983
|
+
allFields: derivedProps?.allFields,
|
|
1984
|
+
requiredFields: derivedProps?.requiredFields,
|
|
1985
|
+
optionalFields: derivedProps?.optionalFields,
|
|
1986
|
+
obscuredFields: derivedProps?.obscuredFields,
|
|
1987
|
+
trustedFields: derivedProps?.trustedFields,
|
|
1988
|
+
rules: buildFieldValidations
|
|
1989
|
+
});
|
|
1990
|
+
const isTinMatched = tinMatched.value;
|
|
1991
|
+
const customRules = useMemo(
|
|
1992
|
+
() => rules({
|
|
1993
|
+
data: multiForm.data,
|
|
1994
|
+
country,
|
|
1995
|
+
taskType,
|
|
1996
|
+
isExperimentEnabled,
|
|
1997
|
+
isSettingEnabled,
|
|
1998
|
+
accountHolder,
|
|
1999
|
+
tinMatched: isTinMatched,
|
|
2000
|
+
rootLegalEntity: legalEntityResponse
|
|
2001
|
+
}),
|
|
2002
|
+
[
|
|
2003
|
+
multiForm.data,
|
|
2004
|
+
country,
|
|
2005
|
+
taskType,
|
|
2006
|
+
isExperimentEnabled,
|
|
2007
|
+
isSettingEnabled,
|
|
2008
|
+
accountHolder,
|
|
2009
|
+
isTinMatched,
|
|
2010
|
+
legalEntityResponse
|
|
2011
|
+
]
|
|
2012
|
+
);
|
|
2013
|
+
useEffect(() => {
|
|
2014
|
+
const props = getPropsFromConfigurations({
|
|
2015
|
+
scenarioConfiguration: fieldConfigurations,
|
|
2016
|
+
forms: defaultForms,
|
|
2017
|
+
remediationActions: problems?.remediationActions ? Object.values(problems?.remediationActions) : [],
|
|
2018
|
+
dataMissingErrors: problems?.missingData ?? [],
|
|
2019
|
+
fieldsWithExistingData: subjectEntity ? subjectEntity.type === LegalEntityTypes.SOLE_PROPRIETORSHIP ? getFieldsWithExistingData(
|
|
2020
|
+
subjectEntity,
|
|
2021
|
+
solePropBusinessDetailsApiKeyMapping,
|
|
2022
|
+
solePropBusinessDetailsDocumentMapping
|
|
2023
|
+
) : getFieldsWithExistingData(
|
|
2024
|
+
subjectEntity,
|
|
2025
|
+
businessDetailsApiKeyMapping,
|
|
2026
|
+
businessDetailsDocumentMapping
|
|
2027
|
+
) : [],
|
|
2028
|
+
customRules,
|
|
2029
|
+
legalEntityType: subjectEntity?.type,
|
|
2030
|
+
legalEntityTrustedFields: trustedFields
|
|
2031
|
+
});
|
|
2032
|
+
setDerivedProps(props);
|
|
2033
|
+
}, [
|
|
2034
|
+
customRules,
|
|
2035
|
+
defaultForms,
|
|
2036
|
+
subjectEntity,
|
|
2037
|
+
problems?.missingData,
|
|
2038
|
+
problems?.remediationActions,
|
|
2039
|
+
trustedFields,
|
|
2040
|
+
fieldConfigurations
|
|
2041
|
+
]);
|
|
2042
|
+
const [prevCountry, setPrevCountry] = useState(multiForm.data.basicInformation?.country);
|
|
2043
|
+
if (multiForm.data.basicInformation?.country && prevCountry !== multiForm.data.basicInformation?.country) {
|
|
2044
|
+
setCountry(multiForm.data?.basicInformation?.country);
|
|
2045
|
+
setPrevCountry(multiForm.data.basicInformation?.country);
|
|
2046
|
+
setTrustedFields(void 0);
|
|
2047
|
+
verifiedBusiness.value = void 0;
|
|
2048
|
+
tinMatched.value = void 0;
|
|
2049
|
+
businessMismatchModalOpen.value = false;
|
|
2050
|
+
}
|
|
2051
|
+
const [forms, setForms] = useState(
|
|
2052
|
+
buildRequiredForms({
|
|
2053
|
+
config: {
|
|
2054
|
+
forms: defaultForms,
|
|
2055
|
+
requiredFields: derivedProps?.requiredFields,
|
|
2056
|
+
optionalFields: derivedProps?.optionalFields,
|
|
2057
|
+
isValid: multiForm.isValid ?? {},
|
|
2058
|
+
problems,
|
|
2059
|
+
isSettingEnabled,
|
|
2060
|
+
accountHolder,
|
|
2061
|
+
legalEntityResponse
|
|
2062
|
+
},
|
|
2063
|
+
options: {
|
|
2064
|
+
hasNoSearchResults: false
|
|
2065
|
+
}
|
|
2066
|
+
})
|
|
2067
|
+
);
|
|
2068
|
+
const updateForms = useCallback(
|
|
2069
|
+
({ searchResults }) => {
|
|
2070
|
+
const updatedForms = buildRequiredForms({
|
|
2071
|
+
config: {
|
|
2072
|
+
forms: defaultForms,
|
|
2073
|
+
requiredFields: derivedProps?.requiredFields,
|
|
2074
|
+
optionalFields: derivedProps?.optionalFields,
|
|
2075
|
+
isValid: multiForm.isValid ?? {},
|
|
2076
|
+
problems,
|
|
2077
|
+
isSettingEnabled,
|
|
2078
|
+
accountHolder,
|
|
2079
|
+
legalEntityResponse
|
|
2080
|
+
},
|
|
2081
|
+
options: {
|
|
2082
|
+
hasNoSearchResults: searchResults && !searchResults.length
|
|
2083
|
+
}
|
|
2084
|
+
});
|
|
2085
|
+
setForms(updatedForms);
|
|
2086
|
+
return updatedForms;
|
|
2087
|
+
},
|
|
2088
|
+
[
|
|
2089
|
+
defaultForms,
|
|
2090
|
+
derivedProps?.optionalFields,
|
|
2091
|
+
derivedProps?.requiredFields,
|
|
2092
|
+
multiForm.isValid,
|
|
2093
|
+
problems,
|
|
2094
|
+
isSettingEnabled,
|
|
2095
|
+
accountHolder,
|
|
2096
|
+
legalEntityResponse
|
|
2097
|
+
]
|
|
2098
|
+
);
|
|
2099
|
+
const summaryData = useMemo(
|
|
2100
|
+
() => formatDataForSummary(multiForm.data, forms, t, i18n.language, isExperimentEnabled),
|
|
2101
|
+
[multiForm.data, forms, t, i18n.language, isExperimentEnabled]
|
|
2102
|
+
);
|
|
2103
|
+
const { mutateAsync: createBusinessLine } = useCreateBusinessLine();
|
|
2104
|
+
const { mutateAsync: updateBusinessLine } = useUpdateBusinessLine();
|
|
2105
|
+
const submitTask = useCallback(() => {
|
|
2106
|
+
setAccountHolder(accountHolder);
|
|
2107
|
+
return submit({
|
|
2108
|
+
data: multiForm.data,
|
|
2109
|
+
legalEntityResponse,
|
|
2110
|
+
associatedLegalArrangement,
|
|
2111
|
+
nestedLegalEntity,
|
|
2112
|
+
nestedLegalEntityDetails,
|
|
2113
|
+
problems,
|
|
2114
|
+
taskType: taskType ?? TaskTypes.BUSINESS_DETAILS,
|
|
2115
|
+
accountHolder: accountHolder ?? "theCompanyIWorkFor",
|
|
2116
|
+
forms,
|
|
2117
|
+
documentUtils,
|
|
2118
|
+
t,
|
|
2119
|
+
showToast,
|
|
2120
|
+
setLoadingStatus,
|
|
2121
|
+
setProblems,
|
|
2122
|
+
handleUpdateLegalEntity: updateLegalEntity,
|
|
2123
|
+
createLegalEntity,
|
|
2124
|
+
onExternalSubmit,
|
|
2125
|
+
isExperimentEnabled,
|
|
2126
|
+
userEvents,
|
|
2127
|
+
efpBusinessLines,
|
|
2128
|
+
createBusinessLine,
|
|
2129
|
+
updateBusinessLine
|
|
2130
|
+
});
|
|
2131
|
+
}, [
|
|
2132
|
+
setAccountHolder,
|
|
2133
|
+
accountHolder,
|
|
2134
|
+
multiForm.data,
|
|
2135
|
+
legalEntityResponse,
|
|
2136
|
+
associatedLegalArrangement,
|
|
2137
|
+
nestedLegalEntity,
|
|
2138
|
+
nestedLegalEntityDetails,
|
|
2139
|
+
problems,
|
|
2140
|
+
taskType,
|
|
2141
|
+
forms,
|
|
2142
|
+
documentUtils,
|
|
2143
|
+
t,
|
|
2144
|
+
showToast,
|
|
2145
|
+
updateLegalEntity,
|
|
2146
|
+
createLegalEntity,
|
|
2147
|
+
onExternalSubmit,
|
|
2148
|
+
isExperimentEnabled,
|
|
2149
|
+
userEvents,
|
|
2150
|
+
efpBusinessLines,
|
|
2151
|
+
createBusinessLine,
|
|
2152
|
+
updateBusinessLine
|
|
2153
|
+
]);
|
|
2154
|
+
const {
|
|
2155
|
+
handleNextClick,
|
|
2156
|
+
handleBackClick,
|
|
2157
|
+
activeForm,
|
|
2158
|
+
shouldValidate,
|
|
2159
|
+
gotoFormByFormIndex,
|
|
2160
|
+
steps
|
|
2161
|
+
} = useFormComposer({
|
|
2162
|
+
problems,
|
|
2163
|
+
forms,
|
|
2164
|
+
onSubmit: submitTask,
|
|
2165
|
+
triggerValidation: multiForm.triggerValidation
|
|
2166
|
+
});
|
|
2167
|
+
const handleBusinessMismatchContinue = () => {
|
|
2168
|
+
setTrustedFields([]);
|
|
2169
|
+
businessMismatchModalOpen.value = false;
|
|
2170
|
+
handleNextClick();
|
|
2171
|
+
};
|
|
2172
|
+
const handleBusinessMismatchCancel = () => {
|
|
2173
|
+
handleBackClick?.();
|
|
2174
|
+
businessMismatchModalOpen.value = false;
|
|
2175
|
+
tinMatched.value = false;
|
|
2176
|
+
};
|
|
2177
|
+
const companySearchQueryInput = {
|
|
2178
|
+
name: multiForm.data?.basicInformation?.legalCompanyName ?? "",
|
|
2179
|
+
country: multiForm.data?.basicInformation?.country,
|
|
2180
|
+
state: multiForm.data?.basicInformation?.stateOrProvince,
|
|
2181
|
+
registrationNumber: multiForm.data?.basicInformation?.registrationNumber
|
|
2182
|
+
};
|
|
2183
|
+
const verifyTinQueryInput = {
|
|
2184
|
+
name: multiForm.data.basicInformation?.legalCompanyName ?? "",
|
|
2185
|
+
tin: multiForm.data?.basicInformation?.taxInformation?.find((taxId) => taxId.country === country)?.number ?? ""
|
|
2186
|
+
};
|
|
2187
|
+
const {
|
|
2188
|
+
data: companySearchResponse,
|
|
2189
|
+
isLoading: searchingCompanies,
|
|
2190
|
+
isError: searchingError
|
|
2191
|
+
} = useCompanySearch(companySearchQueryInput, {
|
|
2192
|
+
enabled: false
|
|
2193
|
+
});
|
|
2194
|
+
useEffect(() => {
|
|
2195
|
+
if (!searchingCompanies && companySearchResponse?.results) {
|
|
2196
|
+
userEvents.addPageEvent("Success", {
|
|
2197
|
+
actionType: "submit",
|
|
2198
|
+
returnValue: "companySearch",
|
|
2199
|
+
additionalData: {
|
|
2200
|
+
numberOfResults: companySearchResponse?.results.length
|
|
2201
|
+
}
|
|
2202
|
+
});
|
|
2203
|
+
}
|
|
2204
|
+
}, [searchingCompanies, userEvents, subjectEntity, companySearchResponse?.results]);
|
|
2205
|
+
const companySelectionInput = {
|
|
2206
|
+
company: companySearchResponse?.results[0],
|
|
2207
|
+
state: multiForm.data.basicInformation?.stateOrProvince,
|
|
2208
|
+
name: multiForm.data?.basicInformation?.legalCompanyName ?? "",
|
|
2209
|
+
tin: multiForm.data?.basicInformation?.taxInformation?.find((taxId) => taxId.country === country)?.number ?? ""
|
|
2210
|
+
};
|
|
2211
|
+
useVerifyTin(verifyTinQueryInput, { enabled: false });
|
|
2212
|
+
const attemptBusinessSearch = async () => {
|
|
2213
|
+
if (customRules.countryUsingCompanySearch() !== "REQUIRED") {
|
|
2214
|
+
const currentForms = updateForms({ searchResults: [] });
|
|
2215
|
+
return handleNextClick(currentForms);
|
|
2216
|
+
}
|
|
2217
|
+
try {
|
|
2218
|
+
setLoadingStatus("loading");
|
|
2219
|
+
tinMatched.value = void 0;
|
|
2220
|
+
verifiedBusiness.value = void 0;
|
|
2221
|
+
isVerifiedSingleCompanySearchResult.value = false;
|
|
2222
|
+
const searchResponse = await queryClient.fetchQuery({
|
|
2223
|
+
queryKey: ["companySearch", companySearchQueryInput]
|
|
2224
|
+
});
|
|
2225
|
+
let currentForms = updateForms({ searchResults: searchResponse.results });
|
|
2226
|
+
const handleTinResponse = (matched) => {
|
|
2227
|
+
if (matched) {
|
|
2228
|
+
tinMatched.value = true;
|
|
2229
|
+
} else {
|
|
2230
|
+
businessMismatchModalOpen.value = true;
|
|
2231
|
+
tinMatched.value = false;
|
|
2232
|
+
}
|
|
2233
|
+
return tinMatched.value;
|
|
2234
|
+
};
|
|
2235
|
+
if (searchResponse?.results.length === 1 && isNormalizedStringMatch(
|
|
2236
|
+
multiForm.data?.basicInformation?.legalCompanyName ?? "",
|
|
2237
|
+
searchResponse.results[0].name
|
|
2238
|
+
)) {
|
|
2239
|
+
const companySelectionResponse = await handleCompanySelection(
|
|
2240
|
+
rootLegalEntityId.value,
|
|
2241
|
+
baseUrl.value,
|
|
2242
|
+
{ ...companySelectionInput, company: searchResponse.results[0] }
|
|
2243
|
+
);
|
|
2244
|
+
if (handleTinResponse(!!companySelectionResponse.tinMatched)) {
|
|
2245
|
+
verifiedBusiness.value = companySelectionResponse;
|
|
2246
|
+
isVerifiedSingleCompanySearchResult.value = true;
|
|
2247
|
+
applyVerifiedBusinessData(multiForm, country, verifiedBusiness.value);
|
|
2248
|
+
currentForms = updateForms({ searchResults: searchResponse.results });
|
|
2249
|
+
} else {
|
|
2250
|
+
return setLoadingStatus("success");
|
|
2251
|
+
}
|
|
2252
|
+
}
|
|
2253
|
+
if (!searchResponse.results.length) {
|
|
2254
|
+
const tinVerificationResponse = await queryClient.fetchQuery({
|
|
2255
|
+
queryKey: ["verifyTin", verifyTinQueryInput]
|
|
2256
|
+
});
|
|
2257
|
+
if (!handleTinResponse(!!tinVerificationResponse?.matched)) {
|
|
2258
|
+
return setLoadingStatus("success");
|
|
2259
|
+
}
|
|
2260
|
+
}
|
|
2261
|
+
setLoadingStatus("success");
|
|
2262
|
+
return handleNextClick(currentForms);
|
|
2263
|
+
} catch (e) {
|
|
2264
|
+
logger.error(e);
|
|
2265
|
+
setLoadingStatus("error");
|
|
2266
|
+
const currentForms = updateForms({ searchResults: [] });
|
|
2267
|
+
return handleNextClick(currentForms);
|
|
2268
|
+
}
|
|
2269
|
+
};
|
|
2270
|
+
const overrideNextClick = async () => {
|
|
2271
|
+
if (!activeForm.isValid) return handleNextClick();
|
|
2272
|
+
if (!COUNTRIES_USING_COMPANY_SEARCH.includes(country) || isSoleProp) {
|
|
2273
|
+
return handleNextClick();
|
|
2274
|
+
}
|
|
2275
|
+
switch (activeForm.formId) {
|
|
2276
|
+
case "basicInformation": {
|
|
2277
|
+
return await attemptBusinessSearch();
|
|
2278
|
+
}
|
|
2279
|
+
case "businessSelection": {
|
|
2280
|
+
const currentForms = updateForms({
|
|
2281
|
+
searchResults: companySearchResponse?.results
|
|
2282
|
+
});
|
|
2283
|
+
return handleNextClick(currentForms);
|
|
2284
|
+
}
|
|
2285
|
+
default:
|
|
2286
|
+
return handleNextClick();
|
|
2287
|
+
}
|
|
2288
|
+
};
|
|
2289
|
+
useEffect(() => {
|
|
2290
|
+
updateForms({
|
|
2291
|
+
searchResults: searchingError ? [] : companySearchResponse?.results
|
|
2292
|
+
});
|
|
2293
|
+
}, [updateForms, companySearchResponse?.results, searchingError]);
|
|
2294
|
+
return /* @__PURE__ */ jsx(FormContextProvider, { form: multiForm, children: /* @__PURE__ */ jsxs(
|
|
2295
|
+
FormFlow,
|
|
2296
|
+
{
|
|
2297
|
+
summary: {
|
|
2298
|
+
data: summaryData,
|
|
2299
|
+
omitted: {
|
|
2300
|
+
keys: ["operationalAddressIsSame"],
|
|
2301
|
+
forms: ["businessSelection"]
|
|
2302
|
+
},
|
|
2303
|
+
problems,
|
|
2304
|
+
showLegalCaption: true
|
|
2305
|
+
},
|
|
2306
|
+
asModal,
|
|
2307
|
+
currentStep: steps.current,
|
|
2308
|
+
totalSteps: steps.total,
|
|
2309
|
+
forms,
|
|
2310
|
+
disableNextButton: activeForm.formId === "businessSelection",
|
|
2311
|
+
gotoFormByFormIndex,
|
|
2312
|
+
handleNextClick: overrideNextClick,
|
|
2313
|
+
handleBackClick,
|
|
2314
|
+
handleCancelClick: handleHomeClick,
|
|
2315
|
+
loadingStatus,
|
|
2316
|
+
children: [
|
|
2317
|
+
/* @__PURE__ */ jsx(
|
|
2318
|
+
BusinessDetailsMultiform,
|
|
2319
|
+
{
|
|
2320
|
+
taskType,
|
|
2321
|
+
activeForm,
|
|
2322
|
+
country,
|
|
2323
|
+
shouldValidate,
|
|
2324
|
+
problems,
|
|
2325
|
+
handleNextClick: overrideNextClick,
|
|
2326
|
+
handleBackClick,
|
|
2327
|
+
setLoadingStatus,
|
|
2328
|
+
isTopLevelEntity: taskType === TaskTypes.BUSINESS_DETAILS
|
|
2329
|
+
}
|
|
2330
|
+
),
|
|
2331
|
+
businessMismatchModalOpen.value && /* @__PURE__ */ jsx(
|
|
2332
|
+
Confirm,
|
|
2333
|
+
{
|
|
2334
|
+
title: t(($) => $["businessSelection__tinVerificationFailureModalHeader"], {
|
|
2335
|
+
ns: "business"
|
|
2336
|
+
}),
|
|
2337
|
+
description: t(($) => $["businessSelection__tinVerificationFailureModalContent"], {
|
|
2338
|
+
ns: "business"
|
|
2339
|
+
}),
|
|
2340
|
+
cancelText: t(
|
|
2341
|
+
($) => $["businessSelection__tinVerificationFailureModalSecondaryButton"],
|
|
2342
|
+
{ ns: "business" }
|
|
2343
|
+
),
|
|
2344
|
+
confirmText: t(
|
|
2345
|
+
($) => $["businessSelection__tinVerificationFailureModalPrimaryButton"],
|
|
2346
|
+
{ ns: "business" }
|
|
2347
|
+
),
|
|
2348
|
+
onCancel: handleBusinessMismatchCancel,
|
|
2349
|
+
onConfirm: handleBusinessMismatchContinue,
|
|
2350
|
+
analyticsEventLabel: "tinVerificationFailureModal"
|
|
2351
|
+
}
|
|
2352
|
+
)
|
|
2353
|
+
]
|
|
2354
|
+
}
|
|
2355
|
+
) });
|
|
2356
|
+
}
|
|
2357
|
+
export {
|
|
2358
|
+
BusinessDetailsDropin as B
|
|
2359
|
+
};
|