@adyen/adyen-web 5.37.0 → 5.38.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.
@@ -11,6 +11,7 @@ import { SRPanel } from '../../../../core/Errors/SRPanel';
11
11
  import Analytics from '../../../../core/Analytics';
12
12
  import RiskElement from '../../../../core/RiskModule';
13
13
  import { ComponentMethodsRef } from '../../../types';
14
+ import { DisclaimerMsgObject } from '../../../internal/DisclaimerMessage/DisclaimerMessage';
14
15
  export interface CardInputValidState {
15
16
  holderName?: boolean;
16
17
  billingAddress?: boolean;
@@ -41,11 +42,6 @@ export interface CardInputDataState {
41
42
  type Placeholders = {
42
43
  holderName?: string;
43
44
  };
44
- export interface DisclaimerMsgObject {
45
- message: string;
46
- linkText: string;
47
- link: string;
48
- }
49
45
  /**
50
46
  * Should be the subset of the props sent to CardInput that are *actually* used by CardInput
51
47
  * - either in the comp itself or are passed on to its children
@@ -34,7 +34,7 @@ export declare const extractPropsForCardFields: (props: CardInputProps) => {
34
34
  lastFour: string;
35
35
  expiryMonth: string;
36
36
  expiryYear: string;
37
- disclaimerMessage: import("./types").DisclaimerMsgObject;
37
+ disclaimerMessage: import("../../../internal/DisclaimerMessage/DisclaimerMessage").DisclaimerMsgObject;
38
38
  };
39
39
  export declare const extractPropsForSFP: (props: CardInputProps) => SFPProps;
40
40
  export declare const handlePartialAddressMode: (addressMode: AddressModeOptions) => AddressSpecifications | null;
@@ -1,6 +1,7 @@
1
1
  import { h } from 'preact';
2
2
  import '../Donation.scss';
3
- declare function DonationComponent(props: any): h.JSX.Element;
3
+ import { DonationComponentProps } from './types';
4
+ declare function DonationComponent(props: DonationComponentProps): h.JSX.Element;
4
5
  declare namespace DonationComponent {
5
6
  var defaultProps: {
6
7
  onCancel: () => void;
@@ -0,0 +1,29 @@
1
+ import { DisclaimerMsgObject } from '../../internal/DisclaimerMessage/DisclaimerMessage';
2
+ interface DonationAmounts {
3
+ currency: string;
4
+ values: Array<number>;
5
+ }
6
+ interface DonationAmount {
7
+ currency: string;
8
+ value: number;
9
+ }
10
+ interface DonationPayload {
11
+ data: {
12
+ amount: DonationAmount;
13
+ };
14
+ isValid?: boolean;
15
+ }
16
+ export interface DonationComponentProps {
17
+ amounts: DonationAmounts;
18
+ backgroundUrl?: string;
19
+ description?: string;
20
+ logoUrl?: string;
21
+ name?: string;
22
+ showCancelButton?: boolean;
23
+ url?: string;
24
+ disclaimerMessage?: DisclaimerMsgObject;
25
+ onDonate: (payload: DonationPayload) => void;
26
+ onCancel?: (payload: DonationPayload) => void;
27
+ onChange?: (payload: DonationPayload) => void;
28
+ }
29
+ export {};
@@ -1,6 +1,10 @@
1
1
  import { h } from 'preact';
2
- import { DisclaimerMsgObject } from '../../types';
3
2
  import './DisclaimerMessage.scss';
3
+ export interface DisclaimerMsgObject {
4
+ message: string;
5
+ linkText: string;
6
+ link: string;
7
+ }
4
8
  interface DisclaimerMessageProps {
5
9
  disclaimer: DisclaimerMsgObject;
6
10
  }
@@ -12,6 +12,7 @@ export declare class SRPanel extends BaseElement<SRPanelProps> {
12
12
  enabled: boolean;
13
13
  node: string;
14
14
  showPanel: boolean;
15
+ id: string;
15
16
  };
16
17
  private readonly srPanelContainer;
17
18
  private readonly id;
@@ -3,7 +3,7 @@ import { SetSRMessagesReturnFn } from './SRPanelProvider';
3
3
  export interface ISRPanelContext {
4
4
  srPanel: SRPanel;
5
5
  setSRMessagesFromObjects: ({ fieldTypeMappingFn }: {
6
- fieldTypeMappingFn: any;
6
+ fieldTypeMappingFn?: any;
7
7
  }) => SetSRMessagesReturnFn;
8
8
  setSRMessagesFromStrings: (strs: any) => void;
9
9
  clearSRPanel: () => void;
@@ -26,6 +26,7 @@ export interface SRPanelProps extends BaseElementProps {
26
26
  node?: string;
27
27
  showPanel?: boolean;
28
28
  moveFocus?: boolean;
29
+ id?: string;
29
30
  }
30
31
  export interface SRMessagesProps {
31
32
  setComponentRef: (ref: any) => void;
@@ -72,6 +72,7 @@ export declare const defaultTranslation: {
72
72
  dateOfBirth: string;
73
73
  shopperEmail: string;
74
74
  gender: string;
75
+ "gender.notselected": string;
75
76
  male: string;
76
77
  female: string;
77
78
  billingAddress: string;
@@ -2934,6 +2934,7 @@ declare const _default: {
2934
2934
  dateOfBirth: string;
2935
2935
  shopperEmail: string;
2936
2936
  gender: string;
2937
+ "gender.notselected": string;
2937
2938
  male: string;
2938
2939
  female: string;
2939
2940
  billingAddress: string;
@@ -3221,6 +3222,7 @@ declare const _default: {
3221
3222
  dateOfBirth: string;
3222
3223
  shopperEmail: string;
3223
3224
  gender: string;
3225
+ "gender.notselected": string;
3224
3226
  male: string;
3225
3227
  female: string;
3226
3228
  billingAddress: string;
package/package.json CHANGED
@@ -23,7 +23,7 @@
23
23
  "./dist/adyen.css": "./dist/adyen.css",
24
24
  "./package.json": "./package.json"
25
25
  },
26
- "version": "5.37.0",
26
+ "version": "5.38.0",
27
27
  "license": "MIT",
28
28
  "homepage": "https://docs.adyen.com/checkout",
29
29
  "repository": "github:Adyen/adyen-web",
@@ -68,8 +68,8 @@
68
68
  "@testing-library/preact-hooks": "1.1.0",
69
69
  "@testing-library/user-event": "14.4.3",
70
70
  "@types/jest": "29.4.0",
71
- "@typescript-eslint/eslint-plugin": "5.52.0",
72
- "@typescript-eslint/parser": "5.52.0",
71
+ "@typescript-eslint/eslint-plugin": "5.54.0",
72
+ "@typescript-eslint/parser": "5.54.0",
73
73
  "autoprefixer": "10.4.13",
74
74
  "babel-jest": "29.4.3",
75
75
  "cross-env": "^7.0.3",
@@ -77,7 +77,7 @@
77
77
  "dotenv": "^16.0.3",
78
78
  "enzyme": "3.11.0",
79
79
  "enzyme-adapter-preact-pure": "4.1.0",
80
- "eslint": "8.34.0",
80
+ "eslint": "8.35.0",
81
81
  "eslint-plugin-import": "^2.26.0",
82
82
  "eslint-plugin-jsx-a11y": "^6.6.1",
83
83
  "eslint-plugin-react": "^7.31.8",
@@ -97,7 +97,7 @@
97
97
  "rollup-plugin-terser": "^7.0.2",
98
98
  "rollup-plugin-visualizer": "^5.8.3",
99
99
  "sass": "1.58.3",
100
- "stylelint": "15.1.0",
100
+ "stylelint": "15.2.0",
101
101
  "stylelint-config-standard-scss": "7.0.1",
102
102
  "tslib": "^2.4.1",
103
103
  "typescript": "4.9.5",
@@ -107,7 +107,7 @@
107
107
  "@babel/runtime": "^7.15.4",
108
108
  "@babel/runtime-corejs3": "^7.20.1",
109
109
  "@types/applepayjs": "^3.0.4",
110
- "@types/googlepay": "^0.6.2",
110
+ "@types/googlepay": "^0.7.0",
111
111
  "classnames": "^2.3.1",
112
112
  "core-js-pure": "^3.25.3",
113
113
  "preact": "10.11.3"