@adyen/adyen-web 4.7.5 → 5.1.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 (137) hide show
  1. package/dist/adyen.css +5 -1
  2. package/dist/adyen.css.map +1 -1
  3. package/dist/adyen.js +1 -1
  4. package/dist/adyen.js.map +1 -1
  5. package/dist/cjs/adyen.css +5 -1
  6. package/dist/cjs/adyen.css.map +1 -1
  7. package/dist/cjs/index.js +1 -1
  8. package/dist/es/adyen.css +5 -1
  9. package/dist/es/adyen.css.map +1 -1
  10. package/dist/es/ar.js +1 -1
  11. package/dist/es/cs-CZ.js +1 -1
  12. package/dist/es/da-DK.js +1 -1
  13. package/dist/es/de-DE.js +1 -1
  14. package/dist/es/el-GR.js +1 -1
  15. package/dist/es/es-ES.js +1 -1
  16. package/dist/es/fi-FI.js +1 -1
  17. package/dist/es/fr-FR.js +1 -1
  18. package/dist/es/hr-HR.js +1 -1
  19. package/dist/es/hu-HU.js +1 -1
  20. package/dist/es/index.js +1 -1
  21. package/dist/es/it-IT.js +1 -1
  22. package/dist/es/ja-JP.js +1 -1
  23. package/dist/es/ko-KR.js +1 -1
  24. package/dist/es/nl-NL.js +1 -1
  25. package/dist/es/no-NO.js +1 -1
  26. package/dist/es/pl-PL.js +1 -1
  27. package/dist/es/pt-BR.js +1 -1
  28. package/dist/es/ro-RO.js +1 -1
  29. package/dist/es/ru-RU.js +1 -1
  30. package/dist/es/sk-SK.js +1 -1
  31. package/dist/es/sl-SI.js +1 -1
  32. package/dist/es/sv-SE.js +1 -1
  33. package/dist/es/zh-CN.js +1 -1
  34. package/dist/es/zh-TW.js +1 -1
  35. package/dist/types/components/AmazonPay/types.d.ts +4 -0
  36. package/dist/types/components/ApplePay/ApplePay.d.ts +1 -4
  37. package/dist/types/components/ApplePay/defaultProps.d.ts +0 -2
  38. package/dist/types/components/ApplePay/types.d.ts +1 -4
  39. package/dist/types/components/BacsDD/components/types.d.ts +1 -1
  40. package/dist/types/components/BankTransfer/types.d.ts +1 -1
  41. package/dist/types/components/BaseElement.d.ts +2 -13
  42. package/dist/types/components/BcmcMobile/BcmcMobile.d.ts +8 -1
  43. package/dist/types/components/Blik/components/BlikInput.d.ts +1 -1
  44. package/dist/types/components/Card/Bancontact.d.ts +8 -1
  45. package/dist/types/components/Card/Card.d.ts +9 -1
  46. package/dist/types/components/Card/components/CardInput/components/DataSfSpan.d.ts +7 -0
  47. package/dist/types/components/Card/components/CardInput/components/types.d.ts +8 -0
  48. package/dist/types/components/Card/components/CardInput/validate.d.ts +1 -1
  49. package/dist/types/components/Card/types.d.ts +2 -1
  50. package/dist/types/components/Dragonpay/Dragonpay.d.ts +9 -4
  51. package/dist/types/components/Dragonpay/types.d.ts +1 -1
  52. package/dist/types/components/Dropin/Dropin.d.ts +0 -3
  53. package/dist/types/components/Dropin/components/PaymentMethod/PaymentMethodIcon.d.ts +3 -3
  54. package/dist/types/components/Dropin/components/PaymentMethod/PaymentMethodItem.d.ts +1 -0
  55. package/dist/types/components/Dropin/components/utils.d.ts +2 -0
  56. package/dist/types/components/Dropin/defaultProps.d.ts +0 -2
  57. package/dist/types/components/Dropin/types.d.ts +2 -1
  58. package/dist/types/components/Giftcard/Giftcard.d.ts +3 -2
  59. package/dist/types/components/GooglePay/GooglePay.d.ts +0 -4
  60. package/dist/types/components/GooglePay/defaultProps.d.ts +0 -2
  61. package/dist/types/components/GooglePay/requests.d.ts +2 -2
  62. package/dist/types/components/GooglePay/types.d.ts +11 -1
  63. package/dist/types/components/Klarna/components/KlarnaWidget/KlarnaWidget.d.ts +1 -0
  64. package/dist/types/components/Klarna/constants.d.ts +0 -5
  65. package/dist/types/components/Klarna/types.d.ts +9 -3
  66. package/dist/types/components/MBWay/components/MBWayInput/types.d.ts +1 -1
  67. package/dist/types/components/PayPal/Paypal.d.ts +1 -2
  68. package/dist/types/components/PayPal/types.d.ts +2 -1
  69. package/dist/types/components/Pix/Pix.d.ts +32 -2
  70. package/dist/types/components/Pix/PixInput/PixInput.d.ts +9 -0
  71. package/dist/types/components/Pix/PixInput/index.d.ts +1 -0
  72. package/dist/types/components/Pix/PixInput/utils.d.ts +3 -0
  73. package/dist/types/components/Pix/PixInput/validate.d.ts +2 -0
  74. package/dist/types/components/Pix/types.d.ts +19 -0
  75. package/dist/types/components/Redirect/components/RedirectShopper/RedirectShopper.d.ts +2 -3
  76. package/dist/types/components/Swish/Swish.d.ts +8 -1
  77. package/dist/types/components/Twint/Twint.d.ts +23 -0
  78. package/dist/types/components/Twint/index.d.ts +1 -0
  79. package/dist/types/components/UIElement.d.ts +34 -26
  80. package/dist/types/components/WeChat/WeChat.d.ts +8 -1
  81. package/dist/types/components/helpers/IssuerListContainer.d.ts +8 -8
  82. package/dist/types/components/helpers/QRLoaderContainer.d.ts +5 -3
  83. package/dist/types/components/index.d.ts +2 -0
  84. package/dist/types/components/internal/Await/types.d.ts +1 -1
  85. package/dist/types/components/internal/FormFields/Field/Field.d.ts +3 -1
  86. package/dist/types/components/internal/FormFields/Field/types.d.ts +1 -0
  87. package/dist/types/components/internal/FormFields/RadioGroup/types.d.ts +1 -0
  88. package/dist/types/components/internal/FormFields/Select/Select.d.ts +1 -1
  89. package/dist/types/components/internal/FormFields/Select/types.d.ts +3 -0
  90. package/dist/types/components/internal/IssuerList/ContentSeparator/ContentSeparator.d.ts +4 -0
  91. package/dist/types/components/internal/IssuerList/ContentSeparator/index.d.ts +1 -0
  92. package/dist/types/components/internal/IssuerList/IssuerButtonGroup/IssuerButton.d.ts +11 -0
  93. package/dist/types/components/internal/IssuerList/IssuerButtonGroup/IssuerButtonGroup.d.ts +10 -0
  94. package/dist/types/components/internal/IssuerList/IssuerButtonGroup/index.d.ts +1 -0
  95. package/dist/types/components/internal/IssuerList/IssuerList.d.ts +2 -7
  96. package/dist/types/components/internal/IssuerList/types.d.ts +16 -0
  97. package/dist/types/components/internal/PayButton/PayButton.d.ts +4 -1
  98. package/dist/types/components/internal/PayButton/index.d.ts +1 -1
  99. package/dist/types/components/internal/QRLoader/QRLoader.d.ts +6 -6
  100. package/dist/types/components/internal/QRLoader/types.d.ts +0 -1
  101. package/dist/types/components/internal/SecuredFields/lib/configuration/constants.d.ts +4 -1
  102. package/dist/types/components/internal/SecuredFields/lib/core/AbstractSecuredField.d.ts +2 -0
  103. package/dist/types/components/internal/SecuredFields/lib/types.d.ts +1 -0
  104. package/dist/types/components/internal/SocialSecurityNumberBrazil/BrazilPersonalDetail.d.ts +2 -0
  105. package/dist/types/components/{Boleto/components → internal}/SocialSecurityNumberBrazil/SocialSecurityNumberBrazil.d.ts +0 -0
  106. package/dist/types/components/{Boleto/components → internal}/SocialSecurityNumberBrazil/constants.d.ts +0 -0
  107. package/dist/types/components/{Boleto/components → internal}/SocialSecurityNumberBrazil/utils.d.ts +0 -0
  108. package/dist/types/components/{Boleto/components → internal}/SocialSecurityNumberBrazil/validate.d.ts +0 -0
  109. package/dist/types/components/types.d.ts +48 -0
  110. package/dist/types/components/utils.d.ts +3 -0
  111. package/dist/types/core/Analytics/Analytics.d.ts +1 -1
  112. package/dist/types/core/Analytics/EventsQueue.d.ts +2 -2
  113. package/dist/types/core/Analytics/types.d.ts +2 -2
  114. package/dist/types/core/CheckoutSession/CheckoutSession.d.ts +47 -0
  115. package/dist/types/core/CheckoutSession/index.d.ts +1 -0
  116. package/dist/types/core/CheckoutSession/utils.d.ts +2 -0
  117. package/dist/types/core/Errors/AdyenCheckoutError.d.ts +14 -0
  118. package/dist/types/core/Errors/constants.d.ts +1 -0
  119. package/dist/types/core/RiskModule/RiskModule.d.ts +2 -1
  120. package/dist/types/core/Services/{collect-id.d.ts → analytics/collect-id.d.ts} +0 -0
  121. package/dist/types/core/Services/{log-event.d.ts → analytics/log-event.d.ts} +0 -0
  122. package/dist/types/core/Services/{post-telemetry.d.ts → analytics/post-telemetry.d.ts} +0 -0
  123. package/dist/types/core/Services/sessions/check-balance.d.ts +6 -0
  124. package/dist/types/core/Services/sessions/constants.d.ts +1 -0
  125. package/dist/types/core/Services/sessions/create-order.d.ts +6 -0
  126. package/dist/types/core/Services/sessions/make-payment.d.ts +6 -0
  127. package/dist/types/core/Services/sessions/setup-session.d.ts +6 -0
  128. package/dist/types/core/Services/sessions/submit-details.d.ts +6 -0
  129. package/dist/types/core/core.d.ts +14 -1
  130. package/dist/types/core/types.d.ts +1 -0
  131. package/dist/types/index.d.ts +2 -1
  132. package/dist/types/language/config.d.ts +4 -0
  133. package/dist/types/language/locales/index.d.ts +202 -28
  134. package/dist/types/types/index.d.ts +38 -0
  135. package/dist/types/utils/Storage.d.ts +10 -0
  136. package/dist/types/utils/idGenerator.d.ts +1 -0
  137. package/package.json +7 -7
@@ -1,7 +1,19 @@
1
1
  import QRLoaderContainer from '../helpers/QRLoaderContainer';
2
- declare class PixElement extends QRLoaderContainer {
2
+ import { h } from 'preact';
3
+ import { PixProps } from './types';
4
+ declare class PixElement extends QRLoaderContainer<PixProps> {
3
5
  static type: string;
6
+ static defaultProps: {
7
+ qrCodeImage: string;
8
+ amount: any;
9
+ paymentData: any;
10
+ onError: () => void;
11
+ onComplete: () => void;
12
+ personalDetailsRequired: boolean;
13
+ };
14
+ get isValid(): boolean;
4
15
  formatProps(props: any): {
16
+ personalDetailsRequired?: boolean;
5
17
  delay: number;
6
18
  countdownTime: number;
7
19
  type?: string;
@@ -11,17 +23,24 @@ declare class PixElement extends QRLoaderContainer {
11
23
  qrCodeImage?: string;
12
24
  paymentData?: string;
13
25
  instructions?: string;
26
+ session?: {
27
+ id: string;
28
+ data: string;
29
+ };
14
30
  onChange?: (state: any, element: import("../UIElement").UIElement<any>) => void;
15
31
  onValid?: (state: any, element: import("../UIElement").UIElement<any>) => void;
32
+ beforeSubmit?: (state: any, element: import("../UIElement").UIElement<any>, actions: any) => Promise<void>;
16
33
  onSubmit?: (state: any, element: import("../UIElement").UIElement<any>) => void;
17
34
  onComplete?: (state: any, element: import("../UIElement").UIElement<any>) => void;
18
35
  onAdditionalDetails?: (state: any, element: import("../UIElement").UIElement<any>) => void;
19
36
  onError?: (error: any, element?: import("../UIElement").UIElement<any>) => void;
20
- setStatusAutomatically?: boolean;
37
+ onPaymentCompleted?: (result: any, element: import("../UIElement").UIElement<any>) => void;
38
+ beforeRedirect?: (resolve: any, reject: any, redirectData: any, element: import("../UIElement").UIElement<any>) => void;
21
39
  name?: string;
22
40
  icon?: string;
23
41
  amount?: import("../../types").PaymentAmount;
24
42
  showPayButton?: boolean;
43
+ setStatusAutomatically?: boolean;
25
44
  payButton?: (options: any) => any;
26
45
  loadingContext?: string;
27
46
  createFromAction?: (action: import("../../types").PaymentAction, props: object) => import("../UIElement").UIElement<any>;
@@ -38,5 +57,16 @@ declare class PixElement extends QRLoaderContainer {
38
57
  copyBtn: boolean;
39
58
  introduction: string;
40
59
  };
60
+ formatData(): {
61
+ socialSecurityNumber: any;
62
+ shopperName: {
63
+ firstName: any;
64
+ lastName: any;
65
+ };
66
+ paymentMethod: {
67
+ type: any;
68
+ };
69
+ };
70
+ render(): h.JSX.Element;
41
71
  }
42
72
  export default PixElement;
@@ -0,0 +1,9 @@
1
+ import { h } from 'preact';
2
+ declare function PixInput(props: any): h.JSX.Element;
3
+ declare namespace PixInput {
4
+ var defaultProps: {
5
+ data: {};
6
+ personalDetailsRequired: boolean;
7
+ };
8
+ }
9
+ export default PixInput;
@@ -0,0 +1 @@
1
+ export { default } from './PixInput';
@@ -0,0 +1,3 @@
1
+ export declare const pixFormatters: {
2
+ socialSecurityNumber: (ssn: any) => any;
3
+ };
@@ -0,0 +1,2 @@
1
+ import { ValidatorRules } from '../../../utils/Validator/Validator';
2
+ export declare const pixValidationRules: ValidatorRules;
@@ -0,0 +1,19 @@
1
+ import { QRLoaderContainerProps } from '../helpers/QRLoaderContainer';
2
+ export interface PixProps extends QRLoaderContainerProps {
3
+ personalDetailsRequired?: boolean;
4
+ }
5
+ export interface PixInputDataState {
6
+ firstName?: string;
7
+ lastName?: string;
8
+ socialSecurityNumber?: string;
9
+ }
10
+ export interface PixInputValidState {
11
+ firstName?: boolean;
12
+ lastName?: boolean;
13
+ socialSecurityNumber?: boolean;
14
+ }
15
+ export interface PixInputErrorState {
16
+ firstName?: boolean;
17
+ lastName?: boolean;
18
+ socialSecurityNumber?: boolean;
19
+ }
@@ -1,17 +1,16 @@
1
1
  import { Component, h } from 'preact';
2
2
  interface RedirectShopperProps {
3
- beforeRedirect: (resolve: any, reject: any, url: any) => Promise<any>;
3
+ beforeRedirect: (resolve: any, reject: any, url: any) => Promise<void>;
4
4
  url: string;
5
5
  method: 'GET' | 'POST';
6
6
  data?: any;
7
7
  }
8
8
  declare class RedirectShopper extends Component<RedirectShopperProps> {
9
+ private postForm;
9
10
  static defaultProps: {
10
11
  beforeRedirect: (resolve: any) => any;
11
12
  method: string;
12
- data: {};
13
13
  };
14
- private postForm;
15
14
  componentDidMount(): void;
16
15
  render({ url, method, data }: {
17
16
  url: any;
@@ -11,17 +11,24 @@ declare class SwishElement extends QRLoaderContainer {
11
11
  qrCodeImage?: string;
12
12
  paymentData?: string;
13
13
  instructions: string;
14
+ session?: {
15
+ id: string;
16
+ data: string;
17
+ };
14
18
  onChange?: (state: any, element: import("../UIElement").UIElement<any>) => void;
15
19
  onValid?: (state: any, element: import("../UIElement").UIElement<any>) => void;
20
+ beforeSubmit?: (state: any, element: import("../UIElement").UIElement<any>, actions: any) => Promise<void>;
16
21
  onSubmit?: (state: any, element: import("../UIElement").UIElement<any>) => void;
17
22
  onComplete?: (state: any, element: import("../UIElement").UIElement<any>) => void;
18
23
  onAdditionalDetails?: (state: any, element: import("../UIElement").UIElement<any>) => void;
19
24
  onError?: (error: any, element?: import("../UIElement").UIElement<any>) => void;
20
- setStatusAutomatically?: boolean;
25
+ onPaymentCompleted?: (result: any, element: import("../UIElement").UIElement<any>) => void;
26
+ beforeRedirect?: (resolve: any, reject: any, redirectData: any, element: import("../UIElement").UIElement<any>) => void;
21
27
  name?: string;
22
28
  icon?: string;
23
29
  amount?: import("../../types").PaymentAmount;
24
30
  showPayButton?: boolean;
31
+ setStatusAutomatically?: boolean;
25
32
  payButton?: (options: any) => any;
26
33
  loadingContext?: string;
27
34
  createFromAction?: (action: import("../../types").PaymentAction, props: object) => import("../UIElement").UIElement<any>;
@@ -0,0 +1,23 @@
1
+ import RedirectElement from "../Redirect";
2
+ import { h } from "preact";
3
+ /**
4
+ * TwintElement
5
+ */
6
+ declare class TwintElement extends RedirectElement {
7
+ static type: string;
8
+ static defaultProps: {
9
+ type: string;
10
+ showPayButton: boolean;
11
+ };
12
+ /**
13
+ * Get the element displayable name
14
+ */
15
+ get displayName(): string;
16
+ payButtonLabel(): string;
17
+ /**
18
+ * Overrides RedirectElement default payButton behaviour to use label
19
+ * @param props - props
20
+ */
21
+ payButton: (props: any) => h.JSX.Element;
22
+ }
23
+ export default TwintElement;
@@ -0,0 +1 @@
1
+ export { default } from './Twint';
@@ -1,53 +1,61 @@
1
1
  import { h } from 'preact';
2
- import BaseElement, { BaseElementProps } from './BaseElement';
3
- import { PaymentAction, PaymentAmount } from '../types';
4
- export interface UIElementProps extends BaseElementProps {
5
- onChange?: (state: any, element: UIElement) => void;
6
- onValid?: (state: any, element: UIElement) => void;
7
- onSubmit?: (state: any, element: UIElement) => void;
8
- onComplete?: (state: any, element: UIElement) => void;
9
- onAdditionalDetails?: (state: any, element: UIElement) => void;
10
- onError?: (error: any, element?: UIElement) => void;
11
- /** Automatically set status through the payment flow */
12
- setStatusAutomatically?: boolean;
13
- type?: string;
14
- name?: string;
15
- icon?: string;
16
- amount?: PaymentAmount;
17
- /**
18
- * Show/Hide pay button
19
- * @defaultValue true
20
- */
21
- showPayButton?: boolean;
22
- }
2
+ import BaseElement from './BaseElement';
3
+ import { Order, PaymentAction } from '../types';
4
+ import { UIElementProps } from './types';
5
+ import AdyenCheckoutError from '../core/Errors/AdyenCheckoutError';
23
6
  export declare class UIElement<P extends UIElementProps = any> extends BaseElement<P> {
24
7
  protected componentRef: any;
25
8
  elementRef: any;
26
9
  constructor(props: P);
27
10
  setState(newState: object): void;
28
11
  onChange(): object;
12
+ onSubmit(): void;
29
13
  onValid(): {
30
14
  data: any;
31
15
  };
32
- startPayment(): Promise<any>;
33
- submit(): void;
34
16
  onComplete(state: any): void;
17
+ /**
18
+ * Submit payment method data. If the form is not valid, it will trigger validation.
19
+ */
20
+ submit(): void;
35
21
  showValidation(): this;
36
- setStatus(status: any): this;
37
- handleAction(action: PaymentAction, props?: {}): UIElement<any>;
22
+ setStatus(status: any, props?: any): this;
23
+ submitPayment(data: any): Promise<void>;
24
+ submitAdditionalDetails(data: any): Promise<void>;
25
+ protected handleError: (error: AdyenCheckoutError) => void;
26
+ protected handleAdditionalDetails: (state: any) => any;
27
+ handleAction(action: PaymentAction, props?: {}): UIElement;
28
+ protected handleOrder: (order: Order) => void;
29
+ protected handleFinalResult: (result: any) => any;
30
+ /**
31
+ * Handles a session /payments or /payments/details response.
32
+ * The component will handle automatically actions, orders, and final results.
33
+ * @param rawResponse -
34
+ */
35
+ protected handleResponse(rawResponse: any): void;
36
+ /**
37
+ * Get the current validation status of the element
38
+ */
38
39
  get isValid(): boolean;
39
40
  /**
40
41
  * Get the element icon URL for the current environment
41
42
  */
42
43
  get icon(): string;
43
44
  /**
44
- * Get the element displayable name
45
+ * Get the element's displayable name
45
46
  */
46
47
  get displayName(): string;
48
+ /**
49
+ * Get the element accessible name, used in the aria-label of the button that controls selected payment method
50
+ */
51
+ get accessibleName(): string;
47
52
  /**
48
53
  * Return the type of an element
49
54
  */
50
55
  get type(): string;
56
+ /**
57
+ * Get the payButton component for the current element
58
+ */
51
59
  payButton: (props: any) => h.JSX.Element;
52
60
  }
53
61
  export default UIElement;
@@ -11,17 +11,24 @@ declare class WeChatPayElement extends QRLoaderContainer {
11
11
  qrCodeImage?: string;
12
12
  paymentData?: string;
13
13
  instructions?: string;
14
+ session?: {
15
+ id: string;
16
+ data: string;
17
+ };
14
18
  onChange?: (state: any, element: import("../UIElement").UIElement<any>) => void;
15
19
  onValid?: (state: any, element: import("../UIElement").UIElement<any>) => void;
20
+ beforeSubmit?: (state: any, element: import("../UIElement").UIElement<any>, actions: any) => Promise<void>;
16
21
  onSubmit?: (state: any, element: import("../UIElement").UIElement<any>) => void;
17
22
  onComplete?: (state: any, element: import("../UIElement").UIElement<any>) => void;
18
23
  onAdditionalDetails?: (state: any, element: import("../UIElement").UIElement<any>) => void;
19
24
  onError?: (error: any, element?: import("../UIElement").UIElement<any>) => void;
20
- setStatusAutomatically?: boolean;
25
+ onPaymentCompleted?: (result: any, element: import("../UIElement").UIElement<any>) => void;
26
+ beforeRedirect?: (resolve: any, reject: any, redirectData: any, element: import("../UIElement").UIElement<any>) => void;
21
27
  name?: string;
22
28
  icon?: string;
23
29
  amount?: import("../../types").PaymentAmount;
24
30
  showPayButton?: boolean;
31
+ setStatusAutomatically?: boolean;
25
32
  payButton?: (options: any) => any;
26
33
  loadingContext?: string;
27
34
  createFromAction?: (action: import("../../types").PaymentAction, props: object) => import("../UIElement").UIElement<any>;
@@ -1,29 +1,29 @@
1
1
  import { h } from 'preact';
2
- import UIElement, { UIElementProps } from '../UIElement';
2
+ import UIElement from '../UIElement';
3
+ import { UIElementProps } from '../types';
3
4
  import Language from '../../language/Language';
4
- interface IssuerListProps extends UIElementProps {
5
+ import { IssuerItem } from '../internal/IssuerList/types';
6
+ interface IssuerListContainerProps extends UIElementProps {
5
7
  showImage?: boolean;
6
8
  placeholder?: string;
7
9
  issuers?: IssuerItem[];
10
+ highlightedIssuers: string[];
8
11
  i18n: Language;
9
12
  loadingContext: string;
10
13
  }
11
- interface IssuerItem {
12
- id: string;
13
- name: string;
14
- }
15
14
  interface IssuerListData {
16
15
  paymentMethod: {
17
16
  type: string;
18
17
  issuer: string;
19
18
  };
20
19
  }
21
- declare class IssuerListContainer extends UIElement<IssuerListProps> {
22
- constructor(props: IssuerListProps);
20
+ declare class IssuerListContainer extends UIElement<IssuerListContainerProps> {
21
+ constructor(props: IssuerListContainerProps);
23
22
  protected static defaultProps: {
24
23
  showImage: boolean;
25
24
  onValid: () => void;
26
25
  issuers: any[];
26
+ highlightedIssuers: any[];
27
27
  loadingContext: string;
28
28
  };
29
29
  formatProps(props: any): any;
@@ -1,6 +1,7 @@
1
1
  import { h } from 'preact';
2
- import UIElement, { UIElementProps } from '../UIElement';
3
- interface QRLoaderContainerProps extends UIElementProps {
2
+ import UIElement from '../UIElement';
3
+ import { UIElementProps } from '../types';
4
+ export interface QRLoaderContainerProps extends UIElementProps {
4
5
  /**
5
6
  * Number of miliseconds that the component will wait in between status calls
6
7
  */
@@ -17,7 +18,7 @@ interface QRLoaderContainerProps extends UIElementProps {
17
18
  paymentData?: string;
18
19
  instructions?: string;
19
20
  }
20
- declare class QRLoaderContainer extends UIElement<QRLoaderContainerProps> {
21
+ declare class QRLoaderContainer<T extends QRLoaderContainerProps = QRLoaderContainerProps> extends UIElement<T> {
21
22
  protected static defaultProps: {
22
23
  qrCodeImage: string;
23
24
  amount: any;
@@ -29,6 +30,7 @@ declare class QRLoaderContainer extends UIElement<QRLoaderContainerProps> {
29
30
  paymentMethod: any;
30
31
  };
31
32
  get isValid(): boolean;
33
+ renderQRCode(): h.JSX.Element;
32
34
  render(): h.JSX.Element;
33
35
  }
34
36
  export default QRLoaderContainer;
@@ -44,6 +44,7 @@ import BacsDD from './BacsDD';
44
44
  import Address from './Address';
45
45
  import PersonalDetails from './PersonalDetails';
46
46
  import Klarna from './Klarna';
47
+ import Twint from './Twint';
47
48
  /**
48
49
  * Maps each component with a Component element.
49
50
  */
@@ -144,6 +145,7 @@ declare const componentsMap: {
144
145
  vipps: typeof Vipps;
145
146
  swish: typeof Swish;
146
147
  affirm: typeof Affirm;
148
+ twint: typeof Twint;
147
149
  default: any;
148
150
  };
149
151
  /**
@@ -19,7 +19,7 @@ export interface AwaitComponentProps {
19
19
  shouldRedirectOnMobile?: boolean;
20
20
  classNameModifiers?: string[];
21
21
  clientKey: string;
22
- onError: (error: any, component: any) => void;
22
+ onError: (error: any) => void;
23
23
  onComplete: (status: any, component: any) => void;
24
24
  brandLogo: string;
25
25
  messageText: string;
@@ -2,6 +2,7 @@ import { Component, h } from 'preact';
2
2
  import './Field.scss';
3
3
  import { FieldProps, FieldState } from './types';
4
4
  declare class Field extends Component<FieldProps, FieldState> {
5
+ private readonly uniqueId;
5
6
  constructor(props: any);
6
7
  onFocus(e: any): void;
7
8
  onBlur(e: any): void;
@@ -12,7 +13,7 @@ declare class Field extends Component<FieldProps, FieldState> {
12
13
  filled: any;
13
14
  focused?: undefined;
14
15
  };
15
- render({ className, classNameModifiers, children, errorMessage, helper, inputWrapperModifiers, isLoading, isValid, label, dualBrandingElements, dir, showValidIcon }: {
16
+ render({ className, classNameModifiers, children, errorMessage, helper, inputWrapperModifiers, isLoading, isValid, label, dualBrandingElements, dir, name, showValidIcon }: {
16
17
  className?: string;
17
18
  classNameModifiers?: any[];
18
19
  children: any;
@@ -24,6 +25,7 @@ declare class Field extends Component<FieldProps, FieldState> {
24
25
  label: any;
25
26
  dualBrandingElements: any;
26
27
  dir: any;
28
+ name: any;
27
29
  showValidIcon: any;
28
30
  }): h.JSX.Element;
29
31
  }
@@ -18,6 +18,7 @@ export interface FieldProps {
18
18
  onFocusField?: any;
19
19
  onFieldBlur?: any;
20
20
  dir?: any;
21
+ name?: string;
21
22
  showValidIcon?: boolean;
22
23
  }
23
24
  export interface FieldState {
@@ -11,5 +11,6 @@ export interface RadioGroupProps {
11
11
  name?: string;
12
12
  onChange: (e: any) => void;
13
13
  value?: string;
14
+ uniqueId?: string;
14
15
  }
15
16
  export {};
@@ -1,7 +1,7 @@
1
1
  import { h } from 'preact';
2
2
  import { SelectProps } from './types';
3
3
  import './Select.scss';
4
- declare function Select(props: SelectProps): h.JSX.Element;
4
+ declare function Select({ items, className, classNameModifiers, filterable, readonly, onChange, selected, name, isInvalid, isValid, placeholder, uniqueId }: SelectProps): h.JSX.Element;
5
5
  declare namespace Select {
6
6
  var defaultProps: {
7
7
  className: string;
@@ -17,6 +17,7 @@ export interface SelectProps {
17
17
  placeholder: string;
18
18
  readonly: boolean;
19
19
  selected: string;
20
+ uniqueId?: string;
20
21
  }
21
22
  export interface SelectButtonProps {
22
23
  active: SelectItem;
@@ -32,6 +33,8 @@ export interface SelectButtonProps {
32
33
  showList: boolean;
33
34
  toggleButtonRef: any;
34
35
  toggleList: (e: Event) => void;
36
+ id?: string;
37
+ ariaDescribedBy: string;
35
38
  }
36
39
  export interface SelectListProps {
37
40
  active: SelectItem;
@@ -0,0 +1,4 @@
1
+ import { h } from 'preact';
2
+ import './ContentSeparator.scss';
3
+ declare function ContentSeparator(): h.JSX.Element;
4
+ export default ContentSeparator;
@@ -0,0 +1 @@
1
+ export { default } from './ContentSeparator';
@@ -0,0 +1,11 @@
1
+ import { h } from 'preact';
2
+ import './IssuerButton.scss';
3
+ interface IssuerButtonProps {
4
+ name: string;
5
+ id: string;
6
+ selected: boolean;
7
+ onClick: (event: UIEvent) => void;
8
+ icon?: string;
9
+ }
10
+ declare function IssuerButton({ name, id, icon, onClick, selected }: IssuerButtonProps): h.JSX.Element;
11
+ export default IssuerButton;
@@ -0,0 +1,10 @@
1
+ import { h } from 'preact';
2
+ import './IssuerButtonGroup.scss';
3
+ import { IssuerItem } from '../types';
4
+ interface IssuerButtonGroupProps {
5
+ items: IssuerItem[];
6
+ selectedIssuerId: string;
7
+ onChange: (event: UIEvent) => void;
8
+ }
9
+ declare const IssuerButtonGroup: ({ items, selectedIssuerId, onChange }: IssuerButtonGroupProps) => h.JSX.Element;
10
+ export default IssuerButtonGroup;
@@ -0,0 +1 @@
1
+ export { default } from './IssuerButtonGroup';
@@ -1,15 +1,10 @@
1
1
  import { h } from 'preact';
2
+ import { IssuerListProps } from './types';
2
3
  import './IssuerList.scss';
3
- declare function IssuerList({ items, placeholder, issuer, ...props }: {
4
- [x: string]: any;
5
- items: any;
6
- placeholder: any;
7
- issuer: any;
8
- }): h.JSX.Element;
4
+ declare function IssuerList({ items, placeholder, issuer, highlightedIds, ...props }: IssuerListProps): h.JSX.Element;
9
5
  declare namespace IssuerList {
10
6
  var defaultProps: {
11
7
  onChange: () => void;
12
- placeholder: string;
13
8
  };
14
9
  }
15
10
  export default IssuerList;
@@ -0,0 +1,16 @@
1
+ import { PayButtonProps } from '../PayButton/PayButton';
2
+ import { ComponentChildren } from 'preact';
3
+ export interface IssuerListProps {
4
+ items: IssuerItem[];
5
+ showPayButton: boolean;
6
+ payButton(props: Partial<PayButtonProps>): ComponentChildren;
7
+ onChange(payload: any): void;
8
+ highlightedIds?: string[];
9
+ placeholder?: string;
10
+ issuer?: string;
11
+ }
12
+ export interface IssuerItem {
13
+ id: string;
14
+ name: string;
15
+ icon?: string;
16
+ }
@@ -1,6 +1,7 @@
1
1
  import { h } from 'preact';
2
2
  import { PaymentAmount } from '../../../types';
3
- interface PayButtonProps {
3
+ import Language from '../../../language/Language';
4
+ export interface PayButtonProps {
4
5
  /**
5
6
  * Class name modifiers will be used as: `adyen-checkout__image--${modifier}`
6
7
  */
@@ -9,5 +10,7 @@ interface PayButtonProps {
9
10
  amount: PaymentAmount;
10
11
  status?: string;
11
12
  }
13
+ declare const payAmountLabel: (i18n: Language, amount: any) => string;
12
14
  declare const PayButton: ({ amount, classNameModifiers, label, ...props }: PayButtonProps) => h.JSX.Element;
13
15
  export default PayButton;
16
+ export { payAmountLabel };
@@ -1 +1 @@
1
- export { default } from './PayButton';
1
+ export { default, payAmountLabel } from './PayButton';
@@ -19,12 +19,12 @@ declare class QRLoader extends Component<QRLoaderProps, QRLoaderState> {
19
19
  redirectToApp: (url: any, fallback?: () => void) => void;
20
20
  componentDidUpdate(prevProps: any, prevState: any): void;
21
21
  componentWillUnmount(): void;
22
- onTick(time: any): void;
23
- onTimeUp(): void;
24
- onComplete(status: any): any;
25
- onError(status: any): any;
26
- checkStatus(): Promise<any>;
27
- render({ amount, url, brandLogo, countdownTime, i18n, loadingContext, type }: QRLoaderProps, { expired, completed, loading }: {
22
+ private onTick;
23
+ private onTimeUp;
24
+ private onComplete;
25
+ private onError;
26
+ private checkStatus;
27
+ render({ amount, url, brandLogo, countdownTime, type }: QRLoaderProps, { expired, completed, loading }: {
28
28
  expired: any;
29
29
  completed: any;
30
30
  loading: any;
@@ -29,7 +29,6 @@ export interface QRLoaderState {
29
29
  delay: any;
30
30
  expired: boolean;
31
31
  loading: boolean;
32
- onError: (error: any) => void;
33
32
  percentage: number;
34
33
  timePassed: number;
35
34
  }
@@ -10,7 +10,7 @@ export declare const ENCRYPTED_PIN_FIELD = "encryptedPin";
10
10
  export declare const GIFT_CARD = "giftcard";
11
11
  export declare const ENCRYPTED_BANK_ACCNT_NUMBER_FIELD = "encryptedBankAccountNumber";
12
12
  export declare const ENCRYPTED_BANK_LOCATION_FIELD = "encryptedBankLocationId";
13
- export declare const SF_VERSION = "3.5.3";
13
+ export declare const SF_VERSION = "3.5.4";
14
14
  export declare const DEFAULT_CARD_GROUP_TYPES: string[];
15
15
  export declare const NON_CREDIT_CARD_TYPE_SECURED_FIELDS: string[];
16
16
  export declare const CSF_FIELDS_ARRAY: string[];
@@ -19,3 +19,6 @@ export declare const CVC_POLICY_OPTIONAL = "optional";
19
19
  export declare const CVC_POLICY_HIDDEN = "hidden";
20
20
  export declare const DATE_POLICY_REQUIRED = "required";
21
21
  export declare const DATE_POLICY_HIDDEN = "hidden";
22
+ export declare const DATA_ENCRYPTED_FIELD_ATTR = "data-cse";
23
+ export declare const DATA_INFO = "data-info";
24
+ export declare const DATA_UID = "data-uid";
@@ -21,6 +21,8 @@ export interface SFInternalConfig {
21
21
  cvcPolicy: CVCPolicyType;
22
22
  legacyInputMode: boolean;
23
23
  minimumExpiryDate: string;
24
+ uid: string;
25
+ implementationType: string;
24
26
  }
25
27
  /**
26
28
  * The object passed from createSecuredFields to a new instance of SecuredField.ts
@@ -41,6 +41,7 @@ interface CSFCommonProps {
41
41
  iframeUIConfig?: object;
42
42
  legacyInputMode?: boolean;
43
43
  minimumExpiryDate?: string;
44
+ implementationType?: string;
44
45
  }
45
46
  /**
46
47
  * Object sent when SecuredFieldsProvider initialises CSF
@@ -0,0 +1,2 @@
1
+ import { h } from 'preact';
2
+ export declare function BrazilPersonalDetail(props: any): h.JSX.Element;