@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
package/dist/{OnboardingDropinComponent-BW6er2HU.js → OnboardingDropinComponent-DYdts9Sh.js}
RENAMED
|
@@ -2,26 +2,61 @@
|
|
|
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] = "d2aa065b-0ccd-464f-8371-9bd2f8770145", e._sentryDebugIdIdentifier = "sentry-dbid-d2aa065b-0ccd-464f-8371-9bd2f8770145");
|
|
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, t as httpPost, v as useSettingsContext, w as SettingNames, x as httpGet, y as useLocalStorage, z as getLegalRepresentative, d as useLegalEntity, B as skipToken, C as doesLegalEntityRequiresLegalRepresentative, c as useTranslation, G as Button, H as Svg, J as Skeleton, K as Alert, M as translateStringOrObject, N as Typography, O as LegalEntityTypes, P as isPartOfTrustFromLegalEntity, U as hasSolePropInLegalEntity, V as hasOwnEntityAssociationOfType, W as isEmptyEntity, X as useAccountHolder, Y as CompanyTypesValues, Z as EntityTypes, _ as DATA_MISSING_DECISION_MAKER_ERROR_CODE_MAPPING, $ as TaskTypes, a0 as createLogger, a1 as TaskStatuses, a2 as IconButton, a3 as useAnalyticsContext, a4 as Card, a5 as handleKeys, a6 as LoaderWrapper, a7 as Icon, a8 as noop, a9 as useToastContext, aa as useExperimentsContext, ab as isInstantVerifiedAccount, ac as getObscuredAccountNumber, ad as useGetTaskStatus, ae as CardGroup, R as ROOT_LE, af as useCapabilityProblems, L as Loader, ag as useGlobalStore, ah as useSetting, ai as isPartOfUnincorporatedPartnership, aj as getOwnSignatories, ak as getOwnDecisionMakersLegalEntityIds, al as getOwnSolePropProblems, am as getOwnTrustProblems, an as getOwnUnincorporatedPartnershipProblems, ao as getOwnEntityAssociations, ap as TrustMemberTypes, aq as getLegalEntityNameBasedOnType, ar as useAssociatedLegalEntity, u as useI18nContext, as as CountryCodes, at as isEmpty, au as mergeFieldMetadataIntoProps, av as resolveFieldMetadata, aw as defaultFieldMetadata, ax as defaultFieldConfig, ay as useForm, az as getFieldProps, aA as nameFields, F as FormHeader, aB as ErrorPanel, aC as createFormUtils, aD as Field, aE as MultiSelectList, aF as makeSelectItemForRole, aG as RadioGroupCard, aH as TextArea, aI as Name, aJ as CountryField, aK as COUNTRY_FIELD, aL as LegalCompanyNameField, aM as LEGAL_COMPANY_NAME_FIELD, aN as summaryItem, aO as getRoleName, aP as summaryStep, aQ as FormNavigation, aR as Summary, aS as ActionBar, g as getLegalEntityCountry, aT as UnincorporatedPartnershipMemberTypes, aU as getDecisionMakerDescriptionMap, aV as TRUST_DEFAULT_DESCRIPTIONS_MAP, aW as getRoleTagVariant, aX as Trans, aY as DEFAULT_TRUST_MEMBER_REQUIREMENTS, aZ as ContextGuidance, a_ as RadioGroup, a$ as useUnincorporatedPartnershipMembers, b0 as deleteUnincorporatedPartnershipMember, b1 as hasAllCapabilitiesResolved, b2 as hasRejectedCapabilities, b3 as objectsDeepEqual, b4 as TrustedFieldsProviders } from "./StoreProvider-O9jwxfG8.js";
|
|
12
12
|
import { lazy, Suspense } from "preact/compat";
|
|
13
13
|
import { useMemo, useCallback, useEffect, useState, useRef } from "preact/hooks";
|
|
14
|
-
import {
|
|
14
|
+
import { L as LandingLayout, u as useSingpassMyInfoLogin } from "./LandingLayout-BC3pp_IY.js";
|
|
15
15
|
import cx from "classnames";
|
|
16
|
-
import { u as
|
|
17
|
-
import { u as useTermsOfServiceStatus, a as useTermsOfServiceAcceptanceInfos } from "./useTermsOfServiceStatus-C-i9mF4m.js";
|
|
16
|
+
import { u as useTermsOfServiceStatus, a as useTermsOfServiceAcceptanceInfos } from "./useTermsOfServiceStatus-BX4GiDbz.js";
|
|
18
17
|
import { signal } from "@preact/signals";
|
|
19
18
|
import { d as downloadFile } from "./file-CiG1D0zy.js";
|
|
20
|
-
import { V as VerificationErrorAlert, u as useDeleteTransferInstrument } from "./VerificationErrorAlert-
|
|
21
|
-
import { A as Avatar } from "./Avatar-
|
|
22
|
-
import { T as TaskItemStatus } from "./TaskItemStatus-
|
|
23
|
-
import { u as useCreateLegalEntity, a as useUpdateLegalEntity } from "./useUpdateLegalEntity-
|
|
19
|
+
import { V as VerificationErrorAlert, u as useDeleteTransferInstrument } from "./VerificationErrorAlert-Ci0cObw1.js";
|
|
20
|
+
import { A as Avatar } from "./Avatar-BfRRf9_a.js";
|
|
21
|
+
import { T as TaskItemStatus } from "./TaskItemStatus-s7Z3DOGa.js";
|
|
22
|
+
import { u as useCreateLegalEntity, a as useUpdateLegalEntity } from "./useUpdateLegalEntity-BfnvHQJj.js";
|
|
24
23
|
import { T as Tag } from "./Tag-DdkVScyr.js";
|
|
24
|
+
const getPciStatus = async (legalEntityId, baseUrl, data) => {
|
|
25
|
+
return httpPost(
|
|
26
|
+
{
|
|
27
|
+
baseUrl,
|
|
28
|
+
path: `legalEntities/${legalEntityId}/pci/signingRequired`
|
|
29
|
+
},
|
|
30
|
+
data
|
|
31
|
+
);
|
|
32
|
+
};
|
|
33
|
+
const usePciStatus = (data, options) => {
|
|
34
|
+
const { rootLegalEntityId, baseUrl } = useApiContext();
|
|
35
|
+
return useQuery({
|
|
36
|
+
queryKey: ["pciStatus", data],
|
|
37
|
+
queryFn: () => getPciStatus(rootLegalEntityId.value, baseUrl.value, data),
|
|
38
|
+
...options
|
|
39
|
+
});
|
|
40
|
+
};
|
|
41
|
+
function useSalesChannelsSettings() {
|
|
42
|
+
const { isSettingEnabled } = useSettingsContext();
|
|
43
|
+
return useMemo(() => {
|
|
44
|
+
const settings = [];
|
|
45
|
+
if (isSettingEnabled(SettingNames.RequirePciSignEcommerce)) {
|
|
46
|
+
settings.push("eCommerce");
|
|
47
|
+
}
|
|
48
|
+
if (isSettingEnabled(SettingNames.RequirePciSignPos)) {
|
|
49
|
+
settings.push("pos");
|
|
50
|
+
}
|
|
51
|
+
if (isSettingEnabled(SettingNames.RequirePciSignEcomMoto)) {
|
|
52
|
+
settings.push("ecomMoto");
|
|
53
|
+
}
|
|
54
|
+
if (isSettingEnabled(SettingNames.RequirePciSignPosMoto)) {
|
|
55
|
+
settings.push("posMoto");
|
|
56
|
+
}
|
|
57
|
+
return settings;
|
|
58
|
+
}, [isSettingEnabled]);
|
|
59
|
+
}
|
|
25
60
|
const getTaskTypes = async (id, baseUrl) => {
|
|
26
61
|
return httpGet({
|
|
27
62
|
baseUrl,
|
|
@@ -60,7 +95,7 @@ const useAssociatedLegalRepresentative = (legalEntity) => {
|
|
|
60
95
|
return getLegalRepresentative(legalEntity);
|
|
61
96
|
}, [legalEntity]);
|
|
62
97
|
const { data } = useLegalEntity(
|
|
63
|
-
doesLegalEntityRequiresLegalRepresentative(legalEntity) &&
|
|
98
|
+
doesLegalEntityRequiresLegalRepresentative(legalEntity) && matchingAssociation?.legalEntityId ? matchingAssociation.legalEntityId : skipToken
|
|
64
99
|
);
|
|
65
100
|
return data;
|
|
66
101
|
};
|
|
@@ -72,21 +107,75 @@ const useCanSeeEntitySelection = (legalEntityId) => {
|
|
|
72
107
|
setCanSeeEntitySelection: setCanSeeEntitySelectionIntoLocalStorage
|
|
73
108
|
};
|
|
74
109
|
};
|
|
110
|
+
const providerButton = "adyen-kyc-provider-button";
|
|
111
|
+
const providerButtonDisplayName = "adyen-kyc-provider-button-display-name";
|
|
112
|
+
const styles$5 = {
|
|
113
|
+
providerButton,
|
|
114
|
+
providerButtonDisplayName
|
|
115
|
+
};
|
|
116
|
+
const ProviderButton = ({
|
|
117
|
+
provider,
|
|
118
|
+
disabled = false,
|
|
119
|
+
fullWidth,
|
|
120
|
+
loading = false,
|
|
121
|
+
onClick,
|
|
122
|
+
testId
|
|
123
|
+
}) => {
|
|
124
|
+
const isSingpass = provider.includes("singpassMyInfo");
|
|
125
|
+
const buttonVariant = isSingpass ? "secondary" : "primary";
|
|
126
|
+
const { t } = useTranslation();
|
|
127
|
+
const buttonProps = {
|
|
128
|
+
disabled,
|
|
129
|
+
fullWidth,
|
|
130
|
+
loading,
|
|
131
|
+
onClick,
|
|
132
|
+
testId
|
|
133
|
+
};
|
|
134
|
+
const providerLogo = {
|
|
135
|
+
tink: "tink-logo",
|
|
136
|
+
yapily: "yapily-logo",
|
|
137
|
+
plaid: "plaid-logo",
|
|
138
|
+
onfido: "onfido-logo",
|
|
139
|
+
singpassMyInfo: "singpass-logo",
|
|
140
|
+
singpassMyInfoBusiness: "singpass-logo"
|
|
141
|
+
};
|
|
142
|
+
const providerDisplayName = {
|
|
143
|
+
tink: "Tink",
|
|
144
|
+
yapily: "Yapily",
|
|
145
|
+
plaid: "Plaid",
|
|
146
|
+
onfido: "Onfido",
|
|
147
|
+
singpassMyInfo: "Singpass",
|
|
148
|
+
singpassMyInfoBusiness: "Singpass"
|
|
149
|
+
};
|
|
150
|
+
const buttonLabel = {
|
|
151
|
+
tink: t(($) => $["addAccountWith"]),
|
|
152
|
+
yapily: t(($) => $["addAccountWith"]),
|
|
153
|
+
plaid: t(($) => $["addAccountWith"]),
|
|
154
|
+
onfido: t(($) => $["addDetailsWith"]),
|
|
155
|
+
singpassMyInfo: t(($) => $["retrieveMyinfoWith"]),
|
|
156
|
+
singpassMyInfoBusiness: t(($) => $["retrieveMyinfoBusinessWith"])
|
|
157
|
+
};
|
|
158
|
+
return /* @__PURE__ */ jsx(Button, { ...buttonProps, variant: buttonVariant, children: /* @__PURE__ */ jsxs("div", { className: styles$5.providerButton, children: [
|
|
159
|
+
buttonLabel[provider],
|
|
160
|
+
/* @__PURE__ */ jsx("span", { className: styles$5.providerButtonDisplayName, children: providerDisplayName[provider] }),
|
|
161
|
+
/* @__PURE__ */ jsx(Svg, { name: providerLogo[provider], type: "image" })
|
|
162
|
+
] }) });
|
|
163
|
+
};
|
|
75
164
|
const legalEntityTypeToSubtitleTranslationKey = {
|
|
76
|
-
[
|
|
77
|
-
[
|
|
165
|
+
[LegalEntityTypes.INDIVIDUAL]: "myInfoYouCanGetVerifiedDetails",
|
|
166
|
+
[LegalEntityTypes.ORGANIZATION]: "myInfoBusinessYouCanGetVerifiedDetails"
|
|
78
167
|
};
|
|
79
168
|
const legalEntityTypeToProviderButtonKey = {
|
|
80
|
-
[
|
|
81
|
-
[
|
|
169
|
+
[LegalEntityTypes.INDIVIDUAL]: "singpassMyInfo",
|
|
170
|
+
[LegalEntityTypes.ORGANIZATION]: "singpassMyInfoBusiness"
|
|
82
171
|
};
|
|
83
172
|
const successAlertTitleText = {
|
|
84
|
-
[
|
|
85
|
-
[
|
|
173
|
+
[LegalEntityTypes.INDIVIDUAL]: "myinfoDetailsRetrieved",
|
|
174
|
+
[LegalEntityTypes.ORGANIZATION]: "myinfoBusinessDetailsRetrieved"
|
|
86
175
|
};
|
|
87
176
|
const successAlertContentText = {
|
|
88
|
-
[
|
|
89
|
-
[
|
|
177
|
+
[LegalEntityTypes.INDIVIDUAL]: "yourDetailsArePreFilledInTheRelevantSections",
|
|
178
|
+
[LegalEntityTypes.ORGANIZATION]: "yourBusinesssDetailsArePreFilledInTheRelevantSections"
|
|
90
179
|
};
|
|
91
180
|
const SingpassBanner = ({
|
|
92
181
|
isLoading,
|
|
@@ -97,6 +186,7 @@ const SingpassBanner = ({
|
|
|
97
186
|
onMessage,
|
|
98
187
|
legalEntityType
|
|
99
188
|
}) => {
|
|
189
|
+
const { t } = useTranslation();
|
|
100
190
|
const { baseUrl } = useApiContext();
|
|
101
191
|
const singpassEventListener = useCallback(
|
|
102
192
|
(event) => {
|
|
@@ -114,7 +204,6 @@ const SingpassBanner = ({
|
|
|
114
204
|
channel.onmessage = onMessage;
|
|
115
205
|
return () => channel.close();
|
|
116
206
|
}, [channel, onMessage]);
|
|
117
|
-
const { i18n } = useI18nContext();
|
|
118
207
|
if (isLoading) {
|
|
119
208
|
return /* @__PURE__ */ jsx(Skeleton, {});
|
|
120
209
|
}
|
|
@@ -125,18 +214,26 @@ const SingpassBanner = ({
|
|
|
125
214
|
Alert,
|
|
126
215
|
{
|
|
127
216
|
variant: "success",
|
|
128
|
-
title: successTitleText &&
|
|
217
|
+
title: successTitleText && t(($) => $[successTitleText]),
|
|
129
218
|
onClose: onAlertClose,
|
|
130
|
-
children: successContentText &&
|
|
219
|
+
children: successContentText && t(($) => $[successContentText])
|
|
131
220
|
}
|
|
132
221
|
);
|
|
133
222
|
}
|
|
134
223
|
const providerName = legalEntityTypeToProviderButtonKey[legalEntityType];
|
|
135
224
|
if (errorMessage) {
|
|
136
|
-
return /* @__PURE__ */ jsx(
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
225
|
+
return /* @__PURE__ */ jsx(
|
|
226
|
+
Alert,
|
|
227
|
+
{
|
|
228
|
+
variant: "warning",
|
|
229
|
+
title: translateStringOrObject(t, errorMessage),
|
|
230
|
+
onClose: onAlertClose,
|
|
231
|
+
children: /* @__PURE__ */ jsxs(Typography, { variant: "body", children: [
|
|
232
|
+
t(($) => $["tryAgainOrContinueEnteringTheDetailsYourself"]),
|
|
233
|
+
providerName && /* @__PURE__ */ jsx(ProviderButton, { provider: providerName, onClick, fullWidth: true })
|
|
234
|
+
] })
|
|
235
|
+
}
|
|
236
|
+
);
|
|
140
237
|
}
|
|
141
238
|
const subtitleTranslationKey = legalEntityTypeToSubtitleTranslationKey[legalEntityType];
|
|
142
239
|
return /* @__PURE__ */ jsxs(
|
|
@@ -144,9 +241,9 @@ const SingpassBanner = ({
|
|
|
144
241
|
{
|
|
145
242
|
className: cx("adyen-task-list-singpass-banner"),
|
|
146
243
|
icon: false,
|
|
147
|
-
title:
|
|
244
|
+
title: t(($) => $["getSetUpInstantly"]),
|
|
148
245
|
children: [
|
|
149
|
-
subtitleTranslationKey && /* @__PURE__ */ jsx("div", { className: cx("adyen-task-list-singpass-banner__subtitle"), children:
|
|
246
|
+
subtitleTranslationKey && /* @__PURE__ */ jsx("div", { className: cx("adyen-task-list-singpass-banner__subtitle"), children: t(($) => $[subtitleTranslationKey]) }),
|
|
150
247
|
providerName && /* @__PURE__ */ jsx(ProviderButton, { provider: providerName, onClick, fullWidth: true })
|
|
151
248
|
]
|
|
152
249
|
}
|
|
@@ -193,11 +290,11 @@ const useLegalEntityType = ({
|
|
|
193
290
|
const isSoleProprietor = hasSolePropInLegalEntity(legalEntity);
|
|
194
291
|
const hasLegalAssociation = isTrust || isSoleProprietor;
|
|
195
292
|
switch (legalEntity.type) {
|
|
196
|
-
case
|
|
197
|
-
case
|
|
293
|
+
case LegalEntityTypes.INDIVIDUAL:
|
|
294
|
+
case LegalEntityTypes.ORGANIZATION:
|
|
198
295
|
if (!hasLegalAssociation) return legalEntity.type;
|
|
199
|
-
if (isSoleProprietor) return
|
|
200
|
-
if (isTrust) return
|
|
296
|
+
if (isSoleProprietor) return LegalEntityTypes.SOLE_PROPRIETORSHIP;
|
|
297
|
+
if (isTrust) return LegalEntityTypes.TRUST;
|
|
201
298
|
break;
|
|
202
299
|
default:
|
|
203
300
|
return void 0;
|
|
@@ -207,13 +304,13 @@ const useCanSeeIntroduction = ({ legalEntity }) => {
|
|
|
207
304
|
const legalEntityType = useLegalEntityType({ legalEntity });
|
|
208
305
|
const { isSettingEnabled } = useSettingsContext();
|
|
209
306
|
switch (legalEntityType) {
|
|
210
|
-
case
|
|
307
|
+
case LegalEntityTypes.INDIVIDUAL:
|
|
211
308
|
return !isSettingEnabled(SettingNames.HideOnboardingIntroductionIndividual);
|
|
212
|
-
case
|
|
309
|
+
case LegalEntityTypes.ORGANIZATION:
|
|
213
310
|
return !isSettingEnabled(SettingNames.HideOnboardingIntroductionOrganization);
|
|
214
|
-
case
|
|
311
|
+
case LegalEntityTypes.SOLE_PROPRIETORSHIP:
|
|
215
312
|
return !isSettingEnabled(SettingNames.HideOnboardingIntroductionSoleProprietor);
|
|
216
|
-
case
|
|
313
|
+
case LegalEntityTypes.TRUST:
|
|
217
314
|
return !isSettingEnabled(SettingNames.HideOnboardingIntroductionTrust);
|
|
218
315
|
default:
|
|
219
316
|
return false;
|
|
@@ -234,33 +331,33 @@ const capabilitiesToPreventTypeChange = [
|
|
|
234
331
|
"receiveGrants"
|
|
235
332
|
];
|
|
236
333
|
const entityTypeToCorrespondingAccountHolderOption = {
|
|
237
|
-
[
|
|
238
|
-
[
|
|
239
|
-
[
|
|
240
|
-
[
|
|
241
|
-
[
|
|
334
|
+
[LegalEntityTypes.INDIVIDUAL]: "myName",
|
|
335
|
+
[LegalEntityTypes.ORGANIZATION]: "theCompanyIWorkFor",
|
|
336
|
+
[LegalEntityTypes.SOLE_PROPRIETORSHIP]: "mySoleProprietorName",
|
|
337
|
+
[LegalEntityTypes.TRUST]: "aTrust",
|
|
338
|
+
[LegalEntityTypes.UNINCORPORATED_PARTNERSHIP]: "anUnincorporatedPartnership"
|
|
242
339
|
};
|
|
243
340
|
const getDefaultAccountHolderType = (legalEntityResponse, isTypeChanging = false, accountHolder) => {
|
|
244
341
|
if (accountHolder) {
|
|
245
342
|
return accountHolder;
|
|
246
343
|
}
|
|
247
|
-
if (!
|
|
344
|
+
if (!legalEntityResponse?.type) return void 0;
|
|
248
345
|
if (hasOwnEntityAssociationOfType(
|
|
249
|
-
|
|
346
|
+
LegalEntityTypes.SOLE_PROPRIETORSHIP,
|
|
250
347
|
legalEntityResponse.entityAssociations,
|
|
251
348
|
legalEntityResponse.id
|
|
252
349
|
)) {
|
|
253
350
|
return "mySoleProprietorName";
|
|
254
351
|
}
|
|
255
352
|
if (hasOwnEntityAssociationOfType(
|
|
256
|
-
|
|
353
|
+
LegalEntityTypes.TRUST,
|
|
257
354
|
legalEntityResponse.entityAssociations,
|
|
258
355
|
legalEntityResponse.id
|
|
259
356
|
)) {
|
|
260
357
|
return "aTrust";
|
|
261
358
|
}
|
|
262
359
|
if (hasOwnEntityAssociationOfType(
|
|
263
|
-
|
|
360
|
+
LegalEntityTypes.UNINCORPORATED_PARTNERSHIP,
|
|
264
361
|
legalEntityResponse.entityAssociations,
|
|
265
362
|
legalEntityResponse.id
|
|
266
363
|
)) {
|
|
@@ -270,72 +367,74 @@ const getDefaultAccountHolderType = (legalEntityResponse, isTypeChanging = false
|
|
|
270
367
|
return entityTypeToCorrespondingAccountHolderOption[legalEntityResponse.type];
|
|
271
368
|
}
|
|
272
369
|
};
|
|
273
|
-
const allowIndividualWithoutSoleProp = (capabilities) => !
|
|
370
|
+
const allowIndividualWithoutSoleProp = (capabilities) => !capabilities?.map((c) => c.replace("Commercial", "").replace("Consumer", "")).some((c) => capabilitiesToPreventTypeChange.includes(c));
|
|
371
|
+
const BusinessTypes = {
|
|
372
|
+
INDIVIDUAL: "individual",
|
|
373
|
+
COMPANY: "company",
|
|
374
|
+
INCORPORATED_PARTNERSHIP: "partnershipIncorporated",
|
|
375
|
+
UNINCORPORATED_PARTNERSHIP: "partnershipUnincorporated",
|
|
376
|
+
INDIVIDUAL_TRUSTEE: "individualTrustee",
|
|
377
|
+
COMPANY_TRUSTEE: "companyTrustee",
|
|
378
|
+
SOLE_PROPRIETORSHIP: "soleProprietorship",
|
|
379
|
+
INCORPORATE_ASSOCIATION: "associationIncorporated"
|
|
380
|
+
};
|
|
274
381
|
const businessTypeMapping = {
|
|
275
382
|
myName: {
|
|
276
|
-
[
|
|
277
|
-
/* INDIVIDUAL */
|
|
383
|
+
[LegalEntityTypes.INDIVIDUAL]: BusinessTypes.INDIVIDUAL
|
|
278
384
|
},
|
|
279
385
|
theCompanyIWorkFor: {
|
|
280
|
-
[
|
|
281
|
-
/* COMPANY */
|
|
386
|
+
[LegalEntityTypes.ORGANIZATION]: BusinessTypes.COMPANY
|
|
282
387
|
},
|
|
283
388
|
mySoleProprietorName: {
|
|
284
|
-
[
|
|
285
|
-
/* SOLE_PROPRIETORSHIP */
|
|
389
|
+
[LegalEntityTypes.INDIVIDUAL]: BusinessTypes.SOLE_PROPRIETORSHIP
|
|
286
390
|
},
|
|
287
391
|
aTrust: {
|
|
288
|
-
[
|
|
289
|
-
[
|
|
290
|
-
/* COMPANY_TRUSTEE */
|
|
392
|
+
[LegalEntityTypes.INDIVIDUAL]: BusinessTypes.INDIVIDUAL_TRUSTEE,
|
|
393
|
+
[LegalEntityTypes.ORGANIZATION]: BusinessTypes.COMPANY_TRUSTEE
|
|
291
394
|
},
|
|
292
395
|
anUnincorporatedPartnership: {
|
|
293
|
-
[
|
|
294
|
-
[
|
|
295
|
-
/* UNINCORPORATED_PARTNERSHIP */
|
|
396
|
+
[LegalEntityTypes.INDIVIDUAL]: BusinessTypes.UNINCORPORATED_PARTNERSHIP,
|
|
397
|
+
[LegalEntityTypes.ORGANIZATION]: BusinessTypes.UNINCORPORATED_PARTNERSHIP
|
|
296
398
|
}
|
|
297
399
|
};
|
|
298
400
|
const companyTypesMapping = {
|
|
299
|
-
[
|
|
300
|
-
[
|
|
301
|
-
[
|
|
302
|
-
[
|
|
303
|
-
[
|
|
304
|
-
[
|
|
305
|
-
[
|
|
306
|
-
[
|
|
307
|
-
/* SOLE_PROPRIETORSHIP */
|
|
401
|
+
[CompanyTypesValues.INCORPORATED_PARTNERSHIP]: BusinessTypes.INCORPORATED_PARTNERSHIP,
|
|
402
|
+
[CompanyTypesValues.INCORPORATED_ASSOCIATION]: BusinessTypes.INCORPORATE_ASSOCIATION,
|
|
403
|
+
[CompanyTypesValues.PUBLIC_COMPANY]: BusinessTypes.COMPANY,
|
|
404
|
+
[CompanyTypesValues.PRIVATE_COMPANY]: BusinessTypes.COMPANY,
|
|
405
|
+
[CompanyTypesValues.UNLISTED_PUBLIC_COMPANY]: BusinessTypes.COMPANY,
|
|
406
|
+
[CompanyTypesValues.GOVERNMENTAL_ORGANIZATION]: BusinessTypes.COMPANY,
|
|
407
|
+
[CompanyTypesValues.NON_PROFIT_OR_CHARITABLE]: BusinessTypes.COMPANY,
|
|
408
|
+
[CompanyTypesValues.SOLE_PROPRIETORSHIP]: BusinessTypes.SOLE_PROPRIETORSHIP
|
|
308
409
|
};
|
|
309
410
|
const useBusinessSetup = (legalEntityResponse) => {
|
|
310
|
-
var _a, _b;
|
|
311
411
|
const { accountHolder } = useAccountHolder();
|
|
312
412
|
const accountHolderType = accountHolder || getDefaultAccountHolderType(legalEntityResponse);
|
|
313
|
-
const organizationType =
|
|
314
|
-
const businessSetup = accountHolderType === "theCompanyIWorkFor" && organizationType ? companyTypesMapping[organizationType] :
|
|
413
|
+
const organizationType = legalEntityResponse?.organization?.type;
|
|
414
|
+
const businessSetup = accountHolderType === "theCompanyIWorkFor" && organizationType ? companyTypesMapping[organizationType] : businessTypeMapping[accountHolderType]?.[legalEntityResponse?.type];
|
|
315
415
|
return businessSetup;
|
|
316
416
|
};
|
|
317
417
|
function useDataMissingRemediations({
|
|
318
418
|
legalEntityId,
|
|
319
419
|
problems
|
|
320
420
|
}) {
|
|
321
|
-
const {
|
|
421
|
+
const { t } = useTranslation();
|
|
322
422
|
const decisionMakersRemediationMessage = useMemo(() => {
|
|
323
|
-
|
|
324
|
-
const remediationCodes = (_c = (_b = (_a = problems[EntityType.LEGAL_ENTITY]) == null ? void 0 : _a[legalEntityId]) == null ? void 0 : _b.missingData) == null ? void 0 : _c.reduce((remediations, error) => {
|
|
423
|
+
const remediationCodes = problems[EntityTypes.LEGAL_ENTITY]?.[legalEntityId]?.missingData?.reduce((remediations, error) => {
|
|
325
424
|
const remediation = DATA_MISSING_DECISION_MAKER_ERROR_CODE_MAPPING[error.code];
|
|
326
425
|
return remediation ? [...remediations, remediation] : remediations;
|
|
327
426
|
}, []);
|
|
328
427
|
const uniqueRemediations = [...new Set(remediationCodes)];
|
|
329
|
-
switch (uniqueRemediations
|
|
428
|
+
switch (uniqueRemediations?.length) {
|
|
330
429
|
case void 0:
|
|
331
430
|
case 0:
|
|
332
431
|
return void 0;
|
|
333
432
|
case 1:
|
|
334
|
-
return uniqueRemediations[0] ?
|
|
433
|
+
return uniqueRemediations[0] ? t(($) => $[`remediationMessage_${uniqueRemediations[0]}`]) : t(($) => $["missingMultipleDecisionMakers"]);
|
|
335
434
|
default:
|
|
336
|
-
return
|
|
435
|
+
return t(($) => $["missingMultipleDecisionMakers"]);
|
|
337
436
|
}
|
|
338
|
-
}, [problems,
|
|
437
|
+
}, [problems, t, legalEntityId]);
|
|
339
438
|
return {
|
|
340
439
|
remediationMessages: {
|
|
341
440
|
[TaskTypes.DECISION_MAKER]: decisionMakersRemediationMessage
|
|
@@ -344,12 +443,11 @@ function useDataMissingRemediations({
|
|
|
344
443
|
}
|
|
345
444
|
const logger$2 = createLogger();
|
|
346
445
|
const normalizeTaskStatuses = (taskStatuses) => {
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
const status = TaskStatus[currentTask.status];
|
|
446
|
+
return taskStatuses?.statuses?.reduce((acc, currentTask) => {
|
|
447
|
+
const status = TaskStatuses[currentTask.status];
|
|
350
448
|
const statusEntries = currentTask.taskStatusEntries;
|
|
351
449
|
acc[currentTask.type] = {
|
|
352
|
-
status: status ??
|
|
450
|
+
status: status ?? TaskStatuses.DETAILS_REQUIRED,
|
|
353
451
|
taskStatusEntries: statusEntries
|
|
354
452
|
};
|
|
355
453
|
return acc;
|
|
@@ -358,13 +456,13 @@ const normalizeTaskStatuses = (taskStatuses) => {
|
|
|
358
456
|
const TASK_STATUS_POLLING_INTERVAL_MS = 3e3;
|
|
359
457
|
const TASK_STATUS_COMPLETED_POLLING_INTERVAL_MS = 6e3;
|
|
360
458
|
const getAccountTaskStatus = (accountId, payinPayoutTaskStatus) => {
|
|
361
|
-
const taskStatusEntries = payinPayoutTaskStatus
|
|
362
|
-
const taskStatusEntry = taskStatusEntries
|
|
459
|
+
const taskStatusEntries = payinPayoutTaskStatus?.taskStatusEntries;
|
|
460
|
+
const taskStatusEntry = taskStatusEntries?.find((entry) => entry.id.includes(accountId));
|
|
363
461
|
if (!taskStatusEntry) {
|
|
364
462
|
logger$2.warn(`No task status for this account: ${accountId}`);
|
|
365
|
-
return
|
|
463
|
+
return payinPayoutTaskStatus?.status ?? TaskStatuses.PROCESSING;
|
|
366
464
|
}
|
|
367
|
-
return
|
|
465
|
+
return TaskStatuses[taskStatusEntry.status];
|
|
368
466
|
};
|
|
369
467
|
const normalizedTaskStatusStore = signal(void 0);
|
|
370
468
|
const setNormalizedTaskStatusStore = (taskStatus) => {
|
|
@@ -377,7 +475,7 @@ const Remove = ({
|
|
|
377
475
|
handleIsRemoveDisabled,
|
|
378
476
|
label
|
|
379
477
|
}) => {
|
|
380
|
-
const {
|
|
478
|
+
const { t } = useTranslation();
|
|
381
479
|
const [undoTimer, setUndoTimer] = useState(5);
|
|
382
480
|
const [isRemoving, setIsRemoving] = useState(false);
|
|
383
481
|
useEffect(() => {
|
|
@@ -396,13 +494,13 @@ const Remove = ({
|
|
|
396
494
|
event.preventDefault();
|
|
397
495
|
if (!isRemoving) {
|
|
398
496
|
setIsRemoving(true);
|
|
399
|
-
onRemoveStatusChange
|
|
400
|
-
handleIsRemoveDisabled
|
|
497
|
+
onRemoveStatusChange?.(true);
|
|
498
|
+
handleIsRemoveDisabled?.(true);
|
|
401
499
|
} else {
|
|
402
500
|
setUndoTimer(5);
|
|
403
501
|
setIsRemoving(false);
|
|
404
|
-
onRemoveStatusChange
|
|
405
|
-
handleIsRemoveDisabled
|
|
502
|
+
onRemoveStatusChange?.(false);
|
|
503
|
+
handleIsRemoveDisabled?.(false);
|
|
406
504
|
}
|
|
407
505
|
};
|
|
408
506
|
useEffect(() => {
|
|
@@ -410,15 +508,15 @@ const Remove = ({
|
|
|
410
508
|
(async () => {
|
|
411
509
|
setIsRemoving(false);
|
|
412
510
|
await onRemove();
|
|
413
|
-
onRemoveStatusChange
|
|
414
|
-
handleIsRemoveDisabled
|
|
511
|
+
onRemoveStatusChange?.(false);
|
|
512
|
+
handleIsRemoveDisabled?.(false);
|
|
415
513
|
})();
|
|
416
514
|
}
|
|
417
515
|
}, [undoTimer, isRemoving, onRemoveStatusChange, handleIsRemoveDisabled, onRemove]);
|
|
418
|
-
return isRemoving ? /* @__PURE__ */ jsx(Button, { variant: "tertiary", onClick: onClickHandler, children:
|
|
516
|
+
return isRemoving ? /* @__PURE__ */ jsx(Button, { variant: "tertiary", onClick: onClickHandler, children: t(($) => $["undoWithTimer"], { secondsLeft: undoTimer }) }) : /* @__PURE__ */ jsx(
|
|
419
517
|
IconButton,
|
|
420
518
|
{
|
|
421
|
-
ariaLabel:
|
|
519
|
+
ariaLabel: label && t(($) => $[label]),
|
|
422
520
|
icon: "bin",
|
|
423
521
|
variant: "tertiary",
|
|
424
522
|
onClick: onClickHandler,
|
|
@@ -444,11 +542,12 @@ const TaskListItem = ({
|
|
|
444
542
|
isRemoveDisabled = false,
|
|
445
543
|
handleIsRemoveDisabled,
|
|
446
544
|
testId,
|
|
447
|
-
enableTracking = true
|
|
545
|
+
enableTracking = true,
|
|
546
|
+
fallbackErrorMessage
|
|
448
547
|
}) => {
|
|
449
|
-
const {
|
|
548
|
+
const { t } = useTranslation();
|
|
450
549
|
const userEvents = useAnalyticsContext();
|
|
451
|
-
const shouldShowErrorAlert = showErrorAlerts === "always" || showErrorAlerts === "onErrorStatus" && status ===
|
|
550
|
+
const shouldShowErrorAlert = showErrorAlerts === "always" || showErrorAlerts === "onErrorStatus" && status === TaskStatuses.ERROR;
|
|
452
551
|
const [isStatusRemoving, setIsStatusRemoving] = useState(false);
|
|
453
552
|
const handleNavigateToTask = () => {
|
|
454
553
|
if (enableTracking) {
|
|
@@ -458,7 +557,7 @@ const TaskListItem = ({
|
|
|
458
557
|
label: titleKey
|
|
459
558
|
});
|
|
460
559
|
}
|
|
461
|
-
onNavigateToTask
|
|
560
|
+
onNavigateToTask?.();
|
|
462
561
|
};
|
|
463
562
|
const avatarVariant = disabled ? "disabled" : "primary";
|
|
464
563
|
return /* @__PURE__ */ jsx(
|
|
@@ -481,7 +580,7 @@ const TaskListItem = ({
|
|
|
481
580
|
/* @__PURE__ */ jsxs("div", { className: "adyen-task-item__header", children: [
|
|
482
581
|
/* @__PURE__ */ jsxs("div", { className: "adyen-task-item__heading", children: [
|
|
483
582
|
/* @__PURE__ */ jsx(Avatar, { variant: avatarVariant, iconName: icon }),
|
|
484
|
-
/* @__PURE__ */ jsx("div", { className: "adyen-task-item__body", children: /* @__PURE__ */ jsx("span", { className: "adyen-task-item__title", children: title ||
|
|
583
|
+
/* @__PURE__ */ jsx("div", { className: "adyen-task-item__body", children: /* @__PURE__ */ jsx("span", { className: "adyen-task-item__title", children: title || t(($) => $[titleKey]) }) })
|
|
485
584
|
] }),
|
|
486
585
|
info && /* @__PURE__ */ jsxs("div", { className: "adyen-task-item__info", children: [
|
|
487
586
|
/* @__PURE__ */ jsx(Icon, { name: "info-circle" }),
|
|
@@ -492,7 +591,7 @@ const TaskListItem = ({
|
|
|
492
591
|
/* @__PURE__ */ jsx(
|
|
493
592
|
TaskItemStatus,
|
|
494
593
|
{
|
|
495
|
-
status: isStatusRemoving ?
|
|
594
|
+
status: isStatusRemoving ? TaskStatuses.REMOVING : status,
|
|
496
595
|
statusLabel,
|
|
497
596
|
downloadHandler
|
|
498
597
|
}
|
|
@@ -508,7 +607,14 @@ const TaskListItem = ({
|
|
|
508
607
|
) }) : /* @__PURE__ */ jsx(Icon, { name: "chevron-right" })
|
|
509
608
|
] })
|
|
510
609
|
] }),
|
|
511
|
-
shouldShowErrorAlert && /* @__PURE__ */ jsx(
|
|
610
|
+
shouldShowErrorAlert && /* @__PURE__ */ jsx(
|
|
611
|
+
VerificationErrorAlert,
|
|
612
|
+
{
|
|
613
|
+
className: "adyen-task-item-alert",
|
|
614
|
+
problems,
|
|
615
|
+
fallbackErrorMessage
|
|
616
|
+
}
|
|
617
|
+
)
|
|
512
618
|
]
|
|
513
619
|
}
|
|
514
620
|
)
|
|
@@ -521,8 +627,7 @@ const PayoutAccountTaskListItem = ({
|
|
|
521
627
|
onNavigateToTask,
|
|
522
628
|
payinPayoutTaskStatus
|
|
523
629
|
}) => {
|
|
524
|
-
|
|
525
|
-
const { i18n } = useI18nContext();
|
|
630
|
+
const { t } = useTranslation();
|
|
526
631
|
const { showToast } = useToastContext();
|
|
527
632
|
const { isExperimentEnabled } = useExperimentsContext();
|
|
528
633
|
const { mutateAsync: deleteTransferInstrument } = useDeleteTransferInstrument();
|
|
@@ -535,21 +640,22 @@ const PayoutAccountTaskListItem = ({
|
|
|
535
640
|
const handleDeleteTransferInstrument = async () => {
|
|
536
641
|
try {
|
|
537
642
|
await deleteTransferInstrument(account.id);
|
|
538
|
-
showToast({ label:
|
|
643
|
+
showToast({ label: t(($) => $["transferInstrumentDeleted"]), variant: "success" });
|
|
539
644
|
} catch {
|
|
540
|
-
showToast({ label:
|
|
645
|
+
showToast({ label: t(($) => $["failedToDeletePayoutAccount"]), variant: "error" });
|
|
541
646
|
}
|
|
542
647
|
};
|
|
543
648
|
return /* @__PURE__ */ jsx(
|
|
544
649
|
TaskListItem,
|
|
545
650
|
{
|
|
546
|
-
disabled: isInstantVerificationAccount && status ===
|
|
651
|
+
disabled: isInstantVerificationAccount && status === TaskStatuses.PROCESSING,
|
|
547
652
|
onNavigateToTask: isInstantVerificationAccount ? void 0 : onNavigateToTask,
|
|
548
653
|
icon: "payout",
|
|
549
654
|
titleKey: "accountNumber",
|
|
550
655
|
title: obscuredAccountNumber,
|
|
551
656
|
status,
|
|
552
|
-
problems:
|
|
657
|
+
problems: capabilityProblems?.BankAccount?.[account.id],
|
|
658
|
+
fallbackErrorMessage: isInstantVerificationAccount ? t(($) => $["verificationErrorMessageTrustedTransferInstrument"]) : void 0,
|
|
553
659
|
loading: isDeletingTransferInstrument,
|
|
554
660
|
removeEntity: () => {
|
|
555
661
|
setIsDeletingTransferInstrument(true);
|
|
@@ -592,9 +698,8 @@ function TaskListInner({
|
|
|
592
698
|
capabilityProblems,
|
|
593
699
|
singpassComponent
|
|
594
700
|
}) {
|
|
595
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o;
|
|
596
|
-
const { i18n } = useI18nContext();
|
|
597
701
|
const userEvents = useAnalyticsContext();
|
|
702
|
+
const { t } = useTranslation();
|
|
598
703
|
const { showToast } = useToastContext();
|
|
599
704
|
const { rootLegalEntityId, baseUrl } = useApiContext();
|
|
600
705
|
const { isSettingEnabled } = useSettingsContext();
|
|
@@ -619,8 +724,8 @@ function TaskListInner({
|
|
|
619
724
|
const { data: taskStatuses } = useTaskStatus({
|
|
620
725
|
refetchInterval: (query) => {
|
|
621
726
|
const { data: response } = query.state || {};
|
|
622
|
-
const statuses = response
|
|
623
|
-
const areAllTasksFinishedOrEmpty =
|
|
727
|
+
const statuses = response?.statuses;
|
|
728
|
+
const areAllTasksFinishedOrEmpty = statuses?.length === 0 || statuses?.every((task) => task.status === "FINISHED");
|
|
624
729
|
return areAllTasksFinishedOrEmpty ? TASK_STATUS_COMPLETED_POLLING_INTERVAL_MS : TASK_STATUS_POLLING_INTERVAL_MS;
|
|
625
730
|
}
|
|
626
731
|
});
|
|
@@ -632,39 +737,39 @@ function TaskListInner({
|
|
|
632
737
|
const transferInstrumentLimit = useSetting("transferInstrumentLimit");
|
|
633
738
|
const normalizedTasks = normalizeTaskStatuses(taskStatuses);
|
|
634
739
|
setNormalizedTaskStatusStore(normalizedTasks);
|
|
635
|
-
const payinPayoutTaskStatus =
|
|
636
|
-
const businessDetailsTaskStatus = isExperimentEnabled("EnableBusinessDetailsTaskStatusService") ?
|
|
740
|
+
const payinPayoutTaskStatus = normalizedTasks?.PAYOUT ?? normalizedTasks?.PAYIN;
|
|
741
|
+
const businessDetailsTaskStatus = isExperimentEnabled("EnableBusinessDetailsTaskStatusService") ? normalizedTasks?.BUSINESS_DETAILS?.status ?? TaskStatuses.DETAILS_REQUIRED : getTaskStatus2(TaskTypes.BUSINESS_DETAILS);
|
|
637
742
|
const isReview = Boolean(
|
|
638
|
-
|
|
743
|
+
capabilityProblems?.LegalEntity?.[legalEntityResponse.id]?.isReviewRequired
|
|
639
744
|
);
|
|
640
745
|
const hasTrust = accountHolder === "aTrust" || isPartOfTrustFromLegalEntity(legalEntityResponse);
|
|
641
746
|
const hasUnincorporatedPartnership = accountHolder === "anUnincorporatedPartnership" || isPartOfUnincorporatedPartnership(legalEntityResponse);
|
|
642
747
|
const hasSoleProprietorship = accountHolder === "mySoleProprietorName" || hasSolePropInLegalEntity(legalEntityResponse);
|
|
643
748
|
const isLegalRepresentativeRequired = isExperimentEnabled("EnableAgeVerification") && doesLegalEntityRequiresLegalRepresentative(legalEntityResponse);
|
|
644
749
|
const legalRepresentative = isLegalRepresentativeRequired && getLegalRepresentative(legalEntityResponse);
|
|
645
|
-
const transferInstruments =
|
|
646
|
-
const canAddPayoutAccount =
|
|
750
|
+
const transferInstruments = legalEntityResponse?.transferInstruments || [];
|
|
751
|
+
const canAddPayoutAccount = legalEntityResponse?.organization?.legalName || legalEntityResponse?.individual?.name;
|
|
647
752
|
const hasPayinTaskNotPayout = tasks.includes(TaskTypes.PAYIN) && !tasks.includes(TaskTypes.PAYOUT);
|
|
648
753
|
const payoutTaskDescriptionKey = isReview ? "payoutAccountsDescriptionReview" : "payoutAccountsDescription";
|
|
649
|
-
const pciHasDocuments = !!
|
|
754
|
+
const pciHasDocuments = !!pciQuestionnaireList?.data?.length;
|
|
650
755
|
const canSignPci = (
|
|
651
756
|
// PCI requires decision makers to be added
|
|
652
|
-
legalEntityResponse.type ===
|
|
757
|
+
legalEntityResponse.type === LegalEntityTypes.ORGANIZATION && !!legalEntityResponse?.entityAssociations?.length || legalEntityResponse.type === LegalEntityTypes.INDIVIDUAL && !!legalEntityResponse?.entityAssociations?.length
|
|
653
758
|
);
|
|
654
|
-
const canDownloadPci = !
|
|
655
|
-
const hasSignedPci = !
|
|
656
|
-
const serviceAgreementTypes =
|
|
657
|
-
const serviceAgreementAcceptanceInfos =
|
|
658
|
-
const hasServiceAgreementSigners = legalEntityResponse.type ===
|
|
759
|
+
const canDownloadPci = !pciStatus?.signingRequired && pciHasDocuments;
|
|
760
|
+
const hasSignedPci = !pciStatus?.signingRequired && canSignPci;
|
|
761
|
+
const serviceAgreementTypes = termsOfServiceStatus?.termsOfServiceTypes ?? [];
|
|
762
|
+
const serviceAgreementAcceptanceInfos = termsOfServiceStatusAcceptanceInfos?.data ?? [];
|
|
763
|
+
const hasServiceAgreementSigners = legalEntityResponse.type === LegalEntityTypes.ORGANIZATION && getOwnSignatories(legalEntityResponse).length || Boolean(legalRepresentative) || legalEntityResponse.type === LegalEntityTypes.INDIVIDUAL && !!legalEntityResponse?.individual;
|
|
659
764
|
const hasTaskOfGroupAccountDetails = tasks.some((task) => LEGAL_ENTITY_BASE_TASKS.includes(task));
|
|
660
765
|
const hasContractTasks = tasks.some((task) => CONTRACT_TASKS.includes(task));
|
|
661
766
|
const hasFinancingTasks = tasks.includes(TaskTypes.BUSINESS_FINANCING) || tasks.includes(TaskTypes.SOURCE_OF_FUNDS);
|
|
662
767
|
const showServiceAgreementTask = tasks.includes(TaskTypes.SERVICE_AGREEMENT) && (serviceAgreementTypes.length > 0 || serviceAgreementAcceptanceInfos.length > 0);
|
|
663
|
-
const showPciTask = tasks.includes(TaskTypes.PCI_DSS) && (canDownloadPci ||
|
|
768
|
+
const showPciTask = tasks.includes(TaskTypes.PCI_DSS) && (canDownloadPci || pciStatus?.signingRequired) && !hidePciTaskExperiment;
|
|
664
769
|
const showContractTasks = hasContractTasks && (showPciTask || showServiceAgreementTask);
|
|
665
770
|
const shouldSignPciFirst = showServiceAgreementTask && showPciTask && !hasSignedPci;
|
|
666
771
|
const areServiceAgreementTasksDisabled = EnableSignPCIBeforeTOS ? !hasServiceAgreementSigners || shouldSignPciFirst : !hasServiceAgreementSigners;
|
|
667
|
-
const isPciTaskDisabled = !
|
|
772
|
+
const isPciTaskDisabled = !pciStatus?.signingRequired || !canSignPci;
|
|
668
773
|
const getBusinessTaskListTitleKey = () => {
|
|
669
774
|
if (hasUnincorporatedPartnership) {
|
|
670
775
|
return "tellUsMoreAboutPrimaryPartner";
|
|
@@ -677,9 +782,8 @@ function TaskListInner({
|
|
|
677
782
|
}
|
|
678
783
|
};
|
|
679
784
|
const getEmptyBankAccountProblems = () => {
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
return transferInstrumentId ? (_c2 = capabilityProblems == null ? void 0 : capabilityProblems.BankAccount) == null ? void 0 : _c2[transferInstrumentId] : void 0;
|
|
785
|
+
const transferInstrumentId = legalEntityResponse?.transferInstruments?.[0]?.id;
|
|
786
|
+
return transferInstrumentId ? capabilityProblems?.BankAccount?.[transferInstrumentId] : void 0;
|
|
683
787
|
};
|
|
684
788
|
const onEditBusinessSetupClick = () => {
|
|
685
789
|
userEvents.addTaskEvent("Clicked button", {
|
|
@@ -703,7 +807,7 @@ function TaskListInner({
|
|
|
703
807
|
})
|
|
704
808
|
);
|
|
705
809
|
} catch {
|
|
706
|
-
showToast({ label:
|
|
810
|
+
showToast({ label: t(($) => $["failedToDownloadPci"]), variant: "error" });
|
|
707
811
|
} finally {
|
|
708
812
|
userEvents.addTaskEvent("Clicked button", {
|
|
709
813
|
task: TaskTypes.PCI_DSS,
|
|
@@ -714,6 +818,7 @@ function TaskListInner({
|
|
|
714
818
|
const handleOnNavigateToTaskReview = () => onNavigateToTask(TaskTypes.REVIEW);
|
|
715
819
|
const handleOnNavigateToTaskIndividual = () => onNavigateToTask(TaskTypes.INDIVIDUAL);
|
|
716
820
|
const handleOnNavigateToTaskBusinessDetails = () => onNavigateToTask(TaskTypes.BUSINESS_DETAILS);
|
|
821
|
+
const handleOnNavigateToTaskBusinessLines = () => onNavigateToTask(TaskTypes.BUSINESS_LINES);
|
|
717
822
|
const handleOnNavigateToTaskCustomerSupport = () => onNavigateToTask(TaskTypes.CUSTOMER_SUPPORT);
|
|
718
823
|
const handleOnNavigateToTaskDecisionMaker = () => onNavigateToTask(TaskTypes.DECISION_MAKER_OVERVIEW);
|
|
719
824
|
const handleOnNavigateToTaskTrust = () => onNavigateToTask(TaskTypes.TRUST);
|
|
@@ -739,19 +844,17 @@ function TaskListInner({
|
|
|
739
844
|
}
|
|
740
845
|
}, [showDecisionMakersWarning, userEvents]);
|
|
741
846
|
return /* @__PURE__ */ jsxs("div", { className: "adyen-task-list__container", children: [
|
|
742
|
-
canSeeIntroduction && /* @__PURE__ */ jsx("div", { className: "adyen-task-list__nav", children: /* @__PURE__ */ jsx(Button, { variant: "link", onClick: () => onNavigateToTask(TaskTypes.INTRODUCTION), children:
|
|
847
|
+
canSeeIntroduction && /* @__PURE__ */ jsx("div", { className: "adyen-task-list__nav", children: /* @__PURE__ */ jsx(Button, { variant: "link", onClick: () => onNavigateToTask(TaskTypes.INTRODUCTION), children: t(($) => $["goToIntroduction"]) }) }),
|
|
743
848
|
canChangeEntityType && /* @__PURE__ */ jsxs("header", { className: "adyen-task-list__heading", children: [
|
|
744
|
-
/* @__PURE__ */ jsx(Typography, { el: "h1", variant: "title-l", children:
|
|
849
|
+
/* @__PURE__ */ jsx(Typography, { el: "h1", variant: "title-l", children: t(($) => $["setUpYourAccount"]) }),
|
|
745
850
|
/* @__PURE__ */ jsxs(Typography, { el: "p", variant: "title", className: "adyen-task-list__description", children: [
|
|
746
|
-
/* @__PURE__ */ jsx(Typography, { el: "span", variant: "body-strongest", children:
|
|
747
|
-
|
|
748
|
-
businessSetup: businessSetup ? i18n.get(businessSetup) : i18n.get("unknown")
|
|
749
|
-
}
|
|
851
|
+
/* @__PURE__ */ jsx(Typography, { el: "span", variant: "body-strongest", children: t(($) => $["yourBusinessSetup"], {
|
|
852
|
+
businessSetup: businessSetup ? t(($) => $[businessSetup]) : t(($) => $["unknown"])
|
|
750
853
|
}) }),
|
|
751
854
|
/* @__PURE__ */ jsx(
|
|
752
855
|
IconButton,
|
|
753
856
|
{
|
|
754
|
-
ariaLabel:
|
|
857
|
+
ariaLabel: t(($) => $["editBusinessSetup"]),
|
|
755
858
|
icon: "edit",
|
|
756
859
|
variant: "tertiary",
|
|
757
860
|
onClick: onEditBusinessSetupClick
|
|
@@ -761,7 +864,7 @@ function TaskListInner({
|
|
|
761
864
|
] }),
|
|
762
865
|
singpassComponent,
|
|
763
866
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
764
|
-
hasTaskOfGroupAccountDetails && /* @__PURE__ */ jsxs(TaskListGroup, { title:
|
|
867
|
+
hasTaskOfGroupAccountDetails && /* @__PURE__ */ jsxs(TaskListGroup, { title: t(($) => $[getBusinessTaskListTitleKey()]), children: [
|
|
765
868
|
tasks.includes(TaskTypes.INDIVIDUAL) && /* @__PURE__ */ jsx(
|
|
766
869
|
TaskListItem,
|
|
767
870
|
{
|
|
@@ -769,7 +872,7 @@ function TaskListInner({
|
|
|
769
872
|
icon: "decision-maker",
|
|
770
873
|
titleKey: hasTrust ? "trusteePersonalDetails" : hasUnincorporatedPartnership ? "primaryPartnerDetails" : "personalDetails",
|
|
771
874
|
status: getTaskStatus2(TaskTypes.INDIVIDUAL),
|
|
772
|
-
problems:
|
|
875
|
+
problems: capabilityProblems?.LegalEntity?.[legalEntityResponse.id]
|
|
773
876
|
}
|
|
774
877
|
),
|
|
775
878
|
tasks.includes(TaskTypes.BUSINESS_DETAILS) && /* @__PURE__ */ jsx(
|
|
@@ -780,7 +883,7 @@ function TaskListInner({
|
|
|
780
883
|
icon: "company",
|
|
781
884
|
titleKey: hasTrust ? "businessTrusteeDetails" : hasUnincorporatedPartnership ? "primaryPartnerDetails" : "businessDetails",
|
|
782
885
|
status: businessDetailsTaskStatus,
|
|
783
|
-
problems:
|
|
886
|
+
problems: capabilityProblems?.LegalEntity?.[legalEntityResponse.id]
|
|
784
887
|
}
|
|
785
888
|
),
|
|
786
889
|
hasSoleProprietorship && /* @__PURE__ */ jsx(
|
|
@@ -809,7 +912,17 @@ function TaskListInner({
|
|
|
809
912
|
icon: "decision-maker",
|
|
810
913
|
titleKey: hasUnincorporatedPartnership ? "entityDecisionMakers" : "decisionMakers",
|
|
811
914
|
status: getTaskStatus2(TaskTypes.DECISION_MAKER_OVERVIEW),
|
|
812
|
-
warningMessage: remediationMessages[TaskTypes.DECISION_MAKER]
|
|
915
|
+
warningMessage: showDecisionMakersWarning ? remediationMessages[TaskTypes.DECISION_MAKER] : void 0
|
|
916
|
+
}
|
|
917
|
+
),
|
|
918
|
+
tasks.includes(TaskTypes.BUSINESS_LINES) && /* @__PURE__ */ jsx(
|
|
919
|
+
TaskListItem,
|
|
920
|
+
{
|
|
921
|
+
testId: TaskTypes.BUSINESS_LINES,
|
|
922
|
+
onNavigateToTask: handleOnNavigateToTaskBusinessLines,
|
|
923
|
+
icon: "solutionPayments",
|
|
924
|
+
titleKey: "businessLines",
|
|
925
|
+
status: getTaskStatus2(TaskTypes.BUSINESS_LINES)
|
|
813
926
|
}
|
|
814
927
|
),
|
|
815
928
|
showCustomerSupportV4 && tasks.includes(TaskTypes.CUSTOMER_SUPPORT) && /* @__PURE__ */ jsx(
|
|
@@ -818,11 +931,11 @@ function TaskListInner({
|
|
|
818
931
|
onNavigateToTask: handleOnNavigateToTaskCustomerSupport,
|
|
819
932
|
icon: "webinar",
|
|
820
933
|
titleKey: "customerSupport",
|
|
821
|
-
status:
|
|
934
|
+
status: normalizedTasks?.CUSTOMER_SUPPORT?.status ?? TaskStatuses.DETAILS_REQUIRED
|
|
822
935
|
}
|
|
823
936
|
)
|
|
824
937
|
] }),
|
|
825
|
-
hasTrust && /* @__PURE__ */ jsxs(TaskListGroup, { title:
|
|
938
|
+
hasTrust && /* @__PURE__ */ jsxs(TaskListGroup, { title: t(($) => $["trustDetailsDescription"]), children: [
|
|
826
939
|
/* @__PURE__ */ jsx(
|
|
827
940
|
TaskListItem,
|
|
828
941
|
{
|
|
@@ -843,7 +956,7 @@ function TaskListInner({
|
|
|
843
956
|
}
|
|
844
957
|
)
|
|
845
958
|
] }),
|
|
846
|
-
hasUnincorporatedPartnership && /* @__PURE__ */ jsxs(TaskListGroup, { title:
|
|
959
|
+
hasUnincorporatedPartnership && /* @__PURE__ */ jsxs(TaskListGroup, { title: t(($) => $["partnershipUnincorporated"]), children: [
|
|
847
960
|
/* @__PURE__ */ jsx(
|
|
848
961
|
TaskListItem,
|
|
849
962
|
{
|
|
@@ -880,7 +993,7 @@ function TaskListInner({
|
|
|
880
993
|
onNavigateToTask: handleOnNavigateToSourceOfFunds,
|
|
881
994
|
icon: "cash-stack",
|
|
882
995
|
titleKey: "fundingSources",
|
|
883
|
-
status:
|
|
996
|
+
status: normalizedTasks?.SOURCE_OF_FUNDS?.status ?? TaskStatuses.DETAILS_REQUIRED
|
|
884
997
|
}
|
|
885
998
|
),
|
|
886
999
|
tasks.includes(TaskTypes.BUSINESS_FINANCING) && /* @__PURE__ */ jsx(
|
|
@@ -889,7 +1002,7 @@ function TaskListInner({
|
|
|
889
1002
|
onNavigateToTask: handleOnNavigateToBusinessFinancing,
|
|
890
1003
|
icon: "capital",
|
|
891
1004
|
titleKey: "businessFinancing",
|
|
892
|
-
status:
|
|
1005
|
+
status: normalizedTasks?.BUSINESS_FINANCING?.status ?? TaskStatuses.DETAILS_REQUIRED
|
|
893
1006
|
}
|
|
894
1007
|
)
|
|
895
1008
|
] }),
|
|
@@ -899,14 +1012,14 @@ function TaskListInner({
|
|
|
899
1012
|
onNavigateToTask: handleOnNavigateToTaxReporting,
|
|
900
1013
|
icon: "reporting",
|
|
901
1014
|
titleKey: "taxReporting",
|
|
902
|
-
status:
|
|
1015
|
+
status: normalizedTasks?.TAX_REPORTING?.status ?? TaskStatuses.DETAILS_REQUIRED
|
|
903
1016
|
}
|
|
904
1017
|
) }),
|
|
905
1018
|
(tasks.includes(TaskTypes.PAYOUT) || tasks.includes(TaskTypes.PAYIN)) && !hidePayoutAccountTaskExperiment && /* @__PURE__ */ jsx(
|
|
906
1019
|
TaskListGroup,
|
|
907
1020
|
{
|
|
908
|
-
title: canChangeEntityType ?
|
|
909
|
-
hasPayinTaskNotPayout ? "payinAccountsDescription" : payoutTaskDescriptionKey
|
|
1021
|
+
title: canChangeEntityType ? t(($) => $["payoutBankAccounts"]) : t(
|
|
1022
|
+
($) => $[hasPayinTaskNotPayout ? "payinAccountsDescription" : payoutTaskDescriptionKey]
|
|
910
1023
|
),
|
|
911
1024
|
children: transferInstruments.length > 0 ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
912
1025
|
transferInstruments.map((transferInstrument) => /* @__PURE__ */ jsx(
|
|
@@ -928,8 +1041,8 @@ function TaskListInner({
|
|
|
928
1041
|
disabled: !canAddPayoutAccount,
|
|
929
1042
|
children: [
|
|
930
1043
|
/* @__PURE__ */ jsx(Icon, { name: "plus", className: "adyen-task-list__card-icon " }),
|
|
931
|
-
/* @__PURE__ */ jsx("span", { children: canChangeEntityType ?
|
|
932
|
-
hasPayinTaskNotPayout ? "addExtraPayinAccount" : "addExtraPayoutAccount"
|
|
1044
|
+
/* @__PURE__ */ jsx("span", { children: canChangeEntityType ? t(($) => $["addExtraBankAccount"]) : t(
|
|
1045
|
+
($) => $[hasPayinTaskNotPayout ? "addExtraPayinAccount" : "addExtraPayoutAccount"]
|
|
933
1046
|
) })
|
|
934
1047
|
]
|
|
935
1048
|
}
|
|
@@ -940,25 +1053,25 @@ function TaskListInner({
|
|
|
940
1053
|
onNavigateToTask: () => handleOnNavigateToTaskPayout(),
|
|
941
1054
|
icon: "payout",
|
|
942
1055
|
titleKey: canChangeEntityType ? "bankAccountDetails" : hasPayinTaskNotPayout ? "payinDetails" : "payoutDetails",
|
|
943
|
-
status:
|
|
1056
|
+
status: TaskStatuses.DETAILS_REQUIRED,
|
|
944
1057
|
disabled: !canAddPayoutAccount,
|
|
945
1058
|
problems: getEmptyBankAccountProblems()
|
|
946
1059
|
}
|
|
947
1060
|
)
|
|
948
1061
|
}
|
|
949
1062
|
),
|
|
950
|
-
showContractTasks && /* @__PURE__ */ jsxs(TaskListGroup, { title:
|
|
1063
|
+
showContractTasks && /* @__PURE__ */ jsxs(TaskListGroup, { title: t(($) => $["reviewAndSignLegalDisclosures"]), children: [
|
|
951
1064
|
showPciTask && /* @__PURE__ */ jsx(
|
|
952
1065
|
TaskListItem,
|
|
953
1066
|
{
|
|
954
1067
|
onNavigateToTask: handleOnNavigateToPci,
|
|
955
1068
|
icon: "pci",
|
|
956
1069
|
titleKey: "pciDssQuestionnaire",
|
|
957
|
-
status: canDownloadPci ?
|
|
958
|
-
statusLabel: canDownloadPci ?
|
|
1070
|
+
status: canDownloadPci ? TaskStatuses.DOWNLOAD : TaskStatuses.SIGN,
|
|
1071
|
+
statusLabel: canDownloadPci ? t(($) => $["downloadACopy"]) : void 0,
|
|
959
1072
|
downloadHandler: onPciDownload,
|
|
960
1073
|
disabled: isPciTaskDisabled,
|
|
961
|
-
info: isPciTaskDisabled && !canDownloadPci ?
|
|
1074
|
+
info: isPciTaskDisabled && !canDownloadPci ? t(($) => $["requiresDecisionMakers"]) : void 0
|
|
962
1075
|
}
|
|
963
1076
|
),
|
|
964
1077
|
showServiceAgreementTask && /* @__PURE__ */ jsx(
|
|
@@ -968,19 +1081,19 @@ function TaskListInner({
|
|
|
968
1081
|
icon: "contract",
|
|
969
1082
|
titleKey: "signServiceAgreement",
|
|
970
1083
|
disabled: areServiceAgreementTasksDisabled,
|
|
971
|
-
status: serviceAgreementTypes.length ?
|
|
972
|
-
info: EnableSignPCIBeforeTOS && shouldSignPciFirst ?
|
|
1084
|
+
status: serviceAgreementTypes.length ? TaskStatuses.SIGN : TaskStatuses.SIGNED,
|
|
1085
|
+
info: EnableSignPCIBeforeTOS && shouldSignPciFirst ? t(($) => $["signPciFirst"]) : !hasServiceAgreementSigners ? t(($) => $["requiresSignatory"]) : void 0
|
|
973
1086
|
}
|
|
974
1087
|
)
|
|
975
1088
|
] }),
|
|
976
|
-
isReview && /* @__PURE__ */ jsx(TaskListGroup, { title:
|
|
1089
|
+
isReview && /* @__PURE__ */ jsx(TaskListGroup, { title: t(($) => $["pleaseEnsureTheFollowing"]), children: /* @__PURE__ */ jsx(
|
|
977
1090
|
TaskListItem,
|
|
978
1091
|
{
|
|
979
1092
|
onNavigateToTask: handleOnNavigateToTaskReview,
|
|
980
1093
|
icon: "review",
|
|
981
1094
|
titleKey: "submitReviewOfYourData",
|
|
982
|
-
status:
|
|
983
|
-
problems:
|
|
1095
|
+
status: TaskStatuses.SUBMIT,
|
|
1096
|
+
problems: capabilityProblems?.LegalEntity?.[legalEntityResponse.id],
|
|
984
1097
|
showErrorAlerts: "always"
|
|
985
1098
|
}
|
|
986
1099
|
) })
|
|
@@ -988,6 +1101,45 @@ function TaskListInner({
|
|
|
988
1101
|
] });
|
|
989
1102
|
}
|
|
990
1103
|
const isNewEntity = Symbol("isNewEntity");
|
|
1104
|
+
const businessLines = "adyen-kyc-business-lines";
|
|
1105
|
+
const styles$4 = {
|
|
1106
|
+
businessLines
|
|
1107
|
+
};
|
|
1108
|
+
const BusinessLinesGettingStarted = ({
|
|
1109
|
+
handleGettingStartedClick,
|
|
1110
|
+
handleCancelClick
|
|
1111
|
+
}) => {
|
|
1112
|
+
const { t } = useTranslation(["businessLines", "common"]);
|
|
1113
|
+
return /* @__PURE__ */ jsx(
|
|
1114
|
+
LandingLayout,
|
|
1115
|
+
{
|
|
1116
|
+
title: t(($) => $["businessLines"]),
|
|
1117
|
+
description: t(($) => $["businessLinesGettingStarted"]),
|
|
1118
|
+
media: /* @__PURE__ */ jsx(Svg, { type: "image", name: "business-lines" }),
|
|
1119
|
+
actions: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1120
|
+
/* @__PURE__ */ jsx(Button, { fullWidth: true, onClick: handleGettingStartedClick, children: t(($) => $["gettingStarted"], { ns: "common" }) }),
|
|
1121
|
+
/* @__PURE__ */ jsx(Button, { variant: "tertiary", fullWidth: true, onClick: handleCancelClick, children: t(($) => $["finishLater"], { ns: "common" }) })
|
|
1122
|
+
] })
|
|
1123
|
+
}
|
|
1124
|
+
);
|
|
1125
|
+
};
|
|
1126
|
+
function BusinessLinesDropin({ handleHomeClick }) {
|
|
1127
|
+
const [gettingStarted, setGettingStarted] = useState(true);
|
|
1128
|
+
return /* @__PURE__ */ jsx("div", { className: styles$4.businessLines, children: gettingStarted && /* @__PURE__ */ jsx(
|
|
1129
|
+
BusinessLinesGettingStarted,
|
|
1130
|
+
{
|
|
1131
|
+
handleGettingStartedClick: () => setGettingStarted(false),
|
|
1132
|
+
handleCancelClick: () => handleHomeClick?.()
|
|
1133
|
+
}
|
|
1134
|
+
) });
|
|
1135
|
+
}
|
|
1136
|
+
const RootBusinessLinesPage = ({ handleHomeClick }) => {
|
|
1137
|
+
const { data: rootLe } = useLegalEntity(ROOT_LE);
|
|
1138
|
+
if (!rootLe) {
|
|
1139
|
+
return /* @__PURE__ */ jsx(Loader, {});
|
|
1140
|
+
}
|
|
1141
|
+
return /* @__PURE__ */ jsx(BusinessLinesDropin, { handleHomeClick });
|
|
1142
|
+
};
|
|
991
1143
|
const useExemptSettlor = ({
|
|
992
1144
|
trust
|
|
993
1145
|
}) => {
|
|
@@ -997,7 +1149,7 @@ const useExemptSettlor = ({
|
|
|
997
1149
|
(association) => association.type === TrustMemberTypes.SETTLOR && Boolean(association.settlorExemptionReason)
|
|
998
1150
|
);
|
|
999
1151
|
}, [trust]);
|
|
1000
|
-
const { data } = useLegalEntity(
|
|
1152
|
+
const { data } = useLegalEntity(matchingAssociation?.legalEntityId ?? skipToken);
|
|
1001
1153
|
return data;
|
|
1002
1154
|
};
|
|
1003
1155
|
const splitAtFirstOccurrence = (str, separator) => {
|
|
@@ -1005,10 +1157,7 @@ const splitAtFirstOccurrence = (str, separator) => {
|
|
|
1005
1157
|
if (firstOccurrence === -1) return [str];
|
|
1006
1158
|
return [str.slice(0, firstOccurrence), str.slice(firstOccurrence + 1)];
|
|
1007
1159
|
};
|
|
1008
|
-
const getTrustMemberOwnerId = (trustMemberId, entityAssociations) =>
|
|
1009
|
-
var _a;
|
|
1010
|
-
return (_a = entityAssociations.find((association) => association.associatorId === trustMemberId)) == null ? void 0 : _a.legalEntityId;
|
|
1011
|
-
};
|
|
1160
|
+
const getTrustMemberOwnerId = (trustMemberId, entityAssociations) => entityAssociations.find((association) => association.associatorId === trustMemberId)?.legalEntityId;
|
|
1012
1161
|
const getFallbackName = (exemptSettlorAssociation) => {
|
|
1013
1162
|
const [firstName, lastName] = splitAtFirstOccurrence(exemptSettlorAssociation.name ?? "", " ");
|
|
1014
1163
|
return {
|
|
@@ -1017,7 +1166,6 @@ const getFallbackName = (exemptSettlorAssociation) => {
|
|
|
1017
1166
|
};
|
|
1018
1167
|
};
|
|
1019
1168
|
const convertEntityAssociationIntoTrustMember = (association, associations, exemptSettlorLE) => {
|
|
1020
|
-
var _a;
|
|
1021
1169
|
if (association.settlorExemptionReason) {
|
|
1022
1170
|
return {
|
|
1023
1171
|
trustMemberType: "exemptSettlor",
|
|
@@ -1025,24 +1173,24 @@ const convertEntityAssociationIntoTrustMember = (association, associations, exem
|
|
|
1025
1173
|
legalEntityType: association.entityType,
|
|
1026
1174
|
legalEntityId: association.legalEntityId,
|
|
1027
1175
|
settlorExemptionReason: association.settlorExemptionReason,
|
|
1028
|
-
exemptSettlorName: association.entityType ===
|
|
1176
|
+
exemptSettlorName: association.entityType === LegalEntityTypes.INDIVIDUAL ? exemptSettlorLE?.individual?.name ?? getFallbackName(association) : void 0,
|
|
1029
1177
|
name: association.name
|
|
1030
1178
|
};
|
|
1031
1179
|
}
|
|
1032
|
-
if (association.entityType ===
|
|
1180
|
+
if (association.entityType === LegalEntityTypes.ORGANIZATION)
|
|
1033
1181
|
return {
|
|
1034
1182
|
trustMemberType: "company",
|
|
1035
1183
|
roles: [],
|
|
1036
|
-
legalEntityType:
|
|
1184
|
+
legalEntityType: LegalEntityTypes.ORGANIZATION,
|
|
1037
1185
|
legalEntityId: association.legalEntityId,
|
|
1038
1186
|
name: association.name,
|
|
1039
1187
|
ownerId: getTrustMemberOwnerId(association.legalEntityId, associations)
|
|
1040
1188
|
};
|
|
1041
|
-
if (association.entityType ===
|
|
1189
|
+
if (association.entityType === LegalEntityTypes.INDIVIDUAL)
|
|
1042
1190
|
return {
|
|
1043
1191
|
trustMemberType: "regular",
|
|
1044
1192
|
roles: [],
|
|
1045
|
-
legalEntityType:
|
|
1193
|
+
legalEntityType: LegalEntityTypes.INDIVIDUAL,
|
|
1046
1194
|
legalEntityId: association.legalEntityId,
|
|
1047
1195
|
name: association.name
|
|
1048
1196
|
};
|
|
@@ -1083,18 +1231,15 @@ const mapUndefinedBeneficiaryInfoToTrustMembers = (undefinedBeneficiaryInfo) =>
|
|
|
1083
1231
|
reference,
|
|
1084
1232
|
description
|
|
1085
1233
|
}));
|
|
1086
|
-
const getTrustMembers = (trustLE, rootLegalEntity, exemptSettlorLE) =>
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
...mapUndefinedBeneficiaryInfoToTrustMembers(((_a = trustLE.trust) == null ? void 0 : _a.undefinedBeneficiaryInfo) ?? [])
|
|
1096
|
-
];
|
|
1097
|
-
};
|
|
1234
|
+
const getTrustMembers = (trustLE, rootLegalEntity, exemptSettlorLE) => [
|
|
1235
|
+
mapRootLegalEntityToTrustMember(rootLegalEntity),
|
|
1236
|
+
...mapEntityAssociationsToTrustMembers(
|
|
1237
|
+
trustLE.id,
|
|
1238
|
+
trustLE.entityAssociations ?? [],
|
|
1239
|
+
exemptSettlorLE
|
|
1240
|
+
),
|
|
1241
|
+
...mapUndefinedBeneficiaryInfoToTrustMembers(trustLE.trust?.undefinedBeneficiaryInfo ?? [])
|
|
1242
|
+
];
|
|
1098
1243
|
const combineRootLegalEntityWithEntityAssociations = (rootLegalEntity, entityAssociations) => {
|
|
1099
1244
|
const allowedRolesForRootLegalEntity = [
|
|
1100
1245
|
TrustMemberTypes.SETTLOR,
|
|
@@ -1111,7 +1256,6 @@ const combineRootLegalEntityWithEntityAssociations = (rootLegalEntity, entityAss
|
|
|
1111
1256
|
};
|
|
1112
1257
|
};
|
|
1113
1258
|
const getRootTrusteeTrustMembers = (trustLE, rootLegalEntity, exemptSettlorLE) => {
|
|
1114
|
-
var _a;
|
|
1115
1259
|
const entityAssociations = trustLE.entityAssociations ?? [];
|
|
1116
1260
|
const rootLegalEntityAssociations = entityAssociations.filter(
|
|
1117
1261
|
(a) => a.legalEntityId === rootLegalEntity.id
|
|
@@ -1126,19 +1270,19 @@ const getRootTrusteeTrustMembers = (trustLE, rootLegalEntity, exemptSettlorLE) =
|
|
|
1126
1270
|
nonRootLegalEntityAssociations ?? [],
|
|
1127
1271
|
exemptSettlorLE
|
|
1128
1272
|
),
|
|
1129
|
-
...mapUndefinedBeneficiaryInfoToTrustMembers(
|
|
1273
|
+
...mapUndefinedBeneficiaryInfoToTrustMembers(trustLE.trust?.undefinedBeneficiaryInfo ?? [])
|
|
1130
1274
|
];
|
|
1131
1275
|
};
|
|
1132
1276
|
function useTrustMembers() {
|
|
1133
1277
|
const { data: rootLegalEntity } = useLegalEntity(ROOT_LE);
|
|
1134
|
-
const { data: trust } = useAssociatedLegalEntity(rootLegalEntity,
|
|
1278
|
+
const { data: trust } = useAssociatedLegalEntity(rootLegalEntity, LegalEntityTypes.TRUST);
|
|
1135
1279
|
const { isExperimentEnabled } = useExperimentsContext();
|
|
1136
1280
|
const exemptSettlor = useExemptSettlor({
|
|
1137
1281
|
trust
|
|
1138
1282
|
});
|
|
1139
1283
|
const allowMoreRolesForMainRootTrustee = isExperimentEnabled("AllowMoreRolesForMainRootTrustee");
|
|
1140
1284
|
return useMemo(() => {
|
|
1141
|
-
if (!rootLegalEntity || !
|
|
1285
|
+
if (!rootLegalEntity || !trust?.trust) return [];
|
|
1142
1286
|
return allowMoreRolesForMainRootTrustee ? getRootTrusteeTrustMembers(trust, rootLegalEntity, exemptSettlor) : getTrustMembers(trust, rootLegalEntity, exemptSettlor);
|
|
1143
1287
|
}, [rootLegalEntity, trust, exemptSettlor, allowMoreRolesForMainRootTrustee]);
|
|
1144
1288
|
}
|
|
@@ -1201,11 +1345,10 @@ const convertExistingSettlorExemptionReasons = (existingReasons) => {
|
|
|
1201
1345
|
return existingReasons;
|
|
1202
1346
|
};
|
|
1203
1347
|
const convertExistingTrustMember = (trustMember) => {
|
|
1204
|
-
var _a, _b;
|
|
1205
1348
|
switch (trustMember.trustMemberType) {
|
|
1206
1349
|
case "undefinedBeneficiary":
|
|
1207
1350
|
return {
|
|
1208
|
-
entityType:
|
|
1351
|
+
entityType: LegalEntityTypes.INDIVIDUAL,
|
|
1209
1352
|
role: ["undefinedBeneficiary"],
|
|
1210
1353
|
descriptionUndefinedBeneficiary: trustMember.description
|
|
1211
1354
|
};
|
|
@@ -1232,8 +1375,8 @@ const convertExistingTrustMember = (trustMember) => {
|
|
|
1232
1375
|
settlorExemptionReason: convertExistingSettlorExemptionReasons(
|
|
1233
1376
|
trustMember.settlorExemptionReason
|
|
1234
1377
|
),
|
|
1235
|
-
firstName:
|
|
1236
|
-
lastName:
|
|
1378
|
+
firstName: trustMember.exemptSettlorName?.firstName,
|
|
1379
|
+
lastName: trustMember.exemptSettlorName?.lastName,
|
|
1237
1380
|
legalCompanyName: trustMember.name,
|
|
1238
1381
|
country: trustMember.country
|
|
1239
1382
|
};
|
|
@@ -1254,14 +1397,14 @@ const allowedCrossoverRolesMatrix = {
|
|
|
1254
1397
|
};
|
|
1255
1398
|
const allowedCrossoverRolesMatrixByTrustMemberAndLegalEntityType = {
|
|
1256
1399
|
rootTrustee: {
|
|
1257
|
-
[
|
|
1400
|
+
[LegalEntityTypes.INDIVIDUAL]: {
|
|
1258
1401
|
settlor: ["secondaryTrustee", "protector"],
|
|
1259
1402
|
secondaryTrustee: ["settlor", "protector", "definedBeneficiary"],
|
|
1260
1403
|
protector: ["settlor", "secondaryTrustee", "definedBeneficiary"],
|
|
1261
1404
|
definedBeneficiary: ["secondaryTrustee", "protector"],
|
|
1262
1405
|
undefinedBeneficiary: []
|
|
1263
1406
|
},
|
|
1264
|
-
[
|
|
1407
|
+
[LegalEntityTypes.ORGANIZATION]: {
|
|
1265
1408
|
settlor: ["secondaryTrustee", "protector"],
|
|
1266
1409
|
secondaryTrustee: ["settlor", "protector"],
|
|
1267
1410
|
protector: ["settlor", "secondaryTrustee"],
|
|
@@ -1287,12 +1430,12 @@ const getAllowedCrossoverRolesMatrixByTrustMemberAndLegalEntityType = (trustMemb
|
|
|
1287
1430
|
};
|
|
1288
1431
|
const availablesRolesByTrustMemberTypeAndLegalEntityType = {
|
|
1289
1432
|
rootTrustee: {
|
|
1290
|
-
[
|
|
1291
|
-
[
|
|
1433
|
+
[LegalEntityTypes.INDIVIDUAL]: ["settlor", "protector", "definedBeneficiary"],
|
|
1434
|
+
[LegalEntityTypes.ORGANIZATION]: ["settlor", "protector"]
|
|
1292
1435
|
}
|
|
1293
1436
|
};
|
|
1294
1437
|
const getAvailableRolesByTrustMemberTypeAndLegalEntityType = (currentRoles, trustMember) => {
|
|
1295
|
-
if (!
|
|
1438
|
+
if (!currentRoles?.length) {
|
|
1296
1439
|
const { trustMemberType, legalEntityType } = trustMember;
|
|
1297
1440
|
const availableRolesByTrustMemberType = availablesRolesByTrustMemberTypeAndLegalEntityType[trustMemberType];
|
|
1298
1441
|
if (!availableRolesByTrustMemberType) {
|
|
@@ -1311,14 +1454,14 @@ const getAvailableRolesByTrustMemberTypeAndLegalEntityType = (currentRoles, trus
|
|
|
1311
1454
|
return roles.filter((r) => r !== "secondaryTrustee");
|
|
1312
1455
|
};
|
|
1313
1456
|
const getAvailableRoles = (currentRoles) => {
|
|
1314
|
-
if (!
|
|
1457
|
+
if (!currentRoles?.length) return Object.values(TrustMemberTypes);
|
|
1315
1458
|
return currentRoles.map((role) => [role, ...allowedCrossoverRolesMatrix[role]]).reduce(
|
|
1316
1459
|
(existingAllowed, allowedForRole) => existingAllowed.filter((role) => allowedForRole.includes(role))
|
|
1317
1460
|
);
|
|
1318
1461
|
};
|
|
1319
1462
|
const trustMemberLegalEntityTypes = [
|
|
1320
|
-
|
|
1321
|
-
|
|
1463
|
+
LegalEntityTypes.INDIVIDUAL,
|
|
1464
|
+
LegalEntityTypes.ORGANIZATION
|
|
1322
1465
|
];
|
|
1323
1466
|
const countriesWhereSettlorExemptionReasonNotApplicable = [CountryCodes.NewZealand];
|
|
1324
1467
|
const settlorExemptionReasons = [
|
|
@@ -1330,15 +1473,9 @@ const settlorExemptionReasonWithNoneOfTheAbove = [
|
|
|
1330
1473
|
...settlorExemptionReasons,
|
|
1331
1474
|
"noneOfTheAbove"
|
|
1332
1475
|
];
|
|
1333
|
-
const couldBeExemptSettlor = (data, country) => data.entityType ===
|
|
1334
|
-
const isExemptSettlor = (data) =>
|
|
1335
|
-
|
|
1336
|
-
return ((_a = data.settlorExemptionReason) == null ? void 0 : _a.some((reason) => reason !== "noneOfTheAbove")) ?? false;
|
|
1337
|
-
};
|
|
1338
|
-
const isOrganizationAndSettlor = (data) => {
|
|
1339
|
-
var _a;
|
|
1340
|
-
return data.entityType === LegalEntityType.ORGANIZATION && ((_a = data.role) == null ? void 0 : _a.length) === 1 && data.role[0] === "settlor";
|
|
1341
|
-
};
|
|
1476
|
+
const couldBeExemptSettlor = (data, country) => data.entityType === LegalEntityTypes.INDIVIDUAL && data.role !== void 0 && data.role.includes("settlor") && !data.role.some((role) => role !== "settlor") && (!country || !countriesWhereSettlorExemptionReasonNotApplicable.includes(country));
|
|
1477
|
+
const isExemptSettlor = (data) => data.settlorExemptionReason?.some((reason) => reason !== "noneOfTheAbove") ?? false;
|
|
1478
|
+
const isOrganizationAndSettlor = (data) => data.entityType === LegalEntityTypes.ORGANIZATION && data.role?.length === 1 && data.role[0] === "settlor";
|
|
1342
1479
|
const roleAndTypeValidationRules = {
|
|
1343
1480
|
entityType: {
|
|
1344
1481
|
modes: ["blur"],
|
|
@@ -1347,7 +1484,7 @@ const roleAndTypeValidationRules = {
|
|
|
1347
1484
|
},
|
|
1348
1485
|
role: {
|
|
1349
1486
|
modes: ["blur"],
|
|
1350
|
-
validate: (role) => !!
|
|
1487
|
+
validate: (role) => !!role?.length,
|
|
1351
1488
|
errorMessage: "fieldIsRequired"
|
|
1352
1489
|
},
|
|
1353
1490
|
descriptionUndefinedBeneficiary: {
|
|
@@ -1357,7 +1494,7 @@ const roleAndTypeValidationRules = {
|
|
|
1357
1494
|
},
|
|
1358
1495
|
settlorExemptionReason: {
|
|
1359
1496
|
modes: ["blur"],
|
|
1360
|
-
validate: (reasons) => Boolean(reasons
|
|
1497
|
+
validate: (reasons) => Boolean(reasons?.length),
|
|
1361
1498
|
errorMessage: "fieldIsRequired"
|
|
1362
1499
|
},
|
|
1363
1500
|
country: {
|
|
@@ -1373,12 +1510,12 @@ const roleAndTypeValidationRules = {
|
|
|
1373
1510
|
};
|
|
1374
1511
|
const CHARACTERS_LIMIT = 256;
|
|
1375
1512
|
const leTypeCardDetails$1 = {
|
|
1376
|
-
[
|
|
1513
|
+
[LegalEntityTypes.INDIVIDUAL]: {
|
|
1377
1514
|
id: "individual",
|
|
1378
1515
|
name: "naturalPersonTitle",
|
|
1379
1516
|
description: "naturalPersonDescription"
|
|
1380
1517
|
},
|
|
1381
|
-
[
|
|
1518
|
+
[LegalEntityTypes.ORGANIZATION]: {
|
|
1382
1519
|
id: "organization",
|
|
1383
1520
|
name: "businessEntityTitle",
|
|
1384
1521
|
description: "businessEntityDescription"
|
|
@@ -1394,6 +1531,7 @@ const convertExistingTrustMemberToDefaultData = (trustMember, allowMoreRolesForM
|
|
|
1394
1531
|
return convertExistingTrustMember(trustMember);
|
|
1395
1532
|
};
|
|
1396
1533
|
const TrustRoleAndEntityType = (props) => {
|
|
1534
|
+
const { t } = useTranslation();
|
|
1397
1535
|
const { i18n } = useI18nContext();
|
|
1398
1536
|
const { existingTrustMember, isOrganizationSettlorWithExemptionEnabled, onChange, id, country } = props;
|
|
1399
1537
|
const trustRoleAndEntityTypeCountry = country;
|
|
@@ -1415,13 +1553,12 @@ const TrustRoleAndEntityType = (props) => {
|
|
|
1415
1553
|
existingTrustMember,
|
|
1416
1554
|
allowMoreRolesForMainRootTrusteeEnabled
|
|
1417
1555
|
);
|
|
1418
|
-
const formUtils = createFormUtils(mergedProps,
|
|
1556
|
+
const formUtils = createFormUtils(mergedProps, t);
|
|
1419
1557
|
const decideFields = (data2) => {
|
|
1420
|
-
|
|
1421
|
-
if ((_a = data2.role) == null ? void 0 : _a.includes("undefinedBeneficiary")) {
|
|
1558
|
+
if (data2.role?.includes("undefinedBeneficiary")) {
|
|
1422
1559
|
return ["role", "descriptionUndefinedBeneficiary"];
|
|
1423
1560
|
}
|
|
1424
|
-
if (
|
|
1561
|
+
if (data2.role?.length) {
|
|
1425
1562
|
if (isOrganizationSettlorWithExemptionEnabled && isOrganizationAndSettlor(data2)) {
|
|
1426
1563
|
return ["role", "entityType", "settlorExemptionReason", "country", "legalCompanyName"];
|
|
1427
1564
|
}
|
|
@@ -1437,9 +1574,9 @@ const TrustRoleAndEntityType = (props) => {
|
|
|
1437
1574
|
schema: decideFields,
|
|
1438
1575
|
rules: roleAndTypeValidationRules,
|
|
1439
1576
|
defaultData,
|
|
1440
|
-
fieldProblems: props
|
|
1577
|
+
fieldProblems: props?.fieldValidationErrors
|
|
1441
1578
|
});
|
|
1442
|
-
const availableRoles = allowMoreRolesForMainRootTrusteeEnabled &&
|
|
1579
|
+
const availableRoles = allowMoreRolesForMainRootTrusteeEnabled && existingTrustMember?.trustMemberType === "rootTrustee" ? getAvailableRolesByTrustMemberTypeAndLegalEntityType(data.role, existingTrustMember) : getAvailableRoles(data.role);
|
|
1443
1580
|
const { data: exemptSettlorLe } = useLegalEntity(
|
|
1444
1581
|
isOrganizationSettlorWithExemptionEnabled && existingTrustMember && existingTrustMember.trustMemberType === "exemptSettlor" && existingTrustMember.legalEntityId !== isNewEntity && existingTrustMember.roles !== void 0 && existingTrustMember.roles.length === 1 && existingTrustMember.roles[0] === "settlor" ? existingTrustMember.legalEntityId : skipToken
|
|
1445
1582
|
);
|
|
@@ -1449,7 +1586,7 @@ const TrustRoleAndEntityType = (props) => {
|
|
|
1449
1586
|
}
|
|
1450
1587
|
}, [exemptSettlorLe]);
|
|
1451
1588
|
useEffect(() => {
|
|
1452
|
-
onChange
|
|
1589
|
+
onChange?.({
|
|
1453
1590
|
schema,
|
|
1454
1591
|
data,
|
|
1455
1592
|
errors,
|
|
@@ -1472,10 +1609,9 @@ const TrustRoleAndEntityType = (props) => {
|
|
|
1472
1609
|
}
|
|
1473
1610
|
};
|
|
1474
1611
|
const changeSettlorExemptionReasons = (exemptionReasons) => {
|
|
1475
|
-
var _a;
|
|
1476
1612
|
if (exemptionReasons.includes("noneOfTheAbove")) {
|
|
1477
1613
|
handleChangeFor("settlorExemptionReason")(
|
|
1478
|
-
|
|
1614
|
+
data.settlorExemptionReason?.includes("noneOfTheAbove") ? exemptionReasons.filter((reason) => reason !== "noneOfTheAbove") : ["noneOfTheAbove"]
|
|
1479
1615
|
);
|
|
1480
1616
|
return;
|
|
1481
1617
|
}
|
|
@@ -1483,8 +1619,7 @@ const TrustRoleAndEntityType = (props) => {
|
|
|
1483
1619
|
};
|
|
1484
1620
|
const nameProps = getFieldProps(props, nameFields);
|
|
1485
1621
|
const onEntityTypeChange = (value) => {
|
|
1486
|
-
|
|
1487
|
-
if (isOrganizationSettlorWithExemptionEnabled && value === LegalEntityType.ORGANIZATION && ((_a = data.role) == null ? void 0 : _a.length) === 1 && data.role[0] === "settlor") {
|
|
1622
|
+
if (isOrganizationSettlorWithExemptionEnabled && value === LegalEntityTypes.ORGANIZATION && data.role?.length === 1 && data.role[0] === "settlor") {
|
|
1488
1623
|
changeSettlorExemptionReasons(["professionalServiceProvider"]);
|
|
1489
1624
|
}
|
|
1490
1625
|
handleChangeFor("entityType")(value);
|
|
@@ -1494,8 +1629,8 @@ const TrustRoleAndEntityType = (props) => {
|
|
|
1494
1629
|
/* @__PURE__ */ jsx(
|
|
1495
1630
|
ErrorPanel,
|
|
1496
1631
|
{
|
|
1497
|
-
verificationErrors: props
|
|
1498
|
-
validationErrors: props
|
|
1632
|
+
verificationErrors: props?.formVerificationErrors,
|
|
1633
|
+
validationErrors: props?.fieldValidationErrors,
|
|
1499
1634
|
formUtils,
|
|
1500
1635
|
id: "ariaErrorField"
|
|
1501
1636
|
}
|
|
@@ -1506,7 +1641,6 @@ const TrustRoleAndEntityType = (props) => {
|
|
|
1506
1641
|
el: "fieldset",
|
|
1507
1642
|
name: "role",
|
|
1508
1643
|
label: formUtils.getLabel("role", "selectTheApplicableRoles"),
|
|
1509
|
-
classNameModifiers: ["role"],
|
|
1510
1644
|
errorMessage: formUtils.getErrorMessage("role", errors, fieldProblems),
|
|
1511
1645
|
isValid: valid.role,
|
|
1512
1646
|
disabled: availableRoles.length === 0,
|
|
@@ -1519,14 +1653,14 @@ const TrustRoleAndEntityType = (props) => {
|
|
|
1519
1653
|
selected: data.role ?? [],
|
|
1520
1654
|
onSelect: changeRoles,
|
|
1521
1655
|
mapToSelectItem: (role) => ({
|
|
1522
|
-
...makeSelectItemForRole(role,
|
|
1656
|
+
...makeSelectItemForRole(role, t),
|
|
1523
1657
|
disabled: !availableRoles.includes(role)
|
|
1524
1658
|
})
|
|
1525
1659
|
}
|
|
1526
1660
|
)
|
|
1527
1661
|
}
|
|
1528
1662
|
),
|
|
1529
|
-
|
|
1663
|
+
schema?.includes("entityType") && /* @__PURE__ */ jsx(
|
|
1530
1664
|
Field,
|
|
1531
1665
|
{
|
|
1532
1666
|
el: "fieldset",
|
|
@@ -1552,7 +1686,7 @@ const TrustRoleAndEntityType = (props) => {
|
|
|
1552
1686
|
)
|
|
1553
1687
|
}
|
|
1554
1688
|
),
|
|
1555
|
-
|
|
1689
|
+
schema?.includes("descriptionUndefinedBeneficiary") && /* @__PURE__ */ jsx(
|
|
1556
1690
|
Field,
|
|
1557
1691
|
{
|
|
1558
1692
|
name: "descriptionUndefinedBeneficiary",
|
|
@@ -1578,7 +1712,7 @@ const TrustRoleAndEntityType = (props) => {
|
|
|
1578
1712
|
)
|
|
1579
1713
|
}
|
|
1580
1714
|
),
|
|
1581
|
-
|
|
1715
|
+
schema?.includes("settlorExemptionReason") && !isOrganizationAndSettlor(data) && /* @__PURE__ */ jsx(
|
|
1582
1716
|
Field,
|
|
1583
1717
|
{
|
|
1584
1718
|
el: "fieldset",
|
|
@@ -1626,7 +1760,7 @@ const TrustRoleAndEntityType = (props) => {
|
|
|
1626
1760
|
dataStoreId: id
|
|
1627
1761
|
}
|
|
1628
1762
|
) : void 0,
|
|
1629
|
-
isOrganizationSettlorWithExemptionEnabled &&
|
|
1763
|
+
isOrganizationSettlorWithExemptionEnabled && schema?.includes("country") && schema?.includes("legalCompanyName") ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1630
1764
|
/* @__PURE__ */ jsx(
|
|
1631
1765
|
CountryField,
|
|
1632
1766
|
{
|
|
@@ -1657,7 +1791,6 @@ const TrustRoleAndEntityType = (props) => {
|
|
|
1657
1791
|
] });
|
|
1658
1792
|
};
|
|
1659
1793
|
const mapTrustMemberToEntityAssociations = (trustMember) => {
|
|
1660
|
-
var _a, _b;
|
|
1661
1794
|
if (trustMember.legalEntityId === isNewEntity) {
|
|
1662
1795
|
throw Error("Cannot map a new trust member, you must create it first");
|
|
1663
1796
|
}
|
|
@@ -1668,7 +1801,7 @@ const mapTrustMemberToEntityAssociations = (trustMember) => {
|
|
|
1668
1801
|
entityType: trustMember.legalEntityType,
|
|
1669
1802
|
type: TrustMemberTypes.SETTLOR,
|
|
1670
1803
|
settlorExemptionReason: trustMember.settlorExemptionReason,
|
|
1671
|
-
name: trustMember.legalEntityType ===
|
|
1804
|
+
name: trustMember.legalEntityType === LegalEntityTypes.INDIVIDUAL ? `${trustMember.exemptSettlorName?.firstName} ${trustMember.exemptSettlorName?.lastName}` : trustMember.name ?? ""
|
|
1672
1805
|
}
|
|
1673
1806
|
];
|
|
1674
1807
|
return trustMember.roles.map((role) => ({
|
|
@@ -1713,10 +1846,9 @@ const addOrUpdateUndefinedBeneficiary = async ({
|
|
|
1713
1846
|
trust,
|
|
1714
1847
|
updateLegalEntity
|
|
1715
1848
|
}) => {
|
|
1716
|
-
|
|
1717
|
-
const otherUndefinedBeneficiaries = ((_b = (_a = trust.trust) == null ? void 0 : _a.undefinedBeneficiaryInfo) == null ? void 0 : _b.filter(
|
|
1849
|
+
const otherUndefinedBeneficiaries = trust.trust?.undefinedBeneficiaryInfo?.filter(
|
|
1718
1850
|
(ub) => ub.reference !== newOrUpdated.reference
|
|
1719
|
-
)
|
|
1851
|
+
) ?? [];
|
|
1720
1852
|
const patchLE = {
|
|
1721
1853
|
trust: {
|
|
1722
1854
|
undefinedBeneficiaryInfo: [
|
|
@@ -1737,13 +1869,12 @@ const createExemptSettlor = async ({
|
|
|
1737
1869
|
trust,
|
|
1738
1870
|
handleCreateLegalEntity
|
|
1739
1871
|
}) => {
|
|
1740
|
-
var _a, _b;
|
|
1741
1872
|
const exemptSettlorLE = {
|
|
1742
|
-
type:
|
|
1873
|
+
type: LegalEntityTypes.INDIVIDUAL,
|
|
1743
1874
|
individual: {
|
|
1744
1875
|
name: {
|
|
1745
|
-
firstName:
|
|
1746
|
-
lastName:
|
|
1876
|
+
firstName: exemptSettlor.exemptSettlorName?.firstName ?? "",
|
|
1877
|
+
lastName: exemptSettlor.exemptSettlorName?.lastName ?? ""
|
|
1747
1878
|
},
|
|
1748
1879
|
residentialAddress: {
|
|
1749
1880
|
country: trust.trust.registeredAddress.country
|
|
@@ -1757,7 +1888,7 @@ const createOrganizationExemptSettlor = async ({
|
|
|
1757
1888
|
handleCreateLegalEntity
|
|
1758
1889
|
}) => {
|
|
1759
1890
|
const exemptSettlorLE = {
|
|
1760
|
-
type:
|
|
1891
|
+
type: LegalEntityTypes.ORGANIZATION,
|
|
1761
1892
|
organization: {
|
|
1762
1893
|
legalName: exemptSettlor.name ?? "",
|
|
1763
1894
|
registeredAddress: {
|
|
@@ -1772,12 +1903,11 @@ const updateExemptSettlorName = async ({
|
|
|
1772
1903
|
exemptSettlor,
|
|
1773
1904
|
updateLegalEntity
|
|
1774
1905
|
}) => {
|
|
1775
|
-
var _a, _b;
|
|
1776
1906
|
const exemptSettlorPatch = {
|
|
1777
1907
|
individual: {
|
|
1778
1908
|
name: {
|
|
1779
|
-
firstName:
|
|
1780
|
-
lastName:
|
|
1909
|
+
firstName: exemptSettlor.exemptSettlorName?.firstName,
|
|
1910
|
+
lastName: exemptSettlor.exemptSettlorName?.lastName
|
|
1781
1911
|
}
|
|
1782
1912
|
}
|
|
1783
1913
|
};
|
|
@@ -1810,7 +1940,6 @@ const styles$3 = {
|
|
|
1810
1940
|
const formatRolesForSummary = (roles, i18n) => roles.map((role) => i18n.get(getRoleName(role))).join(", ");
|
|
1811
1941
|
const formatSettlorExemptionReasonsForSummary = (reasons, i18n) => /* @__PURE__ */ jsx("ul", { className: styles$3.settlorExemptionReasonsList, children: reasons.map((reason) => /* @__PURE__ */ jsx("li", { children: i18n.get(reason) }, reason)) });
|
|
1812
1942
|
const formatRoleAndEntityTypeSummary = (data, i18n, isOrganizationSettlorWithExemptionEnabled) => {
|
|
1813
|
-
var _a, _b;
|
|
1814
1943
|
const { trustMemberType, roles } = data;
|
|
1815
1944
|
const role = formatRolesForSummary(roles, i18n);
|
|
1816
1945
|
switch (trustMemberType) {
|
|
@@ -1823,8 +1952,8 @@ const formatRoleAndEntityTypeSummary = (data, i18n, isOrganizationSettlorWithExe
|
|
|
1823
1952
|
return {
|
|
1824
1953
|
role,
|
|
1825
1954
|
entityType: i18n.get(data.legalEntityType),
|
|
1826
|
-
firstName:
|
|
1827
|
-
lastName:
|
|
1955
|
+
firstName: data.exemptSettlorName?.firstName,
|
|
1956
|
+
lastName: data.exemptSettlorName?.lastName,
|
|
1828
1957
|
country: isOrganizationSettlorWithExemptionEnabled ? data.country : void 0,
|
|
1829
1958
|
legalCompanyName: isOrganizationSettlorWithExemptionEnabled ? data.name : void 0,
|
|
1830
1959
|
settlorExemptionReason: summaryItem(
|
|
@@ -1885,24 +2014,23 @@ const decideForms = (trustMember) => {
|
|
|
1885
2014
|
}
|
|
1886
2015
|
};
|
|
1887
2016
|
const convertDataToTrustMember = (data, existingTrustMember, isOrganizationSettlorWithExemptionReasonEnabled = false) => {
|
|
1888
|
-
var _a;
|
|
1889
2017
|
const existingId = existingTrustMember ? existingTrustMember.trustMemberType === "undefinedBeneficiary" ? existingTrustMember.reference : existingTrustMember.legalEntityId : void 0;
|
|
1890
2018
|
if (data.trustMemberType === "rootTrustee") {
|
|
1891
2019
|
return {
|
|
1892
2020
|
trustMemberType: "rootTrustee",
|
|
1893
2021
|
roles: data.role ?? [],
|
|
1894
|
-
legalEntityType: data.entityType ??
|
|
2022
|
+
legalEntityType: data.entityType ?? LegalEntityTypes.ORGANIZATION,
|
|
1895
2023
|
legalEntityId: "",
|
|
1896
2024
|
name: data.firstName ?? ""
|
|
1897
2025
|
};
|
|
1898
2026
|
}
|
|
1899
|
-
if (
|
|
2027
|
+
if (data.role?.length) {
|
|
1900
2028
|
if (isExemptSettlor(data)) {
|
|
1901
|
-
if (isOrganizationSettlorWithExemptionReasonEnabled && data.entityType ===
|
|
2029
|
+
if (isOrganizationSettlorWithExemptionReasonEnabled && data.entityType === LegalEntityTypes.ORGANIZATION) {
|
|
1902
2030
|
return {
|
|
1903
2031
|
trustMemberType: "exemptSettlor",
|
|
1904
2032
|
roles: [TrustMemberTypes.SETTLOR],
|
|
1905
|
-
legalEntityType:
|
|
2033
|
+
legalEntityType: LegalEntityTypes.ORGANIZATION,
|
|
1906
2034
|
legalEntityId: existingId ?? isNewEntity,
|
|
1907
2035
|
name: data.legalCompanyName ?? "",
|
|
1908
2036
|
settlorExemptionReason: ["professionalServiceProvider"],
|
|
@@ -1912,7 +2040,7 @@ const convertDataToTrustMember = (data, existingTrustMember, isOrganizationSettl
|
|
|
1912
2040
|
return {
|
|
1913
2041
|
trustMemberType: "exemptSettlor",
|
|
1914
2042
|
roles: [TrustMemberTypes.SETTLOR],
|
|
1915
|
-
legalEntityType:
|
|
2043
|
+
legalEntityType: LegalEntityTypes.INDIVIDUAL,
|
|
1916
2044
|
settlorExemptionReason: data.settlorExemptionReason.filter(
|
|
1917
2045
|
(reason) => reason !== "noneOfTheAbove"
|
|
1918
2046
|
),
|
|
@@ -1930,21 +2058,21 @@ const convertDataToTrustMember = (data, existingTrustMember, isOrganizationSettl
|
|
|
1930
2058
|
description: data.descriptionUndefinedBeneficiary ?? "",
|
|
1931
2059
|
reference: existingId ?? isNewEntity
|
|
1932
2060
|
};
|
|
1933
|
-
if (data.entityType ===
|
|
2061
|
+
if (data.entityType === LegalEntityTypes.ORGANIZATION) {
|
|
1934
2062
|
return {
|
|
1935
2063
|
trustMemberType: "company",
|
|
1936
2064
|
roles: data.role,
|
|
1937
|
-
legalEntityType:
|
|
2065
|
+
legalEntityType: LegalEntityTypes.ORGANIZATION,
|
|
1938
2066
|
legalEntityId: existingId ?? isNewEntity,
|
|
1939
2067
|
name: data.legalCompanyName ?? "",
|
|
1940
2068
|
country: data.country
|
|
1941
2069
|
};
|
|
1942
2070
|
}
|
|
1943
|
-
if (data.entityType ===
|
|
2071
|
+
if (data.entityType === LegalEntityTypes.INDIVIDUAL)
|
|
1944
2072
|
return {
|
|
1945
2073
|
trustMemberType: "regular",
|
|
1946
2074
|
roles: data.role,
|
|
1947
|
-
legalEntityType:
|
|
2075
|
+
legalEntityType: LegalEntityTypes.INDIVIDUAL,
|
|
1948
2076
|
legalEntityId: existingId ?? isNewEntity,
|
|
1949
2077
|
name: ""
|
|
1950
2078
|
};
|
|
@@ -1960,7 +2088,6 @@ function RoleAndTypeDropin({
|
|
|
1960
2088
|
navigateBack,
|
|
1961
2089
|
country
|
|
1962
2090
|
}) {
|
|
1963
|
-
var _a;
|
|
1964
2091
|
const { i18n } = useI18nContext();
|
|
1965
2092
|
const { isExperimentEnabled } = useExperimentsContext();
|
|
1966
2093
|
const allowMoreRolesForMainRootTrustee = isExperimentEnabled("AllowMoreRolesForMainRootTrustee");
|
|
@@ -1971,7 +2098,7 @@ function RoleAndTypeDropin({
|
|
|
1971
2098
|
const { showToast } = useToastContext();
|
|
1972
2099
|
const isOrganizationSettlorWithExemptionReasonEnabled = (country2) => country2 === CountryCodes.Australia;
|
|
1973
2100
|
const isOrganizationSettlorWithExemptionEnabled = isOrganizationSettlorWithExemptionReasonEnabled(
|
|
1974
|
-
|
|
2101
|
+
trust?.trust?.countryOfGoverningLaw
|
|
1975
2102
|
);
|
|
1976
2103
|
const formList = decideForms(trustMember);
|
|
1977
2104
|
const forms = Object.values(formList);
|
|
@@ -2070,7 +2197,7 @@ function RoleAndTypeDropin({
|
|
|
2070
2197
|
};
|
|
2071
2198
|
const saveRolesAndNavigate = async () => {
|
|
2072
2199
|
if (trustMember === "incomplete") return;
|
|
2073
|
-
if (hasRolesChanged(trustMember.roles, existingTrustMember
|
|
2200
|
+
if (hasRolesChanged(trustMember.roles, existingTrustMember?.roles)) {
|
|
2074
2201
|
addOrUpdateTrustMember(trustMember);
|
|
2075
2202
|
}
|
|
2076
2203
|
navigateBack();
|
|
@@ -2233,7 +2360,7 @@ const EntityGuidanceStatus = ({
|
|
|
2233
2360
|
entityLabel,
|
|
2234
2361
|
status
|
|
2235
2362
|
}) => {
|
|
2236
|
-
const {
|
|
2363
|
+
const { t } = useTranslation();
|
|
2237
2364
|
return /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-entity-status__container", children: [
|
|
2238
2365
|
/* @__PURE__ */ jsx(EntityStatusIcon, { status }),
|
|
2239
2366
|
/* @__PURE__ */ jsx(
|
|
@@ -2241,7 +2368,7 @@ const EntityGuidanceStatus = ({
|
|
|
2241
2368
|
{
|
|
2242
2369
|
className: "adyen-kyc-entity-status__tag",
|
|
2243
2370
|
variant: getRoleTagVariant(entityLabel),
|
|
2244
|
-
children:
|
|
2371
|
+
children: t(($) => $[getRoleName(entityLabel)])
|
|
2245
2372
|
},
|
|
2246
2373
|
entityLabel
|
|
2247
2374
|
),
|
|
@@ -2250,9 +2377,13 @@ const EntityGuidanceStatus = ({
|
|
|
2250
2377
|
{
|
|
2251
2378
|
className: "adyen-kyc-entity-status--text",
|
|
2252
2379
|
"data-testid": `${entityLabel}-rule--description`,
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
|
|
2380
|
+
children: /* @__PURE__ */ jsx(
|
|
2381
|
+
Trans,
|
|
2382
|
+
{
|
|
2383
|
+
t,
|
|
2384
|
+
i18nKey: ($) => $[getEntityStatusRuleDescription(country, currentTask, entityLabel)]
|
|
2385
|
+
}
|
|
2386
|
+
)
|
|
2256
2387
|
}
|
|
2257
2388
|
)
|
|
2258
2389
|
] });
|
|
@@ -2275,8 +2406,7 @@ const deleteUndefinedBeneficiary = async ({
|
|
|
2275
2406
|
trust,
|
|
2276
2407
|
asyncMutation
|
|
2277
2408
|
}) => {
|
|
2278
|
-
|
|
2279
|
-
const existingUndefinedBeneficiaries = ((_a = trust.trust) == null ? void 0 : _a.undefinedBeneficiaryInfo) ?? [];
|
|
2409
|
+
const existingUndefinedBeneficiaries = trust.trust?.undefinedBeneficiaryInfo ?? [];
|
|
2280
2410
|
const updatedTrust = {
|
|
2281
2411
|
trust: {
|
|
2282
2412
|
undefinedBeneficiaryInfo: existingUndefinedBeneficiaries.filter(
|
|
@@ -2340,7 +2470,7 @@ const EntityAssociation = ({
|
|
|
2340
2470
|
isRemoveDisabled = false,
|
|
2341
2471
|
handleIsRemoveDisabled
|
|
2342
2472
|
}) => {
|
|
2343
|
-
const {
|
|
2473
|
+
const { t } = useTranslation();
|
|
2344
2474
|
const [showingActions, setShowingActions] = useState(false);
|
|
2345
2475
|
const [isStatusRemoving, setIsStatusRemoving] = useState(false);
|
|
2346
2476
|
return /* @__PURE__ */ jsxs(
|
|
@@ -2354,7 +2484,7 @@ const EntityAssociation = ({
|
|
|
2354
2484
|
/* @__PURE__ */ jsxs("div", { className: "adyen-kyc-entity-association__top", children: [
|
|
2355
2485
|
/* @__PURE__ */ jsx("h3", { className: "adyen-kyc-entity-association__title", children: name }),
|
|
2356
2486
|
/* @__PURE__ */ jsxs("div", { className: "adyen-kyc-entity-association__info", children: [
|
|
2357
|
-
/* @__PURE__ */ jsx(TaskItemStatus, { status: isStatusRemoving ?
|
|
2487
|
+
/* @__PURE__ */ jsx(TaskItemStatus, { status: isStatusRemoving ? TaskStatuses.REMOVING : status }),
|
|
2358
2488
|
actions && /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-entity-association__actions", children: [
|
|
2359
2489
|
/* @__PURE__ */ jsx(
|
|
2360
2490
|
IconButton,
|
|
@@ -2365,7 +2495,7 @@ const EntityAssociation = ({
|
|
|
2365
2495
|
event.stopPropagation();
|
|
2366
2496
|
setShowingActions(!showingActions);
|
|
2367
2497
|
},
|
|
2368
|
-
ariaLabel:
|
|
2498
|
+
ariaLabel: t(($) => $["toggleAssociationMenu"], { name })
|
|
2369
2499
|
}
|
|
2370
2500
|
),
|
|
2371
2501
|
/* @__PURE__ */ jsx(ActionsMenu, { options: actions, open: showingActions, setOpen: setShowingActions })
|
|
@@ -2386,11 +2516,11 @@ const EntityAssociation = ({
|
|
|
2386
2516
|
{
|
|
2387
2517
|
className: "adyen-kyc-entity-association__tag",
|
|
2388
2518
|
variant: getRoleTagVariant(type),
|
|
2389
|
-
children:
|
|
2519
|
+
children: t(($) => $[getRoleName(type)])
|
|
2390
2520
|
},
|
|
2391
2521
|
type
|
|
2392
2522
|
)) }),
|
|
2393
|
-
status ===
|
|
2523
|
+
status === TaskStatuses.ERROR && /* @__PURE__ */ jsx(
|
|
2394
2524
|
VerificationErrorAlert,
|
|
2395
2525
|
{
|
|
2396
2526
|
className: "adyen-kyc-entity-association-alert",
|
|
@@ -2466,9 +2596,8 @@ const ExemptSettlorTaskItem = ({
|
|
|
2466
2596
|
onEdit,
|
|
2467
2597
|
onDelete
|
|
2468
2598
|
}) => {
|
|
2469
|
-
var _a, _b;
|
|
2470
2599
|
const { i18n } = useI18nContext();
|
|
2471
|
-
const settlorName = exemptSettlor.legalEntityType ===
|
|
2600
|
+
const settlorName = exemptSettlor.legalEntityType === LegalEntityTypes.INDIVIDUAL ? `${exemptSettlor.exemptSettlorName?.firstName} ${exemptSettlor.exemptSettlorName?.lastName}` : exemptSettlor.name ?? "";
|
|
2472
2601
|
const actions = [
|
|
2473
2602
|
{
|
|
2474
2603
|
icon: "edit",
|
|
@@ -2578,7 +2707,7 @@ const UndefinedBeneficiaryTaskItem = ({
|
|
|
2578
2707
|
{
|
|
2579
2708
|
name: undefinedBeneficiary.description,
|
|
2580
2709
|
types: [TrustMemberTypes.UNDEFINED_BENEFICIARY],
|
|
2581
|
-
status:
|
|
2710
|
+
status: TaskStatuses.FINISHED,
|
|
2582
2711
|
actions,
|
|
2583
2712
|
onNavigateToEntity: onEdit
|
|
2584
2713
|
},
|
|
@@ -2593,7 +2722,7 @@ const TrustMembersOverview = ({
|
|
|
2593
2722
|
const { data: rootLe, isLoading } = useLegalEntity(ROOT_LE);
|
|
2594
2723
|
const { data: trustLe, refetch: refetchTrust } = useAssociatedLegalEntity(
|
|
2595
2724
|
rootLe,
|
|
2596
|
-
|
|
2725
|
+
LegalEntityTypes.TRUST
|
|
2597
2726
|
);
|
|
2598
2727
|
const trustMembers = useTrustMembers();
|
|
2599
2728
|
const { mutateAsync: updateLegalEntity } = useUpdateLegalEntity();
|
|
@@ -2649,6 +2778,7 @@ const TrustMembersOverviewInner = ({
|
|
|
2649
2778
|
navigateToEditTrustMemberOwner
|
|
2650
2779
|
}) => {
|
|
2651
2780
|
const { i18n } = useI18nContext();
|
|
2781
|
+
const { t } = useTranslation("common");
|
|
2652
2782
|
const trustMemberRequirements = DEFAULT_TRUST_MEMBER_REQUIREMENTS;
|
|
2653
2783
|
const trustMembersWithOneOfGivenRoles = (roleTypes) => trustMembers.filter(
|
|
2654
2784
|
({ roles }) => roleTypes.some((label) => roles.includes(label))
|
|
@@ -2681,15 +2811,7 @@ const TrustMembersOverviewInner = ({
|
|
|
2681
2811
|
ContextGuidance,
|
|
2682
2812
|
{
|
|
2683
2813
|
title: i18n.get("whatIsTheDifferenceBetweenTheseRoles"),
|
|
2684
|
-
content: /* @__PURE__ */ jsx("ul", { className: "adyen-kyc-guidance-list", children: trustMemberRequirements.map(({ label }) => /* @__PURE__ */ jsx(
|
|
2685
|
-
"li",
|
|
2686
|
-
{
|
|
2687
|
-
dangerouslySetInnerHTML: {
|
|
2688
|
-
__html: i18n.get(`${label}GuideDescription`)
|
|
2689
|
-
}
|
|
2690
|
-
},
|
|
2691
|
-
label
|
|
2692
|
-
)) }),
|
|
2814
|
+
content: /* @__PURE__ */ jsx("ul", { className: "adyen-kyc-guidance-list", children: trustMemberRequirements.map(({ label }) => /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(Trans, { t, ns: "common", i18nKey: ($) => $[`${label}GuideDescription`] }) }, label)) }),
|
|
2693
2815
|
titleId: "whatIsTheDifferenceBetweenTheseRoles",
|
|
2694
2816
|
contentId: "differenceBetweenTrustMemberRoles"
|
|
2695
2817
|
}
|
|
@@ -2793,13 +2915,13 @@ const TrustMembersOverviewInner = ({
|
|
|
2793
2915
|
);
|
|
2794
2916
|
};
|
|
2795
2917
|
const createDefaultMember = (selectedMember, selectedEntityType, selectedRoles) => {
|
|
2796
|
-
const firstRole = selectedRoles
|
|
2918
|
+
const firstRole = selectedRoles?.[0];
|
|
2797
2919
|
return {
|
|
2798
|
-
memberType:
|
|
2799
|
-
roles: selectedRoles ||
|
|
2920
|
+
memberType: selectedMember?.memberType || firstRole,
|
|
2921
|
+
roles: selectedRoles || selectedMember?.roles || [UnincorporatedPartnershipMemberTypes.SECONDARY_PARTNER],
|
|
2800
2922
|
legalEntityType: selectedEntityType,
|
|
2801
|
-
legalEntityId:
|
|
2802
|
-
name:
|
|
2923
|
+
legalEntityId: selectedMember?.legalEntityId || "",
|
|
2924
|
+
name: selectedMember?.name || ""
|
|
2803
2925
|
};
|
|
2804
2926
|
};
|
|
2805
2927
|
const useUnincorporatedPartnershipNavigation = ({ navigateTo }) => {
|
|
@@ -2813,9 +2935,9 @@ const useUnincorporatedPartnershipNavigation = ({ navigateTo }) => {
|
|
|
2813
2935
|
}) => {
|
|
2814
2936
|
const createdMember = createDefaultMember(selectedMember, selectedEntityType, selectedRoles);
|
|
2815
2937
|
setActiveMember(createdMember);
|
|
2816
|
-
if (rootLegalEntityId.value ===
|
|
2938
|
+
if (rootLegalEntityId.value === createdMember?.legalEntityId) {
|
|
2817
2939
|
navigateTo(
|
|
2818
|
-
createdMember.legalEntityType ===
|
|
2940
|
+
createdMember.legalEntityType === LegalEntityTypes.INDIVIDUAL ? TaskTypes.INDIVIDUAL : TaskTypes.BUSINESS_DETAILS
|
|
2819
2941
|
);
|
|
2820
2942
|
return;
|
|
2821
2943
|
}
|
|
@@ -2824,7 +2946,7 @@ const useUnincorporatedPartnershipNavigation = ({ navigateTo }) => {
|
|
|
2824
2946
|
return;
|
|
2825
2947
|
}
|
|
2826
2948
|
navigateTo(
|
|
2827
|
-
|
|
2949
|
+
createdMember?.legalEntityType === LegalEntityTypes.ORGANIZATION ? TaskTypes.UNINCORPORATED_PARTNERSHIP_MEMBER_COMPANY : TaskTypes.UNINCORPORATED_PARTNERSHIP_MEMBER_INDIVIDUAL
|
|
2828
2950
|
);
|
|
2829
2951
|
};
|
|
2830
2952
|
return {
|
|
@@ -2906,12 +3028,12 @@ const regularForms = {
|
|
|
2906
3028
|
}
|
|
2907
3029
|
};
|
|
2908
3030
|
const leTypeCardDetails = {
|
|
2909
|
-
[
|
|
3031
|
+
[LegalEntityTypes.INDIVIDUAL]: {
|
|
2910
3032
|
id: "individual",
|
|
2911
3033
|
name: "individualMember",
|
|
2912
3034
|
description: "partnerNotABusiness"
|
|
2913
3035
|
},
|
|
2914
|
-
[
|
|
3036
|
+
[LegalEntityTypes.ORGANIZATION]: {
|
|
2915
3037
|
id: "organization",
|
|
2916
3038
|
name: "companyMember",
|
|
2917
3039
|
description: "partnerIsABusiness"
|
|
@@ -2921,40 +3043,40 @@ function getUboStatus(roles, roleType, existingMember) {
|
|
|
2921
3043
|
if (!existingMember) {
|
|
2922
3044
|
return void 0;
|
|
2923
3045
|
}
|
|
2924
|
-
return
|
|
3046
|
+
return roles?.includes(roleType) ? "yes" : "no";
|
|
2925
3047
|
}
|
|
2926
3048
|
function UnincorporatedPartnershipRoleAndTypeDropin({
|
|
2927
3049
|
onNavigateToMember,
|
|
2928
3050
|
activeMember
|
|
2929
3051
|
}) {
|
|
2930
|
-
const {
|
|
3052
|
+
const { t } = useTranslation(["common", "unincorpPartnership"]);
|
|
2931
3053
|
const [shouldValidate, setShouldValidate] = useState(false);
|
|
2932
3054
|
const activeForm = regularForms.roleAndEntityType;
|
|
2933
3055
|
const formUtils = createFormUtils(
|
|
2934
3056
|
{},
|
|
2935
|
-
|
|
3057
|
+
t
|
|
2936
3058
|
);
|
|
2937
3059
|
const formsWithValidity = Object.values(regularForms).map((form) => ({
|
|
2938
3060
|
formId: form.formId,
|
|
2939
3061
|
formName: form.formName,
|
|
2940
3062
|
isValid: false
|
|
2941
3063
|
}));
|
|
2942
|
-
const existingMember = activeMember
|
|
3064
|
+
const existingMember = activeMember?.legalEntityId;
|
|
2943
3065
|
const defaultData = {
|
|
2944
|
-
entityType: activeMember
|
|
3066
|
+
entityType: activeMember?.legalEntityType,
|
|
2945
3067
|
uboThroughControl: getUboStatus(
|
|
2946
|
-
activeMember
|
|
3068
|
+
activeMember?.roles,
|
|
2947
3069
|
UnincorporatedPartnershipMemberTypes.CONTROLLING_PERSON,
|
|
2948
3070
|
existingMember
|
|
2949
3071
|
),
|
|
2950
3072
|
uboThroughOwnership: getUboStatus(
|
|
2951
|
-
activeMember
|
|
3073
|
+
activeMember?.roles,
|
|
2952
3074
|
UnincorporatedPartnershipMemberTypes.OWNER,
|
|
2953
3075
|
existingMember
|
|
2954
3076
|
)
|
|
2955
3077
|
};
|
|
2956
3078
|
const decideFields = (data2) => {
|
|
2957
|
-
if (data2.entityType ===
|
|
3079
|
+
if (data2.entityType === LegalEntityTypes.INDIVIDUAL) {
|
|
2958
3080
|
return ["entityType", "uboThroughControl", "uboThroughOwnership"];
|
|
2959
3081
|
}
|
|
2960
3082
|
return ["entityType"];
|
|
@@ -2966,12 +3088,14 @@ function UnincorporatedPartnershipRoleAndTypeDropin({
|
|
|
2966
3088
|
shouldValidate
|
|
2967
3089
|
});
|
|
2968
3090
|
const onNextClick = () => {
|
|
2969
|
-
if (Object.values(data).some((fieldValue) => !fieldValue) && data.entityType !==
|
|
3091
|
+
if (Object.values(data).some((fieldValue) => !fieldValue) && data.entityType !== LegalEntityTypes.ORGANIZATION) {
|
|
2970
3092
|
setShouldValidate(true);
|
|
2971
3093
|
return;
|
|
2972
3094
|
}
|
|
2973
|
-
const selectedRoles = [
|
|
2974
|
-
|
|
3095
|
+
const selectedRoles = [
|
|
3096
|
+
UnincorporatedPartnershipMemberTypes.SECONDARY_PARTNER
|
|
3097
|
+
];
|
|
3098
|
+
if (data.entityType === LegalEntityTypes.INDIVIDUAL) {
|
|
2975
3099
|
if (data.uboThroughControl === "yes") {
|
|
2976
3100
|
selectedRoles.push(UnincorporatedPartnershipMemberTypes.CONTROLLING_PERSON);
|
|
2977
3101
|
}
|
|
@@ -2990,7 +3114,7 @@ function UnincorporatedPartnershipRoleAndTypeDropin({
|
|
|
2990
3114
|
FormNavigation,
|
|
2991
3115
|
{
|
|
2992
3116
|
forms: formsWithValidity,
|
|
2993
|
-
activeForm: formsWithValidity.find((form) => form.formId === activeForm.formId) ||
|
|
3117
|
+
activeForm: formsWithValidity.find((form) => form.formId === activeForm.formId) || formsWithValidity?.[0],
|
|
2994
3118
|
taskName: "unincorporatedPartnershipMembers",
|
|
2995
3119
|
gotoForm: () => {
|
|
2996
3120
|
}
|
|
@@ -3005,8 +3129,8 @@ function UnincorporatedPartnershipRoleAndTypeDropin({
|
|
|
3005
3129
|
/* @__PURE__ */ jsx(
|
|
3006
3130
|
FormHeader,
|
|
3007
3131
|
{
|
|
3008
|
-
heading:
|
|
3009
|
-
description:
|
|
3132
|
+
heading: t(($) => $["roleAndEntityType"]),
|
|
3133
|
+
description: t(($) => $["partnerRoleDescription"], { ns: "unincorpPartnership" })
|
|
3010
3134
|
}
|
|
3011
3135
|
),
|
|
3012
3136
|
/* @__PURE__ */ jsx(
|
|
@@ -3022,7 +3146,7 @@ function UnincorporatedPartnershipRoleAndTypeDropin({
|
|
|
3022
3146
|
...childProps,
|
|
3023
3147
|
name: "entityType",
|
|
3024
3148
|
options: trustMemberLegalEntityTypes,
|
|
3025
|
-
selected: data
|
|
3149
|
+
selected: data?.entityType,
|
|
3026
3150
|
onSelect: (option) => handleChangeFor("entityType")(option),
|
|
3027
3151
|
optionId: (option) => leTypeCardDetails[option].id,
|
|
3028
3152
|
optionName: (option) => leTypeCardDetails[option].name,
|
|
@@ -3042,7 +3166,7 @@ function UnincorporatedPartnershipRoleAndTypeDropin({
|
|
|
3042
3166
|
errors,
|
|
3043
3167
|
fieldProblems
|
|
3044
3168
|
),
|
|
3045
|
-
value: data
|
|
3169
|
+
value: data?.uboThroughOwnership
|
|
3046
3170
|
}
|
|
3047
3171
|
),
|
|
3048
3172
|
schema.includes("uboThroughControl") && /* @__PURE__ */ jsx(
|
|
@@ -3055,13 +3179,13 @@ function UnincorporatedPartnershipRoleAndTypeDropin({
|
|
|
3055
3179
|
errors,
|
|
3056
3180
|
fieldProblems
|
|
3057
3181
|
),
|
|
3058
|
-
value: data
|
|
3182
|
+
value: data?.uboThroughControl
|
|
3059
3183
|
}
|
|
3060
3184
|
)
|
|
3061
3185
|
] })
|
|
3062
3186
|
}
|
|
3063
3187
|
),
|
|
3064
|
-
/* @__PURE__ */ jsx("div", { className: styles$1.adyenKycRoleAndTypeActionBar, children: /* @__PURE__ */ jsx(Button, { onClick: onNextClick, children:
|
|
3188
|
+
/* @__PURE__ */ jsx("div", { className: styles$1.adyenKycRoleAndTypeActionBar, children: /* @__PURE__ */ jsx(Button, { onClick: onNextClick, children: t(($) => $["continue"]) }) })
|
|
3065
3189
|
] })
|
|
3066
3190
|
] });
|
|
3067
3191
|
}
|
|
@@ -3089,12 +3213,9 @@ const alertHeader = "adyen-kyc-alert-header";
|
|
|
3089
3213
|
const styles = {
|
|
3090
3214
|
alertHeader
|
|
3091
3215
|
};
|
|
3092
|
-
const isPrimaryPartner = (member) =>
|
|
3093
|
-
var _a;
|
|
3094
|
-
return (_a = member == null ? void 0 : member.roles) == null ? void 0 : _a.includes("primaryPartner");
|
|
3095
|
-
};
|
|
3216
|
+
const isPrimaryPartner = (member) => member?.roles?.includes("primaryPartner");
|
|
3096
3217
|
const isMemberMissingOwner = (member) => {
|
|
3097
|
-
return !isPrimaryPartner(member) && member.legalEntityType ===
|
|
3218
|
+
return !isPrimaryPartner(member) && member.legalEntityType === LegalEntityTypes.ORGANIZATION && !member.ownerId;
|
|
3098
3219
|
};
|
|
3099
3220
|
const UnincorporatedPartnershipMembersOverview = ({
|
|
3100
3221
|
navigateBackToTaskList,
|
|
@@ -3105,7 +3226,7 @@ const UnincorporatedPartnershipMembersOverview = ({
|
|
|
3105
3226
|
const { data: rootLe } = useLegalEntity(ROOT_LE);
|
|
3106
3227
|
const { data: partnershipLe, refetch: refetchPartnership } = useAssociatedLegalEntity(
|
|
3107
3228
|
rootLe,
|
|
3108
|
-
|
|
3229
|
+
LegalEntityTypes.UNINCORPORATED_PARTNERSHIP
|
|
3109
3230
|
);
|
|
3110
3231
|
const partnershipMembers = useUnincorporatedPartnershipMembers();
|
|
3111
3232
|
const { mutateAsync: updateLegalEntity } = useUpdateLegalEntity();
|
|
@@ -3140,11 +3261,11 @@ const UnincorporatedPartnershipMembersOverview = ({
|
|
|
3140
3261
|
})
|
|
3141
3262
|
}
|
|
3142
3263
|
];
|
|
3143
|
-
if (member.legalEntityType ===
|
|
3264
|
+
if (member.legalEntityType === LegalEntityTypes.ORGANIZATION && !isPrimaryPartner(member)) {
|
|
3144
3265
|
const missingOwner = isMemberMissingOwner(member);
|
|
3145
3266
|
baseActions.push({
|
|
3146
3267
|
icon: missingOwner ? "plus" : "edit",
|
|
3147
|
-
onSelect: () => navigateToEditMemberOwner(member
|
|
3268
|
+
onSelect: () => navigateToEditMemberOwner(member?.ownerId, member?.legalEntityId),
|
|
3148
3269
|
label: i18n.get(missingOwner ? "addOwnerToTrustMember" : "editOwnerOfTrustMember", {
|
|
3149
3270
|
values: { trustMember: member.name }
|
|
3150
3271
|
})
|
|
@@ -3174,7 +3295,7 @@ const UnincorporatedPartnershipMembersOverview = ({
|
|
|
3174
3295
|
onClick: (e) => {
|
|
3175
3296
|
e.preventDefault();
|
|
3176
3297
|
e.stopPropagation();
|
|
3177
|
-
navigateToEditMemberOwner(member
|
|
3298
|
+
navigateToEditMemberOwner(member?.ownerId, member?.legalEntityId);
|
|
3178
3299
|
},
|
|
3179
3300
|
variant: "link",
|
|
3180
3301
|
children: i18n.get("providePersonalDetailsOfOwner")
|
|
@@ -3202,7 +3323,7 @@ const UnincorporatedPartnershipMembersOverview = ({
|
|
|
3202
3323
|
types: member.roles,
|
|
3203
3324
|
name: member.name,
|
|
3204
3325
|
status: getTaskStatus2(
|
|
3205
|
-
member.legalEntityType ===
|
|
3326
|
+
member.legalEntityType === LegalEntityTypes.INDIVIDUAL ? TaskTypes.UNINCORPORATED_PARTNERSHIP_MEMBER_INDIVIDUAL : TaskTypes.UNINCORPORATED_PARTNERSHIP_MEMBER_COMPANY,
|
|
3206
3327
|
member.legalEntityId
|
|
3207
3328
|
),
|
|
3208
3329
|
actions: getActions(member),
|
|
@@ -3263,7 +3384,7 @@ const useNavigation = ({ legalEntity, onNavigate }) => {
|
|
|
3263
3384
|
const handleNavigation = useCallback(
|
|
3264
3385
|
(task) => {
|
|
3265
3386
|
userEvents.updateBaseTrackingPayload({ task });
|
|
3266
|
-
onNavigate
|
|
3387
|
+
onNavigate?.(task);
|
|
3267
3388
|
},
|
|
3268
3389
|
[onNavigate]
|
|
3269
3390
|
);
|
|
@@ -3288,11 +3409,11 @@ const useNavigation = ({ legalEntity, onNavigate }) => {
|
|
|
3288
3409
|
}
|
|
3289
3410
|
if (prevTask === TaskTypes.TASKS_OVERVIEW) {
|
|
3290
3411
|
setTaskHistory([TaskTypes.TASKS_OVERVIEW]);
|
|
3291
|
-
handleNavigation
|
|
3412
|
+
handleNavigation?.(TaskTypes.TASKS_OVERVIEW);
|
|
3292
3413
|
return;
|
|
3293
3414
|
}
|
|
3294
3415
|
setTaskHistory(taskHistory.slice(0, -1 * stepCount));
|
|
3295
|
-
handleNavigation
|
|
3416
|
+
handleNavigation?.(prevTask);
|
|
3296
3417
|
userEvents.updateBaseTrackingPayload({ task: prevTask });
|
|
3297
3418
|
},
|
|
3298
3419
|
[taskHistory, handleNavigation]
|
|
@@ -3362,80 +3483,82 @@ const getDefaultTask = ({
|
|
|
3362
3483
|
return TaskTypes.TASKS_OVERVIEW;
|
|
3363
3484
|
};
|
|
3364
3485
|
const hasProgressedBeyondEntitySelection = (legalEntity) => {
|
|
3365
|
-
|
|
3366
|
-
const hasOwnEntityAssocation = (_a = legalEntity.entityAssociations) == null ? void 0 : _a.some(
|
|
3486
|
+
const hasOwnEntityAssocation = legalEntity.entityAssociations?.some(
|
|
3367
3487
|
(ea) => ea.associatorId === legalEntity.id
|
|
3368
3488
|
);
|
|
3369
|
-
const hasOrganizationType =
|
|
3489
|
+
const hasOrganizationType = legalEntity.organization?.type;
|
|
3370
3490
|
return hasOwnEntityAssocation || !!hasOrganizationType;
|
|
3371
3491
|
};
|
|
3372
3492
|
const Introduction = lazy(
|
|
3373
|
-
async () => (await import("./Introduction-
|
|
3493
|
+
async () => (await import("./Introduction-B1WXHc-7.js")).Introduction
|
|
3374
3494
|
);
|
|
3375
3495
|
const BusinessTypeSelectionPage = lazy(
|
|
3376
|
-
async () => (await import("./BusinessTypeSelectionPage-
|
|
3496
|
+
async () => (await import("./BusinessTypeSelectionPage-6sF2ce3o.js")).BusinessTypeSelectionPage
|
|
3377
3497
|
);
|
|
3378
3498
|
const SingpassSelection = lazy(
|
|
3379
|
-
async () => (await import("./SingpassSelection-
|
|
3499
|
+
async () => (await import("./SingpassSelection-BeUj9Kdy.js")).SingpassSelection
|
|
3380
3500
|
);
|
|
3381
3501
|
const AccountSetupRejected = lazy(
|
|
3382
|
-
async () => (await import("./AccountSetupRejected-
|
|
3502
|
+
async () => (await import("./AccountSetupRejected-CQjHA557.js")).AccountSetupRejected
|
|
3383
3503
|
);
|
|
3384
3504
|
const DecisionMakers = lazy(
|
|
3385
|
-
async () => (await import("./DecisionMakers-
|
|
3505
|
+
async () => (await import("./DecisionMakers-DthVv8_t.js")).DecisionMakers
|
|
3386
3506
|
);
|
|
3387
3507
|
const CustomerSupport = lazy(
|
|
3388
|
-
async () => (await import("./CustomerSupport-
|
|
3508
|
+
async () => (await import("./CustomerSupport-CoLWcgoS.js")).CustomerSupport
|
|
3389
3509
|
);
|
|
3390
|
-
const Review = lazy(async () => (await import("./Review-
|
|
3510
|
+
const Review = lazy(async () => (await import("./Review-jBq7cFVv.js")).Review);
|
|
3391
3511
|
const SignPCIComponent = lazy(
|
|
3392
|
-
async () => (await import("./SignPCIComponent-
|
|
3512
|
+
async () => (await import("./SignPCIComponent-By4PazmA.js")).SignPCIComponent
|
|
3393
3513
|
);
|
|
3394
3514
|
const AcceptTermsOfService = lazy(
|
|
3395
|
-
async () => (await import("./AcceptTermsOfServiceComponent-
|
|
3515
|
+
async () => (await import("./AcceptTermsOfServiceComponent-ilX6szf9.js")).AcceptTermsOfServiceComponent
|
|
3396
3516
|
);
|
|
3397
3517
|
const TaxReportingDropin = lazy(
|
|
3398
|
-
async () => (await import("./TaxReportingDropin-
|
|
3518
|
+
async () => (await import("./TaxReportingDropin-BQqDUn9I.js")).TaxReportingDropin
|
|
3399
3519
|
);
|
|
3400
3520
|
const PayoutDetailsPage = lazy(
|
|
3401
|
-
async () => (await import("./StoreProvider-
|
|
3521
|
+
async () => (await import("./StoreProvider-O9jwxfG8.js").then((n) => n.fD)).PayoutDetailsPage
|
|
3402
3522
|
);
|
|
3403
3523
|
const RootBusinessDetailsPage = lazy(
|
|
3404
|
-
async () => (await import("./RootBusinessDetailsPage-
|
|
3524
|
+
async () => (await import("./RootBusinessDetailsPage-BfO0Xb7n.js")).RootBusinessDetailsPage
|
|
3405
3525
|
);
|
|
3406
3526
|
const SoleProprietorshipPage = lazy(
|
|
3407
|
-
async () => (await import("./SoleProprietorshipPage-
|
|
3527
|
+
async () => (await import("./SoleProprietorshipPage-CZPeKEEl.js")).SoleProprietorshipPage
|
|
3408
3528
|
);
|
|
3409
3529
|
const TrustMemberCompanyPage = lazy(
|
|
3410
|
-
async () => (await import("./TrustMemberCompanyPage-
|
|
3530
|
+
async () => (await import("./TrustMemberCompanyPage-C9aFr4Bm.js")).TrustMemberCompanyPage
|
|
3411
3531
|
);
|
|
3412
3532
|
const UnincorporatedPartnershipMemberCompanyPage = lazy(
|
|
3413
|
-
async () => (await import("./UnincorporatedPartnershipMemberCompanyPage-
|
|
3533
|
+
async () => (await import("./UnincorporatedPartnershipMemberCompanyPage-DFe_N3gH.js")).UnincorporatedPartnershipMemberCompanyPage
|
|
3414
3534
|
);
|
|
3415
3535
|
const BusinessFinancingPage = lazy(
|
|
3416
|
-
async () => (await import("./BusinessFinancingPage-
|
|
3536
|
+
async () => (await import("./BusinessFinancingPage-BIEuNfKE.js")).BusinessFinancingPage
|
|
3417
3537
|
);
|
|
3418
3538
|
const TrustDetailsPage = lazy(
|
|
3419
|
-
async () => (await import("./TrustDetailsPage-
|
|
3539
|
+
async () => (await import("./TrustDetailsPage-BQKZ_ZyU.js")).TrustDetailsPage
|
|
3420
3540
|
);
|
|
3421
3541
|
const SourceOfFundsPage = lazy(
|
|
3422
|
-
async () => (await import("./SourceOfFundsPage-
|
|
3542
|
+
async () => (await import("./SourceOfFundsPage-CI1qdFId.js")).SourceOfFundsPage
|
|
3423
3543
|
);
|
|
3424
3544
|
const RootIndividualDetailsPage = lazy(
|
|
3425
|
-
async () => (await import("./RootIndividualDetailsPage-
|
|
3545
|
+
async () => (await import("./RootIndividualDetailsPage-DzmHoceW.js")).RootIndividualDetailsPage
|
|
3426
3546
|
);
|
|
3427
3547
|
const LegalRepresentativeDetailsPage = lazy(
|
|
3428
|
-
async () => (await import("./LegalRepresentativeDetailsPage-
|
|
3548
|
+
async () => (await import("./LegalRepresentativeDetailsPage-9xm-XCto.js")).LegalRepresentativeDetailsPage
|
|
3429
3549
|
);
|
|
3430
3550
|
const TrustMemberIndividualPage = lazy(
|
|
3431
|
-
async () => (await import("./TrustMemberIndividualPage-
|
|
3551
|
+
async () => (await import("./TrustMemberIndividualPage-Ci7hwMA_.js")).TrustMemberIndividualPage
|
|
3432
3552
|
);
|
|
3433
3553
|
const UnincorporatedPartnershipIndividualPage = lazy(
|
|
3434
|
-
async () => (await import("./UnincorporatedPartnershipIndividualPage-
|
|
3554
|
+
async () => (await import("./UnincorporatedPartnershipIndividualPage-XQsgF3ou.js")).UnincorporatedPartnershipIndividualPage
|
|
3435
3555
|
);
|
|
3436
3556
|
const DecisionMakerDetailsPage = lazy(
|
|
3437
|
-
async () => (await import("./DecisionMakerDetailsPage-
|
|
3557
|
+
async () => (await import("./DecisionMakerDetailsPage-CvmwdHqV.js")).DecisionMakerDetailsPage
|
|
3438
3558
|
);
|
|
3559
|
+
function isIn(values, x) {
|
|
3560
|
+
return values.includes(x);
|
|
3561
|
+
}
|
|
3439
3562
|
const PAGES_WITH_POLLING = [TaskTypes.DECISION_MAKER_OVERVIEW, TaskTypes.TASKS_OVERVIEW];
|
|
3440
3563
|
const logger = createLogger();
|
|
3441
3564
|
function DropinComposer({
|
|
@@ -3444,7 +3567,6 @@ function DropinComposer({
|
|
|
3444
3567
|
onNavigate = noop,
|
|
3445
3568
|
openBankingPartnerConfigId
|
|
3446
3569
|
}) {
|
|
3447
|
-
var _a;
|
|
3448
3570
|
const { accountHolder, setAccountHolder } = useAccountHolder();
|
|
3449
3571
|
const { setCanSeeEntitySelection } = useCanSeeEntitySelection(legalEntityResponse.id);
|
|
3450
3572
|
const userEvents = useAnalyticsContext();
|
|
@@ -3480,7 +3602,7 @@ function DropinComposer({
|
|
|
3480
3602
|
refetchInterval: (query) => {
|
|
3481
3603
|
const legalEntityData2 = query.state.data;
|
|
3482
3604
|
if (legalEntityData2) {
|
|
3483
|
-
return !currentTask || !PAGES_WITH_POLLING
|
|
3605
|
+
return !currentTask || !isIn(PAGES_WITH_POLLING, currentTask) || hasAllCapabilitiesResolved(legalEntityData2) || hasRejectedCapabilities(legalEntityData2) ? false : 3e3;
|
|
3484
3606
|
}
|
|
3485
3607
|
return 3e3;
|
|
3486
3608
|
}
|
|
@@ -3508,12 +3630,12 @@ function DropinComposer({
|
|
|
3508
3630
|
const singpassTabRef = useRef(null);
|
|
3509
3631
|
const { data: trust, refetch: refetchTrust } = useAssociatedLegalEntity(
|
|
3510
3632
|
rootLegalEntity,
|
|
3511
|
-
|
|
3633
|
+
LegalEntityTypes.TRUST
|
|
3512
3634
|
);
|
|
3513
|
-
const { data: unincorporatedPartnership, refetch: refetchUnincorporatedPartnership } = useAssociatedLegalEntity(rootLegalEntity,
|
|
3635
|
+
const { data: unincorporatedPartnership, refetch: refetchUnincorporatedPartnership } = useAssociatedLegalEntity(rootLegalEntity, LegalEntityTypes.UNINCORPORATED_PARTNERSHIP);
|
|
3514
3636
|
const { data: soleProp } = useAssociatedLegalEntity(
|
|
3515
3637
|
rootLegalEntity,
|
|
3516
|
-
|
|
3638
|
+
LegalEntityTypes.SOLE_PROPRIETORSHIP
|
|
3517
3639
|
);
|
|
3518
3640
|
const [parentId, setParentId] = useState();
|
|
3519
3641
|
const [currentDecisionMakerId, setCurrentDecisionMakerId] = useState();
|
|
@@ -3538,7 +3660,6 @@ function DropinComposer({
|
|
|
3538
3660
|
navigateTo
|
|
3539
3661
|
});
|
|
3540
3662
|
const handleSingpassSelectionNextClick = async (method) => {
|
|
3541
|
-
var _a2;
|
|
3542
3663
|
if (method === "singpass") {
|
|
3543
3664
|
try {
|
|
3544
3665
|
const authUrl = await handleInitiateSingpassMyInfoLogin();
|
|
@@ -3547,7 +3668,7 @@ function DropinComposer({
|
|
|
3547
3668
|
}
|
|
3548
3669
|
setHasSeenSingpassSelection(true);
|
|
3549
3670
|
singpassTabRef.current = window.open(authUrl, "_blank");
|
|
3550
|
-
|
|
3671
|
+
singpassTabRef.current?.focus();
|
|
3551
3672
|
} catch (e) {
|
|
3552
3673
|
logger.error(e);
|
|
3553
3674
|
if (typeof e === "string") handleSingpassMyInfoLoginFailure(e);
|
|
@@ -3600,7 +3721,7 @@ function DropinComposer({
|
|
|
3600
3721
|
}
|
|
3601
3722
|
};
|
|
3602
3723
|
const handleOnSubmit = async (data, backStepCount) => {
|
|
3603
|
-
onSubmit
|
|
3724
|
+
onSubmit?.(data);
|
|
3604
3725
|
await refetchLegalEntity();
|
|
3605
3726
|
navigateBack(backStepCount);
|
|
3606
3727
|
};
|
|
@@ -3638,29 +3759,27 @@ function DropinComposer({
|
|
|
3638
3759
|
handleSingpassMyInfoLoginReset();
|
|
3639
3760
|
},
|
|
3640
3761
|
onClick: async () => {
|
|
3641
|
-
var _a2;
|
|
3642
3762
|
try {
|
|
3643
3763
|
const authUrl = await handleInitiateSingpassMyInfoLogin();
|
|
3644
3764
|
singpassTabRef.current = window.open(authUrl);
|
|
3645
|
-
|
|
3765
|
+
singpassTabRef.current?.focus();
|
|
3646
3766
|
} catch (e) {
|
|
3647
3767
|
logger.error(e);
|
|
3648
3768
|
if (typeof e === "string") handleSingpassMyInfoLoginFailure(e);
|
|
3649
3769
|
}
|
|
3650
3770
|
},
|
|
3651
3771
|
onMessage: async ({ data: { isSuccessful } }) => {
|
|
3652
|
-
var _a2;
|
|
3653
3772
|
if (isSuccessful) {
|
|
3654
3773
|
handleSingpassMyInfoLoginSuccess();
|
|
3655
3774
|
await refetchLegalEntity();
|
|
3656
|
-
|
|
3775
|
+
singpassTabRef.current?.close();
|
|
3657
3776
|
} else {
|
|
3658
3777
|
handleSingpassMyInfoLoginFailure(
|
|
3659
|
-
legalEntityResponse.type ===
|
|
3778
|
+
legalEntityResponse.type === LegalEntityTypes.INDIVIDUAL ? "weCouldntConnectToMyinfo" : "weCouldntConnectToMyinfoBusiness"
|
|
3660
3779
|
);
|
|
3661
3780
|
}
|
|
3662
3781
|
},
|
|
3663
|
-
legalEntityType: legalEntityResponse
|
|
3782
|
+
legalEntityType: legalEntityResponse?.type
|
|
3664
3783
|
}
|
|
3665
3784
|
) : void 0;
|
|
3666
3785
|
if (isLoadingConfiguration) {
|
|
@@ -3721,15 +3840,15 @@ function DropinComposer({
|
|
|
3721
3840
|
RootIndividualDetailsPage,
|
|
3722
3841
|
{
|
|
3723
3842
|
onSubmit: async (data) => {
|
|
3724
|
-
onSubmit
|
|
3843
|
+
onSubmit?.(data);
|
|
3725
3844
|
await refetchLegalEntity();
|
|
3726
3845
|
navigateTo(TaskTypes.TASKS_OVERVIEW);
|
|
3727
3846
|
setTargetLegalEntityType(void 0);
|
|
3728
3847
|
},
|
|
3729
3848
|
handleHomeClick: () => navigateTo(TaskTypes.TASKS_OVERVIEW),
|
|
3730
|
-
isTargetLegalEntityType: targetLegalEntityType ===
|
|
3849
|
+
isTargetLegalEntityType: targetLegalEntityType === LegalEntityTypes.INDIVIDUAL,
|
|
3731
3850
|
trustedFields: singpassTrustedFields,
|
|
3732
|
-
trustedFieldsProvider: isEligibleForSingpass ?
|
|
3851
|
+
trustedFieldsProvider: isEligibleForSingpass ? TrustedFieldsProviders.SINGPASS : void 0
|
|
3733
3852
|
}
|
|
3734
3853
|
) });
|
|
3735
3854
|
case TaskTypes.CUSTOMER_SUPPORT:
|
|
@@ -3746,13 +3865,13 @@ function DropinComposer({
|
|
|
3746
3865
|
return /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(Loader, {}), children: /* @__PURE__ */ jsx(
|
|
3747
3866
|
DecisionMakerDetailsPage,
|
|
3748
3867
|
{
|
|
3749
|
-
decisionMakerId: currentDecisionMaker
|
|
3868
|
+
decisionMakerId: currentDecisionMaker?.id,
|
|
3750
3869
|
parentCompanyId: parentId,
|
|
3751
3870
|
onSubmit: handleOnSubmit,
|
|
3752
3871
|
handleHomeClick: navigateBack,
|
|
3753
3872
|
trustedFields: singpassTrustedFields,
|
|
3754
|
-
trustedFieldsProvider: isEligibleForSingpass ?
|
|
3755
|
-
trustedRoles:
|
|
3873
|
+
trustedFieldsProvider: isEligibleForSingpass ? TrustedFieldsProviders.SINGPASS : void 0,
|
|
3874
|
+
trustedRoles: trustedEntityAssociations.find((ea) => ea.reference === currentDecisionMaker?.id)?.types || []
|
|
3756
3875
|
}
|
|
3757
3876
|
) });
|
|
3758
3877
|
case TaskTypes.TRUST_MEMBER_COMPANY_OWNER:
|
|
@@ -3773,9 +3892,9 @@ function DropinComposer({
|
|
|
3773
3892
|
return /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(Loader, {}), children: /* @__PURE__ */ jsx(
|
|
3774
3893
|
TrustMemberIndividualPage,
|
|
3775
3894
|
{
|
|
3776
|
-
memberId: currentTrustMemberLe
|
|
3895
|
+
memberId: currentTrustMemberLe?.id,
|
|
3777
3896
|
trustId: trust.id,
|
|
3778
|
-
newMember:
|
|
3897
|
+
newMember: trustMember?.legalEntityId === isNewEntity ? trustMember : void 0,
|
|
3779
3898
|
onSubmit: (data) => handleOnSubmit(data, 2),
|
|
3780
3899
|
handleBackClick: navigateBack,
|
|
3781
3900
|
handleHomeClick: () => navigateTo(TaskTypes.TRUST_MEMBER_OVERVIEW)
|
|
@@ -3786,13 +3905,13 @@ function DropinComposer({
|
|
|
3786
3905
|
RootBusinessDetailsPage,
|
|
3787
3906
|
{
|
|
3788
3907
|
onSubmit: async (data) => {
|
|
3789
|
-
onSubmit
|
|
3908
|
+
onSubmit?.(data);
|
|
3790
3909
|
await refetchLegalEntity();
|
|
3791
3910
|
navigateTo(TaskTypes.TASKS_OVERVIEW);
|
|
3792
3911
|
setTargetLegalEntityType(void 0);
|
|
3793
3912
|
},
|
|
3794
3913
|
handleHomeClick: navigateBack,
|
|
3795
|
-
isTargetLegalEntityType: targetLegalEntityType ===
|
|
3914
|
+
isTargetLegalEntityType: targetLegalEntityType === LegalEntityTypes.ORGANIZATION
|
|
3796
3915
|
}
|
|
3797
3916
|
) });
|
|
3798
3917
|
case TaskTypes.TRUST_MEMBER_COMPANY:
|
|
@@ -3800,11 +3919,11 @@ function DropinComposer({
|
|
|
3800
3919
|
TrustMemberCompanyPage,
|
|
3801
3920
|
{
|
|
3802
3921
|
trustId: trust.id,
|
|
3803
|
-
trustMemberCompanyId: currentTrustMemberLe
|
|
3804
|
-
newMember:
|
|
3922
|
+
trustMemberCompanyId: currentTrustMemberLe?.id,
|
|
3923
|
+
newMember: trustMember?.legalEntityId === isNewEntity ? trustMember : void 0,
|
|
3805
3924
|
onSubmit: (data) => handleOnSubmit(data, 2),
|
|
3806
3925
|
handleHomeClick: navigateBack,
|
|
3807
|
-
isTargetLegalEntityType: targetLegalEntityType ===
|
|
3926
|
+
isTargetLegalEntityType: targetLegalEntityType === LegalEntityTypes.ORGANIZATION
|
|
3808
3927
|
}
|
|
3809
3928
|
) });
|
|
3810
3929
|
case TaskTypes.PAYOUT:
|
|
@@ -3825,7 +3944,7 @@ function DropinComposer({
|
|
|
3825
3944
|
TrustDetailsPage,
|
|
3826
3945
|
{
|
|
3827
3946
|
taskType: TaskTypes.TRUST,
|
|
3828
|
-
trustId: trust
|
|
3947
|
+
trustId: trust?.id,
|
|
3829
3948
|
onSubmit: (data) => handleOnSubmit(data, 1),
|
|
3830
3949
|
handleHomeClick: navigateBack
|
|
3831
3950
|
}
|
|
@@ -3848,7 +3967,7 @@ function DropinComposer({
|
|
|
3848
3967
|
TrustMemberRoleAndTypePage,
|
|
3849
3968
|
{
|
|
3850
3969
|
trustId: trust.id,
|
|
3851
|
-
memberId: currentTrustMemberLe
|
|
3970
|
+
memberId: currentTrustMemberLe?.id,
|
|
3852
3971
|
navigateToFullDropinFor: onNavigateToTrustMemberEditDetails,
|
|
3853
3972
|
navigateBack: async () => {
|
|
3854
3973
|
await refetchTrust();
|
|
@@ -3861,7 +3980,7 @@ function DropinComposer({
|
|
|
3861
3980
|
TrustDetailsPage,
|
|
3862
3981
|
{
|
|
3863
3982
|
taskType: TaskTypes.UNINCORPORATED_PARTNERSHIP,
|
|
3864
|
-
trustId: unincorporatedPartnership
|
|
3983
|
+
trustId: unincorporatedPartnership?.id,
|
|
3865
3984
|
onSubmit: (data) => handleOnSubmit(data, 1),
|
|
3866
3985
|
handleHomeClick: navigateBack
|
|
3867
3986
|
}
|
|
@@ -3873,8 +3992,8 @@ function DropinComposer({
|
|
|
3873
3992
|
navigateBackToTaskList: navigateBack,
|
|
3874
3993
|
navigateToEditMember: (member) => onNavigateToMember({
|
|
3875
3994
|
selectedMember: member,
|
|
3876
|
-
selectedEntityType: member
|
|
3877
|
-
selectedRoles: member
|
|
3995
|
+
selectedEntityType: member?.legalEntityType,
|
|
3996
|
+
selectedRoles: member?.roles,
|
|
3878
3997
|
roleAndType: true
|
|
3879
3998
|
}),
|
|
3880
3999
|
navigateToEditMemberOwner: (memberOwnerId, memberId) => {
|
|
@@ -3892,14 +4011,14 @@ function DropinComposer({
|
|
|
3892
4011
|
UnincorporatedPartnershipMemberCompanyPage,
|
|
3893
4012
|
{
|
|
3894
4013
|
partnershipId: unincorporatedPartnership.id,
|
|
3895
|
-
partnershipMemberCompanyId: unincorporatedPartnershipMember
|
|
4014
|
+
partnershipMemberCompanyId: unincorporatedPartnershipMember?.legalEntityId,
|
|
3896
4015
|
newMember: (
|
|
3897
4016
|
// empty string for legalEntityId means it's a new member
|
|
3898
|
-
|
|
4017
|
+
unincorporatedPartnershipMember?.legalEntityId === "" ? unincorporatedPartnershipMember : void 0
|
|
3899
4018
|
),
|
|
3900
4019
|
onSubmit: (data) => handleOnSubmit(data, 2),
|
|
3901
4020
|
handleHomeClick: navigateBack,
|
|
3902
|
-
isTargetLegalEntityType: targetLegalEntityType ===
|
|
4021
|
+
isTargetLegalEntityType: targetLegalEntityType === LegalEntityTypes.ORGANIZATION
|
|
3903
4022
|
}
|
|
3904
4023
|
) });
|
|
3905
4024
|
case TaskTypes.UNINCORPORATED_PARTNERSHIP_MEMBER_COMPANY_OWNER:
|
|
@@ -3907,7 +4026,7 @@ function DropinComposer({
|
|
|
3907
4026
|
DecisionMakerDetailsPage,
|
|
3908
4027
|
{
|
|
3909
4028
|
taskType: TaskTypes.UNINCORPORATED_PARTNERSHIP_MEMBER_COMPANY_OWNER,
|
|
3910
|
-
parentCompanyId: unincorporatedPartnershipMember
|
|
4029
|
+
parentCompanyId: unincorporatedPartnershipMember?.legalEntityId,
|
|
3911
4030
|
decisionMakerId: currentDecisionMakerId,
|
|
3912
4031
|
onSubmit: async (data) => {
|
|
3913
4032
|
await handleOnSubmit(data);
|
|
@@ -3920,7 +4039,7 @@ function DropinComposer({
|
|
|
3920
4039
|
return /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(Loader, {}), children: /* @__PURE__ */ jsx(
|
|
3921
4040
|
UnincorporatedPartnershipIndividualPage,
|
|
3922
4041
|
{
|
|
3923
|
-
memberId: unincorporatedPartnershipMember
|
|
4042
|
+
memberId: unincorporatedPartnershipMember?.legalEntityId,
|
|
3924
4043
|
partnershipId: unincorporatedPartnership.id,
|
|
3925
4044
|
member: unincorporatedPartnershipMember,
|
|
3926
4045
|
onSubmit: (data) => {
|
|
@@ -3935,7 +4054,7 @@ function DropinComposer({
|
|
|
3935
4054
|
return /* @__PURE__ */ jsx(
|
|
3936
4055
|
UnincorporatedPartnershipMemberRoleAndTypePage,
|
|
3937
4056
|
{
|
|
3938
|
-
memberId: unincorporatedPartnershipMember
|
|
4057
|
+
memberId: unincorporatedPartnershipMember?.legalEntityId,
|
|
3939
4058
|
onNavigateToMember,
|
|
3940
4059
|
navigateBack: async () => {
|
|
3941
4060
|
await refetchUnincorporatedPartnership();
|
|
@@ -3949,10 +4068,10 @@ function DropinComposer({
|
|
|
3949
4068
|
return /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(Loader, {}), children: /* @__PURE__ */ jsx(
|
|
3950
4069
|
SoleProprietorshipPage,
|
|
3951
4070
|
{
|
|
3952
|
-
solePropId: soleProp
|
|
4071
|
+
solePropId: soleProp?.id,
|
|
3953
4072
|
onSubmit: (data) => handleOnSubmit(data, 1),
|
|
3954
4073
|
handleHomeClick: navigateBack,
|
|
3955
|
-
isTargetLegalEntityType: targetLegalEntityType ===
|
|
4074
|
+
isTargetLegalEntityType: targetLegalEntityType === LegalEntityTypes.ORGANIZATION
|
|
3956
4075
|
}
|
|
3957
4076
|
) });
|
|
3958
4077
|
case TaskTypes.SERVICE_AGREEMENT:
|
|
@@ -3971,7 +4090,7 @@ function DropinComposer({
|
|
|
3971
4090
|
return /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(Loader, {}), children: /* @__PURE__ */ jsx(
|
|
3972
4091
|
LegalRepresentativeDetailsPage,
|
|
3973
4092
|
{
|
|
3974
|
-
legalRepresentativeId: associatedLegalRepresentative
|
|
4093
|
+
legalRepresentativeId: associatedLegalRepresentative?.id,
|
|
3975
4094
|
onSubmit: handleOnSubmit,
|
|
3976
4095
|
handleHomeClick: navigateBack
|
|
3977
4096
|
}
|
|
@@ -3989,7 +4108,7 @@ function DropinComposer({
|
|
|
3989
4108
|
BusinessFinancingPage,
|
|
3990
4109
|
{
|
|
3991
4110
|
onSubmit: async (data) => {
|
|
3992
|
-
onSubmit
|
|
4111
|
+
onSubmit?.(data);
|
|
3993
4112
|
await refetchLegalEntity();
|
|
3994
4113
|
navigateTo(TaskTypes.TASKS_OVERVIEW);
|
|
3995
4114
|
},
|
|
@@ -3998,6 +4117,8 @@ function DropinComposer({
|
|
|
3998
4117
|
) });
|
|
3999
4118
|
case TaskTypes.TAX_REPORTING:
|
|
4000
4119
|
return /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(Loader, {}), children: /* @__PURE__ */ jsx(TaxReportingDropin, { handleHomeClick: () => navigateTo(TaskTypes.TASKS_OVERVIEW) }) });
|
|
4120
|
+
case TaskTypes.BUSINESS_LINES:
|
|
4121
|
+
return /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(Loader, {}), children: /* @__PURE__ */ jsx(RootBusinessLinesPage, { handleHomeClick: () => navigateTo(TaskTypes.TASKS_OVERVIEW) }) });
|
|
4001
4122
|
default:
|
|
4002
4123
|
return null;
|
|
4003
4124
|
}
|
|
@@ -4022,12 +4143,14 @@ export {
|
|
|
4022
4143
|
DropinLayout as D,
|
|
4023
4144
|
EntityGuidanceStatus as E,
|
|
4024
4145
|
OnboardingDropinComponent as O,
|
|
4025
|
-
|
|
4026
|
-
|
|
4027
|
-
|
|
4146
|
+
usePciStatus as a,
|
|
4147
|
+
useCanSeeIntroduction as b,
|
|
4148
|
+
useLegalEntityType as c,
|
|
4028
4149
|
allowIndividualWithoutSoleProp as d,
|
|
4029
|
-
|
|
4150
|
+
useDataMissingRemediations as e,
|
|
4151
|
+
EntityAssociation as f,
|
|
4152
|
+
useTrustMembers as g,
|
|
4030
4153
|
iconStatus as i,
|
|
4031
4154
|
normalizedTaskStatusStore as n,
|
|
4032
|
-
|
|
4155
|
+
useSalesChannelsSettings as u
|
|
4033
4156
|
};
|