@adyen/kyc-components 3.0.2 → 3.0.3

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.
@@ -6295,7 +6295,7 @@ const businessRegistrationNumberMasks = {
6295
6295
  },
6296
6296
  [CountryCodes.Finland]: {
6297
6297
  default: {
6298
- mask: makeMask(...numericInputs(8), ...nonInputs(" - "), ...numericInputs(1))
6298
+ mask: makeMask(...numericInputs(7), ...nonInputs(" - "), ...numericInputs(1))
6299
6299
  }
6300
6300
  },
6301
6301
  [CountryCodes.France]: {
@@ -6493,6 +6493,9 @@ const businessRegistrationNumberMasks = {
6493
6493
  default: {
6494
6494
  mask: makeMask(...alphanumericInputs(8)),
6495
6495
  transformOnType: uppercase
6496
+ },
6497
+ nonProfit: {
6498
+ mask: makeMask(...numericInputs(6), ...numericInputs(1, true))
6496
6499
  }
6497
6500
  },
6498
6501
  [CountryCodes.UnitedStates]: {
@@ -6553,7 +6556,7 @@ const businessRegistrationNumberPatterns = {
6553
6556
  default: /^\d{8}$/
6554
6557
  },
6555
6558
  [CountryCodes.Finland]: {
6556
- default: /^\d{7}-?\d$/
6559
+ default: /^\d{8}$/
6557
6560
  },
6558
6561
  [CountryCodes.France]: {
6559
6562
  SIRET: /^\d{9}-?\d{5}$/,
@@ -6663,7 +6666,7 @@ const businessRegistrationNumberPatterns = {
6663
6666
  default: /^[a-zA-Z][a-zA-Z0-9]{8}$/
6664
6667
  },
6665
6668
  [CountryCodes.Sweden]: {
6666
- default: /^\d{6}-\d{4}$/
6669
+ default: /^\d{10}$/
6667
6670
  },
6668
6671
  [CountryCodes.Switzerland]: {
6669
6672
  default: /^CHE\d{9}$|^CH\d{11}$/
@@ -7202,7 +7205,7 @@ const defaultFieldConfig = {
7202
7205
  values: {
7203
7206
  minChars: "8",
7204
7207
  maxChars: "11",
7205
- example: "8732PN92873"
7208
+ example: "8732P92873"
7206
7209
  }
7207
7210
  }
7208
7211
  } : {
@@ -7401,16 +7404,37 @@ const defaultFieldConfig = {
7401
7404
  }
7402
7405
  }
7403
7406
  },
7404
- [CountryCodes.UnitedKingdom]: {
7405
- label: "companyNumber",
7406
- mask: businessRegistrationNumberMasks[CountryCodes.UnitedKingdom].default,
7407
- validators: validatePatternOnBlur(businessRegistrationNumberPatterns[CountryCodes.UnitedKingdom].default),
7408
- helperText: {
7409
- key: "enterNCharactersForExample",
7410
- values: {
7411
- numChars: "8",
7412
- example: "43668490"
7413
- }
7407
+ [CountryCodes.UnitedKingdom]: ({
7408
+ companyType: companyType2
7409
+ }) => {
7410
+ switch (companyType2) {
7411
+ case "nonProfit":
7412
+ return {
7413
+ label: "charityNumber",
7414
+ mask: businessRegistrationNumberMasks[CountryCodes.UnitedKingdom].nonProfit,
7415
+ validators: validatePatternOnBlur(businessRegistrationNumberPatterns[CountryCodes.UnitedKingdom].nonProfit),
7416
+ helperText: {
7417
+ key: "enterXToYDigitsForExample",
7418
+ values: {
7419
+ minDigits: "6",
7420
+ maxDigits: "7",
7421
+ example: "123456"
7422
+ }
7423
+ }
7424
+ };
7425
+ default:
7426
+ return {
7427
+ label: "companyNumber",
7428
+ mask: businessRegistrationNumberMasks[CountryCodes.UnitedKingdom].default,
7429
+ validators: validatePatternOnBlur(businessRegistrationNumberPatterns[CountryCodes.UnitedKingdom].default),
7430
+ helperText: {
7431
+ key: "enterNCharactersForExample",
7432
+ values: {
7433
+ numChars: "8",
7434
+ example: "43668490"
7435
+ }
7436
+ }
7437
+ };
7414
7438
  }
7415
7439
  },
7416
7440
  [CountryCodes.UnitedStates]: {}
@@ -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: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adyen/kyc-components",
3
- "version": "3.0.2",
3
+ "version": "3.0.3",
4
4
  "description": "",
5
5
  "license": "MIT",
6
6
  "files": [