amis 1.9.1-beta.21 → 1.9.1-beta.24
Sign up to get free protection for your applications and to get access to all the features.
- package/lib/components/AssociatedSelection.d.ts +40 -40
- package/lib/components/Badge.d.ts +1 -1
- package/lib/components/Badge.js.map +1 -1
- package/lib/components/ChainedSelection.d.ts +40 -40
- package/lib/components/GroupedSelection.d.ts +40 -40
- package/lib/components/GroupedSelection.js +2 -3
- package/lib/components/GroupedSelection.js.map +2 -2
- package/lib/components/PickerContainer.d.ts +0 -1
- package/lib/components/PickerContainer.js +4 -4
- package/lib/components/PickerContainer.js.map +2 -2
- package/lib/components/ResultBox.js +3 -1
- package/lib/components/ResultBox.js.map +2 -2
- package/lib/components/ResultList.d.ts +53 -43
- package/lib/components/ResultList.js +22 -34
- package/lib/components/ResultList.js.map +2 -2
- package/lib/components/ResultTableList.d.ts +40 -40
- package/lib/components/ResultTreeList.d.ts +40 -40
- package/lib/components/Select.js +10 -6
- package/lib/components/Select.js.map +2 -2
- package/lib/components/Selection.d.ts +40 -41
- package/lib/components/Selection.js.map +2 -2
- package/lib/components/TableSelection.d.ts +40 -40
- package/lib/components/TabsTransfer.d.ts +2 -2
- package/lib/components/TabsTransfer.js.map +1 -1
- package/lib/components/Transfer.d.ts +40 -40
- package/lib/components/Transfer.js +1 -1
- package/lib/components/Transfer.js.map +2 -2
- package/lib/components/TransferDropDown.d.ts +40 -40
- package/lib/components/TreeSelection.d.ts +40 -40
- package/lib/components/TreeSelection.js +2 -3
- package/lib/components/TreeSelection.js.map +2 -2
- package/lib/components/formula/Editor.d.ts +45 -45
- package/lib/components/formula/Editor.js +16 -11
- package/lib/components/formula/Editor.js.map +2 -2
- package/lib/components/formula/Picker.d.ts +85 -40
- package/lib/components/formula/Picker.js +12 -6
- package/lib/components/formula/Picker.js.map +2 -2
- package/lib/components/formula/VariableList.d.ts +0 -2
- package/lib/components/formula/VariableList.js +5 -15
- package/lib/components/formula/VariableList.js.map +2 -2
- package/lib/components/index.d.ts +1 -3
- package/lib/components/index.js +1 -5
- package/lib/components/index.js.map +2 -2
- package/lib/components/schema-editor/SchemaVariableList.d.ts +0 -1
- package/lib/components/schema-editor/SchemaVariableList.js +2 -2
- package/lib/components/schema-editor/SchemaVariableList.js.map +2 -2
- package/lib/components/schema-editor/SchemaVariableListPicker.d.ts +0 -1
- package/lib/components/schema-editor/SchemaVariableListPicker.js +2 -2
- package/lib/components/schema-editor/SchemaVariableListPicker.js.map +2 -2
- package/lib/helper.css.map +1 -1
- package/lib/index.js +1 -1
- package/lib/renderers/CRUD.js +3 -3
- package/lib/renderers/CRUD.js.map +2 -2
- package/lib/renderers/Form/DiffEditor.d.ts +66 -20
- package/lib/renderers/Form/Editor.d.ts +66 -20
- package/lib/renderers/Form/Group.js +1 -1
- package/lib/renderers/Form/Group.js.map +2 -2
- package/lib/renderers/Form/InputFormula.d.ts +5 -5
- package/lib/renderers/Form/InputFormula.js +4 -3
- package/lib/renderers/Form/InputFormula.js.map +2 -2
- package/lib/renderers/Form/InputTag.d.ts +1 -1
- package/lib/renderers/Form/InputTag.js.map +1 -1
- package/lib/renderers/Form/Options.js +7 -7
- package/lib/renderers/Form/Options.js.map +2 -2
- package/lib/renderers/Form/Select.d.ts +6 -1
- package/lib/renderers/Form/Select.js +3 -1
- package/lib/renderers/Form/Select.js.map +2 -2
- package/lib/renderers/Form/TreeSelect.d.ts +0 -1
- package/lib/renderers/Form/TreeSelect.js +1 -9
- package/lib/renderers/Form/TreeSelect.js.map +2 -2
- package/lib/renderers/Form/index.js +9 -4
- package/lib/renderers/Form/index.js.map +2 -2
- package/lib/renderers/Table/exportExcel.js +1 -1
- package/lib/renderers/Table/exportExcel.js.map +2 -2
- package/lib/renderers/Table/index.d.ts +2 -0
- package/lib/renderers/Table/index.js +37 -5
- package/lib/renderers/Table/index.js.map +2 -2
- package/lib/renderers/Tpl.d.ts +4 -0
- package/lib/renderers/Tpl.js +6 -3
- package/lib/renderers/Tpl.js.map +2 -2
- package/lib/store/combo.d.ts +72 -22
- package/lib/store/form.d.ts +30 -9
- package/lib/store/form.js +28 -10
- package/lib/store/form.js.map +2 -2
- package/lib/store/formItem.d.ts +3 -1
- package/lib/store/formItem.js +3 -5
- package/lib/store/formItem.js.map +2 -2
- package/lib/store/table.d.ts +60 -18
- package/lib/themes/ang-ie11.css +33 -9
- package/lib/themes/ang.css +27 -9
- package/lib/themes/ang.css.map +1 -1
- package/lib/themes/antd-ie11.css +33 -9
- package/lib/themes/antd.css +27 -9
- package/lib/themes/antd.css.map +1 -1
- package/lib/themes/cxd-ie11.css +35 -15
- package/lib/themes/cxd.css +31 -17
- package/lib/themes/cxd.css.map +1 -1
- package/lib/themes/dark-ie11.css +33 -9
- package/lib/themes/dark.css +27 -9
- package/lib/themes/dark.css.map +1 -1
- package/lib/themes/default-ie11.css +35 -15
- package/lib/themes/default.css +31 -17
- package/lib/themes/default.css.map +1 -1
- package/lib/utils/formula.js +2 -3
- package/lib/utils/formula.js.map +2 -2
- package/lib/utils/helper.js +1 -1
- package/lib/utils/helper.js.map +2 -2
- package/package.json +1 -1
- package/schema.json +22 -16
- package/scss/_mixins.scss +1 -1
- package/scss/components/form/_date.scss +9 -10
- package/scss/components/form/_select.scss +14 -0
- package/scss/components/form/_transfer.scss +1 -2
- package/scss/themes/cxd.scss +4 -9
- package/sdk/ang-ie11.css +36 -9
- package/sdk/ang.css +30 -9
- package/sdk/antd-ie11.css +36 -9
- package/sdk/antd.css +30 -9
- package/sdk/barcode.js +51 -51
- package/sdk/charts.js +14 -14
- package/sdk/codemirror.js +7 -7
- package/sdk/color-picker.js +65 -65
- package/sdk/cropperjs.js +2 -2
- package/sdk/cxd-ie11.css +38 -16
- package/sdk/cxd.css +34 -18
- package/sdk/dark-ie11.css +36 -9
- package/sdk/dark.css +30 -9
- package/sdk/exceljs.js +1 -1
- package/sdk/helper.css.map +1 -1
- package/sdk/markdown.js +69 -69
- package/sdk/papaparse.js +1 -1
- package/sdk/renderers/Form/CityDB.js +1 -1
- package/sdk/rest.js +16 -16
- package/sdk/rich-text.js +62 -62
- package/sdk/sdk-ie11.css +38 -16
- package/sdk/sdk.css +34 -18
- package/sdk/sdk.js +1356 -1354
- package/sdk/thirds/hls.js/hls.js +1 -1
- package/sdk/thirds/mpegts.js/mpegts.js +1 -1
- package/sdk/tinymce.js +57 -57
- package/src/components/Badge.tsx +1 -1
- package/src/components/GroupedSelection.tsx +2 -3
- package/src/components/PickerContainer.tsx +8 -13
- package/src/components/ResultBox.tsx +3 -1
- package/src/components/ResultList.tsx +51 -48
- package/src/components/Select.tsx +16 -8
- package/src/components/Selection.tsx +0 -1
- package/src/components/TabsTransfer.tsx +2 -2
- package/src/components/Transfer.tsx +4 -0
- package/src/components/TreeSelection.tsx +1 -2
- package/src/components/formula/Editor.tsx +51 -38
- package/src/components/formula/Picker.tsx +26 -7
- package/src/components/formula/VariableList.tsx +2 -36
- package/src/components/index.tsx +0 -4
- package/src/components/schema-editor/SchemaVariableList.tsx +2 -4
- package/src/components/schema-editor/SchemaVariableListPicker.tsx +1 -4
- package/src/renderers/CRUD.tsx +3 -3
- package/src/renderers/Form/Group.tsx +1 -1
- package/src/renderers/Form/InputFormula.tsx +11 -10
- package/src/renderers/Form/InputTag.tsx +1 -1
- package/src/renderers/Form/Options.tsx +7 -9
- package/src/renderers/Form/Select.tsx +10 -2
- package/src/renderers/Form/TreeSelect.tsx +14 -16
- package/src/renderers/Form/index.tsx +13 -2
- package/src/renderers/Table/exportExcel.ts +1 -1
- package/src/renderers/Table/index.tsx +42 -6
- package/src/renderers/Tpl.tsx +11 -1
- package/src/store/form.ts +31 -24
- package/src/store/formItem.ts +65 -52
- package/src/utils/formula.ts +2 -2
- package/src/utils/helper.ts +2 -2
@@ -27,7 +27,7 @@ export declare class TreeSelection extends BaseSelection<TreeSelectionProps, Tre
|
|
27
27
|
render(): JSX.Element;
|
28
28
|
}
|
29
29
|
declare const _default: {
|
30
|
-
new (props: Omit<Pick<Omit<TreeSelectionProps, keyof import("../locale").LocaleProps>, "classPrefix" | "classnames" | "className" | "theme" | "value" | "disabled" | "onClick" | "options" | "inline" | "onChange" | "itemClassName" | "labelClassName" | "onDeferLoad" | "onLeftDeferLoad" | "option2value"
|
30
|
+
new (props: Omit<Pick<Omit<TreeSelectionProps, keyof import("../locale").LocaleProps>, "classPrefix" | "classnames" | "className" | "theme" | "value" | "disabled" | "onClick" | "options" | "inline" | "onChange" | "itemClassName" | "labelClassName" | "onDeferLoad" | "onLeftDeferLoad" | "option2value"> & Partial<Pick<Omit<TreeSelectionProps, keyof import("../locale").LocaleProps>, "multiple" | "placeholder" | "expand" | "clearable" | "itemRender">> & Partial<Pick<{
|
31
31
|
expand: "first";
|
32
32
|
placeholder: string;
|
33
33
|
itemRender: typeof BaseSelection.itemRender;
|
@@ -42,7 +42,7 @@ declare const _default: {
|
|
42
42
|
getWrappedInstance(): any;
|
43
43
|
render(): JSX.Element;
|
44
44
|
context: any;
|
45
|
-
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<Omit<Pick<Omit<TreeSelectionProps, keyof import("../locale").LocaleProps>, "classPrefix" | "classnames" | "className" | "theme" | "value" | "disabled" | "onClick" | "options" | "inline" | "onChange" | "itemClassName" | "labelClassName" | "onDeferLoad" | "onLeftDeferLoad" | "option2value"
|
45
|
+
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<Omit<Pick<Omit<TreeSelectionProps, keyof import("../locale").LocaleProps>, "classPrefix" | "classnames" | "className" | "theme" | "value" | "disabled" | "onClick" | "options" | "inline" | "onChange" | "itemClassName" | "labelClassName" | "onDeferLoad" | "onLeftDeferLoad" | "option2value"> & Partial<Pick<Omit<TreeSelectionProps, keyof import("../locale").LocaleProps>, "multiple" | "placeholder" | "expand" | "clearable" | "itemRender">> & Partial<Pick<{
|
46
46
|
expand: "first";
|
47
47
|
placeholder: string;
|
48
48
|
itemRender: typeof BaseSelection.itemRender;
|
@@ -53,7 +53,7 @@ declare const _default: {
|
|
53
53
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
54
54
|
}, keyof import("../theme").ThemeProps> & import("../theme").ThemeOutterProps>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
|
55
55
|
forceUpdate(callback?: (() => void) | undefined): void;
|
56
|
-
readonly props: Readonly<Omit<Pick<Omit<TreeSelectionProps, keyof import("../locale").LocaleProps>, "classPrefix" | "classnames" | "className" | "theme" | "value" | "disabled" | "onClick" | "options" | "inline" | "onChange" | "itemClassName" | "labelClassName" | "onDeferLoad" | "onLeftDeferLoad" | "option2value"
|
56
|
+
readonly props: Readonly<Omit<Pick<Omit<TreeSelectionProps, keyof import("../locale").LocaleProps>, "classPrefix" | "classnames" | "className" | "theme" | "value" | "disabled" | "onClick" | "options" | "inline" | "onChange" | "itemClassName" | "labelClassName" | "onDeferLoad" | "onLeftDeferLoad" | "option2value"> & Partial<Pick<Omit<TreeSelectionProps, keyof import("../locale").LocaleProps>, "multiple" | "placeholder" | "expand" | "clearable" | "itemRender">> & Partial<Pick<{
|
57
57
|
expand: "first";
|
58
58
|
placeholder: string;
|
59
59
|
itemRender: typeof BaseSelection.itemRender;
|
@@ -70,7 +70,7 @@ declare const _default: {
|
|
70
70
|
[key: string]: React.ReactInstance;
|
71
71
|
};
|
72
72
|
componentDidMount?(): void;
|
73
|
-
shouldComponentUpdate?(nextProps: Readonly<Omit<Pick<Omit<TreeSelectionProps, keyof import("../locale").LocaleProps>, "classPrefix" | "classnames" | "className" | "theme" | "value" | "disabled" | "onClick" | "options" | "inline" | "onChange" | "itemClassName" | "labelClassName" | "onDeferLoad" | "onLeftDeferLoad" | "option2value"
|
73
|
+
shouldComponentUpdate?(nextProps: Readonly<Omit<Pick<Omit<TreeSelectionProps, keyof import("../locale").LocaleProps>, "classPrefix" | "classnames" | "className" | "theme" | "value" | "disabled" | "onClick" | "options" | "inline" | "onChange" | "itemClassName" | "labelClassName" | "onDeferLoad" | "onLeftDeferLoad" | "option2value"> & Partial<Pick<Omit<TreeSelectionProps, keyof import("../locale").LocaleProps>, "multiple" | "placeholder" | "expand" | "clearable" | "itemRender">> & Partial<Pick<{
|
74
74
|
expand: "first";
|
75
75
|
placeholder: string;
|
76
76
|
itemRender: typeof BaseSelection.itemRender;
|
@@ -82,7 +82,7 @@ declare const _default: {
|
|
82
82
|
}, keyof import("../theme").ThemeProps> & import("../theme").ThemeOutterProps>, nextState: Readonly<{}>, nextContext: any): boolean;
|
83
83
|
componentWillUnmount?(): void;
|
84
84
|
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
|
85
|
-
getSnapshotBeforeUpdate?(prevProps: Readonly<Omit<Pick<Omit<TreeSelectionProps, keyof import("../locale").LocaleProps>, "classPrefix" | "classnames" | "className" | "theme" | "value" | "disabled" | "onClick" | "options" | "inline" | "onChange" | "itemClassName" | "labelClassName" | "onDeferLoad" | "onLeftDeferLoad" | "option2value"
|
85
|
+
getSnapshotBeforeUpdate?(prevProps: Readonly<Omit<Pick<Omit<TreeSelectionProps, keyof import("../locale").LocaleProps>, "classPrefix" | "classnames" | "className" | "theme" | "value" | "disabled" | "onClick" | "options" | "inline" | "onChange" | "itemClassName" | "labelClassName" | "onDeferLoad" | "onLeftDeferLoad" | "option2value"> & Partial<Pick<Omit<TreeSelectionProps, keyof import("../locale").LocaleProps>, "multiple" | "placeholder" | "expand" | "clearable" | "itemRender">> & Partial<Pick<{
|
86
86
|
expand: "first";
|
87
87
|
placeholder: string;
|
88
88
|
itemRender: typeof BaseSelection.itemRender;
|
@@ -92,7 +92,7 @@ declare const _default: {
|
|
92
92
|
locale?: string | undefined;
|
93
93
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
94
94
|
}, keyof import("../theme").ThemeProps> & import("../theme").ThemeOutterProps>, prevState: Readonly<{}>): any;
|
95
|
-
componentDidUpdate?(prevProps: Readonly<Omit<Pick<Omit<TreeSelectionProps, keyof import("../locale").LocaleProps>, "classPrefix" | "classnames" | "className" | "theme" | "value" | "disabled" | "onClick" | "options" | "inline" | "onChange" | "itemClassName" | "labelClassName" | "onDeferLoad" | "onLeftDeferLoad" | "option2value"
|
95
|
+
componentDidUpdate?(prevProps: Readonly<Omit<Pick<Omit<TreeSelectionProps, keyof import("../locale").LocaleProps>, "classPrefix" | "classnames" | "className" | "theme" | "value" | "disabled" | "onClick" | "options" | "inline" | "onChange" | "itemClassName" | "labelClassName" | "onDeferLoad" | "onLeftDeferLoad" | "option2value"> & Partial<Pick<Omit<TreeSelectionProps, keyof import("../locale").LocaleProps>, "multiple" | "placeholder" | "expand" | "clearable" | "itemRender">> & Partial<Pick<{
|
96
96
|
expand: "first";
|
97
97
|
placeholder: string;
|
98
98
|
itemRender: typeof BaseSelection.itemRender;
|
@@ -104,7 +104,7 @@ declare const _default: {
|
|
104
104
|
}, keyof import("../theme").ThemeProps> & import("../theme").ThemeOutterProps>, prevState: Readonly<{}>, snapshot?: any): void;
|
105
105
|
componentWillMount?(): void;
|
106
106
|
UNSAFE_componentWillMount?(): void;
|
107
|
-
componentWillReceiveProps?(nextProps: Readonly<Omit<Pick<Omit<TreeSelectionProps, keyof import("../locale").LocaleProps>, "classPrefix" | "classnames" | "className" | "theme" | "value" | "disabled" | "onClick" | "options" | "inline" | "onChange" | "itemClassName" | "labelClassName" | "onDeferLoad" | "onLeftDeferLoad" | "option2value"
|
107
|
+
componentWillReceiveProps?(nextProps: Readonly<Omit<Pick<Omit<TreeSelectionProps, keyof import("../locale").LocaleProps>, "classPrefix" | "classnames" | "className" | "theme" | "value" | "disabled" | "onClick" | "options" | "inline" | "onChange" | "itemClassName" | "labelClassName" | "onDeferLoad" | "onLeftDeferLoad" | "option2value"> & Partial<Pick<Omit<TreeSelectionProps, keyof import("../locale").LocaleProps>, "multiple" | "placeholder" | "expand" | "clearable" | "itemRender">> & Partial<Pick<{
|
108
108
|
expand: "first";
|
109
109
|
placeholder: string;
|
110
110
|
itemRender: typeof BaseSelection.itemRender;
|
@@ -114,7 +114,7 @@ declare const _default: {
|
|
114
114
|
locale?: string | undefined;
|
115
115
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
116
116
|
}, keyof import("../theme").ThemeProps> & import("../theme").ThemeOutterProps>, nextContext: any): void;
|
117
|
-
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<Omit<Pick<Omit<TreeSelectionProps, keyof import("../locale").LocaleProps>, "classPrefix" | "classnames" | "className" | "theme" | "value" | "disabled" | "onClick" | "options" | "inline" | "onChange" | "itemClassName" | "labelClassName" | "onDeferLoad" | "onLeftDeferLoad" | "option2value"
|
117
|
+
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<Omit<Pick<Omit<TreeSelectionProps, keyof import("../locale").LocaleProps>, "classPrefix" | "classnames" | "className" | "theme" | "value" | "disabled" | "onClick" | "options" | "inline" | "onChange" | "itemClassName" | "labelClassName" | "onDeferLoad" | "onLeftDeferLoad" | "option2value"> & Partial<Pick<Omit<TreeSelectionProps, keyof import("../locale").LocaleProps>, "multiple" | "placeholder" | "expand" | "clearable" | "itemRender">> & Partial<Pick<{
|
118
118
|
expand: "first";
|
119
119
|
placeholder: string;
|
120
120
|
itemRender: typeof BaseSelection.itemRender;
|
@@ -124,7 +124,7 @@ declare const _default: {
|
|
124
124
|
locale?: string | undefined;
|
125
125
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
126
126
|
}, keyof import("../theme").ThemeProps> & import("../theme").ThemeOutterProps>, nextContext: any): void;
|
127
|
-
componentWillUpdate?(nextProps: Readonly<Omit<Pick<Omit<TreeSelectionProps, keyof import("../locale").LocaleProps>, "classPrefix" | "classnames" | "className" | "theme" | "value" | "disabled" | "onClick" | "options" | "inline" | "onChange" | "itemClassName" | "labelClassName" | "onDeferLoad" | "onLeftDeferLoad" | "option2value"
|
127
|
+
componentWillUpdate?(nextProps: Readonly<Omit<Pick<Omit<TreeSelectionProps, keyof import("../locale").LocaleProps>, "classPrefix" | "classnames" | "className" | "theme" | "value" | "disabled" | "onClick" | "options" | "inline" | "onChange" | "itemClassName" | "labelClassName" | "onDeferLoad" | "onLeftDeferLoad" | "option2value"> & Partial<Pick<Omit<TreeSelectionProps, keyof import("../locale").LocaleProps>, "multiple" | "placeholder" | "expand" | "clearable" | "itemRender">> & Partial<Pick<{
|
128
128
|
expand: "first";
|
129
129
|
placeholder: string;
|
130
130
|
itemRender: typeof BaseSelection.itemRender;
|
@@ -134,7 +134,7 @@ declare const _default: {
|
|
134
134
|
locale?: string | undefined;
|
135
135
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
136
136
|
}, keyof import("../theme").ThemeProps> & import("../theme").ThemeOutterProps>, nextState: Readonly<{}>, nextContext: any): void;
|
137
|
-
UNSAFE_componentWillUpdate?(nextProps: Readonly<Omit<Pick<Omit<TreeSelectionProps, keyof import("../locale").LocaleProps>, "classPrefix" | "classnames" | "className" | "theme" | "value" | "disabled" | "onClick" | "options" | "inline" | "onChange" | "itemClassName" | "labelClassName" | "onDeferLoad" | "onLeftDeferLoad" | "option2value"
|
137
|
+
UNSAFE_componentWillUpdate?(nextProps: Readonly<Omit<Pick<Omit<TreeSelectionProps, keyof import("../locale").LocaleProps>, "classPrefix" | "classnames" | "className" | "theme" | "value" | "disabled" | "onClick" | "options" | "inline" | "onChange" | "itemClassName" | "labelClassName" | "onDeferLoad" | "onLeftDeferLoad" | "option2value"> & Partial<Pick<Omit<TreeSelectionProps, keyof import("../locale").LocaleProps>, "multiple" | "placeholder" | "expand" | "clearable" | "itemRender">> & Partial<Pick<{
|
138
138
|
expand: "first";
|
139
139
|
placeholder: string;
|
140
140
|
itemRender: typeof BaseSelection.itemRender;
|
@@ -148,7 +148,7 @@ declare const _default: {
|
|
148
148
|
displayName: string;
|
149
149
|
contextType: React.Context<string>;
|
150
150
|
ComposedComponent: React.ComponentType<{
|
151
|
-
new (props: Pick<Omit<TreeSelectionProps, keyof import("../locale").LocaleProps>, "classPrefix" | "classnames" | "className" | "theme" | "value" | "disabled" | "onClick" | "options" | "inline" | "onChange" | "itemClassName" | "labelClassName" | "onDeferLoad" | "onLeftDeferLoad" | "option2value"
|
151
|
+
new (props: Pick<Omit<TreeSelectionProps, keyof import("../locale").LocaleProps>, "classPrefix" | "classnames" | "className" | "theme" | "value" | "disabled" | "onClick" | "options" | "inline" | "onChange" | "itemClassName" | "labelClassName" | "onDeferLoad" | "onLeftDeferLoad" | "option2value"> & Partial<Pick<Omit<TreeSelectionProps, keyof import("../locale").LocaleProps>, "multiple" | "placeholder" | "expand" | "clearable" | "itemRender">> & Partial<Pick<{
|
152
152
|
expand: "first";
|
153
153
|
placeholder: string;
|
154
154
|
itemRender: typeof BaseSelection.itemRender;
|
@@ -163,7 +163,7 @@ declare const _default: {
|
|
163
163
|
getWrappedInstance(): any;
|
164
164
|
render(): JSX.Element;
|
165
165
|
context: any;
|
166
|
-
setState<K_1 extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<Pick<Omit<TreeSelectionProps, keyof import("../locale").LocaleProps>, "classPrefix" | "classnames" | "className" | "theme" | "value" | "disabled" | "onClick" | "options" | "inline" | "onChange" | "itemClassName" | "labelClassName" | "onDeferLoad" | "onLeftDeferLoad" | "option2value"
|
166
|
+
setState<K_1 extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<Pick<Omit<TreeSelectionProps, keyof import("../locale").LocaleProps>, "classPrefix" | "classnames" | "className" | "theme" | "value" | "disabled" | "onClick" | "options" | "inline" | "onChange" | "itemClassName" | "labelClassName" | "onDeferLoad" | "onLeftDeferLoad" | "option2value"> & Partial<Pick<Omit<TreeSelectionProps, keyof import("../locale").LocaleProps>, "multiple" | "placeholder" | "expand" | "clearable" | "itemRender">> & Partial<Pick<{
|
167
167
|
expand: "first";
|
168
168
|
placeholder: string;
|
169
169
|
itemRender: typeof BaseSelection.itemRender;
|
@@ -174,7 +174,7 @@ declare const _default: {
|
|
174
174
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
175
175
|
}>) => {} | Pick<{}, K_1> | null) | Pick<{}, K_1> | null, callback?: (() => void) | undefined): void;
|
176
176
|
forceUpdate(callback?: (() => void) | undefined): void;
|
177
|
-
readonly props: Readonly<Pick<Omit<TreeSelectionProps, keyof import("../locale").LocaleProps>, "classPrefix" | "classnames" | "className" | "theme" | "value" | "disabled" | "onClick" | "options" | "inline" | "onChange" | "itemClassName" | "labelClassName" | "onDeferLoad" | "onLeftDeferLoad" | "option2value"
|
177
|
+
readonly props: Readonly<Pick<Omit<TreeSelectionProps, keyof import("../locale").LocaleProps>, "classPrefix" | "classnames" | "className" | "theme" | "value" | "disabled" | "onClick" | "options" | "inline" | "onChange" | "itemClassName" | "labelClassName" | "onDeferLoad" | "onLeftDeferLoad" | "option2value"> & Partial<Pick<Omit<TreeSelectionProps, keyof import("../locale").LocaleProps>, "multiple" | "placeholder" | "expand" | "clearable" | "itemRender">> & Partial<Pick<{
|
178
178
|
expand: "first";
|
179
179
|
placeholder: string;
|
180
180
|
itemRender: typeof BaseSelection.itemRender;
|
@@ -191,7 +191,7 @@ declare const _default: {
|
|
191
191
|
[key: string]: React.ReactInstance;
|
192
192
|
};
|
193
193
|
componentDidMount?(): void;
|
194
|
-
shouldComponentUpdate?(nextProps: Readonly<Pick<Omit<TreeSelectionProps, keyof import("../locale").LocaleProps>, "classPrefix" | "classnames" | "className" | "theme" | "value" | "disabled" | "onClick" | "options" | "inline" | "onChange" | "itemClassName" | "labelClassName" | "onDeferLoad" | "onLeftDeferLoad" | "option2value"
|
194
|
+
shouldComponentUpdate?(nextProps: Readonly<Pick<Omit<TreeSelectionProps, keyof import("../locale").LocaleProps>, "classPrefix" | "classnames" | "className" | "theme" | "value" | "disabled" | "onClick" | "options" | "inline" | "onChange" | "itemClassName" | "labelClassName" | "onDeferLoad" | "onLeftDeferLoad" | "option2value"> & Partial<Pick<Omit<TreeSelectionProps, keyof import("../locale").LocaleProps>, "multiple" | "placeholder" | "expand" | "clearable" | "itemRender">> & Partial<Pick<{
|
195
195
|
expand: "first";
|
196
196
|
placeholder: string;
|
197
197
|
itemRender: typeof BaseSelection.itemRender;
|
@@ -203,7 +203,7 @@ declare const _default: {
|
|
203
203
|
}>, nextState: Readonly<{}>, nextContext: any): boolean;
|
204
204
|
componentWillUnmount?(): void;
|
205
205
|
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
|
206
|
-
getSnapshotBeforeUpdate?(prevProps: Readonly<Pick<Omit<TreeSelectionProps, keyof import("../locale").LocaleProps>, "classPrefix" | "classnames" | "className" | "theme" | "value" | "disabled" | "onClick" | "options" | "inline" | "onChange" | "itemClassName" | "labelClassName" | "onDeferLoad" | "onLeftDeferLoad" | "option2value"
|
206
|
+
getSnapshotBeforeUpdate?(prevProps: Readonly<Pick<Omit<TreeSelectionProps, keyof import("../locale").LocaleProps>, "classPrefix" | "classnames" | "className" | "theme" | "value" | "disabled" | "onClick" | "options" | "inline" | "onChange" | "itemClassName" | "labelClassName" | "onDeferLoad" | "onLeftDeferLoad" | "option2value"> & Partial<Pick<Omit<TreeSelectionProps, keyof import("../locale").LocaleProps>, "multiple" | "placeholder" | "expand" | "clearable" | "itemRender">> & Partial<Pick<{
|
207
207
|
expand: "first";
|
208
208
|
placeholder: string;
|
209
209
|
itemRender: typeof BaseSelection.itemRender;
|
@@ -213,7 +213,7 @@ declare const _default: {
|
|
213
213
|
locale?: string | undefined;
|
214
214
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
215
215
|
}>, prevState: Readonly<{}>): any;
|
216
|
-
componentDidUpdate?(prevProps: Readonly<Pick<Omit<TreeSelectionProps, keyof import("../locale").LocaleProps>, "classPrefix" | "classnames" | "className" | "theme" | "value" | "disabled" | "onClick" | "options" | "inline" | "onChange" | "itemClassName" | "labelClassName" | "onDeferLoad" | "onLeftDeferLoad" | "option2value"
|
216
|
+
componentDidUpdate?(prevProps: Readonly<Pick<Omit<TreeSelectionProps, keyof import("../locale").LocaleProps>, "classPrefix" | "classnames" | "className" | "theme" | "value" | "disabled" | "onClick" | "options" | "inline" | "onChange" | "itemClassName" | "labelClassName" | "onDeferLoad" | "onLeftDeferLoad" | "option2value"> & Partial<Pick<Omit<TreeSelectionProps, keyof import("../locale").LocaleProps>, "multiple" | "placeholder" | "expand" | "clearable" | "itemRender">> & Partial<Pick<{
|
217
217
|
expand: "first";
|
218
218
|
placeholder: string;
|
219
219
|
itemRender: typeof BaseSelection.itemRender;
|
@@ -225,7 +225,7 @@ declare const _default: {
|
|
225
225
|
}>, prevState: Readonly<{}>, snapshot?: any): void;
|
226
226
|
componentWillMount?(): void;
|
227
227
|
UNSAFE_componentWillMount?(): void;
|
228
|
-
componentWillReceiveProps?(nextProps: Readonly<Pick<Omit<TreeSelectionProps, keyof import("../locale").LocaleProps>, "classPrefix" | "classnames" | "className" | "theme" | "value" | "disabled" | "onClick" | "options" | "inline" | "onChange" | "itemClassName" | "labelClassName" | "onDeferLoad" | "onLeftDeferLoad" | "option2value"
|
228
|
+
componentWillReceiveProps?(nextProps: Readonly<Pick<Omit<TreeSelectionProps, keyof import("../locale").LocaleProps>, "classPrefix" | "classnames" | "className" | "theme" | "value" | "disabled" | "onClick" | "options" | "inline" | "onChange" | "itemClassName" | "labelClassName" | "onDeferLoad" | "onLeftDeferLoad" | "option2value"> & Partial<Pick<Omit<TreeSelectionProps, keyof import("../locale").LocaleProps>, "multiple" | "placeholder" | "expand" | "clearable" | "itemRender">> & Partial<Pick<{
|
229
229
|
expand: "first";
|
230
230
|
placeholder: string;
|
231
231
|
itemRender: typeof BaseSelection.itemRender;
|
@@ -235,7 +235,7 @@ declare const _default: {
|
|
235
235
|
locale?: string | undefined;
|
236
236
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
237
237
|
}>, nextContext: any): void;
|
238
|
-
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<Pick<Omit<TreeSelectionProps, keyof import("../locale").LocaleProps>, "classPrefix" | "classnames" | "className" | "theme" | "value" | "disabled" | "onClick" | "options" | "inline" | "onChange" | "itemClassName" | "labelClassName" | "onDeferLoad" | "onLeftDeferLoad" | "option2value"
|
238
|
+
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<Pick<Omit<TreeSelectionProps, keyof import("../locale").LocaleProps>, "classPrefix" | "classnames" | "className" | "theme" | "value" | "disabled" | "onClick" | "options" | "inline" | "onChange" | "itemClassName" | "labelClassName" | "onDeferLoad" | "onLeftDeferLoad" | "option2value"> & Partial<Pick<Omit<TreeSelectionProps, keyof import("../locale").LocaleProps>, "multiple" | "placeholder" | "expand" | "clearable" | "itemRender">> & Partial<Pick<{
|
239
239
|
expand: "first";
|
240
240
|
placeholder: string;
|
241
241
|
itemRender: typeof BaseSelection.itemRender;
|
@@ -245,7 +245,7 @@ declare const _default: {
|
|
245
245
|
locale?: string | undefined;
|
246
246
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
247
247
|
}>, nextContext: any): void;
|
248
|
-
componentWillUpdate?(nextProps: Readonly<Pick<Omit<TreeSelectionProps, keyof import("../locale").LocaleProps>, "classPrefix" | "classnames" | "className" | "theme" | "value" | "disabled" | "onClick" | "options" | "inline" | "onChange" | "itemClassName" | "labelClassName" | "onDeferLoad" | "onLeftDeferLoad" | "option2value"
|
248
|
+
componentWillUpdate?(nextProps: Readonly<Pick<Omit<TreeSelectionProps, keyof import("../locale").LocaleProps>, "classPrefix" | "classnames" | "className" | "theme" | "value" | "disabled" | "onClick" | "options" | "inline" | "onChange" | "itemClassName" | "labelClassName" | "onDeferLoad" | "onLeftDeferLoad" | "option2value"> & Partial<Pick<Omit<TreeSelectionProps, keyof import("../locale").LocaleProps>, "multiple" | "placeholder" | "expand" | "clearable" | "itemRender">> & Partial<Pick<{
|
249
249
|
expand: "first";
|
250
250
|
placeholder: string;
|
251
251
|
itemRender: typeof BaseSelection.itemRender;
|
@@ -255,7 +255,7 @@ declare const _default: {
|
|
255
255
|
locale?: string | undefined;
|
256
256
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
257
257
|
}>, nextState: Readonly<{}>, nextContext: any): void;
|
258
|
-
UNSAFE_componentWillUpdate?(nextProps: Readonly<Pick<Omit<TreeSelectionProps, keyof import("../locale").LocaleProps>, "classPrefix" | "classnames" | "className" | "theme" | "value" | "disabled" | "onClick" | "options" | "inline" | "onChange" | "itemClassName" | "labelClassName" | "onDeferLoad" | "onLeftDeferLoad" | "option2value"
|
258
|
+
UNSAFE_componentWillUpdate?(nextProps: Readonly<Pick<Omit<TreeSelectionProps, keyof import("../locale").LocaleProps>, "classPrefix" | "classnames" | "className" | "theme" | "value" | "disabled" | "onClick" | "options" | "inline" | "onChange" | "itemClassName" | "labelClassName" | "onDeferLoad" | "onLeftDeferLoad" | "option2value"> & Partial<Pick<Omit<TreeSelectionProps, keyof import("../locale").LocaleProps>, "multiple" | "placeholder" | "expand" | "clearable" | "itemRender">> & Partial<Pick<{
|
259
259
|
expand: "first";
|
260
260
|
placeholder: string;
|
261
261
|
itemRender: typeof BaseSelection.itemRender;
|
@@ -273,7 +273,7 @@ declare const _default: {
|
|
273
273
|
ComposedComponent: typeof TreeSelection;
|
274
274
|
}>;
|
275
275
|
} & import("hoist-non-react-statics").NonReactStatics<{
|
276
|
-
new (props: Pick<Omit<TreeSelectionProps, keyof import("../locale").LocaleProps>, "classPrefix" | "classnames" | "className" | "theme" | "value" | "disabled" | "onClick" | "options" | "inline" | "onChange" | "itemClassName" | "labelClassName" | "onDeferLoad" | "onLeftDeferLoad" | "option2value"
|
276
|
+
new (props: Pick<Omit<TreeSelectionProps, keyof import("../locale").LocaleProps>, "classPrefix" | "classnames" | "className" | "theme" | "value" | "disabled" | "onClick" | "options" | "inline" | "onChange" | "itemClassName" | "labelClassName" | "onDeferLoad" | "onLeftDeferLoad" | "option2value"> & Partial<Pick<Omit<TreeSelectionProps, keyof import("../locale").LocaleProps>, "multiple" | "placeholder" | "expand" | "clearable" | "itemRender">> & Partial<Pick<{
|
277
277
|
expand: "first";
|
278
278
|
placeholder: string;
|
279
279
|
itemRender: typeof BaseSelection.itemRender;
|
@@ -288,7 +288,7 @@ declare const _default: {
|
|
288
288
|
getWrappedInstance(): any;
|
289
289
|
render(): JSX.Element;
|
290
290
|
context: any;
|
291
|
-
setState<K_1 extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<Pick<Omit<TreeSelectionProps, keyof import("../locale").LocaleProps>, "classPrefix" | "classnames" | "className" | "theme" | "value" | "disabled" | "onClick" | "options" | "inline" | "onChange" | "itemClassName" | "labelClassName" | "onDeferLoad" | "onLeftDeferLoad" | "option2value"
|
291
|
+
setState<K_1 extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<Pick<Omit<TreeSelectionProps, keyof import("../locale").LocaleProps>, "classPrefix" | "classnames" | "className" | "theme" | "value" | "disabled" | "onClick" | "options" | "inline" | "onChange" | "itemClassName" | "labelClassName" | "onDeferLoad" | "onLeftDeferLoad" | "option2value"> & Partial<Pick<Omit<TreeSelectionProps, keyof import("../locale").LocaleProps>, "multiple" | "placeholder" | "expand" | "clearable" | "itemRender">> & Partial<Pick<{
|
292
292
|
expand: "first";
|
293
293
|
placeholder: string;
|
294
294
|
itemRender: typeof BaseSelection.itemRender;
|
@@ -299,7 +299,7 @@ declare const _default: {
|
|
299
299
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
300
300
|
}>) => {} | Pick<{}, K_1> | null) | Pick<{}, K_1> | null, callback?: (() => void) | undefined): void;
|
301
301
|
forceUpdate(callback?: (() => void) | undefined): void;
|
302
|
-
readonly props: Readonly<Pick<Omit<TreeSelectionProps, keyof import("../locale").LocaleProps>, "classPrefix" | "classnames" | "className" | "theme" | "value" | "disabled" | "onClick" | "options" | "inline" | "onChange" | "itemClassName" | "labelClassName" | "onDeferLoad" | "onLeftDeferLoad" | "option2value"
|
302
|
+
readonly props: Readonly<Pick<Omit<TreeSelectionProps, keyof import("../locale").LocaleProps>, "classPrefix" | "classnames" | "className" | "theme" | "value" | "disabled" | "onClick" | "options" | "inline" | "onChange" | "itemClassName" | "labelClassName" | "onDeferLoad" | "onLeftDeferLoad" | "option2value"> & Partial<Pick<Omit<TreeSelectionProps, keyof import("../locale").LocaleProps>, "multiple" | "placeholder" | "expand" | "clearable" | "itemRender">> & Partial<Pick<{
|
303
303
|
expand: "first";
|
304
304
|
placeholder: string;
|
305
305
|
itemRender: typeof BaseSelection.itemRender;
|
@@ -316,7 +316,7 @@ declare const _default: {
|
|
316
316
|
[key: string]: React.ReactInstance;
|
317
317
|
};
|
318
318
|
componentDidMount?(): void;
|
319
|
-
shouldComponentUpdate?(nextProps: Readonly<Pick<Omit<TreeSelectionProps, keyof import("../locale").LocaleProps>, "classPrefix" | "classnames" | "className" | "theme" | "value" | "disabled" | "onClick" | "options" | "inline" | "onChange" | "itemClassName" | "labelClassName" | "onDeferLoad" | "onLeftDeferLoad" | "option2value"
|
319
|
+
shouldComponentUpdate?(nextProps: Readonly<Pick<Omit<TreeSelectionProps, keyof import("../locale").LocaleProps>, "classPrefix" | "classnames" | "className" | "theme" | "value" | "disabled" | "onClick" | "options" | "inline" | "onChange" | "itemClassName" | "labelClassName" | "onDeferLoad" | "onLeftDeferLoad" | "option2value"> & Partial<Pick<Omit<TreeSelectionProps, keyof import("../locale").LocaleProps>, "multiple" | "placeholder" | "expand" | "clearable" | "itemRender">> & Partial<Pick<{
|
320
320
|
expand: "first";
|
321
321
|
placeholder: string;
|
322
322
|
itemRender: typeof BaseSelection.itemRender;
|
@@ -328,7 +328,7 @@ declare const _default: {
|
|
328
328
|
}>, nextState: Readonly<{}>, nextContext: any): boolean;
|
329
329
|
componentWillUnmount?(): void;
|
330
330
|
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
|
331
|
-
getSnapshotBeforeUpdate?(prevProps: Readonly<Pick<Omit<TreeSelectionProps, keyof import("../locale").LocaleProps>, "classPrefix" | "classnames" | "className" | "theme" | "value" | "disabled" | "onClick" | "options" | "inline" | "onChange" | "itemClassName" | "labelClassName" | "onDeferLoad" | "onLeftDeferLoad" | "option2value"
|
331
|
+
getSnapshotBeforeUpdate?(prevProps: Readonly<Pick<Omit<TreeSelectionProps, keyof import("../locale").LocaleProps>, "classPrefix" | "classnames" | "className" | "theme" | "value" | "disabled" | "onClick" | "options" | "inline" | "onChange" | "itemClassName" | "labelClassName" | "onDeferLoad" | "onLeftDeferLoad" | "option2value"> & Partial<Pick<Omit<TreeSelectionProps, keyof import("../locale").LocaleProps>, "multiple" | "placeholder" | "expand" | "clearable" | "itemRender">> & Partial<Pick<{
|
332
332
|
expand: "first";
|
333
333
|
placeholder: string;
|
334
334
|
itemRender: typeof BaseSelection.itemRender;
|
@@ -338,7 +338,7 @@ declare const _default: {
|
|
338
338
|
locale?: string | undefined;
|
339
339
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
340
340
|
}>, prevState: Readonly<{}>): any;
|
341
|
-
componentDidUpdate?(prevProps: Readonly<Pick<Omit<TreeSelectionProps, keyof import("../locale").LocaleProps>, "classPrefix" | "classnames" | "className" | "theme" | "value" | "disabled" | "onClick" | "options" | "inline" | "onChange" | "itemClassName" | "labelClassName" | "onDeferLoad" | "onLeftDeferLoad" | "option2value"
|
341
|
+
componentDidUpdate?(prevProps: Readonly<Pick<Omit<TreeSelectionProps, keyof import("../locale").LocaleProps>, "classPrefix" | "classnames" | "className" | "theme" | "value" | "disabled" | "onClick" | "options" | "inline" | "onChange" | "itemClassName" | "labelClassName" | "onDeferLoad" | "onLeftDeferLoad" | "option2value"> & Partial<Pick<Omit<TreeSelectionProps, keyof import("../locale").LocaleProps>, "multiple" | "placeholder" | "expand" | "clearable" | "itemRender">> & Partial<Pick<{
|
342
342
|
expand: "first";
|
343
343
|
placeholder: string;
|
344
344
|
itemRender: typeof BaseSelection.itemRender;
|
@@ -350,7 +350,7 @@ declare const _default: {
|
|
350
350
|
}>, prevState: Readonly<{}>, snapshot?: any): void;
|
351
351
|
componentWillMount?(): void;
|
352
352
|
UNSAFE_componentWillMount?(): void;
|
353
|
-
componentWillReceiveProps?(nextProps: Readonly<Pick<Omit<TreeSelectionProps, keyof import("../locale").LocaleProps>, "classPrefix" | "classnames" | "className" | "theme" | "value" | "disabled" | "onClick" | "options" | "inline" | "onChange" | "itemClassName" | "labelClassName" | "onDeferLoad" | "onLeftDeferLoad" | "option2value"
|
353
|
+
componentWillReceiveProps?(nextProps: Readonly<Pick<Omit<TreeSelectionProps, keyof import("../locale").LocaleProps>, "classPrefix" | "classnames" | "className" | "theme" | "value" | "disabled" | "onClick" | "options" | "inline" | "onChange" | "itemClassName" | "labelClassName" | "onDeferLoad" | "onLeftDeferLoad" | "option2value"> & Partial<Pick<Omit<TreeSelectionProps, keyof import("../locale").LocaleProps>, "multiple" | "placeholder" | "expand" | "clearable" | "itemRender">> & Partial<Pick<{
|
354
354
|
expand: "first";
|
355
355
|
placeholder: string;
|
356
356
|
itemRender: typeof BaseSelection.itemRender;
|
@@ -360,7 +360,7 @@ declare const _default: {
|
|
360
360
|
locale?: string | undefined;
|
361
361
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
362
362
|
}>, nextContext: any): void;
|
363
|
-
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<Pick<Omit<TreeSelectionProps, keyof import("../locale").LocaleProps>, "classPrefix" | "classnames" | "className" | "theme" | "value" | "disabled" | "onClick" | "options" | "inline" | "onChange" | "itemClassName" | "labelClassName" | "onDeferLoad" | "onLeftDeferLoad" | "option2value"
|
363
|
+
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<Pick<Omit<TreeSelectionProps, keyof import("../locale").LocaleProps>, "classPrefix" | "classnames" | "className" | "theme" | "value" | "disabled" | "onClick" | "options" | "inline" | "onChange" | "itemClassName" | "labelClassName" | "onDeferLoad" | "onLeftDeferLoad" | "option2value"> & Partial<Pick<Omit<TreeSelectionProps, keyof import("../locale").LocaleProps>, "multiple" | "placeholder" | "expand" | "clearable" | "itemRender">> & Partial<Pick<{
|
364
364
|
expand: "first";
|
365
365
|
placeholder: string;
|
366
366
|
itemRender: typeof BaseSelection.itemRender;
|
@@ -370,7 +370,7 @@ declare const _default: {
|
|
370
370
|
locale?: string | undefined;
|
371
371
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
372
372
|
}>, nextContext: any): void;
|
373
|
-
componentWillUpdate?(nextProps: Readonly<Pick<Omit<TreeSelectionProps, keyof import("../locale").LocaleProps>, "classPrefix" | "classnames" | "className" | "theme" | "value" | "disabled" | "onClick" | "options" | "inline" | "onChange" | "itemClassName" | "labelClassName" | "onDeferLoad" | "onLeftDeferLoad" | "option2value"
|
373
|
+
componentWillUpdate?(nextProps: Readonly<Pick<Omit<TreeSelectionProps, keyof import("../locale").LocaleProps>, "classPrefix" | "classnames" | "className" | "theme" | "value" | "disabled" | "onClick" | "options" | "inline" | "onChange" | "itemClassName" | "labelClassName" | "onDeferLoad" | "onLeftDeferLoad" | "option2value"> & Partial<Pick<Omit<TreeSelectionProps, keyof import("../locale").LocaleProps>, "multiple" | "placeholder" | "expand" | "clearable" | "itemRender">> & Partial<Pick<{
|
374
374
|
expand: "first";
|
375
375
|
placeholder: string;
|
376
376
|
itemRender: typeof BaseSelection.itemRender;
|
@@ -380,7 +380,7 @@ declare const _default: {
|
|
380
380
|
locale?: string | undefined;
|
381
381
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
382
382
|
}>, nextState: Readonly<{}>, nextContext: any): void;
|
383
|
-
UNSAFE_componentWillUpdate?(nextProps: Readonly<Pick<Omit<TreeSelectionProps, keyof import("../locale").LocaleProps>, "classPrefix" | "classnames" | "className" | "theme" | "value" | "disabled" | "onClick" | "options" | "inline" | "onChange" | "itemClassName" | "labelClassName" | "onDeferLoad" | "onLeftDeferLoad" | "option2value"
|
383
|
+
UNSAFE_componentWillUpdate?(nextProps: Readonly<Pick<Omit<TreeSelectionProps, keyof import("../locale").LocaleProps>, "classPrefix" | "classnames" | "className" | "theme" | "value" | "disabled" | "onClick" | "options" | "inline" | "onChange" | "itemClassName" | "labelClassName" | "onDeferLoad" | "onLeftDeferLoad" | "option2value"> & Partial<Pick<Omit<TreeSelectionProps, keyof import("../locale").LocaleProps>, "multiple" | "placeholder" | "expand" | "clearable" | "itemRender">> & Partial<Pick<{
|
384
384
|
expand: "first";
|
385
385
|
placeholder: string;
|
386
386
|
itemRender: typeof BaseSelection.itemRender;
|
@@ -398,7 +398,7 @@ declare const _default: {
|
|
398
398
|
ComposedComponent: typeof TreeSelection;
|
399
399
|
}, {}> & {
|
400
400
|
ComposedComponent: {
|
401
|
-
new (props: Pick<Omit<TreeSelectionProps, keyof import("../locale").LocaleProps>, "classPrefix" | "classnames" | "className" | "theme" | "value" | "disabled" | "onClick" | "options" | "inline" | "onChange" | "itemClassName" | "labelClassName" | "onDeferLoad" | "onLeftDeferLoad" | "option2value"
|
401
|
+
new (props: Pick<Omit<TreeSelectionProps, keyof import("../locale").LocaleProps>, "classPrefix" | "classnames" | "className" | "theme" | "value" | "disabled" | "onClick" | "options" | "inline" | "onChange" | "itemClassName" | "labelClassName" | "onDeferLoad" | "onLeftDeferLoad" | "option2value"> & Partial<Pick<Omit<TreeSelectionProps, keyof import("../locale").LocaleProps>, "multiple" | "placeholder" | "expand" | "clearable" | "itemRender">> & Partial<Pick<{
|
402
402
|
expand: "first";
|
403
403
|
placeholder: string;
|
404
404
|
itemRender: typeof BaseSelection.itemRender;
|
@@ -413,7 +413,7 @@ declare const _default: {
|
|
413
413
|
getWrappedInstance(): any;
|
414
414
|
render(): JSX.Element;
|
415
415
|
context: any;
|
416
|
-
setState<K_1 extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<Pick<Omit<TreeSelectionProps, keyof import("../locale").LocaleProps>, "classPrefix" | "classnames" | "className" | "theme" | "value" | "disabled" | "onClick" | "options" | "inline" | "onChange" | "itemClassName" | "labelClassName" | "onDeferLoad" | "onLeftDeferLoad" | "option2value"
|
416
|
+
setState<K_1 extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<Pick<Omit<TreeSelectionProps, keyof import("../locale").LocaleProps>, "classPrefix" | "classnames" | "className" | "theme" | "value" | "disabled" | "onClick" | "options" | "inline" | "onChange" | "itemClassName" | "labelClassName" | "onDeferLoad" | "onLeftDeferLoad" | "option2value"> & Partial<Pick<Omit<TreeSelectionProps, keyof import("../locale").LocaleProps>, "multiple" | "placeholder" | "expand" | "clearable" | "itemRender">> & Partial<Pick<{
|
417
417
|
expand: "first";
|
418
418
|
placeholder: string;
|
419
419
|
itemRender: typeof BaseSelection.itemRender;
|
@@ -424,7 +424,7 @@ declare const _default: {
|
|
424
424
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
425
425
|
}>) => {} | Pick<{}, K_1> | null) | Pick<{}, K_1> | null, callback?: (() => void) | undefined): void;
|
426
426
|
forceUpdate(callback?: (() => void) | undefined): void;
|
427
|
-
readonly props: Readonly<Pick<Omit<TreeSelectionProps, keyof import("../locale").LocaleProps>, "classPrefix" | "classnames" | "className" | "theme" | "value" | "disabled" | "onClick" | "options" | "inline" | "onChange" | "itemClassName" | "labelClassName" | "onDeferLoad" | "onLeftDeferLoad" | "option2value"
|
427
|
+
readonly props: Readonly<Pick<Omit<TreeSelectionProps, keyof import("../locale").LocaleProps>, "classPrefix" | "classnames" | "className" | "theme" | "value" | "disabled" | "onClick" | "options" | "inline" | "onChange" | "itemClassName" | "labelClassName" | "onDeferLoad" | "onLeftDeferLoad" | "option2value"> & Partial<Pick<Omit<TreeSelectionProps, keyof import("../locale").LocaleProps>, "multiple" | "placeholder" | "expand" | "clearable" | "itemRender">> & Partial<Pick<{
|
428
428
|
expand: "first";
|
429
429
|
placeholder: string;
|
430
430
|
itemRender: typeof BaseSelection.itemRender;
|
@@ -441,7 +441,7 @@ declare const _default: {
|
|
441
441
|
[key: string]: React.ReactInstance;
|
442
442
|
};
|
443
443
|
componentDidMount?(): void;
|
444
|
-
shouldComponentUpdate?(nextProps: Readonly<Pick<Omit<TreeSelectionProps, keyof import("../locale").LocaleProps>, "classPrefix" | "classnames" | "className" | "theme" | "value" | "disabled" | "onClick" | "options" | "inline" | "onChange" | "itemClassName" | "labelClassName" | "onDeferLoad" | "onLeftDeferLoad" | "option2value"
|
444
|
+
shouldComponentUpdate?(nextProps: Readonly<Pick<Omit<TreeSelectionProps, keyof import("../locale").LocaleProps>, "classPrefix" | "classnames" | "className" | "theme" | "value" | "disabled" | "onClick" | "options" | "inline" | "onChange" | "itemClassName" | "labelClassName" | "onDeferLoad" | "onLeftDeferLoad" | "option2value"> & Partial<Pick<Omit<TreeSelectionProps, keyof import("../locale").LocaleProps>, "multiple" | "placeholder" | "expand" | "clearable" | "itemRender">> & Partial<Pick<{
|
445
445
|
expand: "first";
|
446
446
|
placeholder: string;
|
447
447
|
itemRender: typeof BaseSelection.itemRender;
|
@@ -453,7 +453,7 @@ declare const _default: {
|
|
453
453
|
}>, nextState: Readonly<{}>, nextContext: any): boolean;
|
454
454
|
componentWillUnmount?(): void;
|
455
455
|
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
|
456
|
-
getSnapshotBeforeUpdate?(prevProps: Readonly<Pick<Omit<TreeSelectionProps, keyof import("../locale").LocaleProps>, "classPrefix" | "classnames" | "className" | "theme" | "value" | "disabled" | "onClick" | "options" | "inline" | "onChange" | "itemClassName" | "labelClassName" | "onDeferLoad" | "onLeftDeferLoad" | "option2value"
|
456
|
+
getSnapshotBeforeUpdate?(prevProps: Readonly<Pick<Omit<TreeSelectionProps, keyof import("../locale").LocaleProps>, "classPrefix" | "classnames" | "className" | "theme" | "value" | "disabled" | "onClick" | "options" | "inline" | "onChange" | "itemClassName" | "labelClassName" | "onDeferLoad" | "onLeftDeferLoad" | "option2value"> & Partial<Pick<Omit<TreeSelectionProps, keyof import("../locale").LocaleProps>, "multiple" | "placeholder" | "expand" | "clearable" | "itemRender">> & Partial<Pick<{
|
457
457
|
expand: "first";
|
458
458
|
placeholder: string;
|
459
459
|
itemRender: typeof BaseSelection.itemRender;
|
@@ -463,7 +463,7 @@ declare const _default: {
|
|
463
463
|
locale?: string | undefined;
|
464
464
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
465
465
|
}>, prevState: Readonly<{}>): any;
|
466
|
-
componentDidUpdate?(prevProps: Readonly<Pick<Omit<TreeSelectionProps, keyof import("../locale").LocaleProps>, "classPrefix" | "classnames" | "className" | "theme" | "value" | "disabled" | "onClick" | "options" | "inline" | "onChange" | "itemClassName" | "labelClassName" | "onDeferLoad" | "onLeftDeferLoad" | "option2value"
|
466
|
+
componentDidUpdate?(prevProps: Readonly<Pick<Omit<TreeSelectionProps, keyof import("../locale").LocaleProps>, "classPrefix" | "classnames" | "className" | "theme" | "value" | "disabled" | "onClick" | "options" | "inline" | "onChange" | "itemClassName" | "labelClassName" | "onDeferLoad" | "onLeftDeferLoad" | "option2value"> & Partial<Pick<Omit<TreeSelectionProps, keyof import("../locale").LocaleProps>, "multiple" | "placeholder" | "expand" | "clearable" | "itemRender">> & Partial<Pick<{
|
467
467
|
expand: "first";
|
468
468
|
placeholder: string;
|
469
469
|
itemRender: typeof BaseSelection.itemRender;
|
@@ -475,7 +475,7 @@ declare const _default: {
|
|
475
475
|
}>, prevState: Readonly<{}>, snapshot?: any): void;
|
476
476
|
componentWillMount?(): void;
|
477
477
|
UNSAFE_componentWillMount?(): void;
|
478
|
-
componentWillReceiveProps?(nextProps: Readonly<Pick<Omit<TreeSelectionProps, keyof import("../locale").LocaleProps>, "classPrefix" | "classnames" | "className" | "theme" | "value" | "disabled" | "onClick" | "options" | "inline" | "onChange" | "itemClassName" | "labelClassName" | "onDeferLoad" | "onLeftDeferLoad" | "option2value"
|
478
|
+
componentWillReceiveProps?(nextProps: Readonly<Pick<Omit<TreeSelectionProps, keyof import("../locale").LocaleProps>, "classPrefix" | "classnames" | "className" | "theme" | "value" | "disabled" | "onClick" | "options" | "inline" | "onChange" | "itemClassName" | "labelClassName" | "onDeferLoad" | "onLeftDeferLoad" | "option2value"> & Partial<Pick<Omit<TreeSelectionProps, keyof import("../locale").LocaleProps>, "multiple" | "placeholder" | "expand" | "clearable" | "itemRender">> & Partial<Pick<{
|
479
479
|
expand: "first";
|
480
480
|
placeholder: string;
|
481
481
|
itemRender: typeof BaseSelection.itemRender;
|
@@ -485,7 +485,7 @@ declare const _default: {
|
|
485
485
|
locale?: string | undefined;
|
486
486
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
487
487
|
}>, nextContext: any): void;
|
488
|
-
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<Pick<Omit<TreeSelectionProps, keyof import("../locale").LocaleProps>, "classPrefix" | "classnames" | "className" | "theme" | "value" | "disabled" | "onClick" | "options" | "inline" | "onChange" | "itemClassName" | "labelClassName" | "onDeferLoad" | "onLeftDeferLoad" | "option2value"
|
488
|
+
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<Pick<Omit<TreeSelectionProps, keyof import("../locale").LocaleProps>, "classPrefix" | "classnames" | "className" | "theme" | "value" | "disabled" | "onClick" | "options" | "inline" | "onChange" | "itemClassName" | "labelClassName" | "onDeferLoad" | "onLeftDeferLoad" | "option2value"> & Partial<Pick<Omit<TreeSelectionProps, keyof import("../locale").LocaleProps>, "multiple" | "placeholder" | "expand" | "clearable" | "itemRender">> & Partial<Pick<{
|
489
489
|
expand: "first";
|
490
490
|
placeholder: string;
|
491
491
|
itemRender: typeof BaseSelection.itemRender;
|
@@ -495,7 +495,7 @@ declare const _default: {
|
|
495
495
|
locale?: string | undefined;
|
496
496
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
497
497
|
}>, nextContext: any): void;
|
498
|
-
componentWillUpdate?(nextProps: Readonly<Pick<Omit<TreeSelectionProps, keyof import("../locale").LocaleProps>, "classPrefix" | "classnames" | "className" | "theme" | "value" | "disabled" | "onClick" | "options" | "inline" | "onChange" | "itemClassName" | "labelClassName" | "onDeferLoad" | "onLeftDeferLoad" | "option2value"
|
498
|
+
componentWillUpdate?(nextProps: Readonly<Pick<Omit<TreeSelectionProps, keyof import("../locale").LocaleProps>, "classPrefix" | "classnames" | "className" | "theme" | "value" | "disabled" | "onClick" | "options" | "inline" | "onChange" | "itemClassName" | "labelClassName" | "onDeferLoad" | "onLeftDeferLoad" | "option2value"> & Partial<Pick<Omit<TreeSelectionProps, keyof import("../locale").LocaleProps>, "multiple" | "placeholder" | "expand" | "clearable" | "itemRender">> & Partial<Pick<{
|
499
499
|
expand: "first";
|
500
500
|
placeholder: string;
|
501
501
|
itemRender: typeof BaseSelection.itemRender;
|
@@ -505,7 +505,7 @@ declare const _default: {
|
|
505
505
|
locale?: string | undefined;
|
506
506
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
507
507
|
}>, nextState: Readonly<{}>, nextContext: any): void;
|
508
|
-
UNSAFE_componentWillUpdate?(nextProps: Readonly<Pick<Omit<TreeSelectionProps, keyof import("../locale").LocaleProps>, "classPrefix" | "classnames" | "className" | "theme" | "value" | "disabled" | "onClick" | "options" | "inline" | "onChange" | "itemClassName" | "labelClassName" | "onDeferLoad" | "onLeftDeferLoad" | "option2value"
|
508
|
+
UNSAFE_componentWillUpdate?(nextProps: Readonly<Pick<Omit<TreeSelectionProps, keyof import("../locale").LocaleProps>, "classPrefix" | "classnames" | "className" | "theme" | "value" | "disabled" | "onClick" | "options" | "inline" | "onChange" | "itemClassName" | "labelClassName" | "onDeferLoad" | "onLeftDeferLoad" | "option2value"> & Partial<Pick<Omit<TreeSelectionProps, keyof import("../locale").LocaleProps>, "multiple" | "placeholder" | "expand" | "clearable" | "itemRender">> & Partial<Pick<{
|
509
509
|
expand: "first";
|
510
510
|
placeholder: string;
|
511
511
|
itemRender: typeof BaseSelection.itemRender;
|
@@ -181,14 +181,13 @@ var TreeSelection = /** @class */ (function (_super) {
|
|
181
181
|
};
|
182
182
|
TreeSelection.prototype.render = function () {
|
183
183
|
var _this = this;
|
184
|
-
var _a;
|
185
|
-
var _b = this.props, value = _b.value, options = _b.options, className = _b.className, placeholder = _b.placeholder, cx = _b.classnames, option2value = _b.option2value, placeholderRender = _b.placeholderRender, __ = _b.translate;
|
184
|
+
var _a = this.props, value = _a.value, options = _a.options, className = _a.className, placeholder = _a.placeholder, cx = _a.classnames, option2value = _a.option2value, __ = _a.translate;
|
186
185
|
this.valueArray = Selection_1.BaseSelection.value2array(value, options, option2value);
|
187
186
|
var body = [];
|
188
187
|
if (Array.isArray(options) && options.length) {
|
189
188
|
body = options.map(function (option, key) { return _this.renderItem(option, key, [key]); });
|
190
189
|
}
|
191
|
-
return (react_1.default.createElement("div", { className: cx('TreeSelection', className) }, body && body.length ? (body) : (react_1.default.createElement("div", { className: cx('TreeSelection-placeholder') },
|
190
|
+
return (react_1.default.createElement("div", { className: cx('TreeSelection', className) }, body && body.length ? (body) : (react_1.default.createElement("div", { className: cx('TreeSelection-placeholder') }, __(placeholder)))));
|
192
191
|
};
|
193
192
|
TreeSelection.defaultProps = (0, tslib_1.__assign)((0, tslib_1.__assign)({}, Selection_1.BaseSelection.defaultProps), { expand: 'first' });
|
194
193
|
return TreeSelection;
|
@@ -6,8 +6,8 @@
|
|
6
6
|
"/src/components/TreeSelection.tsx"
|
7
7
|
],
|
8
8
|
"names": [],
|
9
|
-
"mappings": ";;;;AAAA,yCAA8D;AAC9D,kCAAmC;AACnC,6DAA0B;AAC1B,iDAA8C;AAC9C,qEAAkC;AAElC,0CAA8D;AAC9D,mEAAgC;AAChC,oCAAqC;AACrC,iCAA6B;AAU7B;IAAmC,8CAGlC;IAHD;QAAA,
|
9
|
+
"mappings": ";;;;AAAA,yCAA8D;AAC9D,kCAAmC;AACnC,6DAA0B;AAC1B,iDAA8C;AAC9C,qEAAkC;AAElC,0CAA8D;AAC9D,mEAAgC;AAChC,oCAAqC;AACrC,iCAA6B;AAU7B;IAAmC,8CAGlC;IAHD;QAAA,qEA+RC;QA1RC,WAAK,GAAuB;YAC1B,QAAQ,EAAE,EAAE;SACb,CAAC;;IAwRJ,CAAC;IAjRC,yCAAiB,GAAjB;QACE,IAAI,CAAC,YAAY,EAAE,CAAC;IACtB,CAAC;IAED,0CAAkB,GAAlB,UAAmB,SAA6B;QAC9C,IAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;QAEzB,IACE,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,CAA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AC,EAAnC,CAAmC,CAAC,CAAC;SAC1E;QAED,OAAO,CACL,uCAAK,SAAS,EAAE,EAAE,CAAC,eAAe,EAAE,SAAS,CAAC,IAC3C,IAAI,IAAI,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CACrB,IAAI,CACL,CAAC,CAAC,CAAC,CACF,uCAAK,SAAS,EAAE,EAAE,CAAC,2BAA2B,CAAC,IAC5C,EAAE,CAAC,WAAW,CAAC,CACZ,CACP,CACG,CACP,CAAC;IACJ,CAAC;IArRM,0BAAY,mDACd,yBAAa,CAAC,YAAY,KAC7B,MAAM,EAAE,OAAkB,IAC1B;IAmRJ,oBAAC;CAAA,AA/RD,CAAmC,yBAAa,GA+R/C;AA/RY,sCAAa;AAiS1B,kBAAe,IAAA,iBAAS,EACtB,IAAA,mBAAU,EACR,IAAA,+BAAc,EAAC,aAAa,EAAE;IAC5B,KAAK,EAAE,UAAU;CAClB,CAAC,CACH,CACF,CAAC",
|
10
10
|
"sourcesContent": [
|
11
|
-
"import {BaseSelection, BaseSelectionProps} from './Selection';\nimport {themeable} from '../theme';\nimport React from 'react';\nimport {uncontrollable} from 'uncontrollable';\nimport Checkbox from './Checkbox';\nimport {Option} from './Select';\nimport {autobind, eachTree, everyTree} from '../utils/helper';\nimport Spinner from './Spinner';\nimport {localeable} from '../locale';\nimport {Icon} from './icons';\n\nexport interface TreeSelectionProps extends BaseSelectionProps {\n expand?: 'all' | 'first' | 'root' | 'none';\n}\n\nexport interface TreeSelectionState {\n expanded: Array<string>;\n}\n\nexport class TreeSelection extends BaseSelection<\n TreeSelectionProps,\n TreeSelectionState\n> {\n valueArray: Array<Option>;\n state: TreeSelectionState = {\n expanded: []\n };\n\n static defaultProps = {\n ...BaseSelection.defaultProps,\n expand: 'first' as 'first'\n };\n\n componentDidMount() {\n this.syncExpanded();\n }\n\n componentDidUpdate(prevProps: TreeSelectionProps) {\n const props = this.props;\n\n if (\n !this.state.expanded.length &&\n (props.expand !== prevProps.expand || props.options !== prevProps.options)\n ) {\n this.syncExpanded();\n }\n }\n\n syncExpanded() {\n const options = this.props.options;\n const mode = this.props.expand;\n const expanded: Array<string> = [];\n\n if (!Array.isArray(options)) {\n return;\n }\n\n if (mode === 'first' || mode === 'root') {\n options.every((option, index) => {\n if (Array.isArray(option.children)) {\n expanded.push(`${index}`);\n return mode === 'root';\n }\n return true;\n });\n } else if (mode === 'all') {\n everyTree(options, (option, index, level, paths, indexes) => {\n if (Array.isArray(option.children)) {\n expanded.push(`${indexes.concat(index).join('-')}`);\n }\n return true;\n });\n }\n\n this.setState({expanded});\n }\n\n toggleOption(option: Option) {\n const {\n value,\n onChange,\n option2value,\n options,\n onDeferLoad,\n disabled,\n multiple,\n clearable\n } = this.props;\n\n if (disabled || option.disabled) {\n return;\n } else if (option.defer && !option.loaded) {\n onDeferLoad?.(option);\n return;\n }\n\n let valueArray = BaseSelection.value2array(value, options, option2value);\n\n if (\n option.value === void 0 &&\n Array.isArray(option.children) &&\n option.children.length &&\n multiple\n ) {\n const someCheckedFn = (child: Option) =>\n (Array.isArray(child.children) && child.children.length\n ? child.children.some(someCheckedFn)\n : false) ||\n (child.value !== void 0 && ~valueArray.indexOf(child));\n const someChecked = option.children.some(someCheckedFn);\n const eachFn = (child: Option) => {\n if (Array.isArray(child.children) && child.children.length) {\n child.children.forEach(eachFn);\n }\n\n if (child.value !== void 0) {\n const idx = valueArray.indexOf(child);\n\n ~idx && valueArray.splice(idx, 1);\n\n if (!someChecked) {\n valueArray.push(child);\n }\n }\n };\n option.children.forEach(eachFn);\n } else {\n let idx = valueArray.indexOf(option);\n\n if (~idx && (multiple || clearable)) {\n valueArray.splice(idx, 1);\n } else if (multiple) {\n valueArray.push(option);\n } else {\n valueArray = [option];\n }\n }\n\n let newValue: string | Array<Option> = option2value\n ? valueArray.map(item => option2value(item))\n : valueArray;\n\n onChange && onChange(multiple ? newValue : newValue[0]);\n }\n\n toggleCollapsed(option: Option, index: string) {\n const onDeferLoad = this.props.onDeferLoad;\n const expanded = this.state.expanded.concat();\n const idx = expanded.indexOf(index);\n\n if (~idx) {\n expanded.splice(idx, 1);\n } else {\n expanded.push(index);\n }\n\n this.setState(\n {\n expanded: expanded\n },\n option.defer && onDeferLoad ? () => onDeferLoad(option) : undefined\n );\n }\n\n renderItem(option: Option, index: number, indexes: Array<number> = []) {\n const {\n labelClassName,\n disabled,\n classnames: cx,\n itemClassName,\n itemRender,\n multiple\n } = this.props;\n const id = indexes.join('-');\n const valueArray = this.valueArray;\n let partial = false;\n let checked = false;\n let hasChildren = Array.isArray(option.children) && option.children.length;\n\n if (option.value === void 0 && hasChildren) {\n let allchecked = true;\n let partialChecked = false;\n const eachFn = (child: Option) => {\n if (Array.isArray(child.children) && child.children.length) {\n child.children.forEach(eachFn);\n }\n\n if (child.value !== void 0) {\n const isIn = !!~valueArray.indexOf(child);\n\n if (isIn && !partialChecked) {\n partialChecked = true;\n } else if (!isIn && allchecked) {\n allchecked = false;\n }\n\n checked = partialChecked;\n partial = partialChecked && !allchecked;\n }\n };\n\n option.children!.forEach(eachFn);\n } else {\n checked = !!~valueArray.indexOf(option);\n }\n\n const expaned = !!~this.state.expanded.indexOf(id);\n\n return (\n <div\n key={index}\n className={cx(\n 'TreeSelection-item',\n disabled || option.disabled || (option.defer && option.loading)\n ? 'is-disabled'\n : '',\n expaned ? 'is-expanded' : ''\n )}\n >\n <div\n className={cx(\n 'TreeSelection-itemInner',\n itemClassName,\n option.className,\n checked ? 'is-active' : ''\n )}\n onClick={() => this.toggleOption(option)}\n >\n {hasChildren || option.defer ? (\n <a\n onClick={(e: React.MouseEvent<any>) => {\n e.stopPropagation();\n this.toggleCollapsed(option, id);\n }}\n className={cx('Table-expandBtn', expaned ? 'is-active' : '')}\n >\n <Icon icon=\"right-arrow-bold\" className=\"icon\" />\n </a>\n ) : null}\n\n {option.defer && option.loading ? <Spinner show size=\"sm\" /> : null}\n\n {multiple && (!option.defer || option.loaded) ? (\n <Checkbox\n size=\"sm\"\n checked={checked}\n partial={partial}\n disabled={disabled || option.disabled}\n labelClassName={labelClassName}\n description={option.description}\n />\n ) : null}\n\n <div className={cx('TreeSelection-itemLabel')}>\n {itemRender(option, {\n index: index,\n multiple: multiple,\n checked: checked,\n onChange: () => this.toggleOption(option),\n disabled: disabled || option.disabled\n })}\n </div>\n\n {option.defer && option.loading ? <Spinner show size=\"sm\" /> : null}\n </div>\n {hasChildren ? (\n <div className={cx('TreeSelection-sublist')}>\n {option.children!.map((option, key) =>\n this.renderItem(option, key, indexes.concat(key))\n )}\n </div>\n ) : null}\n </div>\n );\n }\n\n render() {\n const {\n value,\n options,\n className,\n placeholder,\n classnames: cx,\n option2value,\n
|
11
|
+
"import {BaseSelection, BaseSelectionProps} from './Selection';\nimport {themeable} from '../theme';\nimport React from 'react';\nimport {uncontrollable} from 'uncontrollable';\nimport Checkbox from './Checkbox';\nimport {Option} from './Select';\nimport {autobind, eachTree, everyTree} from '../utils/helper';\nimport Spinner from './Spinner';\nimport {localeable} from '../locale';\nimport {Icon} from './icons';\n\nexport interface TreeSelectionProps extends BaseSelectionProps {\n expand?: 'all' | 'first' | 'root' | 'none';\n}\n\nexport interface TreeSelectionState {\n expanded: Array<string>;\n}\n\nexport class TreeSelection extends BaseSelection<\n TreeSelectionProps,\n TreeSelectionState\n> {\n valueArray: Array<Option>;\n state: TreeSelectionState = {\n expanded: []\n };\n\n static defaultProps = {\n ...BaseSelection.defaultProps,\n expand: 'first' as 'first'\n };\n\n componentDidMount() {\n this.syncExpanded();\n }\n\n componentDidUpdate(prevProps: TreeSelectionProps) {\n const props = this.props;\n\n if (\n !this.state.expanded.length &&\n (props.expand !== prevProps.expand || props.options !== prevProps.options)\n ) {\n this.syncExpanded();\n }\n }\n\n syncExpanded() {\n const options = this.props.options;\n const mode = this.props.expand;\n const expanded: Array<string> = [];\n\n if (!Array.isArray(options)) {\n return;\n }\n\n if (mode === 'first' || mode === 'root') {\n options.every((option, index) => {\n if (Array.isArray(option.children)) {\n expanded.push(`${index}`);\n return mode === 'root';\n }\n return true;\n });\n } else if (mode === 'all') {\n everyTree(options, (option, index, level, paths, indexes) => {\n if (Array.isArray(option.children)) {\n expanded.push(`${indexes.concat(index).join('-')}`);\n }\n return true;\n });\n }\n\n this.setState({expanded});\n }\n\n toggleOption(option: Option) {\n const {\n value,\n onChange,\n option2value,\n options,\n onDeferLoad,\n disabled,\n multiple,\n clearable\n } = this.props;\n\n if (disabled || option.disabled) {\n return;\n } else if (option.defer && !option.loaded) {\n onDeferLoad?.(option);\n return;\n }\n\n let valueArray = BaseSelection.value2array(value, options, option2value);\n\n if (\n option.value === void 0 &&\n Array.isArray(option.children) &&\n option.children.length &&\n multiple\n ) {\n const someCheckedFn = (child: Option) =>\n (Array.isArray(child.children) && child.children.length\n ? child.children.some(someCheckedFn)\n : false) ||\n (child.value !== void 0 && ~valueArray.indexOf(child));\n const someChecked = option.children.some(someCheckedFn);\n const eachFn = (child: Option) => {\n if (Array.isArray(child.children) && child.children.length) {\n child.children.forEach(eachFn);\n }\n\n if (child.value !== void 0) {\n const idx = valueArray.indexOf(child);\n\n ~idx && valueArray.splice(idx, 1);\n\n if (!someChecked) {\n valueArray.push(child);\n }\n }\n };\n option.children.forEach(eachFn);\n } else {\n let idx = valueArray.indexOf(option);\n\n if (~idx && (multiple || clearable)) {\n valueArray.splice(idx, 1);\n } else if (multiple) {\n valueArray.push(option);\n } else {\n valueArray = [option];\n }\n }\n\n let newValue: string | Array<Option> = option2value\n ? valueArray.map(item => option2value(item))\n : valueArray;\n\n onChange && onChange(multiple ? newValue : newValue[0]);\n }\n\n toggleCollapsed(option: Option, index: string) {\n const onDeferLoad = this.props.onDeferLoad;\n const expanded = this.state.expanded.concat();\n const idx = expanded.indexOf(index);\n\n if (~idx) {\n expanded.splice(idx, 1);\n } else {\n expanded.push(index);\n }\n\n this.setState(\n {\n expanded: expanded\n },\n option.defer && onDeferLoad ? () => onDeferLoad(option) : undefined\n );\n }\n\n renderItem(option: Option, index: number, indexes: Array<number> = []) {\n const {\n labelClassName,\n disabled,\n classnames: cx,\n itemClassName,\n itemRender,\n multiple\n } = this.props;\n const id = indexes.join('-');\n const valueArray = this.valueArray;\n let partial = false;\n let checked = false;\n let hasChildren = Array.isArray(option.children) && option.children.length;\n\n if (option.value === void 0 && hasChildren) {\n let allchecked = true;\n let partialChecked = false;\n const eachFn = (child: Option) => {\n if (Array.isArray(child.children) && child.children.length) {\n child.children.forEach(eachFn);\n }\n\n if (child.value !== void 0) {\n const isIn = !!~valueArray.indexOf(child);\n\n if (isIn && !partialChecked) {\n partialChecked = true;\n } else if (!isIn && allchecked) {\n allchecked = false;\n }\n\n checked = partialChecked;\n partial = partialChecked && !allchecked;\n }\n };\n\n option.children!.forEach(eachFn);\n } else {\n checked = !!~valueArray.indexOf(option);\n }\n\n const expaned = !!~this.state.expanded.indexOf(id);\n\n return (\n <div\n key={index}\n className={cx(\n 'TreeSelection-item',\n disabled || option.disabled || (option.defer && option.loading)\n ? 'is-disabled'\n : '',\n expaned ? 'is-expanded' : ''\n )}\n >\n <div\n className={cx(\n 'TreeSelection-itemInner',\n itemClassName,\n option.className,\n checked ? 'is-active' : ''\n )}\n onClick={() => this.toggleOption(option)}\n >\n {hasChildren || option.defer ? (\n <a\n onClick={(e: React.MouseEvent<any>) => {\n e.stopPropagation();\n this.toggleCollapsed(option, id);\n }}\n className={cx('Table-expandBtn', expaned ? 'is-active' : '')}\n >\n <Icon icon=\"right-arrow-bold\" className=\"icon\" />\n </a>\n ) : null}\n\n {option.defer && option.loading ? <Spinner show size=\"sm\" /> : null}\n\n {multiple && (!option.defer || option.loaded) ? (\n <Checkbox\n size=\"sm\"\n checked={checked}\n partial={partial}\n disabled={disabled || option.disabled}\n labelClassName={labelClassName}\n description={option.description}\n />\n ) : null}\n\n <div className={cx('TreeSelection-itemLabel')}>\n {itemRender(option, {\n index: index,\n multiple: multiple,\n checked: checked,\n onChange: () => this.toggleOption(option),\n disabled: disabled || option.disabled\n })}\n </div>\n\n {option.defer && option.loading ? <Spinner show size=\"sm\" /> : null}\n </div>\n {hasChildren ? (\n <div className={cx('TreeSelection-sublist')}>\n {option.children!.map((option, key) =>\n this.renderItem(option, key, indexes.concat(key))\n )}\n </div>\n ) : null}\n </div>\n );\n }\n\n render() {\n const {\n value,\n options,\n className,\n placeholder,\n classnames: cx,\n option2value,\n translate: __\n } = this.props;\n\n this.valueArray = BaseSelection.value2array(value, options, option2value);\n let body: Array<React.ReactNode> = [];\n\n if (Array.isArray(options) && options.length) {\n body = options.map((option, key) => this.renderItem(option, key, [key]));\n }\n\n return (\n <div className={cx('TreeSelection', className)}>\n {body && body.length ? (\n body\n ) : (\n <div className={cx('TreeSelection-placeholder')}>\n {__(placeholder)}\n </div>\n )}\n </div>\n );\n }\n}\n\nexport default themeable(\n localeable(\n uncontrollable(TreeSelection, {\n value: 'onChange'\n })\n )\n);\n"
|
12
12
|
]
|
13
13
|
}
|