@chaoswise/ui 2.7.12 → 2.8.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/lib/AlgorithmChart/common/chart.option.js +14 -11
- package/lib/AlgorithmChart/index.js +29 -26
- package/lib/Antd4Form/FormItem.js +1 -1
- package/lib/BasicLayout/Nav.js +3 -5
- package/lib/BasicLayout/index.js +6 -7
- package/lib/CWMessage/MessageContent/TabList/index.js +9 -7
- package/lib/CWMessage/MessageContent/index.js +63 -48
- package/lib/CWMessage/index.js +28 -13
- package/lib/CWMessage/service/index.js +14 -14
- package/lib/CWMessage/utils/index.js +18 -11
- package/lib/CWRangePicker/DropdownMenu/MoreHistoryList/index.js +16 -10
- package/lib/CWRangePicker/DropdownMenu/MoreTimeList/index.js +4 -6
- package/lib/CWRangePicker/DropdownMenu/index.js +20 -13
- package/lib/CWRangePicker/Refresh/index.js +4 -7
- package/lib/CWRangePicker/TimeSpan/index.js +6 -9
- package/lib/CWRangePicker/index.js +28 -21
- package/lib/CWRangePicker/utils/index.js +45 -114
- package/lib/CWSelect/index.js +4 -7
- package/lib/CWTable/EditLine.js +5 -8
- package/lib/CWTable/Filter.js +5 -8
- package/lib/CWTable/index.js +3 -0
- package/lib/CWTree/index.js +4 -7
- package/lib/CWUpload/upload/Dragger.js +4 -7
- package/lib/CWUpload/upload/UploadList.js +12 -15
- package/lib/CardSelect/index.js +16 -14
- package/lib/CitySelect/index.js +3 -1
- package/lib/ColorPicker/index.js +4 -7
- package/lib/ConfigProvider/ConfigProvider.js +143 -48
- package/lib/ConfigProvider/Switch.js +10 -2
- package/lib/ConfigProvider/context.js +8 -0
- package/lib/ConfigProvider/useLocale.js +1 -1
- package/lib/DatePicker/useLocale.js +17 -10
- package/lib/DateRangePicker/components/ExtraQuickFooter.js +5 -8
- package/lib/DateRangePicker/index.js +6 -5
- package/lib/DropdownDatePicker/DropdownMenu/MoreTimeList/index.js +4 -6
- package/lib/DropdownDatePicker/DropdownMenu/index.js +4 -7
- package/lib/DropdownDatePicker/index.js +9 -10
- package/lib/DropdownDatePicker/utils/index.js +5 -93
- package/lib/EchartsBar/index.js +1 -1
- package/lib/Empty/index.js +3 -6
- package/lib/ErrorBoundary/ErrorPage.js +8 -9
- package/lib/Exception/index.js +9 -12
- package/lib/FilterDropDown/index.js +3 -6
- package/lib/Flow/tools/index.js +4 -1
- package/lib/Header/Document/index.js +3 -8
- package/lib/Header/LocaleSwitcher.js +2 -0
- package/lib/Header/UserSetting/index.js +27 -45
- package/lib/IconSelect/components/CustomImg/index.js +8 -11
- package/lib/IconSelect/components/SearchIcon/index.js +9 -9
- package/lib/IconSelect/index.js +4 -7
- package/lib/ImagePreview/index.js +3 -1
- package/lib/Joyride/List.js +9 -8
- package/lib/Joyride/index.js +19 -22
- package/lib/Pagination/index.js +14 -14
- package/lib/PolymerizationSearch/DropdownMenu.js +4 -2
- package/lib/Progress/index.js +3 -6
- package/lib/QuickTransfer/DragList.js +3 -6
- package/lib/QuickTransfer/index.js +6 -9
- package/lib/RangePicker/components/ExtraTimeFooter.js +4 -7
- package/lib/SearchBar/index.js +6 -9
- package/lib/SimpleCard/index.js +3 -1
- package/lib/SingleSpa/index.js +10 -4
- package/lib/ThemeProvider/Switcher.js +3 -1
- package/lib/TimeRangeSlider/Refresh/index.js +4 -7
- package/lib/TimeRangeSlider/TimeSpan/index.js +6 -9
- package/lib/TimeRangeSlider/index.js +22 -18
- package/lib/TimeRangeSlider/utils/index.js +20 -100
- package/lib/TimeZoneSelect/index.js +1 -1
- package/lib/TreeSelect111/index.js +3 -6
- package/lib/Upload-back/index.js +27 -25
- package/lib/VerticalLayout/index.js +3 -1
- package/lib/WangEditor/extraLanguage.js +19 -0
- package/lib/WangEditor/index.js +19 -13
- package/lib/WangEditor/messages.js +49 -0
- package/lib/WangEditor/wangEditor.js +47 -20
- package/lib/index.js +1 -0
- package/lib/locales/en_US.json +1 -0
- package/lib/locales/index.js +2 -0
- package/lib/locales/ja_JP.json +1 -0
- package/lib/locales/load.js +48 -0
- package/lib/locales/messages/antd.js +404 -0
- package/lib/locales/messages/editor.js +42 -0
- package/lib/locales/messages/timeRanges.js +36 -0
- package/lib/locales/messages/timeTypes.js +11 -0
- package/lib/locales/runtime.js +127 -0
- package/lib/locales/zh_CN.json +1 -0
- package/lib/locales/zh_HK.json +1 -0
- package/lib/locales/zh_TW.json +1 -0
- package/lib/useIntl/index.js +9 -0
- package/lib/useLocale/index.js +16 -13
- package/lib/utils/index.js +4 -1
- package/package.json +11 -2
- package/lib/Antd4/notification/index.copy.js +0 -301
- package/lib/BasicLayout/locale/en_US.js +0 -4
- package/lib/BasicLayout/locale/index.js +0 -13
- package/lib/BasicLayout/locale/ja_JP.js +0 -4
- package/lib/BasicLayout/locale/zh_CN.js +0 -4
- package/lib/BasicLayout/locale/zh_TW.js +0 -4
- package/lib/CWMessage/locale/en_US.js +0 -8
- package/lib/CWMessage/locale/index.js +0 -13
- package/lib/CWMessage/locale/ja_JP.js +0 -8
- package/lib/CWMessage/locale/zh_CN.js +0 -8
- package/lib/CWMessage/locale/zh_TW.js +0 -8
- package/lib/CWRangePicker/locale/en_US.js +0 -29
- package/lib/CWRangePicker/locale/index.js +0 -13
- package/lib/CWRangePicker/locale/ja_JP.js +0 -29
- package/lib/CWRangePicker/locale/zh_CN.js +0 -29
- package/lib/CWRangePicker/locale/zh_TW.js +0 -29
- package/lib/CWSelect/locale/en_US.js +0 -4
- package/lib/CWSelect/locale/index.js +0 -13
- package/lib/CWSelect/locale/ja_JP.js +0 -4
- package/lib/CWSelect/locale/zh_CN.js +0 -4
- package/lib/CWSelect/locale/zh_TW.js +0 -4
- package/lib/CWTable/locale/en_US.js +0 -6
- package/lib/CWTable/locale/index.js +0 -13
- package/lib/CWTable/locale/ja_JP.js +0 -6
- package/lib/CWTable/locale/zh_CN.js +0 -6
- package/lib/CWTable/locale/zh_TW.js +0 -6
- package/lib/CWTree/locale/en_US.js +0 -3
- package/lib/CWTree/locale/index.js +0 -13
- package/lib/CWTree/locale/ja_JP.js +0 -3
- package/lib/CWTree/locale/zh_CN.js +0 -3
- package/lib/CWTree/locale/zh_TW.js +0 -3
- package/lib/CWUpload/locale/en_US.js +0 -6
- package/lib/CWUpload/locale/index.js +0 -13
- package/lib/CWUpload/locale/ja_JP.js +0 -6
- package/lib/CWUpload/locale/zh_CN.js +0 -6
- package/lib/CWUpload/locale/zh_TW.js +0 -6
- package/lib/ColorPicker/locale/en_US.js +0 -4
- package/lib/ColorPicker/locale/index.js +0 -13
- package/lib/ColorPicker/locale/ja_JP.js +0 -4
- package/lib/ColorPicker/locale/zh_CN.js +0 -4
- package/lib/ColorPicker/locale/zh_TW.js +0 -4
- package/lib/DateRangePicker/locale/en_US.js +0 -5
- package/lib/DateRangePicker/locale/index.js +0 -13
- package/lib/DateRangePicker/locale/ja_JP.js +0 -5
- package/lib/DateRangePicker/locale/zh_CN.js +0 -5
- package/lib/DateRangePicker/locale/zh_TW.js +0 -5
- package/lib/DropdownDatePicker/locale/en_US.js +0 -21
- package/lib/DropdownDatePicker/locale/index.js +0 -13
- package/lib/DropdownDatePicker/locale/ja_JP.js +0 -21
- package/lib/DropdownDatePicker/locale/zh_CN.js +0 -21
- package/lib/DropdownDatePicker/locale/zh_TW.js +0 -21
- package/lib/Empty/locale/en_US.js +0 -3
- package/lib/Empty/locale/index.js +0 -13
- package/lib/Empty/locale/ja_JP.js +0 -3
- package/lib/Empty/locale/zh_CN.js +0 -3
- package/lib/Empty/locale/zh_TW.js +0 -3
- package/lib/ErrorBoundary/index.less +0 -15
- package/lib/ErrorBoundary/locale/en_US.js +0 -5
- package/lib/ErrorBoundary/locale/index.js +0 -13
- package/lib/ErrorBoundary/locale/ja_JP.js +0 -5
- package/lib/ErrorBoundary/locale/zh_CN.js +0 -5
- package/lib/ErrorBoundary/locale/zh_TW.js +0 -5
- package/lib/Exception/locale/en_US.js +0 -9
- package/lib/Exception/locale/index.js +0 -13
- package/lib/Exception/locale/ja_JP.js +0 -9
- package/lib/Exception/locale/zh_CN.js +0 -9
- package/lib/Exception/locale/zh_TW.js +0 -9
- package/lib/FilterDropDown/drag.svg +0 -17
- package/lib/FilterDropDown/locale/en_US.js +0 -3
- package/lib/FilterDropDown/locale/index.js +0 -13
- package/lib/FilterDropDown/locale/ja_JP.js +0 -3
- package/lib/FilterDropDown/locale/zh_CN.js +0 -3
- package/lib/FilterDropDown/locale/zh_TW.js +0 -3
- package/lib/IconSelect/locale/en_US.js +0 -11
- package/lib/IconSelect/locale/index.js +0 -13
- package/lib/IconSelect/locale/ja_JP.js +0 -11
- package/lib/IconSelect/locale/zh_CN.js +0 -11
- package/lib/IconSelect/locale/zh_TW.js +0 -11
- package/lib/Joyride/locale/en_US.js +0 -25
- package/lib/Joyride/locale/index.js +0 -13
- package/lib/Joyride/locale/ja_JP.js +0 -25
- package/lib/Joyride/locale/zh_CN.js +0 -25
- package/lib/Joyride/locale/zh_TW.js +0 -25
- package/lib/Pagination/locale/en_US.js +0 -8
- package/lib/Pagination/locale/index.js +0 -13
- package/lib/Pagination/locale/ja_JP.js +0 -8
- package/lib/Pagination/locale/zh_CN.js +0 -8
- package/lib/Pagination/locale/zh_TW.js +0 -8
- package/lib/Progress/locale/en_US.js +0 -3
- package/lib/Progress/locale/index.js +0 -13
- package/lib/Progress/locale/ja_JP.js +0 -3
- package/lib/Progress/locale/zh_CN.js +0 -3
- package/lib/Progress/locale/zh_TW.js +0 -3
- package/lib/QuickTransfer/CheckList.js +0 -47
- package/lib/QuickTransfer/TopicList.js +0 -152
- package/lib/QuickTransfer/locale/en_US.js +0 -8
- package/lib/QuickTransfer/locale/index.js +0 -13
- package/lib/QuickTransfer/locale/ja_JP.js +0 -8
- package/lib/QuickTransfer/locale/zh_CN.js +0 -8
- package/lib/QuickTransfer/locale/zh_TW.js +0 -8
- package/lib/RangePicker/locale/en_US.js +0 -5
- package/lib/RangePicker/locale/index.js +0 -13
- package/lib/RangePicker/locale/ja_JP.js +0 -5
- package/lib/RangePicker/locale/zh_CN.js +0 -5
- package/lib/RangePicker/locale/zh_TW.js +0 -5
- package/lib/SearchBar/locale/en_US.js +0 -6
- package/lib/SearchBar/locale/index.js +0 -13
- package/lib/SearchBar/locale/ja_JP.js +0 -6
- package/lib/SearchBar/locale/zh_CN.js +0 -6
- package/lib/SearchBar/locale/zh_TW.js +0 -6
- package/lib/TimeRangeSlider/locale/en_US.js +0 -31
- package/lib/TimeRangeSlider/locale/index.js +0 -13
- package/lib/TimeRangeSlider/locale/ja_JP.js +0 -31
- package/lib/TimeRangeSlider/locale/zh_CN.js +0 -31
- package/lib/TimeRangeSlider/locale/zh_TW.js +0 -31
- package/lib/TreeSelect111/locale/en_US.js +0 -3
- package/lib/TreeSelect111/locale/index.js +0 -13
- package/lib/TreeSelect111/locale/ja_JP.js +0 -3
- package/lib/TreeSelect111/locale/zh_CN.js +0 -3
- package/lib/TreeSelect111/locale/zh_TW.js +0 -3
- package/lib/WangEditor/locale/index.js +0 -93
- package/lib/useConfgiContext/index.js +0 -6
package/lib/CWMessage/index.js
CHANGED
|
@@ -6,7 +6,6 @@ import "@chaoswise/ui/lib/Modal/index.less";
|
|
|
6
6
|
import _Modal from "@chaoswise/ui/lib/Modal";
|
|
7
7
|
import "@chaoswise/ui/lib/CustomNotification/index.less";
|
|
8
8
|
import _CustomNotification from "@chaoswise/ui/lib/CustomNotification";
|
|
9
|
-
import _useLocale2 from "@chaoswise/ui/lib/useLocale";
|
|
10
9
|
import _useConfigContext2 from "@chaoswise/ui/lib/useConfigContext";
|
|
11
10
|
var _excluded = ["count"],
|
|
12
11
|
_excluded2 = ["onClickStrongMessageItem"];
|
|
@@ -28,6 +27,8 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
|
|
|
28
27
|
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
29
28
|
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
30
29
|
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
30
|
+
import useIntl from '../useIntl';
|
|
31
|
+
import useConfigLocale from '../ConfigProvider/useLocale';
|
|
31
32
|
import React, { useState, useEffect, useMemo, useRef } from "react";
|
|
32
33
|
import messageIcon from "./message.svg";
|
|
33
34
|
import CommonIcon from "./CommonIcon";
|
|
@@ -37,8 +38,6 @@ import classnames from "classnames";
|
|
|
37
38
|
import PropTypes from "prop-types";
|
|
38
39
|
import io from "socket.io-client";
|
|
39
40
|
import audioMp3 from "./audioMp3.wav";
|
|
40
|
-
import langConfig from "./locale";
|
|
41
|
-
import { formatMessage } from "../utils";
|
|
42
41
|
import "./index.less";
|
|
43
42
|
function Message(props) {
|
|
44
43
|
var _props$hideOnSinglePa = props.hideOnSinglePage,
|
|
@@ -76,8 +75,14 @@ function Message(props) {
|
|
|
76
75
|
var _useConfigContext = _useConfigContext2(),
|
|
77
76
|
getPrefixCls = _useConfigContext.getPrefixCls;
|
|
78
77
|
var prefixCls = getPrefixCls();
|
|
79
|
-
var
|
|
80
|
-
|
|
78
|
+
var intl = useIntl();
|
|
79
|
+
var intlRef = useRef(intl);
|
|
80
|
+
intlRef.current = intl;
|
|
81
|
+
var _useConfigLocale = useConfigLocale(),
|
|
82
|
+
locale = _useConfigLocale.locale;
|
|
83
|
+
// Socket listeners outlive renders; default requests must use the latest language.
|
|
84
|
+
var localeRef = useRef(locale);
|
|
85
|
+
localeRef.current = locale;
|
|
81
86
|
var messageImg = imgOption.messageImg,
|
|
82
87
|
_imgOption$badgeOptio = imgOption.badgeOption,
|
|
83
88
|
badgeOption = _imgOption$badgeOptio === void 0 ? {} : _imgOption$badgeOptio;
|
|
@@ -189,20 +194,22 @@ function Message(props) {
|
|
|
189
194
|
audio.play()["catch"](function (err) {
|
|
190
195
|
var _err$message;
|
|
191
196
|
if ((err === null || err === void 0 ? void 0 : err.name) === "NotAllowedError" && err !== null && err !== void 0 && (_err$message = err.message) !== null && _err$message !== void 0 && _err$message.includes('play() failed')) {
|
|
197
|
+
var _intl = intlRef.current;
|
|
192
198
|
if (!modal.current) {
|
|
193
199
|
modal.current = _Modal.warning({
|
|
194
|
-
title:
|
|
200
|
+
title: _intl.get("de6eaecc-9d39-41f1-82d3-80694c558028").d("消息提醒需要有交互行为才可以自动播放"),
|
|
195
201
|
prefixCls: "".concat(prefixCls, "-modal"),
|
|
196
202
|
okButtonProps: {
|
|
197
203
|
prefixCls: "".concat(prefixCls, "-btn")
|
|
198
204
|
},
|
|
199
|
-
okText:
|
|
205
|
+
okText: _intl.get("4253417c-d699-4eed-8c75-34d2a8b18a68").d("确定"),
|
|
200
206
|
mask: true,
|
|
201
207
|
maskClosable: true
|
|
202
208
|
});
|
|
203
209
|
} else {
|
|
204
|
-
modal.current.update(
|
|
205
|
-
|
|
210
|
+
modal.current.update({
|
|
211
|
+
title: _intl.get("de6eaecc-9d39-41f1-82d3-80694c558028").d("消息提醒需要有交互行为才可以自动播放"),
|
|
212
|
+
okText: _intl.get("4253417c-d699-4eed-8c75-34d2a8b18a68").d("确定")
|
|
206
213
|
});
|
|
207
214
|
}
|
|
208
215
|
}
|
|
@@ -219,7 +226,9 @@ function Message(props) {
|
|
|
219
226
|
userMessageId: id,
|
|
220
227
|
clientType: "BROWSER"
|
|
221
228
|
};
|
|
222
|
-
resRequestApi = _getMessageDetailApi ||
|
|
229
|
+
resRequestApi = _getMessageDetailApi || function (params, gateway) {
|
|
230
|
+
return getMessageDetailApi(params, gateway, localeRef.current);
|
|
231
|
+
};
|
|
223
232
|
_context.n = 1;
|
|
224
233
|
return resRequestApi(params, gatewayPrefix);
|
|
225
234
|
case 1:
|
|
@@ -261,7 +270,9 @@ function Message(props) {
|
|
|
261
270
|
return _regenerator().w(function (_context2) {
|
|
262
271
|
while (1) switch (_context2.n) {
|
|
263
272
|
case 0:
|
|
264
|
-
resRequestApi = _readInnerMessageApi ||
|
|
273
|
+
resRequestApi = _readInnerMessageApi || function (params, gateway) {
|
|
274
|
+
return readInnerMessageApi(params, gateway, localeRef.current);
|
|
275
|
+
};
|
|
265
276
|
resRequestApi(params, gatewayPrefix);
|
|
266
277
|
case 1:
|
|
267
278
|
return _context2.a(2);
|
|
@@ -307,7 +318,9 @@ function Message(props) {
|
|
|
307
318
|
while (1) switch (_context3.n) {
|
|
308
319
|
case 0:
|
|
309
320
|
// 获取sessionId
|
|
310
|
-
resRequestApi = _getSessionId ||
|
|
321
|
+
resRequestApi = _getSessionId || function (gateway) {
|
|
322
|
+
return getSessionId(gateway, localeRef.current);
|
|
323
|
+
};
|
|
311
324
|
_context3.n = 1;
|
|
312
325
|
return resRequestApi(gatewayPrefix);
|
|
313
326
|
case 1:
|
|
@@ -348,7 +361,9 @@ function Message(props) {
|
|
|
348
361
|
return _regenerator().w(function (_context4) {
|
|
349
362
|
while (1) switch (_context4.n) {
|
|
350
363
|
case 0:
|
|
351
|
-
resRequestApi = _getMessageQuerySettingsApi ||
|
|
364
|
+
resRequestApi = _getMessageQuerySettingsApi || function (gateway) {
|
|
365
|
+
return getMessageQuerySettingsApi(gateway, localeRef.current);
|
|
366
|
+
};
|
|
352
367
|
_context4.n = 1;
|
|
353
368
|
return resRequestApi(gatewayPrefix);
|
|
354
369
|
case 1:
|
|
@@ -1,35 +1,35 @@
|
|
|
1
1
|
import { fetchGet, fetchPost } from "../utils";
|
|
2
2
|
|
|
3
3
|
// 用户登录预处理接口
|
|
4
|
-
export var getSessionId = function getSessionId(gateway) {
|
|
5
|
-
return fetchGet("".concat(gateway, "/message/api/v1/tool/getSessionId"));
|
|
4
|
+
export var getSessionId = function getSessionId(gateway, locale) {
|
|
5
|
+
return fetchGet("".concat(gateway, "/message/api/v1/tool/getSessionId"), undefined, locale);
|
|
6
6
|
};
|
|
7
7
|
|
|
8
8
|
// 查询权限对应的tab栏信息
|
|
9
|
-
export var getMessageTypeApi = function getMessageTypeApi(gateway) {
|
|
10
|
-
return fetchGet("".concat(gateway, "/message/api/v1/messageType/list"));
|
|
9
|
+
export var getMessageTypeApi = function getMessageTypeApi(gateway, locale) {
|
|
10
|
+
return fetchGet("".concat(gateway, "/message/api/v1/messageType/list"), undefined, locale);
|
|
11
11
|
};
|
|
12
12
|
|
|
13
13
|
// 查询消息列表
|
|
14
|
-
export var getMessageListApi = function getMessageListApi(params, gateway) {
|
|
15
|
-
return fetchGet("".concat(gateway, "/message/api/v1/innerMessage/page"), params);
|
|
14
|
+
export var getMessageListApi = function getMessageListApi(params, gateway, locale) {
|
|
15
|
+
return fetchGet("".concat(gateway, "/message/api/v1/innerMessage/page"), params, locale);
|
|
16
16
|
};
|
|
17
17
|
|
|
18
18
|
// 已读指定信息
|
|
19
|
-
export var readInnerMessageApi = function readInnerMessageApi(params, gateway) {
|
|
20
|
-
return fetchPost("".concat(gateway, "/message/api/v1/innerMessage/read"), params);
|
|
19
|
+
export var readInnerMessageApi = function readInnerMessageApi(params, gateway, locale) {
|
|
20
|
+
return fetchPost("".concat(gateway, "/message/api/v1/innerMessage/read"), params, locale);
|
|
21
21
|
};
|
|
22
22
|
|
|
23
23
|
// 查询所有类型的未读信息
|
|
24
|
-
export var getMessageUnreadCountApi = function getMessageUnreadCountApi(gateway) {
|
|
25
|
-
return fetchGet("".concat(gateway, "/message/api/v1/innerMessage/unreadCount"));
|
|
24
|
+
export var getMessageUnreadCountApi = function getMessageUnreadCountApi(gateway, locale) {
|
|
25
|
+
return fetchGet("".concat(gateway, "/message/api/v1/innerMessage/unreadCount"), undefined, locale);
|
|
26
26
|
};
|
|
27
27
|
|
|
28
28
|
// 查询消息详情
|
|
29
|
-
export var getMessageDetailApi = function getMessageDetailApi(params, gateway) {
|
|
30
|
-
return fetchGet("".concat(gateway, "/message/api/v1/innerMessage/getDetail"), params);
|
|
29
|
+
export var getMessageDetailApi = function getMessageDetailApi(params, gateway, locale) {
|
|
30
|
+
return fetchGet("".concat(gateway, "/message/api/v1/innerMessage/getDetail"), params, locale);
|
|
31
31
|
};
|
|
32
32
|
// 查询强提醒配置
|
|
33
|
-
export var getMessageQuerySettingsApi = function getMessageQuerySettingsApi(gateway) {
|
|
34
|
-
return fetchGet("".concat(gateway, "/message/api/v1/notice/querySettings"));
|
|
33
|
+
export var getMessageQuerySettingsApi = function getMessageQuerySettingsApi(gateway, locale) {
|
|
34
|
+
return fetchGet("".concat(gateway, "/message/api/v1/notice/querySettings"), undefined, locale);
|
|
35
35
|
};
|
|
@@ -1,12 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
language
|
|
1
|
+
import { normalizeLocale } from '../../locales/runtime';
|
|
2
|
+
|
|
3
|
+
// Forward the current language using company locale codes, without reducing it
|
|
4
|
+
// to Chinese/English. Provider callers take precedence over fresh host storage.
|
|
5
|
+
var getHeaders = function getHeaders(locale) {
|
|
6
|
+
var storage = typeof window === 'undefined' ? null : window.localStorage;
|
|
7
|
+
var language = locale !== undefined ? locale : storage === null || storage === void 0 ? void 0 : storage.getItem('language');
|
|
8
|
+
return {
|
|
9
|
+
withCredentials: true,
|
|
10
|
+
userId: (storage === null || storage === void 0 ? void 0 : storage.getItem('accountUserId')) || '2',
|
|
11
|
+
accountId: (storage === null || storage === void 0 ? void 0 : storage.getItem('accountId')) || '110',
|
|
12
|
+
'Content-Type': 'application/json',
|
|
13
|
+
language: normalizeLocale(language || 'zh_CN')
|
|
14
|
+
};
|
|
8
15
|
};
|
|
9
|
-
export var fetchGet = function fetchGet(url, params) {
|
|
16
|
+
export var fetchGet = function fetchGet(url, params, locale) {
|
|
10
17
|
var str = "";
|
|
11
18
|
if (params) {
|
|
12
19
|
var arr = [];
|
|
@@ -17,16 +24,16 @@ export var fetchGet = function fetchGet(url, params) {
|
|
|
17
24
|
}
|
|
18
25
|
return fetch(url + "?" + str, {
|
|
19
26
|
method: "GET",
|
|
20
|
-
headers:
|
|
27
|
+
headers: getHeaders(locale)
|
|
21
28
|
}).then(function (response) {
|
|
22
29
|
return response.json();
|
|
23
30
|
});
|
|
24
31
|
};
|
|
25
|
-
export var fetchPost = function fetchPost(url, params) {
|
|
32
|
+
export var fetchPost = function fetchPost(url, params, locale) {
|
|
26
33
|
return fetch(url, {
|
|
27
34
|
method: "POST",
|
|
28
35
|
body: JSON.stringify(params),
|
|
29
|
-
headers:
|
|
36
|
+
headers: getHeaders(locale)
|
|
30
37
|
}).then(function (response) {
|
|
31
38
|
return response.json();
|
|
32
39
|
});
|
|
@@ -1,23 +1,26 @@
|
|
|
1
1
|
import "@chaoswise/ui/lib/Tag/index.less";
|
|
2
2
|
import _Tag from "@chaoswise/ui/lib/Tag";
|
|
3
3
|
import _Icon from "@chaoswise/ui/lib/Icon";
|
|
4
|
-
import
|
|
4
|
+
import useIntl from '../../../useIntl';
|
|
5
|
+
import useConfigLocale from '../../../ConfigProvider/useLocale';
|
|
6
|
+
import { getHistoryTitle } from '../../utils';
|
|
5
7
|
import React from "react";
|
|
6
|
-
import langConfig from "../../locale";
|
|
7
|
-
import { formatMessage } from "../../../utils";
|
|
8
8
|
import "./index.less";
|
|
9
9
|
export default function MoreHistoryList(props) {
|
|
10
10
|
var historyList = props.historyList,
|
|
11
11
|
onClickTag = props.onClickTag,
|
|
12
12
|
onCloseTag = props.onCloseTag,
|
|
13
|
-
onCloseAllTag = props.onCloseAllTag
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
onCloseAllTag = props.onCloseAllTag,
|
|
14
|
+
format = props.format,
|
|
15
|
+
timeSpanBoundary = props.timeSpanBoundary;
|
|
16
|
+
var intl = useIntl();
|
|
17
|
+
var _useConfigLocale = useConfigLocale(),
|
|
18
|
+
locale = _useConfigLocale.locale;
|
|
16
19
|
return /*#__PURE__*/React.createElement("div", {
|
|
17
20
|
className: "cw-dropdown-menu-history-popup-more-wrapper"
|
|
18
21
|
}, /*#__PURE__*/React.createElement("div", {
|
|
19
22
|
className: "cw-dropdown-menu-history-popup-more-header"
|
|
20
|
-
}, /*#__PURE__*/React.createElement("span", null,
|
|
23
|
+
}, /*#__PURE__*/React.createElement("span", null, intl.get("294afc43-e2de-4d72-ba99-1f25d6f7a1d7").d("历史记录")), /*#__PURE__*/React.createElement("div", {
|
|
21
24
|
onClick: onCloseAllTag
|
|
22
25
|
}, /*#__PURE__*/React.createElement(_Icon, {
|
|
23
26
|
type: "delete"
|
|
@@ -25,11 +28,11 @@ export default function MoreHistoryList(props) {
|
|
|
25
28
|
style: {
|
|
26
29
|
marginLeft: "4px"
|
|
27
30
|
}
|
|
28
|
-
},
|
|
31
|
+
}, intl.get("53e957d9-8aee-4322-a144-31d4cff11c9f").d("清空")))), /*#__PURE__*/React.createElement("div", {
|
|
29
32
|
className: "cw-dropdown-menu-history-popup-more-content"
|
|
30
33
|
}, historyList.map(function (tag) {
|
|
31
34
|
return /*#__PURE__*/React.createElement(_Tag, {
|
|
32
|
-
key: tag.
|
|
35
|
+
key: tag.key,
|
|
33
36
|
closable: true,
|
|
34
37
|
onClose: function onClose(e) {
|
|
35
38
|
return onCloseTag(e, tag);
|
|
@@ -39,6 +42,9 @@ export default function MoreHistoryList(props) {
|
|
|
39
42
|
},
|
|
40
43
|
type: "custom_type01",
|
|
41
44
|
className: "cw-dropdown-menu-history-popup-more-content-tag-title"
|
|
42
|
-
}, tag
|
|
45
|
+
}, getHistoryTitle(tag, {
|
|
46
|
+
locale: locale,
|
|
47
|
+
intl: intl
|
|
48
|
+
}, format, timeSpanBoundary));
|
|
43
49
|
})));
|
|
44
50
|
}
|
|
@@ -2,18 +2,16 @@ import _Row from "@chaoswise/ui/lib/Row";
|
|
|
2
2
|
import _Col from "@chaoswise/ui/lib/Col";
|
|
3
3
|
import "@chaoswise/ui/lib/TooltipText/index.less";
|
|
4
4
|
import _TooltipText from "@chaoswise/ui/lib/TooltipText";
|
|
5
|
-
import
|
|
5
|
+
import useIntl from '../../../useIntl';
|
|
6
|
+
import getTimeTypeLabel from '../../../locales/messages/timeTypes';
|
|
6
7
|
import React from "react";
|
|
7
8
|
import classnames from "classnames";
|
|
8
|
-
import langConfig from "../../locale";
|
|
9
|
-
import { formatMessage } from "../../../utils";
|
|
10
9
|
import "./index.less";
|
|
11
10
|
var MoreTimeList = function MoreTimeList(props) {
|
|
12
11
|
var regroupDataSource = props.regroupDataSource,
|
|
13
12
|
recordDateValue = props.recordDateValue,
|
|
14
13
|
onClickItem = props.onClickItem;
|
|
15
|
-
var
|
|
16
|
-
localeObj = _useLocale.langObj;
|
|
14
|
+
var intl = useIntl();
|
|
17
15
|
// 点击Menu.Item中切换常规模式
|
|
18
16
|
var onClickMoreItem = function onClickMoreItem(item) {
|
|
19
17
|
onClickItem(item);
|
|
@@ -27,7 +25,7 @@ var MoreTimeList = function MoreTimeList(props) {
|
|
|
27
25
|
borderBottom: regroupDataSource.length - 1 !== index ? "1px solid rgba(0,0,0,0.06)" : ""
|
|
28
26
|
},
|
|
29
27
|
key: timeTypeItem.type
|
|
30
|
-
}, /*#__PURE__*/React.createElement("h3", null,
|
|
28
|
+
}, /*#__PURE__*/React.createElement("h3", null, getTimeTypeLabel(intl, timeTypeItem.type)), /*#__PURE__*/React.createElement(_Row, null, timeTypeItem.timeList.map(function (item) {
|
|
31
29
|
return /*#__PURE__*/React.createElement(_Col, {
|
|
32
30
|
key: item.key,
|
|
33
31
|
span: timeTypeItem.type === "absolute" || timeTypeItem.type == "unixTimestamp" ? 12 : 8,
|
|
@@ -3,7 +3,6 @@ import "@chaoswise/ui/lib/Tag/index.less";
|
|
|
3
3
|
import _Tag from "@chaoswise/ui/lib/Tag";
|
|
4
4
|
import _Dropdown from "@chaoswise/ui/lib/Dropdown";
|
|
5
5
|
import _Icon from "@chaoswise/ui/lib/Icon";
|
|
6
|
-
import _useLocale2 from "@chaoswise/ui/lib/useLocale";
|
|
7
6
|
var _excluded = ["timeDomain", "number", "unit", "value", "isRecently"];
|
|
8
7
|
function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
|
|
9
8
|
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
@@ -22,6 +21,8 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
|
|
|
22
21
|
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); }
|
|
23
22
|
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
24
23
|
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
24
|
+
import useIntl from '../../useIntl';
|
|
25
|
+
import useConfigLocale from '../../ConfigProvider/useLocale';
|
|
25
26
|
import React from "react";
|
|
26
27
|
import classnames from "classnames";
|
|
27
28
|
import CalendarSvg from "../assets/Calendar";
|
|
@@ -30,9 +31,7 @@ import LiveSvg from "../assets/live";
|
|
|
30
31
|
import MoreSvg from "../assets/more";
|
|
31
32
|
import MoreTimeList from "./MoreTimeList";
|
|
32
33
|
import MoreHistoryList from "./MoreHistoryList";
|
|
33
|
-
import { judgeType, funcValueChangeArrayValue, getCorrectValue, getHistoryInfo } from "../utils";
|
|
34
|
-
import langConfig from "../locale";
|
|
35
|
-
import { formatMessage } from "../../utils";
|
|
34
|
+
import { judgeType, funcValueChangeArrayValue, getCorrectValue, getHistoryInfo, getHistoryTitle } from "../utils";
|
|
36
35
|
import "./index.less";
|
|
37
36
|
var DropdownMenu = function DropdownMenu(props) {
|
|
38
37
|
var dataSource = props.dataSource,
|
|
@@ -49,10 +48,10 @@ var DropdownMenu = function DropdownMenu(props) {
|
|
|
49
48
|
setHistoryList = props.setHistoryList,
|
|
50
49
|
format = props.format,
|
|
51
50
|
timeSpanOption = props.timeSpanOption;
|
|
52
|
-
var
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
locale =
|
|
51
|
+
var intl = useIntl();
|
|
52
|
+
var _useConfigLocale = useConfigLocale(),
|
|
53
|
+
_useConfigLocale$loca = _useConfigLocale.locale,
|
|
54
|
+
locale = _useConfigLocale$loca === void 0 ? "zh_CN" : _useConfigLocale$loca;
|
|
56
55
|
var _timeSpanOption$timeS = timeSpanOption.timeSpanBoundary,
|
|
57
56
|
timeSpanBoundary = _timeSpanOption$timeS === void 0 ? 94608000 : _timeSpanOption$timeS;
|
|
58
57
|
var _menuOption$showCalen = menuOption.showCalendar,
|
|
@@ -81,7 +80,10 @@ var DropdownMenu = function DropdownMenu(props) {
|
|
|
81
80
|
});
|
|
82
81
|
returnValue = getCorrectValue(returnValue, item.key);
|
|
83
82
|
onChange(returnValue);
|
|
84
|
-
var _getHistoryInfo = getHistoryInfo(returnValue, historyList,
|
|
83
|
+
var _getHistoryInfo = getHistoryInfo(returnValue, historyList, {
|
|
84
|
+
intl: intl,
|
|
85
|
+
locale: locale
|
|
86
|
+
}, format, timeSpanBoundary),
|
|
85
87
|
_getHistoryInfo2 = _slicedToArray(_getHistoryInfo, 2),
|
|
86
88
|
isRepeat = _getHistoryInfo2[0],
|
|
87
89
|
historyValue = _getHistoryInfo2[1];
|
|
@@ -182,7 +184,7 @@ var DropdownMenu = function DropdownMenu(props) {
|
|
|
182
184
|
style: {
|
|
183
185
|
marginLeft: "4px"
|
|
184
186
|
}
|
|
185
|
-
},
|
|
187
|
+
}, intl.get("a30db643-5238-42bc-bc5e-98a9d0c7df51").d("更多"))), /*#__PURE__*/React.createElement(_Icon, {
|
|
186
188
|
type: "right"
|
|
187
189
|
}))), showCalendar && /*#__PURE__*/React.createElement("div", {
|
|
188
190
|
className: classnames("cw-dropdown-menu-_item"),
|
|
@@ -196,9 +198,11 @@ var DropdownMenu = function DropdownMenu(props) {
|
|
|
196
198
|
style: {
|
|
197
199
|
marginLeft: "4px"
|
|
198
200
|
}
|
|
199
|
-
},
|
|
201
|
+
}, intl.get("02fc19b1-7fc7-4859-b2e0-a65ac2039828").d("日历选择"))), showHistoryList && Boolean(historyList.length) && /*#__PURE__*/React.createElement(_Dropdown, {
|
|
200
202
|
overlay: /*#__PURE__*/React.createElement(MoreHistoryList, {
|
|
201
203
|
historyList: historyList,
|
|
204
|
+
format: format,
|
|
205
|
+
timeSpanBoundary: timeSpanBoundary,
|
|
202
206
|
onClickTag: onClickTag,
|
|
203
207
|
onCloseTag: onCloseTag,
|
|
204
208
|
onCloseAllTag: onCloseAllTag
|
|
@@ -215,7 +219,7 @@ var DropdownMenu = function DropdownMenu(props) {
|
|
|
215
219
|
className: classnames("cw-dropdown-menu-history-wrapper")
|
|
216
220
|
}, /*#__PURE__*/React.createElement("span", {
|
|
217
221
|
className: "cw-dropdown-menu-history-title"
|
|
218
|
-
},
|
|
222
|
+
}, intl.get("294afc43-e2de-4d72-ba99-1f25d6f7a1d7").d("历史记录"), ":"), historyList.slice(0, showDefaultHistoryCount).map(function (tag) {
|
|
219
223
|
return /*#__PURE__*/React.createElement(_Tag, {
|
|
220
224
|
type: "custom_type01",
|
|
221
225
|
closable: true,
|
|
@@ -227,7 +231,10 @@ var DropdownMenu = function DropdownMenu(props) {
|
|
|
227
231
|
onClose: function onClose(e) {
|
|
228
232
|
return onCloseTag(e, tag);
|
|
229
233
|
}
|
|
230
|
-
}, tag
|
|
234
|
+
}, getHistoryTitle(tag, {
|
|
235
|
+
locale: locale,
|
|
236
|
+
intl: intl
|
|
237
|
+
}, format, timeSpanBoundary));
|
|
231
238
|
}), historyList.length > showDefaultHistoryCount && /*#__PURE__*/React.createElement("span", {
|
|
232
239
|
className: "cw-dropdown-menu-history-more-ellipsis"
|
|
233
240
|
}, "...")), /*#__PURE__*/React.createElement(_Icon, {
|
|
@@ -3,7 +3,6 @@ import "@chaoswise/ui/lib/Tooltip/index.less";
|
|
|
3
3
|
import _Tooltip from "@chaoswise/ui/lib/Tooltip";
|
|
4
4
|
import "@chaoswise/ui/lib/Button/index.less";
|
|
5
5
|
import _Button from "@chaoswise/ui/lib/Button";
|
|
6
|
-
import _useLocale2 from "@chaoswise/ui/lib/useLocale";
|
|
7
6
|
var _excluded = ["value", "key"];
|
|
8
7
|
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
9
8
|
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
@@ -18,14 +17,13 @@ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r)
|
|
|
18
17
|
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; }
|
|
19
18
|
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; } }
|
|
20
19
|
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
20
|
+
import useIntl from '../../useIntl';
|
|
21
21
|
import React, { forwardRef, useImperativeHandle } from "react";
|
|
22
22
|
import classnames from "classnames";
|
|
23
23
|
import Refresh1Svg from "../assets/Refresh1";
|
|
24
24
|
import Refresh2Svg from "../assets/Refresh2";
|
|
25
25
|
import Refresh3Svg from "../assets/Refresh3";
|
|
26
26
|
import { getChangeUnitDate, funcValueChangeArrayValue, getTimeSpanFromValue, computedRecentlyValue, judgeType } from "../utils";
|
|
27
|
-
import langConfig from "../locale";
|
|
28
|
-
import { formatMessage } from "../../utils";
|
|
29
27
|
import "./index.less";
|
|
30
28
|
var Refresh = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
31
29
|
var recordDateValue = props.recordDateValue,
|
|
@@ -55,8 +53,7 @@ var Refresh = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
55
53
|
isSpecialRelativeTime = _refreshOption$isSpec === void 0 ? false : _refreshOption$isSpec;
|
|
56
54
|
var _timeSpanOption$timeS = timeSpanOption.timeSpanBoundary,
|
|
57
55
|
timeSpanBoundary = _timeSpanOption$timeS === void 0 ? 94608000 : _timeSpanOption$timeS;
|
|
58
|
-
var
|
|
59
|
-
localeObj = _useLocale.langObj;
|
|
56
|
+
var intl = useIntl();
|
|
60
57
|
// 手动刷新
|
|
61
58
|
var onRefresh = function onRefresh() {
|
|
62
59
|
var values = recordDateValue.value,
|
|
@@ -154,12 +151,12 @@ var Refresh = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
154
151
|
return (showRefresh || showAutoRefresh) && /*#__PURE__*/React.createElement(_Button.Group, {
|
|
155
152
|
className: "cw-range-picker-refresh-wrapper"
|
|
156
153
|
}, showRefresh && /*#__PURE__*/React.createElement(_Tooltip, {
|
|
157
|
-
title:
|
|
154
|
+
title: intl.get("1d0f3c0c-188f-4f83-bff0-2792dffcdc2d").d("刷新")
|
|
158
155
|
}, /*#__PURE__*/React.createElement(_Button, {
|
|
159
156
|
onClick: onRefresh,
|
|
160
157
|
disabled: isDisabledRefresh
|
|
161
158
|
}, /*#__PURE__*/React.createElement(Refresh1Svg, null))), showAutoRefresh && /*#__PURE__*/React.createElement(_Tooltip, {
|
|
162
|
-
title:
|
|
159
|
+
title: intl.get("502d0d23-e942-4ecd-89e4-e85431a3098f").d("自动刷新")
|
|
163
160
|
}, /*#__PURE__*/React.createElement(_Button, {
|
|
164
161
|
onClick: onAutoRefresh,
|
|
165
162
|
disabled: isDisabledAutoRefresh,
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import "@chaoswise/ui/lib/Tooltip/index.less";
|
|
2
2
|
import _Tooltip from "@chaoswise/ui/lib/Tooltip";
|
|
3
|
-
import _useLocale2 from "@chaoswise/ui/lib/useLocale";
|
|
4
3
|
import "@chaoswise/ui/lib/Button/index.less";
|
|
5
4
|
import _Button from "@chaoswise/ui/lib/Button";
|
|
5
|
+
import useIntl from '../../useIntl';
|
|
6
6
|
import React from "react";
|
|
7
7
|
import { getChangeDate } from "../utils";
|
|
8
|
-
import langConfig from "../locale";
|
|
9
|
-
import { formatMessage } from "../../utils";
|
|
10
8
|
import "./index.less";
|
|
11
9
|
_Button.__ANT_BUTTON = true;
|
|
12
10
|
var TimeSpan = function TimeSpan(props) {
|
|
@@ -19,8 +17,7 @@ var TimeSpan = function TimeSpan(props) {
|
|
|
19
17
|
timeSpanOption = props.timeSpanOption,
|
|
20
18
|
isRightDisabled = props.isRightDisabled,
|
|
21
19
|
isDisabledEnlargeBtn = props.isDisabledEnlargeBtn;
|
|
22
|
-
var
|
|
23
|
-
localeObj = _useLocale.langObj;
|
|
20
|
+
var intl = useIntl();
|
|
24
21
|
var _timeSpanOption$showF = timeSpanOption.showForwardBtn,
|
|
25
22
|
showForwardBtn = _timeSpanOption$showF === void 0 ? true : _timeSpanOption$showF,
|
|
26
23
|
_timeSpanOption$showB = timeSpanOption.showBackwardBtn,
|
|
@@ -43,13 +40,13 @@ var TimeSpan = function TimeSpan(props) {
|
|
|
43
40
|
_timeSpanOption$timeS = timeSpanOption.timeSpanBoundary,
|
|
44
41
|
timeSpanBoundary = _timeSpanOption$timeS === void 0 ? 94608000 : _timeSpanOption$timeS;
|
|
45
42
|
var _tooltipTitleCustom$f = tooltipTitleCustom.forwardTitle,
|
|
46
|
-
forwardTitle = _tooltipTitleCustom$f === void 0 ?
|
|
43
|
+
forwardTitle = _tooltipTitleCustom$f === void 0 ? intl.get("df9a3bfb-00df-44cd-9761-87dc21ffc0e8").d("向前平滑") : _tooltipTitleCustom$f,
|
|
47
44
|
_tooltipTitleCustom$b = tooltipTitleCustom.backTitle,
|
|
48
|
-
backTitle = _tooltipTitleCustom$b === void 0 ?
|
|
45
|
+
backTitle = _tooltipTitleCustom$b === void 0 ? intl.get("cefeccff-2f9e-4b59-925c-af11c28aa8ed").d("向后平滑") : _tooltipTitleCustom$b,
|
|
49
46
|
_tooltipTitleCustom$e = tooltipTitleCustom.expandTitle,
|
|
50
|
-
expandTitle = _tooltipTitleCustom$e === void 0 ?
|
|
47
|
+
expandTitle = _tooltipTitleCustom$e === void 0 ? intl.get("56a89179-5086-4c43-8814-06eac1ba9983", {
|
|
51
48
|
span: "".concat(growSize)
|
|
52
|
-
}) : _tooltipTitleCustom$e;
|
|
49
|
+
}).d("按{span}倍增加时间跨度") : _tooltipTitleCustom$e;
|
|
53
50
|
var onChangeTimeSpan = function onChangeTimeSpan(direction) {
|
|
54
51
|
var _getChangeDate = getChangeDate(recordDateValue, direction, growSize, timeSpanBoundary),
|
|
55
52
|
value = _getChangeDate.value,
|