@adyen/adyen-web 5.42.1 → 5.43.1
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 +7 -7
- 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 +7 -7
- package/dist/cjs/adyen.css.map +1 -1
- package/dist/cjs/index.js +1 -1
- package/dist/es/adyen.css +7 -7
- package/dist/es/adyen.css.map +1 -1
- package/dist/es/index.js +1 -1
- package/dist/es.modern/adyen.css +7 -7
- 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 -0
- package/dist/types/components/AfterPay/AfterPayB2B.d.ts +1 -1
- package/dist/types/components/BcmcMobile/BcmcMobile.d.ts +1 -0
- package/dist/types/components/Card/Bancontact.d.ts +3 -1
- package/dist/types/components/Card/Card.d.ts +7 -6
- package/dist/types/components/Card/components/ClickToPayWrapper.d.ts +1 -1
- package/dist/types/components/Card/types.d.ts +1 -0
- package/dist/types/components/ClickToPay/ClickToPay.d.ts +71 -0
- package/dist/types/components/ClickToPay/ClickToPay.spec.d.ts +1 -0
- package/dist/types/components/ClickToPay/index.d.ts +1 -0
- package/dist/types/components/ClickToPay/types.d.ts +22 -0
- package/dist/types/components/Dragonpay/Dragonpay.d.ts +1 -0
- package/dist/types/components/Dropin/Dropin.d.ts +5 -4
- package/dist/types/components/Dropin/defaultProps.d.ts +0 -1
- package/dist/types/components/DuitNow/DuitNow.d.ts +1 -0
- package/dist/types/components/Giftcard/Giftcard.d.ts +2 -11
- package/dist/types/components/Giftcard/components/GiftcardFields.d.ts +1 -1
- package/dist/types/components/Giftcard/types.d.ts +8 -0
- package/dist/types/components/MealVoucherFR/components/MealVoucherFields.d.ts +1 -1
- package/dist/types/components/OnlineBankingIN/index.d.ts +2 -2
- package/dist/types/components/PayNow/PayNow.d.ts +1 -0
- package/dist/types/components/PromptPay/PromptPay.d.ts +1 -0
- package/dist/types/components/Swish/Swish.d.ts +1 -0
- package/dist/types/components/Twint/Twint.d.ts +2 -2
- package/dist/types/components/WalletIN/index.d.ts +2 -2
- package/dist/types/components/WeChat/WeChat.d.ts +1 -0
- package/dist/types/components/index.d.ts +4 -2
- package/dist/types/components/internal/Alert/Alert.d.ts +1 -1
- package/dist/types/components/internal/ClickToPay/components/CtPLogin/CtPLoginInput.d.ts +1 -1
- package/dist/types/components/internal/ClickToPay/context/ClickToPayContext.d.ts +3 -1
- package/dist/types/components/internal/ClickToPay/context/ClickToPayProvider.d.ts +2 -1
- package/dist/types/components/internal/ClickToPay/services/ClickToPayService.d.ts +1 -0
- package/dist/types/components/internal/ClickToPay/services/create-clicktopay-service.d.ts +1 -2
- package/dist/types/components/internal/ClickToPay/services/sdks/SrciError.d.ts +1 -0
- package/dist/types/components/internal/ClickToPay/services/types.d.ts +1 -0
- package/dist/types/components/internal/ClickToPay/types.d.ts +5 -1
- package/dist/types/components/internal/SecuredFields/lib/configuration/constants.d.ts +1 -1
- package/dist/types/components/types.d.ts +8 -1
- package/dist/types/core/Errors/SRPanel.d.ts +1 -0
- package/dist/types/core/ProcessResponse/PaymentMethodsResponse/PaymentMethodsResponse.d.ts +2 -1
- package/dist/types/core/core.d.ts +1 -6
- package/dist/types/core/types.d.ts +48 -1
- package/dist/types/types/index.d.ts +8 -1
- package/dist/types/utils/Formatters/formatters.d.ts +1 -1
- package/package.json +12 -9
|
@@ -3,12 +3,23 @@ import { PaymentMethods, PaymentMethodOptions, PaymentActionsType, PaymentAmount
|
|
|
3
3
|
import { AnalyticsOptions } from './Analytics/types';
|
|
4
4
|
import { PaymentMethodsResponse } from './ProcessResponse/PaymentMethodsResponse/types';
|
|
5
5
|
import { RiskModuleOptions } from './RiskModule/RiskModule';
|
|
6
|
+
import { ActionHandledReturnObject, OnPaymentCompletedData, PaymentData } from '../components/types';
|
|
7
|
+
import UIElement from '../components/UIElement';
|
|
8
|
+
import AdyenCheckoutError from './Errors/AdyenCheckoutError';
|
|
9
|
+
import { GiftCardElementData } from '../components/Giftcard/types';
|
|
10
|
+
import { SRPanelProps } from './Errors/types';
|
|
11
|
+
type PromiseResolve = typeof Promise.resolve;
|
|
12
|
+
type PromiseReject = typeof Promise.reject;
|
|
6
13
|
export interface CoreOptions {
|
|
7
14
|
session?: any;
|
|
8
15
|
/**
|
|
9
16
|
* Use test. When you're ready to accept live payments, change the value to one of our {@link https://docs.adyen.com/checkout/drop-in-web#testing-your-integration | live environments}.
|
|
10
17
|
*/
|
|
11
18
|
environment?: 'test' | 'live' | 'live-us' | 'live-au' | 'live-apse' | 'live-in' | string;
|
|
19
|
+
/**
|
|
20
|
+
* Show or hides a Pay Button for each payment method
|
|
21
|
+
*/
|
|
22
|
+
showPayButton?: boolean;
|
|
12
23
|
/**
|
|
13
24
|
* A public key linked to your web service user, used for {@link https://docs.adyen.com/user-management/client-side-authentication | client-side authentication}.
|
|
14
25
|
*/
|
|
@@ -53,14 +64,50 @@ export interface CoreOptions {
|
|
|
53
64
|
* Never display these payment methods
|
|
54
65
|
*/
|
|
55
66
|
removePaymentMethods?: string[];
|
|
67
|
+
/**
|
|
68
|
+
* Screen Reader configuration
|
|
69
|
+
*/
|
|
70
|
+
srConfig?: SRPanelProps;
|
|
56
71
|
resourceEnvironment?: string;
|
|
57
72
|
analytics?: AnalyticsOptions;
|
|
58
73
|
risk?: RiskModuleOptions;
|
|
59
74
|
order?: Order;
|
|
60
|
-
|
|
75
|
+
setStatusAutomatically?: boolean;
|
|
76
|
+
beforeRedirect?(resolve: PromiseResolve, reject: PromiseReject, redirectData: {
|
|
77
|
+
url: string;
|
|
78
|
+
method: string;
|
|
79
|
+
data?: any;
|
|
80
|
+
}): Promise<void>;
|
|
81
|
+
beforeSubmit?(state: any, element: UIElement, actions: {
|
|
82
|
+
resolve: PromiseResolve;
|
|
83
|
+
reject: PromiseReject;
|
|
84
|
+
}): Promise<void>;
|
|
85
|
+
onPaymentCompleted?(data: OnPaymentCompletedData, element?: UIElement): void;
|
|
86
|
+
onSubmit?(state: any, element: UIElement): void;
|
|
87
|
+
onAdditionalDetails?(state: any, element?: UIElement): void;
|
|
88
|
+
onActionHandled?(data: ActionHandledReturnObject): void;
|
|
89
|
+
onChange?(state: any, element: UIElement): void;
|
|
90
|
+
onError?(error: AdyenCheckoutError, element?: UIElement): void;
|
|
91
|
+
onBalanceCheck?(resolve: PromiseResolve, reject: PromiseReject, data: GiftCardElementData): Promise<void>;
|
|
92
|
+
onOrderRequest?(resolve: PromiseResolve, reject: PromiseReject, data: PaymentData): Promise<void>;
|
|
93
|
+
onOrderCancel?(order: Order): void;
|
|
94
|
+
/**
|
|
95
|
+
* Only used in Components combined with Sessions flow
|
|
96
|
+
* Callback used to inform when the order is created.
|
|
97
|
+
* https://docs.adyen.com/payment-methods/gift-cards/web-component?tab=config-sessions_1
|
|
98
|
+
*/
|
|
99
|
+
onOrderCreated?(data: {
|
|
100
|
+
order: Order;
|
|
101
|
+
}): void;
|
|
102
|
+
/**
|
|
103
|
+
* Used only in the Donation Component when shopper declines to donate
|
|
104
|
+
* https://docs.adyen.com/online-payments/donations/web-component
|
|
105
|
+
*/
|
|
106
|
+
onCancel?(): void;
|
|
61
107
|
}
|
|
62
108
|
export type PaymentMethodsConfiguration = {
|
|
63
109
|
[key in keyof PaymentMethods]?: Partial<PaymentMethodOptions<key>>;
|
|
64
110
|
} | {
|
|
65
111
|
[key in PaymentActionsType]?: any;
|
|
66
112
|
};
|
|
113
|
+
export {};
|
|
@@ -2,6 +2,7 @@ import paymentMethods from '../components';
|
|
|
2
2
|
import { ADDRESS_SCHEMA } from '../components/internal/Address/constants';
|
|
3
3
|
import actionTypes from '../core/ProcessResponse/PaymentAction/actionTypes';
|
|
4
4
|
import { InstallmentOptions } from '../components/Card/components/CardInput/components/types';
|
|
5
|
+
import { ResultCode } from '../components/types';
|
|
5
6
|
export type PaymentActionsType = keyof typeof actionTypes;
|
|
6
7
|
/**
|
|
7
8
|
* {@link https://docs.adyen.com/api-explorer/#/PaymentSetupAndVerificationService/v51/payments__resParam_action API Explorer /payments action}
|
|
@@ -245,6 +246,11 @@ export type CheckoutSessionSetupResponse = {
|
|
|
245
246
|
paymentMethods: any;
|
|
246
247
|
returnUrl: string;
|
|
247
248
|
configuration: SessionConfiguration;
|
|
249
|
+
/**
|
|
250
|
+
* 'shopperLocale' set during session creation.
|
|
251
|
+
* @defaultValue en-US
|
|
252
|
+
*/
|
|
253
|
+
shopperLocale: string;
|
|
248
254
|
};
|
|
249
255
|
export type CheckoutSessionPaymentResponse = {
|
|
250
256
|
sessionData: string;
|
|
@@ -254,8 +260,9 @@ export type CheckoutSessionPaymentResponse = {
|
|
|
254
260
|
};
|
|
255
261
|
export type CheckoutSessionDetailsResponse = {
|
|
256
262
|
sessionData: string;
|
|
263
|
+
sessionResult: string;
|
|
264
|
+
resultCode: ResultCode;
|
|
257
265
|
status?: string;
|
|
258
|
-
resultCode: string;
|
|
259
266
|
action?: PaymentAction;
|
|
260
267
|
};
|
|
261
268
|
export type CheckoutSessionBalanceResponse = {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { FormatterFn } from
|
|
1
|
+
import { FormatterFn } from './types';
|
|
2
2
|
export declare const digitsOnlyFormatter: FormatterFn;
|
package/package.json
CHANGED
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"./dist/es/adyen.css": "./dist/es/adyen.css",
|
|
25
25
|
"./package.json": "./package.json"
|
|
26
26
|
},
|
|
27
|
-
"version": "5.
|
|
27
|
+
"version": "5.43.1",
|
|
28
28
|
"license": "MIT",
|
|
29
29
|
"homepage": "https://docs.adyen.com/checkout",
|
|
30
30
|
"repository": "github:Adyen/adyen-web",
|
|
@@ -44,9 +44,12 @@
|
|
|
44
44
|
"size-only": "node ./scripts/size",
|
|
45
45
|
"type-check": "tsc --noEmit",
|
|
46
46
|
"type-check-generate": "tsc --emitDeclarationOnly",
|
|
47
|
+
"format": "npm run lint:fix && npm run prettier:fix && npm run styles:fix",
|
|
47
48
|
"lint": "eslint 'src/**/*.{js,ts,tsx}' --quiet",
|
|
48
49
|
"lint-styles": "stylelint '**/*.scss'",
|
|
50
|
+
"styles:fix": "npm run lint-styles -- --fix",
|
|
49
51
|
"lint:fix": "npm run lint -- --fix",
|
|
52
|
+
"prettier:fix": "prettier \"src/**/*.{js,ts,tsx}\" \"package.json\" --write --loglevel silent",
|
|
50
53
|
"prepublishOnly": "npm run build",
|
|
51
54
|
"prepare": "cd ../.. && husky install packages/lib/.husky"
|
|
52
55
|
},
|
|
@@ -68,9 +71,9 @@
|
|
|
68
71
|
"@testing-library/preact": "3.2.3",
|
|
69
72
|
"@testing-library/preact-hooks": "1.1.0",
|
|
70
73
|
"@testing-library/user-event": "14.4.3",
|
|
71
|
-
"@types/jest": "29.5.
|
|
72
|
-
"@typescript-eslint/eslint-plugin": "5.
|
|
73
|
-
"@typescript-eslint/parser": "5.
|
|
74
|
+
"@types/jest": "29.5.1",
|
|
75
|
+
"@typescript-eslint/eslint-plugin": "5.59.1",
|
|
76
|
+
"@typescript-eslint/parser": "5.59.1",
|
|
74
77
|
"autoprefixer": "10.4.14",
|
|
75
78
|
"babel-jest": "29.5.0",
|
|
76
79
|
"cross-env": "^7.0.3",
|
|
@@ -78,7 +81,7 @@
|
|
|
78
81
|
"dotenv": "^16.0.3",
|
|
79
82
|
"enzyme": "3.11.0",
|
|
80
83
|
"enzyme-adapter-preact-pure": "4.1.0",
|
|
81
|
-
"eslint": "8.
|
|
84
|
+
"eslint": "8.39.0",
|
|
82
85
|
"eslint-plugin-import": "^2.26.0",
|
|
83
86
|
"eslint-plugin-jsx-a11y": "^6.6.1",
|
|
84
87
|
"eslint-plugin-react": "^7.31.8",
|
|
@@ -91,14 +94,14 @@
|
|
|
91
94
|
"jest-environment-jsdom": "29.5.0",
|
|
92
95
|
"jest-mock-extended": "^3.0.1",
|
|
93
96
|
"lint-staged": "^13.0.3",
|
|
94
|
-
"postcss": "8.4.
|
|
97
|
+
"postcss": "8.4.23",
|
|
95
98
|
"rollup": "^2.79.1",
|
|
96
99
|
"rollup-plugin-postcss": "4.0.2",
|
|
97
100
|
"rollup-plugin-stylelint": "1.0.0",
|
|
98
101
|
"rollup-plugin-terser": "^7.0.2",
|
|
99
102
|
"rollup-plugin-visualizer": "^5.8.3",
|
|
100
|
-
"sass": "1.
|
|
101
|
-
"stylelint": "15.
|
|
103
|
+
"sass": "1.62.1",
|
|
104
|
+
"stylelint": "15.6.0",
|
|
102
105
|
"stylelint-config-standard-scss": "7.0.1",
|
|
103
106
|
"tslib": "^2.4.1",
|
|
104
107
|
"typescript": "4.9.5",
|
|
@@ -111,7 +114,7 @@
|
|
|
111
114
|
"@types/googlepay": "^0.7.0",
|
|
112
115
|
"classnames": "^2.3.1",
|
|
113
116
|
"core-js-pure": "^3.25.3",
|
|
114
|
-
"preact": "10.
|
|
117
|
+
"preact": "10.13.2"
|
|
115
118
|
},
|
|
116
119
|
"files": [
|
|
117
120
|
"dist",
|