@adyen/adyen-web 5.63.0 → 5.65.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 (29) hide show
  1. package/dist/adyen.js +1 -1
  2. package/dist/adyen.js.map +1 -1
  3. package/dist/cjs/index.js +1 -1
  4. package/dist/es/index.js +1 -1
  5. package/dist/es.modern/index.js +1 -1
  6. package/dist/types/components/ANCV/ANCV.d.ts +2 -1
  7. package/dist/types/components/Card/Bancontact.d.ts +1 -0
  8. package/dist/types/components/Card/Card.d.ts +1 -4
  9. package/dist/types/components/Card/components/CardInput/defaultProps.d.ts +1 -0
  10. package/dist/types/components/Card/components/CardInput/types.d.ts +2 -2
  11. package/dist/types/components/Card/types.d.ts +5 -2
  12. package/dist/types/components/GooglePay/GooglePay.d.ts +1 -0
  13. package/dist/types/components/ThreeDS2/components/Challenge/PrepareChallenge3DS2.d.ts +2 -2
  14. package/dist/types/components/ThreeDS2/components/DeviceFingerprint/PrepareFingerprint3DS2.d.ts +3 -3
  15. package/dist/types/components/UIElement.d.ts +1 -1
  16. package/dist/types/components/index.d.ts +0 -2
  17. package/dist/types/components/internal/OpenInvoice/useSRPanelForOpenInvoiceErrors.d.ts +10 -0
  18. package/dist/types/components/internal/SecuredFields/SFP/types.d.ts +1 -0
  19. package/dist/types/components/internal/SecuredFields/lib/CSF/types.d.ts +1 -0
  20. package/dist/types/components/internal/SecuredFields/lib/configuration/constants.d.ts +1 -1
  21. package/dist/types/components/internal/SecuredFields/lib/securedField/AbstractSecuredField.d.ts +1 -0
  22. package/dist/types/components/internal/SecuredFields/lib/types.d.ts +2 -0
  23. package/dist/types/core/Analytics/constants.d.ts +9 -0
  24. package/dist/types/core/Analytics/types.d.ts +5 -5
  25. package/dist/types/core/Analytics/utils.d.ts +1 -1
  26. package/dist/types/core/Services/analytics/collect-id.d.ts +2 -2
  27. package/dist/types/core/Services/analytics/types.d.ts +5 -2
  28. package/package.json +1 -1
  29. package/dist/types/components/Ideal/index.d.ts +0 -5
@@ -29,7 +29,8 @@ export declare class ANCVElement extends UIElement<ANCVProps> {
29
29
  * @param order -
30
30
  */
31
31
  protected handleOrder: ({ order }: PaymentResponse) => any;
32
- createOrder: () => false | Promise<void>;
32
+ createOrder: () => void;
33
+ submit(): boolean;
33
34
  payButton: (props: any) => h.JSX.Element;
34
35
  get isValid(): boolean;
35
36
  get displayName(): string;
@@ -74,6 +74,7 @@ declare class BancontactElement extends CardElement {
74
74
  onBlur?: (event: import("../internal/SecuredFields/lib/types").CbObjOnFocus | import("../types").ComponentFocusObject) => void;
75
75
  onBinValue?: (event: import("../internal/SecuredFields/lib/types").CbObjOnBinValue) => void;
76
76
  onBinLookup?: (event: import("../internal/SecuredFields/lib/types").CbObjOnBinLookup) => void;
77
+ exposeExpiryDate?: boolean;
77
78
  environment?: string;
78
79
  session?: import("../../core/CheckoutSession/CheckoutSession").default;
79
80
  onChange?: (state: any, element: import("../UIElement").UIElement<any>) => void;
@@ -28,10 +28,6 @@ export declare class CardElement extends UIElement<CardElementProps> {
28
28
  countryCode: any;
29
29
  configuration: {
30
30
  socialSecurityNumberMode: import("./types").SocialSecurityMode;
31
- /**
32
- * Click to Pay configuration
33
- * - If email is set explicitly in the configuration, then it can override the one used in the session creation
34
- */
35
31
  visaSrciDpaId?: string;
36
32
  visaSrcInitiatorId?: string;
37
33
  mcSrcClientId?: string;
@@ -84,6 +80,7 @@ export declare class CardElement extends UIElement<CardElementProps> {
84
80
  onBlur?: (event: CbObjOnFocus | ComponentFocusObject) => void;
85
81
  onBinValue?: (event: import("../internal/SecuredFields/lib/types").CbObjOnBinValue) => void;
86
82
  onBinLookup?: (event: CbObjOnBinLookup) => void;
83
+ exposeExpiryDate?: boolean;
87
84
  environment?: string;
88
85
  session?: import("../../core/CheckoutSession/CheckoutSession").default;
89
86
  onChange?: (state: any, element: UIElement<any>) => void;
@@ -21,6 +21,7 @@ declare const _default: {
21
21
  autoFocus: boolean;
22
22
  isPayButtonPrimaryVariant: boolean;
23
23
  disableIOSArrowKeys: boolean;
24
+ exposeExpiryDate: boolean;
24
25
  onLoad: () => any;
25
26
  onConfigSuccess: () => any;
26
27
  onAllValid: () => any;
@@ -3,10 +3,9 @@ import { BinLookupResponse, BrandConfiguration, CardBrandsConfiguration, CardCon
3
3
  import { AddressData, PaymentAmount } from '../../../../types';
4
4
  import { InstallmentOptions } from './components/types';
5
5
  import { ValidationResult } from '../../../internal/PersonalDetails/types';
6
- import { CVCPolicyType, DatePolicyType } from '../../../internal/SecuredFields/lib/types';
6
+ import { CVCPolicyType, DatePolicyType, CbObjOnError, StylesObject } from '../../../internal/SecuredFields/lib/types';
7
7
  import Specifications from '../../../internal/Address/Specifications';
8
8
  import { AddressSchema } from '../../../internal/Address/types';
9
- import { CbObjOnError, StylesObject } from '../../../internal/SecuredFields/lib/types';
10
9
  import { Resources } from '../../../../core/Context/Resources';
11
10
  import { SRPanel } from '../../../../core/Errors/SRPanel';
12
11
  import RiskElement from '../../../../core/RiskModule';
@@ -123,6 +122,7 @@ export interface CardInputProps {
123
122
  trimTrailingSeparator?: boolean;
124
123
  type?: string;
125
124
  maskSecurityCode?: boolean;
125
+ exposeExpiryDate?: boolean;
126
126
  disclaimerMessage?: DisclaimerMsgObject;
127
127
  onErrorAnalytics?: (obj: FieldErrorAnalyticsObject) => {};
128
128
  }
@@ -1,7 +1,6 @@
1
1
  import { ComponentFocusObject, UIElementProps } from '../types';
2
2
  import { AddressData, BrowserInfo } from '../../types';
3
- import { CbObjOnBinValue, CbObjOnBrand, CbObjOnConfigSuccess, CbObjOnError, CbObjOnFieldValid, CbObjOnFocus, CbObjOnLoad, CbObjOnBinLookup } from '../internal/SecuredFields/lib/types';
4
- import { CVCPolicyType, DatePolicyType } from '../internal/SecuredFields/lib/types';
3
+ import { CbObjOnBinValue, CbObjOnBrand, CbObjOnConfigSuccess, CbObjOnError, CbObjOnFieldValid, CbObjOnFocus, CbObjOnLoad, CbObjOnBinLookup, CVCPolicyType, DatePolicyType } from '../internal/SecuredFields/lib/types';
5
4
  import { ClickToPayConfiguration } from '../internal/ClickToPay/types';
6
5
  export interface CardElementProps extends UIElementProps {
7
6
  /**
@@ -109,6 +108,10 @@ export interface CardElementProps extends UIElementProps {
109
108
  */
110
109
  onBinLookup?: (event: CbObjOnBinLookup) => void;
111
110
  [key: string]: any;
111
+ /**
112
+ * Allows SF to return an unencrypted expiryDate
113
+ */
114
+ exposeExpiryDate?: boolean;
112
115
  }
113
116
  export type SocialSecurityMode = 'show' | 'hide' | 'auto';
114
117
  /** If the merchant wishes to set any of these properties in their local config they should do so via a "configuration" object */
@@ -54,6 +54,7 @@ declare class GooglePay extends UIElement<GooglePayProps> {
54
54
  formatData(): {
55
55
  paymentMethod: any;
56
56
  browserInfo: import("../../types").BrowserInfo;
57
+ origin: string;
57
58
  };
58
59
  submit: () => Promise<void>;
59
60
  /**
@@ -4,7 +4,7 @@ import '../../ThreeDS2.scss';
4
4
  import './challenge.scss';
5
5
  import { ActionHandledReturnObject } from '../../../types';
6
6
  declare class PrepareChallenge3DS2 extends Component<PrepareChallenge3DS2Props, PrepareChallenge3DS2State> {
7
- static defaultProps: {
7
+ static readonly defaultProps: {
8
8
  onComplete: () => void;
9
9
  onError: () => void;
10
10
  onActionHandled: () => void;
@@ -12,7 +12,7 @@ declare class PrepareChallenge3DS2 extends Component<PrepareChallenge3DS2Props,
12
12
  constructor(props: any);
13
13
  onActionHandled: (rtnObj: ActionHandledReturnObject) => void;
14
14
  onFormSubmit: (msg: string) => void;
15
- setStatusComplete(resultObj: any): void;
15
+ setStatusComplete(resultObj: any, isTimeout?: boolean): void;
16
16
  setStatusError(errorInfoObj: any): void;
17
17
  render(_: any, { challengeData }: {
18
18
  challengeData: any;
@@ -3,8 +3,8 @@ import { PrepareFingerprint3DS2Props, PrepareFingerprint3DS2State } from './type
3
3
  import { ResultObject } from '../../types';
4
4
  import { ActionHandledReturnObject } from '../../../types';
5
5
  declare class PrepareFingerprint3DS2 extends Component<PrepareFingerprint3DS2Props, PrepareFingerprint3DS2State> {
6
- static type: string;
7
- static defaultProps: {
6
+ static readonly type = "scheme";
7
+ static readonly defaultProps: {
8
8
  onComplete: () => void;
9
9
  onError: () => void;
10
10
  paymentData: string;
@@ -15,7 +15,7 @@ declare class PrepareFingerprint3DS2 extends Component<PrepareFingerprint3DS2Pro
15
15
  onActionHandled: (rtnObj: ActionHandledReturnObject) => void;
16
16
  onFormSubmit: (msg: string) => void;
17
17
  componentDidMount(): void;
18
- setStatusComplete(resultObj: ResultObject): void;
18
+ setStatusComplete(resultObj: ResultObject, isTimeout?: boolean): void;
19
19
  render({ showSpinner }: {
20
20
  showSpinner: any;
21
21
  }, { status, fingerPrintData }: {
@@ -24,7 +24,7 @@ export declare class UIElement<P extends UIElementProps = any> extends BaseEleme
24
24
  * In some other cases e.g. 3DS2 components, this function is overridden to allow more specific analytics actions to be created
25
25
  */
26
26
  protected submitAnalytics(analyticsObj: SendAnalyticsObject, uiElementProps?: any): void;
27
- private onSubmit;
27
+ protected onSubmit(): void;
28
28
  private onValid;
29
29
  onComplete(state: any): void;
30
30
  /**
@@ -13,7 +13,6 @@ import GooglePay from './GooglePay';
13
13
  import Entercash from './Entercash';
14
14
  import Econtext from './Econtext';
15
15
  import { FacilyPay3x, FacilyPay4x, FacilyPay6x, FacilyPay10x, FacilyPay12x } from './FacilyPay';
16
- import Ideal from './Ideal';
17
16
  import PayPal from './PayPal';
18
17
  import QiwiWallet from './QiwiWallet';
19
18
  import Redirect from './Redirect';
@@ -151,7 +150,6 @@ declare const componentsMap: {
151
150
  dotpay: typeof Dotpay;
152
151
  entercash: typeof Entercash;
153
152
  eps: typeof Eps;
154
- ideal: typeof Ideal;
155
153
  molpay_ebanking_fpx_MY: typeof MolPayEBankingMY;
156
154
  molpay_ebanking_TH: typeof MolPayEBankingTH;
157
155
  molpay_ebanking_VN: typeof MolPayEBankingVN;
@@ -0,0 +1,10 @@
1
+ import { MutableRef } from 'preact/hooks';
2
+ import { OpenInvoiceProps, OpenInvoiceStateData, OpenInvoiceStateError } from './types';
3
+ interface UseSRPanelForErrorsProps {
4
+ errors: OpenInvoiceStateError;
5
+ data: OpenInvoiceStateData;
6
+ props: OpenInvoiceProps;
7
+ isValidating: MutableRef<boolean>;
8
+ }
9
+ declare const useSRPanelForOpenInvoiceErrors: ({ errors, data, props, isValidating }: UseSRPanelForErrorsProps) => void;
10
+ export default useSRPanelForOpenInvoiceErrors;
@@ -43,6 +43,7 @@ export interface SFPProps {
43
43
  render: () => {};
44
44
  resources: Resources;
45
45
  maskSecurityCode: boolean;
46
+ exposeExpiryDate: boolean;
46
47
  disableIOSArrowKeys: (obj: TouchStartEventObj) => void | null;
47
48
  }
48
49
  export interface SFPState {
@@ -50,6 +50,7 @@ export interface CSFSetupObject extends CSFCommonProps {
50
50
  isKCP?: boolean;
51
51
  i18n?: Language;
52
52
  forceCompat: boolean;
53
+ exposeExpiryDate: boolean;
53
54
  }
54
55
  /**
55
56
  * The type for the this.config object created by CSF - properties that just need to be set once, at startup, and then don't change.
@@ -12,7 +12,7 @@ export declare const ENCRYPTED_BANK_LOCATION_FIELD = "encryptedBankLocationId";
12
12
  export declare const ENCRYPTED_SECURITY_CODE_3_DIGITS = "encryptedSecurityCode3digits";
13
13
  export declare const ENCRYPTED_SECURITY_CODE_4_DIGITS = "encryptedSecurityCode4digits";
14
14
  export declare const GIFT_CARD = "giftcard";
15
- export declare const SF_VERSION = "4.8.3";
15
+ export declare const SF_VERSION = "4.9.0";
16
16
  export declare const DEFAULT_CARD_GROUP_TYPES: string[];
17
17
  export declare const NON_CREDIT_CARD_TYPE_SECURED_FIELDS: string[];
18
18
  export declare const CREDIT_CARD_SF_FIELDS: string[];
@@ -23,6 +23,7 @@ export interface SFInternalConfig {
23
23
  minimumExpiryDate: string;
24
24
  implementationType: string;
25
25
  maskSecurityCode: boolean;
26
+ exposeExpiryDate: boolean;
26
27
  disableIOSArrowKeys: boolean;
27
28
  }
28
29
  /**
@@ -96,6 +96,7 @@ export interface CbObjOnFieldValid {
96
96
  rootNode: HTMLElement;
97
97
  blob?: string;
98
98
  endDigits?: string;
99
+ expiryDate?: string;
99
100
  issuerBin?: number;
100
101
  }
101
102
  export interface CbObjOnAutoComplete {
@@ -166,6 +167,7 @@ export interface SFFeedbackObj {
166
167
  error?: string;
167
168
  endDigits?: string;
168
169
  issuerBin?: string;
170
+ expiryDate?: string;
169
171
  type?: string;
170
172
  binValue?: string;
171
173
  focus?: boolean;
@@ -71,3 +71,12 @@ export declare const errorCodeMapping: {
71
71
  "error.va.sf-ach-loc.02": string;
72
72
  };
73
73
  export declare const ANALYTICS_EXPRESS_PAGES_ARRAY: string[];
74
+ export declare const ALLOWED_ANALYTICS_DATA: string[];
75
+ export declare enum Analytics3DS2Events {
76
+ FINGERPRINT_DATA_SENT = "fingerprintDataSentWeb",
77
+ FINGERPRINT_IFRAME_LOADED = "fingerprintIframeLoaded",
78
+ FINGERPRINT_COMPLETED = "fingerprintCompleted",
79
+ CHALLENGE_DATA_SENT = "challengeDataSentWeb",
80
+ CHALLENGE_IFRAME_LOADED = "challengeIframeLoaded",
81
+ CHALLENGE_COMPLETED = "challengeCompleted"
82
+ }
@@ -26,8 +26,11 @@ export interface AnalyticsData {
26
26
  osVersion: string;
27
27
  };
28
28
  };
29
+ /**
30
+ * Use a checkoutAttemptId from a previous page
31
+ */
32
+ checkoutAttemptId?: string;
29
33
  }
30
- export declare const ALLOWED_ANALYTICS_DATA: string[];
31
34
  export interface AnalyticsOptions {
32
35
  /**
33
36
  * Enable/Disable all analytics
@@ -37,10 +40,6 @@ export interface AnalyticsOptions {
37
40
  * Enable/Disable telemetry data
38
41
  */
39
42
  telemetry?: boolean;
40
- /**
41
- * Reuse a previous checkoutAttemptId from a previous page
42
- */
43
- checkoutAttemptId?: string;
44
43
  /**
45
44
  * Data to be sent along with the event data
46
45
  */
@@ -75,6 +74,7 @@ export interface AnalyticsObject {
75
74
  issuer?: string;
76
75
  isExpress?: boolean;
77
76
  expressPage?: string;
77
+ result?: string;
78
78
  }
79
79
  export type ANALYTICS_EVENT = 'log' | 'error' | 'info';
80
80
  export type CreateAnalyticsObject = Omit<AnalyticsObject, 'timestamp' | 'id'> & {
@@ -19,4 +19,4 @@ export declare const getUTCTimestamp: () => number;
19
19
  * All objects can also have a "metadata" object of key-value pairs
20
20
  */
21
21
  export declare const createAnalyticsObject: (aObj: CreateAnalyticsObject) => AnalyticsObject;
22
- export declare const processAnalyticsData: (analyticsData: AnalyticsData) => {};
22
+ export declare const processAnalyticsData: (analyticsData: AnalyticsData) => AnalyticsData;
@@ -1,9 +1,9 @@
1
- import { CollectIdProps } from './types';
1
+ import { CollectIdEvent, CollectIdProps } from './types';
2
2
  export declare const FAILURE_MSG = "WARNING: Failed to retrieve \"checkoutAttemptId\". Consequently, analytics will not be available for this payment. The payment process, however, will not be affected.";
3
3
  /**
4
4
  * Send an event to Adyen with some basic telemetry info and receive a checkoutAttemptId in response
5
5
  * @param config - object containing values needed to calculate the url for the request; and also some that need to be serialized and included in the body of request
6
6
  * @returns a function returning a promise containing the response of the call (an object containing a checkoutAttemptId property)
7
7
  */
8
- declare const collectId: ({ analyticsContext, clientKey, locale, analyticsPath }: CollectIdProps) => (event: any) => Promise<string>;
8
+ declare const collectId: ({ analyticsContext, clientKey, locale, analyticsPath }: CollectIdProps) => (event: CollectIdEvent) => Promise<string>;
9
9
  export default collectId;
@@ -1,4 +1,4 @@
1
- import { AnalyticsConfig } from '../../Analytics/types';
1
+ import { AnalyticsConfig, AnalyticsData, AnalyticsInitialEvent } from '../../Analytics/types';
2
2
  import { PaymentAmount } from '../../../types';
3
3
  export type CheckoutAttemptIdSession = {
4
4
  id: string;
@@ -11,11 +11,14 @@ export type LogEventProps = Pick<AnalyticsConfig, 'loadingContext' | 'locale'>;
11
11
  export type TelemetryEvent = {
12
12
  version: string;
13
13
  channel: 'Web';
14
+ platform: 'Web';
14
15
  locale: string;
15
16
  referrer: string;
16
17
  screenWidth: number;
17
18
  containerWidth: number;
18
19
  component: string;
19
20
  flavor: string;
21
+ buildType: string;
20
22
  amount?: PaymentAmount;
21
- };
23
+ } & AnalyticsInitialEvent & AnalyticsData;
24
+ export type CollectIdEvent = AnalyticsInitialEvent & AnalyticsData;
package/package.json CHANGED
@@ -25,7 +25,7 @@
25
25
  "./dist/es/adyen.css": "./dist/es/adyen.css",
26
26
  "./package.json": "./package.json"
27
27
  },
28
- "version": "5.63.0",
28
+ "version": "5.65.0",
29
29
  "license": "MIT",
30
30
  "homepage": "https://docs.adyen.com/checkout",
31
31
  "repository": "github:Adyen/adyen-web",
@@ -1,5 +0,0 @@
1
- import IssuerListContainer from '../helpers/IssuerListContainer';
2
- declare class IdealElement extends IssuerListContainer {
3
- static type: string;
4
- }
5
- export default IdealElement;