@adyen/kyc-components 4.0.0-beta.0 → 4.0.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{AcceptTermsOfServiceComponent-Dh7RSJoE.js → AcceptTermsOfServiceComponent-BQ4Yct7L.js} +20 -29
- package/dist/{AccountSetupRejected-PdYyKwbS.js → AccountSetupRejected-UVhxMcAe.js} +2 -2
- package/dist/{Avatar-C8aZB2wq.js → Avatar-NEiNEcRx.js} +1 -1
- package/dist/{BusinessDetailsDropin-DC8FEWvP.js → BusinessDetailsDropin-l0xfPekL.js} +124 -155
- package/dist/{BusinessFinancingComponent-B0vW7r62.js → BusinessFinancingComponent-Bs-poF2d.js} +3 -3
- package/dist/{BusinessFinancingDropin-D8HAwTSq.js → BusinessFinancingDropin-DoRzdS4n.js} +551 -620
- package/dist/{BusinessFinancingPage-L1APYvzn.js → BusinessFinancingPage-DSlmJmOK.js} +3 -3
- package/dist/{BusinessTypeSelectionPage-sfGqHnp6.js → BusinessTypeSelectionPage-Bmi_8K2g.js} +8 -8
- package/dist/ContractViewer-R4-gfVmp.js +938 -0
- package/dist/{CreateIndividualComponent-i-QNCzp0.js → CreateIndividualComponent-D3aXuYRk.js} +3 -4
- package/dist/{CreateTransferInstrumentComponent-8n3tjBYK.js → CreateTransferInstrumentComponent-C-ncZ-A8.js} +2 -3
- package/dist/{CustomerSupport-BER6nSK2.js → CustomerSupport-CMFRgQNa.js} +5 -6
- package/dist/{DebugModal-DeSsKkh_.js → DebugModal-BEmhG3UP.js} +8 -42
- package/dist/{DecisionMakerDetailsPage-DgjlfKyP.js → DecisionMakerDetailsPage-DI2Ubmef.js} +3 -4
- package/dist/{DecisionMakers-D2TjKnOc.js → DecisionMakers-BKhtcs_K.js} +4 -6
- package/dist/{ES-JRIf-4xI.js → ES-BlWV7xvh.js} +4 -6
- package/dist/{EmbeddedStatus-Bn5KNA0V.js → EmbeddedStatus-BsZsXbKc.js} +12 -4
- package/dist/{FormEndState-BQOQ83vO.js → FormEndState-C3HCmXcw.js} +1 -1
- package/dist/{FormFlow-CZgc09E3.js → FormFlow-Bt-mu4Wm.js} +2 -5
- package/dist/{IndividualOnfidoDropin-D6uwo7VI.js → IndividualOnfidoDropin-DGMCOm9M.js} +788 -284
- package/dist/{Introduction-DW2IQ57R.js → Introduction-DJ6qIUPC.js} +3 -4
- package/dist/{LegalRepresentativeDetailsPage-BfIDXqv1.js → LegalRepresentativeDetailsPage-CyHwQR_W.js} +3 -4
- package/dist/{ManageIndividualComponent-DJoEsE2m.js → ManageIndividualComponent-BIMCvcr2.js} +4 -4
- package/dist/{ManagePCIComponent-BGESFWL6.js → ManagePCIComponent-Blj60xLa.js} +4 -4
- package/dist/{ManageTermsOfServiceComponent-_wTZrjqd.js → ManageTermsOfServiceComponent-CsM23jq3.js} +4 -4
- package/dist/{ManageTransferInstrumentComponent-Cvc3kk94.js → ManageTransferInstrumentComponent-Vut9_bRn.js} +4 -9
- package/dist/{OnboardingDropinComponent-CocnpjvA.js → OnboardingDropinComponent-BW6er2HU.js} +132 -133
- package/dist/{ProviderButton-vD5DUJaN.js → ProviderButton-DAsW5EVa.js} +3 -13
- package/dist/{Review-BFgzcIDj.js → Review-DWDbL9-9.js} +3 -4
- package/dist/{RootBusinessDetailsPage-C6lHQShI.js → RootBusinessDetailsPage-BTYIldSf.js} +3 -4
- package/dist/{RootIndividualDetailsPage-DfpqHdAS.js → RootIndividualDetailsPage-DCxJ3ycQ.js} +3 -4
- package/dist/{SignPCIComponent-D35913wJ.js → SignPCIComponent-kHaxhkWa.js} +6 -10
- package/dist/{SingpassSelection-D2Xe1wGv.js → SingpassSelection-Dmlbiq4Z.js} +2 -2
- package/dist/{SoleProprietorshipPage-D2F8Ghmo.js → SoleProprietorshipPage-Bdhs90-q.js} +4 -5
- package/dist/{SourceOfFunds.module-OqFTr4WQ.js → SourceOfFunds.module-xwHIboir.js} +1 -1
- package/dist/{SourceOfFundsPage-RjAcZ3Bo.js → SourceOfFundsPage-Bj22DAFv.js} +52 -55
- package/dist/{StoreProvider-COHi02bX.js → StoreProvider-BmzY19Td.js} +21647 -21959
- package/dist/{TaskItemStatus-Bi1L8gea.js → TaskItemStatus-CB6FEOnk.js} +2 -2
- package/dist/{TaxReportingDropin-BLXgRbuR.js → TaxReportingDropin-jofokkei.js} +7 -8
- package/dist/{TileGroup-B1IymoWv.js → TileGroup-i5Jc08ns.js} +2 -2
- package/dist/{TrustDetailsPage-DVvGJ_Ta.js → TrustDetailsPage-B6HmvYUf.js} +34 -53
- package/dist/{TrustMemberCompanyPage-D0wTEhuh.js → TrustMemberCompanyPage-D3VJOq6a.js} +4 -5
- package/dist/{TrustMemberIndividualPage-BLuaBi3j.js → TrustMemberIndividualPage-1aeOYsnG.js} +3 -4
- package/dist/{UnincorporatedPartnershipIndividualPage-BhIihH2v.js → UnincorporatedPartnershipIndividualPage-Bt7e6ncF.js} +3 -4
- package/dist/{UnincorporatedPartnershipMemberCompanyPage-CgujXwfX.js → UnincorporatedPartnershipMemberCompanyPage-Ck5C_SEU.js} +3 -4
- package/dist/{VerificationErrorAlert-BkImnGA-.js → VerificationErrorAlert-DhtKOmjt.js} +2 -2
- package/dist/{ViewVerificationStatusComponent-CRefu327.js → ViewVerificationStatusComponent-DtKLcCGI.js} +3 -3
- package/dist/adyen-business-financing.js +24 -27
- package/dist/adyen-individual.js +18 -21
- package/dist/adyen-kyc-components.js +30 -32
- 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 +18 -23
- package/dist/adyen-sign-pci.js +26 -29
- package/dist/adyen-terms-of-service.js +18 -27
- package/dist/adyen-transfer-instrument.js +26 -29
- package/dist/adyen-verification-status.js +30 -33
- package/dist/{bg-BG-CGHVGS50.js → bg-BG-COTwZXwN.js} +62 -8
- package/dist/{cs-CZ-5Os6MsQs.js → cs-CZ-DUlgJKVq.js} +62 -8
- package/dist/{css-DZNXkIaY.js → css-CQUoQdd2.js} +2 -2
- package/dist/{da-DK-Dk9852pS.js → da-DK-BDzDHhVR.js} +62 -8
- package/dist/{de-DE-dk9CMgxF.js → de-DE-DJdgXqS_.js} +61 -7
- package/dist/{el-GR-DgI6Cgl6.js → el-GR-D5i9BNyh.js} +61 -7
- package/dist/{es-ES-BzoYprDP.js → es-ES-VOSWszW5.js} +62 -8
- package/dist/{et-EE-DlbiEFQu.js → et-EE-Bp4Ngsn4.js} +62 -8
- package/dist/{fi-FI-GSyT4vm7.js → fi-FI-DaujOE-a.js} +61 -7
- package/dist/{fr-FR-BEImhl_J.js → fr-FR-BdPZxk11.js} +62 -8
- package/dist/{getFieldsWithExistingData-UNUNInq5.js → getFieldsWithExistingData-BW8_TEQl.js} +2 -2
- package/dist/{hasDataChanged-CIg-bPSm.js → hasDataChanged-Mu0HyZ3E.js} +2 -2
- package/dist/{hr-HR-CNFI9uDD.js → hr-HR-BY7C7NxY.js} +62 -8
- package/dist/{hu-HU-D4xFA3R6.js → hu-HU-DHCty-Tc.js} +61 -7
- package/dist/{it-IT-B65JP9Qv.js → it-IT-BMsuhZEQ.js} +64 -10
- package/dist/{ja-JP-CgGmwtzl.js → ja-JP-BYDz1z2G.js} +61 -7
- package/dist/{json-DGARJCng.js → json-DWikzB4g.js} +2 -2
- package/dist/{localizeDateString-KlstHAcM.js → localizeDateString-QtCjf8Fg.js} +2 -2
- package/dist/{lt-LT-D_Q1Z3N4.js → lt-LT-DNJ9V9xV.js} +62 -8
- package/dist/{lv-LV-aF5bMtic.js → lv-LV-CFJwN5wq.js} +64 -10
- package/dist/{mapFinancialReportsToFinancialInformation-Cid31JpK.js → mapFinancialReportsToFinancialInformation-C-2jp0wg.js} +2 -2
- package/dist/{nl-NL-GDXpht_y.js → nl-NL-DibAf790.js} +62 -8
- package/dist/{no-NO-CEow5Bac.js → no-NO-DHCy5rXx.js} +64 -10
- package/dist/{pl-PL-Bir_Ltlv.js → pl-PL-eZBNH5HH.js} +62 -8
- package/dist/{plaintext-jF9fCLMp.js → plaintext-B39yQnOr.js} +2 -2
- package/dist/preact/adyen-terms-of-service.js +1 -1
- package/dist/preact/adyen-transfer-instrument.js +1 -1
- package/dist/{pt-PT-lkmVY63I.js → pt-PT-CiN_Wmfe.js} +62 -8
- package/dist/resolveEnvironment-Dx0BPNMa.js +84 -0
- package/dist/{ro-RO-CTQvP4R9.js → ro-RO-CgyMTvLc.js} +62 -8
- package/dist/{rules-a4kJDPzY.js → rules-CUANHpja.js} +34 -8
- package/dist/{sk-SK-Ct3OVI0e.js → sk-SK-B5qlQB_U.js} +62 -8
- package/dist/{sl-SI-CNjkFWB7.js → sl-SI-8PPfrGzL.js} +61 -7
- package/dist/style.css +2110 -2891
- package/dist/styles-CLV89_hH.js +2111 -2892
- package/dist/{sv-SE-BwREUuQq.js → sv-SE-ZWLw6D3j.js} +61 -7
- 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 +4 -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 +2 -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 +1919 -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 +1 -1
- package/dist/types/components/Business/forms/AdditionalInformation/utils.d.ts +1 -0
- package/dist/types/components/Business/forms/BasicInformation/types.d.ts +1 -1
- package/dist/types/components/Business/forms/BusinessDetails/forms.d.ts +1 -1
- 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 +22 -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 -1
- 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 +3 -3
- 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 +2 -1
- 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 +2355 -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/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 +15 -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 +2 -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/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.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/RichText.d.ts +5 -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/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/IndividualDropin/individualFormConfig.d.ts +1 -1
- 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/types.d.ts +3 -3
- package/dist/types/components/Shared/FormWrapper/FormWrapper.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 -1
- 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/fields/BusinessRegistrationNumberField/fieldConfig.d.ts +6 -4
- package/dist/types/components/Shared/fields/BusinessRegistrationNumberField/types.d.ts +1 -1
- package/dist/types/components/Shared/fields/CountryField/CountryField.d.ts +1 -1
- package/dist/types/components/Shared/fields/CountryField/types.d.ts +2 -2
- package/dist/types/components/Shared/fields/CountryOfGoverningLawField/CountryOfGoverningLawField.d.ts +1 -1
- package/dist/types/components/Shared/fields/CountryOfGoverningLawField/types.d.ts +1 -1
- package/dist/types/components/Shared/fields/Currency/types.d.ts +2 -2
- package/dist/types/components/Shared/fields/DBANameField/fieldConfig.d.ts +1 -1
- package/dist/types/components/Shared/fields/DateOfIncorporationField/fieldConfig.d.ts +1 -1
- package/dist/types/components/Shared/fields/EInvoicingCodeField/fieldConfig.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/getDefaultTaxIdNumberType.d.ts +1 -1
- 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/fieldConfig.d.ts +1 -1
- package/dist/types/components/Shared/fields/Name/Name.d.ts +1 -1
- package/dist/types/components/Shared/fields/PhoneField/fieldConfig.d.ts +1 -1
- package/dist/types/components/Shared/fields/PhoneField/types.d.ts +1 -1
- 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 +3 -3
- package/dist/types/components/Shared/fields/StockExchangeMICField/fieldConfig.d.ts +1 -1
- package/dist/types/components/Shared/fields/StockISINField/fieldConfig.d.ts +1 -1
- package/dist/types/components/Shared/fields/StockTickerSymbol/fieldConfig.d.ts +1 -1
- package/dist/types/components/Shared/fields/TaxInformationField/fieldConfig.d.ts +1 -1
- package/dist/types/components/Shared/fields/TaxInformationField/types.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 +1 -1
- 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 +1 -1
- package/dist/types/components/Shared/forms/FinancialInformation/types.d.ts +2 -2
- 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/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/types/types.d.ts +1 -1
- package/dist/types/components/UnincorporatedPartnership/utils/unincorporatedParnershipUtil.d.ts +3 -3
- package/dist/types/components/ui/atoms/ActionsMenu/ActionsMenu.d.ts +1 -1
- package/dist/types/components/ui/atoms/Checkbox/Checkbox.d.ts +1 -2
- package/dist/types/components/ui/atoms/Field/Field.d.ts +1 -1
- package/dist/types/components/ui/atoms/Field/Field.types.d.ts +2 -0
- package/dist/types/components/ui/atoms/FormHeader/FormHeader.d.ts +1 -1
- package/dist/types/components/ui/atoms/InputBase/InputBase.d.ts +1 -1
- package/dist/types/components/ui/atoms/Svg/Svg.d.ts +1 -1
- package/dist/types/components/ui/atoms/TaskStatusIndicator/TaskStatusIndicator.d.ts +1 -1
- 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/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/Dropzone/Dropzone.d.ts +2 -1
- package/dist/types/components/ui/molecules/Dropzone/FilePicker.d.ts +1 -1
- 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/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/InputCurrency/InputCurrency.d.ts +1 -1
- 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 +1 -5
- package/dist/types/constants/countries.d.ts +1 -1
- package/dist/types/context/ExperimentContext/types.d.ts +10 -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 +1 -1
- package/dist/types/core/UIElement/UIElement.d.ts +1 -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 +1 -1
- 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 +1 -1
- package/dist/types/core/models/api/legal-entity-association.d.ts +5 -0
- package/dist/types/core/models/api/organization.d.ts +1 -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 +13 -2
- 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/individual/AdyenIndividual.d.ts +12 -0
- 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 +11 -0
- package/dist/types/embeds/sign-pci/AdyenSignPci.d.ts +15 -0
- package/dist/types/embeds/terms-of-service/AdyenTermsOfService.d.ts +12 -0
- package/dist/types/embeds/transfer-instrument/AdyenTransferInstrument.d.ts +15 -0
- 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 +15 -18
- package/dist/types/hooks/useFormComposer.d.ts +2 -2
- package/dist/types/hooks/useMultiForm/reducer.d.ts +4 -3
- package/dist/types/hooks/useMultiForm/types.d.ts +0 -39
- package/dist/types/hooks/useMultiForm/useMultiFormAsyncValidator.d.ts +2 -2
- package/dist/types/hooks/useScenarioConfiguration.d.ts +5 -5
- package/dist/types/language/utils.d.ts +1 -1
- 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/{core/models → types/datasets}/country-code.d.ts +2 -1
- 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 -6
- package/dist/types/utils/entityStatusUtil.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/getLegalEntityCountry.d.ts +1 -1
- package/dist/types/utils/getSSNType.d.ts +1 -1
- package/dist/types/utils/mapping/mapExistingFile.d.ts +1 -1
- package/dist/types/utils/mapping/utils.d.ts +7 -10
- 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/postalCodePatterns.d.ts +1 -1
- package/dist/types/utils/trackNavigation.d.ts +1 -2
- 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 +5 -3
- package/dist/types/utils/verification/helpers/verifyIdNumber.d.ts +2 -2
- package/dist/{useMultiForm-Lh2i5tRJ.js → useMultiForm-Bwx2nVhh.js} +4 -3
- package/dist/{useOnboardingStatus-D1ym3MHp.js → useOnboardingStatus-Cwba-HzS.js} +2 -2
- package/dist/{useSalesChannelsSettings-BGuBY0ls.js → useSalesChannelsSettings-BLzegVJh.js} +2 -2
- package/dist/{useTermsOfServiceStatus-DGZYHVsm.js → useTermsOfServiceStatus-C-i9mF4m.js} +4 -4
- package/dist/{useUpdateLegalEntity-By6uwPUg.js → useUpdateLegalEntity-xQlAqIqy.js} +2 -2
- package/dist/{utils-BPrqY9DW.js → utils-DXv7uAh6.js} +4 -4
- package/dist/{validate-Dyb8B4Hi.js → validate-BN5p-GhK.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 +1 -1
- package/dist/{yaml-Ba_Tz8d4.js → yaml-jFdy-qnY.js} +2 -2
- package/package.json +32 -31
- package/dist/CXEL7IU7-B_FIdhoh.js +0 -55
- package/dist/Confirm-okTxq40p.js +0 -56
- package/dist/ContractViewer-BChszuWL.js +0 -980
- 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/Spacer-BK3jDget.js +0 -18
- package/dist/StepProgressIndicator-BuGfVdlr.js +0 -74
- package/dist/documentUtils-51iMbUyU.js +0 -226
- package/dist/dropinUtils-Bk0T79SK.js +0 -204
- package/dist/individualFormConfig-BrFLPTfr.js +0 -171
- package/dist/mapExistingFile-BE74t9jV.js +0 -25
- package/dist/mapTransferInstrumentToPayoutAccount-DR8zv8gS.js +0 -30
- package/dist/omitObscuredFieldsIfUnchanged-DhCrqm4T.js +0 -28
- package/dist/process-field-configurations-DugpEY9k.js +0 -185
- package/dist/processValidationErrors-RYlNmxB9.js +0 -203
- 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/embeds/ShadowStylesRoot.d.ts +0 -3
- package/dist/useToastContext-CF2xonft.js +0 -21
- package/dist/utils-B1H_8b1P.js +0 -74
- package/dist/validate-wd48TLfx.js +0 -245
- /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,39 +2,22 @@
|
|
|
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] = "445db899-d54f-429c-910c-46ebe44c7ef3", e._sentryDebugIdIdentifier = "sentry-dbid-445db899-d54f-429c-910c-46ebe44c7ef3");
|
|
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 useCreateLegalEntity, a as useUpdateLegalEntity } from "./useUpdateLegalEntity-
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import { u as
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import { F as FormWrapper } from "./FormWrapper-Dvm1o4tC.js";
|
|
21
|
-
import { l as localizeDateString } from "./localizeDateString-KlstHAcM.js";
|
|
22
|
-
import { f as formatObject, g as getProp } from "./utils-B1H_8b1P.js";
|
|
23
|
-
import { m as mapFinancialReportsToFinancialInformation, a as mapFinancialInformationToFinancialReport } from "./mapFinancialReportsToFinancialInformation-Cid31JpK.js";
|
|
24
|
-
import { i as isEeaCountry, f as fieldsPerScenario } from "./individualFormConfig-BrFLPTfr.js";
|
|
25
|
-
import { b as businessFinancingCompanyDetailsValidations, a as businessFinancingParentCompanyDetailsValidations } from "./validate-wd48TLfx.js";
|
|
26
|
-
const MANDATORY_FIELDS_BUSINESS_FINANCING = [
|
|
27
|
-
"company.numberOfEmployees",
|
|
28
|
-
"parentCompany.numberOfEmployees",
|
|
29
|
-
"ultimateParentCompany.numberOfEmployees"
|
|
30
|
-
];
|
|
11
|
+
import { useRef, useEffect, useCallback, useMemo, useState } from "preact/hooks";
|
|
12
|
+
import { u as useCreateLegalEntity, a as useUpdateLegalEntity } from "./useUpdateLegalEntity-xQlAqIqy.js";
|
|
13
|
+
import { bR as reverseMapping, bS as formatObject, bT as isEeaCountry, y as LegalEntityType, ba as cloneObject, p as useApiContext, q as useQuery, r as httpGet, b as useI18nContext, az as Field, bK as Select, C as Typography, ay as createFormUtils, aV as RadioGroup, bU as Link, bq as InputText, bb as currencyByCountry, bV as InputNumber, bW as InputDate, bX as Currency, bY as CURRENCY_FIELD, bZ as InputCurrency, bL as useFormContext, av as getFieldProps, ax as ErrorPanel, b_ as getAddressSchemaForCountry, b$ as COUNTRIES_WITH_STATES_DATASET, c0 as Address, c1 as getAddressSchemaLabelsByCountry, $ as useAnalyticsContext, be as useInvalidateRootLegalEntity, an as useAssociatedLegalEntity, b0 as datasetUtilities, a5 as useToastContext, J as useSettingsContext, K as SettingNames, c2 as getAssociatedLeAnalyticsPayload, bO as getRequiredForms, bP as addValidityToForms, bQ as useFormComposer, c3 as trackNavigation, L as Loader, a3 as Icon, Z as Button, c4 as isValidationError, c5 as processValidationErrors, c6 as isMaintenanceModeError } from "./StoreProvider-BmzY19Td.js";
|
|
14
|
+
import { F as FormContextProvider, a as FormFlow } from "./FormFlow-Bt-mu4Wm.js";
|
|
15
|
+
import { u as useMultiForm } from "./useMultiForm-Bwx2nVhh.js";
|
|
16
|
+
import { F as FormEndState } from "./FormEndState-C3HCmXcw.js";
|
|
17
|
+
import { l as localizeDateString } from "./localizeDateString-QtCjf8Fg.js";
|
|
18
|
+
import { m as mapFinancialReportsToFinancialInformation, a as mapFinancialInformationToFinancialReport } from "./mapFinancialReportsToFinancialInformation-C-2jp0wg.js";
|
|
19
|
+
import { b as businessFinancingMultiformRules } from "./validate-CuwYJGc9.js";
|
|
31
20
|
const businessFinancingBaseMapping = {
|
|
32
|
-
// TODO delete the financialReports keys, they wouldn't get mapped correctly anyway
|
|
33
|
-
numberOfEmployees: "organization.financialReports.employeeCount",
|
|
34
|
-
annualTurnover: "organization.financialReports.annualTurnover",
|
|
35
|
-
netAssets: "organization.financialReports.netAssets",
|
|
36
|
-
financialReportingDate: "organization.financialReports.dateOfFinancialData",
|
|
37
|
-
currency: "organization.financialReports.currencyOfFinancialData",
|
|
38
21
|
legalProceedingsDate: "organization.dateOfInitiationOfLegalProceeding",
|
|
39
22
|
legalInformationInsolvency: "organization.statusOfLegalProceeding",
|
|
40
23
|
legalEntityIdentifier: "organization.globalLegalEntityIdentifier",
|
|
@@ -46,13 +29,7 @@ const businessFinancingBaseMapping = {
|
|
|
46
29
|
"registrationAddress.postalCode": "organization.registeredAddress.postalCode",
|
|
47
30
|
"registrationAddress.stateOrProvince": "organization.registeredAddress.stateOrProvince",
|
|
48
31
|
"registrationAddress.address": "organization.registeredAddress.street",
|
|
49
|
-
"registrationAddress.otherAddressInformation": "organization.registeredAddress.street2"
|
|
50
|
-
"principalPlaceOfBusiness.city": "organization.principalPlaceOfBusiness.city",
|
|
51
|
-
"principalPlaceOfBusiness.country": "organization.principalPlaceOfBusiness.country",
|
|
52
|
-
"principalPlaceOfBusiness.postalCode": "organization.principalPlaceOfBusiness.postalCode",
|
|
53
|
-
"principalPlaceOfBusiness.stateOrProvince": "organization.principalPlaceOfBusiness.stateOrProvince",
|
|
54
|
-
"principalPlaceOfBusiness.address": "organization.principalPlaceOfBusiness.street",
|
|
55
|
-
"principalPlaceOfBusiness.otherAddressInformation": "organization.principalPlaceOfBusiness.street2"
|
|
32
|
+
"registrationAddress.otherAddressInformation": "organization.registeredAddress.street2"
|
|
56
33
|
};
|
|
57
34
|
const businessFinancingComponentsKeyMapping = {
|
|
58
35
|
...businessFinancingBaseMapping
|
|
@@ -61,7 +38,10 @@ const businessFinancingApiKeyMapping = {
|
|
|
61
38
|
...reverseMapping(businessFinancingBaseMapping)
|
|
62
39
|
};
|
|
63
40
|
const mapBusinessFinancingToLegalEntity = (data) => ({
|
|
64
|
-
...formatObject(
|
|
41
|
+
...formatObject(
|
|
42
|
+
data,
|
|
43
|
+
businessFinancingApiKeyMapping
|
|
44
|
+
)
|
|
65
45
|
});
|
|
66
46
|
var BusinessFinancingPagesEnums = /* @__PURE__ */ ((BusinessFinancingPagesEnums2) => {
|
|
67
47
|
BusinessFinancingPagesEnums2["COMPANY_PAGE"] = "company";
|
|
@@ -111,7 +91,6 @@ const parentCompaniesSchemaKeys = [
|
|
|
111
91
|
"numberOfEmployees",
|
|
112
92
|
"doesYourCompanyHaveLEI",
|
|
113
93
|
"legalEntityIdentifier",
|
|
114
|
-
"doesNotKnowNumberOfEmployees",
|
|
115
94
|
"isThisAddressTheMainHeadquarters",
|
|
116
95
|
"financialReportingDate",
|
|
117
96
|
"currency",
|
|
@@ -164,6 +143,15 @@ const entityHasUltimateParentCompany = (data) => {
|
|
|
164
143
|
var _a, _b;
|
|
165
144
|
return ((_a = data.company) == null ? void 0 : _a.isParentOwnedByAnotherCompany) && ((_b = data.company) == null ? void 0 : _b.isParentOwnedByAnotherCompany) === "Yes";
|
|
166
145
|
};
|
|
146
|
+
const financialReportsToString = (financialReports) => {
|
|
147
|
+
return {
|
|
148
|
+
...financialReports,
|
|
149
|
+
numberOfEmployees: financialReports.numberOfEmployees ? financialReports.numberOfEmployees.toString() : void 0,
|
|
150
|
+
netAssets: financialReports.netAssets ? financialReports.netAssets.toString() : void 0,
|
|
151
|
+
annualTurnover: financialReports.annualTurnover ? financialReports.annualTurnover.toString() : void 0,
|
|
152
|
+
balanceSheetTotal: financialReports.balanceSheetTotal ? financialReports.balanceSheetTotal.toString() : void 0
|
|
153
|
+
};
|
|
154
|
+
};
|
|
167
155
|
const prepareBusinessFinancingSubmitData = (businessFinancingIndex, data, rootLegalEntity) => {
|
|
168
156
|
var _a, _b, _c;
|
|
169
157
|
const businessFinancingData = data[businessFinancingIndex];
|
|
@@ -174,15 +162,18 @@ const prepareBusinessFinancingSubmitData = (businessFinancingIndex, data, rootLe
|
|
|
174
162
|
if (businessFinancingIndex === BusinessFinancingIndex.ULTIMATE_PARENT_COMPANY && (!entityHasUltimateParentCompany(data) || !entityHasParentCompany(data))) {
|
|
175
163
|
return null;
|
|
176
164
|
}
|
|
177
|
-
const businessFinancingDetails = mapBusinessFinancingToLegalEntity(
|
|
178
|
-
businessFinancingData
|
|
179
|
-
);
|
|
165
|
+
const businessFinancingDetails = mapBusinessFinancingToLegalEntity(businessFinancingData);
|
|
180
166
|
if (!businessFinancingDetails.organization) return null;
|
|
181
167
|
const businessFinancingCountry = ((_a = businessFinancingDetails.organization.registeredAddress) == null ? void 0 : _a.country) || ((_c = (_b = rootLegalEntity == null ? void 0 : rootLegalEntity.organization) == null ? void 0 : _b.registeredAddress) == null ? void 0 : _c.country);
|
|
182
|
-
if (
|
|
183
|
-
const
|
|
184
|
-
businessFinancingData
|
|
185
|
-
|
|
168
|
+
if (businessFinancingData.financialReportingDate && isEeaCountry(businessFinancingCountry)) {
|
|
169
|
+
const finReports = {
|
|
170
|
+
currency: businessFinancingData.currency,
|
|
171
|
+
financialReportingDate: businessFinancingData.financialReportingDate,
|
|
172
|
+
numberOfEmployees: businessFinancingData.numberOfEmployees ? Number(businessFinancingData.numberOfEmployees) : void 0,
|
|
173
|
+
netAssets: businessFinancingData.netAssets ? Number(businessFinancingData.netAssets) : void 0,
|
|
174
|
+
annualTurnover: businessFinancingData.annualTurnover ? Number(businessFinancingData.annualTurnover) : void 0
|
|
175
|
+
};
|
|
176
|
+
const businessFinancingFinancialReport = mapFinancialInformationToFinancialReport(finReports);
|
|
186
177
|
businessFinancingDetails.organization.financialReports = [businessFinancingFinancialReport];
|
|
187
178
|
}
|
|
188
179
|
if (!isEeaCountry(businessFinancingCountry)) {
|
|
@@ -218,11 +209,19 @@ const appendBusinessFinancingData = (legalOrganization, businessFinancingData) =
|
|
|
218
209
|
let financialReportData = {};
|
|
219
210
|
if (legalOrganization.financialReports) {
|
|
220
211
|
const financialReportsArray = Array.isArray(legalOrganization.financialReports) ? legalOrganization.financialReports : [legalOrganization.financialReports];
|
|
221
|
-
|
|
212
|
+
const financialInformationSchema = mapFinancialReportsToFinancialInformation(
|
|
213
|
+
financialReportsArray,
|
|
214
|
+
false
|
|
215
|
+
);
|
|
216
|
+
financialReportData = financialReportsToString(financialInformationSchema);
|
|
217
|
+
if (financialReportData.numberOfEmployees) {
|
|
218
|
+
financialReportData.numberOfEmployees = financialReportData.numberOfEmployees.toString();
|
|
219
|
+
}
|
|
222
220
|
}
|
|
223
221
|
return {
|
|
224
222
|
...clonedBusinessFinancingData,
|
|
225
223
|
...financialReportData,
|
|
224
|
+
numberOfEmployees: financialReportData.numberOfEmployees ? financialReportData.numberOfEmployees.toString() : void 0,
|
|
226
225
|
doesYourCompanyHaveLEI: legalOrganization.globalLegalEntityIdentifier ? "Yes" : "No",
|
|
227
226
|
isThisAddressTheMainHeadquarters: legalOrganization.principalPlaceOfBusiness ? "Yes" : clonedBusinessFinancingData.isThisAddressTheMainHeadquarters
|
|
228
227
|
};
|
|
@@ -284,6 +283,39 @@ const getParentCompanySchemaKeys = (currentData, schemaKeys) => {
|
|
|
284
283
|
}
|
|
285
284
|
return schemaKeys.filter((field) => !fieldsToRemove.includes(field));
|
|
286
285
|
};
|
|
286
|
+
const getBusinessFinancingRequiredFields = (data) => {
|
|
287
|
+
let requiredFields = {
|
|
288
|
+
company: companySchemaKeys
|
|
289
|
+
};
|
|
290
|
+
if (!data) {
|
|
291
|
+
return requiredFields;
|
|
292
|
+
}
|
|
293
|
+
const { company, parentCompany = {}, ultimateParentCompany = {} } = data;
|
|
294
|
+
if (company) {
|
|
295
|
+
requiredFields.company = getCompanySchemaKeys("NL", company, companySchemaKeys);
|
|
296
|
+
}
|
|
297
|
+
if ((company == null ? void 0 : company.isCompanyOwnedByAnotherCompany) === "Yes") {
|
|
298
|
+
const parentCompanyRequiredFields = getParentCompanySchemaKeys(
|
|
299
|
+
parentCompany,
|
|
300
|
+
parentCompaniesSchemaKeys
|
|
301
|
+
);
|
|
302
|
+
requiredFields = {
|
|
303
|
+
...requiredFields,
|
|
304
|
+
parentCompany: parentCompanyRequiredFields
|
|
305
|
+
};
|
|
306
|
+
}
|
|
307
|
+
if ((company == null ? void 0 : company.isParentOwnedByAnotherCompany) === "Yes") {
|
|
308
|
+
const ultimateParentCompanyRequiredFields = getParentCompanySchemaKeys(
|
|
309
|
+
ultimateParentCompany,
|
|
310
|
+
parentCompaniesSchemaKeys
|
|
311
|
+
);
|
|
312
|
+
requiredFields = {
|
|
313
|
+
...requiredFields,
|
|
314
|
+
ultimateParentCompany: ultimateParentCompanyRequiredFields
|
|
315
|
+
};
|
|
316
|
+
}
|
|
317
|
+
return requiredFields;
|
|
318
|
+
};
|
|
287
319
|
const customLabels = {
|
|
288
320
|
company: {
|
|
289
321
|
legalForm: "businessStructure",
|
|
@@ -325,7 +357,7 @@ const getFormattedAmount = (value, currency) => {
|
|
|
325
357
|
const formattedValue = Number(value).toLocaleString(userLocale);
|
|
326
358
|
return `${currency} ${formattedValue}`;
|
|
327
359
|
};
|
|
328
|
-
const formatDataForSummary = (
|
|
360
|
+
const formatDataForSummary = (i18n, datasetUtils, data) => {
|
|
329
361
|
var _a, _b, _c, _d, _e;
|
|
330
362
|
const summaryData = cloneObject(data) || {};
|
|
331
363
|
if (summaryData.company) {
|
|
@@ -389,10 +421,6 @@ const formatDataForSummary = (data, i18n, datasetUtils) => {
|
|
|
389
421
|
}
|
|
390
422
|
return summaryData;
|
|
391
423
|
};
|
|
392
|
-
const canSubmit = (data) => MANDATORY_FIELDS_BUSINESS_FINANCING.every((detail) => {
|
|
393
|
-
const value = getProp(data, detail);
|
|
394
|
-
return !isEmpty(value);
|
|
395
|
-
});
|
|
396
424
|
const mapLegalEntityToBusinessFinancing = (legalEntity) => formatObject(legalEntity, businessFinancingComponentsKeyMapping);
|
|
397
425
|
const getLegalForms = async (countryCode, baseUrl) => {
|
|
398
426
|
return httpGet({
|
|
@@ -417,33 +445,45 @@ function LegalFormField({
|
|
|
417
445
|
readonly,
|
|
418
446
|
handleChangeFor,
|
|
419
447
|
helperText,
|
|
420
|
-
countryCode
|
|
421
|
-
classNameModifiers = []
|
|
448
|
+
countryCode
|
|
422
449
|
}) {
|
|
423
450
|
const { i18n } = useI18nContext();
|
|
424
451
|
const { data: legalFormsData } = useLegalForms(countryCode);
|
|
425
|
-
const
|
|
452
|
+
const handleChangeForRef = useRef(handleChangeFor);
|
|
453
|
+
useEffect(() => {
|
|
454
|
+
handleChangeForRef.current = handleChangeFor;
|
|
455
|
+
}, [handleChangeFor]);
|
|
456
|
+
const handleChangeForLegalForm = useCallback(
|
|
457
|
+
(e) => {
|
|
458
|
+
const legalFormEvent = {
|
|
459
|
+
target: {
|
|
460
|
+
name: "legalForm",
|
|
461
|
+
value: e.target.value
|
|
462
|
+
}
|
|
463
|
+
};
|
|
464
|
+
handleChangeFor("legalForm")(legalFormEvent);
|
|
465
|
+
},
|
|
466
|
+
[handleChangeFor]
|
|
467
|
+
);
|
|
468
|
+
useEffect(() => {
|
|
426
469
|
var _a;
|
|
427
|
-
const legalFormValue = e.target.value;
|
|
428
470
|
const selectedLabel = (_a = legalFormsData == null ? void 0 : legalFormsData.find(
|
|
429
|
-
(legalForm) => legalForm.id ===
|
|
471
|
+
(legalForm) => legalForm.id === data.legalForm
|
|
430
472
|
)) == null ? void 0 : _a.name;
|
|
431
473
|
const legalFormEvent = {
|
|
432
474
|
target: {
|
|
433
|
-
name: "
|
|
434
|
-
value:
|
|
435
|
-
label: selectedLabel
|
|
475
|
+
name: "legalFormLabel",
|
|
476
|
+
value: selectedLabel
|
|
436
477
|
}
|
|
437
478
|
};
|
|
438
|
-
|
|
439
|
-
};
|
|
479
|
+
handleChangeForRef.current("legalFormLabel")(legalFormEvent);
|
|
480
|
+
}, [data.legalForm, legalFormsData]);
|
|
440
481
|
return /* @__PURE__ */ jsx(
|
|
441
482
|
Field,
|
|
442
483
|
{
|
|
443
484
|
name,
|
|
444
485
|
label: label || i18n.get("businessStructure"),
|
|
445
486
|
errorMessage,
|
|
446
|
-
classNameModifiers,
|
|
447
487
|
isValid: valid.legalForm,
|
|
448
488
|
helper: helperText == null ? void 0 : helperText.legalForm,
|
|
449
489
|
children: (childProps) => /* @__PURE__ */ jsx(
|
|
@@ -483,33 +523,40 @@ function NaceCodeField({
|
|
|
483
523
|
label,
|
|
484
524
|
readonly,
|
|
485
525
|
handleChangeFor,
|
|
486
|
-
helperText
|
|
487
|
-
classNameModifiers = []
|
|
526
|
+
helperText
|
|
488
527
|
}) {
|
|
489
528
|
const { i18n } = useI18nContext();
|
|
490
529
|
const { data: naceCodesData } = useNaceCodes();
|
|
530
|
+
const handleChangeForRef = useRef(handleChangeFor);
|
|
531
|
+
useEffect(() => {
|
|
532
|
+
handleChangeForRef.current = handleChangeFor;
|
|
533
|
+
}, [handleChangeFor]);
|
|
491
534
|
const handleChangeForNaceCode = (e) => {
|
|
492
|
-
var _a;
|
|
493
|
-
const naceCodeFormValue = e.target.value;
|
|
494
|
-
const selectedLabel = (_a = naceCodesData == null ? void 0 : naceCodesData.find(
|
|
495
|
-
(naceCode) => naceCode.id === naceCodeFormValue
|
|
496
|
-
)) == null ? void 0 : _a.name;
|
|
497
535
|
const naceCodeEvent = {
|
|
498
536
|
target: {
|
|
499
537
|
name: "naceCode",
|
|
500
|
-
value: e.target.value
|
|
501
|
-
label: selectedLabel
|
|
538
|
+
value: e.target.value
|
|
502
539
|
}
|
|
503
540
|
};
|
|
504
541
|
handleChangeFor("naceCode")(naceCodeEvent);
|
|
505
542
|
};
|
|
543
|
+
useEffect(() => {
|
|
544
|
+
var _a;
|
|
545
|
+
const selectedLabel = (_a = naceCodesData == null ? void 0 : naceCodesData.find((naceCode) => naceCode.id === data.naceCode)) == null ? void 0 : _a.name;
|
|
546
|
+
const naceCodeEvent = {
|
|
547
|
+
target: {
|
|
548
|
+
name: "naceCodeLabel",
|
|
549
|
+
value: selectedLabel
|
|
550
|
+
}
|
|
551
|
+
};
|
|
552
|
+
handleChangeForRef.current("naceCodeLabel")(naceCodeEvent);
|
|
553
|
+
}, [data.naceCode, naceCodesData]);
|
|
506
554
|
return /* @__PURE__ */ jsx(
|
|
507
555
|
Field,
|
|
508
556
|
{
|
|
509
557
|
name,
|
|
510
558
|
label: label || i18n.get("industryAndNaceCode"),
|
|
511
559
|
errorMessage,
|
|
512
|
-
classNameModifiers,
|
|
513
560
|
isValid: valid.naceCode,
|
|
514
561
|
helper: helperText == null ? void 0 : helperText.naceCode,
|
|
515
562
|
children: (childProps) => /* @__PURE__ */ jsx(
|
|
@@ -527,51 +574,44 @@ function NaceCodeField({
|
|
|
527
574
|
}
|
|
528
575
|
);
|
|
529
576
|
}
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
577
|
+
const businessInformationFields = [
|
|
578
|
+
"legalForm",
|
|
579
|
+
"naceCode",
|
|
580
|
+
"naceCodeLabel",
|
|
581
|
+
"legalFormLabel",
|
|
582
|
+
"doesYourCompanyHaveLEI",
|
|
583
|
+
"legalEntityIdentifier"
|
|
584
|
+
];
|
|
585
|
+
function BusinessFinancingBusinessInformation(props) {
|
|
586
|
+
const {
|
|
587
|
+
data,
|
|
588
|
+
valid,
|
|
589
|
+
errors,
|
|
590
|
+
country,
|
|
591
|
+
handleFieldChange,
|
|
592
|
+
fieldValidationErrors,
|
|
593
|
+
targetPage,
|
|
594
|
+
sectionHeading
|
|
595
|
+
} = props;
|
|
542
596
|
const { i18n } = useI18nContext();
|
|
597
|
+
const formUtils = createFormUtils(props, i18n);
|
|
598
|
+
if (!handleFieldChange) {
|
|
599
|
+
return;
|
|
600
|
+
}
|
|
543
601
|
const isMainCompany = targetPage === BusinessFinancingPagesEnums.COMPANY_PAGE;
|
|
544
|
-
const companyCountry = targetPage === BusinessFinancingPagesEnums.COMPANY_PAGE ? country : (_a = data == null ? void 0 : data.registrationAddress) == null ? void 0 : _a.country;
|
|
545
|
-
const handleChangeWithLabel = (key) => (e) => {
|
|
546
|
-
const labelKey = `${key}Label`;
|
|
547
|
-
const fieldEvent = {
|
|
548
|
-
target: {
|
|
549
|
-
name: key,
|
|
550
|
-
value: e.target.value
|
|
551
|
-
}
|
|
552
|
-
};
|
|
553
|
-
const labelEvent = {
|
|
554
|
-
target: {
|
|
555
|
-
name: labelKey,
|
|
556
|
-
value: e.target.label
|
|
557
|
-
}
|
|
558
|
-
};
|
|
559
|
-
handleChangeFor(key)(fieldEvent);
|
|
560
|
-
handleChangeFor(labelKey)(labelEvent);
|
|
561
|
-
};
|
|
562
602
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
563
603
|
/* @__PURE__ */ jsx(Typography, { el: "h3", variant: "title", children: i18n.get(sectionHeading || "yourBusinessInformation") }),
|
|
564
604
|
/* @__PURE__ */ jsx(
|
|
565
605
|
LegalFormField,
|
|
566
606
|
{
|
|
567
607
|
name: "legalForm",
|
|
568
|
-
countryCode:
|
|
608
|
+
countryCode: country,
|
|
569
609
|
data: {
|
|
570
|
-
legalForm: data.legalForm
|
|
610
|
+
legalForm: data == null ? void 0 : data.legalForm
|
|
571
611
|
},
|
|
572
|
-
valid: { legalForm: valid.legalForm },
|
|
573
|
-
errorMessage: formUtils.getErrorMessage("legalForm", errors,
|
|
574
|
-
handleChangeFor:
|
|
612
|
+
valid: { legalForm: valid == null ? void 0 : valid.legalForm },
|
|
613
|
+
errorMessage: formUtils.getErrorMessage("legalForm", errors, fieldValidationErrors),
|
|
614
|
+
handleChangeFor: handleFieldChange,
|
|
575
615
|
readonly: false,
|
|
576
616
|
label: formUtils.getLabel("legalForm", "businessStructure")
|
|
577
617
|
}
|
|
@@ -580,10 +620,10 @@ function BusinessFinancingBusinessInformation({
|
|
|
580
620
|
NaceCodeField,
|
|
581
621
|
{
|
|
582
622
|
name: "naceCode",
|
|
583
|
-
data: { naceCode: data.naceCode },
|
|
584
|
-
valid: { naceCode: valid.naceCode },
|
|
585
|
-
errorMessage: formUtils.getErrorMessage("naceCode", errors,
|
|
586
|
-
handleChangeFor:
|
|
623
|
+
data: { naceCode: data == null ? void 0 : data.naceCode },
|
|
624
|
+
valid: { naceCode: valid == null ? void 0 : valid.naceCode },
|
|
625
|
+
errorMessage: formUtils.getErrorMessage("naceCode", errors, fieldValidationErrors),
|
|
626
|
+
handleChangeFor: handleFieldChange,
|
|
587
627
|
readonly: false,
|
|
588
628
|
label: formUtils.getLabel("naceCode", "industryAndNaceCode")
|
|
589
629
|
}
|
|
@@ -600,29 +640,37 @@ function BusinessFinancingBusinessInformation({
|
|
|
600
640
|
" ",
|
|
601
641
|
/* @__PURE__ */ jsx(Link, { href: "https://search.gleif.org/#/search/", external: true, inline: true, children: i18n.get("lookUpYourLEI") })
|
|
602
642
|
] }),
|
|
603
|
-
errorMessage: formUtils.getErrorMessage(
|
|
643
|
+
errorMessage: formUtils.getErrorMessage(
|
|
644
|
+
"doesYourCompanyHaveLEI",
|
|
645
|
+
errors,
|
|
646
|
+
fieldValidationErrors
|
|
647
|
+
),
|
|
604
648
|
children: (childProps) => /* @__PURE__ */ jsx(
|
|
605
649
|
RadioGroup,
|
|
606
650
|
{
|
|
607
651
|
...childProps,
|
|
608
652
|
name: "doesYourCompanyHaveLEI",
|
|
609
653
|
items: isMainCompany ? businessFinancingRadioItems : businessFinancingParentRadioItems,
|
|
610
|
-
value: data.doesYourCompanyHaveLEI,
|
|
654
|
+
value: data == null ? void 0 : data.doesYourCompanyHaveLEI,
|
|
611
655
|
disabled: false,
|
|
612
|
-
onChange:
|
|
656
|
+
onChange: handleFieldChange("doesYourCompanyHaveLEI"),
|
|
613
657
|
"aria-required": true,
|
|
614
|
-
"aria-invalid": !valid.doesYourCompanyHaveLEI
|
|
658
|
+
"aria-invalid": !(valid == null ? void 0 : valid.doesYourCompanyHaveLEI)
|
|
615
659
|
}
|
|
616
660
|
)
|
|
617
661
|
}
|
|
618
662
|
),
|
|
619
|
-
data.doesYourCompanyHaveLEI === "Yes" && /* @__PURE__ */ jsx(
|
|
663
|
+
(data == null ? void 0 : data.doesYourCompanyHaveLEI) === "Yes" && /* @__PURE__ */ jsx(
|
|
620
664
|
Field,
|
|
621
665
|
{
|
|
622
666
|
name: "legalEntityIdentifier",
|
|
623
667
|
label: formUtils.getLabel("legalEntityIdentifier", "legalEntityIdentifier"),
|
|
624
|
-
errorMessage: formUtils.getErrorMessage(
|
|
625
|
-
|
|
668
|
+
errorMessage: formUtils.getErrorMessage(
|
|
669
|
+
"legalEntityIdentifier",
|
|
670
|
+
errors,
|
|
671
|
+
fieldValidationErrors
|
|
672
|
+
),
|
|
673
|
+
isValid: valid == null ? void 0 : valid.legalEntityIdentifier,
|
|
626
674
|
helper: i18n.get("enterNCharactersWithAMixForExample", {
|
|
627
675
|
values: {
|
|
628
676
|
numChars: 20,
|
|
@@ -634,14 +682,13 @@ function BusinessFinancingBusinessInformation({
|
|
|
634
682
|
{
|
|
635
683
|
...childProps,
|
|
636
684
|
name: "legalEntityIdentifier",
|
|
637
|
-
value: data.legalEntityIdentifier,
|
|
685
|
+
value: data == null ? void 0 : data.legalEntityIdentifier,
|
|
638
686
|
readonly: false,
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
onBlur: handleChangeFor("legalEntityIdentifier", "blur"),
|
|
687
|
+
onInput: handleFieldChange("legalEntityIdentifier", "input"),
|
|
688
|
+
onBlur: handleFieldChange("legalEntityIdentifier", "blur"),
|
|
642
689
|
"aria-required": true,
|
|
643
|
-
"aria-invalid": !valid.legalEntityIdentifier,
|
|
644
|
-
isValid: valid.legalEntityIdentifier
|
|
690
|
+
"aria-invalid": !(valid == null ? void 0 : valid.legalEntityIdentifier),
|
|
691
|
+
isValid: valid == null ? void 0 : valid.legalEntityIdentifier
|
|
645
692
|
}
|
|
646
693
|
)
|
|
647
694
|
}
|
|
@@ -649,31 +696,28 @@ function BusinessFinancingBusinessInformation({
|
|
|
649
696
|
] });
|
|
650
697
|
}
|
|
651
698
|
const TODAY_DATE$1 = (/* @__PURE__ */ new Date()).toISOString().split("T")[0];
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
}
|
|
663
|
-
var _a;
|
|
699
|
+
const financialInformationFields = [
|
|
700
|
+
"numberOfEmployees",
|
|
701
|
+
"financialReportingDate",
|
|
702
|
+
"doesYourCompanyHaveLEI",
|
|
703
|
+
"legalEntityIdentifier",
|
|
704
|
+
"currency",
|
|
705
|
+
"netAssets",
|
|
706
|
+
"annualTurnover"
|
|
707
|
+
];
|
|
708
|
+
function BusinessFinancingFinancialInformation(props) {
|
|
709
|
+
const { data, valid, errors, country, sectionHeading, handleFieldChange, fieldValidationErrors } = props;
|
|
664
710
|
const { i18n } = useI18nContext();
|
|
711
|
+
const formUtils = createFormUtils(props, i18n);
|
|
712
|
+
const currenciesForCurrCountry = useMemo(() => currencyByCountry[country] ?? [], [country]);
|
|
713
|
+
if (!handleFieldChange) {
|
|
714
|
+
return;
|
|
715
|
+
}
|
|
665
716
|
const financialData = data;
|
|
666
717
|
const financialErrors = errors;
|
|
667
718
|
const isFinancialDataValid = valid;
|
|
668
|
-
const currenciesForCurrCountry = useMemo(() => currencyByCountry[country] ?? [], [country]);
|
|
669
719
|
const [firstCurrency] = currenciesForCurrCountry;
|
|
670
720
|
const defaultCurrency = firstCurrency ?? "EUR";
|
|
671
|
-
useEffect(() => {
|
|
672
|
-
if ((currenciesForCurrCountry == null ? void 0 : currenciesForCurrCountry.length) === 1) {
|
|
673
|
-
financialData.currency = firstCurrency;
|
|
674
|
-
setValidCurrency("currency", true);
|
|
675
|
-
}
|
|
676
|
-
}, [currenciesForCurrCountry, firstCurrency, setValidCurrency, financialData]);
|
|
677
721
|
return /* @__PURE__ */ jsxs("section", { children: [
|
|
678
722
|
/* @__PURE__ */ jsx(Typography, { el: "h3", variant: "title", children: i18n.get(sectionHeading || "financialInformation") }),
|
|
679
723
|
/* @__PURE__ */ jsx(
|
|
@@ -681,21 +725,20 @@ function BusinessFinancingFinancialInformation({
|
|
|
681
725
|
{
|
|
682
726
|
name: "numberOfEmployees",
|
|
683
727
|
label: formUtils.getLabel("numberOfEmployees", "numberOfEmployees"),
|
|
684
|
-
errorMessage: formUtils.getErrorMessage("numberOfEmployees", errors,
|
|
685
|
-
isValid: valid.numberOfEmployees,
|
|
686
|
-
classNameModifiers: ["numberOfEmployees"],
|
|
728
|
+
errorMessage: formUtils.getErrorMessage("numberOfEmployees", errors, fieldValidationErrors),
|
|
729
|
+
isValid: valid == null ? void 0 : valid.numberOfEmployees,
|
|
687
730
|
children: (childProps) => /* @__PURE__ */ jsx(
|
|
688
731
|
InputNumber,
|
|
689
732
|
{
|
|
690
733
|
...childProps,
|
|
691
734
|
"aria-required": true,
|
|
692
|
-
"aria-invalid": !valid.numberOfEmployees,
|
|
735
|
+
"aria-invalid": !(valid == null ? void 0 : valid.numberOfEmployees),
|
|
693
736
|
name: "numberOfEmployees",
|
|
694
737
|
min: "0",
|
|
695
738
|
step: "1",
|
|
696
|
-
value: data.numberOfEmployees,
|
|
697
|
-
onInput:
|
|
698
|
-
onBlur:
|
|
739
|
+
value: data == null ? void 0 : data.numberOfEmployees,
|
|
740
|
+
onInput: handleFieldChange("numberOfEmployees", "input"),
|
|
741
|
+
onBlur: handleFieldChange("numberOfEmployees", "blur")
|
|
699
742
|
}
|
|
700
743
|
)
|
|
701
744
|
}
|
|
@@ -706,19 +749,22 @@ function BusinessFinancingFinancialInformation({
|
|
|
706
749
|
name: "financialReportingDate",
|
|
707
750
|
label: formUtils.getLabel("financialReportingDate", "financialReportingDate"),
|
|
708
751
|
helper: i18n.get("dateOfTotalAssetsCalculation"),
|
|
709
|
-
errorMessage: formUtils.getErrorMessage(
|
|
710
|
-
|
|
711
|
-
|
|
752
|
+
errorMessage: formUtils.getErrorMessage(
|
|
753
|
+
"financialReportingDate",
|
|
754
|
+
errors,
|
|
755
|
+
fieldValidationErrors
|
|
756
|
+
),
|
|
757
|
+
isValid: valid == null ? void 0 : valid.financialReportingDate,
|
|
712
758
|
children: (childProps) => /* @__PURE__ */ jsx(
|
|
713
759
|
InputDate,
|
|
714
760
|
{
|
|
715
761
|
...childProps,
|
|
716
762
|
name: "financialReportingDate",
|
|
717
|
-
value: data.financialReportingDate,
|
|
718
|
-
onInput:
|
|
719
|
-
onBlur:
|
|
763
|
+
value: data == null ? void 0 : data.financialReportingDate,
|
|
764
|
+
onInput: handleFieldChange("financialReportingDate", "input"),
|
|
765
|
+
onBlur: handleFieldChange("financialReportingDate", "blur"),
|
|
720
766
|
"aria-required": true,
|
|
721
|
-
"aria-invalid": !valid.financialReportingDate,
|
|
767
|
+
"aria-invalid": !(valid == null ? void 0 : valid.financialReportingDate),
|
|
722
768
|
max: TODAY_DATE$1
|
|
723
769
|
}
|
|
724
770
|
)
|
|
@@ -727,10 +773,10 @@ function BusinessFinancingFinancialInformation({
|
|
|
727
773
|
/* @__PURE__ */ jsx(
|
|
728
774
|
Currency,
|
|
729
775
|
{
|
|
730
|
-
country
|
|
776
|
+
country,
|
|
731
777
|
data: formUtils.getFieldData(financialData, CURRENCY_FIELD),
|
|
732
|
-
errors: formUtils.getFieldErrors(financialErrors,
|
|
733
|
-
handleChangeFor,
|
|
778
|
+
errors: formUtils.getFieldErrors(financialErrors, fieldValidationErrors, CURRENCY_FIELD),
|
|
779
|
+
handleChangeFor: handleFieldChange,
|
|
734
780
|
labels: { currency: i18n.get("reportingCurrency") },
|
|
735
781
|
readonly: formUtils.isReadOnly("currency"),
|
|
736
782
|
valid: formUtils.getFieldValid(isFinancialDataValid, CURRENCY_FIELD)
|
|
@@ -743,15 +789,15 @@ function BusinessFinancingFinancialInformation({
|
|
|
743
789
|
name: "netAssets",
|
|
744
790
|
label: formUtils.getLabel("netAssets", "totalAssets"),
|
|
745
791
|
helper: i18n.get("totalAssetsHelper"),
|
|
746
|
-
errorMessage: formUtils.getErrorMessage("netAssets", errors,
|
|
792
|
+
errorMessage: formUtils.getErrorMessage("netAssets", errors, fieldValidationErrors),
|
|
747
793
|
children: (childProps) => /* @__PURE__ */ jsx(
|
|
748
794
|
InputCurrency,
|
|
749
795
|
{
|
|
750
796
|
...childProps,
|
|
751
797
|
locale: i18n.locale,
|
|
752
|
-
currency: data.currency ?? defaultCurrency,
|
|
753
|
-
amount: data.netAssets,
|
|
754
|
-
onAmountChanged:
|
|
798
|
+
currency: (data == null ? void 0 : data.currency) ?? defaultCurrency,
|
|
799
|
+
amount: (data == null ? void 0 : data.netAssets) ? Number(data == null ? void 0 : data.netAssets) : void 0,
|
|
800
|
+
onAmountChanged: handleFieldChange("netAssets")
|
|
755
801
|
}
|
|
756
802
|
)
|
|
757
803
|
}
|
|
@@ -762,16 +808,16 @@ function BusinessFinancingFinancialInformation({
|
|
|
762
808
|
name: "annualTurnover",
|
|
763
809
|
label: formUtils.getLabel("annualTurnover", "annualTurnover"),
|
|
764
810
|
helper: i18n.get("annualTurnoverHelper"),
|
|
765
|
-
errorMessage: formUtils.getErrorMessage("annualTurnover", errors,
|
|
811
|
+
errorMessage: formUtils.getErrorMessage("annualTurnover", errors, fieldValidationErrors),
|
|
766
812
|
children: (childProps) => /* @__PURE__ */ jsx(
|
|
767
813
|
InputCurrency,
|
|
768
814
|
{
|
|
769
815
|
...childProps,
|
|
770
816
|
name: "annualTurnover",
|
|
771
817
|
locale: i18n.locale,
|
|
772
|
-
currency: data.currency ?? defaultCurrency,
|
|
773
|
-
amount: data.annualTurnover,
|
|
774
|
-
onAmountChanged:
|
|
818
|
+
currency: (data == null ? void 0 : data.currency) ?? defaultCurrency,
|
|
819
|
+
amount: (data == null ? void 0 : data.annualTurnover) ? Number(data == null ? void 0 : data.annualTurnover) : void 0,
|
|
820
|
+
onAmountChanged: handleFieldChange("annualTurnover")
|
|
775
821
|
}
|
|
776
822
|
)
|
|
777
823
|
}
|
|
@@ -780,16 +826,17 @@ function BusinessFinancingFinancialInformation({
|
|
|
780
826
|
] });
|
|
781
827
|
}
|
|
782
828
|
const TODAY_DATE = (/* @__PURE__ */ new Date()).toISOString().split("T")[0];
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
handleChangeFor,
|
|
790
|
-
sectionHeading
|
|
791
|
-
}) {
|
|
829
|
+
const legalInformationFields = [
|
|
830
|
+
"legalInformationInsolvency",
|
|
831
|
+
"legalProceedingsDate"
|
|
832
|
+
];
|
|
833
|
+
function BusinessFinancingLegalInformation(props) {
|
|
834
|
+
const { data, valid, errors, fieldValidationErrors, handleFieldChange, sectionHeading } = props;
|
|
792
835
|
const { i18n } = useI18nContext();
|
|
836
|
+
const formUtils = createFormUtils(props, i18n);
|
|
837
|
+
if (!handleFieldChange) {
|
|
838
|
+
return;
|
|
839
|
+
}
|
|
793
840
|
const legalInformationInsolvencyItems = [
|
|
794
841
|
{ id: "noLegalActionsTaken", name: i18n.get("no") },
|
|
795
842
|
{ id: "underJudicialAdministration", name: i18n.get("underJudicialAdministration") },
|
|
@@ -797,7 +844,7 @@ function BusinessFinancingLegalInformation({
|
|
|
797
844
|
{ id: "otherLegalMeasures", name: i18n.get("otherLegalMeasures") },
|
|
798
845
|
{ id: "iDontKnow", name: i18n.get("iDontKnow") }
|
|
799
846
|
];
|
|
800
|
-
const showLegalProceedingsDateField = data.legalInformationInsolvency && !["noLegalActionsTaken", "iDontKnow"].includes(data.legalInformationInsolvency);
|
|
847
|
+
const showLegalProceedingsDateField = (data == null ? void 0 : data.legalInformationInsolvency) && !["noLegalActionsTaken", "iDontKnow"].includes(data == null ? void 0 : data.legalInformationInsolvency);
|
|
801
848
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
802
849
|
/* @__PURE__ */ jsx(Typography, { el: "h3", variant: "title", children: i18n.get(sectionHeading || "legalInformation") }),
|
|
803
850
|
/* @__PURE__ */ jsx(
|
|
@@ -808,20 +855,20 @@ function BusinessFinancingLegalInformation({
|
|
|
808
855
|
errorMessage: formUtils.getErrorMessage(
|
|
809
856
|
"legalInformationInsolvency",
|
|
810
857
|
errors,
|
|
811
|
-
|
|
858
|
+
fieldValidationErrors
|
|
812
859
|
),
|
|
813
|
-
isValid: valid.legalInformationInsolvency,
|
|
860
|
+
isValid: valid == null ? void 0 : valid.legalInformationInsolvency,
|
|
814
861
|
children: (childProps) => /* @__PURE__ */ jsx(
|
|
815
862
|
Select,
|
|
816
863
|
{
|
|
817
864
|
...childProps,
|
|
818
|
-
onChange:
|
|
865
|
+
onChange: handleFieldChange("legalInformationInsolvency", "blur"),
|
|
819
866
|
name: "legalInformationInsolvency",
|
|
820
867
|
placeholder: i18n.get("selectOne"),
|
|
821
|
-
selected: data.legalInformationInsolvency,
|
|
868
|
+
selected: data == null ? void 0 : data.legalInformationInsolvency,
|
|
822
869
|
items: legalInformationInsolvencyItems,
|
|
823
870
|
"aria-required": true,
|
|
824
|
-
"aria-invalid": !valid.legalInformationInsolvency
|
|
871
|
+
"aria-invalid": !(valid == null ? void 0 : valid.legalInformationInsolvency)
|
|
825
872
|
}
|
|
826
873
|
)
|
|
827
874
|
}
|
|
@@ -831,19 +878,22 @@ function BusinessFinancingLegalInformation({
|
|
|
831
878
|
{
|
|
832
879
|
name: "legalProceedingsDate",
|
|
833
880
|
label: formUtils.getLabel("legalProceedingsDate", "legalProceedingsDate"),
|
|
834
|
-
errorMessage: formUtils.getErrorMessage(
|
|
835
|
-
|
|
881
|
+
errorMessage: formUtils.getErrorMessage(
|
|
882
|
+
"legalProceedingsDate",
|
|
883
|
+
errors,
|
|
884
|
+
fieldValidationErrors
|
|
885
|
+
),
|
|
886
|
+
isValid: valid == null ? void 0 : valid.legalProceedingsDate,
|
|
836
887
|
children: (childProps) => /* @__PURE__ */ jsx(
|
|
837
888
|
InputDate,
|
|
838
889
|
{
|
|
839
890
|
...childProps,
|
|
840
891
|
name: "legalProceedingsDate",
|
|
841
892
|
value: data.legalProceedingsDate,
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
onBlur: handleChangeFor("legalProceedingsDate", "blur"),
|
|
893
|
+
onInput: handleFieldChange("legalProceedingsDate", "input"),
|
|
894
|
+
onBlur: handleFieldChange("legalProceedingsDate", "blur"),
|
|
845
895
|
"aria-required": true,
|
|
846
|
-
"aria-invalid": !valid.legalProceedingsDate,
|
|
896
|
+
"aria-invalid": !(valid == null ? void 0 : valid.legalProceedingsDate),
|
|
847
897
|
max: TODAY_DATE
|
|
848
898
|
}
|
|
849
899
|
)
|
|
@@ -851,16 +901,17 @@ function BusinessFinancingLegalInformation({
|
|
|
851
901
|
)
|
|
852
902
|
] });
|
|
853
903
|
}
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
handleChangeFor,
|
|
861
|
-
legalEntity
|
|
862
|
-
}) {
|
|
904
|
+
const ownershipStructureFields = [
|
|
905
|
+
"isCompanyOwnedByAnotherCompany",
|
|
906
|
+
"isParentOwnedByAnotherCompany"
|
|
907
|
+
];
|
|
908
|
+
function BusinessFinancingOwnershipStructure(props) {
|
|
909
|
+
const { data, valid, errors = {}, legalEntity, fieldValidationErrors, handleFieldChange } = props;
|
|
863
910
|
const { i18n } = useI18nContext();
|
|
911
|
+
const formUtils = createFormUtils(props, i18n);
|
|
912
|
+
if (!handleFieldChange) {
|
|
913
|
+
return;
|
|
914
|
+
}
|
|
864
915
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
865
916
|
/* @__PURE__ */ jsx(Typography, { el: "h3", variant: "title", children: i18n.get("ownershipStructure") }),
|
|
866
917
|
/* @__PURE__ */ jsx(
|
|
@@ -875,7 +926,7 @@ function BusinessFinancingOwnershipStructure({
|
|
|
875
926
|
errorMessage: formUtils.getErrorMessage(
|
|
876
927
|
"isCompanyOwnedByAnotherCompany",
|
|
877
928
|
errors,
|
|
878
|
-
|
|
929
|
+
fieldValidationErrors
|
|
879
930
|
),
|
|
880
931
|
helper: /* @__PURE__ */ jsx(Typography, { el: "div", variant: "body", color: "secondary", children: /* @__PURE__ */ jsx("span", { children: i18n.get("thisMeansYouHaveAParentCompany") }) }),
|
|
881
932
|
children: (childProps) => /* @__PURE__ */ jsx(
|
|
@@ -884,11 +935,11 @@ function BusinessFinancingOwnershipStructure({
|
|
|
884
935
|
...childProps,
|
|
885
936
|
name: "isCompanyOwnedByAnotherCompany",
|
|
886
937
|
items: businessFinancingRadioItems,
|
|
887
|
-
value: data.isCompanyOwnedByAnotherCompany,
|
|
938
|
+
value: data == null ? void 0 : data.isCompanyOwnedByAnotherCompany,
|
|
888
939
|
disabled: false,
|
|
889
|
-
onChange:
|
|
940
|
+
onChange: handleFieldChange("isCompanyOwnedByAnotherCompany"),
|
|
890
941
|
"aria-required": true,
|
|
891
|
-
"aria-invalid": !valid.isCompanyOwnedByAnotherCompany
|
|
942
|
+
"aria-invalid": !(valid == null ? void 0 : valid.isCompanyOwnedByAnotherCompany)
|
|
892
943
|
}
|
|
893
944
|
)
|
|
894
945
|
}
|
|
@@ -902,9 +953,9 @@ function BusinessFinancingOwnershipStructure({
|
|
|
902
953
|
label: formUtils.getLabel("isParentOwnedByAnotherCompany"),
|
|
903
954
|
helper: /* @__PURE__ */ jsx(Typography, { el: "div", variant: "body", color: "secondary", children: /* @__PURE__ */ jsx("span", { children: i18n.get("thisMeansYouHaveAnUltimateParentCompany") }) }),
|
|
904
955
|
errorMessage: formUtils.getErrorMessage(
|
|
905
|
-
"
|
|
956
|
+
"isCompanyOwnedByAnotherCompany",
|
|
906
957
|
errors,
|
|
907
|
-
|
|
958
|
+
fieldValidationErrors
|
|
908
959
|
),
|
|
909
960
|
children: (childProps) => /* @__PURE__ */ jsx(
|
|
910
961
|
RadioGroup,
|
|
@@ -914,9 +965,9 @@ function BusinessFinancingOwnershipStructure({
|
|
|
914
965
|
items: businessFinancingRadioItems,
|
|
915
966
|
value: data.isParentOwnedByAnotherCompany,
|
|
916
967
|
disabled: false,
|
|
917
|
-
onChange:
|
|
968
|
+
onChange: handleFieldChange("isCompanyOwnedByAnotherCompany"),
|
|
918
969
|
"aria-required": true,
|
|
919
|
-
"aria-invalid": !valid.isParentOwnedByAnotherCompany
|
|
970
|
+
"aria-invalid": !(valid == null ? void 0 : valid.isParentOwnedByAnotherCompany)
|
|
920
971
|
}
|
|
921
972
|
)
|
|
922
973
|
}
|
|
@@ -926,35 +977,15 @@ function BusinessFinancingOwnershipStructure({
|
|
|
926
977
|
function AdditionalFieldsForBusinessFinancingCompany(props) {
|
|
927
978
|
const { i18n } = useI18nContext();
|
|
928
979
|
const {
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
formVerificationErrors,
|
|
933
|
-
legalEntity
|
|
934
|
-
} = props;
|
|
935
|
-
const getFormSchema = useCallback(
|
|
936
|
-
(currentData) => getCompanySchemaKeys(country, currentData, companySchemaKeys),
|
|
937
|
-
[]
|
|
938
|
-
);
|
|
939
|
-
const { handleChangeFor, data, schema, valid, errors, fieldProblems, setValid } = useForm({
|
|
940
|
-
...props,
|
|
941
|
-
schema: getFormSchema,
|
|
942
|
-
defaultData: businessFinancingCompanyDetailsData,
|
|
943
|
-
rules: validators || businessFinancingCompanyDetailsValidations,
|
|
944
|
-
fieldProblems: props == null ? void 0 : props.fieldValidationErrors
|
|
945
|
-
});
|
|
980
|
+
form: { handleChangeFor, data }
|
|
981
|
+
} = useFormContext();
|
|
982
|
+
const { country, formVerificationErrors, legalEntity } = props;
|
|
946
983
|
const formUtils = createFormUtils(props, i18n);
|
|
947
|
-
const
|
|
948
|
-
const
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
valid,
|
|
953
|
-
errors,
|
|
954
|
-
fieldProblems,
|
|
955
|
-
schema
|
|
956
|
-
});
|
|
957
|
-
}, [data, valid, errors, schema, fieldProblems]);
|
|
984
|
+
const handleChange = (fieldName, mode) => handleChangeFor(fieldName, "company", mode);
|
|
985
|
+
const ownershipStructureProps = getFieldProps(props, ownershipStructureFields);
|
|
986
|
+
const businessInformationProps = getFieldProps(props, businessInformationFields);
|
|
987
|
+
const financialInformationProps = getFieldProps(props, financialInformationFields);
|
|
988
|
+
const legalInformationProps = getFieldProps(props, legalInformationFields);
|
|
958
989
|
return /* @__PURE__ */ jsxs("form", { className: "adyen-kyc__high-exposure-company", children: [
|
|
959
990
|
/* @__PURE__ */ jsx(Typography, { el: "h1", variant: "title-l", children: i18n.get("additionalInformationForBusinessFinancing") }),
|
|
960
991
|
/* @__PURE__ */ jsx(Typography, { el: "p", variant: "body", children: i18n.get("beforeSubmittingYourCapitalLoanApplication") }),
|
|
@@ -970,71 +1001,56 @@ function AdditionalFieldsForBusinessFinancingCompany(props) {
|
|
|
970
1001
|
/* @__PURE__ */ jsx(
|
|
971
1002
|
BusinessFinancingBusinessInformation,
|
|
972
1003
|
{
|
|
973
|
-
...
|
|
974
|
-
|
|
975
|
-
errors,
|
|
976
|
-
data,
|
|
977
|
-
valid,
|
|
1004
|
+
...businessInformationProps,
|
|
1005
|
+
handleFieldChange: handleChange,
|
|
978
1006
|
country,
|
|
979
|
-
formUtils,
|
|
980
|
-
fieldProblems,
|
|
981
1007
|
targetPage: BusinessFinancingPagesEnums.COMPANY_PAGE,
|
|
982
|
-
sectionHeading: "yourBusinessInformation"
|
|
1008
|
+
sectionHeading: "yourBusinessInformation",
|
|
1009
|
+
data: formUtils.getFieldData((data == null ? void 0 : data.company) ?? {}, businessInformationFields)
|
|
983
1010
|
}
|
|
984
1011
|
),
|
|
985
1012
|
/* @__PURE__ */ jsx(
|
|
986
1013
|
BusinessFinancingOwnershipStructure,
|
|
987
1014
|
{
|
|
988
|
-
...
|
|
989
|
-
handleChangeFor,
|
|
990
|
-
errors,
|
|
991
|
-
data,
|
|
992
|
-
valid,
|
|
1015
|
+
...ownershipStructureProps,
|
|
993
1016
|
legalEntity,
|
|
994
|
-
|
|
995
|
-
|
|
1017
|
+
handleFieldChange: handleChange,
|
|
1018
|
+
data: formUtils.getFieldData((data == null ? void 0 : data.company) ?? {}, ownershipStructureFields)
|
|
996
1019
|
}
|
|
997
1020
|
),
|
|
998
1021
|
isEeaCountry(country) && /* @__PURE__ */ jsx(
|
|
999
1022
|
BusinessFinancingFinancialInformation,
|
|
1000
1023
|
{
|
|
1001
|
-
...
|
|
1002
|
-
|
|
1003
|
-
errors,
|
|
1004
|
-
data,
|
|
1005
|
-
valid,
|
|
1024
|
+
...financialInformationProps,
|
|
1025
|
+
handleFieldChange: handleChange,
|
|
1006
1026
|
country,
|
|
1007
|
-
formUtils,
|
|
1008
|
-
fieldProblems,
|
|
1009
1027
|
targetPage: BusinessFinancingPagesEnums.COMPANY_PAGE,
|
|
1010
|
-
|
|
1028
|
+
data: formUtils.getFieldData((data == null ? void 0 : data.company) ?? {}, financialInformationFields)
|
|
1011
1029
|
}
|
|
1012
1030
|
),
|
|
1013
1031
|
/* @__PURE__ */ jsx(
|
|
1014
1032
|
BusinessFinancingLegalInformation,
|
|
1015
1033
|
{
|
|
1016
|
-
...
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
formUtils,
|
|
1022
|
-
fieldProblems,
|
|
1023
|
-
targetPage: BusinessFinancingPagesEnums.COMPANY_PAGE
|
|
1034
|
+
...legalInformationProps,
|
|
1035
|
+
country,
|
|
1036
|
+
handleFieldChange: handleChange,
|
|
1037
|
+
targetPage: BusinessFinancingPagesEnums.COMPANY_PAGE,
|
|
1038
|
+
sectionHeading: "legalInformation",
|
|
1039
|
+
data: formUtils.getFieldData((data == null ? void 0 : data.company) ?? {}, legalInformationFields)
|
|
1024
1040
|
}
|
|
1025
1041
|
)
|
|
1026
1042
|
] });
|
|
1027
1043
|
}
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
errors,
|
|
1033
|
-
fieldProblems,
|
|
1034
|
-
handleChangeFor,
|
|
1035
|
-
sectionHeading
|
|
1036
|
-
}) {
|
|
1044
|
+
const basicInformationFields = [
|
|
1045
|
+
"legalName"
|
|
1046
|
+
];
|
|
1047
|
+
function BusinessFinancingBasicCompanyInformation(props) {
|
|
1048
|
+
const { data, valid, errors, fieldValidationErrors, handleFieldChange, sectionHeading } = props;
|
|
1037
1049
|
const { i18n } = useI18nContext();
|
|
1050
|
+
const formUtils = createFormUtils(props, i18n);
|
|
1051
|
+
if (!handleFieldChange) {
|
|
1052
|
+
return;
|
|
1053
|
+
}
|
|
1038
1054
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1039
1055
|
/* @__PURE__ */ jsx(Typography, { el: "h3", variant: "title", children: i18n.get(sectionHeading || "basicCompanyInformation") }),
|
|
1040
1056
|
/* @__PURE__ */ jsx(
|
|
@@ -1042,22 +1058,20 @@ function BusinessFinancingBasicCompanyInformation({
|
|
|
1042
1058
|
{
|
|
1043
1059
|
name: "legalName",
|
|
1044
1060
|
label: formUtils.getLabel("legalName", "legalName"),
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
isValid: valid.legalName,
|
|
1061
|
+
errorMessage: formUtils.getErrorMessage("legalName", errors, fieldValidationErrors),
|
|
1062
|
+
isValid: valid == null ? void 0 : valid.legalName,
|
|
1048
1063
|
helper: i18n.get("legalNameIsUsedToIdentifyABusinessWithTheGovernment"),
|
|
1049
1064
|
children: (childProps) => /* @__PURE__ */ jsx(
|
|
1050
1065
|
InputText,
|
|
1051
1066
|
{
|
|
1052
1067
|
...childProps,
|
|
1053
1068
|
name: "legalName",
|
|
1054
|
-
value: data.legalName,
|
|
1069
|
+
value: data == null ? void 0 : data.legalName,
|
|
1055
1070
|
readonly: false,
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
onBlur: handleChangeFor("legalName", "blur"),
|
|
1071
|
+
onInput: handleFieldChange("legalName", "input"),
|
|
1072
|
+
onBlur: handleFieldChange("legalName", "blur"),
|
|
1059
1073
|
"aria-required": true,
|
|
1060
|
-
"aria-invalid": !valid.legalName
|
|
1074
|
+
"aria-invalid": !(valid == null ? void 0 : valid.legalName)
|
|
1061
1075
|
}
|
|
1062
1076
|
)
|
|
1063
1077
|
}
|
|
@@ -1065,23 +1079,26 @@ function BusinessFinancingBasicCompanyInformation({
|
|
|
1065
1079
|
] });
|
|
1066
1080
|
}
|
|
1067
1081
|
const OPTIONAL_ADDRESS_FIELDS = ["otherAddressInformation"];
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
+
const registeredAddressFields = [
|
|
1083
|
+
"isThisAddressTheMainHeadquarters",
|
|
1084
|
+
"registrationAddress"
|
|
1085
|
+
];
|
|
1086
|
+
function BusinessFinancingRegisteredAddress(props) {
|
|
1087
|
+
var _a;
|
|
1088
|
+
const {
|
|
1089
|
+
data,
|
|
1090
|
+
valid,
|
|
1091
|
+
errors,
|
|
1092
|
+
fieldValidationErrors,
|
|
1093
|
+
shouldValidate,
|
|
1094
|
+
defaultData,
|
|
1095
|
+
handleFieldChange,
|
|
1096
|
+
formId,
|
|
1097
|
+
legalEntity,
|
|
1098
|
+
sectionHeading
|
|
1099
|
+
} = props;
|
|
1082
1100
|
const { i18n } = useI18nContext();
|
|
1083
|
-
const
|
|
1084
|
-
const data = formId === "parentCompany" ? parentCompany : ultimateParentCompany;
|
|
1101
|
+
const formUtils = createFormUtils(props, i18n);
|
|
1085
1102
|
const addressCountry = (_a = data == null ? void 0 : data.registrationAddress) == null ? void 0 : _a.country;
|
|
1086
1103
|
const addressSchema = useMemo(() => {
|
|
1087
1104
|
return getAddressSchemaForCountry(addressCountry).filter((field) => {
|
|
@@ -1091,27 +1108,15 @@ function BusinessFinancingRegisteredAddress({
|
|
|
1091
1108
|
return true;
|
|
1092
1109
|
});
|
|
1093
1110
|
}, [addressCountry]);
|
|
1111
|
+
if (!handleFieldChange) {
|
|
1112
|
+
return;
|
|
1113
|
+
}
|
|
1094
1114
|
const handleRegistrationAddressChange = (state) => {
|
|
1095
1115
|
if (!state.data.country) {
|
|
1096
1116
|
state.data.country = addressCountry;
|
|
1097
1117
|
}
|
|
1098
|
-
|
|
1099
|
-
if (setValid) {
|
|
1100
|
-
setValid("registrationAddress", Boolean(state.isValid));
|
|
1101
|
-
}
|
|
1118
|
+
handleFieldChange("registrationAddress")(state.data);
|
|
1102
1119
|
};
|
|
1103
|
-
useEffect(() => {
|
|
1104
|
-
var _a2, _b2;
|
|
1105
|
-
const countryCurrencies = ((_a2 = data == null ? void 0 : data.registrationAddress) == null ? void 0 : _a2.country) ? currencyByCountry[(_b2 = data == null ? void 0 : data.registrationAddress) == null ? void 0 : _b2.country] : null;
|
|
1106
|
-
if ((countryCurrencies == null ? void 0 : countryCurrencies.length) === 1) {
|
|
1107
|
-
handleChangeFor("currency")({
|
|
1108
|
-
target: {
|
|
1109
|
-
name: "currency",
|
|
1110
|
-
value: countryCurrencies[0]
|
|
1111
|
-
}
|
|
1112
|
-
});
|
|
1113
|
-
}
|
|
1114
|
-
}, [(_b = data == null ? void 0 : data.registrationAddress) == null ? void 0 : _b.country]);
|
|
1115
1120
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1116
1121
|
/* @__PURE__ */ jsx(Typography, { el: "h3", variant: "title", children: i18n.get(sectionHeading || "registeredAddress") }),
|
|
1117
1122
|
/* @__PURE__ */ jsx(Typography, { el: "h3", variant: "caption", children: i18n.get("addressRegisteredWithSecretaryOfState") }),
|
|
@@ -1127,7 +1132,7 @@ function BusinessFinancingRegisteredAddress({
|
|
|
1127
1132
|
errorMessage: formUtils.getErrorMessage(
|
|
1128
1133
|
"isThisAddressTheMainHeadquarters",
|
|
1129
1134
|
errors,
|
|
1130
|
-
|
|
1135
|
+
fieldValidationErrors
|
|
1131
1136
|
),
|
|
1132
1137
|
children: (childProps) => /* @__PURE__ */ jsx(
|
|
1133
1138
|
RadioGroup,
|
|
@@ -1137,9 +1142,9 @@ function BusinessFinancingRegisteredAddress({
|
|
|
1137
1142
|
items: businessFinancingRadioItems,
|
|
1138
1143
|
value: data == null ? void 0 : data.isThisAddressTheMainHeadquarters,
|
|
1139
1144
|
disabled: false,
|
|
1140
|
-
onChange:
|
|
1145
|
+
onChange: handleFieldChange("isThisAddressTheMainHeadquarters"),
|
|
1141
1146
|
"aria-required": true,
|
|
1142
|
-
"aria-invalid": !valid.isThisAddressTheMainHeadquarters
|
|
1147
|
+
"aria-invalid": !(valid == null ? void 0 : valid.isThisAddressTheMainHeadquarters)
|
|
1143
1148
|
}
|
|
1144
1149
|
)
|
|
1145
1150
|
}
|
|
@@ -1162,40 +1167,19 @@ function BusinessFinancingRegisteredAddress({
|
|
|
1162
1167
|
}
|
|
1163
1168
|
const parentCompanyFormId$1 = businessFinancingForms.parentCompany.formId;
|
|
1164
1169
|
function AdditionalFieldsForBusinessFinancingParentCompany(props) {
|
|
1165
|
-
var _a;
|
|
1166
|
-
const {
|
|
1167
|
-
shouldValidate,
|
|
1168
|
-
data: businessFinancingParentCompanyDetailsData,
|
|
1169
|
-
country,
|
|
1170
|
-
formVerificationErrors
|
|
1171
|
-
} = props;
|
|
1170
|
+
var _a, _b, _c, _d, _e, _f;
|
|
1172
1171
|
const { i18n } = useI18nContext();
|
|
1173
|
-
const
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
const { handleChangeFor, data, valid, schema, setValid, errors, fieldProblems } = useForm({
|
|
1178
|
-
...props,
|
|
1179
|
-
schema: getFormSchema,
|
|
1180
|
-
defaultData: businessFinancingParentCompanyDetailsData,
|
|
1181
|
-
rules: businessFinancingParentCompanyDetailsValidations,
|
|
1182
|
-
fieldProblems: props == null ? void 0 : props.fieldValidationErrors,
|
|
1183
|
-
shouldValidate
|
|
1184
|
-
});
|
|
1172
|
+
const {
|
|
1173
|
+
form: { handleChangeFor, data }
|
|
1174
|
+
} = useFormContext();
|
|
1175
|
+
const { country, formVerificationErrors } = props;
|
|
1185
1176
|
const formUtils = createFormUtils(props, i18n);
|
|
1186
|
-
const
|
|
1187
|
-
const
|
|
1188
|
-
|
|
1189
|
-
);
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
data,
|
|
1193
|
-
valid,
|
|
1194
|
-
errors,
|
|
1195
|
-
fieldProblems,
|
|
1196
|
-
schema
|
|
1197
|
-
});
|
|
1198
|
-
}, [data, valid, errors, schema, fieldProblems]);
|
|
1177
|
+
const handleChange = (fieldName, mode) => handleChangeFor(fieldName, "parentCompany", mode);
|
|
1178
|
+
const basicCompanyInformationProps = getFieldProps(props, basicInformationFields);
|
|
1179
|
+
const registeredAddressProps = getFieldProps(props, registeredAddressFields);
|
|
1180
|
+
const businessInformationProps = getFieldProps(props, businessInformationFields);
|
|
1181
|
+
const financialInformationProps = getFieldProps(props, financialInformationFields);
|
|
1182
|
+
const legalInformationProps = getFieldProps(props, legalInformationFields);
|
|
1199
1183
|
return /* @__PURE__ */ jsxs("form", { className: "adyen-kyc__high-exposure-parent-company", children: [
|
|
1200
1184
|
/* @__PURE__ */ jsx(Typography, { el: "h1", variant: "title-l", children: i18n.get("parentCompanyInformation") }),
|
|
1201
1185
|
/* @__PURE__ */ jsx(Typography, { el: "p", variant: "body", children: i18n.get("inThePreviousStepOwnedByAParentCompany") }),
|
|
@@ -1211,116 +1195,72 @@ function AdditionalFieldsForBusinessFinancingParentCompany(props) {
|
|
|
1211
1195
|
/* @__PURE__ */ jsx(
|
|
1212
1196
|
BusinessFinancingBasicCompanyInformation,
|
|
1213
1197
|
{
|
|
1214
|
-
...
|
|
1215
|
-
handleChangeFor: businessFinancingHandleChangeFor,
|
|
1198
|
+
...basicCompanyInformationProps,
|
|
1216
1199
|
sectionHeading: "basicCompanyInformation",
|
|
1217
|
-
|
|
1218
|
-
data,
|
|
1219
|
-
valid,
|
|
1220
|
-
formUtils,
|
|
1221
|
-
fieldProblems
|
|
1200
|
+
handleFieldChange: handleChange,
|
|
1201
|
+
data: formUtils.getFieldData((data == null ? void 0 : data.parentCompany) ?? {}, basicInformationFields)
|
|
1222
1202
|
}
|
|
1223
1203
|
),
|
|
1224
1204
|
/* @__PURE__ */ jsx(
|
|
1225
1205
|
BusinessFinancingRegisteredAddress,
|
|
1226
1206
|
{
|
|
1227
|
-
...
|
|
1207
|
+
...registeredAddressProps,
|
|
1228
1208
|
formId: parentCompanyFormId$1,
|
|
1229
|
-
handleChangeFor: businessFinancingHandleChangeFor,
|
|
1230
1209
|
sectionHeading: "registeredAddress",
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
setValid,
|
|
1235
|
-
formUtils,
|
|
1236
|
-
fieldProblems,
|
|
1237
|
-
targetPage: BusinessFinancingPagesEnums.PARENT_COMPANY_PAGE,
|
|
1238
|
-
shouldValidate
|
|
1210
|
+
defaultData: data == null ? void 0 : data.parentCompany,
|
|
1211
|
+
handleFieldChange: handleChange,
|
|
1212
|
+
data: formUtils.getFieldData((data == null ? void 0 : data.parentCompany) ?? {}, registeredAddressFields)
|
|
1239
1213
|
}
|
|
1240
1214
|
),
|
|
1241
1215
|
/* @__PURE__ */ jsx(
|
|
1242
1216
|
BusinessFinancingBusinessInformation,
|
|
1243
1217
|
{
|
|
1244
|
-
...
|
|
1245
|
-
handleChangeFor: businessFinancingHandleChangeFor,
|
|
1218
|
+
...businessInformationProps,
|
|
1246
1219
|
sectionHeading: "additionalCompanyInformation",
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
formUtils,
|
|
1252
|
-
fieldProblems,
|
|
1253
|
-
targetPage: BusinessFinancingPagesEnums.PARENT_COMPANY_PAGE
|
|
1220
|
+
country: ((_b = (_a = data == null ? void 0 : data.parentCompany) == null ? void 0 : _a.registrationAddress) == null ? void 0 : _b.country) ?? country,
|
|
1221
|
+
targetPage: BusinessFinancingPagesEnums.PARENT_COMPANY_PAGE,
|
|
1222
|
+
handleFieldChange: handleChange,
|
|
1223
|
+
data: formUtils.getFieldData((data == null ? void 0 : data.parentCompany) ?? {}, businessInformationFields)
|
|
1254
1224
|
}
|
|
1255
1225
|
),
|
|
1256
|
-
isEeaCountry((
|
|
1226
|
+
isEeaCountry((_d = (_c = data == null ? void 0 : data.parentCompany) == null ? void 0 : _c.registrationAddress) == null ? void 0 : _d.country) && /* @__PURE__ */ jsx(
|
|
1257
1227
|
BusinessFinancingFinancialInformation,
|
|
1258
1228
|
{
|
|
1259
|
-
...
|
|
1260
|
-
|
|
1261
|
-
errors,
|
|
1262
|
-
data,
|
|
1263
|
-
valid,
|
|
1264
|
-
country,
|
|
1265
|
-
formUtils,
|
|
1266
|
-
fieldProblems,
|
|
1229
|
+
...financialInformationProps,
|
|
1230
|
+
country: ((_f = (_e = data == null ? void 0 : data.parentCompany) == null ? void 0 : _e.registrationAddress) == null ? void 0 : _f.country) ?? country,
|
|
1267
1231
|
targetPage: BusinessFinancingPagesEnums.PARENT_COMPANY_PAGE,
|
|
1268
|
-
|
|
1232
|
+
handleFieldChange: handleChange,
|
|
1233
|
+
data: formUtils.getFieldData((data == null ? void 0 : data.parentCompany) ?? {}, financialInformationFields)
|
|
1269
1234
|
}
|
|
1270
1235
|
),
|
|
1271
1236
|
/* @__PURE__ */ jsx(
|
|
1272
1237
|
BusinessFinancingLegalInformation,
|
|
1273
1238
|
{
|
|
1274
|
-
...
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
formUtils,
|
|
1280
|
-
fieldProblems,
|
|
1281
|
-
targetPage: BusinessFinancingPagesEnums.PARENT_COMPANY_PAGE
|
|
1239
|
+
...legalInformationProps,
|
|
1240
|
+
country,
|
|
1241
|
+
targetPage: BusinessFinancingPagesEnums.PARENT_COMPANY_PAGE,
|
|
1242
|
+
sectionHeading: "legalInformation",
|
|
1243
|
+
handleFieldChange: handleChange,
|
|
1244
|
+
data: formUtils.getFieldData((data == null ? void 0 : data.parentCompany) ?? {}, legalInformationFields)
|
|
1282
1245
|
}
|
|
1283
1246
|
)
|
|
1284
1247
|
] });
|
|
1285
1248
|
}
|
|
1286
1249
|
const ultimateParentCompanyFormId$1 = businessFinancingForms.ultimateParentCompany.formId;
|
|
1287
1250
|
function AdditionalFieldsForBusinessFinancingUltimateParentCompany(props) {
|
|
1288
|
-
var _a;
|
|
1289
|
-
const {
|
|
1290
|
-
data: additionalFieldsForBusinessFinancingUltimateParentCompanyData,
|
|
1291
|
-
validators,
|
|
1292
|
-
formVerificationErrors,
|
|
1293
|
-
country
|
|
1294
|
-
} = props;
|
|
1251
|
+
var _a, _b;
|
|
1252
|
+
const { formVerificationErrors, country } = props;
|
|
1295
1253
|
const { i18n } = useI18nContext();
|
|
1296
|
-
const
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
);
|
|
1300
|
-
const
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
});
|
|
1307
|
-
const formUtils = createFormUtils(
|
|
1308
|
-
props,
|
|
1309
|
-
i18n
|
|
1310
|
-
);
|
|
1311
|
-
const businessFinancingHandleChangeFor = handleChangeFor;
|
|
1312
|
-
const { updateStateSlice } = useGlobalDataSlice(
|
|
1313
|
-
"ultimateParentCompany"
|
|
1314
|
-
);
|
|
1315
|
-
useEffect(() => {
|
|
1316
|
-
updateStateSlice == null ? void 0 : updateStateSlice({
|
|
1317
|
-
data,
|
|
1318
|
-
valid,
|
|
1319
|
-
errors,
|
|
1320
|
-
fieldProblems,
|
|
1321
|
-
schema
|
|
1322
|
-
});
|
|
1323
|
-
}, [data, valid, errors, schema, fieldProblems]);
|
|
1254
|
+
const formUtils = createFormUtils(props, i18n);
|
|
1255
|
+
const {
|
|
1256
|
+
form: { handleChangeFor, data }
|
|
1257
|
+
} = useFormContext();
|
|
1258
|
+
const handleChange = (fieldName, mode) => handleChangeFor(fieldName, "ultimateParentCompany", mode);
|
|
1259
|
+
const basicCompanyInformationProps = getFieldProps(props, basicInformationFields);
|
|
1260
|
+
const registeredAddressProps = getFieldProps(props, registeredAddressFields);
|
|
1261
|
+
const businessInformationProps = getFieldProps(props, businessInformationFields);
|
|
1262
|
+
const financialInformationProps = getFieldProps(props, financialInformationFields);
|
|
1263
|
+
const legalInformationProps = getFieldProps(props, legalInformationFields);
|
|
1324
1264
|
return /* @__PURE__ */ jsxs("form", { className: "adyen-kyc__high-exposure-ultimate-parent-company", children: [
|
|
1325
1265
|
/* @__PURE__ */ jsx(Typography, { el: "h1", variant: "title-l", children: i18n.get("ultimateParentCompanyInformation") }),
|
|
1326
1266
|
/* @__PURE__ */ jsx(Typography, { el: "p", variant: "body", children: i18n.get("inThePreviousStepOwnedByAnUltimateParentCompany") }),
|
|
@@ -1336,76 +1276,69 @@ function AdditionalFieldsForBusinessFinancingUltimateParentCompany(props) {
|
|
|
1336
1276
|
/* @__PURE__ */ jsx(
|
|
1337
1277
|
BusinessFinancingBasicCompanyInformation,
|
|
1338
1278
|
{
|
|
1339
|
-
...
|
|
1340
|
-
handleChangeFor: businessFinancingHandleChangeFor,
|
|
1279
|
+
...basicCompanyInformationProps,
|
|
1341
1280
|
sectionHeading: "businessInformation",
|
|
1342
|
-
|
|
1343
|
-
data,
|
|
1344
|
-
valid,
|
|
1345
|
-
formUtils,
|
|
1346
|
-
fieldProblems
|
|
1281
|
+
handleFieldChange: handleChange,
|
|
1282
|
+
data: formUtils.getFieldData((data == null ? void 0 : data.ultimateParentCompany) ?? {}, basicInformationFields)
|
|
1347
1283
|
}
|
|
1348
1284
|
),
|
|
1349
1285
|
/* @__PURE__ */ jsx(
|
|
1350
1286
|
BusinessFinancingRegisteredAddress,
|
|
1351
1287
|
{
|
|
1352
|
-
...
|
|
1288
|
+
...registeredAddressProps,
|
|
1353
1289
|
formId: ultimateParentCompanyFormId$1,
|
|
1354
|
-
handleChangeFor: businessFinancingHandleChangeFor,
|
|
1355
1290
|
sectionHeading: "registeredAddress",
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
formUtils,
|
|
1360
|
-
fieldProblems,
|
|
1361
|
-
targetPage: BusinessFinancingPagesEnums.ULTIMATE_PARENT_COMPANY_PAGE
|
|
1291
|
+
defaultData: data == null ? void 0 : data.ultimateParentCompany,
|
|
1292
|
+
handleFieldChange: handleChange,
|
|
1293
|
+
data: formUtils.getFieldData((data == null ? void 0 : data.ultimateParentCompany) ?? {}, registeredAddressFields)
|
|
1362
1294
|
}
|
|
1363
1295
|
),
|
|
1364
1296
|
/* @__PURE__ */ jsx(
|
|
1365
1297
|
BusinessFinancingBusinessInformation,
|
|
1366
1298
|
{
|
|
1367
|
-
...
|
|
1368
|
-
handleChangeFor: businessFinancingHandleChangeFor,
|
|
1299
|
+
...businessInformationProps,
|
|
1369
1300
|
sectionHeading: "additionalCompanyInformation",
|
|
1370
|
-
errors,
|
|
1371
|
-
data,
|
|
1372
|
-
valid,
|
|
1373
1301
|
country,
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1302
|
+
targetPage: BusinessFinancingPagesEnums.ULTIMATE_PARENT_COMPANY_PAGE,
|
|
1303
|
+
handleFieldChange: handleChange,
|
|
1304
|
+
data: formUtils.getFieldData((data == null ? void 0 : data.ultimateParentCompany) ?? {}, businessInformationFields)
|
|
1377
1305
|
}
|
|
1378
1306
|
),
|
|
1379
|
-
isEeaCountry((_a = data == null ? void 0 : data.
|
|
1307
|
+
isEeaCountry((_b = (_a = data == null ? void 0 : data.ultimateParentCompany) == null ? void 0 : _a.registrationAddress) == null ? void 0 : _b.country) && /* @__PURE__ */ jsx(
|
|
1380
1308
|
BusinessFinancingFinancialInformation,
|
|
1381
1309
|
{
|
|
1382
|
-
...
|
|
1383
|
-
handleChangeFor: businessFinancingHandleChangeFor,
|
|
1384
|
-
errors,
|
|
1385
|
-
data,
|
|
1386
|
-
valid,
|
|
1310
|
+
...financialInformationProps,
|
|
1387
1311
|
country,
|
|
1388
|
-
formUtils,
|
|
1389
|
-
fieldProblems,
|
|
1390
1312
|
targetPage: BusinessFinancingPagesEnums.ULTIMATE_PARENT_COMPANY_PAGE,
|
|
1391
|
-
|
|
1313
|
+
handleFieldChange: handleChange,
|
|
1314
|
+
data: formUtils.getFieldData(
|
|
1315
|
+
(data == null ? void 0 : data.ultimateParentCompany) ?? {},
|
|
1316
|
+
financialInformationFields
|
|
1317
|
+
)
|
|
1392
1318
|
}
|
|
1393
1319
|
),
|
|
1394
1320
|
/* @__PURE__ */ jsx(
|
|
1395
1321
|
BusinessFinancingLegalInformation,
|
|
1396
1322
|
{
|
|
1397
|
-
...
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
formUtils,
|
|
1403
|
-
fieldProblems,
|
|
1404
|
-
targetPage: BusinessFinancingPagesEnums.ULTIMATE_PARENT_COMPANY_PAGE
|
|
1323
|
+
...legalInformationProps,
|
|
1324
|
+
country,
|
|
1325
|
+
sectionHeading: "legalInformation",
|
|
1326
|
+
targetPage: BusinessFinancingPagesEnums.ULTIMATE_PARENT_COMPANY_PAGE,
|
|
1327
|
+
handleFieldChange: handleChange,
|
|
1328
|
+
data: formUtils.getFieldData((data == null ? void 0 : data.ultimateParentCompany) ?? {}, legalInformationFields)
|
|
1405
1329
|
}
|
|
1406
1330
|
)
|
|
1407
1331
|
] });
|
|
1408
1332
|
}
|
|
1333
|
+
const getOrgAnalyticsData = (prefix, details) => {
|
|
1334
|
+
const org = details == null ? void 0 : details.organization;
|
|
1335
|
+
if (!org) return {};
|
|
1336
|
+
return {
|
|
1337
|
+
[`${prefix}--economicSector`]: (org == null ? void 0 : org.economicSector) ?? "",
|
|
1338
|
+
[`${prefix}--legalForm`]: (org == null ? void 0 : org.legalForm) ?? "",
|
|
1339
|
+
[`${prefix}--statusOfLegalProceeding`]: (org == null ? void 0 : org.statusOfLegalProceeding) ?? ""
|
|
1340
|
+
};
|
|
1341
|
+
};
|
|
1409
1342
|
const businessFinancingFormsRequiredFields = {
|
|
1410
1343
|
company: businessFinancingForms.company.fields,
|
|
1411
1344
|
parentCompany: businessFinancingForms.parentCompany.fields,
|
|
@@ -1414,8 +1347,6 @@ const businessFinancingFormsRequiredFields = {
|
|
|
1414
1347
|
const parentCompanyFormId = businessFinancingForms.parentCompany.formId;
|
|
1415
1348
|
const companyFormId = businessFinancingForms.company.formId;
|
|
1416
1349
|
const ultimateParentCompanyFormId = businessFinancingForms.ultimateParentCompany.formId;
|
|
1417
|
-
const parseBusinessFinancingScenarios = (scenarios) => composePerScenarioFormConfigurations(scenarios, fieldsPerScenario);
|
|
1418
|
-
const parseConfiguration = ({ scenarios }) => parseBusinessFinancingScenarios(scenarios);
|
|
1419
1350
|
function BusinessFinancingDropin(props) {
|
|
1420
1351
|
var _a, _b;
|
|
1421
1352
|
const {
|
|
@@ -1428,7 +1359,6 @@ function BusinessFinancingDropin(props) {
|
|
|
1428
1359
|
} = props;
|
|
1429
1360
|
const userEvents = useAnalyticsContext();
|
|
1430
1361
|
const [defaultData, setDefaultData] = useState();
|
|
1431
|
-
const [data, setData] = useState({});
|
|
1432
1362
|
useRef(null);
|
|
1433
1363
|
const invalidateRootLegalEntity = useInvalidateRootLegalEntity();
|
|
1434
1364
|
const { mutateAsync: createLegalEntity } = useCreateLegalEntity();
|
|
@@ -1437,34 +1367,37 @@ function BusinessFinancingDropin(props) {
|
|
|
1437
1367
|
const { data: ultimateParentCompany, isLoading: ultimateParentCompanyIsLoading } = useAssociatedLegalEntity(rootLegalEntity, "ultimateParentCompany");
|
|
1438
1368
|
const derivedData = useMemo(() => {
|
|
1439
1369
|
if (immediateParentCompanyIsLoading || ultimateParentCompanyIsLoading) return void 0;
|
|
1440
|
-
const
|
|
1441
|
-
|
|
1370
|
+
const dataFromResponse = {};
|
|
1371
|
+
dataFromResponse.company = mapLegalEntityToBusinessFinancing(
|
|
1442
1372
|
rootLegalEntity
|
|
1443
1373
|
);
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1374
|
+
dataFromResponse.company = appendBusinessFinancingData(
|
|
1375
|
+
rootLegalEntity.organization,
|
|
1376
|
+
dataFromResponse.company
|
|
1377
|
+
);
|
|
1378
|
+
dataFromResponse.company.isCompanyOwnedByAnotherCompany = "No";
|
|
1379
|
+
dataFromResponse.company.isParentOwnedByAnotherCompany = "No";
|
|
1447
1380
|
if (immediateParentCompany) {
|
|
1448
|
-
|
|
1381
|
+
dataFromResponse.parentCompany = mapLegalEntityToBusinessFinancing(
|
|
1449
1382
|
immediateParentCompany
|
|
1450
1383
|
);
|
|
1451
|
-
|
|
1384
|
+
dataFromResponse.parentCompany = appendBusinessFinancingData(
|
|
1452
1385
|
immediateParentCompany.organization,
|
|
1453
|
-
|
|
1386
|
+
dataFromResponse.parentCompany
|
|
1454
1387
|
);
|
|
1455
|
-
|
|
1388
|
+
dataFromResponse.company.isCompanyOwnedByAnotherCompany = "Yes";
|
|
1456
1389
|
}
|
|
1457
1390
|
if (ultimateParentCompany) {
|
|
1458
|
-
|
|
1391
|
+
dataFromResponse.ultimateParentCompany = mapLegalEntityToBusinessFinancing(
|
|
1459
1392
|
ultimateParentCompany
|
|
1460
1393
|
);
|
|
1461
|
-
|
|
1394
|
+
dataFromResponse.ultimateParentCompany = appendBusinessFinancingData(
|
|
1462
1395
|
ultimateParentCompany.organization,
|
|
1463
|
-
|
|
1396
|
+
dataFromResponse.ultimateParentCompany
|
|
1464
1397
|
);
|
|
1465
|
-
|
|
1398
|
+
dataFromResponse.company.isParentOwnedByAnotherCompany = "Yes";
|
|
1466
1399
|
}
|
|
1467
|
-
return
|
|
1400
|
+
return dataFromResponse;
|
|
1468
1401
|
}, [
|
|
1469
1402
|
immediateParentCompanyIsLoading,
|
|
1470
1403
|
ultimateParentCompanyIsLoading,
|
|
@@ -1479,10 +1412,9 @@ function BusinessFinancingDropin(props) {
|
|
|
1479
1412
|
}, [userEvents]);
|
|
1480
1413
|
useEffect(() => {
|
|
1481
1414
|
if (derivedData) {
|
|
1482
|
-
|
|
1483
|
-
if (!defaultData) setDefaultData({ ...derivedData });
|
|
1415
|
+
setDefaultData({ ...derivedData });
|
|
1484
1416
|
}
|
|
1485
|
-
}, [derivedData
|
|
1417
|
+
}, [derivedData]);
|
|
1486
1418
|
const { i18n } = useI18nContext();
|
|
1487
1419
|
const datasetUtils = datasetUtilities(i18n.locale);
|
|
1488
1420
|
const [problems, setProblems] = useState();
|
|
@@ -1490,85 +1422,26 @@ function BusinessFinancingDropin(props) {
|
|
|
1490
1422
|
const [showEndState, setShowEndState] = useState(false);
|
|
1491
1423
|
const [businessFinancingRequiredForms, setBusinessFinancingRequiredForms] = useState(businessFinancingForms);
|
|
1492
1424
|
const { showToast } = useToastContext();
|
|
1493
|
-
const { fieldConfigurations } = useScenarioConfiguration({
|
|
1494
|
-
parseConfiguration,
|
|
1495
|
-
legalEntityType: LegalEntityType.ORGANIZATION,
|
|
1496
|
-
setLoadingStatus,
|
|
1497
|
-
country
|
|
1498
|
-
});
|
|
1499
|
-
const derivedProps = useMemo(
|
|
1500
|
-
() => getPropsFromConfigurations(
|
|
1501
|
-
fieldConfigurations,
|
|
1502
|
-
businessFinancingForms,
|
|
1503
|
-
(problems == null ? void 0 : problems.remediationActions) ? Object.values(problems == null ? void 0 : problems.remediationActions) : [],
|
|
1504
|
-
(problems == null ? void 0 : problems.missingData) ?? [],
|
|
1505
|
-
// TODO this is not a valid key mapping so we can't put it here
|
|
1506
|
-
// rootLegalEntity
|
|
1507
|
-
// ? getFieldsWithExistingData(rootLegalEntity, businessFinancingApiKeyMapping)
|
|
1508
|
-
// : [],
|
|
1509
|
-
[],
|
|
1510
|
-
{},
|
|
1511
|
-
{},
|
|
1512
|
-
{},
|
|
1513
|
-
rootLegalEntity == null ? void 0 : rootLegalEntity.type,
|
|
1514
|
-
rootLegalEntity == null ? void 0 : rootLegalEntity.trustedFields
|
|
1515
|
-
),
|
|
1516
|
-
[fieldConfigurations, problems == null ? void 0 : problems.missingData, problems == null ? void 0 : problems.remediationActions, rootLegalEntity]
|
|
1517
|
-
);
|
|
1518
|
-
const {
|
|
1519
|
-
state: { currentState }
|
|
1520
|
-
} = useStateContext();
|
|
1521
|
-
const formValidity = currentState.validityByForm;
|
|
1522
|
-
useEffect(() => {
|
|
1523
|
-
const newState = {
|
|
1524
|
-
...data,
|
|
1525
|
-
...currentState.data
|
|
1526
|
-
};
|
|
1527
|
-
setData(newState);
|
|
1528
|
-
}, [currentState]);
|
|
1529
|
-
useEffect(() => {
|
|
1530
|
-
var _a2, _b2;
|
|
1531
|
-
const showParentCompany = ((_a2 = data == null ? void 0 : data.company) == null ? void 0 : _a2.isCompanyOwnedByAnotherCompany) === "Yes";
|
|
1532
|
-
const showUltimateParentCompany = ((_b2 = data == null ? void 0 : data.company) == null ? void 0 : _b2.isParentOwnedByAnotherCompany) === "Yes";
|
|
1533
|
-
let updateForms = {
|
|
1534
|
-
company: { ...businessFinancingForms.company }
|
|
1535
|
-
};
|
|
1536
|
-
if (showParentCompany) {
|
|
1537
|
-
updateForms = { ...updateForms, parentCompany: businessFinancingForms.parentCompany };
|
|
1538
|
-
}
|
|
1539
|
-
if (showParentCompany && showUltimateParentCompany) {
|
|
1540
|
-
updateForms = {
|
|
1541
|
-
...updateForms,
|
|
1542
|
-
ultimateParentCompany: businessFinancingForms.ultimateParentCompany
|
|
1543
|
-
};
|
|
1544
|
-
}
|
|
1545
|
-
setBusinessFinancingRequiredForms(updateForms);
|
|
1546
|
-
}, [(_a = data == null ? void 0 : data.company) == null ? void 0 : _a.isCompanyOwnedByAnotherCompany, (_b = data == null ? void 0 : data.company) == null ? void 0 : _b.isParentOwnedByAnotherCompany]);
|
|
1547
|
-
const forms = useMemo(() => {
|
|
1548
|
-
const requiredForms = getRequiredForms(
|
|
1549
|
-
businessFinancingRequiredForms,
|
|
1550
|
-
businessFinancingFormsRequiredFields,
|
|
1551
|
-
derivedProps == null ? void 0 : derivedProps.optionalFields
|
|
1552
|
-
);
|
|
1553
|
-
return addValidityToForms(requiredForms, formValidity, problems);
|
|
1554
|
-
}, [derivedProps == null ? void 0 : derivedProps.optionalFields, formValidity, businessFinancingRequiredForms, problems]);
|
|
1555
1425
|
const { isSettingEnabled } = useSettingsContext();
|
|
1556
1426
|
const showBusinessFinancingFirst = isSettingEnabled(SettingNames.ShowBusinessFinancingFirst);
|
|
1557
1427
|
const onSubmit = async () => {
|
|
1558
1428
|
setLoadingStatus("loading");
|
|
1429
|
+
if (!umfData) {
|
|
1430
|
+
return;
|
|
1431
|
+
}
|
|
1559
1432
|
const companyBusinessFinancingDetails = prepareBusinessFinancingSubmitData(
|
|
1560
1433
|
BusinessFinancingIndex.COMPANY,
|
|
1561
|
-
|
|
1434
|
+
umfData,
|
|
1562
1435
|
rootLegalEntity
|
|
1563
1436
|
);
|
|
1564
1437
|
const parentCompanyBusinessFinancingDetails = prepareBusinessFinancingSubmitData(
|
|
1565
1438
|
BusinessFinancingIndex.PARENT_COMPANY,
|
|
1566
|
-
|
|
1439
|
+
umfData,
|
|
1567
1440
|
rootLegalEntity
|
|
1568
1441
|
);
|
|
1569
1442
|
const ultimateParentCompanyBusinessFinancingDetails = prepareBusinessFinancingSubmitData(
|
|
1570
1443
|
BusinessFinancingIndex.ULTIMATE_PARENT_COMPANY,
|
|
1571
|
-
|
|
1444
|
+
umfData,
|
|
1572
1445
|
rootLegalEntity
|
|
1573
1446
|
);
|
|
1574
1447
|
if (!companyBusinessFinancingDetails || !rootLegalEntity) {
|
|
@@ -1639,6 +1512,14 @@ function BusinessFinancingDropin(props) {
|
|
|
1639
1512
|
companyBusinessFinancingDetails.entityAssociations = [
|
|
1640
1513
|
...businessFinancingEntityAssociations
|
|
1641
1514
|
];
|
|
1515
|
+
const eventsAdditionalData = {
|
|
1516
|
+
...getOrgAnalyticsData("Business", companyBusinessFinancingDetails),
|
|
1517
|
+
...getOrgAnalyticsData("ParentCompany", parentCompanyBusinessFinancingDetails),
|
|
1518
|
+
...getOrgAnalyticsData(
|
|
1519
|
+
"UltimateParentCompany",
|
|
1520
|
+
ultimateParentCompanyBusinessFinancingDetails
|
|
1521
|
+
)
|
|
1522
|
+
};
|
|
1642
1523
|
try {
|
|
1643
1524
|
await handleBusinessFinancingFormSubmission(
|
|
1644
1525
|
BusinessFinancingIndex.COMPANY,
|
|
@@ -1649,13 +1530,14 @@ function BusinessFinancingDropin(props) {
|
|
|
1649
1530
|
);
|
|
1650
1531
|
userEvents.addTaskEvent("Success", {
|
|
1651
1532
|
actionType: "submit",
|
|
1652
|
-
returnValue: entitiesToTrack
|
|
1533
|
+
returnValue: entitiesToTrack,
|
|
1534
|
+
additionalData: eventsAdditionalData
|
|
1653
1535
|
});
|
|
1654
1536
|
await invalidateRootLegalEntity();
|
|
1655
1537
|
if (showBusinessFinancingFirst || isStandaloneComponent) {
|
|
1656
1538
|
setShowEndState(true);
|
|
1657
1539
|
} else {
|
|
1658
|
-
externalOnSubmit == null ? void 0 : externalOnSubmit({ ...
|
|
1540
|
+
externalOnSubmit == null ? void 0 : externalOnSubmit({ ...umfData });
|
|
1659
1541
|
}
|
|
1660
1542
|
} catch (e) {
|
|
1661
1543
|
showToast({ label: i18n.get("failedToUpdateDetails"), variant: "error" });
|
|
@@ -1700,29 +1582,73 @@ function BusinessFinancingDropin(props) {
|
|
|
1700
1582
|
associatedLegalEntity: rootLegalEntity
|
|
1701
1583
|
});
|
|
1702
1584
|
const omittedSummaryKeys = ["naceCodeLabel", "legalFormLabel", "currency"];
|
|
1585
|
+
const [requiredFields, setRequiredFields] = useState(void 0);
|
|
1586
|
+
const form = useMultiForm({
|
|
1587
|
+
requiredFields,
|
|
1588
|
+
defaultData: derivedData,
|
|
1589
|
+
rules: businessFinancingMultiformRules
|
|
1590
|
+
});
|
|
1591
|
+
const { data: umfData = derivedData } = form;
|
|
1592
|
+
useEffect(() => {
|
|
1593
|
+
var _a2, _b2;
|
|
1594
|
+
const showParentCompany = ((_a2 = umfData == null ? void 0 : umfData.company) == null ? void 0 : _a2.isCompanyOwnedByAnotherCompany) === "Yes";
|
|
1595
|
+
const showUltimateParentCompany = ((_b2 = umfData == null ? void 0 : umfData.company) == null ? void 0 : _b2.isParentOwnedByAnotherCompany) === "Yes";
|
|
1596
|
+
let updateForms = {
|
|
1597
|
+
company: { ...businessFinancingForms.company }
|
|
1598
|
+
};
|
|
1599
|
+
if (showParentCompany) {
|
|
1600
|
+
updateForms = { ...updateForms, parentCompany: businessFinancingForms.parentCompany };
|
|
1601
|
+
}
|
|
1602
|
+
if (showParentCompany && showUltimateParentCompany) {
|
|
1603
|
+
updateForms = {
|
|
1604
|
+
...updateForms,
|
|
1605
|
+
ultimateParentCompany: businessFinancingForms.ultimateParentCompany
|
|
1606
|
+
};
|
|
1607
|
+
}
|
|
1608
|
+
setBusinessFinancingRequiredForms(updateForms);
|
|
1609
|
+
}, [
|
|
1610
|
+
(_a = umfData == null ? void 0 : umfData.company) == null ? void 0 : _a.isCompanyOwnedByAnotherCompany,
|
|
1611
|
+
(_b = umfData == null ? void 0 : umfData.company) == null ? void 0 : _b.isParentOwnedByAnotherCompany
|
|
1612
|
+
]);
|
|
1613
|
+
useEffect(() => {
|
|
1614
|
+
const reqs = getBusinessFinancingRequiredFields(umfData);
|
|
1615
|
+
setRequiredFields(reqs);
|
|
1616
|
+
}, [umfData]);
|
|
1617
|
+
const forms = useMemo(() => {
|
|
1618
|
+
const requiredForms = getRequiredForms(
|
|
1619
|
+
businessFinancingRequiredForms,
|
|
1620
|
+
businessFinancingFormsRequiredFields,
|
|
1621
|
+
{}
|
|
1622
|
+
);
|
|
1623
|
+
return addValidityToForms(requiredForms, form.isValid, problems);
|
|
1624
|
+
}, [
|
|
1625
|
+
businessFinancingRequiredForms,
|
|
1626
|
+
form.isValid,
|
|
1627
|
+
businessFinancingFormsRequiredFields,
|
|
1628
|
+
problems
|
|
1629
|
+
]);
|
|
1703
1630
|
const {
|
|
1704
1631
|
handleNextClick,
|
|
1705
1632
|
handleBackClick,
|
|
1706
1633
|
activeForm,
|
|
1707
|
-
setShouldValidate,
|
|
1708
1634
|
gotoFormByFormIndex,
|
|
1709
|
-
|
|
1710
|
-
|
|
1635
|
+
steps,
|
|
1636
|
+
shouldValidate
|
|
1711
1637
|
} = useFormComposer({
|
|
1712
1638
|
problems,
|
|
1713
1639
|
navigationTrackingParams: associatedLeTrackingParams,
|
|
1714
1640
|
forms,
|
|
1715
1641
|
onSubmit
|
|
1716
1642
|
});
|
|
1717
|
-
const
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1643
|
+
const handleTrackNavigation = useCallback(
|
|
1644
|
+
(props2) => {
|
|
1645
|
+
trackNavigation({
|
|
1646
|
+
...props2,
|
|
1647
|
+
additionalTrackingParams: associatedLeTrackingParams
|
|
1648
|
+
});
|
|
1649
|
+
},
|
|
1650
|
+
[associatedLeTrackingParams]
|
|
1651
|
+
);
|
|
1726
1652
|
const homeClick = () => {
|
|
1727
1653
|
trackNavigation({
|
|
1728
1654
|
userEvents,
|
|
@@ -1732,75 +1658,80 @@ function BusinessFinancingDropin(props) {
|
|
|
1732
1658
|
});
|
|
1733
1659
|
handleHomeClick == null ? void 0 : handleHomeClick();
|
|
1734
1660
|
};
|
|
1735
|
-
const
|
|
1736
|
-
|
|
1737
|
-
/* @__PURE__ */
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1661
|
+
const renderActiveForm = (selectedForm) => {
|
|
1662
|
+
var _a2, _b2, _c, _d, _e, _f;
|
|
1663
|
+
return /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-form-wrapper", children: [
|
|
1664
|
+
selectedForm.formId === companyFormId && /* @__PURE__ */ jsx(
|
|
1665
|
+
AdditionalFieldsForBusinessFinancingCompany,
|
|
1666
|
+
{
|
|
1667
|
+
data: defaultData == null ? void 0 : defaultData.company,
|
|
1668
|
+
legalEntity: rootLegalEntity,
|
|
1669
|
+
heading: i18n.get("additionalInformationForBusinessFinancing"),
|
|
1670
|
+
id: companyFormId,
|
|
1671
|
+
country,
|
|
1672
|
+
shouldValidate,
|
|
1673
|
+
fieldValidationErrors: (_a2 = problems == null ? void 0 : problems.validationErrors) == null ? void 0 : _a2[selectedForm == null ? void 0 : selectedForm.formId],
|
|
1674
|
+
formVerificationErrors: (_b2 = problems == null ? void 0 : problems.verificationErrors) == null ? void 0 : _b2[selectedForm == null ? void 0 : selectedForm.formId],
|
|
1675
|
+
errors: (_c = form.errors) == null ? void 0 : _c.company,
|
|
1676
|
+
valid: (_d = form.valid) == null ? void 0 : _d.company
|
|
1677
|
+
}
|
|
1678
|
+
),
|
|
1679
|
+
selectedForm.formId === parentCompanyFormId && /* @__PURE__ */ jsx(
|
|
1680
|
+
AdditionalFieldsForBusinessFinancingParentCompany,
|
|
1681
|
+
{
|
|
1682
|
+
data: defaultData == null ? void 0 : defaultData.parentCompany,
|
|
1683
|
+
heading: i18n.get("parentCompanyInformation"),
|
|
1684
|
+
id: companyFormId,
|
|
1685
|
+
country,
|
|
1686
|
+
shouldValidate,
|
|
1687
|
+
errors: (_e = form.errors) == null ? void 0 : _e.parentCompany
|
|
1688
|
+
}
|
|
1689
|
+
),
|
|
1690
|
+
selectedForm.formId === ultimateParentCompanyFormId && /* @__PURE__ */ jsx(
|
|
1691
|
+
AdditionalFieldsForBusinessFinancingUltimateParentCompany,
|
|
1692
|
+
{
|
|
1693
|
+
data: defaultData == null ? void 0 : defaultData.ultimateParentCompany,
|
|
1694
|
+
heading: i18n.get("ultimateParentCompanyInformation"),
|
|
1695
|
+
id: companyFormId,
|
|
1696
|
+
country,
|
|
1697
|
+
shouldValidate,
|
|
1698
|
+
errors: (_f = form.errors) == null ? void 0 : _f.ultimateParentCompany
|
|
1699
|
+
}
|
|
1700
|
+
)
|
|
1701
|
+
] });
|
|
1702
|
+
};
|
|
1769
1703
|
if (!(defaultData == null ? void 0 : defaultData.company)) {
|
|
1770
1704
|
return /* @__PURE__ */ jsx(Loader, {});
|
|
1771
1705
|
}
|
|
1772
1706
|
return showEndState ? /* @__PURE__ */ jsxs(FormEndState, { variant: "success", children: [
|
|
1773
1707
|
/* @__PURE__ */ jsx("template", { slot: "title", children: i18n.get("applicationSubmittedSuccessfully") }),
|
|
1774
1708
|
/* @__PURE__ */ jsx("template", { slot: "icon", children: /* @__PURE__ */ jsx(Icon, { name: "checkmark" }) }),
|
|
1775
|
-
/* @__PURE__ */ jsx("template", { slot: "actions", children: externalOnSubmit && !showBusinessFinancingFirst && /* @__PURE__ */ jsx(Button, { onClick: () => externalOnSubmit == null ? void 0 : externalOnSubmit({ ...
|
|
1709
|
+
/* @__PURE__ */ jsx("template", { slot: "actions", children: externalOnSubmit && !showBusinessFinancingFirst && /* @__PURE__ */ jsx(Button, { onClick: () => externalOnSubmit == null ? void 0 : externalOnSubmit({ ...umfData }), children: externalOnSubmitLabel || i18n.get("finish") }) }),
|
|
1776
1710
|
/* @__PURE__ */ jsx("div", { children: i18n.get("yourLoanApplicationHasBeenReceived") })
|
|
1777
|
-
] }) : /* @__PURE__ */ jsx(
|
|
1778
|
-
|
|
1711
|
+
] }) : /* @__PURE__ */ jsx(FormContextProvider, { form, children: /* @__PURE__ */ jsx(
|
|
1712
|
+
FormFlow,
|
|
1779
1713
|
{
|
|
1780
|
-
taskName: "businessFinancing",
|
|
1781
|
-
handleNextClick,
|
|
1782
|
-
handleBackClick,
|
|
1783
|
-
gotoFormByFormIndex,
|
|
1784
|
-
loadingStatus,
|
|
1785
|
-
forms,
|
|
1786
|
-
activeForm,
|
|
1787
|
-
navigationTrackingParams: associatedLeTrackingParams,
|
|
1788
|
-
onSubmit,
|
|
1789
|
-
validateForm: () => setShouldValidate(true),
|
|
1790
|
-
canSubmit: canSubmit(data) && hasDataChanged(defaultData, data),
|
|
1791
|
-
problems,
|
|
1792
|
-
handleHomeClick: homeClick,
|
|
1793
1714
|
summary: {
|
|
1794
|
-
data: formatDataForSummary(
|
|
1795
|
-
labels: customLabels,
|
|
1715
|
+
data: formatDataForSummary(i18n, datasetUtils, umfData),
|
|
1796
1716
|
omitted: {
|
|
1797
1717
|
keys: omittedSummaryKeys
|
|
1798
|
-
}
|
|
1718
|
+
},
|
|
1719
|
+
problems,
|
|
1720
|
+
trackNavigation: handleTrackNavigation,
|
|
1721
|
+
labels: customLabels
|
|
1799
1722
|
},
|
|
1800
|
-
steps,
|
|
1723
|
+
currentStep: steps.current,
|
|
1724
|
+
disableNextButton: !activeForm.isValid,
|
|
1725
|
+
forms,
|
|
1726
|
+
gotoFormByFormIndex,
|
|
1727
|
+
handleBackClick,
|
|
1728
|
+
handleCancelClick: homeClick,
|
|
1729
|
+
handleNextClick,
|
|
1730
|
+
loadingStatus,
|
|
1731
|
+
totalSteps: steps.total,
|
|
1801
1732
|
children: /* @__PURE__ */ jsx("div", { children: renderActiveForm(activeForm || businessFinancingForms.company) })
|
|
1802
1733
|
}
|
|
1803
|
-
);
|
|
1734
|
+
) });
|
|
1804
1735
|
}
|
|
1805
1736
|
export {
|
|
1806
1737
|
BusinessFinancingDropin as B
|