@chaoswise/ui 3.1.16 → 3.1.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/Antd5/_util/isNumeric.js +4 -0
- package/lib/Antd5/avatar/group.js +121 -0
- package/lib/Antd5/button/LoadingIcon.js +82 -0
- package/lib/Antd5/pagination/Select.js +24 -0
- package/lib/BasicLayout/locale/en_US.js +4 -0
- package/lib/BasicLayout/locale/index.js +11 -0
- package/lib/BasicLayout/locale/zh_CN.js +4 -0
- package/lib/BasicLayout/locale/zh_TW.js +4 -0
- package/lib/CWColorPicker/index.js +44 -44
- package/lib/CWMessage/MessageContent/TabList/index.js +13 -13
- package/lib/CWMessage/MessageContent/index.js +24 -24
- package/lib/CWRangePicker/DropdownMenu/MoreHistoryList/index.js +7 -7
- package/lib/CWRangePicker/DropdownMenu/MoreTimeList/index.js +14 -14
- package/lib/CWRangePicker/DropdownMenu/index.js +34 -34
- package/lib/CWRangePicker/Refresh/index.js +12 -12
- package/lib/CWRangePicker/TimeSpan/index.js +14 -14
- package/lib/CWRangePicker/index.js +56 -56
- package/lib/CWRangePicker/utils/generate/dayjs.js +110 -93
- package/lib/CWRangePicker/utils/generate/moment.js +99 -82
- package/lib/CWTable/assets/DownGraySvg.js +16 -0
- package/lib/CWTable/assets/DownLightSvg.js +16 -0
- package/lib/CWTable/assets/SortSvg.js +16 -0
- package/lib/CWTable/assets/SortingSvg.js +16 -0
- package/lib/CWTable/assets/UpGraySvg.js +15 -0
- package/lib/CWTable/assets/UpLightSvg.js +15 -0
- package/lib/CWTree/locale/en_US.js +3 -0
- package/lib/CWTree/locale/index.js +11 -0
- package/lib/CWTree/locale/zh_CN.js +3 -0
- package/lib/CWTree/locale/zh_TW.js +3 -0
- package/lib/ConfigProvider/ConfigProvider.js +6 -0
- package/lib/ConfigProvider/generate/dayjs.js +4 -0
- package/lib/Empty/index.js +10 -10
- package/lib/ErrorBoundary/ErrorPage.js +10 -10
- package/lib/Exception/index.js +22 -22
- package/lib/FilterDropDown/index.js +19 -19
- package/lib/Header/Document/index.js +5 -5
- package/lib/IconSelect/components/CustomImg/index.js +10 -10
- package/lib/IconSelect/components/SearchIcon/index.js +8 -8
- package/lib/IconSelect/index.js +16 -16
- package/lib/Joyride/List.js +11 -11
- package/lib/Joyride/index.js +55 -55
- package/lib/Pagination/index.js +34 -34
- package/lib/QuickTransfer/DragList.js +15 -15
- package/lib/QuickTransfer/index.js +59 -59
- package/lib/RangePicker/components/ExtraTimeFooter.js +1 -1
- package/lib/SearchBar/index.js +40 -40
- package/lib/TimeRangeSlider/Refresh/index.js +11 -11
- package/lib/TimeRangeSlider/TimeSpan/index.js +13 -13
- package/lib/TimeRangeSlider/index.js +32 -32
- package/lib/TimeRangeSlider/utils/generate/moment.js +106 -89
- package/lib/locales/en_US.json +1 -86
- package/lib/locales/index.js +11 -0
- package/lib/locales/ja_JP.json +1 -0
- package/lib/locales/zh_CN.json +1 -86
- package/lib/locales/zh_TW.json +1 -86
- package/package.json +2 -1
- /package/lib/Antd5/avatar/{Avatar.js → avatar.js} +0 -0
|
@@ -19,21 +19,21 @@ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r)
|
|
|
19
19
|
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
20
20
|
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; } }
|
|
21
21
|
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
22
|
-
import React, { useState, useEffect } from
|
|
23
|
-
import Pagination from
|
|
24
|
-
import { RightOutlined } from
|
|
25
|
-
import { getMessageTypeApi, getMessageListApi, getMessageUnreadCountApi } from
|
|
26
|
-
import TabList from
|
|
27
|
-
import { useHistory } from
|
|
28
|
-
import { useTheme } from
|
|
29
|
-
import { useIntl } from
|
|
22
|
+
import React, { useState, useEffect } from 'react';
|
|
23
|
+
import Pagination from '../../Antd5/pagination';
|
|
24
|
+
import { RightOutlined } from '@ant-design/icons';
|
|
25
|
+
import { getMessageTypeApi, getMessageListApi, getMessageUnreadCountApi } from '../service';
|
|
26
|
+
import TabList from './TabList';
|
|
27
|
+
import { useHistory } from 'react-router-dom';
|
|
28
|
+
import { useTheme } from '../../antd-style';
|
|
29
|
+
import { useIntl } from '../../locales';
|
|
30
30
|
var TabPane = _Tabs.TabPane;
|
|
31
31
|
var localOptionsMap = {
|
|
32
|
-
en:
|
|
33
|
-
en_US:
|
|
34
|
-
zh_TW:
|
|
35
|
-
zh:
|
|
36
|
-
zh_CN:
|
|
32
|
+
en: 'enName',
|
|
33
|
+
en_US: 'enName',
|
|
34
|
+
zh_TW: 'name',
|
|
35
|
+
zh: 'name',
|
|
36
|
+
zh_CN: 'name'
|
|
37
37
|
};
|
|
38
38
|
var MessageContent = function MessageContent(props) {
|
|
39
39
|
var hideOnSinglePage = props.hideOnSinglePage,
|
|
@@ -89,7 +89,7 @@ var MessageContent = function MessageContent(props) {
|
|
|
89
89
|
return resRequestApi(gatewayPrefix);
|
|
90
90
|
case 1:
|
|
91
91
|
res = _context.v;
|
|
92
|
-
if (res && res.status ==
|
|
92
|
+
if (res && res.status == 'success') {
|
|
93
93
|
data = res.data;
|
|
94
94
|
setTabOption(data);
|
|
95
95
|
params = {
|
|
@@ -106,7 +106,7 @@ var MessageContent = function MessageContent(props) {
|
|
|
106
106
|
}, []);
|
|
107
107
|
var _ref2 = (intl === null || intl === void 0 ? void 0 : intl.options) || {},
|
|
108
108
|
_ref2$currentLocale = _ref2.currentLocale,
|
|
109
|
-
locale = _ref2$currentLocale === void 0 ?
|
|
109
|
+
locale = _ref2$currentLocale === void 0 ? 'zh_CN' : _ref2$currentLocale;
|
|
110
110
|
// 查询消息列表(接口)
|
|
111
111
|
var getMessageList = /*#__PURE__*/function () {
|
|
112
112
|
var _ref3 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee2(params) {
|
|
@@ -121,7 +121,7 @@ var MessageContent = function MessageContent(props) {
|
|
|
121
121
|
return resRequestApi(conditionsRef.current, gatewayPrefix);
|
|
122
122
|
case 1:
|
|
123
123
|
res = _context2.v;
|
|
124
|
-
if (res && res.status ==
|
|
124
|
+
if (res && res.status == 'success') {
|
|
125
125
|
_res$data = res.data, _total = _res$data.total, _res$data$records = _res$data.records, records = _res$data$records === void 0 ? [] : _res$data$records;
|
|
126
126
|
setDataSource(records);
|
|
127
127
|
setTotal(_total);
|
|
@@ -148,7 +148,7 @@ var MessageContent = function MessageContent(props) {
|
|
|
148
148
|
return resRequestApi(gatewayPrefix);
|
|
149
149
|
case 1:
|
|
150
150
|
res = _context3.v;
|
|
151
|
-
if (res && res.status ==
|
|
151
|
+
if (res && res.status == 'success') {
|
|
152
152
|
_res$data$byType = res.data.byType, byType = _res$data$byType === void 0 ? {} : _res$data$byType;
|
|
153
153
|
_unreadTypeArr = Object.keys(byType || {});
|
|
154
154
|
setUnreadTypeArr(_unreadTypeArr);
|
|
@@ -181,7 +181,7 @@ var MessageContent = function MessageContent(props) {
|
|
|
181
181
|
var onHandleMore = function onHandleMore(data) {
|
|
182
182
|
setVisible(false);
|
|
183
183
|
if (!hasOnTabMore) {
|
|
184
|
-
history.push(
|
|
184
|
+
history.push('/douc/message-list/unread');
|
|
185
185
|
}
|
|
186
186
|
onTabMore(data);
|
|
187
187
|
};
|
|
@@ -209,7 +209,7 @@ var MessageContent = function MessageContent(props) {
|
|
|
209
209
|
showSizeChanger: false
|
|
210
210
|
};
|
|
211
211
|
};
|
|
212
|
-
var emptyDescription = intl.get(
|
|
212
|
+
var emptyDescription = intl.get('fcdcd88b-3db8-4216-a93a-ab79d854408d').d('暂无新消息');
|
|
213
213
|
return /*#__PURE__*/React.createElement("div", {
|
|
214
214
|
className: "".concat(messagePrefixCls, "-content")
|
|
215
215
|
}, tabOption.length ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_Tabs, {
|
|
@@ -218,10 +218,10 @@ var MessageContent = function MessageContent(props) {
|
|
|
218
218
|
animated: false
|
|
219
219
|
}, tabOption.map(function (item) {
|
|
220
220
|
var tabName = item[localOptionsMap[locale]];
|
|
221
|
-
var moreTitle = intl.get(
|
|
221
|
+
var moreTitle = intl.get('a30db643-5238-42bc-bc5e-98a9d0c7df51').d('更多');
|
|
222
222
|
return /*#__PURE__*/React.createElement(TabPane, {
|
|
223
223
|
tab: unreadTypeArr.includes(item.code) ? /*#__PURE__*/React.createElement(_Badge, {
|
|
224
|
-
color: token[
|
|
224
|
+
color: token['colorErrorHover'],
|
|
225
225
|
dot: true
|
|
226
226
|
}, tabName) : tabName,
|
|
227
227
|
key: item.code
|
|
@@ -253,14 +253,14 @@ var MessageContent = function MessageContent(props) {
|
|
|
253
253
|
className: "".concat(messagePrefixCls, "-content-tabs-more-text")
|
|
254
254
|
}, moreTitle), /*#__PURE__*/React.createElement(RightOutlined, {
|
|
255
255
|
style: {
|
|
256
|
-
color: token[
|
|
256
|
+
color: token['colorTextTertiary']
|
|
257
257
|
}
|
|
258
258
|
})));
|
|
259
259
|
})), total == 0 || hideOnSinglePage && total <= pageInfo.pageSize ? null : /*#__PURE__*/React.createElement("div", {
|
|
260
260
|
className: "".concat(messagePrefixCls, "-pagination-wrapper")
|
|
261
|
-
}, /*#__PURE__*/React.createElement("span", null, intl.get(
|
|
261
|
+
}, /*#__PURE__*/React.createElement("span", null, intl.get('76876ab3-65b9-4df8-a5f7-70b62017ffba', {
|
|
262
262
|
total: total
|
|
263
|
-
}).d(
|
|
263
|
+
}).d('共{total}条}')), /*#__PURE__*/React.createElement(Pagination, _extends({
|
|
264
264
|
simple: true
|
|
265
265
|
}, getPaginationOption())))) : /*#__PURE__*/React.createElement(_Empty, {
|
|
266
266
|
description: emptyDescription
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _Tag from "@chaoswise/ui/lib/Tag";
|
|
2
|
-
import React from
|
|
3
|
-
import { DeleteOutlined } from
|
|
4
|
-
import { useIntl } from
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { DeleteOutlined } from '@ant-design/icons';
|
|
4
|
+
import { useIntl } from '../../../locales';
|
|
5
5
|
export default function MoreHistoryList(props) {
|
|
6
6
|
var historyList = props.historyList,
|
|
7
7
|
onClickTag = props.onClickTag,
|
|
@@ -12,13 +12,13 @@ export default function MoreHistoryList(props) {
|
|
|
12
12
|
className: "cw-dropdown-menu-history-popup-more-wrapper"
|
|
13
13
|
}, /*#__PURE__*/React.createElement("div", {
|
|
14
14
|
className: "cw-dropdown-menu-history-popup-more-header"
|
|
15
|
-
}, /*#__PURE__*/React.createElement("span", null, intl.get(
|
|
15
|
+
}, /*#__PURE__*/React.createElement("span", null, intl.get('294afc43-e2de-4d72-ba99-1f25d6f7a1d7').d('历史记录')), /*#__PURE__*/React.createElement("div", {
|
|
16
16
|
onClick: onCloseAllTag
|
|
17
17
|
}, /*#__PURE__*/React.createElement(DeleteOutlined, null), /*#__PURE__*/React.createElement("span", {
|
|
18
18
|
style: {
|
|
19
|
-
marginLeft:
|
|
19
|
+
marginLeft: '4px'
|
|
20
20
|
}
|
|
21
|
-
}, intl.get(
|
|
21
|
+
}, intl.get('53e957d9-8aee-4322-a144-31d4cff11c9f').d('清空')))), /*#__PURE__*/React.createElement("div", {
|
|
22
22
|
className: "cw-dropdown-menu-history-popup-more-content"
|
|
23
23
|
}, historyList.map(function (tag) {
|
|
24
24
|
return /*#__PURE__*/React.createElement(_Tag, {
|
|
@@ -30,7 +30,7 @@ export default function MoreHistoryList(props) {
|
|
|
30
30
|
onClick: function onClick(e) {
|
|
31
31
|
return onClickTag(e, tag);
|
|
32
32
|
},
|
|
33
|
-
type:
|
|
33
|
+
type: 'custom_type01',
|
|
34
34
|
className: "cw-dropdown-menu-history-popup-more-content-tag-title"
|
|
35
35
|
}, tag.title);
|
|
36
36
|
})));
|
|
@@ -1,40 +1,40 @@
|
|
|
1
1
|
import _Row from "@chaoswise/ui/lib/Row";
|
|
2
2
|
import _Col from "@chaoswise/ui/lib/Col";
|
|
3
3
|
import _TooltipText from "@chaoswise/ui/lib/TooltipText";
|
|
4
|
-
import React from
|
|
5
|
-
import classnames from
|
|
6
|
-
import { useIntl } from
|
|
4
|
+
import React from 'react';
|
|
5
|
+
import classnames from 'classnames';
|
|
6
|
+
import { useIntl } from '../../../locales';
|
|
7
7
|
var MoreTimeList = function MoreTimeList(props) {
|
|
8
8
|
var regroupDataSource = props.regroupDataSource,
|
|
9
9
|
recordDateValue = props.recordDateValue,
|
|
10
10
|
onClickItem = props.onClickItem;
|
|
11
11
|
var intl = useIntl();
|
|
12
12
|
var timeTypeItemLangConfig = {
|
|
13
|
-
recently: intl.get(
|
|
14
|
-
relative: intl.get(
|
|
15
|
-
absolute: intl.get(
|
|
16
|
-
unixTimestamp:
|
|
17
|
-
other: intl.get(
|
|
13
|
+
recently: intl.get('0e9700d5-1df7-43d4-921b-d6fc4a3bb9b8').d('最近'),
|
|
14
|
+
relative: intl.get('41621b6c-711d-4461-8e3f-66b5c355d67c').d('相对'),
|
|
15
|
+
absolute: intl.get('dd9a42ea-9eca-4315-b925-8cc97cacfd41').d('绝对'),
|
|
16
|
+
unixTimestamp: 'Unix',
|
|
17
|
+
other: intl.get('80547f6f-9a34-486f-9bc4-8d5e0af23ae0').d('其他')
|
|
18
18
|
};
|
|
19
19
|
// 点击Menu.Item中切换常规模式
|
|
20
20
|
var onClickMoreItem = function onClickMoreItem(item) {
|
|
21
21
|
onClickItem(item);
|
|
22
22
|
};
|
|
23
23
|
return /*#__PURE__*/React.createElement("div", {
|
|
24
|
-
className: classnames(
|
|
24
|
+
className: classnames('cw-range-picker-popup-more-content')
|
|
25
25
|
}, regroupDataSource.map(function (timeTypeItem, index) {
|
|
26
26
|
return /*#__PURE__*/React.createElement("div", {
|
|
27
27
|
style: {
|
|
28
|
-
padding:
|
|
29
|
-
borderBottom: regroupDataSource.length - 1 !== index ?
|
|
28
|
+
padding: '8px 0',
|
|
29
|
+
borderBottom: regroupDataSource.length - 1 !== index ? '1px solid rgba(0,0,0,0.06)' : ''
|
|
30
30
|
},
|
|
31
31
|
key: timeTypeItem.type
|
|
32
32
|
}, /*#__PURE__*/React.createElement("h3", null, timeTypeItemLangConfig[timeTypeItem.type]), /*#__PURE__*/React.createElement(_Row, null, timeTypeItem.timeList.map(function (item) {
|
|
33
33
|
return /*#__PURE__*/React.createElement(_Col, {
|
|
34
34
|
key: item.key,
|
|
35
|
-
span: timeTypeItem.type ===
|
|
36
|
-
className: classnames(
|
|
37
|
-
|
|
35
|
+
span: timeTypeItem.type === 'absolute' || timeTypeItem.type == 'unixTimestamp' ? 12 : 8,
|
|
36
|
+
className: classnames('more-col-item', {
|
|
37
|
+
'cw-dropdown-menu-item-selected': (recordDateValue === null || recordDateValue === void 0 ? void 0 : recordDateValue.key) === item.key
|
|
38
38
|
}),
|
|
39
39
|
onClick: function onClick() {
|
|
40
40
|
return onClickMoreItem(item);
|
|
@@ -19,19 +19,19 @@ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r)
|
|
|
19
19
|
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
20
20
|
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; } }
|
|
21
21
|
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
22
|
-
import React from
|
|
23
|
-
import { RightOutlined } from
|
|
24
|
-
import classnames from
|
|
25
|
-
import CalendarSvg from
|
|
26
|
-
import Calendar2Svg from
|
|
27
|
-
import LiveSvg from
|
|
28
|
-
import MoreSvg from
|
|
29
|
-
import MoreTimeList from
|
|
30
|
-
import MoreHistoryList from
|
|
31
|
-
import useConfigContext from
|
|
32
|
-
import { judgeType, funcValueChangeArrayValue, getCorrectValue, getHistoryInfo } from
|
|
33
|
-
import { useIntl } from
|
|
34
|
-
import useStyle from
|
|
22
|
+
import React from 'react';
|
|
23
|
+
import { RightOutlined } from '@ant-design/icons';
|
|
24
|
+
import classnames from 'classnames';
|
|
25
|
+
import CalendarSvg from '../assets/Calendar';
|
|
26
|
+
import Calendar2Svg from '../assets/Calendar2';
|
|
27
|
+
import LiveSvg from '../assets/live';
|
|
28
|
+
import MoreSvg from '../assets/more';
|
|
29
|
+
import MoreTimeList from './MoreTimeList';
|
|
30
|
+
import MoreHistoryList from './MoreHistoryList';
|
|
31
|
+
import useConfigContext from '../../useConfigContext';
|
|
32
|
+
import { judgeType, funcValueChangeArrayValue, getCorrectValue, getHistoryInfo } from '../utils/generate/dayjs';
|
|
33
|
+
import { useIntl } from '../../locales';
|
|
34
|
+
import useStyle from './index.style';
|
|
35
35
|
var DropdownMenu = function DropdownMenu(props) {
|
|
36
36
|
var dataSource = props.dataSource,
|
|
37
37
|
regroupDataSource = props.regroupDataSource,
|
|
@@ -58,7 +58,7 @@ var DropdownMenu = function DropdownMenu(props) {
|
|
|
58
58
|
var intl = useIntl();
|
|
59
59
|
var _ref = (intl === null || intl === void 0 ? void 0 : intl.options) || {},
|
|
60
60
|
_ref$currentLocale = _ref.currentLocale,
|
|
61
|
-
locale = _ref$currentLocale === void 0 ?
|
|
61
|
+
locale = _ref$currentLocale === void 0 ? 'zh_CN' : _ref$currentLocale;
|
|
62
62
|
var _timeSpanOption$timeS = timeSpanOption.timeSpanBoundary,
|
|
63
63
|
timeSpanBoundary = _timeSpanOption$timeS === void 0 ? 94608000 : _timeSpanOption$timeS;
|
|
64
64
|
var _menuOption$showCalen = menuOption.showCalendar,
|
|
@@ -70,7 +70,7 @@ var DropdownMenu = function DropdownMenu(props) {
|
|
|
70
70
|
_menuOption$showDefau2 = menuOption.showDefaultHistoryCount,
|
|
71
71
|
showDefaultHistoryCount = _menuOption$showDefau2 === void 0 ? 5 : _menuOption$showDefau2,
|
|
72
72
|
_menuOption$moreHisto = menuOption.moreHistoryDropdownPosition,
|
|
73
|
-
moreHistoryDropdownPosition = _menuOption$moreHisto === void 0 ?
|
|
73
|
+
moreHistoryDropdownPosition = _menuOption$moreHisto === void 0 ? 'left' : _menuOption$moreHisto;
|
|
74
74
|
// 点击Menu.Item中切换选项列表
|
|
75
75
|
var onClickItem = function onClickItem(item) {
|
|
76
76
|
var timeDomain = recordDateValue.timeDomain,
|
|
@@ -152,8 +152,8 @@ var DropdownMenu = function DropdownMenu(props) {
|
|
|
152
152
|
isHasDate = false;
|
|
153
153
|
}
|
|
154
154
|
return /*#__PURE__*/React.createElement("div", {
|
|
155
|
-
className: classnames(
|
|
156
|
-
|
|
155
|
+
className: classnames('cw-dropdown-menu-_item', {
|
|
156
|
+
'cw-dropdown-menu-item-selected': (recordDateValue === null || recordDateValue === void 0 ? void 0 : recordDateValue.key) === item.key
|
|
157
157
|
}),
|
|
158
158
|
key: item.key,
|
|
159
159
|
onClick: function onClick() {
|
|
@@ -163,7 +163,7 @@ var DropdownMenu = function DropdownMenu(props) {
|
|
|
163
163
|
className: "cw-range-picker-prefix-icon"
|
|
164
164
|
}) : /*#__PURE__*/React.createElement(LiveSvg, null), /*#__PURE__*/React.createElement("span", {
|
|
165
165
|
style: {
|
|
166
|
-
marginLeft:
|
|
166
|
+
marginLeft: '4px'
|
|
167
167
|
}
|
|
168
168
|
}, item.render ? item.render(item) : item.title));
|
|
169
169
|
}), (dataSource === null || dataSource === void 0 ? void 0 : dataSource.length) > showDefaultCount && /*#__PURE__*/React.createElement(_Dropdown, {
|
|
@@ -172,28 +172,28 @@ var DropdownMenu = function DropdownMenu(props) {
|
|
|
172
172
|
recordDateValue: recordDateValue,
|
|
173
173
|
onClickItem: onClickItem
|
|
174
174
|
}),
|
|
175
|
-
overlayClassName: classnames(
|
|
176
|
-
|
|
175
|
+
overlayClassName: classnames('cw-dropdown-menu-more-wrapper', {
|
|
176
|
+
'cw-dropdown-menu-more-wrapper-left': moreItemDropdownPosition === 'left'
|
|
177
177
|
}),
|
|
178
178
|
getPopupContainer: function getPopupContainer(triggerNode) {
|
|
179
179
|
return triggerNode;
|
|
180
180
|
}
|
|
181
181
|
}, /*#__PURE__*/React.createElement("div", {
|
|
182
|
-
className: classnames(
|
|
182
|
+
className: classnames('cw-dropdown-menu-_item', 'cw-dropdown-menu-item-more')
|
|
183
183
|
}, /*#__PURE__*/React.createElement("div", {
|
|
184
184
|
style: {
|
|
185
|
-
display:
|
|
186
|
-
alignItems:
|
|
185
|
+
display: 'flex',
|
|
186
|
+
alignItems: 'center'
|
|
187
187
|
}
|
|
188
188
|
}, /*#__PURE__*/React.createElement(MoreSvg, {
|
|
189
189
|
className: "cw-range-picker-prefix-icon"
|
|
190
190
|
}), /*#__PURE__*/React.createElement("span", {
|
|
191
191
|
style: {
|
|
192
|
-
marginLeft:
|
|
192
|
+
marginLeft: '4px'
|
|
193
193
|
}
|
|
194
|
-
}, intl.get(
|
|
195
|
-
className: classnames(
|
|
196
|
-
key:
|
|
194
|
+
}, intl.get('a30db643-5238-42bc-bc5e-98a9d0c7df51').d('更多'))), /*#__PURE__*/React.createElement(RightOutlined, null))), showCalendar && /*#__PURE__*/React.createElement("div", {
|
|
195
|
+
className: classnames('cw-dropdown-menu-_item'),
|
|
196
|
+
key: 'unique-calendar',
|
|
197
197
|
onClick: onClickSelectCalendar
|
|
198
198
|
}, /*#__PURE__*/React.createElement("div", {
|
|
199
199
|
className: "cw-range-picker-menu-item-calendar"
|
|
@@ -201,28 +201,28 @@ var DropdownMenu = function DropdownMenu(props) {
|
|
|
201
201
|
className: "cw-range-picker-prefix-icon"
|
|
202
202
|
})), /*#__PURE__*/React.createElement("span", {
|
|
203
203
|
style: {
|
|
204
|
-
marginLeft:
|
|
204
|
+
marginLeft: '4px'
|
|
205
205
|
}
|
|
206
|
-
}, intl.get(
|
|
206
|
+
}, intl.get('711fdb26-65b9-48da-ba3c-363f5ab8218c').d('日历选择'))), showHistoryList && Boolean(historyList.length) && /*#__PURE__*/React.createElement(_Dropdown, {
|
|
207
207
|
overlay: /*#__PURE__*/React.createElement(MoreHistoryList, {
|
|
208
208
|
historyList: historyList,
|
|
209
209
|
onClickTag: onClickTag,
|
|
210
210
|
onCloseTag: onCloseTag,
|
|
211
211
|
onCloseAllTag: onCloseAllTag
|
|
212
212
|
}),
|
|
213
|
-
overlayClassName: classnames(
|
|
214
|
-
|
|
213
|
+
overlayClassName: classnames('cw-dropdown-menu-history-more-wrapper', {
|
|
214
|
+
'cw-dropdown-menu-history-more-wrapper-left': moreHistoryDropdownPosition === 'left'
|
|
215
215
|
}),
|
|
216
216
|
getPopupContainer: function getPopupContainer(triggerNode) {
|
|
217
217
|
return triggerNode;
|
|
218
218
|
}
|
|
219
219
|
}, /*#__PURE__*/React.createElement("div", {
|
|
220
|
-
className: classnames(
|
|
220
|
+
className: classnames('cw-dropdown-menu-history-outer-wrapper')
|
|
221
221
|
}, /*#__PURE__*/React.createElement("div", {
|
|
222
|
-
className: classnames(
|
|
222
|
+
className: classnames('cw-dropdown-menu-history-wrapper')
|
|
223
223
|
}, /*#__PURE__*/React.createElement("span", {
|
|
224
224
|
className: "cw-dropdown-menu-history-title"
|
|
225
|
-
}, intl.get(
|
|
225
|
+
}, intl.get('294afc43-e2de-4d72-ba99-1f25d6f7a1d7').d('历史记录')), historyList.slice(0, showDefaultHistoryCount).map(function (tag) {
|
|
226
226
|
return /*#__PURE__*/React.createElement(_Tag, {
|
|
227
227
|
type: "custom_type01",
|
|
228
228
|
closable: true,
|
|
@@ -16,15 +16,15 @@ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r)
|
|
|
16
16
|
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
17
17
|
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; } }
|
|
18
18
|
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
19
|
-
import React, { forwardRef, useImperativeHandle } from
|
|
20
|
-
import classnames from
|
|
21
|
-
import Refresh1Svg from
|
|
22
|
-
import Refresh2Svg from
|
|
23
|
-
import Refresh3Svg from
|
|
24
|
-
import { getChangeUnitDate, funcValueChangeArrayValue, getTimeSpanFromValue, computedRecentlyValue, judgeType } from
|
|
25
|
-
import useConfigContext from
|
|
26
|
-
import { useIntl } from
|
|
27
|
-
import useStyle from
|
|
19
|
+
import React, { forwardRef, useImperativeHandle } from 'react';
|
|
20
|
+
import classnames from 'classnames';
|
|
21
|
+
import Refresh1Svg from '../assets/Refresh1';
|
|
22
|
+
import Refresh2Svg from '../assets/Refresh2';
|
|
23
|
+
import Refresh3Svg from '../assets/Refresh3';
|
|
24
|
+
import { getChangeUnitDate, funcValueChangeArrayValue, getTimeSpanFromValue, computedRecentlyValue, judgeType } from '../utils/generate/dayjs';
|
|
25
|
+
import useConfigContext from '../../useConfigContext';
|
|
26
|
+
import { useIntl } from '../../locales';
|
|
27
|
+
import useStyle from './index.style';
|
|
28
28
|
var Refresh = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
29
29
|
var recordDateValue = props.recordDateValue,
|
|
30
30
|
setRecordDateValue = props.setRecordDateValue,
|
|
@@ -147,17 +147,17 @@ var Refresh = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
147
147
|
return wrapCSSVar((showRefresh || showAutoRefresh) && /*#__PURE__*/React.createElement(_Space.Compact, {
|
|
148
148
|
className: classnames(hashId, cssVarCls, "".concat(prefixCls, "-cw-range-picker-refresh-wrapper"))
|
|
149
149
|
}, showRefresh && /*#__PURE__*/React.createElement(_Tooltip, {
|
|
150
|
-
title: intl.get(
|
|
150
|
+
title: intl.get('1d0f3c0c-188f-4f83-bff0-2792dffcdc2d').d('刷新')
|
|
151
151
|
}, /*#__PURE__*/React.createElement(_Button, {
|
|
152
152
|
onClick: onRefresh,
|
|
153
153
|
disabled: isDisabledRefresh
|
|
154
154
|
}, /*#__PURE__*/React.createElement(Refresh1Svg, null))), showAutoRefresh && /*#__PURE__*/React.createElement(_Tooltip, {
|
|
155
|
-
title: intl.get(
|
|
155
|
+
title: intl.get('502d0d23-e942-4ecd-89e4-e85431a3098f').d('自动刷新')
|
|
156
156
|
}, /*#__PURE__*/React.createElement(_Button, {
|
|
157
157
|
onClick: onAutoRefresh,
|
|
158
158
|
disabled: isDisabledAutoRefresh,
|
|
159
159
|
className: classnames({
|
|
160
|
-
|
|
160
|
+
'cw-range-picker-auto-refresh-wrapper': enableAutoRefresh
|
|
161
161
|
})
|
|
162
162
|
}, enableAutoRefresh ? /*#__PURE__*/React.createElement(Refresh3Svg, {
|
|
163
163
|
className: "cw-range-picker-auto-refresh"
|
|
@@ -7,13 +7,13 @@ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r)
|
|
|
7
7
|
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
8
8
|
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; } }
|
|
9
9
|
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
10
|
-
import React from
|
|
11
|
-
import { CaretLeftOutlined, CaretRightOutlined, ZoomInOutlined } from
|
|
12
|
-
import { getChangeDate } from
|
|
13
|
-
import classnames from
|
|
14
|
-
import useConfigContext from
|
|
15
|
-
import { useIntl } from
|
|
16
|
-
import useStyle from
|
|
10
|
+
import React from 'react';
|
|
11
|
+
import { CaretLeftOutlined, CaretRightOutlined, ZoomInOutlined } from '@ant-design/icons';
|
|
12
|
+
import { getChangeDate } from '../utils/generate/dayjs';
|
|
13
|
+
import classnames from 'classnames';
|
|
14
|
+
import useConfigContext from '../../useConfigContext';
|
|
15
|
+
import { useIntl } from '../../locales';
|
|
16
|
+
import useStyle from './index.style';
|
|
17
17
|
_Button.__ANT_BUTTON = true;
|
|
18
18
|
var TimeSpan = function TimeSpan(props) {
|
|
19
19
|
var onChange = props.onChange,
|
|
@@ -50,13 +50,13 @@ var TimeSpan = function TimeSpan(props) {
|
|
|
50
50
|
_timeSpanOption$timeS = timeSpanOption.timeSpanBoundary,
|
|
51
51
|
timeSpanBoundary = _timeSpanOption$timeS === void 0 ? 94608000 : _timeSpanOption$timeS;
|
|
52
52
|
var _tooltipTitleCustom$f = tooltipTitleCustom.forwardTitle,
|
|
53
|
-
forwardTitle = _tooltipTitleCustom$f === void 0 ? intl.get(
|
|
53
|
+
forwardTitle = _tooltipTitleCustom$f === void 0 ? intl.get('df9a3bfb-00df-44cd-9761-87dc21ffc0e8').d('向前平滑') : _tooltipTitleCustom$f,
|
|
54
54
|
_tooltipTitleCustom$b = tooltipTitleCustom.backTitle,
|
|
55
|
-
backTitle = _tooltipTitleCustom$b === void 0 ? intl.get(
|
|
55
|
+
backTitle = _tooltipTitleCustom$b === void 0 ? intl.get('cefeccff-2f9e-4b59-925c-af11c28aa8ed').d('向后平滑') : _tooltipTitleCustom$b,
|
|
56
56
|
_tooltipTitleCustom$e = tooltipTitleCustom.expandTitle,
|
|
57
|
-
expandTitle = _tooltipTitleCustom$e === void 0 ? intl.get(
|
|
57
|
+
expandTitle = _tooltipTitleCustom$e === void 0 ? intl.get('56a89179-5086-4c43-8814-06eac1ba9983', {
|
|
58
58
|
span: growSize
|
|
59
|
-
}).d(
|
|
59
|
+
}).d('按{span}倍增加时间跨度') : _tooltipTitleCustom$e;
|
|
60
60
|
var onChangeTimeSpan = function onChangeTimeSpan(direction) {
|
|
61
61
|
var _getChangeDate = getChangeDate(recordDateValue, direction, growSize, timeSpanBoundary),
|
|
62
62
|
value = _getChangeDate.value,
|
|
@@ -79,14 +79,14 @@ var TimeSpan = function TimeSpan(props) {
|
|
|
79
79
|
}, showForwardBtn && /*#__PURE__*/React.createElement(_Button, {
|
|
80
80
|
icon: forwardIcon ? forwardIcon : /*#__PURE__*/React.createElement(CaretLeftOutlined, null),
|
|
81
81
|
onClick: function onClick() {
|
|
82
|
-
onChangeTimeSpan(
|
|
82
|
+
onChangeTimeSpan('left');
|
|
83
83
|
}
|
|
84
84
|
})), /*#__PURE__*/React.createElement(_Tooltip, {
|
|
85
85
|
title: backTitle
|
|
86
86
|
}, showBackwardBtn && /*#__PURE__*/React.createElement(_Button, {
|
|
87
87
|
icon: backIcon ? backIcon : /*#__PURE__*/React.createElement(CaretRightOutlined, null),
|
|
88
88
|
onClick: function onClick() {
|
|
89
|
-
onChangeTimeSpan(
|
|
89
|
+
onChangeTimeSpan('right');
|
|
90
90
|
},
|
|
91
91
|
disabled: isRightDisabled
|
|
92
92
|
})), showEnlargeBtn && /*#__PURE__*/React.createElement(_Tooltip, {
|
|
@@ -94,7 +94,7 @@ var TimeSpan = function TimeSpan(props) {
|
|
|
94
94
|
}, /*#__PURE__*/React.createElement(_Button, {
|
|
95
95
|
icon: expandIcon ? expandIcon : /*#__PURE__*/React.createElement(ZoomInOutlined, null),
|
|
96
96
|
onClick: function onClick() {
|
|
97
|
-
onChangeTimeSpan(
|
|
97
|
+
onChangeTimeSpan('even');
|
|
98
98
|
},
|
|
99
99
|
disabled: isDisabledEnlargeBtn
|
|
100
100
|
}))));
|