@adyen/adyen-web 5.31.0 → 5.31.1

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.
@@ -1,6 +1,6 @@
1
1
  import { ValidatorRules } from '../../../utils/Validator/types';
2
2
  export declare const bacsValidationRules: ValidatorRules;
3
3
  export declare const bacsFormatters: {
4
- bankAccountNumber: (value: any) => any;
5
- bankLocationId: (value: any) => any;
4
+ bankAccountNumber: import("../../../utils/Formatters/types").FormatterFn;
5
+ bankLocationId: import("../../../utils/Formatters/types").FormatterFn;
6
6
  };
@@ -1,7 +1,8 @@
1
1
  import { h } from 'preact';
2
- export default function ConsentCheckbox({ errorMessage, label, onChange, ...props }: {
2
+ export default function ConsentCheckbox({ errorMessage, label, onChange, i18n, ...props }: {
3
3
  [x: string]: any;
4
4
  errorMessage: any;
5
5
  label: any;
6
6
  onChange: any;
7
+ i18n: any;
7
8
  }): h.JSX.Element;
@@ -11,7 +11,7 @@ export declare const ENCRYPTED_BANK_LOCATION_FIELD = "encryptedBankLocationId";
11
11
  export declare const ENCRYPTED_SECURITY_CODE_3_DIGITS = "encryptedSecurityCode3digits";
12
12
  export declare const ENCRYPTED_SECURITY_CODE_4_DIGITS = "encryptedSecurityCode4digits";
13
13
  export declare const GIFT_CARD = "giftcard";
14
- export declare const SF_VERSION = "4.3.2";
14
+ export declare const SF_VERSION = "4.3.3";
15
15
  export declare const DEFAULT_CARD_GROUP_TYPES: string[];
16
16
  export declare const NON_CREDIT_CARD_TYPE_SECURED_FIELDS: string[];
17
17
  export declare const CREDIT_CARD_SF_FIELDS: string[];
@@ -0,0 +1,2 @@
1
+ import { FormatterFn } from "./types";
2
+ export declare const digitsOnlyFormatter: FormatterFn;
@@ -0,0 +1,7 @@
1
+ export declare type FormatterFn = (value: string, context?: {
2
+ state: {
3
+ data: {
4
+ country?: string;
5
+ };
6
+ };
7
+ }) => string;
@@ -1,4 +1,5 @@
1
1
  import { ValidationRuleResult } from './ValidationRuleResult';
2
+ import { Formatter } from '../useForm/types';
2
3
  declare type ValidatorMode = 'blur' | 'input';
3
4
  export declare type ErrorMessageObject = {
4
5
  translationKey: string;
@@ -10,14 +11,8 @@ export declare type Ruleset = {
10
11
  export declare type CountryRuleset = {
11
12
  [country: string]: Ruleset;
12
13
  };
13
- declare type FormatterFn = (value: any, context?: any) => string;
14
- export interface Format {
15
- formatter?: FormatterFn;
16
- format?: string;
17
- maxlength?: number;
18
- }
19
14
  export declare type FormatRules = {
20
- [field: string]: Format;
15
+ [field: string]: Formatter;
21
16
  };
22
17
  export declare type CountryFormatRules = {
23
18
  [country: string]: FormatRules;
@@ -1,4 +1,5 @@
1
1
  import { ValidatorRules } from '../Validator/types';
2
+ import { FormatterFn } from '../Formatters/types';
2
3
  export declare type FormState<FormSchema> = {
3
4
  schema?: string[];
4
5
  data: FormSchema;
@@ -13,8 +14,16 @@ export declare type FormState<FormSchema> = {
13
14
  };
14
15
  isValid?: boolean;
15
16
  };
17
+ export interface Formatter {
18
+ formatterFn?: FormatterFn;
19
+ format?: string;
20
+ maxlength?: number;
21
+ }
16
22
  export declare type FormProps = {
17
23
  rules?: ValidatorRules;
24
+ formatters?: {
25
+ [key: string]: Formatter | Function;
26
+ };
18
27
  [key: string]: any;
19
28
  };
20
29
  export interface Form<FormSchema> extends FormState<FormSchema> {
package/package.json CHANGED
@@ -23,7 +23,7 @@
23
23
  "./dist/adyen.css": "./dist/adyen.css",
24
24
  "./package.json": "./package.json"
25
25
  },
26
- "version": "5.31.0",
26
+ "version": "5.31.1",
27
27
  "license": "MIT",
28
28
  "homepage": "https://docs.adyen.com/checkout",
29
29
  "repository": "github:Adyen/adyen-web",