assui 3.1.67 → 3.1.68
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/allow-complex-val-select/index.d.ts +13 -0
- package/es/allow-complex-val-select/index.js +85 -0
- package/es/allow-complex-val-select/style/index.d.ts +1 -0
- package/es/allow-complex-val-select/style/index.js +1 -0
- package/es/condition-select-input/index.js +3 -3
- package/es/index.d.ts +2 -0
- package/es/index.js +2 -1
- package/es/label-select/index.d.ts +2 -1
- package/es/label-select/index.js +2 -2
- package/lib/allow-complex-val-select/index.d.ts +13 -0
- package/lib/allow-complex-val-select/index.js +129 -0
- package/lib/allow-complex-val-select/style/index.d.ts +1 -0
- package/lib/allow-complex-val-select/style/index.js +6 -0
- package/lib/condition-select-input/index.js +3 -3
- package/lib/index.d.ts +2 -0
- package/lib/index.js +8 -1
- package/lib/label-select/index.d.ts +2 -1
- package/lib/label-select/index.js +2 -2
- package/package.json +2 -2
|
@@ -0,0 +1,13 @@
|
|
|
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;
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
var __assign = this && this.__assign || function () {
|
|
2
|
+
__assign = Object.assign || function (t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) {
|
|
6
|
+
if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
var __read = this && this.__read || function (o, n) {
|
|
14
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
15
|
+
if (!m) return o;
|
|
16
|
+
var i = m.call(o),
|
|
17
|
+
r,
|
|
18
|
+
ar = [],
|
|
19
|
+
e;
|
|
20
|
+
try {
|
|
21
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) {
|
|
22
|
+
ar.push(r.value);
|
|
23
|
+
}
|
|
24
|
+
} catch (error) {
|
|
25
|
+
e = {
|
|
26
|
+
error: error
|
|
27
|
+
};
|
|
28
|
+
} finally {
|
|
29
|
+
try {
|
|
30
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
31
|
+
} finally {
|
|
32
|
+
if (e) throw e.error;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
return ar;
|
|
36
|
+
};
|
|
37
|
+
import * as React from 'react';
|
|
38
|
+
import omit from 'lodash/omit';
|
|
39
|
+
import find from 'lodash/find';
|
|
40
|
+
import Select from "antd/es/select";
|
|
41
|
+
import useControllableValue from "ahooks/es/useControllableValue";
|
|
42
|
+
var Option = Select.Option;
|
|
43
|
+
export { Option };
|
|
44
|
+
var AllowComplexValSelect = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
45
|
+
var _a = __read(useControllableValue(props), 2),
|
|
46
|
+
value = _a[0],
|
|
47
|
+
setValue = _a[1];
|
|
48
|
+
var _b = props.useJSONStrVal,
|
|
49
|
+
useJSONStrVal = _b === void 0 ? false : _b,
|
|
50
|
+
options = props.options,
|
|
51
|
+
onChange = props.onChange,
|
|
52
|
+
onSelect = props.onSelect;
|
|
53
|
+
var selectRef = React.useRef(null);
|
|
54
|
+
React.useImperativeHandle(ref, function () {
|
|
55
|
+
return selectRef.current;
|
|
56
|
+
});
|
|
57
|
+
var finalOptions = useJSONStrVal ? options === null || options === void 0 ? void 0 : options.map(function (item) {
|
|
58
|
+
return __assign(__assign({}, item), {
|
|
59
|
+
value: JSON.stringify(item.value)
|
|
60
|
+
});
|
|
61
|
+
}) : options;
|
|
62
|
+
var handleChange = function handleChange(val) {
|
|
63
|
+
var nextVal = useJSONStrVal ? JSON.parse(val) : val;
|
|
64
|
+
setValue(nextVal);
|
|
65
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(nextVal, options);
|
|
66
|
+
};
|
|
67
|
+
var handleSelect = function handleSelect(val) {
|
|
68
|
+
var nextVal = useJSONStrVal ? JSON.parse(val) : val;
|
|
69
|
+
var selectOption = find(finalOptions, {
|
|
70
|
+
value: val
|
|
71
|
+
});
|
|
72
|
+
onSelect === null || onSelect === void 0 ? void 0 : onSelect(nextVal, {
|
|
73
|
+
label: selectOption.label,
|
|
74
|
+
value: nextVal
|
|
75
|
+
});
|
|
76
|
+
};
|
|
77
|
+
return /*#__PURE__*/React.createElement(Select, __assign({
|
|
78
|
+
ref: selectRef,
|
|
79
|
+
value: useJSONStrVal ? JSON.stringify(value) : value,
|
|
80
|
+
options: finalOptions,
|
|
81
|
+
onChange: handleChange,
|
|
82
|
+
onSelect: handleSelect
|
|
83
|
+
}, omit(props, ['value', 'onChange', 'useJSONStrVal', 'options', 'onSelect'])));
|
|
84
|
+
});
|
|
85
|
+
export default AllowComplexValSelect;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import 'antd/lib/select/style';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "antd/es/select/style";
|
|
@@ -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 AllowComplexValSelect from '../allow-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(AllowComplexValSelect, __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(AllowComplexValSelect, __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,3 +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 { AllowComplexValSelectProps } from './allow-complex-val-select';
|
|
86
|
+
export { default as AllowComplexValSelect } from './allow-complex-val-select';
|
package/es/index.js
CHANGED
|
@@ -41,4 +41,5 @@ export { default as BeautifulDnd } from './beautiful-dnd';
|
|
|
41
41
|
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
|
-
export { default as MultipartUpload } from './multipart-upload';
|
|
44
|
+
export { default as MultipartUpload } from './multipart-upload';
|
|
45
|
+
export { default as AllowComplexValSelect } from './allow-complex-val-select';
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { SelectProps } from 'antd/lib/select';
|
|
3
|
+
import type { AllowComplexValSelectProps } from '../allow-complex-val-select';
|
|
3
4
|
declare const Option: import("rc-select/lib/Option").OptionFC;
|
|
4
5
|
export { Option };
|
|
5
|
-
export interface LabelSelectProps extends
|
|
6
|
+
export interface LabelSelectProps extends AllowComplexValSelectProps<any> {
|
|
6
7
|
label?: React.ReactNode;
|
|
7
8
|
onBlur?: (value: SelectProps['value']) => void;
|
|
8
9
|
}
|
package/es/label-select/index.js
CHANGED
|
@@ -37,6 +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 AllowComplexValSelect from '../allow-complex-val-select';
|
|
40
41
|
import isArray from 'lodash/isArray';
|
|
41
42
|
import isUndefined from 'lodash/isUndefined';
|
|
42
43
|
import isNull from 'lodash/isNull';
|
|
@@ -82,7 +83,7 @@ var LabelSelect = function LabelSelect(props, ref) {
|
|
|
82
83
|
'label-select': true,
|
|
83
84
|
'label-select-label-scale': open || !isArray(value) && !isUndefined(value) && !isNull(value) || isArray(value) && value.length
|
|
84
85
|
}, className)
|
|
85
|
-
}, /*#__PURE__*/React.createElement(
|
|
86
|
+
}, /*#__PURE__*/React.createElement(AllowComplexValSelect, __assign({
|
|
86
87
|
maxTagCount: 3,
|
|
87
88
|
showSearch: false
|
|
88
89
|
}, omit(props, ['open', 'onChange', 'className', 'label', 'setOpen', 'isFocus']), {
|
|
@@ -103,6 +104,5 @@ var LabelSelect = function LabelSelect(props, ref) {
|
|
|
103
104
|
onClick: handleLabelClick
|
|
104
105
|
}, label));
|
|
105
106
|
};
|
|
106
|
-
// export default LabelSelect;
|
|
107
107
|
var ForwardRefLabelSelect = /*#__PURE__*/React.forwardRef(LabelSelect);
|
|
108
108
|
export default ForwardRefLabelSelect;
|
|
@@ -0,0 +1,13 @@
|
|
|
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;
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var __assign = this && this.__assign || function () {
|
|
4
|
+
__assign = Object.assign || function (t) {
|
|
5
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
6
|
+
s = arguments[i];
|
|
7
|
+
for (var p in s) {
|
|
8
|
+
if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
return t;
|
|
12
|
+
};
|
|
13
|
+
return __assign.apply(this, arguments);
|
|
14
|
+
};
|
|
15
|
+
var __createBinding = this && this.__createBinding || (Object.create ? function (o, m, k, k2) {
|
|
16
|
+
if (k2 === undefined) k2 = k;
|
|
17
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
18
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
19
|
+
desc = {
|
|
20
|
+
enumerable: true,
|
|
21
|
+
get: function get() {
|
|
22
|
+
return m[k];
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
Object.defineProperty(o, k2, desc);
|
|
27
|
+
} : function (o, m, k, k2) {
|
|
28
|
+
if (k2 === undefined) k2 = k;
|
|
29
|
+
o[k2] = m[k];
|
|
30
|
+
});
|
|
31
|
+
var __setModuleDefault = this && this.__setModuleDefault || (Object.create ? function (o, v) {
|
|
32
|
+
Object.defineProperty(o, "default", {
|
|
33
|
+
enumerable: true,
|
|
34
|
+
value: v
|
|
35
|
+
});
|
|
36
|
+
} : function (o, v) {
|
|
37
|
+
o["default"] = v;
|
|
38
|
+
});
|
|
39
|
+
var __importStar = this && this.__importStar || function (mod) {
|
|
40
|
+
if (mod && mod.__esModule) return mod;
|
|
41
|
+
var result = {};
|
|
42
|
+
if (mod != null) for (var k in mod) {
|
|
43
|
+
if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
44
|
+
}
|
|
45
|
+
__setModuleDefault(result, mod);
|
|
46
|
+
return result;
|
|
47
|
+
};
|
|
48
|
+
var __read = this && this.__read || function (o, n) {
|
|
49
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
50
|
+
if (!m) return o;
|
|
51
|
+
var i = m.call(o),
|
|
52
|
+
r,
|
|
53
|
+
ar = [],
|
|
54
|
+
e;
|
|
55
|
+
try {
|
|
56
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) {
|
|
57
|
+
ar.push(r.value);
|
|
58
|
+
}
|
|
59
|
+
} catch (error) {
|
|
60
|
+
e = {
|
|
61
|
+
error: error
|
|
62
|
+
};
|
|
63
|
+
} finally {
|
|
64
|
+
try {
|
|
65
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
66
|
+
} finally {
|
|
67
|
+
if (e) throw e.error;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
return ar;
|
|
71
|
+
};
|
|
72
|
+
var __importDefault = this && this.__importDefault || function (mod) {
|
|
73
|
+
return mod && mod.__esModule ? mod : {
|
|
74
|
+
"default": mod
|
|
75
|
+
};
|
|
76
|
+
};
|
|
77
|
+
Object.defineProperty(exports, "__esModule", {
|
|
78
|
+
value: true
|
|
79
|
+
});
|
|
80
|
+
exports.Option = void 0;
|
|
81
|
+
var React = __importStar(require("react"));
|
|
82
|
+
var omit_1 = __importDefault(require("lodash/omit"));
|
|
83
|
+
var find_1 = __importDefault(require("lodash/find"));
|
|
84
|
+
var select_1 = __importDefault(require("antd/lib/select"));
|
|
85
|
+
var useControllableValue_1 = __importDefault(require("ahooks/lib/useControllableValue"));
|
|
86
|
+
var Option = select_1["default"].Option;
|
|
87
|
+
exports.Option = Option;
|
|
88
|
+
var AllowComplexValSelect = React.forwardRef(function (props, ref) {
|
|
89
|
+
var _a = __read((0, useControllableValue_1["default"])(props), 2),
|
|
90
|
+
value = _a[0],
|
|
91
|
+
setValue = _a[1];
|
|
92
|
+
var _b = props.useJSONStrVal,
|
|
93
|
+
useJSONStrVal = _b === void 0 ? false : _b,
|
|
94
|
+
options = props.options,
|
|
95
|
+
onChange = props.onChange,
|
|
96
|
+
onSelect = props.onSelect;
|
|
97
|
+
var selectRef = React.useRef(null);
|
|
98
|
+
React.useImperativeHandle(ref, function () {
|
|
99
|
+
return selectRef.current;
|
|
100
|
+
});
|
|
101
|
+
var finalOptions = useJSONStrVal ? options === null || options === void 0 ? void 0 : options.map(function (item) {
|
|
102
|
+
return __assign(__assign({}, item), {
|
|
103
|
+
value: JSON.stringify(item.value)
|
|
104
|
+
});
|
|
105
|
+
}) : options;
|
|
106
|
+
var handleChange = function handleChange(val) {
|
|
107
|
+
var nextVal = useJSONStrVal ? JSON.parse(val) : val;
|
|
108
|
+
setValue(nextVal);
|
|
109
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(nextVal, options);
|
|
110
|
+
};
|
|
111
|
+
var handleSelect = function handleSelect(val) {
|
|
112
|
+
var nextVal = useJSONStrVal ? JSON.parse(val) : val;
|
|
113
|
+
var selectOption = (0, find_1["default"])(finalOptions, {
|
|
114
|
+
value: val
|
|
115
|
+
});
|
|
116
|
+
onSelect === null || onSelect === void 0 ? void 0 : onSelect(nextVal, {
|
|
117
|
+
label: selectOption.label,
|
|
118
|
+
value: nextVal
|
|
119
|
+
});
|
|
120
|
+
};
|
|
121
|
+
return React.createElement(select_1["default"], __assign({
|
|
122
|
+
ref: selectRef,
|
|
123
|
+
value: useJSONStrVal ? JSON.stringify(value) : value,
|
|
124
|
+
options: finalOptions,
|
|
125
|
+
onChange: handleChange,
|
|
126
|
+
onSelect: handleSelect
|
|
127
|
+
}, (0, omit_1["default"])(props, ['value', 'onChange', 'useJSONStrVal', 'options', 'onSelect'])));
|
|
128
|
+
});
|
|
129
|
+
exports["default"] = AllowComplexValSelect;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import 'antd/lib/select/style';
|
|
@@ -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 allow_complex_val_select_1 = __importDefault(require("../allow-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(allow_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(allow_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,3 +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 { AllowComplexValSelectProps } from './allow-complex-val-select';
|
|
86
|
+
export { default as AllowComplexValSelect } from './allow-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.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;
|
|
11
|
+
exports.AllowComplexValSelect = 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,
|
|
@@ -316,4 +316,11 @@ Object.defineProperty(exports, "MultipartUpload", {
|
|
|
316
316
|
get: function get() {
|
|
317
317
|
return __importDefault(multipart_upload_1)["default"];
|
|
318
318
|
}
|
|
319
|
+
});
|
|
320
|
+
var allow_complex_val_select_1 = require("./allow-complex-val-select");
|
|
321
|
+
Object.defineProperty(exports, "AllowComplexValSelect", {
|
|
322
|
+
enumerable: true,
|
|
323
|
+
get: function get() {
|
|
324
|
+
return __importDefault(allow_complex_val_select_1)["default"];
|
|
325
|
+
}
|
|
319
326
|
});
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { SelectProps } from 'antd/lib/select';
|
|
3
|
+
import type { AllowComplexValSelectProps } from '../allow-complex-val-select';
|
|
3
4
|
declare const Option: import("rc-select/lib/Option").OptionFC;
|
|
4
5
|
export { Option };
|
|
5
|
-
export interface LabelSelectProps extends
|
|
6
|
+
export interface LabelSelectProps extends AllowComplexValSelectProps<any> {
|
|
6
7
|
label?: React.ReactNode;
|
|
7
8
|
onBlur?: (value: SelectProps['value']) => void;
|
|
8
9
|
}
|
|
@@ -48,6 +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 allow_complex_val_select_1 = __importDefault(require("../allow-complex-val-select"));
|
|
51
52
|
var isArray_1 = __importDefault(require("lodash/isArray"));
|
|
52
53
|
var isUndefined_1 = __importDefault(require("lodash/isUndefined"));
|
|
53
54
|
var isNull_1 = __importDefault(require("lodash/isNull"));
|
|
@@ -93,7 +94,7 @@ var LabelSelect = function LabelSelect(props, ref) {
|
|
|
93
94
|
'label-select': true,
|
|
94
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
|
|
95
96
|
}, className)
|
|
96
|
-
}, react_1["default"].createElement(
|
|
97
|
+
}, react_1["default"].createElement(allow_complex_val_select_1["default"], __assign({
|
|
97
98
|
maxTagCount: 3,
|
|
98
99
|
showSearch: false
|
|
99
100
|
}, (0, omit_1["default"])(props, ['open', 'onChange', 'className', 'label', 'setOpen', 'isFocus']), {
|
|
@@ -114,6 +115,5 @@ var LabelSelect = function LabelSelect(props, ref) {
|
|
|
114
115
|
onClick: handleLabelClick
|
|
115
116
|
}, label));
|
|
116
117
|
};
|
|
117
|
-
// export default LabelSelect;
|
|
118
118
|
var ForwardRefLabelSelect = react_1["default"].forwardRef(LabelSelect);
|
|
119
119
|
exports["default"] = ForwardRefLabelSelect;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "assui",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.68",
|
|
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": "48d27443d1a3b1accb6a53a3e3467d8af8264fd9"
|
|
84
84
|
}
|