@adyen/kyc-components 4.11.0-beta.3 → 4.11.0-beta.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{AcceptTermsOfServiceComponent-DlYUfwQW.js → AcceptTermsOfServiceComponent-BEJjeSzA.js} +1 -1
- package/dist/{AdaptiveWorkflow-Jazy10dr.js → AdaptiveWorkflow-DsMAUbNd.js} +8 -8
- package/dist/{AdaptiveWorkflowComponent-CHMSkSht.js → AdaptiveWorkflowComponent-CxVnXhEN.js} +1 -1
- package/dist/{BusinessFinancingDropin-CvaI5e4n.js → BusinessFinancingDropin-BrcioH39.js} +1 -1
- package/dist/{BusinessFinancingPage-CUQbafQQ.js → BusinessFinancingPage-Do7yrfrZ.js} +1 -1
- package/dist/{Confirm-C6adl7TX.js → Confirm-CkWoZ8mk.js} +1 -1
- package/dist/{DebugModal-DwC3T1o6.js → DebugModal-CK-neaxo.js} +3 -3
- package/dist/{DecisionMakerDetails-DR67Zymz.js → DecisionMakerDetails-C7We7La7.js} +2 -2
- package/dist/{DecisionMakerDetailsPage-BOEhrBWw.js → DecisionMakerDetailsPage-C5eNkNiT.js} +1 -1
- package/dist/{DecisionMakers-DkQ00Pnu.js → DecisionMakers-CYPtxtn9.js} +2 -2
- package/dist/{EntityAssociation-Cc6OR5A-.js → EntityAssociation-DymjaEi1.js} +1 -1
- package/dist/{IndividualDropin-CU29RCnr.js → IndividualDropin-CTey5bJS.js} +3 -3
- package/dist/{InvitedDecisionMakerComponent-BkGuebzp.js → InvitedDecisionMakerComponent-D1FhjEWM.js} +2 -2
- package/dist/{LegalRepresentativeDetailsPage-CgV7z0HM.js → LegalRepresentativeDetailsPage-6_IG2aVA.js} +1 -1
- package/dist/{MaybeModal-D-I1QE2-.js → MaybeModal-DwAJTUH0.js} +1 -1
- package/dist/{Modal-Dtv7VMDH.js → Modal-DOGT289C.js} +2 -2
- package/dist/{PayoutDetailsDropinMultiForm-CMZVWNNY.js → PayoutDetailsDropinMultiForm-DYEfV54V.js} +566 -551
- package/dist/{PayoutDetailsPage-BdLzLw6w.js → PayoutDetailsPage-Dm4iYJ4T.js} +3 -3
- package/dist/{RootBusinessDetailsPage-D_esFfyx.js → RootBusinessDetailsPage-C635ITZ7.js} +1 -1
- package/dist/{RootBusinessLinesPage-Cr_ZVZX9.js → RootBusinessLinesPage-Bvl6iJP1.js} +4 -4
- package/dist/{RootIndividualDetailsPage-Q37qhmMG.js → RootIndividualDetailsPage-CrPTuG1p.js} +1 -1
- package/dist/{SignPCIComponent-_YXhGwdp.js → SignPCIComponent-BRIydKCU.js} +1 -1
- package/dist/{SoleProprietorshipPage-DdTUstWy.js → SoleProprietorshipPage-CwbcCr8k.js} +1 -1
- package/dist/{SourceOfFundsDropin-CXrRsP0Z.js → SourceOfFundsDropin-CidVNGVf.js} +3 -3
- package/dist/{SourceOfFundsPage-gO8sy65P.js → SourceOfFundsPage-BvgpSZmr.js} +1 -1
- package/dist/{TaskListItem-Btcz5cbj.js → TaskListItem-og3Plbg2.js} +1 -1
- package/dist/{TaxReportingDropin-DQMZ3hkG.js → TaxReportingDropin-D1-GFBOP.js} +1 -1
- package/dist/{TrustDetailsPage-CoqJLM9Z.js → TrustDetailsPage-Due9f0I2.js} +3 -3
- package/dist/{TrustMemberCompanyPage-AehOGXBW.js → TrustMemberCompanyPage-Bf4KF64Y.js} +1 -1
- package/dist/{TrustMemberIndividualPage-CNKz26VG.js → TrustMemberIndividualPage-Dr8wWH7I.js} +1 -1
- package/dist/{TrustMembersOverview-CR70KcrN.js → TrustMembersOverview-CGNzyY0U.js} +1 -1
- package/dist/{UnincorporatedPartnershipIndividualPage-BzCGKu-C.js → UnincorporatedPartnershipIndividualPage-CN5tKGCV.js} +1 -1
- package/dist/{UnincorporatedPartnershipMemberCompanyPage-B1aXINOK.js → UnincorporatedPartnershipMemberCompanyPage-xEU6FBPH.js} +1 -1
- package/dist/{UnincorporatedPartnershipMembersOverview-DwHEziJ_.js → UnincorporatedPartnershipMembersOverview-DYYFa9_8.js} +1 -1
- package/dist/adyen-business-financing.js +3 -3
- package/dist/adyen-individual-configuration.js +2 -2
- package/dist/adyen-individual-status.js +1 -1
- package/dist/adyen-invited-decision-maker.js +2 -2
- package/dist/adyen-onboarding.js +24 -24
- package/dist/adyen-terms-of-service-management.js +2 -2
- package/dist/adyen-terms-of-service-status.js +1 -1
- package/dist/adyen-transfer-instrument-configuration.js +3 -3
- package/dist/adyen-transfer-instrument-management.js +4 -4
- package/dist/adyen-verification-status.js +1 -1
- package/dist/{en-US-Cm0iyKdy.js → en-US-BeYvTQs8.js} +2 -2
- package/dist/{resolveEnvironment-CnZSOslm.js → resolveEnvironment-Dp4M9H-f.js} +5 -5
- package/dist/style.css +20 -36
- package/dist/styles-9jxW7TiP.js +20 -36
- package/dist/types/components/BankAccount/tasks/PayoutDetailsDropin/validate.d.ts +2 -0
- package/dist/{useBusinessDetailsData-BG623XNT.js → useBusinessDetailsData-BsthpvcC.js} +5 -5
- package/dist/{useFormContext-CCsWFEdO.js → useFormContext-WC19R9Fs.js} +2 -2
- package/dist/{useNavigate-D8Pko1Es.js → useNavigate-CwHKfTV4.js} +22 -22
- package/package.json +1 -1
package/dist/{PayoutDetailsDropinMultiForm-CMZVWNNY.js → PayoutDetailsDropinMultiForm-DYEfV54V.js}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
try {
|
|
2
2
|
let e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
|
|
3
|
-
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "
|
|
3
|
+
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "63501364-305b-4a8d-98f1-890d587d95e3", e._sentryDebugIdIdentifier = "sentry-dbid-63501364-305b-4a8d-98f1-890d587d95e3");
|
|
4
4
|
} catch (e) {}
|
|
5
5
|
import { a as Icon, i as Typography, o as createLogger, r as useTranslation, t as Trans } from "./translation-prlgF4Yn.js";
|
|
6
6
|
import { t as Button } from "./Button-BzRYS0KT.js";
|
|
@@ -27,13 +27,13 @@ import { t as SettingNames } from "./types-B-8XphGe.js";
|
|
|
27
27
|
import { t as useToastContext } from "./useToastContext-d6uY8F_F.js";
|
|
28
28
|
import { t as useInvalidateRootLegalEntity } from "./invalidateRootLegalEntity-lDFSztuv.js";
|
|
29
29
|
import { t as LoaderWrapper } from "./LoaderWrapper-B-PH-UC1.js";
|
|
30
|
-
import { t as Modal } from "./Modal-
|
|
31
|
-
import { t as Confirm } from "./Confirm-
|
|
30
|
+
import { t as Modal } from "./Modal-DOGT289C.js";
|
|
31
|
+
import { t as Confirm } from "./Confirm-CkWoZ8mk.js";
|
|
32
32
|
import { n as FeatureNames, t as ExperimentNames } from "./types-CvTg7nL1.js";
|
|
33
33
|
import { t as Image } from "./Image-Br4Dbqbg.js";
|
|
34
34
|
import { n as translateTranslatable } from "./utils-g_Wl4-9Z.js";
|
|
35
35
|
import { n as getLegalEntityNameBasedOnType, r as getPayoutAccountHolderName } from "./getName-ODLD6UPV.js";
|
|
36
|
-
import { c as FormContextProvider, i as FormFlow, n as addValidityToForms, r as getRequiredForms, s as useFormComposer, t as useFormContext } from "./useFormContext-
|
|
36
|
+
import { c as FormContextProvider, i as FormFlow, n as addValidityToForms, r as getRequiredForms, s as useFormComposer, t as useFormContext } from "./useFormContext-WC19R9Fs.js";
|
|
37
37
|
import { r as getPropsFromConfigurations, t as augmentWithCountryConfigs } from "./process-field-configurations-C-D1aFsE.js";
|
|
38
38
|
import { t as ErrorPanel } from "./ErrorPanel-8Ek7q8Uj.js";
|
|
39
39
|
import { t as trackNavigation } from "./trackNavigation-LvCP5Vyc.js";
|
|
@@ -364,6 +364,10 @@ function FilePicker({ files, setFiles, isValid, errorMessage, multiple = false,
|
|
|
364
364
|
const openFilePicker = () => fileInput.current?.click();
|
|
365
365
|
const handleFileDelete = (fileToDelete) => {
|
|
366
366
|
setFiles(files.filter((file) => file !== fileToDelete));
|
|
367
|
+
if (enableTracking) userEvents.addFieldEvent("Interacted with form field", {
|
|
368
|
+
actionType: "remove",
|
|
369
|
+
field: name || "dropzone"
|
|
370
|
+
});
|
|
367
371
|
};
|
|
368
372
|
const handleDragEnter = (e) => {
|
|
369
373
|
e.preventDefault();
|
|
@@ -440,7 +444,7 @@ function FilePicker({ files, setFiles, isValid, errorMessage, multiple = false,
|
|
|
440
444
|
}),
|
|
441
445
|
/* @__PURE__ */ jsx(Typography, {
|
|
442
446
|
color: "secondary",
|
|
443
|
-
children: t(($) => $["
|
|
447
|
+
children: t(($) => $["maxFileSizeOnly"], { maxSize: bytesToSize(maxSize) })
|
|
444
448
|
}),
|
|
445
449
|
/* @__PURE__ */ jsx(Typography, {
|
|
446
450
|
color: "secondary",
|
|
@@ -478,9 +482,481 @@ function FilePicker({ files, setFiles, isValid, errorMessage, multiple = false,
|
|
|
478
482
|
})
|
|
479
483
|
] });
|
|
480
484
|
}
|
|
485
|
+
//#endregion
|
|
486
|
+
//#region src/components/BankAccount/fields/BankAccountNumber/fieldConfig.ts
|
|
487
|
+
var simpleBankAccountNumberMetadata = (example, length, maxLength) => {
|
|
488
|
+
if (maxLength) return {
|
|
489
|
+
validators: validatePatternOnBlur(new RegExp(`^\\d{${length},${maxLength}}$`)),
|
|
490
|
+
mask: { mask: makeMask(...numericInputs(length), ...numericInputs(maxLength - length, true)) },
|
|
491
|
+
guidanceText: {
|
|
492
|
+
key: "enterAMaximumOfNDigitsForExample",
|
|
493
|
+
values: {
|
|
494
|
+
maxDigits: `${maxLength}`,
|
|
495
|
+
example
|
|
496
|
+
}
|
|
497
|
+
}
|
|
498
|
+
};
|
|
499
|
+
return {
|
|
500
|
+
validators: validatePatternOnBlur(new RegExp(`^\\d{${length}}$`)),
|
|
501
|
+
mask: { mask: makeMask(...numericInputs(length)) },
|
|
502
|
+
guidanceText: {
|
|
503
|
+
key: "enterNDigitsForExample",
|
|
504
|
+
values: {
|
|
505
|
+
numDigits: `${length}`,
|
|
506
|
+
example
|
|
507
|
+
}
|
|
508
|
+
}
|
|
509
|
+
};
|
|
510
|
+
};
|
|
511
|
+
var defaultFieldMetadata$3 = { validators: isNotEmptyValidator };
|
|
512
|
+
var defaultFieldConfig$3 = {
|
|
513
|
+
[CountryCodes.CzechRepublic]: {
|
|
514
|
+
validators: validatePatternOnBlur(/^((\d{2}|\d{6})-)?\d*\d{2}$/),
|
|
515
|
+
mask: { mask: makeMask(...numericInputs(2), ...customInputs(1, /-|\d/), ...numericInputs(3), ...customInputs(1, /-|\d/), ...numericInputs(10)) },
|
|
516
|
+
guidanceText: {
|
|
517
|
+
key: "enterXToYDigitsWithOrWithoutPrefixForExample",
|
|
518
|
+
values: {
|
|
519
|
+
minDigits: "2",
|
|
520
|
+
maxDigits: "16",
|
|
521
|
+
firstExample: "19-123457",
|
|
522
|
+
secondExample: "123457"
|
|
523
|
+
}
|
|
524
|
+
}
|
|
525
|
+
},
|
|
526
|
+
[CountryCodes.Denmark]: simpleBankAccountNumberMetadata("2621955959", 10),
|
|
527
|
+
[CountryCodes.Norway]: simpleBankAccountNumberMetadata("86011117947", 11),
|
|
528
|
+
[CountryCodes.UnitedKingdom]: simpleBankAccountNumberMetadata("10000003", 8),
|
|
529
|
+
[CountryCodes.Australia]: simpleBankAccountNumberMetadata("0001234", 5, 10),
|
|
530
|
+
[CountryCodes.Brazil]: simpleBankAccountNumberMetadata("0009795493", 4, 12),
|
|
531
|
+
[CountryCodes.Canada]: simpleBankAccountNumberMetadata("10220001111", 5, 12),
|
|
532
|
+
[CountryCodes.HongKong]: {
|
|
533
|
+
validators: validatePatternOnBlur(new RegExp(`^\\d{6,18}$`)),
|
|
534
|
+
mask: { mask: makeMask(...numericInputs(6), ...numericInputs(12, true)) },
|
|
535
|
+
guidanceText: {
|
|
536
|
+
key: "enterAccountNumberWithBranchCodeForExample",
|
|
537
|
+
values: {
|
|
538
|
+
minDigits: "9",
|
|
539
|
+
maxDigits: "15",
|
|
540
|
+
example: "790000000"
|
|
541
|
+
}
|
|
542
|
+
}
|
|
543
|
+
},
|
|
544
|
+
[CountryCodes.Hungary]: simpleBankAccountNumberMetadata("117730161111101800000000", 24),
|
|
545
|
+
[CountryCodes.Singapore]: simpleBankAccountNumberMetadata("0052312891876", 4, 19),
|
|
546
|
+
[CountryCodes.Sweden]: simpleBankAccountNumberMetadata("123456789", 7, 10),
|
|
547
|
+
[CountryCodes.UnitedStates]: simpleBankAccountNumberMetadata("10220001111", 3, 17),
|
|
548
|
+
[CountryCodes.Poland]: {
|
|
549
|
+
validators: validatePatternOnBlur(/^\d{26}$/),
|
|
550
|
+
mask: { mask: makeMask(...numericInputs(2), spacer, ...numericInputs(4), spacer, ...numericInputs(4), spacer, ...numericInputs(4), spacer, ...numericInputs(4), spacer, ...numericInputs(4), spacer, ...numericInputs(4)) },
|
|
551
|
+
guidanceText: {
|
|
552
|
+
key: "enterNDigitsForExample",
|
|
553
|
+
values: {
|
|
554
|
+
numDigits: "26",
|
|
555
|
+
example: "98 1090 2402 7474 4662 2173 1624"
|
|
556
|
+
}
|
|
557
|
+
}
|
|
558
|
+
},
|
|
559
|
+
[CountryCodes.NewZealand]: {
|
|
560
|
+
validators: validatePatternOnBlur(/^\d{15,16}$/),
|
|
561
|
+
mask: { mask: makeMask(...numericInputs(2), ...nonInputs(" - "), ...numericInputs(4), ...nonInputs(" - "), ...numericInputs(7), ...nonInputs(" - "), ...numericInputs(2), ...numericInputs(1, true)) },
|
|
562
|
+
guidanceText: {
|
|
563
|
+
key: "enterXToYDigitsForExample",
|
|
564
|
+
values: {
|
|
565
|
+
minDigits: "15",
|
|
566
|
+
maxDigits: "16",
|
|
567
|
+
example: "12-8765-9876543-043"
|
|
568
|
+
}
|
|
569
|
+
}
|
|
570
|
+
}
|
|
571
|
+
};
|
|
572
|
+
//#endregion
|
|
573
|
+
//#region src/components/BankAccount/fields/BankCode/fieldConfig.ts
|
|
574
|
+
var defaultFieldMetadata$2 = {
|
|
575
|
+
label: "bankCode",
|
|
576
|
+
validators: isNotEmptyValidator
|
|
577
|
+
};
|
|
578
|
+
var simpleBankCodeMetadata = (length, example, label) => ({
|
|
579
|
+
label: label ?? "bankCode",
|
|
580
|
+
validators: validatePatternOnBlur(new RegExp(`^\\d{${length}}$`)),
|
|
581
|
+
mask: { mask: makeMask(...numericInputs(length)) },
|
|
582
|
+
guidanceText: {
|
|
583
|
+
key: "enterNDigitsForExample",
|
|
584
|
+
values: {
|
|
585
|
+
numDigits: `${length}`,
|
|
586
|
+
example
|
|
587
|
+
}
|
|
588
|
+
}
|
|
589
|
+
});
|
|
590
|
+
var defaultFieldConfig$2 = {
|
|
591
|
+
[CountryCodes.Brazil]: simpleBankCodeMetadata(3, "123"),
|
|
592
|
+
[CountryCodes.Canada]: simpleBankCodeMetadata(3, "001", "institutionNumber"),
|
|
593
|
+
[CountryCodes.CzechRepublic]: simpleBankCodeMetadata(4, "0800"),
|
|
594
|
+
[CountryCodes.Denmark]: simpleBankCodeMetadata(4, "5051"),
|
|
595
|
+
[CountryCodes.HongKong]: simpleBankCodeMetadata(3, "250"),
|
|
596
|
+
[CountryCodes.Norway]: simpleBankCodeMetadata(4, "8601"),
|
|
597
|
+
[CountryCodes.Ecuador]: simpleBankCodeMetadata(4, "1234"),
|
|
598
|
+
[CountryCodes.Japan]: simpleBankCodeMetadata(4, "1234"),
|
|
599
|
+
[CountryCodes.Taiwan]: simpleBankCodeMetadata(3, "123")
|
|
600
|
+
};
|
|
601
|
+
//#endregion
|
|
602
|
+
//#region src/components/BankAccount/fields/BranchCode/fieldConfig.ts
|
|
603
|
+
var defaultFieldMetadata$1 = {
|
|
604
|
+
label: "branchCode",
|
|
605
|
+
validators: isNotEmptyValidator
|
|
606
|
+
};
|
|
607
|
+
var defaultFieldConfig$1 = {
|
|
608
|
+
[CountryCodes.UnitedKingdom]: {
|
|
609
|
+
label: "sortCode",
|
|
610
|
+
validators: validatePatternOnBlur(/^\d{6}$/),
|
|
611
|
+
mask: { mask: makeMask(...numericInputs(6)) },
|
|
612
|
+
guidanceText: {
|
|
613
|
+
key: "enterNDigitsForExample",
|
|
614
|
+
values: {
|
|
615
|
+
numDigits: "6",
|
|
616
|
+
example: "401199"
|
|
617
|
+
}
|
|
618
|
+
}
|
|
619
|
+
},
|
|
620
|
+
[CountryCodes.Australia]: {
|
|
621
|
+
label: "bsbNumber",
|
|
622
|
+
validators: validatePatternOnBlur(/^\d{6}$/),
|
|
623
|
+
mask: { mask: makeMask(...numericInputs(3), ...nonInputs(" - "), ...numericInputs(3)) },
|
|
624
|
+
guidanceText: {
|
|
625
|
+
key: "enterNDigitsForExample",
|
|
626
|
+
values: {
|
|
627
|
+
numDigits: "6",
|
|
628
|
+
example: "033-547"
|
|
629
|
+
}
|
|
630
|
+
}
|
|
631
|
+
},
|
|
632
|
+
[CountryCodes.Brazil]: {
|
|
633
|
+
label: "branchCode",
|
|
634
|
+
validators: validatePatternOnBlur(/^\d{1,5}$/),
|
|
635
|
+
mask: { mask: makeMask(...numericInputs(1), ...numericInputs(4, true)) },
|
|
636
|
+
guidanceText: {
|
|
637
|
+
key: "enterAMaximumOfNDigitsForExample",
|
|
638
|
+
values: {
|
|
639
|
+
maxDigits: "5",
|
|
640
|
+
example: "36257"
|
|
641
|
+
}
|
|
642
|
+
}
|
|
643
|
+
},
|
|
644
|
+
[CountryCodes.Canada]: {
|
|
645
|
+
label: "transitNumber",
|
|
646
|
+
validators: validatePatternOnBlur(/^\d{5}$/),
|
|
647
|
+
mask: { mask: makeMask(...numericInputs(5)) },
|
|
648
|
+
guidanceText: {
|
|
649
|
+
key: "enterNDigitsForExample",
|
|
650
|
+
values: {
|
|
651
|
+
numDigits: "5",
|
|
652
|
+
example: "27601"
|
|
653
|
+
}
|
|
654
|
+
}
|
|
655
|
+
},
|
|
656
|
+
[CountryCodes.UnitedStates]: {
|
|
657
|
+
label: "routingNumber",
|
|
658
|
+
validators: validatePatternOnBlur(/^\d{9}$/),
|
|
659
|
+
mask: { mask: makeMask(...numericInputs(9)) },
|
|
660
|
+
guidanceText: {
|
|
661
|
+
key: "enterNDigitsForExample",
|
|
662
|
+
values: {
|
|
663
|
+
numDigits: "9",
|
|
664
|
+
example: "107005432"
|
|
665
|
+
}
|
|
666
|
+
}
|
|
667
|
+
},
|
|
668
|
+
[CountryCodes.Sweden]: {
|
|
669
|
+
label: "branchCode",
|
|
670
|
+
validators: validatePatternOnBlur(/^(\d{4}|8\d{4})$/),
|
|
671
|
+
mask: { mask: makeMask(...numericInputs(4), ...nonInputs(" - ", { displayEagerly: false }), ...numericInputs(1, true)) },
|
|
672
|
+
guidanceText: {
|
|
673
|
+
key: "enterXOrYDigitsForExample",
|
|
674
|
+
values: {
|
|
675
|
+
xDigits: "4",
|
|
676
|
+
yDigits: "5",
|
|
677
|
+
example: "5678 or 8635-2"
|
|
678
|
+
}
|
|
679
|
+
}
|
|
680
|
+
},
|
|
681
|
+
[CountryCodes.Indonesia]: {
|
|
682
|
+
label: "clearingCode",
|
|
683
|
+
validators: isNotEmptyValidator
|
|
684
|
+
}
|
|
685
|
+
};
|
|
686
|
+
//#endregion
|
|
687
|
+
//#region src/components/BankAccount/fields/Iban/ibanValidator.ts
|
|
688
|
+
/**
|
|
689
|
+
* Basic Bank Account Number pattern per country
|
|
690
|
+
*/
|
|
691
|
+
var bbanPatternsByCountry = {
|
|
692
|
+
[CountryCodes.Albania]: /\d{8}[\dA-Z]{16}/,
|
|
693
|
+
[CountryCodes.Andorra]: /\d{8}[\dA-Z]{12}/,
|
|
694
|
+
[CountryCodes.Austria]: /\d{16}/,
|
|
695
|
+
[CountryCodes.Azerbaijan]: /[\dA-Z]{4}\d{20}/,
|
|
696
|
+
[CountryCodes.Belgium]: /\d{12}/,
|
|
697
|
+
[CountryCodes.Bahrain]: /[A-Z]{4}[\dA-Z]{14}/,
|
|
698
|
+
[CountryCodes.BosniaAndHerzegovina]: /\d{16}/,
|
|
699
|
+
[CountryCodes.Brazil]: /\d{23}[A-Z][\dA-Z]/,
|
|
700
|
+
[CountryCodes.Bulgaria]: /[A-Z]{4}\d{6}[\dA-Z]{8}/,
|
|
701
|
+
[CountryCodes.CostaRica]: /\d{17}/,
|
|
702
|
+
[CountryCodes.Croatia]: /\d{17}/,
|
|
703
|
+
[CountryCodes.Cyprus]: /\d{8}[\dA-Z]{16}/,
|
|
704
|
+
[CountryCodes.CzechRepublic]: /\d{20}/,
|
|
705
|
+
[CountryCodes.Denmark]: /\d{14}/,
|
|
706
|
+
[CountryCodes.DominicanRepublic]: /[A-Z]{4}\d{20}/,
|
|
707
|
+
[CountryCodes.Estonia]: /\d{16}/,
|
|
708
|
+
[CountryCodes.FaroeIslands]: /\d{14}/,
|
|
709
|
+
[CountryCodes.Finland]: /\d{14}/,
|
|
710
|
+
[CountryCodes.France]: /\d{10}[\dA-Z]{11}\d{2}/,
|
|
711
|
+
[CountryCodes.Georgia]: /[\dA-Z]{2}\d{16}/,
|
|
712
|
+
[CountryCodes.Germany]: /\d{18}/,
|
|
713
|
+
[CountryCodes.Gibraltar]: /[A-Z]{4}[\dA-Z]{15}/,
|
|
714
|
+
[CountryCodes.Greece]: /\d{7}[\dA-Z]{16}/,
|
|
715
|
+
[CountryCodes.Greenland]: /\d{14}/,
|
|
716
|
+
[CountryCodes.Guatemala]: /[\dA-Z]{4}[\dA-Z]{20}/,
|
|
717
|
+
[CountryCodes.Hungary]: /\d{24}/,
|
|
718
|
+
[CountryCodes.Iceland]: /\d{22}/,
|
|
719
|
+
[CountryCodes.Ireland]: /[\dA-Z]{4}\d{14}/,
|
|
720
|
+
[CountryCodes.Israel]: /\d{19}/,
|
|
721
|
+
[CountryCodes.Italy]: /[A-Z]\d{10}[\dA-Z]{12}/,
|
|
722
|
+
[CountryCodes.Kazakhstan]: /\d{3}[\dA-Z]{13}/,
|
|
723
|
+
[CountryCodes.Kuwait]: /[A-Z]{4}[\dA-Z]{22}/,
|
|
724
|
+
[CountryCodes.Latvia]: /[A-Z]{4}[\dA-Z]{13}/,
|
|
725
|
+
[CountryCodes.Lebanon]: /\d{4}[\dA-Z]{20}/,
|
|
726
|
+
[CountryCodes.Liechtenstein]: /\d{5}[\dA-Z]{12}/,
|
|
727
|
+
[CountryCodes.Lithuania]: /\d{16}/,
|
|
728
|
+
[CountryCodes.Luxembourg]: /\d{3}[\dA-Z]{13}/,
|
|
729
|
+
[CountryCodes.Macedonia]: /\d{3}[\dA-Z]{10}\d{2}/,
|
|
730
|
+
[CountryCodes.Malta]: /[A-Z]{4}\d{5}[\dA-Z]{18}/,
|
|
731
|
+
[CountryCodes.Mauritania]: /\d{23}/,
|
|
732
|
+
[CountryCodes.Mauritius]: /[A-Z]{4}\d{19}[A-Z]{3}/,
|
|
733
|
+
[CountryCodes.Monaco]: /\d{10}[\dA-Z]{11}\d{2}/,
|
|
734
|
+
[CountryCodes.Moldova]: /[\dA-Z]{2}\d{18}/,
|
|
735
|
+
[CountryCodes.Montenegro]: /\d{18}/,
|
|
736
|
+
[CountryCodes.Netherlands]: /[A-Z]{4}\d{10}/,
|
|
737
|
+
[CountryCodes.Norway]: /\d{11}/,
|
|
738
|
+
[CountryCodes.Pakistan]: /[\dA-Z]{4}\d{16}/,
|
|
739
|
+
[CountryCodes.PalestinianTerritory]: /[\dA-Z]{4}\d{21}/,
|
|
740
|
+
[CountryCodes.Poland]: /\d{24}/,
|
|
741
|
+
[CountryCodes.Portugal]: /\d{21}/,
|
|
742
|
+
[CountryCodes.Romania]: /[A-Z]{4}[\dA-Z]{16}/,
|
|
743
|
+
[CountryCodes.SanMarino]: /[A-Z]\d{10}[\dA-Z]{12}/,
|
|
744
|
+
[CountryCodes.SaudiArabia]: /\d{2}[\dA-Z]{18}/,
|
|
745
|
+
[CountryCodes.Serbia]: /\d{18}/,
|
|
746
|
+
[CountryCodes.Slovakia]: /\d{20}/,
|
|
747
|
+
[CountryCodes.Slovenia]: /\d{15}/,
|
|
748
|
+
[CountryCodes.Spain]: /\d{20}/,
|
|
749
|
+
[CountryCodes.Sweden]: /\d{20}/,
|
|
750
|
+
[CountryCodes.Switzerland]: /\d{5}[\dA-Z]{12}/,
|
|
751
|
+
[CountryCodes.Tunisia]: /\d{20}/,
|
|
752
|
+
[CountryCodes.Turkey]: /\d{5}[\dA-Z]{17}/,
|
|
753
|
+
[CountryCodes.UnitedArabEmirates]: /\d{3}\d{16}/,
|
|
754
|
+
[CountryCodes.UnitedKingdom]: /[A-Z]{4}\d{14}/,
|
|
755
|
+
[CountryCodes.VirginIslandsBritish]: /[\dA-Z]{4}\d{16}/
|
|
756
|
+
};
|
|
757
|
+
/**
|
|
758
|
+
* For some regions the iban format is shared and therefore can accept IBANs starting
|
|
759
|
+
* with some other country code
|
|
760
|
+
*/
|
|
761
|
+
var customPrefixByCountry = {
|
|
762
|
+
[CountryCodes.Guernsey]: "GB",
|
|
763
|
+
[CountryCodes.Jersey]: "GB",
|
|
764
|
+
[CountryCodes.IsleOfMan]: "GB"
|
|
765
|
+
};
|
|
766
|
+
function ibanValidator(input, bankCountry) {
|
|
767
|
+
if (isEmpty(input)) return false;
|
|
768
|
+
const ibanInput = input.replace(/ /g, "").toUpperCase();
|
|
769
|
+
if (!/^([a-zA-Z0-9]{4} ){2,8}[a-zA-Z0-9]{1,4}|[a-zA-Z0-9]{12,34}$/.test(ibanInput)) return false;
|
|
770
|
+
const countryCode = ibanInput.substring(0, 2);
|
|
771
|
+
const allowedPrefix = customPrefixByCountry[bankCountry] ?? bankCountry;
|
|
772
|
+
if (countryCode !== allowedPrefix) return {
|
|
773
|
+
key: "yourIbanShouldBeginWith_",
|
|
774
|
+
values: { countryCode: allowedPrefix }
|
|
775
|
+
};
|
|
776
|
+
const bbanPattern = bbanPatternsByCountry[countryCode];
|
|
777
|
+
if (bbanPattern) {
|
|
778
|
+
if (!new RegExp(`^[A-Z]{2}\\d{2}${bbanPattern.source}$`, "").test(ibanInput)) return false;
|
|
779
|
+
}
|
|
780
|
+
const ibanCheck = ibanInput.substring(4, ibanInput.length) + ibanInput.substring(0, 4);
|
|
781
|
+
let leadingZeroes = true;
|
|
782
|
+
let ibanCheckDigits = "";
|
|
783
|
+
for (let i = 0; i < ibanCheck.length; i += 1) {
|
|
784
|
+
const charAt = ibanCheck.charAt(i);
|
|
785
|
+
if (charAt !== "0") leadingZeroes = false;
|
|
786
|
+
if (!leadingZeroes) ibanCheckDigits += "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ".indexOf(charAt);
|
|
787
|
+
}
|
|
788
|
+
let cRest = 0;
|
|
789
|
+
for (let p = 0; p < ibanCheckDigits.length; p += 1) {
|
|
790
|
+
const cChar = ibanCheckDigits.charAt(p);
|
|
791
|
+
cRest = +`${cRest}${cChar}` % 97;
|
|
792
|
+
}
|
|
793
|
+
return cRest === 1;
|
|
794
|
+
}
|
|
795
|
+
//#endregion
|
|
796
|
+
//#region src/components/BankAccount/fields/Iban/fieldConfig.ts
|
|
797
|
+
var validateIbanOnBlurAndInput = (country) => ({
|
|
798
|
+
modes: ["blur", "input"],
|
|
799
|
+
validate: (iban) => ibanValidator(iban, country) === true,
|
|
800
|
+
errorMessage: (iban) => {
|
|
801
|
+
const result = ibanValidator(iban, country);
|
|
802
|
+
return typeof result === "boolean" ? void 0 : result;
|
|
803
|
+
}
|
|
804
|
+
});
|
|
805
|
+
var ibanMask = (country, inputLength, allowLettersInBban) => {
|
|
806
|
+
const tokens = [];
|
|
807
|
+
tokens.push(...nonInputs(country, { includeInValue: true }), ...numericInputs(2));
|
|
808
|
+
inputLength -= 2;
|
|
809
|
+
const inputToken = allowLettersInBban ? alphanumericInputs : numericInputs;
|
|
810
|
+
const numGroups = Math.floor(inputLength / 4);
|
|
811
|
+
const remainder = inputLength % 4;
|
|
812
|
+
for (let i = 0; i < numGroups; i += 1) tokens.push(spacer, ...inputToken(4));
|
|
813
|
+
if (remainder > 0) tokens.push(spacer, ...inputToken(remainder));
|
|
814
|
+
return {
|
|
815
|
+
mask: makeMask(...tokens),
|
|
816
|
+
transformOnType: allowLettersInBban ? uppercase : void 0
|
|
817
|
+
};
|
|
818
|
+
};
|
|
819
|
+
var ibanGuidance = (type, numDigitsOrChars, example) => type === "digits" ? {
|
|
820
|
+
key: "enterTheRemainingNDigitsForExample",
|
|
821
|
+
values: {
|
|
822
|
+
numDigits: `${numDigitsOrChars}`,
|
|
823
|
+
example
|
|
824
|
+
}
|
|
825
|
+
} : {
|
|
826
|
+
key: "enterTheRemainingNCharactersForExample",
|
|
827
|
+
values: {
|
|
828
|
+
numChars: `${numDigitsOrChars}`,
|
|
829
|
+
example
|
|
830
|
+
}
|
|
831
|
+
};
|
|
832
|
+
var ibanMetadata = (country, inputLength, example, allowLettersInBban) => ({
|
|
833
|
+
validators: validateIbanOnBlurAndInput(country),
|
|
834
|
+
mask: ibanMask(country, inputLength, allowLettersInBban),
|
|
835
|
+
guidanceText: ibanGuidance(allowLettersInBban ? "characters" : "digits", inputLength, example)
|
|
836
|
+
});
|
|
837
|
+
var gbIbanMetadata = ibanMetadata(CountryCodes.UnitedKingdom, 20, "GB09 BARC 2003 9554 8297 59", true);
|
|
838
|
+
var defaultFieldMetadata = { validators: isNotEmptyValidator };
|
|
839
|
+
var defaultFieldConfig = {
|
|
840
|
+
[CountryCodes.Austria]: ibanMetadata(CountryCodes.Austria, 18, "AT88 5400 0746 7265 9747"),
|
|
841
|
+
[CountryCodes.Belgium]: ibanMetadata(CountryCodes.Belgium, 14, "BE59 9788 6743 2226"),
|
|
842
|
+
[CountryCodes.Croatia]: ibanMetadata(CountryCodes.Croatia, 19, "HR51 2484 0083 5929 6973 8"),
|
|
843
|
+
[CountryCodes.Cyprus]: ibanMetadata(CountryCodes.Cyprus, 26, "CY17 0020 0128 0000 0012 0052 7600"),
|
|
844
|
+
[CountryCodes.CzechRepublic]: ibanMetadata(CountryCodes.CzechRepublic, 22, "CZ65 0800 0000 1920 0014 5399"),
|
|
845
|
+
[CountryCodes.Denmark]: ibanMetadata(CountryCodes.Denmark, 16, "DK95 2000 0123 4567 89"),
|
|
846
|
+
[CountryCodes.Estonia]: ibanMetadata(CountryCodes.Estonia, 18, "EE26 1291 5123 1542 6371"),
|
|
847
|
+
[CountryCodes.Finland]: ibanMetadata(CountryCodes.Finland, 16, "FI21 1234 5600 0007 85"),
|
|
848
|
+
[CountryCodes.Germany]: ibanMetadata(CountryCodes.Germany, 20, "DE91 1000 0000 0123 4567 89"),
|
|
849
|
+
[CountryCodes.Greece]: ibanMetadata(CountryCodes.Greece, 25, "GR57 0107 7142 7681 6687 9575 217"),
|
|
850
|
+
[CountryCodes.Hungary]: ibanMetadata(CountryCodes.Hungary, 26, "HU68 1070 0024 3428 4128 3192 4812"),
|
|
851
|
+
[CountryCodes.Lithuania]: ibanMetadata(CountryCodes.Lithuania, 18, "LT12 1000 0111 0100 1000"),
|
|
852
|
+
[CountryCodes.Luxembourg]: ibanMetadata(CountryCodes.Luxembourg, 18, "LU28 0019 4006 4475 0000"),
|
|
853
|
+
[CountryCodes.Norway]: ibanMetadata(CountryCodes.Norway, 13, "NO83 3000 1234 567"),
|
|
854
|
+
[CountryCodes.Poland]: ibanMetadata(CountryCodes.Poland, 26, "PL98 1090 2402 7474 4662 2173 1624"),
|
|
855
|
+
[CountryCodes.Portugal]: ibanMetadata(CountryCodes.Portugal, 23, "PT42 0035 0651 8646 9119 5263 5"),
|
|
856
|
+
[CountryCodes.Slovakia]: ibanMetadata(CountryCodes.Slovakia, 22, "SK25 5173 1333 4916 3219 3521"),
|
|
857
|
+
[CountryCodes.Slovenia]: ibanMetadata(CountryCodes.Slovenia, 17, "SI56 1920 0123 4567 892"),
|
|
858
|
+
[CountryCodes.Spain]: ibanMetadata(CountryCodes.Spain, 22, "ES91 2100 0418 4502 0005 1332"),
|
|
859
|
+
[CountryCodes.Sweden]: ibanMetadata(CountryCodes.Sweden, 22, "SE72 8000 0810 3400 0978 3242"),
|
|
860
|
+
[CountryCodes.Bulgaria]: ibanMetadata(CountryCodes.Bulgaria, 20, "BG17 BNPA 9440 4432 7749 93", true),
|
|
861
|
+
[CountryCodes.France]: ibanMetadata(CountryCodes.France, 25, "FR64 1009 6000 4035 3425 9742 Y90", true),
|
|
862
|
+
[CountryCodes.Gibraltar]: ibanMetadata(CountryCodes.Gibraltar, 21, "GI75 NWBK 0000 0000 7099 453", true),
|
|
863
|
+
[CountryCodes.Ireland]: ibanMetadata(CountryCodes.Ireland, 20, "IE64 IRCE 9205 0112 3456 78", true),
|
|
864
|
+
[CountryCodes.Italy]: ibanMetadata(CountryCodes.Italy, 25, "IT06 L030 0203 2809 8485 8934 882", true),
|
|
865
|
+
[CountryCodes.Latvia]: ibanMetadata(CountryCodes.Latvia, 19, "LV80 BANK 0000 4351 9500 1", true),
|
|
866
|
+
[CountryCodes.Liechtenstein]: ibanMetadata(CountryCodes.Liechtenstein, 19, "LI21 0881 0000 2324 013A A", true),
|
|
867
|
+
[CountryCodes.Malta]: ibanMetadata(CountryCodes.Malta, 29, "MT84 MALT 0110 0001 2345 MTLC AST0 01S", true),
|
|
868
|
+
[CountryCodes.Monaco]: ibanMetadata(CountryCodes.Monaco, 25, "MC58 1122 2000 0101 2345 6789 030", true),
|
|
869
|
+
[CountryCodes.Netherlands]: ibanMetadata(CountryCodes.Netherlands, 16, "NL50 ABNA 4452 7591 49", true),
|
|
870
|
+
[CountryCodes.Romania]: ibanMetadata(CountryCodes.Romania, 22, "RO36 PORL 9596 9966 4965 4284", true),
|
|
871
|
+
[CountryCodes.Switzerland]: ibanMetadata(CountryCodes.Switzerland, 19, "CH56 0483 5012 3456 7800 9", true),
|
|
872
|
+
[CountryCodes.UnitedKingdom]: gbIbanMetadata,
|
|
873
|
+
[CountryCodes.Guernsey]: gbIbanMetadata,
|
|
874
|
+
[CountryCodes.Jersey]: gbIbanMetadata,
|
|
875
|
+
[CountryCodes.IsleOfMan]: gbIbanMetadata
|
|
876
|
+
};
|
|
877
|
+
//#endregion
|
|
878
|
+
//#region src/components/BankAccount/fields/SwiftCode/fieldConfig.ts
|
|
879
|
+
var swiftCodeFieldMetadata = {
|
|
880
|
+
validators: validatePatternOnBlur(/^([a-zA-Z0-9]{8}|[a-zA-Z0-9]{11})$/),
|
|
881
|
+
mask: {
|
|
882
|
+
mask: makeMask(...alphaInputs(6), ...alphanumericInputs(2), ...alphanumericInputs(3, true)),
|
|
883
|
+
transformOnType: uppercase
|
|
884
|
+
}
|
|
885
|
+
};
|
|
886
|
+
//#endregion
|
|
887
|
+
//#region src/components/BankAccount/forms/BankDocument/validate.ts
|
|
888
|
+
var bankDocumentValidationRules = { description: {
|
|
889
|
+
modes: ["blur"],
|
|
890
|
+
validate: (description) => description ? bankStatementDescriptionPattern.test(description) : true,
|
|
891
|
+
errorMessage: "invalidFormatBankStatementDescription"
|
|
892
|
+
} };
|
|
893
|
+
//#endregion
|
|
894
|
+
//#region src/components/BankAccount/forms/BankVerification/validate.ts
|
|
895
|
+
var bankVerificationValidationRules = {
|
|
896
|
+
verifiedAccountHolder: {
|
|
897
|
+
modes: ["blur"],
|
|
898
|
+
validate: (verifiedAccountHolder) => !isEmpty(verifiedAccountHolder),
|
|
899
|
+
errorMessage: "fieldIsRequired"
|
|
900
|
+
},
|
|
901
|
+
verifiedBankCountry: {
|
|
902
|
+
modes: ["blur"],
|
|
903
|
+
validate: (verifiedBankCountry) => !isEmpty(verifiedBankCountry),
|
|
904
|
+
errorMessage: "fieldIsRequired"
|
|
905
|
+
},
|
|
906
|
+
verifiedBankName: {
|
|
907
|
+
modes: ["blur"],
|
|
908
|
+
validate: (verifiedBankName) => !isEmpty(verifiedBankName),
|
|
909
|
+
errorMessage: "fieldIsRequired"
|
|
910
|
+
},
|
|
911
|
+
verifiedCurrencyCode: {
|
|
912
|
+
modes: ["blur"],
|
|
913
|
+
validate: (verifiedCurrencyCode) => !isEmpty(verifiedCurrencyCode),
|
|
914
|
+
errorMessage: "fieldIsRequired"
|
|
915
|
+
},
|
|
916
|
+
verifiedBankAccountNumber: {
|
|
917
|
+
modes: ["blur"],
|
|
918
|
+
validate: (verifiedBankAccountNumber) => !isEmpty(verifiedBankAccountNumber),
|
|
919
|
+
errorMessage: "fieldIsRequired"
|
|
920
|
+
}
|
|
921
|
+
};
|
|
922
|
+
//#endregion
|
|
923
|
+
//#region src/components/BankAccount/tasks/PayoutDetailsDropin/validate.ts
|
|
924
|
+
var bankStatementValidationOptions = {
|
|
925
|
+
...defaultFileValidationOptions,
|
|
926
|
+
isOptional: false
|
|
927
|
+
};
|
|
928
|
+
function payoutCountryDetailsValidators() {
|
|
929
|
+
return {};
|
|
930
|
+
}
|
|
931
|
+
function payoutVerificationMethodValidators() {
|
|
932
|
+
return { payoutVerificationMethod: {
|
|
933
|
+
modes: ["blur"],
|
|
934
|
+
validate: (payoutVerificationMethod) => !!payoutVerificationMethod
|
|
935
|
+
} };
|
|
936
|
+
}
|
|
937
|
+
function payoutAccountDetailsValidators({ country }) {
|
|
938
|
+
const branchCodeMetadata = resolveFieldMetadata(defaultFieldConfig$1[country], {}, defaultFieldMetadata$1);
|
|
939
|
+
const bankAccountNumberMetadata = resolveFieldMetadata(defaultFieldConfig$3[country], {}, defaultFieldMetadata$3);
|
|
940
|
+
const ibanMetadata = resolveFieldMetadata(defaultFieldConfig[country], {}, defaultFieldMetadata);
|
|
941
|
+
const bankCodeMetadata = resolveFieldMetadata(defaultFieldConfig$2[country], {}, defaultFieldMetadata$2);
|
|
942
|
+
return {
|
|
943
|
+
branchCode: branchCodeMetadata.validators,
|
|
944
|
+
bankAccountNumber: bankAccountNumberMetadata.validators,
|
|
945
|
+
iban: ibanMetadata.validators,
|
|
946
|
+
swiftCode: swiftCodeFieldMetadata.validators,
|
|
947
|
+
bankCode: bankCodeMetadata.validators
|
|
948
|
+
};
|
|
949
|
+
}
|
|
950
|
+
function payoutAccountDocumentsValidators() {
|
|
951
|
+
return {
|
|
952
|
+
...bankDocumentValidationRules,
|
|
953
|
+
bankStatementDocument: fileValidationRules(bankStatementValidationOptions)
|
|
954
|
+
};
|
|
955
|
+
}
|
|
956
|
+
function payoutAccountVerificationValidators() {
|
|
957
|
+
return bankVerificationValidationRules;
|
|
958
|
+
}
|
|
481
959
|
var BankDocumentClassification_module_default = {
|
|
482
|
-
"bank-document-classification": "adyen-kyc-bank-document-classification",
|
|
483
|
-
bankDocumentClassification: "adyen-kyc-bank-document-classification",
|
|
484
960
|
"requirements-list": "adyen-kyc-requirements-list",
|
|
485
961
|
requirementsList: "adyen-kyc-requirements-list",
|
|
486
962
|
"file-picker-disabled": "adyen-kyc-file-picker-disabled",
|
|
@@ -490,25 +966,11 @@ var BankDocumentClassification_module_default = {
|
|
|
490
966
|
preview: "adyen-kyc-preview",
|
|
491
967
|
"preview-image": "adyen-kyc-preview-image",
|
|
492
968
|
previewImage: "adyen-kyc-preview-image",
|
|
493
|
-
content: "adyen-kyc-content"
|
|
494
|
-
issues: "adyen-kyc-issues",
|
|
495
|
-
"confirmation-modal": "adyen-kyc-confirmation-modal",
|
|
496
|
-
confirmationModal: "adyen-kyc-confirmation-modal"
|
|
969
|
+
content: "adyen-kyc-content"
|
|
497
970
|
};
|
|
498
971
|
//#endregion
|
|
499
|
-
//#region src/components/BankAccount/forms/BankDocument/validate.ts
|
|
500
|
-
var bankDocumentValidationRules = { description: {
|
|
501
|
-
modes: ["blur"],
|
|
502
|
-
validate: (description) => description ? bankStatementDescriptionPattern.test(description) : true,
|
|
503
|
-
errorMessage: "invalidFormatBankStatementDescription"
|
|
504
|
-
} };
|
|
505
|
-
//#endregion
|
|
506
972
|
//#region src/components/BankAccount/forms/BankDocument/BankDocumentClassification.tsx
|
|
507
973
|
var CHARACTERS_LIMIT = 200;
|
|
508
|
-
var bankStatementValidationOptions = {
|
|
509
|
-
...defaultFileValidationOptions,
|
|
510
|
-
isOptional: false
|
|
511
|
-
};
|
|
512
974
|
var bankDocumentClassificationFields = ["bankStatementDocument", "description"];
|
|
513
975
|
var classifyingDocument = signal(false);
|
|
514
976
|
function BankDocumentClassification(props) {
|
|
@@ -590,18 +1052,26 @@ function BankDocumentClassification(props) {
|
|
|
590
1052
|
].includes(country || "") || isShadowMode)) return;
|
|
591
1053
|
if (files.length > 0) {
|
|
592
1054
|
const file = files[0];
|
|
593
|
-
if (file && file instanceof File)
|
|
594
|
-
const
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
}
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
1055
|
+
if (file && file instanceof File) {
|
|
1056
|
+
const fileSizeExceedsMax = file.size > bankStatementValidationOptions.maxSize;
|
|
1057
|
+
const fileSupportedType = bankStatementValidationOptions.allowedFileTypes.some((filetype) => file.name.toLowerCase().endsWith(filetype.toLowerCase()));
|
|
1058
|
+
if (fileSizeExceedsMax || !fileSupportedType) {
|
|
1059
|
+
setShowReviewModal(false);
|
|
1060
|
+
return;
|
|
1061
|
+
}
|
|
1062
|
+
try {
|
|
1063
|
+
const document = {
|
|
1064
|
+
file,
|
|
1065
|
+
documentType: "bankStatement",
|
|
1066
|
+
fileName: file.name,
|
|
1067
|
+
sessionId: legalEntity.id
|
|
1068
|
+
};
|
|
1069
|
+
setShowReviewModal(false);
|
|
1070
|
+
classifyingDocument.value = true;
|
|
1071
|
+
validateDocumentMutation.mutate(document);
|
|
1072
|
+
} catch (error) {
|
|
1073
|
+
logger.error("Error processing document:", error);
|
|
1074
|
+
}
|
|
605
1075
|
}
|
|
606
1076
|
}
|
|
607
1077
|
};
|
|
@@ -639,22 +1109,21 @@ function BankDocumentClassification(props) {
|
|
|
639
1109
|
id,
|
|
640
1110
|
useMultiFormMode
|
|
641
1111
|
]);
|
|
642
|
-
const
|
|
1112
|
+
const trackModalAction = (reason) => {
|
|
643
1113
|
userEvents.addEvent("Clicked button", {
|
|
644
|
-
actionType: "
|
|
1114
|
+
actionType: "close",
|
|
645
1115
|
actionLevel: "journey",
|
|
646
|
-
label:
|
|
1116
|
+
label: `bankDocumentClassification${reason}`
|
|
647
1117
|
});
|
|
1118
|
+
};
|
|
1119
|
+
const handleUploadNewDocument = () => {
|
|
1120
|
+
trackModalAction("UploadNewDocument");
|
|
648
1121
|
inputRef.current?.click();
|
|
649
1122
|
};
|
|
650
1123
|
const handleContinueAnyway = () => {
|
|
651
1124
|
setShowReviewModal(false);
|
|
1125
|
+
trackModalAction("ContinueAnyway");
|
|
652
1126
|
handleNextClick?.();
|
|
653
|
-
userEvents.addEvent("Clicked button", {
|
|
654
|
-
actionType: "next",
|
|
655
|
-
actionLevel: "journey",
|
|
656
|
-
label: "bankDocumentClassificationContinueAnyway"
|
|
657
|
-
});
|
|
658
1127
|
};
|
|
659
1128
|
const documentPreview = useMemo(() => {
|
|
660
1129
|
if (!data?.bankStatementDocument?.[0] || !showReviewModal) return null;
|
|
@@ -684,6 +1153,13 @@ function BankDocumentClassification(props) {
|
|
|
684
1153
|
/* @__PURE__ */ jsx("li", { children: t(($) => $["documentRequirementReadableText"]) })
|
|
685
1154
|
]
|
|
686
1155
|
});
|
|
1156
|
+
const aiLabelMessage = /* @__PURE__ */ jsx(Typography, {
|
|
1157
|
+
className: "adyen-kyc-u-margin-top-16 adyen-kyc-u-margin-bottom-8",
|
|
1158
|
+
el: "p",
|
|
1159
|
+
color: "secondary",
|
|
1160
|
+
variant: "caption",
|
|
1161
|
+
children: t(($) => $["weUseAnInternalAITool"])
|
|
1162
|
+
});
|
|
687
1163
|
return /* @__PURE__ */ jsxs("div", {
|
|
688
1164
|
className: BankDocumentClassification_module_default.bankDocumentPage,
|
|
689
1165
|
children: [
|
|
@@ -713,9 +1189,9 @@ function BankDocumentClassification(props) {
|
|
|
713
1189
|
className: cx("adyen-kyc-upload-field"),
|
|
714
1190
|
name: "bankStatementDocument",
|
|
715
1191
|
isValid: valid?.bankStatementDocument ?? true,
|
|
716
|
-
children: (childProps) => /* @__PURE__ */
|
|
1192
|
+
children: (childProps) => /* @__PURE__ */ jsxs("div", {
|
|
717
1193
|
className: validateDocumentMutation.isPending && !isShadowMode ? BankDocumentClassification_module_default.filePickerDisabled : "",
|
|
718
|
-
children: /* @__PURE__ */ jsx(FilePicker, {
|
|
1194
|
+
children: [/* @__PURE__ */ jsx(FilePicker, {
|
|
719
1195
|
...childProps,
|
|
720
1196
|
name: "bankStatementDocument",
|
|
721
1197
|
files: data?.bankStatementDocument ?? [],
|
|
@@ -723,8 +1199,9 @@ function BankDocumentClassification(props) {
|
|
|
723
1199
|
isValid: valid?.bankStatementDocument ?? true,
|
|
724
1200
|
errorMessage: errors?.bankStatementDocument?.errorMessage,
|
|
725
1201
|
loading: validateDocumentMutation.isPending && !isShadowMode,
|
|
1202
|
+
enableTracking: true,
|
|
726
1203
|
...bankStatementValidationOptions
|
|
727
|
-
})
|
|
1204
|
+
}), enableBankDocumentClassification && aiLabelMessage]
|
|
728
1205
|
})
|
|
729
1206
|
}),
|
|
730
1207
|
data?.bankStatementDocument?.length ? /* @__PURE__ */ jsx(Field, {
|
|
@@ -745,8 +1222,14 @@ function BankDocumentClassification(props) {
|
|
|
745
1222
|
}),
|
|
746
1223
|
showReviewModal && /* @__PURE__ */ jsx(Modal, {
|
|
747
1224
|
ariaLabel: t(($) => $["checkYourBankDocument"]),
|
|
748
|
-
size: "
|
|
749
|
-
|
|
1225
|
+
size: "large",
|
|
1226
|
+
onClose: () => {
|
|
1227
|
+
handleChange("bankStatementDocument")([]);
|
|
1228
|
+
setShowReviewModal(false);
|
|
1229
|
+
trackModalAction("CloseModal");
|
|
1230
|
+
},
|
|
1231
|
+
showCloseButton: true,
|
|
1232
|
+
fitContent: true,
|
|
750
1233
|
children: /* @__PURE__ */ jsxs("div", {
|
|
751
1234
|
className: BankDocumentClassification_module_default.reviewModal,
|
|
752
1235
|
children: [/* @__PURE__ */ jsx("div", {
|
|
@@ -758,33 +1241,28 @@ function BankDocumentClassification(props) {
|
|
|
758
1241
|
}), /* @__PURE__ */ jsxs("div", {
|
|
759
1242
|
className: BankDocumentClassification_module_default.content,
|
|
760
1243
|
children: [
|
|
761
|
-
/* @__PURE__ */ jsx(
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
children: t(($) => $["checkYourBankDocument"])
|
|
765
|
-
}),
|
|
766
|
-
/* @__PURE__ */ jsx(Typography, {
|
|
767
|
-
el: "p",
|
|
768
|
-
variant: "body",
|
|
769
|
-
children: t(($) => $["toVerifyYourPayoutAccount"])
|
|
1244
|
+
/* @__PURE__ */ jsx(Header, {
|
|
1245
|
+
title: t(($) => $["checkYourBankDocument"]),
|
|
1246
|
+
description: t(($) => $["toVerifyYourPayoutAccount"])
|
|
770
1247
|
}),
|
|
771
1248
|
documentRequirements,
|
|
772
1249
|
/* @__PURE__ */ jsxs(StackLayout, {
|
|
773
1250
|
horizontal: true,
|
|
774
1251
|
align: "right",
|
|
775
|
-
gap: "
|
|
1252
|
+
gap: "small",
|
|
776
1253
|
children: [/* @__PURE__ */ jsx(Button, {
|
|
777
|
-
variant: "secondary",
|
|
778
|
-
disabled: validateDocumentMutation.isPending,
|
|
779
|
-
onClick: handleContinueAnyway,
|
|
780
|
-
children: t(($) => $["useThisDocument"])
|
|
781
|
-
}), /* @__PURE__ */ jsx(Button, {
|
|
782
1254
|
loading: validateDocumentMutation.isPending,
|
|
783
1255
|
variant: "primary",
|
|
784
1256
|
onClick: handleUploadNewDocument,
|
|
785
1257
|
children: t(($) => $["replaceDocument"])
|
|
1258
|
+
}), /* @__PURE__ */ jsx(Button, {
|
|
1259
|
+
variant: "tertiary",
|
|
1260
|
+
disabled: validateDocumentMutation.isPending,
|
|
1261
|
+
onClick: handleContinueAnyway,
|
|
1262
|
+
children: t(($) => $["useThisDocument"])
|
|
786
1263
|
})]
|
|
787
|
-
})
|
|
1264
|
+
}),
|
|
1265
|
+
aiLabelMessage
|
|
788
1266
|
]
|
|
789
1267
|
})]
|
|
790
1268
|
})
|
|
@@ -798,7 +1276,7 @@ function BankDocumentClassification(props) {
|
|
|
798
1276
|
if (fileInput?.files?.length) handleDocumentUpload([...fileInput.files]);
|
|
799
1277
|
},
|
|
800
1278
|
type: "file",
|
|
801
|
-
accept:
|
|
1279
|
+
accept: bankStatementValidationOptions.allowedFileTypes.join(", ")
|
|
802
1280
|
})
|
|
803
1281
|
]
|
|
804
1282
|
});
|
|
@@ -1320,35 +1798,6 @@ var resetPayoutSignals = () => {
|
|
|
1320
1798
|
isUsingManualFlow.value = true;
|
|
1321
1799
|
};
|
|
1322
1800
|
//#endregion
|
|
1323
|
-
//#region src/components/BankAccount/forms/BankVerification/validate.ts
|
|
1324
|
-
var bankVerificationValidationRules = {
|
|
1325
|
-
verifiedAccountHolder: {
|
|
1326
|
-
modes: ["blur"],
|
|
1327
|
-
validate: (verifiedAccountHolder) => !isEmpty(verifiedAccountHolder),
|
|
1328
|
-
errorMessage: "fieldIsRequired"
|
|
1329
|
-
},
|
|
1330
|
-
verifiedBankCountry: {
|
|
1331
|
-
modes: ["blur"],
|
|
1332
|
-
validate: (verifiedBankCountry) => !isEmpty(verifiedBankCountry),
|
|
1333
|
-
errorMessage: "fieldIsRequired"
|
|
1334
|
-
},
|
|
1335
|
-
verifiedBankName: {
|
|
1336
|
-
modes: ["blur"],
|
|
1337
|
-
validate: (verifiedBankName) => !isEmpty(verifiedBankName),
|
|
1338
|
-
errorMessage: "fieldIsRequired"
|
|
1339
|
-
},
|
|
1340
|
-
verifiedCurrencyCode: {
|
|
1341
|
-
modes: ["blur"],
|
|
1342
|
-
validate: (verifiedCurrencyCode) => !isEmpty(verifiedCurrencyCode),
|
|
1343
|
-
errorMessage: "fieldIsRequired"
|
|
1344
|
-
},
|
|
1345
|
-
verifiedBankAccountNumber: {
|
|
1346
|
-
modes: ["blur"],
|
|
1347
|
-
validate: (verifiedBankAccountNumber) => !isEmpty(verifiedBankAccountNumber),
|
|
1348
|
-
errorMessage: "fieldIsRequired"
|
|
1349
|
-
}
|
|
1350
|
-
};
|
|
1351
|
-
//#endregion
|
|
1352
1801
|
//#region src/api/transferInstruments/useHandleBankVerificationError.ts
|
|
1353
1802
|
var handleBankVerificationError = async (legalEntityId, baseUrl, bankVerificationErrorParams) => {
|
|
1354
1803
|
return httpPost({
|
|
@@ -1633,93 +2082,6 @@ function BankAccountFormat(props) {
|
|
|
1633
2082
|
}) });
|
|
1634
2083
|
}
|
|
1635
2084
|
//#endregion
|
|
1636
|
-
//#region src/components/BankAccount/fields/BankAccountNumber/fieldConfig.ts
|
|
1637
|
-
var simpleBankAccountNumberMetadata = (example, length, maxLength) => {
|
|
1638
|
-
if (maxLength) return {
|
|
1639
|
-
validators: validatePatternOnBlur(new RegExp(`^\\d{${length},${maxLength}}$`)),
|
|
1640
|
-
mask: { mask: makeMask(...numericInputs(length), ...numericInputs(maxLength - length, true)) },
|
|
1641
|
-
guidanceText: {
|
|
1642
|
-
key: "enterAMaximumOfNDigitsForExample",
|
|
1643
|
-
values: {
|
|
1644
|
-
maxDigits: `${maxLength}`,
|
|
1645
|
-
example
|
|
1646
|
-
}
|
|
1647
|
-
}
|
|
1648
|
-
};
|
|
1649
|
-
return {
|
|
1650
|
-
validators: validatePatternOnBlur(new RegExp(`^\\d{${length}}$`)),
|
|
1651
|
-
mask: { mask: makeMask(...numericInputs(length)) },
|
|
1652
|
-
guidanceText: {
|
|
1653
|
-
key: "enterNDigitsForExample",
|
|
1654
|
-
values: {
|
|
1655
|
-
numDigits: `${length}`,
|
|
1656
|
-
example
|
|
1657
|
-
}
|
|
1658
|
-
}
|
|
1659
|
-
};
|
|
1660
|
-
};
|
|
1661
|
-
var defaultFieldMetadata$3 = { validators: isNotEmptyValidator };
|
|
1662
|
-
var defaultFieldConfig$3 = {
|
|
1663
|
-
[CountryCodes.CzechRepublic]: {
|
|
1664
|
-
validators: validatePatternOnBlur(/^((\d{2}|\d{6})-)?\d*\d{2}$/),
|
|
1665
|
-
mask: { mask: makeMask(...numericInputs(2), ...customInputs(1, /-|\d/), ...numericInputs(3), ...customInputs(1, /-|\d/), ...numericInputs(10)) },
|
|
1666
|
-
guidanceText: {
|
|
1667
|
-
key: "enterXToYDigitsWithOrWithoutPrefixForExample",
|
|
1668
|
-
values: {
|
|
1669
|
-
minDigits: "2",
|
|
1670
|
-
maxDigits: "16",
|
|
1671
|
-
firstExample: "19-123457",
|
|
1672
|
-
secondExample: "123457"
|
|
1673
|
-
}
|
|
1674
|
-
}
|
|
1675
|
-
},
|
|
1676
|
-
[CountryCodes.Denmark]: simpleBankAccountNumberMetadata("2621955959", 10),
|
|
1677
|
-
[CountryCodes.Norway]: simpleBankAccountNumberMetadata("86011117947", 11),
|
|
1678
|
-
[CountryCodes.UnitedKingdom]: simpleBankAccountNumberMetadata("10000003", 8),
|
|
1679
|
-
[CountryCodes.Australia]: simpleBankAccountNumberMetadata("0001234", 5, 10),
|
|
1680
|
-
[CountryCodes.Brazil]: simpleBankAccountNumberMetadata("0009795493", 4, 12),
|
|
1681
|
-
[CountryCodes.Canada]: simpleBankAccountNumberMetadata("10220001111", 5, 12),
|
|
1682
|
-
[CountryCodes.HongKong]: {
|
|
1683
|
-
validators: validatePatternOnBlur(new RegExp(`^\\d{6,18}$`)),
|
|
1684
|
-
mask: { mask: makeMask(...numericInputs(6), ...numericInputs(12, true)) },
|
|
1685
|
-
guidanceText: {
|
|
1686
|
-
key: "enterAccountNumberWithBranchCodeForExample",
|
|
1687
|
-
values: {
|
|
1688
|
-
minDigits: "9",
|
|
1689
|
-
maxDigits: "15",
|
|
1690
|
-
example: "790000000"
|
|
1691
|
-
}
|
|
1692
|
-
}
|
|
1693
|
-
},
|
|
1694
|
-
[CountryCodes.Hungary]: simpleBankAccountNumberMetadata("117730161111101800000000", 24),
|
|
1695
|
-
[CountryCodes.Singapore]: simpleBankAccountNumberMetadata("0052312891876", 4, 19),
|
|
1696
|
-
[CountryCodes.Sweden]: simpleBankAccountNumberMetadata("123456789", 7, 10),
|
|
1697
|
-
[CountryCodes.UnitedStates]: simpleBankAccountNumberMetadata("10220001111", 3, 17),
|
|
1698
|
-
[CountryCodes.Poland]: {
|
|
1699
|
-
validators: validatePatternOnBlur(/^\d{26}$/),
|
|
1700
|
-
mask: { mask: makeMask(...numericInputs(2), spacer, ...numericInputs(4), spacer, ...numericInputs(4), spacer, ...numericInputs(4), spacer, ...numericInputs(4), spacer, ...numericInputs(4), spacer, ...numericInputs(4)) },
|
|
1701
|
-
guidanceText: {
|
|
1702
|
-
key: "enterNDigitsForExample",
|
|
1703
|
-
values: {
|
|
1704
|
-
numDigits: "26",
|
|
1705
|
-
example: "98 1090 2402 7474 4662 2173 1624"
|
|
1706
|
-
}
|
|
1707
|
-
}
|
|
1708
|
-
},
|
|
1709
|
-
[CountryCodes.NewZealand]: {
|
|
1710
|
-
validators: validatePatternOnBlur(/^\d{15,16}$/),
|
|
1711
|
-
mask: { mask: makeMask(...numericInputs(2), ...nonInputs(" - "), ...numericInputs(4), ...nonInputs(" - "), ...numericInputs(7), ...nonInputs(" - "), ...numericInputs(2), ...numericInputs(1, true)) },
|
|
1712
|
-
guidanceText: {
|
|
1713
|
-
key: "enterXToYDigitsForExample",
|
|
1714
|
-
values: {
|
|
1715
|
-
minDigits: "15",
|
|
1716
|
-
maxDigits: "16",
|
|
1717
|
-
example: "12-8765-9876543-043"
|
|
1718
|
-
}
|
|
1719
|
-
}
|
|
1720
|
-
}
|
|
1721
|
-
};
|
|
1722
|
-
//#endregion
|
|
1723
2085
|
//#region src/components/BankAccount/fields/BankAccountNumber/BankAccountNumber.tsx
|
|
1724
2086
|
var bankAccountNumberFields = ["bankAccountNumber"];
|
|
1725
2087
|
function BankAccountNumber(props) {
|
|
@@ -1832,35 +2194,6 @@ function BankCity(props) {
|
|
|
1832
2194
|
});
|
|
1833
2195
|
}
|
|
1834
2196
|
//#endregion
|
|
1835
|
-
//#region src/components/BankAccount/fields/BankCode/fieldConfig.ts
|
|
1836
|
-
var defaultFieldMetadata$2 = {
|
|
1837
|
-
label: "bankCode",
|
|
1838
|
-
validators: isNotEmptyValidator
|
|
1839
|
-
};
|
|
1840
|
-
var simpleBankCodeMetadata = (length, example, label) => ({
|
|
1841
|
-
label: label ?? "bankCode",
|
|
1842
|
-
validators: validatePatternOnBlur(new RegExp(`^\\d{${length}}$`)),
|
|
1843
|
-
mask: { mask: makeMask(...numericInputs(length)) },
|
|
1844
|
-
guidanceText: {
|
|
1845
|
-
key: "enterNDigitsForExample",
|
|
1846
|
-
values: {
|
|
1847
|
-
numDigits: `${length}`,
|
|
1848
|
-
example
|
|
1849
|
-
}
|
|
1850
|
-
}
|
|
1851
|
-
});
|
|
1852
|
-
var defaultFieldConfig$2 = {
|
|
1853
|
-
[CountryCodes.Brazil]: simpleBankCodeMetadata(3, "123"),
|
|
1854
|
-
[CountryCodes.Canada]: simpleBankCodeMetadata(3, "001", "institutionNumber"),
|
|
1855
|
-
[CountryCodes.CzechRepublic]: simpleBankCodeMetadata(4, "0800"),
|
|
1856
|
-
[CountryCodes.Denmark]: simpleBankCodeMetadata(4, "5051"),
|
|
1857
|
-
[CountryCodes.HongKong]: simpleBankCodeMetadata(3, "250"),
|
|
1858
|
-
[CountryCodes.Norway]: simpleBankCodeMetadata(4, "8601"),
|
|
1859
|
-
[CountryCodes.Ecuador]: simpleBankCodeMetadata(4, "1234"),
|
|
1860
|
-
[CountryCodes.Japan]: simpleBankCodeMetadata(4, "1234"),
|
|
1861
|
-
[CountryCodes.Taiwan]: simpleBankCodeMetadata(3, "123")
|
|
1862
|
-
};
|
|
1863
|
-
//#endregion
|
|
1864
2197
|
//#region src/components/BankAccount/fields/BankCode/BankCode.tsx
|
|
1865
2198
|
var bankCodeFields = ["bankCode"];
|
|
1866
2199
|
function BankCode(props) {
|
|
@@ -1941,115 +2274,30 @@ function BankName(props) {
|
|
|
1941
2274
|
fieldProblems
|
|
1942
2275
|
});
|
|
1943
2276
|
}, [
|
|
1944
|
-
data,
|
|
1945
|
-
valid,
|
|
1946
|
-
errors,
|
|
1947
|
-
fieldProblems,
|
|
1948
|
-
useMultiFormMode
|
|
1949
|
-
]);
|
|
1950
|
-
const formUtils = createFormUtils(props, t);
|
|
1951
|
-
return /* @__PURE__ */ jsx(Field, {
|
|
1952
|
-
name: "bankName",
|
|
1953
|
-
label: t(($) => $["bankName"]),
|
|
1954
|
-
errorMessage: formUtils.getErrorMessage("bankName", errors, fieldProblems),
|
|
1955
|
-
isValid: valid?.bankName ?? true,
|
|
1956
|
-
children: (childProps) => /* @__PURE__ */ jsx(InputText, {
|
|
1957
|
-
...childProps,
|
|
1958
|
-
name: "bankName",
|
|
1959
|
-
value: data?.bankName,
|
|
1960
|
-
readonly: formUtils.isReadOnly("bankName"),
|
|
1961
|
-
onInput: handleChange("bankName", "input"),
|
|
1962
|
-
onBlur: handleChange("bankName", "blur"),
|
|
1963
|
-
"aria-required": true,
|
|
1964
|
-
"aria-invalid": !valid?.bankName
|
|
1965
|
-
})
|
|
1966
|
-
});
|
|
1967
|
-
}
|
|
1968
|
-
//#endregion
|
|
1969
|
-
//#region src/components/BankAccount/fields/BranchCode/fieldConfig.ts
|
|
1970
|
-
var defaultFieldMetadata$1 = {
|
|
1971
|
-
label: "branchCode",
|
|
1972
|
-
validators: isNotEmptyValidator
|
|
1973
|
-
};
|
|
1974
|
-
var defaultFieldConfig$1 = {
|
|
1975
|
-
[CountryCodes.UnitedKingdom]: {
|
|
1976
|
-
label: "sortCode",
|
|
1977
|
-
validators: validatePatternOnBlur(/^\d{6}$/),
|
|
1978
|
-
mask: { mask: makeMask(...numericInputs(6)) },
|
|
1979
|
-
guidanceText: {
|
|
1980
|
-
key: "enterNDigitsForExample",
|
|
1981
|
-
values: {
|
|
1982
|
-
numDigits: "6",
|
|
1983
|
-
example: "401199"
|
|
1984
|
-
}
|
|
1985
|
-
}
|
|
1986
|
-
},
|
|
1987
|
-
[CountryCodes.Australia]: {
|
|
1988
|
-
label: "bsbNumber",
|
|
1989
|
-
validators: validatePatternOnBlur(/^\d{6}$/),
|
|
1990
|
-
mask: { mask: makeMask(...numericInputs(3), ...nonInputs(" - "), ...numericInputs(3)) },
|
|
1991
|
-
guidanceText: {
|
|
1992
|
-
key: "enterNDigitsForExample",
|
|
1993
|
-
values: {
|
|
1994
|
-
numDigits: "6",
|
|
1995
|
-
example: "033-547"
|
|
1996
|
-
}
|
|
1997
|
-
}
|
|
1998
|
-
},
|
|
1999
|
-
[CountryCodes.Brazil]: {
|
|
2000
|
-
label: "branchCode",
|
|
2001
|
-
validators: validatePatternOnBlur(/^\d{1,5}$/),
|
|
2002
|
-
mask: { mask: makeMask(...numericInputs(1), ...numericInputs(4, true)) },
|
|
2003
|
-
guidanceText: {
|
|
2004
|
-
key: "enterAMaximumOfNDigitsForExample",
|
|
2005
|
-
values: {
|
|
2006
|
-
maxDigits: "5",
|
|
2007
|
-
example: "36257"
|
|
2008
|
-
}
|
|
2009
|
-
}
|
|
2010
|
-
},
|
|
2011
|
-
[CountryCodes.Canada]: {
|
|
2012
|
-
label: "transitNumber",
|
|
2013
|
-
validators: validatePatternOnBlur(/^\d{5}$/),
|
|
2014
|
-
mask: { mask: makeMask(...numericInputs(5)) },
|
|
2015
|
-
guidanceText: {
|
|
2016
|
-
key: "enterNDigitsForExample",
|
|
2017
|
-
values: {
|
|
2018
|
-
numDigits: "5",
|
|
2019
|
-
example: "27601"
|
|
2020
|
-
}
|
|
2021
|
-
}
|
|
2022
|
-
},
|
|
2023
|
-
[CountryCodes.UnitedStates]: {
|
|
2024
|
-
label: "routingNumber",
|
|
2025
|
-
validators: validatePatternOnBlur(/^\d{9}$/),
|
|
2026
|
-
mask: { mask: makeMask(...numericInputs(9)) },
|
|
2027
|
-
guidanceText: {
|
|
2028
|
-
key: "enterNDigitsForExample",
|
|
2029
|
-
values: {
|
|
2030
|
-
numDigits: "9",
|
|
2031
|
-
example: "107005432"
|
|
2032
|
-
}
|
|
2033
|
-
}
|
|
2034
|
-
},
|
|
2035
|
-
[CountryCodes.Sweden]: {
|
|
2036
|
-
label: "branchCode",
|
|
2037
|
-
validators: validatePatternOnBlur(/^(\d{4}|8\d{4})$/),
|
|
2038
|
-
mask: { mask: makeMask(...numericInputs(4), ...nonInputs(" - ", { displayEagerly: false }), ...numericInputs(1, true)) },
|
|
2039
|
-
guidanceText: {
|
|
2040
|
-
key: "enterXOrYDigitsForExample",
|
|
2041
|
-
values: {
|
|
2042
|
-
xDigits: "4",
|
|
2043
|
-
yDigits: "5",
|
|
2044
|
-
example: "5678 or 8635-2"
|
|
2045
|
-
}
|
|
2046
|
-
}
|
|
2047
|
-
},
|
|
2048
|
-
[CountryCodes.Indonesia]: {
|
|
2049
|
-
label: "clearingCode",
|
|
2050
|
-
validators: isNotEmptyValidator
|
|
2051
|
-
}
|
|
2052
|
-
};
|
|
2277
|
+
data,
|
|
2278
|
+
valid,
|
|
2279
|
+
errors,
|
|
2280
|
+
fieldProblems,
|
|
2281
|
+
useMultiFormMode
|
|
2282
|
+
]);
|
|
2283
|
+
const formUtils = createFormUtils(props, t);
|
|
2284
|
+
return /* @__PURE__ */ jsx(Field, {
|
|
2285
|
+
name: "bankName",
|
|
2286
|
+
label: t(($) => $["bankName"]),
|
|
2287
|
+
errorMessage: formUtils.getErrorMessage("bankName", errors, fieldProblems),
|
|
2288
|
+
isValid: valid?.bankName ?? true,
|
|
2289
|
+
children: (childProps) => /* @__PURE__ */ jsx(InputText, {
|
|
2290
|
+
...childProps,
|
|
2291
|
+
name: "bankName",
|
|
2292
|
+
value: data?.bankName,
|
|
2293
|
+
readonly: formUtils.isReadOnly("bankName"),
|
|
2294
|
+
onInput: handleChange("bankName", "input"),
|
|
2295
|
+
onBlur: handleChange("bankName", "blur"),
|
|
2296
|
+
"aria-required": true,
|
|
2297
|
+
"aria-invalid": !valid?.bankName
|
|
2298
|
+
})
|
|
2299
|
+
});
|
|
2300
|
+
}
|
|
2053
2301
|
//#endregion
|
|
2054
2302
|
//#region src/components/BankAccount/fields/BranchCode/BranchCode.tsx
|
|
2055
2303
|
var branchCodeFields = ["branchCode"];
|
|
@@ -2109,197 +2357,6 @@ function BranchCode(props) {
|
|
|
2109
2357
|
});
|
|
2110
2358
|
}
|
|
2111
2359
|
//#endregion
|
|
2112
|
-
//#region src/components/BankAccount/fields/Iban/ibanValidator.ts
|
|
2113
|
-
/**
|
|
2114
|
-
* Basic Bank Account Number pattern per country
|
|
2115
|
-
*/
|
|
2116
|
-
var bbanPatternsByCountry = {
|
|
2117
|
-
[CountryCodes.Albania]: /\d{8}[\dA-Z]{16}/,
|
|
2118
|
-
[CountryCodes.Andorra]: /\d{8}[\dA-Z]{12}/,
|
|
2119
|
-
[CountryCodes.Austria]: /\d{16}/,
|
|
2120
|
-
[CountryCodes.Azerbaijan]: /[\dA-Z]{4}\d{20}/,
|
|
2121
|
-
[CountryCodes.Belgium]: /\d{12}/,
|
|
2122
|
-
[CountryCodes.Bahrain]: /[A-Z]{4}[\dA-Z]{14}/,
|
|
2123
|
-
[CountryCodes.BosniaAndHerzegovina]: /\d{16}/,
|
|
2124
|
-
[CountryCodes.Brazil]: /\d{23}[A-Z][\dA-Z]/,
|
|
2125
|
-
[CountryCodes.Bulgaria]: /[A-Z]{4}\d{6}[\dA-Z]{8}/,
|
|
2126
|
-
[CountryCodes.CostaRica]: /\d{17}/,
|
|
2127
|
-
[CountryCodes.Croatia]: /\d{17}/,
|
|
2128
|
-
[CountryCodes.Cyprus]: /\d{8}[\dA-Z]{16}/,
|
|
2129
|
-
[CountryCodes.CzechRepublic]: /\d{20}/,
|
|
2130
|
-
[CountryCodes.Denmark]: /\d{14}/,
|
|
2131
|
-
[CountryCodes.DominicanRepublic]: /[A-Z]{4}\d{20}/,
|
|
2132
|
-
[CountryCodes.Estonia]: /\d{16}/,
|
|
2133
|
-
[CountryCodes.FaroeIslands]: /\d{14}/,
|
|
2134
|
-
[CountryCodes.Finland]: /\d{14}/,
|
|
2135
|
-
[CountryCodes.France]: /\d{10}[\dA-Z]{11}\d{2}/,
|
|
2136
|
-
[CountryCodes.Georgia]: /[\dA-Z]{2}\d{16}/,
|
|
2137
|
-
[CountryCodes.Germany]: /\d{18}/,
|
|
2138
|
-
[CountryCodes.Gibraltar]: /[A-Z]{4}[\dA-Z]{15}/,
|
|
2139
|
-
[CountryCodes.Greece]: /\d{7}[\dA-Z]{16}/,
|
|
2140
|
-
[CountryCodes.Greenland]: /\d{14}/,
|
|
2141
|
-
[CountryCodes.Guatemala]: /[\dA-Z]{4}[\dA-Z]{20}/,
|
|
2142
|
-
[CountryCodes.Hungary]: /\d{24}/,
|
|
2143
|
-
[CountryCodes.Iceland]: /\d{22}/,
|
|
2144
|
-
[CountryCodes.Ireland]: /[\dA-Z]{4}\d{14}/,
|
|
2145
|
-
[CountryCodes.Israel]: /\d{19}/,
|
|
2146
|
-
[CountryCodes.Italy]: /[A-Z]\d{10}[\dA-Z]{12}/,
|
|
2147
|
-
[CountryCodes.Kazakhstan]: /\d{3}[\dA-Z]{13}/,
|
|
2148
|
-
[CountryCodes.Kuwait]: /[A-Z]{4}[\dA-Z]{22}/,
|
|
2149
|
-
[CountryCodes.Latvia]: /[A-Z]{4}[\dA-Z]{13}/,
|
|
2150
|
-
[CountryCodes.Lebanon]: /\d{4}[\dA-Z]{20}/,
|
|
2151
|
-
[CountryCodes.Liechtenstein]: /\d{5}[\dA-Z]{12}/,
|
|
2152
|
-
[CountryCodes.Lithuania]: /\d{16}/,
|
|
2153
|
-
[CountryCodes.Luxembourg]: /\d{3}[\dA-Z]{13}/,
|
|
2154
|
-
[CountryCodes.Macedonia]: /\d{3}[\dA-Z]{10}\d{2}/,
|
|
2155
|
-
[CountryCodes.Malta]: /[A-Z]{4}\d{5}[\dA-Z]{18}/,
|
|
2156
|
-
[CountryCodes.Mauritania]: /\d{23}/,
|
|
2157
|
-
[CountryCodes.Mauritius]: /[A-Z]{4}\d{19}[A-Z]{3}/,
|
|
2158
|
-
[CountryCodes.Monaco]: /\d{10}[\dA-Z]{11}\d{2}/,
|
|
2159
|
-
[CountryCodes.Moldova]: /[\dA-Z]{2}\d{18}/,
|
|
2160
|
-
[CountryCodes.Montenegro]: /\d{18}/,
|
|
2161
|
-
[CountryCodes.Netherlands]: /[A-Z]{4}\d{10}/,
|
|
2162
|
-
[CountryCodes.Norway]: /\d{11}/,
|
|
2163
|
-
[CountryCodes.Pakistan]: /[\dA-Z]{4}\d{16}/,
|
|
2164
|
-
[CountryCodes.PalestinianTerritory]: /[\dA-Z]{4}\d{21}/,
|
|
2165
|
-
[CountryCodes.Poland]: /\d{24}/,
|
|
2166
|
-
[CountryCodes.Portugal]: /\d{21}/,
|
|
2167
|
-
[CountryCodes.Romania]: /[A-Z]{4}[\dA-Z]{16}/,
|
|
2168
|
-
[CountryCodes.SanMarino]: /[A-Z]\d{10}[\dA-Z]{12}/,
|
|
2169
|
-
[CountryCodes.SaudiArabia]: /\d{2}[\dA-Z]{18}/,
|
|
2170
|
-
[CountryCodes.Serbia]: /\d{18}/,
|
|
2171
|
-
[CountryCodes.Slovakia]: /\d{20}/,
|
|
2172
|
-
[CountryCodes.Slovenia]: /\d{15}/,
|
|
2173
|
-
[CountryCodes.Spain]: /\d{20}/,
|
|
2174
|
-
[CountryCodes.Sweden]: /\d{20}/,
|
|
2175
|
-
[CountryCodes.Switzerland]: /\d{5}[\dA-Z]{12}/,
|
|
2176
|
-
[CountryCodes.Tunisia]: /\d{20}/,
|
|
2177
|
-
[CountryCodes.Turkey]: /\d{5}[\dA-Z]{17}/,
|
|
2178
|
-
[CountryCodes.UnitedArabEmirates]: /\d{3}\d{16}/,
|
|
2179
|
-
[CountryCodes.UnitedKingdom]: /[A-Z]{4}\d{14}/,
|
|
2180
|
-
[CountryCodes.VirginIslandsBritish]: /[\dA-Z]{4}\d{16}/
|
|
2181
|
-
};
|
|
2182
|
-
/**
|
|
2183
|
-
* For some regions the iban format is shared and therefore can accept IBANs starting
|
|
2184
|
-
* with some other country code
|
|
2185
|
-
*/
|
|
2186
|
-
var customPrefixByCountry = {
|
|
2187
|
-
[CountryCodes.Guernsey]: "GB",
|
|
2188
|
-
[CountryCodes.Jersey]: "GB",
|
|
2189
|
-
[CountryCodes.IsleOfMan]: "GB"
|
|
2190
|
-
};
|
|
2191
|
-
function ibanValidator(input, bankCountry) {
|
|
2192
|
-
if (isEmpty(input)) return false;
|
|
2193
|
-
const ibanInput = input.replace(/ /g, "").toUpperCase();
|
|
2194
|
-
if (!/^([a-zA-Z0-9]{4} ){2,8}[a-zA-Z0-9]{1,4}|[a-zA-Z0-9]{12,34}$/.test(ibanInput)) return false;
|
|
2195
|
-
const countryCode = ibanInput.substring(0, 2);
|
|
2196
|
-
const allowedPrefix = customPrefixByCountry[bankCountry] ?? bankCountry;
|
|
2197
|
-
if (countryCode !== allowedPrefix) return {
|
|
2198
|
-
key: "yourIbanShouldBeginWith_",
|
|
2199
|
-
values: { countryCode: allowedPrefix }
|
|
2200
|
-
};
|
|
2201
|
-
const bbanPattern = bbanPatternsByCountry[countryCode];
|
|
2202
|
-
if (bbanPattern) {
|
|
2203
|
-
if (!new RegExp(`^[A-Z]{2}\\d{2}${bbanPattern.source}$`, "").test(ibanInput)) return false;
|
|
2204
|
-
}
|
|
2205
|
-
const ibanCheck = ibanInput.substring(4, ibanInput.length) + ibanInput.substring(0, 4);
|
|
2206
|
-
let leadingZeroes = true;
|
|
2207
|
-
let ibanCheckDigits = "";
|
|
2208
|
-
for (let i = 0; i < ibanCheck.length; i += 1) {
|
|
2209
|
-
const charAt = ibanCheck.charAt(i);
|
|
2210
|
-
if (charAt !== "0") leadingZeroes = false;
|
|
2211
|
-
if (!leadingZeroes) ibanCheckDigits += "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ".indexOf(charAt);
|
|
2212
|
-
}
|
|
2213
|
-
let cRest = 0;
|
|
2214
|
-
for (let p = 0; p < ibanCheckDigits.length; p += 1) {
|
|
2215
|
-
const cChar = ibanCheckDigits.charAt(p);
|
|
2216
|
-
cRest = +`${cRest}${cChar}` % 97;
|
|
2217
|
-
}
|
|
2218
|
-
return cRest === 1;
|
|
2219
|
-
}
|
|
2220
|
-
//#endregion
|
|
2221
|
-
//#region src/components/BankAccount/fields/Iban/fieldConfig.ts
|
|
2222
|
-
var validateIbanOnBlurAndInput = (country) => ({
|
|
2223
|
-
modes: ["blur", "input"],
|
|
2224
|
-
validate: (iban) => ibanValidator(iban, country) === true,
|
|
2225
|
-
errorMessage: (iban) => {
|
|
2226
|
-
const result = ibanValidator(iban, country);
|
|
2227
|
-
return typeof result === "boolean" ? void 0 : result;
|
|
2228
|
-
}
|
|
2229
|
-
});
|
|
2230
|
-
var ibanMask = (country, inputLength, allowLettersInBban) => {
|
|
2231
|
-
const tokens = [];
|
|
2232
|
-
tokens.push(...nonInputs(country, { includeInValue: true }), ...numericInputs(2));
|
|
2233
|
-
inputLength -= 2;
|
|
2234
|
-
const inputToken = allowLettersInBban ? alphanumericInputs : numericInputs;
|
|
2235
|
-
const numGroups = Math.floor(inputLength / 4);
|
|
2236
|
-
const remainder = inputLength % 4;
|
|
2237
|
-
for (let i = 0; i < numGroups; i += 1) tokens.push(spacer, ...inputToken(4));
|
|
2238
|
-
if (remainder > 0) tokens.push(spacer, ...inputToken(remainder));
|
|
2239
|
-
return {
|
|
2240
|
-
mask: makeMask(...tokens),
|
|
2241
|
-
transformOnType: allowLettersInBban ? uppercase : void 0
|
|
2242
|
-
};
|
|
2243
|
-
};
|
|
2244
|
-
var ibanGuidance = (type, numDigitsOrChars, example) => type === "digits" ? {
|
|
2245
|
-
key: "enterTheRemainingNDigitsForExample",
|
|
2246
|
-
values: {
|
|
2247
|
-
numDigits: `${numDigitsOrChars}`,
|
|
2248
|
-
example
|
|
2249
|
-
}
|
|
2250
|
-
} : {
|
|
2251
|
-
key: "enterTheRemainingNCharactersForExample",
|
|
2252
|
-
values: {
|
|
2253
|
-
numChars: `${numDigitsOrChars}`,
|
|
2254
|
-
example
|
|
2255
|
-
}
|
|
2256
|
-
};
|
|
2257
|
-
var ibanMetadata = (country, inputLength, example, allowLettersInBban) => ({
|
|
2258
|
-
validators: validateIbanOnBlurAndInput(country),
|
|
2259
|
-
mask: ibanMask(country, inputLength, allowLettersInBban),
|
|
2260
|
-
guidanceText: ibanGuidance(allowLettersInBban ? "characters" : "digits", inputLength, example)
|
|
2261
|
-
});
|
|
2262
|
-
var gbIbanMetadata = ibanMetadata(CountryCodes.UnitedKingdom, 20, "GB09 BARC 2003 9554 8297 59", true);
|
|
2263
|
-
var defaultFieldMetadata = { validators: isNotEmptyValidator };
|
|
2264
|
-
var defaultFieldConfig = {
|
|
2265
|
-
[CountryCodes.Austria]: ibanMetadata(CountryCodes.Austria, 18, "AT88 5400 0746 7265 9747"),
|
|
2266
|
-
[CountryCodes.Belgium]: ibanMetadata(CountryCodes.Belgium, 14, "BE59 9788 6743 2226"),
|
|
2267
|
-
[CountryCodes.Croatia]: ibanMetadata(CountryCodes.Croatia, 19, "HR51 2484 0083 5929 6973 8"),
|
|
2268
|
-
[CountryCodes.Cyprus]: ibanMetadata(CountryCodes.Cyprus, 26, "CY17 0020 0128 0000 0012 0052 7600"),
|
|
2269
|
-
[CountryCodes.CzechRepublic]: ibanMetadata(CountryCodes.CzechRepublic, 22, "CZ65 0800 0000 1920 0014 5399"),
|
|
2270
|
-
[CountryCodes.Denmark]: ibanMetadata(CountryCodes.Denmark, 16, "DK95 2000 0123 4567 89"),
|
|
2271
|
-
[CountryCodes.Estonia]: ibanMetadata(CountryCodes.Estonia, 18, "EE26 1291 5123 1542 6371"),
|
|
2272
|
-
[CountryCodes.Finland]: ibanMetadata(CountryCodes.Finland, 16, "FI21 1234 5600 0007 85"),
|
|
2273
|
-
[CountryCodes.Germany]: ibanMetadata(CountryCodes.Germany, 20, "DE91 1000 0000 0123 4567 89"),
|
|
2274
|
-
[CountryCodes.Greece]: ibanMetadata(CountryCodes.Greece, 25, "GR57 0107 7142 7681 6687 9575 217"),
|
|
2275
|
-
[CountryCodes.Hungary]: ibanMetadata(CountryCodes.Hungary, 26, "HU68 1070 0024 3428 4128 3192 4812"),
|
|
2276
|
-
[CountryCodes.Lithuania]: ibanMetadata(CountryCodes.Lithuania, 18, "LT12 1000 0111 0100 1000"),
|
|
2277
|
-
[CountryCodes.Luxembourg]: ibanMetadata(CountryCodes.Luxembourg, 18, "LU28 0019 4006 4475 0000"),
|
|
2278
|
-
[CountryCodes.Norway]: ibanMetadata(CountryCodes.Norway, 13, "NO83 3000 1234 567"),
|
|
2279
|
-
[CountryCodes.Poland]: ibanMetadata(CountryCodes.Poland, 26, "PL98 1090 2402 7474 4662 2173 1624"),
|
|
2280
|
-
[CountryCodes.Portugal]: ibanMetadata(CountryCodes.Portugal, 23, "PT42 0035 0651 8646 9119 5263 5"),
|
|
2281
|
-
[CountryCodes.Slovakia]: ibanMetadata(CountryCodes.Slovakia, 22, "SK25 5173 1333 4916 3219 3521"),
|
|
2282
|
-
[CountryCodes.Slovenia]: ibanMetadata(CountryCodes.Slovenia, 17, "SI56 1920 0123 4567 892"),
|
|
2283
|
-
[CountryCodes.Spain]: ibanMetadata(CountryCodes.Spain, 22, "ES91 2100 0418 4502 0005 1332"),
|
|
2284
|
-
[CountryCodes.Sweden]: ibanMetadata(CountryCodes.Sweden, 22, "SE72 8000 0810 3400 0978 3242"),
|
|
2285
|
-
[CountryCodes.Bulgaria]: ibanMetadata(CountryCodes.Bulgaria, 20, "BG17 BNPA 9440 4432 7749 93", true),
|
|
2286
|
-
[CountryCodes.France]: ibanMetadata(CountryCodes.France, 25, "FR64 1009 6000 4035 3425 9742 Y90", true),
|
|
2287
|
-
[CountryCodes.Gibraltar]: ibanMetadata(CountryCodes.Gibraltar, 21, "GI75 NWBK 0000 0000 7099 453", true),
|
|
2288
|
-
[CountryCodes.Ireland]: ibanMetadata(CountryCodes.Ireland, 20, "IE64 IRCE 9205 0112 3456 78", true),
|
|
2289
|
-
[CountryCodes.Italy]: ibanMetadata(CountryCodes.Italy, 25, "IT06 L030 0203 2809 8485 8934 882", true),
|
|
2290
|
-
[CountryCodes.Latvia]: ibanMetadata(CountryCodes.Latvia, 19, "LV80 BANK 0000 4351 9500 1", true),
|
|
2291
|
-
[CountryCodes.Liechtenstein]: ibanMetadata(CountryCodes.Liechtenstein, 19, "LI21 0881 0000 2324 013A A", true),
|
|
2292
|
-
[CountryCodes.Malta]: ibanMetadata(CountryCodes.Malta, 29, "MT84 MALT 0110 0001 2345 MTLC AST0 01S", true),
|
|
2293
|
-
[CountryCodes.Monaco]: ibanMetadata(CountryCodes.Monaco, 25, "MC58 1122 2000 0101 2345 6789 030", true),
|
|
2294
|
-
[CountryCodes.Netherlands]: ibanMetadata(CountryCodes.Netherlands, 16, "NL50 ABNA 4452 7591 49", true),
|
|
2295
|
-
[CountryCodes.Romania]: ibanMetadata(CountryCodes.Romania, 22, "RO36 PORL 9596 9966 4965 4284", true),
|
|
2296
|
-
[CountryCodes.Switzerland]: ibanMetadata(CountryCodes.Switzerland, 19, "CH56 0483 5012 3456 7800 9", true),
|
|
2297
|
-
[CountryCodes.UnitedKingdom]: gbIbanMetadata,
|
|
2298
|
-
[CountryCodes.Guernsey]: gbIbanMetadata,
|
|
2299
|
-
[CountryCodes.Jersey]: gbIbanMetadata,
|
|
2300
|
-
[CountryCodes.IsleOfMan]: gbIbanMetadata
|
|
2301
|
-
};
|
|
2302
|
-
//#endregion
|
|
2303
2360
|
//#region src/components/BankAccount/fields/Iban/Iban.tsx
|
|
2304
2361
|
var ibanFields = ["iban"];
|
|
2305
2362
|
function Iban(props) {
|
|
@@ -2355,15 +2412,6 @@ function Iban(props) {
|
|
|
2355
2412
|
});
|
|
2356
2413
|
}
|
|
2357
2414
|
//#endregion
|
|
2358
|
-
//#region src/components/BankAccount/fields/SwiftCode/fieldConfig.ts
|
|
2359
|
-
var swiftCodeFieldMetadata = {
|
|
2360
|
-
validators: validatePatternOnBlur(/^([a-zA-Z0-9]{8}|[a-zA-Z0-9]{11})$/),
|
|
2361
|
-
mask: {
|
|
2362
|
-
mask: makeMask(...alphaInputs(6), ...alphanumericInputs(2), ...alphanumericInputs(3, true)),
|
|
2363
|
-
transformOnType: uppercase
|
|
2364
|
-
}
|
|
2365
|
-
};
|
|
2366
|
-
//#endregion
|
|
2367
2415
|
//#region src/components/BankAccount/fields/SwiftCode/SwiftCode.tsx
|
|
2368
2416
|
var swiftCodeFields = ["swiftCode"];
|
|
2369
2417
|
function SwiftCode(props) {
|
|
@@ -3452,39 +3500,6 @@ var formatAccountVerificationSummary = (data) => {
|
|
|
3452
3500
|
return summary;
|
|
3453
3501
|
};
|
|
3454
3502
|
//#endregion
|
|
3455
|
-
//#region src/components/BankAccount/tasks/PayoutDetailsDropin/validate.ts
|
|
3456
|
-
function payoutCountryDetailsValidators() {
|
|
3457
|
-
return {};
|
|
3458
|
-
}
|
|
3459
|
-
function payoutVerificationMethodValidators() {
|
|
3460
|
-
return { payoutVerificationMethod: {
|
|
3461
|
-
modes: ["blur"],
|
|
3462
|
-
validate: (payoutVerificationMethod) => !!payoutVerificationMethod
|
|
3463
|
-
} };
|
|
3464
|
-
}
|
|
3465
|
-
function payoutAccountDetailsValidators({ country }) {
|
|
3466
|
-
const branchCodeMetadata = resolveFieldMetadata(defaultFieldConfig$1[country], {}, defaultFieldMetadata$1);
|
|
3467
|
-
const bankAccountNumberMetadata = resolveFieldMetadata(defaultFieldConfig$3[country], {}, defaultFieldMetadata$3);
|
|
3468
|
-
const ibanMetadata = resolveFieldMetadata(defaultFieldConfig[country], {}, defaultFieldMetadata);
|
|
3469
|
-
const bankCodeMetadata = resolveFieldMetadata(defaultFieldConfig$2[country], {}, defaultFieldMetadata$2);
|
|
3470
|
-
return {
|
|
3471
|
-
branchCode: branchCodeMetadata.validators,
|
|
3472
|
-
bankAccountNumber: bankAccountNumberMetadata.validators,
|
|
3473
|
-
iban: ibanMetadata.validators,
|
|
3474
|
-
swiftCode: swiftCodeFieldMetadata.validators,
|
|
3475
|
-
bankCode: bankCodeMetadata.validators
|
|
3476
|
-
};
|
|
3477
|
-
}
|
|
3478
|
-
function payoutAccountDocumentsValidators() {
|
|
3479
|
-
return {
|
|
3480
|
-
...bankDocumentValidationRules,
|
|
3481
|
-
bankStatementDocument: fileValidationRules(defaultFileValidationOptions)
|
|
3482
|
-
};
|
|
3483
|
-
}
|
|
3484
|
-
function payoutAccountVerificationValidators() {
|
|
3485
|
-
return bankVerificationValidationRules;
|
|
3486
|
-
}
|
|
3487
|
-
//#endregion
|
|
3488
3503
|
//#region src/components/BankAccount/tasks/PayoutDetailsDropin/PayoutDetailsDropinMultiForm.tsx
|
|
3489
3504
|
function PayoutDetailsDropinMultiForm({ legalEntityResponse, problems: propProblems, onSubmit: externalOnSubmit, asModal = false, handleCloseClick, taskType: propTaskType, handleHomeClick, currentTransferInstrumentId, navigateBackToTaskList, handleBackClick: externalBackClick, openBankingPartnerConfigId }) {
|
|
3490
3505
|
const { baseUrl, rootLegalEntityId } = useApiContext();
|