@adyen/kyc-components 2.54.1 → 2.55.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/es/adyen-kyc-components.es.js +270 -102
- package/dist/es/us-check-account-number-CHnzmLNd.js +39 -0
- package/dist/es/us-check-o5Ax_0LS.js +37 -0
- package/dist/es/us-check-routing-number-BtVf7GH3.js +40 -0
- package/dist/style.css +31 -8
- package/dist/types/components/Dropins/ServiceAgreementDropinComponent/types.d.ts +1 -1
- package/dist/types/components/PayoutAccount/component/CheckGuidance/CheckGuidance.d.ts +6 -0
- package/dist/types/components/internal/Address/types.d.ts +1 -1
- package/dist/types/components/internal/Address/utils.d.ts +1 -1
- package/dist/types/components/internal/BankAccountNumber/types.d.ts +2 -0
- package/dist/types/components/internal/BranchCode/types.d.ts +2 -0
- package/dist/types/components/internal/Button/Button.d.ts +1 -1
- package/dist/types/components/internal/Button/types.d.ts +1 -0
- package/dist/types/components/internal/DecisionMakerRole/types.d.ts +1 -1
- package/dist/types/components/internal/FormFields/MaskedInputText/MaskedInputText.d.ts +2 -1
- package/dist/types/components/internal/IdFieldTypeSelector/countryIdNumberTypes.d.ts +1 -1
- package/dist/types/components/internal/Skeleton/Skeleton.d.ts +0 -1
- package/dist/types/components/internal/Svg/svgs.d.ts +3 -0
- package/dist/types/utils/datasetUtil.d.ts +1 -1
- package/dist/types/utils/payout-account-util.d.ts +1 -0
- package/dist/types/utils/validatorUtils.d.ts +1 -1
- package/package.json +1 -1
|
@@ -94,7 +94,6 @@ const defaultTrans = {
|
|
|
94
94
|
accountNumberOrIbanVisible: "Includes your account number or IBAN",
|
|
95
95
|
accountNumberVisible: "Includes your account number",
|
|
96
96
|
accountVerification: "Account Verification",
|
|
97
|
-
achRoutingNumber: "ACH routing number",
|
|
98
97
|
acknowledgePciRequirements: "We hereby acknowledge that we must remain compliant with the aforementioned PCI DSS requirements at all times as long as we want to receive payments. Consequently, we must continuously reassess our environment and implement any additional PCI DSS requirements if our environment changes.",
|
|
99
98
|
add: "Add",
|
|
100
99
|
addAndVerifyYourBankDetails: "Add and verify your bank account details",
|
|
@@ -226,6 +225,7 @@ const defaultTrans = {
|
|
|
226
225
|
chamberOfCommerceExtract: "Chamber of Commerce extract",
|
|
227
226
|
chamberOfCommerceRegistrationNumber: "Chamber of Commerce registration number",
|
|
228
227
|
changeYourBusinessSetup: "Change your business setup?",
|
|
228
|
+
chargeCardUserAgreement: "Charge Card User Agreement",
|
|
229
229
|
charitableTrust: "Charitable trust",
|
|
230
230
|
charityNumber: "Charity number",
|
|
231
231
|
charter: "Charter",
|
|
@@ -388,6 +388,7 @@ const defaultTrans = {
|
|
|
388
388
|
enterAMaximumOfNCharactersWithAMixForExample: "Enter a maximum of %{maxChars} characters, with a mix of letters and numbers. For example, %{example}",
|
|
389
389
|
enterAMaximumOfNDigitsForExample: "Enter a maximum of %{maxDigits} digits. For example, %{example}",
|
|
390
390
|
enterAMaximumOfNMoreDigitsForExample: "Enter a maximum of %{maxDigits} more digits. For example, %{example}",
|
|
391
|
+
enterEnglishLetterFollowedByXtoYDigitsForExample: "Enter an English-equivalent letter (C for HE, O for AE, P for Σ) followed by %{minDigits} - %{maxDigits} digits. For example, %{example}",
|
|
391
392
|
enterLastNDigitsForExample: "Enter the last %{numDigits} digits. For example, %{example}",
|
|
392
393
|
enterLastNameExactlyAsAppearInID: "Enter your last name(s) exactly as it appears on your identity document",
|
|
393
394
|
enterNCharactersForExample: "Enter %{numChars} characters. For example, %{example}",
|
|
@@ -1000,6 +1001,7 @@ const defaultTrans = {
|
|
|
1000
1001
|
parentCompany: "Parent company",
|
|
1001
1002
|
parentCompanyInformation: "Parent company information",
|
|
1002
1003
|
partitaIVA: "Partita IVA",
|
|
1004
|
+
codiceFiscalePartitaIVA: "Codice Fiscale / Partita IVA",
|
|
1003
1005
|
partnerShipAgreement: "Partnership agreement",
|
|
1004
1006
|
partnership: "Partnership",
|
|
1005
1007
|
partnershipIncorporated: "Incorporated partnership",
|
|
@@ -1083,7 +1085,7 @@ const defaultTrans = {
|
|
|
1083
1085
|
reasonForFillingIndividualAddressDetails: "We have to make sure that everyone who uses our services is who they say they are. To do that, we'll check all of this information against official records. This is a part of the financial regulations that we have to follow as a payments provider.",
|
|
1084
1086
|
reasonForFillingIndividualPersonalDetails: "We have to make sure that everyone who uses our services is who they say they are. To do that, we'll check all of this information against official records. This is a part of the financial regulations that we have to follow as a payments provider.",
|
|
1085
1087
|
reasonForFillingPayoutAccountDetails: "We have to make sure the businesses using our services will not be misusing the funds or causing harm. To do that, we'll check all of this information against official records. This is a part of the financial regulations that we have to follow as a payments provider.",
|
|
1086
|
-
reasonForFillingPayoutDetails: "
|
|
1088
|
+
reasonForFillingPayoutDetails: "This bank account will be verified to prevent fraud or other misuse of funds in compliance with global regulations.",
|
|
1087
1089
|
region: "Region",
|
|
1088
1090
|
registeredAddress: "Registered address",
|
|
1089
1091
|
registeredAddressHeaderDescription: "The address as it appears on your company's official registration documents.",
|
|
@@ -1172,6 +1174,7 @@ const defaultTrans = {
|
|
|
1172
1174
|
rnaNumber: "RNA number",
|
|
1173
1175
|
role: "Role",
|
|
1174
1176
|
roleAndEntityType: "Role and entity type",
|
|
1177
|
+
routingNumber: "Routing number",
|
|
1175
1178
|
routingNumberVisible: "Includes your routing number",
|
|
1176
1179
|
salarySlip: "Salary slip",
|
|
1177
1180
|
sameAsRegisteredAddress: "Same as registered business address",
|
|
@@ -2024,6 +2027,21 @@ function useBusinessData({
|
|
|
2024
2027
|
const [cachedBusiness, setCachedBusiness] = useState();
|
|
2025
2028
|
const [verifiedBusiness, setVerifiedBusiness] = useState();
|
|
2026
2029
|
const [invalidTin, setInvalidTin] = useState(false);
|
|
2030
|
+
const primarySourceSearch = async (data, indexSearch, deepSearch) => {
|
|
2031
|
+
let response;
|
|
2032
|
+
try {
|
|
2033
|
+
response = await deepSearch({
|
|
2034
|
+
...data,
|
|
2035
|
+
limit: data.limit ?? 15
|
|
2036
|
+
});
|
|
2037
|
+
} catch (e) {
|
|
2038
|
+
response = await indexSearch({
|
|
2039
|
+
...data,
|
|
2040
|
+
limit: data.limit ?? 15
|
|
2041
|
+
});
|
|
2042
|
+
}
|
|
2043
|
+
return response;
|
|
2044
|
+
};
|
|
2027
2045
|
const searchForBusiness = useCallback(async (data) => {
|
|
2028
2046
|
if (!handleCompanyDeepSearch || !handleCompanyIndexSearch) {
|
|
2029
2047
|
logger$E.log("Missing handlers for searchForBusiness");
|
|
@@ -2032,17 +2050,15 @@ function useBusinessData({
|
|
|
2032
2050
|
if (searchResults && objectsDeepEqual(cachedSearch, data)) return;
|
|
2033
2051
|
try {
|
|
2034
2052
|
setSearching("loading");
|
|
2035
|
-
const {
|
|
2036
|
-
results
|
|
2037
|
-
} = KNOWN_BROKEN_PRIMARY_SOURCE_CONNECTIONS.includes(data.state) ? await handleCompanyIndexSearch({
|
|
2053
|
+
const response = KNOWN_BROKEN_PRIMARY_SOURCE_CONNECTIONS.includes(data.state) ? await handleCompanyIndexSearch({
|
|
2038
2054
|
...data,
|
|
2039
2055
|
limit: data.limit ?? 15
|
|
2040
|
-
}) : await
|
|
2056
|
+
}) : await primarySourceSearch({
|
|
2041
2057
|
...data,
|
|
2042
2058
|
limit: data.limit ?? 15
|
|
2043
|
-
});
|
|
2044
|
-
setSearchResults(results);
|
|
2045
|
-
return results;
|
|
2059
|
+
}, handleCompanyIndexSearch, handleCompanyDeepSearch);
|
|
2060
|
+
setSearchResults(response == null ? void 0 : response.results);
|
|
2061
|
+
return response == null ? void 0 : response.results;
|
|
2046
2062
|
} catch (e) {
|
|
2047
2063
|
setSearching("error");
|
|
2048
2064
|
logger$E.error(e);
|
|
@@ -2352,8 +2368,9 @@ const mergeFieldMetadataIntoProps = (fieldName, metadata, otherProps) => {
|
|
|
2352
2368
|
const MAX_LENGTH = 30;
|
|
2353
2369
|
const getMaxLengthByFieldAndCountry = (formattingRules, field, country, ignoreIfFormatterExists) => {
|
|
2354
2370
|
var _a, _b, _c, _d;
|
|
2371
|
+
if (!country) return void 0;
|
|
2355
2372
|
if ((_b = (_a = formattingRules[country]) == null ? void 0 : _a[field]) == null ? void 0 : _b.formatter) {
|
|
2356
|
-
return
|
|
2373
|
+
return void 0;
|
|
2357
2374
|
}
|
|
2358
2375
|
const maxLength = (_d = (_c = formattingRules[country]) == null ? void 0 : _c[field]) == null ? void 0 : _d.maxlength;
|
|
2359
2376
|
return maxLength || MAX_LENGTH;
|
|
@@ -2426,6 +2443,9 @@ const svgs = {
|
|
|
2426
2443
|
"document-cutoff": lazy(() => import("./document-cut-off-D2vCeeIS.js")),
|
|
2427
2444
|
"document-expired": lazy(() => import("./document-expired-_4Syh1xW.js")),
|
|
2428
2445
|
"document-front": lazy(() => import("./document-front-9Glzn7ZR.js")),
|
|
2446
|
+
"us-check": lazy(() => import("./us-check-o5Ax_0LS.js")),
|
|
2447
|
+
"us-check-routing-number": lazy(() => import("./us-check-routing-number-BtVf7GH3.js")),
|
|
2448
|
+
"us-check-account-number": lazy(() => import("./us-check-account-number-CHnzmLNd.js")),
|
|
2429
2449
|
"id-blurred": lazy(() => import("./id-blurred-A45CVnPk.js")),
|
|
2430
2450
|
"id-cutoff": lazy(() => import("./id-cut-off-DMoJYcGr.js")),
|
|
2431
2451
|
"id-front": lazy(() => import("./id-front-CTIDY7Nu.js")),
|
|
@@ -2512,6 +2532,7 @@ const Button = ({
|
|
|
2512
2532
|
role,
|
|
2513
2533
|
small,
|
|
2514
2534
|
block,
|
|
2535
|
+
critical,
|
|
2515
2536
|
shaded,
|
|
2516
2537
|
label = "",
|
|
2517
2538
|
icon,
|
|
@@ -2558,6 +2579,7 @@ const Button = ({
|
|
|
2558
2579
|
"adyen-kyc-button--secondary": secondary,
|
|
2559
2580
|
"adyen-kyc-button--tertiary": tertiary && !secondary,
|
|
2560
2581
|
"adyen-kyc-button--block": block,
|
|
2582
|
+
"adyen-kyc-button--critical": critical,
|
|
2561
2583
|
"adyen-kyc-button--small": small && label,
|
|
2562
2584
|
"adyen-kyc-button--shaded": shaded && icon && tertiary,
|
|
2563
2585
|
// disallow shaded effect if not just tertiary icon
|
|
@@ -3743,6 +3765,7 @@ const datasetIdentifier = {
|
|
|
3743
3765
|
function datasetUtilities(locale) {
|
|
3744
3766
|
return {
|
|
3745
3767
|
getCountryName: (countryCode) => {
|
|
3768
|
+
if (!countryCode) return null;
|
|
3746
3769
|
const datasetKey = createDatasetKey(datasetIdentifier.country, locale);
|
|
3747
3770
|
return getDataName(datasetKey, countryCode);
|
|
3748
3771
|
},
|
|
@@ -3934,15 +3957,31 @@ const Tag = ({
|
|
|
3934
3957
|
children
|
|
3935
3958
|
});
|
|
3936
3959
|
};
|
|
3937
|
-
const
|
|
3960
|
+
const adyenKycDropdown = "adyen-kyc-dropdown";
|
|
3961
|
+
const adyenKycDropdownButton = "adyen-kyc-dropdown-button";
|
|
3962
|
+
const adyenKycDropdownButtonActive = "adyen-kyc-dropdown-button--active";
|
|
3963
|
+
const adyenKycFilterInput = "adyen-kyc-filter-input";
|
|
3964
|
+
const adyenKycDropdownList = "adyen-kyc-dropdown-list";
|
|
3965
|
+
const adyenKycDropdownListTransformer = "adyen-kyc-dropdown-list__transformer";
|
|
3966
|
+
const adyenKycDropdownListActive = "adyen-kyc-dropdown-list--active";
|
|
3967
|
+
const adyenKycDropdownElement = "adyen-kyc-dropdown-element";
|
|
3968
|
+
const styles$6 = {
|
|
3938
3969
|
"adyen-kyc-dropdown": "adyen-kyc-dropdown",
|
|
3970
|
+
adyenKycDropdown,
|
|
3939
3971
|
"adyen-kyc-dropdown-button": "adyen-kyc-dropdown-button",
|
|
3972
|
+
adyenKycDropdownButton,
|
|
3940
3973
|
"adyen-kyc-dropdown-button--active": "adyen-kyc-dropdown-button--active",
|
|
3974
|
+
adyenKycDropdownButtonActive,
|
|
3941
3975
|
"adyen-kyc-filter-input": "adyen-kyc-filter-input",
|
|
3976
|
+
adyenKycFilterInput,
|
|
3942
3977
|
"adyen-kyc-dropdown-list": "adyen-kyc-dropdown-list",
|
|
3978
|
+
adyenKycDropdownList,
|
|
3943
3979
|
"adyen-kyc-dropdown-list__transformer": "adyen-kyc-dropdown-list__transformer",
|
|
3980
|
+
adyenKycDropdownListTransformer,
|
|
3944
3981
|
"adyen-kyc-dropdown-list--active": "adyen-kyc-dropdown-list--active",
|
|
3945
|
-
|
|
3982
|
+
adyenKycDropdownListActive,
|
|
3983
|
+
"adyen-kyc-dropdown-element": "adyen-kyc-dropdown-element",
|
|
3984
|
+
adyenKycDropdownElement
|
|
3946
3985
|
};
|
|
3947
3986
|
function SelectButtonElement({
|
|
3948
3987
|
filterable,
|
|
@@ -3991,10 +4030,10 @@ function SelectButton({
|
|
|
3991
4030
|
"aria-haspopup": "listbox",
|
|
3992
4031
|
className: cx({
|
|
3993
4032
|
"adyen-kyc-dropdown-button": true,
|
|
3994
|
-
[styles$
|
|
4033
|
+
[styles$6["adyen-kyc-dropdown-button"]]: true,
|
|
3995
4034
|
"adyen-kyc-dropdown-button--readonly": readonly,
|
|
3996
4035
|
"adyen-kyc-dropdown-button--active": showList,
|
|
3997
|
-
[styles$
|
|
4036
|
+
[styles$6["adyen-kyc-dropdown-button--active"]]: showList,
|
|
3998
4037
|
"adyen-kyc-dropdown-button--invalid": isInvalid,
|
|
3999
4038
|
"adyen-kyc-dropdown-field--valid": isValid,
|
|
4000
4039
|
"adyen-kyc-dropdown-button-search": isSearch
|
|
@@ -4064,7 +4103,7 @@ const SelectButtonContentSingle = ({
|
|
|
4064
4103
|
"aria-expanded": showList,
|
|
4065
4104
|
"aria-owns": selectListId,
|
|
4066
4105
|
autoComplete: "off",
|
|
4067
|
-
className: cx("adyen-kyc-filter-input", [styles$
|
|
4106
|
+
className: cx("adyen-kyc-filter-input", [styles$6["adyen-kyc-filter-input"]]),
|
|
4068
4107
|
onInput,
|
|
4069
4108
|
placeholder,
|
|
4070
4109
|
ref: filterInputRef,
|
|
@@ -4152,7 +4191,7 @@ const SelectListItem = ({
|
|
|
4152
4191
|
}) => jsx("li", {
|
|
4153
4192
|
"aria-disabled": !!item.disabled,
|
|
4154
4193
|
"aria-selected": selected,
|
|
4155
|
-
className: cx(["adyen-kyc-dropdown-element", styles$
|
|
4194
|
+
className: cx(["adyen-kyc-dropdown-element", styles$6["adyen-kyc-dropdown-element"], {
|
|
4156
4195
|
"adyen-kyc-dropdown-element--active": selected,
|
|
4157
4196
|
"adyen-kyc-dropdown-element--disabled": !!item.disabled,
|
|
4158
4197
|
"adyen-kyc-dropdown-multi-element": isMulti,
|
|
@@ -4283,9 +4322,9 @@ function SelectList({
|
|
|
4283
4322
|
test: true,
|
|
4284
4323
|
"adyen-kyc-dropdown-list--above": showAbove,
|
|
4285
4324
|
"adyen-kyc-dropdown-list": true,
|
|
4286
|
-
[styles$
|
|
4325
|
+
[styles$6["adyen-kyc-dropdown-list"]]: true,
|
|
4287
4326
|
"adyen-kyc-dropdown-list--active": showList,
|
|
4288
|
-
[styles$
|
|
4327
|
+
[styles$6["adyen-kyc-dropdown-list--active"]]: showList
|
|
4289
4328
|
}),
|
|
4290
4329
|
id: props.selectListId,
|
|
4291
4330
|
role: "listbox",
|
|
@@ -4488,7 +4527,7 @@ const Select = ({
|
|
|
4488
4527
|
};
|
|
4489
4528
|
}, []);
|
|
4490
4529
|
return jsxs("div", {
|
|
4491
|
-
className: cx(["adyen-kyc-dropdown", styles$
|
|
4530
|
+
className: cx(["adyen-kyc-dropdown", styles$6["adyen-kyc-dropdown"], className, ...classNameModifiers.map((m) => `adyen-kyc-dropdown--${m}`)]),
|
|
4492
4531
|
ref: selectContainerRef,
|
|
4493
4532
|
onClick: (e) => {
|
|
4494
4533
|
e.stopPropagation();
|
|
@@ -5522,7 +5561,7 @@ const businessRegistrationNumberMasks = {
|
|
|
5522
5561
|
},
|
|
5523
5562
|
[CountryCodes.Cyprus]: {
|
|
5524
5563
|
default: {
|
|
5525
|
-
mask: makeMask(...
|
|
5564
|
+
mask: makeMask(...customInputs(1, /^[COP]$/), ...numericInputs(1), ...numericInputs(7, true)),
|
|
5526
5565
|
transformOnType: uppercase
|
|
5527
5566
|
}
|
|
5528
5567
|
},
|
|
@@ -6363,7 +6402,7 @@ const businessRegistrationNumberPatterns = {
|
|
|
6363
6402
|
soleProprietorship: /^\d{8}$/
|
|
6364
6403
|
},
|
|
6365
6404
|
[CountryCodes.Cyprus]: {
|
|
6366
|
-
default: /^[
|
|
6405
|
+
default: /^[COP]{1}\d{1,8}$/
|
|
6367
6406
|
},
|
|
6368
6407
|
[CountryCodes.CzechRepublic]: {
|
|
6369
6408
|
default: /^\d{8,10}$/
|
|
@@ -6710,13 +6749,11 @@ const defaultFieldConfig$9 = {
|
|
|
6710
6749
|
mask: businessRegistrationNumberMasks[CountryCodes.Cyprus].default,
|
|
6711
6750
|
validators: validatePatternOnBlur(businessRegistrationNumberPatterns[CountryCodes.Cyprus].default),
|
|
6712
6751
|
guidanceText: {
|
|
6713
|
-
key: "
|
|
6752
|
+
key: "enterEnglishLetterFollowedByXtoYDigitsForExample",
|
|
6714
6753
|
values: {
|
|
6715
|
-
minLetters: "1",
|
|
6716
|
-
maxLetters: "2",
|
|
6717
6754
|
minDigits: "1",
|
|
6718
6755
|
maxDigits: "8",
|
|
6719
|
-
example: "
|
|
6756
|
+
example: "C12345678"
|
|
6720
6757
|
}
|
|
6721
6758
|
}
|
|
6722
6759
|
},
|
|
@@ -6912,18 +6949,16 @@ const defaultFieldConfig$9 = {
|
|
|
6912
6949
|
case "partitaIVA":
|
|
6913
6950
|
default:
|
|
6914
6951
|
return {
|
|
6915
|
-
label: "
|
|
6952
|
+
label: "codiceFiscalePartitaIVA",
|
|
6916
6953
|
validators: validatePatternOnBlur(/^\d{11}$/),
|
|
6917
6954
|
mask: {
|
|
6918
|
-
mask: makeMask(...
|
|
6919
|
-
includeInValue: false
|
|
6920
|
-
}), spacer, ...numericInputs(11))
|
|
6955
|
+
mask: makeMask(spacer, ...numericInputs(11))
|
|
6921
6956
|
},
|
|
6922
6957
|
guidanceText: {
|
|
6923
6958
|
key: "enterTheRemainingNDigitsForExample",
|
|
6924
6959
|
values: {
|
|
6925
6960
|
numDigits: "11",
|
|
6926
|
-
example: "
|
|
6961
|
+
example: "47040001100"
|
|
6927
6962
|
}
|
|
6928
6963
|
}
|
|
6929
6964
|
};
|
|
@@ -7418,6 +7453,7 @@ const MaskedInputText = ({
|
|
|
7418
7453
|
value,
|
|
7419
7454
|
onInput,
|
|
7420
7455
|
onBlur,
|
|
7456
|
+
onFocus,
|
|
7421
7457
|
onMismatch: onMismatchExternal,
|
|
7422
7458
|
isValid: validationIsValid,
|
|
7423
7459
|
errorMessage,
|
|
@@ -7585,6 +7621,7 @@ Falling back to partially valid value "${fallback}"`);
|
|
|
7585
7621
|
}
|
|
7586
7622
|
},
|
|
7587
7623
|
onFocusHandler: (event) => {
|
|
7624
|
+
onFocus == null ? void 0 : onFocus();
|
|
7588
7625
|
fieldOnFocus(event);
|
|
7589
7626
|
setIsFocused(true);
|
|
7590
7627
|
},
|
|
@@ -7679,7 +7716,7 @@ const companyRegistrationNumberOptions = {
|
|
|
7679
7716
|
}],
|
|
7680
7717
|
[CountryCodes.Italy]: [{
|
|
7681
7718
|
id: "partitaIVA",
|
|
7682
|
-
name: "
|
|
7719
|
+
name: "codiceFiscalePartitaIVA"
|
|
7683
7720
|
}, {
|
|
7684
7721
|
id: "CCIAA",
|
|
7685
7722
|
name: "CCIAA"
|
|
@@ -11911,7 +11948,7 @@ const LABELS = {
|
|
|
11911
11948
|
}
|
|
11912
11949
|
};
|
|
11913
11950
|
const getKeyForField = (fieldName, country) => country ? LABELS[fieldName][country] || LABELS[fieldName].default : LABELS[fieldName].default;
|
|
11914
|
-
const getAddressSchemaForCountry = (country) => ADDRESS_SCHEMAS[country]
|
|
11951
|
+
const getAddressSchemaForCountry = (country) => country && ADDRESS_SCHEMAS[country] ? ADDRESS_SCHEMAS[country] : ADDRESS_SCHEMAS.default;
|
|
11915
11952
|
const getAddressSchemaLabelsByCountry = (country) => {
|
|
11916
11953
|
const schema = getAddressSchemaForCountry(country);
|
|
11917
11954
|
return schema.reduce((labels2, field) => ({
|
|
@@ -12747,11 +12784,10 @@ function Address(props) {
|
|
|
12747
12784
|
const stateRef = useRef({
|
|
12748
12785
|
setState: null
|
|
12749
12786
|
});
|
|
12750
|
-
const addressFields = ADDRESS_SCHEMAS[dataProp == null ? void 0 : dataProp.country] ?? ADDRESS_SCHEMAS.default;
|
|
12751
12787
|
const datasetUtils = datasetUtilities(i18n.locale);
|
|
12752
|
-
const requiredFields = (requiredFieldsProp == null ? void 0 : requiredFieldsProp.includes("stateOrProvince")) || dataProp.country && COUNTRIES_WITH_STATES_DATASET.includes(dataProp.country) ?
|
|
12753
|
-
const rules2 = useMemo(() => addressValidationRules(dataProp.country), [dataProp.country]);
|
|
12754
|
-
const rulesV4 = useMemo(() => addressValidationRulesV4(dataProp.country, i18n), [dataProp.country, i18n]);
|
|
12788
|
+
const requiredFields = (requiredFieldsProp == null ? void 0 : requiredFieldsProp.includes("stateOrProvince")) || (dataProp == null ? void 0 : dataProp.country) && COUNTRIES_WITH_STATES_DATASET.includes(dataProp == null ? void 0 : dataProp.country) ? getAddressSchemaForCountry(dataProp == null ? void 0 : dataProp.country) : getAddressSchemaForCountry(dataProp == null ? void 0 : dataProp.country).filter((ad) => ad !== "stateOrProvince");
|
|
12789
|
+
const rules2 = useMemo(() => (dataProp == null ? void 0 : dataProp.country) ? addressValidationRules(dataProp == null ? void 0 : dataProp.country) : {}, [dataProp == null ? void 0 : dataProp.country]);
|
|
12790
|
+
const rulesV4 = useMemo(() => (dataProp == null ? void 0 : dataProp.country) ? addressValidationRulesV4(dataProp == null ? void 0 : dataProp.country, i18n) : {}, [dataProp == null ? void 0 : dataProp.country, i18n]);
|
|
12755
12791
|
const {
|
|
12756
12792
|
data,
|
|
12757
12793
|
errors,
|
|
@@ -12779,7 +12815,7 @@ function Address(props) {
|
|
|
12779
12815
|
optionalFields: optionalFieldsProp
|
|
12780
12816
|
}, i18n);
|
|
12781
12817
|
useEffect(() => {
|
|
12782
|
-
if (dataProp.country !== data.country && dataProp.country) {
|
|
12818
|
+
if ((dataProp == null ? void 0 : dataProp.country) !== data.country && (dataProp == null ? void 0 : dataProp.country)) {
|
|
12783
12819
|
requiredFields.forEach((field) => {
|
|
12784
12820
|
handleChangeFor(field, "input")("");
|
|
12785
12821
|
});
|
|
@@ -12787,7 +12823,7 @@ function Address(props) {
|
|
|
12787
12823
|
setShowAutocompletedAddressFields(false);
|
|
12788
12824
|
setShowAddAddressButton(true);
|
|
12789
12825
|
}
|
|
12790
|
-
}, [dataProp.country]);
|
|
12826
|
+
}, [dataProp == null ? void 0 : dataProp.country]);
|
|
12791
12827
|
useEffect(() => {
|
|
12792
12828
|
if (handleAddressSearch && handleFindAddress) {
|
|
12793
12829
|
setIsHandlerPresent(true);
|
|
@@ -12798,12 +12834,13 @@ function Address(props) {
|
|
|
12798
12834
|
}
|
|
12799
12835
|
}, []);
|
|
12800
12836
|
useEffect(() => {
|
|
12837
|
+
var _a, _b;
|
|
12801
12838
|
const processedData = ADDRESS_SCHEMA.reduce((acc, cur) => {
|
|
12802
12839
|
if (!formUtils.isRequiredField(cur)) {
|
|
12803
12840
|
delete acc[cur];
|
|
12804
12841
|
return acc;
|
|
12805
12842
|
}
|
|
12806
|
-
const fallbackValue = !formUtils.isRequiredField(cur) && !data[cur] && dataProp[cur] ? dataProp[cur] : "N/A";
|
|
12843
|
+
const fallbackValue = !formUtils.isRequiredField(cur) && !data[cur] && (dataProp == null ? void 0 : dataProp[cur]) ? dataProp[cur] : "N/A";
|
|
12807
12844
|
return {
|
|
12808
12845
|
...acc,
|
|
12809
12846
|
[cur]: formUtils.isRequiredField(cur) || !!data[cur] ? data[cur] : fallbackValue
|
|
@@ -12838,7 +12875,7 @@ function Address(props) {
|
|
|
12838
12875
|
},
|
|
12839
12876
|
isValid
|
|
12840
12877
|
});
|
|
12841
|
-
stateRef.current.setState({
|
|
12878
|
+
(_b = (_a = stateRef.current).setState) == null ? void 0 : _b.call(_a, {
|
|
12842
12879
|
type: "addToState",
|
|
12843
12880
|
value: {
|
|
12844
12881
|
...addressState,
|
|
@@ -12898,8 +12935,8 @@ function Address(props) {
|
|
|
12898
12935
|
}) => {
|
|
12899
12936
|
const hasHouseNumber = !!houseNumberOrName;
|
|
12900
12937
|
if (hasHouseNumber) {
|
|
12901
|
-
const isHouseNumberFirst = COUNTRIES_WITH_HOUSE_NUMBER_FIRST.includes(data.country);
|
|
12902
|
-
const needsComma = COUNTRIES_WITH_COMMA_SEPARATED.includes(data.country);
|
|
12938
|
+
const isHouseNumberFirst = data.country ? COUNTRIES_WITH_HOUSE_NUMBER_FIRST.includes(data.country) : false;
|
|
12939
|
+
const needsComma = data.country ? COUNTRIES_WITH_COMMA_SEPARATED.includes(data.country) : false;
|
|
12903
12940
|
const formattedAddress = isHouseNumberFirst ? `${houseNumberOrName}${needsComma ? ", " : " "}${street}` : `${street}${needsComma ? ", " : " "}${houseNumberOrName}`;
|
|
12904
12941
|
return handleChangeFor("address", "input")(formattedAddress);
|
|
12905
12942
|
}
|
|
@@ -12941,7 +12978,7 @@ function Address(props) {
|
|
|
12941
12978
|
className: "adyen-kyc-search-address",
|
|
12942
12979
|
children: [jsx(SearchAddress, {
|
|
12943
12980
|
handleChangeFor,
|
|
12944
|
-
data: dataProp,
|
|
12981
|
+
data: dataProp ?? {},
|
|
12945
12982
|
handleAddressSearch,
|
|
12946
12983
|
handleFindAddress,
|
|
12947
12984
|
legalEntityId,
|
|
@@ -12955,7 +12992,7 @@ function Address(props) {
|
|
|
12955
12992
|
className: "adyen-kyc-search-address--below-location",
|
|
12956
12993
|
children: [jsx(Icon, {
|
|
12957
12994
|
name: "location"
|
|
12958
|
-
}), datasetUtils.getCountryName(dataProp.country)]
|
|
12995
|
+
}), datasetUtils.getCountryName(dataProp == null ? void 0 : dataProp.country)]
|
|
12959
12996
|
}), showAddAddressButton && jsx(Button, {
|
|
12960
12997
|
showAsLink: true,
|
|
12961
12998
|
testId: "addAddressManuallyBtn",
|
|
@@ -14948,21 +14985,49 @@ const useIdVerificationToken = ({
|
|
|
14948
14985
|
loadingStatus
|
|
14949
14986
|
};
|
|
14950
14987
|
};
|
|
14951
|
-
const
|
|
14988
|
+
const adyenKycLoadingInputForm = "adyen-kyc-loading-input__form";
|
|
14989
|
+
const adyenKycLoadingInputFormLoadingOpacity0 = "adyen-kyc-loading-input__form--loading-opacity0";
|
|
14990
|
+
const adyenKycLoadingInputFormLoadingOpacity01 = "adyen-kyc-loading-input__form--loading-opacity0-1";
|
|
14991
|
+
const adyenKycLoadingInputFormLoadingOpacity02 = "adyen-kyc-loading-input__form--loading-opacity0-2";
|
|
14992
|
+
const adyenKycLoadingInputFormLoadingOpacity03 = "adyen-kyc-loading-input__form--loading-opacity0-3";
|
|
14993
|
+
const adyenKycLoadingInputFormLoadingOpacity04 = "adyen-kyc-loading-input__form--loading-opacity0-4";
|
|
14994
|
+
const adyenKycLoadingInputFormLoadingOpacity05 = "adyen-kyc-loading-input__form--loading-opacity0-5";
|
|
14995
|
+
const adyenKycLoadingInputFormLoadingOpacity06 = "adyen-kyc-loading-input__form--loading-opacity0-6";
|
|
14996
|
+
const adyenKycLoadingInputFormLoadingOpacity07 = "adyen-kyc-loading-input__form--loading-opacity0-7";
|
|
14997
|
+
const adyenKycLoadingInputFormLoadingOpacity08 = "adyen-kyc-loading-input__form--loading-opacity0-8";
|
|
14998
|
+
const adyenKycLoadingInputFormLoadingOpacity09 = "adyen-kyc-loading-input__form--loading-opacity0-9";
|
|
14999
|
+
const adyenKycLoadingInputFormLoadingOpacity1 = "adyen-kyc-loading-input__form--loading-opacity1";
|
|
15000
|
+
const adyenKycLoadingInputLoader = "adyen-kyc-loading-input__loader";
|
|
15001
|
+
const adyenKycLoadingInputLoaderActive = "adyen-kyc-loading-input__loader--active";
|
|
15002
|
+
const styles$5 = {
|
|
14952
15003
|
"adyen-kyc-loading-input__form": "adyen-kyc-loading-input__form",
|
|
15004
|
+
adyenKycLoadingInputForm,
|
|
14953
15005
|
"adyen-kyc-loading-input__form--loading-opacity0": "adyen-kyc-loading-input__form--loading-opacity0",
|
|
15006
|
+
adyenKycLoadingInputFormLoadingOpacity0,
|
|
14954
15007
|
"adyen-kyc-loading-input__form--loading-opacity0-1": "adyen-kyc-loading-input__form--loading-opacity0-1",
|
|
15008
|
+
adyenKycLoadingInputFormLoadingOpacity01,
|
|
14955
15009
|
"adyen-kyc-loading-input__form--loading-opacity0-2": "adyen-kyc-loading-input__form--loading-opacity0-2",
|
|
15010
|
+
adyenKycLoadingInputFormLoadingOpacity02,
|
|
14956
15011
|
"adyen-kyc-loading-input__form--loading-opacity0-3": "adyen-kyc-loading-input__form--loading-opacity0-3",
|
|
15012
|
+
adyenKycLoadingInputFormLoadingOpacity03,
|
|
14957
15013
|
"adyen-kyc-loading-input__form--loading-opacity0-4": "adyen-kyc-loading-input__form--loading-opacity0-4",
|
|
15014
|
+
adyenKycLoadingInputFormLoadingOpacity04,
|
|
14958
15015
|
"adyen-kyc-loading-input__form--loading-opacity0-5": "adyen-kyc-loading-input__form--loading-opacity0-5",
|
|
15016
|
+
adyenKycLoadingInputFormLoadingOpacity05,
|
|
14959
15017
|
"adyen-kyc-loading-input__form--loading-opacity0-6": "adyen-kyc-loading-input__form--loading-opacity0-6",
|
|
15018
|
+
adyenKycLoadingInputFormLoadingOpacity06,
|
|
14960
15019
|
"adyen-kyc-loading-input__form--loading-opacity0-7": "adyen-kyc-loading-input__form--loading-opacity0-7",
|
|
15020
|
+
adyenKycLoadingInputFormLoadingOpacity07,
|
|
14961
15021
|
"adyen-kyc-loading-input__form--loading-opacity0-8": "adyen-kyc-loading-input__form--loading-opacity0-8",
|
|
15022
|
+
adyenKycLoadingInputFormLoadingOpacity08,
|
|
14962
15023
|
"adyen-kyc-loading-input__form--loading-opacity0-9": "adyen-kyc-loading-input__form--loading-opacity0-9",
|
|
15024
|
+
adyenKycLoadingInputFormLoadingOpacity09,
|
|
14963
15025
|
"adyen-kyc-loading-input__form--loading-opacity1": "adyen-kyc-loading-input__form--loading-opacity1",
|
|
15026
|
+
adyenKycLoadingInputFormLoadingOpacity1,
|
|
14964
15027
|
"adyen-kyc-loading-input__loader": "adyen-kyc-loading-input__loader",
|
|
14965
|
-
|
|
15028
|
+
adyenKycLoadingInputLoader,
|
|
15029
|
+
"adyen-kyc-loading-input__loader--active": "adyen-kyc-loading-input__loader--active",
|
|
15030
|
+
adyenKycLoadingInputLoaderActive
|
|
14966
15031
|
};
|
|
14967
15032
|
const LoaderWrapper = ({
|
|
14968
15033
|
children,
|
|
@@ -14976,12 +15041,12 @@ const LoaderWrapper = ({
|
|
|
14976
15041
|
const digit = formOpacityStrArr[0];
|
|
14977
15042
|
const decimal = formOpacityStrArr[1];
|
|
14978
15043
|
const opacity = decimal ? `${digit}-${decimal}` : `${digit}`;
|
|
14979
|
-
const wrapperClass = cx("adyen-kyc-loading-input__form", styles$
|
|
14980
|
-
[styles$
|
|
15044
|
+
const wrapperClass = cx("adyen-kyc-loading-input__form", styles$5["adyen-kyc-loading-input__form"], {
|
|
15045
|
+
[styles$5[`adyen-kyc-loading-input__form--loading-opacity${opacity}`]]: status === "loading"
|
|
14981
15046
|
});
|
|
14982
15047
|
const loaderWrapperClass = cx({
|
|
14983
|
-
[styles$
|
|
14984
|
-
[styles$
|
|
15048
|
+
[styles$5["adyen-kyc-loading-input__loader"]]: true,
|
|
15049
|
+
[styles$5["adyen-kyc-loading-input__loader--active"]]: status === "loading" && showSpinner
|
|
14985
15050
|
});
|
|
14986
15051
|
const overlayClass = cx("adyen-kyc-loading-input", className);
|
|
14987
15052
|
return jsxs("div", {
|
|
@@ -16491,11 +16556,19 @@ const handleKeys = (keys, callback, propagationMode = "stopIfMatches") => (event
|
|
|
16491
16556
|
callback();
|
|
16492
16557
|
}
|
|
16493
16558
|
};
|
|
16494
|
-
const
|
|
16559
|
+
const adyenKycMultiSelectList = "adyen-kyc-multi-select-list";
|
|
16560
|
+
const adyenKycMultiSelectListItem = "adyen-kyc-multi-select-list-item";
|
|
16561
|
+
const adyenKycMultiSelectListItemWithDescription = "adyen-kyc-multi-select-list-item--with-description";
|
|
16562
|
+
const adyenKycCheckboxLabel = "adyen-kyc-checkbox__label";
|
|
16563
|
+
const styles$4 = {
|
|
16495
16564
|
"adyen-kyc-multi-select-list": "adyen-kyc-multi-select-list",
|
|
16565
|
+
adyenKycMultiSelectList,
|
|
16496
16566
|
"adyen-kyc-multi-select-list-item": "adyen-kyc-multi-select-list-item",
|
|
16567
|
+
adyenKycMultiSelectListItem,
|
|
16497
16568
|
"adyen-kyc-multi-select-list-item--with-description": "adyen-kyc-multi-select-list-item--with-description",
|
|
16498
|
-
|
|
16569
|
+
adyenKycMultiSelectListItemWithDescription,
|
|
16570
|
+
"adyen-kyc-checkbox__label": "adyen-kyc-checkbox__label",
|
|
16571
|
+
adyenKycCheckboxLabel
|
|
16499
16572
|
};
|
|
16500
16573
|
const MultiSelectList = ({
|
|
16501
16574
|
options,
|
|
@@ -16503,7 +16576,7 @@ const MultiSelectList = ({
|
|
|
16503
16576
|
onSelect,
|
|
16504
16577
|
mapToSelectItem
|
|
16505
16578
|
}) => jsx("ul", {
|
|
16506
|
-
className: styles$
|
|
16579
|
+
className: styles$4["adyen-kyc-multi-select-list"],
|
|
16507
16580
|
children: options.map((option) => {
|
|
16508
16581
|
const item = mapToSelectItem(option);
|
|
16509
16582
|
const isSelected = selected.includes(option);
|
|
@@ -16517,8 +16590,8 @@ const MultiSelectList = ({
|
|
|
16517
16590
|
onKeyDown: handleKeys(["Enter", " "], handleSelect),
|
|
16518
16591
|
onSelect: handleSelect,
|
|
16519
16592
|
isMulti: true,
|
|
16520
|
-
className: cx([styles$
|
|
16521
|
-
[styles$
|
|
16593
|
+
className: cx([styles$4["adyen-kyc-multi-select-list-item"], {
|
|
16594
|
+
[styles$4["adyen-kyc-multi-select-list-item--with-description"]]: !!item.description
|
|
16522
16595
|
}])
|
|
16523
16596
|
}, item.id);
|
|
16524
16597
|
})
|
|
@@ -16539,7 +16612,7 @@ const DecisionMakerRoleComponent = (props) => {
|
|
|
16539
16612
|
fieldValidationErrors,
|
|
16540
16613
|
requiredFields,
|
|
16541
16614
|
allowedRoles,
|
|
16542
|
-
trustedRoles
|
|
16615
|
+
trustedRoles = []
|
|
16543
16616
|
} = props;
|
|
16544
16617
|
const {
|
|
16545
16618
|
i18n
|
|
@@ -16597,7 +16670,7 @@ const DecisionMakerRoleComponent = (props) => {
|
|
|
16597
16670
|
onSelect: changeRoles,
|
|
16598
16671
|
mapToSelectItem: (role) => ({
|
|
16599
16672
|
...makeSelectItemForRole(role, i18n),
|
|
16600
|
-
disabled: allowedRoles
|
|
16673
|
+
disabled: allowedRoles && !allowedRoles.includes(role) || trustedRoles.includes(role)
|
|
16601
16674
|
})
|
|
16602
16675
|
})
|
|
16603
16676
|
})]
|
|
@@ -19457,7 +19530,8 @@ function InstantBankVerification({
|
|
|
19457
19530
|
case "GENERIC_ERROR":
|
|
19458
19531
|
errorTitle = i18n.get("ranIntoTechnicalError");
|
|
19459
19532
|
break;
|
|
19460
|
-
case "UNKNOWN_ERROR":
|
|
19533
|
+
case "UNKNOWN_ERROR":
|
|
19534
|
+
default: {
|
|
19461
19535
|
errorTitle = i18n.get("couldNotCompleteAccountCheck");
|
|
19462
19536
|
break;
|
|
19463
19537
|
}
|
|
@@ -19628,6 +19702,7 @@ const payoutCurrencySupport = {
|
|
|
19628
19702
|
iban: [Currencies.CAD, Currencies.USD]
|
|
19629
19703
|
}
|
|
19630
19704
|
};
|
|
19705
|
+
const shouldShowCheckGuidance = (country) => country === "US";
|
|
19631
19706
|
const shouldShowPayoutAccountFormatSelector = (country) => countriesWithLocalFormat.has(country);
|
|
19632
19707
|
const shouldShowPayoutAlert = (country) => shouldShowPayoutAccountFormatSelector(country) || countriesWithMultipleCurrencies.has(country);
|
|
19633
19708
|
const getSupportedCurrencyGuidance = (i18n, country, requiredFields) => {
|
|
@@ -19779,7 +19854,9 @@ function BankAccountNumber(props) {
|
|
|
19779
19854
|
} = useI18nContext();
|
|
19780
19855
|
const {
|
|
19781
19856
|
country,
|
|
19782
|
-
fieldConfig = defaultFieldConfig$4
|
|
19857
|
+
fieldConfig = defaultFieldConfig$4,
|
|
19858
|
+
onFocus,
|
|
19859
|
+
onBlur
|
|
19783
19860
|
} = props;
|
|
19784
19861
|
const metadata = resolveFieldMetadata(fieldConfig[country], {}, defaultFieldMetadata$4);
|
|
19785
19862
|
const mergedProps = mergeFieldMetadataIntoProps("bankAccountNumber", metadata, props);
|
|
@@ -19797,6 +19874,10 @@ function BankAccountNumber(props) {
|
|
|
19797
19874
|
fieldProblems: mergedProps == null ? void 0 : mergedProps.fieldValidationErrors,
|
|
19798
19875
|
obscuredFields: mergedProps.obscuredFields
|
|
19799
19876
|
});
|
|
19877
|
+
const handleBlur = () => {
|
|
19878
|
+
onBlur == null ? void 0 : onBlur();
|
|
19879
|
+
handleChangeFor("bankAccountNumber", "blur");
|
|
19880
|
+
};
|
|
19800
19881
|
const {
|
|
19801
19882
|
updateStateSlice
|
|
19802
19883
|
} = useGlobalDataSlice("payoutAccountDetails", "bankAccountNumber");
|
|
@@ -19823,8 +19904,9 @@ function BankAccountNumber(props) {
|
|
|
19823
19904
|
field: ["bankAccountNumber"],
|
|
19824
19905
|
input: ["bankAccountNumber"]
|
|
19825
19906
|
},
|
|
19826
|
-
onBlur:
|
|
19907
|
+
onBlur: handleBlur,
|
|
19827
19908
|
onInput: handleChangeFor("bankAccountNumber", "input"),
|
|
19909
|
+
onFocus,
|
|
19828
19910
|
readonly: formUtils.isReadOnly("bankAccountNumber"),
|
|
19829
19911
|
value: data.bankAccountNumber ?? "",
|
|
19830
19912
|
acceptObscuredValue: formUtils.isObscured("bankAccountNumber")
|
|
@@ -20095,7 +20177,7 @@ const defaultFieldConfig$2 = {
|
|
|
20095
20177
|
}
|
|
20096
20178
|
},
|
|
20097
20179
|
[CountryCodes.UnitedStates]: {
|
|
20098
|
-
label: "
|
|
20180
|
+
label: "routingNumber",
|
|
20099
20181
|
validators: validatePatternOnBlur(/^\d{9}$/),
|
|
20100
20182
|
mask: {
|
|
20101
20183
|
mask: makeMask(...numericInputs(9))
|
|
@@ -20138,7 +20220,9 @@ function BranchCode(props) {
|
|
|
20138
20220
|
} = useI18nContext();
|
|
20139
20221
|
const {
|
|
20140
20222
|
country,
|
|
20141
|
-
fieldConfig = defaultFieldConfig$2
|
|
20223
|
+
fieldConfig = defaultFieldConfig$2,
|
|
20224
|
+
onFocus,
|
|
20225
|
+
onBlur
|
|
20142
20226
|
} = props;
|
|
20143
20227
|
const metadata = resolveFieldMetadata(fieldConfig[country], {}, defaultFieldMetadata$2);
|
|
20144
20228
|
const mergedProps = mergeFieldMetadataIntoProps("branchCode", metadata, props);
|
|
@@ -20158,6 +20242,10 @@ function BranchCode(props) {
|
|
|
20158
20242
|
const {
|
|
20159
20243
|
updateStateSlice
|
|
20160
20244
|
} = useGlobalDataSlice("payoutAccountDetails", "branchCode");
|
|
20245
|
+
const handleBlur = () => {
|
|
20246
|
+
onBlur == null ? void 0 : onBlur();
|
|
20247
|
+
handleChangeFor("branchCode", "blur");
|
|
20248
|
+
};
|
|
20161
20249
|
useEffect(() => {
|
|
20162
20250
|
updateStateSlice({
|
|
20163
20251
|
data,
|
|
@@ -20181,7 +20269,8 @@ function BranchCode(props) {
|
|
|
20181
20269
|
value: data.branchCode ?? "",
|
|
20182
20270
|
readonly: formUtils.isReadOnly("branchCode"),
|
|
20183
20271
|
onInput: handleChangeFor("branchCode", "input"),
|
|
20184
|
-
onBlur:
|
|
20272
|
+
onBlur: handleBlur,
|
|
20273
|
+
onFocus,
|
|
20185
20274
|
"aria-required": true,
|
|
20186
20275
|
"aria-label": formUtils.getLabel("branchCode"),
|
|
20187
20276
|
"aria-invalid": !valid.branchCode
|
|
@@ -20519,6 +20608,48 @@ function SwiftCode(props) {
|
|
|
20519
20608
|
"aria-invalid": !valid.swiftCode
|
|
20520
20609
|
});
|
|
20521
20610
|
}
|
|
20611
|
+
const adyenKycCheckGuidance = "adyen-kyc-check-guidance";
|
|
20612
|
+
const adyenKycCheckGuidanceImage = "adyen-kyc-check-guidance__image";
|
|
20613
|
+
const adyenKycCheckGuidanceImageAnnotated = "adyen-kyc-check-guidance__image--annotated";
|
|
20614
|
+
const adyenKycCheckGuidanceImageInactive = "adyen-kyc-check-guidance__image--inactive";
|
|
20615
|
+
const adyenKycUsCheckAccountNumber = "adyen-kyc-us-check-account-number";
|
|
20616
|
+
const adyenKycUsCheckRoutingNumber = "adyen-kyc-us-check-routing-number";
|
|
20617
|
+
const styles$3 = {
|
|
20618
|
+
"adyen-kyc-check-guidance": "adyen-kyc-check-guidance",
|
|
20619
|
+
adyenKycCheckGuidance,
|
|
20620
|
+
"adyen-kyc-check-guidance__image": "adyen-kyc-check-guidance__image",
|
|
20621
|
+
adyenKycCheckGuidanceImage,
|
|
20622
|
+
"adyen-kyc-check-guidance__image--annotated": "adyen-kyc-check-guidance__image--annotated",
|
|
20623
|
+
adyenKycCheckGuidanceImageAnnotated,
|
|
20624
|
+
"adyen-kyc-check-guidance__image--inactive": "adyen-kyc-check-guidance__image--inactive",
|
|
20625
|
+
adyenKycCheckGuidanceImageInactive,
|
|
20626
|
+
"adyen-kyc-us-check-account-number": "adyen-kyc-us-check-account-number",
|
|
20627
|
+
adyenKycUsCheckAccountNumber,
|
|
20628
|
+
"adyen-kyc-us-check-routing-number": "adyen-kyc-us-check-routing-number",
|
|
20629
|
+
adyenKycUsCheckRoutingNumber
|
|
20630
|
+
};
|
|
20631
|
+
const CheckGuidance = ({
|
|
20632
|
+
annotated
|
|
20633
|
+
}) => jsxs("div", {
|
|
20634
|
+
className: styles$3["adyen-kyc-check-guidance"],
|
|
20635
|
+
children: [jsx(Svg, {
|
|
20636
|
+
type: "image",
|
|
20637
|
+
name: "us-check-account-number",
|
|
20638
|
+
className: cx(styles$3["adyen-kyc-check-guidance__image"], styles$3["adyen-kyc-check-guidance__image--annotated"], {
|
|
20639
|
+
[styles$3["adyen-kyc-check-guidance__image--inactive"]]: annotated !== "account"
|
|
20640
|
+
})
|
|
20641
|
+
}), jsx(Svg, {
|
|
20642
|
+
type: "image",
|
|
20643
|
+
name: "us-check-routing-number",
|
|
20644
|
+
className: cx(styles$3["adyen-kyc-check-guidance__image"], styles$3["adyen-kyc-check-guidance__image--annotated"], {
|
|
20645
|
+
[styles$3["adyen-kyc-check-guidance__image--inactive"]]: annotated !== "routing"
|
|
20646
|
+
})
|
|
20647
|
+
}), jsx(Svg, {
|
|
20648
|
+
name: "us-check",
|
|
20649
|
+
type: "image",
|
|
20650
|
+
className: styles$3["adyen-kyc-check-guidance__image"]
|
|
20651
|
+
})]
|
|
20652
|
+
});
|
|
20522
20653
|
const payoutAccountFields = ["accountHolder", ...ibanFields, ...branchCodeFields, ...swiftCodeFields, ...currencyFields, ...bankAccountNumberFields, ...bankNameFields, ...bankCodeFields];
|
|
20523
20654
|
function PayoutAccountComponent(props) {
|
|
20524
20655
|
const {
|
|
@@ -20529,16 +20660,19 @@ function PayoutAccountComponent(props) {
|
|
|
20529
20660
|
const {
|
|
20530
20661
|
i18n
|
|
20531
20662
|
} = useI18nContext();
|
|
20663
|
+
const [checkAnnotation, setCheckAnnotation] = useState();
|
|
20532
20664
|
const {
|
|
20533
20665
|
isSettingEnabled
|
|
20534
20666
|
} = useSettingsContext();
|
|
20535
20667
|
const bankAccountFormatSelectionAllowed = isSettingEnabled(SettingNames.AllowBankAccountFormatSelection);
|
|
20536
20668
|
const {
|
|
20669
|
+
heading,
|
|
20537
20670
|
country,
|
|
20538
20671
|
id,
|
|
20539
20672
|
legalEntityResponse,
|
|
20540
20673
|
requiredFields = []
|
|
20541
20674
|
} = props;
|
|
20675
|
+
const showCheckGuidance = shouldShowCheckGuidance(country);
|
|
20542
20676
|
const {
|
|
20543
20677
|
data,
|
|
20544
20678
|
valid,
|
|
@@ -20581,19 +20715,15 @@ function PayoutAccountComponent(props) {
|
|
|
20581
20715
|
className: "adyen-kyc-individual__payout-account",
|
|
20582
20716
|
"aria-describedby": "ariaErrorField",
|
|
20583
20717
|
children: [jsx(FormHeader, {
|
|
20584
|
-
heading
|
|
20718
|
+
heading
|
|
20585
20719
|
}), jsx(ErrorPanel, {
|
|
20586
20720
|
verificationErrors: props == null ? void 0 : props.formVerificationErrors,
|
|
20587
20721
|
validationErrors: props == null ? void 0 : props.fieldValidationErrors,
|
|
20588
20722
|
formUtils,
|
|
20589
20723
|
id: "ariaErrorField"
|
|
20590
|
-
}), jsx(
|
|
20591
|
-
|
|
20592
|
-
|
|
20593
|
-
contentId: "reasonForFillingPayoutDetails",
|
|
20594
|
-
title: i18n.get("whyDoINeedToFillInThisInformation"),
|
|
20595
|
-
content: i18n.get("reasonForFillingPayoutDetails")
|
|
20596
|
-
}), formUtils.isRequiredField("accountHolder") && jsx(Field, {
|
|
20724
|
+
}), showCheckGuidance ? jsx(CheckGuidance, {
|
|
20725
|
+
annotated: checkAnnotation
|
|
20726
|
+
}) : void 0, formUtils.isRequiredField("accountHolder") && jsx(Field, {
|
|
20597
20727
|
name: "accountHolder",
|
|
20598
20728
|
label: formUtils.getLabel("accountHolder"),
|
|
20599
20729
|
helper: i18n.get(accountHolderDescriptionKey),
|
|
@@ -20617,7 +20747,9 @@ function PayoutAccountComponent(props) {
|
|
|
20617
20747
|
}), formUtils.isRequiredField("bankAccountNumber") && jsx(BankAccountNumber, {
|
|
20618
20748
|
...bankAccountNumberProps,
|
|
20619
20749
|
country,
|
|
20620
|
-
dataStoreId: id
|
|
20750
|
+
dataStoreId: id,
|
|
20751
|
+
onFocus: showCheckGuidance ? () => setCheckAnnotation("account") : void 0,
|
|
20752
|
+
onBlur: showCheckGuidance ? () => setCheckAnnotation(void 0) : void 0
|
|
20621
20753
|
}), formUtils.isRequiredField("iban") && jsx(Iban, {
|
|
20622
20754
|
...ibanProps,
|
|
20623
20755
|
dataStoreId: id,
|
|
@@ -20635,12 +20767,18 @@ function PayoutAccountComponent(props) {
|
|
|
20635
20767
|
}), formUtils.isRequiredField("branchCode") && jsx(BranchCode, {
|
|
20636
20768
|
...branchCodeProps,
|
|
20637
20769
|
country,
|
|
20638
|
-
dataStoreId: id
|
|
20770
|
+
dataStoreId: id,
|
|
20771
|
+
onFocus: showCheckGuidance ? () => setCheckAnnotation("routing") : void 0,
|
|
20772
|
+
onBlur: showCheckGuidance ? () => setCheckAnnotation(void 0) : void 0
|
|
20639
20773
|
}), formUtils.isRequiredField("bankCity") && jsx(BankCity, {
|
|
20640
20774
|
...bankCityProps,
|
|
20641
20775
|
dataStoreId: id
|
|
20642
20776
|
}), shouldShowPayoutAlert(country) && jsx(Alert, {
|
|
20643
20777
|
title: getSupportedCurrencyGuidance(i18n, country, requiredFields)
|
|
20778
|
+
}), jsx(Typography, {
|
|
20779
|
+
variant: "caption",
|
|
20780
|
+
color: "tertiary",
|
|
20781
|
+
children: i18n.get("reasonForFillingPayoutDetails")
|
|
20644
20782
|
})]
|
|
20645
20783
|
});
|
|
20646
20784
|
}
|
|
@@ -24000,12 +24138,22 @@ const dbaNameFieldMetadata = {
|
|
|
24000
24138
|
label: "dbaName",
|
|
24001
24139
|
validators: [validateNotEmptyOnBlur]
|
|
24002
24140
|
};
|
|
24003
|
-
const
|
|
24141
|
+
const adyenKycStructuredList = "adyen-kyc-structured-list";
|
|
24142
|
+
const adyenKycStructuredListListItem = "adyen-kyc-structured-list__list-item";
|
|
24143
|
+
const adyenLayoutMd = "adyen-layout-md";
|
|
24144
|
+
const adyenKycStructuredListLabel = "adyen-kyc-structured-list__label";
|
|
24145
|
+
const adyenKycStructuredListValue = "adyen-kyc-structured-list__value";
|
|
24146
|
+
const styles$2 = {
|
|
24004
24147
|
"adyen-kyc-structured-list": "adyen-kyc-structured-list",
|
|
24148
|
+
adyenKycStructuredList,
|
|
24005
24149
|
"adyen-kyc-structured-list__list-item": "adyen-kyc-structured-list__list-item",
|
|
24150
|
+
adyenKycStructuredListListItem,
|
|
24006
24151
|
"adyen-layout-md": "adyen-layout-md",
|
|
24152
|
+
adyenLayoutMd,
|
|
24007
24153
|
"adyen-kyc-structured-list__label": "adyen-kyc-structured-list__label",
|
|
24008
|
-
|
|
24154
|
+
adyenKycStructuredListLabel,
|
|
24155
|
+
"adyen-kyc-structured-list__value": "adyen-kyc-structured-list__value",
|
|
24156
|
+
adyenKycStructuredListValue
|
|
24009
24157
|
};
|
|
24010
24158
|
const StructuredList = ({
|
|
24011
24159
|
items
|
|
@@ -24014,14 +24162,14 @@ const StructuredList = ({
|
|
|
24014
24162
|
i18n
|
|
24015
24163
|
} = useI18nContext();
|
|
24016
24164
|
return jsx("dl", {
|
|
24017
|
-
className: styles$
|
|
24165
|
+
className: styles$2["adyen-kyc-structured-list"],
|
|
24018
24166
|
children: items.map((item) => jsxs("div", {
|
|
24019
|
-
className: styles$
|
|
24167
|
+
className: styles$2["adyen-kyc-structured-list__list-item"],
|
|
24020
24168
|
children: [jsx("dt", {
|
|
24021
|
-
className: styles$
|
|
24169
|
+
className: styles$2["adyen-kyc-structured-list__label"],
|
|
24022
24170
|
children: i18n.get(item.labelKey)
|
|
24023
24171
|
}), jsx("dd", {
|
|
24024
|
-
className: styles$
|
|
24172
|
+
className: styles$2["adyen-kyc-structured-list__value"],
|
|
24025
24173
|
children: item.value
|
|
24026
24174
|
})]
|
|
24027
24175
|
}, item.labelKey))
|
|
@@ -24470,8 +24618,8 @@ function AdditionalInformationComponent({
|
|
|
24470
24618
|
variant: "title",
|
|
24471
24619
|
children: i18n.get("registeredBusinessAddress")
|
|
24472
24620
|
}), jsx(Typography, {
|
|
24473
|
-
el: "
|
|
24474
|
-
variant: "
|
|
24621
|
+
el: "p",
|
|
24622
|
+
variant: "body",
|
|
24475
24623
|
children: i18n.get("registeredBusinessAddressDescription")
|
|
24476
24624
|
})]
|
|
24477
24625
|
}), jsx(Address, {
|
|
@@ -24500,8 +24648,8 @@ function AdditionalInformationComponent({
|
|
|
24500
24648
|
variant: "title",
|
|
24501
24649
|
children: i18n.get("principalPlaceOfBusiness")
|
|
24502
24650
|
}), jsx(Typography, {
|
|
24503
|
-
el: "
|
|
24504
|
-
variant: "
|
|
24651
|
+
el: "p",
|
|
24652
|
+
variant: "body",
|
|
24505
24653
|
children: i18n.get("principalPlaceOfBusinessDescription")
|
|
24506
24654
|
})]
|
|
24507
24655
|
}), jsx(Field, {
|
|
@@ -26018,14 +26166,14 @@ const Modal = ({
|
|
|
26018
26166
|
tertiary: true,
|
|
26019
26167
|
"aria-label": "back",
|
|
26020
26168
|
icon: "arrow-left",
|
|
26021
|
-
className: "adyen-kyc-modal-button
|
|
26169
|
+
className: "adyen-kyc-modal-button",
|
|
26022
26170
|
onClick: onBack,
|
|
26023
26171
|
shaded: true
|
|
26024
26172
|
}) : jsx("div", {}), onClose ? jsx(Button, {
|
|
26025
26173
|
tertiary: true,
|
|
26026
26174
|
"aria-label": "close",
|
|
26027
26175
|
icon: "cross",
|
|
26028
|
-
className: "adyen-kyc-modal-button
|
|
26176
|
+
className: "adyen-kyc-modal-button",
|
|
26029
26177
|
onClick: onClose,
|
|
26030
26178
|
shaded: true
|
|
26031
26179
|
}) : jsx("div", {})]
|
|
@@ -26353,16 +26501,10 @@ const DropinLayout = ({
|
|
|
26353
26501
|
if (modalOpen) {
|
|
26354
26502
|
return jsx(Modal, {
|
|
26355
26503
|
footer,
|
|
26356
|
-
onClose: handleClose,
|
|
26504
|
+
onClose: !onBack ? handleClose : void 0,
|
|
26357
26505
|
onBack,
|
|
26358
26506
|
children: jsx("div", {
|
|
26359
|
-
|
|
26360
|
-
children: jsx("div", {
|
|
26361
|
-
className: "adyen-kyc-dropin__content",
|
|
26362
|
-
children: jsx("div", {
|
|
26363
|
-
children: content
|
|
26364
|
-
})
|
|
26365
|
-
})
|
|
26507
|
+
children: content
|
|
26366
26508
|
})
|
|
26367
26509
|
});
|
|
26368
26510
|
}
|
|
@@ -34499,7 +34641,8 @@ const serviceAgreementTypesTranslationMapping = {
|
|
|
34499
34641
|
adyenAccount: "businessAccountTerms",
|
|
34500
34642
|
adyenCard: "cardUserTerms",
|
|
34501
34643
|
adyenFranchisee: "franchiseesTAndCs",
|
|
34502
|
-
adyenPccr: "pccr"
|
|
34644
|
+
adyenPccr: "pccr",
|
|
34645
|
+
adyenChargeCard: "chargeCardUserAgreement"
|
|
34503
34646
|
};
|
|
34504
34647
|
const logger$e = createLogger("ServiceAgreementDropinComponent");
|
|
34505
34648
|
const FALLBACK_LANGUAGE_CODE = "en";
|
|
@@ -37199,6 +37342,19 @@ var OnboardingStatus = /* @__PURE__ */ ((OnboardingStatus2) => {
|
|
|
37199
37342
|
OnboardingStatus2["VERIFIED"] = "VERIFIED";
|
|
37200
37343
|
return OnboardingStatus2;
|
|
37201
37344
|
})(OnboardingStatus || {});
|
|
37345
|
+
const adyenKycSkeleton = "adyen-kyc-skeleton";
|
|
37346
|
+
const skeleton = "skeleton";
|
|
37347
|
+
const adyenKycSkeletonCircle = "adyen-kyc-skeleton__circle";
|
|
37348
|
+
const adyenKycSkeletonText = "adyen-kyc-skeleton__text";
|
|
37349
|
+
const styles$1 = {
|
|
37350
|
+
"adyen-kyc-skeleton": "adyen-kyc-skeleton",
|
|
37351
|
+
adyenKycSkeleton,
|
|
37352
|
+
skeleton,
|
|
37353
|
+
"adyen-kyc-skeleton__circle": "adyen-kyc-skeleton__circle",
|
|
37354
|
+
adyenKycSkeletonCircle,
|
|
37355
|
+
"adyen-kyc-skeleton__text": "adyen-kyc-skeleton__text",
|
|
37356
|
+
adyenKycSkeletonText
|
|
37357
|
+
};
|
|
37202
37358
|
const Skeleton = ({
|
|
37203
37359
|
circle = false,
|
|
37204
37360
|
text = false,
|
|
@@ -37206,8 +37362,8 @@ const Skeleton = ({
|
|
|
37206
37362
|
width
|
|
37207
37363
|
}) => {
|
|
37208
37364
|
const classNames = cx("adyen-kyc-skeleton", {
|
|
37209
|
-
"adyen-kyc-skeleton__circle": circle,
|
|
37210
|
-
"adyen-kyc-skeleton__text": text
|
|
37365
|
+
[styles$1["adyen-kyc-skeleton__circle"]]: circle,
|
|
37366
|
+
[styles$1["adyen-kyc-skeleton__text"]]: text
|
|
37211
37367
|
});
|
|
37212
37368
|
return jsx("div", {
|
|
37213
37369
|
className: classNames,
|
|
@@ -37217,13 +37373,25 @@ const Skeleton = ({
|
|
|
37217
37373
|
}
|
|
37218
37374
|
});
|
|
37219
37375
|
};
|
|
37376
|
+
const adyenKycEmbeddedStatus = "adyen-kyc-embedded-status";
|
|
37377
|
+
const adyenKycEmbeddedStatusLoading = "adyen-kyc-embedded-status--loading";
|
|
37378
|
+
const adyenKycEmbeddedStatusAvatar = "adyen-kyc-embedded-status__avatar";
|
|
37379
|
+
const adyenKycEmbeddedStatusLight = "adyen-kyc-embedded-status--light";
|
|
37380
|
+
const adyenKycEmbeddedStatusIcon = "adyen-kyc-embedded-status__icon";
|
|
37381
|
+
const adyenKycEmbeddedStatusInfo = "adyen-kyc-embedded-status__info";
|
|
37220
37382
|
const styles = {
|
|
37221
37383
|
"adyen-kyc-embedded-status": "adyen-kyc-embedded-status",
|
|
37384
|
+
adyenKycEmbeddedStatus,
|
|
37222
37385
|
"adyen-kyc-embedded-status--loading": "adyen-kyc-embedded-status--loading",
|
|
37386
|
+
adyenKycEmbeddedStatusLoading,
|
|
37223
37387
|
"adyen-kyc-embedded-status__avatar": "adyen-kyc-embedded-status__avatar",
|
|
37388
|
+
adyenKycEmbeddedStatusAvatar,
|
|
37224
37389
|
"adyen-kyc-embedded-status--light": "adyen-kyc-embedded-status--light",
|
|
37390
|
+
adyenKycEmbeddedStatusLight,
|
|
37225
37391
|
"adyen-kyc-embedded-status__icon": "adyen-kyc-embedded-status__icon",
|
|
37226
|
-
|
|
37392
|
+
adyenKycEmbeddedStatusIcon,
|
|
37393
|
+
"adyen-kyc-embedded-status__info": "adyen-kyc-embedded-status__info",
|
|
37394
|
+
adyenKycEmbeddedStatusInfo
|
|
37227
37395
|
};
|
|
37228
37396
|
const statusToTag = (status) => {
|
|
37229
37397
|
switch (status) {
|
|
@@ -37289,8 +37457,8 @@ const EmbeddedStatus = ({
|
|
|
37289
37457
|
return jsxs("button", {
|
|
37290
37458
|
type: "button",
|
|
37291
37459
|
className: cx(className, styles["adyen-kyc-embedded-status"], {
|
|
37292
|
-
"adyen-kyc-embedded-status--loading": loading,
|
|
37293
|
-
"adyen-kyc-embedded-status--light": light
|
|
37460
|
+
[styles["adyen-kyc-embedded-status--loading"]]: loading,
|
|
37461
|
+
[styles["adyen-kyc-embedded-status--light"]]: light
|
|
37294
37462
|
}),
|
|
37295
37463
|
onClick,
|
|
37296
37464
|
children: [jsx("section", {
|
|
@@ -39458,7 +39626,7 @@ const ConfigurationApiProvider = ({
|
|
|
39458
39626
|
isEmbeddedDropin,
|
|
39459
39627
|
loadingContext
|
|
39460
39628
|
} = authContext;
|
|
39461
|
-
const sdkVersion = "2.
|
|
39629
|
+
const sdkVersion = "2.55.0";
|
|
39462
39630
|
useAnalytics({
|
|
39463
39631
|
onUserEvent,
|
|
39464
39632
|
legalEntityId: rootLegalEntityId,
|
|
@@ -40136,7 +40304,7 @@ const DebugModal = ({
|
|
|
40136
40304
|
};
|
|
40137
40305
|
const copyToClipboard = async () => {
|
|
40138
40306
|
const toCopy = {
|
|
40139
|
-
sdkVersion: "2.
|
|
40307
|
+
sdkVersion: "2.55.0",
|
|
40140
40308
|
experiments: Object.fromEntries(allExperimentsWithValues),
|
|
40141
40309
|
settings: Object.fromEntries(allSettingsWithValues)
|
|
40142
40310
|
};
|
|
@@ -40175,7 +40343,7 @@ const DebugModal = ({
|
|
|
40175
40343
|
children: [jsxs("div", {
|
|
40176
40344
|
className: "adyen-kyc-debug-modal__meta",
|
|
40177
40345
|
children: [jsxs("span", {
|
|
40178
|
-
children: ["SDK version: ", "2.
|
|
40346
|
+
children: ["SDK version: ", "2.55.0"]
|
|
40179
40347
|
}), jsxs("span", {
|
|
40180
40348
|
children: ["rootLegalEntityId: ", rootLegalEntityId]
|
|
40181
40349
|
})]
|