@adyen/adyen-web 5.9.0 → 5.12.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.
Files changed (35) hide show
  1. package/dist/adyen.css +7 -6
  2. package/dist/adyen.css.map +1 -1
  3. package/dist/adyen.js +1 -1
  4. package/dist/adyen.js.map +1 -1
  5. package/dist/cjs/adyen.css +7 -6
  6. package/dist/cjs/adyen.css.map +1 -1
  7. package/dist/cjs/index.js +1 -1
  8. package/dist/es/adyen.css +7 -6
  9. package/dist/es/adyen.css.map +1 -1
  10. package/dist/es/index.js +1 -1
  11. package/dist/es.modern/adyen.css +7 -6
  12. package/dist/es.modern/adyen.css.map +1 -1
  13. package/dist/es.modern/index.js +1 -1
  14. package/dist/types/components/Card/Bancontact.d.ts +11 -0
  15. package/dist/types/components/Card/Card.d.ts +11 -0
  16. package/dist/types/components/Card/components/CardInput/components/AvailableBrands/AvailableBrands.d.ts +10 -0
  17. package/dist/types/components/Card/components/CardInput/components/AvailableBrands/index.d.ts +1 -0
  18. package/dist/types/components/Card/components/CardInput/components/CardFields.d.ts +1 -1
  19. package/dist/types/components/Card/components/CardInput/components/CardFieldsWrapper.d.ts +3 -1
  20. package/dist/types/components/Card/components/CardInput/components/types.d.ts +3 -1
  21. package/dist/types/components/Card/components/CardInput/defaultProps.d.ts +1 -0
  22. package/dist/types/components/Card/components/CardInput/types.d.ts +3 -1
  23. package/dist/types/components/Card/components/CardInput/utils.d.ts +1 -0
  24. package/dist/types/components/Card/types.d.ts +25 -3
  25. package/dist/types/components/Dropin/components/PaymentMethod/PaymentMethodBrands/CompactView.d.ts +8 -0
  26. package/dist/types/components/Dropin/components/PaymentMethod/PaymentMethodBrands/PaymentMethodBrands.d.ts +10 -0
  27. package/dist/types/components/Dropin/components/PaymentMethod/PaymentMethodBrands/index.d.ts +1 -0
  28. package/dist/types/components/Dropin/components/PaymentMethod/PaymentMethodItem.d.ts +2 -1
  29. package/dist/types/components/OnlineBankingIN/index.d.ts +6 -0
  30. package/dist/types/components/PayPal/types.d.ts +1 -0
  31. package/dist/types/components/index.d.ts +2 -0
  32. package/dist/types/components/internal/SecuredFields/SFP/SecuredFieldsProvider.d.ts +2 -2
  33. package/dist/types/components/internal/SecuredFields/SFP/SecuredFieldsProviderHandlers.d.ts +1 -1
  34. package/dist/types/components/internal/SecuredFields/lib/types.d.ts +3 -1
  35. package/package.json +3 -3
@@ -5,6 +5,7 @@ declare class BancontactElement extends CardElement {
5
5
  protected static defaultProps: {
6
6
  brands: string[];
7
7
  onBinLookup: () => void;
8
+ showBrandsUnderCardNumber: boolean;
8
9
  SRConfig: {};
9
10
  };
10
11
  /**
@@ -22,6 +23,14 @@ declare class BancontactElement extends CardElement {
22
23
  countryCode: any;
23
24
  configuration: {
24
25
  socialSecurityNumberMode: import("./types").SocialSecurityMode;
26
+ merchantIdentifier?: string;
27
+ merchantOrigin?: string;
28
+ gatewayMerchantId?: string;
29
+ publicKeyId?: string;
30
+ region?: string;
31
+ merchantName?: string;
32
+ merchantId?: string;
33
+ intent?: string;
25
34
  koreanAuthenticationRequired?: boolean;
26
35
  icon?: string;
27
36
  brandsConfiguration?: import("./types").CardBrandsConfiguration;
@@ -35,6 +44,8 @@ declare class BancontactElement extends CardElement {
35
44
  };
36
45
  brand?: string;
37
46
  brands?: string[];
47
+ showBrandsUnderCardNumber?: boolean;
48
+ showBrandIcon?: boolean;
38
49
  enableStoreDetails?: boolean;
39
50
  hideCVC?: boolean;
40
51
  hasHolderName?: boolean;
@@ -6,6 +6,7 @@ export declare class CardElement extends UIElement<CardElementProps> {
6
6
  static type: string;
7
7
  protected static defaultProps: {
8
8
  onBinLookup: () => void;
9
+ showBrandsUnderCardNumber: boolean;
9
10
  SRConfig: {};
10
11
  };
11
12
  setComponentRef: (ref: any) => void;
@@ -17,6 +18,14 @@ export declare class CardElement extends UIElement<CardElementProps> {
17
18
  countryCode: any;
18
19
  configuration: {
19
20
  socialSecurityNumberMode: import("./types").SocialSecurityMode;
21
+ merchantIdentifier?: string;
22
+ merchantOrigin?: string;
23
+ gatewayMerchantId?: string;
24
+ publicKeyId?: string;
25
+ region?: string;
26
+ merchantName?: string;
27
+ merchantId?: string;
28
+ intent?: string;
20
29
  koreanAuthenticationRequired?: boolean;
21
30
  icon?: string;
22
31
  brandsConfiguration?: import("./types").CardBrandsConfiguration;
@@ -30,6 +39,8 @@ export declare class CardElement extends UIElement<CardElementProps> {
30
39
  };
31
40
  brand?: string;
32
41
  brands?: string[];
42
+ showBrandsUnderCardNumber?: boolean;
43
+ showBrandIcon?: boolean;
33
44
  enableStoreDetails?: boolean;
34
45
  hideCVC?: boolean;
35
46
  hasHolderName?: boolean;
@@ -0,0 +1,10 @@
1
+ import { h } from 'preact';
2
+ import './AvailableBrands.scss';
3
+ import { BrandConfiguration } from '../../../../types';
4
+ declare type AvailableBrands = Array<BrandConfiguration>;
5
+ interface PaymentMethodBrandsProps {
6
+ brands: AvailableBrands;
7
+ activeBrand: string;
8
+ }
9
+ declare const AvailableBrands: ({ brands, activeBrand }: PaymentMethodBrandsProps) => h.JSX.Element;
10
+ export default AvailableBrands;
@@ -0,0 +1 @@
1
+ export { default } from './AvailableBrands';
@@ -1,3 +1,3 @@
1
1
  import { h } from 'preact';
2
2
  import { CardFieldsProps } from './types';
3
- export default function CardFields({ brand, brandsConfiguration, dualBrandingElements, dualBrandingChangeHandler, dualBrandingSelected, errors, focusedElement, hasCVC, cvcPolicy, expiryDatePolicy, onFocusField, showBrandIcon, valid }: CardFieldsProps): h.JSX.Element;
3
+ export default function CardFields({ brand, brandsIcons, brandsConfiguration, dualBrandingElements, dualBrandingChangeHandler, dualBrandingSelected, errors, focusedElement, hasCVC, cvcPolicy, expiryDatePolicy, onFocusField, showBrandIcon, showBrandsUnderCardNumber, valid }: CardFieldsProps): h.JSX.Element;
@@ -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, mergedSRErrors, moveFocus, showPanel, handleErrorPanelFocus, formData, formErrors, formValid, expiryDatePolicy, dualBrandSelectElements, extensions, selectedBrandValue, showKCP, showBrazilianSSN, socialSecurityNumber, handleOnStoreDetails, billingAddress, handleAddress, billingAddressRef, amount, billingAddressRequired, billingAddressRequiredFields, billingAddressAllowedCountries, brandsConfiguration, enableStoreDetails, hasCVC, hasHolderName, holderNameRequired, installmentOptions, placeholders, positionHolderNameOnTop, showBrandIcon }: {
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, billingAddressRef, amount, billingAddressRequired, billingAddressRequiredFields, billingAddressAllowedCountries, brandsConfiguration, enableStoreDetails, hasCVC, hasHolderName, holderNameRequired, installmentOptions, placeholders, positionHolderNameOnTop, showBrandIcon, showBrandsUnderCardNumber }: {
3
3
  data: any;
4
4
  valid: any;
5
5
  errors: any;
@@ -13,6 +13,7 @@ export declare const CardFieldsWrapper: ({ data, valid, errors, handleChangeFor,
13
13
  hasInstallments: any;
14
14
  handleInstallments: any;
15
15
  showAmountsInInstallments: any;
16
+ brandsIcons: any;
16
17
  mergedSRErrors: any;
17
18
  moveFocus: any;
18
19
  showPanel: any;
@@ -44,4 +45,5 @@ export declare const CardFieldsWrapper: ({ data, valid, errors, handleChangeFor,
44
45
  placeholders: any;
45
46
  positionHolderNameOnTop: any;
46
47
  showBrandIcon: any;
48
+ showBrandsUnderCardNumber: any;
47
49
  }) => h.JSX.Element;
@@ -1,5 +1,5 @@
1
1
  import { PaymentAmount } from '../../../../../types';
2
- import { CardBrandsConfiguration } from '../../../types';
2
+ import { BrandConfiguration, CardBrandsConfiguration } from '../../../types';
3
3
  import { ComponentChildren } from 'preact';
4
4
  import { CVCPolicyType, DatePolicyType } from '../../../../internal/SecuredFields/lib/types';
5
5
  export interface BrandIconProps {
@@ -8,6 +8,7 @@ export interface BrandIconProps {
8
8
  }
9
9
  export interface CardFieldsProps {
10
10
  brand?: string;
11
+ brandsIcons?: Array<BrandConfiguration>;
11
12
  brandsConfiguration?: CardBrandsConfiguration;
12
13
  dualBrandingChangeHandler?: any;
13
14
  dualBrandingElements?: any;
@@ -19,6 +20,7 @@ export interface CardFieldsProps {
19
20
  expiryDatePolicy?: DatePolicyType;
20
21
  onFocusField?: any;
21
22
  showBrandIcon?: boolean;
23
+ showBrandsUnderCardNumber: boolean;
22
24
  valid?: any;
23
25
  }
24
26
  export interface CardHolderNameProps {
@@ -7,6 +7,7 @@ declare const _default: {
7
7
  enableStoreDetails: boolean;
8
8
  hasCVC: boolean;
9
9
  showBrandIcon: boolean;
10
+ showBrandsUnderCardNumber: boolean;
10
11
  positionHolderNameOnTop: boolean;
11
12
  billingAddressRequired: boolean;
12
13
  billingAddressRequiredFields: string[];
@@ -1,5 +1,5 @@
1
1
  import Language from '../../../../language/Language';
2
- import { BinLookupResponse, CardBrandsConfiguration, CardConfiguration, DualBrandSelectElement } from '../../types';
2
+ import { BinLookupResponse, BrandConfiguration, CardBrandsConfiguration, CardConfiguration, DualBrandSelectElement } from '../../types';
3
3
  import { PaymentAmount } from '../../../../types';
4
4
  import { InstallmentOptions } from './components/types';
5
5
  import { ValidationResult } from '../../../internal/PersonalDetails/types';
@@ -52,6 +52,7 @@ export interface CardInputProps {
52
52
  brand?: string;
53
53
  brands?: string[];
54
54
  brandsConfiguration?: CardBrandsConfiguration;
55
+ brandsIcons: Array<BrandConfiguration>;
55
56
  clientKey: string;
56
57
  configuration?: CardConfiguration;
57
58
  countryCode?: string;
@@ -90,6 +91,7 @@ export interface CardInputProps {
90
91
  placeholders?: Placeholders;
91
92
  positionHolderNameOnTop?: boolean;
92
93
  setComponentRef?: (ref: any) => void;
94
+ showBrandsUnderCardNumber: boolean;
93
95
  showBrandIcon?: boolean;
94
96
  showInstallmentAmounts?: boolean;
95
97
  showPayButton?: boolean;
@@ -26,6 +26,7 @@ export declare const extractPropsForCardFields: (props: CardInputProps) => {
26
26
  };
27
27
  positionHolderNameOnTop: boolean;
28
28
  showBrandIcon: boolean;
29
+ showBrandsUnderCardNumber: boolean;
29
30
  lastFour: string;
30
31
  expiryMonth: string;
31
32
  expiryYear: string;
@@ -19,6 +19,16 @@ export interface CardElementProps extends UIElementProps {
19
19
  type?: string;
20
20
  /** List of brands accepted by the component */
21
21
  brands?: string[];
22
+ /**
23
+ * Show/hide available card brands under the Card number field
24
+ * @defaultValue `false`
25
+ */
26
+ showBrandsUnderCardNumber?: boolean;
27
+ /**
28
+ * Show/hide the brand logo when the card brand has been recognized
29
+ * @defaultValue `true`
30
+ */
31
+ showBrandIcon?: boolean;
22
32
  /** Show/hide the "store details" checkbox */
23
33
  enableStoreDetails?: boolean;
24
34
  /** Show/hide the CVC field - merchant set config option */
@@ -33,6 +43,7 @@ export interface CardElementProps extends UIElementProps {
33
43
  hasHolderName?: boolean;
34
44
  /** Whether the card holder name field will be required */
35
45
  holderNameRequired?: boolean;
46
+ /** An object sent in the /paymentMethods response */
36
47
  configuration?: CardConfiguration;
37
48
  /**
38
49
  * Called once all the card input fields have been created but are not yet ready to use.
@@ -70,16 +81,27 @@ export interface CardElementProps extends UIElementProps {
70
81
  [key: string]: any;
71
82
  }
72
83
  export declare type SocialSecurityMode = 'show' | 'hide' | 'auto';
84
+ /** If the merchant wishes to set any of these properties in their local config they should do so via a "configuration" object */
73
85
  export interface CardConfiguration {
86
+ merchantIdentifier?: string;
87
+ merchantOrigin?: string;
88
+ gatewayMerchantId?: string;
89
+ publicKeyId?: string;
90
+ region?: string;
91
+ merchantName?: string;
92
+ merchantId?: string;
93
+ intent?: string;
74
94
  koreanAuthenticationRequired?: boolean;
75
95
  socialSecurityNumberMode?: SocialSecurityMode;
76
96
  icon?: string;
77
97
  brandsConfiguration?: CardBrandsConfiguration;
78
98
  }
99
+ export interface BrandConfiguration {
100
+ name: string;
101
+ icon?: string;
102
+ }
79
103
  export interface CardBrandsConfiguration {
80
- [key: string]: {
81
- icon?: string;
82
- };
104
+ [key: string]: BrandConfiguration;
83
105
  }
84
106
  interface CardPaymentMethodData {
85
107
  type: string;
@@ -0,0 +1,8 @@
1
+ import { h } from 'preact';
2
+ import { BrandConfiguration } from '../../../../Card/types';
3
+ interface CompactViewProps {
4
+ brands: Array<BrandConfiguration>;
5
+ isPaymentMethodSelected: boolean;
6
+ }
7
+ declare const CompactView: ({ brands, isPaymentMethodSelected }: CompactViewProps) => h.JSX.Element;
8
+ export default CompactView;
@@ -0,0 +1,10 @@
1
+ import { h } from 'preact';
2
+ import { BrandConfiguration } from '../../../../Card/types';
3
+ interface PaymentMethodBrandsProps {
4
+ brands: Array<BrandConfiguration>;
5
+ isPaymentMethodSelected: boolean;
6
+ activeBrand?: string;
7
+ isCompactView?: boolean;
8
+ }
9
+ declare const PaymentMethodBrands: ({ activeBrand, brands, isPaymentMethodSelected, isCompactView }: PaymentMethodBrandsProps) => h.JSX.Element;
10
+ export default PaymentMethodBrands;
@@ -0,0 +1 @@
1
+ export { default } from './PaymentMethodBrands';
@@ -24,6 +24,7 @@ declare class PaymentMethodItem extends Component<PaymentMethodItemProps> {
24
24
  };
25
25
  state: {
26
26
  showDisableStoredPaymentMethodConfirmation: boolean;
27
+ activeBrand: any;
27
28
  };
28
29
  isMouseDown: boolean;
29
30
  onFocus: () => void;
@@ -43,7 +44,7 @@ declare class PaymentMethodItem extends Component<PaymentMethodItemProps> {
43
44
  onSelect: any;
44
45
  standalone: any;
45
46
  }, { activeBrand }: {
46
- activeBrand?: any;
47
+ activeBrand: any;
47
48
  }): h.JSX.Element;
48
49
  }
49
50
  export default PaymentMethodItem;
@@ -0,0 +1,6 @@
1
+ import IssuerListContainer from '../helpers/IssuerListContainer';
2
+ declare class OnlineBankingINElement extends IssuerListContainer {
3
+ static type: string;
4
+ formatProps(props: any): any;
5
+ }
6
+ export default OnlineBankingINElement;
@@ -149,6 +149,7 @@ export interface PaypalSettings {
149
149
  vault?: boolean;
150
150
  'client-id': string;
151
151
  'integration-date': string;
152
+ 'enable-funding': string;
152
153
  components: string;
153
154
  }
154
155
  export declare type SupportedLocale = typeof SUPPORTED_LOCALES[number];
@@ -46,6 +46,7 @@ import PersonalDetails from './PersonalDetails';
46
46
  import Klarna from './Klarna';
47
47
  import Twint from './Twint';
48
48
  import MealVoucherFR from './MealVoucherFR';
49
+ import OnlineBankingINElement from './OnlineBankingIN';
49
50
  /**
50
51
  * Maps each component with a Component element.
51
52
  */
@@ -121,6 +122,7 @@ declare const componentsMap: {
121
122
  molpay_ebanking_fpx_MY: typeof MolPayEBankingMY;
122
123
  molpay_ebanking_TH: typeof MolPayEBankingTH;
123
124
  molpay_ebanking_VN: typeof MolPayEBankingVN;
125
+ onlinebanking_IN: typeof OnlineBankingINElement;
124
126
  openbanking_UK: typeof OpenBankingUK;
125
127
  paypal: typeof PayPal;
126
128
  payu_IN_cashcard: typeof PayuCashcard;
@@ -7,8 +7,8 @@ import { BinLookupResponse } from '../../../Card/types';
7
7
  * Initialises & handles the client-side part of SecuredFields
8
8
  */
9
9
  declare class SecuredFieldsProvider extends Component<SFPProps, SFPState> {
10
- private originKeyErrorTimeout;
11
- private originKeyTimeoutMS;
10
+ private invalidOriginErrorTimeout;
11
+ private invalidOriginTimeoutMS;
12
12
  private numCharsInField;
13
13
  private rootNode;
14
14
  private numDateFields;
@@ -1,6 +1,6 @@
1
1
  import { CbObjOnError, CbObjOnFocus, CbObjOnBrand, CbObjOnAllValid, CbObjOnFieldValid, CbObjOnAutoComplete, CbObjOnConfigSuccess, CbObjOnLoad } from '../lib/types';
2
2
  /**
3
- * Emits the onConfigSuccess (ready) event
3
+ * Emits the onLoad event
4
4
  * Here we can assume CSF is loaded and ready to be used
5
5
  */
6
6
  declare function handleOnLoad(cbObj: CbObjOnLoad): void;
@@ -83,6 +83,7 @@ export interface CbObjOnFieldValid {
83
83
  rootNode: HTMLElement;
84
84
  blob?: string;
85
85
  endDigits?: string;
86
+ issuerBin?: number;
86
87
  }
87
88
  export interface CbObjOnAutoComplete {
88
89
  fieldType: string;
@@ -102,8 +103,8 @@ export interface CbObjOnBinLookup {
102
103
  supportedBrands?: string[];
103
104
  brands?: string[];
104
105
  supportedBrandsRaw?: BrandObject[];
105
- isReset?: boolean;
106
106
  rootNode?: HTMLElement;
107
+ isReset?: boolean;
107
108
  }
108
109
  export interface CbObjOnError {
109
110
  fieldType: string;
@@ -150,6 +151,7 @@ export interface SFFeedbackObj {
150
151
  maxLength?: number;
151
152
  error?: string;
152
153
  endDigits?: string;
154
+ issuerBin?: string;
153
155
  type?: string;
154
156
  binValue?: string;
155
157
  focus?: 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.9.0",
26
+ "version": "5.12.0",
27
27
  "license": "MIT",
28
28
  "homepage": "https://docs.adyen.com/checkout",
29
29
  "repository": "github:Adyen/adyen-web",
@@ -84,12 +84,12 @@
84
84
  "gzip-size": "^6.0.0",
85
85
  "jest": "^26.6.3",
86
86
  "node-sass": "^6.0.1",
87
- "postcss": "^8.4.5",
87
+ "postcss": "^8.4.7",
88
88
  "postcss-reporter": "^7.0.2",
89
89
  "prettier": "^1.19.1",
90
90
  "rollup": "^2.61.1",
91
91
  "rollup-plugin-esbuild": "^4.5.0",
92
- "rollup-plugin-postcss": "^4.0.0",
92
+ "rollup-plugin-postcss": "^4.0.2",
93
93
  "rollup-plugin-terser": "^7.0.2",
94
94
  "rollup-plugin-visualizer": "^5.5.1",
95
95
  "stylelint": "^13.13.1",