@adyen/adyen-web 5.43.1 → 5.45.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 (62) hide show
  1. package/README.md +1 -1
  2. package/dist/adyen.css +2 -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 +2 -0
  7. package/dist/cjs/adyen.css.map +1 -1
  8. package/dist/cjs/index.js +1 -1
  9. package/dist/es/adyen.css +2 -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 +2 -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/ApplePay/utils.d.ts +1 -1
  16. package/dist/types/components/Card/components/CardInput/components/CardFieldsWrapper.d.ts +2 -1
  17. package/dist/types/components/Card/components/CardInput/types.d.ts +2 -0
  18. package/dist/types/components/Card/types.d.ts +11 -0
  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 +70 -0
  28. package/dist/types/components/Dropin/components/PaymentMethod/OrderPaymentMethods.d.ts +2 -1
  29. package/dist/types/components/Dropin/components/PaymentMethod/useBrandLogoConfiguration.d.ts +6 -0
  30. package/dist/types/components/Dropin/types.d.ts +5 -0
  31. package/dist/types/components/Giftcard/components/GiftcardPinField.d.ts +1 -1
  32. package/dist/types/components/Giftcard/components/types.d.ts +2 -0
  33. package/dist/types/components/Klarna/types.d.ts +2 -0
  34. package/dist/types/components/index.d.ts +2 -0
  35. package/dist/types/components/internal/Address/components/AddressSearch.d.ts +16 -0
  36. package/dist/types/components/internal/Address/types.d.ts +6 -0
  37. package/dist/types/components/internal/Address/utils.d.ts +2 -0
  38. package/dist/types/components/internal/Countdown/CountdownA11yReporter.d.ts +25 -0
  39. package/dist/types/components/internal/Countdown/index.d.ts +3 -29
  40. package/dist/types/components/internal/Countdown/types.d.ts +9 -0
  41. package/dist/types/components/internal/Countdown/useCountdownA11yReporter.d.ts +2 -0
  42. package/dist/types/components/internal/FormFields/Select/Select.d.ts +1 -1
  43. package/dist/types/components/internal/FormFields/Select/types.d.ts +3 -0
  44. package/dist/types/components/internal/IbanInput/specifications.d.ts +426 -0
  45. package/dist/types/components/internal/IbanInput/utils.d.ts +45 -0
  46. package/dist/types/components/internal/RedirectButton/RedirectButton.d.ts +3 -1
  47. package/dist/types/components/internal/SecuredFields/lib/utilities/commonUtils.d.ts +45 -0
  48. package/dist/types/components/internal/SecuredFields/lib/utilities/dom.d.ts +7 -0
  49. package/dist/types/components/internal/SecuredFields/lib/utilities/logger.d.ts +23 -1
  50. package/dist/types/components/internal/SecuredFields/utils.d.ts +15 -0
  51. package/dist/types/components/types.d.ts +14 -0
  52. package/dist/types/core/Errors/SRPanel.d.ts +3 -7
  53. package/dist/types/core/Errors/types.d.ts +6 -0
  54. package/dist/types/core/core.d.ts +37 -0
  55. package/dist/types/core/types.d.ts +8 -0
  56. package/dist/types/language/config.d.ts +4 -0
  57. package/dist/types/language/locales/index.d.ts +8 -0
  58. package/dist/types/language/utils.d.ts +12 -1
  59. package/dist/types/types/index.d.ts +1 -0
  60. package/dist/types/utils/amount-util.d.ts +28 -1
  61. package/dist/types/utils/base64.d.ts +8 -0
  62. package/package.json +2 -2
@@ -58,5 +58,42 @@ declare class Core {
58
58
  * @returns this - the element instance
59
59
  */
60
60
  remove: (component: any) => this;
61
+ /**
62
+ * @internal
63
+ * Enhances the config object passed when AdyenCheckout is initialised (environment, clientKey, etc...)
64
+ * (Re)Initializes core properties & processes (i18n, paymentMethodsResponse, etc...)
65
+ * @param options - the config object passed when AdyenCheckout is initialised
66
+ * @returns this
67
+ */
68
+ private setOptions;
69
+ /**
70
+ * @internal
71
+ * @param options - options that will be merged to the global Checkout props
72
+ * @returns props for a new UIElement
73
+ */
74
+ private getPropsForComponent;
75
+ /**
76
+ * @internal
77
+ * A recursive creation function that finalises by calling itself with a reference to a valid component class which it then initialises
78
+ *
79
+ * @param PaymentMethod - type varies:
80
+ * - usually a string
81
+ * - but for Dropin, when it starts creating payment methods, will be a fully formed object from the paymentMethods response .paymentMethods or .storedPaymentMethods
82
+ * - always finishes up as a reference to a valid component class
83
+ *
84
+ * @param options - an object whose form varies, it is *always* enhanced with props from this.getPropsForComponent(), and can also be:
85
+ * - the config object passed when a Component is created via checkout.create('card'|'dropin'|'ideal'|etc..) (scenario: usual first point of entry to this function)
86
+ * - the internally created props object from Dropin/components/utils.getCommonProps() (scenario: Dropin creating components for its PM list)
87
+ * - an object extracted from the paymentMethods response .paymentMethods or .storedPaymentMethods (scenarios: Dropin creating components for its PM list *or* standalone storedCard comp)
88
+ * - a combination of the previous 2 + the relevant object from the paymentMethodsConfiguration (scenario: Dropin creating components for its PM list)
89
+ *
90
+ *
91
+ * @returns new UIElement
92
+ */
93
+ private handleCreate;
94
+ /**
95
+ * @internal
96
+ */
97
+ private handleCreateError;
61
98
  }
62
99
  export default Core;
@@ -68,6 +68,10 @@ export interface CoreOptions {
68
68
  * Screen Reader configuration
69
69
  */
70
70
  srConfig?: SRPanelProps;
71
+ /**
72
+ * @internal
73
+ */
74
+ cdnContext?: string;
71
75
  resourceEnvironment?: string;
72
76
  analytics?: AnalyticsOptions;
73
77
  risk?: RiskModuleOptions;
@@ -104,6 +108,10 @@ export interface CoreOptions {
104
108
  * https://docs.adyen.com/online-payments/donations/web-component
105
109
  */
106
110
  onCancel?(): void;
111
+ /**
112
+ * @internal
113
+ */
114
+ loadingContext?: string;
107
115
  }
108
116
  export type PaymentMethodsConfiguration = {
109
117
  [key in keyof PaymentMethods]?: Partial<PaymentMethodOptions<key>>;
@@ -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;
@@ -87,6 +88,9 @@ export declare const defaultTranslation: {
87
88
  provinceOrTerritory: string;
88
89
  cityTown: string;
89
90
  address: string;
91
+ "address.placeholder": string;
92
+ "address.errors.incomplete": string;
93
+ "address.enterManually": string;
90
94
  state: string;
91
95
  "field.title.optional": string;
92
96
  "creditCard.cvcField.title.optional": string;
@@ -2930,6 +2930,7 @@ declare const _default: {
2930
2930
  continue: string;
2931
2931
  continueTo: string;
2932
2932
  "wechatpay.timetopay": string;
2933
+ "sr.wechatpay.timetopay": string;
2933
2934
  "wechatpay.scanqrcode": string;
2934
2935
  personalDetails: string;
2935
2936
  companyDetails: string;
@@ -2969,6 +2970,9 @@ declare const _default: {
2969
2970
  provinceOrTerritory: string;
2970
2971
  cityTown: string;
2971
2972
  address: string;
2973
+ "address.placeholder": string;
2974
+ "address.errors.incomplete": string;
2975
+ "address.enterManually": string;
2972
2976
  state: string;
2973
2977
  "field.title.optional": string;
2974
2978
  "creditCard.cvcField.title.optional": string;
@@ -3219,6 +3223,7 @@ declare const _default: {
3219
3223
  continue: string;
3220
3224
  continueTo: string;
3221
3225
  "wechatpay.timetopay": string;
3226
+ "sr.wechatpay.timetopay": string;
3222
3227
  "wechatpay.scanqrcode": string;
3223
3228
  personalDetails: string;
3224
3229
  companyDetails: string;
@@ -3258,6 +3263,9 @@ declare const _default: {
3258
3263
  provinceOrTerritory: string;
3259
3264
  cityTown: string;
3260
3265
  address: string;
3266
+ "address.placeholder": string;
3267
+ "address.errors.incomplete": string;
3268
+ "address.enterManually": string;
3261
3269
  state: string;
3262
3270
  "field.title.optional": string;
3263
3271
  "creditCard.cvcField.title.optional": string;
@@ -32,6 +32,17 @@ export declare function parseLocale(locale: string, supportedLocales?: string[])
32
32
  * @param supportedLocales -
33
33
  */
34
34
  export declare function formatCustomTranslations(customTranslations: object, supportedLocales: string[]): object;
35
+ /**
36
+ * Returns a translation string by key
37
+ * @param translations -
38
+ * @param key -
39
+ * @param options -
40
+ *
41
+ * @internal
42
+ */
43
+ export declare const getTranslation: (translations: object, key: string, options?: {
44
+ [key: string]: any;
45
+ }) => string;
35
46
  /**
36
47
  * Returns an Object which contains all the key/values of the translation labels
37
48
  *
@@ -45,4 +56,4 @@ export declare const loadTranslations: (locale: string, customTranslations?: obj
45
56
  * @param translation - Translation string
46
57
  * @param renderFunctions - An array function that renders JSX elements
47
58
  */
48
- export declare const interpolateElement: (translation: string, renderFunctions: ((translation: string) => h.JSX.Element)[]) => (string | h.JSX.Element)[];
59
+ export declare const interpolateElement: (translation: string, renderFunctions: ((translation: string) => h.JSX.Element | string)[]) => (string | h.JSX.Element)[];
@@ -198,6 +198,7 @@ export interface Order {
198
198
  export interface OrderStatus {
199
199
  expiresAt: string;
200
200
  paymentMethods: {
201
+ amount?: PaymentAmount;
201
202
  lastFour: string;
202
203
  type: string;
203
204
  }[];
@@ -1 +1,28 @@
1
- export {};
1
+ /**
2
+ * @internal
3
+ * @param currencyCode -
4
+ * Get divider amount
5
+ */
6
+ export declare const getDivider: (currencyCode: string) => number;
7
+ /**
8
+ * @internal
9
+ * @param currencyCode -
10
+ * Returns whether a CURRENCY CODE is valid
11
+ */
12
+ export declare const isValidCurrencyCode: (currencyCode: string) => boolean;
13
+ /**
14
+ * @internal
15
+ */
16
+ export declare const getCurrencyCode: (currencyCode: string) => string;
17
+ /**
18
+ * @internal
19
+ */
20
+ export declare const getDecimalAmount: (amount: number | string, currencyCode: string) => number;
21
+ /**
22
+ * @internal
23
+ */
24
+ export declare const getLocalisedAmount: (amount: number, locale: string, currencyCode: string, options?: {}) => string;
25
+ /**
26
+ * @internal
27
+ */
28
+ export declare const getLocalisedPercentage: (percent: number, locale: string) => string;
@@ -1 +1,9 @@
1
+ /**
2
+ * @internal
3
+ */
4
+ declare const base64: {
5
+ decode: (pData: any) => string | false;
6
+ encode: (pData: any) => string;
7
+ isBase64: (pDataStr: any) => boolean;
8
+ };
1
9
  export default base64;
package/package.json CHANGED
@@ -24,7 +24,7 @@
24
24
  "./dist/es/adyen.css": "./dist/es/adyen.css",
25
25
  "./package.json": "./package.json"
26
26
  },
27
- "version": "5.43.1",
27
+ "version": "5.45.0",
28
28
  "license": "MIT",
29
29
  "homepage": "https://docs.adyen.com/checkout",
30
30
  "repository": "github:Adyen/adyen-web",
@@ -124,6 +124,6 @@
124
124
  "lint-staged": {
125
125
  "*.{js,jsx,ts,tsx}": "eslint",
126
126
  "*.{scss,css}": "stylelint",
127
- "*.{js,jsx,ts,tsx,html}": "prettier --write"
127
+ "*.{js,jsx,ts,tsx,html,md}": "prettier --write"
128
128
  }
129
129
  }