@adyen/kyc-components 4.0.0-compact.8 → 4.0.0-compact.9
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/README.md +31 -43
- package/dist/{AcceptTermsOfServiceComponent-kRAMcIqz.js → AcceptTermsOfServiceComponent-Y5aYfW8R.js} +31 -26
- package/dist/{AccountSetupRejected-WvT8wynP.js → AccountSetupRejected-BBPH8zsy.js} +2 -5
- package/dist/{ActionBar-BOto3kIR.js → ActionBar-CFMobUf9.js} +2 -2
- package/dist/{Address-DfQEZqfV.js → Address-DaePmCRZ.js} +22 -25
- package/dist/{Avatar-B1FMn4jz.js → Avatar-CbD3nP3P.js} +2 -2
- package/dist/{BusinessFinancingComponent-DgeP0WtS.js → BusinessFinancingComponent-BfmzIskz.js} +7 -7
- package/dist/{BusinessFinancingDropin-BpaTs3Tb.js → BusinessFinancingDropin-CLD8LAhP.js} +199 -160
- package/dist/BusinessFinancingPage-Bg-wKhhY.js +43 -0
- package/dist/{BusinessTypeSelectionPage-CsvC5c2P.js → BusinessTypeSelectionPage-D3EIjy_H.js} +11 -17
- package/dist/{Checkbox-CQQWg0dg.js → Checkbox-DmYVTVOD.js} +2 -2
- package/dist/{Confirm-DqMkw97y.js → Confirm-NubmSSR7.js} +3 -3
- package/dist/{ConstitutionalDocument-B1vSvDTu.js → ConstitutionalDocument-Djj_JCy4.js} +43 -30
- package/dist/{ContactDetails-171etkPM.js → ContactDetails-tNdzS3d4.js} +13 -10
- package/dist/{ContextGuidance-PEl3_E1Y.js → ContextGuidance-Dp2PWG5c.js} +2 -3
- package/dist/{CountryField-61GLcHq3.js → CountryField-C7SjQFv_.js} +4 -6
- package/dist/{CreateIndividualComponent-U4BUiWzp.js → CreateIndividualComponent-DwOiAUaA.js} +8 -8
- package/dist/{CreateTransferInstrumentComponent-CHPjKshD.js → CreateTransferInstrumentComponent-D29rvuqv.js} +6 -6
- package/dist/{Currency-8vOxnPYI.js → Currency-B4udmJgX.js} +12 -18
- package/dist/{CustomerSupport-DcnFyc9J.js → CustomerSupport-CU3xoowB.js} +10 -11
- package/dist/{DebugModal-yKPZa0En.js → DebugModal-C7WSGJRZ.js} +10 -11
- package/dist/{DecisionMakerDetailsPage-bIZxlptv.js → DecisionMakerDetailsPage-C-mB9v5X.js} +10 -10
- package/dist/{DecisionMakers-rudvJ8LE.js → DecisionMakers-AhL30Hnp.js} +114 -55
- package/dist/{Dropzone-Brt8j_On.js → Dropzone-B9NMiWRF.js} +4 -4
- package/dist/{EmbeddedStatus-C6KmRWYa.js → EmbeddedStatus-DkQk7orK.js} +3 -3
- package/dist/{EndStateLayout-CNBH6HSv.js → EndStateLayout-DVisdSEd.js} +2 -2
- package/dist/{EntityAssociation-CvfmwTx0.js → EntityAssociation-BSnS5dP_.js} +5 -6
- package/dist/{EntityGuidanceStatus-DfqozWFu.js → EntityGuidanceStatus-C2eFgLqN.js} +4 -4
- package/dist/{ErrorPanel-8g7vzs2J.js → ErrorPanel-D4kO8XQ8.js} +11 -13
- package/dist/{Field-GFhXhBL7.js → Field-CPoHG0G-.js} +3 -3
- package/dist/{FormNavigation-CuO_QOlJ.js → FormNavigation-yD8USwyG.js} +3 -3
- package/dist/{Individual.rules-NmFmV4le.js → Individual.rules-0EggSgTn.js} +16 -9
- package/dist/{IndividualDropin-D_UTW3Pt.js → IndividualDropin-Eo9sxeBW.js} +692 -267
- package/dist/{InputDate-D741B4uo.js → InputDate-BVYQZZuX.js} +2 -2
- package/dist/{InputText-BstgOD1h.js → InputText-C55stM8O.js} +2 -2
- package/dist/{Introduction-586MDoqe.js → Introduction-CZ_-eIBj.js} +4 -4
- package/dist/{JpAddress-D5DwOic-.js → JpAddress-B3HjxunW.js} +12 -14
- package/dist/{LandingLayout-DfrTphbg.js → LandingLayout-C_SbjQZA.js} +2 -3
- package/dist/{LegalCompanyNameField-Z2dNj0Qq.js → LegalCompanyNameField-DBiJbXem.js} +6 -6
- package/dist/{LegalRepresentativeDetailsPage-Dkufg--B.js → LegalRepresentativeDetailsPage-DFKA0RAe.js} +6 -6
- package/dist/{Link-hYPpX6dq.js → Link-ru5UMRxt.js} +2 -2
- package/dist/{ListItem-DCNK7Kw1.js → ListItem-C6ALEoR-.js} +3 -3
- package/dist/{LoaderWrapper-Brwtj1ws.js → LoaderWrapper-BL7Hc_DC.js} +2 -2
- package/dist/{ManageIndividualComponent-HmFUwG8J.js → ManageIndividualComponent-CkybWipX.js} +5 -5
- package/dist/{ManageTermsOfServiceComponent-CEXRN-aQ.js → ManageTermsOfServiceComponent-Cgjagedl.js} +6 -6
- package/dist/{ManageTransferInstrumentComponent-BZMoocXD.js → ManageTransferInstrumentComponent-DOpxzIzn.js} +16 -18
- package/dist/{MaskedInput-D1fbApUW.js → MaskedInput-1f16YE1z.js} +5 -5
- package/dist/{MaybeModal-D1Kv1uXL.js → MaybeModal-7NGTfxO6.js} +3 -3
- package/dist/{Modal-BRPW5V15.js → Modal-BMdWqd0Y.js} +15 -25
- package/dist/{Name-DNcNeuyc.js → Name-BQWEKtu9.js} +5 -5
- package/dist/NewSummary-D-9PYaY6.js +60 -0
- package/dist/{OnboardingDropinComponent-Jp7jobVe.js → OnboardingDropinComponent-CxUcB7IU.js} +813 -121
- package/dist/{PayoutDetailsDropin-CQ8jWnhg.js → PayoutDetailsDropin-DWqomQHU.js} +81 -190
- package/dist/PayoutDetailsPage-NIBSRWDA.js +55 -0
- package/dist/{RadioGroup-BLGCNZj6.js → RadioGroup-BuAX_NLA.js} +2 -2
- package/dist/{RadioGroupCard-Dp6kxT2Z.js → RadioGroupCard-Cbd_S6Fi.js} +2 -2
- package/dist/{Review-DsexJYqW.js → Review-BjdQyMeU.js} +6 -8
- package/dist/{RootBusinessDetailsPage-W6I6u26i.js → RootBusinessDetailsPage-CE9KIQRB.js} +6 -6
- package/dist/{RootBusinessLinesPage-BfW_VGr0.js → RootBusinessLinesPage-DYZETgKB.js} +129 -139
- package/dist/{RootIndividualDetailsPage-CU0ERRgH.js → RootIndividualDetailsPage-DCEHjEbR.js} +9 -10
- package/dist/{Select-_jyQwO_g.js → Select-seF9rM5K.js} +4 -4
- package/dist/{SignPCIComponent-DqNgUb0y.js → SignPCIComponent-CkaBa8MB.js} +18 -17
- package/dist/{SingpassSelection-CInOhNfV.js → SingpassSelection-FctS_Rd2.js} +6 -6
- package/dist/{SoleProprietorshipPage-Bgg5nHmh.js → SoleProprietorshipPage-BolUC48_.js} +5 -5
- package/dist/{SourceOfFundsPage-DWz_BoML.js → SourceOfFundsPage-qPaoxTgM.js} +272 -103
- package/dist/{StepProgressIndicator-DsULqiFr.js → StepProgressIndicator-DQIv4e4a.js} +2 -2
- package/dist/{StoreProvider-DwuHWsNs.js → StoreProvider-CBB99upB.js} +1032 -292
- package/dist/{StructuredList-CVMZBzwq.js → StructuredList-EKVbq_i3.js} +1 -1
- package/dist/{Summary-BtqxXkko.js → Summary-C5uRwUKn.js} +28 -24
- package/dist/{TaxInformationField-QyHTiEoc.js → TaxInformationField-B7AVdVgf.js} +614 -634
- package/dist/{TaxReportingDropin-Cs21XUR6.js → TaxReportingDropin-C2dEK3ij.js} +15 -17
- package/dist/{TextArea-DFDjCEZ2.js → TextArea-BbRKVKmP.js} +2 -2
- package/dist/{TileGroup-6wc032O1.js → TileGroup-oKbh_YGv.js} +3 -3
- package/dist/{TrustDetailsPage-BpITz9Vt.js → TrustDetailsPage-BbQB4A5-.js} +129 -120
- package/dist/{TrustMemberCompanyPage-Web2yU9Z.js → TrustMemberCompanyPage-CbRLAXBG.js} +7 -7
- package/dist/TrustMemberIndividualPage-BFRSkSas.js +64 -0
- package/dist/{TrustMemberRoleAndTypePage-CJEVcHdE.js → TrustMemberRoleAndTypePage-pS7j8_f6.js} +35 -44
- package/dist/{TrustMembersOverview-DefELe9P.js → TrustMembersOverview-aEVgO4Gr.js} +17 -21
- package/dist/{UnincorporatedPartnershipIndividualPage-BXQiQmMN.js → UnincorporatedPartnershipIndividualPage-DO7AXsP5.js} +6 -6
- package/dist/{UnincorporatedPartnershipMemberCompanyPage-DhzsjYbl.js → UnincorporatedPartnershipMemberCompanyPage-qvOu17yc.js} +6 -6
- package/dist/{UnincorporatedPartnershipMemberRoleAndTypePage-OdKCGjaA.js → UnincorporatedPartnershipMemberRoleAndTypePage-reBMcz-Y.js} +15 -16
- package/dist/{UnincorporatedPartnershipMembersOverview-DSeUBGiY.js → UnincorporatedPartnershipMembersOverview-B5YCchZY.js} +8 -12
- package/dist/{VerificationErrorAlert-I8hQrG1X.js → VerificationErrorAlert-BcntIwEo.js} +23 -4
- package/dist/{ViewVerificationStatusComponent-CneXbSXW.js → ViewVerificationStatusComponent-CrQahS3p.js} +3 -4
- 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-invited-decision-maker.js +87 -17
- package/dist/adyen-kyc-components.js +18 -47
- 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-u4rPfeF0.js → bafinUtils-B1LygAFl.js} +14 -2
- package/dist/{commonValidators-BWyE1hKM.js → commonValidators-CInBRB1V.js} +2 -2
- package/dist/{da-DK-JHZnsI59.js → da-DK-BfsYpvel.js} +18 -3
- package/dist/{da-DK-CGWvmdkq.js → da-DK-CLdNh9JT.js} +1 -2
- package/dist/{da-DK-gnPgzwrG.js → da-DK-CM1onr3w.js} +3 -1
- package/dist/{da-DK-Cd5IQPv3.js → da-DK-CMVthpSr.js} +2 -2
- package/dist/da-DK-Cv6XUSoW.js +13 -0
- package/dist/da-DK-D9FgPh5e.js +13 -0
- package/dist/{da-DK-h8DYQ_Iq.js → da-DK-mUuPR2YO.js} +2 -2
- package/dist/{de-DE-C9NH2zMh.js → de-DE-B5TOuf7l.js} +2 -2
- package/dist/{de-DE-DHDJhahG.js → de-DE-BT5g7ZXC.js} +1 -2
- package/dist/de-DE-BplDsJEb.js +13 -0
- package/dist/{de-DE-D3lLuF8z.js → de-DE-CA4mYLwp.js} +3 -1
- package/dist/{de-DE-VGGEkxUT.js → de-DE-CEsDXBn-.js} +18 -3
- package/dist/de-DE-Cg_RNIr-.js +13 -0
- package/dist/{de-DE-LQE_LFFL.js → de-DE-CwT6O212.js} +2 -2
- package/dist/{dropinUtils-NHYW3kj5.js → dropinUtils-D44Paj5u.js} +30 -16
- package/dist/{en-US-h0JneJJl.js → en-US--1W760fR.js} +2 -2
- package/dist/{en-US-CjjPhkB5.js → en-US-B-qSAb-7.js} +2 -1
- package/dist/en-US-B6tiYqel.js +13 -0
- package/dist/en-US-CfazE4ht.js +13 -0
- package/dist/{en-US-DoiQhi0j.js → en-US-CgakND3H.js} +1 -2
- package/dist/{en-US-D1sB335h.js → en-US-DIlZD5Wh.js} +16 -1
- package/dist/{en-US-DYP6rAvA.js → en-US-G607HIyo.js} +2 -2
- package/dist/{en-US-B96dpVon.js → en-US-fDACdKtT.js} +3 -1
- package/dist/{en-US.instructions-Ddr7AO05.js → en-US.instructions-CfIM2SRF.js} +1 -2
- package/dist/{es-ES-CxnsKEh4.js → es-ES-4FS7NoE7.js} +1 -2
- package/dist/{es-ES-CXDJLKAI.js → es-ES-BBcx4tvi.js} +3 -1
- package/dist/{es-ES-Bn9_0wK0.js → es-ES-BWFP5itn.js} +18 -3
- package/dist/es-ES-BZiC4JWr.js +13 -0
- package/dist/{es-ES-DdGmXdxO.js → es-ES-Bh8k9Zx8.js} +2 -2
- package/dist/es-ES-DRsix_Xn.js +13 -0
- package/dist/{es-ES-DK-7qtDf.js → es-ES-Wcpc6fm1.js} +2 -2
- package/dist/{fi-FI-fArobrt5.js → fi-FI-BKu826v5.js} +3 -1
- package/dist/fi-FI-BftTiz0c.js +13 -0
- package/dist/fi-FI-CEH4BfU3.js +13 -0
- package/dist/{fi-FI-PVFqd5Ra.js → fi-FI-DenK0WPz.js} +18 -3
- package/dist/{fi-FI-CIYa9SyS.js → fi-FI-DhUeTfn1.js} +2 -2
- package/dist/{fi-FI-57-xkioo.js → fi-FI-XpnJRPgt.js} +1 -2
- package/dist/{formUtils-Dg7QeiCj.js → formUtils-BEcbGHkz.js} +3 -18
- package/dist/{fr-FR-mJK4hjwD.js → fr-FR-BmTswZU5.js} +18 -3
- package/dist/fr-FR-C6jxjXAI.js +13 -0
- package/dist/{fr-FR-CiwkAb3E.js → fr-FR-C7iSS-OS.js} +3 -1
- package/dist/{fr-FR-l5z31r7i.js → fr-FR-CocDMzBc.js} +2 -2
- package/dist/{fr-FR-B2je0smB.js → fr-FR-DodNoPid.js} +2 -2
- package/dist/fr-FR-NxOktkWc.js +13 -0
- package/dist/{fr-FR-BxiX8Zfi.js → fr-FR-TqAhPvzz.js} +1 -2
- package/dist/{getName-DAC824XH.js → getName-CdgtxRvu.js} +2 -2
- package/dist/{getProblemsForEntity-Cx2uHyD0.js → getProblemsForEntity-DFP6N3co.js} +2 -2
- package/dist/{iframeWidget-DbWZPZHG.js → iframeWidget-B0fieiAe.js} +4 -4
- package/dist/{isEmpty-CzqpRnGb.js → isEmpty-3U9fSQsY.js} +2 -2
- package/dist/{it-IT-BAvmkEF8.js → it-IT-B4bk2Xev.js} +2 -2
- package/dist/{it-IT-DIbH-udG.js → it-IT-CUrn0j1I.js} +3 -1
- package/dist/it-IT-CXlaZNIj.js +13 -0
- package/dist/{it-IT-Dhwa9Ecj.js → it-IT-CZ4aDoVQ.js} +2 -2
- package/dist/{it-IT-masgjk9F.js → it-IT-D-jYXj6V.js} +1 -2
- package/dist/{it-IT-BTWkWSJq.js → it-IT-DJe5OflH.js} +18 -3
- package/dist/it-IT-OppZz3gW.js +13 -0
- package/dist/{ja-JP-vv3-YsHU.js → ja-JP-8yMqZqF2.js} +1 -2
- package/dist/ja-JP-A6ArIIZ8.js +13 -0
- package/dist/{ja-JP-Bc4U0S8-.js → ja-JP-BpeNsNhn.js} +3 -3
- package/dist/{ja-JP-bz7ekGnF.js → ja-JP-CbP1sVFP.js} +4 -2
- package/dist/ja-JP-CethQRoG.js +13 -0
- package/dist/{ja-JP-g6VOUGXZ.js → ja-JP-DK55NCZY.js} +1 -2
- package/dist/{ja-JP-CceCDXLB.js → ja-JP-GGV_-V6p.js} +18 -3
- package/dist/{ja-JP-Bv3ru9Xq.js → ja-JP-GX3l4yqn.js} +17 -17
- package/dist/{japanSupportUtils-Bn6j_2Iu.js → japanSupportUtils-CaeglTl1.js} +2 -2
- package/dist/{localizeDateString-rX5kfMAS.js → localizeDateString-D2nDwdFu.js} +2 -2
- package/dist/{mapExistingFile-euVcQ8wC.js → mapExistingFile-BigOdLU3.js} +4 -4
- package/dist/mapJpAddressSchemaToAddressLocalizations-DUoJIoRm.js +54 -0
- package/dist/{mapLegalEntityToIndividualSchema-BeggFrAo.js → mapLegalEntityToIndividualSchema-UVUkctdQ.js} +43 -45
- package/dist/{mapTransferInstrumentToPayoutAccount-DZ5tvBdP.js → mapTransferInstrumentToPayoutAccount-qpUP3sTf.js} +2 -2
- package/dist/{nl-NL-CTf7zH4M.js → nl-NL-4Mv4rnYy.js} +18 -3
- package/dist/{nl-NL-B0fvINJj.js → nl-NL-B2Uku0lw.js} +2 -2
- package/dist/nl-NL-BwWFlBOs.js +13 -0
- package/dist/nl-NL-CYFznuWn.js +13 -0
- package/dist/{nl-NL-DV4NqPVW.js → nl-NL-J7XpCpQm.js} +2 -2
- package/dist/{nl-NL-D1b5RUJ0.js → nl-NL-Jhr-ICkK.js} +1 -2
- package/dist/{nl-NL-NlkjOSYi.js → nl-NL-Lo8OF_nj.js} +3 -1
- package/dist/{no-NO-Crlsj6HG.js → no-NO-6chPsZZE.js} +3 -1
- package/dist/{no-NO-Dkh4SWbB.js → no-NO-BH6DId3q.js} +1 -2
- package/dist/no-NO-BsEie1We.js +13 -0
- package/dist/{no-NO-RfTK9KAV.js → no-NO-ByCZ3mhz.js} +18 -3
- package/dist/{no-NO-B9618F4_.js → no-NO-CtDyNTm6.js} +2 -2
- package/dist/{no-NO-Jw7Gae-a.js → no-NO-DjOcJWnC.js} +2 -2
- package/dist/no-NO-JWsSd7iY.js +13 -0
- package/dist/{patternValidators-EfBVKdNn.js → patternValidators-BkY5yvNa.js} +2 -2
- package/dist/{process-field-configurations-CAtKO6CG.js → process-field-configurations-BnIbMyYt.js} +5 -5
- package/dist/{pt-BR-BRdIEO2O.js → pt-BR-4Iozxvfr.js} +1 -2
- package/dist/pt-BR-BJOww8U1.js +13 -0
- package/dist/{pt-BR-BaTE6BB_.js → pt-BR-BKdT0Bpl.js} +2 -2
- package/dist/pt-BR-C-YbDjn-.js +13 -0
- package/dist/{pt-BR-zuqB_CBf.js → pt-BR-D4BTdo_w.js} +2 -2
- package/dist/{pt-BR-BfxgHKY4.js → pt-BR-DRBFUW-X.js} +3 -1
- package/dist/{pt-BR-BbFJsIVX.js → pt-BR-DRz5cG4o.js} +18 -3
- package/dist/{resolveEnvironment-D3grZ1cC.js → resolveEnvironment-C5RkjL5E.js} +5 -5
- package/dist/{roleMetadata-CkOicLV_.js → roleMetadata-C8VLzyMj.js} +3 -3
- package/dist/sl-SI-BfO3xEJx.js +13 -0
- package/dist/sl-SI-CJH14wbj.js +13 -0
- package/dist/{sl-SI-59OQIZ3f.js → sl-SI-C_4ajjU4.js} +2 -2
- package/dist/{sl-SI-D8dDckrW.js → sl-SI-DKSu25rO.js} +18 -3
- package/dist/{sl-SI-C-C-KJCX.js → sl-SI-UFngWs5n.js} +3 -1
- package/dist/{sl-SI-CvUzNn9Z.js → sl-SI-Y9h1ht45.js} +1 -2
- package/dist/style.css +1868 -1836
- package/dist/styles-CLV89_hH.js +1868 -1836
- package/dist/{sv-SE-D_Efxy3s.js → sv-SE-Blw4s8bC.js} +2 -2
- package/dist/sv-SE-CMLKzwtj.js +13 -0
- package/dist/{sv-SE-DGpvVvWj.js → sv-SE-Co7Nkd06.js} +18 -3
- package/dist/{sv-SE-BHfydid5.js → sv-SE-Cr0s35EH.js} +3 -1
- package/dist/{sv-SE-BsLkPEzn.js → sv-SE-DFSm22oQ.js} +1 -2
- package/dist/{sv-SE-CQWBP7n1.js → sv-SE-DKnUr7xo.js} +2 -2
- package/dist/sv-SE-ZsucW_Uj.js +13 -0
- package/dist/{isNewEntity-7Vw_eQBr.js → trusted-fields-provider-BgfIoSNJ.js} +6 -3
- package/dist/types/api/companyDataSet/companyDataset.types.d.ts +5 -0
- package/dist/types/api/companyDataSet/handleCompanyDataset.d.ts +6 -3
- package/dist/types/api/companySearch/companySearch.types.d.ts +8 -0
- package/dist/types/api/companySearch/useCompanySearch.d.ts +9 -3
- package/dist/types/api/companySelection/companySelection.types.d.ts +3 -3
- package/dist/types/api/companySelection/useCompanySelection.d.ts +1 -1
- package/dist/types/api/documentValidation/useDocumentValidate.d.ts +1 -0
- package/dist/types/api/invitations/invitations.types.d.ts +14 -0
- package/dist/types/api/invitations/useCreateInvitation.d.ts +14 -0
- package/dist/types/api/invitations/useInvitationStatuses.d.ts +8 -0
- package/dist/types/api/invitedEntity/useInvitedEntityAssociationData.d.ts +9 -0
- package/dist/types/api/legalEntity/useUpdateLegalEntity.d.ts +4 -4
- package/dist/types/api/queryKeys.d.ts +4 -1
- package/dist/types/api/toggles/useToggles.d.ts +9 -0
- package/dist/types/components/Apps/tasks/TaskList/types.d.ts +2 -2
- package/dist/types/components/BankAccount/fields/BankAccountNumber/BankAccountNumber.d.ts +1 -1
- package/dist/types/components/BankAccount/fields/BankCode/BankCode.d.ts +1 -1
- package/dist/types/components/BankAccount/fields/BranchCode/BranchCode.d.ts +1 -1
- package/dist/types/components/BankAccount/fields/Iban/Iban.d.ts +1 -1
- package/dist/types/components/BankAccount/forms/PayoutDetails/rules.d.ts +1 -1
- package/dist/types/components/BankAccount/forms/PayoutDetails/types.d.ts +2 -0
- package/dist/types/components/BankAccount/mapping/payoutKeyMappings.d.ts +2 -2
- package/dist/types/components/BankAccount/pages/PayoutDetailsPage.d.ts +0 -1
- package/dist/types/components/BankAccount/tasks/PayoutDetailsDropin/utils.d.ts +1 -1
- package/dist/types/components/Business/forms/AdditionalInformation/VerifiedBusinessCard/VerifiedBusinessCard.d.ts +2 -2
- package/dist/types/components/Business/forms/AdditionalInformation/utils.d.ts +2 -2
- package/dist/types/components/Business/forms/BusinessDetails/forms.d.ts +2 -2
- package/dist/types/components/Business/forms/BusinessSelection/BusinessInformationCard/BusinessInformationCard.d.ts +7 -7
- package/dist/types/components/Business/forms/FinancialInformation/FinancialInformation.d.ts +1 -1
- package/dist/types/components/Business/forms/FinancialInformation/mapping/mapFinancialInformationToFinancialReport.d.ts +1 -1
- package/dist/types/components/Business/forms/FinancialInformation/types.d.ts +7 -17
- package/dist/types/components/Business/forms/rules.d.ts +10 -8
- package/dist/types/components/Business/tasks/BusinessDetailsDropin/types.d.ts +14 -1
- package/dist/types/components/Business/tasks/BusinessDetailsDropin/utils.d.ts +1 -6
- package/dist/types/components/Business/tasks/BusinessDetailsDropin/validate.d.ts +2 -1
- package/dist/types/components/Business/utils/applyVerifiedBusinessData.d.ts +1 -1
- package/dist/types/components/Business/utils/companyUtil.d.ts +1 -1
- package/dist/types/components/Business/utils/formatDataForSummary.d.ts +6 -0
- package/dist/types/components/Business/utils/submit.d.ts +2 -0
- package/dist/types/components/Business/utils/useCompanySearchExperiments.d.ts +5 -0
- package/dist/types/components/BusinessLines/fields/SctaField/types.d.ts +1 -1
- package/dist/types/components/BusinessLines/forms/SalesChannelsForm/types.d.ts +1 -1
- package/dist/types/components/BusinessLines/tasks/utils.d.ts +4 -4
- package/dist/types/components/Contract/tasks/PciDropin/PciDropin.d.ts +1 -1
- package/dist/types/components/EFP/fields/NaceCodeField/types.d.ts +1 -1
- package/dist/types/components/EFP/mapping/businessFinancingKeyMappings.d.ts +2783 -2783
- package/dist/types/components/EFP/tasks/BusinessFinancingDropin/BusinessFinancingFinancialInformation.d.ts +1 -1
- package/dist/types/components/EFP/tasks/BusinessFinancingDropin/BusinessFinancingSummary.d.ts +14 -0
- package/dist/types/components/EFP/tasks/BusinessFinancingDropin/types.d.ts +5 -7
- package/dist/types/components/EFP/tasks/BusinessFinancingDropin/utils.d.ts +8 -9
- package/dist/types/components/EFP/tasks/BusinessFinancingDropin/validate.d.ts +1 -1
- package/dist/types/components/EFP/tasks/SourceOfFundsDropin/types.d.ts +11 -0
- package/dist/types/components/EFP/tasks/SourceOfFundsDropin/utils.d.ts +15 -0
- package/dist/types/components/EmbeddedDropins/BusinessFinancingComponent/utils.d.ts +1 -2
- package/dist/types/components/EmbeddedDropins/CreateIndividualComponent/CreateIndividualComponent.d.ts +2 -2
- package/dist/types/components/Individual/fields/DriversLicense/DriversLicense.d.ts +1 -1
- package/dist/types/components/Individual/fields/DriversLicense/DriversLicense.types.d.ts +1 -0
- package/dist/types/components/Individual/fields/IdentityNumber/IdentityNumber.d.ts +1 -1
- package/dist/types/components/Individual/forms/AdditionalPersonalDetails/AdditionalPersonalDetails.types.d.ts +2 -2
- package/dist/types/components/Individual/forms/AdditionalPersonalDetails/validate.d.ts +5 -4
- package/dist/types/components/Individual/forms/DataConflictsModal/ConflictRow.d.ts +2 -2
- package/dist/types/components/Individual/forms/DataConflictsModal/DataConflictsModal.d.ts +6 -6
- package/dist/types/components/Individual/forms/IdDocumentUpload/types.d.ts +2 -2
- package/dist/types/components/Individual/forms/IdVerificationMethod/{individualOnfidoConflictsSchema.d.ts → individualConflictsSchema.d.ts} +12 -12
- package/dist/types/components/Individual/forms/IdVerificationMethod/mapExtractionResultToSchema.d.ts +2 -2
- package/dist/types/components/Individual/forms/IdVerificationMethod/validateExtractionResult.d.ts +2 -2
- package/dist/types/components/Individual/forms/Individual.d.ts +12 -7
- package/dist/types/components/Individual/forms/Individual.rules.d.ts +6 -5
- package/dist/types/components/Individual/forms/Individual.types.d.ts +15 -5
- package/dist/types/components/Individual/forms/InviteDetails/InviteDetails.d.ts +4 -0
- package/dist/types/components/Individual/forms/InviteDetails/InviteDetails.types.d.ts +13 -0
- package/dist/types/components/Individual/forms/InviteDetails/validate.d.ts +3 -0
- package/dist/types/components/Individual/forms/form-ids.d.ts +2 -2
- package/dist/types/components/Individual/helpers/bafinUtils.d.ts +2 -2
- package/dist/types/components/Individual/helpers/mandateIdVerificationForMotionCapture.d.ts +2 -2
- package/dist/types/components/Individual/helpers/roleUtils.d.ts +2 -2
- package/dist/types/components/Individual/mapping/individualKeyMappings.d.ts +6 -6
- package/dist/types/components/Individual/mapping/mapApiDocumentToIndividualDocuments.d.ts +2 -2
- package/dist/types/components/Individual/mapping/mapIndividualDocumentToApiDocument.d.ts +2 -2
- package/dist/types/components/Individual/mapping/mapIndividualSchemaToLegalEntity.d.ts +2 -2
- package/dist/types/components/Individual/mapping/mapLegalEntityToIndividualSchema.d.ts +2 -2
- package/dist/types/components/Individual/pages/DecisionMakerDetailsPage.d.ts +2 -2
- package/dist/types/components/Individual/pages/LegalRepresentativeDetailsPage.d.ts +2 -2
- package/dist/types/components/Individual/pages/RootIndividualDetailsPage.d.ts +2 -2
- package/dist/types/components/Individual/tasks/DecisionMakers/DecisionMakerDetails/utils.d.ts +3 -3
- package/dist/types/components/Individual/tasks/DecisionMakers/DecisionMakerListItem/DecisionMakerListItem.d.ts +8 -0
- package/dist/types/components/Individual/tasks/DecisionMakers/InvitedDecisionMaker/InvitedDecisionMakerGettingStarted/InvitedDecisionMakerGettingStarted.d.ts +4 -0
- package/dist/types/components/Individual/tasks/DecisionMakers/InvitedDecisionMaker/InvitedDecisionMakerSubmitSuccess/InvitedDecisionMakerSubmitSuccess.d.ts +1 -0
- package/dist/types/components/Individual/tasks/IndividualDropin/IndividualDropin.d.ts +2 -2
- package/dist/types/components/Individual/tasks/IndividualDropin/individualFormConfig.d.ts +3 -3
- package/dist/types/components/Shared/FormFlow/FormFlow.d.ts +1 -1
- package/dist/types/components/Shared/FormFlow/FormFlow.types.d.ts +2 -0
- package/dist/types/components/Shared/FormNavigation/types.d.ts +2 -2
- package/dist/types/components/Shared/FormWrapper/FormWrapper.d.ts +2 -2
- package/dist/types/components/Shared/NewSummary/NewSummary.d.ts +14 -0
- package/dist/types/components/Shared/Summary/Summary.d.ts +1 -0
- package/dist/types/components/Shared/TaskVerificationStatus/TaskVerificationStatus.d.ts +1 -1
- package/dist/types/components/Shared/fields/BusinessRegistrationNumberField/BusinessRegistrationNumberField.d.ts +1 -1
- package/dist/types/components/Shared/fields/BusinessRegistrationNumberField/fieldConfig.d.ts +0 -2
- package/dist/types/components/Shared/fields/BusinessRegistrationNumberField/types.d.ts +3 -1
- package/dist/types/components/Shared/fields/Currency/fieldConfig.d.ts +3 -0
- package/dist/types/components/Shared/fields/Currency/types.d.ts +1 -1
- package/dist/types/components/Shared/fields/EInvoicingCodeField/EInvoicingCodeField.d.ts +1 -1
- package/dist/types/components/Shared/fields/EInvoicingCodeField/types.d.ts +1 -1
- package/dist/types/components/Shared/fields/FinancialReportingDate/fieldConfig.d.ts +3 -0
- package/dist/types/components/Shared/fields/IdFieldTypeSelector/CompanyRegistrationNumberTypeSelector.d.ts +2 -2
- package/dist/types/components/Shared/fields/IdFieldTypeSelector/VatNumberTypeSelector.d.ts +2 -2
- package/dist/types/components/Shared/fields/IdFieldTypeSelector/countryIdNumberTypes.d.ts +5 -244
- package/dist/types/components/Shared/fields/IndustryCodeField/types.d.ts +1 -1
- package/dist/types/components/Shared/fields/LocalizedLegalCompanyNameField/fieldConfig.d.ts +4 -4
- package/dist/types/components/Shared/fields/NumberOfEmployees/fieldConfig.d.ts +3 -0
- package/dist/types/components/Shared/fields/PhoneField/PhoneField.d.ts +1 -1
- package/dist/types/components/Shared/fields/PhoneField/types.d.ts +2 -0
- package/dist/types/components/Shared/fields/ReportedValueOptionField/ReportedValueOptionField.d.ts +3 -0
- package/dist/types/components/Shared/fields/ReportedValueOptionField/fieldConfig.d.ts +5 -0
- package/dist/types/components/Shared/fields/ReportedValueOptionField/types.d.ts +10 -0
- 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/fields/TaxInformationField/TaxIdNumberTypeSelector/TaxIdNumberTypeSelector.d.ts +17 -0
- package/dist/types/components/Shared/fields/{IdFieldTypeSelector → TaxInformationField/TaxIdNumberTypeSelector}/getDefaultTaxIdNumberType.d.ts +5 -5
- package/dist/types/components/Shared/fields/{IdFieldTypeSelector → TaxInformationField/TaxIdNumberTypeSelector}/inferTaxIdNumberType.d.ts +5 -5
- package/dist/types/components/Shared/fields/TaxInformationField/TaxInformationField.d.ts +1 -1
- package/dist/types/components/Shared/fields/TaxInformationField/fieldConfig.d.ts +2 -3
- package/dist/types/components/Shared/fields/TaxInformationField/taxIdNumberTypes.d.ts +232 -0
- package/dist/types/components/Shared/fields/TaxInformationField/types.d.ts +9 -1
- package/dist/types/components/Shared/fields/TaxInformationField/utils.d.ts +13 -0
- package/dist/types/components/Shared/fields/VatNumberField/VatNumberField.d.ts +1 -1
- package/dist/types/components/Shared/fields/VatNumberField/types.d.ts +1 -1
- package/dist/types/components/Shared/forms/Address/localized/jp/mapJpAddressSummary.d.ts +5 -0
- package/dist/types/components/Shared/forms/Address/types.d.ts +5 -5
- package/dist/types/components/Shared/forms/Address/utils.d.ts +6 -1
- package/dist/types/components/Shared/forms/Address/validate.d.ts +4 -4
- package/dist/types/components/Shared/forms/BusinessTypeSelection/types.d.ts +6 -6
- package/dist/types/components/Shared/forms/DocumentUpload/types.d.ts +2 -2
- package/dist/types/components/Shared/forms/RegistrationAddress/types.d.ts +2 -2
- package/dist/types/components/Trust/forms/Trust/rules.d.ts +5 -4
- package/dist/types/components/Trust/pages/TrustMemberIndividualPage.d.ts +2 -2
- package/dist/types/components/Trust/tasks/TrustDropin/TrustMultiformDropin.d.ts +1 -1
- package/dist/types/components/Trust/utils/trustMemberGuidance.d.ts +2 -2
- package/dist/types/components/UnincorporatedPartnership/pages/UnincorporatedPartnershipIndividualPage.d.ts +2 -2
- package/dist/types/components/UnincorporatedPartnership/tasks/UnincorporatedPartnershipMembers/types.d.ts +2 -2
- package/dist/types/components/ui/atoms/Icon/Icon.d.ts +1 -1
- package/dist/types/components/ui/atoms/RadioGroup/RadioGroup.d.ts +2 -2
- package/dist/types/components/ui/atoms/Select/Select.d.ts +1 -1
- package/dist/types/components/ui/atoms/Svg/Svg.d.ts +1 -4
- package/dist/types/components/ui/atoms/Svg/svgs.d.ts +0 -4
- package/dist/types/components/ui/molecules/Dropzone/FilePicker.d.ts +2 -2
- package/dist/types/components/ui/molecules/Dropzone/types.d.ts +2 -2
- package/dist/types/context/ExperimentContext/ExperimentsContextProvider.d.ts +1 -1
- package/dist/types/context/ExperimentContext/types.d.ts +9 -7
- package/dist/types/context/FormRouterContext/FormRouterContext.d.ts +4 -0
- package/dist/types/context/FormRouterContext/useFormRouterContext.d.ts +3 -0
- package/dist/types/context/StateContext/types.d.ts +2 -2
- package/dist/types/core/models/api/financialReport.d.ts +7 -1
- package/dist/types/core/models/api/legal-entity.d.ts +1 -6
- package/dist/types/core/models/api/organization.d.ts +1 -1
- package/dist/types/core/user-events.d.ts +1 -1
- package/dist/types/embeds/individual-configuration/adyen-individual-configuration.types.d.ts +2 -2
- package/dist/types/hooks/useForm/types.d.ts +3 -6
- package/dist/types/hooks/useUboQuestionnaire.d.ts +1 -1
- package/dist/types/language/types.d.ts +3 -15
- package/dist/types/language/utils.d.ts +6 -5
- package/dist/types/stores/formState.d.ts +2 -2
- package/dist/types/stores/globalStore/get-task-status.d.ts +6 -0
- package/dist/types/types/errors/error-message.d.ts +2 -2
- package/dist/types/types/errors/remediation.d.ts +2 -2
- package/dist/types/types/form-configuration.d.ts +2 -2
- package/dist/types/types/form.d.ts +2 -2
- package/dist/types/utils/decisionMaker.d.ts +2 -2
- package/dist/types/utils/entityStatusUtil.d.ts +1 -1
- package/dist/types/utils/fieldConfigurations.d.ts +6 -6
- package/dist/types/utils/formUtils.d.ts +5 -6
- package/dist/types/utils/getDisplayErrorMessage.d.ts +2 -2
- package/dist/types/utils/getFieldsWithExistingData.d.ts +2 -2
- package/dist/types/utils/not.d.ts +12 -0
- package/dist/types/utils/roleMetadata.d.ts +4 -4
- package/dist/types/utils/textTransformation/toFullWidth.d.ts +2 -3
- package/dist/types/utils/validatorUtils.d.ts +1 -0
- package/dist/types-CQ2p58-6.js +36 -0
- package/dist/{types-COOK2jmb.js → types-CcxS0801.js} +2 -2
- package/dist/{types-BveVR11j.js → types-DcouFF7I.js} +2 -2
- package/dist/{types-B7GElie6.js → types-_ugkpUNx.js} +11 -9
- package/dist/{types-DlIEfVQ_.js → types-vXKpLHZM.js} +2 -2
- package/dist/{Image-8l9eOMtL.js → unincorporated-partnership-QawJyhxx.js} +8 -7
- package/dist/{useAssociatedLegalEntity-BMeOu2ox.js → useAssociatedLegalEntity-DXp9udzH.js} +2 -2
- package/dist/{useBusinessDetailsData-CAiFFs88.js → useBusinessDetailsData-CgfVRRNG.js} +1090 -917
- package/dist/{useCreateLegalEntity-BzRbiLpn.js → useCreateLegalEntity-C5daQcez.js} +2 -2
- package/dist/{useForm-De1DLL-w.js → useForm-BQDytQRR.js} +3 -3
- package/dist/{useFormContext-BPBBPKhK.js → useFormContext-CX6rQNws.js} +9 -8
- package/dist/{FormWrapper-MyJZP-4s.js → useGlobalData-xVRfhIqc.js} +66 -11
- package/dist/{useMultiForm-Cs0-iUXR.js → useMultiForm-DRZSxmEa.js} +12 -6
- package/dist/{useOnboardingStatus-DeOWI7wU.js → useOnboardingStatus-C6X8CPF2.js} +2 -2
- package/dist/{useScenarios-BE647UZ3.js → useScenarios-C5uruC52.js} +2 -2
- package/dist/{useTermsOfServiceStatus-uSdmiCT3.js → useTermsOfServiceStatus-CABu0vXO.js} +2 -2
- package/dist/{useToastContext-B1vl-x5N.js → useToastContext-C2BAjZxO.js} +2 -2
- package/dist/{useUnincorporatedPartnershipMembers-D7WsY1Dm.js → useUnincorporatedPartnershipMembers-Duhfzca2.js} +5 -5
- package/dist/{useUpdateBusinessLines-CdYUvjtv.js → useUpdateBusinessLines-CFgADcSW.js} +5 -5
- package/dist/{useUpdateLegalEntity-3og4ank0.js → useUpdateLegalEntity-vK1vTzAB.js} +3 -3
- package/dist/{utils-Ds83U_vM.js → utils-Bh3VtXaW.js} +55 -22
- package/dist/{utils-CXUBcmhg.js → utils-Bo1WrnnM.js} +6 -6
- package/dist/{utils-CHdXRuoO.js → utils-BvFIL5qs.js} +22 -2
- package/dist/{utils-CK72-tJC.js → utils-HUgTKRia.js} +2 -2
- package/dist/{utils-CYscdqdR.js → utils-nUjUW0ze.js} +2 -2
- package/dist/{validate-TM7n49em.js → validate-CDGLD3wC.js} +24 -12
- package/dist/{validate-CoZiS4Ny.js → validate-DDCTmBf4.js} +5 -5
- package/dist/{validationError-DozI7J9X.js → validationError-DmAD3_AN.js} +3 -3
- package/package.json +35 -53
- package/dist/Accordion-s3uIJ_O9.js +0 -88
- package/dist/Alert-_9nVl6uE.js +0 -169
- package/dist/BusinessFinancingPage-qodSYGAB.js +0 -43
- package/dist/DropinLayout-CBP_cHLC.js +0 -17
- package/dist/Header-B9Tv_mvA.js +0 -83
- package/dist/TaskVerificationStatus-DQVG3_xF.js +0 -129
- package/dist/TrustMemberIndividualPage-tBGM6dM8.js +0 -64
- package/dist/accountHolderUtils-CPiTlzkl.js +0 -66
- package/dist/company-types-value-D_mKv5PT.js +0 -23
- package/dist/da-DK-DvZ431fC.js +0 -13
- package/dist/da-DK-DzcTI92X.js +0 -13
- package/dist/datasetUtil-BHQp0-xL.js +0 -58
- package/dist/de-DE-0uSzhWg5.js +0 -13
- package/dist/de-DE-dPfrbCii.js +0 -13
- package/dist/en-US-CozY33On.js +0 -13
- package/dist/en-US-cVpRgdC8.js +0 -13
- package/dist/es-ES--IvNed_Q.js +0 -13
- package/dist/es-ES-B7dt4cn7.js +0 -13
- package/dist/fi-FI-BUixKfXH.js +0 -13
- package/dist/fi-FI-REMsyTSr.js +0 -13
- package/dist/filterProblemsByTaskForms-Cz7iQtms.js +0 -30
- package/dist/fr-FR-BM-qNLci.js +0 -13
- package/dist/fr-FR-CvHWmim-.js +0 -13
- package/dist/getTrustedFields-C5-mXl-l.js +0 -64
- package/dist/it-IT-BeX7-OcD.js +0 -13
- package/dist/it-IT-D63gRTDc.js +0 -13
- package/dist/ja-JP-B3wVYIJU.js +0 -151
- package/dist/ja-JP-DL0IjTzn.js +0 -13
- package/dist/mapJpAddressSchemaToAddressLocalizations-A0yOTAyr.js +0 -162
- package/dist/nl-NL-CM5U8ODq.js +0 -13
- package/dist/nl-NL-KQ6bciOb.js +0 -13
- package/dist/no-NO-BQL_M1pn.js +0 -13
- package/dist/no-NO-Ds3VioxT.js +0 -13
- package/dist/pt-BR-AZ3roErF.js +0 -13
- package/dist/pt-BR-Ct4s4jXV.js +0 -13
- package/dist/sl-SI-C0wSbuau.js +0 -13
- package/dist/sl-SI-hxwQIw_i.js +0 -13
- package/dist/sv-SE-0PQ-U1u6.js +0 -13
- package/dist/sv-SE-DtKjf4Go.js +0 -13
- package/dist/types/components/Business/forms/FinancialInformation/formatFinancialInformationSummary.d.ts +0 -4
- package/dist/types/components/Shared/fields/IdFieldTypeSelector/TaxIdNumberTypeSelector.d.ts +0 -23
- package/dist/unincorporated-partnership-MeN1dp53.js +0 -97
- package/dist/useBusinessLines-DG-LapFA.js +0 -29
- package/dist/useCanSeeIntroduction-DJUYy5a5.js +0 -48
- package/dist/useDataMissingRemediations-x7yza9Ka.js +0 -41
- package/dist/useDataset-CDtTEXqi.js +0 -76
- package/dist/useDeleteTransferInstrument-S3FmBm7Z.js +0 -32
- package/dist/useGlobalData-DemxVumJ.js +0 -68
- package/dist/useNavigate-DdA-YVRy.js +0 -265
- package/dist/usePciQuestionnaireList-rxdFFrP5.js +0 -29
- package/dist/useSalesChannels-CI133F-6.js +0 -65
- package/dist/useSetting-BkKRHr6e.js +0 -19
- package/dist/useTaskStatus-DdTyBvAb.js +0 -51
- package/dist/useTrustMembers-BOp5wFXa.js +0 -163
- /package/dist/types/components/{Business/forms/FinancialInformation → Shared/fields/ReportedValueOptionField}/ReportedValue.d.ts +0 -0
|
@@ -2,75 +2,69 @@
|
|
|
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] = "1c12032c-5f3e-4a39-b472-402db1745b1b", e._sentryDebugIdIdentifier = "sentry-dbid-1c12032c-5f3e-4a39-b472-402db1745b1b");
|
|
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 { 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-
|
|
14
|
-
import { u as useScenarios } from "./useScenarios-
|
|
15
|
-
import { u as useCreateLegalEntity } from "./useCreateLegalEntity-
|
|
16
|
-
import { u as
|
|
17
|
-
import { u as
|
|
18
|
-
import { u as
|
|
19
|
-
import { u as
|
|
20
|
-
import { C as CompanyTypesValues } from "./
|
|
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 { C as Confirm } from "./Confirm-
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import { u as usePageLandedEvent, s as summaryStep } from "./Summary-
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import { S as
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import { i as isValidationError, p as processValidationErrors, a as isMaintenanceModeError } from "./validationError-DozI7J9X.js";
|
|
36
|
-
import { a as datasetUtilities } from "./datasetUtil-BHQp0-xL.js";
|
|
12
|
+
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-CFgADcSW.js";
|
|
14
|
+
import { u as useScenarios } from "./useScenarios-C5uruC52.js";
|
|
15
|
+
import { u as useCreateLegalEntity } from "./useCreateLegalEntity-C5daQcez.js";
|
|
16
|
+
import { u as useToastContext, a as useInvalidateRootLegalEntity } from "./useToastContext-C2BAjZxO.js";
|
|
17
|
+
import { u as useUpdateLegalEntity } from "./useUpdateLegalEntity-vK1vTzAB.js";
|
|
18
|
+
import { u as useTranslation, bH as isISIN, W as Button, J as useExperimentsContext, R as useLegalEntity, U as ROOT_LE, am as datasetUtilities, aB as Header, O as Typography, V as Loader, aa as CountryCodes, k as useSettingsContext, aN as useAllowedCountries, b as useApiContext, h as httpPost, P as StackLayout, G as Alert, ao as entriesOf, z as useAnalyticsContext, m as createLogger, v as useAccountHolder, y as TaskTypes, L as LegalEntityTypes, ax as isEmpty, i as isUndefinedOrNull, bI as businessDetailsComponentsKeyMapping, bJ as solePropBusinessDetailsKeyMapping, ah as objectsDeepEqual, aS as keysOf, bK as solePropBusinessDetailsApiKeyMapping, bl as businessDetailsApiKeyMapping, at as Scenarios, aZ as filterOutUnwantedAssociationsIfRootLE, aX as drop, ad as getOwnEntityAssociations, b2 as doArraysMatch, bL as solePropBusinessDetailsDocumentMapping, bM as businessDetailsDocumentMapping } from "./StoreProvider-CBB99upB.js";
|
|
19
|
+
import { u as useFormContext, F as FormContextProvider, a as FormFlow } from "./useFormContext-CX6rQNws.js";
|
|
20
|
+
import { C as CompanyTypesValues } from "./bafinUtils-B1LygAFl.js";
|
|
21
|
+
import { c as composePerScenarioFormConfigurations, g as getPropsFromConfigurations } from "./process-field-configurations-BnIbMyYt.js";
|
|
22
|
+
import { a as addValidityToForms, u as useFormComposer } from "./dropinUtils-D44Paj5u.js";
|
|
23
|
+
import { u as useMultiForm } from "./useMultiForm-DRZSxmEa.js";
|
|
24
|
+
import { u as uppercase, m as mapExistingFile, g as getPageName, b as useScenarioConfiguration } from "./mapExistingFile-BigOdLU3.js";
|
|
25
|
+
import { C as Confirm } from "./Confirm-NubmSSR7.js";
|
|
26
|
+
import { E as ErrorPanel } from "./ErrorPanel-D4kO8XQ8.js";
|
|
27
|
+
import { N as NewSummary } from "./NewSummary-D-9PYaY6.js";
|
|
28
|
+
import { u as usePageLandedEvent, s as summaryStep, a as summaryStyles } from "./Summary-C5uRwUKn.js";
|
|
29
|
+
import { a as getDocument, j as getDocuments, c as createDocumentRequest, k as mergeProofOfOwnershipAttachments, b as getFileExtention, d as documentApiUtils } from "./validate-DDCTmBf4.js";
|
|
30
|
+
import { m as mergeFieldMetadataIntoProps, c as createFormUtils } from "./formUtils-BEcbGHkz.js";
|
|
31
|
+
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, f as getTaxInformationPlaceholderText, S as StateCodesUS, h as isUsingCompanySearch, M as MemoizedDocumentUpload, j as countryToTaxInfoTypeMap, k as getCompanyRegistrationNumberOptions, l as isRegistrationNumberAbsentStateV4Scenario, m as getTaxIdNumberOptions, n as COUNTRIES_THAT_USE_TAX_ID_INSTEAD_OF_VAT, o as rules, g as getFieldsWithExistingData } from "./TaxInformationField-B7AVdVgf.js";
|
|
32
|
+
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 exemptFromRegistrationNumberDefaultFieldMetadata } from "./ConstitutionalDocument-Djj_JCy4.js";
|
|
33
|
+
import { K as KEYBOARD_KEYS, M as Modal, a as ModalContent } from "./Modal-BMdWqd0Y.js";
|
|
34
|
+
import { g as getAddressSchemaForCountry, C as COUNTRIES_WITH_STATES_DATASET, a as getAddressSchemaLabelsByCountry, f as mapAddressLabelsNewSummary, c as getKeyForField } from "./utils-BvFIL5qs.js";
|
|
37
35
|
import { r as resolveFieldMetadata } from "./fieldConfigurations-BUT9DTUH.js";
|
|
38
|
-
import {
|
|
39
|
-
import { f as
|
|
40
|
-
import {
|
|
41
|
-
import {
|
|
36
|
+
import { f as formatCurrency, A as ALLOWED_SOF_SERVICES } from "./utils-Bh3VtXaW.js";
|
|
37
|
+
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-DaePmCRZ.js";
|
|
38
|
+
import { S as SettingNames } from "./types-CQ2p58-6.js";
|
|
39
|
+
import { o as organizationTypesToSkipCompanyStructureForm } from "./utils-Bo1WrnnM.js";
|
|
40
|
+
import { i as isValidationError, p as processValidationErrors, a as isMaintenanceModeError } from "./validationError-DmAD3_AN.js";
|
|
41
|
+
import { t as toFullWidth, m as mapJpAddressSchemaToAddressLocalizations } from "./mapJpAddressSchemaToAddressLocalizations-DUoJIoRm.js";
|
|
42
|
+
import { i as isEmpty$1 } from "./isEmpty-3U9fSQsY.js";
|
|
42
43
|
import { f as formatObject } from "./utils-DNSfZiio.js";
|
|
43
44
|
import { b as mapAddressLocalizationToJpAddressSchema, a as mapApiScriptLocalizationToSchemaFields, m as mapSchemaFieldsToApiScriptLocalization } from "./mapAddressLocalizationToJpAddressSchema-vJWbpAyq.js";
|
|
44
|
-
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-
|
|
45
|
-
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-
|
|
46
|
-
import {
|
|
45
|
+
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-B4udmJgX.js";
|
|
46
|
+
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-DBiJbXem.js";
|
|
47
|
+
import { j as useBusinessLines } from "./OnboardingDropinComponent-CxUcB7IU.js";
|
|
47
48
|
import { Suspense, lazy } from "preact/compat";
|
|
48
|
-
import { C as Checkbox } from "./Checkbox-
|
|
49
|
-
import { F as Field } from "./Field-
|
|
50
|
-
import {
|
|
51
|
-
import {
|
|
52
|
-
import {
|
|
53
|
-
import {
|
|
54
|
-
import { M as MaskedInput, m as makeMask, d as alphanumericInputs, b as alphaInputs, n as numericInputs } from "./MaskedInput-D1fbApUW.js";
|
|
55
|
-
import { m as mergeFieldMetadataIntoProps, c as createFormUtils } from "./formUtils-Dg7QeiCj.js";
|
|
56
|
-
import { i as isJapanLocalizationEnabled } from "./japanSupportUtils-Bn6j_2Iu.js";
|
|
49
|
+
import { C as Checkbox } from "./Checkbox-DmYVTVOD.js";
|
|
50
|
+
import { F as Field } from "./Field-CPoHG0G-.js";
|
|
51
|
+
import { I as InputDate, f as formatDateObj } from "./InputDate-BVYQZZuX.js";
|
|
52
|
+
import { a as validateNotEmptyOnBlur, v as validatePatternOnBlur, b as validateJaKanaLegalCompanyName, c as validateJaHaniLegalCompanyName } from "./patternValidators-BkY5yvNa.js";
|
|
53
|
+
import { M as MaskedInput, m as makeMask, d as alphanumericInputs, b as alphaInputs, n as numericInputs } from "./MaskedInput-1f16YE1z.js";
|
|
54
|
+
import { i as isJapanLocalizationEnabled } from "./japanSupportUtils-CaeglTl1.js";
|
|
57
55
|
import { u as useDebouncedCallback } from "./debouncedInputEvent-Cv2S512Y.js";
|
|
58
56
|
import { signal } from "@preact/signals";
|
|
59
57
|
import cx from "classnames";
|
|
60
|
-
import { L as Link } from "./Link-
|
|
61
|
-
import { S as StructuredList } from "./StructuredList-
|
|
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-
|
|
65
|
-
import { S as StackLayout } from "./unincorporated-partnership-MeN1dp53.js";
|
|
58
|
+
import { L as Link } from "./Link-ru5UMRxt.js";
|
|
59
|
+
import { S as StructuredList } from "./StructuredList-EKVbq_i3.js";
|
|
60
|
+
import { I as InputText } from "./InputText-C55stM8O.js";
|
|
61
|
+
import { C as CountryField, a as COUNTRY_FIELD } from "./CountryField-C7SjQFv_.js";
|
|
62
|
+
import { L as LoaderWrapper } from "./LoaderWrapper-BL7Hc_DC.js";
|
|
66
63
|
import { C as Card } from "./Card-OQuFzmxm.js";
|
|
67
|
-
import { L as ListItem } from "./ListItem-
|
|
68
|
-
import {
|
|
69
|
-
import {
|
|
70
|
-
import { R as RadioGroup } from "./RadioGroup-
|
|
71
|
-
import { u as useGlobalDataSlice } from "./useGlobalData-DemxVumJ.js";
|
|
72
|
-
import { u as useForm } from "./useForm-De1DLL-w.js";
|
|
73
|
-
import { c as currencyByCountry } from "./types-COOK2jmb.js";
|
|
64
|
+
import { L as ListItem } from "./ListItem-C6ALEoR-.js";
|
|
65
|
+
import { T as TileGroup } from "./TileGroup-oKbh_YGv.js";
|
|
66
|
+
import { c as currencyByCountry } from "./types-CcxS0801.js";
|
|
67
|
+
import { R as RadioGroup } from "./RadioGroup-BuAX_NLA.js";
|
|
74
68
|
const DATE_OF_INCORPORATION_FIELD = [
|
|
75
69
|
"dateOfIncorporation"
|
|
76
70
|
];
|
|
@@ -135,7 +129,6 @@ function EInvoicingCodeField({
|
|
|
135
129
|
labels,
|
|
136
130
|
readonly,
|
|
137
131
|
mask,
|
|
138
|
-
guidanceText,
|
|
139
132
|
shouldValidate,
|
|
140
133
|
handleChangeFor
|
|
141
134
|
}) {
|
|
@@ -152,7 +145,9 @@ function EInvoicingCodeField({
|
|
|
152
145
|
name: "eInvoicingCode",
|
|
153
146
|
type: "text",
|
|
154
147
|
label: labels.eInvoicingCode ?? "",
|
|
155
|
-
formatGuidance:
|
|
148
|
+
formatGuidance: t(($) => $["the7CharacterIdentifierAssignedToThis"], {
|
|
149
|
+
example: "MP10YNU"
|
|
150
|
+
}),
|
|
156
151
|
errorMessage: errors.eInvoicingCode,
|
|
157
152
|
isValid: valid.eInvoicingCode ?? false,
|
|
158
153
|
value: data.eInvoicingCode ?? "",
|
|
@@ -185,12 +180,6 @@ const eInvoicingCodeFieldMetadata = {
|
|
|
185
180
|
mask: {
|
|
186
181
|
mask: makeMask(...alphanumericInputs(16)),
|
|
187
182
|
transformOnType: uppercase
|
|
188
|
-
},
|
|
189
|
-
guidanceText: {
|
|
190
|
-
key: "the7CharacterIdentifierAssignedToThis",
|
|
191
|
-
values: {
|
|
192
|
-
example: "MP10YNU"
|
|
193
|
-
}
|
|
194
183
|
}
|
|
195
184
|
};
|
|
196
185
|
const stockExchangeMICFieldMetadata = {
|
|
@@ -199,13 +188,6 @@ const stockExchangeMICFieldMetadata = {
|
|
|
199
188
|
mask: {
|
|
200
189
|
mask: makeMask(...alphanumericInputs(4)),
|
|
201
190
|
transformOnType: uppercase
|
|
202
|
-
},
|
|
203
|
-
guidanceText: {
|
|
204
|
-
key: "enterNCharactersForExample",
|
|
205
|
-
values: {
|
|
206
|
-
numChars: "4",
|
|
207
|
-
example: "XNAS"
|
|
208
|
-
}
|
|
209
191
|
}
|
|
210
192
|
};
|
|
211
193
|
const STOCK_EXCHANGE_MIC_FIELD = [
|
|
@@ -218,17 +200,17 @@ function StockExchangeMICField({
|
|
|
218
200
|
labels,
|
|
219
201
|
readonly,
|
|
220
202
|
mask,
|
|
221
|
-
guidanceText,
|
|
222
203
|
shouldValidate,
|
|
223
204
|
handleChangeFor
|
|
224
205
|
}) {
|
|
206
|
+
const { t } = useTranslation("common");
|
|
225
207
|
return /* @__PURE__ */ jsx(
|
|
226
208
|
MaskedInput,
|
|
227
209
|
{
|
|
228
210
|
name: "stockExchangeMIC",
|
|
229
211
|
type: "text",
|
|
230
212
|
label: labels.stockExchangeMIC ?? "",
|
|
231
|
-
formatGuidance:
|
|
213
|
+
formatGuidance: t(($) => $["enterNCharactersForExample"], { numChars: "4", example: "XNAS" }),
|
|
232
214
|
...mask,
|
|
233
215
|
errorMessage: errors.stockExchangeMIC,
|
|
234
216
|
isValid: valid.stockExchangeMIC ?? false,
|
|
@@ -254,12 +236,6 @@ const stockISINFieldMetadata = {
|
|
|
254
236
|
mask: {
|
|
255
237
|
mask: makeMask(...alphaInputs(2), ...alphanumericInputs(9), ...numericInputs(1)),
|
|
256
238
|
transformOnType: uppercase
|
|
257
|
-
},
|
|
258
|
-
guidanceText: {
|
|
259
|
-
key: "validationPleaseEnterAValidStockISIN",
|
|
260
|
-
values: {
|
|
261
|
-
example: "NL0012969182"
|
|
262
|
-
}
|
|
263
239
|
}
|
|
264
240
|
};
|
|
265
241
|
const STOCK_ISIN_FIELD = ["stockISIN"];
|
|
@@ -270,17 +246,19 @@ function StockISINField({
|
|
|
270
246
|
labels,
|
|
271
247
|
readonly,
|
|
272
248
|
mask,
|
|
273
|
-
guidanceText,
|
|
274
249
|
shouldValidate,
|
|
275
250
|
handleChangeFor
|
|
276
251
|
}) {
|
|
252
|
+
const { t } = useTranslation("common");
|
|
277
253
|
return /* @__PURE__ */ jsx(
|
|
278
254
|
MaskedInput,
|
|
279
255
|
{
|
|
280
256
|
name: "stockISIN",
|
|
281
257
|
type: "text",
|
|
282
258
|
label: labels.stockISIN ?? "",
|
|
283
|
-
formatGuidance:
|
|
259
|
+
formatGuidance: t(($) => $["validationPleaseEnterAValidStockISIN"], {
|
|
260
|
+
example: "NL0012969182"
|
|
261
|
+
}),
|
|
284
262
|
...mask,
|
|
285
263
|
errorMessage: errors.stockISIN,
|
|
286
264
|
isValid: valid.stockISIN ?? false,
|
|
@@ -300,13 +278,6 @@ const stockTickerSymbolFieldMetadata = {
|
|
|
300
278
|
mask: {
|
|
301
279
|
mask: makeMask(...alphanumericInputs(1), ...alphanumericInputs(4)),
|
|
302
280
|
transformOnType: uppercase
|
|
303
|
-
},
|
|
304
|
-
guidanceText: {
|
|
305
|
-
key: "enterAMaximumOfNCharactersForExample",
|
|
306
|
-
values: {
|
|
307
|
-
maxChars: "5",
|
|
308
|
-
example: "ADYEN"
|
|
309
|
-
}
|
|
310
281
|
}
|
|
311
282
|
};
|
|
312
283
|
const STOCK_TICKER_SYMBOL_FIELD = [
|
|
@@ -319,17 +290,20 @@ function StockTickerSymbolField({
|
|
|
319
290
|
labels,
|
|
320
291
|
readonly,
|
|
321
292
|
mask,
|
|
322
|
-
guidanceText,
|
|
323
293
|
shouldValidate,
|
|
324
294
|
handleChangeFor
|
|
325
295
|
}) {
|
|
296
|
+
const { t } = useTranslation("common");
|
|
326
297
|
return /* @__PURE__ */ jsx(
|
|
327
298
|
MaskedInput,
|
|
328
299
|
{
|
|
329
300
|
name: "stockTickerSymbol",
|
|
330
301
|
type: "text",
|
|
331
302
|
label: labels.stockTickerSymbol ?? "",
|
|
332
|
-
formatGuidance:
|
|
303
|
+
formatGuidance: t(($) => $["enterAMaximumOfNCharactersForExample"], {
|
|
304
|
+
maxChars: "5",
|
|
305
|
+
example: "ADYEN"
|
|
306
|
+
}),
|
|
333
307
|
...mask,
|
|
334
308
|
errorMessage: errors.stockTickerSymbol,
|
|
335
309
|
isValid: valid.stockTickerSymbol ?? false,
|
|
@@ -360,7 +334,7 @@ const verifiedBusiness = signal(void 0);
|
|
|
360
334
|
const isVerifiedSingleCompanySearchResult = signal(false);
|
|
361
335
|
const additionalInformationContent = "adyen-kyc-additional-information-content";
|
|
362
336
|
const additionalInformationSectionHeading = "adyen-kyc-additional-information-section-heading";
|
|
363
|
-
const styles$
|
|
337
|
+
const styles$4 = {
|
|
364
338
|
additionalInformationContent,
|
|
365
339
|
additionalInformationSectionHeading
|
|
366
340
|
};
|
|
@@ -369,7 +343,7 @@ const verifiedBusinessCardContent = "adyen-kyc-verified-business-card-content";
|
|
|
369
343
|
const verifiedBusinessCardContentCollapsed = "adyen-kyc-verified-business-card-content-collapsed";
|
|
370
344
|
const verifiedBusinessCardContentExpanded = "adyen-kyc-verified-business-card-content-expanded";
|
|
371
345
|
const verifiedBusinessCardExpandButton = "adyen-kyc-verified-business-card-expand-button";
|
|
372
|
-
const styles$
|
|
346
|
+
const styles$3 = {
|
|
373
347
|
verifiedBusinessCard,
|
|
374
348
|
verifiedBusinessCardContent,
|
|
375
349
|
verifiedBusinessCardContentCollapsed,
|
|
@@ -382,7 +356,7 @@ function VerifiedBusinessCard({
|
|
|
382
356
|
}) {
|
|
383
357
|
const { t } = useTranslation(["common"]);
|
|
384
358
|
const [expanded, setExpanded] = useState(false);
|
|
385
|
-
const address = verifiedAddress?.address && verifiedAddress.city && verifiedAddress.stateOrProvince && verifiedAddress.postalCode ? `${verifiedAddress.address} ${verifiedAddress.city} ${verifiedAddress.stateOrProvince} ${verifiedAddress.postalCode}` :
|
|
359
|
+
const address = verifiedAddress?.address && verifiedAddress.city && verifiedAddress.stateOrProvince && verifiedAddress.postalCode ? `${verifiedAddress.address} ${verifiedAddress.city} ${verifiedAddress.stateOrProvince} ${verifiedAddress.postalCode}` : verifiedAddress?.address;
|
|
386
360
|
const addressLink = `https://www.google.com/maps/place/${address?.replaceAll(" ", "+")}`;
|
|
387
361
|
const baseItems = useMemo(
|
|
388
362
|
() => [
|
|
@@ -414,12 +388,12 @@ function VerifiedBusinessCard({
|
|
|
414
388
|
].filter((item) => !!item.details),
|
|
415
389
|
[address, addressLink, t, verifiedBusiness2?.legalForm]
|
|
416
390
|
);
|
|
417
|
-
const expandedContentClasses = cx(styles$
|
|
418
|
-
[styles$
|
|
419
|
-
[styles$
|
|
391
|
+
const expandedContentClasses = cx(styles$3.verifiedBusinessCardContent, {
|
|
392
|
+
[styles$3.verifiedBusinessCardContentCollapsed]: !expanded,
|
|
393
|
+
[styles$3.verifiedBusinessCardContentExpanded]: expanded
|
|
420
394
|
});
|
|
421
|
-
return /* @__PURE__ */ jsxs("section", { className: styles$
|
|
422
|
-
/* @__PURE__ */ jsxs("div", { className: styles$
|
|
395
|
+
return /* @__PURE__ */ jsxs("section", { className: styles$3.verifiedBusinessCard, children: [
|
|
396
|
+
/* @__PURE__ */ jsxs("div", { className: styles$3.verifiedBusinessCardContent, children: [
|
|
423
397
|
/* @__PURE__ */ jsx(StructuredList, { items: baseItems }),
|
|
424
398
|
/* @__PURE__ */ jsx(Divider, {})
|
|
425
399
|
] }),
|
|
@@ -427,11 +401,11 @@ function VerifiedBusinessCard({
|
|
|
427
401
|
/* @__PURE__ */ jsx(StructuredList, { items: expandedItems }),
|
|
428
402
|
/* @__PURE__ */ jsx(Divider, {})
|
|
429
403
|
] }),
|
|
430
|
-
/* @__PURE__ */ jsx("div", { className: styles$
|
|
404
|
+
/* @__PURE__ */ jsx("div", { className: styles$3.verifiedBusinessCardExpandButton, children: /* @__PURE__ */ jsx(Button, { variant: "link", onClick: () => setExpanded(!expanded), children: expanded ? t(($) => $["hideDetails"], { ns: "common" }) : t(($) => $["showDetails"], { ns: "common" }) }) })
|
|
431
405
|
] });
|
|
432
406
|
}
|
|
433
407
|
const LazyJpAddress = lazy(
|
|
434
|
-
async () => (await import("./JpAddress-
|
|
408
|
+
async () => (await import("./JpAddress-B3HjxunW.js")).JpAddress
|
|
435
409
|
);
|
|
436
410
|
const ADDITIONAL_INFORMATION_FORM_ID = "additionalInformation";
|
|
437
411
|
const ADDITIONAL_INFORMATION_FIELDS = [
|
|
@@ -496,21 +470,44 @@ function AdditionalInformation({
|
|
|
496
470
|
);
|
|
497
471
|
const verifiedAddress = useMemo(() => {
|
|
498
472
|
if (!verifiedBusiness$1) return void 0;
|
|
499
|
-
|
|
473
|
+
if (form.defaultData?.additionalInformation?.registrationAddress?.address || form.defaultData?.additionalInformation?.operationalAddress?.address) {
|
|
474
|
+
return { override: { address: "" } };
|
|
475
|
+
}
|
|
476
|
+
if (isExperimentEnabled("EnableProviderAgnosticCompanySearchAndSelect")) {
|
|
477
|
+
const _verifiedBusiness2 = verifiedBusiness$1;
|
|
478
|
+
return {
|
|
479
|
+
..._verifiedBusiness2.registeredAddress && {
|
|
480
|
+
registrationAddress: mapAddressData(_verifiedBusiness2.registeredAddress)
|
|
481
|
+
},
|
|
482
|
+
..._verifiedBusiness2.principalPlaceOfBusinessAddress && {
|
|
483
|
+
operationalAddress: mapAddressData(_verifiedBusiness2.principalPlaceOfBusinessAddress)
|
|
484
|
+
}
|
|
485
|
+
};
|
|
486
|
+
}
|
|
487
|
+
const _verifiedBusiness = verifiedBusiness$1;
|
|
488
|
+
const isVerifiedAddressNotRegistrationAddress = _verifiedBusiness.isPrincipalAddress || _verifiedBusiness.state && form.data.basicInformation?.stateOrProvince !== _verifiedBusiness.state;
|
|
489
|
+
return isVerifiedAddressNotRegistrationAddress ? { operationalAddress: { ...mapAddressData(_verifiedBusiness), country } } : {
|
|
500
490
|
registrationAddress: {
|
|
501
|
-
...mapAddressData(
|
|
491
|
+
...mapAddressData(_verifiedBusiness),
|
|
502
492
|
country,
|
|
503
493
|
stateOrProvince: form.data.basicInformation?.stateOrProvince
|
|
504
494
|
}
|
|
505
495
|
};
|
|
506
|
-
}, [
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
form.
|
|
496
|
+
}, [
|
|
497
|
+
verifiedBusiness$1,
|
|
498
|
+
form.defaultData?.additionalInformation?.registrationAddress?.address,
|
|
499
|
+
form.defaultData?.additionalInformation?.operationalAddress?.address,
|
|
500
|
+
form.data.basicInformation?.stateOrProvince,
|
|
501
|
+
isExperimentEnabled,
|
|
502
|
+
country
|
|
503
|
+
]);
|
|
504
|
+
const registrationAddressValid = useRef(false);
|
|
505
|
+
const operationalAddressValid = useRef(false);
|
|
506
|
+
if (form.valid.additionalInformation?.registrationAddress !== registrationAddressValid.current) {
|
|
507
|
+
form.setValid("registrationAddress", registrationAddressValid.current, "additionalInformation");
|
|
511
508
|
}
|
|
512
|
-
if (form.data.additionalInformation?.operationalAddressIsSame === operationalAddressIsSameIds.OPERATIONAL_ADDRESS_IS_NOT_SAME && form.valid.additionalInformation?.operationalAddress !== operationalAddressValid) {
|
|
513
|
-
form.setValid("operationalAddress", operationalAddressValid, "additionalInformation");
|
|
509
|
+
if (form.data.additionalInformation?.operationalAddressIsSame === operationalAddressIsSameIds.OPERATIONAL_ADDRESS_IS_NOT_SAME && form.valid.additionalInformation?.operationalAddress !== operationalAddressValid.current) {
|
|
510
|
+
form.setValid("operationalAddress", operationalAddressValid.current, "additionalInformation");
|
|
514
511
|
}
|
|
515
512
|
const handleChangeFor = useCallback(
|
|
516
513
|
(fieldName, mode) => form.handleChangeFor(fieldName, "additionalInformation", mode),
|
|
@@ -519,12 +516,12 @@ function AdditionalInformation({
|
|
|
519
516
|
const handleRegistrationAddressChange = (state) => {
|
|
520
517
|
handleChangeFor("registrationAddress")(state.data);
|
|
521
518
|
form.setValid("registrationAddress", Boolean(state.isValid), "additionalInformation");
|
|
522
|
-
|
|
519
|
+
registrationAddressValid.current = Boolean(state.isValid);
|
|
523
520
|
};
|
|
524
521
|
const handleOperationalAddressChange = (state) => {
|
|
525
522
|
handleChangeFor("operationalAddress")(state.data);
|
|
526
523
|
form.setValid("operationalAddress", Boolean(state.isValid), "additionalInformation");
|
|
527
|
-
|
|
524
|
+
operationalAddressValid.current = Boolean(state.isValid);
|
|
528
525
|
};
|
|
529
526
|
const handleOperationalAddressIsSameChange = useCallback(
|
|
530
527
|
(isChecked) => {
|
|
@@ -584,8 +581,7 @@ function AdditionalInformation({
|
|
|
584
581
|
registrationNumberDefaultFieldConfig[country],
|
|
585
582
|
{
|
|
586
583
|
companyType,
|
|
587
|
-
registrationNumberType: form.data.additionalInformation?.registrationNumberType
|
|
588
|
-
isExperimentEnabled
|
|
584
|
+
registrationNumberType: form.data.additionalInformation?.registrationNumberType
|
|
589
585
|
},
|
|
590
586
|
registrationNumberDefaultFieldMetadata
|
|
591
587
|
),
|
|
@@ -661,7 +657,6 @@ function AdditionalInformation({
|
|
|
661
657
|
form.valid.additionalInformation,
|
|
662
658
|
handleChangeFor,
|
|
663
659
|
t,
|
|
664
|
-
isExperimentEnabled,
|
|
665
660
|
validationErrors,
|
|
666
661
|
verificationErrors
|
|
667
662
|
]);
|
|
@@ -680,6 +675,18 @@ function AdditionalInformation({
|
|
|
680
675
|
});
|
|
681
676
|
}, [country, datasetUtils, t]);
|
|
682
677
|
const showJapanLocalization = isJapanLocalizationEnabled(isExperimentEnabled, country);
|
|
678
|
+
let readOnlyAddressFields = [];
|
|
679
|
+
if (isExperimentEnabled("EnableProviderAgnosticCompanySearchAndSelect")) {
|
|
680
|
+
const _verifiedBusiness = verifiedBusiness$1;
|
|
681
|
+
if (_verifiedBusiness?.registeredAddress?.state && _verifiedBusiness.registeredAddress.state === form.data.basicInformation?.stateOrProvince) {
|
|
682
|
+
readOnlyAddressFields = ["stateOrProvince"];
|
|
683
|
+
}
|
|
684
|
+
} else {
|
|
685
|
+
const _verifiedBusiness = verifiedBusiness$1;
|
|
686
|
+
if (_verifiedBusiness?.state && _verifiedBusiness.state === form.data.basicInformation?.stateOrProvince) {
|
|
687
|
+
readOnlyAddressFields = ["stateOrProvince"];
|
|
688
|
+
}
|
|
689
|
+
}
|
|
683
690
|
return /* @__PURE__ */ jsxs("form", { id, children: [
|
|
684
691
|
/* @__PURE__ */ jsx(Header, { title: t(($) => $["additionalInformationFormHeading"], { ns: "business" }) }),
|
|
685
692
|
/* @__PURE__ */ jsx(
|
|
@@ -691,19 +698,19 @@ function AdditionalInformation({
|
|
|
691
698
|
formUtils
|
|
692
699
|
}
|
|
693
700
|
),
|
|
694
|
-
/* @__PURE__ */ jsxs("div", { className: styles$
|
|
701
|
+
/* @__PURE__ */ jsxs("div", { className: styles$4.additionalInformationContent, children: [
|
|
695
702
|
showVerified && /* @__PURE__ */ jsxs("section", { children: [
|
|
696
|
-
/* @__PURE__ */ jsx("div", { className: styles$
|
|
703
|
+
/* @__PURE__ */ jsx("div", { className: styles$4.additionalInformationSectionHeading, children: /* @__PURE__ */ jsx(Typography, { el: "h3", variant: "title", children: t(($) => $["verifiedInformation"], { ns: "business" }) }) }),
|
|
697
704
|
/* @__PURE__ */ jsx(
|
|
698
705
|
VerifiedBusinessCard,
|
|
699
706
|
{
|
|
700
707
|
verifiedBusiness: verifiedBusiness$1,
|
|
701
|
-
verifiedAddress: verifiedAddress?.registrationAddress ?? verifiedAddress?.operationalAddress
|
|
708
|
+
verifiedAddress: verifiedAddress?.override ?? verifiedAddress?.registrationAddress ?? verifiedAddress?.operationalAddress
|
|
702
709
|
}
|
|
703
710
|
)
|
|
704
711
|
] }),
|
|
705
712
|
/* @__PURE__ */ jsxs("section", { children: [
|
|
706
|
-
showVerified && /* @__PURE__ */ jsx("div", { className: styles$
|
|
713
|
+
showVerified && /* @__PURE__ */ jsx("div", { className: styles$4.additionalInformationSectionHeading, children: /* @__PURE__ */ jsx(Typography, { el: "h3", variant: "title", children: t(($) => $["otherBusinessInformation"], { ns: "business" }) }) }),
|
|
707
714
|
/* @__PURE__ */ jsxs("fieldset", { children: [
|
|
708
715
|
showField(LEGAL_FORM_FIELDS) && /* @__PURE__ */ jsx(
|
|
709
716
|
LegalFormField,
|
|
@@ -766,7 +773,6 @@ function AdditionalInformation({
|
|
|
766
773
|
exemptedFromRegistrationNumber: "iDontHaveARegistrationNumber"
|
|
767
774
|
}),
|
|
768
775
|
mask: formUtils.getMask("registrationNumber"),
|
|
769
|
-
guidanceText: formUtils.getFieldGuidanceText(BUSINESS_REGISTRATION_NUMBER_FIELD),
|
|
770
776
|
helperText: getRegistrationNumberHelperText(businessT, { country, companyType }),
|
|
771
777
|
readonly: formUtils.isReadOnly("registrationNumber"),
|
|
772
778
|
optional: formUtils.isOptionalField("registrationNumber"),
|
|
@@ -797,7 +803,6 @@ function AdditionalInformation({
|
|
|
797
803
|
exemptedFromTax: "iDontHaveATaxId"
|
|
798
804
|
}),
|
|
799
805
|
mask: formUtils.getMask("taxInformation"),
|
|
800
|
-
guidanceText: formUtils.getFieldGuidanceText(TAX_INFORMATION_FIELD),
|
|
801
806
|
readonly: formUtils.isReadOnly("taxInformation"),
|
|
802
807
|
shouldValidate,
|
|
803
808
|
handleChangeFor,
|
|
@@ -828,7 +833,6 @@ function AdditionalInformation({
|
|
|
828
833
|
exemptedFromVat: "iDontHaveAVatNumber"
|
|
829
834
|
}),
|
|
830
835
|
mask: formUtils.getMask("vatNumber"),
|
|
831
|
-
guidanceText: formUtils.getFieldGuidanceText(VAT_NUMBER_FIELD),
|
|
832
836
|
readonly: formUtils.isReadOnly("vatNumber"),
|
|
833
837
|
handleChangeFor,
|
|
834
838
|
country,
|
|
@@ -854,7 +858,6 @@ function AdditionalInformation({
|
|
|
854
858
|
),
|
|
855
859
|
labels: formUtils.getFieldLabels(EINVOICING_CODE_FIELD),
|
|
856
860
|
mask: formUtils.getMask("eInvoicingCode"),
|
|
857
|
-
guidanceText: formUtils.getFieldGuidanceText(EINVOICING_CODE_FIELD),
|
|
858
861
|
readonly: formUtils.isReadOnly("eInvoicingCode"),
|
|
859
862
|
handleChangeFor
|
|
860
863
|
}
|
|
@@ -880,11 +883,7 @@ function AdditionalInformation({
|
|
|
880
883
|
ns: "business"
|
|
881
884
|
})
|
|
882
885
|
},
|
|
883
|
-
guidanceText: {
|
|
884
|
-
industryCodes: t(($) => $["primaryIndustryCodeGuidance"], {
|
|
885
|
-
ns: "business"
|
|
886
|
-
})
|
|
887
|
-
},
|
|
886
|
+
guidanceText: t(($) => $["primaryIndustryCodeGuidance"], { ns: "business" }),
|
|
888
887
|
readonly: formUtils.isReadOnly("industryCodes"),
|
|
889
888
|
handleChangeFor,
|
|
890
889
|
businessLineTypes,
|
|
@@ -917,7 +916,7 @@ function AdditionalInformation({
|
|
|
917
916
|
] })
|
|
918
917
|
] }),
|
|
919
918
|
showStockData && /* @__PURE__ */ jsxs("section", { children: [
|
|
920
|
-
/* @__PURE__ */ jsx("div", { className: styles$
|
|
919
|
+
/* @__PURE__ */ jsx("div", { className: styles$4.additionalInformationSectionHeading, children: /* @__PURE__ */ jsx(Typography, { el: "h3", variant: "title", children: t(($) => $["stockExchangeInformation"], { ns: "business" }) }) }),
|
|
921
920
|
/* @__PURE__ */ jsxs("fieldset", { children: [
|
|
922
921
|
showField(STOCK_EXCHANGE_MIC_FIELD) && /* @__PURE__ */ jsx(
|
|
923
922
|
StockExchangeMICField,
|
|
@@ -937,7 +936,6 @@ function AdditionalInformation({
|
|
|
937
936
|
),
|
|
938
937
|
labels: formUtils.getFieldLabels(STOCK_EXCHANGE_MIC_FIELD),
|
|
939
938
|
mask: formUtils.getMask("stockExchangeMIC"),
|
|
940
|
-
guidanceText: formUtils.getFieldGuidanceText(STOCK_EXCHANGE_MIC_FIELD),
|
|
941
939
|
readonly: formUtils.isReadOnly("stockExchangeMIC"),
|
|
942
940
|
shouldValidate,
|
|
943
941
|
handleChangeFor
|
|
@@ -961,7 +959,6 @@ function AdditionalInformation({
|
|
|
961
959
|
),
|
|
962
960
|
labels: formUtils.getFieldLabels(STOCK_ISIN_FIELD),
|
|
963
961
|
mask: formUtils.getMask("stockISIN"),
|
|
964
|
-
guidanceText: formUtils.getFieldGuidanceText(STOCK_ISIN_FIELD),
|
|
965
962
|
readonly: formUtils.isReadOnly("stockISIN"),
|
|
966
963
|
shouldValidate,
|
|
967
964
|
handleChangeFor
|
|
@@ -985,7 +982,6 @@ function AdditionalInformation({
|
|
|
985
982
|
),
|
|
986
983
|
labels: formUtils.getFieldLabels(STOCK_TICKER_SYMBOL_FIELD),
|
|
987
984
|
mask: formUtils.getMask("stockTickerSymbol"),
|
|
988
|
-
guidanceText: formUtils.getFieldGuidanceText(STOCK_TICKER_SYMBOL_FIELD),
|
|
989
985
|
readonly: formUtils.isReadOnly("stockTickerSymbol"),
|
|
990
986
|
shouldValidate,
|
|
991
987
|
handleChangeFor
|
|
@@ -994,7 +990,7 @@ function AdditionalInformation({
|
|
|
994
990
|
] })
|
|
995
991
|
] }),
|
|
996
992
|
/* @__PURE__ */ jsxs("section", { "data-testid": "registeredBusinessAddress", children: [
|
|
997
|
-
/* @__PURE__ */ jsxs("div", { className: styles$
|
|
993
|
+
/* @__PURE__ */ jsxs("div", { className: styles$4.additionalInformationSectionHeading, children: [
|
|
998
994
|
/* @__PURE__ */ jsx(Typography, { el: "h3", variant: "title", children: t(($) => $["registeredBusinessAddress"], { ns: "business" }) }),
|
|
999
995
|
/* @__PURE__ */ jsx(Typography, { el: "p", variant: "body", children: registrationAddressDescription })
|
|
1000
996
|
] }),
|
|
@@ -1021,7 +1017,7 @@ function AdditionalInformation({
|
|
|
1021
1017
|
shouldValidate,
|
|
1022
1018
|
hideCountry: true,
|
|
1023
1019
|
optionalFields: ["otherAddressInformation"],
|
|
1024
|
-
readOnlyFields:
|
|
1020
|
+
readOnlyFields: readOnlyAddressFields,
|
|
1025
1021
|
trustedFields: getNestedTrustedFields(
|
|
1026
1022
|
"registrationAddress",
|
|
1027
1023
|
form.data.additionalInformation,
|
|
@@ -1035,7 +1031,7 @@ function AdditionalInformation({
|
|
|
1035
1031
|
)
|
|
1036
1032
|
] }),
|
|
1037
1033
|
/* @__PURE__ */ jsxs("section", { "data-testid": "principalPlaceOfBusiness", children: [
|
|
1038
|
-
/* @__PURE__ */ jsxs("div", { className: styles$
|
|
1034
|
+
/* @__PURE__ */ jsxs("div", { className: styles$4.additionalInformationSectionHeading, children: [
|
|
1039
1035
|
/* @__PURE__ */ jsx(Typography, { el: "h3", variant: "title", children: t(($) => $["principalPlaceOfBusiness"], { ns: "business" }) }),
|
|
1040
1036
|
/* @__PURE__ */ jsx(Typography, { el: "p", variant: "body", children: t(($) => $["thePhysicalLocationWhereABusiness"], { ns: "business" }) })
|
|
1041
1037
|
] }),
|
|
@@ -1114,8 +1110,8 @@ function useLegalCompanyNameField({
|
|
|
1114
1110
|
const labels = formUtils.getFieldLabels(fieldKeys);
|
|
1115
1111
|
const fieldErrors = formUtils.getFieldErrors(errors, fieldProblems, fieldKeys);
|
|
1116
1112
|
const fieldsTransformInput = {
|
|
1117
|
-
jaHaniLegalCompanyName:
|
|
1118
|
-
jaKanaLegalCompanyName:
|
|
1113
|
+
jaHaniLegalCompanyName: toFullWidth,
|
|
1114
|
+
jaKanaLegalCompanyName: toFullWidth
|
|
1119
1115
|
};
|
|
1120
1116
|
const fieldsTransformMode = {
|
|
1121
1117
|
jaHaniLegalCompanyName: "blur",
|
|
@@ -1219,7 +1215,7 @@ const localizedLegalCompanyNameFieldConfig = {
|
|
|
1219
1215
|
}
|
|
1220
1216
|
};
|
|
1221
1217
|
const basicInformation = "adyen-kyc-basic-information";
|
|
1222
|
-
const styles$
|
|
1218
|
+
const styles$2 = {
|
|
1223
1219
|
basicInformation
|
|
1224
1220
|
};
|
|
1225
1221
|
const BASIC_INFORMATION_FIELDS = [
|
|
@@ -1329,8 +1325,7 @@ function BasicInformation({
|
|
|
1329
1325
|
{
|
|
1330
1326
|
companyType,
|
|
1331
1327
|
registrationNumberType: form.data.additionalInformation?.registrationNumberType,
|
|
1332
|
-
state
|
|
1333
|
-
isExperimentEnabled
|
|
1328
|
+
state
|
|
1334
1329
|
},
|
|
1335
1330
|
registrationNumberDefaultFieldMetadata
|
|
1336
1331
|
),
|
|
@@ -1401,7 +1396,7 @@ function BasicInformation({
|
|
|
1401
1396
|
handleChange: handleChangeFor,
|
|
1402
1397
|
t: businessT
|
|
1403
1398
|
});
|
|
1404
|
-
return /* @__PURE__ */ jsxs("form", { id, className: styles$
|
|
1399
|
+
return /* @__PURE__ */ jsxs("form", { id, className: styles$2.basicInformation, children: [
|
|
1405
1400
|
/* @__PURE__ */ jsx(Header, { title: t(($) => $["basicInformationFormHeading"], { ns: "business" }), children: /* @__PURE__ */ jsx(
|
|
1406
1401
|
FormDescription,
|
|
1407
1402
|
{
|
|
@@ -1512,7 +1507,6 @@ function BasicInformation({
|
|
|
1512
1507
|
companyType,
|
|
1513
1508
|
taxIdNumberType: currentCountryTaxInformation?.type
|
|
1514
1509
|
}),
|
|
1515
|
-
guidanceText: formUtils.getFieldGuidanceText(TAX_INFORMATION_FIELD),
|
|
1516
1510
|
readonly: formUtils.isReadOnly("taxInformation"),
|
|
1517
1511
|
shouldValidate,
|
|
1518
1512
|
handleChangeFor,
|
|
@@ -1559,13 +1553,13 @@ function BasicInformation({
|
|
|
1559
1553
|
exemptedFromRegistrationNumber: "iDontHaveARegistrationNumber"
|
|
1560
1554
|
}),
|
|
1561
1555
|
mask: formUtils.getMask("registrationNumber"),
|
|
1562
|
-
guidanceText: formUtils.getFieldGuidanceText(BUSINESS_REGISTRATION_NUMBER_FIELD),
|
|
1563
1556
|
helperText: getRegistrationNumberHelperText(businessT, { country, companyType }),
|
|
1564
1557
|
readonly: formUtils.isReadOnly("registrationNumber"),
|
|
1565
1558
|
optional: formUtils.isOptionalField("registrationNumber"),
|
|
1566
1559
|
shouldValidate,
|
|
1567
1560
|
handleChangeFor,
|
|
1568
1561
|
country,
|
|
1562
|
+
state,
|
|
1569
1563
|
canExempt: showField(["exemptedFromRegistrationNumber"]),
|
|
1570
1564
|
companyType
|
|
1571
1565
|
}
|
|
@@ -1589,6 +1583,12 @@ const useClearCompanyData = (options) => {
|
|
|
1589
1583
|
...options
|
|
1590
1584
|
});
|
|
1591
1585
|
};
|
|
1586
|
+
function useCompanySearchExperiments() {
|
|
1587
|
+
const { isExperimentEnabled } = useExperimentsContext();
|
|
1588
|
+
return {
|
|
1589
|
+
isAgnosticEndpointEnabled: isExperimentEnabled("EnableProviderAgnosticCompanySearchAndSelect")
|
|
1590
|
+
};
|
|
1591
|
+
}
|
|
1592
1592
|
const LOW_RISK_COMPANY_DATA_COMPLIANCE_WINDOW = 1577664e5;
|
|
1593
1593
|
const KNOWN_BROKEN_PRIMARY_SOURCE_CONNECTIONS = [
|
|
1594
1594
|
StateCodesUS.Arkansas,
|
|
@@ -1618,22 +1618,40 @@ const KNOWN_DISALLOWED_INDEX_DATASET_STATES = [
|
|
|
1618
1618
|
const KOMPANY_SEARCH_FAILURE = "Kompany index and deep search both failed to complete";
|
|
1619
1619
|
const useCompanySearch = (data, options) => {
|
|
1620
1620
|
const { rootLegalEntityId, baseUrl } = useApiContext();
|
|
1621
|
+
const { isAgnosticEndpointEnabled } = useCompanySearchExperiments();
|
|
1621
1622
|
return useQuery({
|
|
1622
1623
|
queryKey: ["companySearch", data],
|
|
1623
|
-
queryFn: () => handleCompanySearch(rootLegalEntityId.value, baseUrl.value, data),
|
|
1624
|
+
queryFn: () => handleCompanySearch(rootLegalEntityId.value, baseUrl.value, data, isAgnosticEndpointEnabled),
|
|
1624
1625
|
retry: 0,
|
|
1625
1626
|
...options
|
|
1626
1627
|
});
|
|
1627
1628
|
};
|
|
1628
|
-
const handleCompanySearch = async (rootLegalEntityId, baseUrl, data) => {
|
|
1629
|
+
const handleCompanySearch = async (rootLegalEntityId, baseUrl, data, isAgnosticEndpointEnabled) => {
|
|
1630
|
+
if (isAgnosticEndpointEnabled) {
|
|
1631
|
+
const _data2 = {
|
|
1632
|
+
name: data.name,
|
|
1633
|
+
country: data.country,
|
|
1634
|
+
stateOrProvince: data.state,
|
|
1635
|
+
...data.registrationNumber ? { registrationNumber: data.registrationNumber } : {},
|
|
1636
|
+
resultSizeLimit: data.resultSizeLimit ?? 15
|
|
1637
|
+
};
|
|
1638
|
+
return httpPost(
|
|
1639
|
+
{
|
|
1640
|
+
baseUrl,
|
|
1641
|
+
path: `legalEntities/${rootLegalEntityId}/companySearch/search`
|
|
1642
|
+
},
|
|
1643
|
+
_data2
|
|
1644
|
+
);
|
|
1645
|
+
}
|
|
1646
|
+
const _data = data;
|
|
1629
1647
|
const getRequestPayload = (text) => ({
|
|
1630
1648
|
text,
|
|
1631
|
-
country:
|
|
1632
|
-
state:
|
|
1633
|
-
limit:
|
|
1649
|
+
country: _data.country,
|
|
1650
|
+
state: _data.state,
|
|
1651
|
+
limit: _data.limit ?? 15
|
|
1634
1652
|
});
|
|
1635
|
-
const nameSearchPayload = getRequestPayload(
|
|
1636
|
-
const registrationSearchPayload = getRequestPayload(
|
|
1653
|
+
const nameSearchPayload = getRequestPayload(_data.name);
|
|
1654
|
+
const registrationSearchPayload = getRequestPayload(_data.registrationNumber);
|
|
1637
1655
|
const searchRequest = async (requestPayload, path) => {
|
|
1638
1656
|
return httpPost(
|
|
1639
1657
|
{
|
|
@@ -1661,25 +1679,35 @@ const handleCompanySearch = async (rootLegalEntityId, baseUrl, data) => {
|
|
|
1661
1679
|
return response;
|
|
1662
1680
|
};
|
|
1663
1681
|
const searchByRegistrationNumber = async () => {
|
|
1664
|
-
return KNOWN_BROKEN_PRIMARY_SOURCE_CONNECTIONS.includes(
|
|
1682
|
+
return KNOWN_BROKEN_PRIMARY_SOURCE_CONNECTIONS.includes(_data.state) ? await companyRegistrationNumberIndexSearch() : await primarySourceSearch(
|
|
1665
1683
|
companyRegistrationNumberIndexSearch,
|
|
1666
1684
|
companyRegistrationNumberDeepSearch
|
|
1667
1685
|
);
|
|
1668
1686
|
};
|
|
1669
1687
|
const searchByCompanyName = async () => {
|
|
1670
|
-
return KNOWN_BROKEN_PRIMARY_SOURCE_CONNECTIONS.includes(
|
|
1688
|
+
return KNOWN_BROKEN_PRIMARY_SOURCE_CONNECTIONS.includes(_data.state) ? await companyIndexSearch() : await primarySourceSearch(companyIndexSearch, companyDeepSearch);
|
|
1671
1689
|
};
|
|
1672
|
-
if (
|
|
1690
|
+
if (_data.registrationNumber) {
|
|
1673
1691
|
const registrationNumberResponse = await searchByRegistrationNumber();
|
|
1674
1692
|
return registrationNumberResponse.results.length > 0 ? registrationNumberResponse : await searchByCompanyName();
|
|
1675
1693
|
}
|
|
1676
1694
|
return await searchByCompanyName();
|
|
1677
1695
|
};
|
|
1678
|
-
const handleCompanyDataset = async (rootLegalEntityId, baseUrl, data) => {
|
|
1696
|
+
const handleCompanyDataset = async (rootLegalEntityId, baseUrl, data, isAgnosticEndpointEnabled) => {
|
|
1697
|
+
if (isAgnosticEndpointEnabled) {
|
|
1698
|
+
return httpPost(
|
|
1699
|
+
{
|
|
1700
|
+
baseUrl,
|
|
1701
|
+
path: `legalEntities/${rootLegalEntityId}/companyDataset/select`
|
|
1702
|
+
},
|
|
1703
|
+
data
|
|
1704
|
+
);
|
|
1705
|
+
}
|
|
1706
|
+
const _data = data;
|
|
1679
1707
|
const requestPayload = {
|
|
1680
|
-
companyId:
|
|
1708
|
+
companyId: _data.company.id,
|
|
1681
1709
|
country: "US",
|
|
1682
|
-
state:
|
|
1710
|
+
state: _data.state
|
|
1683
1711
|
};
|
|
1684
1712
|
const searchRequest = async (path) => {
|
|
1685
1713
|
return httpPost(
|
|
@@ -1693,8 +1721,8 @@ const handleCompanyDataset = async (rootLegalEntityId, baseUrl, data) => {
|
|
|
1693
1721
|
const getCompanyDataset = async () => await searchRequest();
|
|
1694
1722
|
const refreshCompanyDataset = async () => await searchRequest("refreshed");
|
|
1695
1723
|
const date = (/* @__PURE__ */ new Date()).toDateString();
|
|
1696
|
-
const isDataCompliant =
|
|
1697
|
-
return isDataCompliant && !KNOWN_DISALLOWED_INDEX_DATASET_STATES.includes(
|
|
1724
|
+
const isDataCompliant = _data.company.lastUpdate ? Date.parse(date) - Date.parse(_data.company.lastUpdate) < LOW_RISK_COMPANY_DATA_COMPLIANCE_WINDOW : false;
|
|
1725
|
+
return isDataCompliant && !KNOWN_DISALLOWED_INDEX_DATASET_STATES.includes(_data.state) ? await getCompanyDataset() : await refreshCompanyDataset();
|
|
1698
1726
|
};
|
|
1699
1727
|
const useVerifyTin = (data, options) => {
|
|
1700
1728
|
const { rootLegalEntityId, baseUrl } = useApiContext();
|
|
@@ -1716,19 +1744,32 @@ const verifyTin = async (legalEntityId, baseUrl, data) => {
|
|
|
1716
1744
|
};
|
|
1717
1745
|
const useCompanySelection = (data, options) => {
|
|
1718
1746
|
const { rootLegalEntityId, baseUrl } = useApiContext();
|
|
1747
|
+
const { isAgnosticEndpointEnabled } = useCompanySearchExperiments();
|
|
1719
1748
|
return useQuery({
|
|
1720
1749
|
queryKey: ["companySelection", data],
|
|
1721
|
-
queryFn: data ? () => handleCompanySelection(
|
|
1750
|
+
queryFn: data ? () => handleCompanySelection(
|
|
1751
|
+
rootLegalEntityId.value,
|
|
1752
|
+
baseUrl.value,
|
|
1753
|
+
data,
|
|
1754
|
+
isAgnosticEndpointEnabled
|
|
1755
|
+
) : skipToken,
|
|
1722
1756
|
retry: 0,
|
|
1723
1757
|
...options
|
|
1724
1758
|
});
|
|
1725
1759
|
};
|
|
1726
|
-
const handleCompanySelection = async (rootLegalEntityId, baseUrl, data) => {
|
|
1760
|
+
const handleCompanySelection = async (rootLegalEntityId, baseUrl, data, isAgnosticEndpointEnabled) => {
|
|
1727
1761
|
const [companyDatasetResult, tinMatch] = await Promise.all([
|
|
1728
|
-
handleCompanyDataset(
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1762
|
+
handleCompanyDataset(
|
|
1763
|
+
rootLegalEntityId,
|
|
1764
|
+
baseUrl,
|
|
1765
|
+
isAgnosticEndpointEnabled ? {
|
|
1766
|
+
id: data.id
|
|
1767
|
+
} : {
|
|
1768
|
+
company: data.company,
|
|
1769
|
+
state: data.state
|
|
1770
|
+
},
|
|
1771
|
+
isAgnosticEndpointEnabled
|
|
1772
|
+
),
|
|
1732
1773
|
verifyTin(rootLegalEntityId, baseUrl, { name: data.name, tin: data.tin })
|
|
1733
1774
|
]);
|
|
1734
1775
|
return {
|
|
@@ -1759,27 +1800,54 @@ const mapOrganizationTypeToCompanyType = (organizationType) => {
|
|
|
1759
1800
|
return CompanyTypesValues.PRIVATE_COMPANY;
|
|
1760
1801
|
}
|
|
1761
1802
|
};
|
|
1762
|
-
const applyVerifiedBusinessData = (form, country, verifiedData) => {
|
|
1803
|
+
const applyVerifiedBusinessData = (form, country, verifiedData, isAgnosticEndpointEnabled) => {
|
|
1763
1804
|
if (!verifiedData) return;
|
|
1764
1805
|
form.handleChangeFor("legalCompanyName", "basicInformation")(verifiedData.name);
|
|
1765
|
-
form.
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
|
|
1806
|
+
if (form.defaultData?.additionalInformation?.registrationAddress?.address || form.defaultData?.additionalInformation?.operationalAddress?.address)
|
|
1807
|
+
return;
|
|
1808
|
+
let verifiedAddress;
|
|
1809
|
+
if (isAgnosticEndpointEnabled) {
|
|
1810
|
+
const _verifiedData = verifiedData;
|
|
1811
|
+
form.handleChangeFor(
|
|
1812
|
+
"entityType",
|
|
1813
|
+
"companyStructure"
|
|
1814
|
+
)(mapOrganizationTypeToCompanyType(_verifiedData.companyType));
|
|
1815
|
+
verifiedAddress = {
|
|
1816
|
+
..._verifiedData.registeredAddress && {
|
|
1817
|
+
registrationAddress: mapAddressData(_verifiedData.registeredAddress)
|
|
1818
|
+
},
|
|
1819
|
+
..._verifiedData.principalPlaceOfBusinessAddress && {
|
|
1820
|
+
operationalAddress: mapAddressData(_verifiedData.principalPlaceOfBusinessAddress)
|
|
1821
|
+
}
|
|
1822
|
+
};
|
|
1823
|
+
if (_verifiedData.principalPlaceOfBusinessAddress) {
|
|
1824
|
+
form.handleChangeFor(
|
|
1825
|
+
"operationalAddressIsSame",
|
|
1826
|
+
"additionalInformation",
|
|
1827
|
+
"input"
|
|
1828
|
+
)(operationalAddressIsSameIds.OPERATIONAL_ADDRESS_IS_NOT_SAME);
|
|
1775
1829
|
}
|
|
1776
|
-
}
|
|
1777
|
-
|
|
1830
|
+
} else {
|
|
1831
|
+
const _verifiedData = verifiedData;
|
|
1778
1832
|
form.handleChangeFor(
|
|
1779
|
-
"
|
|
1780
|
-
"
|
|
1781
|
-
|
|
1782
|
-
|
|
1833
|
+
"entityType",
|
|
1834
|
+
"companyStructure"
|
|
1835
|
+
)(mapOrganizationTypeToCompanyType(_verifiedData.organizationType));
|
|
1836
|
+
const isVerifiedAddressNotRegistrationAddress = _verifiedData.isPrincipalAddress || _verifiedData.state && form.data.basicInformation?.stateOrProvince !== _verifiedData.state;
|
|
1837
|
+
verifiedAddress = isVerifiedAddressNotRegistrationAddress ? { operationalAddress: { ...mapAddressData(_verifiedData), country } } : {
|
|
1838
|
+
registrationAddress: {
|
|
1839
|
+
...mapAddressData(_verifiedData),
|
|
1840
|
+
country,
|
|
1841
|
+
stateOrProvince: form.data.basicInformation?.stateOrProvince
|
|
1842
|
+
}
|
|
1843
|
+
};
|
|
1844
|
+
if (isVerifiedAddressNotRegistrationAddress) {
|
|
1845
|
+
form.handleChangeFor(
|
|
1846
|
+
"operationalAddressIsSame",
|
|
1847
|
+
"additionalInformation",
|
|
1848
|
+
"input"
|
|
1849
|
+
)(operationalAddressIsSameIds.OPERATIONAL_ADDRESS_IS_NOT_SAME);
|
|
1850
|
+
}
|
|
1783
1851
|
}
|
|
1784
1852
|
if (verifiedAddress.registrationAddress) {
|
|
1785
1853
|
form.handleChangeFor(
|
|
@@ -1809,6 +1877,10 @@ function BusinessInformation({ fetching, selectedBusiness }) {
|
|
|
1809
1877
|
case "address":
|
|
1810
1878
|
if (value) acc[2].details = value;
|
|
1811
1879
|
break;
|
|
1880
|
+
case "registeredAddress":
|
|
1881
|
+
if (value && typeof value !== "string")
|
|
1882
|
+
acc[2].details = value?.fullAddress;
|
|
1883
|
+
break;
|
|
1812
1884
|
}
|
|
1813
1885
|
return acc;
|
|
1814
1886
|
},
|
|
@@ -1848,10 +1920,14 @@ function BusinessInformationCard({
|
|
|
1848
1920
|
handleBackClick
|
|
1849
1921
|
}) {
|
|
1850
1922
|
const { t } = useTranslation(["common", "business"]);
|
|
1851
|
-
const
|
|
1923
|
+
const { isExperimentEnabled } = useExperimentsContext();
|
|
1924
|
+
const providerAgnosticEndpointsEnabled = isExperimentEnabled(
|
|
1925
|
+
"EnableProviderAgnosticCompanySearchAndSelect"
|
|
1926
|
+
);
|
|
1927
|
+
const isSelected = selectedBusinessId === (providerAgnosticEndpointsEnabled ? result.resultId : result.id);
|
|
1852
1928
|
const excludeResultAsGovernmentEntity = useMemo(
|
|
1853
|
-
() => isBankAccountRequestedForOrganization.value && currentBusinessSelection
|
|
1854
|
-
[currentBusinessSelection]
|
|
1929
|
+
() => isBankAccountRequestedForOrganization.value && currentBusinessSelection && (providerAgnosticEndpointsEnabled ? currentBusinessSelection.companyType : currentBusinessSelection.organizationType) === "GOVERNMENTAL_ORGANIZATION",
|
|
1930
|
+
[currentBusinessSelection, providerAgnosticEndpointsEnabled]
|
|
1855
1931
|
);
|
|
1856
1932
|
const showSelectButton = useMemo(
|
|
1857
1933
|
() => !fetching && !fetchingError && currentBusinessSelection && !excludeResultAsGovernmentEntity,
|
|
@@ -1938,7 +2014,7 @@ function BusinessInformationCard({
|
|
|
1938
2014
|
] }) });
|
|
1939
2015
|
}
|
|
1940
2016
|
const businessSelectionFooter = "adyen-kyc-business-selection-footer";
|
|
1941
|
-
const styles$
|
|
2017
|
+
const styles$1 = {
|
|
1942
2018
|
businessSelectionFooter
|
|
1943
2019
|
};
|
|
1944
2020
|
const BUSINESS_SELECTION_FIELDS = [
|
|
@@ -1957,9 +2033,13 @@ function BusinessSelection({
|
|
|
1957
2033
|
const { form } = useFormContext();
|
|
1958
2034
|
const queryClient = useQueryClient();
|
|
1959
2035
|
const userEvents = useAnalyticsContext();
|
|
2036
|
+
const { isExperimentEnabled } = useExperimentsContext();
|
|
1960
2037
|
const [selectedBusinessId, setSelectedBusinessId] = useState();
|
|
1961
2038
|
const [fetchParams, setFetchParams] = useState();
|
|
1962
2039
|
usePageLandedEvent();
|
|
2040
|
+
const providerAgnosticEndpointsEnabled = isExperimentEnabled(
|
|
2041
|
+
"EnableProviderAgnosticCompanySearchAndSelect"
|
|
2042
|
+
);
|
|
1963
2043
|
const { data: companySearchResponse, isLoading: searching } = useCompanySearch({
|
|
1964
2044
|
name: form.data.basicInformation?.legalCompanyName ?? "",
|
|
1965
2045
|
country,
|
|
@@ -2000,28 +2080,35 @@ function BusinessSelection({
|
|
|
2000
2080
|
[form]
|
|
2001
2081
|
);
|
|
2002
2082
|
const handleSelectBusiness = (result) => {
|
|
2003
|
-
|
|
2083
|
+
const resultId = providerAgnosticEndpointsEnabled ? result.resultId : result.id;
|
|
2084
|
+
if ((!selectedBusinessId || selectedBusinessId !== resultId) && currentTin) {
|
|
2004
2085
|
userEvents.addPageEvent("Clicked button", {
|
|
2005
2086
|
actionType: "select",
|
|
2006
2087
|
label: "selectBusiness",
|
|
2007
2088
|
additionalData: {
|
|
2008
2089
|
companyIdx: companySearchResponse?.results.findIndex(
|
|
2009
|
-
(searchResult) => searchResult.id ===
|
|
2090
|
+
(searchResult) => (providerAgnosticEndpointsEnabled ? searchResult.resultId : searchResult.id) === resultId
|
|
2010
2091
|
)
|
|
2011
2092
|
}
|
|
2012
2093
|
});
|
|
2013
|
-
setSelectedBusinessId(
|
|
2014
|
-
setFetchParams(
|
|
2015
|
-
|
|
2016
|
-
|
|
2017
|
-
|
|
2018
|
-
|
|
2019
|
-
|
|
2094
|
+
setSelectedBusinessId(resultId);
|
|
2095
|
+
setFetchParams(
|
|
2096
|
+
providerAgnosticEndpointsEnabled ? {
|
|
2097
|
+
id: result.resultId,
|
|
2098
|
+
name: result.name,
|
|
2099
|
+
tin: currentTin
|
|
2100
|
+
} : {
|
|
2101
|
+
company: result,
|
|
2102
|
+
state: form.data.basicInformation?.stateOrProvince,
|
|
2103
|
+
name: result.name,
|
|
2104
|
+
tin: currentTin
|
|
2105
|
+
}
|
|
2106
|
+
);
|
|
2020
2107
|
}
|
|
2021
2108
|
};
|
|
2022
2109
|
const handleConfirmSelection = () => {
|
|
2023
2110
|
verifiedBusiness.value = businessData;
|
|
2024
|
-
applyVerifiedBusinessData(form, country, businessData);
|
|
2111
|
+
applyVerifiedBusinessData(form, country, businessData, providerAgnosticEndpointsEnabled);
|
|
2025
2112
|
handleChange("hasSelectedBusiness", "blur")(true);
|
|
2026
2113
|
handleNextClick();
|
|
2027
2114
|
};
|
|
@@ -2112,9 +2199,9 @@ function BusinessSelection({
|
|
|
2112
2199
|
refetchCompanySelection,
|
|
2113
2200
|
handleBackClick
|
|
2114
2201
|
},
|
|
2115
|
-
result.id
|
|
2202
|
+
providerAgnosticEndpointsEnabled ? result.resultId : result.id
|
|
2116
2203
|
)) }),
|
|
2117
|
-
/* @__PURE__ */ jsxs(Typography, { el: "span", color: "secondary", className: styles$
|
|
2204
|
+
/* @__PURE__ */ jsxs(Typography, { el: "span", color: "secondary", className: styles$1.businessSelectionFooter, children: [
|
|
2118
2205
|
t(($) => $["businessSelection__footer"], { ns: "business" }),
|
|
2119
2206
|
/* @__PURE__ */ jsx(Button, { variant: "link", onClick: proceedToManualDataEntry, testId: "manualDataEntry", children: t(($) => $["businessSelection__footerButton"], { ns: "business" }) })
|
|
2120
2207
|
] })
|
|
@@ -2269,7 +2356,7 @@ function FinancialReportingDate({
|
|
|
2269
2356
|
handleChangeFor
|
|
2270
2357
|
}) {
|
|
2271
2358
|
const { t } = useTranslation("common");
|
|
2272
|
-
return /* @__PURE__ */ jsx(
|
|
2359
|
+
return /* @__PURE__ */ jsx(
|
|
2273
2360
|
Field,
|
|
2274
2361
|
{
|
|
2275
2362
|
name: "financialReportingDate",
|
|
@@ -2293,7 +2380,7 @@ function FinancialReportingDate({
|
|
|
2293
2380
|
}
|
|
2294
2381
|
)
|
|
2295
2382
|
}
|
|
2296
|
-
)
|
|
2383
|
+
);
|
|
2297
2384
|
}
|
|
2298
2385
|
const NUMBER_OF_EMPLOYEES_FIELD = [
|
|
2299
2386
|
"numberOfEmployees"
|
|
@@ -2306,7 +2393,7 @@ function NumberOfEmployees({
|
|
|
2306
2393
|
readonly,
|
|
2307
2394
|
handleChangeFor
|
|
2308
2395
|
}) {
|
|
2309
|
-
return /* @__PURE__ */ jsx(
|
|
2396
|
+
return /* @__PURE__ */ jsx(
|
|
2310
2397
|
Field,
|
|
2311
2398
|
{
|
|
2312
2399
|
name: "numberOfEmployees",
|
|
@@ -2329,15 +2416,13 @@ function NumberOfEmployees({
|
|
|
2329
2416
|
}
|
|
2330
2417
|
)
|
|
2331
2418
|
}
|
|
2332
|
-
)
|
|
2419
|
+
);
|
|
2333
2420
|
}
|
|
2334
|
-
const
|
|
2335
|
-
const styles$1 = {
|
|
2336
|
-
financialInformationReportedValueOptions
|
|
2337
|
-
};
|
|
2421
|
+
const reportedValueOptions = "adyen-kyc-reported-value-options";
|
|
2338
2422
|
const reportedValue = "adyen-kyc-reported-value";
|
|
2339
2423
|
const reportedValueInput = "adyen-kyc-reported-value-input";
|
|
2340
2424
|
const styles = {
|
|
2425
|
+
reportedValueOptions,
|
|
2341
2426
|
reportedValue,
|
|
2342
2427
|
reportedValueInput
|
|
2343
2428
|
};
|
|
@@ -2351,12 +2436,12 @@ const ReportedValue = ({
|
|
|
2351
2436
|
errorMessage,
|
|
2352
2437
|
isValid
|
|
2353
2438
|
}) => {
|
|
2354
|
-
const { i18n } =
|
|
2439
|
+
const { i18n } = useTranslation();
|
|
2355
2440
|
return /* @__PURE__ */ jsx("div", { className: styles.reportedValue, children: /* @__PURE__ */ jsx(Field, { name: fieldName, errorMessage, isValid, helper, children: (childProps) => /* @__PURE__ */ jsx(
|
|
2356
2441
|
InputCurrency,
|
|
2357
2442
|
{
|
|
2358
2443
|
...childProps,
|
|
2359
|
-
locale: i18n.
|
|
2444
|
+
locale: i18n.language,
|
|
2360
2445
|
currency,
|
|
2361
2446
|
amount,
|
|
2362
2447
|
onAmountChanged,
|
|
@@ -2365,237 +2450,217 @@ const ReportedValue = ({
|
|
|
2365
2450
|
}
|
|
2366
2451
|
) }) });
|
|
2367
2452
|
};
|
|
2368
|
-
const
|
|
2369
|
-
|
|
2370
|
-
|
|
2371
|
-
|
|
2372
|
-
|
|
2373
|
-
|
|
2374
|
-
|
|
2375
|
-
|
|
2376
|
-
|
|
2377
|
-
|
|
2378
|
-
|
|
2379
|
-
|
|
2380
|
-
|
|
2381
|
-
|
|
2382
|
-
{
|
|
2383
|
-
|
|
2384
|
-
validate: (currency) => !isEmpty(currency),
|
|
2385
|
-
errorMessage: "fieldIsRequired"
|
|
2453
|
+
const REPORTED_VALUE_OPTION_FIELD = [
|
|
2454
|
+
"reportedValueOption",
|
|
2455
|
+
"balanceSheetTotal",
|
|
2456
|
+
"annualTurnover"
|
|
2457
|
+
];
|
|
2458
|
+
function ReportedValueOptionField({
|
|
2459
|
+
data,
|
|
2460
|
+
valid,
|
|
2461
|
+
errors,
|
|
2462
|
+
handleChangeFor,
|
|
2463
|
+
currency
|
|
2464
|
+
}) {
|
|
2465
|
+
const { t } = useTranslation("common");
|
|
2466
|
+
const updateReportedValueOption = (option) => {
|
|
2467
|
+
if (data.reportedValueOption) {
|
|
2468
|
+
handleChangeFor(data.reportedValueOption)(null);
|
|
2386
2469
|
}
|
|
2387
|
-
|
|
2388
|
-
|
|
2389
|
-
|
|
2390
|
-
|
|
2391
|
-
|
|
2392
|
-
},
|
|
2393
|
-
balanceSheetTotal: {
|
|
2394
|
-
modes: ["blur"],
|
|
2395
|
-
validate: (amount) => !isUndefinedOrNull(amount),
|
|
2396
|
-
errorMessage: "fieldIsRequired"
|
|
2397
|
-
},
|
|
2398
|
-
annualTurnover: {
|
|
2399
|
-
modes: ["blur"],
|
|
2400
|
-
validate: (amount) => !isUndefinedOrNull(amount),
|
|
2401
|
-
errorMessage: "fieldIsRequired"
|
|
2402
|
-
}
|
|
2403
|
-
};
|
|
2404
|
-
const financialInfoValidationEmployeesOnlyRules = {
|
|
2405
|
-
numberOfEmployees: [
|
|
2406
|
-
{
|
|
2407
|
-
modes: ["blur"],
|
|
2408
|
-
validate: (numberOfEmployees) => !isEmpty(numberOfEmployees),
|
|
2409
|
-
errorMessage: "fieldIsRequired"
|
|
2410
|
-
},
|
|
2470
|
+
const newReportedValue = option;
|
|
2471
|
+
handleChangeFor("reportedValueOption")(newReportedValue);
|
|
2472
|
+
};
|
|
2473
|
+
return /* @__PURE__ */ jsx(
|
|
2474
|
+
Field,
|
|
2411
2475
|
{
|
|
2412
|
-
|
|
2413
|
-
|
|
2414
|
-
|
|
2476
|
+
el: "fieldset",
|
|
2477
|
+
name: "reportedValueOption",
|
|
2478
|
+
label: t(($) => $["reportedValue"]),
|
|
2479
|
+
errorMessage: errors.reportedValueOption,
|
|
2480
|
+
helper: t(($) => $["useFiguresFromTheMostRecentYearAvailable"]),
|
|
2481
|
+
isValid: Boolean(valid.reportedValueOption),
|
|
2482
|
+
children: (childProps) => /* @__PURE__ */ jsx(
|
|
2483
|
+
RadioGroup,
|
|
2484
|
+
{
|
|
2485
|
+
name: "reportedValueOption",
|
|
2486
|
+
...childProps,
|
|
2487
|
+
value: data.reportedValueOption,
|
|
2488
|
+
items: [
|
|
2489
|
+
{
|
|
2490
|
+
id: "balanceSheetTotal",
|
|
2491
|
+
name: "balanceSheetTotal",
|
|
2492
|
+
content: /* @__PURE__ */ jsx(
|
|
2493
|
+
ReportedValue,
|
|
2494
|
+
{
|
|
2495
|
+
label: t(($) => $["balanceSheetTotal"]),
|
|
2496
|
+
currency,
|
|
2497
|
+
amount: data.balanceSheetTotal,
|
|
2498
|
+
onAmountChanged: handleChangeFor("balanceSheetTotal"),
|
|
2499
|
+
fieldName: "balanceSheetTotal",
|
|
2500
|
+
isValid: valid.balanceSheetTotal,
|
|
2501
|
+
errorMessage: errors.balanceSheetTotal
|
|
2502
|
+
}
|
|
2503
|
+
)
|
|
2504
|
+
},
|
|
2505
|
+
{
|
|
2506
|
+
id: "annualTurnover",
|
|
2507
|
+
name: "annualTurnover",
|
|
2508
|
+
content: /* @__PURE__ */ jsx(
|
|
2509
|
+
ReportedValue,
|
|
2510
|
+
{
|
|
2511
|
+
label: t(($) => $["annualTurnover"]),
|
|
2512
|
+
currency,
|
|
2513
|
+
amount: data.annualTurnover,
|
|
2514
|
+
onAmountChanged: handleChangeFor("annualTurnover"),
|
|
2515
|
+
fieldName: "annualTurnover",
|
|
2516
|
+
isValid: valid.annualTurnover,
|
|
2517
|
+
errorMessage: errors.annualTurnover
|
|
2518
|
+
}
|
|
2519
|
+
)
|
|
2520
|
+
}
|
|
2521
|
+
],
|
|
2522
|
+
onChange: updateReportedValueOption,
|
|
2523
|
+
showContentOnlyOnSelected: true,
|
|
2524
|
+
className: styles.reportedValueOptions
|
|
2525
|
+
}
|
|
2526
|
+
)
|
|
2415
2527
|
}
|
|
2416
|
-
|
|
2417
|
-
}
|
|
2418
|
-
const financialInfoValidationWithEmployeesRules = {
|
|
2419
|
-
...financialInfoValidationRules,
|
|
2420
|
-
...financialInfoValidationEmployeesOnlyRules
|
|
2421
|
-
};
|
|
2528
|
+
);
|
|
2529
|
+
}
|
|
2422
2530
|
const financialInformationFieldsForEu = [
|
|
2423
2531
|
...FINANCIAL_REPORTING_DATE_FIELD,
|
|
2424
2532
|
...CURRENCY_FIELD,
|
|
2425
|
-
|
|
2533
|
+
...REPORTED_VALUE_OPTION_FIELD
|
|
2426
2534
|
];
|
|
2427
2535
|
const financialInformationFields = [
|
|
2428
2536
|
...NUMBER_OF_EMPLOYEES_FIELD,
|
|
2429
2537
|
...FINANCIAL_REPORTING_DATE_FIELD,
|
|
2430
2538
|
...CURRENCY_FIELD,
|
|
2431
|
-
|
|
2539
|
+
...REPORTED_VALUE_OPTION_FIELD
|
|
2432
2540
|
];
|
|
2433
|
-
function FinancialInformation(
|
|
2541
|
+
function FinancialInformation({
|
|
2542
|
+
id,
|
|
2543
|
+
country,
|
|
2544
|
+
validationErrors = {},
|
|
2545
|
+
verificationErrors = {}
|
|
2546
|
+
}) {
|
|
2434
2547
|
const { t } = useTranslation("common");
|
|
2548
|
+
const { form } = useFormContext();
|
|
2435
2549
|
usePageLandedEvent();
|
|
2436
|
-
const { id, country, data: financialInformationData, multiForm, fieldValidationErrors } = props;
|
|
2437
2550
|
const defaultCurrency = currencyByCountry[country]?.[0] ?? "EUR";
|
|
2438
|
-
const
|
|
2439
|
-
|
|
2440
|
-
|
|
2441
|
-
...financialInformationFields,
|
|
2442
|
-
...data2.reportedValueOption ? [data2.reportedValueOption] : []
|
|
2443
|
-
];
|
|
2444
|
-
const getValidator = () => {
|
|
2445
|
-
if (!showReportingFields) {
|
|
2446
|
-
return financialInfoValidationEmployeesOnlyRules;
|
|
2447
|
-
}
|
|
2448
|
-
if (country === CountryCodes.UnitedKingdom) {
|
|
2449
|
-
return financialInfoValidationWithEmployeesRules;
|
|
2450
|
-
}
|
|
2451
|
-
return financialInfoValidationRules;
|
|
2452
|
-
};
|
|
2453
|
-
const { handleChangeFor, data, valid, errors, fieldProblems, schema } = useForm({
|
|
2454
|
-
...props,
|
|
2455
|
-
schema: getSchema,
|
|
2456
|
-
defaultData: financialInformationData,
|
|
2457
|
-
rules: getValidator(),
|
|
2458
|
-
fieldProblems: fieldValidationErrors
|
|
2459
|
-
});
|
|
2460
|
-
const { updateStateSlice } = useGlobalDataSlice(id);
|
|
2461
|
-
useEffect(() => {
|
|
2462
|
-
updateStateSlice({
|
|
2463
|
-
data,
|
|
2464
|
-
valid,
|
|
2465
|
-
errors,
|
|
2466
|
-
fieldProblems,
|
|
2467
|
-
schema
|
|
2468
|
-
});
|
|
2469
|
-
}, [data, valid, errors, fieldProblems, schema, updateStateSlice]);
|
|
2470
|
-
const handleChange = useCallback(
|
|
2471
|
-
(fieldName, mode) => multiForm ? multiForm.handleChangeFor(fieldName, "companyFinancialInformation", mode) : handleChangeFor(fieldName, mode),
|
|
2472
|
-
[handleChangeFor, multiForm]
|
|
2551
|
+
const handleChangeFor = useCallback(
|
|
2552
|
+
(fieldName, mode) => form.handleChangeFor(fieldName, "companyFinancialInformation", mode),
|
|
2553
|
+
[form]
|
|
2473
2554
|
);
|
|
2474
|
-
const
|
|
2475
|
-
|
|
2476
|
-
|
|
2477
|
-
|
|
2478
|
-
|
|
2479
|
-
|
|
2480
|
-
|
|
2481
|
-
|
|
2482
|
-
|
|
2483
|
-
|
|
2484
|
-
|
|
2485
|
-
|
|
2555
|
+
const formUtils = useMemo(
|
|
2556
|
+
() => createFormUtils(
|
|
2557
|
+
{
|
|
2558
|
+
data: form.data.companyFinancialInformation ?? {},
|
|
2559
|
+
allFields: form.allFields?.companyFinancialInformation ?? [],
|
|
2560
|
+
requiredFields: form.requiredFields?.companyFinancialInformation ?? [],
|
|
2561
|
+
optionalFields: form.optionalFields?.companyFinancialInformation ?? [],
|
|
2562
|
+
trustedFields: form.trustedFields?.companyFinancialInformation ?? [],
|
|
2563
|
+
obscuredFields: form.obscuredFields?.companyFinancialInformation ?? [],
|
|
2564
|
+
errors: form.errors.companyFinancialInformation ?? {},
|
|
2565
|
+
valid: form.valid.companyFinancialInformation ?? {}
|
|
2566
|
+
},
|
|
2567
|
+
t
|
|
2568
|
+
),
|
|
2569
|
+
[form, handleChangeFor, t, validationErrors, verificationErrors]
|
|
2570
|
+
);
|
|
2571
|
+
const showField = (fieldKeys) => fieldKeys.some((field) => formUtils.isRequiredField(field) || formUtils.isOptionalField(field));
|
|
2572
|
+
return /* @__PURE__ */ jsxs("form", { id, className: "adyen-kyc-company-financial-information", children: [
|
|
2486
2573
|
/* @__PURE__ */ jsx(Header, { title: t(($) => $["companyFinancialInformationFormHeading"], { ns: "business" }) }),
|
|
2574
|
+
/* @__PURE__ */ jsx(
|
|
2575
|
+
ErrorPanel,
|
|
2576
|
+
{
|
|
2577
|
+
id: "ariaErrorField",
|
|
2578
|
+
verificationErrors,
|
|
2579
|
+
validationErrors,
|
|
2580
|
+
formUtils
|
|
2581
|
+
}
|
|
2582
|
+
),
|
|
2487
2583
|
country === CountryCodes.UnitedKingdom && /* @__PURE__ */ jsx(
|
|
2488
2584
|
NumberOfEmployees,
|
|
2489
2585
|
{
|
|
2490
|
-
data: formUtils.getFieldData(
|
|
2586
|
+
data: formUtils.getFieldData(
|
|
2587
|
+
form.data.companyFinancialInformation ?? {},
|
|
2588
|
+
NUMBER_OF_EMPLOYEES_FIELD
|
|
2589
|
+
),
|
|
2491
2590
|
errors: formUtils.getFieldErrors(
|
|
2492
|
-
|
|
2493
|
-
|
|
2591
|
+
form.errors.companyFinancialInformation ?? {},
|
|
2592
|
+
form.fieldProblems.companyFinancialInformation,
|
|
2494
2593
|
NUMBER_OF_EMPLOYEES_FIELD
|
|
2495
2594
|
),
|
|
2496
|
-
handleChangeFor
|
|
2595
|
+
handleChangeFor,
|
|
2497
2596
|
labels: formUtils.getFieldLabels(NUMBER_OF_EMPLOYEES_FIELD),
|
|
2498
2597
|
readonly: formUtils.isReadOnly("numberOfEmployees"),
|
|
2499
|
-
valid: formUtils.getFieldValid(
|
|
2598
|
+
valid: formUtils.getFieldValid(
|
|
2599
|
+
form.valid.companyFinancialInformation ?? {},
|
|
2600
|
+
NUMBER_OF_EMPLOYEES_FIELD
|
|
2601
|
+
)
|
|
2500
2602
|
}
|
|
2501
2603
|
),
|
|
2502
|
-
|
|
2503
|
-
|
|
2504
|
-
|
|
2505
|
-
|
|
2506
|
-
data
|
|
2507
|
-
|
|
2508
|
-
|
|
2509
|
-
|
|
2510
|
-
|
|
2511
|
-
|
|
2512
|
-
|
|
2513
|
-
|
|
2514
|
-
|
|
2515
|
-
|
|
2516
|
-
|
|
2517
|
-
|
|
2518
|
-
|
|
2519
|
-
|
|
2520
|
-
|
|
2521
|
-
|
|
2522
|
-
|
|
2523
|
-
|
|
2524
|
-
|
|
2525
|
-
|
|
2526
|
-
|
|
2527
|
-
|
|
2528
|
-
}
|
|
2529
|
-
|
|
2530
|
-
|
|
2531
|
-
|
|
2532
|
-
|
|
2533
|
-
|
|
2534
|
-
|
|
2535
|
-
|
|
2536
|
-
|
|
2537
|
-
|
|
2538
|
-
|
|
2539
|
-
|
|
2540
|
-
|
|
2541
|
-
|
|
2542
|
-
|
|
2543
|
-
|
|
2544
|
-
|
|
2545
|
-
|
|
2546
|
-
|
|
2547
|
-
|
|
2548
|
-
|
|
2549
|
-
|
|
2550
|
-
|
|
2551
|
-
|
|
2552
|
-
|
|
2553
|
-
|
|
2554
|
-
|
|
2555
|
-
|
|
2556
|
-
|
|
2557
|
-
|
|
2558
|
-
|
|
2559
|
-
|
|
2560
|
-
|
|
2561
|
-
|
|
2562
|
-
errorMessage: formUtils.getErrorMessage(
|
|
2563
|
-
"balanceSheetTotal",
|
|
2564
|
-
formErrors,
|
|
2565
|
-
formFieldProblems
|
|
2566
|
-
)
|
|
2567
|
-
}
|
|
2568
|
-
)
|
|
2569
|
-
},
|
|
2570
|
-
{
|
|
2571
|
-
id: "annualTurnover",
|
|
2572
|
-
name: "annualTurnover",
|
|
2573
|
-
content: /* @__PURE__ */ jsx(
|
|
2574
|
-
ReportedValue,
|
|
2575
|
-
{
|
|
2576
|
-
label: t(($) => $["annualTurnover"]),
|
|
2577
|
-
currency: formData.currency ?? defaultCurrency,
|
|
2578
|
-
amount: formData.annualTurnover,
|
|
2579
|
-
onAmountChanged: handleChange("annualTurnover"),
|
|
2580
|
-
fieldName: "annualTurnover",
|
|
2581
|
-
isValid: formValid.annualTurnover,
|
|
2582
|
-
errorMessage: formUtils.getErrorMessage(
|
|
2583
|
-
"annualTurnover",
|
|
2584
|
-
formErrors,
|
|
2585
|
-
formFieldProblems
|
|
2586
|
-
)
|
|
2587
|
-
}
|
|
2588
|
-
)
|
|
2589
|
-
}
|
|
2590
|
-
],
|
|
2591
|
-
onChange: updateReportedValueOption,
|
|
2592
|
-
showContentOnlyOnSelected: true,
|
|
2593
|
-
className: styles$1.financialInformationReportedValueOptions
|
|
2594
|
-
}
|
|
2595
|
-
)
|
|
2596
|
-
}
|
|
2597
|
-
)
|
|
2598
|
-
] })
|
|
2604
|
+
showField(FINANCIAL_REPORTING_DATE_FIELD) && /* @__PURE__ */ jsx(
|
|
2605
|
+
FinancialReportingDate,
|
|
2606
|
+
{
|
|
2607
|
+
data: formUtils.getFieldData(
|
|
2608
|
+
form.data.companyFinancialInformation ?? {},
|
|
2609
|
+
FINANCIAL_REPORTING_DATE_FIELD
|
|
2610
|
+
),
|
|
2611
|
+
errors: formUtils.getFieldErrors(
|
|
2612
|
+
form.errors.companyFinancialInformation ?? {},
|
|
2613
|
+
form.fieldProblems.companyFinancialInformation,
|
|
2614
|
+
FINANCIAL_REPORTING_DATE_FIELD
|
|
2615
|
+
),
|
|
2616
|
+
handleChangeFor,
|
|
2617
|
+
labels: formUtils.getFieldLabels(FINANCIAL_REPORTING_DATE_FIELD),
|
|
2618
|
+
readonly: formUtils.isReadOnly("financialReportingDate"),
|
|
2619
|
+
valid: formUtils.getFieldValid(
|
|
2620
|
+
form.valid.companyFinancialInformation ?? {},
|
|
2621
|
+
FINANCIAL_REPORTING_DATE_FIELD
|
|
2622
|
+
)
|
|
2623
|
+
}
|
|
2624
|
+
),
|
|
2625
|
+
showField(CURRENCY_FIELD) && /* @__PURE__ */ jsx(
|
|
2626
|
+
Currency,
|
|
2627
|
+
{
|
|
2628
|
+
country,
|
|
2629
|
+
labels: { currency: t(($) => $["reportingCurrency"]) },
|
|
2630
|
+
data: formUtils.getFieldData(form.data.companyFinancialInformation ?? {}, CURRENCY_FIELD),
|
|
2631
|
+
errors: formUtils.getFieldErrors(
|
|
2632
|
+
form.errors.companyFinancialInformation ?? {},
|
|
2633
|
+
form.fieldProblems.companyFinancialInformation,
|
|
2634
|
+
CURRENCY_FIELD
|
|
2635
|
+
),
|
|
2636
|
+
handleChangeFor,
|
|
2637
|
+
readonly: formUtils.isReadOnly("currency"),
|
|
2638
|
+
valid: formUtils.getFieldValid(
|
|
2639
|
+
form.valid.companyFinancialInformation ?? {},
|
|
2640
|
+
CURRENCY_FIELD
|
|
2641
|
+
)
|
|
2642
|
+
}
|
|
2643
|
+
),
|
|
2644
|
+
showField(REPORTED_VALUE_OPTION_FIELD) && /* @__PURE__ */ jsx(
|
|
2645
|
+
ReportedValueOptionField,
|
|
2646
|
+
{
|
|
2647
|
+
data: formUtils.getFieldData(
|
|
2648
|
+
form.data.companyFinancialInformation ?? {},
|
|
2649
|
+
REPORTED_VALUE_OPTION_FIELD
|
|
2650
|
+
),
|
|
2651
|
+
valid: formUtils.getFieldValid(
|
|
2652
|
+
form.valid.companyFinancialInformation ?? {},
|
|
2653
|
+
REPORTED_VALUE_OPTION_FIELD
|
|
2654
|
+
),
|
|
2655
|
+
errors: formUtils.getFieldErrors(
|
|
2656
|
+
form.errors.companyFinancialInformation ?? {},
|
|
2657
|
+
form.fieldProblems.companyFinancialInformation,
|
|
2658
|
+
REPORTED_VALUE_OPTION_FIELD
|
|
2659
|
+
),
|
|
2660
|
+
handleChangeFor,
|
|
2661
|
+
currency: form.data.companyFinancialInformation?.currency ?? defaultCurrency
|
|
2662
|
+
}
|
|
2663
|
+
)
|
|
2599
2664
|
] });
|
|
2600
2665
|
}
|
|
2601
2666
|
const FIELDS_NEEDED_FOR_COMPANY_SEARCH = [...STATE_FIELD, ...TAX_INFORMATION_FIELD, ...BUSINESS_REGISTRATION_NUMBER_FIELD];
|
|
@@ -2607,8 +2672,7 @@ const getBasicInformationFields = (country, taskType) => {
|
|
|
2607
2672
|
return fields;
|
|
2608
2673
|
};
|
|
2609
2674
|
const getFinancialInformationFields = (country) => {
|
|
2610
|
-
|
|
2611
|
-
return [...fields, "netAssets", "balanceSheetTotal", "annualTurnover"];
|
|
2675
|
+
return country === CountryCodes.UnitedKingdom ? financialInformationFields : financialInformationFieldsForEu;
|
|
2612
2676
|
};
|
|
2613
2677
|
const staticBusinessDetailsForms = {
|
|
2614
2678
|
businessSelection: {
|
|
@@ -3234,7 +3298,7 @@ function BusinessDetailsMultiform({
|
|
|
3234
3298
|
requiredFields: form.requiredFields?.companyTaxDocument,
|
|
3235
3299
|
optionalFields: form.optionalFields?.companyTaxDocument,
|
|
3236
3300
|
trustedFields: form.trustedFields?.companyTaxDocument,
|
|
3237
|
-
handleFieldChange: () => handleChange("companyTaxDocument",
|
|
3301
|
+
handleFieldChange: (fieldName) => handleChange("companyTaxDocument", fieldName)
|
|
3238
3302
|
}
|
|
3239
3303
|
) : /* @__PURE__ */ jsx(VatDocument, { children: /* @__PURE__ */ jsx(
|
|
3240
3304
|
MemoizedDocumentUpload,
|
|
@@ -3372,15 +3436,11 @@ function BusinessDetailsMultiform({
|
|
|
3372
3436
|
return /* @__PURE__ */ jsx(
|
|
3373
3437
|
FinancialInformation,
|
|
3374
3438
|
{
|
|
3375
|
-
multiForm: form,
|
|
3376
3439
|
id: activeForm2.formId,
|
|
3377
3440
|
country,
|
|
3378
|
-
|
|
3379
|
-
|
|
3380
|
-
|
|
3381
|
-
optionalFields: form.optionalFields?.companyFinancialInformation,
|
|
3382
|
-
trustedFields: form.trustedFields?.companyFinancialInformation,
|
|
3383
|
-
shouldValidate
|
|
3441
|
+
shouldValidate,
|
|
3442
|
+
validationErrors: problems.validationErrors?.[activeForm2.formId] ?? {},
|
|
3443
|
+
verificationErrors: problems.verificationErrors?.[activeForm2.formId] ?? {}
|
|
3384
3444
|
}
|
|
3385
3445
|
);
|
|
3386
3446
|
default:
|
|
@@ -3396,8 +3456,78 @@ const CompanyStructureValidation = {
|
|
|
3396
3456
|
errorMessage: "fieldIsRequired"
|
|
3397
3457
|
}
|
|
3398
3458
|
};
|
|
3399
|
-
const
|
|
3400
|
-
|
|
3459
|
+
const currencyMetadata = {
|
|
3460
|
+
validators: {
|
|
3461
|
+
modes: ["blur"],
|
|
3462
|
+
validate: (currency) => !isEmpty(currency),
|
|
3463
|
+
errorMessage: "fieldIsRequired"
|
|
3464
|
+
}
|
|
3465
|
+
};
|
|
3466
|
+
const financialReportingDateMetadata = {
|
|
3467
|
+
validators: [
|
|
3468
|
+
{
|
|
3469
|
+
modes: ["blur"],
|
|
3470
|
+
validate: (date) => !isEmpty(date),
|
|
3471
|
+
errorMessage: "fieldIsRequired"
|
|
3472
|
+
},
|
|
3473
|
+
{
|
|
3474
|
+
modes: ["blur"],
|
|
3475
|
+
validate: (date) => date ? new Date(date) < /* @__PURE__ */ new Date() : false,
|
|
3476
|
+
errorMessage: "invalidFinancialReportingDate"
|
|
3477
|
+
}
|
|
3478
|
+
]
|
|
3479
|
+
};
|
|
3480
|
+
const numberOfEmployeesMetadata = {
|
|
3481
|
+
validators: [
|
|
3482
|
+
{
|
|
3483
|
+
modes: ["blur"],
|
|
3484
|
+
validate: (numberOfEmployees) => !isEmpty(numberOfEmployees),
|
|
3485
|
+
errorMessage: "fieldIsRequired"
|
|
3486
|
+
},
|
|
3487
|
+
{
|
|
3488
|
+
modes: ["blur"],
|
|
3489
|
+
validate: (numberOfEmployees) => Number.isInteger(Number(numberOfEmployees)) && Number(numberOfEmployees) > 0,
|
|
3490
|
+
errorMessage: "pleaseEnterAValidWholeNumber"
|
|
3491
|
+
}
|
|
3492
|
+
]
|
|
3493
|
+
};
|
|
3494
|
+
const reportedValueOptionMetadata = {
|
|
3495
|
+
validators: {
|
|
3496
|
+
modes: ["blur"],
|
|
3497
|
+
validate: (option) => !isEmpty(option),
|
|
3498
|
+
errorMessage: "fieldIsRequired"
|
|
3499
|
+
}
|
|
3500
|
+
};
|
|
3501
|
+
const balanceSheetTotalMetadata = {
|
|
3502
|
+
validators: {
|
|
3503
|
+
modes: ["blur"],
|
|
3504
|
+
validate: (amount) => !isUndefinedOrNull(amount),
|
|
3505
|
+
errorMessage: "fieldIsRequired"
|
|
3506
|
+
}
|
|
3507
|
+
};
|
|
3508
|
+
const annualTurnoverMetadata = {
|
|
3509
|
+
validators: {
|
|
3510
|
+
modes: ["blur"],
|
|
3511
|
+
validate: (amount) => !isUndefinedOrNull(amount),
|
|
3512
|
+
errorMessage: "fieldIsRequired"
|
|
3513
|
+
}
|
|
3514
|
+
};
|
|
3515
|
+
const financialInfoValidationRules = {
|
|
3516
|
+
financialReportingDate: financialReportingDateMetadata.validators,
|
|
3517
|
+
currency: currencyMetadata.validators,
|
|
3518
|
+
reportedValueOption: reportedValueOptionMetadata.validators,
|
|
3519
|
+
balanceSheetTotal: balanceSheetTotalMetadata.validators,
|
|
3520
|
+
annualTurnover: annualTurnoverMetadata.validators
|
|
3521
|
+
};
|
|
3522
|
+
const financialInfoValidationEmployeesOnlyRules = {
|
|
3523
|
+
numberOfEmployees: numberOfEmployeesMetadata.validators
|
|
3524
|
+
};
|
|
3525
|
+
const financialInfoValidationWithEmployeesRules = {
|
|
3526
|
+
...financialInfoValidationRules,
|
|
3527
|
+
...financialInfoValidationEmployeesOnlyRules
|
|
3528
|
+
};
|
|
3529
|
+
const mapApiDocumentToBusinessDetailsDocuments = (entityId) => {
|
|
3530
|
+
const registrationDocument = getDocument(entityId, "registrationDocument");
|
|
3401
3531
|
const taxDocument = getDocument(entityId, "vatDocument") ?? getDocument(entityId, "proofOfOrganizationTaxInfo");
|
|
3402
3532
|
const proofOfDirector = getDocument(entityId, "proofOfDirector");
|
|
3403
3533
|
const proofOfSignatory = getDocument(entityId, "proofOfSignatory");
|
|
@@ -3651,84 +3781,244 @@ const mapLegalEntityToBusinessDetailsSchema = ({
|
|
|
3651
3781
|
}
|
|
3652
3782
|
}, {});
|
|
3653
3783
|
};
|
|
3654
|
-
|
|
3655
|
-
|
|
3656
|
-
|
|
3657
|
-
|
|
3658
|
-
|
|
3659
|
-
|
|
3660
|
-
|
|
3661
|
-
|
|
3662
|
-
|
|
3663
|
-
|
|
3664
|
-
|
|
3665
|
-
|
|
3666
|
-
|
|
3667
|
-
|
|
3668
|
-
|
|
3669
|
-
|
|
3670
|
-
|
|
3671
|
-
|
|
3672
|
-
|
|
3673
|
-
|
|
3674
|
-
|
|
3675
|
-
|
|
3676
|
-
|
|
3677
|
-
|
|
3678
|
-
|
|
3679
|
-
|
|
3680
|
-
|
|
3681
|
-
|
|
3784
|
+
function buildRequiredForms({
|
|
3785
|
+
config: {
|
|
3786
|
+
forms,
|
|
3787
|
+
requiredFields,
|
|
3788
|
+
optionalFields,
|
|
3789
|
+
isValid,
|
|
3790
|
+
problems,
|
|
3791
|
+
isSettingEnabled,
|
|
3792
|
+
accountHolder,
|
|
3793
|
+
legalEntityResponse
|
|
3794
|
+
},
|
|
3795
|
+
options
|
|
3796
|
+
}) {
|
|
3797
|
+
const skipCompanyStructure = !!verifiedBusiness.value?.legalForm || isSettingEnabled(SettingNames.AllowLegalEntityTypeChange) && organizationTypesToSkipCompanyStructureForm.includes(
|
|
3798
|
+
legalEntityResponse.organization?.type ?? ""
|
|
3799
|
+
) && accountHolder !== "aTrust" && accountHolder !== "anUnincorporatedPartnership";
|
|
3800
|
+
const filteredForms = Object.values(forms).filter(({ formId }) => {
|
|
3801
|
+
if (formId === "businessSelection") {
|
|
3802
|
+
if (options?.hasNoSearchResults || isVerifiedSingleCompanySearchResult.value) return false;
|
|
3803
|
+
}
|
|
3804
|
+
if (formId === "companyStructure") {
|
|
3805
|
+
if (skipCompanyStructure) return false;
|
|
3806
|
+
}
|
|
3807
|
+
if (requiredFields || optionalFields) {
|
|
3808
|
+
return Boolean(requiredFields?.[formId]) || Boolean(optionalFields?.[formId]);
|
|
3809
|
+
}
|
|
3810
|
+
return true;
|
|
3811
|
+
});
|
|
3812
|
+
const requiredForms = options?.skipSummary ? filteredForms : [...filteredForms, summaryStep];
|
|
3813
|
+
return addValidityToForms(requiredForms, isValid, problems);
|
|
3814
|
+
}
|
|
3815
|
+
const isDocumentsRequired = (forms) => forms.some((form) => documentFormsIds.includes(form.formId));
|
|
3816
|
+
const getCountryOfGoverningLaw = (isCountryOfGoverningLawEnabled, basicData) => {
|
|
3817
|
+
if (!isCountryOfGoverningLawEnabled || basicData?.country !== CountryCodes.UnitedKingdom) {
|
|
3818
|
+
return void 0;
|
|
3819
|
+
}
|
|
3820
|
+
return !basicData.countryOfGoverningLaw ? CountryCodes.UnitedKingdom : basicData.countryOfGoverningLaw;
|
|
3682
3821
|
};
|
|
3683
|
-
|
|
3684
|
-
|
|
3685
|
-
|
|
3686
|
-
|
|
3687
|
-
|
|
3688
|
-
|
|
3689
|
-
|
|
3690
|
-
|
|
3822
|
+
function createStructuredListItem(term, details, t) {
|
|
3823
|
+
if (!details) return;
|
|
3824
|
+
return {
|
|
3825
|
+
term: t(($) => $[term], { ns: "common" }),
|
|
3826
|
+
details
|
|
3827
|
+
};
|
|
3828
|
+
}
|
|
3829
|
+
function getRegistrationNumberLabel(country, companyType, data) {
|
|
3830
|
+
return resolveFieldMetadata(
|
|
3831
|
+
registrationNumberDefaultFieldConfig[country],
|
|
3832
|
+
{
|
|
3833
|
+
companyType,
|
|
3834
|
+
registrationNumberType: data.registrationNumber ? inferCompanyRegistrationNumberType(data.registrationNumber, country, companyType) : getCompanyRegistrationNumberOptions(country, companyType)?.[0]?.id
|
|
3835
|
+
},
|
|
3836
|
+
registrationNumberDefaultFieldMetadata
|
|
3837
|
+
).label ?? "";
|
|
3838
|
+
}
|
|
3839
|
+
function getTaxIdLabel(country) {
|
|
3840
|
+
return resolveFieldMetadata(
|
|
3841
|
+
taxInformationDefaultFieldConfig[country],
|
|
3842
|
+
{
|
|
3843
|
+
taxIdNumberType: countryToTaxInfoTypeMap[country] ?? void 0,
|
|
3844
|
+
// TODO use type selector
|
|
3845
|
+
companyType: void 0
|
|
3846
|
+
},
|
|
3847
|
+
taxInformationDefaultFieldMetadata
|
|
3848
|
+
).label ?? "";
|
|
3849
|
+
}
|
|
3850
|
+
const formatBasicInformation = (data, datasetUtils, companyType, isCountryOfGoverningLawEnabled) => {
|
|
3851
|
+
const country = data.country;
|
|
3852
|
+
return {
|
|
3853
|
+
legalCompanyName: data.legalCompanyName,
|
|
3854
|
+
country: datasetUtils.getCountryName(data.country),
|
|
3855
|
+
[getKeyForField("stateOrProvince", data.country)]: datasetUtils.getStateName(
|
|
3856
|
+
data.stateOrProvince,
|
|
3857
|
+
data.country
|
|
3858
|
+
),
|
|
3859
|
+
[getTaxIdLabel(country)]: data.taxInformation?.find((taxId) => data.country === taxId.country)?.number,
|
|
3860
|
+
[getRegistrationNumberLabel(country, companyType, data)]: data.registrationNumber,
|
|
3861
|
+
countryOfGoverningLaw: datasetUtils.getCountryName(
|
|
3862
|
+
getCountryOfGoverningLaw(isCountryOfGoverningLawEnabled, data)
|
|
3863
|
+
)
|
|
3864
|
+
};
|
|
3691
3865
|
};
|
|
3692
|
-
const
|
|
3693
|
-
|
|
3694
|
-
|
|
3695
|
-
|
|
3696
|
-
|
|
3697
|
-
|
|
3698
|
-
|
|
3699
|
-
|
|
3866
|
+
const formatAdditionalInformation = (data, country, companyType) => {
|
|
3867
|
+
return {
|
|
3868
|
+
businessStructure: data.legalFormLabel,
|
|
3869
|
+
doingBusinessAs: data.doingBusinessAs,
|
|
3870
|
+
industry: data.industryCodes?.[0].name,
|
|
3871
|
+
[getRegistrationNumberLabel(country, companyType, data)]: data.registrationNumber,
|
|
3872
|
+
[getTaxIdLabel(country)]: !data.isUen && data.taxInformation?.find((taxId) => country === taxId.country)?.number,
|
|
3873
|
+
vatNumber: data.vatNumber,
|
|
3874
|
+
vatAbsenceReason: data.vatAbsenceReason,
|
|
3875
|
+
dateOfIncorporation: data.dateOfIncorporation,
|
|
3876
|
+
stockExchangeMIC: data.stockExchangeMIC,
|
|
3877
|
+
stockISIN: data.stockISIN,
|
|
3878
|
+
stockTickerSymbol: data.stockTickerSymbol,
|
|
3879
|
+
eInvoicingCode: data.eInvoicingCode
|
|
3880
|
+
};
|
|
3700
3881
|
};
|
|
3701
|
-
const
|
|
3702
|
-
|
|
3703
|
-
|
|
3704
|
-
|
|
3705
|
-
|
|
3706
|
-
|
|
3707
|
-
|
|
3708
|
-
L1: {
|
|
3709
|
-
...businessDetailsBase,
|
|
3710
|
-
...financialInformationBase
|
|
3711
|
-
},
|
|
3712
|
-
// L for org is basically L_TAXINFO for Individuals (we will fix this in the near future
|
|
3713
|
-
// to make them aligned and less confusing)
|
|
3714
|
-
L: {
|
|
3715
|
-
...businessDetailsBase,
|
|
3716
|
-
...taxInformationBase,
|
|
3717
|
-
...financialInformationBase
|
|
3718
|
-
},
|
|
3719
|
-
L_PROOFOFADDRESS: {
|
|
3720
|
-
// TODO this field does not exist
|
|
3721
|
-
// proofOfAddressDocument: { rule: 'REQUIRED' },
|
|
3722
|
-
},
|
|
3723
|
-
L_REGDOC: {
|
|
3724
|
-
registrationDocument: { rule: "REQUIRED" }
|
|
3725
|
-
},
|
|
3726
|
-
L_TAXDOC: {
|
|
3727
|
-
taxDocument: { rule: "REQUIRED" }
|
|
3728
|
-
},
|
|
3729
|
-
L_BAFIN: {
|
|
3730
|
-
legalForm: { rule: "REQUIRED" }
|
|
3882
|
+
const formatAddress = (data, datasetUtils, country, version) => {
|
|
3883
|
+
return mapAddressLabelsNewSummary(data, datasetUtils);
|
|
3884
|
+
};
|
|
3885
|
+
const formatFinancialInformationSummary = (data, language, country, dateOfIncorporation) => {
|
|
3886
|
+
if (!data) return {};
|
|
3887
|
+
if (dateOfIncorporation && !isDateOlderThanAYear(dateOfIncorporation)) {
|
|
3888
|
+
return country === CountryCodes.UnitedKingdom ? { numberOfEmployees: data.numberOfEmployees } : {};
|
|
3731
3889
|
}
|
|
3890
|
+
return {
|
|
3891
|
+
currency: data.currency,
|
|
3892
|
+
financialReportingDate: data.financialReportingDate,
|
|
3893
|
+
...country === CountryCodes.UnitedKingdom ? { numberOfEmployees: data.numberOfEmployees } : {},
|
|
3894
|
+
...data.balanceSheetTotal ? { balanceSheetTotal: formatCurrency(data.balanceSheetTotal, data.currency, language) } : {},
|
|
3895
|
+
...data.annualTurnover ? { annualTurnover: formatCurrency(data.annualTurnover, data.currency, language) } : {}
|
|
3896
|
+
};
|
|
3897
|
+
};
|
|
3898
|
+
const formatDataForSummary = (data, forms, t, language, isExperimentEnabled, version) => {
|
|
3899
|
+
const OMITTED_FORMS = ["businessSelection", "summary"];
|
|
3900
|
+
const datasetUtils = datasetUtilities(language);
|
|
3901
|
+
const isCountryOfGoverningLawEnabled = isExperimentEnabled(
|
|
3902
|
+
"EnableCountryOfGoverningLawForUKCompanies"
|
|
3903
|
+
);
|
|
3904
|
+
const getSummaryItemsForForm = (formId) => {
|
|
3905
|
+
if (!data[formId]) return {};
|
|
3906
|
+
switch (formId) {
|
|
3907
|
+
case "basicInformation":
|
|
3908
|
+
return formatBasicInformation(
|
|
3909
|
+
data[formId],
|
|
3910
|
+
datasetUtils,
|
|
3911
|
+
data.companyStructure?.entityType,
|
|
3912
|
+
isCountryOfGoverningLawEnabled
|
|
3913
|
+
);
|
|
3914
|
+
case "companyStructure":
|
|
3915
|
+
return {
|
|
3916
|
+
entityType: t(
|
|
3917
|
+
($) => $[companyTypeMetadata[data[formId]?.entityType]?.name],
|
|
3918
|
+
{ ns: "business" }
|
|
3919
|
+
)
|
|
3920
|
+
};
|
|
3921
|
+
case "additionalInformation":
|
|
3922
|
+
return formatAdditionalInformation(
|
|
3923
|
+
data[formId],
|
|
3924
|
+
data.basicInformation?.country,
|
|
3925
|
+
data.companyStructure?.entityType
|
|
3926
|
+
);
|
|
3927
|
+
case "companyRegistrationDocument":
|
|
3928
|
+
return {
|
|
3929
|
+
fileName: data[formId].registrationDocument?.[0]?.name,
|
|
3930
|
+
description: data[formId].description
|
|
3931
|
+
};
|
|
3932
|
+
case "companyTaxDocument":
|
|
3933
|
+
return {
|
|
3934
|
+
fileName: data[formId]?.taxDocument?.[0]?.name,
|
|
3935
|
+
description: data[formId].description
|
|
3936
|
+
};
|
|
3937
|
+
case "companyProofOfDirectorDocument":
|
|
3938
|
+
return {
|
|
3939
|
+
fileName: data[formId]?.proofOfDirector?.[0]?.name,
|
|
3940
|
+
description: data[formId].description
|
|
3941
|
+
};
|
|
3942
|
+
case "companyProofOfSignatoryDocument":
|
|
3943
|
+
return {
|
|
3944
|
+
fileName: data[formId]?.proofOfSignatory?.[0]?.name,
|
|
3945
|
+
description: data[formId].description
|
|
3946
|
+
};
|
|
3947
|
+
case "companyProofOfOwnershipDocument":
|
|
3948
|
+
return {
|
|
3949
|
+
fileName: data[formId].proofOfOwnership?.map((doc) => doc.name).join("\n"),
|
|
3950
|
+
description: data[formId].description
|
|
3951
|
+
};
|
|
3952
|
+
case "companyFinancialInformation":
|
|
3953
|
+
return formatFinancialInformationSummary(
|
|
3954
|
+
data[formId],
|
|
3955
|
+
language,
|
|
3956
|
+
data.basicInformation?.country,
|
|
3957
|
+
data.additionalInformation?.dateOfIncorporation
|
|
3958
|
+
);
|
|
3959
|
+
default:
|
|
3960
|
+
return {};
|
|
3961
|
+
}
|
|
3962
|
+
};
|
|
3963
|
+
const translateAndFilterMappedSummary = (data2) => {
|
|
3964
|
+
const tmp = [];
|
|
3965
|
+
for (const summaryItem in data2) {
|
|
3966
|
+
const item = createStructuredListItem(
|
|
3967
|
+
summaryItem,
|
|
3968
|
+
data2[summaryItem],
|
|
3969
|
+
t
|
|
3970
|
+
);
|
|
3971
|
+
if (item) tmp.push(item);
|
|
3972
|
+
}
|
|
3973
|
+
return tmp;
|
|
3974
|
+
};
|
|
3975
|
+
const summarySections = [];
|
|
3976
|
+
for (const form of forms) {
|
|
3977
|
+
if (OMITTED_FORMS.includes(form.formId)) continue;
|
|
3978
|
+
const summaryItems = translateAndFilterMappedSummary(
|
|
3979
|
+
getSummaryItemsForForm(form.formId)
|
|
3980
|
+
);
|
|
3981
|
+
if (summaryItems.length > 0) {
|
|
3982
|
+
summarySections.push({
|
|
3983
|
+
formId: form.formId,
|
|
3984
|
+
label: t(($) => $[form.formName], { ns: "common" }),
|
|
3985
|
+
items: summaryItems
|
|
3986
|
+
});
|
|
3987
|
+
}
|
|
3988
|
+
if (form.formId === "additionalInformation") {
|
|
3989
|
+
const registrationAddressSummaryItems = translateAndFilterMappedSummary(
|
|
3990
|
+
formatAddress(
|
|
3991
|
+
data.additionalInformation?.registrationAddress,
|
|
3992
|
+
datasetUtils,
|
|
3993
|
+
data.basicInformation?.country
|
|
3994
|
+
)
|
|
3995
|
+
);
|
|
3996
|
+
if (registrationAddressSummaryItems.length > 0) {
|
|
3997
|
+
summarySections.push({
|
|
3998
|
+
formId: "registrationAddress",
|
|
3999
|
+
label: t(($) => $["registrationAddress"], { ns: "common" }),
|
|
4000
|
+
items: registrationAddressSummaryItems
|
|
4001
|
+
});
|
|
4002
|
+
}
|
|
4003
|
+
if (data[form.formId]?.operationalAddressIsSame === operationalAddressIsSameIds.OPERATIONAL_ADDRESS_IS_NOT_SAME) {
|
|
4004
|
+
const operationalAddressSummaryItems = translateAndFilterMappedSummary(
|
|
4005
|
+
formatAddress(
|
|
4006
|
+
data.additionalInformation?.operationalAddress,
|
|
4007
|
+
datasetUtils,
|
|
4008
|
+
data.basicInformation?.country
|
|
4009
|
+
)
|
|
4010
|
+
);
|
|
4011
|
+
if (operationalAddressSummaryItems.length > 0) {
|
|
4012
|
+
summarySections.push({
|
|
4013
|
+
formId: "operationAddress",
|
|
4014
|
+
label: t(($) => $["operationalAddress"], { ns: "common" }),
|
|
4015
|
+
items: operationalAddressSummaryItems
|
|
4016
|
+
});
|
|
4017
|
+
}
|
|
4018
|
+
}
|
|
4019
|
+
}
|
|
4020
|
+
}
|
|
4021
|
+
return summarySections;
|
|
3732
4022
|
};
|
|
3733
4023
|
const adjustFormData = (oldFormData, newFormData) => {
|
|
3734
4024
|
const schema = Array.from((/* @__PURE__ */ new Set([...keysOf(oldFormData), ...keysOf(newFormData)])).keys());
|
|
@@ -3752,34 +4042,6 @@ const setRemovedFieldsOnSchemaToDeletedValue = (newData, existingData) => {
|
|
|
3752
4042
|
return { ...adjusted, [formId]: adjustFormData(oldFormData, newFormData) };
|
|
3753
4043
|
}, {});
|
|
3754
4044
|
};
|
|
3755
|
-
const formatFinancialInformationSummary = (data, language, country, dateOfIncorporation) => {
|
|
3756
|
-
let summary;
|
|
3757
|
-
if (!data) return void 0;
|
|
3758
|
-
if (dateOfIncorporation && !isDateOlderThanAYear(dateOfIncorporation)) {
|
|
3759
|
-
if (country === CountryCodes.UnitedKingdom) {
|
|
3760
|
-
summary = { numberOfEmployees: `${data.numberOfEmployees}` };
|
|
3761
|
-
return summary;
|
|
3762
|
-
}
|
|
3763
|
-
return void 0;
|
|
3764
|
-
}
|
|
3765
|
-
summary = {
|
|
3766
|
-
currency: data.currency,
|
|
3767
|
-
financialReportingDate: data.financialReportingDate
|
|
3768
|
-
};
|
|
3769
|
-
if (country === CountryCodes.UnitedKingdom) {
|
|
3770
|
-
summary.numberOfEmployees = `${data.numberOfEmployees}`;
|
|
3771
|
-
}
|
|
3772
|
-
if (data.balanceSheetTotal) {
|
|
3773
|
-
summary.balanceSheetTotal = summaryItem(
|
|
3774
|
-
"balanceSheetTotal",
|
|
3775
|
-
formatCurrency(data.balanceSheetTotal, data.currency, language)
|
|
3776
|
-
);
|
|
3777
|
-
}
|
|
3778
|
-
if (data.annualTurnover) {
|
|
3779
|
-
summary.annualTurnover = formatCurrency(data.annualTurnover, data.currency, language);
|
|
3780
|
-
}
|
|
3781
|
-
return summary;
|
|
3782
|
-
};
|
|
3783
4045
|
const BUSINESS_BANK_ACCOUNT_TAX_ID_COUNTRIES = [
|
|
3784
4046
|
CountryCodes.Estonia,
|
|
3785
4047
|
CountryCodes.Finland,
|
|
@@ -3920,295 +4182,39 @@ const mapBusinessDetailsSchemaToLegalEntity = (data, accountHolder, isExperiment
|
|
|
3920
4182
|
if (typeof data.additionalInformation?.hasDoingBusinessAs !== "undefined") {
|
|
3921
4183
|
entityObject.doingBusinessAsAbsent = !data.additionalInformation.hasDoingBusinessAs;
|
|
3922
4184
|
}
|
|
3923
|
-
} else {
|
|
3924
|
-
entityObject.doingBusinessAs = doingBusinessAs || data.basicInformation?.legalCompanyName;
|
|
3925
|
-
delete entityObject.doingBusinessAsAbsent;
|
|
3926
|
-
}
|
|
3927
|
-
if (data.additionalInformation?.operationalAddressIsSame === operationalAddressIsSameIds.OPERATIONAL_ADDRESS_IS_SAME && entityObject.principalPlaceOfBusiness) {
|
|
3928
|
-
entityObject.principalPlaceOfBusiness = entityObject.registeredAddress;
|
|
3929
|
-
}
|
|
3930
|
-
const addressLocalizations = mapJpAddressSchemaToAddressLocalizations(
|
|
3931
|
-
data.additionalInformation?.registrationAddress
|
|
3932
|
-
);
|
|
3933
|
-
if (addressLocalizations.length > 0)
|
|
3934
|
-
entityObject.registeredAddress.localization = addressLocalizations;
|
|
3935
|
-
if (entityObject.registeredAddress?.country && entityObject.registeredAddress?.stateOrProvince && !COUNTRIES_WITH_STATES_DATASET.includes(entityObject.registeredAddress?.country)) {
|
|
3936
|
-
entityObject.registeredAddress.stateOrProvince = "";
|
|
3937
|
-
}
|
|
3938
|
-
if (!isEmpty$1(data.companyFinancialInformation)) {
|
|
3939
|
-
|
|
3940
|
-
|
|
3941
|
-
|
|
3942
|
-
|
|
3943
|
-
|
|
3944
|
-
|
|
3945
|
-
isIncorporationDateDependencyEnabled ? data.additionalInformation?.dateOfIncorporation : void 0
|
|
3946
|
-
)
|
|
3947
|
-
];
|
|
3948
|
-
}
|
|
3949
|
-
}
|
|
3950
|
-
requestObj.type = requestObj.organization ? LegalEntityTypes.ORGANIZATION : LegalEntityTypes.SOLE_PROPRIETORSHIP;
|
|
3951
|
-
if (entityObject?.registeredAddress.country === "US") {
|
|
3952
|
-
delete entityObject.registrationNumber;
|
|
3953
|
-
}
|
|
3954
|
-
if (!canSaveRegNumberAbsentState) {
|
|
3955
|
-
delete requestObj.organization?.registrationNumberAbsent;
|
|
3956
|
-
}
|
|
3957
|
-
return requestObj;
|
|
3958
|
-
};
|
|
3959
|
-
function buildRequiredForms({
|
|
3960
|
-
config: {
|
|
3961
|
-
forms,
|
|
3962
|
-
requiredFields,
|
|
3963
|
-
optionalFields,
|
|
3964
|
-
isValid,
|
|
3965
|
-
problems,
|
|
3966
|
-
isSettingEnabled,
|
|
3967
|
-
accountHolder,
|
|
3968
|
-
legalEntityResponse
|
|
3969
|
-
},
|
|
3970
|
-
options
|
|
3971
|
-
}) {
|
|
3972
|
-
const skipCompanyStructure = !!verifiedBusiness.value?.legalForm || isSettingEnabled(SettingNames.AllowLegalEntityTypeChange) && organizationTypesToSkipCompanyStructureForm.includes(
|
|
3973
|
-
legalEntityResponse.organization?.type ?? ""
|
|
3974
|
-
) && accountHolder !== "aTrust" && accountHolder !== "anUnincorporatedPartnership";
|
|
3975
|
-
const filteredForms = Object.values(forms).filter(({ formId }) => {
|
|
3976
|
-
if (formId === "businessSelection") {
|
|
3977
|
-
if (options?.hasNoSearchResults || isVerifiedSingleCompanySearchResult.value) return false;
|
|
3978
|
-
}
|
|
3979
|
-
if (formId === "companyStructure") {
|
|
3980
|
-
if (skipCompanyStructure) return false;
|
|
3981
|
-
}
|
|
3982
|
-
if (requiredFields || optionalFields) {
|
|
3983
|
-
return Boolean(requiredFields?.[formId]) || Boolean(optionalFields?.[formId]);
|
|
3984
|
-
}
|
|
3985
|
-
return true;
|
|
3986
|
-
});
|
|
3987
|
-
const requiredForms = options?.skipSummary ? filteredForms : [...filteredForms, summaryStep];
|
|
3988
|
-
return addValidityToForms(requiredForms, isValid, problems);
|
|
3989
|
-
}
|
|
3990
|
-
const isDocumentsRequired = (forms) => forms.some((form) => documentFormsIds.includes(form.formId));
|
|
3991
|
-
const formatBasicInformation = (data, datasetUtils, companyType, isCountryOfGoverningLawEnabled) => {
|
|
3992
|
-
const country = data.country;
|
|
3993
|
-
const registrationNumberLabel = resolveFieldMetadata(
|
|
3994
|
-
registrationNumberDefaultFieldConfig[country],
|
|
3995
|
-
{
|
|
3996
|
-
companyType,
|
|
3997
|
-
registrationNumberType: data.registrationNumber ? inferCompanyRegistrationNumberType(data.registrationNumber, country, companyType) : getCompanyRegistrationNumberOptions(country, companyType)?.[0]?.id
|
|
3998
|
-
},
|
|
3999
|
-
registrationNumberDefaultFieldMetadata
|
|
4000
|
-
).label;
|
|
4001
|
-
const taxIdLabel = resolveFieldMetadata(
|
|
4002
|
-
taxInformationDefaultFieldConfig[country],
|
|
4003
|
-
{
|
|
4004
|
-
taxIdNumberType: countryToTaxInfoTypeMap[country] ?? void 0,
|
|
4005
|
-
// TODO use type selector
|
|
4006
|
-
companyType: void 0
|
|
4007
|
-
},
|
|
4008
|
-
taxInformationDefaultFieldMetadata
|
|
4009
|
-
).label;
|
|
4010
|
-
const countryOfGoverningLaw = getCountryOfGoverningLaw(isCountryOfGoverningLawEnabled, data);
|
|
4011
|
-
return {
|
|
4012
|
-
["legalCompanyName"]: data.legalCompanyName,
|
|
4013
|
-
country: datasetUtils.getCountryName(data.country),
|
|
4014
|
-
[getKeyForField("stateOrProvince", data.country)]: datasetUtils.getStateName(
|
|
4015
|
-
data.stateOrProvince,
|
|
4016
|
-
data.country
|
|
4017
|
-
),
|
|
4018
|
-
[taxIdLabel]: data.taxInformation?.find((taxId) => data.country === taxId.country)?.number,
|
|
4019
|
-
[registrationNumberLabel]: data.registrationNumber,
|
|
4020
|
-
countryOfGoverningLaw: datasetUtils.getCountryName(countryOfGoverningLaw)
|
|
4021
|
-
};
|
|
4022
|
-
};
|
|
4023
|
-
const formatAdditionalInformation = (data, country, companyType, t) => {
|
|
4024
|
-
const registrationNumberLabel = resolveFieldMetadata(
|
|
4025
|
-
registrationNumberDefaultFieldConfig[country],
|
|
4026
|
-
{
|
|
4027
|
-
companyType,
|
|
4028
|
-
registrationNumberType: data.registrationNumber ? inferCompanyRegistrationNumberType(data.registrationNumber, country, companyType) : getCompanyRegistrationNumberOptions(country, companyType)?.[0]?.id
|
|
4029
|
-
},
|
|
4030
|
-
registrationNumberDefaultFieldMetadata
|
|
4031
|
-
).label;
|
|
4032
|
-
const taxIdLabel = resolveFieldMetadata(
|
|
4033
|
-
taxInformationDefaultFieldConfig[country],
|
|
4034
|
-
{
|
|
4035
|
-
taxIdNumberType: countryToTaxInfoTypeMap[country] ?? void 0,
|
|
4036
|
-
// TODO use type selector
|
|
4037
|
-
companyType: void 0
|
|
4038
|
-
},
|
|
4039
|
-
taxInformationDefaultFieldMetadata
|
|
4040
|
-
).label;
|
|
4041
|
-
return {
|
|
4042
|
-
["businessStructure"]: data.legalFormLabel,
|
|
4043
|
-
["doingBusinessAs"]: data.doingBusinessAs,
|
|
4044
|
-
["industry"]: data.industryCodes?.[0].name,
|
|
4045
|
-
[registrationNumberLabel]: data.registrationNumber,
|
|
4046
|
-
[taxIdLabel]: data.isUen ? void 0 : data.taxInformation?.find((taxId) => country === taxId.country)?.number,
|
|
4047
|
-
["vatNumber"]: data.vatNumber,
|
|
4048
|
-
["vatAbsenceReason"]: data.vatAbsenceReason ? t(($) => $[data.vatAbsenceReason], { ns: "common" }) : void 0,
|
|
4049
|
-
["dateOfIncorporation"]: data.dateOfIncorporation,
|
|
4050
|
-
["stockExchangeMIC"]: data.stockExchangeMIC,
|
|
4051
|
-
["stockISIN"]: data.stockISIN,
|
|
4052
|
-
["stockTickerSymbol"]: data.stockTickerSymbol,
|
|
4053
|
-
["eInvoicingCode"]: data.eInvoicingCode
|
|
4054
|
-
};
|
|
4055
|
-
};
|
|
4056
|
-
const formatDataForSummary = (data, forms, t, language, isExperimentEnabled, version) => {
|
|
4057
|
-
const datasetUtils = datasetUtilities(language);
|
|
4058
|
-
return entriesOf(data).reduce((summaryData, [form]) => {
|
|
4059
|
-
if (!data[form]) return summaryData;
|
|
4060
|
-
const isCountryOfGoverningLawEnabled = isExperimentEnabled(
|
|
4061
|
-
"EnableCountryOfGoverningLawForUKCompanies"
|
|
4062
|
-
);
|
|
4063
|
-
switch (form) {
|
|
4064
|
-
case "basicInformation":
|
|
4065
|
-
return {
|
|
4066
|
-
...summaryData,
|
|
4067
|
-
[form]: formatBasicInformation(
|
|
4068
|
-
data[form],
|
|
4069
|
-
datasetUtils,
|
|
4070
|
-
data.companyStructure?.entityType,
|
|
4071
|
-
isCountryOfGoverningLawEnabled
|
|
4072
|
-
)
|
|
4073
|
-
};
|
|
4074
|
-
case "companyStructure":
|
|
4075
|
-
return {
|
|
4076
|
-
...summaryData,
|
|
4077
|
-
[form]: {
|
|
4078
|
-
entityType: t(
|
|
4079
|
-
($) => $[companyTypeMetadata[data["companyStructure"]?.entityType]?.name],
|
|
4080
|
-
{
|
|
4081
|
-
ns: "business"
|
|
4082
|
-
}
|
|
4083
|
-
)
|
|
4084
|
-
}
|
|
4085
|
-
};
|
|
4086
|
-
case "additionalInformation":
|
|
4087
|
-
return {
|
|
4088
|
-
...summaryData,
|
|
4089
|
-
[form]: {
|
|
4090
|
-
hasInnerForms: true,
|
|
4091
|
-
additionalInformationFormName: formatAdditionalInformation(
|
|
4092
|
-
data[form],
|
|
4093
|
-
data.basicInformation?.country,
|
|
4094
|
-
data.companyStructure?.entityType,
|
|
4095
|
-
t
|
|
4096
|
-
),
|
|
4097
|
-
registrationAddress: data.basicInformation?.country === CountryCodes.Japan && version === 4 ? mapJpAddressSummary(data[form].registrationAddress, datasetUtils) : mapAddressLabels(data[form].registrationAddress, datasetUtils),
|
|
4098
|
-
operationalAddress: data[form].operationalAddressIsSame === operationalAddressIsSameIds.OPERATIONAL_ADDRESS_IS_NOT_SAME ? data.basicInformation?.country === CountryCodes.Japan && version === 4 ? mapJpAddressSummary(data[form].operationalAddress, datasetUtils) : mapAddressLabels(data[form].operationalAddress, datasetUtils) : void 0
|
|
4099
|
-
}
|
|
4100
|
-
};
|
|
4101
|
-
case "companyRegistrationDocument":
|
|
4102
|
-
if (!isDocumentsRequired(forms)) return summaryData;
|
|
4103
|
-
return {
|
|
4104
|
-
...summaryData,
|
|
4105
|
-
[form]: {
|
|
4106
|
-
companyRegistrationDocument: {
|
|
4107
|
-
fileName: data[form].registrationDocument?.[0]?.name,
|
|
4108
|
-
description: data[form].description
|
|
4109
|
-
}
|
|
4110
|
-
}
|
|
4111
|
-
};
|
|
4112
|
-
case "companyTaxDocument":
|
|
4113
|
-
if (!isDocumentsRequired(forms)) return summaryData;
|
|
4114
|
-
return {
|
|
4115
|
-
...summaryData,
|
|
4116
|
-
[form]: {
|
|
4117
|
-
companyTaxDocument: {
|
|
4118
|
-
fileName: data[form].taxDocument?.[0]?.name,
|
|
4119
|
-
description: data[form].description
|
|
4120
|
-
}
|
|
4121
|
-
}
|
|
4122
|
-
};
|
|
4123
|
-
case "companyProofOfDirectorDocument":
|
|
4124
|
-
if (!isDocumentsRequired(forms)) return summaryData;
|
|
4125
|
-
return {
|
|
4126
|
-
...summaryData,
|
|
4127
|
-
[form]: {
|
|
4128
|
-
companyProofOfDirectorDocument: {
|
|
4129
|
-
fileName: data[form].proofOfDirector?.[0]?.name,
|
|
4130
|
-
description: data[form].description
|
|
4131
|
-
}
|
|
4132
|
-
}
|
|
4133
|
-
};
|
|
4134
|
-
case "companyProofOfSignatoryDocument":
|
|
4135
|
-
if (!isDocumentsRequired(forms)) return summaryData;
|
|
4136
|
-
return {
|
|
4137
|
-
...summaryData,
|
|
4138
|
-
[form]: {
|
|
4139
|
-
companyProofOfSignatoryDocument: {
|
|
4140
|
-
fileName: data[form].proofOfSignatory?.[0]?.name,
|
|
4141
|
-
description: data[form].description
|
|
4142
|
-
}
|
|
4143
|
-
}
|
|
4144
|
-
};
|
|
4145
|
-
case "companyProofOfOwnershipDocument":
|
|
4146
|
-
if (!isDocumentsRequired(forms)) return summaryData;
|
|
4147
|
-
return {
|
|
4148
|
-
...summaryData,
|
|
4149
|
-
[form]: {
|
|
4150
|
-
companyProofOfOwnershipDocument: {
|
|
4151
|
-
fileName: data[form].proofOfOwnership?.map((doc) => doc.name).join("\n"),
|
|
4152
|
-
description: data[form].description
|
|
4153
|
-
}
|
|
4154
|
-
}
|
|
4155
|
-
};
|
|
4156
|
-
case "companyFinancialInformation": {
|
|
4157
|
-
const isIncorporationDateDependencyEnabled = isExperimentEnabled(
|
|
4158
|
-
"EnableIncorporationDateBasedFinancialValidationForHO"
|
|
4159
|
-
);
|
|
4160
|
-
return {
|
|
4161
|
-
...summaryData,
|
|
4162
|
-
[form]: formatFinancialInformationSummary(
|
|
4163
|
-
data[form],
|
|
4164
|
-
language,
|
|
4165
|
-
data.basicInformation?.country,
|
|
4166
|
-
isIncorporationDateDependencyEnabled ? data.additionalInformation?.dateOfIncorporation : void 0
|
|
4167
|
-
)
|
|
4168
|
-
};
|
|
4169
|
-
}
|
|
4170
|
-
default:
|
|
4171
|
-
return summaryData;
|
|
4172
|
-
}
|
|
4173
|
-
}, {});
|
|
4174
|
-
};
|
|
4175
|
-
async function submitDocuments({
|
|
4176
|
-
data,
|
|
4177
|
-
legalEntity,
|
|
4178
|
-
forms,
|
|
4179
|
-
documentUtils,
|
|
4180
|
-
userEvents
|
|
4181
|
-
}) {
|
|
4182
|
-
if (!isDocumentsRequired(forms)) return;
|
|
4183
|
-
const logger2 = createLogger();
|
|
4184
|
-
const formattedDocument = await mapBusinessDetailsDocumentToApiDocument(data, legalEntity.id);
|
|
4185
|
-
formattedDocument.forEach((doc) => {
|
|
4186
|
-
const existingDoc = getDocument(legalEntity.id, doc.type);
|
|
4187
|
-
if (doc.type === "proofOfOwnership" && existingDoc && doc.attachments?.length) {
|
|
4188
|
-
doc.attachments = mergeProofOfOwnershipAttachments(
|
|
4189
|
-
existingDoc.attachments,
|
|
4190
|
-
doc.attachments
|
|
4191
|
-
).filter((attachment) => attachment.pageName);
|
|
4185
|
+
} else {
|
|
4186
|
+
entityObject.doingBusinessAs = doingBusinessAs || data.basicInformation?.legalCompanyName;
|
|
4187
|
+
delete entityObject.doingBusinessAsAbsent;
|
|
4188
|
+
}
|
|
4189
|
+
if (data.additionalInformation?.operationalAddressIsSame === operationalAddressIsSameIds.OPERATIONAL_ADDRESS_IS_SAME && entityObject.principalPlaceOfBusiness) {
|
|
4190
|
+
entityObject.principalPlaceOfBusiness = entityObject.registeredAddress;
|
|
4191
|
+
}
|
|
4192
|
+
const addressLocalizations = mapJpAddressSchemaToAddressLocalizations(
|
|
4193
|
+
data.additionalInformation?.registrationAddress
|
|
4194
|
+
);
|
|
4195
|
+
if (addressLocalizations.length > 0)
|
|
4196
|
+
entityObject.registeredAddress.localization = addressLocalizations;
|
|
4197
|
+
if (entityObject.registeredAddress?.country && entityObject.registeredAddress?.stateOrProvince && !COUNTRIES_WITH_STATES_DATASET.includes(entityObject.registeredAddress?.country)) {
|
|
4198
|
+
entityObject.registeredAddress.stateOrProvince = "";
|
|
4199
|
+
}
|
|
4200
|
+
if (!isEmpty$1(data.companyFinancialInformation)) {
|
|
4201
|
+
entityObject.financialReports = [
|
|
4202
|
+
mapFinancialInformationToFinancialReport(
|
|
4203
|
+
data.companyFinancialInformation,
|
|
4204
|
+
data.additionalInformation?.dateOfIncorporation
|
|
4205
|
+
)
|
|
4206
|
+
];
|
|
4192
4207
|
}
|
|
4193
|
-
});
|
|
4194
|
-
try {
|
|
4195
|
-
await documentUtils.uploadDocuments(formattedDocument, legalEntity.id);
|
|
4196
|
-
formattedDocument.forEach((doc) => {
|
|
4197
|
-
userEvents.addTaskEvent("Success", {
|
|
4198
|
-
actionType: "upload",
|
|
4199
|
-
documentType: doc.type,
|
|
4200
|
-
fileExtention: doc.attachments?.map((item) => getFileExtention(item.pageName)).filter((item) => item !== void 0) ?? []
|
|
4201
|
-
});
|
|
4202
|
-
});
|
|
4203
|
-
} catch (err) {
|
|
4204
|
-
logger2.error(err);
|
|
4205
|
-
userEvents.addTaskEvent("Encountered error", {
|
|
4206
|
-
actionType: "upload",
|
|
4207
|
-
returnType: err.errorCode,
|
|
4208
|
-
returnValue: err.title ?? err.message
|
|
4209
|
-
});
|
|
4210
4208
|
}
|
|
4211
|
-
|
|
4209
|
+
requestObj.type = requestObj.organization ? LegalEntityTypes.ORGANIZATION : LegalEntityTypes.SOLE_PROPRIETORSHIP;
|
|
4210
|
+
if (entityObject?.registeredAddress.country === "US") {
|
|
4211
|
+
delete entityObject.registrationNumber;
|
|
4212
|
+
}
|
|
4213
|
+
if (!canSaveRegNumberAbsentState) {
|
|
4214
|
+
delete requestObj.organization?.registrationNumberAbsent;
|
|
4215
|
+
}
|
|
4216
|
+
return requestObj;
|
|
4217
|
+
};
|
|
4212
4218
|
async function submit({
|
|
4213
4219
|
data,
|
|
4214
4220
|
legalEntityResponse,
|
|
@@ -4232,7 +4238,8 @@ async function submit({
|
|
|
4232
4238
|
efpBusinessLines,
|
|
4233
4239
|
createBusinessLine,
|
|
4234
4240
|
updateBusinessLine,
|
|
4235
|
-
matchingScenario
|
|
4241
|
+
matchingScenario,
|
|
4242
|
+
invalidateRootLegalEntity
|
|
4236
4243
|
}) {
|
|
4237
4244
|
const logger2 = createLogger();
|
|
4238
4245
|
setLoadingStatus("loading");
|
|
@@ -4277,7 +4284,8 @@ async function submit({
|
|
|
4277
4284
|
const newRoles = nestedLegalEntityDetails2.roles;
|
|
4278
4285
|
const rolesChanged = !doArraysMatch(existingRoles, newRoles);
|
|
4279
4286
|
if (rolesChanged) {
|
|
4280
|
-
|
|
4287
|
+
await handleUpdateLegalEntity({
|
|
4288
|
+
id: associatedLegalArrangement2.id,
|
|
4281
4289
|
entityAssociations: [
|
|
4282
4290
|
...newRoles.map((role) => ({
|
|
4283
4291
|
type: role,
|
|
@@ -4285,10 +4293,6 @@ async function submit({
|
|
|
4285
4293
|
})),
|
|
4286
4294
|
...existingEntityAssociations.filter((ea) => ea.legalEntityId !== legalEntity.id)
|
|
4287
4295
|
]
|
|
4288
|
-
};
|
|
4289
|
-
await handleUpdateLegalEntity({
|
|
4290
|
-
...updatedAssociations,
|
|
4291
|
-
id: associatedLegalArrangement2.id
|
|
4292
4296
|
});
|
|
4293
4297
|
}
|
|
4294
4298
|
return;
|
|
@@ -4327,79 +4331,6 @@ async function submit({
|
|
|
4327
4331
|
delete filteredData.basicInformation.countryOfGoverningLaw;
|
|
4328
4332
|
}
|
|
4329
4333
|
}
|
|
4330
|
-
const primaryIndustryCode = data.additionalInformation?.industryCodes && data.additionalInformation.industryCodes[0].id;
|
|
4331
|
-
if (createBusinessLine && updateBusinessLine && primaryIndustryCode) {
|
|
4332
|
-
const bankingBusinessLines = [];
|
|
4333
|
-
const issuingBusinessLines = [];
|
|
4334
|
-
if (efpBusinessLines) {
|
|
4335
|
-
for (const bl of efpBusinessLines) {
|
|
4336
|
-
if (bl.service === "banking") bankingBusinessLines.push(bl);
|
|
4337
|
-
else issuingBusinessLines.push(bl);
|
|
4338
|
-
}
|
|
4339
|
-
}
|
|
4340
|
-
const promises = [];
|
|
4341
|
-
const operations = [];
|
|
4342
|
-
const updateOrCreateBusinessLinesIfNeeded = (businessLines, requestedCapability, service) => {
|
|
4343
|
-
if (businessLines.length) {
|
|
4344
|
-
for (const bl of businessLines) {
|
|
4345
|
-
if (bl.industryCode === primaryIndustryCode) continue;
|
|
4346
|
-
const payload = {
|
|
4347
|
-
id: bl.id,
|
|
4348
|
-
legalEntityId: legalEntityResponse.id,
|
|
4349
|
-
industryCode: primaryIndustryCode,
|
|
4350
|
-
service
|
|
4351
|
-
};
|
|
4352
|
-
promises.push(updateBusinessLine(payload));
|
|
4353
|
-
operations.push(payload);
|
|
4354
|
-
}
|
|
4355
|
-
} else if (requestedCapability) {
|
|
4356
|
-
const payload = {
|
|
4357
|
-
legalEntityId: legalEntityResponse.id,
|
|
4358
|
-
industryCode: primaryIndustryCode,
|
|
4359
|
-
service
|
|
4360
|
-
};
|
|
4361
|
-
promises.push(createBusinessLine(payload));
|
|
4362
|
-
operations.push(payload);
|
|
4363
|
-
}
|
|
4364
|
-
};
|
|
4365
|
-
updateOrCreateBusinessLinesIfNeeded(
|
|
4366
|
-
bankingBusinessLines,
|
|
4367
|
-
requestingBanking(legalEntityResponse),
|
|
4368
|
-
"banking"
|
|
4369
|
-
);
|
|
4370
|
-
updateOrCreateBusinessLinesIfNeeded(
|
|
4371
|
-
issuingBusinessLines,
|
|
4372
|
-
requestingIssuing(legalEntityResponse),
|
|
4373
|
-
"issuing"
|
|
4374
|
-
);
|
|
4375
|
-
let hadRejection = false;
|
|
4376
|
-
(await Promise.allSettled(promises)).forEach((result, idx) => {
|
|
4377
|
-
if (result.status !== "rejected") return;
|
|
4378
|
-
const op = operations[idx];
|
|
4379
|
-
logger2.log(
|
|
4380
|
-
`Failed to ${op.id ? "update" : "create"} business line with payload: ${JSON.stringify(op)}`
|
|
4381
|
-
);
|
|
4382
|
-
hadRejection = true;
|
|
4383
|
-
});
|
|
4384
|
-
const eventPayload = {
|
|
4385
|
-
actionType: trackingPayload.actionType,
|
|
4386
|
-
legalEntityName: trackingPayload.legalEntityName
|
|
4387
|
-
};
|
|
4388
|
-
if (!hadRejection) {
|
|
4389
|
-
userEvents.addTaskEvent("Success", eventPayload);
|
|
4390
|
-
} else {
|
|
4391
|
-
userEvents.addTaskEvent("Encountered error", {
|
|
4392
|
-
...eventPayload,
|
|
4393
|
-
returnType: "businessLines",
|
|
4394
|
-
returnValue: "couldNotCreateOrUpdateBusinessLine"
|
|
4395
|
-
});
|
|
4396
|
-
showToast({
|
|
4397
|
-
label: t(($) => $["failedToUpdateEfpBusinessLines"], { ns: "business" }),
|
|
4398
|
-
variant: "error"
|
|
4399
|
-
});
|
|
4400
|
-
return setLoadingStatus("success");
|
|
4401
|
-
}
|
|
4402
|
-
}
|
|
4403
4334
|
try {
|
|
4404
4335
|
const mappedLegalEntity = {
|
|
4405
4336
|
...mapBusinessDetailsSchemaToLegalEntity(
|
|
@@ -4437,11 +4368,23 @@ async function submit({
|
|
|
4437
4368
|
forms,
|
|
4438
4369
|
userEvents
|
|
4439
4370
|
});
|
|
4371
|
+
await submitBusinessLines({
|
|
4372
|
+
data,
|
|
4373
|
+
legalEntity,
|
|
4374
|
+
trackingPayload,
|
|
4375
|
+
efpBusinessLines,
|
|
4376
|
+
createBusinessLine,
|
|
4377
|
+
updateBusinessLine,
|
|
4378
|
+
t,
|
|
4379
|
+
showToast,
|
|
4380
|
+
userEvents
|
|
4381
|
+
});
|
|
4440
4382
|
userEvents.addTaskEvent("Success", trackingPayload);
|
|
4441
4383
|
showToast({
|
|
4442
4384
|
label: t(($) => $["successfullyUpdatedDetails"], { ns: "common" }),
|
|
4443
4385
|
variant: "success"
|
|
4444
4386
|
});
|
|
4387
|
+
await invalidateRootLegalEntity();
|
|
4445
4388
|
onExternalSubmit?.(data);
|
|
4446
4389
|
} catch (err) {
|
|
4447
4390
|
if (isValidationError(err)) {
|
|
@@ -4488,12 +4431,127 @@ async function submit({
|
|
|
4488
4431
|
setLoadingStatus("success");
|
|
4489
4432
|
}
|
|
4490
4433
|
}
|
|
4491
|
-
|
|
4492
|
-
|
|
4493
|
-
|
|
4434
|
+
async function submitDocuments({
|
|
4435
|
+
data,
|
|
4436
|
+
legalEntity,
|
|
4437
|
+
forms,
|
|
4438
|
+
documentUtils,
|
|
4439
|
+
userEvents
|
|
4440
|
+
}) {
|
|
4441
|
+
if (!isDocumentsRequired(forms)) return;
|
|
4442
|
+
const logger2 = createLogger();
|
|
4443
|
+
const formattedDocument = await mapBusinessDetailsDocumentToApiDocument(data, legalEntity.id);
|
|
4444
|
+
formattedDocument.forEach((doc) => {
|
|
4445
|
+
const existingDoc = getDocument(legalEntity.id, doc.type);
|
|
4446
|
+
if (doc.type === "proofOfOwnership" && existingDoc && doc.attachments?.length) {
|
|
4447
|
+
doc.attachments = mergeProofOfOwnershipAttachments(
|
|
4448
|
+
existingDoc.attachments,
|
|
4449
|
+
doc.attachments
|
|
4450
|
+
).filter((attachment) => attachment.pageName);
|
|
4451
|
+
}
|
|
4452
|
+
});
|
|
4453
|
+
try {
|
|
4454
|
+
await documentUtils.uploadDocuments(formattedDocument, legalEntity.id);
|
|
4455
|
+
formattedDocument.forEach((doc) => {
|
|
4456
|
+
userEvents.addTaskEvent("Success", {
|
|
4457
|
+
actionType: "upload",
|
|
4458
|
+
documentType: doc.type,
|
|
4459
|
+
fileExtention: doc.attachments?.map((item) => getFileExtention(item.pageName)).filter((item) => item !== void 0) ?? []
|
|
4460
|
+
});
|
|
4461
|
+
});
|
|
4462
|
+
} catch (err) {
|
|
4463
|
+
logger2.error(err);
|
|
4464
|
+
userEvents.addTaskEvent("Encountered error", {
|
|
4465
|
+
actionType: "upload",
|
|
4466
|
+
returnType: err.errorCode,
|
|
4467
|
+
returnValue: err.title ?? err.message
|
|
4468
|
+
});
|
|
4494
4469
|
}
|
|
4495
|
-
|
|
4496
|
-
|
|
4470
|
+
}
|
|
4471
|
+
async function submitBusinessLines({
|
|
4472
|
+
data,
|
|
4473
|
+
legalEntity,
|
|
4474
|
+
efpBusinessLines,
|
|
4475
|
+
createBusinessLine,
|
|
4476
|
+
updateBusinessLine,
|
|
4477
|
+
trackingPayload,
|
|
4478
|
+
userEvents,
|
|
4479
|
+
t,
|
|
4480
|
+
showToast
|
|
4481
|
+
}) {
|
|
4482
|
+
const primaryIndustryCode = data.additionalInformation?.industryCodes && data.additionalInformation.industryCodes[0].id;
|
|
4483
|
+
if (!primaryIndustryCode || !createBusinessLine || !updateBusinessLine) return;
|
|
4484
|
+
const logger2 = createLogger();
|
|
4485
|
+
const bankingBusinessLines = [];
|
|
4486
|
+
const issuingBusinessLines = [];
|
|
4487
|
+
if (efpBusinessLines) {
|
|
4488
|
+
for (const bl of efpBusinessLines) {
|
|
4489
|
+
if (bl.service === "banking") bankingBusinessLines.push(bl);
|
|
4490
|
+
else issuingBusinessLines.push(bl);
|
|
4491
|
+
}
|
|
4492
|
+
}
|
|
4493
|
+
const promises = [];
|
|
4494
|
+
const operations = [];
|
|
4495
|
+
const updateOrCreateBusinessLinesIfNeeded = (businessLines, requestedCapability, service) => {
|
|
4496
|
+
if (businessLines.length) {
|
|
4497
|
+
for (const bl of businessLines) {
|
|
4498
|
+
if (bl.industryCode === primaryIndustryCode) continue;
|
|
4499
|
+
const payload = {
|
|
4500
|
+
id: bl.id,
|
|
4501
|
+
legalEntityId: legalEntity.id,
|
|
4502
|
+
industryCode: primaryIndustryCode,
|
|
4503
|
+
service
|
|
4504
|
+
};
|
|
4505
|
+
promises.push(updateBusinessLine(payload));
|
|
4506
|
+
operations.push(payload);
|
|
4507
|
+
}
|
|
4508
|
+
} else if (requestedCapability) {
|
|
4509
|
+
const payload = {
|
|
4510
|
+
legalEntityId: legalEntity.id,
|
|
4511
|
+
industryCode: primaryIndustryCode,
|
|
4512
|
+
service
|
|
4513
|
+
};
|
|
4514
|
+
promises.push(createBusinessLine(payload));
|
|
4515
|
+
operations.push(payload);
|
|
4516
|
+
}
|
|
4517
|
+
};
|
|
4518
|
+
updateOrCreateBusinessLinesIfNeeded(
|
|
4519
|
+
bankingBusinessLines,
|
|
4520
|
+
requestingBanking(legalEntity),
|
|
4521
|
+
"banking"
|
|
4522
|
+
);
|
|
4523
|
+
updateOrCreateBusinessLinesIfNeeded(
|
|
4524
|
+
issuingBusinessLines,
|
|
4525
|
+
requestingIssuing(legalEntity),
|
|
4526
|
+
"issuing"
|
|
4527
|
+
);
|
|
4528
|
+
let hadRejection = false;
|
|
4529
|
+
(await Promise.allSettled(promises)).forEach((result, idx) => {
|
|
4530
|
+
if (result.status !== "rejected") return;
|
|
4531
|
+
const op = operations[idx];
|
|
4532
|
+
logger2.log(
|
|
4533
|
+
`Failed to ${op.id ? "update" : "create"} business line with payload: ${JSON.stringify(op)}`
|
|
4534
|
+
);
|
|
4535
|
+
hadRejection = true;
|
|
4536
|
+
});
|
|
4537
|
+
const eventPayload = {
|
|
4538
|
+
actionType: trackingPayload.actionType,
|
|
4539
|
+
legalEntityName: trackingPayload.legalEntityName
|
|
4540
|
+
};
|
|
4541
|
+
if (!hadRejection) {
|
|
4542
|
+
userEvents.addTaskEvent("Success", eventPayload);
|
|
4543
|
+
} else {
|
|
4544
|
+
userEvents.addTaskEvent("Encountered error", {
|
|
4545
|
+
...eventPayload,
|
|
4546
|
+
returnType: "businessLines",
|
|
4547
|
+
returnValue: "couldNotCreateOrUpdateBusinessLine"
|
|
4548
|
+
});
|
|
4549
|
+
showToast({
|
|
4550
|
+
label: t(($) => $["failedToUpdateEfpBusinessLines"], { ns: "business" }),
|
|
4551
|
+
variant: "error"
|
|
4552
|
+
});
|
|
4553
|
+
}
|
|
4554
|
+
}
|
|
4497
4555
|
const determineCustomerSupport = (customerSupport, country) => {
|
|
4498
4556
|
switch (country) {
|
|
4499
4557
|
case CountryCodes.Japan:
|
|
@@ -4508,6 +4566,84 @@ const unsetCustomerSupportNumber = (customerSupport) => {
|
|
|
4508
4566
|
phone: { number: "", type: "mobile" }
|
|
4509
4567
|
} : void 0;
|
|
4510
4568
|
};
|
|
4569
|
+
const businessDetailsBase = {
|
|
4570
|
+
/* Base required fields */
|
|
4571
|
+
country: { rule: "REQUIRED" },
|
|
4572
|
+
entityType: { rule: "businessRequiresCompanyType" },
|
|
4573
|
+
legalCompanyName: { rule: "REQUIRED" },
|
|
4574
|
+
jaHaniLegalCompanyName: { rule: "japaneseLegalCompanyName" },
|
|
4575
|
+
jaKanaLegalCompanyName: { rule: "japaneseLegalCompanyName" },
|
|
4576
|
+
hasDoingBusinessAs: { rule: "REQUIRED" },
|
|
4577
|
+
doingBusinessAs: { rule: "requireDoingBusinessAsName" },
|
|
4578
|
+
registrationAddress: { rule: "REQUIRED" },
|
|
4579
|
+
operationalAddressIsSame: { rule: "REQUIRED" },
|
|
4580
|
+
/* Base optional fields */
|
|
4581
|
+
operationalAddress: { rule: "OPTIONAL" },
|
|
4582
|
+
/* Fields with custom country specific rules */
|
|
4583
|
+
hasSelectedBusiness: { rule: "usingCompanySearch" },
|
|
4584
|
+
stockExchangeMIC: { rule: "ifPubliclyTradedCompany" },
|
|
4585
|
+
stockISIN: { rule: "ifPubliclyTradedCompany" },
|
|
4586
|
+
stockTickerSymbol: { rule: "ifPubliclyTradedCompany" },
|
|
4587
|
+
dateOfIncorporation: { rule: "isDateOfIncorporationRequired" },
|
|
4588
|
+
stateOrProvince: { rule: "usingCompanySearch" },
|
|
4589
|
+
registrationNumber: { rule: "countryRequiresRegistrationNumber" },
|
|
4590
|
+
registrationNumberType: { rule: "registrationNumberType" },
|
|
4591
|
+
exemptedFromRegistrationNumber: { rule: "companyRegistrationNumberExemptionAllowed" },
|
|
4592
|
+
eInvoicingCode: { rule: "isEInvoicingCodeEnabled" },
|
|
4593
|
+
countryOfGoverningLaw: { rule: "countryOfGoverningLawRequired" },
|
|
4594
|
+
taxDocument: { rule: "ifCountryUsAndTinFailed" },
|
|
4595
|
+
/* Fields derived from capabilities */
|
|
4596
|
+
industryCodes: { rule: "isIndustryCodeRequired" }
|
|
4597
|
+
};
|
|
4598
|
+
const taxInformationBase = {
|
|
4599
|
+
vatNumber: { rule: "countryUsesVat" },
|
|
4600
|
+
vatNumberType: { rule: "vatNumberType" },
|
|
4601
|
+
exemptedFromVat: { rule: "isVatExempt" },
|
|
4602
|
+
vatAbsenceReason: { rule: "isVatExempt" },
|
|
4603
|
+
taxInformation: { rule: "countryUsesTaxId" },
|
|
4604
|
+
exemptedFromTax: { rule: "countryHasTaxExemptions" },
|
|
4605
|
+
isUen: { rule: "countryUsesUenOrGst" }
|
|
4606
|
+
};
|
|
4607
|
+
const financialInformationBase = {
|
|
4608
|
+
numberOfEmployees: { rule: "countryRequiresFinancialInformation" },
|
|
4609
|
+
financialReportingDate: { rule: "isFinancialReportingFieldsRequired" },
|
|
4610
|
+
currency: { rule: "isFinancialReportingFieldsRequired" },
|
|
4611
|
+
reportedValueOption: { rule: "isFinancialReportingFieldsRequired" },
|
|
4612
|
+
annualTurnover: { rule: "annualTurnoverRequired" },
|
|
4613
|
+
balanceSheetTotal: { rule: "balanceSheetTotalRequired" }
|
|
4614
|
+
};
|
|
4615
|
+
const businessDetailsFieldsPerScenario = {
|
|
4616
|
+
L0: {
|
|
4617
|
+
country: { rule: "REQUIRED" },
|
|
4618
|
+
legalCompanyName: { rule: "REQUIRED" },
|
|
4619
|
+
stateOrProvince: { rule: "usingCompanySearch" },
|
|
4620
|
+
...financialInformationBase
|
|
4621
|
+
},
|
|
4622
|
+
L1: {
|
|
4623
|
+
...businessDetailsBase,
|
|
4624
|
+
...financialInformationBase
|
|
4625
|
+
},
|
|
4626
|
+
// L for org is basically L_TAXINFO for Individuals (we will fix this in the near future
|
|
4627
|
+
// to make them aligned and less confusing)
|
|
4628
|
+
L: {
|
|
4629
|
+
...businessDetailsBase,
|
|
4630
|
+
...taxInformationBase,
|
|
4631
|
+
...financialInformationBase
|
|
4632
|
+
},
|
|
4633
|
+
L_PROOFOFADDRESS: {
|
|
4634
|
+
// TODO this field does not exist
|
|
4635
|
+
// proofOfAddressDocument: { rule: 'REQUIRED' },
|
|
4636
|
+
},
|
|
4637
|
+
L_REGDOC: {
|
|
4638
|
+
registrationDocument: { rule: "REQUIRED" }
|
|
4639
|
+
},
|
|
4640
|
+
L_TAXDOC: {
|
|
4641
|
+
taxDocument: { rule: "REQUIRED" }
|
|
4642
|
+
},
|
|
4643
|
+
L_BAFIN: {
|
|
4644
|
+
legalForm: { rule: "REQUIRED" }
|
|
4645
|
+
}
|
|
4646
|
+
};
|
|
4511
4647
|
const CountryFieldValidation = () => ({
|
|
4512
4648
|
country: {
|
|
4513
4649
|
modes: ["blur"],
|
|
@@ -4643,6 +4779,7 @@ function BusinessDetailsDropin({
|
|
|
4643
4779
|
const { accountHolder, setAccountHolder } = useAccountHolder();
|
|
4644
4780
|
const { mutateAsync: createLegalEntity } = useCreateLegalEntity();
|
|
4645
4781
|
const { mutateAsync: updateLegalEntity } = useUpdateLegalEntity();
|
|
4782
|
+
const invalidateRootLegalEntity = useInvalidateRootLegalEntity();
|
|
4646
4783
|
const logger2 = createLogger();
|
|
4647
4784
|
const isSoleProp = accountHolder === "mySoleProprietorName";
|
|
4648
4785
|
const isAssociationTaskType = taskType !== TaskTypes.BUSINESS_DETAILS;
|
|
@@ -4659,6 +4796,7 @@ function BusinessDetailsDropin({
|
|
|
4659
4796
|
rootLegalEntityId: rootLegalEntityId.value
|
|
4660
4797
|
});
|
|
4661
4798
|
const { data: matchingScenario } = useScenarios(country, LegalEntityTypes.ORGANIZATION);
|
|
4799
|
+
const { isAgnosticEndpointEnabled } = useCompanySearchExperiments();
|
|
4662
4800
|
useEffect(() => {
|
|
4663
4801
|
userEvents.updateBaseTrackingPayload({ task: taskType });
|
|
4664
4802
|
userEvents.addTaskEvent("Landed on page", {
|
|
@@ -4751,6 +4889,7 @@ function BusinessDetailsDropin({
|
|
|
4751
4889
|
const customRules = useMemo(
|
|
4752
4890
|
() => rules({
|
|
4753
4891
|
data: multiForm.data,
|
|
4892
|
+
defaultData,
|
|
4754
4893
|
country,
|
|
4755
4894
|
taskType,
|
|
4756
4895
|
isExperimentEnabled,
|
|
@@ -4761,6 +4900,7 @@ function BusinessDetailsDropin({
|
|
|
4761
4900
|
}),
|
|
4762
4901
|
[
|
|
4763
4902
|
multiForm.data,
|
|
4903
|
+
defaultData,
|
|
4764
4904
|
matchingScenario,
|
|
4765
4905
|
country,
|
|
4766
4906
|
taskType,
|
|
@@ -4827,7 +4967,9 @@ function BusinessDetailsDropin({
|
|
|
4827
4967
|
})
|
|
4828
4968
|
);
|
|
4829
4969
|
const updateForms = useCallback(
|
|
4830
|
-
({
|
|
4970
|
+
({
|
|
4971
|
+
searchResults
|
|
4972
|
+
}) => {
|
|
4831
4973
|
const updatedForms = buildRequiredForms({
|
|
4832
4974
|
config: {
|
|
4833
4975
|
forms: defaultForms,
|
|
@@ -4857,10 +4999,6 @@ function BusinessDetailsDropin({
|
|
|
4857
4999
|
legalEntityResponse
|
|
4858
5000
|
]
|
|
4859
5001
|
);
|
|
4860
|
-
const summaryData = useMemo(
|
|
4861
|
-
() => formatDataForSummary(multiForm.data, forms, t, i18n.language, isExperimentEnabled),
|
|
4862
|
-
[multiForm.data, forms, t, i18n.language, isExperimentEnabled]
|
|
4863
|
-
);
|
|
4864
5002
|
const { mutateAsync: createBusinessLine } = useCreateBusinessLine();
|
|
4865
5003
|
const { mutateAsync: updateBusinessLine } = useUpdateBusinessLine();
|
|
4866
5004
|
const submitTask = useCallback(() => {
|
|
@@ -4888,7 +5026,8 @@ function BusinessDetailsDropin({
|
|
|
4888
5026
|
efpBusinessLines,
|
|
4889
5027
|
createBusinessLine,
|
|
4890
5028
|
updateBusinessLine,
|
|
4891
|
-
matchingScenario
|
|
5029
|
+
matchingScenario,
|
|
5030
|
+
invalidateRootLegalEntity
|
|
4892
5031
|
});
|
|
4893
5032
|
}, [
|
|
4894
5033
|
setAccountHolder,
|
|
@@ -4912,7 +5051,8 @@ function BusinessDetailsDropin({
|
|
|
4912
5051
|
efpBusinessLines,
|
|
4913
5052
|
createBusinessLine,
|
|
4914
5053
|
updateBusinessLine,
|
|
4915
|
-
matchingScenario
|
|
5054
|
+
matchingScenario,
|
|
5055
|
+
invalidateRootLegalEntity
|
|
4916
5056
|
]);
|
|
4917
5057
|
const {
|
|
4918
5058
|
handleNextClick,
|
|
@@ -4957,7 +5097,7 @@ function BusinessDetailsDropin({
|
|
|
4957
5097
|
useEffect(() => {
|
|
4958
5098
|
if (!searchingCompanies && companySearchResponse?.results) {
|
|
4959
5099
|
userEvents.addPageEvent("Success", {
|
|
4960
|
-
actionType: "
|
|
5100
|
+
actionType: "resolve",
|
|
4961
5101
|
returnValue: "companySearch",
|
|
4962
5102
|
additionalData: {
|
|
4963
5103
|
numberOfResults: companySearchResponse.results.length
|
|
@@ -4978,10 +5118,6 @@ function BusinessDetailsDropin({
|
|
|
4978
5118
|
return handleNextClick(currentForms);
|
|
4979
5119
|
}
|
|
4980
5120
|
try {
|
|
4981
|
-
userEvents.addPageEvent("Triggered async operation", {
|
|
4982
|
-
actionType: "start",
|
|
4983
|
-
returnValue: "companySearch"
|
|
4984
|
-
});
|
|
4985
5121
|
setLoadingStatus("loading");
|
|
4986
5122
|
tinMatched.value = void 0;
|
|
4987
5123
|
verifiedBusiness.value = void 0;
|
|
@@ -5010,12 +5146,23 @@ function BusinessDetailsDropin({
|
|
|
5010
5146
|
const companySelectionResponse = await handleCompanySelection(
|
|
5011
5147
|
rootLegalEntityId.peek(),
|
|
5012
5148
|
baseUrl.peek(),
|
|
5013
|
-
{
|
|
5149
|
+
{
|
|
5150
|
+
...companySelectionInput,
|
|
5151
|
+
...isAgnosticEndpointEnabled ? {
|
|
5152
|
+
id: searchResponse.results[0].resultId
|
|
5153
|
+
} : { company: searchResponse.results[0] }
|
|
5154
|
+
},
|
|
5155
|
+
isAgnosticEndpointEnabled
|
|
5014
5156
|
);
|
|
5015
5157
|
if (handleTinResponse(!!companySelectionResponse.tinMatched)) {
|
|
5016
5158
|
verifiedBusiness.value = companySelectionResponse;
|
|
5017
5159
|
isVerifiedSingleCompanySearchResult.value = true;
|
|
5018
|
-
applyVerifiedBusinessData(
|
|
5160
|
+
applyVerifiedBusinessData(
|
|
5161
|
+
multiForm,
|
|
5162
|
+
country,
|
|
5163
|
+
verifiedBusiness.peek(),
|
|
5164
|
+
isAgnosticEndpointEnabled
|
|
5165
|
+
);
|
|
5019
5166
|
currentForms = updateForms({ searchResults: searchResponse.results });
|
|
5020
5167
|
} else {
|
|
5021
5168
|
return setLoadingStatus("success");
|
|
@@ -5062,18 +5209,44 @@ function BusinessDetailsDropin({
|
|
|
5062
5209
|
searchResults: searchingError ? [] : companySearchResponse?.results
|
|
5063
5210
|
});
|
|
5064
5211
|
}, [updateForms, companySearchResponse?.results, searchingError]);
|
|
5212
|
+
const summarySections = useMemo(() => {
|
|
5213
|
+
if (activeForm.formId !== "summary") return [];
|
|
5214
|
+
return formatDataForSummary(multiForm.data, forms, t, i18n.language, isExperimentEnabled);
|
|
5215
|
+
}, [multiForm.data, forms, t, i18n.language, isExperimentEnabled, activeForm]);
|
|
5216
|
+
const handleEditForm = (formId) => {
|
|
5217
|
+
const formIdx = forms.findIndex((form) => form.formId === formId);
|
|
5218
|
+
if (formIdx > -1) {
|
|
5219
|
+
gotoFormByFormIndex(formIdx);
|
|
5220
|
+
}
|
|
5221
|
+
};
|
|
5222
|
+
const allValidationErrors = {};
|
|
5223
|
+
for (const form in problems.validationErrors) {
|
|
5224
|
+
for (const validationError in problems.validationErrors[form]) {
|
|
5225
|
+
allValidationErrors[validationError] = problems.validationErrors[form][validationError];
|
|
5226
|
+
}
|
|
5227
|
+
}
|
|
5228
|
+
const allVerificationErrors = {};
|
|
5229
|
+
for (const form in problems.verificationErrors) {
|
|
5230
|
+
for (const verificationError in problems.verificationErrors[form]) {
|
|
5231
|
+
allVerificationErrors[verificationError] = problems.verificationErrors[form][verificationError];
|
|
5232
|
+
}
|
|
5233
|
+
}
|
|
5065
5234
|
return /* @__PURE__ */ jsx(FormContextProvider, { form: multiForm, children: /* @__PURE__ */ jsxs(
|
|
5066
5235
|
FormFlow,
|
|
5067
5236
|
{
|
|
5068
|
-
|
|
5069
|
-
|
|
5070
|
-
|
|
5071
|
-
|
|
5072
|
-
|
|
5073
|
-
|
|
5074
|
-
|
|
5075
|
-
|
|
5076
|
-
|
|
5237
|
+
summaryComponent: /* @__PURE__ */ jsxs(NewSummary, { sections: summarySections, handleEditForm, children: [
|
|
5238
|
+
/* @__PURE__ */ jsx(
|
|
5239
|
+
ErrorPanel,
|
|
5240
|
+
{
|
|
5241
|
+
validationErrors: allValidationErrors,
|
|
5242
|
+
verificationErrors: allVerificationErrors,
|
|
5243
|
+
formUtils: createFormUtils({ labels: {} }, t),
|
|
5244
|
+
id: "ariaErrorField",
|
|
5245
|
+
slot: "errorPanel"
|
|
5246
|
+
}
|
|
5247
|
+
),
|
|
5248
|
+
/* @__PURE__ */ jsx("div", { className: summaryStyles.summaryContentLegalCaption, slot: "extraContent", children: t(($) => $["summaryLegalCaption"]) })
|
|
5249
|
+
] }),
|
|
5077
5250
|
asModal,
|
|
5078
5251
|
currentStep: steps.current,
|
|
5079
5252
|
totalSteps: steps.total,
|