assui 3.1.68 → 3.1.70
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/es/complex-val-select/index.d.ts +17 -0
- package/es/{allow-complex-val-select → complex-val-select}/index.js +16 -14
- package/es/condition-select-input/index.d.ts +6 -5
- package/es/condition-select-input/index.js +3 -3
- package/es/index.d.ts +2 -2
- package/es/index.js +1 -1
- package/es/label-select/index.d.ts +2 -2
- package/es/label-select/index.js +2 -2
- package/lib/complex-val-select/index.d.ts +17 -0
- package/lib/{allow-complex-val-select → complex-val-select}/index.js +16 -14
- package/lib/condition-select-input/index.d.ts +6 -5
- package/lib/condition-select-input/index.js +3 -3
- package/lib/index.d.ts +2 -2
- package/lib/index.js +4 -4
- package/lib/label-select/index.d.ts +2 -2
- package/lib/label-select/index.js +2 -2
- package/package.json +2 -2
- package/es/allow-complex-val-select/index.d.ts +0 -13
- package/lib/allow-complex-val-select/index.d.ts +0 -13
- /package/es/{allow-complex-val-select → complex-val-select}/style/index.d.ts +0 -0
- /package/es/{allow-complex-val-select → complex-val-select}/style/index.js +0 -0
- /package/lib/{allow-complex-val-select → complex-val-select}/style/index.d.ts +0 -0
- /package/lib/{allow-complex-val-select → complex-val-select}/style/index.js +0 -0
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import type { BaseOptionType, SelectProps } from 'antd/lib/select';
|
|
3
|
+
declare const Option: import("rc-select/lib/Option").OptionFC;
|
|
4
|
+
export { Option };
|
|
5
|
+
export declare type ComplexValSelectValueType = string | number | any[] | Record<string, any> | null | undefined;
|
|
6
|
+
export interface ComplexValSelectOptionType extends BaseOptionType {
|
|
7
|
+
label: React.ReactNode;
|
|
8
|
+
value?: ComplexValSelectValueType;
|
|
9
|
+
children?: Omit<ComplexValSelectOptionType, 'children'>[];
|
|
10
|
+
}
|
|
11
|
+
export interface ComplexValSelectProps<T> extends Omit<SelectProps, 'value' | 'onChange' | 'options'> {
|
|
12
|
+
value?: T;
|
|
13
|
+
onChange?: (val: T, opt?: ComplexValSelectOptionType[]) => void;
|
|
14
|
+
options?: ComplexValSelectOptionType[];
|
|
15
|
+
}
|
|
16
|
+
declare const ComplexValSelect: React.ForwardRefExoticComponent<ComplexValSelectProps<ComplexValSelectValueType> & React.RefAttributes<unknown>>;
|
|
17
|
+
export default ComplexValSelect;
|
|
@@ -37,49 +37,51 @@ var __read = this && this.__read || function (o, n) {
|
|
|
37
37
|
import * as React from 'react';
|
|
38
38
|
import omit from 'lodash/omit';
|
|
39
39
|
import find from 'lodash/find';
|
|
40
|
+
import some from 'lodash/some';
|
|
41
|
+
import isArray from 'lodash/isArray';
|
|
42
|
+
import isObject from 'lodash/isObject';
|
|
40
43
|
import Select from "antd/es/select";
|
|
41
44
|
import useControllableValue from "ahooks/es/useControllableValue";
|
|
42
45
|
var Option = Select.Option;
|
|
43
46
|
export { Option };
|
|
44
|
-
var
|
|
47
|
+
var ComplexValSelect = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
45
48
|
var _a = __read(useControllableValue(props), 2),
|
|
46
49
|
value = _a[0],
|
|
47
50
|
setValue = _a[1];
|
|
48
|
-
var
|
|
49
|
-
useJSONStrVal = _b === void 0 ? false : _b,
|
|
50
|
-
options = props.options,
|
|
51
|
+
var options = props.options,
|
|
51
52
|
onChange = props.onChange,
|
|
52
53
|
onSelect = props.onSelect;
|
|
53
54
|
var selectRef = React.useRef(null);
|
|
54
55
|
React.useImperativeHandle(ref, function () {
|
|
55
56
|
return selectRef.current;
|
|
56
57
|
});
|
|
57
|
-
|
|
58
|
+
// 判断是否需要将optionValue转为JSON字符串
|
|
59
|
+
var isReferenceTypeVal = some(options, function (item) {
|
|
60
|
+
return isArray(item.value) || isObject(item.value);
|
|
61
|
+
});
|
|
62
|
+
var finalOptions = isReferenceTypeVal ? options === null || options === void 0 ? void 0 : options.map(function (item) {
|
|
58
63
|
return __assign(__assign({}, item), {
|
|
59
64
|
value: JSON.stringify(item.value)
|
|
60
65
|
});
|
|
61
66
|
}) : options;
|
|
62
67
|
var handleChange = function handleChange(val) {
|
|
63
|
-
var nextVal =
|
|
68
|
+
var nextVal = val && isReferenceTypeVal ? JSON.parse(val) : val;
|
|
64
69
|
setValue(nextVal);
|
|
65
70
|
onChange === null || onChange === void 0 ? void 0 : onChange(nextVal, options);
|
|
66
71
|
};
|
|
67
72
|
var handleSelect = function handleSelect(val) {
|
|
68
|
-
var nextVal =
|
|
73
|
+
var nextVal = val && isReferenceTypeVal ? JSON.parse(val) : val;
|
|
69
74
|
var selectOption = find(finalOptions, {
|
|
70
75
|
value: val
|
|
71
76
|
});
|
|
72
|
-
onSelect === null || onSelect === void 0 ? void 0 : onSelect(nextVal,
|
|
73
|
-
label: selectOption.label,
|
|
74
|
-
value: nextVal
|
|
75
|
-
});
|
|
77
|
+
onSelect === null || onSelect === void 0 ? void 0 : onSelect(nextVal, selectOption);
|
|
76
78
|
};
|
|
77
79
|
return /*#__PURE__*/React.createElement(Select, __assign({
|
|
78
80
|
ref: selectRef,
|
|
79
|
-
value:
|
|
81
|
+
value: value && isReferenceTypeVal ? JSON.stringify(value) : value,
|
|
80
82
|
options: finalOptions,
|
|
81
83
|
onChange: handleChange,
|
|
82
84
|
onSelect: handleSelect
|
|
83
|
-
}, omit(props, ['value', 'onChange', '
|
|
85
|
+
}, omit(props, ['value', 'onChange', 'options', 'onSelect'])));
|
|
84
86
|
});
|
|
85
|
-
export default
|
|
87
|
+
export default ComplexValSelect;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ComplexValSelectProps, ComplexValSelectValueType } from '../complex-val-select';
|
|
1
2
|
import type { SelectProps } from 'antd/lib/select';
|
|
2
3
|
import type { ConditionInputProps } from '../condition-input';
|
|
3
4
|
export declare enum InputTypeEnum {
|
|
@@ -10,16 +11,16 @@ export declare enum EntryTypeEnum {
|
|
|
10
11
|
}
|
|
11
12
|
export declare type ChangedEntryType = typeof EntryTypeEnum[keyof typeof EntryTypeEnum];
|
|
12
13
|
declare type SelectOptionsType = {
|
|
13
|
-
value:
|
|
14
|
+
value: ComplexValSelectValueType;
|
|
14
15
|
label: string;
|
|
15
16
|
};
|
|
16
17
|
export interface MainSelectOptionsType extends SelectOptionsType {
|
|
17
18
|
children?: SelectOptionsType[];
|
|
18
19
|
}
|
|
19
20
|
export interface ValueType {
|
|
20
|
-
selectValue?:
|
|
21
|
+
selectValue?: ComplexValSelectValueType;
|
|
21
22
|
inputValue?: SelectProps['value'] | ConditionInputProps['value'];
|
|
22
|
-
finalSelectValue?:
|
|
23
|
+
finalSelectValue?: ComplexValSelectProps<any>['value'] | ConditionInputProps['value'][];
|
|
23
24
|
changedEntryType?: ChangedEntryType;
|
|
24
25
|
}
|
|
25
26
|
export interface ConditionSelectInputProps {
|
|
@@ -27,11 +28,11 @@ export interface ConditionSelectInputProps {
|
|
|
27
28
|
/** 不需要展示联动输入框的字段值 */
|
|
28
29
|
hiddenInputKeys?: ValueType['selectValue'][];
|
|
29
30
|
/** selectProps */
|
|
30
|
-
selectProps?:
|
|
31
|
+
selectProps?: ComplexValSelectProps<any>;
|
|
31
32
|
/** 联动inputProps */
|
|
32
33
|
conditionInputProps?: ConditionInputProps;
|
|
33
34
|
/** 联动selectProps */
|
|
34
|
-
conditionSelectProps?:
|
|
35
|
+
conditionSelectProps?: ComplexValSelectProps<any>;
|
|
35
36
|
/** onChange */
|
|
36
37
|
onChange?: (value: ValueType) => void;
|
|
37
38
|
/** onBlur */
|
|
@@ -37,7 +37,7 @@ var __read = this && this.__read || function (o, n) {
|
|
|
37
37
|
import isNil from 'lodash/isNil';
|
|
38
38
|
import isEmpty from 'lodash/isEmpty';
|
|
39
39
|
import classNames from 'classnames';
|
|
40
|
-
import
|
|
40
|
+
import ComplexValSelect from '../complex-val-select';
|
|
41
41
|
import React, { useEffect, useState } from 'react';
|
|
42
42
|
import useControllableValue from "ahooks/es/useControllableValue";
|
|
43
43
|
import ConditionInput from '../condition-input';
|
|
@@ -170,7 +170,7 @@ var ConditionSelectInput = function ConditionSelectInput(props) {
|
|
|
170
170
|
}
|
|
171
171
|
}))) : /*#__PURE__*/React.createElement("div", {
|
|
172
172
|
className: "condition-select-select-input"
|
|
173
|
-
}, /*#__PURE__*/React.createElement(
|
|
173
|
+
}, /*#__PURE__*/React.createElement(ComplexValSelect, __assign({}, conditionSelectProps, {
|
|
174
174
|
onChange: onTypeSelectChange,
|
|
175
175
|
value: selectInputValue === null || selectInputValue === void 0 ? void 0 : selectInputValue.inputValue,
|
|
176
176
|
options: subSelectOptions,
|
|
@@ -186,7 +186,7 @@ var ConditionSelectInput = function ConditionSelectInput(props) {
|
|
|
186
186
|
'condition-two-select-selecter': !isInput,
|
|
187
187
|
'condition-only-selecter': !isShowInput
|
|
188
188
|
})
|
|
189
|
-
}, /*#__PURE__*/React.createElement(
|
|
189
|
+
}, /*#__PURE__*/React.createElement(ComplexValSelect, __assign({}, selectProps, {
|
|
190
190
|
onChange: onSelectChange,
|
|
191
191
|
value: selectInputValue === null || selectInputValue === void 0 ? void 0 : selectInputValue.selectValue,
|
|
192
192
|
options: optionsList,
|
package/es/index.d.ts
CHANGED
|
@@ -82,5 +82,5 @@ export type { LabelConditionSelectInputProps } from './label-condition-select-in
|
|
|
82
82
|
export { default as LabelConditionSelectInput } from './label-condition-select-input';
|
|
83
83
|
export type { MultipartUploadProps } from './multipart-upload';
|
|
84
84
|
export { default as MultipartUpload } from './multipart-upload';
|
|
85
|
-
export type {
|
|
86
|
-
export { default as
|
|
85
|
+
export type { ComplexValSelectProps } from './complex-val-select';
|
|
86
|
+
export { default as ComplexValSelect } from './complex-val-select';
|
package/es/index.js
CHANGED
|
@@ -42,4 +42,4 @@ export { default as Resizable } from './resizable';
|
|
|
42
42
|
export { default as Flex } from './flex';
|
|
43
43
|
export { default as LabelConditionSelectInput } from './label-condition-select-input';
|
|
44
44
|
export { default as MultipartUpload } from './multipart-upload';
|
|
45
|
-
export { default as
|
|
45
|
+
export { default as ComplexValSelect } from './complex-val-select';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { SelectProps } from 'antd/lib/select';
|
|
3
|
-
import type {
|
|
3
|
+
import type { ComplexValSelectProps } from '../complex-val-select';
|
|
4
4
|
declare const Option: import("rc-select/lib/Option").OptionFC;
|
|
5
5
|
export { Option };
|
|
6
|
-
export interface LabelSelectProps extends
|
|
6
|
+
export interface LabelSelectProps extends ComplexValSelectProps<any> {
|
|
7
7
|
label?: React.ReactNode;
|
|
8
8
|
onBlur?: (value: SelectProps['value']) => void;
|
|
9
9
|
}
|
package/es/label-select/index.js
CHANGED
|
@@ -37,7 +37,7 @@ var __read = this && this.__read || function (o, n) {
|
|
|
37
37
|
import React from 'react';
|
|
38
38
|
import useControllableValue from "ahooks/es/useControllableValue";
|
|
39
39
|
import Select from "antd/es/select";
|
|
40
|
-
import
|
|
40
|
+
import ComplexValSelect from '../complex-val-select';
|
|
41
41
|
import isArray from 'lodash/isArray';
|
|
42
42
|
import isUndefined from 'lodash/isUndefined';
|
|
43
43
|
import isNull from 'lodash/isNull';
|
|
@@ -83,7 +83,7 @@ var LabelSelect = function LabelSelect(props, ref) {
|
|
|
83
83
|
'label-select': true,
|
|
84
84
|
'label-select-label-scale': open || !isArray(value) && !isUndefined(value) && !isNull(value) || isArray(value) && value.length
|
|
85
85
|
}, className)
|
|
86
|
-
}, /*#__PURE__*/React.createElement(
|
|
86
|
+
}, /*#__PURE__*/React.createElement(ComplexValSelect, __assign({
|
|
87
87
|
maxTagCount: 3,
|
|
88
88
|
showSearch: false
|
|
89
89
|
}, omit(props, ['open', 'onChange', 'className', 'label', 'setOpen', 'isFocus']), {
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import type { BaseOptionType, SelectProps } from 'antd/lib/select';
|
|
3
|
+
declare const Option: import("rc-select/lib/Option").OptionFC;
|
|
4
|
+
export { Option };
|
|
5
|
+
export declare type ComplexValSelectValueType = string | number | any[] | Record<string, any> | null | undefined;
|
|
6
|
+
export interface ComplexValSelectOptionType extends BaseOptionType {
|
|
7
|
+
label: React.ReactNode;
|
|
8
|
+
value?: ComplexValSelectValueType;
|
|
9
|
+
children?: Omit<ComplexValSelectOptionType, 'children'>[];
|
|
10
|
+
}
|
|
11
|
+
export interface ComplexValSelectProps<T> extends Omit<SelectProps, 'value' | 'onChange' | 'options'> {
|
|
12
|
+
value?: T;
|
|
13
|
+
onChange?: (val: T, opt?: ComplexValSelectOptionType[]) => void;
|
|
14
|
+
options?: ComplexValSelectOptionType[];
|
|
15
|
+
}
|
|
16
|
+
declare const ComplexValSelect: React.ForwardRefExoticComponent<ComplexValSelectProps<ComplexValSelectValueType> & React.RefAttributes<unknown>>;
|
|
17
|
+
export default ComplexValSelect;
|
|
@@ -81,49 +81,51 @@ exports.Option = void 0;
|
|
|
81
81
|
var React = __importStar(require("react"));
|
|
82
82
|
var omit_1 = __importDefault(require("lodash/omit"));
|
|
83
83
|
var find_1 = __importDefault(require("lodash/find"));
|
|
84
|
+
var some_1 = __importDefault(require("lodash/some"));
|
|
85
|
+
var isArray_1 = __importDefault(require("lodash/isArray"));
|
|
86
|
+
var isObject_1 = __importDefault(require("lodash/isObject"));
|
|
84
87
|
var select_1 = __importDefault(require("antd/lib/select"));
|
|
85
88
|
var useControllableValue_1 = __importDefault(require("ahooks/lib/useControllableValue"));
|
|
86
89
|
var Option = select_1["default"].Option;
|
|
87
90
|
exports.Option = Option;
|
|
88
|
-
var
|
|
91
|
+
var ComplexValSelect = React.forwardRef(function (props, ref) {
|
|
89
92
|
var _a = __read((0, useControllableValue_1["default"])(props), 2),
|
|
90
93
|
value = _a[0],
|
|
91
94
|
setValue = _a[1];
|
|
92
|
-
var
|
|
93
|
-
useJSONStrVal = _b === void 0 ? false : _b,
|
|
94
|
-
options = props.options,
|
|
95
|
+
var options = props.options,
|
|
95
96
|
onChange = props.onChange,
|
|
96
97
|
onSelect = props.onSelect;
|
|
97
98
|
var selectRef = React.useRef(null);
|
|
98
99
|
React.useImperativeHandle(ref, function () {
|
|
99
100
|
return selectRef.current;
|
|
100
101
|
});
|
|
101
|
-
|
|
102
|
+
// 判断是否需要将optionValue转为JSON字符串
|
|
103
|
+
var isReferenceTypeVal = (0, some_1["default"])(options, function (item) {
|
|
104
|
+
return (0, isArray_1["default"])(item.value) || (0, isObject_1["default"])(item.value);
|
|
105
|
+
});
|
|
106
|
+
var finalOptions = isReferenceTypeVal ? options === null || options === void 0 ? void 0 : options.map(function (item) {
|
|
102
107
|
return __assign(__assign({}, item), {
|
|
103
108
|
value: JSON.stringify(item.value)
|
|
104
109
|
});
|
|
105
110
|
}) : options;
|
|
106
111
|
var handleChange = function handleChange(val) {
|
|
107
|
-
var nextVal =
|
|
112
|
+
var nextVal = val && isReferenceTypeVal ? JSON.parse(val) : val;
|
|
108
113
|
setValue(nextVal);
|
|
109
114
|
onChange === null || onChange === void 0 ? void 0 : onChange(nextVal, options);
|
|
110
115
|
};
|
|
111
116
|
var handleSelect = function handleSelect(val) {
|
|
112
|
-
var nextVal =
|
|
117
|
+
var nextVal = val && isReferenceTypeVal ? JSON.parse(val) : val;
|
|
113
118
|
var selectOption = (0, find_1["default"])(finalOptions, {
|
|
114
119
|
value: val
|
|
115
120
|
});
|
|
116
|
-
onSelect === null || onSelect === void 0 ? void 0 : onSelect(nextVal,
|
|
117
|
-
label: selectOption.label,
|
|
118
|
-
value: nextVal
|
|
119
|
-
});
|
|
121
|
+
onSelect === null || onSelect === void 0 ? void 0 : onSelect(nextVal, selectOption);
|
|
120
122
|
};
|
|
121
123
|
return React.createElement(select_1["default"], __assign({
|
|
122
124
|
ref: selectRef,
|
|
123
|
-
value:
|
|
125
|
+
value: value && isReferenceTypeVal ? JSON.stringify(value) : value,
|
|
124
126
|
options: finalOptions,
|
|
125
127
|
onChange: handleChange,
|
|
126
128
|
onSelect: handleSelect
|
|
127
|
-
}, (0, omit_1["default"])(props, ['value', 'onChange', '
|
|
129
|
+
}, (0, omit_1["default"])(props, ['value', 'onChange', 'options', 'onSelect'])));
|
|
128
130
|
});
|
|
129
|
-
exports["default"] =
|
|
131
|
+
exports["default"] = ComplexValSelect;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ComplexValSelectProps, ComplexValSelectValueType } from '../complex-val-select';
|
|
1
2
|
import type { SelectProps } from 'antd/lib/select';
|
|
2
3
|
import type { ConditionInputProps } from '../condition-input';
|
|
3
4
|
export declare enum InputTypeEnum {
|
|
@@ -10,16 +11,16 @@ export declare enum EntryTypeEnum {
|
|
|
10
11
|
}
|
|
11
12
|
export declare type ChangedEntryType = typeof EntryTypeEnum[keyof typeof EntryTypeEnum];
|
|
12
13
|
declare type SelectOptionsType = {
|
|
13
|
-
value:
|
|
14
|
+
value: ComplexValSelectValueType;
|
|
14
15
|
label: string;
|
|
15
16
|
};
|
|
16
17
|
export interface MainSelectOptionsType extends SelectOptionsType {
|
|
17
18
|
children?: SelectOptionsType[];
|
|
18
19
|
}
|
|
19
20
|
export interface ValueType {
|
|
20
|
-
selectValue?:
|
|
21
|
+
selectValue?: ComplexValSelectValueType;
|
|
21
22
|
inputValue?: SelectProps['value'] | ConditionInputProps['value'];
|
|
22
|
-
finalSelectValue?:
|
|
23
|
+
finalSelectValue?: ComplexValSelectProps<any>['value'] | ConditionInputProps['value'][];
|
|
23
24
|
changedEntryType?: ChangedEntryType;
|
|
24
25
|
}
|
|
25
26
|
export interface ConditionSelectInputProps {
|
|
@@ -27,11 +28,11 @@ export interface ConditionSelectInputProps {
|
|
|
27
28
|
/** 不需要展示联动输入框的字段值 */
|
|
28
29
|
hiddenInputKeys?: ValueType['selectValue'][];
|
|
29
30
|
/** selectProps */
|
|
30
|
-
selectProps?:
|
|
31
|
+
selectProps?: ComplexValSelectProps<any>;
|
|
31
32
|
/** 联动inputProps */
|
|
32
33
|
conditionInputProps?: ConditionInputProps;
|
|
33
34
|
/** 联动selectProps */
|
|
34
|
-
conditionSelectProps?:
|
|
35
|
+
conditionSelectProps?: ComplexValSelectProps<any>;
|
|
35
36
|
/** onChange */
|
|
36
37
|
onChange?: (value: ValueType) => void;
|
|
37
38
|
/** onBlur */
|
|
@@ -81,7 +81,7 @@ exports.EntryTypeEnum = exports.InputTypeEnum = void 0;
|
|
|
81
81
|
var isNil_1 = __importDefault(require("lodash/isNil"));
|
|
82
82
|
var isEmpty_1 = __importDefault(require("lodash/isEmpty"));
|
|
83
83
|
var classnames_1 = __importDefault(require("classnames"));
|
|
84
|
-
var
|
|
84
|
+
var complex_val_select_1 = __importDefault(require("../complex-val-select"));
|
|
85
85
|
var react_1 = __importStar(require("react"));
|
|
86
86
|
var useControllableValue_1 = __importDefault(require("ahooks/lib/useControllableValue"));
|
|
87
87
|
var condition_input_1 = __importDefault(require("../condition-input"));
|
|
@@ -214,7 +214,7 @@ var ConditionSelectInput = function ConditionSelectInput(props) {
|
|
|
214
214
|
}
|
|
215
215
|
}))) : react_1["default"].createElement("div", {
|
|
216
216
|
className: "condition-select-select-input"
|
|
217
|
-
}, react_1["default"].createElement(
|
|
217
|
+
}, react_1["default"].createElement(complex_val_select_1["default"], __assign({}, conditionSelectProps, {
|
|
218
218
|
onChange: onTypeSelectChange,
|
|
219
219
|
value: selectInputValue === null || selectInputValue === void 0 ? void 0 : selectInputValue.inputValue,
|
|
220
220
|
options: subSelectOptions,
|
|
@@ -230,7 +230,7 @@ var ConditionSelectInput = function ConditionSelectInput(props) {
|
|
|
230
230
|
'condition-two-select-selecter': !isInput,
|
|
231
231
|
'condition-only-selecter': !isShowInput
|
|
232
232
|
})
|
|
233
|
-
}, react_1["default"].createElement(
|
|
233
|
+
}, react_1["default"].createElement(complex_val_select_1["default"], __assign({}, selectProps, {
|
|
234
234
|
onChange: onSelectChange,
|
|
235
235
|
value: selectInputValue === null || selectInputValue === void 0 ? void 0 : selectInputValue.selectValue,
|
|
236
236
|
options: optionsList,
|
package/lib/index.d.ts
CHANGED
|
@@ -82,5 +82,5 @@ export type { LabelConditionSelectInputProps } from './label-condition-select-in
|
|
|
82
82
|
export { default as LabelConditionSelectInput } from './label-condition-select-input';
|
|
83
83
|
export type { MultipartUploadProps } from './multipart-upload';
|
|
84
84
|
export { default as MultipartUpload } from './multipart-upload';
|
|
85
|
-
export type {
|
|
86
|
-
export { default as
|
|
85
|
+
export type { ComplexValSelectProps } from './complex-val-select';
|
|
86
|
+
export { default as ComplexValSelect } from './complex-val-select';
|
package/lib/index.js
CHANGED
|
@@ -8,7 +8,7 @@ var __importDefault = this && this.__importDefault || function (mod) {
|
|
|
8
8
|
Object.defineProperty(exports, "__esModule", {
|
|
9
9
|
value: true
|
|
10
10
|
});
|
|
11
|
-
exports.
|
|
11
|
+
exports.ComplexValSelect = exports.MultipartUpload = exports.LabelConditionSelectInput = exports.Flex = exports.Resizable = exports.BeautifulDnd = exports.RichTextEditor = exports.LabelCustomizeRangePicker = exports.TableCol = exports.LabelTreeSelect = exports.LabelConditionInput = exports.LabelNumberInput = exports.LabelAutoComplete = exports.LabelDatePicker = exports.LabelRangePicker = exports.JsonEditor = exports.AreaText = exports.LabelTextArea = exports.ASelect = exports.LabelSelect = exports.ColorSelect = exports.LabelInput = exports.TextInput = exports.TextArea = exports.SplitPane = exports.sortableHoc = exports.SingleImgUpload = exports.RcTransitionGroup = exports.RcQRcode = exports.RcEcharts = exports.StepNumberInput = exports.LabelRangeNumber = exports.NumberInput = exports.RcMotion = exports.KeepTab = exports.ImgCrop = exports.HighlightWords = exports.HighlightTextarea = exports.CopyToClipboard = exports.NumberFormatInput = exports.ConfigProvider = exports.ConditionSelectInput = exports.ConditionInput = exports.ButtonModal = exports.ButtonDrawer = void 0;
|
|
12
12
|
var button_drawer_1 = require("./button-drawer");
|
|
13
13
|
Object.defineProperty(exports, "ButtonDrawer", {
|
|
14
14
|
enumerable: true,
|
|
@@ -317,10 +317,10 @@ Object.defineProperty(exports, "MultipartUpload", {
|
|
|
317
317
|
return __importDefault(multipart_upload_1)["default"];
|
|
318
318
|
}
|
|
319
319
|
});
|
|
320
|
-
var
|
|
321
|
-
Object.defineProperty(exports, "
|
|
320
|
+
var complex_val_select_1 = require("./complex-val-select");
|
|
321
|
+
Object.defineProperty(exports, "ComplexValSelect", {
|
|
322
322
|
enumerable: true,
|
|
323
323
|
get: function get() {
|
|
324
|
-
return __importDefault(
|
|
324
|
+
return __importDefault(complex_val_select_1)["default"];
|
|
325
325
|
}
|
|
326
326
|
});
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { SelectProps } from 'antd/lib/select';
|
|
3
|
-
import type {
|
|
3
|
+
import type { ComplexValSelectProps } from '../complex-val-select';
|
|
4
4
|
declare const Option: import("rc-select/lib/Option").OptionFC;
|
|
5
5
|
export { Option };
|
|
6
|
-
export interface LabelSelectProps extends
|
|
6
|
+
export interface LabelSelectProps extends ComplexValSelectProps<any> {
|
|
7
7
|
label?: React.ReactNode;
|
|
8
8
|
onBlur?: (value: SelectProps['value']) => void;
|
|
9
9
|
}
|
|
@@ -48,7 +48,7 @@ exports.Option = void 0;
|
|
|
48
48
|
var react_1 = __importDefault(require("react"));
|
|
49
49
|
var useControllableValue_1 = __importDefault(require("ahooks/lib/useControllableValue"));
|
|
50
50
|
var select_1 = __importDefault(require("antd/lib/select"));
|
|
51
|
-
var
|
|
51
|
+
var complex_val_select_1 = __importDefault(require("../complex-val-select"));
|
|
52
52
|
var isArray_1 = __importDefault(require("lodash/isArray"));
|
|
53
53
|
var isUndefined_1 = __importDefault(require("lodash/isUndefined"));
|
|
54
54
|
var isNull_1 = __importDefault(require("lodash/isNull"));
|
|
@@ -94,7 +94,7 @@ var LabelSelect = function LabelSelect(props, ref) {
|
|
|
94
94
|
'label-select': true,
|
|
95
95
|
'label-select-label-scale': open || !(0, isArray_1["default"])(value) && !(0, isUndefined_1["default"])(value) && !(0, isNull_1["default"])(value) || (0, isArray_1["default"])(value) && value.length
|
|
96
96
|
}, className)
|
|
97
|
-
}, react_1["default"].createElement(
|
|
97
|
+
}, react_1["default"].createElement(complex_val_select_1["default"], __assign({
|
|
98
98
|
maxTagCount: 3,
|
|
99
99
|
showSearch: false
|
|
100
100
|
}, (0, omit_1["default"])(props, ['open', 'onChange', 'className', 'label', 'setOpen', 'isFocus']), {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "assui",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.70",
|
|
4
4
|
"description": "react ui library",
|
|
5
5
|
"author": "jason <usochen@gmail.com>",
|
|
6
6
|
"main": "./lib/index.js",
|
|
@@ -80,5 +80,5 @@
|
|
|
80
80
|
"node": ">=10.0.0"
|
|
81
81
|
},
|
|
82
82
|
"license": "MIT",
|
|
83
|
-
"gitHead": "
|
|
83
|
+
"gitHead": "760171432a518656cf071adf933e1a64541b94bc"
|
|
84
84
|
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import type { SelectProps } from 'antd/lib/select';
|
|
3
|
-
declare const Option: import("rc-select/lib/Option").OptionFC;
|
|
4
|
-
export { Option };
|
|
5
|
-
export declare type ValueType = string | number | any[] | Record<string, any> | null | undefined;
|
|
6
|
-
export interface AllowComplexValSelectProps<T> extends Omit<SelectProps, 'value' | 'onChange'> {
|
|
7
|
-
/** value是否使用JASON字符串 */
|
|
8
|
-
useJSONStrVal?: boolean;
|
|
9
|
-
value?: T;
|
|
10
|
-
onChange?: (val: T, opt: SelectProps['options']) => void;
|
|
11
|
-
}
|
|
12
|
-
declare const AllowComplexValSelect: React.ForwardRefExoticComponent<AllowComplexValSelectProps<ValueType> & React.RefAttributes<unknown>>;
|
|
13
|
-
export default AllowComplexValSelect;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import type { SelectProps } from 'antd/lib/select';
|
|
3
|
-
declare const Option: import("rc-select/lib/Option").OptionFC;
|
|
4
|
-
export { Option };
|
|
5
|
-
export declare type ValueType = string | number | any[] | Record<string, any> | null | undefined;
|
|
6
|
-
export interface AllowComplexValSelectProps<T> extends Omit<SelectProps, 'value' | 'onChange'> {
|
|
7
|
-
/** value是否使用JASON字符串 */
|
|
8
|
-
useJSONStrVal?: boolean;
|
|
9
|
-
value?: T;
|
|
10
|
-
onChange?: (val: T, opt: SelectProps['options']) => void;
|
|
11
|
-
}
|
|
12
|
-
declare const AllowComplexValSelect: React.ForwardRefExoticComponent<AllowComplexValSelectProps<ValueType> & React.RefAttributes<unknown>>;
|
|
13
|
-
export default AllowComplexValSelect;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|