@chaoswise/ui 3.0.17 → 3.0.19
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/AbreastLayout/index.js +1 -1
- package/lib/Antd5/_util/hooks/useClosable.js +1 -1
- package/lib/Antd5/auto-complete/index.js +1 -1
- package/lib/Antd5/form/FormItem/index.js +1 -1
- package/lib/Antd5/input/Password.js +1 -1
- package/lib/Antd5/menu/MenuItem.js +1 -1
- package/lib/Antd5/menu/SubMenu.js +1 -1
- package/lib/Antd5/modal/useModal/index.js +1 -1
- package/lib/Antd5/popover/index.js +1 -1
- package/lib/Antd5/spin/index.js +2 -2
- package/lib/Antd5/steps/useLegacyItems.js +1 -1
- package/lib/Antd5/tabs/hooks/useLegacyItems.js +1 -1
- package/lib/Antd5/tree/utils/iconUtil.js +2 -2
- package/lib/Antd5/typography/Base/index.js +1 -1
- package/lib/Antd5/typography/hooks/useCopyClick.js +2 -2
- package/lib/Antd5/upload/Upload.js +1 -1
- package/lib/Antd5/upload/UploadList/index.js +2 -2
- package/lib/Badge/index.js +2 -2
- package/lib/BasicLayout/Footer.js +1 -1
- package/lib/BasicLayout/Sider.js +2 -2
- package/lib/BasicLayout/index.js +2 -2
- package/lib/Button/index.js +1 -1
- package/lib/CWCascader/Cascader/utils/iconUtil.js +3 -3
- package/lib/CWCascader/index.js +1 -1
- package/lib/CWCascader/rc-cascader/OptionList/Column.js +3 -3
- package/lib/CWColorPicker/index.js +1 -1
- package/lib/CWMessage/MessageContent/TabList/index.js +3 -3
- package/lib/CWMessage/MessageContent/index.js +3 -3
- package/lib/CWMessage/index.js +6 -6
- package/lib/CWRadioTabs/index.js +1 -1
- package/lib/CWRangePicker/DropdownMenu/index.js +3 -2
- package/lib/CWRangePicker/Refresh/index.js +1 -1
- package/lib/CWRangePicker/TimeSpan/index.js +1 -1
- package/lib/CWRangePicker/index.js +65 -35
- package/lib/CWRangePicker/utils/generate/dayjs.js +697 -0
- package/lib/CWRangePicker/utils/{index.js → generate/moment.js} +2 -1
- package/lib/CWTable/CWTable.js +2 -2
- package/lib/CWTree/index.js +1 -1
- package/lib/CardSelect/index.js +1 -1
- package/lib/ChangeIcon/index.js +1 -1
- package/lib/Collapse/index.js +1 -1
- package/lib/Collapse/index.style.js +10 -6
- package/lib/ConfigProvider/ConfigProvider.js +12 -11
- package/lib/ConfigProvider/generate/dayjs.js +14 -0
- package/lib/ConfigProvider/generate/moment.js +14 -0
- package/lib/DataView/index.js +1 -1
- package/lib/Documentation/index.js +1 -1
- package/lib/Drawer/index.js +1 -1
- package/lib/Dropdown/index.js +1 -1
- package/lib/Empty/index.js +2 -2
- package/lib/ErrorBoundary/ErrorPage.js +1 -1
- package/lib/Exception/index.js +1 -1
- package/lib/FilterDropDown/index.js +3 -3
- package/lib/Form/hook/useForm3.js +2 -2
- package/lib/Form/index.js +1 -1
- package/lib/FormItemWrapper/index.js +1 -1
- package/lib/GlobalTabs/index.js +1 -1
- package/lib/Header/TopNavigationMenu/index.js +1 -1
- package/lib/Header/UserSetting/index.js +1 -1
- package/lib/IconSelect/index.js +1 -1
- package/lib/Input/index.js +4 -4
- package/lib/Joyride/List.js +1 -1
- package/lib/Joyride/index.js +1 -1
- package/lib/LayoutWrapper/Footer.js +1 -1
- package/lib/LayoutWrapper/Header.js +1 -1
- package/lib/LayoutWrapper/index.js +1 -1
- package/lib/LeftNavigation/index.js +1 -1
- package/lib/Modal/confirmGlobalStyle.js +2 -3
- package/lib/Modal/index.js +1 -1
- package/lib/ModuleFederation/react-dynamic-remote-component/RemoteComponent.js +3 -3
- package/lib/ModuleFederation/react-dynamic-remote-component/load-module.js +1 -1
- package/lib/ModuleTitle/index.js +1 -1
- package/lib/Pagination/index.js +1 -1
- package/lib/QuickRangePicker/index.js +1 -1
- package/lib/QuickTransfer/index.js +1 -1
- package/lib/RangePicker/index.js +15 -16
- package/lib/RangePicker/utils/generate/dayjs.js +172 -0
- package/lib/RangePicker/utils/{index.js → generate/moment.js} +5 -4
- package/lib/SearchBar/index.js +1 -1
- package/lib/SiderMenu/index.js +1 -1
- package/lib/SimpleCard/index.js +1 -1
- package/lib/SimplePagination/index.js +1 -1
- package/lib/SingleSpa/index.js +1 -1
- package/lib/Slider/index.js +1 -1
- package/lib/Tabs/index.js +1 -1
- package/lib/Tag/CheckableTag.js +1 -1
- package/lib/Tag/index.js +4 -4
- package/lib/TimeRangeSlider/Refresh/index.js +1 -1
- package/lib/TimeRangeSlider/TimeRangeSliderCmp/components/BottomSlider/BottomPlaceholder.js +1 -1
- package/lib/TimeRangeSlider/TimeRangeSliderCmp/components/BottomSlider/BottomTimeDateProcess.js +1 -1
- package/lib/TimeRangeSlider/TimeRangeSliderCmp/components/BottomSlider/index.js +1 -1
- package/lib/TimeRangeSlider/TimeRangeSliderCmp/components/TopSlider/TopDateProcess.js +1 -1
- package/lib/TimeRangeSlider/TimeRangeSliderCmp/components/TopSlider/index.js +1 -1
- package/lib/TimeRangeSlider/TimeRangeSliderCmp/hooks/useMouse.js +5 -6
- package/lib/TimeRangeSlider/TimeRangeSliderCmp/utils/generate/dayjs.js +260 -0
- package/lib/TimeRangeSlider/TimeRangeSliderCmp/utils/{index.js → generate/moment.js} +2 -1
- package/lib/TimeRangeSlider/TimeSpan/index.js +1 -1
- package/lib/TimeRangeSlider/index.js +16 -13
- package/lib/TimeRangeSlider/utils/generate/dayjs.js +729 -0
- package/lib/TimeRangeSlider/utils/{index.js → generate/moment.js} +23 -53
- package/lib/Tooltip/index.js +1 -1
- package/lib/TooltipText/index.js +1 -1
- package/lib/UniversalLayout/index.js +3 -3
- package/lib/WangEditor/index.js +1 -1
- package/lib/locales/en_US.json +1 -0
- package/lib/locales/zh_CN.json +1 -0
- package/lib/locales/zh_TW.json +1 -0
- package/lib/utils/generate/dayjs.js +2 -0
- package/lib/utils/generate/moment.js +2 -0
- package/package.json +25 -27
- package/lib/CWRangePicker/locale/en_US.js +0 -29
- package/lib/CWRangePicker/locale/index.js +0 -11
- package/lib/CWRangePicker/locale/zh_CN.js +0 -29
- package/lib/CWRangePicker/locale/zh_TW.js +0 -29
- package/lib/Formily/FieldList/index.js +0 -43
- package/lib/Formily/Form/index.js +0 -2
- package/lib/Formily/FormButtonGroup/index.js +0 -2
- package/lib/Formily/FormItem/index.js +0 -90
- package/lib/Formily/FormItem/items/Checkbox.js +0 -13
- package/lib/Formily/FormItem/items/DatePicker.js +0 -121
- package/lib/Formily/FormItem/items/Input.js +0 -13
- package/lib/Formily/FormItem/items/NumberPicker.js +0 -9
- package/lib/Formily/FormItem/items/Password.js +0 -70
- package/lib/Formily/FormItem/items/Radio.js +0 -13
- package/lib/Formily/FormItem/items/Range.js +0 -82
- package/lib/Formily/FormItem/items/Rating.js +0 -8
- package/lib/Formily/FormItem/items/Select.js +0 -8
- package/lib/Formily/FormItem/items/Switch.js +0 -9
- package/lib/Formily/FormItem/items/Tansfer.js +0 -9
- package/lib/Formily/FormItem/items/TimePicker.js +0 -44
- package/lib/Formily/FormItem/items/Upload.js +0 -260
- package/lib/Formily/FormItem/items/formItemWrapper.js +0 -17
- package/lib/Formily/FormItem/items/shared.js +0 -140
- package/lib/Formily/FormPath/index.js +0 -2
- package/lib/Formily/MegaLayout/index.js +0 -24
- package/lib/Formily/Reset/index.js +0 -2
- package/lib/Formily/Submit/index.js +0 -2
- package/lib/Formily/context.js +0 -3
- package/lib/Formily/formily/index.js +0 -22
- package/lib/Formily/index.js +0 -5
- package/lib/Formily/subscribeFields/index.js +0 -46
|
@@ -84,7 +84,7 @@ function AbreastLayout(_ref) {
|
|
|
84
84
|
useDidRecover(function () {
|
|
85
85
|
eventManager.emit("abreastLayoutLoaded");
|
|
86
86
|
});
|
|
87
|
-
return wrapCSSVar(
|
|
87
|
+
return wrapCSSVar(/*#__PURE__*/React.createElement("div", {
|
|
88
88
|
className: classnames(hashId, cssVarCls, "".concat(prefixCls, "-cw-abreast-layout"))
|
|
89
89
|
}, isLeft && /*#__PURE__*/React.createElement("div", {
|
|
90
90
|
className: "".concat(prefixCls, "-content")
|
|
@@ -109,7 +109,7 @@ export default function useClosable(propCloseCollection, contextCloseCollection)
|
|
|
109
109
|
// Wrap the closeIcon with aria props
|
|
110
110
|
var ariaProps = pickAttrs(mergedClosableConfig, true);
|
|
111
111
|
if (Object.keys(ariaProps).length) {
|
|
112
|
-
mergedCloseIcon = /*#__PURE__*/React.isValidElement(mergedCloseIcon) ? (
|
|
112
|
+
mergedCloseIcon = /*#__PURE__*/React.isValidElement(mergedCloseIcon) ? (/*#__PURE__*/React.cloneElement(mergedCloseIcon, ariaProps)) : _jsx("span", _objectSpread(_objectSpread({}, ariaProps), {}, {
|
|
113
113
|
children: mergedCloseIcon
|
|
114
114
|
}));
|
|
115
115
|
}
|
|
@@ -49,7 +49,7 @@ var AutoComplete = function AutoComplete(props, ref) {
|
|
|
49
49
|
optionChildren = children;
|
|
50
50
|
} else {
|
|
51
51
|
optionChildren = dataSource ? dataSource.map(function (item) {
|
|
52
|
-
if (
|
|
52
|
+
if (/*#__PURE__*/React.isValidElement(item)) {
|
|
53
53
|
return item;
|
|
54
54
|
}
|
|
55
55
|
switch (_typeof(item)) {
|
|
@@ -250,7 +250,7 @@ function InternalFormItem(props) {
|
|
|
250
250
|
warning(!hasName, 'usage', 'A `Form.Item` with a render function cannot be a field, and thus cannot have a `name` prop.');
|
|
251
251
|
} else if (dependencies && !isRenderProps && !hasName) {
|
|
252
252
|
warning(false, 'usage', 'Must set `name` or use a render function when `dependencies` is set.');
|
|
253
|
-
} else if (
|
|
253
|
+
} else if (/*#__PURE__*/React.isValidElement(mergedChildren)) {
|
|
254
254
|
warning(mergedChildren.props.defaultValue === undefined, 'usage', '`defaultValue` will not work on controlled Field. You should use `initialValues` of Form instead.');
|
|
255
255
|
var childProps = _objectSpread(_objectSpread({}, mergedChildren.props), mergedControl);
|
|
256
256
|
if (!childProps.id) {
|
|
@@ -82,7 +82,7 @@ var Password = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
82
82
|
// https://github.com/ant-design/ant-design/issues/23524
|
|
83
83
|
e.preventDefault();
|
|
84
84
|
});
|
|
85
|
-
return /*#__PURE__*/React.cloneElement(
|
|
85
|
+
return /*#__PURE__*/React.cloneElement(/*#__PURE__*/React.isValidElement(icon) ? icon : _jsx("span", {
|
|
86
86
|
children: icon
|
|
87
87
|
}), iconProps);
|
|
88
88
|
};
|
|
@@ -67,7 +67,7 @@ var MenuItem = function MenuItem(props) {
|
|
|
67
67
|
className: classNames(_defineProperty(_defineProperty({}, "".concat(prefixCls, "-item-danger"), danger), "".concat(prefixCls, "-item-only-child"), (icon ? childrenLength + 1 : childrenLength) === 1), className),
|
|
68
68
|
title: typeof title === 'string' ? title : undefined,
|
|
69
69
|
children: [cloneElement(icon, {
|
|
70
|
-
className: classNames(
|
|
70
|
+
className: classNames(/*#__PURE__*/React.isValidElement(icon) ? (_icon$props = icon.props) === null || _icon$props === void 0 ? void 0 : _icon$props.className : '', "".concat(prefixCls, "-item-icon"))
|
|
71
71
|
}), renderItemChildren(isInlineCollapsed)]
|
|
72
72
|
}));
|
|
73
73
|
if (!disableMenuItemTitleTooltip) {
|
|
@@ -44,7 +44,7 @@ var SubMenu = function SubMenu(props) {
|
|
|
44
44
|
var titleIsSpan = /*#__PURE__*/React.isValidElement(title) && title.type === 'span';
|
|
45
45
|
titleNode = _jsxs(_Fragment, {
|
|
46
46
|
children: [cloneElement(icon, {
|
|
47
|
-
className: classNames(
|
|
47
|
+
className: classNames(/*#__PURE__*/React.isValidElement(icon) ? (_icon$props = icon.props) === null || _icon$props === void 0 ? void 0 : _icon$props.className : '', "".concat(prefixCls, "-item-icon"))
|
|
48
48
|
}), titleIsSpan ? title : _jsx("span", {
|
|
49
49
|
className: "".concat(prefixCls, "-title-content"),
|
|
50
50
|
children: title
|
|
@@ -15,7 +15,7 @@ import { withConfirm, withError, withInfo, withSuccess, withWarn } from '../conf
|
|
|
15
15
|
import destroyFns from '../destroyFns';
|
|
16
16
|
import HookModal from './HookModal';
|
|
17
17
|
var uuid = 0;
|
|
18
|
-
var ElementsHolder = /*#__PURE__*/React.memo(
|
|
18
|
+
var ElementsHolder = /*#__PURE__*/React.memo(/*#__PURE__*/React.forwardRef(function (_props, ref) {
|
|
19
19
|
var _usePatchElement = usePatchElement(),
|
|
20
20
|
_usePatchElement2 = _slicedToArray(_usePatchElement, 2),
|
|
21
21
|
elements = _usePatchElement2[0],
|
|
@@ -109,7 +109,7 @@ var InternalPopover = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
109
109
|
"data-popover-inject": true,
|
|
110
110
|
children: cloneElement(children, {
|
|
111
111
|
onKeyDown: function onKeyDown(e) {
|
|
112
|
-
if (
|
|
112
|
+
if (/*#__PURE__*/React.isValidElement(children)) {
|
|
113
113
|
var _children$props$onKey, _children$props;
|
|
114
114
|
children === null || children === void 0 || (_children$props$onKey = (_children$props = children.props).onKeyDown) === null || _children$props$onKey === void 0 || _children$props$onKey.call(_children$props, e);
|
|
115
115
|
}
|
package/lib/Antd5/spin/index.js
CHANGED
|
@@ -32,12 +32,12 @@ function renderIndicator(prefixCls, props) {
|
|
|
32
32
|
if (indicator === null) {
|
|
33
33
|
return null;
|
|
34
34
|
}
|
|
35
|
-
if (
|
|
35
|
+
if (/*#__PURE__*/React.isValidElement(indicator)) {
|
|
36
36
|
return cloneElement(indicator, {
|
|
37
37
|
className: classNames(indicator.props.className, dotClassName)
|
|
38
38
|
});
|
|
39
39
|
}
|
|
40
|
-
if (
|
|
40
|
+
if (/*#__PURE__*/React.isValidElement(defaultIndicator)) {
|
|
41
41
|
return cloneElement(defaultIndicator, {
|
|
42
42
|
className: classNames(defaultIndicator.props.className, dotClassName)
|
|
43
43
|
});
|
|
@@ -21,7 +21,7 @@ export default function useLegacyItems(items, children) {
|
|
|
21
21
|
return items;
|
|
22
22
|
}
|
|
23
23
|
var childrenItems = toArray(children).map(function (node) {
|
|
24
|
-
if (
|
|
24
|
+
if (/*#__PURE__*/React.isValidElement(node)) {
|
|
25
25
|
var props = node.props;
|
|
26
26
|
var item = _objectSpread({}, props);
|
|
27
27
|
return item;
|
|
@@ -24,7 +24,7 @@ export default function useLegacyItems(items, children) {
|
|
|
24
24
|
return items;
|
|
25
25
|
}
|
|
26
26
|
var childrenItems = toArray(children).map(function (node) {
|
|
27
|
-
if (
|
|
27
|
+
if (/*#__PURE__*/React.isValidElement(node)) {
|
|
28
28
|
var key = node.key,
|
|
29
29
|
props = node.props;
|
|
30
30
|
var _ref = props || {},
|
|
@@ -32,7 +32,7 @@ var SwitcherIconCom = function SwitcherIconCom(props) {
|
|
|
32
32
|
if (typeof showLeafIcon !== 'boolean' && !!showLeafIcon) {
|
|
33
33
|
var leafIcon = typeof showLeafIcon === 'function' ? showLeafIcon(treeNodeProps) : showLeafIcon;
|
|
34
34
|
var leafCls = "".concat(prefixCls, "-switcher-line-custom-icon");
|
|
35
|
-
if (
|
|
35
|
+
if (/*#__PURE__*/React.isValidElement(leafIcon)) {
|
|
36
36
|
return cloneElement(leafIcon, {
|
|
37
37
|
className: classNames(leafIcon.props.className || '', leafCls)
|
|
38
38
|
});
|
|
@@ -47,7 +47,7 @@ var SwitcherIconCom = function SwitcherIconCom(props) {
|
|
|
47
47
|
}
|
|
48
48
|
var switcherCls = "".concat(prefixCls, "-switcher-icon");
|
|
49
49
|
var switcher = typeof switcherIcon === 'function' ? switcherIcon(treeNodeProps) : switcherIcon;
|
|
50
|
-
if (
|
|
50
|
+
if (/*#__PURE__*/React.isValidElement(switcher)) {
|
|
51
51
|
return cloneElement(switcher, {
|
|
52
52
|
className: classNames(switcher.props.className || '', switcherCls)
|
|
53
53
|
});
|
|
@@ -273,7 +273,7 @@ var Base = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
273
273
|
tooltipProps = {
|
|
274
274
|
title: (_editConfig$text = editConfig.text) !== null && _editConfig$text !== void 0 ? _editConfig$text : _children
|
|
275
275
|
};
|
|
276
|
-
} else if (
|
|
276
|
+
} else if (/*#__PURE__*/React.isValidElement(ellipsisConfig.tooltip)) {
|
|
277
277
|
tooltipProps = {
|
|
278
278
|
title: ellipsisConfig.tooltip
|
|
279
279
|
};
|
|
@@ -36,8 +36,8 @@ var useCopyClick = function useCopyClick(_ref) {
|
|
|
36
36
|
return cleanCopyId;
|
|
37
37
|
}, []);
|
|
38
38
|
// Keep copy action up to date
|
|
39
|
-
var onClick = useEvent(
|
|
40
|
-
var _ref2 = _asyncToGenerator(
|
|
39
|
+
var onClick = useEvent(/*#__PURE__*/function () {
|
|
40
|
+
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(e) {
|
|
41
41
|
var _copyConfig$onCopy, text;
|
|
42
42
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
43
43
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -161,7 +161,7 @@ var InternalUpload = function InternalUpload(props, ref) {
|
|
|
161
161
|
}
|
|
162
162
|
};
|
|
163
163
|
var mergedBeforeUpload = /*#__PURE__*/function () {
|
|
164
|
-
var _ref = _asyncToGenerator(
|
|
164
|
+
var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(file, fileListArgs) {
|
|
165
165
|
var beforeUpload, transformFile, parsedFile, result;
|
|
166
166
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
167
167
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -128,7 +128,7 @@ var InternalUploadList = function InternalUploadList(props, ref) {
|
|
|
128
128
|
title: title,
|
|
129
129
|
onClick: function onClick(e) {
|
|
130
130
|
callback();
|
|
131
|
-
if (
|
|
131
|
+
if (/*#__PURE__*/React.isValidElement(customIcon)) {
|
|
132
132
|
var _customIcon$props$onC, _customIcon$props;
|
|
133
133
|
(_customIcon$props$onC = (_customIcon$props = customIcon.props).onClick) === null || _customIcon$props$onC === void 0 || _customIcon$props$onC.call(_customIcon$props, e);
|
|
134
134
|
}
|
|
@@ -138,7 +138,7 @@ var InternalUploadList = function InternalUploadList(props, ref) {
|
|
|
138
138
|
if (acceptUploadDisabled) {
|
|
139
139
|
btnProps.disabled = disabled;
|
|
140
140
|
}
|
|
141
|
-
if (
|
|
141
|
+
if (/*#__PURE__*/React.isValidElement(customIcon)) {
|
|
142
142
|
var btnIcon = cloneElement(customIcon, _objectSpread(_objectSpread({}, customIcon.props), {}, {
|
|
143
143
|
onClick: function onClick() {}
|
|
144
144
|
}));
|
package/lib/Badge/index.js
CHANGED
|
@@ -27,7 +27,7 @@ var CWBadge = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
27
27
|
cssVarCls = _useStyle2[2];
|
|
28
28
|
var theme = useTheme();
|
|
29
29
|
if (status == "processing") {
|
|
30
|
-
return wrapCSSVar(
|
|
30
|
+
return wrapCSSVar(/*#__PURE__*/React.createElement("span", {
|
|
31
31
|
className: classnames(prefixCls, hashId, cssVarCls, "".concat(prefixCls, "-processing-wrapper"))
|
|
32
32
|
}, /*#__PURE__*/React.createElement("span", {
|
|
33
33
|
className: "".concat(prefixCls, "-processing")
|
|
@@ -35,7 +35,7 @@ var CWBadge = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
35
35
|
className: "".concat(prefixCls, "-processing-text")
|
|
36
36
|
}, text)));
|
|
37
37
|
}
|
|
38
|
-
return wrapCSSVar(
|
|
38
|
+
return wrapCSSVar(/*#__PURE__*/React.createElement(Badge, _extends({
|
|
39
39
|
ref: ref,
|
|
40
40
|
color: status == "active" ? theme["colorPrimary"] : undefined,
|
|
41
41
|
className: classnames("".concat(prefixCls, "-wrapper"), className)
|
|
@@ -46,7 +46,7 @@ function Footer(_ref) {
|
|
|
46
46
|
props: res
|
|
47
47
|
});
|
|
48
48
|
});
|
|
49
|
-
return wrapCSSVar(
|
|
49
|
+
return wrapCSSVar(/*#__PURE__*/React.createElement("div", _extends({
|
|
50
50
|
className: classnames(hashId, cssVarCls, "".concat(prefixCls, "-cw-layout-bottom-footer")),
|
|
51
51
|
ref: dom
|
|
52
52
|
}, res), children));
|
package/lib/BasicLayout/Sider.js
CHANGED
|
@@ -89,7 +89,7 @@ function Sider(_ref) {
|
|
|
89
89
|
siderDragWidth = _menuOptions$resizabl2.siderDragWidth,
|
|
90
90
|
_resizableProps = _objectWithoutProperties(_menuOptions$resizabl2, _excluded),
|
|
91
91
|
_resMenuProps = _objectWithoutProperties(menuOptions, _excluded2);
|
|
92
|
-
return wrapCSSVar(
|
|
92
|
+
return wrapCSSVar(/*#__PURE__*/React.createElement(Resizable, _extends({}, _resizableProps, {
|
|
93
93
|
minWidth: selfCollapsed ? siderCollapsedWidth : siderWidth,
|
|
94
94
|
maxWidth: selfCollapsed ? siderCollapsedWidth : maxDragWidth,
|
|
95
95
|
onResizeStart: function onResizeStart() {
|
|
@@ -132,7 +132,7 @@ function Sider(_ref) {
|
|
|
132
132
|
className: "cw-side-menu-box"
|
|
133
133
|
}, /*#__PURE__*/React.createElement("div", {
|
|
134
134
|
className: "cw-side-menu"
|
|
135
|
-
}, siderMenu ? (
|
|
135
|
+
}, siderMenu ? (/*#__PURE__*/React.cloneElement(siderMenu, {
|
|
136
136
|
collapsed: selfCollapsed
|
|
137
137
|
}) // 自定义传入的Menu注入collapsed属性
|
|
138
138
|
) : /*#__PURE__*/React.createElement(_SiderMenu, _extends({
|
package/lib/BasicLayout/index.js
CHANGED
|
@@ -204,7 +204,7 @@ var BasicLayout = function BasicLayout(_ref) {
|
|
|
204
204
|
var children = _ref3.children,
|
|
205
205
|
dom = _ref3.dom,
|
|
206
206
|
props = _ref3.props;
|
|
207
|
-
setCloneFooter(
|
|
207
|
+
setCloneFooter(/*#__PURE__*/React.createElement("div", _extends({
|
|
208
208
|
className: "".concat(prefixCls, "-cw-layout-bottom-footer")
|
|
209
209
|
}, props), children));
|
|
210
210
|
|
|
@@ -219,7 +219,7 @@ var BasicLayout = function BasicLayout(_ref) {
|
|
|
219
219
|
}
|
|
220
220
|
};
|
|
221
221
|
// ----- footer -----
|
|
222
|
-
return wrapCSSVar(
|
|
222
|
+
return wrapCSSVar(/*#__PURE__*/React.createElement("div", {
|
|
223
223
|
className: classnames(hashId, cssVarCls, "".concat(prefixCls, "-cw-layout-out"), className),
|
|
224
224
|
style: style,
|
|
225
225
|
ref: layoutRef
|
package/lib/Button/index.js
CHANGED
|
@@ -33,7 +33,7 @@ var CWButton = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
33
33
|
wrapCSSVar = _useStyle2[0],
|
|
34
34
|
hashId = _useStyle2[1],
|
|
35
35
|
cssVarCls = _useStyle2[2];
|
|
36
|
-
return wrapCSSVar(
|
|
36
|
+
return wrapCSSVar(/*#__PURE__*/React.createElement(Button, _extends({
|
|
37
37
|
className: classnames("".concat(prefixCls, "-wrapper"), _defineProperty({}, "".concat(prefixCls, "-main"), mainType), className),
|
|
38
38
|
ref: ref,
|
|
39
39
|
type: type === "danger" || type === "warn" ? undefined : type,
|
|
@@ -38,7 +38,7 @@ export default function getIcons(_ref) {
|
|
|
38
38
|
if (suffixIcon !== undefined) {
|
|
39
39
|
mergedSuffixIcon = getSuffixIconNode(suffixIcon);
|
|
40
40
|
} else if (loading) {
|
|
41
|
-
mergedSuffixIcon = getSuffixIconNode(
|
|
41
|
+
mergedSuffixIcon = getSuffixIconNode(/*#__PURE__*/React.createElement(LoadingOutlined, {
|
|
42
42
|
spin: true
|
|
43
43
|
}));
|
|
44
44
|
} else {
|
|
@@ -47,11 +47,11 @@ export default function getIcons(_ref) {
|
|
|
47
47
|
var open = _ref2.open,
|
|
48
48
|
showSearch = _ref2.showSearch;
|
|
49
49
|
if (open && showSearch) {
|
|
50
|
-
return getSuffixIconNode(
|
|
50
|
+
return getSuffixIconNode(/*#__PURE__*/React.createElement(SearchOutlined, {
|
|
51
51
|
className: iconCls
|
|
52
52
|
}));
|
|
53
53
|
}
|
|
54
|
-
return getSuffixIconNode(
|
|
54
|
+
return getSuffixIconNode(/*#__PURE__*/React.createElement(DownOutlined, {
|
|
55
55
|
className: iconCls
|
|
56
56
|
}));
|
|
57
57
|
};
|
package/lib/CWCascader/index.js
CHANGED
|
@@ -19,7 +19,7 @@ var CWCascader = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
19
19
|
wrapCSSVar = _useStyle2[0],
|
|
20
20
|
hashId = _useStyle2[1],
|
|
21
21
|
cssVarCls = _useStyle2[2];
|
|
22
|
-
return wrapCSSVar(
|
|
22
|
+
return wrapCSSVar(/*#__PURE__*/React.createElement(Cascader, _extends({}, props, {
|
|
23
23
|
ref: ref
|
|
24
24
|
})));
|
|
25
25
|
});
|
|
@@ -113,7 +113,7 @@ export default function Column(_ref) {
|
|
|
113
113
|
});
|
|
114
114
|
}, [options, checkedSet, fieldNames, halfCheckedSet, loadingKeys, prevValuePath]);
|
|
115
115
|
var onChange = /*#__PURE__*/function () {
|
|
116
|
-
var _ref2 = _asyncToGenerator(
|
|
116
|
+
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(e) {
|
|
117
117
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
118
118
|
while (1) switch (_context.prev = _context.next) {
|
|
119
119
|
case 0:
|
|
@@ -142,8 +142,8 @@ export default function Column(_ref) {
|
|
|
142
142
|
style: {
|
|
143
143
|
flex: 1
|
|
144
144
|
},
|
|
145
|
-
onScroll: (
|
|
146
|
-
var _ref3 = _asyncToGenerator(
|
|
145
|
+
onScroll: (/*#__PURE__*/function () {
|
|
146
|
+
var _ref3 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(e) {
|
|
147
147
|
var isScrollBottom;
|
|
148
148
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
149
149
|
while (1) switch (_context2.prev = _context2.next) {
|
|
@@ -238,7 +238,7 @@ var ColorPicker = function ColorPicker(_ref) {
|
|
|
238
238
|
onChange: changeTab,
|
|
239
239
|
items: items
|
|
240
240
|
}));
|
|
241
|
-
return wrapCSSVar(
|
|
241
|
+
return wrapCSSVar(/*#__PURE__*/React.createElement("div", {
|
|
242
242
|
className: classnames(hashId, cssVarCls, "".concat(prefixCls, "-select")),
|
|
243
243
|
onClick: function onClick(e) {
|
|
244
244
|
e.preventDefault();
|
|
@@ -10,7 +10,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
10
10
|
function asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); }
|
|
11
11
|
function _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; }
|
|
12
12
|
import React from 'react';
|
|
13
|
-
import
|
|
13
|
+
import dayjs from '../../../utils/generate/dayjs';
|
|
14
14
|
import classnames from 'classnames';
|
|
15
15
|
import { readInnerMessageApi } from '../../service';
|
|
16
16
|
import { useIntl } from '../../../locales';
|
|
@@ -59,7 +59,7 @@ var TabList = function TabList(props) {
|
|
|
59
59
|
}
|
|
60
60
|
};
|
|
61
61
|
var readInnerMessage = /*#__PURE__*/function () {
|
|
62
|
-
var _ref = _asyncToGenerator(
|
|
62
|
+
var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(params) {
|
|
63
63
|
var resRequestApi, res, _params;
|
|
64
64
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
65
65
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -110,7 +110,7 @@ var TabList = function TabList(props) {
|
|
|
110
110
|
className: "".concat(messagePrefixCls, "-content-tabs-list-desc")
|
|
111
111
|
}, (_message$summary = message.summary) !== null && _message$summary !== void 0 ? _message$summary : ''), /*#__PURE__*/React.createElement("div", {
|
|
112
112
|
className: "".concat(messagePrefixCls, "-content-tabs-list-date")
|
|
113
|
-
}, message.time ?
|
|
113
|
+
}, message.time ? dayjs(Number(message.time)).format('YYYY/MM/DD HH:mm:ss') : ''));
|
|
114
114
|
});
|
|
115
115
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_Button, {
|
|
116
116
|
className: "".concat(messagePrefixCls, "-content-all-read"),
|
|
@@ -77,7 +77,7 @@ var MessageContent = function MessageContent(props) {
|
|
|
77
77
|
_getMessageListApi = requestOption.getMessageListApi,
|
|
78
78
|
_getMessageUnreadCountApi = requestOption.getMessageUnreadCountApi;
|
|
79
79
|
useEffect(function () {
|
|
80
|
-
_asyncToGenerator(
|
|
80
|
+
_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
81
81
|
var resRequestApi, res, _data$, data, params;
|
|
82
82
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
83
83
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -108,7 +108,7 @@ var MessageContent = function MessageContent(props) {
|
|
|
108
108
|
locale = _ref2$currentLocale === void 0 ? "zh_CN" : _ref2$currentLocale;
|
|
109
109
|
// 查询消息列表(接口)
|
|
110
110
|
var getMessageList = /*#__PURE__*/function () {
|
|
111
|
-
var _ref3 = _asyncToGenerator(
|
|
111
|
+
var _ref3 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(params) {
|
|
112
112
|
var resRequestApi, res, _res$data, _total, _res$data$records, records;
|
|
113
113
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
114
114
|
while (1) switch (_context2.prev = _context2.next) {
|
|
@@ -138,7 +138,7 @@ var MessageContent = function MessageContent(props) {
|
|
|
138
138
|
}();
|
|
139
139
|
// 查询所有类型的未读消息数(接口)
|
|
140
140
|
var getMessageUnreadCount = /*#__PURE__*/function () {
|
|
141
|
-
var _ref4 = _asyncToGenerator(
|
|
141
|
+
var _ref4 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
|
|
142
142
|
var resRequestApi, res, _res$data$byType, byType, _unreadTypeArr;
|
|
143
143
|
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
144
144
|
while (1) switch (_context3.prev = _context3.next) {
|
package/lib/CWMessage/index.js
CHANGED
|
@@ -164,7 +164,7 @@ function Message(props) {
|
|
|
164
164
|
setVisible(true);
|
|
165
165
|
};
|
|
166
166
|
var openNotification = /*#__PURE__*/function () {
|
|
167
|
-
var _ref = _asyncToGenerator(
|
|
167
|
+
var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(time, id) {
|
|
168
168
|
var params, resRequestApi, res, data, _ref2, userMessageId, title, summary;
|
|
169
169
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
170
170
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -209,7 +209,7 @@ function Message(props) {
|
|
|
209
209
|
};
|
|
210
210
|
}();
|
|
211
211
|
var readInnerMessage = /*#__PURE__*/function () {
|
|
212
|
-
var _ref3 = _asyncToGenerator(
|
|
212
|
+
var _ref3 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(params) {
|
|
213
213
|
var resRequestApi;
|
|
214
214
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
215
215
|
while (1) switch (_context2.prev = _context2.next) {
|
|
@@ -262,7 +262,7 @@ function Message(props) {
|
|
|
262
262
|
}
|
|
263
263
|
};
|
|
264
264
|
var connectSocket = /*#__PURE__*/function () {
|
|
265
|
-
var _ref7 = _asyncToGenerator(
|
|
265
|
+
var _ref7 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
|
|
266
266
|
var resRequestApi, res, finalOrigin, socket;
|
|
267
267
|
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
268
268
|
while (1) switch (_context4.prev = _context4.next) {
|
|
@@ -287,7 +287,7 @@ function Message(props) {
|
|
|
287
287
|
// 监听从服务器传来的消息
|
|
288
288
|
socket.on("push", getSocketPostMessage);
|
|
289
289
|
// socket重连
|
|
290
|
-
socket.on("reconnect_attempt", /*#__PURE__*/_asyncToGenerator(
|
|
290
|
+
socket.on("reconnect_attempt", /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
|
|
291
291
|
var res;
|
|
292
292
|
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
293
293
|
while (1) switch (_context3.prev = _context3.next) {
|
|
@@ -320,7 +320,7 @@ function Message(props) {
|
|
|
320
320
|
};
|
|
321
321
|
}();
|
|
322
322
|
var getMessageQuerySettings = /*#__PURE__*/function () {
|
|
323
|
-
var _ref9 = _asyncToGenerator(
|
|
323
|
+
var _ref9 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee5() {
|
|
324
324
|
var resRequestApi, res, data;
|
|
325
325
|
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
|
|
326
326
|
while (1) switch (_context5.prev = _context5.next) {
|
|
@@ -344,7 +344,7 @@ function Message(props) {
|
|
|
344
344
|
return _ref9.apply(this, arguments);
|
|
345
345
|
};
|
|
346
346
|
}();
|
|
347
|
-
return wrapCSSVar(
|
|
347
|
+
return wrapCSSVar(/*#__PURE__*/React.createElement("div", {
|
|
348
348
|
className: classnames(hashId, cssVarCls, "".concat(messagePrefixCls, "-wrapper"))
|
|
349
349
|
}, contextHolder, /*#__PURE__*/React.createElement(_Badge, _extends({
|
|
350
350
|
count: messageTotal,
|
package/lib/CWRadioTabs/index.js
CHANGED
|
@@ -78,7 +78,7 @@ var CWRadioTabs = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
78
78
|
}, item.title);
|
|
79
79
|
}));
|
|
80
80
|
if (!dataSource.length) return null;
|
|
81
|
-
return wrapCSSVar(
|
|
81
|
+
return wrapCSSVar(/*#__PURE__*/React.createElement("div", _extends({
|
|
82
82
|
className: classnames(hashId, cssVarCls, prefixCls, className)
|
|
83
83
|
}, rest), /*#__PURE__*/React.createElement(_Radio.Group, {
|
|
84
84
|
value: finalActiveKey,
|
|
@@ -29,7 +29,7 @@ import MoreSvg from "../assets/more";
|
|
|
29
29
|
import MoreTimeList from "./MoreTimeList";
|
|
30
30
|
import MoreHistoryList from "./MoreHistoryList";
|
|
31
31
|
import useConfigContext from "../../useConfigContext";
|
|
32
|
-
import { judgeType, funcValueChangeArrayValue, getCorrectValue, getHistoryInfo } from "../utils";
|
|
32
|
+
import { judgeType, funcValueChangeArrayValue, getCorrectValue, getHistoryInfo } from "../utils/generate/dayjs";
|
|
33
33
|
import { useIntl } from "../../locales";
|
|
34
34
|
import useStyle from "./index.style";
|
|
35
35
|
var DropdownMenu = function DropdownMenu(props) {
|
|
@@ -107,6 +107,7 @@ var DropdownMenu = function DropdownMenu(props) {
|
|
|
107
107
|
// 点击切换为日历
|
|
108
108
|
var onClickSelectCalendar = function onClickSelectCalendar(e) {
|
|
109
109
|
e.nativeEvent.stopImmediatePropagation();
|
|
110
|
+
console.log(222, "22");
|
|
110
111
|
setIsCalendar(true);
|
|
111
112
|
};
|
|
112
113
|
// 存在历史记录点击tag回显时间
|
|
@@ -140,7 +141,7 @@ var DropdownMenu = function DropdownMenu(props) {
|
|
|
140
141
|
e.stopPropagation();
|
|
141
142
|
setHistoryList([]);
|
|
142
143
|
};
|
|
143
|
-
return wrapCSSVar(
|
|
144
|
+
return wrapCSSVar(/*#__PURE__*/React.createElement("div", {
|
|
144
145
|
className: classnames(hashId, cssVarCls, "".concat(prefixCls, "-cw-dropdown-menu-wrapper"))
|
|
145
146
|
}, dataSource === null || dataSource === void 0 ? void 0 : dataSource.slice(0, showDefaultCount).map(function (item) {
|
|
146
147
|
var values = item.value;
|
|
@@ -20,7 +20,7 @@ import classnames from "classnames";
|
|
|
20
20
|
import Refresh1Svg from "../assets/Refresh1";
|
|
21
21
|
import Refresh2Svg from "../assets/Refresh2";
|
|
22
22
|
import Refresh3Svg from "../assets/Refresh3";
|
|
23
|
-
import { getChangeUnitDate, funcValueChangeArrayValue, getTimeSpanFromValue, computedRecentlyValue, judgeType } from "../utils";
|
|
23
|
+
import { getChangeUnitDate, funcValueChangeArrayValue, getTimeSpanFromValue, computedRecentlyValue, judgeType } from "../utils/generate/dayjs";
|
|
24
24
|
import useConfigContext from "../../useConfigContext";
|
|
25
25
|
import { useIntl } from "../../locales";
|
|
26
26
|
import useStyle from "./index.style";
|
|
@@ -8,7 +8,7 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
|
|
|
8
8
|
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
9
9
|
import React from "react";
|
|
10
10
|
import { CaretLeftOutlined, CaretRightOutlined, ZoomInOutlined } from "@ant-design/icons";
|
|
11
|
-
import { getChangeDate } from "../utils";
|
|
11
|
+
import { getChangeDate } from "../utils/generate/dayjs";
|
|
12
12
|
import classnames from "classnames";
|
|
13
13
|
import useConfigContext from "../../useConfigContext";
|
|
14
14
|
import { useIntl } from "../../locales";
|