@adyen/kyc-components 4.6.3 → 4.7.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-XaeVhsGD.js → AcceptTermsOfServiceComponent-CFuKCmzi.js} +17 -18
- package/dist/{AccountSetupRejected-CCTKPh4T.js → AccountSetupRejected-CJO8fFLr.js} +2 -2
- package/dist/{ActionBar-DIFvfiMP.js → ActionBar-DW4IMRZg.js} +1 -1
- package/dist/{Address-CVPObm6B.js → Address-Czpdu7Iv.js} +15 -15
- package/dist/{Avatar-Cf37hJy8.js → Avatar-CaZQ-oyL.js} +1 -1
- package/dist/{BusinessFinancingComponent-MO_80E8a.js → BusinessFinancingComponent-CvmqdPg-.js} +6 -6
- package/dist/{BusinessFinancingDropin-C6g7xB95.js → BusinessFinancingDropin-CA5D0PgR.js} +28 -30
- package/dist/BusinessFinancingPage-CcCpkh2o.js +43 -0
- package/dist/{BusinessTypeSelectionPage-q-ohll63.js → BusinessTypeSelectionPage-DxpkzhZp.js} +9 -11
- package/dist/{Checkbox-CZ-K3Ygt.js → Checkbox-BbVX_nZi.js} +1 -1
- package/dist/{Confirm-Bfhearjt.js → Confirm-DW7YOE1F.js} +2 -2
- package/dist/{ConstitutionalDocument-BZcUcXNX.js → ConstitutionalDocument-CK6FFFwg.js} +37 -26
- package/dist/{ContactDetails-CLSUzFP_.js → ContactDetails-Dx7dJnqB.js} +9 -19
- package/dist/{ContextGuidance-BopbaLr-.js → ContextGuidance-C7HDkmZU.js} +1 -1
- package/dist/{CountryField-BJAayKID.js → CountryField-CAgo6wFJ.js} +3 -3
- package/dist/{CreateIndividualComponent-D2-0xOiU.js → CreateIndividualComponent-BP_biPqN.js} +6 -6
- package/dist/{CreateTransferInstrumentComponent-CKnK4wTB.js → CreateTransferInstrumentComponent-CAg8dLjP.js} +4 -4
- package/dist/{Currency-BsVi8QRc.js → Currency-DUnZGkXH.js} +7 -7
- package/dist/{CustomerSupport-CJTSCIsJ.js → CustomerSupport-D2iXL505.js} +10 -12
- package/dist/{DebugModal-B44T9eDP.js → DebugModal-CUcMO4o_.js} +7 -7
- package/dist/{DecisionMakerDetails-DJmL0mgp.js → DecisionMakerDetails-Bp33aJUr.js} +9 -9
- package/dist/{DecisionMakerDetailsPage-BBa--1Xr.js → DecisionMakerDetailsPage-DSFo-4Sk.js} +8 -8
- package/dist/{DecisionMakers-B9o4bDnw.js → DecisionMakers-Bnvwoz_7.js} +20 -22
- package/dist/{Dropzone-CHADYCWU.js → Dropzone-F8Ut9D_V.js} +4 -4
- package/dist/{EmbeddedStatus-CUGRqHWU.js → EmbeddedStatus-GocVl-7i.js} +2 -2
- package/dist/{EndStateLayout-CWFjt8_u.js → EndStateLayout-BBLxK9Q1.js} +1 -1
- package/dist/{EntityAssociation-COqNeSzy.js → EntityAssociation-CpVhhf1f.js} +5 -5
- package/dist/{EntityGuidanceStatus-BOjmARXU.js → EntityGuidanceStatus-BBdOh7as.js} +4 -4
- package/dist/{ErrorPanel-BFnWeBCJ.js → ErrorPanel-D3OmtL80.js} +2 -2
- package/dist/{Field-B8NADHt-.js → Field-ClKiPVDa.js} +1 -1
- package/dist/{FormNavigation-CZGO4M_r.js → FormNavigation-CbHvKnKB.js} +2 -2
- package/dist/{Individual.rules-CcCj7FCg.js → Individual.rules-DChMs8iu.js} +6 -6
- package/dist/{IndividualDropin-D4VcAQnB.js → IndividualDropin-D--ImJNx.js} +164 -121
- package/dist/{InputDate-BvgrweAT.js → InputDate-BajoDzsK.js} +2 -2
- package/dist/{InputText-D6VoNS-R.js → InputText-C8kj07ZB.js} +1 -1
- package/dist/{Introduction-DCEmOIU3.js → Introduction-ejHrYyaC.js} +4 -6
- package/dist/{InvitedDecisionMakerComponent-D-Mxf7Sa.js → InvitedDecisionMakerComponent-BUrtBWme.js} +18 -13
- package/dist/{JpAddress-aZ8F40cK.js → JpAddress-BpaKGrVA.js} +10 -10
- package/dist/{LandingLayout-Co0T9hoE.js → LandingLayout-B_Cw3o3Q.js} +5 -3
- package/dist/{LegalCompanyNameField-EsmoOYWn.js → LegalCompanyNameField-BRzGJ-Ov.js} +6 -6
- package/dist/{LegalRepresentativeDetailsPage-ChOjFSdk.js → LegalRepresentativeDetailsPage-D71SlyLs.js} +4 -4
- package/dist/{Link-QFSK0XUO.js → Link-DS54L_TE.js} +1 -1
- package/dist/{ListItem-rRlEZCTu.js → ListItem-CFcOIT6E.js} +2 -2
- package/dist/{LoaderWrapper-DlhbbEYS.js → LoaderWrapper-DvyhRweQ.js} +1 -1
- package/dist/ManageIndividualComponent-BXxl7p95.js +46 -0
- package/dist/{ManageTermsOfServiceComponent-B4WTTK1V.js → ManageTermsOfServiceComponent-4e_ydA_6.js} +3 -3
- package/dist/{ManageTransferInstrumentComponent-C716Mbf2.js → ManageTransferInstrumentComponent-D52NH0jS.js} +10 -10
- package/dist/{MaskedInput-Cj3Be_WU.js → MaskedInput-ApBB9ewS.js} +5 -5
- package/dist/{MaybeModal-nSPl0yfm.js → MaybeModal-l7k-LBMJ.js} +2 -2
- package/dist/{Modal-D1Yiugk1.js → Modal-C5mnAneL.js} +3 -3
- package/dist/{Name-Pp6IOBxl.js → Name-BVk4_a2-.js} +5 -5
- package/dist/{NewSummary-DKld0bET.js → NewSummary-R9k7ZbPo.js} +2 -2
- package/dist/{OnboardingDropinComponent-DsvTtn8J.js → OnboardingDropinComponent-45YclRJI.js} +88 -75
- package/dist/{PayoutDetailsDropin-DANG1pDw.js → PayoutDetailsDropin-1vKgokN-.js} +465 -228
- package/dist/PayoutDetailsPage-CXwueRbW.js +914 -0
- package/dist/{RadioGroup-DwACEtfi.js → RadioGroup-CbeNPI_8.js} +2 -2
- package/dist/{Review-Dsp3Zk67.js → Review-DzrxzNY0.js} +6 -6
- package/dist/{RootBusinessDetailsPage-mquvEyt7.js → RootBusinessDetailsPage-eStzwQJf.js} +5 -5
- package/dist/{RootBusinessLinesPage-DCSgZuZD.js → RootBusinessLinesPage-omnttABd.js} +28 -37
- package/dist/{RootIndividualDetailsPage-BALuMNT2.js → RootIndividualDetailsPage-BcxaLjad.js} +7 -7
- package/dist/{Select-Bp6g62Kp.js → Select-Czm2JclY.js} +3 -3
- package/dist/{SignPCIComponent-CfWNRHUh.js → SignPCIComponent-DXAeetcT.js} +11 -13
- package/dist/{SingpassSelection-Cpouo3cB.js → SingpassSelection-CPgrgp4C.js} +5 -5
- package/dist/{SoleProprietorshipPage-KtyWIVNn.js → SoleProprietorshipPage-DmIKoFtO.js} +4 -4
- package/dist/{SourceOfFundsPage-B1lV40GU.js → SourceOfFundsPage-DofHZlzT.js} +33 -35
- package/dist/{StepProgressIndicator-U5DG_o4X.js → StepProgressIndicator-rIXID-AK.js} +1 -1
- package/dist/{StoreProvider-hNCKWSzB.js → StoreProvider-Bt6bLVE-.js} +111 -91
- package/dist/{Summary-NFgvajMx.js → Summary-BUJLYAgF.js} +7 -20
- package/dist/{TaxInformationField-ef1_TQvO.js → TaxInformationField-CknxoOIl.js} +27 -23
- package/dist/{TaxReportingDropin-OMrPS7PX.js → TaxReportingDropin-Bn4a54-x.js} +14 -16
- package/dist/{TextArea-BnlstVGI.js → TextArea-CKD5zTKW.js} +1 -1
- package/dist/{TileGroup-DTnywnyF.js → TileGroup-UvRO_GGK.js} +2 -2
- package/dist/{TrustDetailsPage-D7FoWYJC.js → TrustDetailsPage-BBg2UhIm.js} +32 -41
- package/dist/{TrustMemberCompanyPage-BaBDjZDf.js → TrustMemberCompanyPage-sG_Tsffg.js} +6 -6
- package/dist/{TrustMemberIndividualPage-BLZwEIxg.js → TrustMemberIndividualPage-Cpk0LIwl.js} +6 -6
- package/dist/{TrustMemberRoleAndTypePage-BVMuoGHX.js → TrustMemberRoleAndTypePage-h8cM9Ltb.js} +22 -22
- package/dist/{TrustMembersOverview-vsUsCHml.js → TrustMembersOverview-Hqb3o_y6.js} +11 -11
- package/dist/{UnincorporatedPartnershipIndividualPage-BBmy3wse.js → UnincorporatedPartnershipIndividualPage-CdpFVv2I.js} +4 -4
- package/dist/{UnincorporatedPartnershipMemberCompanyPage-DqFOtoRR.js → UnincorporatedPartnershipMemberCompanyPage-CuOQsMrw.js} +5 -5
- package/dist/{UnincorporatedPartnershipMemberRoleAndTypePage-CBF8M7cR.js → UnincorporatedPartnershipMemberRoleAndTypePage-BLcsgLCP.js} +11 -11
- package/dist/{UnincorporatedPartnershipMembersOverview-JwdguZNL.js → UnincorporatedPartnershipMembersOverview-ClQQnnrs.js} +7 -7
- package/dist/{VerificationErrorAlert-CpEbIDR3.js → VerificationErrorAlert-Clxb4YjL.js} +2 -2
- package/dist/{ViewVerificationStatusComponent-DgOa7RsZ.js → ViewVerificationStatusComponent-yJyifkQm.js} +2 -2
- package/dist/adyen-business-financing.js +2 -2
- package/dist/adyen-individual-configuration.js +2 -2
- package/dist/adyen-individual-status.js +2 -2
- package/dist/adyen-invited-decision-maker.js +2 -2
- package/dist/adyen-kyc-components.js +15 -15
- package/dist/adyen-onboarding.js +2 -2
- package/dist/adyen-terms-of-service-management.js +2 -2
- package/dist/adyen-terms-of-service-status.js +2 -2
- package/dist/adyen-transfer-instrument-configuration.js +2 -2
- package/dist/adyen-transfer-instrument-management.js +2 -2
- package/dist/adyen-verification-status.js +2 -2
- package/dist/{bafinUtils-Cf0EyXIO.js → bafinUtils-DsUdZgzH.js} +1 -1
- package/dist/{bg-BG-DMNRRZZE.js → bg-BG-89Mw-9Lv.js} +7 -7
- package/dist/{bg-BG-Cj3_UGTi.js → bg-BG-C9zrgb_c.js} +7 -1
- package/dist/{bg-BG-C6dSR1jk.js → bg-BG-dmpv4Zom.js} +2 -2
- package/dist/{commonValidators-Cl95UfG4.js → commonValidators-2G1K0mHC.js} +1 -1
- package/dist/{cs-CZ-B6atm9_Q.js → cs-CZ-6rOIfRJu.js} +2 -2
- package/dist/{cs-CZ-DxfB5dcV.js → cs-CZ-B-zm6HVH.js} +7 -1
- package/dist/{cs-CZ-DXSMRqPu.js → cs-CZ-CTxXvHtH.js} +7 -7
- package/dist/{da-DK-BfsYpvel.js → da-DK-CGhsIGZt.js} +7 -1
- package/dist/{da-DK-Cv6XUSoW.js → da-DK-C_GqHCay.js} +2 -2
- package/dist/{da-DK-CMVthpSr.js → da-DK-D_TOcmOO.js} +7 -7
- package/dist/{de-DE-BplDsJEb.js → de-DE-BmWBo3gX.js} +2 -2
- package/dist/{de-DE-B5TOuf7l.js → de-DE-DYzAiXHM.js} +7 -7
- package/dist/{de-DE-CEsDXBn-.js → de-DE-K9FyOJiI.js} +7 -1
- package/dist/{dropinUtils-BY7YDLvA.js → dropinUtils-D3x5I-79.js} +17 -6
- package/dist/{el-GR-BNNlN4l2.js → el-GR-DItzpoar.js} +7 -7
- package/dist/{el-GR-dRK7xHn2.js → el-GR-Fo7-xCrc.js} +2 -2
- package/dist/{el-GR-CM3bIzr7.js → el-GR-L-39cQfz.js} +7 -1
- package/dist/en-US-qlQTJNiL.js +13 -0
- package/dist/{es-ES-DRsix_Xn.js → es-ES-BkqlH093.js} +2 -2
- package/dist/{es-ES-Wcpc6fm1.js → es-ES-BmH6eADf.js} +7 -7
- package/dist/{es-ES-BWFP5itn.js → es-ES-TUyeIp6F.js} +7 -1
- package/dist/{et-EE-CcXrAAc7.js → et-EE-Cw_VydGb.js} +7 -1
- package/dist/{et-EE-DNC4hcxm.js → et-EE-DSZa_33d.js} +7 -7
- package/dist/{et-EE-BXiYapXy.js → et-EE-H8yxvhQj.js} +2 -2
- package/dist/{fi-FI-BftTiz0c.js → fi-FI-BfwJVwi9.js} +2 -2
- package/dist/{fi-FI-BJLU1JHw.js → fi-FI-DJ8BbVPT.js} +7 -7
- package/dist/{fi-FI-DenK0WPz.js → fi-FI-tgvQX_Iq.js} +7 -1
- package/dist/{formUtils-os98XaB-.js → formUtils-C1nur8r7.js} +2 -2
- package/dist/{fr-FR-C6jxjXAI.js → fr-FR-CzjsW73Q.js} +2 -2
- package/dist/{fr-FR-DodNoPid.js → fr-FR-D533_MOG.js} +7 -7
- package/dist/{fr-FR-BmTswZU5.js → fr-FR-ynC19lSF.js} +7 -1
- package/dist/{getName-t_vGHMzu.js → getName-B_JUBLVR.js} +1 -1
- package/dist/{getProblemsForEntity-DKjmIXBa.js → getProblemsForEntity-BSfnPYoe.js} +1 -1
- package/dist/{getTrustedFields-BrXqOBCX.js → getTrustedFields-CEoqo2CR.js} +1 -1
- package/dist/{hr-HR-SDrDZRLV.js → hr-HR--5syrowD.js} +7 -1
- package/dist/{hr-HR-C0NLgF1r.js → hr-HR-CIxdonpk.js} +7 -7
- package/dist/{hr-HR-B_TEU3r4.js → hr-HR-ZrpQrsik.js} +2 -2
- package/dist/{hu-HU-C3ZiFh1F.js → hu-HU--6ZxXlbV.js} +7 -7
- package/dist/{hu-HU-DSVf2zbX.js → hu-HU-BFiGk_QT.js} +7 -1
- package/dist/{hu-HU-CX83V9tu.js → hu-HU-Ds3go4h4.js} +2 -2
- package/dist/{isEmpty-ze-XxTHy.js → isEmpty-CpSE7NAw.js} +2 -2
- package/dist/{it-IT-CZ4aDoVQ.js → it-IT-B5cf2VTN.js} +7 -7
- package/dist/{it-IT-DJe5OflH.js → it-IT-C0Zv5ms9.js} +7 -1
- package/dist/{it-IT-CXlaZNIj.js → it-IT-Dx15tkIe.js} +2 -2
- package/dist/{ja-JP-GGV_-V6p.js → ja-JP--u211vje.js} +7 -1
- package/dist/{ja-JP-BpeNsNhn.js → ja-JP-DY4CJlUf.js} +7 -7
- package/dist/{ja-JP-A6ArIIZ8.js → ja-JP-Qu7oEIEy.js} +2 -2
- package/dist/{japanSupportUtils-DYEPbhFP.js → japanSupportUtils-CprkdtHL.js} +1 -1
- package/dist/{localizeDateString-BVk8Wvy3.js → localizeDateString-BLDvqFOU.js} +1 -1
- package/dist/{lt-LT-ww192lYg.js → lt-LT-BebOeKIA.js} +2 -2
- package/dist/{lt-LT-C8n1GZoU.js → lt-LT-CkjEvGSp.js} +7 -7
- package/dist/{lt-LT-C9nsCODy.js → lt-LT-D2Hrhr7v.js} +7 -1
- package/dist/{lv-LV-BdPdaVGy.js → lv-LV-BdZK9nQA.js} +7 -7
- package/dist/{lv-LV-CpHy-ZoF.js → lv-LV-CYcrO-6d.js} +2 -2
- package/dist/{lv-LV-Bue450PR.js → lv-LV-D04q9r-y.js} +7 -1
- package/dist/{mapExistingFile-BqPAjtnr.js → mapExistingFile-DUgMBW9t.js} +3 -3
- package/dist/{mapJpAddressSchemaToAddressLocalizations-WxoGOrHr.js → mapJpAddressSchemaToAddressLocalizations-BXIw8J3t.js} +2 -2
- package/dist/{mapLegalEntityToIndividualSchema-B0s8GG9o.js → mapLegalEntityToIndividualSchema-BRQ51OQI.js} +4 -4
- package/dist/{mapTransferInstrumentToPayoutAccount-BsiLVcTY.js → mapTransferInstrumentToPayoutAccount-DaLPVgIK.js} +2 -2
- package/dist/{nl-NL-4Mv4rnYy.js → nl-NL-CJ7MoBj2.js} +7 -1
- package/dist/{nl-NL-BwWFlBOs.js → nl-NL-FbJ2sHba.js} +2 -2
- package/dist/{nl-NL-B2Uku0lw.js → nl-NL-YcL7Gufl.js} +7 -7
- package/dist/{no-NO-JWsSd7iY.js → no-NO-B5BjEy8n.js} +2 -2
- package/dist/{no-NO-ByCZ3mhz.js → no-NO-C20s6CoP.js} +7 -1
- package/dist/{no-NO-DjOcJWnC.js → no-NO-KkYB-VQD.js} +7 -7
- package/dist/{omitObscuredFieldsIfUnchanged-DqCASsJA.js → omitObscuredFieldsIfUnchanged-ChSKB1LF.js} +3 -3
- package/dist/{patternValidators-Dx583C-1.js → patternValidators-0N8_moed.js} +2 -2
- package/dist/{pl-PL-DCi5Lf4k.js → pl-PL-C19Btj2D.js} +7 -1
- package/dist/{pl-PL-Bmaq3IC3.js → pl-PL-CPdKf-J0.js} +7 -7
- package/dist/{pl-PL-CLmmSNgn.js → pl-PL-DuM6hbqZ.js} +2 -2
- package/dist/{process-field-configurations-DIs_LC2a.js → process-field-configurations-DNb-fWox.js} +2 -2
- package/dist/{pt-BR-BJOww8U1.js → pt-BR-BKKQIUJP.js} +2 -2
- package/dist/{pt-BR-BKdT0Bpl.js → pt-BR-ERWeus3c.js} +7 -7
- package/dist/{pt-BR-DRz5cG4o.js → pt-BR-zOjPTIPu.js} +7 -1
- package/dist/{pt-PT-CL9VzmZE.js → pt-PT-CC7zlk3R.js} +2 -2
- package/dist/{pt-PT-C2li07N1.js → pt-PT-DUTGt5L5.js} +7 -7
- package/dist/{pt-PT-ChRbnn0k.js → pt-PT-t5M8xwTU.js} +7 -1
- package/dist/{resolveEnvironment-CoyMk9x-.js → resolveEnvironment-RNyhTkW8.js} +3 -3
- package/dist/{ro-RO-iPjOeKwM.js → ro-RO-BnFjok5O.js} +7 -7
- package/dist/{ro-RO-Cu1T3z6k.js → ro-RO-CuabgXj1.js} +2 -2
- package/dist/{ro-RO-Dgie5z3m.js → ro-RO-DK9gVwS9.js} +7 -1
- package/dist/{roleMetadata-NqHcHFCe.js → roleMetadata-CuLbD5YE.js} +3 -3
- package/dist/{sk-SK-bMDoNP19.js → sk-SK-2J6iKfmK.js} +7 -1
- package/dist/{sk-SK-3_SoEn6P.js → sk-SK-CLPd85I3.js} +7 -7
- package/dist/{sk-SK-CEjJ-qZG.js → sk-SK-DM1yY8DA.js} +2 -2
- package/dist/{sl-SI-BfO3xEJx.js → sl-SI--pDTatHh.js} +2 -2
- package/dist/{sl-SI-DKSu25rO.js → sl-SI-D82ccY62.js} +7 -1
- package/dist/{sl-SI-DbfswGh0.js → sl-SI-T9_Ty-NS.js} +7 -7
- package/dist/style.css +9 -21
- package/dist/styles-CLV89_hH.js +9 -21
- package/dist/{sv-SE-Blw4s8bC.js → sv-SE-3-h2VlYi.js} +7 -7
- package/dist/{sv-SE-CMLKzwtj.js → sv-SE-CDxyyNV0.js} +2 -2
- package/dist/{sv-SE-Co7Nkd06.js → sv-SE-CrBkos0z.js} +7 -1
- package/dist/types/api/companySearch/useCompanySearch.d.ts +289 -0
- package/dist/types/api/companySelection/useCompanySelection.d.ts +2 -4
- package/dist/types/api/configurations/useScenarios.d.ts +1 -1
- package/dist/types/api/idVerificationProviders/useExtractDocumentInformation.d.ts +4 -4
- package/dist/types/api/queryKeys.d.ts +1 -2
- package/dist/types/api/tinVerification/useVerifyTin.d.ts +245 -1
- package/dist/types/api/uiAnalytics/uiAnalytics.types.d.ts +6 -1
- package/dist/types/components/BankAccount/forms/BankVerification/store.d.ts +1 -0
- package/dist/types/components/BankAccount/forms/PayoutCountryDetails/PayoutCountryDetails.d.ts +3 -0
- package/dist/types/components/BankAccount/forms/PayoutDetails/PayoutDetailsMultiform.d.ts +27 -0
- package/dist/types/components/BankAccount/forms/PayoutDetails/rules.d.ts +2 -2
- package/dist/types/components/BankAccount/mapping/payoutKeyMappings.d.ts +25 -25
- package/dist/types/components/BankAccount/tasks/PayoutDetailsDropin/PayoutDetailsDropin.d.ts +0 -1
- package/dist/types/components/BankAccount/tasks/PayoutDetailsDropin/PayoutDetailsDropinMultiForm.d.ts +2 -0
- package/dist/types/components/BankAccount/tasks/PayoutDetailsDropin/utils.d.ts +7 -0
- package/dist/types/components/BankAccount/tasks/PayoutDetailsDropin/validate.d.ts +23 -0
- package/dist/types/components/Business/forms/BusinessSelection/BusinessInformationCard/BusinessInformationCard.d.ts +3 -4
- package/dist/types/components/Business/forms/rules.d.ts +6 -6
- package/dist/types/components/Business/mapping/businessDetails/businessBankAccountTaxIdUtils.d.ts +10 -0
- package/dist/types/components/Business/tasks/BusinessDetailsDropin/businessDetailsStore.d.ts +0 -1
- package/dist/types/components/Business/tasks/BusinessDetailsDropin/types.d.ts +1 -4
- package/dist/types/components/Business/tasks/BusinessDetailsDropin/utils.d.ts +2 -3
- package/dist/types/components/BusinessLines/fields/SalesChannels/SalesChannels.d.ts +1 -1
- package/dist/types/components/BusinessLines/fields/SalesChannels/types.d.ts +1 -1
- package/dist/types/components/Contract/tasks/ServiceAgreementDropin/types.d.ts +2 -1
- package/dist/types/components/EFP/mapping/businessFinancingKeyMappings.d.ts +499 -487
- package/dist/types/components/Individual/forms/Individual.rules.d.ts +2 -2
- package/dist/types/components/Individual/forms/InviteDetails/utils.d.ts +2 -0
- package/dist/types/components/Individual/forms/InviteDetails/validate.d.ts +2 -1
- package/dist/types/components/Shared/fields/BusinessRegistrationNumberField/fieldConfig.d.ts +1 -2
- package/dist/types/components/Shared/fields/BusinessRegistrationNumberField/registrationNumberTypes.d.ts +5 -0
- 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/DateOfIncorporationField/DateOfIncorporationField.d.ts +1 -1
- package/dist/types/components/Shared/fields/DateOfIncorporationField/types.d.ts +1 -1
- package/dist/types/components/Shared/fields/IndustryCodeField/IndustryCodeField.d.ts +1 -1
- package/dist/types/components/Shared/fields/IndustryCodeField/types.d.ts +1 -1
- package/dist/types/components/Shared/fields/Name/validate.d.ts +2 -1
- package/dist/types/components/Shared/fields/PhoneField/PhoneField.d.ts +1 -1
- package/dist/types/components/Shared/fields/PhoneField/types.d.ts +1 -1
- package/dist/types/components/Shared/fields/StockExchangeMICField/StockExchangeMICField.d.ts +1 -1
- package/dist/types/components/Shared/fields/StockExchangeMICField/types.d.ts +1 -1
- package/dist/types/components/Shared/fields/StockISINField/StockISINField.d.ts +1 -1
- package/dist/types/components/Shared/fields/StockISINField/types.d.ts +1 -1
- package/dist/types/components/Shared/fields/StockTickerSymbol/StockTickerSymbolField.d.ts +1 -1
- package/dist/types/components/Shared/fields/StockTickerSymbol/types.d.ts +1 -1
- package/dist/types/components/Shared/forms/Address/utils.d.ts +1 -1
- package/dist/types/components/Shared/forms/Address/validate.d.ts +1 -1
- package/dist/types/components/Trust/forms/Trust/rules.d.ts +2 -2
- package/dist/types/context/ToggleContext/types.d.ts +51 -56
- package/dist/types/core/models/api/branchAllocation.d.ts +5 -0
- package/dist/types/core/models/api/get-scenarios.d.ts +2 -0
- package/dist/types/core/models/api/organization.d.ts +2 -0
- package/dist/types/core/user-events.d.ts +1 -1
- package/dist/types/hooks/useForm/types.d.ts +1 -0
- package/dist/types/hooks/usePageLandedEvent.d.ts +3 -3
- package/dist/types/utils/entityStatusUtil.d.ts +1 -1
- package/dist/types/utils/validatorUtils.d.ts +1 -0
- package/dist/{types-CTwBMnPB.js → types-C7ANBXKc.js} +56 -61
- package/dist/{types-lbafosQE.js → types-CJnNafzu.js} +2 -2
- package/dist/{types-BRLYR2Wx.js → types-DqaPuyRe.js} +1 -1
- package/dist/{types-C4RAJtRF.js → types-Ds3BWDI-.js} +1 -1
- package/dist/{unincorporated-partnership-KMmroXu1.js → unincorporated-partnership-DDPy7qIp.js} +1 -1
- package/dist/{useAssociatedLegalEntity-Dlgpas6D.js → useAssociatedLegalEntity-R9-aucnr.js} +1 -1
- package/dist/{useBusinessDetailsData-CPww2HAm.js → useBusinessDetailsData-BKgf0j8T.js} +379 -373
- package/dist/{useCreateLegalEntity-D3ObXaof.js → useCreateLegalEntity-BEEy8g0o.js} +1 -1
- package/dist/{useForm-BSHD2KTa.js → useForm-BQaffiEa.js} +3 -3
- package/dist/{useFormContext-DKaDgcgR.js → useFormContext-BZwb6dry.js} +7 -7
- package/dist/{useGlobalData-kQ8hN10Q.js → useGlobalData-RPqQO2_m.js} +9 -9
- package/dist/{useMultiForm-BG8MF6DI.js → useMultiForm-DrspjU-_.js} +4 -4
- package/dist/{useOnboardingStatus-CZ0x4yyk.js → useOnboardingStatus-Cx2RfslI.js} +1 -1
- package/dist/{useScenarios-Bn3EGOHA.js → useScenarios-ZY51ox86.js} +1 -1
- package/dist/{useTermsOfServiceStatus-BscviiB7.js → useTermsOfServiceStatus-C_6N4XIw.js} +1 -1
- package/dist/{useToastContext-Bxju6PLZ.js → useToastContext-CKEFuMZU.js} +1 -1
- package/dist/{useUnincorporatedPartnershipMembers-CmJaMQa-.js → useUnincorporatedPartnershipMembers-B0loJKYp.js} +4 -4
- package/dist/{useUpdateBusinessLines-97t7rLep.js → useUpdateBusinessLines-bS2l9wAZ.js} +5 -7
- package/dist/{useUpdateLegalEntity-CLWcAVwj.js → useUpdateLegalEntity-5AD9uK8f.js} +2 -2
- package/dist/{utils-CKTSKzWR.js → utils-4YBHq5mh.js} +1 -1
- package/dist/{utils-8cw25Nur.js → utils-BuiPHqFZ.js} +1 -1
- package/dist/{utils-C1FWQvf0.js → utils-BzAU2BN1.js} +3 -3
- package/dist/{utils-DPRgxXmU.js → utils-CqJ09Ne0.js} +6 -6
- package/dist/{utils-BN54hZUe.js → utils-DpBs-qSJ.js} +2 -2
- package/dist/{validate-BnCwLSUb.js → validate-BMFS_55S.js} +2 -2
- package/dist/{validate-BxU9EEi6.js → validate-CmVYROUS.js} +3 -3
- package/dist/{validationError-sIV2dUoW.js → validationError-CSob70hx.js} +2 -2
- package/package.json +10 -10
- package/dist/BusinessFinancingPage-B5Nk3rx2.js +0 -43
- package/dist/ManageIndividualComponent-DQ9mC9zr.js +0 -46
- package/dist/PayoutDetailsPage-DCmlsSbE.js +0 -55
- package/dist/en-US-CJDkXFZ6.js +0 -13
- package/dist/types/components/BankAccount/tasks/PayoutDetailsDropin/formatAccountVerificationSummary.d.ts +0 -7
- package/dist/useTaskLandedEvent-Cee5Mvme.js +0 -25
|
@@ -2,71 +2,70 @@
|
|
|
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] = "c4f32db7-1380-4547-9b39-670d962ce933", e._sentryDebugIdIdentifier = "sentry-dbid-c4f32db7-1380-4547-9b39-670d962ce933");
|
|
6
6
|
} catch (e) {
|
|
7
7
|
}
|
|
8
8
|
}
|
|
9
9
|
;
|
|
10
10
|
import { jsx, jsxs, Fragment } from "preact/jsx-runtime";
|
|
11
|
-
import {
|
|
11
|
+
import { signal, useSignal } from "@preact/signals";
|
|
12
|
+
import { useMutation, queryOptions, useQuery, skipToken, useQueryClient } from "@tanstack/preact-query";
|
|
12
13
|
import { useState, useMemo, useEffect, useRef, 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-
|
|
14
|
-
import { u as useScenarios } from "./useScenarios-
|
|
15
|
-
import { u as useCreateLegalEntity } from "./useCreateLegalEntity-
|
|
16
|
-
import { u as useToastContext, a as useInvalidateRootLegalEntity } from "./useToastContext-
|
|
17
|
-
import { u as useUpdateLegalEntity } from "./useUpdateLegalEntity-
|
|
18
|
-
import { u as useTranslation,
|
|
19
|
-
import { u as useFormContext, F as FormContextProvider, a as FormFlow } from "./useFormContext-
|
|
20
|
-
import { C as CompanyTypesValues } from "./bafinUtils-
|
|
21
|
-
import { c as composePerScenarioFormConfigurations, g as getPropsFromConfigurations } from "./process-field-configurations-
|
|
22
|
-
import { a as addValidityToForms, u as useFormComposer } from "./dropinUtils-
|
|
23
|
-
import { u as useMultiForm } from "./useMultiForm-
|
|
24
|
-
import { u as uppercase, m as mapExistingFile, g as getPageName, b as useScenarioConfiguration } from "./mapExistingFile-
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import { g as getAddressSchemaForCountry, C as COUNTRIES_WITH_STATES_DATASET, a as getAddressSchemaLabelsByCountry, f as mapAddressLabelsNewSummary, c as getKeyForField } from "./utils-BN54hZUe.js";
|
|
14
|
+
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-bS2l9wAZ.js";
|
|
15
|
+
import { u as useScenarios } from "./useScenarios-ZY51ox86.js";
|
|
16
|
+
import { u as useCreateLegalEntity } from "./useCreateLegalEntity-BEEy8g0o.js";
|
|
17
|
+
import { u as useToastContext, a as useInvalidateRootLegalEntity } from "./useToastContext-CKEFuMZU.js";
|
|
18
|
+
import { u as useUpdateLegalEntity } from "./useUpdateLegalEntity-5AD9uK8f.js";
|
|
19
|
+
import { u as useTranslation, bG as isISIN, V as Button, H as useToggleContext, P as useLegalEntity, R as ROOT_LE, am as datasetUtilities, aB as Header, N as Typography, U as Loader, a9 as CountryCodes, m as useSettingsContext, aO as useAllowedCountries, b as useApiContext, j as httpPost, x as useAnalyticsContext, O as StackLayout, C as Alert, ao as entriesOf, ae as createLogger, t as useAccountHolder, w as TaskTypes, L as LegalEntityTypes, ax as isEmpty, i as isUndefinedOrNull, bH as businessDetailsComponentsKeyMapping, bI as solePropBusinessDetailsKeyMapping, ah as objectsDeepEqual, aT as keysOf, bJ as solePropBusinessDetailsApiKeyMapping, bl as businessDetailsApiKeyMapping, at as Scenarios, a$ as filterOutUnwantedAssociationsIfRootLE, aY as drop, ac as getOwnEntityAssociations, b3 as doArraysMatch, bK as solePropBusinessDetailsDocumentMapping, bL as businessDetailsDocumentMapping } from "./StoreProvider-Bt6bLVE-.js";
|
|
20
|
+
import { u as useFormContext, F as FormContextProvider, a as FormFlow } from "./useFormContext-BZwb6dry.js";
|
|
21
|
+
import { C as CompanyTypesValues } from "./bafinUtils-DsUdZgzH.js";
|
|
22
|
+
import { c as composePerScenarioFormConfigurations, g as getPropsFromConfigurations } from "./process-field-configurations-DNb-fWox.js";
|
|
23
|
+
import { a as addValidityToForms, u as useFormComposer } from "./dropinUtils-D3x5I-79.js";
|
|
24
|
+
import { u as useMultiForm } from "./useMultiForm-DrspjU-_.js";
|
|
25
|
+
import { u as uppercase, m as mapExistingFile, g as getPageName, b as useScenarioConfiguration } from "./mapExistingFile-DUgMBW9t.js";
|
|
26
|
+
import { C as Confirm } from "./Confirm-DW7YOE1F.js";
|
|
27
|
+
import { E as ErrorPanel } from "./ErrorPanel-D3OmtL80.js";
|
|
28
|
+
import { N as NewSummary } from "./NewSummary-R9k7ZbPo.js";
|
|
29
|
+
import { s as summaryStep, a as summaryStyles } from "./Summary-BUJLYAgF.js";
|
|
30
|
+
import { a as getDocument, j as getDocuments, c as createDocumentRequest, k as mergeProofOfOwnershipAttachments, b as getFileExtention, d as documentApiUtils } from "./validate-CmVYROUS.js";
|
|
31
|
+
import { m as mergeFieldMetadataIntoProps, c as createFormUtils } from "./formUtils-C1nur8r7.js";
|
|
32
|
+
import { c as TAX_INFORMATION_FIELD, r as requestingBanking, d as requestingIssuing, t as taxInformationDefaultFieldMetadata, a as taxInformationDefaultFieldConfig, T as TaxInformationField, C as COUNTRY_OF_GOVERNING_LAW_POSSIBLE, e as getTaxInformationPlaceholderText, S as StateCodesUS, i as isUsingCompanySearch, M as MemoizedDocumentUpload, f as countryToTaxInfoTypeMap, h as isRegistrationNumberAbsentStateV4Scenario, j as getTaxIdNumberOptions, k as COUNTRIES_THAT_USE_TAX_ID_INSTEAD_OF_VAT, l as rules, g as getFieldsWithExistingData } from "./TaxInformationField-CknxoOIl.js";
|
|
33
|
+
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, a as defaultFieldConfig, 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 getCompanyRegistrationNumberOptions, p as exemptFromRegistrationNumberDefaultFieldMetadata } from "./ConstitutionalDocument-CK6FFFwg.js";
|
|
34
|
+
import { K as KEYBOARD_KEYS, M as Modal, a as ModalContent } from "./Modal-C5mnAneL.js";
|
|
35
|
+
import { g as getAddressSchemaForCountry, C as COUNTRIES_WITH_STATES_DATASET, a as getAddressSchemaLabelsByCountry, f as mapAddressLabelsNewSummary, c as getKeyForField } from "./utils-DpBs-qSJ.js";
|
|
36
36
|
import { r as resolveFieldMetadata } from "./fieldConfigurations-BUT9DTUH.js";
|
|
37
|
-
import { f as formatCurrency, A as ALLOWED_SOF_SERVICES } from "./utils-
|
|
38
|
-
import { b as useAddressCleanse, f as formatAddressForCleanse, m as mapAddressData, A as Address, g as getNestedTrustedFields, S as STATE_FIELD, d as defaultFieldMetadata$1, c as defaultFieldConfig$1, e as StateField, i as isDateOlderThanAYear } from "./Address-
|
|
37
|
+
import { f as formatCurrency, A as ALLOWED_SOF_SERVICES } from "./utils-BzAU2BN1.js";
|
|
38
|
+
import { b as useAddressCleanse, f as formatAddressForCleanse, m as mapAddressData, A as Address, g as getNestedTrustedFields, S as STATE_FIELD, d as defaultFieldMetadata$1, c as defaultFieldConfig$1, e as StateField, i as isDateOlderThanAYear } from "./Address-Czpdu7Iv.js";
|
|
39
39
|
import { S as SettingNames } from "./types-Dv0COrvY.js";
|
|
40
|
-
import { o as organizationTypesToSkipCompanyStructureForm } from "./utils-
|
|
41
|
-
import { i as isValidationError, p as processValidationErrors, a as isMaintenanceModeError } from "./validationError-
|
|
42
|
-
import { t as toFullWidth, m as mapJpAddressSchemaToAddressLocalizations } from "./mapJpAddressSchemaToAddressLocalizations-
|
|
43
|
-
import { i as isEmpty$1 } from "./isEmpty-
|
|
40
|
+
import { o as organizationTypesToSkipCompanyStructureForm } from "./utils-CqJ09Ne0.js";
|
|
41
|
+
import { i as isValidationError, p as processValidationErrors, a as isMaintenanceModeError } from "./validationError-CSob70hx.js";
|
|
42
|
+
import { t as toFullWidth, m as mapJpAddressSchemaToAddressLocalizations } from "./mapJpAddressSchemaToAddressLocalizations-BXIw8J3t.js";
|
|
43
|
+
import { i as isEmpty$1 } from "./isEmpty-CpSE7NAw.js";
|
|
44
44
|
import { f as formatObject } from "./utils-DNSfZiio.js";
|
|
45
45
|
import { b as mapAddressLocalizationToJpAddressSchema, a as mapApiScriptLocalizationToSchemaFields, m as mapSchemaFieldsToApiScriptLocalization } from "./mapAddressLocalizationToJpAddressSchema-vJWbpAyq.js";
|
|
46
|
-
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-
|
|
47
|
-
import { L as LandingLayout } from "./LandingLayout-
|
|
48
|
-
import { g as getLegalCompanyNameGuidanceText, L as LEGAL_COMPANY_NAME_FIELD, d as defaultFieldMetadataV4, a as defaultFieldMetadata$2, b as defaultFieldConfigV4, c as defaultFieldConfig$2 } from "./LegalCompanyNameField-
|
|
49
|
-
import { h as useBusinessLines } from "./OnboardingDropinComponent-
|
|
46
|
+
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-DUnZGkXH.js";
|
|
47
|
+
import { L as LandingLayout } from "./LandingLayout-B_Cw3o3Q.js";
|
|
48
|
+
import { g as getLegalCompanyNameGuidanceText, L as LEGAL_COMPANY_NAME_FIELD, d as defaultFieldMetadataV4, a as defaultFieldMetadata$2, b as defaultFieldConfigV4, c as defaultFieldConfig$2 } from "./LegalCompanyNameField-BRzGJ-Ov.js";
|
|
49
|
+
import { h as useBusinessLines } from "./OnboardingDropinComponent-45YclRJI.js";
|
|
50
50
|
import { Suspense, lazy } from "preact/compat";
|
|
51
|
-
import { C as Checkbox } from "./Checkbox-
|
|
52
|
-
import { F as Field } from "./Field-
|
|
53
|
-
import { I as InputDate, f as formatDateObj } from "./InputDate-
|
|
54
|
-
import { a as validateNotEmptyOnBlur, v as validatePatternOnBlur, b as validateJaKanaLegalCompanyName, c as validateJaHaniLegalCompanyName } from "./patternValidators-
|
|
55
|
-
import { M as MaskedInput, m as makeMask, d as alphanumericInputs, b as alphaInputs, n as numericInputs } from "./MaskedInput-
|
|
56
|
-
import { i as isJapanLocalizationEnabled } from "./japanSupportUtils-
|
|
51
|
+
import { C as Checkbox } from "./Checkbox-BbVX_nZi.js";
|
|
52
|
+
import { F as Field } from "./Field-ClKiPVDa.js";
|
|
53
|
+
import { I as InputDate, f as formatDateObj } from "./InputDate-BajoDzsK.js";
|
|
54
|
+
import { a as validateNotEmptyOnBlur, v as validatePatternOnBlur, b as validateJaKanaLegalCompanyName, c as validateJaHaniLegalCompanyName } from "./patternValidators-0N8_moed.js";
|
|
55
|
+
import { M as MaskedInput, m as makeMask, d as alphanumericInputs, b as alphaInputs, n as numericInputs } from "./MaskedInput-ApBB9ewS.js";
|
|
56
|
+
import { i as isJapanLocalizationEnabled } from "./japanSupportUtils-CprkdtHL.js";
|
|
57
57
|
import { u as useDebouncedCallback } from "./debouncedInputEvent-Cv2S512Y.js";
|
|
58
|
-
import { signal } from "@preact/signals";
|
|
59
58
|
import cx from "classnames";
|
|
60
|
-
import { L as Link } from "./Link-
|
|
59
|
+
import { L as Link } from "./Link-DS54L_TE.js";
|
|
61
60
|
import { S as StructuredList } from "./StructuredList-CNha20ka.js";
|
|
62
|
-
import { I as InputText } from "./InputText-
|
|
63
|
-
import { C as CountryField, a as COUNTRY_FIELD } from "./CountryField-
|
|
64
|
-
import { L as LoaderWrapper } from "./LoaderWrapper-
|
|
61
|
+
import { I as InputText } from "./InputText-C8kj07ZB.js";
|
|
62
|
+
import { C as CountryField, a as COUNTRY_FIELD } from "./CountryField-CAgo6wFJ.js";
|
|
63
|
+
import { L as LoaderWrapper } from "./LoaderWrapper-DvyhRweQ.js";
|
|
65
64
|
import { C as Card } from "./Card-OQuFzmxm.js";
|
|
66
|
-
import { L as ListItem } from "./ListItem-
|
|
67
|
-
import { T as TileGroup } from "./TileGroup-
|
|
68
|
-
import { c as currencyByCountry } from "./types-
|
|
69
|
-
import { R as RadioGroup } from "./RadioGroup-
|
|
65
|
+
import { L as ListItem } from "./ListItem-CFcOIT6E.js";
|
|
66
|
+
import { T as TileGroup } from "./TileGroup-UvRO_GGK.js";
|
|
67
|
+
import { c as currencyByCountry } from "./types-CJnNafzu.js";
|
|
68
|
+
import { R as RadioGroup } from "./RadioGroup-CbeNPI_8.js";
|
|
70
69
|
const DATE_OF_INCORPORATION_FIELD = [
|
|
71
70
|
"dateOfIncorporation"
|
|
72
71
|
];
|
|
@@ -74,16 +73,16 @@ function DateOfIncorporationField({
|
|
|
74
73
|
data,
|
|
75
74
|
valid,
|
|
76
75
|
errors,
|
|
77
|
-
labels,
|
|
78
76
|
placeholder,
|
|
79
77
|
readonly,
|
|
80
78
|
handleChangeFor
|
|
81
79
|
}) {
|
|
80
|
+
const { t } = useTranslation("common");
|
|
82
81
|
return /* @__PURE__ */ jsx(
|
|
83
82
|
Field,
|
|
84
83
|
{
|
|
85
84
|
name: "dateOfIncorporation",
|
|
86
|
-
label:
|
|
85
|
+
label: t(($) => $["dateOfIncorporation"]),
|
|
87
86
|
errorMessage: errors.dateOfIncorporation,
|
|
88
87
|
isValid: valid.dateOfIncorporation,
|
|
89
88
|
children: (childProps) => /* @__PURE__ */ jsx(
|
|
@@ -113,7 +112,6 @@ const validateDateOfIncorporation = (dateOfIncorporation) => {
|
|
|
113
112
|
return date < /* @__PURE__ */ new Date() && date > new Date(1900, 0, 1);
|
|
114
113
|
};
|
|
115
114
|
const dateOfIncorporationFieldMetadata = {
|
|
116
|
-
label: "dateOfIncorporation",
|
|
117
115
|
validators: [
|
|
118
116
|
validateNotEmptyOnBlur,
|
|
119
117
|
{
|
|
@@ -185,7 +183,6 @@ const eInvoicingCodeFieldMetadata = {
|
|
|
185
183
|
}
|
|
186
184
|
};
|
|
187
185
|
const stockExchangeMICFieldMetadata = {
|
|
188
|
-
label: "stockExchangeMIC",
|
|
189
186
|
validators: [validateNotEmptyOnBlur, validatePatternOnBlur(/^[a-zA-Z0-9]{4}$/)],
|
|
190
187
|
mask: {
|
|
191
188
|
mask: makeMask(...alphanumericInputs(4)),
|
|
@@ -199,7 +196,6 @@ function StockExchangeMICField({
|
|
|
199
196
|
data,
|
|
200
197
|
valid,
|
|
201
198
|
errors,
|
|
202
|
-
labels,
|
|
203
199
|
readonly,
|
|
204
200
|
mask,
|
|
205
201
|
shouldValidate,
|
|
@@ -211,7 +207,7 @@ function StockExchangeMICField({
|
|
|
211
207
|
{
|
|
212
208
|
name: "stockExchangeMIC",
|
|
213
209
|
type: "text",
|
|
214
|
-
label:
|
|
210
|
+
label: t(($) => $["stockExchangeMIC"]),
|
|
215
211
|
formatGuidance: t(($) => $["enterNCharactersForExample"], { numChars: "4", example: "XNAS" }),
|
|
216
212
|
...mask,
|
|
217
213
|
errorMessage: errors.stockExchangeMIC,
|
|
@@ -227,7 +223,6 @@ function StockExchangeMICField({
|
|
|
227
223
|
);
|
|
228
224
|
}
|
|
229
225
|
const stockISINFieldMetadata = {
|
|
230
|
-
label: "stockISIN",
|
|
231
226
|
validators: [
|
|
232
227
|
validateNotEmptyOnBlur,
|
|
233
228
|
{
|
|
@@ -245,7 +240,6 @@ function StockISINField({
|
|
|
245
240
|
data,
|
|
246
241
|
valid,
|
|
247
242
|
errors,
|
|
248
|
-
labels,
|
|
249
243
|
readonly,
|
|
250
244
|
mask,
|
|
251
245
|
shouldValidate,
|
|
@@ -257,7 +251,7 @@ function StockISINField({
|
|
|
257
251
|
{
|
|
258
252
|
name: "stockISIN",
|
|
259
253
|
type: "text",
|
|
260
|
-
label:
|
|
254
|
+
label: t(($) => $["stockISIN"]),
|
|
261
255
|
formatGuidance: t(($) => $["validationPleaseEnterAValidStockISIN"], {
|
|
262
256
|
example: "NL0012969182"
|
|
263
257
|
}),
|
|
@@ -275,7 +269,6 @@ function StockISINField({
|
|
|
275
269
|
);
|
|
276
270
|
}
|
|
277
271
|
const stockTickerSymbolFieldMetadata = {
|
|
278
|
-
label: "stockTickerSymbol",
|
|
279
272
|
validators: [validateNotEmptyOnBlur, validatePatternOnBlur(/^[A-Z\d]{1,5}$/)],
|
|
280
273
|
mask: {
|
|
281
274
|
mask: makeMask(...alphanumericInputs(1), ...alphanumericInputs(4)),
|
|
@@ -289,7 +282,6 @@ function StockTickerSymbolField({
|
|
|
289
282
|
data,
|
|
290
283
|
valid,
|
|
291
284
|
errors,
|
|
292
|
-
labels,
|
|
293
285
|
readonly,
|
|
294
286
|
mask,
|
|
295
287
|
shouldValidate,
|
|
@@ -301,7 +293,7 @@ function StockTickerSymbolField({
|
|
|
301
293
|
{
|
|
302
294
|
name: "stockTickerSymbol",
|
|
303
295
|
type: "text",
|
|
304
|
-
label:
|
|
296
|
+
label: t(($) => $["stockTickerSymbol"]),
|
|
305
297
|
formatGuidance: t(($) => $["enterAMaximumOfNCharactersForExample"], {
|
|
306
298
|
maxChars: "5",
|
|
307
299
|
example: "ADYEN"
|
|
@@ -333,7 +325,6 @@ const isBankAccountRequestedForOrganization = signal(void 0);
|
|
|
333
325
|
const tinMatched = signal(void 0);
|
|
334
326
|
const businessMismatchModalOpen = signal(false);
|
|
335
327
|
const verifiedBusiness = signal(void 0);
|
|
336
|
-
const isVerifiedSingleCompanySearchResult = signal(false);
|
|
337
328
|
const additionalInformationContent = "adyen-kyc-additional-information-content";
|
|
338
329
|
const additionalInformationSectionHeading = "adyen-kyc-additional-information-section-heading";
|
|
339
330
|
const styles$4 = {
|
|
@@ -407,7 +398,7 @@ function VerifiedBusinessCard({
|
|
|
407
398
|
] });
|
|
408
399
|
}
|
|
409
400
|
const LazyJpAddress = lazy(
|
|
410
|
-
async () => (await import("./JpAddress-
|
|
401
|
+
async () => (await import("./JpAddress-BpaKGrVA.js")).JpAddress
|
|
411
402
|
);
|
|
412
403
|
const ADDITIONAL_INFORMATION_FORM_ID = "additionalInformation";
|
|
413
404
|
const ADDITIONAL_INFORMATION_FIELDS = [
|
|
@@ -454,7 +445,6 @@ function AdditionalInformation({
|
|
|
454
445
|
if (requestingIssuing(rootLegalEntity)) {
|
|
455
446
|
businessLineTypes.push("issuing");
|
|
456
447
|
}
|
|
457
|
-
usePageLandedEvent();
|
|
458
448
|
const [addressToCheck, setAddressToCheck] = useDebouncedState(500);
|
|
459
449
|
const { data: cleansedRegistrationAddress } = useAddressCleanse(
|
|
460
450
|
{
|
|
@@ -748,9 +738,6 @@ function AdditionalInformation({
|
|
|
748
738
|
validationErrors,
|
|
749
739
|
DBA_NAME_FIELD
|
|
750
740
|
),
|
|
751
|
-
labels: formUtils.getFieldLabels(DBA_NAME_FIELD, {
|
|
752
|
-
hasDoingBusinessAs: "hasDba"
|
|
753
|
-
}),
|
|
754
741
|
readonly: formUtils.isReadOnly("doingBusinessAs"),
|
|
755
742
|
handleChangeFor
|
|
756
743
|
}
|
|
@@ -880,11 +867,6 @@ function AdditionalInformation({
|
|
|
880
867
|
validationErrors,
|
|
881
868
|
INDUSTRY_CODE_FIELD
|
|
882
869
|
),
|
|
883
|
-
labels: {
|
|
884
|
-
industryCodes: t(($) => $["industry"], {
|
|
885
|
-
ns: "business"
|
|
886
|
-
})
|
|
887
|
-
},
|
|
888
870
|
guidanceText: t(($) => $["primaryIndustryCodeGuidance"], { ns: "business" }),
|
|
889
871
|
readonly: formUtils.isReadOnly("industryCodes"),
|
|
890
872
|
handleChangeFor,
|
|
@@ -909,7 +891,6 @@ function AdditionalInformation({
|
|
|
909
891
|
validationErrors,
|
|
910
892
|
DATE_OF_INCORPORATION_FIELD
|
|
911
893
|
),
|
|
912
|
-
labels: formUtils.getFieldLabels(DATE_OF_INCORPORATION_FIELD),
|
|
913
894
|
placeholder: t(($) => $["datePlaceholder"]),
|
|
914
895
|
readonly: formUtils.isReadOnly("dateOfIncorporation"),
|
|
915
896
|
handleChangeFor
|
|
@@ -936,7 +917,6 @@ function AdditionalInformation({
|
|
|
936
917
|
validationErrors,
|
|
937
918
|
STOCK_EXCHANGE_MIC_FIELD
|
|
938
919
|
),
|
|
939
|
-
labels: formUtils.getFieldLabels(STOCK_EXCHANGE_MIC_FIELD),
|
|
940
920
|
mask: formUtils.getMask("stockExchangeMIC"),
|
|
941
921
|
readonly: formUtils.isReadOnly("stockExchangeMIC"),
|
|
942
922
|
shouldValidate,
|
|
@@ -959,7 +939,6 @@ function AdditionalInformation({
|
|
|
959
939
|
validationErrors,
|
|
960
940
|
STOCK_ISIN_FIELD
|
|
961
941
|
),
|
|
962
|
-
labels: formUtils.getFieldLabels(STOCK_ISIN_FIELD),
|
|
963
942
|
mask: formUtils.getMask("stockISIN"),
|
|
964
943
|
readonly: formUtils.isReadOnly("stockISIN"),
|
|
965
944
|
shouldValidate,
|
|
@@ -982,7 +961,6 @@ function AdditionalInformation({
|
|
|
982
961
|
validationErrors,
|
|
983
962
|
STOCK_TICKER_SYMBOL_FIELD
|
|
984
963
|
),
|
|
985
|
-
labels: formUtils.getFieldLabels(STOCK_TICKER_SYMBOL_FIELD),
|
|
986
964
|
mask: formUtils.getMask("stockTickerSymbol"),
|
|
987
965
|
readonly: formUtils.isReadOnly("stockTickerSymbol"),
|
|
988
966
|
shouldValidate,
|
|
@@ -1261,7 +1239,6 @@ function BasicInformation({
|
|
|
1261
1239
|
const currentCountryTaxInformation = form.data.basicInformation?.taxInformation?.find(
|
|
1262
1240
|
(tax) => tax.country === country
|
|
1263
1241
|
);
|
|
1264
|
-
usePageLandedEvent();
|
|
1265
1242
|
const handleChangeFor = useCallback(
|
|
1266
1243
|
(fieldName, mode) => form.handleChangeFor(fieldName, "basicInformation", mode),
|
|
1267
1244
|
[form]
|
|
@@ -1618,16 +1595,27 @@ const KNOWN_DISALLOWED_INDEX_DATASET_STATES = [
|
|
|
1618
1595
|
StateCodesUS.Texas
|
|
1619
1596
|
];
|
|
1620
1597
|
const KOMPANY_SEARCH_FAILURE = "Kompany index and deep search both failed to complete";
|
|
1621
|
-
const
|
|
1622
|
-
|
|
1623
|
-
const { isAgnosticEndpointEnabled } = useCompanySearchFeature();
|
|
1624
|
-
return useQuery({
|
|
1598
|
+
const companySearchQueryOptions = (rootLegalEntityId, baseUrl, data, isAgnosticEndpointEnabled, options) => {
|
|
1599
|
+
return queryOptions({
|
|
1625
1600
|
queryKey: ["companySearch", data],
|
|
1626
|
-
queryFn: () => handleCompanySearch(rootLegalEntityId
|
|
1601
|
+
queryFn: () => handleCompanySearch(rootLegalEntityId, baseUrl, data, isAgnosticEndpointEnabled),
|
|
1627
1602
|
retry: 0,
|
|
1628
1603
|
...options
|
|
1629
1604
|
});
|
|
1630
1605
|
};
|
|
1606
|
+
const useCompanySearch = (data, options) => {
|
|
1607
|
+
const { rootLegalEntityId, baseUrl } = useApiContext();
|
|
1608
|
+
const { isAgnosticEndpointEnabled } = useCompanySearchFeature();
|
|
1609
|
+
return useQuery(
|
|
1610
|
+
companySearchQueryOptions(
|
|
1611
|
+
rootLegalEntityId.value,
|
|
1612
|
+
baseUrl.value,
|
|
1613
|
+
data,
|
|
1614
|
+
isAgnosticEndpointEnabled,
|
|
1615
|
+
options
|
|
1616
|
+
)
|
|
1617
|
+
);
|
|
1618
|
+
};
|
|
1631
1619
|
const handleCompanySearch = async (rootLegalEntityId, baseUrl, data, isAgnosticEndpointEnabled) => {
|
|
1632
1620
|
if (isAgnosticEndpointEnabled) {
|
|
1633
1621
|
const _data2 = {
|
|
@@ -1726,12 +1714,37 @@ const handleCompanyDataset = async (rootLegalEntityId, baseUrl, data, isAgnostic
|
|
|
1726
1714
|
const isDataCompliant = _data.company.lastUpdate ? Date.parse(date) - Date.parse(_data.company.lastUpdate) < LOW_RISK_COMPANY_DATA_COMPLIANCE_WINDOW : false;
|
|
1727
1715
|
return isDataCompliant && !KNOWN_DISALLOWED_INDEX_DATASET_STATES.includes(_data.state) ? await getCompanyDataset() : await refreshCompanyDataset();
|
|
1728
1716
|
};
|
|
1729
|
-
const
|
|
1730
|
-
|
|
1731
|
-
return useQuery({
|
|
1717
|
+
const verifyTinQueryOptions = (rootLegalEntityId, baseUrl, data, userEvents, options) => {
|
|
1718
|
+
return queryOptions({
|
|
1732
1719
|
queryKey: ["verifyTin", data],
|
|
1733
|
-
queryFn: data ? () => verifyTin(rootLegalEntityId
|
|
1720
|
+
queryFn: data ? () => verifyTin(rootLegalEntityId, baseUrl, data) : skipToken,
|
|
1734
1721
|
retry: 0,
|
|
1722
|
+
meta: {
|
|
1723
|
+
onSuccess: (data2) => {
|
|
1724
|
+
if (data2.matched === true) {
|
|
1725
|
+
tinMatched.value = true;
|
|
1726
|
+
userEvents.addPageEvent("Success", {
|
|
1727
|
+
actionType: "verify",
|
|
1728
|
+
returnValue: "verifyTin",
|
|
1729
|
+
returnType: "validation"
|
|
1730
|
+
});
|
|
1731
|
+
} else {
|
|
1732
|
+
tinMatched.value = false;
|
|
1733
|
+
userEvents.addPageEvent("Encountered error", {
|
|
1734
|
+
actionType: "verify",
|
|
1735
|
+
returnValue: "verifyTin",
|
|
1736
|
+
returnType: "validation"
|
|
1737
|
+
});
|
|
1738
|
+
}
|
|
1739
|
+
},
|
|
1740
|
+
onError: () => {
|
|
1741
|
+
userEvents.addPageEvent("Encountered error", {
|
|
1742
|
+
actionType: "verify",
|
|
1743
|
+
returnValue: "verifyTin",
|
|
1744
|
+
returnType: "backend"
|
|
1745
|
+
});
|
|
1746
|
+
}
|
|
1747
|
+
},
|
|
1735
1748
|
...options
|
|
1736
1749
|
});
|
|
1737
1750
|
};
|
|
@@ -1744,72 +1757,44 @@ const verifyTin = async (legalEntityId, baseUrl, data) => {
|
|
|
1744
1757
|
data
|
|
1745
1758
|
);
|
|
1746
1759
|
};
|
|
1747
|
-
const
|
|
1748
|
-
const startTime = Date.now();
|
|
1749
|
-
timings.set(key, { startTime });
|
|
1750
|
-
return startTime;
|
|
1751
|
-
};
|
|
1752
|
-
const endTiming = (key, timings) => {
|
|
1753
|
-
const timing = timings.get(key);
|
|
1754
|
-
if (!timing || timing.endTime) {
|
|
1755
|
-
return void 0;
|
|
1756
|
-
}
|
|
1757
|
-
const endTime = Date.now();
|
|
1758
|
-
const duration = endTime - timing.startTime;
|
|
1759
|
-
const updatedTiming = { ...timing, endTime, duration };
|
|
1760
|
-
timings.set(key, updatedTiming);
|
|
1761
|
-
return duration;
|
|
1762
|
-
};
|
|
1763
|
-
const withTiming = async (key, fn, analytics, timings = /* @__PURE__ */ new Map()) => {
|
|
1764
|
-
startTiming(key, timings);
|
|
1765
|
-
try {
|
|
1766
|
-
const result = await fn();
|
|
1767
|
-
const duration = endTiming(key, timings) || 0;
|
|
1768
|
-
analytics.addEvent("Performance", {
|
|
1769
|
-
actionType: "resolve",
|
|
1770
|
-
actionLevel: "page",
|
|
1771
|
-
label: key,
|
|
1772
|
-
additionalData: {
|
|
1773
|
-
duration
|
|
1774
|
-
}
|
|
1775
|
-
});
|
|
1776
|
-
return { result, duration };
|
|
1777
|
-
} catch (error) {
|
|
1778
|
-
const duration = endTiming(key, timings) || 0;
|
|
1779
|
-
analytics.addEvent("Performance", {
|
|
1780
|
-
actionType: "reject",
|
|
1781
|
-
actionLevel: "page",
|
|
1782
|
-
label: key,
|
|
1783
|
-
additionalData: {
|
|
1784
|
-
duration
|
|
1785
|
-
}
|
|
1786
|
-
});
|
|
1787
|
-
throw error;
|
|
1788
|
-
}
|
|
1789
|
-
};
|
|
1790
|
-
const trackPerformance = (key, fn, analytics) => {
|
|
1791
|
-
return withTiming(key, fn, analytics);
|
|
1792
|
-
};
|
|
1793
|
-
const useCompanySelection = (data, options) => {
|
|
1760
|
+
const useCompanySelection = (options) => {
|
|
1794
1761
|
const { rootLegalEntityId, baseUrl } = useApiContext();
|
|
1795
1762
|
const { isAgnosticEndpointEnabled } = useCompanySearchFeature();
|
|
1796
1763
|
const userEvents = useAnalyticsContext();
|
|
1797
|
-
return
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1764
|
+
return useMutation({
|
|
1765
|
+
mutationFn: async (data) => handleCompanySelection(
|
|
1766
|
+
rootLegalEntityId.value,
|
|
1767
|
+
baseUrl.value,
|
|
1768
|
+
data,
|
|
1769
|
+
isAgnosticEndpointEnabled
|
|
1770
|
+
),
|
|
1771
|
+
onMutate: () => {
|
|
1772
|
+
verifiedBusiness.value = void 0;
|
|
1773
|
+
},
|
|
1774
|
+
onSuccess: (data) => {
|
|
1775
|
+
if (data.tinMatched === true) {
|
|
1776
|
+
tinMatched.value = true;
|
|
1777
|
+
userEvents.addPageEvent("Success", {
|
|
1778
|
+
actionType: "select",
|
|
1779
|
+
returnValue: "companySelection",
|
|
1780
|
+
returnType: "validation"
|
|
1781
|
+
});
|
|
1782
|
+
} else {
|
|
1783
|
+
tinMatched.value = false;
|
|
1784
|
+
userEvents.addPageEvent("Encountered error", {
|
|
1785
|
+
actionType: "select",
|
|
1786
|
+
returnValue: "companySelection",
|
|
1787
|
+
returnType: "validation"
|
|
1788
|
+
});
|
|
1789
|
+
}
|
|
1790
|
+
},
|
|
1791
|
+
onError: () => {
|
|
1792
|
+
userEvents.addPageEvent("Encountered error", {
|
|
1793
|
+
actionType: "select",
|
|
1794
|
+
returnValue: "companySelection",
|
|
1795
|
+
returnType: "backend"
|
|
1796
|
+
});
|
|
1797
|
+
},
|
|
1813
1798
|
...options
|
|
1814
1799
|
});
|
|
1815
1800
|
};
|
|
@@ -1973,7 +1958,7 @@ function BusinessInformationCard({
|
|
|
1973
1958
|
invalidTin,
|
|
1974
1959
|
setIsBusinessSelection,
|
|
1975
1960
|
handleSelectBusiness,
|
|
1976
|
-
|
|
1961
|
+
retryCompanySelection,
|
|
1977
1962
|
handleConfirmSelection,
|
|
1978
1963
|
handleBackClick
|
|
1979
1964
|
}) {
|
|
@@ -1999,7 +1984,7 @@ function BusinessInformationCard({
|
|
|
1999
1984
|
}
|
|
2000
1985
|
};
|
|
2001
1986
|
const handleCardClick = () => {
|
|
2002
|
-
handleSelectBusiness(
|
|
1987
|
+
handleSelectBusiness();
|
|
2003
1988
|
};
|
|
2004
1989
|
return /* @__PURE__ */ jsx(Card, { selected: isSelected, onClick: isSelected ? void 0 : handleCardClick, children: /* @__PURE__ */ jsxs(StackLayout, { children: [
|
|
2005
1990
|
/* @__PURE__ */ jsx(
|
|
@@ -2028,15 +2013,7 @@ function BusinessInformationCard({
|
|
|
2028
2013
|
variant: "info",
|
|
2029
2014
|
type: "callToAction",
|
|
2030
2015
|
title: t(($) => $["businessSelection__failedToLoad"], { ns: "business" }),
|
|
2031
|
-
actions: /* @__PURE__ */ jsx(
|
|
2032
|
-
Button,
|
|
2033
|
-
{
|
|
2034
|
-
testId: "reloadBusiness",
|
|
2035
|
-
onClick: () => refetchCompanySelection(),
|
|
2036
|
-
variant: "link",
|
|
2037
|
-
children: t(($) => $["tryAgain"], { ns: "common" })
|
|
2038
|
-
}
|
|
2039
|
-
),
|
|
2016
|
+
actions: /* @__PURE__ */ jsx(Button, { testId: "reloadBusiness", onClick: retryCompanySelection, variant: "link", children: t(($) => $["tryAgain"], { ns: "common" }) }),
|
|
2040
2017
|
testId: "failedToLoad"
|
|
2041
2018
|
}
|
|
2042
2019
|
),
|
|
@@ -2088,13 +2065,12 @@ function BusinessSelection({
|
|
|
2088
2065
|
setLoadingStatus
|
|
2089
2066
|
}) {
|
|
2090
2067
|
const { t } = useTranslation(["common", "business"]);
|
|
2068
|
+
const { baseUrl, rootLegalEntityId } = useApiContext();
|
|
2091
2069
|
const { form } = useFormContext();
|
|
2092
2070
|
const queryClient = useQueryClient();
|
|
2093
2071
|
const userEvents = useAnalyticsContext();
|
|
2094
2072
|
const { isFeatureEnabled } = useToggleContext();
|
|
2095
2073
|
const [selectedBusinessId, setSelectedBusinessId] = useState();
|
|
2096
|
-
const [fetchParams, setFetchParams] = useState();
|
|
2097
|
-
usePageLandedEvent();
|
|
2098
2074
|
const providerAgnosticEndpointsEnabled = isFeatureEnabled(
|
|
2099
2075
|
"EnableProviderAgnosticCompanySearchAndSelect"
|
|
2100
2076
|
);
|
|
@@ -2105,38 +2081,36 @@ function BusinessSelection({
|
|
|
2105
2081
|
registrationNumber: form.data.basicInformation?.registrationNumber
|
|
2106
2082
|
});
|
|
2107
2083
|
const {
|
|
2108
|
-
data:
|
|
2109
|
-
isError:
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
|
|
2084
|
+
data: selectData,
|
|
2085
|
+
isError: selectError,
|
|
2086
|
+
isPending: selectPending,
|
|
2087
|
+
mutate: selectCompany,
|
|
2088
|
+
reset: resetCompanySelection
|
|
2089
|
+
} = useCompanySelection();
|
|
2090
|
+
const { mutateAsync: clearCompanyData2 } = useClearCompanyData();
|
|
2113
2091
|
const currentTin = form.data.basicInformation?.taxInformation?.find(
|
|
2114
2092
|
(taxId) => taxId.country === country
|
|
2115
2093
|
)?.number;
|
|
2116
|
-
const
|
|
2117
|
-
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
userEvents.addPageEvent("Success", {
|
|
2121
|
-
actionType: "select",
|
|
2122
|
-
returnValue: "companySelection"
|
|
2123
|
-
});
|
|
2124
|
-
} else {
|
|
2125
|
-
userEvents.addPageEvent("Encountered error", {
|
|
2126
|
-
actionType: "select",
|
|
2127
|
-
returnValue: "companySelection"
|
|
2128
|
-
});
|
|
2129
|
-
}
|
|
2130
|
-
setPrevBusinessData(businessData);
|
|
2131
|
-
}
|
|
2132
|
-
if (fetching) {
|
|
2133
|
-
verifiedBusiness.value = void 0;
|
|
2134
|
-
}
|
|
2135
|
-
const { mutateAsync: clearCompanyData2 } = useClearCompanyData();
|
|
2094
|
+
const fetchCompanyData = (business) => {
|
|
2095
|
+
resetCompanySelection();
|
|
2096
|
+
selectCompany(business);
|
|
2097
|
+
};
|
|
2136
2098
|
const handleChange = useCallback(
|
|
2137
2099
|
(fieldName, mode) => form.handleChangeFor(fieldName, "businessSelection", mode),
|
|
2138
2100
|
[form]
|
|
2139
2101
|
);
|
|
2102
|
+
const buildCompanySelectionParams = (result) => {
|
|
2103
|
+
return providerAgnosticEndpointsEnabled ? {
|
|
2104
|
+
id: result.resultId,
|
|
2105
|
+
name: result.name,
|
|
2106
|
+
tin: currentTin ?? ""
|
|
2107
|
+
} : {
|
|
2108
|
+
company: result,
|
|
2109
|
+
state: form.data.basicInformation?.stateOrProvince,
|
|
2110
|
+
name: result.name,
|
|
2111
|
+
tin: currentTin ?? ""
|
|
2112
|
+
};
|
|
2113
|
+
};
|
|
2140
2114
|
const handleSelectBusiness = (result) => {
|
|
2141
2115
|
const resultId = providerAgnosticEndpointsEnabled ? result.resultId : result.id;
|
|
2142
2116
|
if ((!selectedBusinessId || selectedBusinessId !== resultId) && currentTin) {
|
|
@@ -2150,23 +2124,13 @@ function BusinessSelection({
|
|
|
2150
2124
|
}
|
|
2151
2125
|
});
|
|
2152
2126
|
setSelectedBusinessId(resultId);
|
|
2153
|
-
|
|
2154
|
-
|
|
2155
|
-
id: result.resultId,
|
|
2156
|
-
name: result.name,
|
|
2157
|
-
tin: currentTin
|
|
2158
|
-
} : {
|
|
2159
|
-
company: result,
|
|
2160
|
-
state: form.data.basicInformation?.stateOrProvince,
|
|
2161
|
-
name: result.name,
|
|
2162
|
-
tin: currentTin
|
|
2163
|
-
}
|
|
2164
|
-
);
|
|
2127
|
+
const companySelectionParams = buildCompanySelectionParams(result);
|
|
2128
|
+
fetchCompanyData(companySelectionParams);
|
|
2165
2129
|
}
|
|
2166
2130
|
};
|
|
2167
2131
|
const handleConfirmSelection = () => {
|
|
2168
|
-
verifiedBusiness.value =
|
|
2169
|
-
applyVerifiedBusinessData(form, country,
|
|
2132
|
+
verifiedBusiness.value = selectData;
|
|
2133
|
+
applyVerifiedBusinessData(form, country, selectData, providerAgnosticEndpointsEnabled);
|
|
2170
2134
|
handleChange("hasSelectedBusiness", "blur")(true);
|
|
2171
2135
|
handleNextClick();
|
|
2172
2136
|
};
|
|
@@ -2177,20 +2141,24 @@ function BusinessSelection({
|
|
|
2177
2141
|
"input"
|
|
2178
2142
|
)(form.defaultData?.companyStructure?.entityType);
|
|
2179
2143
|
};
|
|
2180
|
-
const tinVerificationParams = {
|
|
2181
|
-
name: form.data.basicInformation?.legalCompanyName ?? "",
|
|
2182
|
-
tin: form.data.basicInformation?.taxInformation?.[0]?.number ?? ""
|
|
2183
|
-
};
|
|
2184
|
-
useVerifyTin(tinVerificationParams, { enabled: false });
|
|
2185
2144
|
const proceedToManualDataEntry = async () => {
|
|
2186
2145
|
clearCompanyData2();
|
|
2187
2146
|
restoreDefaultState();
|
|
2188
2147
|
verifiedBusiness.value = void 0;
|
|
2189
2148
|
try {
|
|
2190
2149
|
setLoadingStatus("loading");
|
|
2191
|
-
const
|
|
2192
|
-
|
|
2193
|
-
|
|
2150
|
+
const tinVerificationParams = {
|
|
2151
|
+
name: form.data.basicInformation?.legalCompanyName ?? "",
|
|
2152
|
+
tin: form.data.basicInformation?.taxInformation?.[0]?.number ?? ""
|
|
2153
|
+
};
|
|
2154
|
+
const { matched } = await queryClient.fetchQuery(
|
|
2155
|
+
verifyTinQueryOptions(
|
|
2156
|
+
rootLegalEntityId.peek(),
|
|
2157
|
+
baseUrl.peek(),
|
|
2158
|
+
tinVerificationParams,
|
|
2159
|
+
userEvents
|
|
2160
|
+
)
|
|
2161
|
+
);
|
|
2194
2162
|
tinMatched.value = matched;
|
|
2195
2163
|
if (matched === false) {
|
|
2196
2164
|
businessMismatchModalOpen.value = true;
|
|
@@ -2248,13 +2216,16 @@ function BusinessSelection({
|
|
|
2248
2216
|
{
|
|
2249
2217
|
result,
|
|
2250
2218
|
selectedBusinessId,
|
|
2251
|
-
currentBusinessSelection:
|
|
2252
|
-
fetching,
|
|
2253
|
-
fetchingError,
|
|
2254
|
-
invalidTin:
|
|
2255
|
-
handleSelectBusiness,
|
|
2219
|
+
currentBusinessSelection: selectData,
|
|
2220
|
+
fetching: selectPending,
|
|
2221
|
+
fetchingError: selectError,
|
|
2222
|
+
invalidTin: selectData?.tinMatched === false,
|
|
2223
|
+
handleSelectBusiness: () => handleSelectBusiness(result),
|
|
2256
2224
|
handleConfirmSelection,
|
|
2257
|
-
|
|
2225
|
+
retryCompanySelection: () => {
|
|
2226
|
+
const companySelectionParams = buildCompanySelectionParams(result);
|
|
2227
|
+
fetchCompanyData(companySelectionParams);
|
|
2228
|
+
},
|
|
2258
2229
|
handleBackClick
|
|
2259
2230
|
},
|
|
2260
2231
|
providerAgnosticEndpointsEnabled ? result.resultId : result.id
|
|
@@ -2327,7 +2298,6 @@ function CompanyStructure({
|
|
|
2327
2298
|
const { accountHolder } = useAccountHolder();
|
|
2328
2299
|
const { isSettingEnabled } = useSettingsContext();
|
|
2329
2300
|
const canChangeEntityType = isSettingEnabled(SettingNames.AllowLegalEntityTypeChange);
|
|
2330
|
-
usePageLandedEvent();
|
|
2331
2301
|
const formUtils = createFormUtils(
|
|
2332
2302
|
{ requiredFields: form.requiredFields?.companyStructure ?? [] },
|
|
2333
2303
|
t
|
|
@@ -2604,7 +2574,6 @@ function FinancialInformation({
|
|
|
2604
2574
|
}) {
|
|
2605
2575
|
const { t } = useTranslation("common");
|
|
2606
2576
|
const { form } = useFormContext();
|
|
2607
|
-
usePageLandedEvent();
|
|
2608
2577
|
const defaultCurrency = currencyByCountry[country]?.[0] ?? "EUR";
|
|
2609
2578
|
const handleChangeFor = useCallback(
|
|
2610
2579
|
(fieldName, mode) => form.handleChangeFor(fieldName, "companyFinancialInformation", mode),
|
|
@@ -2812,6 +2781,52 @@ const documentFormsIds = [
|
|
|
2812
2781
|
const stripWhitespace = (str) => str.replace(/\s/g, "");
|
|
2813
2782
|
const toNormalizedString = (s) => stripWhitespace(s.toLowerCase());
|
|
2814
2783
|
const isNormalizedStringMatch = (s1, s2) => toNormalizedString(s1) === toNormalizedString(s2);
|
|
2784
|
+
const startTiming = (key, timings = /* @__PURE__ */ new Map()) => {
|
|
2785
|
+
const startTime = Date.now();
|
|
2786
|
+
timings.set(key, { startTime });
|
|
2787
|
+
return startTime;
|
|
2788
|
+
};
|
|
2789
|
+
const endTiming = (key, timings) => {
|
|
2790
|
+
const timing = timings.get(key);
|
|
2791
|
+
if (!timing || timing.endTime) {
|
|
2792
|
+
return void 0;
|
|
2793
|
+
}
|
|
2794
|
+
const endTime = Date.now();
|
|
2795
|
+
const duration = endTime - timing.startTime;
|
|
2796
|
+
const updatedTiming = { ...timing, endTime, duration };
|
|
2797
|
+
timings.set(key, updatedTiming);
|
|
2798
|
+
return duration;
|
|
2799
|
+
};
|
|
2800
|
+
const withTiming = async (key, fn, analytics, timings = /* @__PURE__ */ new Map()) => {
|
|
2801
|
+
startTiming(key, timings);
|
|
2802
|
+
try {
|
|
2803
|
+
const result = await fn();
|
|
2804
|
+
const duration = endTiming(key, timings) || 0;
|
|
2805
|
+
analytics.addEvent("Performance", {
|
|
2806
|
+
actionType: "resolve",
|
|
2807
|
+
actionLevel: "page",
|
|
2808
|
+
label: key,
|
|
2809
|
+
additionalData: {
|
|
2810
|
+
duration
|
|
2811
|
+
}
|
|
2812
|
+
});
|
|
2813
|
+
return { result, duration };
|
|
2814
|
+
} catch (error) {
|
|
2815
|
+
const duration = endTiming(key, timings) || 0;
|
|
2816
|
+
analytics.addEvent("Performance", {
|
|
2817
|
+
actionType: "reject",
|
|
2818
|
+
actionLevel: "page",
|
|
2819
|
+
label: key,
|
|
2820
|
+
additionalData: {
|
|
2821
|
+
duration
|
|
2822
|
+
}
|
|
2823
|
+
});
|
|
2824
|
+
throw error;
|
|
2825
|
+
}
|
|
2826
|
+
};
|
|
2827
|
+
const trackPerformance = (key, fn, analytics) => {
|
|
2828
|
+
return withTiming(key, fn, analytics);
|
|
2829
|
+
};
|
|
2815
2830
|
const documentTypes$2 = [
|
|
2816
2831
|
{ id: "Internal company document", name: "internalCompanyDocument" },
|
|
2817
2832
|
{ id: "Business registry statement", name: "businessRegistryStatement" }
|
|
@@ -2829,7 +2844,6 @@ const GuidanceContent$4 = ({ t }) => {
|
|
|
2829
2844
|
function ProofOfDirectorDocument({ id, country, ...props }) {
|
|
2830
2845
|
const { t } = useTranslation(["common", "business"]);
|
|
2831
2846
|
const [selectedDocumentName, setSelectedDocumentName] = useState(documentTypes$2[0].id);
|
|
2832
|
-
usePageLandedEvent();
|
|
2833
2847
|
return /* @__PURE__ */ jsx(
|
|
2834
2848
|
MemoizedDocumentUpload,
|
|
2835
2849
|
{
|
|
@@ -2940,7 +2954,6 @@ function ProofOfOwnershipDocument({ id, country, ...props }) {
|
|
|
2940
2954
|
const { t } = useTranslation(["common", "business"]);
|
|
2941
2955
|
const [selectedDocumentName, setSelectedDocumentName] = useState(documentTypes$1[0].id);
|
|
2942
2956
|
const supportsMultiple = selectedDocumentName === DOC_TYPE_FOR_MULTI_UPLOAD;
|
|
2943
|
-
usePageLandedEvent();
|
|
2944
2957
|
useEffect(() => {
|
|
2945
2958
|
if (props.data?.proofOfOwnership?.length === 2) {
|
|
2946
2959
|
setSelectedDocumentName(DOC_TYPE_FOR_MULTI_UPLOAD);
|
|
@@ -2987,7 +3000,6 @@ const GuidanceContent$2 = ({ t }) => {
|
|
|
2987
3000
|
function ProofOfSignatoryDocument({ id, country, ...props }) {
|
|
2988
3001
|
const { t } = useTranslation(["common", "business"]);
|
|
2989
3002
|
const [selectedDocumentName, setSelectedDocumentName] = useState(documentTypes[0].id);
|
|
2990
|
-
usePageLandedEvent();
|
|
2991
3003
|
return /* @__PURE__ */ jsx(
|
|
2992
3004
|
MemoizedDocumentUpload,
|
|
2993
3005
|
{
|
|
@@ -3104,7 +3116,6 @@ function RegistrationDocument({
|
|
|
3104
3116
|
...props
|
|
3105
3117
|
}) {
|
|
3106
3118
|
const { t } = useTranslation(["common", "business"]);
|
|
3107
|
-
usePageLandedEvent();
|
|
3108
3119
|
return /* @__PURE__ */ jsx(
|
|
3109
3120
|
MemoizedDocumentUpload,
|
|
3110
3121
|
{
|
|
@@ -3202,7 +3213,6 @@ function TaxDocument({
|
|
|
3202
3213
|
...props
|
|
3203
3214
|
}) {
|
|
3204
3215
|
const { t } = useTranslation("business");
|
|
3205
|
-
usePageLandedEvent();
|
|
3206
3216
|
return /* @__PURE__ */ jsx(
|
|
3207
3217
|
MemoizedDocumentUpload,
|
|
3208
3218
|
{
|
|
@@ -3220,7 +3230,6 @@ function TaxDocument({
|
|
|
3220
3230
|
);
|
|
3221
3231
|
}
|
|
3222
3232
|
const VatDocument = ({ children }) => {
|
|
3223
|
-
usePageLandedEvent();
|
|
3224
3233
|
return children;
|
|
3225
3234
|
};
|
|
3226
3235
|
function BusinessDetailsMultiform({
|
|
@@ -3811,7 +3820,7 @@ function buildRequiredForms({
|
|
|
3811
3820
|
) && accountHolder !== "aTrust" && accountHolder !== "anUnincorporatedPartnership";
|
|
3812
3821
|
const filteredForms = Object.values(forms).filter(({ formId }) => {
|
|
3813
3822
|
if (formId === "businessSelection") {
|
|
3814
|
-
if (options?.
|
|
3823
|
+
if (options?.skipBusinessSelection) return false;
|
|
3815
3824
|
}
|
|
3816
3825
|
if (formId === "companyStructure") {
|
|
3817
3826
|
if (skipCompanyStructure) return false;
|
|
@@ -4058,14 +4067,23 @@ const BUSINESS_BANK_ACCOUNT_TAX_ID_COUNTRIES = [
|
|
|
4058
4067
|
CountryCodes.Estonia,
|
|
4059
4068
|
CountryCodes.Finland,
|
|
4060
4069
|
CountryCodes.France,
|
|
4070
|
+
CountryCodes.Italy,
|
|
4061
4071
|
CountryCodes.Latvia,
|
|
4062
4072
|
CountryCodes.Lithuania,
|
|
4063
4073
|
CountryCodes.Portugal,
|
|
4064
4074
|
CountryCodes.Spain
|
|
4065
4075
|
];
|
|
4076
|
+
const IT_REGISTRATION_TYPES_WITHOUT_TAX_ID_REUSE = ["CCIAA"];
|
|
4066
4077
|
const isBusinessBankAccountTaxIdCountry = (country) => {
|
|
4067
4078
|
return country ? BUSINESS_BANK_ACCOUNT_TAX_ID_COUNTRIES.includes(country) : false;
|
|
4068
4079
|
};
|
|
4080
|
+
const shouldReuseRegistrationNumberAsTaxId = (country, registrationNumberType) => {
|
|
4081
|
+
if (!isBusinessBankAccountTaxIdCountry(country)) return false;
|
|
4082
|
+
if (country === CountryCodes.Italy && registrationNumberType) {
|
|
4083
|
+
return !IT_REGISTRATION_TYPES_WITHOUT_TAX_ID_REUSE.includes(registrationNumberType);
|
|
4084
|
+
}
|
|
4085
|
+
return true;
|
|
4086
|
+
};
|
|
4069
4087
|
const mapBusinessDetailsDocumentToApiDocument = async (data, entityId) => {
|
|
4070
4088
|
const {
|
|
4071
4089
|
companyRegistrationDocument,
|
|
@@ -4157,7 +4175,10 @@ const mapBusinessDetailsSchemaToLegalEntity = (data, accountHolder, isFeatureEna
|
|
|
4157
4175
|
entityObject.taxInformation = taxData;
|
|
4158
4176
|
}
|
|
4159
4177
|
if (rootLegalEntity?.type === "organization" && // SOE-5931 - TODO: investigate L scenario returned to show this on the backend
|
|
4160
|
-
keysOf(rootLegalEntity.capabilities ?? {}).includes("issueBankAccount") && matchingScenario?.includes(Scenarios.L) && registrationNumber && data.basicInformation?.country &&
|
|
4178
|
+
keysOf(rootLegalEntity.capabilities ?? {}).includes("issueBankAccount") && matchingScenario?.includes(Scenarios.L) && registrationNumber && data.basicInformation?.country && shouldReuseRegistrationNumberAsTaxId(
|
|
4179
|
+
data.basicInformation?.country,
|
|
4180
|
+
data.additionalInformation?.registrationNumberType
|
|
4181
|
+
)) {
|
|
4161
4182
|
const taxCountry = data.basicInformation.country;
|
|
4162
4183
|
const privateCompanyTaxOptions = getTaxIdNumberOptions(
|
|
4163
4184
|
taxCountry,
|
|
@@ -4383,13 +4404,11 @@ async function submit({
|
|
|
4383
4404
|
await submitBusinessLines({
|
|
4384
4405
|
data,
|
|
4385
4406
|
legalEntity,
|
|
4386
|
-
trackingPayload,
|
|
4387
4407
|
efpBusinessLines,
|
|
4388
4408
|
createBusinessLine,
|
|
4389
4409
|
updateBusinessLine,
|
|
4390
4410
|
t,
|
|
4391
|
-
showToast
|
|
4392
|
-
userEvents
|
|
4411
|
+
showToast
|
|
4393
4412
|
});
|
|
4394
4413
|
userEvents.addTaskEvent("Success", trackingPayload);
|
|
4395
4414
|
showToast({
|
|
@@ -4486,8 +4505,6 @@ async function submitBusinessLines({
|
|
|
4486
4505
|
efpBusinessLines,
|
|
4487
4506
|
createBusinessLine,
|
|
4488
4507
|
updateBusinessLine,
|
|
4489
|
-
trackingPayload,
|
|
4490
|
-
userEvents,
|
|
4491
4508
|
t,
|
|
4492
4509
|
showToast
|
|
4493
4510
|
}) {
|
|
@@ -4546,18 +4563,7 @@ async function submitBusinessLines({
|
|
|
4546
4563
|
);
|
|
4547
4564
|
hadRejection = true;
|
|
4548
4565
|
});
|
|
4549
|
-
|
|
4550
|
-
actionType: trackingPayload.actionType,
|
|
4551
|
-
legalEntityName: trackingPayload.legalEntityName
|
|
4552
|
-
};
|
|
4553
|
-
if (!hadRejection) {
|
|
4554
|
-
userEvents.addTaskEvent("Success", eventPayload);
|
|
4555
|
-
} else {
|
|
4556
|
-
userEvents.addTaskEvent("Encountered error", {
|
|
4557
|
-
...eventPayload,
|
|
4558
|
-
returnType: "businessLines",
|
|
4559
|
-
returnValue: "couldNotCreateOrUpdateBusinessLine"
|
|
4560
|
-
});
|
|
4566
|
+
if (hadRejection) {
|
|
4561
4567
|
showToast({
|
|
4562
4568
|
label: t(($) => $["failedToUpdateEfpBusinessLines"], { ns: "business" }),
|
|
4563
4569
|
variant: "error"
|
|
@@ -4819,7 +4825,6 @@ function BusinessDetailsDropin({
|
|
|
4819
4825
|
const { mutateAsync: updateLegalEntity } = useUpdateLegalEntity();
|
|
4820
4826
|
const invalidateRootLegalEntity = useInvalidateRootLegalEntity();
|
|
4821
4827
|
const logger2 = createLogger();
|
|
4822
|
-
useTaskLandedEvent(taskType);
|
|
4823
4828
|
const isAssociationTaskType = taskType !== TaskTypes.BUSINESS_DETAILS;
|
|
4824
4829
|
const legalEntityType = taskType === TaskTypes.SOLE_PROPRIETOR_COMPANY ? LegalEntityTypes.SOLE_PROPRIETORSHIP : LegalEntityTypes.ORGANIZATION;
|
|
4825
4830
|
const subjectEntity = !isAssociationTaskType ? legalEntityResponse : taskType === TaskTypes.SOLE_PROPRIETOR_COMPANY ? associatedLegalArrangement : nestedLegalEntity;
|
|
@@ -4981,28 +4986,9 @@ function BusinessDetailsDropin({
|
|
|
4981
4986
|
tinMatched.value = void 0;
|
|
4982
4987
|
businessMismatchModalOpen.value = false;
|
|
4983
4988
|
}
|
|
4984
|
-
const
|
|
4985
|
-
|
|
4986
|
-
|
|
4987
|
-
forms: defaultForms,
|
|
4988
|
-
requiredFields: derivedProps?.requiredFields,
|
|
4989
|
-
optionalFields: derivedProps?.optionalFields,
|
|
4990
|
-
isValid: multiForm.isValid ?? {},
|
|
4991
|
-
problems,
|
|
4992
|
-
isSettingEnabled,
|
|
4993
|
-
accountHolder,
|
|
4994
|
-
legalEntityResponse
|
|
4995
|
-
},
|
|
4996
|
-
options: {
|
|
4997
|
-
hasNoSearchResults: false
|
|
4998
|
-
}
|
|
4999
|
-
})
|
|
5000
|
-
);
|
|
5001
|
-
const updateForms = useCallback(
|
|
5002
|
-
({
|
|
5003
|
-
searchResults
|
|
5004
|
-
}) => {
|
|
5005
|
-
const updatedForms = buildRequiredForms({
|
|
4989
|
+
const getRequiredForms = useCallback(
|
|
4990
|
+
(options) => {
|
|
4991
|
+
return buildRequiredForms({
|
|
5006
4992
|
config: {
|
|
5007
4993
|
forms: defaultForms,
|
|
5008
4994
|
requiredFields: derivedProps?.requiredFields,
|
|
@@ -5013,24 +4999,25 @@ function BusinessDetailsDropin({
|
|
|
5013
4999
|
accountHolder,
|
|
5014
5000
|
legalEntityResponse
|
|
5015
5001
|
},
|
|
5016
|
-
options
|
|
5017
|
-
hasNoSearchResults: searchResults && !searchResults.length
|
|
5018
|
-
}
|
|
5002
|
+
options
|
|
5019
5003
|
});
|
|
5020
|
-
setForms(updatedForms);
|
|
5021
|
-
return updatedForms;
|
|
5022
5004
|
},
|
|
5023
5005
|
[
|
|
5006
|
+
accountHolder,
|
|
5024
5007
|
defaultForms,
|
|
5025
5008
|
derivedProps?.optionalFields,
|
|
5026
5009
|
derivedProps?.requiredFields,
|
|
5027
|
-
multiForm.isValid,
|
|
5028
|
-
problems,
|
|
5029
5010
|
isSettingEnabled,
|
|
5030
|
-
|
|
5031
|
-
|
|
5011
|
+
legalEntityResponse,
|
|
5012
|
+
multiForm.isValid,
|
|
5013
|
+
problems
|
|
5032
5014
|
]
|
|
5033
5015
|
);
|
|
5016
|
+
const skipBusinessSelection = useSignal(true);
|
|
5017
|
+
const forms = useMemo(
|
|
5018
|
+
() => getRequiredForms({ skipBusinessSelection: skipBusinessSelection.value }),
|
|
5019
|
+
[getRequiredForms, skipBusinessSelection.value]
|
|
5020
|
+
);
|
|
5034
5021
|
const { mutateAsync: createBusinessLine } = useCreateBusinessLine();
|
|
5035
5022
|
const { mutateAsync: updateBusinessLine } = useUpdateBusinessLine();
|
|
5036
5023
|
const submitTask = useCallback(() => {
|
|
@@ -5103,115 +5090,131 @@ function BusinessDetailsDropin({
|
|
|
5103
5090
|
const handleBusinessMismatchContinue = () => {
|
|
5104
5091
|
setTrustedFields([]);
|
|
5105
5092
|
businessMismatchModalOpen.value = false;
|
|
5106
|
-
|
|
5093
|
+
skipBusinessSelection.value = activeForm.formId !== "businessSelection";
|
|
5094
|
+
const currentForms = getRequiredForms({ skipBusinessSelection: skipBusinessSelection.value });
|
|
5095
|
+
handleNextClick(currentForms);
|
|
5107
5096
|
};
|
|
5108
5097
|
const handleBusinessMismatchCancel = () => {
|
|
5109
5098
|
handleBackClick?.();
|
|
5110
5099
|
businessMismatchModalOpen.value = false;
|
|
5111
5100
|
tinMatched.value = false;
|
|
5112
5101
|
};
|
|
5113
|
-
const
|
|
5114
|
-
|
|
5115
|
-
|
|
5116
|
-
|
|
5117
|
-
|
|
5118
|
-
|
|
5119
|
-
|
|
5120
|
-
|
|
5121
|
-
|
|
5122
|
-
|
|
5123
|
-
|
|
5124
|
-
|
|
5125
|
-
|
|
5126
|
-
|
|
5127
|
-
|
|
5128
|
-
|
|
5129
|
-
|
|
5130
|
-
|
|
5131
|
-
|
|
5102
|
+
const { mutateAsync: selectCompany } = useCompanySelection();
|
|
5103
|
+
const { mutateAsync: clearCompanyData2 } = useClearCompanyData();
|
|
5104
|
+
const attemptBusinessSearch = async () => {
|
|
5105
|
+
const formsWithoutSearchResults = getRequiredForms({ skipBusinessSelection: true });
|
|
5106
|
+
if (!multiForm.data.basicInformation?.legalCompanyName) return formsWithoutSearchResults;
|
|
5107
|
+
setLoadingStatus("loading");
|
|
5108
|
+
tinMatched.value = void 0;
|
|
5109
|
+
verifiedBusiness.value = void 0;
|
|
5110
|
+
let searchResponse = {
|
|
5111
|
+
results: []
|
|
5112
|
+
};
|
|
5113
|
+
try {
|
|
5114
|
+
const companySearchInput = {
|
|
5115
|
+
name: multiForm.data.basicInformation?.legalCompanyName,
|
|
5116
|
+
country: multiForm.data.basicInformation?.country,
|
|
5117
|
+
state: multiForm.data.basicInformation?.stateOrProvince,
|
|
5118
|
+
registrationNumber: multiForm.data.basicInformation?.registrationNumber
|
|
5119
|
+
};
|
|
5120
|
+
searchResponse = (await trackPerformance(
|
|
5121
|
+
"companySearch",
|
|
5122
|
+
() => queryClient.fetchQuery(
|
|
5123
|
+
companySearchQueryOptions(
|
|
5124
|
+
rootLegalEntityId.peek(),
|
|
5125
|
+
baseUrl.peek(),
|
|
5126
|
+
companySearchInput,
|
|
5127
|
+
isAgnosticEndpointEnabled
|
|
5128
|
+
)
|
|
5129
|
+
),
|
|
5130
|
+
userEvents
|
|
5131
|
+
)).result;
|
|
5132
5132
|
userEvents.addPageEvent("Success", {
|
|
5133
5133
|
actionType: "resolve",
|
|
5134
5134
|
returnValue: "companySearch",
|
|
5135
5135
|
additionalData: {
|
|
5136
|
-
numberOfResults:
|
|
5136
|
+
numberOfResults: searchResponse.results.length
|
|
5137
5137
|
}
|
|
5138
5138
|
});
|
|
5139
|
+
} catch (e) {
|
|
5140
|
+
logger2.error(e);
|
|
5141
|
+
setLoadingStatus("error");
|
|
5142
|
+
return formsWithoutSearchResults;
|
|
5139
5143
|
}
|
|
5140
|
-
|
|
5141
|
-
|
|
5142
|
-
|
|
5143
|
-
|
|
5144
|
-
|
|
5145
|
-
|
|
5146
|
-
|
|
5147
|
-
|
|
5148
|
-
|
|
5149
|
-
|
|
5150
|
-
|
|
5151
|
-
|
|
5152
|
-
|
|
5153
|
-
|
|
5154
|
-
|
|
5155
|
-
|
|
5156
|
-
|
|
5157
|
-
|
|
5158
|
-
|
|
5159
|
-
|
|
5160
|
-
|
|
5161
|
-
|
|
5162
|
-
|
|
5163
|
-
|
|
5164
|
-
|
|
5165
|
-
|
|
5166
|
-
businessMismatchModalOpen.value = true;
|
|
5167
|
-
tinMatched.value = false;
|
|
5144
|
+
const tin = multiForm.data.basicInformation?.taxInformation?.find((taxId) => taxId.country === country)?.number ?? "";
|
|
5145
|
+
skipBusinessSelection.value = searchResponse.results.length === 0;
|
|
5146
|
+
const currentForms = getRequiredForms({ skipBusinessSelection: skipBusinessSelection.peek() });
|
|
5147
|
+
switch (searchResponse.results.length) {
|
|
5148
|
+
case 0: {
|
|
5149
|
+
try {
|
|
5150
|
+
const verifyTinQueryInput = {
|
|
5151
|
+
name: multiForm.data.basicInformation?.legalCompanyName,
|
|
5152
|
+
tin
|
|
5153
|
+
};
|
|
5154
|
+
const tinVerificationResponse = await queryClient.fetchQuery(
|
|
5155
|
+
verifyTinQueryOptions(
|
|
5156
|
+
rootLegalEntityId.peek(),
|
|
5157
|
+
baseUrl.peek(),
|
|
5158
|
+
verifyTinQueryInput,
|
|
5159
|
+
userEvents
|
|
5160
|
+
)
|
|
5161
|
+
);
|
|
5162
|
+
setLoadingStatus("success");
|
|
5163
|
+
const tinMatched2 = !!tinVerificationResponse.matched;
|
|
5164
|
+
handleTinMismatchModal(tinMatched2);
|
|
5165
|
+
return tinMatched2 ? currentForms : null;
|
|
5166
|
+
} catch (e) {
|
|
5167
|
+
logger2.error(e);
|
|
5168
|
+
setLoadingStatus("error");
|
|
5169
|
+
return currentForms;
|
|
5168
5170
|
}
|
|
5169
|
-
|
|
5170
|
-
|
|
5171
|
-
|
|
5172
|
-
|
|
5173
|
-
|
|
5174
|
-
|
|
5175
|
-
|
|
5176
|
-
|
|
5177
|
-
|
|
5178
|
-
|
|
5179
|
-
|
|
5171
|
+
}
|
|
5172
|
+
case 1: {
|
|
5173
|
+
if (!isNormalizedStringMatch(
|
|
5174
|
+
multiForm.data.basicInformation?.legalCompanyName,
|
|
5175
|
+
searchResponse.results[0].name
|
|
5176
|
+
)) {
|
|
5177
|
+
setLoadingStatus("success");
|
|
5178
|
+
return currentForms;
|
|
5179
|
+
}
|
|
5180
|
+
try {
|
|
5181
|
+
const companySelectionInput = {
|
|
5182
|
+
state: multiForm.data.basicInformation?.stateOrProvince,
|
|
5183
|
+
name: multiForm.data.basicInformation?.legalCompanyName,
|
|
5184
|
+
tin,
|
|
5180
5185
|
...isAgnosticEndpointEnabled ? {
|
|
5181
5186
|
id: searchResponse.results[0].resultId
|
|
5182
5187
|
} : { company: searchResponse.results[0] }
|
|
5183
|
-
}
|
|
5184
|
-
|
|
5185
|
-
|
|
5186
|
-
|
|
5187
|
-
|
|
5188
|
-
|
|
5189
|
-
|
|
5190
|
-
|
|
5191
|
-
|
|
5192
|
-
|
|
5193
|
-
|
|
5194
|
-
|
|
5195
|
-
|
|
5196
|
-
|
|
5197
|
-
|
|
5188
|
+
};
|
|
5189
|
+
const companySelectionResponse = await selectCompany(companySelectionInput);
|
|
5190
|
+
setLoadingStatus("success");
|
|
5191
|
+
const tinMatched2 = !!companySelectionResponse.tinMatched;
|
|
5192
|
+
handleTinMismatchModal(tinMatched2);
|
|
5193
|
+
if (tinMatched2) {
|
|
5194
|
+
verifiedBusiness.value = companySelectionResponse;
|
|
5195
|
+
skipBusinessSelection.value = true;
|
|
5196
|
+
applyVerifiedBusinessData(
|
|
5197
|
+
multiForm,
|
|
5198
|
+
country,
|
|
5199
|
+
verifiedBusiness.peek(),
|
|
5200
|
+
isAgnosticEndpointEnabled
|
|
5201
|
+
);
|
|
5202
|
+
return getRequiredForms({ skipBusinessSelection: skipBusinessSelection.peek() });
|
|
5203
|
+
} else {
|
|
5204
|
+
clearCompanyData2().then();
|
|
5205
|
+
return null;
|
|
5206
|
+
}
|
|
5207
|
+
} catch (e) {
|
|
5208
|
+
logger2.error(e);
|
|
5209
|
+
setLoadingStatus("error");
|
|
5210
|
+
clearCompanyData2().then();
|
|
5211
|
+
return formsWithoutSearchResults;
|
|
5198
5212
|
}
|
|
5199
5213
|
}
|
|
5200
|
-
|
|
5201
|
-
|
|
5202
|
-
|
|
5203
|
-
});
|
|
5204
|
-
if (!handleTinResponse(!!tinVerificationResponse.matched)) {
|
|
5205
|
-
return setLoadingStatus("success");
|
|
5206
|
-
}
|
|
5214
|
+
default: {
|
|
5215
|
+
setLoadingStatus("success");
|
|
5216
|
+
return currentForms;
|
|
5207
5217
|
}
|
|
5208
|
-
setLoadingStatus("success");
|
|
5209
|
-
return handleNextClick(currentForms);
|
|
5210
|
-
} catch (e) {
|
|
5211
|
-
logger2.error(e);
|
|
5212
|
-
setLoadingStatus("error");
|
|
5213
|
-
const currentForms = updateForms({ searchResults: [] });
|
|
5214
|
-
return handleNextClick(currentForms);
|
|
5215
5218
|
}
|
|
5216
5219
|
};
|
|
5217
5220
|
const overrideNextClick = async () => {
|
|
@@ -5221,12 +5224,12 @@ function BusinessDetailsDropin({
|
|
|
5221
5224
|
}
|
|
5222
5225
|
switch (activeForm.formId) {
|
|
5223
5226
|
case "basicInformation": {
|
|
5224
|
-
|
|
5227
|
+
const currentForms = await attemptBusinessSearch();
|
|
5228
|
+
if (currentForms === null) return;
|
|
5229
|
+
return handleNextClick(currentForms);
|
|
5225
5230
|
}
|
|
5226
5231
|
case "businessSelection": {
|
|
5227
|
-
const currentForms =
|
|
5228
|
-
searchResults: companySearchResponse?.results
|
|
5229
|
-
});
|
|
5232
|
+
const currentForms = getRequiredForms({});
|
|
5230
5233
|
return handleNextClick(currentForms);
|
|
5231
5234
|
}
|
|
5232
5235
|
default:
|
|
@@ -5236,11 +5239,6 @@ function BusinessDetailsDropin({
|
|
|
5236
5239
|
const handleCancelClick = () => {
|
|
5237
5240
|
setIsAddingBusinessDetails(false);
|
|
5238
5241
|
};
|
|
5239
|
-
useEffect(() => {
|
|
5240
|
-
updateForms({
|
|
5241
|
-
searchResults: searchingError ? [] : companySearchResponse?.results
|
|
5242
|
-
});
|
|
5243
|
-
}, [updateForms, companySearchResponse?.results, searchingError]);
|
|
5244
5242
|
const summarySections = useMemo(() => {
|
|
5245
5243
|
if (activeForm.formId !== "summary") return [];
|
|
5246
5244
|
return formatDataForSummary(multiForm.data, forms, t, i18n.language, isFeatureEnabled);
|
|
@@ -5343,6 +5341,14 @@ function BusinessDetailsDropin({
|
|
|
5343
5341
|
) })
|
|
5344
5342
|
] });
|
|
5345
5343
|
}
|
|
5344
|
+
const handleTinMismatchModal = (matched) => {
|
|
5345
|
+
if (matched) {
|
|
5346
|
+
tinMatched.value = true;
|
|
5347
|
+
} else {
|
|
5348
|
+
businessMismatchModalOpen.value = true;
|
|
5349
|
+
tinMatched.value = false;
|
|
5350
|
+
}
|
|
5351
|
+
};
|
|
5346
5352
|
const useDocuments = (documentDetails, entityId, options) => {
|
|
5347
5353
|
const { rootLegalEntityId, baseUrl } = useApiContext();
|
|
5348
5354
|
const documentUtils = documentApiUtils({
|