@adyen/adyen-web 5.47.0 → 5.48.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.
@@ -0,0 +1,2 @@
1
+ import { h } from 'preact';
2
+ export declare const alternativeLabelContent: (defaultWrapperProps: any, children: any) => h.JSX.Element;
@@ -39,3 +39,4 @@ 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 getFullBrandName(brand: any): any;
@@ -10,6 +10,8 @@ interface CheckboxProps {
10
10
  onInput?: any;
11
11
  className?: string;
12
12
  value?: string;
13
+ uniqueId?: string;
14
+ addContextualElement?: boolean;
13
15
  }
14
16
  declare function Checkbox({ classNameModifiers, label, isInvalid, onChange, ...props }: CheckboxProps): h.JSX.Element;
15
17
  declare namespace Checkbox {
@@ -1,6 +1,7 @@
1
1
  import { h, Component, ComponentChildren } from 'preact';
2
2
  import Language from '../../../../language';
3
3
  export interface FieldProps {
4
+ name: string;
4
5
  className?: string;
5
6
  classNameModifiers?: string[];
6
7
  children?: ComponentChildren;
@@ -19,11 +20,12 @@ export interface FieldProps {
19
20
  onFocusField?: any;
20
21
  onFieldBlur?: any;
21
22
  dir?: any;
22
- name?: string;
23
23
  showValidIcon?: boolean;
24
24
  useLabelElement?: boolean;
25
+ addContextualElement?: boolean;
25
26
  i18n?: Language;
26
27
  errorVisibleToScreenReader?: boolean;
28
+ renderAlternativeToLabel?: (defaultWrapperProps: any, children: any, uniqueId: any) => any;
27
29
  }
28
30
  export interface FieldState {
29
31
  disabled?: boolean;
@@ -41,4 +41,5 @@ export declare const BRAND_READABLE_NAME_MAP: {
41
41
  diners: string;
42
42
  maestro: string;
43
43
  bcmc: string;
44
+ bijcard: string;
44
45
  };
@@ -1,12 +1,16 @@
1
1
  import { SRPanel } from './SRPanel';
2
2
  import { SetSRMessagesReturnFn } from './SRPanelProvider';
3
+ import { FieldTypeMappingFn } from './types';
4
+ interface SetSRMessagesFromObjectsFnProps {
5
+ fieldTypeMappingFn?: FieldTypeMappingFn;
6
+ }
7
+ type SetSRMessagesFromObjectsFn = (props: SetSRMessagesFromObjectsFnProps) => SetSRMessagesReturnFn;
3
8
  export interface ISRPanelContext {
4
9
  srPanel: SRPanel;
5
- setSRMessagesFromObjects: ({ fieldTypeMappingFn }: {
6
- fieldTypeMappingFn?: any;
7
- }) => SetSRMessagesReturnFn;
10
+ setSRMessagesFromObjects: SetSRMessagesFromObjectsFn;
8
11
  setSRMessagesFromStrings: (strs: any) => void;
9
12
  clearSRPanel: () => void;
10
13
  shouldMoveFocusSR: boolean;
11
14
  }
12
15
  export declare const SRPanelContext: import("preact").Context<ISRPanelContext>;
16
+ export {};
@@ -1,15 +1,19 @@
1
1
  import { h, ComponentChildren } from 'preact';
2
2
  import { SRPanel } from './SRPanel';
3
3
  import { SetSRMessagesReturnObject } from './types';
4
+ import { StringObject } from '../../components/internal/Address/types';
4
5
  type SRPanelProviderProps = {
5
6
  srPanel: SRPanel;
6
7
  children: ComponentChildren;
7
8
  };
8
- export type SetSRMessagesReturnFn = ({ errors, isValidating, layout, countrySpecificLabels }: {
9
- errors: any;
10
- isValidating: any;
11
- layout?: any;
12
- countrySpecificLabels?: any;
13
- }) => SetSRMessagesReturnObject;
9
+ interface SetSRMessagesReturnFnProps {
10
+ errors: {
11
+ [key: string]: any;
12
+ };
13
+ isValidating: boolean;
14
+ layout?: string[];
15
+ countrySpecificLabels?: StringObject;
16
+ }
17
+ export type SetSRMessagesReturnFn = (props: SetSRMessagesReturnFnProps) => SetSRMessagesReturnObject;
14
18
  declare const SRPanelProvider: ({ srPanel, children }: SRPanelProviderProps) => h.JSX.Element;
15
19
  export default SRPanelProvider;
@@ -9,12 +9,13 @@ export interface ErrorObj {
9
9
  export interface ValidationRuleErrorObj {
10
10
  [key: string]: ValidationRuleResult;
11
11
  }
12
+ export type FieldTypeMappingFn = (key: string, i18n: Language, countrySpecificLabels: StringObject) => string;
12
13
  export interface SortErrorsObj {
13
14
  errors: ErrorObj;
14
15
  layout?: string[];
15
16
  i18n: Language;
16
17
  countrySpecificLabels?: StringObject;
17
- fieldTypeMappingFn?: (key: string, i18n: Language, countrySpecificLabels: StringObject) => string;
18
+ fieldTypeMappingFn?: FieldTypeMappingFn;
18
19
  }
19
20
  export interface SortedErrorObject {
20
21
  field: string;
@@ -0,0 +1,2 @@
1
+ declare const useAutoFocus: () => import("preact/hooks").MutableRef<any>;
2
+ export default useAutoFocus;
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.47.0",
27
+ "version": "5.48.0",
28
28
  "license": "MIT",
29
29
  "homepage": "https://docs.adyen.com/checkout",
30
30
  "repository": "github:Adyen/adyen-web",