@adyen/adyen-web 5.6.2 → 5.9.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/README.md +1 -1
- package/dist/adyen.css +3 -3
- 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 +3 -3
- package/dist/cjs/adyen.css.map +1 -1
- package/dist/cjs/index.js +1 -1
- package/dist/es/adyen.css +3 -3
- package/dist/es/adyen.css.map +1 -1
- package/dist/es/ar.js +1 -1
- package/dist/es/cs-CZ.js +1 -1
- package/dist/es/da-DK.js +1 -1
- package/dist/es/de-DE.js +1 -1
- package/dist/es/el-GR.js +1 -1
- package/dist/es/es-ES.js +1 -1
- package/dist/es/fi-FI.js +1 -1
- package/dist/es/fr-FR.js +1 -1
- package/dist/es/hr-HR.js +1 -1
- package/dist/es/hu-HU.js +1 -1
- package/dist/es/index.js +1 -1
- package/dist/es/it-IT.js +1 -1
- package/dist/es/ja-JP.js +1 -1
- package/dist/es/ko-KR.js +1 -1
- package/dist/es/nl-NL.js +1 -1
- package/dist/es/no-NO.js +1 -1
- package/dist/es/pl-PL.js +1 -1
- package/dist/es/pt-BR.js +1 -1
- package/dist/es/ro-RO.js +1 -1
- package/dist/es/ru-RU.js +1 -1
- package/dist/es/sk-SK.js +1 -1
- package/dist/es/sl-SI.js +1 -1
- package/dist/es/sv-SE.js +1 -1
- package/dist/es/zh-CN.js +1 -1
- package/dist/es/zh-TW.js +1 -1
- package/dist/es.modern/adyen.css +3 -3
- package/dist/es.modern/adyen.css.map +1 -1
- package/dist/es.modern/ar.js +1 -1
- package/dist/es.modern/cs-CZ.js +1 -1
- package/dist/es.modern/da-DK.js +1 -1
- package/dist/es.modern/de-DE.js +1 -1
- package/dist/es.modern/el-GR.js +1 -1
- package/dist/es.modern/es-ES.js +1 -1
- package/dist/es.modern/fi-FI.js +1 -1
- package/dist/es.modern/fr-FR.js +1 -1
- package/dist/es.modern/hr-HR.js +1 -1
- package/dist/es.modern/hu-HU.js +1 -1
- package/dist/es.modern/index.js +1 -1
- package/dist/es.modern/it-IT.js +1 -1
- package/dist/es.modern/ja-JP.js +1 -1
- package/dist/es.modern/ko-KR.js +1 -1
- package/dist/es.modern/nl-NL.js +1 -1
- package/dist/es.modern/no-NO.js +1 -1
- package/dist/es.modern/pl-PL.js +1 -1
- package/dist/es.modern/pt-BR.js +1 -1
- package/dist/es.modern/ro-RO.js +1 -1
- package/dist/es.modern/ru-RU.js +1 -1
- package/dist/es.modern/sk-SK.js +1 -1
- package/dist/es.modern/sl-SI.js +1 -1
- package/dist/es.modern/sv-SE.js +1 -1
- package/dist/es.modern/zh-CN.js +1 -1
- package/dist/es.modern/zh-TW.js +1 -1
- package/dist/types/components/Ach/components/AchInput/AchInput.d.ts +2 -4
- package/dist/types/components/Ach/components/AchInput/defaultProps.d.ts +0 -3
- package/dist/types/components/Ach/components/AchInput/types.d.ts +40 -0
- package/dist/types/components/AmazonPay/types.d.ts +22 -0
- package/dist/types/components/ApplePay/types.d.ts +1 -1
- package/dist/types/components/BacsDD/components/validate.d.ts +1 -1
- package/dist/types/components/Boleto/components/BoletoInput/validate.d.ts +1 -1
- package/dist/types/components/Card/Bancontact.d.ts +3 -4
- package/dist/types/components/Card/Card.d.ts +4 -4
- package/dist/types/components/Card/components/CardInput/CardInput.d.ts +2 -40
- package/dist/types/components/Card/components/CardInput/components/CardFieldsWrapper.d.ts +47 -0
- package/dist/types/components/Card/components/CardInput/components/CardHolderName.d.ts +1 -1
- package/dist/types/components/Card/components/CardInput/components/Installments/Installments.d.ts +4 -0
- package/dist/types/components/Card/components/CardInput/components/StoredCardFields.d.ts +1 -1
- package/dist/types/components/Card/components/CardInput/components/StoredCardFieldsWrapper.d.ts +16 -0
- package/dist/types/components/Card/components/CardInput/components/types.d.ts +2 -2
- package/dist/types/components/Card/components/CardInput/defaultProps.d.ts +2 -4
- package/dist/types/components/Card/components/CardInput/handlers.d.ts +9 -0
- package/dist/types/components/Card/components/CardInput/types.d.ts +49 -15
- package/dist/types/components/Card/components/CardInput/utils.d.ts +30 -2
- package/dist/types/components/Card/components/CardInput/validate.d.ts +1 -1
- package/dist/types/components/Card/types.d.ts +1 -2
- package/dist/types/components/Dropin/Dropin.d.ts +1 -1
- package/dist/types/components/Econtext/validate.d.ts +1 -1
- package/dist/types/components/Giftcard/components/GiftcardComponent.d.ts +7 -1
- package/dist/types/components/Giftcard/components/GiftcardFields.d.ts +3 -0
- package/dist/types/components/Giftcard/components/GiftcardNumberField.d.ts +3 -0
- package/dist/types/components/Giftcard/components/GiftcardPinField.d.ts +3 -0
- package/dist/types/components/Giftcard/components/types.d.ts +19 -0
- package/dist/types/components/MealVoucherFR/MealVoucherFR.d.ts +20 -0
- package/dist/types/components/MealVoucherFR/components/MealVoucherExpiryField.d.ts +3 -0
- package/dist/types/components/MealVoucherFR/components/MealVoucherFields.d.ts +3 -0
- package/dist/types/components/MealVoucherFR/index.d.ts +1 -0
- package/dist/types/components/Pix/PixInput/validate.d.ts +1 -1
- package/dist/types/components/SecuredFields/SecuredFieldsInput/SecuredFieldsInput.d.ts +31 -1
- package/dist/types/components/UIElement.d.ts +1 -1
- package/dist/types/components/index.d.ts +4 -0
- package/dist/types/components/internal/Address/components/FieldContainer.d.ts +6 -0
- package/dist/types/components/internal/Address/types.d.ts +11 -8
- package/dist/types/components/internal/Address/validate.d.ts +1 -1
- package/dist/types/components/internal/Address/validate.formats.d.ts +3 -0
- package/dist/types/components/internal/CompanyDetails/types.d.ts +1 -1
- package/dist/types/components/internal/PersonalDetails/PersonalDetails.d.ts +1 -1
- package/dist/types/components/internal/PersonalDetails/types.d.ts +1 -1
- package/dist/types/components/internal/PersonalDetails/validate.d.ts +1 -1
- package/dist/types/components/internal/SecuredFields/SFP/SecuredFieldsProvider.d.ts +3 -25
- package/dist/types/components/internal/SecuredFields/SFP/SecuredFieldsProviderHandlers.d.ts +1 -1
- package/dist/types/components/internal/SecuredFields/SFP/defaultProps.d.ts +1 -82
- package/dist/types/components/internal/SecuredFields/SFP/types.d.ts +76 -0
- package/dist/types/components/internal/SecuredFields/binLookup/extensions.d.ts +3 -1
- package/dist/types/components/internal/SecuredFields/lib/CSF/types.d.ts +2 -1
- package/dist/types/components/internal/SecuredFields/lib/CSF/utils/tabbing/utils.d.ts +1 -1
- package/dist/types/components/internal/SecuredFields/lib/configuration/constants.d.ts +6 -5
- package/dist/types/components/internal/SecuredFields/lib/securedField/AbstractSecuredField.d.ts +1 -0
- package/dist/types/components/internal/SecuredFields/lib/securedField/SecuredField.d.ts +4 -0
- package/dist/types/components/internal/SecuredFields/lib/types.d.ts +1 -0
- package/dist/types/components/internal/SecuredFields/lib/utilities/commonUtils.d.ts +1 -1
- package/dist/types/components/internal/SocialSecurityNumberBrazil/SocialSecurityNumberBrazil.d.ts +2 -2
- package/dist/types/core/core.d.ts +2 -1
- package/dist/types/language/config.d.ts +1 -0
- package/dist/types/language/locales/index.d.ts +50 -0
- package/dist/types/types/index.d.ts +30 -1
- package/dist/types/utils/Validator/Validator.d.ts +2 -20
- package/dist/types/utils/Validator/types.d.ts +45 -0
- package/dist/types/utils/useForm/types.d.ts +5 -0
- package/dist/types/utils/useForm/useForm.d.ts +2 -6
- package/dist/types/utils/validator-utils.d.ts +5 -0
- package/package.json +5 -5
|
@@ -1,5 +1,33 @@
|
|
|
1
1
|
import { ErrorPanelObj } from '../../../../core/Errors/ErrorPanel';
|
|
2
|
-
import { LayoutObj, SortErrorsObj } from './types';
|
|
2
|
+
import { CardInputProps, LayoutObj, SortErrorsObj } from './types';
|
|
3
|
+
import { InstallmentsObj } from './components/Installments/Installments';
|
|
4
|
+
import { SFPProps } from '../../../internal/SecuredFields/SFP/types';
|
|
3
5
|
export declare const getCardImageUrl: (brand: string, loadingContext: string) => string;
|
|
4
|
-
|
|
6
|
+
/**
|
|
7
|
+
* Verifies that installment object is valid to send to the Backend.
|
|
8
|
+
* Valid means that it has 'revolving' plan set, or the number of installments is bigger than one
|
|
9
|
+
*/
|
|
10
|
+
export declare const hasValidInstallmentsObject: (installments?: InstallmentsObj) => boolean;
|
|
11
|
+
export declare const getLayout: ({ props, showKCP, showBrazilianSSN, countrySpecificSchemas, billingAddressRequiredFields }: LayoutObj) => string[];
|
|
5
12
|
export declare const sortErrorsForPanel: ({ errors, layout, i18n, countrySpecificLabels }: SortErrorsObj) => ErrorPanelObj;
|
|
13
|
+
export declare const extractPropsForCardFields: (props: CardInputProps) => {
|
|
14
|
+
amount: import("../../../../types").PaymentAmount;
|
|
15
|
+
billingAddressRequired: boolean;
|
|
16
|
+
billingAddressRequiredFields: string[];
|
|
17
|
+
billingAddressAllowedCountries: string[];
|
|
18
|
+
brandsConfiguration: import("../../types").CardBrandsConfiguration;
|
|
19
|
+
enableStoreDetails: boolean;
|
|
20
|
+
hasCVC: boolean;
|
|
21
|
+
hasHolderName: boolean;
|
|
22
|
+
holderNameRequired: boolean;
|
|
23
|
+
installmentOptions: import("./components/types").InstallmentOptions;
|
|
24
|
+
placeholders: {
|
|
25
|
+
holderName?: string;
|
|
26
|
+
};
|
|
27
|
+
positionHolderNameOnTop: boolean;
|
|
28
|
+
showBrandIcon: boolean;
|
|
29
|
+
lastFour: string;
|
|
30
|
+
expiryMonth: string;
|
|
31
|
+
expiryYear: string;
|
|
32
|
+
};
|
|
33
|
+
export declare const extractPropsForSFP: (props: CardInputProps) => SFPProps;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ValidatorRules } from '../../../../utils/Validator/
|
|
1
|
+
import { ValidatorRules } from '../../../../utils/Validator/types';
|
|
2
2
|
import { formatCPFCNPJ } from '../../../internal/SocialSecurityNumberBrazil/utils';
|
|
3
3
|
export declare const cardInputFormatters: {
|
|
4
4
|
socialSecurityNumber: typeof formatCPFCNPJ;
|
|
@@ -17,8 +17,6 @@ export interface CardElementProps extends UIElementProps {
|
|
|
17
17
|
* except for a single branded card when it will be the same as the brand prop
|
|
18
18
|
*/
|
|
19
19
|
type?: string;
|
|
20
|
-
/** @deprecated use brands instead */
|
|
21
|
-
groupTypes?: string[];
|
|
22
20
|
/** List of brands accepted by the component */
|
|
23
21
|
brands?: string[];
|
|
24
22
|
/** Show/hide the "store details" checkbox */
|
|
@@ -113,6 +111,7 @@ export interface BrandObject {
|
|
|
113
111
|
showSocialSecurityNumber?: boolean;
|
|
114
112
|
supported: boolean;
|
|
115
113
|
brandImageUrl?: string;
|
|
114
|
+
panLength?: number;
|
|
116
115
|
}
|
|
117
116
|
export interface BinLookupResponseRaw {
|
|
118
117
|
requestId: string;
|
|
@@ -91,7 +91,7 @@ declare class DropinElement extends UIElement<DropinElementProps> {
|
|
|
91
91
|
* Creates the Drop-in elements
|
|
92
92
|
*/
|
|
93
93
|
private handleCreate;
|
|
94
|
-
handleAction(action: PaymentAction, props?: {}):
|
|
94
|
+
handleAction(action: PaymentAction, props?: {}): UIElement | null;
|
|
95
95
|
closeActivePaymentMethod(): void;
|
|
96
96
|
render(): h.JSX.Element;
|
|
97
97
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { ValidatorRules } from '../../utils/Validator/
|
|
1
|
+
import { ValidatorRules } from '../../utils/Validator/types';
|
|
2
2
|
export declare const econtextValidationRules: ValidatorRules;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { Component, h } from 'preact';
|
|
1
|
+
import { Component, FunctionComponent, h } from 'preact';
|
|
2
2
|
import { PaymentAmount } from '../../../types';
|
|
3
|
+
import { GiftcardFieldsProps } from "./types";
|
|
3
4
|
interface GiftcardComponentProps {
|
|
4
5
|
onChange: (state: any) => void;
|
|
5
6
|
onFocus: (event: any) => void;
|
|
@@ -9,6 +10,9 @@ interface GiftcardComponentProps {
|
|
|
9
10
|
amount: PaymentAmount;
|
|
10
11
|
showPayButton?: boolean;
|
|
11
12
|
payButton: (config: any) => any;
|
|
13
|
+
pinRequired: boolean;
|
|
14
|
+
expiryDateRequired?: boolean;
|
|
15
|
+
fieldsLayoutComponent: FunctionComponent<GiftcardFieldsProps>;
|
|
12
16
|
}
|
|
13
17
|
declare class Giftcard extends Component<GiftcardComponentProps> {
|
|
14
18
|
state: {
|
|
@@ -21,9 +25,11 @@ declare class Giftcard extends Component<GiftcardComponentProps> {
|
|
|
21
25
|
};
|
|
22
26
|
static defaultProps: {
|
|
23
27
|
pinRequired: boolean;
|
|
28
|
+
expiryDateRequired: boolean;
|
|
24
29
|
onChange: () => void;
|
|
25
30
|
onFocus: () => void;
|
|
26
31
|
onBlur: () => void;
|
|
32
|
+
fieldsLayoutComponent: (props: GiftcardFieldsProps) => h.JSX.Element;
|
|
27
33
|
};
|
|
28
34
|
sfp: any;
|
|
29
35
|
onChange: (sfpState: any) => void;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import Language from '../../../language/Language';
|
|
2
|
+
import { SFPState } from '../../internal/SecuredFields/SFP/types';
|
|
3
|
+
export declare type GiftcardFieldsProps = {
|
|
4
|
+
setRootNode: (input: HTMLElement) => void;
|
|
5
|
+
i18n: Language;
|
|
6
|
+
pinRequired: boolean;
|
|
7
|
+
sfpState: SFPState;
|
|
8
|
+
getCardErrorMessage: any;
|
|
9
|
+
focusedElement: any;
|
|
10
|
+
setFocusOn: any;
|
|
11
|
+
};
|
|
12
|
+
export declare type GiftcardFieldProps = {
|
|
13
|
+
i18n: Language;
|
|
14
|
+
classNameModifiers?: Array<string>;
|
|
15
|
+
sfpState: any;
|
|
16
|
+
getCardErrorMessage: any;
|
|
17
|
+
focusedElement: any;
|
|
18
|
+
setFocusOn: any;
|
|
19
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import GiftcardElement from '../Giftcard/Giftcard';
|
|
2
|
+
export declare class MealVoucherFRElement extends GiftcardElement {
|
|
3
|
+
static type: string;
|
|
4
|
+
constructor(props: any);
|
|
5
|
+
formatProps(props: any): any;
|
|
6
|
+
/**
|
|
7
|
+
* Formats the component data output
|
|
8
|
+
*/
|
|
9
|
+
formatData(): {
|
|
10
|
+
paymentMethod: {
|
|
11
|
+
type: any;
|
|
12
|
+
brand: any;
|
|
13
|
+
encryptedCardNumber: any;
|
|
14
|
+
encryptedSecurityCode: any;
|
|
15
|
+
encryptedExpiryMonth: any;
|
|
16
|
+
encryptedExpiryYear: any;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
export default MealVoucherFRElement;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './MealVoucherFR';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { ValidatorRules } from '../../../utils/Validator/
|
|
1
|
+
import { ValidatorRules } from '../../../utils/Validator/types';
|
|
2
2
|
export declare const pixValidationRules: ValidatorRules;
|
|
@@ -1,8 +1,38 @@
|
|
|
1
1
|
import { h } from 'preact';
|
|
2
2
|
import Language from '../../../language/Language';
|
|
3
|
+
import { CardBrandsConfiguration } from '../../Card/types';
|
|
4
|
+
import { StylesObject } from '../../internal/SecuredFields/lib/types';
|
|
3
5
|
interface SecuredFieldsProps {
|
|
4
|
-
|
|
6
|
+
allowedDOMAccess?: boolean;
|
|
7
|
+
autoFocus?: boolean;
|
|
8
|
+
brands?: string[];
|
|
9
|
+
brandsConfiguration?: CardBrandsConfiguration;
|
|
10
|
+
clientKey?: string;
|
|
11
|
+
countryCode?: string;
|
|
5
12
|
i18n: Language;
|
|
13
|
+
implementationType?: string;
|
|
14
|
+
isCollatingErrors?: boolean;
|
|
15
|
+
keypadFix?: boolean;
|
|
16
|
+
loadingContext?: string;
|
|
17
|
+
legacyInputMode?: boolean;
|
|
18
|
+
minimumExpiryDate?: string;
|
|
19
|
+
onAdditionalSFConfig?: () => {};
|
|
20
|
+
onAdditionalSFRemoved?: () => {};
|
|
21
|
+
onAllValid?: () => {};
|
|
22
|
+
onAutoComplete?: () => {};
|
|
23
|
+
onBinValue?: () => {};
|
|
24
|
+
onBrand?: () => {};
|
|
25
|
+
onConfigSuccess?: () => {};
|
|
26
|
+
onChange: (data: any) => void;
|
|
27
|
+
onError?: () => {};
|
|
28
|
+
onFieldValid?: () => {};
|
|
29
|
+
onFocus?: (e: any) => {};
|
|
30
|
+
onLoad?: () => {};
|
|
31
|
+
rootNode: HTMLElement;
|
|
32
|
+
showWarnings?: boolean;
|
|
33
|
+
styles?: StylesObject;
|
|
34
|
+
trimTrailingSeparator?: boolean;
|
|
35
|
+
type: string;
|
|
6
36
|
}
|
|
7
37
|
declare function SecuredFieldsInput(props: SecuredFieldsProps): h.JSX.Element;
|
|
8
38
|
declare namespace SecuredFieldsInput {
|
|
@@ -23,7 +23,7 @@ export declare class UIElement<P extends UIElementProps = any> extends BaseEleme
|
|
|
23
23
|
private submitAdditionalDetails;
|
|
24
24
|
protected handleError: (error: AdyenCheckoutError) => void;
|
|
25
25
|
protected handleAdditionalDetails: (state: any) => any;
|
|
26
|
-
handleAction(action: PaymentAction, props?: {}): UIElement;
|
|
26
|
+
handleAction(action: PaymentAction, props?: {}): UIElement | null;
|
|
27
27
|
protected handleOrder: (order: Order) => void;
|
|
28
28
|
protected handleFinalResult: (result: any) => any;
|
|
29
29
|
/**
|
|
@@ -45,6 +45,7 @@ import Address from './Address';
|
|
|
45
45
|
import PersonalDetails from './PersonalDetails';
|
|
46
46
|
import Klarna from './Klarna';
|
|
47
47
|
import Twint from './Twint';
|
|
48
|
+
import MealVoucherFR from './MealVoucherFR';
|
|
48
49
|
/**
|
|
49
50
|
* Maps each component with a Component element.
|
|
50
51
|
*/
|
|
@@ -146,6 +147,9 @@ declare const componentsMap: {
|
|
|
146
147
|
swish: typeof Swish;
|
|
147
148
|
affirm: typeof Affirm;
|
|
148
149
|
twint: typeof Twint;
|
|
150
|
+
mealVoucher_FR_natixis: typeof MealVoucherFR;
|
|
151
|
+
mealVoucher_FR_sodexo: typeof MealVoucherFR;
|
|
152
|
+
mealVoucher_FR_groupeup: typeof MealVoucherFR;
|
|
149
153
|
default: any;
|
|
150
154
|
};
|
|
151
155
|
/**
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
import { h } from 'preact';
|
|
2
2
|
import { FieldContainerProps } from '../types';
|
|
3
|
+
/**
|
|
4
|
+
* USAGE: Specifically defined as a util to provide a wrapper for fields created within the Address component
|
|
5
|
+
*
|
|
6
|
+
* NOT TO BE USED: if you just want to add a Country or State dropdown outside of an Address component
|
|
7
|
+
* - then you should implement <CountryField> or <StateField> directly
|
|
8
|
+
*/
|
|
3
9
|
declare function FieldContainer(props: FieldContainerProps): h.JSX.Element;
|
|
4
10
|
export default FieldContainer;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { AddressField, AddressData } from '../../../types';
|
|
2
2
|
import Specifications from './Specifications';
|
|
3
|
-
import { ValidatorRules } from '../../../utils/Validator/
|
|
3
|
+
import { ValidatorRules } from '../../../utils/Validator/types';
|
|
4
|
+
import { ValidationRuleResult } from '../../../utils/Validator/Validator';
|
|
4
5
|
export declare type StringObject = {
|
|
5
6
|
[key: string]: string;
|
|
6
7
|
};
|
|
@@ -17,12 +18,12 @@ export interface AddressProps {
|
|
|
17
18
|
visibility?: string;
|
|
18
19
|
}
|
|
19
20
|
export interface AddressStateError {
|
|
20
|
-
street?:
|
|
21
|
-
houseNumberOrName?:
|
|
22
|
-
postalCode?:
|
|
23
|
-
city?:
|
|
24
|
-
country?:
|
|
25
|
-
stateOrProvince?:
|
|
21
|
+
street?: ValidationRuleResult;
|
|
22
|
+
houseNumberOrName?: ValidationRuleResult;
|
|
23
|
+
postalCode?: ValidationRuleResult;
|
|
24
|
+
city?: ValidationRuleResult;
|
|
25
|
+
country?: ValidationRuleResult;
|
|
26
|
+
stateOrProvince?: ValidationRuleResult;
|
|
26
27
|
}
|
|
27
28
|
export interface FieldContainerProps {
|
|
28
29
|
allowedCountries: string[];
|
|
@@ -33,10 +34,12 @@ export interface FieldContainerProps {
|
|
|
33
34
|
key: string;
|
|
34
35
|
valid?: object;
|
|
35
36
|
onInput?: (e: Event) => void;
|
|
36
|
-
|
|
37
|
+
onBlur?: (e: Event) => void;
|
|
37
38
|
onDropdownChange: (e: Event) => void;
|
|
38
39
|
readOnly?: boolean;
|
|
39
40
|
specifications: Specifications;
|
|
41
|
+
maxlength?: number;
|
|
42
|
+
trimOnBlur?: boolean;
|
|
40
43
|
}
|
|
41
44
|
export interface ReadOnlyAddressProps {
|
|
42
45
|
data: AddressData;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { ValidatorRules } from '../../../utils/Validator/
|
|
1
|
+
import { ValidatorRules } from '../../../utils/Validator/types';
|
|
2
2
|
export declare const getAddressValidationRules: (specifications: any) => ValidatorRules;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FieldsetVisibility } from '../../../types';
|
|
2
|
-
import { ValidatorRules } from '../../../utils/Validator/
|
|
2
|
+
import { ValidatorRules } from '../../../utils/Validator/types';
|
|
3
3
|
export interface CompanyDetailsSchema {
|
|
4
4
|
name?: string;
|
|
5
5
|
registrationNumber?: string;
|
|
@@ -8,7 +8,7 @@ declare namespace PersonalDetails {
|
|
|
8
8
|
onChange: () => void;
|
|
9
9
|
placeholders: {};
|
|
10
10
|
requiredFields: string[];
|
|
11
|
-
validationRules: import("../../../utils/Validator/
|
|
11
|
+
validationRules: import("../../../utils/Validator/types").ValidatorRules;
|
|
12
12
|
visibility: string;
|
|
13
13
|
};
|
|
14
14
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FieldsetVisibility, PersonalDetailsSchema } from '../../../types';
|
|
2
|
-
import { ValidatorRules } from '../../../utils/Validator/
|
|
2
|
+
import { ValidatorRules } from '../../../utils/Validator/types';
|
|
3
3
|
declare type PersonalDetailsPlaceholders = Omit<PersonalDetailsSchema, 'gender'>;
|
|
4
4
|
export interface PersonalDetailsProps {
|
|
5
5
|
label?: string;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { ValidatorRules } from '../../../utils/Validator/
|
|
1
|
+
import { ValidatorRules } from '../../../utils/Validator/types';
|
|
2
2
|
export declare const personalDetailsValidationRules: ValidatorRules;
|
|
@@ -1,29 +1,7 @@
|
|
|
1
1
|
import { Component } from 'preact';
|
|
2
|
-
import { SFPProps } from './
|
|
2
|
+
import { SFPProps, SFPState, SingleBrandResetObject } from './types';
|
|
3
3
|
import { StylesObject, CbObjOnError } from '../lib/types';
|
|
4
|
-
import { AddressData } from '../../../../types';
|
|
5
4
|
import { BinLookupResponse } from '../../../Card/types';
|
|
6
|
-
import { CVCPolicyType, DatePolicyType } from '../lib/types';
|
|
7
|
-
export interface SFPState {
|
|
8
|
-
status?: string;
|
|
9
|
-
brand?: string;
|
|
10
|
-
errors?: object;
|
|
11
|
-
valid: object;
|
|
12
|
-
data: object;
|
|
13
|
-
cvcPolicy?: CVCPolicyType;
|
|
14
|
-
isSfpValid?: boolean;
|
|
15
|
-
autoCompleteName?: string;
|
|
16
|
-
billingAddress?: AddressData;
|
|
17
|
-
hasUnsupportedCard?: boolean;
|
|
18
|
-
hasKoreanFields?: boolean;
|
|
19
|
-
showSocialSecurityNumber?: boolean;
|
|
20
|
-
expiryDatePolicy?: DatePolicyType;
|
|
21
|
-
socialSecurityNumber?: string;
|
|
22
|
-
}
|
|
23
|
-
export interface SingleBrandResetObject {
|
|
24
|
-
brand: string;
|
|
25
|
-
cvcPolicy: CVCPolicyType;
|
|
26
|
-
}
|
|
27
5
|
/**
|
|
28
6
|
* SecuredFieldsProvider:
|
|
29
7
|
* Initialises & handles the client-side part of SecuredFields
|
|
@@ -53,7 +31,7 @@ declare class SecuredFieldsProvider extends Component<SFPProps, SFPState> {
|
|
|
53
31
|
keypadFix: boolean;
|
|
54
32
|
rootNode: any;
|
|
55
33
|
loadingContext: any;
|
|
56
|
-
|
|
34
|
+
brands: any[];
|
|
57
35
|
allowedDOMAccess: boolean;
|
|
58
36
|
showWarnings: boolean;
|
|
59
37
|
autoFocus: boolean;
|
|
@@ -68,7 +46,6 @@ declare class SecuredFieldsProvider extends Component<SFPProps, SFPState> {
|
|
|
68
46
|
onBinValue: () => void;
|
|
69
47
|
onFocus: () => void;
|
|
70
48
|
onAutoComplete: () => void;
|
|
71
|
-
placeholders: {};
|
|
72
49
|
styles: {};
|
|
73
50
|
};
|
|
74
51
|
componentDidMount(): void;
|
|
@@ -80,6 +57,7 @@ declare class SecuredFieldsProvider extends Component<SFPProps, SFPState> {
|
|
|
80
57
|
handleUnsupportedCard(errObj: CbObjOnError): boolean;
|
|
81
58
|
setFocusOn(frame: string): void;
|
|
82
59
|
updateStyles(stylesObj: StylesObject): void;
|
|
60
|
+
sfIsOptionalOrHidden(fieldType: string): boolean;
|
|
83
61
|
destroy(): void;
|
|
84
62
|
showValidation(): void;
|
|
85
63
|
/**
|
|
@@ -17,7 +17,7 @@ declare function handleOnAllValid(status: CbObjOnAllValid): boolean;
|
|
|
17
17
|
* Saves a field value from CSF in the CardInput state
|
|
18
18
|
* Emits the onFieldValid event
|
|
19
19
|
*/
|
|
20
|
-
declare function handleOnFieldValid(
|
|
20
|
+
declare function handleOnFieldValid(fieldObj: CbObjOnFieldValid): boolean;
|
|
21
21
|
/**
|
|
22
22
|
* Saves the card brand in state
|
|
23
23
|
* Emits the onBrand event
|
|
@@ -1,89 +1,9 @@
|
|
|
1
|
-
import { Language } from '../../../../language/Language';
|
|
2
|
-
import { CVCPolicyType } from '../lib/types';
|
|
3
|
-
export interface SFPProps {
|
|
4
|
-
/**
|
|
5
|
-
* CSF RELATED (±22)
|
|
6
|
-
*/
|
|
7
|
-
allowedDOMAccess?: boolean;
|
|
8
|
-
autoFocus?: boolean;
|
|
9
|
-
brands?: string[];
|
|
10
|
-
groupTypes?: string[];
|
|
11
|
-
keypadFix?: boolean;
|
|
12
|
-
loadingContext: string;
|
|
13
|
-
onAllValid?: any;
|
|
14
|
-
onAutoComplete?: any;
|
|
15
|
-
onBinValue?: any;
|
|
16
|
-
onBrand?: any;
|
|
17
|
-
onConfigSuccess?: any;
|
|
18
|
-
onError?: any;
|
|
19
|
-
onFieldValid?: any;
|
|
20
|
-
onFocus?: any;
|
|
21
|
-
onLoad?: any;
|
|
22
|
-
clientKey?: string;
|
|
23
|
-
placeholders?: object;
|
|
24
|
-
rootNode?: HTMLElement;
|
|
25
|
-
showWarnings?: boolean;
|
|
26
|
-
styles?: object;
|
|
27
|
-
trimTrailingSeparator?: boolean;
|
|
28
|
-
type: string;
|
|
29
|
-
/**
|
|
30
|
-
* SFP RELATED (6)
|
|
31
|
-
*/
|
|
32
|
-
i18n: Language;
|
|
33
|
-
koreanAuthenticationRequired: boolean;
|
|
34
|
-
hasKoreanFields: boolean;
|
|
35
|
-
onChange: any;
|
|
36
|
-
render: any;
|
|
37
|
-
legacyInputMode: boolean;
|
|
38
|
-
minimumExpiryDate: string;
|
|
39
|
-
/**
|
|
40
|
-
* RELATED TO COMPS HIGHER UP THE RENDER CHAIN - Card, CardInput etc (±39)
|
|
41
|
-
*/
|
|
42
|
-
amount: object;
|
|
43
|
-
billingAddressAllowedCountries: string[];
|
|
44
|
-
billingAddressRequired: boolean;
|
|
45
|
-
billingAddressRequiredFields: string[];
|
|
46
|
-
brand: string;
|
|
47
|
-
createFromAction: () => {};
|
|
48
|
-
cvcPolicy: CVCPolicyType;
|
|
49
|
-
data: object;
|
|
50
|
-
details: object[];
|
|
51
|
-
enableStoreDetails: boolean;
|
|
52
|
-
environment: string;
|
|
53
|
-
expiryMonth: string;
|
|
54
|
-
expiryYear: string;
|
|
55
|
-
hasCVC: boolean;
|
|
56
|
-
hasHolderName: boolean;
|
|
57
|
-
hideCVC: boolean;
|
|
58
|
-
holderName: string;
|
|
59
|
-
holderNameRequired: boolean;
|
|
60
|
-
hasStoreDetails: boolean;
|
|
61
|
-
id: string;
|
|
62
|
-
installmentOptions: object;
|
|
63
|
-
lastFour: string;
|
|
64
|
-
locale: string;
|
|
65
|
-
modules: object;
|
|
66
|
-
name: string;
|
|
67
|
-
onAdditionalDetails: () => {};
|
|
68
|
-
onBlur: () => {};
|
|
69
|
-
onSubmit: () => {};
|
|
70
|
-
payButton: () => {};
|
|
71
|
-
paymentMethods: object[];
|
|
72
|
-
paymentMethodsResponse: object;
|
|
73
|
-
risk: object;
|
|
74
|
-
showBrandIcon: boolean;
|
|
75
|
-
showPayButton: boolean;
|
|
76
|
-
storedDetails: boolean;
|
|
77
|
-
storedPaymentMethodId: string;
|
|
78
|
-
storedPaymentMethods: object[];
|
|
79
|
-
supportedShopperInteractions: string[];
|
|
80
|
-
}
|
|
81
1
|
declare const _default: {
|
|
82
2
|
type: string;
|
|
83
3
|
keypadFix: boolean;
|
|
84
4
|
rootNode: any;
|
|
85
5
|
loadingContext: any;
|
|
86
|
-
|
|
6
|
+
brands: any[];
|
|
87
7
|
allowedDOMAccess: boolean;
|
|
88
8
|
showWarnings: boolean;
|
|
89
9
|
autoFocus: boolean;
|
|
@@ -98,7 +18,6 @@ declare const _default: {
|
|
|
98
18
|
onBinValue: () => void;
|
|
99
19
|
onFocus: () => void;
|
|
100
20
|
onAutoComplete: () => void;
|
|
101
|
-
placeholders: {};
|
|
102
21
|
styles: {};
|
|
103
22
|
};
|
|
104
23
|
export default _default;
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { CVCPolicyType, DatePolicyType, StylesObject } from '../lib/types';
|
|
2
|
+
import { AddressData } from '../../../../types';
|
|
3
|
+
import { CardBrandsConfiguration } from '../../../Card/types';
|
|
4
|
+
import { Language } from '../../../../language/Language';
|
|
5
|
+
/**
|
|
6
|
+
* Should be the only props that can be sent to SFP (from CardInput, SecuredFieldsInput, AchInput, GiftcardComponent)
|
|
7
|
+
*/
|
|
8
|
+
export interface SFPProps {
|
|
9
|
+
allowedDOMAccess?: boolean;
|
|
10
|
+
autoFocus?: boolean;
|
|
11
|
+
brands?: string[];
|
|
12
|
+
brandsConfiguration?: CardBrandsConfiguration;
|
|
13
|
+
clientKey: string;
|
|
14
|
+
countryCode?: string;
|
|
15
|
+
hasKoreanFields?: boolean;
|
|
16
|
+
i18n: Language;
|
|
17
|
+
implementationType?: string;
|
|
18
|
+
isCollatingErrors?: boolean;
|
|
19
|
+
keypadFix?: boolean;
|
|
20
|
+
koreanAuthenticationRequired?: boolean;
|
|
21
|
+
legacyInputMode?: boolean;
|
|
22
|
+
loadingContext: string;
|
|
23
|
+
minimumExpiryDate?: string;
|
|
24
|
+
onAdditionalSFConfig?: () => {};
|
|
25
|
+
onAdditionalSFRemoved?: () => {};
|
|
26
|
+
onAllValid?: () => {};
|
|
27
|
+
onAutoComplete?: () => {};
|
|
28
|
+
onBinValue?: () => {};
|
|
29
|
+
onBrand?: () => {};
|
|
30
|
+
onChange: () => {};
|
|
31
|
+
onConfigSuccess?: () => {};
|
|
32
|
+
onError?: () => {};
|
|
33
|
+
onFieldValid?: () => {};
|
|
34
|
+
onFocus?: () => {};
|
|
35
|
+
onLoad?: () => {};
|
|
36
|
+
rootNode: HTMLElement;
|
|
37
|
+
showWarnings?: boolean;
|
|
38
|
+
styles?: StylesObject;
|
|
39
|
+
trimTrailingSeparator?: boolean;
|
|
40
|
+
type: string;
|
|
41
|
+
render: () => {};
|
|
42
|
+
}
|
|
43
|
+
export interface SFPState {
|
|
44
|
+
status?: string;
|
|
45
|
+
brand?: string;
|
|
46
|
+
errors?: object;
|
|
47
|
+
valid: SFPValid;
|
|
48
|
+
data: object;
|
|
49
|
+
cvcPolicy?: CVCPolicyType;
|
|
50
|
+
isSfpValid?: boolean;
|
|
51
|
+
autoCompleteName?: string;
|
|
52
|
+
billingAddress?: AddressData;
|
|
53
|
+
detectedUnsupportedBrands?: string[];
|
|
54
|
+
hasKoreanFields?: boolean;
|
|
55
|
+
showSocialSecurityNumber?: boolean;
|
|
56
|
+
expiryDatePolicy?: DatePolicyType;
|
|
57
|
+
socialSecurityNumber?: string;
|
|
58
|
+
}
|
|
59
|
+
export interface SingleBrandResetObject {
|
|
60
|
+
brand: string;
|
|
61
|
+
cvcPolicy: CVCPolicyType;
|
|
62
|
+
}
|
|
63
|
+
export interface SFPValid {
|
|
64
|
+
encryptedCardNumber?: boolean;
|
|
65
|
+
encryptedExpiryMonth?: boolean;
|
|
66
|
+
encryptedExpiryYear?: boolean;
|
|
67
|
+
encryptedSecurityCode?: boolean;
|
|
68
|
+
encryptedPassword?: boolean;
|
|
69
|
+
encryptedPin?: boolean;
|
|
70
|
+
encryptedBankAccountNumber?: boolean;
|
|
71
|
+
encryptedBankLocationId?: boolean;
|
|
72
|
+
}
|
|
73
|
+
export interface OnChangeEventDetails {
|
|
74
|
+
event: string;
|
|
75
|
+
fieldType?: string;
|
|
76
|
+
}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
export default function extensions(props: any, refs: any, states: any
|
|
1
|
+
export default function extensions(props: any, refs: any, states: any, hasPanLengthRef?: Partial<{
|
|
2
|
+
current: any;
|
|
3
|
+
}>): {
|
|
2
4
|
/**
|
|
3
5
|
* Handle the binLookup response object generated in triggerBinLookup and process it in relation to the CardInput and it's sub-components.
|
|
4
6
|
* e.g. we might need to add/remove additional markup (a selector for brands), and inform SFP of the issuingCountryCode & detected brand(s).
|
|
@@ -14,6 +14,7 @@ export interface CSFReturnObject {
|
|
|
14
14
|
removeSecuredField: any;
|
|
15
15
|
setKCPStatus: any;
|
|
16
16
|
sendValueToFrame?: any;
|
|
17
|
+
sfIsOptionalOrHidden: (f: string) => boolean;
|
|
17
18
|
}
|
|
18
19
|
/**
|
|
19
20
|
* Base interface for SetupObject & ConfigObject
|
|
@@ -30,7 +31,7 @@ interface CSFCommonProps {
|
|
|
30
31
|
iframeUIConfig?: object;
|
|
31
32
|
legacyInputMode?: boolean;
|
|
32
33
|
minimumExpiryDate?: string;
|
|
33
|
-
implementationType?:
|
|
34
|
+
implementationType?: 'components' | 'custom';
|
|
34
35
|
isCollatingErrors?: boolean;
|
|
35
36
|
}
|
|
36
37
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const getPreviousTabbableNonSFElement: (passedFieldType: any, rootNode: any) => any;
|
|
1
|
+
export declare const getPreviousTabbableNonSFElement: (passedFieldType: any, rootNode: any, getPrevious?: any) => any;
|
|
@@ -4,17 +4,18 @@ export declare const ENCRYPTED_EXPIRY_DATE = "encryptedExpiryDate";
|
|
|
4
4
|
export declare const ENCRYPTED_EXPIRY_MONTH = "encryptedExpiryMonth";
|
|
5
5
|
export declare const ENCRYPTED_EXPIRY_YEAR = "encryptedExpiryYear";
|
|
6
6
|
export declare const ENCRYPTED_SECURITY_CODE = "encryptedSecurityCode";
|
|
7
|
-
export declare const ENCRYPTED_SECURITY_CODE_3_DIGITS = "encryptedSecurityCode3digits";
|
|
8
|
-
export declare const ENCRYPTED_SECURITY_CODE_4_DIGITS = "encryptedSecurityCode4digits";
|
|
9
7
|
export declare const ENCRYPTED_PWD_FIELD = "encryptedPassword";
|
|
10
8
|
export declare const ENCRYPTED_PIN_FIELD = "encryptedPin";
|
|
11
|
-
export declare const GIFT_CARD = "giftcard";
|
|
12
9
|
export declare const ENCRYPTED_BANK_ACCNT_NUMBER_FIELD = "encryptedBankAccountNumber";
|
|
13
10
|
export declare const ENCRYPTED_BANK_LOCATION_FIELD = "encryptedBankLocationId";
|
|
14
|
-
export declare const
|
|
11
|
+
export declare const ENCRYPTED_SECURITY_CODE_3_DIGITS = "encryptedSecurityCode3digits";
|
|
12
|
+
export declare const ENCRYPTED_SECURITY_CODE_4_DIGITS = "encryptedSecurityCode4digits";
|
|
13
|
+
export declare const GIFT_CARD = "giftcard";
|
|
14
|
+
export declare const SF_VERSION = "3.9.0";
|
|
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 CREDIT_CARD_SF_FIELDS: string[];
|
|
18
|
+
export declare const OTHER_SF_FIELDS: string[];
|
|
18
19
|
export declare const ALL_SECURED_FIELDS: string[];
|
|
19
20
|
export declare const REQUIRED = "required";
|
|
20
21
|
export declare const OPTIONAL = "optional";
|