funda-ui 4.7.202 → 4.7.212

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,5 +1,15 @@
1
1
  import React from 'react';
2
- export declare type SelectOptionChangeFnType = (arg1: any, arg2: any, arg3: any) => void;
2
+ export interface MultiSelectValue {
3
+ items: {
4
+ label: string;
5
+ value: string;
6
+ }[];
7
+ labels: string[];
8
+ values: string[];
9
+ labelsOfString: string;
10
+ valuesOfString: string;
11
+ }
12
+ export declare type SelectOptionChangeFnType = (event: React.MouseEvent<HTMLElement> | React.KeyboardEvent<HTMLElement>, element: HTMLElement, value: OptionConfig | MultiSelectValue) => void | Promise<void>;
3
13
  export interface MultiSelectControlValConfig {
4
14
  values: string[];
5
15
  labels: string[];
@@ -12,7 +22,8 @@ export interface OptionConfig {
12
22
  listItemLabel?: string;
13
23
  value: string | number | boolean;
14
24
  queryString: string | number;
15
- callback?: () => void;
25
+ callback?: () => void | Promise<void>;
26
+ [key: string]: string | number | boolean | any[] | (() => void | Promise<void>) | undefined;
16
27
  }
17
28
  export interface MultiSelectConfig {
18
29
  valid: boolean;
@@ -82,14 +93,14 @@ export declare type SelectProps = {
82
93
  fetchFuncAsync?: any;
83
94
  fetchFuncMethod?: string;
84
95
  fetchFuncMethodParams?: any[];
85
- fetchCallback?: (data: any) => void;
86
- onFetch?: (e: any, e2: any, value: string, data: any, incomingData: string | null | undefined) => void;
87
- onLoad?: (e: any, e2: any, value: string | null | undefined) => void;
88
- onSelect?: (data: any) => void;
96
+ fetchCallback?: (data: OptionConfig[]) => OptionConfig[];
97
+ onFetch?: (event: React.MouseEvent<HTMLElement> | React.KeyboardEvent<HTMLElement>, element: HTMLElement, value: string, data: OptionConfig[], incomingData: string | null | undefined) => void;
98
+ onLoad?: (event: React.MouseEvent<HTMLElement> | React.KeyboardEvent<HTMLElement>, element: HTMLElement, value: string | null | undefined) => void;
99
+ onSelect?: (data: OptionConfig) => void | Promise<void>;
89
100
  onChange?: SelectOptionChangeFnType | null;
90
- onBlur?: (e: any) => void;
91
- onFocus?: (e: any) => void;
92
- onKeyPressed?: (arg1: any, arg2: any, arg3: any) => void;
101
+ onBlur?: (event: React.FocusEvent<HTMLElement>) => void;
102
+ onFocus?: (event: React.FocusEvent<HTMLElement>) => void;
103
+ onKeyPressed?: (event: React.KeyboardEvent<HTMLElement>, element: HTMLElement, value: string) => void;
93
104
  };
94
105
  declare const Select: React.ForwardRefExoticComponent<SelectProps & React.RefAttributes<unknown>>;
95
106
  export default Select;