@adyen/adyen-web 5.32.0 → 5.33.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 (45) 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 +1 -0
  7. package/dist/types/components/Ach/components/AchInput/types.d.ts +1 -0
  8. package/dist/types/components/BcmcMobile/BcmcMobile.d.ts +1 -0
  9. package/dist/types/components/Card/Bancontact.d.ts +1 -2
  10. package/dist/types/components/Card/Card.d.ts +6 -7
  11. package/dist/types/components/Card/components/CardInput/components/CardFieldsWrapper.d.ts +2 -2
  12. package/dist/types/components/Card/components/CardInput/types.d.ts +2 -3
  13. package/dist/types/components/Card/components/ClickToPay/{utils.d.ts → services/create-clicktopay-service.d.ts} +2 -2
  14. package/dist/types/components/Card/components/ClickToPay/services/sdks/types.d.ts +4 -2
  15. package/dist/types/components/Card/components/ClickToPay/services/utils.d.ts +1 -1
  16. package/dist/types/components/Card/types.d.ts +0 -5
  17. package/dist/types/components/Dragonpay/Dragonpay.d.ts +1 -0
  18. package/dist/types/components/Dropin/Dropin.d.ts +1 -0
  19. package/dist/types/components/DuitNow/DuitNow.d.ts +1 -0
  20. package/dist/types/components/Econtext/components/EcontextInput/EcontextInput.d.ts +1 -1
  21. package/dist/types/components/PayNow/PayNow.d.ts +1 -0
  22. package/dist/types/components/PayPal/config.d.ts +1 -1
  23. package/dist/types/components/Pix/Pix.d.ts +1 -0
  24. package/dist/types/components/PromptPay/PromptPay.d.ts +1 -0
  25. package/dist/types/components/Swish/Swish.d.ts +1 -0
  26. package/dist/types/components/ThreeDS2/ThreeDS2Challenge.d.ts +2 -0
  27. package/dist/types/components/ThreeDS2/ThreeDS2DeviceFingerprint.d.ts +2 -0
  28. package/dist/types/components/ThreeDS2/components/Challenge/PrepareChallenge3DS2.d.ts +4 -1
  29. package/dist/types/components/ThreeDS2/components/Challenge/types.d.ts +2 -0
  30. package/dist/types/components/ThreeDS2/components/DeviceFingerprint/DoFingerprint3DS2.d.ts +2 -1
  31. package/dist/types/components/ThreeDS2/components/DeviceFingerprint/PrepareFingerprint3DS2.d.ts +5 -1
  32. package/dist/types/components/ThreeDS2/components/DeviceFingerprint/types.d.ts +2 -0
  33. package/dist/types/components/UIElement.d.ts +1 -0
  34. package/dist/types/components/WeChat/WeChat.d.ts +1 -0
  35. package/dist/types/components/helpers/QRLoaderContainer.d.ts +1 -0
  36. package/dist/types/components/internal/Address/types.d.ts +3 -0
  37. package/dist/types/components/internal/Await/Await.d.ts +1 -0
  38. package/dist/types/components/internal/Await/types.d.ts +2 -0
  39. package/dist/types/components/internal/CompanyDetails/types.d.ts +1 -0
  40. package/dist/types/components/internal/OpenInvoice/types.d.ts +3 -2
  41. package/dist/types/components/internal/PersonalDetails/types.d.ts +3 -0
  42. package/dist/types/components/internal/QRLoader/QRLoader.d.ts +1 -1
  43. package/dist/types/components/internal/QRLoader/types.d.ts +2 -0
  44. package/dist/types/components/types.d.ts +10 -0
  45. package/package.json +6 -6
@@ -14,6 +14,7 @@ export declare class AchElement extends UIElement<AchElementProps> {
14
14
  beforeSubmit?: (state: any, element: UIElement<any>, actions: any) => Promise<void>;
15
15
  onSubmit?: (state: any, element: UIElement<any>) => void;
16
16
  onComplete?: (state: any, element: UIElement<any>) => void;
17
+ onActionHandled?: (rtnObj: import("../types").ActionHandledReturnObject) => void;
17
18
  onAdditionalDetails?: (state: any, element: UIElement<any>) => void;
18
19
  onError?: (error: any, element?: UIElement<any>) => void;
19
20
  onPaymentCompleted?: (result: any, element: UIElement<any>) => void;
@@ -53,5 +53,6 @@ export interface ACHInputProps {
53
53
  styles?: StylesObject;
54
54
  type?: string;
55
55
  forceCompat?: boolean;
56
+ setComponentRef?: (ref: any) => void;
56
57
  }
57
58
  export {};
@@ -19,6 +19,7 @@ declare class BCMCMobileElement extends QRLoaderContainer {
19
19
  beforeSubmit?: (state: any, element: import("../UIElement").UIElement<any>, actions: any) => Promise<void>;
20
20
  onSubmit?: (state: any, element: import("../UIElement").UIElement<any>) => void;
21
21
  onComplete?: (state: any, element: import("../UIElement").UIElement<any>) => void;
22
+ onActionHandled?: (rtnObj: import("../types").ActionHandledReturnObject) => void;
22
23
  onAdditionalDetails?: (state: any, element: import("../UIElement").UIElement<any>) => void;
23
24
  onError?: (error: any, element?: import("../UIElement").UIElement<any>) => void;
24
25
  onPaymentCompleted?: (result: any, element: import("../UIElement").UIElement<any>) => void;
@@ -6,7 +6,6 @@ declare class BancontactElement extends CardElement {
6
6
  brands: string[];
7
7
  onBinLookup: () => void;
8
8
  showBrandsUnderCardNumber: boolean;
9
- useClickToPay: boolean;
10
9
  SRConfig: {};
11
10
  };
12
11
  /**
@@ -56,7 +55,6 @@ declare class BancontactElement extends CardElement {
56
55
  merchantDisplayName: string;
57
56
  };
58
57
  brand?: string;
59
- useClickToPay: boolean;
60
58
  brands?: string[];
61
59
  showBrandsUnderCardNumber?: boolean;
62
60
  showBrandIcon?: boolean;
@@ -76,6 +74,7 @@ declare class BancontactElement extends CardElement {
76
74
  beforeSubmit?: (state: any, element: import("../UIElement").UIElement<any>, actions: any) => Promise<void>;
77
75
  onSubmit?: (state: any, element: import("../UIElement").UIElement<any>) => void;
78
76
  onComplete?: (state: any, element: import("../UIElement").UIElement<any>) => void;
77
+ onActionHandled?: (rtnObj: import("../types").ActionHandledReturnObject) => void;
79
78
  onAdditionalDetails?: (state: any, element: import("../UIElement").UIElement<any>) => void;
80
79
  onPaymentCompleted?: (result: any, element: import("../UIElement").UIElement<any>) => void;
81
80
  beforeRedirect?: (resolve: any, reject: any, redirectData: any, element: import("../UIElement").UIElement<any>) => void;
@@ -14,11 +14,9 @@ export declare class CardElement extends UIElement<CardElementProps> {
14
14
  protected static defaultProps: {
15
15
  onBinLookup: () => void;
16
16
  showBrandsUnderCardNumber: boolean;
17
- useClickToPay: boolean;
18
17
  SRConfig: {};
19
18
  };
20
19
  setStatus(status: UIElementStatus, props?: any): this;
21
- setComponentRef: (ref: any) => void;
22
20
  private setClickToPayRef;
23
21
  formatProps(props: CardElementProps): {
24
22
  holderNameRequired: boolean;
@@ -28,13 +26,14 @@ export declare class CardElement extends UIElement<CardElementProps> {
28
26
  countryCode: any;
29
27
  configuration: {
30
28
  socialSecurityNumberMode: import("./types").SocialSecurityMode;
31
- /**
32
- * Formats the component data output
33
- */
34
29
  visaSrciDpaId?: string;
35
30
  visaSrcInitiatorId?: string;
36
31
  mcSrcClientId?: string;
37
- mcDpaId?: string;
32
+ mcDpaId?: string; /**
33
+ * this.props.brand is never set for the generic card only for a 'dedicated' single-branded card e.g. bcmc
34
+ * this.state.selectedBrandValue will be set when /binLookup detects a single brand &/or when /binLookup detects a dual-branded card and
35
+ * the shopper makes a brand selection
36
+ */
38
37
  merchantIdentifier?: string;
39
38
  merchantOrigin?: string;
40
39
  gatewayMerchantId?: string;
@@ -67,7 +66,6 @@ export declare class CardElement extends UIElement<CardElementProps> {
67
66
  merchantDisplayName: string;
68
67
  };
69
68
  brand?: string;
70
- useClickToPay: boolean;
71
69
  brands?: string[];
72
70
  showBrandsUnderCardNumber?: boolean;
73
71
  showBrandIcon?: boolean;
@@ -87,6 +85,7 @@ export declare class CardElement extends UIElement<CardElementProps> {
87
85
  beforeSubmit?: (state: any, element: UIElement<any>, actions: any) => Promise<void>;
88
86
  onSubmit?: (state: any, element: UIElement<any>) => void;
89
87
  onComplete?: (state: any, element: UIElement<any>) => void;
88
+ onActionHandled?: (rtnObj: import("../types").ActionHandledReturnObject) => void;
90
89
  onAdditionalDetails?: (state: any, element: UIElement<any>) => void;
91
90
  onPaymentCompleted?: (result: any, element: UIElement<any>) => void;
92
91
  beforeRedirect?: (resolve: any, reject: any, redirectData: any, element: UIElement<any>) => void;
@@ -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, billingAddressRef, 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 }: {
3
3
  data: any;
4
4
  valid: any;
5
5
  errors: any;
@@ -31,7 +31,7 @@ export declare const CardFieldsWrapper: ({ data, valid, errors, handleChangeFor,
31
31
  handleOnStoreDetails: any;
32
32
  billingAddress: any;
33
33
  handleAddress: any;
34
- billingAddressRef: any;
34
+ setAddressRef: any;
35
35
  partialAddressSchema: any;
36
36
  amount: any;
37
37
  billingAddressRequired: any;
@@ -8,6 +8,7 @@ import { ValidationRuleResult } from '../../../../utils/Validator/ValidationRule
8
8
  import Specifications from '../../../internal/Address/Specifications';
9
9
  import { AddressSchema, StringObject } from '../../../internal/Address/types';
10
10
  import { CbObjOnError, StylesObject } from '../../../internal/SecuredFields/lib/types';
11
+ import { ComponentMethodsRef } from '../../../types';
11
12
  export interface CardInputValidState {
12
13
  holderName?: boolean;
13
14
  billingAddress?: boolean;
@@ -124,12 +125,10 @@ export interface CardInputState {
124
125
  issuingCountryCode: string;
125
126
  showSocialSecurityNumber?: boolean;
126
127
  }
127
- export interface CardInputRef {
128
+ export interface CardInputRef extends ComponentMethodsRef {
128
129
  sfp?: any;
129
130
  setFocusOn?: (who: any) => void;
130
- showValidation?: (who: any) => void;
131
131
  processBinLookupResponse?: (binLookupResponse: BinLookupResponse, isReset: boolean) => void;
132
- setStatus?: any;
133
132
  updateStyles?: (stylesObj: StylesObject) => void;
134
133
  handleUnsupportedCard?: (errObj: CbObjOnError) => boolean;
135
134
  }
@@ -1,5 +1,5 @@
1
- import { IClickToPayService } from './services/types';
2
- import { CardConfiguration, ClickToPayConfiguration } from '../../types';
1
+ import { IClickToPayService } from './types';
2
+ import { CardConfiguration, ClickToPayConfiguration } from '../../../types';
3
3
  /**
4
4
  * Creates the Click to Pay service in case the required configuration is provided
5
5
  */
@@ -20,8 +20,10 @@ export declare type SrciIsRecognizedResponse = {
20
20
  };
21
21
  export declare type SrciCheckoutResponse = {
22
22
  dcfActionCode: string;
23
- encryptedPayload?: string;
24
- idToken?: string;
23
+ checkoutResponse: string;
24
+ checkoutResponseSignature: string;
25
+ idToken: string;
26
+ unbindAppInstance: boolean;
25
27
  };
26
28
  export declare type SrciIdentityLookupResponse = {
27
29
  consumerPresent: boolean;
@@ -5,7 +5,7 @@ export declare const CTP_IFRAME_NAME = "ctpIframe";
5
5
  /**
6
6
  * Creates the payload for the /payments call
7
7
  */
8
- declare function createCheckoutPayloadBasedOnScheme(card: ShopperCard, checkoutResponse: SrciCheckoutResponse, environment: string): ClickToPayCheckoutPayload;
8
+ declare function createCheckoutPayloadBasedOnScheme(card: ShopperCard, srciCheckoutResponse: SrciCheckoutResponse, environment: string): ClickToPayCheckoutPayload;
9
9
  /**
10
10
  * Creates the Shopper card list. The available cards are placed before the expired cards
11
11
  */
@@ -12,11 +12,6 @@ export interface CardElementProps extends UIElementProps {
12
12
  * Configuration specific to brands
13
13
  */
14
14
  brandsConfiguration?: CardBrandsConfiguration;
15
- /**
16
- * Flag indicating if merchant really intent to use Click to Pay
17
- * Will be removed when we Click to Pay goes live
18
- */
19
- useClickToPay: boolean;
20
15
  /**
21
16
  * Configuration for Click to Pay
22
17
  */
@@ -27,6 +27,7 @@ export declare class DragonpayElement extends UIElement<DragonpayElementProps> {
27
27
  beforeSubmit?: (state: any, element: UIElement<any>, actions: any) => Promise<void>;
28
28
  onSubmit?: (state: any, element: UIElement<any>) => void;
29
29
  onComplete?: (state: any, element: UIElement<any>) => void;
30
+ onActionHandled?: (rtnObj: import("../types").ActionHandledReturnObject) => void;
30
31
  onAdditionalDetails?: (state: any, element: UIElement<any>) => void;
31
32
  onError?: (error: any, element?: UIElement<any>) => void;
32
33
  onPaymentCompleted?: (result: any, element: UIElement<any>) => void;
@@ -52,6 +52,7 @@ declare class DropinElement extends UIElement<DropinElementProps> {
52
52
  onValid?: (state: any, element: UIElement<any>) => void;
53
53
  beforeSubmit?: (state: any, element: UIElement<any>, actions: any) => Promise<void>;
54
54
  onComplete?: (state: any, element: UIElement<any>) => void;
55
+ onActionHandled?: (rtnObj: import("../types").ActionHandledReturnObject) => void;
55
56
  onAdditionalDetails?: (state: any, element: UIElement<any>) => void;
56
57
  onError?: (error: any, element?: UIElement<any>) => void;
57
58
  onPaymentCompleted?: (result: any, element: UIElement<any>) => void;
@@ -19,6 +19,7 @@ declare class DuitNowElement extends QRLoaderContainer {
19
19
  beforeSubmit?: (state: any, element: import("../UIElement").UIElement<any>, actions: any) => Promise<void>;
20
20
  onSubmit?: (state: any, element: import("../UIElement").UIElement<any>) => void;
21
21
  onComplete?: (state: any, element: import("../UIElement").UIElement<any>) => void;
22
+ onActionHandled?: (rtnObj: import("../types").ActionHandledReturnObject) => void;
22
23
  onAdditionalDetails?: (state: any, element: import("../UIElement").UIElement<any>) => void;
23
24
  onError?: (error: any, element?: import("../UIElement").UIElement<any>) => void;
24
25
  onPaymentCompleted?: (result: any, element: import("../UIElement").UIElement<any>) => void;
@@ -10,5 +10,5 @@ interface EcontextInputProps {
10
10
  onSubmit?(state: any, component: any): void;
11
11
  [key: string]: any;
12
12
  }
13
- export default function EcontextInput({ personalDetailsRequired, data, onChange, showPayButton, payButton }: EcontextInputProps): h.JSX.Element;
13
+ export default function EcontextInput({ personalDetailsRequired, data, onChange, showPayButton, payButton, ...props }: EcontextInputProps): h.JSX.Element;
14
14
  export {};
@@ -19,6 +19,7 @@ declare class PayNowElement extends QRLoaderContainer {
19
19
  beforeSubmit?: (state: any, element: import("../UIElement").UIElement<any>, actions: any) => Promise<void>;
20
20
  onSubmit?: (state: any, element: import("../UIElement").UIElement<any>) => void;
21
21
  onComplete?: (state: any, element: import("../UIElement").UIElement<any>) => void;
22
+ onActionHandled?: (rtnObj: import("../types").ActionHandledReturnObject) => void;
22
23
  onAdditionalDetails?: (state: any, element: import("../UIElement").UIElement<any>) => void;
23
24
  onError?: (error: any, element?: import("../UIElement").UIElement<any>) => void;
24
25
  onPaymentCompleted?: (result: any, element: import("../UIElement").UIElement<any>) => void;
@@ -1,6 +1,6 @@
1
1
  declare const INTEGRATION_DATE = "2020-02-01";
2
2
  declare const PAYPAL_JS_URL = "https://www.paypal.com/sdk/js";
3
- declare const ADYEN_CLIENTID_TEST = "AVzsPoGmjcm99YG02kq0iWL3KP3JedbMQJO2QUnVUc-t7aUzjkBWte7relkAC5SPUL50ovLGKmxfA674";
3
+ declare const ADYEN_CLIENTID_TEST = "AXy9hIzWB6h_LjZUHjHmsbsiicSIbL4GKOrcgomEedVjduUinIU4C2llxkW5p0OG0zTNgviYFceaXEnj";
4
4
  declare const ADYEN_CLIENTID_LIVE = "AU0Z-TP9t5_9196agaBN6ZD3UAwypdP1IX8ZYH3PcNNAQMXUTDQlChruXqQEhyI6-NKBKowN6ydkj477";
5
5
  declare const SUPPORTED_COLORS_FOR_CREDIT: string[];
6
6
  declare const SUPPORTED_LOCALES: readonly ["en_US", "en_AU", "en_GB", "fr_CA", "es_ES", "it_IT", "fr_FR", "de_DE", "pt_BR", "zh_CN", "da_DK", "zh_HK", "id_ID", "he_IL", "ja_JP", "ko_KR", "nl_NL", "no_NO", "pl_PL", "pt_PT", "ru_RU", "sv_SE", "th_TH", "zh_TW"];
@@ -9,6 +9,7 @@ declare class PixElement extends QRLoaderContainer<PixProps> {
9
9
  paymentData: any;
10
10
  onError: () => void;
11
11
  onComplete: () => void;
12
+ onActionHandled: () => void;
12
13
  showPayButton: boolean;
13
14
  personalDetailsRequired: boolean;
14
15
  countdownTime: number;
@@ -19,6 +19,7 @@ declare class PromptPayElement extends QRLoaderContainer {
19
19
  beforeSubmit?: (state: any, element: import("../UIElement").UIElement<any>, actions: any) => Promise<void>;
20
20
  onSubmit?: (state: any, element: import("../UIElement").UIElement<any>) => void;
21
21
  onComplete?: (state: any, element: import("../UIElement").UIElement<any>) => void;
22
+ onActionHandled?: (rtnObj: import("../types").ActionHandledReturnObject) => void;
22
23
  onAdditionalDetails?: (state: any, element: import("../UIElement").UIElement<any>) => void;
23
24
  onError?: (error: any, element?: import("../UIElement").UIElement<any>) => void;
24
25
  onPaymentCompleted?: (result: any, element: import("../UIElement").UIElement<any>) => void;
@@ -19,6 +19,7 @@ declare class SwishElement extends QRLoaderContainer {
19
19
  beforeSubmit?: (state: any, element: import("../UIElement").UIElement<any>, actions: any) => Promise<void>;
20
20
  onSubmit?: (state: any, element: import("../UIElement").UIElement<any>) => void;
21
21
  onComplete?: (state: any, element: import("../UIElement").UIElement<any>) => void;
22
+ onActionHandled?: (rtnObj: import("../types").ActionHandledReturnObject) => void;
22
23
  onAdditionalDetails?: (state: any, element: import("../UIElement").UIElement<any>) => void;
23
24
  onError?: (error: any, element?: import("../UIElement").UIElement<any>) => void;
24
25
  onPaymentCompleted?: (result: any, element: import("../UIElement").UIElement<any>) => void;
@@ -2,6 +2,7 @@ import { h } from 'preact';
2
2
  import UIElement from '../UIElement';
3
3
  import { ErrorCodeObject } from './components/utils';
4
4
  import Language from '../../language';
5
+ import { ActionHandledReturnObject } from '../types';
5
6
  export interface ThreeDS2ChallengeProps {
6
7
  token?: string;
7
8
  dataKey?: string;
@@ -14,6 +15,7 @@ export interface ThreeDS2ChallengeProps {
14
15
  loadingContext?: string;
15
16
  useOriginalFlow?: boolean;
16
17
  i18n?: Language;
18
+ onActionHandled: (rtnObj: ActionHandledReturnObject) => void;
17
19
  }
18
20
  declare class ThreeDS2Challenge extends UIElement<ThreeDS2ChallengeProps> {
19
21
  static type: string;
@@ -1,6 +1,7 @@
1
1
  import { h } from 'preact';
2
2
  import UIElement from '../UIElement';
3
3
  import { ErrorCodeObject } from './components/utils';
4
+ import { ActionHandledReturnObject } from '../types';
4
5
  export interface ThreeDS2DeviceFingerprintProps {
5
6
  dataKey: string;
6
7
  token: string;
@@ -13,6 +14,7 @@ export interface ThreeDS2DeviceFingerprintProps {
13
14
  loadingContext?: string;
14
15
  clientKey?: string;
15
16
  elementRef?: UIElement;
17
+ onActionHandled: (rtnObj: ActionHandledReturnObject) => void;
16
18
  }
17
19
  declare class ThreeDS2DeviceFingerprint extends UIElement<ThreeDS2DeviceFingerprintProps> {
18
20
  static type: string;
@@ -6,11 +6,14 @@ declare class PrepareChallenge3DS2 extends Component<PrepareChallenge3DS2Props,
6
6
  static defaultProps: {
7
7
  onComplete: () => void;
8
8
  onError: () => void;
9
+ onActionHandled: () => void;
9
10
  };
10
11
  constructor(props: any);
11
12
  setStatusComplete(resultObj: any): void;
12
13
  setStatusError(errorInfoObj: any): void;
13
- render(props: any, { challengeData }: {
14
+ render({ onActionHandled }: {
15
+ onActionHandled: any;
16
+ }, { challengeData }: {
14
17
  challengeData: any;
15
18
  }): h.JSX.Element;
16
19
  }
@@ -1,9 +1,11 @@
1
1
  import { ChallengeData, ThreeDS2FlowObject } from '../../types';
2
2
  import { ChallengeResolveData } from '../utils';
3
3
  import { ThreeDS2ChallengeProps } from '../../ThreeDS2Challenge';
4
+ import { ActionHandledReturnObject } from '../../../types';
4
5
  export interface DoChallenge3DS2Props extends ChallengeData {
5
6
  onCompleteChallenge: (resolveObject: ThreeDS2FlowObject) => void;
6
7
  onErrorChallenge: (rejectObject: ThreeDS2FlowObject) => void;
8
+ onActionHandled: (rtnObj: ActionHandledReturnObject) => void;
7
9
  }
8
10
  export interface DoChallenge3DS2State {
9
11
  base64URLencodedData?: string;
@@ -19,8 +19,9 @@ declare class DoFingerprint3DS2 extends Component<DoFingerprint3DS2Props, DoFing
19
19
  get3DS2MethodPromise(): Promise<unknown>;
20
20
  componentDidMount(): void;
21
21
  componentWillUnmount(): void;
22
- render({ threeDSMethodURL }: {
22
+ render({ threeDSMethodURL, onActionHandled }: {
23
23
  threeDSMethodURL: any;
24
+ onActionHandled: any;
24
25
  }, { base64URLencodedData }: {
25
26
  base64URLencodedData: any;
26
27
  }): h.JSX.Element;
@@ -9,10 +9,14 @@ declare class PrepareFingerprint3DS2 extends Component<PrepareFingerprint3DS2Pro
9
9
  onError: () => void;
10
10
  paymentData: string;
11
11
  showSpinner: boolean;
12
+ onActionHandled: () => void;
12
13
  };
13
14
  componentDidMount(): void;
14
15
  setStatusComplete(resultObj: ResultObject): void;
15
- render(props: any, { fingerPrintData }: {
16
+ render({ showSpinner, onActionHandled }: {
17
+ showSpinner: any;
18
+ onActionHandled: any;
19
+ }, { fingerPrintData }: {
16
20
  fingerPrintData: any;
17
21
  }): h.JSX.Element;
18
22
  }
@@ -1,10 +1,12 @@
1
1
  import { ThreeDS2FlowObject, FingerPrintData } from '../../types';
2
2
  import { ThreeDS2DeviceFingerprintProps } from '../../ThreeDS2DeviceFingerprint';
3
3
  import { FingerprintResolveData } from '../utils';
4
+ import { ActionHandledReturnObject } from '../../../types';
4
5
  export interface DoFingerprint3DS2Props extends FingerPrintData {
5
6
  onCompleteFingerprint: (resolveObject: ThreeDS2FlowObject) => void;
6
7
  onErrorFingerprint: (rejectObject: ThreeDS2FlowObject) => void;
7
8
  showSpinner: boolean;
9
+ onActionHandled: (rtnObj: ActionHandledReturnObject) => void;
8
10
  }
9
11
  export interface DoFingerprint3DS2State {
10
12
  base64URLencodedData: string;
@@ -42,6 +42,7 @@ export declare class UIElement<P extends UIElementProps = any> extends BaseEleme
42
42
  * @param options - CoreOptions
43
43
  */
44
44
  updateParent(options?: CoreOptions): Promise<Core>;
45
+ setComponentRef: (ref: any) => void;
45
46
  /**
46
47
  * Get the current validation status of the element
47
48
  */
@@ -19,6 +19,7 @@ declare class WeChatPayElement extends QRLoaderContainer {
19
19
  beforeSubmit?: (state: any, element: import("../UIElement").UIElement<any>, actions: any) => Promise<void>;
20
20
  onSubmit?: (state: any, element: import("../UIElement").UIElement<any>) => void;
21
21
  onComplete?: (state: any, element: import("../UIElement").UIElement<any>) => void;
22
+ onActionHandled?: (rtnObj: import("../types").ActionHandledReturnObject) => void;
22
23
  onAdditionalDetails?: (state: any, element: import("../UIElement").UIElement<any>) => void;
23
24
  onError?: (error: any, element?: import("../UIElement").UIElement<any>) => void;
24
25
  onPaymentCompleted?: (result: any, element: import("../UIElement").UIElement<any>) => void;
@@ -27,6 +27,7 @@ declare class QRLoaderContainer<T extends QRLoaderContainerProps = QRLoaderConta
27
27
  paymentData: any;
28
28
  onError: () => void;
29
29
  onComplete: () => void;
30
+ onActionHandled: () => void;
30
31
  };
31
32
  formatData(): {
32
33
  paymentMethod: any;
@@ -18,6 +18,9 @@ export interface AddressProps {
18
18
  visibility?: string;
19
19
  overrideSchema?: AddressSpecifications;
20
20
  iOSFocusedField?: string;
21
+ payButton?: (obj: any) => {};
22
+ showPayButton?: boolean;
23
+ setComponentRef?: (ref: any) => void;
21
24
  }
22
25
  export interface AddressStateError {
23
26
  street?: ValidationRuleResult;
@@ -7,6 +7,7 @@ declare namespace Await {
7
7
  countdownTime: number;
8
8
  onError: () => void;
9
9
  onComplete: () => void;
10
+ onActionHandled: () => void;
10
11
  delay: number;
11
12
  throttleTime: number;
12
13
  throttleInterval: number;
@@ -1,3 +1,4 @@
1
+ import { ActionHandledReturnObject } from '../../types';
1
2
  interface StatusObjectProps {
2
3
  payload: string;
3
4
  resultCode: string;
@@ -25,5 +26,6 @@ export interface AwaitComponentProps {
25
26
  messageText: string;
26
27
  awaitText: string;
27
28
  ref: any;
29
+ onActionHandled: (rtnObj: ActionHandledReturnObject) => void;
28
30
  }
29
31
  export {};
@@ -14,6 +14,7 @@ export interface CompanyDetailsProps {
14
14
  readonly?: boolean;
15
15
  ref?: any;
16
16
  validationRules?: ValidatorRules;
17
+ setComponentRef?: (ref: any) => void;
17
18
  }
18
19
  export interface ReadOnlyCompanyDetailsProps {
19
20
  name?: string;
@@ -1,8 +1,8 @@
1
1
  import { AddressData, FieldsetVisibility, PersonalDetailsSchema } from '../../../types';
2
2
  import { CompanyDetailsSchema } from '../CompanyDetails/types';
3
3
  import { AddressSpecifications } from '../Address/types';
4
- import { UIElementProps } from "../../types";
5
- import UIElement from "../../UIElement";
4
+ import { UIElementProps } from '../../types';
5
+ import UIElement from '../../UIElement';
6
6
  export interface OpenInvoiceVisibility {
7
7
  companyDetails?: FieldsetVisibility;
8
8
  personalDetails?: FieldsetVisibility;
@@ -33,6 +33,7 @@ export interface OpenInvoiceProps extends UIElementProps {
33
33
  personalDetailsRequiredFields?: string[];
34
34
  billingAddressRequiredFields?: string[];
35
35
  billingAddressSpecification?: AddressSpecifications;
36
+ setComponentRef?: (ref: any) => void;
36
37
  }
37
38
  export interface OpenInvoiceStateData {
38
39
  companyDetails?: CompanyDetailsSchema;
@@ -12,6 +12,9 @@ export interface PersonalDetailsProps {
12
12
  readonly?: boolean;
13
13
  ref?: any;
14
14
  validationRules?: ValidatorRules;
15
+ setComponentRef?: (ref: any) => void;
16
+ payButton?: (obj: any) => {};
17
+ showPayButton?: boolean;
15
18
  }
16
19
  export interface PersonalDetailsStateError {
17
20
  firstName?: boolean;
@@ -24,7 +24,7 @@ declare class QRLoader extends Component<QRLoaderProps, QRLoaderState> {
24
24
  private onComplete;
25
25
  private onError;
26
26
  private checkStatus;
27
- render({ amount, url, brandLogo, countdownTime, type }: QRLoaderProps, { expired, completed, loading }: {
27
+ render({ amount, url, brandLogo, countdownTime, type, onActionHandled }: QRLoaderProps, { expired, completed, loading }: {
28
28
  expired: any;
29
29
  completed: any;
30
30
  loading: any;
@@ -1,5 +1,6 @@
1
1
  import { PaymentAmount } from '../../../types';
2
2
  import Language from '../../../language/Language';
3
+ import { ActionHandledReturnObject } from '../../types';
3
4
  export interface QRLoaderProps {
4
5
  delay?: number;
5
6
  countdownTime?: number;
@@ -22,6 +23,7 @@ export interface QRLoaderProps {
22
23
  introduction?: string;
23
24
  instructions?: string;
24
25
  copyBtn?: boolean;
26
+ onActionHandled?: (rtnObj: ActionHandledReturnObject) => void;
25
27
  }
26
28
  export interface QRLoaderState {
27
29
  buttonStatus: string;
@@ -72,7 +72,12 @@ export interface IUIElement {
72
72
  setState(newState: object): void;
73
73
  }
74
74
  export declare type UIElementStatus = 'ready' | 'loading' | 'error' | 'success';
75
+ export declare type ActionDescriptionType = 'qr-code-loaded' | 'polling-started' | 'fingerprint-iframe-loaded' | 'challenge-iframe-loaded';
75
76
  export declare type PayButtonFunctionProps = Omit<PayButtonProps, 'amount'>;
77
+ export interface ActionHandledReturnObject {
78
+ componentType: string;
79
+ actionDescription: ActionDescriptionType;
80
+ }
76
81
  export interface UIElementProps extends BaseElementProps {
77
82
  session?: Session;
78
83
  onChange?: (state: any, element: UIElement) => void;
@@ -80,6 +85,7 @@ export interface UIElementProps extends BaseElementProps {
80
85
  beforeSubmit?: (state: any, element: UIElement, actions: any) => Promise<void>;
81
86
  onSubmit?: (state: any, element: UIElement) => void;
82
87
  onComplete?: (state: any, element: UIElement) => void;
88
+ onActionHandled?: (rtnObj: ActionHandledReturnObject) => void;
83
89
  onAdditionalDetails?: (state: any, element: UIElement) => void;
84
90
  onError?: (error: any, element?: UIElement) => void;
85
91
  onPaymentCompleted?: (result: any, element: UIElement) => void;
@@ -101,3 +107,7 @@ export interface UIElementProps extends BaseElementProps {
101
107
  */
102
108
  setStatusAutomatically?: boolean;
103
109
  }
110
+ export interface ComponentMethodsRef {
111
+ showValidation?: () => void;
112
+ setStatus?(status: UIElementStatus): void;
113
+ }
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.32.0",
26
+ "version": "5.33.0",
27
27
  "license": "MIT",
28
28
  "homepage": "https://docs.adyen.com/checkout",
29
29
  "repository": "github:Adyen/adyen-web",
@@ -63,10 +63,10 @@
63
63
  "@rollup/plugin-json": "^6.0.0",
64
64
  "@rollup/plugin-node-resolve": "^15.0.0",
65
65
  "@rollup/plugin-replace": "^5.0.1",
66
- "@testing-library/jest-dom": "^5.16.5",
67
- "@testing-library/preact": "^3.0.0",
68
- "@testing-library/preact-hooks": "^1.1.0",
69
- "@testing-library/user-event": "^14.4.3",
66
+ "@testing-library/jest-dom": "5.16.5",
67
+ "@testing-library/preact": "3.2.3",
68
+ "@testing-library/preact-hooks": "1.1.0",
69
+ "@testing-library/user-event": "14.4.3",
70
70
  "@types/jest": "29.2.6",
71
71
  "@typescript-eslint/eslint-plugin": "^5.37.0",
72
72
  "@typescript-eslint/parser": "^5.39.0",
@@ -77,7 +77,7 @@
77
77
  "dotenv": "^16.0.3",
78
78
  "enzyme": "3.11.0",
79
79
  "enzyme-adapter-preact-pure": "4.1.0",
80
- "eslint": "8.30.0",
80
+ "eslint": "8.31.0",
81
81
  "eslint-plugin-import": "^2.26.0",
82
82
  "eslint-plugin-jsx-a11y": "^6.6.1",
83
83
  "eslint-plugin-react": "^7.31.8",