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.
- package/README.md +205 -0
- package/Select/index.d.ts +20 -9
- package/Select/index.js +408 -345
- package/lib/cjs/Select/index.d.ts +20 -9
- package/lib/cjs/Select/index.js +408 -345
- package/lib/esm/Select/index.tsx +45 -18
- package/package.json +1 -1
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
export
|
|
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:
|
|
86
|
-
onFetch?: (
|
|
87
|
-
onLoad?: (
|
|
88
|
-
onSelect?: (data:
|
|
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?: (
|
|
91
|
-
onFocus?: (
|
|
92
|
-
onKeyPressed?: (
|
|
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;
|