@adyen/adyen-web 5.34.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.
@@ -58,6 +58,7 @@ declare class BancontactElement extends CardElement {
58
58
  };
59
59
  brand?: string;
60
60
  _disableClickToPay?: boolean;
61
+ fundingSource?: "debit" | "credit";
61
62
  brands?: string[];
62
63
  showBrandsUnderCardNumber?: boolean;
63
64
  showBrandIcon?: boolean;
@@ -65,6 +65,9 @@ export declare class CardElement extends UIElement<CardElementProps> {
65
65
  };
66
66
  brand?: string;
67
67
  _disableClickToPay?: boolean;
68
+ fundingSource?: "debit" | "credit"; /**
69
+ * Reference to the 'ClickToPayComponent'
70
+ */
68
71
  brands?: string[];
69
72
  showBrandsUnderCardNumber?: boolean;
70
73
  showBrandIcon?: boolean;
@@ -1,5 +1,5 @@
1
1
  import { h } from 'preact';
2
- export declare const CardFieldsWrapper: ({ data, valid, errors, handleChangeFor, sfpState, setFocusOn, collateErrors, errorFieldId, cvcPolicy, focusedElement, hasInstallments, handleInstallments, showAmountsInInstallments, brandsIcons, mergedSRErrors, moveFocus, showPanel, handleErrorPanelFocus, 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 }: {
2
+ export declare const CardFieldsWrapper: ({ data, valid, errors, handleChangeFor, sfpState, setFocusOn, collateErrors, errorFieldId, cvcPolicy, focusedElement, hasInstallments, handleInstallments, showAmountsInInstallments, brandsIcons, mergedSRErrors, moveFocus, showPanel, handleErrorPanelFocus, 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 }: {
3
3
  data: any;
4
4
  valid: any;
5
5
  errors: any;
@@ -49,4 +49,5 @@ export declare const CardFieldsWrapper: ({ data, valid, errors, handleChangeFor,
49
49
  showBrandIcon: any;
50
50
  showBrandsUnderCardNumber: any;
51
51
  iOSFocusedField: any;
52
+ disclaimerMessage: any;
52
53
  }) => h.JSX.Element;
@@ -0,0 +1,16 @@
1
+ import { h } from 'preact';
2
+ import { DisclaimerMsgObject } from '../../types';
3
+ import './DisclaimerMessage.scss';
4
+ interface DisclaimerMessageProps {
5
+ disclaimer: DisclaimerMsgObject;
6
+ }
7
+ /**
8
+ * Expects a config object with this shape:
9
+ * disclaimerMessage: {
10
+ * message: 'By continuing you accept the %{linkText} of MyStore',
11
+ * linkText: 'terms and conditions',
12
+ * link: 'https://www.adyen.com'
13
+ * }
14
+ */
15
+ export default function DisclaimerMessage({ disclaimer }: DisclaimerMessageProps): h.JSX.Element;
16
+ export {};
@@ -0,0 +1 @@
1
+ export { default } from './DisclaimerMessage';
@@ -1,5 +1,5 @@
1
1
  import { h } from 'preact';
2
- export declare const StoredCardFieldsWrapper: ({ collateErrors, errorFieldId, sfpState, setFocusOn, cvcPolicy, focusedElement, hasInstallments, handleInstallments, showAmountsInInstallments, amount, hasCVC, installmentOptions, lastFour, expiryMonth, expiryYear, mergedSRErrors, handleErrorPanelFocus, moveFocus, showPanel }: {
2
+ export declare const StoredCardFieldsWrapper: ({ collateErrors, errorFieldId, sfpState, setFocusOn, cvcPolicy, focusedElement, hasInstallments, handleInstallments, showAmountsInInstallments, amount, hasCVC, installmentOptions, lastFour, expiryMonth, expiryYear, mergedSRErrors, handleErrorPanelFocus, moveFocus, showPanel, disclaimerMessage }: {
3
3
  collateErrors: any;
4
4
  errorFieldId: any;
5
5
  sfpState: any;
@@ -19,4 +19,5 @@ export declare const StoredCardFieldsWrapper: ({ collateErrors, errorFieldId, sf
19
19
  handleErrorPanelFocus: any;
20
20
  moveFocus: any;
21
21
  showPanel: any;
22
+ disclaimerMessage: any;
22
23
  }) => h.JSX.Element;
@@ -39,6 +39,11 @@ export interface CardInputDataState {
39
39
  type Placeholders = {
40
40
  holderName?: string;
41
41
  };
42
+ export interface DisclaimerMsgObject {
43
+ message: string;
44
+ linkText: string;
45
+ link: string;
46
+ }
42
47
  /**
43
48
  * Should be the subset of the props sent to CardInput that are *actually* used by CardInput
44
49
  * - either in the comp itself or are passed on to its children
@@ -66,7 +71,7 @@ export interface CardInputProps {
66
71
  expiryMonth?: string;
67
72
  expiryYear?: string;
68
73
  forceCompat?: boolean;
69
- fundingSource?: string;
74
+ fundingSource?: 'debit' | 'credit';
70
75
  hasCVC?: boolean;
71
76
  hasHolderName?: boolean;
72
77
  holderNameRequired?: boolean;
@@ -108,6 +113,7 @@ export interface CardInputProps {
108
113
  trimTrailingSeparator?: boolean;
109
114
  type?: string;
110
115
  maskSecurityCode?: boolean;
116
+ disclaimerMessage?: DisclaimerMsgObject;
111
117
  }
112
118
  export interface CardInputState {
113
119
  dualBrandSelectElements: DualBrandSelectElement[];
@@ -31,6 +31,7 @@ export declare const extractPropsForCardFields: (props: CardInputProps) => {
31
31
  lastFour: string;
32
32
  expiryMonth: string;
33
33
  expiryYear: string;
34
+ disclaimerMessage: import("./types").DisclaimerMsgObject;
34
35
  };
35
36
  export declare const extractPropsForSFP: (props: CardInputProps) => SFPProps;
36
37
  export declare const handlePartialAddressMode: (addressMode: AddressModeOptions) => AddressSpecifications | null;
@@ -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.3.3";
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[];
@@ -0,0 +1 @@
1
+ export declare const isValidHttpUrl: (string: any, allowHttp?: boolean) => boolean;
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.34.0",
26
+ "version": "5.35.0",
27
27
  "license": "MIT",
28
28
  "homepage": "https://docs.adyen.com/checkout",
29
29
  "repository": "github:Adyen/adyen-web",
@@ -68,10 +68,10 @@
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.50.0",
72
- "@typescript-eslint/parser": "5.50.0",
71
+ "@typescript-eslint/eslint-plugin": "5.51.0",
72
+ "@typescript-eslint/parser": "5.51.0",
73
73
  "autoprefixer": "10.4.13",
74
- "babel-jest": "29.4.1",
74
+ "babel-jest": "29.4.2",
75
75
  "cross-env": "^7.0.3",
76
76
  "cssnano": "5.1.14",
77
77
  "dotenv": "^16.0.3",
@@ -86,8 +86,8 @@
86
86
  "filesize": "^10.0.0",
87
87
  "gzip-size": "^6.0.0",
88
88
  "husky": "^8.0.1",
89
- "jest": "29.4.1",
90
- "jest-environment-jsdom": "29.4.1",
89
+ "jest": "29.4.2",
90
+ "jest-environment-jsdom": "29.4.2",
91
91
  "jest-mock-extended": "^3.0.1",
92
92
  "lint-staged": "^13.0.3",
93
93
  "postcss": "8.4.21",