@adyen/kyc-components 4.7.2 → 4.8.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/4-people-7MltvEnk.js +35 -0
- package/dist/AD-D_B1KZm9.js +15 -0
- package/dist/AE-iKPgRx_9.js +17 -0
- package/dist/AI-CYjWGBKT.js +19 -0
- package/dist/AL-D62C5Lpk.js +19 -0
- package/dist/AR-BOgSvtgP.js +19 -0
- package/dist/AS-Cg8Vujpc.js +17 -0
- package/dist/AT-CCRMRifN.js +19 -0
- package/dist/AT-D3H5WGY3.js +15 -0
- package/dist/AT-DMpxSE4g.js +19 -0
- package/dist/AT-Doe66WxQ.js +16 -0
- package/dist/AU-B77DgHQb.js +16 -0
- package/dist/AU-BcSu8pI2.js +20 -0
- package/dist/AU-CiWB9qh-.js +11 -0
- package/dist/AU-DAfj7Z58.js +18 -0
- package/dist/AX-CG8iviap.js +15 -0
- package/dist/AZ-DIB7CvVN.js +19 -0
- package/dist/AcceptTermsOfServiceComponent-BKgdZKrj.js +651 -0
- package/dist/AcceptTermsOfServiceComponent-CUIdPIg8.js +6 -0
- package/dist/Accordion-Dmrb3-v6.js +111 -0
- package/dist/AccountSetupRejected-DkwJLZ-8.js +20 -0
- package/dist/ActionBar-ITEbcxgG.js +33 -0
- package/dist/Address-CnQ22ndb.js +595 -0
- package/dist/Alert-BER6uCP8.js +170 -0
- package/dist/Avatar-DElKUUVp.js +54 -0
- package/dist/BA-C4vH4-x6.js +19 -0
- package/dist/BE-BvtnaSSH.js +15 -0
- package/dist/BE-DJM3cj-R.js +11 -0
- package/dist/BE-Dtk1wvHk.js +12 -0
- package/dist/BE-Sbwjfh5h.js +11 -0
- package/dist/BG-DvFE-fU3.js +19 -0
- package/dist/BH-Bm_tXC8b.js +19 -0
- package/dist/BM-BPYI-Bk0.js +19 -0
- package/dist/BR-CRGYlRY-.js +18 -0
- package/dist/BR-CwJ6YXMX.js +23 -0
- package/dist/BR-DdZm-FhP.js +15 -0
- package/dist/BR-DjC4dRH8.js +20 -0
- package/dist/BS-DEbfM7Fg.js +19 -0
- package/dist/BV-LqWIWEV5.js +19 -0
- package/dist/BY-Dw4W1isS.js +19 -0
- package/dist/BusinessFinancingDropin-B8ZJDKWU.js +1796 -0
- package/dist/BusinessFinancingPage-B2EuTX1b.js +87 -0
- package/dist/BusinessTypeSelectionPage-CChAObkr.js +439 -0
- package/dist/Button-DvWt5T9O.js +189 -0
- package/dist/CA-CQtjbUjU.js +16 -0
- package/dist/CA-Cwit937J.js +18 -0
- package/dist/CA-D0ezsmfN.js +10 -0
- package/dist/CA-PLMbc5uq.js +17 -0
- package/dist/CH-Baaufs8O.js +15 -0
- package/dist/CH-D9S1IpBs.js +11 -0
- package/dist/CH-DPLfVgsE.js +15 -0
- package/dist/CH-DnoWGcl9.js +11 -0
- package/dist/CN-Bx6shvCX.js +19 -0
- package/dist/CR-CgM7Uut3.js +19 -0
- package/dist/CY-CxBi1s-O.js +15 -0
- package/dist/CZ-B3oiWDug.js +15 -0
- package/dist/CZ-B8nb2PxI.js +16 -0
- package/dist/CZ-CbWqKLbR.js +19 -0
- package/dist/CZ-DS5YfhO9.js +27 -0
- package/dist/Card-vYndix5Y.js +70 -0
- package/dist/Checkbox-BCYjFPa4.js +55 -0
- package/dist/Confirm-BmiOH3Vr.js +76 -0
- package/dist/ConstitutionalDocument-rRO4Qdx2.js +2228 -0
- package/dist/ContactDetails-tVqSDGqY.js +292 -0
- package/dist/ContextGuidance-DKKgj5gN.js +29 -0
- package/dist/ContractViewer-zPVipxCC.js +987 -0
- package/dist/CountryField-s5-jZTU9.js +38 -0
- package/dist/Currency-gYKD3DSx.js +191 -0
- package/dist/CustomerSupport-kwwKDe5a.js +127 -0
- package/dist/DE-BOCSw-Jn.js +23 -0
- package/dist/DE-NkKgh0-y.js +15 -0
- package/dist/DE-SZPlEjww.js +20 -0
- package/dist/DE-hCefE4qL.js +20 -0
- package/dist/DK-CB_26cPx.js +27 -0
- package/dist/DK-CO2QUqp2.js +19 -0
- package/dist/DK-CikJtsBF.js +15 -0
- package/dist/DK-DAYxZyrn.js +18 -0
- package/dist/DO-DWjKCR-x.js +19 -0
- package/dist/DebugModal-DycU_84l.js +451 -0
- package/dist/DecisionMakerDetails-DA9upL0W.js +471 -0
- package/dist/DecisionMakerDetailsPage-B7iGmS0R.js +105 -0
- package/dist/DecisionMakers-BZRkBx5n.js +670 -0
- package/dist/DetailViewLayout-Cz3FVZ5a.js +68 -0
- package/dist/Divider-CrK4vlsJ.js +11 -0
- package/dist/DropinLayout-Ce8IeTl4.js +22 -0
- package/dist/Dropzone-By_YOrv2.js +221 -0
- package/dist/EC-CCGvbVWA.js +20 -0
- package/dist/EE-DebeWn2E.js +15 -0
- package/dist/ES-Bf5fpQJJ.js +24 -0
- package/dist/ES-D2CBh7YF.js +19 -0
- package/dist/ES-DXLZWZXA.js +15 -0
- package/dist/ES-m71Tl7fE.js +15 -0
- package/dist/EmbeddedStatus-DeSYswbC.js +128 -0
- package/dist/EndStateLayout-CR8wHeA1.js +84 -0
- package/dist/EntityAssociation-CKOd_SVw.js +163 -0
- package/dist/EntityGuidanceStatus-C_rpRyk4.js +89 -0
- package/dist/ErrorPanel-4juOd8Z2.js +186 -0
- package/dist/FI-Cbz5-l9v.js +10 -0
- package/dist/FI-Clx-zbKe.js +15 -0
- package/dist/FI-L14G4S91.js +11 -0
- package/dist/FI-_CR_F2Ml.js +12 -0
- package/dist/FJ-BKLmDeVh.js +19 -0
- package/dist/FO-D7VnFgWu.js +19 -0
- package/dist/FR-D2lGCnJC.js +16 -0
- package/dist/FR-D2zQy3jq.js +15 -0
- package/dist/FR-DwVflgGw.js +15 -0
- package/dist/FR-wqLTqKJj.js +23 -0
- package/dist/Field-C2ZpB0wo.js +155 -0
- package/dist/FormNavigation-IqQmylMk.js +116 -0
- package/dist/GB-BX3mPDDS.js +27 -0
- package/dist/GB-CIqAOZg5.js +24 -0
- package/dist/GB-CVb-Rw8a.js +18 -0
- package/dist/GB-DD4csU-b.js +11 -0
- package/dist/GE-D02s-9eo.js +19 -0
- package/dist/GF-BcHxbxvv.js +15 -0
- package/dist/GG-C3cx2hzZ.js +27 -0
- package/dist/GI-D_DZhrwe.js +35 -0
- package/dist/GL-BUOXwUJ0.js +19 -0
- package/dist/GP-CmZCjGab.js +15 -0
- package/dist/GR-BxjWJl4T.js +15 -0
- package/dist/GT-C_l7WI2f.js +19 -0
- package/dist/GU-7zSp4NP8.js +17 -0
- package/dist/HK-D5lgUGIW.js +10 -0
- package/dist/HK-DXmjOLnc.js +17 -0
- package/dist/HK-Dc3v2ZB0.js +18 -0
- package/dist/HK-dz43_PmR.js +15 -0
- package/dist/HR-BvWaw8qz.js +15 -0
- package/dist/HR-ChipU8Kr.js +15 -0
- package/dist/HR-D3ZZV7I7.js +19 -0
- package/dist/HR-SfBt4kaq.js +15 -0
- package/dist/HU-1UX4rgmz.js +10 -0
- package/dist/HU-9NTdjUUV.js +26 -0
- package/dist/HU-CzI3Elvd.js +19 -0
- package/dist/HU-wpmPNNka.js +11 -0
- package/dist/HandlerContext-CIedIvkP.js +9 -0
- package/dist/Header-BNb1zwkF.js +93 -0
- package/dist/ID-O2T9tbLO.js +19 -0
- package/dist/IE-CRaBXxhc.js +18 -0
- package/dist/IE-Cw9l0506.js +15 -0
- package/dist/IE-DWpH_5Cq.js +10 -0
- package/dist/IE-OqeqXlhV.js +20 -0
- package/dist/IL-1hVGBOhQ.js +15 -0
- package/dist/IM-B1t_Q0mE.js +27 -0
- package/dist/IN-BAGr7C88.js +20 -0
- package/dist/IS-C97KS-Cn.js +19 -0
- package/dist/IT-Bqf_SGsX.js +19 -0
- package/dist/IT-GLNikVmY.js +19 -0
- package/dist/IT-PBgScy3E.js +15 -0
- package/dist/IT-b5Hsdl6Z.js +15 -0
- package/dist/Image-BTVEK7B2.js +33 -0
- package/dist/Individual.rules-B3pCow6J.js +295 -0
- package/dist/IndividualDropin-bFgrHziM.js +4946 -0
- package/dist/InputDate-XX9jaw9v.js +52 -0
- package/dist/InputGroup-2FJnD0LO.js +21 -0
- package/dist/InputText-C30dZxS4.js +119 -0
- package/dist/Introduction-BRwmMwP8.js +271 -0
- package/dist/InvitedDecisionMakerComponent-DD1vVyTG.js +6 -0
- package/dist/InvitedDecisionMakerComponent-g4s20v7g.js +353 -0
- package/dist/JE-D9zaTrAY.js +27 -0
- package/dist/JM-6zLyaeVi.js +19 -0
- package/dist/JO-BdNdFHnL.js +19 -0
- package/dist/JP-znYbtZMc.js +20 -0
- package/dist/JpAddress-DcrYSdH2.js +319 -0
- package/dist/KR-xcUi-9h2.js +19 -0
- package/dist/KW-3DCYRJ53.js +19 -0
- package/dist/KY-CCApxZ6r.js +19 -0
- package/dist/KZ-Cqr8yPqY.js +19 -0
- package/dist/LB-R74h2pUy.js +19 -0
- package/dist/LI-D9H9hvDG.js +15 -0
- package/dist/LT-CDQI5_NM.js +15 -0
- package/dist/LT-COGUxKB6.js +19 -0
- package/dist/LT-DkKeNYqC.js +16 -0
- package/dist/LT-Dq5I_vLb.js +11 -0
- package/dist/LU-B7-x8Llo.js +15 -0
- package/dist/LV-DAzwuNGM.js +15 -0
- package/dist/LandingLayout-BQZNXhZ_.js +76 -0
- package/dist/LegalCompanyNameField-D91em8Tk.js +108 -0
- package/dist/LegalRepresentativeDetailsPage-BeNRjz37.js +73 -0
- package/dist/Link-DKiaZfxB.js +32 -0
- package/dist/List-DLrcpMVd.js +71 -0
- package/dist/ListItem-zVPVQbER.js +70 -0
- package/dist/LoaderWrapper-DWKykOjd.js +34 -0
- package/dist/MC-DYg2Ld6N.js +15 -0
- package/dist/MD-BSGq8uEc.js +19 -0
- package/dist/ME-CMYolexb.js +19 -0
- package/dist/MK-KXTP17uw.js +19 -0
- package/dist/MP-CJH5I9LN.js +17 -0
- package/dist/MQ-B-Nxd16T.js +15 -0
- package/dist/MR-9gjgEzl5.js +19 -0
- package/dist/MT-DCvbkYrX.js +15 -0
- package/dist/MU-CVDBPgAP.js +19 -0
- package/dist/MX-B8dPVdJo.js +17 -0
- package/dist/MY-DcfNGXIG.js +16 -0
- package/dist/MaskedInput-zFUBaX87.js +714 -0
- package/dist/MaybeModal-Dsgozf1o.js +24 -0
- package/dist/Modal-UfgpuJZi.js +129 -0
- package/dist/NC-DQQUjrGe.js +19 -0
- package/dist/NL-Bu5_sjR1.js +14 -0
- package/dist/NL-CMB4A6y3.js +15 -0
- package/dist/NL-DQR9Rrua.js +12 -0
- package/dist/NL-McMEOXeg.js +19 -0
- package/dist/NO-C1lR0Cpn.js +14 -0
- package/dist/NO-CKPHTYW8.js +16 -0
- package/dist/NO-DAvhrELf.js +26 -0
- package/dist/NO-Pppylsvl.js +19 -0
- package/dist/NZ-BLYvv2PK.js +10 -0
- package/dist/NZ-BuvPkC2r.js +11 -0
- package/dist/Name-DC5eBwEU.js +61 -0
- package/dist/NewSummary-DVIIH1Ml.js +64 -0
- package/dist/PE-J7zWKbQ3.js +19 -0
- package/dist/PF-CQvMXWIc.js +19 -0
- package/dist/PH-CsAkleLZ.js +19 -0
- package/dist/PK-pnVCB70L.js +19 -0
- package/dist/PL-BIkD7ly2.js +19 -0
- package/dist/PL-Cfpb3P4Y.js +19 -0
- package/dist/PL-D6iB2qQS.js +15 -0
- package/dist/PL-DdsUKlRx.js +26 -0
- package/dist/PM-DXhRSYlY.js +15 -0
- package/dist/PR-BJTR9010.js +17 -0
- package/dist/PS-Bb7ensjm.js +19 -0
- package/dist/PT-Bqv36Ez0.js +15 -0
- package/dist/PT-DMau-7AE.js +19 -0
- package/dist/PT-D_mzbSbR.js +15 -0
- package/dist/PT-iBbOYasm.js +16 -0
- package/dist/PayoutDetailsDropin-DAUlhP1c.js +3909 -0
- package/dist/PayoutDetailsPage-mJE3Hgy9.js +857 -0
- package/dist/ProgressBar-BlxQvN7D.js +38 -0
- package/dist/QA-Cya8smAe.js +19 -0
- package/dist/RE-DV-Olrl9.js +15 -0
- package/dist/RO-7ngAIZ4E.js +15 -0
- package/dist/RO-D29rc5pZ.js +11 -0
- package/dist/RO-JvqtRH2p.js +11 -0
- package/dist/RO-Nqdvv0rk.js +19 -0
- package/dist/RS-Bdspw_Te.js +19 -0
- package/dist/RU-2VREcND8.js +19 -0
- package/dist/Radio-D6uF9-cu.js +21 -0
- package/dist/RadioGroup-Bi9v9dZu.js +71 -0
- package/dist/Review-C-B_R1FH.js +89 -0
- package/dist/RootBusinessDetailsPage-9ccBcunp.js +67 -0
- package/dist/RootBusinessLinesPage-LQptA58p.js +1451 -0
- package/dist/RootIndividualDetailsPage-DlzHpNEn.js +81 -0
- package/dist/SA-ONrtr4dq.js +19 -0
- package/dist/SE-Bp9QG9OZ.js +10 -0
- package/dist/SE-CfwjGhj2.js +27 -0
- package/dist/SE-CjCMy1R-.js +12 -0
- package/dist/SE-CspSL4-O.js +19 -0
- package/dist/SG-BSxtCx98.js +18 -0
- package/dist/SG-Bx4a8mSG.js +11 -0
- package/dist/SG-Cte5jgnm.js +16 -0
- package/dist/SG-W9jzYBBR.js +19 -0
- package/dist/SI-CjPVM480.js +14 -0
- package/dist/SI-ClAvsgGs.js +12 -0
- package/dist/SI-D_WmP1xi.js +19 -0
- package/dist/SI-DuER-ftQ.js +15 -0
- package/dist/SJ-DRle19p-.js +19 -0
- package/dist/SK-BXY1VMKv.js +19 -0
- package/dist/SK-CFssz9bO.js +15 -0
- package/dist/SK-CP4lBBly.js +10 -0
- package/dist/SK-KhQnqXtK.js +16 -0
- package/dist/SM-v_4Yc2mM.js +15 -0
- package/dist/Select-DDSua27l.js +775 -0
- package/dist/SignPCIComponent-DGWjjIO0.js +367 -0
- package/dist/SignPCIComponent-DvZAN38F.js +6 -0
- package/dist/SingpassSelection-PepG3R0o.js +244 -0
- package/dist/SoleProprietorshipPage-DnThw6us.js +69 -0
- package/dist/SourceOfFundsPage-CuIBGc8z.js +1987 -0
- package/dist/Spacer-_Y17BH-4.js +11 -0
- package/dist/StackLayout-Bhbj68nx.js +105 -0
- package/dist/StateContext-BToC3V53.js +9 -0
- package/dist/StepProgressIndicator-CzDT61ie.js +80 -0
- package/dist/StructuredList-w0Z2zLTk.js +56 -0
- package/dist/Summary-B8AA9_C_.js +226 -0
- package/dist/TF-BhrG4wMf.js +19 -0
- package/dist/TH-Dnjjl0vl.js +20 -0
- package/dist/TL-DV3_HDbD.js +19 -0
- package/dist/TN-CvaVweYw.js +19 -0
- package/dist/TR-BAvGXlpl.js +19 -0
- package/dist/TT-DRIx1q2s.js +20 -0
- package/dist/TW-DRf29Guu.js +21 -0
- package/dist/Tag-BUoDHC4C.js +39 -0
- package/dist/TaskVerificationStatus-UnhKHQYu.js +118 -0
- package/dist/TaxInformationField-zwmzV8Ov.js +2830 -0
- package/dist/TaxReportingDropin-BZ67pubt.js +480 -0
- package/dist/TextArea-CyATBUKN.js +80 -0
- package/dist/TileGroup-tVHAZBni.js +169 -0
- package/dist/ToastContext-Cx99hkTh.js +13 -0
- package/dist/ToastContextProvider-BWJct14f.js +103 -0
- package/dist/TrustDetailsPage-DLIvcoSr.js +1685 -0
- package/dist/TrustMemberCompanyPage-Q0FDNUXO.js +107 -0
- package/dist/TrustMemberIndividualPage-C4FZ57EQ.js +107 -0
- package/dist/TrustMemberRoleAndTypePage-s8ZOlbBU.js +943 -0
- package/dist/TrustMembersOverview-CZ-i1Yoq.js +350 -0
- package/dist/UA-Ba88l6Xd.js +19 -0
- package/dist/US-CKehaXnS.js +10 -0
- package/dist/US-Df5L2r8F.js +18 -0
- package/dist/US-QONZX-gV.js +23 -0
- package/dist/US-m2RymYgz.js +17 -0
- package/dist/UY-C7OqeI1W.js +19 -0
- package/dist/UnincorporatedPartnershipIndividualPage-DElj-rnx.js +78 -0
- package/dist/UnincorporatedPartnershipMemberCompanyPage-B2iYbHPm.js +78 -0
- package/dist/UnincorporatedPartnershipMemberRoleAndTypePage-BgNE2bk7.js +276 -0
- package/dist/UnincorporatedPartnershipMembersOverview-BwCLw7rz.js +156 -0
- package/dist/VA-kEhphxOY.js +15 -0
- package/dist/VG-9RtXQCNA.js +19 -0
- package/dist/VI-Dtn9fHsy.js +17 -0
- package/dist/VN-CQ52lXXR.js +19 -0
- package/dist/VerificationErrorAlert-C_9CLF8G.js +38 -0
- package/dist/WF-D5AVATSv.js +19 -0
- package/dist/YT-B9qrlCqK.js +15 -0
- package/dist/ZA-CZ_c0XHc.js +20 -0
- package/dist/_rolldown_dynamic_import_helper-rq_tsyLP.js +14 -0
- package/dist/accountHolderUtils-BYe8xPFy.js +44 -0
- package/dist/adyen-business-financing.js +172 -66
- package/dist/adyen-individual-configuration.js +186 -59
- package/dist/adyen-individual-status.js +104 -45
- package/dist/adyen-invited-decision-maker.js +38 -42
- package/dist/adyen-onboarding.js +2465 -55
- package/dist/adyen-terms-of-service-management.js +58 -64
- package/dist/adyen-terms-of-service-status.js +138 -45
- package/dist/adyen-transfer-instrument-configuration.js +176 -74
- package/dist/adyen-transfer-instrument-management.js +409 -59
- package/dist/adyen-verification-status.js +234 -80
- package/dist/arrow-right-BzximXQd.js +20 -0
- package/dist/bafinUtils-kBPs58Au.js +68 -0
- package/dist/bag-CV-7aEOY.js +20 -0
- package/dist/bank-B3QWGDvh.js +20 -0
- package/dist/basePatterns-VqSYMnkh.js +8 -0
- package/dist/bg-BG-B59ND_11.js +59 -0
- package/dist/bg-BG-B67nlf6n.js +31 -0
- package/dist/bg-BG-BxkwIoTQ.js +69 -0
- package/dist/bg-BG-C0wzRs18.js +7 -0
- package/dist/bg-BG-CN_UREwh.js +23 -0
- package/dist/bg-BG-Ckeu3dBt.js +26 -0
- package/dist/bg-BG-D2t5UzpH.js +70 -0
- package/dist/bg-BG-DQPBlfB6.js +18 -0
- package/dist/bg-BG-DeVGTTeO.js +7 -0
- package/dist/bg-BG-DnMyf-n3.js +48 -0
- package/dist/bg-BG-DqWeAqky.js +57 -0
- package/dist/bg-BG-sDNpvadv.js +7 -0
- package/dist/bg-BG-xv1T8Cru.js +7 -0
- package/dist/bg-BG-ymvx5WWi.js +7 -0
- package/dist/bin-Nm57SUCy.js +30 -0
- package/dist/birthDateUtils-C686KOxO.js +82 -0
- package/dist/business-lines-BYTyy_mD.js +554 -0
- package/dist/capital-BIrjrei_.js +23 -0
- package/dist/cash-stack-q8jqAQnj.js +33 -0
- package/dist/certificate-BA32wlVD.js +23 -0
- package/dist/checkmark-Sx0Eq9g1.js +20 -0
- package/dist/checkmark-circle-D25SXuEg.js +28 -0
- package/dist/checkmark-circle-fill-DWyHVNKM.js +30 -0
- package/dist/checkmark-small-BYKwXmot.js +20 -0
- package/dist/chevron-down-BY9NvSX2.js +20 -0
- package/dist/chevron-left-1TeIr8LI.js +20 -0
- package/dist/chevron-right-D3ORtAcK.js +20 -0
- package/dist/chevron-up-DSUlaHcZ.js +20 -0
- package/dist/circle-BLLy-RH7.js +30 -0
- package/dist/circle-small-filled-C_6B84Iy.js +20 -0
- package/dist/clock-lHMbm7lZ.js +28 -0
- package/dist/coins-DM30OZR2.js +30 -0
- package/dist/commonValidators-DCdet-gH.js +18 -0
- package/dist/company-types-value-BYTAKfjo.js +17 -0
- package/dist/contract-CHdRrIxe.js +20 -0
- package/dist/countries-BuZ6_X95.js +41 -0
- package/dist/country-COrdWGaq.js +13 -0
- package/dist/country-code-CX5KqMBr.js +284 -0
- package/dist/cross-circle-fill-CmXERg4H.js +30 -0
- package/dist/cross-circle-fill-small-CMz7hV-a.js +20 -0
- package/dist/cross-eL7Kqv7I.js +20 -0
- package/dist/cs-CZ-B0PS89aw.js +7 -0
- package/dist/cs-CZ-BJQndp5g.js +18 -0
- package/dist/cs-CZ-BSCmFoe-.js +70 -0
- package/dist/cs-CZ-BkegBLH0.js +7 -0
- package/dist/cs-CZ-Cf3RE2Kz.js +69 -0
- package/dist/cs-CZ-CgD-Dni9.js +48 -0
- package/dist/cs-CZ-D0tlzysb.js +57 -0
- package/dist/cs-CZ-DNo3i13i.js +59 -0
- package/dist/cs-CZ-DerpXyW7.js +26 -0
- package/dist/cs-CZ-DoyjAWTB.js +7 -0
- package/dist/cs-CZ-DzvqR4Si.js +7 -0
- package/dist/cs-CZ-EALbGC0P.js +23 -0
- package/dist/cs-CZ-nVt_3Wsc.js +31 -0
- package/dist/cs-CZ-y--aL5tG.js +7 -0
- package/dist/currency-DNgyvN7z.js +29 -0
- package/dist/da-DK-B_qoG-tX.js +48 -0
- package/dist/da-DK-Bdp8gkhn.js +23 -0
- package/dist/da-DK-BpC27U0O.js +7 -0
- package/dist/da-DK-C-6cZEqg.js +59 -0
- package/dist/da-DK-CLzpAJZX.js +7 -0
- package/dist/da-DK-Cu2Bi6Q7.js +31 -0
- package/dist/da-DK-DFjTxgfg.js +7 -0
- package/dist/da-DK-DSrFDOG3.js +57 -0
- package/dist/da-DK-DbpZoBrp.js +18 -0
- package/dist/da-DK-DcplyxCd.js +70 -0
- package/dist/da-DK-DgFOdais.js +69 -0
- package/dist/da-DK-d-G4WSG9.js +7 -0
- package/dist/da-DK-gVDOt4Mx.js +26 -0
- package/dist/da-DK-niSqcowC.js +7 -0
- package/dist/datasetUtil-Zd4TCTDn.js +45 -0
- package/dist/de-DE-4UdLDq_d.js +59 -0
- package/dist/de-DE-BVoU3x7q.js +26 -0
- package/dist/de-DE-BX0mu_5B.js +7 -0
- package/dist/de-DE-BsZOOvbi.js +7 -0
- package/dist/de-DE-Bsrf1Qk-.js +7 -0
- package/dist/de-DE-CJAVduiD.js +70 -0
- package/dist/de-DE-CPjVxwLK.js +69 -0
- package/dist/de-DE-CSfZ-fLe.js +23 -0
- package/dist/de-DE-Ccbobm6F.js +18 -0
- package/dist/de-DE-DLpDehXu.js +48 -0
- package/dist/de-DE-DXLRcNXw.js +57 -0
- package/dist/de-DE-KXIXcUTs.js +7 -0
- package/dist/de-DE-Qs8eQGQS.js +31 -0
- package/dist/de-DE-jwrvfE6B.js +7 -0
- package/dist/de-DE-zVrwBFVP.js +7 -0
- package/dist/debouncedInputEvent-Dxv4-RAv.js +54 -0
- package/dist/debugStore-bZ_bkJeS.js +9 -0
- package/dist/decision-maker-type-Cow3CpUd.js +12 -0
- package/dist/decision-makers-group-Cof9scJd.js +4169 -0
- package/dist/decisionMaker-j9cwyXuS.js +146 -0
- package/dist/decisionMakerRoles-CAy-eeNV.js +45 -0
- package/dist/digital-wallet-BXDAhThn.js +163 -0
- package/dist/document-1-CAkgmlsx.js +20 -0
- package/dist/document-blurred-LCBsN2NC.js +116 -0
- package/dist/document-cut-off-wsPtcq1x.js +116 -0
- package/dist/document-expired-CvTJKcZr.js +160 -0
- package/dist/document-front-BHCo0w58.js +113 -0
- package/dist/document-person-BMqoEMgx.js +28 -0
- package/dist/download-CUCb0PT7.js +23 -0
- package/dist/dropinUtils-FIEFyS0F.js +275 -0
- package/dist/edit-1-DqX_7cbs.js +20 -0
- package/dist/el-GR-B08o_Wr7.js +59 -0
- package/dist/el-GR-B1VnihMi.js +69 -0
- package/dist/el-GR-BUGibSyd.js +26 -0
- package/dist/el-GR-BV0tj_MA.js +7 -0
- package/dist/el-GR-C-HtCTGV.js +57 -0
- package/dist/el-GR-C5lpMpmF.js +7 -0
- package/dist/el-GR-C7o9YGzw.js +23 -0
- package/dist/el-GR-CDp-bn0j.js +7 -0
- package/dist/el-GR-CN3HrU9J.js +70 -0
- package/dist/el-GR-CNDZGVN3.js +31 -0
- package/dist/el-GR-D9AagIjI.js +18 -0
- package/dist/el-GR-DRbd6eXu.js +7 -0
- package/dist/el-GR-DZuLkaBp.js +48 -0
- package/dist/el-GR-Doj3UHZu.js +7 -0
- package/dist/el-GR-DvgAQImQ.js +7 -0
- package/dist/emitEvent-B8K0cb1F.js +35 -0
- package/dist/en-US-3j1Js4vT.js +70 -0
- package/dist/en-US-B3MAOxZH.js +7 -0
- package/dist/en-US-BWMrfrd7.js +31 -0
- package/dist/en-US-Bg9gdBEC.js +7 -0
- package/dist/en-US-BgLFeko-.js +18 -0
- package/dist/en-US-C81RZMm3.js +76 -0
- package/dist/en-US-CEBexxFl.js +23 -0
- package/dist/en-US-CnVk6lVt.js +212 -0
- package/dist/en-US-CwN7_Z6A.js +60 -0
- package/dist/en-US-Cwp_kAIu.js +57 -0
- package/dist/en-US-D1y6M9AI.js +116 -0
- package/dist/en-US-D6psKu6Y.js +26 -0
- package/dist/en-US-D8jS6G6S.js +10 -0
- package/dist/en-US-DH-5G1L0.js +7 -0
- package/dist/en-US-DqbNEPfm.js +7 -0
- package/dist/en-US-IxvcS3bq.js +7 -0
- package/dist/en-US-RJmb2nTR.js +69 -0
- package/dist/en-US-Rnj0uOlI.js +40 -0
- package/dist/en-US-hCtMObDn.js +196 -0
- package/dist/en-US-jcuu40kx.js +48 -0
- package/dist/en-US-rEquAkrM.js +60 -0
- package/dist/en-US.instructions-Bh8SYzc5.js +7 -0
- package/dist/en-US.instructions-C5xXRJDu.js +16 -0
- package/dist/entityAssociationUtil-BEzUdPbm.js +97 -0
- package/dist/es-ES-8AtDNr6X.js +18 -0
- package/dist/es-ES-B7uIo7kE.js +23 -0
- package/dist/es-ES-B9kTevXB.js +59 -0
- package/dist/es-ES-BJfw2diu.js +7 -0
- package/dist/es-ES-B_kBpFxZ.js +7 -0
- package/dist/es-ES-BkeAb5PG.js +7 -0
- package/dist/es-ES-Bwj2MUyM.js +69 -0
- package/dist/es-ES-CHyhM1uh.js +7 -0
- package/dist/es-ES-CLr_KwxQ.js +7 -0
- package/dist/es-ES-D-n6xoWo.js +7 -0
- package/dist/es-ES-D1vAd-8r.js +26 -0
- package/dist/es-ES-DKenRcq3.js +70 -0
- package/dist/es-ES-DWjfZmTj.js +31 -0
- package/dist/es-ES-H0DZcC1K.js +48 -0
- package/dist/es-ES-hX5WUfzS.js +57 -0
- package/dist/et-EE-BSAr_xVc.js +31 -0
- package/dist/et-EE-BcWPn7Cl.js +7 -0
- package/dist/et-EE-BnDOa_4e.js +7 -0
- package/dist/et-EE-CNNN-M_x.js +18 -0
- package/dist/et-EE-CWGint-T.js +26 -0
- package/dist/et-EE-CfheEJAy.js +7 -0
- package/dist/et-EE-Cs__RUB9.js +48 -0
- package/dist/et-EE-DmlaKK4B.js +57 -0
- package/dist/et-EE-DsLOML8r.js +70 -0
- package/dist/et-EE-Du3REm6O.js +7 -0
- package/dist/et-EE-GTXnG-3j.js +59 -0
- package/dist/et-EE-Mp-OiQL2.js +69 -0
- package/dist/et-EE-SeklRCmh.js +7 -0
- package/dist/et-EE-_uLrdnTi.js +23 -0
- package/dist/external-link-V6JPH8K0.js +20 -0
- package/dist/fi-FI-1nGlfW_t.js +7 -0
- package/dist/fi-FI-80q1y1Bb.js +59 -0
- package/dist/fi-FI-BKXhGjNk.js +26 -0
- package/dist/fi-FI-BY9X2DpF.js +31 -0
- package/dist/fi-FI-BcXm_vtP.js +7 -0
- package/dist/fi-FI-BcdVq2e0.js +23 -0
- package/dist/fi-FI-Bx1S9eQf.js +70 -0
- package/dist/fi-FI-Cl1vbAPV.js +18 -0
- package/dist/fi-FI-DdyNwoGb.js +7 -0
- package/dist/fi-FI-Dy_bfWw7.js +48 -0
- package/dist/fi-FI-Dz25oorf.js +7 -0
- package/dist/fi-FI-iyr94E5r.js +57 -0
- package/dist/fi-FI-n4x7ZOmh.js +7 -0
- package/dist/fi-FI-pvpGl_6s.js +69 -0
- package/dist/fieldConfigurations-m7oWP1DZ.js +11 -0
- package/dist/file-6a0FDVyq.js +37 -0
- package/dist/filterProblemsByTaskForms-DwS9T-_E.js +21 -0
- package/dist/form-rules-CvdV5rPY.js +7 -0
- package/dist/formFieldsUtils-CR7j1k8e.js +7 -0
- package/dist/formUtils-DCvL3uZG.js +78 -0
- package/dist/fr-FR-ANv8VCCV.js +7 -0
- package/dist/fr-FR-B9xNxWia.js +31 -0
- package/dist/fr-FR-CDTGvZzl.js +7 -0
- package/dist/fr-FR-CEWcwAJ-.js +7 -0
- package/dist/fr-FR-CMMz7OEo.js +69 -0
- package/dist/fr-FR-CqbeB381.js +7 -0
- package/dist/fr-FR-D2Ep3xgM.js +59 -0
- package/dist/fr-FR-DC_PZPwP.js +18 -0
- package/dist/fr-FR-DKjCgBfS.js +7 -0
- package/dist/fr-FR-DL8mtS3r.js +57 -0
- package/dist/fr-FR-DcXwaT3d.js +48 -0
- package/dist/fr-FR-DksMI4zV.js +70 -0
- package/dist/fr-FR-DzjwEGsx.js +26 -0
- package/dist/fr-FR-Ta6QBpqt.js +23 -0
- package/dist/fr-FR-bqkpOtF1.js +7 -0
- package/dist/funds-in-04OBDLJw.js +24 -0
- package/dist/get-scenarios-DnCVdYIC.js +24 -0
- package/dist/getLegalEntityCountry-C6bSV6sB.js +17 -0
- package/dist/getName-Bdwp_hkV.js +35 -0
- package/dist/getNestedPropertyKeys-CVAsNBJ8.js +18 -0
- package/dist/getProblemsForEntity-Df8xJUr2.js +16 -0
- package/dist/getProps-CkZCnNxW.js +98 -0
- package/dist/getTrustedFields-UVTLadau.js +45 -0
- package/dist/gift-C3MzdRIj.js +20 -0
- package/dist/globalStore-BsvLFLDr.js +418 -0
- package/dist/graph-BJ7yemhR.js +32 -0
- package/dist/graph-up-CWzty_jt.js +38 -0
- package/dist/headquarter-COstZFO7.js +42 -0
- package/dist/hotel-C1vO2ZiV.js +33 -0
- package/dist/house-BfjiK4vF.js +24 -0
- package/dist/hr-HR-B8MiNFt0.js +7 -0
- package/dist/hr-HR-Bp5qQwHS.js +48 -0
- package/dist/hr-HR-BqNvRwoc.js +7 -0
- package/dist/hr-HR-C4Bv0YpX.js +59 -0
- package/dist/hr-HR-CBySzkSl.js +7 -0
- package/dist/hr-HR-CJHkB1ko.js +69 -0
- package/dist/hr-HR-CLRdCbY_.js +7 -0
- package/dist/hr-HR-CMcgajLG.js +26 -0
- package/dist/hr-HR-CjbJFQJu.js +7 -0
- package/dist/hr-HR-Ck-S-k5d.js +23 -0
- package/dist/hr-HR-D0Xp4lTU.js +31 -0
- package/dist/hr-HR-EhBzx8FM.js +57 -0
- package/dist/hr-HR-FHDzcIUl.js +70 -0
- package/dist/hr-HR-pOpa3-4-.js +18 -0
- package/dist/http-btI4x32X.js +148 -0
- package/dist/hu-HU-3a4f6Po4.js +59 -0
- package/dist/hu-HU-BF3I2cDh.js +69 -0
- package/dist/hu-HU-BOCGei6J.js +31 -0
- package/dist/hu-HU-Bg2UoMm1.js +7 -0
- package/dist/hu-HU-C-gD2scj.js +7 -0
- package/dist/hu-HU-Cq3L3459.js +26 -0
- package/dist/hu-HU-CsOzXRwg.js +7 -0
- package/dist/hu-HU-DG9r7Yn5.js +18 -0
- package/dist/hu-HU-DHZf-Z1b.js +7 -0
- package/dist/hu-HU-DZmGYcpb.js +57 -0
- package/dist/hu-HU-DZnrPw7M.js +70 -0
- package/dist/hu-HU-HNscNs5I.js +48 -0
- package/dist/hu-HU-u7Q5hZ8M.js +23 -0
- package/dist/hu-HU-xJ7HEjBk.js +7 -0
- package/dist/id-blurred-DajPeUev.js +266 -0
- package/dist/id-cut-off-Cg7VH88-.js +242 -0
- package/dist/id-front-BFiC6TLx.js +237 -0
- package/dist/id-glare--tl3DxTG.js +218 -0
- package/dist/image-Ctf24Eqr.js +23 -0
- package/dist/info-CKFBABlx.js +32 -0
- package/dist/info-filled-BtKXWmDk.js +32 -0
- package/dist/invalidateRootLegalEntity-BbVdQNIY.js +45 -0
- package/dist/isEmpty-DFUWFV4h.js +14 -0
- package/dist/isEmptyEntity-BM_3oo07.js +44 -0
- package/dist/isNewEntity-4QusRCpP.js +7 -0
- package/dist/it-IT-4udyC9ua.js +7 -0
- package/dist/it-IT-BFVfcntm.js +31 -0
- package/dist/it-IT-BVcopRE0.js +57 -0
- package/dist/it-IT-Bncw2hQ-.js +69 -0
- package/dist/it-IT-C-OxfLhZ.js +48 -0
- package/dist/it-IT-C2wbwYWQ.js +59 -0
- package/dist/it-IT-CBQ2gGE7.js +7 -0
- package/dist/it-IT-CKYkplGl.js +23 -0
- package/dist/it-IT-Cd3oPF1M.js +18 -0
- package/dist/it-IT-D8RXfncB.js +7 -0
- package/dist/it-IT-DWt33Mig.js +70 -0
- package/dist/it-IT-DpTVTcDk.js +7 -0
- package/dist/it-IT-MRrAO1jy.js +7 -0
- package/dist/it-IT-YCjFrZ-Z.js +7 -0
- package/dist/it-IT-rGM1QmSW.js +26 -0
- package/dist/ja-JP-B8Rg2VNl.js +69 -0
- package/dist/ja-JP-BDPtYIpq.js +7 -0
- package/dist/ja-JP-C0ASZo79.js +196 -0
- package/dist/ja-JP-CLmtF9H_.js +31 -0
- package/dist/ja-JP-CNNwQyYR.js +70 -0
- package/dist/ja-JP-CQBoZgiC.js +23 -0
- package/dist/ja-JP-CgfF4yTt.js +48 -0
- package/dist/ja-JP-Cla1MJLj.js +7 -0
- package/dist/ja-JP-CsgosKvD.js +26 -0
- package/dist/ja-JP-DRYUrb3a.js +7 -0
- package/dist/ja-JP-DbHm_J96.js +7 -0
- package/dist/ja-JP-DieVzA1B.js +18 -0
- package/dist/ja-JP-DxUBevNe.js +59 -0
- package/dist/ja-JP-DyUgd4BE.js +57 -0
- package/dist/ja-JP-WirIWnQi.js +7 -0
- package/dist/ja-JP-uXR7c5rz.js +7 -0
- package/dist/japanSupportUtils-DcDqwV81.js +11 -0
- package/dist/jpAddressSchema-BQTiMBSQ.js +17 -0
- package/dist/keys-fzUbt2xF.js +20 -0
- package/dist/legal-entity-type-VIfNYnJP.js +13 -0
- package/dist/listToRecord-4wGOf00H.js +10 -0
- package/dist/localizeDateString-AhjDnkHD.js +35 -0
- package/dist/location-CpaR6p3k.js +23 -0
- package/dist/lt-LT-2d52byGI.js +70 -0
- package/dist/lt-LT-4dQRWgMS.js +7 -0
- package/dist/lt-LT-B9QsV1Fl.js +31 -0
- package/dist/lt-LT-BE20J_Fa.js +59 -0
- package/dist/lt-LT-BRFs6EyI.js +69 -0
- package/dist/lt-LT-CK-_FLDK.js +18 -0
- package/dist/lt-LT-CxHglunM.js +48 -0
- package/dist/lt-LT-CyVGhu0R.js +26 -0
- package/dist/lt-LT-DCexrILL.js +57 -0
- package/dist/lt-LT-DsKGJjAK.js +7 -0
- package/dist/lt-LT-Dv9CNqL5.js +23 -0
- package/dist/lt-LT-RYz2_iMh.js +7 -0
- package/dist/lt-LT-lr-xOt-0.js +7 -0
- package/dist/lt-LT-ykgOI1Lh.js +7 -0
- package/dist/lv-LV-1DHJcJtx.js +31 -0
- package/dist/lv-LV-7toRaVhs.js +7 -0
- package/dist/lv-LV-BXLZTnKa.js +59 -0
- package/dist/lv-LV-BZ6GdtSG.js +23 -0
- package/dist/lv-LV-BhvjJBtW.js +18 -0
- package/dist/lv-LV-CALhnU3h.js +48 -0
- package/dist/lv-LV-CrYidfpB.js +70 -0
- package/dist/lv-LV-DXmGZc4u.js +7 -0
- package/dist/lv-LV-Dlq59Kg7.js +26 -0
- package/dist/lv-LV-DykVV_JJ.js +7 -0
- package/dist/lv-LV-OjadvSbn.js +7 -0
- package/dist/lv-LV-pzQT6oF4.js +69 -0
- package/dist/lv-LV-qidnvuKE.js +7 -0
- package/dist/lv-LV-vUmm_Y8X.js +57 -0
- package/dist/mail-uoxYIc94.js +20 -0
- package/dist/mapAddressLocalizationToJpAddressSchema-Cp77VSSB.js +66 -0
- package/dist/mapExistingFile-DdeA1Ya3.js +138 -0
- package/dist/mapJpAddressSchemaToAddressLocalizations-DiB3xFfa.js +61 -0
- package/dist/mapLegalEntityToIndividualSchema-CK2d-XB-.js +206 -0
- package/dist/mapTransferInstrumentToPayoutAccount-5vTCCl4n.js +44 -0
- package/dist/minus-circle-filled-B_E6PncD.js +30 -0
- package/dist/nl-NL-BOfLp7Kw.js +7 -0
- package/dist/nl-NL-Bfn1b5-H.js +18 -0
- package/dist/nl-NL-BsMqXzW2.js +7 -0
- package/dist/nl-NL-BtXGtpjP.js +70 -0
- package/dist/nl-NL-BxRQSueu.js +7 -0
- package/dist/nl-NL-Ch1_Ho4H2.js +7 -0
- package/dist/nl-NL-CoEgvakv.js +23 -0
- package/dist/nl-NL-CscaDll4.js +69 -0
- package/dist/nl-NL-D9OFsGYi.js +48 -0
- package/dist/nl-NL-DUzifJ-6.js +7 -0
- package/dist/nl-NL-DZOwYmdT.js +59 -0
- package/dist/nl-NL-DayMdZGS.js +26 -0
- package/dist/nl-NL-DcLEwsh6.js +31 -0
- package/dist/nl-NL-DpZ_sRQQ.js +57 -0
- package/dist/nl-NL-DrryYwRC.js +7 -0
- package/dist/no-NO-7cH_mYGz.js +23 -0
- package/dist/no-NO-BNo6BEI2.js +48 -0
- package/dist/no-NO-Bj-bFlwW.js +59 -0
- package/dist/no-NO-CMSuTQFP.js +7 -0
- package/dist/no-NO-COKvHr69.js +70 -0
- package/dist/no-NO-CeJtzvaa.js +57 -0
- package/dist/no-NO-CfYxgg3G.js +31 -0
- package/dist/no-NO-CpQs6Kuj.js +7 -0
- package/dist/no-NO-CveHyEMg.js +7 -0
- package/dist/no-NO-CzUEYJ6T2.js +7 -0
- package/dist/no-NO-DCPDmC0O.js +7 -0
- package/dist/no-NO-DFiHCQaa.js +18 -0
- package/dist/no-NO-DNxpnnM4.js +69 -0
- package/dist/no-NO-DphtE0hV.js +26 -0
- package/dist/omitObscuredFieldsIfUnchanged-B7VNFVgY.js +20 -0
- package/dist/onfido-logo-EtpExIxa.js +18 -0
- package/dist/options-horizontal-CDJtmlVY.js +30 -0
- package/dist/partner-gFUctV1k.js +30 -0
- package/dist/passport-blurred-CeDXhPyb.js +266 -0
- package/dist/passport-cut-off-CvgvQJYC.js +246 -0
- package/dist/passport-front-DnOK4cgY.js +237 -0
- package/dist/passport-front-green-BOdOhMh6.js +479 -0
- package/dist/passport-glare-BMA9YxJd.js +222 -0
- package/dist/patternValidators-BaQxw3ki.js +73 -0
- package/dist/pay-by-link-plane-q4Bh-mWo.js +33 -0
- package/dist/payout-CpwcL7W1.js +38 -0
- package/dist/payout-bank-accounts-jW_Zgfqf.js +38 -0
- package/dist/payout-verification-instant-BLpp07Uv.js +156 -0
- package/dist/payout-verification-manual-BgjvhzA9.js +462 -0
- package/dist/person-B3rmhreD.js +23 -0
- package/dist/phonePrefixes-j_kb1wJm.js +252 -0
- package/dist/pl-PL-B6MlP7Xz.js +23 -0
- package/dist/pl-PL-BKJlxx_t.js +57 -0
- package/dist/pl-PL-BhRJVuU3.js +31 -0
- package/dist/pl-PL-BvYP_Mjz2.js +7 -0
- package/dist/pl-PL-CKZbiqpL.js +7 -0
- package/dist/pl-PL-CRanu6gn.js +48 -0
- package/dist/pl-PL-D-e2Z51f.js +70 -0
- package/dist/pl-PL-D2dgIhBU.js +18 -0
- package/dist/pl-PL-D6XdYdXs.js +7 -0
- package/dist/pl-PL-DEkGFDx6.js +7 -0
- package/dist/pl-PL-DcwGjG1k.js +7 -0
- package/dist/pl-PL-Ovy-dAEm.js +26 -0
- package/dist/pl-PL-V52qRKcx.js +69 -0
- package/dist/pl-PL-v95qJZ7W.js +59 -0
- package/dist/plaid-logo-JKKXRmk4.js +15 -0
- package/dist/plus-D1pu1FCh.js +20 -0
- package/dist/plus-circle-filled-BAKemMoO.js +30 -0
- package/dist/process-field-configurations-44gfzIGi.js +279 -0
- package/dist/processCapabilitites-BHzfFtSM.js +869 -0
- package/dist/pt-BR-B7FJvvCY2.js +7 -0
- package/dist/pt-BR-B7oDER2v.js +31 -0
- package/dist/pt-BR-B8YZ-Hqo.js +116 -0
- package/dist/pt-BR-BNfmjS7T.js +18 -0
- package/dist/pt-BR-B_tIsNF2.js +7 -0
- package/dist/pt-BR-C3oGCuLZ.js +23 -0
- package/dist/pt-BR-CL2QRxOt.js +57 -0
- package/dist/pt-BR-CPXL0egI.js +69 -0
- package/dist/pt-BR-CwEhFyDx.js +70 -0
- package/dist/pt-BR-D01BPIQ8.js +48 -0
- package/dist/pt-BR-DgAN88vt.js +26 -0
- package/dist/pt-BR-Dk284q8W.js +7 -0
- package/dist/pt-BR-DkGneNc5.js +7 -0
- package/dist/pt-BR-DyYEeGVr.js +7 -0
- package/dist/pt-BR-w4XP2Zc2.js +59 -0
- package/dist/pt-PT-5BekXyBw.js +26 -0
- package/dist/pt-PT-B0PlOQYf2.js +7 -0
- package/dist/pt-PT-BSNvIlJh.js +23 -0
- package/dist/pt-PT-C_6pNXKv.js +31 -0
- package/dist/pt-PT-CabKp0yt.js +7 -0
- package/dist/pt-PT-Cr2esDwf.js +69 -0
- package/dist/pt-PT-D3v24Se2.js +18 -0
- package/dist/pt-PT-DYQXla7J.js +7 -0
- package/dist/pt-PT-DYXnzP0x.js +59 -0
- package/dist/pt-PT-DfOrysaZ.js +7 -0
- package/dist/pt-PT-Dfp-0h0s.js +7 -0
- package/dist/pt-PT-DjZ0SeNY.js +48 -0
- package/dist/pt-PT-IOArlYPi.js +7 -0
- package/dist/pt-PT-of6NX5C7.js +70 -0
- package/dist/pt-PT-sZUWaieU.js +57 -0
- package/dist/recurring-BqOZk0GH.js +23 -0
- package/dist/reporting-DI9JGolm.js +20 -0
- package/dist/resolveEnvironment-CUQtdx0I.js +1176 -0
- package/dist/revenue-accelerate-CSszZfVF.js +30 -0
- package/dist/review-CkgZkiFy.js +19 -0
- package/dist/ro-RO-7VBqqH7o.js +31 -0
- package/dist/ro-RO-9NTYYrid.js +48 -0
- package/dist/ro-RO-BW4-_NrZ.js +57 -0
- package/dist/ro-RO-BXjIQG3P.js +7 -0
- package/dist/ro-RO-BZMTQGJJ2.js +7 -0
- package/dist/ro-RO-BlBqP0LV.js +18 -0
- package/dist/ro-RO-BtLXaAVi.js +26 -0
- package/dist/ro-RO-CBNP3GS_.js +7 -0
- package/dist/ro-RO-CGoDuoZa.js +70 -0
- package/dist/ro-RO-Can6URM1.js +23 -0
- package/dist/ro-RO-DH5uD9v9.js +7 -0
- package/dist/ro-RO-DUiDGCZU.js +59 -0
- package/dist/ro-RO-DYwkjw9d.js +69 -0
- package/dist/ro-RO-Dy9karNI.js +7 -0
- package/dist/roleMetadata-CP3ZYYSI.js +56 -0
- package/dist/save-BwoYyyYQ.js +20 -0
- package/dist/search-lRnoylK2.js +30 -0
- package/dist/show-Dpmp87ye.js +23 -0
- package/dist/singpass-logo--50WxD_p.js +22 -0
- package/dist/singpass-verification-instant-BHID0qRO.js +175 -0
- package/dist/singpass-verification-manual-DpefFA6C.js +141 -0
- package/dist/sk-SK-BDItYkrD.js +23 -0
- package/dist/sk-SK-BPDMxREF2.js +7 -0
- package/dist/sk-SK-Blzjm32C.js +7 -0
- package/dist/sk-SK-BmP_vrOT.js +7 -0
- package/dist/sk-SK-CAkLqBR-.js +48 -0
- package/dist/sk-SK-CJW-1wtq.js +7 -0
- package/dist/sk-SK-CZnhSCxt.js +18 -0
- package/dist/sk-SK-D2f2S35P.js +7 -0
- package/dist/sk-SK-DESgizdP.js +59 -0
- package/dist/sk-SK-fwnwR2zz.js +26 -0
- package/dist/sk-SK-qVeRKlxs.js +31 -0
- package/dist/sk-SK-vSn9yvb8.js +69 -0
- package/dist/sk-SK-vyxCXCDR.js +57 -0
- package/dist/sk-SK-wYLB-c3d.js +70 -0
- package/dist/sl-SI-B5xGgx5S.js +70 -0
- package/dist/sl-SI-BHztDEDm.js +59 -0
- package/dist/sl-SI-BxJgtZKP.js +69 -0
- package/dist/sl-SI-C0d32nxW.js +57 -0
- package/dist/sl-SI-C5FYCjwi.js +48 -0
- package/dist/sl-SI-CYVD9Yk1.js +26 -0
- package/dist/sl-SI-ChRXWdua.js +31 -0
- package/dist/sl-SI-D8NMKaco.js +7 -0
- package/dist/sl-SI-DHQWrn6C2.js +7 -0
- package/dist/sl-SI-DHxcpzya.js +7 -0
- package/dist/sl-SI-DPvusyJQ.js +7 -0
- package/dist/sl-SI-DuHn6HyC.js +7 -0
- package/dist/sl-SI-SNjGgOph.js +23 -0
- package/dist/sl-SI-rLQo_kKv.js +18 -0
- package/dist/solution-payments-DfH5DH9o.js +20 -0
- package/dist/store-mAgJeN44.js +20 -0
- package/dist/style.css +2070 -2038
- package/dist/styles-9jxW7TiP.js +5988 -0
- package/dist/summaryItem-Dehjwp8D.js +16 -0
- package/dist/sv-SE-BFFAjxxo.js +31 -0
- package/dist/sv-SE-BIHbDoRU.js +18 -0
- package/dist/sv-SE-B_VHF1Ec.js +7 -0
- package/dist/sv-SE-BfoCgwXl.js +7 -0
- package/dist/sv-SE-BhAr7iey.js +26 -0
- package/dist/sv-SE-Bre2IWV2.js +7 -0
- package/dist/sv-SE-CU-lNGyw.js +70 -0
- package/dist/sv-SE-CfgjwWHS.js +57 -0
- package/dist/sv-SE-Cos-ox5c.js +7 -0
- package/dist/sv-SE-D9Aj9VZ9.js +7 -0
- package/dist/sv-SE-DZq6vMfw2.js +7 -0
- package/dist/sv-SE-QRDrM1rH.js +23 -0
- package/dist/sv-SE-_iVNE7OY.js +69 -0
- package/dist/sv-SE-nA--xWZA.js +48 -0
- package/dist/sv-SE-znK8JjXi.js +59 -0
- package/dist/taskStatus-C7XU4UIF.js +21 -0
- package/dist/tax-reporting-graph-DEiE6q1X.js +906 -0
- package/dist/terminal-1-BlqlENmQ.js +30 -0
- package/dist/tink-logo-DQabT2Uk.js +15 -0
- package/dist/toFullWidth-CQcDriFa.js +52 -0
- package/dist/trackNavigation-LvCP5Vyc.js +15 -0
- package/dist/translation-G4HP2nQW.js +854 -0
- package/dist/trustMemberGuidance-B3VWjXzg.js +27 -0
- package/dist/trustUtil-BTHvlo55.js +99 -0
- package/dist/trusted-fields-provider-BHbX2hsp.js +10 -0
- package/dist/types/api/companySearch/useCompanySearch.d.ts +19 -12
- package/dist/types/api/invitations/invitations.types.d.ts +1 -1
- package/dist/types/api/invitations/useCreateInvitation.d.ts +2 -2
- package/dist/types/api/invitations/useInvitationStatus.d.ts +9 -0
- package/dist/types/api/invitations/useWithdrawInvitation.d.ts +8 -0
- package/dist/types/api/invitedEntity/useInvitedEntityRootCapabilities.d.ts +28 -0
- package/dist/types/api/queryKeys.d.ts +3 -2
- package/dist/types/api/tinVerification/useVerifyTin.d.ts +15 -10
- package/dist/types/api/toggles/useToggles.d.ts +1 -1
- package/dist/types/components/BankAccount/forms/BankDocument/types.d.ts +0 -1
- package/dist/types/components/BankAccount/forms/PayoutAccount/InstantVerificationCTA/InstantVerificationCTA.d.ts +4 -0
- package/dist/types/components/BankAccount/forms/PayoutAccount/types.d.ts +3 -0
- package/dist/types/components/BankAccount/forms/PayoutDetails/PayoutDetailsMultiform.d.ts +2 -1
- package/dist/types/components/BankAccount/forms/PayoutDetails/rules.d.ts +2 -2
- package/dist/types/components/BankAccount/forms/PayoutVerificationMethod/payoutVerificationMethodMetadata.d.ts +1 -0
- package/dist/types/components/BankAccount/mapping/payoutKeyMappings.d.ts +142 -142
- package/dist/types/components/BankAccount/tasks/PayoutDetailsDropin/payoutDetailsFormConfig.d.ts +1 -1
- package/dist/types/components/BankAccount/tasks/PayoutDetailsDropin/store.d.ts +3 -0
- package/dist/types/components/BankAccount/tasks/PayoutDetailsGettingStarted/PayoutDetailsGettingStarted.d.ts +7 -0
- package/dist/types/components/Business/forms/BusinessSelection/BusinessInformationCard/BusinessInformationCard.d.ts +3 -2
- package/dist/types/components/EFP/mapping/businessFinancingKeyMappings.d.ts +493 -493
- package/dist/types/components/EmbeddedDropins/OnboardingDropinComponent/OnboardingDropinComponent.d.ts +0 -2
- package/dist/types/components/Individual/forms/Individual.types.d.ts +2 -0
- package/dist/types/components/Individual/forms/InviteDetails/InviteDetails.d.ts +2 -0
- package/dist/types/components/Individual/helpers/shouldShowMotionCapture.d.ts +6 -1
- package/dist/types/components/Individual/tasks/DecisionMakers/hooks/useShareInvitation.d.ts +6 -0
- package/dist/types/components/Shared/Summary/summaryItem.d.ts +14 -8
- package/dist/types/components/Shared/forms/Address/utils.d.ts +1 -1
- package/dist/types/components/Shared/forms/BusinessTypeSelection/utils.d.ts +1 -1
- package/dist/types/components/ui/atoms/Image/Image.d.ts +2 -1
- package/dist/types/components/ui/atoms/Typography/Typography.types.d.ts +1 -0
- package/dist/types/context/AnalyticsContext/AnalyticsProvider.d.ts +1 -2
- package/dist/types/context/ToggleContext/types.d.ts +10 -1
- package/dist/types/context/handlerContext/HandlerContext.d.ts +2 -0
- package/dist/types/context/handlerContext/HandlerProvider.d.ts +2 -0
- package/dist/types/context/handlerContext/types.d.ts +9 -0
- package/dist/types/context/handlerContext/useHandlerContext.d.ts +1 -0
- package/dist/types/hooks/useFormComposer.d.ts +0 -1
- package/dist/types/index.d.ts +0 -2
- package/dist/types/types/form-rules.d.ts +2 -1
- package/dist/types/utils/entityStatusUtil.d.ts +1 -1
- package/dist/types/utils/performance.d.ts +2 -5
- package/dist/types/utils/validationError.d.ts +1 -0
- package/dist/types-BqFOt7-l.js +58 -0
- package/dist/types-CEAHkjXI.js +66 -0
- package/dist/types-CNZsK2dZ.js +31 -0
- package/dist/types-CXceqQIv.js +68 -0
- package/dist/types-DjTEjDpj.js +19 -0
- package/dist/unincorporated-partnership-5MvG_ts4.js +11 -0
- package/dist/upload-CIujAxWY.js +23 -0
- package/dist/us-check-account-number-EkWzylgz.js +157 -0
- package/dist/us-check-b9k7TlOd.js +144 -0
- package/dist/us-check-routing-number-ObI-JE-C.js +161 -0
- package/dist/useAccountHolder-LttF1BJG.js +102 -0
- package/dist/useAllowedCountries-B2tXNxdL.js +74 -0
- package/dist/useAnalyticsContext-BVFDMrVE.js +86 -0
- package/dist/useAssociatedLegalEntity-Dav_4ehd.js +35 -0
- package/dist/useBusinessDetailsData-DmromzC6.js +4395 -0
- package/dist/useBusinessLines-DGr43nU6.js +27 -0
- package/dist/useCanSeeIntroduction-ClAuT5gj.js +39 -0
- package/dist/useCapabilities-C3Re0QHQ.js +12 -0
- package/dist/useCreateLegalEntity-u6NuumMd.js +24 -0
- package/dist/useDataMissingRemediations-Cv_4vV2R.js +39 -0
- package/dist/useDataset-DA7SoxiX.js +96 -0
- package/dist/useDeleteTransferInstrument-Me9ITlCM.js +31 -0
- package/dist/useForm-CTiDrzeg.js +502 -0
- package/dist/useFormContext-6LTkbLR1.js +178 -0
- package/dist/useGlobalData-KEb46I95.js +164 -0
- package/dist/useId-eJSYfA6i.js +28 -0
- package/dist/useLegalEntity-Cj6C6bAI.js +48 -0
- package/dist/useMultiForm-CiK9l6YR.js +754 -0
- package/dist/useNavigate-B4pHnNyj.js +268 -0
- package/dist/useOnboardingStatus-BuYODvAM.js +23 -0
- package/dist/usePciQuestionnaireList-Bx5N4Ucf.js +26 -0
- package/dist/useSalesChannels-BV-gSBhb.js +47 -0
- package/dist/useScenarios-DVTHREqP.js +55 -0
- package/dist/useSettingsContext-DzwVt0W0.js +15 -0
- package/dist/useTaskLandedEvent-DInxWeqN.js +23 -0
- package/dist/useTaskStatus-BjqC1s3K.js +51 -0
- package/dist/useTermsOfServiceStatus-BLMY5p8c.js +39 -0
- package/dist/useToastContext-CYgfHjSb.js +12 -0
- package/dist/useToggleContext-DaQUBF8O.js +21 -0
- package/dist/useTrustMembers-DbO0tmcu.js +152 -0
- package/dist/useUnincorporatedPartnershipMembers-Dzj3BDFI.js +70 -0
- package/dist/useUpdateBusinessLines-BfYwukg9.js +296 -0
- package/dist/useUpdateLegalEntity-oigX0fKz.js +29 -0
- package/dist/utils-BAuFBG3J.js +88 -0
- package/dist/utils-BU2d-Zzu.js +805 -0
- package/dist/utils-CfTVU2Hq.js +207 -0
- package/dist/utils-CzW6YqAz.js +46 -0
- package/dist/utils-DXTGGW-J.js +188 -0
- package/dist/utils-oc3EdK6K.js +80 -0
- package/dist/validate-9_4V5MhN.js +387 -0
- package/dist/validate-C1II14sz.js +411 -0
- package/dist/validate-D4RU2PP0.js +109 -0
- package/dist/validationError-DhMlWpYp.js +68 -0
- package/dist/validationResult-D3sPVzMw.js +57 -0
- package/dist/validatorUtils-DRapRJ6z.js +107 -0
- package/dist/view-verification-status-CtW_qUMg.js +13 -0
- package/dist/warning-circle-fill-B8syKAww.js +30 -0
- package/dist/warning-diamond-filled-D81TURTB.js +30 -0
- package/dist/webinar-CA8zN8_B.js +33 -0
- package/dist/yapily-logo-BeowYojR.js +22 -0
- package/package.json +30 -34
- package/dist/4-people-BtDi7O9A.js +0 -24
- package/dist/AD-BQAadLyG.js +0 -23
- package/dist/AE-mIZ12t47.js +0 -25
- package/dist/AI-CYOqGKk2.js +0 -27
- package/dist/AL-BX1fEo1A.js +0 -27
- package/dist/AR-C9kMRnHG.js +0 -27
- package/dist/AS-B0TMZQ6o.js +0 -25
- package/dist/AT-BI8ju2NH.js +0 -23
- package/dist/AT-C_G2OvQI.js +0 -28
- package/dist/AT-EpV7jN58.js +0 -27
- package/dist/AT-TzG2NGTc.js +0 -30
- package/dist/AU-B5LSe4bo.js +0 -24
- package/dist/AU-CaovX9P8.js +0 -24
- package/dist/AU-CdwbD1qm.js +0 -32
- package/dist/AU-pBsEvEUy.js +0 -24
- package/dist/AX-Z6f6EnJc.js +0 -23
- package/dist/AZ-BqrKjWMH.js +0 -27
- package/dist/AcceptTermsOfServiceComponent-BbktO0zC.js +0 -653
- package/dist/AccountSetupRejected-B9jCHNz-.js +0 -23
- package/dist/ActionBar-CbFBdfam.js +0 -31
- package/dist/Address-CAzHDiil.js +0 -1109
- package/dist/Avatar-D7DkiYRU.js +0 -60
- package/dist/BA-BbP72Tn6.js +0 -27
- package/dist/BE-CLggPbli.js +0 -26
- package/dist/BE-CU5o9cmc.js +0 -24
- package/dist/BE-H45zzgu4.js +0 -24
- package/dist/BE-nWHKW0xQ.js +0 -23
- package/dist/BG-HKzabLqZ.js +0 -27
- package/dist/BH-Ded1Eyrc.js +0 -27
- package/dist/BM-CBl-UQUl.js +0 -27
- package/dist/BR-BEHEZpeV.js +0 -31
- package/dist/BR-Dmkd5VjU.js +0 -27
- package/dist/BR-DsY9PZVZ.js +0 -26
- package/dist/BR-ORoHRwTk.js +0 -29
- package/dist/BS-dBfArxRw.js +0 -27
- package/dist/BV-D0QBsH7-.js +0 -27
- package/dist/BY-BsQUo3fM.js +0 -27
- package/dist/BusinessFinancingComponent-B7O8VSuR.js +0 -55
- package/dist/BusinessFinancingDropin-CZjat6zg.js +0 -2271
- package/dist/BusinessFinancingPage-wYYsqc5D.js +0 -43
- package/dist/BusinessTypeSelectionPage-SVmYYbcY.js +0 -435
- package/dist/CA-BD18g8mh.js +0 -29
- package/dist/CA-BZ1GNmhP.js +0 -21
- package/dist/CA-DT4cmOOe.js +0 -25
- package/dist/CA-VXNq-m6m.js +0 -24
- package/dist/CH-B_-afpD_.js +0 -23
- package/dist/CH-BmabUdOH.js +0 -23
- package/dist/CH-DVyjmrDH.js +0 -25
- package/dist/CH-TX4BTE2y.js +0 -23
- package/dist/CN-BV-5PSpq.js +0 -27
- package/dist/CR-Dtv-rXg9.js +0 -27
- package/dist/CY-D59Nypl7.js +0 -23
- package/dist/CZ-1E7Zx2il.js +0 -26
- package/dist/CZ-B6iI1GbE.js +0 -33
- package/dist/CZ-CTw_bQIu.js +0 -27
- package/dist/CZ-DlzxobtN.js +0 -29
- package/dist/Card-OQuFzmxm.js +0 -90
- package/dist/Checkbox-DntVTT7e.js +0 -74
- package/dist/Confirm-CceRWfkX.js +0 -64
- package/dist/ConstitutionalDocument-M10n8QHQ.js +0 -2631
- package/dist/ContactDetails-CJ49drHv.js +0 -389
- package/dist/ContextGuidance-DeSyT-K4.js +0 -33
- package/dist/ContractViewer-DcQHIGMU.js +0 -935
- package/dist/CountryField-B0KnMSNK.js +0 -64
- package/dist/CreateIndividualComponent-BsABgMiA.js +0 -65
- package/dist/CreateTransferInstrumentComponent-CHhSi-Nd.js +0 -56
- package/dist/Currency-wZFwkXz6.js +0 -232
- package/dist/CustomerSupport-CZZVSn5p.js +0 -150
- package/dist/DE-C_Lc7NP5.js +0 -32
- package/dist/DE-CsuX_tSL.js +0 -23
- package/dist/DE-D7HKgI77.js +0 -29
- package/dist/DE-D_jIDxOH.js +0 -29
- package/dist/DK-CVF9z_0t.js +0 -25
- package/dist/DK-dBzrfgpQ.js +0 -27
- package/dist/DK-oQEFrF6o.js +0 -33
- package/dist/DK-x6M9-ek-.js +0 -24
- package/dist/DO-B1BWc3Iy.js +0 -27
- package/dist/DebugModal-B7AyfRi1.js +0 -444
- package/dist/DecisionMakerDetails-CmIkuKMd.js +0 -275
- package/dist/DecisionMakerDetailsPage-C86M_cr7.js +0 -104
- package/dist/DecisionMakers-BJzPsxVk.js +0 -680
- package/dist/DetailViewLayout-Z9cuUp4X.js +0 -65
- package/dist/Dropzone-DkOStOI3.js +0 -224
- package/dist/EC-DbNXe71-.js +0 -28
- package/dist/EE-3WZV5Ejt.js +0 -23
- package/dist/ES-BlWV7xvh.js +0 -32
- package/dist/ES-CeohntGo.js +0 -26
- package/dist/ES-DYbZmFcJ.js +0 -27
- package/dist/ES-NfxpqbC2.js +0 -23
- package/dist/EmbeddedStatus-BDk-Cdzb.js +0 -97
- package/dist/EndStateLayout-yZlKFmxQ.js +0 -71
- package/dist/EntityAssociation-BQinpNn-.js +0 -177
- package/dist/EntityGuidanceStatus-DgrTCy2a.js +0 -106
- package/dist/ErrorPanel-rmGb9PlE.js +0 -192
- package/dist/FI-BOex4MFx.js +0 -21
- package/dist/FI-C9nRvop7.js +0 -25
- package/dist/FI-CF0teHDu.js +0 -26
- package/dist/FI-CHQIvHa-.js +0 -23
- package/dist/FJ-CBdbPf5l.js +0 -27
- package/dist/FO-1pD1p939.js +0 -27
- package/dist/FR-3wQ9FMtt.js +0 -29
- package/dist/FR-BycGQO4W.js +0 -29
- package/dist/FR-CAxkckai.js +0 -25
- package/dist/FR-MWZyWX3x.js +0 -23
- package/dist/Field-DDqviWD6.js +0 -141
- package/dist/FormNavigation-hnWA-Ehl.js +0 -144
- package/dist/GB-CCYHTagl.js +0 -33
- package/dist/GB-C_AXeEDs.js +0 -32
- package/dist/GB-DFyzo5sN.js +0 -24
- package/dist/GB-DUnW-a4M.js +0 -24
- package/dist/GE-Deog1a3Z.js +0 -27
- package/dist/GF-Cda8N7A4.js +0 -23
- package/dist/GG-CPoMVQPc.js +0 -33
- package/dist/GI-DxmBwVD_.js +0 -41
- package/dist/GL-0vO9Of9c.js +0 -27
- package/dist/GP-za-3opp-.js +0 -23
- package/dist/GR-Rk0pXlNw.js +0 -23
- package/dist/GT-C1jhs-Dx.js +0 -27
- package/dist/GU-CALV5vh1.js +0 -25
- package/dist/HK-B16JHR8k.js +0 -25
- package/dist/HK-BB3PIq-Z.js +0 -25
- package/dist/HK-WqZ5UBEF.js +0 -24
- package/dist/HK-eKVHN8Vg.js +0 -21
- package/dist/HR-BHhcnUGU.js +0 -26
- package/dist/HR-BRAjQoOH.js +0 -25
- package/dist/HR-CRa19tH1.js +0 -27
- package/dist/HR-WapHW2fw.js +0 -23
- package/dist/HU-D5NCweWf.js +0 -27
- package/dist/HU-DCOMuOhe.js +0 -32
- package/dist/HU-DuWGRPke.js +0 -24
- package/dist/HU-hfSSMbei.js +0 -21
- package/dist/ID-BcOv4SXj.js +0 -27
- package/dist/IE-BCDIfZoA.js +0 -30
- package/dist/IE-BN3Eiv5M.js +0 -21
- package/dist/IE-BkgtVgDi.js +0 -23
- package/dist/IE-rhATS57q.js +0 -24
- package/dist/IL-CQ0yHRRe.js +0 -23
- package/dist/IM-Wr4iDT94.js +0 -33
- package/dist/IN-BhEI9o7G.js +0 -28
- package/dist/IS-C-Cgc6zp.js +0 -27
- package/dist/IT-C1-PEPAb.js +0 -27
- package/dist/IT-CBt6Os6J.js +0 -25
- package/dist/IT-CXekiddL.js +0 -23
- package/dist/IT-wD7dHdYD.js +0 -27
- package/dist/Individual.rules-DkkHd4AC.js +0 -390
- package/dist/IndividualDropin-HfCpdNoz.js +0 -5743
- package/dist/InputDate-BB4WZBNP.js +0 -43
- package/dist/InputGroup-WBfGDV5F.js +0 -32
- package/dist/InputText-BCi31wZB.js +0 -134
- package/dist/Introduction-DShrdSBn.js +0 -251
- package/dist/InvitedDecisionMakerComponent-B2HU3LgV.js +0 -216
- package/dist/JE-B4gj54Hg.js +0 -33
- package/dist/JM-BMGgBK6y.js +0 -27
- package/dist/JO-rY8A8f9C.js +0 -27
- package/dist/JP-BQG5dF1Y.js +0 -28
- package/dist/JpAddress-DE9yfseS.js +0 -327
- package/dist/KR-74SwXHka.js +0 -27
- package/dist/KW-CcVPOJ8B.js +0 -27
- package/dist/KY-DXCeltYA.js +0 -27
- package/dist/KZ-CZNjdp22.js +0 -27
- package/dist/LB-DZ5YfAsO.js +0 -27
- package/dist/LI-L0ZAALRT.js +0 -23
- package/dist/LT-0F72uCyI.js +0 -28
- package/dist/LT-Ao2uagV9.js +0 -23
- package/dist/LT-Dkevn83h.js +0 -19
- package/dist/LT-V-VsHKlY.js +0 -28
- package/dist/LU-B7LRUuc6.js +0 -23
- package/dist/LV-DZeGjA2G.js +0 -23
- package/dist/LandingLayout-D_EQfRqT.js +0 -61
- package/dist/LegalCompanyNameField-CCPNDYao.js +0 -138
- package/dist/LegalRepresentativeDetailsPage-ZsBB2MMq.js +0 -55
- package/dist/Link-DWRRNNKW.js +0 -35
- package/dist/List-BAzyC6sw.js +0 -83
- package/dist/ListItem-DlliPqo-.js +0 -69
- package/dist/LoaderWrapper-DE-3T3QK.js +0 -42
- package/dist/MC-EDVNGWhy.js +0 -23
- package/dist/MD-DVc0183a.js +0 -27
- package/dist/ME-DiJhSuli.js +0 -27
- package/dist/MK-BZxslBTS.js +0 -27
- package/dist/MP-7IpnbfCj.js +0 -25
- package/dist/MQ-DusG_no1.js +0 -23
- package/dist/MR-DaBVNHqN.js +0 -27
- package/dist/MT-B9my7RlP.js +0 -23
- package/dist/MU-D3gGVu1R.js +0 -27
- package/dist/MX-CZVOFg3D.js +0 -25
- package/dist/MY-ym71svTa.js +0 -24
- package/dist/ManageIndividualComponent-CGjYieXl.js +0 -46
- package/dist/ManageTermsOfServiceComponent-DVal60Sx.js +0 -52
- package/dist/ManageTransferInstrumentComponent-oOQNBPeD.js +0 -290
- package/dist/MaskedInput-Dzp3Td83.js +0 -811
- package/dist/MaybeModal-Vk2hdUdf.js +0 -36
- package/dist/Modal-Bq5ccK7z.js +0 -137
- package/dist/NC-xzMvjp9-.js +0 -27
- package/dist/NL-4Y7A2IJp.js +0 -27
- package/dist/NL-VXAFOhV5.js +0 -23
- package/dist/NL-q2U2l276.js +0 -27
- package/dist/NL-zm__7LWV.js +0 -23
- package/dist/NO-BAcMdKUJ.js +0 -22
- package/dist/NO-CX12Zsf_.js +0 -27
- package/dist/NO-Cx1VSh2W.js +0 -32
- package/dist/NO-Div5P6IZ.js +0 -29
- package/dist/NZ-BP7_Q9Om.js +0 -22
- package/dist/NZ-DDRknBQk.js +0 -20
- package/dist/Name-w6uDAo1S.js +0 -81
- package/dist/NewSummary-fp6oz9Ko.js +0 -60
- package/dist/OnboardingDropinComponent-Cn45HTst.js +0 -3310
- package/dist/PE-CdxgPh3v.js +0 -27
- package/dist/PF-CstaOd9Z.js +0 -27
- package/dist/PH-BYgMDYIH.js +0 -27
- package/dist/PK-bLhtgsEk.js +0 -27
- package/dist/PL-BZW1hGvD.js +0 -32
- package/dist/PL-CwCXF3Yu.js +0 -28
- package/dist/PL-D6_6gquq.js +0 -27
- package/dist/PL-DKgMtNxx.js +0 -27
- package/dist/PM-BWbxAh4u.js +0 -23
- package/dist/PR-CFPKXEXp.js +0 -25
- package/dist/PS-B8obOOWY.js +0 -27
- package/dist/PT-C2dln191.js +0 -26
- package/dist/PT-CpKb15My.js +0 -30
- package/dist/PT-Dei5v1nD.js +0 -28
- package/dist/PT-OpU4MU3L.js +0 -23
- package/dist/PayoutDetailsDropin-Bzs2jydk.js +0 -4226
- package/dist/PayoutDetailsPage-BGdufep3.js +0 -914
- package/dist/ProgressBar-B7gTQncy.js +0 -47
- package/dist/QA-CSfx-mvb.js +0 -27
- package/dist/RE-BApq1FJ6.js +0 -23
- package/dist/RO-Bmsg2YGZ.js +0 -23
- package/dist/RO-C_utD--1.js +0 -19
- package/dist/RO-Cz6Sh0ls.js +0 -23
- package/dist/RO-Dxk08mOu.js +0 -27
- package/dist/RS-BCenke-W.js +0 -27
- package/dist/RU-D27RC7dq.js +0 -27
- package/dist/Radio-BMtxBpnn.js +0 -39
- package/dist/RadioGroup-BOUo26G0.js +0 -100
- package/dist/Review-Be1zBkVv.js +0 -82
- package/dist/RootBusinessDetailsPage-CnX2zYB9.js +0 -50
- package/dist/RootBusinessLinesPage-G9LnOcFE.js +0 -1538
- package/dist/RootIndividualDetailsPage-DPim7JYp.js +0 -62
- package/dist/SA-C9VgxCgm.js +0 -27
- package/dist/SE-AP3gLiyy.js +0 -27
- package/dist/SE-B5K-FkQd.js +0 -33
- package/dist/SE-BqGOP1F1.js +0 -22
- package/dist/SE-Br1yrUhV.js +0 -27
- package/dist/SG-DMcOb17i.js +0 -24
- package/dist/SG-DoCqjlFi.js +0 -24
- package/dist/SG-d-PTZAoA.js +0 -28
- package/dist/SG-dEj6fGdY.js +0 -24
- package/dist/SI-BOGTNLPa.js +0 -23
- package/dist/SI-BPx_gt1n.js +0 -26
- package/dist/SI-BXe-yndm.js +0 -27
- package/dist/SI-DBADzvYO.js +0 -22
- package/dist/SJ-Z9jwQQlz.js +0 -27
- package/dist/SK-BOVrp_Av.js +0 -23
- package/dist/SK-DamCBYsZ.js +0 -22
- package/dist/SK-DeSZ6Sa9.js +0 -29
- package/dist/SK-DwdgoGnD.js +0 -27
- package/dist/SM-meowwILA.js +0 -23
- package/dist/Select-D5a5aVFZ.js +0 -868
- package/dist/SignPCIComponent-BTyUfmK_.js +0 -301
- package/dist/SingpassSelection-DowkF6pT.js +0 -269
- package/dist/SoleProprietorshipPage-C_875t2r.js +0 -50
- package/dist/SourceOfFundsPage-Cx6ekIue.js +0 -2335
- package/dist/Spacer-BK3jDget.js +0 -18
- package/dist/StepProgressIndicator-CW9yp5Ud.js +0 -78
- package/dist/StoreProvider-CApjzEDt.js +0 -5560
- package/dist/StructuredList-CNha20ka.js +0 -61
- package/dist/Summary-DlYtNJQD.js +0 -213
- package/dist/TF-BOWng-Dz.js +0 -27
- package/dist/TH-CvyXLcZK.js +0 -28
- package/dist/TL-BWslydRz.js +0 -27
- package/dist/TN-Cjd3bM_V.js +0 -27
- package/dist/TR-BBx5CuWS.js +0 -27
- package/dist/TT-D4-z5BA-.js +0 -28
- package/dist/TW-BC8YpnMr.js +0 -29
- package/dist/Tag-DdkVScyr.js +0 -41
- package/dist/TaxInformationField-ByQTgGxY.js +0 -3498
- package/dist/TaxReportingDropin-D52Nf4f2.js +0 -501
- package/dist/TextArea-C4OmPCHh.js +0 -103
- package/dist/TileGroup-Aj0Yql_d.js +0 -203
- package/dist/TrustDetailsPage-Cj368KCb.js +0 -2167
- package/dist/TrustMemberCompanyPage-CTXwk8mB.js +0 -68
- package/dist/TrustMemberIndividualPage-BusLDMBC.js +0 -64
- package/dist/TrustMemberRoleAndTypePage-D6Ir0aGf.js +0 -1078
- package/dist/TrustMembersOverview-_eQwa8o8.js +0 -433
- package/dist/UA-DrXUnAe6.js +0 -27
- package/dist/US-CZw-MX1-.js +0 -29
- package/dist/US-CxBcdqfz.js +0 -22
- package/dist/US-D8dI5_i1.js +0 -25
- package/dist/US-DHxLSqeC.js +0 -24
- package/dist/UY-DEHqLXhX.js +0 -27
- package/dist/UnincorporatedPartnershipIndividualPage-tCLAddt7.js +0 -63
- package/dist/UnincorporatedPartnershipMemberCompanyPage-A7gQ5wwr.js +0 -71
- package/dist/UnincorporatedPartnershipMemberRoleAndTypePage-DaFl9wVc.js +0 -291
- package/dist/UnincorporatedPartnershipMembersOverview-C3YF2E_k.js +0 -169
- package/dist/VA-DXsYTCoh.js +0 -23
- package/dist/VG-DnKAVCsi.js +0 -27
- package/dist/VI-CU9MA9ux.js +0 -25
- package/dist/VN-CTSqsmB6.js +0 -27
- package/dist/VerificationErrorAlert-D8Menx5E.js +0 -79
- package/dist/ViewVerificationStatusComponent-TBlv6an5.js +0 -180
- package/dist/WF-CwHbsjtJ.js +0 -27
- package/dist/YT-BCyAAbo7.js +0 -23
- package/dist/ZA-NU7slima.js +0 -28
- package/dist/adyen-kyc-components.js +0 -451
- package/dist/arrow-right-BoqwUH_d.js +0 -14
- package/dist/bafinUtils-DOGd6Xk9.js +0 -92
- package/dist/bag-BXVWLrwo.js +0 -14
- package/dist/bank-1GvaHPAZ.js +0 -14
- package/dist/basePatterns-BwdnMQxI.js +0 -15
- package/dist/bg-BG-89Mw-9Lv.js +0 -75
- package/dist/bg-BG-BY3Wa361.js +0 -54
- package/dist/bg-BG-BnwkqGm9.js +0 -13
- package/dist/bg-BG-BvLl6gaB.js +0 -13
- package/dist/bg-BG-C9zrgb_c.js +0 -76
- package/dist/bg-BG-CEipapl4.js +0 -63
- package/dist/bg-BG-CFuVZnaC.js +0 -13
- package/dist/bg-BG-Coja327N.js +0 -24
- package/dist/bg-BG-Cz7Cuw8v.js +0 -29
- package/dist/bg-BG-DKld3x63.js +0 -13
- package/dist/bg-BG-DbFzLQK7.js +0 -37
- package/dist/bg-BG-DcxZ1tmt.js +0 -32
- package/dist/bg-BG-dmpv4Zom.js +0 -13
- package/dist/bg-BG-zZhDshGi.js +0 -65
- package/dist/bin-Ba-3ll8T.js +0 -18
- package/dist/business-lines-BAqTbnBw.js +0 -135
- package/dist/capital-9TKHySO7.js +0 -17
- package/dist/cash-stack-DwYu4xNy.js +0 -22
- package/dist/certificate-N2YFedpI.js +0 -17
- package/dist/checkmark-D9dGhGpG.js +0 -14
- package/dist/checkmark-circle-CFWClLQ6.js +0 -20
- package/dist/checkmark-circle-fill-DEB-tuGl.js +0 -17
- package/dist/checkmark-small-D3VNx2lo.js +0 -14
- package/dist/chevron-down-C7SUSYfl.js +0 -14
- package/dist/chevron-left-BXmd-S46.js +0 -14
- package/dist/chevron-right-jE6RwM2B.js +0 -14
- package/dist/chevron-up-BdfNcqzq.js +0 -14
- package/dist/circle-BJPTMCWB.js +0 -17
- package/dist/circle-small-filled-BuO8Vg8j.js +0 -14
- package/dist/clock-DAzaBRWk.js +0 -20
- package/dist/coins-DYdzG5e_.js +0 -17
- package/dist/commonValidators-D1bdFvRX.js +0 -24
- package/dist/contract-BfJb1t6M.js +0 -14
- package/dist/cross-CDS_eot4.js +0 -14
- package/dist/cross-circle-fill-C-EJ57Yn.js +0 -17
- package/dist/cross-circle-fill-small-DkPjsuBH.js +0 -14
- package/dist/cs-CZ-6rOIfRJu.js +0 -13
- package/dist/cs-CZ-B-zm6HVH.js +0 -76
- package/dist/cs-CZ-BBLagJI6.js +0 -13
- package/dist/cs-CZ-BEFeaKsV.js +0 -54
- package/dist/cs-CZ-BHbWTH_v.js +0 -63
- package/dist/cs-CZ-BeMYkFfD.js +0 -13
- package/dist/cs-CZ-BlrV3tkx.js +0 -29
- package/dist/cs-CZ-CBuNZ7UO.js +0 -37
- package/dist/cs-CZ-CTxXvHtH.js +0 -75
- package/dist/cs-CZ-CYsR__kj.js +0 -13
- package/dist/cs-CZ-Ck22NTT9.js +0 -65
- package/dist/cs-CZ-D4Hg-t16.js +0 -32
- package/dist/cs-CZ-DXtJsBPz.js +0 -24
- package/dist/cs-CZ-hT5w5It6.js +0 -13
- package/dist/currency-CrdnaaDu.js +0 -35
- package/dist/da-DK-B3Pg-MWO.js +0 -13
- package/dist/da-DK-CGhsIGZt.js +0 -76
- package/dist/da-DK-CLdNh9JT.js +0 -37
- package/dist/da-DK-CM1onr3w.js +0 -29
- package/dist/da-DK-C_GqHCay.js +0 -13
- package/dist/da-DK-D6UK8XT9.js +0 -54
- package/dist/da-DK-D9FgPh5e.js +0 -13
- package/dist/da-DK-DCJhV2qS.js +0 -32
- package/dist/da-DK-DQ4ZYSea.js +0 -65
- package/dist/da-DK-DWA8uOd8.js +0 -24
- package/dist/da-DK-DZwlENGe.js +0 -13
- package/dist/da-DK-D_TOcmOO.js +0 -75
- package/dist/da-DK-mUuPR2YO.js +0 -13
- package/dist/da-DK-vcVNQJbX.js +0 -63
- package/dist/de-DE-B3nctkG8.js +0 -13
- package/dist/de-DE-BT5g7ZXC.js +0 -37
- package/dist/de-DE-BmWBo3gX.js +0 -13
- package/dist/de-DE-CA4mYLwp.js +0 -29
- package/dist/de-DE-CWEW2yqg.js +0 -63
- package/dist/de-DE-Cg_RNIr-.js +0 -13
- package/dist/de-DE-CkbOZ6S_.js +0 -65
- package/dist/de-DE-CwT6O212.js +0 -13
- package/dist/de-DE-D50lGOJE.js +0 -24
- package/dist/de-DE-DUl6gRKv.js +0 -54
- package/dist/de-DE-DXR3EpEc.js +0 -13
- package/dist/de-DE-DYzAiXHM.js +0 -75
- package/dist/de-DE-DwOQKCuU.js +0 -32
- package/dist/de-DE-K9FyOJiI.js +0 -76
- package/dist/de-DE-S6qDey1L.js +0 -13
- package/dist/debouncedInputEvent-Cv2S512Y.js +0 -46
- package/dist/debugStore-BvbyN1Oi.js +0 -14
- package/dist/decision-makers-group-DrvpnEqj.js +0 -1944
- package/dist/digital-wallet-Bx5YM1LY.js +0 -46
- package/dist/document-1-qlSTF558.js +0 -14
- package/dist/document-blurred-BiWap0xs.js +0 -37
- package/dist/document-cut-off-aQezqOif.js +0 -32
- package/dist/document-expired-BhBXaWWQ.js +0 -38
- package/dist/document-front-DYuhZGeQ.js +0 -30
- package/dist/document-person-CDbnTOdV.js +0 -20
- package/dist/download-BZQB1WkZ.js +0 -17
- package/dist/dropinUtils-C6SkIQLo.js +0 -256
- package/dist/edit-1-DAqtnOIx.js +0 -14
- package/dist/el-GR-B5j7VZ3E.js +0 -54
- package/dist/el-GR-B78b9rSH.js +0 -63
- package/dist/el-GR-BuAfpG6u.js +0 -13
- package/dist/el-GR-BvRBuezU.js +0 -37
- package/dist/el-GR-CKHMsdx2.js +0 -24
- package/dist/el-GR-CdgLZhuO.js +0 -13
- package/dist/el-GR-D6XimdV5.js +0 -29
- package/dist/el-GR-DItzpoar.js +0 -75
- package/dist/el-GR-DoS_Va-n.js +0 -13
- package/dist/el-GR-DtFE64KX.js +0 -13
- package/dist/el-GR-DudORw4U.js +0 -65
- package/dist/el-GR-Fo7-xCrc.js +0 -13
- package/dist/el-GR-Hk4NbZSY.js +0 -32
- package/dist/el-GR-L-39cQfz.js +0 -76
- package/dist/el-GR-ZRGBgvMu.js +0 -13
- package/dist/emitEvent-CzZf80Am.js +0 -28
- package/dist/en-US-9KQC6F8-.js +0 -218
- package/dist/en-US-AgtwE4Fl.js +0 -63
- package/dist/en-US-B-qSAb-7.js +0 -66
- package/dist/en-US-BQZhzROc.js +0 -32
- package/dist/en-US-BSQXKu6d.js +0 -54
- package/dist/en-US-CTbVLoNF.js +0 -13
- package/dist/en-US-C_9Fc9mP.js +0 -82
- package/dist/en-US-CfazE4ht.js +0 -13
- package/dist/en-US-CgakND3H.js +0 -37
- package/dist/en-US-D2yrwtzT.js +0 -24
- package/dist/en-US-DIlZD5Wh.js +0 -76
- package/dist/en-US-DPoDE0uz.js +0 -75
- package/dist/en-US-DSoLr6rp.js +0 -13
- package/dist/en-US-DWT3bRZC.js +0 -122
- package/dist/en-US-Do3mE4BR.js +0 -46
- package/dist/en-US-DrUYyPhF.js +0 -13
- package/dist/en-US-PLYPmyFJ.js +0 -66
- package/dist/en-US-QbdqemZi.js +0 -202
- package/dist/en-US-fDACdKtT.js +0 -29
- package/dist/en-US-qlQTJNiL.js +0 -13
- package/dist/en-US.instructions-CfIM2SRF.js +0 -21
- package/dist/es-ES-4FS7NoE7.js +0 -37
- package/dist/es-ES-BAolMrZ0.js +0 -65
- package/dist/es-ES-BBcx4tvi.js +0 -29
- package/dist/es-ES-BOoPqnPI.js +0 -32
- package/dist/es-ES-BRfK6tX7.js +0 -13
- package/dist/es-ES-BYl5-PFR.js +0 -13
- package/dist/es-ES-BZiC4JWr.js +0 -13
- package/dist/es-ES-Bh8k9Zx8.js +0 -13
- package/dist/es-ES-BkqlH093.js +0 -13
- package/dist/es-ES-BmH6eADf.js +0 -75
- package/dist/es-ES-CDgjGql5.js +0 -63
- package/dist/es-ES-Cavm0szq.js +0 -54
- package/dist/es-ES-DF_L5EDd.js +0 -24
- package/dist/es-ES-TUyeIp6F.js +0 -76
- package/dist/es-ES-yMXcOjDL.js +0 -13
- package/dist/et-EE-4fHYOoff.js +0 -13
- package/dist/et-EE-BBnYC5q8.js +0 -13
- package/dist/et-EE-BOIrYrz9.js +0 -65
- package/dist/et-EE-B_Wk8564.js +0 -29
- package/dist/et-EE-Be__VK7Y.js +0 -32
- package/dist/et-EE-BuBiNLCi.js +0 -24
- package/dist/et-EE-C8RrUpLm.js +0 -13
- package/dist/et-EE-CksV5_e1.js +0 -37
- package/dist/et-EE-Cw_VydGb.js +0 -76
- package/dist/et-EE-D0PMC4ie.js +0 -63
- package/dist/et-EE-DSZa_33d.js +0 -75
- package/dist/et-EE-DUWZ2Vqm.js +0 -54
- package/dist/et-EE-D_NmrrzQ.js +0 -13
- package/dist/et-EE-H8yxvhQj.js +0 -13
- package/dist/external-link-Cg6pJaSJ.js +0 -14
- package/dist/fi-FI-BKu826v5.js +0 -29
- package/dist/fi-FI-BfwJVwi9.js +0 -13
- package/dist/fi-FI-CEH4BfU3.js +0 -13
- package/dist/fi-FI-CsZlDJFb.js +0 -63
- package/dist/fi-FI-D8WrLxxq.js +0 -65
- package/dist/fi-FI-DFxljML-.js +0 -13
- package/dist/fi-FI-DH6jpo9K.js +0 -24
- package/dist/fi-FI-DJ8BbVPT.js +0 -75
- package/dist/fi-FI-DVa-ccaW.js +0 -54
- package/dist/fi-FI-DhUeTfn1.js +0 -13
- package/dist/fi-FI-XpnJRPgt.js +0 -37
- package/dist/fi-FI-bZzNB1WB.js +0 -32
- package/dist/fi-FI-tgvQX_Iq.js +0 -76
- package/dist/fi-FI-xqnQ38yC.js +0 -13
- package/dist/fieldConfigurations-BUT9DTUH.js +0 -21
- package/dist/file-CiG1D0zy.js +0 -42
- package/dist/form-rules-DhbF2mY4.js +0 -13
- package/dist/formUtils-BVAIyFiB.js +0 -92
- package/dist/fr-FR-BSynpexF.js +0 -13
- package/dist/fr-FR-Beljeilc.js +0 -65
- package/dist/fr-FR-BnblnBsx.js +0 -24
- package/dist/fr-FR-C7iSS-OS.js +0 -29
- package/dist/fr-FR-CY9emHgF.js +0 -54
- package/dist/fr-FR-CocDMzBc.js +0 -13
- package/dist/fr-FR-CzjsW73Q.js +0 -13
- package/dist/fr-FR-D533_MOG.js +0 -75
- package/dist/fr-FR-DPehHVb6.js +0 -13
- package/dist/fr-FR-Dk6Lw2On.js +0 -13
- package/dist/fr-FR-NxOktkWc.js +0 -13
- package/dist/fr-FR-TqAhPvzz.js +0 -37
- package/dist/fr-FR-VoxPkXSc.js +0 -63
- package/dist/fr-FR-cTKcuHqX.js +0 -32
- package/dist/fr-FR-ynC19lSF.js +0 -76
- package/dist/funds-in-CInoUdmG.js +0 -21
- package/dist/getName-CfQAf_l-.js +0 -41
- package/dist/getProblemsForEntity-I5B0dWUU.js +0 -24
- package/dist/getProps-Cc3J2-z9.js +0 -148
- package/dist/getTrustedFields-Cv6R496P.js +0 -104
- package/dist/gift-omNInZeB.js +0 -14
- package/dist/graph-DunG_uu1.js +0 -21
- package/dist/graph-up-BZze4i6m.js +0 -20
- package/dist/headquarter-BhpSibFO.js +0 -21
- package/dist/hotel-Cp7VgGCJ.js +0 -22
- package/dist/house-BhyBQdR3.js +0 -21
- package/dist/hr-HR--5syrowD.js +0 -76
- package/dist/hr-HR-Bjx-KdVs.js +0 -13
- package/dist/hr-HR-CIxdonpk.js +0 -75
- package/dist/hr-HR-CKZ_yuXC.js +0 -37
- package/dist/hr-HR-CbdP2tk-.js +0 -63
- package/dist/hr-HR-CnP5sqih.js +0 -54
- package/dist/hr-HR-ComCqan_.js +0 -32
- package/dist/hr-HR-D5V7g9H2.js +0 -13
- package/dist/hr-HR-D9OGeEuB.js +0 -13
- package/dist/hr-HR-D_MUIhtx.js +0 -13
- package/dist/hr-HR-De5kHU8U.js +0 -24
- package/dist/hr-HR-ZrpQrsik.js +0 -13
- package/dist/hr-HR-g88yM2q1.js +0 -29
- package/dist/hr-HR-lIHN6Yl2.js +0 -65
- package/dist/hu-HU--6ZxXlbV.js +0 -75
- package/dist/hu-HU-B-lUkFnQ.js +0 -13
- package/dist/hu-HU-BEV8uVRt.js +0 -37
- package/dist/hu-HU-BFiGk_QT.js +0 -76
- package/dist/hu-HU-BTlpbCpc.js +0 -54
- package/dist/hu-HU-BcogZby3.js +0 -24
- package/dist/hu-HU-ByRdd0O_.js +0 -29
- package/dist/hu-HU-CWdwNCev.js +0 -65
- package/dist/hu-HU-DUGz5q5D.js +0 -32
- package/dist/hu-HU-DjaoFDqm.js +0 -13
- package/dist/hu-HU-Ds3go4h4.js +0 -13
- package/dist/hu-HU-LxStrFGU.js +0 -13
- package/dist/hu-HU-hbVM6tMS.js +0 -13
- package/dist/hu-HU-pFpTvMiD.js +0 -63
- package/dist/id-blurred-B5lHEP8M.js +0 -59
- package/dist/id-cut-off-Ba1FRzKO.js +0 -55
- package/dist/id-front-CpNWN6nG.js +0 -52
- package/dist/id-glare-DgCQON8k.js +0 -49
- package/dist/image-CmB0ioUM.js +0 -17
- package/dist/info-Bb_-xIEK.js +0 -21
- package/dist/info-filled-CK8LB339.js +0 -17
- package/dist/isEmpty-BcLvy0xw.js +0 -23
- package/dist/it-IT-5a7NHVFo.js +0 -65
- package/dist/it-IT-B4bk2Xev.js +0 -13
- package/dist/it-IT-B5cf2VTN.js +0 -75
- package/dist/it-IT-C0Zv5ms9.js +0 -76
- package/dist/it-IT-CUrn0j1I.js +0 -29
- package/dist/it-IT-C_651bEP.js +0 -13
- package/dist/it-IT-Ckv8Ce4e.js +0 -24
- package/dist/it-IT-D-jYXj6V.js +0 -37
- package/dist/it-IT-D7G4BaP7.js +0 -13
- package/dist/it-IT-DERflsUd.js +0 -32
- package/dist/it-IT-DOBp2-MP.js +0 -13
- package/dist/it-IT-DZjw9LNC.js +0 -63
- package/dist/it-IT-Dx15tkIe.js +0 -13
- package/dist/it-IT-GgHc0cHR.js +0 -54
- package/dist/it-IT-OppZz3gW.js +0 -13
- package/dist/ja-JP--u211vje.js +0 -76
- package/dist/ja-JP-8yMqZqF2.js +0 -37
- package/dist/ja-JP-BoxeBgOv.js +0 -32
- package/dist/ja-JP-BqluCflj.js +0 -63
- package/dist/ja-JP-CbP1sVFP.js +0 -29
- package/dist/ja-JP-CbgaW99b.js +0 -54
- package/dist/ja-JP-CethQRoG.js +0 -13
- package/dist/ja-JP-CvNJvxkQ.js +0 -218
- package/dist/ja-JP-DK55NCZY.js +0 -135
- package/dist/ja-JP-DSvZhFNY.js +0 -65
- package/dist/ja-JP-DTW_hY1L.js +0 -13
- package/dist/ja-JP-DU7yCJYq.js +0 -202
- package/dist/ja-JP-DY4CJlUf.js +0 -75
- package/dist/ja-JP-FWHXsXlW.js +0 -24
- package/dist/ja-JP-GX3l4yqn.js +0 -125
- package/dist/ja-JP-Qu7oEIEy.js +0 -13
- package/dist/japanSupportUtils-DR5unSI9.js +0 -16
- package/dist/jpAddressSchema-DEOyz9Yo.js +0 -26
- package/dist/localizeDateString-0FoP1ZoN.js +0 -27
- package/dist/location-itJfxrDQ.js +0 -17
- package/dist/lt-LT-BebOeKIA.js +0 -13
- package/dist/lt-LT-CBTFJxth.js +0 -13
- package/dist/lt-LT-CK0t2AVY.js +0 -37
- package/dist/lt-LT-CNTNKNlX.js +0 -29
- package/dist/lt-LT-CXw4ywLM.js +0 -63
- package/dist/lt-LT-CfQUS8PP.js +0 -13
- package/dist/lt-LT-CgalYpUh.js +0 -65
- package/dist/lt-LT-Ci357QYQ.js +0 -13
- package/dist/lt-LT-CkjEvGSp.js +0 -75
- package/dist/lt-LT-D2Hrhr7v.js +0 -76
- package/dist/lt-LT-D5Rhxm1h.js +0 -32
- package/dist/lt-LT-DDdq07sX.js +0 -24
- package/dist/lt-LT-DTQGR9M0.js +0 -54
- package/dist/lt-LT-WRulV980.js +0 -13
- package/dist/lv-LV-BQ4F1GrV.js +0 -54
- package/dist/lv-LV-BdZK9nQA.js +0 -75
- package/dist/lv-LV-C9Dhkruv.js +0 -13
- package/dist/lv-LV-CG1zToz7.js +0 -32
- package/dist/lv-LV-CYcrO-6d.js +0 -13
- package/dist/lv-LV-CkyuY2ji.js +0 -24
- package/dist/lv-LV-D04q9r-y.js +0 -76
- package/dist/lv-LV-DTaBIHLh.js +0 -13
- package/dist/lv-LV-DYqBaW2-.js +0 -63
- package/dist/lv-LV-DoKxsoVR.js +0 -13
- package/dist/lv-LV-Dxe-A5vo.js +0 -13
- package/dist/lv-LV-JvlzK9X-.js +0 -37
- package/dist/lv-LV-N81Dgdm3.js +0 -29
- package/dist/lv-LV-aAd9SEqx.js +0 -65
- package/dist/mail-VHTlAusn.js +0 -14
- package/dist/mapAddressLocalizationToJpAddressSchema-vJWbpAyq.js +0 -56
- package/dist/mapExistingFile-BOZ-beF3.js +0 -157
- package/dist/mapJpAddressSchemaToAddressLocalizations-MqYxkfLg.js +0 -54
- package/dist/mapLegalEntityToIndividualSchema-CQnZl2f1.js +0 -204
- package/dist/mapTransferInstrumentToPayoutAccount-DJ5E9tqe.js +0 -34
- package/dist/minus-circle-filled-ZhtJ0GD3.js +0 -17
- package/dist/nl-NL-Bx5p0nXL.js +0 -24
- package/dist/nl-NL-CFzm75Jw.js +0 -13
- package/dist/nl-NL-CJ7MoBj2.js +0 -76
- package/dist/nl-NL-CUcML482.js +0 -54
- package/dist/nl-NL-CYFznuWn.js +0 -13
- package/dist/nl-NL-Cjlmc0Ii.js +0 -32
- package/dist/nl-NL-CmURERx_.js +0 -65
- package/dist/nl-NL-FbJ2sHba.js +0 -13
- package/dist/nl-NL-J7XpCpQm.js +0 -13
- package/dist/nl-NL-JChnFdCY.js +0 -13
- package/dist/nl-NL-Jhr-ICkK.js +0 -37
- package/dist/nl-NL-Lo8OF_nj.js +0 -29
- package/dist/nl-NL-SjOGmGk5.js +0 -13
- package/dist/nl-NL-YcL7Gufl.js +0 -75
- package/dist/nl-NL-lcNM54vV.js +0 -63
- package/dist/no-NO--OoWld_l.js +0 -13
- package/dist/no-NO-6chPsZZE.js +0 -29
- package/dist/no-NO-B5BjEy8n.js +0 -13
- package/dist/no-NO-BAWVf0GX.js +0 -13
- package/dist/no-NO-BBCvsecq.js +0 -54
- package/dist/no-NO-BH6DId3q.js +0 -37
- package/dist/no-NO-Bs3-6MDM.js +0 -24
- package/dist/no-NO-BsEie1We.js +0 -13
- package/dist/no-NO-C20s6CoP.js +0 -76
- package/dist/no-NO-CTrVITNu.js +0 -63
- package/dist/no-NO-CY_XHrYd.js +0 -32
- package/dist/no-NO-CtDyNTm6.js +0 -13
- package/dist/no-NO-KkYB-VQD.js +0 -75
- package/dist/no-NO-qyqWODMp.js +0 -65
- package/dist/omitObscuredFieldsIfUnchanged-DMBgASfn.js +0 -29
- package/dist/onfido-logo-BSkKPH10.js +0 -14
- package/dist/options-horizontal-GuXvLvV3.js +0 -18
- package/dist/partner-QD27Vy4w.js +0 -18
- package/dist/passport-blurred-CVG493IJ.js +0 -59
- package/dist/passport-cut-off-COzA_TmB.js +0 -56
- package/dist/passport-front-WJleLixT.js +0 -52
- package/dist/passport-front-green-CZVkCa1n.js +0 -232
- package/dist/passport-glare-BP5WnJZj.js +0 -50
- package/dist/patternValidators-a6VZDG0x.js +0 -83
- package/dist/pay-by-link-plane-BpY8Q6-B.js +0 -22
- package/dist/payout-DtB68BcZ.js +0 -20
- package/dist/payout-verification-instant-BzpfOQLD.js +0 -41
- package/dist/payout-verification-manual-gNEoeZkV.js +0 -90
- package/dist/person-IVZG3t3_.js +0 -17
- package/dist/phonePrefixes-CnL40uyX.js +0 -255
- package/dist/pl-PL-B5c0NNHB.js +0 -37
- package/dist/pl-PL-BH_LPZJa.js +0 -13
- package/dist/pl-PL-BzhEoDb5.js +0 -24
- package/dist/pl-PL-C19Btj2D.js +0 -76
- package/dist/pl-PL-CCX1rSGF.js +0 -13
- package/dist/pl-PL-CErRPlR2.js +0 -63
- package/dist/pl-PL-CPdKf-J0.js +0 -75
- package/dist/pl-PL-C_MvVzPy.js +0 -32
- package/dist/pl-PL-CbJSQVfe.js +0 -29
- package/dist/pl-PL-DEMxxz7h.js +0 -13
- package/dist/pl-PL-DtJ3sgVO.js +0 -13
- package/dist/pl-PL-DuM6hbqZ.js +0 -13
- package/dist/pl-PL-kGaeUP-w.js +0 -54
- package/dist/pl-PL-q9azN24o.js +0 -65
- package/dist/plaid-logo-FsZ7kfL-.js +0 -14
- package/dist/plus-DiALAL8-.js +0 -14
- package/dist/plus-circle-filled-BzHtTqEN.js +0 -17
- package/dist/process-field-configurations-CMIDJACq.js +0 -324
- package/dist/pt-BR-4Iozxvfr.js +0 -37
- package/dist/pt-BR-BKKQIUJP.js +0 -13
- package/dist/pt-BR-BfDe_8iW.js +0 -13
- package/dist/pt-BR-BxoOF8jB.js +0 -65
- package/dist/pt-BR-C-YbDjn-.js +0 -13
- package/dist/pt-BR-C0I_kTQ6.js +0 -13
- package/dist/pt-BR-CBAe0SnK.js +0 -32
- package/dist/pt-BR-CTXtdAVc.js +0 -122
- package/dist/pt-BR-D4BTdo_w.js +0 -13
- package/dist/pt-BR-DA44Wgbt.js +0 -63
- package/dist/pt-BR-DRBFUW-X.js +0 -29
- package/dist/pt-BR-DSENwwGu.js +0 -24
- package/dist/pt-BR-ERWeus3c.js +0 -75
- package/dist/pt-BR-nU_2Wbo5.js +0 -54
- package/dist/pt-BR-zOjPTIPu.js +0 -76
- package/dist/pt-PT-09L8XznW.js +0 -37
- package/dist/pt-PT-BMOUpVLE.js +0 -29
- package/dist/pt-PT-BTbVsews.js +0 -13
- package/dist/pt-PT-Bf4IV7wp.js +0 -13
- package/dist/pt-PT-CC7zlk3R.js +0 -13
- package/dist/pt-PT-CIo3mlXL.js +0 -24
- package/dist/pt-PT-DBZj2dDI.js +0 -13
- package/dist/pt-PT-DUTGt5L5.js +0 -75
- package/dist/pt-PT-Dm5DRDrd.js +0 -32
- package/dist/pt-PT-DpDxAynk.js +0 -13
- package/dist/pt-PT-F1qPZJ2c.js +0 -13
- package/dist/pt-PT-JVqqgvPs.js +0 -54
- package/dist/pt-PT-PIiikho9.js +0 -63
- package/dist/pt-PT-pIChDwiI.js +0 -65
- package/dist/pt-PT-t5M8xwTU.js +0 -76
- package/dist/recurring-DKNs9K3x.js +0 -17
- package/dist/reporting-D5ABpLO_.js +0 -16
- package/dist/resolveEnvironment-BBqc2XYC.js +0 -77
- package/dist/revenue-accelerate-D7Sp0V4a.js +0 -17
- package/dist/review-D4TUjcWF.js +0 -17
- package/dist/ro-RO-0vx6ZLWV.js +0 -13
- package/dist/ro-RO-4j2I7YM7.js +0 -13
- package/dist/ro-RO-B5YT9vP-.js +0 -32
- package/dist/ro-RO-BJoL_nyS.js +0 -29
- package/dist/ro-RO-BnFjok5O.js +0 -75
- package/dist/ro-RO-Bv9hZxwD.js +0 -63
- package/dist/ro-RO-C5PJhlmM.js +0 -13
- package/dist/ro-RO-C83h2zHZ.js +0 -54
- package/dist/ro-RO-CuabgXj1.js +0 -13
- package/dist/ro-RO-D7-7tmTR.js +0 -37
- package/dist/ro-RO-DK9gVwS9.js +0 -76
- package/dist/ro-RO-DRsaNX9j.js +0 -65
- package/dist/ro-RO-DaU2--fX.js +0 -13
- package/dist/ro-RO-ILTvlS9i.js +0 -24
- package/dist/roleMetadata-D1-6Xl8x.js +0 -66
- package/dist/save-BfqO2JBI.js +0 -14
- package/dist/search-Cmzbf5zI.js +0 -17
- package/dist/show-IdbU1C6P.js +0 -17
- package/dist/singpass-logo-wY4xsmTX.js +0 -17
- package/dist/singpass-verification-instant-JCqTr7Mv.js +0 -40
- package/dist/singpass-verification-manual-DQ7XW6R3.js +0 -34
- package/dist/sk-SK-2J6iKfmK.js +0 -76
- package/dist/sk-SK-7-enbO1N.js +0 -65
- package/dist/sk-SK-B-1yRol7.js +0 -13
- package/dist/sk-SK-C5Qmv4E6.js +0 -13
- package/dist/sk-SK-CLPd85I3.js +0 -75
- package/dist/sk-SK-CgLJIuJw.js +0 -54
- package/dist/sk-SK-ChVwlbp0.js +0 -63
- package/dist/sk-SK-Cv23cDQO.js +0 -24
- package/dist/sk-SK-D3tsz1Pg.js +0 -37
- package/dist/sk-SK-DM1yY8DA.js +0 -13
- package/dist/sk-SK-DO-AqRjE.js +0 -13
- package/dist/sk-SK-DuLm2CVx.js +0 -13
- package/dist/sk-SK-DxdxUonp.js +0 -29
- package/dist/sk-SK-S6iF1WDH.js +0 -32
- package/dist/sl-SI--pDTatHh.js +0 -13
- package/dist/sl-SI-BAIm-qBe.js +0 -13
- package/dist/sl-SI-BZpXMHiG.js +0 -13
- package/dist/sl-SI-BzeVaC1Z.js +0 -54
- package/dist/sl-SI-CJH14wbj.js +0 -13
- package/dist/sl-SI-C_4ajjU4.js +0 -13
- package/dist/sl-SI-D82ccY62.js +0 -76
- package/dist/sl-SI-DEaeEVKB.js +0 -24
- package/dist/sl-SI-DTvJT7fC.js +0 -65
- package/dist/sl-SI-DZHePXbK.js +0 -63
- package/dist/sl-SI-DqUEy_Cm.js +0 -32
- package/dist/sl-SI-T9_Ty-NS.js +0 -75
- package/dist/sl-SI-UFngWs5n.js +0 -29
- package/dist/sl-SI-Y9h1ht45.js +0 -37
- package/dist/solution-payments-DpyE_sdS.js +0 -14
- package/dist/store-Btc4GcmU.js +0 -14
- package/dist/styles-CLV89_hH.js +0 -5962
- package/dist/summaryItem-CAQCQSkt.js +0 -18
- package/dist/sv-SE-3-h2VlYi.js +0 -75
- package/dist/sv-SE-BZNey_8S.js +0 -13
- package/dist/sv-SE-CDxyyNV0.js +0 -13
- package/dist/sv-SE-CRBRuE8Z.js +0 -32
- package/dist/sv-SE-CVmo11gI.js +0 -54
- package/dist/sv-SE-CXaMlJCI.js +0 -24
- package/dist/sv-SE-Cr0s35EH.js +0 -29
- package/dist/sv-SE-CrBkos0z.js +0 -76
- package/dist/sv-SE-DFSm22oQ.js +0 -37
- package/dist/sv-SE-DKnUr7xo.js +0 -13
- package/dist/sv-SE-Dq56vGlB.js +0 -63
- package/dist/sv-SE-DsPdegWB.js +0 -13
- package/dist/sv-SE-N-Hqwcjq.js +0 -65
- package/dist/sv-SE-ZsucW_Uj.js +0 -13
- package/dist/sv-SE-rckxD-43.js +0 -13
- package/dist/tax-reporting-graph-hgoilCHZ.js +0 -504
- package/dist/terminal-1-D1pwXCoi.js +0 -18
- package/dist/tink-logo-DDyjz5eJ.js +0 -17
- package/dist/trackNavigation-db_h46BT.js +0 -28
- package/dist/trusted-fields-provider-BgfIoSNJ.js +0 -16
- package/dist/types/api/invitations/useInvitationStatuses.d.ts +0 -8
- package/dist/types/components/BankAccount/forms/BankVerification/store.d.ts +0 -1
- package/dist/types/components/EmbeddedDropins/ManagePCIComponent/ManagePCIComponent.d.ts +0 -6
- package/dist/types/components/Shared/SingpassBanner/ProviderButton/ProviderButton.d.ts +0 -7
- package/dist/types/components/index.d.ts +0 -49
- package/dist/types/context/ExpiryContext/ExpiryContext.d.ts +0 -15
- package/dist/types/context/ExpiryContext/useExpiryThreshold.d.ts +0 -12
- package/dist/types/core/BaseElement.d.ts +0 -46
- package/dist/types/core/UIElement/UIElement.d.ts +0 -24
- package/dist/types/core/core.d.ts +0 -28
- package/dist/types/core/sdkValidation/index.d.ts +0 -4
- package/dist/types/core/sdkValidation/schemas.d.ts +0 -2
- package/dist/types/core/sdkValidation/types.d.ts +0 -19
- package/dist/types--xPA8bq3.js +0 -34
- package/dist/types-BDdV-c-7.js +0 -64
- package/dist/types-C7ANBXKc.js +0 -144
- package/dist/types-CMK2Gs1Z.js +0 -74
- package/dist/types-Dv0COrvY.js +0 -37
- package/dist/unincorporated-partnership-5iQ8augf.js +0 -28
- package/dist/upload-BmUXjsaU.js +0 -17
- package/dist/us-check-C1rTBsCY.js +0 -46
- package/dist/us-check-account-number-9lI1dXNC.js +0 -48
- package/dist/us-check-routing-number-s_KaAGSM.js +0 -49
- package/dist/useAssociatedLegalEntity-9hHARgoS.js +0 -34
- package/dist/useBusinessDetailsData-eIZWfksO.js +0 -5420
- package/dist/useCreateLegalEntity-CtGUDesz.js +0 -32
- package/dist/useForm-BgHdSJLD.js +0 -582
- package/dist/useFormContext-CS1RRaOG.js +0 -211
- package/dist/useGlobalData-TnV6PIkt.js +0 -199
- package/dist/useId-BZ0PA7jP.js +0 -24
- package/dist/useMultiForm-D_RXm-EH.js +0 -879
- package/dist/useOnboardingStatus-C24Lv41L.js +0 -28
- package/dist/useScenarios-Dt8fTJaF.js +0 -48
- package/dist/useTermsOfServiceStatus-uLxHxESA.js +0 -43
- package/dist/useToastContext-DrlXuGmm.js +0 -49
- package/dist/useUnincorporatedPartnershipMembers-DCGs6f0a.js +0 -99
- package/dist/useUpdateBusinessLines-fa9VQXA7.js +0 -337
- package/dist/useUpdateLegalEntity-pCVJvMOY.js +0 -40
- package/dist/utils-3sCyD_Sz.js +0 -29
- package/dist/utils-C0z7wmlu.js +0 -179
- package/dist/utils-CPcpt-fR.js +0 -237
- package/dist/utils-CgfUpZyZ.js +0 -58
- package/dist/utils-CinWv0Kh.js +0 -811
- package/dist/utils-DNSfZiio.js +0 -70
- package/dist/validate-B1FpiTip.js +0 -434
- package/dist/validate-DfJceNKE.js +0 -120
- package/dist/validationError-kYn_eC4r.js +0 -86
- package/dist/view-verification-status-VFcBydkR.js +0 -21
- package/dist/warning-circle-fill-DBvt921B.js +0 -17
- package/dist/warning-diamond-filled-Lb2od2ry.js +0 -17
- package/dist/webinar-m9nuFZBt.js +0 -22
- package/dist/yapily-logo-BduxhNRA.js +0 -17
|
@@ -1,4226 +0,0 @@
|
|
|
1
|
-
;
|
|
2
|
-
{
|
|
3
|
-
try {
|
|
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] = "5eb48620-f6c7-48d5-8ace-540fe735d5b6", e._sentryDebugIdIdentifier = "sentry-dbid-5eb48620-f6c7-48d5-8ace-540fe735d5b6");
|
|
6
|
-
} catch (e) {
|
|
7
|
-
}
|
|
8
|
-
}
|
|
9
|
-
;
|
|
10
|
-
import { jsxs, jsx, Fragment } from "preact/jsx-runtime";
|
|
11
|
-
import { useQuery, useMutation, useQueryClient, skipToken } from "@tanstack/preact-query";
|
|
12
|
-
import { useState, useEffect, useRef, useCallback, useContext, useMemo as useMemo$1 } from "preact/hooks";
|
|
13
|
-
import { b as useApiContext, j as httpPost, k as httpGet, ae as createLogger, a9 as CountryCodes, u as useTranslation, x as useAnalyticsContext, z as Icon, N as Typography, V as Button, ah as objectsDeepEqual, H as useToggleContext, aB as Header, ax as isEmpty, ab as translateTranslatable, q as hasOwnEntityAssociationOfType, L as LegalEntityTypes, t as useAccountHolder, m as useSettingsContext, C as Alert, a8 as getLegalEntityCountry, aR as Trans, b4 as EEA_Countries, ap as useDataset, O as StackLayout, aq as datasetIdentifier, b5 as isAccountIdentifierObscured, b6 as hasEmptyFields, b7 as extractFieldName, b8 as concatenateFieldNames, aT as keysOf, ak as getCapabilityProblems, w as TaskTypes, an as cloneObject, am as datasetUtilities } from "./StoreProvider-CApjzEDt.js";
|
|
14
|
-
import { u as useTransferInstrument, m as mapTransferInstrumentToPayoutAccount } from "./mapTransferInstrumentToPayoutAccount-DJ5E9tqe.js";
|
|
15
|
-
import { L as LoaderWrapper } from "./LoaderWrapper-DE-3T3QK.js";
|
|
16
|
-
import { S as SettingNames } from "./types-Dv0COrvY.js";
|
|
17
|
-
import { u as useGlobalDataSlice, a as useGlobalData, b as useResetGlobalData, c as useStateContext, F as FormWrapper } from "./useGlobalData-TnV6PIkt.js";
|
|
18
|
-
import { a as useInvalidateRootLegalEntity, u as useToastContext } from "./useToastContext-DrlXuGmm.js";
|
|
19
|
-
import { F as FeatureNames } from "./types-C7ANBXKc.js";
|
|
20
|
-
import { a as augmentWithCountryConfigs, g as getPropsFromConfigurations } from "./process-field-configurations-CMIDJACq.js";
|
|
21
|
-
import { g as getRequiredForms, a as addValidityToForms, u as useFormComposer } from "./dropinUtils-C6SkIQLo.js";
|
|
22
|
-
import { u as uppercase, p as payoutAccountFormat, m as mapExistingFile, g as getPageName, b as useScenarioConfiguration, c as useUnifyLoadingStatus } from "./mapExistingFile-BOZ-beF3.js";
|
|
23
|
-
import { C as Confirm } from "./Confirm-CceRWfkX.js";
|
|
24
|
-
import { c as currencyByCountry } from "./types-BDdV-c-7.js";
|
|
25
|
-
import { i as isValidationError, p as processValidationErrors, b as isIdDocumentUploadError, c as isBankStatementUploadError, a as isMaintenanceModeError, m as mapCreateOrUpdateTransferInstrumentErrorMessageToTranslatable } from "./validationError-kYn_eC4r.js";
|
|
26
|
-
import { t as trackNavigation } from "./trackNavigation-db_h46BT.js";
|
|
27
|
-
import { D as DropzoneFile, e as bytesToSize, f as defaultFileValidationOptions, h as fileValidationRules, S as StateContextSetter, i as fileToBase64, a as getDocument, c as createDocumentRequest, d as documentApiUtils, b as getFileExtention } from "./validate-B1FpiTip.js";
|
|
28
|
-
import { b as getPayoutAccountHolderName, g as getLegalEntityNameBasedOnType } from "./getName-CfQAf_l-.js";
|
|
29
|
-
import { o as omitObscuredFieldsIfUnchanged } from "./omitObscuredFieldsIfUnchanged-DMBgASfn.js";
|
|
30
|
-
import { signal } from "@preact/signals";
|
|
31
|
-
import { Show } from "@preact/signals/utils";
|
|
32
|
-
import { s as summaryStep } from "./Summary-DlYtNJQD.js";
|
|
33
|
-
import { g as getFieldProps, a as getFormProps } from "./getProps-Cc3J2-z9.js";
|
|
34
|
-
import cx from "classnames";
|
|
35
|
-
import { memo, useRef as useRef$1, useState as useState$1, useMemo, useEffect as useEffect$1, lazy } from "preact/compat";
|
|
36
|
-
import { F as Field } from "./Field-DDqviWD6.js";
|
|
37
|
-
import { M as Modal } from "./Modal-Bq5ccK7z.js";
|
|
38
|
-
import { T as TextArea } from "./TextArea-C4OmPCHh.js";
|
|
39
|
-
import { u as useForm } from "./useForm-BgHdSJLD.js";
|
|
40
|
-
import { E as EndStateLayout } from "./EndStateLayout-yZlKFmxQ.js";
|
|
41
|
-
import { E as ErrorPanel } from "./ErrorPanel-rmGb9PlE.js";
|
|
42
|
-
import { c as createFormUtils, m as mergeFieldMetadataIntoProps } from "./formUtils-BVAIyFiB.js";
|
|
43
|
-
import { b as bankStatementDescriptionPattern } from "./basePatterns-BwdnMQxI.js";
|
|
44
|
-
import { createContext } from "preact";
|
|
45
|
-
import OpenBankingSDK from "@adyen/openbankingsdk";
|
|
46
|
-
import { S as Select } from "./Select-D5a5aVFZ.js";
|
|
47
|
-
import { m as makeMask, n as numericInputs, a as nonInputs, s as spacer, c as customInputs, M as MaskedInput, d as alphanumericInputs, b as alphaInputs } from "./MaskedInput-Dzp3Td83.js";
|
|
48
|
-
import { r as resolveFieldMetadata } from "./fieldConfigurations-BUT9DTUH.js";
|
|
49
|
-
import { v as validatePatternOnBlur } from "./patternValidators-a6VZDG0x.js";
|
|
50
|
-
import { a as isNotEmptyValidator } from "./commonValidators-D1bdFvRX.js";
|
|
51
|
-
import { I as InputText } from "./InputText-BCi31wZB.js";
|
|
52
|
-
import { C as Currencies } from "./currency-CrdnaaDu.js";
|
|
53
|
-
import { u as useUnincorporatedPartnershipMembers } from "./useUnincorporatedPartnershipMembers-DCGs6f0a.js";
|
|
54
|
-
import { I as Image } from "./unincorporated-partnership-5iQ8augf.js";
|
|
55
|
-
import { C as CountryField } from "./CountryField-B0KnMSNK.js";
|
|
56
|
-
import { C as Card } from "./Card-OQuFzmxm.js";
|
|
57
|
-
import { L as Link } from "./Link-DWRRNNKW.js";
|
|
58
|
-
import { T as Tag } from "./Tag-DdkVScyr.js";
|
|
59
|
-
import { C as ContextGuidance } from "./ContextGuidance-DeSyT-K4.js";
|
|
60
|
-
import { c as createFormRules } from "./form-rules-DhbF2mY4.js";
|
|
61
|
-
import { s as summaryItem } from "./summaryItem-CAQCQSkt.js";
|
|
62
|
-
const getCheck = async (legalEntityId, baseUrl, data) => {
|
|
63
|
-
return httpPost(
|
|
64
|
-
{
|
|
65
|
-
baseUrl,
|
|
66
|
-
path: `legalEntities/${legalEntityId}/checks/bankAccount`
|
|
67
|
-
},
|
|
68
|
-
data
|
|
69
|
-
);
|
|
70
|
-
};
|
|
71
|
-
const useCheck = (data, options) => {
|
|
72
|
-
const { rootLegalEntityId, baseUrl: url } = useApiContext();
|
|
73
|
-
return useQuery({
|
|
74
|
-
queryKey: ["checkAsAService", data],
|
|
75
|
-
queryFn: () => getCheck(rootLegalEntityId.value, url.value, data),
|
|
76
|
-
...options
|
|
77
|
-
});
|
|
78
|
-
};
|
|
79
|
-
const getBankVerificationProviders = async (legalEntityId, baseUrl, queryParams) => {
|
|
80
|
-
const { country, locale, configId } = queryParams;
|
|
81
|
-
const providerParams = new URLSearchParams({
|
|
82
|
-
country,
|
|
83
|
-
locale,
|
|
84
|
-
...configId && { configId }
|
|
85
|
-
});
|
|
86
|
-
return httpGet({
|
|
87
|
-
baseUrl,
|
|
88
|
-
path: `legalEntities/${legalEntityId}/transferInstruments/trusted/providers?${providerParams}`
|
|
89
|
-
});
|
|
90
|
-
};
|
|
91
|
-
const useBankVerificationProviders = (queryParams, options) => {
|
|
92
|
-
const { rootLegalEntityId, baseUrl } = useApiContext();
|
|
93
|
-
return useQuery({
|
|
94
|
-
queryKey: ["bankVerificationProviders", queryParams],
|
|
95
|
-
queryFn: () => getBankVerificationProviders(rootLegalEntityId.value, baseUrl.value, queryParams),
|
|
96
|
-
...options
|
|
97
|
-
});
|
|
98
|
-
};
|
|
99
|
-
const createTransferInstrument = async (rootLegalEntityId, baseUrl, transferInstrument) => {
|
|
100
|
-
return httpPost(
|
|
101
|
-
{
|
|
102
|
-
baseUrl,
|
|
103
|
-
path: `legalEntities/${rootLegalEntityId}/transferInstruments`
|
|
104
|
-
},
|
|
105
|
-
transferInstrument
|
|
106
|
-
);
|
|
107
|
-
};
|
|
108
|
-
const createTrustedTransferInstrument = async (legalEntityId, baseUrl, data) => {
|
|
109
|
-
return httpPost(
|
|
110
|
-
{
|
|
111
|
-
baseUrl,
|
|
112
|
-
path: `legalEntities/${legalEntityId}/transferInstruments/trusted`
|
|
113
|
-
},
|
|
114
|
-
data
|
|
115
|
-
);
|
|
116
|
-
};
|
|
117
|
-
const useCreateTrustedTransferInstrument = (options) => {
|
|
118
|
-
const { rootLegalEntityId, baseUrl } = useApiContext();
|
|
119
|
-
return useMutation({
|
|
120
|
-
mutationFn: (data) => createTrustedTransferInstrument(rootLegalEntityId.value, baseUrl.value, data),
|
|
121
|
-
...options
|
|
122
|
-
});
|
|
123
|
-
};
|
|
124
|
-
const updateTransferInstrument = async (legalEntityId, baseUrl, transferInstrument, transferInstrumentId) => {
|
|
125
|
-
return httpPost(
|
|
126
|
-
{
|
|
127
|
-
baseUrl,
|
|
128
|
-
path: `legalEntities/${legalEntityId}/transferInstruments/${transferInstrumentId}`
|
|
129
|
-
},
|
|
130
|
-
transferInstrument
|
|
131
|
-
);
|
|
132
|
-
};
|
|
133
|
-
const useUpdateTransferInstrument = (options) => {
|
|
134
|
-
const { rootLegalEntityId, baseUrl } = useApiContext();
|
|
135
|
-
const queryClient = useQueryClient();
|
|
136
|
-
return useMutation({
|
|
137
|
-
mutationFn: ({ transferInstrument, transferInstrumentId }) => updateTransferInstrument(
|
|
138
|
-
rootLegalEntityId.value,
|
|
139
|
-
baseUrl.value,
|
|
140
|
-
transferInstrument,
|
|
141
|
-
transferInstrumentId
|
|
142
|
-
),
|
|
143
|
-
onSuccess: async (transferInstrument) => {
|
|
144
|
-
queryClient.setQueryData(["transferInstrument", transferInstrument.id], transferInstrument);
|
|
145
|
-
await queryClient.invalidateQueries({
|
|
146
|
-
// Invalidate transfer instruments on root LE
|
|
147
|
-
queryKey: ["transferInstruments"]
|
|
148
|
-
});
|
|
149
|
-
},
|
|
150
|
-
...options
|
|
151
|
-
});
|
|
152
|
-
};
|
|
153
|
-
const updateTrustedTransferInstrument = async (legalEntityId, baseUrl, preferredCurrencyCode, transferInstrumentId) => {
|
|
154
|
-
return httpPost(
|
|
155
|
-
{
|
|
156
|
-
baseUrl,
|
|
157
|
-
path: `legalEntities/${legalEntityId}/transferInstruments/trusted/${transferInstrumentId}`
|
|
158
|
-
},
|
|
159
|
-
{
|
|
160
|
-
preferredCurrencyCode
|
|
161
|
-
}
|
|
162
|
-
);
|
|
163
|
-
};
|
|
164
|
-
const useUpdateTrustedTransferInstrument = (options) => {
|
|
165
|
-
const { rootLegalEntityId, baseUrl } = useApiContext();
|
|
166
|
-
return useMutation({
|
|
167
|
-
mutationFn: ({ preferredCurrencyCode, transferInstrumentId }) => updateTrustedTransferInstrument(
|
|
168
|
-
rootLegalEntityId.value,
|
|
169
|
-
baseUrl.value,
|
|
170
|
-
preferredCurrencyCode,
|
|
171
|
-
transferInstrumentId
|
|
172
|
-
),
|
|
173
|
-
...options
|
|
174
|
-
});
|
|
175
|
-
};
|
|
176
|
-
const accountFormatsImports = /* @__PURE__ */ Object.assign({ "../accountFormats/AD.json": () => import("./AD-BQAadLyG.js"), "../accountFormats/AE.json": () => import("./AE-mIZ12t47.js"), "../accountFormats/AI.json": () => import("./AI-CYOqGKk2.js"), "../accountFormats/AL.json": () => import("./AL-BX1fEo1A.js"), "../accountFormats/AR.json": () => import("./AR-C9kMRnHG.js"), "../accountFormats/AS.json": () => import("./AS-B0TMZQ6o.js"), "../accountFormats/AT.json": () => import("./AT-BI8ju2NH.js"), "../accountFormats/AU.json": () => import("./AU-B5LSe4bo.js"), "../accountFormats/AX.json": () => import("./AX-Z6f6EnJc.js"), "../accountFormats/AZ.json": () => import("./AZ-BqrKjWMH.js"), "../accountFormats/BA.json": () => import("./BA-BbP72Tn6.js"), "../accountFormats/BE.json": () => import("./BE-nWHKW0xQ.js"), "../accountFormats/BG.json": () => import("./BG-HKzabLqZ.js"), "../accountFormats/BH.json": () => import("./BH-Ded1Eyrc.js"), "../accountFormats/BM.json": () => import("./BM-CBl-UQUl.js"), "../accountFormats/BR.json": () => import("./BR-DsY9PZVZ.js"), "../accountFormats/BS.json": () => import("./BS-dBfArxRw.js"), "../accountFormats/BV.json": () => import("./BV-D0QBsH7-.js"), "../accountFormats/BY.json": () => import("./BY-BsQUo3fM.js"), "../accountFormats/CA.json": () => import("./CA-DT4cmOOe.js"), "../accountFormats/CH.json": () => import("./CH-TX4BTE2y.js"), "../accountFormats/CN.json": () => import("./CN-BV-5PSpq.js"), "../accountFormats/CR.json": () => import("./CR-Dtv-rXg9.js"), "../accountFormats/CY.json": () => import("./CY-D59Nypl7.js"), "../accountFormats/CZ.json": () => import("./CZ-B6iI1GbE.js"), "../accountFormats/DE.json": () => import("./DE-CsuX_tSL.js"), "../accountFormats/DK.json": () => import("./DK-oQEFrF6o.js"), "../accountFormats/DO.json": () => import("./DO-B1BWc3Iy.js"), "../accountFormats/EC.json": () => import("./EC-DbNXe71-.js"), "../accountFormats/EE.json": () => import("./EE-3WZV5Ejt.js"), "../accountFormats/ES.json": () => import("./ES-NfxpqbC2.js"), "../accountFormats/FI.json": () => import("./FI-CHQIvHa-.js"), "../accountFormats/FJ.json": () => import("./FJ-CBdbPf5l.js"), "../accountFormats/FO.json": () => import("./FO-1pD1p939.js"), "../accountFormats/FR.json": () => import("./FR-MWZyWX3x.js"), "../accountFormats/GB.json": () => import("./GB-CCYHTagl.js"), "../accountFormats/GE.json": () => import("./GE-Deog1a3Z.js"), "../accountFormats/GF.json": () => import("./GF-Cda8N7A4.js"), "../accountFormats/GG.json": () => import("./GG-CPoMVQPc.js"), "../accountFormats/GI.json": () => import("./GI-DxmBwVD_.js"), "../accountFormats/GL.json": () => import("./GL-0vO9Of9c.js"), "../accountFormats/GP.json": () => import("./GP-za-3opp-.js"), "../accountFormats/GR.json": () => import("./GR-Rk0pXlNw.js"), "../accountFormats/GT.json": () => import("./GT-C1jhs-Dx.js"), "../accountFormats/GU.json": () => import("./GU-CALV5vh1.js"), "../accountFormats/HK.json": () => import("./HK-BB3PIq-Z.js"), "../accountFormats/HR.json": () => import("./HR-WapHW2fw.js"), "../accountFormats/HU.json": () => import("./HU-DCOMuOhe.js"), "../accountFormats/ID.json": () => import("./ID-BcOv4SXj.js"), "../accountFormats/IE.json": () => import("./IE-BkgtVgDi.js"), "../accountFormats/IL.json": () => import("./IL-CQ0yHRRe.js"), "../accountFormats/IM.json": () => import("./IM-Wr4iDT94.js"), "../accountFormats/IN.json": () => import("./IN-BhEI9o7G.js"), "../accountFormats/IS.json": () => import("./IS-C-Cgc6zp.js"), "../accountFormats/IT.json": () => import("./IT-CXekiddL.js"), "../accountFormats/JE.json": () => import("./JE-B4gj54Hg.js"), "../accountFormats/JM.json": () => import("./JM-BMGgBK6y.js"), "../accountFormats/JO.json": () => import("./JO-rY8A8f9C.js"), "../accountFormats/JP.json": () => import("./JP-BQG5dF1Y.js"), "../accountFormats/KR.json": () => import("./KR-74SwXHka.js"), "../accountFormats/KW.json": () => import("./KW-CcVPOJ8B.js"), "../accountFormats/KY.json": () => import("./KY-DXCeltYA.js"), "../accountFormats/KZ.json": () => import("./KZ-CZNjdp22.js"), "../accountFormats/LB.json": () => import("./LB-DZ5YfAsO.js"), "../accountFormats/LI.json": () => import("./LI-L0ZAALRT.js"), "../accountFormats/LT.json": () => import("./LT-Ao2uagV9.js"), "../accountFormats/LU.json": () => import("./LU-B7LRUuc6.js"), "../accountFormats/LV.json": () => import("./LV-DZeGjA2G.js"), "../accountFormats/MC.json": () => import("./MC-EDVNGWhy.js"), "../accountFormats/MD.json": () => import("./MD-DVc0183a.js"), "../accountFormats/ME.json": () => import("./ME-DiJhSuli.js"), "../accountFormats/MK.json": () => import("./MK-BZxslBTS.js"), "../accountFormats/MP.json": () => import("./MP-7IpnbfCj.js"), "../accountFormats/MQ.json": () => import("./MQ-DusG_no1.js"), "../accountFormats/MR.json": () => import("./MR-DaBVNHqN.js"), "../accountFormats/MT.json": () => import("./MT-B9my7RlP.js"), "../accountFormats/MU.json": () => import("./MU-D3gGVu1R.js"), "../accountFormats/MX.json": () => import("./MX-CZVOFg3D.js"), "../accountFormats/MY.json": () => import("./MY-ym71svTa.js"), "../accountFormats/NC.json": () => import("./NC-xzMvjp9-.js"), "../accountFormats/NL.json": () => import("./NL-VXAFOhV5.js"), "../accountFormats/NO.json": () => import("./NO-Cx1VSh2W.js"), "../accountFormats/NZ.json": () => import("./NZ-BP7_Q9Om.js"), "../accountFormats/PE.json": () => import("./PE-CdxgPh3v.js"), "../accountFormats/PF.json": () => import("./PF-CstaOd9Z.js"), "../accountFormats/PH.json": () => import("./PH-BYgMDYIH.js"), "../accountFormats/PK.json": () => import("./PK-bLhtgsEk.js"), "../accountFormats/PL.json": () => import("./PL-BZW1hGvD.js"), "../accountFormats/PM.json": () => import("./PM-BWbxAh4u.js"), "../accountFormats/PR.json": () => import("./PR-CFPKXEXp.js"), "../accountFormats/PS.json": () => import("./PS-B8obOOWY.js"), "../accountFormats/PT.json": () => import("./PT-OpU4MU3L.js"), "../accountFormats/QA.json": () => import("./QA-CSfx-mvb.js"), "../accountFormats/RE.json": () => import("./RE-BApq1FJ6.js"), "../accountFormats/RO.json": () => import("./RO-Cz6Sh0ls.js"), "../accountFormats/RS.json": () => import("./RS-BCenke-W.js"), "../accountFormats/RU.json": () => import("./RU-D27RC7dq.js"), "../accountFormats/SA.json": () => import("./SA-C9VgxCgm.js"), "../accountFormats/SE.json": () => import("./SE-B5K-FkQd.js"), "../accountFormats/SG.json": () => import("./SG-DoCqjlFi.js"), "../accountFormats/SI.json": () => import("./SI-BOGTNLPa.js"), "../accountFormats/SJ.json": () => import("./SJ-Z9jwQQlz.js"), "../accountFormats/SK.json": () => import("./SK-BOVrp_Av.js"), "../accountFormats/SM.json": () => import("./SM-meowwILA.js"), "../accountFormats/TF.json": () => import("./TF-BOWng-Dz.js"), "../accountFormats/TH.json": () => import("./TH-CvyXLcZK.js"), "../accountFormats/TL.json": () => import("./TL-BWslydRz.js"), "../accountFormats/TN.json": () => import("./TN-Cjd3bM_V.js"), "../accountFormats/TR.json": () => import("./TR-BBx5CuWS.js"), "../accountFormats/TT.json": () => import("./TT-D4-z5BA-.js"), "../accountFormats/TW.json": () => import("./TW-BC8YpnMr.js"), "../accountFormats/UA.json": () => import("./UA-DrXUnAe6.js"), "../accountFormats/US.json": () => import("./US-D8dI5_i1.js"), "../accountFormats/UY.json": () => import("./UY-DEHqLXhX.js"), "../accountFormats/VA.json": () => import("./VA-DXsYTCoh.js"), "../accountFormats/VG.json": () => import("./VG-DnKAVCsi.js"), "../accountFormats/VI.json": () => import("./VI-CU9MA9ux.js"), "../accountFormats/VN.json": () => import("./VN-CTSqsmB6.js"), "../accountFormats/WF.json": () => import("./WF-CwHbsjtJ.js"), "../accountFormats/YT.json": () => import("./YT-BCyAAbo7.js"), "../accountFormats/ZA.json": () => import("./ZA-NU7slima.js") });
|
|
177
|
-
const getAccountFormatsForCountry = async (country) => {
|
|
178
|
-
const importForCountry = accountFormatsImports[`../accountFormats/${country}.json`];
|
|
179
|
-
if (!importForCountry) {
|
|
180
|
-
throw Error(`No account formats available for ${country}`);
|
|
181
|
-
}
|
|
182
|
-
const countryBankFormats = (await importForCountry()).default;
|
|
183
|
-
const expandedBankFormats = {
|
|
184
|
-
...countryBankFormats,
|
|
185
|
-
numberAndBic: {
|
|
186
|
-
bankStatementRequirement: "OPTIONAL",
|
|
187
|
-
fields: ["bankAccountNumber", "swiftCode"]
|
|
188
|
-
}
|
|
189
|
-
};
|
|
190
|
-
return expandedBankFormats;
|
|
191
|
-
};
|
|
192
|
-
const showInstantVerificationPayoutModal = signal(false);
|
|
193
|
-
const validateAccountIdentification = async (baseUrl, data) => {
|
|
194
|
-
return httpPost(
|
|
195
|
-
{
|
|
196
|
-
baseUrl,
|
|
197
|
-
path: `validations/accountidentification`
|
|
198
|
-
},
|
|
199
|
-
{
|
|
200
|
-
accountIdentification: {
|
|
201
|
-
...data
|
|
202
|
-
}
|
|
203
|
-
}
|
|
204
|
-
);
|
|
205
|
-
};
|
|
206
|
-
const useValidateAccountIdentification = (options) => {
|
|
207
|
-
const { baseUrl } = useApiContext();
|
|
208
|
-
return useMutation({
|
|
209
|
-
mutationFn: (data) => validateAccountIdentification(baseUrl.value, data),
|
|
210
|
-
...options
|
|
211
|
-
});
|
|
212
|
-
};
|
|
213
|
-
const useAsyncAccountDetailsValidationRules = (payload, hasEmptyFields2, isAccountNumberMasked) => {
|
|
214
|
-
const [timeoutId, setTimeoutId] = useState(null);
|
|
215
|
-
const [accountValidationData, setAccountValidationData] = useState({
|
|
216
|
-
invalidFields: [],
|
|
217
|
-
valid: false
|
|
218
|
-
});
|
|
219
|
-
const { mutateAsync } = useValidateAccountIdentification();
|
|
220
|
-
useEffect(() => {
|
|
221
|
-
const fetchAccountDetails = async (accountIdentificationPayload) => {
|
|
222
|
-
try {
|
|
223
|
-
const accountIdentificationResponse = await mutateAsync(accountIdentificationPayload);
|
|
224
|
-
setAccountValidationData(accountIdentificationResponse);
|
|
225
|
-
} catch (error) {
|
|
226
|
-
console.error("Error fetching account details:", error);
|
|
227
|
-
}
|
|
228
|
-
};
|
|
229
|
-
if (payload && !hasEmptyFields2 && !isAccountNumberMasked) {
|
|
230
|
-
if (timeoutId !== null) {
|
|
231
|
-
clearTimeout(timeoutId);
|
|
232
|
-
}
|
|
233
|
-
setTimeoutId(
|
|
234
|
-
setTimeout(() => {
|
|
235
|
-
fetchAccountDetails(payload);
|
|
236
|
-
setTimeoutId(null);
|
|
237
|
-
}, 500)
|
|
238
|
-
);
|
|
239
|
-
}
|
|
240
|
-
}, [mutateAsync, hasEmptyFields2, payload]);
|
|
241
|
-
return accountValidationData;
|
|
242
|
-
};
|
|
243
|
-
const logger = createLogger();
|
|
244
|
-
const getAccountIdentificationFromPayoutAccountSchema = (payoutAccount, bankCountry, enabledCrossBorderPayouts) => {
|
|
245
|
-
if ("iban" in payoutAccount && payoutAccount.iban) {
|
|
246
|
-
return {
|
|
247
|
-
type: "iban",
|
|
248
|
-
iban: payoutAccount.iban
|
|
249
|
-
};
|
|
250
|
-
}
|
|
251
|
-
if (enabledCrossBorderPayouts && "bankAccountNumber" in payoutAccount && payoutAccount.bankAccountNumber && "swiftCode" in payoutAccount && payoutAccount.swiftCode) {
|
|
252
|
-
return {
|
|
253
|
-
type: "numberAndBic",
|
|
254
|
-
bic: payoutAccount.swiftCode,
|
|
255
|
-
accountNumber: payoutAccount.bankAccountNumber
|
|
256
|
-
};
|
|
257
|
-
}
|
|
258
|
-
switch (bankCountry) {
|
|
259
|
-
case CountryCodes.Australia:
|
|
260
|
-
return {
|
|
261
|
-
type: "auLocal",
|
|
262
|
-
accountNumber: payoutAccount.bankAccountNumber,
|
|
263
|
-
bsbCode: payoutAccount.branchCode
|
|
264
|
-
};
|
|
265
|
-
case CountryCodes.Brazil:
|
|
266
|
-
return {
|
|
267
|
-
type: "brLocal",
|
|
268
|
-
accountNumber: payoutAccount.bankAccountNumber,
|
|
269
|
-
ispb: payoutAccount.bankCode,
|
|
270
|
-
bankCode: payoutAccount.bankName,
|
|
271
|
-
branchNumber: payoutAccount.branchCode
|
|
272
|
-
};
|
|
273
|
-
case CountryCodes.Canada:
|
|
274
|
-
return {
|
|
275
|
-
type: "caLocal",
|
|
276
|
-
accountNumber: payoutAccount.bankAccountNumber,
|
|
277
|
-
institutionNumber: payoutAccount.bankCode,
|
|
278
|
-
transitNumber: payoutAccount.branchCode
|
|
279
|
-
};
|
|
280
|
-
case CountryCodes.CzechRepublic:
|
|
281
|
-
return {
|
|
282
|
-
type: "czLocal",
|
|
283
|
-
accountNumber: payoutAccount.bankAccountNumber,
|
|
284
|
-
bankCode: payoutAccount.bankCode
|
|
285
|
-
};
|
|
286
|
-
case CountryCodes.Denmark:
|
|
287
|
-
return {
|
|
288
|
-
type: "dkLocal",
|
|
289
|
-
accountNumber: payoutAccount.bankAccountNumber,
|
|
290
|
-
bankCode: payoutAccount.bankCode
|
|
291
|
-
};
|
|
292
|
-
case CountryCodes.HongKong:
|
|
293
|
-
return {
|
|
294
|
-
type: "hkLocal",
|
|
295
|
-
accountNumber: payoutAccount.bankAccountNumber,
|
|
296
|
-
clearingCode: payoutAccount.bankCode
|
|
297
|
-
};
|
|
298
|
-
case CountryCodes.NewZealand:
|
|
299
|
-
return {
|
|
300
|
-
type: "nzLocal",
|
|
301
|
-
accountNumber: payoutAccount.bankAccountNumber?.replaceAll("-", "")
|
|
302
|
-
};
|
|
303
|
-
case CountryCodes.Sweden:
|
|
304
|
-
return {
|
|
305
|
-
type: "seLocal",
|
|
306
|
-
accountNumber: payoutAccount.bankAccountNumber,
|
|
307
|
-
clearingNumber: payoutAccount.branchCode
|
|
308
|
-
};
|
|
309
|
-
case CountryCodes.Singapore:
|
|
310
|
-
return {
|
|
311
|
-
type: "sgLocal",
|
|
312
|
-
accountNumber: payoutAccount.bankAccountNumber,
|
|
313
|
-
bic: payoutAccount.swiftCode
|
|
314
|
-
};
|
|
315
|
-
case CountryCodes.IsleOfMan:
|
|
316
|
-
case CountryCodes.Guernsey:
|
|
317
|
-
case CountryCodes.Gibraltar:
|
|
318
|
-
case CountryCodes.Jersey:
|
|
319
|
-
case CountryCodes.UnitedKingdom:
|
|
320
|
-
return {
|
|
321
|
-
type: "ukLocal",
|
|
322
|
-
// for some reason GB's account identification is called `ukLocalAccountIdentification`
|
|
323
|
-
accountNumber: payoutAccount.bankAccountNumber,
|
|
324
|
-
sortCode: payoutAccount.branchCode
|
|
325
|
-
};
|
|
326
|
-
case CountryCodes.NorthernMarianaIslands:
|
|
327
|
-
case CountryCodes.Guam:
|
|
328
|
-
case CountryCodes.VirginIslandsUS:
|
|
329
|
-
case CountryCodes.AmericanSamoa:
|
|
330
|
-
case CountryCodes.PuertoRico:
|
|
331
|
-
case CountryCodes.UnitedStates:
|
|
332
|
-
return {
|
|
333
|
-
type: "usLocal",
|
|
334
|
-
accountNumber: payoutAccount.bankAccountNumber,
|
|
335
|
-
routingNumber: payoutAccount.branchCode
|
|
336
|
-
};
|
|
337
|
-
default:
|
|
338
|
-
logger.log(`${bankCountry.toLowerCase()}Local is not a configured region`);
|
|
339
|
-
return {
|
|
340
|
-
type: `${bankCountry.toLowerCase()}Local`,
|
|
341
|
-
accountNumber: payoutAccount.bankAccountNumber
|
|
342
|
-
};
|
|
343
|
-
}
|
|
344
|
-
};
|
|
345
|
-
const mapPayoutAccountSchemaToApiBankAccount = (payoutAccount, bankCountry, preferredCurrency, enabledCrossBorderPayouts) => ({
|
|
346
|
-
accountIdentification: getAccountIdentificationFromPayoutAccountSchema(
|
|
347
|
-
payoutAccount,
|
|
348
|
-
bankCountry,
|
|
349
|
-
enabledCrossBorderPayouts
|
|
350
|
-
),
|
|
351
|
-
preferredCurrencyCode: preferredCurrency,
|
|
352
|
-
countryCode: bankCountry,
|
|
353
|
-
bankName: payoutAccount.bankName
|
|
354
|
-
});
|
|
355
|
-
const validateDocument = async (context, document) => {
|
|
356
|
-
const { baseUrl, rootLegalEntityId } = context;
|
|
357
|
-
return httpPost(
|
|
358
|
-
{
|
|
359
|
-
baseUrl,
|
|
360
|
-
path: `legalEntities/${rootLegalEntityId}/genai/classify`
|
|
361
|
-
},
|
|
362
|
-
document
|
|
363
|
-
);
|
|
364
|
-
};
|
|
365
|
-
const useValidateDocument = (options) => {
|
|
366
|
-
const { rootLegalEntityId, baseUrl } = useApiContext();
|
|
367
|
-
return useMutation({
|
|
368
|
-
mutationFn: (payload) => validateDocument(
|
|
369
|
-
{ rootLegalEntityId: rootLegalEntityId.value, baseUrl: baseUrl.value },
|
|
370
|
-
payload
|
|
371
|
-
),
|
|
372
|
-
retry: 0,
|
|
373
|
-
...options
|
|
374
|
-
});
|
|
375
|
-
};
|
|
376
|
-
function FilePicker({
|
|
377
|
-
files,
|
|
378
|
-
setFiles,
|
|
379
|
-
isValid,
|
|
380
|
-
errorMessage,
|
|
381
|
-
multiple = false,
|
|
382
|
-
label,
|
|
383
|
-
name,
|
|
384
|
-
iconPrefix = "generic-document",
|
|
385
|
-
enableTracking = false,
|
|
386
|
-
id,
|
|
387
|
-
loading,
|
|
388
|
-
// file validation options
|
|
389
|
-
allowedFileTypes,
|
|
390
|
-
maxSize,
|
|
391
|
-
isOptional,
|
|
392
|
-
maxNumberOfFiles,
|
|
393
|
-
// a11y
|
|
394
|
-
"aria-describedby": ariaDescribedBy,
|
|
395
|
-
"aria-labelledby": ariaLabelledBy
|
|
396
|
-
}) {
|
|
397
|
-
const { t } = useTranslation("ui");
|
|
398
|
-
const userEvents = useAnalyticsContext();
|
|
399
|
-
const fileInput = useRef(null);
|
|
400
|
-
const [dragged, setDragged] = useState(false);
|
|
401
|
-
const hasRequiredError = errorMessage === "fieldIsRequired";
|
|
402
|
-
const showDropzone = files.length < maxNumberOfFiles;
|
|
403
|
-
const openFilePicker = () => fileInput.current?.click();
|
|
404
|
-
const handleFileDelete = (fileToDelete) => {
|
|
405
|
-
setFiles(files.filter((file) => file !== fileToDelete));
|
|
406
|
-
};
|
|
407
|
-
const handleDragEnter = (e) => {
|
|
408
|
-
e.preventDefault();
|
|
409
|
-
e.stopPropagation();
|
|
410
|
-
};
|
|
411
|
-
const handleDragLeave = (e) => {
|
|
412
|
-
e.preventDefault();
|
|
413
|
-
e.stopPropagation();
|
|
414
|
-
setDragged(false);
|
|
415
|
-
};
|
|
416
|
-
const handleDragOver = (e) => {
|
|
417
|
-
e.preventDefault();
|
|
418
|
-
e.stopPropagation();
|
|
419
|
-
setDragged(true);
|
|
420
|
-
};
|
|
421
|
-
const handleDrop = (e) => {
|
|
422
|
-
e.preventDefault();
|
|
423
|
-
e.stopPropagation();
|
|
424
|
-
if (e.dataTransfer) addFiles(e.dataTransfer.files);
|
|
425
|
-
setDragged(false);
|
|
426
|
-
};
|
|
427
|
-
const handleFilesChosen = (e) => {
|
|
428
|
-
const fileInput2 = e.currentTarget;
|
|
429
|
-
if (fileInput2.files) addFiles(fileInput2.files);
|
|
430
|
-
};
|
|
431
|
-
const addFiles = (newFiles) => {
|
|
432
|
-
if (enableTracking) {
|
|
433
|
-
userEvents.addFieldEvent("Interacted with form field", {
|
|
434
|
-
actionType: "change",
|
|
435
|
-
field: name || "dropzone"
|
|
436
|
-
});
|
|
437
|
-
}
|
|
438
|
-
setFiles([...newFiles, ...files]);
|
|
439
|
-
};
|
|
440
|
-
const allowedFileTypesString = allowedFileTypes.join(", ");
|
|
441
|
-
return /* @__PURE__ */ jsxs("div", { children: [
|
|
442
|
-
label && /* @__PURE__ */ jsx(
|
|
443
|
-
"div",
|
|
444
|
-
{
|
|
445
|
-
className: cx("adyen-kyc-label__text", {
|
|
446
|
-
"adyen-kyc-label__text--error": hasRequiredError
|
|
447
|
-
}),
|
|
448
|
-
children: label
|
|
449
|
-
}
|
|
450
|
-
),
|
|
451
|
-
files.map((file) => /* @__PURE__ */ jsx(
|
|
452
|
-
DropzoneFile,
|
|
453
|
-
{
|
|
454
|
-
file,
|
|
455
|
-
onDelete: () => {
|
|
456
|
-
handleFileDelete(file);
|
|
457
|
-
},
|
|
458
|
-
errorMessage,
|
|
459
|
-
iconPrefix,
|
|
460
|
-
loading
|
|
461
|
-
},
|
|
462
|
-
file
|
|
463
|
-
)),
|
|
464
|
-
showDropzone && /* @__PURE__ */ jsxs(
|
|
465
|
-
"div",
|
|
466
|
-
{
|
|
467
|
-
role: "region",
|
|
468
|
-
className: cx("adyen-kyc-dropzone", {
|
|
469
|
-
"adyen-kyc-dropzone--dragged": dragged,
|
|
470
|
-
"adyen-kyc-dropzone--error": !dragged && hasRequiredError
|
|
471
|
-
}),
|
|
472
|
-
onDrop: handleDrop,
|
|
473
|
-
onDragOver: handleDragOver,
|
|
474
|
-
onDragEnter: handleDragEnter,
|
|
475
|
-
onDragLeave: handleDragLeave,
|
|
476
|
-
children: [
|
|
477
|
-
/* @__PURE__ */ jsx("div", { className: "adyen-kyc-dropzone__icon", children: /* @__PURE__ */ jsx(Icon, { name: "upload" }) }),
|
|
478
|
-
/* @__PURE__ */ jsxs("div", { className: "adyen-kyc-dropzone__labels", children: [
|
|
479
|
-
/* @__PURE__ */ jsx(Typography, { el: "h4", variant: "body-strongest", children: t(($) => $["dropFileToUpload"]) }),
|
|
480
|
-
/* @__PURE__ */ jsx(Typography, { color: "secondary", children: t(($) => $["supportedFileTypes"], { fileTypes: allowedFileTypesString }) }),
|
|
481
|
-
/* @__PURE__ */ jsx(Typography, { color: "secondary", children: t(($) => $["maxFileSize"], { maxSize: bytesToSize(maxSize) }) }),
|
|
482
|
-
/* @__PURE__ */ jsx(Typography, { color: "secondary", children: t(($) => $["upToFiles"], { maxFiles: maxNumberOfFiles }) })
|
|
483
|
-
] }),
|
|
484
|
-
/* @__PURE__ */ jsx("div", { className: "adyen-kyc-dropzone__button", children: /* @__PURE__ */ jsx(Button, { onClick: openFilePicker, variant: "secondary", children: t(($) => $["browseFiles"]) }) }),
|
|
485
|
-
/* @__PURE__ */ jsx(
|
|
486
|
-
"input",
|
|
487
|
-
{
|
|
488
|
-
id,
|
|
489
|
-
className: "adyen-kyc-dropzone__input",
|
|
490
|
-
ref: fileInput,
|
|
491
|
-
multiple,
|
|
492
|
-
accept: allowedFileTypesString,
|
|
493
|
-
onChange: handleFilesChosen,
|
|
494
|
-
type: "file",
|
|
495
|
-
"aria-required": !isOptional,
|
|
496
|
-
"aria-describedby": ariaDescribedBy,
|
|
497
|
-
"aria-labelledby": ariaLabelledBy,
|
|
498
|
-
"data-testid": "hidden-file-input",
|
|
499
|
-
"aria-invalid": !isValid
|
|
500
|
-
}
|
|
501
|
-
)
|
|
502
|
-
]
|
|
503
|
-
}
|
|
504
|
-
),
|
|
505
|
-
hasRequiredError && /* @__PURE__ */ jsx("div", { className: "adyen-kyc-error-text", children: t(($) => $["fieldIsRequired"]) })
|
|
506
|
-
] });
|
|
507
|
-
}
|
|
508
|
-
const bankDocumentClassification = "adyen-kyc-bank-document-classification";
|
|
509
|
-
const requirementsList = "adyen-kyc-requirements-list";
|
|
510
|
-
const filePickerDisabled = "adyen-kyc-file-picker-disabled";
|
|
511
|
-
const reviewModal = "adyen-kyc-review-modal";
|
|
512
|
-
const preview = "adyen-kyc-preview";
|
|
513
|
-
const previewImage = "adyen-kyc-preview-image";
|
|
514
|
-
const content = "adyen-kyc-content";
|
|
515
|
-
const actions = "adyen-kyc-actions";
|
|
516
|
-
const title$1 = "adyen-kyc-title";
|
|
517
|
-
const description = "adyen-kyc-description";
|
|
518
|
-
const issues = "adyen-kyc-issues";
|
|
519
|
-
const confirmationModal = "adyen-kyc-confirmation-modal";
|
|
520
|
-
const styles$3 = {
|
|
521
|
-
bankDocumentClassification,
|
|
522
|
-
requirementsList,
|
|
523
|
-
filePickerDisabled,
|
|
524
|
-
reviewModal,
|
|
525
|
-
preview,
|
|
526
|
-
previewImage,
|
|
527
|
-
content,
|
|
528
|
-
actions,
|
|
529
|
-
title: title$1,
|
|
530
|
-
description,
|
|
531
|
-
issues,
|
|
532
|
-
confirmationModal
|
|
533
|
-
};
|
|
534
|
-
const bankDocumentValidationRules = {
|
|
535
|
-
description: {
|
|
536
|
-
modes: ["blur"],
|
|
537
|
-
validate: (description2) => description2 ? bankStatementDescriptionPattern.test(description2) : true,
|
|
538
|
-
errorMessage: "invalidFormatBankStatementDescription"
|
|
539
|
-
}
|
|
540
|
-
};
|
|
541
|
-
const getValidationIssuesKeys = (validationResponse) => {
|
|
542
|
-
const issues2 = [];
|
|
543
|
-
const { blurryOrLowQuality, documentType } = validationResponse;
|
|
544
|
-
if (blurryOrLowQuality) {
|
|
545
|
-
issues2.push("documentIsntReadable");
|
|
546
|
-
}
|
|
547
|
-
if (documentType === "other" || documentType !== "bankDocument") {
|
|
548
|
-
issues2.push("documentIsNotBankDocument");
|
|
549
|
-
}
|
|
550
|
-
if (!documentType || documentType === "other") {
|
|
551
|
-
issues2.push("documentNameMissing");
|
|
552
|
-
}
|
|
553
|
-
return issues2;
|
|
554
|
-
};
|
|
555
|
-
const CHARACTERS_LIMIT = 200;
|
|
556
|
-
const bankDocumentClassificationFields = [
|
|
557
|
-
"bankStatementDocument",
|
|
558
|
-
"description"
|
|
559
|
-
];
|
|
560
|
-
function BankDocumentClassification(props) {
|
|
561
|
-
const {
|
|
562
|
-
legalEntity,
|
|
563
|
-
optionalFields,
|
|
564
|
-
validators,
|
|
565
|
-
data: bankData,
|
|
566
|
-
id,
|
|
567
|
-
formIsActive,
|
|
568
|
-
fieldValidationErrors,
|
|
569
|
-
formVerificationErrors,
|
|
570
|
-
shouldValidate,
|
|
571
|
-
country,
|
|
572
|
-
handleFieldChange,
|
|
573
|
-
valid: propValid,
|
|
574
|
-
errors: propErrors
|
|
575
|
-
} = props;
|
|
576
|
-
const { t } = useTranslation("banking");
|
|
577
|
-
const { t: commonT } = useTranslation("common");
|
|
578
|
-
const stateRef = useRef$1({ setState: null });
|
|
579
|
-
const [showReviewModal, setShowReviewModal] = useState$1(false);
|
|
580
|
-
const [showConfirmationModal, setShowConfirmationModal] = useState$1(false);
|
|
581
|
-
const [validationResponse, setValidationResponse] = useState$1(
|
|
582
|
-
null
|
|
583
|
-
);
|
|
584
|
-
const [showEndState, setShowEndState] = useState$1(false);
|
|
585
|
-
const inputRef = useRef$1(null);
|
|
586
|
-
const logger2 = createLogger();
|
|
587
|
-
const userEvents = useAnalyticsContext();
|
|
588
|
-
const isBankStatementOptional = optionalFields?.includes("bankStatementDocument") ?? false;
|
|
589
|
-
const formUtils = createFormUtils(props, commonT);
|
|
590
|
-
const { isFeatureEnabled } = useToggleContext();
|
|
591
|
-
const enableBankDocumentClassification = isFeatureEnabled(
|
|
592
|
-
FeatureNames.EnableBankDocumentClassification
|
|
593
|
-
);
|
|
594
|
-
const isShadowMode = isFeatureEnabled(FeatureNames.EnableBankDocumentClassificationShadowMode);
|
|
595
|
-
const bankStatementValidationOptions = useMemo(
|
|
596
|
-
() => ({
|
|
597
|
-
...defaultFileValidationOptions,
|
|
598
|
-
isOptional: isBankStatementOptional
|
|
599
|
-
}),
|
|
600
|
-
[isBankStatementOptional]
|
|
601
|
-
);
|
|
602
|
-
const rules2 = useMemo(
|
|
603
|
-
() => ({
|
|
604
|
-
...validators || bankDocumentValidationRules,
|
|
605
|
-
bankStatementDocument: fileValidationRules(bankStatementValidationOptions)
|
|
606
|
-
}),
|
|
607
|
-
[bankStatementValidationOptions, validators]
|
|
608
|
-
);
|
|
609
|
-
const localForm = useForm({
|
|
610
|
-
...props,
|
|
611
|
-
schema: bankDocumentClassificationFields,
|
|
612
|
-
defaultData: bankData,
|
|
613
|
-
rules: rules2,
|
|
614
|
-
fieldProblems: fieldValidationErrors,
|
|
615
|
-
shouldValidate
|
|
616
|
-
});
|
|
617
|
-
const useMultiFormMode = !!handleFieldChange;
|
|
618
|
-
const data = useMultiFormMode ? bankData : localForm.data;
|
|
619
|
-
const valid = useMultiFormMode ? propValid : localForm.valid;
|
|
620
|
-
const errors = useMultiFormMode ? propErrors : localForm.errors;
|
|
621
|
-
const fieldProblems = useMultiFormMode ? fieldValidationErrors : localForm.fieldProblems;
|
|
622
|
-
const handleChange = useMultiFormMode ? handleFieldChange : localForm.handleChangeFor;
|
|
623
|
-
const { triggerValidation, setData } = localForm;
|
|
624
|
-
const validateDocumentMutation = useValidateDocument({
|
|
625
|
-
onSuccess: (response) => {
|
|
626
|
-
userEvents.addEvent("Success", {
|
|
627
|
-
actionType: "upload",
|
|
628
|
-
actionLevel: "journey",
|
|
629
|
-
label: isShadowMode ? "bankDocumentClassificationShadowMode" : "bankDocumentClassification",
|
|
630
|
-
additionalData: {
|
|
631
|
-
documentType: response?.documentType,
|
|
632
|
-
subDocumentType: response?.subDocumentType,
|
|
633
|
-
blurryOrLowQuality: response?.blurryOrLowQuality
|
|
634
|
-
}
|
|
635
|
-
});
|
|
636
|
-
if (isShadowMode) return;
|
|
637
|
-
setValidationResponse(response);
|
|
638
|
-
if (response?.blurryOrLowQuality || response?.documentType !== "bankDocument") {
|
|
639
|
-
userEvents.addEvent("Opened modal", {
|
|
640
|
-
actionType: "open",
|
|
641
|
-
actionLevel: "journey",
|
|
642
|
-
label: "bankDocumentClassification"
|
|
643
|
-
});
|
|
644
|
-
setShowReviewModal(true);
|
|
645
|
-
} else {
|
|
646
|
-
setShowEndState(true);
|
|
647
|
-
setTimeout(() => {
|
|
648
|
-
setShowEndState(false);
|
|
649
|
-
setShowReviewModal(false);
|
|
650
|
-
}, 2e3);
|
|
651
|
-
}
|
|
652
|
-
},
|
|
653
|
-
onError: (error) => {
|
|
654
|
-
userEvents.addEvent("Encountered error", {
|
|
655
|
-
actionType: "upload",
|
|
656
|
-
actionLevel: "journey",
|
|
657
|
-
label: isShadowMode ? "bankDocumentClassificationShadowMode" : "bankDocumentClassification"
|
|
658
|
-
});
|
|
659
|
-
if (isShadowMode) return;
|
|
660
|
-
logger2.error("Document validation failed:", error);
|
|
661
|
-
setShowReviewModal(false);
|
|
662
|
-
setValidationResponse(null);
|
|
663
|
-
}
|
|
664
|
-
});
|
|
665
|
-
const handleDocumentUpload = async (files) => {
|
|
666
|
-
handleChange("bankStatementDocument")(files);
|
|
667
|
-
if (!useMultiFormMode) {
|
|
668
|
-
triggerValidation();
|
|
669
|
-
}
|
|
670
|
-
if (!enableBankDocumentClassification && !isShadowMode) return;
|
|
671
|
-
if (files.length > 0) {
|
|
672
|
-
const file = files[0];
|
|
673
|
-
if (file && file instanceof File) {
|
|
674
|
-
try {
|
|
675
|
-
const base64Content = await fileToBase64(file);
|
|
676
|
-
const document = {
|
|
677
|
-
documentType: "bankStatement",
|
|
678
|
-
fileName: file.name,
|
|
679
|
-
sessionId: legalEntity.id,
|
|
680
|
-
attachments: [
|
|
681
|
-
{
|
|
682
|
-
content: base64Content,
|
|
683
|
-
pageName: file.name
|
|
684
|
-
}
|
|
685
|
-
]
|
|
686
|
-
};
|
|
687
|
-
validateDocumentMutation.mutate(document);
|
|
688
|
-
} catch (error) {
|
|
689
|
-
logger2.error("Error processing document:", error);
|
|
690
|
-
}
|
|
691
|
-
}
|
|
692
|
-
}
|
|
693
|
-
};
|
|
694
|
-
useEffect$1(() => {
|
|
695
|
-
if (!useMultiFormMode && formIsActive && isBankStatementOptional) {
|
|
696
|
-
triggerValidation();
|
|
697
|
-
}
|
|
698
|
-
}, [formIsActive, isBankStatementOptional, triggerValidation, useMultiFormMode]);
|
|
699
|
-
const alreadyUploadedDocuments = useMemo(
|
|
700
|
-
() => bankData?.bankStatementDocument ?? [],
|
|
701
|
-
[bankData?.bankStatementDocument]
|
|
702
|
-
);
|
|
703
|
-
useEffect$1(() => {
|
|
704
|
-
if (!useMultiFormMode && alreadyUploadedDocuments.length > 0) {
|
|
705
|
-
setData("bankStatementDocument", alreadyUploadedDocuments);
|
|
706
|
-
if (bankData?.description) setData("description", bankData.description);
|
|
707
|
-
triggerValidation();
|
|
708
|
-
}
|
|
709
|
-
}, [
|
|
710
|
-
alreadyUploadedDocuments,
|
|
711
|
-
bankData?.description,
|
|
712
|
-
setData,
|
|
713
|
-
triggerValidation,
|
|
714
|
-
useMultiFormMode
|
|
715
|
-
]);
|
|
716
|
-
useEffect$1(() => {
|
|
717
|
-
if (!useMultiFormMode) {
|
|
718
|
-
stateRef.current?.setState?.({
|
|
719
|
-
type: "addToState",
|
|
720
|
-
value: {
|
|
721
|
-
data,
|
|
722
|
-
valid,
|
|
723
|
-
errors,
|
|
724
|
-
fieldProblems,
|
|
725
|
-
dataStoreId: id,
|
|
726
|
-
schema: bankDocumentClassificationFields
|
|
727
|
-
}
|
|
728
|
-
});
|
|
729
|
-
}
|
|
730
|
-
}, [data, valid, errors, fieldProblems, id, useMultiFormMode]);
|
|
731
|
-
const handleUploadNewDocument = () => {
|
|
732
|
-
userEvents.addEvent("Clicked button", {
|
|
733
|
-
actionType: "next",
|
|
734
|
-
actionLevel: "journey",
|
|
735
|
-
label: "bankDocumentClassificationUploadNewDocument"
|
|
736
|
-
});
|
|
737
|
-
inputRef.current?.click();
|
|
738
|
-
};
|
|
739
|
-
const handleContinueAnyway = () => {
|
|
740
|
-
setShowConfirmationModal(true);
|
|
741
|
-
};
|
|
742
|
-
const handleConfirmationCancel = () => {
|
|
743
|
-
setShowConfirmationModal(false);
|
|
744
|
-
};
|
|
745
|
-
const handleUseDocument = () => {
|
|
746
|
-
setShowConfirmationModal(false);
|
|
747
|
-
setShowReviewModal(false);
|
|
748
|
-
userEvents.addEvent("Clicked button", {
|
|
749
|
-
actionType: "next",
|
|
750
|
-
actionLevel: "journey",
|
|
751
|
-
label: "bankDocumentClassificationContinueAnyway"
|
|
752
|
-
});
|
|
753
|
-
};
|
|
754
|
-
const documentPreview = useMemo(() => {
|
|
755
|
-
if (!data?.bankStatementDocument?.[0] || !showReviewModal) return null;
|
|
756
|
-
const file = data.bankStatementDocument?.[0];
|
|
757
|
-
return file.type === "application/pdf" || file.name.toLowerCase().endsWith(".pdf") ? /* @__PURE__ */ jsx(
|
|
758
|
-
"object",
|
|
759
|
-
{
|
|
760
|
-
width: "100%",
|
|
761
|
-
height: "100%",
|
|
762
|
-
data: URL.createObjectURL(file),
|
|
763
|
-
type: "application/pdf",
|
|
764
|
-
"aria-label": t(($) => $["reviewDocument"]),
|
|
765
|
-
"data-testid": "pdf-preview"
|
|
766
|
-
}
|
|
767
|
-
) : /* @__PURE__ */ jsx("img", { src: URL.createObjectURL(file), alt: t(($) => $["reviewDocument"]) });
|
|
768
|
-
}, [data?.bankStatementDocument, showReviewModal, t]);
|
|
769
|
-
return /* @__PURE__ */ jsxs("div", { className: styles$3.bankDocumentPage, children: [
|
|
770
|
-
/* @__PURE__ */ jsxs("form", { className: styles$3.bankDocumentClassification, children: [
|
|
771
|
-
!useMultiFormMode && /* @__PURE__ */ jsx(StateContextSetter, { owner: id, stateRef }),
|
|
772
|
-
/* @__PURE__ */ jsx(
|
|
773
|
-
Header,
|
|
774
|
-
{
|
|
775
|
-
title: t(
|
|
776
|
-
($) => $[isBankStatementOptional ? "uploadABankDocumentOptional" : "uploadABankDocument"]
|
|
777
|
-
),
|
|
778
|
-
description: t(($) => $["toVerifyYourBankAccountDetails"])
|
|
779
|
-
}
|
|
780
|
-
),
|
|
781
|
-
/* @__PURE__ */ jsx(
|
|
782
|
-
ErrorPanel,
|
|
783
|
-
{
|
|
784
|
-
verificationErrors: formVerificationErrors,
|
|
785
|
-
validationErrors: fieldValidationErrors,
|
|
786
|
-
formUtils,
|
|
787
|
-
id: "ariaErrorField"
|
|
788
|
-
}
|
|
789
|
-
),
|
|
790
|
-
/* @__PURE__ */ jsxs("div", { children: [
|
|
791
|
-
/* @__PURE__ */ jsx("h3", { className: styles$3.requirementsList, children: t(($) => $["makeSureYourDocumentIncludes"]) }),
|
|
792
|
-
/* @__PURE__ */ jsxs("ul", { className: styles$3.requirementsList, children: [
|
|
793
|
-
/* @__PURE__ */ jsx("li", { children: t(($) => $["documentRequirementNameOrBusiness"]) }),
|
|
794
|
-
/* @__PURE__ */ jsx("li", { children: t(($) => $[`documentRequirementAccountNumber${country === "US" ? "Partial" : ""}`]) }),
|
|
795
|
-
/* @__PURE__ */ jsx("li", { children: t(($) => $["documentRequirementBankInfo"]) }),
|
|
796
|
-
/* @__PURE__ */ jsx("li", { children: t(($) => $["documentRequirementReadableText"]) })
|
|
797
|
-
] })
|
|
798
|
-
] }),
|
|
799
|
-
/* @__PURE__ */ jsx(
|
|
800
|
-
Field,
|
|
801
|
-
{
|
|
802
|
-
className: cx("adyen-kyc-upload-field"),
|
|
803
|
-
name: "bankStatementDocument",
|
|
804
|
-
isValid: valid?.bankStatementDocument ?? true,
|
|
805
|
-
children: (childProps) => /* @__PURE__ */ jsx(
|
|
806
|
-
"div",
|
|
807
|
-
{
|
|
808
|
-
className: validateDocumentMutation.isPending && !isShadowMode ? styles$3.filePickerDisabled : "",
|
|
809
|
-
children: /* @__PURE__ */ jsx(
|
|
810
|
-
FilePicker,
|
|
811
|
-
{
|
|
812
|
-
...childProps,
|
|
813
|
-
name: "bankStatementDocument",
|
|
814
|
-
files: data?.bankStatementDocument ?? [],
|
|
815
|
-
setFiles: handleDocumentUpload,
|
|
816
|
-
isValid: valid?.bankStatementDocument ?? isBankStatementOptional,
|
|
817
|
-
errorMessage: errors?.bankStatementDocument?.errorMessage,
|
|
818
|
-
loading: validateDocumentMutation.isPending && !isShadowMode,
|
|
819
|
-
...bankStatementValidationOptions
|
|
820
|
-
}
|
|
821
|
-
)
|
|
822
|
-
}
|
|
823
|
-
)
|
|
824
|
-
}
|
|
825
|
-
),
|
|
826
|
-
data?.bankStatementDocument?.length ? /* @__PURE__ */ jsx(
|
|
827
|
-
Field,
|
|
828
|
-
{
|
|
829
|
-
className: "adyen-kyc-document-description",
|
|
830
|
-
name: "description",
|
|
831
|
-
label: formUtils.getLabel("bankDocumentFileDescription"),
|
|
832
|
-
errorMessage: formUtils.getErrorMessage("description", errors, fieldProblems),
|
|
833
|
-
isValid: valid?.description,
|
|
834
|
-
children: (childProps) => /* @__PURE__ */ jsx(
|
|
835
|
-
TextArea,
|
|
836
|
-
{
|
|
837
|
-
...childProps,
|
|
838
|
-
name: "description",
|
|
839
|
-
value: data?.description,
|
|
840
|
-
maxLength: CHARACTERS_LIMIT,
|
|
841
|
-
onInput: handleChange("description"),
|
|
842
|
-
"aria-invalid": valid?.description === false
|
|
843
|
-
}
|
|
844
|
-
)
|
|
845
|
-
}
|
|
846
|
-
) : void 0
|
|
847
|
-
] }),
|
|
848
|
-
showReviewModal && /* @__PURE__ */ jsx(
|
|
849
|
-
Modal,
|
|
850
|
-
{
|
|
851
|
-
ariaLabel: t(($) => $["reviewDocument"]),
|
|
852
|
-
size: showEndState ? "small" : "medium",
|
|
853
|
-
inset: showEndState,
|
|
854
|
-
showCloseButton: !showEndState,
|
|
855
|
-
onClose: !showEndState ? handleContinueAnyway : void 0,
|
|
856
|
-
children: showEndState ? /* @__PURE__ */ jsx(EndStateLayout, { title: t(($) => $["documentUploaded"]) }) : /* @__PURE__ */ jsxs("div", { className: styles$3.reviewModal, children: [
|
|
857
|
-
/* @__PURE__ */ jsx("div", { className: styles$3.preview, children: /* @__PURE__ */ jsx("div", { className: styles$3.previewImage, children: documentPreview }) }),
|
|
858
|
-
/* @__PURE__ */ jsxs("div", { className: styles$3.content, children: [
|
|
859
|
-
/* @__PURE__ */ jsx("h2", { className: styles$3.title, children: t(($) => $["reviewDocument"]) }),
|
|
860
|
-
/* @__PURE__ */ jsx("p", { className: styles$3.description, children: t(($) => $["reviewDocumentDescription"]) }),
|
|
861
|
-
/* @__PURE__ */ jsx("ul", { className: styles$3.issues, children: validationResponse && getValidationIssuesKeys(validationResponse).map((issue, index) => /* @__PURE__ */ jsx("li", { children: t(($) => $[issue]) }, index)) }),
|
|
862
|
-
/* @__PURE__ */ jsxs("div", { className: styles$3.actions, children: [
|
|
863
|
-
/* @__PURE__ */ jsx(
|
|
864
|
-
Button,
|
|
865
|
-
{
|
|
866
|
-
variant: "secondary",
|
|
867
|
-
disabled: validateDocumentMutation.isPending,
|
|
868
|
-
onClick: handleContinueAnyway,
|
|
869
|
-
children: commonT(($) => $["continue"])
|
|
870
|
-
}
|
|
871
|
-
),
|
|
872
|
-
/* @__PURE__ */ jsx(
|
|
873
|
-
Button,
|
|
874
|
-
{
|
|
875
|
-
loading: validateDocumentMutation.isPending,
|
|
876
|
-
variant: "primary",
|
|
877
|
-
onClick: handleUploadNewDocument,
|
|
878
|
-
children: t(($) => $["uploadNewDocument"])
|
|
879
|
-
}
|
|
880
|
-
)
|
|
881
|
-
] })
|
|
882
|
-
] })
|
|
883
|
-
] })
|
|
884
|
-
}
|
|
885
|
-
),
|
|
886
|
-
showConfirmationModal && /* @__PURE__ */ jsx(
|
|
887
|
-
Modal,
|
|
888
|
-
{
|
|
889
|
-
ariaLabel: t(($) => $["useThisDocument"]),
|
|
890
|
-
size: "small",
|
|
891
|
-
onClose: handleConfirmationCancel,
|
|
892
|
-
children: /* @__PURE__ */ jsxs("div", { className: styles$3.confirmationModal, children: [
|
|
893
|
-
/* @__PURE__ */ jsx("h2", { className: styles$3.title, children: t(($) => $["useThisDocument"]) }),
|
|
894
|
-
/* @__PURE__ */ jsx("p", { className: styles$3.description, children: t(($) => $["thisDocumentNeedstoBeReviewedManually"]) }),
|
|
895
|
-
/* @__PURE__ */ jsxs("div", { className: styles$3.actions, children: [
|
|
896
|
-
/* @__PURE__ */ jsx(Button, { variant: "secondary", onClick: handleConfirmationCancel, children: commonT(($) => $["cancel"]) }),
|
|
897
|
-
/* @__PURE__ */ jsx(Button, { variant: "primary", onClick: handleUseDocument, children: t(($) => $["useDocument"]) })
|
|
898
|
-
] })
|
|
899
|
-
] })
|
|
900
|
-
}
|
|
901
|
-
),
|
|
902
|
-
/* @__PURE__ */ jsx(
|
|
903
|
-
"input",
|
|
904
|
-
{
|
|
905
|
-
id,
|
|
906
|
-
ref: inputRef,
|
|
907
|
-
className: "adyen-kyc-dropzone__input",
|
|
908
|
-
onChange: (e) => {
|
|
909
|
-
const fileInput = e.currentTarget;
|
|
910
|
-
if (fileInput?.files?.length) handleDocumentUpload([...fileInput.files]);
|
|
911
|
-
},
|
|
912
|
-
type: "file",
|
|
913
|
-
accept: defaultFileValidationOptions.allowedFileTypes.join(", ")
|
|
914
|
-
}
|
|
915
|
-
)
|
|
916
|
-
] });
|
|
917
|
-
}
|
|
918
|
-
const MemoizedBankDocumentClassification = memo(
|
|
919
|
-
BankDocumentClassification,
|
|
920
|
-
(prevProps, nextProps) => objectsDeepEqual(prevProps.requiredFields, nextProps.requiredFields) && objectsDeepEqual(prevProps.optionalFields, nextProps.optionalFields) && objectsDeepEqual(prevProps.data, nextProps.data) && objectsDeepEqual(prevProps.formVerificationErrors, nextProps.formVerificationErrors) && objectsDeepEqual(prevProps.fieldValidationErrors, nextProps.fieldValidationErrors) && prevProps.country === nextProps.country && prevProps.shouldValidate === nextProps.shouldValidate && prevProps.formIsActive === nextProps.formIsActive
|
|
921
|
-
);
|
|
922
|
-
const bankVerificationValidationRules = {
|
|
923
|
-
verifiedAccountHolder: {
|
|
924
|
-
modes: ["blur"],
|
|
925
|
-
validate: (verifiedAccountHolder) => !isEmpty(verifiedAccountHolder),
|
|
926
|
-
errorMessage: "fieldIsRequired"
|
|
927
|
-
},
|
|
928
|
-
verifiedBankCountry: {
|
|
929
|
-
modes: ["blur"],
|
|
930
|
-
validate: (verifiedBankCountry) => !isEmpty(verifiedBankCountry),
|
|
931
|
-
errorMessage: "fieldIsRequired"
|
|
932
|
-
},
|
|
933
|
-
verifiedBankName: {
|
|
934
|
-
modes: ["blur"],
|
|
935
|
-
validate: (verifiedBankName) => !isEmpty(verifiedBankName),
|
|
936
|
-
errorMessage: "fieldIsRequired"
|
|
937
|
-
},
|
|
938
|
-
verifiedCurrencyCode: {
|
|
939
|
-
modes: ["blur"],
|
|
940
|
-
validate: (verifiedCurrencyCode) => !isEmpty(verifiedCurrencyCode),
|
|
941
|
-
errorMessage: "fieldIsRequired"
|
|
942
|
-
},
|
|
943
|
-
verifiedBankAccountNumber: {
|
|
944
|
-
modes: ["blur"],
|
|
945
|
-
validate: (verifiedBankAccountNumber) => !isEmpty(verifiedBankAccountNumber),
|
|
946
|
-
errorMessage: "fieldIsRequired"
|
|
947
|
-
}
|
|
948
|
-
};
|
|
949
|
-
const handleBankVerificationError = async (legalEntityId, baseUrl, bankVerificationErrorParams) => {
|
|
950
|
-
return httpPost(
|
|
951
|
-
{
|
|
952
|
-
baseUrl,
|
|
953
|
-
path: `legalEntities/${legalEntityId}/transferInstruments/trusted/error`
|
|
954
|
-
},
|
|
955
|
-
bankVerificationErrorParams
|
|
956
|
-
);
|
|
957
|
-
};
|
|
958
|
-
const useHandleBankVerificationError = (options) => {
|
|
959
|
-
const { rootLegalEntityId, baseUrl } = useApiContext();
|
|
960
|
-
return useMutation({
|
|
961
|
-
mutationFn: (params) => handleBankVerificationError(rootLegalEntityId.value, baseUrl.value, params),
|
|
962
|
-
...options
|
|
963
|
-
});
|
|
964
|
-
};
|
|
965
|
-
const VerificationWidgetCallbackActions = {
|
|
966
|
-
HANDLE_EXCEPTION: "handle_exception",
|
|
967
|
-
VERIFICATION_SUCCESS: "verification_success",
|
|
968
|
-
RETRY_VERIFICATION: "retry_verification",
|
|
969
|
-
HANDLE_EVENT: "handle_event"
|
|
970
|
-
};
|
|
971
|
-
const WIDGET_CONTAINER_CLASS = `adyen-kyc-bank-verification-widget-container`;
|
|
972
|
-
function BankVerificationOverlay({
|
|
973
|
-
url,
|
|
974
|
-
setBankVerificationError,
|
|
975
|
-
onBack,
|
|
976
|
-
retrieveBankAccountInfo,
|
|
977
|
-
createTrustedTransferInstrument: createTrustedTransferInstrument2,
|
|
978
|
-
providerName
|
|
979
|
-
}) {
|
|
980
|
-
const { t } = useTranslation("banking");
|
|
981
|
-
const userEvents = useAnalyticsContext();
|
|
982
|
-
const widgetContainerRef = useRef(null);
|
|
983
|
-
const { mutateAsync: handleBankVerificationError2 } = useHandleBankVerificationError();
|
|
984
|
-
const trackVerificationError = (returnValue) => {
|
|
985
|
-
userEvents.addPageEvent("Encountered error", {
|
|
986
|
-
actionType: "add",
|
|
987
|
-
returnType: "sdk error",
|
|
988
|
-
returnValue,
|
|
989
|
-
additionalData: {
|
|
990
|
-
providerName
|
|
991
|
-
}
|
|
992
|
-
});
|
|
993
|
-
};
|
|
994
|
-
const DEFAULT_ERROR = {
|
|
995
|
-
error: "UNKNOWN_ERROR",
|
|
996
|
-
message: t(($) => $["weCouldntCompleteTheAccountCheck"])
|
|
997
|
-
};
|
|
998
|
-
useEffect(() => {
|
|
999
|
-
setBankVerificationError(null);
|
|
1000
|
-
}, [setBankVerificationError]);
|
|
1001
|
-
const widgetCallback = useCallback(
|
|
1002
|
-
(payload) => {
|
|
1003
|
-
const errorContent = t(($) => $["tryAgainOrManualAccountDetails"]);
|
|
1004
|
-
switch (payload.action) {
|
|
1005
|
-
case VerificationWidgetCallbackActions.HANDLE_EXCEPTION: {
|
|
1006
|
-
let errorTitle;
|
|
1007
|
-
const { err } = payload;
|
|
1008
|
-
switch (!(err instanceof Error) && err?.error) {
|
|
1009
|
-
case "USER_CANCELLED":
|
|
1010
|
-
errorTitle = "";
|
|
1011
|
-
break;
|
|
1012
|
-
case "CONNECTION_ERROR":
|
|
1013
|
-
errorTitle = t(($) => $["couldNotEstablishBankConnection"]);
|
|
1014
|
-
break;
|
|
1015
|
-
case "GENERIC_ERROR":
|
|
1016
|
-
errorTitle = t(($) => $["ranIntoTechnicalError"]);
|
|
1017
|
-
break;
|
|
1018
|
-
case "UNKNOWN_ERROR":
|
|
1019
|
-
default: {
|
|
1020
|
-
errorTitle = t(($) => $["couldNotCompleteAccountCheck"]);
|
|
1021
|
-
break;
|
|
1022
|
-
}
|
|
1023
|
-
}
|
|
1024
|
-
if (errorTitle) {
|
|
1025
|
-
setBankVerificationError({ title: errorTitle, content: errorContent });
|
|
1026
|
-
}
|
|
1027
|
-
showInstantVerificationPayoutModal.value = false;
|
|
1028
|
-
onBack?.();
|
|
1029
|
-
break;
|
|
1030
|
-
}
|
|
1031
|
-
case VerificationWidgetCallbackActions.RETRY_VERIFICATION:
|
|
1032
|
-
setBankVerificationError({
|
|
1033
|
-
title: t(($) => $["failedInitializeInstantVerification"]),
|
|
1034
|
-
content: errorContent
|
|
1035
|
-
});
|
|
1036
|
-
onBack?.();
|
|
1037
|
-
break;
|
|
1038
|
-
case VerificationWidgetCallbackActions.HANDLE_EVENT: {
|
|
1039
|
-
const { name, provider } = payload.event;
|
|
1040
|
-
if (name === "institution_selected" && provider === "plaid") {
|
|
1041
|
-
widgetContainerRef.current?.classList.add(`${WIDGET_CONTAINER_CLASS}--plaid-modal`);
|
|
1042
|
-
}
|
|
1043
|
-
break;
|
|
1044
|
-
}
|
|
1045
|
-
case VerificationWidgetCallbackActions.VERIFICATION_SUCCESS: {
|
|
1046
|
-
const { accounts } = payload.result;
|
|
1047
|
-
if (accounts) retrieveBankAccountInfo(accounts[0]);
|
|
1048
|
-
}
|
|
1049
|
-
}
|
|
1050
|
-
},
|
|
1051
|
-
[t, retrieveBankAccountInfo, onBack, setBankVerificationError]
|
|
1052
|
-
);
|
|
1053
|
-
useEffect(() => {
|
|
1054
|
-
const container = widgetContainerRef.current;
|
|
1055
|
-
if (!container) return;
|
|
1056
|
-
const openBanking = OpenBankingSDK.create({
|
|
1057
|
-
divElement: container,
|
|
1058
|
-
link: url,
|
|
1059
|
-
successHandler: (code, state) => {
|
|
1060
|
-
createTrustedTransferInstrument2?.(code, state).then((res) => {
|
|
1061
|
-
userEvents.addPageEvent("Success", {
|
|
1062
|
-
actionType: "add",
|
|
1063
|
-
additionalData: {
|
|
1064
|
-
providerName
|
|
1065
|
-
}
|
|
1066
|
-
});
|
|
1067
|
-
if (res) {
|
|
1068
|
-
widgetCallback({
|
|
1069
|
-
action: VerificationWidgetCallbackActions.VERIFICATION_SUCCESS,
|
|
1070
|
-
result: res
|
|
1071
|
-
});
|
|
1072
|
-
}
|
|
1073
|
-
}).catch(() => {
|
|
1074
|
-
trackVerificationError(DEFAULT_ERROR.error);
|
|
1075
|
-
widgetCallback({
|
|
1076
|
-
action: VerificationWidgetCallbackActions.HANDLE_EXCEPTION,
|
|
1077
|
-
err: DEFAULT_ERROR
|
|
1078
|
-
});
|
|
1079
|
-
});
|
|
1080
|
-
},
|
|
1081
|
-
errorHandler: (errorCode, errorMessage, state, metadata) => {
|
|
1082
|
-
trackVerificationError(errorCode);
|
|
1083
|
-
handleBankVerificationError2?.({
|
|
1084
|
-
errorCode,
|
|
1085
|
-
errorMessage,
|
|
1086
|
-
state,
|
|
1087
|
-
metadata: metadata && Object.fromEntries(metadata)
|
|
1088
|
-
}).then(
|
|
1089
|
-
(error) => widgetCallback({
|
|
1090
|
-
action: VerificationWidgetCallbackActions.HANDLE_EXCEPTION,
|
|
1091
|
-
err: error
|
|
1092
|
-
})
|
|
1093
|
-
).catch(
|
|
1094
|
-
() => widgetCallback({
|
|
1095
|
-
action: VerificationWidgetCallbackActions.HANDLE_EXCEPTION,
|
|
1096
|
-
err: DEFAULT_ERROR
|
|
1097
|
-
})
|
|
1098
|
-
);
|
|
1099
|
-
},
|
|
1100
|
-
eventHandler: (eventName, provider) => {
|
|
1101
|
-
widgetCallback({
|
|
1102
|
-
action: VerificationWidgetCallbackActions.HANDLE_EVENT,
|
|
1103
|
-
event: { name: eventName, provider }
|
|
1104
|
-
});
|
|
1105
|
-
}
|
|
1106
|
-
});
|
|
1107
|
-
openBanking.open();
|
|
1108
|
-
container.classList.add(WIDGET_CONTAINER_CLASS);
|
|
1109
|
-
return () => {
|
|
1110
|
-
openBanking?.destroy();
|
|
1111
|
-
};
|
|
1112
|
-
}, []);
|
|
1113
|
-
return /* @__PURE__ */ jsx("div", { ref: widgetContainerRef, className: `${WIDGET_CONTAINER_CLASS}-overlay` });
|
|
1114
|
-
}
|
|
1115
|
-
const accountVerificationFields = [
|
|
1116
|
-
"verifiedAccountHolder",
|
|
1117
|
-
"verifiedBankCountry",
|
|
1118
|
-
"verifiedBankName",
|
|
1119
|
-
"verifiedCurrencyCode",
|
|
1120
|
-
"verifiedBankAccountNumber"
|
|
1121
|
-
];
|
|
1122
|
-
const InstantVerificationErrorContext = createContext(null);
|
|
1123
|
-
const useInstantVerificationErrorNotification = (notificationVisibilityDuration) => {
|
|
1124
|
-
const [errorNotification, setErrorNotification] = useState(null);
|
|
1125
|
-
const dismissNotificationTimeoutRef = useRef();
|
|
1126
|
-
const clearNotificationTimeout = useCallback(() => {
|
|
1127
|
-
if (dismissNotificationTimeoutRef.current) {
|
|
1128
|
-
clearTimeout(dismissNotificationTimeoutRef.current);
|
|
1129
|
-
dismissNotificationTimeoutRef.current = void 0;
|
|
1130
|
-
}
|
|
1131
|
-
}, []);
|
|
1132
|
-
useEffect(() => {
|
|
1133
|
-
clearNotificationTimeout();
|
|
1134
|
-
if (errorNotification && notificationVisibilityDuration > 0) {
|
|
1135
|
-
dismissNotificationTimeoutRef.current = setTimeout(() => {
|
|
1136
|
-
setErrorNotification(null);
|
|
1137
|
-
clearNotificationTimeout();
|
|
1138
|
-
}, notificationVisibilityDuration);
|
|
1139
|
-
}
|
|
1140
|
-
return () => clearNotificationTimeout();
|
|
1141
|
-
}, [errorNotification, clearNotificationTimeout, notificationVisibilityDuration]);
|
|
1142
|
-
return [errorNotification, setErrorNotification];
|
|
1143
|
-
};
|
|
1144
|
-
function BankVerification(props) {
|
|
1145
|
-
const {
|
|
1146
|
-
setBankVerificationError,
|
|
1147
|
-
onBack,
|
|
1148
|
-
hideSidebar,
|
|
1149
|
-
setBankInfoValidated,
|
|
1150
|
-
bankInfoValidated,
|
|
1151
|
-
createTrustedTransferInstrument: createTrustedTransferInstrument2,
|
|
1152
|
-
country,
|
|
1153
|
-
data: propData,
|
|
1154
|
-
provider,
|
|
1155
|
-
id,
|
|
1156
|
-
fieldValidationErrors,
|
|
1157
|
-
handleFieldChange,
|
|
1158
|
-
valid: propValid,
|
|
1159
|
-
errors: propErrors
|
|
1160
|
-
} = props;
|
|
1161
|
-
const invalidateRootLegalEntity = useInvalidateRootLegalEntity();
|
|
1162
|
-
const schema = accountVerificationFields;
|
|
1163
|
-
const stateRef = useRef({ setState: null });
|
|
1164
|
-
const localForm = useForm({
|
|
1165
|
-
...props,
|
|
1166
|
-
schema,
|
|
1167
|
-
defaultData: propData,
|
|
1168
|
-
rules: bankVerificationValidationRules,
|
|
1169
|
-
fieldProblems: fieldValidationErrors
|
|
1170
|
-
});
|
|
1171
|
-
const useMultiFormMode = !!handleFieldChange;
|
|
1172
|
-
const data = useMultiFormMode ? propData : localForm.data;
|
|
1173
|
-
const valid = useMultiFormMode ? propValid : localForm.valid;
|
|
1174
|
-
const errors = useMultiFormMode ? propErrors : localForm.errors;
|
|
1175
|
-
const fieldProblems = useMultiFormMode ? fieldValidationErrors : localForm.fieldProblems;
|
|
1176
|
-
const handleChange = useMultiFormMode ? handleFieldChange : localForm.handleChangeFor;
|
|
1177
|
-
const retrieveBankAccountInfo = async ({
|
|
1178
|
-
realLastFour,
|
|
1179
|
-
number,
|
|
1180
|
-
bankName
|
|
1181
|
-
}) => {
|
|
1182
|
-
handleChange("verifiedBankAccountNumber")(realLastFour ? `*******${realLastFour}` : number);
|
|
1183
|
-
handleChange("verifiedBankName")(bankName);
|
|
1184
|
-
handleChange("verifiedBankCountry")(country);
|
|
1185
|
-
handleChange("verifiedAccountHolder")(propData?.verifiedAccountHolder);
|
|
1186
|
-
handleChange("verifiedCurrencyCode")(
|
|
1187
|
-
propData?.verifiedCurrencyCode ?? currencyByCountry[country]?.[0]
|
|
1188
|
-
);
|
|
1189
|
-
setBankInfoValidated?.(true);
|
|
1190
|
-
hideSidebar?.(false);
|
|
1191
|
-
if (!useMultiFormMode) {
|
|
1192
|
-
localForm.triggerValidation();
|
|
1193
|
-
}
|
|
1194
|
-
await invalidateRootLegalEntity();
|
|
1195
|
-
showInstantVerificationPayoutModal.value = false;
|
|
1196
|
-
};
|
|
1197
|
-
useEffect(() => {
|
|
1198
|
-
if (!useMultiFormMode) {
|
|
1199
|
-
stateRef.current.setState?.({
|
|
1200
|
-
type: "addToState",
|
|
1201
|
-
value: {
|
|
1202
|
-
data,
|
|
1203
|
-
valid,
|
|
1204
|
-
errors,
|
|
1205
|
-
fieldProblems,
|
|
1206
|
-
dataStoreId: id,
|
|
1207
|
-
schema
|
|
1208
|
-
}
|
|
1209
|
-
});
|
|
1210
|
-
}
|
|
1211
|
-
}, [data, valid, errors, localForm.isValid, useMultiFormMode]);
|
|
1212
|
-
if (provider) {
|
|
1213
|
-
if (bankInfoValidated || !showInstantVerificationPayoutModal.value) {
|
|
1214
|
-
return null;
|
|
1215
|
-
}
|
|
1216
|
-
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1217
|
-
!useMultiFormMode && /* @__PURE__ */ jsx(StateContextSetter, { owner: id, stateRef }),
|
|
1218
|
-
/* @__PURE__ */ jsx(
|
|
1219
|
-
BankVerificationOverlay,
|
|
1220
|
-
{
|
|
1221
|
-
url: provider.redirectUrl,
|
|
1222
|
-
setBankVerificationError,
|
|
1223
|
-
onBack,
|
|
1224
|
-
retrieveBankAccountInfo,
|
|
1225
|
-
createTrustedTransferInstrument: createTrustedTransferInstrument2,
|
|
1226
|
-
providerName: provider.name
|
|
1227
|
-
}
|
|
1228
|
-
)
|
|
1229
|
-
] });
|
|
1230
|
-
}
|
|
1231
|
-
}
|
|
1232
|
-
function BankAccountFormat(props) {
|
|
1233
|
-
const { t } = useTranslation(["banking"]);
|
|
1234
|
-
const { bankAccountFormat, handleAccountFormatChange } = props;
|
|
1235
|
-
const bankFormatOptions = [
|
|
1236
|
-
{
|
|
1237
|
-
id: "iban",
|
|
1238
|
-
name: t(($) => $["ibanFormat"])
|
|
1239
|
-
},
|
|
1240
|
-
{
|
|
1241
|
-
id: "local",
|
|
1242
|
-
name: t(($) => $["localFormat"])
|
|
1243
|
-
}
|
|
1244
|
-
];
|
|
1245
|
-
return /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(Field, { name: "bankAccountFormat", label: t(($) => $["bankAccountFormat"]), children: (childProps) => /* @__PURE__ */ jsx(
|
|
1246
|
-
Select,
|
|
1247
|
-
{
|
|
1248
|
-
...childProps,
|
|
1249
|
-
onChange: (e) => handleAccountFormatChange?.(e?.target?.value),
|
|
1250
|
-
name: "bankAccountFormat",
|
|
1251
|
-
placeholder: t(($) => $["localFormat"]),
|
|
1252
|
-
selected: bankAccountFormat,
|
|
1253
|
-
items: bankFormatOptions
|
|
1254
|
-
}
|
|
1255
|
-
) }) });
|
|
1256
|
-
}
|
|
1257
|
-
const simpleBankAccountNumberMetadata = (example, length, maxLength) => {
|
|
1258
|
-
if (maxLength) {
|
|
1259
|
-
return {
|
|
1260
|
-
validators: validatePatternOnBlur(new RegExp(`^\\d{${length},${maxLength}}$`)),
|
|
1261
|
-
mask: {
|
|
1262
|
-
mask: makeMask(...numericInputs(length), ...numericInputs(maxLength - length, true))
|
|
1263
|
-
},
|
|
1264
|
-
guidanceText: {
|
|
1265
|
-
key: "enterAMaximumOfNDigitsForExample",
|
|
1266
|
-
values: {
|
|
1267
|
-
maxDigits: `${maxLength}`,
|
|
1268
|
-
example
|
|
1269
|
-
}
|
|
1270
|
-
}
|
|
1271
|
-
};
|
|
1272
|
-
}
|
|
1273
|
-
return {
|
|
1274
|
-
validators: validatePatternOnBlur(new RegExp(`^\\d{${length}}$`)),
|
|
1275
|
-
mask: { mask: makeMask(...numericInputs(length)) },
|
|
1276
|
-
guidanceText: {
|
|
1277
|
-
key: "enterNDigitsForExample",
|
|
1278
|
-
values: {
|
|
1279
|
-
numDigits: `${length}`,
|
|
1280
|
-
example
|
|
1281
|
-
}
|
|
1282
|
-
}
|
|
1283
|
-
};
|
|
1284
|
-
};
|
|
1285
|
-
const defaultFieldMetadata$3 = {
|
|
1286
|
-
validators: isNotEmptyValidator
|
|
1287
|
-
};
|
|
1288
|
-
const defaultFieldConfig$3 = {
|
|
1289
|
-
[CountryCodes.CzechRepublic]: {
|
|
1290
|
-
// Validators & masks pulled from https://docs.adyen.com/api-explorer/legalentity/4/post/transferInstruments#request-bankAccount-accountIdentification-CZLocalAccountIdentification
|
|
1291
|
-
validators: validatePatternOnBlur(/^((\d{2}|\d{6})-)?\d*\d{2}$/),
|
|
1292
|
-
mask: {
|
|
1293
|
-
mask: makeMask(
|
|
1294
|
-
...numericInputs(2),
|
|
1295
|
-
...customInputs(1, /-|\d/),
|
|
1296
|
-
...numericInputs(3),
|
|
1297
|
-
...customInputs(1, /-|\d/),
|
|
1298
|
-
...numericInputs(10)
|
|
1299
|
-
)
|
|
1300
|
-
},
|
|
1301
|
-
guidanceText: {
|
|
1302
|
-
key: "enterXToYDigitsWithOrWithoutPrefixForExample",
|
|
1303
|
-
values: {
|
|
1304
|
-
minDigits: "2",
|
|
1305
|
-
maxDigits: "16",
|
|
1306
|
-
firstExample: "19-123457",
|
|
1307
|
-
secondExample: "123457"
|
|
1308
|
-
}
|
|
1309
|
-
}
|
|
1310
|
-
},
|
|
1311
|
-
[CountryCodes.Denmark]: simpleBankAccountNumberMetadata("2621955959", 10),
|
|
1312
|
-
[CountryCodes.Norway]: simpleBankAccountNumberMetadata("86011117947", 11),
|
|
1313
|
-
[CountryCodes.UnitedKingdom]: simpleBankAccountNumberMetadata("10000003", 8),
|
|
1314
|
-
[CountryCodes.Australia]: simpleBankAccountNumberMetadata("0001234", 5, 10),
|
|
1315
|
-
[CountryCodes.Brazil]: simpleBankAccountNumberMetadata("0009795493", 4, 12),
|
|
1316
|
-
[CountryCodes.Canada]: simpleBankAccountNumberMetadata("10220001111", 5, 12),
|
|
1317
|
-
[CountryCodes.HongKong]: {
|
|
1318
|
-
validators: validatePatternOnBlur(new RegExp(`^\\d{${6},${18}}$`)),
|
|
1319
|
-
mask: {
|
|
1320
|
-
mask: makeMask(...numericInputs(6), ...numericInputs(12, true))
|
|
1321
|
-
},
|
|
1322
|
-
guidanceText: {
|
|
1323
|
-
key: "enterAccountNumberWithBranchCodeForExample",
|
|
1324
|
-
values: {
|
|
1325
|
-
minDigits: "9",
|
|
1326
|
-
maxDigits: "15",
|
|
1327
|
-
example: "790000000"
|
|
1328
|
-
}
|
|
1329
|
-
}
|
|
1330
|
-
},
|
|
1331
|
-
[CountryCodes.Hungary]: simpleBankAccountNumberMetadata("117730161111101800000000", 24),
|
|
1332
|
-
[CountryCodes.Singapore]: simpleBankAccountNumberMetadata("0052312891876", 4, 19),
|
|
1333
|
-
[CountryCodes.Sweden]: simpleBankAccountNumberMetadata("123456789", 7, 10),
|
|
1334
|
-
[CountryCodes.UnitedStates]: simpleBankAccountNumberMetadata("10220001111", 3, 17),
|
|
1335
|
-
[CountryCodes.Poland]: {
|
|
1336
|
-
validators: validatePatternOnBlur(/^\d{26}$/),
|
|
1337
|
-
mask: {
|
|
1338
|
-
mask: makeMask(
|
|
1339
|
-
...numericInputs(2),
|
|
1340
|
-
spacer,
|
|
1341
|
-
...numericInputs(4),
|
|
1342
|
-
spacer,
|
|
1343
|
-
...numericInputs(4),
|
|
1344
|
-
spacer,
|
|
1345
|
-
...numericInputs(4),
|
|
1346
|
-
spacer,
|
|
1347
|
-
...numericInputs(4),
|
|
1348
|
-
spacer,
|
|
1349
|
-
...numericInputs(4),
|
|
1350
|
-
spacer,
|
|
1351
|
-
...numericInputs(4)
|
|
1352
|
-
)
|
|
1353
|
-
},
|
|
1354
|
-
guidanceText: {
|
|
1355
|
-
key: "enterNDigitsForExample",
|
|
1356
|
-
values: {
|
|
1357
|
-
numDigits: "26",
|
|
1358
|
-
example: "98 1090 2402 7474 4662 2173 1624"
|
|
1359
|
-
}
|
|
1360
|
-
}
|
|
1361
|
-
},
|
|
1362
|
-
[CountryCodes.NewZealand]: {
|
|
1363
|
-
validators: validatePatternOnBlur(/^\d{15,16}$/),
|
|
1364
|
-
mask: {
|
|
1365
|
-
mask: makeMask(
|
|
1366
|
-
...numericInputs(2),
|
|
1367
|
-
...nonInputs(" - "),
|
|
1368
|
-
...numericInputs(4),
|
|
1369
|
-
...nonInputs(" - "),
|
|
1370
|
-
...numericInputs(7),
|
|
1371
|
-
...nonInputs(" - "),
|
|
1372
|
-
...numericInputs(2),
|
|
1373
|
-
...numericInputs(1, true)
|
|
1374
|
-
)
|
|
1375
|
-
},
|
|
1376
|
-
guidanceText: {
|
|
1377
|
-
key: "enterXToYDigitsForExample",
|
|
1378
|
-
values: {
|
|
1379
|
-
minDigits: "15",
|
|
1380
|
-
maxDigits: "16",
|
|
1381
|
-
example: "12-8765-9876543-043"
|
|
1382
|
-
}
|
|
1383
|
-
}
|
|
1384
|
-
}
|
|
1385
|
-
};
|
|
1386
|
-
const bankAccountNumberFields = ["bankAccountNumber"];
|
|
1387
|
-
function BankAccountNumber(props) {
|
|
1388
|
-
const { t } = useTranslation("common");
|
|
1389
|
-
const {
|
|
1390
|
-
country,
|
|
1391
|
-
fieldConfig = defaultFieldConfig$3,
|
|
1392
|
-
onFocus,
|
|
1393
|
-
onBlur,
|
|
1394
|
-
handleFieldChange,
|
|
1395
|
-
data: propsData,
|
|
1396
|
-
valid: propsValid,
|
|
1397
|
-
errors: propsErrors,
|
|
1398
|
-
fieldValidationErrors: propsFieldValidationErrors
|
|
1399
|
-
} = props;
|
|
1400
|
-
const metadata = resolveFieldMetadata(fieldConfig[country], {}, defaultFieldMetadata$3);
|
|
1401
|
-
const mergedProps = mergeFieldMetadataIntoProps("bankAccountNumber", metadata, props);
|
|
1402
|
-
const localForm = useForm({
|
|
1403
|
-
...mergedProps,
|
|
1404
|
-
schema: bankAccountNumberFields,
|
|
1405
|
-
rules: mergedProps.validators,
|
|
1406
|
-
defaultData: mergedProps.data,
|
|
1407
|
-
fieldProblems: mergedProps?.fieldValidationErrors,
|
|
1408
|
-
obscuredFields: mergedProps.obscuredFields
|
|
1409
|
-
});
|
|
1410
|
-
const useMultiFormMode = !!handleFieldChange;
|
|
1411
|
-
const data = useMultiFormMode ? propsData : localForm.data;
|
|
1412
|
-
const valid = useMultiFormMode ? propsValid : localForm.valid;
|
|
1413
|
-
const errors = useMultiFormMode ? propsErrors : localForm.errors;
|
|
1414
|
-
const fieldProblems = useMultiFormMode ? propsFieldValidationErrors : localForm.fieldProblems;
|
|
1415
|
-
const handleChange = useMultiFormMode ? handleFieldChange : localForm.handleChangeFor;
|
|
1416
|
-
const handleBlur = () => {
|
|
1417
|
-
onBlur?.();
|
|
1418
|
-
handleChange("bankAccountNumber", "blur");
|
|
1419
|
-
};
|
|
1420
|
-
const { updateStateSlice } = useGlobalDataSlice(
|
|
1421
|
-
"payoutAccountDetails"
|
|
1422
|
-
);
|
|
1423
|
-
useEffect(() => {
|
|
1424
|
-
if (!useMultiFormMode) {
|
|
1425
|
-
updateStateSlice({ data, valid, errors, fieldProblems });
|
|
1426
|
-
}
|
|
1427
|
-
}, [data, valid, errors, fieldProblems, useMultiFormMode]);
|
|
1428
|
-
const formUtils = createFormUtils(mergedProps, t);
|
|
1429
|
-
return /* @__PURE__ */ jsx(
|
|
1430
|
-
MaskedInput,
|
|
1431
|
-
{
|
|
1432
|
-
name: "bankAccountNumber",
|
|
1433
|
-
type: "text",
|
|
1434
|
-
label: t(($) => $["bankAccountNumber"]),
|
|
1435
|
-
formatGuidance: translateTranslatable(t, metadata.guidanceText),
|
|
1436
|
-
...formUtils.getMask("bankAccountNumber"),
|
|
1437
|
-
isValid: valid?.bankAccountNumber ?? true,
|
|
1438
|
-
errorMessage: formUtils.getErrorMessage("bankAccountNumber", errors, fieldProblems),
|
|
1439
|
-
"aria-required": true,
|
|
1440
|
-
"aria-invalid": !valid?.bankAccountNumber,
|
|
1441
|
-
onBlur: handleBlur,
|
|
1442
|
-
onInput: handleChange("bankAccountNumber", "input"),
|
|
1443
|
-
onFocus,
|
|
1444
|
-
readonly: formUtils.isReadOnly("bankAccountNumber"),
|
|
1445
|
-
value: data?.bankAccountNumber ?? "",
|
|
1446
|
-
acceptObscuredValue: formUtils.isObscured("bankAccountNumber")
|
|
1447
|
-
}
|
|
1448
|
-
);
|
|
1449
|
-
}
|
|
1450
|
-
const bankCityFields = ["bankCity"];
|
|
1451
|
-
function BankCity(props) {
|
|
1452
|
-
const { t } = useTranslation("common");
|
|
1453
|
-
const {
|
|
1454
|
-
validators,
|
|
1455
|
-
data: bankCityData,
|
|
1456
|
-
valid: propsValid,
|
|
1457
|
-
errors: propsErrors,
|
|
1458
|
-
fieldValidationErrors,
|
|
1459
|
-
handleFieldChange
|
|
1460
|
-
} = props;
|
|
1461
|
-
const localForm = useForm({
|
|
1462
|
-
...props,
|
|
1463
|
-
schema: bankCityFields,
|
|
1464
|
-
rules: validators,
|
|
1465
|
-
defaultData: bankCityData,
|
|
1466
|
-
fieldProblems: fieldValidationErrors
|
|
1467
|
-
});
|
|
1468
|
-
const useMultiFormMode = !!handleFieldChange;
|
|
1469
|
-
const data = useMultiFormMode ? bankCityData : localForm.data;
|
|
1470
|
-
const valid = useMultiFormMode ? propsValid : localForm.valid;
|
|
1471
|
-
const errors = useMultiFormMode ? propsErrors : localForm.errors;
|
|
1472
|
-
const fieldProblems = useMultiFormMode ? fieldValidationErrors : localForm.fieldProblems;
|
|
1473
|
-
const handleChange = useMultiFormMode ? handleFieldChange : localForm.handleChangeFor;
|
|
1474
|
-
const { updateStateSlice } = useGlobalDataSlice(
|
|
1475
|
-
"payoutAccountDetails"
|
|
1476
|
-
);
|
|
1477
|
-
useEffect(() => {
|
|
1478
|
-
if (!useMultiFormMode) {
|
|
1479
|
-
updateStateSlice({ data, valid, errors, fieldProblems });
|
|
1480
|
-
}
|
|
1481
|
-
}, [data, valid, errors, fieldProblems, useMultiFormMode]);
|
|
1482
|
-
const formUtils = createFormUtils(props, t);
|
|
1483
|
-
return /* @__PURE__ */ jsx(
|
|
1484
|
-
Field,
|
|
1485
|
-
{
|
|
1486
|
-
name: "bankCity",
|
|
1487
|
-
label: t(($) => $["bankCityTown"]),
|
|
1488
|
-
errorMessage: formUtils.getErrorMessage("bankCity", errors, fieldProblems),
|
|
1489
|
-
isValid: valid?.bankCity ?? true,
|
|
1490
|
-
children: (childProps) => /* @__PURE__ */ jsx(
|
|
1491
|
-
InputText,
|
|
1492
|
-
{
|
|
1493
|
-
...childProps,
|
|
1494
|
-
name: "bankCity",
|
|
1495
|
-
value: data?.bankCity,
|
|
1496
|
-
readonly: formUtils.isReadOnly("bankCity"),
|
|
1497
|
-
onInput: handleChange("bankCity", "input"),
|
|
1498
|
-
onBlur: handleChange("bankCity", "blur"),
|
|
1499
|
-
"aria-required": true,
|
|
1500
|
-
"aria-invalid": !valid?.bankCity
|
|
1501
|
-
}
|
|
1502
|
-
)
|
|
1503
|
-
}
|
|
1504
|
-
);
|
|
1505
|
-
}
|
|
1506
|
-
const defaultFieldMetadata$2 = {
|
|
1507
|
-
label: "bankCode",
|
|
1508
|
-
validators: isNotEmptyValidator
|
|
1509
|
-
};
|
|
1510
|
-
const simpleBankCodeMetadata = (length, example, label) => ({
|
|
1511
|
-
label: label ?? "bankCode",
|
|
1512
|
-
validators: validatePatternOnBlur(new RegExp(`^\\d{${length}}$`)),
|
|
1513
|
-
mask: {
|
|
1514
|
-
mask: makeMask(...numericInputs(length))
|
|
1515
|
-
},
|
|
1516
|
-
guidanceText: {
|
|
1517
|
-
key: "enterNDigitsForExample",
|
|
1518
|
-
values: {
|
|
1519
|
-
numDigits: `${length}`,
|
|
1520
|
-
example
|
|
1521
|
-
}
|
|
1522
|
-
}
|
|
1523
|
-
});
|
|
1524
|
-
const defaultFieldConfig$2 = {
|
|
1525
|
-
[CountryCodes.Brazil]: simpleBankCodeMetadata(3, "123"),
|
|
1526
|
-
[CountryCodes.Canada]: simpleBankCodeMetadata(3, "100", "institutionNumber"),
|
|
1527
|
-
[CountryCodes.CzechRepublic]: simpleBankCodeMetadata(4, "0800"),
|
|
1528
|
-
[CountryCodes.Denmark]: simpleBankCodeMetadata(4, "5051"),
|
|
1529
|
-
[CountryCodes.HongKong]: simpleBankCodeMetadata(3, "250"),
|
|
1530
|
-
[CountryCodes.Norway]: simpleBankCodeMetadata(4, "8601"),
|
|
1531
|
-
// Not yet implemented
|
|
1532
|
-
[CountryCodes.Ecuador]: simpleBankCodeMetadata(4, "1234"),
|
|
1533
|
-
[CountryCodes.Japan]: simpleBankCodeMetadata(4, "1234"),
|
|
1534
|
-
[CountryCodes.Taiwan]: simpleBankCodeMetadata(3, "123")
|
|
1535
|
-
};
|
|
1536
|
-
const bankCodeFields = ["bankCode"];
|
|
1537
|
-
function BankCode(props) {
|
|
1538
|
-
const { t } = useTranslation("common");
|
|
1539
|
-
const {
|
|
1540
|
-
country,
|
|
1541
|
-
fieldConfig = defaultFieldConfig$2,
|
|
1542
|
-
handleFieldChange,
|
|
1543
|
-
data: propsData,
|
|
1544
|
-
valid: propsValid,
|
|
1545
|
-
errors: propsErrors,
|
|
1546
|
-
fieldValidationErrors: propsFieldValidationErrors
|
|
1547
|
-
} = props;
|
|
1548
|
-
const metadata = resolveFieldMetadata(fieldConfig[country], {}, defaultFieldMetadata$2);
|
|
1549
|
-
const mergedProps = mergeFieldMetadataIntoProps("bankCode", metadata, props);
|
|
1550
|
-
const localForm = useForm({
|
|
1551
|
-
...mergedProps,
|
|
1552
|
-
schema: bankCodeFields,
|
|
1553
|
-
rules: mergedProps.validators,
|
|
1554
|
-
defaultData: mergedProps.data,
|
|
1555
|
-
fieldProblems: mergedProps.fieldValidationErrors
|
|
1556
|
-
});
|
|
1557
|
-
const useMultiFormMode = !!handleFieldChange;
|
|
1558
|
-
const data = useMultiFormMode ? propsData : localForm.data;
|
|
1559
|
-
const valid = useMultiFormMode ? propsValid : localForm.valid;
|
|
1560
|
-
const errors = useMultiFormMode ? propsErrors : localForm.errors;
|
|
1561
|
-
const fieldProblems = useMultiFormMode ? propsFieldValidationErrors : localForm.fieldProblems;
|
|
1562
|
-
const handleChange = useMultiFormMode ? handleFieldChange : localForm.handleChangeFor;
|
|
1563
|
-
const { updateStateSlice } = useGlobalDataSlice(
|
|
1564
|
-
"payoutAccountDetails"
|
|
1565
|
-
);
|
|
1566
|
-
useEffect(() => {
|
|
1567
|
-
if (!useMultiFormMode) {
|
|
1568
|
-
updateStateSlice({ data, valid, errors, fieldProblems });
|
|
1569
|
-
}
|
|
1570
|
-
}, [data, valid, errors, fieldProblems, useMultiFormMode]);
|
|
1571
|
-
const formUtils = createFormUtils(mergedProps, t);
|
|
1572
|
-
return /* @__PURE__ */ jsx(
|
|
1573
|
-
MaskedInput,
|
|
1574
|
-
{
|
|
1575
|
-
name: "bankCode",
|
|
1576
|
-
type: "text",
|
|
1577
|
-
label: formUtils.getLabel("bankCode"),
|
|
1578
|
-
errorMessage: formUtils.getErrorMessage("bankCode", errors, fieldProblems),
|
|
1579
|
-
formatGuidance: translateTranslatable(t, metadata.guidanceText),
|
|
1580
|
-
...formUtils.getMask("bankCode"),
|
|
1581
|
-
isValid: valid?.bankCode ?? true,
|
|
1582
|
-
value: data?.bankCode ?? "",
|
|
1583
|
-
readonly: formUtils.isReadOnly("bankCode"),
|
|
1584
|
-
onInput: handleChange("bankCode", "input"),
|
|
1585
|
-
onBlur: handleChange("bankCode", "blur"),
|
|
1586
|
-
"aria-required": true,
|
|
1587
|
-
"aria-invalid": !valid?.bankCode
|
|
1588
|
-
}
|
|
1589
|
-
);
|
|
1590
|
-
}
|
|
1591
|
-
const bankNameFields = ["bankName"];
|
|
1592
|
-
function BankName(props) {
|
|
1593
|
-
const { t } = useTranslation("common");
|
|
1594
|
-
const {
|
|
1595
|
-
validators,
|
|
1596
|
-
data: bankNameData,
|
|
1597
|
-
valid: propsValid,
|
|
1598
|
-
errors: propsErrors,
|
|
1599
|
-
fieldValidationErrors,
|
|
1600
|
-
handleFieldChange
|
|
1601
|
-
} = props;
|
|
1602
|
-
const localForm = useForm({
|
|
1603
|
-
...props,
|
|
1604
|
-
schema: bankNameFields,
|
|
1605
|
-
rules: validators,
|
|
1606
|
-
defaultData: bankNameData,
|
|
1607
|
-
fieldProblems: fieldValidationErrors
|
|
1608
|
-
});
|
|
1609
|
-
const useMultiFormMode = !!handleFieldChange;
|
|
1610
|
-
const data = useMultiFormMode ? bankNameData : localForm.data;
|
|
1611
|
-
const valid = useMultiFormMode ? propsValid : localForm.valid;
|
|
1612
|
-
const errors = useMultiFormMode ? propsErrors : localForm.errors;
|
|
1613
|
-
const fieldProblems = useMultiFormMode ? fieldValidationErrors : localForm.fieldProblems;
|
|
1614
|
-
const handleChange = useMultiFormMode ? handleFieldChange : localForm.handleChangeFor;
|
|
1615
|
-
const { updateStateSlice } = useGlobalDataSlice(
|
|
1616
|
-
"payoutAccountDetails"
|
|
1617
|
-
);
|
|
1618
|
-
useEffect(() => {
|
|
1619
|
-
if (!useMultiFormMode) {
|
|
1620
|
-
updateStateSlice({ data, valid, errors, fieldProblems });
|
|
1621
|
-
}
|
|
1622
|
-
}, [data, valid, errors, fieldProblems, useMultiFormMode]);
|
|
1623
|
-
const formUtils = createFormUtils(props, t);
|
|
1624
|
-
return /* @__PURE__ */ jsx(
|
|
1625
|
-
Field,
|
|
1626
|
-
{
|
|
1627
|
-
name: "bankName",
|
|
1628
|
-
label: t(($) => $["bankName"]),
|
|
1629
|
-
errorMessage: formUtils.getErrorMessage("bankName", errors, fieldProblems),
|
|
1630
|
-
isValid: valid?.bankName ?? true,
|
|
1631
|
-
children: (childProps) => /* @__PURE__ */ jsx(
|
|
1632
|
-
InputText,
|
|
1633
|
-
{
|
|
1634
|
-
...childProps,
|
|
1635
|
-
name: "bankName",
|
|
1636
|
-
value: data?.bankName,
|
|
1637
|
-
readonly: formUtils.isReadOnly("bankName"),
|
|
1638
|
-
onInput: handleChange("bankName", "input"),
|
|
1639
|
-
onBlur: handleChange("bankName", "blur"),
|
|
1640
|
-
"aria-required": true,
|
|
1641
|
-
"aria-invalid": !valid?.bankName
|
|
1642
|
-
}
|
|
1643
|
-
)
|
|
1644
|
-
}
|
|
1645
|
-
);
|
|
1646
|
-
}
|
|
1647
|
-
const defaultFieldMetadata$1 = {
|
|
1648
|
-
label: "branchCode",
|
|
1649
|
-
validators: isNotEmptyValidator
|
|
1650
|
-
};
|
|
1651
|
-
const defaultFieldConfig$1 = {
|
|
1652
|
-
[CountryCodes.UnitedKingdom]: {
|
|
1653
|
-
label: "sortCode",
|
|
1654
|
-
validators: validatePatternOnBlur(/^\d{6}$/),
|
|
1655
|
-
mask: { mask: makeMask(...numericInputs(6)) },
|
|
1656
|
-
guidanceText: {
|
|
1657
|
-
key: "enterNDigitsForExample",
|
|
1658
|
-
values: {
|
|
1659
|
-
numDigits: "6",
|
|
1660
|
-
example: "401199"
|
|
1661
|
-
}
|
|
1662
|
-
}
|
|
1663
|
-
},
|
|
1664
|
-
[CountryCodes.Australia]: {
|
|
1665
|
-
label: "bsbNumber",
|
|
1666
|
-
validators: validatePatternOnBlur(/^\d{6}$/),
|
|
1667
|
-
mask: { mask: makeMask(...numericInputs(3), ...nonInputs(" - "), ...numericInputs(3)) },
|
|
1668
|
-
guidanceText: {
|
|
1669
|
-
key: "enterNDigitsForExample",
|
|
1670
|
-
values: {
|
|
1671
|
-
numDigits: "6",
|
|
1672
|
-
example: "033-547"
|
|
1673
|
-
}
|
|
1674
|
-
}
|
|
1675
|
-
},
|
|
1676
|
-
[CountryCodes.Brazil]: {
|
|
1677
|
-
label: "branchCode",
|
|
1678
|
-
validators: validatePatternOnBlur(/^\d{1,5}$/),
|
|
1679
|
-
mask: { mask: makeMask(...numericInputs(1), ...numericInputs(4, true)) },
|
|
1680
|
-
guidanceText: {
|
|
1681
|
-
key: "enterAMaximumOfNDigitsForExample",
|
|
1682
|
-
values: {
|
|
1683
|
-
maxDigits: "5",
|
|
1684
|
-
example: "36257"
|
|
1685
|
-
}
|
|
1686
|
-
}
|
|
1687
|
-
},
|
|
1688
|
-
[CountryCodes.Canada]: {
|
|
1689
|
-
label: "transitNumber",
|
|
1690
|
-
validators: validatePatternOnBlur(/^\d{5}$/),
|
|
1691
|
-
mask: { mask: makeMask(...numericInputs(5)) },
|
|
1692
|
-
guidanceText: {
|
|
1693
|
-
key: "enterNDigitsForExample",
|
|
1694
|
-
values: {
|
|
1695
|
-
numDigits: "5",
|
|
1696
|
-
example: "27601"
|
|
1697
|
-
}
|
|
1698
|
-
}
|
|
1699
|
-
},
|
|
1700
|
-
[CountryCodes.UnitedStates]: {
|
|
1701
|
-
label: "routingNumber",
|
|
1702
|
-
validators: validatePatternOnBlur(/^\d{9}$/),
|
|
1703
|
-
mask: { mask: makeMask(...numericInputs(9)) },
|
|
1704
|
-
guidanceText: {
|
|
1705
|
-
key: "enterNDigitsForExample",
|
|
1706
|
-
values: {
|
|
1707
|
-
numDigits: "9",
|
|
1708
|
-
example: "107005432"
|
|
1709
|
-
}
|
|
1710
|
-
}
|
|
1711
|
-
},
|
|
1712
|
-
[CountryCodes.Sweden]: {
|
|
1713
|
-
label: "branchCode",
|
|
1714
|
-
validators: validatePatternOnBlur(/^(\d{4}|8\d{4})$/),
|
|
1715
|
-
mask: {
|
|
1716
|
-
mask: makeMask(
|
|
1717
|
-
...numericInputs(4),
|
|
1718
|
-
...nonInputs(" - ", { displayEagerly: false }),
|
|
1719
|
-
...numericInputs(1, true)
|
|
1720
|
-
)
|
|
1721
|
-
},
|
|
1722
|
-
guidanceText: {
|
|
1723
|
-
key: "enterXOrYDigitsForExample",
|
|
1724
|
-
values: {
|
|
1725
|
-
xDigits: "4",
|
|
1726
|
-
yDigits: "5",
|
|
1727
|
-
example: "5678 or 8635-2"
|
|
1728
|
-
}
|
|
1729
|
-
}
|
|
1730
|
-
},
|
|
1731
|
-
// Not yet implemented
|
|
1732
|
-
[CountryCodes.Indonesia]: {
|
|
1733
|
-
label: "clearingCode",
|
|
1734
|
-
validators: isNotEmptyValidator
|
|
1735
|
-
}
|
|
1736
|
-
};
|
|
1737
|
-
const branchCodeFields = ["branchCode"];
|
|
1738
|
-
function BranchCode(props) {
|
|
1739
|
-
const { t } = useTranslation("common");
|
|
1740
|
-
const {
|
|
1741
|
-
country,
|
|
1742
|
-
fieldConfig = defaultFieldConfig$1,
|
|
1743
|
-
onFocus,
|
|
1744
|
-
onBlur,
|
|
1745
|
-
handleFieldChange,
|
|
1746
|
-
data: propsData,
|
|
1747
|
-
valid: propsValid,
|
|
1748
|
-
errors: propsErrors,
|
|
1749
|
-
fieldValidationErrors: propsFieldValidationErrors
|
|
1750
|
-
} = props;
|
|
1751
|
-
const metadata = resolveFieldMetadata(fieldConfig[country], {}, defaultFieldMetadata$1);
|
|
1752
|
-
const mergedProps = mergeFieldMetadataIntoProps("branchCode", metadata, props);
|
|
1753
|
-
const localForm = useForm({
|
|
1754
|
-
...mergedProps,
|
|
1755
|
-
schema: branchCodeFields,
|
|
1756
|
-
rules: mergedProps.validators,
|
|
1757
|
-
defaultData: mergedProps.data,
|
|
1758
|
-
fieldProblems: mergedProps?.fieldValidationErrors
|
|
1759
|
-
});
|
|
1760
|
-
const useMultiFormMode = !!handleFieldChange;
|
|
1761
|
-
const data = useMultiFormMode ? propsData : localForm.data;
|
|
1762
|
-
const valid = useMultiFormMode ? propsValid : localForm.valid;
|
|
1763
|
-
const errors = useMultiFormMode ? propsErrors : localForm.errors;
|
|
1764
|
-
const fieldProblems = useMultiFormMode ? propsFieldValidationErrors : localForm.fieldProblems;
|
|
1765
|
-
const handleChange = useMultiFormMode ? handleFieldChange : localForm.handleChangeFor;
|
|
1766
|
-
const { updateStateSlice } = useGlobalDataSlice(
|
|
1767
|
-
"payoutAccountDetails"
|
|
1768
|
-
);
|
|
1769
|
-
const handleBlur = () => {
|
|
1770
|
-
onBlur?.();
|
|
1771
|
-
handleChange("branchCode", "blur");
|
|
1772
|
-
};
|
|
1773
|
-
useEffect(() => {
|
|
1774
|
-
if (!useMultiFormMode) {
|
|
1775
|
-
updateStateSlice({ data, valid, errors, fieldProblems });
|
|
1776
|
-
}
|
|
1777
|
-
}, [data, valid, errors, fieldProblems, useMultiFormMode]);
|
|
1778
|
-
const formUtils = createFormUtils(mergedProps, t);
|
|
1779
|
-
return /* @__PURE__ */ jsx(
|
|
1780
|
-
MaskedInput,
|
|
1781
|
-
{
|
|
1782
|
-
name: "branchCode",
|
|
1783
|
-
type: "text",
|
|
1784
|
-
label: formUtils.getLabel("branchCode"),
|
|
1785
|
-
formatGuidance: translateTranslatable(t, metadata.guidanceText),
|
|
1786
|
-
...formUtils.getMask("branchCode"),
|
|
1787
|
-
errorMessage: formUtils.getErrorMessage("branchCode", errors, fieldProblems),
|
|
1788
|
-
isValid: valid?.branchCode ?? true,
|
|
1789
|
-
value: data?.branchCode ?? "",
|
|
1790
|
-
readonly: formUtils.isReadOnly("branchCode"),
|
|
1791
|
-
onInput: handleChange("branchCode", "input"),
|
|
1792
|
-
onBlur: handleBlur,
|
|
1793
|
-
onFocus,
|
|
1794
|
-
"aria-required": true,
|
|
1795
|
-
"aria-invalid": !valid?.branchCode
|
|
1796
|
-
}
|
|
1797
|
-
);
|
|
1798
|
-
}
|
|
1799
|
-
const bbanPatternsByCountry = {
|
|
1800
|
-
[CountryCodes.Albania]: /\d{8}[\dA-Z]{16}/,
|
|
1801
|
-
[CountryCodes.Andorra]: /\d{8}[\dA-Z]{12}/,
|
|
1802
|
-
[CountryCodes.Austria]: /\d{16}/,
|
|
1803
|
-
[CountryCodes.Azerbaijan]: /[\dA-Z]{4}\d{20}/,
|
|
1804
|
-
[CountryCodes.Belgium]: /\d{12}/,
|
|
1805
|
-
[CountryCodes.Bahrain]: /[A-Z]{4}[\dA-Z]{14}/,
|
|
1806
|
-
[CountryCodes.BosniaAndHerzegovina]: /\d{16}/,
|
|
1807
|
-
[CountryCodes.Brazil]: /\d{23}[A-Z][\dA-Z]/,
|
|
1808
|
-
[CountryCodes.Bulgaria]: /[A-Z]{4}\d{6}[\dA-Z]{8}/,
|
|
1809
|
-
[CountryCodes.CostaRica]: /\d{17}/,
|
|
1810
|
-
[CountryCodes.Croatia]: /\d{17}/,
|
|
1811
|
-
[CountryCodes.Cyprus]: /\d{8}[\dA-Z]{16}/,
|
|
1812
|
-
[CountryCodes.CzechRepublic]: /\d{20}/,
|
|
1813
|
-
[CountryCodes.Denmark]: /\d{14}/,
|
|
1814
|
-
[CountryCodes.DominicanRepublic]: /[A-Z]{4}\d{20}/,
|
|
1815
|
-
[CountryCodes.Estonia]: /\d{16}/,
|
|
1816
|
-
[CountryCodes.FaroeIslands]: /\d{14}/,
|
|
1817
|
-
[CountryCodes.Finland]: /\d{14}/,
|
|
1818
|
-
[CountryCodes.France]: /\d{10}[\dA-Z]{11}\d{2}/,
|
|
1819
|
-
[CountryCodes.Georgia]: /[\dA-Z]{2}\d{16}/,
|
|
1820
|
-
[CountryCodes.Germany]: /\d{18}/,
|
|
1821
|
-
[CountryCodes.Gibraltar]: /[A-Z]{4}[\dA-Z]{15}/,
|
|
1822
|
-
[CountryCodes.Greece]: /\d{7}[\dA-Z]{16}/,
|
|
1823
|
-
[CountryCodes.Greenland]: /\d{14}/,
|
|
1824
|
-
[CountryCodes.Guatemala]: /[\dA-Z]{4}[\dA-Z]{20}/,
|
|
1825
|
-
[CountryCodes.Hungary]: /\d{24}/,
|
|
1826
|
-
[CountryCodes.Iceland]: /\d{22}/,
|
|
1827
|
-
[CountryCodes.Ireland]: /[\dA-Z]{4}\d{14}/,
|
|
1828
|
-
[CountryCodes.Israel]: /\d{19}/,
|
|
1829
|
-
[CountryCodes.Italy]: /[A-Z]\d{10}[\dA-Z]{12}/,
|
|
1830
|
-
[CountryCodes.Kazakhstan]: /\d{3}[\dA-Z]{13}/,
|
|
1831
|
-
[CountryCodes.Kuwait]: /[A-Z]{4}[\dA-Z]{22}/,
|
|
1832
|
-
[CountryCodes.Latvia]: /[A-Z]{4}[\dA-Z]{13}/,
|
|
1833
|
-
[CountryCodes.Lebanon]: /\d{4}[\dA-Z]{20}/,
|
|
1834
|
-
[CountryCodes.Liechtenstein]: /\d{5}[\dA-Z]{12}/,
|
|
1835
|
-
[CountryCodes.Lithuania]: /\d{16}/,
|
|
1836
|
-
[CountryCodes.Luxembourg]: /\d{3}[\dA-Z]{13}/,
|
|
1837
|
-
[CountryCodes.Macedonia]: /\d{3}[\dA-Z]{10}\d{2}/,
|
|
1838
|
-
[CountryCodes.Malta]: /[A-Z]{4}\d{5}[\dA-Z]{18}/,
|
|
1839
|
-
[CountryCodes.Mauritania]: /\d{23}/,
|
|
1840
|
-
[CountryCodes.Mauritius]: /[A-Z]{4}\d{19}[A-Z]{3}/,
|
|
1841
|
-
[CountryCodes.Monaco]: /\d{10}[\dA-Z]{11}\d{2}/,
|
|
1842
|
-
[CountryCodes.Moldova]: /[\dA-Z]{2}\d{18}/,
|
|
1843
|
-
[CountryCodes.Montenegro]: /\d{18}/,
|
|
1844
|
-
[CountryCodes.Netherlands]: /[A-Z]{4}\d{10}/,
|
|
1845
|
-
[CountryCodes.Norway]: /\d{11}/,
|
|
1846
|
-
[CountryCodes.Pakistan]: /[\dA-Z]{4}\d{16}/,
|
|
1847
|
-
[CountryCodes.PalestinianTerritory]: /[\dA-Z]{4}\d{21}/,
|
|
1848
|
-
[CountryCodes.Poland]: /\d{24}/,
|
|
1849
|
-
[CountryCodes.Portugal]: /\d{21}/,
|
|
1850
|
-
[CountryCodes.Romania]: /[A-Z]{4}[\dA-Z]{16}/,
|
|
1851
|
-
[CountryCodes.SanMarino]: /[A-Z]\d{10}[\dA-Z]{12}/,
|
|
1852
|
-
[CountryCodes.SaudiArabia]: /\d{2}[\dA-Z]{18}/,
|
|
1853
|
-
[CountryCodes.Serbia]: /\d{18}/,
|
|
1854
|
-
[CountryCodes.Slovakia]: /\d{20}/,
|
|
1855
|
-
[CountryCodes.Slovenia]: /\d{15}/,
|
|
1856
|
-
[CountryCodes.Spain]: /\d{20}/,
|
|
1857
|
-
[CountryCodes.Sweden]: /\d{20}/,
|
|
1858
|
-
[CountryCodes.Switzerland]: /\d{5}[\dA-Z]{12}/,
|
|
1859
|
-
[CountryCodes.Tunisia]: /\d{20}/,
|
|
1860
|
-
[CountryCodes.Turkey]: /\d{5}[\dA-Z]{17}/,
|
|
1861
|
-
[CountryCodes.UnitedArabEmirates]: /\d{3}\d{16}/,
|
|
1862
|
-
[CountryCodes.UnitedKingdom]: /[A-Z]{4}\d{14}/,
|
|
1863
|
-
[CountryCodes.VirginIslandsBritish]: /[\dA-Z]{4}\d{16}/
|
|
1864
|
-
};
|
|
1865
|
-
const customPrefixByCountry = {
|
|
1866
|
-
[CountryCodes.Guernsey]: "GB",
|
|
1867
|
-
[CountryCodes.Jersey]: "GB",
|
|
1868
|
-
[CountryCodes.IsleOfMan]: "GB"
|
|
1869
|
-
};
|
|
1870
|
-
function ibanValidator(input, bankCountry) {
|
|
1871
|
-
if (isEmpty(input)) return false;
|
|
1872
|
-
const ibanInput = input.replace(/ /g, "").toUpperCase();
|
|
1873
|
-
if (!/^([a-zA-Z0-9]{4} ){2,8}[a-zA-Z0-9]{1,4}|[a-zA-Z0-9]{12,34}$/.test(ibanInput)) {
|
|
1874
|
-
return false;
|
|
1875
|
-
}
|
|
1876
|
-
const countryCode = ibanInput.substring(0, 2);
|
|
1877
|
-
const allowedPrefix = customPrefixByCountry[bankCountry] ?? bankCountry;
|
|
1878
|
-
if (countryCode !== allowedPrefix) {
|
|
1879
|
-
return {
|
|
1880
|
-
key: "yourIbanShouldBeginWith_",
|
|
1881
|
-
values: {
|
|
1882
|
-
countryCode: allowedPrefix
|
|
1883
|
-
}
|
|
1884
|
-
};
|
|
1885
|
-
}
|
|
1886
|
-
const bbanPattern = bbanPatternsByCountry[countryCode];
|
|
1887
|
-
if (bbanPattern) {
|
|
1888
|
-
const ibanPattern = new RegExp(`^[A-Z]{2}\\d{2}${bbanPattern.source}$`, "");
|
|
1889
|
-
if (!ibanPattern.test(ibanInput)) {
|
|
1890
|
-
return false;
|
|
1891
|
-
}
|
|
1892
|
-
}
|
|
1893
|
-
const ibanCheck = ibanInput.substring(4, ibanInput.length) + ibanInput.substring(0, 4);
|
|
1894
|
-
let leadingZeroes = true;
|
|
1895
|
-
let ibanCheckDigits = "";
|
|
1896
|
-
for (let i = 0; i < ibanCheck.length; i += 1) {
|
|
1897
|
-
const charAt = ibanCheck.charAt(i);
|
|
1898
|
-
if (charAt !== "0") {
|
|
1899
|
-
leadingZeroes = false;
|
|
1900
|
-
}
|
|
1901
|
-
if (!leadingZeroes) {
|
|
1902
|
-
ibanCheckDigits += "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ".indexOf(charAt);
|
|
1903
|
-
}
|
|
1904
|
-
}
|
|
1905
|
-
let cRest = 0;
|
|
1906
|
-
for (let p = 0; p < ibanCheckDigits.length; p += 1) {
|
|
1907
|
-
const cChar = ibanCheckDigits.charAt(p);
|
|
1908
|
-
const cOperator = +`${cRest}${cChar}`;
|
|
1909
|
-
cRest = cOperator % 97;
|
|
1910
|
-
}
|
|
1911
|
-
return cRest === 1;
|
|
1912
|
-
}
|
|
1913
|
-
const validateIbanOnBlurAndInput = (country) => ({
|
|
1914
|
-
modes: ["blur", "input"],
|
|
1915
|
-
validate: (iban) => ibanValidator(iban, country) === true,
|
|
1916
|
-
errorMessage: (iban) => {
|
|
1917
|
-
const result = ibanValidator(iban, country);
|
|
1918
|
-
return typeof result === "boolean" ? void 0 : result;
|
|
1919
|
-
}
|
|
1920
|
-
});
|
|
1921
|
-
const ibanMask = (country, inputLength, allowLettersInBban) => {
|
|
1922
|
-
const tokens = [];
|
|
1923
|
-
tokens.push(...nonInputs(country, { includeInValue: true }), ...numericInputs(2));
|
|
1924
|
-
inputLength -= 2;
|
|
1925
|
-
const inputToken = allowLettersInBban ? alphanumericInputs : numericInputs;
|
|
1926
|
-
const numGroups = Math.floor(inputLength / 4);
|
|
1927
|
-
const remainder = inputLength % 4;
|
|
1928
|
-
for (let i = 0; i < numGroups; i += 1) {
|
|
1929
|
-
tokens.push(spacer, ...inputToken(4));
|
|
1930
|
-
}
|
|
1931
|
-
if (remainder > 0) {
|
|
1932
|
-
tokens.push(spacer, ...inputToken(remainder));
|
|
1933
|
-
}
|
|
1934
|
-
return {
|
|
1935
|
-
mask: makeMask(...tokens),
|
|
1936
|
-
transformOnType: allowLettersInBban ? uppercase : void 0
|
|
1937
|
-
};
|
|
1938
|
-
};
|
|
1939
|
-
const ibanGuidance = (type, numDigitsOrChars, example) => type === "digits" ? {
|
|
1940
|
-
key: "enterTheRemainingNDigitsForExample",
|
|
1941
|
-
values: {
|
|
1942
|
-
numDigits: `${numDigitsOrChars}`,
|
|
1943
|
-
example
|
|
1944
|
-
}
|
|
1945
|
-
} : {
|
|
1946
|
-
key: "enterTheRemainingNCharactersForExample",
|
|
1947
|
-
values: {
|
|
1948
|
-
numChars: `${numDigitsOrChars}`,
|
|
1949
|
-
example
|
|
1950
|
-
}
|
|
1951
|
-
};
|
|
1952
|
-
const ibanMetadata = (country, inputLength, example, allowLettersInBban) => ({
|
|
1953
|
-
validators: validateIbanOnBlurAndInput(country),
|
|
1954
|
-
mask: ibanMask(country, inputLength, allowLettersInBban),
|
|
1955
|
-
guidanceText: ibanGuidance(allowLettersInBban ? "characters" : "digits", inputLength, example)
|
|
1956
|
-
});
|
|
1957
|
-
const gbIbanMetadata = ibanMetadata(
|
|
1958
|
-
CountryCodes.UnitedKingdom,
|
|
1959
|
-
20,
|
|
1960
|
-
"GB09 BARC 2003 9554 8297 59",
|
|
1961
|
-
true
|
|
1962
|
-
);
|
|
1963
|
-
const defaultFieldMetadata = {
|
|
1964
|
-
validators: isNotEmptyValidator
|
|
1965
|
-
};
|
|
1966
|
-
const defaultFieldConfig = {
|
|
1967
|
-
[CountryCodes.Austria]: ibanMetadata(CountryCodes.Austria, 18, "AT88 5400 0746 7265 9747"),
|
|
1968
|
-
[CountryCodes.Belgium]: ibanMetadata(CountryCodes.Belgium, 14, "BE59 9788 6743 2226"),
|
|
1969
|
-
[CountryCodes.Croatia]: ibanMetadata(CountryCodes.Croatia, 19, "HR51 2484 0083 5929 6973 8"),
|
|
1970
|
-
[CountryCodes.Cyprus]: ibanMetadata(
|
|
1971
|
-
CountryCodes.Cyprus,
|
|
1972
|
-
26,
|
|
1973
|
-
"CY16 5183 1221 8756 5858 5388 7678"
|
|
1974
|
-
),
|
|
1975
|
-
[CountryCodes.CzechRepublic]: ibanMetadata(
|
|
1976
|
-
CountryCodes.CzechRepublic,
|
|
1977
|
-
22,
|
|
1978
|
-
"CZ23 5051 3674 5924 5233 3465"
|
|
1979
|
-
),
|
|
1980
|
-
[CountryCodes.Denmark]: ibanMetadata(CountryCodes.Denmark, 16, "DK95 2000 0123 4567 89"),
|
|
1981
|
-
[CountryCodes.Estonia]: ibanMetadata(CountryCodes.Estonia, 18, "EE26 1291 5123 1542 6371"),
|
|
1982
|
-
[CountryCodes.Finland]: ibanMetadata(CountryCodes.Finland, 16, "FI03 9319 8995 3742 51"),
|
|
1983
|
-
[CountryCodes.Germany]: ibanMetadata(CountryCodes.Germany, 20, "DE91 1000 0000 0123 4567 89"),
|
|
1984
|
-
[CountryCodes.Greece]: ibanMetadata(CountryCodes.Greece, 25, "GR57 0107 7142 7681 6687 9575 217"),
|
|
1985
|
-
[CountryCodes.Hungary]: ibanMetadata(
|
|
1986
|
-
CountryCodes.Hungary,
|
|
1987
|
-
26,
|
|
1988
|
-
"HU68 1070 0024 3428 4128 3192 4812"
|
|
1989
|
-
),
|
|
1990
|
-
[CountryCodes.Lithuania]: ibanMetadata(CountryCodes.Lithuania, 18, "LT59 9244 6228 2176 2762"),
|
|
1991
|
-
[CountryCodes.Luxembourg]: ibanMetadata(CountryCodes.Luxembourg, 18, "LU71 0106 9242 5365 8562"),
|
|
1992
|
-
[CountryCodes.Norway]: ibanMetadata(CountryCodes.Norway, 13, "NO83 3000 1234 567"),
|
|
1993
|
-
[CountryCodes.Poland]: ibanMetadata(
|
|
1994
|
-
CountryCodes.Poland,
|
|
1995
|
-
26,
|
|
1996
|
-
"PL98 1090 2402 7474 4662 2173 1624"
|
|
1997
|
-
),
|
|
1998
|
-
[CountryCodes.Portugal]: ibanMetadata(
|
|
1999
|
-
CountryCodes.Portugal,
|
|
2000
|
-
23,
|
|
2001
|
-
"PT42 0035 0651 8646 9119 5263 5"
|
|
2002
|
-
),
|
|
2003
|
-
[CountryCodes.Slovakia]: ibanMetadata(CountryCodes.Slovakia, 22, "SK25 5173 1333 4916 3219 3521"),
|
|
2004
|
-
[CountryCodes.Slovenia]: ibanMetadata(CountryCodes.Slovenia, 17, "SI56 1920 0123 4567 892"),
|
|
2005
|
-
[CountryCodes.Spain]: ibanMetadata(CountryCodes.Spain, 22, "ES76 1465 5599 9226 7623 2635"),
|
|
2006
|
-
[CountryCodes.Sweden]: ibanMetadata(CountryCodes.Sweden, 22, "SE72 8000 0810 3400 0978 3242"),
|
|
2007
|
-
// These include letters in the BBAN (bank account number)
|
|
2008
|
-
[CountryCodes.Bulgaria]: ibanMetadata(
|
|
2009
|
-
CountryCodes.Bulgaria,
|
|
2010
|
-
20,
|
|
2011
|
-
"BG17 BNPA 9440 4432 7749 93",
|
|
2012
|
-
true
|
|
2013
|
-
),
|
|
2014
|
-
[CountryCodes.France]: ibanMetadata(
|
|
2015
|
-
CountryCodes.France,
|
|
2016
|
-
25,
|
|
2017
|
-
"FR64 1009 6000 4035 3425 9742 Y90",
|
|
2018
|
-
true
|
|
2019
|
-
),
|
|
2020
|
-
[CountryCodes.Gibraltar]: ibanMetadata(
|
|
2021
|
-
CountryCodes.Gibraltar,
|
|
2022
|
-
21,
|
|
2023
|
-
"GI96 JYJT 9899 9587 8655 898",
|
|
2024
|
-
true
|
|
2025
|
-
),
|
|
2026
|
-
[CountryCodes.Ireland]: ibanMetadata(
|
|
2027
|
-
CountryCodes.Ireland,
|
|
2028
|
-
20,
|
|
2029
|
-
"IE64 IRCE 9205 0112 3456 78",
|
|
2030
|
-
true
|
|
2031
|
-
),
|
|
2032
|
-
[CountryCodes.Italy]: ibanMetadata(
|
|
2033
|
-
CountryCodes.Italy,
|
|
2034
|
-
25,
|
|
2035
|
-
"IT06 L030 0203 2809 8485 8934 882",
|
|
2036
|
-
true
|
|
2037
|
-
),
|
|
2038
|
-
[CountryCodes.Latvia]: ibanMetadata(CountryCodes.Latvia, 19, "LV80 BANK 0000 4351 9500 1", true),
|
|
2039
|
-
[CountryCodes.Liechtenstein]: ibanMetadata(
|
|
2040
|
-
CountryCodes.Liechtenstein,
|
|
2041
|
-
19,
|
|
2042
|
-
"LI21 0881 0000 2324 013A A",
|
|
2043
|
-
true
|
|
2044
|
-
),
|
|
2045
|
-
[CountryCodes.Malta]: ibanMetadata(
|
|
2046
|
-
CountryCodes.Malta,
|
|
2047
|
-
29,
|
|
2048
|
-
"MT03 VIXW 2487 8926 8575 8586 8929 858",
|
|
2049
|
-
true
|
|
2050
|
-
),
|
|
2051
|
-
[CountryCodes.Monaco]: ibanMetadata(
|
|
2052
|
-
CountryCodes.Monaco,
|
|
2053
|
-
25,
|
|
2054
|
-
"MC58 1122 2000 0101 2345 6789 030",
|
|
2055
|
-
true
|
|
2056
|
-
),
|
|
2057
|
-
[CountryCodes.Netherlands]: ibanMetadata(
|
|
2058
|
-
CountryCodes.Netherlands,
|
|
2059
|
-
16,
|
|
2060
|
-
"NL50 ABNA 4452 7591 49",
|
|
2061
|
-
true
|
|
2062
|
-
),
|
|
2063
|
-
[CountryCodes.Romania]: ibanMetadata(
|
|
2064
|
-
CountryCodes.Romania,
|
|
2065
|
-
22,
|
|
2066
|
-
"RO36 PORL 9596 9966 4965 4284",
|
|
2067
|
-
true
|
|
2068
|
-
),
|
|
2069
|
-
[CountryCodes.Switzerland]: ibanMetadata(
|
|
2070
|
-
CountryCodes.Switzerland,
|
|
2071
|
-
19,
|
|
2072
|
-
"CH56 0483 5012 3456 7800 9",
|
|
2073
|
-
true
|
|
2074
|
-
),
|
|
2075
|
-
[CountryCodes.UnitedKingdom]: gbIbanMetadata,
|
|
2076
|
-
// IBANs for Guernsey, Jersey, and Isle of Man also use United Kingdom's format (starting with `GB`)
|
|
2077
|
-
[CountryCodes.Guernsey]: gbIbanMetadata,
|
|
2078
|
-
[CountryCodes.Jersey]: gbIbanMetadata,
|
|
2079
|
-
[CountryCodes.IsleOfMan]: gbIbanMetadata
|
|
2080
|
-
};
|
|
2081
|
-
const ibanFields = ["iban"];
|
|
2082
|
-
function Iban(props) {
|
|
2083
|
-
const { t } = useTranslation("common");
|
|
2084
|
-
const {
|
|
2085
|
-
country,
|
|
2086
|
-
fieldConfig = defaultFieldConfig,
|
|
2087
|
-
data: ibanData,
|
|
2088
|
-
valid: propsValid,
|
|
2089
|
-
errors: propsErrors,
|
|
2090
|
-
obscuredFields,
|
|
2091
|
-
fieldValidationErrors,
|
|
2092
|
-
handleFieldChange
|
|
2093
|
-
} = props;
|
|
2094
|
-
const metadata = resolveFieldMetadata(fieldConfig[country], {}, defaultFieldMetadata);
|
|
2095
|
-
const mergedProps = mergeFieldMetadataIntoProps("iban", metadata, props);
|
|
2096
|
-
const localForm = useForm({
|
|
2097
|
-
...mergedProps,
|
|
2098
|
-
schema: ibanFields,
|
|
2099
|
-
rules: mergedProps.validators,
|
|
2100
|
-
defaultData: ibanData,
|
|
2101
|
-
fieldProblems: fieldValidationErrors,
|
|
2102
|
-
obscuredFields
|
|
2103
|
-
});
|
|
2104
|
-
const useMultiFormMode = !!handleFieldChange;
|
|
2105
|
-
const data = useMultiFormMode ? ibanData : localForm.data;
|
|
2106
|
-
const valid = useMultiFormMode ? propsValid : localForm.valid;
|
|
2107
|
-
const errors = useMultiFormMode ? propsErrors : localForm.errors;
|
|
2108
|
-
const fieldProblems = useMultiFormMode ? fieldValidationErrors : localForm.fieldProblems;
|
|
2109
|
-
const handleChange = useMultiFormMode ? handleFieldChange : localForm.handleChangeFor;
|
|
2110
|
-
const { updateStateSlice } = useGlobalDataSlice(
|
|
2111
|
-
"payoutAccountDetails"
|
|
2112
|
-
);
|
|
2113
|
-
useEffect(() => {
|
|
2114
|
-
if (!useMultiFormMode) {
|
|
2115
|
-
updateStateSlice({ data, valid, errors, fieldProblems });
|
|
2116
|
-
}
|
|
2117
|
-
}, [data, errors, valid, fieldProblems, useMultiFormMode]);
|
|
2118
|
-
const formUtils = createFormUtils(mergedProps, t);
|
|
2119
|
-
return /* @__PURE__ */ jsx(
|
|
2120
|
-
MaskedInput,
|
|
2121
|
-
{
|
|
2122
|
-
name: "iban",
|
|
2123
|
-
type: "text",
|
|
2124
|
-
label: t(($) => $["iban"]),
|
|
2125
|
-
formatGuidance: translateTranslatable(t, metadata.guidanceText),
|
|
2126
|
-
...formUtils.getMask("iban"),
|
|
2127
|
-
errorMessage: formUtils.getErrorMessage("iban", errors, fieldProblems),
|
|
2128
|
-
isValid: valid?.iban ?? true,
|
|
2129
|
-
value: data?.iban ?? "",
|
|
2130
|
-
readonly: formUtils.isReadOnly("iban"),
|
|
2131
|
-
onInput: handleChange("iban", "input"),
|
|
2132
|
-
onBlur: handleChange("iban", "blur"),
|
|
2133
|
-
"aria-required": true,
|
|
2134
|
-
"aria-invalid": valid?.iban === false,
|
|
2135
|
-
acceptObscuredValue: formUtils.isObscured("iban")
|
|
2136
|
-
}
|
|
2137
|
-
);
|
|
2138
|
-
}
|
|
2139
|
-
const swiftCodeFieldMetadata = {
|
|
2140
|
-
validators: validatePatternOnBlur(/^([a-zA-Z0-9]{8}|[a-zA-Z0-9]{11})$/),
|
|
2141
|
-
mask: {
|
|
2142
|
-
mask: makeMask(...alphaInputs(6), ...alphanumericInputs(2), ...alphanumericInputs(3, true)),
|
|
2143
|
-
transformOnType: uppercase
|
|
2144
|
-
}
|
|
2145
|
-
};
|
|
2146
|
-
const swiftCodeFields = ["swiftCode"];
|
|
2147
|
-
function SwiftCode(props) {
|
|
2148
|
-
const { t } = useTranslation("common");
|
|
2149
|
-
const {
|
|
2150
|
-
handleFieldChange,
|
|
2151
|
-
data: propsData,
|
|
2152
|
-
valid: propsValid,
|
|
2153
|
-
errors: propsErrors,
|
|
2154
|
-
fieldValidationErrors: propsFieldValidationErrors
|
|
2155
|
-
} = props;
|
|
2156
|
-
const mergedProps = mergeFieldMetadataIntoProps("swiftCode", swiftCodeFieldMetadata, props);
|
|
2157
|
-
const localForm = useForm({
|
|
2158
|
-
...mergedProps,
|
|
2159
|
-
schema: swiftCodeFields,
|
|
2160
|
-
rules: mergedProps.validators,
|
|
2161
|
-
defaultData: mergedProps.data,
|
|
2162
|
-
fieldProblems: mergedProps?.fieldValidationErrors
|
|
2163
|
-
});
|
|
2164
|
-
const useMultiFormMode = !!handleFieldChange;
|
|
2165
|
-
const data = useMultiFormMode ? propsData : localForm.data;
|
|
2166
|
-
const valid = useMultiFormMode ? propsValid : localForm.valid;
|
|
2167
|
-
const errors = useMultiFormMode ? propsErrors : localForm.errors;
|
|
2168
|
-
const fieldProblems = useMultiFormMode ? propsFieldValidationErrors : localForm.fieldProblems;
|
|
2169
|
-
const handleChange = useMultiFormMode ? handleFieldChange : localForm.handleChangeFor;
|
|
2170
|
-
const { updateStateSlice } = useGlobalDataSlice(
|
|
2171
|
-
"payoutAccountDetails"
|
|
2172
|
-
);
|
|
2173
|
-
useEffect(() => {
|
|
2174
|
-
if (!useMultiFormMode) {
|
|
2175
|
-
updateStateSlice({ data, valid, errors, fieldProblems });
|
|
2176
|
-
}
|
|
2177
|
-
}, [data, valid, errors, fieldProblems, useMultiFormMode]);
|
|
2178
|
-
const formUtils = createFormUtils(mergedProps, t);
|
|
2179
|
-
return /* @__PURE__ */ jsx(
|
|
2180
|
-
MaskedInput,
|
|
2181
|
-
{
|
|
2182
|
-
name: "swiftCode",
|
|
2183
|
-
type: "text",
|
|
2184
|
-
label: t(($) => $["bicSwift"]),
|
|
2185
|
-
formatGuidance: t(($) => $["enterXOrYCharactersForExample"], {
|
|
2186
|
-
xChars: "8",
|
|
2187
|
-
yChars: "11",
|
|
2188
|
-
example: "BANKDE65287"
|
|
2189
|
-
}),
|
|
2190
|
-
...formUtils.getMask("swiftCode"),
|
|
2191
|
-
errorMessage: formUtils.getErrorMessage("swiftCode", errors, fieldProblems),
|
|
2192
|
-
isValid: valid?.swiftCode ?? true,
|
|
2193
|
-
value: data?.swiftCode ?? "",
|
|
2194
|
-
readonly: formUtils.isReadOnly("swiftCode"),
|
|
2195
|
-
onInput: handleChange("swiftCode", "input"),
|
|
2196
|
-
onBlur: handleChange("swiftCode", "blur"),
|
|
2197
|
-
"aria-required": true,
|
|
2198
|
-
"aria-invalid": valid?.swiftCode === false
|
|
2199
|
-
}
|
|
2200
|
-
);
|
|
2201
|
-
}
|
|
2202
|
-
const countriesWithMultiplePayoutCurrencies = /* @__PURE__ */ new Set([
|
|
2203
|
-
CountryCodes.Bulgaria,
|
|
2204
|
-
CountryCodes.Canada,
|
|
2205
|
-
CountryCodes.Croatia,
|
|
2206
|
-
CountryCodes.CzechRepublic,
|
|
2207
|
-
CountryCodes.Hungary,
|
|
2208
|
-
CountryCodes.Romania,
|
|
2209
|
-
CountryCodes.Switzerland
|
|
2210
|
-
]);
|
|
2211
|
-
const countriesWithLocalFormat = /* @__PURE__ */ new Set([
|
|
2212
|
-
CountryCodes.CzechRepublic,
|
|
2213
|
-
CountryCodes.Denmark,
|
|
2214
|
-
CountryCodes.Hungary,
|
|
2215
|
-
CountryCodes.Norway,
|
|
2216
|
-
CountryCodes.Poland,
|
|
2217
|
-
CountryCodes.Sweden,
|
|
2218
|
-
CountryCodes.UnitedKingdom
|
|
2219
|
-
]);
|
|
2220
|
-
const payoutCurrencySupport = {
|
|
2221
|
-
[CountryCodes.Sweden]: {
|
|
2222
|
-
local: [Currencies.SEK],
|
|
2223
|
-
iban: [Currencies.EUR, Currencies.SEK]
|
|
2224
|
-
},
|
|
2225
|
-
[CountryCodes.Canada]: {
|
|
2226
|
-
local: [Currencies.CAD, Currencies.USD],
|
|
2227
|
-
iban: [Currencies.CAD, Currencies.USD]
|
|
2228
|
-
}
|
|
2229
|
-
};
|
|
2230
|
-
const shouldShowCheckGuidance = (country) => country === "US";
|
|
2231
|
-
const shouldShowPayoutAccountFormatSelector = (country) => countriesWithLocalFormat.has(country);
|
|
2232
|
-
const shouldShowPayoutAlert = (country) => shouldShowPayoutAccountFormatSelector(country) || countriesWithMultiplePayoutCurrencies.has(country);
|
|
2233
|
-
const getSupportedCurrencyGuidance = (t, country, requiredFields) => {
|
|
2234
|
-
const format = requiredFields.includes("iban") ? "iban" : "local";
|
|
2235
|
-
if (!shouldShowPayoutAlert(country)) {
|
|
2236
|
-
return;
|
|
2237
|
-
}
|
|
2238
|
-
const supportedCurrencies = getSupportedCurrenciesPerFormat(country, format);
|
|
2239
|
-
if (!supportedCurrencies) {
|
|
2240
|
-
return;
|
|
2241
|
-
}
|
|
2242
|
-
return supportedCurrencies.length > 1 ? t(($) => $["payoutIn_Or_"], {
|
|
2243
|
-
currencyOne: supportedCurrencies[0],
|
|
2244
|
-
currencyTwo: supportedCurrencies[1]
|
|
2245
|
-
}) : t(($) => $["payoutInOnly_"], { currency: supportedCurrencies[0] });
|
|
2246
|
-
};
|
|
2247
|
-
const getSupportedCurrenciesPerFormat = (country, format) => {
|
|
2248
|
-
const supportedCurrencies = payoutCurrencySupport[country];
|
|
2249
|
-
if (!supportedCurrencies) {
|
|
2250
|
-
const defaultCurrency = currencyByCountry[country]?.[0];
|
|
2251
|
-
if (!defaultCurrency) {
|
|
2252
|
-
return;
|
|
2253
|
-
}
|
|
2254
|
-
if (format === "iban" && defaultCurrency !== Currencies.EUR) {
|
|
2255
|
-
return [Currencies.EUR, defaultCurrency];
|
|
2256
|
-
} else {
|
|
2257
|
-
return [defaultCurrency];
|
|
2258
|
-
}
|
|
2259
|
-
}
|
|
2260
|
-
return supportedCurrencies[format];
|
|
2261
|
-
};
|
|
2262
|
-
const isLocalCurrency = (country, currency) => {
|
|
2263
|
-
if (!country || !currency) {
|
|
2264
|
-
return false;
|
|
2265
|
-
}
|
|
2266
|
-
const supportedCurrencies = currencyByCountry[country];
|
|
2267
|
-
return supportedCurrencies?.includes(currency) ?? false;
|
|
2268
|
-
};
|
|
2269
|
-
const AccountHolderDescriptionFragment = ({
|
|
2270
|
-
legalEntityResponse
|
|
2271
|
-
}) => {
|
|
2272
|
-
const { t } = useTranslation("banking");
|
|
2273
|
-
const hasSolePropEntityAssociations = hasOwnEntityAssociationOfType(
|
|
2274
|
-
LegalEntityTypes.SOLE_PROPRIETORSHIP,
|
|
2275
|
-
legalEntityResponse.entityAssociations,
|
|
2276
|
-
legalEntityResponse.id
|
|
2277
|
-
);
|
|
2278
|
-
const { accountHolder } = useAccountHolder();
|
|
2279
|
-
const unincorporatedPartnershipMembers = useUnincorporatedPartnershipMembers();
|
|
2280
|
-
if (accountHolder === "mySoleProprietorName" || hasSolePropEntityAssociations) {
|
|
2281
|
-
const soleProp = legalEntityResponse.entityAssociations?.find(
|
|
2282
|
-
(ea) => ea.entityType === "soleProprietorship"
|
|
2283
|
-
);
|
|
2284
|
-
const { individual: individual2 } = legalEntityResponse;
|
|
2285
|
-
return /* @__PURE__ */ jsxs(Typography, { children: [
|
|
2286
|
-
`${t(($) => $["bankAccountHasToBeInYourName"])} `,
|
|
2287
|
-
/* @__PURE__ */ jsx(
|
|
2288
|
-
Typography,
|
|
2289
|
-
{
|
|
2290
|
-
el: "span",
|
|
2291
|
-
variant: "body-stronger",
|
|
2292
|
-
children: `${individual2?.name.firstName} ${individual2?.name.lastName}`
|
|
2293
|
-
}
|
|
2294
|
-
),
|
|
2295
|
-
` ${t(($) => $["orSoleProprietorshipName"])} `,
|
|
2296
|
-
" ",
|
|
2297
|
-
/* @__PURE__ */ jsx(Typography, { el: "span", variant: "body-stronger", children: `${soleProp?.name ?? ""}` })
|
|
2298
|
-
] });
|
|
2299
|
-
}
|
|
2300
|
-
const hasTrustsEntityAssociations = hasOwnEntityAssociationOfType(
|
|
2301
|
-
LegalEntityTypes.TRUST,
|
|
2302
|
-
legalEntityResponse.entityAssociations,
|
|
2303
|
-
legalEntityResponse.id
|
|
2304
|
-
);
|
|
2305
|
-
if (accountHolder === "aTrust" || hasTrustsEntityAssociations) {
|
|
2306
|
-
const trust = legalEntityResponse.entityAssociations?.find((ea) => ea.entityType === "trust");
|
|
2307
|
-
if (legalEntityResponse.type === LegalEntityTypes.INDIVIDUAL) {
|
|
2308
|
-
return /* @__PURE__ */ jsxs(Typography, { children: [
|
|
2309
|
-
`${t(($) => $["bankAccountToHaveSameNameAsTrust"])} `,
|
|
2310
|
-
/* @__PURE__ */ jsx(Typography, { el: "span", variant: "body-stronger", children: t(($) => $["trusteeAsTrusteeForTrust"], {
|
|
2311
|
-
trusteeName: `${legalEntityResponse?.individual?.name.firstName} ${legalEntityResponse?.individual?.name.lastName}`,
|
|
2312
|
-
trustName: trust?.name ?? ""
|
|
2313
|
-
}) })
|
|
2314
|
-
] });
|
|
2315
|
-
}
|
|
2316
|
-
const companyTrusteeBankAccountName = legalEntityResponse?.organization?.legalName !== legalEntityResponse?.organization?.doingBusinessAs ? t(($) => $["trusteeAsTrusteeForTrustDoingBusinessAs"], {
|
|
2317
|
-
trusteeName: legalEntityResponse?.organization?.legalName ?? "",
|
|
2318
|
-
trustName: trust?.name ?? "",
|
|
2319
|
-
tradingName: legalEntityResponse?.organization?.doingBusinessAs
|
|
2320
|
-
}) : t(($) => $["trusteeAsTrusteeForTrust"], {
|
|
2321
|
-
trusteeName: legalEntityResponse?.organization?.legalName ?? "",
|
|
2322
|
-
trustName: trust?.name ?? ""
|
|
2323
|
-
});
|
|
2324
|
-
return /* @__PURE__ */ jsxs(Typography, { children: [
|
|
2325
|
-
`${t(($) => $["bankAccountToHaveSameNameAsTrust"])} `,
|
|
2326
|
-
/* @__PURE__ */ jsx(Typography, { el: "span", variant: "body-stronger", children: companyTrusteeBankAccountName })
|
|
2327
|
-
] });
|
|
2328
|
-
}
|
|
2329
|
-
const hasUnincorporatedPartnershipEntityAssociations = hasOwnEntityAssociationOfType(
|
|
2330
|
-
LegalEntityTypes.UNINCORPORATED_PARTNERSHIP,
|
|
2331
|
-
legalEntityResponse.entityAssociations,
|
|
2332
|
-
legalEntityResponse.id
|
|
2333
|
-
);
|
|
2334
|
-
if (accountHolder === "anUnincorporatedPartnership" || hasUnincorporatedPartnershipEntityAssociations) {
|
|
2335
|
-
const unincorporatedPartnership = legalEntityResponse?.entityAssociations?.find(
|
|
2336
|
-
(ea) => ea.entityType === "unincorporatedPartnership"
|
|
2337
|
-
);
|
|
2338
|
-
const partnerNames = unincorporatedPartnershipMembers?.map((member) => member?.name)?.sort();
|
|
2339
|
-
return /* @__PURE__ */ jsx(Typography, { children: `${t(($) => $["bankAccountToHaveSameNameAsUnincorporatedPartnership"], {
|
|
2340
|
-
partnerNames: `${partnerNames?.join(", ")}`,
|
|
2341
|
-
partnershipName: unincorporatedPartnership?.name ?? ""
|
|
2342
|
-
})} ` });
|
|
2343
|
-
}
|
|
2344
|
-
if (legalEntityResponse.type === LegalEntityTypes.ORGANIZATION) {
|
|
2345
|
-
return /* @__PURE__ */ jsxs(Typography, { children: [
|
|
2346
|
-
`${t(($) => $["bankAccountHasToBeInYourCompanyName"])} `,
|
|
2347
|
-
/* @__PURE__ */ jsx(Typography, { el: "span", variant: "body-stronger", children: legalEntityResponse?.organization?.legalName })
|
|
2348
|
-
] });
|
|
2349
|
-
}
|
|
2350
|
-
const { individual } = legalEntityResponse;
|
|
2351
|
-
return /* @__PURE__ */ jsxs(Typography, { children: [
|
|
2352
|
-
`${t(($) => $["bankAccountHasToBeInYourName"])} `,
|
|
2353
|
-
/* @__PURE__ */ jsx(
|
|
2354
|
-
Typography,
|
|
2355
|
-
{
|
|
2356
|
-
el: "span",
|
|
2357
|
-
variant: "body-stronger",
|
|
2358
|
-
children: `${individual?.name.firstName} ${individual?.name.lastName}`
|
|
2359
|
-
}
|
|
2360
|
-
)
|
|
2361
|
-
] });
|
|
2362
|
-
};
|
|
2363
|
-
const checkGuidance = "adyen-kyc-check-guidance";
|
|
2364
|
-
const checkGuidanceImage = "adyen-kyc-check-guidance-image";
|
|
2365
|
-
const checkGuidanceAnnotated = "adyen-kyc-check-guidance-annotated";
|
|
2366
|
-
const checkGuidanceInactive = "adyen-kyc-check-guidance-inactive";
|
|
2367
|
-
const styles$2 = {
|
|
2368
|
-
checkGuidance,
|
|
2369
|
-
checkGuidanceImage,
|
|
2370
|
-
checkGuidanceAnnotated,
|
|
2371
|
-
checkGuidanceInactive
|
|
2372
|
-
};
|
|
2373
|
-
const usCheckAccount = lazy(() => import("./us-check-account-number-9lI1dXNC.js"));
|
|
2374
|
-
const usCheckRouting = lazy(() => import("./us-check-routing-number-s_KaAGSM.js"));
|
|
2375
|
-
const usCheck = lazy(() => import("./us-check-C1rTBsCY.js"));
|
|
2376
|
-
const CheckGuidance = ({ annotated }) => {
|
|
2377
|
-
return /* @__PURE__ */ jsxs("div", { className: styles$2.checkGuidance, children: [
|
|
2378
|
-
/* @__PURE__ */ jsx(
|
|
2379
|
-
Image,
|
|
2380
|
-
{
|
|
2381
|
-
lazyLoadedImage: usCheckAccount,
|
|
2382
|
-
className: cx(styles$2.checkGuidanceImage, styles$2.checkGuidanceAnnotated, {
|
|
2383
|
-
[styles$2.checkGuidanceInactive]: annotated !== "account"
|
|
2384
|
-
})
|
|
2385
|
-
}
|
|
2386
|
-
),
|
|
2387
|
-
/* @__PURE__ */ jsx(
|
|
2388
|
-
Image,
|
|
2389
|
-
{
|
|
2390
|
-
lazyLoadedImage: usCheckRouting,
|
|
2391
|
-
className: cx(styles$2.checkGuidanceImage, styles$2.checkGuidanceAnnotated, {
|
|
2392
|
-
[styles$2.checkGuidanceInactive]: annotated !== "routing"
|
|
2393
|
-
})
|
|
2394
|
-
}
|
|
2395
|
-
),
|
|
2396
|
-
/* @__PURE__ */ jsx(Image, { lazyLoadedImage: usCheck, className: styles$2.checkGuidanceImage })
|
|
2397
|
-
] });
|
|
2398
|
-
};
|
|
2399
|
-
const payoutAccountFields = [
|
|
2400
|
-
"accountHolder",
|
|
2401
|
-
...ibanFields,
|
|
2402
|
-
...branchCodeFields,
|
|
2403
|
-
...swiftCodeFields,
|
|
2404
|
-
...bankAccountNumberFields,
|
|
2405
|
-
...bankNameFields,
|
|
2406
|
-
...bankCodeFields
|
|
2407
|
-
];
|
|
2408
|
-
function PayoutAccount(props) {
|
|
2409
|
-
const accountFormat = payoutAccountFormat.value;
|
|
2410
|
-
const { t } = useTranslation("banking");
|
|
2411
|
-
const { t: commonT } = useTranslation("common");
|
|
2412
|
-
const [checkAnnotation, setCheckAnnotation] = useState();
|
|
2413
|
-
const { isFeatureEnabled } = useToggleContext();
|
|
2414
|
-
const { isSettingEnabled } = useSettingsContext();
|
|
2415
|
-
const isCrossBorderPayoutsEnabled = isFeatureEnabled(FeatureNames.EnableCrossBorderPayouts) && isSettingEnabled(SettingNames.AllowCrossBorderPayout);
|
|
2416
|
-
const bankAccountFormatSelectionAllowed = isSettingEnabled(
|
|
2417
|
-
SettingNames.AllowBankAccountFormatSelection
|
|
2418
|
-
);
|
|
2419
|
-
const {
|
|
2420
|
-
heading,
|
|
2421
|
-
country,
|
|
2422
|
-
id,
|
|
2423
|
-
legalEntityResponse,
|
|
2424
|
-
requiredFields = [],
|
|
2425
|
-
arePayoutAccountDetailsInvalid,
|
|
2426
|
-
invalidFieldNames,
|
|
2427
|
-
formVerificationErrors,
|
|
2428
|
-
fieldValidationErrors,
|
|
2429
|
-
preferredCurrencyCode,
|
|
2430
|
-
data,
|
|
2431
|
-
errors,
|
|
2432
|
-
valid,
|
|
2433
|
-
handleFieldChange
|
|
2434
|
-
} = props;
|
|
2435
|
-
const showCheckGuidance = shouldShowCheckGuidance(country);
|
|
2436
|
-
const formUtils = createFormUtils({ ...props, requiredFields }, commonT);
|
|
2437
|
-
const bankAccountNumberProps = getFieldProps(props, bankAccountNumberFields);
|
|
2438
|
-
const swiftCodeProps = getFieldProps(props, swiftCodeFields);
|
|
2439
|
-
const ibanProps = getFieldProps(
|
|
2440
|
-
props,
|
|
2441
|
-
ibanFields
|
|
2442
|
-
);
|
|
2443
|
-
const branchCodeProps = getFieldProps(props, branchCodeFields);
|
|
2444
|
-
const bankNameProps = getFieldProps(props, bankNameFields);
|
|
2445
|
-
const bankCodeProps = getFieldProps(props, bankCodeFields);
|
|
2446
|
-
const bankCityProps = getFieldProps(props, bankCityFields);
|
|
2447
|
-
const { clearStateSlice } = useGlobalDataSlice(
|
|
2448
|
-
"payoutAccountDetails"
|
|
2449
|
-
);
|
|
2450
|
-
const handleAccountFormatChange = (accountFormat2) => {
|
|
2451
|
-
clearStateSlice();
|
|
2452
|
-
payoutAccountFormat.value = accountFormat2;
|
|
2453
|
-
};
|
|
2454
|
-
const localCurrency = isCrossBorderPayoutsEnabled ? isLocalCurrency(country, preferredCurrencyCode) : true;
|
|
2455
|
-
const isEUR = preferredCurrencyCode === "EUR";
|
|
2456
|
-
useEffect(() => {
|
|
2457
|
-
if (!isCrossBorderPayoutsEnabled || data?.transferInstrumentId) {
|
|
2458
|
-
return;
|
|
2459
|
-
}
|
|
2460
|
-
if (isEUR && localCurrency) {
|
|
2461
|
-
handleAccountFormatChange?.("iban");
|
|
2462
|
-
return;
|
|
2463
|
-
}
|
|
2464
|
-
if (!localCurrency) {
|
|
2465
|
-
handleAccountFormatChange?.("numberAndBic");
|
|
2466
|
-
}
|
|
2467
|
-
}, [country, preferredCurrencyCode]);
|
|
2468
|
-
const multiFormProps = handleFieldChange ? {
|
|
2469
|
-
data,
|
|
2470
|
-
valid,
|
|
2471
|
-
errors,
|
|
2472
|
-
fieldValidationErrors,
|
|
2473
|
-
handleFieldChange
|
|
2474
|
-
} : {};
|
|
2475
|
-
return /* @__PURE__ */ jsxs("form", { className: "adyen-kyc-individual__payout-account", "aria-describedby": "ariaErrorField", children: [
|
|
2476
|
-
heading && /* @__PURE__ */ jsx(Header, { title: heading, children: /* @__PURE__ */ jsx(
|
|
2477
|
-
AccountHolderDescriptionFragment,
|
|
2478
|
-
{
|
|
2479
|
-
slot: "description",
|
|
2480
|
-
legalEntityResponse
|
|
2481
|
-
}
|
|
2482
|
-
) }),
|
|
2483
|
-
/* @__PURE__ */ jsx(
|
|
2484
|
-
ErrorPanel,
|
|
2485
|
-
{
|
|
2486
|
-
verificationErrors: formVerificationErrors,
|
|
2487
|
-
validationErrors: fieldValidationErrors,
|
|
2488
|
-
formUtils,
|
|
2489
|
-
id: "ariaErrorField"
|
|
2490
|
-
}
|
|
2491
|
-
),
|
|
2492
|
-
showCheckGuidance ? /* @__PURE__ */ jsx(CheckGuidance, { annotated: checkAnnotation }) : void 0,
|
|
2493
|
-
bankAccountFormatSelectionAllowed && shouldShowPayoutAccountFormatSelector(country) && accountFormat && localCurrency && !isEUR && /* @__PURE__ */ jsx(
|
|
2494
|
-
BankAccountFormat,
|
|
2495
|
-
{
|
|
2496
|
-
bankAccountFormat: accountFormat,
|
|
2497
|
-
handleAccountFormatChange
|
|
2498
|
-
}
|
|
2499
|
-
),
|
|
2500
|
-
formUtils.isRequiredField("branchCode") && /* @__PURE__ */ jsx(
|
|
2501
|
-
BranchCode,
|
|
2502
|
-
{
|
|
2503
|
-
...branchCodeProps,
|
|
2504
|
-
country,
|
|
2505
|
-
dataStoreId: id,
|
|
2506
|
-
onFocus: showCheckGuidance ? () => setCheckAnnotation("routing") : void 0,
|
|
2507
|
-
onBlur: showCheckGuidance ? () => setCheckAnnotation(void 0) : void 0,
|
|
2508
|
-
...multiFormProps
|
|
2509
|
-
}
|
|
2510
|
-
),
|
|
2511
|
-
formUtils.isRequiredField("bankAccountNumber") && /* @__PURE__ */ jsx(
|
|
2512
|
-
BankAccountNumber,
|
|
2513
|
-
{
|
|
2514
|
-
...bankAccountNumberProps,
|
|
2515
|
-
country,
|
|
2516
|
-
dataStoreId: id,
|
|
2517
|
-
onFocus: showCheckGuidance ? () => setCheckAnnotation("account") : void 0,
|
|
2518
|
-
onBlur: showCheckGuidance ? () => setCheckAnnotation(void 0) : void 0,
|
|
2519
|
-
...multiFormProps
|
|
2520
|
-
}
|
|
2521
|
-
),
|
|
2522
|
-
formUtils.isRequiredField("iban") && /* @__PURE__ */ jsx(Iban, { ...ibanProps, dataStoreId: id, country, ...multiFormProps }),
|
|
2523
|
-
formUtils.isRequiredField("swiftCode") && /* @__PURE__ */ jsx(SwiftCode, { ...swiftCodeProps, dataStoreId: id, ...multiFormProps }),
|
|
2524
|
-
formUtils.isRequiredField("bankName") && /* @__PURE__ */ jsx(BankName, { ...bankNameProps, dataStoreId: id, ...multiFormProps }),
|
|
2525
|
-
formUtils.isRequiredField("bankCode") && /* @__PURE__ */ jsx(BankCode, { ...bankCodeProps, country, dataStoreId: id, ...multiFormProps }),
|
|
2526
|
-
formUtils.isRequiredField("bankCity") && /* @__PURE__ */ jsx(BankCity, { ...bankCityProps, dataStoreId: id, ...multiFormProps }),
|
|
2527
|
-
shouldShowPayoutAlert(country) && !isCrossBorderPayoutsEnabled && /* @__PURE__ */ jsx(
|
|
2528
|
-
Alert,
|
|
2529
|
-
{
|
|
2530
|
-
title: getSupportedCurrencyGuidance(t, country, requiredFields),
|
|
2531
|
-
className: "adyen-kyc-u-margin-bottom-8"
|
|
2532
|
-
}
|
|
2533
|
-
),
|
|
2534
|
-
!isCrossBorderPayoutsEnabled && /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "tertiary", children: t(($) => $["thisAccountWillBeVerifiedToPrevent"]) }),
|
|
2535
|
-
arePayoutAccountDetailsInvalid && /* @__PURE__ */ jsx(
|
|
2536
|
-
Alert,
|
|
2537
|
-
{
|
|
2538
|
-
className: "adyen-kyc-u-margin-top-16",
|
|
2539
|
-
variant: "error",
|
|
2540
|
-
title: invalidFieldNames ? t(($) => $["pleaseEnterValidField"], {
|
|
2541
|
-
fieldNames: invalidFieldNames
|
|
2542
|
-
}) : t(($) => $["pleaseEnterValidAccountDetails"])
|
|
2543
|
-
}
|
|
2544
|
-
)
|
|
2545
|
-
] });
|
|
2546
|
-
}
|
|
2547
|
-
const currenciesDataset = /* @__PURE__ */ JSON.parse('[{"currencyCode":"AED","description":"UAE Dirham","exponent":2,"symbol":""},{"currencyCode":"ALL","description":"Albanian Lek","exponent":2,"symbol":"L"},{"currencyCode":"AMD","description":"Armenian Dram","exponent":2,"symbol":""},{"currencyCode":"ANG","description":"Antillian Guilder","exponent":2,"symbol":"Naƒ"},{"currencyCode":"AOA","description":"Angolan kwanza","exponent":2,"symbol":""},{"currencyCode":"ARS","description":"Nuevo Argentine Peso","exponent":2,"symbol":"$"},{"currencyCode":"AUD","description":"Australian Dollar","exponent":2,"symbol":"A$"},{"currencyCode":"AWG","description":"Aruban Guilder","exponent":2,"symbol":""},{"currencyCode":"AZN","description":"Azerbaijani manat","exponent":2,"symbol":"man"},{"currencyCode":"BAM","description":"Bosnia and Herzegovina Convertible Marks","exponent":2,"symbol":""},{"currencyCode":"BBD","description":"Barbados Dollar","exponent":2,"symbol":""},{"currencyCode":"BDT","description":"Bangladesh Taka","exponent":2,"symbol":""},{"currencyCode":"BGL","description":"Bulgaria Lev","exponent":2,"symbol":""},{"currencyCode":"BHD","description":"Bahraini Dinar","exponent":3,"symbol":""},{"currencyCode":"BMD","description":"Bermudian Dollar","exponent":2,"symbol":""},{"currencyCode":"BND","description":"Brunei Dollar","exponent":2,"symbol":""},{"currencyCode":"BOB","description":"Bolivia Boliviano","exponent":2,"symbol":""},{"currencyCode":"BRL","description":"Brazilian Real","exponent":2,"symbol":"R$"},{"currencyCode":"BSD","description":"Bahamian Dollar","exponent":2,"symbol":""},{"currencyCode":"BTN","description":"Bhutan Ngultrum","exponent":2,"symbol":"Nu."},{"currencyCode":"BWP","description":"Botswana Pula","exponent":2,"symbol":""},{"currencyCode":"BYN","description":"Belarusian Ruble","exponent":2,"symbol":"Br"},{"currencyCode":"BYR","description":"Belarusian Ruble","exponent":0,"symbol":"Br"},{"currencyCode":"BZD","description":"Belize Dollar","exponent":2,"symbol":""},{"currencyCode":"CAD","description":"Canadian Dollar","exponent":2,"symbol":"$"},{"currencyCode":"CHF","description":"Swiss Franc","exponent":2,"symbol":""},{"currencyCode":"CLP","description":"Chilean Peso","exponent":2,"symbol":"$"},{"currencyCode":"CNY","description":"Yuan Renminbi","exponent":2,"symbol":"¥"},{"currencyCode":"COP","description":"Colombian Peso","exponent":2,"symbol":"₱"},{"currencyCode":"CRC","description":"Costa Rican Colon","exponent":2,"symbol":""},{"currencyCode":"CSD","description":"Serbian Dinar","exponent":2,"symbol":""},{"currencyCode":"CUP","description":"Cuban Peso","exponent":2,"symbol":""},{"currencyCode":"CVE","description":"Cape Verdi Escudo","exponent":0,"symbol":""},{"currencyCode":"CZK","description":"Czech Koruna","exponent":2,"symbol":""},{"currencyCode":"DJF","description":"Djibouti Franc","exponent":0,"symbol":""},{"currencyCode":"DKK","description":"Danish Krone","exponent":2,"symbol":"kr"},{"currencyCode":"DOP","description":"Dominican Republic Peso","exponent":2,"symbol":""},{"currencyCode":"DZD","description":"Algerian Dinar","exponent":2,"symbol":""},{"currencyCode":"EEK","description":"Estonian Krone","exponent":2,"symbol":""},{"currencyCode":"EGP","description":"Egyptian Pound","exponent":2,"symbol":"£"},{"currencyCode":"ETB","description":"Ethiopian Birr","exponent":2,"symbol":""},{"currencyCode":"EUR","description":"Euro","exponent":2,"symbol":"€"},{"currencyCode":"FJD","description":"Fiji Dollar","exponent":2,"symbol":"$"},{"currencyCode":"FKP","description":"Falkland Islands Pound","exponent":2,"symbol":""},{"currencyCode":"GBP","description":"Pound Sterling","exponent":2,"symbol":"£"},{"currencyCode":"GEL","description":"Georgian Lari","exponent":2,"symbol":""},{"currencyCode":"GHC","description":"Ghanaian Cedi (2nd)","exponent":0,"symbol":""},{"currencyCode":"GHS","description":"Ghanaian Cedi (3rd)","exponent":2,"symbol":"GH₵"},{"currencyCode":"GIP","description":"Gibraltar Pound","exponent":2,"symbol":""},{"currencyCode":"GMD","description":"Gambia Delasi","exponent":2,"symbol":""},{"currencyCode":"GNF","description":"Guinea Franc","exponent":0,"symbol":""},{"currencyCode":"GTQ","description":"Guatemala Quetzal","exponent":2,"symbol":""},{"currencyCode":"GYD","description":"Guyanese Dollar","exponent":2,"symbol":""},{"currencyCode":"HKD","description":"Hong Kong Dollar","exponent":2,"symbol":"$"},{"currencyCode":"HNL","description":"Honduras Lempira","exponent":2,"symbol":""},{"currencyCode":"HRK","description":"Croatia Kuna","exponent":2,"symbol":""},{"currencyCode":"HTG","description":"Haitian Gourde","exponent":2,"symbol":""},{"currencyCode":"HUF","description":"Hungarian Forint","exponent":2,"symbol":"Ft"},{"currencyCode":"IDR","description":"Indonesian Rupiah","exponent":0,"symbol":""},{"currencyCode":"ILS","description":"New Israeli Scheqel","exponent":2,"symbol":"₪"},{"currencyCode":"INR","description":"Indian Rupee","exponent":2,"symbol":"₨"},{"currencyCode":"IQD","description":"Iraqi Dinar","exponent":3,"symbol":""},{"currencyCode":"ISK","description":"Iceland Krona","exponent":2,"symbol":""},{"currencyCode":"JMD","description":"Jamaican Dollar","exponent":2,"symbol":""},{"currencyCode":"JOD","description":"Jordanian Dinar","exponent":3,"symbol":""},{"currencyCode":"JPY","description":"Japanese Yen","exponent":0,"symbol":"¥"},{"currencyCode":"KES","description":"Kenyan Shilling","exponent":2,"symbol":""},{"currencyCode":"KGS","description":"Kyrgyzstan Som","exponent":2,"symbol":""},{"currencyCode":"KHR","description":"Cambodia Riel","exponent":2,"symbol":""},{"currencyCode":"KMF","description":"Comoro Franc","exponent":0,"symbol":""},{"currencyCode":"KRW","description":"South-Korean Won","exponent":0,"symbol":"₩"},{"currencyCode":"KWD","description":"Kuwaiti Dinar","exponent":3,"symbol":""},{"currencyCode":"KYD","description":"Cayman Islands Dollar","exponent":2,"symbol":""},{"currencyCode":"KZT","description":"Kazakhstani Tenge","exponent":2,"symbol":"8"},{"currencyCode":"LAK","description":"Laos Kip","exponent":2,"symbol":""},{"currencyCode":"LBP","description":"Lebanese Pound","exponent":2,"symbol":"£"},{"currencyCode":"LKR","description":"Sri Lanka Rupee","exponent":2,"symbol":"₨"},{"currencyCode":"LTL","description":"Lithunianian Litas","exponent":2,"symbol":""},{"currencyCode":"LVL","description":"Latvian Lats","exponent":2,"symbol":""},{"currencyCode":"LYD","description":"Libyan Dinar","exponent":3,"symbol":""},{"currencyCode":"MAD","description":"Moroccan Dirham","exponent":2,"symbol":""},{"currencyCode":"MDL","description":"Moldovia Leu","exponent":2,"symbol":""},{"currencyCode":"MKD","description":"Macedonian Denar","exponent":2,"symbol":"ден"},{"currencyCode":"MMK","description":"Myanmar Kyat","exponent":2,"symbol":""},{"currencyCode":"MNT","description":"Mongolia Tugrik","exponent":2,"symbol":""},{"currencyCode":"MOP","description":"Macau Pataca","exponent":2,"symbol":""},{"currencyCode":"MRO","description":"Mauritania Ouguiya","exponent":1,"symbol":""},{"currencyCode":"MRU","description":"Mauritania Ouguiya","exponent":2,"symbol":""},{"currencyCode":"MUR","description":"Mauritius Rupee","exponent":2,"symbol":""},{"currencyCode":"MVR","description":"Maldives Rufiyaa","exponent":2,"symbol":""},{"currencyCode":"MWK","description":"Malawi Kwacha","exponent":2,"symbol":""},{"currencyCode":"MXN","description":"Mexican Peso","exponent":2,"symbol":"$"},{"currencyCode":"MXP","description":"Mexican Peso","exponent":2,"symbol":""},{"currencyCode":"MYR","description":"Malaysian Ringgit","exponent":2,"symbol":""},{"currencyCode":"MZN","description":"Mozambican Metical","exponent":2,"symbol":""},{"currencyCode":"NAD","description":"Namibian Dollar","exponent":2,"symbol":"$"},{"currencyCode":"NGN","description":"Nigerian naira","exponent":2,"symbol":"&"},{"currencyCode":"NIO","description":"Nicaragua Cordoba Oro","exponent":2,"symbol":""},{"currencyCode":"NOK","description":"Norwegian Krone","exponent":2,"symbol":""},{"currencyCode":"NPR","description":"Nepalese Rupee","exponent":2,"symbol":""},{"currencyCode":"NZD","description":"New Zealand Dollar","exponent":2,"symbol":"$"},{"currencyCode":"OMR","description":"Rial Omani","exponent":3,"symbol":"﷼"},{"currencyCode":"PAB","description":"Panamanian Balboa","exponent":2,"symbol":""},{"currencyCode":"PEN","description":"Peruvian Nuevo Sol","exponent":2,"symbol":"S/."},{"currencyCode":"PGK","description":"New Guinea Kina","exponent":2,"symbol":""},{"currencyCode":"PHP","description":"Philippine Peso","exponent":2,"symbol":"₱"},{"currencyCode":"PKR","description":"Pakistan Rupee","exponent":2,"symbol":"₨"},{"currencyCode":"PLN","description":"New Polish Zloty","exponent":2,"symbol":""},{"currencyCode":"PYG","description":"Paraguay Guarani","exponent":0,"symbol":""},{"currencyCode":"QAR","description":"Qatari Rial","exponent":2,"symbol":"﷼"},{"currencyCode":"ROL","description":"Romanian Lei","exponent":2,"symbol":""},{"currencyCode":"RON","description":"New Romanian Lei","exponent":2,"symbol":""},{"currencyCode":"RSD","description":"Serbian Dinar","exponent":2,"symbol":"РСД"},{"currencyCode":"RUB","description":"Russian Ruble","exponent":2,"symbol":"руб"},{"currencyCode":"RWF","description":"Rwanda Franc","exponent":0,"symbol":""},{"currencyCode":"SAR","description":"Saudi Riyal","exponent":2,"symbol":"﷼"},{"currencyCode":"SBD","description":"Solomon Island Dollar","exponent":2,"symbol":""},{"currencyCode":"SCR","description":"Seychelles Rupee","exponent":2,"symbol":""},{"currencyCode":"SEK","description":"Swedish Krone","exponent":2,"symbol":"kr"},{"currencyCode":"SGD","description":"Singapore Dollar","exponent":2,"symbol":"$"},{"currencyCode":"SHP","description":"St. Helena Pound","exponent":2,"symbol":""},{"currencyCode":"SKK","description":"Slovak Koruna","exponent":2,"symbol":""},{"currencyCode":"SLE","description":"Sierra Leone Leone","exponent":2,"symbol":"Le"},{"currencyCode":"SLL","description":"Sierra Leone Leone","exponent":2,"symbol":""},{"currencyCode":"SOS","description":"Somalia Shilling","exponent":2,"symbol":""},{"currencyCode":"SRD","description":"Surinamese dollar","exponent":2,"symbol":"Sr$"},{"currencyCode":"STD","description":"Sao Tome & Principe Dobra","exponent":2,"symbol":""},{"currencyCode":"STN","description":"Sao Tome & Principe Dobra","exponent":2,"symbol":""},{"currencyCode":"SVC","description":"El Salvador Colón","exponent":2,"symbol":"₡"},{"currencyCode":"SZL","description":"Swaziland Lilangeni","exponent":2,"symbol":""},{"currencyCode":"THB","description":"Thai Baht","exponent":2,"symbol":"฿"},{"currencyCode":"TND","description":"Tunisian Dinar","exponent":3,"symbol":""},{"currencyCode":"TOP","description":"Tonga Pa’anga","exponent":2,"symbol":""},{"currencyCode":"TRY","description":"New Turkish Lira","exponent":2,"symbol":"₤"},{"currencyCode":"TTD","description":"Trinidad & Tobago Dollar","exponent":2,"symbol":""},{"currencyCode":"TWD","description":"New Taiwan Dollar","exponent":2,"symbol":"元"},{"currencyCode":"TZS","description":"Tanzanian Shilling","exponent":2,"symbol":""},{"currencyCode":"UAH","description":"Ukraine Hryvnia","exponent":2,"symbol":""},{"currencyCode":"UGX","description":"Uganda Shilling","exponent":0,"symbol":""},{"currencyCode":"USD","description":"US Dollars","exponent":2,"symbol":"$"},{"currencyCode":"UYU","description":"Peso Uruguayo","exponent":2,"symbol":"₱"},{"currencyCode":"UZS","description":"Uzbekistani Som","exponent":2,"symbol":"som"},{"currencyCode":"VEF","description":"Venezuelan Bolívar","exponent":2,"symbol":"Bs.F."},{"currencyCode":"VND","description":"Vietnamese New Dong","exponent":0,"symbol":"₫"},{"currencyCode":"VUV","description":"Vanuatu Vatu","exponent":0,"symbol":""},{"currencyCode":"WST","description":"Samoan Tala","exponent":2,"symbol":""},{"currencyCode":"XAF","description":"CFA Franc BEAC","exponent":0,"symbol":""},{"currencyCode":"XCD","description":"East Carribean Dollar","exponent":2,"symbol":"EC$"},{"currencyCode":"XOF","description":"CFA Franc BCEAO","exponent":0,"symbol":""},{"currencyCode":"XPF","description":"CFP Franc","exponent":0,"symbol":""},{"currencyCode":"YER","description":"Yemeni Rial","exponent":2,"symbol":""},{"currencyCode":"ZAR","description":"South African Rand","exponent":2,"symbol":"R"},{"currencyCode":"ZMK","description":"Zambia Kwacha","exponent":2,"symbol":""},{"currencyCode":"ZMW","description":"Zambian Kwacha","exponent":2,"symbol":""}]');
|
|
2548
|
-
const ALLOWED_PAYOUT_CURRENCIES = Object.keys(Currencies);
|
|
2549
|
-
const PreferredCurrency = (props) => {
|
|
2550
|
-
const { country, preferredCurrency, handleChangeFor } = props;
|
|
2551
|
-
const { t } = useTranslation(["common", "banking"]);
|
|
2552
|
-
const currencyDescriptionByCode = new Map(
|
|
2553
|
-
currenciesDataset.map((currency) => [currency.currencyCode, currency.description])
|
|
2554
|
-
);
|
|
2555
|
-
const getPrioritizedCurrencies = () => {
|
|
2556
|
-
const countryPreferredCurrencies = currencyByCountry[country] || [];
|
|
2557
|
-
const allowedCountryCurrencies = countryPreferredCurrencies.filter(
|
|
2558
|
-
(currency) => ALLOWED_PAYOUT_CURRENCIES.includes(currency)
|
|
2559
|
-
);
|
|
2560
|
-
const otherAllowedCurrencies = ALLOWED_PAYOUT_CURRENCIES.filter(
|
|
2561
|
-
(currency) => !allowedCountryCurrencies.includes(currency)
|
|
2562
|
-
);
|
|
2563
|
-
if (allowedCountryCurrencies.length > 0 && otherAllowedCurrencies.length > 0) {
|
|
2564
|
-
return [...allowedCountryCurrencies, null, ...otherAllowedCurrencies];
|
|
2565
|
-
}
|
|
2566
|
-
return [...allowedCountryCurrencies, ...otherAllowedCurrencies];
|
|
2567
|
-
};
|
|
2568
|
-
const prioritizedCurrencies = getPrioritizedCurrencies();
|
|
2569
|
-
const currenciesAsOptions = prioritizedCurrencies.map((currency) => {
|
|
2570
|
-
if (currency === null) {
|
|
2571
|
-
return {
|
|
2572
|
-
id: "separator",
|
|
2573
|
-
name: " ",
|
|
2574
|
-
disabled: true
|
|
2575
|
-
};
|
|
2576
|
-
}
|
|
2577
|
-
const description2 = currencyDescriptionByCode.get(currency);
|
|
2578
|
-
const label = description2 ? `${description2} (${currency})` : currency;
|
|
2579
|
-
return {
|
|
2580
|
-
id: currency,
|
|
2581
|
-
name: label
|
|
2582
|
-
};
|
|
2583
|
-
});
|
|
2584
|
-
const selectCurrency = (e) => {
|
|
2585
|
-
if (e.id === "separator") {
|
|
2586
|
-
return;
|
|
2587
|
-
}
|
|
2588
|
-
handleChangeFor("preferredCurrency")(e.id);
|
|
2589
|
-
};
|
|
2590
|
-
return /* @__PURE__ */ jsx(
|
|
2591
|
-
Field,
|
|
2592
|
-
{
|
|
2593
|
-
name: "preferredCurrency",
|
|
2594
|
-
label: t(($) => $["preferredPayoutCurrency"], { ns: "banking" }),
|
|
2595
|
-
helper: t(($) => $["ifYouChooseAPayoutCurrencyThatDoesntMatchYourBankAccount"], {
|
|
2596
|
-
ns: "banking"
|
|
2597
|
-
}),
|
|
2598
|
-
helperPosition: "below",
|
|
2599
|
-
children: (childProps) => /* @__PURE__ */ jsx(
|
|
2600
|
-
Select,
|
|
2601
|
-
{
|
|
2602
|
-
...childProps,
|
|
2603
|
-
onSelect: selectCurrency,
|
|
2604
|
-
name: "preferredPayoutCurrency",
|
|
2605
|
-
placeholder: t(($) => $["localFormat"], { ns: "banking" }),
|
|
2606
|
-
selected: preferredCurrency,
|
|
2607
|
-
items: currenciesAsOptions || []
|
|
2608
|
-
}
|
|
2609
|
-
)
|
|
2610
|
-
}
|
|
2611
|
-
);
|
|
2612
|
-
};
|
|
2613
|
-
const getMustHaveSameAccountHolderNameTransKey = (legalEntityType) => {
|
|
2614
|
-
switch (legalEntityType) {
|
|
2615
|
-
case "individual":
|
|
2616
|
-
case "soleProprietorship":
|
|
2617
|
-
return "theBankAccountHolderMustBeInYourName";
|
|
2618
|
-
case "organization":
|
|
2619
|
-
case "trust":
|
|
2620
|
-
case "unincorporatedPartnership":
|
|
2621
|
-
return "theBankAccountHolderMustHaveTheSameNameAsYourCompany";
|
|
2622
|
-
default:
|
|
2623
|
-
return "theBankAccountHolderMustHaveTheSameNameAsYourCompany";
|
|
2624
|
-
}
|
|
2625
|
-
};
|
|
2626
|
-
const payoutModalContent = "adyen-kyc-payout-modal-content";
|
|
2627
|
-
const title = "adyen-kyc-title";
|
|
2628
|
-
const section = "adyen-kyc-section";
|
|
2629
|
-
const sectionTitle = "adyen-kyc-section-title";
|
|
2630
|
-
const sectionText = "adyen-kyc-section-text";
|
|
2631
|
-
const simplerTermsBox = "adyen-kyc-simpler-terms-box";
|
|
2632
|
-
const simplerTermsTitle = "adyen-kyc-simpler-terms-title";
|
|
2633
|
-
const bulletList = "adyen-kyc-bullet-list";
|
|
2634
|
-
const styles$1 = {
|
|
2635
|
-
payoutModalContent,
|
|
2636
|
-
title,
|
|
2637
|
-
section,
|
|
2638
|
-
sectionTitle,
|
|
2639
|
-
sectionText,
|
|
2640
|
-
simplerTermsBox,
|
|
2641
|
-
simplerTermsTitle,
|
|
2642
|
-
bulletList
|
|
2643
|
-
};
|
|
2644
|
-
function PayoutRequirementsModal({
|
|
2645
|
-
isOpen,
|
|
2646
|
-
onClose,
|
|
2647
|
-
provider
|
|
2648
|
-
}) {
|
|
2649
|
-
const { t } = useTranslation("banking");
|
|
2650
|
-
if (!isOpen) return null;
|
|
2651
|
-
return /* @__PURE__ */ jsx(
|
|
2652
|
-
Modal,
|
|
2653
|
-
{
|
|
2654
|
-
ariaLabel: t(($) => $["aboutPayoutBankAccounts"]),
|
|
2655
|
-
onClose,
|
|
2656
|
-
size: "medium",
|
|
2657
|
-
showCloseButton: true,
|
|
2658
|
-
inset: true,
|
|
2659
|
-
children: /* @__PURE__ */ jsxs("div", { className: styles$1.payoutModalContent, children: [
|
|
2660
|
-
/* @__PURE__ */ jsx(Typography, { variant: "title-m", el: "h1", className: styles$1.title, children: t(($) => $["aboutPayoutBankAccounts"]) }),
|
|
2661
|
-
/* @__PURE__ */ jsxs("div", { className: styles$1.section, children: [
|
|
2662
|
-
/* @__PURE__ */ jsx(Typography, { variant: "body-strongest", el: "h3", className: styles$1.sectionTitle, children: t(($) => $["doesMyBankAccountNeedToBeInSameCountry"]) }),
|
|
2663
|
-
/* @__PURE__ */ jsx(Typography, { variant: "body", className: styles$1.sectionText, children: t(($) => $["countryDependsExplanation"]) })
|
|
2664
|
-
] }),
|
|
2665
|
-
/* @__PURE__ */ jsxs("div", { className: styles$1.section, children: [
|
|
2666
|
-
/* @__PURE__ */ jsx(Typography, { variant: "body-strongest", el: "h3", className: styles$1.sectionTitle, children: t(($) => $["whichPayoutCurrencyShouldIChoose"]) }),
|
|
2667
|
-
/* @__PURE__ */ jsx(Typography, { variant: "body", className: styles$1.sectionText, children: t(($) => $["currencyRecommendation"]) }),
|
|
2668
|
-
/* @__PURE__ */ jsxs("div", { className: styles$1.simplerTermsBox, children: [
|
|
2669
|
-
/* @__PURE__ */ jsx(Typography, { variant: "body-strongest", el: "h4", className: styles$1.simplerTermsTitle, children: t(($) => $["inSimplerTerms"]) }),
|
|
2670
|
-
/* @__PURE__ */ jsx(Typography, { variant: "body", children: t(($) => $["currencySimplerTerms"]) })
|
|
2671
|
-
] })
|
|
2672
|
-
] }),
|
|
2673
|
-
provider && /* @__PURE__ */ jsxs("div", { className: styles$1.section, children: [
|
|
2674
|
-
/* @__PURE__ */ jsx(Typography, { variant: "body-strongest", el: "h3", className: styles$1.sectionTitle, children: t(($) => $["howDoesVerificationWithOurPartnerWork"], {
|
|
2675
|
-
provider: provider?.name
|
|
2676
|
-
}) }),
|
|
2677
|
-
/* @__PURE__ */ jsx(Typography, { className: styles$1.sectionText, children: t(($) => $["isOurTrustedPartnerHelpingSpeedUpSetup"], {
|
|
2678
|
-
provider: provider?.name
|
|
2679
|
-
}) }),
|
|
2680
|
-
/* @__PURE__ */ jsxs("ul", { className: styles$1.bulletList, children: [
|
|
2681
|
-
/* @__PURE__ */ jsx("li", { children: t(($) => $["selectTheBankToReceivePayouts"]) }),
|
|
2682
|
-
/* @__PURE__ */ jsx("li", { children: t(($) => $["loginIntoYourBankingEnvironment"]) }),
|
|
2683
|
-
/* @__PURE__ */ jsx("li", { children: t(($) => $["yourBankWillConfirmYourAccountDetails"]) })
|
|
2684
|
-
] }),
|
|
2685
|
-
/* @__PURE__ */ jsx(Typography, { children: t(($) => $["adyenWillOnlyGetTemporaryAccess"]) })
|
|
2686
|
-
] })
|
|
2687
|
-
] })
|
|
2688
|
-
}
|
|
2689
|
-
);
|
|
2690
|
-
}
|
|
2691
|
-
const payoutCountryDetailsFields = [
|
|
2692
|
-
"bankCountry",
|
|
2693
|
-
"preferredCurrency"
|
|
2694
|
-
];
|
|
2695
|
-
const DEFAULT_CURRENCY_FALLBACK = "USD";
|
|
2696
|
-
const getDefaultCurrencyForCountry = (country) => currencyByCountry[country]?.[0] ?? DEFAULT_CURRENCY_FALLBACK;
|
|
2697
|
-
const getCountryCodeFromEvent = (event) => event?.target?.value;
|
|
2698
|
-
function PayoutCountryDetails(props) {
|
|
2699
|
-
const {
|
|
2700
|
-
legalEntityResponse,
|
|
2701
|
-
data: propData,
|
|
2702
|
-
provider,
|
|
2703
|
-
handleFieldChange,
|
|
2704
|
-
valid: propValid,
|
|
2705
|
-
errors: propErrors,
|
|
2706
|
-
fieldValidationErrors: propFieldValidationErrors
|
|
2707
|
-
} = props;
|
|
2708
|
-
const { t: commonT } = useTranslation("common");
|
|
2709
|
-
const { t } = useTranslation("banking");
|
|
2710
|
-
const { isSettingEnabled } = useSettingsContext();
|
|
2711
|
-
const country = getLegalEntityCountry(legalEntityResponse);
|
|
2712
|
-
const [isModalOpen, setIsModalOpen] = useState(false);
|
|
2713
|
-
const legalEntityType = legalEntityResponse.type;
|
|
2714
|
-
const defaultCurrency = getDefaultCurrencyForCountry(country);
|
|
2715
|
-
const localForm = useForm({
|
|
2716
|
-
...props,
|
|
2717
|
-
schema: payoutCountryDetailsFields,
|
|
2718
|
-
defaultData: {
|
|
2719
|
-
bankCountry: propData?.bankCountry ?? country,
|
|
2720
|
-
preferredCurrency: propData?.preferredCurrency ?? defaultCurrency
|
|
2721
|
-
},
|
|
2722
|
-
shouldValidate: true
|
|
2723
|
-
});
|
|
2724
|
-
const useMultiFormMode = !!handleFieldChange;
|
|
2725
|
-
const data = useMultiFormMode ? propData : localForm.data;
|
|
2726
|
-
const valid = useMultiFormMode ? propValid : localForm.valid;
|
|
2727
|
-
const errors = useMultiFormMode ? propErrors : localForm.errors;
|
|
2728
|
-
const fieldProblems = useMultiFormMode ? propFieldValidationErrors : localForm.fieldProblems;
|
|
2729
|
-
const handleChange = useMultiFormMode ? handleFieldChange : localForm.handleChangeFor;
|
|
2730
|
-
const formUtils = createFormUtils(props, commonT);
|
|
2731
|
-
const allowedBankCountries = Object.keys(currencyByCountry);
|
|
2732
|
-
const canChangeEntityType = isSettingEnabled(SettingNames.AllowLegalEntityTypeChange);
|
|
2733
|
-
const accountHolder = getPayoutAccountHolderName(legalEntityResponse, t);
|
|
2734
|
-
const description2 = canChangeEntityType ? /* @__PURE__ */ jsx(AccountHolderDescriptionFragment, { legalEntityResponse }) : /* @__PURE__ */ jsxs(Typography, { children: [
|
|
2735
|
-
t(($) => $["forYouToReceiveYourPayouts"]),
|
|
2736
|
-
" ",
|
|
2737
|
-
/* @__PURE__ */ jsx(
|
|
2738
|
-
Trans,
|
|
2739
|
-
{
|
|
2740
|
-
t,
|
|
2741
|
-
ns: "banking",
|
|
2742
|
-
i18nKey: ($) => $[getMustHaveSameAccountHolderNameTransKey(legalEntityType)],
|
|
2743
|
-
values: { name: accountHolder, companyName: accountHolder }
|
|
2744
|
-
}
|
|
2745
|
-
)
|
|
2746
|
-
] });
|
|
2747
|
-
const descriptionExtra = /* @__PURE__ */ jsx("div", { className: "adyen-kyc-u-margin-bottom-12", children: /* @__PURE__ */ jsx(
|
|
2748
|
-
Trans,
|
|
2749
|
-
{
|
|
2750
|
-
t,
|
|
2751
|
-
ns: "banking",
|
|
2752
|
-
i18nKey: ($) => $["payoutAccountsMustMeetSomeRequirements"],
|
|
2753
|
-
components: {
|
|
2754
|
-
requirementsLink: /* @__PURE__ */ jsx(
|
|
2755
|
-
"button",
|
|
2756
|
-
{
|
|
2757
|
-
type: "button",
|
|
2758
|
-
onClick: () => setIsModalOpen(true),
|
|
2759
|
-
style: {
|
|
2760
|
-
background: "none",
|
|
2761
|
-
border: "none",
|
|
2762
|
-
color: "inherit",
|
|
2763
|
-
textDecoration: "underline",
|
|
2764
|
-
cursor: "pointer",
|
|
2765
|
-
padding: 0,
|
|
2766
|
-
font: "inherit"
|
|
2767
|
-
}
|
|
2768
|
-
}
|
|
2769
|
-
)
|
|
2770
|
-
}
|
|
2771
|
-
}
|
|
2772
|
-
) });
|
|
2773
|
-
const { updateStateSlice } = useGlobalDataSlice(
|
|
2774
|
-
"payoutCountryDetails"
|
|
2775
|
-
);
|
|
2776
|
-
useEffect(() => {
|
|
2777
|
-
if (!useMultiFormMode) {
|
|
2778
|
-
updateStateSlice({
|
|
2779
|
-
data: localForm.data,
|
|
2780
|
-
valid: localForm.valid,
|
|
2781
|
-
errors: localForm.errors,
|
|
2782
|
-
fieldProblems: localForm.fieldProblems
|
|
2783
|
-
});
|
|
2784
|
-
}
|
|
2785
|
-
}, [
|
|
2786
|
-
localForm.data,
|
|
2787
|
-
localForm.valid,
|
|
2788
|
-
localForm.errors,
|
|
2789
|
-
updateStateSlice,
|
|
2790
|
-
localForm.fieldProblems,
|
|
2791
|
-
useMultiFormMode
|
|
2792
|
-
]);
|
|
2793
|
-
const updateCountryField = (event) => {
|
|
2794
|
-
const updatedCountry = getCountryCodeFromEvent(event);
|
|
2795
|
-
handleChange("bankCountry", "input")(updatedCountry);
|
|
2796
|
-
handleChange("preferredCurrency", "input")(getDefaultCurrencyForCountry(updatedCountry));
|
|
2797
|
-
};
|
|
2798
|
-
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2799
|
-
/* @__PURE__ */ jsxs("form", { style: { minHeight: "480px" }, children: [
|
|
2800
|
-
/* @__PURE__ */ jsx(Header, { title: t(($) => $["payoutBankAccount"]), children: /* @__PURE__ */ jsxs("div", { slot: "description", className: "adyen-kyc-form-header__description", children: [
|
|
2801
|
-
description2,
|
|
2802
|
-
descriptionExtra
|
|
2803
|
-
] }) }),
|
|
2804
|
-
/* @__PURE__ */ jsx(
|
|
2805
|
-
CountryField,
|
|
2806
|
-
{
|
|
2807
|
-
data: { country: data?.bankCountry },
|
|
2808
|
-
valid: { country: valid?.bankCountry ?? true },
|
|
2809
|
-
errors: { country: formUtils.getErrorMessage("bankCountry", errors, fieldProblems) },
|
|
2810
|
-
labels: { country: t(($) => $["bankAccountCountryRegion"]) },
|
|
2811
|
-
readonly: false,
|
|
2812
|
-
allowedCountries: allowedBankCountries,
|
|
2813
|
-
handleChangeFor: () => updateCountryField
|
|
2814
|
-
}
|
|
2815
|
-
),
|
|
2816
|
-
/* @__PURE__ */ jsx(
|
|
2817
|
-
PreferredCurrency,
|
|
2818
|
-
{
|
|
2819
|
-
country: data?.bankCountry ?? country,
|
|
2820
|
-
preferredCurrency: data?.preferredCurrency ?? defaultCurrency,
|
|
2821
|
-
handleChangeFor: handleChange
|
|
2822
|
-
}
|
|
2823
|
-
)
|
|
2824
|
-
] }),
|
|
2825
|
-
/* @__PURE__ */ jsx(
|
|
2826
|
-
PayoutRequirementsModal,
|
|
2827
|
-
{
|
|
2828
|
-
isOpen: isModalOpen,
|
|
2829
|
-
onClose: () => setIsModalOpen(false),
|
|
2830
|
-
provider
|
|
2831
|
-
}
|
|
2832
|
-
)
|
|
2833
|
-
] });
|
|
2834
|
-
}
|
|
2835
|
-
const regions = {
|
|
2836
|
-
europe: [
|
|
2837
|
-
...EEA_Countries,
|
|
2838
|
-
CountryCodes.Switzerland,
|
|
2839
|
-
CountryCodes.UnitedKingdom,
|
|
2840
|
-
CountryCodes.Gibraltar
|
|
2841
|
-
],
|
|
2842
|
-
apac: [CountryCodes.NewZealand, CountryCodes.Australia]
|
|
2843
|
-
};
|
|
2844
|
-
const getAllowedBankCountries = (country) => Object.values(regions).find((countriesInARegion) => countriesInARegion.includes(country)) ?? [
|
|
2845
|
-
country
|
|
2846
|
-
];
|
|
2847
|
-
const tinkLogo = lazy(() => import("./tink-logo-DDyjz5eJ.js"));
|
|
2848
|
-
const plaidLogo = lazy(() => import("./plaid-logo-FsZ7kfL-.js"));
|
|
2849
|
-
const yapilyLogo = lazy(() => import("./yapily-logo-BduxhNRA.js"));
|
|
2850
|
-
const instantVerificationImage = lazy(
|
|
2851
|
-
() => import("./payout-verification-instant-BzpfOQLD.js")
|
|
2852
|
-
);
|
|
2853
|
-
const manualVerificationImage = lazy(
|
|
2854
|
-
() => import("./payout-verification-manual-gNEoeZkV.js")
|
|
2855
|
-
);
|
|
2856
|
-
const getProviderIconName = (providerName) => {
|
|
2857
|
-
switch (providerName?.toLowerCase()) {
|
|
2858
|
-
case "tink":
|
|
2859
|
-
return tinkLogo;
|
|
2860
|
-
case "plaid":
|
|
2861
|
-
return plaidLogo;
|
|
2862
|
-
case "yapily":
|
|
2863
|
-
return yapilyLogo;
|
|
2864
|
-
default:
|
|
2865
|
-
return void 0;
|
|
2866
|
-
}
|
|
2867
|
-
};
|
|
2868
|
-
const makePayoutVerificationMethodsMetadata = (instantVerificationProviderName) => ({
|
|
2869
|
-
instantVerification: {
|
|
2870
|
-
name: "verifyViaMobileBankingAppOrWebsite",
|
|
2871
|
-
subtitle: "instant",
|
|
2872
|
-
svgImport: instantVerificationImage,
|
|
2873
|
-
description: "instantVerificationDescription",
|
|
2874
|
-
provider: instantVerificationProviderName ? {
|
|
2875
|
-
name: instantVerificationProviderName,
|
|
2876
|
-
svgImport: getProviderIconName(instantVerificationProviderName)
|
|
2877
|
-
} : void 0
|
|
2878
|
-
},
|
|
2879
|
-
manualVerification: {
|
|
2880
|
-
name: "uploadABankStatement",
|
|
2881
|
-
subtitle: "mayTakeAFewDays",
|
|
2882
|
-
description: "manualVerificationDescription",
|
|
2883
|
-
svgImport: manualVerificationImage
|
|
2884
|
-
}
|
|
2885
|
-
});
|
|
2886
|
-
const instantVerificationError = "adyen-kyc-instant-verification-error";
|
|
2887
|
-
const payoutVerificationMethodCard = "adyen-kyc-payout-verification-method-card";
|
|
2888
|
-
const payoutVerificationMethodCardImage = "adyen-kyc-payout-verification-method-card-image";
|
|
2889
|
-
const payoutVerificationMethodCardContent = "adyen-kyc-payout-verification-method-card-content";
|
|
2890
|
-
const payoutVerificationMethodCardTitle = "adyen-kyc-payout-verification-method-card-title";
|
|
2891
|
-
const payoutVerificationMethodCardSubtitle = "adyen-kyc-payout-verification-method-card-subtitle";
|
|
2892
|
-
const payoutVerificationMethodCardBody = "adyen-kyc-payout-verification-method-card-body";
|
|
2893
|
-
const payoutVerificationMethodCardImageContainer = "adyen-kyc-payout-verification-method-card-image-container";
|
|
2894
|
-
const styles = {
|
|
2895
|
-
instantVerificationError,
|
|
2896
|
-
payoutVerificationMethodCard,
|
|
2897
|
-
payoutVerificationMethodCardImage,
|
|
2898
|
-
payoutVerificationMethodCardContent,
|
|
2899
|
-
payoutVerificationMethodCardTitle,
|
|
2900
|
-
payoutVerificationMethodCardSubtitle,
|
|
2901
|
-
payoutVerificationMethodCardBody,
|
|
2902
|
-
payoutVerificationMethodCardImageContainer
|
|
2903
|
-
};
|
|
2904
|
-
const PayoutVerificationMethodOptionIcon = ({
|
|
2905
|
-
method,
|
|
2906
|
-
methodsMetadata
|
|
2907
|
-
}) => {
|
|
2908
|
-
const { svgImport } = methodsMetadata[method];
|
|
2909
|
-
return /* @__PURE__ */ jsx(Image, { className: styles.payoutVerificationMethodCardImage, lazyLoadedImage: svgImport });
|
|
2910
|
-
};
|
|
2911
|
-
const PayoutVerificationMethodOptionCard = ({
|
|
2912
|
-
payoutMethod,
|
|
2913
|
-
title: title2,
|
|
2914
|
-
subtitle,
|
|
2915
|
-
tag,
|
|
2916
|
-
selectVerificationMethod,
|
|
2917
|
-
payoutVerificationMethod,
|
|
2918
|
-
methodsMetadata,
|
|
2919
|
-
bankInfoValidated,
|
|
2920
|
-
instantVerificationAvailable
|
|
2921
|
-
}) => {
|
|
2922
|
-
const isInstantVerificationCard = payoutMethod === "instantVerification";
|
|
2923
|
-
const isCardDisabled = bankInfoValidated || isInstantVerificationCard && !instantVerificationAvailable;
|
|
2924
|
-
return /* @__PURE__ */ jsx(
|
|
2925
|
-
Card,
|
|
2926
|
-
{
|
|
2927
|
-
onClick: () => selectVerificationMethod(payoutMethod),
|
|
2928
|
-
disabled: isCardDisabled,
|
|
2929
|
-
selected: payoutMethod === payoutVerificationMethod,
|
|
2930
|
-
padding: "none",
|
|
2931
|
-
children: /* @__PURE__ */ jsxs(
|
|
2932
|
-
"div",
|
|
2933
|
-
{
|
|
2934
|
-
className: cx(styles.payoutVerificationMethodCardBody, styles.payoutVerificationMethodCard),
|
|
2935
|
-
children: [
|
|
2936
|
-
/* @__PURE__ */ jsx("div", { className: styles.payoutVerificationMethodCardImageContainer, children: /* @__PURE__ */ jsx(
|
|
2937
|
-
PayoutVerificationMethodOptionIcon,
|
|
2938
|
-
{
|
|
2939
|
-
method: payoutMethod,
|
|
2940
|
-
methodsMetadata
|
|
2941
|
-
}
|
|
2942
|
-
) }),
|
|
2943
|
-
/* @__PURE__ */ jsxs("div", { className: styles.payoutVerificationMethodCardContent, children: [
|
|
2944
|
-
tag,
|
|
2945
|
-
/* @__PURE__ */ jsx(
|
|
2946
|
-
Typography,
|
|
2947
|
-
{
|
|
2948
|
-
el: "h4",
|
|
2949
|
-
variant: "body-strongest",
|
|
2950
|
-
className: styles.payoutVerificationMethodCardTitle,
|
|
2951
|
-
children: title2
|
|
2952
|
-
}
|
|
2953
|
-
),
|
|
2954
|
-
/* @__PURE__ */ jsx(
|
|
2955
|
-
Typography,
|
|
2956
|
-
{
|
|
2957
|
-
el: "p",
|
|
2958
|
-
variant: "body",
|
|
2959
|
-
color: "secondary",
|
|
2960
|
-
className: styles.payoutVerificationMethodCardSubtitle,
|
|
2961
|
-
children: subtitle
|
|
2962
|
-
}
|
|
2963
|
-
)
|
|
2964
|
-
] })
|
|
2965
|
-
]
|
|
2966
|
-
}
|
|
2967
|
-
)
|
|
2968
|
-
},
|
|
2969
|
-
payoutMethod
|
|
2970
|
-
);
|
|
2971
|
-
};
|
|
2972
|
-
const payoutVerificationMethodFields = ["payoutVerificationMethod", "bankCountry", ...accountVerificationFields];
|
|
2973
|
-
function PayoutVerificationMethod(props) {
|
|
2974
|
-
const {
|
|
2975
|
-
heading,
|
|
2976
|
-
country,
|
|
2977
|
-
accountHolder,
|
|
2978
|
-
provider,
|
|
2979
|
-
bankVendorsLoadingStatus,
|
|
2980
|
-
instantVerificationAvailable,
|
|
2981
|
-
legalEntityResponse,
|
|
2982
|
-
validators,
|
|
2983
|
-
bankInfoValidated,
|
|
2984
|
-
data: payoutVerificationMethodData,
|
|
2985
|
-
fieldValidationErrors,
|
|
2986
|
-
formVerificationErrors,
|
|
2987
|
-
handleFieldChange,
|
|
2988
|
-
valid: propValid,
|
|
2989
|
-
errors: propErrors
|
|
2990
|
-
} = props;
|
|
2991
|
-
const { type: legalEntityType } = legalEntityResponse;
|
|
2992
|
-
const { t } = useTranslation("banking");
|
|
2993
|
-
const { t: commonT } = useTranslation("common");
|
|
2994
|
-
const instantVerificationError2 = useContext(InstantVerificationErrorContext);
|
|
2995
|
-
const { isSettingEnabled } = useSettingsContext();
|
|
2996
|
-
const { isFeatureEnabled } = useToggleContext();
|
|
2997
|
-
const canChangeEntityType = isSettingEnabled(SettingNames.AllowLegalEntityTypeChange);
|
|
2998
|
-
const intraRegionCrossBorderPayoutsAllowed = isSettingEnabled(
|
|
2999
|
-
SettingNames.AllowIntraRegionCrossBorderPayout
|
|
3000
|
-
);
|
|
3001
|
-
const [hasSelectedMethod, setHasSelectedMethod] = useState(false);
|
|
3002
|
-
const localForm = useForm({
|
|
3003
|
-
...props,
|
|
3004
|
-
schema: payoutVerificationMethodFields,
|
|
3005
|
-
defaultData: {
|
|
3006
|
-
verifiedAccountHolder: accountHolder,
|
|
3007
|
-
verifiedCurrencyCode: currencyByCountry[country]?.[0],
|
|
3008
|
-
bankCountry: country,
|
|
3009
|
-
...payoutVerificationMethodData
|
|
3010
|
-
},
|
|
3011
|
-
rules: validators || {
|
|
3012
|
-
payoutVerificationMethod: {
|
|
3013
|
-
modes: ["blur"],
|
|
3014
|
-
validate: (payoutVerificationMethod) => !!payoutVerificationMethod
|
|
3015
|
-
}
|
|
3016
|
-
},
|
|
3017
|
-
fieldProblems: fieldValidationErrors
|
|
3018
|
-
});
|
|
3019
|
-
const useMultiFormMode = !!handleFieldChange;
|
|
3020
|
-
const data = useMultiFormMode ? payoutVerificationMethodData : localForm.data;
|
|
3021
|
-
const valid = useMultiFormMode ? propValid : localForm.valid;
|
|
3022
|
-
const errors = useMultiFormMode ? propErrors : localForm.errors;
|
|
3023
|
-
const fieldProblems = useMultiFormMode ? fieldValidationErrors : localForm.fieldProblems;
|
|
3024
|
-
const handleChange = useMultiFormMode ? handleFieldChange : localForm.handleChangeFor;
|
|
3025
|
-
const formUtils = createFormUtils(props, commonT);
|
|
3026
|
-
const { sliceData, updateStateSlice } = useGlobalDataSlice("payoutVerificationMethod");
|
|
3027
|
-
const { clearStateSlice: clearPayoutAccountDetails } = useGlobalDataSlice("payoutAccountDetails");
|
|
3028
|
-
useEffect(() => {
|
|
3029
|
-
if (!useMultiFormMode) {
|
|
3030
|
-
updateStateSlice({
|
|
3031
|
-
data: { ...sliceData, ...localForm.data },
|
|
3032
|
-
errors: localForm.errors,
|
|
3033
|
-
valid: localForm.valid,
|
|
3034
|
-
fieldProblems: localForm.fieldProblems
|
|
3035
|
-
});
|
|
3036
|
-
}
|
|
3037
|
-
}, [localForm.data, localForm.errors, localForm.fieldProblems, localForm.valid]);
|
|
3038
|
-
const methodsMetadata = makePayoutVerificationMethodsMetadata(provider?.name);
|
|
3039
|
-
const selectVerificationMethod = (method) => {
|
|
3040
|
-
setHasSelectedMethod(true);
|
|
3041
|
-
handleChange("payoutVerificationMethod")(method);
|
|
3042
|
-
};
|
|
3043
|
-
useEffect(() => {
|
|
3044
|
-
if (bankInfoValidated) return;
|
|
3045
|
-
if (!hasSelectedMethod && instantVerificationAvailable && data?.payoutVerificationMethod !== "instantVerification") {
|
|
3046
|
-
handleChange("payoutVerificationMethod")("instantVerification");
|
|
3047
|
-
}
|
|
3048
|
-
if (!instantVerificationAvailable && data?.payoutVerificationMethod !== "manualVerification") {
|
|
3049
|
-
handleChange("payoutVerificationMethod")("manualVerification");
|
|
3050
|
-
}
|
|
3051
|
-
}, [
|
|
3052
|
-
data?.payoutVerificationMethod,
|
|
3053
|
-
handleChange,
|
|
3054
|
-
instantVerificationAvailable,
|
|
3055
|
-
hasSelectedMethod,
|
|
3056
|
-
bankInfoValidated
|
|
3057
|
-
]);
|
|
3058
|
-
const { dataset: countries } = useDataset(datasetIdentifier.country);
|
|
3059
|
-
const bankCountryName = countries.find((country2) => country2.id === data?.bankCountry)?.name ?? data?.bankCountry;
|
|
3060
|
-
const allowedBankCountries = getAllowedBankCountries(country);
|
|
3061
|
-
const countryField = /* @__PURE__ */ jsx(
|
|
3062
|
-
CountryField,
|
|
3063
|
-
{
|
|
3064
|
-
data: { country: data?.bankCountry },
|
|
3065
|
-
valid: { country: valid?.bankCountry ?? true },
|
|
3066
|
-
errors: { country: formUtils.getErrorMessage("bankCountry", errors, fieldProblems) },
|
|
3067
|
-
labels: { country: t(($) => $["bankAccountCountryRegion"]) },
|
|
3068
|
-
readonly: !intraRegionCrossBorderPayoutsAllowed || allowedBankCountries.length === 1 || bankInfoValidated,
|
|
3069
|
-
allowedCountries: allowedBankCountries,
|
|
3070
|
-
handleChangeFor: () => (e) => {
|
|
3071
|
-
if (!useMultiFormMode) {
|
|
3072
|
-
clearPayoutAccountDetails();
|
|
3073
|
-
}
|
|
3074
|
-
return handleChange("bankCountry", "input")(e);
|
|
3075
|
-
},
|
|
3076
|
-
helperText: intraRegionCrossBorderPayoutsAllowed ? void 0 : t(
|
|
3077
|
-
($) => $[legalEntityType === LegalEntityTypes.INDIVIDUAL ? "youCanOnlyUseABankAccountInTheCountryRegionWhereYouLive" : "youCanOnlyUseABankAccountInTheCountryRegionWhereYourCompanyIsRegistered"]
|
|
3078
|
-
)
|
|
3079
|
-
}
|
|
3080
|
-
);
|
|
3081
|
-
const description2 = canChangeEntityType ? /* @__PURE__ */ jsx(AccountHolderDescriptionFragment, { legalEntityResponse }) : /* @__PURE__ */ jsxs(Typography, { children: [
|
|
3082
|
-
t(($) => $["forYouToReceiveYourPayouts"]),
|
|
3083
|
-
" ",
|
|
3084
|
-
/* @__PURE__ */ jsx(
|
|
3085
|
-
Trans,
|
|
3086
|
-
{
|
|
3087
|
-
t,
|
|
3088
|
-
ns: "banking",
|
|
3089
|
-
i18nKey: ($) => $[getMustHaveSameAccountHolderNameTransKey(legalEntityType)],
|
|
3090
|
-
values: { name: accountHolder, companyName: accountHolder }
|
|
3091
|
-
}
|
|
3092
|
-
)
|
|
3093
|
-
] });
|
|
3094
|
-
const isCrossBorderPayoutEnabled = isFeatureEnabled(FeatureNames.EnableCrossBorderPayouts) && isSettingEnabled(SettingNames.AllowCrossBorderPayout);
|
|
3095
|
-
return /* @__PURE__ */ jsxs("form", { className: styles.payoutVerificationMethod, children: [
|
|
3096
|
-
heading && /* @__PURE__ */ jsx(Header, { title: heading, children: /* @__PURE__ */ jsx("template", { slot: "description", children: description2 }) }),
|
|
3097
|
-
instantVerificationError2 && /* @__PURE__ */ jsx(
|
|
3098
|
-
Alert,
|
|
3099
|
-
{
|
|
3100
|
-
variant: "error",
|
|
3101
|
-
className: styles.instantVerificationError,
|
|
3102
|
-
title: instantVerificationError2.title,
|
|
3103
|
-
children: instantVerificationError2.content && /* @__PURE__ */ jsx("p", { className: "adyen-kyc-u-margin-0", children: instantVerificationError2.content })
|
|
3104
|
-
}
|
|
3105
|
-
),
|
|
3106
|
-
!isCrossBorderPayoutEnabled && countryField,
|
|
3107
|
-
/* @__PURE__ */ jsx(
|
|
3108
|
-
Field,
|
|
3109
|
-
{
|
|
3110
|
-
el: "fieldset",
|
|
3111
|
-
name: "verificationMethods",
|
|
3112
|
-
label: formUtils.getLabel("payoutVerificationMethod", "verificationMethod"),
|
|
3113
|
-
errorMessage: formUtils.getErrorMessage("payoutVerificationMethod", errors, fieldProblems),
|
|
3114
|
-
helper: instantVerificationAvailable ? void 0 : t(($) => $["weDoNotYetSupportInstantVerificationForBankAccountsIn"], {
|
|
3115
|
-
countryName: bankCountryName
|
|
3116
|
-
}),
|
|
3117
|
-
children: () => /* @__PURE__ */ jsxs(StackLayout, { gap: "small", children: [
|
|
3118
|
-
/* @__PURE__ */ jsx(
|
|
3119
|
-
PayoutVerificationMethodOptionCard,
|
|
3120
|
-
{
|
|
3121
|
-
payoutMethod: "instantVerification",
|
|
3122
|
-
title: t(($) => $["logInWithYourBank"]),
|
|
3123
|
-
subtitle: t(($) => $["theFastestWayToVerifyYourAccount"]),
|
|
3124
|
-
tag: /* @__PURE__ */ jsx(Tag, { variant: "blue", className: "adyen-kyc-u-margin-bottom-8", children: t(($) => $["recommended"]) }),
|
|
3125
|
-
selectVerificationMethod,
|
|
3126
|
-
methodsMetadata,
|
|
3127
|
-
payoutVerificationMethod: data?.payoutVerificationMethod,
|
|
3128
|
-
instantVerificationAvailable,
|
|
3129
|
-
bankInfoValidated
|
|
3130
|
-
}
|
|
3131
|
-
),
|
|
3132
|
-
/* @__PURE__ */ jsx(
|
|
3133
|
-
PayoutVerificationMethodOptionCard,
|
|
3134
|
-
{
|
|
3135
|
-
payoutMethod: "manualVerification",
|
|
3136
|
-
title: t(($) => $["verifyManually"]),
|
|
3137
|
-
subtitle: t(($) => $["enterYourAccountsDetailsOnYourOwn"]),
|
|
3138
|
-
selectVerificationMethod,
|
|
3139
|
-
methodsMetadata,
|
|
3140
|
-
payoutVerificationMethod: data?.payoutVerificationMethod
|
|
3141
|
-
}
|
|
3142
|
-
)
|
|
3143
|
-
] })
|
|
3144
|
-
}
|
|
3145
|
-
),
|
|
3146
|
-
/* @__PURE__ */ jsx(
|
|
3147
|
-
ErrorPanel,
|
|
3148
|
-
{
|
|
3149
|
-
verificationErrors: formVerificationErrors,
|
|
3150
|
-
validationErrors: fieldValidationErrors,
|
|
3151
|
-
formUtils,
|
|
3152
|
-
id: "ariaErrorField"
|
|
3153
|
-
}
|
|
3154
|
-
),
|
|
3155
|
-
provider && bankVendorsLoadingStatus === "success" ? /* @__PURE__ */ jsx(
|
|
3156
|
-
ContextGuidance,
|
|
3157
|
-
{
|
|
3158
|
-
titleId: "howDoesVerificationWithOurPartnerWorks",
|
|
3159
|
-
contentId: "bankVerificationWithPartnerSteps",
|
|
3160
|
-
title: t(($) => $["howDoesVerificationWithOurPartnerWork"], {
|
|
3161
|
-
provider: provider.name
|
|
3162
|
-
}),
|
|
3163
|
-
content: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
3164
|
-
/* @__PURE__ */ jsx(Typography, { children: t(($) => $["isOurTrustedPartnerHelpingSpeedUpSetup"], {
|
|
3165
|
-
provider: provider.name
|
|
3166
|
-
}) }),
|
|
3167
|
-
/* @__PURE__ */ jsxs("ul", { children: [
|
|
3168
|
-
/* @__PURE__ */ jsx("li", { children: t(($) => $["selectTheBankToReceivePayouts"]) }),
|
|
3169
|
-
/* @__PURE__ */ jsx("li", { children: t(($) => $["loginIntoYourBankingEnvironment"]) }),
|
|
3170
|
-
/* @__PURE__ */ jsx("li", { children: t(($) => $["yourBankWillConfirmYourAccountDetails"]) })
|
|
3171
|
-
] }),
|
|
3172
|
-
/* @__PURE__ */ jsx(Typography, { children: t(($) => $["adyenWillOnlyGetTemporaryAccess"]) }),
|
|
3173
|
-
/* @__PURE__ */ jsx(Typography, { variant: "caption", children: /* @__PURE__ */ jsx(Link, { href: "https://www.adyen.com/policies-and-disclaimer/privacy-policy", external: true, children: commonT(($) => $["adyenPrivacyPolicy"]) }) })
|
|
3174
|
-
] })
|
|
3175
|
-
}
|
|
3176
|
-
) : void 0
|
|
3177
|
-
] });
|
|
3178
|
-
}
|
|
3179
|
-
const payoutSteps = {
|
|
3180
|
-
payoutCountryDetails: {
|
|
3181
|
-
formId: "payoutCountryDetails",
|
|
3182
|
-
formName: "payoutCountryDetails",
|
|
3183
|
-
fields: payoutCountryDetailsFields
|
|
3184
|
-
},
|
|
3185
|
-
payoutVerificationMethod: {
|
|
3186
|
-
formId: "payoutVerificationMethod",
|
|
3187
|
-
formName: "verificationMethod",
|
|
3188
|
-
fields: payoutVerificationMethodFields
|
|
3189
|
-
},
|
|
3190
|
-
payoutAccountDetails: {
|
|
3191
|
-
formId: "payoutAccountDetails",
|
|
3192
|
-
formName: "bankAccount",
|
|
3193
|
-
fields: payoutAccountFields
|
|
3194
|
-
},
|
|
3195
|
-
payoutAccountDocuments: {
|
|
3196
|
-
formId: "payoutAccountDocuments",
|
|
3197
|
-
formName: "bankDocument",
|
|
3198
|
-
formHeader: "bankDocumentHeader",
|
|
3199
|
-
fields: bankDocumentClassificationFields
|
|
3200
|
-
},
|
|
3201
|
-
payoutAccountVerification: {
|
|
3202
|
-
formId: "payoutAccountVerification",
|
|
3203
|
-
formName: "instantVerification",
|
|
3204
|
-
fields: accountVerificationFields
|
|
3205
|
-
}
|
|
3206
|
-
};
|
|
3207
|
-
const PayoutCountryDetailsFormID = payoutSteps.payoutCountryDetails.formId;
|
|
3208
|
-
const PayoutVerificationMethodFormID = payoutSteps.payoutVerificationMethod.formId;
|
|
3209
|
-
const PayoutAccountDocumentsFormID = payoutSteps.payoutAccountDocuments.formId;
|
|
3210
|
-
const PayoutAccountVerificationFormID = payoutSteps.payoutAccountVerification.formId;
|
|
3211
|
-
function PayoutDetails(props) {
|
|
3212
|
-
const { t } = useTranslation("banking");
|
|
3213
|
-
const { t: commonT } = useTranslation("common");
|
|
3214
|
-
const {
|
|
3215
|
-
activeForm,
|
|
3216
|
-
legalEntityResponse,
|
|
3217
|
-
provider,
|
|
3218
|
-
bankVendorsLoadingStatus,
|
|
3219
|
-
instantVerificationAvailable,
|
|
3220
|
-
setHideSidebar,
|
|
3221
|
-
setSkipSubmit,
|
|
3222
|
-
createTrustedTransferInstrument: createTrustedTransferInstrument2,
|
|
3223
|
-
accountDetailsFromInput,
|
|
3224
|
-
country,
|
|
3225
|
-
accountHolder,
|
|
3226
|
-
data: propData,
|
|
3227
|
-
onBack,
|
|
3228
|
-
trustedTransferInstrumentId,
|
|
3229
|
-
setHasAsyncValidationError
|
|
3230
|
-
} = props;
|
|
3231
|
-
const [instantVerificationError2, setInstantVerificationError] = useInstantVerificationErrorNotification(1e4);
|
|
3232
|
-
const payoutCountryDetailsFormProps = getFormProps(props, PayoutCountryDetailsFormID);
|
|
3233
|
-
const verificationMethodFormProps = getFormProps(props, PayoutVerificationMethodFormID);
|
|
3234
|
-
const accountVerificationFormProps = getFormProps(props, PayoutAccountVerificationFormID);
|
|
3235
|
-
const payoutAccountFormProps = getFormProps(props, payoutSteps.payoutAccountDetails.formId);
|
|
3236
|
-
const bankDocumentFormProps = getFormProps(props, PayoutAccountDocumentsFormID);
|
|
3237
|
-
const { isFeatureEnabled } = useToggleContext();
|
|
3238
|
-
const { isSettingEnabled } = useSettingsContext();
|
|
3239
|
-
const isCrossBorderPayoutsEnabled = isFeatureEnabled(FeatureNames.EnableCrossBorderPayouts) && isSettingEnabled(SettingNames.AllowCrossBorderPayout);
|
|
3240
|
-
const globalData = useGlobalData();
|
|
3241
|
-
const data = isEmpty(globalData) || propData?.payoutAccountDetails?.transferInstrumentId ? propData : globalData;
|
|
3242
|
-
const resetData = useResetGlobalData();
|
|
3243
|
-
const verifyInstantly = data?.payoutVerificationMethod?.payoutVerificationMethod === "instantVerification";
|
|
3244
|
-
const bankCountry = (isCrossBorderPayoutsEnabled ? data?.payoutCountryDetails?.bankCountry : data?.payoutVerificationMethod?.bankCountry) ?? country;
|
|
3245
|
-
useEffect(() => resetData(), [resetData]);
|
|
3246
|
-
useEffect(() => {
|
|
3247
|
-
if (activeForm?.formId === summaryStep.formId && verifyInstantly && trustedTransferInstrumentId) {
|
|
3248
|
-
setSkipSubmit?.(true);
|
|
3249
|
-
}
|
|
3250
|
-
}, [activeForm, trustedTransferInstrumentId]);
|
|
3251
|
-
const [bankInfoValidated, setBankInfoValidated] = useState(false);
|
|
3252
|
-
const [arePayoutAccountDetailsInvalid, setArePayoutAccountDetailsInvalid] = useState(false);
|
|
3253
|
-
const [invalidFieldNames, setInvalidFieldNames] = useState("");
|
|
3254
|
-
const payload = useMemo$1(
|
|
3255
|
-
() => bankCountry && accountDetailsFromInput ? getAccountIdentificationFromPayoutAccountSchema(
|
|
3256
|
-
accountDetailsFromInput,
|
|
3257
|
-
bankCountry,
|
|
3258
|
-
isCrossBorderPayoutsEnabled
|
|
3259
|
-
) : {},
|
|
3260
|
-
[accountDetailsFromInput, bankCountry]
|
|
3261
|
-
);
|
|
3262
|
-
const validateAccountDetails = useAsyncAccountDetailsValidationRules(
|
|
3263
|
-
payload,
|
|
3264
|
-
hasEmptyFields(payload),
|
|
3265
|
-
isAccountIdentifierObscured(payload)
|
|
3266
|
-
);
|
|
3267
|
-
const resetInvalidFieldState = () => {
|
|
3268
|
-
setInvalidFieldNames("");
|
|
3269
|
-
setArePayoutAccountDetailsInvalid(false);
|
|
3270
|
-
};
|
|
3271
|
-
useEffect(() => {
|
|
3272
|
-
if (validateAccountDetails?.invalidFields && validateAccountDetails.invalidFields.length > 0) {
|
|
3273
|
-
setHasAsyncValidationError?.(true);
|
|
3274
|
-
const fieldNames = validateAccountDetails.invalidFields.map((field) => extractFieldName(field.name)).map((key) => commonT(($) => $[key]));
|
|
3275
|
-
const invalidFieldsString = concatenateFieldNames(fieldNames);
|
|
3276
|
-
setInvalidFieldNames(invalidFieldsString);
|
|
3277
|
-
setArePayoutAccountDetailsInvalid(true);
|
|
3278
|
-
} else {
|
|
3279
|
-
setHasAsyncValidationError?.(false);
|
|
3280
|
-
resetInvalidFieldState();
|
|
3281
|
-
}
|
|
3282
|
-
}, [t, validateAccountDetails]);
|
|
3283
|
-
return /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-payout", children: [
|
|
3284
|
-
/* @__PURE__ */ jsx(
|
|
3285
|
-
"div",
|
|
3286
|
-
{
|
|
3287
|
-
className: activeForm?.formId !== "payoutCountryDetails" ? "adyen-kyc-form-wrapper adyen-kyc-form-wrapper--hidden" : "adyen-kyc-form-wrapper",
|
|
3288
|
-
children: /* @__PURE__ */ jsx(
|
|
3289
|
-
PayoutCountryDetails,
|
|
3290
|
-
{
|
|
3291
|
-
...payoutCountryDetailsFormProps,
|
|
3292
|
-
legalEntityResponse,
|
|
3293
|
-
provider
|
|
3294
|
-
}
|
|
3295
|
-
)
|
|
3296
|
-
}
|
|
3297
|
-
),
|
|
3298
|
-
/* @__PURE__ */ jsx(
|
|
3299
|
-
"div",
|
|
3300
|
-
{
|
|
3301
|
-
className: activeForm?.formId !== PayoutVerificationMethodFormID ? "adyen-kyc-form-wrapper adyen-kyc-form-wrapper--hidden" : "adyen-kyc-form-wrapper",
|
|
3302
|
-
children: /* @__PURE__ */ jsx(InstantVerificationErrorContext.Provider, { value: instantVerificationError2, children: /* @__PURE__ */ jsx(
|
|
3303
|
-
PayoutVerificationMethod,
|
|
3304
|
-
{
|
|
3305
|
-
...verificationMethodFormProps,
|
|
3306
|
-
id: PayoutVerificationMethodFormID,
|
|
3307
|
-
heading: t(($) => $["addABankAccountForPayouts"]),
|
|
3308
|
-
country,
|
|
3309
|
-
accountHolder,
|
|
3310
|
-
legalEntityResponse,
|
|
3311
|
-
provider,
|
|
3312
|
-
bankVendorsLoadingStatus,
|
|
3313
|
-
bankInfoValidated,
|
|
3314
|
-
instantVerificationAvailable
|
|
3315
|
-
}
|
|
3316
|
-
) })
|
|
3317
|
-
}
|
|
3318
|
-
),
|
|
3319
|
-
/* @__PURE__ */ jsx(
|
|
3320
|
-
"div",
|
|
3321
|
-
{
|
|
3322
|
-
className: activeForm?.formId !== payoutSteps.payoutAccountDetails.formId ? "adyen-kyc-form-wrapper adyen-kyc-form-wrapper--hidden" : "adyen-kyc-form-wrapper",
|
|
3323
|
-
children: /* @__PURE__ */ jsx(
|
|
3324
|
-
PayoutAccount,
|
|
3325
|
-
{
|
|
3326
|
-
...payoutAccountFormProps,
|
|
3327
|
-
heading: t(($) => $["addABankAccountForPayouts"]),
|
|
3328
|
-
id: payoutSteps.payoutAccountDetails.formId,
|
|
3329
|
-
country: bankCountry,
|
|
3330
|
-
legalEntityResponse,
|
|
3331
|
-
arePayoutAccountDetailsInvalid,
|
|
3332
|
-
invalidFieldNames,
|
|
3333
|
-
preferredCurrencyCode: globalData?.payoutCountryDetails?.preferredCurrency
|
|
3334
|
-
}
|
|
3335
|
-
)
|
|
3336
|
-
}
|
|
3337
|
-
),
|
|
3338
|
-
/* @__PURE__ */ jsx(
|
|
3339
|
-
"div",
|
|
3340
|
-
{
|
|
3341
|
-
className: activeForm?.formId !== PayoutAccountDocumentsFormID ? "adyen-kyc-form-wrapper adyen-kyc-form-wrapper--hidden" : "adyen-kyc-form-wrapper",
|
|
3342
|
-
children: /* @__PURE__ */ jsx(
|
|
3343
|
-
MemoizedBankDocumentClassification,
|
|
3344
|
-
{
|
|
3345
|
-
...bankDocumentFormProps,
|
|
3346
|
-
id: PayoutAccountDocumentsFormID,
|
|
3347
|
-
legalEntity: legalEntityResponse,
|
|
3348
|
-
country: bankCountry,
|
|
3349
|
-
formIsActive: activeForm?.formId === PayoutAccountDocumentsFormID
|
|
3350
|
-
}
|
|
3351
|
-
)
|
|
3352
|
-
}
|
|
3353
|
-
),
|
|
3354
|
-
/* @__PURE__ */ jsx(Show, { when: showInstantVerificationPayoutModal, children: /* @__PURE__ */ jsx(
|
|
3355
|
-
BankVerification,
|
|
3356
|
-
{
|
|
3357
|
-
...accountVerificationFormProps,
|
|
3358
|
-
heading: t(($) => $["bankAccountVerification"]),
|
|
3359
|
-
id: PayoutAccountVerificationFormID,
|
|
3360
|
-
provider,
|
|
3361
|
-
country: bankCountry,
|
|
3362
|
-
onBack,
|
|
3363
|
-
hideSidebar: setHideSidebar,
|
|
3364
|
-
setBankVerificationError: setInstantVerificationError,
|
|
3365
|
-
bankInfoValidated,
|
|
3366
|
-
setBankInfoValidated,
|
|
3367
|
-
formIsActive: activeForm?.formId === PayoutVerificationMethodFormID,
|
|
3368
|
-
createTrustedTransferInstrument: createTrustedTransferInstrument2
|
|
3369
|
-
}
|
|
3370
|
-
) })
|
|
3371
|
-
] });
|
|
3372
|
-
}
|
|
3373
|
-
const rules = ({
|
|
3374
|
-
data,
|
|
3375
|
-
requiredFields,
|
|
3376
|
-
isFeatureEnabled
|
|
3377
|
-
}) => createFormRules({
|
|
3378
|
-
whenUsingManualVerification: () => {
|
|
3379
|
-
if (!data.payoutVerificationMethod) return;
|
|
3380
|
-
if (data?.payoutVerificationMethod?.payoutVerificationMethod === "manualVerification") {
|
|
3381
|
-
return "REQUIRED";
|
|
3382
|
-
}
|
|
3383
|
-
},
|
|
3384
|
-
whenUsingInstantVerification: () => {
|
|
3385
|
-
if (!data.payoutVerificationMethod) {
|
|
3386
|
-
return "REQUIRED";
|
|
3387
|
-
}
|
|
3388
|
-
if (data?.payoutVerificationMethod?.payoutVerificationMethod === "instantVerification") {
|
|
3389
|
-
return "REQUIRED";
|
|
3390
|
-
}
|
|
3391
|
-
},
|
|
3392
|
-
verifiedBankAccountNumber: () => {
|
|
3393
|
-
if (data?.payoutVerificationMethod?.payoutVerificationMethod === "instantVerification") {
|
|
3394
|
-
return "REQUIRED";
|
|
3395
|
-
}
|
|
3396
|
-
},
|
|
3397
|
-
bankStatementRequirement: () => {
|
|
3398
|
-
if (isFeatureEnabled?.("EnablePayoutDetailsMultiForm")) {
|
|
3399
|
-
return "REQUIRED";
|
|
3400
|
-
}
|
|
3401
|
-
if (data?.payoutVerificationMethod?.payoutVerificationMethod === "manualVerification") {
|
|
3402
|
-
return requiredFields?.bankStatementRequirement;
|
|
3403
|
-
}
|
|
3404
|
-
},
|
|
3405
|
-
// "bankStatement description" field is always "optional" and it's coupled with bank statement document.
|
|
3406
|
-
bankStatementDescription: () => {
|
|
3407
|
-
if (data?.payoutVerificationMethod?.payoutVerificationMethod === "manualVerification" && !!requiredFields?.bankStatementRequirement) {
|
|
3408
|
-
return "OPTIONAL";
|
|
3409
|
-
}
|
|
3410
|
-
}
|
|
3411
|
-
});
|
|
3412
|
-
const mapApiDocumentToPayoutDocuments = (entityId) => {
|
|
3413
|
-
const bankStatement = getDocument(entityId, "bankStatement");
|
|
3414
|
-
if (!bankStatement) throw new Error(`bankStatement with id ${entityId} not found`);
|
|
3415
|
-
return {
|
|
3416
|
-
bankStatementDocument: [mapExistingFile(getPageName(bankStatement))],
|
|
3417
|
-
description: bankStatement.description
|
|
3418
|
-
};
|
|
3419
|
-
};
|
|
3420
|
-
const mapPayoutDetailsToTransferInstrument = ({
|
|
3421
|
-
data,
|
|
3422
|
-
legalEntity,
|
|
3423
|
-
enabledCrossBorderPayouts
|
|
3424
|
-
}) => {
|
|
3425
|
-
if (!data.payoutAccountDetails || !data.payoutVerificationMethod) {
|
|
3426
|
-
throw new Error("Missing payout details data");
|
|
3427
|
-
}
|
|
3428
|
-
if (enabledCrossBorderPayouts && !data.payoutCountryDetails) {
|
|
3429
|
-
throw new Error("Missing payout details data");
|
|
3430
|
-
}
|
|
3431
|
-
const bankCountry = enabledCrossBorderPayouts ? data.payoutCountryDetails?.bankCountry : data.payoutVerificationMethod?.bankCountry;
|
|
3432
|
-
const preferredCurrency = enabledCrossBorderPayouts ? data.payoutCountryDetails?.preferredCurrency : void 0;
|
|
3433
|
-
return {
|
|
3434
|
-
bankAccount: mapPayoutAccountSchemaToApiBankAccount(
|
|
3435
|
-
data.payoutAccountDetails,
|
|
3436
|
-
bankCountry,
|
|
3437
|
-
preferredCurrency,
|
|
3438
|
-
enabledCrossBorderPayouts
|
|
3439
|
-
),
|
|
3440
|
-
legalEntityId: legalEntity.id,
|
|
3441
|
-
type: "bankAccount"
|
|
3442
|
-
};
|
|
3443
|
-
};
|
|
3444
|
-
const mapPayoutDocumentsToApiDocuments = async (data, entityId) => {
|
|
3445
|
-
const { bankStatementDocument, description: description2 } = data.payoutAccountDocuments ?? {};
|
|
3446
|
-
if (!bankStatementDocument?.length) {
|
|
3447
|
-
return void 0;
|
|
3448
|
-
}
|
|
3449
|
-
const page1 = bankStatementDocument[0];
|
|
3450
|
-
if (!page1) {
|
|
3451
|
-
throw new Error("Document needs at least one page");
|
|
3452
|
-
}
|
|
3453
|
-
const existingDocument = getDocument(entityId, "bankStatement");
|
|
3454
|
-
return await createDocumentRequest({
|
|
3455
|
-
entityId,
|
|
3456
|
-
entityType: "bankAccount",
|
|
3457
|
-
documentType: "bankStatement",
|
|
3458
|
-
page1,
|
|
3459
|
-
description: description2,
|
|
3460
|
-
existingDocument
|
|
3461
|
-
});
|
|
3462
|
-
};
|
|
3463
|
-
const obscuredPayoutFields = ["bankAccountNumber", "iban"];
|
|
3464
|
-
const payoutDetailsCountryConfig = {
|
|
3465
|
-
[CountryCodes.Canada]: {
|
|
3466
|
-
bankStatementDocument: {
|
|
3467
|
-
label: "listitemVoidedChequeBankLetterBankStatementOnline"
|
|
3468
|
-
}
|
|
3469
|
-
},
|
|
3470
|
-
[CountryCodes.UnitedKingdom]: {
|
|
3471
|
-
bankCity: {
|
|
3472
|
-
label: "bankCityTown"
|
|
3473
|
-
},
|
|
3474
|
-
bankStatementDocument: {
|
|
3475
|
-
label: "listitemVoidedChequeBankLetterBankStatementOnline"
|
|
3476
|
-
}
|
|
3477
|
-
}
|
|
3478
|
-
};
|
|
3479
|
-
const parseConfiguration = ({
|
|
3480
|
-
requiredFields,
|
|
3481
|
-
country,
|
|
3482
|
-
bankVerificationAvailable
|
|
3483
|
-
}) => parsePayoutScenarios({
|
|
3484
|
-
requiredFields: requiredFields?.fields,
|
|
3485
|
-
country,
|
|
3486
|
-
bankVerificationAvailable
|
|
3487
|
-
});
|
|
3488
|
-
function parsePayoutScenarios({
|
|
3489
|
-
requiredFields,
|
|
3490
|
-
country,
|
|
3491
|
-
bankVerificationAvailable
|
|
3492
|
-
}) {
|
|
3493
|
-
if (!requiredFields) return {};
|
|
3494
|
-
let formConfig = {
|
|
3495
|
-
payoutVerificationMethod: {
|
|
3496
|
-
rule: "REQUIRED"
|
|
3497
|
-
},
|
|
3498
|
-
bankCountry: {
|
|
3499
|
-
rule: "REQUIRED"
|
|
3500
|
-
},
|
|
3501
|
-
preferredCurrency: {
|
|
3502
|
-
rule: "REQUIRED"
|
|
3503
|
-
},
|
|
3504
|
-
bankStatementDocument: {
|
|
3505
|
-
rule: "bankStatementRequirement"
|
|
3506
|
-
},
|
|
3507
|
-
description: {
|
|
3508
|
-
rule: "bankStatementDescription"
|
|
3509
|
-
}
|
|
3510
|
-
};
|
|
3511
|
-
requiredFields.forEach((fieldName) => {
|
|
3512
|
-
formConfig[fieldName] = {
|
|
3513
|
-
rule: bankVerificationAvailable ? "whenUsingManualVerification" : "REQUIRED",
|
|
3514
|
-
obscured: obscuredPayoutFields.includes(fieldName)
|
|
3515
|
-
};
|
|
3516
|
-
});
|
|
3517
|
-
if (bankVerificationAvailable) {
|
|
3518
|
-
formConfig = {
|
|
3519
|
-
...formConfig,
|
|
3520
|
-
verifiedAccountHolder: {
|
|
3521
|
-
rule: "whenUsingInstantVerification"
|
|
3522
|
-
},
|
|
3523
|
-
verifiedBankCountry: {
|
|
3524
|
-
rule: "whenUsingInstantVerification"
|
|
3525
|
-
},
|
|
3526
|
-
verifiedBankName: {
|
|
3527
|
-
rule: "whenUsingInstantVerification"
|
|
3528
|
-
},
|
|
3529
|
-
verifiedCurrencyCode: {
|
|
3530
|
-
rule: "whenUsingInstantVerification"
|
|
3531
|
-
},
|
|
3532
|
-
verifiedBankAccountNumber: {
|
|
3533
|
-
rule: "whenUsingInstantVerification"
|
|
3534
|
-
}
|
|
3535
|
-
};
|
|
3536
|
-
}
|
|
3537
|
-
return augmentWithCountryConfigs(payoutDetailsCountryConfig[country], formConfig);
|
|
3538
|
-
}
|
|
3539
|
-
const getAppropriatePayoutDetailsSteps = (isEditing, instantVerificationAvailable, canChangeCountry, isCrossBorderEnabled) => {
|
|
3540
|
-
const dependentSteps = {
|
|
3541
|
-
payoutCountryDetails: payoutSteps.payoutCountryDetails,
|
|
3542
|
-
payoutVerificationMethod: payoutSteps.payoutVerificationMethod,
|
|
3543
|
-
payoutAccountDetails: payoutSteps.payoutAccountDetails,
|
|
3544
|
-
payoutAccountDocuments: payoutSteps.payoutAccountDocuments,
|
|
3545
|
-
payoutAccountVerification: payoutSteps.payoutAccountVerification
|
|
3546
|
-
};
|
|
3547
|
-
if (!isCrossBorderEnabled) {
|
|
3548
|
-
delete dependentSteps["payoutCountryDetails"];
|
|
3549
|
-
}
|
|
3550
|
-
if (isEditing || !instantVerificationAvailable && !canChangeCountry) {
|
|
3551
|
-
delete dependentSteps["payoutVerificationMethod"];
|
|
3552
|
-
}
|
|
3553
|
-
return dependentSteps;
|
|
3554
|
-
};
|
|
3555
|
-
const CUSTOM_LABELS = {
|
|
3556
|
-
verifiedAccountHolder: "accountHolder",
|
|
3557
|
-
verifiedBankCountry: "bankCountry",
|
|
3558
|
-
verifiedBankName: "bankName",
|
|
3559
|
-
verifiedCurrencyCode: "currencyCode",
|
|
3560
|
-
verifiedBankAccountNumber: "bankAccountNumber"
|
|
3561
|
-
};
|
|
3562
|
-
const getInvalidFieldsErrorHeader = (invalidField) => {
|
|
3563
|
-
switch (invalidField) {
|
|
3564
|
-
case "LEGAL_BUSINESS_NAME":
|
|
3565
|
-
case "FIRST_NAME":
|
|
3566
|
-
case "LAST_NAME":
|
|
3567
|
-
return "caasBankAccountHolderDoesNotMatch";
|
|
3568
|
-
default:
|
|
3569
|
-
return "weCouldntCompleteTheAccountCheck";
|
|
3570
|
-
}
|
|
3571
|
-
};
|
|
3572
|
-
const getInvalidFieldsErrorContent = (invalidField) => {
|
|
3573
|
-
switch (invalidField) {
|
|
3574
|
-
case "LEGAL_BUSINESS_NAME":
|
|
3575
|
-
return "caasBankAccountMustBeInYourNameYourBusinessLegalNameOrDoingBusinessAs";
|
|
3576
|
-
case "FIRST_NAME":
|
|
3577
|
-
case "LAST_NAME":
|
|
3578
|
-
return "caasBankAccountMustBeInYourName";
|
|
3579
|
-
default:
|
|
3580
|
-
return "weCouldntCompleteTheAccountCheck";
|
|
3581
|
-
}
|
|
3582
|
-
};
|
|
3583
|
-
const defaultInvalidErrorMessage = {
|
|
3584
|
-
header: "weCouldntCompleteTheAccountCheck",
|
|
3585
|
-
content: "weCouldntCompleteTheAccountCheck"
|
|
3586
|
-
};
|
|
3587
|
-
const getInvalidFieldsErrorMessage = (errors) => {
|
|
3588
|
-
if (!errors || errors.length === 0) {
|
|
3589
|
-
return defaultInvalidErrorMessage;
|
|
3590
|
-
}
|
|
3591
|
-
const [firstError] = errors;
|
|
3592
|
-
const { invalidFields } = firstError;
|
|
3593
|
-
if (!invalidFields || invalidFields.length === 0) {
|
|
3594
|
-
return defaultInvalidErrorMessage;
|
|
3595
|
-
}
|
|
3596
|
-
const [firstInvalidField] = invalidFields;
|
|
3597
|
-
return {
|
|
3598
|
-
header: getInvalidFieldsErrorHeader(firstInvalidField),
|
|
3599
|
-
content: getInvalidFieldsErrorContent(firstInvalidField)
|
|
3600
|
-
};
|
|
3601
|
-
};
|
|
3602
|
-
const getPayoutVerificationMethod = (transferInstrument, instantVerificationEnabled) => {
|
|
3603
|
-
if (transferInstrument) {
|
|
3604
|
-
return "manualVerification";
|
|
3605
|
-
} else {
|
|
3606
|
-
return instantVerificationEnabled ? "instantVerification" : "manualVerification";
|
|
3607
|
-
}
|
|
3608
|
-
};
|
|
3609
|
-
const formatAccountVerificationSummary = (data) => {
|
|
3610
|
-
if (!data) return {};
|
|
3611
|
-
const summary = {};
|
|
3612
|
-
keysOf(CUSTOM_LABELS).forEach((key) => {
|
|
3613
|
-
if (!data[key]) return;
|
|
3614
|
-
summary[key] = summaryItem(CUSTOM_LABELS[key], data[key]);
|
|
3615
|
-
});
|
|
3616
|
-
return summary;
|
|
3617
|
-
};
|
|
3618
|
-
function PayoutDetailsDropin({
|
|
3619
|
-
legalEntityResponse,
|
|
3620
|
-
problems: propProblems,
|
|
3621
|
-
onSubmit: externalOnSubmit,
|
|
3622
|
-
onChange,
|
|
3623
|
-
asModal = false,
|
|
3624
|
-
handleCloseClick,
|
|
3625
|
-
taskType: propTaskType,
|
|
3626
|
-
handleHomeClick,
|
|
3627
|
-
currentTransferInstrumentId,
|
|
3628
|
-
setCurrentTransferInstrumentId,
|
|
3629
|
-
navigateBackToTaskList,
|
|
3630
|
-
handleBackClick: externalBackClick,
|
|
3631
|
-
hideSidebar,
|
|
3632
|
-
openBankingPartnerConfigId
|
|
3633
|
-
}) {
|
|
3634
|
-
const { baseUrl, rootLegalEntityId } = useApiContext();
|
|
3635
|
-
const {
|
|
3636
|
-
data: transferInstrument,
|
|
3637
|
-
refetch: refetchTransferInstrument,
|
|
3638
|
-
isLoading: isTransferInstrumentLoading
|
|
3639
|
-
} = useTransferInstrument(currentTransferInstrumentId ?? skipToken);
|
|
3640
|
-
const { mutateAsync: handleUpdateTransferInstrument } = useUpdateTransferInstrument();
|
|
3641
|
-
const { mutateAsync: handleUpdateTrustedTransferInstrument } = useUpdateTrustedTransferInstrument();
|
|
3642
|
-
const {
|
|
3643
|
-
mutateAsync: handleCreateTrustedTransferInstrument,
|
|
3644
|
-
status: createTrustedTransferInstrumentStatus
|
|
3645
|
-
} = useCreateTrustedTransferInstrument();
|
|
3646
|
-
const [previousTrustedInstrumentStatus, setPreviousTrustedInstrumentStatus] = useState(
|
|
3647
|
-
createTrustedTransferInstrumentStatus
|
|
3648
|
-
);
|
|
3649
|
-
const { t, i18n: i18next } = useTranslation("banking");
|
|
3650
|
-
const { t: commonT } = useTranslation("common");
|
|
3651
|
-
const userEvents = useAnalyticsContext();
|
|
3652
|
-
const { showToast, clearToasts } = useToastContext();
|
|
3653
|
-
const { isFeatureEnabled } = useToggleContext();
|
|
3654
|
-
const { isSettingEnabled } = useSettingsContext();
|
|
3655
|
-
const enabledCrossBorderPayouts = isFeatureEnabled(FeatureNames.EnableCrossBorderPayouts) && isSettingEnabled(SettingNames.AllowCrossBorderPayout);
|
|
3656
|
-
const defaultPayoutCountry = getLegalEntityCountry(legalEntityResponse);
|
|
3657
|
-
const existingPayoutDetails = useMemo$1(
|
|
3658
|
-
() => transferInstrument ? mapTransferInstrumentToPayoutAccount(transferInstrument, enabledCrossBorderPayouts) : void 0,
|
|
3659
|
-
[transferInstrument]
|
|
3660
|
-
);
|
|
3661
|
-
const [documents, setDocuments] = useState();
|
|
3662
|
-
const [isCaasCalled, setIsCaasCalled] = useState(false);
|
|
3663
|
-
const accountHolder = getPayoutAccountHolderName(legalEntityResponse, t);
|
|
3664
|
-
const fallbackCurrency = currencyByCountry[defaultPayoutCountry]?.[0];
|
|
3665
|
-
const accountHolderName = accountHolder || getLegalEntityNameBasedOnType(legalEntityResponse);
|
|
3666
|
-
const instantVerificationEnabled = Boolean(
|
|
3667
|
-
!isTransferInstrumentLoading && !transferInstrument && isSettingEnabled("instantBankVerification")
|
|
3668
|
-
);
|
|
3669
|
-
const taskType = propTaskType ?? TaskTypes.PAYOUT;
|
|
3670
|
-
const [trustedTransferInstrumentId, setTrustedTransferInstrumentId] = useState();
|
|
3671
|
-
const prefilledData = {
|
|
3672
|
-
payoutCountryDetails: {
|
|
3673
|
-
bankCountry: existingPayoutDetails?.payoutCountryDetails?.bankCountry ?? defaultPayoutCountry,
|
|
3674
|
-
preferredCurrency: existingPayoutDetails?.payoutCountryDetails?.preferredCurrency
|
|
3675
|
-
},
|
|
3676
|
-
payoutAccountDetails: {
|
|
3677
|
-
accountHolder: accountHolderName,
|
|
3678
|
-
currency: fallbackCurrency,
|
|
3679
|
-
...existingPayoutDetails?.payoutAccountDetails
|
|
3680
|
-
},
|
|
3681
|
-
payoutVerificationMethod: {
|
|
3682
|
-
payoutVerificationMethod: getPayoutVerificationMethod(
|
|
3683
|
-
transferInstrument,
|
|
3684
|
-
instantVerificationEnabled
|
|
3685
|
-
),
|
|
3686
|
-
bankCountry: defaultPayoutCountry,
|
|
3687
|
-
...existingPayoutDetails?.payoutVerificationMethod
|
|
3688
|
-
},
|
|
3689
|
-
payoutAccountVerification: {
|
|
3690
|
-
verifiedAccountHolder: accountHolderName,
|
|
3691
|
-
verifiedBankCountry: defaultPayoutCountry,
|
|
3692
|
-
...existingPayoutDetails?.payoutAccountVerification
|
|
3693
|
-
}
|
|
3694
|
-
};
|
|
3695
|
-
const documentUtils = documentApiUtils({
|
|
3696
|
-
baseUrl: baseUrl.value,
|
|
3697
|
-
rootLegalEntityId: rootLegalEntityId.value
|
|
3698
|
-
});
|
|
3699
|
-
const {
|
|
3700
|
-
state: { currentState }
|
|
3701
|
-
} = useStateContext();
|
|
3702
|
-
const formValidity = currentState.validityByForm;
|
|
3703
|
-
const bankAccountCountry = (enabledCrossBorderPayouts ? currentState?.data?.payoutCountryDetails?.bankCountry : currentState?.data?.payoutVerificationMethod?.bankCountry) ?? defaultPayoutCountry;
|
|
3704
|
-
const [hideFooterAndSidebar, setHideFooterAndSidebar] = useState(false);
|
|
3705
|
-
const [skipSubmit, setSkipSubmit] = useState(false);
|
|
3706
|
-
const [loadingStatus, setLoadingStatus] = useState("loading");
|
|
3707
|
-
const [isSubmitting, setIsSubmitting] = useState(false);
|
|
3708
|
-
const [configurationLoadingStatus, setConfigurationLoadingStatus] = useState("loading");
|
|
3709
|
-
const [data, setData] = useState(prefilledData);
|
|
3710
|
-
const [problems, setProblems] = useState(
|
|
3711
|
-
propProblems || (transferInstrument?.id ? getCapabilityProblems(legalEntityResponse, bankAccountCountry)?.BankAccount?.[transferInstrument.id] : void 0)
|
|
3712
|
-
);
|
|
3713
|
-
const [accountDetailsFromInput, setAccountDetailsFromInput] = useState(
|
|
3714
|
-
prefilledData.payoutAccountDetails
|
|
3715
|
-
);
|
|
3716
|
-
const [hasAsyncValidationError, setHasAsyncValidationError] = useState(false);
|
|
3717
|
-
const isMaskedBankAccountNumber = data.payoutAccountDetails?.bankAccountNumber?.includes("*") || data.payoutAccountDetails?.iban?.includes("*");
|
|
3718
|
-
const existingBankAccountFormat = transferInstrument ? transferInstrument?.bankAccount?.accountIdentification?.type === "numberAndBic" ? "numberAndBic" : existingPayoutDetails?.payoutAccountDetails?.iban ? "iban" : "local" : void 0;
|
|
3719
|
-
useEffect(() => {
|
|
3720
|
-
setData({
|
|
3721
|
-
...currentState.data,
|
|
3722
|
-
payoutAccountDetails: {
|
|
3723
|
-
...currentState.data?.payoutAccountDetails,
|
|
3724
|
-
currency: currencyByCountry[bankAccountCountry]?.[0]
|
|
3725
|
-
}
|
|
3726
|
-
});
|
|
3727
|
-
onChange?.(currentState);
|
|
3728
|
-
}, [bankAccountCountry, currentState, onChange]);
|
|
3729
|
-
const {
|
|
3730
|
-
data: providers,
|
|
3731
|
-
refetch: refetchBankVerificationProviders,
|
|
3732
|
-
status: bankVendorsLoadingStatus
|
|
3733
|
-
} = useBankVerificationProviders(
|
|
3734
|
-
{
|
|
3735
|
-
country: bankAccountCountry,
|
|
3736
|
-
configId: openBankingPartnerConfigId,
|
|
3737
|
-
locale: i18next.language
|
|
3738
|
-
},
|
|
3739
|
-
{
|
|
3740
|
-
enabled: instantVerificationEnabled
|
|
3741
|
-
}
|
|
3742
|
-
);
|
|
3743
|
-
const instantVerificationAvailable = useMemo$1(
|
|
3744
|
-
() => Boolean(instantVerificationEnabled && providers?.[0]?.redirectUrl),
|
|
3745
|
-
[instantVerificationEnabled, providers]
|
|
3746
|
-
);
|
|
3747
|
-
const getPayoutAccountFormatData = useCallback(
|
|
3748
|
-
async () => getAccountFormatsForCountry(bankAccountCountry),
|
|
3749
|
-
[bankAccountCountry]
|
|
3750
|
-
);
|
|
3751
|
-
const { fieldConfigurations, requiredFields } = useScenarioConfiguration({
|
|
3752
|
-
parseConfiguration,
|
|
3753
|
-
legalEntityType: legalEntityResponse.type,
|
|
3754
|
-
getPayoutAccountFormatData,
|
|
3755
|
-
instantVerificationAvailable,
|
|
3756
|
-
setLoadingStatus: setConfigurationLoadingStatus,
|
|
3757
|
-
country: bankAccountCountry,
|
|
3758
|
-
existingBankAccountFormat
|
|
3759
|
-
});
|
|
3760
|
-
const fieldsFromCustomRules = useMemo$1(
|
|
3761
|
-
() => rules({
|
|
3762
|
-
data,
|
|
3763
|
-
requiredFields,
|
|
3764
|
-
isFeatureEnabled
|
|
3765
|
-
}),
|
|
3766
|
-
[bankAccountCountry, data, taskType, isFeatureEnabled]
|
|
3767
|
-
);
|
|
3768
|
-
const apiBankAccount = useMemo$1(() => {
|
|
3769
|
-
const payoutAccountDetails = data.payoutAccountDetails ?? { bankAccountNumber: "" };
|
|
3770
|
-
return mapPayoutAccountSchemaToApiBankAccount(payoutAccountDetails, bankAccountCountry);
|
|
3771
|
-
}, [data, bankAccountCountry]);
|
|
3772
|
-
const {
|
|
3773
|
-
data: checkAsAServiceData,
|
|
3774
|
-
refetch: refetchCheckAsAService,
|
|
3775
|
-
isLoading: isCheckAsAServiceLoading,
|
|
3776
|
-
isError: isCheckAsAServiceError
|
|
3777
|
-
} = useCheck(apiBankAccount.accountIdentification, {
|
|
3778
|
-
enabled: false
|
|
3779
|
-
});
|
|
3780
|
-
const checkAsAServiceResultStatus = checkAsAServiceData?.status;
|
|
3781
|
-
const checkAsAServiceResultErrors = checkAsAServiceData?.errors;
|
|
3782
|
-
const provider = providers?.[0];
|
|
3783
|
-
const isInstantVerificationFlow = data.payoutVerificationMethod?.payoutVerificationMethod === "instantVerification";
|
|
3784
|
-
const [isModalOpen, setIsModalOpen] = useState(false);
|
|
3785
|
-
const payoutDetailsSteps = useMemo$1(() => {
|
|
3786
|
-
const appropriatePayoutDetailsSteps = getAppropriatePayoutDetailsSteps(
|
|
3787
|
-
Boolean(prefilledData?.payoutAccountDetails?.transferInstrumentId),
|
|
3788
|
-
instantVerificationAvailable,
|
|
3789
|
-
isSettingEnabled(SettingNames.AllowIntraRegionCrossBorderPayout),
|
|
3790
|
-
enabledCrossBorderPayouts
|
|
3791
|
-
);
|
|
3792
|
-
if (!isCheckAsAServiceError && (checkAsAServiceResultStatus === "VALID" || checkAsAServiceResultStatus === void 0) && !isMaskedBankAccountNumber) {
|
|
3793
|
-
delete appropriatePayoutDetailsSteps[payoutSteps.payoutAccountDocuments.formId];
|
|
3794
|
-
}
|
|
3795
|
-
return appropriatePayoutDetailsSteps;
|
|
3796
|
-
}, [providers, checkAsAServiceResultStatus, isCheckAsAServiceError, isMaskedBankAccountNumber]);
|
|
3797
|
-
const derivedProps = useMemo$1(() => {
|
|
3798
|
-
return getPropsFromConfigurations({
|
|
3799
|
-
scenarioConfiguration: fieldConfigurations,
|
|
3800
|
-
forms: payoutDetailsSteps,
|
|
3801
|
-
remediationActions: problems?.remediationActions ? Object.values(problems?.remediationActions) : [],
|
|
3802
|
-
dataMissingErrors: problems?.missingData ?? [],
|
|
3803
|
-
fieldsWithExistingData: [],
|
|
3804
|
-
customRules: fieldsFromCustomRules,
|
|
3805
|
-
legalEntityType: legalEntityResponse.type
|
|
3806
|
-
});
|
|
3807
|
-
}, [
|
|
3808
|
-
fieldConfigurations,
|
|
3809
|
-
payoutDetailsSteps,
|
|
3810
|
-
problems?.remediationActions,
|
|
3811
|
-
problems?.missingData,
|
|
3812
|
-
fieldsFromCustomRules,
|
|
3813
|
-
legalEntityResponse.type
|
|
3814
|
-
]);
|
|
3815
|
-
useUnifyLoadingStatus(
|
|
3816
|
-
setLoadingStatus,
|
|
3817
|
-
configurationLoadingStatus,
|
|
3818
|
-
// bank vendor loading status only matters when we fetch bank vendors
|
|
3819
|
-
instantVerificationEnabled ? bankVendorsLoadingStatus : "success",
|
|
3820
|
-
isSubmitting ? "loading" : "success"
|
|
3821
|
-
);
|
|
3822
|
-
const forms = useMemo$1(() => {
|
|
3823
|
-
const requiredForms = getRequiredForms(
|
|
3824
|
-
payoutDetailsSteps,
|
|
3825
|
-
derivedProps?.requiredFields,
|
|
3826
|
-
derivedProps?.optionalFields
|
|
3827
|
-
);
|
|
3828
|
-
const adjustedFormValidity = hasAsyncValidationError ? { ...formValidity, payoutAccountDetails: false } : formValidity;
|
|
3829
|
-
return addValidityToForms(requiredForms, adjustedFormValidity, problems);
|
|
3830
|
-
}, [derivedProps, formValidity, hasAsyncValidationError, problems, payoutDetailsSteps]);
|
|
3831
|
-
useEffect(() => {
|
|
3832
|
-
if (!transferInstrument?.documentDetails?.length) return;
|
|
3833
|
-
if (transferInstrument.id) {
|
|
3834
|
-
documentUtils.fetchDocuments(transferInstrument.documentDetails, transferInstrument.id).then(() => {
|
|
3835
|
-
setDocuments(mapApiDocumentToPayoutDocuments(transferInstrument.id));
|
|
3836
|
-
}).catch(() => {
|
|
3837
|
-
showToast({
|
|
3838
|
-
label: commonT(($) => $["failedToFetchRelevantDocuments"]),
|
|
3839
|
-
variant: "error"
|
|
3840
|
-
});
|
|
3841
|
-
});
|
|
3842
|
-
}
|
|
3843
|
-
}, [transferInstrument?.documentDetails]);
|
|
3844
|
-
const submitDocuments = async ({
|
|
3845
|
-
forms: forms2,
|
|
3846
|
-
transferInstrument: transferInstrument2,
|
|
3847
|
-
dataSubmitted
|
|
3848
|
-
}) => {
|
|
3849
|
-
const isBankDocumentFormPresent = forms2.some(
|
|
3850
|
-
(form) => form.formId === payoutSteps.payoutAccountDocuments.formId
|
|
3851
|
-
);
|
|
3852
|
-
if (isBankDocumentFormPresent) {
|
|
3853
|
-
const documentToUpload = await mapPayoutDocumentsToApiDocuments(
|
|
3854
|
-
dataSubmitted,
|
|
3855
|
-
transferInstrument2.id
|
|
3856
|
-
);
|
|
3857
|
-
if (documentToUpload) {
|
|
3858
|
-
try {
|
|
3859
|
-
const documents2 = await documentUtils.uploadDocuments(
|
|
3860
|
-
[documentToUpload],
|
|
3861
|
-
transferInstrument2.id
|
|
3862
|
-
);
|
|
3863
|
-
documents2.forEach((document) => {
|
|
3864
|
-
userEvents.addTaskEvent("Success", {
|
|
3865
|
-
actionType: "upload",
|
|
3866
|
-
documentType: dataSubmitted.payoutAccountDocuments?.documentType ?? document.type,
|
|
3867
|
-
// tracks BankDocumentTypes
|
|
3868
|
-
fileExtention: document.attachments?.map((item) => getFileExtention(item.pageName ?? "")).filter((item) => item !== void 0) ?? void 0
|
|
3869
|
-
});
|
|
3870
|
-
});
|
|
3871
|
-
} catch {
|
|
3872
|
-
setProblems({
|
|
3873
|
-
...problems,
|
|
3874
|
-
validationErrors: {
|
|
3875
|
-
payoutAccountDocuments: { bankStatementDocument: true }
|
|
3876
|
-
}
|
|
3877
|
-
});
|
|
3878
|
-
throw new Error(commonT(($) => $["remediationMessage_1_704"]));
|
|
3879
|
-
} finally {
|
|
3880
|
-
await refetchTransferInstrument?.();
|
|
3881
|
-
}
|
|
3882
|
-
}
|
|
3883
|
-
}
|
|
3884
|
-
};
|
|
3885
|
-
useEffect(() => {
|
|
3886
|
-
const payoutAccountData = cloneObject(data)?.payoutAccountDetails;
|
|
3887
|
-
if (payoutAccountData) setAccountDetailsFromInput(payoutAccountData);
|
|
3888
|
-
}, [data]);
|
|
3889
|
-
const onSubmit = async () => {
|
|
3890
|
-
setIsSubmitting(true);
|
|
3891
|
-
const dataSubmitted = cloneObject(data);
|
|
3892
|
-
const { payoutAccountDetails, payoutVerificationMethod } = dataSubmitted;
|
|
3893
|
-
const baseTracking = {
|
|
3894
|
-
actionType: "submit",
|
|
3895
|
-
documentType: "bankStatement",
|
|
3896
|
-
bankCountry: payoutVerificationMethod?.bankCountry ?? defaultPayoutCountry,
|
|
3897
|
-
bankCurrency: payoutAccountDetails?.currency ?? null
|
|
3898
|
-
};
|
|
3899
|
-
let transferInstrumentFromInput = mapPayoutDetailsToTransferInstrument({
|
|
3900
|
-
data: dataSubmitted,
|
|
3901
|
-
legalEntity: legalEntityResponse,
|
|
3902
|
-
enabledCrossBorderPayouts
|
|
3903
|
-
});
|
|
3904
|
-
transferInstrumentFromInput = omitObscuredFieldsIfUnchanged(
|
|
3905
|
-
["bankAccount.accountIdentification.accountNumber", "bankAccount.accountIdentification.iban"],
|
|
3906
|
-
transferInstrumentFromInput,
|
|
3907
|
-
transferInstrument
|
|
3908
|
-
);
|
|
3909
|
-
try {
|
|
3910
|
-
if (!transferInstrumentFromInput) return;
|
|
3911
|
-
const response = await (transferInstrument ? handleUpdateTransferInstrument({
|
|
3912
|
-
transferInstrument: transferInstrumentFromInput,
|
|
3913
|
-
transferInstrumentId: transferInstrument.id
|
|
3914
|
-
}) : createTransferInstrument(
|
|
3915
|
-
rootLegalEntityId.value,
|
|
3916
|
-
baseUrl.value,
|
|
3917
|
-
transferInstrumentFromInput
|
|
3918
|
-
));
|
|
3919
|
-
setCurrentTransferInstrumentId?.(response?.id);
|
|
3920
|
-
userEvents.addTaskEvent("Success", {
|
|
3921
|
-
...baseTracking
|
|
3922
|
-
});
|
|
3923
|
-
try {
|
|
3924
|
-
await submitDocuments({ forms, transferInstrument: response, dataSubmitted });
|
|
3925
|
-
clearToasts();
|
|
3926
|
-
externalOnSubmit?.({ ...dataSubmitted, id: response?.id });
|
|
3927
|
-
} catch (e) {
|
|
3928
|
-
showToast({ label: e.message, variant: "error" });
|
|
3929
|
-
userEvents.addTaskEvent("Encountered error", {
|
|
3930
|
-
...baseTracking,
|
|
3931
|
-
returnType: e?.errorCode || "backend",
|
|
3932
|
-
returnValue: e?.title || e?.message
|
|
3933
|
-
});
|
|
3934
|
-
} finally {
|
|
3935
|
-
setIsSubmitting(false);
|
|
3936
|
-
}
|
|
3937
|
-
} catch (e) {
|
|
3938
|
-
if (isValidationError(e)) {
|
|
3939
|
-
const validationErrors = processValidationErrors(e, taskType);
|
|
3940
|
-
setProblems({ ...problems, validationErrors });
|
|
3941
|
-
} else if (isIdDocumentUploadError(e)) {
|
|
3942
|
-
showToast({ label: t(($) => $["idDocumentAlreadyUploaded"]), variant: "error" });
|
|
3943
|
-
} else if (isBankStatementUploadError(e)) {
|
|
3944
|
-
showToast({ label: t(($) => $["bankStatementAlreadyUploaded"]), variant: "error" });
|
|
3945
|
-
} else if (isMaintenanceModeError(e)) {
|
|
3946
|
-
showToast({
|
|
3947
|
-
label: commonT(($) => $["maintenanceModeMessage"]),
|
|
3948
|
-
variant: "error",
|
|
3949
|
-
duration: "indefinite"
|
|
3950
|
-
});
|
|
3951
|
-
} else {
|
|
3952
|
-
const errorTranslatable = mapCreateOrUpdateTransferInstrumentErrorMessageToTranslatable(e);
|
|
3953
|
-
showToast({ label: commonT(($) => $[errorTranslatable]), variant: "error" });
|
|
3954
|
-
}
|
|
3955
|
-
setIsSubmitting(false);
|
|
3956
|
-
userEvents.addTaskEvent("Encountered error", {
|
|
3957
|
-
...baseTracking,
|
|
3958
|
-
returnType: e?.errorCode || "backend",
|
|
3959
|
-
returnValue: e?.title || e?.message
|
|
3960
|
-
});
|
|
3961
|
-
}
|
|
3962
|
-
};
|
|
3963
|
-
const formatFileSummaryData = (bankDocuments) => {
|
|
3964
|
-
const bankStatementDocument = bankDocuments?.bankStatementDocument?.[0];
|
|
3965
|
-
return {
|
|
3966
|
-
documentType: bankDocuments?.documentType && commonT(($) => $[bankDocuments?.documentType]),
|
|
3967
|
-
fileName: bankStatementDocument?.name,
|
|
3968
|
-
description: bankDocuments?.description
|
|
3969
|
-
};
|
|
3970
|
-
};
|
|
3971
|
-
const canSubmit = () => {
|
|
3972
|
-
if (isInstantVerificationFlow) {
|
|
3973
|
-
return false;
|
|
3974
|
-
}
|
|
3975
|
-
const bankDetails = data.payoutAccountDetails;
|
|
3976
|
-
return !isEmpty(bankDetails) && Object.values(bankDetails).every(Boolean);
|
|
3977
|
-
};
|
|
3978
|
-
const datasetUtils = datasetUtilities(i18next.language);
|
|
3979
|
-
const formatDataForSummary = () => {
|
|
3980
|
-
const summaryData = cloneObject(data);
|
|
3981
|
-
summaryData.payoutAccountDetails.accountHolder = accountHolderName;
|
|
3982
|
-
if (summaryData.payoutVerificationMethod?.bankCountry && summaryData.payoutAccountDetails) {
|
|
3983
|
-
summaryData.payoutAccountDetails.bankCountry = datasetUtils.getCountryName(
|
|
3984
|
-
summaryData.payoutVerificationMethod.bankCountry
|
|
3985
|
-
);
|
|
3986
|
-
}
|
|
3987
|
-
if (summaryData.payoutAccountDocuments) {
|
|
3988
|
-
summaryData.payoutAccountDocuments = formatFileSummaryData(data?.payoutAccountDocuments);
|
|
3989
|
-
}
|
|
3990
|
-
summaryData.payoutAccountVerification = formatAccountVerificationSummary(
|
|
3991
|
-
data.payoutAccountVerification
|
|
3992
|
-
);
|
|
3993
|
-
return summaryData;
|
|
3994
|
-
};
|
|
3995
|
-
const createTrustedTransferInstrumentHandler = async (code, state) => {
|
|
3996
|
-
try {
|
|
3997
|
-
const trustedTransferInstrument = await handleCreateTrustedTransferInstrument({
|
|
3998
|
-
code,
|
|
3999
|
-
state
|
|
4000
|
-
});
|
|
4001
|
-
if (trustedTransferInstrument) {
|
|
4002
|
-
setTrustedTransferInstrumentId(trustedTransferInstrument.verificationReference);
|
|
4003
|
-
return trustedTransferInstrument;
|
|
4004
|
-
}
|
|
4005
|
-
} catch (e) {
|
|
4006
|
-
refetchBankVerificationProviders();
|
|
4007
|
-
const errorTranslatable = mapCreateOrUpdateTransferInstrumentErrorMessageToTranslatable(e);
|
|
4008
|
-
if (errorTranslatable === "transferInstrumentLimitHasAlreadyBeenMet") {
|
|
4009
|
-
showToast({ label: commonT(($) => $[errorTranslatable]), variant: "error" });
|
|
4010
|
-
}
|
|
4011
|
-
throw e;
|
|
4012
|
-
}
|
|
4013
|
-
};
|
|
4014
|
-
const {
|
|
4015
|
-
handleNextClick,
|
|
4016
|
-
handleBackClick,
|
|
4017
|
-
activeForm,
|
|
4018
|
-
setShouldValidate,
|
|
4019
|
-
gotoFormByFormIndex,
|
|
4020
|
-
gotoFormByFormId,
|
|
4021
|
-
steps
|
|
4022
|
-
} = useFormComposer({
|
|
4023
|
-
problems,
|
|
4024
|
-
forms,
|
|
4025
|
-
externalBackClick,
|
|
4026
|
-
onSubmit: skipSubmit ? async () => {
|
|
4027
|
-
if (enabledCrossBorderPayouts && trustedTransferInstrumentId && data.payoutCountryDetails?.preferredCurrency) {
|
|
4028
|
-
try {
|
|
4029
|
-
await handleUpdateTrustedTransferInstrument({
|
|
4030
|
-
transferInstrumentId: trustedTransferInstrumentId,
|
|
4031
|
-
preferredCurrencyCode: data.payoutCountryDetails?.preferredCurrency
|
|
4032
|
-
});
|
|
4033
|
-
} catch {
|
|
4034
|
-
showToast({ label: commonT(($) => $["failedToUpdateDetails"]), variant: "error" });
|
|
4035
|
-
}
|
|
4036
|
-
}
|
|
4037
|
-
if (trustedTransferInstrumentId) {
|
|
4038
|
-
externalOnSubmit?.({ ...data, id: trustedTransferInstrumentId });
|
|
4039
|
-
}
|
|
4040
|
-
userEvents.addTaskEvent("Success", {
|
|
4041
|
-
actionType: "submit"
|
|
4042
|
-
});
|
|
4043
|
-
navigateBackToTaskList?.();
|
|
4044
|
-
} : onSubmit
|
|
4045
|
-
});
|
|
4046
|
-
useEffect(() => {
|
|
4047
|
-
if (isCaasCalled && forms) {
|
|
4048
|
-
if (checkAsAServiceResultStatus !== "VALID" && checkAsAServiceResultStatus !== "INCOMPLETE_INPUT") {
|
|
4049
|
-
const formIndex = forms.findIndex((f) => f.formId === "payoutAccountDocuments");
|
|
4050
|
-
if (formIndex > -1) {
|
|
4051
|
-
gotoFormByFormIndex(formIndex);
|
|
4052
|
-
}
|
|
4053
|
-
}
|
|
4054
|
-
if (checkAsAServiceResultStatus === "VALID") {
|
|
4055
|
-
handleNextClick();
|
|
4056
|
-
}
|
|
4057
|
-
}
|
|
4058
|
-
setIsCaasCalled(false);
|
|
4059
|
-
}, [forms, checkAsAServiceResultStatus, isCaasCalled]);
|
|
4060
|
-
const handleFormNextClick = async () => {
|
|
4061
|
-
if (activeForm.formId === "payoutVerificationMethod") {
|
|
4062
|
-
if (isInstantVerificationFlow) {
|
|
4063
|
-
trackNavigation({
|
|
4064
|
-
userEvents,
|
|
4065
|
-
actionType: "next",
|
|
4066
|
-
label: "instantVerification",
|
|
4067
|
-
toForm: "instantVerification"
|
|
4068
|
-
});
|
|
4069
|
-
showInstantVerificationPayoutModal.value = true;
|
|
4070
|
-
return;
|
|
4071
|
-
} else {
|
|
4072
|
-
handleNextClick();
|
|
4073
|
-
return;
|
|
4074
|
-
}
|
|
4075
|
-
}
|
|
4076
|
-
if (activeForm.formId === "payoutAccountDetails" && activeForm.isValid && data.payoutAccountDetails && !isMaskedBankAccountNumber) {
|
|
4077
|
-
try {
|
|
4078
|
-
const { data: response } = await refetchCheckAsAService();
|
|
4079
|
-
setIsCaasCalled(true);
|
|
4080
|
-
if (response?.status === "INCOMPLETE_INPUT") {
|
|
4081
|
-
setIsModalOpen(true);
|
|
4082
|
-
}
|
|
4083
|
-
} catch {
|
|
4084
|
-
handleNextClick();
|
|
4085
|
-
}
|
|
4086
|
-
} else {
|
|
4087
|
-
handleNextClick();
|
|
4088
|
-
}
|
|
4089
|
-
};
|
|
4090
|
-
if (previousTrustedInstrumentStatus !== createTrustedTransferInstrumentStatus) {
|
|
4091
|
-
if (activeForm.formId === "payoutAccountVerification" && activeForm.isValid && createTrustedTransferInstrumentStatus === "success" && data.payoutAccountVerification?.verifiedBankAccountNumber) {
|
|
4092
|
-
handleNextClick();
|
|
4093
|
-
setPreviousTrustedInstrumentStatus(createTrustedTransferInstrumentStatus);
|
|
4094
|
-
}
|
|
4095
|
-
if (activeForm.formId === "payoutVerificationMethod" && createTrustedTransferInstrumentStatus === "success") {
|
|
4096
|
-
gotoFormByFormIndex(forms.length - 1);
|
|
4097
|
-
setPreviousTrustedInstrumentStatus(createTrustedTransferInstrumentStatus);
|
|
4098
|
-
}
|
|
4099
|
-
}
|
|
4100
|
-
const omittedForms = data?.payoutVerificationMethod?.payoutVerificationMethod === "instantVerification" ? [] : [payoutSteps.payoutVerificationMethod.formId];
|
|
4101
|
-
const { header: invalidFieldHeader, content: invalidFieldContent } = getInvalidFieldsErrorMessage(
|
|
4102
|
-
checkAsAServiceResultErrors ?? []
|
|
4103
|
-
);
|
|
4104
|
-
return /* @__PURE__ */ jsxs(
|
|
4105
|
-
LoaderWrapper,
|
|
4106
|
-
{
|
|
4107
|
-
showSpinner: true,
|
|
4108
|
-
status: isCheckAsAServiceLoading || isModalOpen || createTrustedTransferInstrumentStatus === "pending" ? "loading" : "success",
|
|
4109
|
-
formOpacityWhenLoading: 0.3,
|
|
4110
|
-
children: [
|
|
4111
|
-
isModalOpen && /* @__PURE__ */ jsx(
|
|
4112
|
-
Confirm,
|
|
4113
|
-
{
|
|
4114
|
-
title: t(($) => $[invalidFieldHeader]),
|
|
4115
|
-
description: t(($) => $[invalidFieldContent]),
|
|
4116
|
-
cancelText: commonT(($) => $["editDetails"]),
|
|
4117
|
-
confirmText: t(($) => $["continueAnyway"]),
|
|
4118
|
-
onConfirm: () => {
|
|
4119
|
-
handleNextClick();
|
|
4120
|
-
setIsModalOpen(false);
|
|
4121
|
-
},
|
|
4122
|
-
onCancel: () => {
|
|
4123
|
-
gotoFormByFormIndex(0);
|
|
4124
|
-
setIsModalOpen(false);
|
|
4125
|
-
}
|
|
4126
|
-
}
|
|
4127
|
-
),
|
|
4128
|
-
/* @__PURE__ */ jsx(
|
|
4129
|
-
FormWrapper,
|
|
4130
|
-
{
|
|
4131
|
-
taskName: taskType === TaskTypes.PAYIN ? "payinDetails" : "payoutDetails",
|
|
4132
|
-
activeForm,
|
|
4133
|
-
summary: {
|
|
4134
|
-
data: formatDataForSummary(),
|
|
4135
|
-
omitted: {
|
|
4136
|
-
keys: ["transferInstrumentId", "payoutVerificationMethod"],
|
|
4137
|
-
forms: omittedForms,
|
|
4138
|
-
summaryEditButton: ["payoutVerificationMethod", "payoutAccountVerification"]
|
|
4139
|
-
}
|
|
4140
|
-
},
|
|
4141
|
-
handleBackClick: activeForm.formId !== "summary" ? handleBackClick : void 0,
|
|
4142
|
-
handleNextClick: handleFormNextClick,
|
|
4143
|
-
handleHomeClick,
|
|
4144
|
-
handleCloseClick,
|
|
4145
|
-
hideSidebar: hideSidebar || hideFooterAndSidebar,
|
|
4146
|
-
hideFooter: hideFooterAndSidebar,
|
|
4147
|
-
loadingStatus: isTransferInstrumentLoading ? "loading" : loadingStatus,
|
|
4148
|
-
asModal,
|
|
4149
|
-
forms,
|
|
4150
|
-
onSubmit,
|
|
4151
|
-
gotoFormByFormIndex,
|
|
4152
|
-
gotoFormByFormId,
|
|
4153
|
-
validateForm: () => setShouldValidate(true),
|
|
4154
|
-
canSubmit: canSubmit(),
|
|
4155
|
-
problems,
|
|
4156
|
-
steps,
|
|
4157
|
-
children: (!isTransferInstrumentLoading || isSubmitting) && /* @__PURE__ */ jsx(
|
|
4158
|
-
PayoutDetails,
|
|
4159
|
-
{
|
|
4160
|
-
...derivedProps,
|
|
4161
|
-
data: { ...prefilledData, payoutAccountDocuments: documents },
|
|
4162
|
-
country: defaultPayoutCountry,
|
|
4163
|
-
activeForm,
|
|
4164
|
-
onBack: handleBackClick,
|
|
4165
|
-
accountHolder: accountHolder ?? getLegalEntityNameBasedOnType(legalEntityResponse),
|
|
4166
|
-
setHideSidebar: setHideFooterAndSidebar,
|
|
4167
|
-
setSkipSubmit,
|
|
4168
|
-
legalEntityResponse,
|
|
4169
|
-
provider,
|
|
4170
|
-
bankVendorsLoadingStatus,
|
|
4171
|
-
instantVerificationAvailable,
|
|
4172
|
-
createTrustedTransferInstrument: createTrustedTransferInstrumentHandler,
|
|
4173
|
-
accountDetailsFromInput,
|
|
4174
|
-
trustedTransferInstrumentId,
|
|
4175
|
-
setHasAsyncValidationError
|
|
4176
|
-
}
|
|
4177
|
-
)
|
|
4178
|
-
}
|
|
4179
|
-
)
|
|
4180
|
-
]
|
|
4181
|
-
}
|
|
4182
|
-
);
|
|
4183
|
-
}
|
|
4184
|
-
export {
|
|
4185
|
-
rules as A,
|
|
4186
|
-
BankVerification as B,
|
|
4187
|
-
mapPayoutAccountSchemaToApiBankAccount as C,
|
|
4188
|
-
useCheck as D,
|
|
4189
|
-
getAppropriatePayoutDetailsSteps as E,
|
|
4190
|
-
mapApiDocumentToPayoutDocuments as F,
|
|
4191
|
-
getInvalidFieldsErrorMessage as G,
|
|
4192
|
-
parseConfiguration as H,
|
|
4193
|
-
InstantVerificationErrorContext as I,
|
|
4194
|
-
mapPayoutDetailsToTransferInstrument as J,
|
|
4195
|
-
createTransferInstrument as K,
|
|
4196
|
-
formatAccountVerificationSummary as L,
|
|
4197
|
-
MemoizedBankDocumentClassification as M,
|
|
4198
|
-
mapPayoutDocumentsToApiDocuments as N,
|
|
4199
|
-
PayoutDetailsDropin as P,
|
|
4200
|
-
useAsyncAccountDetailsValidationRules as a,
|
|
4201
|
-
PayoutAccount as b,
|
|
4202
|
-
PayoutVerificationMethod as c,
|
|
4203
|
-
PayoutCountryDetails as d,
|
|
4204
|
-
bankVerificationValidationRules as e,
|
|
4205
|
-
bankDocumentValidationRules as f,
|
|
4206
|
-
getAccountIdentificationFromPayoutAccountSchema as g,
|
|
4207
|
-
defaultFieldMetadata$1 as h,
|
|
4208
|
-
defaultFieldConfig$1 as i,
|
|
4209
|
-
defaultFieldMetadata$3 as j,
|
|
4210
|
-
defaultFieldConfig$3 as k,
|
|
4211
|
-
defaultFieldMetadata as l,
|
|
4212
|
-
defaultFieldConfig as m,
|
|
4213
|
-
defaultFieldMetadata$2 as n,
|
|
4214
|
-
defaultFieldConfig$2 as o,
|
|
4215
|
-
payoutSteps as p,
|
|
4216
|
-
swiftCodeFieldMetadata as q,
|
|
4217
|
-
useUpdateTransferInstrument as r,
|
|
4218
|
-
showInstantVerificationPayoutModal as s,
|
|
4219
|
-
useUpdateTrustedTransferInstrument as t,
|
|
4220
|
-
useInstantVerificationErrorNotification as u,
|
|
4221
|
-
useCreateTrustedTransferInstrument as v,
|
|
4222
|
-
getPayoutVerificationMethod as w,
|
|
4223
|
-
getDefaultCurrencyForCountry as x,
|
|
4224
|
-
useBankVerificationProviders as y,
|
|
4225
|
-
getAccountFormatsForCountry as z
|
|
4226
|
-
};
|