@adyen/kyc-components 3.94.0 → 3.95.0-beta.1
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-UXDlHmf_.js → AcceptTermsOfServiceComponent-BW0brynM.js} +36 -32
- package/dist/{Accordion-DM9qeMoR.js → Accordion-BM8hZAXY.js} +2 -2
- package/dist/{AccountSetupRejected-DfmKQEp-.js → AccountSetupRejected-BodluXLt.js} +4 -4
- package/dist/{ActionBar-DCKuV5BO.js → ActionBar-UJRkmh5s.js} +2 -2
- package/dist/{Address-BEUcWe_H.js → Address-DI_WQl-j.js} +10 -12
- package/dist/{Alert-D9HbhU88.js → Alert-BZOtTqxJ.js} +3 -3
- package/dist/{Avatar-C_tjYaBz.js → Avatar-BkSExeAD.js} +2 -2
- package/dist/{BusinessFinancingComponent-B5gLGmkK.js → BusinessFinancingComponent-XUA40MWu.js} +7 -7
- package/dist/{BusinessFinancingDropin-BpZKzB71.js → BusinessFinancingDropin-BmdwxjTl.js} +689 -307
- package/dist/{BusinessFinancingPage-CKdy77OK.js → BusinessFinancingPage-4HciuNgT.js} +5 -5
- package/dist/{BusinessTypeSelectionPage-ClkY9cbT.js → BusinessTypeSelectionPage-D6N0Ru4g.js} +9 -9
- package/dist/{Checkbox-BU4IYlt6.js → Checkbox-HJ5QMOjP.js} +2 -2
- package/dist/{Confirm-BM1PTsnm.js → Confirm-BtVNOsTV.js} +3 -3
- package/dist/{ConstitutionalDocument-D9sPfw_B.js → ConstitutionalDocument-Dhw6t4Ni.js} +37 -30
- package/dist/{ContactDetails-BRnbG7BX.js → ContactDetails-CbxMguHb.js} +8 -8
- package/dist/{ContextGuidance-CZGa7C-r.js → ContextGuidance-vOFdWDn9.js} +3 -3
- package/dist/{ContractViewer-Byp71k2e.js → ContractViewer-DcQHIGMU.js} +2 -2
- package/dist/{CountryField-DShqP-Yi.js → CountryField-C7bj3yyn.js} +6 -6
- package/dist/{CreateIndividualComponent-BZ6dd8Bd.js → CreateIndividualComponent-D686ciaV.js} +7 -7
- package/dist/{CreateTransferInstrumentComponent-1pjVr_3y.js → CreateTransferInstrumentComponent-C7B7UCpu.js} +5 -5
- package/dist/{Currency-CEtDxV-F.js → Currency-hS0YWWxq.js} +7 -11
- package/dist/{CustomerSupport-gmN79qSl.js → CustomerSupport-8s-w8iKy.js} +11 -11
- package/dist/{DebugModal-C3horl0P.js → DebugModal-BwrOlWvA.js} +9 -9
- package/dist/{DecisionMakerDetailsPage-CN1t2Ok6.js → DecisionMakerDetailsPage-BKYVxewR.js} +14 -10
- package/dist/{DecisionMakers-83kflZpA.js → DecisionMakers-Om-7b55R.js} +36 -26
- package/dist/{Dropzone-DYIUInYF.js → Dropzone-Dayv7PAA.js} +4 -4
- package/dist/{EmbeddedStatus-BID4yaOx.js → EmbeddedStatus-uhtoE0i5.js} +3 -3
- package/dist/{EndStateLayout-Cqmi0QYW.js → EndStateLayout-Bircmn4k.js} +2 -2
- package/dist/{EntityAssociation-jMAjopdW.js → EntityAssociation-CpwvMeU9.js} +35 -23
- package/dist/{EntityGuidanceStatus-ek-5IvZb.js → EntityGuidanceStatus-BGP7anTO.js} +3 -3
- package/dist/{ErrorPanel-ByEaxCQu.js → ErrorPanel-CTnweIrR.js} +3 -3
- package/dist/{Field-Cp_UOAnA.js → Field-B5icSx65.js} +2 -2
- package/dist/{FormNavigation-CttAyMuX.js → FormNavigation-CwNfQJDE.js} +3 -3
- package/dist/{FormWrapper-C8UDjnjQ.js → FormWrapper-B1OeeS_n.js} +9 -9
- package/dist/{Header-CIxJSQWR.js → Header-Dsxscc11.js} +2 -2
- package/dist/{Image-T-D-HDf5.js → Image-DSSLH2Gg.js} +2 -2
- package/dist/{Individual.rules-DEhHxeiv.js → Individual.rules-SVdbtMZX.js} +29 -14
- package/dist/{IndividualDropin-Dz2ooI0s.js → IndividualDropin-Cc4CEZFn.js} +71 -63
- package/dist/{InputDate-z9OpUslu.js → InputDate-BbhqEb0A.js} +2 -2
- package/dist/{InputText-CBhD5jca.js → InputText-DsyMVWuS.js} +2 -2
- package/dist/{Introduction-Bm3kybSH.js → Introduction-0o7soNWJ.js} +4 -4
- package/dist/{JpAddress-owiNWOqn.js → JpAddress-DR9efscK.js} +18 -13
- package/dist/{LandingLayout-BuBU3Pyb.js → LandingLayout-BmfO073v.js} +2 -2
- package/dist/{fieldConfig-CMdKt41r.js → LegalCompanyNameField-DUA1xhu7.js} +71 -67
- package/dist/{LegalRepresentativeDetailsPage-vS7jAxuO.js → LegalRepresentativeDetailsPage-Dd7C7gUQ.js} +5 -5
- package/dist/{Link-CIBefZJS.js → Link-5z1nhcfe.js} +2 -2
- package/dist/{ListItem-CnzgA-sH.js → ListItem-BFs1CkoM.js} +3 -3
- package/dist/{LoaderWrapper-CwhIpGKR.js → LoaderWrapper-D7zyni9T.js} +1 -1
- package/dist/ManageIndividualComponent-DwWloLdY.js +46 -0
- package/dist/{ManageTermsOfServiceComponent-BdiC5Nbd.js → ManageTermsOfServiceComponent-DyyWEEWM.js} +5 -5
- package/dist/{ManageTransferInstrumentComponent-CObC5Uof.js → ManageTransferInstrumentComponent-DT93KOu6.js} +15 -14
- package/dist/{MaskedInput-BfI4FGAA.js → MaskedInput-Ble-w1-c.js} +5 -5
- package/dist/{MaybeModal-DHcu32Dh.js → MaybeModal-D7DmwNpk.js} +3 -3
- package/dist/{Modal-BKWXTEoU.js → Modal-VzVyfuvm.js} +2 -2
- package/dist/{Name-BCar2_dk.js → Name-D_X4kyiG.js} +5 -5
- package/dist/{OnboardingDropinComponent-DstStqYS.js → OnboardingDropinComponent-DYT6l2t6.js} +850 -520
- package/dist/{PayoutDetailsDropin-DSdlqAe2.js → PayoutDetailsDropin-De5xS7km.js} +130 -77
- package/dist/{RadioGroup-COsozc9g.js → RadioGroup-CpnraQPG.js} +2 -2
- package/dist/{RadioGroupCard-xqC3IACY.js → RadioGroupCard-BDvxdl0T.js} +2 -2
- package/dist/{Review-CZwc-DMp.js → Review-BrP7xRy2.js} +7 -7
- package/dist/RootBusinessDetailsPage-C4io3SHK.js +50 -0
- package/dist/{RootBusinessLinesPage-BRgtyHFs.js → RootBusinessLinesPage-CknZuu0f.js} +27 -24
- package/dist/{RootIndividualDetailsPage-C3wTzTp1.js → RootIndividualDetailsPage-D2InAZ2K.js} +7 -6
- package/dist/{Select-DeTBytOH.js → Select-B3w5VkGQ.js} +4 -4
- package/dist/{SignPCIComponent-CCGyrXvI.js → SignPCIComponent-B8U7Hilk.js} +14 -14
- package/dist/{SingpassSelection-BumqRwXI.js → SingpassSelection-BdRZAxtT.js} +6 -6
- package/dist/SoleProprietorshipPage-C64fSOwN.js +50 -0
- package/dist/{SourceOfFundsPage-DkjYls-E.js → SourceOfFundsPage-C855dB1F.js} +33 -32
- package/dist/{StepProgressIndicator-D8PfKJKf.js → StepProgressIndicator-B06vG0EZ.js} +2 -2
- package/dist/{StoreProvider-CsZ-qrGt.js → StoreProvider-C-jMv9L5.js} +157 -132
- package/dist/{StructuredList-9dnJRdx_.js → StructuredList-BNLhk_zV.js} +1 -1
- package/dist/{Summary-DPm9r7Az.js → Summary-HNxR09dk.js} +19 -8
- package/dist/{TaskVerificationStatus-DrOQToMh.js → TaskVerificationStatus-BvU5X9F0.js} +2 -2
- package/dist/{TaxInformationField-NI7Hbgov.js → TaxInformationField-ghLphbCF.js} +438 -81
- package/dist/{TaxReportingDropin-BBUAxx92.js → TaxReportingDropin-8PKUrVeE.js} +18 -18
- package/dist/{TextArea-CCjCNpAP.js → TextArea-XzZ59IRn.js} +2 -2
- package/dist/{TileGroup-BhKhvfLz.js → TileGroup-BsvBLQp4.js} +3 -3
- package/dist/{TrustDetailsPage-yOmFcEyO.js → TrustDetailsPage-BZamlxY7.js} +44 -38
- package/dist/TrustMemberCompanyPage-DHdEuAQJ.js +68 -0
- package/dist/{TrustMemberIndividualPage-B8tb56n2.js → TrustMemberIndividualPage-BLjorgiQ.js} +11 -8
- package/dist/{TrustMemberRoleAndTypePage-WHu1tc4O.js → TrustMemberRoleAndTypePage-O-JmFZ6x.js} +43 -38
- package/dist/{TrustMembersOverview-BWbGUK3k.js → TrustMembersOverview-CJEjx7vn.js} +13 -13
- package/dist/{UnincorporatedPartnershipIndividualPage-DD2dn41k.js → UnincorporatedPartnershipIndividualPage-CLm7rltZ.js} +10 -7
- package/dist/{UnincorporatedPartnershipMemberCompanyPage-DsUSSYnI.js → UnincorporatedPartnershipMemberCompanyPage-DstG5mil.js} +10 -7
- package/dist/{UnincorporatedPartnershipMemberRoleAndTypePage-Ctb0Lz_0.js → UnincorporatedPartnershipMemberRoleAndTypePage-CcboW2-W.js} +15 -12
- package/dist/{UnincorporatedPartnershipMembersOverview-B_GJIeZC.js → UnincorporatedPartnershipMembersOverview-C8d8pfxJ.js} +9 -9
- package/dist/{VerificationErrorAlert-CCiMqGl8.js → VerificationErrorAlert-CAncqFAs.js} +4 -24
- package/dist/{ViewVerificationStatusComponent-CICJ6cy4.js → ViewVerificationStatusComponent-BwndGcdj.js} +4 -4
- package/dist/accountHolderUtils-B437qMYm.js +66 -0
- package/dist/adyen-business-financing.js +3 -3
- package/dist/adyen-individual-configuration.js +3 -3
- package/dist/adyen-individual-status.js +3 -3
- package/dist/adyen-kyc-components.js +20 -19
- package/dist/adyen-onboarding.js +3 -3
- package/dist/adyen-terms-of-service-management.js +3 -3
- package/dist/adyen-terms-of-service-status.js +3 -3
- package/dist/adyen-transfer-instrument-configuration.js +3 -3
- package/dist/adyen-transfer-instrument-management.js +3 -3
- package/dist/adyen-verification-status.js +3 -3
- package/dist/{bafinUtils-Ch6rVpGi.js → bafinUtils-DFWYU0eC.js} +3 -22
- package/dist/bg-BG-CFuVZnaC.js +13 -0
- package/dist/{bg-BG-CepHap8j.js → bg-BG-DMNRRZZE.js} +8 -1
- package/dist/bg-BG-Dp1J1L2X.js +13 -0
- package/dist/{commonValidators-B8wfpMjX.js → commonValidators-DnSqf1bK.js} +2 -2
- package/dist/company-types-value-D_mKv5PT.js +23 -0
- package/dist/cs-CZ-Bd9Zz7z4.js +13 -0
- package/dist/cs-CZ-CYsR__kj.js +13 -0
- package/dist/{cs-CZ-BP7niQM9.js → cs-CZ-DXSMRqPu.js} +8 -1
- package/dist/da-DK-B3Pg-MWO.js +13 -0
- package/dist/{da-DK-Dc0QYG8m.js → da-DK-Cd5IQPv3.js} +8 -1
- package/dist/da-DK-DmFDgnbC.js +13 -0
- package/dist/{de-DE-Dz2OsS1F.js → de-DE-C9NH2zMh.js} +8 -1
- package/dist/de-DE-DRuKxSOy.js +13 -0
- package/dist/de-DE-S6qDey1L.js +13 -0
- package/dist/{dropinUtils-B4Vv7_zJ.js → dropinUtils-CVk-9IZr.js} +4 -4
- package/dist/el-GR-Cezskrdn.js +13 -0
- package/dist/{el-GR-BHG69mXl.js → el-GR-DTHQslLc.js} +8 -1
- package/dist/el-GR-DoS_Va-n.js +13 -0
- package/dist/{en-US-CzEL6t1W.js → en-US-D1sB335h.js} +9 -3
- package/dist/en-US-DLY20x1O.js +13 -0
- package/dist/{en-US-D-B35AoN.js → en-US-DYP6rAvA.js} +8 -1
- package/dist/{en-US-fyGPkcqX.js → en-US-cVpRgdC8.js} +2 -2
- package/dist/es-ES-BYl5-PFR.js +13 -0
- package/dist/{es-ES-BI_jdT67.js → es-ES-DK-7qtDf.js} +8 -1
- package/dist/es-ES-DzB4V6UZ.js +13 -0
- package/dist/et-EE-4fHYOoff.js +13 -0
- package/dist/et-EE-BkHzGD3D.js +13 -0
- package/dist/{et-EE-C_PZO2aI.js → et-EE-DNC4hcxm.js} +8 -1
- package/dist/{fi-FI-hwzizPnr.js → fi-FI-BJLU1JHw.js} +8 -1
- package/dist/fi-FI-Cxkp0GQA.js +13 -0
- package/dist/fi-FI-DFxljML-.js +13 -0
- package/dist/filterProblemsByTaskForms-Cz7iQtms.js +30 -0
- package/dist/{formUtils-q44BTi2U.js → formUtils-KRYFb23Q.js} +3 -22
- package/dist/{fr-FR-CYZXbwc9.js → fr-FR-B2je0smB.js} +8 -1
- package/dist/fr-FR-DPehHVb6.js +13 -0
- package/dist/fr-FR-DsEmssxk.js +13 -0
- package/dist/{getName-BxKx8lLd.js → getName-c86ZSHdY.js} +2 -2
- package/dist/{getProps-CLJfvUMb.js → getProps-O8Fpl_k_.js} +2 -6
- package/dist/getTrustedFields-C5-mXl-l.js +64 -0
- package/dist/hr-HR-Bjx-KdVs.js +13 -0
- package/dist/{hr-HR-bE6cvRCQ.js → hr-HR-C0NLgF1r.js} +8 -1
- package/dist/hr-HR-DU4nvY6g.js +13 -0
- package/dist/hu-HU-B-lUkFnQ.js +13 -0
- package/dist/hu-HU-D6frnZmR.js +13 -0
- package/dist/{hu-HU-DG-NUDx4.js → hu-HU-DU-5ujQK.js} +8 -1
- package/dist/{iframeWidget-iDH8bVr4.js → iframeWidget-COB6S0Zd.js} +4 -4
- package/dist/{isEmpty-BNacTlfR.js → isEmpty-DG6Y1P62.js} +2 -2
- package/dist/isNewEntity-7Vw_eQBr.js +13 -0
- package/dist/it-IT-DOBp2-MP.js +13 -0
- package/dist/{it-IT-Erh1DIlj.js → it-IT-Dhwa9Ecj.js} +8 -1
- package/dist/it-IT-VFXgXyRA.js +13 -0
- package/dist/{ja-JP-DfE1PYyN.js → ja-JP-B3wVYIJU.js} +2 -2
- package/dist/ja-JP-B_Q8X66O.js +13 -0
- package/dist/{ja-JP-CWJzqrtj.js → ja-JP-Bc4U0S8-.js} +8 -1
- package/dist/{ja-JP-4Q9zp35q.js → ja-JP-Bv3ru9Xq.js} +14 -7
- package/dist/{ja-JP-CSz7fEkn.js → ja-JP-CceCDXLB.js} +2 -2
- package/dist/{ja-JP-DBoYLzeA.js → ja-JP-DSvZhFNY.js} +4 -4
- package/dist/{japanSupportUtils-C7aPdWXD.js → japanSupportUtils-Dl5g_UWE.js} +2 -2
- package/dist/{jpAddressSchema-De6ix57p.js → jpAddressSchema-DEOyz9Yo.js} +2 -4
- package/dist/{localizeDateString-DuTq6aHe.js → localizeDateString-CW0xkVFv.js} +2 -2
- package/dist/{lt-LT-Nd1uRoIj.js → lt-LT-C8n1GZoU.js} +8 -1
- package/dist/lt-LT-CE-GdWrg.js +13 -0
- package/dist/lt-LT-WRulV980.js +13 -0
- package/dist/{lv-LV-DKhV24CI.js → lv-LV-BZN4-Xat.js} +8 -1
- package/dist/lv-LV-C9Dhkruv.js +13 -0
- package/dist/lv-LV-dv7fqeBS.js +13 -0
- package/dist/{mapExistingFile-CGg2sd-T.js → mapExistingFile-BRTT2WyL.js} +5 -6
- package/dist/{mapJpAddressSchemaToAddressLocalizations-BwHU4ZwL.js → mapJpAddressSchemaToAddressLocalizations-CwG96wSK.js} +5 -5
- package/dist/{mapLegalEntityToIndividualSchema-DzCEngXr.js → mapLegalEntityToIndividualSchema-Cu08lm2S.js} +4 -4
- package/dist/{mapTransferInstrumentToPayoutAccount-DLHvwig1.js → mapTransferInstrumentToPayoutAccount-BVOwByXx.js} +2 -2
- package/dist/{nl-NL-O9GCHMDA.js → nl-NL-B0fvINJj.js} +8 -1
- package/dist/nl-NL-BwIRHJgf.js +13 -0
- package/dist/nl-NL-SjOGmGk5.js +13 -0
- package/dist/no-NO-BAWVf0GX.js +13 -0
- package/dist/{no-NO-CA1aR6Wh.js → no-NO-Jw7Gae-a.js} +8 -1
- package/dist/no-NO-u56mEoG3.js +13 -0
- package/dist/{patternValidators-CZ5mQeGD.js → patternValidators-DAtPy1-5.js} +5 -5
- package/dist/{pl-PL-BKDK0_G8.js → pl-PL-Bmaq3IC3.js} +8 -1
- package/dist/pl-PL-DEMxxz7h.js +13 -0
- package/dist/pl-PL-zqT41Yjw.js +13 -0
- package/dist/{process-field-configurations-BQY03q4v.js → process-field-configurations-2ry-JbdI.js} +3 -3
- package/dist/{pt-BR-NtLaWlnZ.js → pt-BR-BaTE6BB_.js} +8 -1
- package/dist/pt-BR-BfDe_8iW.js +13 -0
- package/dist/pt-BR-fMKntiMG.js +13 -0
- package/dist/{pt-PT-C6teRGuD.js → pt-PT-C6pZR9Bc.js} +2 -2
- package/dist/pt-PT-F1qPZJ2c.js +13 -0
- package/dist/{pt-PT-DSxxVA0f.js → pt-PT-c0ap84_F.js} +8 -1
- package/dist/{resolveEnvironment-BEU3VKd8.js → resolveEnvironment-CWyr9MeQ.js} +3 -3
- package/dist/ro-RO-0vx6ZLWV.js +13 -0
- package/dist/ro-RO-B5BQrf6C.js +13 -0
- package/dist/{ro-RO-Bybq8JFn.js → ro-RO-BPOHV6Wp.js} +8 -1
- package/dist/{roleMetadata-BeJKyoeE.js → roleMetadata-D9T__4VE.js} +2 -2
- package/dist/{sk-SK-C6rMIxpz.js → sk-SK-3_SoEn6P.js} +8 -1
- package/dist/sk-SK-Bz4T7upD.js +13 -0
- package/dist/sk-SK-DuLm2CVx.js +13 -0
- package/dist/sl-SI--RTGDByj.js +13 -0
- package/dist/sl-SI-BAIm-qBe.js +13 -0
- package/dist/{sl-SI-tPwbFvOI.js → sl-SI-DbfswGh0.js} +8 -1
- package/dist/style.css +145 -153
- package/dist/styles-CLV89_hH.js +145 -153
- package/dist/sv-SE-BZNey_8S.js +13 -0
- package/dist/{sv-SE-K1QT1cOt.js → sv-SE-D_Efxy3s.js} +8 -1
- package/dist/sv-SE-Dryy3JLw.js +13 -0
- package/dist/types/components/BankAccount/forms/PayoutDetails/rules.d.ts +1 -1
- package/dist/types/components/BankAccount/pages/PayoutDetailsPage.d.ts +3 -3
- package/dist/types/components/Business/forms/BusinessDetails/forms.d.ts +10 -10
- package/dist/types/components/Business/forms/BusinessDetails/types.d.ts +1 -1
- package/dist/types/components/Business/forms/BusinessSelection/BusinessInformationCard/BusinessInformationCard.d.ts +3 -3
- package/dist/types/components/{Shared → Business}/forms/FinancialInformation/formatFinancialInformationSummary.d.ts +1 -1
- package/dist/types/components/{Shared → Business}/forms/FinancialInformation/mapping/mapFinancialInformationToFinancialReport.d.ts +1 -1
- package/dist/types/components/{Shared → Business}/forms/FinancialInformation/mapping/mapFinancialReportsToFinancialInformation.d.ts +1 -1
- package/dist/types/components/Business/forms/rules.d.ts +6 -6
- package/dist/types/components/Business/pages/RootBusinessDetailsPage.d.ts +1 -2
- package/dist/types/components/Business/utils/companyUtil.d.ts +0 -1
- package/dist/types/components/BusinessLines/pages/RootBusinessLinesPage.d.ts +1 -2
- package/dist/types/components/Contract/tasks/ServiceAgreementDropin/types.d.ts +1 -1
- package/dist/types/components/EFP/fields/LegalFormField/LegalFormField.d.ts +1 -1
- package/dist/types/components/EFP/fields/NaceCodeField/NaceCodeField.d.ts +1 -1
- package/dist/types/components/EFP/mapping/businessFinancingKeyMappings.d.ts +5283 -53
- package/dist/types/components/EFP/mapping/mapBusinessFinancingToLegalEntity.d.ts +3 -2
- package/dist/types/components/EFP/mapping/mapLegalEntityToBusinessFinancing.d.ts +1 -1
- package/dist/types/components/EFP/pages/BusinessFinancingPage.d.ts +1 -2
- package/dist/types/components/EFP/pages/SourceOfFundsPage.d.ts +1 -2
- package/dist/types/components/EFP/tasks/BusinessFinancingDropin/AdditionalFieldsForBusinessFinancingSoleProprietor.d.ts +2 -0
- package/dist/types/components/EFP/tasks/BusinessFinancingDropin/BusinessFinancingSoleProprietorPersonalInformation.d.ts +4 -0
- package/dist/types/components/EFP/tasks/BusinessFinancingDropin/types.d.ts +28 -0
- package/dist/types/components/EFP/tasks/BusinessFinancingDropin/utils.d.ts +14 -3
- package/dist/types/components/EFP/tasks/BusinessFinancingDropin/validate.d.ts +10 -1
- package/dist/types/components/EmbeddedDropins/BusinessFinancingComponent/utils.d.ts +1 -0
- package/dist/types/components/EmbeddedDropins/OnboardingDropinComponent/DropinComposer/DropinComposer.d.ts +1 -1
- package/dist/types/components/EmbeddedDropins/OnboardingDropinComponent/DropinComposer/RouterDropinComposer.d.ts +4 -0
- package/dist/types/components/Individual/forms/IdVerificationMethod/IdVerificationMethod.types.d.ts +2 -1
- package/dist/types/components/Individual/forms/Individual.rules.d.ts +2 -2
- package/dist/types/components/Individual/pages/DecisionMakerDetailsPage.d.ts +3 -3
- package/dist/types/components/Shared/EntityAssociation/EntityAssociation.d.ts +0 -1
- package/dist/types/components/Shared/fields/BusinessRegistrationNumberField/fieldConfig.d.ts +10 -0
- package/dist/types/components/Shared/fields/BusinessRegistrationNumberField/types.d.ts +2 -1
- package/dist/types/components/Shared/fields/CountryField/types.d.ts +2 -1
- package/dist/types/components/Shared/fields/CountryOfGoverningLawField/CountryOfGoverningLawField.d.ts +1 -1
- package/dist/types/components/Shared/fields/CountryOfGoverningLawField/types.d.ts +1 -1
- package/dist/types/components/Shared/fields/Currency/Currency.d.ts +1 -1
- package/dist/types/components/Shared/fields/Currency/types.d.ts +1 -1
- package/dist/types/components/Shared/fields/DBANameField/DBANameField.d.ts +1 -1
- package/dist/types/components/Shared/fields/DBANameField/types.d.ts +1 -1
- package/dist/types/components/Shared/fields/IdFieldTypeSelector/countryIdNumberTypes.d.ts +78 -0
- package/dist/types/components/Shared/fields/LegalCompanyNameField/fieldConfig.d.ts +12 -6
- package/dist/types/components/Shared/fields/LegalCompanyNameField/types.d.ts +3 -1
- package/dist/types/components/Shared/fields/NumberOfEmployees/NumberOfEmployees.d.ts +1 -1
- package/dist/types/components/Shared/fields/NumberOfEmployees/types.d.ts +1 -1
- package/dist/types/components/Shared/forms/Address/Address.d.ts +1 -1
- package/dist/types/components/Shared/forms/Address/utils.d.ts +1 -1
- package/dist/types/components/Trust/forms/Trust/rules.d.ts +2 -2
- package/dist/types/components/Trust/hooks/useTrustMemberNavigation.hook.d.ts +1 -1
- package/dist/types/components/Trust/pages/TrustDetailsPage.d.ts +1 -2
- package/dist/types/components/Trust/pages/TrustMemberCompanyPage.d.ts +3 -3
- package/dist/types/components/Trust/pages/TrustMemberIndividualPage.d.ts +3 -3
- package/dist/types/components/Trust/pages/TrustMemberRoleAndTypePage.d.ts +2 -2
- package/dist/types/components/Trust/tasks/TrustMembers/TrustMembersOverview.d.ts +1 -2
- package/dist/types/components/UnincorporatedPartnership/hooks/useUnincorporatedPartnershipNavigation.d.ts +1 -1
- package/dist/types/components/UnincorporatedPartnership/pages/UnincorporatedPartnershipIndividualPage.d.ts +3 -3
- package/dist/types/components/UnincorporatedPartnership/pages/UnincorporatedPartnershipMemberCompanyPage.d.ts +3 -3
- package/dist/types/components/UnincorporatedPartnership/pages/UnincorporatedPartnershipMemberRoleAndTypePage.d.ts +1 -1
- package/dist/types/components/ui/atoms/Loader/Loader.d.ts +11 -1
- package/dist/types/context/ExperimentContext/types.d.ts +17 -0
- package/dist/types/core/models/api/individual.d.ts +3 -0
- package/dist/types/core/models/api/legal-arrangement.d.ts +3 -0
- package/dist/types/hooks/useForm/types.d.ts +0 -4
- package/dist/types/hooks/useLegalCompanyNameField/useLegalCompanyNameField.d.ts +4 -2
- package/dist/types/hooks/usePageLandedEvent.d.ts +7 -0
- package/dist/types/router/DefaultRouteRedirect.d.ts +8 -0
- package/dist/types/router/MemoryRouterContext.d.ts +9 -0
- package/dist/types/router/OnboardingRouter.d.ts +39 -0
- package/dist/types/router/SuspenseRoute.d.ts +7 -0
- package/dist/types/router/getDefaultTask.d.ts +16 -0
- package/dist/types/router/routeConfig.d.ts +68 -0
- package/dist/types/router/useCurrentTask.d.ts +5 -0
- package/dist/types/router/useNavigate.d.ts +7 -0
- package/dist/types/utils/entityStatusUtil.d.ts +1 -1
- package/dist/types/utils/fieldConfigurations.d.ts +0 -1
- package/dist/types/utils/formUtils.d.ts +0 -3
- package/dist/types/utils/regex/patternValidators.d.ts +1 -1
- package/dist/types/utils/validatorUtils.d.ts +1 -1
- package/dist/{types-BY62XJTq.js → types-BstoJPXR.js} +2 -2
- package/dist/{types-B7eWQV7z.js → types-C8yt1YG2.js} +19 -2
- package/dist/{types-pKG9olDB.js → types-DHdmZe3R.js} +2 -2
- package/dist/{types-BuMuCpsa.js → types-FtiqI-S9.js} +2 -2
- package/dist/{useAssociatedLegalEntity-V0OP9ejx.js → useAssociatedLegalEntity-BVu7zj1c.js} +2 -2
- package/dist/{useBusinessDetailsData-BsXXL7fg.js → useBusinessDetailsData-B9I865mu.js} +713 -718
- package/dist/useBusinessLines-Coc7iGhS.js +29 -0
- package/dist/useCanSeeIntroduction-DG9Yn42f.js +48 -0
- package/dist/{useCreateLegalEntity-otpCRCfZ.js → useCreateLegalEntity-D1LQY6P5.js} +2 -2
- package/dist/useDataMissingRemediations-CDMb2Iu7.js +41 -0
- package/dist/{useDataset-CvATx7EN.js → useDataset-BiERW7fi.js} +5 -3
- package/dist/useDeleteTransferInstrument-YSr-Fo6s.js +32 -0
- package/dist/{useForm-9nSw9LZY.js → useForm-ZeyqDFOi.js} +27 -27
- package/dist/{useFormContext-BnlNKQZ7.js → useFormContext-CcAa10tn.js} +7 -7
- package/dist/{useGlobalData-Dy2O7YGk.js → useGlobalData-MctSxOcn.js} +2 -2
- package/dist/{useMultiForm-CBefohos.js → useMultiForm-BhV8RCm4.js} +45 -36
- package/dist/useNavigate-CyixZ7Bd.js +265 -0
- package/dist/{useOnboardingStatus-CJrlnkvv.js → useOnboardingStatus-YzbGKkC5.js} +1 -1
- package/dist/usePciQuestionnaireList-CLwiJDxW.js +29 -0
- package/dist/useSalesChannels-C3oiiB07.js +65 -0
- package/dist/{useScenarios-CkgrmOF-.js → useScenarios-CGNlbMLu.js} +2 -2
- package/dist/useSetting-BF2CM06n.js +19 -0
- package/dist/useTaskStatus-DgRzelGp.js +51 -0
- package/dist/{useTermsOfServiceStatus-DFLF3xas.js → useTermsOfServiceStatus-IjRaxZu3.js} +1 -1
- package/dist/{useToastContext-uSKjdph9.js → useToastContext-C0ytklOM.js} +2 -2
- package/dist/useTrustMembers-MZLGyg68.js +163 -0
- package/dist/{useUnincorporatedPartnershipMembers-BmLKVfkf.js → useUnincorporatedPartnershipMembers-CtzCBX3o.js} +4 -4
- package/dist/{useUpdateBusinessLines-BBNXF45E.js → useUpdateBusinessLines-Do9Ap-zs.js} +4 -4
- package/dist/{useUpdateLegalEntity-DHxCVgNk.js → useUpdateLegalEntity-CrL2KyrF.js} +3 -3
- package/dist/{utils-5yZQq_bx.js → utils-Bbxtjil1.js} +6 -6
- package/dist/{utils-CIHH_aYF.js → utils-BtRcjM8l.js} +2 -2
- package/dist/{utils-ClKogQZa.js → utils-C8SToqFp.js} +3 -3
- package/dist/{utils-CLLUBF1a.js → utils-D6lKjllx.js} +2 -2
- package/dist/{utils-CIIs2bXi.js → utils-DDh9Wc69.js} +3 -2
- package/dist/{validate-CLYo0JdH.js → validate-B7VfZzB0.js} +3 -3
- package/dist/{validate-BntX2W3B.js → validate-CXFzJNVc.js} +10 -2
- package/dist/{validationError-DJ6zTIzv.js → validationError-Bhb_p0Dm.js} +2 -2
- package/package.json +3 -2
- package/dist/ManageIndividualComponent-CJEqOUgN.js +0 -46
- package/dist/RootBusinessDetailsPage-BsAtLAyF.js +0 -50
- package/dist/SoleProprietorshipPage-zgU4q95D.js +0 -50
- package/dist/TrustMemberCompanyPage-DfXulzKv.js +0 -65
- package/dist/bg-BG-C1maG7_G.js +0 -13
- package/dist/bg-BG-D4k_k98M.js +0 -118
- package/dist/cs-CZ-Dq3xx45p.js +0 -13
- package/dist/cs-CZ-nIWwyOHK.js +0 -118
- package/dist/da-DK-CoqZjIMT.js +0 -13
- package/dist/da-DK-CrtuBoDC.js +0 -118
- package/dist/de-DE-CLMlbqGz.js +0 -13
- package/dist/de-DE-mH3MobT9.js +0 -13
- package/dist/el-GR-BEOd56RY.js +0 -13
- package/dist/el-GR-Ckn_3h1a.js +0 -118
- package/dist/en-US-d4WBvUW7.js +0 -118
- package/dist/es-ES-BnPWZP0s.js +0 -13
- package/dist/es-ES-CnyVffM-.js +0 -118
- package/dist/et-EE-RzdBGxDM.js +0 -118
- package/dist/et-EE-rYc8-Bm2.js +0 -13
- package/dist/fi-FI-CYEjY7DQ.js +0 -13
- package/dist/fi-FI-kXC-0USa.js +0 -118
- package/dist/fr-FR-6YOKsDLQ.js +0 -13
- package/dist/fr-FR-CsJuDM2B.js +0 -13
- package/dist/hr-HR-DMSNClBZ.js +0 -13
- package/dist/hr-HR-fyublN95.js +0 -118
- package/dist/hu-HU-CpJDiSu2.js +0 -118
- package/dist/hu-HU-DQlYtR9y.js +0 -13
- package/dist/it-IT-C9cOsMxY.js +0 -13
- package/dist/it-IT-DyCHFg-b.js +0 -118
- package/dist/ja-JP-NuKpFRZl.js +0 -13
- package/dist/lt-LT-CKE7_7_A.js +0 -118
- package/dist/lt-LT-DPU2ZqVt.js +0 -13
- package/dist/lv-LV-BD8xCiCe.js +0 -13
- package/dist/lv-LV-D4Ik0yoE.js +0 -118
- package/dist/nl-NL-CBnYVFv_.js +0 -13
- package/dist/nl-NL-DkbhmJAw.js +0 -118
- package/dist/no-NO-C690hkyd.js +0 -13
- package/dist/no-NO-Df5qUoTc.js +0 -118
- package/dist/pl-PL-BDclj9dt.js +0 -13
- package/dist/pl-PL-ggZjqXWE.js +0 -118
- package/dist/pt-BR-B4wCnZ06.js +0 -13
- package/dist/pt-BR-BOOm5lRR.js +0 -118
- package/dist/pt-PT-BDfNlThr.js +0 -118
- package/dist/ro-RO-BRngQXgs.js +0 -118
- package/dist/ro-RO-PA9lKU0J.js +0 -13
- package/dist/sk-SK-DmqCF6I9.js +0 -13
- package/dist/sk-SK-y9eb7N6i.js +0 -118
- package/dist/sl-SI-CGvCdquD.js +0 -118
- package/dist/sl-SI-DnT4vnh4.js +0 -13
- package/dist/sv-SE-BP2Oun8l.js +0 -118
- package/dist/sv-SE-DopUU1N2.js +0 -13
- /package/dist/types/components/{Shared → Business}/forms/FinancialInformation/FinancialInformation.d.ts +0 -0
- /package/dist/types/components/{Shared → Business}/forms/FinancialInformation/ReportedValue.d.ts +0 -0
- /package/dist/types/components/{Shared → Business}/forms/FinancialInformation/types.d.ts +0 -0
- /package/dist/types/components/{Shared → Business}/forms/FinancialInformation/validate.d.ts +0 -0
package/dist/{OnboardingDropinComponent-DstStqYS.js → OnboardingDropinComponent-DYT6l2t6.js}
RENAMED
|
@@ -2,94 +2,80 @@
|
|
|
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] = "92188c60-5817-446e-b2a2-8d9583fdba14", e._sentryDebugIdIdentifier = "sentry-dbid-92188c60-5817-446e-b2a2-8d9583fdba14");
|
|
6
6
|
} catch (e) {
|
|
7
7
|
}
|
|
8
8
|
}
|
|
9
9
|
;
|
|
10
|
-
import {
|
|
10
|
+
import { j as TaskTypes, b as useApiContext, k as httpGet, m as useAccountHolder, o as LegalEntityTypes, u as useTranslation, p as useAnalyticsContext, q as TaskStatuses, r as Icon, t as IconButton, v as useExperimentsContext, w as isInstantVerifiedAccount, x as getObscuredAccountNumber, y as useGetTaskStatus, z as Typography, c as useLegalEntity, R as ROOT_LE, L as Loader, B as useSettingsContext, C as useGlobalStore, G as TASK_STATUS_COMPLETED_POLLING_INTERVAL_MS, H as TASK_STATUS_POLLING_INTERVAL_MS, J as isPartOfTrustFromLegalEntity, K as isPartOfUnincorporatedPartnership, M as hasSolePropInLegalEntity, N as doesLegalEntityRequiresLegalRepresentative, O as getLegalRepresentative, P as getOwnSignatories, U as getOwnDecisionMakersLegalEntityIds, V as Button, W as getOwnSolePropProblems, X as getOwnTrustProblems, Y as getOwnUnincorporatedPartnershipProblems, Z as useLocalStorage, $ as httpPost, g as getLegalEntityCountry, a0 as CountryCodes, a1 as Skeleton, a2 as translateStringOrObject, a3 as createLogger, a4 as hasAllCapabilitiesResolved, a5 as hasRejectedCapabilities, a6 as objectsDeepEqual, a7 as noop, a as addResourceBundles, _ as __variableDynamicImportRuntimeHelper } from "./StoreProvider-C-jMv9L5.js";
|
|
11
11
|
import { jsxs, Fragment, jsx } from "preact/jsx-runtime";
|
|
12
12
|
import { useQuery, skipToken } from "@tanstack/preact-query";
|
|
13
13
|
import { lazy, Suspense } from "preact/compat";
|
|
14
|
-
import {
|
|
15
|
-
import { u as
|
|
14
|
+
import { useState, useEffect, useReducer, useMemo, useCallback, useContext, useRef } from "preact/hooks";
|
|
15
|
+
import { u as useBusinessLines } from "./useBusinessLines-Coc7iGhS.js";
|
|
16
|
+
import { u as usePciQuestionnaireList, g as getPciQuestionnaireList } from "./usePciQuestionnaireList-CLwiJDxW.js";
|
|
17
|
+
import { u as useSalesChannels, a as usePciStatus } from "./useSalesChannels-C3oiiB07.js";
|
|
18
|
+
import { g as getAccountTaskStatus, u as useTaskStatus } from "./useTaskStatus-DgRzelGp.js";
|
|
19
|
+
import { u as useTermsOfServiceStatus, a as useTermsOfServiceAcceptanceInfos } from "./useTermsOfServiceStatus-IjRaxZu3.js";
|
|
16
20
|
import { C as Card } from "./Card-OQuFzmxm.js";
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import { u as useToastContext } from "./useToastContext-
|
|
21
|
+
import { T as TaskVerificationStatus, S as SettingNames } from "./TaskVerificationStatus-BvU5X9F0.js";
|
|
22
|
+
import { u as useSetting } from "./useSetting-BF2CM06n.js";
|
|
23
|
+
import { u as useToastContext } from "./useToastContext-C0ytklOM.js";
|
|
24
|
+
import { u as useCanSeeIntroduction } from "./useCanSeeIntroduction-DG9Yn42f.js";
|
|
25
|
+
import { C as CompanyTypesValues } from "./company-types-value-D_mKv5PT.js";
|
|
26
|
+
import { g as getDefaultAccountHolderType } from "./accountHolderUtils-B437qMYm.js";
|
|
27
|
+
import { u as useDataMissingRemediations } from "./useDataMissingRemediations-CDMb2Iu7.js";
|
|
20
28
|
import { S as StackLayout, U as UnincorporatedPartnershipMemberTypes } from "./unincorporated-partnership-MeN1dp53.js";
|
|
21
|
-
import { u as useCapabilityProblems, T as TrustedFieldsProviders, I as Image } from "./Image-
|
|
29
|
+
import { u as useCapabilityProblems, T as TrustedFieldsProviders, I as Image } from "./Image-DSSLH2Gg.js";
|
|
22
30
|
import { d as downloadFile } from "./file-CiG1D0zy.js";
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
31
|
+
import { f as filterProblemsByTaskForms } from "./filterProblemsByTaskForms-Cz7iQtms.js";
|
|
32
|
+
import { u as useDeleteTransferInstrument } from "./useDeleteTransferInstrument-YSr-Fo6s.js";
|
|
33
|
+
import { A as Avatar } from "./Avatar-BkSExeAD.js";
|
|
34
|
+
import { L as LoaderWrapper } from "./LoaderWrapper-D7zyni9T.js";
|
|
35
|
+
import { a as Alert } from "./Alert-BZOtTqxJ.js";
|
|
36
|
+
import { V as VerificationErrorAlert } from "./VerificationErrorAlert-CAncqFAs.js";
|
|
37
|
+
import { C as Confirm } from "./Confirm-BtVNOsTV.js";
|
|
38
|
+
import { E as ExperimentNames } from "./types-C8yt1YG2.js";
|
|
39
|
+
import { g as getTrustedFieldsProvider } from "./getTrustedFields-C5-mXl-l.js";
|
|
40
|
+
import { u as useAssociatedLegalEntity } from "./useAssociatedLegalEntity-BVu7zj1c.js";
|
|
29
41
|
import cx from "classnames";
|
|
30
|
-
import {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
}
|
|
46
|
-
const
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
return
|
|
57
|
-
|
|
58
|
-
path: `legalEntities/${legalEntityId}/businessLines`
|
|
59
|
-
});
|
|
42
|
+
import { i as isNewEntity } from "./isNewEntity-7Vw_eQBr.js";
|
|
43
|
+
import { i as isBafinSignatoryFlow, s as showIdNowModal, a as idNowPostSubmit } from "./bafinUtils-DFWYU0eC.js";
|
|
44
|
+
import { u as useTrustMembers } from "./useTrustMembers-MZLGyg68.js";
|
|
45
|
+
import { Route, Switch, useRouter, useLocation, matchRoute, Router } from "wouter-preact";
|
|
46
|
+
import { memoryLocation } from "wouter-preact/memory-location";
|
|
47
|
+
import { createContext } from "preact";
|
|
48
|
+
import { u as useNavigate, R as ROUTE_PATHS, I as Introduction$1, B as BusinessTypeSelectionPage$1, S as SingpassSelection$1, A as AccountSetupRejected$1, a as RootIndividualDetailsPage$1, b as RootBusinessDetailsPage$1, D as DecisionMakers$1, C as CustomerSupport$1, c as Review$1, d as DecisionMakerDetailsPage$1, P as PayoutDetailsPage$1, T as TrustMembersOverview$1, e as TrustMemberRoleAndTypePage$1, f as TrustMemberIndividualPage$1, g as TrustMemberCompanyPage$1, h as TrustDetailsPage$1, U as UnincorporatedPartnershipMembersOverview$1, i as UnincorporatedPartnershipMemberRoleAndTypePage$1, j as UnincorporatedPartnershipIndividualPage$1, k as UnincorporatedPartnershipMemberCompanyPage$1, l as SignPCIComponent$1, m as SoleProprietorshipPage$1, n as AcceptTermsOfService$1, L as LegalRepresentativeDetailsPage$1, o as SourceOfFundsPage$1, p as BusinessFinancingPage$1, q as TaxReportingDropin$1, r as RootBusinessLinesPage$1, s as detectBasePath } from "./useNavigate-CyixZ7Bd.js";
|
|
49
|
+
const getDefaultTask$1 = ({
|
|
50
|
+
legalEntity,
|
|
51
|
+
canSeeEntitySelection,
|
|
52
|
+
canChangeEntityType,
|
|
53
|
+
showIntroduction,
|
|
54
|
+
shouldShowSingpassSelection,
|
|
55
|
+
showServiceAgreementsFirst,
|
|
56
|
+
showBusinessFinancingFirst
|
|
57
|
+
}) => {
|
|
58
|
+
const hasLegalEntityProgressedBeyondEntitySelection = hasProgressedBeyondEntitySelection$1(legalEntity);
|
|
59
|
+
if (showServiceAgreementsFirst) {
|
|
60
|
+
return TaskTypes.SERVICE_AGREEMENT;
|
|
61
|
+
}
|
|
62
|
+
if (showBusinessFinancingFirst) {
|
|
63
|
+
return TaskTypes.BUSINESS_FINANCING;
|
|
64
|
+
}
|
|
65
|
+
if (canChangeEntityType && canSeeEntitySelection && !hasLegalEntityProgressedBeyondEntitySelection)
|
|
66
|
+
return TaskTypes.BUSINESS_TYPE_SELECTION;
|
|
67
|
+
if (showIntroduction) return TaskTypes.INTRODUCTION;
|
|
68
|
+
if (shouldShowSingpassSelection) return TaskTypes.SINGPASS_SELECTION;
|
|
69
|
+
return TaskTypes.TASKS_OVERVIEW;
|
|
60
70
|
};
|
|
61
|
-
const
|
|
62
|
-
const
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
});
|
|
71
|
+
const hasProgressedBeyondEntitySelection$1 = (legalEntity) => {
|
|
72
|
+
const hasOwnEntityAssocation = legalEntity.entityAssociations?.some(
|
|
73
|
+
(ea) => ea.associatorId === legalEntity.id
|
|
74
|
+
);
|
|
75
|
+
const hasOrganizationType = legalEntity.organization?.type;
|
|
76
|
+
const hasIndividualData = !!legalEntity.individual;
|
|
77
|
+
return hasOwnEntityAssocation || !!hasOrganizationType || hasIndividualData;
|
|
69
78
|
};
|
|
70
|
-
function useSalesChannels() {
|
|
71
|
-
const { isSettingEnabled } = useSettingsContext();
|
|
72
|
-
const { data: existingBusinessLines } = useBusinessLines(["paymentProcessing"]);
|
|
73
|
-
return useMemo(() => {
|
|
74
|
-
const settings = [];
|
|
75
|
-
const businessLinesSalesChannels = [
|
|
76
|
-
...new Set(existingBusinessLines?.flatMap((item) => item.salesChannels ?? []))
|
|
77
|
-
];
|
|
78
|
-
if (isSettingEnabled(SettingNames.RequirePciSignEcommerce)) {
|
|
79
|
-
settings.push("eCommerce");
|
|
80
|
-
}
|
|
81
|
-
if (isSettingEnabled(SettingNames.RequirePciSignPos)) {
|
|
82
|
-
settings.push("pos");
|
|
83
|
-
}
|
|
84
|
-
if (isSettingEnabled(SettingNames.RequirePciSignEcomMoto)) {
|
|
85
|
-
settings.push("ecomMoto");
|
|
86
|
-
}
|
|
87
|
-
if (isSettingEnabled(SettingNames.RequirePciSignPosMoto)) {
|
|
88
|
-
settings.push("posMoto");
|
|
89
|
-
}
|
|
90
|
-
return isSettingEnabled("allowBusinessLines") ? businessLinesSalesChannels : settings;
|
|
91
|
-
}, [existingBusinessLines, isSettingEnabled]);
|
|
92
|
-
}
|
|
93
79
|
const getTaskTypes = async (id, baseUrl) => {
|
|
94
80
|
return httpGet({
|
|
95
81
|
baseUrl,
|
|
@@ -110,141 +96,6 @@ const getPciQuestionnaire = async (legalEntityId, baseUrl, documentId) => {
|
|
|
110
96
|
path: `legalEntities/${legalEntityId}/pci/questionnaires/${documentId}`
|
|
111
97
|
});
|
|
112
98
|
};
|
|
113
|
-
const getPciQuestionnaireList = async (legalEntityId, baseUrl) => {
|
|
114
|
-
return httpGet({
|
|
115
|
-
baseUrl,
|
|
116
|
-
path: `legalEntities/${legalEntityId}/pci/questionnaires`
|
|
117
|
-
});
|
|
118
|
-
};
|
|
119
|
-
const usePciQuestionnaireList = (options) => {
|
|
120
|
-
const { rootLegalEntityId, baseUrl } = useApiContext();
|
|
121
|
-
return useQuery({
|
|
122
|
-
queryKey: ["pciQuestionnaireList"],
|
|
123
|
-
queryFn: () => getPciQuestionnaireList(rootLegalEntityId.value, baseUrl.value),
|
|
124
|
-
...options
|
|
125
|
-
});
|
|
126
|
-
};
|
|
127
|
-
const logger$1 = createLogger();
|
|
128
|
-
const normalizeTaskStatuses = (taskStatuses) => {
|
|
129
|
-
return taskStatuses?.statuses?.reduce((acc, currentTask) => {
|
|
130
|
-
const status = TaskStatuses[currentTask.status];
|
|
131
|
-
const statusEntries = currentTask.taskStatusEntries;
|
|
132
|
-
acc[currentTask.type] = {
|
|
133
|
-
status: status ?? TaskStatuses.DETAILS_REQUIRED,
|
|
134
|
-
taskStatusEntries: statusEntries
|
|
135
|
-
};
|
|
136
|
-
return acc;
|
|
137
|
-
}, {});
|
|
138
|
-
};
|
|
139
|
-
const getAccountTaskStatus = (accountId, payinPayoutTaskStatus) => {
|
|
140
|
-
const taskStatusEntries = payinPayoutTaskStatus?.taskStatusEntries;
|
|
141
|
-
const taskStatusEntry = taskStatusEntries?.find((entry) => entry.id.includes(accountId));
|
|
142
|
-
if (!taskStatusEntry) {
|
|
143
|
-
logger$1.warn(`No task status for this account: ${accountId}`);
|
|
144
|
-
return payinPayoutTaskStatus?.status ?? TaskStatuses.PROCESSING;
|
|
145
|
-
}
|
|
146
|
-
return TaskStatuses[taskStatusEntry.status];
|
|
147
|
-
};
|
|
148
|
-
const getTaskStatus = async (legalEntityId, baseUrl) => {
|
|
149
|
-
return httpGet({
|
|
150
|
-
baseUrl,
|
|
151
|
-
path: `legalEntities/${legalEntityId}/taskStatus`
|
|
152
|
-
});
|
|
153
|
-
};
|
|
154
|
-
const useTaskStatus = (options) => {
|
|
155
|
-
const { rootLegalEntityId, baseUrl } = useApiContext();
|
|
156
|
-
return useQuery({
|
|
157
|
-
queryKey: ["taskStatus"],
|
|
158
|
-
queryFn: () => getTaskStatus(rootLegalEntityId.value, baseUrl.value),
|
|
159
|
-
select: (data) => normalizeTaskStatuses(data),
|
|
160
|
-
...options
|
|
161
|
-
});
|
|
162
|
-
};
|
|
163
|
-
const useLegalEntityType = ({
|
|
164
|
-
legalEntity
|
|
165
|
-
}) => {
|
|
166
|
-
const isTrust = isPartOfTrustFromLegalEntity(legalEntity);
|
|
167
|
-
const isSoleProprietor = hasSolePropInLegalEntity(legalEntity);
|
|
168
|
-
const hasLegalAssociation = isTrust || isSoleProprietor;
|
|
169
|
-
switch (legalEntity.type) {
|
|
170
|
-
case LegalEntityTypes.INDIVIDUAL:
|
|
171
|
-
case LegalEntityTypes.ORGANIZATION:
|
|
172
|
-
if (!hasLegalAssociation) return legalEntity.type;
|
|
173
|
-
if (isSoleProprietor) return LegalEntityTypes.SOLE_PROPRIETORSHIP;
|
|
174
|
-
if (isTrust) return LegalEntityTypes.TRUST;
|
|
175
|
-
break;
|
|
176
|
-
default:
|
|
177
|
-
return void 0;
|
|
178
|
-
}
|
|
179
|
-
};
|
|
180
|
-
const useCanSeeIntroduction = ({ legalEntity }) => {
|
|
181
|
-
const legalEntityType = useLegalEntityType({ legalEntity });
|
|
182
|
-
const { isSettingEnabled } = useSettingsContext();
|
|
183
|
-
switch (legalEntityType) {
|
|
184
|
-
case LegalEntityTypes.INDIVIDUAL:
|
|
185
|
-
return !isSettingEnabled(SettingNames.HideOnboardingIntroductionIndividual);
|
|
186
|
-
case LegalEntityTypes.ORGANIZATION:
|
|
187
|
-
return !isSettingEnabled(SettingNames.HideOnboardingIntroductionOrganization);
|
|
188
|
-
case LegalEntityTypes.SOLE_PROPRIETORSHIP:
|
|
189
|
-
return !isSettingEnabled(SettingNames.HideOnboardingIntroductionSoleProprietor);
|
|
190
|
-
case LegalEntityTypes.TRUST:
|
|
191
|
-
return !isSettingEnabled(SettingNames.HideOnboardingIntroductionTrust);
|
|
192
|
-
default:
|
|
193
|
-
return false;
|
|
194
|
-
}
|
|
195
|
-
};
|
|
196
|
-
const capabilitiesToPreventTypeChange = [
|
|
197
|
-
"receivePayments",
|
|
198
|
-
"issueCard",
|
|
199
|
-
"useCard",
|
|
200
|
-
"withdrawFromAtm",
|
|
201
|
-
"withdrawFromAtmInRestrictedCountries",
|
|
202
|
-
"useCardInRestrictedCountries",
|
|
203
|
-
"useCardInRestrictedIndustries",
|
|
204
|
-
"issueBankAccount",
|
|
205
|
-
"sendToThirdParty",
|
|
206
|
-
"receiveFromThirdParty",
|
|
207
|
-
"getGrantOffers",
|
|
208
|
-
"receiveGrants"
|
|
209
|
-
];
|
|
210
|
-
const entityTypeToCorrespondingAccountHolderOption = {
|
|
211
|
-
[LegalEntityTypes.INDIVIDUAL]: "myName",
|
|
212
|
-
[LegalEntityTypes.ORGANIZATION]: "theCompanyIWorkFor",
|
|
213
|
-
[LegalEntityTypes.SOLE_PROPRIETORSHIP]: "mySoleProprietorName",
|
|
214
|
-
[LegalEntityTypes.TRUST]: "aTrust",
|
|
215
|
-
[LegalEntityTypes.UNINCORPORATED_PARTNERSHIP]: "anUnincorporatedPartnership"
|
|
216
|
-
};
|
|
217
|
-
const getDefaultAccountHolderType = (legalEntityResponse, isTypeChanging = false, accountHolder) => {
|
|
218
|
-
if (!legalEntityResponse?.type) return void 0;
|
|
219
|
-
if (hasOwnEntityAssociationOfType(
|
|
220
|
-
LegalEntityTypes.SOLE_PROPRIETORSHIP,
|
|
221
|
-
legalEntityResponse.entityAssociations,
|
|
222
|
-
legalEntityResponse.id
|
|
223
|
-
)) {
|
|
224
|
-
return "mySoleProprietorName";
|
|
225
|
-
}
|
|
226
|
-
if (hasOwnEntityAssociationOfType(
|
|
227
|
-
LegalEntityTypes.TRUST,
|
|
228
|
-
legalEntityResponse.entityAssociations,
|
|
229
|
-
legalEntityResponse.id
|
|
230
|
-
)) {
|
|
231
|
-
return "aTrust";
|
|
232
|
-
}
|
|
233
|
-
if (hasOwnEntityAssociationOfType(
|
|
234
|
-
LegalEntityTypes.UNINCORPORATED_PARTNERSHIP,
|
|
235
|
-
legalEntityResponse.entityAssociations,
|
|
236
|
-
legalEntityResponse.id
|
|
237
|
-
)) {
|
|
238
|
-
return "anUnincorporatedPartnership";
|
|
239
|
-
}
|
|
240
|
-
if (accountHolder) {
|
|
241
|
-
return accountHolder;
|
|
242
|
-
}
|
|
243
|
-
if (isTypeChanging || !isEmptyEntity(legalEntityResponse)) {
|
|
244
|
-
return entityTypeToCorrespondingAccountHolderOption[legalEntityResponse.type];
|
|
245
|
-
}
|
|
246
|
-
};
|
|
247
|
-
const allowIndividualWithoutSoleProp = (capabilities) => !capabilities?.map((c) => c.replace("Commercial", "").replace("Consumer", "")).some((c) => capabilitiesToPreventTypeChange.includes(c));
|
|
248
99
|
const BusinessTypes = {
|
|
249
100
|
INDIVIDUAL: "individual",
|
|
250
101
|
COMPANY: "company",
|
|
@@ -287,55 +138,10 @@ const companyTypesMapping = {
|
|
|
287
138
|
const useBusinessSetup = (legalEntityResponse) => {
|
|
288
139
|
const { accountHolder } = useAccountHolder();
|
|
289
140
|
const accountHolderType = accountHolder || getDefaultAccountHolderType(legalEntityResponse);
|
|
290
|
-
const organizationType = legalEntityResponse
|
|
291
|
-
const businessSetup = accountHolderType === "theCompanyIWorkFor" && organizationType ? companyTypesMapping[organizationType] : businessTypeMapping[accountHolderType]?.[legalEntityResponse
|
|
141
|
+
const organizationType = legalEntityResponse.organization?.type;
|
|
142
|
+
const businessSetup = accountHolderType === "theCompanyIWorkFor" && organizationType ? companyTypesMapping[organizationType] : businessTypeMapping[accountHolderType]?.[legalEntityResponse.type];
|
|
292
143
|
return businessSetup;
|
|
293
144
|
};
|
|
294
|
-
function useDataMissingRemediations({
|
|
295
|
-
legalEntityId,
|
|
296
|
-
problems
|
|
297
|
-
}) {
|
|
298
|
-
const { t } = useTranslation("common");
|
|
299
|
-
const decisionMakersRemediationMessage = useMemo(() => {
|
|
300
|
-
const remediationCodes = problems[EntityTypes.LEGAL_ENTITY]?.[legalEntityId]?.missingData?.reduce((remediations, error) => {
|
|
301
|
-
const remediation = DATA_MISSING_DECISION_MAKER_ERROR_CODE_MAPPING[error.code];
|
|
302
|
-
return remediation ? [...remediations, remediation] : remediations;
|
|
303
|
-
}, []);
|
|
304
|
-
const uniqueRemediations = [...new Set(remediationCodes)];
|
|
305
|
-
switch (uniqueRemediations?.length) {
|
|
306
|
-
case void 0:
|
|
307
|
-
case 0:
|
|
308
|
-
return void 0;
|
|
309
|
-
case 1:
|
|
310
|
-
return uniqueRemediations[0] ? t(($) => $[`remediationMessage_${uniqueRemediations[0]}`]) : t(($) => $["missingMultipleDecisionMakers"]);
|
|
311
|
-
default:
|
|
312
|
-
return t(($) => $["missingMultipleDecisionMakers"]);
|
|
313
|
-
}
|
|
314
|
-
}, [problems, t, legalEntityId]);
|
|
315
|
-
return {
|
|
316
|
-
remediationMessages: {
|
|
317
|
-
[TaskTypes.DECISION_MAKER]: decisionMakersRemediationMessage
|
|
318
|
-
}
|
|
319
|
-
};
|
|
320
|
-
}
|
|
321
|
-
const filterProblemsByTaskForms = (entityProblems, forms) => {
|
|
322
|
-
if (!entityProblems?.verificationErrors) return entityProblems;
|
|
323
|
-
const filteredEntityProblems = Object.entries(entityProblems.verificationErrors).reduce(
|
|
324
|
-
(acc, [formId, verificationErrors]) => {
|
|
325
|
-
if (!forms.includes(formId)) return acc;
|
|
326
|
-
return {
|
|
327
|
-
...entityProblems,
|
|
328
|
-
verificationErrors: {
|
|
329
|
-
...acc.verificationErrors,
|
|
330
|
-
[formId]: verificationErrors
|
|
331
|
-
}
|
|
332
|
-
};
|
|
333
|
-
},
|
|
334
|
-
{}
|
|
335
|
-
);
|
|
336
|
-
filteredEntityProblems.verificationErrors = Object.keys(filteredEntityProblems.verificationErrors ?? {}).length > 0 ? filteredEntityProblems.verificationErrors : void 0;
|
|
337
|
-
return filteredEntityProblems;
|
|
338
|
-
};
|
|
339
145
|
const businessFormIds = [
|
|
340
146
|
"basicInformation",
|
|
341
147
|
"businessSelection",
|
|
@@ -500,8 +306,8 @@ const PayoutAccountTaskListItem = ({
|
|
|
500
306
|
const { mutateAsync: deleteTransferInstrument } = useDeleteTransferInstrument();
|
|
501
307
|
const isInstantVerificationAccount = isInstantVerifiedAccount(account);
|
|
502
308
|
const obscuredAccountNumber = getObscuredAccountNumber(account);
|
|
503
|
-
const
|
|
504
|
-
const status = isExperimentEnabled("UseTaskStatusApiForPayout") ? getAccountTaskStatus(account.id, payinPayoutTaskStatus) :
|
|
309
|
+
const getTaskStatus = useGetTaskStatus();
|
|
310
|
+
const status = isExperimentEnabled("UseTaskStatusApiForPayout") ? getAccountTaskStatus(account.id, payinPayoutTaskStatus) : getTaskStatus(TaskTypes.PAYOUT, account.id);
|
|
505
311
|
const handleDeleteTransferInstrument = async () => {
|
|
506
312
|
try {
|
|
507
313
|
await deleteTransferInstrument(account.id);
|
|
@@ -570,7 +376,7 @@ function TaskListInner({
|
|
|
570
376
|
const { isExperimentEnabled } = useExperimentsContext();
|
|
571
377
|
const { accountHolder } = useAccountHolder();
|
|
572
378
|
const tasks = useGlobalStore().tasks.value;
|
|
573
|
-
const
|
|
379
|
+
const getTaskStatus = useGetTaskStatus();
|
|
574
380
|
const businessSetup = useBusinessSetup(legalEntityResponse);
|
|
575
381
|
const canSeeIntroduction = useCanSeeIntroduction({ legalEntity: legalEntityResponse });
|
|
576
382
|
const additionalSalesChannels = useSalesChannels();
|
|
@@ -742,7 +548,7 @@ function TaskListInner({
|
|
|
742
548
|
onNavigateToTask: handleOnNavigateToTaskIndividual,
|
|
743
549
|
icon: "decision-maker",
|
|
744
550
|
titleKey: hasTrust ? "trusteePersonalDetails" : hasUnincorporatedPartnership ? "primaryPartnerDetails" : "personalDetails",
|
|
745
|
-
status:
|
|
551
|
+
status: getTaskStatus(TaskTypes.INDIVIDUAL),
|
|
746
552
|
problems: filterProblemsByTaskForms(rootLegalEntityProblems, fullIndividualFormIds)
|
|
747
553
|
}
|
|
748
554
|
),
|
|
@@ -763,7 +569,7 @@ function TaskListInner({
|
|
|
763
569
|
onNavigateToTask: handleOnNavigateToSoleProp,
|
|
764
570
|
icon: "company",
|
|
765
571
|
titleKey: canChangeEntityType ? "soleProprietorshipDetails" : "soleProprietorDetails",
|
|
766
|
-
status:
|
|
572
|
+
status: getTaskStatus(TaskTypes.SOLE_PROPRIETOR_COMPANY),
|
|
767
573
|
problems: getOwnSolePropProblems(legalEntityResponse, capabilityProblems)
|
|
768
574
|
}
|
|
769
575
|
),
|
|
@@ -773,7 +579,7 @@ function TaskListInner({
|
|
|
773
579
|
onNavigateToTask: handleOnNavigateToTaskLegalRepresentative,
|
|
774
580
|
icon: "decision-maker",
|
|
775
581
|
titleKey: "legalRepresentative",
|
|
776
|
-
status:
|
|
582
|
+
status: getTaskStatus(TaskTypes.LEGAL_REPRESENTATIVE_DETAILS)
|
|
777
583
|
}
|
|
778
584
|
),
|
|
779
585
|
tasks.includes(TaskTypes.DECISION_MAKER_OVERVIEW) && /* @__PURE__ */ jsx(
|
|
@@ -782,7 +588,7 @@ function TaskListInner({
|
|
|
782
588
|
onNavigateToTask: handleOnNavigateToTaskDecisionMaker,
|
|
783
589
|
icon: "decision-maker",
|
|
784
590
|
titleKey: hasUnincorporatedPartnership ? "entityDecisionMakers" : "decisionMakers",
|
|
785
|
-
status:
|
|
591
|
+
status: getTaskStatus(TaskTypes.DECISION_MAKER_OVERVIEW),
|
|
786
592
|
warningMessage: showDecisionMakersWarning ? remediationMessages[TaskTypes.DECISION_MAKER] : void 0
|
|
787
593
|
}
|
|
788
594
|
),
|
|
@@ -814,7 +620,7 @@ function TaskListInner({
|
|
|
814
620
|
onNavigateToTask: handleOnNavigateToTaskTrust,
|
|
815
621
|
icon: "trust",
|
|
816
622
|
titleKey: "trustDetails",
|
|
817
|
-
status:
|
|
623
|
+
status: getTaskStatus(TaskTypes.TRUST),
|
|
818
624
|
problems: getOwnTrustProblems(legalEntityResponse, capabilityProblems)
|
|
819
625
|
}
|
|
820
626
|
),
|
|
@@ -824,7 +630,7 @@ function TaskListInner({
|
|
|
824
630
|
onNavigateToTask: handleOnNavigateToTaskTrustMember,
|
|
825
631
|
icon: "decision-maker",
|
|
826
632
|
titleKey: "trustMembers",
|
|
827
|
-
status:
|
|
633
|
+
status: getTaskStatus(TaskTypes.TRUST_MEMBER_OVERVIEW)
|
|
828
634
|
}
|
|
829
635
|
)
|
|
830
636
|
] }),
|
|
@@ -835,7 +641,7 @@ function TaskListInner({
|
|
|
835
641
|
onNavigateToTask: () => onNavigateToTask(TaskTypes.UNINCORPORATED_PARTNERSHIP),
|
|
836
642
|
icon: "trust",
|
|
837
643
|
titleKey: "unincorporatedDetails",
|
|
838
|
-
status:
|
|
644
|
+
status: getTaskStatus(TaskTypes.UNINCORPORATED_PARTNERSHIP),
|
|
839
645
|
problems: getOwnUnincorporatedPartnershipProblems(
|
|
840
646
|
legalEntityResponse,
|
|
841
647
|
capabilityProblems
|
|
@@ -854,7 +660,7 @@ function TaskListInner({
|
|
|
854
660
|
},
|
|
855
661
|
icon: "decision-maker",
|
|
856
662
|
titleKey: "unincorporatedPartnershipMembers",
|
|
857
|
-
status:
|
|
663
|
+
status: getTaskStatus(TaskTypes.UNINCORPORATED_PARTNERSHIP_MEMBER_OVERVIEW)
|
|
858
664
|
}
|
|
859
665
|
)
|
|
860
666
|
] }),
|
|
@@ -1008,56 +814,6 @@ const getOpenIdAuthorizationLink = async (legalEntityId, baseUrl) => {
|
|
|
1008
814
|
})
|
|
1009
815
|
);
|
|
1010
816
|
};
|
|
1011
|
-
function getTrustedFields(rootLegalEntity, apiMapping, provider) {
|
|
1012
|
-
const apiTrustedFields = getApiTrustedFields(rootLegalEntity);
|
|
1013
|
-
return parseTrustedFieldsIntoReadOnlyFields(apiTrustedFields, apiMapping);
|
|
1014
|
-
}
|
|
1015
|
-
function getTrustedEntityAssociations(rootLegalEntity, provider) {
|
|
1016
|
-
const apiTrustedFields = getApiTrustedFields(rootLegalEntity);
|
|
1017
|
-
return parseTrustedEntityAssociationsFromApiFields(apiTrustedFields);
|
|
1018
|
-
}
|
|
1019
|
-
function getTrustedFieldsProvider(rootLegalEntity) {
|
|
1020
|
-
return rootLegalEntity.trustedFields?.[0].provider;
|
|
1021
|
-
}
|
|
1022
|
-
const getApiTrustedFields = (rootLegalEntity, provider) => rootLegalEntity.trustedFields?.find((tf) => true)?.fields ?? [];
|
|
1023
|
-
function parseTrustedFieldsIntoReadOnlyFields(trustedFields, mapping) {
|
|
1024
|
-
const formFieldsMapped = [];
|
|
1025
|
-
trustedFields.forEach((field) => {
|
|
1026
|
-
for (const [key, value] of Object.entries(mapping)) {
|
|
1027
|
-
if (value === field) {
|
|
1028
|
-
formFieldsMapped.push(key);
|
|
1029
|
-
}
|
|
1030
|
-
}
|
|
1031
|
-
});
|
|
1032
|
-
const readOnlyFields = {};
|
|
1033
|
-
formFieldsMapped.forEach((field) => {
|
|
1034
|
-
const tokenizedField = field.split(".");
|
|
1035
|
-
const formField = tokenizedField.pop();
|
|
1036
|
-
const formId = tokenizedField.pop();
|
|
1037
|
-
if (formField && formId) {
|
|
1038
|
-
if (formId in readOnlyFields) {
|
|
1039
|
-
readOnlyFields[formId].push(formField);
|
|
1040
|
-
} else {
|
|
1041
|
-
readOnlyFields[formId] = [formField];
|
|
1042
|
-
}
|
|
1043
|
-
}
|
|
1044
|
-
});
|
|
1045
|
-
return readOnlyFields;
|
|
1046
|
-
}
|
|
1047
|
-
function parseTrustedEntityAssociationsFromApiFields(trustedApiFields) {
|
|
1048
|
-
const rawTrustedEntityAssociations = trustedApiFields.filter((f) => f.startsWith("entityAssociations")) ?? [];
|
|
1049
|
-
const leIdMap = {};
|
|
1050
|
-
rawTrustedEntityAssociations.forEach((rtea) => {
|
|
1051
|
-
const [_, role, leId] = rtea.split(".");
|
|
1052
|
-
const trustedRole = role;
|
|
1053
|
-
if (!leIdMap[leId]) {
|
|
1054
|
-
leIdMap[leId] = { roles: [trustedRole] };
|
|
1055
|
-
} else {
|
|
1056
|
-
leIdMap[leId] = { roles: [...leIdMap[leId].roles, trustedRole] };
|
|
1057
|
-
}
|
|
1058
|
-
});
|
|
1059
|
-
return Object.keys(leIdMap).map((reference) => ({ reference, types: leIdMap[reference].roles }));
|
|
1060
|
-
}
|
|
1061
817
|
const SingpassMyInfoLoginActionTypes = {
|
|
1062
818
|
LOADING: "LOADING",
|
|
1063
819
|
SUCCESS: "SUCCESS",
|
|
@@ -1135,7 +891,6 @@ const useSingpassMyInfoLogin = ({
|
|
|
1135
891
|
};
|
|
1136
892
|
const useAssociatedLegalRepresentative = (legalEntity) => {
|
|
1137
893
|
const matchingAssociation = useMemo(() => {
|
|
1138
|
-
if (!legalEntity) return void 0;
|
|
1139
894
|
return getLegalRepresentative(legalEntity);
|
|
1140
895
|
}, [legalEntity]);
|
|
1141
896
|
const { data } = useLegalEntity(
|
|
@@ -1260,153 +1015,6 @@ const SingpassBanner = ({
|
|
|
1260
1015
|
}
|
|
1261
1016
|
);
|
|
1262
1017
|
};
|
|
1263
|
-
const isNewEntity = /* @__PURE__ */ Symbol("isNewEntity");
|
|
1264
|
-
const useExemptSettlor = ({
|
|
1265
|
-
trust
|
|
1266
|
-
}) => {
|
|
1267
|
-
const matchingAssociation = useMemo(() => {
|
|
1268
|
-
if (!trust) return void 0;
|
|
1269
|
-
return getOwnEntityAssociations(trust).find(
|
|
1270
|
-
(association) => association.type === TrustMemberTypes.SETTLOR && Boolean(association.settlorExemptionReason)
|
|
1271
|
-
);
|
|
1272
|
-
}, [trust]);
|
|
1273
|
-
const { data } = useLegalEntity(matchingAssociation?.legalEntityId ?? skipToken);
|
|
1274
|
-
return data;
|
|
1275
|
-
};
|
|
1276
|
-
const splitAtFirstOccurrence = (str, separator) => {
|
|
1277
|
-
const firstOccurrence = str.indexOf(separator);
|
|
1278
|
-
if (firstOccurrence === -1) return [str];
|
|
1279
|
-
return [str.slice(0, firstOccurrence), str.slice(firstOccurrence + 1)];
|
|
1280
|
-
};
|
|
1281
|
-
const getTrustMemberOwnerId = (trustMemberId, entityAssociations) => entityAssociations.find((association) => association.associatorId === trustMemberId)?.legalEntityId;
|
|
1282
|
-
const getFallbackName = (exemptSettlorAssociation) => {
|
|
1283
|
-
const [firstName, lastName] = splitAtFirstOccurrence(exemptSettlorAssociation.name ?? "", " ");
|
|
1284
|
-
return {
|
|
1285
|
-
firstName,
|
|
1286
|
-
lastName
|
|
1287
|
-
};
|
|
1288
|
-
};
|
|
1289
|
-
const convertEntityAssociationIntoTrustMember = (association, associations, exemptSettlorLE) => {
|
|
1290
|
-
if (association.settlorExemptionReason) {
|
|
1291
|
-
return {
|
|
1292
|
-
trustMemberType: "exemptSettlor",
|
|
1293
|
-
roles: [TrustMemberTypes.SETTLOR],
|
|
1294
|
-
legalEntityType: association.entityType,
|
|
1295
|
-
legalEntityId: association.legalEntityId,
|
|
1296
|
-
settlorExemptionReason: association.settlorExemptionReason,
|
|
1297
|
-
exemptSettlorName: association.entityType === LegalEntityTypes.INDIVIDUAL ? exemptSettlorLE?.individual?.name ?? getFallbackName(association) : void 0,
|
|
1298
|
-
name: association.name
|
|
1299
|
-
};
|
|
1300
|
-
}
|
|
1301
|
-
if (association.entityType === LegalEntityTypes.ORGANIZATION)
|
|
1302
|
-
return {
|
|
1303
|
-
trustMemberType: "company",
|
|
1304
|
-
roles: [],
|
|
1305
|
-
legalEntityType: LegalEntityTypes.ORGANIZATION,
|
|
1306
|
-
legalEntityId: association.legalEntityId,
|
|
1307
|
-
name: association.name,
|
|
1308
|
-
ownerId: getTrustMemberOwnerId(association.legalEntityId, associations)
|
|
1309
|
-
};
|
|
1310
|
-
if (association.entityType === LegalEntityTypes.INDIVIDUAL)
|
|
1311
|
-
return {
|
|
1312
|
-
trustMemberType: "regular",
|
|
1313
|
-
roles: [],
|
|
1314
|
-
legalEntityType: LegalEntityTypes.INDIVIDUAL,
|
|
1315
|
-
legalEntityId: association.legalEntityId,
|
|
1316
|
-
name: association.name
|
|
1317
|
-
};
|
|
1318
|
-
throw new Error(`Not a valid trust member: ${JSON.stringify(association)}`);
|
|
1319
|
-
};
|
|
1320
|
-
const mapEntityAssociationsToTrustMembers = (trustEntityId, entityAssociations, exemptSettlorLE) => {
|
|
1321
|
-
const mappedTrustMembers = entityAssociations.reduce(
|
|
1322
|
-
(acc, entityAssociation) => {
|
|
1323
|
-
if (!Object.values(TrustMemberTypes).includes(entityAssociation.type) || entityAssociation.associatorId !== trustEntityId || !entityAssociation.legalEntityId) {
|
|
1324
|
-
return acc;
|
|
1325
|
-
}
|
|
1326
|
-
const trustMember = acc[entityAssociation.legalEntityId] ?? convertEntityAssociationIntoTrustMember(
|
|
1327
|
-
entityAssociation,
|
|
1328
|
-
entityAssociations,
|
|
1329
|
-
exemptSettlorLE
|
|
1330
|
-
);
|
|
1331
|
-
const trustMemberType = entityAssociation.type;
|
|
1332
|
-
acc[entityAssociation.legalEntityId] = {
|
|
1333
|
-
...trustMember,
|
|
1334
|
-
roles: [.../* @__PURE__ */ new Set([...trustMember.roles, trustMemberType])]
|
|
1335
|
-
};
|
|
1336
|
-
return acc;
|
|
1337
|
-
},
|
|
1338
|
-
{}
|
|
1339
|
-
);
|
|
1340
|
-
return Object.values(mappedTrustMembers);
|
|
1341
|
-
};
|
|
1342
|
-
const mapRootLegalEntityToTrustMember = (rootLegalEntity) => ({
|
|
1343
|
-
trustMemberType: "rootTrustee",
|
|
1344
|
-
roles: [TrustMemberTypes.TRUSTEE],
|
|
1345
|
-
legalEntityType: rootLegalEntity.type,
|
|
1346
|
-
legalEntityId: rootLegalEntity.id,
|
|
1347
|
-
name: getLegalEntityNameBasedOnType(rootLegalEntity)
|
|
1348
|
-
});
|
|
1349
|
-
const mapUndefinedBeneficiaryInfoToTrustMembers = (undefinedBeneficiaryInfo) => undefinedBeneficiaryInfo.map(({ reference, description }) => ({
|
|
1350
|
-
trustMemberType: "undefinedBeneficiary",
|
|
1351
|
-
roles: [TrustMemberTypes.UNDEFINED_BENEFICIARY],
|
|
1352
|
-
reference,
|
|
1353
|
-
description
|
|
1354
|
-
}));
|
|
1355
|
-
const getTrustMembers = (trustLE, rootLegalEntity, exemptSettlorLE) => [
|
|
1356
|
-
mapRootLegalEntityToTrustMember(rootLegalEntity),
|
|
1357
|
-
...mapEntityAssociationsToTrustMembers(
|
|
1358
|
-
trustLE.id,
|
|
1359
|
-
trustLE.entityAssociations ?? [],
|
|
1360
|
-
exemptSettlorLE
|
|
1361
|
-
),
|
|
1362
|
-
...mapUndefinedBeneficiaryInfoToTrustMembers(trustLE.trust?.undefinedBeneficiaryInfo ?? [])
|
|
1363
|
-
];
|
|
1364
|
-
const combineRootLegalEntityWithEntityAssociations = (rootLegalEntity, entityAssociations) => {
|
|
1365
|
-
const allowedRolesForRootLegalEntity = [
|
|
1366
|
-
TrustMemberTypes.SETTLOR,
|
|
1367
|
-
TrustMemberTypes.PROTECTOR,
|
|
1368
|
-
TrustMemberTypes.DEFINED_BENEFICIARY
|
|
1369
|
-
];
|
|
1370
|
-
const roles = entityAssociations.map((entityAssociation) => entityAssociation.type).filter((role) => allowedRolesForRootLegalEntity.includes(role));
|
|
1371
|
-
return {
|
|
1372
|
-
trustMemberType: "rootTrustee",
|
|
1373
|
-
roles: [...roles, TrustMemberTypes.TRUSTEE],
|
|
1374
|
-
legalEntityType: rootLegalEntity.type,
|
|
1375
|
-
legalEntityId: rootLegalEntity.id,
|
|
1376
|
-
name: getLegalEntityNameBasedOnType(rootLegalEntity)
|
|
1377
|
-
};
|
|
1378
|
-
};
|
|
1379
|
-
const getRootTrusteeTrustMembers = (trustLE, rootLegalEntity, exemptSettlorLE) => {
|
|
1380
|
-
const entityAssociations = trustLE.entityAssociations ?? [];
|
|
1381
|
-
const rootLegalEntityAssociations = entityAssociations.filter(
|
|
1382
|
-
(a) => a.legalEntityId === rootLegalEntity.id
|
|
1383
|
-
);
|
|
1384
|
-
const nonRootLegalEntityAssociations = entityAssociations.filter(
|
|
1385
|
-
(a) => a.legalEntityId !== rootLegalEntity.id
|
|
1386
|
-
);
|
|
1387
|
-
return [
|
|
1388
|
-
combineRootLegalEntityWithEntityAssociations(rootLegalEntity, rootLegalEntityAssociations),
|
|
1389
|
-
...mapEntityAssociationsToTrustMembers(
|
|
1390
|
-
trustLE.id,
|
|
1391
|
-
nonRootLegalEntityAssociations ?? [],
|
|
1392
|
-
exemptSettlorLE
|
|
1393
|
-
),
|
|
1394
|
-
...mapUndefinedBeneficiaryInfoToTrustMembers(trustLE.trust?.undefinedBeneficiaryInfo ?? [])
|
|
1395
|
-
];
|
|
1396
|
-
};
|
|
1397
|
-
function useTrustMembers() {
|
|
1398
|
-
const { data: rootLegalEntity } = useLegalEntity(ROOT_LE);
|
|
1399
|
-
const { data: trust } = useAssociatedLegalEntity(rootLegalEntity, LegalEntityTypes.TRUST);
|
|
1400
|
-
const { isExperimentEnabled } = useExperimentsContext();
|
|
1401
|
-
const exemptSettlor = useExemptSettlor({
|
|
1402
|
-
trust
|
|
1403
|
-
});
|
|
1404
|
-
const allowMoreRolesForMainRootTrustee = isExperimentEnabled("AllowMoreRolesForMainRootTrustee");
|
|
1405
|
-
return useMemo(() => {
|
|
1406
|
-
if (!rootLegalEntity || !trust?.trust) return [];
|
|
1407
|
-
return allowMoreRolesForMainRootTrustee ? getRootTrusteeTrustMembers(trust, rootLegalEntity, exemptSettlor) : getTrustMembers(trust, rootLegalEntity, exemptSettlor);
|
|
1408
|
-
}, [rootLegalEntity, trust, exemptSettlor, allowMoreRolesForMainRootTrustee]);
|
|
1409
|
-
}
|
|
1410
1018
|
const useTrustMemberNavigation = ({ navigateTo, trust }) => {
|
|
1411
1019
|
const { t } = useTranslation("trust");
|
|
1412
1020
|
const { showToast } = useToastContext();
|
|
@@ -1420,8 +1028,10 @@ const useTrustMemberNavigation = ({ navigateTo, trust }) => {
|
|
|
1420
1028
|
if (tm.legalEntityId === isNewEntity) {
|
|
1421
1029
|
setTrustMember(tm);
|
|
1422
1030
|
}
|
|
1031
|
+
const id = tm.legalEntityId === isNewEntity ? void 0 : tm.legalEntityId;
|
|
1423
1032
|
navigateTo(
|
|
1424
|
-
tm.trustMemberType === "company" ? TaskTypes.TRUST_MEMBER_COMPANY : TaskTypes.TRUST_MEMBER_INDIVIDUAL
|
|
1033
|
+
tm.trustMemberType === "company" ? TaskTypes.TRUST_MEMBER_COMPANY : TaskTypes.TRUST_MEMBER_INDIVIDUAL,
|
|
1034
|
+
id ? { memberId: id } : void 0
|
|
1425
1035
|
);
|
|
1426
1036
|
} catch {
|
|
1427
1037
|
showToast({ label: t(($) => $["failedToFetchTrustMemberDetails"]), variant: "error" });
|
|
@@ -1429,7 +1039,15 @@ const useTrustMemberNavigation = ({ navigateTo, trust }) => {
|
|
|
1429
1039
|
};
|
|
1430
1040
|
const onNavigateToTrustMemberRoleAndType = (tm) => {
|
|
1431
1041
|
setTrustMember(tm === "new" ? void 0 : tm);
|
|
1432
|
-
|
|
1042
|
+
let id;
|
|
1043
|
+
if (tm !== "new") {
|
|
1044
|
+
if (tm.trustMemberType === "undefinedBeneficiary") {
|
|
1045
|
+
id = tm.reference !== isNewEntity ? tm.reference : void 0;
|
|
1046
|
+
} else if (tm.legalEntityId !== isNewEntity) {
|
|
1047
|
+
id = tm.legalEntityId;
|
|
1048
|
+
}
|
|
1049
|
+
}
|
|
1050
|
+
navigateTo(TaskTypes.TRUST_MEMBER_ROLE_AND_TYPE, id ? { memberId: id } : void 0);
|
|
1433
1051
|
};
|
|
1434
1052
|
const onNavigateToTrust = async (task = TaskTypes.TRUST) => {
|
|
1435
1053
|
try {
|
|
@@ -1445,7 +1063,6 @@ const useTrustMemberNavigation = ({ navigateTo, trust }) => {
|
|
|
1445
1063
|
return {
|
|
1446
1064
|
trustMember,
|
|
1447
1065
|
trustMemberId: memberId === isNewEntity ? void 0 : memberId,
|
|
1448
|
-
// Do not pass Symbol('isNewEntity') as trustMemberId
|
|
1449
1066
|
trustMembers,
|
|
1450
1067
|
onNavigateToTrust,
|
|
1451
1068
|
onNavigateToTrustMemberRoleAndType,
|
|
@@ -1479,12 +1096,14 @@ const useUnincorporatedPartnershipNavigation = ({ navigateTo }) => {
|
|
|
1479
1096
|
);
|
|
1480
1097
|
return;
|
|
1481
1098
|
}
|
|
1099
|
+
const memberParams = createdMember.legalEntityId ? { memberId: createdMember.legalEntityId } : void 0;
|
|
1482
1100
|
if (roleAndType) {
|
|
1483
|
-
navigateTo(TaskTypes.UNINCORPORATED_PARTNERSHIP_MEMBER_ROLE_AND_TYPE);
|
|
1101
|
+
navigateTo(TaskTypes.UNINCORPORATED_PARTNERSHIP_MEMBER_ROLE_AND_TYPE, memberParams);
|
|
1484
1102
|
return;
|
|
1485
1103
|
}
|
|
1486
1104
|
navigateTo(
|
|
1487
|
-
createdMember?.legalEntityType === LegalEntityTypes.ORGANIZATION ? TaskTypes.UNINCORPORATED_PARTNERSHIP_MEMBER_COMPANY : TaskTypes.UNINCORPORATED_PARTNERSHIP_MEMBER_INDIVIDUAL
|
|
1105
|
+
createdMember?.legalEntityType === LegalEntityTypes.ORGANIZATION ? TaskTypes.UNINCORPORATED_PARTNERSHIP_MEMBER_COMPANY : TaskTypes.UNINCORPORATED_PARTNERSHIP_MEMBER_INDIVIDUAL,
|
|
1106
|
+
memberParams
|
|
1488
1107
|
);
|
|
1489
1108
|
};
|
|
1490
1109
|
return {
|
|
@@ -1493,6 +1112,8 @@ const useUnincorporatedPartnershipNavigation = ({ navigateTo }) => {
|
|
|
1493
1112
|
setActiveMember
|
|
1494
1113
|
};
|
|
1495
1114
|
};
|
|
1115
|
+
const MemoryRouterContext = createContext(null);
|
|
1116
|
+
const useMemoryRouter = () => useContext(MemoryRouterContext);
|
|
1496
1117
|
const useShouldShowIntroduction = ({
|
|
1497
1118
|
legalEntity
|
|
1498
1119
|
}) => {
|
|
@@ -1500,6 +1121,715 @@ const useShouldShowIntroduction = ({
|
|
|
1500
1121
|
const { hasSeenIntroduction } = useHasSeenIntroduction({ legalEntityId: legalEntity.id });
|
|
1501
1122
|
return canSeeIntroduction && !hasSeenIntroduction;
|
|
1502
1123
|
};
|
|
1124
|
+
function DefaultRouteRedirect({ legalEntity, children }) {
|
|
1125
|
+
const navigate = useNavigate();
|
|
1126
|
+
const { isSettingEnabled } = useSettingsContext();
|
|
1127
|
+
const { accountHolder } = useAccountHolder();
|
|
1128
|
+
const { canSeeEntitySelection } = useCanSeeEntitySelection(legalEntity.id);
|
|
1129
|
+
const { hasSeenSingpassSelection } = useHasSeenSingpassSelection({
|
|
1130
|
+
legalEntityId: legalEntity.id
|
|
1131
|
+
});
|
|
1132
|
+
const { isEligibleForSingpass } = useSingpassMyInfoLogin({ legalEntity, accountHolder });
|
|
1133
|
+
const showIntroduction = useShouldShowIntroduction({ legalEntity });
|
|
1134
|
+
const showServiceAgreementsFirst = isSettingEnabled(SettingNames.ShowServiceAgreementsFirst);
|
|
1135
|
+
const showBusinessFinancingFirst = isSettingEnabled(SettingNames.ShowBusinessFinancingFirst);
|
|
1136
|
+
const canChangeEntityType = isSettingEnabled(SettingNames.AllowLegalEntityTypeChange);
|
|
1137
|
+
const shouldShowSingpassSelection = isEligibleForSingpass && !hasSeenSingpassSelection;
|
|
1138
|
+
const defaultTask = useMemo(
|
|
1139
|
+
() => getDefaultTask$1({
|
|
1140
|
+
legalEntity,
|
|
1141
|
+
canSeeEntitySelection,
|
|
1142
|
+
canChangeEntityType,
|
|
1143
|
+
showIntroduction,
|
|
1144
|
+
shouldShowSingpassSelection,
|
|
1145
|
+
showServiceAgreementsFirst,
|
|
1146
|
+
showBusinessFinancingFirst
|
|
1147
|
+
}),
|
|
1148
|
+
[
|
|
1149
|
+
legalEntity,
|
|
1150
|
+
canSeeEntitySelection,
|
|
1151
|
+
canChangeEntityType,
|
|
1152
|
+
showIntroduction,
|
|
1153
|
+
shouldShowSingpassSelection,
|
|
1154
|
+
showServiceAgreementsFirst,
|
|
1155
|
+
showBusinessFinancingFirst
|
|
1156
|
+
]
|
|
1157
|
+
);
|
|
1158
|
+
const shouldRenderInline = defaultTask === TaskTypes.TASKS_OVERVIEW && !!children;
|
|
1159
|
+
useEffect(() => {
|
|
1160
|
+
if (shouldRenderInline) return;
|
|
1161
|
+
navigate.replace(defaultTask);
|
|
1162
|
+
}, [defaultTask, navigate, shouldRenderInline]);
|
|
1163
|
+
if (shouldRenderInline) {
|
|
1164
|
+
return /* @__PURE__ */ jsx(Fragment, { children });
|
|
1165
|
+
}
|
|
1166
|
+
return /* @__PURE__ */ jsx(Loader, {});
|
|
1167
|
+
}
|
|
1168
|
+
function SuspenseRoute({ path, children }) {
|
|
1169
|
+
return /* @__PURE__ */ jsx(Route, { path, children: /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(Loader, {}), children }) });
|
|
1170
|
+
}
|
|
1171
|
+
function OnboardingRouter({
|
|
1172
|
+
legalEntity,
|
|
1173
|
+
rootLegalEntityCountry,
|
|
1174
|
+
trust,
|
|
1175
|
+
unincorporatedPartnership,
|
|
1176
|
+
soleProp,
|
|
1177
|
+
associatedLegalRepresentative,
|
|
1178
|
+
refetchLegalEntity,
|
|
1179
|
+
refetchTrust,
|
|
1180
|
+
refetchUnincorporatedPartnership,
|
|
1181
|
+
onExternalSubmit,
|
|
1182
|
+
accountHolder,
|
|
1183
|
+
setAccountHolder,
|
|
1184
|
+
setCanSeeEntitySelection,
|
|
1185
|
+
setHasSeenIntroduction,
|
|
1186
|
+
taskTypes,
|
|
1187
|
+
targetLegalEntityType,
|
|
1188
|
+
setTargetLegalEntityType,
|
|
1189
|
+
trustMember,
|
|
1190
|
+
onNavigateToTrust,
|
|
1191
|
+
onNavigateToTrustMemberRoleAndType,
|
|
1192
|
+
onNavigateToTrustMemberEditDetails,
|
|
1193
|
+
unincorporatedPartnershipMember,
|
|
1194
|
+
setActiveMember,
|
|
1195
|
+
onNavigateToMember,
|
|
1196
|
+
singpassBanner,
|
|
1197
|
+
handleSingpassSelectionNextClick,
|
|
1198
|
+
openBankingPartnerConfigId
|
|
1199
|
+
}) {
|
|
1200
|
+
const navigate = useNavigate();
|
|
1201
|
+
const userEvents = useAnalyticsContext();
|
|
1202
|
+
const handleOnSubmit = async (data, backStepCount) => {
|
|
1203
|
+
onExternalSubmit?.(data);
|
|
1204
|
+
await refetchLegalEntity();
|
|
1205
|
+
navigate.back(backStepCount);
|
|
1206
|
+
};
|
|
1207
|
+
const onNavigateToDecisionMakerIndividual = (task, decisionMakerId, parentId) => {
|
|
1208
|
+
navigate.to(task, {
|
|
1209
|
+
parentId: parentId ?? legalEntity.id,
|
|
1210
|
+
...decisionMakerId ? { decisionMakerId } : {},
|
|
1211
|
+
// For company-owner routes, memberId in the URL = parentId (the member company)
|
|
1212
|
+
...parentId ? { memberId: parentId } : {}
|
|
1213
|
+
});
|
|
1214
|
+
};
|
|
1215
|
+
const onNavigateToTask = async (task, id) => {
|
|
1216
|
+
switch (task) {
|
|
1217
|
+
case TaskTypes.PAYOUT:
|
|
1218
|
+
case TaskTypes.PAYIN:
|
|
1219
|
+
navigate.to(task, id ? { transferInstrumentId: id } : {});
|
|
1220
|
+
break;
|
|
1221
|
+
case TaskTypes.TRUST:
|
|
1222
|
+
case TaskTypes.TRUST_MEMBER_OVERVIEW:
|
|
1223
|
+
await onNavigateToTrust(
|
|
1224
|
+
task === TaskTypes.TRUST_MEMBER_OVERVIEW ? TaskTypes.TRUST_MEMBER_OVERVIEW : void 0
|
|
1225
|
+
);
|
|
1226
|
+
break;
|
|
1227
|
+
default:
|
|
1228
|
+
navigate.to(task);
|
|
1229
|
+
}
|
|
1230
|
+
};
|
|
1231
|
+
return /* @__PURE__ */ jsxs(Switch, { children: [
|
|
1232
|
+
/* @__PURE__ */ jsx(Route, { path: ROUTE_PATHS[TaskTypes.TASKS_OVERVIEW], children: /* @__PURE__ */ jsx(TaskList, { onNavigateToTask, singpassComponent: singpassBanner }) }),
|
|
1233
|
+
/* @__PURE__ */ jsx(SuspenseRoute, { path: ROUTE_PATHS[TaskTypes.INTRODUCTION], children: /* @__PURE__ */ jsx(
|
|
1234
|
+
Introduction$1,
|
|
1235
|
+
{
|
|
1236
|
+
onExitIntroduction: () => {
|
|
1237
|
+
setHasSeenIntroduction(true);
|
|
1238
|
+
navigate.to("default");
|
|
1239
|
+
},
|
|
1240
|
+
tasks: taskTypes
|
|
1241
|
+
}
|
|
1242
|
+
) }),
|
|
1243
|
+
/* @__PURE__ */ jsx(SuspenseRoute, { path: ROUTE_PATHS[TaskTypes.BUSINESS_TYPE_SELECTION], children: /* @__PURE__ */ jsx("div", { className: "adyen-kyc-u-display-flex adyen-kyc-u-justify-content-center", children: /* @__PURE__ */ jsx(
|
|
1244
|
+
BusinessTypeSelectionPage$1,
|
|
1245
|
+
{
|
|
1246
|
+
onComplete: async (newAccountHolder) => {
|
|
1247
|
+
setAccountHolder(newAccountHolder);
|
|
1248
|
+
setCanSeeEntitySelection(false);
|
|
1249
|
+
await refetchLegalEntity();
|
|
1250
|
+
navigate.to("default");
|
|
1251
|
+
},
|
|
1252
|
+
onBack: () => navigate.back()
|
|
1253
|
+
}
|
|
1254
|
+
) }) }),
|
|
1255
|
+
/* @__PURE__ */ jsx(SuspenseRoute, { path: ROUTE_PATHS[TaskTypes.SINGPASS_SELECTION], children: /* @__PURE__ */ jsx(
|
|
1256
|
+
SingpassSelection$1,
|
|
1257
|
+
{
|
|
1258
|
+
handleNextClick: handleSingpassSelectionNextClick,
|
|
1259
|
+
accountHolder,
|
|
1260
|
+
legalEntityType: legalEntity.type
|
|
1261
|
+
}
|
|
1262
|
+
) }),
|
|
1263
|
+
/* @__PURE__ */ jsx(SuspenseRoute, { path: ROUTE_PATHS[TaskTypes.CAPABILITY_REJECTED], children: /* @__PURE__ */ jsx(AccountSetupRejected$1, {}) }),
|
|
1264
|
+
/* @__PURE__ */ jsx(SuspenseRoute, { path: ROUTE_PATHS[TaskTypes.INDIVIDUAL], children: /* @__PURE__ */ jsx(
|
|
1265
|
+
RootIndividualDetailsPage$1,
|
|
1266
|
+
{
|
|
1267
|
+
onSubmit: async (data) => {
|
|
1268
|
+
onExternalSubmit?.(data);
|
|
1269
|
+
await refetchLegalEntity();
|
|
1270
|
+
navigate.to(TaskTypes.TASKS_OVERVIEW);
|
|
1271
|
+
setTargetLegalEntityType(void 0);
|
|
1272
|
+
},
|
|
1273
|
+
handleHomeClick: () => navigate.to(TaskTypes.TASKS_OVERVIEW),
|
|
1274
|
+
isTargetLegalEntityType: targetLegalEntityType === LegalEntityTypes.INDIVIDUAL
|
|
1275
|
+
}
|
|
1276
|
+
) }),
|
|
1277
|
+
/* @__PURE__ */ jsx(SuspenseRoute, { path: ROUTE_PATHS[TaskTypes.BUSINESS_DETAILS], children: /* @__PURE__ */ jsx(
|
|
1278
|
+
RootBusinessDetailsPage$1,
|
|
1279
|
+
{
|
|
1280
|
+
onSubmit: async (data) => {
|
|
1281
|
+
onExternalSubmit?.(data);
|
|
1282
|
+
await refetchLegalEntity();
|
|
1283
|
+
navigate.to(TaskTypes.TASKS_OVERVIEW);
|
|
1284
|
+
setTargetLegalEntityType(void 0);
|
|
1285
|
+
},
|
|
1286
|
+
handleHomeClick: () => navigate.back(),
|
|
1287
|
+
isTargetLegalEntityType: targetLegalEntityType === LegalEntityTypes.ORGANIZATION
|
|
1288
|
+
}
|
|
1289
|
+
) }),
|
|
1290
|
+
/* @__PURE__ */ jsx(SuspenseRoute, { path: ROUTE_PATHS[TaskTypes.DECISION_MAKER_OVERVIEW], children: /* @__PURE__ */ jsx(
|
|
1291
|
+
DecisionMakers$1,
|
|
1292
|
+
{
|
|
1293
|
+
onNavigateToIndividual: (legalEntityId) => onNavigateToDecisionMakerIndividual(TaskTypes.DECISION_MAKER, legalEntityId),
|
|
1294
|
+
navigateBackToTaskList: () => navigate.back()
|
|
1295
|
+
}
|
|
1296
|
+
) }),
|
|
1297
|
+
/* @__PURE__ */ jsx(SuspenseRoute, { path: ROUTE_PATHS[TaskTypes.CUSTOMER_SUPPORT], children: /* @__PURE__ */ jsx(
|
|
1298
|
+
CustomerSupport$1,
|
|
1299
|
+
{
|
|
1300
|
+
country: rootLegalEntityCountry,
|
|
1301
|
+
onSubmit: () => navigate.to(TaskTypes.TASKS_OVERVIEW)
|
|
1302
|
+
}
|
|
1303
|
+
) }),
|
|
1304
|
+
/* @__PURE__ */ jsx(SuspenseRoute, { path: ROUTE_PATHS[TaskTypes.REVIEW], children: /* @__PURE__ */ jsx(Review$1, { handleHomeClick: () => navigate.to(TaskTypes.TASKS_OVERVIEW) }) }),
|
|
1305
|
+
/* @__PURE__ */ jsx(SuspenseRoute, { path: ROUTE_PATHS[TaskTypes.DECISION_MAKER], children: /* @__PURE__ */ jsx(
|
|
1306
|
+
DecisionMakerDetailsPage$1,
|
|
1307
|
+
{
|
|
1308
|
+
onSubmit: async (data, scenario) => {
|
|
1309
|
+
onExternalSubmit?.(data);
|
|
1310
|
+
await refetchLegalEntity();
|
|
1311
|
+
if (isBafinSignatoryFlow({
|
|
1312
|
+
taskType: TaskTypes.DECISION_MAKER,
|
|
1313
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
1314
|
+
// @ts-ignore basicDetails will be there when it's IndividualOnfidoSchema
|
|
1315
|
+
data,
|
|
1316
|
+
scenarios: scenario
|
|
1317
|
+
})) {
|
|
1318
|
+
showIdNowModal.value = true;
|
|
1319
|
+
idNowPostSubmit.value = true;
|
|
1320
|
+
} else {
|
|
1321
|
+
navigate.back();
|
|
1322
|
+
}
|
|
1323
|
+
},
|
|
1324
|
+
handleHomeClick: () => navigate.back()
|
|
1325
|
+
}
|
|
1326
|
+
) }),
|
|
1327
|
+
/* @__PURE__ */ jsx(SuspenseRoute, { path: ROUTE_PATHS[TaskTypes.PAYOUT], children: /* @__PURE__ */ jsx(
|
|
1328
|
+
PayoutDetailsPage$1,
|
|
1329
|
+
{
|
|
1330
|
+
taskType: TaskTypes.PAYOUT,
|
|
1331
|
+
handleHomeClick: () => navigate.back(),
|
|
1332
|
+
openBankingPartnerConfigId,
|
|
1333
|
+
onSubmit: handleOnSubmit
|
|
1334
|
+
}
|
|
1335
|
+
) }),
|
|
1336
|
+
/* @__PURE__ */ jsx(SuspenseRoute, { path: ROUTE_PATHS[TaskTypes.PAYIN], children: /* @__PURE__ */ jsx(
|
|
1337
|
+
PayoutDetailsPage$1,
|
|
1338
|
+
{
|
|
1339
|
+
taskType: TaskTypes.PAYIN,
|
|
1340
|
+
handleHomeClick: () => navigate.back(),
|
|
1341
|
+
openBankingPartnerConfigId,
|
|
1342
|
+
onSubmit: handleOnSubmit
|
|
1343
|
+
}
|
|
1344
|
+
) }),
|
|
1345
|
+
/* @__PURE__ */ jsx(SuspenseRoute, { path: ROUTE_PATHS[TaskTypes.TRUST_MEMBER_OVERVIEW], children: /* @__PURE__ */ jsx(
|
|
1346
|
+
TrustMembersOverview$1,
|
|
1347
|
+
{
|
|
1348
|
+
navigateBackToTaskList: () => navigate.back(),
|
|
1349
|
+
navigateToEditTrustMember: onNavigateToTrustMemberRoleAndType,
|
|
1350
|
+
navigateToEditTrustMemberOwner: (trustMemberOwnerId, trustMemberId) => onNavigateToDecisionMakerIndividual(
|
|
1351
|
+
TaskTypes.TRUST_MEMBER_COMPANY_OWNER,
|
|
1352
|
+
trustMemberOwnerId,
|
|
1353
|
+
trustMemberId
|
|
1354
|
+
)
|
|
1355
|
+
}
|
|
1356
|
+
) }),
|
|
1357
|
+
/* @__PURE__ */ jsx(SuspenseRoute, { path: ROUTE_PATHS[TaskTypes.TRUST_MEMBER_ROLE_AND_TYPE], children: /* @__PURE__ */ jsx(
|
|
1358
|
+
TrustMemberRoleAndTypePage$1,
|
|
1359
|
+
{
|
|
1360
|
+
trustId: trust?.id,
|
|
1361
|
+
navigateToFullDropinFor: onNavigateToTrustMemberEditDetails,
|
|
1362
|
+
navigateBack: async () => {
|
|
1363
|
+
await refetchTrust();
|
|
1364
|
+
navigate.back();
|
|
1365
|
+
}
|
|
1366
|
+
}
|
|
1367
|
+
) }),
|
|
1368
|
+
/* @__PURE__ */ jsx(SuspenseRoute, { path: ROUTE_PATHS[TaskTypes.TRUST_MEMBER_COMPANY_OWNER], children: /* @__PURE__ */ jsx(
|
|
1369
|
+
DecisionMakerDetailsPage$1,
|
|
1370
|
+
{
|
|
1371
|
+
taskType: TaskTypes.TRUST_MEMBER_COMPANY_OWNER,
|
|
1372
|
+
onSubmit: async (data) => {
|
|
1373
|
+
await handleOnSubmit(data);
|
|
1374
|
+
await refetchTrust();
|
|
1375
|
+
},
|
|
1376
|
+
handleHomeClick: () => navigate.back()
|
|
1377
|
+
}
|
|
1378
|
+
) }),
|
|
1379
|
+
/* @__PURE__ */ jsx(SuspenseRoute, { path: ROUTE_PATHS[TaskTypes.TRUST_MEMBER_INDIVIDUAL], children: /* @__PURE__ */ jsx(
|
|
1380
|
+
TrustMemberIndividualPage$1,
|
|
1381
|
+
{
|
|
1382
|
+
trustId: trust?.id,
|
|
1383
|
+
newMember: trustMember?.legalEntityId === isNewEntity ? trustMember : void 0,
|
|
1384
|
+
onSubmit: async (data) => {
|
|
1385
|
+
await handleOnSubmit(data, 2);
|
|
1386
|
+
await refetchTrust();
|
|
1387
|
+
},
|
|
1388
|
+
handleBackClick: () => navigate.back(),
|
|
1389
|
+
handleHomeClick: () => navigate.to(TaskTypes.TRUST_MEMBER_OVERVIEW)
|
|
1390
|
+
}
|
|
1391
|
+
) }),
|
|
1392
|
+
/* @__PURE__ */ jsx(SuspenseRoute, { path: ROUTE_PATHS[TaskTypes.TRUST_MEMBER_COMPANY], children: /* @__PURE__ */ jsx(
|
|
1393
|
+
TrustMemberCompanyPage$1,
|
|
1394
|
+
{
|
|
1395
|
+
trustId: trust?.id,
|
|
1396
|
+
newMember: trustMember?.legalEntityId === isNewEntity ? trustMember : void 0,
|
|
1397
|
+
onSubmit: async (data) => {
|
|
1398
|
+
await handleOnSubmit(data, 2);
|
|
1399
|
+
await refetchTrust();
|
|
1400
|
+
},
|
|
1401
|
+
handleHomeClick: () => navigate.back()
|
|
1402
|
+
}
|
|
1403
|
+
) }),
|
|
1404
|
+
/* @__PURE__ */ jsx(SuspenseRoute, { path: ROUTE_PATHS[TaskTypes.TRUST], children: /* @__PURE__ */ jsx(
|
|
1405
|
+
TrustDetailsPage$1,
|
|
1406
|
+
{
|
|
1407
|
+
taskType: TaskTypes.TRUST,
|
|
1408
|
+
trustId: trust?.id,
|
|
1409
|
+
onSubmit: (data) => handleOnSubmit(data, 1),
|
|
1410
|
+
handleHomeClick: () => navigate.back()
|
|
1411
|
+
}
|
|
1412
|
+
) }),
|
|
1413
|
+
/* @__PURE__ */ jsx(SuspenseRoute, { path: ROUTE_PATHS[TaskTypes.UNINCORPORATED_PARTNERSHIP_MEMBER_OVERVIEW], children: /* @__PURE__ */ jsx(
|
|
1414
|
+
UnincorporatedPartnershipMembersOverview$1,
|
|
1415
|
+
{
|
|
1416
|
+
navigateBackToTaskList: () => navigate.back(),
|
|
1417
|
+
navigateToEditMember: (member) => onNavigateToMember({
|
|
1418
|
+
selectedMember: member,
|
|
1419
|
+
selectedEntityType: member?.legalEntityType,
|
|
1420
|
+
selectedRoles: member?.roles,
|
|
1421
|
+
roleAndType: true
|
|
1422
|
+
}),
|
|
1423
|
+
navigateToEditMemberOwner: (memberOwnerId, memberId) => {
|
|
1424
|
+
setActiveMember({
|
|
1425
|
+
legalEntityId: memberId
|
|
1426
|
+
});
|
|
1427
|
+
onNavigateToDecisionMakerIndividual(
|
|
1428
|
+
TaskTypes.UNINCORPORATED_PARTNERSHIP_MEMBER_COMPANY_OWNER,
|
|
1429
|
+
memberOwnerId,
|
|
1430
|
+
memberId
|
|
1431
|
+
);
|
|
1432
|
+
}
|
|
1433
|
+
}
|
|
1434
|
+
) }),
|
|
1435
|
+
/* @__PURE__ */ jsx(SuspenseRoute, { path: ROUTE_PATHS[TaskTypes.UNINCORPORATED_PARTNERSHIP_MEMBER_ROLE_AND_TYPE], children: /* @__PURE__ */ jsx(
|
|
1436
|
+
UnincorporatedPartnershipMemberRoleAndTypePage$1,
|
|
1437
|
+
{
|
|
1438
|
+
onNavigateToMember,
|
|
1439
|
+
navigateBack: async () => {
|
|
1440
|
+
await refetchUnincorporatedPartnership();
|
|
1441
|
+
navigate.back();
|
|
1442
|
+
}
|
|
1443
|
+
}
|
|
1444
|
+
) }),
|
|
1445
|
+
/* @__PURE__ */ jsx(SuspenseRoute, { path: ROUTE_PATHS[TaskTypes.UNINCORPORATED_PARTNERSHIP_MEMBER_COMPANY_OWNER], children: /* @__PURE__ */ jsx(
|
|
1446
|
+
DecisionMakerDetailsPage$1,
|
|
1447
|
+
{
|
|
1448
|
+
taskType: TaskTypes.UNINCORPORATED_PARTNERSHIP_MEMBER_COMPANY_OWNER,
|
|
1449
|
+
onSubmit: async (data) => {
|
|
1450
|
+
await handleOnSubmit(data);
|
|
1451
|
+
await refetchUnincorporatedPartnership();
|
|
1452
|
+
},
|
|
1453
|
+
handleHomeClick: () => navigate.back()
|
|
1454
|
+
}
|
|
1455
|
+
) }),
|
|
1456
|
+
/* @__PURE__ */ jsx(SuspenseRoute, { path: ROUTE_PATHS[TaskTypes.UNINCORPORATED_PARTNERSHIP_MEMBER_INDIVIDUAL], children: /* @__PURE__ */ jsx(
|
|
1457
|
+
UnincorporatedPartnershipIndividualPage$1,
|
|
1458
|
+
{
|
|
1459
|
+
partnershipId: unincorporatedPartnership?.id,
|
|
1460
|
+
member: unincorporatedPartnershipMember,
|
|
1461
|
+
onSubmit: (data) => {
|
|
1462
|
+
handleOnSubmit(data, 2);
|
|
1463
|
+
refetchUnincorporatedPartnership();
|
|
1464
|
+
},
|
|
1465
|
+
handleBackClick: () => navigate.back(),
|
|
1466
|
+
handleHomeClick: () => navigate.to(TaskTypes.TRUST_MEMBER_OVERVIEW)
|
|
1467
|
+
}
|
|
1468
|
+
) }),
|
|
1469
|
+
/* @__PURE__ */ jsx(SuspenseRoute, { path: ROUTE_PATHS[TaskTypes.UNINCORPORATED_PARTNERSHIP_MEMBER_COMPANY], children: /* @__PURE__ */ jsx(
|
|
1470
|
+
UnincorporatedPartnershipMemberCompanyPage$1,
|
|
1471
|
+
{
|
|
1472
|
+
partnershipId: unincorporatedPartnership?.id,
|
|
1473
|
+
newMember: unincorporatedPartnershipMember?.legalEntityId === "" ? unincorporatedPartnershipMember : void 0,
|
|
1474
|
+
onSubmit: (data) => handleOnSubmit(data, 2),
|
|
1475
|
+
handleHomeClick: () => navigate.back()
|
|
1476
|
+
}
|
|
1477
|
+
) }),
|
|
1478
|
+
/* @__PURE__ */ jsx(SuspenseRoute, { path: ROUTE_PATHS[TaskTypes.UNINCORPORATED_PARTNERSHIP], children: /* @__PURE__ */ jsx(
|
|
1479
|
+
TrustDetailsPage$1,
|
|
1480
|
+
{
|
|
1481
|
+
taskType: TaskTypes.UNINCORPORATED_PARTNERSHIP,
|
|
1482
|
+
trustId: unincorporatedPartnership?.id,
|
|
1483
|
+
onSubmit: (data) => handleOnSubmit(data, 1),
|
|
1484
|
+
handleHomeClick: () => navigate.back()
|
|
1485
|
+
}
|
|
1486
|
+
) }),
|
|
1487
|
+
/* @__PURE__ */ jsx(SuspenseRoute, { path: ROUTE_PATHS[TaskTypes.PCI_DSS], children: /* @__PURE__ */ jsx(SignPCIComponent$1, { onClose: () => navigate.back() }) }),
|
|
1488
|
+
/* @__PURE__ */ jsx(SuspenseRoute, { path: ROUTE_PATHS[TaskTypes.SOLE_PROPRIETOR_COMPANY], children: /* @__PURE__ */ jsx(
|
|
1489
|
+
SoleProprietorshipPage$1,
|
|
1490
|
+
{
|
|
1491
|
+
solePropId: soleProp?.id,
|
|
1492
|
+
onSubmit: (data) => handleOnSubmit(data, 1),
|
|
1493
|
+
handleHomeClick: () => navigate.back()
|
|
1494
|
+
}
|
|
1495
|
+
) }),
|
|
1496
|
+
/* @__PURE__ */ jsx(SuspenseRoute, { path: ROUTE_PATHS[TaskTypes.SERVICE_AGREEMENT], children: /* @__PURE__ */ jsx(
|
|
1497
|
+
AcceptTermsOfService$1,
|
|
1498
|
+
{
|
|
1499
|
+
legalEntityId: legalEntity.id,
|
|
1500
|
+
onClose: () => {
|
|
1501
|
+
userEvents.addPageEvent("Clicked button", {
|
|
1502
|
+
actionType: "back",
|
|
1503
|
+
label: "back"
|
|
1504
|
+
});
|
|
1505
|
+
navigate.back();
|
|
1506
|
+
},
|
|
1507
|
+
asEmbedded: false,
|
|
1508
|
+
handleAddSigner: () => {
|
|
1509
|
+
onNavigateToDecisionMakerIndividual(TaskTypes.DECISION_MAKER);
|
|
1510
|
+
}
|
|
1511
|
+
}
|
|
1512
|
+
) }),
|
|
1513
|
+
/* @__PURE__ */ jsx(SuspenseRoute, { path: ROUTE_PATHS[TaskTypes.LEGAL_REPRESENTATIVE_DETAILS], children: /* @__PURE__ */ jsx(
|
|
1514
|
+
LegalRepresentativeDetailsPage$1,
|
|
1515
|
+
{
|
|
1516
|
+
legalRepresentativeId: associatedLegalRepresentative?.id,
|
|
1517
|
+
onSubmit: handleOnSubmit,
|
|
1518
|
+
handleHomeClick: () => navigate.back()
|
|
1519
|
+
}
|
|
1520
|
+
) }),
|
|
1521
|
+
/* @__PURE__ */ jsx(SuspenseRoute, { path: ROUTE_PATHS[TaskTypes.SOURCE_OF_FUNDS], children: /* @__PURE__ */ jsx(
|
|
1522
|
+
SourceOfFundsPage$1,
|
|
1523
|
+
{
|
|
1524
|
+
onSubmit: handleOnSubmit,
|
|
1525
|
+
handleHomeClick: () => navigate.to(TaskTypes.TASKS_OVERVIEW)
|
|
1526
|
+
}
|
|
1527
|
+
) }),
|
|
1528
|
+
/* @__PURE__ */ jsx(SuspenseRoute, { path: ROUTE_PATHS[TaskTypes.BUSINESS_FINANCING], children: /* @__PURE__ */ jsx(
|
|
1529
|
+
BusinessFinancingPage$1,
|
|
1530
|
+
{
|
|
1531
|
+
onSubmit: async (data) => {
|
|
1532
|
+
onExternalSubmit?.(data);
|
|
1533
|
+
await refetchLegalEntity();
|
|
1534
|
+
navigate.to(TaskTypes.TASKS_OVERVIEW);
|
|
1535
|
+
},
|
|
1536
|
+
handleHomeClick: () => navigate.to(TaskTypes.TASKS_OVERVIEW)
|
|
1537
|
+
}
|
|
1538
|
+
) }),
|
|
1539
|
+
/* @__PURE__ */ jsx(SuspenseRoute, { path: ROUTE_PATHS[TaskTypes.TAX_REPORTING], children: /* @__PURE__ */ jsx(TaxReportingDropin$1, { handleHomeClick: () => navigate.to(TaskTypes.TASKS_OVERVIEW) }) }),
|
|
1540
|
+
/* @__PURE__ */ jsx(SuspenseRoute, { path: ROUTE_PATHS[TaskTypes.ACQUIRING_BUSINESS_LINE], children: /* @__PURE__ */ jsx(RootBusinessLinesPage$1, { handleHomeClick: () => navigate.to(TaskTypes.TASKS_OVERVIEW) }) }),
|
|
1541
|
+
/* @__PURE__ */ jsx(Route, { path: "/", children: /* @__PURE__ */ jsx(DefaultRouteRedirect, { legalEntity, children: /* @__PURE__ */ jsx(TaskList, { onNavigateToTask, singpassComponent: singpassBanner }) }) }),
|
|
1542
|
+
/* @__PURE__ */ jsx(Route, { children: /* @__PURE__ */ jsx(DefaultRouteRedirect, { legalEntity }) })
|
|
1543
|
+
] });
|
|
1544
|
+
}
|
|
1545
|
+
const useCurrentTask = () => {
|
|
1546
|
+
const { parser } = useRouter();
|
|
1547
|
+
const [location] = useLocation();
|
|
1548
|
+
for (const [taskType, routePath] of Object.entries(ROUTE_PATHS)) {
|
|
1549
|
+
const [match] = matchRoute(parser, routePath, location);
|
|
1550
|
+
if (match) return taskType;
|
|
1551
|
+
}
|
|
1552
|
+
return void 0;
|
|
1553
|
+
};
|
|
1554
|
+
function isIn$1(values, x) {
|
|
1555
|
+
return values.includes(x);
|
|
1556
|
+
}
|
|
1557
|
+
const PAGES_WITH_POLLING$1 = [TaskTypes.DECISION_MAKER_OVERVIEW, TaskTypes.TASKS_OVERVIEW];
|
|
1558
|
+
const logger$1 = createLogger();
|
|
1559
|
+
function URLRouterDropinComposer(props) {
|
|
1560
|
+
const { parser } = useRouter();
|
|
1561
|
+
const basePath = useMemo(() => detectBasePath(parser), [parser]);
|
|
1562
|
+
return /* @__PURE__ */ jsx(Router, { base: basePath, children: /* @__PURE__ */ jsx(WouterDropinComposerInner, { ...props }) });
|
|
1563
|
+
}
|
|
1564
|
+
const MEMORY_ROUTER_SESSION_KEY = "ho-memory-router-path";
|
|
1565
|
+
const MEMORY_ROUTER_LE_KEY = "ho-memory-router-le";
|
|
1566
|
+
function MemoryRouterDropinComposer({ legalEntityResponse, ...rest }) {
|
|
1567
|
+
const leId = legalEntityResponse.id;
|
|
1568
|
+
const memoryRouter = useMemo(() => {
|
|
1569
|
+
const previousLeId = sessionStorage.getItem(MEMORY_ROUTER_LE_KEY);
|
|
1570
|
+
if (previousLeId !== leId) {
|
|
1571
|
+
sessionStorage.removeItem(MEMORY_ROUTER_SESSION_KEY);
|
|
1572
|
+
sessionStorage.setItem(MEMORY_ROUTER_LE_KEY, leId);
|
|
1573
|
+
}
|
|
1574
|
+
const savedPath = sessionStorage.getItem(MEMORY_ROUTER_SESSION_KEY) ?? "/";
|
|
1575
|
+
return memoryLocation({ path: savedPath, record: true });
|
|
1576
|
+
}, [leId]);
|
|
1577
|
+
const handle = useMemo(
|
|
1578
|
+
() => ({ navigate: memoryRouter.navigate, history: memoryRouter.history }),
|
|
1579
|
+
[memoryRouter]
|
|
1580
|
+
);
|
|
1581
|
+
return /* @__PURE__ */ jsx(Router, { hook: memoryRouter.hook, children: /* @__PURE__ */ jsxs(MemoryRouterContext.Provider, { value: handle, children: [
|
|
1582
|
+
/* @__PURE__ */ jsx(MemoryRouterPathSync, {}),
|
|
1583
|
+
/* @__PURE__ */ jsx(WouterDropinComposerInner, { legalEntityResponse, ...rest })
|
|
1584
|
+
] }) });
|
|
1585
|
+
}
|
|
1586
|
+
const HISTORY_STATE_KEY = "kycMemoryPath";
|
|
1587
|
+
function MemoryRouterPathSync() {
|
|
1588
|
+
const [location] = useLocation();
|
|
1589
|
+
const memoryRouter = useMemoryRouter();
|
|
1590
|
+
const isPopstateNav = useRef(false);
|
|
1591
|
+
useEffect(() => {
|
|
1592
|
+
sessionStorage.setItem(MEMORY_ROUTER_SESSION_KEY, location);
|
|
1593
|
+
if (isPopstateNav.current) {
|
|
1594
|
+
isPopstateNav.current = false;
|
|
1595
|
+
return;
|
|
1596
|
+
}
|
|
1597
|
+
const currentState = window.history.state;
|
|
1598
|
+
if (currentState?.[HISTORY_STATE_KEY] === location) return;
|
|
1599
|
+
window.history.pushState({ [HISTORY_STATE_KEY]: location }, "");
|
|
1600
|
+
}, [location]);
|
|
1601
|
+
useEffect(() => {
|
|
1602
|
+
if (!memoryRouter) return;
|
|
1603
|
+
const onPopState = (event) => {
|
|
1604
|
+
const path = event.state?.[HISTORY_STATE_KEY];
|
|
1605
|
+
if (path != null) {
|
|
1606
|
+
isPopstateNav.current = true;
|
|
1607
|
+
memoryRouter.navigate(path, { replace: true });
|
|
1608
|
+
}
|
|
1609
|
+
};
|
|
1610
|
+
window.addEventListener("popstate", onPopState);
|
|
1611
|
+
return () => window.removeEventListener("popstate", onPopState);
|
|
1612
|
+
}, [memoryRouter]);
|
|
1613
|
+
useEffect(() => {
|
|
1614
|
+
if (!window.history.state?.[HISTORY_STATE_KEY]) {
|
|
1615
|
+
window.history.replaceState({ [HISTORY_STATE_KEY]: location }, "");
|
|
1616
|
+
}
|
|
1617
|
+
}, []);
|
|
1618
|
+
return null;
|
|
1619
|
+
}
|
|
1620
|
+
function WouterDropinComposerInner({
|
|
1621
|
+
legalEntityResponse,
|
|
1622
|
+
onSubmit,
|
|
1623
|
+
onNavigate = noop,
|
|
1624
|
+
openBankingPartnerConfigId
|
|
1625
|
+
}) {
|
|
1626
|
+
const { accountHolder, setAccountHolder } = useAccountHolder();
|
|
1627
|
+
const { setCanSeeEntitySelection } = useCanSeeEntitySelection(legalEntityResponse.id);
|
|
1628
|
+
const userEvents = useAnalyticsContext();
|
|
1629
|
+
const { experiments } = useExperimentsContext();
|
|
1630
|
+
const navigate = useNavigate();
|
|
1631
|
+
const currentTask = useCurrentTask();
|
|
1632
|
+
const { setHasSeenSingpassSelection } = useHasSeenSingpassSelection({
|
|
1633
|
+
legalEntityId: legalEntityResponse.id
|
|
1634
|
+
});
|
|
1635
|
+
const { setHasSeenIntroduction } = useHasSeenIntroduction({
|
|
1636
|
+
legalEntityId: legalEntityResponse.id
|
|
1637
|
+
});
|
|
1638
|
+
const {
|
|
1639
|
+
rootLegalEntity: rootLegalEntitySignal,
|
|
1640
|
+
rootLegalEntityCountry: rootLegalEntityCountrySignal,
|
|
1641
|
+
taskTypes: taskTypesSignal,
|
|
1642
|
+
setRootLegalEntity,
|
|
1643
|
+
setTaskTypes,
|
|
1644
|
+
setAccountHolder: setAccountHolderInGlobalStore
|
|
1645
|
+
} = useGlobalStore();
|
|
1646
|
+
const rootLegalEntity = rootLegalEntitySignal.value;
|
|
1647
|
+
const rootLegalEntityCountry = rootLegalEntityCountrySignal.value;
|
|
1648
|
+
const taskTypes = taskTypesSignal.value;
|
|
1649
|
+
const { data: rawTaskTypes, isLoading: isLoadingConfiguration } = useTaskTypes();
|
|
1650
|
+
const { isSettingEnabled } = useSettingsContext();
|
|
1651
|
+
useEffect(() => {
|
|
1652
|
+
if (!rawTaskTypes) {
|
|
1653
|
+
return;
|
|
1654
|
+
}
|
|
1655
|
+
let filteredTasks = rawTaskTypes;
|
|
1656
|
+
if (!isSettingEnabled(SettingNames.AllowBusinessLines)) {
|
|
1657
|
+
filteredTasks = rawTaskTypes?.filter((task) => task !== TaskTypes.ACQUIRING_BUSINESS_LINE);
|
|
1658
|
+
}
|
|
1659
|
+
setTaskTypes(filteredTasks);
|
|
1660
|
+
}, [rawTaskTypes, setTaskTypes]);
|
|
1661
|
+
const { data: legalEntityData, refetch: refetchLegalEntity } = useLegalEntity(
|
|
1662
|
+
legalEntityResponse.id,
|
|
1663
|
+
{
|
|
1664
|
+
refetchInterval: (query) => {
|
|
1665
|
+
const legalEntityData2 = query.state.data;
|
|
1666
|
+
if (legalEntityData2) {
|
|
1667
|
+
return !currentTask || !isIn$1(PAGES_WITH_POLLING$1, currentTask) || hasAllCapabilitiesResolved(legalEntityData2) || hasRejectedCapabilities(legalEntityData2) ? false : 3e3;
|
|
1668
|
+
}
|
|
1669
|
+
return 3e3;
|
|
1670
|
+
}
|
|
1671
|
+
}
|
|
1672
|
+
);
|
|
1673
|
+
useEffect(() => {
|
|
1674
|
+
if (legalEntityData && !objectsDeepEqual(legalEntityData, rootLegalEntity)) {
|
|
1675
|
+
setRootLegalEntity(legalEntityData);
|
|
1676
|
+
}
|
|
1677
|
+
}, [legalEntityData]);
|
|
1678
|
+
const {
|
|
1679
|
+
isEligibleForSingpass,
|
|
1680
|
+
state: singpassLoginState,
|
|
1681
|
+
handleInitiateSingpassMyInfoLogin,
|
|
1682
|
+
handleSingpassMyInfoLoginSuccess,
|
|
1683
|
+
handleSingpassMyInfoLoginFailure,
|
|
1684
|
+
handleSingpassMyInfoLoginReset
|
|
1685
|
+
} = useSingpassMyInfoLogin({
|
|
1686
|
+
legalEntity: rootLegalEntity,
|
|
1687
|
+
accountHolder
|
|
1688
|
+
});
|
|
1689
|
+
const singpassTabRef = useRef(null);
|
|
1690
|
+
const { data: trust, refetch: refetchTrust } = useAssociatedLegalEntity(
|
|
1691
|
+
rootLegalEntity,
|
|
1692
|
+
LegalEntityTypes.TRUST
|
|
1693
|
+
);
|
|
1694
|
+
const { data: unincorporatedPartnership, refetch: refetchUnincorporatedPartnership } = useAssociatedLegalEntity(rootLegalEntity, LegalEntityTypes.UNINCORPORATED_PARTNERSHIP);
|
|
1695
|
+
const { data: soleProp } = useAssociatedLegalEntity(
|
|
1696
|
+
rootLegalEntity,
|
|
1697
|
+
LegalEntityTypes.SOLE_PROPRIETORSHIP
|
|
1698
|
+
);
|
|
1699
|
+
const associatedLegalRepresentative = useAssociatedLegalRepresentative(rootLegalEntity);
|
|
1700
|
+
const [targetLegalEntityType, setTargetLegalEntityType] = useState();
|
|
1701
|
+
const {
|
|
1702
|
+
trustMember,
|
|
1703
|
+
onNavigateToTrust,
|
|
1704
|
+
onNavigateToTrustMemberRoleAndType,
|
|
1705
|
+
onNavigateToTrustMemberEditDetails
|
|
1706
|
+
} = useTrustMemberNavigation({
|
|
1707
|
+
trust,
|
|
1708
|
+
navigateTo: navigate.to
|
|
1709
|
+
});
|
|
1710
|
+
const {
|
|
1711
|
+
onNavigateToMember,
|
|
1712
|
+
activeMember: unincorporatedPartnershipMember,
|
|
1713
|
+
setActiveMember
|
|
1714
|
+
} = useUnincorporatedPartnershipNavigation({
|
|
1715
|
+
navigateTo: navigate.to
|
|
1716
|
+
});
|
|
1717
|
+
const handleSingpassSelectionNextClick = async (method) => {
|
|
1718
|
+
if (method === "singpass") {
|
|
1719
|
+
try {
|
|
1720
|
+
const authUrl = await handleInitiateSingpassMyInfoLogin();
|
|
1721
|
+
if (!authUrl) {
|
|
1722
|
+
throw new Error("OpenId authentication url not");
|
|
1723
|
+
}
|
|
1724
|
+
setHasSeenSingpassSelection(true);
|
|
1725
|
+
singpassTabRef.current = window.open(authUrl, "_blank");
|
|
1726
|
+
singpassTabRef.current?.focus();
|
|
1727
|
+
} catch (e) {
|
|
1728
|
+
logger$1.error(e);
|
|
1729
|
+
if (typeof e === "string") handleSingpassMyInfoLoginFailure(e);
|
|
1730
|
+
}
|
|
1731
|
+
}
|
|
1732
|
+
if (method === "manual") {
|
|
1733
|
+
setHasSeenSingpassSelection(true);
|
|
1734
|
+
}
|
|
1735
|
+
navigate.to(TaskTypes.TASKS_OVERVIEW);
|
|
1736
|
+
};
|
|
1737
|
+
useEffect(() => {
|
|
1738
|
+
userEvents.addJourneyEvent("Landed on page", { actionType: "start" });
|
|
1739
|
+
}, []);
|
|
1740
|
+
useEffect(() => {
|
|
1741
|
+
userEvents.updateBaseTrackingPayload({ task: currentTask });
|
|
1742
|
+
}, [currentTask]);
|
|
1743
|
+
useEffect(() => {
|
|
1744
|
+
if (currentTask) onNavigate(currentTask);
|
|
1745
|
+
}, [currentTask]);
|
|
1746
|
+
useEffect(() => {
|
|
1747
|
+
if (hasRejectedCapabilities(rootLegalEntity)) {
|
|
1748
|
+
navigate.replace(TaskTypes.CAPABILITY_REJECTED);
|
|
1749
|
+
}
|
|
1750
|
+
}, [rootLegalEntity]);
|
|
1751
|
+
useEffect(() => {
|
|
1752
|
+
const newAccountHolder = getDefaultAccountHolderType(rootLegalEntity, false, accountHolder);
|
|
1753
|
+
if (newAccountHolder !== accountHolder) setAccountHolder(newAccountHolder);
|
|
1754
|
+
}, [accountHolder, rootLegalEntity]);
|
|
1755
|
+
useEffect(() => setAccountHolderInGlobalStore(accountHolder), [accountHolder]);
|
|
1756
|
+
const { rootLegalEntityId } = useApiContext();
|
|
1757
|
+
rootLegalEntityId.value = rootLegalEntity.id;
|
|
1758
|
+
useEffect(() => {
|
|
1759
|
+
const enabledExperimentNames = Object.entries(experiments).filter(([key, value]) => key.includes("_") && value).map(([key]) => key);
|
|
1760
|
+
if (!enabledExperimentNames.length) return;
|
|
1761
|
+
enabledExperimentNames.forEach((experiment) => {
|
|
1762
|
+
const [name, variant] = experiment.split("_");
|
|
1763
|
+
userEvents.trackExperiment({ name, variant });
|
|
1764
|
+
});
|
|
1765
|
+
}, [experiments]);
|
|
1766
|
+
const singpassBanner = isEligibleForSingpass ? /* @__PURE__ */ jsx(
|
|
1767
|
+
SingpassBanner,
|
|
1768
|
+
{
|
|
1769
|
+
...singpassLoginState,
|
|
1770
|
+
onAlertClose: () => {
|
|
1771
|
+
handleSingpassMyInfoLoginReset();
|
|
1772
|
+
},
|
|
1773
|
+
onClick: async () => {
|
|
1774
|
+
try {
|
|
1775
|
+
const authUrl = await handleInitiateSingpassMyInfoLogin();
|
|
1776
|
+
singpassTabRef.current = window.open(authUrl);
|
|
1777
|
+
singpassTabRef.current?.focus();
|
|
1778
|
+
} catch (e) {
|
|
1779
|
+
logger$1.error(e);
|
|
1780
|
+
if (typeof e === "string") handleSingpassMyInfoLoginFailure(e);
|
|
1781
|
+
}
|
|
1782
|
+
},
|
|
1783
|
+
onMessage: async ({ data: { isSuccessful } }) => {
|
|
1784
|
+
if (isSuccessful) {
|
|
1785
|
+
handleSingpassMyInfoLoginSuccess();
|
|
1786
|
+
await refetchLegalEntity();
|
|
1787
|
+
singpassTabRef.current?.close();
|
|
1788
|
+
} else {
|
|
1789
|
+
handleSingpassMyInfoLoginFailure(
|
|
1790
|
+
legalEntityResponse.type === LegalEntityTypes.INDIVIDUAL ? "weCouldntConnectToMyinfo" : "weCouldntConnectToMyinfoBusiness"
|
|
1791
|
+
);
|
|
1792
|
+
}
|
|
1793
|
+
},
|
|
1794
|
+
legalEntityType: legalEntityResponse?.type
|
|
1795
|
+
}
|
|
1796
|
+
) : void 0;
|
|
1797
|
+
if (isLoadingConfiguration) {
|
|
1798
|
+
return /* @__PURE__ */ jsx(Skeleton, {});
|
|
1799
|
+
}
|
|
1800
|
+
return /* @__PURE__ */ jsx(
|
|
1801
|
+
OnboardingRouter,
|
|
1802
|
+
{
|
|
1803
|
+
legalEntity: rootLegalEntity,
|
|
1804
|
+
rootLegalEntityCountry,
|
|
1805
|
+
trust,
|
|
1806
|
+
unincorporatedPartnership,
|
|
1807
|
+
soleProp,
|
|
1808
|
+
associatedLegalRepresentative,
|
|
1809
|
+
refetchLegalEntity,
|
|
1810
|
+
refetchTrust,
|
|
1811
|
+
refetchUnincorporatedPartnership,
|
|
1812
|
+
onExternalSubmit: onSubmit,
|
|
1813
|
+
accountHolder,
|
|
1814
|
+
setAccountHolder,
|
|
1815
|
+
setCanSeeEntitySelection,
|
|
1816
|
+
setHasSeenIntroduction,
|
|
1817
|
+
taskTypes,
|
|
1818
|
+
targetLegalEntityType,
|
|
1819
|
+
setTargetLegalEntityType,
|
|
1820
|
+
trustMember,
|
|
1821
|
+
onNavigateToTrust,
|
|
1822
|
+
onNavigateToTrustMemberRoleAndType,
|
|
1823
|
+
onNavigateToTrustMemberEditDetails,
|
|
1824
|
+
unincorporatedPartnershipMember,
|
|
1825
|
+
setActiveMember,
|
|
1826
|
+
onNavigateToMember,
|
|
1827
|
+
singpassBanner,
|
|
1828
|
+
handleSingpassSelectionNextClick,
|
|
1829
|
+
openBankingPartnerConfigId
|
|
1830
|
+
}
|
|
1831
|
+
);
|
|
1832
|
+
}
|
|
1503
1833
|
const useNavigation = ({ legalEntity, onNavigate }) => {
|
|
1504
1834
|
const { isSettingEnabled } = useSettingsContext();
|
|
1505
1835
|
const userEvents = useAnalyticsContext();
|
|
@@ -1628,93 +1958,107 @@ const hasProgressedBeyondEntitySelection = (legalEntity) => {
|
|
|
1628
1958
|
return hasOwnEntityAssocation || !!hasOrganizationType;
|
|
1629
1959
|
};
|
|
1630
1960
|
const Introduction = lazy(
|
|
1631
|
-
async () => (await import("./Introduction-
|
|
1961
|
+
async () => (await import("./Introduction-0o7soNWJ.js")).Introduction
|
|
1632
1962
|
);
|
|
1633
1963
|
const BusinessTypeSelectionPage = lazy(
|
|
1634
|
-
async () => (await import("./BusinessTypeSelectionPage-
|
|
1964
|
+
async () => (await import("./BusinessTypeSelectionPage-D6N0Ru4g.js")).BusinessTypeSelectionPage
|
|
1635
1965
|
);
|
|
1636
1966
|
const SingpassSelection = lazy(
|
|
1637
|
-
async () => (await import("./SingpassSelection-
|
|
1967
|
+
async () => (await import("./SingpassSelection-BdRZAxtT.js")).SingpassSelection
|
|
1638
1968
|
);
|
|
1639
1969
|
const AccountSetupRejected = lazy(
|
|
1640
|
-
async () => (await import("./AccountSetupRejected-
|
|
1970
|
+
async () => (await import("./AccountSetupRejected-BodluXLt.js")).AccountSetupRejected
|
|
1641
1971
|
);
|
|
1642
1972
|
const DecisionMakers = lazy(
|
|
1643
|
-
async () => (await import("./DecisionMakers-
|
|
1973
|
+
async () => (await import("./DecisionMakers-Om-7b55R.js")).DecisionMakers
|
|
1644
1974
|
);
|
|
1645
1975
|
const CustomerSupport = lazy(
|
|
1646
|
-
async () => (await import("./CustomerSupport-
|
|
1976
|
+
async () => (await import("./CustomerSupport-8s-w8iKy.js")).CustomerSupport
|
|
1647
1977
|
);
|
|
1648
|
-
const Review = lazy(async () => (await import("./Review-
|
|
1978
|
+
const Review = lazy(async () => (await import("./Review-BrP7xRy2.js")).Review);
|
|
1649
1979
|
const SignPCIComponent = lazy(
|
|
1650
|
-
async () => (await import("./SignPCIComponent-
|
|
1980
|
+
async () => (await import("./SignPCIComponent-B8U7Hilk.js")).SignPCIComponent
|
|
1651
1981
|
);
|
|
1652
1982
|
const AcceptTermsOfService = lazy(
|
|
1653
|
-
async () => (await import("./AcceptTermsOfServiceComponent-
|
|
1983
|
+
async () => (await import("./AcceptTermsOfServiceComponent-BW0brynM.js")).AcceptTermsOfServiceComponent
|
|
1654
1984
|
);
|
|
1655
1985
|
const TaxReportingDropin = lazy(
|
|
1656
|
-
async () => (await import("./TaxReportingDropin-
|
|
1986
|
+
async () => (await import("./TaxReportingDropin-8PKUrVeE.js")).TaxReportingDropin
|
|
1657
1987
|
);
|
|
1658
1988
|
const PayoutDetailsPage = lazy(
|
|
1659
|
-
async () => (await import("./PayoutDetailsDropin-
|
|
1989
|
+
async () => (await import("./PayoutDetailsDropin-De5xS7km.js").then((n) => n.a)).PayoutDetailsPage
|
|
1660
1990
|
);
|
|
1661
1991
|
const RootBusinessDetailsPage = lazy(
|
|
1662
|
-
async () => (await import("./RootBusinessDetailsPage-
|
|
1992
|
+
async () => (await import("./RootBusinessDetailsPage-C4io3SHK.js")).RootBusinessDetailsPage
|
|
1663
1993
|
);
|
|
1664
1994
|
const RootBusinessLinesPage = lazy(
|
|
1665
|
-
async () => (await import("./RootBusinessLinesPage-
|
|
1995
|
+
async () => (await import("./RootBusinessLinesPage-CknZuu0f.js")).RootBusinessLinesPage
|
|
1666
1996
|
);
|
|
1667
1997
|
const SoleProprietorshipPage = lazy(
|
|
1668
|
-
async () => (await import("./SoleProprietorshipPage-
|
|
1998
|
+
async () => (await import("./SoleProprietorshipPage-C64fSOwN.js")).SoleProprietorshipPage
|
|
1669
1999
|
);
|
|
1670
2000
|
const TrustMemberCompanyPage = lazy(
|
|
1671
|
-
async () => (await import("./TrustMemberCompanyPage-
|
|
2001
|
+
async () => (await import("./TrustMemberCompanyPage-DHdEuAQJ.js")).TrustMemberCompanyPage
|
|
1672
2002
|
);
|
|
1673
2003
|
const TrustMemberIndividualPage = lazy(
|
|
1674
|
-
async () => (await import("./TrustMemberIndividualPage-
|
|
2004
|
+
async () => (await import("./TrustMemberIndividualPage-BLjorgiQ.js")).TrustMemberIndividualPage
|
|
1675
2005
|
);
|
|
1676
2006
|
const TrustMemberRoleAndTypePage = lazy(
|
|
1677
|
-
async () => (await import("./TrustMemberRoleAndTypePage-
|
|
2007
|
+
async () => (await import("./TrustMemberRoleAndTypePage-O-JmFZ6x.js")).TrustMemberRoleAndTypePage
|
|
1678
2008
|
);
|
|
1679
2009
|
const TrustMembersOverview = lazy(
|
|
1680
|
-
async () => (await import("./TrustMembersOverview-
|
|
2010
|
+
async () => (await import("./TrustMembersOverview-CJEjx7vn.js")).TrustMembersOverview
|
|
1681
2011
|
);
|
|
1682
2012
|
const UnincorporatedPartnershipMemberCompanyPage = lazy(
|
|
1683
|
-
async () => (await import("./UnincorporatedPartnershipMemberCompanyPage-
|
|
2013
|
+
async () => (await import("./UnincorporatedPartnershipMemberCompanyPage-DstG5mil.js")).UnincorporatedPartnershipMemberCompanyPage
|
|
1684
2014
|
);
|
|
1685
2015
|
const UnincorporatedPartnershipIndividualPage = lazy(
|
|
1686
|
-
async () => (await import("./UnincorporatedPartnershipIndividualPage-
|
|
2016
|
+
async () => (await import("./UnincorporatedPartnershipIndividualPage-CLm7rltZ.js")).UnincorporatedPartnershipIndividualPage
|
|
1687
2017
|
);
|
|
1688
2018
|
const UnincorporatedPartnershipMemberRoleAndTypePage = lazy(
|
|
1689
|
-
async () => (await import("./UnincorporatedPartnershipMemberRoleAndTypePage-
|
|
2019
|
+
async () => (await import("./UnincorporatedPartnershipMemberRoleAndTypePage-CcboW2-W.js")).UnincorporatedPartnershipMemberRoleAndTypePage
|
|
1690
2020
|
);
|
|
1691
2021
|
const UnincorporatedPartnershipMembersOverview = lazy(
|
|
1692
|
-
async () => (await import("./UnincorporatedPartnershipMembersOverview-
|
|
2022
|
+
async () => (await import("./UnincorporatedPartnershipMembersOverview-C8d8pfxJ.js")).UnincorporatedPartnershipMembersOverview
|
|
1693
2023
|
);
|
|
1694
2024
|
const BusinessFinancingPage = lazy(
|
|
1695
|
-
async () => (await import("./BusinessFinancingPage-
|
|
2025
|
+
async () => (await import("./BusinessFinancingPage-4HciuNgT.js")).BusinessFinancingPage
|
|
1696
2026
|
);
|
|
1697
2027
|
const TrustDetailsPage = lazy(
|
|
1698
|
-
async () => (await import("./TrustDetailsPage-
|
|
2028
|
+
async () => (await import("./TrustDetailsPage-BZamlxY7.js")).TrustDetailsPage
|
|
1699
2029
|
);
|
|
1700
2030
|
const SourceOfFundsPage = lazy(
|
|
1701
|
-
async () => (await import("./SourceOfFundsPage-
|
|
2031
|
+
async () => (await import("./SourceOfFundsPage-C855dB1F.js")).SourceOfFundsPage
|
|
1702
2032
|
);
|
|
1703
2033
|
const RootIndividualDetailsPage = lazy(
|
|
1704
|
-
async () => (await import("./RootIndividualDetailsPage-
|
|
2034
|
+
async () => (await import("./RootIndividualDetailsPage-D2InAZ2K.js")).RootIndividualDetailsPage
|
|
1705
2035
|
);
|
|
1706
2036
|
const LegalRepresentativeDetailsPage = lazy(
|
|
1707
|
-
async () => (await import("./LegalRepresentativeDetailsPage-
|
|
2037
|
+
async () => (await import("./LegalRepresentativeDetailsPage-Dd7C7gUQ.js")).LegalRepresentativeDetailsPage
|
|
1708
2038
|
);
|
|
1709
2039
|
const DecisionMakerDetailsPage = lazy(
|
|
1710
|
-
async () => (await import("./DecisionMakerDetailsPage-
|
|
2040
|
+
async () => (await import("./DecisionMakerDetailsPage-BKYVxewR.js")).DecisionMakerDetailsPage
|
|
1711
2041
|
);
|
|
1712
2042
|
function isIn(values, x) {
|
|
1713
2043
|
return values.includes(x);
|
|
1714
2044
|
}
|
|
1715
2045
|
const PAGES_WITH_POLLING = [TaskTypes.DECISION_MAKER_OVERVIEW, TaskTypes.TASKS_OVERVIEW];
|
|
1716
2046
|
const logger = createLogger();
|
|
1717
|
-
function DropinComposer({
|
|
2047
|
+
function DropinComposer(props) {
|
|
2048
|
+
const { isExperimentEnabled } = useExperimentsContext();
|
|
2049
|
+
const useURLRouter = isExperimentEnabled(ExperimentNames.EnableURLRouterForHostedOnboarding);
|
|
2050
|
+
const useMemoryRouter2 = isExperimentEnabled(
|
|
2051
|
+
ExperimentNames.EnableMemoryRouterForHostedOnboarding
|
|
2052
|
+
);
|
|
2053
|
+
if (useMemoryRouter2) {
|
|
2054
|
+
return /* @__PURE__ */ jsx(MemoryRouterDropinComposer, { ...props });
|
|
2055
|
+
}
|
|
2056
|
+
if (useURLRouter) {
|
|
2057
|
+
return /* @__PURE__ */ jsx(URLRouterDropinComposer, { ...props });
|
|
2058
|
+
}
|
|
2059
|
+
return /* @__PURE__ */ jsx(LegacyDropinComposer, { ...props });
|
|
2060
|
+
}
|
|
2061
|
+
function LegacyDropinComposer({
|
|
1718
2062
|
legalEntityResponse,
|
|
1719
2063
|
onSubmit,
|
|
1720
2064
|
onNavigate = noop,
|
|
@@ -1801,6 +2145,7 @@ function DropinComposer({
|
|
|
1801
2145
|
const { data: currentDecisionMaker } = useLegalEntity(currentDecisionMakerId ?? skipToken);
|
|
1802
2146
|
const associatedLegalRepresentative = useAssociatedLegalRepresentative(rootLegalEntity);
|
|
1803
2147
|
const [targetLegalEntityType, setTargetLegalEntityType] = useState();
|
|
2148
|
+
const legacyNavigateTo = (task, _params) => navigateTo(task);
|
|
1804
2149
|
const {
|
|
1805
2150
|
trustMember,
|
|
1806
2151
|
trustMemberId,
|
|
@@ -1809,14 +2154,14 @@ function DropinComposer({
|
|
|
1809
2154
|
onNavigateToTrustMemberEditDetails
|
|
1810
2155
|
} = useTrustMemberNavigation({
|
|
1811
2156
|
trust,
|
|
1812
|
-
navigateTo
|
|
2157
|
+
navigateTo: legacyNavigateTo
|
|
1813
2158
|
});
|
|
1814
2159
|
const {
|
|
1815
2160
|
onNavigateToMember,
|
|
1816
2161
|
activeMember: unincorporatedPartnershipMember,
|
|
1817
2162
|
setActiveMember
|
|
1818
2163
|
} = useUnincorporatedPartnershipNavigation({
|
|
1819
|
-
navigateTo
|
|
2164
|
+
navigateTo: legacyNavigateTo
|
|
1820
2165
|
});
|
|
1821
2166
|
const handleSingpassSelectionNextClick = async (method) => {
|
|
1822
2167
|
if (method === "singpass") {
|
|
@@ -2309,8 +2654,8 @@ function OnboardingDropinComponent({
|
|
|
2309
2654
|
}
|
|
2310
2655
|
const { i18n } = useTranslation();
|
|
2311
2656
|
addResourceBundles(i18n, [
|
|
2312
|
-
{ ns: "common", importFn: (lang) => __variableDynamicImportRuntimeHelper(/* @__PURE__ */ Object.assign({ "../../../language/locales/bg-BG.json": () => import("./bg-BG-
|
|
2313
|
-
{ ns: "ui", importFn: (lang) => __variableDynamicImportRuntimeHelper(/* @__PURE__ */ Object.assign({ "../../ui/language/bg-BG.json": () => import("./bg-BG-zZhDshGi.js"), "../../ui/language/cs-CZ.json": () => import("./cs-CZ-Ck22NTT9.js"), "../../ui/language/da-DK.json": () => import("./da-DK-DQ4ZYSea.js"), "../../ui/language/de-DE.json": () => import("./de-DE-CkbOZ6S_.js"), "../../ui/language/el-GR.json": () => import("./el-GR-DudORw4U.js"), "../../ui/language/en-US.json": () => import("./en-US-CjjPhkB5.js"), "../../ui/language/es-ES.json": () => import("./es-ES-BAolMrZ0.js"), "../../ui/language/et-EE.json": () => import("./et-EE-BOIrYrz9.js"), "../../ui/language/fi-FI.json": () => import("./fi-FI-D8WrLxxq.js"), "../../ui/language/fr-FR.json": () => import("./fr-FR-Beljeilc.js"), "../../ui/language/hr-HR.json": () => import("./hr-HR-lIHN6Yl2.js"), "../../ui/language/hu-HU.json": () => import("./hu-HU-CWdwNCev.js"), "../../ui/language/it-IT.json": () => import("./it-IT-5a7NHVFo.js"), "../../ui/language/ja-JP.json": () => import("./ja-JP-
|
|
2657
|
+
{ ns: "common", importFn: (lang) => __variableDynamicImportRuntimeHelper(/* @__PURE__ */ Object.assign({ "../../../language/locales/bg-BG.json": () => import("./bg-BG-Dp1J1L2X.js"), "../../../language/locales/cs-CZ.json": () => import("./cs-CZ-Bd9Zz7z4.js"), "../../../language/locales/da-DK.json": () => import("./da-DK-DmFDgnbC.js"), "../../../language/locales/de-DE.json": () => import("./de-DE-DRuKxSOy.js"), "../../../language/locales/el-GR.json": () => import("./el-GR-Cezskrdn.js"), "../../../language/locales/en-US.instructions.json": () => import("./en-US.instructions-Ddr7AO05.js"), "../../../language/locales/en-US.json": () => import("./StoreProvider-C-jMv9L5.js").then((n) => n.bG), "../../../language/locales/es-ES.json": () => import("./es-ES-DzB4V6UZ.js"), "../../../language/locales/et-EE.json": () => import("./et-EE-BkHzGD3D.js"), "../../../language/locales/fi-FI.json": () => import("./fi-FI-Cxkp0GQA.js"), "../../../language/locales/fr-FR.json": () => import("./fr-FR-DsEmssxk.js"), "../../../language/locales/hr-HR.json": () => import("./hr-HR-DU4nvY6g.js"), "../../../language/locales/hu-HU.json": () => import("./hu-HU-D6frnZmR.js"), "../../../language/locales/it-IT.json": () => import("./it-IT-VFXgXyRA.js"), "../../../language/locales/ja-JP.json": () => import("./ja-JP-B_Q8X66O.js"), "../../../language/locales/lt-LT.json": () => import("./lt-LT-CE-GdWrg.js"), "../../../language/locales/lv-LV.json": () => import("./lv-LV-dv7fqeBS.js"), "../../../language/locales/nl-NL.json": () => import("./nl-NL-BwIRHJgf.js"), "../../../language/locales/no-NO.json": () => import("./no-NO-u56mEoG3.js"), "../../../language/locales/pl-PL.json": () => import("./pl-PL-zqT41Yjw.js"), "../../../language/locales/pt-BR.json": () => import("./pt-BR-fMKntiMG.js"), "../../../language/locales/pt-PT.json": () => import("./pt-PT-C6pZR9Bc.js"), "../../../language/locales/ro-RO.json": () => import("./ro-RO-B5BQrf6C.js"), "../../../language/locales/sk-SK.json": () => import("./sk-SK-Bz4T7upD.js"), "../../../language/locales/sl-SI.json": () => import("./sl-SI--RTGDByj.js"), "../../../language/locales/sv-SE.json": () => import("./sv-SE-Dryy3JLw.js") }), `../../../language/locales/${lang}.json`, 6) },
|
|
2658
|
+
{ ns: "ui", importFn: (lang) => __variableDynamicImportRuntimeHelper(/* @__PURE__ */ Object.assign({ "../../ui/language/bg-BG.json": () => import("./bg-BG-zZhDshGi.js"), "../../ui/language/cs-CZ.json": () => import("./cs-CZ-Ck22NTT9.js"), "../../ui/language/da-DK.json": () => import("./da-DK-DQ4ZYSea.js"), "../../ui/language/de-DE.json": () => import("./de-DE-CkbOZ6S_.js"), "../../ui/language/el-GR.json": () => import("./el-GR-DudORw4U.js"), "../../ui/language/en-US.json": () => import("./en-US-CjjPhkB5.js"), "../../ui/language/es-ES.json": () => import("./es-ES-BAolMrZ0.js"), "../../ui/language/et-EE.json": () => import("./et-EE-BOIrYrz9.js"), "../../ui/language/fi-FI.json": () => import("./fi-FI-D8WrLxxq.js"), "../../ui/language/fr-FR.json": () => import("./fr-FR-Beljeilc.js"), "../../ui/language/hr-HR.json": () => import("./hr-HR-lIHN6Yl2.js"), "../../ui/language/hu-HU.json": () => import("./hu-HU-CWdwNCev.js"), "../../ui/language/it-IT.json": () => import("./it-IT-5a7NHVFo.js"), "../../ui/language/ja-JP.json": () => import("./ja-JP-DSvZhFNY.js"), "../../ui/language/lt-LT.json": () => import("./lt-LT-CgalYpUh.js"), "../../ui/language/lv-LV.json": () => import("./lv-LV-aAd9SEqx.js"), "../../ui/language/nl-NL.json": () => import("./nl-NL-CmURERx_.js"), "../../ui/language/no-NO.json": () => import("./no-NO-qyqWODMp.js"), "../../ui/language/pl-PL.json": () => import("./pl-PL-q9azN24o.js"), "../../ui/language/pt-BR.json": () => import("./pt-BR-BxoOF8jB.js"), "../../ui/language/pt-PT.json": () => import("./pt-PT-pIChDwiI.js"), "../../ui/language/ro-RO.json": () => import("./ro-RO-DRsaNX9j.js"), "../../ui/language/sk-SK.json": () => import("./sk-SK-7-enbO1N.js"), "../../ui/language/sl-SI.json": () => import("./sl-SI-DTvJT7fC.js"), "../../ui/language/sv-SE.json": () => import("./sv-SE-N-Hqwcjq.js") }), `../../ui/language/${lang}.json`, 5) }
|
|
2314
2659
|
]);
|
|
2315
2660
|
const { data: legalEntityData } = useLegalEntity(ROOT_LE);
|
|
2316
2661
|
return !legalEntityData ? /* @__PURE__ */ jsx(Loader, {}) : /* @__PURE__ */ jsx(
|
|
@@ -2322,20 +2667,5 @@ function OnboardingDropinComponent({
|
|
|
2322
2667
|
);
|
|
2323
2668
|
}
|
|
2324
2669
|
export {
|
|
2325
|
-
OnboardingDropinComponent as O
|
|
2326
|
-
usePciStatus as a,
|
|
2327
|
-
useCanSeeIntroduction as b,
|
|
2328
|
-
useLegalEntityType as c,
|
|
2329
|
-
allowIndividualWithoutSoleProp as d,
|
|
2330
|
-
useDataMissingRemediations as e,
|
|
2331
|
-
useTaskStatus as f,
|
|
2332
|
-
getTrustedEntityAssociations as g,
|
|
2333
|
-
filterProblemsByTaskForms as h,
|
|
2334
|
-
useBusinessLines as i,
|
|
2335
|
-
usePciQuestionnaireList as j,
|
|
2336
|
-
useTrustMembers as k,
|
|
2337
|
-
isNewEntity as l,
|
|
2338
|
-
getTrustedFieldsProvider as m,
|
|
2339
|
-
getTrustedFields as n,
|
|
2340
|
-
useSalesChannels as u
|
|
2670
|
+
OnboardingDropinComponent as O
|
|
2341
2671
|
};
|