@adyen/kyc-components 4.0.0-beta.0 → 4.0.0-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{AcceptTermsOfServiceComponent-Dh7RSJoE.js → AcceptTermsOfServiceComponent-i222mdxX.js} +54 -59
- package/dist/{AccountSetupRejected-PdYyKwbS.js → AccountSetupRejected-DHph9lFl.js} +6 -6
- package/dist/{Avatar-C8aZB2wq.js → Avatar-vCjWXfC7.js} +2 -2
- package/dist/{BusinessDetailsDropin-DC8FEWvP.js → BusinessDetailsDropin-DQcfiSR8.js} +408 -393
- package/dist/{BusinessFinancingComponent-B0vW7r62.js → BusinessFinancingComponent-DC3jzBrq.js} +3 -3
- package/dist/{BusinessFinancingDropin-D8HAwTSq.js → BusinessFinancingDropin-D2lMEbNh.js} +529 -701
- package/dist/{BusinessFinancingPage-L1APYvzn.js → BusinessFinancingPage-BPD2cSDR.js} +3 -3
- package/dist/{BusinessTypeSelectionPage-sfGqHnp6.js → BusinessTypeSelectionPage-Cdp8joPJ.js} +86 -91
- package/dist/{CZ-BhoS6sd6.js → CZ-BiPeoA9G.js} +11 -1
- package/dist/ContractViewer-B0bZ14Ts.js +947 -0
- package/dist/{CreateIndividualComponent-i-QNCzp0.js → CreateIndividualComponent-D9wnexv4.js} +7 -8
- package/dist/{CreateTransferInstrumentComponent-8n3tjBYK.js → CreateTransferInstrumentComponent-COzPdQjC.js} +4 -5
- package/dist/{CustomerSupport-BER6nSK2.js → CustomerSupport-NGBoBg3N.js} +27 -33
- package/dist/{DebugModal-DeSsKkh_.js → DebugModal-I2U6TjGT.js} +43 -69
- package/dist/{DecisionMakerDetailsPage-DgjlfKyP.js → DecisionMakerDetailsPage-BN-H1sJF.js} +3 -4
- package/dist/{DecisionMakers-D2TjKnOc.js → DecisionMakers-CZ5-IRtU.js} +128 -25
- package/dist/{ES-JRIf-4xI.js → ES-BlWV7xvh.js} +4 -6
- package/dist/{EmbeddedStatus-Bn5KNA0V.js → EmbeddedStatus-Blr0seRl.js} +13 -5
- package/dist/FormEndState-JB6QFSet.js +59 -0
- package/dist/{FormFlow-CZgc09E3.js → FormFlow-DjvdNEiV.js} +18 -22
- package/dist/{HU-v3vOxRm8.js → HU-D8vJYkDH.js} +10 -1
- package/dist/{IndividualOnfidoDropin-D6uwo7VI.js → IndividualOnfidoDropin-DHhyO2ai.js} +1364 -867
- package/dist/{Introduction-DW2IQ57R.js → Introduction-erRXgreE.js} +32 -35
- package/dist/LandingLayout-B45lEjOv.js +84 -0
- package/dist/{LegalRepresentativeDetailsPage-BfIDXqv1.js → LegalRepresentativeDetailsPage-rS5K4657.js} +3 -4
- package/dist/{ManageIndividualComponent-DJoEsE2m.js → ManageIndividualComponent-BEzE5lkX.js} +8 -12
- package/dist/{ManagePCIComponent-BGESFWL6.js → ManagePCIComponent-BgdGfAuT.js} +5 -5
- package/dist/{ManageTermsOfServiceComponent-_wTZrjqd.js → ManageTermsOfServiceComponent-BWkwy6YC.js} +7 -8
- package/dist/{ManageTransferInstrumentComponent-Cvc3kk94.js → ManageTransferInstrumentComponent-B8kRNftW.js} +21 -34
- package/dist/{OnboardingDropinComponent-CocnpjvA.js → OnboardingDropinComponent-DBW5N3Dr.js} +325 -364
- package/dist/{ProviderButton-vD5DUJaN.js → ProviderButton-B58n0cRC.js} +13 -24
- package/dist/{Review-BFgzcIDj.js → Review-O6Al47Cu.js} +11 -12
- package/dist/{RootBusinessDetailsPage-C6lHQShI.js → RootBusinessDetailsPage-q_6wAcer.js} +3 -4
- package/dist/{RootIndividualDetailsPage-DfpqHdAS.js → RootIndividualDetailsPage-CiXgSJsV.js} +3 -4
- package/dist/{SignPCIComponent-D35913wJ.js → SignPCIComponent-cqRNhGdl.js} +17 -23
- package/dist/{SingpassSelection-D2Xe1wGv.js → SingpassSelection-BWEJ3Yi-.js} +6 -9
- package/dist/{SoleProprietorshipPage-D2F8Ghmo.js → SoleProprietorshipPage-CRcJSpn9.js} +4 -5
- package/dist/{SourceOfFundsPage-RjAcZ3Bo.js → SourceOfFundsPage-BxLGXTHb.js} +533 -517
- package/dist/{StoreProvider-COHi02bX.js → StoreProvider-ClKLaHzy.js} +23640 -25317
- package/dist/{TaskItemStatus-Bi1L8gea.js → TaskItemStatus-DrTIwCTx.js} +14 -14
- package/dist/TaskStatusIndicator-CTtKjo0m.js +69 -0
- package/dist/{TaxReportingDropin-BLXgRbuR.js → TaxReportingDropin-DFZ2ehfk.js} +82 -102
- package/dist/{TileGroup-B1IymoWv.js → TileGroup-BtE472I1.js} +6 -8
- package/dist/{TrustDetailsPage-DVvGJ_Ta.js → TrustDetailsPage-CGiiTbfR.js} +93 -114
- package/dist/{TrustMemberCompanyPage-D0wTEhuh.js → TrustMemberCompanyPage-oLNhg0hg.js} +4 -5
- package/dist/{TrustMemberIndividualPage-BLuaBi3j.js → TrustMemberIndividualPage-Bgsis586.js} +3 -4
- package/dist/{UnincorporatedPartnershipIndividualPage-BhIihH2v.js → UnincorporatedPartnershipIndividualPage-DPE3grqL.js} +3 -4
- package/dist/{UnincorporatedPartnershipMemberCompanyPage-CgujXwfX.js → UnincorporatedPartnershipMemberCompanyPage-HUnc9g0g.js} +3 -4
- package/dist/{VerificationErrorAlert-BkImnGA-.js → VerificationErrorAlert-BBdJmGJu.js} +10 -8
- package/dist/{ViewVerificationStatusComponent-CRefu327.js → ViewVerificationStatusComponent-DDtXG_pM.js} +12 -13
- package/dist/adyen-business-financing.js +22 -29
- package/dist/adyen-individual.js +21 -22
- package/dist/adyen-kyc-components.js +137 -122
- package/dist/adyen-manage-individual.js +18 -21
- package/dist/adyen-manage-pci.js +18 -21
- package/dist/adyen-manage-terms-of-service.js +18 -21
- package/dist/adyen-manage-transfer-instruments.js +27 -30
- package/dist/adyen-onboarding.js +25 -22
- package/dist/adyen-sign-pci.js +22 -32
- package/dist/adyen-terms-of-service.js +32 -29
- package/dist/adyen-transfer-instrument.js +32 -31
- package/dist/{adyen-transfer-instrument.vue_vue_type_script_lang-BE-ro1iH.js → adyen-transfer-instrument.vue_vue_type_script_lang-DQBzahGy.js} +5 -1
- package/dist/adyen-verification-status.js +30 -33
- package/dist/bg-BG-BY3Wa361.js +54 -0
- package/dist/bg-BG-BvSUDgGF.js +13 -0
- package/dist/bg-BG-HpLj_LOM.js +16 -0
- package/dist/cs-CZ-BEFeaKsV.js +54 -0
- package/dist/cs-CZ-CQ_M3lEp.js +16 -0
- package/dist/cs-CZ-y4mvq4Lv.js +13 -0
- package/dist/{css-DZNXkIaY.js → css-BJGWcW8A.js} +2 -2
- package/dist/da-DK-D6UK8XT9.js +54 -0
- package/dist/da-DK-k4JW3iVF.js +16 -0
- package/dist/da-DK-qgQOVjDp.js +13 -0
- package/dist/de-DE-B3nctkG8.js +13 -0
- package/dist/de-DE-C7mjtS5w.js +16 -0
- package/dist/de-DE-DUl6gRKv.js +54 -0
- package/dist/de-DE-pSdsxBpQ.js +13 -0
- package/dist/decision-makers-group-CgddXgrx.js +1944 -0
- package/dist/el-GR-B5j7VZ3E.js +54 -0
- package/dist/el-GR-Bvjk5Sw8.js +13 -0
- package/dist/el-GR-CEQrkYHW.js +16 -0
- package/dist/el-GR-CdgLZhuO.js +13 -0
- package/dist/en-US-Bq2Twy6x.js +54 -0
- package/dist/en-US-DDagIr01.js +16 -0
- package/dist/en-US-DSoLr6rp.js +13 -0
- package/dist/es-ES-BRfK6tX7.js +13 -0
- package/dist/es-ES-Cavm0szq.js +54 -0
- package/dist/es-ES-DB1c74Kv.js +16 -0
- package/dist/es-ES-Dy1uR2H_.js +13 -0
- package/dist/et-EE-DUWZ2Vqm.js +54 -0
- package/dist/et-EE-d9V24rcf.js +13 -0
- package/dist/et-EE-xIegUSuv.js +16 -0
- package/dist/fi-FI-B0fnAFV2.js +13 -0
- package/dist/fi-FI-DVa-ccaW.js +54 -0
- package/dist/fi-FI-NCxneAqU.js +16 -0
- package/dist/fr-FR-BoKzVp2q.js +13 -0
- package/dist/fr-FR-CY9emHgF.js +54 -0
- package/dist/fr-FR-Dk6Lw2On.js +13 -0
- package/dist/fr-FR-daiUnUwo.js +16 -0
- package/dist/{getFieldsWithExistingData-UNUNInq5.js → getFieldsWithExistingData-BY--eXBQ.js} +3 -4
- package/dist/{hasDataChanged-CIg-bPSm.js → hasDataChanged-CwfuS4et.js} +4 -4
- package/dist/hr-HR-BAUywqDj.js +16 -0
- package/dist/hr-HR-CF0AHQzi.js +13 -0
- package/dist/hr-HR-CnP5sqih.js +54 -0
- package/dist/hu-HU-3GQojIHR.js +16 -0
- package/dist/hu-HU-BTlpbCpc.js +54 -0
- package/dist/hu-HU-CSPhOvLC.js +13 -0
- package/dist/it-IT-BH-eqIKH.js +13 -0
- package/dist/it-IT-D7G4BaP7.js +13 -0
- package/dist/it-IT-GgHc0cHR.js +54 -0
- package/dist/it-IT-pDWPFHEh.js +16 -0
- package/dist/ja-JP-B3yqM_FM.js +13 -0
- package/dist/ja-JP-BhS-_dIx.js +54 -0
- package/dist/ja-JP-DTW_hY1L.js +13 -0
- package/dist/ja-JP-scPXJ93L.js +16 -0
- package/dist/{json-DGARJCng.js → json-Dk6RRAV8.js} +2 -2
- package/dist/{localizeDateString-KlstHAcM.js → localizeDateString-CKCBXzSn.js} +6 -6
- package/dist/lt-LT-BcGNy8Ti.js +16 -0
- package/dist/lt-LT-DTQGR9M0.js +54 -0
- package/dist/lt-LT-Lzl_Cbw-.js +13 -0
- package/dist/lv-LV-BQ4F1GrV.js +54 -0
- package/dist/lv-LV-CBD07r1Y.js +16 -0
- package/dist/lv-LV-y00wN1pj.js +13 -0
- package/dist/{mapFinancialReportsToFinancialInformation-Cid31JpK.js → mapFinancialReportsToFinancialInformation-D_6u_bSS.js} +19 -12
- package/dist/minus-circle-filled-BGKeHaxJ.js +17 -0
- package/dist/nl-NL-BxJUDHMK.js +16 -0
- package/dist/nl-NL-CFzm75Jw.js +13 -0
- package/dist/nl-NL-CUcML482.js +54 -0
- package/dist/nl-NL-DmnFXAQC.js +13 -0
- package/dist/no-NO-BBCvsecq.js +54 -0
- package/dist/no-NO-DbvFfP96.js +13 -0
- package/dist/no-NO-Drup6Jyy.js +16 -0
- package/dist/pl-PL--mmxopYA.js +13 -0
- package/dist/pl-PL-BXv8Mmzb.js +16 -0
- package/dist/pl-PL-kGaeUP-w.js +54 -0
- package/dist/{plaintext-jF9fCLMp.js → plaintext-9WNCwUtz.js} +2 -2
- package/dist/plus-circle-filled-Cnf1oJTm.js +17 -0
- package/dist/preact/adyen-terms-of-service.js +1 -1
- package/dist/preact/adyen-transfer-instrument.js +2 -2
- package/dist/pt-PT-BVzXBFp7.js +13 -0
- package/dist/pt-PT-D8nU-UM2.js +16 -0
- package/dist/pt-PT-DpDxAynk.js +13 -0
- package/dist/pt-PT-JVqqgvPs.js +54 -0
- package/dist/resolveEnvironment-DQH1ab0S.js +84 -0
- package/dist/ro-RO-C83h2zHZ.js +54 -0
- package/dist/ro-RO-CG33OwqS.js +16 -0
- package/dist/ro-RO-Cdmevo9A.js +13 -0
- package/dist/ru-RU-FZb2upqh.js +13 -0
- package/dist/{rules-a4kJDPzY.js → rules-CCnLDGvk.js} +63 -64
- package/dist/sk-SK-CgLJIuJw.js +54 -0
- package/dist/sk-SK-DV_xkO69.js +16 -0
- package/dist/sk-SK-nfeuTcY5.js +13 -0
- package/dist/sl-SI-B5yeoadY.js +16 -0
- package/dist/sl-SI-BzeVaC1Z.js +54 -0
- package/dist/sl-SI-DUTZDqkP.js +13 -0
- package/dist/style.css +2124 -3093
- package/dist/styles-CLV89_hH.js +2125 -3094
- package/dist/sv-SE-BTx2XKAp.js +13 -0
- package/dist/sv-SE-CVmo11gI.js +54 -0
- package/dist/sv-SE-CfxyR53r.js +16 -0
- package/dist/sv-SE-rckxD-43.js +13 -0
- package/dist/types/api/address/address.types.d.ts +0 -1
- package/dist/types/api/address/useAddressCleanse.d.ts +1 -1
- package/dist/types/api/address/useSearchAddress.d.ts +0 -1
- package/dist/types/api/businessLines/useUpdateSourceOfFunds.d.ts +2 -2
- package/dist/types/api/companyDataSet/companyDataset.types.d.ts +2 -2
- package/dist/types/api/companyDataSet/constants.d.ts +1 -1
- package/dist/types/api/companyDataSet/handleCompanyDataset.d.ts +3 -0
- package/dist/types/api/companySearch/companySearch.types.d.ts +2 -2
- package/dist/types/api/companySelection/companySelection.types.d.ts +6 -0
- package/dist/types/api/companySelection/useCompanySelection.d.ts +21 -0
- package/dist/types/api/configurations/configurations.types.d.ts +9 -0
- package/dist/types/api/configurations/useScenarios.d.ts +33 -35
- package/dist/types/api/configurations/useSupportedCountries.d.ts +3 -3
- package/dist/types/api/configurations/useTaskTypes.d.ts +2 -2
- package/dist/types/api/configurations/useVersionConfiguration.d.ts +2 -2
- package/dist/types/api/createLegalEntity/useCreateLegalEntity.d.ts +11 -11
- package/dist/types/api/datasets/datasets.types.d.ts +6 -0
- package/dist/types/api/datasets/useLegalForms.d.ts +3 -8
- package/dist/types/api/datasets/useNaceCodes.d.ts +2 -2
- package/dist/types/api/datasets/useSourceOfFundsTypes.d.ts +2 -2
- package/dist/types/api/entityVerifications/entityVerifications.types.d.ts +15 -0
- package/dist/types/api/entityVerifications/useVerifyIdNumber.d.ts +2 -17
- package/dist/types/api/idNowProvider/idNowProvider.types.d.ts +7 -0
- package/dist/types/api/idNowProvider/useIdNowProvider.d.ts +14 -0
- package/dist/types/api/idVerificationProviders/idVerificationProviders.types.d.ts +6 -0
- package/dist/types/api/idVerificationProviders/idVerificationStartCheck.d.ts +3 -7
- package/dist/types/api/idVerificationProviders/useExtractDocumentInformation.d.ts +7 -7
- package/dist/types/api/legalEntity/useConfirmReview.d.ts +2 -2
- package/dist/types/api/legalEntity/useLegalEntity.d.ts +285 -223
- package/dist/types/api/legalEntity/useUpdateLegalEntity.d.ts +14 -14
- package/dist/types/api/onboardingStatus/onboardingStatus.types.d.ts +7 -0
- package/dist/types/api/onboardingStatus/useGenerateOnboardingLink.d.ts +2 -5
- package/dist/types/api/onboardingStatus/useOnboardingStatus.d.ts +1 -1
- package/dist/types/api/pciTemplate/pciTemplate.types.d.ts +9 -0
- package/dist/types/api/pciTemplate/usePciQuestionnaire.d.ts +2 -4
- package/dist/types/api/pciTemplate/usePciQuestionnaireList.d.ts +7 -9
- package/dist/types/api/pciTemplate/usePciStatus.d.ts +4 -9
- package/dist/types/api/pciTemplate/usePciTemplate.d.ts +2 -2
- package/dist/types/api/pciTemplate/useSignPci.d.ts +2 -2
- package/dist/types/api/providersConfiguration/providersConfiguration.types.d.ts +9 -0
- package/dist/types/api/providersConfiguration/useProviderStatus.d.ts +3 -13
- package/dist/types/api/queryKeys.d.ts +5 -3
- package/dist/types/api/taskStatus/taskStatus.types.d.ts +4 -0
- package/dist/types/api/taskStatus/useTaskStatus.d.ts +0 -3
- package/dist/types/api/taxClassification/taxClassification.types.d.ts +2 -0
- package/dist/types/api/taxClassification/useTaxClassification.d.ts +1 -2
- package/dist/types/api/termsOfService/termsOfService.types.d.ts +10 -0
- package/dist/types/api/termsOfService/useAcceptTermsOfService.d.ts +3 -10
- package/dist/types/api/termsOfService/useAcceptedTermsOfService.d.ts +9 -8
- package/dist/types/api/termsOfService/useTermsOfService.d.ts +12 -5
- package/dist/types/api/termsOfService/useTermsOfServiceAcceptanceInfos.d.ts +2 -2
- package/dist/types/api/termsOfService/useTermsOfServiceStatus.d.ts +2 -2
- package/dist/types/api/tinVerification/tinVerification.types.d.ts +4 -0
- package/dist/types/api/tinVerification/useVerifyTin.d.ts +2 -4
- package/dist/types/api/transferInstruments/transferInstruments.types.d.ts +25 -0
- package/dist/types/api/transferInstruments/useBankVerificationProviders.d.ts +1 -14
- package/dist/types/api/transferInstruments/useCreateTrustedTransferInstrument.d.ts +3 -6
- package/dist/types/api/transferInstruments/useHandleBankVerificationError.d.ts +4 -7
- package/dist/types/api/transferInstruments/useTransferInstruments.d.ts +1 -9
- package/dist/types/api/uiAnalytics/uiAnalytics.types.d.ts +7 -0
- package/dist/types/api/uiAnalytics/useAnalyticsSession.d.ts +2 -14
- package/dist/types/api/uiAnalytics/usePushAnalyticEvent.d.ts +2 -2
- package/dist/types/api/validation/useValidateAccountIdentification.d.ts +1 -6
- package/dist/types/api/validation/useValidatePhoneNumber.d.ts +4 -7
- package/dist/types/api/validation/validation.types.d.ts +8 -0
- package/dist/types/components/BankAccount/fields/BankAccountNumber/fieldConfig.d.ts +1 -1
- package/dist/types/components/BankAccount/fields/BankAccountNumber/types.d.ts +1 -1
- package/dist/types/components/BankAccount/fields/BankCode/fieldConfig.d.ts +1 -1
- package/dist/types/components/BankAccount/fields/BankCode/types.d.ts +1 -1
- package/dist/types/components/BankAccount/fields/BranchCode/fieldConfig.d.ts +1 -1
- package/dist/types/components/BankAccount/fields/BranchCode/types.d.ts +1 -1
- package/dist/types/components/BankAccount/fields/Iban/fieldConfig.d.ts +1 -1
- package/dist/types/components/BankAccount/fields/Iban/ibanValidator.d.ts +1 -1
- package/dist/types/components/BankAccount/fields/Iban/types.d.ts +1 -1
- package/dist/types/components/BankAccount/fields/SwiftCode/fieldConfig.d.ts +1 -1
- package/dist/types/components/BankAccount/forms/BankDocument/BankDocument.d.ts +0 -1
- package/dist/types/components/BankAccount/forms/BankDocument/BankDocumentRequirements.d.ts +1 -2
- package/dist/types/components/BankAccount/forms/BankDocument/types.d.ts +3 -2
- package/dist/types/components/BankAccount/forms/BankVerification/BankVerification.d.ts +2 -2
- package/dist/types/components/BankAccount/forms/BankVerification/types.d.ts +3 -3
- package/dist/types/components/BankAccount/forms/BankVerification/verification/widget/types.d.ts +1 -2
- package/dist/types/components/BankAccount/forms/PayoutAccount/CheckGuidance/CheckGuidance.d.ts +0 -1
- package/dist/types/components/BankAccount/forms/PayoutAccount/types.d.ts +1 -1
- package/dist/types/components/BankAccount/forms/PayoutDetails/PayoutDetails.d.ts +0 -1
- package/dist/types/components/BankAccount/forms/PayoutDetails/rules.d.ts +6 -6
- package/dist/types/components/BankAccount/forms/PayoutDetails/types.d.ts +3 -9
- package/dist/types/components/BankAccount/forms/PayoutVerificationMethod/allowedBankCountriesPerCountry.d.ts +1 -1
- package/dist/types/components/BankAccount/forms/PayoutVerificationMethod/types.d.ts +2 -2
- package/dist/types/components/BankAccount/hooks/useAsyncAccountDetailsValidationRules.d.ts +1 -1
- package/dist/types/components/BankAccount/mapping/mapPayoutAccountSchemaToApiBankAccount.d.ts +1 -1
- package/dist/types/components/BankAccount/mapping/mapPayoutDocumentsToApiDocuments.d.ts +1 -1
- package/dist/types/components/BankAccount/mapping/payoutKeyMappings.d.ts +1613 -1919
- package/dist/types/components/BankAccount/pages/PayoutDetailsPage.d.ts +1 -0
- package/dist/types/components/BankAccount/tasks/PayoutDetailsDropin/PayoutDetailsDropin.d.ts +1 -1
- package/dist/types/components/BankAccount/tasks/PayoutDetailsDropin/payoutDetailsFormConfig.d.ts +3 -3
- package/dist/types/components/BankAccount/tasks/PayoutDetailsDropin/utils.d.ts +3 -0
- package/dist/types/components/BankAccount/utils/defaultPayoutAccountFormat.d.ts +1 -1
- package/dist/types/components/BankAccount/utils/payoutAccountUtil.d.ts +3 -3
- package/dist/types/components/Business/forms/AdditionalInformation/types.d.ts +3 -2
- package/dist/types/components/Business/forms/AdditionalInformation/utils.d.ts +1 -0
- package/dist/types/components/Business/forms/BasicInformation/types.d.ts +3 -2
- package/dist/types/components/Business/forms/BusinessDetails/forms.d.ts +2 -2
- package/dist/types/components/Business/forms/BusinessDetails/types.d.ts +2 -2
- package/dist/types/components/Business/forms/BusinessSelection/{BusinessInformationCard.d.ts → BusinessInformationCard/BusinessInformationCard.d.ts} +4 -6
- package/dist/types/components/Business/forms/BusinessSelection/BusinessSelection.d.ts +1 -1
- package/dist/types/components/Business/forms/CompanyStructure/types.d.ts +1 -1
- package/dist/types/components/Business/forms/ProofOfDirectorDocument/types.d.ts +1 -1
- package/dist/types/components/Business/forms/ProofOfOwnershipDocument/types.d.ts +1 -1
- package/dist/types/components/Business/forms/ProofOfSignatoryDocument/types.d.ts +1 -1
- package/dist/types/components/Business/forms/RegistrationDocument/config.d.ts +1 -1
- package/dist/types/components/Business/forms/RegistrationDocument/types.d.ts +1 -1
- package/dist/types/components/Business/forms/TaxDocument/config.d.ts +1 -1
- package/dist/types/components/Business/forms/TaxDocument/types.d.ts +1 -1
- package/dist/types/components/Business/forms/rules.d.ts +23 -20
- package/dist/types/components/Business/mapping/businessDetails/mapBusinessDetailsSchemaToLegalEntity.d.ts +1 -1
- package/dist/types/components/Business/mapping/businessDetails/mapLegalEntityToBusinessDetailsSchema.d.ts +1 -1
- package/dist/types/components/Business/tasks/BusinessDetailsDropin/businessDetailsFormConfig.d.ts +1 -2
- package/dist/types/components/Business/tasks/BusinessDetailsDropin/businessDetailsStore.d.ts +2 -2
- package/dist/types/components/Business/tasks/BusinessDetailsDropin/types.d.ts +3 -3
- package/dist/types/components/Business/tasks/BusinessDetailsDropin/utils.d.ts +1 -4
- package/dist/types/components/Business/utils/companyUtil.d.ts +1 -1
- package/dist/types/components/Contract/tasks/ServiceAgreementDropin/ServiceAgreementDropin.d.ts +0 -1
- package/dist/types/components/EFP/fields/LegalFormField/LegalFormField.d.ts +1 -1
- package/dist/types/components/EFP/fields/LegalFormField/types.d.ts +6 -3
- package/dist/types/components/EFP/fields/NaceCodeField/NaceCodeField.d.ts +1 -1
- package/dist/types/components/EFP/fields/NaceCodeField/types.d.ts +1 -0
- package/dist/types/components/EFP/mapping/businessFinancingKeyMappings.d.ts +2053 -24
- package/dist/types/components/EFP/mapping/mapBusinessFinancingToLegalEntity.d.ts +2 -2
- package/dist/types/components/EFP/mapping/mapLegalEntityToBusinessFinancing.d.ts +1 -2
- package/dist/types/components/EFP/tasks/BusinessFinancingDropin/BusinessFinancingBasicCompanyInformation.d.ts +5 -1
- package/dist/types/components/EFP/tasks/BusinessFinancingDropin/BusinessFinancingBusinessInformation.d.ts +10 -1
- package/dist/types/components/EFP/tasks/BusinessFinancingDropin/BusinessFinancingFinancialInformation.d.ts +11 -1
- package/dist/types/components/EFP/tasks/BusinessFinancingDropin/BusinessFinancingLegalInformation.d.ts +6 -1
- package/dist/types/components/EFP/tasks/BusinessFinancingDropin/BusinessFinancingOwnershipStructure.d.ts +7 -2
- package/dist/types/components/EFP/tasks/BusinessFinancingDropin/BusinessFinancingRegisteredAddress.d.ts +7 -1
- package/dist/types/components/EFP/tasks/BusinessFinancingDropin/types.d.ts +27 -112
- package/dist/types/components/EFP/tasks/BusinessFinancingDropin/utils.d.ts +17 -4
- package/dist/types/components/EFP/tasks/BusinessFinancingDropin/validate.d.ts +22 -0
- package/dist/types/components/EFP/tasks/SourceOfFundsDropin/SOFAdditionalData/SOFFinancierModal.d.ts +1 -2
- package/dist/types/components/EFP/tasks/SourceOfFundsDropin/SourceOfFundsUploader/SOFUploadModal.d.ts +0 -1
- package/dist/types/components/EFP/tasks/SourceOfFundsDropin/sofStore.d.ts +1 -1
- package/dist/types/components/EFP/tasks/SourceOfFundsDropin/types.d.ts +3 -3
- package/dist/types/components/EFP/tasks/SourceOfFundsDropin/utils.d.ts +1 -1
- package/dist/types/components/EFP/tasks/TaxReportingDropin/taxClassificationStore.d.ts +1 -1
- package/dist/types/components/EFP/tasks/TaxReportingDropin/types.d.ts +3 -3
- package/dist/types/components/EmbeddedDropins/BusinessFinancingComponent/utils.d.ts +3 -3
- package/dist/types/components/EmbeddedDropins/ManageTransferInstrumentComponent/ManageTransferInstrumentOverview/ManageTransferInstrumentOverview.d.ts +1 -1
- package/dist/types/components/EmbeddedDropins/ManageTransferInstrumentComponent/ManageTransferInstrumentOverviewItem/ManageTransferInstrumentOverviewItem.d.ts +1 -1
- package/dist/types/components/EmbeddedDropins/ManageTransferInstrumentComponent/ManageTransferInstrumentOverviewItemModal/ManageTransferInstrumentOverviewItemModal.d.ts +1 -1
- package/dist/types/components/EmbeddedDropins/OnboardingDropinComponent/DropinComposer/DropinComposer.d.ts +1 -1
- package/dist/types/components/Individual/fields/DecisionMakerRole/NomineeDecisionMakerRole.d.ts +1 -1
- package/dist/types/components/Individual/fields/DecisionMakerRole/types.d.ts +1 -1
- package/dist/types/components/Individual/fields/DriversLicense/DriversLicense.types.d.ts +1 -1
- package/dist/types/components/Individual/fields/IdentityNumber/IdentityNumber.d.ts +1 -2
- package/dist/types/components/Individual/fields/IdentityNumber/fieldConfig.d.ts +3 -3
- package/dist/types/components/Individual/fields/IdentityNumber/type.d.ts +1 -1
- package/dist/types/components/Individual/fields/LocalizedNameFields/LocalizedNameFields.d.ts +2 -0
- package/dist/types/components/Individual/fields/LocalizedNameFields/types.d.ts +9 -0
- package/dist/types/components/Individual/fields/NameFields/NameFields.d.ts +13 -0
- package/dist/types/components/Individual/fields/NameFields/types.d.ts +23 -0
- package/dist/types/components/Individual/fields/NameFields/validate.d.ts +4 -0
- package/dist/types/components/Individual/forms/Individual/IdDocumentUpload/IdDocumentManualUpload.d.ts +1 -1
- package/dist/types/components/Individual/forms/Individual/IdDocumentUpload/types.d.ts +3 -3
- package/dist/types/components/Individual/forms/Individual/IdDocumentUpload/utils.d.ts +1 -1
- package/dist/types/components/Individual/forms/Individual/IdVerification/idVerificationProviderId.d.ts +1 -1
- package/dist/types/components/Individual/forms/Individual/IdVerificationMethod/IdVerificationMethod.d.ts +1 -1
- package/dist/types/components/Individual/forms/Individual/IdVerificationMethod/types.d.ts +2 -2
- package/dist/types/components/Individual/forms/Individual/Individual.d.ts +1 -1
- package/dist/types/components/Individual/forms/Individual/PersonalDetails/Identity/IdentityAu/IdentityAu.d.ts +1 -1
- package/dist/types/components/Individual/forms/Individual/PersonalDetails/Identity/IdentityHK/IdentityHK.d.ts +1 -1
- package/dist/types/components/Individual/forms/Individual/PersonalDetails/Identity/IdentityNZ/IdentityNZ.d.ts +1 -1
- package/dist/types/components/Individual/forms/Individual/PersonalDetails/Identity/identityUS/IdentityUS.d.ts +1 -1
- package/dist/types/components/Individual/forms/Individual/PersonalDetails/types.d.ts +7 -5
- package/dist/types/components/Individual/forms/Individual/PersonalDetails/validate.d.ts +2 -2
- package/dist/types/components/Individual/forms/Individual/rules.d.ts +34 -32
- package/dist/types/components/Individual/forms/Individual/types.d.ts +8 -8
- package/dist/types/components/Individual/forms/IndividualOnfido/AdditionalPersonalDetails/AdditionalPersonalDetails.d.ts +1 -1
- package/dist/types/components/Individual/forms/IndividualOnfido/AdditionalPersonalDetails/AdditionalPersonalDetails.types.d.ts +1 -1
- package/dist/types/components/Individual/forms/IndividualOnfido/AdditionalPersonalDetails/Identity/Identity.d.ts +1 -1
- package/dist/types/components/Individual/forms/IndividualOnfido/AdditionalPersonalDetails/Identity/validate.d.ts +1 -1
- package/dist/types/components/Individual/forms/IndividualOnfido/AdditionalPersonalDetails/validate.d.ts +2 -2
- package/dist/types/components/Individual/forms/IndividualOnfido/BasicDetails/BasicDetails.d.ts +1 -1
- package/dist/types/components/Individual/forms/IndividualOnfido/BasicDetails/BasicDetails.types.d.ts +3 -2
- package/dist/types/components/Individual/forms/IndividualOnfido/DataConflictsModal/ConflictRow.d.ts +1 -1
- package/dist/types/components/Individual/forms/IndividualOnfido/GuidanceQuestion/GuidanceQuestion.d.ts +7 -3
- package/dist/types/components/Individual/forms/IndividualOnfido/IdVerificationMethod/IdVerificationMethod.types.d.ts +1 -0
- package/dist/types/components/Individual/forms/IndividualOnfido/IdVerificationMethod/individualOnfidoConflictsSchema.d.ts +23 -9
- package/dist/types/components/Individual/forms/IndividualOnfido/IdVerificationMethod/mapExtractionResultToSchema.d.ts +1 -1
- package/dist/types/components/Individual/forms/IndividualOnfido/IndividualOnfido.d.ts +0 -1
- package/dist/types/components/Individual/forms/IndividualOnfido/IndividualOnfido.rules.d.ts +37 -34
- package/dist/types/components/Individual/forms/IndividualOnfido/IndividualOnfido.types.d.ts +4 -4
- package/dist/types/components/Individual/forms/IndividualOnfido/SignatoryQuestionnaire/SignatoryQuestionnaire.d.ts +1 -1
- package/dist/types/components/Individual/forms/IndividualOnfido/SignatoryQuestionnaire/SignatoryQuestionnaire.types.d.ts +1 -3
- package/dist/types/components/Individual/forms/IndividualOnfido/SignatoryQuestionnaire/SignatoryQuestionnaireModalContent.d.ts +1 -0
- package/dist/types/components/Individual/forms/IndividualOnfido/UboQuestionnaire/UboQuestionnaire.d.ts +1 -1
- package/dist/types/components/Individual/forms/IndividualOnfido/UboQuestionnaire/UboQuestionnaire.types.d.ts +3 -3
- package/dist/types/components/Individual/forms/IndividualOnfido/UboQuestionnaire/UboQuestionnaireModalContent.d.ts +5 -0
- package/dist/types/components/Individual/helpers/isOnfidoAutofillFlowEnabled.d.ts +1 -1
- package/dist/types/components/Individual/helpers/shouldShowMotionCapture.d.ts +2 -2
- package/dist/types/components/Individual/mapping/adjustOnfidoIdentificationData.d.ts +3 -0
- package/dist/types/components/Individual/mapping/getOnfidoIdentityTypeToApiIdentityTypeMap.d.ts +3 -0
- package/dist/types/components/Individual/mapping/individualOnfidoKeyMappings.d.ts +1 -0
- package/dist/types/components/Individual/mapping/mapIndividualOnfidoSchemaToLegalEntity.d.ts +3 -1
- package/dist/types/components/Individual/mapping/mapLocalization.d.ts +3 -0
- package/dist/types/components/Individual/tasks/DecisionMakers/DecisionMakersGettingStarted/DecisionMakersGettingStarted.d.ts +5 -0
- package/dist/types/components/Individual/tasks/DecisionMakers/DecisionMakersGettingStarted/DecisionMakersModalContent.d.ts +1 -0
- package/dist/types/components/Individual/tasks/IndividualDropin/individualFormConfig.d.ts +1 -1
- package/dist/types/components/Individual/tasks/IndividualOnfidoDropin/IndividualOnfidoStore.d.ts +6 -0
- package/dist/types/components/Individual/tasks/IndividualOnfidoDropin/individualOnfidoFormConfig.d.ts +1 -1
- package/dist/types/components/Shared/EntityAssociation/types.d.ts +1 -1
- package/dist/types/components/Shared/EntityGuidanceStatus/types.d.ts +1 -1
- package/dist/types/components/Shared/FormFlow/FormFlow.types.d.ts +1 -1
- package/dist/types/components/Shared/FormNavigation/FormNavigationItem.d.ts +1 -2
- package/dist/types/components/Shared/FormNavigation/types.d.ts +3 -3
- package/dist/types/components/Shared/FormWrapper/FormWrapper.d.ts +2 -2
- package/dist/types/components/Shared/Introduction/copy.d.ts +2 -2
- package/dist/types/components/Shared/SingpassSelection/types.d.ts +1 -1
- package/dist/types/components/Shared/Summary/Summary.d.ts +1 -2
- package/dist/types/components/Shared/Summary/summaryItem.d.ts +1 -1
- package/dist/types/components/Shared/Summary/types.d.ts +3 -3
- package/dist/types/components/Shared/devex/DebugListener/DebugModal.d.ts +0 -1
- package/dist/types/components/Shared/fields/BusinessRegistrationNumberField/BusinessRegistrationNumberField.d.ts +1 -1
- package/dist/types/components/Shared/fields/BusinessRegistrationNumberField/fieldConfig.d.ts +6 -4
- package/dist/types/components/Shared/fields/BusinessRegistrationNumberField/types.d.ts +6 -8
- package/dist/types/components/Shared/fields/CountryField/CountryField.d.ts +1 -1
- package/dist/types/components/Shared/fields/CountryField/types.d.ts +3 -3
- package/dist/types/components/Shared/fields/CountryOfGoverningLawField/CountryOfGoverningLawField.d.ts +1 -1
- package/dist/types/components/Shared/fields/CountryOfGoverningLawField/types.d.ts +2 -2
- package/dist/types/components/Shared/fields/Currency/types.d.ts +3 -3
- package/dist/types/components/Shared/fields/DBANameField/fieldConfig.d.ts +1 -1
- package/dist/types/components/Shared/fields/DBANameField/types.d.ts +1 -3
- package/dist/types/components/Shared/fields/DateOfIncorporationField/fieldConfig.d.ts +1 -1
- package/dist/types/components/Shared/fields/DateOfIncorporationField/types.d.ts +1 -1
- package/dist/types/components/Shared/fields/EInvoicingCodeField/fieldConfig.d.ts +1 -1
- package/dist/types/components/Shared/fields/EInvoicingCodeField/types.d.ts +1 -1
- package/dist/types/components/Shared/fields/FinancialReportingDate/types.d.ts +1 -1
- package/dist/types/components/Shared/fields/IdFieldTypeSelector/CompanyRegistrationNumberTypeSelector.d.ts +2 -2
- package/dist/types/components/Shared/fields/IdFieldTypeSelector/IndividualIdNumberTypeSelector.d.ts +2 -2
- package/dist/types/components/Shared/fields/IdFieldTypeSelector/TaxIdNumberTypeSelector.d.ts +4 -3
- package/dist/types/components/Shared/fields/IdFieldTypeSelector/VatNumberTypeSelector.d.ts +2 -2
- package/dist/types/components/Shared/fields/IdFieldTypeSelector/countryIdNumberTypes.d.ts +11 -2
- package/dist/types/components/Shared/fields/IdFieldTypeSelector/getDefaultRegistrationNumberType.d.ts +16 -0
- package/dist/types/components/Shared/fields/IdFieldTypeSelector/getDefaultTaxIdNumberType.d.ts +1 -1
- package/dist/types/components/Shared/fields/IdFieldTypeSelector/getDefaultVatNumberType.d.ts +13 -0
- package/dist/types/components/Shared/fields/IdFieldTypeSelector/inferCompanyRegistrationNumberType.d.ts +1 -1
- package/dist/types/components/Shared/fields/IdFieldTypeSelector/inferTaxIdNumberType.d.ts +1 -1
- package/dist/types/components/Shared/fields/IdFieldTypeSelector/inferVatNumberType.d.ts +1 -1
- package/dist/types/components/Shared/fields/LegalCompanyNameField/LegalCompanyNameField.d.ts +1 -2
- package/dist/types/components/Shared/fields/LegalCompanyNameField/fieldConfig.d.ts +1 -1
- package/dist/types/components/Shared/fields/LegalCompanyNameField/types.d.ts +1 -1
- package/dist/types/components/Shared/fields/LocalizedLegalCompanyNameField/fieldConfig.d.ts +12 -0
- package/dist/types/components/Shared/fields/LocalizedLegalCompanyNameField/types.d.ts +5 -0
- package/dist/types/components/Shared/fields/Name/Name.d.ts +1 -1
- package/dist/types/components/Shared/fields/NumberOfEmployees/types.d.ts +1 -1
- package/dist/types/components/Shared/fields/PhoneField/PhoneField.d.ts +1 -2
- package/dist/types/components/Shared/fields/PhoneField/fieldConfig.d.ts +1 -1
- package/dist/types/components/Shared/fields/PhoneField/types.d.ts +2 -2
- package/dist/types/components/Shared/fields/StateField/StateField.d.ts +1 -1
- package/dist/types/components/Shared/fields/StateField/fieldConfig.d.ts +1 -1
- package/dist/types/components/Shared/fields/StateField/types.d.ts +4 -4
- package/dist/types/components/Shared/fields/StockExchangeMICField/fieldConfig.d.ts +1 -1
- package/dist/types/components/Shared/fields/StockExchangeMICField/types.d.ts +1 -1
- package/dist/types/components/Shared/fields/StockISINField/fieldConfig.d.ts +1 -1
- package/dist/types/components/Shared/fields/StockISINField/types.d.ts +1 -1
- package/dist/types/components/Shared/fields/StockTickerSymbol/fieldConfig.d.ts +1 -1
- package/dist/types/components/Shared/fields/StockTickerSymbol/types.d.ts +1 -1
- package/dist/types/components/Shared/fields/TaxInformationField/TaxInformationField.d.ts +1 -2
- package/dist/types/components/Shared/fields/TaxInformationField/fieldConfig.d.ts +5 -3
- package/dist/types/components/Shared/fields/TaxInformationField/types.d.ts +2 -2
- package/dist/types/components/Shared/fields/VatNumberField/VatNumberField.d.ts +1 -1
- package/dist/types/components/Shared/fields/VatNumberField/fieldConfig.d.ts +1 -1
- package/dist/types/components/Shared/fields/VatNumberField/types.d.ts +3 -5
- package/dist/types/components/Shared/forms/Address/AddressField.d.ts +1 -1
- package/dist/types/components/Shared/forms/Address/SearchAddress.d.ts +3 -3
- package/dist/types/components/Shared/forms/Address/constants.d.ts +1 -1
- package/dist/types/components/Shared/forms/Address/types.d.ts +1 -2
- package/dist/types/components/Shared/forms/Address/utils.d.ts +3 -3
- package/dist/types/components/Shared/forms/Address/validate.d.ts +1 -1
- package/dist/types/components/Shared/forms/BusinessTypeSelection/types.d.ts +1 -1
- package/dist/types/components/Shared/forms/BusinessTypeSelection/utils.d.ts +7 -7
- package/dist/types/components/Shared/forms/CompanyNameAndCountry/types.d.ts +1 -1
- package/dist/types/components/Shared/forms/ConstitutionalDocument/types.d.ts +1 -1
- package/dist/types/components/Shared/forms/ContactDetails/ContactDetails.d.ts +1 -1
- package/dist/types/components/Shared/forms/ContactDetails/types.d.ts +1 -1
- package/dist/types/components/Shared/forms/DocumentUpload/types.d.ts +2 -2
- package/dist/types/components/Shared/forms/FinancialInformation/ReportedValue.d.ts +1 -1
- package/dist/types/components/Shared/forms/FinancialInformation/formatFinancialInformationSummary.d.ts +2 -2
- package/dist/types/components/Shared/forms/FinancialInformation/mapping/mapFinancialInformationToFinancialReport.d.ts +1 -1
- package/dist/types/components/Shared/forms/FinancialInformation/types.d.ts +3 -3
- package/dist/types/components/Shared/forms/FinancialInformation/validate.d.ts +1 -0
- package/dist/types/components/Shared/forms/RegistrationAddress/types.d.ts +2 -2
- package/dist/types/components/Shared/tasks/CustomerSupport/types.d.ts +1 -1
- package/dist/types/components/Shared/tasks/TaskList/PayoutAccountTaskListItem.d.ts +1 -1
- package/dist/types/components/Shared/tasks/TaskList/TaskItemStatus.d.ts +1 -2
- package/dist/types/components/Shared/tasks/TaskList/TaskList.d.ts +1 -1
- package/dist/types/components/Shared/tasks/TaskList/types.d.ts +2 -2
- package/dist/types/components/Shared/tasks/TaskList/utils.d.ts +1 -1
- package/dist/types/components/Trust/forms/Trust/Trust.d.ts +19 -3
- package/dist/types/components/Trust/forms/Trust/rules.d.ts +6 -6
- package/dist/types/components/Trust/forms/Trust/types.d.ts +2 -2
- package/dist/types/components/Trust/forms/TrustRegistrationDetails/types.d.ts +1 -1
- package/dist/types/components/Trust/forms/TrustRoleAndEntityType/types.d.ts +1 -1
- package/dist/types/components/Trust/hooks/useTrustMemberNavigation.hook.d.ts +14 -14
- package/dist/types/components/Trust/mapping/mapTrustDocumentToApiDocument.d.ts +1 -1
- package/dist/types/components/Trust/tasks/RoleAndTypeDropin/types.d.ts +1 -1
- package/dist/types/components/Trust/tasks/TrustDropin/trustFormConfig.d.ts +1 -1
- package/dist/types/components/Trust/tasks/TrustMembers/types.d.ts +1 -1
- package/dist/types/components/Trust/utils/trustUtil.d.ts +4 -4
- package/dist/types/components/UnincorporatedPartnership/hooks/useUnincorporatedPartnershipNavigation.d.ts +2 -2
- package/dist/types/components/UnincorporatedPartnership/tasks/UnincorporatedPartnershipRoleAndType/UnincorporatedPartnershipRadioGroup.d.ts +2 -3
- package/dist/types/components/UnincorporatedPartnership/tasks/UnincorporatedPartnershipRoleAndType/UnincorporatedPartnershipRoleAndType.d.ts +1 -2
- package/dist/types/components/UnincorporatedPartnership/types/types.d.ts +1 -1
- package/dist/types/components/UnincorporatedPartnership/utils/unincorporatedParnershipUtil.d.ts +3 -3
- package/dist/types/components/ui/atoms/Accordion/Accordion.d.ts +1 -2
- package/dist/types/components/ui/atoms/ActionsMenu/ActionsMenu.d.ts +1 -1
- package/dist/types/components/ui/atoms/Button/Button.d.ts +2 -3
- package/dist/types/components/ui/atoms/Button/Button.types.d.ts +3 -3
- package/dist/types/components/ui/atoms/Checkbox/Checkbox.d.ts +1 -2
- package/dist/types/components/ui/atoms/Field/Field.d.ts +3 -6
- package/dist/types/components/ui/atoms/Field/Field.types.d.ts +11 -12
- package/dist/types/components/ui/atoms/FormHeader/FormHeader.d.ts +4 -6
- package/dist/types/components/ui/atoms/InputBase/InputBase.d.ts +5 -5
- package/dist/types/components/ui/atoms/List/List.d.ts +12 -0
- package/dist/types/components/ui/atoms/Modal/MaybeModal.d.ts +1 -1
- package/dist/types/components/ui/atoms/RadioGroupCard/RadioGroupCard.types.d.ts +3 -3
- package/dist/types/components/ui/atoms/Remove/Remove.d.ts +1 -2
- package/dist/types/components/ui/atoms/Select/Select.d.ts +1 -2
- package/dist/types/components/ui/atoms/Select/Select.types.d.ts +1 -0
- package/dist/types/components/ui/atoms/SelectButton/SelectButton.d.ts +1 -2
- package/dist/types/components/ui/atoms/SelectButton/SelectButton.types.d.ts +3 -4
- package/dist/types/components/ui/atoms/SelectList/SelectList.d.ts +1 -2
- package/dist/types/components/ui/atoms/SelectList/SelectList.types.d.ts +2 -2
- package/dist/types/components/ui/atoms/SelectListItem/SelectListItem.types.d.ts +3 -3
- package/dist/types/components/ui/atoms/Svg/Svg.d.ts +1 -1
- package/dist/types/components/ui/atoms/Svg/svgs.d.ts +6 -0
- package/dist/types/components/ui/atoms/TaskStatusIndicator/TaskStatusIndicator.d.ts +1 -1
- package/dist/types/components/ui/atoms/TextArea/TextArea.d.ts +1 -2
- package/dist/types/components/ui/atoms/Tile/Tile.d.ts +1 -2
- package/dist/types/components/ui/layout/LandingLayout/LandingLayout.d.ts +10 -0
- package/dist/types/components/ui/layout/StackLayout/StackLayout.d.ts +8 -0
- package/dist/types/components/ui/molecules/Alert/Alert.d.ts +1 -1
- package/dist/types/components/ui/molecules/Alert/types.d.ts +1 -1
- package/dist/types/components/ui/molecules/Card/Card.d.ts +1 -2
- package/dist/types/components/ui/molecules/Card/types.d.ts +3 -3
- package/dist/types/components/ui/molecules/Confirm/Confirm.d.ts +1 -1
- package/dist/types/components/ui/molecules/Confirm/Confirm.types.d.ts +1 -0
- package/dist/types/components/ui/molecules/DocumentGuidance/DocumentGuidance.types.d.ts +2 -2
- package/dist/types/components/ui/molecules/Dropzone/FilePicker.d.ts +3 -5
- package/dist/types/components/ui/molecules/Dropzone/types.d.ts +1 -1
- package/dist/types/components/ui/molecules/Dropzone/validate.d.ts +1 -1
- package/dist/types/components/ui/molecules/EmbeddedStatus/EmbeddedStatus.d.ts +2 -2
- package/dist/types/components/ui/molecules/EmbeddedStatus/statusToTag.d.ts +2 -2
- package/dist/types/components/ui/molecules/ErrorPanel/ErrorPanel.d.ts +1 -1
- package/dist/types/components/ui/molecules/ErrorPanel/VerificationErrors.d.ts +2 -1
- package/dist/types/components/ui/molecules/ErrorPanel/types.d.ts +3 -3
- package/dist/types/components/ui/molecules/FormEndState/FormEndState.d.ts +0 -1
- package/dist/types/components/ui/molecules/InputCurrency/InputCurrency.d.ts +2 -3
- package/dist/types/components/ui/molecules/InputDate/InputDate.d.ts +3 -3
- package/dist/types/components/ui/molecules/InputEmail/InputEmail.d.ts +1 -1
- package/dist/types/components/ui/molecules/InputTelephone/InputTelephone.d.ts +1 -1
- package/dist/types/components/ui/molecules/InputText/InputText.d.ts +1 -1
- package/dist/types/components/ui/molecules/MaskedInput/MaskedInput.d.ts +3 -7
- package/dist/types/constants/countries.d.ts +1 -1
- package/dist/types/constants/keys.d.ts +2 -0
- package/dist/types/context/ExperimentContext/types.d.ts +18 -1
- package/dist/types/context/FormContext/FormContext.d.ts +1 -1
- package/dist/types/context/FormRouterContext/FormRouterContext.d.ts +1 -1
- package/dist/types/context/FormRouterContext/types.d.ts +1 -1
- package/dist/types/context/SettingsContext/SettingsContext.d.ts +1 -1
- package/dist/types/context/SettingsContext/types.d.ts +1 -1
- package/dist/types/context/StateContext/StateContext.d.ts +1 -1
- package/dist/types/context/StateContext/StateContextSetter.d.ts +1 -1
- package/dist/types/context/StateContext/StateReducer.d.ts +4 -10
- package/dist/types/context/StateContext/types.d.ts +19 -17
- package/dist/types/context/StateContext/useGlobalData.d.ts +2 -2
- package/dist/types/core/EmbedShell/EmbedShell.d.ts +2 -1
- package/dist/types/core/UIElement/UIElement.d.ts +2 -1
- package/dist/types/core/analytics.d.ts +12 -10
- package/dist/types/core/environment/resolveEnvironment.d.ts +1 -1
- package/dist/types/core/error.d.ts +1 -1
- package/dist/types/core/errorMapping.d.ts +3 -3
- package/dist/types/core/models/api/address.d.ts +1 -1
- package/dist/types/core/models/api/financialReport.d.ts +3 -3
- package/dist/types/core/models/api/get-scenarios.d.ts +2 -8
- package/dist/types/core/models/api/individual.d.ts +10 -0
- package/dist/types/core/models/api/legal-arrangement.d.ts +10 -2
- package/dist/types/core/models/api/legal-entity-association.d.ts +5 -0
- package/dist/types/core/models/api/organization.d.ts +9 -1
- package/dist/types/core/models/api/phone.d.ts +1 -1
- package/dist/types/core/models/api/remediating-action.d.ts +1 -1
- package/dist/types/core/models/api/source-of-funds.d.ts +1 -1
- package/dist/types/core/models/api/transfer-instrument.d.ts +1 -1
- package/dist/types/core/models/api/verification-error.d.ts +1 -1
- package/dist/types/core/models/api/view-verification-status.d.ts +0 -4
- package/dist/types/core/process-field-configurations.d.ts +9 -9
- package/dist/types/core/types.d.ts +1 -1
- package/dist/types/core/user-events.d.ts +14 -3
- package/dist/types/datasets/generators/getAccountFormatForCountry.d.ts +2 -2
- package/dist/types/datasets/generators/getBusinessTypeExamplesForCountry.d.ts +2 -2
- package/dist/types/datasets/generators/getCompanyTypeExamplesForCountry.d.ts +2 -2
- package/dist/types/datasets/generators/getLegalArrangementTypeExamplesForCountry.d.ts +3 -3
- package/dist/types/datasets/generators/loadCountries.d.ts +1 -1
- package/dist/types/datasets/generators/loadStatesDataset.d.ts +1 -1
- package/dist/types/embeds/EmbedBaseElement.d.ts +41 -0
- package/dist/types/embeds/EmbedCore.d.ts +22 -0
- package/dist/types/embeds/baseEmbedProps.d.ts +21 -0
- package/dist/types/embeds/business-financing/AdyenBusinessFinancing.d.ts +13 -0
- package/dist/types/embeds/business-financing/adyen-business-financing.types.d.ts +6 -1
- package/dist/types/embeds/individual/AdyenIndividual.d.ts +12 -0
- package/dist/types/embeds/individual/adyen-individual.types.d.ts +6 -1
- package/dist/types/embeds/manage-individual/AdyenManageIndividual.d.ts +12 -0
- package/dist/types/embeds/manage-pci/AdyenManagePci.d.ts +12 -0
- package/dist/types/embeds/manage-terms-of-service/AdyenManageTermsOfService.d.ts +12 -0
- package/dist/types/embeds/manage-transfer-instruments/AdyenManageTransferInstrument.d.ts +15 -0
- package/dist/types/embeds/onboarding/AdyenOnboarding.d.ts +12 -0
- package/dist/types/embeds/onboarding/adyen-onboarding.types.d.ts +4 -1
- package/dist/types/embeds/sign-pci/AdyenSignPci.d.ts +14 -0
- package/dist/types/embeds/sign-pci/adyen-sign-pci.types.d.ts +5 -3
- package/dist/types/embeds/terms-of-service/AdyenTermsOfService.d.ts +12 -0
- package/dist/types/embeds/terms-of-service/adyen-terms-of-service.types.d.ts +7 -1
- package/dist/types/embeds/transfer-instrument/AdyenTransferInstrument.d.ts +16 -0
- package/dist/types/embeds/transfer-instrument/adyen-transfer-instrument.types.d.ts +7 -2
- package/dist/types/embeds/verification-status/AdyenVerificationStatus.d.ts +20 -0
- package/dist/types/hooks/introduction/useIntroductionScreens.d.ts +1 -1
- package/dist/types/hooks/singpass/useHasSeenSingpassSelection.d.ts +2 -1
- package/dist/types/hooks/singpass/useSingpassMyInfoLogin.d.ts +2 -2
- package/dist/types/hooks/useAccountHolder.d.ts +1 -1
- package/dist/types/hooks/useAllowedCountries.d.ts +1 -1
- package/dist/types/hooks/useAsyncValidator.d.ts +2 -1
- package/dist/types/hooks/useBusinessSetup.d.ts +1 -1
- package/dist/types/hooks/useDataConflicts.d.ts +0 -6
- package/dist/types/hooks/useDataMissingRemediations.d.ts +1 -1
- package/dist/types/hooks/useForm/reducer.d.ts +2 -2
- package/dist/types/hooks/useForm/types.d.ts +14 -19
- package/dist/types/hooks/useFormComposer.d.ts +2 -2
- package/dist/types/hooks/useLegalCompanyNameField/useLegalCompanyNameField.d.ts +28 -0
- package/dist/types/hooks/useMultiForm/reducer.d.ts +4 -3
- package/dist/types/hooks/useMultiForm/types.d.ts +36 -73
- package/dist/types/hooks/useMultiForm/useMultiForm.d.ts +1 -1
- package/dist/types/hooks/useMultiForm/useMultiFormAsyncValidator.d.ts +2 -2
- package/dist/types/hooks/useScenarioConfiguration.d.ts +5 -5
- package/dist/types/language/Language.d.ts +1 -7
- package/dist/types/language/i18n.d.ts +2 -0
- package/dist/types/language/types.d.ts +3 -0
- package/dist/types/language/utils.d.ts +12 -3
- package/dist/types/stores/globalStore/calculateTaskStatus.d.ts +2 -2
- package/dist/types/stores/globalStore/determineTaskIdentifiers.d.ts +2 -2
- package/dist/types/stores/globalStore/get-task-status.d.ts +1 -1
- package/dist/types/stores/globalStore/globalStore.d.ts +4 -4
- package/dist/types/stores/globalStore/taskStatus.d.ts +1 -1
- package/dist/types/types/datasets/country-code.d.ts +251 -0
- package/dist/types/{core/models → types}/errors/capability-problems.d.ts +1 -1
- package/dist/types/{core/models → types}/errors/entity-problems.d.ts +4 -4
- package/dist/types/{core/models → types}/errors/error-message.d.ts +1 -1
- package/dist/types/{core/models → types}/errors/maintenance-mode-error.d.ts +1 -1
- package/dist/types/{core/models → types}/errors/remediation.d.ts +1 -1
- package/dist/types/{core/models → types}/form-configuration.d.ts +4 -4
- package/dist/types/{core/models → types}/form-rules.d.ts +10 -8
- package/dist/types/{core/models → types}/form.d.ts +1 -1
- package/dist/types/utils/accountHolderUtils.d.ts +1 -1
- package/dist/types/utils/api/documentUtils.d.ts +1 -1
- package/dist/types/utils/api/getProblemsForEntity.d.ts +2 -2
- package/dist/types/utils/api/processCapabilitites.d.ts +5 -4
- package/dist/types/utils/api/processValidationErrors.d.ts +3 -3
- package/dist/types/utils/birthDateUtils.d.ts +53 -2
- package/dist/types/utils/country.d.ts +5 -2
- package/dist/types/utils/datasetUtil.d.ts +3 -3
- package/dist/types/{core/models/decision-maker.d.ts → utils/decisionMaker.d.ts} +2 -2
- package/dist/types/utils/dropinUtils.d.ts +2 -2
- package/dist/types/utils/entityAssociationUtil.d.ts +6 -7
- package/dist/types/utils/entityStatusUtil.d.ts +2 -2
- package/dist/types/utils/eventHandlers/handleKeys.d.ts +2 -2
- package/dist/types/{core/models/field-configurations.d.ts → utils/fieldConfigurations.d.ts} +4 -4
- package/dist/types/utils/formUtils.d.ts +1 -1
- package/dist/types/utils/formatCurrency.d.ts +1 -1
- package/dist/types/utils/getDisplayErrorMessage.d.ts +2 -2
- package/dist/types/utils/getLegalEntityCountry.d.ts +1 -1
- package/dist/types/utils/getName.d.ts +2 -2
- package/dist/types/utils/getSSNType.d.ts +1 -1
- package/dist/types/utils/makeSelectItemForRole.d.ts +2 -2
- package/dist/types/utils/mapping/mapExistingFile.d.ts +1 -1
- package/dist/types/utils/mapping/utils.d.ts +7 -10
- package/dist/types/utils/masking/masks/businessRegistrationNumberMasks.d.ts +1 -0
- package/dist/types/utils/omitObscuredFieldsIfUnchanged.d.ts +1 -1
- package/dist/types/utils/perCountry.d.ts +1 -1
- package/dist/types/utils/perState.d.ts +3 -2
- package/dist/types/utils/regex/patternValidators.d.ts +2 -0
- package/dist/types/utils/regex/postalCodePatterns.d.ts +1 -1
- package/dist/types/utils/simulateTextChangeFromKeyboardEvent.d.ts +2 -2
- package/dist/types/utils/trackNavigation.d.ts +1 -2
- package/dist/types/utils/urlUtils.d.ts +1 -0
- package/dist/types/utils/validation/types.d.ts +1 -1
- package/dist/types/utils/validation/validationResult.d.ts +1 -1
- package/dist/types/{core/models/errors/validation-error.d.ts → utils/validationError.d.ts} +1 -1
- package/dist/types/utils/validatorUtils.d.ts +7 -3
- package/dist/types/utils/verification/helpers/verifyIdNumber.d.ts +2 -2
- package/dist/{useMultiForm-Lh2i5tRJ.js → useMultiForm-KQwxav4F.js} +160 -136
- package/dist/{useOnboardingStatus-D1ym3MHp.js → useOnboardingStatus-BMyj9Pwn.js} +2 -2
- package/dist/{useSalesChannelsSettings-BGuBY0ls.js → useSalesChannelsSettings-43TfSoxc.js} +2 -2
- package/dist/{useTermsOfServiceStatus-DGZYHVsm.js → useTermsOfServiceStatus-CBHKWYSb.js} +4 -4
- package/dist/{useUpdateLegalEntity-By6uwPUg.js → useUpdateLegalEntity-D8dw9Oc3.js} +2 -2
- package/dist/{utils-BPrqY9DW.js → utils-CL9qlD-O.js} +18 -11
- package/dist/{validate-Dyb8B4Hi.js → validate-CeF0YKvL.js} +2 -2
- package/dist/validate-CuwYJGc9.js +94 -0
- package/dist/vue/adyen-individual.js +1 -1
- package/dist/vue/adyen-manage-individual.js +1 -1
- package/dist/vue/adyen-terms-of-service.js +1 -1
- package/dist/vue/adyen-transfer-instrument.js +5 -4
- package/dist/{yaml-Ba_Tz8d4.js → yaml-CBkrSAtc.js} +2 -2
- package/dist/zh-CN-wUb4MmTZ.js +13 -0
- package/dist/zh-TW-DNTXHLKa.js +13 -0
- package/package.json +53 -51
- package/dist/CXEL7IU7-B_FIdhoh.js +0 -55
- package/dist/Confirm-okTxq40p.js +0 -56
- package/dist/ContractViewer-BChszuWL.js +0 -980
- package/dist/FormEndState-BQOQ83vO.js +0 -32
- package/dist/FormNavigation-B6RspX9C.js +0 -145
- package/dist/FormWrapper-Dvm1o4tC.js +0 -149
- package/dist/HASRA6WW-C1SPXfmX.js +0 -12411
- package/dist/I3HPI4QX-A8JLvlId.js +0 -46
- package/dist/MaybeModal-Djz8fRfd.js +0 -18
- package/dist/Modal-CRNejb1x.js +0 -135
- package/dist/PayoutDetailsDropin-Bw29V8E7.js +0 -901
- package/dist/PayoutDetailsPage-BHNHaMbR.js +0 -57
- package/dist/ShadowStylesRoot-D4KvocCc.js +0 -103
- package/dist/SourceOfFunds.module-OqFTr4WQ.js +0 -128
- package/dist/Spacer-BK3jDget.js +0 -18
- package/dist/StepProgressIndicator-BuGfVdlr.js +0 -74
- package/dist/bg-BG-CGHVGS50.js +0 -1986
- package/dist/cs-CZ-5Os6MsQs.js +0 -1986
- package/dist/da-DK-Dk9852pS.js +0 -1986
- package/dist/de-DE-B3TpRjZX.js +0 -994
- package/dist/de-DE-dk9CMgxF.js +0 -1986
- package/dist/documentUtils-51iMbUyU.js +0 -226
- package/dist/dropinUtils-Bk0T79SK.js +0 -204
- package/dist/el-GR-CFEuLvxK.js +0 -994
- package/dist/el-GR-DgI6Cgl6.js +0 -1986
- package/dist/en-US-ghR-1_C2.js +0 -994
- package/dist/es-ES-BtWn2FOQ.js +0 -994
- package/dist/es-ES-BzoYprDP.js +0 -1986
- package/dist/et-EE-DlbiEFQu.js +0 -1986
- package/dist/fi-FI-GSyT4vm7.js +0 -1986
- package/dist/fr-FR-BEImhl_J.js +0 -1986
- package/dist/fr-FR-HvIkGqJf.js +0 -994
- package/dist/hr-HR-CNFI9uDD.js +0 -1986
- package/dist/hu-HU-D4xFA3R6.js +0 -1986
- package/dist/individualFormConfig-BrFLPTfr.js +0 -171
- package/dist/it-IT-B65JP9Qv.js +0 -1986
- package/dist/it-IT-CjbZahlB.js +0 -994
- package/dist/ja-JP-4jufT0xh.js +0 -994
- package/dist/ja-JP-CgGmwtzl.js +0 -1986
- package/dist/lt-LT-D_Q1Z3N4.js +0 -1986
- package/dist/lv-LV-aF5bMtic.js +0 -1986
- package/dist/mapExistingFile-BE74t9jV.js +0 -25
- package/dist/mapTransferInstrumentToPayoutAccount-DR8zv8gS.js +0 -30
- package/dist/nl-NL-B3xjfpMi.js +0 -994
- package/dist/nl-NL-GDXpht_y.js +0 -1986
- package/dist/no-NO-CEow5Bac.js +0 -1986
- package/dist/omitObscuredFieldsIfUnchanged-DhCrqm4T.js +0 -28
- package/dist/pl-PL-Bir_Ltlv.js +0 -1986
- package/dist/process-field-configurations-DugpEY9k.js +0 -185
- package/dist/processValidationErrors-RYlNmxB9.js +0 -203
- package/dist/pt-PT-BpYDD-PX.js +0 -994
- package/dist/pt-PT-lkmVY63I.js +0 -1986
- package/dist/ro-RO-CTQvP4R9.js +0 -1986
- package/dist/ru-RU-BlgIj-Q4.js +0 -994
- package/dist/sk-SK-Ct3OVI0e.js +0 -1986
- package/dist/sl-SI-CNjkFWB7.js +0 -1986
- package/dist/sv-SE-7lcf_fB9.js +0 -994
- package/dist/sv-SE-BwREUuQq.js +0 -1986
- package/dist/types/api/companyDataSet/useCompanyDataset.d.ts +0 -5
- package/dist/types/components/Individual/forms/IndividualOnfido/IdVerificationMethod/formatId.d.ts +0 -3
- package/dist/types/core/models/country-code.d.ts +0 -250
- package/dist/types/embeds/ShadowStylesRoot.d.ts +0 -3
- package/dist/types/utils/sanitizeHtml.d.ts +0 -3
- package/dist/types/utils/useStateFromProp.d.ts +0 -9
- package/dist/useToastContext-CF2xonft.js +0 -21
- package/dist/utils-B1H_8b1P.js +0 -74
- package/dist/validate-wd48TLfx.js +0 -245
- package/dist/zh-CN-xYZH718R.js +0 -994
- package/dist/zh-TW-DqBBNurv.js +0 -994
- /package/dist/types/{core/types/AccountHolder.types.d.ts → types/accountHolder.d.ts} +0 -0
- /package/dist/types/{core/models → types/datasets}/currency.d.ts +0 -0
- /package/dist/types/{core/models → types/datasets}/province-code.d.ts +0 -0
- /package/dist/types/{core/models → types/datasets}/state-code.d.ts +0 -0
- /package/dist/types/{core/models → types}/errors/form-verification-errors.d.ts +0 -0
- /package/dist/types/{core/models → types}/errors/remediation-action-context.d.ts +0 -0
- /package/dist/types/{core/models → types}/file.d.ts +0 -0
|
@@ -2,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] = "ba18ab40-57e3-4f27-878f-7d4de0949d67", e._sentryDebugIdIdentifier = "sentry-dbid-ba18ab40-57e3-4f27-878f-7d4de0949d67");
|
|
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, useMemo, useState, useCallback } from "preact/hooks";
|
|
12
|
+
import { u as useCreateLegalEntity, a as useUpdateLegalEntity } from "./useUpdateLegalEntity-D8dw9Oc3.js";
|
|
13
|
+
import { bz as reverseMapping, bA as formatObject, bB as isEeaCountry, y as LegalEntityType, bd as cloneObject, p as useApiContext, q as useQuery, r as httpGet, ap as useI18nContext, aB as Field, bu as Select, G as Typography, bC as LegalFormField, aA as createFormUtils, aY as RadioGroup, bD as Link, bE as InputText, be as currencyByCountry, bF as InputNumber, bG as InputDate, bH as Currency, bI as CURRENCY_FIELD, bJ as InputCurrency, bK as useFormContext, ax as getFieldProps, az as ErrorPanel, bL as getAddressSchemaForCountry, bM as COUNTRIES_WITH_STATES_DATASET, bN as Address, bO as getAddressSchemaLabelsByCountry, a0 as useAnalyticsContext, bh as useInvalidateRootLegalEntity, ao as useAssociatedLegalEntity, b3 as datasetUtilities, a6 as useToastContext, K as useSettingsContext, M as SettingNames, bP as getAssociatedLeAnalyticsPayload, bQ as getRequiredForms, bR as addValidityToForms, bS as useFormComposer, bT as trackNavigation, L as Loader, a4 as Icon, _ as Button, bU as isValidationError, bV as processValidationErrors, bW as isMaintenanceModeError } from "./StoreProvider-ClKLaHzy.js";
|
|
14
|
+
import { F as FormContextProvider, a as FormFlow } from "./FormFlow-DjvdNEiV.js";
|
|
15
|
+
import { u as useMultiForm } from "./useMultiForm-KQwxav4F.js";
|
|
16
|
+
import { F as FormEndState } from "./FormEndState-JB6QFSet.js";
|
|
17
|
+
import { l as localizeDateString } from "./localizeDateString-CKCBXzSn.js";
|
|
18
|
+
import { m as mapFinancialReportsToFinancialInformation, a as mapFinancialInformationToFinancialReport } from "./mapFinancialReportsToFinancialInformation-D_6u_bSS.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",
|
|
@@ -145,27 +124,28 @@ var BusinessFinancingIndex = /* @__PURE__ */ ((BusinessFinancingIndex2) => {
|
|
|
145
124
|
return BusinessFinancingIndex2;
|
|
146
125
|
})(BusinessFinancingIndex || {});
|
|
147
126
|
const getLegalEntityId = (businessFinancingIndex, rootLegalEntity) => {
|
|
148
|
-
var _a;
|
|
149
127
|
if (!rootLegalEntity) return void 0;
|
|
150
128
|
if (businessFinancingIndex === BusinessFinancingIndex.COMPANY) return rootLegalEntity.id;
|
|
151
|
-
if (!
|
|
129
|
+
if (!rootLegalEntity?.entityAssociations) return void 0;
|
|
152
130
|
const businessFinancingEntityType = BusinessFinancingIndex.PARENT_COMPANY ? "immediateParentCompany" : "ultimateParentCompany";
|
|
153
|
-
const businessFinancingEntityAssociation =
|
|
131
|
+
const businessFinancingEntityAssociation = rootLegalEntity.entityAssociations?.find(
|
|
154
132
|
(entity) => entity.type === businessFinancingEntityType
|
|
155
133
|
);
|
|
156
|
-
return businessFinancingEntityAssociation
|
|
134
|
+
return businessFinancingEntityAssociation?.legalEntityId;
|
|
157
135
|
};
|
|
158
136
|
const USER_LOCALE = typeof navigator !== "undefined" ? navigator.language : "en-US";
|
|
159
|
-
const entityHasParentCompany = (data) =>
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
137
|
+
const entityHasParentCompany = (data) => data.company?.isCompanyOwnedByAnotherCompany && data.company?.isCompanyOwnedByAnotherCompany === "Yes";
|
|
138
|
+
const entityHasUltimateParentCompany = (data) => data.company?.isParentOwnedByAnotherCompany && data.company?.isParentOwnedByAnotherCompany === "Yes";
|
|
139
|
+
const financialReportsToString = (financialReports) => {
|
|
140
|
+
return {
|
|
141
|
+
...financialReports,
|
|
142
|
+
numberOfEmployees: financialReports.numberOfEmployees ? financialReports.numberOfEmployees.toString() : void 0,
|
|
143
|
+
netAssets: financialReports.netAssets ? financialReports.netAssets.toString() : void 0,
|
|
144
|
+
annualTurnover: financialReports.annualTurnover ? financialReports.annualTurnover.toString() : void 0,
|
|
145
|
+
balanceSheetTotal: financialReports.balanceSheetTotal ? financialReports.balanceSheetTotal.toString() : void 0
|
|
146
|
+
};
|
|
166
147
|
};
|
|
167
148
|
const prepareBusinessFinancingSubmitData = (businessFinancingIndex, data, rootLegalEntity) => {
|
|
168
|
-
var _a, _b, _c;
|
|
169
149
|
const businessFinancingData = data[businessFinancingIndex];
|
|
170
150
|
if (!businessFinancingData) return null;
|
|
171
151
|
if (businessFinancingIndex === BusinessFinancingIndex.PARENT_COMPANY && !entityHasParentCompany(data)) {
|
|
@@ -174,15 +154,18 @@ const prepareBusinessFinancingSubmitData = (businessFinancingIndex, data, rootLe
|
|
|
174
154
|
if (businessFinancingIndex === BusinessFinancingIndex.ULTIMATE_PARENT_COMPANY && (!entityHasUltimateParentCompany(data) || !entityHasParentCompany(data))) {
|
|
175
155
|
return null;
|
|
176
156
|
}
|
|
177
|
-
const businessFinancingDetails = mapBusinessFinancingToLegalEntity(
|
|
178
|
-
businessFinancingData
|
|
179
|
-
);
|
|
157
|
+
const businessFinancingDetails = mapBusinessFinancingToLegalEntity(businessFinancingData);
|
|
180
158
|
if (!businessFinancingDetails.organization) return null;
|
|
181
|
-
const businessFinancingCountry =
|
|
182
|
-
if (
|
|
183
|
-
const
|
|
184
|
-
businessFinancingData
|
|
185
|
-
|
|
159
|
+
const businessFinancingCountry = businessFinancingDetails.organization.registeredAddress?.country || rootLegalEntity?.organization?.registeredAddress?.country;
|
|
160
|
+
if (businessFinancingData.financialReportingDate && isEeaCountry(businessFinancingCountry)) {
|
|
161
|
+
const finReports = {
|
|
162
|
+
currency: businessFinancingData.currency,
|
|
163
|
+
financialReportingDate: businessFinancingData.financialReportingDate,
|
|
164
|
+
numberOfEmployees: businessFinancingData.numberOfEmployees ? Number(businessFinancingData.numberOfEmployees) : void 0,
|
|
165
|
+
netAssets: businessFinancingData.netAssets ? Number(businessFinancingData.netAssets) : void 0,
|
|
166
|
+
annualTurnover: businessFinancingData.annualTurnover ? Number(businessFinancingData.annualTurnover) : void 0
|
|
167
|
+
};
|
|
168
|
+
const businessFinancingFinancialReport = mapFinancialInformationToFinancialReport(finReports);
|
|
186
169
|
businessFinancingDetails.organization.financialReports = [businessFinancingFinancialReport];
|
|
187
170
|
}
|
|
188
171
|
if (!isEeaCountry(businessFinancingCountry)) {
|
|
@@ -218,11 +201,19 @@ const appendBusinessFinancingData = (legalOrganization, businessFinancingData) =
|
|
|
218
201
|
let financialReportData = {};
|
|
219
202
|
if (legalOrganization.financialReports) {
|
|
220
203
|
const financialReportsArray = Array.isArray(legalOrganization.financialReports) ? legalOrganization.financialReports : [legalOrganization.financialReports];
|
|
221
|
-
|
|
204
|
+
const financialInformationSchema = mapFinancialReportsToFinancialInformation(
|
|
205
|
+
financialReportsArray,
|
|
206
|
+
false
|
|
207
|
+
);
|
|
208
|
+
financialReportData = financialReportsToString(financialInformationSchema);
|
|
209
|
+
if (financialReportData.numberOfEmployees) {
|
|
210
|
+
financialReportData.numberOfEmployees = financialReportData.numberOfEmployees.toString();
|
|
211
|
+
}
|
|
222
212
|
}
|
|
223
213
|
return {
|
|
224
214
|
...clonedBusinessFinancingData,
|
|
225
215
|
...financialReportData,
|
|
216
|
+
numberOfEmployees: financialReportData.numberOfEmployees ? financialReportData.numberOfEmployees.toString() : void 0,
|
|
226
217
|
doesYourCompanyHaveLEI: legalOrganization.globalLegalEntityIdentifier ? "Yes" : "No",
|
|
227
218
|
isThisAddressTheMainHeadquarters: legalOrganization.principalPlaceOfBusiness ? "Yes" : clonedBusinessFinancingData.isThisAddressTheMainHeadquarters
|
|
228
219
|
};
|
|
@@ -258,15 +249,14 @@ const getCompanySchemaKeys = (country, currentData, schemaKeys) => {
|
|
|
258
249
|
if (currentData.doesYourCompanyHaveLEI !== "Yes") {
|
|
259
250
|
fieldsToRemove.push("legalEntityIdentifier");
|
|
260
251
|
}
|
|
261
|
-
if (!
|
|
252
|
+
if (!currentData?.legalInformationInsolvency || ["noLegalActionsTaken", "iDontKnow"].includes(currentData?.legalInformationInsolvency)) {
|
|
262
253
|
fieldsToRemove.push("legalProceedingsDate");
|
|
263
254
|
}
|
|
264
255
|
return schemaKeys.filter((field) => !fieldsToRemove.includes(field));
|
|
265
256
|
};
|
|
266
257
|
const getParentCompanySchemaKeys = (currentData, schemaKeys) => {
|
|
267
|
-
var _a;
|
|
268
258
|
const fieldsToRemove = [];
|
|
269
|
-
const companyCountry =
|
|
259
|
+
const companyCountry = currentData?.registrationAddress?.country;
|
|
270
260
|
if (!isEeaCountry(companyCountry)) {
|
|
271
261
|
fieldsToRemove.push(
|
|
272
262
|
"financialReportingDate",
|
|
@@ -279,11 +269,44 @@ const getParentCompanySchemaKeys = (currentData, schemaKeys) => {
|
|
|
279
269
|
if (currentData.doesYourCompanyHaveLEI !== "Yes") {
|
|
280
270
|
fieldsToRemove.push("legalEntityIdentifier");
|
|
281
271
|
}
|
|
282
|
-
if (!
|
|
272
|
+
if (!currentData?.legalInformationInsolvency || ["noLegalActionsTaken", "iDontKnow"].includes(currentData?.legalInformationInsolvency)) {
|
|
283
273
|
fieldsToRemove.push("legalProceedingsDate");
|
|
284
274
|
}
|
|
285
275
|
return schemaKeys.filter((field) => !fieldsToRemove.includes(field));
|
|
286
276
|
};
|
|
277
|
+
const getBusinessFinancingRequiredFields = (country, data) => {
|
|
278
|
+
let requiredFields = {
|
|
279
|
+
company: companySchemaKeys
|
|
280
|
+
};
|
|
281
|
+
if (!data) {
|
|
282
|
+
return requiredFields;
|
|
283
|
+
}
|
|
284
|
+
const { company, parentCompany = {}, ultimateParentCompany = {} } = data;
|
|
285
|
+
if (company) {
|
|
286
|
+
requiredFields.company = getCompanySchemaKeys(country, company, companySchemaKeys);
|
|
287
|
+
}
|
|
288
|
+
if (company?.isCompanyOwnedByAnotherCompany === "Yes") {
|
|
289
|
+
const parentCompanyRequiredFields = getParentCompanySchemaKeys(
|
|
290
|
+
parentCompany,
|
|
291
|
+
parentCompaniesSchemaKeys
|
|
292
|
+
);
|
|
293
|
+
requiredFields = {
|
|
294
|
+
...requiredFields,
|
|
295
|
+
parentCompany: parentCompanyRequiredFields
|
|
296
|
+
};
|
|
297
|
+
}
|
|
298
|
+
if (company?.isParentOwnedByAnotherCompany === "Yes") {
|
|
299
|
+
const ultimateParentCompanyRequiredFields = getParentCompanySchemaKeys(
|
|
300
|
+
ultimateParentCompany,
|
|
301
|
+
parentCompaniesSchemaKeys
|
|
302
|
+
);
|
|
303
|
+
requiredFields = {
|
|
304
|
+
...requiredFields,
|
|
305
|
+
ultimateParentCompany: ultimateParentCompanyRequiredFields
|
|
306
|
+
};
|
|
307
|
+
}
|
|
308
|
+
return requiredFields;
|
|
309
|
+
};
|
|
287
310
|
const customLabels = {
|
|
288
311
|
company: {
|
|
289
312
|
legalForm: "businessStructure",
|
|
@@ -325,15 +348,14 @@ const getFormattedAmount = (value, currency) => {
|
|
|
325
348
|
const formattedValue = Number(value).toLocaleString(userLocale);
|
|
326
349
|
return `${currency} ${formattedValue}`;
|
|
327
350
|
};
|
|
328
|
-
const formatDataForSummary = (
|
|
329
|
-
var _a, _b, _c, _d, _e;
|
|
351
|
+
const formatDataForSummary = (i18n, datasetUtils, data) => {
|
|
330
352
|
const summaryData = cloneObject(data) || {};
|
|
331
353
|
if (summaryData.company) {
|
|
332
354
|
summaryData.company.legalForm = summaryData.company.legalFormLabel;
|
|
333
355
|
summaryData.company.naceCode = summaryData.company.naceCodeLabel;
|
|
334
356
|
summaryData.company.legalInformationInsolvency = getTranslatedLegalInsolvency(
|
|
335
357
|
i18n,
|
|
336
|
-
|
|
358
|
+
summaryData.company?.legalInformationInsolvency
|
|
337
359
|
);
|
|
338
360
|
summaryData.company.annualTurnover = getFormattedAmount(
|
|
339
361
|
summaryData.company.annualTurnover,
|
|
@@ -347,13 +369,13 @@ const formatDataForSummary = (data, i18n, datasetUtils) => {
|
|
|
347
369
|
summaryData.company.legalProceedingsDate = legalProceedingsDate ? localizeDateString(legalProceedingsDate, i18n.locale) : void 0;
|
|
348
370
|
summaryData.company.financialReportingDate = financialReportingDate ? localizeDateString(financialReportingDate, i18n.locale) : void 0;
|
|
349
371
|
}
|
|
350
|
-
if (
|
|
372
|
+
if (summaryData.parentCompany?.legalName) {
|
|
351
373
|
summaryData.parentCompany.legalForm = summaryData.parentCompany.legalFormLabel;
|
|
352
374
|
summaryData.parentCompany.naceCode = summaryData.parentCompany.naceCodeLabel;
|
|
353
375
|
summaryData.parentCompany.country = summaryData.parentCompany.country ? datasetUtils.getCountryName(summaryData.parentCompany.country) : "";
|
|
354
376
|
summaryData.parentCompany.legalInformationInsolvency = getTranslatedLegalInsolvency(
|
|
355
377
|
i18n,
|
|
356
|
-
|
|
378
|
+
summaryData.parentCompany?.legalInformationInsolvency
|
|
357
379
|
);
|
|
358
380
|
summaryData.parentCompany.annualTurnover = getFormattedAmount(
|
|
359
381
|
summaryData.parentCompany.annualTurnover,
|
|
@@ -367,13 +389,13 @@ const formatDataForSummary = (data, i18n, datasetUtils) => {
|
|
|
367
389
|
summaryData.parentCompany.legalProceedingsDate = legalProceedingsDate ? localizeDateString(legalProceedingsDate, i18n.locale) : void 0;
|
|
368
390
|
summaryData.parentCompany.financialReportingDate = financialReportingDate ? localizeDateString(financialReportingDate, i18n.locale) : void 0;
|
|
369
391
|
}
|
|
370
|
-
if (
|
|
392
|
+
if (summaryData.ultimateParentCompany?.legalName) {
|
|
371
393
|
summaryData.ultimateParentCompany.legalForm = summaryData.ultimateParentCompany.legalFormLabel;
|
|
372
394
|
summaryData.ultimateParentCompany.naceCode = summaryData.ultimateParentCompany.naceCodeLabel;
|
|
373
395
|
summaryData.ultimateParentCompany.country = summaryData.ultimateParentCompany.country ? datasetUtils.getCountryName(summaryData.ultimateParentCompany.country) : "";
|
|
374
396
|
summaryData.ultimateParentCompany.legalInformationInsolvency = getTranslatedLegalInsolvency(
|
|
375
397
|
i18n,
|
|
376
|
-
|
|
398
|
+
summaryData.ultimateParentCompany?.legalInformationInsolvency
|
|
377
399
|
);
|
|
378
400
|
summaryData.ultimateParentCompany.annualTurnover = getFormattedAmount(
|
|
379
401
|
summaryData.ultimateParentCompany.annualTurnover,
|
|
@@ -389,78 +411,7 @@ const formatDataForSummary = (data, i18n, datasetUtils) => {
|
|
|
389
411
|
}
|
|
390
412
|
return summaryData;
|
|
391
413
|
};
|
|
392
|
-
const canSubmit = (data) => MANDATORY_FIELDS_BUSINESS_FINANCING.every((detail) => {
|
|
393
|
-
const value = getProp(data, detail);
|
|
394
|
-
return !isEmpty(value);
|
|
395
|
-
});
|
|
396
414
|
const mapLegalEntityToBusinessFinancing = (legalEntity) => formatObject(legalEntity, businessFinancingComponentsKeyMapping);
|
|
397
|
-
const getLegalForms = async (countryCode, baseUrl) => {
|
|
398
|
-
return httpGet({
|
|
399
|
-
baseUrl,
|
|
400
|
-
path: `datasets/legalForms/${countryCode}`
|
|
401
|
-
});
|
|
402
|
-
};
|
|
403
|
-
const useLegalForms = (countryCode, options) => {
|
|
404
|
-
const { baseUrl } = useApiContext();
|
|
405
|
-
return useQuery({
|
|
406
|
-
queryKey: ["legalForms", countryCode],
|
|
407
|
-
queryFn: () => getLegalForms(countryCode, baseUrl.value),
|
|
408
|
-
...options
|
|
409
|
-
});
|
|
410
|
-
};
|
|
411
|
-
function LegalFormField({
|
|
412
|
-
name = "legalForm",
|
|
413
|
-
data,
|
|
414
|
-
valid,
|
|
415
|
-
errorMessage,
|
|
416
|
-
label,
|
|
417
|
-
readonly,
|
|
418
|
-
handleChangeFor,
|
|
419
|
-
helperText,
|
|
420
|
-
countryCode,
|
|
421
|
-
classNameModifiers = []
|
|
422
|
-
}) {
|
|
423
|
-
const { i18n } = useI18nContext();
|
|
424
|
-
const { data: legalFormsData } = useLegalForms(countryCode);
|
|
425
|
-
const handleChangeForLegalForm = (e) => {
|
|
426
|
-
var _a;
|
|
427
|
-
const legalFormValue = e.target.value;
|
|
428
|
-
const selectedLabel = (_a = legalFormsData == null ? void 0 : legalFormsData.find(
|
|
429
|
-
(legalForm) => legalForm.id === legalFormValue
|
|
430
|
-
)) == null ? void 0 : _a.name;
|
|
431
|
-
const legalFormEvent = {
|
|
432
|
-
target: {
|
|
433
|
-
name: "legalForm",
|
|
434
|
-
value: e.target.value,
|
|
435
|
-
label: selectedLabel
|
|
436
|
-
}
|
|
437
|
-
};
|
|
438
|
-
handleChangeFor("legalForm")(legalFormEvent);
|
|
439
|
-
};
|
|
440
|
-
return /* @__PURE__ */ jsx(
|
|
441
|
-
Field,
|
|
442
|
-
{
|
|
443
|
-
name,
|
|
444
|
-
label: label || i18n.get("businessStructure"),
|
|
445
|
-
errorMessage,
|
|
446
|
-
classNameModifiers,
|
|
447
|
-
isValid: valid.legalForm,
|
|
448
|
-
helper: helperText == null ? void 0 : helperText.legalForm,
|
|
449
|
-
children: (childProps) => /* @__PURE__ */ jsx(
|
|
450
|
-
Select,
|
|
451
|
-
{
|
|
452
|
-
...childProps,
|
|
453
|
-
name,
|
|
454
|
-
placeholder: i18n.get("selectOne"),
|
|
455
|
-
selected: data.legalForm,
|
|
456
|
-
items: legalFormsData ?? [],
|
|
457
|
-
readonly: readonly && !!data,
|
|
458
|
-
onChange: handleChangeForLegalForm
|
|
459
|
-
}
|
|
460
|
-
)
|
|
461
|
-
}
|
|
462
|
-
);
|
|
463
|
-
}
|
|
464
415
|
const getNaceCodes = async (baseUrl) => {
|
|
465
416
|
return httpGet({
|
|
466
417
|
baseUrl,
|
|
@@ -483,35 +434,41 @@ function NaceCodeField({
|
|
|
483
434
|
label,
|
|
484
435
|
readonly,
|
|
485
436
|
handleChangeFor,
|
|
486
|
-
helperText
|
|
487
|
-
classNameModifiers = []
|
|
437
|
+
helperText
|
|
488
438
|
}) {
|
|
489
439
|
const { i18n } = useI18nContext();
|
|
490
440
|
const { data: naceCodesData } = useNaceCodes();
|
|
441
|
+
const handleChangeForRef = useRef(handleChangeFor);
|
|
442
|
+
useEffect(() => {
|
|
443
|
+
handleChangeForRef.current = handleChangeFor;
|
|
444
|
+
}, [handleChangeFor]);
|
|
491
445
|
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
446
|
const naceCodeEvent = {
|
|
498
447
|
target: {
|
|
499
448
|
name: "naceCode",
|
|
500
|
-
value: e.target.value
|
|
501
|
-
label: selectedLabel
|
|
449
|
+
value: e.target.value
|
|
502
450
|
}
|
|
503
451
|
};
|
|
504
452
|
handleChangeFor("naceCode")(naceCodeEvent);
|
|
505
453
|
};
|
|
454
|
+
useEffect(() => {
|
|
455
|
+
const selectedLabel = naceCodesData?.find((naceCode) => naceCode.id === data.naceCode)?.name;
|
|
456
|
+
const naceCodeEvent = {
|
|
457
|
+
target: {
|
|
458
|
+
name: "naceCodeLabel",
|
|
459
|
+
value: selectedLabel
|
|
460
|
+
}
|
|
461
|
+
};
|
|
462
|
+
handleChangeForRef.current("naceCodeLabel")(naceCodeEvent);
|
|
463
|
+
}, [data.naceCode, naceCodesData]);
|
|
506
464
|
return /* @__PURE__ */ jsx(
|
|
507
465
|
Field,
|
|
508
466
|
{
|
|
509
467
|
name,
|
|
510
468
|
label: label || i18n.get("industryAndNaceCode"),
|
|
511
469
|
errorMessage,
|
|
512
|
-
classNameModifiers,
|
|
513
470
|
isValid: valid.naceCode,
|
|
514
|
-
helper: helperText
|
|
471
|
+
helper: helperText?.naceCode,
|
|
515
472
|
children: (childProps) => /* @__PURE__ */ jsx(
|
|
516
473
|
Select,
|
|
517
474
|
{
|
|
@@ -527,51 +484,44 @@ function NaceCodeField({
|
|
|
527
484
|
}
|
|
528
485
|
);
|
|
529
486
|
}
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
487
|
+
const businessInformationFields = [
|
|
488
|
+
"legalForm",
|
|
489
|
+
"naceCode",
|
|
490
|
+
"naceCodeLabel",
|
|
491
|
+
"legalFormLabel",
|
|
492
|
+
"doesYourCompanyHaveLEI",
|
|
493
|
+
"legalEntityIdentifier"
|
|
494
|
+
];
|
|
495
|
+
function BusinessFinancingBusinessInformation(props) {
|
|
496
|
+
const {
|
|
497
|
+
data,
|
|
498
|
+
valid,
|
|
499
|
+
errors,
|
|
500
|
+
country,
|
|
501
|
+
handleFieldChange,
|
|
502
|
+
fieldValidationErrors,
|
|
503
|
+
targetPage,
|
|
504
|
+
sectionHeading
|
|
505
|
+
} = props;
|
|
542
506
|
const { i18n } = useI18nContext();
|
|
507
|
+
const formUtils = createFormUtils(props, i18n);
|
|
508
|
+
if (!handleFieldChange) {
|
|
509
|
+
return;
|
|
510
|
+
}
|
|
543
511
|
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
512
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
563
513
|
/* @__PURE__ */ jsx(Typography, { el: "h3", variant: "title", children: i18n.get(sectionHeading || "yourBusinessInformation") }),
|
|
564
514
|
/* @__PURE__ */ jsx(
|
|
565
515
|
LegalFormField,
|
|
566
516
|
{
|
|
567
517
|
name: "legalForm",
|
|
568
|
-
countryCode:
|
|
518
|
+
countryCode: country,
|
|
569
519
|
data: {
|
|
570
|
-
legalForm: data
|
|
520
|
+
legalForm: data?.legalForm
|
|
571
521
|
},
|
|
572
|
-
valid: { legalForm: valid
|
|
573
|
-
errorMessage: formUtils.getErrorMessage("legalForm", errors,
|
|
574
|
-
handleChangeFor:
|
|
522
|
+
valid: { legalForm: valid?.legalForm },
|
|
523
|
+
errorMessage: formUtils.getErrorMessage("legalForm", errors, fieldValidationErrors),
|
|
524
|
+
handleChangeFor: handleFieldChange,
|
|
575
525
|
readonly: false,
|
|
576
526
|
label: formUtils.getLabel("legalForm", "businessStructure")
|
|
577
527
|
}
|
|
@@ -580,10 +530,10 @@ function BusinessFinancingBusinessInformation({
|
|
|
580
530
|
NaceCodeField,
|
|
581
531
|
{
|
|
582
532
|
name: "naceCode",
|
|
583
|
-
data: { naceCode: data
|
|
584
|
-
valid: { naceCode: valid
|
|
585
|
-
errorMessage: formUtils.getErrorMessage("naceCode", errors,
|
|
586
|
-
handleChangeFor:
|
|
533
|
+
data: { naceCode: data?.naceCode },
|
|
534
|
+
valid: { naceCode: valid?.naceCode },
|
|
535
|
+
errorMessage: formUtils.getErrorMessage("naceCode", errors, fieldValidationErrors),
|
|
536
|
+
handleChangeFor: handleFieldChange,
|
|
587
537
|
readonly: false,
|
|
588
538
|
label: formUtils.getLabel("naceCode", "industryAndNaceCode")
|
|
589
539
|
}
|
|
@@ -600,29 +550,37 @@ function BusinessFinancingBusinessInformation({
|
|
|
600
550
|
" ",
|
|
601
551
|
/* @__PURE__ */ jsx(Link, { href: "https://search.gleif.org/#/search/", external: true, inline: true, children: i18n.get("lookUpYourLEI") })
|
|
602
552
|
] }),
|
|
603
|
-
errorMessage: formUtils.getErrorMessage(
|
|
553
|
+
errorMessage: formUtils.getErrorMessage(
|
|
554
|
+
"doesYourCompanyHaveLEI",
|
|
555
|
+
errors,
|
|
556
|
+
fieldValidationErrors
|
|
557
|
+
),
|
|
604
558
|
children: (childProps) => /* @__PURE__ */ jsx(
|
|
605
559
|
RadioGroup,
|
|
606
560
|
{
|
|
607
561
|
...childProps,
|
|
608
562
|
name: "doesYourCompanyHaveLEI",
|
|
609
563
|
items: isMainCompany ? businessFinancingRadioItems : businessFinancingParentRadioItems,
|
|
610
|
-
value: data
|
|
564
|
+
value: data?.doesYourCompanyHaveLEI,
|
|
611
565
|
disabled: false,
|
|
612
|
-
onChange:
|
|
566
|
+
onChange: handleFieldChange("doesYourCompanyHaveLEI"),
|
|
613
567
|
"aria-required": true,
|
|
614
|
-
"aria-invalid": !valid
|
|
568
|
+
"aria-invalid": !valid?.doesYourCompanyHaveLEI
|
|
615
569
|
}
|
|
616
570
|
)
|
|
617
571
|
}
|
|
618
572
|
),
|
|
619
|
-
data
|
|
573
|
+
data?.doesYourCompanyHaveLEI === "Yes" && /* @__PURE__ */ jsx(
|
|
620
574
|
Field,
|
|
621
575
|
{
|
|
622
576
|
name: "legalEntityIdentifier",
|
|
623
577
|
label: formUtils.getLabel("legalEntityIdentifier", "legalEntityIdentifier"),
|
|
624
|
-
errorMessage: formUtils.getErrorMessage(
|
|
625
|
-
|
|
578
|
+
errorMessage: formUtils.getErrorMessage(
|
|
579
|
+
"legalEntityIdentifier",
|
|
580
|
+
errors,
|
|
581
|
+
fieldValidationErrors
|
|
582
|
+
),
|
|
583
|
+
isValid: valid?.legalEntityIdentifier,
|
|
626
584
|
helper: i18n.get("enterNCharactersWithAMixForExample", {
|
|
627
585
|
values: {
|
|
628
586
|
numChars: 20,
|
|
@@ -634,14 +592,13 @@ function BusinessFinancingBusinessInformation({
|
|
|
634
592
|
{
|
|
635
593
|
...childProps,
|
|
636
594
|
name: "legalEntityIdentifier",
|
|
637
|
-
value: data
|
|
595
|
+
value: data?.legalEntityIdentifier,
|
|
638
596
|
readonly: false,
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
onBlur: handleChangeFor("legalEntityIdentifier", "blur"),
|
|
597
|
+
onInput: handleFieldChange("legalEntityIdentifier", "input"),
|
|
598
|
+
onBlur: handleFieldChange("legalEntityIdentifier", "blur"),
|
|
642
599
|
"aria-required": true,
|
|
643
|
-
"aria-invalid": !valid
|
|
644
|
-
isValid: valid
|
|
600
|
+
"aria-invalid": !valid?.legalEntityIdentifier,
|
|
601
|
+
isValid: valid?.legalEntityIdentifier
|
|
645
602
|
}
|
|
646
603
|
)
|
|
647
604
|
}
|
|
@@ -649,31 +606,28 @@ function BusinessFinancingBusinessInformation({
|
|
|
649
606
|
] });
|
|
650
607
|
}
|
|
651
608
|
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;
|
|
609
|
+
const financialInformationFields = [
|
|
610
|
+
"numberOfEmployees",
|
|
611
|
+
"financialReportingDate",
|
|
612
|
+
"doesYourCompanyHaveLEI",
|
|
613
|
+
"legalEntityIdentifier",
|
|
614
|
+
"currency",
|
|
615
|
+
"netAssets",
|
|
616
|
+
"annualTurnover"
|
|
617
|
+
];
|
|
618
|
+
function BusinessFinancingFinancialInformation(props) {
|
|
619
|
+
const { data, valid, errors, country, sectionHeading, handleFieldChange, fieldValidationErrors } = props;
|
|
664
620
|
const { i18n } = useI18nContext();
|
|
621
|
+
const formUtils = createFormUtils(props, i18n);
|
|
622
|
+
const currenciesForCurrCountry = useMemo(() => currencyByCountry[country] ?? [], [country]);
|
|
623
|
+
if (!handleFieldChange) {
|
|
624
|
+
return;
|
|
625
|
+
}
|
|
665
626
|
const financialData = data;
|
|
666
627
|
const financialErrors = errors;
|
|
667
628
|
const isFinancialDataValid = valid;
|
|
668
|
-
const currenciesForCurrCountry = useMemo(() => currencyByCountry[country] ?? [], [country]);
|
|
669
629
|
const [firstCurrency] = currenciesForCurrCountry;
|
|
670
630
|
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
631
|
return /* @__PURE__ */ jsxs("section", { children: [
|
|
678
632
|
/* @__PURE__ */ jsx(Typography, { el: "h3", variant: "title", children: i18n.get(sectionHeading || "financialInformation") }),
|
|
679
633
|
/* @__PURE__ */ jsx(
|
|
@@ -681,21 +635,20 @@ function BusinessFinancingFinancialInformation({
|
|
|
681
635
|
{
|
|
682
636
|
name: "numberOfEmployees",
|
|
683
637
|
label: formUtils.getLabel("numberOfEmployees", "numberOfEmployees"),
|
|
684
|
-
errorMessage: formUtils.getErrorMessage("numberOfEmployees", errors,
|
|
685
|
-
isValid: valid
|
|
686
|
-
classNameModifiers: ["numberOfEmployees"],
|
|
638
|
+
errorMessage: formUtils.getErrorMessage("numberOfEmployees", errors, fieldValidationErrors),
|
|
639
|
+
isValid: valid?.numberOfEmployees,
|
|
687
640
|
children: (childProps) => /* @__PURE__ */ jsx(
|
|
688
641
|
InputNumber,
|
|
689
642
|
{
|
|
690
643
|
...childProps,
|
|
691
644
|
"aria-required": true,
|
|
692
|
-
"aria-invalid": !valid
|
|
645
|
+
"aria-invalid": !valid?.numberOfEmployees,
|
|
693
646
|
name: "numberOfEmployees",
|
|
694
647
|
min: "0",
|
|
695
648
|
step: "1",
|
|
696
|
-
value: data
|
|
697
|
-
onInput:
|
|
698
|
-
onBlur:
|
|
649
|
+
value: data?.numberOfEmployees,
|
|
650
|
+
onInput: handleFieldChange("numberOfEmployees", "input"),
|
|
651
|
+
onBlur: handleFieldChange("numberOfEmployees", "blur")
|
|
699
652
|
}
|
|
700
653
|
)
|
|
701
654
|
}
|
|
@@ -706,19 +659,22 @@ function BusinessFinancingFinancialInformation({
|
|
|
706
659
|
name: "financialReportingDate",
|
|
707
660
|
label: formUtils.getLabel("financialReportingDate", "financialReportingDate"),
|
|
708
661
|
helper: i18n.get("dateOfTotalAssetsCalculation"),
|
|
709
|
-
errorMessage: formUtils.getErrorMessage(
|
|
710
|
-
|
|
711
|
-
|
|
662
|
+
errorMessage: formUtils.getErrorMessage(
|
|
663
|
+
"financialReportingDate",
|
|
664
|
+
errors,
|
|
665
|
+
fieldValidationErrors
|
|
666
|
+
),
|
|
667
|
+
isValid: valid?.financialReportingDate,
|
|
712
668
|
children: (childProps) => /* @__PURE__ */ jsx(
|
|
713
669
|
InputDate,
|
|
714
670
|
{
|
|
715
671
|
...childProps,
|
|
716
672
|
name: "financialReportingDate",
|
|
717
|
-
value: data
|
|
718
|
-
onInput:
|
|
719
|
-
onBlur:
|
|
673
|
+
value: data?.financialReportingDate,
|
|
674
|
+
onInput: handleFieldChange("financialReportingDate", "input"),
|
|
675
|
+
onBlur: handleFieldChange("financialReportingDate", "blur"),
|
|
720
676
|
"aria-required": true,
|
|
721
|
-
"aria-invalid": !valid
|
|
677
|
+
"aria-invalid": !valid?.financialReportingDate,
|
|
722
678
|
max: TODAY_DATE$1
|
|
723
679
|
}
|
|
724
680
|
)
|
|
@@ -727,10 +683,10 @@ function BusinessFinancingFinancialInformation({
|
|
|
727
683
|
/* @__PURE__ */ jsx(
|
|
728
684
|
Currency,
|
|
729
685
|
{
|
|
730
|
-
country
|
|
686
|
+
country,
|
|
731
687
|
data: formUtils.getFieldData(financialData, CURRENCY_FIELD),
|
|
732
|
-
errors: formUtils.getFieldErrors(financialErrors,
|
|
733
|
-
handleChangeFor,
|
|
688
|
+
errors: formUtils.getFieldErrors(financialErrors, fieldValidationErrors, CURRENCY_FIELD),
|
|
689
|
+
handleChangeFor: handleFieldChange,
|
|
734
690
|
labels: { currency: i18n.get("reportingCurrency") },
|
|
735
691
|
readonly: formUtils.isReadOnly("currency"),
|
|
736
692
|
valid: formUtils.getFieldValid(isFinancialDataValid, CURRENCY_FIELD)
|
|
@@ -743,15 +699,15 @@ function BusinessFinancingFinancialInformation({
|
|
|
743
699
|
name: "netAssets",
|
|
744
700
|
label: formUtils.getLabel("netAssets", "totalAssets"),
|
|
745
701
|
helper: i18n.get("totalAssetsHelper"),
|
|
746
|
-
errorMessage: formUtils.getErrorMessage("netAssets", errors,
|
|
702
|
+
errorMessage: formUtils.getErrorMessage("netAssets", errors, fieldValidationErrors),
|
|
747
703
|
children: (childProps) => /* @__PURE__ */ jsx(
|
|
748
704
|
InputCurrency,
|
|
749
705
|
{
|
|
750
706
|
...childProps,
|
|
751
707
|
locale: i18n.locale,
|
|
752
|
-
currency: data
|
|
753
|
-
amount: data
|
|
754
|
-
onAmountChanged:
|
|
708
|
+
currency: data?.currency ?? defaultCurrency,
|
|
709
|
+
amount: data?.netAssets ? Number(data?.netAssets) : void 0,
|
|
710
|
+
onAmountChanged: handleFieldChange("netAssets")
|
|
755
711
|
}
|
|
756
712
|
)
|
|
757
713
|
}
|
|
@@ -762,16 +718,16 @@ function BusinessFinancingFinancialInformation({
|
|
|
762
718
|
name: "annualTurnover",
|
|
763
719
|
label: formUtils.getLabel("annualTurnover", "annualTurnover"),
|
|
764
720
|
helper: i18n.get("annualTurnoverHelper"),
|
|
765
|
-
errorMessage: formUtils.getErrorMessage("annualTurnover", errors,
|
|
721
|
+
errorMessage: formUtils.getErrorMessage("annualTurnover", errors, fieldValidationErrors),
|
|
766
722
|
children: (childProps) => /* @__PURE__ */ jsx(
|
|
767
723
|
InputCurrency,
|
|
768
724
|
{
|
|
769
725
|
...childProps,
|
|
770
726
|
name: "annualTurnover",
|
|
771
727
|
locale: i18n.locale,
|
|
772
|
-
currency: data
|
|
773
|
-
amount: data
|
|
774
|
-
onAmountChanged:
|
|
728
|
+
currency: data?.currency ?? defaultCurrency,
|
|
729
|
+
amount: data?.annualTurnover ? Number(data?.annualTurnover) : void 0,
|
|
730
|
+
onAmountChanged: handleFieldChange("annualTurnover")
|
|
775
731
|
}
|
|
776
732
|
)
|
|
777
733
|
}
|
|
@@ -780,16 +736,17 @@ function BusinessFinancingFinancialInformation({
|
|
|
780
736
|
] });
|
|
781
737
|
}
|
|
782
738
|
const TODAY_DATE = (/* @__PURE__ */ new Date()).toISOString().split("T")[0];
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
handleChangeFor,
|
|
790
|
-
sectionHeading
|
|
791
|
-
}) {
|
|
739
|
+
const legalInformationFields = [
|
|
740
|
+
"legalInformationInsolvency",
|
|
741
|
+
"legalProceedingsDate"
|
|
742
|
+
];
|
|
743
|
+
function BusinessFinancingLegalInformation(props) {
|
|
744
|
+
const { data, valid, errors, fieldValidationErrors, handleFieldChange, sectionHeading } = props;
|
|
792
745
|
const { i18n } = useI18nContext();
|
|
746
|
+
const formUtils = createFormUtils(props, i18n);
|
|
747
|
+
if (!handleFieldChange) {
|
|
748
|
+
return;
|
|
749
|
+
}
|
|
793
750
|
const legalInformationInsolvencyItems = [
|
|
794
751
|
{ id: "noLegalActionsTaken", name: i18n.get("no") },
|
|
795
752
|
{ id: "underJudicialAdministration", name: i18n.get("underJudicialAdministration") },
|
|
@@ -797,7 +754,7 @@ function BusinessFinancingLegalInformation({
|
|
|
797
754
|
{ id: "otherLegalMeasures", name: i18n.get("otherLegalMeasures") },
|
|
798
755
|
{ id: "iDontKnow", name: i18n.get("iDontKnow") }
|
|
799
756
|
];
|
|
800
|
-
const showLegalProceedingsDateField = data
|
|
757
|
+
const showLegalProceedingsDateField = data?.legalInformationInsolvency && !["noLegalActionsTaken", "iDontKnow"].includes(data?.legalInformationInsolvency);
|
|
801
758
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
802
759
|
/* @__PURE__ */ jsx(Typography, { el: "h3", variant: "title", children: i18n.get(sectionHeading || "legalInformation") }),
|
|
803
760
|
/* @__PURE__ */ jsx(
|
|
@@ -808,20 +765,20 @@ function BusinessFinancingLegalInformation({
|
|
|
808
765
|
errorMessage: formUtils.getErrorMessage(
|
|
809
766
|
"legalInformationInsolvency",
|
|
810
767
|
errors,
|
|
811
|
-
|
|
768
|
+
fieldValidationErrors
|
|
812
769
|
),
|
|
813
|
-
isValid: valid
|
|
770
|
+
isValid: valid?.legalInformationInsolvency,
|
|
814
771
|
children: (childProps) => /* @__PURE__ */ jsx(
|
|
815
772
|
Select,
|
|
816
773
|
{
|
|
817
774
|
...childProps,
|
|
818
|
-
onChange:
|
|
775
|
+
onChange: handleFieldChange("legalInformationInsolvency", "blur"),
|
|
819
776
|
name: "legalInformationInsolvency",
|
|
820
777
|
placeholder: i18n.get("selectOne"),
|
|
821
|
-
selected: data
|
|
778
|
+
selected: data?.legalInformationInsolvency,
|
|
822
779
|
items: legalInformationInsolvencyItems,
|
|
823
780
|
"aria-required": true,
|
|
824
|
-
"aria-invalid": !valid
|
|
781
|
+
"aria-invalid": !valid?.legalInformationInsolvency
|
|
825
782
|
}
|
|
826
783
|
)
|
|
827
784
|
}
|
|
@@ -831,19 +788,22 @@ function BusinessFinancingLegalInformation({
|
|
|
831
788
|
{
|
|
832
789
|
name: "legalProceedingsDate",
|
|
833
790
|
label: formUtils.getLabel("legalProceedingsDate", "legalProceedingsDate"),
|
|
834
|
-
errorMessage: formUtils.getErrorMessage(
|
|
835
|
-
|
|
791
|
+
errorMessage: formUtils.getErrorMessage(
|
|
792
|
+
"legalProceedingsDate",
|
|
793
|
+
errors,
|
|
794
|
+
fieldValidationErrors
|
|
795
|
+
),
|
|
796
|
+
isValid: valid?.legalProceedingsDate,
|
|
836
797
|
children: (childProps) => /* @__PURE__ */ jsx(
|
|
837
798
|
InputDate,
|
|
838
799
|
{
|
|
839
800
|
...childProps,
|
|
840
801
|
name: "legalProceedingsDate",
|
|
841
802
|
value: data.legalProceedingsDate,
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
onBlur: handleChangeFor("legalProceedingsDate", "blur"),
|
|
803
|
+
onInput: handleFieldChange("legalProceedingsDate", "input"),
|
|
804
|
+
onBlur: handleFieldChange("legalProceedingsDate", "blur"),
|
|
845
805
|
"aria-required": true,
|
|
846
|
-
"aria-invalid": !valid
|
|
806
|
+
"aria-invalid": !valid?.legalProceedingsDate,
|
|
847
807
|
max: TODAY_DATE
|
|
848
808
|
}
|
|
849
809
|
)
|
|
@@ -851,16 +811,17 @@ function BusinessFinancingLegalInformation({
|
|
|
851
811
|
)
|
|
852
812
|
] });
|
|
853
813
|
}
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
handleChangeFor,
|
|
861
|
-
legalEntity
|
|
862
|
-
}) {
|
|
814
|
+
const ownershipStructureFields = [
|
|
815
|
+
"isCompanyOwnedByAnotherCompany",
|
|
816
|
+
"isParentOwnedByAnotherCompany"
|
|
817
|
+
];
|
|
818
|
+
function BusinessFinancingOwnershipStructure(props) {
|
|
819
|
+
const { data, valid, errors = {}, legalEntity, fieldValidationErrors, handleFieldChange } = props;
|
|
863
820
|
const { i18n } = useI18nContext();
|
|
821
|
+
const formUtils = createFormUtils(props, i18n);
|
|
822
|
+
if (!handleFieldChange) {
|
|
823
|
+
return;
|
|
824
|
+
}
|
|
864
825
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
865
826
|
/* @__PURE__ */ jsx(Typography, { el: "h3", variant: "title", children: i18n.get("ownershipStructure") }),
|
|
866
827
|
/* @__PURE__ */ jsx(
|
|
@@ -870,12 +831,12 @@ function BusinessFinancingOwnershipStructure({
|
|
|
870
831
|
name: "isCompanyOwnedByAnotherCompany",
|
|
871
832
|
classNameModifiers: ["highExposureBusinessInformation"],
|
|
872
833
|
label: i18n.get("isCompanyOwnedByAnotherCompany", {
|
|
873
|
-
values: { company:
|
|
834
|
+
values: { company: legalEntity?.organization ? legalEntity.organization.legalName : "" }
|
|
874
835
|
}),
|
|
875
836
|
errorMessage: formUtils.getErrorMessage(
|
|
876
837
|
"isCompanyOwnedByAnotherCompany",
|
|
877
838
|
errors,
|
|
878
|
-
|
|
839
|
+
fieldValidationErrors
|
|
879
840
|
),
|
|
880
841
|
helper: /* @__PURE__ */ jsx(Typography, { el: "div", variant: "body", color: "secondary", children: /* @__PURE__ */ jsx("span", { children: i18n.get("thisMeansYouHaveAParentCompany") }) }),
|
|
881
842
|
children: (childProps) => /* @__PURE__ */ jsx(
|
|
@@ -884,16 +845,16 @@ function BusinessFinancingOwnershipStructure({
|
|
|
884
845
|
...childProps,
|
|
885
846
|
name: "isCompanyOwnedByAnotherCompany",
|
|
886
847
|
items: businessFinancingRadioItems,
|
|
887
|
-
value: data
|
|
848
|
+
value: data?.isCompanyOwnedByAnotherCompany,
|
|
888
849
|
disabled: false,
|
|
889
|
-
onChange:
|
|
850
|
+
onChange: handleFieldChange("isCompanyOwnedByAnotherCompany"),
|
|
890
851
|
"aria-required": true,
|
|
891
|
-
"aria-invalid": !valid
|
|
852
|
+
"aria-invalid": !valid?.isCompanyOwnedByAnotherCompany
|
|
892
853
|
}
|
|
893
854
|
)
|
|
894
855
|
}
|
|
895
856
|
),
|
|
896
|
-
|
|
857
|
+
data?.isCompanyOwnedByAnotherCompany === "Yes" && /* @__PURE__ */ jsx(
|
|
897
858
|
Field,
|
|
898
859
|
{
|
|
899
860
|
el: "fieldset",
|
|
@@ -904,7 +865,7 @@ function BusinessFinancingOwnershipStructure({
|
|
|
904
865
|
errorMessage: formUtils.getErrorMessage(
|
|
905
866
|
"isParentOwnedByAnotherCompany",
|
|
906
867
|
errors,
|
|
907
|
-
|
|
868
|
+
fieldValidationErrors
|
|
908
869
|
),
|
|
909
870
|
children: (childProps) => /* @__PURE__ */ jsx(
|
|
910
871
|
RadioGroup,
|
|
@@ -914,9 +875,9 @@ function BusinessFinancingOwnershipStructure({
|
|
|
914
875
|
items: businessFinancingRadioItems,
|
|
915
876
|
value: data.isParentOwnedByAnotherCompany,
|
|
916
877
|
disabled: false,
|
|
917
|
-
onChange:
|
|
878
|
+
onChange: handleFieldChange("isParentOwnedByAnotherCompany"),
|
|
918
879
|
"aria-required": true,
|
|
919
|
-
"aria-invalid": !valid
|
|
880
|
+
"aria-invalid": !valid?.isParentOwnedByAnotherCompany
|
|
920
881
|
}
|
|
921
882
|
)
|
|
922
883
|
}
|
|
@@ -926,35 +887,15 @@ function BusinessFinancingOwnershipStructure({
|
|
|
926
887
|
function AdditionalFieldsForBusinessFinancingCompany(props) {
|
|
927
888
|
const { i18n } = useI18nContext();
|
|
928
889
|
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
|
-
});
|
|
890
|
+
form: { handleChangeFor, data }
|
|
891
|
+
} = useFormContext();
|
|
892
|
+
const { country, formVerificationErrors, legalEntity, fieldValidationErrors } = props;
|
|
946
893
|
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]);
|
|
894
|
+
const handleChange = (fieldName, mode) => handleChangeFor(fieldName, "company", mode);
|
|
895
|
+
const ownershipStructureProps = getFieldProps(props, ownershipStructureFields);
|
|
896
|
+
const businessInformationProps = getFieldProps(props, businessInformationFields);
|
|
897
|
+
const financialInformationProps = getFieldProps(props, financialInformationFields);
|
|
898
|
+
const legalInformationProps = getFieldProps(props, legalInformationFields);
|
|
958
899
|
return /* @__PURE__ */ jsxs("form", { className: "adyen-kyc__high-exposure-company", children: [
|
|
959
900
|
/* @__PURE__ */ jsx(Typography, { el: "h1", variant: "title-l", children: i18n.get("additionalInformationForBusinessFinancing") }),
|
|
960
901
|
/* @__PURE__ */ jsx(Typography, { el: "p", variant: "body", children: i18n.get("beforeSubmittingYourCapitalLoanApplication") }),
|
|
@@ -962,7 +903,7 @@ function AdditionalFieldsForBusinessFinancingCompany(props) {
|
|
|
962
903
|
ErrorPanel,
|
|
963
904
|
{
|
|
964
905
|
verificationErrors: formVerificationErrors,
|
|
965
|
-
validationErrors:
|
|
906
|
+
validationErrors: fieldValidationErrors,
|
|
966
907
|
formUtils,
|
|
967
908
|
id: "ariaErrorField"
|
|
968
909
|
}
|
|
@@ -970,71 +911,56 @@ function AdditionalFieldsForBusinessFinancingCompany(props) {
|
|
|
970
911
|
/* @__PURE__ */ jsx(
|
|
971
912
|
BusinessFinancingBusinessInformation,
|
|
972
913
|
{
|
|
973
|
-
...
|
|
974
|
-
|
|
975
|
-
errors,
|
|
976
|
-
data,
|
|
977
|
-
valid,
|
|
914
|
+
...businessInformationProps,
|
|
915
|
+
handleFieldChange: handleChange,
|
|
978
916
|
country,
|
|
979
|
-
formUtils,
|
|
980
|
-
fieldProblems,
|
|
981
917
|
targetPage: BusinessFinancingPagesEnums.COMPANY_PAGE,
|
|
982
|
-
sectionHeading: "yourBusinessInformation"
|
|
918
|
+
sectionHeading: "yourBusinessInformation",
|
|
919
|
+
data: formUtils.getFieldData(data?.company ?? {}, businessInformationFields)
|
|
983
920
|
}
|
|
984
921
|
),
|
|
985
922
|
/* @__PURE__ */ jsx(
|
|
986
923
|
BusinessFinancingOwnershipStructure,
|
|
987
924
|
{
|
|
988
|
-
...
|
|
989
|
-
handleChangeFor,
|
|
990
|
-
errors,
|
|
991
|
-
data,
|
|
992
|
-
valid,
|
|
925
|
+
...ownershipStructureProps,
|
|
993
926
|
legalEntity,
|
|
994
|
-
|
|
995
|
-
|
|
927
|
+
handleFieldChange: handleChange,
|
|
928
|
+
data: formUtils.getFieldData(data?.company ?? {}, ownershipStructureFields)
|
|
996
929
|
}
|
|
997
930
|
),
|
|
998
931
|
isEeaCountry(country) && /* @__PURE__ */ jsx(
|
|
999
932
|
BusinessFinancingFinancialInformation,
|
|
1000
933
|
{
|
|
1001
|
-
...
|
|
1002
|
-
|
|
1003
|
-
errors,
|
|
1004
|
-
data,
|
|
1005
|
-
valid,
|
|
934
|
+
...financialInformationProps,
|
|
935
|
+
handleFieldChange: handleChange,
|
|
1006
936
|
country,
|
|
1007
|
-
formUtils,
|
|
1008
|
-
fieldProblems,
|
|
1009
937
|
targetPage: BusinessFinancingPagesEnums.COMPANY_PAGE,
|
|
1010
|
-
|
|
938
|
+
data: formUtils.getFieldData(data?.company ?? {}, financialInformationFields)
|
|
1011
939
|
}
|
|
1012
940
|
),
|
|
1013
941
|
/* @__PURE__ */ jsx(
|
|
1014
942
|
BusinessFinancingLegalInformation,
|
|
1015
943
|
{
|
|
1016
|
-
...
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
formUtils,
|
|
1022
|
-
fieldProblems,
|
|
1023
|
-
targetPage: BusinessFinancingPagesEnums.COMPANY_PAGE
|
|
944
|
+
...legalInformationProps,
|
|
945
|
+
country,
|
|
946
|
+
handleFieldChange: handleChange,
|
|
947
|
+
targetPage: BusinessFinancingPagesEnums.COMPANY_PAGE,
|
|
948
|
+
sectionHeading: "legalInformation",
|
|
949
|
+
data: formUtils.getFieldData(data?.company ?? {}, legalInformationFields)
|
|
1024
950
|
}
|
|
1025
951
|
)
|
|
1026
952
|
] });
|
|
1027
953
|
}
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
errors,
|
|
1033
|
-
fieldProblems,
|
|
1034
|
-
handleChangeFor,
|
|
1035
|
-
sectionHeading
|
|
1036
|
-
}) {
|
|
954
|
+
const basicInformationFields = [
|
|
955
|
+
"legalName"
|
|
956
|
+
];
|
|
957
|
+
function BusinessFinancingBasicCompanyInformation(props) {
|
|
958
|
+
const { data, valid, errors, fieldValidationErrors, handleFieldChange, sectionHeading } = props;
|
|
1037
959
|
const { i18n } = useI18nContext();
|
|
960
|
+
const formUtils = createFormUtils(props, i18n);
|
|
961
|
+
if (!handleFieldChange) {
|
|
962
|
+
return;
|
|
963
|
+
}
|
|
1038
964
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1039
965
|
/* @__PURE__ */ jsx(Typography, { el: "h3", variant: "title", children: i18n.get(sectionHeading || "basicCompanyInformation") }),
|
|
1040
966
|
/* @__PURE__ */ jsx(
|
|
@@ -1042,22 +968,20 @@ function BusinessFinancingBasicCompanyInformation({
|
|
|
1042
968
|
{
|
|
1043
969
|
name: "legalName",
|
|
1044
970
|
label: formUtils.getLabel("legalName", "legalName"),
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
isValid: valid.legalName,
|
|
971
|
+
errorMessage: formUtils.getErrorMessage("legalName", errors, fieldValidationErrors),
|
|
972
|
+
isValid: valid?.legalName,
|
|
1048
973
|
helper: i18n.get("legalNameIsUsedToIdentifyABusinessWithTheGovernment"),
|
|
1049
974
|
children: (childProps) => /* @__PURE__ */ jsx(
|
|
1050
975
|
InputText,
|
|
1051
976
|
{
|
|
1052
977
|
...childProps,
|
|
1053
978
|
name: "legalName",
|
|
1054
|
-
value: data
|
|
979
|
+
value: data?.legalName,
|
|
1055
980
|
readonly: false,
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
onBlur: handleChangeFor("legalName", "blur"),
|
|
981
|
+
onInput: handleFieldChange("legalName", "input"),
|
|
982
|
+
onBlur: handleFieldChange("legalName", "blur"),
|
|
1059
983
|
"aria-required": true,
|
|
1060
|
-
"aria-invalid": !valid
|
|
984
|
+
"aria-invalid": !valid?.legalName
|
|
1061
985
|
}
|
|
1062
986
|
)
|
|
1063
987
|
}
|
|
@@ -1065,24 +989,26 @@ function BusinessFinancingBasicCompanyInformation({
|
|
|
1065
989
|
] });
|
|
1066
990
|
}
|
|
1067
991
|
const OPTIONAL_ADDRESS_FIELDS = ["otherAddressInformation"];
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
992
|
+
const registeredAddressFields = [
|
|
993
|
+
"isThisAddressTheMainHeadquarters",
|
|
994
|
+
"registrationAddress"
|
|
995
|
+
];
|
|
996
|
+
function BusinessFinancingRegisteredAddress(props) {
|
|
997
|
+
const {
|
|
998
|
+
data,
|
|
999
|
+
valid,
|
|
1000
|
+
errors,
|
|
1001
|
+
fieldValidationErrors,
|
|
1002
|
+
shouldValidate,
|
|
1003
|
+
defaultData,
|
|
1004
|
+
handleFieldChange,
|
|
1005
|
+
formId,
|
|
1006
|
+
legalEntity,
|
|
1007
|
+
sectionHeading
|
|
1008
|
+
} = props;
|
|
1082
1009
|
const { i18n } = useI18nContext();
|
|
1083
|
-
const
|
|
1084
|
-
const
|
|
1085
|
-
const addressCountry = (_a = data == null ? void 0 : data.registrationAddress) == null ? void 0 : _a.country;
|
|
1010
|
+
const formUtils = createFormUtils(props, i18n);
|
|
1011
|
+
const addressCountry = data?.registrationAddress?.country;
|
|
1086
1012
|
const addressSchema = useMemo(() => {
|
|
1087
1013
|
return getAddressSchemaForCountry(addressCountry).filter((field) => {
|
|
1088
1014
|
if (addressCountry) {
|
|
@@ -1091,27 +1017,15 @@ function BusinessFinancingRegisteredAddress({
|
|
|
1091
1017
|
return true;
|
|
1092
1018
|
});
|
|
1093
1019
|
}, [addressCountry]);
|
|
1020
|
+
if (!handleFieldChange) {
|
|
1021
|
+
return;
|
|
1022
|
+
}
|
|
1094
1023
|
const handleRegistrationAddressChange = (state) => {
|
|
1095
1024
|
if (!state.data.country) {
|
|
1096
1025
|
state.data.country = addressCountry;
|
|
1097
1026
|
}
|
|
1098
|
-
|
|
1099
|
-
if (setValid) {
|
|
1100
|
-
setValid("registrationAddress", Boolean(state.isValid));
|
|
1101
|
-
}
|
|
1027
|
+
handleFieldChange("registrationAddress")(state.data);
|
|
1102
1028
|
};
|
|
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
1029
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1116
1030
|
/* @__PURE__ */ jsx(Typography, { el: "h3", variant: "title", children: i18n.get(sectionHeading || "registeredAddress") }),
|
|
1117
1031
|
/* @__PURE__ */ jsx(Typography, { el: "h3", variant: "caption", children: i18n.get("addressRegisteredWithSecretaryOfState") }),
|
|
@@ -1122,12 +1036,12 @@ function BusinessFinancingRegisteredAddress({
|
|
|
1122
1036
|
name: "isThisAddressTheMainHeadquarters",
|
|
1123
1037
|
classNameModifiers: ["highExposureBusinessInformation"],
|
|
1124
1038
|
label: i18n.get("isThisAddressTheMainHeadquarters", {
|
|
1125
|
-
values: { company:
|
|
1039
|
+
values: { company: legalEntity?.organization ? legalEntity.organization.legalName : "" }
|
|
1126
1040
|
}),
|
|
1127
1041
|
errorMessage: formUtils.getErrorMessage(
|
|
1128
1042
|
"isThisAddressTheMainHeadquarters",
|
|
1129
1043
|
errors,
|
|
1130
|
-
|
|
1044
|
+
fieldValidationErrors
|
|
1131
1045
|
),
|
|
1132
1046
|
children: (childProps) => /* @__PURE__ */ jsx(
|
|
1133
1047
|
RadioGroup,
|
|
@@ -1135,11 +1049,11 @@ function BusinessFinancingRegisteredAddress({
|
|
|
1135
1049
|
...childProps,
|
|
1136
1050
|
name: "isThisAddressTheMainHeadquarters",
|
|
1137
1051
|
items: businessFinancingRadioItems,
|
|
1138
|
-
value: data
|
|
1052
|
+
value: data?.isThisAddressTheMainHeadquarters,
|
|
1139
1053
|
disabled: false,
|
|
1140
|
-
onChange:
|
|
1054
|
+
onChange: handleFieldChange("isThisAddressTheMainHeadquarters"),
|
|
1141
1055
|
"aria-required": true,
|
|
1142
|
-
"aria-invalid": !valid
|
|
1056
|
+
"aria-invalid": !valid?.isThisAddressTheMainHeadquarters
|
|
1143
1057
|
}
|
|
1144
1058
|
)
|
|
1145
1059
|
}
|
|
@@ -1149,7 +1063,7 @@ function BusinessFinancingRegisteredAddress({
|
|
|
1149
1063
|
{
|
|
1150
1064
|
id: formId,
|
|
1151
1065
|
addressType: "registrationAddress",
|
|
1152
|
-
data: { ...defaultData
|
|
1066
|
+
data: { ...defaultData?.registrationAddress, country: addressCountry },
|
|
1153
1067
|
labels: addressCountry ? getAddressSchemaLabelsByCountry(addressCountry) : void 0,
|
|
1154
1068
|
countryCode: addressCountry,
|
|
1155
1069
|
requiredFields: addressSchema,
|
|
@@ -1162,40 +1076,18 @@ function BusinessFinancingRegisteredAddress({
|
|
|
1162
1076
|
}
|
|
1163
1077
|
const parentCompanyFormId$1 = businessFinancingForms.parentCompany.formId;
|
|
1164
1078
|
function AdditionalFieldsForBusinessFinancingParentCompany(props) {
|
|
1165
|
-
var _a;
|
|
1166
|
-
const {
|
|
1167
|
-
shouldValidate,
|
|
1168
|
-
data: businessFinancingParentCompanyDetailsData,
|
|
1169
|
-
country,
|
|
1170
|
-
formVerificationErrors
|
|
1171
|
-
} = props;
|
|
1172
1079
|
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
|
-
});
|
|
1080
|
+
const {
|
|
1081
|
+
form: { handleChangeFor, data }
|
|
1082
|
+
} = useFormContext();
|
|
1083
|
+
const { country, formVerificationErrors, fieldValidationErrors } = props;
|
|
1185
1084
|
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]);
|
|
1085
|
+
const handleChange = (fieldName, mode) => handleChangeFor(fieldName, "parentCompany", mode);
|
|
1086
|
+
const basicCompanyInformationProps = getFieldProps(props, basicInformationFields);
|
|
1087
|
+
const registeredAddressProps = getFieldProps(props, registeredAddressFields);
|
|
1088
|
+
const businessInformationProps = getFieldProps(props, businessInformationFields);
|
|
1089
|
+
const financialInformationProps = getFieldProps(props, financialInformationFields);
|
|
1090
|
+
const legalInformationProps = getFieldProps(props, legalInformationFields);
|
|
1199
1091
|
return /* @__PURE__ */ jsxs("form", { className: "adyen-kyc__high-exposure-parent-company", children: [
|
|
1200
1092
|
/* @__PURE__ */ jsx(Typography, { el: "h1", variant: "title-l", children: i18n.get("parentCompanyInformation") }),
|
|
1201
1093
|
/* @__PURE__ */ jsx(Typography, { el: "p", variant: "body", children: i18n.get("inThePreviousStepOwnedByAParentCompany") }),
|
|
@@ -1203,7 +1095,7 @@ function AdditionalFieldsForBusinessFinancingParentCompany(props) {
|
|
|
1203
1095
|
ErrorPanel,
|
|
1204
1096
|
{
|
|
1205
1097
|
verificationErrors: formVerificationErrors,
|
|
1206
|
-
validationErrors:
|
|
1098
|
+
validationErrors: fieldValidationErrors,
|
|
1207
1099
|
formUtils,
|
|
1208
1100
|
id: "ariaErrorField"
|
|
1209
1101
|
}
|
|
@@ -1211,116 +1103,71 @@ function AdditionalFieldsForBusinessFinancingParentCompany(props) {
|
|
|
1211
1103
|
/* @__PURE__ */ jsx(
|
|
1212
1104
|
BusinessFinancingBasicCompanyInformation,
|
|
1213
1105
|
{
|
|
1214
|
-
...
|
|
1215
|
-
handleChangeFor: businessFinancingHandleChangeFor,
|
|
1106
|
+
...basicCompanyInformationProps,
|
|
1216
1107
|
sectionHeading: "basicCompanyInformation",
|
|
1217
|
-
|
|
1218
|
-
data,
|
|
1219
|
-
valid,
|
|
1220
|
-
formUtils,
|
|
1221
|
-
fieldProblems
|
|
1108
|
+
handleFieldChange: handleChange,
|
|
1109
|
+
data: formUtils.getFieldData(data?.parentCompany ?? {}, basicInformationFields)
|
|
1222
1110
|
}
|
|
1223
1111
|
),
|
|
1224
1112
|
/* @__PURE__ */ jsx(
|
|
1225
1113
|
BusinessFinancingRegisteredAddress,
|
|
1226
1114
|
{
|
|
1227
|
-
...
|
|
1115
|
+
...registeredAddressProps,
|
|
1228
1116
|
formId: parentCompanyFormId$1,
|
|
1229
|
-
handleChangeFor: businessFinancingHandleChangeFor,
|
|
1230
1117
|
sectionHeading: "registeredAddress",
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
setValid,
|
|
1235
|
-
formUtils,
|
|
1236
|
-
fieldProblems,
|
|
1237
|
-
targetPage: BusinessFinancingPagesEnums.PARENT_COMPANY_PAGE,
|
|
1238
|
-
shouldValidate
|
|
1118
|
+
defaultData: data?.parentCompany,
|
|
1119
|
+
handleFieldChange: handleChange,
|
|
1120
|
+
data: formUtils.getFieldData(data?.parentCompany ?? {}, registeredAddressFields)
|
|
1239
1121
|
}
|
|
1240
1122
|
),
|
|
1241
1123
|
/* @__PURE__ */ jsx(
|
|
1242
1124
|
BusinessFinancingBusinessInformation,
|
|
1243
1125
|
{
|
|
1244
|
-
...
|
|
1245
|
-
handleChangeFor: businessFinancingHandleChangeFor,
|
|
1126
|
+
...businessInformationProps,
|
|
1246
1127
|
sectionHeading: "additionalCompanyInformation",
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
formUtils,
|
|
1252
|
-
fieldProblems,
|
|
1253
|
-
targetPage: BusinessFinancingPagesEnums.PARENT_COMPANY_PAGE
|
|
1128
|
+
country: data?.parentCompany?.registrationAddress?.country ?? country,
|
|
1129
|
+
targetPage: BusinessFinancingPagesEnums.PARENT_COMPANY_PAGE,
|
|
1130
|
+
handleFieldChange: handleChange,
|
|
1131
|
+
data: formUtils.getFieldData(data?.parentCompany ?? {}, businessInformationFields)
|
|
1254
1132
|
}
|
|
1255
1133
|
),
|
|
1256
|
-
isEeaCountry(
|
|
1134
|
+
isEeaCountry(data?.parentCompany?.registrationAddress?.country) && /* @__PURE__ */ jsx(
|
|
1257
1135
|
BusinessFinancingFinancialInformation,
|
|
1258
1136
|
{
|
|
1259
|
-
...
|
|
1260
|
-
|
|
1261
|
-
errors,
|
|
1262
|
-
data,
|
|
1263
|
-
valid,
|
|
1264
|
-
country,
|
|
1265
|
-
formUtils,
|
|
1266
|
-
fieldProblems,
|
|
1137
|
+
...financialInformationProps,
|
|
1138
|
+
country: data?.parentCompany?.registrationAddress?.country ?? country,
|
|
1267
1139
|
targetPage: BusinessFinancingPagesEnums.PARENT_COMPANY_PAGE,
|
|
1268
|
-
|
|
1140
|
+
handleFieldChange: handleChange,
|
|
1141
|
+
data: formUtils.getFieldData(data?.parentCompany ?? {}, financialInformationFields)
|
|
1269
1142
|
}
|
|
1270
1143
|
),
|
|
1271
1144
|
/* @__PURE__ */ jsx(
|
|
1272
1145
|
BusinessFinancingLegalInformation,
|
|
1273
1146
|
{
|
|
1274
|
-
...
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
formUtils,
|
|
1280
|
-
fieldProblems,
|
|
1281
|
-
targetPage: BusinessFinancingPagesEnums.PARENT_COMPANY_PAGE
|
|
1147
|
+
...legalInformationProps,
|
|
1148
|
+
country: data?.parentCompany?.registrationAddress?.country ?? country,
|
|
1149
|
+
targetPage: BusinessFinancingPagesEnums.PARENT_COMPANY_PAGE,
|
|
1150
|
+
sectionHeading: "legalInformation",
|
|
1151
|
+
handleFieldChange: handleChange,
|
|
1152
|
+
data: formUtils.getFieldData(data?.parentCompany ?? {}, legalInformationFields)
|
|
1282
1153
|
}
|
|
1283
1154
|
)
|
|
1284
1155
|
] });
|
|
1285
1156
|
}
|
|
1286
1157
|
const ultimateParentCompanyFormId$1 = businessFinancingForms.ultimateParentCompany.formId;
|
|
1287
1158
|
function AdditionalFieldsForBusinessFinancingUltimateParentCompany(props) {
|
|
1288
|
-
|
|
1289
|
-
const {
|
|
1290
|
-
data: additionalFieldsForBusinessFinancingUltimateParentCompanyData,
|
|
1291
|
-
validators,
|
|
1292
|
-
formVerificationErrors,
|
|
1293
|
-
country
|
|
1294
|
-
} = props;
|
|
1159
|
+
const { formVerificationErrors, country, fieldValidationErrors } = props;
|
|
1295
1160
|
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]);
|
|
1161
|
+
const formUtils = createFormUtils(props, i18n);
|
|
1162
|
+
const {
|
|
1163
|
+
form: { handleChangeFor, data }
|
|
1164
|
+
} = useFormContext();
|
|
1165
|
+
const handleChange = (fieldName, mode) => handleChangeFor(fieldName, "ultimateParentCompany", mode);
|
|
1166
|
+
const basicCompanyInformationProps = getFieldProps(props, basicInformationFields);
|
|
1167
|
+
const registeredAddressProps = getFieldProps(props, registeredAddressFields);
|
|
1168
|
+
const businessInformationProps = getFieldProps(props, businessInformationFields);
|
|
1169
|
+
const financialInformationProps = getFieldProps(props, financialInformationFields);
|
|
1170
|
+
const legalInformationProps = getFieldProps(props, legalInformationFields);
|
|
1324
1171
|
return /* @__PURE__ */ jsxs("form", { className: "adyen-kyc__high-exposure-ultimate-parent-company", children: [
|
|
1325
1172
|
/* @__PURE__ */ jsx(Typography, { el: "h1", variant: "title-l", children: i18n.get("ultimateParentCompanyInformation") }),
|
|
1326
1173
|
/* @__PURE__ */ jsx(Typography, { el: "p", variant: "body", children: i18n.get("inThePreviousStepOwnedByAnUltimateParentCompany") }),
|
|
@@ -1328,7 +1175,7 @@ function AdditionalFieldsForBusinessFinancingUltimateParentCompany(props) {
|
|
|
1328
1175
|
ErrorPanel,
|
|
1329
1176
|
{
|
|
1330
1177
|
verificationErrors: formVerificationErrors,
|
|
1331
|
-
validationErrors:
|
|
1178
|
+
validationErrors: fieldValidationErrors,
|
|
1332
1179
|
formUtils,
|
|
1333
1180
|
id: "ariaErrorField"
|
|
1334
1181
|
}
|
|
@@ -1336,76 +1183,69 @@ function AdditionalFieldsForBusinessFinancingUltimateParentCompany(props) {
|
|
|
1336
1183
|
/* @__PURE__ */ jsx(
|
|
1337
1184
|
BusinessFinancingBasicCompanyInformation,
|
|
1338
1185
|
{
|
|
1339
|
-
...
|
|
1340
|
-
handleChangeFor: businessFinancingHandleChangeFor,
|
|
1186
|
+
...basicCompanyInformationProps,
|
|
1341
1187
|
sectionHeading: "businessInformation",
|
|
1342
|
-
|
|
1343
|
-
data,
|
|
1344
|
-
valid,
|
|
1345
|
-
formUtils,
|
|
1346
|
-
fieldProblems
|
|
1188
|
+
handleFieldChange: handleChange,
|
|
1189
|
+
data: formUtils.getFieldData(data?.ultimateParentCompany ?? {}, basicInformationFields)
|
|
1347
1190
|
}
|
|
1348
1191
|
),
|
|
1349
1192
|
/* @__PURE__ */ jsx(
|
|
1350
1193
|
BusinessFinancingRegisteredAddress,
|
|
1351
1194
|
{
|
|
1352
|
-
...
|
|
1195
|
+
...registeredAddressProps,
|
|
1353
1196
|
formId: ultimateParentCompanyFormId$1,
|
|
1354
|
-
handleChangeFor: businessFinancingHandleChangeFor,
|
|
1355
1197
|
sectionHeading: "registeredAddress",
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
formUtils,
|
|
1360
|
-
fieldProblems,
|
|
1361
|
-
targetPage: BusinessFinancingPagesEnums.ULTIMATE_PARENT_COMPANY_PAGE
|
|
1198
|
+
defaultData: data?.ultimateParentCompany,
|
|
1199
|
+
handleFieldChange: handleChange,
|
|
1200
|
+
data: formUtils.getFieldData(data?.ultimateParentCompany ?? {}, registeredAddressFields)
|
|
1362
1201
|
}
|
|
1363
1202
|
),
|
|
1364
1203
|
/* @__PURE__ */ jsx(
|
|
1365
1204
|
BusinessFinancingBusinessInformation,
|
|
1366
1205
|
{
|
|
1367
|
-
...
|
|
1368
|
-
handleChangeFor: businessFinancingHandleChangeFor,
|
|
1206
|
+
...businessInformationProps,
|
|
1369
1207
|
sectionHeading: "additionalCompanyInformation",
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
formUtils,
|
|
1375
|
-
fieldProblems,
|
|
1376
|
-
targetPage: BusinessFinancingPagesEnums.ULTIMATE_PARENT_COMPANY_PAGE
|
|
1208
|
+
country: data?.ultimateParentCompany?.registrationAddress?.country ?? country,
|
|
1209
|
+
targetPage: BusinessFinancingPagesEnums.ULTIMATE_PARENT_COMPANY_PAGE,
|
|
1210
|
+
handleFieldChange: handleChange,
|
|
1211
|
+
data: formUtils.getFieldData(data?.ultimateParentCompany ?? {}, businessInformationFields)
|
|
1377
1212
|
}
|
|
1378
1213
|
),
|
|
1379
|
-
isEeaCountry(
|
|
1214
|
+
isEeaCountry(data?.ultimateParentCompany?.registrationAddress?.country) && /* @__PURE__ */ jsx(
|
|
1380
1215
|
BusinessFinancingFinancialInformation,
|
|
1381
1216
|
{
|
|
1382
|
-
...
|
|
1383
|
-
|
|
1384
|
-
errors,
|
|
1385
|
-
data,
|
|
1386
|
-
valid,
|
|
1387
|
-
country,
|
|
1388
|
-
formUtils,
|
|
1389
|
-
fieldProblems,
|
|
1217
|
+
...financialInformationProps,
|
|
1218
|
+
country: data?.ultimateParentCompany?.registrationAddress?.country ?? country,
|
|
1390
1219
|
targetPage: BusinessFinancingPagesEnums.ULTIMATE_PARENT_COMPANY_PAGE,
|
|
1391
|
-
|
|
1220
|
+
handleFieldChange: handleChange,
|
|
1221
|
+
data: formUtils.getFieldData(
|
|
1222
|
+
data?.ultimateParentCompany ?? {},
|
|
1223
|
+
financialInformationFields
|
|
1224
|
+
)
|
|
1392
1225
|
}
|
|
1393
1226
|
),
|
|
1394
1227
|
/* @__PURE__ */ jsx(
|
|
1395
1228
|
BusinessFinancingLegalInformation,
|
|
1396
1229
|
{
|
|
1397
|
-
...
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
formUtils,
|
|
1403
|
-
fieldProblems,
|
|
1404
|
-
targetPage: BusinessFinancingPagesEnums.ULTIMATE_PARENT_COMPANY_PAGE
|
|
1230
|
+
...legalInformationProps,
|
|
1231
|
+
country: data?.ultimateParentCompany?.registrationAddress?.country ?? country,
|
|
1232
|
+
sectionHeading: "legalInformation",
|
|
1233
|
+
targetPage: BusinessFinancingPagesEnums.ULTIMATE_PARENT_COMPANY_PAGE,
|
|
1234
|
+
handleFieldChange: handleChange,
|
|
1235
|
+
data: formUtils.getFieldData(data?.ultimateParentCompany ?? {}, legalInformationFields)
|
|
1405
1236
|
}
|
|
1406
1237
|
)
|
|
1407
1238
|
] });
|
|
1408
1239
|
}
|
|
1240
|
+
const getOrgAnalyticsData = (prefix, details) => {
|
|
1241
|
+
const org = details?.organization;
|
|
1242
|
+
if (!org) return {};
|
|
1243
|
+
return {
|
|
1244
|
+
[`${prefix}--economicSector`]: org?.economicSector ?? "",
|
|
1245
|
+
[`${prefix}--legalForm`]: org?.legalForm ?? "",
|
|
1246
|
+
[`${prefix}--statusOfLegalProceeding`]: org?.statusOfLegalProceeding ?? ""
|
|
1247
|
+
};
|
|
1248
|
+
};
|
|
1409
1249
|
const businessFinancingFormsRequiredFields = {
|
|
1410
1250
|
company: businessFinancingForms.company.fields,
|
|
1411
1251
|
parentCompany: businessFinancingForms.parentCompany.fields,
|
|
@@ -1414,10 +1254,7 @@ const businessFinancingFormsRequiredFields = {
|
|
|
1414
1254
|
const parentCompanyFormId = businessFinancingForms.parentCompany.formId;
|
|
1415
1255
|
const companyFormId = businessFinancingForms.company.formId;
|
|
1416
1256
|
const ultimateParentCompanyFormId = businessFinancingForms.ultimateParentCompany.formId;
|
|
1417
|
-
const parseBusinessFinancingScenarios = (scenarios) => composePerScenarioFormConfigurations(scenarios, fieldsPerScenario);
|
|
1418
|
-
const parseConfiguration = ({ scenarios }) => parseBusinessFinancingScenarios(scenarios);
|
|
1419
1257
|
function BusinessFinancingDropin(props) {
|
|
1420
|
-
var _a, _b;
|
|
1421
1258
|
const {
|
|
1422
1259
|
country,
|
|
1423
1260
|
rootLegalEntity,
|
|
@@ -1428,7 +1265,6 @@ function BusinessFinancingDropin(props) {
|
|
|
1428
1265
|
} = props;
|
|
1429
1266
|
const userEvents = useAnalyticsContext();
|
|
1430
1267
|
const [defaultData, setDefaultData] = useState();
|
|
1431
|
-
const [data, setData] = useState({});
|
|
1432
1268
|
useRef(null);
|
|
1433
1269
|
const invalidateRootLegalEntity = useInvalidateRootLegalEntity();
|
|
1434
1270
|
const { mutateAsync: createLegalEntity } = useCreateLegalEntity();
|
|
@@ -1437,34 +1273,37 @@ function BusinessFinancingDropin(props) {
|
|
|
1437
1273
|
const { data: ultimateParentCompany, isLoading: ultimateParentCompanyIsLoading } = useAssociatedLegalEntity(rootLegalEntity, "ultimateParentCompany");
|
|
1438
1274
|
const derivedData = useMemo(() => {
|
|
1439
1275
|
if (immediateParentCompanyIsLoading || ultimateParentCompanyIsLoading) return void 0;
|
|
1440
|
-
const
|
|
1441
|
-
|
|
1276
|
+
const dataFromResponse = {};
|
|
1277
|
+
dataFromResponse.company = mapLegalEntityToBusinessFinancing(
|
|
1442
1278
|
rootLegalEntity
|
|
1443
1279
|
);
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1280
|
+
dataFromResponse.company = appendBusinessFinancingData(
|
|
1281
|
+
rootLegalEntity.organization,
|
|
1282
|
+
dataFromResponse.company
|
|
1283
|
+
);
|
|
1284
|
+
dataFromResponse.company.isCompanyOwnedByAnotherCompany = "No";
|
|
1285
|
+
dataFromResponse.company.isParentOwnedByAnotherCompany = "No";
|
|
1447
1286
|
if (immediateParentCompany) {
|
|
1448
|
-
|
|
1287
|
+
dataFromResponse.parentCompany = mapLegalEntityToBusinessFinancing(
|
|
1449
1288
|
immediateParentCompany
|
|
1450
1289
|
);
|
|
1451
|
-
|
|
1290
|
+
dataFromResponse.parentCompany = appendBusinessFinancingData(
|
|
1452
1291
|
immediateParentCompany.organization,
|
|
1453
|
-
|
|
1292
|
+
dataFromResponse.parentCompany
|
|
1454
1293
|
);
|
|
1455
|
-
|
|
1294
|
+
dataFromResponse.company.isCompanyOwnedByAnotherCompany = "Yes";
|
|
1456
1295
|
}
|
|
1457
1296
|
if (ultimateParentCompany) {
|
|
1458
|
-
|
|
1297
|
+
dataFromResponse.ultimateParentCompany = mapLegalEntityToBusinessFinancing(
|
|
1459
1298
|
ultimateParentCompany
|
|
1460
1299
|
);
|
|
1461
|
-
|
|
1300
|
+
dataFromResponse.ultimateParentCompany = appendBusinessFinancingData(
|
|
1462
1301
|
ultimateParentCompany.organization,
|
|
1463
|
-
|
|
1302
|
+
dataFromResponse.ultimateParentCompany
|
|
1464
1303
|
);
|
|
1465
|
-
|
|
1304
|
+
dataFromResponse.company.isParentOwnedByAnotherCompany = "Yes";
|
|
1466
1305
|
}
|
|
1467
|
-
return
|
|
1306
|
+
return dataFromResponse;
|
|
1468
1307
|
}, [
|
|
1469
1308
|
immediateParentCompanyIsLoading,
|
|
1470
1309
|
ultimateParentCompanyIsLoading,
|
|
@@ -1479,10 +1318,9 @@ function BusinessFinancingDropin(props) {
|
|
|
1479
1318
|
}, [userEvents]);
|
|
1480
1319
|
useEffect(() => {
|
|
1481
1320
|
if (derivedData) {
|
|
1482
|
-
|
|
1483
|
-
if (!defaultData) setDefaultData({ ...derivedData });
|
|
1321
|
+
setDefaultData({ ...derivedData });
|
|
1484
1322
|
}
|
|
1485
|
-
}, [derivedData
|
|
1323
|
+
}, [derivedData]);
|
|
1486
1324
|
const { i18n } = useI18nContext();
|
|
1487
1325
|
const datasetUtils = datasetUtilities(i18n.locale);
|
|
1488
1326
|
const [problems, setProblems] = useState();
|
|
@@ -1490,85 +1328,26 @@ function BusinessFinancingDropin(props) {
|
|
|
1490
1328
|
const [showEndState, setShowEndState] = useState(false);
|
|
1491
1329
|
const [businessFinancingRequiredForms, setBusinessFinancingRequiredForms] = useState(businessFinancingForms);
|
|
1492
1330
|
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
1331
|
const { isSettingEnabled } = useSettingsContext();
|
|
1556
1332
|
const showBusinessFinancingFirst = isSettingEnabled(SettingNames.ShowBusinessFinancingFirst);
|
|
1557
1333
|
const onSubmit = async () => {
|
|
1558
1334
|
setLoadingStatus("loading");
|
|
1335
|
+
if (!umfData) {
|
|
1336
|
+
return;
|
|
1337
|
+
}
|
|
1559
1338
|
const companyBusinessFinancingDetails = prepareBusinessFinancingSubmitData(
|
|
1560
1339
|
BusinessFinancingIndex.COMPANY,
|
|
1561
|
-
|
|
1340
|
+
umfData,
|
|
1562
1341
|
rootLegalEntity
|
|
1563
1342
|
);
|
|
1564
1343
|
const parentCompanyBusinessFinancingDetails = prepareBusinessFinancingSubmitData(
|
|
1565
1344
|
BusinessFinancingIndex.PARENT_COMPANY,
|
|
1566
|
-
|
|
1345
|
+
umfData,
|
|
1567
1346
|
rootLegalEntity
|
|
1568
1347
|
);
|
|
1569
1348
|
const ultimateParentCompanyBusinessFinancingDetails = prepareBusinessFinancingSubmitData(
|
|
1570
1349
|
BusinessFinancingIndex.ULTIMATE_PARENT_COMPANY,
|
|
1571
|
-
|
|
1350
|
+
umfData,
|
|
1572
1351
|
rootLegalEntity
|
|
1573
1352
|
);
|
|
1574
1353
|
if (!companyBusinessFinancingDetails || !rootLegalEntity) {
|
|
@@ -1585,7 +1364,7 @@ function BusinessFinancingDropin(props) {
|
|
|
1585
1364
|
parentCompanyBusinessFinancingDetails,
|
|
1586
1365
|
createLegalEntity,
|
|
1587
1366
|
updateLegalEntity,
|
|
1588
|
-
parentCompanyBusinessFinancingDetails
|
|
1367
|
+
parentCompanyBusinessFinancingDetails?.id
|
|
1589
1368
|
);
|
|
1590
1369
|
promises.push(parentCompanyPromise);
|
|
1591
1370
|
}
|
|
@@ -1595,7 +1374,7 @@ function BusinessFinancingDropin(props) {
|
|
|
1595
1374
|
ultimateParentCompanyBusinessFinancingDetails,
|
|
1596
1375
|
createLegalEntity,
|
|
1597
1376
|
updateLegalEntity,
|
|
1598
|
-
ultimateParentCompanyBusinessFinancingDetails
|
|
1377
|
+
ultimateParentCompanyBusinessFinancingDetails?.id
|
|
1599
1378
|
);
|
|
1600
1379
|
promises.push(ultimateParentCompanyPromise);
|
|
1601
1380
|
}
|
|
@@ -1639,23 +1418,32 @@ function BusinessFinancingDropin(props) {
|
|
|
1639
1418
|
companyBusinessFinancingDetails.entityAssociations = [
|
|
1640
1419
|
...businessFinancingEntityAssociations
|
|
1641
1420
|
];
|
|
1421
|
+
const eventsAdditionalData = {
|
|
1422
|
+
...getOrgAnalyticsData("Business", companyBusinessFinancingDetails),
|
|
1423
|
+
...getOrgAnalyticsData("ParentCompany", parentCompanyBusinessFinancingDetails),
|
|
1424
|
+
...getOrgAnalyticsData(
|
|
1425
|
+
"UltimateParentCompany",
|
|
1426
|
+
ultimateParentCompanyBusinessFinancingDetails
|
|
1427
|
+
)
|
|
1428
|
+
};
|
|
1642
1429
|
try {
|
|
1643
1430
|
await handleBusinessFinancingFormSubmission(
|
|
1644
1431
|
BusinessFinancingIndex.COMPANY,
|
|
1645
1432
|
companyBusinessFinancingDetails,
|
|
1646
1433
|
createLegalEntity,
|
|
1647
1434
|
updateLegalEntity,
|
|
1648
|
-
companyBusinessFinancingDetails
|
|
1435
|
+
companyBusinessFinancingDetails?.id
|
|
1649
1436
|
);
|
|
1650
1437
|
userEvents.addTaskEvent("Success", {
|
|
1651
1438
|
actionType: "submit",
|
|
1652
|
-
returnValue: entitiesToTrack
|
|
1439
|
+
returnValue: entitiesToTrack,
|
|
1440
|
+
additionalData: eventsAdditionalData
|
|
1653
1441
|
});
|
|
1654
1442
|
await invalidateRootLegalEntity();
|
|
1655
1443
|
if (showBusinessFinancingFirst || isStandaloneComponent) {
|
|
1656
1444
|
setShowEndState(true);
|
|
1657
1445
|
} else {
|
|
1658
|
-
externalOnSubmit
|
|
1446
|
+
externalOnSubmit?.({ ...umfData });
|
|
1659
1447
|
}
|
|
1660
1448
|
} catch (e) {
|
|
1661
1449
|
showToast({ label: i18n.get("failedToUpdateDetails"), variant: "error" });
|
|
@@ -1682,8 +1470,8 @@ function BusinessFinancingDropin(props) {
|
|
|
1682
1470
|
setProblems((prevProblems) => ({
|
|
1683
1471
|
...prevProblems,
|
|
1684
1472
|
validationErrors: {
|
|
1685
|
-
...prevProblems
|
|
1686
|
-
[businessFinancingType]:
|
|
1473
|
+
...prevProblems?.validationErrors,
|
|
1474
|
+
[businessFinancingType]: validationErrors?.[businessFinancingType] ?? {}
|
|
1687
1475
|
}
|
|
1688
1476
|
}));
|
|
1689
1477
|
} else if (isMaintenanceModeError(error)) {
|
|
@@ -1700,29 +1488,67 @@ function BusinessFinancingDropin(props) {
|
|
|
1700
1488
|
associatedLegalEntity: rootLegalEntity
|
|
1701
1489
|
});
|
|
1702
1490
|
const omittedSummaryKeys = ["naceCodeLabel", "legalFormLabel", "currency"];
|
|
1491
|
+
const [requiredFields, setRequiredFields] = useState(void 0);
|
|
1492
|
+
const form = useMultiForm({
|
|
1493
|
+
requiredFields,
|
|
1494
|
+
defaultData: derivedData,
|
|
1495
|
+
rules: businessFinancingMultiformRules
|
|
1496
|
+
});
|
|
1497
|
+
const { data: umfData = derivedData, isValid, errors, valid } = form;
|
|
1498
|
+
useEffect(() => {
|
|
1499
|
+
const showParentCompany = umfData?.company?.isCompanyOwnedByAnotherCompany === "Yes";
|
|
1500
|
+
const showUltimateParentCompany = umfData?.company?.isParentOwnedByAnotherCompany === "Yes";
|
|
1501
|
+
let updateForms = {
|
|
1502
|
+
company: { ...businessFinancingForms.company }
|
|
1503
|
+
};
|
|
1504
|
+
if (showParentCompany) {
|
|
1505
|
+
updateForms = { ...updateForms, parentCompany: businessFinancingForms.parentCompany };
|
|
1506
|
+
}
|
|
1507
|
+
if (showParentCompany && showUltimateParentCompany) {
|
|
1508
|
+
updateForms = {
|
|
1509
|
+
...updateForms,
|
|
1510
|
+
ultimateParentCompany: businessFinancingForms.ultimateParentCompany
|
|
1511
|
+
};
|
|
1512
|
+
}
|
|
1513
|
+
setBusinessFinancingRequiredForms(updateForms);
|
|
1514
|
+
}, [
|
|
1515
|
+
umfData?.company?.isCompanyOwnedByAnotherCompany,
|
|
1516
|
+
umfData?.company?.isParentOwnedByAnotherCompany
|
|
1517
|
+
]);
|
|
1518
|
+
useEffect(() => {
|
|
1519
|
+
const reqs = getBusinessFinancingRequiredFields(country, umfData);
|
|
1520
|
+
setRequiredFields(reqs);
|
|
1521
|
+
}, [umfData]);
|
|
1522
|
+
const forms = useMemo(() => {
|
|
1523
|
+
const requiredForms = getRequiredForms(
|
|
1524
|
+
businessFinancingRequiredForms,
|
|
1525
|
+
businessFinancingFormsRequiredFields,
|
|
1526
|
+
{}
|
|
1527
|
+
);
|
|
1528
|
+
return addValidityToForms(requiredForms, isValid, problems);
|
|
1529
|
+
}, [businessFinancingRequiredForms, isValid, businessFinancingFormsRequiredFields, problems]);
|
|
1703
1530
|
const {
|
|
1704
1531
|
handleNextClick,
|
|
1705
1532
|
handleBackClick,
|
|
1706
1533
|
activeForm,
|
|
1707
|
-
setShouldValidate,
|
|
1708
1534
|
gotoFormByFormIndex,
|
|
1709
|
-
|
|
1710
|
-
|
|
1535
|
+
steps,
|
|
1536
|
+
shouldValidate
|
|
1711
1537
|
} = useFormComposer({
|
|
1712
1538
|
problems,
|
|
1713
1539
|
navigationTrackingParams: associatedLeTrackingParams,
|
|
1714
1540
|
forms,
|
|
1715
1541
|
onSubmit
|
|
1716
1542
|
});
|
|
1717
|
-
const
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1543
|
+
const handleTrackNavigation = useCallback(
|
|
1544
|
+
(props2) => {
|
|
1545
|
+
trackNavigation({
|
|
1546
|
+
...props2,
|
|
1547
|
+
additionalTrackingParams: associatedLeTrackingParams
|
|
1548
|
+
});
|
|
1549
|
+
},
|
|
1550
|
+
[associatedLeTrackingParams]
|
|
1551
|
+
);
|
|
1726
1552
|
const homeClick = () => {
|
|
1727
1553
|
trackNavigation({
|
|
1728
1554
|
userEvents,
|
|
@@ -1730,77 +1556,79 @@ function BusinessFinancingDropin(props) {
|
|
|
1730
1556
|
toForm: "home",
|
|
1731
1557
|
label: "home"
|
|
1732
1558
|
});
|
|
1733
|
-
handleHomeClick
|
|
1559
|
+
handleHomeClick?.();
|
|
1734
1560
|
};
|
|
1735
|
-
const
|
|
1736
|
-
|
|
1737
|
-
/* @__PURE__ */ jsx("div", { className: formWrapperClasses(activeForm2, companyFormId), children: /* @__PURE__ */ jsx(
|
|
1561
|
+
const renderActiveForm = (selectedForm) => /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-form-wrapper", children: [
|
|
1562
|
+
selectedForm.formId === companyFormId && /* @__PURE__ */ jsx(
|
|
1738
1563
|
AdditionalFieldsForBusinessFinancingCompany,
|
|
1739
1564
|
{
|
|
1740
|
-
|
|
1741
|
-
data: defaultData == null ? void 0 : defaultData.company,
|
|
1565
|
+
data: defaultData?.company,
|
|
1742
1566
|
legalEntity: rootLegalEntity,
|
|
1743
1567
|
heading: i18n.get("additionalInformationForBusinessFinancing"),
|
|
1744
1568
|
id: companyFormId,
|
|
1745
|
-
country
|
|
1569
|
+
country,
|
|
1570
|
+
shouldValidate,
|
|
1571
|
+
fieldValidationErrors: problems?.validationErrors?.[selectedForm?.formId],
|
|
1572
|
+
formVerificationErrors: problems?.verificationErrors?.[selectedForm?.formId],
|
|
1573
|
+
errors: errors?.company,
|
|
1574
|
+
valid: valid?.company
|
|
1746
1575
|
}
|
|
1747
|
-
)
|
|
1748
|
-
|
|
1576
|
+
),
|
|
1577
|
+
selectedForm.formId === parentCompanyFormId && /* @__PURE__ */ jsx(
|
|
1749
1578
|
AdditionalFieldsForBusinessFinancingParentCompany,
|
|
1750
1579
|
{
|
|
1751
|
-
|
|
1752
|
-
data: defaultData == null ? void 0 : defaultData.parentCompany,
|
|
1580
|
+
data: defaultData?.parentCompany,
|
|
1753
1581
|
heading: i18n.get("parentCompanyInformation"),
|
|
1754
1582
|
id: companyFormId,
|
|
1755
|
-
country
|
|
1583
|
+
country,
|
|
1584
|
+
shouldValidate,
|
|
1585
|
+
errors: errors?.parentCompany
|
|
1756
1586
|
}
|
|
1757
|
-
)
|
|
1758
|
-
|
|
1587
|
+
),
|
|
1588
|
+
selectedForm.formId === ultimateParentCompanyFormId && /* @__PURE__ */ jsx(
|
|
1759
1589
|
AdditionalFieldsForBusinessFinancingUltimateParentCompany,
|
|
1760
1590
|
{
|
|
1761
|
-
|
|
1762
|
-
data: defaultData == null ? void 0 : defaultData.ultimateParentCompany,
|
|
1591
|
+
data: defaultData?.ultimateParentCompany,
|
|
1763
1592
|
heading: i18n.get("ultimateParentCompanyInformation"),
|
|
1764
1593
|
id: companyFormId,
|
|
1765
|
-
country
|
|
1594
|
+
country,
|
|
1595
|
+
shouldValidate,
|
|
1596
|
+
errors: errors?.ultimateParentCompany
|
|
1766
1597
|
}
|
|
1767
|
-
)
|
|
1598
|
+
)
|
|
1768
1599
|
] });
|
|
1769
|
-
if (!
|
|
1600
|
+
if (!defaultData?.company) {
|
|
1770
1601
|
return /* @__PURE__ */ jsx(Loader, {});
|
|
1771
1602
|
}
|
|
1772
1603
|
return showEndState ? /* @__PURE__ */ jsxs(FormEndState, { variant: "success", children: [
|
|
1773
1604
|
/* @__PURE__ */ jsx("template", { slot: "title", children: i18n.get("applicationSubmittedSuccessfully") }),
|
|
1774
1605
|
/* @__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
|
|
1606
|
+
/* @__PURE__ */ jsx("template", { slot: "actions", children: externalOnSubmit && !showBusinessFinancingFirst && /* @__PURE__ */ jsx(Button, { onClick: () => externalOnSubmit?.({ ...umfData }), children: externalOnSubmitLabel || i18n.get("finish") }) }),
|
|
1776
1607
|
/* @__PURE__ */ jsx("div", { children: i18n.get("yourLoanApplicationHasBeenReceived") })
|
|
1777
|
-
] }) : /* @__PURE__ */ jsx(
|
|
1778
|
-
|
|
1608
|
+
] }) : /* @__PURE__ */ jsx(FormContextProvider, { form, children: /* @__PURE__ */ jsx(
|
|
1609
|
+
FormFlow,
|
|
1779
1610
|
{
|
|
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
1611
|
summary: {
|
|
1794
|
-
data: formatDataForSummary(
|
|
1795
|
-
labels: customLabels,
|
|
1612
|
+
data: formatDataForSummary(i18n, datasetUtils, umfData),
|
|
1796
1613
|
omitted: {
|
|
1797
1614
|
keys: omittedSummaryKeys
|
|
1798
|
-
}
|
|
1615
|
+
},
|
|
1616
|
+
problems,
|
|
1617
|
+
trackNavigation: handleTrackNavigation,
|
|
1618
|
+
labels: customLabels
|
|
1799
1619
|
},
|
|
1800
|
-
steps,
|
|
1620
|
+
currentStep: steps.current,
|
|
1621
|
+
disableNextButton: !activeForm.isValid,
|
|
1622
|
+
forms,
|
|
1623
|
+
gotoFormByFormIndex,
|
|
1624
|
+
handleBackClick,
|
|
1625
|
+
handleCancelClick: homeClick,
|
|
1626
|
+
handleNextClick,
|
|
1627
|
+
loadingStatus,
|
|
1628
|
+
totalSteps: steps.total,
|
|
1801
1629
|
children: /* @__PURE__ */ jsx("div", { children: renderActiveForm(activeForm || businessFinancingForms.company) })
|
|
1802
1630
|
}
|
|
1803
|
-
);
|
|
1631
|
+
) });
|
|
1804
1632
|
}
|
|
1805
1633
|
export {
|
|
1806
1634
|
BusinessFinancingDropin as B
|