@adyen/kyc-components 3.94.0 → 3.95.0-beta.0
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-UXDlHmf_.js → AcceptTermsOfServiceComponent-DQBTbYHm.js} +36 -32
- package/dist/{Accordion-DM9qeMoR.js → Accordion-CyFxp5eR.js} +2 -2
- package/dist/{AccountSetupRejected-DfmKQEp-.js → AccountSetupRejected-BgPC6a82.js} +4 -4
- package/dist/{ActionBar-DCKuV5BO.js → ActionBar-DuqmbwPb.js} +2 -2
- package/dist/{Address-BEUcWe_H.js → Address-uWZO7A9W.js} +10 -12
- package/dist/{Alert-D9HbhU88.js → Alert-BpQzk7oa.js} +3 -3
- package/dist/{Avatar-C_tjYaBz.js → Avatar-cL2Btfr9.js} +2 -2
- package/dist/{BusinessFinancingComponent-B5gLGmkK.js → BusinessFinancingComponent-DQnluWsY.js} +7 -7
- package/dist/{BusinessFinancingDropin-BpZKzB71.js → BusinessFinancingDropin-TTX58HNJ.js} +689 -307
- package/dist/{BusinessFinancingPage-CKdy77OK.js → BusinessFinancingPage-CARcv8Qh.js} +5 -5
- package/dist/{BusinessTypeSelectionPage-ClkY9cbT.js → BusinessTypeSelectionPage-BamCO_8X.js} +9 -9
- package/dist/{Checkbox-BU4IYlt6.js → Checkbox-4TE31vJm.js} +2 -2
- package/dist/{Confirm-BM1PTsnm.js → Confirm-BCbTBwh3.js} +3 -3
- package/dist/{ConstitutionalDocument-D9sPfw_B.js → ConstitutionalDocument-DAXsUY5o.js} +37 -30
- package/dist/{ContactDetails-BRnbG7BX.js → ContactDetails-DF1ERAlH.js} +8 -8
- package/dist/{ContextGuidance-CZGa7C-r.js → ContextGuidance-c2saCqxR.js} +3 -3
- package/dist/{ContractViewer-Byp71k2e.js → ContractViewer-DcQHIGMU.js} +2 -2
- package/dist/{CountryField-DShqP-Yi.js → CountryField-0SyPMIyv.js} +6 -6
- package/dist/{CreateIndividualComponent-BZ6dd8Bd.js → CreateIndividualComponent-BEG5bcc8.js} +7 -7
- package/dist/{CreateTransferInstrumentComponent-1pjVr_3y.js → CreateTransferInstrumentComponent-UEBRtXZu.js} +5 -5
- package/dist/{Currency-CEtDxV-F.js → Currency-CYaHlY2Z.js} +7 -11
- package/dist/{CustomerSupport-gmN79qSl.js → CustomerSupport-CZAM9Fzm.js} +11 -11
- package/dist/{DebugModal-C3horl0P.js → DebugModal-Dpm0S2dA.js} +9 -9
- package/dist/{DecisionMakerDetailsPage-CN1t2Ok6.js → DecisionMakerDetailsPage-CgEYI6wt.js} +14 -10
- package/dist/{DecisionMakers-83kflZpA.js → DecisionMakers-Dj2lHuCW.js} +36 -26
- package/dist/{Dropzone-DYIUInYF.js → Dropzone-D-KrwtNK.js} +4 -4
- package/dist/{EmbeddedStatus-BID4yaOx.js → EmbeddedStatus-Bz7OcIMW.js} +3 -3
- package/dist/{EndStateLayout-Cqmi0QYW.js → EndStateLayout-DnGdtXOr.js} +2 -2
- package/dist/{EntityAssociation-jMAjopdW.js → EntityAssociation-ysCVZKn5.js} +35 -23
- package/dist/{EntityGuidanceStatus-ek-5IvZb.js → EntityGuidanceStatus-BHI0RfAS.js} +3 -3
- package/dist/{ErrorPanel-ByEaxCQu.js → ErrorPanel-CAHQTbMv.js} +3 -3
- package/dist/{Field-Cp_UOAnA.js → Field-CApB-T06.js} +2 -2
- package/dist/{FormNavigation-CttAyMuX.js → FormNavigation-DSCpClML.js} +3 -3
- package/dist/{FormWrapper-C8UDjnjQ.js → FormWrapper-CVN-7oA1.js} +9 -9
- package/dist/{Header-CIxJSQWR.js → Header-DCVQMDDt.js} +2 -2
- package/dist/{Image-T-D-HDf5.js → Image-CJu0BRVo.js} +2 -2
- package/dist/{Individual.rules-DEhHxeiv.js → Individual.rules-NaoLBYL8.js} +29 -14
- package/dist/{IndividualDropin-Dz2ooI0s.js → IndividualDropin-CfUopCha.js} +71 -63
- package/dist/{InputDate-z9OpUslu.js → InputDate-CiL0lNHS.js} +2 -2
- package/dist/{InputText-CBhD5jca.js → InputText-BV_-tgjA.js} +2 -2
- package/dist/{Introduction-Bm3kybSH.js → Introduction-D1Ki78MP.js} +4 -4
- package/dist/{JpAddress-owiNWOqn.js → JpAddress-UoTJ6rCV.js} +18 -13
- package/dist/{LandingLayout-BuBU3Pyb.js → LandingLayout-Cn77l9Co.js} +2 -2
- package/dist/{fieldConfig-CMdKt41r.js → LegalCompanyNameField-iFBtpehs.js} +71 -67
- package/dist/{LegalRepresentativeDetailsPage-vS7jAxuO.js → LegalRepresentativeDetailsPage-B0UoHJQJ.js} +5 -5
- package/dist/{Link-CIBefZJS.js → Link-BJyutNM5.js} +2 -2
- package/dist/{ListItem-CnzgA-sH.js → ListItem-Bgm6YMzN.js} +3 -3
- package/dist/{LoaderWrapper-CwhIpGKR.js → LoaderWrapper-C4vG5XIf.js} +1 -1
- package/dist/ManageIndividualComponent-D9R1S14p.js +46 -0
- package/dist/{ManageTermsOfServiceComponent-BdiC5Nbd.js → ManageTermsOfServiceComponent-CwmatDwh.js} +5 -5
- package/dist/{ManageTransferInstrumentComponent-CObC5Uof.js → ManageTransferInstrumentComponent-2b76XSTc.js} +15 -14
- package/dist/{MaskedInput-BfI4FGAA.js → MaskedInput-BbFU7XNV.js} +5 -5
- package/dist/{MaybeModal-DHcu32Dh.js → MaybeModal-BpIcw6KQ.js} +3 -3
- package/dist/{Modal-BKWXTEoU.js → Modal-CJUtsR2N.js} +2 -2
- package/dist/{Name-BCar2_dk.js → Name-DTE823OG.js} +5 -5
- package/dist/{OnboardingDropinComponent-DstStqYS.js → OnboardingDropinComponent-BX4esftr.js} +850 -520
- package/dist/{PayoutDetailsDropin-DSdlqAe2.js → PayoutDetailsDropin-Cqeomvbg.js} +130 -77
- package/dist/{RadioGroup-COsozc9g.js → RadioGroup-DzUpgP12.js} +2 -2
- package/dist/{RadioGroupCard-xqC3IACY.js → RadioGroupCard-g4OS0871.js} +2 -2
- package/dist/{Review-CZwc-DMp.js → Review-Cj1WCiGQ.js} +7 -7
- package/dist/RootBusinessDetailsPage-9NXM1XdC.js +50 -0
- package/dist/{RootBusinessLinesPage-BRgtyHFs.js → RootBusinessLinesPage-YxGXibwW.js} +27 -24
- package/dist/{RootIndividualDetailsPage-C3wTzTp1.js → RootIndividualDetailsPage-DX1rjTXN.js} +7 -6
- package/dist/{Select-DeTBytOH.js → Select-C_6mHv91.js} +4 -4
- package/dist/{SignPCIComponent-CCGyrXvI.js → SignPCIComponent-OxWCtP3x.js} +14 -14
- package/dist/{SingpassSelection-BumqRwXI.js → SingpassSelection-DE4uUTZo.js} +6 -6
- package/dist/SoleProprietorshipPage-BzpFPKOl.js +50 -0
- package/dist/{SourceOfFundsPage-DkjYls-E.js → SourceOfFundsPage-CESAo3kl.js} +33 -32
- package/dist/{StepProgressIndicator-D8PfKJKf.js → StepProgressIndicator-a3q7kzzC.js} +2 -2
- package/dist/{StoreProvider-CsZ-qrGt.js → StoreProvider-BL3nK1iO.js} +157 -132
- package/dist/{StructuredList-9dnJRdx_.js → StructuredList-BNLhk_zV.js} +1 -1
- package/dist/{Summary-DPm9r7Az.js → Summary-8HdspbcQ.js} +19 -8
- package/dist/{TaskVerificationStatus-DrOQToMh.js → TaskVerificationStatus-ycoS73dK.js} +2 -2
- package/dist/{TaxInformationField-NI7Hbgov.js → TaxInformationField-BfDJhJG4.js} +438 -81
- package/dist/{TaxReportingDropin-BBUAxx92.js → TaxReportingDropin-xYD4YqWR.js} +18 -18
- package/dist/{TextArea-CCjCNpAP.js → TextArea-CWY-x138.js} +2 -2
- package/dist/{TileGroup-BhKhvfLz.js → TileGroup-DmZTiaip.js} +3 -3
- package/dist/{TrustDetailsPage-yOmFcEyO.js → TrustDetailsPage-JQ-U6HZk.js} +44 -38
- package/dist/TrustMemberCompanyPage-WwsnSV7c.js +68 -0
- package/dist/{TrustMemberIndividualPage-B8tb56n2.js → TrustMemberIndividualPage-27y1WJMM.js} +11 -8
- package/dist/{TrustMemberRoleAndTypePage-WHu1tc4O.js → TrustMemberRoleAndTypePage-DHCLuLa-.js} +43 -38
- package/dist/{TrustMembersOverview-BWbGUK3k.js → TrustMembersOverview-CqdtBx67.js} +13 -13
- package/dist/{UnincorporatedPartnershipIndividualPage-DD2dn41k.js → UnincorporatedPartnershipIndividualPage-xOJ-Kusf.js} +10 -7
- package/dist/{UnincorporatedPartnershipMemberCompanyPage-DsUSSYnI.js → UnincorporatedPartnershipMemberCompanyPage-CBw2IY6X.js} +10 -7
- package/dist/{UnincorporatedPartnershipMemberRoleAndTypePage-Ctb0Lz_0.js → UnincorporatedPartnershipMemberRoleAndTypePage-B4fDDHnW.js} +15 -12
- package/dist/{UnincorporatedPartnershipMembersOverview-B_GJIeZC.js → UnincorporatedPartnershipMembersOverview-BrBvKluu.js} +9 -9
- package/dist/{VerificationErrorAlert-CCiMqGl8.js → VerificationErrorAlert-DXaYFyA9.js} +4 -24
- package/dist/{ViewVerificationStatusComponent-CICJ6cy4.js → ViewVerificationStatusComponent-YY4hrQ8I.js} +4 -4
- package/dist/accountHolderUtils-DP6cbO7y.js +66 -0
- package/dist/adyen-business-financing.js +3 -3
- package/dist/adyen-individual-configuration.js +3 -3
- package/dist/adyen-individual-status.js +3 -3
- package/dist/adyen-kyc-components.js +20 -19
- package/dist/adyen-onboarding.js +3 -3
- package/dist/adyen-terms-of-service-management.js +3 -3
- package/dist/adyen-terms-of-service-status.js +3 -3
- package/dist/adyen-transfer-instrument-configuration.js +3 -3
- package/dist/adyen-transfer-instrument-management.js +3 -3
- package/dist/adyen-verification-status.js +3 -3
- package/dist/{bafinUtils-Ch6rVpGi.js → bafinUtils-BCq4-e97.js} +3 -22
- package/dist/bg-BG-CFuVZnaC.js +13 -0
- package/dist/{bg-BG-CepHap8j.js → bg-BG-DMNRRZZE.js} +8 -1
- package/dist/bg-BG-Dp1J1L2X.js +13 -0
- package/dist/{commonValidators-B8wfpMjX.js → commonValidators-BXRpCFOY.js} +2 -2
- package/dist/company-types-value-D_mKv5PT.js +23 -0
- package/dist/cs-CZ-Bd9Zz7z4.js +13 -0
- package/dist/cs-CZ-CYsR__kj.js +13 -0
- package/dist/{cs-CZ-BP7niQM9.js → cs-CZ-DXSMRqPu.js} +8 -1
- package/dist/da-DK-B3Pg-MWO.js +13 -0
- package/dist/{da-DK-Dc0QYG8m.js → da-DK-Cd5IQPv3.js} +8 -1
- package/dist/da-DK-DmFDgnbC.js +13 -0
- package/dist/{de-DE-Dz2OsS1F.js → de-DE-C9NH2zMh.js} +8 -1
- package/dist/de-DE-DRuKxSOy.js +13 -0
- package/dist/de-DE-S6qDey1L.js +13 -0
- package/dist/{dropinUtils-B4Vv7_zJ.js → dropinUtils-DGUJjA6y.js} +4 -4
- package/dist/el-GR-Cezskrdn.js +13 -0
- package/dist/{el-GR-BHG69mXl.js → el-GR-DTHQslLc.js} +8 -1
- package/dist/el-GR-DoS_Va-n.js +13 -0
- package/dist/{en-US-CzEL6t1W.js → en-US-D1sB335h.js} +9 -3
- package/dist/en-US-DLY20x1O.js +13 -0
- package/dist/{en-US-D-B35AoN.js → en-US-DYP6rAvA.js} +8 -1
- package/dist/{en-US-fyGPkcqX.js → en-US-cVpRgdC8.js} +2 -2
- package/dist/es-ES-BYl5-PFR.js +13 -0
- package/dist/{es-ES-BI_jdT67.js → es-ES-DK-7qtDf.js} +8 -1
- package/dist/es-ES-DzB4V6UZ.js +13 -0
- package/dist/et-EE-4fHYOoff.js +13 -0
- package/dist/et-EE-BkHzGD3D.js +13 -0
- package/dist/{et-EE-C_PZO2aI.js → et-EE-DNC4hcxm.js} +8 -1
- package/dist/{fi-FI-hwzizPnr.js → fi-FI-BJLU1JHw.js} +8 -1
- package/dist/fi-FI-Cxkp0GQA.js +13 -0
- package/dist/fi-FI-DFxljML-.js +13 -0
- package/dist/filterProblemsByTaskForms-Cz7iQtms.js +30 -0
- package/dist/{formUtils-q44BTi2U.js → formUtils-CJQolfmf.js} +3 -22
- package/dist/{fr-FR-CYZXbwc9.js → fr-FR-B2je0smB.js} +8 -1
- package/dist/fr-FR-DPehHVb6.js +13 -0
- package/dist/fr-FR-DsEmssxk.js +13 -0
- package/dist/{getName-BxKx8lLd.js → getName-C1AIqAns.js} +2 -2
- package/dist/{getProps-CLJfvUMb.js → getProps-O8Fpl_k_.js} +2 -6
- package/dist/getTrustedFields-C5-mXl-l.js +64 -0
- package/dist/hr-HR-Bjx-KdVs.js +13 -0
- package/dist/{hr-HR-bE6cvRCQ.js → hr-HR-C0NLgF1r.js} +8 -1
- package/dist/hr-HR-DU4nvY6g.js +13 -0
- package/dist/hu-HU-B-lUkFnQ.js +13 -0
- package/dist/hu-HU-D6frnZmR.js +13 -0
- package/dist/{hu-HU-DG-NUDx4.js → hu-HU-DU-5ujQK.js} +8 -1
- package/dist/{iframeWidget-iDH8bVr4.js → iframeWidget-DRjCrrYZ.js} +4 -4
- package/dist/{isEmpty-BNacTlfR.js → isEmpty-C7bLX-qG.js} +2 -2
- package/dist/isNewEntity-7Vw_eQBr.js +13 -0
- package/dist/it-IT-DOBp2-MP.js +13 -0
- package/dist/{it-IT-Erh1DIlj.js → it-IT-Dhwa9Ecj.js} +8 -1
- package/dist/it-IT-VFXgXyRA.js +13 -0
- package/dist/{ja-JP-DfE1PYyN.js → ja-JP-B3wVYIJU.js} +2 -2
- package/dist/ja-JP-B_Q8X66O.js +13 -0
- package/dist/{ja-JP-CWJzqrtj.js → ja-JP-Bc4U0S8-.js} +8 -1
- package/dist/{ja-JP-4Q9zp35q.js → ja-JP-Bv3ru9Xq.js} +14 -7
- package/dist/{ja-JP-CSz7fEkn.js → ja-JP-CceCDXLB.js} +2 -2
- package/dist/{ja-JP-DBoYLzeA.js → ja-JP-DSvZhFNY.js} +4 -4
- package/dist/{japanSupportUtils-C7aPdWXD.js → japanSupportUtils-BucfNSWB.js} +2 -2
- package/dist/{jpAddressSchema-De6ix57p.js → jpAddressSchema-DEOyz9Yo.js} +2 -4
- package/dist/{localizeDateString-DuTq6aHe.js → localizeDateString-n8b2kwyK.js} +2 -2
- package/dist/{lt-LT-Nd1uRoIj.js → lt-LT-C8n1GZoU.js} +8 -1
- package/dist/lt-LT-CE-GdWrg.js +13 -0
- package/dist/lt-LT-WRulV980.js +13 -0
- package/dist/{lv-LV-DKhV24CI.js → lv-LV-BZN4-Xat.js} +8 -1
- package/dist/lv-LV-C9Dhkruv.js +13 -0
- package/dist/lv-LV-dv7fqeBS.js +13 -0
- package/dist/{mapExistingFile-CGg2sd-T.js → mapExistingFile-DtG8dtIh.js} +5 -6
- package/dist/{mapJpAddressSchemaToAddressLocalizations-BwHU4ZwL.js → mapJpAddressSchemaToAddressLocalizations-CpVZUxo1.js} +5 -5
- package/dist/{mapLegalEntityToIndividualSchema-DzCEngXr.js → mapLegalEntityToIndividualSchema-1aYgn5km.js} +4 -4
- package/dist/{mapTransferInstrumentToPayoutAccount-DLHvwig1.js → mapTransferInstrumentToPayoutAccount-BDQGKfhP.js} +2 -2
- package/dist/{nl-NL-O9GCHMDA.js → nl-NL-B0fvINJj.js} +8 -1
- package/dist/nl-NL-BwIRHJgf.js +13 -0
- package/dist/nl-NL-SjOGmGk5.js +13 -0
- package/dist/no-NO-BAWVf0GX.js +13 -0
- package/dist/{no-NO-CA1aR6Wh.js → no-NO-Jw7Gae-a.js} +8 -1
- package/dist/no-NO-u56mEoG3.js +13 -0
- package/dist/{patternValidators-CZ5mQeGD.js → patternValidators-DcjAPGFV.js} +5 -5
- package/dist/{pl-PL-BKDK0_G8.js → pl-PL-Bmaq3IC3.js} +8 -1
- package/dist/pl-PL-DEMxxz7h.js +13 -0
- package/dist/pl-PL-zqT41Yjw.js +13 -0
- package/dist/{process-field-configurations-BQY03q4v.js → process-field-configurations-CQoldE8s.js} +3 -3
- package/dist/{pt-BR-NtLaWlnZ.js → pt-BR-BaTE6BB_.js} +8 -1
- package/dist/pt-BR-BfDe_8iW.js +13 -0
- package/dist/pt-BR-fMKntiMG.js +13 -0
- package/dist/{pt-PT-C6teRGuD.js → pt-PT-C6pZR9Bc.js} +2 -2
- package/dist/pt-PT-F1qPZJ2c.js +13 -0
- package/dist/{pt-PT-DSxxVA0f.js → pt-PT-c0ap84_F.js} +8 -1
- package/dist/{resolveEnvironment-BEU3VKd8.js → resolveEnvironment-D-07Kfa-.js} +3 -3
- package/dist/ro-RO-0vx6ZLWV.js +13 -0
- package/dist/ro-RO-B5BQrf6C.js +13 -0
- package/dist/{ro-RO-Bybq8JFn.js → ro-RO-BPOHV6Wp.js} +8 -1
- package/dist/{roleMetadata-BeJKyoeE.js → roleMetadata-DsoqlMAY.js} +2 -2
- package/dist/{sk-SK-C6rMIxpz.js → sk-SK-3_SoEn6P.js} +8 -1
- package/dist/sk-SK-Bz4T7upD.js +13 -0
- package/dist/sk-SK-DuLm2CVx.js +13 -0
- package/dist/sl-SI--RTGDByj.js +13 -0
- package/dist/sl-SI-BAIm-qBe.js +13 -0
- package/dist/{sl-SI-tPwbFvOI.js → sl-SI-DbfswGh0.js} +8 -1
- package/dist/style.css +140 -148
- package/dist/styles-CLV89_hH.js +140 -148
- package/dist/sv-SE-BZNey_8S.js +13 -0
- package/dist/{sv-SE-K1QT1cOt.js → sv-SE-D_Efxy3s.js} +8 -1
- package/dist/sv-SE-Dryy3JLw.js +13 -0
- package/dist/types/components/BankAccount/forms/PayoutDetails/rules.d.ts +1 -1
- package/dist/types/components/BankAccount/pages/PayoutDetailsPage.d.ts +3 -3
- package/dist/types/components/Business/forms/BusinessDetails/forms.d.ts +10 -10
- package/dist/types/components/Business/forms/BusinessDetails/types.d.ts +1 -1
- package/dist/types/components/Business/forms/BusinessSelection/BusinessInformationCard/BusinessInformationCard.d.ts +3 -3
- package/dist/types/components/{Shared → Business}/forms/FinancialInformation/formatFinancialInformationSummary.d.ts +1 -1
- package/dist/types/components/{Shared → Business}/forms/FinancialInformation/mapping/mapFinancialInformationToFinancialReport.d.ts +1 -1
- package/dist/types/components/{Shared → Business}/forms/FinancialInformation/mapping/mapFinancialReportsToFinancialInformation.d.ts +1 -1
- package/dist/types/components/Business/forms/rules.d.ts +6 -6
- package/dist/types/components/Business/pages/RootBusinessDetailsPage.d.ts +1 -2
- package/dist/types/components/Business/utils/companyUtil.d.ts +0 -1
- package/dist/types/components/BusinessLines/pages/RootBusinessLinesPage.d.ts +1 -2
- package/dist/types/components/Contract/tasks/ServiceAgreementDropin/types.d.ts +1 -1
- package/dist/types/components/EFP/fields/LegalFormField/LegalFormField.d.ts +1 -1
- package/dist/types/components/EFP/fields/NaceCodeField/NaceCodeField.d.ts +1 -1
- package/dist/types/components/EFP/mapping/businessFinancingKeyMappings.d.ts +5283 -53
- package/dist/types/components/EFP/mapping/mapBusinessFinancingToLegalEntity.d.ts +3 -2
- package/dist/types/components/EFP/mapping/mapLegalEntityToBusinessFinancing.d.ts +1 -1
- package/dist/types/components/EFP/pages/BusinessFinancingPage.d.ts +1 -2
- package/dist/types/components/EFP/pages/SourceOfFundsPage.d.ts +1 -2
- package/dist/types/components/EFP/tasks/BusinessFinancingDropin/AdditionalFieldsForBusinessFinancingSoleProprietor.d.ts +2 -0
- package/dist/types/components/EFP/tasks/BusinessFinancingDropin/BusinessFinancingSoleProprietorPersonalInformation.d.ts +4 -0
- package/dist/types/components/EFP/tasks/BusinessFinancingDropin/types.d.ts +28 -0
- package/dist/types/components/EFP/tasks/BusinessFinancingDropin/utils.d.ts +14 -3
- package/dist/types/components/EFP/tasks/BusinessFinancingDropin/validate.d.ts +10 -1
- package/dist/types/components/EmbeddedDropins/BusinessFinancingComponent/utils.d.ts +1 -0
- package/dist/types/components/EmbeddedDropins/OnboardingDropinComponent/DropinComposer/DropinComposer.d.ts +1 -1
- package/dist/types/components/EmbeddedDropins/OnboardingDropinComponent/DropinComposer/RouterDropinComposer.d.ts +4 -0
- package/dist/types/components/Individual/forms/IdVerificationMethod/IdVerificationMethod.types.d.ts +2 -1
- package/dist/types/components/Individual/forms/Individual.rules.d.ts +2 -2
- package/dist/types/components/Individual/pages/DecisionMakerDetailsPage.d.ts +3 -3
- package/dist/types/components/Shared/EntityAssociation/EntityAssociation.d.ts +0 -1
- package/dist/types/components/Shared/fields/BusinessRegistrationNumberField/fieldConfig.d.ts +10 -0
- package/dist/types/components/Shared/fields/BusinessRegistrationNumberField/types.d.ts +2 -1
- package/dist/types/components/Shared/fields/CountryField/types.d.ts +2 -1
- package/dist/types/components/Shared/fields/CountryOfGoverningLawField/CountryOfGoverningLawField.d.ts +1 -1
- package/dist/types/components/Shared/fields/CountryOfGoverningLawField/types.d.ts +1 -1
- package/dist/types/components/Shared/fields/Currency/Currency.d.ts +1 -1
- package/dist/types/components/Shared/fields/Currency/types.d.ts +1 -1
- package/dist/types/components/Shared/fields/DBANameField/DBANameField.d.ts +1 -1
- package/dist/types/components/Shared/fields/DBANameField/types.d.ts +1 -1
- package/dist/types/components/Shared/fields/IdFieldTypeSelector/countryIdNumberTypes.d.ts +78 -0
- package/dist/types/components/Shared/fields/LegalCompanyNameField/fieldConfig.d.ts +12 -6
- package/dist/types/components/Shared/fields/LegalCompanyNameField/types.d.ts +3 -1
- package/dist/types/components/Shared/fields/NumberOfEmployees/NumberOfEmployees.d.ts +1 -1
- package/dist/types/components/Shared/fields/NumberOfEmployees/types.d.ts +1 -1
- package/dist/types/components/Shared/forms/Address/Address.d.ts +1 -1
- package/dist/types/components/Shared/forms/Address/utils.d.ts +1 -1
- package/dist/types/components/Trust/forms/Trust/rules.d.ts +2 -2
- package/dist/types/components/Trust/hooks/useTrustMemberNavigation.hook.d.ts +1 -1
- package/dist/types/components/Trust/pages/TrustDetailsPage.d.ts +1 -2
- package/dist/types/components/Trust/pages/TrustMemberCompanyPage.d.ts +3 -3
- package/dist/types/components/Trust/pages/TrustMemberIndividualPage.d.ts +3 -3
- package/dist/types/components/Trust/pages/TrustMemberRoleAndTypePage.d.ts +2 -2
- package/dist/types/components/Trust/tasks/TrustMembers/TrustMembersOverview.d.ts +1 -2
- package/dist/types/components/UnincorporatedPartnership/hooks/useUnincorporatedPartnershipNavigation.d.ts +1 -1
- package/dist/types/components/UnincorporatedPartnership/pages/UnincorporatedPartnershipIndividualPage.d.ts +3 -3
- package/dist/types/components/UnincorporatedPartnership/pages/UnincorporatedPartnershipMemberCompanyPage.d.ts +3 -3
- package/dist/types/components/UnincorporatedPartnership/pages/UnincorporatedPartnershipMemberRoleAndTypePage.d.ts +1 -1
- package/dist/types/components/ui/atoms/Loader/Loader.d.ts +11 -1
- package/dist/types/context/ExperimentContext/types.d.ts +17 -0
- package/dist/types/core/models/api/individual.d.ts +3 -0
- package/dist/types/core/models/api/legal-arrangement.d.ts +3 -0
- package/dist/types/hooks/useForm/types.d.ts +0 -4
- package/dist/types/hooks/useLegalCompanyNameField/useLegalCompanyNameField.d.ts +4 -2
- package/dist/types/hooks/usePageLandedEvent.d.ts +7 -0
- package/dist/types/router/DefaultRouteRedirect.d.ts +8 -0
- package/dist/types/router/MemoryRouterContext.d.ts +9 -0
- package/dist/types/router/OnboardingRouter.d.ts +39 -0
- package/dist/types/router/SuspenseRoute.d.ts +7 -0
- package/dist/types/router/getDefaultTask.d.ts +16 -0
- package/dist/types/router/routeConfig.d.ts +68 -0
- package/dist/types/router/useCurrentTask.d.ts +5 -0
- package/dist/types/router/useNavigate.d.ts +7 -0
- package/dist/types/utils/entityStatusUtil.d.ts +1 -1
- package/dist/types/utils/fieldConfigurations.d.ts +0 -1
- package/dist/types/utils/formUtils.d.ts +0 -3
- package/dist/types/utils/regex/patternValidators.d.ts +1 -1
- package/dist/types/utils/validatorUtils.d.ts +1 -1
- package/dist/{types-B7eWQV7z.js → types-C8yt1YG2.js} +19 -2
- package/dist/{types-BY62XJTq.js → types-DRTd35hZ.js} +2 -2
- package/dist/{types-pKG9olDB.js → types-DujGXeMG.js} +2 -2
- package/dist/{types-BuMuCpsa.js → types-XpRg7EOC.js} +2 -2
- package/dist/{useAssociatedLegalEntity-V0OP9ejx.js → useAssociatedLegalEntity-DlZrp3qi.js} +2 -2
- package/dist/{useBusinessDetailsData-BsXXL7fg.js → useBusinessDetailsData-gZ8moheH.js} +713 -718
- package/dist/useBusinessLines-BD1Yg8Ja.js +29 -0
- package/dist/useCanSeeIntroduction-BHQYUN_d.js +48 -0
- package/dist/{useCreateLegalEntity-otpCRCfZ.js → useCreateLegalEntity-DjRvxwI5.js} +2 -2
- package/dist/useDataMissingRemediations-KgLqbiZx.js +41 -0
- package/dist/{useDataset-CvATx7EN.js → useDataset-Bafefouf.js} +5 -3
- package/dist/useDeleteTransferInstrument-Cf8rmBGA.js +32 -0
- package/dist/{useForm-9nSw9LZY.js → useForm-Bh638xmS.js} +27 -27
- package/dist/{useFormContext-BnlNKQZ7.js → useFormContext-BilJQsMw.js} +7 -7
- package/dist/{useGlobalData-Dy2O7YGk.js → useGlobalData-DkE5IpZB.js} +2 -2
- package/dist/{useMultiForm-CBefohos.js → useMultiForm-djEDTyaG.js} +45 -36
- package/dist/useNavigate-DE0sTmpX.js +265 -0
- package/dist/{useOnboardingStatus-CJrlnkvv.js → useOnboardingStatus-DhK2qF95.js} +1 -1
- package/dist/usePciQuestionnaireList-DsgAv5Ql.js +29 -0
- package/dist/useSalesChannels-DUTiDcGq.js +65 -0
- package/dist/{useScenarios-CkgrmOF-.js → useScenarios-BxbmDi2R.js} +2 -2
- package/dist/useSetting-DwC0bC4k.js +19 -0
- package/dist/useTaskStatus-Cps0L-Yp.js +51 -0
- package/dist/{useTermsOfServiceStatus-DFLF3xas.js → useTermsOfServiceStatus-COugffxI.js} +1 -1
- package/dist/{useToastContext-uSKjdph9.js → useToastContext-DBDF60Ps.js} +2 -2
- package/dist/useTrustMembers-ymPJMufc.js +163 -0
- package/dist/{useUnincorporatedPartnershipMembers-BmLKVfkf.js → useUnincorporatedPartnershipMembers-ZlPU6E-_.js} +4 -4
- package/dist/{useUpdateBusinessLines-BBNXF45E.js → useUpdateBusinessLines-DfjB9Ur6.js} +4 -4
- package/dist/{useUpdateLegalEntity-DHxCVgNk.js → useUpdateLegalEntity-C8rOYkS1.js} +3 -3
- package/dist/{utils-CLLUBF1a.js → utils-B8oIRKRm.js} +2 -2
- package/dist/{utils-ClKogQZa.js → utils-D1RKmLBo.js} +3 -3
- package/dist/{utils-5yZQq_bx.js → utils-DIBG3Hc5.js} +6 -6
- package/dist/{utils-CIHH_aYF.js → utils-Dd2ry06C.js} +2 -2
- package/dist/{utils-CIIs2bXi.js → utils-_6SITBJE.js} +3 -2
- package/dist/{validate-BntX2W3B.js → validate-B6hMWJ8a.js} +10 -2
- package/dist/{validate-CLYo0JdH.js → validate-jqVPVUI3.js} +3 -3
- package/dist/{validationError-DJ6zTIzv.js → validationError-CsCEpxs1.js} +2 -2
- package/package.json +3 -2
- package/dist/ManageIndividualComponent-CJEqOUgN.js +0 -46
- package/dist/RootBusinessDetailsPage-BsAtLAyF.js +0 -50
- package/dist/SoleProprietorshipPage-zgU4q95D.js +0 -50
- package/dist/TrustMemberCompanyPage-DfXulzKv.js +0 -65
- package/dist/bg-BG-C1maG7_G.js +0 -13
- package/dist/bg-BG-D4k_k98M.js +0 -118
- package/dist/cs-CZ-Dq3xx45p.js +0 -13
- package/dist/cs-CZ-nIWwyOHK.js +0 -118
- package/dist/da-DK-CoqZjIMT.js +0 -13
- package/dist/da-DK-CrtuBoDC.js +0 -118
- package/dist/de-DE-CLMlbqGz.js +0 -13
- package/dist/de-DE-mH3MobT9.js +0 -13
- package/dist/el-GR-BEOd56RY.js +0 -13
- package/dist/el-GR-Ckn_3h1a.js +0 -118
- package/dist/en-US-d4WBvUW7.js +0 -118
- package/dist/es-ES-BnPWZP0s.js +0 -13
- package/dist/es-ES-CnyVffM-.js +0 -118
- package/dist/et-EE-RzdBGxDM.js +0 -118
- package/dist/et-EE-rYc8-Bm2.js +0 -13
- package/dist/fi-FI-CYEjY7DQ.js +0 -13
- package/dist/fi-FI-kXC-0USa.js +0 -118
- package/dist/fr-FR-6YOKsDLQ.js +0 -13
- package/dist/fr-FR-CsJuDM2B.js +0 -13
- package/dist/hr-HR-DMSNClBZ.js +0 -13
- package/dist/hr-HR-fyublN95.js +0 -118
- package/dist/hu-HU-CpJDiSu2.js +0 -118
- package/dist/hu-HU-DQlYtR9y.js +0 -13
- package/dist/it-IT-C9cOsMxY.js +0 -13
- package/dist/it-IT-DyCHFg-b.js +0 -118
- package/dist/ja-JP-NuKpFRZl.js +0 -13
- package/dist/lt-LT-CKE7_7_A.js +0 -118
- package/dist/lt-LT-DPU2ZqVt.js +0 -13
- package/dist/lv-LV-BD8xCiCe.js +0 -13
- package/dist/lv-LV-D4Ik0yoE.js +0 -118
- package/dist/nl-NL-CBnYVFv_.js +0 -13
- package/dist/nl-NL-DkbhmJAw.js +0 -118
- package/dist/no-NO-C690hkyd.js +0 -13
- package/dist/no-NO-Df5qUoTc.js +0 -118
- package/dist/pl-PL-BDclj9dt.js +0 -13
- package/dist/pl-PL-ggZjqXWE.js +0 -118
- package/dist/pt-BR-B4wCnZ06.js +0 -13
- package/dist/pt-BR-BOOm5lRR.js +0 -118
- package/dist/pt-PT-BDfNlThr.js +0 -118
- package/dist/ro-RO-BRngQXgs.js +0 -118
- package/dist/ro-RO-PA9lKU0J.js +0 -13
- package/dist/sk-SK-DmqCF6I9.js +0 -13
- package/dist/sk-SK-y9eb7N6i.js +0 -118
- package/dist/sl-SI-CGvCdquD.js +0 -118
- package/dist/sl-SI-DnT4vnh4.js +0 -13
- package/dist/sv-SE-BP2Oun8l.js +0 -118
- package/dist/sv-SE-DopUU1N2.js +0 -13
- /package/dist/types/components/{Shared → Business}/forms/FinancialInformation/FinancialInformation.d.ts +0 -0
- /package/dist/types/components/{Shared → Business}/forms/FinancialInformation/ReportedValue.d.ts +0 -0
- /package/dist/types/components/{Shared → Business}/forms/FinancialInformation/types.d.ts +0 -0
- /package/dist/types/components/{Shared → Business}/forms/FinancialInformation/validate.d.ts +0 -0
|
@@ -2,44 +2,45 @@
|
|
|
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] = "d6057d05-6121-47e1-a739-c4f67a019cdb", e._sentryDebugIdIdentifier = "sentry-dbid-d6057d05-6121-47e1-a739-c4f67a019cdb");
|
|
6
6
|
} catch (e) {
|
|
7
7
|
}
|
|
8
8
|
}
|
|
9
9
|
;
|
|
10
10
|
import { jsx, jsxs, Fragment } from "preact/jsx-runtime";
|
|
11
11
|
import { useRef, useEffect, useMemo, useState } from "preact/hooks";
|
|
12
|
-
import { u as useCreateLegalEntity } from "./useCreateLegalEntity-
|
|
13
|
-
import { a as useInvalidateRootLegalEntity, u as useToastContext } from "./useToastContext-
|
|
14
|
-
import { u as useUpdateLegalEntity } from "./useUpdateLegalEntity-
|
|
15
|
-
import {
|
|
16
|
-
import { u as useFormContext, F as FormContextProvider, a as FormFlow } from "./useFormContext-
|
|
17
|
-
import { S as SettingNames } from "./TaskVerificationStatus-
|
|
18
|
-
import { u as useAssociatedLegalEntity } from "./useAssociatedLegalEntity-
|
|
19
|
-
import { g as getRequiredForms, a as addValidityToForms, u as useFormComposer } from "./dropinUtils-
|
|
20
|
-
import { u as useMultiForm } from "./useMultiForm-
|
|
21
|
-
import { E as EndStateLayout } from "./EndStateLayout-
|
|
22
|
-
import { i as isValidationError, p as processValidationErrors, a as isMaintenanceModeError } from "./validationError-
|
|
12
|
+
import { u as useCreateLegalEntity } from "./useCreateLegalEntity-DjRvxwI5.js";
|
|
13
|
+
import { a as useInvalidateRootLegalEntity, u as useToastContext } from "./useToastContext-DBDF60Ps.js";
|
|
14
|
+
import { u as useUpdateLegalEntity } from "./useUpdateLegalEntity-C8rOYkS1.js";
|
|
15
|
+
import { ak as reverseMapping, al as isEeaCountry, o as LegalEntityTypes, ac as cloneObject, b as useApiContext, k as httpGet, ab as useI18nContext, u as useTranslation, z as Typography, a2 as translateStringOrObject, p as useAnalyticsContext, M as hasSolePropInLegalEntity, B as useSettingsContext, L as Loader, V as Button } from "./StoreProvider-BL3nK1iO.js";
|
|
16
|
+
import { u as useFormContext, F as FormContextProvider, a as FormFlow } from "./useFormContext-BilJQsMw.js";
|
|
17
|
+
import { S as SettingNames } from "./TaskVerificationStatus-ycoS73dK.js";
|
|
18
|
+
import { u as useAssociatedLegalEntity } from "./useAssociatedLegalEntity-DlZrp3qi.js";
|
|
19
|
+
import { g as getRequiredForms, a as addValidityToForms, u as useFormComposer } from "./dropinUtils-DGUJjA6y.js";
|
|
20
|
+
import { u as useMultiForm } from "./useMultiForm-djEDTyaG.js";
|
|
21
|
+
import { E as EndStateLayout } from "./EndStateLayout-DnGdtXOr.js";
|
|
22
|
+
import { i as isValidationError, p as processValidationErrors, a as isMaintenanceModeError } from "./validationError-CsCEpxs1.js";
|
|
23
23
|
import { a as datasetUtilities } from "./datasetUtil-BHQp0-xL.js";
|
|
24
|
-
import { l as localizeDateString } from "./localizeDateString-
|
|
25
|
-
import { m as mapFinancialReportsToFinancialInformation, a as mapFinancialInformationToFinancialReport, L as LegalFormField, I as InputNumber, C as Currency, b as CURRENCY_FIELD, c as InputCurrency } from "./Currency-
|
|
24
|
+
import { l as localizeDateString } from "./localizeDateString-n8b2kwyK.js";
|
|
25
|
+
import { m as mapFinancialReportsToFinancialInformation, a as mapFinancialInformationToFinancialReport, L as LegalFormField, I as InputNumber, C as Currency, b as CURRENCY_FIELD, c as InputCurrency } from "./Currency-CYaHlY2Z.js";
|
|
26
26
|
import { f as formatObject } from "./utils-DNSfZiio.js";
|
|
27
|
-
import { H as Header } from "./Header-
|
|
28
|
-
import { E as ErrorPanel } from "./ErrorPanel-
|
|
29
|
-
import { c as currencyByCountry } from "./types-
|
|
30
|
-
import { c as createFormUtils } from "./formUtils-
|
|
31
|
-
import { g as getFieldProps } from "./getProps-
|
|
32
|
-
import { F as Field } from "./Field-
|
|
33
|
-
import { L as Link } from "./Link-
|
|
34
|
-
import { R as RadioGroup } from "./RadioGroup-
|
|
35
|
-
import { I as InputText } from "./InputText-
|
|
27
|
+
import { H as Header } from "./Header-DCVQMDDt.js";
|
|
28
|
+
import { E as ErrorPanel } from "./ErrorPanel-CAHQTbMv.js";
|
|
29
|
+
import { c as currencyByCountry } from "./types-DRTd35hZ.js";
|
|
30
|
+
import { c as createFormUtils } from "./formUtils-CJQolfmf.js";
|
|
31
|
+
import { g as getFieldProps } from "./getProps-O8Fpl_k_.js";
|
|
32
|
+
import { F as Field } from "./Field-CApB-T06.js";
|
|
33
|
+
import { L as Link } from "./Link-BJyutNM5.js";
|
|
34
|
+
import { R as RadioGroup } from "./RadioGroup-DzUpgP12.js";
|
|
35
|
+
import { I as InputText } from "./InputText-BV_-tgjA.js";
|
|
36
36
|
import { useQuery } from "@tanstack/preact-query";
|
|
37
|
-
import { S as Select } from "./Select-
|
|
38
|
-
import { I as InputDate } from "./InputDate-
|
|
39
|
-
import { C as Checkbox } from "./Checkbox-
|
|
40
|
-
import { A as Address } from "./Address-
|
|
41
|
-
import { g as getAddressSchemaForCountry, C as COUNTRIES_WITH_STATES_DATASET, a as getAddressSchemaLabelsByCountry } from "./utils-
|
|
42
|
-
import {
|
|
37
|
+
import { S as Select } from "./Select-C_6mHv91.js";
|
|
38
|
+
import { I as InputDate } from "./InputDate-CiL0lNHS.js";
|
|
39
|
+
import { C as Checkbox } from "./Checkbox-4TE31vJm.js";
|
|
40
|
+
import { A as Address } from "./Address-uWZO7A9W.js";
|
|
41
|
+
import { g as getAddressSchemaForCountry, C as COUNTRIES_WITH_STATES_DATASET, a as getAddressSchemaLabelsByCountry } from "./utils-_6SITBJE.js";
|
|
42
|
+
import { C as CountryField } from "./CountryField-0SyPMIyv.js";
|
|
43
|
+
import { b as businessFinancingMultiformRules } from "./validate-B6hMWJ8a.js";
|
|
43
44
|
const businessFinancingBaseMapping = {
|
|
44
45
|
legalProceedingsDate: "organization.dateOfInitiationOfLegalProceeding",
|
|
45
46
|
legalInformationInsolvency: "organization.statusOfLegalProceeding",
|
|
@@ -54,20 +55,43 @@ const businessFinancingBaseMapping = {
|
|
|
54
55
|
"registrationAddress.address": "organization.registeredAddress.street",
|
|
55
56
|
"registrationAddress.otherAddressInformation": "organization.registeredAddress.street2"
|
|
56
57
|
};
|
|
58
|
+
const businessFinancingIndividualMapping = {
|
|
59
|
+
gender: "individual.gender",
|
|
60
|
+
countryOfBirth: "individual.countryOfBirth"
|
|
61
|
+
};
|
|
62
|
+
const businessFinancingSoleProprietorMapping = {
|
|
63
|
+
legalProceedingsDate: "soleProprietorship.dateOfInitiationOfLegalProceeding",
|
|
64
|
+
legalInformationInsolvency: "soleProprietorship.statusOfLegalProceeding",
|
|
65
|
+
naceCode: "soleProprietorship.economicSector"
|
|
66
|
+
};
|
|
57
67
|
const businessFinancingComponentsKeyMapping = {
|
|
58
68
|
...businessFinancingBaseMapping
|
|
59
69
|
};
|
|
70
|
+
const businessFinancingSoleProprietorComponentsKeyMapping = {
|
|
71
|
+
...businessFinancingSoleProprietorMapping
|
|
72
|
+
};
|
|
60
73
|
const businessFinancingApiKeyMapping = {
|
|
61
74
|
...reverseMapping(businessFinancingBaseMapping)
|
|
62
75
|
};
|
|
63
|
-
const
|
|
64
|
-
...
|
|
76
|
+
const businessFinancingIndividualApiKeyMapping = {
|
|
77
|
+
...reverseMapping(businessFinancingIndividualMapping)
|
|
78
|
+
};
|
|
79
|
+
const businessFinancingSoleProprietorApiKeyMapping = {
|
|
80
|
+
...reverseMapping(businessFinancingSoleProprietorMapping)
|
|
81
|
+
};
|
|
82
|
+
const mapBusinessFinancingToLegalEntity = (data, isIndividualOrSoleProprietor, customMapping) => {
|
|
83
|
+
if (customMapping) {
|
|
84
|
+
return formatObject(data, customMapping);
|
|
85
|
+
}
|
|
86
|
+
const mapping = isIndividualOrSoleProprietor ? businessFinancingSoleProprietorApiKeyMapping : businessFinancingApiKeyMapping;
|
|
87
|
+
return formatObject(
|
|
65
88
|
data,
|
|
66
|
-
|
|
67
|
-
)
|
|
68
|
-
}
|
|
89
|
+
mapping
|
|
90
|
+
);
|
|
91
|
+
};
|
|
69
92
|
const BusinessFinancingPages = {
|
|
70
93
|
COMPANY_PAGE: "company",
|
|
94
|
+
SOLE_PROPRIETOR_PAGE: "soleProprietor",
|
|
71
95
|
PARENT_COMPANY_PAGE: "parentCompany",
|
|
72
96
|
ULTIMATE_PARENT_COMPANY_PAGE: "ultimateParentCompany"
|
|
73
97
|
};
|
|
@@ -110,6 +134,13 @@ const companySchemaKeys = [
|
|
|
110
134
|
"legalInformationInsolvency",
|
|
111
135
|
"legalProceedingsDate"
|
|
112
136
|
];
|
|
137
|
+
const soleProprietorSchemaKeys = [
|
|
138
|
+
"gender",
|
|
139
|
+
"countryOfBirth",
|
|
140
|
+
"naceCode",
|
|
141
|
+
"legalInformationInsolvency",
|
|
142
|
+
"legalProceedingsDate"
|
|
143
|
+
];
|
|
113
144
|
const parentCompaniesSchemaKeys = [
|
|
114
145
|
"legalName",
|
|
115
146
|
"legalForm",
|
|
@@ -130,9 +161,14 @@ const parentCompaniesSchemaKeys = [
|
|
|
130
161
|
const businessFinancingForms = {
|
|
131
162
|
company: {
|
|
132
163
|
formId: "company",
|
|
133
|
-
formName: "
|
|
164
|
+
formName: "businessInformation",
|
|
134
165
|
fields: [...companySchemaKeys]
|
|
135
166
|
},
|
|
167
|
+
soleProprietor: {
|
|
168
|
+
formId: "soleProprietor",
|
|
169
|
+
formName: "businessInformation",
|
|
170
|
+
fields: [...soleProprietorSchemaKeys]
|
|
171
|
+
},
|
|
136
172
|
parentCompany: {
|
|
137
173
|
formId: "parentCompany",
|
|
138
174
|
formName: "parentCompanyInformation",
|
|
@@ -146,12 +182,14 @@ const businessFinancingForms = {
|
|
|
146
182
|
};
|
|
147
183
|
const BusinessFinancingIndices = {
|
|
148
184
|
COMPANY: "company",
|
|
185
|
+
SOLE_PROPRIETOR: "soleProprietor",
|
|
149
186
|
PARENT_COMPANY: "parentCompany",
|
|
150
187
|
ULTIMATE_PARENT_COMPANY: "ultimateParentCompany"
|
|
151
188
|
};
|
|
152
189
|
const getLegalEntityId = (businessFinancingIndex, rootLegalEntity) => {
|
|
153
190
|
if (!rootLegalEntity) return void 0;
|
|
154
|
-
if (businessFinancingIndex === BusinessFinancingIndices.COMPANY
|
|
191
|
+
if (businessFinancingIndex === BusinessFinancingIndices.COMPANY || businessFinancingIndex === BusinessFinancingIndices.SOLE_PROPRIETOR)
|
|
192
|
+
return rootLegalEntity.id;
|
|
155
193
|
if (!rootLegalEntity?.entityAssociations) return void 0;
|
|
156
194
|
const businessFinancingEntityType = "immediateParentCompany";
|
|
157
195
|
const businessFinancingEntityAssociation = rootLegalEntity.entityAssociations?.find(
|
|
@@ -171,6 +209,47 @@ const financialReportsToString = (financialReports) => {
|
|
|
171
209
|
balanceSheetTotal: financialReports.balanceSheetTotal ? financialReports.balanceSheetTotal.toString() : void 0
|
|
172
210
|
};
|
|
173
211
|
};
|
|
212
|
+
const prepareSoleProprietorBusinessFinancingSubmitData = (data, rootLegalEntity, soleProprietorLegalEntity) => {
|
|
213
|
+
const businessFinancingData = data.soleProprietor;
|
|
214
|
+
if (!businessFinancingData || !rootLegalEntity?.id || !soleProprietorLegalEntity?.id) {
|
|
215
|
+
return null;
|
|
216
|
+
}
|
|
217
|
+
const individualChanges = mapBusinessFinancingToLegalEntity(
|
|
218
|
+
businessFinancingData,
|
|
219
|
+
true,
|
|
220
|
+
businessFinancingIndividualApiKeyMapping
|
|
221
|
+
);
|
|
222
|
+
const individualPayload = {
|
|
223
|
+
id: rootLegalEntity.id,
|
|
224
|
+
individual: {
|
|
225
|
+
...rootLegalEntity.individual,
|
|
226
|
+
...individualChanges.individual
|
|
227
|
+
},
|
|
228
|
+
...rootLegalEntity.entityAssociations && {
|
|
229
|
+
entityAssociations: rootLegalEntity.entityAssociations
|
|
230
|
+
}
|
|
231
|
+
};
|
|
232
|
+
const solePropChanges = mapBusinessFinancingToLegalEntity(
|
|
233
|
+
businessFinancingData,
|
|
234
|
+
true,
|
|
235
|
+
businessFinancingSoleProprietorApiKeyMapping
|
|
236
|
+
);
|
|
237
|
+
if (!solePropChanges.soleProprietorship) return null;
|
|
238
|
+
if (solePropChanges.soleProprietorship.statusOfLegalProceeding === "iDontKnow") {
|
|
239
|
+
solePropChanges.soleProprietorship.statusOfLegalProceeding = "noLegalActionsTaken";
|
|
240
|
+
}
|
|
241
|
+
if (solePropChanges.soleProprietorship.statusOfLegalProceeding === "iDontKnow" || solePropChanges.soleProprietorship.statusOfLegalProceeding === "noLegalActionsTaken") {
|
|
242
|
+
solePropChanges.soleProprietorship.dateOfInitiationOfLegalProceeding = "";
|
|
243
|
+
}
|
|
244
|
+
const solePropPayload = {
|
|
245
|
+
id: soleProprietorLegalEntity.id,
|
|
246
|
+
soleProprietorship: {
|
|
247
|
+
...soleProprietorLegalEntity.soleProprietorship,
|
|
248
|
+
...solePropChanges.soleProprietorship
|
|
249
|
+
}
|
|
250
|
+
};
|
|
251
|
+
return { individualPayload, solePropPayload };
|
|
252
|
+
};
|
|
174
253
|
const prepareBusinessFinancingSubmitData = (businessFinancingIndex, data, rootLegalEntity) => {
|
|
175
254
|
const businessFinancingData = data[businessFinancingIndex];
|
|
176
255
|
if (!businessFinancingData) return null;
|
|
@@ -181,40 +260,48 @@ const prepareBusinessFinancingSubmitData = (businessFinancingIndex, data, rootLe
|
|
|
181
260
|
return null;
|
|
182
261
|
}
|
|
183
262
|
const businessFinancingDetails = mapBusinessFinancingToLegalEntity(businessFinancingData);
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
businessFinancingDetails.organization.
|
|
208
|
-
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
263
|
+
const isSoleProprietor = businessFinancingIndex === BusinessFinancingIndices.SOLE_PROPRIETOR;
|
|
264
|
+
if (isSoleProprietor) {
|
|
265
|
+
throw new Error(
|
|
266
|
+
"Use prepareSoleProprietorBusinessFinancingSubmitData for sole proprietor business financing"
|
|
267
|
+
);
|
|
268
|
+
} else if (isSoleProprietor === false) {
|
|
269
|
+
if (!businessFinancingDetails.organization) return null;
|
|
270
|
+
const businessFinancingCountry = businessFinancingDetails.organization.registeredAddress?.country || rootLegalEntity?.organization?.registeredAddress?.country;
|
|
271
|
+
const companyData = businessFinancingData;
|
|
272
|
+
if (companyData.financialReportingDate && isEeaCountry(businessFinancingCountry)) {
|
|
273
|
+
const finReports = {
|
|
274
|
+
currency: companyData.currency,
|
|
275
|
+
financialReportingDate: companyData.financialReportingDate,
|
|
276
|
+
numberOfEmployees: companyData.numberOfEmployees ? Number(companyData.numberOfEmployees) : void 0,
|
|
277
|
+
netAssets: companyData.netAssets ? Number(companyData.netAssets) : void 0,
|
|
278
|
+
annualTurnover: companyData.annualTurnover ? Number(companyData.annualTurnover) : void 0
|
|
279
|
+
};
|
|
280
|
+
const businessFinancingFinancialReport = mapFinancialInformationToFinancialReport(finReports);
|
|
281
|
+
businessFinancingDetails.organization.financialReports = [businessFinancingFinancialReport];
|
|
282
|
+
}
|
|
283
|
+
if (!isEeaCountry(businessFinancingCountry)) {
|
|
284
|
+
businessFinancingDetails.organization.financialReports = void 0;
|
|
285
|
+
}
|
|
286
|
+
if (businessFinancingDetails.organization.statusOfLegalProceeding === "iDontKnow") {
|
|
287
|
+
businessFinancingDetails.organization.statusOfLegalProceeding = "noLegalActionsTaken";
|
|
288
|
+
}
|
|
289
|
+
if (businessFinancingDetails.organization.statusOfLegalProceeding === "iDontKnow" || businessFinancingDetails.organization.statusOfLegalProceeding === "noLegalActionsTaken") {
|
|
290
|
+
businessFinancingDetails.organization.dateOfInitiationOfLegalProceeding = "";
|
|
291
|
+
}
|
|
292
|
+
if (companyData.sameAddressAsRootEntity && rootLegalEntity?.organization?.registeredAddress) {
|
|
293
|
+
businessFinancingDetails.organization.registeredAddress = {
|
|
294
|
+
...rootLegalEntity.organization.registeredAddress
|
|
295
|
+
};
|
|
296
|
+
}
|
|
297
|
+
if (companyData.isThisAddressTheMainHeadquarters) {
|
|
298
|
+
businessFinancingDetails.organization.principalPlaceOfBusiness = {
|
|
299
|
+
...businessFinancingDetails.organization.registeredAddress
|
|
300
|
+
};
|
|
301
|
+
}
|
|
302
|
+
if (companyData.doesYourCompanyHaveLEI !== "Yes") {
|
|
303
|
+
delete businessFinancingDetails.organization.globalLegalEntityIdentifier;
|
|
304
|
+
}
|
|
218
305
|
}
|
|
219
306
|
const businessFinancingLegalEntityId = getLegalEntityId(businessFinancingIndex, rootLegalEntity);
|
|
220
307
|
if (businessFinancingLegalEntityId) {
|
|
@@ -222,7 +309,7 @@ const prepareBusinessFinancingSubmitData = (businessFinancingIndex, data, rootLe
|
|
|
222
309
|
businessFinancingDetails.id = businessFinancingLegalEntityId;
|
|
223
310
|
} else {
|
|
224
311
|
delete businessFinancingDetails.id;
|
|
225
|
-
businessFinancingDetails.type = LegalEntityTypes.ORGANIZATION;
|
|
312
|
+
businessFinancingDetails.type = isSoleProprietor ? LegalEntityTypes.SOLE_PROPRIETORSHIP : LegalEntityTypes.ORGANIZATION;
|
|
226
313
|
}
|
|
227
314
|
return businessFinancingDetails;
|
|
228
315
|
};
|
|
@@ -249,8 +336,19 @@ const appendBusinessFinancingData = (legalOrganization, businessFinancingData) =
|
|
|
249
336
|
isThisAddressTheMainHeadquarters: legalOrganization.principalPlaceOfBusiness ? "Yes" : clonedBusinessFinancingData.isThisAddressTheMainHeadquarters
|
|
250
337
|
};
|
|
251
338
|
};
|
|
339
|
+
const appendSoleProprietorBusinessFinancingData = (legalArrangement, businessFinancingData) => {
|
|
340
|
+
if (!legalArrangement || !businessFinancingData) return businessFinancingData;
|
|
341
|
+
return {
|
|
342
|
+
...businessFinancingData,
|
|
343
|
+
naceCode: businessFinancingData.naceCode ?? legalArrangement.economicSector,
|
|
344
|
+
legalInformationInsolvency: businessFinancingData.legalInformationInsolvency ?? legalArrangement.statusOfLegalProceeding,
|
|
345
|
+
legalProceedingsDate: businessFinancingData.legalProceedingsDate ?? legalArrangement.dateOfInitiationOfLegalProceeding
|
|
346
|
+
};
|
|
347
|
+
};
|
|
252
348
|
const handleBusinessFinancingFormSubmission = async (businessFinancingType, details, createFunction, updateFunction, entityId) => {
|
|
253
|
-
if (!details)
|
|
349
|
+
if (!details) {
|
|
350
|
+
throw new Error(`Missing details for ${businessFinancingType}`);
|
|
351
|
+
}
|
|
254
352
|
try {
|
|
255
353
|
if (entityId) {
|
|
256
354
|
return await updateFunction({ ...details, id: entityId });
|
|
@@ -285,6 +383,13 @@ const getCompanySchemaKeys = (country, currentData, schemaKeys) => {
|
|
|
285
383
|
}
|
|
286
384
|
return schemaKeys.filter((field) => !fieldsToRemove.includes(field));
|
|
287
385
|
};
|
|
386
|
+
const getSoleProprietorSchemaKeys = (currentData, schemaKeys) => {
|
|
387
|
+
const fieldsToRemove = [];
|
|
388
|
+
if (!currentData?.legalInformationInsolvency || ["noLegalActionsTaken", "iDontKnow"].includes(currentData?.legalInformationInsolvency)) {
|
|
389
|
+
fieldsToRemove.push("legalProceedingsDate");
|
|
390
|
+
}
|
|
391
|
+
return schemaKeys.filter((field) => !fieldsToRemove.includes(field));
|
|
392
|
+
};
|
|
288
393
|
const getParentCompanySchemaKeys = (currentData, schemaKeys) => {
|
|
289
394
|
const fieldsToRemove = [];
|
|
290
395
|
const companyCountry = currentData?.registrationAddress?.country;
|
|
@@ -309,14 +414,22 @@ const getParentCompanySchemaKeys = (currentData, schemaKeys) => {
|
|
|
309
414
|
return schemaKeys.filter((field) => !fieldsToRemove.includes(field));
|
|
310
415
|
};
|
|
311
416
|
const getBusinessFinancingRequiredFields = (country, data) => {
|
|
312
|
-
let requiredFields =
|
|
313
|
-
company: companySchemaKeys
|
|
314
|
-
};
|
|
417
|
+
let requiredFields = void 0;
|
|
315
418
|
if (!data) {
|
|
316
419
|
return requiredFields;
|
|
317
420
|
}
|
|
318
|
-
const { company, parentCompany = {}, ultimateParentCompany = {} } = data;
|
|
421
|
+
const { company, soleProprietor, parentCompany = {}, ultimateParentCompany = {} } = data;
|
|
422
|
+
if (soleProprietor) {
|
|
423
|
+
requiredFields = {};
|
|
424
|
+
requiredFields.soleProprietor = getSoleProprietorSchemaKeys(
|
|
425
|
+
soleProprietor,
|
|
426
|
+
soleProprietorSchemaKeys
|
|
427
|
+
);
|
|
428
|
+
delete requiredFields.company;
|
|
429
|
+
return requiredFields;
|
|
430
|
+
}
|
|
319
431
|
if (company) {
|
|
432
|
+
requiredFields = {};
|
|
320
433
|
requiredFields.company = getCompanySchemaKeys(country, company, companySchemaKeys);
|
|
321
434
|
}
|
|
322
435
|
if (company?.isCompanyOwnedByAnotherCompany === "Yes") {
|
|
@@ -370,8 +483,22 @@ const customLabels = {
|
|
|
370
483
|
annualTurnover: "annualTurnover",
|
|
371
484
|
legalInformationInsolvency: "legalProceedings",
|
|
372
485
|
isThisAddressTheMainHeadquarters: "addressIsHeadquarters"
|
|
486
|
+
},
|
|
487
|
+
soleProprietor: {
|
|
488
|
+
naceCode: "industryAndNaceCode",
|
|
489
|
+
legalInformationInsolvency: "legalProceedings"
|
|
373
490
|
}
|
|
374
491
|
};
|
|
492
|
+
const getTranslatedGender = (t, gender) => {
|
|
493
|
+
if (!gender) return void 0;
|
|
494
|
+
const genderMap = {
|
|
495
|
+
M: "male",
|
|
496
|
+
F: "female",
|
|
497
|
+
U: "preferNotToSay"
|
|
498
|
+
};
|
|
499
|
+
const key = genderMap[gender];
|
|
500
|
+
return key ? t(($) => $[key]) : gender;
|
|
501
|
+
};
|
|
375
502
|
const getTranslatedLegalInsolvency = (t, insolvencyData) => {
|
|
376
503
|
if (!insolvencyData) return void 0;
|
|
377
504
|
return insolvencyData === "noLegalActionsTaken" ? t(($) => $["no"]) : t(($) => $[insolvencyData]);
|
|
@@ -393,7 +520,19 @@ const getFormattedAmount = (value, currency) => {
|
|
|
393
520
|
};
|
|
394
521
|
const formatDataForSummary = (language, t, datasetUtils, data, rootLeAddress) => {
|
|
395
522
|
const summaryData = cloneObject(data) || {};
|
|
396
|
-
const { company, parentCompany, ultimateParentCompany } = summaryData;
|
|
523
|
+
const { company, parentCompany, ultimateParentCompany, soleProprietor } = summaryData;
|
|
524
|
+
if (soleProprietor) {
|
|
525
|
+
soleProprietor.naceCode = soleProprietor.naceCodeLabel;
|
|
526
|
+
soleProprietor.countryOfBirth = soleProprietor.countryOfBirth ? datasetUtils.getCountryName(soleProprietor.countryOfBirth) ?? void 0 : void 0;
|
|
527
|
+
soleProprietor.legalInformationInsolvency = getTranslatedLegalInsolvency(
|
|
528
|
+
t,
|
|
529
|
+
soleProprietor.legalInformationInsolvency
|
|
530
|
+
);
|
|
531
|
+
soleProprietor.legalProceedingsDate = soleProprietor.legalProceedingsDate ? localizeDateString(soleProprietor.legalProceedingsDate, language) : void 0;
|
|
532
|
+
if (soleProprietor.gender) {
|
|
533
|
+
soleProprietor.gender = getTranslatedGender(t, soleProprietor.gender);
|
|
534
|
+
}
|
|
535
|
+
}
|
|
397
536
|
if (company) {
|
|
398
537
|
company.legalForm = company.legalFormLabel;
|
|
399
538
|
company.naceCode = company.naceCodeLabel;
|
|
@@ -504,7 +643,28 @@ const formatDataForSummary = (language, t, datasetUtils, data, rootLeAddress) =>
|
|
|
504
643
|
}
|
|
505
644
|
return summaryData;
|
|
506
645
|
};
|
|
507
|
-
const mapLegalEntityToBusinessFinancing = (legalEntity) =>
|
|
646
|
+
const mapLegalEntityToBusinessFinancing = (legalEntity) => {
|
|
647
|
+
if (legalEntity.type === LegalEntityTypes.SOLE_PROPRIETORSHIP) {
|
|
648
|
+
return formatObject(legalEntity, businessFinancingSoleProprietorComponentsKeyMapping);
|
|
649
|
+
}
|
|
650
|
+
if (legalEntity.type === LegalEntityTypes.INDIVIDUAL) {
|
|
651
|
+
const solePropAssociation = legalEntity.entityAssociations?.find(
|
|
652
|
+
(ea) => ea.entityType === LegalEntityTypes.SOLE_PROPRIETORSHIP && ea.associatorId === legalEntity.id
|
|
653
|
+
);
|
|
654
|
+
if (solePropAssociation) {
|
|
655
|
+
const solePropMapped = formatObject(
|
|
656
|
+
legalEntity,
|
|
657
|
+
businessFinancingSoleProprietorComponentsKeyMapping
|
|
658
|
+
);
|
|
659
|
+
return {
|
|
660
|
+
...solePropMapped,
|
|
661
|
+
gender: legalEntity.individual?.gender,
|
|
662
|
+
countryOfBirth: legalEntity.individual?.countryOfBirth
|
|
663
|
+
};
|
|
664
|
+
}
|
|
665
|
+
}
|
|
666
|
+
return formatObject(legalEntity, businessFinancingComponentsKeyMapping);
|
|
667
|
+
};
|
|
508
668
|
const getNaceCodes = async (baseUrl) => {
|
|
509
669
|
return httpGet({
|
|
510
670
|
baseUrl,
|
|
@@ -526,8 +686,7 @@ function NaceCodeField({
|
|
|
526
686
|
errorMessage,
|
|
527
687
|
label,
|
|
528
688
|
readonly,
|
|
529
|
-
handleChangeFor
|
|
530
|
-
helperText
|
|
689
|
+
handleChangeFor
|
|
531
690
|
}) {
|
|
532
691
|
const { i18n } = useI18nContext();
|
|
533
692
|
const { data: naceCodesData } = useNaceCodes();
|
|
@@ -561,7 +720,6 @@ function NaceCodeField({
|
|
|
561
720
|
label: label || i18n.get("industryAndNaceCode"),
|
|
562
721
|
errorMessage,
|
|
563
722
|
isValid: valid.naceCode,
|
|
564
|
-
helper: helperText?.naceCode,
|
|
565
723
|
children: (childProps) => /* @__PURE__ */ jsx(
|
|
566
724
|
Select,
|
|
567
725
|
{
|
|
@@ -607,7 +765,8 @@ function BusinessFinancingBusinessInformation(props) {
|
|
|
607
765
|
fieldValidationErrors,
|
|
608
766
|
targetPage,
|
|
609
767
|
sectionHeading,
|
|
610
|
-
hideSectionHeading
|
|
768
|
+
hideSectionHeading,
|
|
769
|
+
isSoleProprietor
|
|
611
770
|
} = props;
|
|
612
771
|
const { t: businessFinancingT } = useTranslation("businessFinancing");
|
|
613
772
|
const { t: commonT } = useTranslation("common");
|
|
@@ -617,8 +776,8 @@ function BusinessFinancingBusinessInformation(props) {
|
|
|
617
776
|
}
|
|
618
777
|
const isMainCompany = targetPage === BusinessFinancingPages.COMPANY_PAGE;
|
|
619
778
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
620
|
-
!hideSectionHeading && /* @__PURE__ */ jsx(Typography, { el: "h3", variant: "title", className: styles.businessFinancingTitle, children: sectionHeading ? businessFinancingT(($) => $[sectionHeading]) : businessFinancingT(($) => $["
|
|
621
|
-
/* @__PURE__ */ jsx(
|
|
779
|
+
!hideSectionHeading && /* @__PURE__ */ jsx(Typography, { el: "h3", variant: "title", className: styles.businessFinancingTitle, children: sectionHeading ? businessFinancingT(($) => $[sectionHeading]) : businessFinancingT(($) => $["businessInformation"]) }),
|
|
780
|
+
!isSoleProprietor && /* @__PURE__ */ jsx(
|
|
622
781
|
LegalFormField,
|
|
623
782
|
{
|
|
624
783
|
name: "legalForm",
|
|
@@ -645,80 +804,82 @@ function BusinessFinancingBusinessInformation(props) {
|
|
|
645
804
|
label: formUtils.getLabel("naceCode", "industryAndNaceCode")
|
|
646
805
|
}
|
|
647
806
|
),
|
|
648
|
-
/* @__PURE__ */
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
807
|
+
!isSoleProprietor && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
808
|
+
/* @__PURE__ */ jsx(
|
|
809
|
+
Field,
|
|
810
|
+
{
|
|
811
|
+
el: "fieldset",
|
|
812
|
+
name: "doesYourCompanyHaveLEI",
|
|
813
|
+
label: businessFinancingT(
|
|
814
|
+
($) => $[isMainCompany ? "doesYourCompanyHaveLEI" : "doesThisCompanyHaveLEI"]
|
|
815
|
+
),
|
|
816
|
+
helper: /* @__PURE__ */ jsxs(
|
|
817
|
+
Typography,
|
|
818
|
+
{
|
|
819
|
+
el: "div",
|
|
820
|
+
variant: "body",
|
|
821
|
+
color: "secondary",
|
|
822
|
+
className: styles.businessFinancingBody,
|
|
823
|
+
children: [
|
|
824
|
+
businessFinancingT(($) => $["anLEIIsAUniqueCode"]),
|
|
825
|
+
" ",
|
|
826
|
+
/* @__PURE__ */ jsx(Link, { href: "https://search.gleif.org/#/search/", external: true, inline: true, children: businessFinancingT(($) => $["lookUpYourLEI"]) })
|
|
827
|
+
]
|
|
828
|
+
}
|
|
829
|
+
),
|
|
830
|
+
errorMessage: formUtils.getErrorMessage(
|
|
831
|
+
"doesYourCompanyHaveLEI",
|
|
832
|
+
errors,
|
|
833
|
+
fieldValidationErrors
|
|
834
|
+
),
|
|
835
|
+
children: (childProps) => /* @__PURE__ */ jsx(
|
|
836
|
+
RadioGroup,
|
|
837
|
+
{
|
|
838
|
+
...childProps,
|
|
839
|
+
name: "doesYourCompanyHaveLEI",
|
|
840
|
+
items: isMainCompany ? businessFinancingRadioItems : businessFinancingParentRadioItems,
|
|
841
|
+
value: data?.doesYourCompanyHaveLEI,
|
|
842
|
+
disabled: false,
|
|
843
|
+
className: styles.businessFinancingLeiRadio,
|
|
844
|
+
onChange: handleFieldChange("doesYourCompanyHaveLEI"),
|
|
845
|
+
"aria-required": true,
|
|
846
|
+
"aria-invalid": !valid?.doesYourCompanyHaveLEI
|
|
847
|
+
}
|
|
848
|
+
)
|
|
849
|
+
}
|
|
850
|
+
),
|
|
851
|
+
data?.doesYourCompanyHaveLEI === "Yes" && /* @__PURE__ */ jsx(
|
|
852
|
+
Field,
|
|
853
|
+
{
|
|
854
|
+
name: "legalEntityIdentifier",
|
|
855
|
+
label: formUtils.getLabel("legalEntityIdentifier", "legalEntityIdentifier"),
|
|
856
|
+
errorMessage: formUtils.getErrorMessage(
|
|
857
|
+
"legalEntityIdentifier",
|
|
858
|
+
errors,
|
|
859
|
+
fieldValidationErrors
|
|
860
|
+
),
|
|
861
|
+
isValid: valid?.legalEntityIdentifier,
|
|
862
|
+
helper: commonT(($) => $["enterNCharactersWithAMixForExample"], {
|
|
863
|
+
numChars: 20,
|
|
864
|
+
example: "529900T8BM49AURSDO55"
|
|
865
|
+
}),
|
|
866
|
+
children: (childProps) => /* @__PURE__ */ jsx(
|
|
867
|
+
InputText,
|
|
868
|
+
{
|
|
869
|
+
...childProps,
|
|
870
|
+
name: "legalEntityIdentifier",
|
|
871
|
+
value: data?.legalEntityIdentifier,
|
|
872
|
+
readonly: false,
|
|
873
|
+
onInput: handleFieldChange("legalEntityIdentifier", "input"),
|
|
874
|
+
onBlur: handleFieldChange("legalEntityIdentifier", "blur"),
|
|
875
|
+
"aria-required": true,
|
|
876
|
+
"aria-invalid": !valid?.legalEntityIdentifier,
|
|
877
|
+
isValid: valid?.legalEntityIdentifier
|
|
878
|
+
}
|
|
879
|
+
)
|
|
880
|
+
}
|
|
881
|
+
)
|
|
882
|
+
] })
|
|
722
883
|
] });
|
|
723
884
|
}
|
|
724
885
|
const TODAY_DATE$1 = (/* @__PURE__ */ new Date()).toISOString().split("T")[0];
|
|
@@ -1055,7 +1216,7 @@ function AdditionalFieldsForBusinessFinancingCompany(props) {
|
|
|
1055
1216
|
Header,
|
|
1056
1217
|
{
|
|
1057
1218
|
title: businessFinancingT(($) => $["additionalInformationForBusinessFinancing"]),
|
|
1058
|
-
description: businessFinancingT(($) => $["
|
|
1219
|
+
description: businessFinancingT(($) => $["weNeedAFewMoreDetailsAboutYouAndYourBusiness"]),
|
|
1059
1220
|
secondary: true
|
|
1060
1221
|
}
|
|
1061
1222
|
),
|
|
@@ -1075,7 +1236,7 @@ function AdditionalFieldsForBusinessFinancingCompany(props) {
|
|
|
1075
1236
|
handleFieldChange: handleChange,
|
|
1076
1237
|
country,
|
|
1077
1238
|
targetPage: BusinessFinancingPages.COMPANY_PAGE,
|
|
1078
|
-
sectionHeading: "
|
|
1239
|
+
sectionHeading: "businessInformation",
|
|
1079
1240
|
data: formUtils.getFieldData(data?.company ?? {}, businessInformationFields)
|
|
1080
1241
|
}
|
|
1081
1242
|
),
|
|
@@ -1363,6 +1524,136 @@ function AdditionalFieldsForBusinessFinancingParentCompany(props) {
|
|
|
1363
1524
|
)
|
|
1364
1525
|
] });
|
|
1365
1526
|
}
|
|
1527
|
+
const soleProprietorPersonalInformationFields = ["gender", "countryOfBirth"];
|
|
1528
|
+
function BusinessFinancingSoleProprietorPersonalInformation(props) {
|
|
1529
|
+
const { data, valid, errors, handleFieldChange, fieldValidationErrors, sectionHeading } = props;
|
|
1530
|
+
const { t: businessFinancingT } = useTranslation("businessFinancing");
|
|
1531
|
+
const { t: commonT } = useTranslation("common");
|
|
1532
|
+
const formUtils = createFormUtils(props, commonT);
|
|
1533
|
+
if (!handleFieldChange) {
|
|
1534
|
+
return;
|
|
1535
|
+
}
|
|
1536
|
+
const genderItems = [
|
|
1537
|
+
{ id: "M", name: businessFinancingT(($) => $["male"]) },
|
|
1538
|
+
{ id: "F", name: businessFinancingT(($) => $["female"]) },
|
|
1539
|
+
{ id: "U", name: businessFinancingT(($) => $["preferNotToSay"]) }
|
|
1540
|
+
];
|
|
1541
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1542
|
+
/* @__PURE__ */ jsx(Typography, { el: "h3", variant: "title", className: styles.businessFinancingTitle, children: sectionHeading ? businessFinancingT(($) => $[sectionHeading]) : businessFinancingT(($) => $["personalInformation"]) }),
|
|
1543
|
+
/* @__PURE__ */ jsx(
|
|
1544
|
+
CountryField,
|
|
1545
|
+
{
|
|
1546
|
+
data: { country: data?.countryOfBirth },
|
|
1547
|
+
valid: { country: valid?.countryOfBirth },
|
|
1548
|
+
name: "countryOfBirth",
|
|
1549
|
+
errors: {
|
|
1550
|
+
country: formUtils.getErrorMessage("countryOfBirth", errors, fieldValidationErrors)
|
|
1551
|
+
},
|
|
1552
|
+
labels: { country: businessFinancingT(($) => $["countryOfBirth"]) },
|
|
1553
|
+
readonly: formUtils.isReadOnly("countryOfBirth"),
|
|
1554
|
+
handleChangeFor: () => handleFieldChange("countryOfBirth", "input")
|
|
1555
|
+
}
|
|
1556
|
+
),
|
|
1557
|
+
/* @__PURE__ */ jsx(
|
|
1558
|
+
Field,
|
|
1559
|
+
{
|
|
1560
|
+
name: "gender",
|
|
1561
|
+
label: businessFinancingT(($) => $["gender"]),
|
|
1562
|
+
errorMessage: formUtils.getErrorMessage("gender", errors, fieldValidationErrors),
|
|
1563
|
+
isValid: valid?.gender,
|
|
1564
|
+
children: (childProps) => /* @__PURE__ */ jsx(
|
|
1565
|
+
Select,
|
|
1566
|
+
{
|
|
1567
|
+
...childProps,
|
|
1568
|
+
onChange: handleFieldChange("gender", "blur"),
|
|
1569
|
+
name: "gender",
|
|
1570
|
+
placeholder: commonT(($) => $["selectOne"]),
|
|
1571
|
+
selected: data?.gender,
|
|
1572
|
+
items: genderItems,
|
|
1573
|
+
"aria-required": true,
|
|
1574
|
+
"aria-invalid": !valid?.gender
|
|
1575
|
+
}
|
|
1576
|
+
)
|
|
1577
|
+
}
|
|
1578
|
+
)
|
|
1579
|
+
] });
|
|
1580
|
+
}
|
|
1581
|
+
function AdditionalFieldsForBusinessFinancingSoleProprietor(props) {
|
|
1582
|
+
const { t: businessFinancingT } = useTranslation("businessFinancing");
|
|
1583
|
+
const { t: commonT } = useTranslation("common");
|
|
1584
|
+
const {
|
|
1585
|
+
form: { handleChangeFor, data }
|
|
1586
|
+
} = useFormContext();
|
|
1587
|
+
const { country, formVerificationErrors, fieldValidationErrors } = props;
|
|
1588
|
+
const formUtils = createFormUtils(props, commonT);
|
|
1589
|
+
const handleChange = (fieldName, mode) => handleChangeFor(
|
|
1590
|
+
fieldName,
|
|
1591
|
+
"soleProprietor",
|
|
1592
|
+
mode
|
|
1593
|
+
);
|
|
1594
|
+
const personalInformationProps = getFieldProps(props, soleProprietorPersonalInformationFields);
|
|
1595
|
+
const businessInformationProps = getFieldProps(props, ["naceCode", "naceCodeLabel"]);
|
|
1596
|
+
const legalInformationProps = getFieldProps(props, legalInformationFields);
|
|
1597
|
+
return /* @__PURE__ */ jsxs("form", { className: "adyen-kyc__high-exposure-company", children: [
|
|
1598
|
+
/* @__PURE__ */ jsx(
|
|
1599
|
+
Header,
|
|
1600
|
+
{
|
|
1601
|
+
title: businessFinancingT(($) => $["additionalInformationForBusinessFinancing"]),
|
|
1602
|
+
description: businessFinancingT(($) => $["weNeedAFewMoreDetailsAboutYouAndYourBusiness"]),
|
|
1603
|
+
secondary: true
|
|
1604
|
+
}
|
|
1605
|
+
),
|
|
1606
|
+
/* @__PURE__ */ jsx(
|
|
1607
|
+
ErrorPanel,
|
|
1608
|
+
{
|
|
1609
|
+
verificationErrors: formVerificationErrors,
|
|
1610
|
+
validationErrors: fieldValidationErrors,
|
|
1611
|
+
formUtils,
|
|
1612
|
+
id: "ariaErrorField"
|
|
1613
|
+
}
|
|
1614
|
+
),
|
|
1615
|
+
/* @__PURE__ */ jsx(
|
|
1616
|
+
BusinessFinancingSoleProprietorPersonalInformation,
|
|
1617
|
+
{
|
|
1618
|
+
...personalInformationProps,
|
|
1619
|
+
handleFieldChange: handleChange,
|
|
1620
|
+
country,
|
|
1621
|
+
targetPage: BusinessFinancingPages.SOLE_PROPRIETOR_PAGE,
|
|
1622
|
+
sectionHeading: "personalInformation",
|
|
1623
|
+
data: formUtils.getFieldData(
|
|
1624
|
+
data?.soleProprietor ?? {},
|
|
1625
|
+
soleProprietorPersonalInformationFields
|
|
1626
|
+
)
|
|
1627
|
+
}
|
|
1628
|
+
),
|
|
1629
|
+
/* @__PURE__ */ jsx(
|
|
1630
|
+
BusinessFinancingBusinessInformation,
|
|
1631
|
+
{
|
|
1632
|
+
...businessInformationProps,
|
|
1633
|
+
handleFieldChange: handleChange,
|
|
1634
|
+
country,
|
|
1635
|
+
targetPage: BusinessFinancingPages.SOLE_PROPRIETOR_PAGE,
|
|
1636
|
+
sectionHeading: "businessInformation",
|
|
1637
|
+
isSoleProprietor: true,
|
|
1638
|
+
data: formUtils.getFieldData(data?.soleProprietor ?? {}, [
|
|
1639
|
+
"naceCode",
|
|
1640
|
+
"naceCodeLabel"
|
|
1641
|
+
])
|
|
1642
|
+
}
|
|
1643
|
+
),
|
|
1644
|
+
/* @__PURE__ */ jsx(
|
|
1645
|
+
BusinessFinancingLegalInformation,
|
|
1646
|
+
{
|
|
1647
|
+
...legalInformationProps,
|
|
1648
|
+
country,
|
|
1649
|
+
handleFieldChange: handleChange,
|
|
1650
|
+
targetPage: BusinessFinancingPages.SOLE_PROPRIETOR_PAGE,
|
|
1651
|
+
sectionHeading: "legalInformation",
|
|
1652
|
+
data: formUtils.getFieldData(data?.soleProprietor ?? {}, legalInformationFields)
|
|
1653
|
+
}
|
|
1654
|
+
)
|
|
1655
|
+
] });
|
|
1656
|
+
}
|
|
1366
1657
|
const ultimateParentCompanyFormId$1 = businessFinancingForms.ultimateParentCompany.formId;
|
|
1367
1658
|
function AdditionalFieldsForBusinessFinancingUltimateParentCompany(props) {
|
|
1368
1659
|
const { formVerificationErrors, country, fieldValidationErrors, legalEntity } = props;
|
|
@@ -1462,14 +1753,17 @@ function AdditionalFieldsForBusinessFinancingUltimateParentCompany(props) {
|
|
|
1462
1753
|
}
|
|
1463
1754
|
const getOrgAnalyticsData = (prefix, details) => {
|
|
1464
1755
|
const org = details?.organization;
|
|
1465
|
-
|
|
1756
|
+
const soleProp = details?.soleProprietorship;
|
|
1757
|
+
const entity = org || soleProp;
|
|
1758
|
+
if (!entity) return {};
|
|
1466
1759
|
return {
|
|
1467
|
-
[`${prefix}--economicSector`]:
|
|
1760
|
+
[`${prefix}--economicSector`]: entity?.economicSector ?? "",
|
|
1468
1761
|
[`${prefix}--legalForm`]: org?.legalForm ?? "",
|
|
1469
|
-
[`${prefix}--statusOfLegalProceeding`]:
|
|
1762
|
+
[`${prefix}--statusOfLegalProceeding`]: entity?.statusOfLegalProceeding ?? ""
|
|
1470
1763
|
};
|
|
1471
1764
|
};
|
|
1472
1765
|
const businessFinancingFormsRequiredFields = {
|
|
1766
|
+
soleProprietor: businessFinancingForms.soleProprietor.fields,
|
|
1473
1767
|
company: businessFinancingForms.company.fields,
|
|
1474
1768
|
parentCompany: businessFinancingForms.parentCompany.fields,
|
|
1475
1769
|
ultimateParentCompany: businessFinancingForms.ultimateParentCompany.fields
|
|
@@ -1496,45 +1790,63 @@ function BusinessFinancingDropin(props) {
|
|
|
1496
1790
|
const { mutateAsync: updateLegalEntity } = useUpdateLegalEntity();
|
|
1497
1791
|
const { data: immediateParentCompany, isLoading: immediateParentCompanyIsLoading } = useAssociatedLegalEntity(rootLegalEntity, "immediateParentCompany");
|
|
1498
1792
|
const { data: ultimateParentCompany, isLoading: ultimateParentCompanyIsLoading } = useAssociatedLegalEntity(rootLegalEntity, "ultimateParentCompany");
|
|
1793
|
+
const { data: soleProprietor, isLoading: soleProprietorIsLoading } = useAssociatedLegalEntity(
|
|
1794
|
+
rootLegalEntity,
|
|
1795
|
+
"soleProprietorship"
|
|
1796
|
+
);
|
|
1499
1797
|
const derivedData = useMemo(() => {
|
|
1500
|
-
if (immediateParentCompanyIsLoading || ultimateParentCompanyIsLoading
|
|
1798
|
+
if (immediateParentCompanyIsLoading || ultimateParentCompanyIsLoading || soleProprietorIsLoading)
|
|
1799
|
+
return void 0;
|
|
1800
|
+
const isSoleProprietor = hasSolePropInLegalEntity(rootLegalEntity);
|
|
1501
1801
|
const dataFromResponse = {};
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
dataFromResponse.company = appendBusinessFinancingData(
|
|
1506
|
-
rootLegalEntity.organization,
|
|
1507
|
-
dataFromResponse.company
|
|
1508
|
-
);
|
|
1509
|
-
dataFromResponse.company.isCompanyOwnedByAnotherCompany = "No";
|
|
1510
|
-
dataFromResponse.company.isParentOwnedByAnotherCompany = "No";
|
|
1511
|
-
if (immediateParentCompany) {
|
|
1512
|
-
dataFromResponse.parentCompany = mapLegalEntityToBusinessFinancing(
|
|
1513
|
-
immediateParentCompany
|
|
1802
|
+
if (isSoleProprietor && soleProprietor) {
|
|
1803
|
+
dataFromResponse.soleProprietor = mapLegalEntityToBusinessFinancing(
|
|
1804
|
+
rootLegalEntity
|
|
1514
1805
|
);
|
|
1515
|
-
dataFromResponse.
|
|
1516
|
-
|
|
1517
|
-
dataFromResponse.
|
|
1806
|
+
dataFromResponse.soleProprietor = appendSoleProprietorBusinessFinancingData(
|
|
1807
|
+
soleProprietor.soleProprietorship,
|
|
1808
|
+
dataFromResponse.soleProprietor
|
|
1518
1809
|
);
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
dataFromResponse.ultimateParentCompany = mapLegalEntityToBusinessFinancing(
|
|
1523
|
-
ultimateParentCompany
|
|
1810
|
+
} else if (rootLegalEntity.type === LegalEntityTypes.ORGANIZATION) {
|
|
1811
|
+
dataFromResponse.company = mapLegalEntityToBusinessFinancing(
|
|
1812
|
+
rootLegalEntity
|
|
1524
1813
|
);
|
|
1525
|
-
dataFromResponse.
|
|
1526
|
-
|
|
1527
|
-
dataFromResponse.
|
|
1814
|
+
dataFromResponse.company = appendBusinessFinancingData(
|
|
1815
|
+
rootLegalEntity.organization,
|
|
1816
|
+
dataFromResponse.company
|
|
1528
1817
|
);
|
|
1529
|
-
dataFromResponse.company.
|
|
1818
|
+
dataFromResponse.company.isCompanyOwnedByAnotherCompany = "No";
|
|
1819
|
+
dataFromResponse.company.isParentOwnedByAnotherCompany = "No";
|
|
1820
|
+
if (immediateParentCompany) {
|
|
1821
|
+
dataFromResponse.parentCompany = mapLegalEntityToBusinessFinancing(
|
|
1822
|
+
immediateParentCompany
|
|
1823
|
+
);
|
|
1824
|
+
dataFromResponse.parentCompany = appendBusinessFinancingData(
|
|
1825
|
+
immediateParentCompany.organization,
|
|
1826
|
+
dataFromResponse.parentCompany
|
|
1827
|
+
);
|
|
1828
|
+
dataFromResponse.company.isCompanyOwnedByAnotherCompany = "Yes";
|
|
1829
|
+
}
|
|
1830
|
+
if (ultimateParentCompany) {
|
|
1831
|
+
dataFromResponse.ultimateParentCompany = mapLegalEntityToBusinessFinancing(
|
|
1832
|
+
ultimateParentCompany
|
|
1833
|
+
);
|
|
1834
|
+
dataFromResponse.ultimateParentCompany = appendBusinessFinancingData(
|
|
1835
|
+
ultimateParentCompany.organization,
|
|
1836
|
+
dataFromResponse.ultimateParentCompany
|
|
1837
|
+
);
|
|
1838
|
+
dataFromResponse.company.isParentOwnedByAnotherCompany = "Yes";
|
|
1839
|
+
}
|
|
1530
1840
|
}
|
|
1531
1841
|
return dataFromResponse;
|
|
1532
1842
|
}, [
|
|
1533
1843
|
immediateParentCompanyIsLoading,
|
|
1534
1844
|
ultimateParentCompanyIsLoading,
|
|
1845
|
+
soleProprietorIsLoading,
|
|
1535
1846
|
rootLegalEntity,
|
|
1536
1847
|
immediateParentCompany,
|
|
1537
|
-
ultimateParentCompany
|
|
1848
|
+
ultimateParentCompany,
|
|
1849
|
+
soleProprietor
|
|
1538
1850
|
]);
|
|
1539
1851
|
useEffect(() => {
|
|
1540
1852
|
userEvents.addTaskEvent("Landed on page", {
|
|
@@ -1559,138 +1871,187 @@ function BusinessFinancingDropin(props) {
|
|
|
1559
1871
|
if (!umfData) {
|
|
1560
1872
|
return;
|
|
1561
1873
|
}
|
|
1562
|
-
const
|
|
1874
|
+
const isSoleProprietor = hasSolePropInLegalEntity(rootLegalEntity);
|
|
1875
|
+
const mainEntityDetails = !isSoleProprietor ? prepareBusinessFinancingSubmitData(
|
|
1563
1876
|
BusinessFinancingIndices.COMPANY,
|
|
1564
1877
|
umfData,
|
|
1565
1878
|
rootLegalEntity
|
|
1566
|
-
);
|
|
1567
|
-
const
|
|
1879
|
+
) : null;
|
|
1880
|
+
const soleProprietorPayloads = isSoleProprietor ? prepareSoleProprietorBusinessFinancingSubmitData(umfData, rootLegalEntity, soleProprietor) : null;
|
|
1881
|
+
const parentCompanyBusinessFinancingDetails = !isSoleProprietor ? prepareBusinessFinancingSubmitData(
|
|
1568
1882
|
BusinessFinancingIndices.PARENT_COMPANY,
|
|
1569
1883
|
umfData,
|
|
1570
1884
|
rootLegalEntity
|
|
1571
|
-
);
|
|
1572
|
-
const ultimateParentCompanyBusinessFinancingDetails = prepareBusinessFinancingSubmitData(
|
|
1885
|
+
) : null;
|
|
1886
|
+
const ultimateParentCompanyBusinessFinancingDetails = !isSoleProprietor ? prepareBusinessFinancingSubmitData(
|
|
1573
1887
|
BusinessFinancingIndices.ULTIMATE_PARENT_COMPANY,
|
|
1574
1888
|
umfData,
|
|
1575
1889
|
rootLegalEntity
|
|
1576
|
-
);
|
|
1577
|
-
if (
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
BusinessFinancingIndices.
|
|
1588
|
-
|
|
1890
|
+
) : null;
|
|
1891
|
+
if (isSoleProprietor) {
|
|
1892
|
+
if (!soleProprietorPayloads || !rootLegalEntity || !soleProprietor?.id) {
|
|
1893
|
+
showToast({
|
|
1894
|
+
label: businessFinancingT(($) => $["missingCompanyDetails"]),
|
|
1895
|
+
variant: "error"
|
|
1896
|
+
});
|
|
1897
|
+
return;
|
|
1898
|
+
}
|
|
1899
|
+
try {
|
|
1900
|
+
await handleBusinessFinancingFormSubmission(
|
|
1901
|
+
BusinessFinancingIndices.SOLE_PROPRIETOR,
|
|
1902
|
+
soleProprietorPayloads.individualPayload,
|
|
1589
1903
|
createLegalEntity,
|
|
1590
1904
|
updateLegalEntity,
|
|
1591
|
-
|
|
1905
|
+
rootLegalEntity.id
|
|
1592
1906
|
);
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
const ultimateParentCompanyPromise = handleBusinessFinancingFormSubmission(
|
|
1597
|
-
BusinessFinancingIndices.ULTIMATE_PARENT_COMPANY,
|
|
1598
|
-
ultimateParentCompanyBusinessFinancingDetails,
|
|
1907
|
+
const solePropResponse = await handleBusinessFinancingFormSubmission(
|
|
1908
|
+
BusinessFinancingIndices.SOLE_PROPRIETOR,
|
|
1909
|
+
soleProprietorPayloads.solePropPayload,
|
|
1599
1910
|
createLegalEntity,
|
|
1600
1911
|
updateLegalEntity,
|
|
1601
|
-
|
|
1912
|
+
soleProprietor.id
|
|
1602
1913
|
);
|
|
1603
|
-
promises.push(ultimateParentCompanyPromise);
|
|
1604
|
-
}
|
|
1605
|
-
const results = await Promise.allSettled(promises);
|
|
1606
|
-
const previousEntityAssociations = rootLegalEntity.entityAssociations ? rootLegalEntity.entityAssociations.filter(
|
|
1607
|
-
(entityAssociation) => entityAssociation.type !== "immediateParentCompany" && entityAssociation.type !== "ultimateParentCompany"
|
|
1608
|
-
) : [];
|
|
1609
|
-
const businessFinancingEntityAssociations = [
|
|
1610
|
-
...previousEntityAssociations
|
|
1611
|
-
];
|
|
1612
|
-
const entitiesToTrack = [BusinessFinancingIndices.COMPANY];
|
|
1613
|
-
results.forEach((result, index) => {
|
|
1614
|
-
const businessFinancingType = index === 0 ? BusinessFinancingIndices.PARENT_COMPANY : BusinessFinancingIndices.ULTIMATE_PARENT_COMPANY;
|
|
1615
|
-
if (result.status === "fulfilled") {
|
|
1616
|
-
const response = result.value;
|
|
1617
|
-
if (businessFinancingType === BusinessFinancingIndices.PARENT_COMPANY) {
|
|
1618
|
-
businessFinancingEntityAssociations.push({
|
|
1619
|
-
type: "immediateParentCompany",
|
|
1620
|
-
legalEntityId: response.id,
|
|
1621
|
-
associatorId: companyBusinessFinancingDetails.id
|
|
1622
|
-
});
|
|
1623
|
-
entitiesToTrack.push(BusinessFinancingIndices.PARENT_COMPANY);
|
|
1624
|
-
} else if (businessFinancingType === BusinessFinancingIndices.ULTIMATE_PARENT_COMPANY) {
|
|
1625
|
-
businessFinancingEntityAssociations.push({
|
|
1626
|
-
type: "ultimateParentCompany",
|
|
1627
|
-
legalEntityId: response.id,
|
|
1628
|
-
associatorId: companyBusinessFinancingDetails.id
|
|
1629
|
-
});
|
|
1630
|
-
entitiesToTrack.push(BusinessFinancingIndices.ULTIMATE_PARENT_COMPANY);
|
|
1631
|
-
}
|
|
1632
|
-
} else {
|
|
1633
|
-
if (businessFinancingType === BusinessFinancingIndices.PARENT_COMPANY) {
|
|
1634
|
-
parentCompanyFailed = true;
|
|
1635
|
-
} else if (businessFinancingType === BusinessFinancingIndices.ULTIMATE_PARENT_COMPANY) {
|
|
1636
|
-
ultimateParentCompanyFailed = true;
|
|
1637
|
-
}
|
|
1638
|
-
handleSubmissionError(result.reason, businessFinancingType);
|
|
1639
|
-
}
|
|
1640
|
-
});
|
|
1641
|
-
if (!parentCompanyFailed && !ultimateParentCompanyFailed) {
|
|
1642
|
-
companyBusinessFinancingDetails.entityAssociations = [
|
|
1643
|
-
...businessFinancingEntityAssociations
|
|
1644
|
-
];
|
|
1645
1914
|
const eventsAdditionalData = {
|
|
1646
|
-
...getOrgAnalyticsData("
|
|
1647
|
-
...getOrgAnalyticsData("ParentCompany", parentCompanyBusinessFinancingDetails),
|
|
1648
|
-
...getOrgAnalyticsData(
|
|
1649
|
-
"UltimateParentCompany",
|
|
1650
|
-
ultimateParentCompanyBusinessFinancingDetails
|
|
1651
|
-
)
|
|
1915
|
+
...getOrgAnalyticsData("SoleProprietor", solePropResponse)
|
|
1652
1916
|
};
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1917
|
+
userEvents.addTaskEvent("Success", {
|
|
1918
|
+
actionType: "submit",
|
|
1919
|
+
returnValue: [BusinessFinancingIndices.SOLE_PROPRIETOR],
|
|
1920
|
+
additionalData: eventsAdditionalData
|
|
1921
|
+
});
|
|
1922
|
+
await invalidateRootLegalEntity();
|
|
1923
|
+
if (showBusinessFinancingFirst || isStandaloneComponent) {
|
|
1924
|
+
setShowEndState(true);
|
|
1925
|
+
} else {
|
|
1926
|
+
externalOnSubmit?.({ ...umfData });
|
|
1927
|
+
}
|
|
1928
|
+
setProblems({});
|
|
1929
|
+
} catch (e) {
|
|
1930
|
+
showToast({ label: commonT(($) => $["failedToUpdateDetails"]), variant: "error" });
|
|
1931
|
+
handleSubmissionError(e, BusinessFinancingIndices.SOLE_PROPRIETOR);
|
|
1932
|
+
} finally {
|
|
1933
|
+
setLoadingStatus("success");
|
|
1934
|
+
}
|
|
1935
|
+
} else {
|
|
1936
|
+
if (!mainEntityDetails || !rootLegalEntity) {
|
|
1937
|
+
showToast({
|
|
1938
|
+
label: businessFinancingT(($) => $["missingCompanyDetails"]),
|
|
1939
|
+
variant: "error"
|
|
1940
|
+
});
|
|
1941
|
+
return;
|
|
1942
|
+
}
|
|
1943
|
+
let parentCompanyFailed = false;
|
|
1944
|
+
let ultimateParentCompanyFailed = false;
|
|
1945
|
+
try {
|
|
1946
|
+
const promises = [];
|
|
1947
|
+
if (parentCompanyBusinessFinancingDetails) {
|
|
1948
|
+
const parentCompanyPromise = handleBusinessFinancingFormSubmission(
|
|
1949
|
+
BusinessFinancingIndices.PARENT_COMPANY,
|
|
1950
|
+
parentCompanyBusinessFinancingDetails,
|
|
1657
1951
|
createLegalEntity,
|
|
1658
1952
|
updateLegalEntity,
|
|
1659
|
-
|
|
1953
|
+
parentCompanyBusinessFinancingDetails?.id
|
|
1660
1954
|
);
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1955
|
+
promises.push(parentCompanyPromise);
|
|
1956
|
+
}
|
|
1957
|
+
if (ultimateParentCompanyBusinessFinancingDetails) {
|
|
1958
|
+
const ultimateParentCompanyPromise = handleBusinessFinancingFormSubmission(
|
|
1959
|
+
BusinessFinancingIndices.ULTIMATE_PARENT_COMPANY,
|
|
1960
|
+
ultimateParentCompanyBusinessFinancingDetails,
|
|
1961
|
+
createLegalEntity,
|
|
1962
|
+
updateLegalEntity,
|
|
1963
|
+
ultimateParentCompanyBusinessFinancingDetails?.id
|
|
1964
|
+
);
|
|
1965
|
+
promises.push(ultimateParentCompanyPromise);
|
|
1966
|
+
}
|
|
1967
|
+
const results = await Promise.allSettled(promises);
|
|
1968
|
+
const previousEntityAssociations = rootLegalEntity.entityAssociations ? rootLegalEntity.entityAssociations.filter(
|
|
1969
|
+
(entityAssociation) => entityAssociation.type !== "immediateParentCompany" && entityAssociation.type !== "ultimateParentCompany"
|
|
1970
|
+
) : [];
|
|
1971
|
+
const businessFinancingEntityAssociations = [
|
|
1972
|
+
...previousEntityAssociations
|
|
1973
|
+
];
|
|
1974
|
+
const entitiesToTrack = [BusinessFinancingIndices.COMPANY];
|
|
1975
|
+
results.forEach((result, index) => {
|
|
1976
|
+
const businessFinancingType = index === 0 ? BusinessFinancingIndices.PARENT_COMPANY : BusinessFinancingIndices.ULTIMATE_PARENT_COMPANY;
|
|
1977
|
+
if (result.status === "fulfilled") {
|
|
1978
|
+
const response = result.value;
|
|
1979
|
+
if (businessFinancingType === BusinessFinancingIndices.PARENT_COMPANY) {
|
|
1980
|
+
businessFinancingEntityAssociations.push({
|
|
1981
|
+
type: "immediateParentCompany",
|
|
1982
|
+
legalEntityId: response.id,
|
|
1983
|
+
associatorId: mainEntityDetails.id
|
|
1984
|
+
});
|
|
1985
|
+
entitiesToTrack.push(BusinessFinancingIndices.PARENT_COMPANY);
|
|
1986
|
+
} else if (businessFinancingType === BusinessFinancingIndices.ULTIMATE_PARENT_COMPANY) {
|
|
1987
|
+
businessFinancingEntityAssociations.push({
|
|
1988
|
+
type: "ultimateParentCompany",
|
|
1989
|
+
legalEntityId: response.id,
|
|
1990
|
+
associatorId: mainEntityDetails.id
|
|
1991
|
+
});
|
|
1992
|
+
entitiesToTrack.push(BusinessFinancingIndices.ULTIMATE_PARENT_COMPANY);
|
|
1993
|
+
}
|
|
1669
1994
|
} else {
|
|
1670
|
-
|
|
1995
|
+
if (businessFinancingType === BusinessFinancingIndices.PARENT_COMPANY) {
|
|
1996
|
+
parentCompanyFailed = true;
|
|
1997
|
+
} else if (businessFinancingType === BusinessFinancingIndices.ULTIMATE_PARENT_COMPANY) {
|
|
1998
|
+
ultimateParentCompanyFailed = true;
|
|
1999
|
+
}
|
|
2000
|
+
handleSubmissionError(result.reason, businessFinancingType);
|
|
1671
2001
|
}
|
|
1672
|
-
}
|
|
1673
|
-
|
|
2002
|
+
});
|
|
2003
|
+
if (!parentCompanyFailed && !ultimateParentCompanyFailed) {
|
|
2004
|
+
mainEntityDetails.entityAssociations = [...businessFinancingEntityAssociations];
|
|
2005
|
+
const eventsAdditionalData = {
|
|
2006
|
+
...getOrgAnalyticsData("Business", mainEntityDetails),
|
|
2007
|
+
...getOrgAnalyticsData("ParentCompany", parentCompanyBusinessFinancingDetails),
|
|
2008
|
+
...getOrgAnalyticsData(
|
|
2009
|
+
"UltimateParentCompany",
|
|
2010
|
+
ultimateParentCompanyBusinessFinancingDetails
|
|
2011
|
+
)
|
|
2012
|
+
};
|
|
2013
|
+
try {
|
|
2014
|
+
await handleBusinessFinancingFormSubmission(
|
|
2015
|
+
BusinessFinancingIndices.COMPANY,
|
|
2016
|
+
mainEntityDetails,
|
|
2017
|
+
createLegalEntity,
|
|
2018
|
+
updateLegalEntity,
|
|
2019
|
+
mainEntityDetails?.id
|
|
2020
|
+
);
|
|
2021
|
+
userEvents.addTaskEvent("Success", {
|
|
2022
|
+
actionType: "submit",
|
|
2023
|
+
returnValue: entitiesToTrack,
|
|
2024
|
+
additionalData: eventsAdditionalData
|
|
2025
|
+
});
|
|
2026
|
+
await invalidateRootLegalEntity();
|
|
2027
|
+
if (showBusinessFinancingFirst || isStandaloneComponent) {
|
|
2028
|
+
setShowEndState(true);
|
|
2029
|
+
} else {
|
|
2030
|
+
externalOnSubmit?.({ ...umfData });
|
|
2031
|
+
}
|
|
2032
|
+
} catch (e) {
|
|
2033
|
+
showToast({ label: commonT(($) => $["failedToUpdateDetails"]), variant: "error" });
|
|
2034
|
+
handleSubmissionError(e, BusinessFinancingIndices.COMPANY);
|
|
2035
|
+
}
|
|
2036
|
+
setProblems({});
|
|
2037
|
+
}
|
|
2038
|
+
} catch (e) {
|
|
2039
|
+
if (!parentCompanyFailed && !ultimateParentCompanyFailed) {
|
|
1674
2040
|
handleSubmissionError(e, BusinessFinancingIndices.COMPANY);
|
|
1675
2041
|
}
|
|
1676
|
-
|
|
1677
|
-
}
|
|
1678
|
-
|
|
1679
|
-
if (!parentCompanyFailed && !ultimateParentCompanyFailed) {
|
|
1680
|
-
handleSubmissionError(e, BusinessFinancingIndices.COMPANY);
|
|
2042
|
+
showToast({ label: commonT(($) => $["failedToUpdateDetails"]), variant: "error" });
|
|
2043
|
+
} finally {
|
|
2044
|
+
setLoadingStatus("success");
|
|
1681
2045
|
}
|
|
1682
|
-
showToast({ label: commonT(($) => $["failedToUpdateDetails"]), variant: "error" });
|
|
1683
|
-
} finally {
|
|
1684
|
-
setLoadingStatus("success");
|
|
1685
2046
|
}
|
|
1686
2047
|
};
|
|
1687
2048
|
const handleSubmissionError = (error, businessFinancingType) => {
|
|
2049
|
+
const keyMapping = businessFinancingType === BusinessFinancingIndices.SOLE_PROPRIETOR ? {
|
|
2050
|
+
...businessFinancingIndividualApiKeyMapping,
|
|
2051
|
+
...businessFinancingSoleProprietorApiKeyMapping
|
|
2052
|
+
} : businessFinancingApiKeyMapping;
|
|
1688
2053
|
if (isValidationError(error.actualError)) {
|
|
1689
|
-
const validationErrors = processValidationErrors(
|
|
1690
|
-
error.actualError,
|
|
1691
|
-
void 0,
|
|
1692
|
-
businessFinancingApiKeyMapping
|
|
1693
|
-
);
|
|
2054
|
+
const validationErrors = processValidationErrors(error.actualError, void 0, keyMapping);
|
|
1694
2055
|
setProblems((prevProblems) => ({
|
|
1695
2056
|
...prevProblems,
|
|
1696
2057
|
validationErrors: {
|
|
@@ -1723,22 +2084,26 @@ function BusinessFinancingDropin(props) {
|
|
|
1723
2084
|
});
|
|
1724
2085
|
const { data: umfData = derivedData, isValid, errors, valid } = form;
|
|
1725
2086
|
useEffect(() => {
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
2087
|
+
let updateForms = {};
|
|
2088
|
+
if (umfData?.soleProprietor) {
|
|
2089
|
+
updateForms = { soleProprietor: { ...businessFinancingForms.soleProprietor } };
|
|
2090
|
+
} else {
|
|
2091
|
+
updateForms = { company: { ...businessFinancingForms.company } };
|
|
2092
|
+
const showParentCompany = umfData?.company?.isCompanyOwnedByAnotherCompany === "Yes";
|
|
2093
|
+
const showUltimateParentCompany = umfData?.company?.isParentOwnedByAnotherCompany === "Yes";
|
|
2094
|
+
if (showParentCompany) {
|
|
2095
|
+
updateForms = { ...updateForms, parentCompany: businessFinancingForms.parentCompany };
|
|
2096
|
+
}
|
|
2097
|
+
if (showParentCompany && showUltimateParentCompany) {
|
|
2098
|
+
updateForms = {
|
|
2099
|
+
...updateForms,
|
|
2100
|
+
ultimateParentCompany: businessFinancingForms.ultimateParentCompany
|
|
2101
|
+
};
|
|
2102
|
+
}
|
|
1739
2103
|
}
|
|
1740
2104
|
setBusinessFinancingRequiredForms(updateForms);
|
|
1741
2105
|
}, [
|
|
2106
|
+
umfData?.soleProprietor,
|
|
1742
2107
|
umfData?.company?.isCompanyOwnedByAnotherCompany,
|
|
1743
2108
|
umfData?.company?.isParentOwnedByAnotherCompany
|
|
1744
2109
|
]);
|
|
@@ -1767,6 +2132,21 @@ function BusinessFinancingDropin(props) {
|
|
|
1767
2132
|
onSubmit
|
|
1768
2133
|
});
|
|
1769
2134
|
const renderActiveForm = (selectedForm) => /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-form-wrapper", children: [
|
|
2135
|
+
selectedForm.formId === "soleProprietor" && /* @__PURE__ */ jsx(
|
|
2136
|
+
AdditionalFieldsForBusinessFinancingSoleProprietor,
|
|
2137
|
+
{
|
|
2138
|
+
data: defaultData?.soleProprietor,
|
|
2139
|
+
legalEntity: rootLegalEntity,
|
|
2140
|
+
heading: businessFinancingT(($) => $["additionalInformationForBusinessFinancing"]),
|
|
2141
|
+
id: selectedForm.formId,
|
|
2142
|
+
country,
|
|
2143
|
+
shouldValidate,
|
|
2144
|
+
fieldValidationErrors: problems?.validationErrors?.[selectedForm?.formId],
|
|
2145
|
+
formVerificationErrors: problems?.verificationErrors?.[selectedForm?.formId],
|
|
2146
|
+
errors: errors?.soleProprietor,
|
|
2147
|
+
valid: valid?.soleProprietor
|
|
2148
|
+
}
|
|
2149
|
+
),
|
|
1770
2150
|
selectedForm.formId === companyFormId && /* @__PURE__ */ jsx(
|
|
1771
2151
|
AdditionalFieldsForBusinessFinancingCompany,
|
|
1772
2152
|
{
|
|
@@ -1807,7 +2187,7 @@ function BusinessFinancingDropin(props) {
|
|
|
1807
2187
|
}
|
|
1808
2188
|
)
|
|
1809
2189
|
] });
|
|
1810
|
-
if (!defaultData?.company) {
|
|
2190
|
+
if (!defaultData?.company && !defaultData?.soleProprietor) {
|
|
1811
2191
|
return /* @__PURE__ */ jsx(Loader, {});
|
|
1812
2192
|
}
|
|
1813
2193
|
return showEndState ? /* @__PURE__ */ jsx(
|
|
@@ -1844,7 +2224,9 @@ function BusinessFinancingDropin(props) {
|
|
|
1844
2224
|
handleNextClick,
|
|
1845
2225
|
loadingStatus,
|
|
1846
2226
|
totalSteps: steps.total,
|
|
1847
|
-
children: /* @__PURE__ */ jsx("div", { children: renderActiveForm(
|
|
2227
|
+
children: /* @__PURE__ */ jsx("div", { children: renderActiveForm(
|
|
2228
|
+
activeForm || (defaultData?.soleProprietor ? businessFinancingForms.soleProprietor : businessFinancingForms.company)
|
|
2229
|
+
) })
|
|
1848
2230
|
}
|
|
1849
2231
|
) });
|
|
1850
2232
|
}
|