@adyen/adyen-web 5.59.0 → 5.61.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 (91) 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/Ach/Ach.d.ts +2 -1
  7. package/dist/types/components/AmazonPay/AmazonPay.d.ts +2 -0
  8. package/dist/types/components/AmazonPay/types.d.ts +9 -0
  9. package/dist/types/components/ApplePay/ApplePay.d.ts +3 -0
  10. package/dist/types/components/ApplePay/defaultProps.d.ts +1 -0
  11. package/dist/types/components/ApplePay/types.d.ts +10 -8
  12. package/dist/types/components/BaseElement.d.ts +3 -0
  13. package/dist/types/components/BcmcMobile/BcmcMobile.d.ts +2 -1
  14. package/dist/types/components/Card/Bancontact.d.ts +4 -2
  15. package/dist/types/components/Card/Card.d.ts +18 -9
  16. package/dist/types/components/Card/components/CardInput/components/CardFieldsWrapper.d.ts +4 -2
  17. package/dist/types/components/Card/components/CardInput/components/CardHolderName.d.ts +1 -1
  18. package/dist/types/components/Card/components/CardInput/components/types.d.ts +4 -0
  19. package/dist/types/components/Card/components/CardInput/types.d.ts +5 -3
  20. package/dist/types/components/Card/components/CardInput/utils.d.ts +1 -1
  21. package/dist/types/components/Card/types.d.ts +13 -4
  22. package/dist/types/components/CashAppPay/CashAppPay.d.ts +2 -1
  23. package/dist/types/components/ClickToPay/ClickToPay.d.ts +2 -1
  24. package/dist/types/components/Donation/Donation.d.ts +4 -1
  25. package/dist/types/components/Donation/components/types.d.ts +2 -2
  26. package/dist/types/components/Donation/types.d.ts +17 -0
  27. package/dist/types/components/Dragonpay/Dragonpay.d.ts +2 -1
  28. package/dist/types/components/Dropin/Dropin.d.ts +2 -1
  29. package/dist/types/components/DuitNow/DuitNow.d.ts +2 -1
  30. package/dist/types/components/GooglePay/GooglePay.d.ts +3 -0
  31. package/dist/types/components/GooglePay/defaultProps.d.ts +1 -0
  32. package/dist/types/components/GooglePay/types.d.ts +9 -0
  33. package/dist/types/components/PayMe/PayMe.d.ts +2 -1
  34. package/dist/types/components/PayNow/PayNow.d.ts +2 -1
  35. package/dist/types/components/PayPal/Paypal.d.ts +2 -0
  36. package/dist/types/components/PayPal/types.d.ts +5 -1
  37. package/dist/types/components/PromptPay/PromptPay.d.ts +2 -1
  38. package/dist/types/components/Riverty/Riverty.d.ts +2 -1
  39. package/dist/types/components/SecuredFields/SecuredFields.d.ts +1 -0
  40. package/dist/types/components/Swish/Swish.d.ts +2 -1
  41. package/dist/types/components/ThreeDS2/ThreeDS2Challenge.d.ts +6 -1
  42. package/dist/types/components/ThreeDS2/ThreeDS2DeviceFingerprint.d.ts +12 -7
  43. package/dist/types/components/ThreeDS2/components/Challenge/DoChallenge3DS2.d.ts +2 -1
  44. package/dist/types/components/ThreeDS2/components/Challenge/PrepareChallenge3DS2.d.ts +4 -3
  45. package/dist/types/components/ThreeDS2/components/Challenge/types.d.ts +3 -0
  46. package/dist/types/components/ThreeDS2/components/DeviceFingerprint/DoFingerprint3DS2.d.ts +2 -1
  47. package/dist/types/components/ThreeDS2/components/DeviceFingerprint/PrepareFingerprint3DS2.d.ts +7 -4
  48. package/dist/types/components/ThreeDS2/components/DeviceFingerprint/types.d.ts +6 -1
  49. package/dist/types/components/ThreeDS2/components/Form/ThreeDS2Form.d.ts +1 -0
  50. package/dist/types/components/ThreeDS2/components/utils.d.ts +9 -3
  51. package/dist/types/components/ThreeDS2/config.d.ts +9 -0
  52. package/dist/types/components/ThreeDS2/types.d.ts +4 -0
  53. package/dist/types/components/UIElement.d.ts +11 -0
  54. package/dist/types/components/WeChat/WeChat.d.ts +3 -1
  55. package/dist/types/components/internal/Address/Address.d.ts +2 -0
  56. package/dist/types/components/internal/Address/Specifications.d.ts +0 -1
  57. package/dist/types/components/internal/Address/types.d.ts +8 -12
  58. package/dist/types/components/internal/Address/utils.d.ts +0 -2
  59. package/dist/types/components/internal/FormFields/Select/Select.d.ts +1 -1
  60. package/dist/types/components/internal/FormFields/Select/components/SelectButton.d.ts +1 -1
  61. package/dist/types/components/internal/FormFields/Select/types.d.ts +6 -4
  62. package/dist/types/components/internal/IssuerList/types.d.ts +2 -0
  63. package/dist/types/components/internal/QRLoader/types.d.ts +2 -0
  64. package/dist/types/components/internal/SecuredFields/lib/configuration/constants.d.ts +2 -1
  65. package/dist/types/components/internal/SecuredFields/utils.d.ts +3 -13
  66. package/dist/types/components/internal/SocialSecurityNumberBrazil/SocialSecurityNumberBrazil.d.ts +3 -1
  67. package/dist/types/components/types.d.ts +23 -3
  68. package/dist/types/core/Analytics/Analytics.d.ts +3 -13
  69. package/dist/types/core/Analytics/EventsQueue.d.ts +13 -5
  70. package/dist/types/core/Analytics/analyticsPreProcessor.d.ts +3 -0
  71. package/dist/types/core/Analytics/constants.d.ts +72 -0
  72. package/dist/types/core/Analytics/types.d.ts +83 -1
  73. package/dist/types/core/Analytics/utils.d.ts +22 -0
  74. package/dist/types/core/Environment/Environment.d.ts +2 -0
  75. package/dist/types/core/Environment/index.d.ts +1 -1
  76. package/dist/types/core/Errors/types.d.ts +4 -0
  77. package/dist/types/core/Errors/utils.d.ts +1 -0
  78. package/dist/types/core/Services/analytics/collect-id.d.ts +5 -4
  79. package/dist/types/core/Services/analytics/log-event.d.ts +2 -1
  80. package/dist/types/core/Services/analytics/types.d.ts +17 -7
  81. package/dist/types/core/Services/http.d.ts +1 -1
  82. package/dist/types/core/core.d.ts +1 -0
  83. package/dist/types/core/types.d.ts +3 -1
  84. package/dist/types/utils/Formatters/formatters.d.ts +1 -0
  85. package/dist/types/utils/Storage.d.ts +3 -0
  86. package/dist/types/utils/base64.d.ts +4 -1
  87. package/dist/types/utils/debounce.d.ts +2 -0
  88. package/dist/types/utils/textUtils.d.ts +1 -0
  89. package/dist/types/utils/validator-utils.d.ts +1 -1
  90. package/package.json +2 -2
  91. package/dist/types/core/Services/analytics/post-telemetry.d.ts +0 -13
@@ -28,6 +28,7 @@ export declare class AchElement extends UIElement<AchElementProps> {
28
28
  icon?: string;
29
29
  amount?: import("../../types").PaymentAmount;
30
30
  secondaryAmount?: import("../../types").PaymentAmountExtended;
31
+ brand?: string;
31
32
  showPayButton?: boolean;
32
33
  setStatusAutomatically?: boolean;
33
34
  payButton?: (options: import("../types").PayButtonFunctionProps) => h.JSX.Element;
@@ -41,7 +42,7 @@ export declare class AchElement extends UIElement<AchElementProps> {
41
42
  order?: import("../../types").Order;
42
43
  modules?: {
43
44
  srPanel?: import("../../core/Errors/SRPanel").SRPanel;
44
- analytics?: import("../../core/Analytics/Analytics").default;
45
+ analytics?: import("../types").AnalyticsModule;
45
46
  resources?: import("../../core/Context/Resources").Resources;
46
47
  risk?: import("../../core/RiskModule").default;
47
48
  };
@@ -2,9 +2,11 @@ import { h } from 'preact';
2
2
  import UIElement from '../UIElement';
3
3
  import { AmazonPayElementData, AmazonPayElementProps } from './types';
4
4
  import './AmazonPay.scss';
5
+ import { SendAnalyticsObject } from '../../core/Analytics/types';
5
6
  export declare class AmazonPayElement extends UIElement<AmazonPayElementProps> {
6
7
  static type: string;
7
8
  protected static defaultProps: Partial<AmazonPayElementProps>;
9
+ protected submitAnalytics(analyticsObj: SendAnalyticsObject): void;
8
10
  formatProps(props: any): any;
9
11
  /**
10
12
  * Formats the component data output
@@ -63,6 +63,15 @@ export interface AmazonPayElementProps extends UIElementProps {
63
63
  onClick: (resolve: any, reject: any) => Promise<void>;
64
64
  onError: (error: any, component: any) => void;
65
65
  onSignOut: (resolve: any, reject: any) => Promise<void>;
66
+ /**
67
+ * Used for analytics
68
+ */
69
+ expressPage?: 'cart' | 'minicart' | 'pdp' | 'checkout';
70
+ /**
71
+ * Used for analytics
72
+ * @defaultValue false
73
+ */
74
+ isExpress?: boolean;
66
75
  }
67
76
  export interface AmazonPayComponentProps extends AmazonPayElementProps {
68
77
  ref: any;
@@ -1,6 +1,7 @@
1
1
  import { h } from 'preact';
2
2
  import UIElement from '../UIElement';
3
3
  import { ApplePayElementProps, ApplePayElementData } from './types';
4
+ import { SendAnalyticsObject } from '../../core/Analytics/types';
4
5
  declare class ApplePayElement extends UIElement<ApplePayElementProps> {
5
6
  protected static type: string;
6
7
  protected static defaultProps: {
@@ -16,6 +17,7 @@ declare class ApplePayElement extends UIElement<ApplePayElementProps> {
16
17
  merchantId: string;
17
18
  };
18
19
  initiative: string;
20
+ isExpress: boolean;
19
21
  lineItems: any;
20
22
  merchantCapabilities: string[];
21
23
  shippingMethods: any;
@@ -37,6 +39,7 @@ declare class ApplePayElement extends UIElement<ApplePayElementProps> {
37
39
  showPayButton: boolean;
38
40
  };
39
41
  constructor(props: any);
42
+ protected submitAnalytics(analyticsObj: SendAnalyticsObject): void;
40
43
  /**
41
44
  * Formats the component props
42
45
  */
@@ -14,6 +14,7 @@ declare const defaultProps: {
14
14
  merchantId: string;
15
15
  };
16
16
  initiative: string;
17
+ isExpress: boolean;
17
18
  /**
18
19
  * https://developer.apple.com/documentation/apple_pay_on_the_web/applepaypaymentrequest/1916120-lineitems
19
20
  * A set of line items that explain recurring payments and additional charges and discounts.
@@ -9,6 +9,15 @@ type Initiative = 'web' | 'messaging';
9
9
  export type ApplePayButtonType = 'plain' | 'buy' | 'donate' | 'check-out' | 'book' | 'subscribe' | 'add-money' | 'contribute' | 'order' | 'reload' | 'rent' | 'support' | 'tip' | 'top-up';
10
10
  export type OnAuthorizedCallback = (resolve: (result?: ApplePayJS.ApplePayPaymentAuthorizationResult) => void, reject: (result?: ApplePayJS.ApplePayPaymentAuthorizationResult) => void, event: ApplePayJS.ApplePayPaymentAuthorizedEvent) => void;
11
11
  export interface ApplePayElementProps extends UIElementProps {
12
+ /**
13
+ * Used for analytics
14
+ * @defaultValue false
15
+ */
16
+ isExpress?: boolean;
17
+ /**
18
+ * Used for analytics
19
+ */
20
+ expressPage?: 'cart' | 'minicart' | 'pdp' | 'checkout';
12
21
  /**
13
22
  * The Apple Pay version number your website supports.
14
23
  * @default highest supported version by the shopper device
@@ -67,14 +76,7 @@ export interface ApplePayElementProps extends UIElementProps {
67
76
  * ApplePayRecurringPaymentRequest - Represents a request to set up a recurring payment, typically a subscription.
68
77
  * {@link https://developer.apple.com/documentation/apple_pay_on_the_web/applepayrecurringpaymentrequest}
69
78
  */
70
- recurringPaymentRequest?: {
71
- paymentDescription: string;
72
- regularBilling: ApplePayJS.ApplePayLineItem;
73
- trialBilling?: ApplePayJS.ApplePayLineItem;
74
- billingAgreement?: string;
75
- managementURL: string;
76
- tokenNotificationURL?: string;
77
- };
79
+ recurringPaymentRequest?: ApplePayJS.ApplePayRecurringPaymentRequest;
78
80
  /**
79
81
  * The billing information that you require from the user in order to process the transaction.
80
82
  */
@@ -4,6 +4,7 @@ import Core from '../core';
4
4
  import { BaseElementProps, PaymentData } from './types';
5
5
  import { RiskData } from '../core/RiskModule/RiskModule';
6
6
  import { Resources } from '../core/Context/Resources';
7
+ import { AnalyticsInitialEvent, SendAnalyticsObject } from '../core/Analytics/types';
7
8
  declare class BaseElement<P extends BaseElementProps> {
8
9
  readonly _id: string;
9
10
  props: P;
@@ -28,6 +29,8 @@ declare class BaseElement<P extends BaseElementProps> {
28
29
  * properly adding the type of the formatData function
29
30
  */
30
31
  protected formatData(): any;
32
+ protected setUpAnalytics(setUpAnalyticsObj: AnalyticsInitialEvent): any;
33
+ protected submitAnalytics(analyticsObj?: SendAnalyticsObject): any;
31
34
  protected setState(newState: object): void;
32
35
  /**
33
36
  * Returns the component payment data ready to submit to the Checkout API
@@ -31,6 +31,7 @@ declare class BCMCMobileElement extends QRLoaderContainer {
31
31
  icon?: string;
32
32
  amount?: import("../../types").PaymentAmount;
33
33
  secondaryAmount?: import("../../types").PaymentAmountExtended;
34
+ brand?: string;
34
35
  showPayButton?: boolean;
35
36
  setStatusAutomatically?: boolean;
36
37
  payButton?: (options: import("../types").PayButtonFunctionProps) => import("preact").JSX.Element;
@@ -44,7 +45,7 @@ declare class BCMCMobileElement extends QRLoaderContainer {
44
45
  order?: import("../../types").Order;
45
46
  modules?: {
46
47
  srPanel?: import("../../core/Errors/SRPanel").SRPanel;
47
- analytics?: import("../../core/Analytics/Analytics").default;
48
+ analytics?: import("../types").AnalyticsModule;
48
49
  resources?: import("../../core/Context/Resources").Resources;
49
50
  risk?: import("../../core/RiskModule").default;
50
51
  };
@@ -46,6 +46,7 @@ declare class BancontactElement extends CardElement {
46
46
  icon: string;
47
47
  installmentOptions: any;
48
48
  enableStoreDetails: boolean;
49
+ showStoreDetailsCheckbox: boolean;
49
50
  clickToPayConfiguration: {
50
51
  disableOtpAutoFocus: boolean;
51
52
  shopperEmail: any;
@@ -69,7 +70,8 @@ declare class BancontactElement extends CardElement {
69
70
  onFieldValid?: (event: import("../internal/SecuredFields/lib/types").CbObjOnFieldValid) => void;
70
71
  onBrand?: (event: import("../internal/SecuredFields/lib/types").CbObjOnBrand) => void;
71
72
  onError?: (event: import("../internal/SecuredFields/lib/types").CbObjOnError) => void;
72
- onFocus?: (event: import("../internal/SecuredFields/lib/types").CbObjOnFocus) => void;
73
+ onFocus?: (event: import("../internal/SecuredFields/lib/types").CbObjOnFocus | import("../types").ComponentFocusObject) => void;
74
+ onBlur?: (event: import("../internal/SecuredFields/lib/types").CbObjOnFocus | import("../types").ComponentFocusObject) => void;
73
75
  onBinValue?: (event: import("../internal/SecuredFields/lib/types").CbObjOnBinValue) => void;
74
76
  onBinLookup?: (event: import("../internal/SecuredFields/lib/types").CbObjOnBinLookup) => void;
75
77
  environment?: string;
@@ -100,7 +102,7 @@ declare class BancontactElement extends CardElement {
100
102
  order?: import("../../types").Order;
101
103
  modules?: {
102
104
  srPanel?: import("../../core/Errors/SRPanel").SRPanel;
103
- analytics?: import("../../core/Analytics/Analytics").default;
105
+ analytics?: import("../types").AnalyticsModule;
104
106
  resources?: import("../../core/Context/Resources").Resources;
105
107
  risk?: import("../../core/RiskModule").default;
106
108
  };
@@ -1,8 +1,9 @@
1
1
  import { h } from 'preact';
2
2
  import { UIElement } from '../UIElement';
3
3
  import { BinLookupResponse, CardElementData, CardElementProps } from './types';
4
- import { CbObjOnBinLookup } from '../internal/SecuredFields/lib/types';
5
- import { PayButtonFunctionProps, UIElementStatus } from '../types';
4
+ import { CbObjOnBinLookup, CbObjOnConfigSuccess, CbObjOnFocus } from '../internal/SecuredFields/lib/types';
5
+ import { ComponentFocusObject, PayButtonFunctionProps, UIElementStatus } from '../types';
6
+ import { SendAnalyticsObject } from '../../core/Analytics/types';
6
7
  export declare class CardElement extends UIElement<CardElementProps> {
7
8
  static type: string;
8
9
  private readonly clickToPayService;
@@ -27,6 +28,10 @@ export declare class CardElement extends UIElement<CardElementProps> {
27
28
  countryCode: any;
28
29
  configuration: {
29
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
+ */
30
35
  visaSrciDpaId?: string;
31
36
  visaSrcInitiatorId?: string;
32
37
  mcSrcClientId?: string;
@@ -47,6 +52,7 @@ export declare class CardElement extends UIElement<CardElementProps> {
47
52
  icon: string;
48
53
  installmentOptions: any;
49
54
  enableStoreDetails: boolean;
55
+ showStoreDetailsCheckbox: boolean;
50
56
  /**
51
57
  * Click to Pay configuration
52
58
  * - If email is set explicitly in the configuration, then it can override the one used in the session creation
@@ -70,16 +76,14 @@ export declare class CardElement extends UIElement<CardElementProps> {
70
76
  hideCVC?: boolean;
71
77
  hasHolderName?: boolean;
72
78
  onLoad?: (event: import("../internal/SecuredFields/lib/types").CbObjOnLoad) => void;
73
- onConfigSuccess?: (event: import("../internal/SecuredFields/lib/types").CbObjOnConfigSuccess) => void;
79
+ onConfigSuccess?: (event: CbObjOnConfigSuccess) => void;
74
80
  onFieldValid?: (event: import("../internal/SecuredFields/lib/types").CbObjOnFieldValid) => void;
75
81
  onBrand?: (event: import("../internal/SecuredFields/lib/types").CbObjOnBrand) => void;
76
82
  onError?: (event: import("../internal/SecuredFields/lib/types").CbObjOnError) => void;
77
- onFocus?: (event: import("../internal/SecuredFields/lib/types").CbObjOnFocus) => void;
83
+ onFocus?: (event: CbObjOnFocus | ComponentFocusObject) => void;
84
+ onBlur?: (event: CbObjOnFocus | ComponentFocusObject) => void;
78
85
  onBinValue?: (event: import("../internal/SecuredFields/lib/types").CbObjOnBinValue) => void;
79
- onBinLookup?: (event: CbObjOnBinLookup) => void; /**
80
- * Click to Pay configuration
81
- * - If email is set explicitly in the configuration, then it can override the one used in the session creation
82
- */
86
+ onBinLookup?: (event: CbObjOnBinLookup) => void;
83
87
  environment?: string;
84
88
  session?: import("../../core/CheckoutSession/CheckoutSession").default;
85
89
  onChange?: (state: any, element: UIElement<any>) => void;
@@ -108,7 +112,7 @@ export declare class CardElement extends UIElement<CardElementProps> {
108
112
  order?: import("../../types").Order;
109
113
  modules?: {
110
114
  srPanel?: import("../../core/Errors/SRPanel").SRPanel;
111
- analytics?: import("../../core/Analytics/Analytics").default;
115
+ analytics?: import("../types").AnalyticsModule;
112
116
  resources?: import("../../core/Context/Resources").Resources;
113
117
  risk?: import("../../core/RiskModule").default;
114
118
  };
@@ -125,6 +129,11 @@ export declare class CardElement extends UIElement<CardElementProps> {
125
129
  handleUnsupportedCard(errObj: any): this;
126
130
  private handleClickToPaySubmit;
127
131
  onBinLookup(obj: CbObjOnBinLookup): void;
132
+ protected submitAnalytics(analyticsObj: SendAnalyticsObject): void;
133
+ private onConfigSuccess;
134
+ private onFocus;
135
+ private onBlur;
136
+ private onErrorAnalytics;
128
137
  onBinValue: (callbackObj: import("../internal/SecuredFields/lib/types").CbObjOnBinValue) => void;
129
138
  get storePaymentMethodPayload(): {
130
139
  storePaymentMethod?: undefined;
@@ -1,5 +1,5 @@
1
1
  import { h } from 'preact';
2
- export declare const CardFieldsWrapper: ({ data, valid, errors, handleChangeFor, sfpState, setFocusOn, cvcPolicy, focusedElement, hasInstallments, handleInstallments, showAmountsInInstallments, brandsIcons, formData, formErrors, formValid, expiryDatePolicy, dualBrandSelectElements, extensions, selectedBrandValue, showKCP, showBrazilianSSN, socialSecurityNumber, handleOnStoreDetails, billingAddress, handleAddress, setAddressRef, partialAddressSchema, onAddressLookup, onAddressSelected, addressSearchDebounceMs, amount, billingAddressRequired, billingAddressRequiredFields, billingAddressAllowedCountries, billingAddressValidationRules, brandsConfiguration, enableStoreDetails, hasCVC, hasHolderName, holderNameRequired, installmentOptions, placeholders, positionHolderNameOnTop, showBrandIcon, showBrandsUnderCardNumber, iOSFocusedField, disclaimerMessage }: {
2
+ export declare const CardFieldsWrapper: ({ data, valid, errors, handleChangeFor, sfpState, setFocusOn, cvcPolicy, focusedElement, hasInstallments, handleInstallments, showAmountsInInstallments, brandsIcons, formData, formErrors, formValid, expiryDatePolicy, dualBrandSelectElements, extensions, selectedBrandValue, showKCP, showBrazilianSSN, socialSecurityNumber, handleOnStoreDetails, billingAddress, handleAddress, setAddressRef, partialAddressSchema, onAddressLookup, onAddressSelected, addressSearchDebounceMs, amount, billingAddressRequired, billingAddressRequiredFields, billingAddressAllowedCountries, billingAddressValidationRules, brandsConfiguration, showStoreDetailsCheckbox, hasCVC, hasHolderName, holderNameRequired, installmentOptions, placeholders, positionHolderNameOnTop, showBrandIcon, showBrandsUnderCardNumber, iOSFocusedField, disclaimerMessage, onFieldFocusAnalytics, onFieldBlurAnalytics }: {
3
3
  data: any;
4
4
  valid: any;
5
5
  errors: any;
@@ -36,7 +36,7 @@ export declare const CardFieldsWrapper: ({ data, valid, errors, handleChangeFor,
36
36
  billingAddressAllowedCountries: any;
37
37
  billingAddressValidationRules?: any;
38
38
  brandsConfiguration: any;
39
- enableStoreDetails: any;
39
+ showStoreDetailsCheckbox: any;
40
40
  hasCVC: any;
41
41
  hasHolderName: any;
42
42
  holderNameRequired: any;
@@ -47,4 +47,6 @@ export declare const CardFieldsWrapper: ({ data, valid, errors, handleChangeFor,
47
47
  showBrandsUnderCardNumber: any;
48
48
  iOSFocusedField: any;
49
49
  disclaimerMessage: any;
50
+ onFieldFocusAnalytics: any;
51
+ onFieldBlurAnalytics: any;
50
52
  }) => h.JSX.Element;
@@ -1,3 +1,3 @@
1
1
  import { h } from 'preact';
2
2
  import { CardHolderNameProps } from './types';
3
- export default function CardHolderName({ onBlur, onInput, placeholder, value, required, error, isValid, disabled }: CardHolderNameProps): h.JSX.Element;
3
+ export default function CardHolderName({ onBlur, onInput, placeholder, value, required, error, isValid, disabled, onFieldFocusAnalytics, onFieldBlurAnalytics }: CardHolderNameProps): h.JSX.Element;
@@ -32,6 +32,8 @@ export interface CardHolderNameProps {
32
32
  required?: boolean;
33
33
  value?: string;
34
34
  disabled?: boolean;
35
+ onFieldFocusAnalytics?: (who: string, event: Event) => void;
36
+ onFieldBlurAnalytics?: (who: string, event: Event) => void;
35
37
  }
36
38
  export interface CardNumberProps {
37
39
  brand: string;
@@ -118,6 +120,8 @@ export interface KCPProps {
118
120
  isValid: boolean;
119
121
  value: string;
120
122
  disabled?: boolean;
123
+ onFieldFocusAnalytics?: (who: string, event: Event) => void;
124
+ onFieldBlurAnalytics?: (who: string, event: Event) => void;
121
125
  }
122
126
  export type RtnType_ParamBooleanFn = (tn: any) => boolean;
123
127
  export type RtnType_ParamVoidFn = (e: any) => void;
@@ -9,11 +9,11 @@ import { AddressSchema } from '../../../internal/Address/types';
9
9
  import { CbObjOnError, StylesObject } from '../../../internal/SecuredFields/lib/types';
10
10
  import { Resources } from '../../../../core/Context/Resources';
11
11
  import { SRPanel } from '../../../../core/Errors/SRPanel';
12
- import Analytics from '../../../../core/Analytics';
13
12
  import RiskElement from '../../../../core/RiskModule';
14
- import { ComponentMethodsRef } from '../../../types';
13
+ import { AnalyticsModule, ComponentMethodsRef } from '../../../types';
15
14
  import { DisclaimerMsgObject } from '../../../internal/DisclaimerMessage/DisclaimerMessage';
16
15
  import { OnAddressLookupType, OnAddressSelectedType } from '../../../internal/Address/components/AddressSearch';
16
+ import { FieldErrorAnalyticsObject } from '../../../../core/Analytics/types';
17
17
  export interface CardInputValidState {
18
18
  holderName?: boolean;
19
19
  billingAddress?: boolean;
@@ -85,7 +85,7 @@ export interface CardInputProps {
85
85
  minimumExpiryDate?: string;
86
86
  modules?: {
87
87
  srPanel: SRPanel;
88
- analytics: Analytics;
88
+ analytics: AnalyticsModule;
89
89
  risk: RiskElement;
90
90
  resources: Resources;
91
91
  };
@@ -115,6 +115,7 @@ export interface CardInputProps {
115
115
  showFormInstruction?: boolean;
116
116
  showInstallmentAmounts?: boolean;
117
117
  showPayButton?: boolean;
118
+ showStoreDetailsCheckbox?: boolean;
118
119
  showWarnings?: boolean;
119
120
  specifications?: Specifications;
120
121
  storedPaymentMethodId?: string;
@@ -123,6 +124,7 @@ export interface CardInputProps {
123
124
  type?: string;
124
125
  maskSecurityCode?: boolean;
125
126
  disclaimerMessage?: DisclaimerMsgObject;
127
+ onErrorAnalytics?: (obj: FieldErrorAnalyticsObject) => {};
126
128
  }
127
129
  export interface CardInputState {
128
130
  dualBrandSelectElements: DualBrandSelectElement[];
@@ -21,7 +21,7 @@ export declare const extractPropsForCardFields: (props: CardInputProps) => {
21
21
  billingAddressRequiredFields: string[];
22
22
  billingAddressAllowedCountries: string[];
23
23
  brandsConfiguration: import("../../types").CardBrandsConfiguration;
24
- enableStoreDetails: boolean;
24
+ showStoreDetailsCheckbox: boolean;
25
25
  hasCVC: boolean;
26
26
  hasHolderName: boolean;
27
27
  holderNameRequired: boolean;
@@ -1,4 +1,4 @@
1
- import { UIElementProps } from '../types';
1
+ import { ComponentFocusObject, UIElementProps } from '../types';
2
2
  import { AddressData, BrowserInfo } from '../../types';
3
3
  import { CbObjOnBinValue, CbObjOnBrand, CbObjOnConfigSuccess, CbObjOnError, CbObjOnFieldValid, CbObjOnFocus, CbObjOnLoad, CbObjOnBinLookup } from '../internal/SecuredFields/lib/types';
4
4
  import { CVCPolicyType, DatePolicyType } from '../internal/SecuredFields/lib/types';
@@ -50,8 +50,13 @@ export interface CardElementProps extends UIElementProps {
50
50
  * @defaultValue `true`
51
51
  */
52
52
  showFormInstruction?: boolean;
53
- /** Show/hide the "store details" checkbox */
53
+ /** Config option related to whether we set storePaymentMethod in the card data, and showing/hiding the "store details" checkbox */
54
54
  enableStoreDetails?: boolean;
55
+ /**
56
+ * Show/hide the "store details" checkbox
57
+ * @internal
58
+ */
59
+ showStoreDetailsCheckbox?: boolean;
55
60
  /** Show/hide the CVC field - merchant set config option */
56
61
  hideCVC?: boolean;
57
62
  /**
@@ -88,9 +93,13 @@ export interface CardElementProps extends UIElementProps {
88
93
  */
89
94
  onError?: (event: CbObjOnError) => void;
90
95
  /**
91
- * Called when a field gains or loses focus.
96
+ * Called when a field gains focus.
97
+ */
98
+ onFocus?: (event: CbObjOnFocus | ComponentFocusObject) => void;
99
+ /**
100
+ * Called when a field gains loses focus.
92
101
  */
93
- onFocus?: (event: CbObjOnFocus) => void;
102
+ onBlur?: (event: CbObjOnFocus | ComponentFocusObject) => void;
94
103
  /**
95
104
  * Provides the BIN Number of the card (up to 6 digits), called as the user types in the PAN.
96
105
  */
@@ -50,6 +50,7 @@ export declare class CashAppPay extends UIElement<CashAppPayElementProps> {
50
50
  icon?: string;
51
51
  amount?: import("../../types").PaymentAmount;
52
52
  secondaryAmount?: import("../../types").PaymentAmountExtended;
53
+ brand?: string;
53
54
  showPayButton?: boolean;
54
55
  setStatusAutomatically?: boolean;
55
56
  payButton?: (options: import("../types").PayButtonFunctionProps) => h.JSX.Element;
@@ -63,7 +64,7 @@ export declare class CashAppPay extends UIElement<CashAppPayElementProps> {
63
64
  order?: import("../../types").Order;
64
65
  modules?: {
65
66
  srPanel?: import("../../core/Errors/SRPanel").SRPanel;
66
- analytics?: import("../../core/Analytics/Analytics").default;
67
+ analytics?: import("../types").AnalyticsModule;
67
68
  resources?: import("../../core/Context/Resources").Resources;
68
69
  risk?: import("../../core/RiskModule").default;
69
70
  };
@@ -32,6 +32,7 @@ export declare class ClickToPayElement extends UIElement<ClickToPayElementProps>
32
32
  icon?: string;
33
33
  amount?: import("../../types").PaymentAmount;
34
34
  secondaryAmount?: import("../../types").PaymentAmountExtended;
35
+ brand?: string;
35
36
  showPayButton?: boolean;
36
37
  setStatusAutomatically?: boolean;
37
38
  payButton?: (options: import("../types").PayButtonFunctionProps) => h.JSX.Element;
@@ -45,7 +46,7 @@ export declare class ClickToPayElement extends UIElement<ClickToPayElementProps>
45
46
  order?: import("../../types").Order;
46
47
  modules?: {
47
48
  srPanel?: import("../../core/Errors/SRPanel").SRPanel;
48
- analytics?: import("../../core/Analytics/Analytics").default;
49
+ analytics?: import("../types").AnalyticsModule;
49
50
  resources?: import("../../core/Context/Resources").Resources;
50
51
  risk?: import("../../core/RiskModule").default;
51
52
  };
@@ -1,15 +1,18 @@
1
1
  import { h } from 'preact';
2
2
  import UIElement from '../UIElement';
3
+ import { DonationElementProps } from './types';
3
4
  /**
4
5
  * DonationElement
5
6
  */
6
- declare class DonationElement extends UIElement {
7
+ declare class DonationElement extends UIElement<DonationElementProps> {
7
8
  static type: string;
8
9
  constructor(props: any);
9
10
  static defaultProps: {
10
11
  onCancel: () => void;
11
12
  onDonate: () => void;
12
13
  };
14
+ protected formatProps(props: DonationElementProps): DonationElementProps;
15
+ isNewDonation(prop: DonationElementProps): boolean;
13
16
  /**
14
17
  * Returns the component payment data ready to submit to the Checkout API
15
18
  */
@@ -1,5 +1,5 @@
1
1
  import { DisclaimerMsgObject } from '../../internal/DisclaimerMessage/DisclaimerMessage';
2
- interface DonationAmounts {
2
+ export interface DonationAmounts {
3
3
  currency: string;
4
4
  values: Array<number>;
5
5
  }
@@ -7,7 +7,7 @@ interface DonationAmount {
7
7
  currency: string;
8
8
  value: number;
9
9
  }
10
- interface DonationPayload {
10
+ export interface DonationPayload {
11
11
  data: {
12
12
  amount: DonationAmount;
13
13
  };
@@ -0,0 +1,17 @@
1
+ import { DonationAmounts, DonationComponentProps, DonationPayload } from './components/types';
2
+ import { UIElementProps } from '../types';
3
+ export interface NewDonationComponentProps {
4
+ amounts: DonationAmounts;
5
+ bannerUrl: string;
6
+ logoUrl: string;
7
+ nonprofitDescription: string;
8
+ nonprofitName: string;
9
+ nonprofitUrl: string;
10
+ termsAndConditionsUrl: string;
11
+ causeName?: string;
12
+ showCancelButton?: boolean;
13
+ onDonate: (payload: DonationPayload) => void;
14
+ onCancel?: (payload: DonationPayload) => void;
15
+ onChange?: (payload: DonationPayload) => void;
16
+ }
17
+ export type DonationElementProps = UIElementProps & (NewDonationComponentProps | DonationComponentProps);
@@ -38,6 +38,7 @@ export declare class DragonpayElement extends UIElement<DragonpayElementProps> {
38
38
  icon?: string;
39
39
  amount?: import("../../types").PaymentAmount;
40
40
  secondaryAmount?: import("../../types").PaymentAmountExtended;
41
+ brand?: string;
41
42
  showPayButton?: boolean;
42
43
  setStatusAutomatically?: boolean;
43
44
  payButton?: (options: import("../types").PayButtonFunctionProps) => h.JSX.Element;
@@ -49,7 +50,7 @@ export declare class DragonpayElement extends UIElement<DragonpayElementProps> {
49
50
  order?: import("../../types").Order;
50
51
  modules?: {
51
52
  srPanel?: import("../../core/Errors/SRPanel").SRPanel;
52
- analytics?: import("../../core/Analytics/Analytics").default;
53
+ analytics?: import("../types").AnalyticsModule;
53
54
  resources?: import("../../core/Context/Resources").Resources;
54
55
  risk?: import("../../core/RiskModule").default;
55
56
  };
@@ -63,6 +63,7 @@ declare class DropinElement extends UIElement<DropinElementProps> {
63
63
  icon?: string;
64
64
  amount?: import("../../types").PaymentAmount;
65
65
  secondaryAmount?: import("../../types").PaymentAmountExtended;
66
+ brand?: string;
66
67
  showPayButton?: boolean;
67
68
  setStatusAutomatically?: boolean;
68
69
  payButton?: (options: import("../types").PayButtonFunctionProps) => h.JSX.Element;
@@ -75,7 +76,7 @@ declare class DropinElement extends UIElement<DropinElementProps> {
75
76
  _parentInstance?: import("../../core/core").default;
76
77
  modules?: {
77
78
  srPanel?: import("../../core/Errors/SRPanel").SRPanel;
78
- analytics?: import("../../core/Analytics/Analytics").default;
79
+ analytics?: import("../types").AnalyticsModule;
79
80
  resources?: import("../../core/Context/Resources").Resources;
80
81
  risk?: import("../../core/RiskModule").default;
81
82
  };
@@ -31,6 +31,7 @@ declare class DuitNowElement extends QRLoaderContainer {
31
31
  icon?: string;
32
32
  amount?: import("../../types").PaymentAmount;
33
33
  secondaryAmount?: import("../../types").PaymentAmountExtended;
34
+ brand?: string;
34
35
  showPayButton?: boolean;
35
36
  setStatusAutomatically?: boolean;
36
37
  payButton?: (options: import("../types").PayButtonFunctionProps) => import("preact").JSX.Element;
@@ -44,7 +45,7 @@ declare class DuitNowElement extends QRLoaderContainer {
44
45
  order?: import("../../types").Order;
45
46
  modules?: {
46
47
  srPanel?: import("../../core/Errors/SRPanel").SRPanel;
47
- analytics?: import("../../core/Analytics/Analytics").default;
48
+ analytics?: import("../types").AnalyticsModule;
48
49
  resources?: import("../../core/Context/Resources").Resources;
49
50
  risk?: import("../../core/RiskModule").default;
50
51
  };
@@ -3,10 +3,12 @@ import { h } from 'preact';
3
3
  import UIElement from '../UIElement';
4
4
  import GooglePayService from './GooglePayService';
5
5
  import { GooglePayProps } from './types';
6
+ import { SendAnalyticsObject } from '../../core/Analytics/types';
6
7
  declare class GooglePay extends UIElement<GooglePayProps> {
7
8
  static type: string;
8
9
  static defaultProps: {
9
10
  environment: string;
11
+ isExpress: boolean;
10
12
  existingPaymentMethodRequired: boolean;
11
13
  buttonColor: google.payments.api.ButtonColor;
12
14
  buttonType: google.payments.api.ButtonType;
@@ -40,6 +42,7 @@ declare class GooglePay extends UIElement<GooglePayProps> {
40
42
  paymentMethods: any[];
41
43
  };
42
44
  protected googlePay: GooglePayService;
45
+ protected submitAnalytics(analyticsObj: SendAnalyticsObject): void;
43
46
  /**
44
47
  * Formats the component data input
45
48
  * For legacy support - maps configuration.merchantIdentifier to configuration.merchantId
@@ -1,6 +1,7 @@
1
1
  /// <reference types="googlepay" />
2
2
  declare const _default: {
3
3
  environment: string;
4
+ isExpress: boolean;
4
5
  existingPaymentMethodRequired: boolean;
5
6
  buttonColor: google.payments.api.ButtonColor;
6
7
  buttonType: google.payments.api.ButtonType;
@@ -82,6 +82,15 @@ export interface GooglePayProps extends UIElementProps {
82
82
  * @defaultValue false
83
83
  */
84
84
  emailRequired?: boolean;
85
+ /**
86
+ * Used for analytics
87
+ */
88
+ expressPage?: 'cart' | 'minicart' | 'pdp' | 'checkout';
89
+ /**
90
+ * Used for analytics
91
+ * @defaultValue false
92
+ */
93
+ isExpress?: boolean;
85
94
  /**
86
95
  * Set to true to request a full shipping address.
87
96
  * @defaultValue false
@@ -33,6 +33,7 @@ declare class PayMeElement extends QRLoaderContainer {
33
33
  icon?: string;
34
34
  amount?: import("../../types").PaymentAmount;
35
35
  secondaryAmount?: import("../../types").PaymentAmountExtended;
36
+ brand?: string;
36
37
  showPayButton?: boolean;
37
38
  setStatusAutomatically?: boolean;
38
39
  payButton?: (options: import("../types").PayButtonFunctionProps) => import("preact").JSX.Element;
@@ -46,7 +47,7 @@ declare class PayMeElement extends QRLoaderContainer {
46
47
  order?: import("../../types").Order;
47
48
  modules?: {
48
49
  srPanel?: import("../../core/Errors/SRPanel").SRPanel;
49
- analytics?: import("../../core/Analytics/Analytics").default;
50
+ analytics?: import("../types").AnalyticsModule;
50
51
  resources?: import("../../core/Context/Resources").Resources;
51
52
  risk?: import("../../core/RiskModule").default;
52
53
  };
@@ -31,6 +31,7 @@ declare class PayNowElement extends QRLoaderContainer {
31
31
  icon?: string;
32
32
  amount?: import("../../types").PaymentAmount;
33
33
  secondaryAmount?: import("../../types").PaymentAmountExtended;
34
+ brand?: string;
34
35
  showPayButton?: boolean;
35
36
  setStatusAutomatically?: boolean;
36
37
  payButton?: (options: import("../types").PayButtonFunctionProps) => import("preact").JSX.Element;
@@ -44,7 +45,7 @@ declare class PayNowElement extends QRLoaderContainer {
44
45
  order?: import("../../types").Order;
45
46
  modules?: {
46
47
  srPanel?: import("../../core/Errors/SRPanel").SRPanel;
47
- analytics?: import("../../core/Analytics/Analytics").default;
48
+ analytics?: import("../types").AnalyticsModule;
48
49
  resources?: import("../../core/Context/Resources").Resources;
49
50
  risk?: import("../../core/RiskModule").default;
50
51
  };
@@ -3,6 +3,7 @@ import UIElement from '../UIElement';
3
3
  import { PaymentAction } from '../../types';
4
4
  import { PayPalElementProps } from './types';
5
5
  import './Paypal.scss';
6
+ import { SendAnalyticsObject } from '../../core/Analytics/types';
6
7
  declare class PaypalElement extends UIElement<PayPalElementProps> {
7
8
  static type: string;
8
9
  static subtype: string;
@@ -11,6 +12,7 @@ declare class PaypalElement extends UIElement<PayPalElementProps> {
11
12
  private reject;
12
13
  protected static defaultProps: PayPalElementProps;
13
14
  constructor(props: any);
15
+ protected submitAnalytics(analyticsObj: SendAnalyticsObject): void;
14
16
  formatProps(props: PayPalElementProps): PayPalElementProps;
15
17
  submit: () => void;
16
18
  /**