@adyen/kyc-components 4.0.0-beta.0 → 4.0.0-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{AcceptTermsOfServiceComponent-Dh7RSJoE.js → AcceptTermsOfServiceComponent-i222mdxX.js} +54 -59
- package/dist/{AccountSetupRejected-PdYyKwbS.js → AccountSetupRejected-DHph9lFl.js} +6 -6
- package/dist/{Avatar-C8aZB2wq.js → Avatar-vCjWXfC7.js} +2 -2
- package/dist/{BusinessDetailsDropin-DC8FEWvP.js → BusinessDetailsDropin-DQcfiSR8.js} +408 -393
- package/dist/{BusinessFinancingComponent-B0vW7r62.js → BusinessFinancingComponent-DC3jzBrq.js} +3 -3
- package/dist/{BusinessFinancingDropin-D8HAwTSq.js → BusinessFinancingDropin-D2lMEbNh.js} +529 -701
- package/dist/{BusinessFinancingPage-L1APYvzn.js → BusinessFinancingPage-BPD2cSDR.js} +3 -3
- package/dist/{BusinessTypeSelectionPage-sfGqHnp6.js → BusinessTypeSelectionPage-Cdp8joPJ.js} +86 -91
- package/dist/{CZ-BhoS6sd6.js → CZ-BiPeoA9G.js} +11 -1
- package/dist/ContractViewer-B0bZ14Ts.js +947 -0
- package/dist/{CreateIndividualComponent-i-QNCzp0.js → CreateIndividualComponent-D9wnexv4.js} +7 -8
- package/dist/{CreateTransferInstrumentComponent-8n3tjBYK.js → CreateTransferInstrumentComponent-COzPdQjC.js} +4 -5
- package/dist/{CustomerSupport-BER6nSK2.js → CustomerSupport-NGBoBg3N.js} +27 -33
- package/dist/{DebugModal-DeSsKkh_.js → DebugModal-I2U6TjGT.js} +43 -69
- package/dist/{DecisionMakerDetailsPage-DgjlfKyP.js → DecisionMakerDetailsPage-BN-H1sJF.js} +3 -4
- package/dist/{DecisionMakers-D2TjKnOc.js → DecisionMakers-CZ5-IRtU.js} +128 -25
- package/dist/{ES-JRIf-4xI.js → ES-BlWV7xvh.js} +4 -6
- package/dist/{EmbeddedStatus-Bn5KNA0V.js → EmbeddedStatus-Blr0seRl.js} +13 -5
- package/dist/FormEndState-JB6QFSet.js +59 -0
- package/dist/{FormFlow-CZgc09E3.js → FormFlow-DjvdNEiV.js} +18 -22
- package/dist/{HU-v3vOxRm8.js → HU-D8vJYkDH.js} +10 -1
- package/dist/{IndividualOnfidoDropin-D6uwo7VI.js → IndividualOnfidoDropin-DHhyO2ai.js} +1364 -867
- package/dist/{Introduction-DW2IQ57R.js → Introduction-erRXgreE.js} +32 -35
- package/dist/LandingLayout-B45lEjOv.js +84 -0
- package/dist/{LegalRepresentativeDetailsPage-BfIDXqv1.js → LegalRepresentativeDetailsPage-rS5K4657.js} +3 -4
- package/dist/{ManageIndividualComponent-DJoEsE2m.js → ManageIndividualComponent-BEzE5lkX.js} +8 -12
- package/dist/{ManagePCIComponent-BGESFWL6.js → ManagePCIComponent-BgdGfAuT.js} +5 -5
- package/dist/{ManageTermsOfServiceComponent-_wTZrjqd.js → ManageTermsOfServiceComponent-BWkwy6YC.js} +7 -8
- package/dist/{ManageTransferInstrumentComponent-Cvc3kk94.js → ManageTransferInstrumentComponent-B8kRNftW.js} +21 -34
- package/dist/{OnboardingDropinComponent-CocnpjvA.js → OnboardingDropinComponent-DBW5N3Dr.js} +325 -364
- package/dist/{ProviderButton-vD5DUJaN.js → ProviderButton-B58n0cRC.js} +13 -24
- package/dist/{Review-BFgzcIDj.js → Review-O6Al47Cu.js} +11 -12
- package/dist/{RootBusinessDetailsPage-C6lHQShI.js → RootBusinessDetailsPage-q_6wAcer.js} +3 -4
- package/dist/{RootIndividualDetailsPage-DfpqHdAS.js → RootIndividualDetailsPage-CiXgSJsV.js} +3 -4
- package/dist/{SignPCIComponent-D35913wJ.js → SignPCIComponent-cqRNhGdl.js} +17 -23
- package/dist/{SingpassSelection-D2Xe1wGv.js → SingpassSelection-BWEJ3Yi-.js} +6 -9
- package/dist/{SoleProprietorshipPage-D2F8Ghmo.js → SoleProprietorshipPage-CRcJSpn9.js} +4 -5
- package/dist/{SourceOfFundsPage-RjAcZ3Bo.js → SourceOfFundsPage-BxLGXTHb.js} +533 -517
- package/dist/{StoreProvider-COHi02bX.js → StoreProvider-ClKLaHzy.js} +23640 -25317
- package/dist/{TaskItemStatus-Bi1L8gea.js → TaskItemStatus-DrTIwCTx.js} +14 -14
- package/dist/TaskStatusIndicator-CTtKjo0m.js +69 -0
- package/dist/{TaxReportingDropin-BLXgRbuR.js → TaxReportingDropin-DFZ2ehfk.js} +82 -102
- package/dist/{TileGroup-B1IymoWv.js → TileGroup-BtE472I1.js} +6 -8
- package/dist/{TrustDetailsPage-DVvGJ_Ta.js → TrustDetailsPage-CGiiTbfR.js} +93 -114
- package/dist/{TrustMemberCompanyPage-D0wTEhuh.js → TrustMemberCompanyPage-oLNhg0hg.js} +4 -5
- package/dist/{TrustMemberIndividualPage-BLuaBi3j.js → TrustMemberIndividualPage-Bgsis586.js} +3 -4
- package/dist/{UnincorporatedPartnershipIndividualPage-BhIihH2v.js → UnincorporatedPartnershipIndividualPage-DPE3grqL.js} +3 -4
- package/dist/{UnincorporatedPartnershipMemberCompanyPage-CgujXwfX.js → UnincorporatedPartnershipMemberCompanyPage-HUnc9g0g.js} +3 -4
- package/dist/{VerificationErrorAlert-BkImnGA-.js → VerificationErrorAlert-BBdJmGJu.js} +10 -8
- package/dist/{ViewVerificationStatusComponent-CRefu327.js → ViewVerificationStatusComponent-DDtXG_pM.js} +12 -13
- package/dist/adyen-business-financing.js +22 -29
- package/dist/adyen-individual.js +21 -22
- package/dist/adyen-kyc-components.js +137 -122
- package/dist/adyen-manage-individual.js +18 -21
- package/dist/adyen-manage-pci.js +18 -21
- package/dist/adyen-manage-terms-of-service.js +18 -21
- package/dist/adyen-manage-transfer-instruments.js +27 -30
- package/dist/adyen-onboarding.js +25 -22
- package/dist/adyen-sign-pci.js +22 -32
- package/dist/adyen-terms-of-service.js +32 -29
- package/dist/adyen-transfer-instrument.js +32 -31
- package/dist/{adyen-transfer-instrument.vue_vue_type_script_lang-BE-ro1iH.js → adyen-transfer-instrument.vue_vue_type_script_lang-DQBzahGy.js} +5 -1
- package/dist/adyen-verification-status.js +30 -33
- package/dist/bg-BG-BY3Wa361.js +54 -0
- package/dist/bg-BG-BvSUDgGF.js +13 -0
- package/dist/bg-BG-HpLj_LOM.js +16 -0
- package/dist/cs-CZ-BEFeaKsV.js +54 -0
- package/dist/cs-CZ-CQ_M3lEp.js +16 -0
- package/dist/cs-CZ-y4mvq4Lv.js +13 -0
- package/dist/{css-DZNXkIaY.js → css-BJGWcW8A.js} +2 -2
- package/dist/da-DK-D6UK8XT9.js +54 -0
- package/dist/da-DK-k4JW3iVF.js +16 -0
- package/dist/da-DK-qgQOVjDp.js +13 -0
- package/dist/de-DE-B3nctkG8.js +13 -0
- package/dist/de-DE-C7mjtS5w.js +16 -0
- package/dist/de-DE-DUl6gRKv.js +54 -0
- package/dist/de-DE-pSdsxBpQ.js +13 -0
- package/dist/decision-makers-group-CgddXgrx.js +1944 -0
- package/dist/el-GR-B5j7VZ3E.js +54 -0
- package/dist/el-GR-Bvjk5Sw8.js +13 -0
- package/dist/el-GR-CEQrkYHW.js +16 -0
- package/dist/el-GR-CdgLZhuO.js +13 -0
- package/dist/en-US-Bq2Twy6x.js +54 -0
- package/dist/en-US-DDagIr01.js +16 -0
- package/dist/en-US-DSoLr6rp.js +13 -0
- package/dist/es-ES-BRfK6tX7.js +13 -0
- package/dist/es-ES-Cavm0szq.js +54 -0
- package/dist/es-ES-DB1c74Kv.js +16 -0
- package/dist/es-ES-Dy1uR2H_.js +13 -0
- package/dist/et-EE-DUWZ2Vqm.js +54 -0
- package/dist/et-EE-d9V24rcf.js +13 -0
- package/dist/et-EE-xIegUSuv.js +16 -0
- package/dist/fi-FI-B0fnAFV2.js +13 -0
- package/dist/fi-FI-DVa-ccaW.js +54 -0
- package/dist/fi-FI-NCxneAqU.js +16 -0
- package/dist/fr-FR-BoKzVp2q.js +13 -0
- package/dist/fr-FR-CY9emHgF.js +54 -0
- package/dist/fr-FR-Dk6Lw2On.js +13 -0
- package/dist/fr-FR-daiUnUwo.js +16 -0
- package/dist/{getFieldsWithExistingData-UNUNInq5.js → getFieldsWithExistingData-BY--eXBQ.js} +3 -4
- package/dist/{hasDataChanged-CIg-bPSm.js → hasDataChanged-CwfuS4et.js} +4 -4
- package/dist/hr-HR-BAUywqDj.js +16 -0
- package/dist/hr-HR-CF0AHQzi.js +13 -0
- package/dist/hr-HR-CnP5sqih.js +54 -0
- package/dist/hu-HU-3GQojIHR.js +16 -0
- package/dist/hu-HU-BTlpbCpc.js +54 -0
- package/dist/hu-HU-CSPhOvLC.js +13 -0
- package/dist/it-IT-BH-eqIKH.js +13 -0
- package/dist/it-IT-D7G4BaP7.js +13 -0
- package/dist/it-IT-GgHc0cHR.js +54 -0
- package/dist/it-IT-pDWPFHEh.js +16 -0
- package/dist/ja-JP-B3yqM_FM.js +13 -0
- package/dist/ja-JP-BhS-_dIx.js +54 -0
- package/dist/ja-JP-DTW_hY1L.js +13 -0
- package/dist/ja-JP-scPXJ93L.js +16 -0
- package/dist/{json-DGARJCng.js → json-Dk6RRAV8.js} +2 -2
- package/dist/{localizeDateString-KlstHAcM.js → localizeDateString-CKCBXzSn.js} +6 -6
- package/dist/lt-LT-BcGNy8Ti.js +16 -0
- package/dist/lt-LT-DTQGR9M0.js +54 -0
- package/dist/lt-LT-Lzl_Cbw-.js +13 -0
- package/dist/lv-LV-BQ4F1GrV.js +54 -0
- package/dist/lv-LV-CBD07r1Y.js +16 -0
- package/dist/lv-LV-y00wN1pj.js +13 -0
- package/dist/{mapFinancialReportsToFinancialInformation-Cid31JpK.js → mapFinancialReportsToFinancialInformation-D_6u_bSS.js} +19 -12
- package/dist/minus-circle-filled-BGKeHaxJ.js +17 -0
- package/dist/nl-NL-BxJUDHMK.js +16 -0
- package/dist/nl-NL-CFzm75Jw.js +13 -0
- package/dist/nl-NL-CUcML482.js +54 -0
- package/dist/nl-NL-DmnFXAQC.js +13 -0
- package/dist/no-NO-BBCvsecq.js +54 -0
- package/dist/no-NO-DbvFfP96.js +13 -0
- package/dist/no-NO-Drup6Jyy.js +16 -0
- package/dist/pl-PL--mmxopYA.js +13 -0
- package/dist/pl-PL-BXv8Mmzb.js +16 -0
- package/dist/pl-PL-kGaeUP-w.js +54 -0
- package/dist/{plaintext-jF9fCLMp.js → plaintext-9WNCwUtz.js} +2 -2
- package/dist/plus-circle-filled-Cnf1oJTm.js +17 -0
- package/dist/preact/adyen-terms-of-service.js +1 -1
- package/dist/preact/adyen-transfer-instrument.js +2 -2
- package/dist/pt-PT-BVzXBFp7.js +13 -0
- package/dist/pt-PT-D8nU-UM2.js +16 -0
- package/dist/pt-PT-DpDxAynk.js +13 -0
- package/dist/pt-PT-JVqqgvPs.js +54 -0
- package/dist/resolveEnvironment-DQH1ab0S.js +84 -0
- package/dist/ro-RO-C83h2zHZ.js +54 -0
- package/dist/ro-RO-CG33OwqS.js +16 -0
- package/dist/ro-RO-Cdmevo9A.js +13 -0
- package/dist/ru-RU-FZb2upqh.js +13 -0
- package/dist/{rules-a4kJDPzY.js → rules-CCnLDGvk.js} +63 -64
- package/dist/sk-SK-CgLJIuJw.js +54 -0
- package/dist/sk-SK-DV_xkO69.js +16 -0
- package/dist/sk-SK-nfeuTcY5.js +13 -0
- package/dist/sl-SI-B5yeoadY.js +16 -0
- package/dist/sl-SI-BzeVaC1Z.js +54 -0
- package/dist/sl-SI-DUTZDqkP.js +13 -0
- package/dist/style.css +2124 -3093
- package/dist/styles-CLV89_hH.js +2125 -3094
- package/dist/sv-SE-BTx2XKAp.js +13 -0
- package/dist/sv-SE-CVmo11gI.js +54 -0
- package/dist/sv-SE-CfxyR53r.js +16 -0
- package/dist/sv-SE-rckxD-43.js +13 -0
- package/dist/types/api/address/address.types.d.ts +0 -1
- package/dist/types/api/address/useAddressCleanse.d.ts +1 -1
- package/dist/types/api/address/useSearchAddress.d.ts +0 -1
- package/dist/types/api/businessLines/useUpdateSourceOfFunds.d.ts +2 -2
- package/dist/types/api/companyDataSet/companyDataset.types.d.ts +2 -2
- package/dist/types/api/companyDataSet/constants.d.ts +1 -1
- package/dist/types/api/companyDataSet/handleCompanyDataset.d.ts +3 -0
- package/dist/types/api/companySearch/companySearch.types.d.ts +2 -2
- package/dist/types/api/companySelection/companySelection.types.d.ts +6 -0
- package/dist/types/api/companySelection/useCompanySelection.d.ts +21 -0
- package/dist/types/api/configurations/configurations.types.d.ts +9 -0
- package/dist/types/api/configurations/useScenarios.d.ts +33 -35
- package/dist/types/api/configurations/useSupportedCountries.d.ts +3 -3
- package/dist/types/api/configurations/useTaskTypes.d.ts +2 -2
- package/dist/types/api/configurations/useVersionConfiguration.d.ts +2 -2
- package/dist/types/api/createLegalEntity/useCreateLegalEntity.d.ts +11 -11
- package/dist/types/api/datasets/datasets.types.d.ts +6 -0
- package/dist/types/api/datasets/useLegalForms.d.ts +3 -8
- package/dist/types/api/datasets/useNaceCodes.d.ts +2 -2
- package/dist/types/api/datasets/useSourceOfFundsTypes.d.ts +2 -2
- package/dist/types/api/entityVerifications/entityVerifications.types.d.ts +15 -0
- package/dist/types/api/entityVerifications/useVerifyIdNumber.d.ts +2 -17
- package/dist/types/api/idNowProvider/idNowProvider.types.d.ts +7 -0
- package/dist/types/api/idNowProvider/useIdNowProvider.d.ts +14 -0
- package/dist/types/api/idVerificationProviders/idVerificationProviders.types.d.ts +6 -0
- package/dist/types/api/idVerificationProviders/idVerificationStartCheck.d.ts +3 -7
- package/dist/types/api/idVerificationProviders/useExtractDocumentInformation.d.ts +7 -7
- package/dist/types/api/legalEntity/useConfirmReview.d.ts +2 -2
- package/dist/types/api/legalEntity/useLegalEntity.d.ts +285 -223
- package/dist/types/api/legalEntity/useUpdateLegalEntity.d.ts +14 -14
- package/dist/types/api/onboardingStatus/onboardingStatus.types.d.ts +7 -0
- package/dist/types/api/onboardingStatus/useGenerateOnboardingLink.d.ts +2 -5
- package/dist/types/api/onboardingStatus/useOnboardingStatus.d.ts +1 -1
- package/dist/types/api/pciTemplate/pciTemplate.types.d.ts +9 -0
- package/dist/types/api/pciTemplate/usePciQuestionnaire.d.ts +2 -4
- package/dist/types/api/pciTemplate/usePciQuestionnaireList.d.ts +7 -9
- package/dist/types/api/pciTemplate/usePciStatus.d.ts +4 -9
- package/dist/types/api/pciTemplate/usePciTemplate.d.ts +2 -2
- package/dist/types/api/pciTemplate/useSignPci.d.ts +2 -2
- package/dist/types/api/providersConfiguration/providersConfiguration.types.d.ts +9 -0
- package/dist/types/api/providersConfiguration/useProviderStatus.d.ts +3 -13
- package/dist/types/api/queryKeys.d.ts +5 -3
- package/dist/types/api/taskStatus/taskStatus.types.d.ts +4 -0
- package/dist/types/api/taskStatus/useTaskStatus.d.ts +0 -3
- package/dist/types/api/taxClassification/taxClassification.types.d.ts +2 -0
- package/dist/types/api/taxClassification/useTaxClassification.d.ts +1 -2
- package/dist/types/api/termsOfService/termsOfService.types.d.ts +10 -0
- package/dist/types/api/termsOfService/useAcceptTermsOfService.d.ts +3 -10
- package/dist/types/api/termsOfService/useAcceptedTermsOfService.d.ts +9 -8
- package/dist/types/api/termsOfService/useTermsOfService.d.ts +12 -5
- package/dist/types/api/termsOfService/useTermsOfServiceAcceptanceInfos.d.ts +2 -2
- package/dist/types/api/termsOfService/useTermsOfServiceStatus.d.ts +2 -2
- package/dist/types/api/tinVerification/tinVerification.types.d.ts +4 -0
- package/dist/types/api/tinVerification/useVerifyTin.d.ts +2 -4
- package/dist/types/api/transferInstruments/transferInstruments.types.d.ts +25 -0
- package/dist/types/api/transferInstruments/useBankVerificationProviders.d.ts +1 -14
- package/dist/types/api/transferInstruments/useCreateTrustedTransferInstrument.d.ts +3 -6
- package/dist/types/api/transferInstruments/useHandleBankVerificationError.d.ts +4 -7
- package/dist/types/api/transferInstruments/useTransferInstruments.d.ts +1 -9
- package/dist/types/api/uiAnalytics/uiAnalytics.types.d.ts +7 -0
- package/dist/types/api/uiAnalytics/useAnalyticsSession.d.ts +2 -14
- package/dist/types/api/uiAnalytics/usePushAnalyticEvent.d.ts +2 -2
- package/dist/types/api/validation/useValidateAccountIdentification.d.ts +1 -6
- package/dist/types/api/validation/useValidatePhoneNumber.d.ts +4 -7
- package/dist/types/api/validation/validation.types.d.ts +8 -0
- package/dist/types/components/BankAccount/fields/BankAccountNumber/fieldConfig.d.ts +1 -1
- package/dist/types/components/BankAccount/fields/BankAccountNumber/types.d.ts +1 -1
- package/dist/types/components/BankAccount/fields/BankCode/fieldConfig.d.ts +1 -1
- package/dist/types/components/BankAccount/fields/BankCode/types.d.ts +1 -1
- package/dist/types/components/BankAccount/fields/BranchCode/fieldConfig.d.ts +1 -1
- package/dist/types/components/BankAccount/fields/BranchCode/types.d.ts +1 -1
- package/dist/types/components/BankAccount/fields/Iban/fieldConfig.d.ts +1 -1
- package/dist/types/components/BankAccount/fields/Iban/ibanValidator.d.ts +1 -1
- package/dist/types/components/BankAccount/fields/Iban/types.d.ts +1 -1
- package/dist/types/components/BankAccount/fields/SwiftCode/fieldConfig.d.ts +1 -1
- package/dist/types/components/BankAccount/forms/BankDocument/BankDocument.d.ts +0 -1
- package/dist/types/components/BankAccount/forms/BankDocument/BankDocumentRequirements.d.ts +1 -2
- package/dist/types/components/BankAccount/forms/BankDocument/types.d.ts +3 -2
- package/dist/types/components/BankAccount/forms/BankVerification/BankVerification.d.ts +2 -2
- package/dist/types/components/BankAccount/forms/BankVerification/types.d.ts +3 -3
- package/dist/types/components/BankAccount/forms/BankVerification/verification/widget/types.d.ts +1 -2
- package/dist/types/components/BankAccount/forms/PayoutAccount/CheckGuidance/CheckGuidance.d.ts +0 -1
- package/dist/types/components/BankAccount/forms/PayoutAccount/types.d.ts +1 -1
- package/dist/types/components/BankAccount/forms/PayoutDetails/PayoutDetails.d.ts +0 -1
- package/dist/types/components/BankAccount/forms/PayoutDetails/rules.d.ts +6 -6
- package/dist/types/components/BankAccount/forms/PayoutDetails/types.d.ts +3 -9
- package/dist/types/components/BankAccount/forms/PayoutVerificationMethod/allowedBankCountriesPerCountry.d.ts +1 -1
- package/dist/types/components/BankAccount/forms/PayoutVerificationMethod/types.d.ts +2 -2
- package/dist/types/components/BankAccount/hooks/useAsyncAccountDetailsValidationRules.d.ts +1 -1
- package/dist/types/components/BankAccount/mapping/mapPayoutAccountSchemaToApiBankAccount.d.ts +1 -1
- package/dist/types/components/BankAccount/mapping/mapPayoutDocumentsToApiDocuments.d.ts +1 -1
- package/dist/types/components/BankAccount/mapping/payoutKeyMappings.d.ts +1613 -1919
- package/dist/types/components/BankAccount/pages/PayoutDetailsPage.d.ts +1 -0
- package/dist/types/components/BankAccount/tasks/PayoutDetailsDropin/PayoutDetailsDropin.d.ts +1 -1
- package/dist/types/components/BankAccount/tasks/PayoutDetailsDropin/payoutDetailsFormConfig.d.ts +3 -3
- package/dist/types/components/BankAccount/tasks/PayoutDetailsDropin/utils.d.ts +3 -0
- package/dist/types/components/BankAccount/utils/defaultPayoutAccountFormat.d.ts +1 -1
- package/dist/types/components/BankAccount/utils/payoutAccountUtil.d.ts +3 -3
- package/dist/types/components/Business/forms/AdditionalInformation/types.d.ts +3 -2
- package/dist/types/components/Business/forms/AdditionalInformation/utils.d.ts +1 -0
- package/dist/types/components/Business/forms/BasicInformation/types.d.ts +3 -2
- package/dist/types/components/Business/forms/BusinessDetails/forms.d.ts +2 -2
- package/dist/types/components/Business/forms/BusinessDetails/types.d.ts +2 -2
- package/dist/types/components/Business/forms/BusinessSelection/{BusinessInformationCard.d.ts → BusinessInformationCard/BusinessInformationCard.d.ts} +4 -6
- package/dist/types/components/Business/forms/BusinessSelection/BusinessSelection.d.ts +1 -1
- package/dist/types/components/Business/forms/CompanyStructure/types.d.ts +1 -1
- package/dist/types/components/Business/forms/ProofOfDirectorDocument/types.d.ts +1 -1
- package/dist/types/components/Business/forms/ProofOfOwnershipDocument/types.d.ts +1 -1
- package/dist/types/components/Business/forms/ProofOfSignatoryDocument/types.d.ts +1 -1
- package/dist/types/components/Business/forms/RegistrationDocument/config.d.ts +1 -1
- package/dist/types/components/Business/forms/RegistrationDocument/types.d.ts +1 -1
- package/dist/types/components/Business/forms/TaxDocument/config.d.ts +1 -1
- package/dist/types/components/Business/forms/TaxDocument/types.d.ts +1 -1
- package/dist/types/components/Business/forms/rules.d.ts +23 -20
- package/dist/types/components/Business/mapping/businessDetails/mapBusinessDetailsSchemaToLegalEntity.d.ts +1 -1
- package/dist/types/components/Business/mapping/businessDetails/mapLegalEntityToBusinessDetailsSchema.d.ts +1 -1
- package/dist/types/components/Business/tasks/BusinessDetailsDropin/businessDetailsFormConfig.d.ts +1 -2
- package/dist/types/components/Business/tasks/BusinessDetailsDropin/businessDetailsStore.d.ts +2 -2
- package/dist/types/components/Business/tasks/BusinessDetailsDropin/types.d.ts +3 -3
- package/dist/types/components/Business/tasks/BusinessDetailsDropin/utils.d.ts +1 -4
- package/dist/types/components/Business/utils/companyUtil.d.ts +1 -1
- package/dist/types/components/Contract/tasks/ServiceAgreementDropin/ServiceAgreementDropin.d.ts +0 -1
- package/dist/types/components/EFP/fields/LegalFormField/LegalFormField.d.ts +1 -1
- package/dist/types/components/EFP/fields/LegalFormField/types.d.ts +6 -3
- package/dist/types/components/EFP/fields/NaceCodeField/NaceCodeField.d.ts +1 -1
- package/dist/types/components/EFP/fields/NaceCodeField/types.d.ts +1 -0
- package/dist/types/components/EFP/mapping/businessFinancingKeyMappings.d.ts +2053 -24
- package/dist/types/components/EFP/mapping/mapBusinessFinancingToLegalEntity.d.ts +2 -2
- package/dist/types/components/EFP/mapping/mapLegalEntityToBusinessFinancing.d.ts +1 -2
- package/dist/types/components/EFP/tasks/BusinessFinancingDropin/BusinessFinancingBasicCompanyInformation.d.ts +5 -1
- package/dist/types/components/EFP/tasks/BusinessFinancingDropin/BusinessFinancingBusinessInformation.d.ts +10 -1
- package/dist/types/components/EFP/tasks/BusinessFinancingDropin/BusinessFinancingFinancialInformation.d.ts +11 -1
- package/dist/types/components/EFP/tasks/BusinessFinancingDropin/BusinessFinancingLegalInformation.d.ts +6 -1
- package/dist/types/components/EFP/tasks/BusinessFinancingDropin/BusinessFinancingOwnershipStructure.d.ts +7 -2
- package/dist/types/components/EFP/tasks/BusinessFinancingDropin/BusinessFinancingRegisteredAddress.d.ts +7 -1
- package/dist/types/components/EFP/tasks/BusinessFinancingDropin/types.d.ts +27 -112
- package/dist/types/components/EFP/tasks/BusinessFinancingDropin/utils.d.ts +17 -4
- package/dist/types/components/EFP/tasks/BusinessFinancingDropin/validate.d.ts +22 -0
- package/dist/types/components/EFP/tasks/SourceOfFundsDropin/SOFAdditionalData/SOFFinancierModal.d.ts +1 -2
- package/dist/types/components/EFP/tasks/SourceOfFundsDropin/SourceOfFundsUploader/SOFUploadModal.d.ts +0 -1
- package/dist/types/components/EFP/tasks/SourceOfFundsDropin/sofStore.d.ts +1 -1
- package/dist/types/components/EFP/tasks/SourceOfFundsDropin/types.d.ts +3 -3
- package/dist/types/components/EFP/tasks/SourceOfFundsDropin/utils.d.ts +1 -1
- package/dist/types/components/EFP/tasks/TaxReportingDropin/taxClassificationStore.d.ts +1 -1
- package/dist/types/components/EFP/tasks/TaxReportingDropin/types.d.ts +3 -3
- package/dist/types/components/EmbeddedDropins/BusinessFinancingComponent/utils.d.ts +3 -3
- package/dist/types/components/EmbeddedDropins/ManageTransferInstrumentComponent/ManageTransferInstrumentOverview/ManageTransferInstrumentOverview.d.ts +1 -1
- package/dist/types/components/EmbeddedDropins/ManageTransferInstrumentComponent/ManageTransferInstrumentOverviewItem/ManageTransferInstrumentOverviewItem.d.ts +1 -1
- package/dist/types/components/EmbeddedDropins/ManageTransferInstrumentComponent/ManageTransferInstrumentOverviewItemModal/ManageTransferInstrumentOverviewItemModal.d.ts +1 -1
- package/dist/types/components/EmbeddedDropins/OnboardingDropinComponent/DropinComposer/DropinComposer.d.ts +1 -1
- package/dist/types/components/Individual/fields/DecisionMakerRole/NomineeDecisionMakerRole.d.ts +1 -1
- package/dist/types/components/Individual/fields/DecisionMakerRole/types.d.ts +1 -1
- package/dist/types/components/Individual/fields/DriversLicense/DriversLicense.types.d.ts +1 -1
- package/dist/types/components/Individual/fields/IdentityNumber/IdentityNumber.d.ts +1 -2
- package/dist/types/components/Individual/fields/IdentityNumber/fieldConfig.d.ts +3 -3
- package/dist/types/components/Individual/fields/IdentityNumber/type.d.ts +1 -1
- package/dist/types/components/Individual/fields/LocalizedNameFields/LocalizedNameFields.d.ts +2 -0
- package/dist/types/components/Individual/fields/LocalizedNameFields/types.d.ts +9 -0
- package/dist/types/components/Individual/fields/NameFields/NameFields.d.ts +13 -0
- package/dist/types/components/Individual/fields/NameFields/types.d.ts +23 -0
- package/dist/types/components/Individual/fields/NameFields/validate.d.ts +4 -0
- package/dist/types/components/Individual/forms/Individual/IdDocumentUpload/IdDocumentManualUpload.d.ts +1 -1
- package/dist/types/components/Individual/forms/Individual/IdDocumentUpload/types.d.ts +3 -3
- package/dist/types/components/Individual/forms/Individual/IdDocumentUpload/utils.d.ts +1 -1
- package/dist/types/components/Individual/forms/Individual/IdVerification/idVerificationProviderId.d.ts +1 -1
- package/dist/types/components/Individual/forms/Individual/IdVerificationMethod/IdVerificationMethod.d.ts +1 -1
- package/dist/types/components/Individual/forms/Individual/IdVerificationMethod/types.d.ts +2 -2
- package/dist/types/components/Individual/forms/Individual/Individual.d.ts +1 -1
- package/dist/types/components/Individual/forms/Individual/PersonalDetails/Identity/IdentityAu/IdentityAu.d.ts +1 -1
- package/dist/types/components/Individual/forms/Individual/PersonalDetails/Identity/IdentityHK/IdentityHK.d.ts +1 -1
- package/dist/types/components/Individual/forms/Individual/PersonalDetails/Identity/IdentityNZ/IdentityNZ.d.ts +1 -1
- package/dist/types/components/Individual/forms/Individual/PersonalDetails/Identity/identityUS/IdentityUS.d.ts +1 -1
- package/dist/types/components/Individual/forms/Individual/PersonalDetails/types.d.ts +7 -5
- package/dist/types/components/Individual/forms/Individual/PersonalDetails/validate.d.ts +2 -2
- package/dist/types/components/Individual/forms/Individual/rules.d.ts +34 -32
- package/dist/types/components/Individual/forms/Individual/types.d.ts +8 -8
- package/dist/types/components/Individual/forms/IndividualOnfido/AdditionalPersonalDetails/AdditionalPersonalDetails.d.ts +1 -1
- package/dist/types/components/Individual/forms/IndividualOnfido/AdditionalPersonalDetails/AdditionalPersonalDetails.types.d.ts +1 -1
- package/dist/types/components/Individual/forms/IndividualOnfido/AdditionalPersonalDetails/Identity/Identity.d.ts +1 -1
- package/dist/types/components/Individual/forms/IndividualOnfido/AdditionalPersonalDetails/Identity/validate.d.ts +1 -1
- package/dist/types/components/Individual/forms/IndividualOnfido/AdditionalPersonalDetails/validate.d.ts +2 -2
- package/dist/types/components/Individual/forms/IndividualOnfido/BasicDetails/BasicDetails.d.ts +1 -1
- package/dist/types/components/Individual/forms/IndividualOnfido/BasicDetails/BasicDetails.types.d.ts +3 -2
- package/dist/types/components/Individual/forms/IndividualOnfido/DataConflictsModal/ConflictRow.d.ts +1 -1
- package/dist/types/components/Individual/forms/IndividualOnfido/GuidanceQuestion/GuidanceQuestion.d.ts +7 -3
- package/dist/types/components/Individual/forms/IndividualOnfido/IdVerificationMethod/IdVerificationMethod.types.d.ts +1 -0
- package/dist/types/components/Individual/forms/IndividualOnfido/IdVerificationMethod/individualOnfidoConflictsSchema.d.ts +23 -9
- package/dist/types/components/Individual/forms/IndividualOnfido/IdVerificationMethod/mapExtractionResultToSchema.d.ts +1 -1
- package/dist/types/components/Individual/forms/IndividualOnfido/IndividualOnfido.d.ts +0 -1
- package/dist/types/components/Individual/forms/IndividualOnfido/IndividualOnfido.rules.d.ts +37 -34
- package/dist/types/components/Individual/forms/IndividualOnfido/IndividualOnfido.types.d.ts +4 -4
- package/dist/types/components/Individual/forms/IndividualOnfido/SignatoryQuestionnaire/SignatoryQuestionnaire.d.ts +1 -1
- package/dist/types/components/Individual/forms/IndividualOnfido/SignatoryQuestionnaire/SignatoryQuestionnaire.types.d.ts +1 -3
- package/dist/types/components/Individual/forms/IndividualOnfido/SignatoryQuestionnaire/SignatoryQuestionnaireModalContent.d.ts +1 -0
- package/dist/types/components/Individual/forms/IndividualOnfido/UboQuestionnaire/UboQuestionnaire.d.ts +1 -1
- package/dist/types/components/Individual/forms/IndividualOnfido/UboQuestionnaire/UboQuestionnaire.types.d.ts +3 -3
- package/dist/types/components/Individual/forms/IndividualOnfido/UboQuestionnaire/UboQuestionnaireModalContent.d.ts +5 -0
- package/dist/types/components/Individual/helpers/isOnfidoAutofillFlowEnabled.d.ts +1 -1
- package/dist/types/components/Individual/helpers/shouldShowMotionCapture.d.ts +2 -2
- package/dist/types/components/Individual/mapping/adjustOnfidoIdentificationData.d.ts +3 -0
- package/dist/types/components/Individual/mapping/getOnfidoIdentityTypeToApiIdentityTypeMap.d.ts +3 -0
- package/dist/types/components/Individual/mapping/individualOnfidoKeyMappings.d.ts +1 -0
- package/dist/types/components/Individual/mapping/mapIndividualOnfidoSchemaToLegalEntity.d.ts +3 -1
- package/dist/types/components/Individual/mapping/mapLocalization.d.ts +3 -0
- package/dist/types/components/Individual/tasks/DecisionMakers/DecisionMakersGettingStarted/DecisionMakersGettingStarted.d.ts +5 -0
- package/dist/types/components/Individual/tasks/DecisionMakers/DecisionMakersGettingStarted/DecisionMakersModalContent.d.ts +1 -0
- package/dist/types/components/Individual/tasks/IndividualDropin/individualFormConfig.d.ts +1 -1
- package/dist/types/components/Individual/tasks/IndividualOnfidoDropin/IndividualOnfidoStore.d.ts +6 -0
- package/dist/types/components/Individual/tasks/IndividualOnfidoDropin/individualOnfidoFormConfig.d.ts +1 -1
- package/dist/types/components/Shared/EntityAssociation/types.d.ts +1 -1
- package/dist/types/components/Shared/EntityGuidanceStatus/types.d.ts +1 -1
- package/dist/types/components/Shared/FormFlow/FormFlow.types.d.ts +1 -1
- package/dist/types/components/Shared/FormNavigation/FormNavigationItem.d.ts +1 -2
- package/dist/types/components/Shared/FormNavigation/types.d.ts +3 -3
- package/dist/types/components/Shared/FormWrapper/FormWrapper.d.ts +2 -2
- package/dist/types/components/Shared/Introduction/copy.d.ts +2 -2
- package/dist/types/components/Shared/SingpassSelection/types.d.ts +1 -1
- package/dist/types/components/Shared/Summary/Summary.d.ts +1 -2
- package/dist/types/components/Shared/Summary/summaryItem.d.ts +1 -1
- package/dist/types/components/Shared/Summary/types.d.ts +3 -3
- package/dist/types/components/Shared/devex/DebugListener/DebugModal.d.ts +0 -1
- package/dist/types/components/Shared/fields/BusinessRegistrationNumberField/BusinessRegistrationNumberField.d.ts +1 -1
- package/dist/types/components/Shared/fields/BusinessRegistrationNumberField/fieldConfig.d.ts +6 -4
- package/dist/types/components/Shared/fields/BusinessRegistrationNumberField/types.d.ts +6 -8
- package/dist/types/components/Shared/fields/CountryField/CountryField.d.ts +1 -1
- package/dist/types/components/Shared/fields/CountryField/types.d.ts +3 -3
- package/dist/types/components/Shared/fields/CountryOfGoverningLawField/CountryOfGoverningLawField.d.ts +1 -1
- package/dist/types/components/Shared/fields/CountryOfGoverningLawField/types.d.ts +2 -2
- package/dist/types/components/Shared/fields/Currency/types.d.ts +3 -3
- package/dist/types/components/Shared/fields/DBANameField/fieldConfig.d.ts +1 -1
- package/dist/types/components/Shared/fields/DBANameField/types.d.ts +1 -3
- package/dist/types/components/Shared/fields/DateOfIncorporationField/fieldConfig.d.ts +1 -1
- package/dist/types/components/Shared/fields/DateOfIncorporationField/types.d.ts +1 -1
- package/dist/types/components/Shared/fields/EInvoicingCodeField/fieldConfig.d.ts +1 -1
- package/dist/types/components/Shared/fields/EInvoicingCodeField/types.d.ts +1 -1
- package/dist/types/components/Shared/fields/FinancialReportingDate/types.d.ts +1 -1
- package/dist/types/components/Shared/fields/IdFieldTypeSelector/CompanyRegistrationNumberTypeSelector.d.ts +2 -2
- package/dist/types/components/Shared/fields/IdFieldTypeSelector/IndividualIdNumberTypeSelector.d.ts +2 -2
- package/dist/types/components/Shared/fields/IdFieldTypeSelector/TaxIdNumberTypeSelector.d.ts +4 -3
- package/dist/types/components/Shared/fields/IdFieldTypeSelector/VatNumberTypeSelector.d.ts +2 -2
- package/dist/types/components/Shared/fields/IdFieldTypeSelector/countryIdNumberTypes.d.ts +11 -2
- package/dist/types/components/Shared/fields/IdFieldTypeSelector/getDefaultRegistrationNumberType.d.ts +16 -0
- package/dist/types/components/Shared/fields/IdFieldTypeSelector/getDefaultTaxIdNumberType.d.ts +1 -1
- package/dist/types/components/Shared/fields/IdFieldTypeSelector/getDefaultVatNumberType.d.ts +13 -0
- package/dist/types/components/Shared/fields/IdFieldTypeSelector/inferCompanyRegistrationNumberType.d.ts +1 -1
- package/dist/types/components/Shared/fields/IdFieldTypeSelector/inferTaxIdNumberType.d.ts +1 -1
- package/dist/types/components/Shared/fields/IdFieldTypeSelector/inferVatNumberType.d.ts +1 -1
- package/dist/types/components/Shared/fields/LegalCompanyNameField/LegalCompanyNameField.d.ts +1 -2
- package/dist/types/components/Shared/fields/LegalCompanyNameField/fieldConfig.d.ts +1 -1
- package/dist/types/components/Shared/fields/LegalCompanyNameField/types.d.ts +1 -1
- package/dist/types/components/Shared/fields/LocalizedLegalCompanyNameField/fieldConfig.d.ts +12 -0
- package/dist/types/components/Shared/fields/LocalizedLegalCompanyNameField/types.d.ts +5 -0
- package/dist/types/components/Shared/fields/Name/Name.d.ts +1 -1
- package/dist/types/components/Shared/fields/NumberOfEmployees/types.d.ts +1 -1
- package/dist/types/components/Shared/fields/PhoneField/PhoneField.d.ts +1 -2
- package/dist/types/components/Shared/fields/PhoneField/fieldConfig.d.ts +1 -1
- package/dist/types/components/Shared/fields/PhoneField/types.d.ts +2 -2
- package/dist/types/components/Shared/fields/StateField/StateField.d.ts +1 -1
- package/dist/types/components/Shared/fields/StateField/fieldConfig.d.ts +1 -1
- package/dist/types/components/Shared/fields/StateField/types.d.ts +4 -4
- package/dist/types/components/Shared/fields/StockExchangeMICField/fieldConfig.d.ts +1 -1
- package/dist/types/components/Shared/fields/StockExchangeMICField/types.d.ts +1 -1
- package/dist/types/components/Shared/fields/StockISINField/fieldConfig.d.ts +1 -1
- package/dist/types/components/Shared/fields/StockISINField/types.d.ts +1 -1
- package/dist/types/components/Shared/fields/StockTickerSymbol/fieldConfig.d.ts +1 -1
- package/dist/types/components/Shared/fields/StockTickerSymbol/types.d.ts +1 -1
- package/dist/types/components/Shared/fields/TaxInformationField/TaxInformationField.d.ts +1 -2
- package/dist/types/components/Shared/fields/TaxInformationField/fieldConfig.d.ts +5 -3
- package/dist/types/components/Shared/fields/TaxInformationField/types.d.ts +2 -2
- package/dist/types/components/Shared/fields/VatNumberField/VatNumberField.d.ts +1 -1
- package/dist/types/components/Shared/fields/VatNumberField/fieldConfig.d.ts +1 -1
- package/dist/types/components/Shared/fields/VatNumberField/types.d.ts +3 -5
- package/dist/types/components/Shared/forms/Address/AddressField.d.ts +1 -1
- package/dist/types/components/Shared/forms/Address/SearchAddress.d.ts +3 -3
- package/dist/types/components/Shared/forms/Address/constants.d.ts +1 -1
- package/dist/types/components/Shared/forms/Address/types.d.ts +1 -2
- package/dist/types/components/Shared/forms/Address/utils.d.ts +3 -3
- package/dist/types/components/Shared/forms/Address/validate.d.ts +1 -1
- package/dist/types/components/Shared/forms/BusinessTypeSelection/types.d.ts +1 -1
- package/dist/types/components/Shared/forms/BusinessTypeSelection/utils.d.ts +7 -7
- package/dist/types/components/Shared/forms/CompanyNameAndCountry/types.d.ts +1 -1
- package/dist/types/components/Shared/forms/ConstitutionalDocument/types.d.ts +1 -1
- package/dist/types/components/Shared/forms/ContactDetails/ContactDetails.d.ts +1 -1
- package/dist/types/components/Shared/forms/ContactDetails/types.d.ts +1 -1
- package/dist/types/components/Shared/forms/DocumentUpload/types.d.ts +2 -2
- package/dist/types/components/Shared/forms/FinancialInformation/ReportedValue.d.ts +1 -1
- package/dist/types/components/Shared/forms/FinancialInformation/formatFinancialInformationSummary.d.ts +2 -2
- package/dist/types/components/Shared/forms/FinancialInformation/mapping/mapFinancialInformationToFinancialReport.d.ts +1 -1
- package/dist/types/components/Shared/forms/FinancialInformation/types.d.ts +3 -3
- package/dist/types/components/Shared/forms/FinancialInformation/validate.d.ts +1 -0
- package/dist/types/components/Shared/forms/RegistrationAddress/types.d.ts +2 -2
- package/dist/types/components/Shared/tasks/CustomerSupport/types.d.ts +1 -1
- package/dist/types/components/Shared/tasks/TaskList/PayoutAccountTaskListItem.d.ts +1 -1
- package/dist/types/components/Shared/tasks/TaskList/TaskItemStatus.d.ts +1 -2
- package/dist/types/components/Shared/tasks/TaskList/TaskList.d.ts +1 -1
- package/dist/types/components/Shared/tasks/TaskList/types.d.ts +2 -2
- package/dist/types/components/Shared/tasks/TaskList/utils.d.ts +1 -1
- package/dist/types/components/Trust/forms/Trust/Trust.d.ts +19 -3
- package/dist/types/components/Trust/forms/Trust/rules.d.ts +6 -6
- package/dist/types/components/Trust/forms/Trust/types.d.ts +2 -2
- package/dist/types/components/Trust/forms/TrustRegistrationDetails/types.d.ts +1 -1
- package/dist/types/components/Trust/forms/TrustRoleAndEntityType/types.d.ts +1 -1
- package/dist/types/components/Trust/hooks/useTrustMemberNavigation.hook.d.ts +14 -14
- package/dist/types/components/Trust/mapping/mapTrustDocumentToApiDocument.d.ts +1 -1
- package/dist/types/components/Trust/tasks/RoleAndTypeDropin/types.d.ts +1 -1
- package/dist/types/components/Trust/tasks/TrustDropin/trustFormConfig.d.ts +1 -1
- package/dist/types/components/Trust/tasks/TrustMembers/types.d.ts +1 -1
- package/dist/types/components/Trust/utils/trustUtil.d.ts +4 -4
- package/dist/types/components/UnincorporatedPartnership/hooks/useUnincorporatedPartnershipNavigation.d.ts +2 -2
- package/dist/types/components/UnincorporatedPartnership/tasks/UnincorporatedPartnershipRoleAndType/UnincorporatedPartnershipRadioGroup.d.ts +2 -3
- package/dist/types/components/UnincorporatedPartnership/tasks/UnincorporatedPartnershipRoleAndType/UnincorporatedPartnershipRoleAndType.d.ts +1 -2
- package/dist/types/components/UnincorporatedPartnership/types/types.d.ts +1 -1
- package/dist/types/components/UnincorporatedPartnership/utils/unincorporatedParnershipUtil.d.ts +3 -3
- package/dist/types/components/ui/atoms/Accordion/Accordion.d.ts +1 -2
- package/dist/types/components/ui/atoms/ActionsMenu/ActionsMenu.d.ts +1 -1
- package/dist/types/components/ui/atoms/Button/Button.d.ts +2 -3
- package/dist/types/components/ui/atoms/Button/Button.types.d.ts +3 -3
- package/dist/types/components/ui/atoms/Checkbox/Checkbox.d.ts +1 -2
- package/dist/types/components/ui/atoms/Field/Field.d.ts +3 -6
- package/dist/types/components/ui/atoms/Field/Field.types.d.ts +11 -12
- package/dist/types/components/ui/atoms/FormHeader/FormHeader.d.ts +4 -6
- package/dist/types/components/ui/atoms/InputBase/InputBase.d.ts +5 -5
- package/dist/types/components/ui/atoms/List/List.d.ts +12 -0
- package/dist/types/components/ui/atoms/Modal/MaybeModal.d.ts +1 -1
- package/dist/types/components/ui/atoms/RadioGroupCard/RadioGroupCard.types.d.ts +3 -3
- package/dist/types/components/ui/atoms/Remove/Remove.d.ts +1 -2
- package/dist/types/components/ui/atoms/Select/Select.d.ts +1 -2
- package/dist/types/components/ui/atoms/Select/Select.types.d.ts +1 -0
- package/dist/types/components/ui/atoms/SelectButton/SelectButton.d.ts +1 -2
- package/dist/types/components/ui/atoms/SelectButton/SelectButton.types.d.ts +3 -4
- package/dist/types/components/ui/atoms/SelectList/SelectList.d.ts +1 -2
- package/dist/types/components/ui/atoms/SelectList/SelectList.types.d.ts +2 -2
- package/dist/types/components/ui/atoms/SelectListItem/SelectListItem.types.d.ts +3 -3
- package/dist/types/components/ui/atoms/Svg/Svg.d.ts +1 -1
- package/dist/types/components/ui/atoms/Svg/svgs.d.ts +6 -0
- package/dist/types/components/ui/atoms/TaskStatusIndicator/TaskStatusIndicator.d.ts +1 -1
- package/dist/types/components/ui/atoms/TextArea/TextArea.d.ts +1 -2
- package/dist/types/components/ui/atoms/Tile/Tile.d.ts +1 -2
- package/dist/types/components/ui/layout/LandingLayout/LandingLayout.d.ts +10 -0
- package/dist/types/components/ui/layout/StackLayout/StackLayout.d.ts +8 -0
- package/dist/types/components/ui/molecules/Alert/Alert.d.ts +1 -1
- package/dist/types/components/ui/molecules/Alert/types.d.ts +1 -1
- package/dist/types/components/ui/molecules/Card/Card.d.ts +1 -2
- package/dist/types/components/ui/molecules/Card/types.d.ts +3 -3
- package/dist/types/components/ui/molecules/Confirm/Confirm.d.ts +1 -1
- package/dist/types/components/ui/molecules/Confirm/Confirm.types.d.ts +1 -0
- package/dist/types/components/ui/molecules/DocumentGuidance/DocumentGuidance.types.d.ts +2 -2
- package/dist/types/components/ui/molecules/Dropzone/FilePicker.d.ts +3 -5
- package/dist/types/components/ui/molecules/Dropzone/types.d.ts +1 -1
- package/dist/types/components/ui/molecules/Dropzone/validate.d.ts +1 -1
- package/dist/types/components/ui/molecules/EmbeddedStatus/EmbeddedStatus.d.ts +2 -2
- package/dist/types/components/ui/molecules/EmbeddedStatus/statusToTag.d.ts +2 -2
- package/dist/types/components/ui/molecules/ErrorPanel/ErrorPanel.d.ts +1 -1
- package/dist/types/components/ui/molecules/ErrorPanel/VerificationErrors.d.ts +2 -1
- package/dist/types/components/ui/molecules/ErrorPanel/types.d.ts +3 -3
- package/dist/types/components/ui/molecules/FormEndState/FormEndState.d.ts +0 -1
- package/dist/types/components/ui/molecules/InputCurrency/InputCurrency.d.ts +2 -3
- package/dist/types/components/ui/molecules/InputDate/InputDate.d.ts +3 -3
- package/dist/types/components/ui/molecules/InputEmail/InputEmail.d.ts +1 -1
- package/dist/types/components/ui/molecules/InputTelephone/InputTelephone.d.ts +1 -1
- package/dist/types/components/ui/molecules/InputText/InputText.d.ts +1 -1
- package/dist/types/components/ui/molecules/MaskedInput/MaskedInput.d.ts +3 -7
- package/dist/types/constants/countries.d.ts +1 -1
- package/dist/types/constants/keys.d.ts +2 -0
- package/dist/types/context/ExperimentContext/types.d.ts +18 -1
- package/dist/types/context/FormContext/FormContext.d.ts +1 -1
- package/dist/types/context/FormRouterContext/FormRouterContext.d.ts +1 -1
- package/dist/types/context/FormRouterContext/types.d.ts +1 -1
- package/dist/types/context/SettingsContext/SettingsContext.d.ts +1 -1
- package/dist/types/context/SettingsContext/types.d.ts +1 -1
- package/dist/types/context/StateContext/StateContext.d.ts +1 -1
- package/dist/types/context/StateContext/StateContextSetter.d.ts +1 -1
- package/dist/types/context/StateContext/StateReducer.d.ts +4 -10
- package/dist/types/context/StateContext/types.d.ts +19 -17
- package/dist/types/context/StateContext/useGlobalData.d.ts +2 -2
- package/dist/types/core/EmbedShell/EmbedShell.d.ts +2 -1
- package/dist/types/core/UIElement/UIElement.d.ts +2 -1
- package/dist/types/core/analytics.d.ts +12 -10
- package/dist/types/core/environment/resolveEnvironment.d.ts +1 -1
- package/dist/types/core/error.d.ts +1 -1
- package/dist/types/core/errorMapping.d.ts +3 -3
- package/dist/types/core/models/api/address.d.ts +1 -1
- package/dist/types/core/models/api/financialReport.d.ts +3 -3
- package/dist/types/core/models/api/get-scenarios.d.ts +2 -8
- package/dist/types/core/models/api/individual.d.ts +10 -0
- package/dist/types/core/models/api/legal-arrangement.d.ts +10 -2
- package/dist/types/core/models/api/legal-entity-association.d.ts +5 -0
- package/dist/types/core/models/api/organization.d.ts +9 -1
- package/dist/types/core/models/api/phone.d.ts +1 -1
- package/dist/types/core/models/api/remediating-action.d.ts +1 -1
- package/dist/types/core/models/api/source-of-funds.d.ts +1 -1
- package/dist/types/core/models/api/transfer-instrument.d.ts +1 -1
- package/dist/types/core/models/api/verification-error.d.ts +1 -1
- package/dist/types/core/models/api/view-verification-status.d.ts +0 -4
- package/dist/types/core/process-field-configurations.d.ts +9 -9
- package/dist/types/core/types.d.ts +1 -1
- package/dist/types/core/user-events.d.ts +14 -3
- package/dist/types/datasets/generators/getAccountFormatForCountry.d.ts +2 -2
- package/dist/types/datasets/generators/getBusinessTypeExamplesForCountry.d.ts +2 -2
- package/dist/types/datasets/generators/getCompanyTypeExamplesForCountry.d.ts +2 -2
- package/dist/types/datasets/generators/getLegalArrangementTypeExamplesForCountry.d.ts +3 -3
- package/dist/types/datasets/generators/loadCountries.d.ts +1 -1
- package/dist/types/datasets/generators/loadStatesDataset.d.ts +1 -1
- package/dist/types/embeds/EmbedBaseElement.d.ts +41 -0
- package/dist/types/embeds/EmbedCore.d.ts +22 -0
- package/dist/types/embeds/baseEmbedProps.d.ts +21 -0
- package/dist/types/embeds/business-financing/AdyenBusinessFinancing.d.ts +13 -0
- package/dist/types/embeds/business-financing/adyen-business-financing.types.d.ts +6 -1
- package/dist/types/embeds/individual/AdyenIndividual.d.ts +12 -0
- package/dist/types/embeds/individual/adyen-individual.types.d.ts +6 -1
- package/dist/types/embeds/manage-individual/AdyenManageIndividual.d.ts +12 -0
- package/dist/types/embeds/manage-pci/AdyenManagePci.d.ts +12 -0
- package/dist/types/embeds/manage-terms-of-service/AdyenManageTermsOfService.d.ts +12 -0
- package/dist/types/embeds/manage-transfer-instruments/AdyenManageTransferInstrument.d.ts +15 -0
- package/dist/types/embeds/onboarding/AdyenOnboarding.d.ts +12 -0
- package/dist/types/embeds/onboarding/adyen-onboarding.types.d.ts +4 -1
- package/dist/types/embeds/sign-pci/AdyenSignPci.d.ts +14 -0
- package/dist/types/embeds/sign-pci/adyen-sign-pci.types.d.ts +5 -3
- package/dist/types/embeds/terms-of-service/AdyenTermsOfService.d.ts +12 -0
- package/dist/types/embeds/terms-of-service/adyen-terms-of-service.types.d.ts +7 -1
- package/dist/types/embeds/transfer-instrument/AdyenTransferInstrument.d.ts +16 -0
- package/dist/types/embeds/transfer-instrument/adyen-transfer-instrument.types.d.ts +7 -2
- package/dist/types/embeds/verification-status/AdyenVerificationStatus.d.ts +20 -0
- package/dist/types/hooks/introduction/useIntroductionScreens.d.ts +1 -1
- package/dist/types/hooks/singpass/useHasSeenSingpassSelection.d.ts +2 -1
- package/dist/types/hooks/singpass/useSingpassMyInfoLogin.d.ts +2 -2
- package/dist/types/hooks/useAccountHolder.d.ts +1 -1
- package/dist/types/hooks/useAllowedCountries.d.ts +1 -1
- package/dist/types/hooks/useAsyncValidator.d.ts +2 -1
- package/dist/types/hooks/useBusinessSetup.d.ts +1 -1
- package/dist/types/hooks/useDataConflicts.d.ts +0 -6
- package/dist/types/hooks/useDataMissingRemediations.d.ts +1 -1
- package/dist/types/hooks/useForm/reducer.d.ts +2 -2
- package/dist/types/hooks/useForm/types.d.ts +14 -19
- package/dist/types/hooks/useFormComposer.d.ts +2 -2
- package/dist/types/hooks/useLegalCompanyNameField/useLegalCompanyNameField.d.ts +28 -0
- package/dist/types/hooks/useMultiForm/reducer.d.ts +4 -3
- package/dist/types/hooks/useMultiForm/types.d.ts +36 -73
- package/dist/types/hooks/useMultiForm/useMultiForm.d.ts +1 -1
- package/dist/types/hooks/useMultiForm/useMultiFormAsyncValidator.d.ts +2 -2
- package/dist/types/hooks/useScenarioConfiguration.d.ts +5 -5
- package/dist/types/language/Language.d.ts +1 -7
- package/dist/types/language/i18n.d.ts +2 -0
- package/dist/types/language/types.d.ts +3 -0
- package/dist/types/language/utils.d.ts +12 -3
- package/dist/types/stores/globalStore/calculateTaskStatus.d.ts +2 -2
- package/dist/types/stores/globalStore/determineTaskIdentifiers.d.ts +2 -2
- package/dist/types/stores/globalStore/get-task-status.d.ts +1 -1
- package/dist/types/stores/globalStore/globalStore.d.ts +4 -4
- package/dist/types/stores/globalStore/taskStatus.d.ts +1 -1
- package/dist/types/types/datasets/country-code.d.ts +251 -0
- package/dist/types/{core/models → types}/errors/capability-problems.d.ts +1 -1
- package/dist/types/{core/models → types}/errors/entity-problems.d.ts +4 -4
- package/dist/types/{core/models → types}/errors/error-message.d.ts +1 -1
- package/dist/types/{core/models → types}/errors/maintenance-mode-error.d.ts +1 -1
- package/dist/types/{core/models → types}/errors/remediation.d.ts +1 -1
- package/dist/types/{core/models → types}/form-configuration.d.ts +4 -4
- package/dist/types/{core/models → types}/form-rules.d.ts +10 -8
- package/dist/types/{core/models → types}/form.d.ts +1 -1
- package/dist/types/utils/accountHolderUtils.d.ts +1 -1
- package/dist/types/utils/api/documentUtils.d.ts +1 -1
- package/dist/types/utils/api/getProblemsForEntity.d.ts +2 -2
- package/dist/types/utils/api/processCapabilitites.d.ts +5 -4
- package/dist/types/utils/api/processValidationErrors.d.ts +3 -3
- package/dist/types/utils/birthDateUtils.d.ts +53 -2
- package/dist/types/utils/country.d.ts +5 -2
- package/dist/types/utils/datasetUtil.d.ts +3 -3
- package/dist/types/{core/models/decision-maker.d.ts → utils/decisionMaker.d.ts} +2 -2
- package/dist/types/utils/dropinUtils.d.ts +2 -2
- package/dist/types/utils/entityAssociationUtil.d.ts +6 -7
- package/dist/types/utils/entityStatusUtil.d.ts +2 -2
- package/dist/types/utils/eventHandlers/handleKeys.d.ts +2 -2
- package/dist/types/{core/models/field-configurations.d.ts → utils/fieldConfigurations.d.ts} +4 -4
- package/dist/types/utils/formUtils.d.ts +1 -1
- package/dist/types/utils/formatCurrency.d.ts +1 -1
- package/dist/types/utils/getDisplayErrorMessage.d.ts +2 -2
- package/dist/types/utils/getLegalEntityCountry.d.ts +1 -1
- package/dist/types/utils/getName.d.ts +2 -2
- package/dist/types/utils/getSSNType.d.ts +1 -1
- package/dist/types/utils/makeSelectItemForRole.d.ts +2 -2
- package/dist/types/utils/mapping/mapExistingFile.d.ts +1 -1
- package/dist/types/utils/mapping/utils.d.ts +7 -10
- package/dist/types/utils/masking/masks/businessRegistrationNumberMasks.d.ts +1 -0
- package/dist/types/utils/omitObscuredFieldsIfUnchanged.d.ts +1 -1
- package/dist/types/utils/perCountry.d.ts +1 -1
- package/dist/types/utils/perState.d.ts +3 -2
- package/dist/types/utils/regex/patternValidators.d.ts +2 -0
- package/dist/types/utils/regex/postalCodePatterns.d.ts +1 -1
- package/dist/types/utils/simulateTextChangeFromKeyboardEvent.d.ts +2 -2
- package/dist/types/utils/trackNavigation.d.ts +1 -2
- package/dist/types/utils/urlUtils.d.ts +1 -0
- package/dist/types/utils/validation/types.d.ts +1 -1
- package/dist/types/utils/validation/validationResult.d.ts +1 -1
- package/dist/types/{core/models/errors/validation-error.d.ts → utils/validationError.d.ts} +1 -1
- package/dist/types/utils/validatorUtils.d.ts +7 -3
- package/dist/types/utils/verification/helpers/verifyIdNumber.d.ts +2 -2
- package/dist/{useMultiForm-Lh2i5tRJ.js → useMultiForm-KQwxav4F.js} +160 -136
- package/dist/{useOnboardingStatus-D1ym3MHp.js → useOnboardingStatus-BMyj9Pwn.js} +2 -2
- package/dist/{useSalesChannelsSettings-BGuBY0ls.js → useSalesChannelsSettings-43TfSoxc.js} +2 -2
- package/dist/{useTermsOfServiceStatus-DGZYHVsm.js → useTermsOfServiceStatus-CBHKWYSb.js} +4 -4
- package/dist/{useUpdateLegalEntity-By6uwPUg.js → useUpdateLegalEntity-D8dw9Oc3.js} +2 -2
- package/dist/{utils-BPrqY9DW.js → utils-CL9qlD-O.js} +18 -11
- package/dist/{validate-Dyb8B4Hi.js → validate-CeF0YKvL.js} +2 -2
- package/dist/validate-CuwYJGc9.js +94 -0
- package/dist/vue/adyen-individual.js +1 -1
- package/dist/vue/adyen-manage-individual.js +1 -1
- package/dist/vue/adyen-terms-of-service.js +1 -1
- package/dist/vue/adyen-transfer-instrument.js +5 -4
- package/dist/{yaml-Ba_Tz8d4.js → yaml-CBkrSAtc.js} +2 -2
- package/dist/zh-CN-wUb4MmTZ.js +13 -0
- package/dist/zh-TW-DNTXHLKa.js +13 -0
- package/package.json +53 -51
- package/dist/CXEL7IU7-B_FIdhoh.js +0 -55
- package/dist/Confirm-okTxq40p.js +0 -56
- package/dist/ContractViewer-BChszuWL.js +0 -980
- package/dist/FormEndState-BQOQ83vO.js +0 -32
- package/dist/FormNavigation-B6RspX9C.js +0 -145
- package/dist/FormWrapper-Dvm1o4tC.js +0 -149
- package/dist/HASRA6WW-C1SPXfmX.js +0 -12411
- package/dist/I3HPI4QX-A8JLvlId.js +0 -46
- package/dist/MaybeModal-Djz8fRfd.js +0 -18
- package/dist/Modal-CRNejb1x.js +0 -135
- package/dist/PayoutDetailsDropin-Bw29V8E7.js +0 -901
- package/dist/PayoutDetailsPage-BHNHaMbR.js +0 -57
- package/dist/ShadowStylesRoot-D4KvocCc.js +0 -103
- package/dist/SourceOfFunds.module-OqFTr4WQ.js +0 -128
- package/dist/Spacer-BK3jDget.js +0 -18
- package/dist/StepProgressIndicator-BuGfVdlr.js +0 -74
- package/dist/bg-BG-CGHVGS50.js +0 -1986
- package/dist/cs-CZ-5Os6MsQs.js +0 -1986
- package/dist/da-DK-Dk9852pS.js +0 -1986
- package/dist/de-DE-B3TpRjZX.js +0 -994
- package/dist/de-DE-dk9CMgxF.js +0 -1986
- package/dist/documentUtils-51iMbUyU.js +0 -226
- package/dist/dropinUtils-Bk0T79SK.js +0 -204
- package/dist/el-GR-CFEuLvxK.js +0 -994
- package/dist/el-GR-DgI6Cgl6.js +0 -1986
- package/dist/en-US-ghR-1_C2.js +0 -994
- package/dist/es-ES-BtWn2FOQ.js +0 -994
- package/dist/es-ES-BzoYprDP.js +0 -1986
- package/dist/et-EE-DlbiEFQu.js +0 -1986
- package/dist/fi-FI-GSyT4vm7.js +0 -1986
- package/dist/fr-FR-BEImhl_J.js +0 -1986
- package/dist/fr-FR-HvIkGqJf.js +0 -994
- package/dist/hr-HR-CNFI9uDD.js +0 -1986
- package/dist/hu-HU-D4xFA3R6.js +0 -1986
- package/dist/individualFormConfig-BrFLPTfr.js +0 -171
- package/dist/it-IT-B65JP9Qv.js +0 -1986
- package/dist/it-IT-CjbZahlB.js +0 -994
- package/dist/ja-JP-4jufT0xh.js +0 -994
- package/dist/ja-JP-CgGmwtzl.js +0 -1986
- package/dist/lt-LT-D_Q1Z3N4.js +0 -1986
- package/dist/lv-LV-aF5bMtic.js +0 -1986
- package/dist/mapExistingFile-BE74t9jV.js +0 -25
- package/dist/mapTransferInstrumentToPayoutAccount-DR8zv8gS.js +0 -30
- package/dist/nl-NL-B3xjfpMi.js +0 -994
- package/dist/nl-NL-GDXpht_y.js +0 -1986
- package/dist/no-NO-CEow5Bac.js +0 -1986
- package/dist/omitObscuredFieldsIfUnchanged-DhCrqm4T.js +0 -28
- package/dist/pl-PL-Bir_Ltlv.js +0 -1986
- package/dist/process-field-configurations-DugpEY9k.js +0 -185
- package/dist/processValidationErrors-RYlNmxB9.js +0 -203
- package/dist/pt-PT-BpYDD-PX.js +0 -994
- package/dist/pt-PT-lkmVY63I.js +0 -1986
- package/dist/ro-RO-CTQvP4R9.js +0 -1986
- package/dist/ru-RU-BlgIj-Q4.js +0 -994
- package/dist/sk-SK-Ct3OVI0e.js +0 -1986
- package/dist/sl-SI-CNjkFWB7.js +0 -1986
- package/dist/sv-SE-7lcf_fB9.js +0 -994
- package/dist/sv-SE-BwREUuQq.js +0 -1986
- package/dist/types/api/companyDataSet/useCompanyDataset.d.ts +0 -5
- package/dist/types/components/Individual/forms/IndividualOnfido/IdVerificationMethod/formatId.d.ts +0 -3
- package/dist/types/core/models/country-code.d.ts +0 -250
- package/dist/types/embeds/ShadowStylesRoot.d.ts +0 -3
- package/dist/types/utils/sanitizeHtml.d.ts +0 -3
- package/dist/types/utils/useStateFromProp.d.ts +0 -9
- package/dist/useToastContext-CF2xonft.js +0 -21
- package/dist/utils-B1H_8b1P.js +0 -74
- package/dist/validate-wd48TLfx.js +0 -245
- package/dist/zh-CN-xYZH718R.js +0 -994
- package/dist/zh-TW-DqBBNurv.js +0 -994
- /package/dist/types/{core/types/AccountHolder.types.d.ts → types/accountHolder.d.ts} +0 -0
- /package/dist/types/{core/models → types/datasets}/currency.d.ts +0 -0
- /package/dist/types/{core/models → types/datasets}/province-code.d.ts +0 -0
- /package/dist/types/{core/models → types/datasets}/state-code.d.ts +0 -0
- /package/dist/types/{core/models → types}/errors/form-verification-errors.d.ts +0 -0
- /package/dist/types/{core/models → types}/errors/remediation-action-context.d.ts +0 -0
- /package/dist/types/{core/models → types}/file.d.ts +0 -0
|
@@ -2,35 +2,26 @@
|
|
|
2
2
|
{
|
|
3
3
|
try {
|
|
4
4
|
let e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
|
|
5
|
-
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "
|
|
5
|
+
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "2f44333d-554c-4aff-bf9a-44054bd93740", e._sentryDebugIdIdentifier = "sentry-dbid-2f44333d-554c-4aff-bf9a-44054bd93740");
|
|
6
6
|
} catch (e) {
|
|
7
7
|
}
|
|
8
8
|
}
|
|
9
9
|
;
|
|
10
10
|
import { jsx, jsxs, Fragment } from "preact/jsx-runtime";
|
|
11
|
-
import {
|
|
12
|
-
import { u as useCapabilityProblems, g as getProblemsForEntity } from "./ProviderButton-vD5DUJaN.js";
|
|
11
|
+
import { p as useApiContext, q as useQuery, r as httpGet, bh as useInvalidateRootLegalEntity, bi as useMutation, bk as httpPost, bA as formatObject, y as LegalEntityType, G as Typography, eD as Currencies, ap as useI18nContext, aB as Field, eE as InputGroup, bu as Select, bE as InputText, bG as InputDate, aF as TextArea, aY as RadioGroup, aH as CountryField, b5 as Modal, B as Alert, _ as Button, bb as Confirm, ar as isEmpty, aw as useForm, eF as useGlobalDataSlice, az as ErrorPanel, aA as createFormUtils, L as Loader, a4 as Icon, ds as getFormProps, a1 as Card, b8 as StructuredList, $ as IconButton, di as isEmpty$1, bp as Svg, a6 as useToastContext, Y as createLogger, eG as Dropzone, cl as createDocumentRequest, bq as useQueryClient, b as useLegalEntity, R as ROOT_LE, ei as useStateContext, a0 as useAnalyticsContext, eH as useLegalEntities, cy as getPropsFromConfigurations, bQ as getRequiredForms, bR as addValidityToForms, bS as useFormComposer, cp as documentApiUtils, eo as FormWrapper, ac as useCapabilityProblems, bl as getProblemsForEntity, V as EntityType, g as getLegalEntityCountry } from "./StoreProvider-ClKLaHzy.js";
|
|
13
12
|
import { useState, useMemo, useEffect, useCallback, useRef } from "preact/hooks";
|
|
14
|
-
import { u as useCreateLegalEntity, a as useUpdateLegalEntity } from "./useUpdateLegalEntity-
|
|
15
|
-
import { h as hasDataChanged } from "./hasDataChanged-
|
|
16
|
-
import { u as useToastContext } from "./useToastContext-CF2xonft.js";
|
|
17
|
-
import { g as getPropsFromConfigurations } from "./process-field-configurations-DugpEY9k.js";
|
|
18
|
-
import { g as getRequiredForms, a as addValidityToForms, u as useFormComposer } from "./dropinUtils-Bk0T79SK.js";
|
|
19
|
-
import { F as FormWrapper } from "./FormWrapper-Dvm1o4tC.js";
|
|
20
|
-
import { c as createDocumentRequest, d as documentApiUtils } from "./documentUtils-51iMbUyU.js";
|
|
21
|
-
import { f as formatObject } from "./utils-B1H_8b1P.js";
|
|
13
|
+
import { u as useCreateLegalEntity, a as useUpdateLegalEntity } from "./useUpdateLegalEntity-D8dw9Oc3.js";
|
|
14
|
+
import { h as hasDataChanged } from "./hasDataChanged-CwfuS4et.js";
|
|
22
15
|
import { signal } from "@preact/signals";
|
|
23
|
-
import { s as styles, T as TaskStatusIndicator } from "./SourceOfFunds.module-OqFTr4WQ.js";
|
|
24
16
|
import { a as formatAmountWithCurrency } from "./formatCurrency-CMOSdJMB.js";
|
|
25
|
-
import { l as localizeDateString } from "./localizeDateString-
|
|
17
|
+
import { l as localizeDateString } from "./localizeDateString-CKCBXzSn.js";
|
|
26
18
|
import { t as toCapitalized } from "./toCapitalized-Bq7laD0b.js";
|
|
27
|
-
import { A as Avatar } from "./Avatar-
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import { n as normalizedTaskStatusStore } from "./OnboardingDropinComponent-CocnpjvA.js";
|
|
19
|
+
import { A as Avatar } from "./Avatar-vCjWXfC7.js";
|
|
20
|
+
import { v as validateDateNotInTheFuture } from "./validate-CuwYJGc9.js";
|
|
21
|
+
import { T as TileGroup } from "./TileGroup-BtE472I1.js";
|
|
22
|
+
import { T as TaskStatusIndicator } from "./TaskStatusIndicator-CTtKjo0m.js";
|
|
23
|
+
import { L as LandingLayout } from "./LandingLayout-B45lEjOv.js";
|
|
24
|
+
import { n as normalizedTaskStatusStore } from "./OnboardingDropinComponent-DBW5N3Dr.js";
|
|
34
25
|
const getBusinessLines = async (legalEntityId, baseUrl) => {
|
|
35
26
|
return httpGet({
|
|
36
27
|
baseUrl,
|
|
@@ -108,6 +99,62 @@ const useSourceOfFundsTypes = (options) => {
|
|
|
108
99
|
...options
|
|
109
100
|
});
|
|
110
101
|
};
|
|
102
|
+
const sourceOfFunds = "adyen-kyc-source-of-funds";
|
|
103
|
+
const sourceOfFundsWrapperLoading = "adyen-kyc-source-of-funds-wrapper-loading";
|
|
104
|
+
const sourceOfFundsWrapperHeading = "adyen-kyc-source-of-funds-wrapper-heading";
|
|
105
|
+
const sourceOfFundsWrapperDescription = "adyen-kyc-source-of-funds-wrapper-description";
|
|
106
|
+
const sourceOfFundsGettingStarted = "adyen-kyc-source-of-funds-getting-started";
|
|
107
|
+
const sourceOfFundsGettingStartedHeading = "adyen-kyc-source-of-funds-getting-started-heading";
|
|
108
|
+
const sourceOfFundsGettingStartedBody = "adyen-kyc-source-of-funds-getting-started-body";
|
|
109
|
+
const sourceOfFundsGettingStartedError = "adyen-kyc-source-of-funds-getting-started-error";
|
|
110
|
+
const sourceOfFundsGettingStartedErrorActions = "adyen-kyc-source-of-funds-getting-started-error-actions";
|
|
111
|
+
const sourceOfFundsGettingStartedCards = "adyen-kyc-source-of-funds-getting-started-cards";
|
|
112
|
+
const sourceOfFundsGettingStartedCardsCard = "adyen-kyc-source-of-funds-getting-started-cards-card";
|
|
113
|
+
const sourceOfFundsGettingStartedCardsCardHeader = "adyen-kyc-source-of-funds-getting-started-cards-card-header";
|
|
114
|
+
const sourceOfFundsGettingStartedCardsCardBody = "adyen-kyc-source-of-funds-getting-started-cards-card-body";
|
|
115
|
+
const sourceOfFundsGettingStartedActions = "adyen-kyc-source-of-funds-getting-started-actions";
|
|
116
|
+
const sourceOfFundsAdditionalDataForm = "adyen-kyc-source-of-funds-additional-data-form";
|
|
117
|
+
const sourceOfFundsThirdPartyFundingFinancierGroup = "adyen-kyc-source-of-funds-third-party-funding-financier-group";
|
|
118
|
+
const sourceOfFundsThirdPartyFundingNameAvatarGroup = "adyen-kyc-source-of-funds-third-party-funding-name-avatar-group";
|
|
119
|
+
const sourceOfFundsThirdPartyFundingNameAddressGroup = "adyen-kyc-source-of-funds-third-party-funding-name-address-group";
|
|
120
|
+
const sourceOfFundsSofFinancierFormError = "adyen-kyc-source-of-funds-sof-financier-form-error";
|
|
121
|
+
const sourceOfFundsSofFinancierFormNameGroup = "adyen-kyc-source-of-funds-sof-financier-form-name-group";
|
|
122
|
+
const sourceOfFundsFinancierFooter = "adyen-kyc-source-of-funds-financier-footer";
|
|
123
|
+
const sourceOfFundsGridContainer = "adyen-kyc-source-of-funds-grid-container";
|
|
124
|
+
const sourceOfFundsUploadModalContentField = "adyen-kyc-source-of-funds-upload-modal-content-field";
|
|
125
|
+
const sourceOfFundsUploadModalContentFieldRadioGroup = "adyen-kyc-source-of-funds-upload-modal-content-field-radio-group";
|
|
126
|
+
const sourceOfFundsUploadModalContentRequirementsContainer = "adyen-kyc-source-of-funds-upload-modal-content-requirements-container";
|
|
127
|
+
const sourceOfFundsUploadListHeading = "adyen-kyc-source-of-funds-upload-list-heading";
|
|
128
|
+
const sourceOfFundsModal = "adyen-kyc-source-of-funds-modal";
|
|
129
|
+
const styles = {
|
|
130
|
+
sourceOfFunds,
|
|
131
|
+
sourceOfFundsWrapperLoading,
|
|
132
|
+
sourceOfFundsWrapperHeading,
|
|
133
|
+
sourceOfFundsWrapperDescription,
|
|
134
|
+
sourceOfFundsGettingStarted,
|
|
135
|
+
sourceOfFundsGettingStartedHeading,
|
|
136
|
+
sourceOfFundsGettingStartedBody,
|
|
137
|
+
sourceOfFundsGettingStartedError,
|
|
138
|
+
sourceOfFundsGettingStartedErrorActions,
|
|
139
|
+
sourceOfFundsGettingStartedCards,
|
|
140
|
+
sourceOfFundsGettingStartedCardsCard,
|
|
141
|
+
sourceOfFundsGettingStartedCardsCardHeader,
|
|
142
|
+
sourceOfFundsGettingStartedCardsCardBody,
|
|
143
|
+
sourceOfFundsGettingStartedActions,
|
|
144
|
+
sourceOfFundsAdditionalDataForm,
|
|
145
|
+
sourceOfFundsThirdPartyFundingFinancierGroup,
|
|
146
|
+
sourceOfFundsThirdPartyFundingNameAvatarGroup,
|
|
147
|
+
sourceOfFundsThirdPartyFundingNameAddressGroup,
|
|
148
|
+
sourceOfFundsSofFinancierFormError,
|
|
149
|
+
sourceOfFundsSofFinancierFormNameGroup,
|
|
150
|
+
sourceOfFundsFinancierFooter,
|
|
151
|
+
sourceOfFundsGridContainer,
|
|
152
|
+
sourceOfFundsUploadModalContentField,
|
|
153
|
+
sourceOfFundsUploadModalContentFieldRadioGroup,
|
|
154
|
+
sourceOfFundsUploadModalContentRequirementsContainer,
|
|
155
|
+
sourceOfFundsUploadListHeading,
|
|
156
|
+
sourceOfFundsModal
|
|
157
|
+
};
|
|
111
158
|
const additionalDataSchemaKeys = [
|
|
112
159
|
"description",
|
|
113
160
|
"dateOfFundsReceived",
|
|
@@ -187,6 +234,18 @@ const getServiceTranslation = (i18n, service) => {
|
|
|
187
234
|
return i18n.get("supportingDocuments");
|
|
188
235
|
}
|
|
189
236
|
};
|
|
237
|
+
const getServiceTranslationSelectTitle = (i18n, service) => {
|
|
238
|
+
switch (service) {
|
|
239
|
+
case "banking":
|
|
240
|
+
return i18n.get("bankingServiceSelectTitle");
|
|
241
|
+
case "issuing":
|
|
242
|
+
return i18n.get("issuingServiceSelectTitle");
|
|
243
|
+
case "paymentProcessing":
|
|
244
|
+
return i18n.get("paymentServiceSelectTitle");
|
|
245
|
+
default:
|
|
246
|
+
return i18n.get("supportingDocuments");
|
|
247
|
+
}
|
|
248
|
+
};
|
|
190
249
|
const getServiceTranslationKey = (service) => {
|
|
191
250
|
switch (service) {
|
|
192
251
|
case "banking":
|
|
@@ -201,54 +260,52 @@ const getServiceTranslationKey = (service) => {
|
|
|
201
260
|
};
|
|
202
261
|
const getGettingStartedCardDetails = (sourceOfFundsType, i18n, data) => {
|
|
203
262
|
const details = [];
|
|
204
|
-
sourceOfFundsType
|
|
205
|
-
var _a, _b, _c;
|
|
263
|
+
sourceOfFundsType?.forEach((type) => {
|
|
206
264
|
switch (type) {
|
|
207
265
|
case "amount":
|
|
208
266
|
details.push({
|
|
209
267
|
term: i18n.get("amount"),
|
|
210
|
-
details:
|
|
268
|
+
details: data?.amount?.currency && data?.amount?.value ? formatAmountWithCurrency(data.amount.value, data.amount.currency) : ""
|
|
211
269
|
});
|
|
212
270
|
break;
|
|
213
271
|
case "description":
|
|
214
272
|
details.push({
|
|
215
273
|
term: i18n.get("description"),
|
|
216
|
-
details:
|
|
274
|
+
details: data?.description || ""
|
|
217
275
|
});
|
|
218
276
|
break;
|
|
219
277
|
case "dateOfFundsReceived":
|
|
220
278
|
details.push({
|
|
221
279
|
term: i18n.get("date"),
|
|
222
|
-
details: localizeDateString(
|
|
280
|
+
details: localizeDateString(data?.dateOfFundsReceived || "", i18n.locale)
|
|
223
281
|
});
|
|
224
282
|
break;
|
|
225
283
|
case "purpose":
|
|
226
284
|
details.push({
|
|
227
285
|
term: i18n.get("reason"),
|
|
228
|
-
details:
|
|
286
|
+
details: data?.purpose || ""
|
|
229
287
|
});
|
|
230
288
|
break;
|
|
231
289
|
case "relationship":
|
|
232
|
-
details.push({ term: i18n.get("relationship"), details:
|
|
290
|
+
details.push({ term: i18n.get("relationship"), details: data?.relationship || "" });
|
|
233
291
|
break;
|
|
234
292
|
case "originatorLegalEntityId":
|
|
235
293
|
details.push({
|
|
236
294
|
term: i18n.get("benefactorDetails"),
|
|
237
295
|
details: [
|
|
238
|
-
|
|
239
|
-
/* @__PURE__ */ jsx(Typography, { color: "secondary", children:
|
|
296
|
+
data?.legalName ? `${data?.legalName}` : `${data?.firstName} ${data?.lastName}`,
|
|
297
|
+
/* @__PURE__ */ jsx(Typography, { color: "secondary", children: data?.country || "" }, "location")
|
|
240
298
|
]
|
|
241
299
|
});
|
|
242
300
|
break;
|
|
243
301
|
case "financiers":
|
|
244
|
-
|
|
245
|
-
var _a2, _b2;
|
|
302
|
+
data?.financiers?.map((financier) => {
|
|
246
303
|
return details.push({
|
|
247
304
|
term: i18n.get("investor"),
|
|
248
305
|
details: [
|
|
249
|
-
`${financier
|
|
250
|
-
/* @__PURE__ */ jsx(Typography, { color: "secondary", children:
|
|
251
|
-
/* @__PURE__ */ jsx(Typography, { color: "secondary", children:
|
|
306
|
+
`${financier?.firstName} ${financier?.lastName}`,
|
|
307
|
+
/* @__PURE__ */ jsx(Typography, { color: "secondary", children: financier?.location || "" }, "location"),
|
|
308
|
+
/* @__PURE__ */ jsx(Typography, { color: "secondary", children: financier?.amount?.currency && financier?.amount?.value ? formatAmountWithCurrency(
|
|
252
309
|
financier.amount.value,
|
|
253
310
|
financier.amount.currency
|
|
254
311
|
) || "" : "" }, "value")
|
|
@@ -259,19 +316,19 @@ const getGettingStartedCardDetails = (sourceOfFundsType, i18n, data) => {
|
|
|
259
316
|
case "cryptocurrencyExchange":
|
|
260
317
|
details.push({
|
|
261
318
|
term: i18n.get("cryptocurrencyExchange"),
|
|
262
|
-
details:
|
|
319
|
+
details: data?.cryptocurrencyExchange || ""
|
|
263
320
|
});
|
|
264
321
|
break;
|
|
265
322
|
case "dateOfSourceEvent":
|
|
266
323
|
details.push({
|
|
267
324
|
term: i18n.get("dateOfSourceEvent"),
|
|
268
|
-
details: localizeDateString(
|
|
325
|
+
details: localizeDateString(data?.dateOfSourceEvent || "", i18n.locale)
|
|
269
326
|
});
|
|
270
327
|
break;
|
|
271
328
|
case "website":
|
|
272
329
|
details.push({
|
|
273
330
|
term: i18n.get("website"),
|
|
274
|
-
details:
|
|
331
|
+
details: data?.website || ""
|
|
275
332
|
});
|
|
276
333
|
break;
|
|
277
334
|
}
|
|
@@ -306,7 +363,7 @@ const typesRequiringAdditionalData = [
|
|
|
306
363
|
const getSourceOfFundsRequiredForms = (data) => {
|
|
307
364
|
return Object.fromEntries(
|
|
308
365
|
Object.entries(sourceOfFundsForms).filter(([form]) => {
|
|
309
|
-
if (!
|
|
366
|
+
if (!data?.type || !typesRequiringAdditionalData.includes(data?.type))
|
|
310
367
|
return form !== sourceOfFundsForms.additionalData.formId;
|
|
311
368
|
return form;
|
|
312
369
|
})
|
|
@@ -318,7 +375,6 @@ const getInputErrors = ({
|
|
|
318
375
|
key,
|
|
319
376
|
value
|
|
320
377
|
}) => {
|
|
321
|
-
var _a, _b, _c, _d;
|
|
322
378
|
const isEmpty2 = value === "" || value === null || value === void 0;
|
|
323
379
|
let errors = { ...formErrors };
|
|
324
380
|
if (isEmpty2) {
|
|
@@ -327,15 +383,15 @@ const getInputErrors = ({
|
|
|
327
383
|
errors = { ...formErrors, [key]: void 0 };
|
|
328
384
|
}
|
|
329
385
|
if (["amount", "currency"].includes(key)) {
|
|
330
|
-
if (
|
|
386
|
+
if (data?.amount?.value && data?.amount?.currency) {
|
|
331
387
|
errors = { ...formErrors, amount: void 0 };
|
|
332
388
|
}
|
|
333
|
-
if (!
|
|
389
|
+
if (!data?.amount?.currency) {
|
|
334
390
|
errors = { ...formErrors, amount: "currencyIsRequired" };
|
|
335
391
|
}
|
|
336
|
-
if (!
|
|
392
|
+
if (!data?.amount?.value) {
|
|
337
393
|
errors = { ...formErrors, amount: "amountIsRequired" };
|
|
338
|
-
} else if (isNaN(data
|
|
394
|
+
} else if (isNaN(data?.amount.value)) {
|
|
339
395
|
errors = { ...formErrors, amount: "pleaseEnterAValidAmount" };
|
|
340
396
|
}
|
|
341
397
|
}
|
|
@@ -608,34 +664,32 @@ const parseSOFDocumentDescription = (i18n, documentDescription) => {
|
|
|
608
664
|
};
|
|
609
665
|
const MISSING_DATA_SOF_UPLOAD_CODE = "2_8224";
|
|
610
666
|
const parseOriginatorDetails = (originatorDetails, businessLine) => {
|
|
611
|
-
var _a, _b, _c, _d, _e;
|
|
612
667
|
const copiedBusinessLine = { ...businessLine };
|
|
613
668
|
if (copiedBusinessLine.sourceOfFunds) {
|
|
614
669
|
if (originatorDetails.organization) {
|
|
615
670
|
copiedBusinessLine.sourceOfFunds.legalName = originatorDetails.organization.legalName;
|
|
616
|
-
copiedBusinessLine.sourceOfFunds.country =
|
|
671
|
+
copiedBusinessLine.sourceOfFunds.country = originatorDetails.organization?.registeredAddress?.country;
|
|
617
672
|
copiedBusinessLine.sourceOfFunds.originatorType = "organization";
|
|
618
673
|
}
|
|
619
674
|
if (originatorDetails.individual) {
|
|
620
|
-
copiedBusinessLine.sourceOfFunds.firstName =
|
|
621
|
-
copiedBusinessLine.sourceOfFunds.lastName =
|
|
622
|
-
copiedBusinessLine.sourceOfFunds.country =
|
|
675
|
+
copiedBusinessLine.sourceOfFunds.firstName = originatorDetails.individual.name?.firstName;
|
|
676
|
+
copiedBusinessLine.sourceOfFunds.lastName = originatorDetails.individual.name?.lastName;
|
|
677
|
+
copiedBusinessLine.sourceOfFunds.country = originatorDetails.individual.residentialAddress?.country;
|
|
623
678
|
copiedBusinessLine.sourceOfFunds.originatorType = "individual";
|
|
624
679
|
}
|
|
625
680
|
}
|
|
626
681
|
return copiedBusinessLine;
|
|
627
682
|
};
|
|
628
683
|
const getSourceOfFundsPayload = (sofType, additionalData) => {
|
|
629
|
-
var _a, _b;
|
|
630
684
|
switch (sofType) {
|
|
631
685
|
case "business":
|
|
632
686
|
return {
|
|
633
687
|
adyenProcessedFunds: false,
|
|
634
688
|
type: "business",
|
|
635
|
-
description: additionalData
|
|
689
|
+
description: additionalData?.description,
|
|
636
690
|
amount: {
|
|
637
|
-
currency:
|
|
638
|
-
value:
|
|
691
|
+
currency: additionalData?.amount?.currency ?? "USD",
|
|
692
|
+
value: additionalData?.amount?.value ?? 0
|
|
639
693
|
}
|
|
640
694
|
};
|
|
641
695
|
case "employment":
|
|
@@ -647,19 +701,19 @@ const getSourceOfFundsPayload = (sofType, additionalData) => {
|
|
|
647
701
|
return {
|
|
648
702
|
adyenProcessedFunds: false,
|
|
649
703
|
type: "donations",
|
|
650
|
-
dateOfFundsReceived: additionalData
|
|
651
|
-
purpose: additionalData
|
|
652
|
-
relationship: additionalData
|
|
653
|
-
originatorLegalEntityId: additionalData
|
|
704
|
+
dateOfFundsReceived: additionalData?.dateOfFundsReceived,
|
|
705
|
+
purpose: additionalData?.purpose,
|
|
706
|
+
relationship: additionalData?.relationship,
|
|
707
|
+
originatorLegalEntityId: additionalData?.originatorLegalEntityId
|
|
654
708
|
};
|
|
655
709
|
case "inheritance":
|
|
656
710
|
return {
|
|
657
711
|
adyenProcessedFunds: false,
|
|
658
712
|
type: "inheritance",
|
|
659
|
-
dateOfFundsReceived: additionalData
|
|
660
|
-
amount: additionalData
|
|
661
|
-
relationship: additionalData
|
|
662
|
-
originatorLegalEntityId: additionalData
|
|
713
|
+
dateOfFundsReceived: additionalData?.dateOfFundsReceived,
|
|
714
|
+
amount: additionalData?.amount,
|
|
715
|
+
relationship: additionalData?.relationship,
|
|
716
|
+
originatorLegalEntityId: additionalData?.originatorLegalEntityId
|
|
663
717
|
};
|
|
664
718
|
case "financialAid":
|
|
665
719
|
return {
|
|
@@ -695,22 +749,22 @@ const getSourceOfFundsPayload = (sofType, additionalData) => {
|
|
|
695
749
|
return {
|
|
696
750
|
adyenProcessedFunds: false,
|
|
697
751
|
type: "thirdPartyFunding",
|
|
698
|
-
financiers: additionalData
|
|
752
|
+
financiers: additionalData?.financiers
|
|
699
753
|
};
|
|
700
754
|
case "cryptocurrencyIncome":
|
|
701
755
|
return {
|
|
702
756
|
adyenProcessedFunds: false,
|
|
703
757
|
type: "cryptocurrencyIncome",
|
|
704
|
-
cryptocurrencyExchange: additionalData
|
|
758
|
+
cryptocurrencyExchange: additionalData?.cryptocurrencyExchange
|
|
705
759
|
};
|
|
706
760
|
case "assetSale":
|
|
707
761
|
return {
|
|
708
762
|
adyenProcessedFunds: false,
|
|
709
763
|
type: "assetSale",
|
|
710
|
-
cryptocurrencyExchange: additionalData
|
|
711
|
-
dateOfSourceEvent: additionalData
|
|
712
|
-
description: additionalData
|
|
713
|
-
amount: additionalData
|
|
764
|
+
cryptocurrencyExchange: additionalData?.cryptocurrencyExchange,
|
|
765
|
+
dateOfSourceEvent: additionalData?.dateOfSourceEvent,
|
|
766
|
+
description: additionalData?.description,
|
|
767
|
+
amount: additionalData?.amount
|
|
714
768
|
};
|
|
715
769
|
case "loans":
|
|
716
770
|
return {
|
|
@@ -721,9 +775,9 @@ const getSourceOfFundsPayload = (sofType, additionalData) => {
|
|
|
721
775
|
return {
|
|
722
776
|
adyenProcessedFunds: false,
|
|
723
777
|
type: "gamblingWinnings",
|
|
724
|
-
dateOfSourceEvent: additionalData
|
|
725
|
-
website: additionalData
|
|
726
|
-
amount: additionalData
|
|
778
|
+
dateOfSourceEvent: additionalData?.dateOfSourceEvent,
|
|
779
|
+
website: additionalData?.website && !additionalData.website.startsWith("http://") && !additionalData.website.startsWith("https://") ? `https://${additionalData.website}` : additionalData?.website,
|
|
780
|
+
amount: additionalData?.amount
|
|
727
781
|
};
|
|
728
782
|
default:
|
|
729
783
|
return { adyenProcessedFunds: true };
|
|
@@ -731,16 +785,16 @@ const getSourceOfFundsPayload = (sofType, additionalData) => {
|
|
|
731
785
|
};
|
|
732
786
|
const parseSofOriginatorPayload = (additionalData) => {
|
|
733
787
|
let sofOriginator;
|
|
734
|
-
if (
|
|
788
|
+
if (additionalData?.originatorType === "individual") {
|
|
735
789
|
sofOriginator = {
|
|
736
790
|
type: LegalEntityType.INDIVIDUAL,
|
|
737
791
|
individual: {
|
|
738
792
|
name: {
|
|
739
|
-
firstName:
|
|
740
|
-
lastName:
|
|
793
|
+
firstName: additionalData?.firstName ?? "",
|
|
794
|
+
lastName: additionalData?.lastName ?? ""
|
|
741
795
|
},
|
|
742
796
|
residentialAddress: {
|
|
743
|
-
country: additionalData
|
|
797
|
+
country: additionalData?.country
|
|
744
798
|
}
|
|
745
799
|
}
|
|
746
800
|
};
|
|
@@ -748,9 +802,9 @@ const parseSofOriginatorPayload = (additionalData) => {
|
|
|
748
802
|
sofOriginator = {
|
|
749
803
|
type: LegalEntityType.ORGANIZATION,
|
|
750
804
|
organization: {
|
|
751
|
-
legalName:
|
|
805
|
+
legalName: additionalData?.legalName ?? "",
|
|
752
806
|
registeredAddress: {
|
|
753
|
-
country: additionalData
|
|
807
|
+
country: additionalData?.country
|
|
754
808
|
}
|
|
755
809
|
}
|
|
756
810
|
};
|
|
@@ -769,25 +823,20 @@ const formatDateForInput = (isoDateString) => {
|
|
|
769
823
|
return "";
|
|
770
824
|
}
|
|
771
825
|
};
|
|
772
|
-
const getSofCardDetails = (i18n,
|
|
773
|
-
if (!
|
|
826
|
+
const getSofCardDetails = (i18n, sourceOfFunds2) => {
|
|
827
|
+
if (!sourceOfFunds2) {
|
|
774
828
|
return "";
|
|
775
829
|
}
|
|
776
|
-
if (
|
|
830
|
+
if (sourceOfFunds2?.adyenProcessedFunds) {
|
|
777
831
|
return i18n.get("sofTypeAdyenLabel");
|
|
778
832
|
}
|
|
779
|
-
if (
|
|
780
|
-
return i18n.get(`sofType${toCapitalized(
|
|
833
|
+
if (sourceOfFunds2?.type) {
|
|
834
|
+
return i18n.get(`sofType${toCapitalized(sourceOfFunds2?.type)}Label`);
|
|
781
835
|
}
|
|
782
836
|
return "";
|
|
783
837
|
};
|
|
784
838
|
const ALLOWED_SOF_SERVICES = ["issuing", "banking"];
|
|
785
839
|
const SOF_INVALID_INPUT_ERROR_CODES = ["1_93", "1_94"];
|
|
786
|
-
const SOF_INVALID_INPUT_SUBERROR_CODES = ["1_9009", "1_9010", "1_9011", "1_9012"];
|
|
787
|
-
[
|
|
788
|
-
...SOF_INVALID_INPUT_ERROR_CODES,
|
|
789
|
-
...SOF_INVALID_INPUT_SUBERROR_CODES
|
|
790
|
-
];
|
|
791
840
|
const getRelevantErrors = (problems, targetCodes) => {
|
|
792
841
|
if (!problems) return false;
|
|
793
842
|
return problems.flatMap(
|
|
@@ -797,10 +846,9 @@ const getRelevantErrors = (problems, targetCodes) => {
|
|
|
797
846
|
);
|
|
798
847
|
};
|
|
799
848
|
const getUniqueRemediationActions = (error) => {
|
|
800
|
-
var _a;
|
|
801
849
|
const allActions = [
|
|
802
850
|
...error.remediatingActions || [],
|
|
803
|
-
...
|
|
851
|
+
...error.subErrors?.flatMap((sub) => sub.remediatingActions || []) || []
|
|
804
852
|
];
|
|
805
853
|
return allActions.filter((action, i, arr) => arr.findIndex((a) => a.code === action.code) === i);
|
|
806
854
|
};
|
|
@@ -821,48 +869,45 @@ function AdditionalDataForAssetSale(props) {
|
|
|
821
869
|
name: "amount",
|
|
822
870
|
label: formUtils.getLabel("amount", "saleAmount"),
|
|
823
871
|
errorMessage: formUtils.getErrorMessage("amount", errors, fieldProblems),
|
|
824
|
-
children: (childProps) =>
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
}
|
|
864
|
-
);
|
|
865
|
-
}
|
|
872
|
+
children: (childProps) => /* @__PURE__ */ jsxs(
|
|
873
|
+
InputGroup,
|
|
874
|
+
{
|
|
875
|
+
...childProps,
|
|
876
|
+
id: "currencyGroup",
|
|
877
|
+
isFocused,
|
|
878
|
+
isInvalid: Boolean(!valid.amount && errors.amount),
|
|
879
|
+
children: [
|
|
880
|
+
/* @__PURE__ */ jsx(
|
|
881
|
+
Select,
|
|
882
|
+
{
|
|
883
|
+
name: "currency",
|
|
884
|
+
"aria-label": i18n.get("currency"),
|
|
885
|
+
isMulti: false,
|
|
886
|
+
items: allowedCurrencies,
|
|
887
|
+
selected: data.amount?.currency,
|
|
888
|
+
placeholder: i18n.get("select"),
|
|
889
|
+
onChange: handleAmountChange("currency"),
|
|
890
|
+
minimal: true
|
|
891
|
+
}
|
|
892
|
+
),
|
|
893
|
+
/* @__PURE__ */ jsx(
|
|
894
|
+
InputText,
|
|
895
|
+
{
|
|
896
|
+
...childProps,
|
|
897
|
+
name: "amount",
|
|
898
|
+
value: data.amount?.value,
|
|
899
|
+
readonly: formUtils.isReadOnly("amount"),
|
|
900
|
+
onInput: handleAmountChange("amount"),
|
|
901
|
+
onBlur: handleOnAmountBlur,
|
|
902
|
+
"aria-required": true,
|
|
903
|
+
"aria-invalid": !valid.amount,
|
|
904
|
+
isValid: valid.amount,
|
|
905
|
+
onFocusHandler: () => setIsFocused(true)
|
|
906
|
+
}
|
|
907
|
+
)
|
|
908
|
+
]
|
|
909
|
+
}
|
|
910
|
+
)
|
|
866
911
|
}
|
|
867
912
|
),
|
|
868
913
|
/* @__PURE__ */ jsx(
|
|
@@ -929,48 +974,45 @@ function AdditionalDataForBusiness(props) {
|
|
|
929
974
|
errorMessage: formUtils.getErrorMessage("amount", errors, fieldProblems),
|
|
930
975
|
helper: i18n.get("useFiguresFromTheMostRecentYearAvailable"),
|
|
931
976
|
helperPosition: "below",
|
|
932
|
-
children: (childProps) =>
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
}
|
|
972
|
-
);
|
|
973
|
-
}
|
|
977
|
+
children: (childProps) => /* @__PURE__ */ jsxs(
|
|
978
|
+
InputGroup,
|
|
979
|
+
{
|
|
980
|
+
...childProps,
|
|
981
|
+
id: "currencyGroup",
|
|
982
|
+
isFocused,
|
|
983
|
+
isInvalid: Boolean(!valid.amount && errors.amount),
|
|
984
|
+
children: [
|
|
985
|
+
/* @__PURE__ */ jsx(
|
|
986
|
+
Select,
|
|
987
|
+
{
|
|
988
|
+
name: "currency",
|
|
989
|
+
"aria-label": i18n.get("currency"),
|
|
990
|
+
isMulti: false,
|
|
991
|
+
items: allowedCurrencies,
|
|
992
|
+
selected: data.amount?.currency,
|
|
993
|
+
placeholder: i18n.get("select"),
|
|
994
|
+
onChange: handleAmountChange("currency"),
|
|
995
|
+
minimal: true
|
|
996
|
+
}
|
|
997
|
+
),
|
|
998
|
+
/* @__PURE__ */ jsx(
|
|
999
|
+
InputText,
|
|
1000
|
+
{
|
|
1001
|
+
...childProps,
|
|
1002
|
+
name: "amount",
|
|
1003
|
+
value: data.amount?.value,
|
|
1004
|
+
readonly: formUtils.isReadOnly("amount"),
|
|
1005
|
+
onInput: handleAmountChange("amount"),
|
|
1006
|
+
onBlur: handleOnAmountBlur,
|
|
1007
|
+
"aria-required": true,
|
|
1008
|
+
"aria-invalid": !valid.amount,
|
|
1009
|
+
isValid: valid.amount,
|
|
1010
|
+
onFocusHandler: () => setIsFocused(true)
|
|
1011
|
+
}
|
|
1012
|
+
)
|
|
1013
|
+
]
|
|
1014
|
+
}
|
|
1015
|
+
)
|
|
974
1016
|
}
|
|
975
1017
|
),
|
|
976
1018
|
/* @__PURE__ */ jsx(
|
|
@@ -1066,7 +1108,7 @@ function AdditionalDataOriginatorLegalEntity(props) {
|
|
|
1066
1108
|
)
|
|
1067
1109
|
}
|
|
1068
1110
|
),
|
|
1069
|
-
|
|
1111
|
+
data?.originatorType === "organization" && /* @__PURE__ */ jsx(
|
|
1070
1112
|
Field,
|
|
1071
1113
|
{
|
|
1072
1114
|
name: "legalName",
|
|
@@ -1089,7 +1131,7 @@ function AdditionalDataOriginatorLegalEntity(props) {
|
|
|
1089
1131
|
)
|
|
1090
1132
|
}
|
|
1091
1133
|
),
|
|
1092
|
-
|
|
1134
|
+
data?.originatorType === "individual" && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1093
1135
|
/* @__PURE__ */ jsx(
|
|
1094
1136
|
Field,
|
|
1095
1137
|
{
|
|
@@ -1143,14 +1185,14 @@ function AdditionalDataOriginatorLegalEntity(props) {
|
|
|
1143
1185
|
}
|
|
1144
1186
|
)
|
|
1145
1187
|
] }),
|
|
1146
|
-
|
|
1188
|
+
data?.originatorType && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1147
1189
|
/* @__PURE__ */ jsx(
|
|
1148
1190
|
Field,
|
|
1149
1191
|
{
|
|
1150
1192
|
name: "relationship",
|
|
1151
1193
|
label: formUtils.getLabel(
|
|
1152
1194
|
"relationship",
|
|
1153
|
-
isDonations &&
|
|
1195
|
+
isDonations && data?.originatorType === "individual" ? "yourRelationshipToDonor" : data?.originatorType === "organization" ? "yourRelationshipToOrganization" : "yourRelationshipToDecedent"
|
|
1154
1196
|
),
|
|
1155
1197
|
errorMessage: formUtils.getErrorMessage("relationship", errors, fieldProblems),
|
|
1156
1198
|
isValid: valid.relationship,
|
|
@@ -1180,7 +1222,7 @@ function AdditionalDataOriginatorLegalEntity(props) {
|
|
|
1180
1222
|
},
|
|
1181
1223
|
labels: {
|
|
1182
1224
|
country: i18n.get(
|
|
1183
|
-
isDonations &&
|
|
1225
|
+
isDonations && data?.originatorType === "individual" ? "donorsCountryOfResidence" : data?.originatorType === "organization" ? "organizationsCountryOfOperation" : "decedentsCountryOfDeath"
|
|
1184
1226
|
)
|
|
1185
1227
|
},
|
|
1186
1228
|
readonly: formUtils.isReadOnly("country"),
|
|
@@ -1274,48 +1316,45 @@ function AdditionalDataForGambling(props) {
|
|
|
1274
1316
|
name: "amount",
|
|
1275
1317
|
label: formUtils.getLabel("amount", "totalAmountWon"),
|
|
1276
1318
|
errorMessage: formUtils.getErrorMessage("amount", errors, fieldProblems),
|
|
1277
|
-
children: (childProps) =>
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
}
|
|
1317
|
-
);
|
|
1318
|
-
}
|
|
1319
|
+
children: (childProps) => /* @__PURE__ */ jsxs(
|
|
1320
|
+
InputGroup,
|
|
1321
|
+
{
|
|
1322
|
+
...childProps,
|
|
1323
|
+
id: "currencyGroup",
|
|
1324
|
+
isFocused: focusedInput === "amount",
|
|
1325
|
+
isInvalid: Boolean(!valid.amount && errors.amount),
|
|
1326
|
+
children: [
|
|
1327
|
+
/* @__PURE__ */ jsx(
|
|
1328
|
+
Select,
|
|
1329
|
+
{
|
|
1330
|
+
name: "currency",
|
|
1331
|
+
"aria-label": i18n.get("currency"),
|
|
1332
|
+
isMulti: false,
|
|
1333
|
+
items: allowedCurrencies,
|
|
1334
|
+
selected: data.amount?.currency,
|
|
1335
|
+
placeholder: i18n.get("select"),
|
|
1336
|
+
onChange: handleAmountChange("currency"),
|
|
1337
|
+
minimal: true
|
|
1338
|
+
}
|
|
1339
|
+
),
|
|
1340
|
+
/* @__PURE__ */ jsx(
|
|
1341
|
+
InputText,
|
|
1342
|
+
{
|
|
1343
|
+
...childProps,
|
|
1344
|
+
name: "amount",
|
|
1345
|
+
value: data.amount?.value,
|
|
1346
|
+
readonly: formUtils.isReadOnly("amount"),
|
|
1347
|
+
onInput: handleAmountChange("amount"),
|
|
1348
|
+
onBlur: handleOnAmountBlur,
|
|
1349
|
+
"aria-required": true,
|
|
1350
|
+
"aria-invalid": !valid.amount,
|
|
1351
|
+
isValid: valid.amount,
|
|
1352
|
+
onFocusHandler: () => setFocusedInput("amount")
|
|
1353
|
+
}
|
|
1354
|
+
)
|
|
1355
|
+
]
|
|
1356
|
+
}
|
|
1357
|
+
)
|
|
1319
1358
|
}
|
|
1320
1359
|
),
|
|
1321
1360
|
/* @__PURE__ */ jsx(
|
|
@@ -1406,48 +1445,45 @@ function AdditionalDataForInheritance(props) {
|
|
|
1406
1445
|
name: "amount",
|
|
1407
1446
|
label: formUtils.getLabel("amount", "inheritanceAmount"),
|
|
1408
1447
|
errorMessage: formUtils.getErrorMessage("amount", errors, fieldProblems),
|
|
1409
|
-
children: (childProps) =>
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
}
|
|
1449
|
-
);
|
|
1450
|
-
}
|
|
1448
|
+
children: (childProps) => /* @__PURE__ */ jsxs(
|
|
1449
|
+
InputGroup,
|
|
1450
|
+
{
|
|
1451
|
+
...childProps,
|
|
1452
|
+
id: "currencyGroup",
|
|
1453
|
+
isFocused,
|
|
1454
|
+
isInvalid: Boolean(!valid.amount && errors.amount),
|
|
1455
|
+
children: [
|
|
1456
|
+
/* @__PURE__ */ jsx(
|
|
1457
|
+
Select,
|
|
1458
|
+
{
|
|
1459
|
+
name: "currency",
|
|
1460
|
+
"aria-label": i18n.get("currency"),
|
|
1461
|
+
isMulti: false,
|
|
1462
|
+
items: allowedCurrencies ?? [],
|
|
1463
|
+
selected: data.amount?.currency,
|
|
1464
|
+
placeholder: i18n.get("select"),
|
|
1465
|
+
onChange: handleAmountChange("currency"),
|
|
1466
|
+
minimal: true
|
|
1467
|
+
}
|
|
1468
|
+
),
|
|
1469
|
+
/* @__PURE__ */ jsx(
|
|
1470
|
+
InputText,
|
|
1471
|
+
{
|
|
1472
|
+
...childProps,
|
|
1473
|
+
name: "amount",
|
|
1474
|
+
value: data.amount?.value,
|
|
1475
|
+
readonly: formUtils.isReadOnly("amount"),
|
|
1476
|
+
onInput: handleAmountChange("amount"),
|
|
1477
|
+
onBlur: handleOnAmountBlur,
|
|
1478
|
+
"aria-required": true,
|
|
1479
|
+
"aria-invalid": !valid.amount,
|
|
1480
|
+
isValid: valid.amount,
|
|
1481
|
+
onFocusHandler: () => setIsFocused(true)
|
|
1482
|
+
}
|
|
1483
|
+
)
|
|
1484
|
+
]
|
|
1485
|
+
}
|
|
1486
|
+
)
|
|
1451
1487
|
}
|
|
1452
1488
|
),
|
|
1453
1489
|
/* @__PURE__ */ jsx(
|
|
@@ -1462,7 +1498,7 @@ function AdditionalDataForInheritance(props) {
|
|
|
1462
1498
|
{
|
|
1463
1499
|
...childProps,
|
|
1464
1500
|
name: "dateOfFundsReceived",
|
|
1465
|
-
value: data.dateOfFundsReceived,
|
|
1501
|
+
value: formatDateForInput(data.dateOfFundsReceived),
|
|
1466
1502
|
onInput: handleChangeFor("dateOfFundsReceived", "input"),
|
|
1467
1503
|
onBlur: handleChangeFor("dateOfFundsReceived", "blur"),
|
|
1468
1504
|
"aria-required": true,
|
|
@@ -1484,17 +1520,16 @@ const SOFFinancierModal = (props) => {
|
|
|
1484
1520
|
const [isFocused, setIsFocused] = useState(false);
|
|
1485
1521
|
const [errorMessage, setErrorMessage] = useState("");
|
|
1486
1522
|
const handleInputUpdate = (key, e) => {
|
|
1487
|
-
var _a, _b;
|
|
1488
1523
|
const inputEl = e.target;
|
|
1489
1524
|
setErrorMessage("");
|
|
1490
|
-
const value = inputEl
|
|
1525
|
+
const value = inputEl?.value;
|
|
1491
1526
|
let inputData = {
|
|
1492
1527
|
[key]: value
|
|
1493
1528
|
};
|
|
1494
1529
|
if (["amount", "currency"].includes(key)) {
|
|
1495
1530
|
const amountValue = {
|
|
1496
|
-
currency: key === "currency" ? value :
|
|
1497
|
-
value: key === "currency" ?
|
|
1531
|
+
currency: key === "currency" ? value : formData?.amount?.currency,
|
|
1532
|
+
value: key === "currency" ? formData?.amount?.value : value
|
|
1498
1533
|
};
|
|
1499
1534
|
inputData = { amount: amountValue };
|
|
1500
1535
|
}
|
|
@@ -1507,19 +1542,17 @@ const SOFFinancierModal = (props) => {
|
|
|
1507
1542
|
setFormErrors(errors);
|
|
1508
1543
|
};
|
|
1509
1544
|
const handleOnAmountBlur = () => {
|
|
1510
|
-
var _a;
|
|
1511
1545
|
setIsFocused(false);
|
|
1512
1546
|
const errors = getInputErrors({
|
|
1513
1547
|
formErrors,
|
|
1514
1548
|
data: formData,
|
|
1515
1549
|
key: "amount",
|
|
1516
|
-
value:
|
|
1550
|
+
value: formData?.amount?.value
|
|
1517
1551
|
});
|
|
1518
1552
|
setFormErrors(errors);
|
|
1519
1553
|
};
|
|
1520
1554
|
const allFieldsFilled = (data) => {
|
|
1521
|
-
|
|
1522
|
-
return (data == null ? void 0 : data.firstName) && (data == null ? void 0 : data.lastName) && (data == null ? void 0 : data.location) && ((_a = data == null ? void 0 : data.amount) == null ? void 0 : _a.currency) && !Number.isNaN(Number((_b = data == null ? void 0 : data.amount) == null ? void 0 : _b.value));
|
|
1555
|
+
return data?.firstName && data?.lastName && data?.location && data?.amount?.currency && !Number.isNaN(Number(data?.amount?.value));
|
|
1523
1556
|
};
|
|
1524
1557
|
const handleFinancierSave = () => {
|
|
1525
1558
|
if (formData && allFieldsFilled(formData)) {
|
|
@@ -1533,8 +1566,7 @@ const SOFFinancierModal = (props) => {
|
|
|
1533
1566
|
"amount"
|
|
1534
1567
|
];
|
|
1535
1568
|
const errors = fields.reduce((acc, key) => {
|
|
1536
|
-
|
|
1537
|
-
const value = key === "amount" ? (_a = formData == null ? void 0 : formData.amount) == null ? void 0 : _a.value : formData == null ? void 0 : formData[key];
|
|
1569
|
+
const value = key === "amount" ? formData?.amount?.value : formData?.[key];
|
|
1538
1570
|
return {
|
|
1539
1571
|
...acc,
|
|
1540
1572
|
...getInputErrors({
|
|
@@ -1587,7 +1619,7 @@ const SOFFinancierModal = (props) => {
|
|
|
1587
1619
|
{
|
|
1588
1620
|
...childProps,
|
|
1589
1621
|
name: "firstName",
|
|
1590
|
-
value: formData
|
|
1622
|
+
value: formData?.firstName,
|
|
1591
1623
|
onInput: (e) => handleInputUpdate("firstName", e),
|
|
1592
1624
|
onBlur: (e) => handleInputUpdate("firstName", e),
|
|
1593
1625
|
"aria-required": true,
|
|
@@ -1609,7 +1641,7 @@ const SOFFinancierModal = (props) => {
|
|
|
1609
1641
|
{
|
|
1610
1642
|
...childProps,
|
|
1611
1643
|
name: "lastName",
|
|
1612
|
-
value: formData
|
|
1644
|
+
value: formData?.lastName,
|
|
1613
1645
|
onInput: (e) => handleInputUpdate("lastName", e),
|
|
1614
1646
|
onBlur: (e) => handleInputUpdate("lastName", e),
|
|
1615
1647
|
"aria-required": true,
|
|
@@ -1635,7 +1667,7 @@ const SOFFinancierModal = (props) => {
|
|
|
1635
1667
|
{
|
|
1636
1668
|
...childProps,
|
|
1637
1669
|
name: "location",
|
|
1638
|
-
value: formData
|
|
1670
|
+
value: formData?.location,
|
|
1639
1671
|
onInput: (e) => handleInputUpdate("location", e),
|
|
1640
1672
|
onBlur: (e) => handleInputUpdate("location", e),
|
|
1641
1673
|
"aria-required": true,
|
|
@@ -1653,36 +1685,33 @@ const SOFFinancierModal = (props) => {
|
|
|
1653
1685
|
label: i18n.get("investmentAmount"),
|
|
1654
1686
|
errorMessage: formErrors.amount,
|
|
1655
1687
|
isValid: !formErrors.amount,
|
|
1656
|
-
children: (childProps) => {
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
)
|
|
1684
|
-
] });
|
|
1685
|
-
}
|
|
1688
|
+
children: (childProps) => /* @__PURE__ */ jsxs(InputGroup, { ...childProps, id: "currencyGroup", isFocused, children: [
|
|
1689
|
+
/* @__PURE__ */ jsx(
|
|
1690
|
+
Select,
|
|
1691
|
+
{
|
|
1692
|
+
minimal: true,
|
|
1693
|
+
name: "currency",
|
|
1694
|
+
"aria-label": i18n.get("currency"),
|
|
1695
|
+
isMulti: false,
|
|
1696
|
+
items: allowedCurrencies,
|
|
1697
|
+
selected: formData?.amount?.currency,
|
|
1698
|
+
placeholder: i18n.get("select"),
|
|
1699
|
+
onChange: (e) => handleInputUpdate("currency", e)
|
|
1700
|
+
}
|
|
1701
|
+
),
|
|
1702
|
+
/* @__PURE__ */ jsx(
|
|
1703
|
+
InputText,
|
|
1704
|
+
{
|
|
1705
|
+
...childProps,
|
|
1706
|
+
name: "amount",
|
|
1707
|
+
value: formData?.amount?.value,
|
|
1708
|
+
onInput: (e) => handleInputUpdate("amount", e),
|
|
1709
|
+
onBlur: handleOnAmountBlur,
|
|
1710
|
+
"aria-required": true,
|
|
1711
|
+
onFocusHandler: () => setIsFocused(true)
|
|
1712
|
+
}
|
|
1713
|
+
)
|
|
1714
|
+
] })
|
|
1686
1715
|
}
|
|
1687
1716
|
)
|
|
1688
1717
|
] }),
|
|
@@ -1704,7 +1733,6 @@ const SOFFinancierModal = (props) => {
|
|
|
1704
1733
|
] });
|
|
1705
1734
|
};
|
|
1706
1735
|
function AdditionalDataForThirdParty(props) {
|
|
1707
|
-
var _a;
|
|
1708
1736
|
const [showFinancierModal, setShowFinancierModal] = useState(false);
|
|
1709
1737
|
const [activeFinancier, setActiveFinancier] = useState();
|
|
1710
1738
|
const [activeIndex, setActiveIndex] = useState();
|
|
@@ -1762,35 +1790,32 @@ function AdditionalDataForThirdParty(props) {
|
|
|
1762
1790
|
children: i18n.get("addAtLeastOneInvestor")
|
|
1763
1791
|
}
|
|
1764
1792
|
),
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
"button",
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
className: styles.
|
|
1773
|
-
|
|
1774
|
-
/* @__PURE__ */ jsxs("div", { className: styles.
|
|
1775
|
-
/* @__PURE__ */
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
index
|
|
1792
|
-
);
|
|
1793
|
-
}),
|
|
1793
|
+
data.financiers?.map((financier, index) => /* @__PURE__ */ jsxs(
|
|
1794
|
+
"button",
|
|
1795
|
+
{
|
|
1796
|
+
type: "button",
|
|
1797
|
+
onClick: () => handleShowUpdateFinancierModal(index),
|
|
1798
|
+
className: styles.sourceOfFundsThirdPartyFundingFinancierGroup,
|
|
1799
|
+
children: [
|
|
1800
|
+
/* @__PURE__ */ jsxs("div", { className: styles.sourceOfFundsThirdPartyFundingNameAvatarGroup, children: [
|
|
1801
|
+
/* @__PURE__ */ jsx(Avatar, { iconName: "user", circle: true }),
|
|
1802
|
+
/* @__PURE__ */ jsxs("div", { className: styles.sourceOfFundsThirdPartyFundingNameAddressGroup, children: [
|
|
1803
|
+
/* @__PURE__ */ jsxs(Typography, { el: "div", variant: "body-strongest", children: [
|
|
1804
|
+
financier.firstName,
|
|
1805
|
+
" ",
|
|
1806
|
+
financier.lastName
|
|
1807
|
+
] }),
|
|
1808
|
+
/* @__PURE__ */ jsx(Typography, { el: "div", variant: "caption", children: financier.location })
|
|
1809
|
+
] })
|
|
1810
|
+
] }),
|
|
1811
|
+
/* @__PURE__ */ jsx("div", { children: financier.amount?.currency && financier.amount?.value ? formatAmountWithCurrency(
|
|
1812
|
+
financier.amount.value,
|
|
1813
|
+
financier.amount?.currency
|
|
1814
|
+
) : "" })
|
|
1815
|
+
]
|
|
1816
|
+
},
|
|
1817
|
+
index
|
|
1818
|
+
)),
|
|
1794
1819
|
/* @__PURE__ */ jsx(
|
|
1795
1820
|
"button",
|
|
1796
1821
|
{
|
|
@@ -1814,6 +1839,17 @@ function AdditionalDataForThirdParty(props) {
|
|
|
1814
1839
|
)
|
|
1815
1840
|
] });
|
|
1816
1841
|
}
|
|
1842
|
+
function canParseUrl(url) {
|
|
1843
|
+
if (URL.canParse) {
|
|
1844
|
+
return URL.canParse(url);
|
|
1845
|
+
}
|
|
1846
|
+
try {
|
|
1847
|
+
new URL(url);
|
|
1848
|
+
return true;
|
|
1849
|
+
} catch {
|
|
1850
|
+
return false;
|
|
1851
|
+
}
|
|
1852
|
+
}
|
|
1817
1853
|
const sourceOfFundsTypeValidations = {
|
|
1818
1854
|
type: {
|
|
1819
1855
|
modes: ["blur"],
|
|
@@ -1835,24 +1871,26 @@ const sourceOfFundsAdditionalDataValidations = {
|
|
|
1835
1871
|
},
|
|
1836
1872
|
{
|
|
1837
1873
|
modes: ["blur"],
|
|
1838
|
-
validate: (website) => website ?
|
|
1874
|
+
validate: (website) => website ? canParseUrl(
|
|
1875
|
+
website?.startsWith("http:") || website?.startsWith("https:") ? website : `https://${website}`
|
|
1876
|
+
) : false,
|
|
1839
1877
|
errorMessage: "validationPleaseEnterAValidUrl"
|
|
1840
1878
|
}
|
|
1841
1879
|
],
|
|
1842
1880
|
amount: [
|
|
1843
1881
|
{
|
|
1844
1882
|
modes: ["blur"],
|
|
1845
|
-
validate: (amount) => !isEmpty(amount
|
|
1883
|
+
validate: (amount) => !isEmpty(amount?.currency),
|
|
1846
1884
|
errorMessage: "currencyIsRequired"
|
|
1847
1885
|
},
|
|
1848
1886
|
{
|
|
1849
1887
|
modes: ["blur"],
|
|
1850
|
-
validate: (amount) => !isEmpty(amount
|
|
1888
|
+
validate: (amount) => !isEmpty(amount?.value),
|
|
1851
1889
|
errorMessage: "amountIsRequired"
|
|
1852
1890
|
},
|
|
1853
1891
|
{
|
|
1854
1892
|
modes: ["blur"],
|
|
1855
|
-
validate: (amount) => !Number.isNaN(Number(amount
|
|
1893
|
+
validate: (amount) => !Number.isNaN(Number(amount?.value)),
|
|
1856
1894
|
errorMessage: "pleaseEnterAValidAmount"
|
|
1857
1895
|
}
|
|
1858
1896
|
],
|
|
@@ -1937,8 +1975,8 @@ function SourceOfFundsAdditionalData(props) {
|
|
|
1937
1975
|
sourceOfFundsType
|
|
1938
1976
|
} = props;
|
|
1939
1977
|
const getFormSchema = useMemo(
|
|
1940
|
-
() => getAdditionalDataSchemaKeys(sourceOfFundsType, defaultData
|
|
1941
|
-
[sourceOfFundsType, defaultData
|
|
1978
|
+
() => getAdditionalDataSchemaKeys(sourceOfFundsType, defaultData?.originatorType),
|
|
1979
|
+
[sourceOfFundsType, defaultData?.originatorType]
|
|
1942
1980
|
);
|
|
1943
1981
|
const [schema, setSchema] = useState(getFormSchema);
|
|
1944
1982
|
const {
|
|
@@ -1957,14 +1995,13 @@ function SourceOfFundsAdditionalData(props) {
|
|
|
1957
1995
|
shouldValidate
|
|
1958
1996
|
});
|
|
1959
1997
|
useEffect(() => {
|
|
1960
|
-
setSchema(getAdditionalDataSchemaKeys(sourceOfFundsType, formData
|
|
1998
|
+
setSchema(getAdditionalDataSchemaKeys(sourceOfFundsType, formData?.originatorType));
|
|
1961
1999
|
}, [formData.originatorType]);
|
|
1962
2000
|
const handleAmountChange = (key) => (e) => {
|
|
1963
|
-
var _a, _b;
|
|
1964
2001
|
const isCurrencyKey = key === "currency";
|
|
1965
2002
|
const amountValue = {
|
|
1966
|
-
currency: isCurrencyKey ? e.target.value :
|
|
1967
|
-
value: isCurrencyKey ?
|
|
2003
|
+
currency: isCurrencyKey ? e.target.value : formData.amount?.currency,
|
|
2004
|
+
value: isCurrencyKey ? formData.amount?.value : e.target.value
|
|
1968
2005
|
};
|
|
1969
2006
|
const fieldEvent = {
|
|
1970
2007
|
target: {
|
|
@@ -2087,7 +2124,7 @@ function SourceOfFundsAdditionalData(props) {
|
|
|
2087
2124
|
ErrorPanel,
|
|
2088
2125
|
{
|
|
2089
2126
|
verificationErrors: formVerificationErrors,
|
|
2090
|
-
validationErrors: props
|
|
2127
|
+
validationErrors: props?.fieldValidationErrors,
|
|
2091
2128
|
formUtils,
|
|
2092
2129
|
id: "ariaErrorField"
|
|
2093
2130
|
}
|
|
@@ -2137,11 +2174,11 @@ function SourceOfFundsType(props) {
|
|
|
2137
2174
|
label: i18n.get("sofTypeAdyenLabel"),
|
|
2138
2175
|
icon: getIconById("adyen")
|
|
2139
2176
|
},
|
|
2140
|
-
...
|
|
2177
|
+
...categories?.map((item) => ({
|
|
2141
2178
|
value: item.id,
|
|
2142
2179
|
label: i18n.get(`sofType${toCapitalized(item.name)}Label`),
|
|
2143
2180
|
icon: getIconById(item.id)
|
|
2144
|
-
}))
|
|
2181
|
+
})) ?? []
|
|
2145
2182
|
];
|
|
2146
2183
|
const errorMessage = formUtils.getErrorMessage("type", formErrors, formFieldProblems);
|
|
2147
2184
|
return /* @__PURE__ */ jsx(Field, { el: "fieldset", name: "type", children: () => /* @__PURE__ */ jsx(
|
|
@@ -2150,7 +2187,7 @@ function SourceOfFundsType(props) {
|
|
|
2150
2187
|
name: "type",
|
|
2151
2188
|
tiles: categoryItems,
|
|
2152
2189
|
errorMessage: typeof errorMessage !== "boolean" ? i18n.get(errorMessage) : errorMessage,
|
|
2153
|
-
selected:
|
|
2190
|
+
selected: formData?.type ? formData.type : [],
|
|
2154
2191
|
onChange: handleChangeFor("type", "input")
|
|
2155
2192
|
}
|
|
2156
2193
|
) });
|
|
@@ -2197,7 +2234,7 @@ function SourceOfFunds(props) {
|
|
|
2197
2234
|
const { i18n } = useI18nContext();
|
|
2198
2235
|
const { activeForm, activeBusinessLine, sourceOfFundsType } = props;
|
|
2199
2236
|
const { data: sourceOfFundsTypesData, isLoading } = useSourceOfFundsTypes();
|
|
2200
|
-
const formWrapperClasses = (formId) =>
|
|
2237
|
+
const formWrapperClasses = (formId) => activeForm?.formId !== formId ? "adyen-kyc-form-wrapper adyen-kyc-form-wrapper--hidden" : "adyen-kyc-form-wrapper";
|
|
2201
2238
|
const pageHeadings = useMemo(
|
|
2202
2239
|
() => getPageHeadings(sourceOfFundsType ?? "adyen"),
|
|
2203
2240
|
[sourceOfFundsType]
|
|
@@ -2205,19 +2242,19 @@ function SourceOfFunds(props) {
|
|
|
2205
2242
|
return isLoading || !activeBusinessLine ? /* @__PURE__ */ jsx("div", { className: styles.sourceOfFundsWrapperLoading, children: /* @__PURE__ */ jsx(Loader, {}) }) : /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-form-wrapper", children: [
|
|
2206
2243
|
/* @__PURE__ */ jsxs("div", { className: styles.sourceOfFundsWrapperHeading, children: [
|
|
2207
2244
|
/* @__PURE__ */ jsx(Typography, { el: "h1", variant: "title-l", children: i18n.get(
|
|
2208
|
-
|
|
2245
|
+
activeForm?.formId === "additionalData" ? pageHeadings.heading : {
|
|
2209
2246
|
key: "selectASourceOfFunding",
|
|
2210
2247
|
values: {
|
|
2211
|
-
type:
|
|
2248
|
+
type: getServiceTranslationSelectTitle(
|
|
2212
2249
|
i18n,
|
|
2213
|
-
|
|
2250
|
+
activeBusinessLine?.service || ""
|
|
2214
2251
|
).toLowerCase()
|
|
2215
2252
|
}
|
|
2216
2253
|
}
|
|
2217
2254
|
) }),
|
|
2218
2255
|
/* @__PURE__ */ jsxs(Typography, { className: styles.sourceOfFundsWrapperDescription, children: [
|
|
2219
|
-
|
|
2220
|
-
|
|
2256
|
+
activeForm?.formId === "additionalData" && pageHeadings.description && i18n.get(pageHeadings.description),
|
|
2257
|
+
sourceOfFundsTypesData?.length === 0 && i18n.get("noCategoriesAvailable")
|
|
2221
2258
|
] })
|
|
2222
2259
|
] }),
|
|
2223
2260
|
sofErrorMessage.value && /* @__PURE__ */ jsxs(
|
|
@@ -2234,21 +2271,21 @@ function SourceOfFunds(props) {
|
|
|
2234
2271
|
]
|
|
2235
2272
|
}
|
|
2236
2273
|
),
|
|
2237
|
-
|
|
2274
|
+
activeForm?.formId === "sourceOfFundsType" && /* @__PURE__ */ jsx("div", { className: formWrapperClasses("sourceOfFundsType"), children: /* @__PURE__ */ jsx(
|
|
2238
2275
|
SourceOfFundsType,
|
|
2239
2276
|
{
|
|
2240
2277
|
categories: sourceOfFundsTypesData,
|
|
2241
2278
|
...getFormProps(props, sourceOfFundsForms.sourceOfFundsType.formId)
|
|
2242
2279
|
}
|
|
2243
2280
|
) }),
|
|
2244
|
-
|
|
2281
|
+
activeForm?.formId === "additionalData" && /* @__PURE__ */ jsx("div", { className: formWrapperClasses("additionalData"), children: /* @__PURE__ */ jsx(
|
|
2245
2282
|
SourceOfFundsAdditionalData,
|
|
2246
2283
|
{
|
|
2247
2284
|
...getFormProps(props, sourceOfFundsForms.additionalData.formId),
|
|
2248
2285
|
sourceOfFundsType
|
|
2249
2286
|
}
|
|
2250
2287
|
) }),
|
|
2251
|
-
|
|
2288
|
+
activeForm?.formId === "companySourceOfFunds" && /* @__PURE__ */ jsx("div", { className: formWrapperClasses("companySourceOfFunds"), children: /* @__PURE__ */ jsx("div", { children: i18n.get("uploadADocument") }) })
|
|
2252
2289
|
] });
|
|
2253
2290
|
}
|
|
2254
2291
|
function SourceOfFundsGettingStartedCard(props) {
|
|
@@ -2270,7 +2307,7 @@ function SourceOfFundsGettingStartedCard(props) {
|
|
|
2270
2307
|
children: i18n.get("start")
|
|
2271
2308
|
}
|
|
2272
2309
|
),
|
|
2273
|
-
children: isEdit &&
|
|
2310
|
+
children: isEdit && meta?.length && /* @__PURE__ */ jsx(
|
|
2274
2311
|
StructuredList,
|
|
2275
2312
|
{
|
|
2276
2313
|
className: styles.sourceOfFundsGettingStartedCardsCardDescription,
|
|
@@ -2291,64 +2328,55 @@ const SourceOfFundsGettingStarted = ({
|
|
|
2291
2328
|
legalEntity,
|
|
2292
2329
|
isSoFDocumentMissing
|
|
2293
2330
|
}) => {
|
|
2294
|
-
var _a, _b, _c;
|
|
2295
2331
|
const { i18n } = useI18nContext();
|
|
2296
|
-
const hasSourceOfFunds = businessLines
|
|
2332
|
+
const hasSourceOfFunds = businessLines?.some(
|
|
2297
2333
|
(businessLine) => !isEmpty$1(businessLine.sourceOfFunds)
|
|
2298
2334
|
);
|
|
2299
2335
|
const sofDocuments = useMemo(
|
|
2300
|
-
() =>
|
|
2301
|
-
var _a2;
|
|
2302
|
-
return ((_a2 = legalEntity == null ? void 0 : legalEntity.documentDetails) == null ? void 0 : _a2.filter((doc) => doc.type === "proofOfFundingOrWealthSource")) ?? [];
|
|
2303
|
-
},
|
|
2336
|
+
() => legalEntity?.documentDetails?.filter((doc) => doc.type === "proofOfFundingOrWealthSource") ?? [],
|
|
2304
2337
|
[legalEntity]
|
|
2305
2338
|
);
|
|
2306
2339
|
const mapBusinessLines = useCallback(
|
|
2307
2340
|
(lines) => {
|
|
2308
|
-
|
|
2309
|
-
const completedBusinessLines = businessLines.every((line) => {
|
|
2310
|
-
var _a3;
|
|
2311
|
-
return (_a3 = line == null ? void 0 : line.sourceOfFunds) == null ? void 0 : _a3.type;
|
|
2312
|
-
});
|
|
2341
|
+
const completedBusinessLines = businessLines.every((line) => line?.sourceOfFunds?.type);
|
|
2313
2342
|
const cards = lines.map((line) => {
|
|
2314
|
-
var _a3, _b2, _c2, _d, _e;
|
|
2315
2343
|
const SoF = mapSourceOfFundToSourceOfFundsSchema(line);
|
|
2316
2344
|
return {
|
|
2317
2345
|
title: getServiceTranslation(i18n, line.service || ""),
|
|
2318
|
-
type:
|
|
2319
|
-
isEdit: !!
|
|
2346
|
+
type: line?.sourceOfFunds?.type,
|
|
2347
|
+
isEdit: !!line?.sourceOfFunds?.type || !!line?.sourceOfFunds?.adyenProcessedFunds,
|
|
2320
2348
|
onClick: () => handleSourceOfFundsClick(SoF, line),
|
|
2321
2349
|
meta: [
|
|
2322
2350
|
{
|
|
2323
2351
|
term: i18n.get("sourceOfFunds"),
|
|
2324
|
-
details: getSofCardDetails(i18n, line
|
|
2352
|
+
details: getSofCardDetails(i18n, line?.sourceOfFunds)
|
|
2325
2353
|
},
|
|
2326
2354
|
...getGettingStartedCardDetails(
|
|
2327
2355
|
getAdditionalDataSchemaKeys(
|
|
2328
|
-
|
|
2329
|
-
|
|
2356
|
+
line?.sourceOfFunds?.type || "adyen",
|
|
2357
|
+
line?.sourceOfFunds?.originatorType
|
|
2330
2358
|
),
|
|
2331
2359
|
i18n,
|
|
2332
|
-
line
|
|
2360
|
+
line?.sourceOfFunds
|
|
2333
2361
|
)
|
|
2334
2362
|
]
|
|
2335
2363
|
};
|
|
2336
|
-
}).sort((a) =>
|
|
2364
|
+
}).sort((a) => a?.type ? 1 : -1);
|
|
2337
2365
|
const uploadCard = {
|
|
2338
2366
|
title: getServiceTranslation(i18n),
|
|
2339
2367
|
type: "",
|
|
2340
|
-
isEdit: !!
|
|
2368
|
+
isEdit: !!sofDocuments?.length,
|
|
2341
2369
|
onClick: handleNavigateToUploadPage,
|
|
2342
|
-
meta:
|
|
2370
|
+
meta: sofDocuments?.length ? sofDocuments.map((doc) => ({
|
|
2343
2371
|
term: i18n.get("fileName"),
|
|
2344
2372
|
details: [
|
|
2345
|
-
doc
|
|
2346
|
-
/* @__PURE__ */ jsx(Typography, { color: "secondary", children: parseSOFDocumentDescription(i18n, doc
|
|
2373
|
+
doc?.fileName,
|
|
2374
|
+
/* @__PURE__ */ jsx(Typography, { color: "secondary", children: parseSOFDocumentDescription(i18n, doc?.description) || "" }, "docDescription")
|
|
2347
2375
|
]
|
|
2348
2376
|
})) : []
|
|
2349
2377
|
};
|
|
2350
|
-
if (completedBusinessLines && (isSoFDocumentMissing ||
|
|
2351
|
-
if (
|
|
2378
|
+
if (completedBusinessLines && (isSoFDocumentMissing || sofDocuments?.length)) {
|
|
2379
|
+
if (uploadCard.meta?.length) {
|
|
2352
2380
|
cards.push(uploadCard);
|
|
2353
2381
|
} else {
|
|
2354
2382
|
cards.unshift(uploadCard);
|
|
@@ -2381,27 +2409,61 @@ const SourceOfFundsGettingStarted = ({
|
|
|
2381
2409
|
"data-testid": "source-of-funds-getting-started",
|
|
2382
2410
|
children: [
|
|
2383
2411
|
!hasSourceOfFunds && /* @__PURE__ */ jsx(
|
|
2384
|
-
|
|
2412
|
+
LandingLayout,
|
|
2385
2413
|
{
|
|
2386
|
-
|
|
2387
|
-
|
|
2388
|
-
|
|
2389
|
-
|
|
2390
|
-
|
|
2391
|
-
|
|
2392
|
-
|
|
2393
|
-
|
|
2394
|
-
|
|
2395
|
-
|
|
2414
|
+
media: /* @__PURE__ */ jsx(
|
|
2415
|
+
Svg,
|
|
2416
|
+
{
|
|
2417
|
+
type: "image",
|
|
2418
|
+
testId: "source-of-funds-getting-started-icon",
|
|
2419
|
+
name: "source-of-funds"
|
|
2420
|
+
}
|
|
2421
|
+
),
|
|
2422
|
+
title: i18n.get("fundingSourcesForFinancialProducts"),
|
|
2423
|
+
description: i18n.get("inTheNextStepWellCollectInformation"),
|
|
2424
|
+
actions: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2425
|
+
/* @__PURE__ */ jsx(
|
|
2426
|
+
Button,
|
|
2427
|
+
{
|
|
2428
|
+
fullWidth: true,
|
|
2429
|
+
testId: "source-of-funds-getting-primary-button",
|
|
2430
|
+
onClick: handleGettingStartedClick,
|
|
2431
|
+
children: i18n.get("gettingStarted")
|
|
2432
|
+
}
|
|
2433
|
+
),
|
|
2434
|
+
handleCancelClick && /* @__PURE__ */ jsx(
|
|
2435
|
+
Button,
|
|
2436
|
+
{
|
|
2437
|
+
variant: "tertiary",
|
|
2438
|
+
fullWidth: true,
|
|
2439
|
+
testId: "source-of-funds-getting-cancel-button",
|
|
2440
|
+
onClick: handleCancelClick,
|
|
2441
|
+
children: i18n.get("backToTaskList")
|
|
2442
|
+
}
|
|
2443
|
+
)
|
|
2444
|
+
] })
|
|
2396
2445
|
}
|
|
2397
2446
|
),
|
|
2398
|
-
/* @__PURE__ */ jsx(Typography, { className: styles.sourceOfFundsGettingStartedHeading, el: "h2", variant: "title-l", children: i18n.get("financialProductFundingSources") }),
|
|
2399
2447
|
hasSourceOfFunds && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2448
|
+
/* @__PURE__ */ jsx(
|
|
2449
|
+
TaskStatusIndicator,
|
|
2450
|
+
{
|
|
2451
|
+
taskStatus: normalizedTaskStatusStore?.value?.SOURCE_OF_FUNDS?.status
|
|
2452
|
+
}
|
|
2453
|
+
),
|
|
2454
|
+
/* @__PURE__ */ jsx(
|
|
2455
|
+
Typography,
|
|
2456
|
+
{
|
|
2457
|
+
className: styles.sourceOfFundsGettingStartedHeading,
|
|
2458
|
+
el: "h2",
|
|
2459
|
+
variant: "title-l",
|
|
2460
|
+
children: i18n.get("fundingSourcesForFinancialProducts")
|
|
2461
|
+
}
|
|
2462
|
+
),
|
|
2400
2463
|
/* @__PURE__ */ jsx(Typography, { className: styles.sourceOfFundsGettingStartedBody, children: i18n.get("addAllSourcesOfFundsBeingUsed") }),
|
|
2401
2464
|
errorObjects && errorObjects.map((errorObj, index) => {
|
|
2402
|
-
var _a2, _b2;
|
|
2403
2465
|
const uniqueActions = getUniqueRemediationActions(errorObj);
|
|
2404
|
-
const errorItems =
|
|
2466
|
+
const errorItems = errorObj.subErrors?.map((subError) => subError.message) || [];
|
|
2405
2467
|
return /* @__PURE__ */ jsxs(
|
|
2406
2468
|
Alert,
|
|
2407
2469
|
{
|
|
@@ -2409,7 +2471,7 @@ const SourceOfFundsGettingStarted = ({
|
|
|
2409
2471
|
className: styles.sourceOfFundsGettingStartedError,
|
|
2410
2472
|
variant: "error",
|
|
2411
2473
|
children: [
|
|
2412
|
-
|
|
2474
|
+
errorObj?.subErrors?.length && /* @__PURE__ */ jsx("ul", { children: errorItems.map((item, i) => /* @__PURE__ */ jsx("li", { children: item }, i)) }),
|
|
2413
2475
|
uniqueActions.length > 0 && /* @__PURE__ */ jsx("div", { className: styles.sourceOfFundsGettingStartedErrorActions, children: uniqueActions.filter((action) => action.code !== "1_519").map((action, i) => /* @__PURE__ */ jsx(
|
|
2414
2476
|
Button,
|
|
2415
2477
|
{
|
|
@@ -2435,48 +2497,21 @@ const SourceOfFundsGettingStarted = ({
|
|
|
2435
2497
|
children: i18n.get("backToTaskList")
|
|
2436
2498
|
}
|
|
2437
2499
|
)
|
|
2438
|
-
] }),
|
|
2439
|
-
!hasSourceOfFunds && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2440
|
-
/* @__PURE__ */ jsx(Typography, { className: styles.sourceOfFundsGettingStartedBody, children: i18n.get("inTheNextStepWellCollectInformation") }),
|
|
2441
|
-
/* @__PURE__ */ jsxs("div", { className: styles.sourceOfFundsGettingStartedActions, children: [
|
|
2442
|
-
/* @__PURE__ */ jsx(
|
|
2443
|
-
Button,
|
|
2444
|
-
{
|
|
2445
|
-
fullWidth: true,
|
|
2446
|
-
testId: "source-of-funds-getting-primary-button",
|
|
2447
|
-
onClick: handleGettingStartedClick,
|
|
2448
|
-
children: i18n.get("gettingStarted")
|
|
2449
|
-
}
|
|
2450
|
-
),
|
|
2451
|
-
handleCancelClick && /* @__PURE__ */ jsx(
|
|
2452
|
-
Button,
|
|
2453
|
-
{
|
|
2454
|
-
variant: "tertiary",
|
|
2455
|
-
fullWidth: true,
|
|
2456
|
-
testId: "source-of-funds-getting-cancel-button",
|
|
2457
|
-
onClick: handleCancelClick,
|
|
2458
|
-
children: i18n.get("cancel")
|
|
2459
|
-
}
|
|
2460
|
-
)
|
|
2461
|
-
] })
|
|
2462
2500
|
] })
|
|
2463
2501
|
]
|
|
2464
2502
|
}
|
|
2465
2503
|
);
|
|
2466
2504
|
};
|
|
2467
2505
|
const SOFUploadModal = (props) => {
|
|
2468
|
-
var _a;
|
|
2469
2506
|
const { i18n } = useI18nContext();
|
|
2470
2507
|
const { showToast } = useToastContext();
|
|
2471
2508
|
const logger2 = createLogger();
|
|
2472
|
-
const { businessLines, handleModalClose, documentUtils
|
|
2473
|
-
const firstService =
|
|
2509
|
+
const { businessLines, handleModalClose, documentUtils } = props;
|
|
2510
|
+
const firstService = businessLines?.length === 1 ? businessLines?.[0]?.service : void 0;
|
|
2474
2511
|
const [selectedService, setSelectedService] = useState(
|
|
2475
2512
|
firstService
|
|
2476
2513
|
);
|
|
2477
2514
|
const [documentType, setDocumentType] = useState();
|
|
2478
|
-
const [selectedBusinessLineId, setSelectedBusinessLineId] = useState("");
|
|
2479
|
-
const [documentLists, setDocumentLists] = useState([]);
|
|
2480
2515
|
const onRadioChange = (selectedId) => {
|
|
2481
2516
|
setSelectedService(selectedId);
|
|
2482
2517
|
setDocumentType(void 0);
|
|
@@ -2487,30 +2522,25 @@ const SOFUploadModal = (props) => {
|
|
|
2487
2522
|
const serviceRadioItems = useMemo(() => {
|
|
2488
2523
|
return businessLines.map((businessLine) => ({
|
|
2489
2524
|
id: businessLine.service,
|
|
2490
|
-
name: getServiceTranslationKey(
|
|
2525
|
+
name: getServiceTranslationKey(businessLine?.service || "")
|
|
2491
2526
|
}));
|
|
2492
2527
|
}, [businessLines]);
|
|
2493
2528
|
const canUpload = useMemo(() => selectedService && documentType, [selectedService, documentType]);
|
|
2494
|
-
|
|
2495
|
-
|
|
2496
|
-
|
|
2497
|
-
|
|
2498
|
-
|
|
2499
|
-
|
|
2500
|
-
const
|
|
2501
|
-
|
|
2502
|
-
|
|
2503
|
-
|
|
2504
|
-
|
|
2505
|
-
|
|
2506
|
-
const items = lists.map((list) => ({
|
|
2507
|
-
id: list,
|
|
2508
|
-
name: i18n.get(list)
|
|
2509
|
-
}));
|
|
2510
|
-
setDocumentLists(items);
|
|
2511
|
-
}
|
|
2529
|
+
const selectedBusinessLineId = businessLines?.find((businessLine) => businessLine.service === selectedService)?.id || "";
|
|
2530
|
+
const documentLists = useMemo(() => {
|
|
2531
|
+
const selectedType = businessLines?.find(
|
|
2532
|
+
(businessLine) => businessLine.service === selectedService
|
|
2533
|
+
)?.sourceOfFunds?.type;
|
|
2534
|
+
if (selectedType) {
|
|
2535
|
+
const lists = getDocumentLists(selectedType);
|
|
2536
|
+
const items = lists.map((list) => ({
|
|
2537
|
+
id: list,
|
|
2538
|
+
name: i18n.get(list)
|
|
2539
|
+
}));
|
|
2540
|
+
return items;
|
|
2512
2541
|
}
|
|
2513
|
-
|
|
2542
|
+
return [];
|
|
2543
|
+
}, [businessLines, i18n, selectedService]);
|
|
2514
2544
|
const documentRequirements = useMemo(() => {
|
|
2515
2545
|
return documentType ? getDocumentRequirements[documentType] : [];
|
|
2516
2546
|
}, [documentType]);
|
|
@@ -2528,7 +2558,7 @@ const SOFUploadModal = (props) => {
|
|
|
2528
2558
|
});
|
|
2529
2559
|
if (formattedDocument) {
|
|
2530
2560
|
try {
|
|
2531
|
-
await documentUtils.uploadDocuments([formattedDocument],
|
|
2561
|
+
await documentUtils.uploadDocuments([formattedDocument], selectedBusinessLineId);
|
|
2532
2562
|
showToast({
|
|
2533
2563
|
label: i18n.get("documentUploadedSuccessfully"),
|
|
2534
2564
|
variant: "success",
|
|
@@ -2544,7 +2574,7 @@ const SOFUploadModal = (props) => {
|
|
|
2544
2574
|
return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(Modal, { onClose: handleModalClose, ariaLabel: i18n.get("uploadASupportingDocument"), inset: true, children: /* @__PURE__ */ jsxs("div", { className: styles.sourceOfFundsModal, children: [
|
|
2545
2575
|
/* @__PURE__ */ jsx(Typography, { variant: "title-l", el: "h2", children: i18n.get("uploadASupportingDocument") }),
|
|
2546
2576
|
/* @__PURE__ */ jsxs("div", { className: styles.sourceOfFundsUploadModalContent, children: [
|
|
2547
|
-
|
|
2577
|
+
businessLines?.length > 1 ? /* @__PURE__ */ jsx(
|
|
2548
2578
|
Field,
|
|
2549
2579
|
{
|
|
2550
2580
|
el: "fieldset",
|
|
@@ -2586,9 +2616,9 @@ const SOFUploadModal = (props) => {
|
|
|
2586
2616
|
)
|
|
2587
2617
|
}
|
|
2588
2618
|
),
|
|
2589
|
-
|
|
2619
|
+
documentRequirements?.length ? /* @__PURE__ */ jsxs("div", { className: styles.sourceOfFundsUploadModalContentRequirementsContainer, children: [
|
|
2590
2620
|
/* @__PURE__ */ jsx(Typography, { variant: "body-strongest", el: "div", children: i18n.get("documentShouldShow") }),
|
|
2591
|
-
/* @__PURE__ */ jsx("ul", { children: documentRequirements
|
|
2621
|
+
/* @__PURE__ */ jsx("ul", { children: documentRequirements?.map((requirement) => /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(Typography, { variant: "body-stronger", el: "div", children: i18n.get(requirement) }) }, requirement)) })
|
|
2592
2622
|
] }) : null,
|
|
2593
2623
|
canUpload && /* @__PURE__ */ jsx(
|
|
2594
2624
|
Dropzone,
|
|
@@ -2612,7 +2642,6 @@ const SourceOfFundsUpload = ({
|
|
|
2612
2642
|
legalEntity,
|
|
2613
2643
|
handleNavigateToSummary
|
|
2614
2644
|
}) => {
|
|
2615
|
-
var _a;
|
|
2616
2645
|
const { i18n } = useI18nContext();
|
|
2617
2646
|
const [showUploadModal, setShowUploadModal] = useState(false);
|
|
2618
2647
|
const [docToDelete, setDocToDelete] = useState(void 0);
|
|
@@ -2629,16 +2658,10 @@ const SourceOfFundsUpload = ({
|
|
|
2629
2658
|
setShowUploadModal(true);
|
|
2630
2659
|
};
|
|
2631
2660
|
const documents = useMemo(
|
|
2632
|
-
() =>
|
|
2633
|
-
var _a2;
|
|
2634
|
-
return ((_a2 = legalEntity.documentDetails) == null ? void 0 : _a2.filter((doc) => doc.type === "proofOfFundingOrWealthSource")) ?? [];
|
|
2635
|
-
},
|
|
2661
|
+
() => legalEntity.documentDetails?.filter((doc) => doc.type === "proofOfFundingOrWealthSource") ?? [],
|
|
2636
2662
|
[legalEntity]
|
|
2637
2663
|
);
|
|
2638
|
-
const sourceOfFundsCategories =
|
|
2639
|
-
var _a2;
|
|
2640
|
-
return (_a2 = line.sourceOfFunds) == null ? void 0 : _a2.type;
|
|
2641
|
-
})) == null ? void 0 : _a.filter(Boolean);
|
|
2664
|
+
const sourceOfFundsCategories = businessLines?.map((line) => line.sourceOfFunds?.type)?.filter(Boolean);
|
|
2642
2665
|
const handleFileDelete = async (documentId) => {
|
|
2643
2666
|
if (documentUtils.deleteDocument) {
|
|
2644
2667
|
try {
|
|
@@ -2660,7 +2683,7 @@ const SourceOfFundsUpload = ({
|
|
|
2660
2683
|
return /* @__PURE__ */ jsxs("div", { className: styles.sourceOfFundsUploadList, children: [
|
|
2661
2684
|
/* @__PURE__ */ jsxs("div", { className: styles.sourceOfFundsUploadListHeading, children: [
|
|
2662
2685
|
/* @__PURE__ */ jsx(Typography, { el: "h1", variant: "title-l", children: i18n.get("supportingDocuments") }),
|
|
2663
|
-
/* @__PURE__ */ jsx(Typography, { className: styles.sourceOfFundsWrapperDescription, children:
|
|
2686
|
+
/* @__PURE__ */ jsx(Typography, { className: styles.sourceOfFundsWrapperDescription, children: sourceOfFundsCategories?.length > 1 ? i18n.get("weNeedProofOfFundingPlural", {
|
|
2664
2687
|
values: {
|
|
2665
2688
|
category1_name: sourceOfFundsCategories[0] ? i18n.get(
|
|
2666
2689
|
`sofType${toCapitalized(sourceOfFundsCategories[0])}Label`
|
|
@@ -2677,7 +2700,7 @@ const SourceOfFundsUpload = ({
|
|
|
2677
2700
|
}
|
|
2678
2701
|
}) })
|
|
2679
2702
|
] }),
|
|
2680
|
-
documents
|
|
2703
|
+
documents?.map((document) => /* @__PURE__ */ jsxs("div", { className: styles.sourceOfFundsThirdPartyFundingFinancierGroup, children: [
|
|
2681
2704
|
/* @__PURE__ */ jsxs("div", { className: styles.sourceOfFundsThirdPartyFundingNameAvatarGroup, children: [
|
|
2682
2705
|
/* @__PURE__ */ jsx(Avatar, { iconName: "document", circle: true }),
|
|
2683
2706
|
/* @__PURE__ */ jsxs("div", { className: styles.sourceOfFundsThirdPartyFundingNameAddressGroup, children: [
|
|
@@ -2709,18 +2732,18 @@ const SourceOfFundsUpload = ({
|
|
|
2709
2732
|
] })
|
|
2710
2733
|
}
|
|
2711
2734
|
),
|
|
2712
|
-
handleNavigateToSummary && /* @__PURE__ */ jsx("div", { className: styles.sourceOfFundsGettingStartedActions, children: /* @__PURE__ */ jsx(Button, { variant: "secondary", onClick: handleNavigateToSummary, children:
|
|
2735
|
+
handleNavigateToSummary && /* @__PURE__ */ jsx("div", { className: styles.sourceOfFundsGettingStartedActions, children: /* @__PURE__ */ jsx(Button, { variant: "secondary", onClick: handleNavigateToSummary, children: documents?.length > 0 ? i18n.get("finish") : i18n.get("cancel") }) }),
|
|
2713
2736
|
!!docToDelete && /* @__PURE__ */ jsx(
|
|
2714
2737
|
Confirm,
|
|
2715
2738
|
{
|
|
2716
2739
|
title: i18n.get({
|
|
2717
2740
|
key: "areYouSureYouWantToDeleteThisDocument",
|
|
2718
2741
|
values: {
|
|
2719
|
-
deleteDocName:
|
|
2742
|
+
deleteDocName: docToDelete?.fileName || ""
|
|
2720
2743
|
}
|
|
2721
2744
|
}),
|
|
2722
2745
|
confirmText: i18n.get("delete"),
|
|
2723
|
-
onConfirm: () => handleFileDelete(docToDelete
|
|
2746
|
+
onConfirm: () => handleFileDelete(docToDelete?.id),
|
|
2724
2747
|
onCancel: () => setDocToDelete(void 0),
|
|
2725
2748
|
critical: true
|
|
2726
2749
|
}
|
|
@@ -2730,8 +2753,7 @@ const SourceOfFundsUpload = ({
|
|
|
2730
2753
|
{
|
|
2731
2754
|
documentUtils,
|
|
2732
2755
|
handleModalClose,
|
|
2733
|
-
businessLines
|
|
2734
|
-
legalEntityId: legalEntity.id
|
|
2756
|
+
businessLines
|
|
2735
2757
|
}
|
|
2736
2758
|
)
|
|
2737
2759
|
] });
|
|
@@ -2742,7 +2764,6 @@ function SourceOfFundsDropin({
|
|
|
2742
2764
|
problems,
|
|
2743
2765
|
handleHomeClick
|
|
2744
2766
|
}) {
|
|
2745
|
-
var _a, _b, _c;
|
|
2746
2767
|
const { data: legalEntity, isLoading: isLoadingRootLegalEntity } = useLegalEntity(ROOT_LE);
|
|
2747
2768
|
const [loadingStatus, setLoadingStatus] = useState("success");
|
|
2748
2769
|
const [activeBusinessLine, setActiveBusinessLine] = useState();
|
|
@@ -2760,33 +2781,24 @@ function SourceOfFundsDropin({
|
|
|
2760
2781
|
const { i18n } = useI18nContext();
|
|
2761
2782
|
const userEvents = useAnalyticsContext();
|
|
2762
2783
|
const { showToast } = useToastContext();
|
|
2763
|
-
const { data: businessLinesData } = useBusinessLines();
|
|
2784
|
+
const { data: businessLinesData, isLoading: isLoadingBusinessLines } = useBusinessLines();
|
|
2764
2785
|
const { mutateAsync: createLegalEntity } = useCreateLegalEntity();
|
|
2765
2786
|
const { mutateAsync: updateLegalEntity } = useUpdateLegalEntity();
|
|
2766
2787
|
const { mutateAsync: updateSoFMutation } = useUpdateSourceOfFunds();
|
|
2767
2788
|
const filteredBusinessLines = useMemo(() => {
|
|
2768
|
-
return businessLinesData
|
|
2789
|
+
return businessLinesData?.filter(
|
|
2769
2790
|
(businessLine) => ALLOWED_SOF_SERVICES.includes(businessLine.service)
|
|
2770
2791
|
);
|
|
2771
2792
|
}, [businessLinesData]);
|
|
2772
2793
|
const isSoFDocumentMissing = useMemo(
|
|
2773
|
-
() =>
|
|
2774
|
-
|
|
2775
|
-
|
|
2776
|
-
|
|
2777
|
-
|
|
2778
|
-
|
|
2779
|
-
(verificationError) => (verificationError == null ? void 0 : verificationError.code) === MISSING_DATA_SOF_UPLOAD_CODE
|
|
2780
|
-
);
|
|
2781
|
-
}
|
|
2782
|
-
)) ?? false;
|
|
2783
|
-
},
|
|
2784
|
-
[legalEntity == null ? void 0 : legalEntity.problems]
|
|
2794
|
+
() => legalEntity?.problems?.some(
|
|
2795
|
+
(problem) => problem?.verificationErrors?.some(
|
|
2796
|
+
(verificationError) => verificationError?.code === MISSING_DATA_SOF_UPLOAD_CODE
|
|
2797
|
+
)
|
|
2798
|
+
) ?? false,
|
|
2799
|
+
[legalEntity?.problems]
|
|
2785
2800
|
);
|
|
2786
|
-
const idsToFetch = (
|
|
2787
|
-
var _a2;
|
|
2788
|
-
return (_a2 = businessLine.sourceOfFunds) == null ? void 0 : _a2.originatorLegalEntityId;
|
|
2789
|
-
}).filter((id) => Boolean(id))) ?? [];
|
|
2801
|
+
const idsToFetch = filteredBusinessLines?.map((businessLine) => businessLine.sourceOfFunds?.originatorLegalEntityId).filter((id) => Boolean(id)) ?? [];
|
|
2790
2802
|
const legalEntityResults = useLegalEntities(idsToFetch, {
|
|
2791
2803
|
staleTime: 5 * 60 * 1e3
|
|
2792
2804
|
// 5 minutes
|
|
@@ -2797,7 +2809,6 @@ function SourceOfFundsDropin({
|
|
|
2797
2809
|
return null;
|
|
2798
2810
|
}
|
|
2799
2811
|
return filteredBusinessLines.map((businessLine, index) => {
|
|
2800
|
-
var _a2;
|
|
2801
2812
|
const result = legalEntityResults[index];
|
|
2802
2813
|
let updatedBusinessLine = { ...businessLine };
|
|
2803
2814
|
if (result && result.data) {
|
|
@@ -2806,7 +2817,7 @@ function SourceOfFundsDropin({
|
|
|
2806
2817
|
logger.error(`Error fetching legal entity for BL ${businessLine.id}:`, result.error);
|
|
2807
2818
|
showToast({ label: i18n.get("unableToLoadRelatedEntity"), variant: "error" });
|
|
2808
2819
|
}
|
|
2809
|
-
if (
|
|
2820
|
+
if (updatedBusinessLine.sourceOfFunds?.adyenProcessedFunds) {
|
|
2810
2821
|
updatedBusinessLine.sourceOfFunds.type = "adyen";
|
|
2811
2822
|
}
|
|
2812
2823
|
return updatedBusinessLine;
|
|
@@ -2854,34 +2865,28 @@ function SourceOfFundsDropin({
|
|
|
2854
2865
|
});
|
|
2855
2866
|
}, [userEvents]);
|
|
2856
2867
|
const canSubmitForm = useMemo(
|
|
2857
|
-
() =>
|
|
2858
|
-
var _a2, _b2;
|
|
2859
|
-
return activeSourceOfFund ? !isEmpty((_b2 = (_a2 = currentState.data) == null ? void 0 : _a2.sourceOfFundsType) == null ? void 0 : _b2.type) && hasDataChanged(activeSourceOfFund, currentState.data) : false;
|
|
2860
|
-
},
|
|
2868
|
+
() => activeSourceOfFund ? !isEmpty(currentState.data?.sourceOfFundsType?.type) && hasDataChanged(activeSourceOfFund, currentState.data) : false,
|
|
2861
2869
|
[activeSourceOfFund, currentState.data]
|
|
2862
2870
|
);
|
|
2863
2871
|
const derivedProps = useMemo(
|
|
2864
2872
|
() => getPropsFromConfigurations(
|
|
2865
2873
|
{},
|
|
2866
2874
|
sourceOfFundsForms,
|
|
2867
|
-
|
|
2868
|
-
|
|
2875
|
+
problems?.remediationActions ? Object.values(problems?.remediationActions) : [],
|
|
2876
|
+
problems?.missingData ?? [],
|
|
2869
2877
|
// TODO fix this to take existing fields into account
|
|
2870
2878
|
// getFieldsWithExistingData(legalEntityResponse, sourceOfFundsApiKeyMapping),
|
|
2871
2879
|
[],
|
|
2872
2880
|
{},
|
|
2873
2881
|
{},
|
|
2874
2882
|
{},
|
|
2875
|
-
legalEntity
|
|
2883
|
+
legalEntity?.type
|
|
2876
2884
|
),
|
|
2877
|
-
[problems
|
|
2885
|
+
[problems?.remediationActions, problems?.missingData, legalEntity]
|
|
2878
2886
|
);
|
|
2879
2887
|
const sourceOfFundsRequiredForms = useMemo(
|
|
2880
|
-
() =>
|
|
2881
|
-
|
|
2882
|
-
return getSourceOfFundsRequiredForms((_a2 = currentState == null ? void 0 : currentState.data) == null ? void 0 : _a2.sourceOfFundsType);
|
|
2883
|
-
},
|
|
2884
|
-
[(_a = currentState == null ? void 0 : currentState.data) == null ? void 0 : _a.sourceOfFundsType]
|
|
2888
|
+
() => getSourceOfFundsRequiredForms(currentState?.data?.sourceOfFundsType),
|
|
2889
|
+
[currentState?.data?.sourceOfFundsType]
|
|
2885
2890
|
);
|
|
2886
2891
|
const forms = useMemo(() => {
|
|
2887
2892
|
const requiredForms = getRequiredForms(
|
|
@@ -2895,9 +2900,9 @@ function SourceOfFundsDropin({
|
|
|
2895
2900
|
const createOrUpdateOriginator = async (additionalData) => {
|
|
2896
2901
|
let originatorLegalEntityId;
|
|
2897
2902
|
const sofOriginator = parseSofOriginatorPayload(additionalData);
|
|
2898
|
-
if (additionalData
|
|
2903
|
+
if (additionalData?.originatorLegalEntityId) {
|
|
2899
2904
|
try {
|
|
2900
|
-
sofOriginator.id = additionalData
|
|
2905
|
+
sofOriginator.id = additionalData?.originatorLegalEntityId;
|
|
2901
2906
|
if (sofOriginator.type) {
|
|
2902
2907
|
delete sofOriginator.type;
|
|
2903
2908
|
}
|
|
@@ -2906,14 +2911,14 @@ function SourceOfFundsDropin({
|
|
|
2906
2911
|
id: sofOriginator.id
|
|
2907
2912
|
};
|
|
2908
2913
|
const le = await updateLegalEntity(patchLegalEntity);
|
|
2909
|
-
originatorLegalEntityId = le
|
|
2914
|
+
originatorLegalEntityId = le?.id;
|
|
2910
2915
|
} catch (e) {
|
|
2911
2916
|
logger.log("Error updating originator legal entity", e);
|
|
2912
2917
|
}
|
|
2913
2918
|
} else {
|
|
2914
2919
|
try {
|
|
2915
2920
|
const le = await createLegalEntity(sofOriginator);
|
|
2916
|
-
originatorLegalEntityId = le
|
|
2921
|
+
originatorLegalEntityId = le?.id;
|
|
2917
2922
|
} catch (e) {
|
|
2918
2923
|
logger.log("Error creating originator legal entity", e);
|
|
2919
2924
|
}
|
|
@@ -2921,17 +2926,26 @@ function SourceOfFundsDropin({
|
|
|
2921
2926
|
return originatorLegalEntityId;
|
|
2922
2927
|
};
|
|
2923
2928
|
const handleSubmit = useCallback(async () => {
|
|
2924
|
-
|
|
2925
|
-
const
|
|
2926
|
-
|
|
2927
|
-
if (!sofType || !(activeBusinessLine == null ? void 0 : activeBusinessLine.id)) {
|
|
2929
|
+
const sofData = { ...currentState?.data };
|
|
2930
|
+
const sofType = sofData?.sourceOfFundsType?.type;
|
|
2931
|
+
if (!sofType || !activeBusinessLine?.id) {
|
|
2928
2932
|
return;
|
|
2929
2933
|
}
|
|
2934
|
+
const eventsAdditionalData = {};
|
|
2930
2935
|
setLoadingStatus("loading");
|
|
2931
2936
|
const { additionalData } = sofData;
|
|
2932
2937
|
const sofPayload = getSourceOfFundsPayload(sofType, additionalData);
|
|
2933
2938
|
if (sofType === "donations" || sofType === "inheritance") {
|
|
2934
|
-
|
|
2939
|
+
try {
|
|
2940
|
+
sofPayload.originatorLegalEntityId = await createOrUpdateOriginator(additionalData);
|
|
2941
|
+
} catch (e) {
|
|
2942
|
+
setSofErrorMessage(e?.message || i18n.get("errorUpdatingSourceOfFunds"));
|
|
2943
|
+
logger.log("Error updating source of funds", e);
|
|
2944
|
+
}
|
|
2945
|
+
eventsAdditionalData.originatorType = additionalData?.originatorType ?? "";
|
|
2946
|
+
}
|
|
2947
|
+
if (sofType === "thirdPartyFunding") {
|
|
2948
|
+
eventsAdditionalData.financiers = `${additionalData?.financiers?.length || 0} investor(s)`;
|
|
2935
2949
|
}
|
|
2936
2950
|
const sofMutationPayload = {
|
|
2937
2951
|
...sofPayload,
|
|
@@ -2941,20 +2955,22 @@ function SourceOfFundsDropin({
|
|
|
2941
2955
|
await updateSoFMutation(sofMutationPayload);
|
|
2942
2956
|
userEvents.addTaskEvent("Success", {
|
|
2943
2957
|
actionType: "submit",
|
|
2944
|
-
returnValue: sofType
|
|
2958
|
+
returnValue: sofType,
|
|
2959
|
+
additionalData: eventsAdditionalData
|
|
2945
2960
|
});
|
|
2946
2961
|
setGettingStarted(true);
|
|
2947
2962
|
setShowUploadPage(false);
|
|
2948
2963
|
setActiveSourceOfFund({});
|
|
2949
2964
|
gotoFormByFormIndex(0);
|
|
2950
2965
|
setSofErrorMessage("");
|
|
2951
|
-
|
|
2966
|
+
showToast({ label: i18n.get("successAddedFundingSources"), variant: "success" });
|
|
2967
|
+
handleHomeClick?.();
|
|
2952
2968
|
} catch (e) {
|
|
2953
|
-
setSofErrorMessage(
|
|
2969
|
+
setSofErrorMessage(e?.message || i18n.get("errorUpdatingSourceOfFunds"));
|
|
2954
2970
|
logger.log("Error updating source of funds", e);
|
|
2955
2971
|
}
|
|
2956
2972
|
setLoadingStatus("success");
|
|
2957
|
-
}, [currentState
|
|
2973
|
+
}, [currentState?.data, handleHomeClick]);
|
|
2958
2974
|
const handleGettingStarted = useCallback(() => {
|
|
2959
2975
|
setGettingStarted(!gettingStarted);
|
|
2960
2976
|
}, [gettingStarted]);
|
|
@@ -2987,14 +3003,14 @@ function SourceOfFundsDropin({
|
|
|
2987
3003
|
const handleNavigateToUploadPage = () => {
|
|
2988
3004
|
setShowUploadPage(true);
|
|
2989
3005
|
};
|
|
2990
|
-
return /* @__PURE__ */ jsx("div", { className: styles.sourceOfFunds, children: loading || isLoadingRootLegalEntity ? /* @__PURE__ */ jsx(Loader, {}) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
3006
|
+
return /* @__PURE__ */ jsx("div", { className: styles.sourceOfFunds, children: loading || isLoadingRootLegalEntity || isLoadingBusinessLines || areLegalEntitiesLoading ? /* @__PURE__ */ jsx(Loader, {}) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2991
3007
|
gettingStarted && !showUploadPage && legalEntity && /* @__PURE__ */ jsx(
|
|
2992
3008
|
SourceOfFundsGettingStarted,
|
|
2993
3009
|
{
|
|
2994
3010
|
handleCancelClick: handleHomeClick,
|
|
2995
3011
|
handleGettingStartedClick: handleGettingStarted,
|
|
2996
3012
|
businessLines: allBusinessLines,
|
|
2997
|
-
problems: legalEntity
|
|
3013
|
+
problems: legalEntity?.problems,
|
|
2998
3014
|
handleSourceOfFundsClick,
|
|
2999
3015
|
handleNavigateToUploadPage,
|
|
3000
3016
|
legalEntity,
|
|
@@ -3035,7 +3051,7 @@ function SourceOfFundsDropin({
|
|
|
3035
3051
|
activeForm,
|
|
3036
3052
|
shouldValidate,
|
|
3037
3053
|
activeBusinessLine,
|
|
3038
|
-
sourceOfFundsType:
|
|
3054
|
+
sourceOfFundsType: currentState?.data?.sourceOfFundsType?.type,
|
|
3039
3055
|
ref: formRef,
|
|
3040
3056
|
data: activeSourceOfFund
|
|
3041
3057
|
}
|