@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,26 +2,26 @@
|
|
|
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] = "a68441b5-c9eb-4c1e-967a-39218aca12bb", e._sentryDebugIdIdentifier = "sentry-dbid-a68441b5-c9eb-4c1e-967a-39218aca12bb");
|
|
6
6
|
} catch (e) {
|
|
7
7
|
}
|
|
8
8
|
}
|
|
9
9
|
;
|
|
10
10
|
import { jsx, jsxs, Fragment } from "preact/jsx-runtime";
|
|
11
|
-
import {
|
|
11
|
+
import { a as useApiContext, r as useQuery, x as httpGet, bo as useInvalidateRootLegalEntity, bp as useMutation, t as httpPost, bA as formatObject, O as LegalEntityTypes, N as Typography, fy as Currencies, u as useI18nContext, aD as Field, fz as InputGroup, bu as Select, bE as InputText, bJ as InputDate, aH as TextArea, a_ as RadioGroup, aJ as CountryField, bc as Modal, K as Alert, G as Button, bi as Confirm, at as isEmpty, c as useTranslation, ay as useForm, fA as useGlobalDataSlice, aB as ErrorPanel, aC as createFormUtils, L as Loader, a7 as Icon, dq as getFormProps, a4 as Card, bf as StructuredList, a2 as IconButton, dh as isEmpty$1, H as Svg, a9 as useToastContext, a0 as createLogger, fB as Dropzone, cl as createDocumentRequest, br as useQueryClient, d as useLegalEntity, R as ROOT_LE, ff as useStateContext, a3 as useAnalyticsContext, fC as useLegalEntities, cy as getPropsFromConfigurations, bQ as getRequiredForms, bR as addValidityToForms, bS as useFormComposer, cp as documentApiUtils, fk as FormWrapper, af as useCapabilityProblems, b5 as getProblemsForEntity, Z as EntityTypes, g as getLegalEntityCountry } from "./StoreProvider-O9jwxfG8.js";
|
|
12
12
|
import { useState, useMemo, useEffect, useCallback, useRef } from "preact/hooks";
|
|
13
|
-
import { u as useCreateLegalEntity, a as useUpdateLegalEntity } from "./useUpdateLegalEntity-
|
|
14
|
-
import { h as hasDataChanged } from "./hasDataChanged-
|
|
13
|
+
import { u as useCreateLegalEntity, a as useUpdateLegalEntity } from "./useUpdateLegalEntity-BfnvHQJj.js";
|
|
14
|
+
import { h as hasDataChanged } from "./hasDataChanged-v0hD-nEq.js";
|
|
15
15
|
import { signal } from "@preact/signals";
|
|
16
|
-
import { s as styles, T as TaskStatusIndicator } from "./SourceOfFunds.module-xwHIboir.js";
|
|
17
16
|
import { a as formatAmountWithCurrency } from "./formatCurrency-CMOSdJMB.js";
|
|
18
|
-
import { l as localizeDateString } from "./localizeDateString-
|
|
17
|
+
import { l as localizeDateString } from "./localizeDateString-BlZ_CtJI.js";
|
|
19
18
|
import { t as toCapitalized } from "./toCapitalized-Bq7laD0b.js";
|
|
20
|
-
import { A as Avatar } from "./Avatar-
|
|
21
|
-
import
|
|
22
|
-
import {
|
|
23
|
-
import { T as
|
|
24
|
-
import {
|
|
19
|
+
import { A as Avatar } from "./Avatar-BfRRf9_a.js";
|
|
20
|
+
import { v as validateDateNotInTheFuture } from "./validate-BweJRQFE.js";
|
|
21
|
+
import { T as TileGroup } from "./TileGroup-tu04B8GK.js";
|
|
22
|
+
import { T as TaskStatusIndicator } from "./TaskStatusIndicator-BanufME0.js";
|
|
23
|
+
import { L as LandingLayout } from "./LandingLayout-BC3pp_IY.js";
|
|
24
|
+
import { n as normalizedTaskStatusStore } from "./OnboardingDropinComponent-DYdts9Sh.js";
|
|
25
25
|
const getBusinessLines = async (legalEntityId, baseUrl) => {
|
|
26
26
|
return httpGet({
|
|
27
27
|
baseUrl,
|
|
@@ -99,6 +99,62 @@ const useSourceOfFundsTypes = (options) => {
|
|
|
99
99
|
...options
|
|
100
100
|
});
|
|
101
101
|
};
|
|
102
|
+
const sourceOfFunds = "adyen-kyc-source-of-funds";
|
|
103
|
+
const sourceOfFundsWrapperLoading = "adyen-kyc-source-of-funds-wrapper-loading";
|
|
104
|
+
const sourceOfFundsWrapperHeading = "adyen-kyc-source-of-funds-wrapper-heading";
|
|
105
|
+
const sourceOfFundsWrapperDescription = "adyen-kyc-source-of-funds-wrapper-description";
|
|
106
|
+
const sourceOfFundsGettingStarted = "adyen-kyc-source-of-funds-getting-started";
|
|
107
|
+
const sourceOfFundsGettingStartedHeading = "adyen-kyc-source-of-funds-getting-started-heading";
|
|
108
|
+
const sourceOfFundsGettingStartedBody = "adyen-kyc-source-of-funds-getting-started-body";
|
|
109
|
+
const sourceOfFundsGettingStartedError = "adyen-kyc-source-of-funds-getting-started-error";
|
|
110
|
+
const sourceOfFundsGettingStartedErrorActions = "adyen-kyc-source-of-funds-getting-started-error-actions";
|
|
111
|
+
const sourceOfFundsGettingStartedCards = "adyen-kyc-source-of-funds-getting-started-cards";
|
|
112
|
+
const sourceOfFundsGettingStartedCardsCard = "adyen-kyc-source-of-funds-getting-started-cards-card";
|
|
113
|
+
const sourceOfFundsGettingStartedCardsCardHeader = "adyen-kyc-source-of-funds-getting-started-cards-card-header";
|
|
114
|
+
const sourceOfFundsGettingStartedCardsCardBody = "adyen-kyc-source-of-funds-getting-started-cards-card-body";
|
|
115
|
+
const sourceOfFundsGettingStartedActions = "adyen-kyc-source-of-funds-getting-started-actions";
|
|
116
|
+
const sourceOfFundsAdditionalDataForm = "adyen-kyc-source-of-funds-additional-data-form";
|
|
117
|
+
const sourceOfFundsThirdPartyFundingFinancierGroup = "adyen-kyc-source-of-funds-third-party-funding-financier-group";
|
|
118
|
+
const sourceOfFundsThirdPartyFundingNameAvatarGroup = "adyen-kyc-source-of-funds-third-party-funding-name-avatar-group";
|
|
119
|
+
const sourceOfFundsThirdPartyFundingNameAddressGroup = "adyen-kyc-source-of-funds-third-party-funding-name-address-group";
|
|
120
|
+
const sourceOfFundsSofFinancierFormError = "adyen-kyc-source-of-funds-sof-financier-form-error";
|
|
121
|
+
const sourceOfFundsSofFinancierFormNameGroup = "adyen-kyc-source-of-funds-sof-financier-form-name-group";
|
|
122
|
+
const sourceOfFundsFinancierFooter = "adyen-kyc-source-of-funds-financier-footer";
|
|
123
|
+
const sourceOfFundsGridContainer = "adyen-kyc-source-of-funds-grid-container";
|
|
124
|
+
const sourceOfFundsUploadModalContentField = "adyen-kyc-source-of-funds-upload-modal-content-field";
|
|
125
|
+
const sourceOfFundsUploadModalContentFieldRadioGroup = "adyen-kyc-source-of-funds-upload-modal-content-field-radio-group";
|
|
126
|
+
const sourceOfFundsUploadModalContentRequirementsContainer = "adyen-kyc-source-of-funds-upload-modal-content-requirements-container";
|
|
127
|
+
const sourceOfFundsUploadListHeading = "adyen-kyc-source-of-funds-upload-list-heading";
|
|
128
|
+
const sourceOfFundsModal = "adyen-kyc-source-of-funds-modal";
|
|
129
|
+
const styles = {
|
|
130
|
+
sourceOfFunds,
|
|
131
|
+
sourceOfFundsWrapperLoading,
|
|
132
|
+
sourceOfFundsWrapperHeading,
|
|
133
|
+
sourceOfFundsWrapperDescription,
|
|
134
|
+
sourceOfFundsGettingStarted,
|
|
135
|
+
sourceOfFundsGettingStartedHeading,
|
|
136
|
+
sourceOfFundsGettingStartedBody,
|
|
137
|
+
sourceOfFundsGettingStartedError,
|
|
138
|
+
sourceOfFundsGettingStartedErrorActions,
|
|
139
|
+
sourceOfFundsGettingStartedCards,
|
|
140
|
+
sourceOfFundsGettingStartedCardsCard,
|
|
141
|
+
sourceOfFundsGettingStartedCardsCardHeader,
|
|
142
|
+
sourceOfFundsGettingStartedCardsCardBody,
|
|
143
|
+
sourceOfFundsGettingStartedActions,
|
|
144
|
+
sourceOfFundsAdditionalDataForm,
|
|
145
|
+
sourceOfFundsThirdPartyFundingFinancierGroup,
|
|
146
|
+
sourceOfFundsThirdPartyFundingNameAvatarGroup,
|
|
147
|
+
sourceOfFundsThirdPartyFundingNameAddressGroup,
|
|
148
|
+
sourceOfFundsSofFinancierFormError,
|
|
149
|
+
sourceOfFundsSofFinancierFormNameGroup,
|
|
150
|
+
sourceOfFundsFinancierFooter,
|
|
151
|
+
sourceOfFundsGridContainer,
|
|
152
|
+
sourceOfFundsUploadModalContentField,
|
|
153
|
+
sourceOfFundsUploadModalContentFieldRadioGroup,
|
|
154
|
+
sourceOfFundsUploadModalContentRequirementsContainer,
|
|
155
|
+
sourceOfFundsUploadListHeading,
|
|
156
|
+
sourceOfFundsModal
|
|
157
|
+
};
|
|
102
158
|
const additionalDataSchemaKeys = [
|
|
103
159
|
"description",
|
|
104
160
|
"dateOfFundsReceived",
|
|
@@ -204,54 +260,52 @@ const getServiceTranslationKey = (service) => {
|
|
|
204
260
|
};
|
|
205
261
|
const getGettingStartedCardDetails = (sourceOfFundsType, i18n, data) => {
|
|
206
262
|
const details = [];
|
|
207
|
-
sourceOfFundsType
|
|
208
|
-
var _a, _b, _c;
|
|
263
|
+
sourceOfFundsType?.forEach((type) => {
|
|
209
264
|
switch (type) {
|
|
210
265
|
case "amount":
|
|
211
266
|
details.push({
|
|
212
267
|
term: i18n.get("amount"),
|
|
213
|
-
details:
|
|
268
|
+
details: data?.amount?.currency && data?.amount?.value ? formatAmountWithCurrency(data.amount.value, data.amount.currency) : ""
|
|
214
269
|
});
|
|
215
270
|
break;
|
|
216
271
|
case "description":
|
|
217
272
|
details.push({
|
|
218
273
|
term: i18n.get("description"),
|
|
219
|
-
details:
|
|
274
|
+
details: data?.description || ""
|
|
220
275
|
});
|
|
221
276
|
break;
|
|
222
277
|
case "dateOfFundsReceived":
|
|
223
278
|
details.push({
|
|
224
279
|
term: i18n.get("date"),
|
|
225
|
-
details: localizeDateString(
|
|
280
|
+
details: localizeDateString(data?.dateOfFundsReceived || "", i18n.locale)
|
|
226
281
|
});
|
|
227
282
|
break;
|
|
228
283
|
case "purpose":
|
|
229
284
|
details.push({
|
|
230
285
|
term: i18n.get("reason"),
|
|
231
|
-
details:
|
|
286
|
+
details: data?.purpose || ""
|
|
232
287
|
});
|
|
233
288
|
break;
|
|
234
289
|
case "relationship":
|
|
235
|
-
details.push({ term: i18n.get("relationship"), details:
|
|
290
|
+
details.push({ term: i18n.get("relationship"), details: data?.relationship || "" });
|
|
236
291
|
break;
|
|
237
292
|
case "originatorLegalEntityId":
|
|
238
293
|
details.push({
|
|
239
294
|
term: i18n.get("benefactorDetails"),
|
|
240
295
|
details: [
|
|
241
|
-
|
|
242
|
-
/* @__PURE__ */ jsx(Typography, { color: "secondary", children:
|
|
296
|
+
data?.legalName ? `${data?.legalName}` : `${data?.firstName} ${data?.lastName}`,
|
|
297
|
+
/* @__PURE__ */ jsx(Typography, { color: "secondary", children: data?.country || "" }, "location")
|
|
243
298
|
]
|
|
244
299
|
});
|
|
245
300
|
break;
|
|
246
301
|
case "financiers":
|
|
247
|
-
|
|
248
|
-
var _a2, _b2;
|
|
302
|
+
data?.financiers?.map((financier) => {
|
|
249
303
|
return details.push({
|
|
250
304
|
term: i18n.get("investor"),
|
|
251
305
|
details: [
|
|
252
|
-
`${financier
|
|
253
|
-
/* @__PURE__ */ jsx(Typography, { color: "secondary", children:
|
|
254
|
-
/* @__PURE__ */ jsx(Typography, { color: "secondary", children:
|
|
306
|
+
`${financier?.firstName} ${financier?.lastName}`,
|
|
307
|
+
/* @__PURE__ */ jsx(Typography, { color: "secondary", children: financier?.location || "" }, "location"),
|
|
308
|
+
/* @__PURE__ */ jsx(Typography, { color: "secondary", children: financier?.amount?.currency && financier?.amount?.value ? formatAmountWithCurrency(
|
|
255
309
|
financier.amount.value,
|
|
256
310
|
financier.amount.currency
|
|
257
311
|
) || "" : "" }, "value")
|
|
@@ -262,19 +316,19 @@ const getGettingStartedCardDetails = (sourceOfFundsType, i18n, data) => {
|
|
|
262
316
|
case "cryptocurrencyExchange":
|
|
263
317
|
details.push({
|
|
264
318
|
term: i18n.get("cryptocurrencyExchange"),
|
|
265
|
-
details:
|
|
319
|
+
details: data?.cryptocurrencyExchange || ""
|
|
266
320
|
});
|
|
267
321
|
break;
|
|
268
322
|
case "dateOfSourceEvent":
|
|
269
323
|
details.push({
|
|
270
324
|
term: i18n.get("dateOfSourceEvent"),
|
|
271
|
-
details: localizeDateString(
|
|
325
|
+
details: localizeDateString(data?.dateOfSourceEvent || "", i18n.locale)
|
|
272
326
|
});
|
|
273
327
|
break;
|
|
274
328
|
case "website":
|
|
275
329
|
details.push({
|
|
276
330
|
term: i18n.get("website"),
|
|
277
|
-
details:
|
|
331
|
+
details: data?.website || ""
|
|
278
332
|
});
|
|
279
333
|
break;
|
|
280
334
|
}
|
|
@@ -309,7 +363,7 @@ const typesRequiringAdditionalData = [
|
|
|
309
363
|
const getSourceOfFundsRequiredForms = (data) => {
|
|
310
364
|
return Object.fromEntries(
|
|
311
365
|
Object.entries(sourceOfFundsForms).filter(([form]) => {
|
|
312
|
-
if (!
|
|
366
|
+
if (!data?.type || !typesRequiringAdditionalData.includes(data?.type))
|
|
313
367
|
return form !== sourceOfFundsForms.additionalData.formId;
|
|
314
368
|
return form;
|
|
315
369
|
})
|
|
@@ -321,7 +375,6 @@ const getInputErrors = ({
|
|
|
321
375
|
key,
|
|
322
376
|
value
|
|
323
377
|
}) => {
|
|
324
|
-
var _a, _b, _c, _d;
|
|
325
378
|
const isEmpty2 = value === "" || value === null || value === void 0;
|
|
326
379
|
let errors = { ...formErrors };
|
|
327
380
|
if (isEmpty2) {
|
|
@@ -330,15 +383,15 @@ const getInputErrors = ({
|
|
|
330
383
|
errors = { ...formErrors, [key]: void 0 };
|
|
331
384
|
}
|
|
332
385
|
if (["amount", "currency"].includes(key)) {
|
|
333
|
-
if (
|
|
386
|
+
if (data?.amount?.value && data?.amount?.currency) {
|
|
334
387
|
errors = { ...formErrors, amount: void 0 };
|
|
335
388
|
}
|
|
336
|
-
if (!
|
|
389
|
+
if (!data?.amount?.currency) {
|
|
337
390
|
errors = { ...formErrors, amount: "currencyIsRequired" };
|
|
338
391
|
}
|
|
339
|
-
if (!
|
|
392
|
+
if (!data?.amount?.value) {
|
|
340
393
|
errors = { ...formErrors, amount: "amountIsRequired" };
|
|
341
|
-
} else if (isNaN(data
|
|
394
|
+
} else if (isNaN(data?.amount.value)) {
|
|
342
395
|
errors = { ...formErrors, amount: "pleaseEnterAValidAmount" };
|
|
343
396
|
}
|
|
344
397
|
}
|
|
@@ -611,34 +664,32 @@ const parseSOFDocumentDescription = (i18n, documentDescription) => {
|
|
|
611
664
|
};
|
|
612
665
|
const MISSING_DATA_SOF_UPLOAD_CODE = "2_8224";
|
|
613
666
|
const parseOriginatorDetails = (originatorDetails, businessLine) => {
|
|
614
|
-
var _a, _b, _c, _d, _e;
|
|
615
667
|
const copiedBusinessLine = { ...businessLine };
|
|
616
668
|
if (copiedBusinessLine.sourceOfFunds) {
|
|
617
669
|
if (originatorDetails.organization) {
|
|
618
670
|
copiedBusinessLine.sourceOfFunds.legalName = originatorDetails.organization.legalName;
|
|
619
|
-
copiedBusinessLine.sourceOfFunds.country =
|
|
671
|
+
copiedBusinessLine.sourceOfFunds.country = originatorDetails.organization?.registeredAddress?.country;
|
|
620
672
|
copiedBusinessLine.sourceOfFunds.originatorType = "organization";
|
|
621
673
|
}
|
|
622
674
|
if (originatorDetails.individual) {
|
|
623
|
-
copiedBusinessLine.sourceOfFunds.firstName =
|
|
624
|
-
copiedBusinessLine.sourceOfFunds.lastName =
|
|
625
|
-
copiedBusinessLine.sourceOfFunds.country =
|
|
675
|
+
copiedBusinessLine.sourceOfFunds.firstName = originatorDetails.individual.name?.firstName;
|
|
676
|
+
copiedBusinessLine.sourceOfFunds.lastName = originatorDetails.individual.name?.lastName;
|
|
677
|
+
copiedBusinessLine.sourceOfFunds.country = originatorDetails.individual.residentialAddress?.country;
|
|
626
678
|
copiedBusinessLine.sourceOfFunds.originatorType = "individual";
|
|
627
679
|
}
|
|
628
680
|
}
|
|
629
681
|
return copiedBusinessLine;
|
|
630
682
|
};
|
|
631
683
|
const getSourceOfFundsPayload = (sofType, additionalData) => {
|
|
632
|
-
var _a, _b;
|
|
633
684
|
switch (sofType) {
|
|
634
685
|
case "business":
|
|
635
686
|
return {
|
|
636
687
|
adyenProcessedFunds: false,
|
|
637
688
|
type: "business",
|
|
638
|
-
description: additionalData
|
|
689
|
+
description: additionalData?.description,
|
|
639
690
|
amount: {
|
|
640
|
-
currency:
|
|
641
|
-
value:
|
|
691
|
+
currency: additionalData?.amount?.currency ?? "USD",
|
|
692
|
+
value: additionalData?.amount?.value ?? 0
|
|
642
693
|
}
|
|
643
694
|
};
|
|
644
695
|
case "employment":
|
|
@@ -650,19 +701,19 @@ const getSourceOfFundsPayload = (sofType, additionalData) => {
|
|
|
650
701
|
return {
|
|
651
702
|
adyenProcessedFunds: false,
|
|
652
703
|
type: "donations",
|
|
653
|
-
dateOfFundsReceived: additionalData
|
|
654
|
-
purpose: additionalData
|
|
655
|
-
relationship: additionalData
|
|
656
|
-
originatorLegalEntityId: additionalData
|
|
704
|
+
dateOfFundsReceived: additionalData?.dateOfFundsReceived,
|
|
705
|
+
purpose: additionalData?.purpose,
|
|
706
|
+
relationship: additionalData?.relationship,
|
|
707
|
+
originatorLegalEntityId: additionalData?.originatorLegalEntityId
|
|
657
708
|
};
|
|
658
709
|
case "inheritance":
|
|
659
710
|
return {
|
|
660
711
|
adyenProcessedFunds: false,
|
|
661
712
|
type: "inheritance",
|
|
662
|
-
dateOfFundsReceived: additionalData
|
|
663
|
-
amount: additionalData
|
|
664
|
-
relationship: additionalData
|
|
665
|
-
originatorLegalEntityId: additionalData
|
|
713
|
+
dateOfFundsReceived: additionalData?.dateOfFundsReceived,
|
|
714
|
+
amount: additionalData?.amount,
|
|
715
|
+
relationship: additionalData?.relationship,
|
|
716
|
+
originatorLegalEntityId: additionalData?.originatorLegalEntityId
|
|
666
717
|
};
|
|
667
718
|
case "financialAid":
|
|
668
719
|
return {
|
|
@@ -698,22 +749,22 @@ const getSourceOfFundsPayload = (sofType, additionalData) => {
|
|
|
698
749
|
return {
|
|
699
750
|
adyenProcessedFunds: false,
|
|
700
751
|
type: "thirdPartyFunding",
|
|
701
|
-
financiers: additionalData
|
|
752
|
+
financiers: additionalData?.financiers
|
|
702
753
|
};
|
|
703
754
|
case "cryptocurrencyIncome":
|
|
704
755
|
return {
|
|
705
756
|
adyenProcessedFunds: false,
|
|
706
757
|
type: "cryptocurrencyIncome",
|
|
707
|
-
cryptocurrencyExchange: additionalData
|
|
758
|
+
cryptocurrencyExchange: additionalData?.cryptocurrencyExchange
|
|
708
759
|
};
|
|
709
760
|
case "assetSale":
|
|
710
761
|
return {
|
|
711
762
|
adyenProcessedFunds: false,
|
|
712
763
|
type: "assetSale",
|
|
713
|
-
cryptocurrencyExchange: additionalData
|
|
714
|
-
dateOfSourceEvent: additionalData
|
|
715
|
-
description: additionalData
|
|
716
|
-
amount: additionalData
|
|
764
|
+
cryptocurrencyExchange: additionalData?.cryptocurrencyExchange,
|
|
765
|
+
dateOfSourceEvent: additionalData?.dateOfSourceEvent,
|
|
766
|
+
description: additionalData?.description,
|
|
767
|
+
amount: additionalData?.amount
|
|
717
768
|
};
|
|
718
769
|
case "loans":
|
|
719
770
|
return {
|
|
@@ -724,9 +775,9 @@ const getSourceOfFundsPayload = (sofType, additionalData) => {
|
|
|
724
775
|
return {
|
|
725
776
|
adyenProcessedFunds: false,
|
|
726
777
|
type: "gamblingWinnings",
|
|
727
|
-
dateOfSourceEvent: additionalData
|
|
728
|
-
website: additionalData
|
|
729
|
-
amount: additionalData
|
|
778
|
+
dateOfSourceEvent: additionalData?.dateOfSourceEvent,
|
|
779
|
+
website: additionalData?.website && !additionalData.website.startsWith("http://") && !additionalData.website.startsWith("https://") ? `https://${additionalData.website}` : additionalData?.website,
|
|
780
|
+
amount: additionalData?.amount
|
|
730
781
|
};
|
|
731
782
|
default:
|
|
732
783
|
return { adyenProcessedFunds: true };
|
|
@@ -734,26 +785,26 @@ const getSourceOfFundsPayload = (sofType, additionalData) => {
|
|
|
734
785
|
};
|
|
735
786
|
const parseSofOriginatorPayload = (additionalData) => {
|
|
736
787
|
let sofOriginator;
|
|
737
|
-
if (
|
|
788
|
+
if (additionalData?.originatorType === "individual") {
|
|
738
789
|
sofOriginator = {
|
|
739
|
-
type:
|
|
790
|
+
type: LegalEntityTypes.INDIVIDUAL,
|
|
740
791
|
individual: {
|
|
741
792
|
name: {
|
|
742
|
-
firstName:
|
|
743
|
-
lastName:
|
|
793
|
+
firstName: additionalData?.firstName ?? "",
|
|
794
|
+
lastName: additionalData?.lastName ?? ""
|
|
744
795
|
},
|
|
745
796
|
residentialAddress: {
|
|
746
|
-
country: additionalData
|
|
797
|
+
country: additionalData?.country
|
|
747
798
|
}
|
|
748
799
|
}
|
|
749
800
|
};
|
|
750
801
|
} else {
|
|
751
802
|
sofOriginator = {
|
|
752
|
-
type:
|
|
803
|
+
type: LegalEntityTypes.ORGANIZATION,
|
|
753
804
|
organization: {
|
|
754
|
-
legalName:
|
|
805
|
+
legalName: additionalData?.legalName ?? "",
|
|
755
806
|
registeredAddress: {
|
|
756
|
-
country: additionalData
|
|
807
|
+
country: additionalData?.country
|
|
757
808
|
}
|
|
758
809
|
}
|
|
759
810
|
};
|
|
@@ -772,15 +823,15 @@ const formatDateForInput = (isoDateString) => {
|
|
|
772
823
|
return "";
|
|
773
824
|
}
|
|
774
825
|
};
|
|
775
|
-
const getSofCardDetails = (i18n,
|
|
776
|
-
if (!
|
|
826
|
+
const getSofCardDetails = (i18n, sourceOfFunds2) => {
|
|
827
|
+
if (!sourceOfFunds2) {
|
|
777
828
|
return "";
|
|
778
829
|
}
|
|
779
|
-
if (
|
|
830
|
+
if (sourceOfFunds2?.adyenProcessedFunds) {
|
|
780
831
|
return i18n.get("sofTypeAdyenLabel");
|
|
781
832
|
}
|
|
782
|
-
if (
|
|
783
|
-
return i18n.get(`sofType${toCapitalized(
|
|
833
|
+
if (sourceOfFunds2?.type) {
|
|
834
|
+
return i18n.get(`sofType${toCapitalized(sourceOfFunds2?.type)}Label`);
|
|
784
835
|
}
|
|
785
836
|
return "";
|
|
786
837
|
};
|
|
@@ -795,10 +846,9 @@ const getRelevantErrors = (problems, targetCodes) => {
|
|
|
795
846
|
);
|
|
796
847
|
};
|
|
797
848
|
const getUniqueRemediationActions = (error) => {
|
|
798
|
-
var _a;
|
|
799
849
|
const allActions = [
|
|
800
850
|
...error.remediatingActions || [],
|
|
801
|
-
...
|
|
851
|
+
...error.subErrors?.flatMap((sub) => sub.remediatingActions || []) || []
|
|
802
852
|
];
|
|
803
853
|
return allActions.filter((action, i, arr) => arr.findIndex((a) => a.code === action.code) === i);
|
|
804
854
|
};
|
|
@@ -819,48 +869,45 @@ function AdditionalDataForAssetSale(props) {
|
|
|
819
869
|
name: "amount",
|
|
820
870
|
label: formUtils.getLabel("amount", "saleAmount"),
|
|
821
871
|
errorMessage: formUtils.getErrorMessage("amount", errors, fieldProblems),
|
|
822
|
-
children: (childProps) =>
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
}
|
|
862
|
-
);
|
|
863
|
-
}
|
|
872
|
+
children: (childProps) => /* @__PURE__ */ jsxs(
|
|
873
|
+
InputGroup,
|
|
874
|
+
{
|
|
875
|
+
...childProps,
|
|
876
|
+
id: "currencyGroup",
|
|
877
|
+
isFocused,
|
|
878
|
+
isInvalid: Boolean(!valid.amount && errors.amount),
|
|
879
|
+
children: [
|
|
880
|
+
/* @__PURE__ */ jsx(
|
|
881
|
+
Select,
|
|
882
|
+
{
|
|
883
|
+
name: "currency",
|
|
884
|
+
"aria-label": i18n.get("currency"),
|
|
885
|
+
isMulti: false,
|
|
886
|
+
items: allowedCurrencies,
|
|
887
|
+
selected: data.amount?.currency,
|
|
888
|
+
placeholder: i18n.get("select"),
|
|
889
|
+
onChange: handleAmountChange("currency"),
|
|
890
|
+
minimal: true
|
|
891
|
+
}
|
|
892
|
+
),
|
|
893
|
+
/* @__PURE__ */ jsx(
|
|
894
|
+
InputText,
|
|
895
|
+
{
|
|
896
|
+
...childProps,
|
|
897
|
+
name: "amount",
|
|
898
|
+
value: data.amount?.value,
|
|
899
|
+
readonly: formUtils.isReadOnly("amount"),
|
|
900
|
+
onInput: handleAmountChange("amount"),
|
|
901
|
+
onBlur: handleOnAmountBlur,
|
|
902
|
+
"aria-required": true,
|
|
903
|
+
"aria-invalid": !valid.amount,
|
|
904
|
+
isValid: valid.amount,
|
|
905
|
+
onFocusHandler: () => setIsFocused(true)
|
|
906
|
+
}
|
|
907
|
+
)
|
|
908
|
+
]
|
|
909
|
+
}
|
|
910
|
+
)
|
|
864
911
|
}
|
|
865
912
|
),
|
|
866
913
|
/* @__PURE__ */ jsx(
|
|
@@ -927,48 +974,45 @@ function AdditionalDataForBusiness(props) {
|
|
|
927
974
|
errorMessage: formUtils.getErrorMessage("amount", errors, fieldProblems),
|
|
928
975
|
helper: i18n.get("useFiguresFromTheMostRecentYearAvailable"),
|
|
929
976
|
helperPosition: "below",
|
|
930
|
-
children: (childProps) =>
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
}
|
|
970
|
-
);
|
|
971
|
-
}
|
|
977
|
+
children: (childProps) => /* @__PURE__ */ jsxs(
|
|
978
|
+
InputGroup,
|
|
979
|
+
{
|
|
980
|
+
...childProps,
|
|
981
|
+
id: "currencyGroup",
|
|
982
|
+
isFocused,
|
|
983
|
+
isInvalid: Boolean(!valid.amount && errors.amount),
|
|
984
|
+
children: [
|
|
985
|
+
/* @__PURE__ */ jsx(
|
|
986
|
+
Select,
|
|
987
|
+
{
|
|
988
|
+
name: "currency",
|
|
989
|
+
"aria-label": i18n.get("currency"),
|
|
990
|
+
isMulti: false,
|
|
991
|
+
items: allowedCurrencies,
|
|
992
|
+
selected: data.amount?.currency,
|
|
993
|
+
placeholder: i18n.get("select"),
|
|
994
|
+
onChange: handleAmountChange("currency"),
|
|
995
|
+
minimal: true
|
|
996
|
+
}
|
|
997
|
+
),
|
|
998
|
+
/* @__PURE__ */ jsx(
|
|
999
|
+
InputText,
|
|
1000
|
+
{
|
|
1001
|
+
...childProps,
|
|
1002
|
+
name: "amount",
|
|
1003
|
+
value: data.amount?.value,
|
|
1004
|
+
readonly: formUtils.isReadOnly("amount"),
|
|
1005
|
+
onInput: handleAmountChange("amount"),
|
|
1006
|
+
onBlur: handleOnAmountBlur,
|
|
1007
|
+
"aria-required": true,
|
|
1008
|
+
"aria-invalid": !valid.amount,
|
|
1009
|
+
isValid: valid.amount,
|
|
1010
|
+
onFocusHandler: () => setIsFocused(true)
|
|
1011
|
+
}
|
|
1012
|
+
)
|
|
1013
|
+
]
|
|
1014
|
+
}
|
|
1015
|
+
)
|
|
972
1016
|
}
|
|
973
1017
|
),
|
|
974
1018
|
/* @__PURE__ */ jsx(
|
|
@@ -1064,7 +1108,7 @@ function AdditionalDataOriginatorLegalEntity(props) {
|
|
|
1064
1108
|
)
|
|
1065
1109
|
}
|
|
1066
1110
|
),
|
|
1067
|
-
|
|
1111
|
+
data?.originatorType === "organization" && /* @__PURE__ */ jsx(
|
|
1068
1112
|
Field,
|
|
1069
1113
|
{
|
|
1070
1114
|
name: "legalName",
|
|
@@ -1087,7 +1131,7 @@ function AdditionalDataOriginatorLegalEntity(props) {
|
|
|
1087
1131
|
)
|
|
1088
1132
|
}
|
|
1089
1133
|
),
|
|
1090
|
-
|
|
1134
|
+
data?.originatorType === "individual" && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1091
1135
|
/* @__PURE__ */ jsx(
|
|
1092
1136
|
Field,
|
|
1093
1137
|
{
|
|
@@ -1141,14 +1185,14 @@ function AdditionalDataOriginatorLegalEntity(props) {
|
|
|
1141
1185
|
}
|
|
1142
1186
|
)
|
|
1143
1187
|
] }),
|
|
1144
|
-
|
|
1188
|
+
data?.originatorType && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1145
1189
|
/* @__PURE__ */ jsx(
|
|
1146
1190
|
Field,
|
|
1147
1191
|
{
|
|
1148
1192
|
name: "relationship",
|
|
1149
1193
|
label: formUtils.getLabel(
|
|
1150
1194
|
"relationship",
|
|
1151
|
-
isDonations &&
|
|
1195
|
+
isDonations && data?.originatorType === "individual" ? "yourRelationshipToDonor" : data?.originatorType === "organization" ? "yourRelationshipToOrganization" : "yourRelationshipToDecedent"
|
|
1152
1196
|
),
|
|
1153
1197
|
errorMessage: formUtils.getErrorMessage("relationship", errors, fieldProblems),
|
|
1154
1198
|
isValid: valid.relationship,
|
|
@@ -1178,7 +1222,7 @@ function AdditionalDataOriginatorLegalEntity(props) {
|
|
|
1178
1222
|
},
|
|
1179
1223
|
labels: {
|
|
1180
1224
|
country: i18n.get(
|
|
1181
|
-
isDonations &&
|
|
1225
|
+
isDonations && data?.originatorType === "individual" ? "donorsCountryOfResidence" : data?.originatorType === "organization" ? "organizationsCountryOfOperation" : "decedentsCountryOfDeath"
|
|
1182
1226
|
)
|
|
1183
1227
|
},
|
|
1184
1228
|
readonly: formUtils.isReadOnly("country"),
|
|
@@ -1272,48 +1316,45 @@ function AdditionalDataForGambling(props) {
|
|
|
1272
1316
|
name: "amount",
|
|
1273
1317
|
label: formUtils.getLabel("amount", "totalAmountWon"),
|
|
1274
1318
|
errorMessage: formUtils.getErrorMessage("amount", errors, fieldProblems),
|
|
1275
|
-
children: (childProps) =>
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
}
|
|
1315
|
-
);
|
|
1316
|
-
}
|
|
1319
|
+
children: (childProps) => /* @__PURE__ */ jsxs(
|
|
1320
|
+
InputGroup,
|
|
1321
|
+
{
|
|
1322
|
+
...childProps,
|
|
1323
|
+
id: "currencyGroup",
|
|
1324
|
+
isFocused: focusedInput === "amount",
|
|
1325
|
+
isInvalid: Boolean(!valid.amount && errors.amount),
|
|
1326
|
+
children: [
|
|
1327
|
+
/* @__PURE__ */ jsx(
|
|
1328
|
+
Select,
|
|
1329
|
+
{
|
|
1330
|
+
name: "currency",
|
|
1331
|
+
"aria-label": i18n.get("currency"),
|
|
1332
|
+
isMulti: false,
|
|
1333
|
+
items: allowedCurrencies,
|
|
1334
|
+
selected: data.amount?.currency,
|
|
1335
|
+
placeholder: i18n.get("select"),
|
|
1336
|
+
onChange: handleAmountChange("currency"),
|
|
1337
|
+
minimal: true
|
|
1338
|
+
}
|
|
1339
|
+
),
|
|
1340
|
+
/* @__PURE__ */ jsx(
|
|
1341
|
+
InputText,
|
|
1342
|
+
{
|
|
1343
|
+
...childProps,
|
|
1344
|
+
name: "amount",
|
|
1345
|
+
value: data.amount?.value,
|
|
1346
|
+
readonly: formUtils.isReadOnly("amount"),
|
|
1347
|
+
onInput: handleAmountChange("amount"),
|
|
1348
|
+
onBlur: handleOnAmountBlur,
|
|
1349
|
+
"aria-required": true,
|
|
1350
|
+
"aria-invalid": !valid.amount,
|
|
1351
|
+
isValid: valid.amount,
|
|
1352
|
+
onFocusHandler: () => setFocusedInput("amount")
|
|
1353
|
+
}
|
|
1354
|
+
)
|
|
1355
|
+
]
|
|
1356
|
+
}
|
|
1357
|
+
)
|
|
1317
1358
|
}
|
|
1318
1359
|
),
|
|
1319
1360
|
/* @__PURE__ */ jsx(
|
|
@@ -1404,48 +1445,45 @@ function AdditionalDataForInheritance(props) {
|
|
|
1404
1445
|
name: "amount",
|
|
1405
1446
|
label: formUtils.getLabel("amount", "inheritanceAmount"),
|
|
1406
1447
|
errorMessage: formUtils.getErrorMessage("amount", errors, fieldProblems),
|
|
1407
|
-
children: (childProps) =>
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
}
|
|
1447
|
-
);
|
|
1448
|
-
}
|
|
1448
|
+
children: (childProps) => /* @__PURE__ */ jsxs(
|
|
1449
|
+
InputGroup,
|
|
1450
|
+
{
|
|
1451
|
+
...childProps,
|
|
1452
|
+
id: "currencyGroup",
|
|
1453
|
+
isFocused,
|
|
1454
|
+
isInvalid: Boolean(!valid.amount && errors.amount),
|
|
1455
|
+
children: [
|
|
1456
|
+
/* @__PURE__ */ jsx(
|
|
1457
|
+
Select,
|
|
1458
|
+
{
|
|
1459
|
+
name: "currency",
|
|
1460
|
+
"aria-label": i18n.get("currency"),
|
|
1461
|
+
isMulti: false,
|
|
1462
|
+
items: allowedCurrencies ?? [],
|
|
1463
|
+
selected: data.amount?.currency,
|
|
1464
|
+
placeholder: i18n.get("select"),
|
|
1465
|
+
onChange: handleAmountChange("currency"),
|
|
1466
|
+
minimal: true
|
|
1467
|
+
}
|
|
1468
|
+
),
|
|
1469
|
+
/* @__PURE__ */ jsx(
|
|
1470
|
+
InputText,
|
|
1471
|
+
{
|
|
1472
|
+
...childProps,
|
|
1473
|
+
name: "amount",
|
|
1474
|
+
value: data.amount?.value,
|
|
1475
|
+
readonly: formUtils.isReadOnly("amount"),
|
|
1476
|
+
onInput: handleAmountChange("amount"),
|
|
1477
|
+
onBlur: handleOnAmountBlur,
|
|
1478
|
+
"aria-required": true,
|
|
1479
|
+
"aria-invalid": !valid.amount,
|
|
1480
|
+
isValid: valid.amount,
|
|
1481
|
+
onFocusHandler: () => setIsFocused(true)
|
|
1482
|
+
}
|
|
1483
|
+
)
|
|
1484
|
+
]
|
|
1485
|
+
}
|
|
1486
|
+
)
|
|
1449
1487
|
}
|
|
1450
1488
|
),
|
|
1451
1489
|
/* @__PURE__ */ jsx(
|
|
@@ -1460,7 +1498,7 @@ function AdditionalDataForInheritance(props) {
|
|
|
1460
1498
|
{
|
|
1461
1499
|
...childProps,
|
|
1462
1500
|
name: "dateOfFundsReceived",
|
|
1463
|
-
value: data.dateOfFundsReceived,
|
|
1501
|
+
value: formatDateForInput(data.dateOfFundsReceived),
|
|
1464
1502
|
onInput: handleChangeFor("dateOfFundsReceived", "input"),
|
|
1465
1503
|
onBlur: handleChangeFor("dateOfFundsReceived", "blur"),
|
|
1466
1504
|
"aria-required": true,
|
|
@@ -1482,17 +1520,16 @@ const SOFFinancierModal = (props) => {
|
|
|
1482
1520
|
const [isFocused, setIsFocused] = useState(false);
|
|
1483
1521
|
const [errorMessage, setErrorMessage] = useState("");
|
|
1484
1522
|
const handleInputUpdate = (key, e) => {
|
|
1485
|
-
var _a, _b;
|
|
1486
1523
|
const inputEl = e.target;
|
|
1487
1524
|
setErrorMessage("");
|
|
1488
|
-
const value = inputEl
|
|
1525
|
+
const value = inputEl?.value;
|
|
1489
1526
|
let inputData = {
|
|
1490
1527
|
[key]: value
|
|
1491
1528
|
};
|
|
1492
1529
|
if (["amount", "currency"].includes(key)) {
|
|
1493
1530
|
const amountValue = {
|
|
1494
|
-
currency: key === "currency" ? value :
|
|
1495
|
-
value: key === "currency" ?
|
|
1531
|
+
currency: key === "currency" ? value : formData?.amount?.currency,
|
|
1532
|
+
value: key === "currency" ? formData?.amount?.value : value
|
|
1496
1533
|
};
|
|
1497
1534
|
inputData = { amount: amountValue };
|
|
1498
1535
|
}
|
|
@@ -1505,19 +1542,17 @@ const SOFFinancierModal = (props) => {
|
|
|
1505
1542
|
setFormErrors(errors);
|
|
1506
1543
|
};
|
|
1507
1544
|
const handleOnAmountBlur = () => {
|
|
1508
|
-
var _a;
|
|
1509
1545
|
setIsFocused(false);
|
|
1510
1546
|
const errors = getInputErrors({
|
|
1511
1547
|
formErrors,
|
|
1512
1548
|
data: formData,
|
|
1513
1549
|
key: "amount",
|
|
1514
|
-
value:
|
|
1550
|
+
value: formData?.amount?.value
|
|
1515
1551
|
});
|
|
1516
1552
|
setFormErrors(errors);
|
|
1517
1553
|
};
|
|
1518
1554
|
const allFieldsFilled = (data) => {
|
|
1519
|
-
|
|
1520
|
-
return (data == null ? void 0 : data.firstName) && (data == null ? void 0 : data.lastName) && (data == null ? void 0 : data.location) && ((_a = data == null ? void 0 : data.amount) == null ? void 0 : _a.currency) && !Number.isNaN(Number((_b = data == null ? void 0 : data.amount) == null ? void 0 : _b.value));
|
|
1555
|
+
return data?.firstName && data?.lastName && data?.location && data?.amount?.currency && !Number.isNaN(Number(data?.amount?.value));
|
|
1521
1556
|
};
|
|
1522
1557
|
const handleFinancierSave = () => {
|
|
1523
1558
|
if (formData && allFieldsFilled(formData)) {
|
|
@@ -1531,8 +1566,7 @@ const SOFFinancierModal = (props) => {
|
|
|
1531
1566
|
"amount"
|
|
1532
1567
|
];
|
|
1533
1568
|
const errors = fields.reduce((acc, key) => {
|
|
1534
|
-
|
|
1535
|
-
const value = key === "amount" ? (_a = formData == null ? void 0 : formData.amount) == null ? void 0 : _a.value : formData == null ? void 0 : formData[key];
|
|
1569
|
+
const value = key === "amount" ? formData?.amount?.value : formData?.[key];
|
|
1536
1570
|
return {
|
|
1537
1571
|
...acc,
|
|
1538
1572
|
...getInputErrors({
|
|
@@ -1585,7 +1619,7 @@ const SOFFinancierModal = (props) => {
|
|
|
1585
1619
|
{
|
|
1586
1620
|
...childProps,
|
|
1587
1621
|
name: "firstName",
|
|
1588
|
-
value: formData
|
|
1622
|
+
value: formData?.firstName,
|
|
1589
1623
|
onInput: (e) => handleInputUpdate("firstName", e),
|
|
1590
1624
|
onBlur: (e) => handleInputUpdate("firstName", e),
|
|
1591
1625
|
"aria-required": true,
|
|
@@ -1607,7 +1641,7 @@ const SOFFinancierModal = (props) => {
|
|
|
1607
1641
|
{
|
|
1608
1642
|
...childProps,
|
|
1609
1643
|
name: "lastName",
|
|
1610
|
-
value: formData
|
|
1644
|
+
value: formData?.lastName,
|
|
1611
1645
|
onInput: (e) => handleInputUpdate("lastName", e),
|
|
1612
1646
|
onBlur: (e) => handleInputUpdate("lastName", e),
|
|
1613
1647
|
"aria-required": true,
|
|
@@ -1633,7 +1667,7 @@ const SOFFinancierModal = (props) => {
|
|
|
1633
1667
|
{
|
|
1634
1668
|
...childProps,
|
|
1635
1669
|
name: "location",
|
|
1636
|
-
value: formData
|
|
1670
|
+
value: formData?.location,
|
|
1637
1671
|
onInput: (e) => handleInputUpdate("location", e),
|
|
1638
1672
|
onBlur: (e) => handleInputUpdate("location", e),
|
|
1639
1673
|
"aria-required": true,
|
|
@@ -1651,36 +1685,33 @@ const SOFFinancierModal = (props) => {
|
|
|
1651
1685
|
label: i18n.get("investmentAmount"),
|
|
1652
1686
|
errorMessage: formErrors.amount,
|
|
1653
1687
|
isValid: !formErrors.amount,
|
|
1654
|
-
children: (childProps) => {
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
)
|
|
1682
|
-
] });
|
|
1683
|
-
}
|
|
1688
|
+
children: (childProps) => /* @__PURE__ */ jsxs(InputGroup, { ...childProps, id: "currencyGroup", isFocused, children: [
|
|
1689
|
+
/* @__PURE__ */ jsx(
|
|
1690
|
+
Select,
|
|
1691
|
+
{
|
|
1692
|
+
minimal: true,
|
|
1693
|
+
name: "currency",
|
|
1694
|
+
"aria-label": i18n.get("currency"),
|
|
1695
|
+
isMulti: false,
|
|
1696
|
+
items: allowedCurrencies,
|
|
1697
|
+
selected: formData?.amount?.currency,
|
|
1698
|
+
placeholder: i18n.get("select"),
|
|
1699
|
+
onChange: (e) => handleInputUpdate("currency", e)
|
|
1700
|
+
}
|
|
1701
|
+
),
|
|
1702
|
+
/* @__PURE__ */ jsx(
|
|
1703
|
+
InputText,
|
|
1704
|
+
{
|
|
1705
|
+
...childProps,
|
|
1706
|
+
name: "amount",
|
|
1707
|
+
value: formData?.amount?.value,
|
|
1708
|
+
onInput: (e) => handleInputUpdate("amount", e),
|
|
1709
|
+
onBlur: handleOnAmountBlur,
|
|
1710
|
+
"aria-required": true,
|
|
1711
|
+
onFocusHandler: () => setIsFocused(true)
|
|
1712
|
+
}
|
|
1713
|
+
)
|
|
1714
|
+
] })
|
|
1684
1715
|
}
|
|
1685
1716
|
)
|
|
1686
1717
|
] }),
|
|
@@ -1702,7 +1733,6 @@ const SOFFinancierModal = (props) => {
|
|
|
1702
1733
|
] });
|
|
1703
1734
|
};
|
|
1704
1735
|
function AdditionalDataForThirdParty(props) {
|
|
1705
|
-
var _a;
|
|
1706
1736
|
const [showFinancierModal, setShowFinancierModal] = useState(false);
|
|
1707
1737
|
const [activeFinancier, setActiveFinancier] = useState();
|
|
1708
1738
|
const [activeIndex, setActiveIndex] = useState();
|
|
@@ -1760,35 +1790,32 @@ function AdditionalDataForThirdParty(props) {
|
|
|
1760
1790
|
children: i18n.get("addAtLeastOneInvestor")
|
|
1761
1791
|
}
|
|
1762
1792
|
),
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
"button",
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
className: styles.
|
|
1771
|
-
|
|
1772
|
-
/* @__PURE__ */ jsxs("div", { className: styles.
|
|
1773
|
-
/* @__PURE__ */
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
index
|
|
1790
|
-
);
|
|
1791
|
-
}),
|
|
1793
|
+
data.financiers?.map((financier, index) => /* @__PURE__ */ jsxs(
|
|
1794
|
+
"button",
|
|
1795
|
+
{
|
|
1796
|
+
type: "button",
|
|
1797
|
+
onClick: () => handleShowUpdateFinancierModal(index),
|
|
1798
|
+
className: styles.sourceOfFundsThirdPartyFundingFinancierGroup,
|
|
1799
|
+
children: [
|
|
1800
|
+
/* @__PURE__ */ jsxs("div", { className: styles.sourceOfFundsThirdPartyFundingNameAvatarGroup, children: [
|
|
1801
|
+
/* @__PURE__ */ jsx(Avatar, { iconName: "user", circle: true }),
|
|
1802
|
+
/* @__PURE__ */ jsxs("div", { className: styles.sourceOfFundsThirdPartyFundingNameAddressGroup, children: [
|
|
1803
|
+
/* @__PURE__ */ jsxs(Typography, { el: "div", variant: "body-strongest", children: [
|
|
1804
|
+
financier.firstName,
|
|
1805
|
+
" ",
|
|
1806
|
+
financier.lastName
|
|
1807
|
+
] }),
|
|
1808
|
+
/* @__PURE__ */ jsx(Typography, { el: "div", variant: "caption", children: financier.location })
|
|
1809
|
+
] })
|
|
1810
|
+
] }),
|
|
1811
|
+
/* @__PURE__ */ jsx("div", { children: financier.amount?.currency && financier.amount?.value ? formatAmountWithCurrency(
|
|
1812
|
+
financier.amount.value,
|
|
1813
|
+
financier.amount?.currency
|
|
1814
|
+
) : "" })
|
|
1815
|
+
]
|
|
1816
|
+
},
|
|
1817
|
+
index
|
|
1818
|
+
)),
|
|
1792
1819
|
/* @__PURE__ */ jsx(
|
|
1793
1820
|
"button",
|
|
1794
1821
|
{
|
|
@@ -1812,6 +1839,17 @@ function AdditionalDataForThirdParty(props) {
|
|
|
1812
1839
|
)
|
|
1813
1840
|
] });
|
|
1814
1841
|
}
|
|
1842
|
+
function canParseUrl(url) {
|
|
1843
|
+
if (URL.canParse) {
|
|
1844
|
+
return URL.canParse(url);
|
|
1845
|
+
}
|
|
1846
|
+
try {
|
|
1847
|
+
new URL(url);
|
|
1848
|
+
return true;
|
|
1849
|
+
} catch {
|
|
1850
|
+
return false;
|
|
1851
|
+
}
|
|
1852
|
+
}
|
|
1815
1853
|
const sourceOfFundsTypeValidations = {
|
|
1816
1854
|
type: {
|
|
1817
1855
|
modes: ["blur"],
|
|
@@ -1833,24 +1871,26 @@ const sourceOfFundsAdditionalDataValidations = {
|
|
|
1833
1871
|
},
|
|
1834
1872
|
{
|
|
1835
1873
|
modes: ["blur"],
|
|
1836
|
-
validate: (website) => website ?
|
|
1874
|
+
validate: (website) => website ? canParseUrl(
|
|
1875
|
+
website?.startsWith("http:") || website?.startsWith("https:") ? website : `https://${website}`
|
|
1876
|
+
) : false,
|
|
1837
1877
|
errorMessage: "validationPleaseEnterAValidUrl"
|
|
1838
1878
|
}
|
|
1839
1879
|
],
|
|
1840
1880
|
amount: [
|
|
1841
1881
|
{
|
|
1842
1882
|
modes: ["blur"],
|
|
1843
|
-
validate: (amount) => !isEmpty(amount
|
|
1883
|
+
validate: (amount) => !isEmpty(amount?.currency),
|
|
1844
1884
|
errorMessage: "currencyIsRequired"
|
|
1845
1885
|
},
|
|
1846
1886
|
{
|
|
1847
1887
|
modes: ["blur"],
|
|
1848
|
-
validate: (amount) => !isEmpty(amount
|
|
1888
|
+
validate: (amount) => !isEmpty(amount?.value),
|
|
1849
1889
|
errorMessage: "amountIsRequired"
|
|
1850
1890
|
},
|
|
1851
1891
|
{
|
|
1852
1892
|
modes: ["blur"],
|
|
1853
|
-
validate: (amount) => !Number.isNaN(Number(amount
|
|
1893
|
+
validate: (amount) => !Number.isNaN(Number(amount?.value)),
|
|
1854
1894
|
errorMessage: "pleaseEnterAValidAmount"
|
|
1855
1895
|
}
|
|
1856
1896
|
],
|
|
@@ -1925,7 +1965,7 @@ const sourceOfFundsAdditionalDataValidations = {
|
|
|
1925
1965
|
}
|
|
1926
1966
|
};
|
|
1927
1967
|
function SourceOfFundsAdditionalData(props) {
|
|
1928
|
-
const {
|
|
1968
|
+
const { t } = useTranslation();
|
|
1929
1969
|
const {
|
|
1930
1970
|
data: defaultData,
|
|
1931
1971
|
validators,
|
|
@@ -1935,8 +1975,8 @@ function SourceOfFundsAdditionalData(props) {
|
|
|
1935
1975
|
sourceOfFundsType
|
|
1936
1976
|
} = props;
|
|
1937
1977
|
const getFormSchema = useMemo(
|
|
1938
|
-
() => getAdditionalDataSchemaKeys(sourceOfFundsType, defaultData
|
|
1939
|
-
[sourceOfFundsType, defaultData
|
|
1978
|
+
() => getAdditionalDataSchemaKeys(sourceOfFundsType, defaultData?.originatorType),
|
|
1979
|
+
[sourceOfFundsType, defaultData?.originatorType]
|
|
1940
1980
|
);
|
|
1941
1981
|
const [schema, setSchema] = useState(getFormSchema);
|
|
1942
1982
|
const {
|
|
@@ -1955,14 +1995,13 @@ function SourceOfFundsAdditionalData(props) {
|
|
|
1955
1995
|
shouldValidate
|
|
1956
1996
|
});
|
|
1957
1997
|
useEffect(() => {
|
|
1958
|
-
setSchema(getAdditionalDataSchemaKeys(sourceOfFundsType, formData
|
|
1998
|
+
setSchema(getAdditionalDataSchemaKeys(sourceOfFundsType, formData?.originatorType));
|
|
1959
1999
|
}, [formData.originatorType]);
|
|
1960
2000
|
const handleAmountChange = (key) => (e) => {
|
|
1961
|
-
var _a, _b;
|
|
1962
2001
|
const isCurrencyKey = key === "currency";
|
|
1963
2002
|
const amountValue = {
|
|
1964
|
-
currency: isCurrencyKey ? e.target.value :
|
|
1965
|
-
value: isCurrencyKey ?
|
|
2003
|
+
currency: isCurrencyKey ? e.target.value : formData.amount?.currency,
|
|
2004
|
+
value: isCurrencyKey ? formData.amount?.value : e.target.value
|
|
1966
2005
|
};
|
|
1967
2006
|
const fieldEvent = {
|
|
1968
2007
|
target: {
|
|
@@ -1972,7 +2011,7 @@ function SourceOfFundsAdditionalData(props) {
|
|
|
1972
2011
|
};
|
|
1973
2012
|
handleChangeFor("amount")(fieldEvent);
|
|
1974
2013
|
};
|
|
1975
|
-
const formUtils = createFormUtils(props,
|
|
2014
|
+
const formUtils = createFormUtils(props, t);
|
|
1976
2015
|
const { updateStateSlice } = useGlobalDataSlice("additionalData");
|
|
1977
2016
|
useEffect(() => {
|
|
1978
2017
|
updateStateSlice({
|
|
@@ -2085,7 +2124,7 @@ function SourceOfFundsAdditionalData(props) {
|
|
|
2085
2124
|
ErrorPanel,
|
|
2086
2125
|
{
|
|
2087
2126
|
verificationErrors: formVerificationErrors,
|
|
2088
|
-
validationErrors: props
|
|
2127
|
+
validationErrors: props?.fieldValidationErrors,
|
|
2089
2128
|
formUtils,
|
|
2090
2129
|
id: "ariaErrorField"
|
|
2091
2130
|
}
|
|
@@ -2095,6 +2134,7 @@ function SourceOfFundsAdditionalData(props) {
|
|
|
2095
2134
|
}
|
|
2096
2135
|
const sourceOfFundsTypeFields = ["type"];
|
|
2097
2136
|
function SourceOfFundsType(props) {
|
|
2137
|
+
const { t } = useTranslation();
|
|
2098
2138
|
const { i18n } = useI18nContext();
|
|
2099
2139
|
const {
|
|
2100
2140
|
data: sourceOfFundsTypeDefaultData,
|
|
@@ -2118,7 +2158,7 @@ function SourceOfFundsType(props) {
|
|
|
2118
2158
|
fieldProblems: fieldValidationErrors,
|
|
2119
2159
|
shouldValidate
|
|
2120
2160
|
});
|
|
2121
|
-
const formUtils = createFormUtils(props,
|
|
2161
|
+
const formUtils = createFormUtils(props, t);
|
|
2122
2162
|
const { updateStateSlice } = useGlobalDataSlice("sourceOfFundsType");
|
|
2123
2163
|
useEffect(() => {
|
|
2124
2164
|
updateStateSlice({
|
|
@@ -2135,11 +2175,11 @@ function SourceOfFundsType(props) {
|
|
|
2135
2175
|
label: i18n.get("sofTypeAdyenLabel"),
|
|
2136
2176
|
icon: getIconById("adyen")
|
|
2137
2177
|
},
|
|
2138
|
-
...
|
|
2178
|
+
...categories?.map((item) => ({
|
|
2139
2179
|
value: item.id,
|
|
2140
2180
|
label: i18n.get(`sofType${toCapitalized(item.name)}Label`),
|
|
2141
2181
|
icon: getIconById(item.id)
|
|
2142
|
-
}))
|
|
2182
|
+
})) ?? []
|
|
2143
2183
|
];
|
|
2144
2184
|
const errorMessage = formUtils.getErrorMessage("type", formErrors, formFieldProblems);
|
|
2145
2185
|
return /* @__PURE__ */ jsx(Field, { el: "fieldset", name: "type", children: () => /* @__PURE__ */ jsx(
|
|
@@ -2148,7 +2188,7 @@ function SourceOfFundsType(props) {
|
|
|
2148
2188
|
name: "type",
|
|
2149
2189
|
tiles: categoryItems,
|
|
2150
2190
|
errorMessage: typeof errorMessage !== "boolean" ? i18n.get(errorMessage) : errorMessage,
|
|
2151
|
-
selected:
|
|
2191
|
+
selected: formData?.type ? formData.type : [],
|
|
2152
2192
|
onChange: handleChangeFor("type", "input")
|
|
2153
2193
|
}
|
|
2154
2194
|
) });
|
|
@@ -2195,7 +2235,7 @@ function SourceOfFunds(props) {
|
|
|
2195
2235
|
const { i18n } = useI18nContext();
|
|
2196
2236
|
const { activeForm, activeBusinessLine, sourceOfFundsType } = props;
|
|
2197
2237
|
const { data: sourceOfFundsTypesData, isLoading } = useSourceOfFundsTypes();
|
|
2198
|
-
const formWrapperClasses = (formId) =>
|
|
2238
|
+
const formWrapperClasses = (formId) => activeForm?.formId !== formId ? "adyen-kyc-form-wrapper adyen-kyc-form-wrapper--hidden" : "adyen-kyc-form-wrapper";
|
|
2199
2239
|
const pageHeadings = useMemo(
|
|
2200
2240
|
() => getPageHeadings(sourceOfFundsType ?? "adyen"),
|
|
2201
2241
|
[sourceOfFundsType]
|
|
@@ -2203,19 +2243,19 @@ function SourceOfFunds(props) {
|
|
|
2203
2243
|
return isLoading || !activeBusinessLine ? /* @__PURE__ */ jsx("div", { className: styles.sourceOfFundsWrapperLoading, children: /* @__PURE__ */ jsx(Loader, {}) }) : /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-form-wrapper", children: [
|
|
2204
2244
|
/* @__PURE__ */ jsxs("div", { className: styles.sourceOfFundsWrapperHeading, children: [
|
|
2205
2245
|
/* @__PURE__ */ jsx(Typography, { el: "h1", variant: "title-l", children: i18n.get(
|
|
2206
|
-
|
|
2246
|
+
activeForm?.formId === "additionalData" ? pageHeadings.heading : {
|
|
2207
2247
|
key: "selectASourceOfFunding",
|
|
2208
2248
|
values: {
|
|
2209
2249
|
type: getServiceTranslationSelectTitle(
|
|
2210
2250
|
i18n,
|
|
2211
|
-
|
|
2251
|
+
activeBusinessLine?.service || ""
|
|
2212
2252
|
).toLowerCase()
|
|
2213
2253
|
}
|
|
2214
2254
|
}
|
|
2215
2255
|
) }),
|
|
2216
2256
|
/* @__PURE__ */ jsxs(Typography, { className: styles.sourceOfFundsWrapperDescription, children: [
|
|
2217
|
-
|
|
2218
|
-
|
|
2257
|
+
activeForm?.formId === "additionalData" && pageHeadings.description && i18n.get(pageHeadings.description),
|
|
2258
|
+
sourceOfFundsTypesData?.length === 0 && i18n.get("noCategoriesAvailable")
|
|
2219
2259
|
] })
|
|
2220
2260
|
] }),
|
|
2221
2261
|
sofErrorMessage.value && /* @__PURE__ */ jsxs(
|
|
@@ -2232,21 +2272,21 @@ function SourceOfFunds(props) {
|
|
|
2232
2272
|
]
|
|
2233
2273
|
}
|
|
2234
2274
|
),
|
|
2235
|
-
|
|
2275
|
+
activeForm?.formId === "sourceOfFundsType" && /* @__PURE__ */ jsx("div", { className: formWrapperClasses("sourceOfFundsType"), children: /* @__PURE__ */ jsx(
|
|
2236
2276
|
SourceOfFundsType,
|
|
2237
2277
|
{
|
|
2238
2278
|
categories: sourceOfFundsTypesData,
|
|
2239
2279
|
...getFormProps(props, sourceOfFundsForms.sourceOfFundsType.formId)
|
|
2240
2280
|
}
|
|
2241
2281
|
) }),
|
|
2242
|
-
|
|
2282
|
+
activeForm?.formId === "additionalData" && /* @__PURE__ */ jsx("div", { className: formWrapperClasses("additionalData"), children: /* @__PURE__ */ jsx(
|
|
2243
2283
|
SourceOfFundsAdditionalData,
|
|
2244
2284
|
{
|
|
2245
2285
|
...getFormProps(props, sourceOfFundsForms.additionalData.formId),
|
|
2246
2286
|
sourceOfFundsType
|
|
2247
2287
|
}
|
|
2248
2288
|
) }),
|
|
2249
|
-
|
|
2289
|
+
activeForm?.formId === "companySourceOfFunds" && /* @__PURE__ */ jsx("div", { className: formWrapperClasses("companySourceOfFunds"), children: /* @__PURE__ */ jsx("div", { children: i18n.get("uploadADocument") }) })
|
|
2250
2290
|
] });
|
|
2251
2291
|
}
|
|
2252
2292
|
function SourceOfFundsGettingStartedCard(props) {
|
|
@@ -2268,7 +2308,7 @@ function SourceOfFundsGettingStartedCard(props) {
|
|
|
2268
2308
|
children: i18n.get("start")
|
|
2269
2309
|
}
|
|
2270
2310
|
),
|
|
2271
|
-
children: isEdit &&
|
|
2311
|
+
children: isEdit && meta?.length && /* @__PURE__ */ jsx(
|
|
2272
2312
|
StructuredList,
|
|
2273
2313
|
{
|
|
2274
2314
|
className: styles.sourceOfFundsGettingStartedCardsCardDescription,
|
|
@@ -2289,64 +2329,55 @@ const SourceOfFundsGettingStarted = ({
|
|
|
2289
2329
|
legalEntity,
|
|
2290
2330
|
isSoFDocumentMissing
|
|
2291
2331
|
}) => {
|
|
2292
|
-
var _a, _b, _c;
|
|
2293
2332
|
const { i18n } = useI18nContext();
|
|
2294
|
-
const hasSourceOfFunds = businessLines
|
|
2333
|
+
const hasSourceOfFunds = businessLines?.some(
|
|
2295
2334
|
(businessLine) => !isEmpty$1(businessLine.sourceOfFunds)
|
|
2296
2335
|
);
|
|
2297
2336
|
const sofDocuments = useMemo(
|
|
2298
|
-
() =>
|
|
2299
|
-
var _a2;
|
|
2300
|
-
return ((_a2 = legalEntity == null ? void 0 : legalEntity.documentDetails) == null ? void 0 : _a2.filter((doc) => doc.type === "proofOfFundingOrWealthSource")) ?? [];
|
|
2301
|
-
},
|
|
2337
|
+
() => legalEntity?.documentDetails?.filter((doc) => doc.type === "proofOfFundingOrWealthSource") ?? [],
|
|
2302
2338
|
[legalEntity]
|
|
2303
2339
|
);
|
|
2304
2340
|
const mapBusinessLines = useCallback(
|
|
2305
2341
|
(lines) => {
|
|
2306
|
-
|
|
2307
|
-
const completedBusinessLines = businessLines.every((line) => {
|
|
2308
|
-
var _a3;
|
|
2309
|
-
return (_a3 = line == null ? void 0 : line.sourceOfFunds) == null ? void 0 : _a3.type;
|
|
2310
|
-
});
|
|
2342
|
+
const completedBusinessLines = businessLines.every((line) => line?.sourceOfFunds?.type);
|
|
2311
2343
|
const cards = lines.map((line) => {
|
|
2312
|
-
var _a3, _b2, _c2, _d, _e;
|
|
2313
2344
|
const SoF = mapSourceOfFundToSourceOfFundsSchema(line);
|
|
2314
2345
|
return {
|
|
2315
2346
|
title: getServiceTranslation(i18n, line.service || ""),
|
|
2316
|
-
type:
|
|
2317
|
-
isEdit: !!
|
|
2347
|
+
type: line?.sourceOfFunds?.type,
|
|
2348
|
+
isEdit: !!line?.sourceOfFunds?.type || !!line?.sourceOfFunds?.adyenProcessedFunds,
|
|
2318
2349
|
onClick: () => handleSourceOfFundsClick(SoF, line),
|
|
2319
2350
|
meta: [
|
|
2320
2351
|
{
|
|
2321
2352
|
term: i18n.get("sourceOfFunds"),
|
|
2322
|
-
details: getSofCardDetails(i18n, line
|
|
2353
|
+
details: getSofCardDetails(i18n, line?.sourceOfFunds)
|
|
2323
2354
|
},
|
|
2324
2355
|
...getGettingStartedCardDetails(
|
|
2325
2356
|
getAdditionalDataSchemaKeys(
|
|
2326
|
-
|
|
2327
|
-
|
|
2357
|
+
line?.sourceOfFunds?.type || "adyen",
|
|
2358
|
+
line?.sourceOfFunds?.originatorType
|
|
2328
2359
|
),
|
|
2329
2360
|
i18n,
|
|
2330
|
-
line
|
|
2361
|
+
line?.sourceOfFunds
|
|
2331
2362
|
)
|
|
2332
2363
|
]
|
|
2333
2364
|
};
|
|
2334
|
-
}).sort((a) =>
|
|
2365
|
+
}).sort((a) => a?.type ? 1 : -1);
|
|
2335
2366
|
const uploadCard = {
|
|
2336
2367
|
title: getServiceTranslation(i18n),
|
|
2337
2368
|
type: "",
|
|
2338
|
-
isEdit: !!
|
|
2369
|
+
isEdit: !!sofDocuments?.length,
|
|
2339
2370
|
onClick: handleNavigateToUploadPage,
|
|
2340
|
-
meta:
|
|
2371
|
+
meta: sofDocuments?.length ? sofDocuments.map((doc) => ({
|
|
2341
2372
|
term: i18n.get("fileName"),
|
|
2342
2373
|
details: [
|
|
2343
|
-
doc
|
|
2344
|
-
/* @__PURE__ */ jsx(Typography, { color: "secondary", children: parseSOFDocumentDescription(i18n, doc
|
|
2374
|
+
doc?.fileName,
|
|
2375
|
+
/* @__PURE__ */ jsx(Typography, { color: "secondary", children: parseSOFDocumentDescription(i18n, doc?.description) || "" }, "docDescription")
|
|
2345
2376
|
]
|
|
2346
2377
|
})) : []
|
|
2347
2378
|
};
|
|
2348
|
-
if (completedBusinessLines && (isSoFDocumentMissing ||
|
|
2349
|
-
if (
|
|
2379
|
+
if (completedBusinessLines && (isSoFDocumentMissing || sofDocuments?.length)) {
|
|
2380
|
+
if (uploadCard.meta?.length) {
|
|
2350
2381
|
cards.push(uploadCard);
|
|
2351
2382
|
} else {
|
|
2352
2383
|
cards.unshift(uploadCard);
|
|
@@ -2379,27 +2410,61 @@ const SourceOfFundsGettingStarted = ({
|
|
|
2379
2410
|
"data-testid": "source-of-funds-getting-started",
|
|
2380
2411
|
children: [
|
|
2381
2412
|
!hasSourceOfFunds && /* @__PURE__ */ jsx(
|
|
2382
|
-
|
|
2383
|
-
{
|
|
2384
|
-
type: "image",
|
|
2385
|
-
testId: "source-of-funds-getting-started-icon",
|
|
2386
|
-
name: "source-of-funds",
|
|
2387
|
-
className: styles.sourceOfFundsGettingStartedIcon
|
|
2388
|
-
}
|
|
2389
|
-
),
|
|
2390
|
-
hasSourceOfFunds && /* @__PURE__ */ jsx(
|
|
2391
|
-
TaskStatusIndicator,
|
|
2413
|
+
LandingLayout,
|
|
2392
2414
|
{
|
|
2393
|
-
|
|
2415
|
+
media: /* @__PURE__ */ jsx(
|
|
2416
|
+
Svg,
|
|
2417
|
+
{
|
|
2418
|
+
type: "image",
|
|
2419
|
+
testId: "source-of-funds-getting-started-icon",
|
|
2420
|
+
name: "source-of-funds"
|
|
2421
|
+
}
|
|
2422
|
+
),
|
|
2423
|
+
title: i18n.get("fundingSourcesForFinancialProducts"),
|
|
2424
|
+
description: i18n.get("inTheNextStepWellCollectInformation"),
|
|
2425
|
+
actions: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2426
|
+
/* @__PURE__ */ jsx(
|
|
2427
|
+
Button,
|
|
2428
|
+
{
|
|
2429
|
+
fullWidth: true,
|
|
2430
|
+
testId: "source-of-funds-getting-primary-button",
|
|
2431
|
+
onClick: handleGettingStartedClick,
|
|
2432
|
+
children: i18n.get("gettingStarted")
|
|
2433
|
+
}
|
|
2434
|
+
),
|
|
2435
|
+
handleCancelClick && /* @__PURE__ */ jsx(
|
|
2436
|
+
Button,
|
|
2437
|
+
{
|
|
2438
|
+
variant: "tertiary",
|
|
2439
|
+
fullWidth: true,
|
|
2440
|
+
testId: "source-of-funds-getting-cancel-button",
|
|
2441
|
+
onClick: handleCancelClick,
|
|
2442
|
+
children: i18n.get("backToTaskList")
|
|
2443
|
+
}
|
|
2444
|
+
)
|
|
2445
|
+
] })
|
|
2394
2446
|
}
|
|
2395
2447
|
),
|
|
2396
|
-
/* @__PURE__ */ jsx(Typography, { className: styles.sourceOfFundsGettingStartedHeading, el: "h2", variant: "title-l", children: i18n.get("fundingSourcesForFinancialProducts") }),
|
|
2397
2448
|
hasSourceOfFunds && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2449
|
+
/* @__PURE__ */ jsx(
|
|
2450
|
+
TaskStatusIndicator,
|
|
2451
|
+
{
|
|
2452
|
+
taskStatus: normalizedTaskStatusStore?.value?.SOURCE_OF_FUNDS?.status
|
|
2453
|
+
}
|
|
2454
|
+
),
|
|
2455
|
+
/* @__PURE__ */ jsx(
|
|
2456
|
+
Typography,
|
|
2457
|
+
{
|
|
2458
|
+
className: styles.sourceOfFundsGettingStartedHeading,
|
|
2459
|
+
el: "h2",
|
|
2460
|
+
variant: "title-l",
|
|
2461
|
+
children: i18n.get("fundingSourcesForFinancialProducts")
|
|
2462
|
+
}
|
|
2463
|
+
),
|
|
2398
2464
|
/* @__PURE__ */ jsx(Typography, { className: styles.sourceOfFundsGettingStartedBody, children: i18n.get("addAllSourcesOfFundsBeingUsed") }),
|
|
2399
2465
|
errorObjects && errorObjects.map((errorObj, index) => {
|
|
2400
|
-
var _a2, _b2;
|
|
2401
2466
|
const uniqueActions = getUniqueRemediationActions(errorObj);
|
|
2402
|
-
const errorItems =
|
|
2467
|
+
const errorItems = errorObj.subErrors?.map((subError) => subError.message) || [];
|
|
2403
2468
|
return /* @__PURE__ */ jsxs(
|
|
2404
2469
|
Alert,
|
|
2405
2470
|
{
|
|
@@ -2407,7 +2472,7 @@ const SourceOfFundsGettingStarted = ({
|
|
|
2407
2472
|
className: styles.sourceOfFundsGettingStartedError,
|
|
2408
2473
|
variant: "error",
|
|
2409
2474
|
children: [
|
|
2410
|
-
|
|
2475
|
+
errorObj?.subErrors?.length && /* @__PURE__ */ jsx("ul", { children: errorItems.map((item, i) => /* @__PURE__ */ jsx("li", { children: item }, i)) }),
|
|
2411
2476
|
uniqueActions.length > 0 && /* @__PURE__ */ jsx("div", { className: styles.sourceOfFundsGettingStartedErrorActions, children: uniqueActions.filter((action) => action.code !== "1_519").map((action, i) => /* @__PURE__ */ jsx(
|
|
2412
2477
|
Button,
|
|
2413
2478
|
{
|
|
@@ -2433,42 +2498,17 @@ const SourceOfFundsGettingStarted = ({
|
|
|
2433
2498
|
children: i18n.get("backToTaskList")
|
|
2434
2499
|
}
|
|
2435
2500
|
)
|
|
2436
|
-
] }),
|
|
2437
|
-
!hasSourceOfFunds && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2438
|
-
/* @__PURE__ */ jsx(Typography, { className: styles.sourceOfFundsGettingStartedBody, children: i18n.get("inTheNextStepWellCollectInformation") }),
|
|
2439
|
-
/* @__PURE__ */ jsxs("div", { className: styles.sourceOfFundsGettingStartedActions, children: [
|
|
2440
|
-
/* @__PURE__ */ jsx(
|
|
2441
|
-
Button,
|
|
2442
|
-
{
|
|
2443
|
-
fullWidth: true,
|
|
2444
|
-
testId: "source-of-funds-getting-primary-button",
|
|
2445
|
-
onClick: handleGettingStartedClick,
|
|
2446
|
-
children: i18n.get("gettingStarted")
|
|
2447
|
-
}
|
|
2448
|
-
),
|
|
2449
|
-
handleCancelClick && /* @__PURE__ */ jsx(
|
|
2450
|
-
Button,
|
|
2451
|
-
{
|
|
2452
|
-
variant: "tertiary",
|
|
2453
|
-
fullWidth: true,
|
|
2454
|
-
testId: "source-of-funds-getting-cancel-button",
|
|
2455
|
-
onClick: handleCancelClick,
|
|
2456
|
-
children: i18n.get("cancel")
|
|
2457
|
-
}
|
|
2458
|
-
)
|
|
2459
|
-
] })
|
|
2460
2501
|
] })
|
|
2461
2502
|
]
|
|
2462
2503
|
}
|
|
2463
2504
|
);
|
|
2464
2505
|
};
|
|
2465
2506
|
const SOFUploadModal = (props) => {
|
|
2466
|
-
var _a, _b;
|
|
2467
2507
|
const { i18n } = useI18nContext();
|
|
2468
2508
|
const { showToast } = useToastContext();
|
|
2469
2509
|
const logger2 = createLogger();
|
|
2470
2510
|
const { businessLines, handleModalClose, documentUtils } = props;
|
|
2471
|
-
const firstService =
|
|
2511
|
+
const firstService = businessLines?.length === 1 ? businessLines?.[0]?.service : void 0;
|
|
2472
2512
|
const [selectedService, setSelectedService] = useState(
|
|
2473
2513
|
firstService
|
|
2474
2514
|
);
|
|
@@ -2483,16 +2523,15 @@ const SOFUploadModal = (props) => {
|
|
|
2483
2523
|
const serviceRadioItems = useMemo(() => {
|
|
2484
2524
|
return businessLines.map((businessLine) => ({
|
|
2485
2525
|
id: businessLine.service,
|
|
2486
|
-
name: getServiceTranslationKey(
|
|
2526
|
+
name: getServiceTranslationKey(businessLine?.service || "")
|
|
2487
2527
|
}));
|
|
2488
2528
|
}, [businessLines]);
|
|
2489
2529
|
const canUpload = useMemo(() => selectedService && documentType, [selectedService, documentType]);
|
|
2490
|
-
const selectedBusinessLineId =
|
|
2530
|
+
const selectedBusinessLineId = businessLines?.find((businessLine) => businessLine.service === selectedService)?.id || "";
|
|
2491
2531
|
const documentLists = useMemo(() => {
|
|
2492
|
-
|
|
2493
|
-
const selectedType = (_b2 = (_a2 = businessLines == null ? void 0 : businessLines.find(
|
|
2532
|
+
const selectedType = businessLines?.find(
|
|
2494
2533
|
(businessLine) => businessLine.service === selectedService
|
|
2495
|
-
)
|
|
2534
|
+
)?.sourceOfFunds?.type;
|
|
2496
2535
|
if (selectedType) {
|
|
2497
2536
|
const lists = getDocumentLists(selectedType);
|
|
2498
2537
|
const items = lists.map((list) => ({
|
|
@@ -2536,7 +2575,7 @@ const SOFUploadModal = (props) => {
|
|
|
2536
2575
|
return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(Modal, { onClose: handleModalClose, ariaLabel: i18n.get("uploadASupportingDocument"), inset: true, children: /* @__PURE__ */ jsxs("div", { className: styles.sourceOfFundsModal, children: [
|
|
2537
2576
|
/* @__PURE__ */ jsx(Typography, { variant: "title-l", el: "h2", children: i18n.get("uploadASupportingDocument") }),
|
|
2538
2577
|
/* @__PURE__ */ jsxs("div", { className: styles.sourceOfFundsUploadModalContent, children: [
|
|
2539
|
-
|
|
2578
|
+
businessLines?.length > 1 ? /* @__PURE__ */ jsx(
|
|
2540
2579
|
Field,
|
|
2541
2580
|
{
|
|
2542
2581
|
el: "fieldset",
|
|
@@ -2578,9 +2617,9 @@ const SOFUploadModal = (props) => {
|
|
|
2578
2617
|
)
|
|
2579
2618
|
}
|
|
2580
2619
|
),
|
|
2581
|
-
|
|
2620
|
+
documentRequirements?.length ? /* @__PURE__ */ jsxs("div", { className: styles.sourceOfFundsUploadModalContentRequirementsContainer, children: [
|
|
2582
2621
|
/* @__PURE__ */ jsx(Typography, { variant: "body-strongest", el: "div", children: i18n.get("documentShouldShow") }),
|
|
2583
|
-
/* @__PURE__ */ jsx("ul", { children: documentRequirements
|
|
2622
|
+
/* @__PURE__ */ jsx("ul", { children: documentRequirements?.map((requirement) => /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(Typography, { variant: "body-stronger", el: "div", children: i18n.get(requirement) }) }, requirement)) })
|
|
2584
2623
|
] }) : null,
|
|
2585
2624
|
canUpload && /* @__PURE__ */ jsx(
|
|
2586
2625
|
Dropzone,
|
|
@@ -2604,7 +2643,6 @@ const SourceOfFundsUpload = ({
|
|
|
2604
2643
|
legalEntity,
|
|
2605
2644
|
handleNavigateToSummary
|
|
2606
2645
|
}) => {
|
|
2607
|
-
var _a;
|
|
2608
2646
|
const { i18n } = useI18nContext();
|
|
2609
2647
|
const [showUploadModal, setShowUploadModal] = useState(false);
|
|
2610
2648
|
const [docToDelete, setDocToDelete] = useState(void 0);
|
|
@@ -2621,16 +2659,10 @@ const SourceOfFundsUpload = ({
|
|
|
2621
2659
|
setShowUploadModal(true);
|
|
2622
2660
|
};
|
|
2623
2661
|
const documents = useMemo(
|
|
2624
|
-
() =>
|
|
2625
|
-
var _a2;
|
|
2626
|
-
return ((_a2 = legalEntity.documentDetails) == null ? void 0 : _a2.filter((doc) => doc.type === "proofOfFundingOrWealthSource")) ?? [];
|
|
2627
|
-
},
|
|
2662
|
+
() => legalEntity.documentDetails?.filter((doc) => doc.type === "proofOfFundingOrWealthSource") ?? [],
|
|
2628
2663
|
[legalEntity]
|
|
2629
2664
|
);
|
|
2630
|
-
const sourceOfFundsCategories =
|
|
2631
|
-
var _a2;
|
|
2632
|
-
return (_a2 = line.sourceOfFunds) == null ? void 0 : _a2.type;
|
|
2633
|
-
})) == null ? void 0 : _a.filter(Boolean);
|
|
2665
|
+
const sourceOfFundsCategories = businessLines?.map((line) => line.sourceOfFunds?.type)?.filter(Boolean);
|
|
2634
2666
|
const handleFileDelete = async (documentId) => {
|
|
2635
2667
|
if (documentUtils.deleteDocument) {
|
|
2636
2668
|
try {
|
|
@@ -2652,7 +2684,7 @@ const SourceOfFundsUpload = ({
|
|
|
2652
2684
|
return /* @__PURE__ */ jsxs("div", { className: styles.sourceOfFundsUploadList, children: [
|
|
2653
2685
|
/* @__PURE__ */ jsxs("div", { className: styles.sourceOfFundsUploadListHeading, children: [
|
|
2654
2686
|
/* @__PURE__ */ jsx(Typography, { el: "h1", variant: "title-l", children: i18n.get("supportingDocuments") }),
|
|
2655
|
-
/* @__PURE__ */ jsx(Typography, { className: styles.sourceOfFundsWrapperDescription, children:
|
|
2687
|
+
/* @__PURE__ */ jsx(Typography, { className: styles.sourceOfFundsWrapperDescription, children: sourceOfFundsCategories?.length > 1 ? i18n.get("weNeedProofOfFundingPlural", {
|
|
2656
2688
|
values: {
|
|
2657
2689
|
category1_name: sourceOfFundsCategories[0] ? i18n.get(
|
|
2658
2690
|
`sofType${toCapitalized(sourceOfFundsCategories[0])}Label`
|
|
@@ -2669,7 +2701,7 @@ const SourceOfFundsUpload = ({
|
|
|
2669
2701
|
}
|
|
2670
2702
|
}) })
|
|
2671
2703
|
] }),
|
|
2672
|
-
documents
|
|
2704
|
+
documents?.map((document) => /* @__PURE__ */ jsxs("div", { className: styles.sourceOfFundsThirdPartyFundingFinancierGroup, children: [
|
|
2673
2705
|
/* @__PURE__ */ jsxs("div", { className: styles.sourceOfFundsThirdPartyFundingNameAvatarGroup, children: [
|
|
2674
2706
|
/* @__PURE__ */ jsx(Avatar, { iconName: "document", circle: true }),
|
|
2675
2707
|
/* @__PURE__ */ jsxs("div", { className: styles.sourceOfFundsThirdPartyFundingNameAddressGroup, children: [
|
|
@@ -2701,18 +2733,18 @@ const SourceOfFundsUpload = ({
|
|
|
2701
2733
|
] })
|
|
2702
2734
|
}
|
|
2703
2735
|
),
|
|
2704
|
-
handleNavigateToSummary && /* @__PURE__ */ jsx("div", { className: styles.sourceOfFundsGettingStartedActions, children: /* @__PURE__ */ jsx(Button, { variant: "secondary", onClick: handleNavigateToSummary, children:
|
|
2736
|
+
handleNavigateToSummary && /* @__PURE__ */ jsx("div", { className: styles.sourceOfFundsGettingStartedActions, children: /* @__PURE__ */ jsx(Button, { variant: "secondary", onClick: handleNavigateToSummary, children: documents?.length > 0 ? i18n.get("finish") : i18n.get("cancel") }) }),
|
|
2705
2737
|
!!docToDelete && /* @__PURE__ */ jsx(
|
|
2706
2738
|
Confirm,
|
|
2707
2739
|
{
|
|
2708
2740
|
title: i18n.get({
|
|
2709
2741
|
key: "areYouSureYouWantToDeleteThisDocument",
|
|
2710
2742
|
values: {
|
|
2711
|
-
deleteDocName:
|
|
2743
|
+
deleteDocName: docToDelete?.fileName || ""
|
|
2712
2744
|
}
|
|
2713
2745
|
}),
|
|
2714
2746
|
confirmText: i18n.get("delete"),
|
|
2715
|
-
onConfirm: () => handleFileDelete(docToDelete
|
|
2747
|
+
onConfirm: () => handleFileDelete(docToDelete?.id),
|
|
2716
2748
|
onCancel: () => setDocToDelete(void 0),
|
|
2717
2749
|
critical: true
|
|
2718
2750
|
}
|
|
@@ -2733,7 +2765,6 @@ function SourceOfFundsDropin({
|
|
|
2733
2765
|
problems,
|
|
2734
2766
|
handleHomeClick
|
|
2735
2767
|
}) {
|
|
2736
|
-
var _a, _b, _c;
|
|
2737
2768
|
const { data: legalEntity, isLoading: isLoadingRootLegalEntity } = useLegalEntity(ROOT_LE);
|
|
2738
2769
|
const [loadingStatus, setLoadingStatus] = useState("success");
|
|
2739
2770
|
const [activeBusinessLine, setActiveBusinessLine] = useState();
|
|
@@ -2751,33 +2782,24 @@ function SourceOfFundsDropin({
|
|
|
2751
2782
|
const { i18n } = useI18nContext();
|
|
2752
2783
|
const userEvents = useAnalyticsContext();
|
|
2753
2784
|
const { showToast } = useToastContext();
|
|
2754
|
-
const { data: businessLinesData } = useBusinessLines();
|
|
2785
|
+
const { data: businessLinesData, isLoading: isLoadingBusinessLines } = useBusinessLines();
|
|
2755
2786
|
const { mutateAsync: createLegalEntity } = useCreateLegalEntity();
|
|
2756
2787
|
const { mutateAsync: updateLegalEntity } = useUpdateLegalEntity();
|
|
2757
2788
|
const { mutateAsync: updateSoFMutation } = useUpdateSourceOfFunds();
|
|
2758
2789
|
const filteredBusinessLines = useMemo(() => {
|
|
2759
|
-
return businessLinesData
|
|
2790
|
+
return businessLinesData?.filter(
|
|
2760
2791
|
(businessLine) => ALLOWED_SOF_SERVICES.includes(businessLine.service)
|
|
2761
2792
|
);
|
|
2762
2793
|
}, [businessLinesData]);
|
|
2763
2794
|
const isSoFDocumentMissing = useMemo(
|
|
2764
|
-
() =>
|
|
2765
|
-
|
|
2766
|
-
|
|
2767
|
-
|
|
2768
|
-
|
|
2769
|
-
|
|
2770
|
-
(verificationError) => (verificationError == null ? void 0 : verificationError.code) === MISSING_DATA_SOF_UPLOAD_CODE
|
|
2771
|
-
);
|
|
2772
|
-
}
|
|
2773
|
-
)) ?? false;
|
|
2774
|
-
},
|
|
2775
|
-
[legalEntity == null ? void 0 : legalEntity.problems]
|
|
2795
|
+
() => legalEntity?.problems?.some(
|
|
2796
|
+
(problem) => problem?.verificationErrors?.some(
|
|
2797
|
+
(verificationError) => verificationError?.code === MISSING_DATA_SOF_UPLOAD_CODE
|
|
2798
|
+
)
|
|
2799
|
+
) ?? false,
|
|
2800
|
+
[legalEntity?.problems]
|
|
2776
2801
|
);
|
|
2777
|
-
const idsToFetch = (
|
|
2778
|
-
var _a2;
|
|
2779
|
-
return (_a2 = businessLine.sourceOfFunds) == null ? void 0 : _a2.originatorLegalEntityId;
|
|
2780
|
-
}).filter((id) => Boolean(id))) ?? [];
|
|
2802
|
+
const idsToFetch = filteredBusinessLines?.map((businessLine) => businessLine.sourceOfFunds?.originatorLegalEntityId).filter((id) => Boolean(id)) ?? [];
|
|
2781
2803
|
const legalEntityResults = useLegalEntities(idsToFetch, {
|
|
2782
2804
|
staleTime: 5 * 60 * 1e3
|
|
2783
2805
|
// 5 minutes
|
|
@@ -2788,7 +2810,6 @@ function SourceOfFundsDropin({
|
|
|
2788
2810
|
return null;
|
|
2789
2811
|
}
|
|
2790
2812
|
return filteredBusinessLines.map((businessLine, index) => {
|
|
2791
|
-
var _a2;
|
|
2792
2813
|
const result = legalEntityResults[index];
|
|
2793
2814
|
let updatedBusinessLine = { ...businessLine };
|
|
2794
2815
|
if (result && result.data) {
|
|
@@ -2797,7 +2818,7 @@ function SourceOfFundsDropin({
|
|
|
2797
2818
|
logger.error(`Error fetching legal entity for BL ${businessLine.id}:`, result.error);
|
|
2798
2819
|
showToast({ label: i18n.get("unableToLoadRelatedEntity"), variant: "error" });
|
|
2799
2820
|
}
|
|
2800
|
-
if (
|
|
2821
|
+
if (updatedBusinessLine.sourceOfFunds?.adyenProcessedFunds) {
|
|
2801
2822
|
updatedBusinessLine.sourceOfFunds.type = "adyen";
|
|
2802
2823
|
}
|
|
2803
2824
|
return updatedBusinessLine;
|
|
@@ -2845,34 +2866,28 @@ function SourceOfFundsDropin({
|
|
|
2845
2866
|
});
|
|
2846
2867
|
}, [userEvents]);
|
|
2847
2868
|
const canSubmitForm = useMemo(
|
|
2848
|
-
() =>
|
|
2849
|
-
var _a2, _b2;
|
|
2850
|
-
return activeSourceOfFund ? !isEmpty((_b2 = (_a2 = currentState.data) == null ? void 0 : _a2.sourceOfFundsType) == null ? void 0 : _b2.type) && hasDataChanged(activeSourceOfFund, currentState.data) : false;
|
|
2851
|
-
},
|
|
2869
|
+
() => activeSourceOfFund ? !isEmpty(currentState.data?.sourceOfFundsType?.type) && hasDataChanged(activeSourceOfFund, currentState.data) : false,
|
|
2852
2870
|
[activeSourceOfFund, currentState.data]
|
|
2853
2871
|
);
|
|
2854
2872
|
const derivedProps = useMemo(
|
|
2855
2873
|
() => getPropsFromConfigurations(
|
|
2856
2874
|
{},
|
|
2857
2875
|
sourceOfFundsForms,
|
|
2858
|
-
|
|
2859
|
-
|
|
2876
|
+
problems?.remediationActions ? Object.values(problems?.remediationActions) : [],
|
|
2877
|
+
problems?.missingData ?? [],
|
|
2860
2878
|
// TODO fix this to take existing fields into account
|
|
2861
2879
|
// getFieldsWithExistingData(legalEntityResponse, sourceOfFundsApiKeyMapping),
|
|
2862
2880
|
[],
|
|
2863
2881
|
{},
|
|
2864
2882
|
{},
|
|
2865
2883
|
{},
|
|
2866
|
-
legalEntity
|
|
2884
|
+
legalEntity?.type
|
|
2867
2885
|
),
|
|
2868
|
-
[problems
|
|
2886
|
+
[problems?.remediationActions, problems?.missingData, legalEntity]
|
|
2869
2887
|
);
|
|
2870
2888
|
const sourceOfFundsRequiredForms = useMemo(
|
|
2871
|
-
() =>
|
|
2872
|
-
|
|
2873
|
-
return getSourceOfFundsRequiredForms((_a2 = currentState == null ? void 0 : currentState.data) == null ? void 0 : _a2.sourceOfFundsType);
|
|
2874
|
-
},
|
|
2875
|
-
[(_a = currentState == null ? void 0 : currentState.data) == null ? void 0 : _a.sourceOfFundsType]
|
|
2889
|
+
() => getSourceOfFundsRequiredForms(currentState?.data?.sourceOfFundsType),
|
|
2890
|
+
[currentState?.data?.sourceOfFundsType]
|
|
2876
2891
|
);
|
|
2877
2892
|
const forms = useMemo(() => {
|
|
2878
2893
|
const requiredForms = getRequiredForms(
|
|
@@ -2886,9 +2901,9 @@ function SourceOfFundsDropin({
|
|
|
2886
2901
|
const createOrUpdateOriginator = async (additionalData) => {
|
|
2887
2902
|
let originatorLegalEntityId;
|
|
2888
2903
|
const sofOriginator = parseSofOriginatorPayload(additionalData);
|
|
2889
|
-
if (additionalData
|
|
2904
|
+
if (additionalData?.originatorLegalEntityId) {
|
|
2890
2905
|
try {
|
|
2891
|
-
sofOriginator.id = additionalData
|
|
2906
|
+
sofOriginator.id = additionalData?.originatorLegalEntityId;
|
|
2892
2907
|
if (sofOriginator.type) {
|
|
2893
2908
|
delete sofOriginator.type;
|
|
2894
2909
|
}
|
|
@@ -2897,14 +2912,14 @@ function SourceOfFundsDropin({
|
|
|
2897
2912
|
id: sofOriginator.id
|
|
2898
2913
|
};
|
|
2899
2914
|
const le = await updateLegalEntity(patchLegalEntity);
|
|
2900
|
-
originatorLegalEntityId = le
|
|
2915
|
+
originatorLegalEntityId = le?.id;
|
|
2901
2916
|
} catch (e) {
|
|
2902
2917
|
logger.log("Error updating originator legal entity", e);
|
|
2903
2918
|
}
|
|
2904
2919
|
} else {
|
|
2905
2920
|
try {
|
|
2906
2921
|
const le = await createLegalEntity(sofOriginator);
|
|
2907
|
-
originatorLegalEntityId = le
|
|
2922
|
+
originatorLegalEntityId = le?.id;
|
|
2908
2923
|
} catch (e) {
|
|
2909
2924
|
logger.log("Error creating originator legal entity", e);
|
|
2910
2925
|
}
|
|
@@ -2912,10 +2927,9 @@ function SourceOfFundsDropin({
|
|
|
2912
2927
|
return originatorLegalEntityId;
|
|
2913
2928
|
};
|
|
2914
2929
|
const handleSubmit = useCallback(async () => {
|
|
2915
|
-
|
|
2916
|
-
const
|
|
2917
|
-
|
|
2918
|
-
if (!sofType || !(activeBusinessLine == null ? void 0 : activeBusinessLine.id)) {
|
|
2930
|
+
const sofData = { ...currentState?.data };
|
|
2931
|
+
const sofType = sofData?.sourceOfFundsType?.type;
|
|
2932
|
+
if (!sofType || !activeBusinessLine?.id) {
|
|
2919
2933
|
return;
|
|
2920
2934
|
}
|
|
2921
2935
|
const eventsAdditionalData = {};
|
|
@@ -2923,11 +2937,16 @@ function SourceOfFundsDropin({
|
|
|
2923
2937
|
const { additionalData } = sofData;
|
|
2924
2938
|
const sofPayload = getSourceOfFundsPayload(sofType, additionalData);
|
|
2925
2939
|
if (sofType === "donations" || sofType === "inheritance") {
|
|
2926
|
-
|
|
2927
|
-
|
|
2940
|
+
try {
|
|
2941
|
+
sofPayload.originatorLegalEntityId = await createOrUpdateOriginator(additionalData);
|
|
2942
|
+
} catch (e) {
|
|
2943
|
+
setSofErrorMessage(e?.message || i18n.get("errorUpdatingSourceOfFunds"));
|
|
2944
|
+
logger.log("Error updating source of funds", e);
|
|
2945
|
+
}
|
|
2946
|
+
eventsAdditionalData.originatorType = additionalData?.originatorType ?? "";
|
|
2928
2947
|
}
|
|
2929
2948
|
if (sofType === "thirdPartyFunding") {
|
|
2930
|
-
eventsAdditionalData.financiers = `${
|
|
2949
|
+
eventsAdditionalData.financiers = `${additionalData?.financiers?.length || 0} investor(s)`;
|
|
2931
2950
|
}
|
|
2932
2951
|
const sofMutationPayload = {
|
|
2933
2952
|
...sofPayload,
|
|
@@ -2945,13 +2964,14 @@ function SourceOfFundsDropin({
|
|
|
2945
2964
|
setActiveSourceOfFund({});
|
|
2946
2965
|
gotoFormByFormIndex(0);
|
|
2947
2966
|
setSofErrorMessage("");
|
|
2948
|
-
|
|
2967
|
+
showToast({ label: i18n.get("successAddedFundingSources"), variant: "success" });
|
|
2968
|
+
handleHomeClick?.();
|
|
2949
2969
|
} catch (e) {
|
|
2950
|
-
setSofErrorMessage(
|
|
2970
|
+
setSofErrorMessage(e?.message || i18n.get("errorUpdatingSourceOfFunds"));
|
|
2951
2971
|
logger.log("Error updating source of funds", e);
|
|
2952
2972
|
}
|
|
2953
2973
|
setLoadingStatus("success");
|
|
2954
|
-
}, [currentState
|
|
2974
|
+
}, [currentState?.data, handleHomeClick]);
|
|
2955
2975
|
const handleGettingStarted = useCallback(() => {
|
|
2956
2976
|
setGettingStarted(!gettingStarted);
|
|
2957
2977
|
}, [gettingStarted]);
|
|
@@ -2984,14 +3004,14 @@ function SourceOfFundsDropin({
|
|
|
2984
3004
|
const handleNavigateToUploadPage = () => {
|
|
2985
3005
|
setShowUploadPage(true);
|
|
2986
3006
|
};
|
|
2987
|
-
return /* @__PURE__ */ jsx("div", { className: styles.sourceOfFunds, children: loading || isLoadingRootLegalEntity ? /* @__PURE__ */ jsx(Loader, {}) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
3007
|
+
return /* @__PURE__ */ jsx("div", { className: styles.sourceOfFunds, children: loading || isLoadingRootLegalEntity || isLoadingBusinessLines || areLegalEntitiesLoading ? /* @__PURE__ */ jsx(Loader, {}) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2988
3008
|
gettingStarted && !showUploadPage && legalEntity && /* @__PURE__ */ jsx(
|
|
2989
3009
|
SourceOfFundsGettingStarted,
|
|
2990
3010
|
{
|
|
2991
3011
|
handleCancelClick: handleHomeClick,
|
|
2992
3012
|
handleGettingStartedClick: handleGettingStarted,
|
|
2993
3013
|
businessLines: allBusinessLines,
|
|
2994
|
-
problems: legalEntity
|
|
3014
|
+
problems: legalEntity?.problems,
|
|
2995
3015
|
handleSourceOfFundsClick,
|
|
2996
3016
|
handleNavigateToUploadPage,
|
|
2997
3017
|
legalEntity,
|
|
@@ -3032,7 +3052,7 @@ function SourceOfFundsDropin({
|
|
|
3032
3052
|
activeForm,
|
|
3033
3053
|
shouldValidate,
|
|
3034
3054
|
activeBusinessLine,
|
|
3035
|
-
sourceOfFundsType:
|
|
3055
|
+
sourceOfFundsType: currentState?.data?.sourceOfFundsType?.type,
|
|
3036
3056
|
ref: formRef,
|
|
3037
3057
|
data: activeSourceOfFund
|
|
3038
3058
|
}
|
|
@@ -3047,7 +3067,7 @@ const SourceOfFundsPage = ({ onSubmit, handleHomeClick }) => {
|
|
|
3047
3067
|
if (!rootLe) {
|
|
3048
3068
|
return /* @__PURE__ */ jsx(Loader, {});
|
|
3049
3069
|
}
|
|
3050
|
-
const problems = capabilityProblems ? getProblemsForEntity(capabilityProblems,
|
|
3070
|
+
const problems = capabilityProblems ? getProblemsForEntity(capabilityProblems, EntityTypes.LEGAL_ENTITY, rootLe.id) : void 0;
|
|
3051
3071
|
return /* @__PURE__ */ jsx(
|
|
3052
3072
|
SourceOfFundsDropin,
|
|
3053
3073
|
{
|