@adyen/kyc-components 3.83.0 → 3.85.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{AcceptTermsOfServiceComponent-DuGvxDCD.js → AcceptTermsOfServiceComponent-BW8S5c-F.js} +23 -20
- package/dist/Accordion-CxXXx4Ly.js +88 -0
- package/dist/{AccountSetupRejected-WRvC8Lhx.js → AccountSetupRejected-B0RVdTUw.js} +6 -6
- package/dist/{Address-DzNHaLQd.js → Address-BBHj9Aas.js} +10 -10
- package/dist/{Alert-Ce3pDSUY.js → Alert-Dz_jjJ1E.js} +3 -75
- package/dist/{Avatar-ERL8LlcN.js → Avatar-CCed5bJE.js} +2 -2
- package/dist/{BusinessDetailsDropin-CdWljVO6.js → BusinessDetailsMultiformDropin-B7HHvJeq.js} +2288 -272
- package/dist/BusinessFinancingComponent-D9cn6vVF.js +54 -0
- package/dist/{BusinessFinancingDropin-R940kp66.js → BusinessFinancingDropin-CCci5zHD.js} +185 -125
- package/dist/BusinessFinancingPage-DuRkxp4x.js +46 -0
- package/dist/{BusinessTypeSelectionPage-Dn1P9vc8.js → BusinessTypeSelectionPage-CQvrZNZZ.js} +12 -12
- package/dist/{Card-Cma0bwYR.js → Card-dFm_Z3TI.js} +6 -4
- package/dist/{CountryField-DrB-OFMR.js → CountryField-DunKeW_n.js} +220 -235
- package/dist/CreateIndividualComponent-wFiOsvgz.js +71 -0
- package/dist/CreateTransferInstrumentComponent-B_fQXq70.js +66 -0
- package/dist/{Currency-DD63TDvu.js → Currency-2wpP-9m3.js} +6 -6
- package/dist/{CustomerSupport-Cs9YbnBI.js → CustomerSupport-DyfNEq22.js} +11 -10
- package/dist/{DebugModal-AFNn6VI2.js → DebugModal-BMw5O5pH.js} +128 -42
- package/dist/{DecisionMakerDetailsPage-CUAalT7g.js → DecisionMakerDetailsPage-D-8hNnWf.js} +16 -10
- package/dist/DecisionMakers-DUjAziKs.js +831 -0
- package/dist/Divider-Ckm8Nfyb.js +239 -0
- package/dist/{Dropzone-DXfuqm2D.js → Dropzone-BtTUNjsc.js} +4 -4
- package/dist/{EmbeddedStatus-BjGURjyl.js → EmbeddedStatus-kQRIlMAC.js} +15 -16
- package/dist/{EndStateLayout-BuVgF0ER.js → EndStateLayout-CePzY6oB.js} +2 -2
- package/dist/{FormNavigation-DXaxaf1-.js → FormNavigation-a9y0a0iw.js} +3 -3
- package/dist/Image-TkXLA-UY.js +22 -0
- package/dist/{IndividualOnfidoDropin-fERsTakw.js → IndividualOnfidoDropin-CljBpKM8.js} +256 -401
- package/dist/{InputDate-By5i2Hlf.js → InputDate-DggMbeJG.js} +2 -2
- package/dist/{InputText-CqLs_M75.js → InputText-zem7Kt4i.js} +4 -7
- package/dist/{Introduction-3UWByITz.js → Introduction-DH4Tivyl.js} +4 -5
- package/dist/{JpAddress-C0iTeXx7.js → JpAddress-BEKjE0bR.js} +27 -10
- package/dist/LandingLayout-BLjTVlVb.js +60 -0
- package/dist/{LegalRepresentativeDetailsPage-DSppGGc6.js → LegalRepresentativeDetailsPage-Dny2mD-G.js} +5 -6
- package/dist/{Link-CaxhkJ24.js → Link-BZJgg2rS.js} +2 -2
- package/dist/ListItem-BqBZ36Qn.js +69 -0
- package/dist/ManageIndividualComponent-CHbI_tji.js +46 -0
- package/dist/ManageTermsOfServiceComponent-Dwsmig7o.js +58 -0
- package/dist/{ManageTransferInstrumentComponent-muOE0ZjV.js → ManageTransferInstrumentComponent-Btz3RWc6.js} +17 -17
- package/dist/{MaskedInput-OYLtVOZ6.js → MaskedInput-CSKFmTC0.js} +6 -6
- package/dist/MaybeModal-DraEs2gj.js +25 -0
- package/dist/{Modal-BaaNj5F-.js → Modal-DvB1odWq.js} +2 -2
- package/dist/OnboardingDropinComponent-KKy3000L.js +4274 -0
- package/dist/{PayoutDetailsDropin-DIJbRfg_.js → PayoutDetailsDropin-BFUH8RvF.js} +324 -97
- package/dist/RadioGroup-Br5v8w0a.js +144 -0
- package/dist/{RegistrationAddress-CbElOOZ6.js → RegistrationAddress-CP_kZ9NI.js} +39 -42
- package/dist/{Review-1Y__iPB0.js → Review-4b9BWdsh.js} +9 -8
- package/dist/RootBusinessDetailsPage-DO5202Yd.js +61 -0
- package/dist/{OnboardingDropinComponent-DIf93Tzb.js → RootBusinessLinesPage-D0tGN2u3.js} +866 -5062
- package/dist/{RootIndividualDetailsPage-BVr2fbYb.js → RootIndividualDetailsPage-2c_nvpAv.js} +5 -6
- package/dist/{SignPCIComponent-BcR2vNVB.js → SignPCIComponent-4UrP4tNd.js} +12 -11
- package/dist/{SingpassSelection-DDG-DpRN.js → SingpassSelection-DTOk81Y1.js} +11 -10
- package/dist/SoleProprietorshipPage-BL3u4nCi.js +60 -0
- package/dist/{SourceOfFundsPage-DF3muJcW.js → SourceOfFundsPage-HgGh-VDQ.js} +43 -65
- package/dist/{StepProgressIndicator-BUDjmmPK.js → StepProgressIndicator-sfM13J_b.js} +2 -2
- package/dist/{StoreProvider-DGxWcgrS.js → StoreProvider-DadhkEyO.js} +660 -195
- package/dist/{TaskItemStatus-Clfh9v2q.js → TaskItemStatus-DuJ01Ng6.js} +3 -14
- package/dist/{TaxInformationField-Bu8s2JZA.js → TaxInformationField-C4OeLAhU.js} +34 -31
- package/dist/{TaxReportingDropin-C1aPbXfp.js → TaxReportingDropin-2VcdfJvr.js} +64 -56
- package/dist/{TileGroup-AskMVW9b.js → TileGroup-B_9rid7_.js} +4 -4
- package/dist/{TrustDetailsPage-S0YwnBAx.js → TrustDetailsPage-COIeKAk2.js} +53 -44
- package/dist/TrustMemberCompanyPage-CwNG1bni.js +73 -0
- package/dist/TrustMemberIndividualPage-D57poDUv.js +66 -0
- package/dist/{UnincorporatedPartnershipIndividualPage-B_fmnaes.js → UnincorporatedPartnershipIndividualPage-oiEGWL8D.js} +5 -6
- package/dist/UnincorporatedPartnershipMemberCompanyPage-av-gOgOa.js +76 -0
- package/dist/{ViewVerificationStatusComponent-CivzRszd.js → ViewVerificationStatusComponent-Zk6t-F6h.js} +19 -13
- package/dist/adyen-business-financing.js +4 -5
- package/dist/adyen-individual-configuration.js +4 -5
- package/dist/adyen-individual-status.js +4 -5
- package/dist/adyen-kyc-components.js +39 -29
- package/dist/adyen-onboarding.js +4 -5
- package/dist/adyen-terms-of-service-management.js +4 -5
- package/dist/adyen-terms-of-service-status.js +4 -5
- package/dist/adyen-transfer-instrument-configuration.js +4 -5
- package/dist/adyen-transfer-instrument-management.js +4 -5
- package/dist/adyen-verification-status.js +4 -5
- package/dist/analytics-awjVudvY.js +123 -0
- package/dist/{bafinUtils-BJao1Xb_.js → bafinUtils-CAVAvSFg.js} +8 -99
- package/dist/bg-BG-BIOMFPaW.js +27 -0
- package/dist/bg-BG-BLe6BCNz.js +13 -0
- package/dist/bg-BG-BPsOhDfg.js +13 -0
- package/dist/bg-BG-BvLl6gaB.js +13 -0
- package/dist/bg-BG-CepHap8j.js +68 -0
- package/dist/bg-BG-Coja327N.js +24 -0
- package/dist/{bg-BG-GVhnrvRn.js → bg-BG-Cs_1PU3v.js} +5 -1
- package/dist/bg-BG-D5C7Gq2o.js +35 -0
- package/dist/bg-BG-DcxZ1tmt.js +32 -0
- package/dist/{bg-BG-Bot37sd7.js → bg-BG-Dp4LxSP7.js} +2 -1
- package/dist/bg-BG-er0t4jTs.js +27 -0
- package/dist/bg-BG-fr-xfUBV.js +110 -0
- package/dist/{bg-BG-fgdGvtqa.js → bg-BG-z3gZQvGq.js} +6 -1
- package/dist/commonValidators-DM04eNpa.js +24 -0
- package/dist/{cs-CZ-CVpbQMSY.js → cs-CZ-B2WAqmaW.js} +9 -1
- package/dist/cs-CZ-BP7niQM9.js +68 -0
- package/dist/cs-CZ-C0sNB1Fm.js +110 -0
- package/dist/{cs-CZ-DwiXbzIv.js → cs-CZ-C5lyVYlZ.js} +6 -1
- package/dist/cs-CZ-C9FuJCsg.js +35 -0
- package/dist/cs-CZ-CHzJM-ii.js +13 -0
- package/dist/cs-CZ-CQNBae2b.js +27 -0
- package/dist/{cs-CZ-BEynVkgn.js → cs-CZ-CyLqoG1j.js} +2 -1
- package/dist/cs-CZ-D4Hg-t16.js +32 -0
- package/dist/cs-CZ-DNWTRefA.js +27 -0
- package/dist/cs-CZ-DXtJsBPz.js +24 -0
- package/dist/cs-CZ-hT5w5It6.js +13 -0
- package/dist/cs-CZ-xoLsda7i.js +13 -0
- package/dist/da-DK-8dk9Q_Wk.js +110 -0
- package/dist/da-DK-BeSNTO9k.js +35 -0
- package/dist/{da-DK-Y6PJ69rt.js → da-DK-CYl2jko-.js} +6 -1
- package/dist/da-DK-D-PlwKvZ.js +27 -0
- package/dist/da-DK-D-TJghBi.js +13 -0
- package/dist/{da-DK-DLcvdXDS.js → da-DK-D-eeokQn.js} +9 -1
- package/dist/da-DK-DCJhV2qS.js +32 -0
- package/dist/da-DK-DWA8uOd8.js +24 -0
- package/dist/{da-DK-DmL_Ja3L.js → da-DK-DYpfNZdP.js} +2 -1
- package/dist/da-DK-DZwlENGe.js +13 -0
- package/dist/da-DK-Dc0QYG8m.js +68 -0
- package/dist/da-DK-XNMYSp7w.js +13 -0
- package/dist/da-DK-gnPgzwrG.js +27 -0
- package/dist/de-DE-4GAd_srm.js +27 -0
- package/dist/de-DE-BI7AAdOv.js +13 -0
- package/dist/{de-DE-BahIk-1-.js → de-DE-BXt1K0Tr.js} +2 -1
- package/dist/de-DE-CCmlaL2F.js +13 -0
- package/dist/de-DE-CCyKie8B.js +110 -0
- package/dist/de-DE-D3lLuF8z.js +27 -0
- package/dist/de-DE-D50lGOJE.js +24 -0
- package/dist/de-DE-DXR3EpEc.js +13 -0
- package/dist/{de-DE-CKZrABo7.js → de-DE-Dcs3W1fT.js} +9 -1
- package/dist/{de-DE-xdQMmrrt.js → de-DE-DlUEkik0.js} +6 -1
- package/dist/de-DE-Dp-2BAWQ.js +35 -0
- package/dist/de-DE-DwOQKCuU.js +32 -0
- package/dist/de-DE-Dz2OsS1F.js +68 -0
- package/dist/{hr-HR-CNzbyo9r.js → debugStore-BvbyN1Oi.js} +4 -5
- package/dist/dropinUtils-wWEQXoqU.js +196 -0
- package/dist/el-GR-5WvkRyW5.js +35 -0
- package/dist/{el-GR-TZUpX1j3.js → el-GR-B90M6tcZ.js} +2 -1
- package/dist/el-GR-BHG69mXl.js +68 -0
- package/dist/el-GR-CKHMsdx2.js +24 -0
- package/dist/el-GR-D7zMcBtK.js +110 -0
- package/dist/{el-GR-C_y2406P.js → el-GR-DBum-QDu.js} +9 -1
- package/dist/{el-GR-DR_5DKI1.js → el-GR-DZ8GheJK.js} +6 -1
- package/dist/el-GR-Ddnh0NhQ.js +27 -0
- package/dist/el-GR-DoCIcce-.js +13 -0
- package/dist/el-GR-DtFE64KX.js +13 -0
- package/dist/el-GR-Hk4NbZSY.js +32 -0
- package/dist/el-GR-XRux2Wpv.js +27 -0
- package/dist/el-GR-kYiInIQ9.js +13 -0
- package/dist/en-US-B96dpVon.js +27 -0
- package/dist/{en-US-DI1dH0ZB.js → en-US-BCFNoF5y.js} +5 -1
- package/dist/en-US-BQZhzROc.js +32 -0
- package/dist/en-US-BwDZ0WHW.js +110 -0
- package/dist/{en-US-DIdQJky-.js → en-US-CzEL6t1W.js} +24 -4
- package/dist/en-US-D-B35AoN.js +68 -0
- package/dist/en-US-D2yrwtzT.js +24 -0
- package/dist/en-US-DYpvuCLO.js +13 -0
- package/dist/{en-US-nL0-_PSp.js → en-US-DdeSoN_2.js} +2 -1
- package/dist/{en-US-BbAzROHT.js → en-US-Dg505Oh3.js} +2 -1
- package/dist/{en-US-BQpgt41j.js → en-US-DjF6iC7G.js} +17 -1
- package/dist/es-ES-BI_jdT67.js +68 -0
- package/dist/es-ES-BOoPqnPI.js +32 -0
- package/dist/{es-ES-BPDeEYGv.js → es-ES-BhNhIf08.js} +2 -1
- package/dist/es-ES-C4lENXHH.js +27 -0
- package/dist/{es-ES-DdT2wJTP.js → es-ES-C7XjLOHi.js} +9 -1
- package/dist/es-ES-C9oDOVSQ.js +35 -0
- package/dist/es-ES-CJMsyMAc.js +13 -0
- package/dist/es-ES-CXDJLKAI.js +27 -0
- package/dist/es-ES-CnNU6AJv.js +13 -0
- package/dist/{es-ES-keMO-LlU.js → es-ES-D0c0MoqK.js} +6 -1
- package/dist/es-ES-DF_L5EDd.js +24 -0
- package/dist/es-ES-JvAvmB2A.js +110 -0
- package/dist/es-ES-yMXcOjDL.js +13 -0
- package/dist/et-EE--cL_YqWe.js +27 -0
- package/dist/et-EE-3EQr-1cj.js +27 -0
- package/dist/et-EE-B1KmQWmI.js +35 -0
- package/dist/{et-EE-DftDBzjA.js → et-EE-BMgFCxds.js} +2 -1
- package/dist/et-EE-BR4OXRfV.js +13 -0
- package/dist/{et-EE-Y890kc89.js → et-EE-BUG05EDz.js} +9 -1
- package/dist/et-EE-Be__VK7Y.js +32 -0
- package/dist/et-EE-BuBiNLCi.js +24 -0
- package/dist/{et-EE-CLuAFAri.js → et-EE-C4Fwyr7-.js} +6 -1
- package/dist/et-EE-C8RrUpLm.js +13 -0
- package/dist/et-EE-C_PZO2aI.js +68 -0
- package/dist/et-EE-SJf3_Ega.js +110 -0
- package/dist/et-EE-sB7wkSA3.js +13 -0
- package/dist/fi-FI-BbqwYcLI.js +13 -0
- package/dist/fi-FI-Byvvcxxq.js +27 -0
- package/dist/{fi-FI-DKxJM0k6.js → fi-FI-CEzjKgiz.js} +9 -1
- package/dist/fi-FI-Cy2hAl0B.js +110 -0
- package/dist/fi-FI-DH6jpo9K.js +24 -0
- package/dist/fi-FI-DV1etLPT.js +35 -0
- package/dist/{fi-FI-CBHr-_To.js → fi-FI-bRXb-Q_i.js} +6 -1
- package/dist/fi-FI-bZzNB1WB.js +32 -0
- package/dist/fi-FI-fArobrt5.js +27 -0
- package/dist/fi-FI-hwzizPnr.js +68 -0
- package/dist/fi-FI-u5GxMZsq.js +13 -0
- package/dist/fi-FI-xqnQ38yC.js +13 -0
- package/dist/{fi-FI-LpkpSl5X.js → fi-FI-ysUrBilO.js} +2 -1
- package/dist/{fieldConfigurations-BzmPcPW1.js → fieldConfigurations-BZuo2e0d.js} +16 -313
- package/dist/{pl-PL-D6heiKsH.js → form-rules-DhbF2mY4.js} +3 -5
- package/dist/{fr-FR-CuSchzjE.js → fr-FR-BSvSKazD.js} +2 -1
- package/dist/fr-FR-BSynpexF.js +13 -0
- package/dist/fr-FR-BmW46mYd.js +110 -0
- package/dist/fr-FR-BnblnBsx.js +24 -0
- package/dist/fr-FR-CMjrAkKl.js +13 -0
- package/dist/fr-FR-CYZXbwc9.js +68 -0
- package/dist/fr-FR-CiwkAb3E.js +27 -0
- package/dist/fr-FR-Cr-Y1vIy.js +13 -0
- package/dist/{fr-FR-BxO1IR9C.js → fr-FR-DNJiLv9b.js} +9 -1
- package/dist/fr-FR-DZICoAHV.js +35 -0
- package/dist/fr-FR-E_UubsZ-.js +27 -0
- package/dist/{fr-FR-B3qQW3oG.js → fr-FR-JLPKgufm.js} +6 -1
- package/dist/fr-FR-cTKcuHqX.js +32 -0
- package/dist/{getName-DN1hhEuf.js → getName-DwJ2SEhe.js} +2 -2
- package/dist/{hasDataChanged-Di3pJ9RD.js → hasDataChanged-qmdT2J_a.js} +2 -2
- package/dist/{hr-HR-DST-QbRI.js → hr-HR-BLpGb4f2.js} +2 -1
- package/dist/hr-HR-Bhsop3CT.js +13 -0
- package/dist/hr-HR-ComCqan_.js +32 -0
- package/dist/{hr-HR-DMV2OsPs.js → hr-HR-D26Gz-HL.js} +6 -1
- package/dist/hr-HR-D5V7g9H2.js +13 -0
- package/dist/hr-HR-D8cBxUFa.js +13 -0
- package/dist/hr-HR-D9bzCN_d.js +35 -0
- package/dist/hr-HR-De5kHU8U.js +24 -0
- package/dist/hr-HR-DtfHQVe0.js +27 -0
- package/dist/hr-HR-TVOgDkBf.js +27 -0
- package/dist/{hr-HR-DghVS0jH.js → hr-HR-WMnlxMEY.js} +9 -1
- package/dist/hr-HR-bE6cvRCQ.js +68 -0
- package/dist/hr-HR-c1Si_0s4.js +110 -0
- package/dist/{hu-HU-CJh8OY-w.js → hu-HU-B2nrl0pw.js} +9 -1
- package/dist/hu-HU-BVfkOdJe.js +13 -0
- package/dist/{hu-HU-CPWGnq22.js → hu-HU-BZCFneWx.js} +6 -1
- package/dist/hu-HU-BcogZby3.js +24 -0
- package/dist/hu-HU-C5p7RWWD.js +35 -0
- package/dist/{hu-HU-BgHugMwG.js → hu-HU-Ca9Hex26.js} +2 -1
- package/dist/hu-HU-CibGC8KY.js +110 -0
- package/dist/hu-HU-D2j1ISVk.js +13 -0
- package/dist/hu-HU-DG-NUDx4.js +68 -0
- package/dist/hu-HU-DRONW_47.js +27 -0
- package/dist/hu-HU-DUGz5q5D.js +32 -0
- package/dist/hu-HU-I4-KFzvz.js +27 -0
- package/dist/hu-HU-hbVM6tMS.js +13 -0
- package/dist/{iframeWidget-CdgdGJSA.js → iframeWidget-Bdf5GkVq.js} +4 -4
- package/dist/{isEmpty-Cg1sEY56.js → isEmpty-DWL1114W.js} +2 -2
- package/dist/it-IT-BMjuva_2.js +110 -0
- package/dist/{it-IT-vJt2CGXz.js → it-IT-BRmX2jEi.js} +9 -1
- package/dist/it-IT-C7Sg1k4p.js +13 -0
- package/dist/it-IT-C_651bEP.js +13 -0
- package/dist/it-IT-Ckv8Ce4e.js +24 -0
- package/dist/it-IT-CwA8megO.js +13 -0
- package/dist/it-IT-DERflsUd.js +32 -0
- package/dist/it-IT-DIbH-udG.js +27 -0
- package/dist/it-IT-DuBLJIdz.js +27 -0
- package/dist/it-IT-Erh1DIlj.js +68 -0
- package/dist/{it-IT-p_DER3dq.js → it-IT-Qfzc8jnW.js} +2 -1
- package/dist/{it-IT-CRmaykgQ.js → it-IT-mScKLwBR.js} +6 -1
- package/dist/it-IT-mYyg3XGz.js +35 -0
- package/dist/ja-JP-BSYrPZsE.js +35 -0
- package/dist/ja-JP-BoxeBgOv.js +32 -0
- package/dist/{ja-JP-DT0qGp0i.js → ja-JP-CCnzjx-u.js} +32 -2
- package/dist/{ja-JP-C870wgmw.js → ja-JP-CHQ64lw1.js} +2 -1
- package/dist/ja-JP-CJ_j_HAA.js +27 -0
- package/dist/ja-JP-Cr_qjpZ2.js +110 -0
- package/dist/{ja-JP-a6UbRzaS.js → ja-JP-CvNJvxkQ.js} +22 -3
- package/dist/{ja-JP-DCOsVkrk.js → ja-JP-DyELKS9Q.js} +6 -1
- package/dist/ja-JP-FWHXsXlW.js +24 -0
- package/dist/ja-JP-GSbqID7o.js +13 -0
- package/dist/ja-JP-ThzG9vIo.js +68 -0
- package/dist/ja-JP-bz7ekGnF.js +27 -0
- package/dist/{ja-JP-Cm2wakN6.js → ja-JP-gRRH8Eph.js} +21 -13
- package/dist/jpAddressSchema-ULGNNt5U.js +27 -0
- package/dist/{localizeDateString-CjJb5ip4.js → localizeDateString--iXm1oBl.js} +1 -1
- package/dist/{lt-LT-Dxde15Cc.js → lt-LT-0RKZeraM.js} +2 -1
- package/dist/{lt-LT-CrCYV_jv.js → lt-LT-BJQDUanx.js} +9 -1
- package/dist/lt-LT-BLsIcCtE.js +27 -0
- package/dist/lt-LT-C5nNCk4_.js +13 -0
- package/dist/lt-LT-CBBDNCnp.js +27 -0
- package/dist/{lt-LT-0CK0Iin7.js → lt-LT-CLPQVRpJ.js} +6 -1
- package/dist/lt-LT-Ci357QYQ.js +13 -0
- package/dist/lt-LT-D5Rhxm1h.js +32 -0
- package/dist/lt-LT-DDdq07sX.js +24 -0
- package/dist/lt-LT-DSiutpRl.js +13 -0
- package/dist/lt-LT-DjNjg3Pl.js +110 -0
- package/dist/lt-LT-Nd1uRoIj.js +68 -0
- package/dist/lt-LT-i-T_HQ42.js +35 -0
- package/dist/{lv-LV-DDvnyHlO.js → lv-LV-Bh-WQp0K.js} +2 -1
- package/dist/lv-LV-BpRfRfMz.js +110 -0
- package/dist/lv-LV-BtX12dHJ.js +35 -0
- package/dist/lv-LV-C62XiDE5.js +13 -0
- package/dist/lv-LV-C7hMdPcY.js +27 -0
- package/dist/lv-LV-CEK8Re4d.js +13 -0
- package/dist/lv-LV-CG1zToz7.js +32 -0
- package/dist/lv-LV-CkyuY2ji.js +24 -0
- package/dist/lv-LV-CtIe38WU.js +27 -0
- package/dist/{lv-LV-CSxppAD_.js → lv-LV-Cu-MJMVO.js} +6 -1
- package/dist/lv-LV-DKhV24CI.js +68 -0
- package/dist/lv-LV-Dxe-A5vo.js +13 -0
- package/dist/{lv-LV-CaFrxG3S.js → lv-LV-h3nTokkM.js} +9 -1
- package/dist/mapAddressLocalizationToJpAddressSchema-vJWbpAyq.js +56 -0
- package/dist/{mapExistingFile-Dww-3m9M.js → mapExistingFile-Ct5Drm_t.js} +4 -4
- package/dist/mapJpAddressSchemaToAddressLocalizations-Btg-uZPu.js +147 -0
- package/dist/mapLegalEntityToIndividualOnfidoSchema-DQsaMiqB.js +203 -0
- package/dist/{mapTransferInstrumentToPayoutAccount-NoTqg5NI.js → mapTransferInstrumentToPayoutAccount-CRhSOuJd.js} +6 -3
- package/dist/nl-NL-BOJ6zuBr.js +13 -0
- package/dist/nl-NL-Bx5p0nXL.js +24 -0
- package/dist/nl-NL-CE4l8R5l.js +27 -0
- package/dist/nl-NL-Cjlmc0Ii.js +32 -0
- package/dist/{nl-NL-Uf_myU_8.js → nl-NL-D7gBNWEY.js} +2 -1
- package/dist/nl-NL-DOQPxTX-.js +13 -0
- package/dist/nl-NL-JChnFdCY.js +13 -0
- package/dist/nl-NL-NlkjOSYi.js +27 -0
- package/dist/nl-NL-O9GCHMDA.js +68 -0
- package/dist/nl-NL-PUQGh3Rp.js +35 -0
- package/dist/{nl-NL-BQJjhn7U.js → nl-NL-YzDSCWLL.js} +9 -1
- package/dist/nl-NL-oaBDOlm6.js +110 -0
- package/dist/{nl-NL-RfK34nkp.js → nl-NL-pVdpCCOx.js} +6 -1
- package/dist/no-NO--OoWld_l.js +13 -0
- package/dist/no-NO-B1_YJlMP.js +27 -0
- package/dist/no-NO-BTrfxWS7.js +110 -0
- package/dist/{no-NO-CSia2Bd5.js → no-NO-Big2B13b.js} +9 -1
- package/dist/no-NO-Bs3-6MDM.js +24 -0
- package/dist/{no-NO-DZ1y_9mq.js → no-NO-C-gCYc9q.js} +2 -1
- package/dist/no-NO-CA1aR6Wh.js +68 -0
- package/dist/{no-NO-BWzGost-.js → no-NO-CRULNwNn.js} +6 -1
- package/dist/no-NO-CY_XHrYd.js +32 -0
- package/dist/no-NO-Cp3-tDMw.js +13 -0
- package/dist/no-NO-Crlsj6HG.js +27 -0
- package/dist/no-NO-CuwTDFSf.js +13 -0
- package/dist/no-NO-kPnbGnBM.js +35 -0
- package/dist/pl-PL-1-MrLPXu.js +13 -0
- package/dist/pl-PL-BKDK0_G8.js +68 -0
- package/dist/pl-PL-BzhEoDb5.js +24 -0
- package/dist/pl-PL-C-MmQaeR.js +35 -0
- package/dist/pl-PL-C72GTDxW.js +110 -0
- package/dist/{pl-PL-6WyUmy0K.js → pl-PL-CL483jMb.js} +9 -1
- package/dist/pl-PL-C_MvVzPy.js +32 -0
- package/dist/pl-PL-CtDHmbhp.js +13 -0
- package/dist/{pl-PL-DFrOIiCG.js → pl-PL-CxCiWdAF.js} +6 -1
- package/dist/pl-PL-DGYFY42P.js +27 -0
- package/dist/pl-PL-DYxD6VJ_.js +27 -0
- package/dist/pl-PL-DtJ3sgVO.js +13 -0
- package/dist/{pl-PL-B1tVRX3A.js → pl-PL-LnVPufjb.js} +2 -1
- package/dist/process-field-configurations-B1Iwtpx2.js +304 -0
- package/dist/pt-BR-BfxgHKY4.js +27 -0
- package/dist/pt-BR-Br_cHzGx.js +13 -0
- package/dist/pt-BR-C0I_kTQ6.js +13 -0
- package/dist/pt-BR-CBAe0SnK.js +32 -0
- package/dist/pt-BR-Co8OqKh-.js +27 -0
- package/dist/pt-BR-CtFCi7U4.js +110 -0
- package/dist/pt-BR-DJOzf0y2.js +53 -0
- package/dist/pt-BR-DSENwwGu.js +24 -0
- package/dist/pt-BR-DnKEuslh.js +13 -0
- package/dist/pt-BR-Dw0UZ-Od.js +35 -0
- package/dist/pt-BR-NtLaWlnZ.js +68 -0
- package/dist/{pt-BR-CxjlToN4.js → pt-BR-apPtB2cK.js} +6 -1
- package/dist/{pt-BR-BD3-Ecm8.js → pt-BR-ur86nRrK.js} +2 -1
- package/dist/{pt-PT-CWYxqUbN.js → pt-PT-B3qoJ3Fr.js} +9 -1
- package/dist/pt-PT-Bf4IV7wp.js +13 -0
- package/dist/pt-PT-CIo3mlXL.js +24 -0
- package/dist/pt-PT-CLwCij2I.js +13 -0
- package/dist/{pt-PT-DpBfkgVw.js → pt-PT-CVNEcs32.js} +2 -1
- package/dist/{pt-PT-CU13UUwT.js → pt-PT-Coa6J7SM.js} +6 -1
- package/dist/pt-PT-DSxxVA0f.js +68 -0
- package/dist/pt-PT-DfVjLaAU.js +35 -0
- package/dist/pt-PT-Dm5DRDrd.js +32 -0
- package/dist/pt-PT-TKg5FLat.js +27 -0
- package/dist/pt-PT-XAn7WGle.js +110 -0
- package/dist/pt-PT-cjbtYBUX.js +13 -0
- package/dist/pt-PT-pKLoM66X.js +27 -0
- package/dist/resolveEnvironment-DC9P7X3D.js +164 -0
- package/dist/ro-RO-3rOfS17N.js +27 -0
- package/dist/ro-RO-4j2I7YM7.js +13 -0
- package/dist/ro-RO-B5YT9vP-.js +32 -0
- package/dist/{ro-RO-B2u2q1Ez.js → ro-RO-BTqq5BPM.js} +6 -1
- package/dist/ro-RO-Bybq8JFn.js +68 -0
- package/dist/ro-RO-CGhIjlpU.js +13 -0
- package/dist/ro-RO-Cmk-sVDr.js +13 -0
- package/dist/{ro-RO-BWQeseQ_.js → ro-RO-Ct_BJvsc.js} +9 -1
- package/dist/ro-RO-D3rQ93wa.js +27 -0
- package/dist/ro-RO-ECJHARCT.js +35 -0
- package/dist/ro-RO-ILTvlS9i.js +24 -0
- package/dist/{ro-RO-BF1Q86nQ.js → ro-RO-i7lojG2G.js} +2 -1
- package/dist/ro-RO-qX8X1Q1m.js +110 -0
- package/dist/{rules-4TEUMKya.js → rules-CzXw9tws.js} +10 -6
- package/dist/{sk-SK-Rd06VJ5k.js → sk-SK-B5brxU1N.js} +2 -1
- package/dist/sk-SK-Bo5nvxWQ.js +13 -0
- package/dist/sk-SK-C5Qmv4E6.js +13 -0
- package/dist/sk-SK-C6rMIxpz.js +68 -0
- package/dist/sk-SK-CjdK4BKW.js +110 -0
- package/dist/sk-SK-CjrLvDMx.js +27 -0
- package/dist/sk-SK-CmH1I1tp.js +27 -0
- package/dist/sk-SK-Cv23cDQO.js +24 -0
- package/dist/sk-SK-Do6CKNU4.js +13 -0
- package/dist/{sk-SK-DnNuh37c.js → sk-SK-FGK1FMMO.js} +9 -1
- package/dist/sk-SK-S6iF1WDH.js +32 -0
- package/dist/sk-SK-rSmwmSCa.js +35 -0
- package/dist/{sk-SK-BWA3fAcI.js → sk-SK-welR06By.js} +6 -1
- package/dist/{sl-SI-B7zbwoZn.js → sl-SI-B9N6vA08.js} +6 -1
- package/dist/sl-SI-BZpXMHiG.js +13 -0
- package/dist/sl-SI-C-C-KJCX.js +27 -0
- package/dist/{sl-SI-BuIFB5zU.js → sl-SI-CUCrzJQv.js} +2 -1
- package/dist/sl-SI-CedEO3kf.js +35 -0
- package/dist/sl-SI-CrTRlNnN.js +13 -0
- package/dist/{sl-SI-D212isFw.js → sl-SI-Cz28AFTz.js} +9 -1
- package/dist/sl-SI-DEaeEVKB.js +24 -0
- package/dist/sl-SI-DqUEy_Cm.js +32 -0
- package/dist/sl-SI-cY-L2ma-.js +13 -0
- package/dist/sl-SI-hnlbW1OT.js +27 -0
- package/dist/sl-SI-lPxRRPsh.js +110 -0
- package/dist/sl-SI-tPwbFvOI.js +68 -0
- package/dist/style.css +696 -597
- package/dist/styles-CLV89_hH.js +696 -597
- package/dist/sv-SE-7Cbo1oic.js +27 -0
- package/dist/sv-SE-BHfydid5.js +27 -0
- package/dist/sv-SE-BPpQ-05i.js +110 -0
- package/dist/sv-SE-BYUoi-08.js +35 -0
- package/dist/sv-SE-BtwPrLEA.js +13 -0
- package/dist/{sv-SE-BwJgkIDf.js → sv-SE-C6uPh9g5.js} +2 -1
- package/dist/sv-SE-CRBRuE8Z.js +32 -0
- package/dist/sv-SE-CXaMlJCI.js +24 -0
- package/dist/{sv-SE-Hi07uLM9.js → sv-SE-D6al0j6W.js} +6 -1
- package/dist/{sv-SE-Ca1bxZf3.js → sv-SE-DLl7OGxl.js} +9 -1
- package/dist/sv-SE-DsPdegWB.js +13 -0
- package/dist/sv-SE-K1QT1cOt.js +68 -0
- package/dist/sv-SE-WPziDPQa.js +13 -0
- package/dist/types/api/businessLines/businessLines.types.d.ts +10 -0
- package/dist/types/api/businessLines/useBusinessLines.d.ts +4 -2
- package/dist/types/api/businessLines/useCreateBusinessLine.d.ts +7 -0
- package/dist/types/api/companySearch/useCompanySearch.d.ts +1 -0
- package/dist/types/api/configurations/useScenarios.d.ts +12 -12
- package/dist/types/api/legalEntity/useLegalEntity.d.ts +16 -16
- package/dist/types/components/BankAccount/fields/BankAccountFormat/types.d.ts +2 -1
- package/dist/types/components/BankAccount/fields/PreferredCurrency/PreferredCurrency.d.ts +10 -0
- package/dist/types/components/BankAccount/forms/PayoutAccount/payoutAccountFormat.d.ts +1 -1
- package/dist/types/components/BankAccount/forms/PayoutAccount/types.d.ts +2 -0
- package/dist/types/components/BankAccount/forms/PayoutCountryDetails/PayoutCountryDetails.d.ts +3 -0
- package/dist/types/components/BankAccount/forms/PayoutCountryDetails/types.d.ts +11 -0
- package/dist/types/components/BankAccount/forms/PayoutDetails/PayoutDetails.d.ts +6 -0
- package/dist/types/components/BankAccount/forms/PayoutDetails/types.d.ts +2 -0
- package/dist/types/components/BankAccount/forms/PayoutVerificationMethod/payoutVerificationMethodMetadata.d.ts +4 -4
- package/dist/types/components/BankAccount/forms/PayoutVerificationMethod/utils.d.ts +2 -0
- package/dist/types/components/BankAccount/mapping/mapPayoutAccountSchemaToApiBankAccount.d.ts +3 -2
- package/dist/types/components/BankAccount/mapping/mapPayoutDetailsToTransferInstrument.d.ts +2 -1
- package/dist/types/components/BankAccount/mapping/mapTransferInstrumentToPayoutAccount.d.ts +1 -1
- package/dist/types/components/BankAccount/mapping/payoutKeyMappings.d.ts +53 -51
- package/dist/types/components/BankAccount/pages/PayoutDetailsPage.d.ts +1 -1
- package/dist/types/components/BankAccount/tasks/PayoutDetailsDropin/payoutDetailsFormConfig.d.ts +1 -1
- package/dist/types/components/BankAccount/utils/payoutAccountUtil.d.ts +3 -2
- package/dist/types/components/Business/forms/BasicInformation/BasicInformationMultiform.d.ts +5 -3
- package/dist/types/components/Business/forms/RegistrationDocument/types.d.ts +3 -3
- package/dist/types/components/Business/forms/TaxDocument/types.d.ts +3 -3
- package/dist/types/components/Business/pages/RootBusinessDetailsPage.d.ts +1 -1
- package/dist/types/components/Business/tasks/BusinessDetailsDropin/businessDetailsStore.d.ts +5 -4
- package/dist/types/components/Business/tasks/BusinessDetailsDropin/types.d.ts +2 -3
- package/dist/types/components/Business/tasks/BusinessDetailsDropin/utils.d.ts +3 -3
- package/dist/types/components/Business/tasks/BusinessDetailsMultiformDropin/BusinessDetailsMultiform.d.ts +2 -1
- package/dist/types/components/Business/tasks/BusinessDetailsMultiformDropin/utils.d.ts +0 -2
- package/dist/types/components/Business/utils/companyTypeMetadata.d.ts +3 -3
- package/dist/types/components/BusinessLines/fields/WebDataField/types.d.ts +2 -4
- package/dist/types/components/BusinessLines/tasks/BusinessLines/ExistingBusinessLines/BusinessLineModal.d.ts +5 -0
- package/dist/types/components/BusinessLines/tasks/BusinessLines/ExistingBusinessLines/ExistingBusinessLines.d.ts +8 -0
- package/dist/types/components/BusinessLines/tasks/utils.d.ts +13 -4
- package/dist/types/components/EFP/mapping/businessFinancingKeyMappings.d.ts +151 -151
- package/dist/types/components/EFP/tasks/BusinessFinancingDropin/BusinessFinancingBasicCompanyInformation.d.ts +0 -1
- package/dist/types/components/EFP/tasks/BusinessFinancingDropin/BusinessFinancingBusinessInformation.d.ts +0 -1
- package/dist/types/components/EFP/tasks/BusinessFinancingDropin/BusinessFinancingFinancialInformation.d.ts +0 -1
- package/dist/types/components/EFP/tasks/BusinessFinancingDropin/BusinessFinancingOwnershipStructure.d.ts +0 -1
- package/dist/types/components/EFP/tasks/BusinessFinancingDropin/BusinessFinancingRegisteredAddress.d.ts +0 -1
- package/dist/types/components/EFP/tasks/BusinessFinancingDropin/types.d.ts +7 -5
- package/dist/types/components/EFP/tasks/SourceOfFundsDropin/sofStore.d.ts +1 -1
- package/dist/types/components/EFP/tasks/TaxReportingDropin/taxClassificationStore.d.ts +1 -1
- package/dist/types/components/EFP/tasks/TaxReportingDropin/utils.d.ts +6 -6
- package/dist/types/components/EmbeddedDropins/BusinessFinancingComponent/BusinessFinancingComponent.d.ts +1 -1
- package/dist/types/components/EmbeddedDropins/BusinessFinancingComponent/utils.d.ts +3 -3
- package/dist/types/components/EmbeddedDropins/ViewVerificationStatus/content.d.ts +3 -3
- package/dist/types/components/Individual/fields/NameFields/NameFields.d.ts +3 -0
- package/dist/types/components/Individual/forms/Individual/IdVerification/idVerificationProviderId.d.ts +1 -1
- package/dist/types/components/Individual/forms/Individual/IdVerificationMethod/idVerificationMethodMetadata.d.ts +3 -3
- package/dist/types/components/Individual/forms/IndividualOnfido/IdNowVerificationModal/isIdNowModalOpen.d.ts +3 -3
- package/dist/types/components/Individual/forms/IndividualOnfido/UboQuestionnaire/UboQuestionnaire.types.d.ts +4 -1
- package/dist/types/components/Individual/forms/IndividualOnfido/UboQuestionnaire/UboQuestionnaireModalContent.d.ts +3 -1
- package/dist/types/components/Individual/helpers/shouldShowMotionCapture.d.ts +2 -2
- package/dist/types/components/Individual/tasks/DecisionMakers/DecisionMakerDetails/DecisionMakerDetails.d.ts +1 -1
- package/dist/types/components/Individual/tasks/DecisionMakers/DecisionMakerDetails/DecisionMakerDetails.types.d.ts +2 -0
- package/dist/types/components/Individual/tasks/DecisionMakers/DecisionMakerDetails/utils.d.ts +56 -0
- package/dist/types/components/Individual/tasks/DecisionMakers/RemediationAlerts/RemediationAlerts.d.ts +7 -0
- package/dist/types/components/Individual/tasks/DecisionMakers/RemediationAlerts/remediation.config.d.ts +19 -0
- package/dist/types/components/Individual/tasks/DecisionMakers/utils.d.ts +3 -0
- package/dist/types/components/Individual/tasks/IndividualOnfidoDropin/IndividualOnfidoStore.d.ts +1 -1
- package/dist/types/components/Shared/EntityAssociation/EntityAssociation.d.ts +1 -1
- package/dist/types/components/Shared/EntityAssociation/types.d.ts +2 -4
- package/dist/types/components/Shared/devex/DebugListener/DebugFormData.d.ts +1 -0
- package/dist/types/components/Shared/devex/DebugListener/debugStore.d.ts +5 -0
- package/dist/types/components/Shared/fields/LocalizedLegalCompanyNameField/fieldConfig.d.ts +4 -4
- package/dist/types/components/Shared/forms/Address/localized/jp/JpAddress.d.ts +1 -1
- package/dist/types/components/Shared/forms/Address/localized/jp/mapAddressLocalizationToJpAddressSchema.d.ts +3 -0
- package/dist/types/components/Shared/forms/Address/localized/jp/mapJpAddressSchemaToAddressLocalizations.d.ts +3 -0
- package/dist/types/components/Shared/forms/Address/localized/jp/mapJpAddressSummary.d.ts +4 -0
- package/dist/types/components/Shared/forms/Address/utils.d.ts +3 -2
- package/dist/types/components/Shared/forms/FinancialInformation/formatFinancialInformationSummary.d.ts +1 -2
- package/dist/types/components/Shared/forms/RegistrationAddress/types.d.ts +3 -2
- package/dist/types/components/Shared/tasks/TaskList/TaskList.d.ts +3 -1
- package/dist/types/components/Shared/tasks/TaskList/TaskListItem.d.ts +1 -1
- package/dist/types/components/Shared/tasks/TaskList/types.d.ts +1 -4
- package/dist/types/components/Shared/tasks/TaskList/utils.d.ts +1 -1
- package/dist/types/components/SoleProprietorship/pages/SoleProprietorshipPage.d.ts +1 -2
- package/dist/types/components/Trust/pages/TrustMemberCompanyPage.d.ts +1 -2
- package/dist/types/components/Trust/tasks/RoleAndTypeDropin/formatRoleAndEntityTypeSummary.d.ts +2 -2
- package/dist/types/components/UnincorporatedPartnership/pages/UnincorporatedPartnershipMemberCompanyPage.d.ts +1 -2
- package/dist/types/components/ui/atoms/Header/Header.d.ts +12 -0
- package/dist/types/components/ui/atoms/ListItem/ListItem.d.ts +1 -2
- package/dist/types/components/ui/atoms/RadioGroupCard/RadioGroupCard.d.ts +3 -4
- package/dist/types/components/ui/atoms/RadioGroupCard/RadioGroupCard.types.d.ts +8 -9
- package/dist/types/components/ui/layout/StackLayout/StackLayout.d.ts +29 -7
- package/dist/types/components/ui/molecules/Card/Card.d.ts +1 -1
- package/dist/types/components/ui/molecules/Card/types.d.ts +1 -0
- package/dist/types/components/ui/molecules/EmbeddedStatus/EmbeddedStatus.d.ts +2 -23
- package/dist/types/components/ui/molecules/EmbeddedStatus/statusToTag.d.ts +3 -3
- package/dist/types/components/ui/molecules/EmbeddedStatus/types.d.ts +23 -0
- package/dist/types/context/ExperimentContext/types.d.ts +4 -12
- package/dist/types/context/I18nProvider/I18nContext.d.ts +3 -0
- package/dist/types/context/SettingsContext/types.d.ts +2 -2
- package/dist/types/core/models/api/legal-entity-association.d.ts +1 -1
- package/dist/types/core/models/api/source-of-funds.d.ts +5 -0
- package/dist/types/core/models/api/transfer-instrument.d.ts +2 -0
- package/dist/types/core/process-field-configurations.d.ts +2 -2
- package/dist/types/datasets/generators/getAccountFormatForCountry.d.ts +1 -0
- package/dist/types/hooks/useLegalCompanyNameField/useLegalCompanyNameField.d.ts +6 -8
- package/dist/types/hooks/useUboQuestionnaire.d.ts +25 -0
- package/dist/types/language/Language.d.ts +10 -0
- package/dist/types/language/types.d.ts +15 -1
- package/dist/types/stores/globalStore/taskTypes.d.ts +1 -1
- package/dist/types/{core → utils}/analytics.d.ts +5 -5
- package/dist/types/utils/entityStatusUtil.d.ts +1 -1
- package/dist/types/utils/getSSNType.d.ts +1 -0
- package/dist/types/utils/textTransformation/toFullWidth.d.ts +6 -0
- package/dist/types/utils/translation.d.ts +1 -0
- package/dist/{types-IWh9Nm-W.js → types-28yvE9dj.js} +2 -2
- package/dist/{types-Dsz7b4S_.js → types-BzOpGekG.js} +2 -2
- package/dist/{types-CAznNNSI.js → types-DHmyPbAn.js} +5 -13
- package/dist/{useAssociatedLegalEntity-CPl7E0oh.js → useAssociatedLegalEntity-Cd77TYXt.js} +1 -1
- package/dist/{useDataset-CYBhIC5y.js → useDataset-B-72Ufk7.js} +3 -3
- package/dist/{useForm-NtB5fMq5.js → useForm-Aw38WiTE.js} +8 -79
- package/dist/useFormContext-Bx1n-f4V.js +222 -0
- package/dist/{useGlobalData-COgPG9qd.js → useGlobalData-BYJWYYpf.js} +10 -11
- package/dist/{RadioGroup-QZCH1TCn.js → useMultiForm-D-wGVJq1.js} +6 -342
- package/dist/{useOnboardingStatus-B8yCxKXz.js → useOnboardingStatus-AbPudgMj.js} +1 -1
- package/dist/{useScenarios-DesE_Dem.js → useScenarios-CEHvpucH.js} +2 -2
- package/dist/{useTermsOfServiceStatus-qtseJuA8.js → useTermsOfServiceStatus-BugRyfkQ.js} +1 -1
- package/dist/{useToastContext-D4w2gBxd.js → useToastContext-D58NfzLh.js} +2 -5
- package/dist/{useUnincorporatedPartnershipMembers-FOg1r690.js → useUnincorporatedPartnershipMembers-BOfx-rWR.js} +5 -5
- package/dist/{utils-BnQGsYPp.js → utils-D-PqLpBS.js} +2 -2
- package/dist/{utils-B1i9qK_1.js → utils-JAm-rEQS.js} +10 -10
- package/dist/{utils-BMvr9mIu.js → utils-qNiMqbmo.js} +16 -10
- package/dist/{validate-C6-L7Vfa.js → validate-6QHmaW1O.js} +3 -6
- package/dist/{validate-anwsdbQz.js → validate-9J9pJpyR.js} +8 -8
- package/dist/{validate-BiuAh7Ub.js → validate-BY5vrcXH.js} +2 -2
- package/dist/{validationError-zbgp4iB7.js → validationError-kAn6qx2R.js} +2 -2
- package/package.json +70 -70
- package/dist/BusinessFinancingComponent-BdV2XNEs.js +0 -45
- package/dist/BusinessFinancingPage-CutMOZIo.js +0 -40
- package/dist/CreateIndividualComponent-DcwNaN_i.js +0 -72
- package/dist/CreateTransferInstrumentComponent-BFYc-5Zc.js +0 -67
- package/dist/DecisionMakers-c18dspZ1.js +0 -593
- package/dist/ManageIndividualComponent-DBe5ValD.js +0 -47
- package/dist/ManageTermsOfServiceComponent-5GHjPbHb.js +0 -47
- package/dist/RootBusinessDetailsPage-Cy5mUuKv.js +0 -1915
- package/dist/SoleProprietorshipPage-XnNdoc8n.js +0 -50
- package/dist/TaskStatusIndicator-CEZcV_gi.js +0 -69
- package/dist/TrustMemberCompanyPage-DVm9LzCY.js +0 -60
- package/dist/TrustMemberIndividualPage-BqncnJnj.js +0 -66
- package/dist/UnincorporatedPartnershipMemberCompanyPage-DMBIT2KR.js +0 -64
- package/dist/analytics-B9jlnux-.js +0 -61
- package/dist/bg-BG-9uVrFuHv.js +0 -23
- package/dist/bg-BG-B0-ZcjR0.js +0 -22
- package/dist/bg-BG-Cp58y2fj.js +0 -13
- package/dist/bg-BG-Cr0ewJCW.js +0 -13
- package/dist/bg-BG-D5192UVe.js +0 -35
- package/dist/bg-BG-ZJvmfx01.js +0 -13
- package/dist/bg-BG-hFblesn-.js +0 -15
- package/dist/cs-CZ-7xfNBIeH.js +0 -13
- package/dist/cs-CZ-B8IPRc47.js +0 -15
- package/dist/cs-CZ-DMwpeH56.js +0 -13
- package/dist/cs-CZ-DOqH0WeT.js +0 -35
- package/dist/cs-CZ-De4wbl1W.js +0 -13
- package/dist/cs-CZ-Dk1ePReM.js +0 -22
- package/dist/cs-CZ-Wzc382q6.js +0 -23
- package/dist/da-DK-B45X2VaJ.js +0 -35
- package/dist/da-DK-BK6TE3SH.js +0 -13
- package/dist/da-DK-BTpZzEgA.js +0 -15
- package/dist/da-DK-CeNMXUfE.js +0 -23
- package/dist/da-DK-DC8dAHWf.js +0 -13
- package/dist/da-DK-DStNe471.js +0 -22
- package/dist/da-DK-R0sNbjuQ.js +0 -13
- package/dist/de-DE-CGoBPCPv.js +0 -22
- package/dist/de-DE-CWvgMDqU.js +0 -35
- package/dist/de-DE-CY7fT1B5.js +0 -13
- package/dist/de-DE-D9r_yUSr.js +0 -13
- package/dist/de-DE-DjOUNvp6.js +0 -15
- package/dist/de-DE-JI-7mvxy.js +0 -23
- package/dist/de-DE-ZQioXTGO.js +0 -13
- package/dist/el-GR-B06F8VNw.js +0 -13
- package/dist/el-GR-B69zcWyB.js +0 -22
- package/dist/el-GR-C3rkK_oc.js +0 -35
- package/dist/el-GR-C7ThPKtr.js +0 -13
- package/dist/el-GR-Cu9HwD-f.js +0 -15
- package/dist/el-GR-DfNOPkLq.js +0 -23
- package/dist/el-GR-kj1-bNjH.js +0 -13
- package/dist/en-US-BTYdAWXp.js +0 -15
- package/dist/en-US-BaWkkHh3.js +0 -13
- package/dist/en-US-DHq7VYFs.js +0 -23
- package/dist/es-ES-CKMfS8Yy.js +0 -22
- package/dist/es-ES-Cj7q7fWO.js +0 -15
- package/dist/es-ES-D6Uauj9W.js +0 -13
- package/dist/es-ES-DKCCgVF8.js +0 -35
- package/dist/es-ES-DOVPTeyf.js +0 -23
- package/dist/es-ES-Dm8otLm9.js +0 -13
- package/dist/es-ES-XCII5d8J.js +0 -13
- package/dist/et-EE-BJIsPOnh.js +0 -23
- package/dist/et-EE-Bc6ioJRG.js +0 -35
- package/dist/et-EE-DHwaH1by.js +0 -13
- package/dist/et-EE-DNcqO4R9.js +0 -13
- package/dist/et-EE-Dor3enPS.js +0 -15
- package/dist/et-EE-Dw-aPF7J.js +0 -22
- package/dist/et-EE-XPQ-Sf9x.js +0 -13
- package/dist/fi-FI-67pS4_t6.js +0 -13
- package/dist/fi-FI-BNcnKrJ9.js +0 -15
- package/dist/fi-FI-CLg2__EV.js +0 -13
- package/dist/fi-FI-D522KHGk.js +0 -23
- package/dist/fi-FI-DTgF3AuK.js +0 -13
- package/dist/fi-FI-Hhku9Lmc.js +0 -35
- package/dist/fi-FI-REYOX46I.js +0 -22
- package/dist/fr-FR-BYuKsZIb.js +0 -35
- package/dist/fr-FR-BZbWBKOT.js +0 -13
- package/dist/fr-FR-Bn3D6mmY.js +0 -15
- package/dist/fr-FR-CsogZlc6.js +0 -13
- package/dist/fr-FR-D7U2da1i.js +0 -13
- package/dist/fr-FR-D9qaP6nx.js +0 -22
- package/dist/fr-FR-DInQKkTd.js +0 -23
- package/dist/hr-HR-B3boX_dq.js +0 -13
- package/dist/hr-HR-BVzZeaDc.js +0 -13
- package/dist/hr-HR-CJ5rmUrZ.js +0 -13
- package/dist/hr-HR-CPO5Yw2B.js +0 -35
- package/dist/hr-HR-CbxEvbrE.js +0 -22
- package/dist/hr-HR-DzS44Gpv.js +0 -23
- package/dist/hu-HU-BJpO-WrQ.js +0 -13
- package/dist/hu-HU-BSOiZA7a.js +0 -15
- package/dist/hu-HU-CX5vJbE8.js +0 -13
- package/dist/hu-HU-CYfNXKwk.js +0 -13
- package/dist/hu-HU-D0C6UfXB.js +0 -22
- package/dist/hu-HU-mo_0ULJG.js +0 -35
- package/dist/hu-HU-xCvNM5TU.js +0 -23
- package/dist/it-IT-5QHf-hkt.js +0 -13
- package/dist/it-IT-Biduphjt.js +0 -22
- package/dist/it-IT-Cepap1v0.js +0 -13
- package/dist/it-IT-CjEYONJg.js +0 -23
- package/dist/it-IT-Dn9AGEIq.js +0 -13
- package/dist/it-IT-DvM-9LpM.js +0 -15
- package/dist/it-IT-Nl57jui-.js +0 -35
- package/dist/ja-JP-Ajo-tIow.js +0 -23
- package/dist/ja-JP-B2txEVPx.js +0 -22
- package/dist/ja-JP-D3oQAH7z.js +0 -35
- package/dist/ja-JP-DRJ0RpUn.js +0 -13
- package/dist/ja-JP-GXkLvnQ4.js +0 -15
- package/dist/lt-LT-3rmXgF6K.js +0 -13
- package/dist/lt-LT-B6CJ4ULI.js +0 -23
- package/dist/lt-LT-CVasDmF3.js +0 -35
- package/dist/lt-LT-C_YMgjp9.js +0 -22
- package/dist/lt-LT-DNjXmQPv.js +0 -15
- package/dist/lt-LT-Dsy0UVdI.js +0 -13
- package/dist/lt-LT-lJLUJnzd.js +0 -13
- package/dist/lv-LV-B3sT3_cw.js +0 -22
- package/dist/lv-LV-BiilWzcg.js +0 -13
- package/dist/lv-LV-CBex8RS9.js +0 -13
- package/dist/lv-LV-ChOoZuhc.js +0 -15
- package/dist/lv-LV-DPZgF65i.js +0 -13
- package/dist/lv-LV-DTtuyfHS.js +0 -23
- package/dist/lv-LV-Sbsv8-nD.js +0 -35
- package/dist/mapScriptLocalization-BXWQCCfg.js +0 -72
- package/dist/nl-NL-BHkRnVrj.js +0 -35
- package/dist/nl-NL-BHqiO21q.js +0 -15
- package/dist/nl-NL-BIcLB7e6.js +0 -13
- package/dist/nl-NL-CU6c8oyY.js +0 -13
- package/dist/nl-NL-DKYvsnqM.js +0 -13
- package/dist/nl-NL-G1wVnmzT.js +0 -22
- package/dist/nl-NL-Zcq0bXd-.js +0 -23
- package/dist/no-NO-BTtAuqCb.js +0 -22
- package/dist/no-NO-BWpBc9_J.js +0 -13
- package/dist/no-NO-Bj0_2wjm.js +0 -13
- package/dist/no-NO-BxReX6oF.js +0 -23
- package/dist/no-NO-CKT9kLAH.js +0 -15
- package/dist/no-NO-YuIAbtuI.js +0 -13
- package/dist/no-NO-kaAdT9B8.js +0 -35
- package/dist/pl-PL--qPaNyJD.js +0 -22
- package/dist/pl-PL-B87v7Wzw.js +0 -13
- package/dist/pl-PL-B8pWxq6T.js +0 -13
- package/dist/pl-PL-B9eq4QTe.js +0 -13
- package/dist/pl-PL-DD8JN4Qf.js +0 -35
- package/dist/pl-PL-T6uD5--R.js +0 -23
- package/dist/pt-BR-BljlblJ5.js +0 -23
- package/dist/pt-BR-CI2ZzGeN.js +0 -15
- package/dist/pt-BR-Cmr5LoAm.js +0 -22
- package/dist/pt-BR-CrKxuloz.js +0 -13
- package/dist/pt-BR-DMCle1o_.js +0 -30
- package/dist/pt-BR-DeDXIlM_.js +0 -35
- package/dist/pt-BR-DtLKiYpp.js +0 -60
- package/dist/pt-PT-BNJcehJa.js +0 -13
- package/dist/pt-PT-Cu735tNP.js +0 -13
- package/dist/pt-PT-D2elvnDU.js +0 -15
- package/dist/pt-PT-Dk48OVtf.js +0 -22
- package/dist/pt-PT-Gsd7I9Ff.js +0 -13
- package/dist/pt-PT-N0njcfLO.js +0 -23
- package/dist/pt-PT-Xm-pm3mb.js +0 -35
- package/dist/resolveEnvironment-DTf0YGQw.js +0 -84
- package/dist/ro-RO-B4ASHhK6.js +0 -13
- package/dist/ro-RO-B75duQ_N.js +0 -13
- package/dist/ro-RO-BLuOjrS0.js +0 -22
- package/dist/ro-RO-C3m6aJVP.js +0 -35
- package/dist/ro-RO-DL9V1CMj.js +0 -15
- package/dist/ro-RO-DkHxxgVT.js +0 -13
- package/dist/ro-RO-Ic1SzBgx.js +0 -23
- package/dist/sk-SK-BSioQTMW.js +0 -15
- package/dist/sk-SK-BVc-vNQm.js +0 -35
- package/dist/sk-SK-C1Ky2nl_.js +0 -22
- package/dist/sk-SK-CiD0FeLN.js +0 -23
- package/dist/sk-SK-Cv76Qa3V.js +0 -13
- package/dist/sk-SK-DUZblaeq.js +0 -13
- package/dist/sk-SK-DibZzOqt.js +0 -13
- package/dist/sl-SI-BB7iVcFI.js +0 -22
- package/dist/sl-SI-BylvpF-X.js +0 -15
- package/dist/sl-SI-CyNtynTN.js +0 -13
- package/dist/sl-SI-D9rl7bIN.js +0 -13
- package/dist/sl-SI-D_rqR0D7.js +0 -35
- package/dist/sl-SI-MZoDApq9.js +0 -23
- package/dist/sl-SI-vyebIKls.js +0 -13
- package/dist/sv-SE-1eeTTIj7.js +0 -13
- package/dist/sv-SE-B3zoXMuH.js +0 -35
- package/dist/sv-SE-BcTCn-cn.js +0 -13
- package/dist/sv-SE-DCFSf4Oj.js +0 -23
- package/dist/sv-SE-DbI-1JqN.js +0 -22
- package/dist/sv-SE-Dwz1yTrB.js +0 -15
- package/dist/sv-SE-Ez33Bdgp.js +0 -13
- package/dist/translation-C21WMjvq.js +0 -472
- package/dist/types/components/BusinessLines/forms/rules.d.ts +0 -5
- package/dist/types/components/ui/atoms/FormHeader/FormHeader.d.ts +0 -8
- package/dist/types/components/ui/atoms/Remove/Remove.d.ts +0 -2
- package/dist/types/components/ui/atoms/Remove/Remove.types.d.ts +0 -9
- package/dist/types/components/ui/molecules/Card/CardGroup.d.ts +0 -3
package/dist/{BusinessDetailsDropin-CdWljVO6.js → BusinessDetailsMultiformDropin-B7HHvJeq.js}
RENAMED
|
@@ -2,48 +2,55 @@
|
|
|
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] = "720b85e9-08c7-4723-a76d-bc3d080a5a88", e._sentryDebugIdIdentifier = "sentry-dbid-720b85e9-08c7-4723-a76d-bc3d080a5a88");
|
|
6
6
|
} catch (e) {
|
|
7
7
|
}
|
|
8
8
|
}
|
|
9
9
|
;
|
|
10
10
|
import { jsx, jsxs, Fragment } from "preact/jsx-runtime";
|
|
11
|
-
import { b as useApiContext,
|
|
11
|
+
import { b as useApiContext, aD as useMutation, k as httpPost, j as useQuery, q as skipToken, u as useTranslation, af as useI18nContext, aa as isEmpty, i as isUndefinedOrNull, a9 as CountryCodes, bA as isISIN, B as Button, c as useLegalEntity, R as ROOT_LE, X as useExperimentsContext, x as Typography, L as Loader, aC as entriesOf, P as useAnalyticsContext, m as useSettingsContext, N as createLogger, aF as useQueryClient, M as TaskTypes, y as LegalEntityTypes, al as businessDetailsComponentsKeyMapping, bB as solePropBusinessDetailsKeyMapping, ai as objectsDeepEqual, aG as keysOf, bC as solePropBusinessDetailsApiKeyMapping, bp as businessDetailsApiKeyMapping, a$ as filterOutUnwantedAssociationsIfRootLE, aZ as drop, a7 as getOwnEntityAssociations, aJ as doArraysMatch, ap as getCapabilityProblems, bD as solePropBusinessDetailsDocumentMapping, bE as businessDetailsDocumentMapping } from "./StoreProvider-DadhkEyO.js";
|
|
12
12
|
import { useEffect, useCallback, useState, useMemo, useRef } from "preact/hooks";
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import { u as
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import { a as getDocument, c as createDocumentRequest, b as getFileExtention, d as documentApiUtils } from "./validate-
|
|
13
|
+
import { R as RadioGroup, u as useCreateLegalEntity, a as useUpdateLegalEntity } from "./RadioGroup-Br5v8w0a.js";
|
|
14
|
+
import { S as SettingNames, I as InputText } from "./InputText-zem7Kt4i.js";
|
|
15
|
+
import { h as hasDataChanged } from "./hasDataChanged-qmdT2J_a.js";
|
|
16
|
+
import { u as useGlobalDataSlice, a as useGlobalData, c as useStateContext, F as FormWrapper } from "./useGlobalData-BYJWYYpf.js";
|
|
17
|
+
import { u as useToastContext } from "./useToastContext-D58NfzLh.js";
|
|
18
|
+
import { c as composePerScenarioFormConfigurations, g as getPropsFromConfigurations } from "./process-field-configurations-B1Iwtpx2.js";
|
|
19
|
+
import { c as validateNotEmptyOnBlur, f as validatePatternOnBlur, r as resolveFieldMetadata, h as validateJaKanaLegalCompanyName, i as validateJaHaniLegalCompanyName, a as useAccountHolder } from "./fieldConfigurations-BZuo2e0d.js";
|
|
20
|
+
import { g as getRequiredForms, a as addValidityToForms, u as useFormComposer, t as trackNavigation } from "./dropinUtils-wWEQXoqU.js";
|
|
21
|
+
import { u as uppercase, m as mapExistingFile, g as getPageName, b as useScenarioConfiguration } from "./mapExistingFile-Ct5Drm_t.js";
|
|
22
|
+
import { S as StructuredList, a as datasetUtilities, C as Confirm } from "./useDataset-B-72Ufk7.js";
|
|
23
|
+
import { E as EntityTypeRadioGroupCard, o as organizationTypesToSkipCompanyStructureForm } from "./utils-JAm-rEQS.js";
|
|
24
|
+
import { C as Checkbox, u as useDebouncedCallback, g as getAssociatedLeAnalyticsPayload } from "./analytics-awjVudvY.js";
|
|
25
|
+
import { a as getDocument, c as createDocumentRequest, b as getFileExtention, d as documentApiUtils } from "./validate-6QHmaW1O.js";
|
|
26
|
+
import { S as StateCodesUS, c as TAX_INFORMATION_FIELD, r as requestingBanking, d as requestingIssuing, e as exemptedFromTaxDefaultFieldMetadata, f as exemptedFromTaxDefaultFieldConfig, t as taxInformationDefaultFieldMetadata, b as taxInformationDefaultFieldConfig, T as TaxInformationField, C as COUNTRY_OF_GOVERNING_LAW_POSSIBLE, h as COUNTRIES_USING_COMPANY_SEARCH, M as MemoizedDocumentUpload, j as isRegistrationNumberAbsentStateV4Scenario, k as COUNTRIES_THAT_USE_TAX_ID_INSTEAD_OF_VAT, l as getCompanyRegistrationNumberOptions, m as countryToTaxInfoTypeMap, n as rules, g as getFieldsWithExistingData } from "./TaxInformationField-C4OeLAhU.js";
|
|
26
27
|
import cx from "classnames";
|
|
27
|
-
import { C as CompanyTypesValues, h as handleKeys } from "./bafinUtils-
|
|
28
|
-
import { D as DBA_NAME_FIELD, B as BUSINESS_REGISTRATION_NUMBER_FIELD, V as VAT_NUMBER_FIELD,
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
28
|
+
import { C as CompanyTypesValues, h as handleKeys } from "./bafinUtils-CAVAvSFg.js";
|
|
29
|
+
import { D as DBA_NAME_FIELD, B as BUSINESS_REGISTRATION_NUMBER_FIELD, V as VAT_NUMBER_FIELD, r as registrationAddressFields, v as vatAbsenceReasonMetadata, d as defaultFieldMetadata$1, g as getDefaultVatNumberType, a as defaultFieldConfig$1, e as exemptFromRegistrationNumberDefaultFieldMetadata, b as exemptFromRegistrationNumberDefaultFieldConfig, c as registrationNumberDefaultFieldMetadata, f as getDefaultRegistrationNumberType, h as registrationNumberDefaultFieldConfig, i as doingBusinessAsFieldMetadata, j as doingBusinessAsAbsentFieldMetadata, k as DBANameField, l as BusinessRegistrationNumberField, m as VatNumberField, M as MemoizedConstitutionalDocument, n as inferCompanyRegistrationNumberType } from "./RegistrationAddress-CP_kZ9NI.js";
|
|
30
|
+
import { c as createFormUtils, H as Header, m as mergeFieldMetadataIntoProps, E as ErrorPanel, C as CountryField, S as StackLayout, a as COUNTRY_FIELD, h as getFormProps, s as summaryItem, d as summaryStep } from "./CountryField-DunKeW_n.js";
|
|
31
|
+
import { u as useFormContext, F as FormContextProvider, a as FormFlow } from "./useFormContext-Bx1n-f4V.js";
|
|
32
|
+
import { u as useMultiForm } from "./useMultiForm-D-wGVJq1.js";
|
|
33
|
+
import { c as useAddressCleanse, f as formatAddressForCleanse, m as mapAddressData, d as applyVerifiedBusinessData, o as operationalAddressIsSameIds, A as Address, g as getNestedTrustedFields, S as STATE_FIELD, e as StateField, i as isDateOlderThanAYear } from "./Address-BBHj9Aas.js";
|
|
34
|
+
import { F as Field, a as useForm, L as LoaderWrapper } from "./useForm-Aw38WiTE.js";
|
|
35
|
+
import { I as InputNumber, c as InputCurrency, b as CURRENCY_FIELD, C as Currency, L as LegalFormField, m as mapFinancialReportsToFinancialInformation, a as mapFinancialInformationToFinancialReport } from "./Currency-2wpP-9m3.js";
|
|
36
|
+
import { c as currencyByCountry } from "./types-28yvE9dj.js";
|
|
37
|
+
import { I as InputDate, f as formatDateObj } from "./InputDate-DggMbeJG.js";
|
|
38
|
+
import { Suspense, lazy } from "preact/compat";
|
|
39
|
+
import { M as MaskedInput, m as makeMask, d as alphanumericInputs, b as alphaInputs, n as numericInputs } from "./MaskedInput-CSKFmTC0.js";
|
|
40
|
+
import { D as Divider, I as INDUSTRY_CODE_FIELD, i as industryCodeFieldMetadata, a as IndustryCodeField } from "./Divider-Ckm8Nfyb.js";
|
|
41
|
+
import { g as getAddressSchemaForCountry, C as COUNTRIES_WITH_STATES_DATASET, a as getAddressSchemaLabelsByCountry, m as mapAddressLabels, c as getKeyForField } from "./utils-qNiMqbmo.js";
|
|
37
42
|
import { signal } from "@preact/signals";
|
|
38
|
-
import { L as Link } from "./Link-
|
|
39
|
-
import { u as useAllowedCountries,
|
|
40
|
-
import { K as KEYBOARD_KEYS, M as Modal, a as ModalContent } from "./Modal-
|
|
41
|
-
import {
|
|
42
|
-
import {
|
|
43
|
+
import { L as Link } from "./Link-BZJgg2rS.js";
|
|
44
|
+
import { t as toFullWidth, u as useAllowedCountries, m as mapJpAddressSchemaToAddressLocalizations, a as mapJpAddressSummary } from "./mapJpAddressSchemaToAddressLocalizations-Btg-uZPu.js";
|
|
45
|
+
import { K as KEYBOARD_KEYS, M as Modal, a as ModalContent } from "./Modal-DvB1odWq.js";
|
|
46
|
+
import { L as LEGAL_COMPANY_NAME_FIELD, g as defaultFieldMetadataV4, h as defaultFieldMetadata$2, j as defaultFieldConfigV4, k as defaultFieldConfig$2 } from "./OnboardingDropinComponent-KKy3000L.js";
|
|
47
|
+
import { a as Alert } from "./Alert-Dz_jjJ1E.js";
|
|
48
|
+
import { C as Card } from "./Card-dFm_Z3TI.js";
|
|
49
|
+
import { b as mapAddressLocalizationToJpAddressSchema, a as mapApiScriptLocalizationToSchemaFields, m as mapSchemaFieldsToApiScriptLocalization } from "./mapAddressLocalizationToJpAddressSchema-vJWbpAyq.js";
|
|
43
50
|
import { f as formatObject, g as getProp } from "./utils-DNSfZiio.js";
|
|
44
51
|
import { f as formatCurrency } from "./formatCurrency-CMOSdJMB.js";
|
|
45
|
-
import { i as isValidationError, p as processValidationErrors, a as isMaintenanceModeError } from "./validationError-
|
|
46
|
-
import { i as isEmpty$1 } from "./isEmpty-
|
|
52
|
+
import { i as isValidationError, p as processValidationErrors, a as isMaintenanceModeError } from "./validationError-kAn6qx2R.js";
|
|
53
|
+
import { i as isEmpty$1 } from "./isEmpty-DWL1114W.js";
|
|
47
54
|
const clearCompanyData = async (legalEntityId, baseUrl) => {
|
|
48
55
|
return httpPost({
|
|
49
56
|
baseUrl,
|
|
@@ -86,6 +93,7 @@ const KNOWN_DISALLOWED_INDEX_DATASET_STATES = [
|
|
|
86
93
|
StateCodesUS.Illinois,
|
|
87
94
|
StateCodesUS.Texas
|
|
88
95
|
];
|
|
96
|
+
const KOMPANY_SEARCH_FAILURE = "Kompany index and deep search both failed to complete";
|
|
89
97
|
const useCompanySearch = (data, options) => {
|
|
90
98
|
const { rootLegalEntityId, baseUrl } = useApiContext();
|
|
91
99
|
return useQuery({
|
|
@@ -106,13 +114,15 @@ const useCompanySearch = (data, options) => {
|
|
|
106
114
|
});
|
|
107
115
|
};
|
|
108
116
|
const handleCompanySearch = async (rootLegalEntityId, baseUrl, data) => {
|
|
109
|
-
const
|
|
110
|
-
text
|
|
117
|
+
const getRequestPayload = (text) => ({
|
|
118
|
+
text,
|
|
111
119
|
country: data.country,
|
|
112
120
|
state: data.state,
|
|
113
121
|
limit: data.limit ?? 15
|
|
114
|
-
};
|
|
115
|
-
const
|
|
122
|
+
});
|
|
123
|
+
const nameSearchPayload = getRequestPayload(data.name);
|
|
124
|
+
const registrationSearchPayload = getRequestPayload(data.registrationNumber);
|
|
125
|
+
const searchRequest = async (requestPayload, path) => {
|
|
116
126
|
return httpPost(
|
|
117
127
|
{
|
|
118
128
|
baseUrl,
|
|
@@ -121,16 +131,20 @@ const handleCompanySearch = async (rootLegalEntityId, baseUrl, data) => {
|
|
|
121
131
|
requestPayload
|
|
122
132
|
);
|
|
123
133
|
};
|
|
124
|
-
const companyDeepSearch = async () => await searchRequest("deep");
|
|
125
|
-
const companyIndexSearch = async () => await searchRequest();
|
|
126
|
-
const companyRegistrationNumberDeepSearch = async () => await searchRequest("deepSearchByRegistrationNumber");
|
|
127
|
-
const companyRegistrationNumberIndexSearch = async () => await searchRequest("searchByRegistrationNumber");
|
|
134
|
+
const companyDeepSearch = async () => await searchRequest(nameSearchPayload, "deep");
|
|
135
|
+
const companyIndexSearch = async () => await searchRequest(nameSearchPayload);
|
|
136
|
+
const companyRegistrationNumberDeepSearch = async () => await searchRequest(registrationSearchPayload, "deepSearchByRegistrationNumber");
|
|
137
|
+
const companyRegistrationNumberIndexSearch = async () => await searchRequest(registrationSearchPayload, "searchByRegistrationNumber");
|
|
128
138
|
const primarySourceSearch = async (indexSearch, deepSearch) => {
|
|
129
139
|
let response;
|
|
130
140
|
try {
|
|
131
141
|
response = await deepSearch();
|
|
132
142
|
} catch {
|
|
133
|
-
|
|
143
|
+
try {
|
|
144
|
+
response = await indexSearch();
|
|
145
|
+
} catch {
|
|
146
|
+
throw new Error(KOMPANY_SEARCH_FAILURE);
|
|
147
|
+
}
|
|
134
148
|
}
|
|
135
149
|
return response;
|
|
136
150
|
};
|
|
@@ -301,12 +315,12 @@ function NumberOfEmployees({
|
|
|
301
315
|
) });
|
|
302
316
|
}
|
|
303
317
|
const financialInformationReportedValueOptions = "adyen-kyc-financial-information-reported-value-options";
|
|
304
|
-
const styles$
|
|
318
|
+
const styles$1 = {
|
|
305
319
|
financialInformationReportedValueOptions
|
|
306
320
|
};
|
|
307
321
|
const reportedValue = "adyen-kyc-reported-value";
|
|
308
322
|
const reportedValueInput = "adyen-kyc-reported-value-input";
|
|
309
|
-
const styles
|
|
323
|
+
const styles = {
|
|
310
324
|
reportedValue,
|
|
311
325
|
reportedValueInput
|
|
312
326
|
};
|
|
@@ -321,7 +335,7 @@ const ReportedValue = ({
|
|
|
321
335
|
isValid
|
|
322
336
|
}) => {
|
|
323
337
|
const { i18n } = useI18nContext();
|
|
324
|
-
return /* @__PURE__ */ jsx("div", { className: styles
|
|
338
|
+
return /* @__PURE__ */ jsx("div", { className: styles.reportedValue, children: /* @__PURE__ */ jsx(Field, { name: fieldName, errorMessage, isValid, helper, children: (childProps) => /* @__PURE__ */ jsx(
|
|
325
339
|
InputCurrency,
|
|
326
340
|
{
|
|
327
341
|
...childProps,
|
|
@@ -329,7 +343,7 @@ const ReportedValue = ({
|
|
|
329
343
|
currency,
|
|
330
344
|
amount,
|
|
331
345
|
onAmountChanged,
|
|
332
|
-
className: styles
|
|
346
|
+
className: styles.reportedValueInput,
|
|
333
347
|
"aria-label": label
|
|
334
348
|
}
|
|
335
349
|
) }) });
|
|
@@ -458,7 +472,7 @@ function FinancialInformation(props) {
|
|
|
458
472
|
handleChange("reportedValueOption")(newReportedValue);
|
|
459
473
|
};
|
|
460
474
|
return /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-company-financial-information", children: [
|
|
461
|
-
/* @__PURE__ */ jsx(
|
|
475
|
+
heading && /* @__PURE__ */ jsx(Header, { title: heading }),
|
|
462
476
|
country === CountryCodes.UnitedKingdom && /* @__PURE__ */ jsx(
|
|
463
477
|
NumberOfEmployees,
|
|
464
478
|
{
|
|
@@ -565,7 +579,7 @@ function FinancialInformation(props) {
|
|
|
565
579
|
],
|
|
566
580
|
onChange: updateReportedValueOption,
|
|
567
581
|
showContentOnlyOnSelected: true,
|
|
568
|
-
className: styles$
|
|
582
|
+
className: styles$1.financialInformationReportedValueOptions
|
|
569
583
|
}
|
|
570
584
|
)
|
|
571
585
|
}
|
|
@@ -871,14 +885,10 @@ const setIsBankAccountRequestedForOrganization = (hasRequest) => {
|
|
|
871
885
|
const tinMatched = signal(void 0);
|
|
872
886
|
const businessMismatchModalOpen = signal(false);
|
|
873
887
|
const verifiedBusiness = signal(void 0);
|
|
888
|
+
const isVerifiedSingleCompanySearchResult = signal(false);
|
|
874
889
|
const setVerifiedBusiness = (company) => {
|
|
875
890
|
verifiedBusiness.value = company;
|
|
876
891
|
};
|
|
877
|
-
const divider = "adyen-kyc-divider";
|
|
878
|
-
const styles = {
|
|
879
|
-
divider
|
|
880
|
-
};
|
|
881
|
-
const Divider = () => /* @__PURE__ */ jsx("hr", { className: styles.divider });
|
|
882
892
|
function VerifiedBusinessCard({
|
|
883
893
|
verifiedBusiness: verifiedBusiness2,
|
|
884
894
|
verifiedAddress
|
|
@@ -933,6 +943,9 @@ function VerifiedBusinessCard({
|
|
|
933
943
|
/* @__PURE__ */ jsx("div", { className: "adyen-kyc-verified-business-card__expand-button", children: /* @__PURE__ */ jsx(Button, { variant: "link", onClick: () => setExpanded(!expanded), children: expanded ? i18n.get("hideDetails") : i18n.get("showDetails") }) })
|
|
934
944
|
] });
|
|
935
945
|
}
|
|
946
|
+
const LazyJpAddress$1 = lazy(
|
|
947
|
+
async () => (await import("./JpAddress-BEKjE0bR.js")).JpAddress
|
|
948
|
+
);
|
|
936
949
|
const ADDITIONAL_INFORMATION_FORM_ID = "additionalInformation";
|
|
937
950
|
const ADDITIONAL_INFORMATION_FIELDS = [
|
|
938
951
|
...DBA_NAME_FIELD,
|
|
@@ -1216,7 +1229,7 @@ function AdditionalInformation({
|
|
|
1216
1229
|
text: addressToCheck,
|
|
1217
1230
|
country: formData?.registrationAddress?.country ?? country
|
|
1218
1231
|
},
|
|
1219
|
-
{ enabled: Boolean(addressToCheck) }
|
|
1232
|
+
{ enabled: Boolean(addressToCheck) && country !== CountryCodes.Japan }
|
|
1220
1233
|
);
|
|
1221
1234
|
const mustProvideOperationalAddress = cleansedRegistrationAddress?.poBox ?? false;
|
|
1222
1235
|
useEffect(
|
|
@@ -1286,7 +1299,7 @@ function AdditionalInformation({
|
|
|
1286
1299
|
return t(($) => $["youBusinessOfficalAddress"]);
|
|
1287
1300
|
}, [datasetUtils, formData?.registrationAddress?.country, i18n]);
|
|
1288
1301
|
return /* @__PURE__ */ jsxs("form", { id: ADDITIONAL_INFORMATION_FORM_ID, className: "adyen-kyc-additional-information", children: [
|
|
1289
|
-
/* @__PURE__ */ jsx(
|
|
1302
|
+
heading && /* @__PURE__ */ jsx(Header, { title: heading, description }),
|
|
1290
1303
|
/* @__PURE__ */ jsx(
|
|
1291
1304
|
ErrorPanel,
|
|
1292
1305
|
{
|
|
@@ -1539,7 +1552,16 @@ function AdditionalInformation({
|
|
|
1539
1552
|
/* @__PURE__ */ jsx(Typography, { el: "h3", variant: "title", children: t(($) => $["registeredBusinessAddress"]) }),
|
|
1540
1553
|
/* @__PURE__ */ jsx(Typography, { el: "p", variant: "body", children: registrationAddressDescription })
|
|
1541
1554
|
] }),
|
|
1542
|
-
/* @__PURE__ */ jsx(
|
|
1555
|
+
country === CountryCodes.Japan ? /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(Loader, {}), children: /* @__PURE__ */ jsx(
|
|
1556
|
+
LazyJpAddress$1,
|
|
1557
|
+
{
|
|
1558
|
+
id: ADDITIONAL_INFORMATION_FORM_ID,
|
|
1559
|
+
addressType: "registrationAddress",
|
|
1560
|
+
data: { ...mergedDefaultData?.registrationAddress, country },
|
|
1561
|
+
shouldValidate,
|
|
1562
|
+
onChange: handleRegistrationAddressChange
|
|
1563
|
+
}
|
|
1564
|
+
) }) : /* @__PURE__ */ jsx(
|
|
1543
1565
|
Address,
|
|
1544
1566
|
{
|
|
1545
1567
|
id: ADDITIONAL_INFORMATION_FORM_ID,
|
|
@@ -1548,7 +1570,9 @@ function AdditionalInformation({
|
|
|
1548
1570
|
...mergedDefaultData?.registrationAddress,
|
|
1549
1571
|
country
|
|
1550
1572
|
},
|
|
1551
|
-
labels: getAddressSchemaLabelsByCountry(
|
|
1573
|
+
labels: getAddressSchemaLabelsByCountry(
|
|
1574
|
+
data?.registrationAddress?.country ?? country
|
|
1575
|
+
),
|
|
1552
1576
|
requiredFields: addressSchema,
|
|
1553
1577
|
shouldValidate,
|
|
1554
1578
|
hideCountry: true,
|
|
@@ -1587,7 +1611,16 @@ function AdditionalInformation({
|
|
|
1587
1611
|
)
|
|
1588
1612
|
}
|
|
1589
1613
|
),
|
|
1590
|
-
formData.operationalAddressIsSame === operationalAddressIsSameIds.OPERATIONAL_ADDRESS_IS_NOT_SAME && /* @__PURE__ */ jsx(
|
|
1614
|
+
formData.operationalAddressIsSame === operationalAddressIsSameIds.OPERATIONAL_ADDRESS_IS_NOT_SAME && (country === CountryCodes.Japan ? /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(Loader, {}), children: /* @__PURE__ */ jsx(
|
|
1615
|
+
LazyJpAddress$1,
|
|
1616
|
+
{
|
|
1617
|
+
id: ADDITIONAL_INFORMATION_FORM_ID,
|
|
1618
|
+
addressType: "operationalAddress",
|
|
1619
|
+
data: { ...mergedDefaultData?.operationalAddress, country },
|
|
1620
|
+
shouldValidate,
|
|
1621
|
+
onChange: handleOperationalAddressChange
|
|
1622
|
+
}
|
|
1623
|
+
) }) : /* @__PURE__ */ jsx(
|
|
1591
1624
|
Address,
|
|
1592
1625
|
{
|
|
1593
1626
|
id: ADDITIONAL_INFORMATION_FORM_ID,
|
|
@@ -1596,7 +1629,9 @@ function AdditionalInformation({
|
|
|
1596
1629
|
...mergedDefaultData?.operationalAddress,
|
|
1597
1630
|
country
|
|
1598
1631
|
},
|
|
1599
|
-
labels: getAddressSchemaLabelsByCountry(
|
|
1632
|
+
labels: getAddressSchemaLabelsByCountry(
|
|
1633
|
+
data?.operationalAddress?.country ?? country
|
|
1634
|
+
),
|
|
1600
1635
|
requiredFields: addressSchema,
|
|
1601
1636
|
shouldValidate,
|
|
1602
1637
|
hideCountry: true,
|
|
@@ -1607,7 +1642,7 @@ function AdditionalInformation({
|
|
|
1607
1642
|
verifiedAddress: verifiedAddress?.operationalAddress,
|
|
1608
1643
|
condensed: true
|
|
1609
1644
|
}
|
|
1610
|
-
)
|
|
1645
|
+
))
|
|
1611
1646
|
] })
|
|
1612
1647
|
] })
|
|
1613
1648
|
] });
|
|
@@ -1620,7 +1655,7 @@ function useLegalCompanyNameField({
|
|
|
1620
1655
|
fieldProblems,
|
|
1621
1656
|
country,
|
|
1622
1657
|
formUtils,
|
|
1623
|
-
|
|
1658
|
+
handleChange
|
|
1624
1659
|
}) {
|
|
1625
1660
|
const fieldKeys = getFieldKeys(country);
|
|
1626
1661
|
const labels = formUtils.getFieldLabels(fieldKeys);
|
|
@@ -1628,6 +1663,14 @@ function useLegalCompanyNameField({
|
|
|
1628
1663
|
const helperTexts = formUtils.getFieldHelperText(fieldKeys, {
|
|
1629
1664
|
legalCompanyName: "legalCompanyName__helperText"
|
|
1630
1665
|
});
|
|
1666
|
+
const fieldsTransformInput = {
|
|
1667
|
+
jaHaniLegalCompanyName: (value) => toFullWidth(value),
|
|
1668
|
+
jaKanaLegalCompanyName: (value) => toFullWidth(value)
|
|
1669
|
+
};
|
|
1670
|
+
const fieldsTransformMode = {
|
|
1671
|
+
jaHaniLegalCompanyName: "blur",
|
|
1672
|
+
jaKanaLegalCompanyName: "blur"
|
|
1673
|
+
};
|
|
1631
1674
|
return fieldKeys.map((fieldKey) => {
|
|
1632
1675
|
const shouldShowField = formUtils.isRequiredField(fieldKey) || formUtils.isOptionalField(fieldKey);
|
|
1633
1676
|
if (shouldShowField) {
|
|
@@ -1635,13 +1678,15 @@ function useLegalCompanyNameField({
|
|
|
1635
1678
|
name: fieldKey,
|
|
1636
1679
|
value: data[fieldKey] ?? "",
|
|
1637
1680
|
readonly: formUtils.isReadOnly(fieldKey),
|
|
1638
|
-
onInput:
|
|
1639
|
-
onBlur:
|
|
1681
|
+
onInput: handleChange(fieldKey, "input"),
|
|
1682
|
+
onBlur: handleChange(fieldKey, "blur"),
|
|
1640
1683
|
isValid: valid[fieldKey],
|
|
1641
1684
|
errorMessage: fieldErrors[fieldKey],
|
|
1642
1685
|
label: labels[fieldKey],
|
|
1643
1686
|
helper: helperTexts[fieldKey],
|
|
1644
|
-
onKeyDown: handleKeyDown
|
|
1687
|
+
onKeyDown: handleKeyDown,
|
|
1688
|
+
transformInput: fieldsTransformInput[fieldKey],
|
|
1689
|
+
transformMode: fieldsTransformMode[fieldKey]
|
|
1645
1690
|
};
|
|
1646
1691
|
}
|
|
1647
1692
|
});
|
|
@@ -1772,7 +1817,7 @@ const defaultFieldConfig = {
|
|
|
1772
1817
|
})
|
|
1773
1818
|
};
|
|
1774
1819
|
function BusinessInformation({ fetching, selectedBusiness }) {
|
|
1775
|
-
const {
|
|
1820
|
+
const { t } = useTranslation(["common", "business"]);
|
|
1776
1821
|
const businessInformationClasses = cx("adyen-kyc-business-information", {
|
|
1777
1822
|
"adyen-kyc-business-information--fetching": fetching
|
|
1778
1823
|
});
|
|
@@ -1794,20 +1839,20 @@ function BusinessInformation({ fetching, selectedBusiness }) {
|
|
|
1794
1839
|
},
|
|
1795
1840
|
[
|
|
1796
1841
|
{
|
|
1797
|
-
term:
|
|
1842
|
+
term: t(($) => $["legalForm"], { ns: "common" }),
|
|
1798
1843
|
details: ""
|
|
1799
1844
|
},
|
|
1800
1845
|
{
|
|
1801
|
-
term:
|
|
1846
|
+
term: t(($) => $["legalCompanyName__US"], { ns: "common" }),
|
|
1802
1847
|
details: ""
|
|
1803
1848
|
},
|
|
1804
1849
|
{
|
|
1805
|
-
term:
|
|
1850
|
+
term: t(($) => $["address"], { ns: "common" }),
|
|
1806
1851
|
details: ""
|
|
1807
1852
|
}
|
|
1808
1853
|
]
|
|
1809
1854
|
).filter((item) => !!item.details) : [],
|
|
1810
|
-
[selectedBusiness,
|
|
1855
|
+
[selectedBusiness, t]
|
|
1811
1856
|
);
|
|
1812
1857
|
if (fetching) {
|
|
1813
1858
|
return /* @__PURE__ */ jsx("div", { className: businessInformationClasses, children: /* @__PURE__ */ jsx(Loader, { size: "large" }) });
|
|
@@ -1830,7 +1875,7 @@ function BusinessInformationCard({
|
|
|
1830
1875
|
handleConfirmSelection,
|
|
1831
1876
|
handleBackClick
|
|
1832
1877
|
}) {
|
|
1833
|
-
const {
|
|
1878
|
+
const { t } = useTranslation(["common", "business"]);
|
|
1834
1879
|
const excludeResultAsGovernmentEntity = useMemo(
|
|
1835
1880
|
() => isBankAccountRequestedForOrganization.value && currentBusinessSelection?.organizationType === "GOVERNMENTAL_ORGANIZATION",
|
|
1836
1881
|
[currentBusinessSelection]
|
|
@@ -1862,7 +1907,7 @@ function BusinessInformationCard({
|
|
|
1862
1907
|
onClick: () => handleConfirmSelection(currentBusinessSelection),
|
|
1863
1908
|
testId: "selectBusiness",
|
|
1864
1909
|
disabled: invalidTin,
|
|
1865
|
-
children:
|
|
1910
|
+
children: t(($) => $["thisIsMyBusiness"], { ns: "business" })
|
|
1866
1911
|
}
|
|
1867
1912
|
) : null,
|
|
1868
1913
|
onClick: () => handleSelectBusiness(result),
|
|
@@ -1874,8 +1919,8 @@ function BusinessInformationCard({
|
|
|
1874
1919
|
{
|
|
1875
1920
|
variant: "warning",
|
|
1876
1921
|
type: "callToAction",
|
|
1877
|
-
title:
|
|
1878
|
-
actions: /* @__PURE__ */ jsx(Button, { testId: "backBtn", onClick: handleGoBack, variant: "link", children:
|
|
1922
|
+
title: t(($) => $["businessSelection__invalidTin"], { ns: "business" }),
|
|
1923
|
+
actions: /* @__PURE__ */ jsx(Button, { testId: "backBtn", onClick: handleGoBack, variant: "link", children: t(($) => $["back"], { ns: "common" }) }),
|
|
1879
1924
|
testId: "invalidTin"
|
|
1880
1925
|
}
|
|
1881
1926
|
),
|
|
@@ -1884,14 +1929,14 @@ function BusinessInformationCard({
|
|
|
1884
1929
|
{
|
|
1885
1930
|
variant: "info",
|
|
1886
1931
|
type: "callToAction",
|
|
1887
|
-
title:
|
|
1932
|
+
title: t(($) => $["businessSelection__failedToLoad"], { ns: "business" }),
|
|
1888
1933
|
actions: /* @__PURE__ */ jsx(
|
|
1889
1934
|
Button,
|
|
1890
1935
|
{
|
|
1891
1936
|
testId: "reloadBusiness",
|
|
1892
1937
|
onClick: () => refetchCompanySelection(),
|
|
1893
1938
|
variant: "link",
|
|
1894
|
-
children:
|
|
1939
|
+
children: t(($) => $["tryAgain"], { ns: "common" })
|
|
1895
1940
|
}
|
|
1896
1941
|
),
|
|
1897
1942
|
testId: "failedToLoad"
|
|
@@ -1902,8 +1947,10 @@ function BusinessInformationCard({
|
|
|
1902
1947
|
{
|
|
1903
1948
|
variant: "info",
|
|
1904
1949
|
type: "callToAction",
|
|
1905
|
-
title:
|
|
1906
|
-
|
|
1950
|
+
title: t(($) => $["businessSelection__unableToOnboardGovernmentEntity"], {
|
|
1951
|
+
ns: "business"
|
|
1952
|
+
}),
|
|
1953
|
+
actions: /* @__PURE__ */ jsx(Button, { onClick: handleGoBack, variant: "link", children: t(($) => $["goBack"], { ns: "common" }) })
|
|
1907
1954
|
}
|
|
1908
1955
|
),
|
|
1909
1956
|
!fetchingError && !excludeResultAsGovernmentEntity && /* @__PURE__ */ jsx(BusinessInformation, { fetching, selectedBusiness: currentBusinessSelection })
|
|
@@ -1920,9 +1967,12 @@ function BusinessSelection({
|
|
|
1920
1967
|
setIsBusinessSelection,
|
|
1921
1968
|
setShowCompanyStructure
|
|
1922
1969
|
}) {
|
|
1923
|
-
const {
|
|
1970
|
+
const { t } = useTranslation(["common", "business"]);
|
|
1924
1971
|
const userEvents = useAnalyticsContext();
|
|
1925
1972
|
const { basicInformation } = useGlobalData();
|
|
1973
|
+
const {
|
|
1974
|
+
state: { currentState }
|
|
1975
|
+
} = useStateContext();
|
|
1926
1976
|
const [selectedBusinessId, setSelectedBusinessId] = useState();
|
|
1927
1977
|
const [fetchParams, setFetchParams] = useState();
|
|
1928
1978
|
const {
|
|
@@ -1939,7 +1989,7 @@ function BusinessSelection({
|
|
|
1939
1989
|
if (businessData?.tinMatched === true && !verifiedBusiness.value) {
|
|
1940
1990
|
userEvents.addPageEvent("Success", {
|
|
1941
1991
|
actionType: "select",
|
|
1942
|
-
|
|
1992
|
+
returnValue: "companySelection"
|
|
1943
1993
|
});
|
|
1944
1994
|
if (!businessData?.legalForm) {
|
|
1945
1995
|
setShowCompanyStructure(true);
|
|
@@ -1962,7 +2012,10 @@ function BusinessSelection({
|
|
|
1962
2012
|
if ((!selectedBusinessId || selectedBusinessId !== result.id) && currentTin) {
|
|
1963
2013
|
userEvents.addPageEvent("Clicked button", {
|
|
1964
2014
|
actionType: "select",
|
|
1965
|
-
label: "selectBusiness"
|
|
2015
|
+
label: "selectBusiness",
|
|
2016
|
+
additionalData: {
|
|
2017
|
+
companyIdx: searchResults?.findIndex((searchResult) => searchResult.id === result.id)
|
|
2018
|
+
}
|
|
1966
2019
|
});
|
|
1967
2020
|
setSelectedBusinessId(result.id);
|
|
1968
2021
|
setFetchParams({
|
|
@@ -1973,7 +2026,7 @@ function BusinessSelection({
|
|
|
1973
2026
|
});
|
|
1974
2027
|
}
|
|
1975
2028
|
},
|
|
1976
|
-
[basicInformation?.stateOrProvince, selectedBusinessId, currentTin, userEvents]
|
|
2029
|
+
[searchResults, basicInformation?.stateOrProvince, selectedBusinessId, currentTin, userEvents]
|
|
1977
2030
|
);
|
|
1978
2031
|
const handleConfirmSelection = async () => {
|
|
1979
2032
|
handleNextClick();
|
|
@@ -1985,12 +2038,23 @@ function BusinessSelection({
|
|
|
1985
2038
|
const loaderClasses = cx("adyen-kyc-business-selection__loader", {
|
|
1986
2039
|
"adyen-kyc-business-selection__loader--hide": !showLoader
|
|
1987
2040
|
});
|
|
2041
|
+
if (searchResults?.length) {
|
|
2042
|
+
const idxNameMatch = searchResults.findIndex(
|
|
2043
|
+
(result) => isNormalizedStringMatch(
|
|
2044
|
+
currentState?.data?.basicInformation?.legalCompanyName || "",
|
|
2045
|
+
result.name
|
|
2046
|
+
)
|
|
2047
|
+
);
|
|
2048
|
+
if (idxNameMatch > -1) {
|
|
2049
|
+
searchResults.unshift(searchResults.splice(idxNameMatch, 1)[0]);
|
|
2050
|
+
}
|
|
2051
|
+
}
|
|
1988
2052
|
if (searchResults?.length && !showCompanyStructure || showLoader) {
|
|
1989
2053
|
return /* @__PURE__ */ jsxs("div", { className: businessSelectionClasses, children: [
|
|
1990
2054
|
/* @__PURE__ */ jsx("div", { className: loaderClasses, "data-testId": "business-selection-loader", children: /* @__PURE__ */ jsx(Loader, { size: "large" }) }),
|
|
1991
2055
|
!!(searchResults?.length && !showCompanyStructure && !showLoader) && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1992
|
-
/* @__PURE__ */ jsx(
|
|
1993
|
-
/* @__PURE__ */ jsx(
|
|
2056
|
+
/* @__PURE__ */ jsx(Header, { title: t(($) => $["businessSelectionFormHeading"], { ns: "common" }) }),
|
|
2057
|
+
/* @__PURE__ */ jsx(StackLayout, { children: searchResults?.map((result) => /* @__PURE__ */ jsx(
|
|
1994
2058
|
BusinessInformationCard,
|
|
1995
2059
|
{
|
|
1996
2060
|
result,
|
|
@@ -2013,8 +2077,8 @@ function BusinessSelection({
|
|
|
2013
2077
|
color: "secondary",
|
|
2014
2078
|
className: "adyen-kyc-business-selection__footer",
|
|
2015
2079
|
children: [
|
|
2016
|
-
|
|
2017
|
-
/* @__PURE__ */ jsx(Button, { variant: "link", onClick: proceedToManualDataEntry, testId: "manualDataEntry", children:
|
|
2080
|
+
t(($) => $["businessSelection__footer"], { ns: "business" }),
|
|
2081
|
+
/* @__PURE__ */ jsx(Button, { variant: "link", onClick: proceedToManualDataEntry, testId: "manualDataEntry", children: t(($) => $["businessSelection__footerButton"], { ns: "business" }) })
|
|
2018
2082
|
]
|
|
2019
2083
|
}
|
|
2020
2084
|
)
|
|
@@ -2287,20 +2351,7 @@ function BasicInformation({
|
|
|
2287
2351
|
fieldProblems: formFieldProblems,
|
|
2288
2352
|
country,
|
|
2289
2353
|
formUtils,
|
|
2290
|
-
|
|
2291
|
-
jaHaniLegalCompanyName: {
|
|
2292
|
-
onInput: handleChangeFor("jaHaniLegalCompanyName", "input"),
|
|
2293
|
-
onBlur: handleChangeFor("jaHaniLegalCompanyName", "blur")
|
|
2294
|
-
},
|
|
2295
|
-
jaKanaLegalCompanyName: {
|
|
2296
|
-
onInput: handleChangeFor("jaKanaLegalCompanyName", "input"),
|
|
2297
|
-
onBlur: handleChangeFor("jaKanaLegalCompanyName", "blur")
|
|
2298
|
-
},
|
|
2299
|
-
legalCompanyName: {
|
|
2300
|
-
onInput: handleChangeFor("legalCompanyName", "input"),
|
|
2301
|
-
onBlur: handleChangeFor("legalCompanyName", "blur")
|
|
2302
|
-
}
|
|
2303
|
-
}
|
|
2354
|
+
handleChange: handleChangeFor
|
|
2304
2355
|
});
|
|
2305
2356
|
if (showBusinessSelection) {
|
|
2306
2357
|
return /* @__PURE__ */ jsx(
|
|
@@ -2317,7 +2368,7 @@ function BasicInformation({
|
|
|
2317
2368
|
);
|
|
2318
2369
|
}
|
|
2319
2370
|
return /* @__PURE__ */ jsxs("form", { id: BASIC_INFORMATION_FORM_ID, className: classNames, children: [
|
|
2320
|
-
/* @__PURE__ */ jsx(
|
|
2371
|
+
heading && /* @__PURE__ */ jsx(Header, { title: heading, children: /* @__PURE__ */ jsxs("template", { slot: "description", children: [
|
|
2321
2372
|
description,
|
|
2322
2373
|
" ",
|
|
2323
2374
|
/* @__PURE__ */ jsx(Link, { href: "https://www.adyen.com/privacy-policy", external: true, children: t(($) => $["privacyStatement"]) })
|
|
@@ -2382,6 +2433,8 @@ function BasicInformation({
|
|
|
2382
2433
|
readonly: field?.readonly,
|
|
2383
2434
|
onInput: field ? field.onInput : () => {
|
|
2384
2435
|
},
|
|
2436
|
+
transformInput: field?.transformInput,
|
|
2437
|
+
transformMode: field?.transformMode,
|
|
2385
2438
|
onBlur: field?.onBlur,
|
|
2386
2439
|
onKeyDown: field?.onKeyDown
|
|
2387
2440
|
}
|
|
@@ -2552,7 +2605,7 @@ function CompanyStructure({
|
|
|
2552
2605
|
showCompanyStructure,
|
|
2553
2606
|
shouldValidate
|
|
2554
2607
|
}) {
|
|
2555
|
-
const { t } = useTranslation("common");
|
|
2608
|
+
const { t } = useTranslation(["common", "business"]);
|
|
2556
2609
|
const { isExperimentEnabled } = useExperimentsContext();
|
|
2557
2610
|
const { accountHolder } = useAccountHolder();
|
|
2558
2611
|
const { isSettingEnabled } = useSettingsContext();
|
|
@@ -2616,7 +2669,7 @@ function CompanyStructure({
|
|
|
2616
2669
|
const companyTypeRadioOptions = canChangeEntityType && accountHolder !== "aTrust" ? companyTypeOptions.filter((companyType) => !excludedTypes.includes(companyType)) : companyTypeOptions;
|
|
2617
2670
|
const companyTypeExamples2 = useCompanyTypeExamples(country);
|
|
2618
2671
|
return /* @__PURE__ */ jsxs("form", { children: [
|
|
2619
|
-
/* @__PURE__ */ jsx(
|
|
2672
|
+
heading && /* @__PURE__ */ jsx(Header, { title: heading, description }),
|
|
2620
2673
|
/* @__PURE__ */ jsx(
|
|
2621
2674
|
ErrorPanel,
|
|
2622
2675
|
{
|
|
@@ -2641,8 +2694,8 @@ function CompanyStructure({
|
|
|
2641
2694
|
name: "entityType",
|
|
2642
2695
|
options: companyTypeRadioOptions,
|
|
2643
2696
|
optionId: (option) => companyTypeMetadata[option].id,
|
|
2644
|
-
optionName: (option) => companyTypeMetadata[option].name,
|
|
2645
|
-
optionDescription: (option) => companyTypeMetadata[option].description,
|
|
2697
|
+
optionName: (option) => t(($) => $[companyTypeMetadata[option].name], { ns: "business" }),
|
|
2698
|
+
optionDescription: (option) => t(($) => $[companyTypeMetadata[option].description], { ns: "business" }),
|
|
2646
2699
|
selected: formData.entityType,
|
|
2647
2700
|
onSelect: handleChangeFor("entityType"),
|
|
2648
2701
|
examples: companyTypeExamples2,
|
|
@@ -2659,13 +2712,13 @@ const documentTypes$2 = [
|
|
|
2659
2712
|
{ id: "Business registry statement", name: "businessRegistryStatement" }
|
|
2660
2713
|
];
|
|
2661
2714
|
const GuidanceContent$4 = () => {
|
|
2662
|
-
const {
|
|
2715
|
+
const { t } = useTranslation(["common", "business"]);
|
|
2663
2716
|
return /* @__PURE__ */ jsx("div", { className: "adyen-kyc-upload-field__guidance", children: /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-u-margin-bottom-24", children: [
|
|
2664
|
-
/* @__PURE__ */ jsx("strong", { children:
|
|
2717
|
+
/* @__PURE__ */ jsx("strong", { children: t(($) => $["documentRequirements"], { ns: "common" }) }),
|
|
2665
2718
|
/* @__PURE__ */ jsxs("ul", { children: [
|
|
2666
|
-
/* @__PURE__ */ jsx("li", { children:
|
|
2667
|
-
/* @__PURE__ */ jsx("li", { children:
|
|
2668
|
-
/* @__PURE__ */ jsx("li", { children:
|
|
2719
|
+
/* @__PURE__ */ jsx("li", { children: t(($) => $["includesTheDirectorsFullName"], { ns: "business" }) }),
|
|
2720
|
+
/* @__PURE__ */ jsx("li", { children: t(($) => $["includesEvidenceOfTheIndividualsRole"], { ns: "business" }) }),
|
|
2721
|
+
/* @__PURE__ */ jsx("li", { children: t(($) => $["issuedOrSignedByALegalRepresentative"], { ns: "business" }) })
|
|
2669
2722
|
] })
|
|
2670
2723
|
] }) });
|
|
2671
2724
|
};
|
|
@@ -2676,15 +2729,15 @@ function ProofOfDirectorDocument({
|
|
|
2676
2729
|
description = "weNeedAnOfficialDocument",
|
|
2677
2730
|
...props
|
|
2678
2731
|
}) {
|
|
2679
|
-
const {
|
|
2732
|
+
const { t } = useTranslation("common");
|
|
2680
2733
|
const [selectedDocumentName, setSelectedDocumentName] = useState(documentTypes$2[0].id);
|
|
2681
2734
|
return /* @__PURE__ */ jsx(
|
|
2682
2735
|
MemoizedDocumentUpload,
|
|
2683
2736
|
{
|
|
2684
2737
|
...props,
|
|
2685
2738
|
id,
|
|
2686
|
-
heading:
|
|
2687
|
-
description:
|
|
2739
|
+
heading: t(($) => $[heading]),
|
|
2740
|
+
description: t(($) => $[description]),
|
|
2688
2741
|
documentField: "proofOfDirector",
|
|
2689
2742
|
documentType: "proofOfDirector",
|
|
2690
2743
|
guidanceContent: /* @__PURE__ */ jsx(GuidanceContent$4, {}),
|
|
@@ -2707,27 +2760,40 @@ const documentTypes$1 = [
|
|
|
2707
2760
|
}
|
|
2708
2761
|
];
|
|
2709
2762
|
const GuidanceContent$3 = ({ selectedDocumentName }) => {
|
|
2710
|
-
const {
|
|
2763
|
+
const { t } = useTranslation(["common", "business"]);
|
|
2711
2764
|
const [showGuidanceModal, setShowGuidanceModal] = useState(false);
|
|
2712
2765
|
return /* @__PURE__ */ jsx("div", { className: "adyen-kyc-upload-field__guidance", children: /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-u-margin-bottom-24", children: [
|
|
2713
|
-
/* @__PURE__ */ jsx("strong", { children:
|
|
2766
|
+
/* @__PURE__ */ jsx("strong", { children: t(($) => $["documentRequirements"], { ns: "common" }) }),
|
|
2714
2767
|
selectedDocumentName === "Certified Organizational chart" ? /* @__PURE__ */ jsxs("ul", { children: [
|
|
2715
|
-
/* @__PURE__ */ jsx("li", { children:
|
|
2716
|
-
/* @__PURE__ */ jsx("li", { children:
|
|
2717
|
-
|
|
2768
|
+
/* @__PURE__ */ jsx("li", { children: t(($) => $["showsOwnershipAndControllingRelations"], { ns: "business" }) }),
|
|
2769
|
+
/* @__PURE__ */ jsx("li", { children: t(($) => $["entitiesMustIncludeANameLegalStructureAndCountryRegionOfRegistration"], {
|
|
2770
|
+
ns: "business"
|
|
2771
|
+
}) }),
|
|
2772
|
+
/* @__PURE__ */ jsx("li", { children: t(($) => $["signedByALawyerAccountantAuditorWithinTheLast6Months"], {
|
|
2773
|
+
ns: "business"
|
|
2774
|
+
}) })
|
|
2718
2775
|
] }) : /* @__PURE__ */ jsxs("ul", { children: [
|
|
2719
|
-
/* @__PURE__ */ jsx("li", { children:
|
|
2776
|
+
/* @__PURE__ */ jsx("li", { children: t(($) => $["oneOrganizationalChartShowingOwnershipAndControllingRelations"], {
|
|
2777
|
+
ns: "business"
|
|
2778
|
+
}) }),
|
|
2720
2779
|
/* @__PURE__ */ jsxs("ul", { children: [
|
|
2721
|
-
/* @__PURE__ */ jsx("li", { children:
|
|
2780
|
+
/* @__PURE__ */ jsx("li", { children: t(
|
|
2781
|
+
($) => $["entitiesMustIncludeANameLegalStructureAndCountryRegionOfRegistration"],
|
|
2782
|
+
{
|
|
2783
|
+
ns: "business"
|
|
2784
|
+
}
|
|
2785
|
+
) }),
|
|
2722
2786
|
/* @__PURE__ */ jsxs("li", { children: [
|
|
2723
2787
|
/* @__PURE__ */ jsxs("span", { children: [
|
|
2724
|
-
|
|
2788
|
+
t(($) => $["one"]),
|
|
2725
2789
|
" "
|
|
2726
2790
|
] }),
|
|
2727
|
-
/* @__PURE__ */ jsx(Button, { onClick: () => setShowGuidanceModal(true), variant: "link", children:
|
|
2791
|
+
/* @__PURE__ */ jsx(Button, { onClick: () => setShowGuidanceModal(true), variant: "link", children: t(($) => $["supportingDocument"], { ns: "common" }) }),
|
|
2728
2792
|
/* @__PURE__ */ jsxs("span", { children: [
|
|
2729
2793
|
" ",
|
|
2730
|
-
|
|
2794
|
+
t(($) => $["describingTheOrganizationAndItsUBOSignedWithinTheLast6Months"], {
|
|
2795
|
+
ns: "business"
|
|
2796
|
+
})
|
|
2731
2797
|
] })
|
|
2732
2798
|
] })
|
|
2733
2799
|
] })
|
|
@@ -2737,7 +2803,7 @@ const GuidanceContent$3 = ({ selectedDocumentName }) => {
|
|
|
2737
2803
|
{
|
|
2738
2804
|
size: "small",
|
|
2739
2805
|
onClose: () => setShowGuidanceModal(false),
|
|
2740
|
-
ariaLabel:
|
|
2806
|
+
ariaLabel: t(($) => $["whichDocumentsQualifyToProveOwnership"], { ns: "business" }),
|
|
2741
2807
|
children: /* @__PURE__ */ jsxs(ModalContent, { children: [
|
|
2742
2808
|
/* @__PURE__ */ jsx(
|
|
2743
2809
|
Typography,
|
|
@@ -2745,24 +2811,24 @@ const GuidanceContent$3 = ({ selectedDocumentName }) => {
|
|
|
2745
2811
|
el: "h1",
|
|
2746
2812
|
variant: "title-l",
|
|
2747
2813
|
className: "adyen-kyc-u-margin-bottom-32 adyen-kyc-u-margin-top-32",
|
|
2748
|
-
children:
|
|
2814
|
+
children: t(($) => $["whichDocumentsQualifyToProveOwnership"], { ns: "business" })
|
|
2749
2815
|
}
|
|
2750
2816
|
),
|
|
2751
|
-
/* @__PURE__ */ jsx(Typography, { el: "p", variant: "body", children:
|
|
2817
|
+
/* @__PURE__ */ jsx(Typography, { el: "p", variant: "body", children: t(($) => $["theDocumentsWeCanAcceptToProveOwnershipAre"], { ns: "business" }) }),
|
|
2752
2818
|
/* @__PURE__ */ jsxs("ul", { children: [
|
|
2753
|
-
/* @__PURE__ */ jsx("li", { children:
|
|
2754
|
-
/* @__PURE__ */ jsx("li", { children:
|
|
2755
|
-
/* @__PURE__ */ jsx("li", { children:
|
|
2756
|
-
/* @__PURE__ */ jsx("li", { children:
|
|
2757
|
-
/* @__PURE__ */ jsx("li", { children:
|
|
2758
|
-
/* @__PURE__ */ jsx("li", { children:
|
|
2759
|
-
/* @__PURE__ */ jsx("li", { children:
|
|
2760
|
-
/* @__PURE__ */ jsx("li", { children:
|
|
2761
|
-
/* @__PURE__ */ jsx("li", { children:
|
|
2762
|
-
/* @__PURE__ */ jsx("li", { children:
|
|
2763
|
-
/* @__PURE__ */ jsx("li", { children:
|
|
2764
|
-
/* @__PURE__ */ jsx("li", { children:
|
|
2765
|
-
/* @__PURE__ */ jsx("li", { children:
|
|
2819
|
+
/* @__PURE__ */ jsx("li", { children: t(($) => $["securitiesRegister"], { ns: "business" }) }),
|
|
2820
|
+
/* @__PURE__ */ jsx("li", { children: t(($) => $["shareholderRegister"], { ns: "business" }) }),
|
|
2821
|
+
/* @__PURE__ */ jsx("li", { children: t(($) => $["ultimateBeneficialOwnerRegister"], { ns: "business" }) }),
|
|
2822
|
+
/* @__PURE__ */ jsx("li", { children: t(($) => $["articlesOfIncorporation"], { ns: "business" }) }),
|
|
2823
|
+
/* @__PURE__ */ jsx("li", { children: t(($) => $["annualReports"], { ns: "business" }) }),
|
|
2824
|
+
/* @__PURE__ */ jsx("li", { children: t(($) => $["annualReturns"], { ns: "business" }) }),
|
|
2825
|
+
/* @__PURE__ */ jsx("li", { children: t(($) => $["certificateOfCorporateStatus"], { ns: "business" }) }),
|
|
2826
|
+
/* @__PURE__ */ jsx("li", { children: t(($) => $["shareholderAgreements"], { ns: "business" }) }),
|
|
2827
|
+
/* @__PURE__ */ jsx("li", { children: t(($) => $["assignmentAgreements"], { ns: "business" }) }),
|
|
2828
|
+
/* @__PURE__ */ jsx("li", { children: t(($) => $["partnershipAgreements"], { ns: "business" }) }),
|
|
2829
|
+
/* @__PURE__ */ jsx("li", { children: t(($) => $["boardOfDirectorsMeetingRecords"], { ns: "business" }) }),
|
|
2830
|
+
/* @__PURE__ */ jsx("li", { children: t(($) => $["registrationDocument"], { ns: "business" }) }),
|
|
2831
|
+
/* @__PURE__ */ jsx("li", { children: t(($) => $["certificateOfIncumbency"], { ns: "business" }) })
|
|
2766
2832
|
] })
|
|
2767
2833
|
] })
|
|
2768
2834
|
}
|
|
@@ -2776,7 +2842,7 @@ function ProofOfOwnershipDocument({
|
|
|
2776
2842
|
description = "weNeedAnOfficialDocumentForOwnership",
|
|
2777
2843
|
...props
|
|
2778
2844
|
}) {
|
|
2779
|
-
const {
|
|
2845
|
+
const { t } = useTranslation(["common", "business"]);
|
|
2780
2846
|
const [selectedDocumentName, setSelectedDocumentName] = useState(documentTypes$1[0].id);
|
|
2781
2847
|
const supportsMultiple = selectedDocumentName === DOC_TYPE_FOR_MULTI_UPLOAD;
|
|
2782
2848
|
useEffect(() => {
|
|
@@ -2789,13 +2855,13 @@ function ProofOfOwnershipDocument({
|
|
|
2789
2855
|
{
|
|
2790
2856
|
...props,
|
|
2791
2857
|
id,
|
|
2792
|
-
heading:
|
|
2793
|
-
description:
|
|
2858
|
+
heading: t(($) => $[heading]),
|
|
2859
|
+
description: t(($) => $[description]),
|
|
2794
2860
|
documentField: "proofOfOwnership",
|
|
2795
2861
|
documentType: "proofOfOwnership",
|
|
2796
2862
|
guidanceContent: /* @__PURE__ */ jsx(GuidanceContent$3, { selectedDocumentName }),
|
|
2797
2863
|
country,
|
|
2798
|
-
label:
|
|
2864
|
+
label: t(($) => $["uploadYourDocuments"], { ns: "business" }),
|
|
2799
2865
|
documentTypeSelect: {
|
|
2800
2866
|
selectedType: selectedDocumentName,
|
|
2801
2867
|
setSelectedType: setSelectedDocumentName,
|
|
@@ -2804,7 +2870,7 @@ function ProofOfOwnershipDocument({
|
|
|
2804
2870
|
hidePageCount: true,
|
|
2805
2871
|
supportsMultipleUploads: supportsMultiple,
|
|
2806
2872
|
maxNumberOfFiles: supportsMultiple ? 2 : 1,
|
|
2807
|
-
extraDropzoneDescription: supportsMultiple ?
|
|
2873
|
+
extraDropzoneDescription: supportsMultiple ? t(($) => $["oneOrganizationalChartAndOneSupportingDocument"], { ns: "business" }) : void 0
|
|
2808
2874
|
}
|
|
2809
2875
|
);
|
|
2810
2876
|
}
|
|
@@ -2813,13 +2879,13 @@ const documentTypes = [
|
|
|
2813
2879
|
{ id: "Internal company document", name: "internalCompanyDocument" }
|
|
2814
2880
|
];
|
|
2815
2881
|
const GuidanceContent$2 = () => {
|
|
2816
|
-
const {
|
|
2882
|
+
const { t } = useTranslation(["common", "business"]);
|
|
2817
2883
|
return /* @__PURE__ */ jsx("div", { className: "adyen-kyc-upload-field__guidance", children: /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-u-margin-bottom-24", children: [
|
|
2818
|
-
/* @__PURE__ */ jsx("strong", { children:
|
|
2884
|
+
/* @__PURE__ */ jsx("strong", { children: t(($) => $["documentRequirements"], { ns: "common" }) }),
|
|
2819
2885
|
/* @__PURE__ */ jsxs("ul", { children: [
|
|
2820
|
-
/* @__PURE__ */ jsx("li", { children:
|
|
2821
|
-
/* @__PURE__ */ jsx("li", { children:
|
|
2822
|
-
/* @__PURE__ */ jsx("li", { children:
|
|
2886
|
+
/* @__PURE__ */ jsx("li", { children: t(($) => $["includesTheSignatorysFullName"], { ns: "business" }) }),
|
|
2887
|
+
/* @__PURE__ */ jsx("li", { children: t(($) => $["includesEvidenceOfTheIndividualsRoleSignatory"], { ns: "business" }) }),
|
|
2888
|
+
/* @__PURE__ */ jsx("li", { children: t(($) => $["issuedOrSignedByALegalRepresentative"], { ns: "business" }) })
|
|
2823
2889
|
] })
|
|
2824
2890
|
] }) });
|
|
2825
2891
|
};
|
|
@@ -2830,15 +2896,15 @@ function ProofOfSignatoryDocument({
|
|
|
2830
2896
|
description = "weNeedAnOfficialDocumentSignatory",
|
|
2831
2897
|
...props
|
|
2832
2898
|
}) {
|
|
2833
|
-
const {
|
|
2899
|
+
const { t } = useTranslation("common");
|
|
2834
2900
|
const [selectedDocumentName, setSelectedDocumentName] = useState(documentTypes[0].id);
|
|
2835
2901
|
return /* @__PURE__ */ jsx(
|
|
2836
2902
|
MemoizedDocumentUpload,
|
|
2837
2903
|
{
|
|
2838
2904
|
...props,
|
|
2839
2905
|
id,
|
|
2840
|
-
heading:
|
|
2841
|
-
description:
|
|
2906
|
+
heading: t(($) => $[heading]),
|
|
2907
|
+
description: t(($) => $[description]),
|
|
2842
2908
|
documentField: "proofOfSignatory",
|
|
2843
2909
|
documentType: "proofOfSignatory",
|
|
2844
2910
|
guidanceContent: /* @__PURE__ */ jsx(GuidanceContent$2, {}),
|
|
@@ -2925,23 +2991,20 @@ const GuidanceContent$1 = ({
|
|
|
2925
2991
|
country,
|
|
2926
2992
|
companyType
|
|
2927
2993
|
}) => {
|
|
2928
|
-
const {
|
|
2994
|
+
const { t } = useTranslation(["common", "business"]);
|
|
2929
2995
|
const acceptedDocGuidance = ACCEPTED_DOCUMENTS_MAP$1[country]?.[companyType];
|
|
2930
2996
|
return /* @__PURE__ */ jsx("div", { className: "adyen-kyc-upload-field__guidance", children: country === "US" ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2931
2997
|
acceptedDocGuidance && /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-u-margin-bottom-24", children: [
|
|
2932
|
-
/* @__PURE__ */ jsx("strong", { children:
|
|
2933
|
-
/* @__PURE__ */ jsx("ul", { children: acceptedDocGuidance.documents.map((document, i) => /* @__PURE__ */ jsx("li", { children:
|
|
2998
|
+
/* @__PURE__ */ jsx("strong", { children: t(($) => $[acceptedDocGuidance.header], { ns: "business" }) }),
|
|
2999
|
+
/* @__PURE__ */ jsx("ul", { children: acceptedDocGuidance.documents.map((document, i) => /* @__PURE__ */ jsx("li", { children: t(($) => $[document], { ns: "business" }) }, i)) })
|
|
2934
3000
|
] }),
|
|
2935
3001
|
/* @__PURE__ */ jsxs("div", { className: "adyen-kyc-u-margin-bottom-24", children: [
|
|
2936
|
-
/* @__PURE__ */ jsx("strong", { children:
|
|
2937
|
-
/* @__PURE__ */ jsx("ul", { children: /* @__PURE__ */ jsx("li", { children:
|
|
3002
|
+
/* @__PURE__ */ jsx("strong", { children: t(($) => $["documentRequirements"], { ns: "common" }) }),
|
|
3003
|
+
/* @__PURE__ */ jsx("ul", { children: /* @__PURE__ */ jsx("li", { children: t(($) => $["includesLegalCompanyName"], { ns: "business" }) }) })
|
|
2938
3004
|
] })
|
|
2939
3005
|
] }) : /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-u-margin-bottom-24", children: [
|
|
2940
|
-
/* @__PURE__ */
|
|
2941
|
-
|
|
2942
|
-
i18n.get("documentRequirements")
|
|
2943
|
-
] }),
|
|
2944
|
-
/* @__PURE__ */ jsx("ul", { children: /* @__PURE__ */ jsx("li", { children: i18n.get("documentIssuedByGovernmentAuthority") }) })
|
|
3006
|
+
/* @__PURE__ */ jsx("strong", { children: t(($) => $["documentRequirements"], { ns: "common" }) }),
|
|
3007
|
+
/* @__PURE__ */ jsx("ul", { children: /* @__PURE__ */ jsx("li", { children: t(($) => $["documentIssuedByGovernmentAuthority"], { ns: "business" }) }) })
|
|
2945
3008
|
] }) });
|
|
2946
3009
|
};
|
|
2947
3010
|
function RegistrationDocument({
|
|
@@ -2952,14 +3015,14 @@ function RegistrationDocument({
|
|
|
2952
3015
|
description = "companyRegistrationDocumentFormDescription",
|
|
2953
3016
|
...props
|
|
2954
3017
|
}) {
|
|
2955
|
-
const {
|
|
3018
|
+
const { t } = useTranslation("common");
|
|
2956
3019
|
return /* @__PURE__ */ jsx(
|
|
2957
3020
|
MemoizedDocumentUpload,
|
|
2958
3021
|
{
|
|
2959
3022
|
...props,
|
|
2960
3023
|
id,
|
|
2961
|
-
heading:
|
|
2962
|
-
description:
|
|
3024
|
+
heading: t(($) => $[heading]),
|
|
3025
|
+
description: t(($) => $[description]),
|
|
2963
3026
|
documentField: "registrationDocument",
|
|
2964
3027
|
documentType: "registrationDocument",
|
|
2965
3028
|
guidanceContent: /* @__PURE__ */ jsx(GuidanceContent$1, { country, companyType }),
|
|
@@ -3020,26 +3083,26 @@ const GuidanceContent = ({
|
|
|
3020
3083
|
country,
|
|
3021
3084
|
companyType
|
|
3022
3085
|
}) => {
|
|
3023
|
-
const {
|
|
3086
|
+
const { t } = useTranslation(["common", "business"]);
|
|
3024
3087
|
const acceptedDocGuidance = ACCEPTED_DOCUMENTS_MAP[country]?.[companyType];
|
|
3025
3088
|
return /* @__PURE__ */ jsx("div", { className: "adyen-kyc-upload-field__guidance", children: country === "US" ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
3026
3089
|
acceptedDocGuidance && /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-u-margin-bottom-24", children: [
|
|
3027
|
-
/* @__PURE__ */ jsx("strong", { children:
|
|
3028
|
-
/* @__PURE__ */ jsx("ul", { children: acceptedDocGuidance.documents.map((document, i) => /* @__PURE__ */ jsx("li", { children:
|
|
3090
|
+
/* @__PURE__ */ jsx("strong", { children: t(($) => $[acceptedDocGuidance.header], { ns: "business" }) }),
|
|
3091
|
+
/* @__PURE__ */ jsx("ul", { children: acceptedDocGuidance.documents.map((document, i) => /* @__PURE__ */ jsx("li", { children: t(($) => $[document], { ns: "business" }) }, i)) })
|
|
3029
3092
|
] }),
|
|
3030
3093
|
/* @__PURE__ */ jsxs("div", { className: "adyen-kyc-u-margin-bottom-24", children: [
|
|
3031
|
-
/* @__PURE__ */ jsx("strong", { children:
|
|
3094
|
+
/* @__PURE__ */ jsx("strong", { children: t(($) => $["documentRequirements"], { ns: "common" }) }),
|
|
3032
3095
|
/* @__PURE__ */ jsxs("ul", { children: [
|
|
3033
|
-
/* @__PURE__ */ jsx("li", { children:
|
|
3034
|
-
/* @__PURE__ */ jsx("li", { children:
|
|
3096
|
+
/* @__PURE__ */ jsx("li", { children: t(($) => $["includesLegalCompanyName"], { ns: "business" }) }),
|
|
3097
|
+
/* @__PURE__ */ jsx("li", { children: t(($) => $["includesEIN"], { ns: "business" }) })
|
|
3035
3098
|
] })
|
|
3036
3099
|
] })
|
|
3037
3100
|
] }) : /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-u-margin-bottom-24", children: [
|
|
3038
|
-
/* @__PURE__ */ jsx("div", { className: "adyen-kyc-upload-field__subtitle", children:
|
|
3101
|
+
/* @__PURE__ */ jsx("div", { className: "adyen-kyc-upload-field__subtitle", children: t(($) => $["documentRequirements"], { ns: "common" }) }),
|
|
3039
3102
|
/* @__PURE__ */ jsxs("ul", { children: [
|
|
3040
|
-
/* @__PURE__ */ jsx("li", { children:
|
|
3041
|
-
/* @__PURE__ */ jsx("li", { children:
|
|
3042
|
-
/* @__PURE__ */ jsx("li", { children:
|
|
3103
|
+
/* @__PURE__ */ jsx("li", { children: t(($) => $["containsNameOfCompany"], { ns: "business" }) }),
|
|
3104
|
+
/* @__PURE__ */ jsx("li", { children: t(($) => $["documentShowsTaxIdOfCompany"], { ns: "business" }) }),
|
|
3105
|
+
/* @__PURE__ */ jsx("li", { children: t(($) => $["issuedByTheTaxAuthority"], { ns: "business" }) })
|
|
3043
3106
|
] })
|
|
3044
3107
|
] }) });
|
|
3045
3108
|
};
|
|
@@ -3051,14 +3114,14 @@ function TaxDocument({
|
|
|
3051
3114
|
description = "companyTaxDocumentFormDescription",
|
|
3052
3115
|
...props
|
|
3053
3116
|
}) {
|
|
3054
|
-
const {
|
|
3117
|
+
const { t } = useTranslation("common");
|
|
3055
3118
|
return /* @__PURE__ */ jsx(
|
|
3056
3119
|
MemoizedDocumentUpload,
|
|
3057
3120
|
{
|
|
3058
3121
|
...props,
|
|
3059
3122
|
id,
|
|
3060
|
-
heading:
|
|
3061
|
-
description:
|
|
3123
|
+
heading: t(($) => $[heading]),
|
|
3124
|
+
description: t(($) => $[description]),
|
|
3062
3125
|
documentField: "taxDocument",
|
|
3063
3126
|
documentType: "proofOfOrganizationTaxInfo",
|
|
3064
3127
|
guidanceContent: /* @__PURE__ */ jsx(GuidanceContent, { country, companyType }),
|
|
@@ -3080,7 +3143,7 @@ function BusinessSelectionMultiform({
|
|
|
3080
3143
|
handleBackClick,
|
|
3081
3144
|
setLoadingStatus
|
|
3082
3145
|
}) {
|
|
3083
|
-
const { t } = useTranslation("common");
|
|
3146
|
+
const { t } = useTranslation(["common", "business"]);
|
|
3084
3147
|
const { form } = useFormContext();
|
|
3085
3148
|
const queryClient = useQueryClient();
|
|
3086
3149
|
const userEvents = useAnalyticsContext();
|
|
@@ -3107,7 +3170,7 @@ function BusinessSelectionMultiform({
|
|
|
3107
3170
|
tinMatched.value = true;
|
|
3108
3171
|
userEvents.addPageEvent("Success", {
|
|
3109
3172
|
actionType: "select",
|
|
3110
|
-
|
|
3173
|
+
returnValue: "companySelection"
|
|
3111
3174
|
});
|
|
3112
3175
|
verifiedBusiness.value = businessData;
|
|
3113
3176
|
} else {
|
|
@@ -3164,7 +3227,12 @@ function BusinessSelectionMultiform({
|
|
|
3164
3227
|
if ((!selectedBusinessId || selectedBusinessId !== result.id) && currentTin) {
|
|
3165
3228
|
userEvents.addPageEvent("Clicked button", {
|
|
3166
3229
|
actionType: "select",
|
|
3167
|
-
label: "selectBusiness"
|
|
3230
|
+
label: "selectBusiness",
|
|
3231
|
+
additionalData: {
|
|
3232
|
+
companyIdx: companySearchResponse?.results.findIndex(
|
|
3233
|
+
(searchResult) => searchResult.id === result.id
|
|
3234
|
+
)
|
|
3235
|
+
}
|
|
3168
3236
|
});
|
|
3169
3237
|
setSelectedBusinessId(result.id);
|
|
3170
3238
|
setFetchParams({
|
|
@@ -3246,7 +3314,7 @@ function BusinessSelectionMultiform({
|
|
|
3246
3314
|
verificationErrors
|
|
3247
3315
|
]);
|
|
3248
3316
|
return /* @__PURE__ */ jsx("div", { className: "adyen-kyc-business-selection", children: /* @__PURE__ */ jsxs(LoaderWrapper, { loaderSize: "large", status: searching ? "loading" : "success", children: [
|
|
3249
|
-
/* @__PURE__ */ jsx(
|
|
3317
|
+
/* @__PURE__ */ jsx(Header, { title: t(($) => $[heading]) }),
|
|
3250
3318
|
/* @__PURE__ */ jsx(
|
|
3251
3319
|
ErrorPanel,
|
|
3252
3320
|
{
|
|
@@ -3256,7 +3324,7 @@ function BusinessSelectionMultiform({
|
|
|
3256
3324
|
formUtils
|
|
3257
3325
|
}
|
|
3258
3326
|
),
|
|
3259
|
-
/* @__PURE__ */ jsx(
|
|
3327
|
+
/* @__PURE__ */ jsx(StackLayout, { children: companySearchResponse?.results?.map((result) => /* @__PURE__ */ jsx(
|
|
3260
3328
|
BusinessInformationCard,
|
|
3261
3329
|
{
|
|
3262
3330
|
result,
|
|
@@ -3273,8 +3341,8 @@ function BusinessSelectionMultiform({
|
|
|
3273
3341
|
result.id
|
|
3274
3342
|
)) }),
|
|
3275
3343
|
/* @__PURE__ */ jsxs(Typography, { el: "span", color: "secondary", className: "adyen-kyc-business-selection__footer", children: [
|
|
3276
|
-
t(($) => $["businessSelection__footer"]),
|
|
3277
|
-
/* @__PURE__ */ jsx(Button, { variant: "link", onClick: proceedToManualDataEntry, testId: "manualDataEntry", children: t(($) => $["businessSelection__footerButton"]) })
|
|
3344
|
+
t(($) => $["businessSelection__footer"], { ns: "business" }),
|
|
3345
|
+
/* @__PURE__ */ jsx(Button, { variant: "link", onClick: proceedToManualDataEntry, testId: "manualDataEntry", children: t(($) => $["businessSelection__footerButton"], { ns: "business" }) })
|
|
3278
3346
|
] })
|
|
3279
3347
|
] }) });
|
|
3280
3348
|
}
|
|
@@ -3389,6 +3457,7 @@ const documentFormsIds = [
|
|
|
3389
3457
|
];
|
|
3390
3458
|
function BusinessDetails(props) {
|
|
3391
3459
|
const { i18n } = useI18nContext();
|
|
3460
|
+
const { t } = useTranslation("business");
|
|
3392
3461
|
const { companyStructure } = useGlobalData();
|
|
3393
3462
|
const {
|
|
3394
3463
|
country,
|
|
@@ -3494,9 +3563,9 @@ function BusinessDetails(props) {
|
|
|
3494
3563
|
i18n.get("requirements")
|
|
3495
3564
|
] }),
|
|
3496
3565
|
/* @__PURE__ */ jsxs("ul", { children: [
|
|
3497
|
-
/* @__PURE__ */ jsx("li", { children:
|
|
3498
|
-
/* @__PURE__ */ jsx("li", { children:
|
|
3499
|
-
/* @__PURE__ */ jsx("li", { children:
|
|
3566
|
+
/* @__PURE__ */ jsx("li", { children: t(($) => $["containsNameOfCompany"], { ns: "business" }) }),
|
|
3567
|
+
/* @__PURE__ */ jsx("li", { children: t(($) => $["documentShowsTaxIdOfCompany"], { ns: "business" }) }),
|
|
3568
|
+
/* @__PURE__ */ jsx("li", { children: t(($) => $["issuedByTheTaxAuthority"], { ns: "business" }) })
|
|
3500
3569
|
] })
|
|
3501
3570
|
] })
|
|
3502
3571
|
}
|
|
@@ -3624,6 +3693,18 @@ const mapAdditionalInformation = (data, legalEntity) => {
|
|
|
3624
3693
|
);
|
|
3625
3694
|
const vatNumberType = getDefaultVatNumberType(entity?.vatNumber, currentCountry);
|
|
3626
3695
|
const operationalAddressIsSame = entity?.principalPlaceOfBusiness && !objectsDeepEqual(entity?.principalPlaceOfBusiness, entity?.registeredAddress) ? operationalAddressIsSameIds.OPERATIONAL_ADDRESS_IS_NOT_SAME : operationalAddressIsSameIds.OPERATIONAL_ADDRESS_IS_SAME;
|
|
3696
|
+
if (entity?.registeredAddress?.localization) {
|
|
3697
|
+
data.registrationAddress = {
|
|
3698
|
+
...data.registrationAddress,
|
|
3699
|
+
...mapAddressLocalizationToJpAddressSchema(entity.registeredAddress.localization)
|
|
3700
|
+
};
|
|
3701
|
+
}
|
|
3702
|
+
if (entity?.principalPlaceOfBusiness?.localization) {
|
|
3703
|
+
data.operationalAddress = {
|
|
3704
|
+
...data.operationalAddress,
|
|
3705
|
+
...mapAddressLocalizationToJpAddressSchema(entity.principalPlaceOfBusiness.localization)
|
|
3706
|
+
};
|
|
3707
|
+
}
|
|
3627
3708
|
const result = entriesOf(data).reduce(
|
|
3628
3709
|
(acc, [field]) => {
|
|
3629
3710
|
if (!COUNTRIES_USING_COMPANY_SEARCH.includes(currentCountry)) {
|
|
@@ -3644,7 +3725,7 @@ const mapAdditionalInformation = (data, legalEntity) => {
|
|
|
3644
3725
|
);
|
|
3645
3726
|
return { ...result, ...dbaNameFields, ...isUen };
|
|
3646
3727
|
};
|
|
3647
|
-
const
|
|
3728
|
+
const mapLegalNameLocalization = (data) => {
|
|
3648
3729
|
const localization = data.organization?.localization;
|
|
3649
3730
|
if (!localization) return {};
|
|
3650
3731
|
let result = {};
|
|
@@ -3719,7 +3800,7 @@ const mapLegalEntityToBusinessDetailsSchema = (legalEntity, parentEntity, isExpe
|
|
|
3719
3800
|
...componentData,
|
|
3720
3801
|
[key]: {
|
|
3721
3802
|
...mapBasicInformation(businessDetailsSchema[key]),
|
|
3722
|
-
...
|
|
3803
|
+
...mapLegalNameLocalization(legalEntity)
|
|
3723
3804
|
}
|
|
3724
3805
|
};
|
|
3725
3806
|
}
|
|
@@ -3892,7 +3973,7 @@ const setRemovedFieldsOnSchemaToDeletedValue = (newData, existingData) => {
|
|
|
3892
3973
|
return { ...adjusted, [formId]: adjustFormData(oldFormData, newFormData) };
|
|
3893
3974
|
}, {});
|
|
3894
3975
|
};
|
|
3895
|
-
const formatFinancialInformationSummary = (data,
|
|
3976
|
+
const formatFinancialInformationSummary = (data, language, country, dateOfIncorporation) => {
|
|
3896
3977
|
let summary;
|
|
3897
3978
|
if (!data) return void 0;
|
|
3898
3979
|
if (dateOfIncorporation && !isDateOlderThanAYear(dateOfIncorporation)) {
|
|
@@ -3912,11 +3993,11 @@ const formatFinancialInformationSummary = (data, i18n, country, dateOfIncorporat
|
|
|
3912
3993
|
if (data.balanceSheetTotal) {
|
|
3913
3994
|
summary.balanceSheetTotal = summaryItem(
|
|
3914
3995
|
"balanceSheetTotal",
|
|
3915
|
-
formatCurrency(data.balanceSheetTotal, data.currency,
|
|
3996
|
+
formatCurrency(data.balanceSheetTotal, data.currency, language)
|
|
3916
3997
|
);
|
|
3917
3998
|
}
|
|
3918
3999
|
if (data.annualTurnover) {
|
|
3919
|
-
summary.annualTurnover = formatCurrency(data.annualTurnover, data.currency,
|
|
4000
|
+
summary.annualTurnover = formatCurrency(data.annualTurnover, data.currency, language);
|
|
3920
4001
|
}
|
|
3921
4002
|
return summary;
|
|
3922
4003
|
};
|
|
@@ -4035,6 +4116,13 @@ const mapBusinessDetailsSchemaToLegalEntity = (data, accountHolder, isExperiment
|
|
|
4035
4116
|
if (data.additionalInformation?.operationalAddressIsSame === operationalAddressIsSameIds.OPERATIONAL_ADDRESS_IS_SAME && entityObject.principalPlaceOfBusiness) {
|
|
4036
4117
|
entityObject.principalPlaceOfBusiness = entityObject.registeredAddress;
|
|
4037
4118
|
}
|
|
4119
|
+
if (entityObject.registeredAddress) {
|
|
4120
|
+
const addressLocalizations = mapJpAddressSchemaToAddressLocalizations(
|
|
4121
|
+
data.additionalInformation?.registrationAddress
|
|
4122
|
+
);
|
|
4123
|
+
if (addressLocalizations.length > 0)
|
|
4124
|
+
entityObject.registeredAddress.localization = addressLocalizations;
|
|
4125
|
+
}
|
|
4038
4126
|
if (!isEmpty$1(data.companyFinancialInformation)) {
|
|
4039
4127
|
const isIncorporationDateDependencyEnabled = isExperimentEnabled(
|
|
4040
4128
|
"EnableIncorporationDateBasedFinancialValidationForHO"
|
|
@@ -4098,7 +4186,7 @@ const formatBasicInformation = (data, datasetUtils, companyType, isCountryOfGove
|
|
|
4098
4186
|
countryOfGoverningLaw: datasetUtils.getCountryName(countryOfGoverningLaw)
|
|
4099
4187
|
};
|
|
4100
4188
|
};
|
|
4101
|
-
const formatAdditionalInformation = (data, country, companyType,
|
|
4189
|
+
const formatAdditionalInformation = (data, country, companyType, t) => {
|
|
4102
4190
|
const registrationNumberLabel = resolveFieldMetadata(
|
|
4103
4191
|
registrationNumberDefaultFieldConfig[country],
|
|
4104
4192
|
{
|
|
@@ -4123,7 +4211,7 @@ const formatAdditionalInformation = (data, country, companyType, i18n) => {
|
|
|
4123
4211
|
[registrationNumberLabel]: data.registrationNumber,
|
|
4124
4212
|
[taxIdLabel]: data.isUen ? void 0 : data.taxInformation?.find((taxId) => country === taxId.country)?.number,
|
|
4125
4213
|
["vatNumber"]: data.vatNumber,
|
|
4126
|
-
["vatAbsenceReason"]: data.vatAbsenceReason ?
|
|
4214
|
+
["vatAbsenceReason"]: data.vatAbsenceReason ? t(($) => $[data.vatAbsenceReason], { ns: "common" }) : void 0,
|
|
4127
4215
|
["dateOfIncorporation"]: data.dateOfIncorporation,
|
|
4128
4216
|
["stockExchangeMIC"]: data.stockExchangeMIC,
|
|
4129
4217
|
["stockISIN"]: data.stockISIN,
|
|
@@ -4131,8 +4219,8 @@ const formatAdditionalInformation = (data, country, companyType, i18n) => {
|
|
|
4131
4219
|
["eInvoicingCode"]: data.eInvoicingCode
|
|
4132
4220
|
};
|
|
4133
4221
|
};
|
|
4134
|
-
const formatDataForSummary = (data, forms,
|
|
4135
|
-
const datasetUtils = datasetUtilities(
|
|
4222
|
+
const formatDataForSummary = (data, forms, t, language, isExperimentEnabled) => {
|
|
4223
|
+
const datasetUtils = datasetUtilities(language);
|
|
4136
4224
|
return entriesOf(data).reduce((summaryData, [form]) => {
|
|
4137
4225
|
if (!form || !data[form]) return summaryData;
|
|
4138
4226
|
const isCountryOfGoverningLawEnabled = isExperimentEnabled(
|
|
@@ -4153,8 +4241,11 @@ const formatDataForSummary = (data, forms, i18n, isExperimentEnabled) => {
|
|
|
4153
4241
|
return {
|
|
4154
4242
|
...summaryData,
|
|
4155
4243
|
[form]: {
|
|
4156
|
-
entityType:
|
|
4157
|
-
companyTypeMetadata[data[
|
|
4244
|
+
entityType: t(
|
|
4245
|
+
($) => $[companyTypeMetadata[data["companyStructure"]?.entityType]?.name],
|
|
4246
|
+
{
|
|
4247
|
+
ns: "business"
|
|
4248
|
+
}
|
|
4158
4249
|
)
|
|
4159
4250
|
}
|
|
4160
4251
|
};
|
|
@@ -4167,10 +4258,10 @@ const formatDataForSummary = (data, forms, i18n, isExperimentEnabled) => {
|
|
|
4167
4258
|
data[form],
|
|
4168
4259
|
data.basicInformation?.country,
|
|
4169
4260
|
data.companyStructure?.entityType,
|
|
4170
|
-
|
|
4261
|
+
t
|
|
4171
4262
|
),
|
|
4172
|
-
registrationAddress: mapAddressLabels(data[form].registrationAddress, datasetUtils),
|
|
4173
|
-
operationalAddress: data[form].operationalAddressIsSame === operationalAddressIsSameIds.OPERATIONAL_ADDRESS_IS_NOT_SAME ? mapAddressLabels(data[form].operationalAddress, datasetUtils) : void 0
|
|
4263
|
+
registrationAddress: data.basicInformation?.country === CountryCodes.Japan ? mapJpAddressSummary(data[form].registrationAddress, datasetUtils) : mapAddressLabels(data[form].registrationAddress, datasetUtils),
|
|
4264
|
+
operationalAddress: data[form].operationalAddressIsSame === operationalAddressIsSameIds.OPERATIONAL_ADDRESS_IS_NOT_SAME ? data.basicInformation?.country === CountryCodes.Japan ? mapJpAddressSummary(data[form].operationalAddress, datasetUtils) : mapAddressLabels(data[form].operationalAddress, datasetUtils) : void 0
|
|
4174
4265
|
}
|
|
4175
4266
|
};
|
|
4176
4267
|
case "companyRegistrationDocument":
|
|
@@ -4231,7 +4322,7 @@ const formatDataForSummary = (data, forms, i18n, isExperimentEnabled) => {
|
|
|
4231
4322
|
...summaryData,
|
|
4232
4323
|
[form]: formatFinancialInformationSummary(
|
|
4233
4324
|
data[form],
|
|
4234
|
-
|
|
4325
|
+
language,
|
|
4235
4326
|
data?.basicInformation?.country,
|
|
4236
4327
|
isIncorporationDateDependencyEnabled ? data?.additionalInformation?.dateOfIncorporation : void 0
|
|
4237
4328
|
)
|
|
@@ -4287,7 +4378,7 @@ async function submit({
|
|
|
4287
4378
|
accountHolder,
|
|
4288
4379
|
forms,
|
|
4289
4380
|
documentUtils,
|
|
4290
|
-
|
|
4381
|
+
t,
|
|
4291
4382
|
showToast,
|
|
4292
4383
|
setLoadingStatus,
|
|
4293
4384
|
setProblems,
|
|
@@ -4413,13 +4504,19 @@ async function submit({
|
|
|
4413
4504
|
userEvents
|
|
4414
4505
|
});
|
|
4415
4506
|
userEvents?.addTaskEvent("Success", trackingPayload);
|
|
4416
|
-
showToast({
|
|
4507
|
+
showToast({
|
|
4508
|
+
label: t(($) => $["successfullyUpdatedDetails"], { ns: "common" }),
|
|
4509
|
+
variant: "success"
|
|
4510
|
+
});
|
|
4417
4511
|
onExternalSubmit?.(data);
|
|
4418
4512
|
} catch (err) {
|
|
4419
4513
|
if (isValidationError(err)) {
|
|
4420
4514
|
const getErrors = processValidationErrors(err, TaskTypes.BUSINESS_DETAILS);
|
|
4421
4515
|
if (getErrors && !Object.keys(getErrors).length) {
|
|
4422
|
-
showToast({
|
|
4516
|
+
showToast({
|
|
4517
|
+
label: t(($) => $["failedToUpdateDetails"], { ns: "common" }),
|
|
4518
|
+
variant: "error"
|
|
4519
|
+
});
|
|
4423
4520
|
const unmappedErrorNames = err.invalidFields?.map((field) => field.name).filter(Boolean) ?? [];
|
|
4424
4521
|
if (unmappedErrorNames.length) {
|
|
4425
4522
|
trackingPayload = {
|
|
@@ -4436,13 +4533,16 @@ async function submit({
|
|
|
4436
4533
|
}
|
|
4437
4534
|
if (isMaintenanceModeError(err)) {
|
|
4438
4535
|
showToast({
|
|
4439
|
-
label:
|
|
4536
|
+
label: t(($) => $["maintenanceModeMessage"], { ns: "common" }),
|
|
4440
4537
|
variant: "error",
|
|
4441
4538
|
duration: "indefinite"
|
|
4442
4539
|
});
|
|
4443
4540
|
}
|
|
4444
4541
|
if (!isValidationError(err) && !isMaintenanceModeError(err)) {
|
|
4445
|
-
showToast({
|
|
4542
|
+
showToast({
|
|
4543
|
+
label: t(($) => $["failedToUpdateDetails"], { ns: "common" }),
|
|
4544
|
+
variant: "error"
|
|
4545
|
+
});
|
|
4446
4546
|
}
|
|
4447
4547
|
logger2.error(err);
|
|
4448
4548
|
userEvents?.addTaskEvent("Encountered error", {
|
|
@@ -4483,7 +4583,7 @@ function BusinessDetailsDropin({
|
|
|
4483
4583
|
const formRef = useRef(null);
|
|
4484
4584
|
const { accountHolder, setAccountHolder } = useAccountHolder();
|
|
4485
4585
|
const { showToast } = useToastContext();
|
|
4486
|
-
const { i18n } =
|
|
4586
|
+
const { t, i18n } = useTranslation(["common", "business"]);
|
|
4487
4587
|
const userEvents = useAnalyticsContext();
|
|
4488
4588
|
const { isExperimentEnabled } = useExperimentsContext();
|
|
4489
4589
|
const { isSettingEnabled } = useSettingsContext();
|
|
@@ -4566,7 +4666,10 @@ function BusinessDetailsDropin({
|
|
|
4566
4666
|
)
|
|
4567
4667
|
);
|
|
4568
4668
|
}).catch(
|
|
4569
|
-
() => showToast({
|
|
4669
|
+
() => showToast({
|
|
4670
|
+
label: t(($) => $["failedToFetchRelevantDocuments"], { ns: "common" }),
|
|
4671
|
+
variant: "error"
|
|
4672
|
+
})
|
|
4570
4673
|
);
|
|
4571
4674
|
}, []);
|
|
4572
4675
|
const parseConfiguration = useCallback(
|
|
@@ -4650,7 +4753,6 @@ function BusinessDetailsDropin({
|
|
|
4650
4753
|
);
|
|
4651
4754
|
const companySearchResults = companySearchResponse?.results;
|
|
4652
4755
|
const businessName = currentState?.data?.basicInformation?.legalCompanyName || "";
|
|
4653
|
-
const nameMatch = isNormalizedStringMatch(businessName, companySearchResults?.[0]?.name ?? "");
|
|
4654
4756
|
const taxInformation = currentState?.data?.basicInformation?.taxInformation;
|
|
4655
4757
|
const tin = taxInformation?.find((taxId) => currentCountry === taxId.country)?.number || "";
|
|
4656
4758
|
const [prevCompanySearchResults, setPrevCompanySearchResults] = useState(companySearchResults);
|
|
@@ -4658,7 +4760,7 @@ function BusinessDetailsDropin({
|
|
|
4658
4760
|
if (!searchingCompanies && companySearchResults) {
|
|
4659
4761
|
userEvents.addPageEvent("Success", {
|
|
4660
4762
|
actionType: "submit",
|
|
4661
|
-
|
|
4763
|
+
returnValue: "companySearch",
|
|
4662
4764
|
additionalData: {
|
|
4663
4765
|
numberOfResults: companySearchResults.length
|
|
4664
4766
|
},
|
|
@@ -4711,12 +4813,12 @@ function BusinessDetailsDropin({
|
|
|
4711
4813
|
]);
|
|
4712
4814
|
const summaryData = useMemo(
|
|
4713
4815
|
() => ({
|
|
4714
|
-
data: formatDataForSummary(currentState.data, forms, i18n, isExperimentEnabled),
|
|
4816
|
+
data: formatDataForSummary(currentState.data, forms, t, i18n.language, isExperimentEnabled),
|
|
4715
4817
|
omitted: {
|
|
4716
4818
|
keys: ["operationalAddressIsSame"]
|
|
4717
4819
|
}
|
|
4718
4820
|
}),
|
|
4719
|
-
[currentState.data, forms, i18n, isExperimentEnabled]
|
|
4821
|
+
[currentState.data, forms, t, i18n.language, isExperimentEnabled]
|
|
4720
4822
|
);
|
|
4721
4823
|
const canSubmitForm = useMemo(
|
|
4722
4824
|
() => canSubmit(currentState.data) && hasDataChanged(initialData, currentState.data),
|
|
@@ -4739,7 +4841,7 @@ function BusinessDetailsDropin({
|
|
|
4739
4841
|
accountHolder: accountHolder ?? "theCompanyIWorkFor",
|
|
4740
4842
|
forms,
|
|
4741
4843
|
documentUtils,
|
|
4742
|
-
|
|
4844
|
+
t,
|
|
4743
4845
|
showToast,
|
|
4744
4846
|
setLoadingStatus,
|
|
4745
4847
|
setProblems: setCurrentProblems,
|
|
@@ -4762,7 +4864,7 @@ function BusinessDetailsDropin({
|
|
|
4762
4864
|
taskType,
|
|
4763
4865
|
forms,
|
|
4764
4866
|
documentUtils,
|
|
4765
|
-
|
|
4867
|
+
t,
|
|
4766
4868
|
showToast,
|
|
4767
4869
|
updateLegalEntity,
|
|
4768
4870
|
createLegalEntity,
|
|
@@ -4825,7 +4927,7 @@ function BusinessDetailsDropin({
|
|
|
4825
4927
|
userEvents
|
|
4826
4928
|
]);
|
|
4827
4929
|
if (prevCompanySearchResults !== companySearchResults) {
|
|
4828
|
-
if (companySearchResults?.length === 1 &&
|
|
4930
|
+
if (companySearchResults?.length === 1 && isNormalizedStringMatch(businessName, companySearchResults[0].name)) {
|
|
4829
4931
|
setSingleCompanyDatasetParams({
|
|
4830
4932
|
company: companySearchResults[0],
|
|
4831
4933
|
state: currentState.data.basicInformation?.stateOrProvince,
|
|
@@ -5056,10 +5158,18 @@ function BusinessDetailsDropin({
|
|
|
5056
5158
|
businessMismatchModalOpen2 && /* @__PURE__ */ jsx(
|
|
5057
5159
|
Confirm,
|
|
5058
5160
|
{
|
|
5059
|
-
title:
|
|
5060
|
-
|
|
5061
|
-
|
|
5062
|
-
|
|
5161
|
+
title: t(($) => $["businessSelection__tinVerificationFailureModalHeader"], {
|
|
5162
|
+
ns: "business"
|
|
5163
|
+
}),
|
|
5164
|
+
description: t(($) => $["businessSelection__tinVerificationFailureModalContent"], {
|
|
5165
|
+
ns: "business"
|
|
5166
|
+
}),
|
|
5167
|
+
cancelText: t(($) => $["businessSelection__tinVerificationFailureModalSecondaryButton"], {
|
|
5168
|
+
ns: "business"
|
|
5169
|
+
}),
|
|
5170
|
+
confirmText: t(($) => $["businessSelection__tinVerificationFailureModalPrimaryButton"], {
|
|
5171
|
+
ns: "business"
|
|
5172
|
+
}),
|
|
5063
5173
|
onCancel: handleBusinessMismatchCancel,
|
|
5064
5174
|
onConfirm: handleBusinessMismatchContinue
|
|
5065
5175
|
}
|
|
@@ -5068,58 +5178,1964 @@ function BusinessDetailsDropin({
|
|
|
5068
5178
|
}
|
|
5069
5179
|
);
|
|
5070
5180
|
}
|
|
5181
|
+
const LazyJpAddress = lazy(
|
|
5182
|
+
async () => (await import("./JpAddress-BEKjE0bR.js")).JpAddress
|
|
5183
|
+
);
|
|
5184
|
+
function AdditionalInformationMultiform({
|
|
5185
|
+
id,
|
|
5186
|
+
country,
|
|
5187
|
+
companyType,
|
|
5188
|
+
shouldValidate,
|
|
5189
|
+
heading = "additionalInformationFormHeading",
|
|
5190
|
+
description,
|
|
5191
|
+
validationErrors = {},
|
|
5192
|
+
verificationErrors = {}
|
|
5193
|
+
}) {
|
|
5194
|
+
const { t, i18n } = useTranslation(["common", "business", "businessLines"]);
|
|
5195
|
+
const { form } = useFormContext();
|
|
5196
|
+
const { isExperimentEnabled } = useExperimentsContext();
|
|
5197
|
+
const { data: rootLegalEntity } = useLegalEntity(ROOT_LE);
|
|
5198
|
+
const verifiedBusiness$1 = verifiedBusiness.value;
|
|
5199
|
+
const showVerified = !!verifiedBusiness$1;
|
|
5200
|
+
const showStockData = companyType === CompanyTypesValues.PUBLIC_COMPANY;
|
|
5201
|
+
const addressSchema = getAddressSchemaForCountry(country).filter(
|
|
5202
|
+
(field) => !COUNTRIES_WITH_STATES_DATASET.includes(country) ? field !== "stateOrProvince" : true
|
|
5203
|
+
);
|
|
5204
|
+
const currentCountryTaxInformation = form.data?.additionalInformation?.taxInformation?.find(
|
|
5205
|
+
(taxId) => taxId.country === country
|
|
5206
|
+
);
|
|
5207
|
+
const businessLineTypes = [];
|
|
5208
|
+
if (requestingBanking(rootLegalEntity)) {
|
|
5209
|
+
businessLineTypes.push("banking");
|
|
5210
|
+
}
|
|
5211
|
+
if (requestingIssuing(rootLegalEntity)) {
|
|
5212
|
+
businessLineTypes.push("issuing");
|
|
5213
|
+
}
|
|
5214
|
+
const [addressToCheck, setAddressToCheck] = useDebouncedState(500);
|
|
5215
|
+
const { data: cleansedRegistrationAddress } = useAddressCleanse(
|
|
5216
|
+
{
|
|
5217
|
+
text: addressToCheck,
|
|
5218
|
+
country
|
|
5219
|
+
},
|
|
5220
|
+
{ enabled: Boolean(addressToCheck) }
|
|
5221
|
+
);
|
|
5222
|
+
const mustProvideOperationalAddress = cleansedRegistrationAddress?.poBox ?? false;
|
|
5223
|
+
useEffect(
|
|
5224
|
+
() => setAddressToCheck(
|
|
5225
|
+
formatAddressForCleanse(form.data?.additionalInformation?.registrationAddress ?? {})
|
|
5226
|
+
),
|
|
5227
|
+
[form.data?.additionalInformation?.registrationAddress, setAddressToCheck]
|
|
5228
|
+
);
|
|
5229
|
+
const verifiedAddress = useMemo(() => {
|
|
5230
|
+
if (!verifiedBusiness$1) return void 0;
|
|
5231
|
+
return verifiedBusiness$1.isPrincipalAddress || verifiedBusiness$1.state && form.data?.basicInformation?.stateOrProvince !== verifiedBusiness$1.state ? { operationalAddress: { ...mapAddressData(verifiedBusiness$1), country } } : {
|
|
5232
|
+
registrationAddress: {
|
|
5233
|
+
...mapAddressData(verifiedBusiness$1),
|
|
5234
|
+
country,
|
|
5235
|
+
stateOrProvince: form.data?.basicInformation?.stateOrProvince
|
|
5236
|
+
}
|
|
5237
|
+
};
|
|
5238
|
+
}, [verifiedBusiness$1, form.data?.basicInformation?.stateOrProvince, country]);
|
|
5239
|
+
const handleChangeFor = useCallback(
|
|
5240
|
+
(fieldName, mode) => form.handleChangeFor(fieldName, "additionalInformation", mode),
|
|
5241
|
+
[form]
|
|
5242
|
+
);
|
|
5243
|
+
const handleRegistrationAddressChange = (state) => {
|
|
5244
|
+
handleChangeFor("registrationAddress")(state.data);
|
|
5245
|
+
form.setValid("registrationAddress", Boolean(state.isValid), "additionalInformation");
|
|
5246
|
+
};
|
|
5247
|
+
const handleOperationalAddressChange = (state) => {
|
|
5248
|
+
handleChangeFor("operationalAddress")(state.data);
|
|
5249
|
+
form.setValid("operationalAddress", Boolean(state.isValid), "additionalInformation");
|
|
5250
|
+
};
|
|
5251
|
+
const handleOperationalAddressIsSameChange = useCallback(
|
|
5252
|
+
(isChecked) => {
|
|
5253
|
+
if (isChecked) {
|
|
5254
|
+
handleChangeFor("operationalAddressIsSame")(
|
|
5255
|
+
operationalAddressIsSameIds.OPERATIONAL_ADDRESS_IS_SAME
|
|
5256
|
+
);
|
|
5257
|
+
form.setValid("operationalAddress", true, "additionalInformation");
|
|
5258
|
+
} else {
|
|
5259
|
+
handleChangeFor("operationalAddressIsSame")(
|
|
5260
|
+
operationalAddressIsSameIds.OPERATIONAL_ADDRESS_IS_NOT_SAME
|
|
5261
|
+
);
|
|
5262
|
+
}
|
|
5263
|
+
},
|
|
5264
|
+
[form, handleChangeFor]
|
|
5265
|
+
);
|
|
5266
|
+
if (form.data?.additionalInformation?.operationalAddressIsSame === null) {
|
|
5267
|
+
handleOperationalAddressIsSameChange(true);
|
|
5268
|
+
}
|
|
5269
|
+
useEffect(() => {
|
|
5270
|
+
if (mustProvideOperationalAddress && form.data?.additionalInformation?.operationalAddressIsSame !== operationalAddressIsSameIds.OPERATIONAL_ADDRESS_IS_NOT_SAME) {
|
|
5271
|
+
handleOperationalAddressIsSameChange(false);
|
|
5272
|
+
}
|
|
5273
|
+
}, [
|
|
5274
|
+
handleOperationalAddressIsSameChange,
|
|
5275
|
+
mustProvideOperationalAddress,
|
|
5276
|
+
form.data?.additionalInformation?.operationalAddressIsSame
|
|
5277
|
+
]);
|
|
5278
|
+
const formUtils = useMemo(() => {
|
|
5279
|
+
const initialProps = {
|
|
5280
|
+
data: form.data?.additionalInformation ?? {},
|
|
5281
|
+
fieldValidationErrors: validationErrors,
|
|
5282
|
+
formVerificationErrors: verificationErrors,
|
|
5283
|
+
allFields: form.allFields?.additionalInformation ?? [],
|
|
5284
|
+
requiredFields: form.requiredFields?.additionalInformation ?? [],
|
|
5285
|
+
optionalFields: form.optionalFields?.additionalInformation ?? [],
|
|
5286
|
+
trustedFields: form.trustedFields?.additionalInformation ?? [],
|
|
5287
|
+
obscuredFields: form.obscuredFields?.additionalInformation ?? [],
|
|
5288
|
+
errors: form.errors?.additionalInformation ?? {},
|
|
5289
|
+
valid: form.valid?.additionalInformation ?? {},
|
|
5290
|
+
handleFieldChange: handleChangeFor
|
|
5291
|
+
};
|
|
5292
|
+
const formUtilProps = initialProps.allFields?.reduce((acc, field) => {
|
|
5293
|
+
switch (field) {
|
|
5294
|
+
case "hasDoingBusinessAs":
|
|
5295
|
+
return mergeFieldMetadataIntoProps(
|
|
5296
|
+
"hasDoingBusinessAs",
|
|
5297
|
+
doingBusinessAsAbsentFieldMetadata,
|
|
5298
|
+
acc
|
|
5299
|
+
);
|
|
5300
|
+
case "doingBusinessAs":
|
|
5301
|
+
return mergeFieldMetadataIntoProps("doingBusinessAs", doingBusinessAsFieldMetadata, acc);
|
|
5302
|
+
case "registrationNumber":
|
|
5303
|
+
return mergeFieldMetadataIntoProps(
|
|
5304
|
+
field,
|
|
5305
|
+
resolveFieldMetadata(
|
|
5306
|
+
registrationNumberDefaultFieldConfig[country],
|
|
5307
|
+
{
|
|
5308
|
+
companyType,
|
|
5309
|
+
registrationNumberType: form.data?.additionalInformation?.registrationNumberType,
|
|
5310
|
+
isExperimentEnabled
|
|
5311
|
+
},
|
|
5312
|
+
registrationNumberDefaultFieldMetadata
|
|
5313
|
+
),
|
|
5314
|
+
acc
|
|
5315
|
+
);
|
|
5316
|
+
case "taxInformation":
|
|
5317
|
+
return mergeFieldMetadataIntoProps(
|
|
5318
|
+
field,
|
|
5319
|
+
resolveFieldMetadata(
|
|
5320
|
+
taxInformationDefaultFieldConfig[country],
|
|
5321
|
+
{
|
|
5322
|
+
taxIdNumberType: currentCountryTaxInformation?.type,
|
|
5323
|
+
companyType
|
|
5324
|
+
},
|
|
5325
|
+
taxInformationDefaultFieldMetadata
|
|
5326
|
+
),
|
|
5327
|
+
acc
|
|
5328
|
+
);
|
|
5329
|
+
case "vatNumber":
|
|
5330
|
+
return mergeFieldMetadataIntoProps(
|
|
5331
|
+
field,
|
|
5332
|
+
resolveFieldMetadata(
|
|
5333
|
+
defaultFieldConfig$1[country],
|
|
5334
|
+
{ vatNumberType: form.data?.additionalInformation?.vatNumberType },
|
|
5335
|
+
defaultFieldMetadata$1
|
|
5336
|
+
),
|
|
5337
|
+
acc
|
|
5338
|
+
);
|
|
5339
|
+
case "vatAbsenceReason":
|
|
5340
|
+
return mergeFieldMetadataIntoProps("vatAbsenceReason", vatAbsenceReasonMetadata, acc);
|
|
5341
|
+
case "eInvoicingCode":
|
|
5342
|
+
return mergeFieldMetadataIntoProps("eInvoicingCode", eInvoicingCodeFieldMetadata, acc);
|
|
5343
|
+
case "industryCodes":
|
|
5344
|
+
return mergeFieldMetadataIntoProps("industryCodes", industryCodeFieldMetadata, acc);
|
|
5345
|
+
case "dateOfIncorporation":
|
|
5346
|
+
return mergeFieldMetadataIntoProps(
|
|
5347
|
+
"dateOfIncorporation",
|
|
5348
|
+
dateOfIncorporationFieldMetadata,
|
|
5349
|
+
acc
|
|
5350
|
+
);
|
|
5351
|
+
case "stockExchangeMIC":
|
|
5352
|
+
return mergeFieldMetadataIntoProps(
|
|
5353
|
+
"stockExchangeMIC",
|
|
5354
|
+
stockExchangeMICFieldMetadata,
|
|
5355
|
+
acc
|
|
5356
|
+
);
|
|
5357
|
+
case "stockISIN":
|
|
5358
|
+
return mergeFieldMetadataIntoProps("stockISIN", stockISINFieldMetadata, acc);
|
|
5359
|
+
case "stockTickerSymbol":
|
|
5360
|
+
return mergeFieldMetadataIntoProps(
|
|
5361
|
+
"stockTickerSymbol",
|
|
5362
|
+
stockTickerSymbolFieldMetadata,
|
|
5363
|
+
acc
|
|
5364
|
+
);
|
|
5365
|
+
case "legalForm":
|
|
5366
|
+
return mergeFieldMetadataIntoProps("legalForm", legalFormFieldMetadata, acc);
|
|
5367
|
+
default:
|
|
5368
|
+
return acc;
|
|
5369
|
+
}
|
|
5370
|
+
}, initialProps);
|
|
5371
|
+
return createFormUtils(formUtilProps ?? initialProps, t);
|
|
5372
|
+
}, [
|
|
5373
|
+
companyType,
|
|
5374
|
+
country,
|
|
5375
|
+
currentCountryTaxInformation?.type,
|
|
5376
|
+
form.allFields?.additionalInformation,
|
|
5377
|
+
form.data?.additionalInformation,
|
|
5378
|
+
form.errors?.additionalInformation,
|
|
5379
|
+
form.obscuredFields?.additionalInformation,
|
|
5380
|
+
form.optionalFields?.additionalInformation,
|
|
5381
|
+
form.requiredFields?.additionalInformation,
|
|
5382
|
+
form.trustedFields?.additionalInformation,
|
|
5383
|
+
form.valid?.additionalInformation,
|
|
5384
|
+
handleChangeFor,
|
|
5385
|
+
t,
|
|
5386
|
+
isExperimentEnabled,
|
|
5387
|
+
validationErrors,
|
|
5388
|
+
verificationErrors
|
|
5389
|
+
]);
|
|
5390
|
+
const showField = (fieldKeys) => fieldKeys.some((field) => formUtils.isRequiredField(field) || formUtils.isOptionalField(field));
|
|
5391
|
+
const datasetUtils = datasetUtilities(i18n.language);
|
|
5392
|
+
const registrationAddressDescription = useMemo(() => {
|
|
5393
|
+
if (country) {
|
|
5394
|
+
return ["US", "NL", "CZ"].includes(country) ? t(($) => $["youBusinessOfficalAddressInTheCounty"], {
|
|
5395
|
+
ns: "business",
|
|
5396
|
+
country: datasetUtils.getCountryName(country)
|
|
5397
|
+
}) : t(($) => $["youBusinessOfficalAddressInCounty"], {
|
|
5398
|
+
ns: "business",
|
|
5399
|
+
country: datasetUtils.getCountryName(country)
|
|
5400
|
+
});
|
|
5401
|
+
}
|
|
5402
|
+
return t(($) => $["youBusinessOfficalAddress"], { ns: "business" });
|
|
5403
|
+
}, [country, datasetUtils, t]);
|
|
5404
|
+
return /* @__PURE__ */ jsxs("form", { id, className: "adyen-kyc-additional-information", children: [
|
|
5405
|
+
/* @__PURE__ */ jsx(
|
|
5406
|
+
Header,
|
|
5407
|
+
{
|
|
5408
|
+
title: t(($) => $[heading], { ns: "common" }),
|
|
5409
|
+
description: description ? t(($) => $[description], { ns: "common" }) : void 0
|
|
5410
|
+
}
|
|
5411
|
+
),
|
|
5412
|
+
/* @__PURE__ */ jsx(
|
|
5413
|
+
ErrorPanel,
|
|
5414
|
+
{
|
|
5415
|
+
id: "ariaErrorField",
|
|
5416
|
+
verificationErrors,
|
|
5417
|
+
validationErrors,
|
|
5418
|
+
formUtils
|
|
5419
|
+
}
|
|
5420
|
+
),
|
|
5421
|
+
/* @__PURE__ */ jsxs("div", { className: "adyen-kyc-additional-information__content", children: [
|
|
5422
|
+
showVerified && /* @__PURE__ */ jsxs("section", { children: [
|
|
5423
|
+
/* @__PURE__ */ jsx("div", { className: "adyen-kyc-additional-information__section-heading", children: /* @__PURE__ */ jsx(Typography, { el: "h3", variant: "title", children: t(($) => $["verifiedInformation"], { ns: "business" }) }) }),
|
|
5424
|
+
/* @__PURE__ */ jsx(
|
|
5425
|
+
VerifiedBusinessCard,
|
|
5426
|
+
{
|
|
5427
|
+
verifiedBusiness: verifiedBusiness$1,
|
|
5428
|
+
verifiedAddress: verifiedAddress?.registrationAddress ?? verifiedAddress?.operationalAddress
|
|
5429
|
+
}
|
|
5430
|
+
)
|
|
5431
|
+
] }),
|
|
5432
|
+
/* @__PURE__ */ jsxs("section", { children: [
|
|
5433
|
+
showVerified && /* @__PURE__ */ jsx("div", { className: "adyen-kyc-additional-information__section-heading", children: /* @__PURE__ */ jsx(Typography, { el: "h3", variant: "title", children: t(($) => $["otherBusinessInformation"], { ns: "business" }) }) }),
|
|
5434
|
+
/* @__PURE__ */ jsxs("fieldset", { children: [
|
|
5435
|
+
showField(LEGAL_FORM_FIELDS) && /* @__PURE__ */ jsx("div", { className: "adyen-kyc-field-wrapper", children: /* @__PURE__ */ jsx(
|
|
5436
|
+
LegalFormField,
|
|
5437
|
+
{
|
|
5438
|
+
name: "legalForm",
|
|
5439
|
+
countryCode: country,
|
|
5440
|
+
data: {
|
|
5441
|
+
legalForm: formUtils.getFieldData(
|
|
5442
|
+
form.data?.additionalInformation ?? {},
|
|
5443
|
+
LEGAL_FORM_FIELDS
|
|
5444
|
+
)?.legalForm
|
|
5445
|
+
},
|
|
5446
|
+
valid: formUtils.getFieldValid(
|
|
5447
|
+
form.valid?.additionalInformation ?? {},
|
|
5448
|
+
LEGAL_FORM_FIELDS
|
|
5449
|
+
),
|
|
5450
|
+
errorMessage: form.errors.additionalInformation?.legalForm?.errorMessage,
|
|
5451
|
+
handleChangeFor,
|
|
5452
|
+
readonly: false,
|
|
5453
|
+
label: formUtils.getLabel("legalForm", "businessStructure")
|
|
5454
|
+
}
|
|
5455
|
+
) }),
|
|
5456
|
+
showField(DBA_NAME_FIELD) && /* @__PURE__ */ jsx("div", { className: "adyen-kyc-field-wrapper", children: /* @__PURE__ */ jsx(
|
|
5457
|
+
DBANameField,
|
|
5458
|
+
{
|
|
5459
|
+
data: formUtils.getFieldData(
|
|
5460
|
+
form.data?.additionalInformation ?? {},
|
|
5461
|
+
DBA_NAME_FIELD
|
|
5462
|
+
),
|
|
5463
|
+
valid: formUtils.getFieldValid(
|
|
5464
|
+
form.valid?.additionalInformation ?? {},
|
|
5465
|
+
DBA_NAME_FIELD
|
|
5466
|
+
),
|
|
5467
|
+
errors: formUtils.getFieldErrors(
|
|
5468
|
+
form.errors?.additionalInformation ?? {},
|
|
5469
|
+
validationErrors,
|
|
5470
|
+
DBA_NAME_FIELD
|
|
5471
|
+
),
|
|
5472
|
+
labels: formUtils.getFieldLabels(DBA_NAME_FIELD, {
|
|
5473
|
+
hasDoingBusinessAs: "hasDba"
|
|
5474
|
+
}),
|
|
5475
|
+
readonly: formUtils.isReadOnly("doingBusinessAs"),
|
|
5476
|
+
handleChangeFor
|
|
5477
|
+
}
|
|
5478
|
+
) }),
|
|
5479
|
+
showField(BUSINESS_REGISTRATION_NUMBER_FIELD) && /* @__PURE__ */ jsx("div", { className: "adyen-kyc-field-wrapper", children: /* @__PURE__ */ jsx(
|
|
5480
|
+
BusinessRegistrationNumberField,
|
|
5481
|
+
{
|
|
5482
|
+
data: formUtils.getFieldData(
|
|
5483
|
+
form.data?.additionalInformation ?? {},
|
|
5484
|
+
BUSINESS_REGISTRATION_NUMBER_FIELD
|
|
5485
|
+
),
|
|
5486
|
+
valid: formUtils.getFieldValid(
|
|
5487
|
+
form.valid?.additionalInformation ?? {},
|
|
5488
|
+
BUSINESS_REGISTRATION_NUMBER_FIELD
|
|
5489
|
+
),
|
|
5490
|
+
errors: formUtils.getFieldErrors(
|
|
5491
|
+
form.errors?.additionalInformation ?? {},
|
|
5492
|
+
validationErrors,
|
|
5493
|
+
BUSINESS_REGISTRATION_NUMBER_FIELD
|
|
5494
|
+
),
|
|
5495
|
+
labels: formUtils.getFieldLabels(BUSINESS_REGISTRATION_NUMBER_FIELD, {
|
|
5496
|
+
exemptedFromRegistrationNumber: "iDontHaveARegistrationNumber"
|
|
5497
|
+
}),
|
|
5498
|
+
mask: formUtils.getMask("registrationNumber"),
|
|
5499
|
+
guidanceText: formUtils.getFieldGuidanceText(BUSINESS_REGISTRATION_NUMBER_FIELD),
|
|
5500
|
+
placeholders: formUtils.getFieldPlaceholders(BUSINESS_REGISTRATION_NUMBER_FIELD),
|
|
5501
|
+
helperText: formUtils.getFieldHelperText(BUSINESS_REGISTRATION_NUMBER_FIELD),
|
|
5502
|
+
readonly: formUtils.isReadOnly("registrationNumber"),
|
|
5503
|
+
optional: formUtils.isOptionalField("registrationNumber"),
|
|
5504
|
+
shouldValidate,
|
|
5505
|
+
handleChangeFor,
|
|
5506
|
+
country,
|
|
5507
|
+
canExempt: showField(["exemptedFromRegistrationNumber"]),
|
|
5508
|
+
companyType
|
|
5509
|
+
}
|
|
5510
|
+
) }),
|
|
5511
|
+
showField(TAX_INFORMATION_FIELD) && /* @__PURE__ */ jsx("div", { className: "adyen-kyc-field-wrapper", children: /* @__PURE__ */ jsx(
|
|
5512
|
+
TaxInformationField,
|
|
5513
|
+
{
|
|
5514
|
+
data: formUtils.getFieldData(
|
|
5515
|
+
form.data?.additionalInformation ?? {},
|
|
5516
|
+
TAX_INFORMATION_FIELD
|
|
5517
|
+
),
|
|
5518
|
+
valid: formUtils.getFieldValid(
|
|
5519
|
+
form.valid?.additionalInformation ?? {},
|
|
5520
|
+
TAX_INFORMATION_FIELD
|
|
5521
|
+
),
|
|
5522
|
+
errors: formUtils.getFieldErrors(
|
|
5523
|
+
form.errors?.additionalInformation ?? {},
|
|
5524
|
+
validationErrors,
|
|
5525
|
+
TAX_INFORMATION_FIELD
|
|
5526
|
+
),
|
|
5527
|
+
labels: formUtils.getFieldLabels(TAX_INFORMATION_FIELD, {
|
|
5528
|
+
exemptedFromTax: "iDontHaveATaxId"
|
|
5529
|
+
}),
|
|
5530
|
+
mask: formUtils.getMask("taxInformation"),
|
|
5531
|
+
guidanceText: formUtils.getFieldGuidanceText(TAX_INFORMATION_FIELD),
|
|
5532
|
+
readonly: formUtils.isReadOnly("taxInformation"),
|
|
5533
|
+
shouldValidate,
|
|
5534
|
+
handleChangeFor,
|
|
5535
|
+
canExempt: showField(["exemptedFromTax"]),
|
|
5536
|
+
country,
|
|
5537
|
+
entityType: companyType,
|
|
5538
|
+
defaultData: form.defaultData?.additionalInformation?.taxInformation,
|
|
5539
|
+
registrationNumber: form.data?.additionalInformation?.registrationNumber
|
|
5540
|
+
}
|
|
5541
|
+
) }),
|
|
5542
|
+
showField(VAT_NUMBER_FIELD) && /* @__PURE__ */ jsx("div", { className: "adyen-kyc-field-wrapper", children: /* @__PURE__ */ jsx(
|
|
5543
|
+
VatNumberField,
|
|
5544
|
+
{
|
|
5545
|
+
data: formUtils.getFieldData(
|
|
5546
|
+
form.data?.additionalInformation ?? {},
|
|
5547
|
+
VAT_NUMBER_FIELD
|
|
5548
|
+
),
|
|
5549
|
+
valid: formUtils.getFieldValid(
|
|
5550
|
+
form.valid?.additionalInformation ?? {},
|
|
5551
|
+
VAT_NUMBER_FIELD
|
|
5552
|
+
),
|
|
5553
|
+
errors: formUtils.getFieldErrors(
|
|
5554
|
+
form.errors?.additionalInformation ?? {},
|
|
5555
|
+
validationErrors,
|
|
5556
|
+
VAT_NUMBER_FIELD
|
|
5557
|
+
),
|
|
5558
|
+
labels: formUtils.getFieldLabels(VAT_NUMBER_FIELD, {
|
|
5559
|
+
exemptedFromVat: "iDontHaveAVatNumber"
|
|
5560
|
+
}),
|
|
5561
|
+
mask: formUtils.getMask("vatNumber"),
|
|
5562
|
+
guidanceText: formUtils.getFieldGuidanceText(VAT_NUMBER_FIELD),
|
|
5563
|
+
placeholders: formUtils.getFieldPlaceholders(VAT_NUMBER_FIELD),
|
|
5564
|
+
readonly: formUtils.isReadOnly("vatNumber"),
|
|
5565
|
+
handleChangeFor,
|
|
5566
|
+
country,
|
|
5567
|
+
canExempt: showField(["exemptedFromVat"]),
|
|
5568
|
+
shouldValidate
|
|
5569
|
+
}
|
|
5570
|
+
) }),
|
|
5571
|
+
formUtils.isRequiredField("eInvoicingCode", false) && /* @__PURE__ */ jsx("div", { className: "adyen-kyc-field-wrapper", children: /* @__PURE__ */ jsx(
|
|
5572
|
+
EInvoicingCodeField,
|
|
5573
|
+
{
|
|
5574
|
+
data: formUtils.getFieldData(
|
|
5575
|
+
form.data?.additionalInformation ?? {},
|
|
5576
|
+
EINVOICING_CODE_FIELD
|
|
5577
|
+
),
|
|
5578
|
+
valid: formUtils.getFieldValid(
|
|
5579
|
+
form.valid?.additionalInformation ?? {},
|
|
5580
|
+
EINVOICING_CODE_FIELD
|
|
5581
|
+
),
|
|
5582
|
+
errors: formUtils.getFieldErrors(
|
|
5583
|
+
form.errors?.additionalInformation ?? {},
|
|
5584
|
+
validationErrors,
|
|
5585
|
+
EINVOICING_CODE_FIELD
|
|
5586
|
+
),
|
|
5587
|
+
labels: formUtils.getFieldLabels(EINVOICING_CODE_FIELD),
|
|
5588
|
+
placeholders: formUtils.getFieldPlaceholders(EINVOICING_CODE_FIELD),
|
|
5589
|
+
mask: formUtils.getMask("eInvoicingCode"),
|
|
5590
|
+
guidanceText: formUtils.getFieldGuidanceText(EINVOICING_CODE_FIELD),
|
|
5591
|
+
readonly: formUtils.isReadOnly("eInvoicingCode"),
|
|
5592
|
+
handleChangeFor
|
|
5593
|
+
}
|
|
5594
|
+
) }),
|
|
5595
|
+
showField(INDUSTRY_CODE_FIELD) && /* @__PURE__ */ jsx("div", { className: "adyen-kyc-field-wrapper", children: /* @__PURE__ */ jsx(
|
|
5596
|
+
IndustryCodeField,
|
|
5597
|
+
{
|
|
5598
|
+
data: formUtils.getFieldData(
|
|
5599
|
+
form.data?.additionalInformation ?? {},
|
|
5600
|
+
INDUSTRY_CODE_FIELD
|
|
5601
|
+
),
|
|
5602
|
+
valid: formUtils.getFieldValid(
|
|
5603
|
+
form.valid?.additionalInformation ?? {},
|
|
5604
|
+
INDUSTRY_CODE_FIELD
|
|
5605
|
+
),
|
|
5606
|
+
errors: formUtils.getFieldErrors(
|
|
5607
|
+
form.errors?.additionalInformation ?? {},
|
|
5608
|
+
validationErrors,
|
|
5609
|
+
INDUSTRY_CODE_FIELD
|
|
5610
|
+
),
|
|
5611
|
+
labels: {
|
|
5612
|
+
industryCodes: t(($) => $["industry"], {
|
|
5613
|
+
ns: "businessLines"
|
|
5614
|
+
})
|
|
5615
|
+
},
|
|
5616
|
+
guidanceText: {
|
|
5617
|
+
industryCodes: t(($) => $["primaryIndustryCodeGuidance"], {
|
|
5618
|
+
ns: "businessLines"
|
|
5619
|
+
})
|
|
5620
|
+
},
|
|
5621
|
+
readonly: formUtils.isReadOnly("industryCodes"),
|
|
5622
|
+
handleChangeFor,
|
|
5623
|
+
businessLineTypes,
|
|
5624
|
+
single: true
|
|
5625
|
+
}
|
|
5626
|
+
) }),
|
|
5627
|
+
showField(DATE_OF_INCORPORATION_FIELD) && /* @__PURE__ */ jsx("div", { className: "adyen-kyc-field-wrapper", children: /* @__PURE__ */ jsx(
|
|
5628
|
+
DateOfIncorporationField,
|
|
5629
|
+
{
|
|
5630
|
+
data: formUtils.getFieldData(
|
|
5631
|
+
form.data?.additionalInformation ?? {},
|
|
5632
|
+
DATE_OF_INCORPORATION_FIELD
|
|
5633
|
+
),
|
|
5634
|
+
valid: formUtils.getFieldValid(
|
|
5635
|
+
form.valid?.additionalInformation ?? {},
|
|
5636
|
+
DATE_OF_INCORPORATION_FIELD
|
|
5637
|
+
),
|
|
5638
|
+
errors: formUtils.getFieldErrors(
|
|
5639
|
+
form.errors?.additionalInformation ?? {},
|
|
5640
|
+
validationErrors,
|
|
5641
|
+
DATE_OF_INCORPORATION_FIELD
|
|
5642
|
+
),
|
|
5643
|
+
labels: formUtils.getFieldLabels(DATE_OF_INCORPORATION_FIELD),
|
|
5644
|
+
placeholders: formUtils.getFieldPlaceholders(DATE_OF_INCORPORATION_FIELD, {
|
|
5645
|
+
dateOfIncorporation: "datePlaceholder"
|
|
5646
|
+
}),
|
|
5647
|
+
readonly: formUtils.isReadOnly("dateOfIncorporation"),
|
|
5648
|
+
handleChangeFor
|
|
5649
|
+
}
|
|
5650
|
+
) })
|
|
5651
|
+
] })
|
|
5652
|
+
] }),
|
|
5653
|
+
showStockData && /* @__PURE__ */ jsxs("section", { children: [
|
|
5654
|
+
/* @__PURE__ */ jsx("div", { className: "adyen-kyc-additional-information__section-heading", children: /* @__PURE__ */ jsx(Typography, { el: "h3", variant: "title", children: t(($) => $["stockExchangeInformation"], { ns: "business" }) }) }),
|
|
5655
|
+
/* @__PURE__ */ jsxs("fieldset", { children: [
|
|
5656
|
+
showField(STOCK_EXCHANGE_MIC_FIELD) && /* @__PURE__ */ jsx("div", { className: "adyen-kyc-field-wrapper", children: /* @__PURE__ */ jsx(
|
|
5657
|
+
StockExchangeMICField,
|
|
5658
|
+
{
|
|
5659
|
+
data: formUtils.getFieldData(
|
|
5660
|
+
form.data?.additionalInformation ?? {},
|
|
5661
|
+
STOCK_EXCHANGE_MIC_FIELD
|
|
5662
|
+
),
|
|
5663
|
+
valid: formUtils.getFieldValid(
|
|
5664
|
+
form.valid?.additionalInformation ?? {},
|
|
5665
|
+
STOCK_EXCHANGE_MIC_FIELD
|
|
5666
|
+
),
|
|
5667
|
+
errors: formUtils.getFieldErrors(
|
|
5668
|
+
form.errors?.additionalInformation ?? {},
|
|
5669
|
+
validationErrors,
|
|
5670
|
+
STOCK_EXCHANGE_MIC_FIELD
|
|
5671
|
+
),
|
|
5672
|
+
labels: formUtils.getFieldLabels(STOCK_EXCHANGE_MIC_FIELD),
|
|
5673
|
+
placeholders: formUtils.getFieldPlaceholders(STOCK_EXCHANGE_MIC_FIELD),
|
|
5674
|
+
mask: formUtils.getMask("stockExchangeMIC"),
|
|
5675
|
+
guidanceText: formUtils.getFieldGuidanceText(STOCK_EXCHANGE_MIC_FIELD),
|
|
5676
|
+
readonly: formUtils.isReadOnly("stockExchangeMIC"),
|
|
5677
|
+
shouldValidate,
|
|
5678
|
+
handleChangeFor
|
|
5679
|
+
}
|
|
5680
|
+
) }),
|
|
5681
|
+
showField(STOCK_ISIN_FIELD) && /* @__PURE__ */ jsx("div", { className: "adyen-kyc-field-wrapper", children: /* @__PURE__ */ jsx(
|
|
5682
|
+
StockISINField,
|
|
5683
|
+
{
|
|
5684
|
+
data: formUtils.getFieldData(
|
|
5685
|
+
form.data?.additionalInformation ?? {},
|
|
5686
|
+
STOCK_ISIN_FIELD
|
|
5687
|
+
),
|
|
5688
|
+
valid: formUtils.getFieldValid(
|
|
5689
|
+
form.valid?.additionalInformation ?? {},
|
|
5690
|
+
STOCK_ISIN_FIELD
|
|
5691
|
+
),
|
|
5692
|
+
errors: formUtils.getFieldErrors(
|
|
5693
|
+
form.errors?.additionalInformation ?? {},
|
|
5694
|
+
validationErrors,
|
|
5695
|
+
STOCK_ISIN_FIELD
|
|
5696
|
+
),
|
|
5697
|
+
labels: formUtils.getFieldLabels(STOCK_ISIN_FIELD),
|
|
5698
|
+
placeholders: formUtils.getFieldPlaceholders(STOCK_ISIN_FIELD),
|
|
5699
|
+
mask: formUtils.getMask("stockISIN"),
|
|
5700
|
+
guidanceText: formUtils.getFieldGuidanceText(STOCK_ISIN_FIELD),
|
|
5701
|
+
readonly: formUtils.isReadOnly("stockISIN"),
|
|
5702
|
+
shouldValidate,
|
|
5703
|
+
handleChangeFor
|
|
5704
|
+
}
|
|
5705
|
+
) }),
|
|
5706
|
+
showField(STOCK_TICKER_SYMBOL_FIELD) && /* @__PURE__ */ jsx("div", { className: "adyen-kyc-field-wrapper", children: /* @__PURE__ */ jsx(
|
|
5707
|
+
StockTickerSymbolField,
|
|
5708
|
+
{
|
|
5709
|
+
data: formUtils.getFieldData(
|
|
5710
|
+
form.data?.additionalInformation ?? {},
|
|
5711
|
+
STOCK_TICKER_SYMBOL_FIELD
|
|
5712
|
+
),
|
|
5713
|
+
valid: formUtils.getFieldValid(
|
|
5714
|
+
form.valid?.additionalInformation ?? {},
|
|
5715
|
+
STOCK_TICKER_SYMBOL_FIELD
|
|
5716
|
+
),
|
|
5717
|
+
errors: formUtils.getFieldErrors(
|
|
5718
|
+
form.errors?.additionalInformation ?? {},
|
|
5719
|
+
validationErrors,
|
|
5720
|
+
STOCK_TICKER_SYMBOL_FIELD
|
|
5721
|
+
),
|
|
5722
|
+
labels: formUtils.getFieldLabels(STOCK_TICKER_SYMBOL_FIELD),
|
|
5723
|
+
placeholders: formUtils.getFieldPlaceholders(STOCK_TICKER_SYMBOL_FIELD),
|
|
5724
|
+
mask: formUtils.getMask("stockTickerSymbol"),
|
|
5725
|
+
guidanceText: formUtils.getFieldGuidanceText(STOCK_TICKER_SYMBOL_FIELD),
|
|
5726
|
+
readonly: formUtils.isReadOnly("stockTickerSymbol"),
|
|
5727
|
+
shouldValidate,
|
|
5728
|
+
handleChangeFor
|
|
5729
|
+
}
|
|
5730
|
+
) })
|
|
5731
|
+
] })
|
|
5732
|
+
] }),
|
|
5733
|
+
/* @__PURE__ */ jsxs("section", { "data-testid": "registeredBusinessAddress", children: [
|
|
5734
|
+
/* @__PURE__ */ jsxs("div", { className: "adyen-kyc-additional-information__section-heading", children: [
|
|
5735
|
+
/* @__PURE__ */ jsx(Typography, { el: "h3", variant: "title", children: t(($) => $["registeredBusinessAddress"], { ns: "business" }) }),
|
|
5736
|
+
/* @__PURE__ */ jsx(Typography, { el: "p", variant: "body", children: registrationAddressDescription })
|
|
5737
|
+
] }),
|
|
5738
|
+
country === CountryCodes.Japan ? /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(Loader, {}), children: /* @__PURE__ */ jsx(
|
|
5739
|
+
LazyJpAddress,
|
|
5740
|
+
{
|
|
5741
|
+
id: ADDITIONAL_INFORMATION_FORM_ID,
|
|
5742
|
+
addressType: "registrationAddress",
|
|
5743
|
+
data: { ...form.data.additionalInformation?.registrationAddress, country },
|
|
5744
|
+
shouldValidate,
|
|
5745
|
+
onChange: handleRegistrationAddressChange
|
|
5746
|
+
}
|
|
5747
|
+
) }) : /* @__PURE__ */ jsx(
|
|
5748
|
+
Address,
|
|
5749
|
+
{
|
|
5750
|
+
id: ADDITIONAL_INFORMATION_FORM_ID,
|
|
5751
|
+
addressType: "registrationAddress",
|
|
5752
|
+
data: {
|
|
5753
|
+
...form.data.additionalInformation?.registrationAddress,
|
|
5754
|
+
country
|
|
5755
|
+
},
|
|
5756
|
+
labels: getAddressSchemaLabelsByCountry(country),
|
|
5757
|
+
requiredFields: addressSchema,
|
|
5758
|
+
shouldValidate,
|
|
5759
|
+
hideCountry: true,
|
|
5760
|
+
optionalFields: ["otherAddressInformation"],
|
|
5761
|
+
readOnlyFields: verifiedBusiness$1?.state && verifiedBusiness$1?.state === form.data.basicInformation?.stateOrProvince ? ["stateOrProvince"] : [],
|
|
5762
|
+
trustedFields: getNestedTrustedFields(
|
|
5763
|
+
"registrationAddress",
|
|
5764
|
+
form.data.additionalInformation,
|
|
5765
|
+
form.trustedFields?.additionalInformation
|
|
5766
|
+
),
|
|
5767
|
+
onChange: handleRegistrationAddressChange,
|
|
5768
|
+
verifiedBusiness: verifiedBusiness$1,
|
|
5769
|
+
verifiedAddress: verifiedAddress?.registrationAddress,
|
|
5770
|
+
condensed: true
|
|
5771
|
+
}
|
|
5772
|
+
)
|
|
5773
|
+
] }),
|
|
5774
|
+
/* @__PURE__ */ jsxs("section", { "data-testid": "principalPlaceOfBusiness", children: [
|
|
5775
|
+
/* @__PURE__ */ jsxs("div", { className: "adyen-kyc-additional-information__section-heading", children: [
|
|
5776
|
+
/* @__PURE__ */ jsx(Typography, { el: "h3", variant: "title", children: t(($) => $["principalPlaceOfBusiness"], { ns: "business" }) }),
|
|
5777
|
+
/* @__PURE__ */ jsx(Typography, { el: "p", variant: "body", children: t(($) => $["thePhysicalLocationWhereABusiness"], { ns: "business" }) })
|
|
5778
|
+
] }),
|
|
5779
|
+
!mustProvideOperationalAddress && /* @__PURE__ */ jsx(
|
|
5780
|
+
Field,
|
|
5781
|
+
{
|
|
5782
|
+
el: "fieldset",
|
|
5783
|
+
name: "operationalAddressIsSame",
|
|
5784
|
+
errorMessage: form.errors?.additionalInformation?.operationalAddressIsSame?.errorMessage,
|
|
5785
|
+
isValid: form.valid?.additionalInformation?.operationalAddressIsSame,
|
|
5786
|
+
children: (childProps) => /* @__PURE__ */ jsx(
|
|
5787
|
+
Checkbox,
|
|
5788
|
+
{
|
|
5789
|
+
...childProps,
|
|
5790
|
+
"aria-required": formUtils.isRequiredField("operationalAddressIsSame"),
|
|
5791
|
+
"aria-invalid": !form.valid?.additionalInformation?.operationalAddressIsSame,
|
|
5792
|
+
name: "operationalAddressIsSame",
|
|
5793
|
+
label: formUtils.getLabel("sameAsRegisteredAddress"),
|
|
5794
|
+
checked: form.data?.additionalInformation?.operationalAddressIsSame ? form.data?.additionalInformation?.operationalAddressIsSame === operationalAddressIsSameIds.OPERATIONAL_ADDRESS_IS_SAME : true,
|
|
5795
|
+
onChange: handleOperationalAddressIsSameChange
|
|
5796
|
+
}
|
|
5797
|
+
)
|
|
5798
|
+
}
|
|
5799
|
+
),
|
|
5800
|
+
form.data?.additionalInformation?.operationalAddressIsSame === operationalAddressIsSameIds.OPERATIONAL_ADDRESS_IS_NOT_SAME && (country === CountryCodes.Japan ? /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(Loader, {}), children: /* @__PURE__ */ jsx(
|
|
5801
|
+
LazyJpAddress,
|
|
5802
|
+
{
|
|
5803
|
+
id: ADDITIONAL_INFORMATION_FORM_ID,
|
|
5804
|
+
addressType: "operationalAddress",
|
|
5805
|
+
data: { ...form.data.additionalInformation.operationalAddress, country },
|
|
5806
|
+
shouldValidate,
|
|
5807
|
+
onChange: handleOperationalAddressChange
|
|
5808
|
+
}
|
|
5809
|
+
) }) : /* @__PURE__ */ jsx(
|
|
5810
|
+
Address,
|
|
5811
|
+
{
|
|
5812
|
+
id: ADDITIONAL_INFORMATION_FORM_ID,
|
|
5813
|
+
addressType: "operationalAddress",
|
|
5814
|
+
data: {
|
|
5815
|
+
...form.defaultData?.additionalInformation?.operationalAddress,
|
|
5816
|
+
country
|
|
5817
|
+
},
|
|
5818
|
+
labels: getAddressSchemaLabelsByCountry(country),
|
|
5819
|
+
requiredFields: addressSchema,
|
|
5820
|
+
shouldValidate,
|
|
5821
|
+
hideCountry: true,
|
|
5822
|
+
optionalFields: ["otherAddressInformation"],
|
|
5823
|
+
trustedFields: getNestedTrustedFields(
|
|
5824
|
+
"operationalAddress",
|
|
5825
|
+
form.data?.additionalInformation,
|
|
5826
|
+
form.trustedFields?.additionalInformation
|
|
5827
|
+
),
|
|
5828
|
+
onChange: handleOperationalAddressChange,
|
|
5829
|
+
verifiedBusiness: verifiedBusiness$1,
|
|
5830
|
+
verifiedAddress: verifiedAddress?.operationalAddress,
|
|
5831
|
+
condensed: true
|
|
5832
|
+
}
|
|
5833
|
+
))
|
|
5834
|
+
] })
|
|
5835
|
+
] })
|
|
5836
|
+
] });
|
|
5837
|
+
}
|
|
5838
|
+
[
|
|
5839
|
+
...COUNTRY_FIELD,
|
|
5840
|
+
...LEGAL_COMPANY_NAME_FIELD,
|
|
5841
|
+
"jaHaniLegalCompanyName",
|
|
5842
|
+
"jaKanaLegalCompanyName",
|
|
5843
|
+
...TAX_INFORMATION_FIELD,
|
|
5844
|
+
...STATE_FIELD,
|
|
5845
|
+
...BUSINESS_REGISTRATION_NUMBER_FIELD,
|
|
5846
|
+
...COUNTRY_OF_GOVERNING_LAW_FIELD
|
|
5847
|
+
];
|
|
5848
|
+
const FormDescription = ({ description }) => {
|
|
5849
|
+
const { t } = useTranslation("common");
|
|
5850
|
+
return /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-form-header__description", children: [
|
|
5851
|
+
t(($) => $[description]),
|
|
5852
|
+
" ",
|
|
5853
|
+
/* @__PURE__ */ jsx(Link, { href: "https://www.adyen.com/privacy-policy", external: true, children: t(($) => $["privacyStatement"]) })
|
|
5854
|
+
] });
|
|
5855
|
+
};
|
|
5856
|
+
function BasicInformationMultiform({
|
|
5857
|
+
id,
|
|
5858
|
+
country,
|
|
5859
|
+
shouldValidate,
|
|
5860
|
+
heading = "basicInformationFormHeading",
|
|
5861
|
+
description = "basicInformationFormDescription",
|
|
5862
|
+
validationErrors = {},
|
|
5863
|
+
verificationErrors = {},
|
|
5864
|
+
isTopLevelEntity,
|
|
5865
|
+
disableCountry,
|
|
5866
|
+
companyType
|
|
5867
|
+
}) {
|
|
5868
|
+
const { t } = useTranslation("common");
|
|
5869
|
+
const { isSettingEnabled } = useSettingsContext();
|
|
5870
|
+
const { isExperimentEnabled } = useExperimentsContext();
|
|
5871
|
+
const { form } = useFormContext();
|
|
5872
|
+
const allowedCountries = useAllowedCountries();
|
|
5873
|
+
const isAllowedEditPrefilledCountry = isSettingEnabled(SettingNames.AllowPrefilledCountryEdit);
|
|
5874
|
+
const state = form.data?.basicInformation?.stateOrProvince;
|
|
5875
|
+
const currentCountryTaxInformation = form.data?.basicInformation?.taxInformation?.find(
|
|
5876
|
+
(tax) => tax.country === country
|
|
5877
|
+
);
|
|
5878
|
+
const handleChangeFor = useCallback(
|
|
5879
|
+
(fieldName, mode) => form.handleChangeFor(fieldName, "basicInformation", mode),
|
|
5880
|
+
[form]
|
|
5881
|
+
);
|
|
5882
|
+
const formUtils = useMemo(() => {
|
|
5883
|
+
const initialProps = {
|
|
5884
|
+
data: form.data?.basicInformation ?? {},
|
|
5885
|
+
fieldValidationErrors: validationErrors,
|
|
5886
|
+
formVerificationErrors: verificationErrors,
|
|
5887
|
+
allFields: form.allFields?.basicInformation ?? [],
|
|
5888
|
+
requiredFields: form.requiredFields?.basicInformation ?? [],
|
|
5889
|
+
optionalFields: form.optionalFields?.basicInformation ?? [],
|
|
5890
|
+
trustedFields: form.trustedFields?.basicInformation ?? [],
|
|
5891
|
+
obscuredFields: form.obscuredFields?.basicInformation ?? [],
|
|
5892
|
+
errors: form.errors?.basicInformation ?? {},
|
|
5893
|
+
valid: form.valid?.basicInformation ?? {},
|
|
5894
|
+
handleFieldChange: handleChangeFor
|
|
5895
|
+
};
|
|
5896
|
+
const formUtilProps = initialProps.allFields?.reduce((acc, field) => {
|
|
5897
|
+
switch (field) {
|
|
5898
|
+
case "country":
|
|
5899
|
+
return acc;
|
|
5900
|
+
case "legalCompanyName":
|
|
5901
|
+
return mergeFieldMetadataIntoProps(
|
|
5902
|
+
field,
|
|
5903
|
+
resolveFieldMetadata(
|
|
5904
|
+
isExperimentEnabled("StrictNameAndAddressValidationV4") ? defaultFieldConfigV4[country] : defaultFieldConfig$2[country],
|
|
5905
|
+
{ isBusiness: true },
|
|
5906
|
+
isExperimentEnabled("StrictNameAndAddressValidationV4") ? defaultFieldMetadataV4 : defaultFieldMetadata$2
|
|
5907
|
+
),
|
|
5908
|
+
acc
|
|
5909
|
+
);
|
|
5910
|
+
case "countryOfGoverningLaw":
|
|
5911
|
+
return acc;
|
|
5912
|
+
case "stateOrProvince":
|
|
5913
|
+
return mergeFieldMetadataIntoProps(
|
|
5914
|
+
field,
|
|
5915
|
+
resolveFieldMetadata(
|
|
5916
|
+
defaultFieldConfig[country],
|
|
5917
|
+
{ isBusiness: true },
|
|
5918
|
+
defaultFieldMetadata
|
|
5919
|
+
),
|
|
5920
|
+
acc
|
|
5921
|
+
);
|
|
5922
|
+
case "taxInformation":
|
|
5923
|
+
return mergeFieldMetadataIntoProps(
|
|
5924
|
+
field,
|
|
5925
|
+
resolveFieldMetadata(
|
|
5926
|
+
taxInformationDefaultFieldConfig[country],
|
|
5927
|
+
{
|
|
5928
|
+
taxIdNumberType: currentCountryTaxInformation?.type,
|
|
5929
|
+
companyType
|
|
5930
|
+
},
|
|
5931
|
+
taxInformationDefaultFieldMetadata
|
|
5932
|
+
),
|
|
5933
|
+
acc
|
|
5934
|
+
);
|
|
5935
|
+
case "registrationNumber":
|
|
5936
|
+
return mergeFieldMetadataIntoProps(
|
|
5937
|
+
field,
|
|
5938
|
+
resolveFieldMetadata(
|
|
5939
|
+
registrationNumberDefaultFieldConfig[country],
|
|
5940
|
+
{
|
|
5941
|
+
companyType,
|
|
5942
|
+
registrationNumberType: form.data?.additionalInformation?.registrationNumberType,
|
|
5943
|
+
state,
|
|
5944
|
+
isExperimentEnabled
|
|
5945
|
+
},
|
|
5946
|
+
registrationNumberDefaultFieldMetadata
|
|
5947
|
+
),
|
|
5948
|
+
acc
|
|
5949
|
+
);
|
|
5950
|
+
case "jaHaniLegalCompanyName":
|
|
5951
|
+
return mergeFieldMetadataIntoProps(
|
|
5952
|
+
field,
|
|
5953
|
+
resolveFieldMetadata(
|
|
5954
|
+
localizedLegalCompanyNameFieldConfig.jaHaniLegalCompanyName.config,
|
|
5955
|
+
{},
|
|
5956
|
+
localizedLegalCompanyNameFieldConfig.jaHaniLegalCompanyName.metadata
|
|
5957
|
+
),
|
|
5958
|
+
acc
|
|
5959
|
+
);
|
|
5960
|
+
case "jaKanaLegalCompanyName":
|
|
5961
|
+
return mergeFieldMetadataIntoProps(
|
|
5962
|
+
field,
|
|
5963
|
+
resolveFieldMetadata(
|
|
5964
|
+
localizedLegalCompanyNameFieldConfig.jaKanaLegalCompanyName.config,
|
|
5965
|
+
{},
|
|
5966
|
+
localizedLegalCompanyNameFieldConfig.jaKanaLegalCompanyName.metadata
|
|
5967
|
+
),
|
|
5968
|
+
acc
|
|
5969
|
+
);
|
|
5970
|
+
default:
|
|
5971
|
+
return acc;
|
|
5972
|
+
}
|
|
5973
|
+
}, initialProps);
|
|
5974
|
+
return createFormUtils(formUtilProps ?? initialProps, t);
|
|
5975
|
+
}, [
|
|
5976
|
+
companyType,
|
|
5977
|
+
country,
|
|
5978
|
+
currentCountryTaxInformation?.type,
|
|
5979
|
+
form.allFields?.basicInformation,
|
|
5980
|
+
form.data?.additionalInformation?.registrationNumberType,
|
|
5981
|
+
form.data?.basicInformation,
|
|
5982
|
+
form.errors?.basicInformation,
|
|
5983
|
+
form.obscuredFields?.basicInformation,
|
|
5984
|
+
form.optionalFields?.basicInformation,
|
|
5985
|
+
form.requiredFields?.basicInformation,
|
|
5986
|
+
form.trustedFields?.basicInformation,
|
|
5987
|
+
form.valid?.basicInformation,
|
|
5988
|
+
handleChangeFor,
|
|
5989
|
+
isExperimentEnabled,
|
|
5990
|
+
state,
|
|
5991
|
+
t,
|
|
5992
|
+
validationErrors,
|
|
5993
|
+
verificationErrors
|
|
5994
|
+
]);
|
|
5995
|
+
const showField = (fieldKeys) => fieldKeys.some((field) => {
|
|
5996
|
+
switch (field) {
|
|
5997
|
+
case "registrationNumberType":
|
|
5998
|
+
case "registrationNumber": {
|
|
5999
|
+
return (formUtils.isRequiredField(field) || formUtils.isOptionalField(field)) && form.data.basicInformation?.stateOrProvince;
|
|
6000
|
+
}
|
|
6001
|
+
default:
|
|
6002
|
+
return formUtils.isRequiredField(field) || formUtils.isOptionalField(field);
|
|
6003
|
+
}
|
|
6004
|
+
});
|
|
6005
|
+
const legalCompanyNameFields = useLegalCompanyNameField({
|
|
6006
|
+
data: form.data.basicInformation ?? {},
|
|
6007
|
+
valid: form.valid.basicInformation ?? {},
|
|
6008
|
+
errors: form.errors.basicInformation ?? {},
|
|
6009
|
+
fieldProblems: form.fieldProblems.basicInformation ?? {},
|
|
6010
|
+
country,
|
|
6011
|
+
formUtils,
|
|
6012
|
+
handleChange: handleChangeFor
|
|
6013
|
+
});
|
|
6014
|
+
return /* @__PURE__ */ jsxs("form", { id, className: "adyen-kyc-basic-information", children: [
|
|
6015
|
+
/* @__PURE__ */ jsx(Header, { title: t(($) => $[heading]), children: /* @__PURE__ */ jsx(FormDescription, { slot: "description", description }) }),
|
|
6016
|
+
/* @__PURE__ */ jsx(
|
|
6017
|
+
ErrorPanel,
|
|
6018
|
+
{
|
|
6019
|
+
id: "ariaErrorField",
|
|
6020
|
+
verificationErrors,
|
|
6021
|
+
validationErrors,
|
|
6022
|
+
formUtils
|
|
6023
|
+
}
|
|
6024
|
+
),
|
|
6025
|
+
/* @__PURE__ */ jsx("fieldset", { children: /* @__PURE__ */ jsx("div", { className: "adyen-kyc-field-wrapper", children: /* @__PURE__ */ jsx(
|
|
6026
|
+
CountryField,
|
|
6027
|
+
{
|
|
6028
|
+
data: formUtils.getFieldData(form.data?.basicInformation ?? {}, COUNTRY_FIELD),
|
|
6029
|
+
valid: formUtils.getFieldValid(form.valid?.basicInformation ?? {}, COUNTRY_FIELD),
|
|
6030
|
+
errors: formUtils.getFieldErrors(
|
|
6031
|
+
form.errors?.basicInformation ?? {},
|
|
6032
|
+
validationErrors,
|
|
6033
|
+
COUNTRY_FIELD
|
|
6034
|
+
),
|
|
6035
|
+
labels: formUtils.getFieldLabels(COUNTRY_FIELD, {
|
|
6036
|
+
country: "countryRegionOfEstablishment"
|
|
6037
|
+
}),
|
|
6038
|
+
readonly: formUtils.isReadOnly("country") || !isAllowedEditPrefilledCountry || Boolean(disableCountry),
|
|
6039
|
+
handleChangeFor,
|
|
6040
|
+
allowedCountries: isTopLevelEntity ? allowedCountries : void 0
|
|
6041
|
+
}
|
|
6042
|
+
) }) }),
|
|
6043
|
+
/* @__PURE__ */ jsxs("fieldset", { children: [
|
|
6044
|
+
COUNTRY_OF_GOVERNING_LAW_POSSIBLE.includes(country) && showField(COUNTRY_OF_GOVERNING_LAW_FIELD) && /* @__PURE__ */ jsx("div", { className: "adyen-kyc-field-wrapper", children: /* @__PURE__ */ jsx(
|
|
6045
|
+
CountryOfGoverningLawField,
|
|
6046
|
+
{
|
|
6047
|
+
data: formUtils.getFieldData(
|
|
6048
|
+
form.data?.basicInformation ?? {},
|
|
6049
|
+
COUNTRY_OF_GOVERNING_LAW_FIELD
|
|
6050
|
+
),
|
|
6051
|
+
country,
|
|
6052
|
+
valid: formUtils.getFieldValid(
|
|
6053
|
+
form.valid?.basicInformation ?? {},
|
|
6054
|
+
COUNTRY_OF_GOVERNING_LAW_FIELD
|
|
6055
|
+
),
|
|
6056
|
+
errors: formUtils.getFieldErrors(
|
|
6057
|
+
form.errors?.basicInformation ?? {},
|
|
6058
|
+
validationErrors,
|
|
6059
|
+
COUNTRY_OF_GOVERNING_LAW_FIELD
|
|
6060
|
+
),
|
|
6061
|
+
labels: formUtils.getFieldLabels(COUNTRY_OF_GOVERNING_LAW_FIELD),
|
|
6062
|
+
readonly: false,
|
|
6063
|
+
allowedCountries: isTopLevelEntity ? allowedCountries : void 0,
|
|
6064
|
+
handleChangeFor
|
|
6065
|
+
}
|
|
6066
|
+
) }),
|
|
6067
|
+
// fields shown here are abstracted by useLegalCompanyNameField
|
|
6068
|
+
legalCompanyNameFields.map((field) => /* @__PURE__ */ jsx("div", { className: "adyen-kyc-field-wrapper", children: /* @__PURE__ */ jsx(
|
|
6069
|
+
Field,
|
|
6070
|
+
{
|
|
6071
|
+
name: field?.name ?? "",
|
|
6072
|
+
label: field?.label,
|
|
6073
|
+
helper: field?.helper,
|
|
6074
|
+
errorMessage: field?.errorMessage,
|
|
6075
|
+
isValid: Boolean(field?.isValid),
|
|
6076
|
+
children: (childProps) => /* @__PURE__ */ jsx(
|
|
6077
|
+
InputText,
|
|
6078
|
+
{
|
|
6079
|
+
...childProps,
|
|
6080
|
+
"aria-required": true,
|
|
6081
|
+
"aria-invalid": !field?.isValid,
|
|
6082
|
+
name: field?.name,
|
|
6083
|
+
value: field?.value,
|
|
6084
|
+
readonly: field?.readonly,
|
|
6085
|
+
onInput: field ? field.onInput : () => {
|
|
6086
|
+
},
|
|
6087
|
+
transformInput: field?.transformInput,
|
|
6088
|
+
transformMode: field?.transformMode,
|
|
6089
|
+
onBlur: field?.onBlur,
|
|
6090
|
+
onKeyDown: field?.onKeyDown
|
|
6091
|
+
}
|
|
6092
|
+
)
|
|
6093
|
+
},
|
|
6094
|
+
field?.name
|
|
6095
|
+
) }, field?.name)),
|
|
6096
|
+
showField(TAX_INFORMATION_FIELD) && /* @__PURE__ */ jsx("div", { className: "adyen-kyc-field-wrapper", children: /* @__PURE__ */ jsx(
|
|
6097
|
+
TaxInformationField,
|
|
6098
|
+
{
|
|
6099
|
+
data: formUtils.getFieldData(
|
|
6100
|
+
form.data?.basicInformation ?? {},
|
|
6101
|
+
TAX_INFORMATION_FIELD
|
|
6102
|
+
),
|
|
6103
|
+
valid: formUtils.getFieldValid(
|
|
6104
|
+
form.valid?.basicInformation ?? {},
|
|
6105
|
+
TAX_INFORMATION_FIELD
|
|
6106
|
+
),
|
|
6107
|
+
errors: formUtils.getFieldErrors(
|
|
6108
|
+
form.errors?.basicInformation ?? {},
|
|
6109
|
+
validationErrors,
|
|
6110
|
+
TAX_INFORMATION_FIELD
|
|
6111
|
+
),
|
|
6112
|
+
labels: formUtils.getFieldLabels(TAX_INFORMATION_FIELD, {
|
|
6113
|
+
exemptedFromTax: "iDontHaveATaxId"
|
|
6114
|
+
}),
|
|
6115
|
+
mask: formUtils.getMask("taxInformation"),
|
|
6116
|
+
placeholders: formUtils.getFieldPlaceholders(TAX_INFORMATION_FIELD),
|
|
6117
|
+
guidanceText: formUtils.getFieldGuidanceText(TAX_INFORMATION_FIELD),
|
|
6118
|
+
readonly: formUtils.isReadOnly("taxInformation"),
|
|
6119
|
+
shouldValidate,
|
|
6120
|
+
handleChangeFor,
|
|
6121
|
+
canExempt: showField(["exemptedFromTax"]),
|
|
6122
|
+
registrationNumber: form.data.additionalInformation?.registrationNumber,
|
|
6123
|
+
country,
|
|
6124
|
+
entityType: companyType,
|
|
6125
|
+
defaultData: form.defaultData?.basicInformation?.taxInformation
|
|
6126
|
+
}
|
|
6127
|
+
) }),
|
|
6128
|
+
showField(STATE_FIELD) && /* @__PURE__ */ jsx("div", { className: "adyen-kyc-field-wrapper", children: /* @__PURE__ */ jsx(
|
|
6129
|
+
StateField,
|
|
6130
|
+
{
|
|
6131
|
+
data: formUtils.getFieldData(form.data?.basicInformation ?? {}, STATE_FIELD),
|
|
6132
|
+
valid: formUtils.getFieldValid(form.valid?.basicInformation ?? {}, STATE_FIELD),
|
|
6133
|
+
errors: formUtils.getFieldErrors(
|
|
6134
|
+
form.errors?.basicInformation ?? {},
|
|
6135
|
+
validationErrors,
|
|
6136
|
+
STATE_FIELD
|
|
6137
|
+
),
|
|
6138
|
+
labels: formUtils.getFieldLabels(STATE_FIELD),
|
|
6139
|
+
placeholders: formUtils.getFieldPlaceholders(STATE_FIELD),
|
|
6140
|
+
readonly: formUtils.isReadOnly("stateOrProvince"),
|
|
6141
|
+
handleChangeFor,
|
|
6142
|
+
selectedCountry: country
|
|
6143
|
+
}
|
|
6144
|
+
) }),
|
|
6145
|
+
showField(BUSINESS_REGISTRATION_NUMBER_FIELD) && /* @__PURE__ */ jsx("div", { className: "adyen-kyc-field-wrapper", children: /* @__PURE__ */ jsx(
|
|
6146
|
+
BusinessRegistrationNumberField,
|
|
6147
|
+
{
|
|
6148
|
+
data: formUtils.getFieldData(
|
|
6149
|
+
form.data?.basicInformation ?? {},
|
|
6150
|
+
BUSINESS_REGISTRATION_NUMBER_FIELD
|
|
6151
|
+
),
|
|
6152
|
+
valid: formUtils.getFieldValid(
|
|
6153
|
+
form.valid?.basicInformation ?? {},
|
|
6154
|
+
BUSINESS_REGISTRATION_NUMBER_FIELD
|
|
6155
|
+
),
|
|
6156
|
+
errors: formUtils.getFieldErrors(
|
|
6157
|
+
form.errors?.basicInformation ?? {},
|
|
6158
|
+
validationErrors,
|
|
6159
|
+
BUSINESS_REGISTRATION_NUMBER_FIELD
|
|
6160
|
+
),
|
|
6161
|
+
labels: formUtils.getFieldLabels(BUSINESS_REGISTRATION_NUMBER_FIELD, {
|
|
6162
|
+
exemptedFromRegistrationNumber: "iDontHaveARegistrationNumber"
|
|
6163
|
+
}),
|
|
6164
|
+
mask: formUtils.getMask("registrationNumber"),
|
|
6165
|
+
guidanceText: formUtils.getFieldGuidanceText(BUSINESS_REGISTRATION_NUMBER_FIELD),
|
|
6166
|
+
placeholders: formUtils.getFieldPlaceholders(BUSINESS_REGISTRATION_NUMBER_FIELD),
|
|
6167
|
+
helperText: formUtils.getFieldHelperText(BUSINESS_REGISTRATION_NUMBER_FIELD),
|
|
6168
|
+
readonly: formUtils.isReadOnly("registrationNumber"),
|
|
6169
|
+
optional: formUtils.isOptionalField("registrationNumber"),
|
|
6170
|
+
shouldValidate,
|
|
6171
|
+
handleChangeFor,
|
|
6172
|
+
country,
|
|
6173
|
+
canExempt: showField(["exemptedFromRegistrationNumber"]),
|
|
6174
|
+
companyType
|
|
6175
|
+
}
|
|
6176
|
+
) })
|
|
6177
|
+
] })
|
|
6178
|
+
] });
|
|
6179
|
+
}
|
|
6180
|
+
function CompanyStructureMultiform({
|
|
6181
|
+
id,
|
|
6182
|
+
country,
|
|
6183
|
+
heading = "companyStructureFormName",
|
|
6184
|
+
description = "companyStructureFormDescription",
|
|
6185
|
+
validationErrors = {},
|
|
6186
|
+
verificationErrors = {}
|
|
6187
|
+
}) {
|
|
6188
|
+
const { t } = useTranslation(["common", "business"]);
|
|
6189
|
+
const { form } = useFormContext();
|
|
6190
|
+
const { accountHolder } = useAccountHolder();
|
|
6191
|
+
const { isSettingEnabled } = useSettingsContext();
|
|
6192
|
+
const canChangeEntityType = isSettingEnabled(SettingNames.AllowLegalEntityTypeChange);
|
|
6193
|
+
const formUtils = createFormUtils(
|
|
6194
|
+
{ requiredFields: form.requiredFields?.companyStructure ?? [] },
|
|
6195
|
+
t
|
|
6196
|
+
);
|
|
6197
|
+
const excludedTypes = [
|
|
6198
|
+
CompanyTypesValues.INCORPORATED_PARTNERSHIP,
|
|
6199
|
+
CompanyTypesValues.INCORPORATED_ASSOCIATION
|
|
6200
|
+
];
|
|
6201
|
+
if (isBankAccountRequestedForOrganization.value) {
|
|
6202
|
+
excludedTypes.push(CompanyTypesValues.GOVERNMENTAL_ORGANIZATION);
|
|
6203
|
+
}
|
|
6204
|
+
const companyTypeRadioOptions = canChangeEntityType && accountHolder !== "aTrust" && accountHolder !== "anUnincorporatedPartnership" ? companyTypeOptions.filter((companyType) => !excludedTypes.includes(companyType)) : companyTypeOptions;
|
|
6205
|
+
const companyTypeExamples2 = useCompanyTypeExamples(country);
|
|
6206
|
+
return /* @__PURE__ */ jsxs("form", { id, className: "adyen-kyc-company-structure", children: [
|
|
6207
|
+
/* @__PURE__ */ jsx(Header, { title: t(($) => $[heading]), description: t(($) => $[description]) }),
|
|
6208
|
+
/* @__PURE__ */ jsx(
|
|
6209
|
+
ErrorPanel,
|
|
6210
|
+
{
|
|
6211
|
+
id: "ariaErrorField",
|
|
6212
|
+
verificationErrors,
|
|
6213
|
+
validationErrors,
|
|
6214
|
+
formUtils
|
|
6215
|
+
}
|
|
6216
|
+
),
|
|
6217
|
+
/* @__PURE__ */ jsx(
|
|
6218
|
+
Field,
|
|
6219
|
+
{
|
|
6220
|
+
el: "fieldset",
|
|
6221
|
+
name: "entityType",
|
|
6222
|
+
errorMessage: formUtils.getErrorMessage(
|
|
6223
|
+
"entityType",
|
|
6224
|
+
form.errors?.companyStructure,
|
|
6225
|
+
validationErrors
|
|
6226
|
+
),
|
|
6227
|
+
isValid: form.valid?.companyStructure?.entityType,
|
|
6228
|
+
children: (childProps) => /* @__PURE__ */ jsx(
|
|
6229
|
+
EntityTypeRadioGroupCard,
|
|
6230
|
+
{
|
|
6231
|
+
...childProps,
|
|
6232
|
+
name: "entityType",
|
|
6233
|
+
options: companyTypeRadioOptions,
|
|
6234
|
+
optionId: (option) => companyTypeMetadata[option].id,
|
|
6235
|
+
optionName: (option) => t(($) => $[companyTypeMetadata[option].name], { ns: "business" }),
|
|
6236
|
+
optionDescription: (option) => t(($) => $[companyTypeMetadata[option].description], { ns: "business" }),
|
|
6237
|
+
selected: form.data?.companyStructure?.entityType,
|
|
6238
|
+
onSelect: form.handleChangeFor("entityType", "companyStructure"),
|
|
6239
|
+
examples: companyTypeExamples2,
|
|
6240
|
+
"aria-required": true,
|
|
6241
|
+
"aria-invalid": !form.valid?.companyStructure?.entityType
|
|
6242
|
+
}
|
|
6243
|
+
)
|
|
6244
|
+
}
|
|
6245
|
+
)
|
|
6246
|
+
] });
|
|
6247
|
+
}
|
|
6248
|
+
function BusinessDetailsMultiform({
|
|
6249
|
+
taskType,
|
|
6250
|
+
country,
|
|
6251
|
+
activeForm,
|
|
6252
|
+
shouldValidate,
|
|
6253
|
+
problems = {},
|
|
6254
|
+
handleNextClick,
|
|
6255
|
+
handleBackClick,
|
|
6256
|
+
setLoadingStatus,
|
|
6257
|
+
isTopLevelEntity
|
|
6258
|
+
}) {
|
|
6259
|
+
const { t } = useTranslation(["common", "business"]);
|
|
6260
|
+
const { form } = useFormContext();
|
|
6261
|
+
const companyType = taskType === TaskTypes.SOLE_PROPRIETOR_COMPANY ? CompanyTypesValues.SOLE_PROPRIETORSHIP : form.data.companyStructure?.entityType;
|
|
6262
|
+
function handleChange(formName, fieldName, mode) {
|
|
6263
|
+
return form.handleChangeFor(fieldName, formName, mode);
|
|
6264
|
+
}
|
|
6265
|
+
const renderActiveForm = (activeForm2) => {
|
|
6266
|
+
switch (activeForm2.formId) {
|
|
6267
|
+
case "basicInformation":
|
|
6268
|
+
return /* @__PURE__ */ jsx(
|
|
6269
|
+
BasicInformationMultiform,
|
|
6270
|
+
{
|
|
6271
|
+
id: activeForm2.formId,
|
|
6272
|
+
country,
|
|
6273
|
+
shouldValidate,
|
|
6274
|
+
heading: activeForm2.formHeading,
|
|
6275
|
+
description: activeForm2.formDescription,
|
|
6276
|
+
validationErrors: problems.validationErrors?.[activeForm2.formId],
|
|
6277
|
+
verificationErrors: problems.verificationErrors?.[activeForm2.formId],
|
|
6278
|
+
companyType,
|
|
6279
|
+
isTopLevelEntity,
|
|
6280
|
+
disableCountry: taskType === TaskTypes.SOLE_PROPRIETOR_COMPANY
|
|
6281
|
+
}
|
|
6282
|
+
);
|
|
6283
|
+
case "businessSelection":
|
|
6284
|
+
return /* @__PURE__ */ jsx(
|
|
6285
|
+
BusinessSelectionMultiform,
|
|
6286
|
+
{
|
|
6287
|
+
id: activeForm2.formId,
|
|
6288
|
+
country,
|
|
6289
|
+
shouldValidate,
|
|
6290
|
+
heading: activeForm2.formHeading,
|
|
6291
|
+
description: activeForm2.formDescription,
|
|
6292
|
+
validationErrors: problems.validationErrors?.[activeForm2.formId],
|
|
6293
|
+
verificationErrors: problems.verificationErrors?.[activeForm2.formId],
|
|
6294
|
+
handleNextClick,
|
|
6295
|
+
handleBackClick,
|
|
6296
|
+
setLoadingStatus
|
|
6297
|
+
}
|
|
6298
|
+
);
|
|
6299
|
+
case "companyStructure":
|
|
6300
|
+
return /* @__PURE__ */ jsx(
|
|
6301
|
+
CompanyStructureMultiform,
|
|
6302
|
+
{
|
|
6303
|
+
id: activeForm2.formId,
|
|
6304
|
+
country,
|
|
6305
|
+
shouldValidate,
|
|
6306
|
+
heading: activeForm2.formHeading,
|
|
6307
|
+
description: activeForm2.formDescription,
|
|
6308
|
+
validationErrors: problems.validationErrors?.[activeForm2.formId],
|
|
6309
|
+
verificationErrors: problems.verificationErrors?.[activeForm2.formId]
|
|
6310
|
+
}
|
|
6311
|
+
);
|
|
6312
|
+
case "additionalInformation":
|
|
6313
|
+
return /* @__PURE__ */ jsx(
|
|
6314
|
+
AdditionalInformationMultiform,
|
|
6315
|
+
{
|
|
6316
|
+
id: activeForm2.formId,
|
|
6317
|
+
country,
|
|
6318
|
+
companyType,
|
|
6319
|
+
shouldValidate,
|
|
6320
|
+
heading: activeForm2.formHeading,
|
|
6321
|
+
description: activeForm2.formDescription,
|
|
6322
|
+
validationErrors: problems.validationErrors?.[activeForm2.formId],
|
|
6323
|
+
verificationErrors: problems.verificationErrors?.[activeForm2.formId]
|
|
6324
|
+
}
|
|
6325
|
+
);
|
|
6326
|
+
case "companyTaxDocument":
|
|
6327
|
+
return country === "US" ? /* @__PURE__ */ jsx(
|
|
6328
|
+
TaxDocument,
|
|
6329
|
+
{
|
|
6330
|
+
id: activeForm2.formId,
|
|
6331
|
+
country,
|
|
6332
|
+
companyType,
|
|
6333
|
+
shouldValidate,
|
|
6334
|
+
heading: activeForm2.formHeading,
|
|
6335
|
+
description: activeForm2.formDescription,
|
|
6336
|
+
fieldValidationErrors: problems.validationErrors?.[activeForm2.formId] ?? {},
|
|
6337
|
+
formVerificationErrors: problems.verificationErrors?.[activeForm2.formId] ?? {},
|
|
6338
|
+
data: form.data.companyTaxDocument,
|
|
6339
|
+
errors: form.errors.companyTaxDocument,
|
|
6340
|
+
valid: form.valid.companyTaxDocument,
|
|
6341
|
+
allFields: form.allFields?.companyTaxDocument,
|
|
6342
|
+
requiredFields: form.requiredFields?.companyTaxDocument,
|
|
6343
|
+
optionalFields: form.optionalFields?.companyTaxDocument,
|
|
6344
|
+
trustedFields: form.trustedFields?.companyTaxDocument,
|
|
6345
|
+
handleFieldChange: () => handleChange("companyTaxDocument", "taxDocument")
|
|
6346
|
+
}
|
|
6347
|
+
) : /* @__PURE__ */ jsx(
|
|
6348
|
+
MemoizedDocumentUpload,
|
|
6349
|
+
{
|
|
6350
|
+
id: activeForm2.formId,
|
|
6351
|
+
country,
|
|
6352
|
+
companyType,
|
|
6353
|
+
shouldValidate,
|
|
6354
|
+
heading: activeForm2.formHeading,
|
|
6355
|
+
description: activeForm2.formDescription,
|
|
6356
|
+
fieldValidationErrors: problems.validationErrors?.[activeForm2.formId] ?? {},
|
|
6357
|
+
formVerificationErrors: problems.verificationErrors?.[activeForm2.formId] ?? {},
|
|
6358
|
+
data: form.data.companyTaxDocument,
|
|
6359
|
+
errors: form.errors.companyTaxDocument,
|
|
6360
|
+
valid: form.valid.companyTaxDocument,
|
|
6361
|
+
allFields: form.allFields?.companyTaxDocument,
|
|
6362
|
+
requiredFields: form.requiredFields?.companyTaxDocument,
|
|
6363
|
+
optionalFields: form.optionalFields?.companyTaxDocument,
|
|
6364
|
+
trustedFields: form.trustedFields?.companyTaxDocument,
|
|
6365
|
+
handleFieldChange: () => handleChange("companyTaxDocument", "taxDocument"),
|
|
6366
|
+
documentField: "taxDocument",
|
|
6367
|
+
documentType: "vatDocument",
|
|
6368
|
+
hidePageCount: true,
|
|
6369
|
+
guidanceContent: /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-u-margin-bottom-24", children: [
|
|
6370
|
+
/* @__PURE__ */ jsxs("div", { className: "adyen-kyc-upload-field__subtitle", children: [
|
|
6371
|
+
" ",
|
|
6372
|
+
t(($) => $["requirements"], { ns: "common" })
|
|
6373
|
+
] }),
|
|
6374
|
+
/* @__PURE__ */ jsxs("ul", { children: [
|
|
6375
|
+
/* @__PURE__ */ jsx("li", { children: t(($) => $["containsNameOfCompany"], { ns: "business" }) }),
|
|
6376
|
+
/* @__PURE__ */ jsx("li", { children: t(($) => $["documentShowsTaxIdOfCompany"], { ns: "business" }) }),
|
|
6377
|
+
/* @__PURE__ */ jsx("li", { children: t(($) => $["issuedByTheTaxAuthority"], { ns: "business" }) })
|
|
6378
|
+
] })
|
|
6379
|
+
] })
|
|
6380
|
+
}
|
|
6381
|
+
);
|
|
6382
|
+
case "companyRegistrationDocument":
|
|
6383
|
+
return /* @__PURE__ */ jsx(
|
|
6384
|
+
RegistrationDocument,
|
|
6385
|
+
{
|
|
6386
|
+
id: activeForm2.formId,
|
|
6387
|
+
heading: activeForm2.formHeading,
|
|
6388
|
+
description: activeForm2.formDescription,
|
|
6389
|
+
country,
|
|
6390
|
+
companyType,
|
|
6391
|
+
data: form.data.companyRegistrationDocument,
|
|
6392
|
+
errors: form.errors.companyRegistrationDocument,
|
|
6393
|
+
valid: form.valid.companyRegistrationDocument,
|
|
6394
|
+
allFields: form.allFields?.companyRegistrationDocument,
|
|
6395
|
+
requiredFields: form.requiredFields?.companyRegistrationDocument,
|
|
6396
|
+
optionalFields: form.optionalFields?.companyRegistrationDocument,
|
|
6397
|
+
trustedFields: form.trustedFields?.companyRegistrationDocument,
|
|
6398
|
+
handleFieldChange: () => handleChange("companyRegistrationDocument", "registrationDocument"),
|
|
6399
|
+
shouldValidate,
|
|
6400
|
+
fieldValidationErrors: problems.validationErrors?.[activeForm2.formId] ?? {},
|
|
6401
|
+
formVerificationErrors: problems.verificationErrors?.[activeForm2.formId] ?? {}
|
|
6402
|
+
}
|
|
6403
|
+
);
|
|
6404
|
+
case "companyProofOfDirectorDocument":
|
|
6405
|
+
return /* @__PURE__ */ jsx(
|
|
6406
|
+
ProofOfDirectorDocument,
|
|
6407
|
+
{
|
|
6408
|
+
id: activeForm2.formId,
|
|
6409
|
+
heading: activeForm2.formHeading,
|
|
6410
|
+
description: activeForm2.formDescription,
|
|
6411
|
+
country,
|
|
6412
|
+
data: form.data?.companyProofOfDirectorDocument,
|
|
6413
|
+
errors: form.errors.companyProofOfDirectorDocument,
|
|
6414
|
+
valid: form.valid.companyProofOfDirectorDocument,
|
|
6415
|
+
allFields: form.allFields?.companyProofOfDirectorDocument,
|
|
6416
|
+
requiredFields: form.requiredFields?.companyProofOfDirectorDocument,
|
|
6417
|
+
optionalFields: form.optionalFields?.companyProofOfDirectorDocument,
|
|
6418
|
+
trustedFields: form.trustedFields?.companyProofOfDirectorDocument,
|
|
6419
|
+
handleFieldChange: () => handleChange("companyProofOfDirectorDocument", "proofOfDirector"),
|
|
6420
|
+
shouldValidate,
|
|
6421
|
+
fieldValidationErrors: problems.validationErrors?.[activeForm2.formId] ?? {},
|
|
6422
|
+
formVerificationErrors: problems.verificationErrors?.[activeForm2.formId] ?? {}
|
|
6423
|
+
}
|
|
6424
|
+
);
|
|
6425
|
+
case "companyProofOfSignatoryDocument":
|
|
6426
|
+
return /* @__PURE__ */ jsx(
|
|
6427
|
+
ProofOfSignatoryDocument,
|
|
6428
|
+
{
|
|
6429
|
+
id: activeForm2.formId,
|
|
6430
|
+
heading: activeForm2.formHeading,
|
|
6431
|
+
description: activeForm2.formDescription,
|
|
6432
|
+
country,
|
|
6433
|
+
data: form.data?.companyProofOfSignatoryDocument,
|
|
6434
|
+
errors: form.errors.companyProofOfSignatoryDocument,
|
|
6435
|
+
valid: form.valid.companyProofOfSignatoryDocument,
|
|
6436
|
+
allFields: form.allFields?.companyProofOfSignatoryDocument,
|
|
6437
|
+
requiredFields: form.requiredFields?.companyProofOfSignatoryDocument,
|
|
6438
|
+
optionalFields: form.optionalFields?.companyProofOfSignatoryDocument,
|
|
6439
|
+
trustedFields: form.trustedFields?.companyProofOfSignatoryDocument,
|
|
6440
|
+
handleFieldChange: () => handleChange("companyProofOfSignatoryDocument", "proofOfSignatory"),
|
|
6441
|
+
shouldValidate,
|
|
6442
|
+
fieldValidationErrors: problems.validationErrors?.[activeForm2.formId] ?? {},
|
|
6443
|
+
formVerificationErrors: problems.verificationErrors?.[activeForm2.formId] ?? {}
|
|
6444
|
+
}
|
|
6445
|
+
);
|
|
6446
|
+
case "companyProofOfOwnershipDocument":
|
|
6447
|
+
return /* @__PURE__ */ jsx(
|
|
6448
|
+
ProofOfOwnershipDocument,
|
|
6449
|
+
{
|
|
6450
|
+
id: activeForm2.formId,
|
|
6451
|
+
heading: activeForm2.formHeading,
|
|
6452
|
+
description: activeForm2.formDescription,
|
|
6453
|
+
country,
|
|
6454
|
+
data: form.data?.companyProofOfOwnershipDocument,
|
|
6455
|
+
errors: form.errors.companyProofOfOwnershipDocument,
|
|
6456
|
+
valid: form.valid.companyProofOfOwnershipDocument,
|
|
6457
|
+
allFields: form.allFields?.companyProofOfOwnershipDocument,
|
|
6458
|
+
requiredFields: form.requiredFields?.companyProofOfOwnershipDocument,
|
|
6459
|
+
optionalFields: form.optionalFields?.companyProofOfOwnershipDocument,
|
|
6460
|
+
trustedFields: form.trustedFields?.companyProofOfOwnershipDocument,
|
|
6461
|
+
handleFieldChange: () => handleChange("companyProofOfOwnershipDocument", "proofOfOwnership"),
|
|
6462
|
+
shouldValidate,
|
|
6463
|
+
fieldValidationErrors: problems.validationErrors?.[activeForm2.formId] ?? {},
|
|
6464
|
+
formVerificationErrors: problems.verificationErrors?.[activeForm2.formId] ?? {}
|
|
6465
|
+
}
|
|
6466
|
+
);
|
|
6467
|
+
case "companyConstitutionalDocument":
|
|
6468
|
+
return /* @__PURE__ */ jsx(
|
|
6469
|
+
MemoizedConstitutionalDocument,
|
|
6470
|
+
{
|
|
6471
|
+
id: activeForm2.formId,
|
|
6472
|
+
legalEntityType: LegalEntityTypes.SOLE_PROPRIETORSHIP,
|
|
6473
|
+
country,
|
|
6474
|
+
data: form.data?.companyConstitutionalDocument,
|
|
6475
|
+
errors: form.errors.companyConstitutionalDocument,
|
|
6476
|
+
valid: form.valid.companyConstitutionalDocument,
|
|
6477
|
+
allFields: form.allFields?.companyConstitutionalDocument,
|
|
6478
|
+
requiredFields: form.requiredFields?.companyConstitutionalDocument,
|
|
6479
|
+
optionalFields: form.optionalFields?.companyConstitutionalDocument,
|
|
6480
|
+
trustedFields: form.trustedFields?.companyConstitutionalDocument,
|
|
6481
|
+
handleFieldChange: () => handleChange("companyConstitutionalDocument", "constitutionalDocument"),
|
|
6482
|
+
shouldValidate,
|
|
6483
|
+
fieldValidationErrors: problems.validationErrors?.[activeForm2.formId] ?? {},
|
|
6484
|
+
formVerificationErrors: problems.verificationErrors?.[activeForm2.formId] ?? {}
|
|
6485
|
+
}
|
|
6486
|
+
);
|
|
6487
|
+
case "companyFinancialInformation":
|
|
6488
|
+
return /* @__PURE__ */ jsx(
|
|
6489
|
+
FinancialInformation,
|
|
6490
|
+
{
|
|
6491
|
+
multiForm: form,
|
|
6492
|
+
id: activeForm2.formId,
|
|
6493
|
+
country,
|
|
6494
|
+
heading: t(($) => $[activeForm2.formHeading]),
|
|
6495
|
+
description: activeForm2.formDescription,
|
|
6496
|
+
data: form.data?.companyFinancialInformation,
|
|
6497
|
+
allFields: form.allFields?.companyFinancialInformation,
|
|
6498
|
+
requiredFields: form.requiredFields?.companyFinancialInformation,
|
|
6499
|
+
optionalFields: form.optionalFields?.companyFinancialInformation,
|
|
6500
|
+
trustedFields: form.trustedFields?.companyFinancialInformation,
|
|
6501
|
+
shouldValidate
|
|
6502
|
+
}
|
|
6503
|
+
);
|
|
6504
|
+
default:
|
|
6505
|
+
return null;
|
|
6506
|
+
}
|
|
6507
|
+
};
|
|
6508
|
+
return /* @__PURE__ */ jsx("div", { className: "adyen-kyc-business-details", children: /* @__PURE__ */ jsx("div", { className: "adyen-kyc-form-wrapper", children: renderActiveForm(activeForm) }) });
|
|
6509
|
+
}
|
|
6510
|
+
function buildRequiredForms({
|
|
6511
|
+
config: { country, forms, requiredFields, optionalFields, isValid, problems },
|
|
6512
|
+
options
|
|
6513
|
+
}) {
|
|
6514
|
+
const usesBusinessSelection = COUNTRIES_USING_COMPANY_SEARCH.includes(country);
|
|
6515
|
+
const filteredForms = Object.values(forms).filter(({ formId }) => {
|
|
6516
|
+
if (usesBusinessSelection) {
|
|
6517
|
+
if (formId === "businessSelection" && (options?.hasNoSearchResults || isVerifiedSingleCompanySearchResult.value))
|
|
6518
|
+
return false;
|
|
6519
|
+
if (formId === "companyStructure" && verifiedBusiness.value?.legalForm) return false;
|
|
6520
|
+
}
|
|
6521
|
+
if (requiredFields || optionalFields) {
|
|
6522
|
+
return Boolean(requiredFields?.[formId]) || Boolean(optionalFields?.[formId]);
|
|
6523
|
+
}
|
|
6524
|
+
return true;
|
|
6525
|
+
});
|
|
6526
|
+
const requiredForms = options?.skipSummary ? filteredForms : [...filteredForms, summaryStep];
|
|
6527
|
+
return addValidityToForms(requiredForms, isValid, problems);
|
|
6528
|
+
}
|
|
6529
|
+
function basicInformationValidators({
|
|
6530
|
+
country,
|
|
6531
|
+
taxIdNumberType,
|
|
6532
|
+
companyType,
|
|
6533
|
+
registrationNumberType,
|
|
6534
|
+
state,
|
|
6535
|
+
isExperimentEnabled
|
|
6536
|
+
}) {
|
|
6537
|
+
return {
|
|
6538
|
+
country: CountryFieldValidation().country,
|
|
6539
|
+
countryOfGoverningLaw: CountryOfGoverningLawFieldValidation().countryOfGoverningLaw,
|
|
6540
|
+
legalCompanyName: resolveFieldMetadata(
|
|
6541
|
+
isExperimentEnabled("StrictNameAndAddressValidationV4") ? defaultFieldConfigV4[country] : defaultFieldConfig$2[country],
|
|
6542
|
+
{ isBusiness: true },
|
|
6543
|
+
isExperimentEnabled("StrictNameAndAddressValidationV4") ? defaultFieldMetadataV4 : defaultFieldMetadata$2
|
|
6544
|
+
)?.validators,
|
|
6545
|
+
taxInformation: resolveFieldMetadata(
|
|
6546
|
+
taxInformationDefaultFieldConfig[country],
|
|
6547
|
+
{
|
|
6548
|
+
taxIdNumberType,
|
|
6549
|
+
companyType
|
|
6550
|
+
},
|
|
6551
|
+
taxInformationDefaultFieldMetadata
|
|
6552
|
+
)?.validators,
|
|
6553
|
+
stateOrProvince: resolveFieldMetadata(
|
|
6554
|
+
defaultFieldConfig[country],
|
|
6555
|
+
{ isBusiness: true },
|
|
6556
|
+
defaultFieldMetadata
|
|
6557
|
+
)?.validators,
|
|
6558
|
+
registrationNumber: resolveFieldMetadata(
|
|
6559
|
+
registrationNumberDefaultFieldConfig[country],
|
|
6560
|
+
{
|
|
6561
|
+
companyType,
|
|
6562
|
+
registrationNumberType,
|
|
6563
|
+
state,
|
|
6564
|
+
isExperimentEnabled
|
|
6565
|
+
},
|
|
6566
|
+
registrationNumberDefaultFieldMetadata
|
|
6567
|
+
)?.validators
|
|
6568
|
+
};
|
|
6569
|
+
}
|
|
6570
|
+
function businessSelectionValidators() {
|
|
6571
|
+
return {
|
|
6572
|
+
hasSelectedBusiness: {
|
|
6573
|
+
modes: ["blur", "input"],
|
|
6574
|
+
validate: (value) => typeof value === "boolean",
|
|
6575
|
+
// indicates a selection was made
|
|
6576
|
+
errorMessage: "fieldIsRequired"
|
|
6577
|
+
}
|
|
6578
|
+
};
|
|
6579
|
+
}
|
|
6580
|
+
function additionalInformationValidators({
|
|
6581
|
+
country,
|
|
6582
|
+
taxIdNumberType,
|
|
6583
|
+
companyType,
|
|
6584
|
+
registrationNumberType,
|
|
6585
|
+
vatNumberType,
|
|
6586
|
+
isExperimentEnabled
|
|
6587
|
+
}) {
|
|
6588
|
+
return {
|
|
6589
|
+
hasDoingBusinessAs: doingBusinessAsAbsentFieldMetadata.validators,
|
|
6590
|
+
doingBusinessAs: doingBusinessAsFieldMetadata.validators,
|
|
6591
|
+
registrationNumber: resolveFieldMetadata(
|
|
6592
|
+
registrationNumberDefaultFieldConfig[country],
|
|
6593
|
+
{
|
|
6594
|
+
companyType,
|
|
6595
|
+
registrationNumberType,
|
|
6596
|
+
isExperimentEnabled
|
|
6597
|
+
},
|
|
6598
|
+
registrationNumberDefaultFieldMetadata
|
|
6599
|
+
)?.validators,
|
|
6600
|
+
exemptedFromRegistrationNumber: exemptFromRegistrationNumberDefaultFieldMetadata.validators,
|
|
6601
|
+
taxInformation: resolveFieldMetadata(
|
|
6602
|
+
taxInformationDefaultFieldConfig[country],
|
|
6603
|
+
{
|
|
6604
|
+
taxIdNumberType,
|
|
6605
|
+
companyType
|
|
6606
|
+
},
|
|
6607
|
+
taxInformationDefaultFieldMetadata
|
|
6608
|
+
).validators,
|
|
6609
|
+
vatNumber: resolveFieldMetadata(
|
|
6610
|
+
defaultFieldConfig$1[country],
|
|
6611
|
+
{ vatNumberType },
|
|
6612
|
+
defaultFieldMetadata$1
|
|
6613
|
+
).validators,
|
|
6614
|
+
vatAbsenceReason: vatAbsenceReasonMetadata.validators,
|
|
6615
|
+
eInvoicingCode: eInvoicingCodeFieldMetadata.validators,
|
|
6616
|
+
industryCodes: industryCodeFieldMetadata.validators,
|
|
6617
|
+
dateOfIncorporation: dateOfIncorporationFieldMetadata.validators,
|
|
6618
|
+
stockExchangeMIC: stockExchangeMICFieldMetadata.validators,
|
|
6619
|
+
stockISIN: stockISINFieldMetadata.validators,
|
|
6620
|
+
stockTickerSymbol: stockTickerSymbolFieldMetadata.validators
|
|
6621
|
+
};
|
|
6622
|
+
}
|
|
6623
|
+
function BusinessDetailsMultiformDropin({
|
|
6624
|
+
taskType = TaskTypes.BUSINESS_DETAILS,
|
|
6625
|
+
country: propCountry,
|
|
6626
|
+
problems: propProblems,
|
|
6627
|
+
legalEntityResponse,
|
|
6628
|
+
associatedLegalArrangement,
|
|
6629
|
+
// initially undefined when creating entity
|
|
6630
|
+
nestedLegalEntity,
|
|
6631
|
+
// initially undefined when creating entity
|
|
6632
|
+
nestedLegalEntityDetails,
|
|
6633
|
+
// has entity roles for association logic
|
|
6634
|
+
onSubmit: onExternalSubmit,
|
|
6635
|
+
handleHomeClick,
|
|
6636
|
+
asModal = false
|
|
6637
|
+
}) {
|
|
6638
|
+
const { t, i18n } = useTranslation(["common", "business"]);
|
|
6639
|
+
const { baseUrl, rootLegalEntityId } = useApiContext();
|
|
6640
|
+
const userEvents = useAnalyticsContext();
|
|
6641
|
+
const { showToast } = useToastContext();
|
|
6642
|
+
const queryClient = useQueryClient();
|
|
6643
|
+
const { isExperimentEnabled } = useExperimentsContext();
|
|
6644
|
+
const { isSettingEnabled } = useSettingsContext();
|
|
6645
|
+
const { accountHolder, setAccountHolder } = useAccountHolder();
|
|
6646
|
+
const { mutateAsync: createLegalEntity } = useCreateLegalEntity();
|
|
6647
|
+
const { mutateAsync: updateLegalEntity } = useUpdateLegalEntity();
|
|
6648
|
+
const isSoleProp = accountHolder === "mySoleProprietorName";
|
|
6649
|
+
const isAssociationTaskType = !taskType ? accountHolder !== "theCompanyIWorkFor" : taskType !== TaskTypes.BUSINESS_DETAILS;
|
|
6650
|
+
const legalEntityType = !isSoleProp ? LegalEntityTypes.ORGANIZATION : LegalEntityTypes.SOLE_PROPRIETORSHIP;
|
|
6651
|
+
const subjectEntity = !isAssociationTaskType ? legalEntityResponse : isSoleProp ? associatedLegalArrangement : nestedLegalEntity;
|
|
6652
|
+
const [country, setCountry] = useState(propCountry);
|
|
6653
|
+
const [documents, setDocuments] = useState();
|
|
6654
|
+
const [problems, setProblems] = useState(propProblems ?? {});
|
|
6655
|
+
const [loadingStatus, setLoadingStatus] = useState("success");
|
|
6656
|
+
const [derivedProps, setDerivedProps] = useState();
|
|
6657
|
+
const [trustedFields, setTrustedFields] = useState(subjectEntity?.trustedFields ?? void 0);
|
|
6658
|
+
const defaultForms = useMemo(() => getForms(country), [country]);
|
|
6659
|
+
const documentUtils = documentApiUtils({
|
|
6660
|
+
baseUrl: baseUrl.value,
|
|
6661
|
+
rootLegalEntityId: rootLegalEntityId.value
|
|
6662
|
+
});
|
|
6663
|
+
useEffect(() => {
|
|
6664
|
+
if (!subjectEntity?.documentDetails?.length) return;
|
|
6665
|
+
documentUtils.fetchDocuments(subjectEntity.documentDetails, subjectEntity?.id).then(() => {
|
|
6666
|
+
setDocuments(mapApiDocumentToBusinessDetailsDocuments(subjectEntity?.id));
|
|
6667
|
+
}).catch(() => {
|
|
6668
|
+
showToast({
|
|
6669
|
+
label: t(($) => $["failedToFetchRelevantDocuments"], { ns: "common" }),
|
|
6670
|
+
variant: "error"
|
|
6671
|
+
});
|
|
6672
|
+
});
|
|
6673
|
+
}, [subjectEntity?.documentDetails, subjectEntity?.id]);
|
|
6674
|
+
const associatedLeTrackingParams = useMemo(
|
|
6675
|
+
() => getAssociatedLeAnalyticsPayload({
|
|
6676
|
+
associatedLegalEntity: associatedLegalArrangement
|
|
6677
|
+
}),
|
|
6678
|
+
[associatedLegalArrangement]
|
|
6679
|
+
);
|
|
6680
|
+
const handleTrackNavigation = useCallback(
|
|
6681
|
+
(props) => {
|
|
6682
|
+
trackNavigation({
|
|
6683
|
+
...props,
|
|
6684
|
+
additionalTrackingParams: associatedLeTrackingParams
|
|
6685
|
+
});
|
|
6686
|
+
},
|
|
6687
|
+
[associatedLeTrackingParams]
|
|
6688
|
+
);
|
|
6689
|
+
useEffect(() => {
|
|
6690
|
+
userEvents.updateBaseTrackingPayload({ task: taskType });
|
|
6691
|
+
userEvents.addTaskEvent("Landed on page", {
|
|
6692
|
+
actionType: "start",
|
|
6693
|
+
...subjectEntity?.id && subjectEntity?.type && {
|
|
6694
|
+
legalEntityId: subjectEntity.id,
|
|
6695
|
+
entityType: subjectEntity.type
|
|
6696
|
+
},
|
|
6697
|
+
...associatedLeTrackingParams
|
|
6698
|
+
});
|
|
6699
|
+
}, []);
|
|
6700
|
+
const parseConfiguration = useCallback(
|
|
6701
|
+
({ scenarios }) => composePerScenarioFormConfigurations(scenarios, businessDetailsFieldsPerScenario),
|
|
6702
|
+
[]
|
|
6703
|
+
);
|
|
6704
|
+
const { fieldConfigurations } = useScenarioConfiguration({
|
|
6705
|
+
legalEntityType,
|
|
6706
|
+
parseConfiguration,
|
|
6707
|
+
setLoadingStatus,
|
|
6708
|
+
country
|
|
6709
|
+
});
|
|
6710
|
+
const defaultData = useMemo(
|
|
6711
|
+
() => ({
|
|
6712
|
+
...mapLegalEntityToBusinessDetailsSchema(
|
|
6713
|
+
!isAssociationTaskType ? legalEntityResponse : isSoleProp ? associatedLegalArrangement ?? legalEntityResponse : nestedLegalEntity,
|
|
6714
|
+
isSoleProp ? legalEntityResponse : void 0,
|
|
6715
|
+
isExperimentEnabled
|
|
6716
|
+
),
|
|
6717
|
+
...documents
|
|
6718
|
+
}),
|
|
6719
|
+
[
|
|
6720
|
+
isAssociationTaskType,
|
|
6721
|
+
legalEntityResponse,
|
|
6722
|
+
isSoleProp,
|
|
6723
|
+
associatedLegalArrangement,
|
|
6724
|
+
nestedLegalEntity,
|
|
6725
|
+
isExperimentEnabled,
|
|
6726
|
+
documents
|
|
6727
|
+
]
|
|
6728
|
+
);
|
|
6729
|
+
const buildFieldValidations = useCallback(
|
|
6730
|
+
(data) => {
|
|
6731
|
+
const taxInfo = data?.basicInformation?.taxInformation ?? data?.additionalInformation?.taxInformation;
|
|
6732
|
+
const taxIdType = taxInfo?.length ? taxInfo.find((taxId) => taxId.country === country)?.type : void 0;
|
|
6733
|
+
const regNumberType = data?.basicInformation?.registrationNumberType ?? data?.additionalInformation?.registrationNumberType;
|
|
6734
|
+
return {
|
|
6735
|
+
basicInformation: basicInformationValidators({
|
|
6736
|
+
country,
|
|
6737
|
+
state: data?.basicInformation?.stateOrProvince,
|
|
6738
|
+
companyType: data?.companyStructure?.entityType,
|
|
6739
|
+
taxIdNumberType: taxIdType,
|
|
6740
|
+
registrationNumberType: regNumberType,
|
|
6741
|
+
isExperimentEnabled
|
|
6742
|
+
}),
|
|
6743
|
+
businessSelection: businessSelectionValidators(),
|
|
6744
|
+
companyStructure: CompanyStructureValidation,
|
|
6745
|
+
additionalInformation: additionalInformationValidators({
|
|
6746
|
+
country,
|
|
6747
|
+
taxIdNumberType: taxIdType,
|
|
6748
|
+
companyType: data?.companyStructure?.entityType,
|
|
6749
|
+
registrationNumberType: regNumberType,
|
|
6750
|
+
vatNumberType: data?.additionalInformation?.vatNumberType,
|
|
6751
|
+
isExperimentEnabled
|
|
6752
|
+
}),
|
|
6753
|
+
financialInformation: financialInfoValidationWithEmployeesRules
|
|
6754
|
+
};
|
|
6755
|
+
},
|
|
6756
|
+
[country, isExperimentEnabled]
|
|
6757
|
+
);
|
|
6758
|
+
const multiForm = useMultiForm({
|
|
6759
|
+
defaultData,
|
|
6760
|
+
allFields: derivedProps?.allFields,
|
|
6761
|
+
requiredFields: derivedProps?.requiredFields,
|
|
6762
|
+
optionalFields: derivedProps?.optionalFields,
|
|
6763
|
+
obscuredFields: derivedProps?.obscuredFields,
|
|
6764
|
+
trustedFields: derivedProps?.trustedFields,
|
|
6765
|
+
rules: buildFieldValidations
|
|
6766
|
+
});
|
|
6767
|
+
const isTinMatched = tinMatched.value;
|
|
6768
|
+
const customRules = useMemo(
|
|
6769
|
+
() => rules({
|
|
6770
|
+
data: multiForm.data,
|
|
6771
|
+
country,
|
|
6772
|
+
taskType,
|
|
6773
|
+
isExperimentEnabled,
|
|
6774
|
+
isSettingEnabled,
|
|
6775
|
+
accountHolder,
|
|
6776
|
+
tinMatched: isTinMatched,
|
|
6777
|
+
rootLegalEntity: legalEntityResponse
|
|
6778
|
+
}),
|
|
6779
|
+
[
|
|
6780
|
+
multiForm.data,
|
|
6781
|
+
country,
|
|
6782
|
+
taskType,
|
|
6783
|
+
isExperimentEnabled,
|
|
6784
|
+
isSettingEnabled,
|
|
6785
|
+
accountHolder,
|
|
6786
|
+
isTinMatched,
|
|
6787
|
+
legalEntityResponse
|
|
6788
|
+
]
|
|
6789
|
+
);
|
|
6790
|
+
useEffect(() => {
|
|
6791
|
+
const props = getPropsFromConfigurations({
|
|
6792
|
+
scenarioConfiguration: fieldConfigurations,
|
|
6793
|
+
forms: defaultForms,
|
|
6794
|
+
remediationActions: problems?.remediationActions ? Object.values(problems?.remediationActions) : [],
|
|
6795
|
+
dataMissingErrors: problems?.missingData ?? [],
|
|
6796
|
+
fieldsWithExistingData: subjectEntity ? subjectEntity.type === LegalEntityTypes.SOLE_PROPRIETORSHIP ? getFieldsWithExistingData(
|
|
6797
|
+
subjectEntity,
|
|
6798
|
+
solePropBusinessDetailsApiKeyMapping,
|
|
6799
|
+
solePropBusinessDetailsDocumentMapping
|
|
6800
|
+
) : getFieldsWithExistingData(
|
|
6801
|
+
subjectEntity,
|
|
6802
|
+
businessDetailsApiKeyMapping,
|
|
6803
|
+
businessDetailsDocumentMapping
|
|
6804
|
+
) : [],
|
|
6805
|
+
customRules,
|
|
6806
|
+
legalEntityType: subjectEntity?.type,
|
|
6807
|
+
legalEntityTrustedFields: trustedFields
|
|
6808
|
+
});
|
|
6809
|
+
setDerivedProps(props);
|
|
6810
|
+
}, [
|
|
6811
|
+
customRules,
|
|
6812
|
+
defaultForms,
|
|
6813
|
+
subjectEntity,
|
|
6814
|
+
problems?.missingData,
|
|
6815
|
+
problems?.remediationActions,
|
|
6816
|
+
trustedFields,
|
|
6817
|
+
fieldConfigurations
|
|
6818
|
+
]);
|
|
6819
|
+
const [prevCountry, setPrevCountry] = useState(multiForm.data.basicInformation?.country);
|
|
6820
|
+
if (multiForm.data.basicInformation?.country && prevCountry !== multiForm.data.basicInformation?.country) {
|
|
6821
|
+
setCountry(multiForm.data?.basicInformation?.country);
|
|
6822
|
+
setPrevCountry(multiForm.data.basicInformation?.country);
|
|
6823
|
+
setTrustedFields(void 0);
|
|
6824
|
+
verifiedBusiness.value = void 0;
|
|
6825
|
+
tinMatched.value = void 0;
|
|
6826
|
+
businessMismatchModalOpen.value = false;
|
|
6827
|
+
}
|
|
6828
|
+
const [forms, setForms] = useState(
|
|
6829
|
+
buildRequiredForms({
|
|
6830
|
+
config: {
|
|
6831
|
+
country,
|
|
6832
|
+
forms: defaultForms,
|
|
6833
|
+
requiredFields: derivedProps?.requiredFields,
|
|
6834
|
+
optionalFields: derivedProps?.optionalFields,
|
|
6835
|
+
isValid: multiForm.isValid ?? {},
|
|
6836
|
+
problems
|
|
6837
|
+
},
|
|
6838
|
+
options: {
|
|
6839
|
+
hasNoSearchResults: false
|
|
6840
|
+
}
|
|
6841
|
+
})
|
|
6842
|
+
);
|
|
6843
|
+
const updateForms = useCallback(
|
|
6844
|
+
({ searchResults }) => {
|
|
6845
|
+
const updatedForms = buildRequiredForms({
|
|
6846
|
+
config: {
|
|
6847
|
+
country,
|
|
6848
|
+
forms: defaultForms,
|
|
6849
|
+
requiredFields: derivedProps?.requiredFields,
|
|
6850
|
+
optionalFields: derivedProps?.optionalFields,
|
|
6851
|
+
isValid: multiForm.isValid ?? {},
|
|
6852
|
+
problems
|
|
6853
|
+
},
|
|
6854
|
+
options: {
|
|
6855
|
+
hasNoSearchResults: searchResults && !searchResults.length
|
|
6856
|
+
}
|
|
6857
|
+
});
|
|
6858
|
+
setForms(updatedForms);
|
|
6859
|
+
return updatedForms;
|
|
6860
|
+
},
|
|
6861
|
+
[
|
|
6862
|
+
country,
|
|
6863
|
+
defaultForms,
|
|
6864
|
+
derivedProps?.optionalFields,
|
|
6865
|
+
derivedProps?.requiredFields,
|
|
6866
|
+
multiForm.isValid,
|
|
6867
|
+
problems
|
|
6868
|
+
]
|
|
6869
|
+
);
|
|
6870
|
+
const summaryData = useMemo(
|
|
6871
|
+
() => formatDataForSummary(multiForm.data, forms, t, i18n.language, isExperimentEnabled),
|
|
6872
|
+
[multiForm.data, forms, t, i18n.language, isExperimentEnabled]
|
|
6873
|
+
);
|
|
6874
|
+
const submitTask = useCallback(() => {
|
|
6875
|
+
setAccountHolder(accountHolder);
|
|
6876
|
+
return submit({
|
|
6877
|
+
additionalTrackingParams: associatedLeTrackingParams,
|
|
6878
|
+
data: multiForm.data,
|
|
6879
|
+
legalEntityResponse,
|
|
6880
|
+
associatedLegalArrangement,
|
|
6881
|
+
nestedLegalEntity,
|
|
6882
|
+
nestedLegalEntityDetails,
|
|
6883
|
+
problems,
|
|
6884
|
+
taskType: taskType ?? TaskTypes.BUSINESS_DETAILS,
|
|
6885
|
+
accountHolder: accountHolder ?? "theCompanyIWorkFor",
|
|
6886
|
+
forms,
|
|
6887
|
+
documentUtils,
|
|
6888
|
+
t,
|
|
6889
|
+
showToast,
|
|
6890
|
+
setLoadingStatus,
|
|
6891
|
+
setProblems,
|
|
6892
|
+
handleUpdateLegalEntity: updateLegalEntity,
|
|
6893
|
+
createLegalEntity,
|
|
6894
|
+
onExternalSubmit,
|
|
6895
|
+
isExperimentEnabled,
|
|
6896
|
+
userEvents
|
|
6897
|
+
});
|
|
6898
|
+
}, [
|
|
6899
|
+
setAccountHolder,
|
|
6900
|
+
accountHolder,
|
|
6901
|
+
associatedLeTrackingParams,
|
|
6902
|
+
multiForm.data,
|
|
6903
|
+
legalEntityResponse,
|
|
6904
|
+
associatedLegalArrangement,
|
|
6905
|
+
nestedLegalEntity,
|
|
6906
|
+
nestedLegalEntityDetails,
|
|
6907
|
+
problems,
|
|
6908
|
+
taskType,
|
|
6909
|
+
forms,
|
|
6910
|
+
documentUtils,
|
|
6911
|
+
t,
|
|
6912
|
+
showToast,
|
|
6913
|
+
updateLegalEntity,
|
|
6914
|
+
createLegalEntity,
|
|
6915
|
+
onExternalSubmit,
|
|
6916
|
+
isExperimentEnabled,
|
|
6917
|
+
userEvents
|
|
6918
|
+
]);
|
|
6919
|
+
const {
|
|
6920
|
+
handleNextClick,
|
|
6921
|
+
handleBackClick,
|
|
6922
|
+
activeForm,
|
|
6923
|
+
shouldValidate,
|
|
6924
|
+
gotoFormByFormIndex,
|
|
6925
|
+
steps
|
|
6926
|
+
} = useFormComposer({
|
|
6927
|
+
problems,
|
|
6928
|
+
navigationTrackingParams: associatedLeTrackingParams,
|
|
6929
|
+
forms,
|
|
6930
|
+
onSubmit: submitTask,
|
|
6931
|
+
triggerValidation: multiForm.triggerValidation
|
|
6932
|
+
});
|
|
6933
|
+
const handleBusinessMismatchContinue = () => {
|
|
6934
|
+
setTrustedFields([]);
|
|
6935
|
+
businessMismatchModalOpen.value = false;
|
|
6936
|
+
handleNextClick();
|
|
6937
|
+
};
|
|
6938
|
+
const handleBusinessMismatchCancel = () => {
|
|
6939
|
+
handleBackClick?.();
|
|
6940
|
+
businessMismatchModalOpen.value = false;
|
|
6941
|
+
tinMatched.value = false;
|
|
6942
|
+
};
|
|
6943
|
+
const companySearchQueryInput = {
|
|
6944
|
+
name: multiForm.data?.basicInformation?.legalCompanyName ?? "",
|
|
6945
|
+
country: multiForm.data?.basicInformation?.country,
|
|
6946
|
+
state: multiForm.data?.basicInformation?.stateOrProvince,
|
|
6947
|
+
registrationNumber: multiForm.data?.basicInformation?.registrationNumber
|
|
6948
|
+
};
|
|
6949
|
+
const verifyTinQueryInput = {
|
|
6950
|
+
name: multiForm.data.basicInformation?.legalCompanyName ?? "",
|
|
6951
|
+
tin: multiForm.data?.basicInformation?.taxInformation?.find((taxId) => taxId.country === country)?.number ?? ""
|
|
6952
|
+
};
|
|
6953
|
+
const {
|
|
6954
|
+
data: companySearchResponse,
|
|
6955
|
+
isLoading: searchingCompanies,
|
|
6956
|
+
isError: searchingError
|
|
6957
|
+
} = useCompanySearch(companySearchQueryInput, {
|
|
6958
|
+
enabled: false
|
|
6959
|
+
});
|
|
6960
|
+
useEffect(() => {
|
|
6961
|
+
if (!searchingCompanies && companySearchResponse?.results) {
|
|
6962
|
+
userEvents.addPageEvent("Success", {
|
|
6963
|
+
actionType: "submit",
|
|
6964
|
+
returnValue: "companySearch",
|
|
6965
|
+
additionalData: {
|
|
6966
|
+
numberOfResults: companySearchResponse?.results.length
|
|
6967
|
+
},
|
|
6968
|
+
...subjectEntity?.id && subjectEntity?.type && {
|
|
6969
|
+
legalEntityId: subjectEntity.id,
|
|
6970
|
+
entityType: subjectEntity.type
|
|
6971
|
+
},
|
|
6972
|
+
...associatedLeTrackingParams
|
|
6973
|
+
});
|
|
6974
|
+
}
|
|
6975
|
+
}, [
|
|
6976
|
+
searchingCompanies,
|
|
6977
|
+
userEvents,
|
|
6978
|
+
subjectEntity,
|
|
6979
|
+
associatedLeTrackingParams,
|
|
6980
|
+
companySearchResponse?.results
|
|
6981
|
+
]);
|
|
6982
|
+
const companySelectionInput = {
|
|
6983
|
+
company: companySearchResponse?.results[0],
|
|
6984
|
+
state: multiForm.data.basicInformation?.stateOrProvince,
|
|
6985
|
+
name: multiForm.data?.basicInformation?.legalCompanyName ?? "",
|
|
6986
|
+
tin: multiForm.data?.basicInformation?.taxInformation?.find((taxId) => taxId.country === country)?.number ?? ""
|
|
6987
|
+
};
|
|
6988
|
+
useVerifyTin(verifyTinQueryInput, { enabled: false });
|
|
6989
|
+
useCompanySelection(companySelectionInput, {
|
|
6990
|
+
enabled: false
|
|
6991
|
+
});
|
|
6992
|
+
const attemptBusinessSearch = async () => {
|
|
6993
|
+
if (customRules.countryUsingCompanySearch() !== "REQUIRED") {
|
|
6994
|
+
const currentForms = updateForms({ searchResults: [] });
|
|
6995
|
+
return handleNextClick(currentForms);
|
|
6996
|
+
}
|
|
6997
|
+
try {
|
|
6998
|
+
setLoadingStatus("loading");
|
|
6999
|
+
tinMatched.value = void 0;
|
|
7000
|
+
verifiedBusiness.value = void 0;
|
|
7001
|
+
isVerifiedSingleCompanySearchResult.value = false;
|
|
7002
|
+
const searchResponse = await queryClient.fetchQuery({
|
|
7003
|
+
queryKey: ["companySearch", companySearchQueryInput]
|
|
7004
|
+
});
|
|
7005
|
+
let currentForms = updateForms({ searchResults: searchResponse.results });
|
|
7006
|
+
const handleTinResponse = (matched) => {
|
|
7007
|
+
if (matched) {
|
|
7008
|
+
tinMatched.value = true;
|
|
7009
|
+
} else {
|
|
7010
|
+
businessMismatchModalOpen.value = true;
|
|
7011
|
+
tinMatched.value = false;
|
|
7012
|
+
}
|
|
7013
|
+
return tinMatched.value;
|
|
7014
|
+
};
|
|
7015
|
+
if (searchResponse?.results.length === 1 && isNormalizedStringMatch(
|
|
7016
|
+
multiForm.data?.basicInformation?.legalCompanyName ?? "",
|
|
7017
|
+
searchResponse.results[0].name
|
|
7018
|
+
)) {
|
|
7019
|
+
const companySelectionResponse = await queryClient.fetchQuery({
|
|
7020
|
+
queryKey: [
|
|
7021
|
+
"companySelection",
|
|
7022
|
+
{ ...companySelectionInput, company: searchResponse.results[0] }
|
|
7023
|
+
]
|
|
7024
|
+
});
|
|
7025
|
+
if (handleTinResponse(!!companySelectionResponse.tinMatched)) {
|
|
7026
|
+
verifiedBusiness.value = companySelectionResponse;
|
|
7027
|
+
isVerifiedSingleCompanySearchResult.value = true;
|
|
7028
|
+
currentForms = updateForms({ searchResults: searchResponse.results });
|
|
7029
|
+
} else {
|
|
7030
|
+
return setLoadingStatus("success");
|
|
7031
|
+
}
|
|
7032
|
+
}
|
|
7033
|
+
if (!searchResponse.results.length) {
|
|
7034
|
+
const tinVerificationResponse = await queryClient.fetchQuery({
|
|
7035
|
+
queryKey: ["verifyTin", verifyTinQueryInput]
|
|
7036
|
+
});
|
|
7037
|
+
if (!handleTinResponse(!!tinVerificationResponse?.matched)) {
|
|
7038
|
+
return setLoadingStatus("success");
|
|
7039
|
+
}
|
|
7040
|
+
}
|
|
7041
|
+
setLoadingStatus("success");
|
|
7042
|
+
return handleNextClick(currentForms);
|
|
7043
|
+
} catch (e) {
|
|
7044
|
+
setLoadingStatus("error");
|
|
7045
|
+
if (e instanceof Error && e.message === KOMPANY_SEARCH_FAILURE) {
|
|
7046
|
+
const currentForms = updateForms({ searchResults: [] });
|
|
7047
|
+
return handleNextClick(currentForms);
|
|
7048
|
+
}
|
|
7049
|
+
}
|
|
7050
|
+
};
|
|
7051
|
+
const overrideNextClick = async () => {
|
|
7052
|
+
if (!activeForm.isValid) return handleNextClick();
|
|
7053
|
+
if (!COUNTRIES_USING_COMPANY_SEARCH.includes(country) || isSoleProp) {
|
|
7054
|
+
return handleNextClick();
|
|
7055
|
+
}
|
|
7056
|
+
switch (activeForm.formId) {
|
|
7057
|
+
case "basicInformation": {
|
|
7058
|
+
return await attemptBusinessSearch();
|
|
7059
|
+
}
|
|
7060
|
+
case "businessSelection": {
|
|
7061
|
+
const currentForms = updateForms({
|
|
7062
|
+
searchResults: companySearchResponse?.results
|
|
7063
|
+
});
|
|
7064
|
+
return handleNextClick(currentForms);
|
|
7065
|
+
}
|
|
7066
|
+
default:
|
|
7067
|
+
return handleNextClick();
|
|
7068
|
+
}
|
|
7069
|
+
};
|
|
7070
|
+
useEffect(() => {
|
|
7071
|
+
updateForms({
|
|
7072
|
+
searchResults: searchingError ? [] : companySearchResponse?.results
|
|
7073
|
+
});
|
|
7074
|
+
}, [updateForms, companySearchResponse?.results, searchingError]);
|
|
7075
|
+
return /* @__PURE__ */ jsx(FormContextProvider, { form: multiForm, children: /* @__PURE__ */ jsxs(
|
|
7076
|
+
FormFlow,
|
|
7077
|
+
{
|
|
7078
|
+
summary: {
|
|
7079
|
+
data: summaryData,
|
|
7080
|
+
omitted: {
|
|
7081
|
+
keys: ["operationalAddressIsSame"],
|
|
7082
|
+
forms: ["businessSelection"]
|
|
7083
|
+
},
|
|
7084
|
+
problems,
|
|
7085
|
+
trackNavigation: handleTrackNavigation,
|
|
7086
|
+
showLegalCaption: true
|
|
7087
|
+
},
|
|
7088
|
+
asModal,
|
|
7089
|
+
currentStep: steps.current,
|
|
7090
|
+
totalSteps: steps.total,
|
|
7091
|
+
forms,
|
|
7092
|
+
disableNextButton: activeForm.formId === "businessSelection",
|
|
7093
|
+
gotoFormByFormIndex,
|
|
7094
|
+
handleNextClick: overrideNextClick,
|
|
7095
|
+
handleBackClick,
|
|
7096
|
+
handleCancelClick: handleHomeClick,
|
|
7097
|
+
loadingStatus,
|
|
7098
|
+
children: [
|
|
7099
|
+
/* @__PURE__ */ jsx(
|
|
7100
|
+
BusinessDetailsMultiform,
|
|
7101
|
+
{
|
|
7102
|
+
taskType,
|
|
7103
|
+
activeForm,
|
|
7104
|
+
country,
|
|
7105
|
+
shouldValidate,
|
|
7106
|
+
problems,
|
|
7107
|
+
handleNextClick: overrideNextClick,
|
|
7108
|
+
handleBackClick,
|
|
7109
|
+
setLoadingStatus,
|
|
7110
|
+
isTopLevelEntity: taskType === TaskTypes.BUSINESS_DETAILS
|
|
7111
|
+
}
|
|
7112
|
+
),
|
|
7113
|
+
businessMismatchModalOpen.value && /* @__PURE__ */ jsx(
|
|
7114
|
+
Confirm,
|
|
7115
|
+
{
|
|
7116
|
+
title: t(($) => $["businessSelection__tinVerificationFailureModalHeader"], {
|
|
7117
|
+
ns: "business"
|
|
7118
|
+
}),
|
|
7119
|
+
description: t(($) => $["businessSelection__tinVerificationFailureModalContent"], {
|
|
7120
|
+
ns: "business"
|
|
7121
|
+
}),
|
|
7122
|
+
cancelText: t(
|
|
7123
|
+
($) => $["businessSelection__tinVerificationFailureModalSecondaryButton"],
|
|
7124
|
+
{ ns: "business" }
|
|
7125
|
+
),
|
|
7126
|
+
confirmText: t(
|
|
7127
|
+
($) => $["businessSelection__tinVerificationFailureModalPrimaryButton"],
|
|
7128
|
+
{ ns: "business" }
|
|
7129
|
+
),
|
|
7130
|
+
onCancel: handleBusinessMismatchCancel,
|
|
7131
|
+
onConfirm: handleBusinessMismatchContinue
|
|
7132
|
+
}
|
|
7133
|
+
)
|
|
7134
|
+
]
|
|
7135
|
+
}
|
|
7136
|
+
) });
|
|
7137
|
+
}
|
|
5071
7138
|
export {
|
|
5072
|
-
|
|
5073
|
-
|
|
5074
|
-
COUNTRY_OF_GOVERNING_LAW_FIELD as C,
|
|
5075
|
-
DATE_OF_INCORPORATION_FIELD as D,
|
|
5076
|
-
EInvoicingCodeField as E,
|
|
5077
|
-
FinancialInformation as F,
|
|
5078
|
-
CountryOfGoverningLawFieldValidation as G,
|
|
5079
|
-
CountryFieldValidation as H,
|
|
5080
|
-
getForms as I,
|
|
5081
|
-
mapApiDocumentToBusinessDetailsDocuments as J,
|
|
5082
|
-
mapLegalEntityToBusinessDetailsSchema as K,
|
|
5083
|
-
LEGAL_FORM_FIELDS as L,
|
|
5084
|
-
financialInfoValidationWithEmployeesRules as M,
|
|
5085
|
-
CompanyStructureValidation as N,
|
|
5086
|
-
tinMatched as O,
|
|
5087
|
-
ProofOfOwnershipDocument as P,
|
|
5088
|
-
businessMismatchModalOpen as Q,
|
|
5089
|
-
RegistrationDocument as R,
|
|
5090
|
-
STOCK_EXCHANGE_MIC_FIELD as S,
|
|
5091
|
-
TaxDocument as T,
|
|
5092
|
-
formatDataForSummary as U,
|
|
5093
|
-
VerifiedBusinessCard as V,
|
|
5094
|
-
submit as W,
|
|
5095
|
-
useCompanySearch as X,
|
|
5096
|
-
useVerifyTin as Y,
|
|
5097
|
-
businessDetailsFieldsPerScenario as Z,
|
|
5098
|
-
BusinessDetailsDropin as _,
|
|
5099
|
-
stockISINFieldMetadata as a,
|
|
5100
|
-
stockExchangeMICFieldMetadata as b,
|
|
5101
|
-
EINVOICING_CODE_FIELD as c,
|
|
5102
|
-
dateOfIncorporationFieldMetadata as d,
|
|
5103
|
-
eInvoicingCodeFieldMetadata as e,
|
|
5104
|
-
DateOfIncorporationField as f,
|
|
5105
|
-
StockExchangeMICField as g,
|
|
5106
|
-
STOCK_ISIN_FIELD as h,
|
|
5107
|
-
StockISINField as i,
|
|
5108
|
-
STOCK_TICKER_SYMBOL_FIELD as j,
|
|
5109
|
-
StockTickerSymbolField as k,
|
|
5110
|
-
legalFormFieldMetadata as l,
|
|
5111
|
-
localizedLegalCompanyNameFieldConfig as m,
|
|
5112
|
-
defaultFieldMetadata as n,
|
|
5113
|
-
defaultFieldConfig as o,
|
|
5114
|
-
useLegalCompanyNameField as p,
|
|
5115
|
-
CountryOfGoverningLawField as q,
|
|
5116
|
-
isBankAccountRequestedForOrganization as r,
|
|
5117
|
-
stockTickerSymbolFieldMetadata as s,
|
|
5118
|
-
companyTypeOptions as t,
|
|
5119
|
-
useDebouncedState as u,
|
|
5120
|
-
verifiedBusiness as v,
|
|
5121
|
-
useCompanyTypeExamples as w,
|
|
5122
|
-
companyTypeMetadata as x,
|
|
5123
|
-
ProofOfSignatoryDocument as y,
|
|
5124
|
-
ProofOfDirectorDocument as z
|
|
7139
|
+
BusinessDetailsMultiformDropin as B,
|
|
7140
|
+
BusinessDetailsDropin as a
|
|
5125
7141
|
};
|