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
|
@@ -3,13 +3,8 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
|
|
7
6
|
require("antd/lib/date-picker/style");
|
|
8
|
-
|
|
9
7
|
require("antd/lib/checkbox/style");
|
|
10
|
-
|
|
11
8
|
require("antd/lib/radio/style");
|
|
12
|
-
|
|
13
9
|
require("./index.less");
|
|
14
|
-
|
|
15
10
|
require("../../label-range-picker/style/index");
|
|
@@ -4,10 +4,9 @@ var __read = this && this.__read || function (o, n) {
|
|
|
4
4
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
5
5
|
if (!m) return o;
|
|
6
6
|
var i = m.call(o),
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
r,
|
|
8
|
+
ar = [],
|
|
9
|
+
e;
|
|
11
10
|
try {
|
|
12
11
|
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) {
|
|
13
12
|
ar.push(r.value);
|
|
@@ -23,52 +22,39 @@ var __read = this && this.__read || function (o, n) {
|
|
|
23
22
|
if (e) throw e.error;
|
|
24
23
|
}
|
|
25
24
|
}
|
|
26
|
-
|
|
27
25
|
return ar;
|
|
28
26
|
};
|
|
29
|
-
|
|
30
27
|
var __importDefault = this && this.__importDefault || function (mod) {
|
|
31
28
|
return mod && mod.__esModule ? mod : {
|
|
32
29
|
"default": mod
|
|
33
30
|
};
|
|
34
31
|
};
|
|
35
|
-
|
|
36
32
|
Object.defineProperty(exports, "__esModule", {
|
|
37
33
|
value: true
|
|
38
34
|
});
|
|
39
35
|
exports.formatMaxScope = void 0;
|
|
40
|
-
|
|
41
36
|
var dateUtils_1 = __importDefault(require("aa-utils/lib/dateUtils"));
|
|
42
|
-
|
|
43
37
|
var now = dateUtils_1["default"].getToday().endOf('day');
|
|
44
|
-
|
|
45
38
|
var formatMaxScope = function formatMaxScope(dateStampTuple, maxScope) {
|
|
46
39
|
var _a, _b;
|
|
47
|
-
|
|
48
40
|
var _c = __read(dateStampTuple || [], 2),
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
41
|
+
start = _c[0],
|
|
42
|
+
end = _c[1];
|
|
52
43
|
var startStamp = (_a = start === null || start === void 0 ? void 0 : start.clone().startOf('day')) !== null && _a !== void 0 ? _a : null;
|
|
53
44
|
var endStamp = (_b = end === null || end === void 0 ? void 0 : end.clone().endOf('day')) !== null && _b !== void 0 ? _b : null;
|
|
54
|
-
|
|
55
45
|
if (startStamp && endStamp) {
|
|
56
46
|
if (endStamp.diff(startStamp, 'day') > maxScope) {
|
|
57
47
|
startStamp = endStamp.clone().subtract(maxScope - 1, 'day').startOf('day');
|
|
58
48
|
}
|
|
59
49
|
}
|
|
60
|
-
|
|
61
50
|
if (!startStamp && !endStamp) {
|
|
62
51
|
startStamp = now.clone().subtract(maxScope - 1, 'day').startOf('day');
|
|
63
52
|
endStamp = now.clone().endOf('day');
|
|
64
53
|
}
|
|
65
|
-
|
|
66
54
|
if (startStamp || endStamp) {
|
|
67
55
|
startStamp = startStamp !== null && startStamp !== void 0 ? startStamp : endStamp.clone().subtract(maxScope - 1, 'day').startOf('day');
|
|
68
56
|
endStamp = endStamp !== null && endStamp !== void 0 ? endStamp : startStamp.clone().add(maxScope - 1, 'day').endOf('day');
|
|
69
57
|
}
|
|
70
|
-
|
|
71
58
|
return [startStamp, endStamp];
|
|
72
59
|
};
|
|
73
|
-
|
|
74
60
|
exports.formatMaxScope = formatMaxScope;
|
|
@@ -4,26 +4,21 @@ 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 __read = this && this.__read || function (o, n) {
|
|
20
16
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
21
17
|
if (!m) return o;
|
|
22
18
|
var i = m.call(o),
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
19
|
+
r,
|
|
20
|
+
ar = [],
|
|
21
|
+
e;
|
|
27
22
|
try {
|
|
28
23
|
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) {
|
|
29
24
|
ar.push(r.value);
|
|
@@ -39,66 +34,49 @@ var __read = this && this.__read || function (o, n) {
|
|
|
39
34
|
if (e) throw e.error;
|
|
40
35
|
}
|
|
41
36
|
}
|
|
42
|
-
|
|
43
37
|
return ar;
|
|
44
38
|
};
|
|
45
|
-
|
|
46
39
|
var __importDefault = this && this.__importDefault || function (mod) {
|
|
47
40
|
return mod && mod.__esModule ? mod : {
|
|
48
41
|
"default": mod
|
|
49
42
|
};
|
|
50
43
|
};
|
|
51
|
-
|
|
52
44
|
Object.defineProperty(exports, "__esModule", {
|
|
53
45
|
value: true
|
|
54
46
|
});
|
|
55
|
-
|
|
56
47
|
var react_1 = __importDefault(require("react"));
|
|
57
|
-
|
|
58
48
|
var useControllableValue_1 = __importDefault(require("ahooks/lib/useControllableValue"));
|
|
59
|
-
|
|
60
49
|
var antd_1 = require("antd");
|
|
61
|
-
|
|
62
50
|
var CalendarOutlined_1 = __importDefault(require("a-icons/lib/CalendarOutlined"));
|
|
63
|
-
|
|
64
51
|
var classnames_1 = __importDefault(require("classnames"));
|
|
65
|
-
|
|
66
52
|
var LabelDatePicker = function LabelDatePicker(props) {
|
|
67
53
|
var className = props.className,
|
|
68
|
-
|
|
54
|
+
label = props.label;
|
|
69
55
|
var datePickerRef = react_1["default"].useRef(null);
|
|
70
|
-
|
|
71
56
|
var _a = __read((0, useControllableValue_1["default"])(props, {
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
57
|
+
valuePropName: 'open',
|
|
58
|
+
trigger: 'setOpen'
|
|
59
|
+
}), 2),
|
|
60
|
+
open = _a[0],
|
|
61
|
+
setOpen = _a[1];
|
|
78
62
|
var _b = __read((0, useControllableValue_1["default"])(props), 2),
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
63
|
+
value = _b[0],
|
|
64
|
+
setValue = _b[1];
|
|
82
65
|
var handleChange = function handleChange(nextValue) {
|
|
83
66
|
setValue(nextValue);
|
|
84
67
|
};
|
|
85
|
-
|
|
86
68
|
var handleLabelClick = function handleLabelClick() {
|
|
87
69
|
if (!open) {
|
|
88
70
|
setOpen(!open);
|
|
89
71
|
}
|
|
90
|
-
|
|
91
72
|
datePickerRef.current.focus();
|
|
92
73
|
};
|
|
93
|
-
|
|
94
74
|
var onBlur = function onBlur() {
|
|
95
75
|
setOpen(false);
|
|
96
76
|
};
|
|
97
|
-
|
|
98
77
|
var onOpenChange = function onOpenChange(nextOpen) {
|
|
99
78
|
setOpen(nextOpen);
|
|
100
79
|
};
|
|
101
|
-
|
|
102
80
|
return react_1["default"].createElement("div", {
|
|
103
81
|
className: (0, classnames_1["default"])({
|
|
104
82
|
'label-date-picker': true,
|
|
@@ -117,5 +95,4 @@ var LabelDatePicker = function LabelDatePicker(props) {
|
|
|
117
95
|
onClick: handleLabelClick
|
|
118
96
|
}, label));
|
|
119
97
|
};
|
|
120
|
-
|
|
121
98
|
exports["default"] = LabelDatePicker;
|