@adyen/kyc-components 3.94.0 → 3.95.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{AcceptTermsOfServiceComponent-UXDlHmf_.js → AcceptTermsOfServiceComponent-BW0brynM.js} +36 -32
- package/dist/{Accordion-DM9qeMoR.js → Accordion-BM8hZAXY.js} +2 -2
- package/dist/{AccountSetupRejected-DfmKQEp-.js → AccountSetupRejected-BodluXLt.js} +4 -4
- package/dist/{ActionBar-DCKuV5BO.js → ActionBar-UJRkmh5s.js} +2 -2
- package/dist/{Address-BEUcWe_H.js → Address-DI_WQl-j.js} +10 -12
- package/dist/{Alert-D9HbhU88.js → Alert-BZOtTqxJ.js} +3 -3
- package/dist/{Avatar-C_tjYaBz.js → Avatar-BkSExeAD.js} +2 -2
- package/dist/{BusinessFinancingComponent-B5gLGmkK.js → BusinessFinancingComponent-XUA40MWu.js} +7 -7
- package/dist/{BusinessFinancingDropin-BpZKzB71.js → BusinessFinancingDropin-BmdwxjTl.js} +689 -307
- package/dist/{BusinessFinancingPage-CKdy77OK.js → BusinessFinancingPage-4HciuNgT.js} +5 -5
- package/dist/{BusinessTypeSelectionPage-ClkY9cbT.js → BusinessTypeSelectionPage-D6N0Ru4g.js} +9 -9
- package/dist/{Checkbox-BU4IYlt6.js → Checkbox-HJ5QMOjP.js} +2 -2
- package/dist/{Confirm-BM1PTsnm.js → Confirm-BtVNOsTV.js} +3 -3
- package/dist/{ConstitutionalDocument-D9sPfw_B.js → ConstitutionalDocument-Dhw6t4Ni.js} +37 -30
- package/dist/{ContactDetails-BRnbG7BX.js → ContactDetails-CbxMguHb.js} +8 -8
- package/dist/{ContextGuidance-CZGa7C-r.js → ContextGuidance-vOFdWDn9.js} +3 -3
- package/dist/{ContractViewer-Byp71k2e.js → ContractViewer-DcQHIGMU.js} +2 -2
- package/dist/{CountryField-DShqP-Yi.js → CountryField-C7bj3yyn.js} +6 -6
- package/dist/{CreateIndividualComponent-BZ6dd8Bd.js → CreateIndividualComponent-D686ciaV.js} +7 -7
- package/dist/{CreateTransferInstrumentComponent-1pjVr_3y.js → CreateTransferInstrumentComponent-C7B7UCpu.js} +5 -5
- package/dist/{Currency-CEtDxV-F.js → Currency-hS0YWWxq.js} +7 -11
- package/dist/{CustomerSupport-gmN79qSl.js → CustomerSupport-8s-w8iKy.js} +11 -11
- package/dist/{DebugModal-C3horl0P.js → DebugModal-BwrOlWvA.js} +9 -9
- package/dist/{DecisionMakerDetailsPage-CN1t2Ok6.js → DecisionMakerDetailsPage-BKYVxewR.js} +14 -10
- package/dist/{DecisionMakers-83kflZpA.js → DecisionMakers-Om-7b55R.js} +36 -26
- package/dist/{Dropzone-DYIUInYF.js → Dropzone-Dayv7PAA.js} +4 -4
- package/dist/{EmbeddedStatus-BID4yaOx.js → EmbeddedStatus-uhtoE0i5.js} +3 -3
- package/dist/{EndStateLayout-Cqmi0QYW.js → EndStateLayout-Bircmn4k.js} +2 -2
- package/dist/{EntityAssociation-jMAjopdW.js → EntityAssociation-CpwvMeU9.js} +35 -23
- package/dist/{EntityGuidanceStatus-ek-5IvZb.js → EntityGuidanceStatus-BGP7anTO.js} +3 -3
- package/dist/{ErrorPanel-ByEaxCQu.js → ErrorPanel-CTnweIrR.js} +3 -3
- package/dist/{Field-Cp_UOAnA.js → Field-B5icSx65.js} +2 -2
- package/dist/{FormNavigation-CttAyMuX.js → FormNavigation-CwNfQJDE.js} +3 -3
- package/dist/{FormWrapper-C8UDjnjQ.js → FormWrapper-B1OeeS_n.js} +9 -9
- package/dist/{Header-CIxJSQWR.js → Header-Dsxscc11.js} +2 -2
- package/dist/{Image-T-D-HDf5.js → Image-DSSLH2Gg.js} +2 -2
- package/dist/{Individual.rules-DEhHxeiv.js → Individual.rules-SVdbtMZX.js} +29 -14
- package/dist/{IndividualDropin-Dz2ooI0s.js → IndividualDropin-Cc4CEZFn.js} +71 -63
- package/dist/{InputDate-z9OpUslu.js → InputDate-BbhqEb0A.js} +2 -2
- package/dist/{InputText-CBhD5jca.js → InputText-DsyMVWuS.js} +2 -2
- package/dist/{Introduction-Bm3kybSH.js → Introduction-0o7soNWJ.js} +4 -4
- package/dist/{JpAddress-owiNWOqn.js → JpAddress-DR9efscK.js} +18 -13
- package/dist/{LandingLayout-BuBU3Pyb.js → LandingLayout-BmfO073v.js} +2 -2
- package/dist/{fieldConfig-CMdKt41r.js → LegalCompanyNameField-DUA1xhu7.js} +71 -67
- package/dist/{LegalRepresentativeDetailsPage-vS7jAxuO.js → LegalRepresentativeDetailsPage-Dd7C7gUQ.js} +5 -5
- package/dist/{Link-CIBefZJS.js → Link-5z1nhcfe.js} +2 -2
- package/dist/{ListItem-CnzgA-sH.js → ListItem-BFs1CkoM.js} +3 -3
- package/dist/{LoaderWrapper-CwhIpGKR.js → LoaderWrapper-D7zyni9T.js} +1 -1
- package/dist/ManageIndividualComponent-DwWloLdY.js +46 -0
- package/dist/{ManageTermsOfServiceComponent-BdiC5Nbd.js → ManageTermsOfServiceComponent-DyyWEEWM.js} +5 -5
- package/dist/{ManageTransferInstrumentComponent-CObC5Uof.js → ManageTransferInstrumentComponent-DT93KOu6.js} +15 -14
- package/dist/{MaskedInput-BfI4FGAA.js → MaskedInput-Ble-w1-c.js} +5 -5
- package/dist/{MaybeModal-DHcu32Dh.js → MaybeModal-D7DmwNpk.js} +3 -3
- package/dist/{Modal-BKWXTEoU.js → Modal-VzVyfuvm.js} +2 -2
- package/dist/{Name-BCar2_dk.js → Name-D_X4kyiG.js} +5 -5
- package/dist/{OnboardingDropinComponent-DstStqYS.js → OnboardingDropinComponent-DYT6l2t6.js} +850 -520
- package/dist/{PayoutDetailsDropin-DSdlqAe2.js → PayoutDetailsDropin-De5xS7km.js} +130 -77
- package/dist/{RadioGroup-COsozc9g.js → RadioGroup-CpnraQPG.js} +2 -2
- package/dist/{RadioGroupCard-xqC3IACY.js → RadioGroupCard-BDvxdl0T.js} +2 -2
- package/dist/{Review-CZwc-DMp.js → Review-BrP7xRy2.js} +7 -7
- package/dist/RootBusinessDetailsPage-C4io3SHK.js +50 -0
- package/dist/{RootBusinessLinesPage-BRgtyHFs.js → RootBusinessLinesPage-CknZuu0f.js} +27 -24
- package/dist/{RootIndividualDetailsPage-C3wTzTp1.js → RootIndividualDetailsPage-D2InAZ2K.js} +7 -6
- package/dist/{Select-DeTBytOH.js → Select-B3w5VkGQ.js} +4 -4
- package/dist/{SignPCIComponent-CCGyrXvI.js → SignPCIComponent-B8U7Hilk.js} +14 -14
- package/dist/{SingpassSelection-BumqRwXI.js → SingpassSelection-BdRZAxtT.js} +6 -6
- package/dist/SoleProprietorshipPage-C64fSOwN.js +50 -0
- package/dist/{SourceOfFundsPage-DkjYls-E.js → SourceOfFundsPage-C855dB1F.js} +33 -32
- package/dist/{StepProgressIndicator-D8PfKJKf.js → StepProgressIndicator-B06vG0EZ.js} +2 -2
- package/dist/{StoreProvider-CsZ-qrGt.js → StoreProvider-C-jMv9L5.js} +157 -132
- package/dist/{StructuredList-9dnJRdx_.js → StructuredList-BNLhk_zV.js} +1 -1
- package/dist/{Summary-DPm9r7Az.js → Summary-HNxR09dk.js} +19 -8
- package/dist/{TaskVerificationStatus-DrOQToMh.js → TaskVerificationStatus-BvU5X9F0.js} +2 -2
- package/dist/{TaxInformationField-NI7Hbgov.js → TaxInformationField-ghLphbCF.js} +438 -81
- package/dist/{TaxReportingDropin-BBUAxx92.js → TaxReportingDropin-8PKUrVeE.js} +18 -18
- package/dist/{TextArea-CCjCNpAP.js → TextArea-XzZ59IRn.js} +2 -2
- package/dist/{TileGroup-BhKhvfLz.js → TileGroup-BsvBLQp4.js} +3 -3
- package/dist/{TrustDetailsPage-yOmFcEyO.js → TrustDetailsPage-BZamlxY7.js} +44 -38
- package/dist/TrustMemberCompanyPage-DHdEuAQJ.js +68 -0
- package/dist/{TrustMemberIndividualPage-B8tb56n2.js → TrustMemberIndividualPage-BLjorgiQ.js} +11 -8
- package/dist/{TrustMemberRoleAndTypePage-WHu1tc4O.js → TrustMemberRoleAndTypePage-O-JmFZ6x.js} +43 -38
- package/dist/{TrustMembersOverview-BWbGUK3k.js → TrustMembersOverview-CJEjx7vn.js} +13 -13
- package/dist/{UnincorporatedPartnershipIndividualPage-DD2dn41k.js → UnincorporatedPartnershipIndividualPage-CLm7rltZ.js} +10 -7
- package/dist/{UnincorporatedPartnershipMemberCompanyPage-DsUSSYnI.js → UnincorporatedPartnershipMemberCompanyPage-DstG5mil.js} +10 -7
- package/dist/{UnincorporatedPartnershipMemberRoleAndTypePage-Ctb0Lz_0.js → UnincorporatedPartnershipMemberRoleAndTypePage-CcboW2-W.js} +15 -12
- package/dist/{UnincorporatedPartnershipMembersOverview-B_GJIeZC.js → UnincorporatedPartnershipMembersOverview-C8d8pfxJ.js} +9 -9
- package/dist/{VerificationErrorAlert-CCiMqGl8.js → VerificationErrorAlert-CAncqFAs.js} +4 -24
- package/dist/{ViewVerificationStatusComponent-CICJ6cy4.js → ViewVerificationStatusComponent-BwndGcdj.js} +4 -4
- package/dist/accountHolderUtils-B437qMYm.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-DFWYU0eC.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-DnSqf1bK.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-CVk-9IZr.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-KRYFb23Q.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-c86ZSHdY.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-COB6S0Zd.js} +4 -4
- package/dist/{isEmpty-BNacTlfR.js → isEmpty-DG6Y1P62.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-Dl5g_UWE.js} +2 -2
- package/dist/{jpAddressSchema-De6ix57p.js → jpAddressSchema-DEOyz9Yo.js} +2 -4
- package/dist/{localizeDateString-DuTq6aHe.js → localizeDateString-CW0xkVFv.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-BRTT2WyL.js} +5 -6
- package/dist/{mapJpAddressSchemaToAddressLocalizations-BwHU4ZwL.js → mapJpAddressSchemaToAddressLocalizations-CwG96wSK.js} +5 -5
- package/dist/{mapLegalEntityToIndividualSchema-DzCEngXr.js → mapLegalEntityToIndividualSchema-Cu08lm2S.js} +4 -4
- package/dist/{mapTransferInstrumentToPayoutAccount-DLHvwig1.js → mapTransferInstrumentToPayoutAccount-BVOwByXx.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-DAtPy1-5.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-2ry-JbdI.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-CWyr9MeQ.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-D9T__4VE.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 +145 -153
- package/dist/styles-CLV89_hH.js +145 -153
- 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-BY62XJTq.js → types-BstoJPXR.js} +2 -2
- package/dist/{types-B7eWQV7z.js → types-C8yt1YG2.js} +19 -2
- package/dist/{types-pKG9olDB.js → types-DHdmZe3R.js} +2 -2
- package/dist/{types-BuMuCpsa.js → types-FtiqI-S9.js} +2 -2
- package/dist/{useAssociatedLegalEntity-V0OP9ejx.js → useAssociatedLegalEntity-BVu7zj1c.js} +2 -2
- package/dist/{useBusinessDetailsData-BsXXL7fg.js → useBusinessDetailsData-B9I865mu.js} +713 -718
- package/dist/useBusinessLines-Coc7iGhS.js +29 -0
- package/dist/useCanSeeIntroduction-DG9Yn42f.js +48 -0
- package/dist/{useCreateLegalEntity-otpCRCfZ.js → useCreateLegalEntity-D1LQY6P5.js} +2 -2
- package/dist/useDataMissingRemediations-CDMb2Iu7.js +41 -0
- package/dist/{useDataset-CvATx7EN.js → useDataset-BiERW7fi.js} +5 -3
- package/dist/useDeleteTransferInstrument-YSr-Fo6s.js +32 -0
- package/dist/{useForm-9nSw9LZY.js → useForm-ZeyqDFOi.js} +27 -27
- package/dist/{useFormContext-BnlNKQZ7.js → useFormContext-CcAa10tn.js} +7 -7
- package/dist/{useGlobalData-Dy2O7YGk.js → useGlobalData-MctSxOcn.js} +2 -2
- package/dist/{useMultiForm-CBefohos.js → useMultiForm-BhV8RCm4.js} +45 -36
- package/dist/useNavigate-CyixZ7Bd.js +265 -0
- package/dist/{useOnboardingStatus-CJrlnkvv.js → useOnboardingStatus-YzbGKkC5.js} +1 -1
- package/dist/usePciQuestionnaireList-CLwiJDxW.js +29 -0
- package/dist/useSalesChannels-C3oiiB07.js +65 -0
- package/dist/{useScenarios-CkgrmOF-.js → useScenarios-CGNlbMLu.js} +2 -2
- package/dist/useSetting-BF2CM06n.js +19 -0
- package/dist/useTaskStatus-DgRzelGp.js +51 -0
- package/dist/{useTermsOfServiceStatus-DFLF3xas.js → useTermsOfServiceStatus-IjRaxZu3.js} +1 -1
- package/dist/{useToastContext-uSKjdph9.js → useToastContext-C0ytklOM.js} +2 -2
- package/dist/useTrustMembers-MZLGyg68.js +163 -0
- package/dist/{useUnincorporatedPartnershipMembers-BmLKVfkf.js → useUnincorporatedPartnershipMembers-CtzCBX3o.js} +4 -4
- package/dist/{useUpdateBusinessLines-BBNXF45E.js → useUpdateBusinessLines-Do9Ap-zs.js} +4 -4
- package/dist/{useUpdateLegalEntity-DHxCVgNk.js → useUpdateLegalEntity-CrL2KyrF.js} +3 -3
- package/dist/{utils-5yZQq_bx.js → utils-Bbxtjil1.js} +6 -6
- package/dist/{utils-CIHH_aYF.js → utils-BtRcjM8l.js} +2 -2
- package/dist/{utils-ClKogQZa.js → utils-C8SToqFp.js} +3 -3
- package/dist/{utils-CLLUBF1a.js → utils-D6lKjllx.js} +2 -2
- package/dist/{utils-CIIs2bXi.js → utils-DDh9Wc69.js} +3 -2
- package/dist/{validate-CLYo0JdH.js → validate-B7VfZzB0.js} +3 -3
- package/dist/{validate-BntX2W3B.js → validate-CXFzJNVc.js} +10 -2
- package/dist/{validationError-DJ6zTIzv.js → validationError-Bhb_p0Dm.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,416 +2,74 @@
|
|
|
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] = "f581f157-37d8-4cd7-a220-618bd3cb8ce9", e._sentryDebugIdIdentifier = "sentry-dbid-f581f157-37d8-4cd7-a220-618bd3cb8ce9");
|
|
6
6
|
} catch (e) {
|
|
7
7
|
}
|
|
8
8
|
}
|
|
9
9
|
;
|
|
10
10
|
import { jsx, jsxs, Fragment } from "preact/jsx-runtime";
|
|
11
11
|
import { useMutation, useQuery, skipToken, useQueryClient } from "@tanstack/preact-query";
|
|
12
|
-
import {
|
|
13
|
-
import { D as Divider, I as INDUSTRY_CODE_FIELD, i as industryCodeFieldMetadata, u as useIndustryCodes, a as IndustryCodeField, b as useCreateBusinessLine, c as useUpdateBusinessLine } from "./useUpdateBusinessLines-
|
|
14
|
-
import { u as useTranslation,
|
|
15
|
-
import { u as useCreateLegalEntity } from "./useCreateLegalEntity-
|
|
16
|
-
import { u as useUpdateLegalEntity } from "./useUpdateLegalEntity-
|
|
17
|
-
import { u as useFormContext, F as FormContextProvider, a as FormFlow } from "./useFormContext-
|
|
18
|
-
import { u as useToastContext } from "./useToastContext-
|
|
19
|
-
import { C as CompanyTypesValues } from "./
|
|
20
|
-
import { c as composePerScenarioFormConfigurations, g as getPropsFromConfigurations } from "./process-field-configurations-
|
|
21
|
-
import { a as addValidityToForms, u as useFormComposer } from "./dropinUtils-
|
|
22
|
-
import { u as useMultiForm } from "./useMultiForm-
|
|
23
|
-
import { u as uppercase, m as mapExistingFile, g as getPageName, b as useScenarioConfiguration } from "./mapExistingFile-
|
|
24
|
-
import { C as Confirm } from "./Confirm-
|
|
25
|
-
import { a as getDocument, j as getDocuments, c as createDocumentRequest, k as mergeProofOfOwnershipAttachments, b as getFileExtention, d as documentApiUtils } from "./validate-
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
39
|
-
import {
|
|
40
|
-
import {
|
|
41
|
-
import {
|
|
42
|
-
import {
|
|
43
|
-
import { b as
|
|
44
|
-
import { L as LEGAL_COMPANY_NAME_FIELD, d as defaultFieldMetadataV4, a as defaultFieldMetadata$2, b as defaultFieldConfigV4, c as defaultFieldConfig$2 } from "./
|
|
45
|
-
import {
|
|
46
|
-
import {
|
|
47
|
-
import {
|
|
48
|
-
import {
|
|
49
|
-
import {
|
|
50
|
-
import {
|
|
51
|
-
import {
|
|
52
|
-
import { c as
|
|
53
|
-
import {
|
|
54
|
-
import {
|
|
55
|
-
import {
|
|
56
|
-
import {
|
|
57
|
-
import {
|
|
58
|
-
import
|
|
59
|
-
import {
|
|
60
|
-
import {
|
|
61
|
-
import {
|
|
62
|
-
import
|
|
63
|
-
import { L as
|
|
64
|
-
import { S as
|
|
65
|
-
import {
|
|
66
|
-
import {
|
|
67
|
-
import {
|
|
68
|
-
import {
|
|
69
|
-
import {
|
|
70
|
-
import {
|
|
71
|
-
import {
|
|
72
|
-
import {
|
|
73
|
-
const FINANCIAL_REPORTING_DATE_FIELD = [
|
|
74
|
-
"financialReportingDate"
|
|
75
|
-
];
|
|
76
|
-
function FinancialReportingDate({
|
|
77
|
-
data,
|
|
78
|
-
valid,
|
|
79
|
-
errors,
|
|
80
|
-
labels,
|
|
81
|
-
readonly,
|
|
82
|
-
handleChangeFor
|
|
83
|
-
}) {
|
|
84
|
-
const { t } = useTranslation("common");
|
|
85
|
-
return /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
|
|
86
|
-
Field,
|
|
87
|
-
{
|
|
88
|
-
name: "financialReportingDate",
|
|
89
|
-
label: labels.financialReportingDate,
|
|
90
|
-
helper: t(($) => $["dateOfTotalAssetsCalculation"]),
|
|
91
|
-
helperPosition: "below",
|
|
92
|
-
errorMessage: errors.financialReportingDate,
|
|
93
|
-
isValid: valid.financialReportingDate,
|
|
94
|
-
children: (childProps) => /* @__PURE__ */ jsx(
|
|
95
|
-
InputDate,
|
|
96
|
-
{
|
|
97
|
-
...childProps,
|
|
98
|
-
name: "financialReportingDate",
|
|
99
|
-
value: data.financialReportingDate,
|
|
100
|
-
onInput: handleChangeFor("financialReportingDate", "input"),
|
|
101
|
-
onBlur: handleChangeFor("financialReportingDate", "blur"),
|
|
102
|
-
"aria-required": true,
|
|
103
|
-
"aria-invalid": !valid.financialReportingDate,
|
|
104
|
-
readonly,
|
|
105
|
-
max: formatDateObj(/* @__PURE__ */ new Date())
|
|
106
|
-
}
|
|
107
|
-
)
|
|
108
|
-
}
|
|
109
|
-
) });
|
|
110
|
-
}
|
|
111
|
-
const NUMBER_OF_EMPLOYEES_FIELD = [
|
|
112
|
-
"numberOfEmployees"
|
|
113
|
-
];
|
|
114
|
-
function NumberOfEmployees({
|
|
115
|
-
data,
|
|
116
|
-
valid,
|
|
117
|
-
errors,
|
|
118
|
-
labels,
|
|
119
|
-
readonly,
|
|
120
|
-
handleChangeFor,
|
|
121
|
-
helperText
|
|
122
|
-
}) {
|
|
123
|
-
return /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
|
|
124
|
-
Field,
|
|
125
|
-
{
|
|
126
|
-
name: "numberOfEmployees",
|
|
127
|
-
label: labels.numberOfEmployees,
|
|
128
|
-
helper: helperText?.numberOfEmployees,
|
|
129
|
-
errorMessage: errors.numberOfEmployees,
|
|
130
|
-
isValid: valid.numberOfEmployees,
|
|
131
|
-
children: (childProps) => /* @__PURE__ */ jsx(
|
|
132
|
-
InputNumber,
|
|
133
|
-
{
|
|
134
|
-
...childProps,
|
|
135
|
-
"aria-required": true,
|
|
136
|
-
"aria-invalid": !valid.numberOfEmployees,
|
|
137
|
-
name: "numberOfEmployees",
|
|
138
|
-
min: "1",
|
|
139
|
-
step: "1",
|
|
140
|
-
value: data.numberOfEmployees,
|
|
141
|
-
readonly,
|
|
142
|
-
onInput: handleChangeFor("numberOfEmployees", "input"),
|
|
143
|
-
onBlur: handleChangeFor("numberOfEmployees", "blur")
|
|
144
|
-
}
|
|
145
|
-
)
|
|
146
|
-
}
|
|
147
|
-
) });
|
|
148
|
-
}
|
|
149
|
-
const financialInformationReportedValueOptions = "adyen-kyc-financial-information-reported-value-options";
|
|
150
|
-
const styles$5 = {
|
|
151
|
-
financialInformationReportedValueOptions
|
|
152
|
-
};
|
|
153
|
-
const reportedValue = "adyen-kyc-reported-value";
|
|
154
|
-
const reportedValueInput = "adyen-kyc-reported-value-input";
|
|
155
|
-
const styles$4 = {
|
|
156
|
-
reportedValue,
|
|
157
|
-
reportedValueInput
|
|
158
|
-
};
|
|
159
|
-
const ReportedValue = ({
|
|
160
|
-
currency,
|
|
161
|
-
amount,
|
|
162
|
-
onAmountChanged,
|
|
163
|
-
label,
|
|
164
|
-
helper,
|
|
165
|
-
fieldName,
|
|
166
|
-
errorMessage,
|
|
167
|
-
isValid
|
|
168
|
-
}) => {
|
|
169
|
-
const { i18n } = useI18nContext();
|
|
170
|
-
return /* @__PURE__ */ jsx("div", { className: styles$4.reportedValue, children: /* @__PURE__ */ jsx(Field, { name: fieldName, errorMessage, isValid, helper, children: (childProps) => /* @__PURE__ */ jsx(
|
|
171
|
-
InputCurrency,
|
|
172
|
-
{
|
|
173
|
-
...childProps,
|
|
174
|
-
locale: i18n.locale,
|
|
175
|
-
currency,
|
|
176
|
-
amount,
|
|
177
|
-
onAmountChanged,
|
|
178
|
-
className: styles$4.reportedValueInput,
|
|
179
|
-
"aria-label": label
|
|
180
|
-
}
|
|
181
|
-
) }) });
|
|
182
|
-
};
|
|
183
|
-
const financialInfoValidationRules = {
|
|
184
|
-
financialReportingDate: [
|
|
185
|
-
{
|
|
186
|
-
modes: ["blur"],
|
|
187
|
-
validate: (date) => !isEmpty(date),
|
|
188
|
-
errorMessage: "fieldIsRequired"
|
|
189
|
-
},
|
|
190
|
-
{
|
|
191
|
-
modes: ["blur"],
|
|
192
|
-
validate: (date) => date ? new Date(date) < /* @__PURE__ */ new Date() : false,
|
|
193
|
-
errorMessage: "invalidFinancialReportingDate"
|
|
194
|
-
}
|
|
195
|
-
],
|
|
196
|
-
currency: [
|
|
197
|
-
{
|
|
198
|
-
modes: ["blur"],
|
|
199
|
-
validate: (currency) => !isEmpty(currency),
|
|
200
|
-
errorMessage: "fieldIsRequired"
|
|
201
|
-
}
|
|
202
|
-
],
|
|
203
|
-
reportedValueOption: {
|
|
204
|
-
modes: ["blur"],
|
|
205
|
-
validate: (option) => !isEmpty(option),
|
|
206
|
-
errorMessage: "fieldIsRequired"
|
|
207
|
-
},
|
|
208
|
-
balanceSheetTotal: {
|
|
209
|
-
modes: ["blur"],
|
|
210
|
-
validate: (amount) => !isUndefinedOrNull(amount),
|
|
211
|
-
errorMessage: "fieldIsRequired"
|
|
212
|
-
},
|
|
213
|
-
annualTurnover: {
|
|
214
|
-
modes: ["blur"],
|
|
215
|
-
validate: (amount) => !isUndefinedOrNull(amount),
|
|
216
|
-
errorMessage: "fieldIsRequired"
|
|
217
|
-
}
|
|
218
|
-
};
|
|
219
|
-
const financialInfoValidationEmployeesOnlyRules = {
|
|
220
|
-
numberOfEmployees: [
|
|
221
|
-
{
|
|
222
|
-
modes: ["blur"],
|
|
223
|
-
validate: (numberOfEmployees) => !isEmpty(numberOfEmployees),
|
|
224
|
-
errorMessage: "fieldIsRequired"
|
|
225
|
-
},
|
|
226
|
-
{
|
|
227
|
-
modes: ["blur"],
|
|
228
|
-
validate: (numberOfEmployees) => Number.isInteger(Number(numberOfEmployees)) && Number(numberOfEmployees) > 0,
|
|
229
|
-
errorMessage: "pleaseEnterAValidWholeNumber"
|
|
230
|
-
}
|
|
231
|
-
]
|
|
232
|
-
};
|
|
233
|
-
const financialInfoValidationWithEmployeesRules = {
|
|
234
|
-
...financialInfoValidationRules,
|
|
235
|
-
...financialInfoValidationEmployeesOnlyRules
|
|
236
|
-
};
|
|
237
|
-
const financialInformationFieldsForEu = [
|
|
238
|
-
...FINANCIAL_REPORTING_DATE_FIELD,
|
|
239
|
-
...CURRENCY_FIELD,
|
|
240
|
-
"reportedValueOption"
|
|
241
|
-
];
|
|
242
|
-
const financialInformationFields = [
|
|
243
|
-
...NUMBER_OF_EMPLOYEES_FIELD,
|
|
244
|
-
...FINANCIAL_REPORTING_DATE_FIELD,
|
|
245
|
-
...CURRENCY_FIELD,
|
|
246
|
-
"reportedValueOption"
|
|
247
|
-
];
|
|
248
|
-
function FinancialInformation(props) {
|
|
249
|
-
const { t } = useTranslation("common");
|
|
250
|
-
const { id, country, data: financialInformationData, multiForm, fieldValidationErrors } = props;
|
|
251
|
-
const defaultCurrency = currencyByCountry[country]?.[0] ?? "EUR";
|
|
252
|
-
const formUtils = createFormUtils(props, t);
|
|
253
|
-
const showReportingFields = formUtils.isRequiredField("financialReportingDate");
|
|
254
|
-
const getSchema = (data2) => [
|
|
255
|
-
...financialInformationFields,
|
|
256
|
-
...data2.reportedValueOption ? [data2.reportedValueOption] : []
|
|
257
|
-
];
|
|
258
|
-
const getValidator = () => {
|
|
259
|
-
if (!showReportingFields) {
|
|
260
|
-
return financialInfoValidationEmployeesOnlyRules;
|
|
261
|
-
}
|
|
262
|
-
if (country === CountryCodes.UnitedKingdom) {
|
|
263
|
-
return financialInfoValidationWithEmployeesRules;
|
|
264
|
-
}
|
|
265
|
-
return financialInfoValidationRules;
|
|
266
|
-
};
|
|
267
|
-
const { handleChangeFor, data, valid, errors, fieldProblems, schema } = useForm({
|
|
268
|
-
...props,
|
|
269
|
-
schema: getSchema,
|
|
270
|
-
defaultData: financialInformationData,
|
|
271
|
-
rules: getValidator(),
|
|
272
|
-
fieldProblems: fieldValidationErrors
|
|
273
|
-
});
|
|
274
|
-
const { updateStateSlice } = useGlobalDataSlice(id);
|
|
275
|
-
useEffect(() => {
|
|
276
|
-
updateStateSlice({
|
|
277
|
-
data,
|
|
278
|
-
valid,
|
|
279
|
-
errors,
|
|
280
|
-
fieldProblems,
|
|
281
|
-
schema
|
|
282
|
-
});
|
|
283
|
-
}, [data, valid, errors, fieldProblems, schema, updateStateSlice]);
|
|
284
|
-
const handleChange = useCallback(
|
|
285
|
-
(fieldName, mode) => multiForm ? multiForm.handleChangeFor(fieldName, "companyFinancialInformation", mode) : handleChangeFor(fieldName, mode),
|
|
286
|
-
[handleChangeFor, multiForm]
|
|
287
|
-
);
|
|
288
|
-
const formData = multiForm ? multiForm.data?.companyFinancialInformation ?? {} : data;
|
|
289
|
-
const formErrors = multiForm ? multiForm.errors?.companyFinancialInformation ?? {} : errors;
|
|
290
|
-
const formValid = multiForm ? multiForm.valid?.companyFinancialInformation ?? {} : valid;
|
|
291
|
-
const formFieldProblems = multiForm ? multiForm.fieldProblems.companyFinancialInformation ?? {} : fieldProblems;
|
|
292
|
-
const updateReportedValueOption = (option) => {
|
|
293
|
-
if (formData.reportedValueOption) {
|
|
294
|
-
handleChange(formData.reportedValueOption)(null);
|
|
295
|
-
}
|
|
296
|
-
const newReportedValue = option;
|
|
297
|
-
handleChange("reportedValueOption")(newReportedValue);
|
|
298
|
-
};
|
|
299
|
-
return /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-company-financial-information", children: [
|
|
300
|
-
/* @__PURE__ */ jsx(Header, { title: t(($) => $["companyFinancialInformationFormHeading"], { ns: "business" }) }),
|
|
301
|
-
country === CountryCodes.UnitedKingdom && /* @__PURE__ */ jsx(
|
|
302
|
-
NumberOfEmployees,
|
|
303
|
-
{
|
|
304
|
-
data: formUtils.getFieldData(formData, NUMBER_OF_EMPLOYEES_FIELD),
|
|
305
|
-
errors: formUtils.getFieldErrors(
|
|
306
|
-
formErrors,
|
|
307
|
-
formFieldProblems,
|
|
308
|
-
NUMBER_OF_EMPLOYEES_FIELD
|
|
309
|
-
),
|
|
310
|
-
handleChangeFor: handleChange,
|
|
311
|
-
labels: formUtils.getFieldLabels(NUMBER_OF_EMPLOYEES_FIELD),
|
|
312
|
-
readonly: formUtils.isReadOnly("numberOfEmployees"),
|
|
313
|
-
valid: formUtils.getFieldValid(formValid, NUMBER_OF_EMPLOYEES_FIELD)
|
|
314
|
-
}
|
|
315
|
-
),
|
|
316
|
-
showReportingFields && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
317
|
-
/* @__PURE__ */ jsx(
|
|
318
|
-
FinancialReportingDate,
|
|
319
|
-
{
|
|
320
|
-
data: formUtils.getFieldData(formData, FINANCIAL_REPORTING_DATE_FIELD),
|
|
321
|
-
errors: formUtils.getFieldErrors(
|
|
322
|
-
formErrors,
|
|
323
|
-
formFieldProblems,
|
|
324
|
-
FINANCIAL_REPORTING_DATE_FIELD
|
|
325
|
-
),
|
|
326
|
-
handleChangeFor: handleChange,
|
|
327
|
-
labels: formUtils.getFieldLabels(FINANCIAL_REPORTING_DATE_FIELD),
|
|
328
|
-
readonly: formUtils.isReadOnly("financialReportingDate"),
|
|
329
|
-
valid: formUtils.getFieldValid(formValid, FINANCIAL_REPORTING_DATE_FIELD)
|
|
330
|
-
}
|
|
331
|
-
),
|
|
332
|
-
/* @__PURE__ */ jsx(
|
|
333
|
-
Currency,
|
|
334
|
-
{
|
|
335
|
-
country,
|
|
336
|
-
labels: { currency: t(($) => $["reportingCurrency"]) },
|
|
337
|
-
data: formUtils.getFieldData(formData, CURRENCY_FIELD),
|
|
338
|
-
errors: formUtils.getFieldErrors(formErrors, formFieldProblems, CURRENCY_FIELD),
|
|
339
|
-
handleChangeFor: handleChange,
|
|
340
|
-
readonly: formUtils.isReadOnly("currency"),
|
|
341
|
-
valid: formUtils.getFieldValid(formValid, CURRENCY_FIELD)
|
|
342
|
-
}
|
|
343
|
-
),
|
|
344
|
-
/* @__PURE__ */ jsx(
|
|
345
|
-
Field,
|
|
346
|
-
{
|
|
347
|
-
el: "fieldset",
|
|
348
|
-
name: "reportedValueOption",
|
|
349
|
-
label: t(($) => $["reportedValue"]),
|
|
350
|
-
errorMessage: formUtils.getErrorMessage(
|
|
351
|
-
"reportedValueOption",
|
|
352
|
-
formErrors,
|
|
353
|
-
formFieldProblems
|
|
354
|
-
),
|
|
355
|
-
helper: t(($) => $["useFiguresFromTheMostRecentYearAvailable"]),
|
|
356
|
-
isValid: formValid.reportedValueOption,
|
|
357
|
-
children: (childProps) => /* @__PURE__ */ jsx(
|
|
358
|
-
RadioGroup,
|
|
359
|
-
{
|
|
360
|
-
name: "reportedValueOption",
|
|
361
|
-
...childProps,
|
|
362
|
-
value: formData.reportedValueOption,
|
|
363
|
-
items: [
|
|
364
|
-
{
|
|
365
|
-
id: "balanceSheetTotal",
|
|
366
|
-
name: "balanceSheetTotal",
|
|
367
|
-
content: /* @__PURE__ */ jsx(
|
|
368
|
-
ReportedValue,
|
|
369
|
-
{
|
|
370
|
-
label: t(($) => $["balanceSheetTotal"]),
|
|
371
|
-
currency: formData.currency ?? defaultCurrency,
|
|
372
|
-
amount: formData.balanceSheetTotal,
|
|
373
|
-
onAmountChanged: handleChange("balanceSheetTotal"),
|
|
374
|
-
fieldName: "balanceSheetTotal",
|
|
375
|
-
isValid: formValid.balanceSheetTotal,
|
|
376
|
-
errorMessage: formUtils.getErrorMessage(
|
|
377
|
-
"balanceSheetTotal",
|
|
378
|
-
formErrors,
|
|
379
|
-
formFieldProblems
|
|
380
|
-
)
|
|
381
|
-
}
|
|
382
|
-
)
|
|
383
|
-
},
|
|
384
|
-
{
|
|
385
|
-
id: "annualTurnover",
|
|
386
|
-
name: "annualTurnover",
|
|
387
|
-
content: /* @__PURE__ */ jsx(
|
|
388
|
-
ReportedValue,
|
|
389
|
-
{
|
|
390
|
-
label: t(($) => $["annualTurnover"]),
|
|
391
|
-
currency: formData.currency ?? defaultCurrency,
|
|
392
|
-
amount: formData.annualTurnover,
|
|
393
|
-
onAmountChanged: handleChange("annualTurnover"),
|
|
394
|
-
fieldName: "annualTurnover",
|
|
395
|
-
isValid: formValid.annualTurnover,
|
|
396
|
-
errorMessage: formUtils.getErrorMessage(
|
|
397
|
-
"annualTurnover",
|
|
398
|
-
formErrors,
|
|
399
|
-
formFieldProblems
|
|
400
|
-
)
|
|
401
|
-
}
|
|
402
|
-
)
|
|
403
|
-
}
|
|
404
|
-
],
|
|
405
|
-
onChange: updateReportedValueOption,
|
|
406
|
-
showContentOnlyOnSelected: true,
|
|
407
|
-
className: styles$5.financialInformationReportedValueOptions
|
|
408
|
-
}
|
|
409
|
-
)
|
|
410
|
-
}
|
|
411
|
-
)
|
|
412
|
-
] })
|
|
413
|
-
] });
|
|
414
|
-
}
|
|
12
|
+
import { useState, useMemo, useEffect, useCallback } from "preact/hooks";
|
|
13
|
+
import { D as Divider, I as INDUSTRY_CODE_FIELD, i as industryCodeFieldMetadata, u as useIndustryCodes, a as IndustryCodeField, b as useCreateBusinessLine, c as useUpdateBusinessLine } from "./useUpdateBusinessLines-Do9Ap-zs.js";
|
|
14
|
+
import { u as useTranslation, bu as isISIN, V as Button, v as useExperimentsContext, c as useLegalEntity, R as ROOT_LE, az as useVersionConfiguration, z as Typography, L as Loader, a0 as CountryCodes, B as useSettingsContext, b as useApiContext, $ as httpPost, ad as entriesOf, p as useAnalyticsContext, a3 as createLogger, m as useAccountHolder, ab as useI18nContext, ai as isEmpty, i as isUndefinedOrNull, j as TaskTypes, o as LegalEntityTypes, bv as businessDetailsComponentsKeyMapping, bw as solePropBusinessDetailsKeyMapping, a6 as objectsDeepEqual, aD as keysOf, bx as solePropBusinessDetailsApiKeyMapping, b4 as businessDetailsApiKeyMapping, aJ as filterOutUnwantedAssociationsIfRootLE, aH as drop, aa as getOwnEntityAssociations, aO as doArraysMatch, by as solePropBusinessDetailsDocumentMapping, bz as businessDetailsDocumentMapping } from "./StoreProvider-C-jMv9L5.js";
|
|
15
|
+
import { u as useCreateLegalEntity } from "./useCreateLegalEntity-D1LQY6P5.js";
|
|
16
|
+
import { u as useUpdateLegalEntity } from "./useUpdateLegalEntity-CrL2KyrF.js";
|
|
17
|
+
import { u as useFormContext, F as FormContextProvider, a as FormFlow } from "./useFormContext-CcAa10tn.js";
|
|
18
|
+
import { u as useToastContext } from "./useToastContext-C0ytklOM.js";
|
|
19
|
+
import { C as CompanyTypesValues } from "./company-types-value-D_mKv5PT.js";
|
|
20
|
+
import { c as composePerScenarioFormConfigurations, g as getPropsFromConfigurations } from "./process-field-configurations-2ry-JbdI.js";
|
|
21
|
+
import { a as addValidityToForms, u as useFormComposer } from "./dropinUtils-CVk-9IZr.js";
|
|
22
|
+
import { u as useMultiForm } from "./useMultiForm-BhV8RCm4.js";
|
|
23
|
+
import { u as uppercase, m as mapExistingFile, g as getPageName, b as useScenarioConfiguration } from "./mapExistingFile-BRTT2WyL.js";
|
|
24
|
+
import { C as Confirm } from "./Confirm-BtVNOsTV.js";
|
|
25
|
+
import { a as getDocument, j as getDocuments, c as createDocumentRequest, k as mergeProofOfOwnershipAttachments, b as getFileExtention, d as documentApiUtils } from "./validate-B7VfZzB0.js";
|
|
26
|
+
import { d as TAX_INFORMATION_FIELD, r as requestingBanking, e as requestingIssuing, t as taxInformationDefaultFieldMetadata, a as taxInformationDefaultFieldConfig, T as TaxInformationField, C as COUNTRY_OF_GOVERNING_LAW_POSSIBLE, S as StateCodesUS, f as isUsingCompanySearch, M as MemoizedDocumentUpload, h as isRegistrationNumberAbsentStateV4Scenario, j as COUNTRIES_THAT_USE_TAX_ID_INSTEAD_OF_VAT, k as getCompanyRegistrationNumberOptions, l as countryToTaxInfoTypeMap, m as rules, g as getFieldsWithExistingData } from "./TaxInformationField-ghLphbCF.js";
|
|
27
|
+
import { u as usePageLandedEvent, s as summaryStep } from "./Summary-HNxR09dk.js";
|
|
28
|
+
import { D as DBA_NAME_FIELD, B as BUSINESS_REGISTRATION_NUMBER_FIELD, V as VAT_NUMBER_FIELD, r as registrationAddressFields, o as operationalAddressIsSameIds, v as vatAbsenceReasonMetadata, d as defaultFieldMetadata$1, a as defaultFieldConfig$1, b as registrationNumberDefaultFieldMetadata, c as registrationNumberDefaultFieldConfig, e as doingBusinessAsFieldMetadata, f as doingBusinessAsAbsentFieldMetadata, g as DBANameField, h as BusinessRegistrationNumberField, i as getRegistrationNumberHelperText, j as VatNumberField, M as MemoizedConstitutionalDocument, k as getDefaultRegistrationNumberType, l as getDefaultVatNumberType, m as inferCompanyRegistrationNumberType, n as exemptFromRegistrationNumberDefaultFieldMetadata } from "./ConstitutionalDocument-Dhw6t4Ni.js";
|
|
29
|
+
import { K as KEYBOARD_KEYS, M as Modal, a as ModalContent } from "./Modal-VzVyfuvm.js";
|
|
30
|
+
import { S as SettingNames } from "./TaskVerificationStatus-BvU5X9F0.js";
|
|
31
|
+
import { t as toFullWidth, u as useAllowedCountries, m as mapJpAddressSchemaToAddressLocalizations, a as mapJpAddressSummary } from "./mapJpAddressSchemaToAddressLocalizations-CwG96wSK.js";
|
|
32
|
+
import { g as getAddressSchemaForCountry, C as COUNTRIES_WITH_STATES_DATASET, a as getAddressSchemaLabelsByCountry, m as mapAddressLabels, c as getKeyForField } from "./utils-DDh9Wc69.js";
|
|
33
|
+
import { o as organizationTypesToSkipCompanyStructureForm } from "./utils-Bbxtjil1.js";
|
|
34
|
+
import { i as isValidationError, p as processValidationErrors, a as isMaintenanceModeError } from "./validationError-Bhb_p0Dm.js";
|
|
35
|
+
import { a as datasetUtilities } from "./datasetUtil-BHQp0-xL.js";
|
|
36
|
+
import { r as resolveFieldMetadata } from "./fieldConfigurations-BUT9DTUH.js";
|
|
37
|
+
import { s as summaryItem } from "./summaryItem-CAQCQSkt.js";
|
|
38
|
+
import { f as formatCurrency, A as ALLOWED_SOF_SERVICES } from "./utils-C8SToqFp.js";
|
|
39
|
+
import { b as useAddressCleanse, f as formatAddressForCleanse, m as mapAddressData, A as Address, g as getNestedTrustedFields, S as STATE_FIELD, c as StateField, i as isDateOlderThanAYear } from "./Address-DI_WQl-j.js";
|
|
40
|
+
import { i as isEmpty$1 } from "./isEmpty-DG6Y1P62.js";
|
|
41
|
+
import { f as formatObject } from "./utils-DNSfZiio.js";
|
|
42
|
+
import { b as mapAddressLocalizationToJpAddressSchema, a as mapApiScriptLocalizationToSchemaFields, m as mapSchemaFieldsToApiScriptLocalization } from "./mapAddressLocalizationToJpAddressSchema-vJWbpAyq.js";
|
|
43
|
+
import { L as LegalFormField, I as InputNumber, c as InputCurrency, b as CURRENCY_FIELD, C as Currency, m as mapFinancialReportsToFinancialInformation, a as mapFinancialInformationToFinancialReport } from "./Currency-hS0YWWxq.js";
|
|
44
|
+
import { g as getLegalCompanyNameHelperText, L as LEGAL_COMPANY_NAME_FIELD, d as defaultFieldMetadataV4, a as defaultFieldMetadata$2, b as defaultFieldConfigV4, c as defaultFieldConfig$2 } from "./LegalCompanyNameField-DUA1xhu7.js";
|
|
45
|
+
import { u as useBusinessLines } from "./useBusinessLines-Coc7iGhS.js";
|
|
46
|
+
import { Suspense, lazy } from "preact/compat";
|
|
47
|
+
import { C as Checkbox } from "./Checkbox-HJ5QMOjP.js";
|
|
48
|
+
import { F as Field } from "./Field-B5icSx65.js";
|
|
49
|
+
import { H as Header } from "./Header-Dsxscc11.js";
|
|
50
|
+
import { E as ErrorPanel } from "./ErrorPanel-CTnweIrR.js";
|
|
51
|
+
import { I as InputDate, f as formatDateObj } from "./InputDate-BbhqEb0A.js";
|
|
52
|
+
import { a as validateNotEmptyOnBlur, v as validatePatternOnBlur, b as validateJaKanaLegalCompanyName, c as validateJaHaniLegalCompanyName } from "./patternValidators-DAtPy1-5.js";
|
|
53
|
+
import { M as MaskedInput, m as makeMask, d as alphanumericInputs, b as alphaInputs, n as numericInputs } from "./MaskedInput-Ble-w1-c.js";
|
|
54
|
+
import { m as mergeFieldMetadataIntoProps, c as createFormUtils } from "./formUtils-KRYFb23Q.js";
|
|
55
|
+
import { i as isCompatibleJapanVersion } from "./japanSupportUtils-Dl5g_UWE.js";
|
|
56
|
+
import { u as useDebouncedCallback } from "./debouncedInputEvent-Cv2S512Y.js";
|
|
57
|
+
import { signal } from "@preact/signals";
|
|
58
|
+
import cx from "classnames";
|
|
59
|
+
import { L as Link } from "./Link-5z1nhcfe.js";
|
|
60
|
+
import { S as StructuredList } from "./StructuredList-BNLhk_zV.js";
|
|
61
|
+
import { I as InputText } from "./InputText-DsyMVWuS.js";
|
|
62
|
+
import { C as CountryField, a as COUNTRY_FIELD } from "./CountryField-C7bj3yyn.js";
|
|
63
|
+
import { L as LoaderWrapper } from "./LoaderWrapper-D7zyni9T.js";
|
|
64
|
+
import { S as StackLayout } from "./unincorporated-partnership-MeN1dp53.js";
|
|
65
|
+
import { C as Card } from "./Card-OQuFzmxm.js";
|
|
66
|
+
import { L as ListItem } from "./ListItem-BFs1CkoM.js";
|
|
67
|
+
import { a as Alert } from "./Alert-BZOtTqxJ.js";
|
|
68
|
+
import { T as TileGroup } from "./TileGroup-BsvBLQp4.js";
|
|
69
|
+
import { R as RadioGroup } from "./RadioGroup-CpnraQPG.js";
|
|
70
|
+
import { u as useGlobalDataSlice } from "./useGlobalData-MctSxOcn.js";
|
|
71
|
+
import { u as useForm } from "./useForm-ZeyqDFOi.js";
|
|
72
|
+
import { c as currencyByCountry } from "./types-BstoJPXR.js";
|
|
415
73
|
const DATE_OF_INCORPORATION_FIELD = [
|
|
416
74
|
"dateOfIncorporation"
|
|
417
75
|
];
|
|
@@ -600,7 +258,6 @@ const stockISINFieldMetadata = {
|
|
|
600
258
|
mask: makeMask(...alphaInputs(2), ...alphanumericInputs(9), ...numericInputs(1)),
|
|
601
259
|
transformOnType: uppercase
|
|
602
260
|
},
|
|
603
|
-
helperText: "stockISINHelper",
|
|
604
261
|
guidanceText: {
|
|
605
262
|
key: "validationPleaseEnterAValidStockISIN",
|
|
606
263
|
values: {
|
|
@@ -710,7 +367,7 @@ const verifiedBusiness = signal(void 0);
|
|
|
710
367
|
const isVerifiedSingleCompanySearchResult = signal(false);
|
|
711
368
|
const additionalInformationContent = "adyen-kyc-additional-information-content";
|
|
712
369
|
const additionalInformationSectionHeading = "adyen-kyc-additional-information-section-heading";
|
|
713
|
-
const styles$
|
|
370
|
+
const styles$5 = {
|
|
714
371
|
additionalInformationContent,
|
|
715
372
|
additionalInformationSectionHeading
|
|
716
373
|
};
|
|
@@ -719,7 +376,7 @@ const verifiedBusinessCardContent = "adyen-kyc-verified-business-card-content";
|
|
|
719
376
|
const verifiedBusinessCardContentCollapsed = "adyen-kyc-verified-business-card-content-collapsed";
|
|
720
377
|
const verifiedBusinessCardContentExpanded = "adyen-kyc-verified-business-card-content-expanded";
|
|
721
378
|
const verifiedBusinessCardExpandButton = "adyen-kyc-verified-business-card-expand-button";
|
|
722
|
-
const styles$
|
|
379
|
+
const styles$4 = {
|
|
723
380
|
verifiedBusinessCard,
|
|
724
381
|
verifiedBusinessCardContent,
|
|
725
382
|
verifiedBusinessCardContentCollapsed,
|
|
@@ -732,7 +389,7 @@ function VerifiedBusinessCard({
|
|
|
732
389
|
}) {
|
|
733
390
|
const { t } = useTranslation(["common"]);
|
|
734
391
|
const [expanded, setExpanded] = useState(false);
|
|
735
|
-
const address = verifiedAddress?.address && verifiedAddress
|
|
392
|
+
const address = verifiedAddress?.address && verifiedAddress.city && verifiedAddress.stateOrProvince && verifiedAddress.postalCode ? `${verifiedAddress.address} ${verifiedAddress.city} ${verifiedAddress.stateOrProvince} ${verifiedAddress.postalCode}` : verifiedBusiness2?.address;
|
|
736
393
|
const addressLink = `https://www.google.com/maps/place/${address?.replaceAll(" ", "+")}`;
|
|
737
394
|
const baseItems = useMemo(
|
|
738
395
|
() => [
|
|
@@ -764,12 +421,12 @@ function VerifiedBusinessCard({
|
|
|
764
421
|
].filter((item) => !!item.details),
|
|
765
422
|
[address, addressLink, t, verifiedBusiness2?.legalForm]
|
|
766
423
|
);
|
|
767
|
-
const expandedContentClasses = cx(styles$
|
|
768
|
-
[styles$
|
|
769
|
-
[styles$
|
|
424
|
+
const expandedContentClasses = cx(styles$4.verifiedBusinessCardContent, {
|
|
425
|
+
[styles$4.verifiedBusinessCardContentCollapsed]: !expanded,
|
|
426
|
+
[styles$4.verifiedBusinessCardContentExpanded]: expanded
|
|
770
427
|
});
|
|
771
|
-
return /* @__PURE__ */ jsxs("section", { className: styles$
|
|
772
|
-
/* @__PURE__ */ jsxs("div", { className: styles$
|
|
428
|
+
return /* @__PURE__ */ jsxs("section", { className: styles$4.verifiedBusinessCard, children: [
|
|
429
|
+
/* @__PURE__ */ jsxs("div", { className: styles$4.verifiedBusinessCardContent, children: [
|
|
773
430
|
/* @__PURE__ */ jsx(StructuredList, { items: baseItems }),
|
|
774
431
|
/* @__PURE__ */ jsx(Divider, {})
|
|
775
432
|
] }),
|
|
@@ -777,11 +434,11 @@ function VerifiedBusinessCard({
|
|
|
777
434
|
/* @__PURE__ */ jsx(StructuredList, { items: expandedItems }),
|
|
778
435
|
/* @__PURE__ */ jsx(Divider, {})
|
|
779
436
|
] }),
|
|
780
|
-
/* @__PURE__ */ jsx("div", { className: styles$
|
|
437
|
+
/* @__PURE__ */ jsx("div", { className: styles$4.verifiedBusinessCardExpandButton, children: /* @__PURE__ */ jsx(Button, { variant: "link", onClick: () => setExpanded(!expanded), children: expanded ? t(($) => $["hideDetails"], { ns: "common" }) : t(($) => $["showDetails"], { ns: "common" }) }) })
|
|
781
438
|
] });
|
|
782
439
|
}
|
|
783
440
|
const LazyJpAddress = lazy(
|
|
784
|
-
async () => (await import("./JpAddress-
|
|
441
|
+
async () => (await import("./JpAddress-DR9efscK.js")).JpAddress
|
|
785
442
|
);
|
|
786
443
|
const ADDITIONAL_INFORMATION_FORM_ID = "additionalInformation";
|
|
787
444
|
const ADDITIONAL_INFORMATION_FIELDS = [
|
|
@@ -808,6 +465,7 @@ function AdditionalInformation({
|
|
|
808
465
|
verificationErrors = {}
|
|
809
466
|
}) {
|
|
810
467
|
const { t, i18n } = useTranslation(["common", "business"]);
|
|
468
|
+
const { t: businessT } = useTranslation("business");
|
|
811
469
|
const { form } = useFormContext();
|
|
812
470
|
const { isExperimentEnabled } = useExperimentsContext();
|
|
813
471
|
const { data: rootLegalEntity } = useLegalEntity(ROOT_LE);
|
|
@@ -818,7 +476,7 @@ function AdditionalInformation({
|
|
|
818
476
|
const addressSchema = getAddressSchemaForCountry(country).filter(
|
|
819
477
|
(field) => !COUNTRIES_WITH_STATES_DATASET.includes(country) ? field !== "stateOrProvince" : true
|
|
820
478
|
);
|
|
821
|
-
const currentCountryTaxInformation = form.data
|
|
479
|
+
const currentCountryTaxInformation = form.data.additionalInformation?.taxInformation?.find(
|
|
822
480
|
(taxId) => taxId.country === country
|
|
823
481
|
);
|
|
824
482
|
const businessLineTypes = [];
|
|
@@ -828,6 +486,7 @@ function AdditionalInformation({
|
|
|
828
486
|
if (requestingIssuing(rootLegalEntity)) {
|
|
829
487
|
businessLineTypes.push("issuing");
|
|
830
488
|
}
|
|
489
|
+
usePageLandedEvent();
|
|
831
490
|
const [addressToCheck, setAddressToCheck] = useDebouncedState(500);
|
|
832
491
|
const { data: cleansedRegistrationAddress } = useAddressCleanse(
|
|
833
492
|
{
|
|
@@ -839,20 +498,20 @@ function AdditionalInformation({
|
|
|
839
498
|
const mustProvideOperationalAddress = cleansedRegistrationAddress?.poBox ?? false;
|
|
840
499
|
useEffect(
|
|
841
500
|
() => setAddressToCheck(
|
|
842
|
-
formatAddressForCleanse(form.data
|
|
501
|
+
formatAddressForCleanse(form.data.additionalInformation?.registrationAddress ?? {})
|
|
843
502
|
),
|
|
844
|
-
[form.data
|
|
503
|
+
[form.data.additionalInformation?.registrationAddress, setAddressToCheck]
|
|
845
504
|
);
|
|
846
505
|
const verifiedAddress = useMemo(() => {
|
|
847
506
|
if (!verifiedBusiness$1) return void 0;
|
|
848
|
-
return verifiedBusiness$1.isPrincipalAddress || verifiedBusiness$1.state && form.data
|
|
507
|
+
return verifiedBusiness$1.isPrincipalAddress || verifiedBusiness$1.state && form.data.basicInformation?.stateOrProvince !== verifiedBusiness$1.state ? { operationalAddress: { ...mapAddressData(verifiedBusiness$1), country } } : {
|
|
849
508
|
registrationAddress: {
|
|
850
509
|
...mapAddressData(verifiedBusiness$1),
|
|
851
510
|
country,
|
|
852
|
-
stateOrProvince: form.data
|
|
511
|
+
stateOrProvince: form.data.basicInformation?.stateOrProvince
|
|
853
512
|
}
|
|
854
513
|
};
|
|
855
|
-
}, [verifiedBusiness$1, form.data
|
|
514
|
+
}, [verifiedBusiness$1, form.data.basicInformation?.stateOrProvince, country]);
|
|
856
515
|
const [registrationAddressValid, setRegistrationAddressValid] = useState(false);
|
|
857
516
|
const [operationalAddressValid, setOperationalAddressValid] = useState(false);
|
|
858
517
|
if (form.valid.additionalInformation?.registrationAddress !== registrationAddressValid) {
|
|
@@ -890,21 +549,21 @@ function AdditionalInformation({
|
|
|
890
549
|
},
|
|
891
550
|
[form, handleChangeFor]
|
|
892
551
|
);
|
|
893
|
-
if (form.data
|
|
552
|
+
if (form.data.additionalInformation?.operationalAddressIsSame === null) {
|
|
894
553
|
handleOperationalAddressIsSameChange(true);
|
|
895
554
|
}
|
|
896
555
|
useEffect(() => {
|
|
897
|
-
if (mustProvideOperationalAddress && form.data
|
|
556
|
+
if (mustProvideOperationalAddress && form.data.additionalInformation?.operationalAddressIsSame !== operationalAddressIsSameIds.OPERATIONAL_ADDRESS_IS_NOT_SAME) {
|
|
898
557
|
handleOperationalAddressIsSameChange(false);
|
|
899
558
|
}
|
|
900
559
|
}, [
|
|
901
560
|
handleOperationalAddressIsSameChange,
|
|
902
561
|
mustProvideOperationalAddress,
|
|
903
|
-
form.data
|
|
562
|
+
form.data.additionalInformation?.operationalAddressIsSame
|
|
904
563
|
]);
|
|
905
564
|
const formUtils = useMemo(() => {
|
|
906
565
|
const initialProps = {
|
|
907
|
-
data: form.data
|
|
566
|
+
data: form.data.additionalInformation ?? {},
|
|
908
567
|
fieldValidationErrors: validationErrors,
|
|
909
568
|
formVerificationErrors: verificationErrors,
|
|
910
569
|
allFields: form.allFields?.additionalInformation ?? [],
|
|
@@ -912,8 +571,8 @@ function AdditionalInformation({
|
|
|
912
571
|
optionalFields: form.optionalFields?.additionalInformation ?? [],
|
|
913
572
|
trustedFields: form.trustedFields?.additionalInformation ?? [],
|
|
914
573
|
obscuredFields: form.obscuredFields?.additionalInformation ?? [],
|
|
915
|
-
errors: form.errors
|
|
916
|
-
valid: form.valid
|
|
574
|
+
errors: form.errors.additionalInformation ?? {},
|
|
575
|
+
valid: form.valid.additionalInformation ?? {},
|
|
917
576
|
handleFieldChange: handleChangeFor
|
|
918
577
|
};
|
|
919
578
|
const formUtilProps = initialProps.allFields?.reduce((acc, field) => {
|
|
@@ -933,7 +592,7 @@ function AdditionalInformation({
|
|
|
933
592
|
registrationNumberDefaultFieldConfig[country],
|
|
934
593
|
{
|
|
935
594
|
companyType,
|
|
936
|
-
registrationNumberType: form.data
|
|
595
|
+
registrationNumberType: form.data.additionalInformation?.registrationNumberType,
|
|
937
596
|
isExperimentEnabled
|
|
938
597
|
},
|
|
939
598
|
registrationNumberDefaultFieldMetadata
|
|
@@ -958,7 +617,7 @@ function AdditionalInformation({
|
|
|
958
617
|
field,
|
|
959
618
|
resolveFieldMetadata(
|
|
960
619
|
defaultFieldConfig$1[country],
|
|
961
|
-
{ vatNumberType: form.data
|
|
620
|
+
{ vatNumberType: form.data.additionalInformation?.vatNumberType },
|
|
962
621
|
defaultFieldMetadata$1
|
|
963
622
|
),
|
|
964
623
|
acc
|
|
@@ -1001,13 +660,13 @@ function AdditionalInformation({
|
|
|
1001
660
|
country,
|
|
1002
661
|
currentCountryTaxInformation?.type,
|
|
1003
662
|
form.allFields?.additionalInformation,
|
|
1004
|
-
form.data
|
|
1005
|
-
form.errors
|
|
663
|
+
form.data.additionalInformation,
|
|
664
|
+
form.errors.additionalInformation,
|
|
1006
665
|
form.obscuredFields?.additionalInformation,
|
|
1007
666
|
form.optionalFields?.additionalInformation,
|
|
1008
667
|
form.requiredFields?.additionalInformation,
|
|
1009
668
|
form.trustedFields?.additionalInformation,
|
|
1010
|
-
form.valid
|
|
669
|
+
form.valid.additionalInformation,
|
|
1011
670
|
handleChangeFor,
|
|
1012
671
|
t,
|
|
1013
672
|
isExperimentEnabled,
|
|
@@ -1020,16 +679,13 @@ function AdditionalInformation({
|
|
|
1020
679
|
});
|
|
1021
680
|
const datasetUtils = datasetUtilities(i18n.language);
|
|
1022
681
|
const registrationAddressDescription = useMemo(() => {
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
});
|
|
1031
|
-
}
|
|
1032
|
-
return t(($) => $["youBusinessOfficalAddress"], { ns: "business" });
|
|
682
|
+
return ["US", "NL", "CZ"].includes(country) ? t(($) => $["youBusinessOfficalAddressInTheCounty"], {
|
|
683
|
+
ns: "business",
|
|
684
|
+
country: datasetUtils.getCountryName(country)
|
|
685
|
+
}) : t(($) => $["youBusinessOfficalAddressInCounty"], {
|
|
686
|
+
ns: "business",
|
|
687
|
+
country: datasetUtils.getCountryName(country)
|
|
688
|
+
});
|
|
1033
689
|
}, [country, datasetUtils, t]);
|
|
1034
690
|
return /* @__PURE__ */ jsxs("form", { id, children: [
|
|
1035
691
|
/* @__PURE__ */ jsx(Header, { title: t(($) => $["additionalInformationFormHeading"], { ns: "business" }) }),
|
|
@@ -1042,9 +698,9 @@ function AdditionalInformation({
|
|
|
1042
698
|
formUtils
|
|
1043
699
|
}
|
|
1044
700
|
),
|
|
1045
|
-
/* @__PURE__ */ jsxs("div", { className: styles$
|
|
701
|
+
/* @__PURE__ */ jsxs("div", { className: styles$5.additionalInformationContent, children: [
|
|
1046
702
|
showVerified && /* @__PURE__ */ jsxs("section", { children: [
|
|
1047
|
-
/* @__PURE__ */ jsx("div", { className: styles$
|
|
703
|
+
/* @__PURE__ */ jsx("div", { className: styles$5.additionalInformationSectionHeading, children: /* @__PURE__ */ jsx(Typography, { el: "h3", variant: "title", children: t(($) => $["verifiedInformation"], { ns: "business" }) }) }),
|
|
1048
704
|
/* @__PURE__ */ jsx(
|
|
1049
705
|
VerifiedBusinessCard,
|
|
1050
706
|
{
|
|
@@ -1054,7 +710,7 @@ function AdditionalInformation({
|
|
|
1054
710
|
)
|
|
1055
711
|
] }),
|
|
1056
712
|
/* @__PURE__ */ jsxs("section", { children: [
|
|
1057
|
-
showVerified && /* @__PURE__ */ jsx("div", { className: styles$
|
|
713
|
+
showVerified && /* @__PURE__ */ jsx("div", { className: styles$5.additionalInformationSectionHeading, children: /* @__PURE__ */ jsx(Typography, { el: "h3", variant: "title", children: t(($) => $["otherBusinessInformation"], { ns: "business" }) }) }),
|
|
1058
714
|
/* @__PURE__ */ jsxs("fieldset", { children: [
|
|
1059
715
|
showField(LEGAL_FORM_FIELDS) && /* @__PURE__ */ jsx(
|
|
1060
716
|
LegalFormField,
|
|
@@ -1063,12 +719,12 @@ function AdditionalInformation({
|
|
|
1063
719
|
countryCode: country,
|
|
1064
720
|
data: {
|
|
1065
721
|
legalForm: formUtils.getFieldData(
|
|
1066
|
-
form.data
|
|
722
|
+
form.data.additionalInformation ?? {},
|
|
1067
723
|
LEGAL_FORM_FIELDS
|
|
1068
|
-
)
|
|
724
|
+
).legalForm
|
|
1069
725
|
},
|
|
1070
726
|
valid: formUtils.getFieldValid(
|
|
1071
|
-
form.valid
|
|
727
|
+
form.valid.additionalInformation ?? {},
|
|
1072
728
|
LEGAL_FORM_FIELDS
|
|
1073
729
|
),
|
|
1074
730
|
errorMessage: form.errors.additionalInformation?.legalForm?.errorMessage,
|
|
@@ -1080,16 +736,13 @@ function AdditionalInformation({
|
|
|
1080
736
|
showField(DBA_NAME_FIELD) && /* @__PURE__ */ jsx(
|
|
1081
737
|
DBANameField,
|
|
1082
738
|
{
|
|
1083
|
-
data: formUtils.getFieldData(
|
|
1084
|
-
form.data?.additionalInformation ?? {},
|
|
1085
|
-
DBA_NAME_FIELD
|
|
1086
|
-
),
|
|
739
|
+
data: formUtils.getFieldData(form.data.additionalInformation ?? {}, DBA_NAME_FIELD),
|
|
1087
740
|
valid: formUtils.getFieldValid(
|
|
1088
|
-
form.valid
|
|
741
|
+
form.valid.additionalInformation ?? {},
|
|
1089
742
|
DBA_NAME_FIELD
|
|
1090
743
|
),
|
|
1091
744
|
errors: formUtils.getFieldErrors(
|
|
1092
|
-
form.errors
|
|
745
|
+
form.errors.additionalInformation ?? {},
|
|
1093
746
|
validationErrors,
|
|
1094
747
|
DBA_NAME_FIELD
|
|
1095
748
|
),
|
|
@@ -1104,15 +757,15 @@ function AdditionalInformation({
|
|
|
1104
757
|
BusinessRegistrationNumberField,
|
|
1105
758
|
{
|
|
1106
759
|
data: formUtils.getFieldData(
|
|
1107
|
-
form.data
|
|
760
|
+
form.data.additionalInformation ?? {},
|
|
1108
761
|
BUSINESS_REGISTRATION_NUMBER_FIELD
|
|
1109
762
|
),
|
|
1110
763
|
valid: formUtils.getFieldValid(
|
|
1111
|
-
form.valid
|
|
764
|
+
form.valid.additionalInformation ?? {},
|
|
1112
765
|
BUSINESS_REGISTRATION_NUMBER_FIELD
|
|
1113
766
|
),
|
|
1114
767
|
errors: formUtils.getFieldErrors(
|
|
1115
|
-
form.errors
|
|
768
|
+
form.errors.additionalInformation ?? {},
|
|
1116
769
|
validationErrors,
|
|
1117
770
|
BUSINESS_REGISTRATION_NUMBER_FIELD
|
|
1118
771
|
),
|
|
@@ -1122,7 +775,7 @@ function AdditionalInformation({
|
|
|
1122
775
|
mask: formUtils.getMask("registrationNumber"),
|
|
1123
776
|
guidanceText: formUtils.getFieldGuidanceText(BUSINESS_REGISTRATION_NUMBER_FIELD),
|
|
1124
777
|
placeholders: formUtils.getFieldPlaceholders(BUSINESS_REGISTRATION_NUMBER_FIELD),
|
|
1125
|
-
helperText:
|
|
778
|
+
helperText: getRegistrationNumberHelperText(businessT, { country, companyType }),
|
|
1126
779
|
readonly: formUtils.isReadOnly("registrationNumber"),
|
|
1127
780
|
optional: formUtils.isOptionalField("registrationNumber"),
|
|
1128
781
|
shouldValidate,
|
|
@@ -1136,15 +789,15 @@ function AdditionalInformation({
|
|
|
1136
789
|
TaxInformationField,
|
|
1137
790
|
{
|
|
1138
791
|
data: formUtils.getFieldData(
|
|
1139
|
-
form.data
|
|
792
|
+
form.data.additionalInformation ?? {},
|
|
1140
793
|
TAX_INFORMATION_FIELD
|
|
1141
794
|
),
|
|
1142
795
|
valid: formUtils.getFieldValid(
|
|
1143
|
-
form.valid
|
|
796
|
+
form.valid.additionalInformation ?? {},
|
|
1144
797
|
TAX_INFORMATION_FIELD
|
|
1145
798
|
),
|
|
1146
799
|
errors: formUtils.getFieldErrors(
|
|
1147
|
-
form.errors
|
|
800
|
+
form.errors.additionalInformation ?? {},
|
|
1148
801
|
validationErrors,
|
|
1149
802
|
TAX_INFORMATION_FIELD
|
|
1150
803
|
),
|
|
@@ -1160,22 +813,22 @@ function AdditionalInformation({
|
|
|
1160
813
|
country,
|
|
1161
814
|
entityType: companyType,
|
|
1162
815
|
defaultData: form.defaultData?.additionalInformation?.taxInformation,
|
|
1163
|
-
registrationNumber: form.data
|
|
816
|
+
registrationNumber: form.data.additionalInformation?.registrationNumber
|
|
1164
817
|
}
|
|
1165
818
|
),
|
|
1166
819
|
showField(VAT_NUMBER_FIELD) && /* @__PURE__ */ jsx(
|
|
1167
820
|
VatNumberField,
|
|
1168
821
|
{
|
|
1169
822
|
data: formUtils.getFieldData(
|
|
1170
|
-
form.data
|
|
823
|
+
form.data.additionalInformation ?? {},
|
|
1171
824
|
VAT_NUMBER_FIELD
|
|
1172
825
|
),
|
|
1173
826
|
valid: formUtils.getFieldValid(
|
|
1174
|
-
form.valid
|
|
827
|
+
form.valid.additionalInformation ?? {},
|
|
1175
828
|
VAT_NUMBER_FIELD
|
|
1176
829
|
),
|
|
1177
830
|
errors: formUtils.getFieldErrors(
|
|
1178
|
-
form.errors
|
|
831
|
+
form.errors.additionalInformation ?? {},
|
|
1179
832
|
validationErrors,
|
|
1180
833
|
VAT_NUMBER_FIELD
|
|
1181
834
|
),
|
|
@@ -1196,15 +849,15 @@ function AdditionalInformation({
|
|
|
1196
849
|
EInvoicingCodeField,
|
|
1197
850
|
{
|
|
1198
851
|
data: formUtils.getFieldData(
|
|
1199
|
-
form.data
|
|
852
|
+
form.data.additionalInformation ?? {},
|
|
1200
853
|
EINVOICING_CODE_FIELD
|
|
1201
854
|
),
|
|
1202
855
|
valid: formUtils.getFieldValid(
|
|
1203
|
-
form.valid
|
|
856
|
+
form.valid.additionalInformation ?? {},
|
|
1204
857
|
EINVOICING_CODE_FIELD
|
|
1205
858
|
),
|
|
1206
859
|
errors: formUtils.getFieldErrors(
|
|
1207
|
-
form.errors
|
|
860
|
+
form.errors.additionalInformation ?? {},
|
|
1208
861
|
validationErrors,
|
|
1209
862
|
EINVOICING_CODE_FIELD
|
|
1210
863
|
),
|
|
@@ -1220,15 +873,15 @@ function AdditionalInformation({
|
|
|
1220
873
|
IndustryCodeField,
|
|
1221
874
|
{
|
|
1222
875
|
data: formUtils.getFieldData(
|
|
1223
|
-
form.data
|
|
876
|
+
form.data.additionalInformation ?? {},
|
|
1224
877
|
INDUSTRY_CODE_FIELD
|
|
1225
878
|
),
|
|
1226
879
|
valid: formUtils.getFieldValid(
|
|
1227
|
-
form.valid
|
|
880
|
+
form.valid.additionalInformation ?? {},
|
|
1228
881
|
INDUSTRY_CODE_FIELD
|
|
1229
882
|
),
|
|
1230
883
|
errors: formUtils.getFieldErrors(
|
|
1231
|
-
form.errors
|
|
884
|
+
form.errors.additionalInformation ?? {},
|
|
1232
885
|
validationErrors,
|
|
1233
886
|
INDUSTRY_CODE_FIELD
|
|
1234
887
|
),
|
|
@@ -1253,15 +906,15 @@ function AdditionalInformation({
|
|
|
1253
906
|
DateOfIncorporationField,
|
|
1254
907
|
{
|
|
1255
908
|
data: formUtils.getFieldData(
|
|
1256
|
-
form.data
|
|
909
|
+
form.data.additionalInformation ?? {},
|
|
1257
910
|
DATE_OF_INCORPORATION_FIELD
|
|
1258
911
|
),
|
|
1259
912
|
valid: formUtils.getFieldValid(
|
|
1260
|
-
form.valid
|
|
913
|
+
form.valid.additionalInformation ?? {},
|
|
1261
914
|
DATE_OF_INCORPORATION_FIELD
|
|
1262
915
|
),
|
|
1263
916
|
errors: formUtils.getFieldErrors(
|
|
1264
|
-
form.errors
|
|
917
|
+
form.errors.additionalInformation ?? {},
|
|
1265
918
|
validationErrors,
|
|
1266
919
|
DATE_OF_INCORPORATION_FIELD
|
|
1267
920
|
),
|
|
@@ -1276,21 +929,21 @@ function AdditionalInformation({
|
|
|
1276
929
|
] })
|
|
1277
930
|
] }),
|
|
1278
931
|
showStockData && /* @__PURE__ */ jsxs("section", { children: [
|
|
1279
|
-
/* @__PURE__ */ jsx("div", { className: styles$
|
|
932
|
+
/* @__PURE__ */ jsx("div", { className: styles$5.additionalInformationSectionHeading, children: /* @__PURE__ */ jsx(Typography, { el: "h3", variant: "title", children: t(($) => $["stockExchangeInformation"], { ns: "business" }) }) }),
|
|
1280
933
|
/* @__PURE__ */ jsxs("fieldset", { children: [
|
|
1281
934
|
showField(STOCK_EXCHANGE_MIC_FIELD) && /* @__PURE__ */ jsx(
|
|
1282
935
|
StockExchangeMICField,
|
|
1283
936
|
{
|
|
1284
937
|
data: formUtils.getFieldData(
|
|
1285
|
-
form.data
|
|
938
|
+
form.data.additionalInformation ?? {},
|
|
1286
939
|
STOCK_EXCHANGE_MIC_FIELD
|
|
1287
940
|
),
|
|
1288
941
|
valid: formUtils.getFieldValid(
|
|
1289
|
-
form.valid
|
|
942
|
+
form.valid.additionalInformation ?? {},
|
|
1290
943
|
STOCK_EXCHANGE_MIC_FIELD
|
|
1291
944
|
),
|
|
1292
945
|
errors: formUtils.getFieldErrors(
|
|
1293
|
-
form.errors
|
|
946
|
+
form.errors.additionalInformation ?? {},
|
|
1294
947
|
validationErrors,
|
|
1295
948
|
STOCK_EXCHANGE_MIC_FIELD
|
|
1296
949
|
),
|
|
@@ -1307,15 +960,15 @@ function AdditionalInformation({
|
|
|
1307
960
|
StockISINField,
|
|
1308
961
|
{
|
|
1309
962
|
data: formUtils.getFieldData(
|
|
1310
|
-
form.data
|
|
963
|
+
form.data.additionalInformation ?? {},
|
|
1311
964
|
STOCK_ISIN_FIELD
|
|
1312
965
|
),
|
|
1313
966
|
valid: formUtils.getFieldValid(
|
|
1314
|
-
form.valid
|
|
967
|
+
form.valid.additionalInformation ?? {},
|
|
1315
968
|
STOCK_ISIN_FIELD
|
|
1316
969
|
),
|
|
1317
970
|
errors: formUtils.getFieldErrors(
|
|
1318
|
-
form.errors
|
|
971
|
+
form.errors.additionalInformation ?? {},
|
|
1319
972
|
validationErrors,
|
|
1320
973
|
STOCK_ISIN_FIELD
|
|
1321
974
|
),
|
|
@@ -1332,15 +985,15 @@ function AdditionalInformation({
|
|
|
1332
985
|
StockTickerSymbolField,
|
|
1333
986
|
{
|
|
1334
987
|
data: formUtils.getFieldData(
|
|
1335
|
-
form.data
|
|
988
|
+
form.data.additionalInformation ?? {},
|
|
1336
989
|
STOCK_TICKER_SYMBOL_FIELD
|
|
1337
990
|
),
|
|
1338
991
|
valid: formUtils.getFieldValid(
|
|
1339
|
-
form.valid
|
|
992
|
+
form.valid.additionalInformation ?? {},
|
|
1340
993
|
STOCK_TICKER_SYMBOL_FIELD
|
|
1341
994
|
),
|
|
1342
995
|
errors: formUtils.getFieldErrors(
|
|
1343
|
-
form.errors
|
|
996
|
+
form.errors.additionalInformation ?? {},
|
|
1344
997
|
validationErrors,
|
|
1345
998
|
STOCK_TICKER_SYMBOL_FIELD
|
|
1346
999
|
),
|
|
@@ -1356,7 +1009,7 @@ function AdditionalInformation({
|
|
|
1356
1009
|
] })
|
|
1357
1010
|
] }),
|
|
1358
1011
|
/* @__PURE__ */ jsxs("section", { "data-testid": "registeredBusinessAddress", children: [
|
|
1359
|
-
/* @__PURE__ */ jsxs("div", { className: styles$
|
|
1012
|
+
/* @__PURE__ */ jsxs("div", { className: styles$5.additionalInformationSectionHeading, children: [
|
|
1360
1013
|
/* @__PURE__ */ jsx(Typography, { el: "h3", variant: "title", children: t(($) => $["registeredBusinessAddress"], { ns: "business" }) }),
|
|
1361
1014
|
/* @__PURE__ */ jsx(Typography, { el: "p", variant: "body", children: registrationAddressDescription })
|
|
1362
1015
|
] }),
|
|
@@ -1383,7 +1036,7 @@ function AdditionalInformation({
|
|
|
1383
1036
|
shouldValidate,
|
|
1384
1037
|
hideCountry: true,
|
|
1385
1038
|
optionalFields: ["otherAddressInformation"],
|
|
1386
|
-
readOnlyFields: verifiedBusiness$1?.state && verifiedBusiness$1
|
|
1039
|
+
readOnlyFields: verifiedBusiness$1?.state && verifiedBusiness$1.state === form.data.basicInformation?.stateOrProvince ? ["stateOrProvince"] : [],
|
|
1387
1040
|
trustedFields: getNestedTrustedFields(
|
|
1388
1041
|
"registrationAddress",
|
|
1389
1042
|
form.data.additionalInformation,
|
|
@@ -1397,7 +1050,7 @@ function AdditionalInformation({
|
|
|
1397
1050
|
)
|
|
1398
1051
|
] }),
|
|
1399
1052
|
/* @__PURE__ */ jsxs("section", { "data-testid": "principalPlaceOfBusiness", children: [
|
|
1400
|
-
/* @__PURE__ */ jsxs("div", { className: styles$
|
|
1053
|
+
/* @__PURE__ */ jsxs("div", { className: styles$5.additionalInformationSectionHeading, children: [
|
|
1401
1054
|
/* @__PURE__ */ jsx(Typography, { el: "h3", variant: "title", children: t(($) => $["principalPlaceOfBusiness"], { ns: "business" }) }),
|
|
1402
1055
|
/* @__PURE__ */ jsx(Typography, { el: "p", variant: "body", children: t(($) => $["thePhysicalLocationWhereABusiness"], { ns: "business" }) })
|
|
1403
1056
|
] }),
|
|
@@ -1406,23 +1059,23 @@ function AdditionalInformation({
|
|
|
1406
1059
|
{
|
|
1407
1060
|
el: "fieldset",
|
|
1408
1061
|
name: "operationalAddressIsSame",
|
|
1409
|
-
errorMessage: form.errors
|
|
1410
|
-
isValid: form.valid
|
|
1062
|
+
errorMessage: form.errors.additionalInformation?.operationalAddressIsSame?.errorMessage,
|
|
1063
|
+
isValid: form.valid.additionalInformation?.operationalAddressIsSame,
|
|
1411
1064
|
children: (childProps) => /* @__PURE__ */ jsx(
|
|
1412
1065
|
Checkbox,
|
|
1413
1066
|
{
|
|
1414
1067
|
...childProps,
|
|
1415
1068
|
"aria-required": formUtils.isRequiredField("operationalAddressIsSame"),
|
|
1416
|
-
"aria-invalid": !form.valid
|
|
1069
|
+
"aria-invalid": !form.valid.additionalInformation?.operationalAddressIsSame,
|
|
1417
1070
|
name: "operationalAddressIsSame",
|
|
1418
1071
|
label: formUtils.getLabel("sameAsRegisteredAddress"),
|
|
1419
|
-
checked: form.data
|
|
1072
|
+
checked: form.data.additionalInformation?.operationalAddressIsSame ? form.data.additionalInformation.operationalAddressIsSame === operationalAddressIsSameIds.OPERATIONAL_ADDRESS_IS_SAME : true,
|
|
1420
1073
|
onChange: handleOperationalAddressIsSameChange
|
|
1421
1074
|
}
|
|
1422
1075
|
)
|
|
1423
1076
|
}
|
|
1424
1077
|
),
|
|
1425
|
-
form.data
|
|
1078
|
+
form.data.additionalInformation?.operationalAddressIsSame === operationalAddressIsSameIds.OPERATIONAL_ADDRESS_IS_NOT_SAME && (isCompatibleJapanVersion(country, versionData?.version) ? /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(Loader, {}), children: /* @__PURE__ */ jsx(
|
|
1426
1079
|
LazyJpAddress,
|
|
1427
1080
|
{
|
|
1428
1081
|
id: ADDITIONAL_INFORMATION_FORM_ID,
|
|
@@ -1447,7 +1100,7 @@ function AdditionalInformation({
|
|
|
1447
1100
|
optionalFields: ["otherAddressInformation"],
|
|
1448
1101
|
trustedFields: getNestedTrustedFields(
|
|
1449
1102
|
"operationalAddress",
|
|
1450
|
-
form.data
|
|
1103
|
+
form.data.additionalInformation,
|
|
1451
1104
|
form.trustedFields?.additionalInformation
|
|
1452
1105
|
),
|
|
1453
1106
|
onChange: handleOperationalAddressChange,
|
|
@@ -1468,15 +1121,13 @@ function useLegalCompanyNameField({
|
|
|
1468
1121
|
fieldProblems,
|
|
1469
1122
|
country,
|
|
1470
1123
|
formUtils,
|
|
1471
|
-
handleChange
|
|
1124
|
+
handleChange,
|
|
1125
|
+
t
|
|
1472
1126
|
}) {
|
|
1473
1127
|
const { data: versionData } = useVersionConfiguration();
|
|
1474
1128
|
const fieldKeys = getFieldKeys(country, versionData?.version);
|
|
1475
1129
|
const labels = formUtils.getFieldLabels(fieldKeys);
|
|
1476
1130
|
const fieldErrors = formUtils.getFieldErrors(errors, fieldProblems, fieldKeys);
|
|
1477
|
-
const helperTexts = formUtils.getFieldHelperText(fieldKeys, {
|
|
1478
|
-
legalCompanyName: "legalCompanyName__helperText"
|
|
1479
|
-
});
|
|
1480
1131
|
const fieldsTransformInput = {
|
|
1481
1132
|
jaHaniLegalCompanyName: (value) => toFullWidth(value),
|
|
1482
1133
|
jaKanaLegalCompanyName: (value) => toFullWidth(value)
|
|
@@ -1488,6 +1139,7 @@ function useLegalCompanyNameField({
|
|
|
1488
1139
|
return fieldKeys.map((fieldKey) => {
|
|
1489
1140
|
const shouldShowField = formUtils.isRequiredField(fieldKey) || formUtils.isOptionalField(fieldKey);
|
|
1490
1141
|
if (shouldShowField) {
|
|
1142
|
+
const helper = fieldKey === "legalCompanyName" ? getLegalCompanyNameHelperText(t, { country }) : void 0;
|
|
1491
1143
|
return {
|
|
1492
1144
|
name: fieldKey,
|
|
1493
1145
|
value: data[fieldKey] ?? "",
|
|
@@ -1497,7 +1149,7 @@ function useLegalCompanyNameField({
|
|
|
1497
1149
|
isValid: valid[fieldKey],
|
|
1498
1150
|
errorMessage: fieldErrors[fieldKey],
|
|
1499
1151
|
label: labels[fieldKey],
|
|
1500
|
-
helper
|
|
1152
|
+
helper,
|
|
1501
1153
|
onKeyDown: handleKeyDown,
|
|
1502
1154
|
transformInput: fieldsTransformInput[fieldKey],
|
|
1503
1155
|
transformMode: fieldsTransformMode[fieldKey]
|
|
@@ -1531,7 +1183,6 @@ function CountryOfGoverningLawField({
|
|
|
1531
1183
|
labels,
|
|
1532
1184
|
readonly,
|
|
1533
1185
|
handleChangeFor,
|
|
1534
|
-
helperText,
|
|
1535
1186
|
allowedCountries,
|
|
1536
1187
|
country
|
|
1537
1188
|
}) {
|
|
@@ -1559,8 +1210,7 @@ function CountryOfGoverningLawField({
|
|
|
1559
1210
|
labels: { country: labels?.countryOfGoverningLaw || t(($) => $["countryOfGoverningLaw"]) },
|
|
1560
1211
|
readonly,
|
|
1561
1212
|
allowedCountries,
|
|
1562
|
-
handleChangeFor: () => handleChangeFor("countryOfGoverningLaw")
|
|
1563
|
-
helperText: { country: helperText?.countryOfGoverningLaw }
|
|
1213
|
+
handleChangeFor: () => handleChangeFor("countryOfGoverningLaw")
|
|
1564
1214
|
}
|
|
1565
1215
|
);
|
|
1566
1216
|
}
|
|
@@ -1620,7 +1270,7 @@ const defaultFieldConfig = {
|
|
|
1620
1270
|
})
|
|
1621
1271
|
};
|
|
1622
1272
|
const basicInformation = "adyen-kyc-basic-information";
|
|
1623
|
-
const styles$
|
|
1273
|
+
const styles$3 = {
|
|
1624
1274
|
basicInformation
|
|
1625
1275
|
};
|
|
1626
1276
|
const BASIC_INFORMATION_FIELDS = [
|
|
@@ -1654,22 +1304,24 @@ function BasicInformation({
|
|
|
1654
1304
|
companyType
|
|
1655
1305
|
}) {
|
|
1656
1306
|
const { t } = useTranslation(["common", "business"]);
|
|
1307
|
+
const { t: businessT } = useTranslation("business");
|
|
1657
1308
|
const { isSettingEnabled } = useSettingsContext();
|
|
1658
1309
|
const { isExperimentEnabled } = useExperimentsContext();
|
|
1659
1310
|
const { form } = useFormContext();
|
|
1660
1311
|
const allowedCountries = useAllowedCountries();
|
|
1661
1312
|
const isAllowedEditPrefilledCountry = isSettingEnabled(SettingNames.AllowPrefilledCountryEdit);
|
|
1662
|
-
const state = form.data
|
|
1663
|
-
const currentCountryTaxInformation = form.data
|
|
1313
|
+
const state = form.data.basicInformation?.stateOrProvince;
|
|
1314
|
+
const currentCountryTaxInformation = form.data.basicInformation?.taxInformation?.find(
|
|
1664
1315
|
(tax) => tax.country === country
|
|
1665
1316
|
);
|
|
1317
|
+
usePageLandedEvent();
|
|
1666
1318
|
const handleChangeFor = useCallback(
|
|
1667
1319
|
(fieldName, mode) => form.handleChangeFor(fieldName, "basicInformation", mode),
|
|
1668
1320
|
[form]
|
|
1669
1321
|
);
|
|
1670
1322
|
const formUtils = useMemo(() => {
|
|
1671
1323
|
const initialProps = {
|
|
1672
|
-
data: form.data
|
|
1324
|
+
data: form.data.basicInformation ?? {},
|
|
1673
1325
|
fieldValidationErrors: validationErrors,
|
|
1674
1326
|
formVerificationErrors: verificationErrors,
|
|
1675
1327
|
allFields: form.allFields?.basicInformation ?? [],
|
|
@@ -1677,8 +1329,8 @@ function BasicInformation({
|
|
|
1677
1329
|
optionalFields: form.optionalFields?.basicInformation ?? [],
|
|
1678
1330
|
trustedFields: form.trustedFields?.basicInformation ?? [],
|
|
1679
1331
|
obscuredFields: form.obscuredFields?.basicInformation ?? [],
|
|
1680
|
-
errors: form.errors
|
|
1681
|
-
valid: form.valid
|
|
1332
|
+
errors: form.errors.basicInformation ?? {},
|
|
1333
|
+
valid: form.valid.basicInformation ?? {},
|
|
1682
1334
|
handleFieldChange: handleChangeFor
|
|
1683
1335
|
};
|
|
1684
1336
|
const formUtilProps = initialProps.allFields?.reduce((acc, field) => {
|
|
@@ -1690,7 +1342,7 @@ function BasicInformation({
|
|
|
1690
1342
|
field,
|
|
1691
1343
|
resolveFieldMetadata(
|
|
1692
1344
|
isExperimentEnabled("StrictNameAndAddressValidationV4") ? defaultFieldConfigV4[country] : defaultFieldConfig$2[country],
|
|
1693
|
-
{
|
|
1345
|
+
{},
|
|
1694
1346
|
isExperimentEnabled("StrictNameAndAddressValidationV4") ? defaultFieldMetadataV4 : defaultFieldMetadata$2
|
|
1695
1347
|
),
|
|
1696
1348
|
acc
|
|
@@ -1727,7 +1379,7 @@ function BasicInformation({
|
|
|
1727
1379
|
registrationNumberDefaultFieldConfig[country],
|
|
1728
1380
|
{
|
|
1729
1381
|
companyType,
|
|
1730
|
-
registrationNumberType: form.data
|
|
1382
|
+
registrationNumberType: form.data.additionalInformation?.registrationNumberType,
|
|
1731
1383
|
state,
|
|
1732
1384
|
isExperimentEnabled
|
|
1733
1385
|
},
|
|
@@ -1765,14 +1417,14 @@ function BasicInformation({
|
|
|
1765
1417
|
country,
|
|
1766
1418
|
currentCountryTaxInformation?.type,
|
|
1767
1419
|
form.allFields?.basicInformation,
|
|
1768
|
-
form.data
|
|
1769
|
-
form.data
|
|
1770
|
-
form.errors
|
|
1420
|
+
form.data.additionalInformation?.registrationNumberType,
|
|
1421
|
+
form.data.basicInformation,
|
|
1422
|
+
form.errors.basicInformation,
|
|
1771
1423
|
form.obscuredFields?.basicInformation,
|
|
1772
1424
|
form.optionalFields?.basicInformation,
|
|
1773
1425
|
form.requiredFields?.basicInformation,
|
|
1774
1426
|
form.trustedFields?.basicInformation,
|
|
1775
|
-
form.valid
|
|
1427
|
+
form.valid.basicInformation,
|
|
1776
1428
|
handleChangeFor,
|
|
1777
1429
|
isExperimentEnabled,
|
|
1778
1430
|
state,
|
|
@@ -1797,9 +1449,10 @@ function BasicInformation({
|
|
|
1797
1449
|
fieldProblems: form.fieldProblems.basicInformation ?? {},
|
|
1798
1450
|
country,
|
|
1799
1451
|
formUtils,
|
|
1800
|
-
handleChange: handleChangeFor
|
|
1452
|
+
handleChange: handleChangeFor,
|
|
1453
|
+
t: businessT
|
|
1801
1454
|
});
|
|
1802
|
-
return /* @__PURE__ */ jsxs("form", { id, className: styles$
|
|
1455
|
+
return /* @__PURE__ */ jsxs("form", { id, className: styles$3.basicInformation, children: [
|
|
1803
1456
|
/* @__PURE__ */ jsx(Header, { title: t(($) => $["basicInformationFormHeading"], { ns: "business" }), children: /* @__PURE__ */ jsx(
|
|
1804
1457
|
FormDescription,
|
|
1805
1458
|
{
|
|
@@ -1820,10 +1473,10 @@ function BasicInformation({
|
|
|
1820
1473
|
/* @__PURE__ */ jsx("fieldset", { children: /* @__PURE__ */ jsx(
|
|
1821
1474
|
CountryField,
|
|
1822
1475
|
{
|
|
1823
|
-
data: formUtils.getFieldData(form.data
|
|
1824
|
-
valid: formUtils.getFieldValid(form.valid
|
|
1476
|
+
data: formUtils.getFieldData(form.data.basicInformation ?? {}, COUNTRY_FIELD),
|
|
1477
|
+
valid: formUtils.getFieldValid(form.valid.basicInformation ?? {}, COUNTRY_FIELD),
|
|
1825
1478
|
errors: formUtils.getFieldErrors(
|
|
1826
|
-
form.errors
|
|
1479
|
+
form.errors.basicInformation ?? {},
|
|
1827
1480
|
validationErrors,
|
|
1828
1481
|
COUNTRY_FIELD
|
|
1829
1482
|
),
|
|
@@ -1840,16 +1493,16 @@ function BasicInformation({
|
|
|
1840
1493
|
CountryOfGoverningLawField,
|
|
1841
1494
|
{
|
|
1842
1495
|
data: formUtils.getFieldData(
|
|
1843
|
-
form.data
|
|
1496
|
+
form.data.basicInformation ?? {},
|
|
1844
1497
|
COUNTRY_OF_GOVERNING_LAW_FIELD
|
|
1845
1498
|
),
|
|
1846
1499
|
country,
|
|
1847
1500
|
valid: formUtils.getFieldValid(
|
|
1848
|
-
form.valid
|
|
1501
|
+
form.valid.basicInformation ?? {},
|
|
1849
1502
|
COUNTRY_OF_GOVERNING_LAW_FIELD
|
|
1850
1503
|
),
|
|
1851
1504
|
errors: formUtils.getFieldErrors(
|
|
1852
|
-
form.errors
|
|
1505
|
+
form.errors.basicInformation ?? {},
|
|
1853
1506
|
validationErrors,
|
|
1854
1507
|
COUNTRY_OF_GOVERNING_LAW_FIELD
|
|
1855
1508
|
),
|
|
@@ -1891,13 +1544,13 @@ function BasicInformation({
|
|
|
1891
1544
|
showField(TAX_INFORMATION_FIELD) && /* @__PURE__ */ jsx(
|
|
1892
1545
|
TaxInformationField,
|
|
1893
1546
|
{
|
|
1894
|
-
data: formUtils.getFieldData(form.data
|
|
1547
|
+
data: formUtils.getFieldData(form.data.basicInformation ?? {}, TAX_INFORMATION_FIELD),
|
|
1895
1548
|
valid: formUtils.getFieldValid(
|
|
1896
|
-
form.valid
|
|
1549
|
+
form.valid.basicInformation ?? {},
|
|
1897
1550
|
TAX_INFORMATION_FIELD
|
|
1898
1551
|
),
|
|
1899
1552
|
errors: formUtils.getFieldErrors(
|
|
1900
|
-
form.errors
|
|
1553
|
+
form.errors.basicInformation ?? {},
|
|
1901
1554
|
validationErrors,
|
|
1902
1555
|
TAX_INFORMATION_FIELD
|
|
1903
1556
|
),
|
|
@@ -1920,10 +1573,10 @@ function BasicInformation({
|
|
|
1920
1573
|
showField(STATE_FIELD) && /* @__PURE__ */ jsx(
|
|
1921
1574
|
StateField,
|
|
1922
1575
|
{
|
|
1923
|
-
data: formUtils.getFieldData(form.data
|
|
1924
|
-
valid: formUtils.getFieldValid(form.valid
|
|
1576
|
+
data: formUtils.getFieldData(form.data.basicInformation ?? {}, STATE_FIELD),
|
|
1577
|
+
valid: formUtils.getFieldValid(form.valid.basicInformation ?? {}, STATE_FIELD),
|
|
1925
1578
|
errors: formUtils.getFieldErrors(
|
|
1926
|
-
form.errors
|
|
1579
|
+
form.errors.basicInformation ?? {},
|
|
1927
1580
|
validationErrors,
|
|
1928
1581
|
STATE_FIELD
|
|
1929
1582
|
),
|
|
@@ -1938,15 +1591,15 @@ function BasicInformation({
|
|
|
1938
1591
|
BusinessRegistrationNumberField,
|
|
1939
1592
|
{
|
|
1940
1593
|
data: formUtils.getFieldData(
|
|
1941
|
-
form.data
|
|
1594
|
+
form.data.basicInformation ?? {},
|
|
1942
1595
|
BUSINESS_REGISTRATION_NUMBER_FIELD
|
|
1943
1596
|
),
|
|
1944
1597
|
valid: formUtils.getFieldValid(
|
|
1945
|
-
form.valid
|
|
1598
|
+
form.valid.basicInformation ?? {},
|
|
1946
1599
|
BUSINESS_REGISTRATION_NUMBER_FIELD
|
|
1947
1600
|
),
|
|
1948
1601
|
errors: formUtils.getFieldErrors(
|
|
1949
|
-
form.errors
|
|
1602
|
+
form.errors.basicInformation ?? {},
|
|
1950
1603
|
validationErrors,
|
|
1951
1604
|
BUSINESS_REGISTRATION_NUMBER_FIELD
|
|
1952
1605
|
),
|
|
@@ -1956,7 +1609,7 @@ function BasicInformation({
|
|
|
1956
1609
|
mask: formUtils.getMask("registrationNumber"),
|
|
1957
1610
|
guidanceText: formUtils.getFieldGuidanceText(BUSINESS_REGISTRATION_NUMBER_FIELD),
|
|
1958
1611
|
placeholders: formUtils.getFieldPlaceholders(BUSINESS_REGISTRATION_NUMBER_FIELD),
|
|
1959
|
-
helperText:
|
|
1612
|
+
helperText: getRegistrationNumberHelperText(businessT, { country, companyType }),
|
|
1960
1613
|
readonly: formUtils.isReadOnly("registrationNumber"),
|
|
1961
1614
|
optional: formUtils.isOptionalField("registrationNumber"),
|
|
1962
1615
|
shouldValidate,
|
|
@@ -2162,12 +1815,12 @@ const applyVerifiedBusinessData = (form, country, verifiedData) => {
|
|
|
2162
1815
|
"entityType",
|
|
2163
1816
|
"companyStructure"
|
|
2164
1817
|
)(mapOrganizationTypeToCompanyType(verifiedData.organizationType));
|
|
2165
|
-
const isVerifiedAddressNotRegistrationAddress = verifiedData.isPrincipalAddress || verifiedData.state && form.data
|
|
1818
|
+
const isVerifiedAddressNotRegistrationAddress = verifiedData.isPrincipalAddress || verifiedData.state && form.data.basicInformation?.stateOrProvince !== verifiedData.state;
|
|
2166
1819
|
const verifiedAddress = isVerifiedAddressNotRegistrationAddress ? { operationalAddress: { ...mapAddressData(verifiedData), country } } : {
|
|
2167
1820
|
registrationAddress: {
|
|
2168
1821
|
...mapAddressData(verifiedData),
|
|
2169
1822
|
country,
|
|
2170
|
-
stateOrProvince: form.data
|
|
1823
|
+
stateOrProvince: form.data.basicInformation?.stateOrProvince
|
|
2171
1824
|
}
|
|
2172
1825
|
};
|
|
2173
1826
|
if (isVerifiedAddressNotRegistrationAddress) {
|
|
@@ -2228,10 +1881,7 @@ function BusinessInformation({ fetching, selectedBusiness }) {
|
|
|
2228
1881
|
if (fetching) {
|
|
2229
1882
|
return /* @__PURE__ */ jsx(Loader, { size: "large" });
|
|
2230
1883
|
}
|
|
2231
|
-
|
|
2232
|
-
return /* @__PURE__ */ jsx(StructuredList, { items });
|
|
2233
|
-
}
|
|
2234
|
-
return null;
|
|
1884
|
+
return /* @__PURE__ */ jsx(StructuredList, { items });
|
|
2235
1885
|
}
|
|
2236
1886
|
function BusinessInformationCard({
|
|
2237
1887
|
result,
|
|
@@ -2337,7 +1987,7 @@ function BusinessInformationCard({
|
|
|
2337
1987
|
] }) });
|
|
2338
1988
|
}
|
|
2339
1989
|
const businessSelectionFooter = "adyen-kyc-business-selection-footer";
|
|
2340
|
-
const styles = {
|
|
1990
|
+
const styles$2 = {
|
|
2341
1991
|
businessSelectionFooter
|
|
2342
1992
|
};
|
|
2343
1993
|
const BUSINESS_SELECTION_FIELDS = [
|
|
@@ -2358,11 +2008,12 @@ function BusinessSelection({
|
|
|
2358
2008
|
const userEvents = useAnalyticsContext();
|
|
2359
2009
|
const [selectedBusinessId, setSelectedBusinessId] = useState();
|
|
2360
2010
|
const [fetchParams, setFetchParams] = useState();
|
|
2011
|
+
usePageLandedEvent();
|
|
2361
2012
|
const { data: companySearchResponse, isLoading: searching } = useCompanySearch({
|
|
2362
|
-
name: form.data
|
|
2013
|
+
name: form.data.basicInformation?.legalCompanyName ?? "",
|
|
2363
2014
|
country,
|
|
2364
|
-
state: form.data
|
|
2365
|
-
registrationNumber: form.data
|
|
2015
|
+
state: form.data.basicInformation?.stateOrProvince,
|
|
2016
|
+
registrationNumber: form.data.basicInformation?.registrationNumber
|
|
2366
2017
|
});
|
|
2367
2018
|
const {
|
|
2368
2019
|
data: businessData,
|
|
@@ -2397,7 +2048,7 @@ function BusinessSelection({
|
|
|
2397
2048
|
(fieldName, mode) => form.handleChangeFor(fieldName, "businessSelection", mode),
|
|
2398
2049
|
[form]
|
|
2399
2050
|
);
|
|
2400
|
-
const handleSelectBusiness =
|
|
2051
|
+
const handleSelectBusiness = (result) => {
|
|
2401
2052
|
if ((!selectedBusinessId || selectedBusinessId !== result.id) && currentTin) {
|
|
2402
2053
|
userEvents.addPageEvent("Clicked button", {
|
|
2403
2054
|
actionType: "select",
|
|
@@ -2417,7 +2068,7 @@ function BusinessSelection({
|
|
|
2417
2068
|
});
|
|
2418
2069
|
}
|
|
2419
2070
|
};
|
|
2420
|
-
const handleConfirmSelection =
|
|
2071
|
+
const handleConfirmSelection = () => {
|
|
2421
2072
|
verifiedBusiness.value = businessData;
|
|
2422
2073
|
applyVerifiedBusinessData(form, country, businessData);
|
|
2423
2074
|
handleChange("hasSelectedBusiness", "blur")(true);
|
|
@@ -2461,26 +2112,26 @@ function BusinessSelection({
|
|
|
2461
2112
|
const formUtils = useMemo(() => {
|
|
2462
2113
|
return createFormUtils(
|
|
2463
2114
|
{
|
|
2464
|
-
data: form.data
|
|
2115
|
+
data: form.data.businessSelection ?? {},
|
|
2465
2116
|
allFields: form.allFields?.businessSelection ?? [],
|
|
2466
2117
|
requiredFields: form.requiredFields?.businessSelection ?? [],
|
|
2467
2118
|
optionalFields: form.optionalFields?.businessSelection ?? [],
|
|
2468
2119
|
trustedFields: form.trustedFields?.businessSelection ?? [],
|
|
2469
2120
|
obscuredFields: form.obscuredFields?.businessSelection ?? [],
|
|
2470
|
-
errors: form.errors
|
|
2471
|
-
valid: form.valid
|
|
2121
|
+
errors: form.errors.businessSelection ?? {},
|
|
2122
|
+
valid: form.valid.businessSelection ?? {}
|
|
2472
2123
|
},
|
|
2473
2124
|
t
|
|
2474
2125
|
);
|
|
2475
2126
|
}, [
|
|
2476
2127
|
form.allFields?.businessSelection,
|
|
2477
|
-
form.data
|
|
2478
|
-
form.errors
|
|
2128
|
+
form.data.businessSelection,
|
|
2129
|
+
form.errors.businessSelection,
|
|
2479
2130
|
form.obscuredFields?.businessSelection,
|
|
2480
2131
|
form.optionalFields?.businessSelection,
|
|
2481
2132
|
form.requiredFields?.businessSelection,
|
|
2482
2133
|
form.trustedFields?.businessSelection,
|
|
2483
|
-
form.valid
|
|
2134
|
+
form.valid.businessSelection,
|
|
2484
2135
|
t,
|
|
2485
2136
|
validationErrors,
|
|
2486
2137
|
verificationErrors
|
|
@@ -2496,7 +2147,7 @@ function BusinessSelection({
|
|
|
2496
2147
|
formUtils
|
|
2497
2148
|
}
|
|
2498
2149
|
),
|
|
2499
|
-
/* @__PURE__ */ jsx(StackLayout, { children: companySearchResponse?.results
|
|
2150
|
+
/* @__PURE__ */ jsx(StackLayout, { children: companySearchResponse?.results.map((result) => /* @__PURE__ */ jsx(
|
|
2500
2151
|
BusinessInformationCard,
|
|
2501
2152
|
{
|
|
2502
2153
|
result,
|
|
@@ -2512,7 +2163,7 @@ function BusinessSelection({
|
|
|
2512
2163
|
},
|
|
2513
2164
|
result.id
|
|
2514
2165
|
)) }),
|
|
2515
|
-
/* @__PURE__ */ jsxs(Typography, { el: "span", color: "secondary", className: styles.businessSelectionFooter, children: [
|
|
2166
|
+
/* @__PURE__ */ jsxs(Typography, { el: "span", color: "secondary", className: styles$2.businessSelectionFooter, children: [
|
|
2516
2167
|
t(($) => $["businessSelection__footer"], { ns: "business" }),
|
|
2517
2168
|
/* @__PURE__ */ jsx(Button, { variant: "link", onClick: proceedToManualDataEntry, testId: "manualDataEntry", children: t(($) => $["businessSelection__footerButton"], { ns: "business" }) })
|
|
2518
2169
|
] })
|
|
@@ -2580,6 +2231,7 @@ function CompanyStructure({
|
|
|
2580
2231
|
const { accountHolder } = useAccountHolder();
|
|
2581
2232
|
const { isSettingEnabled } = useSettingsContext();
|
|
2582
2233
|
const canChangeEntityType = isSettingEnabled(SettingNames.AllowLegalEntityTypeChange);
|
|
2234
|
+
usePageLandedEvent();
|
|
2583
2235
|
const formUtils = createFormUtils(
|
|
2584
2236
|
{ requiredFields: form.requiredFields?.companyStructure ?? [] },
|
|
2585
2237
|
t
|
|
@@ -2588,70 +2240,411 @@ function CompanyStructure({
|
|
|
2588
2240
|
CompanyTypesValues.INCORPORATED_PARTNERSHIP,
|
|
2589
2241
|
CompanyTypesValues.INCORPORATED_ASSOCIATION
|
|
2590
2242
|
];
|
|
2591
|
-
if (isBankAccountRequestedForOrganization.value) {
|
|
2592
|
-
excludedTypes.push(CompanyTypesValues.GOVERNMENTAL_ORGANIZATION);
|
|
2593
|
-
}
|
|
2594
|
-
const companyTypeRadioOptions = canChangeEntityType && accountHolder !== "aTrust" && accountHolder !== "anUnincorporatedPartnership" ? companyTypeOptions.filter((companyType) => !excludedTypes.includes(companyType)) : companyTypeOptions;
|
|
2595
|
-
const companyTypeExamples2 = useCompanyTypeExamples(country);
|
|
2596
|
-
const companyTiles = companyTypeRadioOptions.map((option) => {
|
|
2597
|
-
const description = t(($) => $[companyTypeMetadata[option].description], {
|
|
2598
|
-
ns: "business"
|
|
2599
|
-
});
|
|
2600
|
-
const examples = companyTypeExamples2?.[option];
|
|
2601
|
-
const subTitle = examples ? `${description} ${t(($) => $["forExample_"], {
|
|
2602
|
-
examples: examples.join(", "),
|
|
2603
|
-
interpolation: { escapeValue: false },
|
|
2604
|
-
ns: "ui"
|
|
2605
|
-
})}` : description;
|
|
2606
|
-
return {
|
|
2607
|
-
value: option,
|
|
2608
|
-
label: t(($) => $[companyTypeMetadata[option].name], { ns: "business" }),
|
|
2609
|
-
subTitle
|
|
2610
|
-
};
|
|
2243
|
+
if (isBankAccountRequestedForOrganization.value) {
|
|
2244
|
+
excludedTypes.push(CompanyTypesValues.GOVERNMENTAL_ORGANIZATION);
|
|
2245
|
+
}
|
|
2246
|
+
const companyTypeRadioOptions = canChangeEntityType && accountHolder !== "aTrust" && accountHolder !== "anUnincorporatedPartnership" ? companyTypeOptions.filter((companyType) => !excludedTypes.includes(companyType)) : companyTypeOptions;
|
|
2247
|
+
const companyTypeExamples2 = useCompanyTypeExamples(country);
|
|
2248
|
+
const companyTiles = companyTypeRadioOptions.map((option) => {
|
|
2249
|
+
const description = t(($) => $[companyTypeMetadata[option].description], {
|
|
2250
|
+
ns: "business"
|
|
2251
|
+
});
|
|
2252
|
+
const examples = companyTypeExamples2?.[option];
|
|
2253
|
+
const subTitle = examples ? `${description} ${t(($) => $["forExample_"], {
|
|
2254
|
+
examples: examples.join(", "),
|
|
2255
|
+
interpolation: { escapeValue: false },
|
|
2256
|
+
ns: "ui"
|
|
2257
|
+
})}` : description;
|
|
2258
|
+
return {
|
|
2259
|
+
value: option,
|
|
2260
|
+
label: t(($) => $[companyTypeMetadata[option].name], { ns: "business" }),
|
|
2261
|
+
subTitle
|
|
2262
|
+
};
|
|
2263
|
+
});
|
|
2264
|
+
return /* @__PURE__ */ jsxs("form", { id, className: "adyen-kyc-company-structure", children: [
|
|
2265
|
+
/* @__PURE__ */ jsx(
|
|
2266
|
+
Header,
|
|
2267
|
+
{
|
|
2268
|
+
title: t(($) => $["companyStructureFormHeading"], { ns: "business" }),
|
|
2269
|
+
description: t(($) => $["companyStructureFormDescription"], { ns: "business" })
|
|
2270
|
+
}
|
|
2271
|
+
),
|
|
2272
|
+
/* @__PURE__ */ jsx(
|
|
2273
|
+
ErrorPanel,
|
|
2274
|
+
{
|
|
2275
|
+
id: "ariaErrorField",
|
|
2276
|
+
verificationErrors,
|
|
2277
|
+
validationErrors,
|
|
2278
|
+
formUtils
|
|
2279
|
+
}
|
|
2280
|
+
),
|
|
2281
|
+
/* @__PURE__ */ jsx(
|
|
2282
|
+
Field,
|
|
2283
|
+
{
|
|
2284
|
+
el: "fieldset",
|
|
2285
|
+
name: "entityType",
|
|
2286
|
+
errorMessage: formUtils.getErrorMessage(
|
|
2287
|
+
"entityType",
|
|
2288
|
+
form.errors.companyStructure,
|
|
2289
|
+
validationErrors
|
|
2290
|
+
),
|
|
2291
|
+
isValid: form.valid.companyStructure?.entityType,
|
|
2292
|
+
children: (childProps) => /* @__PURE__ */ jsx(
|
|
2293
|
+
TileGroup,
|
|
2294
|
+
{
|
|
2295
|
+
...childProps,
|
|
2296
|
+
name: "entityType",
|
|
2297
|
+
tiles: companyTiles,
|
|
2298
|
+
selected: form.data.companyStructure?.entityType ?? "",
|
|
2299
|
+
onChange: (value) => form.handleChangeFor("entityType", "companyStructure")(value),
|
|
2300
|
+
isHorizontal: true,
|
|
2301
|
+
"aria-required": true,
|
|
2302
|
+
"aria-invalid": !form.valid.companyStructure?.entityType
|
|
2303
|
+
}
|
|
2304
|
+
)
|
|
2305
|
+
}
|
|
2306
|
+
)
|
|
2307
|
+
] });
|
|
2308
|
+
}
|
|
2309
|
+
const FINANCIAL_REPORTING_DATE_FIELD = [
|
|
2310
|
+
"financialReportingDate"
|
|
2311
|
+
];
|
|
2312
|
+
function FinancialReportingDate({
|
|
2313
|
+
data,
|
|
2314
|
+
valid,
|
|
2315
|
+
errors,
|
|
2316
|
+
labels,
|
|
2317
|
+
readonly,
|
|
2318
|
+
handleChangeFor
|
|
2319
|
+
}) {
|
|
2320
|
+
const { t } = useTranslation("common");
|
|
2321
|
+
return /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
|
|
2322
|
+
Field,
|
|
2323
|
+
{
|
|
2324
|
+
name: "financialReportingDate",
|
|
2325
|
+
label: labels.financialReportingDate,
|
|
2326
|
+
helper: t(($) => $["dateOfTotalAssetsCalculation"]),
|
|
2327
|
+
helperPosition: "below",
|
|
2328
|
+
errorMessage: errors.financialReportingDate,
|
|
2329
|
+
isValid: valid.financialReportingDate,
|
|
2330
|
+
children: (childProps) => /* @__PURE__ */ jsx(
|
|
2331
|
+
InputDate,
|
|
2332
|
+
{
|
|
2333
|
+
...childProps,
|
|
2334
|
+
name: "financialReportingDate",
|
|
2335
|
+
value: data.financialReportingDate,
|
|
2336
|
+
onInput: handleChangeFor("financialReportingDate", "input"),
|
|
2337
|
+
onBlur: handleChangeFor("financialReportingDate", "blur"),
|
|
2338
|
+
"aria-required": true,
|
|
2339
|
+
"aria-invalid": !valid.financialReportingDate,
|
|
2340
|
+
readonly,
|
|
2341
|
+
max: formatDateObj(/* @__PURE__ */ new Date())
|
|
2342
|
+
}
|
|
2343
|
+
)
|
|
2344
|
+
}
|
|
2345
|
+
) });
|
|
2346
|
+
}
|
|
2347
|
+
const NUMBER_OF_EMPLOYEES_FIELD = [
|
|
2348
|
+
"numberOfEmployees"
|
|
2349
|
+
];
|
|
2350
|
+
function NumberOfEmployees({
|
|
2351
|
+
data,
|
|
2352
|
+
valid,
|
|
2353
|
+
errors,
|
|
2354
|
+
labels,
|
|
2355
|
+
readonly,
|
|
2356
|
+
handleChangeFor
|
|
2357
|
+
}) {
|
|
2358
|
+
return /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
|
|
2359
|
+
Field,
|
|
2360
|
+
{
|
|
2361
|
+
name: "numberOfEmployees",
|
|
2362
|
+
label: labels.numberOfEmployees,
|
|
2363
|
+
errorMessage: errors.numberOfEmployees,
|
|
2364
|
+
isValid: valid.numberOfEmployees,
|
|
2365
|
+
children: (childProps) => /* @__PURE__ */ jsx(
|
|
2366
|
+
InputNumber,
|
|
2367
|
+
{
|
|
2368
|
+
...childProps,
|
|
2369
|
+
"aria-required": true,
|
|
2370
|
+
"aria-invalid": !valid.numberOfEmployees,
|
|
2371
|
+
name: "numberOfEmployees",
|
|
2372
|
+
min: "1",
|
|
2373
|
+
step: "1",
|
|
2374
|
+
value: data.numberOfEmployees,
|
|
2375
|
+
readonly,
|
|
2376
|
+
onInput: handleChangeFor("numberOfEmployees", "input"),
|
|
2377
|
+
onBlur: handleChangeFor("numberOfEmployees", "blur")
|
|
2378
|
+
}
|
|
2379
|
+
)
|
|
2380
|
+
}
|
|
2381
|
+
) });
|
|
2382
|
+
}
|
|
2383
|
+
const financialInformationReportedValueOptions = "adyen-kyc-financial-information-reported-value-options";
|
|
2384
|
+
const styles$1 = {
|
|
2385
|
+
financialInformationReportedValueOptions
|
|
2386
|
+
};
|
|
2387
|
+
const reportedValue = "adyen-kyc-reported-value";
|
|
2388
|
+
const reportedValueInput = "adyen-kyc-reported-value-input";
|
|
2389
|
+
const styles = {
|
|
2390
|
+
reportedValue,
|
|
2391
|
+
reportedValueInput
|
|
2392
|
+
};
|
|
2393
|
+
const ReportedValue = ({
|
|
2394
|
+
currency,
|
|
2395
|
+
amount,
|
|
2396
|
+
onAmountChanged,
|
|
2397
|
+
label,
|
|
2398
|
+
helper,
|
|
2399
|
+
fieldName,
|
|
2400
|
+
errorMessage,
|
|
2401
|
+
isValid
|
|
2402
|
+
}) => {
|
|
2403
|
+
const { i18n } = useI18nContext();
|
|
2404
|
+
return /* @__PURE__ */ jsx("div", { className: styles.reportedValue, children: /* @__PURE__ */ jsx(Field, { name: fieldName, errorMessage, isValid, helper, children: (childProps) => /* @__PURE__ */ jsx(
|
|
2405
|
+
InputCurrency,
|
|
2406
|
+
{
|
|
2407
|
+
...childProps,
|
|
2408
|
+
locale: i18n.locale,
|
|
2409
|
+
currency,
|
|
2410
|
+
amount,
|
|
2411
|
+
onAmountChanged,
|
|
2412
|
+
className: styles.reportedValueInput,
|
|
2413
|
+
"aria-label": label
|
|
2414
|
+
}
|
|
2415
|
+
) }) });
|
|
2416
|
+
};
|
|
2417
|
+
const financialInfoValidationRules = {
|
|
2418
|
+
financialReportingDate: [
|
|
2419
|
+
{
|
|
2420
|
+
modes: ["blur"],
|
|
2421
|
+
validate: (date) => !isEmpty(date),
|
|
2422
|
+
errorMessage: "fieldIsRequired"
|
|
2423
|
+
},
|
|
2424
|
+
{
|
|
2425
|
+
modes: ["blur"],
|
|
2426
|
+
validate: (date) => date ? new Date(date) < /* @__PURE__ */ new Date() : false,
|
|
2427
|
+
errorMessage: "invalidFinancialReportingDate"
|
|
2428
|
+
}
|
|
2429
|
+
],
|
|
2430
|
+
currency: [
|
|
2431
|
+
{
|
|
2432
|
+
modes: ["blur"],
|
|
2433
|
+
validate: (currency) => !isEmpty(currency),
|
|
2434
|
+
errorMessage: "fieldIsRequired"
|
|
2435
|
+
}
|
|
2436
|
+
],
|
|
2437
|
+
reportedValueOption: {
|
|
2438
|
+
modes: ["blur"],
|
|
2439
|
+
validate: (option) => !isEmpty(option),
|
|
2440
|
+
errorMessage: "fieldIsRequired"
|
|
2441
|
+
},
|
|
2442
|
+
balanceSheetTotal: {
|
|
2443
|
+
modes: ["blur"],
|
|
2444
|
+
validate: (amount) => !isUndefinedOrNull(amount),
|
|
2445
|
+
errorMessage: "fieldIsRequired"
|
|
2446
|
+
},
|
|
2447
|
+
annualTurnover: {
|
|
2448
|
+
modes: ["blur"],
|
|
2449
|
+
validate: (amount) => !isUndefinedOrNull(amount),
|
|
2450
|
+
errorMessage: "fieldIsRequired"
|
|
2451
|
+
}
|
|
2452
|
+
};
|
|
2453
|
+
const financialInfoValidationEmployeesOnlyRules = {
|
|
2454
|
+
numberOfEmployees: [
|
|
2455
|
+
{
|
|
2456
|
+
modes: ["blur"],
|
|
2457
|
+
validate: (numberOfEmployees) => !isEmpty(numberOfEmployees),
|
|
2458
|
+
errorMessage: "fieldIsRequired"
|
|
2459
|
+
},
|
|
2460
|
+
{
|
|
2461
|
+
modes: ["blur"],
|
|
2462
|
+
validate: (numberOfEmployees) => Number.isInteger(Number(numberOfEmployees)) && Number(numberOfEmployees) > 0,
|
|
2463
|
+
errorMessage: "pleaseEnterAValidWholeNumber"
|
|
2464
|
+
}
|
|
2465
|
+
]
|
|
2466
|
+
};
|
|
2467
|
+
const financialInfoValidationWithEmployeesRules = {
|
|
2468
|
+
...financialInfoValidationRules,
|
|
2469
|
+
...financialInfoValidationEmployeesOnlyRules
|
|
2470
|
+
};
|
|
2471
|
+
const financialInformationFieldsForEu = [
|
|
2472
|
+
...FINANCIAL_REPORTING_DATE_FIELD,
|
|
2473
|
+
...CURRENCY_FIELD,
|
|
2474
|
+
"reportedValueOption"
|
|
2475
|
+
];
|
|
2476
|
+
const financialInformationFields = [
|
|
2477
|
+
...NUMBER_OF_EMPLOYEES_FIELD,
|
|
2478
|
+
...FINANCIAL_REPORTING_DATE_FIELD,
|
|
2479
|
+
...CURRENCY_FIELD,
|
|
2480
|
+
"reportedValueOption"
|
|
2481
|
+
];
|
|
2482
|
+
function FinancialInformation(props) {
|
|
2483
|
+
const { t } = useTranslation("common");
|
|
2484
|
+
usePageLandedEvent();
|
|
2485
|
+
const { id, country, data: financialInformationData, multiForm, fieldValidationErrors } = props;
|
|
2486
|
+
const defaultCurrency = currencyByCountry[country]?.[0] ?? "EUR";
|
|
2487
|
+
const formUtils = createFormUtils(props, t);
|
|
2488
|
+
const showReportingFields = formUtils.isRequiredField("financialReportingDate");
|
|
2489
|
+
const getSchema = (data2) => [
|
|
2490
|
+
...financialInformationFields,
|
|
2491
|
+
...data2.reportedValueOption ? [data2.reportedValueOption] : []
|
|
2492
|
+
];
|
|
2493
|
+
const getValidator = () => {
|
|
2494
|
+
if (!showReportingFields) {
|
|
2495
|
+
return financialInfoValidationEmployeesOnlyRules;
|
|
2496
|
+
}
|
|
2497
|
+
if (country === CountryCodes.UnitedKingdom) {
|
|
2498
|
+
return financialInfoValidationWithEmployeesRules;
|
|
2499
|
+
}
|
|
2500
|
+
return financialInfoValidationRules;
|
|
2501
|
+
};
|
|
2502
|
+
const { handleChangeFor, data, valid, errors, fieldProblems, schema } = useForm({
|
|
2503
|
+
...props,
|
|
2504
|
+
schema: getSchema,
|
|
2505
|
+
defaultData: financialInformationData,
|
|
2506
|
+
rules: getValidator(),
|
|
2507
|
+
fieldProblems: fieldValidationErrors
|
|
2611
2508
|
});
|
|
2612
|
-
|
|
2613
|
-
|
|
2614
|
-
|
|
2615
|
-
|
|
2616
|
-
|
|
2617
|
-
|
|
2618
|
-
|
|
2619
|
-
|
|
2620
|
-
|
|
2621
|
-
|
|
2622
|
-
|
|
2623
|
-
|
|
2624
|
-
|
|
2625
|
-
|
|
2626
|
-
|
|
2627
|
-
|
|
2628
|
-
|
|
2629
|
-
|
|
2630
|
-
|
|
2509
|
+
const { updateStateSlice } = useGlobalDataSlice(id);
|
|
2510
|
+
useEffect(() => {
|
|
2511
|
+
updateStateSlice({
|
|
2512
|
+
data,
|
|
2513
|
+
valid,
|
|
2514
|
+
errors,
|
|
2515
|
+
fieldProblems,
|
|
2516
|
+
schema
|
|
2517
|
+
});
|
|
2518
|
+
}, [data, valid, errors, fieldProblems, schema, updateStateSlice]);
|
|
2519
|
+
const handleChange = useCallback(
|
|
2520
|
+
(fieldName, mode) => multiForm ? multiForm.handleChangeFor(fieldName, "companyFinancialInformation", mode) : handleChangeFor(fieldName, mode),
|
|
2521
|
+
[handleChangeFor, multiForm]
|
|
2522
|
+
);
|
|
2523
|
+
const formData = multiForm ? multiForm.data?.companyFinancialInformation ?? {} : data;
|
|
2524
|
+
const formErrors = multiForm ? multiForm.errors?.companyFinancialInformation ?? {} : errors;
|
|
2525
|
+
const formValid = multiForm ? multiForm.valid?.companyFinancialInformation ?? {} : valid;
|
|
2526
|
+
const formFieldProblems = multiForm ? multiForm.fieldProblems.companyFinancialInformation ?? {} : fieldProblems;
|
|
2527
|
+
const updateReportedValueOption = (option) => {
|
|
2528
|
+
if (formData.reportedValueOption) {
|
|
2529
|
+
handleChange(formData.reportedValueOption)(null);
|
|
2530
|
+
}
|
|
2531
|
+
const newReportedValue = option;
|
|
2532
|
+
handleChange("reportedValueOption")(newReportedValue);
|
|
2533
|
+
};
|
|
2534
|
+
return /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-company-financial-information", children: [
|
|
2535
|
+
/* @__PURE__ */ jsx(Header, { title: t(($) => $["companyFinancialInformationFormHeading"], { ns: "business" }) }),
|
|
2536
|
+
country === CountryCodes.UnitedKingdom && /* @__PURE__ */ jsx(
|
|
2537
|
+
NumberOfEmployees,
|
|
2631
2538
|
{
|
|
2632
|
-
|
|
2633
|
-
|
|
2634
|
-
|
|
2635
|
-
|
|
2636
|
-
|
|
2637
|
-
validationErrors
|
|
2539
|
+
data: formUtils.getFieldData(formData, NUMBER_OF_EMPLOYEES_FIELD),
|
|
2540
|
+
errors: formUtils.getFieldErrors(
|
|
2541
|
+
formErrors,
|
|
2542
|
+
formFieldProblems,
|
|
2543
|
+
NUMBER_OF_EMPLOYEES_FIELD
|
|
2638
2544
|
),
|
|
2639
|
-
|
|
2640
|
-
|
|
2641
|
-
|
|
2642
|
-
|
|
2643
|
-
...childProps,
|
|
2644
|
-
name: "entityType",
|
|
2645
|
-
tiles: companyTiles,
|
|
2646
|
-
selected: form.data?.companyStructure?.entityType ?? "",
|
|
2647
|
-
onChange: (value) => form.handleChangeFor("entityType", "companyStructure")(value),
|
|
2648
|
-
isHorizontal: true,
|
|
2649
|
-
"aria-required": true,
|
|
2650
|
-
"aria-invalid": !form.valid?.companyStructure?.entityType
|
|
2651
|
-
}
|
|
2652
|
-
)
|
|
2545
|
+
handleChangeFor: handleChange,
|
|
2546
|
+
labels: formUtils.getFieldLabels(NUMBER_OF_EMPLOYEES_FIELD),
|
|
2547
|
+
readonly: formUtils.isReadOnly("numberOfEmployees"),
|
|
2548
|
+
valid: formUtils.getFieldValid(formValid, NUMBER_OF_EMPLOYEES_FIELD)
|
|
2653
2549
|
}
|
|
2654
|
-
)
|
|
2550
|
+
),
|
|
2551
|
+
showReportingFields && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2552
|
+
/* @__PURE__ */ jsx(
|
|
2553
|
+
FinancialReportingDate,
|
|
2554
|
+
{
|
|
2555
|
+
data: formUtils.getFieldData(formData, FINANCIAL_REPORTING_DATE_FIELD),
|
|
2556
|
+
errors: formUtils.getFieldErrors(
|
|
2557
|
+
formErrors,
|
|
2558
|
+
formFieldProblems,
|
|
2559
|
+
FINANCIAL_REPORTING_DATE_FIELD
|
|
2560
|
+
),
|
|
2561
|
+
handleChangeFor: handleChange,
|
|
2562
|
+
labels: formUtils.getFieldLabels(FINANCIAL_REPORTING_DATE_FIELD),
|
|
2563
|
+
readonly: formUtils.isReadOnly("financialReportingDate"),
|
|
2564
|
+
valid: formUtils.getFieldValid(formValid, FINANCIAL_REPORTING_DATE_FIELD)
|
|
2565
|
+
}
|
|
2566
|
+
),
|
|
2567
|
+
/* @__PURE__ */ jsx(
|
|
2568
|
+
Currency,
|
|
2569
|
+
{
|
|
2570
|
+
country,
|
|
2571
|
+
labels: { currency: t(($) => $["reportingCurrency"]) },
|
|
2572
|
+
data: formUtils.getFieldData(formData, CURRENCY_FIELD),
|
|
2573
|
+
errors: formUtils.getFieldErrors(formErrors, formFieldProblems, CURRENCY_FIELD),
|
|
2574
|
+
handleChangeFor: handleChange,
|
|
2575
|
+
readonly: formUtils.isReadOnly("currency"),
|
|
2576
|
+
valid: formUtils.getFieldValid(formValid, CURRENCY_FIELD)
|
|
2577
|
+
}
|
|
2578
|
+
),
|
|
2579
|
+
/* @__PURE__ */ jsx(
|
|
2580
|
+
Field,
|
|
2581
|
+
{
|
|
2582
|
+
el: "fieldset",
|
|
2583
|
+
name: "reportedValueOption",
|
|
2584
|
+
label: t(($) => $["reportedValue"]),
|
|
2585
|
+
errorMessage: formUtils.getErrorMessage(
|
|
2586
|
+
"reportedValueOption",
|
|
2587
|
+
formErrors,
|
|
2588
|
+
formFieldProblems
|
|
2589
|
+
),
|
|
2590
|
+
helper: t(($) => $["useFiguresFromTheMostRecentYearAvailable"]),
|
|
2591
|
+
isValid: formValid.reportedValueOption,
|
|
2592
|
+
children: (childProps) => /* @__PURE__ */ jsx(
|
|
2593
|
+
RadioGroup,
|
|
2594
|
+
{
|
|
2595
|
+
name: "reportedValueOption",
|
|
2596
|
+
...childProps,
|
|
2597
|
+
value: formData.reportedValueOption,
|
|
2598
|
+
items: [
|
|
2599
|
+
{
|
|
2600
|
+
id: "balanceSheetTotal",
|
|
2601
|
+
name: "balanceSheetTotal",
|
|
2602
|
+
content: /* @__PURE__ */ jsx(
|
|
2603
|
+
ReportedValue,
|
|
2604
|
+
{
|
|
2605
|
+
label: t(($) => $["balanceSheetTotal"]),
|
|
2606
|
+
currency: formData.currency ?? defaultCurrency,
|
|
2607
|
+
amount: formData.balanceSheetTotal,
|
|
2608
|
+
onAmountChanged: handleChange("balanceSheetTotal"),
|
|
2609
|
+
fieldName: "balanceSheetTotal",
|
|
2610
|
+
isValid: formValid.balanceSheetTotal,
|
|
2611
|
+
errorMessage: formUtils.getErrorMessage(
|
|
2612
|
+
"balanceSheetTotal",
|
|
2613
|
+
formErrors,
|
|
2614
|
+
formFieldProblems
|
|
2615
|
+
)
|
|
2616
|
+
}
|
|
2617
|
+
)
|
|
2618
|
+
},
|
|
2619
|
+
{
|
|
2620
|
+
id: "annualTurnover",
|
|
2621
|
+
name: "annualTurnover",
|
|
2622
|
+
content: /* @__PURE__ */ jsx(
|
|
2623
|
+
ReportedValue,
|
|
2624
|
+
{
|
|
2625
|
+
label: t(($) => $["annualTurnover"]),
|
|
2626
|
+
currency: formData.currency ?? defaultCurrency,
|
|
2627
|
+
amount: formData.annualTurnover,
|
|
2628
|
+
onAmountChanged: handleChange("annualTurnover"),
|
|
2629
|
+
fieldName: "annualTurnover",
|
|
2630
|
+
isValid: formValid.annualTurnover,
|
|
2631
|
+
errorMessage: formUtils.getErrorMessage(
|
|
2632
|
+
"annualTurnover",
|
|
2633
|
+
formErrors,
|
|
2634
|
+
formFieldProblems
|
|
2635
|
+
)
|
|
2636
|
+
}
|
|
2637
|
+
)
|
|
2638
|
+
}
|
|
2639
|
+
],
|
|
2640
|
+
onChange: updateReportedValueOption,
|
|
2641
|
+
showContentOnlyOnSelected: true,
|
|
2642
|
+
className: styles$1.financialInformationReportedValueOptions
|
|
2643
|
+
}
|
|
2644
|
+
)
|
|
2645
|
+
}
|
|
2646
|
+
)
|
|
2647
|
+
] })
|
|
2655
2648
|
] });
|
|
2656
2649
|
}
|
|
2657
2650
|
const FIELDS_NEEDED_FOR_COMPANY_SEARCH = [...STATE_FIELD, ...TAX_INFORMATION_FIELD, ...BUSINESS_REGISTRATION_NUMBER_FIELD];
|
|
@@ -2669,7 +2662,7 @@ const getFinancialInformationFields = (country) => {
|
|
|
2669
2662
|
const staticBusinessDetailsForms = {
|
|
2670
2663
|
businessSelection: {
|
|
2671
2664
|
formId: "businessSelection",
|
|
2672
|
-
formName: "
|
|
2665
|
+
formName: "businessSelectionFormName",
|
|
2673
2666
|
fields: BUSINESS_SELECTION_FIELDS
|
|
2674
2667
|
},
|
|
2675
2668
|
companyStructure: {
|
|
@@ -2689,22 +2682,22 @@ const staticBusinessDetailsForms = {
|
|
|
2689
2682
|
},
|
|
2690
2683
|
companyProofOfDirectorDocument: {
|
|
2691
2684
|
formId: "companyProofOfDirectorDocument",
|
|
2692
|
-
formName: "
|
|
2685
|
+
formName: "proofOfDirectorFormName",
|
|
2693
2686
|
fields: ["proofOfDirector"]
|
|
2694
2687
|
},
|
|
2695
2688
|
companyProofOfSignatoryDocument: {
|
|
2696
2689
|
formId: "companyProofOfSignatoryDocument",
|
|
2697
|
-
formName: "
|
|
2690
|
+
formName: "proofOfSignatoryFormName",
|
|
2698
2691
|
fields: ["proofOfSignatory"]
|
|
2699
2692
|
},
|
|
2700
2693
|
companyProofOfOwnershipDocument: {
|
|
2701
2694
|
formId: "companyProofOfOwnershipDocument",
|
|
2702
|
-
formName: "
|
|
2695
|
+
formName: "proofOfOwnershipFormName",
|
|
2703
2696
|
fields: ["proofOfOwnership"]
|
|
2704
2697
|
},
|
|
2705
2698
|
companyConstitutionalDocument: {
|
|
2706
2699
|
formId: "companyConstitutionalDocument",
|
|
2707
|
-
formName: "
|
|
2700
|
+
formName: "constitutionalDocumentFormName",
|
|
2708
2701
|
fields: ["constitutionalDocument"]
|
|
2709
2702
|
}
|
|
2710
2703
|
};
|
|
@@ -2809,6 +2802,7 @@ const GuidanceContent$4 = ({ t }) => {
|
|
|
2809
2802
|
function ProofOfDirectorDocument({ id, country, ...props }) {
|
|
2810
2803
|
const { t } = useTranslation(["common", "business"]);
|
|
2811
2804
|
const [selectedDocumentName, setSelectedDocumentName] = useState(documentTypes$2[0].id);
|
|
2805
|
+
usePageLandedEvent();
|
|
2812
2806
|
return /* @__PURE__ */ jsx(
|
|
2813
2807
|
MemoizedDocumentUpload,
|
|
2814
2808
|
{
|
|
@@ -2919,6 +2913,7 @@ function ProofOfOwnershipDocument({ id, country, ...props }) {
|
|
|
2919
2913
|
const { t } = useTranslation(["common", "business"]);
|
|
2920
2914
|
const [selectedDocumentName, setSelectedDocumentName] = useState(documentTypes$1[0].id);
|
|
2921
2915
|
const supportsMultiple = selectedDocumentName === DOC_TYPE_FOR_MULTI_UPLOAD;
|
|
2916
|
+
usePageLandedEvent();
|
|
2922
2917
|
useEffect(() => {
|
|
2923
2918
|
if (props.data?.proofOfOwnership?.length === 2) {
|
|
2924
2919
|
setSelectedDocumentName(DOC_TYPE_FOR_MULTI_UPLOAD);
|
|
@@ -2965,6 +2960,7 @@ const GuidanceContent$2 = ({ t }) => {
|
|
|
2965
2960
|
function ProofOfSignatoryDocument({ id, country, ...props }) {
|
|
2966
2961
|
const { t } = useTranslation(["common", "business"]);
|
|
2967
2962
|
const [selectedDocumentName, setSelectedDocumentName] = useState(documentTypes[0].id);
|
|
2963
|
+
usePageLandedEvent();
|
|
2968
2964
|
return /* @__PURE__ */ jsx(
|
|
2969
2965
|
MemoizedDocumentUpload,
|
|
2970
2966
|
{
|
|
@@ -3081,6 +3077,7 @@ function RegistrationDocument({
|
|
|
3081
3077
|
...props
|
|
3082
3078
|
}) {
|
|
3083
3079
|
const { t } = useTranslation(["common", "business"]);
|
|
3080
|
+
usePageLandedEvent();
|
|
3084
3081
|
return /* @__PURE__ */ jsx(
|
|
3085
3082
|
MemoizedDocumentUpload,
|
|
3086
3083
|
{
|
|
@@ -3178,6 +3175,7 @@ function TaxDocument({
|
|
|
3178
3175
|
...props
|
|
3179
3176
|
}) {
|
|
3180
3177
|
const { t } = useTranslation("business");
|
|
3178
|
+
usePageLandedEvent();
|
|
3181
3179
|
return /* @__PURE__ */ jsx(
|
|
3182
3180
|
MemoizedDocumentUpload,
|
|
3183
3181
|
{
|
|
@@ -3194,6 +3192,10 @@ function TaxDocument({
|
|
|
3194
3192
|
}
|
|
3195
3193
|
);
|
|
3196
3194
|
}
|
|
3195
|
+
const VatDocument = ({ children }) => {
|
|
3196
|
+
usePageLandedEvent();
|
|
3197
|
+
return children;
|
|
3198
|
+
};
|
|
3197
3199
|
function BusinessDetailsMultiform({
|
|
3198
3200
|
taskType,
|
|
3199
3201
|
country,
|
|
@@ -3283,7 +3285,7 @@ function BusinessDetailsMultiform({
|
|
|
3283
3285
|
trustedFields: form.trustedFields?.companyTaxDocument,
|
|
3284
3286
|
handleFieldChange: () => handleChange("companyTaxDocument", "taxDocument")
|
|
3285
3287
|
}
|
|
3286
|
-
) : /* @__PURE__ */ jsx(
|
|
3288
|
+
) : /* @__PURE__ */ jsx(VatDocument, { children: /* @__PURE__ */ jsx(
|
|
3287
3289
|
MemoizedDocumentUpload,
|
|
3288
3290
|
{
|
|
3289
3291
|
id: activeForm2.formId,
|
|
@@ -3317,7 +3319,7 @@ function BusinessDetailsMultiform({
|
|
|
3317
3319
|
] })
|
|
3318
3320
|
] })
|
|
3319
3321
|
}
|
|
3320
|
-
);
|
|
3322
|
+
) });
|
|
3321
3323
|
case "companyRegistrationDocument":
|
|
3322
3324
|
return /* @__PURE__ */ jsx(
|
|
3323
3325
|
RegistrationDocument,
|
|
@@ -3344,7 +3346,7 @@ function BusinessDetailsMultiform({
|
|
|
3344
3346
|
{
|
|
3345
3347
|
id: activeForm2.formId,
|
|
3346
3348
|
country,
|
|
3347
|
-
data: form.data
|
|
3349
|
+
data: form.data.companyProofOfDirectorDocument,
|
|
3348
3350
|
errors: form.errors.companyProofOfDirectorDocument,
|
|
3349
3351
|
valid: form.valid.companyProofOfDirectorDocument,
|
|
3350
3352
|
allFields: form.allFields?.companyProofOfDirectorDocument,
|
|
@@ -3363,7 +3365,7 @@ function BusinessDetailsMultiform({
|
|
|
3363
3365
|
{
|
|
3364
3366
|
id: activeForm2.formId,
|
|
3365
3367
|
country,
|
|
3366
|
-
data: form.data
|
|
3368
|
+
data: form.data.companyProofOfSignatoryDocument,
|
|
3367
3369
|
errors: form.errors.companyProofOfSignatoryDocument,
|
|
3368
3370
|
valid: form.valid.companyProofOfSignatoryDocument,
|
|
3369
3371
|
allFields: form.allFields?.companyProofOfSignatoryDocument,
|
|
@@ -3382,7 +3384,7 @@ function BusinessDetailsMultiform({
|
|
|
3382
3384
|
{
|
|
3383
3385
|
id: activeForm2.formId,
|
|
3384
3386
|
country,
|
|
3385
|
-
data: form.data
|
|
3387
|
+
data: form.data.companyProofOfOwnershipDocument,
|
|
3386
3388
|
errors: form.errors.companyProofOfOwnershipDocument,
|
|
3387
3389
|
valid: form.valid.companyProofOfOwnershipDocument,
|
|
3388
3390
|
allFields: form.allFields?.companyProofOfOwnershipDocument,
|
|
@@ -3402,7 +3404,7 @@ function BusinessDetailsMultiform({
|
|
|
3402
3404
|
id: activeForm2.formId,
|
|
3403
3405
|
legalEntityType: LegalEntityTypes.SOLE_PROPRIETORSHIP,
|
|
3404
3406
|
country,
|
|
3405
|
-
data: form.data
|
|
3407
|
+
data: form.data.companyConstitutionalDocument,
|
|
3406
3408
|
errors: form.errors.companyConstitutionalDocument,
|
|
3407
3409
|
valid: form.valid.companyConstitutionalDocument,
|
|
3408
3410
|
allFields: form.allFields?.companyConstitutionalDocument,
|
|
@@ -3422,7 +3424,7 @@ function BusinessDetailsMultiform({
|
|
|
3422
3424
|
multiForm: form,
|
|
3423
3425
|
id: activeForm2.formId,
|
|
3424
3426
|
country,
|
|
3425
|
-
data: form.data
|
|
3427
|
+
data: form.data.companyFinancialInformation,
|
|
3426
3428
|
allFields: form.allFields?.companyFinancialInformation,
|
|
3427
3429
|
requiredFields: form.requiredFields?.companyFinancialInformation,
|
|
3428
3430
|
optionalFields: form.optionalFields?.companyFinancialInformation,
|
|
@@ -3444,13 +3446,13 @@ const CompanyStructureValidation = {
|
|
|
3444
3446
|
}
|
|
3445
3447
|
};
|
|
3446
3448
|
const mapApiDocumentToBusinessDetailsDocuments = (entityId) => {
|
|
3447
|
-
const registrationDocument = getDocument(entityId, "registrationDocument")
|
|
3448
|
-
const taxDocument = getDocument(entityId, "vatDocument") ?? getDocument(entityId, "proofOfOrganizationTaxInfo")
|
|
3449
|
-
const proofOfDirector = getDocument(entityId, "proofOfDirector")
|
|
3450
|
-
const proofOfSignatory = getDocument(entityId, "proofOfSignatory")
|
|
3451
|
-
const proofOfOwnership = getDocuments(entityId, "proofOfOwnership")
|
|
3452
|
-
const constitutionalDocument = getDocument(entityId, "constitutionalDocument")
|
|
3453
|
-
const mergedProofOfOwnershipAttachments = proofOfOwnership
|
|
3449
|
+
const registrationDocument = getDocument(entityId, "registrationDocument");
|
|
3450
|
+
const taxDocument = getDocument(entityId, "vatDocument") ?? getDocument(entityId, "proofOfOrganizationTaxInfo");
|
|
3451
|
+
const proofOfDirector = getDocument(entityId, "proofOfDirector");
|
|
3452
|
+
const proofOfSignatory = getDocument(entityId, "proofOfSignatory");
|
|
3453
|
+
const proofOfOwnership = getDocuments(entityId, "proofOfOwnership");
|
|
3454
|
+
const constitutionalDocument = getDocument(entityId, "constitutionalDocument");
|
|
3455
|
+
const mergedProofOfOwnershipAttachments = proofOfOwnership.flatMap((doc) => doc.attachments);
|
|
3454
3456
|
return {
|
|
3455
3457
|
companyRegistrationDocument: registrationDocument ? { registrationDocument: [mapExistingFile(getPageName(registrationDocument))] } : void 0,
|
|
3456
3458
|
companyTaxDocument: taxDocument ? { taxDocument: [mapExistingFile(getPageName(taxDocument))] } : void 0,
|
|
@@ -3485,13 +3487,13 @@ const mapDbaName = (legalEntity) => {
|
|
|
3485
3487
|
dbaName.hasDoingBusinessAs = !entity.doingBusinessAsAbsent;
|
|
3486
3488
|
} else {
|
|
3487
3489
|
if (entity?.doingBusinessAs) {
|
|
3488
|
-
dbaName.hasDoingBusinessAs = entity
|
|
3490
|
+
dbaName.hasDoingBusinessAs = entity.doingBusinessAs !== (legalEntity.type === "organization" ? legalEntity.organization?.legalName : legalEntity.soleProprietorship?.name);
|
|
3489
3491
|
} else {
|
|
3490
3492
|
dbaName.hasDoingBusinessAs = void 0;
|
|
3491
3493
|
}
|
|
3492
3494
|
}
|
|
3493
3495
|
if (legalEntity.organization?.doingBusinessAs) {
|
|
3494
|
-
dbaName.doingBusinessAs = legalEntity.organization
|
|
3496
|
+
dbaName.doingBusinessAs = legalEntity.organization.doingBusinessAs;
|
|
3495
3497
|
}
|
|
3496
3498
|
return dbaName;
|
|
3497
3499
|
};
|
|
@@ -3520,8 +3522,8 @@ const mapAdditionalInformation = (data, legalEntity, taskType) => {
|
|
|
3520
3522
|
companyType
|
|
3521
3523
|
);
|
|
3522
3524
|
const vatNumberType = getDefaultVatNumberType(entity?.vatNumber, currentCountry);
|
|
3523
|
-
const operationalAddressIsSame = entity?.principalPlaceOfBusiness && !objectsDeepEqual(entity
|
|
3524
|
-
if (entity?.registeredAddress
|
|
3525
|
+
const operationalAddressIsSame = entity?.principalPlaceOfBusiness && !objectsDeepEqual(entity.principalPlaceOfBusiness, entity.registeredAddress) ? operationalAddressIsSameIds.OPERATIONAL_ADDRESS_IS_NOT_SAME : operationalAddressIsSameIds.OPERATIONAL_ADDRESS_IS_SAME;
|
|
3526
|
+
if (entity?.registeredAddress.localization) {
|
|
3525
3527
|
data.registrationAddress = {
|
|
3526
3528
|
...data.registrationAddress,
|
|
3527
3529
|
...mapAddressLocalizationToJpAddressSchema(entity.registeredAddress.localization)
|
|
@@ -3591,8 +3593,8 @@ const mapLegalEntityToBusinessDetailsSchema = ({
|
|
|
3591
3593
|
legalEntity,
|
|
3592
3594
|
solePropBusinessDetailsKeyMapping
|
|
3593
3595
|
);
|
|
3594
|
-
const country = solePropData
|
|
3595
|
-
if (legalEntity
|
|
3596
|
+
const country = solePropData.additionalInformation?.registrationAddress?.country ?? parentEntity?.individual?.residentialAddress.country;
|
|
3597
|
+
if (legalEntity.soleProprietorship?.financialReports) {
|
|
3596
3598
|
solePropData.companyFinancialInformation = mapFinancialReportsToFinancialInformation(
|
|
3597
3599
|
legalEntity.soleProprietorship.financialReports
|
|
3598
3600
|
);
|
|
@@ -3600,7 +3602,7 @@ const mapLegalEntityToBusinessDetailsSchema = ({
|
|
|
3600
3602
|
return {
|
|
3601
3603
|
...solePropData,
|
|
3602
3604
|
basicInformation: {
|
|
3603
|
-
...solePropData
|
|
3605
|
+
...solePropData.basicInformation,
|
|
3604
3606
|
country
|
|
3605
3607
|
},
|
|
3606
3608
|
companyConstitutionalDocument
|
|
@@ -3687,7 +3689,7 @@ const mapLegalEntityToBusinessDetailsSchema = ({
|
|
|
3687
3689
|
};
|
|
3688
3690
|
}
|
|
3689
3691
|
case "companyFinancialInformation": {
|
|
3690
|
-
const financialReports = legalEntity.type === "organization" ? legalEntity
|
|
3692
|
+
const financialReports = legalEntity.type === "organization" ? legalEntity.organization?.financialReports : legalEntity.soleProprietorship?.financialReports;
|
|
3691
3693
|
return financialReports?.length ? {
|
|
3692
3694
|
...componentData,
|
|
3693
3695
|
[key]: mapFinancialReportsToFinancialInformation(financialReports)
|
|
@@ -3915,7 +3917,7 @@ const mapBusinessDetailsSchemaToLegalEntity = (data, accountHolder, isExperiment
|
|
|
3915
3917
|
if (taxData) {
|
|
3916
3918
|
entityObject.taxInformation = taxData;
|
|
3917
3919
|
}
|
|
3918
|
-
if (!!requestObj.soleProprietorship &&
|
|
3920
|
+
if (!!requestObj.soleProprietorship && !!data.basicInformation?.country) {
|
|
3919
3921
|
requestObj.soleProprietorship.countryOfGoverningLaw = data.basicInformation.country;
|
|
3920
3922
|
}
|
|
3921
3923
|
if (registrationNumber) {
|
|
@@ -3924,18 +3926,18 @@ const mapBusinessDetailsSchemaToLegalEntity = (data, accountHolder, isExperiment
|
|
|
3924
3926
|
requestObj.organization.registrationNumberAbsent = false;
|
|
3925
3927
|
}
|
|
3926
3928
|
}
|
|
3927
|
-
if (requestObj.organization &&
|
|
3929
|
+
if (requestObj.organization && localization.length > 0) {
|
|
3928
3930
|
entityObject.localization = localization;
|
|
3929
3931
|
}
|
|
3930
3932
|
if (data.additionalInformation?.exemptedFromRegistrationNumber && canSaveRegNumberAbsentState && requestObj.organization) {
|
|
3931
|
-
requestObj.organization.registrationNumberAbsent = data.additionalInformation
|
|
3933
|
+
requestObj.organization.registrationNumberAbsent = data.additionalInformation.exemptedFromRegistrationNumber;
|
|
3932
3934
|
}
|
|
3933
3935
|
if (data.additionalInformation?.vatAbsenceReason) {
|
|
3934
3936
|
entityObject.vatNumber = "";
|
|
3935
3937
|
}
|
|
3936
3938
|
if (isExperimentEnabled("EnableDoingBusinessAsNameV4")) {
|
|
3937
3939
|
if (typeof data.additionalInformation?.hasDoingBusinessAs !== "undefined") {
|
|
3938
|
-
entityObject.doingBusinessAsAbsent = !data.additionalInformation
|
|
3940
|
+
entityObject.doingBusinessAsAbsent = !data.additionalInformation.hasDoingBusinessAs;
|
|
3939
3941
|
}
|
|
3940
3942
|
} else {
|
|
3941
3943
|
entityObject.doingBusinessAs = doingBusinessAs || data.basicInformation?.legalCompanyName;
|
|
@@ -3944,13 +3946,11 @@ const mapBusinessDetailsSchemaToLegalEntity = (data, accountHolder, isExperiment
|
|
|
3944
3946
|
if (data.additionalInformation?.operationalAddressIsSame === operationalAddressIsSameIds.OPERATIONAL_ADDRESS_IS_SAME && entityObject.principalPlaceOfBusiness) {
|
|
3945
3947
|
entityObject.principalPlaceOfBusiness = entityObject.registeredAddress;
|
|
3946
3948
|
}
|
|
3947
|
-
|
|
3948
|
-
|
|
3949
|
-
|
|
3950
|
-
|
|
3951
|
-
|
|
3952
|
-
entityObject.registeredAddress.localization = addressLocalizations;
|
|
3953
|
-
}
|
|
3949
|
+
const addressLocalizations = mapJpAddressSchemaToAddressLocalizations(
|
|
3950
|
+
data.additionalInformation?.registrationAddress
|
|
3951
|
+
);
|
|
3952
|
+
if (addressLocalizations.length > 0)
|
|
3953
|
+
entityObject.registeredAddress.localization = addressLocalizations;
|
|
3954
3954
|
if (!isEmpty$1(data.companyFinancialInformation)) {
|
|
3955
3955
|
const isIncorporationDateDependencyEnabled = isExperimentEnabled(
|
|
3956
3956
|
"EnableIncorporationDateBasedFinancialValidationForHO"
|
|
@@ -3958,7 +3958,7 @@ const mapBusinessDetailsSchemaToLegalEntity = (data, accountHolder, isExperiment
|
|
|
3958
3958
|
entityObject.financialReports = [
|
|
3959
3959
|
mapFinancialInformationToFinancialReport(
|
|
3960
3960
|
data.companyFinancialInformation,
|
|
3961
|
-
isIncorporationDateDependencyEnabled ? data
|
|
3961
|
+
isIncorporationDateDependencyEnabled ? data.additionalInformation?.dateOfIncorporation : void 0
|
|
3962
3962
|
)
|
|
3963
3963
|
];
|
|
3964
3964
|
}
|
|
@@ -3986,7 +3986,7 @@ function buildRequiredForms({
|
|
|
3986
3986
|
options
|
|
3987
3987
|
}) {
|
|
3988
3988
|
const skipCompanyStructure = !!verifiedBusiness.value?.legalForm || isSettingEnabled(SettingNames.AllowLegalEntityTypeChange) && organizationTypesToSkipCompanyStructureForm.includes(
|
|
3989
|
-
legalEntityResponse
|
|
3989
|
+
legalEntityResponse.organization?.type ?? ""
|
|
3990
3990
|
) && accountHolder !== "aTrust" && accountHolder !== "anUnincorporatedPartnership";
|
|
3991
3991
|
const filteredForms = Object.values(forms).filter(({ formId }) => {
|
|
3992
3992
|
if (formId === "businessSelection") {
|
|
@@ -4005,12 +4005,12 @@ function buildRequiredForms({
|
|
|
4005
4005
|
}
|
|
4006
4006
|
const isDocumentsRequired = (forms) => forms.some((form) => documentFormsIds.includes(form.formId));
|
|
4007
4007
|
const formatBasicInformation = (data, datasetUtils, companyType, isCountryOfGoverningLawEnabled) => {
|
|
4008
|
-
const country = data
|
|
4008
|
+
const country = data.country;
|
|
4009
4009
|
const registrationNumberLabel = resolveFieldMetadata(
|
|
4010
4010
|
registrationNumberDefaultFieldConfig[country],
|
|
4011
4011
|
{
|
|
4012
4012
|
companyType,
|
|
4013
|
-
registrationNumberType: data.registrationNumber ? inferCompanyRegistrationNumberType(data
|
|
4013
|
+
registrationNumberType: data.registrationNumber ? inferCompanyRegistrationNumberType(data.registrationNumber, country, companyType) : getCompanyRegistrationNumberOptions(country, companyType)?.[0]?.id
|
|
4014
4014
|
},
|
|
4015
4015
|
registrationNumberDefaultFieldMetadata
|
|
4016
4016
|
).label;
|
|
@@ -4041,7 +4041,7 @@ const formatAdditionalInformation = (data, country, companyType, t) => {
|
|
|
4041
4041
|
registrationNumberDefaultFieldConfig[country],
|
|
4042
4042
|
{
|
|
4043
4043
|
companyType,
|
|
4044
|
-
registrationNumberType: data.registrationNumber ? inferCompanyRegistrationNumberType(data
|
|
4044
|
+
registrationNumberType: data.registrationNumber ? inferCompanyRegistrationNumberType(data.registrationNumber, country, companyType) : getCompanyRegistrationNumberOptions(country, companyType)?.[0]?.id
|
|
4045
4045
|
},
|
|
4046
4046
|
registrationNumberDefaultFieldMetadata
|
|
4047
4047
|
).label;
|
|
@@ -4072,7 +4072,7 @@ const formatAdditionalInformation = (data, country, companyType, t) => {
|
|
|
4072
4072
|
const formatDataForSummary = (data, forms, t, language, isExperimentEnabled, version) => {
|
|
4073
4073
|
const datasetUtils = datasetUtilities(language);
|
|
4074
4074
|
return entriesOf(data).reduce((summaryData, [form]) => {
|
|
4075
|
-
if (!
|
|
4075
|
+
if (!data[form]) return summaryData;
|
|
4076
4076
|
const isCountryOfGoverningLawEnabled = isExperimentEnabled(
|
|
4077
4077
|
"EnableCountryOfGoverningLawForUKCompanies"
|
|
4078
4078
|
);
|
|
@@ -4121,7 +4121,7 @@ const formatDataForSummary = (data, forms, t, language, isExperimentEnabled, ver
|
|
|
4121
4121
|
[form]: {
|
|
4122
4122
|
companyRegistrationDocument: {
|
|
4123
4123
|
fileName: data[form].registrationDocument?.[0]?.name,
|
|
4124
|
-
description: data[form]
|
|
4124
|
+
description: data[form].description
|
|
4125
4125
|
}
|
|
4126
4126
|
}
|
|
4127
4127
|
};
|
|
@@ -4132,7 +4132,7 @@ const formatDataForSummary = (data, forms, t, language, isExperimentEnabled, ver
|
|
|
4132
4132
|
[form]: {
|
|
4133
4133
|
companyTaxDocument: {
|
|
4134
4134
|
fileName: data[form].taxDocument?.[0]?.name,
|
|
4135
|
-
description: data[form]
|
|
4135
|
+
description: data[form].description
|
|
4136
4136
|
}
|
|
4137
4137
|
}
|
|
4138
4138
|
};
|
|
@@ -4143,7 +4143,7 @@ const formatDataForSummary = (data, forms, t, language, isExperimentEnabled, ver
|
|
|
4143
4143
|
[form]: {
|
|
4144
4144
|
companyProofOfDirectorDocument: {
|
|
4145
4145
|
fileName: data[form].proofOfDirector?.[0]?.name,
|
|
4146
|
-
description: data[form]
|
|
4146
|
+
description: data[form].description
|
|
4147
4147
|
}
|
|
4148
4148
|
}
|
|
4149
4149
|
};
|
|
@@ -4154,7 +4154,7 @@ const formatDataForSummary = (data, forms, t, language, isExperimentEnabled, ver
|
|
|
4154
4154
|
[form]: {
|
|
4155
4155
|
companyProofOfSignatoryDocument: {
|
|
4156
4156
|
fileName: data[form].proofOfSignatory?.[0]?.name,
|
|
4157
|
-
description: data[form]
|
|
4157
|
+
description: data[form].description
|
|
4158
4158
|
}
|
|
4159
4159
|
}
|
|
4160
4160
|
};
|
|
@@ -4165,7 +4165,7 @@ const formatDataForSummary = (data, forms, t, language, isExperimentEnabled, ver
|
|
|
4165
4165
|
[form]: {
|
|
4166
4166
|
companyProofOfOwnershipDocument: {
|
|
4167
4167
|
fileName: data[form].proofOfOwnership?.map((doc) => doc.name).join("\n"),
|
|
4168
|
-
description: data[form]
|
|
4168
|
+
description: data[form].description
|
|
4169
4169
|
}
|
|
4170
4170
|
}
|
|
4171
4171
|
};
|
|
@@ -4178,8 +4178,8 @@ const formatDataForSummary = (data, forms, t, language, isExperimentEnabled, ver
|
|
|
4178
4178
|
[form]: formatFinancialInformationSummary(
|
|
4179
4179
|
data[form],
|
|
4180
4180
|
language,
|
|
4181
|
-
data
|
|
4182
|
-
isIncorporationDateDependencyEnabled ? data
|
|
4181
|
+
data.basicInformation?.country,
|
|
4182
|
+
isIncorporationDateDependencyEnabled ? data.additionalInformation?.dateOfIncorporation : void 0
|
|
4183
4183
|
)
|
|
4184
4184
|
};
|
|
4185
4185
|
}
|
|
@@ -4202,22 +4202,20 @@ async function submitDocuments({
|
|
|
4202
4202
|
const existingDoc = getDocument(legalEntity.id, doc.type);
|
|
4203
4203
|
if (doc.type === "proofOfOwnership" && existingDoc && doc.attachments?.length) {
|
|
4204
4204
|
doc.attachments = mergeProofOfOwnershipAttachments(
|
|
4205
|
-
existingDoc.attachments
|
|
4205
|
+
existingDoc.attachments,
|
|
4206
4206
|
doc.attachments
|
|
4207
4207
|
).filter((attachment) => attachment.pageName);
|
|
4208
4208
|
}
|
|
4209
4209
|
});
|
|
4210
4210
|
try {
|
|
4211
|
-
|
|
4212
|
-
|
|
4213
|
-
|
|
4214
|
-
|
|
4215
|
-
|
|
4216
|
-
|
|
4217
|
-
fileExtention: doc.attachments?.map((item) => getFileExtention(item.pageName)).filter((item) => item !== void 0) ?? []
|
|
4218
|
-
});
|
|
4211
|
+
await documentUtils.uploadDocuments(formattedDocument, legalEntity.id);
|
|
4212
|
+
formattedDocument.forEach((doc) => {
|
|
4213
|
+
userEvents.addTaskEvent("Success", {
|
|
4214
|
+
actionType: "upload",
|
|
4215
|
+
documentType: doc.type,
|
|
4216
|
+
fileExtention: doc.attachments?.map((item) => getFileExtention(item.pageName)).filter((item) => item !== void 0) ?? []
|
|
4219
4217
|
});
|
|
4220
|
-
}
|
|
4218
|
+
});
|
|
4221
4219
|
} catch (err) {
|
|
4222
4220
|
logger2.error(err);
|
|
4223
4221
|
userEvents.addTaskEvent("Encountered error", {
|
|
@@ -4291,7 +4289,7 @@ async function submit({
|
|
|
4291
4289
|
if (nestedLegalEntityDetails2 && associatedLegalArrangement2) {
|
|
4292
4290
|
const existingEntityAssociations = getOwnEntityAssociations(associatedLegalArrangement2);
|
|
4293
4291
|
const existingRoles = existingEntityAssociations.filter((ea) => ea.legalEntityId === associatedLegalArrangement2.id).map(({ type }) => type);
|
|
4294
|
-
const newRoles = nestedLegalEntityDetails2
|
|
4292
|
+
const newRoles = nestedLegalEntityDetails2.roles;
|
|
4295
4293
|
const rolesChanged = !doArraysMatch(existingRoles, newRoles);
|
|
4296
4294
|
if (rolesChanged) {
|
|
4297
4295
|
const updatedAssociations = {
|
|
@@ -4299,8 +4297,8 @@ async function submit({
|
|
|
4299
4297
|
...newRoles.map((role) => ({
|
|
4300
4298
|
type: role,
|
|
4301
4299
|
legalEntityId: legalEntity.id
|
|
4302
|
-
}))
|
|
4303
|
-
...existingEntityAssociations.filter((ea) => ea.legalEntityId !== legalEntity.id)
|
|
4300
|
+
})),
|
|
4301
|
+
...existingEntityAssociations.filter((ea) => ea.legalEntityId !== legalEntity.id)
|
|
4304
4302
|
]
|
|
4305
4303
|
};
|
|
4306
4304
|
await handleUpdateLegalEntity({
|
|
@@ -4321,13 +4319,13 @@ async function submit({
|
|
|
4321
4319
|
await handleUpdateLegalEntity({ ...updatedAssociations, id: legalEntityResponse.id });
|
|
4322
4320
|
}
|
|
4323
4321
|
};
|
|
4324
|
-
const savedLegalEntityData =
|
|
4322
|
+
const savedLegalEntityData = mapLegalEntityToBusinessDetailsSchema({
|
|
4325
4323
|
legalEntity: legalEntityResponse,
|
|
4326
4324
|
parentEntity: void 0,
|
|
4327
4325
|
taskType
|
|
4328
|
-
})
|
|
4329
|
-
const filteredData =
|
|
4330
|
-
if (filteredData
|
|
4326
|
+
});
|
|
4327
|
+
const filteredData = setRemovedFieldsOnSchemaToDeletedValue(data, savedLegalEntityData);
|
|
4328
|
+
if (filteredData.additionalInformation && !filteredData.additionalInformation.taxInformation) {
|
|
4331
4329
|
filteredData.additionalInformation.taxInformation = void 0;
|
|
4332
4330
|
}
|
|
4333
4331
|
const isCountryOfGoverningLawEnabled = isExperimentEnabled(
|
|
@@ -4335,9 +4333,9 @@ async function submit({
|
|
|
4335
4333
|
);
|
|
4336
4334
|
const countryOfGoverningLaw = getCountryOfGoverningLaw(
|
|
4337
4335
|
isCountryOfGoverningLawEnabled,
|
|
4338
|
-
filteredData
|
|
4336
|
+
filteredData.basicInformation
|
|
4339
4337
|
);
|
|
4340
|
-
if (filteredData
|
|
4338
|
+
if (filteredData.basicInformation) {
|
|
4341
4339
|
if (countryOfGoverningLaw) {
|
|
4342
4340
|
filteredData.basicInformation.countryOfGoverningLaw = countryOfGoverningLaw;
|
|
4343
4341
|
} else {
|
|
@@ -4403,9 +4401,9 @@ async function submit({
|
|
|
4403
4401
|
legalEntityName: trackingPayload.legalEntityName
|
|
4404
4402
|
};
|
|
4405
4403
|
if (!hadRejection) {
|
|
4406
|
-
userEvents
|
|
4404
|
+
userEvents.addTaskEvent("Success", eventPayload);
|
|
4407
4405
|
} else {
|
|
4408
|
-
userEvents
|
|
4406
|
+
userEvents.addTaskEvent("Encountered error", {
|
|
4409
4407
|
...eventPayload,
|
|
4410
4408
|
returnType: "businessLines",
|
|
4411
4409
|
returnValue: "couldNotCreateOrUpdateBusinessLine"
|
|
@@ -4452,7 +4450,7 @@ async function submit({
|
|
|
4452
4450
|
forms,
|
|
4453
4451
|
userEvents
|
|
4454
4452
|
});
|
|
4455
|
-
userEvents
|
|
4453
|
+
userEvents.addTaskEvent("Success", trackingPayload);
|
|
4456
4454
|
showToast({
|
|
4457
4455
|
label: t(($) => $["successfullyUpdatedDetails"], { ns: "common" }),
|
|
4458
4456
|
variant: "success"
|
|
@@ -4466,7 +4464,7 @@ async function submit({
|
|
|
4466
4464
|
label: t(($) => $["failedToUpdateDetails"], { ns: "common" }),
|
|
4467
4465
|
variant: "error"
|
|
4468
4466
|
});
|
|
4469
|
-
const unmappedErrorNames = err.invalidFields
|
|
4467
|
+
const unmappedErrorNames = err.invalidFields.map((field) => field.name).filter(Boolean);
|
|
4470
4468
|
if (unmappedErrorNames.length) {
|
|
4471
4469
|
trackingPayload = {
|
|
4472
4470
|
...trackingPayload,
|
|
@@ -4494,7 +4492,7 @@ async function submit({
|
|
|
4494
4492
|
});
|
|
4495
4493
|
}
|
|
4496
4494
|
logger2.error(err);
|
|
4497
|
-
userEvents
|
|
4495
|
+
userEvents.addTaskEvent("Encountered error", {
|
|
4498
4496
|
...trackingPayload,
|
|
4499
4497
|
returnType: err?.errorCode,
|
|
4500
4498
|
returnValue: err?.title || "backend"
|
|
@@ -4507,10 +4505,7 @@ const getCountryOfGoverningLaw = (isCountryOfGoverningLawEnabled, basicData) =>
|
|
|
4507
4505
|
if (!isCountryOfGoverningLawEnabled || basicData?.country !== CountryCodes.UnitedKingdom) {
|
|
4508
4506
|
return void 0;
|
|
4509
4507
|
}
|
|
4510
|
-
|
|
4511
|
-
return CountryCodes.UnitedKingdom;
|
|
4512
|
-
}
|
|
4513
|
-
return basicData?.countryOfGoverningLaw;
|
|
4508
|
+
return !basicData.countryOfGoverningLaw ? CountryCodes.UnitedKingdom : basicData.countryOfGoverningLaw;
|
|
4514
4509
|
};
|
|
4515
4510
|
const determineCustomerSupport = (customerSupport, country) => {
|
|
4516
4511
|
switch (country) {
|
|
@@ -4553,9 +4548,9 @@ function basicInformationValidators({
|
|
|
4553
4548
|
countryOfGoverningLaw: CountryOfGoverningLawFieldValidation().countryOfGoverningLaw,
|
|
4554
4549
|
legalCompanyName: resolveFieldMetadata(
|
|
4555
4550
|
isExperimentEnabled("StrictNameAndAddressValidationV4") ? defaultFieldConfigV4[country] : defaultFieldConfig$2[country],
|
|
4556
|
-
{
|
|
4551
|
+
{},
|
|
4557
4552
|
isExperimentEnabled("StrictNameAndAddressValidationV4") ? defaultFieldMetadataV4 : defaultFieldMetadata$2
|
|
4558
|
-
)
|
|
4553
|
+
).validators,
|
|
4559
4554
|
taxInformation: resolveFieldMetadata(
|
|
4560
4555
|
taxInformationDefaultFieldConfig[country],
|
|
4561
4556
|
{
|
|
@@ -4563,12 +4558,12 @@ function basicInformationValidators({
|
|
|
4563
4558
|
companyType
|
|
4564
4559
|
},
|
|
4565
4560
|
taxInformationDefaultFieldMetadata
|
|
4566
|
-
)
|
|
4561
|
+
).validators,
|
|
4567
4562
|
stateOrProvince: resolveFieldMetadata(
|
|
4568
4563
|
defaultFieldConfig[country],
|
|
4569
4564
|
{ isBusiness: true },
|
|
4570
4565
|
defaultFieldMetadata
|
|
4571
|
-
)
|
|
4566
|
+
).validators,
|
|
4572
4567
|
registrationNumber: resolveFieldMetadata(
|
|
4573
4568
|
registrationNumberDefaultFieldConfig[country],
|
|
4574
4569
|
{
|
|
@@ -4578,7 +4573,7 @@ function basicInformationValidators({
|
|
|
4578
4573
|
isExperimentEnabled
|
|
4579
4574
|
},
|
|
4580
4575
|
registrationNumberDefaultFieldMetadata
|
|
4581
|
-
)
|
|
4576
|
+
).validators
|
|
4582
4577
|
};
|
|
4583
4578
|
}
|
|
4584
4579
|
function businessSelectionValidators() {
|
|
@@ -4610,7 +4605,7 @@ function additionalInformationValidators({
|
|
|
4610
4605
|
isExperimentEnabled
|
|
4611
4606
|
},
|
|
4612
4607
|
registrationNumberDefaultFieldMetadata
|
|
4613
|
-
)
|
|
4608
|
+
).validators,
|
|
4614
4609
|
exemptedFromRegistrationNumber: exemptFromRegistrationNumberDefaultFieldMetadata.validators,
|
|
4615
4610
|
taxInformation: resolveFieldMetadata(
|
|
4616
4611
|
taxInformationDefaultFieldConfig[country],
|
|
@@ -4794,8 +4789,8 @@ function BusinessDetailsDropin({
|
|
|
4794
4789
|
const props = getPropsFromConfigurations({
|
|
4795
4790
|
scenarioConfiguration: fieldConfigurations,
|
|
4796
4791
|
forms: defaultForms,
|
|
4797
|
-
remediationActions: problems
|
|
4798
|
-
dataMissingErrors: problems
|
|
4792
|
+
remediationActions: problems.remediationActions ? Object.values(problems.remediationActions) : [],
|
|
4793
|
+
dataMissingErrors: problems.missingData ?? [],
|
|
4799
4794
|
fieldsWithExistingData: subjectEntity ? subjectEntity.type === LegalEntityTypes.SOLE_PROPRIETORSHIP ? getFieldsWithExistingData(
|
|
4800
4795
|
subjectEntity,
|
|
4801
4796
|
solePropBusinessDetailsApiKeyMapping,
|
|
@@ -4814,15 +4809,15 @@ function BusinessDetailsDropin({
|
|
|
4814
4809
|
customRules,
|
|
4815
4810
|
defaultForms,
|
|
4816
4811
|
subjectEntity,
|
|
4817
|
-
problems
|
|
4818
|
-
problems
|
|
4812
|
+
problems.missingData,
|
|
4813
|
+
problems.remediationActions,
|
|
4819
4814
|
trustedFields,
|
|
4820
4815
|
fieldConfigurations
|
|
4821
4816
|
]);
|
|
4822
4817
|
const [prevCountry, setPrevCountry] = useState(multiForm.data.basicInformation?.country);
|
|
4823
|
-
if (multiForm.data.basicInformation?.country && prevCountry !== multiForm.data.basicInformation
|
|
4824
|
-
setCountry(multiForm.data
|
|
4825
|
-
setPrevCountry(multiForm.data.basicInformation
|
|
4818
|
+
if (multiForm.data.basicInformation?.country && prevCountry !== multiForm.data.basicInformation.country) {
|
|
4819
|
+
setCountry(multiForm.data.basicInformation.country);
|
|
4820
|
+
setPrevCountry(multiForm.data.basicInformation.country);
|
|
4826
4821
|
setTrustedFields(void 0);
|
|
4827
4822
|
verifiedBusiness.value = void 0;
|
|
4828
4823
|
tinMatched.value = void 0;
|
|
@@ -4955,14 +4950,14 @@ function BusinessDetailsDropin({
|
|
|
4955
4950
|
tinMatched.value = false;
|
|
4956
4951
|
};
|
|
4957
4952
|
const companySearchQueryInput = {
|
|
4958
|
-
name: multiForm.data
|
|
4959
|
-
country: multiForm.data
|
|
4960
|
-
state: multiForm.data
|
|
4961
|
-
registrationNumber: multiForm.data
|
|
4953
|
+
name: multiForm.data.basicInformation?.legalCompanyName ?? "",
|
|
4954
|
+
country: multiForm.data.basicInformation?.country,
|
|
4955
|
+
state: multiForm.data.basicInformation?.stateOrProvince,
|
|
4956
|
+
registrationNumber: multiForm.data.basicInformation?.registrationNumber
|
|
4962
4957
|
};
|
|
4963
4958
|
const verifyTinQueryInput = {
|
|
4964
4959
|
name: multiForm.data.basicInformation?.legalCompanyName ?? "",
|
|
4965
|
-
tin: multiForm.data
|
|
4960
|
+
tin: multiForm.data.basicInformation?.taxInformation?.find((taxId) => taxId.country === country)?.number ?? ""
|
|
4966
4961
|
};
|
|
4967
4962
|
const {
|
|
4968
4963
|
data: companySearchResponse,
|
|
@@ -4977,7 +4972,7 @@ function BusinessDetailsDropin({
|
|
|
4977
4972
|
actionType: "submit",
|
|
4978
4973
|
returnValue: "companySearch",
|
|
4979
4974
|
additionalData: {
|
|
4980
|
-
numberOfResults: companySearchResponse
|
|
4975
|
+
numberOfResults: companySearchResponse.results.length
|
|
4981
4976
|
}
|
|
4982
4977
|
});
|
|
4983
4978
|
}
|
|
@@ -4985,8 +4980,8 @@ function BusinessDetailsDropin({
|
|
|
4985
4980
|
const companySelectionInput = {
|
|
4986
4981
|
company: companySearchResponse?.results[0],
|
|
4987
4982
|
state: multiForm.data.basicInformation?.stateOrProvince,
|
|
4988
|
-
name: multiForm.data
|
|
4989
|
-
tin: multiForm.data
|
|
4983
|
+
name: multiForm.data.basicInformation?.legalCompanyName ?? "",
|
|
4984
|
+
tin: multiForm.data.basicInformation?.taxInformation?.find((taxId) => taxId.country === country)?.number ?? ""
|
|
4990
4985
|
};
|
|
4991
4986
|
useVerifyTin(verifyTinQueryInput, { enabled: false });
|
|
4992
4987
|
const attemptBusinessSearch = async () => {
|
|
@@ -5020,19 +5015,19 @@ function BusinessDetailsDropin({
|
|
|
5020
5015
|
}
|
|
5021
5016
|
return tinMatched.value;
|
|
5022
5017
|
};
|
|
5023
|
-
if (searchResponse
|
|
5024
|
-
multiForm.data
|
|
5018
|
+
if (searchResponse.results.length === 1 && isNormalizedStringMatch(
|
|
5019
|
+
multiForm.data.basicInformation?.legalCompanyName ?? "",
|
|
5025
5020
|
searchResponse.results[0].name
|
|
5026
5021
|
)) {
|
|
5027
5022
|
const companySelectionResponse = await handleCompanySelection(
|
|
5028
|
-
rootLegalEntityId.
|
|
5029
|
-
baseUrl.
|
|
5023
|
+
rootLegalEntityId.peek(),
|
|
5024
|
+
baseUrl.peek(),
|
|
5030
5025
|
{ ...companySelectionInput, company: searchResponse.results[0] }
|
|
5031
5026
|
);
|
|
5032
5027
|
if (handleTinResponse(!!companySelectionResponse.tinMatched)) {
|
|
5033
5028
|
verifiedBusiness.value = companySelectionResponse;
|
|
5034
5029
|
isVerifiedSingleCompanySearchResult.value = true;
|
|
5035
|
-
applyVerifiedBusinessData(multiForm, country, verifiedBusiness.
|
|
5030
|
+
applyVerifiedBusinessData(multiForm, country, verifiedBusiness.peek());
|
|
5036
5031
|
currentForms = updateForms({ searchResults: searchResponse.results });
|
|
5037
5032
|
} else {
|
|
5038
5033
|
return setLoadingStatus("success");
|
|
@@ -5042,7 +5037,7 @@ function BusinessDetailsDropin({
|
|
|
5042
5037
|
const tinVerificationResponse = await queryClient.fetchQuery({
|
|
5043
5038
|
queryKey: ["verifyTin", verifyTinQueryInput]
|
|
5044
5039
|
});
|
|
5045
|
-
if (!handleTinResponse(!!tinVerificationResponse
|
|
5040
|
+
if (!handleTinResponse(!!tinVerificationResponse.matched)) {
|
|
5046
5041
|
return setLoadingStatus("success");
|
|
5047
5042
|
}
|
|
5048
5043
|
}
|
|
@@ -5176,7 +5171,7 @@ function useBusinessDetailsData(taskType, associatedLegalArrangement, nestedLega
|
|
|
5176
5171
|
subjectEntity?.documentDetails || [],
|
|
5177
5172
|
subjectEntity?.id || "",
|
|
5178
5173
|
{
|
|
5179
|
-
enabled: subjectEntity?.documentDetails && subjectEntity
|
|
5174
|
+
enabled: subjectEntity?.documentDetails && subjectEntity.documentDetails.length > 0
|
|
5180
5175
|
}
|
|
5181
5176
|
);
|
|
5182
5177
|
useEffect(() => {
|