@adyen/kyc-components 4.0.0-beta.1 → 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-BQ4Yct7L.js → AcceptTermsOfServiceComponent-i222mdxX.js} +53 -49
- package/dist/{AccountSetupRejected-UVhxMcAe.js → AccountSetupRejected-DHph9lFl.js} +6 -6
- package/dist/{Avatar-NEiNEcRx.js → Avatar-vCjWXfC7.js} +2 -2
- package/dist/{BusinessDetailsDropin-l0xfPekL.js → BusinessDetailsDropin-DQcfiSR8.js} +333 -287
- package/dist/{BusinessFinancingComponent-Bs-poF2d.js → BusinessFinancingComponent-DC3jzBrq.js} +3 -3
- package/dist/{BusinessFinancingDropin-DoRzdS4n.js → BusinessFinancingDropin-D2lMEbNh.js} +161 -264
- package/dist/{BusinessFinancingPage-DSlmJmOK.js → BusinessFinancingPage-BPD2cSDR.js} +3 -3
- package/dist/{BusinessTypeSelectionPage-Bmi_8K2g.js → BusinessTypeSelectionPage-Cdp8joPJ.js} +82 -87
- package/dist/{CZ-BhoS6sd6.js → CZ-BiPeoA9G.js} +11 -1
- package/dist/{ContractViewer-R4-gfVmp.js → ContractViewer-B0bZ14Ts.js} +305 -296
- package/dist/{CreateIndividualComponent-D3aXuYRk.js → CreateIndividualComponent-D9wnexv4.js} +7 -7
- package/dist/{CreateTransferInstrumentComponent-C-ncZ-A8.js → CreateTransferInstrumentComponent-COzPdQjC.js} +4 -4
- package/dist/{CustomerSupport-CMFRgQNa.js → CustomerSupport-NGBoBg3N.js} +27 -32
- package/dist/{DebugModal-BEmhG3UP.js → DebugModal-I2U6TjGT.js} +43 -35
- package/dist/{DecisionMakerDetailsPage-DI2Ubmef.js → DecisionMakerDetailsPage-BN-H1sJF.js} +3 -3
- package/dist/{DecisionMakers-BKhtcs_K.js → DecisionMakers-CZ5-IRtU.js} +128 -23
- package/dist/{EmbeddedStatus-BsZsXbKc.js → EmbeddedStatus-Blr0seRl.js} +6 -6
- package/dist/FormEndState-JB6QFSet.js +59 -0
- package/dist/{FormFlow-Bt-mu4Wm.js → FormFlow-DjvdNEiV.js} +18 -19
- package/dist/{HU-v3vOxRm8.js → HU-D8vJYkDH.js} +10 -1
- package/dist/{IndividualOnfidoDropin-DGMCOm9M.js → IndividualOnfidoDropin-DHhyO2ai.js} +732 -739
- package/dist/{Introduction-DJ6qIUPC.js → Introduction-erRXgreE.js} +32 -34
- package/dist/LandingLayout-B45lEjOv.js +84 -0
- package/dist/{LegalRepresentativeDetailsPage-CyHwQR_W.js → LegalRepresentativeDetailsPage-rS5K4657.js} +3 -3
- package/dist/{ManageIndividualComponent-BIMCvcr2.js → ManageIndividualComponent-BEzE5lkX.js} +8 -12
- package/dist/{ManagePCIComponent-Blj60xLa.js → ManagePCIComponent-BgdGfAuT.js} +5 -5
- package/dist/{ManageTermsOfServiceComponent-CsM23jq3.js → ManageTermsOfServiceComponent-BWkwy6YC.js} +7 -8
- package/dist/{ManageTransferInstrumentComponent-Vut9_bRn.js → ManageTransferInstrumentComponent-B8kRNftW.js} +21 -29
- package/dist/{OnboardingDropinComponent-BW6er2HU.js → OnboardingDropinComponent-DBW5N3Dr.js} +243 -281
- package/dist/{ProviderButton-DAsW5EVa.js → ProviderButton-B58n0cRC.js} +12 -13
- package/dist/{Review-DWDbL9-9.js → Review-O6Al47Cu.js} +11 -11
- package/dist/{RootBusinessDetailsPage-BTYIldSf.js → RootBusinessDetailsPage-q_6wAcer.js} +3 -3
- package/dist/{RootIndividualDetailsPage-DCxJ3ycQ.js → RootIndividualDetailsPage-CiXgSJsV.js} +3 -3
- package/dist/{SignPCIComponent-kHaxhkWa.js → SignPCIComponent-cqRNhGdl.js} +17 -19
- package/dist/{SingpassSelection-Dmlbiq4Z.js → SingpassSelection-BWEJ3Yi-.js} +6 -9
- package/dist/{SoleProprietorshipPage-Bdhs90-q.js → SoleProprietorshipPage-CRcJSpn9.js} +3 -3
- package/dist/{SourceOfFundsPage-Bj22DAFv.js → SourceOfFundsPage-BxLGXTHb.js} +500 -481
- package/dist/{StoreProvider-BmzY19Td.js → StoreProvider-ClKLaHzy.js} +8753 -10118
- package/dist/{TaskItemStatus-CB6FEOnk.js → TaskItemStatus-DrTIwCTx.js} +14 -14
- package/dist/TaskStatusIndicator-CTtKjo0m.js +69 -0
- package/dist/{TaxReportingDropin-jofokkei.js → TaxReportingDropin-DFZ2ehfk.js} +82 -101
- package/dist/{TileGroup-i5Jc08ns.js → TileGroup-BtE472I1.js} +6 -8
- package/dist/{TrustDetailsPage-B6HmvYUf.js → TrustDetailsPage-CGiiTbfR.js} +71 -73
- package/dist/{TrustMemberCompanyPage-D3VJOq6a.js → TrustMemberCompanyPage-oLNhg0hg.js} +4 -4
- package/dist/{TrustMemberIndividualPage-1aeOYsnG.js → TrustMemberIndividualPage-Bgsis586.js} +3 -3
- package/dist/{UnincorporatedPartnershipIndividualPage-Bt7e6ncF.js → UnincorporatedPartnershipIndividualPage-DPE3grqL.js} +3 -3
- package/dist/{UnincorporatedPartnershipMemberCompanyPage-Ck5C_SEU.js → UnincorporatedPartnershipMemberCompanyPage-HUnc9g0g.js} +3 -3
- package/dist/{VerificationErrorAlert-DhtKOmjt.js → VerificationErrorAlert-BBdJmGJu.js} +10 -8
- package/dist/{ViewVerificationStatusComponent-DtKLcCGI.js → ViewVerificationStatusComponent-DDtXG_pM.js} +12 -13
- package/dist/adyen-business-financing.js +8 -12
- package/dist/adyen-individual.js +6 -4
- package/dist/adyen-kyc-components.js +135 -118
- package/dist/adyen-manage-individual.js +2 -2
- package/dist/adyen-manage-pci.js +2 -2
- package/dist/adyen-manage-terms-of-service.js +2 -2
- package/dist/adyen-manage-transfer-instruments.js +2 -2
- package/dist/adyen-onboarding.js +14 -6
- package/dist/adyen-sign-pci.js +8 -15
- package/dist/adyen-terms-of-service.js +18 -6
- package/dist/adyen-transfer-instrument.js +10 -6
- 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 +2 -2
- 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-CQUoQdd2.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-BW8_TEQl.js → getFieldsWithExistingData-BY--eXBQ.js} +3 -4
- package/dist/{hasDataChanged-Mu0HyZ3E.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-DWikzB4g.js → json-Dk6RRAV8.js} +2 -2
- package/dist/{localizeDateString-QtCjf8Fg.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-C-2jp0wg.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-B39yQnOr.js → plaintext-9WNCwUtz.js} +2 -2
- package/dist/plus-circle-filled-Cnf1oJTm.js +17 -0
- package/dist/preact/adyen-transfer-instrument.js +1 -1
- 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-Dx0BPNMa.js → resolveEnvironment-DQH1ab0S.js} +3 -3
- 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-CUANHpja.js → rules-CCnLDGvk.js} +43 -70
- 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 +417 -605
- package/dist/styles-CLV89_hH.js +417 -605
- 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/companySelection/useCompanySelection.d.ts +18 -1
- package/dist/types/api/configurations/useScenarios.d.ts +6 -6
- package/dist/types/components/BankAccount/forms/BankDocument/types.d.ts +1 -0
- package/dist/types/components/BankAccount/mapping/payoutKeyMappings.d.ts +0 -306
- package/dist/types/components/Business/forms/AdditionalInformation/types.d.ts +2 -1
- package/dist/types/components/Business/forms/BasicInformation/types.d.ts +2 -1
- package/dist/types/components/Business/forms/BusinessDetails/forms.d.ts +1 -1
- package/dist/types/components/Business/forms/rules.d.ts +1 -0
- package/dist/types/components/Business/tasks/BusinessDetailsDropin/businessDetailsFormConfig.d.ts +1 -2
- package/dist/types/components/Business/tasks/BusinessDetailsDropin/utils.d.ts +0 -3
- package/dist/types/components/EFP/fields/LegalFormField/types.d.ts +4 -2
- package/dist/types/components/EFP/mapping/businessFinancingKeyMappings.d.ts +5 -307
- package/dist/types/components/EFP/tasks/BusinessFinancingDropin/utils.d.ts +2 -2
- package/dist/types/components/EFP/tasks/SourceOfFundsDropin/SOFAdditionalData/SOFFinancierModal.d.ts +1 -2
- package/dist/types/components/Individual/fields/NameFields/NameFields.d.ts +0 -2
- package/dist/types/components/Individual/forms/IndividualOnfido/AdditionalPersonalDetails/AdditionalPersonalDetails.d.ts +1 -2
- package/dist/types/components/Individual/forms/IndividualOnfido/GuidanceQuestion/GuidanceQuestion.d.ts +7 -3
- package/dist/types/components/Individual/forms/IndividualOnfido/IndividualOnfido.d.ts +0 -1
- 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/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/IndividualOnfidoDropin/IndividualOnfidoStore.d.ts +6 -0
- package/dist/types/components/Shared/FormNavigation/FormNavigationItem.d.ts +1 -2
- package/dist/types/components/Shared/Introduction/copy.d.ts +2 -2
- package/dist/types/components/Shared/Summary/Summary.d.ts +0 -1
- 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/types.d.ts +5 -7
- package/dist/types/components/Shared/fields/CountryField/types.d.ts +1 -1
- package/dist/types/components/Shared/fields/CountryOfGoverningLawField/types.d.ts +1 -1
- package/dist/types/components/Shared/fields/Currency/types.d.ts +1 -1
- package/dist/types/components/Shared/fields/DBANameField/types.d.ts +1 -3
- package/dist/types/components/Shared/fields/DateOfIncorporationField/types.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/getDefaultRegistrationNumberType.d.ts +16 -0
- package/dist/types/components/Shared/fields/IdFieldTypeSelector/getDefaultVatNumberType.d.ts +13 -0
- package/dist/types/components/Shared/fields/LegalCompanyNameField/LegalCompanyNameField.d.ts +1 -2
- 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/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/types.d.ts +1 -1
- package/dist/types/components/Shared/fields/StateField/types.d.ts +1 -1
- package/dist/types/components/Shared/fields/StockExchangeMICField/types.d.ts +1 -1
- package/dist/types/components/Shared/fields/StockISINField/types.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 +1 -1
- package/dist/types/components/Shared/fields/VatNumberField/VatNumberField.d.ts +1 -1
- package/dist/types/components/Shared/fields/VatNumberField/types.d.ts +2 -4
- package/dist/types/components/Shared/forms/Address/utils.d.ts +1 -1
- package/dist/types/components/Shared/forms/FinancialInformation/formatFinancialInformationSummary.d.ts +1 -1
- package/dist/types/components/Shared/forms/FinancialInformation/mapping/mapFinancialInformationToFinancialReport.d.ts +1 -1
- package/dist/types/components/Shared/forms/FinancialInformation/types.d.ts +1 -1
- package/dist/types/components/Shared/tasks/TaskList/TaskItemStatus.d.ts +1 -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/ui/atoms/Accordion/Accordion.d.ts +1 -2
- 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/Field/Field.d.ts +3 -6
- package/dist/types/components/ui/atoms/Field/Field.types.d.ts +9 -12
- package/dist/types/components/ui/atoms/FormHeader/FormHeader.d.ts +4 -6
- package/dist/types/components/ui/atoms/InputBase/InputBase.d.ts +4 -4
- 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/svgs.d.ts +6 -0
- 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/Card/Card.d.ts +1 -2
- package/dist/types/components/ui/molecules/Card/types.d.ts +3 -3
- package/dist/types/components/ui/molecules/DocumentGuidance/DocumentGuidance.types.d.ts +2 -2
- package/dist/types/components/ui/molecules/Dropzone/Dropzone.d.ts +1 -2
- package/dist/types/components/ui/molecules/Dropzone/FilePicker.d.ts +2 -4
- 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/FormEndState/FormEndState.d.ts +0 -1
- package/dist/types/components/ui/molecules/InputCurrency/InputCurrency.d.ts +1 -2
- package/dist/types/components/ui/molecules/InputDate/InputDate.d.ts +3 -3
- package/dist/types/components/ui/molecules/MaskedInput/MaskedInput.d.ts +2 -2
- package/dist/types/constants/keys.d.ts +2 -0
- package/dist/types/context/ExperimentContext/types.d.ts +8 -0
- package/dist/types/core/EmbedShell/EmbedShell.d.ts +1 -0
- package/dist/types/core/UIElement/UIElement.d.ts +1 -0
- package/dist/types/core/models/api/financialReport.d.ts +2 -2
- package/dist/types/core/models/api/get-scenarios.d.ts +1 -1
- package/dist/types/core/models/api/legal-arrangement.d.ts +10 -2
- package/dist/types/core/models/api/organization.d.ts +8 -0
- package/dist/types/core/user-events.d.ts +1 -1
- package/dist/types/embeds/business-financing/AdyenBusinessFinancing.d.ts +1 -1
- package/dist/types/embeds/business-financing/adyen-business-financing.types.d.ts +6 -1
- package/dist/types/embeds/individual/adyen-individual.types.d.ts +6 -1
- package/dist/types/embeds/onboarding/AdyenOnboarding.d.ts +1 -0
- package/dist/types/embeds/onboarding/adyen-onboarding.types.d.ts +4 -1
- package/dist/types/embeds/sign-pci/AdyenSignPci.d.ts +0 -1
- package/dist/types/embeds/sign-pci/adyen-sign-pci.types.d.ts +5 -3
- 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 +2 -1
- package/dist/types/embeds/transfer-instrument/adyen-transfer-instrument.types.d.ts +7 -2
- package/dist/types/hooks/useForm/types.d.ts +0 -2
- package/dist/types/hooks/useLegalCompanyNameField/useLegalCompanyNameField.d.ts +28 -0
- package/dist/types/hooks/useMultiForm/types.d.ts +36 -34
- package/dist/types/hooks/useMultiForm/useMultiForm.d.ts +1 -1
- 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 +11 -2
- package/dist/types/types/datasets/country-code.d.ts +249 -249
- package/dist/types/utils/entityAssociationUtil.d.ts +1 -2
- package/dist/types/utils/entityStatusUtil.d.ts +1 -1
- package/dist/types/utils/eventHandlers/handleKeys.d.ts +2 -2
- package/dist/types/utils/getDisplayErrorMessage.d.ts +2 -2
- package/dist/types/utils/getName.d.ts +2 -2
- package/dist/types/utils/makeSelectItemForRole.d.ts +2 -2
- package/dist/types/utils/masking/masks/businessRegistrationNumberMasks.d.ts +1 -0
- package/dist/types/utils/regex/patternValidators.d.ts +2 -0
- package/dist/types/utils/simulateTextChangeFromKeyboardEvent.d.ts +2 -2
- package/dist/types/utils/urlUtils.d.ts +1 -0
- package/dist/types/utils/validatorUtils.d.ts +2 -0
- package/dist/{useMultiForm-Bwx2nVhh.js → useMultiForm-KQwxav4F.js} +158 -135
- package/dist/{useOnboardingStatus-Cwba-HzS.js → useOnboardingStatus-BMyj9Pwn.js} +1 -1
- package/dist/{useSalesChannelsSettings-BLzegVJh.js → useSalesChannelsSettings-43TfSoxc.js} +2 -2
- package/dist/{useTermsOfServiceStatus-C-i9mF4m.js → useTermsOfServiceStatus-CBHKWYSb.js} +1 -1
- package/dist/{useUpdateLegalEntity-xQlAqIqy.js → useUpdateLegalEntity-D8dw9Oc3.js} +2 -2
- package/dist/{utils-DXv7uAh6.js → utils-CL9qlD-O.js} +18 -11
- package/dist/{validate-BN5p-GhK.js → validate-CeF0YKvL.js} +2 -2
- package/dist/vue/adyen-transfer-instrument.js +5 -4
- package/dist/{yaml-jFdy-qnY.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 +28 -27
- package/dist/FormEndState-C3HCmXcw.js +0 -32
- package/dist/SourceOfFunds.module-xwHIboir.js +0 -128
- package/dist/bg-BG-COTwZXwN.js +0 -2040
- package/dist/cs-CZ-DUlgJKVq.js +0 -2040
- package/dist/da-DK-BDzDHhVR.js +0 -2040
- package/dist/de-DE-B3TpRjZX.js +0 -994
- package/dist/de-DE-DJdgXqS_.js +0 -2040
- package/dist/el-GR-CFEuLvxK.js +0 -994
- package/dist/el-GR-D5i9BNyh.js +0 -2040
- package/dist/en-US-ghR-1_C2.js +0 -994
- package/dist/es-ES-BtWn2FOQ.js +0 -994
- package/dist/es-ES-VOSWszW5.js +0 -2040
- package/dist/et-EE-Bp4Ngsn4.js +0 -2040
- package/dist/fi-FI-DaujOE-a.js +0 -2040
- package/dist/fr-FR-BdPZxk11.js +0 -2040
- package/dist/fr-FR-HvIkGqJf.js +0 -994
- package/dist/hr-HR-BY7C7NxY.js +0 -2040
- package/dist/hu-HU-DHCty-Tc.js +0 -2040
- package/dist/it-IT-BMsuhZEQ.js +0 -2040
- package/dist/it-IT-CjbZahlB.js +0 -994
- package/dist/ja-JP-4jufT0xh.js +0 -994
- package/dist/ja-JP-BYDz1z2G.js +0 -2040
- package/dist/lt-LT-DNJ9V9xV.js +0 -2040
- package/dist/lv-LV-CFJwN5wq.js +0 -2040
- package/dist/nl-NL-B3xjfpMi.js +0 -994
- package/dist/nl-NL-DibAf790.js +0 -2040
- package/dist/no-NO-DHCy5rXx.js +0 -2040
- package/dist/pl-PL-eZBNH5HH.js +0 -2040
- package/dist/pt-PT-BpYDD-PX.js +0 -994
- package/dist/pt-PT-CiN_Wmfe.js +0 -2040
- package/dist/ro-RO-CgyMTvLc.js +0 -2040
- package/dist/ru-RU-BlgIj-Q4.js +0 -994
- package/dist/sk-SK-B5qlQB_U.js +0 -2040
- package/dist/sl-SI-8PPfrGzL.js +0 -2040
- package/dist/sv-SE-7lcf_fB9.js +0 -994
- package/dist/sv-SE-ZWLw6D3j.js +0 -2040
- package/dist/types/components/Individual/forms/IndividualOnfido/UboQuestionnaire/RichText.d.ts +0 -5
- package/dist/types/utils/sanitizeHtml.d.ts +0 -3
- package/dist/types/utils/useStateFromProp.d.ts +0 -9
- package/dist/zh-CN-xYZH718R.js +0 -994
- package/dist/zh-TW-DqBBNurv.js +0 -994
|
@@ -2,20 +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 { p as useApiContext,
|
|
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 { o as organizationTypesToSkipCompanyStructureForm } from "./utils-
|
|
16
|
-
import { g as getFieldsWithExistingData } from "./getFieldsWithExistingData-
|
|
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";
|
|
17
17
|
import cx from "classnames";
|
|
18
|
-
import { m as mapFinancialReportsToFinancialInformation, a as mapFinancialInformationToFinancialReport } from "./mapFinancialReportsToFinancialInformation-
|
|
18
|
+
import { m as mapFinancialReportsToFinancialInformation, a as mapFinancialInformationToFinancialReport } from "./mapFinancialReportsToFinancialInformation-D_6u_bSS.js";
|
|
19
19
|
import { f as formatCurrency } from "./formatCurrency-CMOSdJMB.js";
|
|
20
20
|
const clearCompanyData = async (legalEntityId, baseUrl) => {
|
|
21
21
|
return httpPost({
|
|
@@ -38,6 +38,16 @@ const useCompanySearch = (data, options) => {
|
|
|
38
38
|
return useQuery({
|
|
39
39
|
queryKey: ["companySearch", data],
|
|
40
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
|
+
},
|
|
41
51
|
retry: 0,
|
|
42
52
|
...options
|
|
43
53
|
});
|
|
@@ -211,16 +221,14 @@ function ProofOfOwnershipDocument({
|
|
|
211
221
|
description = "weNeedAnOfficialDocumentForOwnership",
|
|
212
222
|
...props
|
|
213
223
|
}) {
|
|
214
|
-
var _a;
|
|
215
224
|
const { i18n } = useI18nContext();
|
|
216
225
|
const [selectedDocumentName, setSelectedDocumentName] = useState(documentTypes$1[0].id);
|
|
217
226
|
const supportsMultiple = selectedDocumentName === DOC_TYPE_FOR_MULTI_UPLOAD;
|
|
218
227
|
useEffect(() => {
|
|
219
|
-
|
|
220
|
-
if (((_b = (_a2 = props.data) == null ? void 0 : _a2.proofOfOwnership) == null ? void 0 : _b.length) === 2) {
|
|
228
|
+
if (props.data?.proofOfOwnership?.length === 2) {
|
|
221
229
|
setSelectedDocumentName(DOC_TYPE_FOR_MULTI_UPLOAD);
|
|
222
230
|
}
|
|
223
|
-
}, [
|
|
231
|
+
}, [props.data?.proofOfOwnership]);
|
|
224
232
|
return /* @__PURE__ */ jsx(
|
|
225
233
|
MemoizedDocumentUpload,
|
|
226
234
|
{
|
|
@@ -362,9 +370,8 @@ const GuidanceContent$1 = ({
|
|
|
362
370
|
country,
|
|
363
371
|
companyType
|
|
364
372
|
}) => {
|
|
365
|
-
var _a;
|
|
366
373
|
const { i18n } = useI18nContext();
|
|
367
|
-
const acceptedDocGuidance =
|
|
374
|
+
const acceptedDocGuidance = ACCEPTED_DOCUMENTS_MAP$1[country]?.[companyType];
|
|
368
375
|
return /* @__PURE__ */ jsx("div", { className: "adyen-kyc-upload-field__guidance", children: country === "US" ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
369
376
|
acceptedDocGuidance && /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-u-margin-bottom-24", children: [
|
|
370
377
|
/* @__PURE__ */ jsx("strong", { children: i18n.get(acceptedDocGuidance.header) }),
|
|
@@ -458,9 +465,8 @@ const GuidanceContent = ({
|
|
|
458
465
|
country,
|
|
459
466
|
companyType
|
|
460
467
|
}) => {
|
|
461
|
-
var _a;
|
|
462
468
|
const { i18n } = useI18nContext();
|
|
463
|
-
const acceptedDocGuidance =
|
|
469
|
+
const acceptedDocGuidance = ACCEPTED_DOCUMENTS_MAP[country]?.[companyType];
|
|
464
470
|
return /* @__PURE__ */ jsx("div", { className: "adyen-kyc-upload-field__guidance", children: country === "US" ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
465
471
|
acceptedDocGuidance && /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-u-margin-bottom-24", children: [
|
|
466
472
|
/* @__PURE__ */ jsx("strong", { children: i18n.get(acceptedDocGuidance.header) }),
|
|
@@ -525,25 +531,25 @@ function BusinessDetails(props) {
|
|
|
525
531
|
proceedToManualDataEntry
|
|
526
532
|
} = props;
|
|
527
533
|
const forms = getForms(country);
|
|
528
|
-
const formWrapperClasses = (formId) =>
|
|
534
|
+
const formWrapperClasses = (formId) => activeForm?.formId !== formId ? "adyen-kyc-form-wrapper adyen-kyc-form-wrapper--hidden" : "adyen-kyc-form-wrapper";
|
|
529
535
|
const classNames = cx("adyen-kyc-business-details", {
|
|
530
|
-
"adyen-kyc-business-details--hide":
|
|
536
|
+
"adyen-kyc-business-details--hide": activeForm?.formId === "summary"
|
|
531
537
|
});
|
|
532
|
-
const companyType = taskType === TaskTypes.SOLE_PROPRIETOR_COMPANY ? CompanyTypesValue.SOLE_PROPRIETORSHIP : companyStructure
|
|
538
|
+
const companyType = taskType === TaskTypes.SOLE_PROPRIETOR_COMPANY ? CompanyTypesValue.SOLE_PROPRIETORSHIP : companyStructure?.entityType;
|
|
533
539
|
return /* @__PURE__ */ jsxs("div", { className: classNames, children: [
|
|
534
540
|
/* @__PURE__ */ jsx("div", { className: formWrapperClasses(forms.basicInformation.formId), children: /* @__PURE__ */ jsx(
|
|
535
541
|
BasicInformation,
|
|
536
542
|
{
|
|
537
543
|
...getFormProps(props, forms.basicInformation.formId),
|
|
538
544
|
id: forms.basicInformation.formId,
|
|
539
|
-
heading: i18n.get(
|
|
540
|
-
description:
|
|
545
|
+
heading: i18n.get(activeForm?.formHeading || forms.basicInformation.formHeading),
|
|
546
|
+
description: activeForm?.formDescription ? i18n.get(activeForm?.formDescription) : void 0,
|
|
541
547
|
country,
|
|
542
548
|
companyType,
|
|
543
549
|
isTopLevelEntity,
|
|
544
550
|
showBusinessSelection,
|
|
545
551
|
showCompanyStructure,
|
|
546
|
-
isActiveForm:
|
|
552
|
+
isActiveForm: activeForm?.formId === forms.basicInformation.formId,
|
|
547
553
|
loading,
|
|
548
554
|
proceedToManualDataEntry,
|
|
549
555
|
searchResults,
|
|
@@ -558,9 +564,9 @@ function BusinessDetails(props) {
|
|
|
558
564
|
{
|
|
559
565
|
...getFormProps(props, forms.companyStructure.formId),
|
|
560
566
|
id: forms.companyStructure.formId,
|
|
561
|
-
heading: i18n.get(
|
|
567
|
+
heading: i18n.get(activeForm?.formHeading ?? forms.companyStructure.formHeading),
|
|
562
568
|
description: i18n.get(
|
|
563
|
-
|
|
569
|
+
activeForm?.formDescription ?? forms.companyStructure.formDescription
|
|
564
570
|
),
|
|
565
571
|
country,
|
|
566
572
|
showCompanyStructure
|
|
@@ -571,7 +577,7 @@ function BusinessDetails(props) {
|
|
|
571
577
|
{
|
|
572
578
|
...getFormProps(props, forms.additionalInformation.formId),
|
|
573
579
|
id: forms.additionalInformation.formId,
|
|
574
|
-
heading: i18n.get(
|
|
580
|
+
heading: i18n.get(activeForm?.formHeading ?? forms.additionalInformation.formHeading),
|
|
575
581
|
country,
|
|
576
582
|
companyType,
|
|
577
583
|
showCompanyStructure
|
|
@@ -702,25 +708,24 @@ const mapBasicInformation = (data) => {
|
|
|
702
708
|
}, {});
|
|
703
709
|
};
|
|
704
710
|
const mapDbaName = (legalEntity) => {
|
|
705
|
-
var _a, _b, _c, _d;
|
|
706
711
|
const entity = legalEntity.type === "organization" ? legalEntity.organization : legalEntity.soleProprietorship;
|
|
707
712
|
const dbaName = {};
|
|
708
|
-
if (typeof
|
|
713
|
+
if (typeof entity?.doingBusinessAsAbsent !== "undefined") {
|
|
709
714
|
dbaName.hasDoingBusinessAs = !entity.doingBusinessAsAbsent;
|
|
710
715
|
} else {
|
|
711
|
-
if (entity
|
|
712
|
-
dbaName.hasDoingBusinessAs =
|
|
716
|
+
if (entity?.doingBusinessAs) {
|
|
717
|
+
dbaName.hasDoingBusinessAs = entity?.doingBusinessAs !== (legalEntity.type === "organization" ? legalEntity.organization?.legalName : legalEntity.soleProprietorship?.name);
|
|
713
718
|
} else {
|
|
714
719
|
dbaName.hasDoingBusinessAs = void 0;
|
|
715
720
|
}
|
|
716
721
|
}
|
|
717
|
-
if (
|
|
718
|
-
dbaName.doingBusinessAs =
|
|
722
|
+
if (legalEntity.organization?.doingBusinessAs) {
|
|
723
|
+
dbaName.doingBusinessAs = legalEntity.organization?.doingBusinessAs;
|
|
719
724
|
}
|
|
720
725
|
return dbaName;
|
|
721
726
|
};
|
|
722
727
|
const mapIsUen = (taxInformation, registrationNumber, country) => {
|
|
723
|
-
const currentCountryTaxInfo = taxInformation
|
|
728
|
+
const currentCountryTaxInfo = taxInformation?.find((taxInfo) => taxInfo.country === country);
|
|
724
729
|
if (!currentCountryTaxInfo || country !== "SG") return {};
|
|
725
730
|
return {
|
|
726
731
|
registrationNumber: currentCountryTaxInfo.type === "UEN" ? currentCountryTaxInfo.number : registrationNumber,
|
|
@@ -730,14 +735,21 @@ const mapIsUen = (taxInformation, registrationNumber, country) => {
|
|
|
730
735
|
const mapAdditionalInformation = (data, legalEntity) => {
|
|
731
736
|
if (!data) return;
|
|
732
737
|
const entity = legalEntity.type === "organization" ? legalEntity.organization : legalEntity.soleProprietorship;
|
|
733
|
-
const currentCountry = entity
|
|
738
|
+
const currentCountry = entity?.registeredAddress.country;
|
|
734
739
|
const dbaNameFields = mapDbaName(legalEntity);
|
|
735
740
|
const isUen = mapIsUen(
|
|
736
741
|
data.taxInformation,
|
|
737
742
|
data.registrationNumber,
|
|
738
743
|
currentCountry
|
|
739
744
|
);
|
|
740
|
-
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;
|
|
741
753
|
const result = entriesOf(data).reduce(
|
|
742
754
|
(acc, [field]) => {
|
|
743
755
|
if (!COUNTRIES_USING_COMPANY_SEARCH.includes(currentCountry)) {
|
|
@@ -754,10 +766,28 @@ const mapAdditionalInformation = (data, legalEntity) => {
|
|
|
754
766
|
}
|
|
755
767
|
return acc;
|
|
756
768
|
},
|
|
757
|
-
{ operationalAddressIsSame }
|
|
769
|
+
{ operationalAddressIsSame, registrationNumberType, vatNumberType }
|
|
758
770
|
);
|
|
759
771
|
return { ...result, ...dbaNameFields, ...isUen };
|
|
760
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
|
+
};
|
|
761
791
|
const mapLegalEntityToBusinessDetailsSchema = (legalEntity, parentEntity) => {
|
|
762
792
|
if (!legalEntity) return {};
|
|
763
793
|
const {
|
|
@@ -769,13 +799,12 @@ const mapLegalEntityToBusinessDetailsSchema = (legalEntity, parentEntity) => {
|
|
|
769
799
|
companyConstitutionalDocument
|
|
770
800
|
} = mapApiDocumentToBusinessDetailsDocuments(legalEntity.id);
|
|
771
801
|
const buildSolePropSchema = () => {
|
|
772
|
-
var _a, _b, _c, _d;
|
|
773
802
|
const solePropData = formatObject(
|
|
774
803
|
legalEntity,
|
|
775
804
|
solePropBusinessDetailsKeyMapping
|
|
776
805
|
);
|
|
777
|
-
const country =
|
|
778
|
-
if (
|
|
806
|
+
const country = solePropData?.additionalInformation?.registrationAddress?.country ?? parentEntity?.individual?.residentialAddress.country;
|
|
807
|
+
if (legalEntity?.soleProprietorship?.financialReports && solePropData) {
|
|
779
808
|
solePropData.companyFinancialInformation = mapFinancialReportsToFinancialInformation(
|
|
780
809
|
legalEntity.soleProprietorship.financialReports
|
|
781
810
|
);
|
|
@@ -783,7 +812,7 @@ const mapLegalEntityToBusinessDetailsSchema = (legalEntity, parentEntity) => {
|
|
|
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, _b;
|
|
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,8 +888,8 @@ const mapLegalEntityToBusinessDetailsSchema = (legalEntity, parentEntity) => {
|
|
|
859
888
|
};
|
|
860
889
|
}
|
|
861
890
|
case "companyFinancialInformation": {
|
|
862
|
-
const financialReports = legalEntity.type === "organization" ?
|
|
863
|
-
return
|
|
891
|
+
const financialReports = legalEntity.type === "organization" ? legalEntity?.organization?.financialReports : legalEntity?.soleProprietorship?.financialReports;
|
|
892
|
+
return financialReports?.length ? {
|
|
864
893
|
...componentData,
|
|
865
894
|
[key]: mapFinancialReportsToFinancialInformation(financialReports)
|
|
866
895
|
} : componentData;
|
|
@@ -870,6 +899,74 @@ const mapLegalEntityToBusinessDetailsSchema = (legalEntity, parentEntity) => {
|
|
|
870
899
|
}
|
|
871
900
|
}, {});
|
|
872
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
|
+
};
|
|
873
970
|
const adjustFormData = (oldFormData, newFormData) => {
|
|
874
971
|
const schema = Array.from((/* @__PURE__ */ new Set([...keysOf(oldFormData), ...keysOf(newFormData)])).keys());
|
|
875
972
|
return schema.reduce((acc, key) => {
|
|
@@ -892,9 +989,17 @@ const setRemovedFieldsOnSchemaToDeletedValue = (newData, existingData) => {
|
|
|
892
989
|
return { ...adjusted, [formId]: adjustFormData(oldFormData, newFormData) };
|
|
893
990
|
}, {});
|
|
894
991
|
};
|
|
895
|
-
const formatFinancialInformationSummary = (data, i18n, country) => {
|
|
896
|
-
|
|
897
|
-
|
|
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 = {
|
|
898
1003
|
currency: data.currency,
|
|
899
1004
|
financialReportingDate: data.financialReportingDate
|
|
900
1005
|
};
|
|
@@ -913,81 +1018,81 @@ const formatFinancialInformationSummary = (data, i18n, country) => {
|
|
|
913
1018
|
return summary;
|
|
914
1019
|
};
|
|
915
1020
|
const mapBusinessDetailsDocumentToApiDocument = async (data, entityId) => {
|
|
916
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
917
1021
|
const {
|
|
918
1022
|
companyRegistrationDocument,
|
|
919
1023
|
companyTaxDocument,
|
|
920
1024
|
companyProofOfDirectorDocument,
|
|
921
1025
|
companyConstitutionalDocument,
|
|
922
1026
|
companyProofOfSignatoryDocument,
|
|
923
|
-
companyProofOfOwnershipDocument
|
|
1027
|
+
companyProofOfOwnershipDocument,
|
|
1028
|
+
basicInformation
|
|
924
1029
|
} = data;
|
|
925
1030
|
const taxDocumentType = COUNTRIES_THAT_USE_TAX_ID_INSTEAD_OF_VAT.includes(
|
|
926
|
-
|
|
1031
|
+
basicInformation?.country
|
|
927
1032
|
) ? "proofOfOrganizationTaxInfo" : "vatDocument";
|
|
928
1033
|
const documents = await Promise.all([
|
|
929
1034
|
createDocumentRequest({
|
|
930
1035
|
entityId,
|
|
931
1036
|
entityType: "legalEntity",
|
|
932
1037
|
documentType: "registrationDocument",
|
|
933
|
-
page1:
|
|
1038
|
+
page1: companyRegistrationDocument?.registrationDocument?.[0]
|
|
934
1039
|
}),
|
|
935
1040
|
createDocumentRequest({
|
|
936
1041
|
entityId,
|
|
937
1042
|
entityType: "legalEntity",
|
|
938
1043
|
documentType: taxDocumentType,
|
|
939
|
-
page1:
|
|
1044
|
+
page1: companyTaxDocument?.taxDocument?.[0]
|
|
940
1045
|
}),
|
|
941
1046
|
createDocumentRequest({
|
|
942
1047
|
entityId,
|
|
943
1048
|
entityType: "legalEntity",
|
|
944
1049
|
documentType: "proofOfDirector",
|
|
945
|
-
page1:
|
|
1050
|
+
page1: companyProofOfDirectorDocument?.proofOfDirector?.[0]
|
|
946
1051
|
}),
|
|
947
1052
|
createDocumentRequest({
|
|
948
1053
|
entityId,
|
|
949
1054
|
entityType: "legalEntity",
|
|
950
1055
|
documentType: "constitutionalDocument",
|
|
951
|
-
page1:
|
|
1056
|
+
page1: companyConstitutionalDocument?.constitutionalDocument?.[0]
|
|
952
1057
|
}),
|
|
953
1058
|
createDocumentRequest({
|
|
954
1059
|
entityId,
|
|
955
1060
|
entityType: "legalEntity",
|
|
956
1061
|
documentType: "proofOfSignatory",
|
|
957
|
-
page1:
|
|
1062
|
+
page1: companyProofOfSignatoryDocument?.proofOfSignatory?.[0]
|
|
958
1063
|
}),
|
|
959
1064
|
createDocumentRequest({
|
|
960
1065
|
entityId,
|
|
961
1066
|
entityType: "legalEntity",
|
|
962
1067
|
documentType: "proofOfOwnership",
|
|
963
|
-
page1:
|
|
964
|
-
page2:
|
|
1068
|
+
page1: companyProofOfOwnershipDocument?.proofOfOwnership?.[0],
|
|
1069
|
+
page2: companyProofOfOwnershipDocument?.proofOfOwnership?.[1]
|
|
965
1070
|
})
|
|
966
1071
|
]);
|
|
967
1072
|
return documents.filter(Boolean);
|
|
968
1073
|
};
|
|
969
1074
|
const mapBusinessDetailsSchemaToLegalEntity = (data, accountHolder, isExperimentEnabled) => {
|
|
970
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q;
|
|
971
1075
|
const requestObj = {
|
|
972
1076
|
...formatObject(
|
|
973
1077
|
data,
|
|
974
1078
|
accountHolder === "mySoleProprietorName" ? solePropBusinessDetailsApiKeyMapping : businessDetailsApiKeyMapping
|
|
975
1079
|
)
|
|
976
1080
|
};
|
|
977
|
-
|
|
1081
|
+
delete requestObj.organization?.legalFormDescription;
|
|
978
1082
|
const taxData = COUNTRIES_USING_COMPANY_SEARCH.includes(
|
|
979
|
-
|
|
980
|
-
) ?
|
|
1083
|
+
data.basicInformation?.country
|
|
1084
|
+
) ? data.basicInformation?.taxInformation : data.additionalInformation?.taxInformation;
|
|
981
1085
|
const registrationNumber = COUNTRIES_USING_COMPANY_SEARCH.includes(
|
|
982
|
-
|
|
983
|
-
) ?
|
|
984
|
-
const
|
|
1086
|
+
data.basicInformation?.country
|
|
1087
|
+
) ? data.basicInformation?.registrationNumber : data.additionalInformation?.registrationNumber;
|
|
1088
|
+
const localization = processLocalizationFields(data.basicInformation);
|
|
1089
|
+
const doingBusinessAs = data.additionalInformation?.doingBusinessAs ?? "";
|
|
985
1090
|
const entityObject = isEmpty(data.companyStructure) ? requestObj.soleProprietorship : requestObj.organization;
|
|
986
1091
|
if (entityObject) {
|
|
987
1092
|
if (taxData) {
|
|
988
1093
|
entityObject.taxInformation = taxData;
|
|
989
1094
|
}
|
|
990
|
-
if (!!requestObj.soleProprietorship && !
|
|
1095
|
+
if (!!requestObj.soleProprietorship && !requestObj.soleProprietorship?.countryOfGoverningLaw && !!data.basicInformation?.country) {
|
|
991
1096
|
requestObj.soleProprietorship.countryOfGoverningLaw = data.basicInformation.country;
|
|
992
1097
|
}
|
|
993
1098
|
if (registrationNumber) {
|
|
@@ -996,141 +1101,86 @@ const mapBusinessDetailsSchemaToLegalEntity = (data, accountHolder, isExperiment
|
|
|
996
1101
|
requestObj.organization.registrationNumberAbsent = false;
|
|
997
1102
|
}
|
|
998
1103
|
}
|
|
999
|
-
if (
|
|
1000
|
-
|
|
1104
|
+
if (localization) {
|
|
1105
|
+
entityObject.localization = localization;
|
|
1106
|
+
}
|
|
1107
|
+
if (data.additionalInformation?.exemptedFromRegistrationNumber && isExperimentEnabled("EnableRegistrationAndTaxAbsentStatesV4") && requestObj.organization) {
|
|
1108
|
+
requestObj.organization.registrationNumberAbsent = data.additionalInformation?.exemptedFromRegistrationNumber;
|
|
1001
1109
|
}
|
|
1002
|
-
if (
|
|
1110
|
+
if (data.additionalInformation?.vatAbsenceReason) {
|
|
1003
1111
|
entityObject.vatNumber = "";
|
|
1004
1112
|
}
|
|
1005
1113
|
if (isExperimentEnabled("EnableDoingBusinessAsNameV4")) {
|
|
1006
|
-
if (typeof
|
|
1007
|
-
entityObject.doingBusinessAsAbsent = !
|
|
1114
|
+
if (typeof data.additionalInformation?.hasDoingBusinessAs !== "undefined") {
|
|
1115
|
+
entityObject.doingBusinessAsAbsent = !data.additionalInformation?.hasDoingBusinessAs;
|
|
1008
1116
|
}
|
|
1009
1117
|
} else {
|
|
1010
|
-
entityObject.doingBusinessAs = doingBusinessAs ||
|
|
1118
|
+
entityObject.doingBusinessAs = doingBusinessAs || data.basicInformation?.legalCompanyName;
|
|
1011
1119
|
delete entityObject.doingBusinessAsAbsent;
|
|
1012
1120
|
}
|
|
1013
|
-
if (
|
|
1121
|
+
if (data.additionalInformation?.operationalAddressIsSame === operationalAddressIsSameIds.OPERATIONAL_ADDRESS_IS_SAME && entityObject.principalPlaceOfBusiness) {
|
|
1014
1122
|
entityObject.principalPlaceOfBusiness = entityObject.registeredAddress;
|
|
1015
1123
|
}
|
|
1016
1124
|
if (!isEmpty(data.companyFinancialInformation)) {
|
|
1125
|
+
const isIncorporationDateDependencyEnabled = isExperimentEnabled(
|
|
1126
|
+
"EnableIncorporationDateBasedFinancialValidationForHO"
|
|
1127
|
+
);
|
|
1017
1128
|
entityObject.financialReports = [
|
|
1018
|
-
mapFinancialInformationToFinancialReport(
|
|
1129
|
+
mapFinancialInformationToFinancialReport(
|
|
1130
|
+
data.companyFinancialInformation,
|
|
1131
|
+
isIncorporationDateDependencyEnabled ? data?.additionalInformation?.dateOfIncorporation : void 0
|
|
1132
|
+
)
|
|
1019
1133
|
];
|
|
1020
1134
|
}
|
|
1021
1135
|
}
|
|
1022
1136
|
requestObj.type = requestObj.organization ? LegalEntityType.ORGANIZATION : LegalEntityType.SOLE_PROPRIETORSHIP;
|
|
1023
|
-
if (
|
|
1137
|
+
if (entityObject?.registeredAddress.country === "US") {
|
|
1024
1138
|
delete entityObject.registrationNumber;
|
|
1025
1139
|
}
|
|
1026
1140
|
return requestObj;
|
|
1027
1141
|
};
|
|
1028
|
-
const
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
entityType: { rule: "businessRequiresCompanyType" },
|
|
1032
|
-
legalCompanyName: { rule: "REQUIRED" },
|
|
1033
|
-
hasDoingBusinessAs: { rule: "REQUIRED" },
|
|
1034
|
-
registrationAddress: { rule: "REQUIRED" },
|
|
1035
|
-
operationalAddressIsSame: { rule: "REQUIRED" },
|
|
1036
|
-
/* Base optional fields */
|
|
1037
|
-
operationalAddress: { rule: "OPTIONAL" },
|
|
1038
|
-
/* Fields with custom country specific rules */
|
|
1039
|
-
stockExchangeMIC: { rule: "ifPubliclyTradedCompany" },
|
|
1040
|
-
stockISIN: { rule: "ifPubliclyTradedCompany" },
|
|
1041
|
-
stockTickerSymbol: { rule: "ifPubliclyTradedCompany" },
|
|
1042
|
-
dateOfIncorporation: { rule: "isDateOfIncorporationRequired" },
|
|
1043
|
-
stateOrProvince: { rule: "countryUsingCompanySearch" },
|
|
1044
|
-
registrationNumber: { rule: "countryRequiresRegistrationNumber" },
|
|
1045
|
-
exemptedFromRegistrationNumber: { rule: "companyRegistrationNumberExemptionAllowed" },
|
|
1046
|
-
eInvoicingCode: { rule: "isEInvoicingCodeEnabled" },
|
|
1047
|
-
countryOfGoverningLaw: { rule: "countryOfGoverningLawRequired" },
|
|
1048
|
-
taxDocument: { rule: "ifCountryUsAndTinFailed" }
|
|
1049
|
-
};
|
|
1050
|
-
const taxInformationBase = {
|
|
1051
|
-
vatNumber: { rule: "countryUsesVat" },
|
|
1052
|
-
exemptedFromVat: { rule: "countryUsesVat" },
|
|
1053
|
-
vatAbsenceReason: { rule: "countryUsesVat" },
|
|
1054
|
-
taxInformation: { rule: "countryUsesTaxId" },
|
|
1055
|
-
exemptedFromTax: { rule: "countryHasTaxExemptions" },
|
|
1056
|
-
isUen: { rule: "countryUsesUenOrGst" }
|
|
1057
|
-
};
|
|
1058
|
-
const financialInformationBase = {
|
|
1059
|
-
numberOfEmployees: { rule: "countryRequiresFinancialInformation" },
|
|
1060
|
-
financialReportingDate: { rule: "isFinancialReportingFieldsRequired" }
|
|
1061
|
-
};
|
|
1062
|
-
const businessDetailsFieldsPerScenario = {
|
|
1063
|
-
L0: {
|
|
1064
|
-
country: { rule: "REQUIRED" },
|
|
1065
|
-
legalCompanyName: { rule: "REQUIRED" },
|
|
1066
|
-
stateOrProvince: { rule: "countryUsingCompanySearch" },
|
|
1067
|
-
...financialInformationBase
|
|
1068
|
-
},
|
|
1069
|
-
L1: {
|
|
1070
|
-
...businessDetailsBase,
|
|
1071
|
-
...financialInformationBase
|
|
1072
|
-
},
|
|
1073
|
-
L: {
|
|
1074
|
-
...businessDetailsBase,
|
|
1075
|
-
...taxInformationBase,
|
|
1076
|
-
...financialInformationBase
|
|
1077
|
-
},
|
|
1078
|
-
L_PROOFOFADDRESS: {
|
|
1079
|
-
// TODO this field does not exist
|
|
1080
|
-
// proofOfAddressDocument: { rule: 'REQUIRED' },
|
|
1081
|
-
},
|
|
1082
|
-
L_REGDOC: {
|
|
1083
|
-
registrationDocument: { rule: "REQUIRED" }
|
|
1084
|
-
},
|
|
1085
|
-
L_TAXDOC: {
|
|
1086
|
-
taxDocument: { rule: "REQUIRED" }
|
|
1142
|
+
const processLocalizationFields = (data) => {
|
|
1143
|
+
if (!data) {
|
|
1144
|
+
return;
|
|
1087
1145
|
}
|
|
1088
|
-
|
|
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
|
-
entityType: { label: "companyType" },
|
|
1117
|
-
isUen: { label: "iDoNotHaveGst" }
|
|
1118
|
-
},
|
|
1119
|
-
[CountryCodes.UnitedStates]: {
|
|
1120
|
-
country: { label: "country__US__business" },
|
|
1121
|
-
stateOrProvince: { label: "stateOrProvince__US__business" },
|
|
1122
|
-
doingBusinessAs: { label: "doingBusinessAs" },
|
|
1123
|
-
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;
|
|
1124
1174
|
}
|
|
1175
|
+
return Object.keys(localization).map((script) => ({
|
|
1176
|
+
script,
|
|
1177
|
+
fields: { ...localization[script].fields }
|
|
1178
|
+
}));
|
|
1125
1179
|
};
|
|
1126
1180
|
const MANDATORY_FIELDS_BUSINESS_DETAILS = [
|
|
1127
1181
|
"basicInformation.legalCompanyName",
|
|
1128
1182
|
"basicInformation.country"
|
|
1129
1183
|
];
|
|
1130
|
-
const parseBusinessDetailsScenarios = (scenarios, country) => augmentWithCountryConfigs(
|
|
1131
|
-
businessDetailsCountryConfig[country],
|
|
1132
|
-
composePerScenarioFormConfigurations(scenarios, businessDetailsFieldsPerScenario)
|
|
1133
|
-
);
|
|
1134
1184
|
const canSubmit = (data) => MANDATORY_FIELDS_BUSINESS_DETAILS.every((detail) => {
|
|
1135
1185
|
const value = getProp(data, detail);
|
|
1136
1186
|
return !isEmpty$1(value);
|
|
@@ -1138,74 +1188,72 @@ const canSubmit = (data) => MANDATORY_FIELDS_BUSINESS_DETAILS.every((detail) =>
|
|
|
1138
1188
|
const isDocumentsRequired = (forms) => forms.some((form) => documentFormsIds.includes(form.formId));
|
|
1139
1189
|
const removeConditionalForms = (forms, isSkippingCompanyStructure) => isSkippingCompanyStructure ? forms.filter((f) => f.formId !== "companyStructure" && f.formId !== "companyType") : forms;
|
|
1140
1190
|
const formatBasicInformation = (data, labels, datasetUtils, companyType, isCountryOfGoverningLawEnabled) => {
|
|
1141
|
-
|
|
1142
|
-
const country = data == null ? void 0 : data.country;
|
|
1191
|
+
const country = data?.country;
|
|
1143
1192
|
const registrationNumberLabel = resolveFieldMetadata(
|
|
1144
1193
|
registrationNumberDefaultFieldConfig[country],
|
|
1145
1194
|
{
|
|
1146
1195
|
companyType,
|
|
1147
|
-
registrationNumberType: data.registrationNumber ? inferCompanyRegistrationNumberType(data
|
|
1196
|
+
registrationNumberType: data.registrationNumber ? inferCompanyRegistrationNumberType(data?.registrationNumber, country, companyType) : getCompanyRegistrationNumberOptions(country, companyType)?.[0]?.id
|
|
1148
1197
|
},
|
|
1149
1198
|
registrationNumberDefaultFieldMetadata
|
|
1150
1199
|
).label;
|
|
1151
1200
|
const taxIdLabel = resolveFieldMetadata(
|
|
1152
|
-
|
|
1201
|
+
taxInformationDefaultFieldConfig[country],
|
|
1153
1202
|
{
|
|
1154
1203
|
taxIdNumberType: countryToTaxInfoTypeMap[country] ?? void 0,
|
|
1155
1204
|
// TODO use type selector
|
|
1156
1205
|
companyType: void 0
|
|
1157
1206
|
},
|
|
1158
|
-
|
|
1207
|
+
taxInformationDefaultFieldMetadata
|
|
1159
1208
|
).label;
|
|
1160
1209
|
const countryOfGoverningLaw = getCountryOfGoverningLaw(isCountryOfGoverningLawEnabled, data);
|
|
1161
1210
|
return {
|
|
1162
|
-
[
|
|
1211
|
+
[labels?.basicInformation?.legalCompanyName ?? "legalCompanyName"]: data.legalCompanyName,
|
|
1163
1212
|
country: datasetUtils.getCountryName(data.country),
|
|
1164
1213
|
[getKeyForField("stateOrProvince", data.country)]: datasetUtils.getStateName(
|
|
1165
1214
|
data.stateOrProvince,
|
|
1166
1215
|
data.country
|
|
1167
1216
|
),
|
|
1168
|
-
[taxIdLabel]:
|
|
1217
|
+
[taxIdLabel]: data.taxInformation?.find((taxId) => data.country === taxId.country)?.number,
|
|
1169
1218
|
[registrationNumberLabel]: data.registrationNumber,
|
|
1170
1219
|
countryOfGoverningLaw: datasetUtils.getCountryName(countryOfGoverningLaw)
|
|
1171
1220
|
};
|
|
1172
1221
|
};
|
|
1173
1222
|
const formatAdditionalInformation = (data, labels, country, companyType, i18n) => {
|
|
1174
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l;
|
|
1175
1223
|
const registrationNumberLabel = resolveFieldMetadata(
|
|
1176
1224
|
registrationNumberDefaultFieldConfig[country],
|
|
1177
1225
|
{
|
|
1178
1226
|
companyType,
|
|
1179
|
-
registrationNumberType: data.registrationNumber ? inferCompanyRegistrationNumberType(data
|
|
1227
|
+
registrationNumberType: data.registrationNumber ? inferCompanyRegistrationNumberType(data?.registrationNumber, country, companyType) : getCompanyRegistrationNumberOptions(country, companyType)?.[0]?.id
|
|
1180
1228
|
},
|
|
1181
1229
|
registrationNumberDefaultFieldMetadata
|
|
1182
1230
|
).label;
|
|
1183
1231
|
const taxIdLabel = resolveFieldMetadata(
|
|
1184
|
-
|
|
1232
|
+
taxInformationDefaultFieldConfig[country],
|
|
1185
1233
|
{
|
|
1186
1234
|
taxIdNumberType: countryToTaxInfoTypeMap[country] ?? void 0,
|
|
1187
1235
|
// TODO use type selector
|
|
1188
1236
|
companyType: void 0
|
|
1189
1237
|
},
|
|
1190
|
-
|
|
1238
|
+
taxInformationDefaultFieldMetadata
|
|
1191
1239
|
).label;
|
|
1192
1240
|
return {
|
|
1193
|
-
[
|
|
1241
|
+
[labels?.additionalInformation?.legalForm ?? "businessStructure"]: data.legalFormLabel,
|
|
1242
|
+
[labels?.additionalInformation?.doingBusinessAs ?? "doingBusinessAs"]: data.doingBusinessAs,
|
|
1194
1243
|
[registrationNumberLabel]: data.registrationNumber,
|
|
1195
|
-
[taxIdLabel]: data.isUen ? void 0 :
|
|
1196
|
-
[
|
|
1197
|
-
[
|
|
1198
|
-
[
|
|
1199
|
-
[
|
|
1200
|
-
[
|
|
1201
|
-
[
|
|
1202
|
-
[
|
|
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
|
|
1203
1252
|
};
|
|
1204
1253
|
};
|
|
1205
1254
|
const formatDataForSummary = (data, forms, labels, i18n, isExperimentEnabled) => {
|
|
1206
1255
|
const datasetUtils = datasetUtilities(i18n.locale);
|
|
1207
1256
|
return entriesOf(data).reduce((summaryData, [form]) => {
|
|
1208
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o;
|
|
1209
1257
|
if (!form || !data[form]) return summaryData;
|
|
1210
1258
|
const isCountryOfGoverningLawEnabled = isExperimentEnabled(
|
|
1211
1259
|
"EnableCountryOfGoverningLawForUKCompanies"
|
|
@@ -1218,7 +1266,7 @@ const formatDataForSummary = (data, forms, labels, i18n, isExperimentEnabled) =>
|
|
|
1218
1266
|
data[form],
|
|
1219
1267
|
labels,
|
|
1220
1268
|
datasetUtils,
|
|
1221
|
-
|
|
1269
|
+
data.companyStructure?.entityType,
|
|
1222
1270
|
isCountryOfGoverningLawEnabled
|
|
1223
1271
|
)
|
|
1224
1272
|
};
|
|
@@ -1227,7 +1275,7 @@ const formatDataForSummary = (data, forms, labels, i18n, isExperimentEnabled) =>
|
|
|
1227
1275
|
...summaryData,
|
|
1228
1276
|
[form]: {
|
|
1229
1277
|
entityType: i18n.get(
|
|
1230
|
-
|
|
1278
|
+
companyTypeMetadata[data[form]?.entityType]?.name
|
|
1231
1279
|
)
|
|
1232
1280
|
}
|
|
1233
1281
|
};
|
|
@@ -1239,8 +1287,8 @@ const formatDataForSummary = (data, forms, labels, i18n, isExperimentEnabled) =>
|
|
|
1239
1287
|
additionalInformationFormName: formatAdditionalInformation(
|
|
1240
1288
|
data[form],
|
|
1241
1289
|
labels,
|
|
1242
|
-
|
|
1243
|
-
|
|
1290
|
+
data.basicInformation?.country,
|
|
1291
|
+
data.companyStructure?.entityType,
|
|
1244
1292
|
i18n
|
|
1245
1293
|
),
|
|
1246
1294
|
registrationAddress: mapAddressLabels(data[form].registrationAddress, datasetUtils),
|
|
@@ -1253,7 +1301,7 @@ const formatDataForSummary = (data, forms, labels, i18n, isExperimentEnabled) =>
|
|
|
1253
1301
|
...summaryData,
|
|
1254
1302
|
[form]: {
|
|
1255
1303
|
companyRegistrationDocument: {
|
|
1256
|
-
fileName:
|
|
1304
|
+
fileName: data[form].registrationDocument?.[0]?.name
|
|
1257
1305
|
}
|
|
1258
1306
|
}
|
|
1259
1307
|
};
|
|
@@ -1263,7 +1311,7 @@ const formatDataForSummary = (data, forms, labels, i18n, isExperimentEnabled) =>
|
|
|
1263
1311
|
...summaryData,
|
|
1264
1312
|
[form]: {
|
|
1265
1313
|
companyTaxDocument: {
|
|
1266
|
-
fileName:
|
|
1314
|
+
fileName: data[form].taxDocument?.[0]?.name
|
|
1267
1315
|
}
|
|
1268
1316
|
}
|
|
1269
1317
|
};
|
|
@@ -1273,7 +1321,7 @@ const formatDataForSummary = (data, forms, labels, i18n, isExperimentEnabled) =>
|
|
|
1273
1321
|
...summaryData,
|
|
1274
1322
|
[form]: {
|
|
1275
1323
|
companyProofOfDirectorDocument: {
|
|
1276
|
-
fileName:
|
|
1324
|
+
fileName: data[form].proofOfDirector?.[0]?.name
|
|
1277
1325
|
}
|
|
1278
1326
|
}
|
|
1279
1327
|
};
|
|
@@ -1283,7 +1331,7 @@ const formatDataForSummary = (data, forms, labels, i18n, isExperimentEnabled) =>
|
|
|
1283
1331
|
...summaryData,
|
|
1284
1332
|
[form]: {
|
|
1285
1333
|
companyProofOfSignatoryDocument: {
|
|
1286
|
-
fileName:
|
|
1334
|
+
fileName: data[form].proofOfSignatory?.[0]?.name
|
|
1287
1335
|
}
|
|
1288
1336
|
}
|
|
1289
1337
|
};
|
|
@@ -1293,19 +1341,24 @@ const formatDataForSummary = (data, forms, labels, i18n, isExperimentEnabled) =>
|
|
|
1293
1341
|
...summaryData,
|
|
1294
1342
|
[form]: {
|
|
1295
1343
|
companyProofOfOwnershipDocument: {
|
|
1296
|
-
fileName:
|
|
1344
|
+
fileName: data[form].proofOfOwnership?.map((doc) => doc.name).join("\n")
|
|
1297
1345
|
}
|
|
1298
1346
|
}
|
|
1299
1347
|
};
|
|
1300
|
-
case "companyFinancialInformation":
|
|
1348
|
+
case "companyFinancialInformation": {
|
|
1349
|
+
const isIncorporationDateDependencyEnabled = isExperimentEnabled(
|
|
1350
|
+
"EnableIncorporationDateBasedFinancialValidationForHO"
|
|
1351
|
+
);
|
|
1301
1352
|
return {
|
|
1302
1353
|
...summaryData,
|
|
1303
1354
|
[form]: formatFinancialInformationSummary(
|
|
1304
1355
|
data[form],
|
|
1305
1356
|
i18n,
|
|
1306
|
-
|
|
1357
|
+
data?.basicInformation?.country,
|
|
1358
|
+
isIncorporationDateDependencyEnabled ? data?.additionalInformation?.dateOfIncorporation : void 0
|
|
1307
1359
|
)
|
|
1308
1360
|
};
|
|
1361
|
+
}
|
|
1309
1362
|
default:
|
|
1310
1363
|
return summaryData;
|
|
1311
1364
|
}
|
|
@@ -1326,12 +1379,11 @@ async function submitDocuments({
|
|
|
1326
1379
|
if (formattedDocument) {
|
|
1327
1380
|
await documentUtils.uploadDocuments(formattedDocument, legalEntity.id);
|
|
1328
1381
|
formattedDocument.forEach((doc) => {
|
|
1329
|
-
|
|
1330
|
-
userEvents == null ? void 0 : userEvents.addTaskEvent("Success", {
|
|
1382
|
+
userEvents?.addTaskEvent("Success", {
|
|
1331
1383
|
...additionalTrackingParams,
|
|
1332
1384
|
actionType: "upload",
|
|
1333
1385
|
documentType: doc.type,
|
|
1334
|
-
fileExtention:
|
|
1386
|
+
fileExtention: doc.attachments?.map((item) => getFileExtention(item.pageName)).filter((item) => item !== void 0) ?? []
|
|
1335
1387
|
});
|
|
1336
1388
|
});
|
|
1337
1389
|
}
|
|
@@ -1367,17 +1419,16 @@ async function submit({
|
|
|
1367
1419
|
isExperimentEnabled,
|
|
1368
1420
|
userEvents
|
|
1369
1421
|
}) {
|
|
1370
|
-
var _a, _b, _c, _d, _e;
|
|
1371
1422
|
const logger = createLogger();
|
|
1372
1423
|
setLoadingStatus("loading");
|
|
1373
1424
|
const trackingPayload = {
|
|
1374
1425
|
...additionalTrackingParams,
|
|
1375
1426
|
actionType: "submit",
|
|
1376
|
-
companyStructure:
|
|
1377
|
-
countryOfRegistration:
|
|
1378
|
-
legalEntityName: accountHolder === "theCompanyIWorkFor" ?
|
|
1427
|
+
companyStructure: data.companyStructure?.entityType ?? null,
|
|
1428
|
+
countryOfRegistration: data.basicInformation?.country ?? null,
|
|
1429
|
+
legalEntityName: accountHolder === "theCompanyIWorkFor" ? data.basicInformation?.legalCompanyName ?? null : null,
|
|
1379
1430
|
// Only send legalCompanyName for organizations
|
|
1380
|
-
usedAdditionalAddress:
|
|
1431
|
+
usedAdditionalAddress: data.additionalInformation?.operationalAddressIsSame === operationalAddressIsSameIds.OPERATIONAL_ADDRESS_IS_NOT_SAME
|
|
1381
1432
|
};
|
|
1382
1433
|
const entityToUpdate = (() => {
|
|
1383
1434
|
switch (taskType) {
|
|
@@ -1392,12 +1443,12 @@ async function submit({
|
|
|
1392
1443
|
}
|
|
1393
1444
|
})();
|
|
1394
1445
|
const handleSubmitLegalEntity = async (legalEntity) => {
|
|
1395
|
-
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) {
|
|
1396
1447
|
return await createLegalEntity(legalEntity);
|
|
1397
1448
|
} else {
|
|
1398
1449
|
return handleUpdateLegalEntity({
|
|
1399
1450
|
...drop("type").from(legalEntity),
|
|
1400
|
-
id:
|
|
1451
|
+
id: entityToUpdate?.id ?? legalEntityResponse.id
|
|
1401
1452
|
});
|
|
1402
1453
|
}
|
|
1403
1454
|
};
|
|
@@ -1409,7 +1460,7 @@ async function submit({
|
|
|
1409
1460
|
if (nestedLegalEntityDetails2 && associatedLegalArrangement2) {
|
|
1410
1461
|
const existingEntityAssociations = getOwnEntityAssociations(associatedLegalArrangement2);
|
|
1411
1462
|
const existingRoles = existingEntityAssociations.filter((ea) => ea.legalEntityId === associatedLegalArrangement2.id).map(({ type }) => type);
|
|
1412
|
-
const newRoles =
|
|
1463
|
+
const newRoles = nestedLegalEntityDetails2?.roles ?? [];
|
|
1413
1464
|
const rolesChanged = !doArraysMatch(existingRoles, newRoles);
|
|
1414
1465
|
if (rolesChanged) {
|
|
1415
1466
|
const updatedAssociations = {
|
|
@@ -1441,7 +1492,7 @@ async function submit({
|
|
|
1441
1492
|
};
|
|
1442
1493
|
const savedLegalEntityData = legalEntityResponse ? mapLegalEntityToBusinessDetailsSchema(legalEntityResponse) : null;
|
|
1443
1494
|
const filteredData = savedLegalEntityData ? setRemovedFieldsOnSchemaToDeletedValue(data, savedLegalEntityData) : data;
|
|
1444
|
-
if (
|
|
1495
|
+
if (filteredData?.additionalInformation && !filteredData?.additionalInformation?.taxInformation) {
|
|
1445
1496
|
filteredData.additionalInformation.taxInformation = void 0;
|
|
1446
1497
|
}
|
|
1447
1498
|
const isCountryOfGoverningLawEnabled = isExperimentEnabled(
|
|
@@ -1449,9 +1500,9 @@ async function submit({
|
|
|
1449
1500
|
);
|
|
1450
1501
|
const countryOfGoverningLaw = getCountryOfGoverningLaw(
|
|
1451
1502
|
isCountryOfGoverningLawEnabled,
|
|
1452
|
-
filteredData
|
|
1503
|
+
filteredData?.basicInformation
|
|
1453
1504
|
);
|
|
1454
|
-
if (filteredData
|
|
1505
|
+
if (filteredData?.basicInformation) {
|
|
1455
1506
|
if (countryOfGoverningLaw) {
|
|
1456
1507
|
filteredData.basicInformation.countryOfGoverningLaw = countryOfGoverningLaw;
|
|
1457
1508
|
} else {
|
|
@@ -1468,7 +1519,7 @@ async function submit({
|
|
|
1468
1519
|
)
|
|
1469
1520
|
};
|
|
1470
1521
|
const legalEntity = await handleSubmitLegalEntity(mappedLegalEntity);
|
|
1471
|
-
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) {
|
|
1472
1523
|
await associateLegalEntityWithParent({
|
|
1473
1524
|
legalEntity,
|
|
1474
1525
|
associatedLegalArrangement,
|
|
@@ -1483,9 +1534,9 @@ async function submit({
|
|
|
1483
1534
|
forms,
|
|
1484
1535
|
userEvents
|
|
1485
1536
|
});
|
|
1486
|
-
userEvents
|
|
1537
|
+
userEvents?.addTaskEvent("Success", trackingPayload);
|
|
1487
1538
|
showToast({ label: i18n.get("successfullyUpdatedDetails"), variant: "success" });
|
|
1488
|
-
onExternalSubmit
|
|
1539
|
+
onExternalSubmit?.(data);
|
|
1489
1540
|
} catch (err) {
|
|
1490
1541
|
if (isValidationError(err)) {
|
|
1491
1542
|
setProblems({
|
|
@@ -1504,23 +1555,23 @@ async function submit({
|
|
|
1504
1555
|
showToast({ label: i18n.get("failedToUpdateDetails"), variant: "error" });
|
|
1505
1556
|
}
|
|
1506
1557
|
logger.error(err);
|
|
1507
|
-
userEvents
|
|
1558
|
+
userEvents?.addTaskEvent("Encountered error", {
|
|
1508
1559
|
...trackingPayload,
|
|
1509
|
-
returnType: err
|
|
1510
|
-
returnValue:
|
|
1560
|
+
returnType: err?.errorCode,
|
|
1561
|
+
returnValue: err?.title || "backend"
|
|
1511
1562
|
});
|
|
1512
1563
|
} finally {
|
|
1513
1564
|
setLoadingStatus("success");
|
|
1514
1565
|
}
|
|
1515
1566
|
}
|
|
1516
1567
|
const getCountryOfGoverningLaw = (isCountryOfGoverningLawEnabled, basicData) => {
|
|
1517
|
-
if (!isCountryOfGoverningLawEnabled ||
|
|
1568
|
+
if (!isCountryOfGoverningLawEnabled || basicData?.country !== CountryCodes.UnitedKingdom) {
|
|
1518
1569
|
return void 0;
|
|
1519
1570
|
}
|
|
1520
|
-
if (isCountryOfGoverningLawEnabled &&
|
|
1571
|
+
if (isCountryOfGoverningLawEnabled && basicData?.country === CountryCodes.UnitedKingdom && !basicData?.countryOfGoverningLaw) {
|
|
1521
1572
|
return CountryCodes.UnitedKingdom;
|
|
1522
1573
|
}
|
|
1523
|
-
return basicData
|
|
1574
|
+
return basicData?.countryOfGoverningLaw;
|
|
1524
1575
|
};
|
|
1525
1576
|
function BusinessDetailsDropin({
|
|
1526
1577
|
country,
|
|
@@ -1539,7 +1590,6 @@ function BusinessDetailsDropin({
|
|
|
1539
1590
|
onSubmit: onExternalSubmit,
|
|
1540
1591
|
handleHomeClick
|
|
1541
1592
|
}) {
|
|
1542
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r;
|
|
1543
1593
|
const formRef = useRef(null);
|
|
1544
1594
|
const { accountHolder, setAccountHolder } = useAccountHolder();
|
|
1545
1595
|
const { showToast } = useToastContext();
|
|
@@ -1554,20 +1604,19 @@ function BusinessDetailsDropin({
|
|
|
1554
1604
|
state: { currentState }
|
|
1555
1605
|
} = useStateContext();
|
|
1556
1606
|
useEffect(() => {
|
|
1557
|
-
onChange
|
|
1607
|
+
onChange?.(currentState);
|
|
1558
1608
|
}, [currentState, onChange]);
|
|
1559
1609
|
const isSoleProp = accountHolder === "mySoleProprietorName";
|
|
1560
1610
|
const formWith2Views = "basicInformation";
|
|
1561
1611
|
const isAssociationTaskType = !taskType ? accountHolder !== "theCompanyIWorkFor" : taskType !== TaskTypes.BUSINESS_DETAILS;
|
|
1562
1612
|
const legalEntityType = !isSoleProp ? LegalEntityType.ORGANIZATION : LegalEntityType.SOLE_PROPRIETORSHIP;
|
|
1563
1613
|
const isUS = country === CountryCodes.UnitedStates;
|
|
1564
|
-
const currentCountry =
|
|
1614
|
+
const currentCountry = currentState.data.basicInformation?.country ?? country;
|
|
1565
1615
|
const isSkippingCompanyStructure = isSettingEnabled(SettingNames.AllowLegalEntityTypeChange) && organizationTypesToSkipCompanyStructureForm.includes(
|
|
1566
|
-
|
|
1616
|
+
legalEntityResponse?.organization?.type
|
|
1567
1617
|
) && accountHolder !== "aTrust" || isSoleProp;
|
|
1568
1618
|
useEffect(() => {
|
|
1569
|
-
|
|
1570
|
-
const isBankAccountRequested = (_b2 = (_a2 = legalEntityResponse == null ? void 0 : legalEntityResponse.capabilities) == null ? void 0 : _a2.issueBankAccount) == null ? void 0 : _b2.requested;
|
|
1619
|
+
const isBankAccountRequested = legalEntityResponse?.capabilities?.issueBankAccount?.requested;
|
|
1571
1620
|
setIsBankAccountRequestedForOrganization(isBankAccountRequested);
|
|
1572
1621
|
}, [legalEntityResponse]);
|
|
1573
1622
|
const subjectEntity = !isAssociationTaskType ? legalEntityResponse : isSoleProp ? associatedLegalArrangement : nestedLegalEntity;
|
|
@@ -1578,7 +1627,7 @@ function BusinessDetailsDropin({
|
|
|
1578
1627
|
userEvents.updateBaseTrackingPayload({ task: taskType });
|
|
1579
1628
|
userEvents.addTaskEvent("Landed on page", {
|
|
1580
1629
|
actionType: "start",
|
|
1581
|
-
...
|
|
1630
|
+
...subjectEntity?.id && subjectEntity?.type && {
|
|
1582
1631
|
legalEntityId: subjectEntity.id,
|
|
1583
1632
|
entityType: subjectEntity.type
|
|
1584
1633
|
},
|
|
@@ -1592,9 +1641,9 @@ function BusinessDetailsDropin({
|
|
|
1592
1641
|
isSoleProp ? legalEntityResponse : void 0
|
|
1593
1642
|
);
|
|
1594
1643
|
});
|
|
1595
|
-
const [trustedFields, setTrustedFields] = useState(
|
|
1644
|
+
const [trustedFields, setTrustedFields] = useState(subjectEntity?.trustedFields ?? void 0);
|
|
1596
1645
|
const [currentProblems, setCurrentProblems] = useState(
|
|
1597
|
-
problems ??
|
|
1646
|
+
problems ?? getCapabilityProblems(legalEntityResponse, currentCountry)?.LegalEntity?.[legalEntityResponse.id]
|
|
1598
1647
|
);
|
|
1599
1648
|
const [showCompanyStructure, setShowCompanyStructure] = useState(
|
|
1600
1649
|
currentCountry !== "US" && !isSoleProp
|
|
@@ -1614,8 +1663,7 @@ function BusinessDetailsDropin({
|
|
|
1614
1663
|
rootLegalEntityId: rootLegalEntityId.value
|
|
1615
1664
|
});
|
|
1616
1665
|
useEffect(() => {
|
|
1617
|
-
|
|
1618
|
-
if (!((_a2 = subjectEntity == null ? void 0 : subjectEntity.documentDetails) == null ? void 0 : _a2.length)) return;
|
|
1666
|
+
if (!subjectEntity?.documentDetails?.length) return;
|
|
1619
1667
|
documentUtils.fetchDocuments(subjectEntity.documentDetails, subjectEntity.id).then(() => {
|
|
1620
1668
|
setInitialData(
|
|
1621
1669
|
mapLegalEntityToBusinessDetailsSchema(
|
|
@@ -1628,7 +1676,7 @@ function BusinessDetailsDropin({
|
|
|
1628
1676
|
);
|
|
1629
1677
|
}, []);
|
|
1630
1678
|
const parseConfiguration = useCallback(
|
|
1631
|
-
({ scenarios
|
|
1679
|
+
({ scenarios }) => composePerScenarioFormConfigurations(scenarios, businessDetailsFieldsPerScenario),
|
|
1632
1680
|
[]
|
|
1633
1681
|
);
|
|
1634
1682
|
const {
|
|
@@ -1664,8 +1712,8 @@ function BusinessDetailsDropin({
|
|
|
1664
1712
|
() => getPropsFromConfigurations(
|
|
1665
1713
|
fieldConfigurations,
|
|
1666
1714
|
initialForms,
|
|
1667
|
-
|
|
1668
|
-
|
|
1715
|
+
currentProblems?.remediationActions ? Object.values(currentProblems?.remediationActions) : [],
|
|
1716
|
+
currentProblems?.missingData ?? [],
|
|
1669
1717
|
subjectEntity ? subjectEntity.type === LegalEntityType.SOLE_PROPRIETORSHIP ? getFieldsWithExistingData(
|
|
1670
1718
|
subjectEntity,
|
|
1671
1719
|
solePropBusinessDetailsApiKeyMapping,
|
|
@@ -1678,14 +1726,14 @@ function BusinessDetailsDropin({
|
|
|
1678
1726
|
customRules,
|
|
1679
1727
|
{},
|
|
1680
1728
|
{},
|
|
1681
|
-
subjectEntity
|
|
1729
|
+
subjectEntity?.type,
|
|
1682
1730
|
trustedFields
|
|
1683
1731
|
),
|
|
1684
1732
|
[
|
|
1685
1733
|
fieldConfigurations,
|
|
1686
1734
|
initialForms,
|
|
1687
|
-
currentProblems
|
|
1688
|
-
currentProblems
|
|
1735
|
+
currentProblems?.remediationActions,
|
|
1736
|
+
currentProblems?.missingData,
|
|
1689
1737
|
subjectEntity,
|
|
1690
1738
|
customRules,
|
|
1691
1739
|
trustedFields
|
|
@@ -1706,11 +1754,11 @@ function BusinessDetailsDropin({
|
|
|
1706
1754
|
enabled: showBusinessSelection
|
|
1707
1755
|
}
|
|
1708
1756
|
);
|
|
1709
|
-
const companySearchResults = companySearchResponse
|
|
1710
|
-
const businessName =
|
|
1711
|
-
const nameMatch = isNormalizedStringMatch(businessName,
|
|
1712
|
-
const taxInformation =
|
|
1713
|
-
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 || "";
|
|
1714
1762
|
const [prevCompanySearchResults, setPrevCompanySearchResults] = useState(companySearchResults);
|
|
1715
1763
|
useEffect(() => {
|
|
1716
1764
|
if (!searchingCompanies && companySearchResults) {
|
|
@@ -1720,7 +1768,7 @@ function BusinessDetailsDropin({
|
|
|
1720
1768
|
additionalData: {
|
|
1721
1769
|
numberOfResults: companySearchResults.length
|
|
1722
1770
|
},
|
|
1723
|
-
...
|
|
1771
|
+
...subjectEntity?.id && subjectEntity?.type && {
|
|
1724
1772
|
legalEntityId: subjectEntity.id,
|
|
1725
1773
|
entityType: subjectEntity.type
|
|
1726
1774
|
},
|
|
@@ -1745,8 +1793,8 @@ function BusinessDetailsDropin({
|
|
|
1745
1793
|
const forms = useMemo(() => {
|
|
1746
1794
|
const requiredForms = getRequiredForms(
|
|
1747
1795
|
initialForms,
|
|
1748
|
-
derivedProps
|
|
1749
|
-
derivedProps
|
|
1796
|
+
derivedProps?.requiredFields,
|
|
1797
|
+
derivedProps?.optionalFields
|
|
1750
1798
|
);
|
|
1751
1799
|
const validityAddedForms = addValidityToForms(
|
|
1752
1800
|
requiredForms,
|
|
@@ -1759,8 +1807,8 @@ function BusinessDetailsDropin({
|
|
|
1759
1807
|
);
|
|
1760
1808
|
}, [
|
|
1761
1809
|
initialForms,
|
|
1762
|
-
derivedProps
|
|
1763
|
-
derivedProps
|
|
1810
|
+
derivedProps?.requiredFields,
|
|
1811
|
+
derivedProps?.optionalFields,
|
|
1764
1812
|
currentState.validityByForm,
|
|
1765
1813
|
currentProblems,
|
|
1766
1814
|
currentCountry,
|
|
@@ -1772,7 +1820,7 @@ function BusinessDetailsDropin({
|
|
|
1772
1820
|
data: formatDataForSummary(
|
|
1773
1821
|
currentState.data,
|
|
1774
1822
|
forms,
|
|
1775
|
-
derivedProps
|
|
1823
|
+
derivedProps?.labels,
|
|
1776
1824
|
i18n,
|
|
1777
1825
|
isExperimentEnabled
|
|
1778
1826
|
),
|
|
@@ -1780,7 +1828,7 @@ function BusinessDetailsDropin({
|
|
|
1780
1828
|
keys: ["operationalAddressIsSame"]
|
|
1781
1829
|
}
|
|
1782
1830
|
}),
|
|
1783
|
-
[currentState.data, derivedProps
|
|
1831
|
+
[currentState.data, derivedProps?.labels, forms, i18n, isExperimentEnabled]
|
|
1784
1832
|
);
|
|
1785
1833
|
const canSubmitForm = useMemo(
|
|
1786
1834
|
() => canSubmit(currentState.data) && hasDataChanged(initialData, currentState.data),
|
|
@@ -1860,13 +1908,13 @@ function BusinessDetailsDropin({
|
|
|
1860
1908
|
return;
|
|
1861
1909
|
}
|
|
1862
1910
|
const { data: refetchedTinResponse } = await fetchTin();
|
|
1863
|
-
if (
|
|
1911
|
+
if (refetchedTinResponse?.matched === true) {
|
|
1864
1912
|
setShowCompanyStructure(true);
|
|
1865
1913
|
setBusinessMismatchModalOpen(false);
|
|
1866
1914
|
} else {
|
|
1867
1915
|
setBusinessMismatchModalOpen(true);
|
|
1868
1916
|
setTinMatched(false);
|
|
1869
|
-
if (
|
|
1917
|
+
if (subjectEntity?.id && subjectEntity?.type) {
|
|
1870
1918
|
userEvents.addPageEvent("Encountered error", {
|
|
1871
1919
|
actionType: "submit",
|
|
1872
1920
|
label: "tinVerificationFailure",
|
|
@@ -1883,20 +1931,20 @@ function BusinessDetailsDropin({
|
|
|
1883
1931
|
businessName,
|
|
1884
1932
|
tin,
|
|
1885
1933
|
getCompanySelection,
|
|
1886
|
-
subjectEntity
|
|
1887
|
-
subjectEntity
|
|
1934
|
+
subjectEntity?.id,
|
|
1935
|
+
subjectEntity?.type,
|
|
1888
1936
|
associatedLeTrackingParams,
|
|
1889
1937
|
userEvents
|
|
1890
1938
|
]);
|
|
1891
1939
|
if (prevCompanySearchResults !== companySearchResults) {
|
|
1892
|
-
if (
|
|
1940
|
+
if (companySearchResults?.length === 1 && nameMatch) {
|
|
1893
1941
|
setSingleCompanyDatasetParams({
|
|
1894
1942
|
company: companySearchResults[0],
|
|
1895
|
-
state:
|
|
1943
|
+
state: currentState.data.basicInformation?.stateOrProvince,
|
|
1896
1944
|
name: businessName,
|
|
1897
1945
|
tin
|
|
1898
1946
|
});
|
|
1899
|
-
} else if (
|
|
1947
|
+
} else if (companySearchResults?.length === 0 && !searchingCompanies && showBusinessSelection) {
|
|
1900
1948
|
proceedToManualDataEntry();
|
|
1901
1949
|
}
|
|
1902
1950
|
setPrevCompanySearchResults(companySearchResults);
|
|
@@ -1905,7 +1953,7 @@ function BusinessDetailsDropin({
|
|
|
1905
1953
|
singleCompanyDatasetAndTinResponse
|
|
1906
1954
|
);
|
|
1907
1955
|
if (prevSingleCompanyDatasetResponse !== singleCompanyDatasetAndTinResponse) {
|
|
1908
|
-
if (
|
|
1956
|
+
if (singleCompanyDatasetAndTinResponse?.tinMatched === true) {
|
|
1909
1957
|
setVerifiedBusiness(singleCompanyDatasetAndTinResponse);
|
|
1910
1958
|
handleNextClick();
|
|
1911
1959
|
} else {
|
|
@@ -1931,7 +1979,7 @@ function BusinessDetailsDropin({
|
|
|
1931
1979
|
const selectedFormId = forms[index].formId;
|
|
1932
1980
|
if (selectedFormId === formWith2Views) {
|
|
1933
1981
|
if (verifiedBusiness$1) setShowBusinessSelection(false);
|
|
1934
|
-
if (activeForm.formId === "companyStructure" &&
|
|
1982
|
+
if (activeForm.formId === "companyStructure" && companySearchResults?.length) {
|
|
1935
1983
|
setShowCompanyStructure(false);
|
|
1936
1984
|
}
|
|
1937
1985
|
return gotoFormByFormIndex(index);
|
|
@@ -1949,20 +1997,19 @@ function BusinessDetailsDropin({
|
|
|
1949
1997
|
gotoFormByFormIndex,
|
|
1950
1998
|
verifiedBusiness$1,
|
|
1951
1999
|
activeForm.formId,
|
|
1952
|
-
companySearchResults
|
|
2000
|
+
companySearchResults?.length,
|
|
1953
2001
|
isBusinessSelection
|
|
1954
2002
|
]
|
|
1955
2003
|
);
|
|
1956
2004
|
const nextClick = useCallback(() => {
|
|
1957
|
-
var _a2, _b2, _c2, _d2, _e2, _f2;
|
|
1958
2005
|
if (!COUNTRIES_USING_COMPANY_SEARCH.includes(currentCountry) || accountHolder !== "theCompanyIWorkFor")
|
|
1959
2006
|
return handleNextClick();
|
|
1960
|
-
if (activeForm.formId === formWith2Views &&
|
|
2007
|
+
if (activeForm.formId === formWith2Views && currentState.validityByForm?.basicInformation && !isBusinessSelection && !verifiedBusiness$1) {
|
|
1961
2008
|
setCompanySearchParams({
|
|
1962
|
-
legalCompanyName:
|
|
1963
|
-
country:
|
|
1964
|
-
stateOrProvince:
|
|
1965
|
-
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
|
|
1966
2013
|
});
|
|
1967
2014
|
setShowBusinessSelection(true);
|
|
1968
2015
|
} else {
|
|
@@ -1973,17 +2020,17 @@ function BusinessDetailsDropin({
|
|
|
1973
2020
|
isSoleProp,
|
|
1974
2021
|
handleNextClick,
|
|
1975
2022
|
activeForm.formId,
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
|
|
2023
|
+
currentState.validityByForm?.basicInformation,
|
|
2024
|
+
currentState?.data.basicInformation?.legalCompanyName,
|
|
2025
|
+
currentState?.data.basicInformation?.country,
|
|
2026
|
+
currentState?.data.basicInformation?.stateOrProvince,
|
|
2027
|
+
currentState?.data.basicInformation?.registrationNumber,
|
|
1981
2028
|
isBusinessSelection,
|
|
1982
2029
|
verifiedBusiness$1,
|
|
1983
2030
|
country
|
|
1984
2031
|
]);
|
|
1985
2032
|
const backClick = useCallback(() => {
|
|
1986
|
-
if (!COUNTRIES_USING_COMPANY_SEARCH.includes(currentCountry)) handleBackClick
|
|
2033
|
+
if (!COUNTRIES_USING_COMPANY_SEARCH.includes(currentCountry)) handleBackClick?.();
|
|
1987
2034
|
else {
|
|
1988
2035
|
switch (activeForm.formId) {
|
|
1989
2036
|
case formWith2Views: {
|
|
@@ -1994,22 +2041,22 @@ function BusinessDetailsDropin({
|
|
|
1994
2041
|
if (searchingError) {
|
|
1995
2042
|
setShowBusinessSelection(false);
|
|
1996
2043
|
setShowCompanyStructure(false);
|
|
1997
|
-
handleBackClick
|
|
2044
|
+
handleBackClick?.();
|
|
1998
2045
|
break;
|
|
1999
2046
|
}
|
|
2000
2047
|
if (!searchingCompanies && companySearchResults && !companySearchResults.length) {
|
|
2001
2048
|
setShowBusinessSelection(false);
|
|
2002
2049
|
} else if (!verifiedBusiness$1) setShowCompanyStructure(false);
|
|
2003
|
-
handleBackClick
|
|
2050
|
+
handleBackClick?.();
|
|
2004
2051
|
break;
|
|
2005
2052
|
}
|
|
2006
2053
|
case "additionalInformation": {
|
|
2007
2054
|
if (verifiedBusiness$1) setShowBusinessSelection(false);
|
|
2008
|
-
handleBackClick
|
|
2055
|
+
handleBackClick?.();
|
|
2009
2056
|
break;
|
|
2010
2057
|
}
|
|
2011
2058
|
default:
|
|
2012
|
-
handleBackClick
|
|
2059
|
+
handleBackClick?.();
|
|
2013
2060
|
break;
|
|
2014
2061
|
}
|
|
2015
2062
|
}
|
|
@@ -2024,7 +2071,7 @@ function BusinessDetailsDropin({
|
|
|
2024
2071
|
verifiedBusiness$1
|
|
2025
2072
|
]);
|
|
2026
2073
|
const homeClick = () => {
|
|
2027
|
-
handleHomeClick
|
|
2074
|
+
handleHomeClick?.();
|
|
2028
2075
|
};
|
|
2029
2076
|
const handleBusinessMismatchContinue = useCallback(() => {
|
|
2030
2077
|
setShowCompanyStructure(true);
|
|
@@ -2032,7 +2079,7 @@ function BusinessDetailsDropin({
|
|
|
2032
2079
|
setBusinessMismatchModalOpen(false);
|
|
2033
2080
|
}, [setShowCompanyStructure, setTrustedFields, setBusinessMismatchModalOpen]);
|
|
2034
2081
|
const handleBusinessMismatchCancel = useCallback(() => {
|
|
2035
|
-
backClick
|
|
2082
|
+
backClick?.();
|
|
2036
2083
|
setBusinessMismatchModalOpen(false);
|
|
2037
2084
|
setTinMatched(void 0);
|
|
2038
2085
|
}, [backClick, setTinMatched, setBusinessMismatchModalOpen]);
|
|
@@ -2057,20 +2104,19 @@ function BusinessDetailsDropin({
|
|
|
2057
2104
|
queryClient
|
|
2058
2105
|
]);
|
|
2059
2106
|
useEffect(() => {
|
|
2060
|
-
|
|
2061
|
-
if ((verifiedBusiness$1 == null ? void 0 : verifiedBusiness$1.name) && ((_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)) {
|
|
2062
2108
|
setShowCompanyStructure(false);
|
|
2063
2109
|
resetBusinessData();
|
|
2064
2110
|
}
|
|
2065
2111
|
}, [
|
|
2066
2112
|
companySearchParams,
|
|
2067
2113
|
currentState.data.basicInformation,
|
|
2068
|
-
|
|
2114
|
+
currentState.data.basicInformation?.legalCompanyName,
|
|
2069
2115
|
resetBusinessData,
|
|
2070
2116
|
verifiedBusiness$1
|
|
2071
2117
|
]);
|
|
2072
2118
|
const [prevCurrentCountry, setPrevCurrentCountry] = useState(currentCountry);
|
|
2073
|
-
if (prevCurrentCountry !== currentCountry &&
|
|
2119
|
+
if (prevCurrentCountry !== currentCountry && trustedFields?.length && legalEntityResponse.organization?.registeredAddress.country !== currentCountry) {
|
|
2074
2120
|
setTrustedFields(void 0);
|
|
2075
2121
|
setPrevCurrentCountry(currentCountry);
|
|
2076
2122
|
}
|