@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,30 +2,20 @@
|
|
|
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] = "d847da80-ec3c-4248-9087-2ee05268b2be", e._sentryDebugIdIdentifier = "sentry-dbid-d847da80-ec3c-4248-9087-2ee05268b2be");
|
|
6
6
|
} catch (e) {
|
|
7
7
|
}
|
|
8
8
|
}
|
|
9
9
|
;
|
|
10
10
|
import { jsx, jsxs, Fragment } from "preact/jsx-runtime";
|
|
11
|
-
import {
|
|
11
|
+
import { p as useApiContext, bi as useMutation, bk as httpPost, q as useQuery, dT as KNOWN_BROKEN_PRIMARY_SOURCE_CONNECTIONS, ap as useI18nContext, dy as MemoizedDocumentUpload, _ as Button, b5 as Modal, b7 as ModalContent, G as Typography, aq as CountryCodes, P as CompanyTypesValue, dU as useGlobalData, dV as getForms, X as TaskTypes, dW as BasicInformation, ds as getFormProps, dX as CompanyStructure, dY as AdditionalInformation, dZ as MemoizedConstitutionalDocument, y as LegalEntityType, d_ as FinancialInformation, bA as formatObject, bf as entriesOf, cg as getDocument, ch as mapExistingFile, ci as getPageName, bo as businessDetailsComponentsKeyMapping, d$ as solePropBusinessDetailsKeyMapping, e0 as getDefaultRegistrationNumberType, e1 as getDefaultVatNumberType, b1 as objectsDeepEqual, e2 as operationalAddressIsSameIds, e3 as COUNTRIES_USING_COMPANY_SEARCH, e4 as FIELDS_NEEDED_FOR_COMPANY_SEARCH, dh as keysOf, i as isUndefinedOrNull, dK as isDateOlderThanAYear, aL as summaryItem, e5 as solePropBusinessDetailsApiKeyMapping, e6 as businessDetailsApiKeyMapping, di as isEmpty, e7 as COUNTRIES_THAT_USE_TAX_ID_INSTEAD_OF_VAT, cl as createDocumentRequest, b3 as datasetUtilities, cG as mapAddressLabels, e8 as companyTypeMetadata, e9 as getProp, ar as isEmpty$1, Y as createLogger, cF as filterOutUnwantedAssociationsIfRootLE, bU as isValidationError, bV as processValidationErrors, bW as isMaintenanceModeError, ea as documentFormsIds, at as resolveFieldMetadata, eb as registrationNumberDefaultFieldMetadata, ec as inferCompanyRegistrationNumberType, ed as getCompanyRegistrationNumberOptions, ee as registrationNumberDefaultFieldConfig, cb as taxInformationDefaultFieldMetadata, ef as countryToTaxInfoTypeMap, cc as taxInformationDefaultFieldConfig, eg as getKeyForField, co as drop, al as getOwnEntityAssociations, cP as doArraysMatch, cL as getFileExtention, U as useAccountHolder, a6 as useToastContext, a0 as useAnalyticsContext, a7 as useExperimentsContext, K as useSettingsContext, eh as verifiedBusiness, bq as useQueryClient, ei as useStateContext, M as SettingNames, ej as setIsBankAccountRequestedForOrganization, bP as getAssociatedLeAnalyticsPayload, b4 as getCapabilityProblems, cp as documentApiUtils, cD as composePerScenarioFormConfigurations, cx as useScenarioConfiguration, ek as rules, cy as getPropsFromConfigurations, el as useCompanySelection, em as useVerifyTin, bQ as getRequiredForms, bR as addValidityToForms, bS as useFormComposer, en as setVerifiedBusiness, eo as FormWrapper, bb as Confirm, ep as solePropBusinessDetailsDocumentMapping, eq as businessDetailsDocumentMapping } from "./StoreProvider-ClKLaHzy.js";
|
|
12
12
|
import { useState, useEffect, useRef, useCallback, useMemo } from "preact/hooks";
|
|
13
|
-
import { u as useCreateLegalEntity, a as useUpdateLegalEntity } from "./useUpdateLegalEntity-
|
|
14
|
-
import { h as hasDataChanged } from "./hasDataChanged-
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import { g as getRequiredForms, a as addValidityToForms, u as useFormComposer, t as trackNavigation } from "./dropinUtils-Bk0T79SK.js";
|
|
18
|
-
import { i as isValidationError, p as processValidationErrors, d as isMaintenanceModeError, u as useScenarioConfiguration } from "./processValidationErrors-RYlNmxB9.js";
|
|
19
|
-
import { C as Confirm } from "./Confirm-okTxq40p.js";
|
|
20
|
-
import { o as organizationTypesToSkipCompanyStructureForm } from "./utils-BPrqY9DW.js";
|
|
21
|
-
import { F as FormWrapper } from "./FormWrapper-Dvm1o4tC.js";
|
|
22
|
-
import { g as getDocument, c as createDocumentRequest, a as getFileExtention, d as documentApiUtils } from "./documentUtils-51iMbUyU.js";
|
|
23
|
-
import { g as getFieldsWithExistingData } from "./getFieldsWithExistingData-UNUNInq5.js";
|
|
13
|
+
import { u as useCreateLegalEntity, a as useUpdateLegalEntity } from "./useUpdateLegalEntity-D8dw9Oc3.js";
|
|
14
|
+
import { h as hasDataChanged } from "./hasDataChanged-CwfuS4et.js";
|
|
15
|
+
import { o as organizationTypesToSkipCompanyStructureForm } from "./utils-CL9qlD-O.js";
|
|
16
|
+
import { g as getFieldsWithExistingData } from "./getFieldsWithExistingData-BY--eXBQ.js";
|
|
24
17
|
import cx from "classnames";
|
|
25
|
-
import {
|
|
26
|
-
import { m as mapFinancialReportsToFinancialInformation, a as mapFinancialInformationToFinancialReport } from "./mapFinancialReportsToFinancialInformation-Cid31JpK.js";
|
|
27
|
-
import { m as mapExistingFile, g as getPageName } from "./mapExistingFile-BE74t9jV.js";
|
|
28
|
-
import { f as formatObject, g as getProp } from "./utils-B1H_8b1P.js";
|
|
18
|
+
import { m as mapFinancialReportsToFinancialInformation, a as mapFinancialInformationToFinancialReport } from "./mapFinancialReportsToFinancialInformation-D_6u_bSS.js";
|
|
29
19
|
import { f as formatCurrency } from "./formatCurrency-CMOSdJMB.js";
|
|
30
20
|
const clearCompanyData = async (legalEntityId, baseUrl) => {
|
|
31
21
|
return httpPost({
|
|
@@ -48,6 +38,16 @@ const useCompanySearch = (data, options) => {
|
|
|
48
38
|
return useQuery({
|
|
49
39
|
queryKey: ["companySearch", data],
|
|
50
40
|
queryFn: () => handleCompanySearch(rootLegalEntityId.value, baseUrl.value, data),
|
|
41
|
+
// TODO: Remove this once Moody's resolves & bug
|
|
42
|
+
select: (data2) => {
|
|
43
|
+
const transformedResults = data2.results.map((item) => ({
|
|
44
|
+
...item,
|
|
45
|
+
name: item.name.replaceAll("&", "&")
|
|
46
|
+
}));
|
|
47
|
+
return {
|
|
48
|
+
results: transformedResults
|
|
49
|
+
};
|
|
50
|
+
},
|
|
51
51
|
retry: 0,
|
|
52
52
|
...options
|
|
53
53
|
});
|
|
@@ -134,6 +134,7 @@ function ProofOfDirectorDocument({
|
|
|
134
134
|
documentType: "proofOfDirector",
|
|
135
135
|
guidanceContent: /* @__PURE__ */ jsx(GuidanceContent$4, {}),
|
|
136
136
|
country,
|
|
137
|
+
hidePageCount: true,
|
|
137
138
|
documentTypeSelect: {
|
|
138
139
|
selectedType: selectedDocumentName,
|
|
139
140
|
setSelectedType: setSelectedDocumentName,
|
|
@@ -220,16 +221,14 @@ function ProofOfOwnershipDocument({
|
|
|
220
221
|
description = "weNeedAnOfficialDocumentForOwnership",
|
|
221
222
|
...props
|
|
222
223
|
}) {
|
|
223
|
-
var _a;
|
|
224
224
|
const { i18n } = useI18nContext();
|
|
225
225
|
const [selectedDocumentName, setSelectedDocumentName] = useState(documentTypes$1[0].id);
|
|
226
226
|
const supportsMultiple = selectedDocumentName === DOC_TYPE_FOR_MULTI_UPLOAD;
|
|
227
227
|
useEffect(() => {
|
|
228
|
-
|
|
229
|
-
if (((_b = (_a2 = props.data) == null ? void 0 : _a2.proofOfOwnership) == null ? void 0 : _b.length) === 2) {
|
|
228
|
+
if (props.data?.proofOfOwnership?.length === 2) {
|
|
230
229
|
setSelectedDocumentName(DOC_TYPE_FOR_MULTI_UPLOAD);
|
|
231
230
|
}
|
|
232
|
-
}, [
|
|
231
|
+
}, [props.data?.proofOfOwnership]);
|
|
233
232
|
return /* @__PURE__ */ jsx(
|
|
234
233
|
MemoizedDocumentUpload,
|
|
235
234
|
{
|
|
@@ -289,6 +288,7 @@ function ProofOfSignatoryDocument({
|
|
|
289
288
|
documentType: "proofOfSignatory",
|
|
290
289
|
guidanceContent: /* @__PURE__ */ jsx(GuidanceContent$2, {}),
|
|
291
290
|
country,
|
|
291
|
+
hidePageCount: true,
|
|
292
292
|
documentTypeSelect: {
|
|
293
293
|
selectedType: selectedDocumentName,
|
|
294
294
|
setSelectedType: setSelectedDocumentName,
|
|
@@ -370,9 +370,8 @@ const GuidanceContent$1 = ({
|
|
|
370
370
|
country,
|
|
371
371
|
companyType
|
|
372
372
|
}) => {
|
|
373
|
-
var _a;
|
|
374
373
|
const { i18n } = useI18nContext();
|
|
375
|
-
const acceptedDocGuidance =
|
|
374
|
+
const acceptedDocGuidance = ACCEPTED_DOCUMENTS_MAP$1[country]?.[companyType];
|
|
376
375
|
return /* @__PURE__ */ jsx("div", { className: "adyen-kyc-upload-field__guidance", children: country === "US" ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
377
376
|
acceptedDocGuidance && /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-u-margin-bottom-24", children: [
|
|
378
377
|
/* @__PURE__ */ jsx("strong", { children: i18n.get(acceptedDocGuidance.header) }),
|
|
@@ -410,7 +409,8 @@ function RegistrationDocument({
|
|
|
410
409
|
documentType: "registrationDocument",
|
|
411
410
|
guidanceContent: /* @__PURE__ */ jsx(GuidanceContent$1, { country, companyType }),
|
|
412
411
|
companyType,
|
|
413
|
-
country
|
|
412
|
+
country,
|
|
413
|
+
hidePageCount: true
|
|
414
414
|
}
|
|
415
415
|
);
|
|
416
416
|
}
|
|
@@ -465,9 +465,8 @@ const GuidanceContent = ({
|
|
|
465
465
|
country,
|
|
466
466
|
companyType
|
|
467
467
|
}) => {
|
|
468
|
-
var _a;
|
|
469
468
|
const { i18n } = useI18nContext();
|
|
470
|
-
const acceptedDocGuidance =
|
|
469
|
+
const acceptedDocGuidance = ACCEPTED_DOCUMENTS_MAP[country]?.[companyType];
|
|
471
470
|
return /* @__PURE__ */ jsx("div", { className: "adyen-kyc-upload-field__guidance", children: country === "US" ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
472
471
|
acceptedDocGuidance && /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-u-margin-bottom-24", children: [
|
|
473
472
|
/* @__PURE__ */ jsx("strong", { children: i18n.get(acceptedDocGuidance.header) }),
|
|
@@ -509,7 +508,8 @@ function TaxDocument({
|
|
|
509
508
|
documentType: "proofOfOrganizationTaxInfo",
|
|
510
509
|
guidanceContent: /* @__PURE__ */ jsx(GuidanceContent, { country, companyType }),
|
|
511
510
|
companyType,
|
|
512
|
-
country
|
|
511
|
+
country,
|
|
512
|
+
hidePageCount: true
|
|
513
513
|
}
|
|
514
514
|
);
|
|
515
515
|
}
|
|
@@ -531,25 +531,25 @@ function BusinessDetails(props) {
|
|
|
531
531
|
proceedToManualDataEntry
|
|
532
532
|
} = props;
|
|
533
533
|
const forms = getForms(country);
|
|
534
|
-
const formWrapperClasses = (formId) =>
|
|
534
|
+
const formWrapperClasses = (formId) => activeForm?.formId !== formId ? "adyen-kyc-form-wrapper adyen-kyc-form-wrapper--hidden" : "adyen-kyc-form-wrapper";
|
|
535
535
|
const classNames = cx("adyen-kyc-business-details", {
|
|
536
|
-
"adyen-kyc-business-details--hide":
|
|
536
|
+
"adyen-kyc-business-details--hide": activeForm?.formId === "summary"
|
|
537
537
|
});
|
|
538
|
-
const companyType = taskType === TaskTypes.SOLE_PROPRIETOR_COMPANY ? CompanyTypesValue.SOLE_PROPRIETORSHIP : companyStructure
|
|
538
|
+
const companyType = taskType === TaskTypes.SOLE_PROPRIETOR_COMPANY ? CompanyTypesValue.SOLE_PROPRIETORSHIP : companyStructure?.entityType;
|
|
539
539
|
return /* @__PURE__ */ jsxs("div", { className: classNames, children: [
|
|
540
540
|
/* @__PURE__ */ jsx("div", { className: formWrapperClasses(forms.basicInformation.formId), children: /* @__PURE__ */ jsx(
|
|
541
541
|
BasicInformation,
|
|
542
542
|
{
|
|
543
543
|
...getFormProps(props, forms.basicInformation.formId),
|
|
544
544
|
id: forms.basicInformation.formId,
|
|
545
|
-
heading: i18n.get(
|
|
546
|
-
description:
|
|
545
|
+
heading: i18n.get(activeForm?.formHeading || forms.basicInformation.formHeading),
|
|
546
|
+
description: activeForm?.formDescription ? i18n.get(activeForm?.formDescription) : void 0,
|
|
547
547
|
country,
|
|
548
548
|
companyType,
|
|
549
549
|
isTopLevelEntity,
|
|
550
550
|
showBusinessSelection,
|
|
551
551
|
showCompanyStructure,
|
|
552
|
-
isActiveForm:
|
|
552
|
+
isActiveForm: activeForm?.formId === forms.basicInformation.formId,
|
|
553
553
|
loading,
|
|
554
554
|
proceedToManualDataEntry,
|
|
555
555
|
searchResults,
|
|
@@ -564,9 +564,9 @@ function BusinessDetails(props) {
|
|
|
564
564
|
{
|
|
565
565
|
...getFormProps(props, forms.companyStructure.formId),
|
|
566
566
|
id: forms.companyStructure.formId,
|
|
567
|
-
heading: i18n.get(
|
|
567
|
+
heading: i18n.get(activeForm?.formHeading ?? forms.companyStructure.formHeading),
|
|
568
568
|
description: i18n.get(
|
|
569
|
-
|
|
569
|
+
activeForm?.formDescription ?? forms.companyStructure.formDescription
|
|
570
570
|
),
|
|
571
571
|
country,
|
|
572
572
|
showCompanyStructure
|
|
@@ -577,7 +577,7 @@ function BusinessDetails(props) {
|
|
|
577
577
|
{
|
|
578
578
|
...getFormProps(props, forms.additionalInformation.formId),
|
|
579
579
|
id: forms.additionalInformation.formId,
|
|
580
|
-
heading: i18n.get(
|
|
580
|
+
heading: i18n.get(activeForm?.formHeading ?? forms.additionalInformation.formHeading),
|
|
581
581
|
country,
|
|
582
582
|
companyType,
|
|
583
583
|
showCompanyStructure
|
|
@@ -613,6 +613,7 @@ function BusinessDetails(props) {
|
|
|
613
613
|
description: i18n.get(forms.companyTaxDocument.formDescription),
|
|
614
614
|
documentField: "taxDocument",
|
|
615
615
|
documentType: "vatDocument",
|
|
616
|
+
hidePageCount: true,
|
|
616
617
|
guidanceContent: /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-u-margin-bottom-24", children: [
|
|
617
618
|
/* @__PURE__ */ jsxs("div", { className: "adyen-kyc-upload-field__subtitle", children: [
|
|
618
619
|
" ",
|
|
@@ -707,25 +708,24 @@ const mapBasicInformation = (data) => {
|
|
|
707
708
|
}, {});
|
|
708
709
|
};
|
|
709
710
|
const mapDbaName = (legalEntity) => {
|
|
710
|
-
var _a, _b, _c, _d;
|
|
711
711
|
const entity = legalEntity.type === "organization" ? legalEntity.organization : legalEntity.soleProprietorship;
|
|
712
712
|
const dbaName = {};
|
|
713
|
-
if (typeof
|
|
713
|
+
if (typeof entity?.doingBusinessAsAbsent !== "undefined") {
|
|
714
714
|
dbaName.hasDoingBusinessAs = !entity.doingBusinessAsAbsent;
|
|
715
715
|
} else {
|
|
716
|
-
if (entity
|
|
717
|
-
dbaName.hasDoingBusinessAs =
|
|
716
|
+
if (entity?.doingBusinessAs) {
|
|
717
|
+
dbaName.hasDoingBusinessAs = entity?.doingBusinessAs !== (legalEntity.type === "organization" ? legalEntity.organization?.legalName : legalEntity.soleProprietorship?.name);
|
|
718
718
|
} else {
|
|
719
719
|
dbaName.hasDoingBusinessAs = void 0;
|
|
720
720
|
}
|
|
721
721
|
}
|
|
722
|
-
if (
|
|
723
|
-
dbaName.doingBusinessAs =
|
|
722
|
+
if (legalEntity.organization?.doingBusinessAs) {
|
|
723
|
+
dbaName.doingBusinessAs = legalEntity.organization?.doingBusinessAs;
|
|
724
724
|
}
|
|
725
725
|
return dbaName;
|
|
726
726
|
};
|
|
727
727
|
const mapIsUen = (taxInformation, registrationNumber, country) => {
|
|
728
|
-
const currentCountryTaxInfo = taxInformation
|
|
728
|
+
const currentCountryTaxInfo = taxInformation?.find((taxInfo) => taxInfo.country === country);
|
|
729
729
|
if (!currentCountryTaxInfo || country !== "SG") return {};
|
|
730
730
|
return {
|
|
731
731
|
registrationNumber: currentCountryTaxInfo.type === "UEN" ? currentCountryTaxInfo.number : registrationNumber,
|
|
@@ -735,14 +735,21 @@ const mapIsUen = (taxInformation, registrationNumber, country) => {
|
|
|
735
735
|
const mapAdditionalInformation = (data, legalEntity) => {
|
|
736
736
|
if (!data) return;
|
|
737
737
|
const entity = legalEntity.type === "organization" ? legalEntity.organization : legalEntity.soleProprietorship;
|
|
738
|
-
const currentCountry = entity
|
|
738
|
+
const currentCountry = entity?.registeredAddress.country;
|
|
739
739
|
const dbaNameFields = mapDbaName(legalEntity);
|
|
740
740
|
const isUen = mapIsUen(
|
|
741
741
|
data.taxInformation,
|
|
742
742
|
data.registrationNumber,
|
|
743
743
|
currentCountry
|
|
744
744
|
);
|
|
745
|
-
const
|
|
745
|
+
const companyType = legalEntity.type === "organization" ? legalEntity.organization?.type : CompanyTypesValue.SOLE_PROPRIETORSHIP;
|
|
746
|
+
const registrationNumberType = getDefaultRegistrationNumberType(
|
|
747
|
+
entity?.registrationNumber,
|
|
748
|
+
currentCountry,
|
|
749
|
+
companyType
|
|
750
|
+
);
|
|
751
|
+
const vatNumberType = getDefaultVatNumberType(entity?.vatNumber, currentCountry);
|
|
752
|
+
const operationalAddressIsSame = entity?.principalPlaceOfBusiness && !objectsDeepEqual(entity?.principalPlaceOfBusiness, entity?.registeredAddress) ? operationalAddressIsSameIds.OPERATIONAL_ADDRESS_IS_NOT_SAME : operationalAddressIsSameIds.OPERATIONAL_ADDRESS_IS_SAME;
|
|
746
753
|
const result = entriesOf(data).reduce(
|
|
747
754
|
(acc, [field]) => {
|
|
748
755
|
if (!COUNTRIES_USING_COMPANY_SEARCH.includes(currentCountry)) {
|
|
@@ -759,10 +766,28 @@ const mapAdditionalInformation = (data, legalEntity) => {
|
|
|
759
766
|
}
|
|
760
767
|
return acc;
|
|
761
768
|
},
|
|
762
|
-
{ operationalAddressIsSame }
|
|
769
|
+
{ operationalAddressIsSame, registrationNumberType, vatNumberType }
|
|
763
770
|
);
|
|
764
771
|
return { ...result, ...dbaNameFields, ...isUen };
|
|
765
772
|
};
|
|
773
|
+
const mapLocalization = (data) => {
|
|
774
|
+
const mappings = [
|
|
775
|
+
{ formField: "jaHaniLegalCompanyName", script: "ja-Hani", legalEntityField: "legalName" },
|
|
776
|
+
{ formField: "jaKanaLegalCompanyName", script: "ja-Kana", legalEntityField: "legalName" }
|
|
777
|
+
];
|
|
778
|
+
const localizedScriptsAndFields = data.organization?.localization || data.soleProprietorship?.localization;
|
|
779
|
+
if (!localizedScriptsAndFields) {
|
|
780
|
+
return;
|
|
781
|
+
}
|
|
782
|
+
const result = {};
|
|
783
|
+
mappings.forEach((mapping) => {
|
|
784
|
+
const value = localizedScriptsAndFields.find(
|
|
785
|
+
(localization) => localization.script === mapping.script
|
|
786
|
+
)?.fields?.[mapping.legalEntityField];
|
|
787
|
+
result[mapping.formField] = value;
|
|
788
|
+
});
|
|
789
|
+
return result;
|
|
790
|
+
};
|
|
766
791
|
const mapLegalEntityToBusinessDetailsSchema = (legalEntity, parentEntity) => {
|
|
767
792
|
if (!legalEntity) return {};
|
|
768
793
|
const {
|
|
@@ -774,16 +799,20 @@ const mapLegalEntityToBusinessDetailsSchema = (legalEntity, parentEntity) => {
|
|
|
774
799
|
companyConstitutionalDocument
|
|
775
800
|
} = mapApiDocumentToBusinessDetailsDocuments(legalEntity.id);
|
|
776
801
|
const buildSolePropSchema = () => {
|
|
777
|
-
var _a, _b, _c;
|
|
778
802
|
const solePropData = formatObject(
|
|
779
803
|
legalEntity,
|
|
780
804
|
solePropBusinessDetailsKeyMapping
|
|
781
805
|
);
|
|
782
|
-
const country =
|
|
806
|
+
const country = solePropData?.additionalInformation?.registrationAddress?.country ?? parentEntity?.individual?.residentialAddress.country;
|
|
807
|
+
if (legalEntity?.soleProprietorship?.financialReports && solePropData) {
|
|
808
|
+
solePropData.companyFinancialInformation = mapFinancialReportsToFinancialInformation(
|
|
809
|
+
legalEntity.soleProprietorship.financialReports
|
|
810
|
+
);
|
|
811
|
+
}
|
|
783
812
|
return {
|
|
784
813
|
...solePropData,
|
|
785
814
|
basicInformation: {
|
|
786
|
-
...solePropData
|
|
815
|
+
...solePropData?.basicInformation,
|
|
787
816
|
country
|
|
788
817
|
},
|
|
789
818
|
companyConstitutionalDocument
|
|
@@ -799,13 +828,13 @@ const mapLegalEntityToBusinessDetailsSchema = (legalEntity, parentEntity) => {
|
|
|
799
828
|
companyFinancialInformation: {}
|
|
800
829
|
};
|
|
801
830
|
const businessDetailsSchema = legalEntity.type === "organization" ? orgSchema : buildSolePropSchema();
|
|
831
|
+
const localization = mapLocalization(legalEntity);
|
|
802
832
|
return entriesOf(businessDetailsSchema).reduce((componentData, [key]) => {
|
|
803
|
-
var _a;
|
|
804
833
|
switch (key) {
|
|
805
834
|
case "basicInformation": {
|
|
806
835
|
return {
|
|
807
836
|
...componentData,
|
|
808
|
-
[key]: mapBasicInformation(businessDetailsSchema[key])
|
|
837
|
+
[key]: { ...mapBasicInformation(businessDetailsSchema[key]), ...localization ?? {} }
|
|
809
838
|
};
|
|
810
839
|
}
|
|
811
840
|
case "companyStructure": {
|
|
@@ -859,11 +888,10 @@ const mapLegalEntityToBusinessDetailsSchema = (legalEntity, parentEntity) => {
|
|
|
859
888
|
};
|
|
860
889
|
}
|
|
861
890
|
case "companyFinancialInformation": {
|
|
862
|
-
|
|
891
|
+
const financialReports = legalEntity.type === "organization" ? legalEntity?.organization?.financialReports : legalEntity?.soleProprietorship?.financialReports;
|
|
892
|
+
return financialReports?.length ? {
|
|
863
893
|
...componentData,
|
|
864
|
-
[key]: mapFinancialReportsToFinancialInformation(
|
|
865
|
-
legalEntity.organization.financialReports
|
|
866
|
-
)
|
|
894
|
+
[key]: mapFinancialReportsToFinancialInformation(financialReports)
|
|
867
895
|
} : componentData;
|
|
868
896
|
}
|
|
869
897
|
default:
|
|
@@ -871,6 +899,74 @@ const mapLegalEntityToBusinessDetailsSchema = (legalEntity, parentEntity) => {
|
|
|
871
899
|
}
|
|
872
900
|
}, {});
|
|
873
901
|
};
|
|
902
|
+
const businessDetailsBase = {
|
|
903
|
+
/* Base required fields */
|
|
904
|
+
country: { rule: "REQUIRED" },
|
|
905
|
+
entityType: { rule: "businessRequiresCompanyType" },
|
|
906
|
+
legalCompanyName: { rule: "REQUIRED" },
|
|
907
|
+
jaHaniLegalCompanyName: { rule: "japaneseLegalCompanyName" },
|
|
908
|
+
jaKanaLegalCompanyName: { rule: "japaneseLegalCompanyName" },
|
|
909
|
+
hasDoingBusinessAs: { rule: "REQUIRED" },
|
|
910
|
+
registrationAddress: { rule: "REQUIRED" },
|
|
911
|
+
operationalAddressIsSame: { rule: "REQUIRED" },
|
|
912
|
+
/* Base optional fields */
|
|
913
|
+
operationalAddress: { rule: "OPTIONAL" },
|
|
914
|
+
/* Fields with custom country specific rules */
|
|
915
|
+
stockExchangeMIC: { rule: "ifPubliclyTradedCompany" },
|
|
916
|
+
stockISIN: { rule: "ifPubliclyTradedCompany" },
|
|
917
|
+
stockTickerSymbol: { rule: "ifPubliclyTradedCompany" },
|
|
918
|
+
dateOfIncorporation: { rule: "isDateOfIncorporationRequired" },
|
|
919
|
+
stateOrProvince: { rule: "countryUsingCompanySearch" },
|
|
920
|
+
registrationNumber: { rule: "countryRequiresRegistrationNumber" },
|
|
921
|
+
registrationNumberType: { rule: "countryRequiresRegistrationNumber" },
|
|
922
|
+
exemptedFromRegistrationNumber: { rule: "companyRegistrationNumberExemptionAllowed" },
|
|
923
|
+
eInvoicingCode: { rule: "isEInvoicingCodeEnabled" },
|
|
924
|
+
countryOfGoverningLaw: { rule: "countryOfGoverningLawRequired" },
|
|
925
|
+
taxDocument: { rule: "ifCountryUsAndTinFailed" }
|
|
926
|
+
};
|
|
927
|
+
const taxInformationBase = {
|
|
928
|
+
vatNumber: { rule: "countryUsesVat" },
|
|
929
|
+
vatNumberType: { rule: "countryUsesVat" },
|
|
930
|
+
exemptedFromVat: { rule: "countryUsesVat" },
|
|
931
|
+
vatAbsenceReason: { rule: "countryUsesVat" },
|
|
932
|
+
taxInformation: { rule: "countryUsesTaxId" },
|
|
933
|
+
exemptedFromTax: { rule: "countryHasTaxExemptions" },
|
|
934
|
+
isUen: { rule: "countryUsesUenOrGst" }
|
|
935
|
+
};
|
|
936
|
+
const financialInformationBase = {
|
|
937
|
+
numberOfEmployees: { rule: "countryRequiresFinancialInformation" },
|
|
938
|
+
financialReportingDate: { rule: "isFinancialReportingFieldsRequired" }
|
|
939
|
+
};
|
|
940
|
+
const businessDetailsFieldsPerScenario = {
|
|
941
|
+
L0: {
|
|
942
|
+
country: { rule: "REQUIRED" },
|
|
943
|
+
legalCompanyName: { rule: "REQUIRED" },
|
|
944
|
+
stateOrProvince: { rule: "countryUsingCompanySearch" },
|
|
945
|
+
...financialInformationBase
|
|
946
|
+
},
|
|
947
|
+
L1: {
|
|
948
|
+
...businessDetailsBase,
|
|
949
|
+
...financialInformationBase
|
|
950
|
+
},
|
|
951
|
+
L: {
|
|
952
|
+
...businessDetailsBase,
|
|
953
|
+
...taxInformationBase,
|
|
954
|
+
...financialInformationBase
|
|
955
|
+
},
|
|
956
|
+
L_PROOFOFADDRESS: {
|
|
957
|
+
// TODO this field does not exist
|
|
958
|
+
// proofOfAddressDocument: { rule: 'REQUIRED' },
|
|
959
|
+
},
|
|
960
|
+
L_REGDOC: {
|
|
961
|
+
registrationDocument: { rule: "REQUIRED" }
|
|
962
|
+
},
|
|
963
|
+
L_TAXDOC: {
|
|
964
|
+
taxDocument: { rule: "REQUIRED" }
|
|
965
|
+
},
|
|
966
|
+
L_BAFIN: {
|
|
967
|
+
legalForm: { rule: "REQUIRED" }
|
|
968
|
+
}
|
|
969
|
+
};
|
|
874
970
|
const adjustFormData = (oldFormData, newFormData) => {
|
|
875
971
|
const schema = Array.from((/* @__PURE__ */ new Set([...keysOf(oldFormData), ...keysOf(newFormData)])).keys());
|
|
876
972
|
return schema.reduce((acc, key) => {
|
|
@@ -893,9 +989,17 @@ const setRemovedFieldsOnSchemaToDeletedValue = (newData, existingData) => {
|
|
|
893
989
|
return { ...adjusted, [formId]: adjustFormData(oldFormData, newFormData) };
|
|
894
990
|
}, {});
|
|
895
991
|
};
|
|
896
|
-
const formatFinancialInformationSummary = (data, i18n, country) => {
|
|
897
|
-
|
|
898
|
-
|
|
992
|
+
const formatFinancialInformationSummary = (data, i18n, country, dateOfIncorporation) => {
|
|
993
|
+
let summary;
|
|
994
|
+
if (!data) return void 0;
|
|
995
|
+
if (dateOfIncorporation && !isDateOlderThanAYear(dateOfIncorporation)) {
|
|
996
|
+
if (country === CountryCodes.UnitedKingdom) {
|
|
997
|
+
summary = { numberOfEmployees: `${data.numberOfEmployees}` };
|
|
998
|
+
return summary;
|
|
999
|
+
}
|
|
1000
|
+
return void 0;
|
|
1001
|
+
}
|
|
1002
|
+
summary = {
|
|
899
1003
|
currency: data.currency,
|
|
900
1004
|
financialReportingDate: data.financialReportingDate
|
|
901
1005
|
};
|
|
@@ -914,81 +1018,81 @@ const formatFinancialInformationSummary = (data, i18n, country) => {
|
|
|
914
1018
|
return summary;
|
|
915
1019
|
};
|
|
916
1020
|
const mapBusinessDetailsDocumentToApiDocument = async (data, entityId) => {
|
|
917
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
918
1021
|
const {
|
|
919
1022
|
companyRegistrationDocument,
|
|
920
1023
|
companyTaxDocument,
|
|
921
1024
|
companyProofOfDirectorDocument,
|
|
922
1025
|
companyConstitutionalDocument,
|
|
923
1026
|
companyProofOfSignatoryDocument,
|
|
924
|
-
companyProofOfOwnershipDocument
|
|
1027
|
+
companyProofOfOwnershipDocument,
|
|
1028
|
+
basicInformation
|
|
925
1029
|
} = data;
|
|
926
1030
|
const taxDocumentType = COUNTRIES_THAT_USE_TAX_ID_INSTEAD_OF_VAT.includes(
|
|
927
|
-
|
|
1031
|
+
basicInformation?.country
|
|
928
1032
|
) ? "proofOfOrganizationTaxInfo" : "vatDocument";
|
|
929
1033
|
const documents = await Promise.all([
|
|
930
1034
|
createDocumentRequest({
|
|
931
1035
|
entityId,
|
|
932
1036
|
entityType: "legalEntity",
|
|
933
1037
|
documentType: "registrationDocument",
|
|
934
|
-
page1:
|
|
1038
|
+
page1: companyRegistrationDocument?.registrationDocument?.[0]
|
|
935
1039
|
}),
|
|
936
1040
|
createDocumentRequest({
|
|
937
1041
|
entityId,
|
|
938
1042
|
entityType: "legalEntity",
|
|
939
1043
|
documentType: taxDocumentType,
|
|
940
|
-
page1:
|
|
1044
|
+
page1: companyTaxDocument?.taxDocument?.[0]
|
|
941
1045
|
}),
|
|
942
1046
|
createDocumentRequest({
|
|
943
1047
|
entityId,
|
|
944
1048
|
entityType: "legalEntity",
|
|
945
1049
|
documentType: "proofOfDirector",
|
|
946
|
-
page1:
|
|
1050
|
+
page1: companyProofOfDirectorDocument?.proofOfDirector?.[0]
|
|
947
1051
|
}),
|
|
948
1052
|
createDocumentRequest({
|
|
949
1053
|
entityId,
|
|
950
1054
|
entityType: "legalEntity",
|
|
951
1055
|
documentType: "constitutionalDocument",
|
|
952
|
-
page1:
|
|
1056
|
+
page1: companyConstitutionalDocument?.constitutionalDocument?.[0]
|
|
953
1057
|
}),
|
|
954
1058
|
createDocumentRequest({
|
|
955
1059
|
entityId,
|
|
956
1060
|
entityType: "legalEntity",
|
|
957
1061
|
documentType: "proofOfSignatory",
|
|
958
|
-
page1:
|
|
1062
|
+
page1: companyProofOfSignatoryDocument?.proofOfSignatory?.[0]
|
|
959
1063
|
}),
|
|
960
1064
|
createDocumentRequest({
|
|
961
1065
|
entityId,
|
|
962
1066
|
entityType: "legalEntity",
|
|
963
1067
|
documentType: "proofOfOwnership",
|
|
964
|
-
page1:
|
|
965
|
-
page2:
|
|
1068
|
+
page1: companyProofOfOwnershipDocument?.proofOfOwnership?.[0],
|
|
1069
|
+
page2: companyProofOfOwnershipDocument?.proofOfOwnership?.[1]
|
|
966
1070
|
})
|
|
967
1071
|
]);
|
|
968
1072
|
return documents.filter(Boolean);
|
|
969
1073
|
};
|
|
970
1074
|
const mapBusinessDetailsSchemaToLegalEntity = (data, accountHolder, isExperimentEnabled) => {
|
|
971
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q;
|
|
972
1075
|
const requestObj = {
|
|
973
1076
|
...formatObject(
|
|
974
1077
|
data,
|
|
975
1078
|
accountHolder === "mySoleProprietorName" ? solePropBusinessDetailsApiKeyMapping : businessDetailsApiKeyMapping
|
|
976
1079
|
)
|
|
977
1080
|
};
|
|
978
|
-
|
|
1081
|
+
delete requestObj.organization?.legalFormDescription;
|
|
979
1082
|
const taxData = COUNTRIES_USING_COMPANY_SEARCH.includes(
|
|
980
|
-
|
|
981
|
-
) ?
|
|
1083
|
+
data.basicInformation?.country
|
|
1084
|
+
) ? data.basicInformation?.taxInformation : data.additionalInformation?.taxInformation;
|
|
982
1085
|
const registrationNumber = COUNTRIES_USING_COMPANY_SEARCH.includes(
|
|
983
|
-
|
|
984
|
-
) ?
|
|
985
|
-
const
|
|
1086
|
+
data.basicInformation?.country
|
|
1087
|
+
) ? data.basicInformation?.registrationNumber : data.additionalInformation?.registrationNumber;
|
|
1088
|
+
const localization = processLocalizationFields(data.basicInformation);
|
|
1089
|
+
const doingBusinessAs = data.additionalInformation?.doingBusinessAs ?? "";
|
|
986
1090
|
const entityObject = isEmpty(data.companyStructure) ? requestObj.soleProprietorship : requestObj.organization;
|
|
987
1091
|
if (entityObject) {
|
|
988
1092
|
if (taxData) {
|
|
989
1093
|
entityObject.taxInformation = taxData;
|
|
990
1094
|
}
|
|
991
|
-
if (!!requestObj.soleProprietorship && !
|
|
1095
|
+
if (!!requestObj.soleProprietorship && !requestObj.soleProprietorship?.countryOfGoverningLaw && !!data.basicInformation?.country) {
|
|
992
1096
|
requestObj.soleProprietorship.countryOfGoverningLaw = data.basicInformation.country;
|
|
993
1097
|
}
|
|
994
1098
|
if (registrationNumber) {
|
|
@@ -997,168 +1101,86 @@ const mapBusinessDetailsSchemaToLegalEntity = (data, accountHolder, isExperiment
|
|
|
997
1101
|
requestObj.organization.registrationNumberAbsent = false;
|
|
998
1102
|
}
|
|
999
1103
|
}
|
|
1000
|
-
if (
|
|
1001
|
-
|
|
1104
|
+
if (localization) {
|
|
1105
|
+
entityObject.localization = localization;
|
|
1002
1106
|
}
|
|
1003
|
-
if (
|
|
1107
|
+
if (data.additionalInformation?.exemptedFromRegistrationNumber && isExperimentEnabled("EnableRegistrationAndTaxAbsentStatesV4") && requestObj.organization) {
|
|
1108
|
+
requestObj.organization.registrationNumberAbsent = data.additionalInformation?.exemptedFromRegistrationNumber;
|
|
1109
|
+
}
|
|
1110
|
+
if (data.additionalInformation?.vatAbsenceReason) {
|
|
1004
1111
|
entityObject.vatNumber = "";
|
|
1005
1112
|
}
|
|
1006
1113
|
if (isExperimentEnabled("EnableDoingBusinessAsNameV4")) {
|
|
1007
|
-
if (typeof
|
|
1008
|
-
entityObject.doingBusinessAsAbsent = !
|
|
1114
|
+
if (typeof data.additionalInformation?.hasDoingBusinessAs !== "undefined") {
|
|
1115
|
+
entityObject.doingBusinessAsAbsent = !data.additionalInformation?.hasDoingBusinessAs;
|
|
1009
1116
|
}
|
|
1010
1117
|
} else {
|
|
1011
|
-
entityObject.doingBusinessAs = doingBusinessAs ||
|
|
1118
|
+
entityObject.doingBusinessAs = doingBusinessAs || data.basicInformation?.legalCompanyName;
|
|
1012
1119
|
delete entityObject.doingBusinessAsAbsent;
|
|
1013
1120
|
}
|
|
1014
|
-
if (
|
|
1121
|
+
if (data.additionalInformation?.operationalAddressIsSame === operationalAddressIsSameIds.OPERATIONAL_ADDRESS_IS_SAME && entityObject.principalPlaceOfBusiness) {
|
|
1015
1122
|
entityObject.principalPlaceOfBusiness = entityObject.registeredAddress;
|
|
1016
1123
|
}
|
|
1017
1124
|
if (!isEmpty(data.companyFinancialInformation)) {
|
|
1125
|
+
const isIncorporationDateDependencyEnabled = isExperimentEnabled(
|
|
1126
|
+
"EnableIncorporationDateBasedFinancialValidationForHO"
|
|
1127
|
+
);
|
|
1018
1128
|
entityObject.financialReports = [
|
|
1019
|
-
mapFinancialInformationToFinancialReport(
|
|
1129
|
+
mapFinancialInformationToFinancialReport(
|
|
1130
|
+
data.companyFinancialInformation,
|
|
1131
|
+
isIncorporationDateDependencyEnabled ? data?.additionalInformation?.dateOfIncorporation : void 0
|
|
1132
|
+
)
|
|
1020
1133
|
];
|
|
1021
1134
|
}
|
|
1022
1135
|
}
|
|
1023
1136
|
requestObj.type = requestObj.organization ? LegalEntityType.ORGANIZATION : LegalEntityType.SOLE_PROPRIETORSHIP;
|
|
1024
|
-
if (
|
|
1137
|
+
if (entityObject?.registeredAddress.country === "US") {
|
|
1025
1138
|
delete entityObject.registrationNumber;
|
|
1026
1139
|
}
|
|
1027
1140
|
return requestObj;
|
|
1028
1141
|
};
|
|
1029
|
-
const
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
entityType: { rule: "businessRequiresCompanyType" },
|
|
1033
|
-
legalCompanyName: { rule: "REQUIRED" },
|
|
1034
|
-
hasDoingBusinessAs: { rule: "REQUIRED" },
|
|
1035
|
-
registrationAddress: { rule: "REQUIRED" },
|
|
1036
|
-
operationalAddressIsSame: { rule: "REQUIRED" },
|
|
1037
|
-
/* Base optional fields */
|
|
1038
|
-
operationalAddress: { rule: "OPTIONAL" },
|
|
1039
|
-
/* Fields with custom country specific rules */
|
|
1040
|
-
stockExchangeMIC: { rule: "ifPubliclyTradedCompany" },
|
|
1041
|
-
stockISIN: { rule: "ifPubliclyTradedCompany" },
|
|
1042
|
-
stockTickerSymbol: { rule: "ifPubliclyTradedCompany" },
|
|
1043
|
-
dateOfIncorporation: { rule: "countryRequiresDateOfIncorporationForCompanies" },
|
|
1044
|
-
stateOrProvince: { rule: "countryUsingCompanySearch" },
|
|
1045
|
-
registrationNumber: { rule: "countryRequiresRegistrationNumber" },
|
|
1046
|
-
exemptedFromRegistrationNumber: { rule: "companyRegistrationNumberExemptionAllowed" },
|
|
1047
|
-
eInvoicingCode: { rule: "isEInvoicingCodeEnabled" },
|
|
1048
|
-
countryOfGoverningLaw: { rule: "countryOfGoverningLawRequired" },
|
|
1049
|
-
taxDocument: { rule: "ifCountryUsAndTinFailed" }
|
|
1050
|
-
};
|
|
1051
|
-
const taxInformationBase = {
|
|
1052
|
-
vatNumber: { rule: "countryUsesVat" },
|
|
1053
|
-
exemptedFromVat: { rule: "countryUsesVat" },
|
|
1054
|
-
vatAbsenceReason: { rule: "countryUsesVat" },
|
|
1055
|
-
taxInformation: { rule: "countryUsesTaxId" },
|
|
1056
|
-
exemptedFromTax: { rule: "countryHasTaxExemptions" },
|
|
1057
|
-
isUen: { rule: "countryUsesUenOrGst" }
|
|
1058
|
-
};
|
|
1059
|
-
const financialInformationBase = {
|
|
1060
|
-
numberOfEmployees: { rule: "countryRequiresFinancialInformation" },
|
|
1061
|
-
financialReportingDate: { rule: "countryRequiresFinancialInformation" }
|
|
1062
|
-
};
|
|
1063
|
-
const businessDetailsFieldsPerScenario = {
|
|
1064
|
-
L0: {
|
|
1065
|
-
country: { rule: "REQUIRED" },
|
|
1066
|
-
legalCompanyName: { rule: "REQUIRED" },
|
|
1067
|
-
stateOrProvince: { rule: "countryUsingCompanySearch" },
|
|
1068
|
-
...financialInformationBase
|
|
1069
|
-
},
|
|
1070
|
-
L1: {
|
|
1071
|
-
...businessDetailsBase,
|
|
1072
|
-
...financialInformationBase
|
|
1073
|
-
},
|
|
1074
|
-
L: {
|
|
1075
|
-
...businessDetailsBase,
|
|
1076
|
-
...taxInformationBase,
|
|
1077
|
-
...financialInformationBase
|
|
1078
|
-
},
|
|
1079
|
-
L_PROOFOFADDRESS: {
|
|
1080
|
-
// TODO this field does not exist
|
|
1081
|
-
// proofOfAddressDocument: { rule: 'REQUIRED' },
|
|
1082
|
-
},
|
|
1083
|
-
L_REGDOC: {
|
|
1084
|
-
registrationDocument: { rule: "REQUIRED" }
|
|
1085
|
-
},
|
|
1086
|
-
L_TAXDOC: {
|
|
1087
|
-
taxDocument: { rule: "REQUIRED" }
|
|
1142
|
+
const processLocalizationFields = (data) => {
|
|
1143
|
+
if (!data) {
|
|
1144
|
+
return;
|
|
1088
1145
|
}
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
exemptedFromRegistrationNumber: { label: "doNotHaveLuRegistrationNumber" }
|
|
1118
|
-
},
|
|
1119
|
-
[CountryCodes.Malaysia]: {
|
|
1120
|
-
registrationDocument: { label: "companyProfile" }
|
|
1121
|
-
},
|
|
1122
|
-
[CountryCodes.Mexico]: {
|
|
1123
|
-
registrationDocument: { label: "RfcDocument" }
|
|
1124
|
-
},
|
|
1125
|
-
[CountryCodes.NewZealand]: {
|
|
1126
|
-
taxDocument: { label: "irdDocument" }
|
|
1127
|
-
},
|
|
1128
|
-
[CountryCodes.Poland]: {
|
|
1129
|
-
exemptedFromRegistrationNumber: { label: "doNotHaveRegonKrsNumber" }
|
|
1130
|
-
},
|
|
1131
|
-
[CountryCodes.PuertoRico]: {
|
|
1132
|
-
// exactly matches CountryCodes.UnitedStates, except `stateOrProvince`
|
|
1133
|
-
country: { label: "country__US__business" },
|
|
1134
|
-
exemptedFromTax: { label: "doNotHaveEIN" }
|
|
1135
|
-
},
|
|
1136
|
-
[CountryCodes.Singapore]: {
|
|
1137
|
-
registrationNumber: { label: "uen" },
|
|
1138
|
-
entityType: { label: "companyType" },
|
|
1139
|
-
isUen: { label: "iDoNotHaveGst" }
|
|
1140
|
-
},
|
|
1141
|
-
[CountryCodes.Sweden]: {
|
|
1142
|
-
exemptedFromRegistrationNumber: { label: "doNotHaveOrganisationsnummer" }
|
|
1143
|
-
},
|
|
1144
|
-
[CountryCodes.Switzerland]: {
|
|
1145
|
-
exemptedFromRegistrationNumber: { label: "doNotHaveChRegistrationNumber" }
|
|
1146
|
-
},
|
|
1147
|
-
[CountryCodes.UnitedStates]: {
|
|
1148
|
-
country: { label: "country__US__business" },
|
|
1149
|
-
stateOrProvince: { label: "stateOrProvince__US__business" },
|
|
1150
|
-
doingBusinessAs: { label: "doingBusinessAs" },
|
|
1151
|
-
exemptedFromTax: { label: "doNotHaveEIN" }
|
|
1146
|
+
const LOCALIZATION_FIELDS = {
|
|
1147
|
+
jaHaniLegalCompanyName: { script: "ja-Hani", fieldName: "legalName" },
|
|
1148
|
+
jaKanaLegalCompanyName: { script: "ja-Kana", fieldName: "legalName" }
|
|
1149
|
+
};
|
|
1150
|
+
const localization = {};
|
|
1151
|
+
Object.keys(LOCALIZATION_FIELDS).forEach((field) => {
|
|
1152
|
+
const basicInformationFieldSchemaField = field;
|
|
1153
|
+
if (data[basicInformationFieldSchemaField]) {
|
|
1154
|
+
const script = LOCALIZATION_FIELDS[basicInformationFieldSchemaField]?.script;
|
|
1155
|
+
const fieldName = LOCALIZATION_FIELDS[basicInformationFieldSchemaField]?.fieldName;
|
|
1156
|
+
if (script && localization[script]) {
|
|
1157
|
+
localization[script] = {
|
|
1158
|
+
fields: {
|
|
1159
|
+
...localization[script].fields,
|
|
1160
|
+
[fieldName]: data[basicInformationFieldSchemaField]
|
|
1161
|
+
}
|
|
1162
|
+
};
|
|
1163
|
+
} else if (script && !localization[script]) {
|
|
1164
|
+
localization[script] = {
|
|
1165
|
+
fields: {
|
|
1166
|
+
[fieldName]: data[basicInformationFieldSchemaField]
|
|
1167
|
+
}
|
|
1168
|
+
};
|
|
1169
|
+
}
|
|
1170
|
+
}
|
|
1171
|
+
});
|
|
1172
|
+
if (Object.keys(localization).length === 0) {
|
|
1173
|
+
return;
|
|
1152
1174
|
}
|
|
1175
|
+
return Object.keys(localization).map((script) => ({
|
|
1176
|
+
script,
|
|
1177
|
+
fields: { ...localization[script].fields }
|
|
1178
|
+
}));
|
|
1153
1179
|
};
|
|
1154
1180
|
const MANDATORY_FIELDS_BUSINESS_DETAILS = [
|
|
1155
1181
|
"basicInformation.legalCompanyName",
|
|
1156
1182
|
"basicInformation.country"
|
|
1157
1183
|
];
|
|
1158
|
-
const parseBusinessDetailsScenarios = (scenarios, country) => augmentWithCountryConfigs(
|
|
1159
|
-
businessDetailsCountryConfig[country],
|
|
1160
|
-
composePerScenarioFormConfigurations(scenarios, businessDetailsFieldsPerScenario)
|
|
1161
|
-
);
|
|
1162
1184
|
const canSubmit = (data) => MANDATORY_FIELDS_BUSINESS_DETAILS.every((detail) => {
|
|
1163
1185
|
const value = getProp(data, detail);
|
|
1164
1186
|
return !isEmpty$1(value);
|
|
@@ -1166,74 +1188,72 @@ const canSubmit = (data) => MANDATORY_FIELDS_BUSINESS_DETAILS.every((detail) =>
|
|
|
1166
1188
|
const isDocumentsRequired = (forms) => forms.some((form) => documentFormsIds.includes(form.formId));
|
|
1167
1189
|
const removeConditionalForms = (forms, isSkippingCompanyStructure) => isSkippingCompanyStructure ? forms.filter((f) => f.formId !== "companyStructure" && f.formId !== "companyType") : forms;
|
|
1168
1190
|
const formatBasicInformation = (data, labels, datasetUtils, companyType, isCountryOfGoverningLawEnabled) => {
|
|
1169
|
-
|
|
1170
|
-
const country = data == null ? void 0 : data.country;
|
|
1191
|
+
const country = data?.country;
|
|
1171
1192
|
const registrationNumberLabel = resolveFieldMetadata(
|
|
1172
|
-
|
|
1193
|
+
registrationNumberDefaultFieldConfig[country],
|
|
1173
1194
|
{
|
|
1174
1195
|
companyType,
|
|
1175
|
-
registrationNumberType: data.registrationNumber ? inferCompanyRegistrationNumberType(data
|
|
1196
|
+
registrationNumberType: data.registrationNumber ? inferCompanyRegistrationNumberType(data?.registrationNumber, country, companyType) : getCompanyRegistrationNumberOptions(country, companyType)?.[0]?.id
|
|
1176
1197
|
},
|
|
1177
|
-
|
|
1198
|
+
registrationNumberDefaultFieldMetadata
|
|
1178
1199
|
).label;
|
|
1179
1200
|
const taxIdLabel = resolveFieldMetadata(
|
|
1180
|
-
|
|
1201
|
+
taxInformationDefaultFieldConfig[country],
|
|
1181
1202
|
{
|
|
1182
1203
|
taxIdNumberType: countryToTaxInfoTypeMap[country] ?? void 0,
|
|
1183
1204
|
// TODO use type selector
|
|
1184
1205
|
companyType: void 0
|
|
1185
1206
|
},
|
|
1186
|
-
|
|
1207
|
+
taxInformationDefaultFieldMetadata
|
|
1187
1208
|
).label;
|
|
1188
1209
|
const countryOfGoverningLaw = getCountryOfGoverningLaw(isCountryOfGoverningLawEnabled, data);
|
|
1189
1210
|
return {
|
|
1190
|
-
[
|
|
1211
|
+
[labels?.basicInformation?.legalCompanyName ?? "legalCompanyName"]: data.legalCompanyName,
|
|
1191
1212
|
country: datasetUtils.getCountryName(data.country),
|
|
1192
1213
|
[getKeyForField("stateOrProvince", data.country)]: datasetUtils.getStateName(
|
|
1193
1214
|
data.stateOrProvince,
|
|
1194
1215
|
data.country
|
|
1195
1216
|
),
|
|
1196
|
-
[taxIdLabel]:
|
|
1217
|
+
[taxIdLabel]: data.taxInformation?.find((taxId) => data.country === taxId.country)?.number,
|
|
1197
1218
|
[registrationNumberLabel]: data.registrationNumber,
|
|
1198
1219
|
countryOfGoverningLaw: datasetUtils.getCountryName(countryOfGoverningLaw)
|
|
1199
1220
|
};
|
|
1200
1221
|
};
|
|
1201
1222
|
const formatAdditionalInformation = (data, labels, country, companyType, i18n) => {
|
|
1202
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l;
|
|
1203
1223
|
const registrationNumberLabel = resolveFieldMetadata(
|
|
1204
|
-
|
|
1224
|
+
registrationNumberDefaultFieldConfig[country],
|
|
1205
1225
|
{
|
|
1206
1226
|
companyType,
|
|
1207
|
-
registrationNumberType: data.registrationNumber ? inferCompanyRegistrationNumberType(data
|
|
1227
|
+
registrationNumberType: data.registrationNumber ? inferCompanyRegistrationNumberType(data?.registrationNumber, country, companyType) : getCompanyRegistrationNumberOptions(country, companyType)?.[0]?.id
|
|
1208
1228
|
},
|
|
1209
|
-
|
|
1229
|
+
registrationNumberDefaultFieldMetadata
|
|
1210
1230
|
).label;
|
|
1211
1231
|
const taxIdLabel = resolveFieldMetadata(
|
|
1212
|
-
|
|
1232
|
+
taxInformationDefaultFieldConfig[country],
|
|
1213
1233
|
{
|
|
1214
1234
|
taxIdNumberType: countryToTaxInfoTypeMap[country] ?? void 0,
|
|
1215
1235
|
// TODO use type selector
|
|
1216
1236
|
companyType: void 0
|
|
1217
1237
|
},
|
|
1218
|
-
|
|
1238
|
+
taxInformationDefaultFieldMetadata
|
|
1219
1239
|
).label;
|
|
1220
1240
|
return {
|
|
1221
|
-
[
|
|
1241
|
+
[labels?.additionalInformation?.legalForm ?? "businessStructure"]: data.legalFormLabel,
|
|
1242
|
+
[labels?.additionalInformation?.doingBusinessAs ?? "doingBusinessAs"]: data.doingBusinessAs,
|
|
1222
1243
|
[registrationNumberLabel]: data.registrationNumber,
|
|
1223
|
-
[taxIdLabel]: data.isUen ? void 0 :
|
|
1224
|
-
[
|
|
1225
|
-
[
|
|
1226
|
-
[
|
|
1227
|
-
[
|
|
1228
|
-
[
|
|
1229
|
-
[
|
|
1230
|
-
[
|
|
1244
|
+
[taxIdLabel]: data.isUen ? void 0 : data.taxInformation?.find((taxId) => country === taxId.country)?.number,
|
|
1245
|
+
[labels?.additionalInformation?.vatNumber ?? "vatNumber"]: data.vatNumber,
|
|
1246
|
+
[labels?.additionalInformation?.vatAbsenceReason ?? "vatAbsenceReason"]: data.vatAbsenceReason ? i18n.get(data.vatAbsenceReason) : void 0,
|
|
1247
|
+
[labels?.additionalInformation?.dateOfIncorporation ?? "dateOfIncorporation"]: data.dateOfIncorporation,
|
|
1248
|
+
[labels?.additionalInformation?.stockExchangeMIC ?? "stockExchangeMIC"]: data.stockExchangeMIC,
|
|
1249
|
+
[labels?.additionalInformation?.stockISIN ?? "stockISIN"]: data.stockISIN,
|
|
1250
|
+
[labels?.additionalInformation?.stockTickerSymbol ?? "stockTickerSymbol"]: data.stockTickerSymbol,
|
|
1251
|
+
[labels?.additionalInformation?.eInvoicingCode ?? "eInvoicingCode"]: data.eInvoicingCode
|
|
1231
1252
|
};
|
|
1232
1253
|
};
|
|
1233
1254
|
const formatDataForSummary = (data, forms, labels, i18n, isExperimentEnabled) => {
|
|
1234
1255
|
const datasetUtils = datasetUtilities(i18n.locale);
|
|
1235
1256
|
return entriesOf(data).reduce((summaryData, [form]) => {
|
|
1236
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o;
|
|
1237
1257
|
if (!form || !data[form]) return summaryData;
|
|
1238
1258
|
const isCountryOfGoverningLawEnabled = isExperimentEnabled(
|
|
1239
1259
|
"EnableCountryOfGoverningLawForUKCompanies"
|
|
@@ -1246,7 +1266,7 @@ const formatDataForSummary = (data, forms, labels, i18n, isExperimentEnabled) =>
|
|
|
1246
1266
|
data[form],
|
|
1247
1267
|
labels,
|
|
1248
1268
|
datasetUtils,
|
|
1249
|
-
|
|
1269
|
+
data.companyStructure?.entityType,
|
|
1250
1270
|
isCountryOfGoverningLawEnabled
|
|
1251
1271
|
)
|
|
1252
1272
|
};
|
|
@@ -1255,7 +1275,7 @@ const formatDataForSummary = (data, forms, labels, i18n, isExperimentEnabled) =>
|
|
|
1255
1275
|
...summaryData,
|
|
1256
1276
|
[form]: {
|
|
1257
1277
|
entityType: i18n.get(
|
|
1258
|
-
|
|
1278
|
+
companyTypeMetadata[data[form]?.entityType]?.name
|
|
1259
1279
|
)
|
|
1260
1280
|
}
|
|
1261
1281
|
};
|
|
@@ -1267,8 +1287,8 @@ const formatDataForSummary = (data, forms, labels, i18n, isExperimentEnabled) =>
|
|
|
1267
1287
|
additionalInformationFormName: formatAdditionalInformation(
|
|
1268
1288
|
data[form],
|
|
1269
1289
|
labels,
|
|
1270
|
-
|
|
1271
|
-
|
|
1290
|
+
data.basicInformation?.country,
|
|
1291
|
+
data.companyStructure?.entityType,
|
|
1272
1292
|
i18n
|
|
1273
1293
|
),
|
|
1274
1294
|
registrationAddress: mapAddressLabels(data[form].registrationAddress, datasetUtils),
|
|
@@ -1281,7 +1301,7 @@ const formatDataForSummary = (data, forms, labels, i18n, isExperimentEnabled) =>
|
|
|
1281
1301
|
...summaryData,
|
|
1282
1302
|
[form]: {
|
|
1283
1303
|
companyRegistrationDocument: {
|
|
1284
|
-
fileName:
|
|
1304
|
+
fileName: data[form].registrationDocument?.[0]?.name
|
|
1285
1305
|
}
|
|
1286
1306
|
}
|
|
1287
1307
|
};
|
|
@@ -1291,7 +1311,7 @@ const formatDataForSummary = (data, forms, labels, i18n, isExperimentEnabled) =>
|
|
|
1291
1311
|
...summaryData,
|
|
1292
1312
|
[form]: {
|
|
1293
1313
|
companyTaxDocument: {
|
|
1294
|
-
fileName:
|
|
1314
|
+
fileName: data[form].taxDocument?.[0]?.name
|
|
1295
1315
|
}
|
|
1296
1316
|
}
|
|
1297
1317
|
};
|
|
@@ -1301,7 +1321,7 @@ const formatDataForSummary = (data, forms, labels, i18n, isExperimentEnabled) =>
|
|
|
1301
1321
|
...summaryData,
|
|
1302
1322
|
[form]: {
|
|
1303
1323
|
companyProofOfDirectorDocument: {
|
|
1304
|
-
fileName:
|
|
1324
|
+
fileName: data[form].proofOfDirector?.[0]?.name
|
|
1305
1325
|
}
|
|
1306
1326
|
}
|
|
1307
1327
|
};
|
|
@@ -1311,7 +1331,7 @@ const formatDataForSummary = (data, forms, labels, i18n, isExperimentEnabled) =>
|
|
|
1311
1331
|
...summaryData,
|
|
1312
1332
|
[form]: {
|
|
1313
1333
|
companyProofOfSignatoryDocument: {
|
|
1314
|
-
fileName:
|
|
1334
|
+
fileName: data[form].proofOfSignatory?.[0]?.name
|
|
1315
1335
|
}
|
|
1316
1336
|
}
|
|
1317
1337
|
};
|
|
@@ -1321,19 +1341,24 @@ const formatDataForSummary = (data, forms, labels, i18n, isExperimentEnabled) =>
|
|
|
1321
1341
|
...summaryData,
|
|
1322
1342
|
[form]: {
|
|
1323
1343
|
companyProofOfOwnershipDocument: {
|
|
1324
|
-
fileName:
|
|
1344
|
+
fileName: data[form].proofOfOwnership?.map((doc) => doc.name).join("\n")
|
|
1325
1345
|
}
|
|
1326
1346
|
}
|
|
1327
1347
|
};
|
|
1328
|
-
case "companyFinancialInformation":
|
|
1348
|
+
case "companyFinancialInformation": {
|
|
1349
|
+
const isIncorporationDateDependencyEnabled = isExperimentEnabled(
|
|
1350
|
+
"EnableIncorporationDateBasedFinancialValidationForHO"
|
|
1351
|
+
);
|
|
1329
1352
|
return {
|
|
1330
1353
|
...summaryData,
|
|
1331
1354
|
[form]: formatFinancialInformationSummary(
|
|
1332
1355
|
data[form],
|
|
1333
1356
|
i18n,
|
|
1334
|
-
|
|
1357
|
+
data?.basicInformation?.country,
|
|
1358
|
+
isIncorporationDateDependencyEnabled ? data?.additionalInformation?.dateOfIncorporation : void 0
|
|
1335
1359
|
)
|
|
1336
1360
|
};
|
|
1361
|
+
}
|
|
1337
1362
|
default:
|
|
1338
1363
|
return summaryData;
|
|
1339
1364
|
}
|
|
@@ -1354,12 +1379,11 @@ async function submitDocuments({
|
|
|
1354
1379
|
if (formattedDocument) {
|
|
1355
1380
|
await documentUtils.uploadDocuments(formattedDocument, legalEntity.id);
|
|
1356
1381
|
formattedDocument.forEach((doc) => {
|
|
1357
|
-
|
|
1358
|
-
userEvents == null ? void 0 : userEvents.addTaskEvent("Success", {
|
|
1382
|
+
userEvents?.addTaskEvent("Success", {
|
|
1359
1383
|
...additionalTrackingParams,
|
|
1360
1384
|
actionType: "upload",
|
|
1361
1385
|
documentType: doc.type,
|
|
1362
|
-
fileExtention:
|
|
1386
|
+
fileExtention: doc.attachments?.map((item) => getFileExtention(item.pageName)).filter((item) => item !== void 0) ?? []
|
|
1363
1387
|
});
|
|
1364
1388
|
});
|
|
1365
1389
|
}
|
|
@@ -1395,17 +1419,16 @@ async function submit({
|
|
|
1395
1419
|
isExperimentEnabled,
|
|
1396
1420
|
userEvents
|
|
1397
1421
|
}) {
|
|
1398
|
-
var _a, _b, _c, _d, _e;
|
|
1399
1422
|
const logger = createLogger();
|
|
1400
1423
|
setLoadingStatus("loading");
|
|
1401
1424
|
const trackingPayload = {
|
|
1402
1425
|
...additionalTrackingParams,
|
|
1403
1426
|
actionType: "submit",
|
|
1404
|
-
companyStructure:
|
|
1405
|
-
countryOfRegistration:
|
|
1406
|
-
legalEntityName: accountHolder === "theCompanyIWorkFor" ?
|
|
1427
|
+
companyStructure: data.companyStructure?.entityType ?? null,
|
|
1428
|
+
countryOfRegistration: data.basicInformation?.country ?? null,
|
|
1429
|
+
legalEntityName: accountHolder === "theCompanyIWorkFor" ? data.basicInformation?.legalCompanyName ?? null : null,
|
|
1407
1430
|
// Only send legalCompanyName for organizations
|
|
1408
|
-
usedAdditionalAddress:
|
|
1431
|
+
usedAdditionalAddress: data.additionalInformation?.operationalAddressIsSame === operationalAddressIsSameIds.OPERATIONAL_ADDRESS_IS_NOT_SAME
|
|
1409
1432
|
};
|
|
1410
1433
|
const entityToUpdate = (() => {
|
|
1411
1434
|
switch (taskType) {
|
|
@@ -1420,12 +1443,12 @@ async function submit({
|
|
|
1420
1443
|
}
|
|
1421
1444
|
})();
|
|
1422
1445
|
const handleSubmitLegalEntity = async (legalEntity) => {
|
|
1423
|
-
if (taskType === TaskTypes.TRUST_MEMBER_COMPANY && !
|
|
1446
|
+
if (taskType === TaskTypes.TRUST_MEMBER_COMPANY && !nestedLegalEntity?.id || taskType === TaskTypes.UNINCORPORATED_PARTNERSHIP_MEMBER_COMPANY && !nestedLegalEntity?.id || taskType === TaskTypes.SOLE_PROPRIETOR_COMPANY && !associatedLegalArrangement?.id) {
|
|
1424
1447
|
return await createLegalEntity(legalEntity);
|
|
1425
1448
|
} else {
|
|
1426
1449
|
return handleUpdateLegalEntity({
|
|
1427
1450
|
...drop("type").from(legalEntity),
|
|
1428
|
-
id:
|
|
1451
|
+
id: entityToUpdate?.id ?? legalEntityResponse.id
|
|
1429
1452
|
});
|
|
1430
1453
|
}
|
|
1431
1454
|
};
|
|
@@ -1437,7 +1460,7 @@ async function submit({
|
|
|
1437
1460
|
if (nestedLegalEntityDetails2 && associatedLegalArrangement2) {
|
|
1438
1461
|
const existingEntityAssociations = getOwnEntityAssociations(associatedLegalArrangement2);
|
|
1439
1462
|
const existingRoles = existingEntityAssociations.filter((ea) => ea.legalEntityId === associatedLegalArrangement2.id).map(({ type }) => type);
|
|
1440
|
-
const newRoles =
|
|
1463
|
+
const newRoles = nestedLegalEntityDetails2?.roles ?? [];
|
|
1441
1464
|
const rolesChanged = !doArraysMatch(existingRoles, newRoles);
|
|
1442
1465
|
if (rolesChanged) {
|
|
1443
1466
|
const updatedAssociations = {
|
|
@@ -1469,7 +1492,7 @@ async function submit({
|
|
|
1469
1492
|
};
|
|
1470
1493
|
const savedLegalEntityData = legalEntityResponse ? mapLegalEntityToBusinessDetailsSchema(legalEntityResponse) : null;
|
|
1471
1494
|
const filteredData = savedLegalEntityData ? setRemovedFieldsOnSchemaToDeletedValue(data, savedLegalEntityData) : data;
|
|
1472
|
-
if (
|
|
1495
|
+
if (filteredData?.additionalInformation && !filteredData?.additionalInformation?.taxInformation) {
|
|
1473
1496
|
filteredData.additionalInformation.taxInformation = void 0;
|
|
1474
1497
|
}
|
|
1475
1498
|
const isCountryOfGoverningLawEnabled = isExperimentEnabled(
|
|
@@ -1477,9 +1500,9 @@ async function submit({
|
|
|
1477
1500
|
);
|
|
1478
1501
|
const countryOfGoverningLaw = getCountryOfGoverningLaw(
|
|
1479
1502
|
isCountryOfGoverningLawEnabled,
|
|
1480
|
-
filteredData
|
|
1503
|
+
filteredData?.basicInformation
|
|
1481
1504
|
);
|
|
1482
|
-
if (filteredData
|
|
1505
|
+
if (filteredData?.basicInformation) {
|
|
1483
1506
|
if (countryOfGoverningLaw) {
|
|
1484
1507
|
filteredData.basicInformation.countryOfGoverningLaw = countryOfGoverningLaw;
|
|
1485
1508
|
} else {
|
|
@@ -1496,7 +1519,7 @@ async function submit({
|
|
|
1496
1519
|
)
|
|
1497
1520
|
};
|
|
1498
1521
|
const legalEntity = await handleSubmitLegalEntity(mappedLegalEntity);
|
|
1499
|
-
if (taskType === TaskTypes.TRUST_MEMBER_COMPANY || taskType === TaskTypes.UNINCORPORATED_PARTNERSHIP_MEMBER_COMPANY || taskType === TaskTypes.SOLE_PROPRIETOR_COMPANY && !
|
|
1522
|
+
if (taskType === TaskTypes.TRUST_MEMBER_COMPANY || taskType === TaskTypes.UNINCORPORATED_PARTNERSHIP_MEMBER_COMPANY || taskType === TaskTypes.SOLE_PROPRIETOR_COMPANY && !associatedLegalArrangement?.id) {
|
|
1500
1523
|
await associateLegalEntityWithParent({
|
|
1501
1524
|
legalEntity,
|
|
1502
1525
|
associatedLegalArrangement,
|
|
@@ -1511,9 +1534,9 @@ async function submit({
|
|
|
1511
1534
|
forms,
|
|
1512
1535
|
userEvents
|
|
1513
1536
|
});
|
|
1514
|
-
userEvents
|
|
1537
|
+
userEvents?.addTaskEvent("Success", trackingPayload);
|
|
1515
1538
|
showToast({ label: i18n.get("successfullyUpdatedDetails"), variant: "success" });
|
|
1516
|
-
onExternalSubmit
|
|
1539
|
+
onExternalSubmit?.(data);
|
|
1517
1540
|
} catch (err) {
|
|
1518
1541
|
if (isValidationError(err)) {
|
|
1519
1542
|
setProblems({
|
|
@@ -1532,23 +1555,23 @@ async function submit({
|
|
|
1532
1555
|
showToast({ label: i18n.get("failedToUpdateDetails"), variant: "error" });
|
|
1533
1556
|
}
|
|
1534
1557
|
logger.error(err);
|
|
1535
|
-
userEvents
|
|
1558
|
+
userEvents?.addTaskEvent("Encountered error", {
|
|
1536
1559
|
...trackingPayload,
|
|
1537
|
-
returnType: err
|
|
1538
|
-
returnValue:
|
|
1560
|
+
returnType: err?.errorCode,
|
|
1561
|
+
returnValue: err?.title || "backend"
|
|
1539
1562
|
});
|
|
1540
1563
|
} finally {
|
|
1541
1564
|
setLoadingStatus("success");
|
|
1542
1565
|
}
|
|
1543
1566
|
}
|
|
1544
1567
|
const getCountryOfGoverningLaw = (isCountryOfGoverningLawEnabled, basicData) => {
|
|
1545
|
-
if (!isCountryOfGoverningLawEnabled ||
|
|
1568
|
+
if (!isCountryOfGoverningLawEnabled || basicData?.country !== CountryCodes.UnitedKingdom) {
|
|
1546
1569
|
return void 0;
|
|
1547
1570
|
}
|
|
1548
|
-
if (isCountryOfGoverningLawEnabled &&
|
|
1571
|
+
if (isCountryOfGoverningLawEnabled && basicData?.country === CountryCodes.UnitedKingdom && !basicData?.countryOfGoverningLaw) {
|
|
1549
1572
|
return CountryCodes.UnitedKingdom;
|
|
1550
1573
|
}
|
|
1551
|
-
return basicData
|
|
1574
|
+
return basicData?.countryOfGoverningLaw;
|
|
1552
1575
|
};
|
|
1553
1576
|
function BusinessDetailsDropin({
|
|
1554
1577
|
country,
|
|
@@ -1567,7 +1590,6 @@ function BusinessDetailsDropin({
|
|
|
1567
1590
|
onSubmit: onExternalSubmit,
|
|
1568
1591
|
handleHomeClick
|
|
1569
1592
|
}) {
|
|
1570
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t;
|
|
1571
1593
|
const formRef = useRef(null);
|
|
1572
1594
|
const { accountHolder, setAccountHolder } = useAccountHolder();
|
|
1573
1595
|
const { showToast } = useToastContext();
|
|
@@ -1582,23 +1604,21 @@ function BusinessDetailsDropin({
|
|
|
1582
1604
|
state: { currentState }
|
|
1583
1605
|
} = useStateContext();
|
|
1584
1606
|
useEffect(() => {
|
|
1585
|
-
onChange
|
|
1607
|
+
onChange?.(currentState);
|
|
1586
1608
|
}, [currentState, onChange]);
|
|
1587
1609
|
const isSoleProp = accountHolder === "mySoleProprietorName";
|
|
1588
1610
|
const formWith2Views = "basicInformation";
|
|
1589
1611
|
const isAssociationTaskType = !taskType ? accountHolder !== "theCompanyIWorkFor" : taskType !== TaskTypes.BUSINESS_DETAILS;
|
|
1590
1612
|
const legalEntityType = !isSoleProp ? LegalEntityType.ORGANIZATION : LegalEntityType.SOLE_PROPRIETORSHIP;
|
|
1591
1613
|
const isUS = country === CountryCodes.UnitedStates;
|
|
1592
|
-
const currentCountry =
|
|
1614
|
+
const currentCountry = currentState.data.basicInformation?.country ?? country;
|
|
1593
1615
|
const isSkippingCompanyStructure = isSettingEnabled(SettingNames.AllowLegalEntityTypeChange) && organizationTypesToSkipCompanyStructureForm.includes(
|
|
1594
|
-
|
|
1616
|
+
legalEntityResponse?.organization?.type
|
|
1595
1617
|
) && accountHolder !== "aTrust" || isSoleProp;
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
const isBankAccountRequested = (_d = (_c = legalEntityResponse == null ? void 0 : legalEntityResponse.capabilities) == null ? void 0 : _c.issueBankAccount) == null ? void 0 : _d.requested;
|
|
1618
|
+
useEffect(() => {
|
|
1619
|
+
const isBankAccountRequested = legalEntityResponse?.capabilities?.issueBankAccount?.requested;
|
|
1599
1620
|
setIsBankAccountRequestedForOrganization(isBankAccountRequested);
|
|
1600
|
-
|
|
1601
|
-
}
|
|
1621
|
+
}, [legalEntityResponse]);
|
|
1602
1622
|
const subjectEntity = !isAssociationTaskType ? legalEntityResponse : isSoleProp ? associatedLegalArrangement : nestedLegalEntity;
|
|
1603
1623
|
const associatedLeTrackingParams = getAssociatedLeAnalyticsPayload({
|
|
1604
1624
|
associatedLegalEntity: associatedLegalArrangement
|
|
@@ -1607,6 +1627,10 @@ function BusinessDetailsDropin({
|
|
|
1607
1627
|
userEvents.updateBaseTrackingPayload({ task: taskType });
|
|
1608
1628
|
userEvents.addTaskEvent("Landed on page", {
|
|
1609
1629
|
actionType: "start",
|
|
1630
|
+
...subjectEntity?.id && subjectEntity?.type && {
|
|
1631
|
+
legalEntityId: subjectEntity.id,
|
|
1632
|
+
entityType: subjectEntity.type
|
|
1633
|
+
},
|
|
1610
1634
|
...associatedLeTrackingParams
|
|
1611
1635
|
});
|
|
1612
1636
|
}, []);
|
|
@@ -1617,9 +1641,9 @@ function BusinessDetailsDropin({
|
|
|
1617
1641
|
isSoleProp ? legalEntityResponse : void 0
|
|
1618
1642
|
);
|
|
1619
1643
|
});
|
|
1620
|
-
const [trustedFields, setTrustedFields] = useState(
|
|
1644
|
+
const [trustedFields, setTrustedFields] = useState(subjectEntity?.trustedFields ?? void 0);
|
|
1621
1645
|
const [currentProblems, setCurrentProblems] = useState(
|
|
1622
|
-
problems ??
|
|
1646
|
+
problems ?? getCapabilityProblems(legalEntityResponse, currentCountry)?.LegalEntity?.[legalEntityResponse.id]
|
|
1623
1647
|
);
|
|
1624
1648
|
const [showCompanyStructure, setShowCompanyStructure] = useState(
|
|
1625
1649
|
currentCountry !== "US" && !isSoleProp
|
|
@@ -1639,8 +1663,7 @@ function BusinessDetailsDropin({
|
|
|
1639
1663
|
rootLegalEntityId: rootLegalEntityId.value
|
|
1640
1664
|
});
|
|
1641
1665
|
useEffect(() => {
|
|
1642
|
-
|
|
1643
|
-
if (!((_a2 = subjectEntity == null ? void 0 : subjectEntity.documentDetails) == null ? void 0 : _a2.length)) return;
|
|
1666
|
+
if (!subjectEntity?.documentDetails?.length) return;
|
|
1644
1667
|
documentUtils.fetchDocuments(subjectEntity.documentDetails, subjectEntity.id).then(() => {
|
|
1645
1668
|
setInitialData(
|
|
1646
1669
|
mapLegalEntityToBusinessDetailsSchema(
|
|
@@ -1653,7 +1676,7 @@ function BusinessDetailsDropin({
|
|
|
1653
1676
|
);
|
|
1654
1677
|
}, []);
|
|
1655
1678
|
const parseConfiguration = useCallback(
|
|
1656
|
-
({ scenarios
|
|
1679
|
+
({ scenarios }) => composePerScenarioFormConfigurations(scenarios, businessDetailsFieldsPerScenario),
|
|
1657
1680
|
[]
|
|
1658
1681
|
);
|
|
1659
1682
|
const {
|
|
@@ -1689,8 +1712,8 @@ function BusinessDetailsDropin({
|
|
|
1689
1712
|
() => getPropsFromConfigurations(
|
|
1690
1713
|
fieldConfigurations,
|
|
1691
1714
|
initialForms,
|
|
1692
|
-
|
|
1693
|
-
|
|
1715
|
+
currentProblems?.remediationActions ? Object.values(currentProblems?.remediationActions) : [],
|
|
1716
|
+
currentProblems?.missingData ?? [],
|
|
1694
1717
|
subjectEntity ? subjectEntity.type === LegalEntityType.SOLE_PROPRIETORSHIP ? getFieldsWithExistingData(
|
|
1695
1718
|
subjectEntity,
|
|
1696
1719
|
solePropBusinessDetailsApiKeyMapping,
|
|
@@ -1703,14 +1726,14 @@ function BusinessDetailsDropin({
|
|
|
1703
1726
|
customRules,
|
|
1704
1727
|
{},
|
|
1705
1728
|
{},
|
|
1706
|
-
subjectEntity
|
|
1729
|
+
subjectEntity?.type,
|
|
1707
1730
|
trustedFields
|
|
1708
1731
|
),
|
|
1709
1732
|
[
|
|
1710
1733
|
fieldConfigurations,
|
|
1711
1734
|
initialForms,
|
|
1712
|
-
currentProblems
|
|
1713
|
-
currentProblems
|
|
1735
|
+
currentProblems?.remediationActions,
|
|
1736
|
+
currentProblems?.missingData,
|
|
1714
1737
|
subjectEntity,
|
|
1715
1738
|
customRules,
|
|
1716
1739
|
trustedFields
|
|
@@ -1731,37 +1754,47 @@ function BusinessDetailsDropin({
|
|
|
1731
1754
|
enabled: showBusinessSelection
|
|
1732
1755
|
}
|
|
1733
1756
|
);
|
|
1734
|
-
const companySearchResults = companySearchResponse
|
|
1735
|
-
const businessName =
|
|
1736
|
-
const nameMatch = isNormalizedStringMatch(businessName,
|
|
1737
|
-
const taxInformation =
|
|
1738
|
-
const tin =
|
|
1757
|
+
const companySearchResults = companySearchResponse?.results;
|
|
1758
|
+
const businessName = currentState?.data?.basicInformation?.legalCompanyName || "";
|
|
1759
|
+
const nameMatch = isNormalizedStringMatch(businessName, companySearchResults?.[0]?.name ?? "");
|
|
1760
|
+
const taxInformation = currentState?.data?.basicInformation?.taxInformation;
|
|
1761
|
+
const tin = taxInformation?.find((taxId) => currentCountry === taxId.country)?.number || "";
|
|
1739
1762
|
const [prevCompanySearchResults, setPrevCompanySearchResults] = useState(companySearchResults);
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1763
|
+
useEffect(() => {
|
|
1764
|
+
if (!searchingCompanies && companySearchResults) {
|
|
1765
|
+
userEvents.addPageEvent("Success", {
|
|
1766
|
+
actionType: "submit",
|
|
1767
|
+
label: "companySearch",
|
|
1768
|
+
additionalData: {
|
|
1769
|
+
numberOfResults: companySearchResults.length
|
|
1770
|
+
},
|
|
1771
|
+
...subjectEntity?.id && subjectEntity?.type && {
|
|
1772
|
+
legalEntityId: subjectEntity.id,
|
|
1773
|
+
entityType: subjectEntity.type
|
|
1774
|
+
},
|
|
1775
|
+
...associatedLeTrackingParams
|
|
1776
|
+
});
|
|
1744
1777
|
}
|
|
1745
|
-
|
|
1778
|
+
}, [
|
|
1779
|
+
searchingCompanies,
|
|
1780
|
+
companySearchResults,
|
|
1781
|
+
userEvents,
|
|
1782
|
+
subjectEntity,
|
|
1783
|
+
associatedLeTrackingParams
|
|
1784
|
+
]);
|
|
1746
1785
|
const {
|
|
1747
|
-
data:
|
|
1748
|
-
isLoading:
|
|
1749
|
-
refetch:
|
|
1750
|
-
} =
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
},
|
|
1755
|
-
/** With a single result that DOES match the user-provided name, we attempt TIN verification after dataset retrieval */
|
|
1756
|
-
{
|
|
1757
|
-
enabled: !!singleCompanyDatasetResponse && showBusinessSelection
|
|
1758
|
-
}
|
|
1759
|
-
);
|
|
1786
|
+
data: singleCompanyDatasetAndTinResponse,
|
|
1787
|
+
isLoading: fetchingDataset,
|
|
1788
|
+
refetch: getCompanySelection
|
|
1789
|
+
} = useCompanySelection(singleCompanyDatasetParams, {
|
|
1790
|
+
enabled: !!singleCompanyDatasetParams && showBusinessSelection
|
|
1791
|
+
});
|
|
1792
|
+
const { refetch: fetchTin } = useVerifyTin({ name: businessName, tin }, { enabled: false });
|
|
1760
1793
|
const forms = useMemo(() => {
|
|
1761
1794
|
const requiredForms = getRequiredForms(
|
|
1762
1795
|
initialForms,
|
|
1763
|
-
derivedProps
|
|
1764
|
-
derivedProps
|
|
1796
|
+
derivedProps?.requiredFields,
|
|
1797
|
+
derivedProps?.optionalFields
|
|
1765
1798
|
);
|
|
1766
1799
|
const validityAddedForms = addValidityToForms(
|
|
1767
1800
|
requiredForms,
|
|
@@ -1774,8 +1807,8 @@ function BusinessDetailsDropin({
|
|
|
1774
1807
|
);
|
|
1775
1808
|
}, [
|
|
1776
1809
|
initialForms,
|
|
1777
|
-
derivedProps
|
|
1778
|
-
derivedProps
|
|
1810
|
+
derivedProps?.requiredFields,
|
|
1811
|
+
derivedProps?.optionalFields,
|
|
1779
1812
|
currentState.validityByForm,
|
|
1780
1813
|
currentProblems,
|
|
1781
1814
|
currentCountry,
|
|
@@ -1787,7 +1820,7 @@ function BusinessDetailsDropin({
|
|
|
1787
1820
|
data: formatDataForSummary(
|
|
1788
1821
|
currentState.data,
|
|
1789
1822
|
forms,
|
|
1790
|
-
derivedProps
|
|
1823
|
+
derivedProps?.labels,
|
|
1791
1824
|
i18n,
|
|
1792
1825
|
isExperimentEnabled
|
|
1793
1826
|
),
|
|
@@ -1795,7 +1828,7 @@ function BusinessDetailsDropin({
|
|
|
1795
1828
|
keys: ["operationalAddressIsSame"]
|
|
1796
1829
|
}
|
|
1797
1830
|
}),
|
|
1798
|
-
[currentState.data, derivedProps
|
|
1831
|
+
[currentState.data, derivedProps?.labels, forms, i18n, isExperimentEnabled]
|
|
1799
1832
|
);
|
|
1800
1833
|
const canSubmitForm = useMemo(
|
|
1801
1834
|
() => canSubmit(currentState.data) && hasDataChanged(initialData, currentState.data),
|
|
@@ -1863,7 +1896,7 @@ function BusinessDetailsDropin({
|
|
|
1863
1896
|
forms,
|
|
1864
1897
|
onSubmit: submitTask
|
|
1865
1898
|
});
|
|
1866
|
-
const loading = fetchingDataset ||
|
|
1899
|
+
const loading = fetchingDataset || searchingCompanies || resettingTrustedData;
|
|
1867
1900
|
const proceedToManualDataEntry = useCallback(async () => {
|
|
1868
1901
|
await clearCompanyData2().then(async () => {
|
|
1869
1902
|
if (!isUS) {
|
|
@@ -1875,18 +1908,19 @@ function BusinessDetailsDropin({
|
|
|
1875
1908
|
return;
|
|
1876
1909
|
}
|
|
1877
1910
|
const { data: refetchedTinResponse } = await fetchTin();
|
|
1878
|
-
if (
|
|
1911
|
+
if (refetchedTinResponse?.matched === true) {
|
|
1879
1912
|
setShowCompanyStructure(true);
|
|
1880
1913
|
setBusinessMismatchModalOpen(false);
|
|
1881
1914
|
} else {
|
|
1882
1915
|
setBusinessMismatchModalOpen(true);
|
|
1883
1916
|
setTinMatched(false);
|
|
1884
|
-
if (
|
|
1885
|
-
userEvents.
|
|
1886
|
-
actionType: "
|
|
1917
|
+
if (subjectEntity?.id && subjectEntity?.type) {
|
|
1918
|
+
userEvents.addPageEvent("Encountered error", {
|
|
1919
|
+
actionType: "submit",
|
|
1887
1920
|
label: "tinVerificationFailure",
|
|
1888
1921
|
legalEntityId: subjectEntity.id,
|
|
1889
|
-
entityType: subjectEntity.type
|
|
1922
|
+
entityType: subjectEntity.type,
|
|
1923
|
+
...associatedLeTrackingParams
|
|
1890
1924
|
});
|
|
1891
1925
|
}
|
|
1892
1926
|
}
|
|
@@ -1896,25 +1930,43 @@ function BusinessDetailsDropin({
|
|
|
1896
1930
|
isUS,
|
|
1897
1931
|
businessName,
|
|
1898
1932
|
tin,
|
|
1899
|
-
|
|
1900
|
-
subjectEntity
|
|
1901
|
-
subjectEntity
|
|
1933
|
+
getCompanySelection,
|
|
1934
|
+
subjectEntity?.id,
|
|
1935
|
+
subjectEntity?.type,
|
|
1936
|
+
associatedLeTrackingParams,
|
|
1902
1937
|
userEvents
|
|
1903
1938
|
]);
|
|
1904
1939
|
if (prevCompanySearchResults !== companySearchResults) {
|
|
1905
|
-
if (
|
|
1940
|
+
if (companySearchResults?.length === 1 && nameMatch) {
|
|
1906
1941
|
setSingleCompanyDatasetParams({
|
|
1907
1942
|
company: companySearchResults[0],
|
|
1908
|
-
state:
|
|
1943
|
+
state: currentState.data.basicInformation?.stateOrProvince,
|
|
1944
|
+
name: businessName,
|
|
1945
|
+
tin
|
|
1909
1946
|
});
|
|
1910
|
-
|
|
1911
|
-
handleNextClick();
|
|
1912
|
-
}
|
|
1913
|
-
} else if ((companySearchResults == null ? void 0 : companySearchResults.length) === 0 && !searchingCompanies && showBusinessSelection || searchingError) {
|
|
1947
|
+
} else if (companySearchResults?.length === 0 && !searchingCompanies && showBusinessSelection) {
|
|
1914
1948
|
proceedToManualDataEntry();
|
|
1915
1949
|
}
|
|
1916
1950
|
setPrevCompanySearchResults(companySearchResults);
|
|
1917
1951
|
}
|
|
1952
|
+
const [prevSingleCompanyDatasetResponse, setPrevSingleCompanyDatasetResponse] = useState(
|
|
1953
|
+
singleCompanyDatasetAndTinResponse
|
|
1954
|
+
);
|
|
1955
|
+
if (prevSingleCompanyDatasetResponse !== singleCompanyDatasetAndTinResponse) {
|
|
1956
|
+
if (singleCompanyDatasetAndTinResponse?.tinMatched === true) {
|
|
1957
|
+
setVerifiedBusiness(singleCompanyDatasetAndTinResponse);
|
|
1958
|
+
handleNextClick();
|
|
1959
|
+
} else {
|
|
1960
|
+
setBusinessMismatchModalOpen(true);
|
|
1961
|
+
setTinMatched(false);
|
|
1962
|
+
}
|
|
1963
|
+
setPrevSingleCompanyDatasetResponse(singleCompanyDatasetAndTinResponse);
|
|
1964
|
+
}
|
|
1965
|
+
useEffect(() => {
|
|
1966
|
+
if (searchingError) {
|
|
1967
|
+
proceedToManualDataEntry();
|
|
1968
|
+
}
|
|
1969
|
+
}, [searchingError]);
|
|
1918
1970
|
const isBusinessSelection = showBusinessSelection && activeForm.formId === formWith2Views;
|
|
1919
1971
|
const hideFooter = isBusinessSelection === true && loading;
|
|
1920
1972
|
const hideNextButton = activeForm.formId === formWith2Views ? isBusinessSelection : false;
|
|
@@ -1927,7 +1979,7 @@ function BusinessDetailsDropin({
|
|
|
1927
1979
|
const selectedFormId = forms[index].formId;
|
|
1928
1980
|
if (selectedFormId === formWith2Views) {
|
|
1929
1981
|
if (verifiedBusiness$1) setShowBusinessSelection(false);
|
|
1930
|
-
if (activeForm.formId === "companyStructure" &&
|
|
1982
|
+
if (activeForm.formId === "companyStructure" && companySearchResults?.length) {
|
|
1931
1983
|
setShowCompanyStructure(false);
|
|
1932
1984
|
}
|
|
1933
1985
|
return gotoFormByFormIndex(index);
|
|
@@ -1945,28 +1997,19 @@ function BusinessDetailsDropin({
|
|
|
1945
1997
|
gotoFormByFormIndex,
|
|
1946
1998
|
verifiedBusiness$1,
|
|
1947
1999
|
activeForm.formId,
|
|
1948
|
-
companySearchResults
|
|
2000
|
+
companySearchResults?.length,
|
|
1949
2001
|
isBusinessSelection
|
|
1950
2002
|
]
|
|
1951
2003
|
);
|
|
1952
2004
|
const nextClick = useCallback(() => {
|
|
1953
|
-
|
|
1954
|
-
if (!COUNTRIES_USING_COMPANY_SEARCH.includes(currentCountry) || isSoleProp)
|
|
2005
|
+
if (!COUNTRIES_USING_COMPANY_SEARCH.includes(currentCountry) || accountHolder !== "theCompanyIWorkFor")
|
|
1955
2006
|
return handleNextClick();
|
|
1956
|
-
|
|
1957
|
-
if (activeForm.formId === formWith2Views && ((_b2 = currentState.validityByForm) == null ? void 0 : _b2.basicInformation) && !isBusinessSelection && !verifiedBusiness$1) {
|
|
1958
|
-
trackNavigation({
|
|
1959
|
-
userEvents,
|
|
1960
|
-
actionType: "next",
|
|
1961
|
-
toForm: toFormName || "home",
|
|
1962
|
-
label: "next",
|
|
1963
|
-
returnValue: "success"
|
|
1964
|
-
});
|
|
2007
|
+
if (activeForm.formId === formWith2Views && currentState.validityByForm?.basicInformation && !isBusinessSelection && !verifiedBusiness$1) {
|
|
1965
2008
|
setCompanySearchParams({
|
|
1966
|
-
legalCompanyName:
|
|
1967
|
-
country:
|
|
1968
|
-
stateOrProvince:
|
|
1969
|
-
registrationNumber:
|
|
2009
|
+
legalCompanyName: currentState?.data?.basicInformation?.legalCompanyName ?? "",
|
|
2010
|
+
country: currentState?.data.basicInformation?.country ?? country,
|
|
2011
|
+
stateOrProvince: currentState?.data.basicInformation?.stateOrProvince,
|
|
2012
|
+
registrationNumber: currentState?.data.basicInformation?.registrationNumber
|
|
1970
2013
|
});
|
|
1971
2014
|
setShowBusinessSelection(true);
|
|
1972
2015
|
} else {
|
|
@@ -1976,29 +2019,21 @@ function BusinessDetailsDropin({
|
|
|
1976
2019
|
currentCountry,
|
|
1977
2020
|
isSoleProp,
|
|
1978
2021
|
handleNextClick,
|
|
1979
|
-
forms,
|
|
1980
2022
|
activeForm.formId,
|
|
1981
|
-
|
|
1982
|
-
|
|
1983
|
-
|
|
1984
|
-
|
|
1985
|
-
|
|
2023
|
+
currentState.validityByForm?.basicInformation,
|
|
2024
|
+
currentState?.data.basicInformation?.legalCompanyName,
|
|
2025
|
+
currentState?.data.basicInformation?.country,
|
|
2026
|
+
currentState?.data.basicInformation?.stateOrProvince,
|
|
2027
|
+
currentState?.data.basicInformation?.registrationNumber,
|
|
1986
2028
|
isBusinessSelection,
|
|
1987
2029
|
verifiedBusiness$1,
|
|
1988
|
-
userEvents,
|
|
1989
2030
|
country
|
|
1990
2031
|
]);
|
|
1991
2032
|
const backClick = useCallback(() => {
|
|
1992
|
-
if (!COUNTRIES_USING_COMPANY_SEARCH.includes(currentCountry)) handleBackClick
|
|
2033
|
+
if (!COUNTRIES_USING_COMPANY_SEARCH.includes(currentCountry)) handleBackClick?.();
|
|
1993
2034
|
else {
|
|
1994
2035
|
switch (activeForm.formId) {
|
|
1995
2036
|
case formWith2Views: {
|
|
1996
|
-
trackNavigation({
|
|
1997
|
-
userEvents,
|
|
1998
|
-
actionType: "back",
|
|
1999
|
-
toForm: "basicDetails",
|
|
2000
|
-
label: "back"
|
|
2001
|
-
});
|
|
2002
2037
|
if (showBusinessSelection) setShowBusinessSelection(false);
|
|
2003
2038
|
break;
|
|
2004
2039
|
}
|
|
@@ -2006,22 +2041,22 @@ function BusinessDetailsDropin({
|
|
|
2006
2041
|
if (searchingError) {
|
|
2007
2042
|
setShowBusinessSelection(false);
|
|
2008
2043
|
setShowCompanyStructure(false);
|
|
2009
|
-
handleBackClick
|
|
2044
|
+
handleBackClick?.();
|
|
2010
2045
|
break;
|
|
2011
2046
|
}
|
|
2012
2047
|
if (!searchingCompanies && companySearchResults && !companySearchResults.length) {
|
|
2013
2048
|
setShowBusinessSelection(false);
|
|
2014
2049
|
} else if (!verifiedBusiness$1) setShowCompanyStructure(false);
|
|
2015
|
-
handleBackClick
|
|
2050
|
+
handleBackClick?.();
|
|
2016
2051
|
break;
|
|
2017
2052
|
}
|
|
2018
2053
|
case "additionalInformation": {
|
|
2019
2054
|
if (verifiedBusiness$1) setShowBusinessSelection(false);
|
|
2020
|
-
handleBackClick
|
|
2055
|
+
handleBackClick?.();
|
|
2021
2056
|
break;
|
|
2022
2057
|
}
|
|
2023
2058
|
default:
|
|
2024
|
-
handleBackClick
|
|
2059
|
+
handleBackClick?.();
|
|
2025
2060
|
break;
|
|
2026
2061
|
}
|
|
2027
2062
|
}
|
|
@@ -2029,7 +2064,6 @@ function BusinessDetailsDropin({
|
|
|
2029
2064
|
currentCountry,
|
|
2030
2065
|
handleBackClick,
|
|
2031
2066
|
activeForm.formId,
|
|
2032
|
-
userEvents,
|
|
2033
2067
|
showBusinessSelection,
|
|
2034
2068
|
searchingError,
|
|
2035
2069
|
searchingCompanies,
|
|
@@ -2037,35 +2071,17 @@ function BusinessDetailsDropin({
|
|
|
2037
2071
|
verifiedBusiness$1
|
|
2038
2072
|
]);
|
|
2039
2073
|
const homeClick = () => {
|
|
2040
|
-
|
|
2041
|
-
userEvents,
|
|
2042
|
-
actionType: "save",
|
|
2043
|
-
toForm: "home",
|
|
2044
|
-
label: "home"
|
|
2045
|
-
});
|
|
2046
|
-
handleHomeClick == null ? void 0 : handleHomeClick();
|
|
2074
|
+
handleHomeClick?.();
|
|
2047
2075
|
};
|
|
2048
2076
|
const handleBusinessMismatchContinue = useCallback(() => {
|
|
2049
2077
|
setShowCompanyStructure(true);
|
|
2050
2078
|
setTrustedFields([]);
|
|
2051
2079
|
setBusinessMismatchModalOpen(false);
|
|
2052
|
-
trackNavigation({
|
|
2053
|
-
userEvents,
|
|
2054
|
-
actionType: "next",
|
|
2055
|
-
toForm: "additionalInformationFormName",
|
|
2056
|
-
label: "TIN Continue Anyways"
|
|
2057
|
-
});
|
|
2058
2080
|
}, [setShowCompanyStructure, setTrustedFields, setBusinessMismatchModalOpen]);
|
|
2059
2081
|
const handleBusinessMismatchCancel = useCallback(() => {
|
|
2060
|
-
backClick
|
|
2082
|
+
backClick?.();
|
|
2061
2083
|
setBusinessMismatchModalOpen(false);
|
|
2062
2084
|
setTinMatched(void 0);
|
|
2063
|
-
trackNavigation({
|
|
2064
|
-
userEvents,
|
|
2065
|
-
actionType: "back",
|
|
2066
|
-
toForm: "basicDetails",
|
|
2067
|
-
label: "TIN Edit Details"
|
|
2068
|
-
});
|
|
2069
2085
|
}, [backClick, setTinMatched, setBusinessMismatchModalOpen]);
|
|
2070
2086
|
const resetBusinessData = useCallback(() => {
|
|
2071
2087
|
queryClient.resetQueries({
|
|
@@ -2088,20 +2104,19 @@ function BusinessDetailsDropin({
|
|
|
2088
2104
|
queryClient
|
|
2089
2105
|
]);
|
|
2090
2106
|
useEffect(() => {
|
|
2091
|
-
|
|
2092
|
-
if (((_a2 = currentState.data.basicInformation) == null ? void 0 : _a2.legalCompanyName) !== (verifiedBusiness$1 == null ? void 0 : verifiedBusiness$1.name) && (((_b2 = currentState.data.basicInformation) == null ? void 0 : _b2.legalCompanyName) !== companySearchParams.legalCompanyName || ((_c2 = currentState.data.basicInformation) == null ? void 0 : _c2.stateOrProvince) !== companySearchParams.stateOrProvince)) {
|
|
2107
|
+
if (verifiedBusiness$1?.name && currentState.data.basicInformation?.legalCompanyName !== verifiedBusiness$1?.name && (currentState.data.basicInformation?.legalCompanyName !== companySearchParams.legalCompanyName || currentState.data.basicInformation?.stateOrProvince !== companySearchParams.stateOrProvince)) {
|
|
2093
2108
|
setShowCompanyStructure(false);
|
|
2094
2109
|
resetBusinessData();
|
|
2095
2110
|
}
|
|
2096
2111
|
}, [
|
|
2097
2112
|
companySearchParams,
|
|
2098
2113
|
currentState.data.basicInformation,
|
|
2099
|
-
|
|
2114
|
+
currentState.data.basicInformation?.legalCompanyName,
|
|
2100
2115
|
resetBusinessData,
|
|
2101
2116
|
verifiedBusiness$1
|
|
2102
2117
|
]);
|
|
2103
2118
|
const [prevCurrentCountry, setPrevCurrentCountry] = useState(currentCountry);
|
|
2104
|
-
if (prevCurrentCountry !== currentCountry &&
|
|
2119
|
+
if (prevCurrentCountry !== currentCountry && trustedFields?.length && legalEntityResponse.organization?.registeredAddress.country !== currentCountry) {
|
|
2105
2120
|
setTrustedFields(void 0);
|
|
2106
2121
|
setPrevCurrentCountry(currentCountry);
|
|
2107
2122
|
}
|