@chaoswise/ui 3.0.15 → 3.0.17
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/lib/Ace/diff.js +1 -0
- package/lib/Antd5/_util/scrollTo.js +3 -3
- package/lib/Antd5/anchor/Anchor.js +3 -3
- package/lib/Antd5/table/hooks/useFilter/FilterDropdown.js +6 -6
- package/lib/Antd5/table/hooks/useFilter/index.js +3 -3
- package/lib/Antd5/table/hooks/useLazyKVMap.js +3 -3
- package/lib/Antd5/table/hooks/useSelection.js +3 -3
- package/lib/Antd5/theme/useToken.js +4 -3
- package/lib/Badge/index.js +1 -1
- package/lib/CWCascader/rc-cascader/utils/warningPropsUtil.js +3 -3
- package/lib/CWColorPicker/SketchPicker/components/common/ColorWrap.js +1 -1
- package/lib/CWColorPicker/SketchPicker/components/common/Hue.js +1 -1
- package/lib/CWColorPicker/SketchPicker/components/common/Raised.js +1 -1
- package/lib/CWColorPicker/SketchPicker/components/common/Saturation.js +1 -1
- package/lib/CWColorPicker/SketchPicker/components/sketch/index.js +1 -1
- package/lib/CWColorPicker/SketchPicker/helpers/color.js +1 -1
- package/lib/CWRangePicker/Refresh/index.style.js +10 -5
- package/lib/CWRangePicker/index.js +2 -2
- package/lib/CWRangePicker/index.style.js +0 -6
- package/lib/CWTree/index.js +3 -3
- package/lib/CWTree/utils/index.js +4 -3
- package/lib/Collapse/index.js +1 -1
- package/lib/ConfigProvider/ConfigProvider.js +7 -4
- package/lib/DateRangePicker/index.js +2 -0
- package/lib/Documentation/Tocify.js +1 -1
- package/lib/Drawer/index.js +1 -1
- package/lib/EchartsArea/index.js +2 -2
- package/lib/EchartsBar/index.js +2 -2
- package/lib/EchartsBarRow/index.js +0 -2
- package/lib/EchartsBase/index.js +14 -14
- package/lib/EchartsLine/index.js +2 -2
- package/lib/EchartsPie/index.js +2 -3
- package/lib/EchartsRing/index.js +2 -2
- package/lib/Empty/index.js +1 -1
- package/lib/FilterDropDown/DragList.js +2 -1
- package/lib/Flow/BasicLayout/Chain.js +3 -3
- package/lib/Flow/BasicLayout/util.js +3 -3
- package/lib/Form/FormItem.js +3 -1
- package/lib/Form/hook/useForm3.js +3 -3
- package/lib/Form/index.js +1 -1
- package/lib/Formily/FieldList/index.js +43 -0
- package/lib/Formily/Form/index.js +2 -0
- package/lib/Formily/FormButtonGroup/index.js +2 -0
- package/lib/Formily/FormItem/index.js +90 -0
- package/lib/Formily/FormItem/items/Checkbox.js +13 -0
- package/lib/Formily/FormItem/items/DatePicker.js +121 -0
- package/lib/Formily/FormItem/items/Input.js +13 -0
- package/lib/Formily/FormItem/items/NumberPicker.js +9 -0
- package/lib/Formily/FormItem/items/Password.js +70 -0
- package/lib/Formily/FormItem/items/Radio.js +13 -0
- package/lib/Formily/FormItem/items/Range.js +82 -0
- package/lib/Formily/FormItem/items/Rating.js +8 -0
- package/lib/Formily/FormItem/items/Select.js +8 -0
- package/lib/Formily/FormItem/items/Switch.js +9 -0
- package/lib/Formily/FormItem/items/Tansfer.js +9 -0
- package/lib/Formily/FormItem/items/TimePicker.js +44 -0
- package/lib/Formily/FormItem/items/Upload.js +260 -0
- package/lib/Formily/FormItem/items/formItemWrapper.js +17 -0
- package/lib/Formily/FormItem/items/shared.js +140 -0
- package/lib/Formily/FormPath/index.js +2 -0
- package/lib/Formily/MegaLayout/index.js +24 -0
- package/lib/Formily/Reset/index.js +2 -0
- package/lib/Formily/Submit/index.js +2 -0
- package/lib/Formily/context.js +3 -0
- package/lib/Formily/formily/index.js +22 -0
- package/lib/Formily/index.js +5 -0
- package/lib/Formily/subscribeFields/index.js +46 -0
- package/lib/Header/UserSetting/utils.js +5 -4
- package/lib/Joyride/List.js +3 -3
- package/lib/Joyride/index.js +3 -3
- package/lib/Modal/Modal.js +1 -1
- package/lib/Modal/index.js +1 -1
- package/lib/Pagination/index.js +1 -1
- package/lib/QuickTransfer/index.js +5 -5
- package/lib/QuickTransfer/utils.js +32 -23
- package/lib/RangePicker/components/ExtraQuickSelect.js +51 -0
- package/lib/RangePicker/components/ExtraTimeFooter.js +71 -0
- package/lib/RangePicker/index.js +469 -2
- package/lib/RangePicker/index.style.js +111 -0
- package/lib/RangePicker/utils/index.js +171 -0
- package/lib/ScrollLoad/index.js +7 -2
- package/lib/SiderMenu/index.js +14 -14
- package/lib/SingleSpa/system/systemjs-css.js +3 -3
- package/lib/TimeRangeSlider/Refresh/index.js +163 -0
- package/lib/TimeRangeSlider/TimeRangeSliderCmp/assets/Limit.js +126 -0
- package/lib/TimeRangeSlider/TimeRangeSliderCmp/assets/Limit.svg +50 -0
- package/lib/TimeRangeSlider/TimeRangeSliderCmp/assets/LimitAreaSvg.js +110 -0
- package/lib/TimeRangeSlider/TimeRangeSliderCmp/components/BottomSlider/BottomPlaceholder.js +99 -0
- package/lib/TimeRangeSlider/TimeRangeSliderCmp/components/BottomSlider/BottomTimeDateProcess.js +36 -0
- package/lib/TimeRangeSlider/TimeRangeSliderCmp/components/BottomSlider/index.js +56 -0
- package/lib/TimeRangeSlider/TimeRangeSliderCmp/components/TopSlider/TopDateProcess.js +32 -0
- package/lib/TimeRangeSlider/TimeRangeSliderCmp/components/TopSlider/TopPlaceholder.js +54 -0
- package/lib/TimeRangeSlider/TimeRangeSliderCmp/components/TopSlider/index.js +47 -0
- package/lib/TimeRangeSlider/TimeRangeSliderCmp/hooks/useHover.js +31 -0
- package/lib/TimeRangeSlider/TimeRangeSliderCmp/hooks/useMouse.js +410 -0
- package/lib/TimeRangeSlider/TimeRangeSliderCmp/index.js +72 -0
- package/lib/TimeRangeSlider/TimeRangeSliderCmp/utils/index.js +255 -0
- package/lib/TimeRangeSlider/TimeSpan/index.js +93 -0
- package/lib/TimeRangeSlider/assets/Calendar.js +15 -0
- package/lib/TimeRangeSlider/assets/Calendar2.js +15 -0
- package/lib/TimeRangeSlider/assets/Recover.js +18 -0
- package/lib/TimeRangeSlider/assets/Refresh1.js +14 -0
- package/lib/TimeRangeSlider/assets/Refresh2.js +14 -0
- package/lib/TimeRangeSlider/assets/Refresh3.js +14 -0
- package/lib/TimeRangeSlider/assets/live.js +19 -0
- package/lib/TimeRangeSlider/assets/more.js +23 -0
- package/lib/TimeRangeSlider/index.js +562 -0
- package/lib/TimeRangeSlider/locale/en_US.js +31 -0
- package/lib/TimeRangeSlider/locale/index.js +11 -0
- package/lib/TimeRangeSlider/locale/zh_CN.js +31 -0
- package/lib/TimeRangeSlider/locale/zh_TW.js +31 -0
- package/lib/TimeRangeSlider/styles/index.style.js +64 -0
- package/lib/TimeRangeSlider/styles/refresh.style.js +38 -0
- package/lib/TimeRangeSlider/styles/timeRangeSliderBottom.style.js +125 -0
- package/lib/TimeRangeSlider/styles/timeRangeSliderTop.style.js +81 -0
- package/lib/TimeRangeSlider/styles/timeSpan.style.js +22 -0
- package/lib/TimeRangeSlider/utils/index.js +737 -0
- package/lib/UniversalLayout/index.js +4 -4
- package/lib/antd-style/factories/createStyles/index.js +4 -6
- package/lib/antd-style/factories/createThemeProvider/AntdProvider.js +5 -1
- package/lib/antd-style/functions/extractStaticStyle.js +1 -1
- package/lib/antd-style/hooks/useAntdToken.js +1 -1
- package/lib/antd-style/hooks/useResponsive.js +1 -1
- package/lib/antd-style/utils/css.js +3 -2
- package/lib/locales/en_US.json +1 -1
- package/lib/locales/zh_CN.json +1 -1
- package/lib/locales/zh_TW.json +1 -1
- package/lib/useLocale/index.js +20 -0
- package/package.json +5 -1
package/lib/Ace/diff.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
function _readOnlyError(r) { throw new TypeError('"' + r + '" is read-only'); }
|
|
2
3
|
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
3
4
|
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
4
5
|
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
@@ -13,7 +13,7 @@ export default function scrollTo(y) {
|
|
|
13
13
|
var container = getContainer();
|
|
14
14
|
var scrollTop = getScroll(container, true);
|
|
15
15
|
var startTime = Date.now();
|
|
16
|
-
var
|
|
16
|
+
var _frameFunc = function frameFunc() {
|
|
17
17
|
var timestamp = Date.now();
|
|
18
18
|
var time = timestamp - startTime;
|
|
19
19
|
var nextScrollTop = easeInOutCubic(time > duration ? duration : time, scrollTop, y, duration);
|
|
@@ -25,10 +25,10 @@ export default function scrollTo(y) {
|
|
|
25
25
|
container.scrollTop = nextScrollTop;
|
|
26
26
|
}
|
|
27
27
|
if (time < duration) {
|
|
28
|
-
raf(
|
|
28
|
+
raf(_frameFunc);
|
|
29
29
|
} else if (typeof callback === 'function') {
|
|
30
30
|
callback();
|
|
31
31
|
}
|
|
32
32
|
};
|
|
33
|
-
raf(
|
|
33
|
+
raf(_frameFunc);
|
|
34
34
|
}
|
|
@@ -216,13 +216,13 @@ var Anchor = function Anchor(props) {
|
|
|
216
216
|
var wrapperStyle = _objectSpread(_objectSpread({
|
|
217
217
|
maxHeight: offsetTop ? "calc(100vh - ".concat(offsetTop, "px)") : '100vh'
|
|
218
218
|
}, anchor === null || anchor === void 0 ? void 0 : anchor.style), style);
|
|
219
|
-
var
|
|
219
|
+
var _createNestedLink = function createNestedLink(options) {
|
|
220
220
|
return Array.isArray(options) ? options.map(function (item) {
|
|
221
221
|
return /*#__PURE__*/_createElement(AnchorLink, _objectSpread(_objectSpread({
|
|
222
222
|
replace: replace
|
|
223
223
|
}, item), {}, {
|
|
224
224
|
key: item.key
|
|
225
|
-
}), anchorDirection === 'vertical' &&
|
|
225
|
+
}), anchorDirection === 'vertical' && _createNestedLink(item.children));
|
|
226
226
|
}) : null;
|
|
227
227
|
};
|
|
228
228
|
var anchorContent = _jsx("div", {
|
|
@@ -234,7 +234,7 @@ var Anchor = function Anchor(props) {
|
|
|
234
234
|
children: [_jsx("span", {
|
|
235
235
|
className: inkClass,
|
|
236
236
|
ref: spanLinkNode
|
|
237
|
-
}), 'items' in props ?
|
|
237
|
+
}), 'items' in props ? _createNestedLink(items) : children]
|
|
238
238
|
})
|
|
239
239
|
});
|
|
240
240
|
React.useEffect(function () {
|
|
@@ -278,7 +278,7 @@ function FilterDropdown(props) {
|
|
|
278
278
|
setFilteredKeysSync([]);
|
|
279
279
|
}
|
|
280
280
|
};
|
|
281
|
-
var
|
|
281
|
+
var _getTreeData = function getTreeData(_ref11) {
|
|
282
282
|
var filters = _ref11.filters;
|
|
283
283
|
return (filters || []).map(function (filter, index) {
|
|
284
284
|
var key = String(filter.value);
|
|
@@ -287,20 +287,20 @@ function FilterDropdown(props) {
|
|
|
287
287
|
key: filter.value !== undefined ? key : String(index)
|
|
288
288
|
};
|
|
289
289
|
if (filter.children) {
|
|
290
|
-
item.children =
|
|
290
|
+
item.children = _getTreeData({
|
|
291
291
|
filters: filter.children
|
|
292
292
|
});
|
|
293
293
|
}
|
|
294
294
|
return item;
|
|
295
295
|
});
|
|
296
296
|
};
|
|
297
|
-
var
|
|
297
|
+
var _getFilterData = function getFilterData(node) {
|
|
298
298
|
var _node$children;
|
|
299
299
|
return _objectSpread(_objectSpread({}, node), {}, {
|
|
300
300
|
text: node.title,
|
|
301
301
|
value: node.key,
|
|
302
302
|
children: ((_node$children = node.children) === null || _node$children === void 0 ? void 0 : _node$children.map(function (item) {
|
|
303
|
-
return
|
|
303
|
+
return _getFilterData(item);
|
|
304
304
|
})) || []
|
|
305
305
|
});
|
|
306
306
|
};
|
|
@@ -368,14 +368,14 @@ function FilterDropdown(props) {
|
|
|
368
368
|
checkedKeys: selectedKeys,
|
|
369
369
|
selectedKeys: selectedKeys,
|
|
370
370
|
showIcon: false,
|
|
371
|
-
treeData:
|
|
371
|
+
treeData: _getTreeData({
|
|
372
372
|
filters: column.filters
|
|
373
373
|
}),
|
|
374
374
|
autoExpandParent: true,
|
|
375
375
|
defaultExpandAll: true,
|
|
376
376
|
filterTreeNode: searchValue.trim() ? function (node) {
|
|
377
377
|
if (typeof filterSearch === 'function') {
|
|
378
|
-
return filterSearch(searchValue,
|
|
378
|
+
return filterSearch(searchValue, _getFilterData(node));
|
|
379
379
|
}
|
|
380
380
|
return searchValueMatched(searchValue, node.title);
|
|
381
381
|
} : undefined
|
|
@@ -150,10 +150,10 @@ export function getFilterData(data, filterStates, childrenColumnName) {
|
|
|
150
150
|
return currentData;
|
|
151
151
|
}, data);
|
|
152
152
|
}
|
|
153
|
-
var
|
|
153
|
+
var _getMergedColumns = function getMergedColumns(rawMergedColumns) {
|
|
154
154
|
return rawMergedColumns.flatMap(function (column) {
|
|
155
155
|
if ('children' in column) {
|
|
156
|
-
return [column].concat(_toConsumableArray(
|
|
156
|
+
return [column].concat(_toConsumableArray(_getMergedColumns(column.children || [])));
|
|
157
157
|
}
|
|
158
158
|
return [column];
|
|
159
159
|
});
|
|
@@ -168,7 +168,7 @@ function useFilter(_ref3) {
|
|
|
168
168
|
rootClassName = _ref3.rootClassName;
|
|
169
169
|
var warning = devUseWarning('Table');
|
|
170
170
|
var mergedColumns = React.useMemo(function () {
|
|
171
|
-
return
|
|
171
|
+
return _getMergedColumns(rawMergedColumns || []);
|
|
172
172
|
}, [rawMergedColumns]);
|
|
173
173
|
var _React$useState = React.useState(function () {
|
|
174
174
|
return collectFilterStates(mergedColumns, true);
|
|
@@ -5,18 +5,18 @@ export default function useLazyKVMap(data, childrenColumnName, getRowKey) {
|
|
|
5
5
|
function getRecordByKey(key) {
|
|
6
6
|
if (!mapCacheRef.current || mapCacheRef.current.data !== data || mapCacheRef.current.childrenColumnName !== childrenColumnName || mapCacheRef.current.getRowKey !== getRowKey) {
|
|
7
7
|
/* eslint-disable no-inner-declarations */
|
|
8
|
-
var
|
|
8
|
+
var _dig = function dig(records) {
|
|
9
9
|
records.forEach(function (record, index) {
|
|
10
10
|
var rowKey = getRowKey(record, index);
|
|
11
11
|
kvMap.set(rowKey, record);
|
|
12
12
|
if (record && _typeof(record) === 'object' && childrenColumnName in record) {
|
|
13
|
-
|
|
13
|
+
_dig(record[childrenColumnName] || []);
|
|
14
14
|
}
|
|
15
15
|
});
|
|
16
16
|
};
|
|
17
17
|
/* eslint-enable */
|
|
18
18
|
var kvMap = new Map();
|
|
19
|
-
|
|
19
|
+
_dig(data);
|
|
20
20
|
mapCacheRef.current = {
|
|
21
21
|
data: data,
|
|
22
22
|
childrenColumnName: childrenColumnName,
|
|
@@ -36,12 +36,12 @@ export var SELECTION_ALL = 'SELECT_ALL';
|
|
|
36
36
|
export var SELECTION_INVERT = 'SELECT_INVERT';
|
|
37
37
|
export var SELECTION_NONE = 'SELECT_NONE';
|
|
38
38
|
var EMPTY_LIST = [];
|
|
39
|
-
var
|
|
39
|
+
var _flattenData = function flattenData(childrenColumnName, data) {
|
|
40
40
|
var list = [];
|
|
41
41
|
(data || []).forEach(function (record) {
|
|
42
42
|
list.push(record);
|
|
43
43
|
if (record && _typeof(record) === 'object' && childrenColumnName in record) {
|
|
44
|
-
list = [].concat(_toConsumableArray(list), _toConsumableArray(
|
|
44
|
+
list = [].concat(_toConsumableArray(list), _toConsumableArray(_flattenData(childrenColumnName, record[childrenColumnName])));
|
|
45
45
|
}
|
|
46
46
|
});
|
|
47
47
|
return list;
|
|
@@ -139,7 +139,7 @@ var useSelection = function useSelection(config, rowSelection) {
|
|
|
139
139
|
keyEntities = _useMemo.keyEntities;
|
|
140
140
|
// Get flatten data
|
|
141
141
|
var flattedData = useMemo(function () {
|
|
142
|
-
return
|
|
142
|
+
return _flattenData(childrenColumnName, pageData);
|
|
143
143
|
}, [childrenColumnName, pageData]);
|
|
144
144
|
// Get all checkbox props
|
|
145
145
|
var checkboxPropsMap = useMemo(function () {
|
|
@@ -68,7 +68,7 @@ var preserve = {
|
|
|
68
68
|
screenXXL: true,
|
|
69
69
|
screenXXLMin: true
|
|
70
70
|
};
|
|
71
|
-
|
|
71
|
+
var _getComputedToken = function getComputedToken(originToken, overrideToken, theme) {
|
|
72
72
|
var derivativeToken = theme.getDerivativeToken(originToken);
|
|
73
73
|
var override = overrideToken.override,
|
|
74
74
|
components = _objectWithoutProperties(overrideToken, _excluded);
|
|
@@ -87,7 +87,7 @@ export var getComputedToken = function getComputedToken(originToken, overrideTok
|
|
|
87
87
|
componentTokens = _objectWithoutProperties(value, _excluded2);
|
|
88
88
|
var mergedComponentToken = componentTokens;
|
|
89
89
|
if (componentTheme) {
|
|
90
|
-
mergedComponentToken =
|
|
90
|
+
mergedComponentToken = _getComputedToken(_objectSpread(_objectSpread({}, mergedDerivativeToken), componentTokens), {
|
|
91
91
|
override: componentTokens
|
|
92
92
|
}, componentTheme);
|
|
93
93
|
}
|
|
@@ -97,6 +97,7 @@ export var getComputedToken = function getComputedToken(originToken, overrideTok
|
|
|
97
97
|
return mergedDerivativeToken;
|
|
98
98
|
};
|
|
99
99
|
// ================================== Hook ==================================
|
|
100
|
+
export { _getComputedToken as getComputedToken };
|
|
100
101
|
export default function useToken() {
|
|
101
102
|
var _React$useContext = React.useContext(DesignTokenContext),
|
|
102
103
|
rootDesignToken = _React$useContext.token,
|
|
@@ -109,7 +110,7 @@ export default function useToken() {
|
|
|
109
110
|
var _useCacheToken = useCacheToken(mergedTheme, [defaultSeedToken, rootDesignToken], {
|
|
110
111
|
salt: salt,
|
|
111
112
|
override: override,
|
|
112
|
-
getComputedToken:
|
|
113
|
+
getComputedToken: _getComputedToken,
|
|
113
114
|
// formatToken will not be consumed after 1.15.0 with getComputedToken.
|
|
114
115
|
// But token will break if @ant-design/cssinjs is under 1.15.0 without it
|
|
115
116
|
formatToken: formatToken,
|
package/lib/Badge/index.js
CHANGED
|
@@ -6,7 +6,7 @@ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length)
|
|
|
6
6
|
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
7
7
|
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
8
8
|
import React, { forwardRef } from "react";
|
|
9
|
-
import
|
|
9
|
+
import Badge from "../Antd5/badge";
|
|
10
10
|
import PropTypes from "prop-types";
|
|
11
11
|
import { cloneComProps } from "../utils";
|
|
12
12
|
import { useTheme } from "../antd-style";
|
|
@@ -12,19 +12,19 @@ function warningProps(props) {
|
|
|
12
12
|
// value in Cascader options should not be null
|
|
13
13
|
export function warningNullOptions(options, fieldNames) {
|
|
14
14
|
if (options) {
|
|
15
|
-
var
|
|
15
|
+
var _recursiveOptions = function recursiveOptions(optionsList) {
|
|
16
16
|
for (var i = 0; i < optionsList.length; i++) {
|
|
17
17
|
var option = optionsList[i];
|
|
18
18
|
if (option[fieldNames === null || fieldNames === void 0 ? void 0 : fieldNames.value] === null) {
|
|
19
19
|
warning(false, '`value` in Cascader options should not be `null`.');
|
|
20
20
|
return true;
|
|
21
21
|
}
|
|
22
|
-
if (Array.isArray(option[fieldNames === null || fieldNames === void 0 ? void 0 : fieldNames.children]) &&
|
|
22
|
+
if (Array.isArray(option[fieldNames === null || fieldNames === void 0 ? void 0 : fieldNames.children]) && _recursiveOptions(option[fieldNames === null || fieldNames === void 0 ? void 0 : fieldNames.children])) {
|
|
23
23
|
return true;
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
26
|
};
|
|
27
|
-
|
|
27
|
+
_recursiveOptions(options);
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
30
|
export default warningProps;
|
|
@@ -16,7 +16,7 @@ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object
|
|
|
16
16
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
17
17
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
18
18
|
import React, { Component, PureComponent } from 'react';
|
|
19
|
-
import debounce from 'lodash
|
|
19
|
+
import { debounce } from 'lodash-es';
|
|
20
20
|
import * as color from '../../helpers/color';
|
|
21
21
|
export var ColorWrap = function ColorWrap(Picker) {
|
|
22
22
|
var ColorPicker = /*#__PURE__*/function (_ref) {
|
|
@@ -15,7 +15,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
15
15
|
import React, { Component, PureComponent } from "react";
|
|
16
16
|
import reactCSS from "reactcss";
|
|
17
17
|
import * as hue from "../../helpers/hue";
|
|
18
|
-
import { floor, round } from "
|
|
18
|
+
import { floor, round } from "lodash-es";
|
|
19
19
|
export var Hue = /*#__PURE__*/function (_ref) {
|
|
20
20
|
function Hue() {
|
|
21
21
|
var _this;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import reactCSS from 'reactcss';
|
|
4
|
-
import merge from 'lodash
|
|
4
|
+
import { merge } from 'lodash-es';
|
|
5
5
|
export var Raised = function Raised(_ref) {
|
|
6
6
|
var zDepth = _ref.zDepth,
|
|
7
7
|
radius = _ref.radius,
|
|
@@ -14,7 +14,7 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
|
|
|
14
14
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
15
15
|
import React, { Component, PureComponent } from 'react';
|
|
16
16
|
import reactCSS from 'reactcss';
|
|
17
|
-
import throttle from 'lodash
|
|
17
|
+
import { throttle } from 'lodash-es';
|
|
18
18
|
import * as saturation from '../../helpers/saturation';
|
|
19
19
|
export var Saturation = /*#__PURE__*/function (_ref) {
|
|
20
20
|
function Saturation(props) {
|
|
@@ -7,7 +7,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
7
7
|
import React from 'react';
|
|
8
8
|
import PropTypes from 'prop-types';
|
|
9
9
|
import reactCSS from 'reactcss';
|
|
10
|
-
import merge from 'lodash
|
|
10
|
+
import { merge } from 'lodash-es';
|
|
11
11
|
import { ColorWrap, Saturation, Hue, Alpha, Checkboard } from '../common';
|
|
12
12
|
import SketchFields from './SketchFields';
|
|
13
13
|
import SketchPresetColors from './SketchPresetColors';
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
-
var _templateObject;
|
|
3
2
|
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
4
3
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
5
4
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
6
|
-
function _taggedTemplateLiteral(e, t) { return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } })); }
|
|
7
5
|
import { genStyleHooks } from "../../Antd5/theme/internal";
|
|
8
|
-
import {
|
|
9
|
-
var autoRefresh =
|
|
6
|
+
import { Keyframes } from "@ant-design/cssinjs";
|
|
7
|
+
var autoRefresh = new Keyframes("autoRefresh", {
|
|
8
|
+
"100%": {
|
|
9
|
+
transform: "rotate(360deg)"
|
|
10
|
+
}
|
|
11
|
+
});
|
|
10
12
|
var genCustomRefreshStyle = function genCustomRefreshStyle(token) {
|
|
11
13
|
var prefixCls = token.antCls;
|
|
12
14
|
return _defineProperty({}, "".concat(prefixCls, "-cw-range-picker-refresh-wrapper"), _defineProperty(_defineProperty(_defineProperty({
|
|
@@ -16,7 +18,10 @@ var genCustomRefreshStyle = function genCustomRefreshStyle(token) {
|
|
|
16
18
|
width: "28px",
|
|
17
19
|
padding: "0"
|
|
18
20
|
}), ".cw-range-picker-auto-refresh", {
|
|
19
|
-
|
|
21
|
+
animationName: autoRefresh,
|
|
22
|
+
animationDuration: '2s',
|
|
23
|
+
animationTimingFunction: "linear",
|
|
24
|
+
animationIterationCount: 'infinite'
|
|
20
25
|
}), ".cw-range-picker-auto-refresh-wrapper", {
|
|
21
26
|
"&:not(&[disabled])": {
|
|
22
27
|
borderColor: "".concat(token.colorPrimary, " !important"),
|
|
@@ -37,7 +37,7 @@ import LiveSvg from "./assets/live";
|
|
|
37
37
|
import RecoverSvg from "./assets/Recover";
|
|
38
38
|
import useConfigContext from "../useConfigContext";
|
|
39
39
|
import { regroupDataSourceFn, echoInputValue, getUnit, judgeType, getChangeUnitDate, isInvalidDate, range, funcValueChangeArrayValue, getCorrectValue, getHistoryInfo, getFinalDateOption, getTruthDateCount, isAfterDate, isSameDate, isExceedMaxTimeSpan, getYears, computedRecentlyValue } from "./utils";
|
|
40
|
-
import
|
|
40
|
+
import { isEqual } from "lodash-es";
|
|
41
41
|
import moment from "moment";
|
|
42
42
|
import { useIntl } from "../locales";
|
|
43
43
|
import { formatMessage } from "../utils";
|
|
@@ -398,7 +398,7 @@ var CWRangePicker = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
398
398
|
}
|
|
399
399
|
}, isFocus && showTipIcon ? /*#__PURE__*/React.createElement(_Tooltip, extraTipOption, /*#__PURE__*/React.createElement(QuestionCircleOutlined, {
|
|
400
400
|
className: classnames("cw-range-picker-suffix-tips")
|
|
401
|
-
})) : !isFocus && !
|
|
401
|
+
})) : !isFocus && !isEqual(dateValueRest, rest) ? /*#__PURE__*/React.createElement(_Tooltip, {
|
|
402
402
|
title: intl.get("3395a172-cc4a-4c02-93e6-a1efbeb30a2c").d("恢复默认值")
|
|
403
403
|
}, /*#__PURE__*/React.createElement(RecoverSvg, {
|
|
404
404
|
onClick: onRecover,
|
|
@@ -48,14 +48,8 @@ var genCustomCWRangePickerStyle = function genCustomCWRangePickerStyle(token) {
|
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
50
|
},
|
|
51
|
-
".cw-range-picker-input-wrapper-none": {
|
|
52
|
-
display: "none"
|
|
53
|
-
},
|
|
54
51
|
".cw-range-picker-calendar-wrapper": {
|
|
55
52
|
width: "360px"
|
|
56
|
-
},
|
|
57
|
-
".cw-range-picker-calendar-wrapper-none": {
|
|
58
|
-
display: "none"
|
|
59
53
|
}
|
|
60
54
|
}), ".cw-range-picker-time-refresh-wrapper", {
|
|
61
55
|
marginLeft: "8px"
|
package/lib/CWTree/index.js
CHANGED
|
@@ -241,15 +241,15 @@ function CWTree(_ref) {
|
|
|
241
241
|
if (searchValue) {
|
|
242
242
|
var _expandedKeys = [];
|
|
243
243
|
// 遍历树获取所有父节点key
|
|
244
|
-
var
|
|
244
|
+
var _loop = function loop(treeData) {
|
|
245
245
|
treeData.forEach(function (item) {
|
|
246
246
|
if (item.children && item.children.length > 0) {
|
|
247
247
|
_expandedKeys.push(item.key);
|
|
248
|
-
|
|
248
|
+
_loop(item.children);
|
|
249
249
|
}
|
|
250
250
|
});
|
|
251
251
|
};
|
|
252
|
-
|
|
252
|
+
_loop(_treeData);
|
|
253
253
|
setExpandedKeys(_expandedKeys);
|
|
254
254
|
}
|
|
255
255
|
}, [searchValue, _treeData]);
|
|
@@ -4,7 +4,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
4
4
|
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
5
5
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
6
6
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
|
-
import isUndefined from "lodash-es
|
|
7
|
+
import { isUndefined } from "lodash-es";
|
|
8
8
|
var getFinalStr = function getFinalStr(con) {
|
|
9
9
|
if (typeof con === "string") {
|
|
10
10
|
return con.toLowerCase();
|
|
@@ -45,7 +45,7 @@ var KMPMatch = function KMPMatch(str, pattern) {
|
|
|
45
45
|
return -1;
|
|
46
46
|
}
|
|
47
47
|
};
|
|
48
|
-
|
|
48
|
+
var _createTree = function createTree(list, searchValue, caseSensitive, isAppend) {
|
|
49
49
|
return list.reduce(function (t, c) {
|
|
50
50
|
var children = c.children,
|
|
51
51
|
title = c.title,
|
|
@@ -55,7 +55,7 @@ export var createTree = function createTree(list, searchValue, caseSensitive, is
|
|
|
55
55
|
var isHit = KMPMatch(finalTitle, finalSearchValue) > -1;
|
|
56
56
|
var leafNode = isUndefined(isLeaf) ? !Boolean(Array.isArray(children)) : isLeaf;
|
|
57
57
|
if (children && children.length) {
|
|
58
|
-
var res =
|
|
58
|
+
var res = _createTree(children, searchValue, caseSensitive, isAppend);
|
|
59
59
|
if (isHit) {
|
|
60
60
|
if (res.length > 0) {
|
|
61
61
|
return t.concat(_objectSpread(_objectSpread({}, c), {}, {
|
|
@@ -85,6 +85,7 @@ export var createTree = function createTree(list, searchValue, caseSensitive, is
|
|
|
85
85
|
})) : t;
|
|
86
86
|
}, []);
|
|
87
87
|
};
|
|
88
|
+
export { _createTree as createTree };
|
|
88
89
|
export var createTitle = function createTitle(caseSensitive, searchValue, title) {
|
|
89
90
|
var index = caseSensitive ? KMPMatch(title, searchValue) : KMPMatch(getFinalStr(title), getFinalStr(searchValue));
|
|
90
91
|
var beforeTitle = title.substr(0, index);
|
package/lib/Collapse/index.js
CHANGED
|
@@ -13,7 +13,7 @@ function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
|
13
13
|
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var s = Object.getOwnPropertySymbols(e); for (r = 0; r < s.length; r++) o = s[r], t.includes(o) || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
14
14
|
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
|
|
15
15
|
import React, { forwardRef } from "react";
|
|
16
|
-
import
|
|
16
|
+
import Collapse from "../Antd5/collapse";
|
|
17
17
|
import { RightOutlined } from "@ant-design/icons";
|
|
18
18
|
import PropTypes from "prop-types";
|
|
19
19
|
import classnames from "classnames";
|
|
@@ -21,8 +21,9 @@ import { cloneComProps } from "../utils";
|
|
|
21
21
|
import customTheme from "./customTheme";
|
|
22
22
|
import chaoswiseUICustomTheme from "./customToken";
|
|
23
23
|
import "../Antd5/style/reset.css";
|
|
24
|
-
import { merge } from "
|
|
24
|
+
import { merge } from "lodash-es";
|
|
25
25
|
import intlContext from "./intlContext";
|
|
26
|
+
import moment from 'moment';
|
|
26
27
|
import { legacyLogicalPropertiesTransformer, StyleProvider } from "@ant-design/cssinjs";
|
|
27
28
|
var Provider = intlContext.Provider;
|
|
28
29
|
var CWConfigProvider = function CWConfigProvider(_ref) {
|
|
@@ -51,18 +52,20 @@ var CWConfigProvider = function CWConfigProvider(_ref) {
|
|
|
51
52
|
import("../Antd5/locale/zh_CN").then(function (res) {
|
|
52
53
|
setAntdLocale(res["default"]);
|
|
53
54
|
});
|
|
54
|
-
import("
|
|
55
|
+
import("moment/locale/zh-cn");
|
|
56
|
+
moment.locale('zh-cn');
|
|
55
57
|
}
|
|
56
58
|
if (currentLocale === "en_US") {
|
|
57
59
|
import("../Antd5/locale/en_US").then(function (res) {
|
|
58
60
|
setAntdLocale(res["default"]);
|
|
59
|
-
|
|
61
|
+
moment.locale('en');
|
|
60
62
|
});
|
|
61
63
|
}
|
|
62
64
|
if (currentLocale === "zh_TW") {
|
|
63
65
|
import("../Antd5/locale/zh_TW").then(function (res) {
|
|
64
66
|
setAntdLocale(res["default"]);
|
|
65
|
-
import("
|
|
67
|
+
import("moment/locale/zh-tw");
|
|
68
|
+
moment.locale('zh-tw');
|
|
66
69
|
});
|
|
67
70
|
}
|
|
68
71
|
};
|
|
@@ -6,7 +6,7 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
|
|
|
6
6
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
7
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
8
|
import React from 'react';
|
|
9
|
-
import
|
|
9
|
+
import Anchor from '../Antd5/anchor';
|
|
10
10
|
import { last } from 'lodash-es';
|
|
11
11
|
var Link = Anchor.Link;
|
|
12
12
|
var Tocify = /*#__PURE__*/function () {
|
package/lib/Drawer/index.js
CHANGED
|
@@ -15,7 +15,7 @@ function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
|
15
15
|
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var s = Object.getOwnPropertySymbols(e); for (r = 0; r < s.length; r++) o = s[r], t.includes(o) || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
16
16
|
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
|
|
17
17
|
import React, { forwardRef, useMemo } from "react";
|
|
18
|
-
import
|
|
18
|
+
import Drawer from "../Antd5/drawer";
|
|
19
19
|
import PropTypes from "prop-types";
|
|
20
20
|
import classnames from "classnames";
|
|
21
21
|
import { merge } from "lodash-es";
|
package/lib/EchartsArea/index.js
CHANGED
|
@@ -11,7 +11,7 @@ function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i
|
|
|
11
11
|
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
|
|
12
12
|
import React, { forw, forwardRef } from "react";
|
|
13
13
|
import PropTypes from "prop-types";
|
|
14
|
-
|
|
14
|
+
import { merge } from "lodash-es";
|
|
15
15
|
import CWTheme from "../../config/theme/CWTheme";
|
|
16
16
|
|
|
17
17
|
/**
|
|
@@ -42,7 +42,7 @@ var EchartsArea = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
42
42
|
lineOption.series = newSeriesData;
|
|
43
43
|
}
|
|
44
44
|
if (option) {
|
|
45
|
-
|
|
45
|
+
merge(lineOption, option);
|
|
46
46
|
}
|
|
47
47
|
return lineOption;
|
|
48
48
|
};
|
package/lib/EchartsBar/index.js
CHANGED
|
@@ -11,7 +11,7 @@ function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i
|
|
|
11
11
|
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
|
|
12
12
|
import React, { forwardRef } from "react";
|
|
13
13
|
import PropTypes from "prop-types";
|
|
14
|
-
|
|
14
|
+
import { merge } from "lodash-es";
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
17
|
*
|
|
@@ -138,7 +138,7 @@ var EchartsBar = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
138
138
|
barOption.series = newSeriesData;
|
|
139
139
|
}
|
|
140
140
|
if (option) {
|
|
141
|
-
|
|
141
|
+
merge(barOption, option);
|
|
142
142
|
}
|
|
143
143
|
return barOption;
|
|
144
144
|
};
|
|
@@ -5,8 +5,6 @@ function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i
|
|
|
5
5
|
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
|
|
6
6
|
import React, { forwardRef } from "react";
|
|
7
7
|
import PropTypes from "prop-types";
|
|
8
|
-
var _ = require("lodash-es");
|
|
9
|
-
|
|
10
8
|
/**
|
|
11
9
|
*
|
|
12
10
|
* 二次封装的条形图组件,设置了条形图的默认option,可直接传入data,可设置类目轴,也支持设置自己的option配置,配置具体设置参考Echarts文档。更多API参考echarts-for-react
|