@adyen/adyen-web 5.33.0 → 5.35.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 (100) hide show
  1. package/README.md +5 -1
  2. package/dist/adyen.css +6 -5
  3. package/dist/adyen.css.map +1 -1
  4. package/dist/adyen.js +1 -1
  5. package/dist/adyen.js.map +1 -1
  6. package/dist/cjs/adyen.css +6 -5
  7. package/dist/cjs/adyen.css.map +1 -1
  8. package/dist/cjs/index.js +1 -1
  9. package/dist/es/adyen.css +6 -5
  10. package/dist/es/adyen.css.map +1 -1
  11. package/dist/es/index.js +1 -1
  12. package/dist/es.modern/adyen.css +6 -5
  13. package/dist/es.modern/adyen.css.map +1 -1
  14. package/dist/es.modern/index.js +1 -1
  15. package/dist/types/components/Ach/components/AchInput/types.d.ts +1 -1
  16. package/dist/types/components/AmazonPay/types.d.ts +9 -9
  17. package/dist/types/components/ApplePay/types.d.ts +2 -2
  18. package/dist/types/components/Atome/config.d.ts +1 -1
  19. package/dist/types/components/BcmcMobile/BcmcMobile.d.ts +0 -1
  20. package/dist/types/components/Card/Bancontact.d.ts +6 -2
  21. package/dist/types/components/Card/Card.d.ts +9 -7
  22. package/dist/types/components/Card/ClickToPayHolder.d.ts +1 -1
  23. package/dist/types/components/Card/ClickToPayWrapper.d.ts +1 -1
  24. package/dist/types/components/Card/components/CardInput/components/AvailableBrands/AvailableBrands.d.ts +1 -1
  25. package/dist/types/components/Card/components/CardInput/components/CardFieldsWrapper.d.ts +2 -1
  26. package/dist/types/components/Card/components/CardInput/components/DisclaimerMessage/DisclaimerMessage.d.ts +16 -0
  27. package/dist/types/components/Card/components/CardInput/components/DisclaimerMessage/index.d.ts +1 -0
  28. package/dist/types/components/Card/components/CardInput/components/StoredCardFieldsWrapper.d.ts +2 -1
  29. package/dist/types/components/Card/components/CardInput/components/types.d.ts +2 -2
  30. package/dist/types/components/Card/components/CardInput/types.d.ts +8 -2
  31. package/dist/types/components/Card/components/CardInput/utils.d.ts +1 -0
  32. package/dist/types/components/Card/components/ClickToPay/ClickToPayComponent.d.ts +1 -1
  33. package/dist/types/components/Card/components/ClickToPay/components/CtPBrand/CtPBrand.d.ts +1 -1
  34. package/dist/types/components/Card/components/ClickToPay/components/CtPCards/CtPCards.d.ts +1 -1
  35. package/dist/types/components/Card/components/ClickToPay/components/CtPCards/CtPCardsList/CtPCardsList.d.ts +1 -1
  36. package/dist/types/components/Card/components/ClickToPay/components/CtPCards/CtPSingleCard/CtPSingleCard.d.ts +1 -1
  37. package/dist/types/components/Card/components/ClickToPay/components/CtPInfo/CtPInfoModal/CtPInfoModal.d.ts +1 -1
  38. package/dist/types/components/Card/components/ClickToPay/components/CtPLogin/CtPLoginInput.d.ts +11 -7
  39. package/dist/types/components/Card/components/ClickToPay/components/CtPOneTimePassword/CtPOneTimePassword.d.ts +1 -1
  40. package/dist/types/components/Card/components/ClickToPay/components/CtPOneTimePassword/CtPOneTimePasswordInput/CtPOneTimePasswordInput.d.ts +11 -7
  41. package/dist/types/components/Card/components/ClickToPay/context/ClickToPayContext.d.ts +2 -0
  42. package/dist/types/components/Card/components/ClickToPay/context/ClickToPayProvider.d.ts +4 -2
  43. package/dist/types/components/Card/components/ClickToPay/services/ClickToPayService.d.ts +1 -1
  44. package/dist/types/components/Card/components/ClickToPay/services/sdks/AbstractSrcInitiator.d.ts +3 -4
  45. package/dist/types/components/Card/components/ClickToPay/services/sdks/MastercardSdk.d.ts +2 -3
  46. package/dist/types/components/Card/components/ClickToPay/services/sdks/SrciError.d.ts +2 -2
  47. package/dist/types/components/Card/components/ClickToPay/services/sdks/VisaSdk.d.ts +2 -3
  48. package/dist/types/components/Card/components/ClickToPay/services/sdks/types.d.ts +14 -10
  49. package/dist/types/components/Card/components/ClickToPay/services/types.d.ts +10 -10
  50. package/dist/types/components/Card/types.d.ts +17 -6
  51. package/dist/types/components/Dropin/types.d.ts +1 -1
  52. package/dist/types/components/DuitNow/DuitNow.d.ts +0 -1
  53. package/dist/types/components/Giftcard/components/types.d.ts +2 -2
  54. package/dist/types/components/Klarna/types.d.ts +2 -2
  55. package/dist/types/components/Oxxo/types.d.ts +1 -1
  56. package/dist/types/components/PayNow/PayNow.d.ts +0 -1
  57. package/dist/types/components/PayPal/Paypal.d.ts +1 -1
  58. package/dist/types/components/PayPal/types.d.ts +7 -4
  59. package/dist/types/components/Pix/PixInput/types.d.ts +1 -1
  60. package/dist/types/components/PromptPay/PromptPay.d.ts +0 -1
  61. package/dist/types/components/Swish/Swish.d.ts +0 -1
  62. package/dist/types/components/ThreeDS2/types.d.ts +4 -4
  63. package/dist/types/components/UPI/components/UPIComponent/UPIComponent.d.ts +8 -6
  64. package/dist/types/components/UPI/components/VpaInput/VpaInput.d.ts +11 -7
  65. package/dist/types/components/UPI/types.d.ts +1 -1
  66. package/dist/types/components/WeChat/WeChat.d.ts +0 -1
  67. package/dist/types/components/helpers/QRLoaderContainer.d.ts +0 -1
  68. package/dist/types/components/internal/Address/types.d.ts +3 -3
  69. package/dist/types/components/internal/Await/Await.d.ts +0 -1
  70. package/dist/types/components/internal/Await/types.d.ts +0 -1
  71. package/dist/types/components/internal/Button/types.d.ts +1 -1
  72. package/dist/types/components/internal/IbanInput/utils.d.ts +1 -1
  73. package/dist/types/components/internal/Modal/Modal.d.ts +2 -2
  74. package/dist/types/components/internal/Modal/useModal.d.ts +2 -2
  75. package/dist/types/components/internal/Modal/useTrapFocus.d.ts +1 -1
  76. package/dist/types/components/internal/PersonalDetails/types.d.ts +1 -1
  77. package/dist/types/components/internal/QRLoader/QRLoader.d.ts +1 -1
  78. package/dist/types/components/internal/QRLoader/types.d.ts +1 -2
  79. package/dist/types/components/internal/SecuredFields/lib/CSF/utils/processErrors.d.ts +1 -1
  80. package/dist/types/components/internal/SecuredFields/lib/configuration/constants.d.ts +1 -1
  81. package/dist/types/components/internal/SecuredFields/lib/securedField/AbstractSecuredField.d.ts +1 -1
  82. package/dist/types/components/internal/SecuredFields/lib/types.d.ts +5 -5
  83. package/dist/types/components/types.d.ts +3 -3
  84. package/dist/types/core/Analytics/Analytics.d.ts +2 -1
  85. package/dist/types/core/Analytics/EventsQueue.d.ts +1 -1
  86. package/dist/types/core/RiskModule/RiskModule.d.ts +1 -1
  87. package/dist/types/core/Services/analytics/post-telemetry.d.ts +3 -1
  88. package/dist/types/core/Services/analytics/types.d.ts +2 -2
  89. package/dist/types/core/Services/data-set.d.ts +1 -1
  90. package/dist/types/core/Services/http.d.ts +1 -1
  91. package/dist/types/core/types.d.ts +1 -1
  92. package/dist/types/language/Language.d.ts +3 -3
  93. package/dist/types/language/types.d.ts +2 -2
  94. package/dist/types/language/utils.d.ts +4 -3
  95. package/dist/types/types/index.d.ts +13 -13
  96. package/dist/types/utils/Formatters/types.d.ts +1 -1
  97. package/dist/types/utils/Validator/types.d.ts +9 -9
  98. package/dist/types/utils/isValidURL.d.ts +1 -0
  99. package/dist/types/utils/useForm/types.d.ts +2 -2
  100. package/package.json +10 -10
@@ -84,10 +84,16 @@ export interface CardElementProps extends UIElementProps {
84
84
  onBinLookup?: (event: CbObjOnBinLookup) => void;
85
85
  [key: string]: any;
86
86
  }
87
- export declare type ClickToPayScheme = 'mc' | 'visa';
88
- export declare type ClickToPayConfiguration = {
89
- shopperIdentityValue: string;
90
- shopperIdentityType?: 'email' | 'mobilePhone';
87
+ export type ClickToPayScheme = 'mc' | 'visa';
88
+ export type ClickToPayConfiguration = {
89
+ /**
90
+ * Shopper email used to be recognized with the Network schemes
91
+ */
92
+ shopperEmail?: string;
93
+ /**
94
+ * Shopper telephone number used to be recognized with the Network schemes
95
+ */
96
+ telephoneNumber?: string;
91
97
  /**
92
98
  * Used to display the merchant name in case the DCF appears (ex: first time doing transaction in the device),
93
99
  */
@@ -97,11 +103,16 @@ export declare type ClickToPayConfiguration = {
97
103
  * defined during the creation of the Checkout.
98
104
  * Format: ISO language_country pair (e.g., en_US )
99
105
  *
100
- * @default en_US
106
+ * @defaultValue en_US
101
107
  */
102
108
  locale?: string;
109
+ /**
110
+ * Disable autofocus on the One Time Password input field when it is either displayed or when the OTP is resent
111
+ * @defaultValue false
112
+ */
113
+ disableOtpAutoFocus?: boolean;
103
114
  };
104
- export declare type SocialSecurityMode = 'show' | 'hide' | 'auto';
115
+ export type SocialSecurityMode = 'show' | 'hide' | 'auto';
105
116
  /** If the merchant wishes to set any of these properties in their local config they should do so via a "configuration" object */
106
117
  export interface CardConfiguration {
107
118
  visaSrciDpaId?: string;
@@ -2,7 +2,7 @@ import { PaymentMethod, StoredPaymentMethod, Order, OrderStatus } from '../../ty
2
2
  import UIElement from '../UIElement';
3
3
  import { UIElementProps, UIElementStatus } from '../types';
4
4
  import { PaymentMethodsConfiguration } from '../../core/types';
5
- export declare type InstantPaymentTypes = 'paywithgoogle' | 'googlepay' | 'applepay';
5
+ export type InstantPaymentTypes = 'paywithgoogle' | 'googlepay' | 'applepay';
6
6
  export interface DropinElementProps extends UIElementProps {
7
7
  /**
8
8
  * Configure each payment method displayed on the Drop-in
@@ -7,7 +7,6 @@ declare class DuitNowElement extends QRLoaderContainer {
7
7
  type?: string;
8
8
  brandLogo?: string;
9
9
  buttonLabel?: string;
10
- shouldRedirectOnMobile?: boolean;
11
10
  qrCodeImage?: string;
12
11
  paymentData?: string;
13
12
  introduction: string;
@@ -1,6 +1,6 @@
1
1
  import Language from '../../../language/Language';
2
2
  import { SFPState } from '../../internal/SecuredFields/SFP/types';
3
- export declare type GiftcardFieldsProps = {
3
+ export type GiftcardFieldsProps = {
4
4
  setRootNode: (input: HTMLElement) => void;
5
5
  i18n: Language;
6
6
  pinRequired: boolean;
@@ -9,7 +9,7 @@ export declare type GiftcardFieldsProps = {
9
9
  focusedElement: any;
10
10
  setFocusOn: any;
11
11
  };
12
- export declare type GiftcardFieldProps = {
12
+ export type GiftcardFieldProps = {
13
13
  i18n: Language;
14
14
  classNameModifiers?: Array<string>;
15
15
  sfpState: any;
@@ -6,7 +6,7 @@ declare global {
6
6
  }
7
7
  }
8
8
  /** sdkData present in Klarna `action`objects. */
9
- export declare type KlarnaSdkData = {
9
+ export type KlarnaSdkData = {
10
10
  /**
11
11
  * Klarna client_token
12
12
  * @see https://developers.klarna.com/documentation/klarna-payments/single-call-descriptions/create-session/
@@ -28,7 +28,7 @@ export interface KlarnaWidgetProps extends KlarnaPaymentsShared {
28
28
  onComplete: (detailsData: any) => void;
29
29
  onError: (error: any) => void;
30
30
  }
31
- export declare type KlarnaPaymentsProps = UIElementProps & KlarnaPaymentsShared & {
31
+ export type KlarnaPaymentsProps = UIElementProps & KlarnaPaymentsShared & {
32
32
  useKlarnaWidget: boolean;
33
33
  };
34
34
  export interface KlarnaWidgetAuthorizeResponse {
@@ -9,7 +9,7 @@ export interface OxxoVoucherResultProps {
9
9
  downloadUrl?: string;
10
10
  ref?: any;
11
11
  }
12
- export declare type OxxoElementData = {
12
+ export type OxxoElementData = {
13
13
  paymentMethod: {
14
14
  type: 'oxxo' | string;
15
15
  };
@@ -7,7 +7,6 @@ declare class PayNowElement extends QRLoaderContainer {
7
7
  type?: string;
8
8
  brandLogo?: string;
9
9
  buttonLabel?: string;
10
- shouldRedirectOnMobile?: boolean;
11
10
  qrCodeImage?: string;
12
11
  paymentData?: string;
13
12
  introduction: string;
@@ -11,7 +11,7 @@ declare class PaypalElement extends UIElement<PayPalElementProps> {
11
11
  private resolve;
12
12
  private reject;
13
13
  constructor(props: PayPalElementProps);
14
- protected formatProps(props: any): any;
14
+ formatProps(props: PayPalElementProps): PayPalElementProps;
15
15
  /**
16
16
  * Formats the component data output
17
17
  */
@@ -11,9 +11,9 @@ declare global {
11
11
  * The intent for the transaction. This determines whether the funds are captured immediately, or later.
12
12
  * @see {@link https://developer.paypal.com/docs/checkout/reference/customize-sdk/#intent}
13
13
  */
14
- declare type Intent = 'sale' | 'capture' | 'authorize' | 'order' | 'tokenize';
15
- export declare type FundingSource = 'paypal' | 'credit';
16
- interface PayPalStyles {
14
+ export type Intent = 'sale' | 'capture' | 'authorize' | 'order' | 'tokenize';
15
+ export type FundingSource = 'paypal' | 'credit';
16
+ export interface PayPalStyles {
17
17
  /**
18
18
  * @see {@link https://developer.paypal.com/docs/checkout/integration-features/customize-button/#color}
19
19
  */
@@ -68,7 +68,10 @@ interface PayPalCommonProps {
68
68
  */
69
69
  cspNonce?: string;
70
70
  /**
71
+ * Determines whether the funds are captured immediately on checkout or if the buyer authorizes the funds to be captured later.
71
72
  * @see {@link https://developer.paypal.com/docs/checkout/reference/customize-sdk/#intent}
73
+ *
74
+ * If set, it will override the intent passed inside the 'configuration' object
72
75
  */
73
76
  intent?: Intent;
74
77
  /**
@@ -152,5 +155,5 @@ export interface PaypalSettings {
152
155
  'enable-funding': string;
153
156
  components: string;
154
157
  }
155
- export declare type SupportedLocale = typeof SUPPORTED_LOCALES[number];
158
+ export type SupportedLocale = (typeof SUPPORTED_LOCALES)[number];
156
159
  export {};
@@ -15,7 +15,7 @@ export interface PixInputProps {
15
15
  };
16
16
  personalDetailsRequired: boolean;
17
17
  showPayButton: boolean;
18
- onChange({ data, valid, errors, isValid: boolean }: {
18
+ onChange({ data, valid, errors, isValid }: {
19
19
  data: any;
20
20
  valid: any;
21
21
  errors: any;
@@ -7,7 +7,6 @@ declare class PromptPayElement extends QRLoaderContainer {
7
7
  type?: string;
8
8
  brandLogo?: string;
9
9
  buttonLabel?: string;
10
- shouldRedirectOnMobile?: boolean;
11
10
  qrCodeImage?: string;
12
11
  paymentData?: string;
13
12
  introduction: string;
@@ -7,7 +7,6 @@ declare class SwishElement extends QRLoaderContainer {
7
7
  type?: string;
8
8
  brandLogo?: string;
9
9
  buttonLabel?: string;
10
- shouldRedirectOnMobile: boolean;
11
10
  qrCodeImage?: string;
12
11
  paymentData?: string;
13
12
  introduction: string;
@@ -3,7 +3,7 @@
3
3
  * https://docs.adyen.com/checkout/3d-secure/api-reference#threeds2result
4
4
  * Indicates whether a transaction was authenticated, or whether additional verification is required.
5
5
  */
6
- export declare type ResultValue = 'Y' | 'N' | 'U' | 'A' | 'C' | 'R';
6
+ export type ResultValue = 'Y' | 'N' | 'U' | 'A' | 'C' | 'R';
7
7
  export interface CReqData {
8
8
  acsTransID: string;
9
9
  messageVersion: string;
@@ -50,18 +50,18 @@ export interface FingerPrintData {
50
50
  threeDSMethodNotificationURL: string;
51
51
  postMessageDomain: string;
52
52
  }
53
- export declare type ThreeDS2FingerprintResponse = {
53
+ export type ThreeDS2FingerprintResponse = {
54
54
  type: 'action' | 'completed';
55
55
  action?: CheckoutRedirectAction | CheckoutThreeDS2Action;
56
56
  details?: Record<string, string>;
57
57
  };
58
- declare type CheckoutRedirectAction = {
58
+ type CheckoutRedirectAction = {
59
59
  type: 'redirect';
60
60
  data: Record<string, string>;
61
61
  method: string;
62
62
  paymentData: string;
63
63
  };
64
- declare type CheckoutThreeDS2Action = {
64
+ type CheckoutThreeDS2Action = {
65
65
  type: 'threeDS2';
66
66
  token: string;
67
67
  subtype: string;
@@ -1,18 +1,20 @@
1
1
  import { h, RefObject } from 'preact';
2
2
  import { PayButtonFunctionProps } from '../../../types';
3
+ import { VpaInputDataState } from '../VpaInput/VpaInput';
3
4
  import { UpiMode } from '../../types';
4
5
  import './UPIComponent.scss';
6
+ type OnChangeProps = {
7
+ data: VpaInputDataState;
8
+ valid: any;
9
+ errors: any;
10
+ isValid: boolean;
11
+ };
5
12
  interface UPIComponentProps {
6
13
  defaultMode: UpiMode;
7
14
  showPayButton: boolean;
8
15
  ref(ref: RefObject<typeof UPIComponent>): void;
9
16
  payButton(props: PayButtonFunctionProps): h.JSX.Element;
10
- onChange({ data: VpaInputDataState, valid, errors, isValid: boolean }: {
11
- data: any;
12
- valid: any;
13
- errors: any;
14
- isValid: any;
15
- }): void;
17
+ onChange({ data, valid, errors, isValid }: OnChangeProps): void;
16
18
  onUpdateMode(mode: UpiMode): void;
17
19
  }
18
20
  export default function UPIComponent({ defaultMode, onChange, onUpdateMode, payButton, showPayButton }: UPIComponentProps): h.JSX.Element;
@@ -1,17 +1,21 @@
1
1
  import { h } from 'preact';
2
2
  import './VpaInput.scss';
3
+ type OnChangeProps = {
4
+ data: VpaInputDataState;
5
+ valid: any;
6
+ errors: any;
7
+ isValid: boolean;
8
+ };
3
9
  interface VpaInputProps {
4
10
  data?: {};
5
11
  disabled?: boolean;
6
- onChange({ data: VpaInputDataState, valid, errors, isValid: boolean }: {
7
- data: any;
8
- valid: any;
9
- errors: any;
10
- isValid: any;
11
- }): void;
12
+ onChange({ data, valid, errors, isValid }: OnChangeProps): void;
12
13
  onSetInputHandlers(handlers: VpaInputHandlers): void;
13
14
  }
14
- export declare type VpaInputHandlers = {
15
+ export interface VpaInputDataState {
16
+ virtualPaymentAddress?: string;
17
+ }
18
+ export type VpaInputHandlers = {
15
19
  validateInput(): void;
16
20
  };
17
21
  declare const VpaInput: (props: VpaInputProps) => h.JSX.Element;
@@ -1,5 +1,5 @@
1
1
  import { UIElementProps } from '../types';
2
- export declare type UpiPaymentData = {
2
+ export type UpiPaymentData = {
3
3
  paymentMethod: {
4
4
  type: 'upi_qr' | 'upi_collect';
5
5
  virtualPaymentAddress?: string;
@@ -7,7 +7,6 @@ declare class WeChatPayElement extends QRLoaderContainer {
7
7
  type?: string;
8
8
  brandLogo?: string;
9
9
  buttonLabel?: string;
10
- shouldRedirectOnMobile?: boolean;
11
10
  qrCodeImage?: string;
12
11
  paymentData?: string;
13
12
  introduction: string;
@@ -13,7 +13,6 @@ export interface QRLoaderContainerProps extends UIElementProps {
13
13
  type?: string;
14
14
  brandLogo?: string;
15
15
  buttonLabel?: string;
16
- shouldRedirectOnMobile?: boolean;
17
16
  qrCodeImage?: string;
18
17
  paymentData?: string;
19
18
  introduction: string;
@@ -2,7 +2,7 @@ import { AddressField, AddressData } from '../../../types';
2
2
  import Specifications from './Specifications';
3
3
  import { ValidatorRules } from '../../../utils/Validator/types';
4
4
  import { ValidationRuleResult } from '../../../utils/Validator/ValidationRuleResult';
5
- export declare type StringObject = {
5
+ export type StringObject = {
6
6
  [key: string]: string;
7
7
  };
8
8
  export interface AddressProps {
@@ -78,8 +78,8 @@ export interface StateFieldItem {
78
78
  id: string;
79
79
  name: string;
80
80
  }
81
- declare type AddressFieldsGroup = [AddressField, number][];
82
- export declare type AddressSchema = (AddressField | AddressFieldsGroup)[];
81
+ type AddressFieldsGroup = [AddressField, number][];
82
+ export type AddressSchema = (AddressField | AddressFieldsGroup)[];
83
83
  export interface AddressSpecifications {
84
84
  [key: string]: {
85
85
  hasDataset?: boolean;
@@ -13,7 +13,6 @@ declare namespace Await {
13
13
  throttleInterval: number;
14
14
  showCountdownTimer: boolean;
15
15
  classNameModifiers: any[];
16
- shouldRedirectOnMobile: boolean;
17
16
  url: any;
18
17
  };
19
18
  }
@@ -17,7 +17,6 @@ export interface AwaitComponentProps {
17
17
  throttleInterval: number;
18
18
  paymentData: string;
19
19
  url?: string;
20
- shouldRedirectOnMobile?: boolean;
21
20
  classNameModifiers?: string[];
22
21
  clientKey: string;
23
22
  onError: (error: any) => void;
@@ -1,4 +1,4 @@
1
- export declare type ButtonVariant = 'primary' | 'secondary' | 'ghost' | 'action';
1
+ export type ButtonVariant = 'primary' | 'secondary' | 'ghost' | 'action';
2
2
  export interface ButtonProps {
3
3
  status?: string;
4
4
  /**
@@ -1,4 +1,4 @@
1
- export declare type ElectronicFormat = string;
1
+ export type ElectronicFormat = string;
2
2
  /**
3
3
  * @param countryCode -
4
4
  * @returns Example of IBAN Number
@@ -1,13 +1,13 @@
1
1
  import { ComponentChildren, h } from 'preact';
2
2
  import './Modal.scss';
3
- declare type ModalRenderFnProps = {
3
+ type ModalRenderFnProps = {
4
4
  /**
5
5
  * Function used to properly trigger the Modal close mechanism. It takes into account the element that the Modal needs
6
6
  * to set focus when it is dismissed.
7
7
  */
8
8
  onCloseModal(): void;
9
9
  };
10
- declare type ModalProps = {
10
+ type ModalProps = {
11
11
  children: ({ onCloseModal }: ModalRenderFnProps) => ComponentChildren;
12
12
  classNameModifiers?: string[];
13
13
  onClose(): void;
@@ -1,4 +1,4 @@
1
- declare type UseModalProps = {
1
+ type UseModalProps = {
2
2
  modalElement?: HTMLElement;
3
3
  isOpen: boolean;
4
4
  isDismissible: boolean;
@@ -6,7 +6,7 @@ declare type UseModalProps = {
6
6
  focusAfterClose: HTMLElement;
7
7
  onClose(): void;
8
8
  };
9
- declare type UseModalHook = {
9
+ type UseModalHook = {
10
10
  /**
11
11
  * Function that focus on the 'focusAfterClose' element, and then closes the modal
12
12
  */
@@ -1,4 +1,4 @@
1
- declare type UseTrapFocusProps = {
1
+ type UseTrapFocusProps = {
2
2
  rootElement?: HTMLElement;
3
3
  /**
4
4
  * Element that must be focused when the hook is executed. If no element is passed, the first focusable child
@@ -1,6 +1,6 @@
1
1
  import { FieldsetVisibility, PersonalDetailsSchema } from '../../../types';
2
2
  import { ValidatorRules } from '../../../utils/Validator/types';
3
- declare type PersonalDetailsPlaceholders = Omit<PersonalDetailsSchema, 'gender'>;
3
+ type PersonalDetailsPlaceholders = Omit<PersonalDetailsSchema, 'gender'>;
4
4
  export interface PersonalDetailsProps {
5
5
  label?: string;
6
6
  namePrefix?: string;
@@ -16,7 +16,7 @@ declare class QRLoader extends Component<QRLoaderProps, QRLoaderState> {
16
16
  };
17
17
  statusInterval: () => void;
18
18
  componentDidMount(): void;
19
- redirectToApp: (url: any, fallback?: () => void) => void;
19
+ redirectToApp: (url: any) => void;
20
20
  componentDidUpdate(prevProps: any, prevState: any): void;
21
21
  componentWillUnmount(): void;
22
22
  private onTick;
@@ -5,10 +5,9 @@ export interface QRLoaderProps {
5
5
  delay?: number;
6
6
  countdownTime?: number;
7
7
  onError?: (error: any) => void;
8
- onComplete?: (data: any) => void;
8
+ onComplete?: (data: any, component: any) => void;
9
9
  throttleTime?: number;
10
10
  throttledInterval?: number;
11
- shouldRedirectOnMobile?: boolean;
12
11
  url?: string;
13
12
  type?: string;
14
13
  paymentData?: string;
@@ -1,5 +1,5 @@
1
1
  import { CbObjOnError, SFFeedbackObj } from '../../types';
2
2
  import SecuredField from '../../securedField/SecuredField';
3
- declare type RtnType_callbackFn = (obj: CbObjOnError) => void;
3
+ type RtnType_callbackFn = (obj: CbObjOnError) => void;
4
4
  export declare const processErrors: (pFeedbackObj: SFFeedbackObj, securedField: SecuredField, type: string, rootNode: HTMLElement, callbackFn: RtnType_callbackFn) => CbObjOnError;
5
5
  export {};
@@ -11,7 +11,7 @@ export declare const ENCRYPTED_BANK_LOCATION_FIELD = "encryptedBankLocationId";
11
11
  export declare const ENCRYPTED_SECURITY_CODE_3_DIGITS = "encryptedSecurityCode3digits";
12
12
  export declare const ENCRYPTED_SECURITY_CODE_4_DIGITS = "encryptedSecurityCode4digits";
13
13
  export declare const GIFT_CARD = "giftcard";
14
- export declare const SF_VERSION = "4.3.3";
14
+ export declare const SF_VERSION = "4.4.1";
15
15
  export declare const DEFAULT_CARD_GROUP_TYPES: string[];
16
16
  export declare const NON_CREDIT_CARD_TYPE_SECURED_FIELDS: string[];
17
17
  export declare const CREDIT_CARD_SF_FIELDS: string[];
@@ -62,7 +62,7 @@ export interface SFPlaceholdersObject {
62
62
  [ENCRYPTED_BANK_ACCNT_NUMBER_FIELD]?: string;
63
63
  [ENCRYPTED_BANK_LOCATION_FIELD]?: string;
64
64
  }
65
- export declare type AriaConfig = {
65
+ export type AriaConfig = {
66
66
  lang?: string;
67
67
  } & {
68
68
  [key: string]: AriaConfigObject;
@@ -182,9 +182,9 @@ export interface SendBrandObject {
182
182
  export interface SendExpiryDateObject {
183
183
  expiryDatePolicy: DatePolicyType;
184
184
  }
185
- export declare type RtnType_noParamVoidFn = () => void;
186
- export declare type RtnType_postMessageListener = (event: Event) => void;
187
- export declare type RtnType_callbackFn = (feedbackObj: SFFeedbackObj) => void;
188
- export declare type CVCPolicyType = 'required' | 'optional' | 'hidden';
189
- export declare type DatePolicyType = 'required' | 'optional' | 'hidden';
185
+ export type RtnType_noParamVoidFn = () => void;
186
+ export type RtnType_postMessageListener = (event: Event) => void;
187
+ export type RtnType_callbackFn = (feedbackObj: SFFeedbackObj) => void;
188
+ export type CVCPolicyType = 'required' | 'optional' | 'hidden';
189
+ export type DatePolicyType = 'required' | 'optional' | 'hidden';
190
190
  export {};
@@ -71,9 +71,9 @@ export interface IUIElement {
71
71
  showValidation(): void;
72
72
  setState(newState: object): void;
73
73
  }
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';
76
- export declare type PayButtonFunctionProps = Omit<PayButtonProps, 'amount'>;
74
+ export type UIElementStatus = 'ready' | 'loading' | 'error' | 'success';
75
+ export type ActionDescriptionType = 'qr-code-loaded' | 'polling-started' | 'fingerprint-iframe-loaded' | 'challenge-iframe-loaded';
76
+ export type PayButtonFunctionProps = Omit<PayButtonProps, 'amount'>;
77
77
  export interface ActionHandledReturnObject {
78
78
  componentType: string;
79
79
  actionDescription: ActionDescriptionType;
@@ -1,4 +1,5 @@
1
1
  import { CoreOptions } from '../types';
2
+ export type AnalyticsProps = Pick<CoreOptions, 'loadingContext' | 'locale' | 'clientKey' | 'analytics' | 'amount'>;
2
3
  declare class Analytics {
3
4
  private static defaultProps;
4
5
  checkoutAttemptId: string;
@@ -7,7 +8,7 @@ declare class Analytics {
7
8
  private readonly logTelemetry;
8
9
  private readonly queue;
9
10
  readonly collectId: any;
10
- constructor({ loadingContext, locale, clientKey, analytics }: CoreOptions);
11
+ constructor({ loadingContext, locale, clientKey, analytics, amount }: AnalyticsProps);
11
12
  send(event: any): void;
12
13
  }
13
14
  export default Analytics;
@@ -1,4 +1,4 @@
1
- declare type EventItem = (checkoutAttemptId: string) => Promise<any>;
1
+ type EventItem = (checkoutAttemptId: string) => Promise<any>;
2
2
  declare class EventsQueue {
3
3
  events: EventItem[];
4
4
  add(event: any): void;
@@ -11,7 +11,7 @@ interface RiskModuleProps extends BaseElementProps {
11
11
  risk: RiskModuleOptions;
12
12
  loadingContext: string;
13
13
  }
14
- export declare type RiskData = string | boolean;
14
+ export type RiskData = string | boolean;
15
15
  export default class RiskElement extends BaseElement<RiskModuleProps> {
16
16
  static type: string;
17
17
  static defaultProps: {
@@ -1,6 +1,8 @@
1
+ import { AnalyticsProps } from '../../Analytics/Analytics';
2
+ type Config = Pick<AnalyticsProps, 'loadingContext' | 'locale' | 'clientKey' | 'amount'>;
1
3
  /**
2
4
  * Log event to Adyen
3
5
  * @param config -
4
6
  */
5
- declare const logTelemetry: (config: any) => (event: any) => Promise<any>;
7
+ declare const logTelemetry: (config: Config) => (event: any) => Promise<any>;
6
8
  export default logTelemetry;
@@ -1,9 +1,9 @@
1
1
  import { Experiment } from '../../Analytics/types';
2
- declare type CheckoutAttemptIdSession = {
2
+ type CheckoutAttemptIdSession = {
3
3
  id: string;
4
4
  timestamp: number;
5
5
  };
6
- declare type CollectIdProps = {
6
+ type CollectIdProps = {
7
7
  clientKey: string;
8
8
  loadingContext: string;
9
9
  experiments: Experiment[];
@@ -1,4 +1,4 @@
1
- export declare type DataSet = DataSetItem[];
1
+ export type DataSet = DataSetItem[];
2
2
  export interface DataSetItem {
3
3
  id: string;
4
4
  name: string;
@@ -8,7 +8,7 @@ interface HttpOptions {
8
8
  path: string;
9
9
  errorLevel?: ErrorLevel;
10
10
  }
11
- declare type ErrorLevel = 'silent' | 'info' | 'warn' | 'error' | 'fatal';
11
+ type ErrorLevel = 'silent' | 'info' | 'warn' | 'error' | 'fatal';
12
12
  export declare function http<T>(options: HttpOptions, data?: any): Promise<T>;
13
13
  export declare function httpGet<T = any>(options: HttpOptions, data?: any): Promise<T>;
14
14
  export declare function httpPost<T = any>(options: HttpOptions, data?: any): Promise<T>;
@@ -58,7 +58,7 @@ export interface CoreOptions {
58
58
  order?: Order;
59
59
  [key: string]: any;
60
60
  }
61
- export declare type PaymentMethodsConfiguration = {
61
+ export type PaymentMethodsConfiguration = {
62
62
  [key in keyof PaymentMethods]?: Partial<PaymentMethodOptions<key>>;
63
63
  } | {
64
64
  [key in PaymentActionsType]?: any;
@@ -1,11 +1,11 @@
1
1
  export declare class Language {
2
- constructor(locale?: string, customTranslations?: object);
2
+ private readonly supportedLocales;
3
3
  readonly locale: string;
4
4
  readonly languageCode: string;
5
- private readonly supportedLocales;
6
- translations: object;
5
+ translations: Record<string, string>;
7
6
  readonly customTranslations: any;
8
7
  loaded: Promise<any>;
8
+ constructor(locale?: string, customTranslations?: object);
9
9
  /**
10
10
  * Returns a translated string from a key in the current {@link Language.locale}
11
11
  * @param key - Translation key
@@ -1,6 +1,6 @@
1
1
  import locales from './locales';
2
- export declare type Locales = keyof typeof locales;
3
- export declare type CustomTranslations = {
2
+ export type Locales = keyof typeof locales;
3
+ export type CustomTranslations = {
4
4
  [key: string]: {
5
5
  [message: string]: string;
6
6
  };
@@ -33,11 +33,12 @@ export declare function parseLocale(locale: string, supportedLocales?: string[])
33
33
  */
34
34
  export declare function formatCustomTranslations(customTranslations: object, supportedLocales: string[]): object;
35
35
  /**
36
- * Returns an array with all the locales
36
+ * Returns an Object which contains all the key/values of the translation labels
37
+ *
37
38
  * @param locale - The locale the user wants to use
38
- * @param customTranslations -
39
+ * @param customTranslations - Custom translations provided by the merchant
39
40
  */
40
- export declare const loadTranslations: (locale: string, customTranslations?: object) => Promise<any>;
41
+ export declare const loadTranslations: (locale: string, customTranslations?: object) => Promise<Record<string, string>>;
41
42
  /**
42
43
  * Injects JSX elements in a middle of a translation and returns a JSX array
43
44
  * The input string should use %# as the token to know where to insert the component