assui 2.3.8 → 3.0.0-alpha.0
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/a-select/index.js +7 -22
- package/es/a-select/style/index.css +195 -743
- package/es/area-text/index.js +1 -3
- package/es/button-drawer/index.js +12 -30
- package/es/button-modal/index.js +12 -33
- package/es/color-select/index.js +10 -23
- package/es/color-select/style/index.css +195 -743
- package/es/condition-input/index.js +8 -26
- package/es/condition-input/parse2RegexOption.js +0 -11
- package/es/config-provider/index.js +1 -3
- package/es/copy-to-clipboard/index.js +11 -27
- package/es/copy-to-clipboard/style/index.css +0 -1
- package/es/highlight-textarea/HighlighedContents.js +1 -3
- package/es/highlight-textarea/extractSpansOfClasses.d.ts +1 -0
- package/es/highlight-textarea/extractSpansOfClasses.js +7 -29
- package/es/highlight-textarea/getRanges.js +3 -35
- package/es/highlight-textarea/getType.js +0 -6
- package/es/highlight-textarea/index.js +11 -30
- package/es/highlight-textarea/style/index.css +7 -21
- package/es/img-crop/EasyCrop.js +18 -34
- package/es/img-crop/getCroppedImg.js +15 -50
- package/es/img-crop/index.js +56 -145
- package/es/img-crop/style/index.css +195 -743
- package/es/json-editor/index.js +6 -20
- package/es/keep-tab/index.d.ts +7 -2
- package/es/keep-tab/index.js +34 -59
- package/es/keep-tab/style/index.css +39 -99
- package/es/label-auto-complete/index.js +14 -32
- package/es/label-auto-complete/style/index.css +195 -743
- package/es/label-condition-input/index.js +13 -29
- package/es/label-customize-range-picker/defaultRadioList.js +0 -3
- package/es/label-customize-range-picker/index.js +36 -78
- package/es/label-customize-range-picker/style/index.css +195 -743
- package/es/label-customize-range-picker/utils/index.js +5 -14
- package/es/label-date-picker/index.js +11 -28
- package/es/label-date-picker/style/index.css +195 -743
- package/es/label-input/index.js +23 -37
- package/es/label-number-input/index.js +13 -28
- package/es/label-range-picker/index.js +11 -28
- package/es/label-range-picker/style/index.css +195 -743
- package/es/label-select/index.js +11 -27
- package/es/label-select/style/index.css +195 -743
- package/es/label-text-area/index.js +13 -35
- package/es/label-tree-select/index.js +15 -32
- package/es/label-tree-select/style/index.css +195 -743
- package/es/number-format-input/index.js +1 -11
- package/es/number-input/index.js +18 -37
- package/es/number-input/utils.js +7 -15
- package/es/rc-echart/core.js +15 -27
- package/es/rc-echart/index.js +0 -6
- package/es/rc-qrcode/index.js +2 -12
- package/es/rc-qrcode/useQrcode.js +5 -12
- package/es/rich-text-editor/index.js +5 -16
- package/es/rich-text-editor/plugins/code/index.js +0 -8
- package/es/rich-text-editor/style/index.css +195 -743
- package/es/single-img-upload/index.js +36 -110
- package/es/single-img-upload/style/index.css +195 -743
- package/es/split-pane/index.js +0 -4
- package/es/step-number-input/index.js +14 -39
- package/es/step-number-input/style/index.css +195 -743
- package/es/table-col/index.js +2 -4
- package/es/text-area/index.js +8 -27
- package/es/text-input/index.js +4 -18
- package/es/text-input/style/index.css +7 -21
- package/lib/a-select/index.js +7 -27
- package/lib/a-select/style/index.css +195 -743
- package/lib/a-select/style/index.js +0 -2
- package/lib/area-text/index.js +1 -6
- package/lib/area-text/style/index.js +0 -1
- package/lib/beautiful-dnd/index.js +0 -9
- package/lib/button-drawer/index.js +12 -42
- package/lib/button-drawer/style/index.js +0 -1
- package/lib/button-modal/index.js +12 -44
- package/lib/button-modal/style/index.js +0 -1
- package/lib/color-select/index.js +10 -39
- package/lib/color-select/style/index.css +195 -743
- package/lib/color-select/style/index.js +0 -2
- package/lib/condition-input/index.js +8 -41
- package/lib/condition-input/parse2RegexOption.js +0 -16
- package/lib/condition-input/style/index.js +0 -1
- package/lib/config-provider/context.js +0 -4
- package/lib/config-provider/index.js +1 -28
- package/lib/copy-to-clipboard/index.js +11 -38
- package/lib/copy-to-clipboard/style/index.css +0 -1
- package/lib/copy-to-clipboard/style/index.js +0 -1
- package/lib/highlight-textarea/HighlighedContents.js +1 -7
- package/lib/highlight-textarea/extractSpansOfClasses.d.ts +1 -0
- package/lib/highlight-textarea/extractSpansOfClasses.js +7 -31
- package/lib/highlight-textarea/getRanges.js +3 -38
- package/lib/highlight-textarea/getType.js +0 -8
- package/lib/highlight-textarea/index.js +11 -44
- package/lib/highlight-textarea/style/index.css +7 -21
- package/lib/highlight-textarea/style/index.js +0 -1
- package/lib/highlight-words/index.js +0 -3
- package/lib/img-crop/EasyCrop.js +18 -44
- package/lib/img-crop/getCroppedImg.js +15 -51
- package/lib/img-crop/index.js +56 -159
- package/lib/img-crop/style/index.css +195 -743
- package/lib/img-crop/style/index.js +0 -3
- package/lib/index.js +0 -77
- package/lib/json-editor/index.js +6 -35
- package/lib/json-editor/style/index.js +0 -2
- package/lib/keep-tab/index.d.ts +7 -2
- package/lib/keep-tab/index.js +34 -76
- package/lib/keep-tab/style/index.css +39 -99
- package/lib/keep-tab/style/index.js +0 -2
- package/lib/label-auto-complete/index.js +14 -39
- package/lib/label-auto-complete/style/index.css +195 -743
- package/lib/label-auto-complete/style/index.js +0 -2
- package/lib/label-condition-input/index.js +13 -36
- package/lib/label-condition-input/style/index.js +0 -1
- package/lib/label-customize-range-picker/defaultRadioList.js +0 -7
- package/lib/label-customize-range-picker/index.js +36 -99
- package/lib/label-customize-range-picker/style/index.css +195 -743
- package/lib/label-customize-range-picker/style/index.js +0 -5
- package/lib/label-customize-range-picker/utils/index.js +5 -19
- package/lib/label-date-picker/index.js +11 -34
- package/lib/label-date-picker/style/index.css +195 -743
- package/lib/label-date-picker/style/index.js +0 -2
- package/lib/label-input/index.js +23 -46
- package/lib/label-input/style/index.js +0 -1
- package/lib/label-number-input/index.js +13 -36
- package/lib/label-number-input/style/index.js +0 -1
- package/lib/label-range-picker/index.js +11 -36
- package/lib/label-range-picker/style/index.css +195 -743
- package/lib/label-range-picker/style/index.js +0 -2
- package/lib/label-select/index.js +11 -36
- package/lib/label-select/style/index.css +195 -743
- package/lib/label-select/style/index.js +0 -2
- package/lib/label-text-area/index.js +13 -40
- package/lib/label-text-area/style/index.js +0 -1
- package/lib/label-tree-select/index.js +15 -38
- package/lib/label-tree-select/style/index.css +195 -743
- package/lib/label-tree-select/style/index.js +0 -2
- package/lib/messages/index.js +0 -2
- package/lib/number-format-input/index.js +1 -15
- package/lib/number-format-input/style/index.js +0 -1
- package/lib/number-input/index.js +18 -55
- package/lib/number-input/style/index.js +0 -1
- package/lib/number-input/utils.js +8 -20
- package/lib/rc-echart/core.js +15 -40
- package/lib/rc-echart/index.js +0 -17
- package/lib/rc-motion/index.js +0 -3
- package/lib/rc-qrcode/index.js +2 -25
- package/lib/rc-qrcode/useQrcode.js +5 -17
- package/lib/rc-transition-group/index.js +0 -9
- package/lib/resizable/index.js +0 -2
- package/lib/resizable/style/index.js +0 -1
- package/lib/rich-text-editor/index.js +5 -53
- package/lib/rich-text-editor/plugins/code/index.js +2 -12
- package/lib/rich-text-editor/style/index.css +195 -743
- package/lib/rich-text-editor/style/index.js +0 -1
- package/lib/single-img-upload/index.js +36 -125
- package/lib/single-img-upload/style/index.css +195 -743
- package/lib/single-img-upload/style/index.js +0 -3
- package/lib/sortable-hoc/index.js +0 -9
- package/lib/split-pane/index.js +0 -15
- package/lib/split-pane/style/index.js +0 -1
- package/lib/step-number-input/index.js +14 -55
- package/lib/step-number-input/style/index.css +195 -743
- package/lib/step-number-input/style/index.js +0 -2
- package/lib/table-col/index.js +2 -6
- package/lib/text-area/index.js +8 -38
- package/lib/text-area/style/index.js +0 -1
- package/lib/text-input/index.js +4 -23
- package/lib/text-input/style/index.css +7 -21
- package/lib/text-input/style/index.js +0 -1
- package/package.json +5 -5
package/es/table-col/index.js
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
|
|
3
2
|
var TableCol = function TableCol(_a) {
|
|
4
3
|
var children = _a.children,
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
width = _a.width,
|
|
5
|
+
className = _a.className;
|
|
7
6
|
return /*#__PURE__*/React.createElement("div", {
|
|
8
7
|
style: {
|
|
9
8
|
width: "".concat(width, "px")
|
|
@@ -11,5 +10,4 @@ var TableCol = function TableCol(_a) {
|
|
|
11
10
|
className: className
|
|
12
11
|
}, children);
|
|
13
12
|
};
|
|
14
|
-
|
|
15
13
|
export default TableCol;
|
package/es/text-area/index.js
CHANGED
|
@@ -2,39 +2,31 @@ var __assign = this && this.__assign || function () {
|
|
|
2
2
|
__assign = Object.assign || function (t) {
|
|
3
3
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
4
|
s = arguments[i];
|
|
5
|
-
|
|
6
5
|
for (var p in s) {
|
|
7
6
|
if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
8
7
|
}
|
|
9
8
|
}
|
|
10
|
-
|
|
11
9
|
return t;
|
|
12
10
|
};
|
|
13
|
-
|
|
14
11
|
return __assign.apply(this, arguments);
|
|
15
12
|
};
|
|
16
|
-
|
|
17
13
|
var __rest = this && this.__rest || function (s, e) {
|
|
18
14
|
var t = {};
|
|
19
|
-
|
|
20
15
|
for (var p in s) {
|
|
21
16
|
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
22
17
|
}
|
|
23
|
-
|
|
24
18
|
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
25
19
|
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
26
20
|
}
|
|
27
21
|
return t;
|
|
28
22
|
};
|
|
29
|
-
|
|
30
23
|
var __read = this && this.__read || function (o, n) {
|
|
31
24
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
32
25
|
if (!m) return o;
|
|
33
26
|
var i = m.call(o),
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
27
|
+
r,
|
|
28
|
+
ar = [],
|
|
29
|
+
e;
|
|
38
30
|
try {
|
|
39
31
|
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) {
|
|
40
32
|
ar.push(r.value);
|
|
@@ -50,47 +42,36 @@ var __read = this && this.__read || function (o, n) {
|
|
|
50
42
|
if (e) throw e.error;
|
|
51
43
|
}
|
|
52
44
|
}
|
|
53
|
-
|
|
54
45
|
return ar;
|
|
55
46
|
};
|
|
56
|
-
|
|
57
47
|
import * as React from 'react';
|
|
58
48
|
import Input from "antd/es/input";
|
|
59
49
|
import trimStart from 'lodash/trimStart';
|
|
60
|
-
|
|
61
50
|
var TextArea = function TextArea(_a) {
|
|
62
51
|
var value = _a.value,
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
52
|
+
onChange = _a.onChange,
|
|
53
|
+
formatter = _a.formatter,
|
|
54
|
+
restProps = __rest(_a, ["value", "onChange", "formatter"]);
|
|
67
55
|
var _b = __read(React.useState(''), 2),
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
56
|
+
textValue = _b[0],
|
|
57
|
+
setTextValue = _b[1];
|
|
71
58
|
var isControl = value !== undefined;
|
|
72
59
|
var resultValue = isControl ? value : textValue;
|
|
73
|
-
|
|
74
60
|
var handleChange = function handleChange(e) {
|
|
75
61
|
var finallyValue = trimStart(e.target.value);
|
|
76
|
-
|
|
77
62
|
if (formatter) {
|
|
78
63
|
finallyValue = formatter(finallyValue);
|
|
79
64
|
}
|
|
80
|
-
|
|
81
65
|
if (!isControl) {
|
|
82
66
|
setTextValue(finallyValue);
|
|
83
67
|
}
|
|
84
|
-
|
|
85
68
|
if (onChange) {
|
|
86
69
|
onChange(finallyValue, e);
|
|
87
70
|
}
|
|
88
71
|
};
|
|
89
|
-
|
|
90
72
|
return /*#__PURE__*/React.createElement(Input.TextArea, __assign({
|
|
91
73
|
value: resultValue,
|
|
92
74
|
onChange: handleChange
|
|
93
75
|
}, restProps));
|
|
94
76
|
};
|
|
95
|
-
|
|
96
77
|
export default TextArea;
|
package/es/text-input/index.js
CHANGED
|
@@ -2,39 +2,31 @@ var __assign = this && this.__assign || function () {
|
|
|
2
2
|
__assign = Object.assign || function (t) {
|
|
3
3
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
4
|
s = arguments[i];
|
|
5
|
-
|
|
6
5
|
for (var p in s) {
|
|
7
6
|
if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
8
7
|
}
|
|
9
8
|
}
|
|
10
|
-
|
|
11
9
|
return t;
|
|
12
10
|
};
|
|
13
|
-
|
|
14
11
|
return __assign.apply(this, arguments);
|
|
15
12
|
};
|
|
16
|
-
|
|
17
13
|
var __rest = this && this.__rest || function (s, e) {
|
|
18
14
|
var t = {};
|
|
19
|
-
|
|
20
15
|
for (var p in s) {
|
|
21
16
|
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
22
17
|
}
|
|
23
|
-
|
|
24
18
|
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
25
19
|
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
26
20
|
}
|
|
27
21
|
return t;
|
|
28
22
|
};
|
|
29
|
-
|
|
30
23
|
var __read = this && this.__read || function (o, n) {
|
|
31
24
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
32
25
|
if (!m) return o;
|
|
33
26
|
var i = m.call(o),
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
27
|
+
r,
|
|
28
|
+
ar = [],
|
|
29
|
+
e;
|
|
38
30
|
try {
|
|
39
31
|
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) {
|
|
40
32
|
ar.push(r.value);
|
|
@@ -50,10 +42,8 @@ var __read = this && this.__read || function (o, n) {
|
|
|
50
42
|
if (e) throw e.error;
|
|
51
43
|
}
|
|
52
44
|
}
|
|
53
|
-
|
|
54
45
|
return ar;
|
|
55
46
|
};
|
|
56
|
-
|
|
57
47
|
var __spreadArray = this && this.__spreadArray || function (to, from, pack) {
|
|
58
48
|
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
59
49
|
if (ar || !(i in from)) {
|
|
@@ -63,21 +53,17 @@ var __spreadArray = this && this.__spreadArray || function (to, from, pack) {
|
|
|
63
53
|
}
|
|
64
54
|
return to.concat(ar || Array.prototype.slice.call(from));
|
|
65
55
|
};
|
|
66
|
-
|
|
67
56
|
import React from 'react';
|
|
68
57
|
import isArray from 'lodash/isArray';
|
|
69
58
|
import ConditionInput from '../condition-input';
|
|
70
59
|
var TextInput = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
71
60
|
var regexp = props.regexp,
|
|
72
|
-
|
|
73
|
-
|
|
61
|
+
restProps = __rest(props, ["regexp"]);
|
|
74
62
|
var trimStartReg = /(^\s+)/g;
|
|
75
63
|
var resultRegexp = trimStartReg;
|
|
76
|
-
|
|
77
64
|
if (regexp) {
|
|
78
65
|
resultRegexp = isArray(regexp) ? __spreadArray([trimStartReg], __read(regexp), false) : [trimStartReg, regexp];
|
|
79
66
|
}
|
|
80
|
-
|
|
81
67
|
return /*#__PURE__*/React.createElement(ConditionInput, __assign({}, restProps, {
|
|
82
68
|
ref: ref,
|
|
83
69
|
regexp: resultRegexp
|
|
@@ -23,24 +23,15 @@
|
|
|
23
23
|
-moz-user-select: none;
|
|
24
24
|
user-select: none;
|
|
25
25
|
}
|
|
26
|
-
.ant-input-affix-wrapper:-ms-input-placeholder {
|
|
27
|
-
color: #bfbfbf;
|
|
28
|
-
-ms-user-select: none;
|
|
29
|
-
user-select: none;
|
|
30
|
-
}
|
|
31
26
|
.ant-input-affix-wrapper::placeholder {
|
|
32
27
|
color: #bfbfbf;
|
|
33
28
|
-webkit-user-select: none;
|
|
34
29
|
-moz-user-select: none;
|
|
35
|
-
-ms-user-select: none;
|
|
36
30
|
user-select: none;
|
|
37
31
|
}
|
|
38
32
|
.ant-input-affix-wrapper:-moz-placeholder-shown {
|
|
39
33
|
text-overflow: ellipsis;
|
|
40
34
|
}
|
|
41
|
-
.ant-input-affix-wrapper:-ms-input-placeholder {
|
|
42
|
-
text-overflow: ellipsis;
|
|
43
|
-
}
|
|
44
35
|
.ant-input-affix-wrapper:placeholder-shown {
|
|
45
36
|
text-overflow: ellipsis;
|
|
46
37
|
}
|
|
@@ -137,6 +128,7 @@ textarea.ant-input-affix-wrapper {
|
|
|
137
128
|
}
|
|
138
129
|
.ant-input-affix-wrapper > input.ant-input {
|
|
139
130
|
padding: 0;
|
|
131
|
+
font-size: inherit;
|
|
140
132
|
border: none;
|
|
141
133
|
outline: none;
|
|
142
134
|
}
|
|
@@ -305,24 +297,15 @@ textarea.ant-input-affix-wrapper {
|
|
|
305
297
|
-moz-user-select: none;
|
|
306
298
|
user-select: none;
|
|
307
299
|
}
|
|
308
|
-
.ant-input:-ms-input-placeholder {
|
|
309
|
-
color: #bfbfbf;
|
|
310
|
-
-ms-user-select: none;
|
|
311
|
-
user-select: none;
|
|
312
|
-
}
|
|
313
300
|
.ant-input::placeholder {
|
|
314
301
|
color: #bfbfbf;
|
|
315
302
|
-webkit-user-select: none;
|
|
316
303
|
-moz-user-select: none;
|
|
317
|
-
-ms-user-select: none;
|
|
318
304
|
user-select: none;
|
|
319
305
|
}
|
|
320
306
|
.ant-input:-moz-placeholder-shown {
|
|
321
307
|
text-overflow: ellipsis;
|
|
322
308
|
}
|
|
323
|
-
.ant-input:-ms-input-placeholder {
|
|
324
|
-
text-overflow: ellipsis;
|
|
325
|
-
}
|
|
326
309
|
.ant-input:placeholder-shown {
|
|
327
310
|
text-overflow: ellipsis;
|
|
328
311
|
}
|
|
@@ -835,18 +818,21 @@ textarea.ant-input {
|
|
|
835
818
|
}
|
|
836
819
|
.ant-input-search-rtl .ant-input:hover + .ant-input-group-addon .ant-input-search-button:not(.ant-btn-primary),
|
|
837
820
|
.ant-input-search-rtl .ant-input:focus + .ant-input-group-addon .ant-input-search-button:not(.ant-btn-primary) {
|
|
838
|
-
border-right-color: #40a9ff;
|
|
839
821
|
border-left-color: #d9d9d9;
|
|
840
822
|
}
|
|
823
|
+
.ant-input-search-rtl .ant-input:hover + .ant-input-group-addon .ant-input-search-button:not(.ant-btn-primary):hover,
|
|
824
|
+
.ant-input-search-rtl .ant-input:focus + .ant-input-group-addon .ant-input-search-button:not(.ant-btn-primary):hover {
|
|
825
|
+
border-left-color: #40a9ff;
|
|
826
|
+
}
|
|
841
827
|
.ant-input-search-rtl > .ant-input-group > .ant-input-affix-wrapper:hover,
|
|
842
828
|
.ant-input-search-rtl > .ant-input-group > .ant-input-affix-wrapper-focused {
|
|
843
829
|
border-right-color: #40a9ff;
|
|
844
830
|
}
|
|
845
|
-
.ant-input-search-rtl > .ant-input-group > .ant-input-group-addon {
|
|
831
|
+
.ant-input-search-rtl > .ant-input-group > .ant-input-group-addon:last-child {
|
|
846
832
|
right: -1px;
|
|
847
833
|
left: auto;
|
|
848
834
|
}
|
|
849
|
-
.ant-input-search-rtl > .ant-input-group > .ant-input-group-addon .ant-input-search-button {
|
|
835
|
+
.ant-input-search-rtl > .ant-input-group > .ant-input-group-addon:last-child .ant-input-search-button {
|
|
850
836
|
border-radius: 2px 0 0 2px;
|
|
851
837
|
}
|
|
852
838
|
@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {
|
package/lib/a-select/index.js
CHANGED
|
@@ -4,39 +4,31 @@ var __assign = this && this.__assign || function () {
|
|
|
4
4
|
__assign = Object.assign || function (t) {
|
|
5
5
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
6
6
|
s = arguments[i];
|
|
7
|
-
|
|
8
7
|
for (var p in s) {
|
|
9
8
|
if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
10
9
|
}
|
|
11
10
|
}
|
|
12
|
-
|
|
13
11
|
return t;
|
|
14
12
|
};
|
|
15
|
-
|
|
16
13
|
return __assign.apply(this, arguments);
|
|
17
14
|
};
|
|
18
|
-
|
|
19
15
|
var __rest = this && this.__rest || function (s, e) {
|
|
20
16
|
var t = {};
|
|
21
|
-
|
|
22
17
|
for (var p in s) {
|
|
23
18
|
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
24
19
|
}
|
|
25
|
-
|
|
26
20
|
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
27
21
|
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
28
22
|
}
|
|
29
23
|
return t;
|
|
30
24
|
};
|
|
31
|
-
|
|
32
25
|
var __read = this && this.__read || function (o, n) {
|
|
33
26
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
34
27
|
if (!m) return o;
|
|
35
28
|
var i = m.call(o),
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
29
|
+
r,
|
|
30
|
+
ar = [],
|
|
31
|
+
e;
|
|
40
32
|
try {
|
|
41
33
|
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) {
|
|
42
34
|
ar.push(r.value);
|
|
@@ -52,37 +44,27 @@ var __read = this && this.__read || function (o, n) {
|
|
|
52
44
|
if (e) throw e.error;
|
|
53
45
|
}
|
|
54
46
|
}
|
|
55
|
-
|
|
56
47
|
return ar;
|
|
57
48
|
};
|
|
58
|
-
|
|
59
49
|
var __importDefault = this && this.__importDefault || function (mod) {
|
|
60
50
|
return mod && mod.__esModule ? mod : {
|
|
61
51
|
"default": mod
|
|
62
52
|
};
|
|
63
53
|
};
|
|
64
|
-
|
|
65
54
|
Object.defineProperty(exports, "__esModule", {
|
|
66
55
|
value: true
|
|
67
56
|
});
|
|
68
|
-
|
|
69
57
|
var react_1 = __importDefault(require("react"));
|
|
70
|
-
|
|
71
58
|
var select_1 = __importDefault(require("antd/lib/select"));
|
|
72
|
-
|
|
73
59
|
var classnames_1 = __importDefault(require("classnames"));
|
|
74
|
-
|
|
75
60
|
var useControllableValue_1 = __importDefault(require("ahooks/lib/useControllableValue"));
|
|
76
|
-
|
|
77
61
|
var ASelect = function ASelect(props) {
|
|
78
62
|
var valueRender = props.valueRender,
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
63
|
+
className = props.className,
|
|
64
|
+
restProps = __rest(props, ["valueRender", "className"]);
|
|
82
65
|
var _a = __read((0, useControllableValue_1["default"])(props), 2),
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
66
|
+
value = _a[0],
|
|
67
|
+
onChange = _a[1];
|
|
86
68
|
if (!valueRender) {
|
|
87
69
|
return react_1["default"].createElement(select_1["default"], __assign({
|
|
88
70
|
className: className
|
|
@@ -91,7 +73,6 @@ var ASelect = function ASelect(props) {
|
|
|
91
73
|
onChange: onChange
|
|
92
74
|
}));
|
|
93
75
|
}
|
|
94
|
-
|
|
95
76
|
return react_1["default"].createElement("div", {
|
|
96
77
|
className: (0, classnames_1["default"])('a-select-wrap', className)
|
|
97
78
|
}, react_1["default"].createElement("div", {
|
|
@@ -101,6 +82,5 @@ var ASelect = function ASelect(props) {
|
|
|
101
82
|
onChange: onChange
|
|
102
83
|
})));
|
|
103
84
|
};
|
|
104
|
-
|
|
105
85
|
exports["default"] = ASelect;
|
|
106
86
|
ASelect.Option = select_1["default"].Option;
|