@adyen/adyen-web 5.41.0 → 5.42.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.
@@ -1,6 +1,7 @@
1
1
  import Language from '../../../../language/Language';
2
2
  import { StylesObject } from '../../../internal/SecuredFields/lib/types';
3
3
  import UIElement from '../../../UIElement';
4
+ import { Resources } from '../../../../core/Context/Resources';
4
5
  export interface ACHInputStateValid {
5
6
  holderName?: boolean;
6
7
  billingAddress?: boolean;
@@ -48,6 +49,7 @@ export interface ACHInputProps {
48
49
  payButton?: (obj: any) => {};
49
50
  placeholders?: Placeholders;
50
51
  ref?: any;
52
+ resources: Resources;
51
53
  showPayButton?: boolean;
52
54
  showWarnings?: boolean;
53
55
  styles?: StylesObject;
@@ -15,7 +15,7 @@ type ChargePermissionType = 'OneTime' | 'Recurring';
15
15
  type FrequencyUnit = 'Year' | 'Month' | 'Week' | 'Day' | 'Variable';
16
16
  export type Currency = 'EUR' | 'GBP' | 'USD';
17
17
  export type Region = 'EU' | 'UK' | 'US';
18
- export type SupportedLocale = typeof SUPPORTED_LOCALES_EU[number] | typeof SUPPORTED_LOCALES_US[number];
18
+ export type SupportedLocale = (typeof SUPPORTED_LOCALES_EU)[number] | (typeof SUPPORTED_LOCALES_US)[number];
19
19
  export interface RecurringMetadata {
20
20
  frequency: {
21
21
  unit: string;
@@ -39,4 +39,3 @@ export declare const extractPropsForCardFields: (props: CardInputProps) => {
39
39
  export declare const extractPropsForSFP: (props: CardInputProps) => SFPProps;
40
40
  export declare const handlePartialAddressMode: (addressMode: AddressModeOptions) => AddressSpecifications | null;
41
41
  export declare function lookupBlurBasedErrors(errorCode: any): boolean;
42
- export declare function usePrevious<T>(value: T): T;
@@ -12,7 +12,7 @@ declare global {
12
12
  * @see {@link https://developer.paypal.com/docs/checkout/reference/customize-sdk/#intent}
13
13
  */
14
14
  export type Intent = 'sale' | 'capture' | 'authorize' | 'order' | 'tokenize';
15
- export type FundingSource = 'paypal' | 'credit';
15
+ export type FundingSource = 'paypal' | 'credit' | 'paylater' | 'venmo';
16
16
  export interface PayPalStyles {
17
17
  /**
18
18
  * @see {@link https://developer.paypal.com/docs/checkout/integration-features/customize-button/#color}
@@ -64,9 +64,10 @@ interface PayPalCommonProps {
64
64
  */
65
65
  blockPayPalPayLaterButton?: boolean;
66
66
  /**
67
- * Set to true to force the UI to load Paypal Messages Component
67
+ * Set to true to force the UI to not render PayPal Venmo button
68
68
  * @defaultValue false
69
69
  */
70
+ blockPayPalVenmoButton?: boolean;
70
71
  enableMessages?: boolean;
71
72
  /**
72
73
  * @see {@link https://developer.paypal.com/docs/business/javascript-sdk/javascript-sdk-configuration/#csp-nonce}
@@ -2,6 +2,7 @@ import { h } from 'preact';
2
2
  import Language from '../../../language/Language';
3
3
  import { CardBrandsConfiguration } from '../../Card/types';
4
4
  import { StylesObject } from '../../internal/SecuredFields/lib/types';
5
+ import { Resources } from '../../../core/Context/Resources';
5
6
  interface SecuredFieldsProps {
6
7
  allowedDOMAccess?: boolean;
7
8
  autoFocus?: boolean;
@@ -28,6 +29,7 @@ interface SecuredFieldsProps {
28
29
  onFocus?: (e: any) => {};
29
30
  onLoad?: () => {};
30
31
  rootNode: HTMLElement;
32
+ resources: Resources;
31
33
  showWarnings?: boolean;
32
34
  styles?: StylesObject;
33
35
  trimTrailingSeparator?: boolean;
@@ -209,11 +209,11 @@ export interface OrderStatus {
209
209
  */
210
210
  export interface BrowserInfo {
211
211
  acceptHeader: string;
212
- colorDepth: string;
212
+ colorDepth: number;
213
213
  language: string;
214
214
  javaEnabled: boolean;
215
- screenHeight: string;
216
- screenWidth: string;
215
+ screenHeight: number;
216
+ screenWidth: number;
217
217
  userAgent: string;
218
218
  timeZoneOffset: number;
219
219
  }
@@ -0,0 +1 @@
1
+ export declare function getArrayDifferences<A, S extends string>(currentArray: A[], previousArray: A[], comparisonKey?: S): A[];
@@ -0,0 +1 @@
1
+ export declare function usePrevious<T>(value: T): T;
@@ -1,5 +1,9 @@
1
1
  /**
2
- * Email regex
2
+ * Email regex follows https://en.wikipedia.org/wiki/Email_address.
3
+ * It checks that the email address starts with a local part that includes letters, digits, and some special characters, optionally separated by periods.
4
+ * Alternatively, the local part can be enclosed in quotes and include any characters except a new line.
5
+ * This is followed by an `@` symbol and a domain name or an IP address enclosed in square brackets.
6
+ * The domain name consists of one or more words separated by periods, where each word can include letters, digits, and hyphens. The top-level domain must consist of two or more letters.
3
7
  */
4
8
  export declare const email: RegExp;
5
9
  /**
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.41.0",
27
+ "version": "5.42.0",
28
28
  "license": "MIT",
29
29
  "homepage": "https://docs.adyen.com/checkout",
30
30
  "repository": "github:Adyen/adyen-web",