@adyen/adyen-web 5.44.0 → 5.46.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 +1 -0
- 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 +1 -0
- package/dist/cjs/adyen.css.map +1 -1
- package/dist/cjs/index.js +1 -1
- package/dist/es/adyen.css +1 -0
- package/dist/es/adyen.css.map +1 -1
- package/dist/es/index.js +1 -1
- package/dist/es.modern/adyen.css +1 -0
- package/dist/es.modern/adyen.css.map +1 -1
- package/dist/es.modern/index.js +1 -1
- package/dist/types/components/Ach/Ach.d.ts +1 -1
- package/dist/types/components/ApplePay/utils.d.ts +1 -1
- package/dist/types/components/BcmcMobile/BcmcMobile.d.ts +1 -1
- package/dist/types/components/Card/Bancontact.d.ts +1 -1
- package/dist/types/components/Card/Card.d.ts +1 -1
- package/dist/types/components/Card/components/CardInput/components/CardFieldsWrapper.d.ts +2 -1
- package/dist/types/components/Card/components/CardInput/types.d.ts +2 -0
- package/dist/types/components/Card/types.d.ts +11 -0
- package/dist/types/components/CashAppPay/CashAppPay.d.ts +1 -1
- package/dist/types/components/CashAppPay/types.d.ts +10 -0
- package/dist/types/components/ClickToPay/ClickToPay.d.ts +1 -1
- package/dist/types/components/Dragonpay/Dragonpay.d.ts +1 -1
- package/dist/types/components/Dropin/Dropin.d.ts +1 -1
- package/dist/types/components/Dropin/components/PaymentMethod/OrderPaymentMethods.d.ts +2 -1
- package/dist/types/components/Dropin/components/PaymentMethod/useBrandLogoConfiguration.d.ts +6 -0
- package/dist/types/components/Dropin/types.d.ts +5 -0
- package/dist/types/components/DuitNow/DuitNow.d.ts +1 -1
- package/dist/types/components/Giftcard/components/GiftcardPinField.d.ts +1 -1
- package/dist/types/components/Giftcard/components/types.d.ts +2 -0
- package/dist/types/components/Klarna/types.d.ts +2 -0
- package/dist/types/components/PayNow/PayNow.d.ts +1 -1
- package/dist/types/components/PayPal/types.d.ts +5 -0
- package/dist/types/components/PromptPay/PromptPay.d.ts +1 -1
- package/dist/types/components/Swish/Swish.d.ts +1 -1
- package/dist/types/components/WeChat/WeChat.d.ts +1 -1
- package/dist/types/components/internal/Address/components/AddressSearch.d.ts +16 -0
- package/dist/types/components/internal/Address/types.d.ts +6 -0
- package/dist/types/components/internal/Address/utils.d.ts +2 -0
- package/dist/types/components/internal/FormFields/Select/Select.d.ts +1 -1
- package/dist/types/components/internal/FormFields/Select/types.d.ts +3 -0
- package/dist/types/components/internal/IbanInput/specifications.d.ts +426 -0
- package/dist/types/components/internal/IbanInput/utils.d.ts +45 -0
- package/dist/types/components/internal/SecuredFields/lib/utilities/commonUtils.d.ts +45 -0
- package/dist/types/components/internal/SecuredFields/lib/utilities/dom.d.ts +7 -0
- package/dist/types/components/internal/SecuredFields/lib/utilities/logger.d.ts +23 -1
- package/dist/types/components/internal/SecuredFields/utils.d.ts +15 -0
- package/dist/types/components/types.d.ts +15 -1
- package/dist/types/core/core.d.ts +37 -0
- package/dist/types/core/types.d.ts +8 -0
- package/dist/types/language/config.d.ts +3 -0
- package/dist/types/language/locales/index.d.ts +6 -0
- package/dist/types/language/utils.d.ts +11 -0
- package/dist/types/types/index.d.ts +1 -0
- package/dist/types/utils/amount-util.d.ts +28 -1
- package/dist/types/utils/base64.d.ts +8 -0
- package/package.json +1 -1
|
@@ -9,6 +9,7 @@ export declare class AchElement extends UIElement<AchElementProps> {
|
|
|
9
9
|
hasHolderName?: boolean;
|
|
10
10
|
enableStoreDetails: boolean;
|
|
11
11
|
bankAccountNumber: string;
|
|
12
|
+
environment?: string;
|
|
12
13
|
session?: import("../../core/CheckoutSession/CheckoutSession").default;
|
|
13
14
|
onChange?: (state: any, element: UIElement<any>) => void;
|
|
14
15
|
onValid?: (state: any, element: UIElement<any>) => void;
|
|
@@ -21,7 +22,6 @@ export declare class AchElement extends UIElement<AchElementProps> {
|
|
|
21
22
|
onPaymentCompleted?: (result: any, element: UIElement<any>) => void;
|
|
22
23
|
beforeRedirect?: (resolve: any, reject: any, redirectData: any, element: UIElement<any>) => void;
|
|
23
24
|
isInstantPayment?: boolean;
|
|
24
|
-
environment?: string;
|
|
25
25
|
type?: string;
|
|
26
26
|
name?: string;
|
|
27
27
|
icon?: string;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare function resolveSupportedVersion(latestVersion:
|
|
1
|
+
export declare function resolveSupportedVersion(latestVersion: number): number | null;
|
|
2
2
|
export declare function mapBrands(brands: any): any;
|
|
@@ -12,6 +12,7 @@ declare class BCMCMobileElement extends QRLoaderContainer {
|
|
|
12
12
|
introduction: string;
|
|
13
13
|
instructions?: string;
|
|
14
14
|
copyBtn?: boolean;
|
|
15
|
+
environment?: string;
|
|
15
16
|
session?: import("../../core/CheckoutSession/CheckoutSession").default;
|
|
16
17
|
onChange?: (state: any, element: import("../UIElement").UIElement<any>) => void;
|
|
17
18
|
onValid?: (state: any, element: import("../UIElement").UIElement<any>) => void;
|
|
@@ -24,7 +25,6 @@ declare class BCMCMobileElement extends QRLoaderContainer {
|
|
|
24
25
|
onPaymentCompleted?: (result: any, element: import("../UIElement").UIElement<any>) => void;
|
|
25
26
|
beforeRedirect?: (resolve: any, reject: any, redirectData: any, element: import("../UIElement").UIElement<any>) => void;
|
|
26
27
|
isInstantPayment?: boolean;
|
|
27
|
-
environment?: string;
|
|
28
28
|
name?: string;
|
|
29
29
|
icon?: string;
|
|
30
30
|
amount?: import("../../types").PaymentAmount;
|
|
@@ -67,6 +67,7 @@ declare class BancontactElement extends CardElement {
|
|
|
67
67
|
onFocus?: (event: import("../internal/SecuredFields/lib/types").CbObjOnFocus) => void;
|
|
68
68
|
onBinValue?: (event: import("../internal/SecuredFields/lib/types").CbObjOnBinValue) => void;
|
|
69
69
|
onBinLookup?: (event: import("../internal/SecuredFields/lib/types").CbObjOnBinLookup) => void;
|
|
70
|
+
environment?: string;
|
|
70
71
|
session?: import("../../core/CheckoutSession/CheckoutSession").default;
|
|
71
72
|
onChange?: (state: any, element: import("../UIElement").UIElement<any>) => void;
|
|
72
73
|
onValid?: (state: any, element: import("../UIElement").UIElement<any>) => void;
|
|
@@ -78,7 +79,6 @@ declare class BancontactElement extends CardElement {
|
|
|
78
79
|
onPaymentCompleted?: (result: any, element: import("../UIElement").UIElement<any>) => void;
|
|
79
80
|
beforeRedirect?: (resolve: any, reject: any, redirectData: any, element: import("../UIElement").UIElement<any>) => void;
|
|
80
81
|
isInstantPayment?: boolean;
|
|
81
|
-
environment?: string;
|
|
82
82
|
name?: string;
|
|
83
83
|
amount?: import("../../types").PaymentAmount;
|
|
84
84
|
secondaryAmount?: import("../../types").PaymentAmountExtended;
|
|
@@ -76,6 +76,7 @@ export declare class CardElement extends UIElement<CardElementProps> {
|
|
|
76
76
|
onFocus?: (event: import("../internal/SecuredFields/lib/types").CbObjOnFocus) => void;
|
|
77
77
|
onBinValue?: (event: import("../internal/SecuredFields/lib/types").CbObjOnBinValue) => void;
|
|
78
78
|
onBinLookup?: (event: CbObjOnBinLookup) => void;
|
|
79
|
+
environment?: string;
|
|
79
80
|
session?: import("../../core/CheckoutSession/CheckoutSession").default;
|
|
80
81
|
onChange?: (state: any, element: UIElement<any>) => void;
|
|
81
82
|
onValid?: (state: any, element: UIElement<any>) => void;
|
|
@@ -87,7 +88,6 @@ export declare class CardElement extends UIElement<CardElementProps> {
|
|
|
87
88
|
onPaymentCompleted?: (result: any, element: UIElement<any>) => void;
|
|
88
89
|
beforeRedirect?: (resolve: any, reject: any, redirectData: any, element: UIElement<any>) => void;
|
|
89
90
|
isInstantPayment?: boolean;
|
|
90
|
-
environment?: string;
|
|
91
91
|
name?: string;
|
|
92
92
|
amount?: import("../../types").PaymentAmount;
|
|
93
93
|
secondaryAmount?: import("../../types").PaymentAmountExtended;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { h } from 'preact';
|
|
2
|
-
export declare const CardFieldsWrapper: ({ data, valid, errors, handleChangeFor, sfpState, setFocusOn, cvcPolicy, focusedElement, hasInstallments, handleInstallments, showAmountsInInstallments, brandsIcons, formData, formErrors, formValid, expiryDatePolicy, dualBrandSelectElements, extensions, selectedBrandValue, showKCP, showBrazilianSSN, socialSecurityNumber, handleOnStoreDetails, billingAddress, handleAddress, setAddressRef, partialAddressSchema, amount, billingAddressRequired, billingAddressRequiredFields, billingAddressAllowedCountries, billingAddressValidationRules, brandsConfiguration, enableStoreDetails, hasCVC, hasHolderName, holderNameRequired, installmentOptions, placeholders, positionHolderNameOnTop, showBrandIcon, showBrandsUnderCardNumber, iOSFocusedField, disclaimerMessage }: {
|
|
2
|
+
export declare const CardFieldsWrapper: ({ data, valid, errors, handleChangeFor, sfpState, setFocusOn, cvcPolicy, focusedElement, hasInstallments, handleInstallments, showAmountsInInstallments, brandsIcons, formData, formErrors, formValid, expiryDatePolicy, dualBrandSelectElements, extensions, selectedBrandValue, showKCP, showBrazilianSSN, socialSecurityNumber, handleOnStoreDetails, billingAddress, handleAddress, setAddressRef, partialAddressSchema, onAddressLookup, amount, billingAddressRequired, billingAddressRequiredFields, billingAddressAllowedCountries, billingAddressValidationRules, brandsConfiguration, enableStoreDetails, hasCVC, hasHolderName, holderNameRequired, installmentOptions, placeholders, positionHolderNameOnTop, showBrandIcon, showBrandsUnderCardNumber, iOSFocusedField, disclaimerMessage }: {
|
|
3
3
|
data: any;
|
|
4
4
|
valid: any;
|
|
5
5
|
errors: any;
|
|
@@ -27,6 +27,7 @@ export declare const CardFieldsWrapper: ({ data, valid, errors, handleChangeFor,
|
|
|
27
27
|
handleAddress: any;
|
|
28
28
|
setAddressRef: any;
|
|
29
29
|
partialAddressSchema: any;
|
|
30
|
+
onAddressLookup: any;
|
|
30
31
|
amount: any;
|
|
31
32
|
billingAddressRequired: any;
|
|
32
33
|
billingAddressRequiredFields: any;
|
|
@@ -13,6 +13,7 @@ import Analytics from '../../../../core/Analytics';
|
|
|
13
13
|
import RiskElement from '../../../../core/RiskModule';
|
|
14
14
|
import { ComponentMethodsRef } from '../../../types';
|
|
15
15
|
import { DisclaimerMsgObject } from '../../../internal/DisclaimerMessage/DisclaimerMessage';
|
|
16
|
+
import { OnAddressLookupType } from '../../../internal/Address/components/AddressSearch';
|
|
16
17
|
export interface CardInputValidState {
|
|
17
18
|
holderName?: boolean;
|
|
18
19
|
billingAddress?: boolean;
|
|
@@ -101,6 +102,7 @@ export interface CardInputProps {
|
|
|
101
102
|
onFieldValid?: () => {};
|
|
102
103
|
onFocus?: (e: any) => {};
|
|
103
104
|
onLoad?: () => {};
|
|
105
|
+
onAddressLookup?: OnAddressLookupType;
|
|
104
106
|
payButton?: (obj: any) => {};
|
|
105
107
|
placeholders?: Placeholders;
|
|
106
108
|
positionHolderNameOnTop?: boolean;
|
|
@@ -17,6 +17,17 @@ export interface CardElementProps extends UIElementProps {
|
|
|
17
17
|
* Configuration for Click to Pay
|
|
18
18
|
*/
|
|
19
19
|
clickToPayConfiguration?: ClickToPayConfiguration;
|
|
20
|
+
/**
|
|
21
|
+
* Disable Click to Pay for testing purposes
|
|
22
|
+
* @defaultValue false
|
|
23
|
+
* @internal
|
|
24
|
+
*/
|
|
25
|
+
_disableClickToPay?: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* Funding source field populated when 'splitCardFundingSources' is used
|
|
28
|
+
* @internal
|
|
29
|
+
*/
|
|
30
|
+
fundingSource?: 'debit' | 'credit';
|
|
20
31
|
/**
|
|
21
32
|
* type will always be "card" (generic card, stored card)
|
|
22
33
|
* except for a single branded card when it will be the same as the brand prop
|
|
@@ -32,6 +32,7 @@ export declare class CashAppPay extends UIElement<CashAppPayElementProps> {
|
|
|
32
32
|
};
|
|
33
33
|
storedPaymentMethodId?: string;
|
|
34
34
|
cashtag?: string;
|
|
35
|
+
environment?: string;
|
|
35
36
|
session?: import("../../core/CheckoutSession/CheckoutSession").default;
|
|
36
37
|
onChange?: (state: any, element: UIElement<any>) => void;
|
|
37
38
|
onValid?: (state: any, element: UIElement<any>) => void;
|
|
@@ -44,7 +45,6 @@ export declare class CashAppPay extends UIElement<CashAppPayElementProps> {
|
|
|
44
45
|
onPaymentCompleted?: (result: any, element: UIElement<any>) => void;
|
|
45
46
|
beforeRedirect?: (resolve: any, reject: any, redirectData: any, element: UIElement<any>) => void;
|
|
46
47
|
isInstantPayment?: boolean;
|
|
47
|
-
environment?: string;
|
|
48
48
|
type?: string;
|
|
49
49
|
name?: string;
|
|
50
50
|
icon?: string;
|
|
@@ -43,6 +43,16 @@ export interface CashAppPayElementProps extends UIElementProps {
|
|
|
43
43
|
clientId: string;
|
|
44
44
|
scopeId: string;
|
|
45
45
|
};
|
|
46
|
+
/**
|
|
47
|
+
* If payment is tokenized, then API will return its ID
|
|
48
|
+
* @internal
|
|
49
|
+
*/
|
|
50
|
+
storedPaymentMethodId?: string;
|
|
51
|
+
/**
|
|
52
|
+
* If payment is tokenized, then API will return this value
|
|
53
|
+
* @internal
|
|
54
|
+
*/
|
|
55
|
+
cashtag?: string;
|
|
46
56
|
}
|
|
47
57
|
export type CashAppPayElementData = {
|
|
48
58
|
paymentMethod: {
|
|
@@ -14,6 +14,7 @@ export declare class ClickToPayElement extends UIElement<ClickToPayElementProps>
|
|
|
14
14
|
shopperEmail: any;
|
|
15
15
|
telephoneNumber: any;
|
|
16
16
|
locale: string;
|
|
17
|
+
environment?: string;
|
|
17
18
|
session?: import("../../core/CheckoutSession/CheckoutSession").default;
|
|
18
19
|
onChange?: (state: any, element: UIElement<any>) => void;
|
|
19
20
|
onValid?: (state: any, element: UIElement<any>) => void;
|
|
@@ -26,7 +27,6 @@ export declare class ClickToPayElement extends UIElement<ClickToPayElementProps>
|
|
|
26
27
|
onPaymentCompleted?: (result: any, element: UIElement<any>) => void;
|
|
27
28
|
beforeRedirect?: (resolve: any, reject: any, redirectData: any, element: UIElement<any>) => void;
|
|
28
29
|
isInstantPayment?: boolean;
|
|
29
|
-
environment?: string;
|
|
30
30
|
type?: string;
|
|
31
31
|
name?: string;
|
|
32
32
|
icon?: string;
|
|
@@ -21,6 +21,7 @@ export declare class DragonpayElement extends UIElement<DragonpayElementProps> {
|
|
|
21
21
|
loadingContext?: string;
|
|
22
22
|
reference?: string;
|
|
23
23
|
i18n?: import("../../language").default;
|
|
24
|
+
environment?: string;
|
|
24
25
|
session?: import("../../core/CheckoutSession/CheckoutSession").default;
|
|
25
26
|
onChange?: (state: any, element: UIElement<any>) => void;
|
|
26
27
|
onValid?: (state: any, element: UIElement<any>) => void;
|
|
@@ -33,7 +34,6 @@ export declare class DragonpayElement extends UIElement<DragonpayElementProps> {
|
|
|
33
34
|
onPaymentCompleted?: (result: any, element: UIElement<any>) => void;
|
|
34
35
|
beforeRedirect?: (resolve: any, reject: any, redirectData: any, element: UIElement<any>) => void;
|
|
35
36
|
isInstantPayment?: boolean;
|
|
36
|
-
environment?: string;
|
|
37
37
|
name?: string;
|
|
38
38
|
icon?: string;
|
|
39
39
|
amount?: import("../../types").PaymentAmount;
|
|
@@ -49,6 +49,7 @@ declare class DropinElement extends UIElement<DropinElementProps> {
|
|
|
49
49
|
/**
|
|
50
50
|
* Calls the onSubmit event with the state of the activePaymentMethod
|
|
51
51
|
*/
|
|
52
|
+
environment?: string;
|
|
52
53
|
session?: import("../../core/CheckoutSession/CheckoutSession").default;
|
|
53
54
|
onChange?: (state: any, element: UIElement<any>) => void;
|
|
54
55
|
onValid?: (state: any, element: UIElement<any>) => void;
|
|
@@ -60,7 +61,6 @@ declare class DropinElement extends UIElement<DropinElementProps> {
|
|
|
60
61
|
onPaymentCompleted?: (result: any, element: UIElement<any>) => void;
|
|
61
62
|
beforeRedirect?: (resolve: any, reject: any, redirectData: any, element: UIElement<any>) => void;
|
|
62
63
|
isInstantPayment?: boolean;
|
|
63
|
-
environment?: string;
|
|
64
64
|
type?: string;
|
|
65
65
|
name?: string;
|
|
66
66
|
icon?: string;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { h } from 'preact';
|
|
2
2
|
import './OrderPaymentMethods.scss';
|
|
3
|
-
export declare const OrderPaymentMethods: ({ order, orderStatus, onOrderCancel }: {
|
|
3
|
+
export declare const OrderPaymentMethods: ({ order, orderStatus, onOrderCancel, brandLogoConfiguration }: {
|
|
4
4
|
order: any;
|
|
5
5
|
orderStatus: any;
|
|
6
6
|
onOrderCancel: any;
|
|
7
|
+
brandLogoConfiguration: any;
|
|
7
8
|
}) => h.JSX.Element;
|
|
8
9
|
export default OrderPaymentMethods;
|
|
@@ -28,6 +28,11 @@ export interface DropinElementProps extends UIElementProps {
|
|
|
28
28
|
* @defaultValue []
|
|
29
29
|
*/
|
|
30
30
|
instantPaymentTypes?: InstantPaymentTypes[];
|
|
31
|
+
/**
|
|
32
|
+
* Instant Payment methods derived from the instantPaymentTypes property
|
|
33
|
+
* @internal
|
|
34
|
+
*/
|
|
35
|
+
instantPaymentMethods?: PaymentMethod[];
|
|
31
36
|
openFirstStoredPaymentMethod?: boolean;
|
|
32
37
|
openFirstPaymentMethod?: boolean;
|
|
33
38
|
onSubmit?: (data: any, component: any) => void;
|
|
@@ -12,6 +12,7 @@ declare class DuitNowElement extends QRLoaderContainer {
|
|
|
12
12
|
introduction: string;
|
|
13
13
|
instructions?: string;
|
|
14
14
|
copyBtn?: boolean;
|
|
15
|
+
environment?: string;
|
|
15
16
|
session?: import("../../core/CheckoutSession/CheckoutSession").default;
|
|
16
17
|
onChange?: (state: any, element: import("../UIElement").UIElement<any>) => void;
|
|
17
18
|
onValid?: (state: any, element: import("../UIElement").UIElement<any>) => void;
|
|
@@ -24,7 +25,6 @@ declare class DuitNowElement extends QRLoaderContainer {
|
|
|
24
25
|
onPaymentCompleted?: (result: any, element: import("../UIElement").UIElement<any>) => void;
|
|
25
26
|
beforeRedirect?: (resolve: any, reject: any, redirectData: any, element: import("../UIElement").UIElement<any>) => void;
|
|
26
27
|
isInstantPayment?: boolean;
|
|
27
|
-
environment?: string;
|
|
28
28
|
name?: string;
|
|
29
29
|
icon?: string;
|
|
30
30
|
amount?: import("../../types").PaymentAmount;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { h } from 'preact';
|
|
2
2
|
import { GiftcardFieldProps } from './types';
|
|
3
|
-
export declare const GiftcardPinField: ({ i18n, classNameModifiers, sfpState, focusedElement, setFocusOn }: GiftcardFieldProps) => h.JSX.Element;
|
|
3
|
+
export declare const GiftcardPinField: ({ i18n, classNameModifiers, sfpState, focusedElement, setFocusOn, label }: GiftcardFieldProps) => h.JSX.Element;
|
|
@@ -8,6 +8,7 @@ export type GiftcardFieldsProps = {
|
|
|
8
8
|
getCardErrorMessage: any;
|
|
9
9
|
focusedElement: any;
|
|
10
10
|
setFocusOn: any;
|
|
11
|
+
label?: string;
|
|
11
12
|
};
|
|
12
13
|
export type GiftcardFieldProps = {
|
|
13
14
|
i18n: Language;
|
|
@@ -16,4 +17,5 @@ export type GiftcardFieldProps = {
|
|
|
16
17
|
getCardErrorMessage: any;
|
|
17
18
|
focusedElement: any;
|
|
18
19
|
setFocusOn: any;
|
|
20
|
+
label?: string;
|
|
19
21
|
};
|
|
@@ -25,6 +25,8 @@ interface KlarnaPaymentsShared {
|
|
|
25
25
|
paymentMethodType: string;
|
|
26
26
|
}
|
|
27
27
|
export interface KlarnaWidgetProps extends KlarnaPaymentsShared {
|
|
28
|
+
/** @internal */
|
|
29
|
+
payButton: (options: any) => any;
|
|
28
30
|
onComplete: (detailsData: any) => void;
|
|
29
31
|
onError: (error: any) => void;
|
|
30
32
|
}
|
|
@@ -12,6 +12,7 @@ declare class PayNowElement extends QRLoaderContainer {
|
|
|
12
12
|
introduction: string;
|
|
13
13
|
instructions?: string;
|
|
14
14
|
copyBtn?: boolean;
|
|
15
|
+
environment?: string;
|
|
15
16
|
session?: import("../../core/CheckoutSession/CheckoutSession").default;
|
|
16
17
|
onChange?: (state: any, element: import("../UIElement").UIElement<any>) => void;
|
|
17
18
|
onValid?: (state: any, element: import("../UIElement").UIElement<any>) => void;
|
|
@@ -24,7 +25,6 @@ declare class PayNowElement extends QRLoaderContainer {
|
|
|
24
25
|
onPaymentCompleted?: (result: any, element: import("../UIElement").UIElement<any>) => void;
|
|
25
26
|
beforeRedirect?: (resolve: any, reject: any, redirectData: any, element: import("../UIElement").UIElement<any>) => void;
|
|
26
27
|
isInstantPayment?: boolean;
|
|
27
|
-
environment?: string;
|
|
28
28
|
name?: string;
|
|
29
29
|
icon?: string;
|
|
30
30
|
amount?: import("../../types").PaymentAmount;
|
|
@@ -116,6 +116,11 @@ interface PayPalCommonProps {
|
|
|
116
116
|
* @see {@link https://developer.paypal.com/docs/business/javascript-sdk/javascript-sdk-reference/#onshippingchange}
|
|
117
117
|
*/
|
|
118
118
|
onShippingChange?: (data: any, actions: any) => void;
|
|
119
|
+
/**
|
|
120
|
+
* Identifies if the payment is Express.
|
|
121
|
+
* @defaultValue false
|
|
122
|
+
*/
|
|
123
|
+
isExpress?: boolean;
|
|
119
124
|
}
|
|
120
125
|
export interface PayPalConfig {
|
|
121
126
|
/**
|
|
@@ -12,6 +12,7 @@ declare class PromptPayElement extends QRLoaderContainer {
|
|
|
12
12
|
introduction: string;
|
|
13
13
|
instructions?: string;
|
|
14
14
|
copyBtn?: boolean;
|
|
15
|
+
environment?: string;
|
|
15
16
|
session?: import("../../core/CheckoutSession/CheckoutSession").default;
|
|
16
17
|
onChange?: (state: any, element: import("../UIElement").UIElement<any>) => void;
|
|
17
18
|
onValid?: (state: any, element: import("../UIElement").UIElement<any>) => void;
|
|
@@ -24,7 +25,6 @@ declare class PromptPayElement extends QRLoaderContainer {
|
|
|
24
25
|
onPaymentCompleted?: (result: any, element: import("../UIElement").UIElement<any>) => void;
|
|
25
26
|
beforeRedirect?: (resolve: any, reject: any, redirectData: any, element: import("../UIElement").UIElement<any>) => void;
|
|
26
27
|
isInstantPayment?: boolean;
|
|
27
|
-
environment?: string;
|
|
28
28
|
name?: string;
|
|
29
29
|
icon?: string;
|
|
30
30
|
amount?: import("../../types").PaymentAmount;
|
|
@@ -12,6 +12,7 @@ declare class SwishElement extends QRLoaderContainer {
|
|
|
12
12
|
introduction: string;
|
|
13
13
|
instructions: string;
|
|
14
14
|
copyBtn?: boolean;
|
|
15
|
+
environment?: string;
|
|
15
16
|
session?: import("../../core/CheckoutSession/CheckoutSession").default;
|
|
16
17
|
onChange?: (state: any, element: import("../UIElement").UIElement<any>) => void;
|
|
17
18
|
onValid?: (state: any, element: import("../UIElement").UIElement<any>) => void;
|
|
@@ -24,7 +25,6 @@ declare class SwishElement extends QRLoaderContainer {
|
|
|
24
25
|
onPaymentCompleted?: (result: any, element: import("../UIElement").UIElement<any>) => void;
|
|
25
26
|
beforeRedirect?: (resolve: any, reject: any, redirectData: any, element: import("../UIElement").UIElement<any>) => void;
|
|
26
27
|
isInstantPayment?: boolean;
|
|
27
|
-
environment?: string;
|
|
28
28
|
name?: string;
|
|
29
29
|
icon?: string;
|
|
30
30
|
amount?: import("../../types").PaymentAmount;
|
|
@@ -12,6 +12,7 @@ declare class WeChatPayElement extends QRLoaderContainer {
|
|
|
12
12
|
introduction: string;
|
|
13
13
|
instructions?: string;
|
|
14
14
|
copyBtn?: boolean;
|
|
15
|
+
environment?: string;
|
|
15
16
|
session?: import("../../core/CheckoutSession/CheckoutSession").default;
|
|
16
17
|
onChange?: (state: any, element: import("../UIElement").UIElement<any>) => void;
|
|
17
18
|
onValid?: (state: any, element: import("../UIElement").UIElement<any>) => void;
|
|
@@ -24,7 +25,6 @@ declare class WeChatPayElement extends QRLoaderContainer {
|
|
|
24
25
|
onPaymentCompleted?: (result: any, element: import("../UIElement").UIElement<any>) => void;
|
|
25
26
|
beforeRedirect?: (resolve: any, reject: any, redirectData: any, element: import("../UIElement").UIElement<any>) => void;
|
|
26
27
|
isInstantPayment?: boolean;
|
|
27
|
-
environment?: string;
|
|
28
28
|
name?: string;
|
|
29
29
|
icon?: string;
|
|
30
30
|
amount?: import("../../types").PaymentAmount;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { h } from 'preact';
|
|
2
|
+
import { AddressLookupItem } from '../types';
|
|
3
|
+
import './AddressSearch.scss';
|
|
4
|
+
export type OnAddressLookupType = (value: string, actions: {
|
|
5
|
+
resolve: (value: Array<AddressLookupItem>) => void;
|
|
6
|
+
reject: (reason?: any) => void;
|
|
7
|
+
}) => Promise<void>;
|
|
8
|
+
interface AddressSearchProps {
|
|
9
|
+
onAddressLookup?: OnAddressLookupType;
|
|
10
|
+
onSelect: any;
|
|
11
|
+
onManualAddress: any;
|
|
12
|
+
externalErrorMessage: string;
|
|
13
|
+
hideManualButton: boolean;
|
|
14
|
+
}
|
|
15
|
+
export default function AddressSearch({ onAddressLookup, onSelect, onManualAddress, externalErrorMessage, hideManualButton }: AddressSearchProps): h.JSX.Element;
|
|
16
|
+
export {};
|
|
@@ -2,6 +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
|
+
import { OnAddressLookupType } from './components/AddressSearch';
|
|
5
6
|
export type StringObject = {
|
|
6
7
|
[key: string]: string;
|
|
7
8
|
};
|
|
@@ -11,6 +12,7 @@ export interface AddressProps {
|
|
|
11
12
|
data?: object;
|
|
12
13
|
label?: string;
|
|
13
14
|
onChange: (newState: any) => void;
|
|
15
|
+
onAddressLookup?: OnAddressLookupType;
|
|
14
16
|
requiredFields?: string[];
|
|
15
17
|
ref?: any;
|
|
16
18
|
specifications?: AddressSpecifications;
|
|
@@ -22,6 +24,10 @@ export interface AddressProps {
|
|
|
22
24
|
showPayButton?: boolean;
|
|
23
25
|
setComponentRef?: (ref: any) => void;
|
|
24
26
|
}
|
|
27
|
+
export interface AddressLookupItem extends AddressData {
|
|
28
|
+
id: string;
|
|
29
|
+
name: string;
|
|
30
|
+
}
|
|
25
31
|
export interface AddressStateError {
|
|
26
32
|
street?: ValidationRuleResult;
|
|
27
33
|
houseNumberOrName?: ValidationRuleResult;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import Language from '../../../language';
|
|
2
2
|
import { StringObject } from './types';
|
|
3
|
+
export declare const DEFAULT_DEBOUNCE_TIME_MS = 300;
|
|
3
4
|
/**
|
|
4
5
|
* Used by the SRPanel sorting function to tell it whether we need to prepend the field type to the SR panel message, and, if so, we retrieve the correct translation for the field type.
|
|
5
6
|
* (Whether we need to prepend the field type depends on whether we know that the error message correctly reflects the label of the field. Ultimately all error messages should do this
|
|
6
7
|
* and this mapping fn will become redundant)
|
|
7
8
|
*/
|
|
8
9
|
export declare const mapFieldKey: (key: string, i18n: Language, countrySpecificLabels: StringObject) => string;
|
|
10
|
+
export declare const debounce: (fn: Function, ms?: number) => (this: any, ...args: any[]) => void;
|
|
@@ -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, disabled }: SelectProps): h.JSX.Element;
|
|
4
|
+
declare function Select({ items, className, classNameModifiers, filterable, readonly, onChange, onInput, selected, name, isInvalid, isValid, placeholder, uniqueId, disabled, disableTextFilter, clearOnSelect }: SelectProps): h.JSX.Element;
|
|
5
5
|
declare namespace Select {
|
|
6
6
|
var defaultProps: {
|
|
7
7
|
className: string;
|
|
@@ -20,11 +20,14 @@ export interface SelectProps {
|
|
|
20
20
|
name: string;
|
|
21
21
|
};
|
|
22
22
|
}) => void;
|
|
23
|
+
onInput?: (value: string) => void;
|
|
23
24
|
placeholder: string;
|
|
24
25
|
readonly: boolean;
|
|
25
26
|
selected: string;
|
|
26
27
|
uniqueId?: string;
|
|
27
28
|
disabled: boolean;
|
|
29
|
+
disableTextFilter: boolean;
|
|
30
|
+
clearOnSelect: boolean;
|
|
28
31
|
}
|
|
29
32
|
export interface SelectButtonProps {
|
|
30
33
|
inputText: string;
|