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/json-editor/index.js
CHANGED
|
@@ -2,26 +2,21 @@ 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 __read = this && this.__read || function (o, n) {
|
|
18
14
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
19
15
|
if (!m) return o;
|
|
20
16
|
var i = m.call(o),
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
17
|
+
r,
|
|
18
|
+
ar = [],
|
|
19
|
+
e;
|
|
25
20
|
try {
|
|
26
21
|
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) {
|
|
27
22
|
ar.push(r.value);
|
|
@@ -37,10 +32,8 @@ var __read = this && this.__read || function (o, n) {
|
|
|
37
32
|
if (e) throw e.error;
|
|
38
33
|
}
|
|
39
34
|
}
|
|
40
|
-
|
|
41
35
|
return ar;
|
|
42
36
|
};
|
|
43
|
-
|
|
44
37
|
import JSONEditor from 'jsoneditor';
|
|
45
38
|
import React, { useEffect, useImperativeHandle } from 'react';
|
|
46
39
|
import useControllableValue from "ahooks/es/useControllableValue";
|
|
@@ -48,15 +41,12 @@ import useMount from "ahooks/es/useMount";
|
|
|
48
41
|
import isEqual from 'lodash/isEqual';
|
|
49
42
|
import useUnmount from "ahooks/es/useUnmount";
|
|
50
43
|
import classNames from 'classnames';
|
|
51
|
-
|
|
52
44
|
var JsonEditor = function JsonEditor(props, ref) {
|
|
53
45
|
var options = props.options,
|
|
54
|
-
|
|
55
|
-
|
|
46
|
+
className = props.className;
|
|
56
47
|
var _a = __read(useControllableValue(props), 2),
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
48
|
+
value = _a[0],
|
|
49
|
+
setValue = _a[1];
|
|
60
50
|
var containerRef = React.useRef();
|
|
61
51
|
var editorInstanceRef = React.useRef();
|
|
62
52
|
useMount(function () {
|
|
@@ -66,7 +56,6 @@ var JsonEditor = function JsonEditor(props, ref) {
|
|
|
66
56
|
}, options), {
|
|
67
57
|
onChangeText: function onChangeText() {
|
|
68
58
|
var _a;
|
|
69
|
-
|
|
70
59
|
try {
|
|
71
60
|
var currentJson = (_a = editorInstanceRef.current) === null || _a === void 0 ? void 0 : _a.get();
|
|
72
61
|
setValue(currentJson);
|
|
@@ -81,14 +70,12 @@ var JsonEditor = function JsonEditor(props, ref) {
|
|
|
81
70
|
});
|
|
82
71
|
useEffect(function () {
|
|
83
72
|
var _a, _b;
|
|
84
|
-
|
|
85
73
|
if (value && !isEqual(value, (_a = editorInstanceRef.current) === null || _a === void 0 ? void 0 : _a.get())) {
|
|
86
74
|
(_b = editorInstanceRef.current) === null || _b === void 0 ? void 0 : _b.update(value);
|
|
87
75
|
}
|
|
88
76
|
}, [value]);
|
|
89
77
|
useUnmount(function () {
|
|
90
78
|
var _a;
|
|
91
|
-
|
|
92
79
|
(_a = editorInstanceRef.current) === null || _a === void 0 ? void 0 : _a.destroy();
|
|
93
80
|
});
|
|
94
81
|
return /*#__PURE__*/React.createElement("div", {
|
|
@@ -98,6 +85,5 @@ var JsonEditor = function JsonEditor(props, ref) {
|
|
|
98
85
|
className: classNames('a-jason-editor', className)
|
|
99
86
|
});
|
|
100
87
|
};
|
|
101
|
-
|
|
102
88
|
var ForwardRefJsonEditor = /*#__PURE__*/React.forwardRef(JsonEditor);
|
|
103
89
|
export default ForwardRefJsonEditor;
|
package/es/keep-tab/index.d.ts
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import type { BadgeProps } from 'antd/lib/badge';
|
|
3
3
|
import type { TabPaneProps, TabsProps } from 'antd/lib/tabs';
|
|
4
|
-
|
|
4
|
+
import type { Tab } from 'rc-tabs/lib/interface';
|
|
5
|
+
interface NewTab extends Tab {
|
|
6
|
+
count?: React.ReactNode;
|
|
7
|
+
}
|
|
8
|
+
export interface KeepTabProps extends Omit<TabsProps, 'items'> {
|
|
5
9
|
/** 由TabPane组成的children */
|
|
6
10
|
children: React.ReactNode;
|
|
7
11
|
/** 初始化选中面板的 key,如果没有设置 activeKey */
|
|
@@ -14,6 +18,7 @@ export interface KeepTabProps extends TabsProps {
|
|
|
14
18
|
onChange?: (activeKey: string) => void;
|
|
15
19
|
/** antd Badge组件除count意外的所有props */
|
|
16
20
|
badgeProps?: Omit<BadgeProps, 'count'>;
|
|
21
|
+
items: NewTab[];
|
|
17
22
|
}
|
|
18
23
|
export interface SelfTabPaneProps extends TabPaneProps {
|
|
19
24
|
count: Pick<BadgeProps, 'count'>;
|
|
@@ -24,6 +29,6 @@ declare const KeepTab: {
|
|
|
24
29
|
saveActiveKeyName: string;
|
|
25
30
|
};
|
|
26
31
|
displayName: string;
|
|
27
|
-
TabPane:
|
|
32
|
+
TabPane: React.FC<TabPaneProps>;
|
|
28
33
|
};
|
|
29
34
|
export default KeepTab;
|
package/es/keep-tab/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
|
import * as React from 'react';
|
|
58
48
|
import find from 'lodash/find';
|
|
59
49
|
import qsHelp from "aa-utils/es/qsHelp";
|
|
@@ -61,82 +51,67 @@ import Badge from "antd/es/badge";
|
|
|
61
51
|
import Tabs from "antd/es/tabs";
|
|
62
52
|
import useUrlState from '@ahooksjs/use-url-state';
|
|
63
53
|
import useControllableValue from "ahooks/es/useControllableValue";
|
|
64
|
-
import toArray from "rc-util/es/Children/toArray";
|
|
65
54
|
var TabPane = Tabs.TabPane;
|
|
66
55
|
var defaultBadgeProps = {};
|
|
67
|
-
|
|
68
56
|
var KeepTab = function KeepTab(props) {
|
|
69
57
|
var _a;
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
58
|
+
var _b = props.items,
|
|
59
|
+
items = _b === void 0 ? [] : _b,
|
|
60
|
+
defaultActiveKey = props.defaultActiveKey,
|
|
61
|
+
saveActiveKeyName = props.saveActiveKeyName,
|
|
62
|
+
onChange = props.onChange,
|
|
63
|
+
_c = props.badgeProps,
|
|
64
|
+
badgeProps = _c === void 0 ? defaultBadgeProps : _c,
|
|
65
|
+
restProps = __rest(props, ["items", "defaultActiveKey", "saveActiveKeyName", "onChange", "badgeProps"]);
|
|
79
66
|
var defaultUrlParams = qsHelp.getQueryObject();
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
tabActiveKey = _d[0],
|
|
90
|
-
setTabActiveKey = _d[1];
|
|
91
|
-
|
|
92
|
-
var arrayChildren = toArray(children);
|
|
67
|
+
var _d = __read(useUrlState((_a = {}, _a[saveActiveKeyName] = defaultUrlParams[saveActiveKeyName] || defaultActiveKey, _a)), 2),
|
|
68
|
+
urlParams = _d[0],
|
|
69
|
+
setUrlParams = _d[1];
|
|
70
|
+
var _e = __read(useControllableValue(props, {
|
|
71
|
+
valuePropName: 'activeKey',
|
|
72
|
+
defaultValue: defaultUrlParams[saveActiveKeyName] || defaultActiveKey
|
|
73
|
+
}), 2),
|
|
74
|
+
tabActiveKey = _e[0],
|
|
75
|
+
setTabActiveKey = _e[1];
|
|
93
76
|
React.useEffect(function () {
|
|
94
77
|
var _a;
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
var resultActiveTab = find(arrayChildren, {
|
|
78
|
+
if (!('activeKey' in props) && items) {
|
|
79
|
+
var resultActiveTab = find(items, {
|
|
98
80
|
key: urlParams[saveActiveKeyName]
|
|
99
81
|
});
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
setTabActiveKey(arrayChildren[0].key);
|
|
82
|
+
if (!resultActiveTab || resultActiveTab.disabled) {
|
|
83
|
+
setUrlParams((_a = {}, _a[saveActiveKeyName] = items[0].key, _a));
|
|
84
|
+
setTabActiveKey(items[0].key);
|
|
104
85
|
}
|
|
105
86
|
}
|
|
106
87
|
}, [tabActiveKey]);
|
|
107
|
-
|
|
108
88
|
var handleTabChange = function handleTabChange(nextActiveKey) {
|
|
109
89
|
var _a;
|
|
110
|
-
|
|
111
90
|
setUrlParams((_a = {}, _a[saveActiveKeyName] = nextActiveKey, _a));
|
|
112
91
|
setTabActiveKey(nextActiveKey);
|
|
113
92
|
};
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
var _a;
|
|
117
|
-
|
|
118
|
-
var count = (_a = childItem === null || childItem === void 0 ? void 0 : childItem.props) === null || _a === void 0 ? void 0 : _a.count;
|
|
119
|
-
|
|
93
|
+
var resultItems = items.map(function (item) {
|
|
94
|
+
var count = item === null || item === void 0 ? void 0 : item.count;
|
|
120
95
|
if (count) {
|
|
121
|
-
return
|
|
122
|
-
|
|
96
|
+
return __assign(__assign({}, item), {
|
|
97
|
+
label: /*#__PURE__*/React.createElement(Badge, __assign({
|
|
123
98
|
className: "tab-badge",
|
|
124
99
|
count: count,
|
|
125
100
|
offset: [16, -9]
|
|
126
|
-
}, badgeProps), /*#__PURE__*/React.createElement("span", null,
|
|
101
|
+
}, badgeProps), /*#__PURE__*/React.createElement("span", null, item.label))
|
|
127
102
|
});
|
|
128
103
|
}
|
|
129
|
-
|
|
130
|
-
return childItem;
|
|
104
|
+
return item;
|
|
131
105
|
});
|
|
132
106
|
return /*#__PURE__*/React.createElement(Tabs, __assign({
|
|
133
107
|
animated: false,
|
|
134
108
|
onChange: handleTabChange,
|
|
135
109
|
destroyInactiveTabPane: true,
|
|
136
110
|
activeKey: tabActiveKey
|
|
137
|
-
}, restProps
|
|
111
|
+
}, restProps, {
|
|
112
|
+
items: resultItems
|
|
113
|
+
}));
|
|
138
114
|
};
|
|
139
|
-
|
|
140
115
|
KeepTab.defaultProps = {
|
|
141
116
|
saveActiveKeyName: 'active'
|
|
142
117
|
};
|
|
@@ -589,7 +589,7 @@
|
|
|
589
589
|
margin: 0 0 0 32px;
|
|
590
590
|
}
|
|
591
591
|
.ant-tabs-content {
|
|
592
|
-
|
|
592
|
+
position: relative;
|
|
593
593
|
width: 100%;
|
|
594
594
|
}
|
|
595
595
|
.ant-tabs-content-holder {
|
|
@@ -597,14 +597,37 @@
|
|
|
597
597
|
min-width: 0;
|
|
598
598
|
min-height: 0;
|
|
599
599
|
}
|
|
600
|
-
.ant-tabs-content-animated {
|
|
601
|
-
transition: margin 0.3s;
|
|
602
|
-
}
|
|
603
600
|
.ant-tabs-tabpane {
|
|
604
|
-
flex: none;
|
|
605
|
-
width: 100%;
|
|
606
601
|
outline: none;
|
|
607
602
|
}
|
|
603
|
+
.ant-tabs-tabpane-hidden {
|
|
604
|
+
display: none;
|
|
605
|
+
}
|
|
606
|
+
.ant-tabs-switch-appear,
|
|
607
|
+
.ant-tabs-switch-enter {
|
|
608
|
+
transition: none;
|
|
609
|
+
}
|
|
610
|
+
.ant-tabs-switch-appear-start,
|
|
611
|
+
.ant-tabs-switch-enter-start {
|
|
612
|
+
opacity: 0;
|
|
613
|
+
}
|
|
614
|
+
.ant-tabs-switch-appear-active,
|
|
615
|
+
.ant-tabs-switch-enter-active {
|
|
616
|
+
opacity: 1;
|
|
617
|
+
transition: opacity 0.3s;
|
|
618
|
+
}
|
|
619
|
+
.ant-tabs-switch-leave {
|
|
620
|
+
position: absolute;
|
|
621
|
+
transition: none;
|
|
622
|
+
inset: 0;
|
|
623
|
+
}
|
|
624
|
+
.ant-tabs-switch-leave-start {
|
|
625
|
+
opacity: 1;
|
|
626
|
+
}
|
|
627
|
+
.ant-tabs-switch-leave-active {
|
|
628
|
+
opacity: 0;
|
|
629
|
+
transition: opacity 0.3s;
|
|
630
|
+
}
|
|
608
631
|
.ant-badge {
|
|
609
632
|
box-sizing: border-box;
|
|
610
633
|
margin: 0;
|
|
@@ -673,8 +696,7 @@
|
|
|
673
696
|
.ant-badge-count.anticon-spin,
|
|
674
697
|
.ant-badge-dot.anticon-spin,
|
|
675
698
|
.ant-badge .ant-scroll-number-custom-component.anticon-spin {
|
|
676
|
-
|
|
677
|
-
animation: antBadgeLoadingCircle 1s infinite linear;
|
|
699
|
+
animation: antBadgeLoadingCircle 1s infinite linear;
|
|
678
700
|
}
|
|
679
701
|
.ant-badge-status {
|
|
680
702
|
line-height: inherit;
|
|
@@ -704,8 +726,7 @@
|
|
|
704
726
|
height: 100%;
|
|
705
727
|
border: 1px solid #1890ff;
|
|
706
728
|
border-radius: 50%;
|
|
707
|
-
|
|
708
|
-
animation: antStatusProcessing 1.2s infinite ease-in-out;
|
|
729
|
+
animation: antStatusProcessing 1.2s infinite ease-in-out;
|
|
709
730
|
content: '';
|
|
710
731
|
}
|
|
711
732
|
.ant-badge-status-default {
|
|
@@ -763,25 +784,19 @@
|
|
|
763
784
|
}
|
|
764
785
|
.ant-badge-zoom-appear,
|
|
765
786
|
.ant-badge-zoom-enter {
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
-webkit-animation-fill-mode: both;
|
|
769
|
-
animation-fill-mode: both;
|
|
787
|
+
animation: antZoomBadgeIn 0.3s cubic-bezier(0.12, 0.4, 0.29, 1.46);
|
|
788
|
+
animation-fill-mode: both;
|
|
770
789
|
}
|
|
771
790
|
.ant-badge-zoom-leave {
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
-webkit-animation-fill-mode: both;
|
|
775
|
-
animation-fill-mode: both;
|
|
791
|
+
animation: antZoomBadgeOut 0.3s cubic-bezier(0.71, -0.46, 0.88, 0.6);
|
|
792
|
+
animation-fill-mode: both;
|
|
776
793
|
}
|
|
777
794
|
.ant-badge-not-a-wrapper .ant-badge-zoom-appear,
|
|
778
795
|
.ant-badge-not-a-wrapper .ant-badge-zoom-enter {
|
|
779
|
-
|
|
780
|
-
animation: antNoWrapperZoomBadgeIn 0.3s cubic-bezier(0.12, 0.4, 0.29, 1.46);
|
|
796
|
+
animation: antNoWrapperZoomBadgeIn 0.3s cubic-bezier(0.12, 0.4, 0.29, 1.46);
|
|
781
797
|
}
|
|
782
798
|
.ant-badge-not-a-wrapper .ant-badge-zoom-leave {
|
|
783
|
-
|
|
784
|
-
animation: antNoWrapperZoomBadgeOut 0.3s cubic-bezier(0.71, -0.46, 0.88, 0.6);
|
|
799
|
+
animation: antNoWrapperZoomBadgeOut 0.3s cubic-bezier(0.71, -0.46, 0.88, 0.6);
|
|
785
800
|
}
|
|
786
801
|
.ant-badge-not-a-wrapper:not(.ant-badge-status) {
|
|
787
802
|
vertical-align: middle;
|
|
@@ -797,16 +812,6 @@
|
|
|
797
812
|
display: block;
|
|
798
813
|
transform-origin: 50% 50%;
|
|
799
814
|
}
|
|
800
|
-
@-webkit-keyframes antStatusProcessing {
|
|
801
|
-
0% {
|
|
802
|
-
transform: scale(0.8);
|
|
803
|
-
opacity: 0.5;
|
|
804
|
-
}
|
|
805
|
-
100% {
|
|
806
|
-
transform: scale(2.4);
|
|
807
|
-
opacity: 0;
|
|
808
|
-
}
|
|
809
|
-
}
|
|
810
815
|
@keyframes antStatusProcessing {
|
|
811
816
|
0% {
|
|
812
817
|
transform: scale(0.8);
|
|
@@ -842,15 +847,6 @@
|
|
|
842
847
|
.ant-scroll-number-symbol {
|
|
843
848
|
vertical-align: top;
|
|
844
849
|
}
|
|
845
|
-
@-webkit-keyframes antZoomBadgeIn {
|
|
846
|
-
0% {
|
|
847
|
-
transform: scale(0) translate(50%, -50%);
|
|
848
|
-
opacity: 0;
|
|
849
|
-
}
|
|
850
|
-
100% {
|
|
851
|
-
transform: scale(1) translate(50%, -50%);
|
|
852
|
-
}
|
|
853
|
-
}
|
|
854
850
|
@keyframes antZoomBadgeIn {
|
|
855
851
|
0% {
|
|
856
852
|
transform: scale(0) translate(50%, -50%);
|
|
@@ -860,15 +856,6 @@
|
|
|
860
856
|
transform: scale(1) translate(50%, -50%);
|
|
861
857
|
}
|
|
862
858
|
}
|
|
863
|
-
@-webkit-keyframes antZoomBadgeOut {
|
|
864
|
-
0% {
|
|
865
|
-
transform: scale(1) translate(50%, -50%);
|
|
866
|
-
}
|
|
867
|
-
100% {
|
|
868
|
-
transform: scale(0) translate(50%, -50%);
|
|
869
|
-
opacity: 0;
|
|
870
|
-
}
|
|
871
|
-
}
|
|
872
859
|
@keyframes antZoomBadgeOut {
|
|
873
860
|
0% {
|
|
874
861
|
transform: scale(1) translate(50%, -50%);
|
|
@@ -878,15 +865,6 @@
|
|
|
878
865
|
opacity: 0;
|
|
879
866
|
}
|
|
880
867
|
}
|
|
881
|
-
@-webkit-keyframes antNoWrapperZoomBadgeIn {
|
|
882
|
-
0% {
|
|
883
|
-
transform: scale(0);
|
|
884
|
-
opacity: 0;
|
|
885
|
-
}
|
|
886
|
-
100% {
|
|
887
|
-
transform: scale(1);
|
|
888
|
-
}
|
|
889
|
-
}
|
|
890
868
|
@keyframes antNoWrapperZoomBadgeIn {
|
|
891
869
|
0% {
|
|
892
870
|
transform: scale(0);
|
|
@@ -896,15 +874,6 @@
|
|
|
896
874
|
transform: scale(1);
|
|
897
875
|
}
|
|
898
876
|
}
|
|
899
|
-
@-webkit-keyframes antNoWrapperZoomBadgeOut {
|
|
900
|
-
0% {
|
|
901
|
-
transform: scale(1);
|
|
902
|
-
}
|
|
903
|
-
100% {
|
|
904
|
-
transform: scale(0);
|
|
905
|
-
opacity: 0;
|
|
906
|
-
}
|
|
907
|
-
}
|
|
908
877
|
@keyframes antNoWrapperZoomBadgeOut {
|
|
909
878
|
0% {
|
|
910
879
|
transform: scale(1);
|
|
@@ -914,15 +883,6 @@
|
|
|
914
883
|
opacity: 0;
|
|
915
884
|
}
|
|
916
885
|
}
|
|
917
|
-
@-webkit-keyframes antBadgeLoadingCircle {
|
|
918
|
-
0% {
|
|
919
|
-
transform-origin: 50%;
|
|
920
|
-
}
|
|
921
|
-
100% {
|
|
922
|
-
transform: translate(50%, -50%) rotate(360deg);
|
|
923
|
-
transform-origin: 50%;
|
|
924
|
-
}
|
|
925
|
-
}
|
|
926
886
|
@keyframes antBadgeLoadingCircle {
|
|
927
887
|
0% {
|
|
928
888
|
transform-origin: 50%;
|
|
@@ -1070,12 +1030,10 @@
|
|
|
1070
1030
|
}
|
|
1071
1031
|
.ant-badge:not(.ant-badge-not-a-wrapper).ant-badge-rtl .ant-badge-zoom-appear,
|
|
1072
1032
|
.ant-badge:not(.ant-badge-not-a-wrapper).ant-badge-rtl .ant-badge-zoom-enter {
|
|
1073
|
-
|
|
1074
|
-
animation-name: antZoomBadgeInRtl;
|
|
1033
|
+
animation-name: antZoomBadgeInRtl;
|
|
1075
1034
|
}
|
|
1076
1035
|
.ant-badge:not(.ant-badge-not-a-wrapper).ant-badge-rtl .ant-badge-zoom-leave {
|
|
1077
|
-
|
|
1078
|
-
animation-name: antZoomBadgeOutRtl;
|
|
1036
|
+
animation-name: antZoomBadgeOutRtl;
|
|
1079
1037
|
}
|
|
1080
1038
|
.ant-ribbon-rtl {
|
|
1081
1039
|
direction: rtl;
|
|
@@ -1108,15 +1066,6 @@
|
|
|
1108
1066
|
.ant-ribbon-rtl.ant-ribbon-placement-start .ant-ribbon-corner::after {
|
|
1109
1067
|
border-color: currentcolor transparent transparent currentcolor;
|
|
1110
1068
|
}
|
|
1111
|
-
@-webkit-keyframes antZoomBadgeInRtl {
|
|
1112
|
-
0% {
|
|
1113
|
-
transform: scale(0) translate(-50%, -50%);
|
|
1114
|
-
opacity: 0;
|
|
1115
|
-
}
|
|
1116
|
-
100% {
|
|
1117
|
-
transform: scale(1) translate(-50%, -50%);
|
|
1118
|
-
}
|
|
1119
|
-
}
|
|
1120
1069
|
@keyframes antZoomBadgeInRtl {
|
|
1121
1070
|
0% {
|
|
1122
1071
|
transform: scale(0) translate(-50%, -50%);
|
|
@@ -1126,15 +1075,6 @@
|
|
|
1126
1075
|
transform: scale(1) translate(-50%, -50%);
|
|
1127
1076
|
}
|
|
1128
1077
|
}
|
|
1129
|
-
@-webkit-keyframes antZoomBadgeOutRtl {
|
|
1130
|
-
0% {
|
|
1131
|
-
transform: scale(1) translate(-50%, -50%);
|
|
1132
|
-
}
|
|
1133
|
-
100% {
|
|
1134
|
-
transform: scale(0) translate(-50%, -50%);
|
|
1135
|
-
opacity: 0;
|
|
1136
|
-
}
|
|
1137
|
-
}
|
|
1138
1078
|
@keyframes antZoomBadgeOutRtl {
|
|
1139
1079
|
0% {
|
|
1140
1080
|
transform: scale(1) translate(-50%, -50%);
|
|
@@ -2,26 +2,21 @@ 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 __read = this && this.__read || function (o, n) {
|
|
18
14
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
19
15
|
if (!m) return o;
|
|
20
16
|
var i = m.call(o),
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
17
|
+
r,
|
|
18
|
+
ar = [],
|
|
19
|
+
e;
|
|
25
20
|
try {
|
|
26
21
|
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) {
|
|
27
22
|
ar.push(r.value);
|
|
@@ -37,62 +32,50 @@ var __read = this && this.__read || function (o, n) {
|
|
|
37
32
|
if (e) throw e.error;
|
|
38
33
|
}
|
|
39
34
|
}
|
|
40
|
-
|
|
41
35
|
return ar;
|
|
42
36
|
};
|
|
43
|
-
|
|
44
37
|
import React from 'react';
|
|
45
38
|
import useControllableValue from "ahooks/es/useControllableValue";
|
|
46
39
|
import AutoComplete from "antd/es/auto-complete";
|
|
47
40
|
import classNames from 'classnames';
|
|
48
41
|
import omit from 'lodash/omit';
|
|
49
42
|
import trimStart from 'lodash/trimStart';
|
|
50
|
-
|
|
51
43
|
var LabelAutoComplete = function LabelAutoComplete(props) {
|
|
52
44
|
var className = props.className,
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
45
|
+
label = props.label,
|
|
46
|
+
onChange = props.onChange,
|
|
47
|
+
options = props.options,
|
|
48
|
+
onBlur = props.onBlur;
|
|
57
49
|
var autoComplete = React.useRef(null);
|
|
58
|
-
|
|
59
50
|
var _a = __read(useControllableValue(props, {
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
51
|
+
valuePropName: 'open',
|
|
52
|
+
trigger: 'setOpen'
|
|
53
|
+
}), 2),
|
|
54
|
+
open = _a[0],
|
|
55
|
+
setOpen = _a[1];
|
|
66
56
|
var _b = __read(useControllableValue(props), 2),
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
57
|
+
value = _b[0],
|
|
58
|
+
setValue = _b[1];
|
|
70
59
|
var handleChange = function handleChange(nextValue) {
|
|
71
60
|
var finallyValue = trimStart(nextValue);
|
|
72
61
|
setValue(finallyValue);
|
|
73
62
|
onChange && onChange(finallyValue, options || []);
|
|
74
63
|
};
|
|
75
|
-
|
|
76
64
|
var handleLabelClick = function handleLabelClick() {
|
|
77
65
|
if (!open) {
|
|
78
66
|
setOpen(!open);
|
|
79
67
|
}
|
|
80
|
-
|
|
81
68
|
autoComplete.current.focus();
|
|
82
69
|
};
|
|
83
|
-
|
|
84
70
|
var onDropdownVisibleChange = function onDropdownVisibleChange(nextOpen) {
|
|
85
71
|
setOpen(nextOpen);
|
|
86
72
|
};
|
|
87
|
-
|
|
88
73
|
var handleBlur = function handleBlur(event) {
|
|
89
74
|
if (value === '' || !value) {
|
|
90
75
|
setOpen(false);
|
|
91
76
|
}
|
|
92
|
-
|
|
93
77
|
onBlur && onBlur(event);
|
|
94
78
|
};
|
|
95
|
-
|
|
96
79
|
return /*#__PURE__*/React.createElement("div", {
|
|
97
80
|
className: classNames({
|
|
98
81
|
'label-auto-complete': true,
|
|
@@ -112,5 +95,4 @@ var LabelAutoComplete = function LabelAutoComplete(props) {
|
|
|
112
95
|
onClick: handleLabelClick
|
|
113
96
|
}, label));
|
|
114
97
|
};
|
|
115
|
-
|
|
116
98
|
export default LabelAutoComplete;
|