@adyen/adyen-web 5.49.2 → 5.49.3

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.
@@ -91,6 +91,10 @@ export declare class CardElement extends UIElement<CardElementProps> {
91
91
  onAdditionalDetails?: (state: any, element: UIElement<any>) => void;
92
92
  onPaymentCompleted?: (result: any, element: UIElement<any>) => void;
93
93
  beforeRedirect?: (resolve: any, reject: any, redirectData: any, element: UIElement<any>) => void;
94
+ /**
95
+ * Click to Pay configuration
96
+ * - If email is set explicitly in the configuration, then it can override the one used in the session creation
97
+ */
94
98
  isInstantPayment?: boolean;
95
99
  name?: string;
96
100
  amount?: import("../../types").PaymentAmount;
@@ -126,7 +130,7 @@ export declare class CardElement extends UIElement<CardElementProps> {
126
130
  onBinLookup(obj: CbObjOnBinLookup): void;
127
131
  onBinValue: (callbackObj: import("../internal/SecuredFields/lib/types").CbObjOnBinValue) => void;
128
132
  get isValid(): boolean;
129
- get icon(): any;
133
+ get icon(): string;
130
134
  get brands(): {
131
135
  icon: any;
132
136
  name: string;
@@ -3,7 +3,8 @@ import { AddressModeOptions, CardInputProps, LayoutObj } from './types';
3
3
  import { AddressSpecifications, StringObject } from '../../../internal/Address/types';
4
4
  import { InstallmentsObj } from './components/Installments/Installments';
5
5
  import { SFPProps } from '../../../internal/SecuredFields/SFP/types';
6
- export declare const getCardImageUrl: (brand: string, loadingContext: string) => string;
6
+ import { UseImageHookType } from '../../../../core/Context/useImage';
7
+ export declare const getCardImageUrl: (brand: string, getImage: UseImageHookType) => string;
7
8
  /**
8
9
  * Verifies that installment object is valid to send to the Backend.
9
10
  * Valid means that it has 'revolving' plan set, or the number of installments is bigger than one
@@ -10,7 +10,7 @@ export declare class DokuElement extends UIElement {
10
10
  * Formats the component data output
11
11
  */
12
12
  formatData(): any;
13
- get icon(): any;
13
+ get icon(): string;
14
14
  render(): h.JSX.Element;
15
15
  }
16
16
  export default DokuElement;
@@ -19,7 +19,7 @@ export declare class EcontextElement extends UIElement<EcontextElementProps> {
19
19
  * Formats the component data output
20
20
  */
21
21
  formatData(): any;
22
- get icon(): any;
22
+ get icon(): string;
23
23
  render(): h.JSX.Element;
24
24
  }
25
25
  export default EcontextElement;
@@ -88,11 +88,15 @@ export interface GooglePayProps extends UIElementProps {
88
88
  */
89
89
  shippingAddressRequired?: boolean;
90
90
  /**
91
- * @see https://developers.google.com/pay/api/web/reference/request-objects#ShippingOptionParameters
91
+ * If shippingAddressRequired is set to true, specify shipping address restrictions. This object is used to set shipping restrictions.
92
+ *
93
+ * @see https://developers.google.com/pay/api/web/reference/request-objects#ShippingAddressParameters
92
94
  */
93
95
  shippingAddressParameters?: google.payments.api.ShippingAddressParameters;
94
96
  /**
95
- * Set to true when the SHIPPING_OPTION callback intent is used.
97
+ * Set to true when the SHIPPING_OPTION callback intent is used. This field is required if you implement support
98
+ * for Authorize Payments or Dynamic Price Updates.
99
+ *
96
100
  * @see https://developers.google.com/pay/api/web/reference/request-objects#ShippingOptionParameters
97
101
  */
98
102
  shippingOptionRequired?: boolean;
@@ -100,6 +104,10 @@ export interface GooglePayProps extends UIElementProps {
100
104
  * @see https://developers.google.com/pay/api/web/reference/request-objects#ShippingOptionParameters
101
105
  */
102
106
  shippingOptionParameters?: google.payments.api.ShippingOptionParameters;
107
+ /**
108
+ * Specifies the following callback intents for PaymentDataCallbacks
109
+ * @see https://developers.google.com/pay/api/web/reference/request-objects#PaymentDataCallbacks
110
+ */
103
111
  callbackIntents?: google.payments.api.CallbackIntent[];
104
112
  /**
105
113
  * @see https://developers.google.com/pay/api/web/reference/request-objects#PaymentDataCallbacks
@@ -22,7 +22,7 @@ declare class RedirectElement extends UIElement {
22
22
  * Returns whether the component state is valid or not
23
23
  */
24
24
  get isValid(): boolean;
25
- get icon(): any;
25
+ get icon(): string;
26
26
  render(): h.JSX.Element;
27
27
  }
28
28
  export default RedirectElement;
@@ -24,7 +24,7 @@ export declare class SecuredFieldsElement extends UIElement {
24
24
  onBinLookup(obj: CbObjOnBinLookup): void;
25
25
  onBinValue: (callbackObj: import("../internal/SecuredFields/lib/types").CbObjOnBinValue) => void;
26
26
  get isValid(): boolean;
27
- get icon(): any;
27
+ get icon(): string;
28
28
  get browserInfo(): import("../../types").BrowserInfo;
29
29
  render(): h.JSX.Element;
30
30
  }
@@ -9,7 +9,7 @@ export declare const resolvePlaceholders: (i18n?: Language) => SFPlaceholdersObj
9
9
  /**
10
10
  * Used by SecuredFieldsProviderHandlers
11
11
  */
12
- export declare const getCardImageUrl: (brand: any, resources: Resources) => any;
12
+ export declare const getCardImageUrl: (brand: any, resources: Resources) => string;
13
13
  /**
14
14
  * Checks if `prop` is classified as an `Array` primitive or object.
15
15
  * @internal
@@ -40,7 +40,7 @@ export interface PaymentData extends PaymentMethodData {
40
40
  sessionData?: string;
41
41
  storePaymentMethod?: boolean;
42
42
  }
43
- export type ResultCode = 'Authorised' | 'Cancelled' | 'ChallengeShopper' | 'Error' | 'IdentifyShopper' | 'Pending';
43
+ export type ResultCode = 'AuthenticationFinished' | 'AuthenticationNotRequired' | 'Authorised' | 'Cancelled' | 'ChallengeShopper' | 'Error' | 'IdentifyShopper' | 'PartiallyAuthorised' | 'Pending' | 'PresentToShopper' | 'Received' | 'RedirectShopper' | 'Refused';
44
44
  export interface OnPaymentCompletedData {
45
45
  sessionData: string;
46
46
  sessionResult: string;
@@ -1,6 +1,19 @@
1
- import { ImageOptions } from '../../utils/get-image';
1
+ export interface ImageOptions {
2
+ extension?: string;
3
+ imageFolder?: string;
4
+ resourceContext?: string;
5
+ name?: string;
6
+ parentFolder?: string;
7
+ size?: string;
8
+ subFolder?: string;
9
+ svgOptions?: string;
10
+ type?: string;
11
+ }
12
+ export type GetImageFnType = (name: any) => string;
2
13
  export declare class Resources {
3
14
  private readonly resourceContext;
4
15
  constructor(cdnContext?: string);
5
- getImage(props: ImageOptions): Function;
16
+ private returnImage;
17
+ private getImageUrl;
18
+ getImage(props?: ImageOptions): GetImageFnType;
6
19
  }
@@ -1,3 +1,4 @@
1
- import { ImageOptions } from '../../utils/get-image';
2
- declare function useImage(): (props: ImageOptions) => Function;
1
+ import { GetImageFnType, ImageOptions } from './Resources';
2
+ export type UseImageHookType = (props: ImageOptions) => GetImageFnType;
3
+ declare function useImage(): (props?: ImageOptions) => GetImageFnType;
3
4
  export default useImage;
@@ -1,13 +0,0 @@
1
- export interface ImageOptions {
2
- extension?: string;
3
- imageFolder?: string;
4
- loadingContext?: string;
5
- name?: string;
6
- parentFolder?: string;
7
- size?: string;
8
- subFolder?: string;
9
- svgOptions?: string;
10
- type?: string;
11
- }
12
- export declare const getImageUrl: ({ loadingContext, extension, ...options }: ImageOptions) => Function;
13
- export default getImageUrl;
@@ -1,2 +1,3 @@
1
- declare const getIssuerImageUrl: (options: object, type: string) => (issuer: string) => string;
1
+ import { UseImageHookType } from '../core/Context/useImage';
2
+ declare const getIssuerImageUrl: (options: object, type: string, getImage: UseImageHookType) => (issuer: string) => string;
2
3
  export default getIssuerImageUrl;
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.49.2",
27
+ "version": "5.49.3",
28
28
  "license": "MIT",
29
29
  "homepage": "https://docs.adyen.com/checkout",
30
30
  "repository": "github:Adyen/adyen-web",
@@ -69,11 +69,11 @@
69
69
  "@rollup/plugin-json": "^6.0.0",
70
70
  "@rollup/plugin-node-resolve": "^15.0.0",
71
71
  "@rollup/plugin-replace": "^5.0.1",
72
- "@storybook/addon-a11y": "^7.0.20",
73
- "@storybook/addon-essentials": "^7.0.20",
74
- "@storybook/manager-api": "^7.0.20",
75
- "@storybook/preact": "^7.0.20",
76
- "@storybook/preact-vite": "^7.0.20",
72
+ "@storybook/addon-a11y": "^7.2.0",
73
+ "@storybook/addon-essentials": "^7.2.0",
74
+ "@storybook/manager-api": "^7.2.0",
75
+ "@storybook/preact": "^7.2.0",
76
+ "@storybook/preact-vite": "^7.2.0",
77
77
  "@testing-library/jest-dom": "5.16.5",
78
78
  "@testing-library/preact": "3.2.3",
79
79
  "@testing-library/preact-hooks": "1.1.0",
@@ -92,7 +92,7 @@
92
92
  "eslint-plugin-import": "^2.26.0",
93
93
  "eslint-plugin-jsx-a11y": "^6.6.1",
94
94
  "eslint-plugin-react": "^7.31.8",
95
- "eslint-plugin-storybook": "^0.6.12",
95
+ "eslint-plugin-storybook": "^0.6.13",
96
96
  "eslint-plugin-testing-library": "^5.9.1",
97
97
  "eslint-plugin-tsdoc": "^0.2.17",
98
98
  "filesize": "^10.0.0",
@@ -111,12 +111,12 @@
111
111
  "rollup-plugin-terser": "^7.0.2",
112
112
  "rollup-plugin-visualizer": "^5.8.3",
113
113
  "sass": "1.62.1",
114
- "storybook": "^7.0.20",
114
+ "storybook": "^7.2.0",
115
115
  "stylelint": "15.10.1",
116
116
  "stylelint-config-standard-scss": "7.0.1",
117
117
  "tslib": "^2.4.1",
118
118
  "typescript": "4.9.5",
119
- "vite": "4.3.9",
119
+ "vite": "4.4.8",
120
120
  "vite-plugin-stylelint": "^4.3.0",
121
121
  "whatwg-fetch": "^3.6.2"
122
122
  },