@adyen/adyen-web 5.43.1 → 5.44.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 (48) hide show
  1. package/README.md +1 -1
  2. package/dist/adyen.css +1 -0
  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 +1 -0
  7. package/dist/cjs/adyen.css.map +1 -1
  8. package/dist/cjs/index.js +1 -1
  9. package/dist/es/adyen.css +1 -0
  10. package/dist/es/adyen.css.map +1 -1
  11. package/dist/es/index.js +1 -1
  12. package/dist/es.modern/adyen.css +1 -0
  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/Ach.d.ts +1 -1
  16. package/dist/types/components/BcmcMobile/BcmcMobile.d.ts +1 -1
  17. package/dist/types/components/Card/Bancontact.d.ts +1 -1
  18. package/dist/types/components/Card/Card.d.ts +1 -1
  19. package/dist/types/components/CashAppPay/CashAppPay.d.ts +80 -0
  20. package/dist/types/components/CashAppPay/components/CashAppComponent.d.ts +16 -0
  21. package/dist/types/components/CashAppPay/defaultProps.d.ts +7 -0
  22. package/dist/types/components/CashAppPay/index.d.ts +1 -0
  23. package/dist/types/components/CashAppPay/services/CashAppSdkLoader.d.ts +9 -0
  24. package/dist/types/components/CashAppPay/services/CashAppService.d.ts +21 -0
  25. package/dist/types/components/CashAppPay/services/config.d.ts +3 -0
  26. package/dist/types/components/CashAppPay/services/types.d.ts +49 -0
  27. package/dist/types/components/CashAppPay/types.d.ts +60 -0
  28. package/dist/types/components/ClickToPay/ClickToPay.d.ts +1 -1
  29. package/dist/types/components/Dragonpay/Dragonpay.d.ts +1 -1
  30. package/dist/types/components/Dropin/Dropin.d.ts +1 -1
  31. package/dist/types/components/DuitNow/DuitNow.d.ts +1 -1
  32. package/dist/types/components/PayNow/PayNow.d.ts +1 -1
  33. package/dist/types/components/PromptPay/PromptPay.d.ts +1 -1
  34. package/dist/types/components/Swish/Swish.d.ts +1 -1
  35. package/dist/types/components/WeChat/WeChat.d.ts +1 -1
  36. package/dist/types/components/index.d.ts +2 -0
  37. package/dist/types/components/internal/Countdown/CountdownA11yReporter.d.ts +25 -0
  38. package/dist/types/components/internal/Countdown/index.d.ts +3 -29
  39. package/dist/types/components/internal/Countdown/types.d.ts +9 -0
  40. package/dist/types/components/internal/Countdown/useCountdownA11yReporter.d.ts +2 -0
  41. package/dist/types/components/internal/RedirectButton/RedirectButton.d.ts +3 -1
  42. package/dist/types/components/types.d.ts +1 -1
  43. package/dist/types/core/Errors/SRPanel.d.ts +3 -7
  44. package/dist/types/core/Errors/types.d.ts +6 -0
  45. package/dist/types/language/config.d.ts +1 -0
  46. package/dist/types/language/locales/index.d.ts +2 -0
  47. package/dist/types/language/utils.d.ts +1 -1
  48. package/package.json +2 -2
@@ -9,7 +9,6 @@ export declare class AchElement extends UIElement<AchElementProps> {
9
9
  hasHolderName?: boolean;
10
10
  enableStoreDetails: boolean;
11
11
  bankAccountNumber: string;
12
- environment?: string;
13
12
  session?: import("../../core/CheckoutSession/CheckoutSession").default;
14
13
  onChange?: (state: any, element: UIElement<any>) => void;
15
14
  onValid?: (state: any, element: UIElement<any>) => void;
@@ -22,6 +21,7 @@ export declare class AchElement extends UIElement<AchElementProps> {
22
21
  onPaymentCompleted?: (result: any, element: UIElement<any>) => void;
23
22
  beforeRedirect?: (resolve: any, reject: any, redirectData: any, element: UIElement<any>) => void;
24
23
  isInstantPayment?: boolean;
24
+ environment?: string;
25
25
  type?: string;
26
26
  name?: string;
27
27
  icon?: string;
@@ -12,7 +12,6 @@ declare class BCMCMobileElement extends QRLoaderContainer {
12
12
  introduction: string;
13
13
  instructions?: string;
14
14
  copyBtn?: boolean;
15
- environment?: string;
16
15
  session?: import("../../core/CheckoutSession/CheckoutSession").default;
17
16
  onChange?: (state: any, element: import("../UIElement").UIElement<any>) => void;
18
17
  onValid?: (state: any, element: import("../UIElement").UIElement<any>) => void;
@@ -25,6 +24,7 @@ declare class BCMCMobileElement extends QRLoaderContainer {
25
24
  onPaymentCompleted?: (result: any, element: import("../UIElement").UIElement<any>) => void;
26
25
  beforeRedirect?: (resolve: any, reject: any, redirectData: any, element: import("../UIElement").UIElement<any>) => void;
27
26
  isInstantPayment?: boolean;
27
+ environment?: string;
28
28
  name?: string;
29
29
  icon?: string;
30
30
  amount?: import("../../types").PaymentAmount;
@@ -67,7 +67,6 @@ declare class BancontactElement extends CardElement {
67
67
  onFocus?: (event: import("../internal/SecuredFields/lib/types").CbObjOnFocus) => void;
68
68
  onBinValue?: (event: import("../internal/SecuredFields/lib/types").CbObjOnBinValue) => void;
69
69
  onBinLookup?: (event: import("../internal/SecuredFields/lib/types").CbObjOnBinLookup) => void;
70
- environment?: string;
71
70
  session?: import("../../core/CheckoutSession/CheckoutSession").default;
72
71
  onChange?: (state: any, element: import("../UIElement").UIElement<any>) => void;
73
72
  onValid?: (state: any, element: import("../UIElement").UIElement<any>) => void;
@@ -79,6 +78,7 @@ declare class BancontactElement extends CardElement {
79
78
  onPaymentCompleted?: (result: any, element: import("../UIElement").UIElement<any>) => void;
80
79
  beforeRedirect?: (resolve: any, reject: any, redirectData: any, element: import("../UIElement").UIElement<any>) => void;
81
80
  isInstantPayment?: boolean;
81
+ environment?: string;
82
82
  name?: string;
83
83
  amount?: import("../../types").PaymentAmount;
84
84
  secondaryAmount?: import("../../types").PaymentAmountExtended;
@@ -76,7 +76,6 @@ export declare class CardElement extends UIElement<CardElementProps> {
76
76
  onFocus?: (event: import("../internal/SecuredFields/lib/types").CbObjOnFocus) => void;
77
77
  onBinValue?: (event: import("../internal/SecuredFields/lib/types").CbObjOnBinValue) => void;
78
78
  onBinLookup?: (event: CbObjOnBinLookup) => void;
79
- environment?: string;
80
79
  session?: import("../../core/CheckoutSession/CheckoutSession").default;
81
80
  onChange?: (state: any, element: UIElement<any>) => void;
82
81
  onValid?: (state: any, element: UIElement<any>) => void;
@@ -88,6 +87,7 @@ export declare class CardElement extends UIElement<CardElementProps> {
88
87
  onPaymentCompleted?: (result: any, element: UIElement<any>) => void;
89
88
  beforeRedirect?: (resolve: any, reject: any, redirectData: any, element: UIElement<any>) => void;
90
89
  isInstantPayment?: boolean;
90
+ environment?: string;
91
91
  name?: string;
92
92
  amount?: import("../../types").PaymentAmount;
93
93
  secondaryAmount?: import("../../types").PaymentAmountExtended;
@@ -0,0 +1,80 @@
1
+ import { h } from 'preact';
2
+ import UIElement from '../UIElement';
3
+ import { CashAppPayElementData, CashAppPayElementProps } from './types';
4
+ export declare class CashAppPay extends UIElement<CashAppPayElementProps> {
5
+ static type: string;
6
+ private readonly cashAppService;
7
+ protected static defaultProps: {
8
+ onClick: (actions: any) => void;
9
+ showPayButton: boolean;
10
+ enableStoreDetails: boolean;
11
+ storePaymentMethod: boolean;
12
+ };
13
+ constructor(props: any);
14
+ formatProps(props: CashAppPayElementProps): {
15
+ enableStoreDetails: boolean;
16
+ storePaymentMethod?: boolean;
17
+ onClick?(actions: {
18
+ resolve: () => void;
19
+ reject: () => void;
20
+ }): void;
21
+ referenceId?: string;
22
+ redirectURL?: string;
23
+ button?: {
24
+ shape?: "round" | "semiround";
25
+ size?: "small" | "medium";
26
+ theme?: "dark" | "light";
27
+ width?: "full" | "static";
28
+ };
29
+ configuration?: {
30
+ clientId: string;
31
+ scopeId: string;
32
+ };
33
+ storedPaymentMethodId?: string;
34
+ cashtag?: string;
35
+ session?: import("../../core/CheckoutSession/CheckoutSession").default;
36
+ onChange?: (state: any, element: UIElement<any>) => void;
37
+ onValid?: (state: any, element: UIElement<any>) => void;
38
+ beforeSubmit?: (state: any, element: UIElement<any>, actions: any) => Promise<void>;
39
+ onSubmit?: (state: any, element: UIElement<any>) => void;
40
+ onComplete?: (state: any, element: UIElement<any>) => void;
41
+ onActionHandled?: (rtnObj: import("../types").ActionHandledReturnObject) => void;
42
+ onAdditionalDetails?: (state: any, element: UIElement<any>) => void;
43
+ onError?: (error: any, element?: UIElement<any>) => void;
44
+ onPaymentCompleted?: (result: any, element: UIElement<any>) => void;
45
+ beforeRedirect?: (resolve: any, reject: any, redirectData: any, element: UIElement<any>) => void;
46
+ isInstantPayment?: boolean;
47
+ environment?: string;
48
+ type?: string;
49
+ name?: string;
50
+ icon?: string;
51
+ amount?: import("../../types").PaymentAmount;
52
+ secondaryAmount?: import("../../types").PaymentAmountExtended;
53
+ showPayButton?: boolean;
54
+ setStatusAutomatically?: boolean;
55
+ payButton?: (options: import("../types").PayButtonFunctionProps) => h.JSX.Element;
56
+ loadingContext?: string;
57
+ createFromAction?: (action: import("../../types").PaymentAction, props: object) => UIElement<any>;
58
+ clientKey?: string;
59
+ elementRef?: any;
60
+ i18n?: import("../../language").default;
61
+ _parentInstance?: import("../../core/core").default;
62
+ order?: import("../../types").Order;
63
+ modules?: {
64
+ srPanel?: import("../../core/Errors/SRPanel").SRPanel;
65
+ analytics?: import("../../core/Analytics/Analytics").default;
66
+ resources?: import("../../core/Context/Resources").Resources;
67
+ risk?: import("../../core/RiskModule").default;
68
+ };
69
+ isDropin?: boolean;
70
+ };
71
+ formatData(): CashAppPayElementData;
72
+ get displayName(): string;
73
+ get additionalInfo(): "" | "Cash App Pay";
74
+ submit: () => void;
75
+ get isValid(): boolean;
76
+ private handleOnChangeStoreDetails;
77
+ private handleAuthorize;
78
+ render(): h.JSX.Element;
79
+ }
80
+ export default CashAppPay;
@@ -0,0 +1,16 @@
1
+ import { h, RefObject } from 'preact';
2
+ import AdyenCheckoutError from '../../../core/Errors/AdyenCheckoutError';
3
+ import { ICashAppService } from '../services/types';
4
+ import { CashAppPayEventData } from '../types';
5
+ import './CashAppComponent.scss';
6
+ interface CashAppComponentProps {
7
+ enableStoreDetails?: boolean;
8
+ cashAppService: ICashAppService;
9
+ onClick(): void;
10
+ onChangeStoreDetails(data: any): void;
11
+ onAuthorize(payEventData: CashAppPayEventData): void;
12
+ onError(error: AdyenCheckoutError): void;
13
+ ref(ref: RefObject<typeof CashAppComponent>): void;
14
+ }
15
+ export declare function CashAppComponent({ enableStoreDetails, cashAppService, onClick, onChangeStoreDetails, onAuthorize, onError }: CashAppComponentProps): h.JSX.Element;
16
+ export {};
@@ -0,0 +1,7 @@
1
+ declare const _default: {
2
+ onClick: (actions: any) => void;
3
+ showPayButton: boolean;
4
+ enableStoreDetails: boolean;
5
+ storePaymentMethod: boolean;
6
+ };
7
+ export default _default;
@@ -0,0 +1 @@
1
+ export { default } from './CashAppPay';
@@ -0,0 +1,9 @@
1
+ import { ICashAppWindowObject } from './types';
2
+ export interface ICashAppSdkLoader {
3
+ load(environment: string): Promise<ICashAppWindowObject>;
4
+ }
5
+ declare class CashAppSdkLoader implements ICashAppSdkLoader {
6
+ private isSdkIsAvailableOnWindow;
7
+ load(environment: string): Promise<ICashAppWindowObject>;
8
+ }
9
+ export { CashAppSdkLoader };
@@ -0,0 +1,21 @@
1
+ import { ICashAppSdkLoader } from './CashAppSdkLoader';
2
+ import { CashAppPayEvents, CashAppServiceConfig, ICashAppService } from './types';
3
+ export default class CashAppService implements ICashAppService {
4
+ private readonly sdkLoader;
5
+ private readonly configuration;
6
+ private pay;
7
+ /**
8
+ * Reference to CashApp 'begin' method
9
+ */
10
+ private startAuthorization?;
11
+ constructor(sdkLoader: ICashAppSdkLoader, configuration: CashAppServiceConfig);
12
+ get hasOneTimePayment(): boolean;
13
+ get hasOnFilePayment(): boolean;
14
+ setStorePaymentMethod(store: boolean): void;
15
+ initialize(): Promise<void>;
16
+ renderButton(target: HTMLElement): Promise<void>;
17
+ begin(): void;
18
+ subscribeToEvent(eventType: CashAppPayEvents, callback: Function): Function;
19
+ createCustomerRequest(): Promise<void>;
20
+ restart(): Promise<void>;
21
+ }
@@ -0,0 +1,3 @@
1
+ declare const CASHAPPPAY_SANDBOX_SDK = "https://sandbox.kit.cash.app/v1/pay.js";
2
+ declare const CASHAPPPAY_PROD_SDK = "https://kit.cash.app/v1/pay.js";
3
+ export { CASHAPPPAY_SANDBOX_SDK, CASHAPPPAY_PROD_SDK };
@@ -0,0 +1,49 @@
1
+ import { PaymentAmount } from '../../../types';
2
+ export interface ICashAppWindowObject {
3
+ pay({ clientId }: {
4
+ clientId: string;
5
+ }): Promise<ICashAppSDK>;
6
+ }
7
+ /**
8
+ * https://developers.cash.app/docs/api/technical-documentation/sdks/pay-kit/technical-reference
9
+ */
10
+ export interface ICashAppSDK {
11
+ render(target: string | HTMLElement, options?: any): Promise<{
12
+ begin?: () => void;
13
+ }>;
14
+ addEventListener(eventType: CashAppPayEvents, callback: Function): void;
15
+ removeEventListener(eventType: CashAppPayEvents, callback: Function): void;
16
+ customerRequest(customerRequest: any): Promise<void>;
17
+ restart(): Promise<void>;
18
+ }
19
+ export declare enum CashAppPayEvents {
20
+ CustomerDismissed = "CUSTOMER_DISMISSED",
21
+ CustomerRequestApproved = "CUSTOMER_REQUEST_APPROVED",
22
+ CustomerRequestDeclined = "CUSTOMER_REQUEST_DECLINED",
23
+ CustomerRequestFailed = "CUSTOMER_REQUEST_FAILED"
24
+ }
25
+ export interface ICashAppService {
26
+ begin(): void;
27
+ initialize(): Promise<void>;
28
+ setStorePaymentMethod(store: boolean): void;
29
+ renderButton(target: HTMLElement): Promise<void>;
30
+ restart(): Promise<void>;
31
+ createCustomerRequest(): Promise<void>;
32
+ subscribeToEvent(eventType: CashAppPayEvents, callback: Function): Function;
33
+ }
34
+ export type CashAppServiceConfig = {
35
+ useCashAppButtonUi: boolean;
36
+ storePaymentMethod: boolean;
37
+ environment: string;
38
+ clientId: string;
39
+ scopeId: string;
40
+ amount: PaymentAmount;
41
+ referenceId?: string;
42
+ redirectURL?: string;
43
+ button?: {
44
+ shape?: 'semiround' | 'round';
45
+ size?: 'medium' | 'small';
46
+ theme?: 'dark' | 'light';
47
+ width?: 'static' | 'full';
48
+ };
49
+ };
@@ -0,0 +1,60 @@
1
+ import { UIElementProps } from '../types';
2
+ export interface CashAppPayElementProps extends UIElementProps {
3
+ /**
4
+ * Indicates that the payment must be stored (Ex: in case there is no checkbox but merchant wants to store it)
5
+ */
6
+ storePaymentMethod?: boolean;
7
+ /**
8
+ * Enables storing the payment method using the Checkbox
9
+ */
10
+ enableStoreDetails?: boolean;
11
+ /**
12
+ * Callback triggered before starting the CashAppPay flow. Use case: Validate customer data, check product availability
13
+ */
14
+ onClick?(actions: {
15
+ resolve: () => void;
16
+ reject: () => void;
17
+ }): void;
18
+ /**
19
+ * A reference to your system (for example, a cart or checkout identifier). Maximum length 1024 characters.
20
+ * https://developers.cash.app/docs/api/technical-documentation/sdks/pay-kit/technical-reference#parameters-3
21
+ */
22
+ referenceId?: string;
23
+ /**
24
+ * The destination for the customer after approving (or declining) in Cash App for mobile redirect flow.
25
+ * https://developers.cash.app/docs/api/technical-documentation/sdks/pay-kit/technical-reference#customerrequest
26
+ * @defaultValue window.location.ref
27
+ */
28
+ redirectURL?: string;
29
+ /**
30
+ * Button customization
31
+ * https://developers.cash.app/docs/api/technical-documentation/sdks/pay-kit/use-cases#customize-the-cash-app-pay-button
32
+ */
33
+ button?: {
34
+ shape?: 'semiround' | 'round';
35
+ size?: 'medium' | 'small';
36
+ theme?: 'dark' | 'light';
37
+ width?: 'static' | 'full';
38
+ };
39
+ /**
40
+ * CashAppPay configuration sent by the /paymentMethods response
41
+ */
42
+ configuration?: {
43
+ clientId: string;
44
+ scopeId: string;
45
+ };
46
+ }
47
+ export type CashAppPayElementData = {
48
+ paymentMethod: {
49
+ type: string;
50
+ grantId?: string;
51
+ storedPaymentMethodId?: string;
52
+ };
53
+ storePaymentMethod?: boolean;
54
+ };
55
+ export type CashAppPayEventData = {
56
+ cashTag?: string;
57
+ customerId?: string;
58
+ grantId?: string;
59
+ onFileGrantId?: string;
60
+ };
@@ -14,7 +14,6 @@ export declare class ClickToPayElement extends UIElement<ClickToPayElementProps>
14
14
  shopperEmail: any;
15
15
  telephoneNumber: any;
16
16
  locale: string;
17
- environment?: string;
18
17
  session?: import("../../core/CheckoutSession/CheckoutSession").default;
19
18
  onChange?: (state: any, element: UIElement<any>) => void;
20
19
  onValid?: (state: any, element: UIElement<any>) => void;
@@ -27,6 +26,7 @@ export declare class ClickToPayElement extends UIElement<ClickToPayElementProps>
27
26
  onPaymentCompleted?: (result: any, element: UIElement<any>) => void;
28
27
  beforeRedirect?: (resolve: any, reject: any, redirectData: any, element: UIElement<any>) => void;
29
28
  isInstantPayment?: boolean;
29
+ environment?: string;
30
30
  type?: string;
31
31
  name?: string;
32
32
  icon?: string;
@@ -21,7 +21,6 @@ export declare class DragonpayElement extends UIElement<DragonpayElementProps> {
21
21
  loadingContext?: string;
22
22
  reference?: string;
23
23
  i18n?: import("../../language").default;
24
- environment?: string;
25
24
  session?: import("../../core/CheckoutSession/CheckoutSession").default;
26
25
  onChange?: (state: any, element: UIElement<any>) => void;
27
26
  onValid?: (state: any, element: UIElement<any>) => void;
@@ -34,6 +33,7 @@ export declare class DragonpayElement extends UIElement<DragonpayElementProps> {
34
33
  onPaymentCompleted?: (result: any, element: UIElement<any>) => void;
35
34
  beforeRedirect?: (resolve: any, reject: any, redirectData: any, element: UIElement<any>) => void;
36
35
  isInstantPayment?: boolean;
36
+ environment?: string;
37
37
  name?: string;
38
38
  icon?: string;
39
39
  amount?: import("../../types").PaymentAmount;
@@ -49,7 +49,6 @@ declare class DropinElement extends UIElement<DropinElementProps> {
49
49
  /**
50
50
  * Calls the onSubmit event with the state of the activePaymentMethod
51
51
  */
52
- environment?: string;
53
52
  session?: import("../../core/CheckoutSession/CheckoutSession").default;
54
53
  onChange?: (state: any, element: UIElement<any>) => void;
55
54
  onValid?: (state: any, element: UIElement<any>) => void;
@@ -61,6 +60,7 @@ declare class DropinElement extends UIElement<DropinElementProps> {
61
60
  onPaymentCompleted?: (result: any, element: UIElement<any>) => void;
62
61
  beforeRedirect?: (resolve: any, reject: any, redirectData: any, element: UIElement<any>) => void;
63
62
  isInstantPayment?: boolean;
63
+ environment?: string;
64
64
  type?: string;
65
65
  name?: string;
66
66
  icon?: string;
@@ -12,7 +12,6 @@ declare class DuitNowElement extends QRLoaderContainer {
12
12
  introduction: string;
13
13
  instructions?: string;
14
14
  copyBtn?: boolean;
15
- environment?: string;
16
15
  session?: import("../../core/CheckoutSession/CheckoutSession").default;
17
16
  onChange?: (state: any, element: import("../UIElement").UIElement<any>) => void;
18
17
  onValid?: (state: any, element: import("../UIElement").UIElement<any>) => void;
@@ -25,6 +24,7 @@ declare class DuitNowElement extends QRLoaderContainer {
25
24
  onPaymentCompleted?: (result: any, element: import("../UIElement").UIElement<any>) => void;
26
25
  beforeRedirect?: (resolve: any, reject: any, redirectData: any, element: import("../UIElement").UIElement<any>) => void;
27
26
  isInstantPayment?: boolean;
27
+ environment?: string;
28
28
  name?: string;
29
29
  icon?: string;
30
30
  amount?: import("../../types").PaymentAmount;
@@ -12,7 +12,6 @@ declare class PayNowElement extends QRLoaderContainer {
12
12
  introduction: string;
13
13
  instructions?: string;
14
14
  copyBtn?: boolean;
15
- environment?: string;
16
15
  session?: import("../../core/CheckoutSession/CheckoutSession").default;
17
16
  onChange?: (state: any, element: import("../UIElement").UIElement<any>) => void;
18
17
  onValid?: (state: any, element: import("../UIElement").UIElement<any>) => void;
@@ -25,6 +24,7 @@ declare class PayNowElement extends QRLoaderContainer {
25
24
  onPaymentCompleted?: (result: any, element: import("../UIElement").UIElement<any>) => void;
26
25
  beforeRedirect?: (resolve: any, reject: any, redirectData: any, element: import("../UIElement").UIElement<any>) => void;
27
26
  isInstantPayment?: boolean;
27
+ environment?: string;
28
28
  name?: string;
29
29
  icon?: string;
30
30
  amount?: import("../../types").PaymentAmount;
@@ -12,7 +12,6 @@ declare class PromptPayElement extends QRLoaderContainer {
12
12
  introduction: string;
13
13
  instructions?: string;
14
14
  copyBtn?: boolean;
15
- environment?: string;
16
15
  session?: import("../../core/CheckoutSession/CheckoutSession").default;
17
16
  onChange?: (state: any, element: import("../UIElement").UIElement<any>) => void;
18
17
  onValid?: (state: any, element: import("../UIElement").UIElement<any>) => void;
@@ -25,6 +24,7 @@ declare class PromptPayElement extends QRLoaderContainer {
25
24
  onPaymentCompleted?: (result: any, element: import("../UIElement").UIElement<any>) => void;
26
25
  beforeRedirect?: (resolve: any, reject: any, redirectData: any, element: import("../UIElement").UIElement<any>) => void;
27
26
  isInstantPayment?: boolean;
27
+ environment?: string;
28
28
  name?: string;
29
29
  icon?: string;
30
30
  amount?: import("../../types").PaymentAmount;
@@ -12,7 +12,6 @@ declare class SwishElement extends QRLoaderContainer {
12
12
  introduction: string;
13
13
  instructions: string;
14
14
  copyBtn?: boolean;
15
- environment?: string;
16
15
  session?: import("../../core/CheckoutSession/CheckoutSession").default;
17
16
  onChange?: (state: any, element: import("../UIElement").UIElement<any>) => void;
18
17
  onValid?: (state: any, element: import("../UIElement").UIElement<any>) => void;
@@ -25,6 +24,7 @@ declare class SwishElement extends QRLoaderContainer {
25
24
  onPaymentCompleted?: (result: any, element: import("../UIElement").UIElement<any>) => void;
26
25
  beforeRedirect?: (resolve: any, reject: any, redirectData: any, element: import("../UIElement").UIElement<any>) => void;
27
26
  isInstantPayment?: boolean;
27
+ environment?: string;
28
28
  name?: string;
29
29
  icon?: string;
30
30
  amount?: import("../../types").PaymentAmount;
@@ -12,7 +12,6 @@ declare class WeChatPayElement extends QRLoaderContainer {
12
12
  introduction: string;
13
13
  instructions?: string;
14
14
  copyBtn?: boolean;
15
- environment?: string;
16
15
  session?: import("../../core/CheckoutSession/CheckoutSession").default;
17
16
  onChange?: (state: any, element: import("../UIElement").UIElement<any>) => void;
18
17
  onValid?: (state: any, element: import("../UIElement").UIElement<any>) => void;
@@ -25,6 +24,7 @@ declare class WeChatPayElement extends QRLoaderContainer {
25
24
  onPaymentCompleted?: (result: any, element: import("../UIElement").UIElement<any>) => void;
26
25
  beforeRedirect?: (resolve: any, reject: any, redirectData: any, element: import("../UIElement").UIElement<any>) => void;
27
26
  isInstantPayment?: boolean;
27
+ environment?: string;
28
28
  name?: string;
29
29
  icon?: string;
30
30
  amount?: import("../../types").PaymentAmount;
@@ -4,6 +4,7 @@ import ApplePay from './ApplePay';
4
4
  import Atome from './Atome';
5
5
  import { BillDeskOnline, BillDeskWallet } from './BillDesk';
6
6
  import Card from './Card';
7
+ import CashAppPay from './CashAppPay';
7
8
  import ClickToPay from './ClickToPay';
8
9
  import Bancontact from './Card/Bancontact';
9
10
  import Donation from './Donation';
@@ -108,6 +109,7 @@ declare const componentsMap: {
108
109
  /** Wallets */
109
110
  amazonpay: typeof AmazonPay;
110
111
  applepay: typeof ApplePay;
112
+ cashapp: typeof CashAppPay;
111
113
  clicktopay: typeof ClickToPay;
112
114
  googlepay: typeof GooglePay;
113
115
  paypal: typeof PayPal;
@@ -0,0 +1,25 @@
1
+ import { SRPanel } from '../../../core/Errors/SRPanel';
2
+ import Language from '../../../language';
3
+ import { CountdownTime } from './types';
4
+ interface ICountdownA11yService {
5
+ srPanel: SRPanel;
6
+ i18n: Language;
7
+ }
8
+ export declare class CountdownA11yReporter {
9
+ protected TRANSLATION_KEY: string;
10
+ protected LONG_TIMEOUT: number;
11
+ protected MID_TIMEOUT: number;
12
+ protected SHORT_TIMEOUT: number;
13
+ private readonly srPanel;
14
+ private readonly i18n;
15
+ private srInterval;
16
+ private timeout;
17
+ private timeLeft;
18
+ constructor(props: ICountdownA11yService);
19
+ update(time: CountdownTime): void;
20
+ tearDown(): void;
21
+ private setInterval;
22
+ private getSrMessages;
23
+ private clearInterval;
24
+ }
25
+ export {};
@@ -1,30 +1,4 @@
1
- import { Component, h } from 'preact';
2
- interface CountdownProps {
3
- minutesFromNow: number;
4
- onTick?: (time: any) => void;
5
- onCompleted?: () => void;
6
- }
7
- interface CountdownState {
8
- startTime: Date;
9
- endTime: Date;
10
- minutes: string;
11
- seconds: string;
12
- }
13
- declare class Countdown extends Component<CountdownProps, CountdownState> {
14
- constructor(props: any);
15
- static defaultProps: {
16
- onTick: () => void;
17
- onCompleted: () => void;
18
- };
19
- protected interval: any;
20
- tick(): void | {
21
- minutes: any;
22
- seconds: any;
23
- percentage: number;
24
- };
25
- clearInterval(): void;
26
- componentDidMount(): void;
27
- componentWillUnmount(): void;
28
- render(): h.JSX.Element;
29
- }
1
+ import { h } from 'preact';
2
+ import { CountdownProps } from './types';
3
+ declare function Countdown({ minutesFromNow, onTick, onCompleted }: CountdownProps): h.JSX.Element;
30
4
  export default Countdown;
@@ -0,0 +1,9 @@
1
+ export interface CountdownProps {
2
+ minutesFromNow: number;
3
+ onTick?: (time: any) => void;
4
+ onCompleted?: () => void;
5
+ }
6
+ export interface CountdownTime {
7
+ minutes: string | number;
8
+ seconds: string | number;
9
+ }
@@ -0,0 +1,2 @@
1
+ import { CountdownTime } from './types';
2
+ export declare const useCountdownA11yReporter: (time: CountdownTime) => void;
@@ -1,6 +1,8 @@
1
1
  import { h } from 'preact';
2
- declare function RedirectButton({ payButton, onSubmit, amount, name, ...props }: {
2
+ declare function RedirectButton({ label, icon, payButton, onSubmit, amount, name, ...props }: {
3
3
  [x: string]: any;
4
+ label?: any;
5
+ icon?: any;
4
6
  payButton: any;
5
7
  onSubmit: any;
6
8
  amount?: any;
@@ -89,7 +89,6 @@ export interface ActionHandledReturnObject {
89
89
  actionDescription: ActionDescriptionType;
90
90
  }
91
91
  export interface UIElementProps extends BaseElementProps {
92
- environment?: string;
93
92
  session?: Session;
94
93
  onChange?: (state: any, element: UIElement) => void;
95
94
  onValid?: (state: any, element: UIElement) => void;
@@ -102,6 +101,7 @@ export interface UIElementProps extends BaseElementProps {
102
101
  onPaymentCompleted?: (result: any, element: UIElement) => void;
103
102
  beforeRedirect?: (resolve: any, reject: any, redirectData: any, element: UIElement) => void;
104
103
  isInstantPayment?: boolean;
104
+ environment?: string;
105
105
  type?: string;
106
106
  name?: string;
107
107
  icon?: string;
@@ -1,6 +1,6 @@
1
1
  import { h } from 'preact';
2
2
  import './SRPanel.scss';
3
- import { SRPanelProps } from './types';
3
+ import { AriaAttributes, SRPanelProps } from './types';
4
4
  import BaseElement from '../../components/BaseElement';
5
5
  /**
6
6
  * A panel meant to hold messages that will be read out by ScreenReaders on an aria-live="polite" basis
@@ -9,12 +9,7 @@ import BaseElement from '../../components/BaseElement';
9
9
  */
10
10
  export declare class SRPanel extends BaseElement<SRPanelProps> {
11
11
  static type: string;
12
- static defaultProps: {
13
- enabled: boolean;
14
- node: string;
15
- showPanel: boolean;
16
- id: string;
17
- };
12
+ static defaultProps: SRPanelProps;
18
13
  private readonly srPanelContainer;
19
14
  private readonly id;
20
15
  private readonly showPanel;
@@ -25,6 +20,7 @@ export declare class SRPanel extends BaseElement<SRPanelProps> {
25
20
  setComponentRef: (ref: any) => void;
26
21
  get enabled(): boolean;
27
22
  get moveFocus(): boolean;
23
+ setAriaProps(ariaAttributes: AriaAttributes): void;
28
24
  setMessages: (messages: string[] | string) => void;
29
25
  render(): h.JSX.Element;
30
26
  }
@@ -21,12 +21,18 @@ export interface SortedErrorObject {
21
21
  errorMessage: string;
22
22
  errorCode: string;
23
23
  }
24
+ export interface AriaAttributes {
25
+ 'aria-relevant'?: 'additions' | 'all' | 'removals' | 'text' | 'additions text';
26
+ 'aria-live'?: 'off' | 'polite' | 'assertive';
27
+ 'aria-atomic'?: 'true' | 'false';
28
+ }
24
29
  export interface SRPanelProps extends BaseElementProps {
25
30
  enabled?: boolean;
26
31
  node?: string;
27
32
  showPanel?: boolean;
28
33
  moveFocus?: boolean;
29
34
  id?: string;
35
+ ariaAttributes?: AriaAttributes;
30
36
  }
31
37
  export interface SRMessagesProps {
32
38
  setComponentRef: (ref: any) => void;
@@ -48,6 +48,7 @@ export declare const defaultTranslation: {
48
48
  continue: string;
49
49
  continueTo: string;
50
50
  "wechatpay.timetopay": string;
51
+ "sr.wechatpay.timetopay": string;
51
52
  "wechatpay.scanqrcode": string;
52
53
  personalDetails: string;
53
54
  companyDetails: string;