@adyen/adyen-web 5.5.0 → 5.6.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/adyen.css +2 -1
- package/dist/adyen.css.map +1 -1
- package/dist/adyen.js +1 -1
- package/dist/adyen.js.map +1 -1
- package/dist/cjs/adyen.css +2 -1
- package/dist/cjs/adyen.css.map +1 -1
- package/dist/cjs/index.js +1 -1
- package/dist/es/adyen.css +2 -1
- package/dist/es/adyen.css.map +1 -1
- package/dist/es/index.js +1 -1
- package/dist/es.modern/adyen.css +2 -1
- package/dist/es.modern/adyen.css.map +1 -1
- package/dist/es.modern/index.js +1 -1
- package/dist/types/components/Card/Bancontact.d.ts +6 -0
- package/dist/types/components/Card/Card.d.ts +6 -0
- package/dist/types/components/Card/components/CardInput/CardInput.d.ts +1 -0
- package/dist/types/components/Card/components/CardInput/defaultProps.d.ts +1 -0
- package/dist/types/components/Card/components/CardInput/layouts.d.ts +9 -0
- package/dist/types/components/Card/components/CardInput/types.d.ts +39 -0
- package/dist/types/components/Card/components/CardInput/utils.d.ts +4 -0
- package/dist/types/components/Card/types.d.ts +1 -1
- package/dist/types/components/internal/Address/Specifications.d.ts +7 -1
- package/dist/types/components/internal/Address/types.d.ts +5 -6
- package/dist/types/components/internal/FormFields/Field/Field.d.ts +2 -1
- package/dist/types/components/internal/FormFields/Field/types.d.ts +1 -0
- package/dist/types/components/internal/FormFields/Select/Select.d.ts +1 -1
- package/dist/types/components/internal/FormFields/Select/types.d.ts +1 -0
- package/dist/types/components/internal/SecuredFields/lib/configuration/constants.d.ts +3 -2
- package/dist/types/components/internal/SecuredFields/lib/core/AbstractSecuredField.d.ts +1 -0
- package/dist/types/components/internal/SecuredFields/lib/types.d.ts +1 -0
- package/dist/types/components/internal/SocialSecurityNumberBrazil/SocialSecurityNumberBrazil.d.ts +2 -1
- package/dist/types/core/Context/CoreContext.d.ts +2 -0
- package/dist/types/core/Context/CoreProvider.d.ts +4 -0
- package/dist/types/core/Context/useCoreContext.d.ts +1 -0
- package/dist/types/core/Errors/ErrorPanel.d.ts +14 -0
- package/dist/types/utils/Validator/Validator.d.ts +1 -1
- package/package.json +1 -1
|
@@ -5,6 +5,7 @@ declare class BancontactElement extends CardElement {
|
|
|
5
5
|
protected static defaultProps: {
|
|
6
6
|
brands: string[];
|
|
7
7
|
onBinLookup: () => void;
|
|
8
|
+
SRConfig: {};
|
|
8
9
|
};
|
|
9
10
|
/**
|
|
10
11
|
* Now that the Bancontact (BCMC) Card component can accept a number dual branded with Visa (which requires a CVC) it has to be handled differently
|
|
@@ -24,6 +25,11 @@ declare class BancontactElement extends CardElement {
|
|
|
24
25
|
};
|
|
25
26
|
brandsConfiguration: import("./types").CardBrandsConfiguration;
|
|
26
27
|
icon: string;
|
|
28
|
+
SRConfig: {
|
|
29
|
+
collateErrors: any;
|
|
30
|
+
moveFocus: any;
|
|
31
|
+
showPanel: any;
|
|
32
|
+
};
|
|
27
33
|
groupTypes: string[];
|
|
28
34
|
holderNameRequired: boolean;
|
|
29
35
|
hasCVC: boolean;
|
|
@@ -6,6 +6,7 @@ export declare class CardElement extends UIElement<CardElementProps> {
|
|
|
6
6
|
static type: string;
|
|
7
7
|
protected static defaultProps: {
|
|
8
8
|
onBinLookup: () => void;
|
|
9
|
+
SRConfig: {};
|
|
9
10
|
};
|
|
10
11
|
formatProps(props: CardElementProps): {
|
|
11
12
|
type: string;
|
|
@@ -18,6 +19,11 @@ export declare class CardElement extends UIElement<CardElementProps> {
|
|
|
18
19
|
};
|
|
19
20
|
brandsConfiguration: import("./types").CardBrandsConfiguration;
|
|
20
21
|
icon: string;
|
|
22
|
+
SRConfig: {
|
|
23
|
+
collateErrors: any;
|
|
24
|
+
moveFocus: any;
|
|
25
|
+
showPanel: any;
|
|
26
|
+
};
|
|
21
27
|
groupTypes: string[];
|
|
22
28
|
holderNameRequired: boolean;
|
|
23
29
|
hasCVC: boolean;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const CREDIT_CARD: string[];
|
|
2
|
+
export declare const CREDIT_CARD_NAME_TOP: string[];
|
|
3
|
+
export declare const CREDIT_CARD_NAME_BOTTOM: string[];
|
|
4
|
+
export declare const KCP_CARD: string[];
|
|
5
|
+
export declare const KCP_CARD_NAME_TOP: string[];
|
|
6
|
+
export declare const KCP_CARD_NAME_BOTTOM: string[];
|
|
7
|
+
export declare const SSN_CARD: string[];
|
|
8
|
+
export declare const SSN_CARD_NAME_TOP: string[];
|
|
9
|
+
export declare const SSN_CARD_NAME_BOTTOM: string[];
|
|
@@ -4,6 +4,9 @@ import { PaymentAmount } from '../../../../types';
|
|
|
4
4
|
import { InstallmentOptions } from './components/types';
|
|
5
5
|
import { ValidationResult } from '../../../internal/PersonalDetails/types';
|
|
6
6
|
import { CVCPolicyType, DatePolicyType } from '../../../internal/SecuredFields/lib/core/AbstractSecuredField';
|
|
7
|
+
import { ValidationRuleResult } from '../../../../utils/Validator/Validator';
|
|
8
|
+
import Specifications from '../../../internal/Address/Specifications';
|
|
9
|
+
import { AddressSchema, StringObject } from '../../../internal/Address/types';
|
|
7
10
|
export interface CardInputValidState {
|
|
8
11
|
holderName?: boolean;
|
|
9
12
|
billingAddress?: boolean;
|
|
@@ -71,6 +74,8 @@ export interface CardInputProps {
|
|
|
71
74
|
onBinValue?: () => {};
|
|
72
75
|
details?: object;
|
|
73
76
|
storedDetails?: object;
|
|
77
|
+
SRConfig?: ScreenreaderConfig;
|
|
78
|
+
specifications?: Specifications;
|
|
74
79
|
}
|
|
75
80
|
export interface CardInputState {
|
|
76
81
|
dualBrandSelectElements: DualBrandSelectElement[];
|
|
@@ -88,4 +93,38 @@ export interface CardInputState {
|
|
|
88
93
|
issuingCountryCode: string;
|
|
89
94
|
showSocialSecurityNumber?: boolean;
|
|
90
95
|
}
|
|
96
|
+
interface ScreenreaderConfig {
|
|
97
|
+
collateErrors?: boolean;
|
|
98
|
+
moveFocus?: boolean;
|
|
99
|
+
showPanel?: boolean;
|
|
100
|
+
}
|
|
101
|
+
interface FieldError {
|
|
102
|
+
errorMessage?: string;
|
|
103
|
+
errorI18n?: string;
|
|
104
|
+
}
|
|
105
|
+
export interface ErrorObj {
|
|
106
|
+
holderName?: ValidationRuleResult;
|
|
107
|
+
socialSecurityNumber?: ValidationRuleResult;
|
|
108
|
+
taxNumber?: ValidationRuleResult;
|
|
109
|
+
billingAddress?: ValidationRuleResult;
|
|
110
|
+
encryptedCardNumber?: FieldError;
|
|
111
|
+
encryptedExpiryDate?: FieldError;
|
|
112
|
+
encryptedSecurityCode?: FieldError;
|
|
113
|
+
encryptedBankAccountNumber?: FieldError;
|
|
114
|
+
encryptedBankLocationId?: FieldError;
|
|
115
|
+
encryptedPassword?: FieldError;
|
|
116
|
+
encryptedPin?: FieldError;
|
|
117
|
+
}
|
|
118
|
+
export interface LayoutObj {
|
|
119
|
+
props: CardInputProps;
|
|
120
|
+
showKCP: boolean;
|
|
121
|
+
showBrazilianSSN: boolean;
|
|
122
|
+
countrySpecificSchemas: AddressSchema;
|
|
123
|
+
}
|
|
124
|
+
export interface SortErrorsObj {
|
|
125
|
+
errors: ErrorObj;
|
|
126
|
+
layout: string[];
|
|
127
|
+
i18n: Language;
|
|
128
|
+
countrySpecificLabels: StringObject;
|
|
129
|
+
}
|
|
91
130
|
export {};
|
|
@@ -1 +1,5 @@
|
|
|
1
|
+
import { ErrorPanelObj } from '../../../../core/Errors/ErrorPanel';
|
|
2
|
+
import { LayoutObj, SortErrorsObj } from './types';
|
|
1
3
|
export declare const getCardImageUrl: (brand: string, loadingContext: string) => string;
|
|
4
|
+
export declare const getLayout: ({ props, showKCP, showBrazilianSSN, countrySpecificSchemas }: LayoutObj) => string[];
|
|
5
|
+
export declare const sortErrorsForPanel: ({ errors, layout, i18n, countrySpecificLabels }: SortErrorsObj) => ErrorPanelObj;
|
|
@@ -108,7 +108,7 @@ export interface BrandObject {
|
|
|
108
108
|
brand: string;
|
|
109
109
|
cvcPolicy: CVCPolicyType;
|
|
110
110
|
enableLuhnCheck: boolean;
|
|
111
|
-
showExpiryDate
|
|
111
|
+
showExpiryDate?: boolean;
|
|
112
112
|
expiryDatePolicy?: DatePolicyType;
|
|
113
113
|
showSocialSecurityNumber?: boolean;
|
|
114
114
|
supported: boolean;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AddressSchema } from './types';
|
|
1
|
+
import { AddressSchema, StringObject } from './types';
|
|
2
2
|
declare class Specifications {
|
|
3
3
|
private specifications;
|
|
4
4
|
constructor(specifications?: any);
|
|
@@ -21,6 +21,12 @@ declare class Specifications {
|
|
|
21
21
|
* @returns AddressSchema
|
|
22
22
|
*/
|
|
23
23
|
getAddressSchemaForCountry(country: string): AddressSchema;
|
|
24
|
+
/**
|
|
25
|
+
* Returns the address labels of the selected country or the default address labels.
|
|
26
|
+
* @param country - The selected country
|
|
27
|
+
* @returns StringObject
|
|
28
|
+
*/
|
|
29
|
+
getAddressLabelsForCountry(country: string): StringObject;
|
|
24
30
|
/**
|
|
25
31
|
* Returns the optional fields of the selected country or the default optional fields.
|
|
26
32
|
* @param country - The selected country
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { AddressField, AddressData } from '../../../types';
|
|
2
2
|
import Specifications from './Specifications';
|
|
3
3
|
import { ValidatorRules } from '../../../utils/Validator/Validator';
|
|
4
|
+
export declare type StringObject = {
|
|
5
|
+
[key: string]: string;
|
|
6
|
+
};
|
|
4
7
|
export interface AddressProps {
|
|
5
8
|
allowedCountries?: string[];
|
|
6
9
|
countryCode?: string;
|
|
@@ -71,13 +74,9 @@ export declare type AddressSchema = (AddressField | AddressFieldsGroup)[];
|
|
|
71
74
|
export interface AddressSpecifications {
|
|
72
75
|
[key: string]: {
|
|
73
76
|
hasDataset?: boolean;
|
|
74
|
-
labels?:
|
|
75
|
-
[key: string]: string;
|
|
76
|
-
};
|
|
77
|
+
labels?: StringObject;
|
|
77
78
|
optionalFields?: AddressField[];
|
|
78
|
-
placeholders?:
|
|
79
|
-
[key: string]: string;
|
|
80
|
-
};
|
|
79
|
+
placeholders?: StringObject;
|
|
81
80
|
schema?: AddressSchema;
|
|
82
81
|
};
|
|
83
82
|
}
|
|
@@ -13,7 +13,7 @@ declare class Field extends Component<FieldProps, FieldState> {
|
|
|
13
13
|
filled: any;
|
|
14
14
|
focused?: undefined;
|
|
15
15
|
};
|
|
16
|
-
render({ className, classNameModifiers, children, errorMessage, helper, inputWrapperModifiers, isLoading, isValid, label, dualBrandingElements, dir, name, showValidIcon }: {
|
|
16
|
+
render({ className, classNameModifiers, children, errorMessage, helper, inputWrapperModifiers, isLoading, isValid, label, dualBrandingElements, dir, name, showValidIcon, isCollatingErrors }: {
|
|
17
17
|
className?: string;
|
|
18
18
|
classNameModifiers?: any[];
|
|
19
19
|
children: any;
|
|
@@ -27,6 +27,7 @@ declare class Field extends Component<FieldProps, FieldState> {
|
|
|
27
27
|
dir: any;
|
|
28
28
|
name: any;
|
|
29
29
|
showValidIcon: any;
|
|
30
|
+
isCollatingErrors: any;
|
|
30
31
|
}): h.JSX.Element;
|
|
31
32
|
}
|
|
32
33
|
export default Field;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { h } from 'preact';
|
|
2
2
|
import { SelectProps } from './types';
|
|
3
3
|
import './Select.scss';
|
|
4
|
-
declare function Select({ items, className, classNameModifiers, filterable, readonly, onChange, selected, name, isInvalid, isValid, placeholder, uniqueId }: SelectProps): h.JSX.Element;
|
|
4
|
+
declare function Select({ items, className, classNameModifiers, filterable, readonly, onChange, selected, name, isInvalid, isValid, placeholder, uniqueId, isCollatingErrors }: SelectProps): h.JSX.Element;
|
|
5
5
|
declare namespace Select {
|
|
6
6
|
var defaultProps: {
|
|
7
7
|
className: string;
|
|
@@ -11,10 +11,11 @@ export declare const ENCRYPTED_PIN_FIELD = "encryptedPin";
|
|
|
11
11
|
export declare const GIFT_CARD = "giftcard";
|
|
12
12
|
export declare const ENCRYPTED_BANK_ACCNT_NUMBER_FIELD = "encryptedBankAccountNumber";
|
|
13
13
|
export declare const ENCRYPTED_BANK_LOCATION_FIELD = "encryptedBankLocationId";
|
|
14
|
-
export declare const SF_VERSION = "3.7.
|
|
14
|
+
export declare const SF_VERSION = "3.7.4";
|
|
15
15
|
export declare const DEFAULT_CARD_GROUP_TYPES: string[];
|
|
16
16
|
export declare const NON_CREDIT_CARD_TYPE_SECURED_FIELDS: string[];
|
|
17
|
-
export declare const
|
|
17
|
+
export declare const SF_FIELDS_ARRAY: string[];
|
|
18
|
+
export declare const ALL_SECURED_FIELDS: string[];
|
|
18
19
|
export declare const REQUIRED = "required";
|
|
19
20
|
export declare const OPTIONAL = "optional";
|
|
20
21
|
export declare const HIDDEN = "hidden";
|
package/dist/types/components/internal/SocialSecurityNumberBrazil/SocialSecurityNumberBrazil.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { h } from 'preact';
|
|
2
|
-
export default function ({ onChange, onInput, valid, error, data }: {
|
|
2
|
+
export default function ({ onChange, onInput, valid, error, data, required }: {
|
|
3
3
|
onChange: any;
|
|
4
4
|
onInput: any;
|
|
5
5
|
valid?: boolean;
|
|
6
6
|
error?: any;
|
|
7
7
|
data?: string;
|
|
8
|
+
required?: boolean;
|
|
8
9
|
}): h.JSX.Element;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { h } from 'preact';
|
|
2
|
+
import './ErrorPanel.scss';
|
|
3
|
+
export interface ErrorPanelObj {
|
|
4
|
+
errorMessages: string[];
|
|
5
|
+
fieldList: string[];
|
|
6
|
+
}
|
|
7
|
+
export interface ErrorPanelProps {
|
|
8
|
+
id?: string;
|
|
9
|
+
heading?: string;
|
|
10
|
+
errors: ErrorPanelObj;
|
|
11
|
+
callbackFn?: (who: any) => void;
|
|
12
|
+
showPanel?: boolean;
|
|
13
|
+
}
|
|
14
|
+
export declare function ErrorPanel({ id, heading, errors, callbackFn, showPanel }: ErrorPanelProps): h.JSX.Element;
|
package/package.json
CHANGED