@adyen/adyen-web 5.33.0 → 5.35.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 +5 -1
- package/dist/adyen.css +6 -5
- 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 +6 -5
- package/dist/cjs/adyen.css.map +1 -1
- package/dist/cjs/index.js +1 -1
- package/dist/es/adyen.css +6 -5
- package/dist/es/adyen.css.map +1 -1
- package/dist/es/index.js +1 -1
- package/dist/es.modern/adyen.css +6 -5
- package/dist/es.modern/adyen.css.map +1 -1
- package/dist/es.modern/index.js +1 -1
- package/dist/types/components/Ach/components/AchInput/types.d.ts +1 -1
- package/dist/types/components/AmazonPay/types.d.ts +9 -9
- package/dist/types/components/ApplePay/types.d.ts +2 -2
- package/dist/types/components/Atome/config.d.ts +1 -1
- package/dist/types/components/BcmcMobile/BcmcMobile.d.ts +0 -1
- package/dist/types/components/Card/Bancontact.d.ts +6 -2
- package/dist/types/components/Card/Card.d.ts +9 -7
- package/dist/types/components/Card/ClickToPayHolder.d.ts +1 -1
- package/dist/types/components/Card/ClickToPayWrapper.d.ts +1 -1
- package/dist/types/components/Card/components/CardInput/components/AvailableBrands/AvailableBrands.d.ts +1 -1
- package/dist/types/components/Card/components/CardInput/components/CardFieldsWrapper.d.ts +2 -1
- package/dist/types/components/Card/components/CardInput/components/DisclaimerMessage/DisclaimerMessage.d.ts +16 -0
- package/dist/types/components/Card/components/CardInput/components/DisclaimerMessage/index.d.ts +1 -0
- package/dist/types/components/Card/components/CardInput/components/StoredCardFieldsWrapper.d.ts +2 -1
- package/dist/types/components/Card/components/CardInput/components/types.d.ts +2 -2
- package/dist/types/components/Card/components/CardInput/types.d.ts +8 -2
- package/dist/types/components/Card/components/CardInput/utils.d.ts +1 -0
- package/dist/types/components/Card/components/ClickToPay/ClickToPayComponent.d.ts +1 -1
- package/dist/types/components/Card/components/ClickToPay/components/CtPBrand/CtPBrand.d.ts +1 -1
- package/dist/types/components/Card/components/ClickToPay/components/CtPCards/CtPCards.d.ts +1 -1
- package/dist/types/components/Card/components/ClickToPay/components/CtPCards/CtPCardsList/CtPCardsList.d.ts +1 -1
- package/dist/types/components/Card/components/ClickToPay/components/CtPCards/CtPSingleCard/CtPSingleCard.d.ts +1 -1
- package/dist/types/components/Card/components/ClickToPay/components/CtPInfo/CtPInfoModal/CtPInfoModal.d.ts +1 -1
- package/dist/types/components/Card/components/ClickToPay/components/CtPLogin/CtPLoginInput.d.ts +11 -7
- package/dist/types/components/Card/components/ClickToPay/components/CtPOneTimePassword/CtPOneTimePassword.d.ts +1 -1
- package/dist/types/components/Card/components/ClickToPay/components/CtPOneTimePassword/CtPOneTimePasswordInput/CtPOneTimePasswordInput.d.ts +11 -7
- package/dist/types/components/Card/components/ClickToPay/context/ClickToPayContext.d.ts +2 -0
- package/dist/types/components/Card/components/ClickToPay/context/ClickToPayProvider.d.ts +4 -2
- package/dist/types/components/Card/components/ClickToPay/services/ClickToPayService.d.ts +1 -1
- package/dist/types/components/Card/components/ClickToPay/services/sdks/AbstractSrcInitiator.d.ts +3 -4
- package/dist/types/components/Card/components/ClickToPay/services/sdks/MastercardSdk.d.ts +2 -3
- package/dist/types/components/Card/components/ClickToPay/services/sdks/SrciError.d.ts +2 -2
- package/dist/types/components/Card/components/ClickToPay/services/sdks/VisaSdk.d.ts +2 -3
- package/dist/types/components/Card/components/ClickToPay/services/sdks/types.d.ts +14 -10
- package/dist/types/components/Card/components/ClickToPay/services/types.d.ts +10 -10
- package/dist/types/components/Card/types.d.ts +17 -6
- package/dist/types/components/Dropin/types.d.ts +1 -1
- package/dist/types/components/DuitNow/DuitNow.d.ts +0 -1
- package/dist/types/components/Giftcard/components/types.d.ts +2 -2
- package/dist/types/components/Klarna/types.d.ts +2 -2
- package/dist/types/components/Oxxo/types.d.ts +1 -1
- package/dist/types/components/PayNow/PayNow.d.ts +0 -1
- package/dist/types/components/PayPal/Paypal.d.ts +1 -1
- package/dist/types/components/PayPal/types.d.ts +7 -4
- package/dist/types/components/Pix/PixInput/types.d.ts +1 -1
- package/dist/types/components/PromptPay/PromptPay.d.ts +0 -1
- package/dist/types/components/Swish/Swish.d.ts +0 -1
- package/dist/types/components/ThreeDS2/types.d.ts +4 -4
- package/dist/types/components/UPI/components/UPIComponent/UPIComponent.d.ts +8 -6
- package/dist/types/components/UPI/components/VpaInput/VpaInput.d.ts +11 -7
- package/dist/types/components/UPI/types.d.ts +1 -1
- package/dist/types/components/WeChat/WeChat.d.ts +0 -1
- package/dist/types/components/helpers/QRLoaderContainer.d.ts +0 -1
- package/dist/types/components/internal/Address/types.d.ts +3 -3
- package/dist/types/components/internal/Await/Await.d.ts +0 -1
- package/dist/types/components/internal/Await/types.d.ts +0 -1
- package/dist/types/components/internal/Button/types.d.ts +1 -1
- package/dist/types/components/internal/IbanInput/utils.d.ts +1 -1
- package/dist/types/components/internal/Modal/Modal.d.ts +2 -2
- package/dist/types/components/internal/Modal/useModal.d.ts +2 -2
- package/dist/types/components/internal/Modal/useTrapFocus.d.ts +1 -1
- package/dist/types/components/internal/PersonalDetails/types.d.ts +1 -1
- package/dist/types/components/internal/QRLoader/QRLoader.d.ts +1 -1
- package/dist/types/components/internal/QRLoader/types.d.ts +1 -2
- package/dist/types/components/internal/SecuredFields/lib/CSF/utils/processErrors.d.ts +1 -1
- package/dist/types/components/internal/SecuredFields/lib/configuration/constants.d.ts +1 -1
- package/dist/types/components/internal/SecuredFields/lib/securedField/AbstractSecuredField.d.ts +1 -1
- package/dist/types/components/internal/SecuredFields/lib/types.d.ts +5 -5
- package/dist/types/components/types.d.ts +3 -3
- package/dist/types/core/Analytics/Analytics.d.ts +2 -1
- package/dist/types/core/Analytics/EventsQueue.d.ts +1 -1
- package/dist/types/core/RiskModule/RiskModule.d.ts +1 -1
- package/dist/types/core/Services/analytics/post-telemetry.d.ts +3 -1
- package/dist/types/core/Services/analytics/types.d.ts +2 -2
- package/dist/types/core/Services/data-set.d.ts +1 -1
- package/dist/types/core/Services/http.d.ts +1 -1
- package/dist/types/core/types.d.ts +1 -1
- package/dist/types/language/Language.d.ts +3 -3
- package/dist/types/language/types.d.ts +2 -2
- package/dist/types/language/utils.d.ts +4 -3
- package/dist/types/types/index.d.ts +13 -13
- package/dist/types/utils/Formatters/types.d.ts +1 -1
- package/dist/types/utils/Validator/types.d.ts +9 -9
- package/dist/types/utils/isValidURL.d.ts +1 -0
- package/dist/types/utils/useForm/types.d.ts +2 -2
- package/package.json +10 -10
|
@@ -84,10 +84,16 @@ export interface CardElementProps extends UIElementProps {
|
|
|
84
84
|
onBinLookup?: (event: CbObjOnBinLookup) => void;
|
|
85
85
|
[key: string]: any;
|
|
86
86
|
}
|
|
87
|
-
export
|
|
88
|
-
export
|
|
89
|
-
|
|
90
|
-
|
|
87
|
+
export type ClickToPayScheme = 'mc' | 'visa';
|
|
88
|
+
export type ClickToPayConfiguration = {
|
|
89
|
+
/**
|
|
90
|
+
* Shopper email used to be recognized with the Network schemes
|
|
91
|
+
*/
|
|
92
|
+
shopperEmail?: string;
|
|
93
|
+
/**
|
|
94
|
+
* Shopper telephone number used to be recognized with the Network schemes
|
|
95
|
+
*/
|
|
96
|
+
telephoneNumber?: string;
|
|
91
97
|
/**
|
|
92
98
|
* Used to display the merchant name in case the DCF appears (ex: first time doing transaction in the device),
|
|
93
99
|
*/
|
|
@@ -97,11 +103,16 @@ export declare type ClickToPayConfiguration = {
|
|
|
97
103
|
* defined during the creation of the Checkout.
|
|
98
104
|
* Format: ISO language_country pair (e.g., en_US )
|
|
99
105
|
*
|
|
100
|
-
* @
|
|
106
|
+
* @defaultValue en_US
|
|
101
107
|
*/
|
|
102
108
|
locale?: string;
|
|
109
|
+
/**
|
|
110
|
+
* Disable autofocus on the One Time Password input field when it is either displayed or when the OTP is resent
|
|
111
|
+
* @defaultValue false
|
|
112
|
+
*/
|
|
113
|
+
disableOtpAutoFocus?: boolean;
|
|
103
114
|
};
|
|
104
|
-
export
|
|
115
|
+
export type SocialSecurityMode = 'show' | 'hide' | 'auto';
|
|
105
116
|
/** If the merchant wishes to set any of these properties in their local config they should do so via a "configuration" object */
|
|
106
117
|
export interface CardConfiguration {
|
|
107
118
|
visaSrciDpaId?: string;
|
|
@@ -2,7 +2,7 @@ import { PaymentMethod, StoredPaymentMethod, Order, OrderStatus } from '../../ty
|
|
|
2
2
|
import UIElement from '../UIElement';
|
|
3
3
|
import { UIElementProps, UIElementStatus } from '../types';
|
|
4
4
|
import { PaymentMethodsConfiguration } from '../../core/types';
|
|
5
|
-
export
|
|
5
|
+
export type InstantPaymentTypes = 'paywithgoogle' | 'googlepay' | 'applepay';
|
|
6
6
|
export interface DropinElementProps extends UIElementProps {
|
|
7
7
|
/**
|
|
8
8
|
* Configure each payment method displayed on the Drop-in
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import Language from '../../../language/Language';
|
|
2
2
|
import { SFPState } from '../../internal/SecuredFields/SFP/types';
|
|
3
|
-
export
|
|
3
|
+
export type GiftcardFieldsProps = {
|
|
4
4
|
setRootNode: (input: HTMLElement) => void;
|
|
5
5
|
i18n: Language;
|
|
6
6
|
pinRequired: boolean;
|
|
@@ -9,7 +9,7 @@ export declare type GiftcardFieldsProps = {
|
|
|
9
9
|
focusedElement: any;
|
|
10
10
|
setFocusOn: any;
|
|
11
11
|
};
|
|
12
|
-
export
|
|
12
|
+
export type GiftcardFieldProps = {
|
|
13
13
|
i18n: Language;
|
|
14
14
|
classNameModifiers?: Array<string>;
|
|
15
15
|
sfpState: any;
|
|
@@ -6,7 +6,7 @@ declare global {
|
|
|
6
6
|
}
|
|
7
7
|
}
|
|
8
8
|
/** sdkData present in Klarna `action`objects. */
|
|
9
|
-
export
|
|
9
|
+
export type KlarnaSdkData = {
|
|
10
10
|
/**
|
|
11
11
|
* Klarna client_token
|
|
12
12
|
* @see https://developers.klarna.com/documentation/klarna-payments/single-call-descriptions/create-session/
|
|
@@ -28,7 +28,7 @@ export interface KlarnaWidgetProps extends KlarnaPaymentsShared {
|
|
|
28
28
|
onComplete: (detailsData: any) => void;
|
|
29
29
|
onError: (error: any) => void;
|
|
30
30
|
}
|
|
31
|
-
export
|
|
31
|
+
export type KlarnaPaymentsProps = UIElementProps & KlarnaPaymentsShared & {
|
|
32
32
|
useKlarnaWidget: boolean;
|
|
33
33
|
};
|
|
34
34
|
export interface KlarnaWidgetAuthorizeResponse {
|
|
@@ -11,7 +11,7 @@ declare class PaypalElement extends UIElement<PayPalElementProps> {
|
|
|
11
11
|
private resolve;
|
|
12
12
|
private reject;
|
|
13
13
|
constructor(props: PayPalElementProps);
|
|
14
|
-
|
|
14
|
+
formatProps(props: PayPalElementProps): PayPalElementProps;
|
|
15
15
|
/**
|
|
16
16
|
* Formats the component data output
|
|
17
17
|
*/
|
|
@@ -11,9 +11,9 @@ declare global {
|
|
|
11
11
|
* The intent for the transaction. This determines whether the funds are captured immediately, or later.
|
|
12
12
|
* @see {@link https://developer.paypal.com/docs/checkout/reference/customize-sdk/#intent}
|
|
13
13
|
*/
|
|
14
|
-
|
|
15
|
-
export
|
|
16
|
-
interface PayPalStyles {
|
|
14
|
+
export type Intent = 'sale' | 'capture' | 'authorize' | 'order' | 'tokenize';
|
|
15
|
+
export type FundingSource = 'paypal' | 'credit';
|
|
16
|
+
export interface PayPalStyles {
|
|
17
17
|
/**
|
|
18
18
|
* @see {@link https://developer.paypal.com/docs/checkout/integration-features/customize-button/#color}
|
|
19
19
|
*/
|
|
@@ -68,7 +68,10 @@ interface PayPalCommonProps {
|
|
|
68
68
|
*/
|
|
69
69
|
cspNonce?: string;
|
|
70
70
|
/**
|
|
71
|
+
* Determines whether the funds are captured immediately on checkout or if the buyer authorizes the funds to be captured later.
|
|
71
72
|
* @see {@link https://developer.paypal.com/docs/checkout/reference/customize-sdk/#intent}
|
|
73
|
+
*
|
|
74
|
+
* If set, it will override the intent passed inside the 'configuration' object
|
|
72
75
|
*/
|
|
73
76
|
intent?: Intent;
|
|
74
77
|
/**
|
|
@@ -152,5 +155,5 @@ export interface PaypalSettings {
|
|
|
152
155
|
'enable-funding': string;
|
|
153
156
|
components: string;
|
|
154
157
|
}
|
|
155
|
-
export
|
|
158
|
+
export type SupportedLocale = (typeof SUPPORTED_LOCALES)[number];
|
|
156
159
|
export {};
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* https://docs.adyen.com/checkout/3d-secure/api-reference#threeds2result
|
|
4
4
|
* Indicates whether a transaction was authenticated, or whether additional verification is required.
|
|
5
5
|
*/
|
|
6
|
-
export
|
|
6
|
+
export type ResultValue = 'Y' | 'N' | 'U' | 'A' | 'C' | 'R';
|
|
7
7
|
export interface CReqData {
|
|
8
8
|
acsTransID: string;
|
|
9
9
|
messageVersion: string;
|
|
@@ -50,18 +50,18 @@ export interface FingerPrintData {
|
|
|
50
50
|
threeDSMethodNotificationURL: string;
|
|
51
51
|
postMessageDomain: string;
|
|
52
52
|
}
|
|
53
|
-
export
|
|
53
|
+
export type ThreeDS2FingerprintResponse = {
|
|
54
54
|
type: 'action' | 'completed';
|
|
55
55
|
action?: CheckoutRedirectAction | CheckoutThreeDS2Action;
|
|
56
56
|
details?: Record<string, string>;
|
|
57
57
|
};
|
|
58
|
-
|
|
58
|
+
type CheckoutRedirectAction = {
|
|
59
59
|
type: 'redirect';
|
|
60
60
|
data: Record<string, string>;
|
|
61
61
|
method: string;
|
|
62
62
|
paymentData: string;
|
|
63
63
|
};
|
|
64
|
-
|
|
64
|
+
type CheckoutThreeDS2Action = {
|
|
65
65
|
type: 'threeDS2';
|
|
66
66
|
token: string;
|
|
67
67
|
subtype: string;
|
|
@@ -1,18 +1,20 @@
|
|
|
1
1
|
import { h, RefObject } from 'preact';
|
|
2
2
|
import { PayButtonFunctionProps } from '../../../types';
|
|
3
|
+
import { VpaInputDataState } from '../VpaInput/VpaInput';
|
|
3
4
|
import { UpiMode } from '../../types';
|
|
4
5
|
import './UPIComponent.scss';
|
|
6
|
+
type OnChangeProps = {
|
|
7
|
+
data: VpaInputDataState;
|
|
8
|
+
valid: any;
|
|
9
|
+
errors: any;
|
|
10
|
+
isValid: boolean;
|
|
11
|
+
};
|
|
5
12
|
interface UPIComponentProps {
|
|
6
13
|
defaultMode: UpiMode;
|
|
7
14
|
showPayButton: boolean;
|
|
8
15
|
ref(ref: RefObject<typeof UPIComponent>): void;
|
|
9
16
|
payButton(props: PayButtonFunctionProps): h.JSX.Element;
|
|
10
|
-
onChange({ data
|
|
11
|
-
data: any;
|
|
12
|
-
valid: any;
|
|
13
|
-
errors: any;
|
|
14
|
-
isValid: any;
|
|
15
|
-
}): void;
|
|
17
|
+
onChange({ data, valid, errors, isValid }: OnChangeProps): void;
|
|
16
18
|
onUpdateMode(mode: UpiMode): void;
|
|
17
19
|
}
|
|
18
20
|
export default function UPIComponent({ defaultMode, onChange, onUpdateMode, payButton, showPayButton }: UPIComponentProps): h.JSX.Element;
|
|
@@ -1,17 +1,21 @@
|
|
|
1
1
|
import { h } from 'preact';
|
|
2
2
|
import './VpaInput.scss';
|
|
3
|
+
type OnChangeProps = {
|
|
4
|
+
data: VpaInputDataState;
|
|
5
|
+
valid: any;
|
|
6
|
+
errors: any;
|
|
7
|
+
isValid: boolean;
|
|
8
|
+
};
|
|
3
9
|
interface VpaInputProps {
|
|
4
10
|
data?: {};
|
|
5
11
|
disabled?: boolean;
|
|
6
|
-
onChange({ data
|
|
7
|
-
data: any;
|
|
8
|
-
valid: any;
|
|
9
|
-
errors: any;
|
|
10
|
-
isValid: any;
|
|
11
|
-
}): void;
|
|
12
|
+
onChange({ data, valid, errors, isValid }: OnChangeProps): void;
|
|
12
13
|
onSetInputHandlers(handlers: VpaInputHandlers): void;
|
|
13
14
|
}
|
|
14
|
-
export
|
|
15
|
+
export interface VpaInputDataState {
|
|
16
|
+
virtualPaymentAddress?: string;
|
|
17
|
+
}
|
|
18
|
+
export type VpaInputHandlers = {
|
|
15
19
|
validateInput(): void;
|
|
16
20
|
};
|
|
17
21
|
declare const VpaInput: (props: VpaInputProps) => h.JSX.Element;
|
|
@@ -2,7 +2,7 @@ import { AddressField, AddressData } from '../../../types';
|
|
|
2
2
|
import Specifications from './Specifications';
|
|
3
3
|
import { ValidatorRules } from '../../../utils/Validator/types';
|
|
4
4
|
import { ValidationRuleResult } from '../../../utils/Validator/ValidationRuleResult';
|
|
5
|
-
export
|
|
5
|
+
export type StringObject = {
|
|
6
6
|
[key: string]: string;
|
|
7
7
|
};
|
|
8
8
|
export interface AddressProps {
|
|
@@ -78,8 +78,8 @@ export interface StateFieldItem {
|
|
|
78
78
|
id: string;
|
|
79
79
|
name: string;
|
|
80
80
|
}
|
|
81
|
-
|
|
82
|
-
export
|
|
81
|
+
type AddressFieldsGroup = [AddressField, number][];
|
|
82
|
+
export type AddressSchema = (AddressField | AddressFieldsGroup)[];
|
|
83
83
|
export interface AddressSpecifications {
|
|
84
84
|
[key: string]: {
|
|
85
85
|
hasDataset?: boolean;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { ComponentChildren, h } from 'preact';
|
|
2
2
|
import './Modal.scss';
|
|
3
|
-
|
|
3
|
+
type ModalRenderFnProps = {
|
|
4
4
|
/**
|
|
5
5
|
* Function used to properly trigger the Modal close mechanism. It takes into account the element that the Modal needs
|
|
6
6
|
* to set focus when it is dismissed.
|
|
7
7
|
*/
|
|
8
8
|
onCloseModal(): void;
|
|
9
9
|
};
|
|
10
|
-
|
|
10
|
+
type ModalProps = {
|
|
11
11
|
children: ({ onCloseModal }: ModalRenderFnProps) => ComponentChildren;
|
|
12
12
|
classNameModifiers?: string[];
|
|
13
13
|
onClose(): void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
type UseModalProps = {
|
|
2
2
|
modalElement?: HTMLElement;
|
|
3
3
|
isOpen: boolean;
|
|
4
4
|
isDismissible: boolean;
|
|
@@ -6,7 +6,7 @@ declare type UseModalProps = {
|
|
|
6
6
|
focusAfterClose: HTMLElement;
|
|
7
7
|
onClose(): void;
|
|
8
8
|
};
|
|
9
|
-
|
|
9
|
+
type UseModalHook = {
|
|
10
10
|
/**
|
|
11
11
|
* Function that focus on the 'focusAfterClose' element, and then closes the modal
|
|
12
12
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { FieldsetVisibility, PersonalDetailsSchema } from '../../../types';
|
|
2
2
|
import { ValidatorRules } from '../../../utils/Validator/types';
|
|
3
|
-
|
|
3
|
+
type PersonalDetailsPlaceholders = Omit<PersonalDetailsSchema, 'gender'>;
|
|
4
4
|
export interface PersonalDetailsProps {
|
|
5
5
|
label?: string;
|
|
6
6
|
namePrefix?: string;
|
|
@@ -16,7 +16,7 @@ declare class QRLoader extends Component<QRLoaderProps, QRLoaderState> {
|
|
|
16
16
|
};
|
|
17
17
|
statusInterval: () => void;
|
|
18
18
|
componentDidMount(): void;
|
|
19
|
-
redirectToApp: (url: any
|
|
19
|
+
redirectToApp: (url: any) => void;
|
|
20
20
|
componentDidUpdate(prevProps: any, prevState: any): void;
|
|
21
21
|
componentWillUnmount(): void;
|
|
22
22
|
private onTick;
|
|
@@ -5,10 +5,9 @@ export interface QRLoaderProps {
|
|
|
5
5
|
delay?: number;
|
|
6
6
|
countdownTime?: number;
|
|
7
7
|
onError?: (error: any) => void;
|
|
8
|
-
onComplete?: (data: any) => void;
|
|
8
|
+
onComplete?: (data: any, component: any) => void;
|
|
9
9
|
throttleTime?: number;
|
|
10
10
|
throttledInterval?: number;
|
|
11
|
-
shouldRedirectOnMobile?: boolean;
|
|
12
11
|
url?: string;
|
|
13
12
|
type?: string;
|
|
14
13
|
paymentData?: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CbObjOnError, SFFeedbackObj } from '../../types';
|
|
2
2
|
import SecuredField from '../../securedField/SecuredField';
|
|
3
|
-
|
|
3
|
+
type RtnType_callbackFn = (obj: CbObjOnError) => void;
|
|
4
4
|
export declare const processErrors: (pFeedbackObj: SFFeedbackObj, securedField: SecuredField, type: string, rootNode: HTMLElement, callbackFn: RtnType_callbackFn) => CbObjOnError;
|
|
5
5
|
export {};
|
|
@@ -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.
|
|
14
|
+
export declare const SF_VERSION = "4.4.1";
|
|
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[];
|
package/dist/types/components/internal/SecuredFields/lib/securedField/AbstractSecuredField.d.ts
CHANGED
|
@@ -62,7 +62,7 @@ export interface SFPlaceholdersObject {
|
|
|
62
62
|
[ENCRYPTED_BANK_ACCNT_NUMBER_FIELD]?: string;
|
|
63
63
|
[ENCRYPTED_BANK_LOCATION_FIELD]?: string;
|
|
64
64
|
}
|
|
65
|
-
export
|
|
65
|
+
export type AriaConfig = {
|
|
66
66
|
lang?: string;
|
|
67
67
|
} & {
|
|
68
68
|
[key: string]: AriaConfigObject;
|
|
@@ -182,9 +182,9 @@ export interface SendBrandObject {
|
|
|
182
182
|
export interface SendExpiryDateObject {
|
|
183
183
|
expiryDatePolicy: DatePolicyType;
|
|
184
184
|
}
|
|
185
|
-
export
|
|
186
|
-
export
|
|
187
|
-
export
|
|
188
|
-
export
|
|
189
|
-
export
|
|
185
|
+
export type RtnType_noParamVoidFn = () => void;
|
|
186
|
+
export type RtnType_postMessageListener = (event: Event) => void;
|
|
187
|
+
export type RtnType_callbackFn = (feedbackObj: SFFeedbackObj) => void;
|
|
188
|
+
export type CVCPolicyType = 'required' | 'optional' | 'hidden';
|
|
189
|
+
export type DatePolicyType = 'required' | 'optional' | 'hidden';
|
|
190
190
|
export {};
|
|
@@ -71,9 +71,9 @@ export interface IUIElement {
|
|
|
71
71
|
showValidation(): void;
|
|
72
72
|
setState(newState: object): void;
|
|
73
73
|
}
|
|
74
|
-
export
|
|
75
|
-
export
|
|
76
|
-
export
|
|
74
|
+
export type UIElementStatus = 'ready' | 'loading' | 'error' | 'success';
|
|
75
|
+
export type ActionDescriptionType = 'qr-code-loaded' | 'polling-started' | 'fingerprint-iframe-loaded' | 'challenge-iframe-loaded';
|
|
76
|
+
export type PayButtonFunctionProps = Omit<PayButtonProps, 'amount'>;
|
|
77
77
|
export interface ActionHandledReturnObject {
|
|
78
78
|
componentType: string;
|
|
79
79
|
actionDescription: ActionDescriptionType;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { CoreOptions } from '../types';
|
|
2
|
+
export type AnalyticsProps = Pick<CoreOptions, 'loadingContext' | 'locale' | 'clientKey' | 'analytics' | 'amount'>;
|
|
2
3
|
declare class Analytics {
|
|
3
4
|
private static defaultProps;
|
|
4
5
|
checkoutAttemptId: string;
|
|
@@ -7,7 +8,7 @@ declare class Analytics {
|
|
|
7
8
|
private readonly logTelemetry;
|
|
8
9
|
private readonly queue;
|
|
9
10
|
readonly collectId: any;
|
|
10
|
-
constructor({ loadingContext, locale, clientKey, analytics }:
|
|
11
|
+
constructor({ loadingContext, locale, clientKey, analytics, amount }: AnalyticsProps);
|
|
11
12
|
send(event: any): void;
|
|
12
13
|
}
|
|
13
14
|
export default Analytics;
|
|
@@ -11,7 +11,7 @@ interface RiskModuleProps extends BaseElementProps {
|
|
|
11
11
|
risk: RiskModuleOptions;
|
|
12
12
|
loadingContext: string;
|
|
13
13
|
}
|
|
14
|
-
export
|
|
14
|
+
export type RiskData = string | boolean;
|
|
15
15
|
export default class RiskElement extends BaseElement<RiskModuleProps> {
|
|
16
16
|
static type: string;
|
|
17
17
|
static defaultProps: {
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import { AnalyticsProps } from '../../Analytics/Analytics';
|
|
2
|
+
type Config = Pick<AnalyticsProps, 'loadingContext' | 'locale' | 'clientKey' | 'amount'>;
|
|
1
3
|
/**
|
|
2
4
|
* Log event to Adyen
|
|
3
5
|
* @param config -
|
|
4
6
|
*/
|
|
5
|
-
declare const logTelemetry: (config:
|
|
7
|
+
declare const logTelemetry: (config: Config) => (event: any) => Promise<any>;
|
|
6
8
|
export default logTelemetry;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Experiment } from '../../Analytics/types';
|
|
2
|
-
|
|
2
|
+
type CheckoutAttemptIdSession = {
|
|
3
3
|
id: string;
|
|
4
4
|
timestamp: number;
|
|
5
5
|
};
|
|
6
|
-
|
|
6
|
+
type CollectIdProps = {
|
|
7
7
|
clientKey: string;
|
|
8
8
|
loadingContext: string;
|
|
9
9
|
experiments: Experiment[];
|
|
@@ -8,7 +8,7 @@ interface HttpOptions {
|
|
|
8
8
|
path: string;
|
|
9
9
|
errorLevel?: ErrorLevel;
|
|
10
10
|
}
|
|
11
|
-
|
|
11
|
+
type ErrorLevel = 'silent' | 'info' | 'warn' | 'error' | 'fatal';
|
|
12
12
|
export declare function http<T>(options: HttpOptions, data?: any): Promise<T>;
|
|
13
13
|
export declare function httpGet<T = any>(options: HttpOptions, data?: any): Promise<T>;
|
|
14
14
|
export declare function httpPost<T = any>(options: HttpOptions, data?: any): Promise<T>;
|
|
@@ -58,7 +58,7 @@ export interface CoreOptions {
|
|
|
58
58
|
order?: Order;
|
|
59
59
|
[key: string]: any;
|
|
60
60
|
}
|
|
61
|
-
export
|
|
61
|
+
export type PaymentMethodsConfiguration = {
|
|
62
62
|
[key in keyof PaymentMethods]?: Partial<PaymentMethodOptions<key>>;
|
|
63
63
|
} | {
|
|
64
64
|
[key in PaymentActionsType]?: any;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
export declare class Language {
|
|
2
|
-
|
|
2
|
+
private readonly supportedLocales;
|
|
3
3
|
readonly locale: string;
|
|
4
4
|
readonly languageCode: string;
|
|
5
|
-
|
|
6
|
-
translations: object;
|
|
5
|
+
translations: Record<string, string>;
|
|
7
6
|
readonly customTranslations: any;
|
|
8
7
|
loaded: Promise<any>;
|
|
8
|
+
constructor(locale?: string, customTranslations?: object);
|
|
9
9
|
/**
|
|
10
10
|
* Returns a translated string from a key in the current {@link Language.locale}
|
|
11
11
|
* @param key - Translation key
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import locales from './locales';
|
|
2
|
-
export
|
|
3
|
-
export
|
|
2
|
+
export type Locales = keyof typeof locales;
|
|
3
|
+
export type CustomTranslations = {
|
|
4
4
|
[key: string]: {
|
|
5
5
|
[message: string]: string;
|
|
6
6
|
};
|
|
@@ -33,11 +33,12 @@ export declare function parseLocale(locale: string, supportedLocales?: string[])
|
|
|
33
33
|
*/
|
|
34
34
|
export declare function formatCustomTranslations(customTranslations: object, supportedLocales: string[]): object;
|
|
35
35
|
/**
|
|
36
|
-
* Returns an
|
|
36
|
+
* Returns an Object which contains all the key/values of the translation labels
|
|
37
|
+
*
|
|
37
38
|
* @param locale - The locale the user wants to use
|
|
38
|
-
* @param customTranslations -
|
|
39
|
+
* @param customTranslations - Custom translations provided by the merchant
|
|
39
40
|
*/
|
|
40
|
-
export declare const loadTranslations: (locale: string, customTranslations?: object) => Promise<
|
|
41
|
+
export declare const loadTranslations: (locale: string, customTranslations?: object) => Promise<Record<string, string>>;
|
|
41
42
|
/**
|
|
42
43
|
* Injects JSX elements in a middle of a translation and returns a JSX array
|
|
43
44
|
* The input string should use %# as the token to know where to insert the component
|