@adyen/adyen-web 5.64.0 → 5.66.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (91) hide show
  1. package/dist/adyen.css +6 -3
  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 +6 -3
  6. package/dist/cjs/adyen.css.map +1 -1
  7. package/dist/cjs/index.js +1 -1
  8. package/dist/es/adyen.css +6 -3
  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/pt-PT.js +1 -1
  29. package/dist/es/ro-RO.js +1 -1
  30. package/dist/es/ru-RU.js +1 -1
  31. package/dist/es/sk-SK.js +1 -1
  32. package/dist/es/sl-SI.js +1 -1
  33. package/dist/es/sv-SE.js +1 -1
  34. package/dist/es/zh-CN.js +1 -1
  35. package/dist/es/zh-TW.js +1 -1
  36. package/dist/es.modern/adyen.css +6 -3
  37. package/dist/es.modern/adyen.css.map +1 -1
  38. package/dist/es.modern/ar.js +1 -1
  39. package/dist/es.modern/cs-CZ.js +1 -1
  40. package/dist/es.modern/da-DK.js +1 -1
  41. package/dist/es.modern/de-DE.js +1 -1
  42. package/dist/es.modern/el-GR.js +1 -1
  43. package/dist/es.modern/es-ES.js +1 -1
  44. package/dist/es.modern/fi-FI.js +1 -1
  45. package/dist/es.modern/fr-FR.js +1 -1
  46. package/dist/es.modern/hr-HR.js +1 -1
  47. package/dist/es.modern/hu-HU.js +1 -1
  48. package/dist/es.modern/index.js +1 -1
  49. package/dist/es.modern/it-IT.js +1 -1
  50. package/dist/es.modern/ja-JP.js +1 -1
  51. package/dist/es.modern/ko-KR.js +1 -1
  52. package/dist/es.modern/nl-NL.js +1 -1
  53. package/dist/es.modern/no-NO.js +1 -1
  54. package/dist/es.modern/pl-PL.js +1 -1
  55. package/dist/es.modern/pt-BR.js +1 -1
  56. package/dist/es.modern/pt-PT.js +1 -1
  57. package/dist/es.modern/ro-RO.js +1 -1
  58. package/dist/es.modern/ru-RU.js +1 -1
  59. package/dist/es.modern/sk-SK.js +1 -1
  60. package/dist/es.modern/sl-SI.js +1 -1
  61. package/dist/es.modern/sv-SE.js +1 -1
  62. package/dist/es.modern/zh-CN.js +1 -1
  63. package/dist/es.modern/zh-TW.js +1 -1
  64. package/dist/types/components/Dropin/elements/filters.d.ts +2 -0
  65. package/dist/types/components/GooglePay/GooglePay.d.ts +1 -0
  66. package/dist/types/components/ThreeDS2/components/Challenge/PrepareChallenge3DS2.d.ts +2 -2
  67. package/dist/types/components/ThreeDS2/components/DeviceFingerprint/PrepareFingerprint3DS2.d.ts +3 -3
  68. package/dist/types/components/UPI/UPI.d.ts +60 -3
  69. package/dist/types/components/UPI/components/UPIComponent/UPIComponent.d.ts +11 -7
  70. package/dist/types/components/UPI/components/UPIComponent/constants.d.ts +12 -0
  71. package/dist/types/components/UPI/components/UPIComponent/useUpiSegmentedControlOptions.d.ts +12 -0
  72. package/dist/types/components/UPI/components/UPIIntentAppList/UPIIntentAppItem/UPIIntentAppItem.d.ts +13 -0
  73. package/dist/types/components/UPI/components/UPIIntentAppList/UPIIntentAppItem/index.d.ts +1 -0
  74. package/dist/types/components/UPI/components/UPIIntentAppList/UPIIntentAppList.d.ts +15 -0
  75. package/dist/types/components/UPI/components/UPIIntentAppList/index.d.ts +1 -0
  76. package/dist/types/components/UPI/components/VpaInput/VpaInput.d.ts +1 -1
  77. package/dist/types/components/UPI/types.d.ts +21 -3
  78. package/dist/types/components/index.d.ts +1 -2
  79. package/dist/types/components/internal/Await/types.d.ts +1 -0
  80. package/dist/types/components/internal/ClickToPay/models/ShopperCard.d.ts +2 -1
  81. package/dist/types/components/internal/ClickToPay/services/sdks/SrciError.d.ts +1 -0
  82. package/dist/types/components/internal/ClickToPay/services/sdks/types.d.ts +2 -1
  83. package/dist/types/components/internal/RadioButton/RadioButton.d.ts +10 -0
  84. package/dist/types/components/internal/RadioButton/index.d.ts +1 -0
  85. package/dist/types/components/internal/RedirectButton/RedirectButton.d.ts +12 -9
  86. package/dist/types/core/Analytics/constants.d.ts +8 -0
  87. package/dist/types/core/Analytics/types.d.ts +1 -0
  88. package/dist/types/language/config.d.ts +6 -0
  89. package/dist/types/language/locales/index.d.ts +312 -0
  90. package/package.json +1 -1
  91. package/dist/types/components/Ideal/index.d.ts +0 -5
@@ -1,14 +1,71 @@
1
1
  import { h } from 'preact';
2
2
  import UIElement from '../UIElement';
3
- import { UPIElementProps, UpiMode, UpiPaymentData } from './types';
3
+ import { TX_VARIANT, UPIElementProps, UpiMode, UpiPaymentData } from './types';
4
+ /**
5
+ * For mobile:
6
+ * We should show upi_collect or upi_intent depending on if `apps` are returned in /paymentMethods response
7
+ * The upi_qr should always be on the second tab
8
+ *
9
+ * For non-mobile:
10
+ * We should never show the upi_intent (ignore `apps` in /paymentMethods response)
11
+ * The upi_qr should be on the first tab and the upi_collect should be on second tab
12
+ */
4
13
  declare class UPI extends UIElement<UPIElementProps> {
5
14
  static type: string;
6
- private useQrCodeVariant;
7
- protected static defaultProps: {
15
+ private selectedMode;
16
+ constructor(props: UPIElementProps);
17
+ formatProps(props: UPIElementProps): {
8
18
  defaultMode: UpiMode;
19
+ apps: {
20
+ type: TX_VARIANT;
21
+ id: string;
22
+ name: string;
23
+ }[];
24
+ url?: string;
25
+ paymentData?: string;
26
+ qrCodeData?: string;
27
+ brandLogo?: string;
28
+ environment?: string;
29
+ session?: import("../../core/CheckoutSession/CheckoutSession").default;
30
+ onChange?: (state: any, element: UIElement<any>) => void;
31
+ onValid?: (state: any, element: UIElement<any>) => void;
32
+ beforeSubmit?: (state: any, element: UIElement<any>, actions: any) => Promise<void>;
33
+ onSubmit?: (state: any, element: UIElement<any>) => void;
34
+ onComplete?: (state: any, element: UIElement<any>) => void;
35
+ onActionHandled?: (rtnObj: import("../types").ActionHandledReturnObject) => void;
36
+ onAdditionalDetails?: (state: any, element: UIElement<any>) => void;
37
+ onError?: (error: any, element?: UIElement<any>) => void;
38
+ onPaymentCompleted?: (result: any, element: UIElement<any>) => void;
39
+ beforeRedirect?: (resolve: any, reject: any, redirectData: any, element: UIElement<any>) => void;
40
+ isInstantPayment?: boolean;
41
+ type?: string;
42
+ name?: string;
43
+ icon?: string;
44
+ amount?: import("../../types").PaymentAmount;
45
+ secondaryAmount?: import("../../types").PaymentAmountExtended;
46
+ brand?: string;
47
+ showPayButton?: boolean;
48
+ setStatusAutomatically?: boolean;
49
+ payButton?: (options: import("../types").PayButtonFunctionProps) => h.JSX.Element;
50
+ loadingContext?: string;
51
+ createFromAction?: (action: import("../../types").PaymentAction, props: object) => UIElement<any>;
52
+ clientKey?: string;
53
+ paymentMethodType?: string;
54
+ elementRef?: any;
55
+ i18n?: import("../../language").default;
56
+ _parentInstance?: import("../../core/core").default;
57
+ order?: import("../../types").Order;
58
+ modules?: {
59
+ srPanel?: import("../../core/Errors/SRPanel").SRPanel;
60
+ analytics?: import("../types").AnalyticsModule;
61
+ resources?: import("../../core/Context/Resources").Resources;
62
+ risk?: import("../../core/RiskModule").default;
63
+ };
64
+ isDropin?: boolean;
9
65
  };
10
66
  get isValid(): boolean;
11
67
  formatData(): UpiPaymentData;
68
+ get paymentType(): TX_VARIANT;
12
69
  private onUpdateMode;
13
70
  private renderContent;
14
71
  render(): h.JSX.Element;
@@ -1,10 +1,13 @@
1
1
  import { h, RefObject } from 'preact';
2
2
  import { PayButtonFunctionProps } from '../../../types';
3
- import { VpaInputDataState } from '../VpaInput/VpaInput';
4
- import { UpiMode } from '../../types';
3
+ import { App, UpiMode } from '../../types';
5
4
  import './UPIComponent.scss';
5
+ type UpiData = {
6
+ app?: App;
7
+ virtualPaymentAddress?: string;
8
+ };
6
9
  type OnChangeProps = {
7
- data: VpaInputDataState;
10
+ data: UpiData;
8
11
  valid: any;
9
12
  errors: any;
10
13
  isValid: boolean;
@@ -12,10 +15,11 @@ type OnChangeProps = {
12
15
  interface UPIComponentProps {
13
16
  defaultMode: UpiMode;
14
17
  showPayButton: boolean;
15
- ref(ref: RefObject<typeof UPIComponent>): void;
16
- payButton(props: PayButtonFunctionProps): h.JSX.Element;
18
+ apps?: Array<App>;
19
+ ref?(ref: RefObject<typeof UPIComponent>): void;
20
+ payButton?(props: PayButtonFunctionProps): h.JSX.Element;
17
21
  onChange({ data, valid, errors, isValid }: OnChangeProps): void;
18
- onUpdateMode(mode: UpiMode): void;
22
+ onUpdateMode?(mode: UpiMode): void;
19
23
  }
20
- export default function UPIComponent({ defaultMode, onChange, onUpdateMode, payButton, showPayButton }: UPIComponentProps): h.JSX.Element;
24
+ export default function UPIComponent({ defaultMode, onChange, onUpdateMode, payButton, showPayButton, apps }: UPIComponentProps): h.JSX.Element;
21
25
  export {};
@@ -0,0 +1,12 @@
1
+ export declare const A11Y: {
2
+ ButtonId: {
3
+ VPA: string;
4
+ QR: string;
5
+ INTENT: string;
6
+ };
7
+ AreaId: {
8
+ VPA: string;
9
+ QR: string;
10
+ INTENT: string;
11
+ };
12
+ };
@@ -0,0 +1,12 @@
1
+ import { App, UpiMode } from '../../types';
2
+ interface SegmentedControlOption {
3
+ label: string;
4
+ value: UpiMode;
5
+ htmlProps: {
6
+ id: string;
7
+ 'aria-expanded': boolean;
8
+ 'aria-controls': string;
9
+ };
10
+ }
11
+ declare function useUpiSegmentedControlOptions(apps: Array<App>, mode: UpiMode): Array<SegmentedControlOption>;
12
+ export default useUpiSegmentedControlOptions;
@@ -0,0 +1,13 @@
1
+ /// <reference types="react" />
2
+ import { ComponentChildren, h } from 'preact';
3
+ import { App } from '../../../types';
4
+ import './UPIIntentAppItem.scss';
5
+ interface UPIIntentAppItemProps {
6
+ app: App;
7
+ imgSrc: string;
8
+ isSelected: boolean;
9
+ onSelect?: Function;
10
+ children?: ComponentChildren;
11
+ }
12
+ declare const UPIIntentAppItem: ({ app, imgSrc, isSelected, onSelect, children }: UPIIntentAppItemProps) => h.JSX.Element;
13
+ export default UPIIntentAppItem;
@@ -0,0 +1 @@
1
+ export { default } from './UPIIntentAppItem';
@@ -0,0 +1,15 @@
1
+ /// <reference types="react" />
2
+ import { h } from 'preact';
3
+ import { App } from '../../types';
4
+ import { OnChangeProps, VpaInputHandlers } from '../VpaInput/VpaInput';
5
+ import './UPIIntentAppList.scss';
6
+ interface UPIIntentAppListProps {
7
+ apps: Array<App>;
8
+ selectedAppId?: string;
9
+ disabled?: boolean;
10
+ onAppSelect?: Function;
11
+ onVpaInputChange?({ data, valid, errors, isValid }: OnChangeProps): void;
12
+ onSetInputHandlers?(handlers: VpaInputHandlers): void;
13
+ }
14
+ declare const UPIIntentAppList: ({ apps, selectedAppId, disabled, onAppSelect, onVpaInputChange, onSetInputHandlers }: UPIIntentAppListProps) => h.JSX.Element;
15
+ export default UPIIntentAppList;
@@ -0,0 +1 @@
1
+ export { default } from './UPIIntentAppList';
@@ -1,7 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  import { h } from 'preact';
3
3
  import './VpaInput.scss';
4
- type OnChangeProps = {
4
+ export type OnChangeProps = {
5
5
  data: VpaInputDataState;
6
6
  valid: any;
7
7
  errors: any;
@@ -1,16 +1,34 @@
1
1
  import { UIElementProps } from '../types';
2
2
  export type UpiPaymentData = {
3
3
  paymentMethod: {
4
- type: 'upi_qr' | 'upi_collect';
4
+ type: TX_VARIANT;
5
5
  virtualPaymentAddress?: string;
6
+ appId?: string;
6
7
  };
7
8
  };
8
9
  export declare enum UpiMode {
9
10
  Vpa = "vpa",
10
- QrCode = "qrCode"
11
+ QrCode = "qrCode",
12
+ Intent = "intent"
11
13
  }
14
+ export declare enum TX_VARIANT {
15
+ UpiCollect = "upi_collect",
16
+ UpiQr = "upi_qr",
17
+ UpiIntent = "upi_intent"
18
+ }
19
+ export type App = {
20
+ id: string;
21
+ name: string;
22
+ type?: TX_VARIANT;
23
+ };
12
24
  export interface UPIElementProps extends UIElementProps {
13
- defaultMode: UpiMode;
25
+ defaultMode?: UpiMode;
26
+ apps?: Array<App>;
27
+ /**
28
+ * Redirect url for upi intent apps
29
+ * @internal
30
+ */
31
+ url?: string;
14
32
  paymentData?: string;
15
33
  qrCodeData?: string;
16
34
  brandLogo?: string;
@@ -13,7 +13,6 @@ import GooglePay from './GooglePay';
13
13
  import Entercash from './Entercash';
14
14
  import Econtext from './Econtext';
15
15
  import { FacilyPay3x, FacilyPay4x, FacilyPay6x, FacilyPay10x, FacilyPay12x } from './FacilyPay';
16
- import Ideal from './Ideal';
17
16
  import PayPal from './PayPal';
18
17
  import QiwiWallet from './QiwiWallet';
19
18
  import Redirect from './Redirect';
@@ -151,7 +150,6 @@ declare const componentsMap: {
151
150
  dotpay: typeof Dotpay;
152
151
  entercash: typeof Entercash;
153
152
  eps: typeof Eps;
154
- ideal: typeof Ideal;
155
153
  molpay_ebanking_fpx_MY: typeof MolPayEBankingMY;
156
154
  molpay_ebanking_TH: typeof MolPayEBankingTH;
157
155
  molpay_ebanking_VN: typeof MolPayEBankingVN;
@@ -210,6 +208,7 @@ declare const componentsMap: {
210
208
  upi: typeof UPI;
211
209
  upi_qr: typeof UPI;
212
210
  upi_collect: typeof UPI;
211
+ upi_intent: typeof UPI;
213
212
  ancv: typeof ANCV;
214
213
  /** Await */
215
214
  /** Giftcard */
@@ -14,6 +14,7 @@ export interface AwaitComponentProps {
14
14
  countdownTime: number;
15
15
  throttleTime: number;
16
16
  showCountdownTimer: boolean;
17
+ shouldRedirectAutomatically?: boolean;
17
18
  throttleInterval: number;
18
19
  paymentData: string;
19
20
  url?: string;
@@ -1,7 +1,8 @@
1
1
  import { SrcCard } from '../services/sdks/types';
2
2
  import { ClickToPayScheme } from '../types';
3
3
  declare class ShopperCard {
4
- dateOfCardLastUsed: string;
4
+ dateOfCardLastUsed?: string;
5
+ dateOfCardCreated: string;
5
6
  panLastFour: string;
6
7
  srcDigitalCardId: string;
7
8
  scheme: ClickToPayScheme;
@@ -14,6 +14,7 @@ declare class SrciError extends Error {
14
14
  message: string;
15
15
  source: string;
16
16
  scheme: ClickToPayScheme;
17
+ errorFromCardSchemeSdk: unknown;
17
18
  constructor(schemeError: VisaError | MastercardError, source: string, scheme: ClickToPayScheme);
18
19
  toString(): string;
19
20
  }
@@ -46,7 +46,8 @@ export type DigitalCardStatus = 'ACTIVE' | 'SUSPENDED' | 'EXPIRED' | 'PENDING';
46
46
  export type SrcCard = {
47
47
  srcDigitalCardId: string;
48
48
  panLastFour: string;
49
- dateOfCardLastUsed: string;
49
+ dateOfCardCreated: string;
50
+ dateOfCardLastUsed?: string;
50
51
  paymentCardDescriptor: string;
51
52
  panExpirationMonth: string;
52
53
  panExpirationYear: string;
@@ -0,0 +1,10 @@
1
+ import { ComponentChildren, h } from 'preact';
2
+ import './RadioButton.scss';
3
+ interface RadioButtonProps {
4
+ buttonId: string;
5
+ isSelected: boolean;
6
+ children: ComponentChildren;
7
+ classNames?: string[];
8
+ }
9
+ declare function RadioButton({ buttonId, isSelected, children, classNames }: Readonly<RadioButtonProps>): h.JSX.Element;
10
+ export default RadioButton;
@@ -0,0 +1 @@
1
+ export { default } from './RadioButton';
@@ -1,11 +1,14 @@
1
1
  import { h } from 'preact';
2
- declare function RedirectButton({ label, icon, payButton, onSubmit, amount, name, ...props }: {
3
- [x: string]: any;
4
- label?: any;
5
- icon?: any;
6
- payButton: any;
7
- onSubmit: any;
8
- amount?: any;
9
- name: any;
10
- }): h.JSX.Element;
2
+ import { PaymentAmount } from '../../../types';
3
+ export interface RedirectButtonProps {
4
+ label?: string;
5
+ icon?: string;
6
+ payButton: Function;
7
+ onSubmit: Function;
8
+ amount?: PaymentAmount;
9
+ name: string;
10
+ showPayButton: boolean;
11
+ ref?: any;
12
+ }
13
+ declare function RedirectButton({ label, icon, payButton, onSubmit, amount, name, showPayButton, ...props }: RedirectButtonProps): h.JSX.Element;
11
14
  export default RedirectButton;
@@ -72,3 +72,11 @@ export declare const errorCodeMapping: {
72
72
  };
73
73
  export declare const ANALYTICS_EXPRESS_PAGES_ARRAY: string[];
74
74
  export declare const ALLOWED_ANALYTICS_DATA: string[];
75
+ export declare enum Analytics3DS2Events {
76
+ FINGERPRINT_DATA_SENT = "fingerprintDataSentWeb",
77
+ FINGERPRINT_IFRAME_LOADED = "fingerprintIframeLoaded",
78
+ FINGERPRINT_COMPLETED = "fingerprintCompleted",
79
+ CHALLENGE_DATA_SENT = "challengeDataSentWeb",
80
+ CHALLENGE_IFRAME_LOADED = "challengeIframeLoaded",
81
+ CHALLENGE_COMPLETED = "challengeCompleted"
82
+ }
@@ -74,6 +74,7 @@ export interface AnalyticsObject {
74
74
  issuer?: string;
75
75
  isExpress?: boolean;
76
76
  expressPage?: string;
77
+ result?: string;
77
78
  }
78
79
  export type ANALYTICS_EVENT = 'log' | 'error' | 'info';
79
80
  export type CreateAnalyticsObject = Omit<AnalyticsObject, 'timestamp' | 'id'> & {
@@ -252,6 +252,12 @@ export declare const defaultTranslation: {
252
252
  "upi.qrCodeWaitingMessage": string;
253
253
  "upi.vpaWaitingMessage": string;
254
254
  "upi.modeSelection": string;
255
+ "upi.completePayment": string;
256
+ "upi.mode.enterUpiId": string;
257
+ "upi.mode.qrCode": string;
258
+ "upi.mode.payByAnyUpi": string;
259
+ "upi.collect.dropdown.label": string;
260
+ "upi.collect.field.label": string;
255
261
  "onlineBanking.termsAndConditions": string;
256
262
  "onlineBankingPL.termsAndConditions": string;
257
263
  "ctp.loading.poweredByCtp": string;