@adyen/kyc-components 2.26.2 → 2.26.4
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.
|
@@ -6137,6 +6137,7 @@ const nonInputs = (str, options) => Array.from(str).map((char) => ({
|
|
|
6137
6137
|
includeInValue: (options == null ? void 0 : options.includeInValue) ?? false,
|
|
6138
6138
|
displayEagerly: (options == null ? void 0 : options.displayEagerly) ?? true
|
|
6139
6139
|
}));
|
|
6140
|
+
const spacer = nonInputs(" ")[0];
|
|
6140
6141
|
const alphaInputs = (length, optional = false) => makeArrayOfRepeatedObjects(length, {
|
|
6141
6142
|
type: "input",
|
|
6142
6143
|
allow: /[A-Za-z]/,
|
|
@@ -6244,7 +6245,7 @@ const businessRegistrationNumberMasks = {
|
|
|
6244
6245
|
},
|
|
6245
6246
|
[CountryCodes.Finland]: {
|
|
6246
6247
|
default: {
|
|
6247
|
-
mask: makeMask(...numericInputs(
|
|
6248
|
+
mask: makeMask(...numericInputs(7), ...nonInputs(" - "), ...numericInputs(1))
|
|
6248
6249
|
}
|
|
6249
6250
|
},
|
|
6250
6251
|
[CountryCodes.France]: {
|
|
@@ -6324,7 +6325,15 @@ const businessRegistrationNumberMasks = {
|
|
|
6324
6325
|
default: {
|
|
6325
6326
|
mask: makeMask(...nonInputs("FL", {
|
|
6326
6327
|
includeInValue: true
|
|
6327
|
-
}),
|
|
6328
|
+
}), spacer, ...nonInputs("-", {
|
|
6329
|
+
includeInValue: true
|
|
6330
|
+
}), spacer, ...numericInputs(4), spacer, ...nonInputs(".", {
|
|
6331
|
+
includeInValue: true
|
|
6332
|
+
}), spacer, ...numericInputs(3), spacer, ...nonInputs(".", {
|
|
6333
|
+
includeInValue: true
|
|
6334
|
+
}), spacer, ...numericInputs(3), spacer, ...nonInputs("-", {
|
|
6335
|
+
includeInValue: true
|
|
6336
|
+
}), spacer, ...numericInputs(1))
|
|
6328
6337
|
}
|
|
6329
6338
|
},
|
|
6330
6339
|
[CountryCodes.Lithuania]: {
|
|
@@ -6388,7 +6397,11 @@ const businessRegistrationNumberMasks = {
|
|
|
6388
6397
|
},
|
|
6389
6398
|
[CountryCodes.Romania]: {
|
|
6390
6399
|
default: {
|
|
6391
|
-
mask: makeMask(...alphaInputs(1), ...numericInputs(2),
|
|
6400
|
+
mask: makeMask(...alphaInputs(1), ...numericInputs(2), spacer, ...nonInputs("/", {
|
|
6401
|
+
includeInValue: true
|
|
6402
|
+
}), spacer, ...numericInputs(1), ...numericInputs(8, true), spacer, ...nonInputs("/", {
|
|
6403
|
+
includeInValue: true
|
|
6404
|
+
}), spacer, ...numericInputs(4)),
|
|
6392
6405
|
transformOnType: uppercase
|
|
6393
6406
|
}
|
|
6394
6407
|
},
|
|
@@ -6430,6 +6443,9 @@ const businessRegistrationNumberMasks = {
|
|
|
6430
6443
|
default: {
|
|
6431
6444
|
mask: makeMask(...alphanumericInputs(8)),
|
|
6432
6445
|
transformOnType: uppercase
|
|
6446
|
+
},
|
|
6447
|
+
nonProfit: {
|
|
6448
|
+
mask: makeMask(...numericInputs(6), ...numericInputs(1, true))
|
|
6433
6449
|
}
|
|
6434
6450
|
},
|
|
6435
6451
|
[CountryCodes.UnitedStates]: {
|
|
@@ -6478,7 +6494,7 @@ const businessRegistrationNumberPatterns = {
|
|
|
6478
6494
|
soleProprietorship: /^\d{8}$/
|
|
6479
6495
|
},
|
|
6480
6496
|
[CountryCodes.Cyprus]: {
|
|
6481
|
-
default: /^[
|
|
6497
|
+
default: /^[A-Z]{1,2}\d{1,8}$/
|
|
6482
6498
|
},
|
|
6483
6499
|
[CountryCodes.CzechRepublic]: {
|
|
6484
6500
|
default: /^\d{8,10}$/
|
|
@@ -6490,7 +6506,7 @@ const businessRegistrationNumberPatterns = {
|
|
|
6490
6506
|
default: /^\d{8}$/
|
|
6491
6507
|
},
|
|
6492
6508
|
[CountryCodes.Finland]: {
|
|
6493
|
-
default: /^\d{
|
|
6509
|
+
default: /^\d{8}$/
|
|
6494
6510
|
},
|
|
6495
6511
|
[CountryCodes.France]: {
|
|
6496
6512
|
SIRET: /^\d{9}-?\d{5}$/,
|
|
@@ -6585,7 +6601,7 @@ const businessRegistrationNumberPatterns = {
|
|
|
6585
6601
|
default: /^\d{9}$/
|
|
6586
6602
|
},
|
|
6587
6603
|
[CountryCodes.Romania]: {
|
|
6588
|
-
default: /^
|
|
6604
|
+
default: /^[A-Z]\d{2}\/\d{1,9}\/\d{4}$/
|
|
6589
6605
|
},
|
|
6590
6606
|
[CountryCodes.Singapore]: {
|
|
6591
6607
|
default: /^[a-zA-Z0-9]{9,10}$/
|
|
@@ -6600,7 +6616,7 @@ const businessRegistrationNumberPatterns = {
|
|
|
6600
6616
|
default: /^[a-zA-Z][a-zA-Z0-9]{8}$/
|
|
6601
6617
|
},
|
|
6602
6618
|
[CountryCodes.Sweden]: {
|
|
6603
|
-
default: /^\d{
|
|
6619
|
+
default: /^\d{10}$/
|
|
6604
6620
|
},
|
|
6605
6621
|
[CountryCodes.Switzerland]: {
|
|
6606
6622
|
default: /^CHE\d{9}$|^CH\d{11}$/
|
|
@@ -6760,7 +6776,7 @@ const defaultFieldConfig = {
|
|
|
6760
6776
|
helperText: {
|
|
6761
6777
|
key: "enterAMaximumOfNCharactersWithAMixForExample",
|
|
6762
6778
|
values: {
|
|
6763
|
-
|
|
6779
|
+
maxChars: "9",
|
|
6764
6780
|
example: "T1001a, FN89060n"
|
|
6765
6781
|
}
|
|
6766
6782
|
}
|
|
@@ -7139,7 +7155,7 @@ const defaultFieldConfig = {
|
|
|
7139
7155
|
values: {
|
|
7140
7156
|
minChars: "8",
|
|
7141
7157
|
maxChars: "11",
|
|
7142
|
-
example: "
|
|
7158
|
+
example: "8732P92873"
|
|
7143
7159
|
}
|
|
7144
7160
|
}
|
|
7145
7161
|
} : {
|
|
@@ -7260,7 +7276,7 @@ const defaultFieldConfig = {
|
|
|
7260
7276
|
helperText: {
|
|
7261
7277
|
key: "enterAMaximumOfNMoreDigitsForExample",
|
|
7262
7278
|
values: {
|
|
7263
|
-
|
|
7279
|
+
maxDigits: "15",
|
|
7264
7280
|
example: "J40/8302/1997"
|
|
7265
7281
|
}
|
|
7266
7282
|
}
|
|
@@ -7272,8 +7288,8 @@ const defaultFieldConfig = {
|
|
|
7272
7288
|
helperText: {
|
|
7273
7289
|
key: "enterXToYCharactersWithAMixForExample",
|
|
7274
7290
|
values: {
|
|
7275
|
-
|
|
7276
|
-
|
|
7291
|
+
minChars: "9",
|
|
7292
|
+
maxChars: "10",
|
|
7277
7293
|
example: "200312345A"
|
|
7278
7294
|
}
|
|
7279
7295
|
}
|
|
@@ -7338,16 +7354,37 @@ const defaultFieldConfig = {
|
|
|
7338
7354
|
}
|
|
7339
7355
|
}
|
|
7340
7356
|
},
|
|
7341
|
-
[CountryCodes.UnitedKingdom]: {
|
|
7342
|
-
|
|
7343
|
-
|
|
7344
|
-
|
|
7345
|
-
|
|
7346
|
-
|
|
7347
|
-
|
|
7348
|
-
|
|
7349
|
-
|
|
7350
|
-
|
|
7357
|
+
[CountryCodes.UnitedKingdom]: ({
|
|
7358
|
+
companyType: companyType2
|
|
7359
|
+
}) => {
|
|
7360
|
+
switch (companyType2) {
|
|
7361
|
+
case "nonProfit":
|
|
7362
|
+
return {
|
|
7363
|
+
label: "charityNumber",
|
|
7364
|
+
mask: businessRegistrationNumberMasks[CountryCodes.UnitedKingdom].nonProfit,
|
|
7365
|
+
validators: validatePatternOnBlur(businessRegistrationNumberPatterns[CountryCodes.UnitedKingdom].nonProfit),
|
|
7366
|
+
helperText: {
|
|
7367
|
+
key: "enterXToYDigitsForExample",
|
|
7368
|
+
values: {
|
|
7369
|
+
minDigits: "6",
|
|
7370
|
+
maxDigits: "7",
|
|
7371
|
+
example: "123456"
|
|
7372
|
+
}
|
|
7373
|
+
}
|
|
7374
|
+
};
|
|
7375
|
+
default:
|
|
7376
|
+
return {
|
|
7377
|
+
label: "companyNumber",
|
|
7378
|
+
mask: businessRegistrationNumberMasks[CountryCodes.UnitedKingdom].default,
|
|
7379
|
+
validators: validatePatternOnBlur(businessRegistrationNumberPatterns[CountryCodes.UnitedKingdom].default),
|
|
7380
|
+
helperText: {
|
|
7381
|
+
key: "enterNCharactersForExample",
|
|
7382
|
+
values: {
|
|
7383
|
+
numChars: "8",
|
|
7384
|
+
example: "43668490"
|
|
7385
|
+
}
|
|
7386
|
+
}
|
|
7387
|
+
};
|
|
7351
7388
|
}
|
|
7352
7389
|
},
|
|
7353
7390
|
[CountryCodes.UnitedStates]: {}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { InputToken, Mask, MaskToken, NonInputToken } from './maskTypes';
|
|
2
2
|
export declare const nonInputs: (str: string, options?: Partial<NonInputToken>) => NonInputToken[];
|
|
3
|
+
export declare const spacer: NonInputToken;
|
|
3
4
|
export declare const alphaInputs: (length: number, optional?: boolean) => InputToken[];
|
|
4
5
|
export declare const numericInputs: (length: number, optional?: boolean) => InputToken[];
|
|
5
6
|
export declare const alphanumericInputs: (length: number, optional?: boolean) => InputToken[];
|
|
@@ -247,6 +247,9 @@ export declare const businessRegistrationNumberMasks: {
|
|
|
247
247
|
mask: import("../maskTypes").Mask;
|
|
248
248
|
transformOnType: import("../transformers/types").InputTransformer;
|
|
249
249
|
};
|
|
250
|
+
nonProfit: {
|
|
251
|
+
mask: import("../maskTypes").Mask;
|
|
252
|
+
};
|
|
250
253
|
};
|
|
251
254
|
US: {
|
|
252
255
|
default: {
|