@adyen/kyc-components 4.0.0-beta.1 → 4.0.0-beta.4
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/{AcceptTermsOfServiceComponent-BQ4Yct7L.js → AcceptTermsOfServiceComponent-ilX6szf9.js} +85 -82
- package/dist/{AccountSetupRejected-UVhxMcAe.js → AccountSetupRejected-CQjHA557.js} +6 -6
- package/dist/{Avatar-NEiNEcRx.js → Avatar-BfRRf9_a.js} +2 -2
- package/dist/{BusinessDetailsDropin-l0xfPekL.js → BusinessDetailsDropin-Dr580mIQ.js} +429 -405
- package/dist/{BusinessFinancingComponent-Bs-poF2d.js → BusinessFinancingComponent-CEIG-4wN.js} +3 -3
- package/dist/{BusinessFinancingDropin-DoRzdS4n.js → BusinessFinancingDropin-sC3QpkDx.js} +537 -489
- package/dist/{BusinessFinancingPage-DSlmJmOK.js → BusinessFinancingPage-BIEuNfKE.js} +3 -3
- package/dist/{BusinessTypeSelectionPage-Bmi_8K2g.js → BusinessTypeSelectionPage-6sF2ce3o.js} +111 -145
- package/dist/{CZ-BhoS6sd6.js → CZ-BiPeoA9G.js} +11 -1
- package/dist/{ContractViewer-R4-gfVmp.js → ContractViewer-BOxsPeO1.js} +306 -297
- package/dist/{CreateIndividualComponent-D3aXuYRk.js → CreateIndividualComponent-t9eDVjpb.js} +8 -8
- package/dist/{CreateTransferInstrumentComponent-C-ncZ-A8.js → CreateTransferInstrumentComponent-D65FAcQz.js} +7 -7
- package/dist/{CustomerSupport-CMFRgQNa.js → CustomerSupport-CoLWcgoS.js} +27 -32
- package/dist/{DebugModal-BEmhG3UP.js → DebugModal-DkICAsiu.js} +33 -239
- package/dist/{DecisionMakerDetailsPage-DI2Ubmef.js → DecisionMakerDetailsPage-CvmwdHqV.js} +4 -4
- package/dist/DecisionMakers-DthVv8_t.js +478 -0
- package/dist/{EmbeddedStatus-BsZsXbKc.js → EmbeddedStatus-DdGnEZzS.js} +16 -16
- package/dist/FormEndState-CUYkLBgX.js +59 -0
- package/dist/{FormFlow-Bt-mu4Wm.js → FormFlow-CNXkXUwa.js} +19 -20
- package/dist/{HU-v3vOxRm8.js → HU-D8vJYkDH.js} +10 -1
- package/dist/{IndividualOnfidoDropin-DGMCOm9M.js → IndividualOnfidoDropin-DV2fJG5W.js} +919 -895
- package/dist/{Introduction-DJ6qIUPC.js → Introduction-B1WXHc-7.js} +53 -57
- package/dist/{ProviderButton-DAsW5EVa.js → LandingLayout-BC3pp_IY.js} +93 -86
- package/dist/{LegalRepresentativeDetailsPage-CyHwQR_W.js → LegalRepresentativeDetailsPage-9xm-XCto.js} +4 -4
- package/dist/{ManageIndividualComponent-BIMCvcr2.js → ManageIndividualComponent-zCo6mUQx.js} +9 -13
- package/dist/{ManageTermsOfServiceComponent-CsM23jq3.js → ManageTermsOfServiceComponent-DpQXgPYk.js} +7 -8
- package/dist/{ManageTransferInstrumentComponent-Vut9_bRn.js → ManageTransferInstrumentComponent-BKERoin1.js} +23 -31
- package/dist/{OnboardingDropinComponent-BW6er2HU.js → OnboardingDropinComponent-DYdts9Sh.js} +521 -398
- package/dist/{Review-DWDbL9-9.js → Review-jBq7cFVv.js} +11 -11
- package/dist/RootBusinessDetailsPage-BfO0Xb7n.js +1848 -0
- package/dist/{RootIndividualDetailsPage-DCxJ3ycQ.js → RootIndividualDetailsPage-DzmHoceW.js} +4 -4
- package/dist/{SignPCIComponent-kHaxhkWa.js → SignPCIComponent-By4PazmA.js} +32 -38
- package/dist/{SingpassSelection-Dmlbiq4Z.js → SingpassSelection-BeUj9Kdy.js} +12 -15
- package/dist/{SoleProprietorshipPage-Bdhs90-q.js → SoleProprietorshipPage-CZPeKEEl.js} +4 -4
- package/dist/{SourceOfFundsPage-Bj22DAFv.js → SourceOfFundsPage-CI1qdFId.js} +508 -488
- package/dist/{StoreProvider-BmzY19Td.js → StoreProvider-O9jwxfG8.js} +20832 -21372
- package/dist/{TaskItemStatus-CB6FEOnk.js → TaskItemStatus-s7Z3DOGa.js} +24 -24
- package/dist/TaskStatusIndicator-BanufME0.js +69 -0
- package/dist/{TaxReportingDropin-jofokkei.js → TaxReportingDropin-BQqDUn9I.js} +82 -101
- package/dist/{TileGroup-i5Jc08ns.js → TileGroup-tu04B8GK.js} +6 -8
- package/dist/{TrustDetailsPage-B6HmvYUf.js → TrustDetailsPage-BQKZ_ZyU.js} +91 -80
- package/dist/{TrustMemberCompanyPage-D3VJOq6a.js → TrustMemberCompanyPage-C9aFr4Bm.js} +5 -5
- package/dist/{TrustMemberIndividualPage-1aeOYsnG.js → TrustMemberIndividualPage-Ci7hwMA_.js} +4 -4
- package/dist/{UnincorporatedPartnershipIndividualPage-Bt7e6ncF.js → UnincorporatedPartnershipIndividualPage-XQsgF3ou.js} +4 -4
- package/dist/{UnincorporatedPartnershipMemberCompanyPage-Ck5C_SEU.js → UnincorporatedPartnershipMemberCompanyPage-DFe_N3gH.js} +4 -4
- package/dist/{VerificationErrorAlert-DhtKOmjt.js → VerificationErrorAlert-Ci0cObw1.js} +20 -9
- package/dist/{ViewVerificationStatusComponent-DtKLcCGI.js → ViewVerificationStatusComponent-_qQmZFDY.js} +22 -21
- package/dist/adyen-business-financing.js +8 -12
- package/dist/adyen-individual.js +6 -4
- package/dist/adyen-kyc-components.js +144 -118
- package/dist/adyen-manage-individual.js +2 -2
- package/dist/adyen-manage-terms-of-service.js +3 -3
- package/dist/adyen-manage-transfer-instruments.js +3 -3
- package/dist/adyen-onboarding.js +14 -6
- package/dist/adyen-terms-of-service.js +18 -6
- package/dist/adyen-transfer-instrument.js +10 -6
- package/dist/adyen-verification-status.js +2 -2
- package/dist/bag-DpxmyXfR.js +14 -0
- package/dist/bg-BG-9uVrFuHv.js +23 -0
- package/dist/bg-BG-BY3Wa361.js +54 -0
- package/dist/bg-BG-BiYtb1Tz.js +55 -0
- package/dist/bg-BG-BvSUDgGF.js +13 -0
- package/dist/bg-BG-CMomhopf.js +35 -0
- package/dist/bg-BG-Dy6-IwuZ.js +28 -0
- package/dist/bg-BG-NMIts2sa.js +35 -0
- package/dist/{plaintext-B39yQnOr.js → bg-BG-hFblesn-.js} +4 -6
- package/dist/business-lines-DboUCbXw.js +135 -0
- package/dist/{_plugin-vue_export-helper-CgYpM5kA.js → cs-CZ-B8IPRc47.js} +4 -8
- package/dist/cs-CZ-BEFeaKsV.js +54 -0
- package/dist/cs-CZ-Csr_35T-.js +35 -0
- package/dist/cs-CZ-DMzortvO.js +35 -0
- package/dist/cs-CZ-Dbow28-o.js +28 -0
- package/dist/cs-CZ-Wzc382q6.js +23 -0
- package/dist/cs-CZ-wdftovLe.js +55 -0
- package/dist/cs-CZ-y4mvq4Lv.js +13 -0
- package/dist/da-DK-4QAKic_C.js +55 -0
- package/dist/da-DK-Adj8R5Qn.js +28 -0
- package/dist/da-DK-BTpZzEgA.js +15 -0
- package/dist/da-DK-CeNMXUfE.js +23 -0
- package/dist/da-DK-D6UK8XT9.js +54 -0
- package/dist/da-DK-Dm8o1giq.js +35 -0
- package/dist/da-DK-q2b_1elr.js +35 -0
- package/dist/da-DK-qgQOVjDp.js +13 -0
- package/dist/de-DE-B3nctkG8.js +13 -0
- package/dist/de-DE-BG0tKqvi.js +28 -0
- package/dist/de-DE-BzumFI3T.js +55 -0
- package/dist/de-DE-D2ByeIZs.js +35 -0
- package/dist/de-DE-DMFaycio.js +35 -0
- package/dist/de-DE-DUl6gRKv.js +54 -0
- package/dist/de-DE-DjOUNvp6.js +15 -0
- package/dist/de-DE-JI-7mvxy.js +23 -0
- package/dist/de-DE-pSdsxBpQ.js +13 -0
- package/dist/decision-makers-group-CgddXgrx.js +1944 -0
- package/dist/el-GR-B5j7VZ3E.js +54 -0
- package/dist/el-GR-Bvjk5Sw8.js +13 -0
- package/dist/el-GR-CGeBAkDN.js +35 -0
- package/dist/el-GR-CXmTklMq.js +55 -0
- package/dist/el-GR-CdgLZhuO.js +13 -0
- package/dist/el-GR-Cu9HwD-f.js +15 -0
- package/dist/el-GR-DGW388LZ.js +35 -0
- package/dist/el-GR-DerT143K.js +28 -0
- package/dist/el-GR-DfNOPkLq.js +23 -0
- package/dist/en-US-BQpgt41j.js +37 -0
- package/dist/en-US-BTYdAWXp.js +15 -0
- package/dist/en-US-Bq2Twy6x.js +54 -0
- package/dist/en-US-CQ3angjM.js +22 -0
- package/dist/en-US-CkZcSKGh.js +35 -0
- package/dist/en-US-DHq7VYFs.js +23 -0
- package/dist/en-US-DLm6gy6T.js +58 -0
- package/dist/en-US-DSoLr6rp.js +13 -0
- package/dist/en-US-SbE0c1gn.js +36 -0
- package/dist/es-ES-BM4U0hT3.js +28 -0
- package/dist/es-ES-BRfK6tX7.js +13 -0
- package/dist/es-ES-BhQOdKge.js +55 -0
- package/dist/es-ES-Cavm0szq.js +54 -0
- package/dist/es-ES-Cj7q7fWO.js +15 -0
- package/dist/es-ES-DOVPTeyf.js +23 -0
- package/dist/es-ES-Dy1uR2H_.js +13 -0
- package/dist/es-ES-WWftn3JX.js +35 -0
- package/dist/es-ES-pXHx3ODy.js +35 -0
- package/dist/et-EE-BJIsPOnh.js +23 -0
- package/dist/et-EE-CFlzRBEx.js +55 -0
- package/dist/et-EE-D5lRJbMZ.js +35 -0
- package/dist/et-EE-DUWZ2Vqm.js +54 -0
- package/dist/et-EE-Dor3enPS.js +15 -0
- package/dist/et-EE-OJg_PSHf.js +28 -0
- package/dist/et-EE-QLVnr6Vl.js +35 -0
- package/dist/et-EE-d9V24rcf.js +13 -0
- package/dist/fi-FI-B0fnAFV2.js +13 -0
- package/dist/fi-FI-BJ2l42Pj.js +28 -0
- package/dist/fi-FI-BNcnKrJ9.js +15 -0
- package/dist/fi-FI-D522KHGk.js +23 -0
- package/dist/fi-FI-D9E_KaJi.js +35 -0
- package/dist/fi-FI-DT351N-G.js +35 -0
- package/dist/fi-FI-DVa-ccaW.js +54 -0
- package/dist/fi-FI-Djollt2G.js +55 -0
- package/dist/fr-FR-BNXXNUX_.js +35 -0
- package/dist/fr-FR-Bn3D6mmY.js +15 -0
- package/dist/fr-FR-BoKzVp2q.js +13 -0
- package/dist/fr-FR-CY9emHgF.js +54 -0
- package/dist/fr-FR-Cv0k-3Xc.js +35 -0
- package/dist/fr-FR-DInQKkTd.js +23 -0
- package/dist/fr-FR-Dk6Lw2On.js +13 -0
- package/dist/fr-FR-g7lmxEsI.js +28 -0
- package/dist/fr-FR-l36qBV3a.js +55 -0
- package/dist/{getFieldsWithExistingData-BW8_TEQl.js → getFieldsWithExistingData-7pZnHro-.js} +3 -4
- package/dist/{hasDataChanged-Mu0HyZ3E.js → hasDataChanged-v0hD-nEq.js} +4 -4
- package/dist/hr-HR-B8AZ4eHJ.js +35 -0
- package/dist/hr-HR-CDUE36Dg.js +28 -0
- package/dist/hr-HR-CF0AHQzi.js +13 -0
- package/dist/hr-HR-CNzbyo9r.js +15 -0
- package/dist/hr-HR-CnP5sqih.js +54 -0
- package/dist/hr-HR-CzSrqEFA.js +35 -0
- package/dist/hr-HR-DTCY4iL8.js +55 -0
- package/dist/hr-HR-DzS44Gpv.js +23 -0
- package/dist/hu-HU-BSOiZA7a.js +15 -0
- package/dist/hu-HU-BTlpbCpc.js +54 -0
- package/dist/hu-HU-Bmf13NMf.js +28 -0
- package/dist/hu-HU-BznXPoc2.js +55 -0
- package/dist/hu-HU-CSPhOvLC.js +13 -0
- package/dist/hu-HU-DRi6Dz9U.js +35 -0
- package/dist/hu-HU-xCvNM5TU.js +23 -0
- package/dist/hu-HU-zK6nUqWr.js +35 -0
- package/dist/it-IT-BEWyAQUU.js +55 -0
- package/dist/it-IT-BH-eqIKH.js +13 -0
- package/dist/it-IT-BeYbInCQ.js +35 -0
- package/dist/it-IT-C_fNHhjE.js +35 -0
- package/dist/it-IT-CjEYONJg.js +23 -0
- package/dist/it-IT-D7G4BaP7.js +13 -0
- package/dist/it-IT-DYIx7myn.js +28 -0
- package/dist/it-IT-DvM-9LpM.js +15 -0
- package/dist/it-IT-GgHc0cHR.js +54 -0
- package/dist/ja-JP-B3yqM_FM.js +13 -0
- package/dist/ja-JP-BUz3qN-V.js +23 -0
- package/dist/ja-JP-BhS-_dIx.js +54 -0
- package/dist/ja-JP-C1OQ16fo.js +35 -0
- package/dist/ja-JP-D7oL6xGY.js +55 -0
- package/dist/ja-JP-DTW_hY1L.js +13 -0
- package/dist/ja-JP-GXkLvnQ4.js +15 -0
- package/dist/ja-JP-tx1DbZYD.js +28 -0
- package/dist/ja-JP-weDU8GLW.js +35 -0
- package/dist/{localizeDateString-QtCjf8Fg.js → localizeDateString-BlZ_CtJI.js} +6 -6
- package/dist/lt-LT-B6CJ4ULI.js +23 -0
- package/dist/lt-LT-BUYY0LaT.js +35 -0
- package/dist/lt-LT-BxScCodJ.js +28 -0
- package/dist/lt-LT-DNjXmQPv.js +15 -0
- package/dist/lt-LT-DTQGR9M0.js +54 -0
- package/dist/lt-LT-De7dLXxI.js +55 -0
- package/dist/lt-LT-Lzl_Cbw-.js +13 -0
- package/dist/lt-LT-_MzAcXJo.js +35 -0
- package/dist/lv-LV-B9js9VoA.js +35 -0
- package/dist/lv-LV-BQ4F1GrV.js +54 -0
- package/dist/lv-LV-CRhXAjn6.js +35 -0
- package/dist/lv-LV-ChOoZuhc.js +15 -0
- package/dist/lv-LV-DTtuyfHS.js +23 -0
- package/dist/lv-LV-De9rdme0.js +55 -0
- package/dist/lv-LV-F9_Fiu3w.js +28 -0
- package/dist/lv-LV-y00wN1pj.js +13 -0
- package/dist/mail-Z_IE_hkw.js +14 -0
- package/dist/{mapFinancialReportsToFinancialInformation-C-2jp0wg.js → mapFinancialReportsToFinancialInformation-DrS0xN6i.js} +19 -12
- package/dist/minus-circle-filled-BGKeHaxJ.js +17 -0
- package/dist/nl-NL-BHqiO21q.js +15 -0
- package/dist/nl-NL-CFzm75Jw.js +13 -0
- package/dist/nl-NL-CUcML482.js +54 -0
- package/dist/nl-NL-Cht7cSwD.js +28 -0
- package/dist/nl-NL-DLedC3mO.js +35 -0
- package/dist/nl-NL-Dbx0ZmI7.js +35 -0
- package/dist/nl-NL-DmnFXAQC.js +13 -0
- package/dist/nl-NL-Zcq0bXd-.js +23 -0
- package/dist/nl-NL-lZcJhRsP.js +55 -0
- package/dist/no-NO-BBCvsecq.js +54 -0
- package/dist/no-NO-BEIyAMmZ.js +55 -0
- package/dist/no-NO-BQAqVzF4.js +28 -0
- package/dist/no-NO-BxReX6oF.js +23 -0
- package/dist/no-NO-C0sfkp82.js +35 -0
- package/dist/no-NO-CKT9kLAH.js +15 -0
- package/dist/no-NO-CpVal4cV.js +35 -0
- package/dist/no-NO-DbvFfP96.js +13 -0
- package/dist/pay-by-link-plane-Pv7Babgn.js +22 -0
- package/dist/pl-PL--mmxopYA.js +13 -0
- package/dist/pl-PL-1ylK-_FE.js +35 -0
- package/dist/pl-PL-CqxMKpBm.js +28 -0
- package/dist/pl-PL-D6heiKsH.js +15 -0
- package/dist/pl-PL-DAPGaxWi.js +35 -0
- package/dist/pl-PL-DD3wVcKc.js +55 -0
- package/dist/pl-PL-T6uD5--R.js +23 -0
- package/dist/pl-PL-kGaeUP-w.js +54 -0
- package/dist/plus-circle-filled-Cnf1oJTm.js +17 -0
- package/dist/pt-PT-BVzXBFp7.js +13 -0
- package/dist/pt-PT-BY9rcwcF.js +35 -0
- package/dist/pt-PT-BkvMsoK4.js +35 -0
- package/dist/pt-PT-BsDCHbWN.js +55 -0
- package/dist/pt-PT-CBbmkr_J.js +28 -0
- package/dist/pt-PT-D2elvnDU.js +15 -0
- package/dist/pt-PT-DpDxAynk.js +13 -0
- package/dist/pt-PT-JVqqgvPs.js +54 -0
- package/dist/pt-PT-N0njcfLO.js +23 -0
- package/dist/{resolveEnvironment-Dx0BPNMa.js → resolveEnvironment-DvSgDDo8.js} +3 -3
- package/dist/ro-RO-C83h2zHZ.js +54 -0
- package/dist/ro-RO-CUg8-CQ8.js +55 -0
- package/dist/ro-RO-Cdmevo9A.js +13 -0
- package/dist/ro-RO-DJLWmWZ4.js +35 -0
- package/dist/ro-RO-DL9V1CMj.js +15 -0
- package/dist/ro-RO-Dfx0g3bU.js +35 -0
- package/dist/ro-RO-IY3AMhwm.js +28 -0
- package/dist/ro-RO-Ic1SzBgx.js +23 -0
- package/dist/ru-RU-FZb2upqh.js +13 -0
- package/dist/{rules-CUANHpja.js → rules-Meybz2dk.js} +45 -72
- package/dist/sk-SK-B7o3L57C.js +35 -0
- package/dist/sk-SK-BDKRZ2mM.js +28 -0
- package/dist/sk-SK-BSioQTMW.js +15 -0
- package/dist/sk-SK-CgLJIuJw.js +54 -0
- package/dist/sk-SK-CiD0FeLN.js +23 -0
- package/dist/sk-SK-Cjrkrb85.js +55 -0
- package/dist/sk-SK-iO863_t2.js +35 -0
- package/dist/sk-SK-nfeuTcY5.js +13 -0
- package/dist/sl-SI-BB0suyr1.js +28 -0
- package/dist/sl-SI-BE_ndzZ2.js +55 -0
- package/dist/sl-SI-BylvpF-X.js +15 -0
- package/dist/sl-SI-BzeVaC1Z.js +54 -0
- package/dist/sl-SI-C8CMAkD0.js +35 -0
- package/dist/sl-SI-Cth2Qa5T.js +35 -0
- package/dist/sl-SI-DUTZDqkP.js +13 -0
- package/dist/sl-SI-MZoDApq9.js +23 -0
- package/dist/solution-payments-DTAuLSWF.js +14 -0
- package/dist/style.css +1018 -1144
- package/dist/styles-CLV89_hH.js +1018 -1144
- package/dist/sv-SE-BTx2XKAp.js +13 -0
- package/dist/sv-SE-BryiIPVv.js +55 -0
- package/dist/sv-SE-Bwh0wKFk.js +35 -0
- package/dist/sv-SE-CVmo11gI.js +54 -0
- package/dist/sv-SE-DCFSf4Oj.js +23 -0
- package/dist/sv-SE-DYruQSzt.js +28 -0
- package/dist/sv-SE-Dwz1yTrB.js +15 -0
- package/dist/sv-SE-OPOHtqtP.js +35 -0
- package/dist/sv-SE-rckxD-43.js +13 -0
- package/dist/terminal-1-ewywjFJI.js +18 -0
- package/dist/types/api/companySelection/useCompanySelection.d.ts +18 -1
- package/dist/types/api/configurations/useScenarios.d.ts +6 -6
- package/dist/types/api/idNowProvider/idNowProvider.types.d.ts +1 -2
- package/dist/types/api/idNowProvider/useIdNowProvider.d.ts +4 -8
- package/dist/types/components/BankAccount/forms/BankDocument/BankDocumentRequirements.d.ts +2 -3
- package/dist/types/components/BankAccount/forms/BankDocument/types.d.ts +26 -24
- package/dist/types/components/BankAccount/forms/BankVerification/verification/widget/types.d.ts +10 -10
- package/dist/types/components/BankAccount/forms/PayoutDetails/types.d.ts +2 -2
- package/dist/types/components/BankAccount/mapping/payoutKeyMappings.d.ts +0 -306
- package/dist/types/components/BankAccount/pages/PayoutDetailsPage.d.ts +1 -1
- package/dist/types/components/Business/forms/AdditionalInformation/AdditionalInformationMultiform.d.ts +9 -0
- package/dist/types/components/Business/forms/AdditionalInformation/types.d.ts +2 -1
- package/dist/types/components/Business/forms/BasicInformation/BasicInformationMultiform.d.ts +10 -0
- package/dist/types/components/Business/forms/BasicInformation/types.d.ts +4 -3
- package/dist/types/components/Business/forms/BusinessDetails/forms.d.ts +15 -3
- package/dist/types/components/Business/forms/BusinessDetails/types.d.ts +5 -3
- package/dist/types/components/Business/forms/BusinessSelection/BusinessInformationCard/BusinessInformationCard.d.ts +3 -2
- package/dist/types/components/Business/forms/BusinessSelection/BusinessSelectionMultiform.d.ts +14 -0
- package/dist/types/components/Business/forms/BusinessSelection/types.d.ts +3 -0
- package/dist/types/components/Business/forms/CompanyStructure/CompanyStructureMultiform.d.ts +4 -0
- package/dist/types/components/Business/forms/forms.types.d.ts +14 -0
- package/dist/types/components/Business/forms/rules.d.ts +27 -8
- package/dist/types/components/Business/mapping/businessDetails/mapLegalEntityToBusinessDetailsSchema.d.ts +2 -1
- package/dist/types/components/Business/mapping/businessDetails/mapOrganizationTypeToCompanyType.d.ts +1 -1
- package/dist/types/components/Business/tasks/BusinessDetailsDropin/businessDetailsFormConfig.d.ts +1 -2
- package/dist/types/components/Business/tasks/BusinessDetailsDropin/businessDetailsStore.d.ts +5 -3
- package/dist/types/components/Business/tasks/BusinessDetailsDropin/types.d.ts +4 -3
- package/dist/types/components/Business/tasks/BusinessDetailsDropin/utils.d.ts +0 -3
- package/dist/types/components/Business/tasks/BusinessDetailsMultiformDropin/BusinessDetailsMultiform.d.ts +18 -0
- package/dist/types/components/Business/tasks/BusinessDetailsMultiformDropin/BusinessDetailsMultiformDropin.d.ts +5 -0
- package/dist/types/components/Business/tasks/BusinessDetailsMultiformDropin/types.d.ts +2 -0
- package/dist/types/components/Business/tasks/BusinessDetailsMultiformDropin/utils.d.ts +21 -0
- package/dist/types/components/Business/tasks/BusinessDetailsMultiformDropin/validate.d.ts +22 -0
- package/dist/types/components/Business/utils/companyTypeMetadata.d.ts +1 -1
- package/dist/types/components/Business/utils/companyUtil.d.ts +3 -3
- package/dist/types/components/BusinessLines/pages/RootBusinessLinesPage.d.ts +5 -0
- package/dist/types/components/BusinessLines/tasks/BusinessLinesDropin.d.ts +5 -0
- package/dist/types/components/BusinessLines/tasks/BusinessLinesGettingStarted/BusinessLinesGettingStarted.d.ts +6 -0
- package/dist/types/components/Contract/tasks/ServiceAgreementDropin/types.d.ts +2 -2
- package/dist/types/components/EFP/fields/LegalFormField/types.d.ts +4 -2
- package/dist/types/components/EFP/mapping/businessFinancingKeyMappings.d.ts +36 -336
- package/dist/types/components/EFP/tasks/BusinessFinancingDropin/BusinessFinancingFinancialInformation.d.ts +0 -1
- package/dist/types/components/EFP/tasks/BusinessFinancingDropin/BusinessFinancingRegisteredAddress.d.ts +1 -0
- package/dist/types/components/EFP/tasks/BusinessFinancingDropin/types.d.ts +28 -19
- package/dist/types/components/EFP/tasks/BusinessFinancingDropin/utils.d.ts +5 -4
- package/dist/types/components/EFP/tasks/BusinessFinancingDropin/validate.d.ts +1 -0
- package/dist/types/components/EFP/tasks/SourceOfFundsDropin/SOFAdditionalData/SOFFinancierModal.d.ts +1 -2
- package/dist/types/components/EFP/tasks/SourceOfFundsDropin/types.d.ts +2 -2
- package/dist/types/components/EmbeddedDropins/BusinessFinancingComponent/utils.d.ts +2 -1
- package/dist/types/components/EmbeddedDropins/OnboardingDropinComponent/DropinComposer/types.d.ts +3 -3
- package/dist/types/components/EmbeddedDropins/OnboardingDropinComponent/DropinComposer/useNavigation.d.ts +5 -5
- package/dist/types/components/EmbeddedDropins/ViewVerificationStatus/ViewVerificationStatusComponent.d.ts +1 -1
- package/dist/types/components/EmbeddedDropins/ViewVerificationStatus/content.d.ts +1 -1
- package/dist/types/components/Individual/fields/DecisionMakerRole/NomineeDecisionMakerRole.d.ts +6 -0
- package/dist/types/components/Individual/fields/DecisionMakerRole/types.d.ts +2 -2
- package/dist/types/components/Individual/fields/NameFields/NameFields.d.ts +0 -2
- package/dist/types/components/Individual/forms/Individual/PersonalDetails/types.d.ts +2 -2
- package/dist/types/components/Individual/forms/Individual/PersonalDetails/validate.d.ts +2 -2
- package/dist/types/components/Individual/forms/Individual/ProofOfRelationship/types.d.ts +8 -8
- package/dist/types/components/Individual/forms/Individual/ProofOfResidency/types.d.ts +18 -18
- package/dist/types/components/Individual/forms/Individual/rules.d.ts +1 -1
- package/dist/types/components/Individual/forms/Individual/types.d.ts +2 -2
- package/dist/types/components/Individual/forms/IndividualOnfido/AdditionalPersonalDetails/AdditionalPersonalDetails.d.ts +1 -2
- package/dist/types/components/Individual/forms/IndividualOnfido/AdditionalPersonalDetails/AdditionalPersonalDetails.types.d.ts +3 -2
- package/dist/types/components/Individual/forms/IndividualOnfido/AdditionalPersonalDetails/validate.d.ts +2 -2
- package/dist/types/components/Individual/forms/IndividualOnfido/BasicDetails/BasicDetails.types.d.ts +2 -2
- package/dist/types/components/Individual/forms/IndividualOnfido/GuidanceQuestion/GuidanceQuestion.d.ts +7 -3
- package/dist/types/components/Individual/forms/IndividualOnfido/IndividualOnfido.d.ts +0 -1
- package/dist/types/components/Individual/forms/IndividualOnfido/IndividualOnfido.rules.d.ts +3 -1
- package/dist/types/components/Individual/forms/IndividualOnfido/IndividualOnfido.types.d.ts +2 -2
- package/dist/types/components/Individual/helpers/isOnfidoAutofillFlowEnabled.d.ts +2 -2
- package/dist/types/components/Individual/helpers/roleUtils.d.ts +1 -1
- package/dist/types/components/Individual/helpers/shouldShowMotionCapture.d.ts +3 -3
- package/dist/types/components/Individual/mapping/adjustOnfidoIdentificationData.d.ts +3 -0
- package/dist/types/components/Individual/mapping/getOnfidoIdentityTypeToApiIdentityTypeMap.d.ts +3 -0
- package/dist/types/components/Individual/pages/DecisionMakerDetailsPage.d.ts +1 -1
- package/dist/types/components/Individual/tasks/DecisionMakers/DecisionMakerDetails/DecisionMakerDetails.d.ts +2 -0
- package/dist/types/components/Individual/tasks/DecisionMakers/DecisionMakerDetails/DecisionMakerDetails.types.d.ts +7 -0
- package/dist/types/components/Individual/tasks/DecisionMakers/DecisionMakersGettingStarted/DecisionMakersGettingStarted.d.ts +5 -0
- package/dist/types/components/Individual/tasks/DecisionMakers/DecisionMakersGettingStarted/DecisionMakersModalContent.d.ts +1 -0
- package/dist/types/components/Individual/tasks/IndividualOnfidoDropin/IndividualOnfidoStore.d.ts +6 -0
- package/dist/types/components/Shared/EntityGuidanceStatus/types.d.ts +4 -4
- package/dist/types/components/Shared/FormFlow/FormFlow.types.d.ts +1 -1
- package/dist/types/components/Shared/FormNavigation/FormNavigationItem.d.ts +1 -2
- package/dist/types/components/Shared/Introduction/Introduction.d.ts +2 -2
- package/dist/types/components/Shared/Introduction/IntroductionScreen.d.ts +2 -2
- package/dist/types/components/Shared/Introduction/constants.d.ts +3 -3
- package/dist/types/components/Shared/Introduction/copy.d.ts +8 -7
- package/dist/types/components/Shared/Introduction/types.d.ts +11 -11
- package/dist/types/components/Shared/SingpassBanner/SingpassBanner.d.ts +1 -1
- package/dist/types/components/Shared/Summary/Summary.d.ts +0 -1
- package/dist/types/components/Shared/devex/DebugListener/DebugModal.d.ts +0 -1
- package/dist/types/components/Shared/fields/BusinessRegistrationNumberField/BusinessRegistrationNumberField.d.ts +1 -1
- package/dist/types/components/Shared/fields/BusinessRegistrationNumberField/fieldConfig.d.ts +1 -1
- package/dist/types/components/Shared/fields/BusinessRegistrationNumberField/types.d.ts +5 -7
- package/dist/types/components/Shared/fields/CountryField/types.d.ts +1 -1
- package/dist/types/components/Shared/fields/CountryOfGoverningLawField/types.d.ts +1 -1
- package/dist/types/components/Shared/fields/Currency/types.d.ts +1 -1
- package/dist/types/components/Shared/fields/DBANameField/types.d.ts +1 -3
- package/dist/types/components/Shared/fields/DateOfIncorporationField/types.d.ts +1 -1
- package/dist/types/components/Shared/fields/EInvoicingCodeField/types.d.ts +1 -1
- package/dist/types/components/Shared/fields/FinancialReportingDate/types.d.ts +1 -1
- package/dist/types/components/Shared/fields/IdFieldTypeSelector/TaxIdNumberTypeSelector.d.ts +2 -2
- package/dist/types/components/Shared/fields/IdFieldTypeSelector/VatNumberTypeSelector.d.ts +2 -2
- package/dist/types/components/Shared/fields/IdFieldTypeSelector/countryIdNumberTypes.d.ts +27 -27
- package/dist/types/components/Shared/fields/IdFieldTypeSelector/getDefaultRegistrationNumberType.d.ts +16 -0
- package/dist/types/components/Shared/fields/IdFieldTypeSelector/getDefaultTaxIdNumberType.d.ts +2 -2
- package/dist/types/components/Shared/fields/IdFieldTypeSelector/getDefaultVatNumberType.d.ts +13 -0
- package/dist/types/components/Shared/fields/IdFieldTypeSelector/inferTaxIdNumberType.d.ts +2 -2
- package/dist/types/components/Shared/fields/LegalCompanyNameField/LegalCompanyNameField.d.ts +1 -2
- package/dist/types/components/Shared/fields/LegalCompanyNameField/types.d.ts +1 -1
- package/dist/types/components/Shared/fields/LocalizedLegalCompanyNameField/fieldConfig.d.ts +12 -0
- package/dist/types/components/Shared/fields/LocalizedLegalCompanyNameField/types.d.ts +5 -0
- package/dist/types/components/Shared/fields/NumberOfEmployees/types.d.ts +1 -1
- package/dist/types/components/Shared/fields/PhoneField/PhoneField.d.ts +1 -2
- package/dist/types/components/Shared/fields/PhoneField/types.d.ts +1 -1
- package/dist/types/components/Shared/fields/StateField/types.d.ts +1 -1
- package/dist/types/components/Shared/fields/StockExchangeMICField/types.d.ts +1 -1
- package/dist/types/components/Shared/fields/StockISINField/types.d.ts +1 -1
- package/dist/types/components/Shared/fields/StockTickerSymbol/types.d.ts +1 -1
- package/dist/types/components/Shared/fields/TaxInformationField/TaxInformationField.d.ts +1 -2
- package/dist/types/components/Shared/fields/TaxInformationField/fieldConfig.d.ts +8 -6
- package/dist/types/components/Shared/fields/TaxInformationField/types.d.ts +3 -7
- package/dist/types/components/Shared/fields/VatNumberField/VatNumberField.d.ts +1 -1
- package/dist/types/components/Shared/fields/VatNumberField/types.d.ts +2 -4
- package/dist/types/components/Shared/forms/Address/utils.d.ts +1 -1
- package/dist/types/components/Shared/forms/BusinessTypeSelection/utils.d.ts +2 -2
- package/dist/types/components/Shared/forms/ConstitutionalDocument/types.d.ts +11 -10
- package/dist/types/components/Shared/forms/FinancialInformation/formatFinancialInformationSummary.d.ts +1 -1
- package/dist/types/components/Shared/forms/FinancialInformation/mapping/mapFinancialInformationToFinancialReport.d.ts +1 -1
- package/dist/types/components/Shared/forms/FinancialInformation/types.d.ts +4 -1
- package/dist/types/components/Shared/forms/RegistrationAddress/types.d.ts +7 -5
- package/dist/types/components/Shared/tasks/TaskList/TaskItemStatus.d.ts +1 -2
- package/dist/types/components/Shared/tasks/TaskList/TaskListItem.d.ts +1 -1
- package/dist/types/components/Shared/tasks/TaskList/types.d.ts +3 -4
- package/dist/types/components/Shared/tasks/TaskList/utils.d.ts +1 -2
- package/dist/types/components/Trust/forms/Trust/rules.d.ts +1 -0
- package/dist/types/components/Trust/forms/Trust/types.d.ts +1 -1
- package/dist/types/components/Trust/forms/TrustRegistrationDetails/types.d.ts +2 -2
- package/dist/types/components/Trust/forms/TrustRoleAndEntityType/types.d.ts +1 -2
- package/dist/types/components/Trust/hooks/useTrustMemberNavigation.hook.d.ts +3 -3
- package/dist/types/components/Trust/pages/TrustDetailsPage.d.ts +1 -1
- package/dist/types/components/Trust/tasks/TrustMembers/CompanyTrustMemberTaskItem.d.ts +1 -1
- package/dist/types/components/Trust/tasks/TrustMembers/ExemptSettlorTaskItem.d.ts +1 -1
- package/dist/types/components/Trust/tasks/TrustMembers/RegularTrustMemberTaskItem.d.ts +1 -1
- package/dist/types/components/Trust/tasks/TrustMembers/RootTrusteeTaskItem.d.ts +1 -1
- package/dist/types/components/Trust/tasks/TrustMembers/types.d.ts +6 -6
- package/dist/types/components/Trust/utils/trustMemberGuidance.d.ts +7 -6
- package/dist/types/components/Trust/utils/trustMemberRequirements.d.ts +1 -1
- package/dist/types/components/UnincorporatedPartnership/hooks/useUnincorporatedPartnershipNavigation.d.ts +6 -6
- package/dist/types/components/UnincorporatedPartnership/tasks/UnincorporatedPartnershipMembers/types.d.ts +5 -5
- package/dist/types/components/UnincorporatedPartnership/tasks/UnincorporatedPartnershipRoleAndType/UnincorporatedPartnershipRadioGroup.d.ts +4 -5
- package/dist/types/components/UnincorporatedPartnership/tasks/UnincorporatedPartnershipRoleAndType/UnincorporatedPartnershipRoleAndType.d.ts +1 -2
- package/dist/types/components/UnincorporatedPartnership/tasks/UnincorporatedPartnershipRoleAndType/types.d.ts +2 -2
- package/dist/types/components/ui/atoms/Accordion/Accordion.d.ts +1 -2
- package/dist/types/components/ui/atoms/Button/Button.d.ts +2 -3
- package/dist/types/components/ui/atoms/Button/Button.types.d.ts +3 -3
- package/dist/types/components/ui/atoms/Field/Field.d.ts +3 -6
- package/dist/types/components/ui/atoms/Field/Field.types.d.ts +9 -12
- package/dist/types/components/ui/atoms/FormHeader/FormHeader.d.ts +4 -6
- package/dist/types/components/ui/atoms/InputBase/InputBase.d.ts +4 -4
- package/dist/types/components/ui/atoms/List/List.d.ts +12 -0
- package/dist/types/components/ui/atoms/ListItem/ListItem.d.ts +16 -0
- package/dist/types/components/ui/atoms/Modal/MaybeModal.d.ts +1 -1
- package/dist/types/components/ui/atoms/RadioGroupCard/RadioGroupCard.types.d.ts +3 -3
- package/dist/types/components/ui/atoms/Remove/Remove.d.ts +1 -2
- package/dist/types/components/ui/atoms/Select/Select.d.ts +1 -2
- package/dist/types/components/ui/atoms/Select/Select.types.d.ts +1 -0
- package/dist/types/components/ui/atoms/SelectButton/SelectButton.d.ts +1 -2
- package/dist/types/components/ui/atoms/SelectButton/SelectButton.types.d.ts +3 -4
- package/dist/types/components/ui/atoms/SelectList/SelectList.d.ts +1 -2
- package/dist/types/components/ui/atoms/SelectList/SelectList.types.d.ts +2 -2
- package/dist/types/components/ui/atoms/SelectListItem/SelectListItem.types.d.ts +3 -3
- package/dist/types/components/ui/atoms/Svg/svgs.d.ts +18 -0
- package/dist/types/components/ui/atoms/TaskStatusIndicator/TaskStatusIndicator.d.ts +1 -1
- package/dist/types/components/ui/atoms/TextArea/TextArea.d.ts +1 -2
- package/dist/types/components/ui/atoms/Tile/Tile.d.ts +1 -2
- package/dist/types/components/ui/layout/LandingLayout/LandingLayout.d.ts +11 -0
- package/dist/types/components/ui/layout/StackLayout/StackLayout.d.ts +8 -0
- package/dist/types/components/ui/molecules/Alert/VerificationErrorAlert.d.ts +1 -1
- package/dist/types/components/ui/molecules/Alert/types.d.ts +1 -0
- package/dist/types/components/ui/molecules/Card/Card.d.ts +1 -2
- package/dist/types/components/ui/molecules/Card/types.d.ts +3 -3
- package/dist/types/components/ui/molecules/DocumentGuidance/DocumentGuidance.types.d.ts +2 -2
- package/dist/types/components/ui/molecules/Dropzone/Dropzone.d.ts +1 -2
- package/dist/types/components/ui/molecules/Dropzone/FilePicker.d.ts +2 -4
- package/dist/types/components/ui/molecules/EmbeddedStatus/EmbeddedStatus.d.ts +3 -3
- package/dist/types/components/ui/molecules/EmbeddedStatus/statusToTag.d.ts +4 -4
- package/dist/types/components/ui/molecules/FormEndState/FormEndState.d.ts +0 -1
- package/dist/types/components/ui/molecules/InputCurrency/InputCurrency.d.ts +1 -2
- package/dist/types/components/ui/molecules/InputDate/InputDate.d.ts +3 -3
- package/dist/types/components/ui/molecules/MaskedInput/MaskedInput.d.ts +2 -2
- package/dist/types/constants/keys.d.ts +2 -0
- package/dist/types/context/ExperimentContext/types.d.ts +52 -36
- package/dist/types/context/SettingsContext/types.d.ts +24 -24
- package/dist/types/core/EmbedShell/EmbedShell.d.ts +1 -0
- package/dist/types/core/UIElement/UIElement.d.ts +1 -0
- package/dist/types/core/models/api/company-types-value.d.ts +12 -11
- package/dist/types/core/models/api/decision-maker-type.d.ts +7 -6
- package/dist/types/core/models/api/entity-type.d.ts +5 -4
- package/dist/types/core/models/api/financialReport.d.ts +2 -2
- package/dist/types/core/models/api/get-scenarios.d.ts +18 -18
- package/dist/types/core/models/api/individual.d.ts +1 -0
- package/dist/types/core/models/api/legal-arrangement.d.ts +10 -2
- package/dist/types/core/models/api/legal-entity-association.d.ts +2 -2
- package/dist/types/core/models/api/legal-entity-type.d.ts +8 -7
- package/dist/types/core/models/api/organization.d.ts +8 -0
- package/dist/types/core/models/api/trust-member-type.d.ts +8 -8
- package/dist/types/core/models/api/trusted-fields-provider.d.ts +5 -4
- package/dist/types/core/models/api/unincorporated-partnership.d.ts +6 -6
- package/dist/types/core/models/api/verification-error.d.ts +8 -7
- package/dist/types/core/models/api/verification-status.d.ts +7 -6
- package/dist/types/core/models/api/view-verification-status.d.ts +8 -7
- package/dist/types/core/user-events.d.ts +1 -1
- package/dist/types/embeds/business-financing/AdyenBusinessFinancing.d.ts +1 -1
- package/dist/types/embeds/business-financing/adyen-business-financing.types.d.ts +6 -1
- package/dist/types/embeds/individual/adyen-individual.types.d.ts +6 -1
- package/dist/types/embeds/onboarding/AdyenOnboarding.d.ts +1 -0
- package/dist/types/embeds/onboarding/adyen-onboarding.types.d.ts +4 -1
- package/dist/types/embeds/terms-of-service/adyen-terms-of-service.types.d.ts +7 -1
- package/dist/types/embeds/transfer-instrument/AdyenTransferInstrument.d.ts +2 -1
- package/dist/types/embeds/transfer-instrument/adyen-transfer-instrument.types.d.ts +7 -2
- package/dist/types/hooks/introduction/useIntroductionScreens.d.ts +4 -4
- package/dist/types/hooks/singpass/useSingpassMyInfoLogin.d.ts +7 -6
- package/dist/types/hooks/useBusinessSetup.d.ts +11 -10
- package/dist/types/hooks/useDataMissingRemediations.d.ts +2 -2
- package/dist/types/hooks/useForm/types.d.ts +0 -2
- package/dist/types/hooks/useFormComposer.d.ts +1 -1
- package/dist/types/hooks/useLegalCompanyNameField/useLegalCompanyNameField.d.ts +31 -0
- package/dist/types/hooks/useLegalEntityType.d.ts +1 -1
- package/dist/types/hooks/useMultiForm/types.d.ts +38 -36
- package/dist/types/hooks/useMultiForm/useMultiForm.d.ts +1 -1
- package/dist/types/hooks/useScenarioConfiguration.d.ts +2 -2
- package/dist/types/language/Language.d.ts +1 -7
- package/dist/types/language/i18n.d.ts +2 -0
- package/dist/types/language/types.d.ts +5 -0
- package/dist/types/language/utils.d.ts +11 -2
- package/dist/types/stores/globalStore/calculateTaskStatus.d.ts +2 -2
- package/dist/types/stores/globalStore/determineTaskIdentifiers.d.ts +2 -2
- package/dist/types/stores/globalStore/get-task-status.d.ts +2 -2
- package/dist/types/stores/globalStore/globalStore.d.ts +7 -7
- package/dist/types/stores/globalStore/taskStatus.d.ts +17 -16
- package/dist/types/stores/globalStore/taskTypes.d.ts +37 -35
- package/dist/types/types/datasets/country-code.d.ts +249 -249
- package/dist/types/types/datasets/currency.d.ts +25 -25
- package/dist/types/types/datasets/province-code.d.ts +46 -46
- package/dist/types/types/datasets/state-code.d.ts +84 -84
- package/dist/types/types/errors/entity-problems.d.ts +3 -4
- package/dist/types/types/form-rules.d.ts +2 -2
- package/dist/types/utils/api/processValidationErrors.d.ts +2 -2
- package/dist/types/utils/birthDateUtils.d.ts +3 -3
- package/dist/types/utils/decisionMaker.d.ts +4 -3
- package/dist/types/utils/decisionMakerRoles.d.ts +4 -3
- package/dist/types/utils/entityAssociationUtil.d.ts +4 -5
- package/dist/types/utils/entityStatusUtil.d.ts +3 -3
- package/dist/types/utils/eventHandlers/handleKeys.d.ts +2 -2
- package/dist/types/utils/formUtils.d.ts +2 -2
- package/dist/types/utils/getDisplayErrorMessage.d.ts +2 -2
- package/dist/types/utils/getName.d.ts +2 -2
- package/dist/types/utils/makeSelectItemForRole.d.ts +2 -2
- package/dist/types/utils/masking/masks/businessRegistrationNumberMasks.d.ts +1 -0
- package/dist/types/utils/regex/patternValidators.d.ts +3 -0
- package/dist/types/utils/roleMetadata.d.ts +3 -3
- package/dist/types/utils/simulateTextChangeFromKeyboardEvent.d.ts +2 -2
- package/dist/types/utils/translation.d.ts +40 -0
- package/dist/types/utils/urlUtils.d.ts +1 -0
- package/dist/types/utils/validatorUtils.d.ts +2 -0
- package/dist/{useMultiForm-Bwx2nVhh.js → useMultiForm-BQmE_nfY.js} +158 -135
- package/dist/{useOnboardingStatus-Cwba-HzS.js → useOnboardingStatus-DJdV6bAG.js} +2 -2
- package/dist/{useTermsOfServiceStatus-C-i9mF4m.js → useTermsOfServiceStatus-BX4GiDbz.js} +2 -2
- package/dist/{useUpdateLegalEntity-xQlAqIqy.js → useUpdateLegalEntity-BfnvHQJj.js} +2 -2
- package/dist/{utils-DXv7uAh6.js → utils-1zLleVnu.js} +30 -23
- package/dist/{validate-CuwYJGc9.js → validate-BweJRQFE.js} +9 -3
- package/dist/{validate-BN5p-GhK.js → validate-Cy6vBhF2.js} +2 -2
- package/dist/view-verification-status-VFcBydkR.js +21 -0
- package/dist/zh-CN-wUb4MmTZ.js +13 -0
- package/dist/zh-TW-DNTXHLKa.js +13 -0
- package/package.json +28 -52
- package/dist/DecisionMakers-BKhtcs_K.js +0 -222
- package/dist/FormEndState-C3HCmXcw.js +0 -32
- package/dist/ManagePCIComponent-Blj60xLa.js +0 -33
- package/dist/RootBusinessDetailsPage-BTYIldSf.js +0 -42
- package/dist/SourceOfFunds.module-xwHIboir.js +0 -128
- package/dist/adyen-manage-pci.js +0 -48
- package/dist/adyen-sign-pci.js +0 -62
- package/dist/adyen-terms-of-service.vue_vue_type_script_lang-BD4hndWg.js +0 -42
- package/dist/adyen-transfer-instrument.vue_vue_type_script_lang-BE-ro1iH.js +0 -53
- package/dist/bg-BG-COTwZXwN.js +0 -2040
- package/dist/cs-CZ-DUlgJKVq.js +0 -2040
- package/dist/css-CQUoQdd2.js +0 -24
- package/dist/da-DK-BDzDHhVR.js +0 -2040
- package/dist/de-DE-B3TpRjZX.js +0 -994
- package/dist/de-DE-DJdgXqS_.js +0 -2040
- package/dist/el-GR-CFEuLvxK.js +0 -994
- package/dist/el-GR-D5i9BNyh.js +0 -2040
- package/dist/en-US-ghR-1_C2.js +0 -994
- package/dist/es-ES-BtWn2FOQ.js +0 -994
- package/dist/es-ES-VOSWszW5.js +0 -2040
- package/dist/et-EE-Bp4Ngsn4.js +0 -2040
- package/dist/fi-FI-DaujOE-a.js +0 -2040
- package/dist/fr-FR-BdPZxk11.js +0 -2040
- package/dist/fr-FR-HvIkGqJf.js +0 -994
- package/dist/hr-HR-BY7C7NxY.js +0 -2040
- package/dist/hu-HU-DHCty-Tc.js +0 -2040
- package/dist/it-IT-BMsuhZEQ.js +0 -2040
- package/dist/it-IT-CjbZahlB.js +0 -994
- package/dist/ja-JP-4jufT0xh.js +0 -994
- package/dist/ja-JP-BYDz1z2G.js +0 -2040
- package/dist/json-DWikzB4g.js +0 -31
- package/dist/lt-LT-DNJ9V9xV.js +0 -2040
- package/dist/lv-LV-CFJwN5wq.js +0 -2040
- package/dist/nl-NL-B3xjfpMi.js +0 -994
- package/dist/nl-NL-DibAf790.js +0 -2040
- package/dist/no-NO-DHCy5rXx.js +0 -2040
- package/dist/pl-PL-eZBNH5HH.js +0 -2040
- package/dist/preact/adyen-individual.js +0 -15
- package/dist/preact/adyen-manage-individual.js +0 -15
- package/dist/preact/adyen-terms-of-service.js +0 -16
- package/dist/preact/adyen-transfer-instrument.js +0 -16
- package/dist/pt-PT-BpYDD-PX.js +0 -994
- package/dist/pt-PT-CiN_Wmfe.js +0 -2040
- package/dist/ro-RO-CgyMTvLc.js +0 -2040
- package/dist/ru-RU-BlgIj-Q4.js +0 -994
- package/dist/sk-SK-B5qlQB_U.js +0 -2040
- package/dist/sl-SI-8PPfrGzL.js +0 -2040
- package/dist/sv-SE-7lcf_fB9.js +0 -994
- package/dist/sv-SE-ZWLw6D3j.js +0 -2040
- package/dist/types/components/Individual/forms/IndividualOnfido/IdVerificationMethod/IdVerificationDisclaimer/IdVerificationDisclaimer.d.ts +0 -1
- package/dist/types/components/Individual/forms/IndividualOnfido/IdVerificationMethod/IdVerificationHeader/IdVerificationHeader.d.ts +0 -1
- package/dist/types/components/Individual/forms/IndividualOnfido/UboQuestionnaire/RichText.d.ts +0 -5
- package/dist/types/embeds/individual/AdyenIndividualPreact.d.ts +0 -3
- package/dist/types/embeds/manage-individual/AdyenManageIndividualPreact.d.ts +0 -3
- package/dist/types/embeds/manage-pci/AdyenManagePci.d.ts +0 -12
- package/dist/types/embeds/manage-pci/adyen-manage-pci.d.ts +0 -1
- package/dist/types/embeds/manage-pci/adyen-manage-pci.types.d.ts +0 -39
- package/dist/types/embeds/sign-pci/AdyenSignPci.d.ts +0 -15
- package/dist/types/embeds/sign-pci/adyen-sign-pci.d.ts +0 -1
- package/dist/types/embeds/sign-pci/adyen-sign-pci.types.d.ts +0 -43
- package/dist/types/embeds/terms-of-service/AdyenTermsOfServicePreact.d.ts +0 -3
- package/dist/types/embeds/transfer-instrument/AdyenTransferInstrumentPreact.d.ts +0 -3
- package/dist/types/utils/sanitizeHtml.d.ts +0 -3
- package/dist/types/utils/useStateFromProp.d.ts +0 -9
- package/dist/useSalesChannelsSettings-BLzegVJh.js +0 -51
- package/dist/view-verification-status-DTkA8PtO.js +0 -20
- package/dist/vue/adyen-individual.js +0 -53
- package/dist/vue/adyen-manage-individual.js +0 -56
- package/dist/vue/adyen-terms-of-service.js +0 -28
- package/dist/vue/adyen-transfer-instrument.js +0 -30
- package/dist/yaml-jFdy-qnY.js +0 -22
- package/dist/zh-CN-xYZH718R.js +0 -994
- package/dist/zh-TW-DqBBNurv.js +0 -994
|
@@ -2,90 +2,21 @@
|
|
|
2
2
|
{
|
|
3
3
|
try {
|
|
4
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] = "
|
|
5
|
+
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "1a3b023c-3908-44e4-985c-207da904ebf9", e._sentryDebugIdIdentifier = "sentry-dbid-1a3b023c-3908-44e4-985c-207da904ebf9");
|
|
6
6
|
} catch (e) {
|
|
7
7
|
}
|
|
8
8
|
}
|
|
9
9
|
;
|
|
10
10
|
import { jsx, jsxs, Fragment } from "preact/jsx-runtime";
|
|
11
|
-
import {
|
|
12
|
-
import { useState, useEffect, useRef,
|
|
13
|
-
import { u as useCreateLegalEntity, a as useUpdateLegalEntity } from "./useUpdateLegalEntity-
|
|
14
|
-
import { h as hasDataChanged } from "./hasDataChanged-
|
|
15
|
-
import { o as organizationTypesToSkipCompanyStructureForm } from "./utils-
|
|
16
|
-
import { g as getFieldsWithExistingData } from "./getFieldsWithExistingData-
|
|
11
|
+
import { u as useI18nContext, dw as MemoizedDocumentUpload, G as Button, bc as Modal, be as ModalContent, N as Typography, as as CountryCodes, Y as CompanyTypesValues, e_ as useGlobalData, eQ as getForms, $ as TaskTypes, e$ as BasicInformation, dq as getFormProps, f0 as CompanyStructure, f1 as AdditionalInformation, eK as MemoizedConstitutionalDocument, O as LegalEntityTypes, eJ as FinancialInformation, cg as getDocument, ch as mapExistingFile, ci as getPageName, bA as formatObject, bm as entriesOf, b8 as businessDetailsComponentsKeyMapping, f2 as solePropBusinessDetailsKeyMapping, f3 as getDefaultRegistrationNumberType, f4 as getDefaultVatNumberType, b3 as objectsDeepEqual, dY as operationalAddressIsSameIds, eM as COUNTRIES_USING_COMPANY_SEARCH, f5 as FIELDS_NEEDED_FOR_COMPANY_SEARCH, dg as keysOf, i as isUndefinedOrNull, dJ as isDateOlderThanAYear, aN as summaryItem, f6 as solePropBusinessDetailsApiKeyMapping, eZ as businessDetailsApiKeyMapping, f7 as isRegistrationNumberAbsentStateV4Scenario, dh as isEmpty, f8 as COUNTRIES_THAT_USE_TAX_ID_INSTEAD_OF_VAT, cl as createDocumentRequest, ba as datasetUtilities, cG as mapAddressLabels, eI as companyTypeMetadata, a0 as createLogger, cF as filterOutUnwantedAssociationsIfRootLE, bU as isValidationError, bV as processValidationErrors, bW as isMaintenanceModeError, f9 as getProp, at as isEmpty$1, fa as documentFormsIds, av as resolveFieldMetadata, e6 as registrationNumberDefaultFieldMetadata, fb as inferCompanyRegistrationNumberType, fc as getCompanyRegistrationNumberOptions, e7 as registrationNumberDefaultFieldConfig, cb as taxInformationDefaultFieldMetadata, fd as countryToTaxInfoTypeMap, cc as taxInformationDefaultFieldConfig, fe as getKeyForField, co as drop, ao as getOwnEntityAssociations, cP as doArraysMatch, cL as getFileExtention, X as useAccountHolder, a9 as useToastContext, a3 as useAnalyticsContext, aa as useExperimentsContext, v as useSettingsContext, a as useApiContext, dT as verifiedBusiness, br as useQueryClient, ff as useStateContext, w as SettingNames, fg as setIsBankAccountRequestedForOrganization, bP as getAssociatedLeAnalyticsPayload, bb as getCapabilityProblems, cp as documentApiUtils, cD as composePerScenarioFormConfigurations, cx as useScenarioConfiguration, eU as rules, cy as getPropsFromConfigurations, eV as useCompanySearch, fh as useCompanySelection, eW as useVerifyTin, bQ as getRequiredForms, bR as addValidityToForms, fi as useClearCompanyData, bS as useFormComposer, fj as setVerifiedBusiness, fk as FormWrapper, bi as Confirm, fl as solePropBusinessDetailsDocumentMapping, eY as businessDetailsDocumentMapping } from "./StoreProvider-O9jwxfG8.js";
|
|
12
|
+
import { useState, useEffect, useRef, useMemo, useCallback } from "preact/hooks";
|
|
13
|
+
import { u as useCreateLegalEntity, a as useUpdateLegalEntity } from "./useUpdateLegalEntity-BfnvHQJj.js";
|
|
14
|
+
import { h as hasDataChanged } from "./hasDataChanged-v0hD-nEq.js";
|
|
15
|
+
import { o as organizationTypesToSkipCompanyStructureForm } from "./utils-1zLleVnu.js";
|
|
16
|
+
import { g as getFieldsWithExistingData } from "./getFieldsWithExistingData-7pZnHro-.js";
|
|
17
17
|
import cx from "classnames";
|
|
18
|
-
import { m as mapFinancialReportsToFinancialInformation, a as mapFinancialInformationToFinancialReport } from "./mapFinancialReportsToFinancialInformation-
|
|
18
|
+
import { m as mapFinancialReportsToFinancialInformation, a as mapFinancialInformationToFinancialReport } from "./mapFinancialReportsToFinancialInformation-DrS0xN6i.js";
|
|
19
19
|
import { f as formatCurrency } from "./formatCurrency-CMOSdJMB.js";
|
|
20
|
-
const clearCompanyData = async (legalEntityId, baseUrl) => {
|
|
21
|
-
return httpPost({
|
|
22
|
-
baseUrl,
|
|
23
|
-
path: `legalEntities/${legalEntityId}/companyDataset/clearCompanyData`
|
|
24
|
-
});
|
|
25
|
-
};
|
|
26
|
-
const useClearCompanyData = (options) => {
|
|
27
|
-
const { rootLegalEntityId, baseUrl } = useApiContext();
|
|
28
|
-
return useMutation({
|
|
29
|
-
mutationFn: () => {
|
|
30
|
-
return clearCompanyData(rootLegalEntityId.value, baseUrl.value);
|
|
31
|
-
},
|
|
32
|
-
retry: 0,
|
|
33
|
-
...options
|
|
34
|
-
});
|
|
35
|
-
};
|
|
36
|
-
const useCompanySearch = (data, options) => {
|
|
37
|
-
const { rootLegalEntityId, baseUrl } = useApiContext();
|
|
38
|
-
return useQuery({
|
|
39
|
-
queryKey: ["companySearch", data],
|
|
40
|
-
queryFn: () => handleCompanySearch(rootLegalEntityId.value, baseUrl.value, data),
|
|
41
|
-
retry: 0,
|
|
42
|
-
...options
|
|
43
|
-
});
|
|
44
|
-
};
|
|
45
|
-
const handleCompanySearch = async (rootLegalEntityId, baseUrl, data) => {
|
|
46
|
-
const requestPayload = {
|
|
47
|
-
text: data.registrationNumber ? data.registrationNumber : data.name,
|
|
48
|
-
country: data.country,
|
|
49
|
-
state: data.state,
|
|
50
|
-
limit: data.limit ?? 15
|
|
51
|
-
};
|
|
52
|
-
const searchRequest = async (path) => {
|
|
53
|
-
return httpPost(
|
|
54
|
-
{
|
|
55
|
-
baseUrl,
|
|
56
|
-
path: `legalEntities/${rootLegalEntityId}/companySearch${path ? "/" + path : ""}`
|
|
57
|
-
},
|
|
58
|
-
requestPayload
|
|
59
|
-
);
|
|
60
|
-
};
|
|
61
|
-
const companyDeepSearch = async () => await searchRequest("deep");
|
|
62
|
-
const companyIndexSearch = async () => await searchRequest();
|
|
63
|
-
const companyRegistrationNumberDeepSearch = async () => await searchRequest("deepSearchByRegistrationNumber");
|
|
64
|
-
const companyRegistrationNumberIndexSearch = async () => await searchRequest("searchByRegistrationNumber");
|
|
65
|
-
const primarySourceSearch = async (indexSearch, deepSearch) => {
|
|
66
|
-
let response;
|
|
67
|
-
try {
|
|
68
|
-
response = await deepSearch();
|
|
69
|
-
} catch {
|
|
70
|
-
response = await indexSearch();
|
|
71
|
-
}
|
|
72
|
-
return response;
|
|
73
|
-
};
|
|
74
|
-
const searchByRegistrationNumber = async () => {
|
|
75
|
-
return KNOWN_BROKEN_PRIMARY_SOURCE_CONNECTIONS.includes(data.state) ? await companyRegistrationNumberIndexSearch() : await primarySourceSearch(
|
|
76
|
-
companyRegistrationNumberIndexSearch,
|
|
77
|
-
companyRegistrationNumberDeepSearch
|
|
78
|
-
);
|
|
79
|
-
};
|
|
80
|
-
const searchByCompanyName = async () => {
|
|
81
|
-
return KNOWN_BROKEN_PRIMARY_SOURCE_CONNECTIONS.includes(data.state) ? await companyIndexSearch() : await primarySourceSearch(companyIndexSearch, companyDeepSearch);
|
|
82
|
-
};
|
|
83
|
-
if (data.registrationNumber) {
|
|
84
|
-
const registrationNumberResponse = await searchByRegistrationNumber();
|
|
85
|
-
return registrationNumberResponse.results.length > 0 ? registrationNumberResponse : await searchByCompanyName();
|
|
86
|
-
}
|
|
87
|
-
return await searchByCompanyName();
|
|
88
|
-
};
|
|
89
20
|
const stripWhitespace = (str) => str.replace(/\s/g, "");
|
|
90
21
|
const toNormalizedString = (s) => stripWhitespace(s.toLowerCase());
|
|
91
22
|
const isNormalizedStringMatch = (s1, s2) => toNormalizedString(s1) === toNormalizedString(s2);
|
|
@@ -211,16 +142,14 @@ function ProofOfOwnershipDocument({
|
|
|
211
142
|
description = "weNeedAnOfficialDocumentForOwnership",
|
|
212
143
|
...props
|
|
213
144
|
}) {
|
|
214
|
-
var _a;
|
|
215
145
|
const { i18n } = useI18nContext();
|
|
216
146
|
const [selectedDocumentName, setSelectedDocumentName] = useState(documentTypes$1[0].id);
|
|
217
147
|
const supportsMultiple = selectedDocumentName === DOC_TYPE_FOR_MULTI_UPLOAD;
|
|
218
148
|
useEffect(() => {
|
|
219
|
-
|
|
220
|
-
if (((_b = (_a2 = props.data) == null ? void 0 : _a2.proofOfOwnership) == null ? void 0 : _b.length) === 2) {
|
|
149
|
+
if (props.data?.proofOfOwnership?.length === 2) {
|
|
221
150
|
setSelectedDocumentName(DOC_TYPE_FOR_MULTI_UPLOAD);
|
|
222
151
|
}
|
|
223
|
-
}, [
|
|
152
|
+
}, [props.data?.proofOfOwnership]);
|
|
224
153
|
return /* @__PURE__ */ jsx(
|
|
225
154
|
MemoizedDocumentUpload,
|
|
226
155
|
{
|
|
@@ -292,7 +221,7 @@ function ProofOfSignatoryDocument({
|
|
|
292
221
|
const ACCEPTED_DOCUMENTS_MAP$1 = {
|
|
293
222
|
[CountryCodes.PuertoRico]: {
|
|
294
223
|
// should exactly match CountryCodes.UnitedStates
|
|
295
|
-
[
|
|
224
|
+
[CompanyTypesValues.PRIVATE_COMPANY]: {
|
|
296
225
|
header: "acceptedDocumentsForPrivateCompanies",
|
|
297
226
|
documents: [
|
|
298
227
|
"certificateOfIncorporation",
|
|
@@ -300,19 +229,19 @@ const ACCEPTED_DOCUMENTS_MAP$1 = {
|
|
|
300
229
|
"secretaryOfStateFiling__PR"
|
|
301
230
|
]
|
|
302
231
|
},
|
|
303
|
-
[
|
|
232
|
+
[CompanyTypesValues.PUBLIC_COMPANY]: {
|
|
304
233
|
header: "acceptedDocumentsForPublicCompanies",
|
|
305
234
|
documents: ["certificateOfIncorporation", "certificateOfFormation"]
|
|
306
235
|
},
|
|
307
|
-
[
|
|
236
|
+
[CompanyTypesValues.UNLISTED_PUBLIC_COMPANY]: {
|
|
308
237
|
header: "acceptedDocumentsForPublicCompanies",
|
|
309
238
|
documents: ["certificateOfIncorporation", "certificateOfFormation"]
|
|
310
239
|
},
|
|
311
|
-
[
|
|
240
|
+
[CompanyTypesValues.GOVERNMENTAL_ORGANIZATION]: {
|
|
312
241
|
header: "acceptedDocumentsForGovernment",
|
|
313
242
|
documents: ["charter"]
|
|
314
243
|
},
|
|
315
|
-
[
|
|
244
|
+
[CompanyTypesValues.NON_PROFIT_OR_CHARITABLE]: {
|
|
316
245
|
header: "acceptedDocumentsForNonProfit",
|
|
317
246
|
documents: [
|
|
318
247
|
"articlesOfIncorporation",
|
|
@@ -321,29 +250,29 @@ const ACCEPTED_DOCUMENTS_MAP$1 = {
|
|
|
321
250
|
"certificateOfIncumbency"
|
|
322
251
|
]
|
|
323
252
|
},
|
|
324
|
-
[
|
|
253
|
+
[CompanyTypesValues.INCORPORATED_PARTNERSHIP]: {
|
|
325
254
|
header: "acceptedDocumentsForPartnerships",
|
|
326
255
|
documents: ["partnerShipAgreement", "secretaryOfStateFiling__PR"]
|
|
327
256
|
}
|
|
328
257
|
},
|
|
329
258
|
[CountryCodes.UnitedStates]: {
|
|
330
|
-
[
|
|
259
|
+
[CompanyTypesValues.PRIVATE_COMPANY]: {
|
|
331
260
|
header: "acceptedDocumentsForPrivateCompanies",
|
|
332
261
|
documents: ["certificateOfIncorporation", "certificateOfFormation", "secretaryOfStateFiling"]
|
|
333
262
|
},
|
|
334
|
-
[
|
|
263
|
+
[CompanyTypesValues.PUBLIC_COMPANY]: {
|
|
335
264
|
header: "acceptedDocumentsForPublicCompanies",
|
|
336
265
|
documents: ["certificateOfIncorporation", "certificateOfFormation"]
|
|
337
266
|
},
|
|
338
|
-
[
|
|
267
|
+
[CompanyTypesValues.UNLISTED_PUBLIC_COMPANY]: {
|
|
339
268
|
header: "acceptedDocumentsForPublicCompanies",
|
|
340
269
|
documents: ["certificateOfIncorporation", "certificateOfFormation"]
|
|
341
270
|
},
|
|
342
|
-
[
|
|
271
|
+
[CompanyTypesValues.GOVERNMENTAL_ORGANIZATION]: {
|
|
343
272
|
header: "acceptedDocumentsForGovernment",
|
|
344
273
|
documents: ["charter"]
|
|
345
274
|
},
|
|
346
|
-
[
|
|
275
|
+
[CompanyTypesValues.NON_PROFIT_OR_CHARITABLE]: {
|
|
347
276
|
header: "acceptedDocumentsForNonProfit",
|
|
348
277
|
documents: [
|
|
349
278
|
"articlesOfIncorporation",
|
|
@@ -352,7 +281,7 @@ const ACCEPTED_DOCUMENTS_MAP$1 = {
|
|
|
352
281
|
"certificateOfIncumbency"
|
|
353
282
|
]
|
|
354
283
|
},
|
|
355
|
-
[
|
|
284
|
+
[CompanyTypesValues.INCORPORATED_PARTNERSHIP]: {
|
|
356
285
|
header: "acceptedDocumentsForPartnerships",
|
|
357
286
|
documents: ["partnerShipAgreement", "secretaryOfStateFiling"]
|
|
358
287
|
}
|
|
@@ -362,9 +291,8 @@ const GuidanceContent$1 = ({
|
|
|
362
291
|
country,
|
|
363
292
|
companyType
|
|
364
293
|
}) => {
|
|
365
|
-
var _a;
|
|
366
294
|
const { i18n } = useI18nContext();
|
|
367
|
-
const acceptedDocGuidance =
|
|
295
|
+
const acceptedDocGuidance = ACCEPTED_DOCUMENTS_MAP$1[country]?.[companyType];
|
|
368
296
|
return /* @__PURE__ */ jsx("div", { className: "adyen-kyc-upload-field__guidance", children: country === "US" ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
369
297
|
acceptedDocGuidance && /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-u-margin-bottom-24", children: [
|
|
370
298
|
/* @__PURE__ */ jsx("strong", { children: i18n.get(acceptedDocGuidance.header) }),
|
|
@@ -385,7 +313,7 @@ const GuidanceContent$1 = ({
|
|
|
385
313
|
function RegistrationDocument({
|
|
386
314
|
id,
|
|
387
315
|
country,
|
|
388
|
-
companyType =
|
|
316
|
+
companyType = CompanyTypesValues.PRIVATE_COMPANY,
|
|
389
317
|
heading = "companyRegistrationDocumentFormHeading",
|
|
390
318
|
description = "companyRegistrationDocumentFormDescription",
|
|
391
319
|
...props
|
|
@@ -410,45 +338,45 @@ function RegistrationDocument({
|
|
|
410
338
|
const ACCEPTED_DOCUMENTS_MAP = {
|
|
411
339
|
[CountryCodes.PuertoRico]: {
|
|
412
340
|
// should exactly match CountryCodes.UnitedStates
|
|
413
|
-
[
|
|
341
|
+
[CompanyTypesValues.PRIVATE_COMPANY]: {
|
|
414
342
|
header: "acceptedDocumentsForPrivateCompanies",
|
|
415
343
|
documents: ["irsCP575"]
|
|
416
344
|
},
|
|
417
|
-
[
|
|
345
|
+
[CompanyTypesValues.PUBLIC_COMPANY]: {
|
|
418
346
|
header: "acceptedDocumentsForPublicCompanies",
|
|
419
347
|
documents: ["annualReport", "secForm10k"]
|
|
420
348
|
},
|
|
421
|
-
[
|
|
349
|
+
[CompanyTypesValues.UNLISTED_PUBLIC_COMPANY]: {
|
|
422
350
|
header: "acceptedDocumentsForPublicCompanies",
|
|
423
351
|
documents: ["annualReport", "secForm10k"]
|
|
424
352
|
},
|
|
425
|
-
[
|
|
353
|
+
[CompanyTypesValues.NON_PROFIT_OR_CHARITABLE]: {
|
|
426
354
|
header: "acceptedDocumentsForNonProfit",
|
|
427
355
|
documents: ["annualReport"]
|
|
428
356
|
},
|
|
429
|
-
[
|
|
357
|
+
[CompanyTypesValues.INCORPORATED_PARTNERSHIP]: {
|
|
430
358
|
header: "acceptedDocumentsForPartnerships",
|
|
431
359
|
documents: ["irsScheduleK1"]
|
|
432
360
|
}
|
|
433
361
|
},
|
|
434
362
|
[CountryCodes.UnitedStates]: {
|
|
435
|
-
[
|
|
363
|
+
[CompanyTypesValues.PRIVATE_COMPANY]: {
|
|
436
364
|
header: "acceptedDocumentsForPrivateCompanies",
|
|
437
365
|
documents: ["irsCP575"]
|
|
438
366
|
},
|
|
439
|
-
[
|
|
367
|
+
[CompanyTypesValues.PUBLIC_COMPANY]: {
|
|
440
368
|
header: "acceptedDocumentsForPublicCompanies",
|
|
441
369
|
documents: ["annualReport", "secForm10k"]
|
|
442
370
|
},
|
|
443
|
-
[
|
|
371
|
+
[CompanyTypesValues.UNLISTED_PUBLIC_COMPANY]: {
|
|
444
372
|
header: "acceptedDocumentsForPublicCompanies",
|
|
445
373
|
documents: ["annualReport", "secForm10k"]
|
|
446
374
|
},
|
|
447
|
-
[
|
|
375
|
+
[CompanyTypesValues.NON_PROFIT_OR_CHARITABLE]: {
|
|
448
376
|
header: "acceptedDocumentsForNonProfit",
|
|
449
377
|
documents: ["annualReport"]
|
|
450
378
|
},
|
|
451
|
-
[
|
|
379
|
+
[CompanyTypesValues.INCORPORATED_PARTNERSHIP]: {
|
|
452
380
|
header: "acceptedDocumentsForPartnerships",
|
|
453
381
|
documents: ["irsScheduleK1"]
|
|
454
382
|
}
|
|
@@ -458,9 +386,8 @@ const GuidanceContent = ({
|
|
|
458
386
|
country,
|
|
459
387
|
companyType
|
|
460
388
|
}) => {
|
|
461
|
-
var _a;
|
|
462
389
|
const { i18n } = useI18nContext();
|
|
463
|
-
const acceptedDocGuidance =
|
|
390
|
+
const acceptedDocGuidance = ACCEPTED_DOCUMENTS_MAP[country]?.[companyType];
|
|
464
391
|
return /* @__PURE__ */ jsx("div", { className: "adyen-kyc-upload-field__guidance", children: country === "US" ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
465
392
|
acceptedDocGuidance && /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-u-margin-bottom-24", children: [
|
|
466
393
|
/* @__PURE__ */ jsx("strong", { children: i18n.get(acceptedDocGuidance.header) }),
|
|
@@ -485,7 +412,7 @@ const GuidanceContent = ({
|
|
|
485
412
|
function TaxDocument({
|
|
486
413
|
id,
|
|
487
414
|
country,
|
|
488
|
-
companyType =
|
|
415
|
+
companyType = CompanyTypesValues.PRIVATE_COMPANY,
|
|
489
416
|
heading = "companyTaxDocumentFormHeading",
|
|
490
417
|
description = "companyTaxDocumentFormDescription",
|
|
491
418
|
...props
|
|
@@ -525,25 +452,25 @@ function BusinessDetails(props) {
|
|
|
525
452
|
proceedToManualDataEntry
|
|
526
453
|
} = props;
|
|
527
454
|
const forms = getForms(country);
|
|
528
|
-
const formWrapperClasses = (formId) =>
|
|
455
|
+
const formWrapperClasses = (formId) => activeForm?.formId !== formId ? "adyen-kyc-form-wrapper adyen-kyc-form-wrapper--hidden" : "adyen-kyc-form-wrapper";
|
|
529
456
|
const classNames = cx("adyen-kyc-business-details", {
|
|
530
|
-
"adyen-kyc-business-details--hide":
|
|
457
|
+
"adyen-kyc-business-details--hide": activeForm?.formId === "summary"
|
|
531
458
|
});
|
|
532
|
-
const companyType = taskType === TaskTypes.SOLE_PROPRIETOR_COMPANY ?
|
|
459
|
+
const companyType = taskType === TaskTypes.SOLE_PROPRIETOR_COMPANY ? CompanyTypesValues.SOLE_PROPRIETORSHIP : companyStructure?.entityType;
|
|
533
460
|
return /* @__PURE__ */ jsxs("div", { className: classNames, children: [
|
|
534
461
|
/* @__PURE__ */ jsx("div", { className: formWrapperClasses(forms.basicInformation.formId), children: /* @__PURE__ */ jsx(
|
|
535
462
|
BasicInformation,
|
|
536
463
|
{
|
|
537
464
|
...getFormProps(props, forms.basicInformation.formId),
|
|
538
465
|
id: forms.basicInformation.formId,
|
|
539
|
-
heading: i18n.get(
|
|
540
|
-
description:
|
|
466
|
+
heading: i18n.get(activeForm?.formHeading || forms.basicInformation.formHeading),
|
|
467
|
+
description: activeForm?.formDescription ? i18n.get(activeForm?.formDescription) : void 0,
|
|
541
468
|
country,
|
|
542
469
|
companyType,
|
|
543
470
|
isTopLevelEntity,
|
|
544
471
|
showBusinessSelection,
|
|
545
472
|
showCompanyStructure,
|
|
546
|
-
isActiveForm:
|
|
473
|
+
isActiveForm: activeForm?.formId === forms.basicInformation.formId,
|
|
547
474
|
loading,
|
|
548
475
|
proceedToManualDataEntry,
|
|
549
476
|
searchResults,
|
|
@@ -558,9 +485,9 @@ function BusinessDetails(props) {
|
|
|
558
485
|
{
|
|
559
486
|
...getFormProps(props, forms.companyStructure.formId),
|
|
560
487
|
id: forms.companyStructure.formId,
|
|
561
|
-
heading: i18n.get(
|
|
488
|
+
heading: i18n.get(activeForm?.formHeading ?? forms.companyStructure.formHeading),
|
|
562
489
|
description: i18n.get(
|
|
563
|
-
|
|
490
|
+
activeForm?.formDescription ?? forms.companyStructure.formDescription
|
|
564
491
|
),
|
|
565
492
|
country,
|
|
566
493
|
showCompanyStructure
|
|
@@ -571,7 +498,7 @@ function BusinessDetails(props) {
|
|
|
571
498
|
{
|
|
572
499
|
...getFormProps(props, forms.additionalInformation.formId),
|
|
573
500
|
id: forms.additionalInformation.formId,
|
|
574
|
-
heading: i18n.get(
|
|
501
|
+
heading: i18n.get(activeForm?.formHeading ?? forms.additionalInformation.formHeading),
|
|
575
502
|
country,
|
|
576
503
|
companyType,
|
|
577
504
|
showCompanyStructure
|
|
@@ -656,7 +583,7 @@ function BusinessDetails(props) {
|
|
|
656
583
|
{
|
|
657
584
|
...getFormProps(props, forms.companyConstitutionalDocument.formId),
|
|
658
585
|
id: forms.companyConstitutionalDocument.formId,
|
|
659
|
-
legalEntityType:
|
|
586
|
+
legalEntityType: LegalEntityTypes.SOLE_PROPRIETORSHIP,
|
|
660
587
|
country
|
|
661
588
|
}
|
|
662
589
|
) }),
|
|
@@ -702,25 +629,24 @@ const mapBasicInformation = (data) => {
|
|
|
702
629
|
}, {});
|
|
703
630
|
};
|
|
704
631
|
const mapDbaName = (legalEntity) => {
|
|
705
|
-
var _a, _b, _c, _d;
|
|
706
632
|
const entity = legalEntity.type === "organization" ? legalEntity.organization : legalEntity.soleProprietorship;
|
|
707
633
|
const dbaName = {};
|
|
708
|
-
if (typeof
|
|
634
|
+
if (typeof entity?.doingBusinessAsAbsent !== "undefined") {
|
|
709
635
|
dbaName.hasDoingBusinessAs = !entity.doingBusinessAsAbsent;
|
|
710
636
|
} else {
|
|
711
|
-
if (entity
|
|
712
|
-
dbaName.hasDoingBusinessAs =
|
|
637
|
+
if (entity?.doingBusinessAs) {
|
|
638
|
+
dbaName.hasDoingBusinessAs = entity?.doingBusinessAs !== (legalEntity.type === "organization" ? legalEntity.organization?.legalName : legalEntity.soleProprietorship?.name);
|
|
713
639
|
} else {
|
|
714
640
|
dbaName.hasDoingBusinessAs = void 0;
|
|
715
641
|
}
|
|
716
642
|
}
|
|
717
|
-
if (
|
|
718
|
-
dbaName.doingBusinessAs =
|
|
643
|
+
if (legalEntity.organization?.doingBusinessAs) {
|
|
644
|
+
dbaName.doingBusinessAs = legalEntity.organization?.doingBusinessAs;
|
|
719
645
|
}
|
|
720
646
|
return dbaName;
|
|
721
647
|
};
|
|
722
648
|
const mapIsUen = (taxInformation, registrationNumber, country) => {
|
|
723
|
-
const currentCountryTaxInfo = taxInformation
|
|
649
|
+
const currentCountryTaxInfo = taxInformation?.find((taxInfo) => taxInfo.country === country);
|
|
724
650
|
if (!currentCountryTaxInfo || country !== "SG") return {};
|
|
725
651
|
return {
|
|
726
652
|
registrationNumber: currentCountryTaxInfo.type === "UEN" ? currentCountryTaxInfo.number : registrationNumber,
|
|
@@ -730,14 +656,21 @@ const mapIsUen = (taxInformation, registrationNumber, country) => {
|
|
|
730
656
|
const mapAdditionalInformation = (data, legalEntity) => {
|
|
731
657
|
if (!data) return;
|
|
732
658
|
const entity = legalEntity.type === "organization" ? legalEntity.organization : legalEntity.soleProprietorship;
|
|
733
|
-
const currentCountry = entity
|
|
659
|
+
const currentCountry = entity?.registeredAddress.country;
|
|
734
660
|
const dbaNameFields = mapDbaName(legalEntity);
|
|
735
661
|
const isUen = mapIsUen(
|
|
736
662
|
data.taxInformation,
|
|
737
663
|
data.registrationNumber,
|
|
738
664
|
currentCountry
|
|
739
665
|
);
|
|
740
|
-
const
|
|
666
|
+
const companyType = legalEntity.type === "organization" ? legalEntity.organization?.type : CompanyTypesValues.SOLE_PROPRIETORSHIP;
|
|
667
|
+
const registrationNumberType = getDefaultRegistrationNumberType(
|
|
668
|
+
entity?.registrationNumber,
|
|
669
|
+
currentCountry,
|
|
670
|
+
companyType
|
|
671
|
+
);
|
|
672
|
+
const vatNumberType = getDefaultVatNumberType(entity?.vatNumber, currentCountry);
|
|
673
|
+
const operationalAddressIsSame = entity?.principalPlaceOfBusiness && !objectsDeepEqual(entity?.principalPlaceOfBusiness, entity?.registeredAddress) ? operationalAddressIsSameIds.OPERATIONAL_ADDRESS_IS_NOT_SAME : operationalAddressIsSameIds.OPERATIONAL_ADDRESS_IS_SAME;
|
|
741
674
|
const result = entriesOf(data).reduce(
|
|
742
675
|
(acc, [field]) => {
|
|
743
676
|
if (!COUNTRIES_USING_COMPANY_SEARCH.includes(currentCountry)) {
|
|
@@ -754,11 +687,29 @@ const mapAdditionalInformation = (data, legalEntity) => {
|
|
|
754
687
|
}
|
|
755
688
|
return acc;
|
|
756
689
|
},
|
|
757
|
-
{ operationalAddressIsSame }
|
|
690
|
+
{ operationalAddressIsSame, registrationNumberType, vatNumberType }
|
|
758
691
|
);
|
|
759
692
|
return { ...result, ...dbaNameFields, ...isUen };
|
|
760
693
|
};
|
|
761
|
-
const
|
|
694
|
+
const mapLocalization = (data) => {
|
|
695
|
+
const mappings = [
|
|
696
|
+
{ formField: "jaHaniLegalCompanyName", script: "ja-Hani", legalEntityField: "legalName" },
|
|
697
|
+
{ formField: "jaKanaLegalCompanyName", script: "ja-Kana", legalEntityField: "legalName" }
|
|
698
|
+
];
|
|
699
|
+
const localizedScriptsAndFields = data.organization?.localization || data.soleProprietorship?.localization;
|
|
700
|
+
if (!localizedScriptsAndFields) {
|
|
701
|
+
return;
|
|
702
|
+
}
|
|
703
|
+
const result = {};
|
|
704
|
+
mappings.forEach((mapping) => {
|
|
705
|
+
const value = localizedScriptsAndFields.find(
|
|
706
|
+
(localization) => localization.script === mapping.script
|
|
707
|
+
)?.fields?.[mapping.legalEntityField];
|
|
708
|
+
result[mapping.formField] = value;
|
|
709
|
+
});
|
|
710
|
+
return result;
|
|
711
|
+
};
|
|
712
|
+
const mapLegalEntityToBusinessDetailsSchema = (legalEntity, parentEntity, isExperimentEnabled) => {
|
|
762
713
|
if (!legalEntity) return {};
|
|
763
714
|
const {
|
|
764
715
|
companyRegistrationDocument,
|
|
@@ -769,13 +720,12 @@ const mapLegalEntityToBusinessDetailsSchema = (legalEntity, parentEntity) => {
|
|
|
769
720
|
companyConstitutionalDocument
|
|
770
721
|
} = mapApiDocumentToBusinessDetailsDocuments(legalEntity.id);
|
|
771
722
|
const buildSolePropSchema = () => {
|
|
772
|
-
var _a, _b, _c, _d;
|
|
773
723
|
const solePropData = formatObject(
|
|
774
724
|
legalEntity,
|
|
775
725
|
solePropBusinessDetailsKeyMapping
|
|
776
726
|
);
|
|
777
|
-
const country =
|
|
778
|
-
if (
|
|
727
|
+
const country = solePropData?.additionalInformation?.registrationAddress?.country ?? parentEntity?.individual?.residentialAddress.country;
|
|
728
|
+
if (legalEntity?.soleProprietorship?.financialReports && solePropData) {
|
|
779
729
|
solePropData.companyFinancialInformation = mapFinancialReportsToFinancialInformation(
|
|
780
730
|
legalEntity.soleProprietorship.financialReports
|
|
781
731
|
);
|
|
@@ -783,13 +733,22 @@ const mapLegalEntityToBusinessDetailsSchema = (legalEntity, parentEntity) => {
|
|
|
783
733
|
return {
|
|
784
734
|
...solePropData,
|
|
785
735
|
basicInformation: {
|
|
786
|
-
...solePropData
|
|
736
|
+
...solePropData?.basicInformation,
|
|
787
737
|
country
|
|
788
738
|
},
|
|
789
739
|
companyConstitutionalDocument
|
|
790
740
|
};
|
|
791
741
|
};
|
|
792
|
-
const orgSchema = {
|
|
742
|
+
const orgSchema = isExperimentEnabled?.("EnableBusinessDetailsMultiForm") ? {
|
|
743
|
+
...formatObject(legalEntity, businessDetailsComponentsKeyMapping),
|
|
744
|
+
businessSelection: {},
|
|
745
|
+
companyRegistrationDocument,
|
|
746
|
+
companyTaxDocument,
|
|
747
|
+
companyProofOfDirectorDocument,
|
|
748
|
+
companyProofOfSignatoryDocument,
|
|
749
|
+
companyProofOfOwnershipDocument,
|
|
750
|
+
companyFinancialInformation: {}
|
|
751
|
+
} : {
|
|
793
752
|
...formatObject(legalEntity, businessDetailsComponentsKeyMapping),
|
|
794
753
|
companyRegistrationDocument,
|
|
795
754
|
companyTaxDocument,
|
|
@@ -799,13 +758,21 @@ const mapLegalEntityToBusinessDetailsSchema = (legalEntity, parentEntity) => {
|
|
|
799
758
|
companyFinancialInformation: {}
|
|
800
759
|
};
|
|
801
760
|
const businessDetailsSchema = legalEntity.type === "organization" ? orgSchema : buildSolePropSchema();
|
|
761
|
+
const localization = mapLocalization(legalEntity);
|
|
802
762
|
return entriesOf(businessDetailsSchema).reduce((componentData, [key]) => {
|
|
803
|
-
var _a, _b;
|
|
804
763
|
switch (key) {
|
|
805
764
|
case "basicInformation": {
|
|
806
765
|
return {
|
|
807
766
|
...componentData,
|
|
808
|
-
[key]: mapBasicInformation(businessDetailsSchema[key])
|
|
767
|
+
[key]: { ...mapBasicInformation(businessDetailsSchema[key]), ...localization ?? {} }
|
|
768
|
+
};
|
|
769
|
+
}
|
|
770
|
+
case "businessSelection": {
|
|
771
|
+
return {
|
|
772
|
+
...componentData,
|
|
773
|
+
[key]: {
|
|
774
|
+
hasSelectedBusiness: false
|
|
775
|
+
}
|
|
809
776
|
};
|
|
810
777
|
}
|
|
811
778
|
case "companyStructure": {
|
|
@@ -859,8 +826,8 @@ const mapLegalEntityToBusinessDetailsSchema = (legalEntity, parentEntity) => {
|
|
|
859
826
|
};
|
|
860
827
|
}
|
|
861
828
|
case "companyFinancialInformation": {
|
|
862
|
-
const financialReports = legalEntity.type === "organization" ?
|
|
863
|
-
return
|
|
829
|
+
const financialReports = legalEntity.type === "organization" ? legalEntity?.organization?.financialReports : legalEntity?.soleProprietorship?.financialReports;
|
|
830
|
+
return financialReports?.length ? {
|
|
864
831
|
...componentData,
|
|
865
832
|
[key]: mapFinancialReportsToFinancialInformation(financialReports)
|
|
866
833
|
} : componentData;
|
|
@@ -870,6 +837,81 @@ const mapLegalEntityToBusinessDetailsSchema = (legalEntity, parentEntity) => {
|
|
|
870
837
|
}
|
|
871
838
|
}, {});
|
|
872
839
|
};
|
|
840
|
+
const businessDetailsBase = {
|
|
841
|
+
/* Base required fields */
|
|
842
|
+
country: { rule: "REQUIRED" },
|
|
843
|
+
entityType: { rule: "businessRequiresCompanyType" },
|
|
844
|
+
legalCompanyName: { rule: "REQUIRED" },
|
|
845
|
+
jaHaniLegalCompanyName: { rule: "japaneseLegalCompanyName" },
|
|
846
|
+
jaKanaLegalCompanyName: { rule: "japaneseLegalCompanyName" },
|
|
847
|
+
hasDoingBusinessAs: { rule: "REQUIRED" },
|
|
848
|
+
doingBusinessAs: { rule: "requireDoingBusinessAsName" },
|
|
849
|
+
registrationAddress: { rule: "REQUIRED" },
|
|
850
|
+
operationalAddressIsSame: { rule: "REQUIRED" },
|
|
851
|
+
/* Base optional fields */
|
|
852
|
+
operationalAddress: { rule: "OPTIONAL" },
|
|
853
|
+
/* Fields with custom country specific rules */
|
|
854
|
+
hasSelectedBusiness: { rule: "requireBusinessSelection" },
|
|
855
|
+
stockExchangeMIC: { rule: "ifPubliclyTradedCompany" },
|
|
856
|
+
stockISIN: { rule: "ifPubliclyTradedCompany" },
|
|
857
|
+
stockTickerSymbol: { rule: "ifPubliclyTradedCompany" },
|
|
858
|
+
dateOfIncorporation: { rule: "isDateOfIncorporationRequired" },
|
|
859
|
+
stateOrProvince: { rule: "countryUsingCompanySearch" },
|
|
860
|
+
registrationNumber: { rule: "countryRequiresRegistrationNumber" },
|
|
861
|
+
registrationNumberType: { rule: "registrationNumberType" },
|
|
862
|
+
exemptedFromRegistrationNumber: { rule: "companyRegistrationNumberExemptionAllowed" },
|
|
863
|
+
eInvoicingCode: { rule: "isEInvoicingCodeEnabled" },
|
|
864
|
+
countryOfGoverningLaw: { rule: "countryOfGoverningLawRequired" },
|
|
865
|
+
taxDocument: { rule: "ifCountryUsAndTinFailed" }
|
|
866
|
+
};
|
|
867
|
+
const taxInformationBase = {
|
|
868
|
+
vatNumber: { rule: "countryUsesVat" },
|
|
869
|
+
vatNumberType: { rule: "vatNumberType" },
|
|
870
|
+
exemptedFromVat: { rule: "isVatExempt" },
|
|
871
|
+
vatAbsenceReason: { rule: "isVatExempt" },
|
|
872
|
+
taxInformation: { rule: "countryUsesTaxId" },
|
|
873
|
+
exemptedFromTax: { rule: "countryHasTaxExemptions" },
|
|
874
|
+
isUen: { rule: "countryUsesUenOrGst" }
|
|
875
|
+
};
|
|
876
|
+
const financialInformationBase = {
|
|
877
|
+
numberOfEmployees: { rule: "countryRequiresFinancialInformation" },
|
|
878
|
+
financialReportingDate: { rule: "isFinancialReportingFieldsRequired" },
|
|
879
|
+
currency: { rule: "isFinancialReportingFieldsRequired" },
|
|
880
|
+
reportedValueOption: { rule: "isFinancialReportingFieldsRequired" },
|
|
881
|
+
annualTurnover: { rule: "annualTurnoverRequired" },
|
|
882
|
+
netAssets: { rule: "netAssetsRequired" },
|
|
883
|
+
balanceSheetTotal: { rule: "balanceSheetTotalRequired" }
|
|
884
|
+
};
|
|
885
|
+
const businessDetailsFieldsPerScenario = {
|
|
886
|
+
L0: {
|
|
887
|
+
country: { rule: "REQUIRED" },
|
|
888
|
+
legalCompanyName: { rule: "REQUIRED" },
|
|
889
|
+
stateOrProvince: { rule: "countryUsingCompanySearch" },
|
|
890
|
+
...financialInformationBase
|
|
891
|
+
},
|
|
892
|
+
L1: {
|
|
893
|
+
...businessDetailsBase,
|
|
894
|
+
...financialInformationBase
|
|
895
|
+
},
|
|
896
|
+
L: {
|
|
897
|
+
...businessDetailsBase,
|
|
898
|
+
...taxInformationBase,
|
|
899
|
+
...financialInformationBase
|
|
900
|
+
},
|
|
901
|
+
L_PROOFOFADDRESS: {
|
|
902
|
+
// TODO this field does not exist
|
|
903
|
+
// proofOfAddressDocument: { rule: 'REQUIRED' },
|
|
904
|
+
},
|
|
905
|
+
L_REGDOC: {
|
|
906
|
+
registrationDocument: { rule: "REQUIRED" }
|
|
907
|
+
},
|
|
908
|
+
L_TAXDOC: {
|
|
909
|
+
taxDocument: { rule: "REQUIRED" }
|
|
910
|
+
},
|
|
911
|
+
L_BAFIN: {
|
|
912
|
+
legalForm: { rule: "REQUIRED" }
|
|
913
|
+
}
|
|
914
|
+
};
|
|
873
915
|
const adjustFormData = (oldFormData, newFormData) => {
|
|
874
916
|
const schema = Array.from((/* @__PURE__ */ new Set([...keysOf(oldFormData), ...keysOf(newFormData)])).keys());
|
|
875
917
|
return schema.reduce((acc, key) => {
|
|
@@ -892,9 +934,17 @@ const setRemovedFieldsOnSchemaToDeletedValue = (newData, existingData) => {
|
|
|
892
934
|
return { ...adjusted, [formId]: adjustFormData(oldFormData, newFormData) };
|
|
893
935
|
}, {});
|
|
894
936
|
};
|
|
895
|
-
const formatFinancialInformationSummary = (data, i18n, country) => {
|
|
896
|
-
|
|
897
|
-
|
|
937
|
+
const formatFinancialInformationSummary = (data, i18n, country, dateOfIncorporation) => {
|
|
938
|
+
let summary;
|
|
939
|
+
if (!data) return void 0;
|
|
940
|
+
if (dateOfIncorporation && !isDateOlderThanAYear(dateOfIncorporation)) {
|
|
941
|
+
if (country === CountryCodes.UnitedKingdom) {
|
|
942
|
+
summary = { numberOfEmployees: `${data.numberOfEmployees}` };
|
|
943
|
+
return summary;
|
|
944
|
+
}
|
|
945
|
+
return void 0;
|
|
946
|
+
}
|
|
947
|
+
summary = {
|
|
898
948
|
currency: data.currency,
|
|
899
949
|
financialReportingDate: data.financialReportingDate
|
|
900
950
|
};
|
|
@@ -913,224 +963,176 @@ const formatFinancialInformationSummary = (data, i18n, country) => {
|
|
|
913
963
|
return summary;
|
|
914
964
|
};
|
|
915
965
|
const mapBusinessDetailsDocumentToApiDocument = async (data, entityId) => {
|
|
916
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
917
966
|
const {
|
|
918
967
|
companyRegistrationDocument,
|
|
919
968
|
companyTaxDocument,
|
|
920
969
|
companyProofOfDirectorDocument,
|
|
921
970
|
companyConstitutionalDocument,
|
|
922
971
|
companyProofOfSignatoryDocument,
|
|
923
|
-
companyProofOfOwnershipDocument
|
|
972
|
+
companyProofOfOwnershipDocument,
|
|
973
|
+
basicInformation
|
|
924
974
|
} = data;
|
|
925
975
|
const taxDocumentType = COUNTRIES_THAT_USE_TAX_ID_INSTEAD_OF_VAT.includes(
|
|
926
|
-
|
|
976
|
+
basicInformation?.country
|
|
927
977
|
) ? "proofOfOrganizationTaxInfo" : "vatDocument";
|
|
928
978
|
const documents = await Promise.all([
|
|
929
979
|
createDocumentRequest({
|
|
930
980
|
entityId,
|
|
931
981
|
entityType: "legalEntity",
|
|
932
982
|
documentType: "registrationDocument",
|
|
933
|
-
page1:
|
|
983
|
+
page1: companyRegistrationDocument?.registrationDocument?.[0]
|
|
934
984
|
}),
|
|
935
985
|
createDocumentRequest({
|
|
936
986
|
entityId,
|
|
937
987
|
entityType: "legalEntity",
|
|
938
988
|
documentType: taxDocumentType,
|
|
939
|
-
page1:
|
|
989
|
+
page1: companyTaxDocument?.taxDocument?.[0]
|
|
940
990
|
}),
|
|
941
991
|
createDocumentRequest({
|
|
942
992
|
entityId,
|
|
943
993
|
entityType: "legalEntity",
|
|
944
994
|
documentType: "proofOfDirector",
|
|
945
|
-
page1:
|
|
995
|
+
page1: companyProofOfDirectorDocument?.proofOfDirector?.[0]
|
|
946
996
|
}),
|
|
947
997
|
createDocumentRequest({
|
|
948
998
|
entityId,
|
|
949
999
|
entityType: "legalEntity",
|
|
950
1000
|
documentType: "constitutionalDocument",
|
|
951
|
-
page1:
|
|
1001
|
+
page1: companyConstitutionalDocument?.constitutionalDocument?.[0]
|
|
952
1002
|
}),
|
|
953
1003
|
createDocumentRequest({
|
|
954
1004
|
entityId,
|
|
955
1005
|
entityType: "legalEntity",
|
|
956
1006
|
documentType: "proofOfSignatory",
|
|
957
|
-
page1:
|
|
1007
|
+
page1: companyProofOfSignatoryDocument?.proofOfSignatory?.[0]
|
|
958
1008
|
}),
|
|
959
1009
|
createDocumentRequest({
|
|
960
1010
|
entityId,
|
|
961
1011
|
entityType: "legalEntity",
|
|
962
1012
|
documentType: "proofOfOwnership",
|
|
963
|
-
page1:
|
|
964
|
-
page2:
|
|
1013
|
+
page1: companyProofOfOwnershipDocument?.proofOfOwnership?.[0],
|
|
1014
|
+
page2: companyProofOfOwnershipDocument?.proofOfOwnership?.[1]
|
|
965
1015
|
})
|
|
966
1016
|
]);
|
|
967
1017
|
return documents.filter(Boolean);
|
|
968
1018
|
};
|
|
969
1019
|
const mapBusinessDetailsSchemaToLegalEntity = (data, accountHolder, isExperimentEnabled) => {
|
|
970
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q;
|
|
971
1020
|
const requestObj = {
|
|
972
1021
|
...formatObject(
|
|
973
1022
|
data,
|
|
974
1023
|
accountHolder === "mySoleProprietorName" ? solePropBusinessDetailsApiKeyMapping : businessDetailsApiKeyMapping
|
|
975
1024
|
)
|
|
976
1025
|
};
|
|
977
|
-
|
|
1026
|
+
delete requestObj.organization?.legalFormDescription;
|
|
1027
|
+
const canSaveRegNumberAbsentState = isExperimentEnabled("EnableRegistrationAndTaxAbsentStatesV4") && isRegistrationNumberAbsentStateV4Scenario(
|
|
1028
|
+
data.basicInformation?.country,
|
|
1029
|
+
data.companyStructure?.entityType
|
|
1030
|
+
);
|
|
978
1031
|
const taxData = COUNTRIES_USING_COMPANY_SEARCH.includes(
|
|
979
|
-
|
|
980
|
-
) ?
|
|
1032
|
+
data.basicInformation?.country
|
|
1033
|
+
) ? data.basicInformation?.taxInformation : data.additionalInformation?.taxInformation;
|
|
981
1034
|
const registrationNumber = COUNTRIES_USING_COMPANY_SEARCH.includes(
|
|
982
|
-
|
|
983
|
-
) ?
|
|
984
|
-
const
|
|
1035
|
+
data.basicInformation?.country
|
|
1036
|
+
) ? data.basicInformation?.registrationNumber : data.additionalInformation?.registrationNumber;
|
|
1037
|
+
const localization = processLocalizationFields(data.basicInformation);
|
|
1038
|
+
const doingBusinessAs = data.additionalInformation?.doingBusinessAs ?? "";
|
|
985
1039
|
const entityObject = isEmpty(data.companyStructure) ? requestObj.soleProprietorship : requestObj.organization;
|
|
986
1040
|
if (entityObject) {
|
|
987
1041
|
if (taxData) {
|
|
988
1042
|
entityObject.taxInformation = taxData;
|
|
989
1043
|
}
|
|
990
|
-
if (!!requestObj.soleProprietorship && !
|
|
1044
|
+
if (!!requestObj.soleProprietorship && !requestObj.soleProprietorship?.countryOfGoverningLaw && !!data.basicInformation?.country) {
|
|
991
1045
|
requestObj.soleProprietorship.countryOfGoverningLaw = data.basicInformation.country;
|
|
992
1046
|
}
|
|
993
1047
|
if (registrationNumber) {
|
|
994
1048
|
entityObject.registrationNumber = registrationNumber;
|
|
995
|
-
if (
|
|
1049
|
+
if (canSaveRegNumberAbsentState && requestObj.organization) {
|
|
996
1050
|
requestObj.organization.registrationNumberAbsent = false;
|
|
997
1051
|
}
|
|
998
1052
|
}
|
|
999
|
-
if (
|
|
1000
|
-
|
|
1053
|
+
if (localization) {
|
|
1054
|
+
entityObject.localization = localization;
|
|
1001
1055
|
}
|
|
1002
|
-
if (
|
|
1056
|
+
if (data.additionalInformation?.exemptedFromRegistrationNumber && canSaveRegNumberAbsentState && requestObj.organization) {
|
|
1057
|
+
requestObj.organization.registrationNumberAbsent = data.additionalInformation?.exemptedFromRegistrationNumber;
|
|
1058
|
+
}
|
|
1059
|
+
if (data.additionalInformation?.vatAbsenceReason) {
|
|
1003
1060
|
entityObject.vatNumber = "";
|
|
1004
1061
|
}
|
|
1005
1062
|
if (isExperimentEnabled("EnableDoingBusinessAsNameV4")) {
|
|
1006
|
-
if (typeof
|
|
1007
|
-
entityObject.doingBusinessAsAbsent = !
|
|
1063
|
+
if (typeof data.additionalInformation?.hasDoingBusinessAs !== "undefined") {
|
|
1064
|
+
entityObject.doingBusinessAsAbsent = !data.additionalInformation?.hasDoingBusinessAs;
|
|
1008
1065
|
}
|
|
1009
1066
|
} else {
|
|
1010
|
-
entityObject.doingBusinessAs = doingBusinessAs ||
|
|
1067
|
+
entityObject.doingBusinessAs = doingBusinessAs || data.basicInformation?.legalCompanyName;
|
|
1011
1068
|
delete entityObject.doingBusinessAsAbsent;
|
|
1012
1069
|
}
|
|
1013
|
-
if (
|
|
1070
|
+
if (data.additionalInformation?.operationalAddressIsSame === operationalAddressIsSameIds.OPERATIONAL_ADDRESS_IS_SAME && entityObject.principalPlaceOfBusiness) {
|
|
1014
1071
|
entityObject.principalPlaceOfBusiness = entityObject.registeredAddress;
|
|
1015
1072
|
}
|
|
1016
1073
|
if (!isEmpty(data.companyFinancialInformation)) {
|
|
1074
|
+
const isIncorporationDateDependencyEnabled = isExperimentEnabled(
|
|
1075
|
+
"EnableIncorporationDateBasedFinancialValidationForHO"
|
|
1076
|
+
);
|
|
1017
1077
|
entityObject.financialReports = [
|
|
1018
|
-
mapFinancialInformationToFinancialReport(
|
|
1078
|
+
mapFinancialInformationToFinancialReport(
|
|
1079
|
+
data.companyFinancialInformation,
|
|
1080
|
+
isIncorporationDateDependencyEnabled ? data?.additionalInformation?.dateOfIncorporation : void 0
|
|
1081
|
+
)
|
|
1019
1082
|
];
|
|
1020
1083
|
}
|
|
1021
1084
|
}
|
|
1022
|
-
requestObj.type = requestObj.organization ?
|
|
1023
|
-
if (
|
|
1085
|
+
requestObj.type = requestObj.organization ? LegalEntityTypes.ORGANIZATION : LegalEntityTypes.SOLE_PROPRIETORSHIP;
|
|
1086
|
+
if (entityObject?.registeredAddress.country === "US") {
|
|
1024
1087
|
delete entityObject.registrationNumber;
|
|
1025
1088
|
}
|
|
1089
|
+
if (!canSaveRegNumberAbsentState) {
|
|
1090
|
+
delete requestObj.organization?.registrationNumberAbsent;
|
|
1091
|
+
}
|
|
1026
1092
|
return requestObj;
|
|
1027
1093
|
};
|
|
1028
|
-
const
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
entityType: { rule: "businessRequiresCompanyType" },
|
|
1032
|
-
legalCompanyName: { rule: "REQUIRED" },
|
|
1033
|
-
hasDoingBusinessAs: { rule: "REQUIRED" },
|
|
1034
|
-
registrationAddress: { rule: "REQUIRED" },
|
|
1035
|
-
operationalAddressIsSame: { rule: "REQUIRED" },
|
|
1036
|
-
/* Base optional fields */
|
|
1037
|
-
operationalAddress: { rule: "OPTIONAL" },
|
|
1038
|
-
/* Fields with custom country specific rules */
|
|
1039
|
-
stockExchangeMIC: { rule: "ifPubliclyTradedCompany" },
|
|
1040
|
-
stockISIN: { rule: "ifPubliclyTradedCompany" },
|
|
1041
|
-
stockTickerSymbol: { rule: "ifPubliclyTradedCompany" },
|
|
1042
|
-
dateOfIncorporation: { rule: "isDateOfIncorporationRequired" },
|
|
1043
|
-
stateOrProvince: { rule: "countryUsingCompanySearch" },
|
|
1044
|
-
registrationNumber: { rule: "countryRequiresRegistrationNumber" },
|
|
1045
|
-
exemptedFromRegistrationNumber: { rule: "companyRegistrationNumberExemptionAllowed" },
|
|
1046
|
-
eInvoicingCode: { rule: "isEInvoicingCodeEnabled" },
|
|
1047
|
-
countryOfGoverningLaw: { rule: "countryOfGoverningLawRequired" },
|
|
1048
|
-
taxDocument: { rule: "ifCountryUsAndTinFailed" }
|
|
1049
|
-
};
|
|
1050
|
-
const taxInformationBase = {
|
|
1051
|
-
vatNumber: { rule: "countryUsesVat" },
|
|
1052
|
-
exemptedFromVat: { rule: "countryUsesVat" },
|
|
1053
|
-
vatAbsenceReason: { rule: "countryUsesVat" },
|
|
1054
|
-
taxInformation: { rule: "countryUsesTaxId" },
|
|
1055
|
-
exemptedFromTax: { rule: "countryHasTaxExemptions" },
|
|
1056
|
-
isUen: { rule: "countryUsesUenOrGst" }
|
|
1057
|
-
};
|
|
1058
|
-
const financialInformationBase = {
|
|
1059
|
-
numberOfEmployees: { rule: "countryRequiresFinancialInformation" },
|
|
1060
|
-
financialReportingDate: { rule: "isFinancialReportingFieldsRequired" }
|
|
1061
|
-
};
|
|
1062
|
-
const businessDetailsFieldsPerScenario = {
|
|
1063
|
-
L0: {
|
|
1064
|
-
country: { rule: "REQUIRED" },
|
|
1065
|
-
legalCompanyName: { rule: "REQUIRED" },
|
|
1066
|
-
stateOrProvince: { rule: "countryUsingCompanySearch" },
|
|
1067
|
-
...financialInformationBase
|
|
1068
|
-
},
|
|
1069
|
-
L1: {
|
|
1070
|
-
...businessDetailsBase,
|
|
1071
|
-
...financialInformationBase
|
|
1072
|
-
},
|
|
1073
|
-
L: {
|
|
1074
|
-
...businessDetailsBase,
|
|
1075
|
-
...taxInformationBase,
|
|
1076
|
-
...financialInformationBase
|
|
1077
|
-
},
|
|
1078
|
-
L_PROOFOFADDRESS: {
|
|
1079
|
-
// TODO this field does not exist
|
|
1080
|
-
// proofOfAddressDocument: { rule: 'REQUIRED' },
|
|
1081
|
-
},
|
|
1082
|
-
L_REGDOC: {
|
|
1083
|
-
registrationDocument: { rule: "REQUIRED" }
|
|
1084
|
-
},
|
|
1085
|
-
L_TAXDOC: {
|
|
1086
|
-
taxDocument: { rule: "REQUIRED" }
|
|
1094
|
+
const processLocalizationFields = (data) => {
|
|
1095
|
+
if (!data) {
|
|
1096
|
+
return;
|
|
1087
1097
|
}
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
}
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
entityType: { label: "companyType" },
|
|
1117
|
-
isUen: { label: "iDoNotHaveGst" }
|
|
1118
|
-
},
|
|
1119
|
-
[CountryCodes.UnitedStates]: {
|
|
1120
|
-
country: { label: "country__US__business" },
|
|
1121
|
-
stateOrProvince: { label: "stateOrProvince__US__business" },
|
|
1122
|
-
doingBusinessAs: { label: "doingBusinessAs" },
|
|
1123
|
-
exemptedFromTax: { label: "doNotHaveEIN" }
|
|
1098
|
+
const LOCALIZATION_FIELDS = {
|
|
1099
|
+
jaHaniLegalCompanyName: { script: "ja-Hani", fieldName: "legalName" },
|
|
1100
|
+
jaKanaLegalCompanyName: { script: "ja-Kana", fieldName: "legalName" }
|
|
1101
|
+
};
|
|
1102
|
+
const localization = {};
|
|
1103
|
+
Object.keys(LOCALIZATION_FIELDS).forEach((field) => {
|
|
1104
|
+
const basicInformationFieldSchemaField = field;
|
|
1105
|
+
if (data[basicInformationFieldSchemaField]) {
|
|
1106
|
+
const script = LOCALIZATION_FIELDS[basicInformationFieldSchemaField]?.script;
|
|
1107
|
+
const fieldName = LOCALIZATION_FIELDS[basicInformationFieldSchemaField]?.fieldName;
|
|
1108
|
+
if (script && localization[script]) {
|
|
1109
|
+
localization[script] = {
|
|
1110
|
+
fields: {
|
|
1111
|
+
...localization[script].fields,
|
|
1112
|
+
[fieldName]: data[basicInformationFieldSchemaField]
|
|
1113
|
+
}
|
|
1114
|
+
};
|
|
1115
|
+
} else if (script && !localization[script]) {
|
|
1116
|
+
localization[script] = {
|
|
1117
|
+
fields: {
|
|
1118
|
+
[fieldName]: data[basicInformationFieldSchemaField]
|
|
1119
|
+
}
|
|
1120
|
+
};
|
|
1121
|
+
}
|
|
1122
|
+
}
|
|
1123
|
+
});
|
|
1124
|
+
if (Object.keys(localization).length === 0) {
|
|
1125
|
+
return;
|
|
1124
1126
|
}
|
|
1127
|
+
return Object.keys(localization).map((script) => ({
|
|
1128
|
+
script,
|
|
1129
|
+
fields: { ...localization[script].fields }
|
|
1130
|
+
}));
|
|
1125
1131
|
};
|
|
1126
1132
|
const MANDATORY_FIELDS_BUSINESS_DETAILS = [
|
|
1127
1133
|
"basicInformation.legalCompanyName",
|
|
1128
1134
|
"basicInformation.country"
|
|
1129
1135
|
];
|
|
1130
|
-
const parseBusinessDetailsScenarios = (scenarios, country) => augmentWithCountryConfigs(
|
|
1131
|
-
businessDetailsCountryConfig[country],
|
|
1132
|
-
composePerScenarioFormConfigurations(scenarios, businessDetailsFieldsPerScenario)
|
|
1133
|
-
);
|
|
1134
1136
|
const canSubmit = (data) => MANDATORY_FIELDS_BUSINESS_DETAILS.every((detail) => {
|
|
1135
1137
|
const value = getProp(data, detail);
|
|
1136
1138
|
return !isEmpty$1(value);
|
|
@@ -1138,74 +1140,72 @@ const canSubmit = (data) => MANDATORY_FIELDS_BUSINESS_DETAILS.every((detail) =>
|
|
|
1138
1140
|
const isDocumentsRequired = (forms) => forms.some((form) => documentFormsIds.includes(form.formId));
|
|
1139
1141
|
const removeConditionalForms = (forms, isSkippingCompanyStructure) => isSkippingCompanyStructure ? forms.filter((f) => f.formId !== "companyStructure" && f.formId !== "companyType") : forms;
|
|
1140
1142
|
const formatBasicInformation = (data, labels, datasetUtils, companyType, isCountryOfGoverningLawEnabled) => {
|
|
1141
|
-
|
|
1142
|
-
const country = data == null ? void 0 : data.country;
|
|
1143
|
+
const country = data?.country;
|
|
1143
1144
|
const registrationNumberLabel = resolveFieldMetadata(
|
|
1144
1145
|
registrationNumberDefaultFieldConfig[country],
|
|
1145
1146
|
{
|
|
1146
1147
|
companyType,
|
|
1147
|
-
registrationNumberType: data.registrationNumber ? inferCompanyRegistrationNumberType(data
|
|
1148
|
+
registrationNumberType: data.registrationNumber ? inferCompanyRegistrationNumberType(data?.registrationNumber, country, companyType) : getCompanyRegistrationNumberOptions(country, companyType)?.[0]?.id
|
|
1148
1149
|
},
|
|
1149
1150
|
registrationNumberDefaultFieldMetadata
|
|
1150
1151
|
).label;
|
|
1151
1152
|
const taxIdLabel = resolveFieldMetadata(
|
|
1152
|
-
|
|
1153
|
+
taxInformationDefaultFieldConfig[country],
|
|
1153
1154
|
{
|
|
1154
1155
|
taxIdNumberType: countryToTaxInfoTypeMap[country] ?? void 0,
|
|
1155
1156
|
// TODO use type selector
|
|
1156
1157
|
companyType: void 0
|
|
1157
1158
|
},
|
|
1158
|
-
|
|
1159
|
+
taxInformationDefaultFieldMetadata
|
|
1159
1160
|
).label;
|
|
1160
1161
|
const countryOfGoverningLaw = getCountryOfGoverningLaw(isCountryOfGoverningLawEnabled, data);
|
|
1161
1162
|
return {
|
|
1162
|
-
[
|
|
1163
|
+
[labels?.basicInformation?.legalCompanyName ?? "legalCompanyName"]: data.legalCompanyName,
|
|
1163
1164
|
country: datasetUtils.getCountryName(data.country),
|
|
1164
1165
|
[getKeyForField("stateOrProvince", data.country)]: datasetUtils.getStateName(
|
|
1165
1166
|
data.stateOrProvince,
|
|
1166
1167
|
data.country
|
|
1167
1168
|
),
|
|
1168
|
-
[taxIdLabel]:
|
|
1169
|
+
[taxIdLabel]: data.taxInformation?.find((taxId) => data.country === taxId.country)?.number,
|
|
1169
1170
|
[registrationNumberLabel]: data.registrationNumber,
|
|
1170
1171
|
countryOfGoverningLaw: datasetUtils.getCountryName(countryOfGoverningLaw)
|
|
1171
1172
|
};
|
|
1172
1173
|
};
|
|
1173
1174
|
const formatAdditionalInformation = (data, labels, country, companyType, i18n) => {
|
|
1174
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l;
|
|
1175
1175
|
const registrationNumberLabel = resolveFieldMetadata(
|
|
1176
1176
|
registrationNumberDefaultFieldConfig[country],
|
|
1177
1177
|
{
|
|
1178
1178
|
companyType,
|
|
1179
|
-
registrationNumberType: data.registrationNumber ? inferCompanyRegistrationNumberType(data
|
|
1179
|
+
registrationNumberType: data.registrationNumber ? inferCompanyRegistrationNumberType(data?.registrationNumber, country, companyType) : getCompanyRegistrationNumberOptions(country, companyType)?.[0]?.id
|
|
1180
1180
|
},
|
|
1181
1181
|
registrationNumberDefaultFieldMetadata
|
|
1182
1182
|
).label;
|
|
1183
1183
|
const taxIdLabel = resolveFieldMetadata(
|
|
1184
|
-
|
|
1184
|
+
taxInformationDefaultFieldConfig[country],
|
|
1185
1185
|
{
|
|
1186
1186
|
taxIdNumberType: countryToTaxInfoTypeMap[country] ?? void 0,
|
|
1187
1187
|
// TODO use type selector
|
|
1188
1188
|
companyType: void 0
|
|
1189
1189
|
},
|
|
1190
|
-
|
|
1190
|
+
taxInformationDefaultFieldMetadata
|
|
1191
1191
|
).label;
|
|
1192
1192
|
return {
|
|
1193
|
-
[
|
|
1193
|
+
[labels?.additionalInformation?.legalForm ?? "businessStructure"]: data.legalFormLabel,
|
|
1194
|
+
[labels?.additionalInformation?.doingBusinessAs ?? "doingBusinessAs"]: data.doingBusinessAs,
|
|
1194
1195
|
[registrationNumberLabel]: data.registrationNumber,
|
|
1195
|
-
[taxIdLabel]: data.isUen ? void 0 :
|
|
1196
|
-
[
|
|
1197
|
-
[
|
|
1198
|
-
[
|
|
1199
|
-
[
|
|
1200
|
-
[
|
|
1201
|
-
[
|
|
1202
|
-
[
|
|
1196
|
+
[taxIdLabel]: data.isUen ? void 0 : data.taxInformation?.find((taxId) => country === taxId.country)?.number,
|
|
1197
|
+
[labels?.additionalInformation?.vatNumber ?? "vatNumber"]: data.vatNumber,
|
|
1198
|
+
[labels?.additionalInformation?.vatAbsenceReason ?? "vatAbsenceReason"]: data.vatAbsenceReason ? i18n.get(data.vatAbsenceReason) : void 0,
|
|
1199
|
+
[labels?.additionalInformation?.dateOfIncorporation ?? "dateOfIncorporation"]: data.dateOfIncorporation,
|
|
1200
|
+
[labels?.additionalInformation?.stockExchangeMIC ?? "stockExchangeMIC"]: data.stockExchangeMIC,
|
|
1201
|
+
[labels?.additionalInformation?.stockISIN ?? "stockISIN"]: data.stockISIN,
|
|
1202
|
+
[labels?.additionalInformation?.stockTickerSymbol ?? "stockTickerSymbol"]: data.stockTickerSymbol,
|
|
1203
|
+
[labels?.additionalInformation?.eInvoicingCode ?? "eInvoicingCode"]: data.eInvoicingCode
|
|
1203
1204
|
};
|
|
1204
1205
|
};
|
|
1205
1206
|
const formatDataForSummary = (data, forms, labels, i18n, isExperimentEnabled) => {
|
|
1206
1207
|
const datasetUtils = datasetUtilities(i18n.locale);
|
|
1207
1208
|
return entriesOf(data).reduce((summaryData, [form]) => {
|
|
1208
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o;
|
|
1209
1209
|
if (!form || !data[form]) return summaryData;
|
|
1210
1210
|
const isCountryOfGoverningLawEnabled = isExperimentEnabled(
|
|
1211
1211
|
"EnableCountryOfGoverningLawForUKCompanies"
|
|
@@ -1218,7 +1218,7 @@ const formatDataForSummary = (data, forms, labels, i18n, isExperimentEnabled) =>
|
|
|
1218
1218
|
data[form],
|
|
1219
1219
|
labels,
|
|
1220
1220
|
datasetUtils,
|
|
1221
|
-
|
|
1221
|
+
data.companyStructure?.entityType,
|
|
1222
1222
|
isCountryOfGoverningLawEnabled
|
|
1223
1223
|
)
|
|
1224
1224
|
};
|
|
@@ -1227,7 +1227,7 @@ const formatDataForSummary = (data, forms, labels, i18n, isExperimentEnabled) =>
|
|
|
1227
1227
|
...summaryData,
|
|
1228
1228
|
[form]: {
|
|
1229
1229
|
entityType: i18n.get(
|
|
1230
|
-
|
|
1230
|
+
companyTypeMetadata[data[form]?.entityType]?.name
|
|
1231
1231
|
)
|
|
1232
1232
|
}
|
|
1233
1233
|
};
|
|
@@ -1239,8 +1239,8 @@ const formatDataForSummary = (data, forms, labels, i18n, isExperimentEnabled) =>
|
|
|
1239
1239
|
additionalInformationFormName: formatAdditionalInformation(
|
|
1240
1240
|
data[form],
|
|
1241
1241
|
labels,
|
|
1242
|
-
|
|
1243
|
-
|
|
1242
|
+
data.basicInformation?.country,
|
|
1243
|
+
data.companyStructure?.entityType,
|
|
1244
1244
|
i18n
|
|
1245
1245
|
),
|
|
1246
1246
|
registrationAddress: mapAddressLabels(data[form].registrationAddress, datasetUtils),
|
|
@@ -1253,7 +1253,7 @@ const formatDataForSummary = (data, forms, labels, i18n, isExperimentEnabled) =>
|
|
|
1253
1253
|
...summaryData,
|
|
1254
1254
|
[form]: {
|
|
1255
1255
|
companyRegistrationDocument: {
|
|
1256
|
-
fileName:
|
|
1256
|
+
fileName: data[form].registrationDocument?.[0]?.name
|
|
1257
1257
|
}
|
|
1258
1258
|
}
|
|
1259
1259
|
};
|
|
@@ -1263,7 +1263,7 @@ const formatDataForSummary = (data, forms, labels, i18n, isExperimentEnabled) =>
|
|
|
1263
1263
|
...summaryData,
|
|
1264
1264
|
[form]: {
|
|
1265
1265
|
companyTaxDocument: {
|
|
1266
|
-
fileName:
|
|
1266
|
+
fileName: data[form].taxDocument?.[0]?.name
|
|
1267
1267
|
}
|
|
1268
1268
|
}
|
|
1269
1269
|
};
|
|
@@ -1273,7 +1273,7 @@ const formatDataForSummary = (data, forms, labels, i18n, isExperimentEnabled) =>
|
|
|
1273
1273
|
...summaryData,
|
|
1274
1274
|
[form]: {
|
|
1275
1275
|
companyProofOfDirectorDocument: {
|
|
1276
|
-
fileName:
|
|
1276
|
+
fileName: data[form].proofOfDirector?.[0]?.name
|
|
1277
1277
|
}
|
|
1278
1278
|
}
|
|
1279
1279
|
};
|
|
@@ -1283,7 +1283,7 @@ const formatDataForSummary = (data, forms, labels, i18n, isExperimentEnabled) =>
|
|
|
1283
1283
|
...summaryData,
|
|
1284
1284
|
[form]: {
|
|
1285
1285
|
companyProofOfSignatoryDocument: {
|
|
1286
|
-
fileName:
|
|
1286
|
+
fileName: data[form].proofOfSignatory?.[0]?.name
|
|
1287
1287
|
}
|
|
1288
1288
|
}
|
|
1289
1289
|
};
|
|
@@ -1293,19 +1293,24 @@ const formatDataForSummary = (data, forms, labels, i18n, isExperimentEnabled) =>
|
|
|
1293
1293
|
...summaryData,
|
|
1294
1294
|
[form]: {
|
|
1295
1295
|
companyProofOfOwnershipDocument: {
|
|
1296
|
-
fileName:
|
|
1296
|
+
fileName: data[form].proofOfOwnership?.map((doc) => doc.name).join("\n")
|
|
1297
1297
|
}
|
|
1298
1298
|
}
|
|
1299
1299
|
};
|
|
1300
|
-
case "companyFinancialInformation":
|
|
1300
|
+
case "companyFinancialInformation": {
|
|
1301
|
+
const isIncorporationDateDependencyEnabled = isExperimentEnabled(
|
|
1302
|
+
"EnableIncorporationDateBasedFinancialValidationForHO"
|
|
1303
|
+
);
|
|
1301
1304
|
return {
|
|
1302
1305
|
...summaryData,
|
|
1303
1306
|
[form]: formatFinancialInformationSummary(
|
|
1304
1307
|
data[form],
|
|
1305
1308
|
i18n,
|
|
1306
|
-
|
|
1309
|
+
data?.basicInformation?.country,
|
|
1310
|
+
isIncorporationDateDependencyEnabled ? data?.additionalInformation?.dateOfIncorporation : void 0
|
|
1307
1311
|
)
|
|
1308
1312
|
};
|
|
1313
|
+
}
|
|
1309
1314
|
default:
|
|
1310
1315
|
return summaryData;
|
|
1311
1316
|
}
|
|
@@ -1326,12 +1331,11 @@ async function submitDocuments({
|
|
|
1326
1331
|
if (formattedDocument) {
|
|
1327
1332
|
await documentUtils.uploadDocuments(formattedDocument, legalEntity.id);
|
|
1328
1333
|
formattedDocument.forEach((doc) => {
|
|
1329
|
-
|
|
1330
|
-
userEvents == null ? void 0 : userEvents.addTaskEvent("Success", {
|
|
1334
|
+
userEvents?.addTaskEvent("Success", {
|
|
1331
1335
|
...additionalTrackingParams,
|
|
1332
1336
|
actionType: "upload",
|
|
1333
1337
|
documentType: doc.type,
|
|
1334
|
-
fileExtention:
|
|
1338
|
+
fileExtention: doc.attachments?.map((item) => getFileExtention(item.pageName)).filter((item) => item !== void 0) ?? []
|
|
1335
1339
|
});
|
|
1336
1340
|
});
|
|
1337
1341
|
}
|
|
@@ -1367,17 +1371,16 @@ async function submit({
|
|
|
1367
1371
|
isExperimentEnabled,
|
|
1368
1372
|
userEvents
|
|
1369
1373
|
}) {
|
|
1370
|
-
var _a, _b, _c, _d, _e;
|
|
1371
1374
|
const logger = createLogger();
|
|
1372
1375
|
setLoadingStatus("loading");
|
|
1373
|
-
|
|
1376
|
+
let trackingPayload = {
|
|
1374
1377
|
...additionalTrackingParams,
|
|
1375
1378
|
actionType: "submit",
|
|
1376
|
-
companyStructure:
|
|
1377
|
-
countryOfRegistration:
|
|
1378
|
-
legalEntityName: accountHolder === "theCompanyIWorkFor" ?
|
|
1379
|
+
companyStructure: data.companyStructure?.entityType ?? null,
|
|
1380
|
+
countryOfRegistration: data.basicInformation?.country ?? null,
|
|
1381
|
+
legalEntityName: accountHolder === "theCompanyIWorkFor" ? data.basicInformation?.legalCompanyName ?? null : null,
|
|
1379
1382
|
// Only send legalCompanyName for organizations
|
|
1380
|
-
usedAdditionalAddress:
|
|
1383
|
+
usedAdditionalAddress: data.additionalInformation?.operationalAddressIsSame === operationalAddressIsSameIds.OPERATIONAL_ADDRESS_IS_NOT_SAME
|
|
1381
1384
|
};
|
|
1382
1385
|
const entityToUpdate = (() => {
|
|
1383
1386
|
switch (taskType) {
|
|
@@ -1392,12 +1395,12 @@ async function submit({
|
|
|
1392
1395
|
}
|
|
1393
1396
|
})();
|
|
1394
1397
|
const handleSubmitLegalEntity = async (legalEntity) => {
|
|
1395
|
-
if (taskType === TaskTypes.TRUST_MEMBER_COMPANY && !
|
|
1398
|
+
if (taskType === TaskTypes.TRUST_MEMBER_COMPANY && !nestedLegalEntity?.id || taskType === TaskTypes.UNINCORPORATED_PARTNERSHIP_MEMBER_COMPANY && !nestedLegalEntity?.id || taskType === TaskTypes.SOLE_PROPRIETOR_COMPANY && !associatedLegalArrangement?.id) {
|
|
1396
1399
|
return await createLegalEntity(legalEntity);
|
|
1397
1400
|
} else {
|
|
1398
1401
|
return handleUpdateLegalEntity({
|
|
1399
1402
|
...drop("type").from(legalEntity),
|
|
1400
|
-
id:
|
|
1403
|
+
id: entityToUpdate?.id ?? legalEntityResponse.id
|
|
1401
1404
|
});
|
|
1402
1405
|
}
|
|
1403
1406
|
};
|
|
@@ -1409,7 +1412,7 @@ async function submit({
|
|
|
1409
1412
|
if (nestedLegalEntityDetails2 && associatedLegalArrangement2) {
|
|
1410
1413
|
const existingEntityAssociations = getOwnEntityAssociations(associatedLegalArrangement2);
|
|
1411
1414
|
const existingRoles = existingEntityAssociations.filter((ea) => ea.legalEntityId === associatedLegalArrangement2.id).map(({ type }) => type);
|
|
1412
|
-
const newRoles =
|
|
1415
|
+
const newRoles = nestedLegalEntityDetails2?.roles ?? [];
|
|
1413
1416
|
const rolesChanged = !doArraysMatch(existingRoles, newRoles);
|
|
1414
1417
|
if (rolesChanged) {
|
|
1415
1418
|
const updatedAssociations = {
|
|
@@ -1431,7 +1434,7 @@ async function submit({
|
|
|
1431
1434
|
const updatedAssociations = {
|
|
1432
1435
|
entityAssociations: [
|
|
1433
1436
|
{
|
|
1434
|
-
type:
|
|
1437
|
+
type: LegalEntityTypes.SOLE_PROPRIETORSHIP,
|
|
1435
1438
|
legalEntityId: legalEntity.id
|
|
1436
1439
|
}
|
|
1437
1440
|
]
|
|
@@ -1439,9 +1442,9 @@ async function submit({
|
|
|
1439
1442
|
await handleUpdateLegalEntity({ ...updatedAssociations, id: legalEntityResponse.id });
|
|
1440
1443
|
}
|
|
1441
1444
|
};
|
|
1442
|
-
const savedLegalEntityData = legalEntityResponse ? mapLegalEntityToBusinessDetailsSchema(legalEntityResponse) : null;
|
|
1445
|
+
const savedLegalEntityData = legalEntityResponse ? mapLegalEntityToBusinessDetailsSchema(legalEntityResponse, void 0, isExperimentEnabled) : null;
|
|
1443
1446
|
const filteredData = savedLegalEntityData ? setRemovedFieldsOnSchemaToDeletedValue(data, savedLegalEntityData) : data;
|
|
1444
|
-
if (
|
|
1447
|
+
if (filteredData?.additionalInformation && !filteredData?.additionalInformation?.taxInformation) {
|
|
1445
1448
|
filteredData.additionalInformation.taxInformation = void 0;
|
|
1446
1449
|
}
|
|
1447
1450
|
const isCountryOfGoverningLawEnabled = isExperimentEnabled(
|
|
@@ -1449,9 +1452,9 @@ async function submit({
|
|
|
1449
1452
|
);
|
|
1450
1453
|
const countryOfGoverningLaw = getCountryOfGoverningLaw(
|
|
1451
1454
|
isCountryOfGoverningLawEnabled,
|
|
1452
|
-
filteredData
|
|
1455
|
+
filteredData?.basicInformation
|
|
1453
1456
|
);
|
|
1454
|
-
if (filteredData
|
|
1457
|
+
if (filteredData?.basicInformation) {
|
|
1455
1458
|
if (countryOfGoverningLaw) {
|
|
1456
1459
|
filteredData.basicInformation.countryOfGoverningLaw = countryOfGoverningLaw;
|
|
1457
1460
|
} else {
|
|
@@ -1468,7 +1471,7 @@ async function submit({
|
|
|
1468
1471
|
)
|
|
1469
1472
|
};
|
|
1470
1473
|
const legalEntity = await handleSubmitLegalEntity(mappedLegalEntity);
|
|
1471
|
-
if (taskType === TaskTypes.TRUST_MEMBER_COMPANY || taskType === TaskTypes.UNINCORPORATED_PARTNERSHIP_MEMBER_COMPANY || taskType === TaskTypes.SOLE_PROPRIETOR_COMPANY && !
|
|
1474
|
+
if (taskType === TaskTypes.TRUST_MEMBER_COMPANY || taskType === TaskTypes.UNINCORPORATED_PARTNERSHIP_MEMBER_COMPANY || taskType === TaskTypes.SOLE_PROPRIETOR_COMPANY && !associatedLegalArrangement?.id) {
|
|
1472
1475
|
await associateLegalEntityWithParent({
|
|
1473
1476
|
legalEntity,
|
|
1474
1477
|
associatedLegalArrangement,
|
|
@@ -1483,15 +1486,27 @@ async function submit({
|
|
|
1483
1486
|
forms,
|
|
1484
1487
|
userEvents
|
|
1485
1488
|
});
|
|
1486
|
-
userEvents
|
|
1489
|
+
userEvents?.addTaskEvent("Success", trackingPayload);
|
|
1487
1490
|
showToast({ label: i18n.get("successfullyUpdatedDetails"), variant: "success" });
|
|
1488
|
-
onExternalSubmit
|
|
1491
|
+
onExternalSubmit?.(data);
|
|
1489
1492
|
} catch (err) {
|
|
1490
1493
|
if (isValidationError(err)) {
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1494
|
+
const getErrors = processValidationErrors(err, TaskTypes.BUSINESS_DETAILS);
|
|
1495
|
+
if (getErrors && !Object.keys(getErrors).length) {
|
|
1496
|
+
showToast({ label: i18n.get("failedToUpdateDetails"), variant: "error" });
|
|
1497
|
+
const unmappedErrorNames = err.invalidFields?.map((field) => field.name).filter(Boolean) ?? [];
|
|
1498
|
+
if (unmappedErrorNames.length) {
|
|
1499
|
+
trackingPayload = {
|
|
1500
|
+
...trackingPayload,
|
|
1501
|
+
additionalData: { unmappedErrorNames }
|
|
1502
|
+
};
|
|
1503
|
+
}
|
|
1504
|
+
} else {
|
|
1505
|
+
setProblems({
|
|
1506
|
+
...problems,
|
|
1507
|
+
validationErrors: getErrors
|
|
1508
|
+
});
|
|
1509
|
+
}
|
|
1495
1510
|
}
|
|
1496
1511
|
if (isMaintenanceModeError(err)) {
|
|
1497
1512
|
showToast({
|
|
@@ -1504,23 +1519,23 @@ async function submit({
|
|
|
1504
1519
|
showToast({ label: i18n.get("failedToUpdateDetails"), variant: "error" });
|
|
1505
1520
|
}
|
|
1506
1521
|
logger.error(err);
|
|
1507
|
-
userEvents
|
|
1522
|
+
userEvents?.addTaskEvent("Encountered error", {
|
|
1508
1523
|
...trackingPayload,
|
|
1509
|
-
returnType: err
|
|
1510
|
-
returnValue:
|
|
1524
|
+
returnType: err?.errorCode,
|
|
1525
|
+
returnValue: err?.title || "backend"
|
|
1511
1526
|
});
|
|
1512
1527
|
} finally {
|
|
1513
1528
|
setLoadingStatus("success");
|
|
1514
1529
|
}
|
|
1515
1530
|
}
|
|
1516
1531
|
const getCountryOfGoverningLaw = (isCountryOfGoverningLawEnabled, basicData) => {
|
|
1517
|
-
if (!isCountryOfGoverningLawEnabled ||
|
|
1532
|
+
if (!isCountryOfGoverningLawEnabled || basicData?.country !== CountryCodes.UnitedKingdom) {
|
|
1518
1533
|
return void 0;
|
|
1519
1534
|
}
|
|
1520
|
-
if (isCountryOfGoverningLawEnabled &&
|
|
1535
|
+
if (isCountryOfGoverningLawEnabled && basicData?.country === CountryCodes.UnitedKingdom && !basicData?.countryOfGoverningLaw) {
|
|
1521
1536
|
return CountryCodes.UnitedKingdom;
|
|
1522
1537
|
}
|
|
1523
|
-
return basicData
|
|
1538
|
+
return basicData?.countryOfGoverningLaw;
|
|
1524
1539
|
};
|
|
1525
1540
|
function BusinessDetailsDropin({
|
|
1526
1541
|
country,
|
|
@@ -1539,7 +1554,6 @@ function BusinessDetailsDropin({
|
|
|
1539
1554
|
onSubmit: onExternalSubmit,
|
|
1540
1555
|
handleHomeClick
|
|
1541
1556
|
}) {
|
|
1542
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r;
|
|
1543
1557
|
const formRef = useRef(null);
|
|
1544
1558
|
const { accountHolder, setAccountHolder } = useAccountHolder();
|
|
1545
1559
|
const { showToast } = useToastContext();
|
|
@@ -1554,31 +1568,33 @@ function BusinessDetailsDropin({
|
|
|
1554
1568
|
state: { currentState }
|
|
1555
1569
|
} = useStateContext();
|
|
1556
1570
|
useEffect(() => {
|
|
1557
|
-
onChange
|
|
1571
|
+
onChange?.(currentState);
|
|
1558
1572
|
}, [currentState, onChange]);
|
|
1559
1573
|
const isSoleProp = accountHolder === "mySoleProprietorName";
|
|
1560
1574
|
const formWith2Views = "basicInformation";
|
|
1561
1575
|
const isAssociationTaskType = !taskType ? accountHolder !== "theCompanyIWorkFor" : taskType !== TaskTypes.BUSINESS_DETAILS;
|
|
1562
|
-
const legalEntityType = !isSoleProp ?
|
|
1576
|
+
const legalEntityType = !isSoleProp ? LegalEntityTypes.ORGANIZATION : LegalEntityTypes.SOLE_PROPRIETORSHIP;
|
|
1563
1577
|
const isUS = country === CountryCodes.UnitedStates;
|
|
1564
|
-
const currentCountry =
|
|
1578
|
+
const currentCountry = currentState.data.basicInformation?.country ?? country;
|
|
1565
1579
|
const isSkippingCompanyStructure = isSettingEnabled(SettingNames.AllowLegalEntityTypeChange) && organizationTypesToSkipCompanyStructureForm.includes(
|
|
1566
|
-
|
|
1567
|
-
) && accountHolder !== "aTrust" || isSoleProp;
|
|
1580
|
+
legalEntityResponse?.organization?.type
|
|
1581
|
+
) && accountHolder !== "aTrust" && accountHolder !== "anUnincorporatedPartnership" || isSoleProp;
|
|
1568
1582
|
useEffect(() => {
|
|
1569
|
-
|
|
1570
|
-
const isBankAccountRequested = (_b2 = (_a2 = legalEntityResponse == null ? void 0 : legalEntityResponse.capabilities) == null ? void 0 : _a2.issueBankAccount) == null ? void 0 : _b2.requested;
|
|
1583
|
+
const isBankAccountRequested = legalEntityResponse?.capabilities?.issueBankAccount?.requested;
|
|
1571
1584
|
setIsBankAccountRequestedForOrganization(isBankAccountRequested);
|
|
1572
1585
|
}, [legalEntityResponse]);
|
|
1573
1586
|
const subjectEntity = !isAssociationTaskType ? legalEntityResponse : isSoleProp ? associatedLegalArrangement : nestedLegalEntity;
|
|
1574
|
-
const associatedLeTrackingParams =
|
|
1575
|
-
|
|
1576
|
-
|
|
1587
|
+
const associatedLeTrackingParams = useMemo(
|
|
1588
|
+
() => getAssociatedLeAnalyticsPayload({
|
|
1589
|
+
associatedLegalEntity: associatedLegalArrangement
|
|
1590
|
+
}),
|
|
1591
|
+
[associatedLegalArrangement]
|
|
1592
|
+
);
|
|
1577
1593
|
useEffect(() => {
|
|
1578
1594
|
userEvents.updateBaseTrackingPayload({ task: taskType });
|
|
1579
1595
|
userEvents.addTaskEvent("Landed on page", {
|
|
1580
1596
|
actionType: "start",
|
|
1581
|
-
...
|
|
1597
|
+
...subjectEntity?.id && subjectEntity?.type && {
|
|
1582
1598
|
legalEntityId: subjectEntity.id,
|
|
1583
1599
|
entityType: subjectEntity.type
|
|
1584
1600
|
},
|
|
@@ -1589,12 +1605,13 @@ function BusinessDetailsDropin({
|
|
|
1589
1605
|
const [initialData, setInitialData] = useState(() => {
|
|
1590
1606
|
return mapLegalEntityToBusinessDetailsSchema(
|
|
1591
1607
|
!isAssociationTaskType ? legalEntityResponse : isSoleProp ? associatedLegalArrangement ?? legalEntityResponse : nestedLegalEntity,
|
|
1592
|
-
isSoleProp ? legalEntityResponse : void 0
|
|
1608
|
+
isSoleProp ? legalEntityResponse : void 0,
|
|
1609
|
+
isExperimentEnabled
|
|
1593
1610
|
);
|
|
1594
1611
|
});
|
|
1595
|
-
const [trustedFields, setTrustedFields] = useState(
|
|
1612
|
+
const [trustedFields, setTrustedFields] = useState(subjectEntity?.trustedFields ?? void 0);
|
|
1596
1613
|
const [currentProblems, setCurrentProblems] = useState(
|
|
1597
|
-
problems ??
|
|
1614
|
+
problems ?? getCapabilityProblems(legalEntityResponse, currentCountry)?.LegalEntity?.[legalEntityResponse.id] ?? {}
|
|
1598
1615
|
);
|
|
1599
1616
|
const [showCompanyStructure, setShowCompanyStructure] = useState(
|
|
1600
1617
|
currentCountry !== "US" && !isSoleProp
|
|
@@ -1614,8 +1631,7 @@ function BusinessDetailsDropin({
|
|
|
1614
1631
|
rootLegalEntityId: rootLegalEntityId.value
|
|
1615
1632
|
});
|
|
1616
1633
|
useEffect(() => {
|
|
1617
|
-
|
|
1618
|
-
if (!((_a2 = subjectEntity == null ? void 0 : subjectEntity.documentDetails) == null ? void 0 : _a2.length)) return;
|
|
1634
|
+
if (!subjectEntity?.documentDetails?.length) return;
|
|
1619
1635
|
documentUtils.fetchDocuments(subjectEntity.documentDetails, subjectEntity.id).then(() => {
|
|
1620
1636
|
setInitialData(
|
|
1621
1637
|
mapLegalEntityToBusinessDetailsSchema(
|
|
@@ -1628,7 +1644,7 @@ function BusinessDetailsDropin({
|
|
|
1628
1644
|
);
|
|
1629
1645
|
}, []);
|
|
1630
1646
|
const parseConfiguration = useCallback(
|
|
1631
|
-
({ scenarios
|
|
1647
|
+
({ scenarios }) => composePerScenarioFormConfigurations(scenarios, businessDetailsFieldsPerScenario),
|
|
1632
1648
|
[]
|
|
1633
1649
|
);
|
|
1634
1650
|
const {
|
|
@@ -1664,9 +1680,9 @@ function BusinessDetailsDropin({
|
|
|
1664
1680
|
() => getPropsFromConfigurations(
|
|
1665
1681
|
fieldConfigurations,
|
|
1666
1682
|
initialForms,
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
subjectEntity ? subjectEntity.type ===
|
|
1683
|
+
currentProblems?.remediationActions ? Object.values(currentProblems?.remediationActions) : [],
|
|
1684
|
+
currentProblems?.missingData ?? [],
|
|
1685
|
+
subjectEntity ? subjectEntity.type === LegalEntityTypes.SOLE_PROPRIETORSHIP ? getFieldsWithExistingData(
|
|
1670
1686
|
subjectEntity,
|
|
1671
1687
|
solePropBusinessDetailsApiKeyMapping,
|
|
1672
1688
|
solePropBusinessDetailsDocumentMapping
|
|
@@ -1678,14 +1694,14 @@ function BusinessDetailsDropin({
|
|
|
1678
1694
|
customRules,
|
|
1679
1695
|
{},
|
|
1680
1696
|
{},
|
|
1681
|
-
subjectEntity
|
|
1697
|
+
subjectEntity?.type,
|
|
1682
1698
|
trustedFields
|
|
1683
1699
|
),
|
|
1684
1700
|
[
|
|
1685
1701
|
fieldConfigurations,
|
|
1686
1702
|
initialForms,
|
|
1687
|
-
currentProblems
|
|
1688
|
-
currentProblems
|
|
1703
|
+
currentProblems?.remediationActions,
|
|
1704
|
+
currentProblems?.missingData,
|
|
1689
1705
|
subjectEntity,
|
|
1690
1706
|
customRules,
|
|
1691
1707
|
trustedFields
|
|
@@ -1706,11 +1722,11 @@ function BusinessDetailsDropin({
|
|
|
1706
1722
|
enabled: showBusinessSelection
|
|
1707
1723
|
}
|
|
1708
1724
|
);
|
|
1709
|
-
const companySearchResults = companySearchResponse
|
|
1710
|
-
const businessName =
|
|
1711
|
-
const nameMatch = isNormalizedStringMatch(businessName,
|
|
1712
|
-
const taxInformation =
|
|
1713
|
-
const tin =
|
|
1725
|
+
const companySearchResults = companySearchResponse?.results;
|
|
1726
|
+
const businessName = currentState?.data?.basicInformation?.legalCompanyName || "";
|
|
1727
|
+
const nameMatch = isNormalizedStringMatch(businessName, companySearchResults?.[0]?.name ?? "");
|
|
1728
|
+
const taxInformation = currentState?.data?.basicInformation?.taxInformation;
|
|
1729
|
+
const tin = taxInformation?.find((taxId) => currentCountry === taxId.country)?.number || "";
|
|
1714
1730
|
const [prevCompanySearchResults, setPrevCompanySearchResults] = useState(companySearchResults);
|
|
1715
1731
|
useEffect(() => {
|
|
1716
1732
|
if (!searchingCompanies && companySearchResults) {
|
|
@@ -1720,7 +1736,7 @@ function BusinessDetailsDropin({
|
|
|
1720
1736
|
additionalData: {
|
|
1721
1737
|
numberOfResults: companySearchResults.length
|
|
1722
1738
|
},
|
|
1723
|
-
...
|
|
1739
|
+
...subjectEntity?.id && subjectEntity?.type && {
|
|
1724
1740
|
legalEntityId: subjectEntity.id,
|
|
1725
1741
|
entityType: subjectEntity.type
|
|
1726
1742
|
},
|
|
@@ -1745,8 +1761,8 @@ function BusinessDetailsDropin({
|
|
|
1745
1761
|
const forms = useMemo(() => {
|
|
1746
1762
|
const requiredForms = getRequiredForms(
|
|
1747
1763
|
initialForms,
|
|
1748
|
-
derivedProps
|
|
1749
|
-
derivedProps
|
|
1764
|
+
derivedProps?.requiredFields,
|
|
1765
|
+
derivedProps?.optionalFields
|
|
1750
1766
|
);
|
|
1751
1767
|
const validityAddedForms = addValidityToForms(
|
|
1752
1768
|
requiredForms,
|
|
@@ -1755,12 +1771,12 @@ function BusinessDetailsDropin({
|
|
|
1755
1771
|
);
|
|
1756
1772
|
return removeConditionalForms(
|
|
1757
1773
|
validityAddedForms,
|
|
1758
|
-
currentCountry !== "US" ? isSkippingCompanyStructure : !showCompanyStructure
|
|
1774
|
+
currentCountry !== "US" || accountHolder !== "theCompanyIWorkFor" ? isSkippingCompanyStructure : !showCompanyStructure
|
|
1759
1775
|
);
|
|
1760
1776
|
}, [
|
|
1761
1777
|
initialForms,
|
|
1762
|
-
derivedProps
|
|
1763
|
-
derivedProps
|
|
1778
|
+
derivedProps?.requiredFields,
|
|
1779
|
+
derivedProps?.optionalFields,
|
|
1764
1780
|
currentState.validityByForm,
|
|
1765
1781
|
currentProblems,
|
|
1766
1782
|
currentCountry,
|
|
@@ -1772,7 +1788,7 @@ function BusinessDetailsDropin({
|
|
|
1772
1788
|
data: formatDataForSummary(
|
|
1773
1789
|
currentState.data,
|
|
1774
1790
|
forms,
|
|
1775
|
-
derivedProps
|
|
1791
|
+
derivedProps?.labels,
|
|
1776
1792
|
i18n,
|
|
1777
1793
|
isExperimentEnabled
|
|
1778
1794
|
),
|
|
@@ -1780,7 +1796,7 @@ function BusinessDetailsDropin({
|
|
|
1780
1796
|
keys: ["operationalAddressIsSame"]
|
|
1781
1797
|
}
|
|
1782
1798
|
}),
|
|
1783
|
-
[currentState.data, derivedProps
|
|
1799
|
+
[currentState.data, derivedProps?.labels, forms, i18n, isExperimentEnabled]
|
|
1784
1800
|
);
|
|
1785
1801
|
const canSubmitForm = useMemo(
|
|
1786
1802
|
() => canSubmit(currentState.data) && hasDataChanged(initialData, currentState.data),
|
|
@@ -1788,7 +1804,7 @@ function BusinessDetailsDropin({
|
|
|
1788
1804
|
);
|
|
1789
1805
|
const { mutateAsync: createLegalEntity } = useCreateLegalEntity();
|
|
1790
1806
|
const { mutateAsync: updateLegalEntity } = useUpdateLegalEntity();
|
|
1791
|
-
const { mutateAsync:
|
|
1807
|
+
const { mutateAsync: clearCompanyData, isPending: resettingTrustedData } = useClearCompanyData();
|
|
1792
1808
|
const submitTask = useCallback(() => {
|
|
1793
1809
|
setAccountHolder(accountHolder);
|
|
1794
1810
|
return submit({
|
|
@@ -1850,7 +1866,7 @@ function BusinessDetailsDropin({
|
|
|
1850
1866
|
});
|
|
1851
1867
|
const loading = fetchingDataset || searchingCompanies || resettingTrustedData;
|
|
1852
1868
|
const proceedToManualDataEntry = useCallback(async () => {
|
|
1853
|
-
await
|
|
1869
|
+
await clearCompanyData().then(async () => {
|
|
1854
1870
|
if (!isUS) {
|
|
1855
1871
|
setShowCompanyStructure(true);
|
|
1856
1872
|
return;
|
|
@@ -1860,13 +1876,13 @@ function BusinessDetailsDropin({
|
|
|
1860
1876
|
return;
|
|
1861
1877
|
}
|
|
1862
1878
|
const { data: refetchedTinResponse } = await fetchTin();
|
|
1863
|
-
if (
|
|
1879
|
+
if (refetchedTinResponse?.matched === true) {
|
|
1864
1880
|
setShowCompanyStructure(true);
|
|
1865
1881
|
setBusinessMismatchModalOpen(false);
|
|
1866
1882
|
} else {
|
|
1867
1883
|
setBusinessMismatchModalOpen(true);
|
|
1868
1884
|
setTinMatched(false);
|
|
1869
|
-
if (
|
|
1885
|
+
if (subjectEntity?.id && subjectEntity?.type) {
|
|
1870
1886
|
userEvents.addPageEvent("Encountered error", {
|
|
1871
1887
|
actionType: "submit",
|
|
1872
1888
|
label: "tinVerificationFailure",
|
|
@@ -1878,25 +1894,25 @@ function BusinessDetailsDropin({
|
|
|
1878
1894
|
}
|
|
1879
1895
|
});
|
|
1880
1896
|
}, [
|
|
1881
|
-
|
|
1897
|
+
clearCompanyData,
|
|
1882
1898
|
isUS,
|
|
1883
1899
|
businessName,
|
|
1884
1900
|
tin,
|
|
1885
1901
|
getCompanySelection,
|
|
1886
|
-
subjectEntity
|
|
1887
|
-
subjectEntity
|
|
1902
|
+
subjectEntity?.id,
|
|
1903
|
+
subjectEntity?.type,
|
|
1888
1904
|
associatedLeTrackingParams,
|
|
1889
1905
|
userEvents
|
|
1890
1906
|
]);
|
|
1891
1907
|
if (prevCompanySearchResults !== companySearchResults) {
|
|
1892
|
-
if (
|
|
1908
|
+
if (companySearchResults?.length === 1 && nameMatch) {
|
|
1893
1909
|
setSingleCompanyDatasetParams({
|
|
1894
1910
|
company: companySearchResults[0],
|
|
1895
|
-
state:
|
|
1911
|
+
state: currentState.data.basicInformation?.stateOrProvince,
|
|
1896
1912
|
name: businessName,
|
|
1897
1913
|
tin
|
|
1898
1914
|
});
|
|
1899
|
-
} else if (
|
|
1915
|
+
} else if (companySearchResults?.length === 0 && !searchingCompanies && showBusinessSelection) {
|
|
1900
1916
|
proceedToManualDataEntry();
|
|
1901
1917
|
}
|
|
1902
1918
|
setPrevCompanySearchResults(companySearchResults);
|
|
@@ -1905,7 +1921,7 @@ function BusinessDetailsDropin({
|
|
|
1905
1921
|
singleCompanyDatasetAndTinResponse
|
|
1906
1922
|
);
|
|
1907
1923
|
if (prevSingleCompanyDatasetResponse !== singleCompanyDatasetAndTinResponse) {
|
|
1908
|
-
if (
|
|
1924
|
+
if (singleCompanyDatasetAndTinResponse?.tinMatched === true) {
|
|
1909
1925
|
setVerifiedBusiness(singleCompanyDatasetAndTinResponse);
|
|
1910
1926
|
handleNextClick();
|
|
1911
1927
|
} else {
|
|
@@ -1931,7 +1947,7 @@ function BusinessDetailsDropin({
|
|
|
1931
1947
|
const selectedFormId = forms[index].formId;
|
|
1932
1948
|
if (selectedFormId === formWith2Views) {
|
|
1933
1949
|
if (verifiedBusiness$1) setShowBusinessSelection(false);
|
|
1934
|
-
if (activeForm.formId === "companyStructure" &&
|
|
1950
|
+
if (activeForm.formId === "companyStructure" && companySearchResults?.length) {
|
|
1935
1951
|
setShowCompanyStructure(false);
|
|
1936
1952
|
}
|
|
1937
1953
|
return gotoFormByFormIndex(index);
|
|
@@ -1949,20 +1965,19 @@ function BusinessDetailsDropin({
|
|
|
1949
1965
|
gotoFormByFormIndex,
|
|
1950
1966
|
verifiedBusiness$1,
|
|
1951
1967
|
activeForm.formId,
|
|
1952
|
-
companySearchResults
|
|
1968
|
+
companySearchResults?.length,
|
|
1953
1969
|
isBusinessSelection
|
|
1954
1970
|
]
|
|
1955
1971
|
);
|
|
1956
1972
|
const nextClick = useCallback(() => {
|
|
1957
|
-
var _a2, _b2, _c2, _d2, _e2, _f2;
|
|
1958
1973
|
if (!COUNTRIES_USING_COMPANY_SEARCH.includes(currentCountry) || accountHolder !== "theCompanyIWorkFor")
|
|
1959
1974
|
return handleNextClick();
|
|
1960
|
-
if (activeForm.formId === formWith2Views &&
|
|
1975
|
+
if (activeForm.formId === formWith2Views && currentState.validityByForm?.basicInformation && !isBusinessSelection && !verifiedBusiness$1) {
|
|
1961
1976
|
setCompanySearchParams({
|
|
1962
|
-
legalCompanyName:
|
|
1963
|
-
country:
|
|
1964
|
-
stateOrProvince:
|
|
1965
|
-
registrationNumber:
|
|
1977
|
+
legalCompanyName: currentState?.data?.basicInformation?.legalCompanyName ?? "",
|
|
1978
|
+
country: currentState?.data.basicInformation?.country ?? country,
|
|
1979
|
+
stateOrProvince: currentState?.data.basicInformation?.stateOrProvince,
|
|
1980
|
+
registrationNumber: currentState?.data.basicInformation?.registrationNumber
|
|
1966
1981
|
});
|
|
1967
1982
|
setShowBusinessSelection(true);
|
|
1968
1983
|
} else {
|
|
@@ -1973,17 +1988,17 @@ function BusinessDetailsDropin({
|
|
|
1973
1988
|
isSoleProp,
|
|
1974
1989
|
handleNextClick,
|
|
1975
1990
|
activeForm.formId,
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
|
|
1991
|
+
currentState.validityByForm?.basicInformation,
|
|
1992
|
+
currentState?.data.basicInformation?.legalCompanyName,
|
|
1993
|
+
currentState?.data.basicInformation?.country,
|
|
1994
|
+
currentState?.data.basicInformation?.stateOrProvince,
|
|
1995
|
+
currentState?.data.basicInformation?.registrationNumber,
|
|
1981
1996
|
isBusinessSelection,
|
|
1982
1997
|
verifiedBusiness$1,
|
|
1983
1998
|
country
|
|
1984
1999
|
]);
|
|
1985
2000
|
const backClick = useCallback(() => {
|
|
1986
|
-
if (!COUNTRIES_USING_COMPANY_SEARCH.includes(currentCountry)) handleBackClick
|
|
2001
|
+
if (!COUNTRIES_USING_COMPANY_SEARCH.includes(currentCountry)) handleBackClick?.();
|
|
1987
2002
|
else {
|
|
1988
2003
|
switch (activeForm.formId) {
|
|
1989
2004
|
case formWith2Views: {
|
|
@@ -1994,22 +2009,22 @@ function BusinessDetailsDropin({
|
|
|
1994
2009
|
if (searchingError) {
|
|
1995
2010
|
setShowBusinessSelection(false);
|
|
1996
2011
|
setShowCompanyStructure(false);
|
|
1997
|
-
handleBackClick
|
|
2012
|
+
handleBackClick?.();
|
|
1998
2013
|
break;
|
|
1999
2014
|
}
|
|
2000
2015
|
if (!searchingCompanies && companySearchResults && !companySearchResults.length) {
|
|
2001
2016
|
setShowBusinessSelection(false);
|
|
2002
2017
|
} else if (!verifiedBusiness$1) setShowCompanyStructure(false);
|
|
2003
|
-
handleBackClick
|
|
2018
|
+
handleBackClick?.();
|
|
2004
2019
|
break;
|
|
2005
2020
|
}
|
|
2006
2021
|
case "additionalInformation": {
|
|
2007
2022
|
if (verifiedBusiness$1) setShowBusinessSelection(false);
|
|
2008
|
-
handleBackClick
|
|
2023
|
+
handleBackClick?.();
|
|
2009
2024
|
break;
|
|
2010
2025
|
}
|
|
2011
2026
|
default:
|
|
2012
|
-
handleBackClick
|
|
2027
|
+
handleBackClick?.();
|
|
2013
2028
|
break;
|
|
2014
2029
|
}
|
|
2015
2030
|
}
|
|
@@ -2024,7 +2039,7 @@ function BusinessDetailsDropin({
|
|
|
2024
2039
|
verifiedBusiness$1
|
|
2025
2040
|
]);
|
|
2026
2041
|
const homeClick = () => {
|
|
2027
|
-
handleHomeClick
|
|
2042
|
+
handleHomeClick?.();
|
|
2028
2043
|
};
|
|
2029
2044
|
const handleBusinessMismatchContinue = useCallback(() => {
|
|
2030
2045
|
setShowCompanyStructure(true);
|
|
@@ -2032,7 +2047,7 @@ function BusinessDetailsDropin({
|
|
|
2032
2047
|
setBusinessMismatchModalOpen(false);
|
|
2033
2048
|
}, [setShowCompanyStructure, setTrustedFields, setBusinessMismatchModalOpen]);
|
|
2034
2049
|
const handleBusinessMismatchCancel = useCallback(() => {
|
|
2035
|
-
backClick
|
|
2050
|
+
backClick?.();
|
|
2036
2051
|
setBusinessMismatchModalOpen(false);
|
|
2037
2052
|
setTinMatched(void 0);
|
|
2038
2053
|
}, [backClick, setTinMatched, setBusinessMismatchModalOpen]);
|
|
@@ -2057,20 +2072,19 @@ function BusinessDetailsDropin({
|
|
|
2057
2072
|
queryClient
|
|
2058
2073
|
]);
|
|
2059
2074
|
useEffect(() => {
|
|
2060
|
-
|
|
2061
|
-
if ((verifiedBusiness$1 == null ? void 0 : verifiedBusiness$1.name) && ((_a2 = currentState.data.basicInformation) == null ? void 0 : _a2.legalCompanyName) !== (verifiedBusiness$1 == null ? void 0 : verifiedBusiness$1.name) && (((_b2 = currentState.data.basicInformation) == null ? void 0 : _b2.legalCompanyName) !== companySearchParams.legalCompanyName || ((_c2 = currentState.data.basicInformation) == null ? void 0 : _c2.stateOrProvince) !== companySearchParams.stateOrProvince)) {
|
|
2075
|
+
if (verifiedBusiness$1?.name && currentState.data.basicInformation?.legalCompanyName !== verifiedBusiness$1?.name && (currentState.data.basicInformation?.legalCompanyName !== companySearchParams.legalCompanyName || currentState.data.basicInformation?.stateOrProvince !== companySearchParams.stateOrProvince)) {
|
|
2062
2076
|
setShowCompanyStructure(false);
|
|
2063
2077
|
resetBusinessData();
|
|
2064
2078
|
}
|
|
2065
2079
|
}, [
|
|
2066
2080
|
companySearchParams,
|
|
2067
2081
|
currentState.data.basicInformation,
|
|
2068
|
-
|
|
2082
|
+
currentState.data.basicInformation?.legalCompanyName,
|
|
2069
2083
|
resetBusinessData,
|
|
2070
2084
|
verifiedBusiness$1
|
|
2071
2085
|
]);
|
|
2072
2086
|
const [prevCurrentCountry, setPrevCurrentCountry] = useState(currentCountry);
|
|
2073
|
-
if (prevCurrentCountry !== currentCountry &&
|
|
2087
|
+
if (prevCurrentCountry !== currentCountry && trustedFields?.length && legalEntityResponse.organization?.registeredAddress.country !== currentCountry) {
|
|
2074
2088
|
setTrustedFields(void 0);
|
|
2075
2089
|
setPrevCurrentCountry(currentCountry);
|
|
2076
2090
|
}
|
|
@@ -2135,5 +2149,15 @@ function BusinessDetailsDropin({
|
|
|
2135
2149
|
);
|
|
2136
2150
|
}
|
|
2137
2151
|
export {
|
|
2138
|
-
BusinessDetailsDropin as B
|
|
2152
|
+
BusinessDetailsDropin as B,
|
|
2153
|
+
ProofOfOwnershipDocument as P,
|
|
2154
|
+
RegistrationDocument as R,
|
|
2155
|
+
TaxDocument as T,
|
|
2156
|
+
ProofOfSignatoryDocument as a,
|
|
2157
|
+
ProofOfDirectorDocument as b,
|
|
2158
|
+
mapLegalEntityToBusinessDetailsSchema as c,
|
|
2159
|
+
businessDetailsFieldsPerScenario as d,
|
|
2160
|
+
formatDataForSummary as f,
|
|
2161
|
+
mapApiDocumentToBusinessDetailsDocuments as m,
|
|
2162
|
+
submit as s
|
|
2139
2163
|
};
|