@adyen/adyen-web 5.65.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 (85) 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/UPI/UPI.d.ts +60 -3
  66. package/dist/types/components/UPI/components/UPIComponent/UPIComponent.d.ts +11 -7
  67. package/dist/types/components/UPI/components/UPIComponent/constants.d.ts +12 -0
  68. package/dist/types/components/UPI/components/UPIComponent/useUpiSegmentedControlOptions.d.ts +12 -0
  69. package/dist/types/components/UPI/components/UPIIntentAppList/UPIIntentAppItem/UPIIntentAppItem.d.ts +13 -0
  70. package/dist/types/components/UPI/components/UPIIntentAppList/UPIIntentAppItem/index.d.ts +1 -0
  71. package/dist/types/components/UPI/components/UPIIntentAppList/UPIIntentAppList.d.ts +15 -0
  72. package/dist/types/components/UPI/components/UPIIntentAppList/index.d.ts +1 -0
  73. package/dist/types/components/UPI/components/VpaInput/VpaInput.d.ts +1 -1
  74. package/dist/types/components/UPI/types.d.ts +21 -3
  75. package/dist/types/components/index.d.ts +1 -0
  76. package/dist/types/components/internal/Await/types.d.ts +1 -0
  77. package/dist/types/components/internal/ClickToPay/models/ShopperCard.d.ts +2 -1
  78. package/dist/types/components/internal/ClickToPay/services/sdks/SrciError.d.ts +1 -0
  79. package/dist/types/components/internal/ClickToPay/services/sdks/types.d.ts +2 -1
  80. package/dist/types/components/internal/RadioButton/RadioButton.d.ts +10 -0
  81. package/dist/types/components/internal/RadioButton/index.d.ts +1 -0
  82. package/dist/types/components/internal/RedirectButton/RedirectButton.d.ts +12 -9
  83. package/dist/types/language/config.d.ts +6 -0
  84. package/dist/types/language/locales/index.d.ts +312 -0
  85. package/package.json +1 -1
@@ -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;
@@ -208,6 +208,7 @@ declare const componentsMap: {
208
208
  upi: typeof UPI;
209
209
  upi_qr: typeof UPI;
210
210
  upi_collect: typeof UPI;
211
+ upi_intent: typeof UPI;
211
212
  ancv: typeof ANCV;
212
213
  /** Await */
213
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;
@@ -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;