@chaoswise/ui 2.4.0 → 2.5.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/config/babel/index.js +1 -28
- package/config/swc.js +5 -0
- package/lib/AbreastLayout/CollapsedBtn.js +1 -1
- package/lib/AbreastLayout/NavTreeContainer.js +1 -1
- package/lib/AbreastLayout/index.js +2 -2
- package/lib/Ace/ace.js +2 -2
- package/lib/Ace/diff.js +2 -2
- package/lib/Ace/split.js +2 -2
- package/lib/AdaptiveLayout/index.js +2 -2
- package/lib/Alert/index.js +1 -1
- package/lib/AlgorithmChart/common/chart.option.js +0 -5
- package/lib/Anchor/index.js +3 -0
- package/lib/Antd/Drawer.js +2 -2
- package/lib/Antd3/es/cascader/index.js +0 -1
- package/lib/Antd3/es/message/index.js +0 -2
- package/lib/Antd4/message/index-copy.js +0 -2
- package/lib/Antd4/notification/index.js +0 -1
- package/lib/Antd4/statistic/utils.js +0 -1
- package/lib/Antd4/tabs/index.js +1 -1
- package/lib/Antd4/tooltip/index.js +0 -1
- package/lib/Antd4/tree/Tree.js +0 -1
- package/lib/Antd4Form/FieldList.js +2 -2
- package/lib/Antd4Form/FormItem.js +2 -2
- package/lib/Antd4Form/FormItemChildren.js +2 -2
- package/lib/Antd4Form/useForm.js +2 -2
- package/lib/AutoComplete/index.js +3 -0
- package/lib/Avatar/index.js +3 -0
- package/lib/BackTop/index.js +3 -0
- package/lib/Badge/index.less +5 -0
- package/lib/BasicLayout/Breadcrumb.js +3 -3
- package/lib/BasicLayout/Sider.js +5 -5
- package/lib/BasicLayout/index.js +2 -3
- package/lib/Breadcrumb/Breadcrumb.less +34 -0
- package/lib/Breadcrumb/index.js +2 -9
- package/lib/CWCascader/Cascader/index.js +2 -2
- package/lib/CWCascader/rc-cascader/OptionList/Checkbox.js +2 -2
- package/lib/CWCascader/rc-cascader/OptionList/Column.js +5 -5
- package/lib/CWCascader/rc-cascader/OptionList/index.js +2 -2
- package/lib/CWCascader/rc-cascader/hooks/useEntities.js +2 -2
- package/lib/CWCascader/rc-cascader/hooks/useSearchConfig.js +2 -2
- package/lib/CWCascader/rc-cascader/hooks/useSearchOptions.js +2 -2
- package/lib/CWMessage/MessageContent/TabList/index.js +2 -2
- package/lib/CWMessage/MessageContent/index.js +12 -5
- package/lib/CWMessage/index.js +3 -3
- package/lib/CWRadioTabs/index.js +2 -2
- package/lib/CWRangePicker/DropdownMenu/MoreHistoryList/index.js +1 -1
- package/lib/CWRangePicker/DropdownMenu/MoreTimeList/index.js +2 -2
- package/lib/CWRangePicker/DropdownMenu/index.js +4 -4
- package/lib/CWRangePicker/Refresh/index.js +2 -2
- package/lib/CWRangePicker/index.js +4 -4
- package/lib/CWRangePicker/utils/index.js +2 -2
- package/lib/CWSelect/Tag.js +1 -1
- package/lib/CWSelect/antd-select.js +3 -4
- package/lib/CWSelect/index.js +2 -2
- package/lib/CWTable/CWTable.js +4 -6
- package/lib/CWTable/EditLine.js +4 -4
- package/lib/CWTable/Filter.js +1 -1
- package/lib/CWTable/FormTable.js +2 -2
- package/lib/CWTable/header.js +23 -22
- package/lib/CWTree/index.js +4 -5
- package/lib/CWTree/utils/index.js +2 -2
- package/lib/CWUpload/upload/DragList.js +2 -2
- package/lib/CWUpload/upload/Dragger.js +3 -3
- package/lib/CWUpload/upload/Upload.js +4 -4
- package/lib/CWUpload/upload/UploadList.js +28 -28
- package/lib/Calendar/index.js +3 -0
- package/lib/Card/index.js +3 -0
- package/lib/CardSelect/index.js +0 -1
- package/lib/Carousel/index.js +3 -0
- package/lib/ChangeIcon/index.js +1 -1
- package/lib/Checkbox/Checkbox.js +2 -2
- package/lib/Checkbox/Group.js +2 -2
- package/lib/Col/Collapse.less +129 -0
- package/lib/Col/index.js +3 -0
- package/lib/Collapse/index.js +1 -1
- package/lib/ColorPicker/index.js +4 -5
- package/lib/Comment/index.js +3 -0
- package/lib/ConfigProvider/ConfigProvider.js +50 -30
- package/lib/ConfigProvider/Switch.js +1 -1
- package/lib/CustomScrollBar/index.js +2 -2
- package/lib/DatePicker/DatePicker.js +1 -1
- package/lib/DatePicker/MonthPicker.js +1 -1
- package/lib/DatePicker/RangePicker.js +1 -1
- package/lib/DateRangePicker/components/ExtraTimeFooter.js +2 -2
- package/lib/Descriptions/index.js +3 -0
- package/lib/Divider/index.js +3 -0
- package/lib/Documentation/Tocify.js +2 -2
- package/lib/Documentation/index.js +2 -3
- package/lib/Drawer/Drawer.less +305 -0
- package/lib/Drawer/index.js +120 -0
- package/lib/Dropdown/Dropdown.less +124 -0
- package/lib/Dropdown/index.js +4 -0
- package/lib/DropdownDatePicker/DropdownMenu/MoreTimeList/index.js +2 -2
- package/lib/DropdownDatePicker/DropdownMenu/index.js +4 -4
- package/lib/DropdownDatePicker/index.js +3 -3
- package/lib/DropdownDatePicker/utils/index.js +2 -2
- package/lib/EchartsArea/index.js +2 -2
- package/lib/EchartsBar/index.js +2 -2
- package/lib/EchartsBase/index.js +2 -3
- package/lib/EchartsLine/index.js +2 -3
- package/lib/ErrorBoundary/history.js +2 -2
- package/lib/ErrorBoundary/index.js +2 -2
- package/lib/FilterDropDown/DragList.js +3 -4
- package/lib/FilterDropDown/index.js +1 -1
- package/lib/Flow/Flow.js +0 -2
- package/lib/Flow/commons/initCommands.js +0 -2
- package/lib/Flow/components/PluginWrapper.js +2 -2
- package/lib/Flow/layouts/callChain.js +2 -2
- package/lib/Flow/plugins/CommandLifeCycle.js +2 -2
- package/lib/Flow/plugins/InitSideBarPlugin.js +2 -2
- package/lib/Flow/plugins/InitToolBarPlugin.js +2 -2
- package/lib/Flow/shape/nodes/baseNode.js +0 -1
- package/lib/Form/FormItem.js +2 -2
- package/lib/FormItemWrapper/index.js +2 -2
- package/lib/Formily/FieldList/index.js +2 -2
- package/lib/Formily/FormItem/index.js +3 -3
- package/lib/Formily/FormItem/items/Password.js +2 -2
- package/lib/Formily/FormItem/items/Rating.js +1 -1
- package/lib/Formily/FormItem/items/Switch.js +1 -1
- package/lib/Formily/FormItem/items/Tansfer.js +1 -1
- package/lib/Formily/FormItem/items/TimePicker.js +1 -1
- package/lib/Formily/MegaLayout/index.js +2 -2
- package/lib/Formily/subscribeFields/index.js +2 -2
- package/lib/GlobalTabs/index.js +2 -2
- package/lib/Header/CommonDropMenu.js +2 -2
- package/lib/Header/CommonIcon.js +2 -2
- package/lib/Header/TopNavigationMenu/index.js +2 -2
- package/lib/Header/UserSetting/index.js +2 -2
- package/lib/Header/UserSetting/utils.js +2 -2
- package/lib/Header/index.js +2 -2
- package/lib/Icon/index.js +3 -0
- package/lib/IconSelect/components/CustomImg/index.js +0 -1
- package/lib/IconSelect/index.js +1 -1
- package/lib/Input/InputComponent.js +2 -2
- package/lib/IntersectionInput/index.js +2 -2
- package/lib/Joyride/List.js +2 -2
- package/lib/Joyride/index.js +3 -3
- package/lib/Layout/Layout.less +6 -0
- package/lib/Layout/index.js +4 -0
- package/lib/LayoutBreadcrumb/index.js +3 -3
- package/lib/LazyLoadingTreeSelect/index.js +2 -2
- package/lib/List/index.js +3 -0
- package/lib/LocaleProvider/index.js +3 -0
- package/lib/Mention/index.js +3 -0
- package/lib/Mentions/index.js +3 -0
- package/lib/Menu/menu/MenuItem.js +2 -3
- package/lib/Menu/menu/SubMenu.js +2 -2
- package/lib/Menu/menu/index.js +2 -2
- package/lib/Modal/Modal.js +2 -2
- package/lib/Modal/custom-backup/entiretyDrag.js +2 -2
- package/lib/Modal/index.js +3 -4
- package/lib/ModuleFederation/ErrorBoundary/index.js +2 -2
- package/lib/ModuleFederation/index.js +1 -1
- package/lib/ModuleFederation/react-dynamic-remote-component/RemoteComponent.js +3 -3
- package/lib/PageHeader/index.js +3 -0
- package/lib/Pagination/index.js +2 -2
- package/lib/PolymerizationSearch/index.js +2 -2
- package/lib/Popover/index.js +3 -0
- package/lib/Progress/index.js +1 -1
- package/lib/QuickRangePicker/index.js +5 -5
- package/lib/QuickTransfer/Drag.js +0 -1
- package/lib/QuickTransfer/DragList.js +1 -1
- package/lib/QuickTransfer/NotDragList.js +1 -1
- package/lib/QuickTransfer/index.js +2 -2
- package/lib/QuickTransfer/utils.js +2 -4
- package/lib/Radio/Group.js +2 -2
- package/lib/Radio/Radio.js +2 -2
- package/lib/RangePicker/components/ExtraTimeFooter.js +3 -3
- package/lib/Rate/index.js +3 -0
- package/lib/ReactSelect/CustomArrow.js +1 -1
- package/lib/ReactSelect/TagMore.js +1 -1
- package/lib/ReactSelect/customStyles.js +2 -2
- package/lib/ReactSelect/index.js +2 -2
- package/lib/Result/index.js +3 -0
- package/lib/Row/index.js +3 -0
- package/lib/SearchBar/index.js +6 -6
- package/lib/Select/TreeSelect.less +10 -0
- package/lib/Select/index.js +4 -0
- package/lib/SelectBackup/index.js +2 -2
- package/lib/SelectBackup/select/index.js +0 -1
- package/lib/SiderMenu/Item.js +2 -2
- package/lib/SiderMenu/index.js +3 -3
- package/lib/SimplePagination/index.js +3 -3
- package/lib/SingleSpa/import-html/process-tpl.js +0 -1
- package/lib/SingleSpa/index.js +2 -2
- package/lib/SingleSpa/singleSpa/single-spa.dev.js +2 -3
- package/lib/Skeleton/index.js +3 -0
- package/lib/Spin/Spin.less +16 -0
- package/lib/Spin/index.js +4 -0
- package/lib/Statistic/index.js +3 -0
- package/lib/Steps/Steps.less +502 -0
- package/lib/Steps/index.js +4 -0
- package/lib/Switch/Switch.less +62 -0
- package/lib/Switch/index.js +4 -0
- package/lib/Table/Table.less +306 -0
- package/lib/Table/index.js +4 -0
- package/lib/Tabs/index.js +2 -2
- package/lib/Tabs/index.less +3 -0
- package/lib/ThemeProvider/main.js +2 -2
- package/lib/TimePicker/index.js +3 -2
- package/lib/Transfer/index.js +3 -0
- package/lib/Tree/TreeSelect.less +10 -0
- package/lib/Tree/index.js +4 -0
- package/lib/TreeList/index.js +2 -2
- package/lib/TreeSelect/TreeSelect.less +10 -0
- package/lib/TreeSelect/index.js +4 -0
- package/lib/TreeSelect111/index.js +2 -2
- package/lib/TreeSelect111/utils/index.js +2 -2
- package/lib/Typography/index.js +3 -0
- package/lib/WangEditor/release/wangEditor.js +0 -6
- package/lib/WangEditor/wangEditor.js +0 -3
- package/lib/Watermark/index.js +2 -2
- package/lib/index.js +145 -0
- package/lib/message/index.js +3 -5
- package/lib/noticeManager/globalState.js +2 -2
- package/lib/portalNoticeManager/usePortalDispatchNotice.js +2 -2
- package/lib/useLocale/index.js +2 -2
- package/lib/version/index.js +3 -0
- package/package.json +2 -2
- /package/config/babel/{antdComs.js → antdComs-nouse.js} +0 -0
package/lib/CWTable/header.js
CHANGED
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
import "@chaoswise/ui/lib/TooltipText/index.less";
|
|
2
2
|
import _TooltipText from "@chaoswise/ui/lib/TooltipText";
|
|
3
|
-
import _Dropdown from "@chaoswise/ui/lib/
|
|
3
|
+
import _Dropdown from "@chaoswise/ui/lib/Dropdown";
|
|
4
4
|
import _Menu from "@chaoswise/ui/lib/Menu";
|
|
5
|
-
var _excluded = ["
|
|
6
|
-
_excluded2 = ["
|
|
5
|
+
var _excluded = ["children"],
|
|
6
|
+
_excluded2 = ["onResize", "width"],
|
|
7
|
+
_excluded3 = ["children", "onClick"];
|
|
7
8
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
8
|
-
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
9
|
-
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
10
9
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
11
10
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
12
11
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
13
12
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
14
13
|
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; } }
|
|
15
14
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
15
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
16
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
16
17
|
import React, { useState, useRef } from "react";
|
|
17
18
|
import { Resizable } from "react-resizable";
|
|
18
19
|
import SortContext from "./SortContext";
|
|
@@ -24,26 +25,26 @@ import UpGraySvg from './icon/UpGraySvg';
|
|
|
24
25
|
import UpLightSvg from './icon/UpLightSvg';
|
|
25
26
|
import useConfigContext from '../useConfigContext';
|
|
26
27
|
// HeaderRow让自定义排序的每个th,能获取到dataIndex
|
|
27
|
-
export function HeaderRow(
|
|
28
|
-
var children =
|
|
28
|
+
export function HeaderRow(props) {
|
|
29
|
+
var children = props.children,
|
|
30
|
+
rest = _objectWithoutProperties(props, _excluded);
|
|
29
31
|
var _children = children.map(function (child) {
|
|
30
32
|
return /*#__PURE__*/React.cloneElement(child, {
|
|
31
33
|
dataIndex: child.key
|
|
32
34
|
});
|
|
33
35
|
});
|
|
34
|
-
return /*#__PURE__*/React.createElement("tr",
|
|
36
|
+
return /*#__PURE__*/React.createElement("tr", rest, _children);
|
|
35
37
|
}
|
|
36
|
-
|
|
37
38
|
// 自定义排序
|
|
38
|
-
function Sort(
|
|
39
|
-
var column =
|
|
40
|
-
sorterInfo =
|
|
39
|
+
function Sort(_ref) {
|
|
40
|
+
var column = _ref.column,
|
|
41
|
+
sorterInfo = _ref.sorterInfo;
|
|
41
42
|
var _useState = useState([]),
|
|
42
43
|
_useState2 = _slicedToArray(_useState, 2),
|
|
43
44
|
selectedKeys = _useState2[0],
|
|
44
45
|
setSelectedKeys = _useState2[1];
|
|
45
|
-
var onClick = function onClick(
|
|
46
|
-
var key =
|
|
46
|
+
var onClick = function onClick(_ref2) {
|
|
47
|
+
var key = _ref2.key;
|
|
47
48
|
// 设置选中的key
|
|
48
49
|
var _selectedKeys = selectedKeys.includes(key) ? [] : [key];
|
|
49
50
|
setSelectedKeys(_selectedKeys);
|
|
@@ -60,9 +61,9 @@ function Sort(_ref2) {
|
|
|
60
61
|
overlay: /*#__PURE__*/React.createElement(_Menu, {
|
|
61
62
|
selectedKeys: selectedKeys,
|
|
62
63
|
onClick: onClick
|
|
63
|
-
}, column.sorter.map(function (
|
|
64
|
-
var label =
|
|
65
|
-
value =
|
|
64
|
+
}, column.sorter.map(function (_ref3) {
|
|
65
|
+
var label = _ref3.label,
|
|
66
|
+
value = _ref3.value;
|
|
66
67
|
return /*#__PURE__*/React.createElement(_Menu.Item, {
|
|
67
68
|
key: label
|
|
68
69
|
}, label);
|
|
@@ -82,7 +83,7 @@ function CustomIcon(props) {
|
|
|
82
83
|
export function HeaderCell(props) {
|
|
83
84
|
var _onResize = props.onResize,
|
|
84
85
|
width = props.width,
|
|
85
|
-
restProps = _objectWithoutProperties(props,
|
|
86
|
+
restProps = _objectWithoutProperties(props, _excluded2);
|
|
86
87
|
var isResizeRef = useRef(null);
|
|
87
88
|
var _useConfigContext = useConfigContext(),
|
|
88
89
|
getPrefixCls = _useConfigContext.getPrefixCls;
|
|
@@ -95,8 +96,8 @@ export function HeaderCell(props) {
|
|
|
95
96
|
var _restProps$children = _slicedToArray(restProps.children, 2),
|
|
96
97
|
sortNode = _restProps$children[0],
|
|
97
98
|
filterNode = _restProps$children[1];
|
|
98
|
-
var column = columns.find(function (
|
|
99
|
-
var dataIndex =
|
|
99
|
+
var column = columns.find(function (_ref4) {
|
|
100
|
+
var dataIndex = _ref4.dataIndex;
|
|
100
101
|
return dataIndex === props.dataIndex;
|
|
101
102
|
});
|
|
102
103
|
// 如果有排序,并且sorter符合自定义排序规则,就找到排序图标的节点,并替换
|
|
@@ -132,11 +133,11 @@ export function HeaderCell(props) {
|
|
|
132
133
|
var _children = restProps.children,
|
|
133
134
|
_restProps$onClick = restProps.onClick,
|
|
134
135
|
_onClick = _restProps$onClick === void 0 ? function () {} : _restProps$onClick,
|
|
135
|
-
rest = _objectWithoutProperties(restProps,
|
|
136
|
+
rest = _objectWithoutProperties(restProps, _excluded3);
|
|
136
137
|
var findColumnItem = columns === null || columns === void 0 ? void 0 : columns.find(function (item) {
|
|
137
138
|
return (item.dataIndex || item.key) === rest.dataIndex;
|
|
138
139
|
});
|
|
139
|
-
var ellipsis = findColumnItem
|
|
140
|
+
var ellipsis = findColumnItem && findColumnItem.ellipsis && !findColumnItem.filters && !findColumnItem.sorter ? true : false;
|
|
140
141
|
var renderChildren = ellipsis ? /*#__PURE__*/React.createElement(_TooltipText, null, _children) : _children;
|
|
141
142
|
if (!width) {
|
|
142
143
|
return /*#__PURE__*/React.createElement("th", _extends({}, rest, {
|
package/lib/CWTree/index.js
CHANGED
|
@@ -3,8 +3,8 @@ import "@chaoswise/ui/lib/Tooltip/index.less";
|
|
|
3
3
|
import _Tooltip from "@chaoswise/ui/lib/Tooltip";
|
|
4
4
|
import "@chaoswise/ui/lib/TooltipText/index.less";
|
|
5
5
|
import _TooltipText from "@chaoswise/ui/lib/TooltipText";
|
|
6
|
-
import _Dropdown from "@chaoswise/ui/lib/
|
|
7
|
-
import _Icon from "@chaoswise/ui/lib/
|
|
6
|
+
import _Dropdown from "@chaoswise/ui/lib/Dropdown";
|
|
7
|
+
import _Icon from "@chaoswise/ui/lib/Icon";
|
|
8
8
|
import _useLocale2 from "@chaoswise/ui/lib/useLocale";
|
|
9
9
|
import _Menu from "@chaoswise/ui/lib/Menu";
|
|
10
10
|
import "antd/es/tree/style";
|
|
@@ -15,8 +15,8 @@ function _extends() { _extends = Object.assign ? Object.assign.bind() : function
|
|
|
15
15
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
16
16
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
17
17
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
18
|
-
function _toPropertyKey(
|
|
19
|
-
function _toPrimitive(
|
|
18
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
19
|
+
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); }
|
|
20
20
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
21
21
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
22
22
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
@@ -290,7 +290,6 @@ function CWTree(_ref) {
|
|
|
290
290
|
// autoExpandParent: true,
|
|
291
291
|
};
|
|
292
292
|
}
|
|
293
|
-
|
|
294
293
|
return {};
|
|
295
294
|
}, [searchValue, expandedKeys]);
|
|
296
295
|
return /*#__PURE__*/React.createElement("div", {
|
|
@@ -2,8 +2,8 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
2
2
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
3
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
4
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
|
-
function _toPropertyKey(
|
|
6
|
-
function _toPrimitive(
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
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 { KMPMatch } from "../../QuickTransfer/utils";
|
|
8
8
|
import isUndefined from "lodash-es/isUndefined";
|
|
9
9
|
var getFinalStr = function getFinalStr(con) {
|
|
@@ -1,7 +1,7 @@
|
|
|
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
2
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
3
|
-
function _toPropertyKey(
|
|
4
|
-
function _toPrimitive(
|
|
3
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
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); }
|
|
5
5
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
6
6
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
7
7
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import _Icon from "@chaoswise/ui/lib/
|
|
1
|
+
import _Icon from "@chaoswise/ui/lib/Icon";
|
|
2
2
|
import _useLocale2 from "@chaoswise/ui/lib/useLocale";
|
|
3
3
|
var __rest = this && this.__rest || function (s, e) {
|
|
4
4
|
var t = {};
|
|
@@ -57,9 +57,9 @@ var Dragger = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
57
57
|
height: height
|
|
58
58
|
}),
|
|
59
59
|
ref: ref
|
|
60
|
-
}), children ? children : /*#__PURE__*/React.createElement(DefaultChildren, {
|
|
60
|
+
}), children ? children : ( /*#__PURE__*/React.createElement(DefaultChildren, {
|
|
61
61
|
description: description,
|
|
62
62
|
title: title
|
|
63
|
-
}));
|
|
63
|
+
})));
|
|
64
64
|
});
|
|
65
65
|
export default Dragger;
|
|
@@ -13,8 +13,8 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
13
13
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
14
14
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
15
15
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
16
|
-
function _toPropertyKey(
|
|
17
|
-
function _toPrimitive(
|
|
16
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
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
|
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
19
19
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
20
20
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
@@ -357,10 +357,10 @@ var Upload = /*#__PURE__*/function (_React$Component) {
|
|
|
357
357
|
if (!children || disabled) {
|
|
358
358
|
delete rcUploadProps.id;
|
|
359
359
|
}
|
|
360
|
-
var uploadList = showUploadList ? /*#__PURE__*/React.createElement(LocaleReceiver, {
|
|
360
|
+
var uploadList = showUploadList ? ( /*#__PURE__*/React.createElement(LocaleReceiver, {
|
|
361
361
|
componentName: "Upload",
|
|
362
362
|
defaultLocale: defaultLocale.Upload
|
|
363
|
-
}, _this.renderUploadList) : null;
|
|
363
|
+
}, _this.renderUploadList)) : null;
|
|
364
364
|
var dropSingleFileRender = function dropSingleFileRender() {
|
|
365
365
|
if (dropSingleFileUpload) {
|
|
366
366
|
var dom = fileList.length ? uploadList : children;
|
|
@@ -3,14 +3,14 @@ import "@chaoswise/ui/lib/Tooltip/index.less";
|
|
|
3
3
|
import _Tooltip from "@chaoswise/ui/lib/Tooltip";
|
|
4
4
|
import "@chaoswise/ui/lib/Progress/index.less";
|
|
5
5
|
import _Progress from "@chaoswise/ui/lib/Progress";
|
|
6
|
-
import _Icon from "@chaoswise/ui/lib/
|
|
6
|
+
import _Icon from "@chaoswise/ui/lib/Icon";
|
|
7
7
|
import _useLocale2 from "@chaoswise/ui/lib/useLocale";
|
|
8
8
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
9
9
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
10
10
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
11
11
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
12
|
-
function _toPropertyKey(
|
|
13
|
-
function _toPrimitive(
|
|
12
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
13
|
+
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); }
|
|
14
14
|
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
15
15
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
16
16
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
@@ -117,15 +117,15 @@ var IUploadList = /*#__PURE__*/function (_React$Component) {
|
|
|
117
117
|
theme: "twoTone"
|
|
118
118
|
});
|
|
119
119
|
} else {
|
|
120
|
-
var thumbnail = isImageUrl(file) ? /*#__PURE__*/React.createElement("img", {
|
|
120
|
+
var thumbnail = isImageUrl(file) ? ( /*#__PURE__*/React.createElement("img", {
|
|
121
121
|
src: file.thumbUrl || file.url,
|
|
122
122
|
alt: file.name,
|
|
123
123
|
className: "".concat(prefixCls, "-list-item-image")
|
|
124
|
-
}) : /*#__PURE__*/React.createElement(_Icon, {
|
|
124
|
+
})) : ( /*#__PURE__*/React.createElement(_Icon, {
|
|
125
125
|
type: "file",
|
|
126
126
|
className: "".concat(prefixCls, "-list-item-icon"),
|
|
127
127
|
theme: "twoTone"
|
|
128
|
-
});
|
|
128
|
+
}));
|
|
129
129
|
icon = /*#__PURE__*/React.createElement("a", {
|
|
130
130
|
className: "".concat(prefixCls, "-list-item-thumbnail"),
|
|
131
131
|
onClick: function onClick(e) {
|
|
@@ -141,12 +141,12 @@ var IUploadList = /*#__PURE__*/function (_React$Component) {
|
|
|
141
141
|
// show loading icon if upload progress listener is disabled
|
|
142
142
|
var _renderMethod = _this.props.renderMethod;
|
|
143
143
|
var infoClass = classNames(_defineProperty({}, "".concat(prefixCls, "-list-item-").concat(_renderMethod ? "drag" : "progress"), true));
|
|
144
|
-
var loadingProgress = "percent" in file ? /*#__PURE__*/React.createElement(_Progress, Object.assign({
|
|
144
|
+
var loadingProgress = "percent" in file ? ( /*#__PURE__*/React.createElement(_Progress, Object.assign({
|
|
145
145
|
type: "line"
|
|
146
146
|
}, progressAttr, {
|
|
147
147
|
percent: file.percent,
|
|
148
148
|
strokeColor: "#1890FF"
|
|
149
|
-
})) : null;
|
|
149
|
+
}))) : null;
|
|
150
150
|
progress = /*#__PURE__*/React.createElement("div", {
|
|
151
151
|
className: infoClass,
|
|
152
152
|
key: "progress"
|
|
@@ -154,35 +154,35 @@ var IUploadList = /*#__PURE__*/function (_React$Component) {
|
|
|
154
154
|
}
|
|
155
155
|
var infoUploadingClass = classNames(_defineProperty(_defineProperty(_defineProperty({}, "".concat(prefixCls, "-list-item"), true), "".concat(prefixCls, "-list-item-").concat(file.status), true), "".concat(prefixCls, "-list-item-list-type-").concat(listType), true));
|
|
156
156
|
var linkProps = typeof file.linkProps === "string" ? JSON.parse(file.linkProps) : file.linkProps;
|
|
157
|
-
var removeIcon = showRemoveIcon ? /*#__PURE__*/React.createElement(_Icon, {
|
|
157
|
+
var removeIcon = showRemoveIcon ? ( /*#__PURE__*/React.createElement(_Icon, {
|
|
158
158
|
type: "delete",
|
|
159
159
|
title: locale.removeFile,
|
|
160
160
|
onClick: function onClick() {
|
|
161
161
|
return _this.handleClose(file);
|
|
162
162
|
}
|
|
163
|
-
}) : null;
|
|
164
|
-
var downloadIcon = showDownloadIcon && file.status === "done" ? /*#__PURE__*/React.createElement(_Icon, {
|
|
163
|
+
})) : null;
|
|
164
|
+
var downloadIcon = showDownloadIcon && file.status === "done" ? ( /*#__PURE__*/React.createElement(_Icon, {
|
|
165
165
|
type: "download",
|
|
166
166
|
title: locale.downloadFile,
|
|
167
167
|
onClick: function onClick() {
|
|
168
168
|
return _this.handleDownload(file);
|
|
169
169
|
}
|
|
170
|
-
}) : null;
|
|
171
|
-
var downloadOrDelete = listType !== "picture-card" && /*#__PURE__*/React.createElement("span", {
|
|
170
|
+
})) : null;
|
|
171
|
+
var downloadOrDelete = listType !== "picture-card" && ( /*#__PURE__*/React.createElement("span", {
|
|
172
172
|
key: "download-delete",
|
|
173
173
|
className: "".concat(prefixCls, "-list-item-card-actions ").concat(listType === "picture" ? "picture" : "")
|
|
174
174
|
}, downloadIcon && /*#__PURE__*/React.createElement("a", {
|
|
175
175
|
title: locale.downloadFile
|
|
176
|
-
}, downloadIcon), file.status === "error" && /*#__PURE__*/React.createElement("a", {
|
|
176
|
+
}, downloadIcon), file.status === "error" && ( /*#__PURE__*/React.createElement("a", {
|
|
177
177
|
onClick: function onClick() {
|
|
178
178
|
_this.props.reUpload(file);
|
|
179
179
|
}
|
|
180
180
|
}, /*#__PURE__*/React.createElement(_Icon, {
|
|
181
181
|
type: "reload"
|
|
182
|
-
})), removeIcon && /*#__PURE__*/React.createElement("a", {
|
|
182
|
+
}))), removeIcon && ( /*#__PURE__*/React.createElement("a", {
|
|
183
183
|
title: locale.removeFile,
|
|
184
184
|
className: "".concat(prefixCls, "-list-item-card-actions-delete ")
|
|
185
|
-
}, removeIcon));
|
|
185
|
+
}, removeIcon))));
|
|
186
186
|
var listItemNameClass = classNames(_defineProperty(_defineProperty({}, "".concat(prefixCls, "-list-item-name"), true), "".concat(prefixCls, "-list-item-name-icon-count-").concat([downloadIcon, removeIcon].filter(function (x) {
|
|
187
187
|
return x;
|
|
188
188
|
}).length), true));
|
|
@@ -209,7 +209,7 @@ var IUploadList = /*#__PURE__*/function (_React$Component) {
|
|
|
209
209
|
pointerEvents: "none",
|
|
210
210
|
opacity: 0.5
|
|
211
211
|
};
|
|
212
|
-
var previewIcon = showPreviewIcon ? /*#__PURE__*/React.createElement("a", {
|
|
212
|
+
var previewIcon = showPreviewIcon ? ( /*#__PURE__*/React.createElement("a", {
|
|
213
213
|
href: file.url || file.thumbUrl,
|
|
214
214
|
target: "_blank",
|
|
215
215
|
rel: "noopener noreferrer",
|
|
@@ -220,16 +220,16 @@ var IUploadList = /*#__PURE__*/function (_React$Component) {
|
|
|
220
220
|
title: locale.previewFile
|
|
221
221
|
}, /*#__PURE__*/React.createElement(_Icon, {
|
|
222
222
|
type: "eye-o"
|
|
223
|
-
})) : null;
|
|
224
|
-
var actions = listType === "picture-card" && file.status !== "uploading" && /*#__PURE__*/React.createElement("span", {
|
|
223
|
+
}))) : null;
|
|
224
|
+
var actions = listType === "picture-card" && file.status !== "uploading" && ( /*#__PURE__*/React.createElement("span", {
|
|
225
225
|
className: "".concat(prefixCls, "-list-item-actions")
|
|
226
|
-
}, previewIcon, file.status === "done" && downloadIcon, file.status === "error" && /*#__PURE__*/React.createElement("a", {
|
|
226
|
+
}, previewIcon, file.status === "done" && downloadIcon, file.status === "error" && ( /*#__PURE__*/React.createElement("a", {
|
|
227
227
|
onClick: function onClick() {
|
|
228
228
|
_this.props.reUpload(file);
|
|
229
229
|
}
|
|
230
230
|
}, /*#__PURE__*/React.createElement(_Icon, {
|
|
231
231
|
type: "reload"
|
|
232
|
-
})), removeIcon);
|
|
232
|
+
}))), removeIcon));
|
|
233
233
|
var message;
|
|
234
234
|
if (file.response && typeof file.response === "string") {
|
|
235
235
|
message = file.response;
|
|
@@ -245,7 +245,7 @@ var IUploadList = /*#__PURE__*/function (_React$Component) {
|
|
|
245
245
|
className: classNames("cw-upload-drag-wrapper", {
|
|
246
246
|
"cw-upload-drag-wrapper-custom": (errorMessage || successMessage) && !isCustomErrorMessage
|
|
247
247
|
})
|
|
248
|
-
}, file.status === "error" && isCustomErrorMessage && /*#__PURE__*/React.createElement("div", {
|
|
248
|
+
}, file.status === "error" && isCustomErrorMessage && ( /*#__PURE__*/React.createElement("div", {
|
|
249
249
|
className: classNames("cw-upload-drag-custom-box-wrapper", {
|
|
250
250
|
"cw-upload-drag-custom-box-wrapper-disabled": disabled
|
|
251
251
|
})
|
|
@@ -279,7 +279,7 @@ var IUploadList = /*#__PURE__*/function (_React$Component) {
|
|
|
279
279
|
onDownloadExceptionReport(file);
|
|
280
280
|
}
|
|
281
281
|
}
|
|
282
|
-
}, operateTitle.downloadExceptionReportTitle))), file.status === "error" && errorMessage && !isCustomErrorMessage, file.status === "error" && !errorMessage && !isCustomErrorMessage && /*#__PURE__*/React.createElement("div", {
|
|
282
|
+
}, operateTitle.downloadExceptionReportTitle)))), file.status === "error" && errorMessage && !isCustomErrorMessage, file.status === "error" && !errorMessage && !isCustomErrorMessage && ( /*#__PURE__*/React.createElement("div", {
|
|
283
283
|
className: "".concat(prefixCls, "-one-drag-uploading")
|
|
284
284
|
}, /*#__PURE__*/React.createElement("div", {
|
|
285
285
|
className: "".concat(prefixCls, "-one-drag-icon-wrapper")
|
|
@@ -287,7 +287,7 @@ var IUploadList = /*#__PURE__*/function (_React$Component) {
|
|
|
287
287
|
type: "reload"
|
|
288
288
|
})), /*#__PURE__*/React.createElement("div", {
|
|
289
289
|
className: "".concat(prefixCls, "-one-drag-error")
|
|
290
|
-
}, formatMessage(localeObj["reUpload"]))), file.status === "done" && successMessage, (file.status === "done" && !successMessage || file.status == "removed" || !file.status) && /*#__PURE__*/React.createElement("div", {
|
|
290
|
+
}, formatMessage(localeObj["reUpload"])))), file.status === "done" && successMessage, (file.status === "done" && !successMessage || file.status == "removed" || !file.status) && ( /*#__PURE__*/React.createElement("div", {
|
|
291
291
|
className: "".concat(prefixCls, "-one-drag-uploading")
|
|
292
292
|
}, /*#__PURE__*/React.createElement("div", {
|
|
293
293
|
className: listItemNameClass,
|
|
@@ -345,7 +345,7 @@ var IUploadList = /*#__PURE__*/function (_React$Component) {
|
|
|
345
345
|
fontSize: "16px",
|
|
346
346
|
marginRight: "4px"
|
|
347
347
|
}
|
|
348
|
-
}), formatMessage(localeObj["delete"])))), file.status === "uploading" && /*#__PURE__*/React.createElement("div", {
|
|
348
|
+
}), formatMessage(localeObj["delete"]))))), file.status === "uploading" && ( /*#__PURE__*/React.createElement("div", {
|
|
349
349
|
className: "".concat(prefixCls, "-one-drag-uploading"),
|
|
350
350
|
style: {
|
|
351
351
|
height: "76px",
|
|
@@ -357,7 +357,7 @@ var IUploadList = /*#__PURE__*/function (_React$Component) {
|
|
|
357
357
|
}, /*#__PURE__*/React.createElement("div", null, file.name), /*#__PURE__*/React.createElement(Animate, {
|
|
358
358
|
transitionName: "fade",
|
|
359
359
|
component: ""
|
|
360
|
-
}, progress)));
|
|
360
|
+
}, progress))));
|
|
361
361
|
var dom = /*#__PURE__*/React.createElement(DragList, {
|
|
362
362
|
key: file.uid,
|
|
363
363
|
option: file,
|
|
@@ -377,9 +377,9 @@ var IUploadList = /*#__PURE__*/function (_React$Component) {
|
|
|
377
377
|
return /*#__PURE__*/React.createElement("div", {
|
|
378
378
|
key: file.uid,
|
|
379
379
|
className: listContainerNameClass
|
|
380
|
-
}, file.status === "error" ? renderMethod ? /*#__PURE__*/React.createElement("div", null, dragDom) : /*#__PURE__*/React.createElement(_Tooltip, {
|
|
380
|
+
}, file.status === "error" ? renderMethod ? ( /*#__PURE__*/React.createElement("div", null, dragDom)) : ( /*#__PURE__*/React.createElement(_Tooltip, {
|
|
381
381
|
title: message
|
|
382
|
-
}, dom) : /*#__PURE__*/React.createElement("span", null, renderMethod ? dragDom : dom));
|
|
382
|
+
}, dom)) : ( /*#__PURE__*/React.createElement("span", null, renderMethod ? dragDom : dom)));
|
|
383
383
|
});
|
|
384
384
|
var listClassNames = classNames(_defineProperty(_defineProperty(_defineProperty({}, "".concat(prefixCls, "-list"), true), "".concat(prefixCls, "-list-").concat(listType), true), "".concat(prefixCls, "-list-").concat(_this.props.type), true));
|
|
385
385
|
var animationDirection = listType === "picture-card" ? "animate-inline" : "animate";
|
package/lib/CardSelect/index.js
CHANGED
package/lib/ChangeIcon/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "@chaoswise/ui/lib/Tooltip/index.less";
|
|
2
2
|
import _Tooltip from "@chaoswise/ui/lib/Tooltip";
|
|
3
|
-
import _Icon from "@chaoswise/ui/lib/
|
|
3
|
+
import _Icon from "@chaoswise/ui/lib/Icon";
|
|
4
4
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
5
5
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
6
6
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
package/lib/Checkbox/Checkbox.js
CHANGED
|
@@ -16,8 +16,8 @@ function _assertThisInitialized(self) { if (self === void 0) { throw new Referen
|
|
|
16
16
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
17
17
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
18
18
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
19
|
-
function _toPropertyKey(
|
|
20
|
-
function _toPrimitive(
|
|
19
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
20
|
+
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); }
|
|
21
21
|
import React, { Component } from "react";
|
|
22
22
|
import RcCheckbox from "rc-checkbox";
|
|
23
23
|
import classNames from "classnames";
|
package/lib/Checkbox/Group.js
CHANGED
|
@@ -20,8 +20,8 @@ function _assertThisInitialized(self) { if (self === void 0) { throw new Referen
|
|
|
20
20
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
21
21
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
22
22
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
23
|
-
function _toPropertyKey(
|
|
24
|
-
function _toPrimitive(
|
|
23
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
24
|
+
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); }
|
|
25
25
|
import React, { Component } from "react";
|
|
26
26
|
import PropTypes from "prop-types";
|
|
27
27
|
import { polyfill } from "react-lifecycles-compat";
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
@collapse-prefix-cls: ~'@{ant-prefix}-collapse';
|
|
2
|
+
|
|
3
|
+
.@{collapse-prefix-cls} {
|
|
4
|
+
|
|
5
|
+
background-color: @collapse-header-bg;
|
|
6
|
+
border: @border-width-base @border-style-base @border-color-base;
|
|
7
|
+
border-bottom: 0;
|
|
8
|
+
border-radius: @collapse-panel-border-radius;
|
|
9
|
+
|
|
10
|
+
& > &-item {
|
|
11
|
+
border-bottom: @border-width-base @border-style-base @border-color-base;
|
|
12
|
+
|
|
13
|
+
&:last-child {
|
|
14
|
+
&,
|
|
15
|
+
& > .@{collapse-prefix-cls}-header {
|
|
16
|
+
border-radius: 0 0 @collapse-panel-border-radius @collapse-panel-border-radius;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
> .@{collapse-prefix-cls}-header {
|
|
21
|
+
position: relative;
|
|
22
|
+
padding: @collapse-header-padding;
|
|
23
|
+
padding-left: @collapse-header-padding-extra;
|
|
24
|
+
color: @heading-color;
|
|
25
|
+
line-height: 22px;
|
|
26
|
+
cursor: pointer;
|
|
27
|
+
transition: all 0.3s;
|
|
28
|
+
|
|
29
|
+
.@{collapse-prefix-cls}-arrow {
|
|
30
|
+
|
|
31
|
+
position: absolute;
|
|
32
|
+
top: 50%;
|
|
33
|
+
left: @padding-md + 8px; // ui规范
|
|
34
|
+
display: inline-block;
|
|
35
|
+
font-size: @font-size-sm;
|
|
36
|
+
transform: translateY(-50%);
|
|
37
|
+
|
|
38
|
+
& svg {
|
|
39
|
+
transition: transform 0.24s;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.@{collapse-prefix-cls}-extra {
|
|
44
|
+
float: right;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
&:focus {
|
|
48
|
+
outline: none;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
&.@{collapse-prefix-cls}-no-arrow {
|
|
53
|
+
> .@{collapse-prefix-cls}-header {
|
|
54
|
+
padding-left: 12px;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
// Expand Icon right
|
|
60
|
+
&-icon-position-right {
|
|
61
|
+
& > .@{collapse-prefix-cls}-item {
|
|
62
|
+
> .@{collapse-prefix-cls}-header {
|
|
63
|
+
padding: @collapse-header-padding;
|
|
64
|
+
padding-right: @collapse-header-padding-extra;
|
|
65
|
+
|
|
66
|
+
.@{collapse-prefix-cls}-arrow {
|
|
67
|
+
right: @padding-md + 8px; // ui规范
|
|
68
|
+
left: auto;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
&-anim-active {
|
|
75
|
+
transition: height 0.2s @ease-out;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
&-content {
|
|
79
|
+
overflow: hidden;
|
|
80
|
+
color: @text-color;
|
|
81
|
+
background-color: @collapse-content-bg;
|
|
82
|
+
border-top: @border-width-base @border-style-base @border-color-base;
|
|
83
|
+
|
|
84
|
+
& > &-box {
|
|
85
|
+
padding: @collapse-content-padding;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
&-inactive {
|
|
89
|
+
display: none;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
&-item:last-child {
|
|
94
|
+
> .@{collapse-prefix-cls}-content {
|
|
95
|
+
border-radius: 0 0 @collapse-panel-border-radius @collapse-panel-border-radius;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
&-borderless {
|
|
100
|
+
background-color: @collapse-header-bg;
|
|
101
|
+
border: 0;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
&-borderless > &-item {
|
|
105
|
+
border-bottom: @border-width-base @border-style-base @border-color-base;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
&-borderless > &-item:last-child,
|
|
109
|
+
&-borderless > &-item:last-child &-header {
|
|
110
|
+
border-radius: 0;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
&-borderless > &-item > &-content {
|
|
114
|
+
background-color: transparent;
|
|
115
|
+
border-top: 0;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
&-borderless > &-item > &-content > &-content-box {
|
|
119
|
+
padding-top: 4px;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
& &-item-disabled > &-header {
|
|
123
|
+
&,
|
|
124
|
+
& > .arrow {
|
|
125
|
+
color: @disabled-color;
|
|
126
|
+
cursor: not-allowed;
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
}
|
package/lib/Col/index.js
ADDED
package/lib/Collapse/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "antd/es/collapse/style";
|
|
2
2
|
import _Collapse from "antd/es/collapse";
|
|
3
|
-
import _Icon from "@chaoswise/ui/lib/
|
|
3
|
+
import _Icon from "@chaoswise/ui/lib/Icon";
|
|
4
4
|
var _excluded = ["size", "expandIcon", "bordered", "className", "expandIconPosition", "ghost", "isHasBackground"];
|
|
5
5
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
6
6
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|