@adyen/adyen-web 5.63.0 → 5.64.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.
@@ -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 */
@@ -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
  /**
@@ -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,4 @@ 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[];
@@ -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
  */
@@ -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.64.0",
29
29
  "license": "MIT",
30
30
  "homepage": "https://docs.adyen.com/checkout",
31
31
  "repository": "github:Adyen/adyen-web",