@adyen/adyen-web 5.10.0 → 5.11.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 +3 -0
- package/dist/types/components/Card/Card.d.ts +4 -5
- package/dist/types/components/Card/components/CardInput/components/AvailableBrands/AvailableBrands.d.ts +10 -0
- package/dist/types/components/Card/components/CardInput/components/AvailableBrands/index.d.ts +1 -0
- package/dist/types/components/Card/components/CardInput/components/CardFields.d.ts +1 -1
- package/dist/types/components/Card/components/CardInput/components/CardFieldsWrapper.d.ts +3 -1
- package/dist/types/components/Card/components/CardInput/components/types.d.ts +3 -1
- package/dist/types/components/Card/components/CardInput/types.d.ts +3 -1
- package/dist/types/components/Card/components/CardInput/utils.d.ts +1 -0
- package/dist/types/components/Card/types.d.ts +15 -3
- package/dist/types/components/Dropin/components/PaymentMethod/PaymentMethodBrands/CompactView.d.ts +8 -0
- package/dist/types/components/Dropin/components/PaymentMethod/PaymentMethodBrands/PaymentMethodBrands.d.ts +10 -0
- package/dist/types/components/Dropin/components/PaymentMethod/PaymentMethodBrands/index.d.ts +1 -0
- package/dist/types/components/Dropin/components/PaymentMethod/PaymentMethodItem.d.ts +2 -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
|
+
showBrandsUnderCardNumber: boolean;
|
|
8
9
|
SRConfig: {};
|
|
9
10
|
};
|
|
10
11
|
/**
|
|
@@ -43,6 +44,8 @@ declare class BancontactElement extends CardElement {
|
|
|
43
44
|
};
|
|
44
45
|
brand?: string;
|
|
45
46
|
brands?: string[];
|
|
47
|
+
showBrandsUnderCardNumber?: boolean;
|
|
48
|
+
showBrandIcon?: boolean;
|
|
46
49
|
enableStoreDetails?: boolean;
|
|
47
50
|
hideCVC?: boolean;
|
|
48
51
|
hasHolderName?: 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
|
+
showBrandsUnderCardNumber: boolean;
|
|
9
10
|
SRConfig: {};
|
|
10
11
|
};
|
|
11
12
|
setComponentRef: (ref: any) => void;
|
|
@@ -38,6 +39,8 @@ export declare class CardElement extends UIElement<CardElementProps> {
|
|
|
38
39
|
};
|
|
39
40
|
brand?: string;
|
|
40
41
|
brands?: string[];
|
|
42
|
+
showBrandsUnderCardNumber?: boolean;
|
|
43
|
+
showBrandIcon?: boolean;
|
|
41
44
|
enableStoreDetails?: boolean;
|
|
42
45
|
hideCVC?: boolean;
|
|
43
46
|
hasHolderName?: boolean;
|
|
@@ -46,11 +49,7 @@ export declare class CardElement extends UIElement<CardElementProps> {
|
|
|
46
49
|
onFieldValid?: (event: import("../internal/SecuredFields/lib/types").CbObjOnFieldValid) => void;
|
|
47
50
|
onBrand?: (event: import("../internal/SecuredFields/lib/types").CbObjOnBrand) => void;
|
|
48
51
|
onError?: (event: import("../internal/SecuredFields/lib/types").CbObjOnError) => void;
|
|
49
|
-
onFocus?: (event: import("../internal/SecuredFields/lib/types").CbObjOnFocus) => void;
|
|
50
|
-
* this.props.brand is never set for the generic card only for a 'dedicated' single-branded card e.g. bcmc
|
|
51
|
-
* this.state.selectedBrandValue will be set when /binLookup detects a single brand &/or when /binLookup detects a dual-branded card and
|
|
52
|
-
* the shopper makes a brand selection
|
|
53
|
-
*/
|
|
52
|
+
onFocus?: (event: import("../internal/SecuredFields/lib/types").CbObjOnFocus) => void;
|
|
54
53
|
onBinValue?: (event: import("../internal/SecuredFields/lib/types").CbObjOnBinValue) => void;
|
|
55
54
|
onBinLookup?: (event: CbObjOnBinLookup) => void;
|
|
56
55
|
session?: {
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { h } from 'preact';
|
|
2
|
+
import './AvailableBrands.scss';
|
|
3
|
+
import { BrandConfiguration } from '../../../../types';
|
|
4
|
+
declare type AvailableBrands = Array<BrandConfiguration>;
|
|
5
|
+
interface PaymentMethodBrandsProps {
|
|
6
|
+
brands: AvailableBrands;
|
|
7
|
+
activeBrand: string;
|
|
8
|
+
}
|
|
9
|
+
declare const AvailableBrands: ({ brands, activeBrand }: PaymentMethodBrandsProps) => h.JSX.Element;
|
|
10
|
+
export default AvailableBrands;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './AvailableBrands';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { h } from 'preact';
|
|
2
2
|
import { CardFieldsProps } from './types';
|
|
3
|
-
export default function CardFields({ brand, brandsConfiguration, dualBrandingElements, dualBrandingChangeHandler, dualBrandingSelected, errors, focusedElement, hasCVC, cvcPolicy, expiryDatePolicy, onFocusField, showBrandIcon, valid }: CardFieldsProps): h.JSX.Element;
|
|
3
|
+
export default function CardFields({ brand, brandsIcons, brandsConfiguration, dualBrandingElements, dualBrandingChangeHandler, dualBrandingSelected, errors, focusedElement, hasCVC, cvcPolicy, expiryDatePolicy, onFocusField, showBrandIcon, showBrandsUnderCardNumber, valid }: CardFieldsProps): h.JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { h } from 'preact';
|
|
2
|
-
export declare const CardFieldsWrapper: ({ data, valid, errors, handleChangeFor, sfpState, setFocusOn, collateErrors, errorFieldId, cvcPolicy, focusedElement, hasInstallments, handleInstallments, showAmountsInInstallments, mergedSRErrors, moveFocus, showPanel, handleErrorPanelFocus, formData, formErrors, formValid, expiryDatePolicy, dualBrandSelectElements, extensions, selectedBrandValue, showKCP, showBrazilianSSN, socialSecurityNumber, handleOnStoreDetails, billingAddress, handleAddress, billingAddressRef, amount, billingAddressRequired, billingAddressRequiredFields, billingAddressAllowedCountries, brandsConfiguration, enableStoreDetails, hasCVC, hasHolderName, holderNameRequired, installmentOptions, placeholders, positionHolderNameOnTop, showBrandIcon }: {
|
|
2
|
+
export declare const CardFieldsWrapper: ({ data, valid, errors, handleChangeFor, sfpState, setFocusOn, collateErrors, errorFieldId, cvcPolicy, focusedElement, hasInstallments, handleInstallments, showAmountsInInstallments, brandsIcons, mergedSRErrors, moveFocus, showPanel, handleErrorPanelFocus, formData, formErrors, formValid, expiryDatePolicy, dualBrandSelectElements, extensions, selectedBrandValue, showKCP, showBrazilianSSN, socialSecurityNumber, handleOnStoreDetails, billingAddress, handleAddress, billingAddressRef, amount, billingAddressRequired, billingAddressRequiredFields, billingAddressAllowedCountries, brandsConfiguration, enableStoreDetails, hasCVC, hasHolderName, holderNameRequired, installmentOptions, placeholders, positionHolderNameOnTop, showBrandIcon, showBrandsUnderCardNumber }: {
|
|
3
3
|
data: any;
|
|
4
4
|
valid: any;
|
|
5
5
|
errors: any;
|
|
@@ -13,6 +13,7 @@ export declare const CardFieldsWrapper: ({ data, valid, errors, handleChangeFor,
|
|
|
13
13
|
hasInstallments: any;
|
|
14
14
|
handleInstallments: any;
|
|
15
15
|
showAmountsInInstallments: any;
|
|
16
|
+
brandsIcons: any;
|
|
16
17
|
mergedSRErrors: any;
|
|
17
18
|
moveFocus: any;
|
|
18
19
|
showPanel: any;
|
|
@@ -44,4 +45,5 @@ export declare const CardFieldsWrapper: ({ data, valid, errors, handleChangeFor,
|
|
|
44
45
|
placeholders: any;
|
|
45
46
|
positionHolderNameOnTop: any;
|
|
46
47
|
showBrandIcon: any;
|
|
48
|
+
showBrandsUnderCardNumber: any;
|
|
47
49
|
}) => h.JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PaymentAmount } from '../../../../../types';
|
|
2
|
-
import { CardBrandsConfiguration } from '../../../types';
|
|
2
|
+
import { BrandConfiguration, CardBrandsConfiguration } from '../../../types';
|
|
3
3
|
import { ComponentChildren } from 'preact';
|
|
4
4
|
import { CVCPolicyType, DatePolicyType } from '../../../../internal/SecuredFields/lib/types';
|
|
5
5
|
export interface BrandIconProps {
|
|
@@ -8,6 +8,7 @@ export interface BrandIconProps {
|
|
|
8
8
|
}
|
|
9
9
|
export interface CardFieldsProps {
|
|
10
10
|
brand?: string;
|
|
11
|
+
brandsIcons?: Array<BrandConfiguration>;
|
|
11
12
|
brandsConfiguration?: CardBrandsConfiguration;
|
|
12
13
|
dualBrandingChangeHandler?: any;
|
|
13
14
|
dualBrandingElements?: any;
|
|
@@ -19,6 +20,7 @@ export interface CardFieldsProps {
|
|
|
19
20
|
expiryDatePolicy?: DatePolicyType;
|
|
20
21
|
onFocusField?: any;
|
|
21
22
|
showBrandIcon?: boolean;
|
|
23
|
+
showBrandsUnderCardNumber: boolean;
|
|
22
24
|
valid?: any;
|
|
23
25
|
}
|
|
24
26
|
export interface CardHolderNameProps {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import Language from '../../../../language/Language';
|
|
2
|
-
import { BinLookupResponse, CardBrandsConfiguration, CardConfiguration, DualBrandSelectElement } from '../../types';
|
|
2
|
+
import { BinLookupResponse, BrandConfiguration, CardBrandsConfiguration, CardConfiguration, DualBrandSelectElement } from '../../types';
|
|
3
3
|
import { PaymentAmount } from '../../../../types';
|
|
4
4
|
import { InstallmentOptions } from './components/types';
|
|
5
5
|
import { ValidationResult } from '../../../internal/PersonalDetails/types';
|
|
@@ -52,6 +52,7 @@ export interface CardInputProps {
|
|
|
52
52
|
brand?: string;
|
|
53
53
|
brands?: string[];
|
|
54
54
|
brandsConfiguration?: CardBrandsConfiguration;
|
|
55
|
+
brandsIcons: Array<BrandConfiguration>;
|
|
55
56
|
clientKey: string;
|
|
56
57
|
configuration?: CardConfiguration;
|
|
57
58
|
countryCode?: string;
|
|
@@ -90,6 +91,7 @@ export interface CardInputProps {
|
|
|
90
91
|
placeholders?: Placeholders;
|
|
91
92
|
positionHolderNameOnTop?: boolean;
|
|
92
93
|
setComponentRef?: (ref: any) => void;
|
|
94
|
+
showBrandsUnderCardNumber: boolean;
|
|
93
95
|
showBrandIcon?: boolean;
|
|
94
96
|
showInstallmentAmounts?: boolean;
|
|
95
97
|
showPayButton?: boolean;
|
|
@@ -19,6 +19,16 @@ export interface CardElementProps extends UIElementProps {
|
|
|
19
19
|
type?: string;
|
|
20
20
|
/** List of brands accepted by the component */
|
|
21
21
|
brands?: string[];
|
|
22
|
+
/**
|
|
23
|
+
* Show/hide available card brands under the Card number field
|
|
24
|
+
* @defaultValue `false`
|
|
25
|
+
*/
|
|
26
|
+
showBrandsUnderCardNumber?: boolean;
|
|
27
|
+
/**
|
|
28
|
+
* Show/hide the brand logo when the card brand has been recognized
|
|
29
|
+
* @defaultValue `true`
|
|
30
|
+
*/
|
|
31
|
+
showBrandIcon?: boolean;
|
|
22
32
|
/** Show/hide the "store details" checkbox */
|
|
23
33
|
enableStoreDetails?: boolean;
|
|
24
34
|
/** Show/hide the CVC field - merchant set config option */
|
|
@@ -86,10 +96,12 @@ export interface CardConfiguration {
|
|
|
86
96
|
icon?: string;
|
|
87
97
|
brandsConfiguration?: CardBrandsConfiguration;
|
|
88
98
|
}
|
|
99
|
+
export interface BrandConfiguration {
|
|
100
|
+
name: string;
|
|
101
|
+
icon?: string;
|
|
102
|
+
}
|
|
89
103
|
export interface CardBrandsConfiguration {
|
|
90
|
-
[key: string]:
|
|
91
|
-
icon?: string;
|
|
92
|
-
};
|
|
104
|
+
[key: string]: BrandConfiguration;
|
|
93
105
|
}
|
|
94
106
|
interface CardPaymentMethodData {
|
|
95
107
|
type: string;
|
package/dist/types/components/Dropin/components/PaymentMethod/PaymentMethodBrands/CompactView.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { h } from 'preact';
|
|
2
|
+
import { BrandConfiguration } from '../../../../Card/types';
|
|
3
|
+
interface CompactViewProps {
|
|
4
|
+
brands: Array<BrandConfiguration>;
|
|
5
|
+
isPaymentMethodSelected: boolean;
|
|
6
|
+
}
|
|
7
|
+
declare const CompactView: ({ brands, isPaymentMethodSelected }: CompactViewProps) => h.JSX.Element;
|
|
8
|
+
export default CompactView;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { h } from 'preact';
|
|
2
|
+
import { BrandConfiguration } from '../../../../Card/types';
|
|
3
|
+
interface PaymentMethodBrandsProps {
|
|
4
|
+
brands: Array<BrandConfiguration>;
|
|
5
|
+
isPaymentMethodSelected: boolean;
|
|
6
|
+
activeBrand?: string;
|
|
7
|
+
isCompactView?: boolean;
|
|
8
|
+
}
|
|
9
|
+
declare const PaymentMethodBrands: ({ activeBrand, brands, isPaymentMethodSelected, isCompactView }: PaymentMethodBrandsProps) => h.JSX.Element;
|
|
10
|
+
export default PaymentMethodBrands;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './PaymentMethodBrands';
|
|
@@ -24,6 +24,7 @@ declare class PaymentMethodItem extends Component<PaymentMethodItemProps> {
|
|
|
24
24
|
};
|
|
25
25
|
state: {
|
|
26
26
|
showDisableStoredPaymentMethodConfirmation: boolean;
|
|
27
|
+
activeBrand: any;
|
|
27
28
|
};
|
|
28
29
|
isMouseDown: boolean;
|
|
29
30
|
onFocus: () => void;
|
|
@@ -43,7 +44,7 @@ declare class PaymentMethodItem extends Component<PaymentMethodItemProps> {
|
|
|
43
44
|
onSelect: any;
|
|
44
45
|
standalone: any;
|
|
45
46
|
}, { activeBrand }: {
|
|
46
|
-
activeBrand
|
|
47
|
+
activeBrand: any;
|
|
47
48
|
}): h.JSX.Element;
|
|
48
49
|
}
|
|
49
50
|
export default PaymentMethodItem;
|
package/package.json
CHANGED