@chaoswise/ui 2.7.11 → 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.
Files changed (219) hide show
  1. package/lib/AlgorithmChart/common/chart.option.js +14 -11
  2. package/lib/AlgorithmChart/index.js +29 -26
  3. package/lib/Antd4/comment/index.js +1 -1
  4. package/lib/Antd4Form/FormItem.js +1 -1
  5. package/lib/BasicLayout/Nav.js +3 -5
  6. package/lib/BasicLayout/index.js +9 -10
  7. package/lib/CWCascader/rc-cascader/OptionList/Column.js +17 -18
  8. package/lib/CWMessage/MessageContent/TabList/index.js +19 -17
  9. package/lib/CWMessage/MessageContent/index.js +86 -73
  10. package/lib/CWMessage/index.js +62 -50
  11. package/lib/CWMessage/service/index.js +14 -14
  12. package/lib/CWMessage/utils/index.js +18 -11
  13. package/lib/CWRangePicker/DropdownMenu/MoreHistoryList/index.js +16 -10
  14. package/lib/CWRangePicker/DropdownMenu/MoreTimeList/index.js +4 -6
  15. package/lib/CWRangePicker/DropdownMenu/index.js +20 -13
  16. package/lib/CWRangePicker/Refresh/index.js +4 -7
  17. package/lib/CWRangePicker/TimeSpan/index.js +6 -9
  18. package/lib/CWRangePicker/index.js +39 -32
  19. package/lib/CWRangePicker/utils/index.js +45 -114
  20. package/lib/CWSelect/index.js +7 -10
  21. package/lib/CWTable/CWTable.js +23 -23
  22. package/lib/CWTable/EditLine.js +5 -8
  23. package/lib/CWTable/Filter.js +5 -8
  24. package/lib/CWTable/index.js +3 -0
  25. package/lib/CWTree/index.js +4 -7
  26. package/lib/CWUpload/upload/Dragger.js +4 -7
  27. package/lib/CWUpload/upload/UploadList.js +12 -15
  28. package/lib/CardSelect/index.js +16 -14
  29. package/lib/CitySelect/index.js +3 -1
  30. package/lib/ColorPicker/index.js +4 -7
  31. package/lib/ConfigProvider/ConfigProvider.js +143 -48
  32. package/lib/ConfigProvider/Switch.js +10 -2
  33. package/lib/ConfigProvider/context.js +8 -0
  34. package/lib/ConfigProvider/useLocale.js +1 -1
  35. package/lib/DatePicker/useLocale.js +17 -10
  36. package/lib/DateRangePicker/RangeDateTimePicker.js +3 -3
  37. package/lib/DateRangePicker/components/ExtraQuickFooter.js +5 -8
  38. package/lib/DateRangePicker/index.js +6 -5
  39. package/lib/DropdownDatePicker/DropdownMenu/MoreTimeList/index.js +4 -6
  40. package/lib/DropdownDatePicker/DropdownMenu/index.js +4 -7
  41. package/lib/DropdownDatePicker/index.js +12 -13
  42. package/lib/DropdownDatePicker/utils/index.js +5 -93
  43. package/lib/EchartsBar/index.js +1 -1
  44. package/lib/Empty/index.js +3 -6
  45. package/lib/ErrorBoundary/ErrorPage.js +8 -9
  46. package/lib/Exception/index.js +9 -12
  47. package/lib/FilterDropDown/index.js +3 -6
  48. package/lib/Flow/tools/index.js +4 -1
  49. package/lib/Header/Document/index.js +3 -8
  50. package/lib/Header/LocaleSwitcher.js +2 -0
  51. package/lib/Header/UserSetting/index.js +27 -45
  52. package/lib/IconSelect/components/CustomImg/index.js +8 -11
  53. package/lib/IconSelect/components/SearchIcon/index.js +9 -9
  54. package/lib/IconSelect/index.js +4 -7
  55. package/lib/ImagePreview/index.js +3 -1
  56. package/lib/Joyride/List.js +9 -8
  57. package/lib/Joyride/index.js +22 -25
  58. package/lib/ModuleFederation/react-dynamic-remote-component/RemoteComponent.js +38 -39
  59. package/lib/ModuleFederation/react-dynamic-remote-component/load-module.js +22 -23
  60. package/lib/Pagination/index.js +14 -14
  61. package/lib/PolymerizationSearch/DropdownMenu.js +4 -2
  62. package/lib/PolymerizationSearch/index.js +7 -7
  63. package/lib/Progress/index.js +3 -6
  64. package/lib/QuickTransfer/DragList.js +3 -6
  65. package/lib/QuickTransfer/index.js +19 -22
  66. package/lib/RangePicker/components/ExtraTimeFooter.js +4 -7
  67. package/lib/SearchBar/OutSearch.js +9 -2
  68. package/lib/SearchBar/index.js +13 -16
  69. package/lib/SimpleCard/index.js +3 -1
  70. package/lib/SingleSpa/index.js +30 -26
  71. package/lib/ThemeProvider/Switcher.js +3 -1
  72. package/lib/TimeRangeSlider/Refresh/index.js +4 -7
  73. package/lib/TimeRangeSlider/TimeRangeSliderCmp/hooks/useMouse.js +3 -3
  74. package/lib/TimeRangeSlider/TimeSpan/index.js +6 -9
  75. package/lib/TimeRangeSlider/index.js +28 -24
  76. package/lib/TimeRangeSlider/utils/index.js +20 -100
  77. package/lib/TimeZoneSelect/index.js +21 -22
  78. package/lib/TreeSelect111/index.js +3 -6
  79. package/lib/Upload-back/index.js +27 -25
  80. package/lib/VerticalLayout/index.js +3 -1
  81. package/lib/WangEditor/extraLanguage.js +19 -0
  82. package/lib/WangEditor/index.js +19 -13
  83. package/lib/WangEditor/messages.js +49 -0
  84. package/lib/WangEditor/wangEditor.js +47 -20
  85. package/lib/index.js +1 -0
  86. package/lib/locales/en_US.json +1 -0
  87. package/lib/locales/index.js +2 -0
  88. package/lib/locales/ja_JP.json +1 -0
  89. package/lib/locales/load.js +48 -0
  90. package/lib/locales/messages/antd.js +404 -0
  91. package/lib/locales/messages/editor.js +42 -0
  92. package/lib/locales/messages/timeRanges.js +36 -0
  93. package/lib/locales/messages/timeTypes.js +11 -0
  94. package/lib/locales/runtime.js +127 -0
  95. package/lib/locales/zh_CN.json +1 -0
  96. package/lib/locales/zh_HK.json +1 -0
  97. package/lib/locales/zh_TW.json +1 -0
  98. package/lib/useIntl/index.js +9 -0
  99. package/lib/useLocale/index.js +16 -13
  100. package/lib/utils/index.js +4 -1
  101. package/package.json +14 -3
  102. package/lib/BasicLayout/locale/en_US.js +0 -4
  103. package/lib/BasicLayout/locale/index.js +0 -13
  104. package/lib/BasicLayout/locale/ja_JP.js +0 -4
  105. package/lib/BasicLayout/locale/zh_CN.js +0 -4
  106. package/lib/BasicLayout/locale/zh_TW.js +0 -4
  107. package/lib/CWMessage/locale/en_US.js +0 -8
  108. package/lib/CWMessage/locale/index.js +0 -13
  109. package/lib/CWMessage/locale/ja_JP.js +0 -8
  110. package/lib/CWMessage/locale/zh_CN.js +0 -8
  111. package/lib/CWMessage/locale/zh_TW.js +0 -8
  112. package/lib/CWRangePicker/locale/en_US.js +0 -29
  113. package/lib/CWRangePicker/locale/index.js +0 -13
  114. package/lib/CWRangePicker/locale/ja_JP.js +0 -29
  115. package/lib/CWRangePicker/locale/zh_CN.js +0 -29
  116. package/lib/CWRangePicker/locale/zh_TW.js +0 -29
  117. package/lib/CWSelect/locale/en_US.js +0 -4
  118. package/lib/CWSelect/locale/index.js +0 -13
  119. package/lib/CWSelect/locale/ja_JP.js +0 -4
  120. package/lib/CWSelect/locale/zh_CN.js +0 -4
  121. package/lib/CWSelect/locale/zh_TW.js +0 -4
  122. package/lib/CWTable/locale/en_US.js +0 -6
  123. package/lib/CWTable/locale/index.js +0 -13
  124. package/lib/CWTable/locale/ja_JP.js +0 -6
  125. package/lib/CWTable/locale/zh_CN.js +0 -6
  126. package/lib/CWTable/locale/zh_TW.js +0 -6
  127. package/lib/CWTree/locale/en_US.js +0 -3
  128. package/lib/CWTree/locale/index.js +0 -13
  129. package/lib/CWTree/locale/ja_JP.js +0 -3
  130. package/lib/CWTree/locale/zh_CN.js +0 -3
  131. package/lib/CWTree/locale/zh_TW.js +0 -3
  132. package/lib/CWUpload/locale/en_US.js +0 -6
  133. package/lib/CWUpload/locale/index.js +0 -13
  134. package/lib/CWUpload/locale/ja_JP.js +0 -6
  135. package/lib/CWUpload/locale/zh_CN.js +0 -6
  136. package/lib/CWUpload/locale/zh_TW.js +0 -6
  137. package/lib/Card/index.less +0 -10
  138. package/lib/ColorPicker/locale/en_US.js +0 -4
  139. package/lib/ColorPicker/locale/index.js +0 -13
  140. package/lib/ColorPicker/locale/ja_JP.js +0 -4
  141. package/lib/ColorPicker/locale/zh_CN.js +0 -4
  142. package/lib/ColorPicker/locale/zh_TW.js +0 -4
  143. package/lib/DateRangePicker/locale/en_US.js +0 -5
  144. package/lib/DateRangePicker/locale/index.js +0 -13
  145. package/lib/DateRangePicker/locale/ja_JP.js +0 -5
  146. package/lib/DateRangePicker/locale/zh_CN.js +0 -5
  147. package/lib/DateRangePicker/locale/zh_TW.js +0 -5
  148. package/lib/DropdownDatePicker/locale/en_US.js +0 -21
  149. package/lib/DropdownDatePicker/locale/index.js +0 -13
  150. package/lib/DropdownDatePicker/locale/ja_JP.js +0 -21
  151. package/lib/DropdownDatePicker/locale/zh_CN.js +0 -21
  152. package/lib/DropdownDatePicker/locale/zh_TW.js +0 -21
  153. package/lib/Empty/locale/en_US.js +0 -3
  154. package/lib/Empty/locale/index.js +0 -13
  155. package/lib/Empty/locale/ja_JP.js +0 -3
  156. package/lib/Empty/locale/zh_CN.js +0 -3
  157. package/lib/Empty/locale/zh_TW.js +0 -3
  158. package/lib/ErrorBoundary/index.less +0 -15
  159. package/lib/ErrorBoundary/locale/en_US.js +0 -5
  160. package/lib/ErrorBoundary/locale/index.js +0 -13
  161. package/lib/ErrorBoundary/locale/ja_JP.js +0 -5
  162. package/lib/ErrorBoundary/locale/zh_CN.js +0 -5
  163. package/lib/ErrorBoundary/locale/zh_TW.js +0 -5
  164. package/lib/Exception/locale/en_US.js +0 -9
  165. package/lib/Exception/locale/index.js +0 -13
  166. package/lib/Exception/locale/ja_JP.js +0 -9
  167. package/lib/Exception/locale/zh_CN.js +0 -9
  168. package/lib/Exception/locale/zh_TW.js +0 -9
  169. package/lib/FilterDropDown/locale/en_US.js +0 -3
  170. package/lib/FilterDropDown/locale/index.js +0 -13
  171. package/lib/FilterDropDown/locale/ja_JP.js +0 -3
  172. package/lib/FilterDropDown/locale/zh_CN.js +0 -3
  173. package/lib/FilterDropDown/locale/zh_TW.js +0 -3
  174. package/lib/IconSelect/locale/en_US.js +0 -11
  175. package/lib/IconSelect/locale/index.js +0 -13
  176. package/lib/IconSelect/locale/ja_JP.js +0 -11
  177. package/lib/IconSelect/locale/zh_CN.js +0 -11
  178. package/lib/IconSelect/locale/zh_TW.js +0 -11
  179. package/lib/Joyride/locale/en_US.js +0 -25
  180. package/lib/Joyride/locale/index.js +0 -13
  181. package/lib/Joyride/locale/ja_JP.js +0 -25
  182. package/lib/Joyride/locale/zh_CN.js +0 -25
  183. package/lib/Joyride/locale/zh_TW.js +0 -25
  184. package/lib/Pagination/locale/en_US.js +0 -8
  185. package/lib/Pagination/locale/index.js +0 -13
  186. package/lib/Pagination/locale/ja_JP.js +0 -8
  187. package/lib/Pagination/locale/zh_CN.js +0 -8
  188. package/lib/Pagination/locale/zh_TW.js +0 -8
  189. package/lib/Progress/locale/en_US.js +0 -3
  190. package/lib/Progress/locale/index.js +0 -13
  191. package/lib/Progress/locale/ja_JP.js +0 -3
  192. package/lib/Progress/locale/zh_CN.js +0 -3
  193. package/lib/Progress/locale/zh_TW.js +0 -3
  194. package/lib/QuickTransfer/locale/en_US.js +0 -8
  195. package/lib/QuickTransfer/locale/index.js +0 -13
  196. package/lib/QuickTransfer/locale/ja_JP.js +0 -8
  197. package/lib/QuickTransfer/locale/zh_CN.js +0 -8
  198. package/lib/QuickTransfer/locale/zh_TW.js +0 -8
  199. package/lib/RangePicker/locale/en_US.js +0 -5
  200. package/lib/RangePicker/locale/index.js +0 -13
  201. package/lib/RangePicker/locale/ja_JP.js +0 -5
  202. package/lib/RangePicker/locale/zh_CN.js +0 -5
  203. package/lib/RangePicker/locale/zh_TW.js +0 -5
  204. package/lib/SearchBar/locale/en_US.js +0 -6
  205. package/lib/SearchBar/locale/index.js +0 -13
  206. package/lib/SearchBar/locale/ja_JP.js +0 -6
  207. package/lib/SearchBar/locale/zh_CN.js +0 -6
  208. package/lib/SearchBar/locale/zh_TW.js +0 -6
  209. package/lib/TimeRangeSlider/locale/en_US.js +0 -31
  210. package/lib/TimeRangeSlider/locale/index.js +0 -13
  211. package/lib/TimeRangeSlider/locale/ja_JP.js +0 -31
  212. package/lib/TimeRangeSlider/locale/zh_CN.js +0 -31
  213. package/lib/TimeRangeSlider/locale/zh_TW.js +0 -31
  214. package/lib/TreeSelect111/locale/en_US.js +0 -3
  215. package/lib/TreeSelect111/locale/index.js +0 -13
  216. package/lib/TreeSelect111/locale/ja_JP.js +0 -3
  217. package/lib/TreeSelect111/locale/zh_CN.js +0 -3
  218. package/lib/TreeSelect111/locale/zh_TW.js +0 -3
  219. package/lib/WangEditor/locale/index.js +0 -93
@@ -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
- var _window$localStorage$;
2
- var headers = {
3
- withCredentials: true,
4
- userId: window.localStorage.getItem("accountUserId") || "2",
5
- accountId: window.localStorage.getItem("accountId") || "110",
6
- "Content-Type": "application/json",
7
- language: (_window$localStorage$ = window.localStorage.getItem("language")) !== null && _window$localStorage$ !== void 0 && _window$localStorage$.includes("en") ? "en_US" : "zh_CN"
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: 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: 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 _useLocale2 from "@chaoswise/ui/lib/useLocale";
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
- var _useLocale = _useLocale2(langConfig),
15
- localeObj = _useLocale.langObj;
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, formatMessage(localeObj["history"])), /*#__PURE__*/React.createElement("div", {
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
- }, formatMessage(localeObj["clear"])))), /*#__PURE__*/React.createElement("div", {
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.title,
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.title);
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 _useLocale2 from "@chaoswise/ui/lib/useLocale";
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 _useLocale = _useLocale2(langConfig),
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, formatMessage(localeObj[timeTypeItem.type])), /*#__PURE__*/React.createElement(_Row, null, timeTypeItem.timeList.map(function (item) {
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 _useLocale = _useLocale2(langConfig),
53
- localeObj = _useLocale.langObj,
54
- _useLocale$locale = _useLocale.locale,
55
- locale = _useLocale$locale === void 0 ? "zh_CN" : _useLocale$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, locale, format, timeSpanBoundary),
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
- }, formatMessage(localeObj["more"]))), /*#__PURE__*/React.createElement(_Icon, {
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
- }, formatMessage(localeObj["select-calendar"]))), showHistoryList && Boolean(historyList.length) && /*#__PURE__*/React.createElement(_Dropdown, {
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
- }, formatMessage(localeObj["history"]), ":"), historyList.slice(0, showDefaultHistoryCount).map(function (tag) {
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.title);
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 _useLocale = _useLocale2(langConfig),
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: formatMessage(localeObj["refresh"])
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: formatMessage(localeObj["autoRefresh"])
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 _useLocale = _useLocale2(langConfig),
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 ? formatMessage(localeObj["forwardSmooth"]) : _tooltipTitleCustom$f,
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 ? formatMessage(localeObj["backSmooth"]) : _tooltipTitleCustom$b,
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 ? formatMessage(localeObj["ExpandSpan"], {
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,
@@ -9,7 +9,6 @@ import _message from "@chaoswise/ui/lib/message";
9
9
  import "@chaoswise/ui/lib/Tooltip/index.less";
10
10
  import _Tooltip from "@chaoswise/ui/lib/Tooltip";
11
11
  import _Icon from "@chaoswise/ui/lib/Icon";
12
- import _useLocale2 from "@chaoswise/ui/lib/useLocale";
13
12
  var _excluded = ["showTipIcon"],
14
13
  _excluded2 = ["timeDomain", "number", "unit", "isRecently", "value"],
15
14
  _excluded3 = ["value", "timeDomain", "number", "unit", "isRecently"];
@@ -31,6 +30,8 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
31
30
  function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
32
31
  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; }
33
32
  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; }
33
+ import useIntl from '../useIntl';
34
+ import useConfigLocale from '../ConfigProvider/useLocale';
34
35
  import React, { forwardRef, useState, useEffect, useMemo, useRef, useImperativeHandle } from "react";
35
36
  import PropTypes from "prop-types";
36
37
  import classnames from "classnames";
@@ -43,14 +44,13 @@ import RecoverSvg from "./assets/Recover";
43
44
  import { regroupDataSourceFn, echoInputValue, getUnit, judgeType, getChangeUnitDate, isInvalidDate, range, funcValueChangeArrayValue, getCorrectValue, getHistoryInfo, getFinalDateOption, getTruthDateCount, isAfterDate, isSameDate, isExceedMaxTimeSpan, getYears, computedRecentlyValue, getTimeSpanFromValue } from "./utils";
44
45
  import { isEqual } from "lodash-es";
45
46
  import moment from "moment";
46
- import langConfig from "./locale";
47
- import { formatMessage } from "../utils";
48
47
  import "./index.less";
48
+ var EMPTY_DATA_SOURCE = [];
49
49
  var CWRangePicker = /*#__PURE__*/forwardRef(function (props, ref) {
50
50
  var defaultValue = props.defaultValue,
51
51
  value = props.value,
52
52
  _props$dataSource = props.dataSource,
53
- dataSource = _props$dataSource === void 0 ? [] : _props$dataSource,
53
+ dataSource = _props$dataSource === void 0 ? EMPTY_DATA_SOURCE : _props$dataSource,
54
54
  classNameWrapper = props.classNameWrapper,
55
55
  _props$onChange = props.onChange,
56
56
  _onChange = _props$onChange === void 0 ? function () {} : _props$onChange,
@@ -74,10 +74,10 @@ var CWRangePicker = /*#__PURE__*/forwardRef(function (props, ref) {
74
74
  open = props.open,
75
75
  _props$rangePickerFor = props.rangePickerFormat,
76
76
  rangePickerFormat = _props$rangePickerFor === void 0 ? "YYYY/MM/DD" : _props$rangePickerFor;
77
- var _useLocale = _useLocale2(langConfig),
78
- localeObj = _useLocale.langObj,
79
- _useLocale$locale = _useLocale.locale,
80
- locale = _useLocale$locale === void 0 ? "zh_CN" : _useLocale$locale;
77
+ var intl = useIntl();
78
+ var _useConfigLocale = useConfigLocale(),
79
+ _useConfigLocale$loca = _useConfigLocale.locale,
80
+ locale = _useConfigLocale$loca === void 0 ? "zh_CN" : _useConfigLocale$loca;
81
81
  var _refreshOption$onAuto = refreshOption.onAutoRefresh,
82
82
  onAutoRefresh = _refreshOption$onAuto === void 0 ? function () {} : _refreshOption$onAuto,
83
83
  _refreshOption$onAuto2 = refreshOption.onAutoRefreshChange,
@@ -128,6 +128,7 @@ var CWRangePicker = /*#__PURE__*/forwardRef(function (props, ref) {
128
128
  _useState6 = _slicedToArray(_useState5, 2),
129
129
  recordDateValue = _useState6[0],
130
130
  setRecordDateValue = _useState6[1];
131
+ var inputSourceRef = useRef(recordDateValue);
131
132
  // 自动刷新状态是否开启
132
133
  var _useState7 = useState(false),
133
134
  _useState8 = _slicedToArray(_useState7, 2),
@@ -135,19 +136,19 @@ var CWRangePicker = /*#__PURE__*/forwardRef(function (props, ref) {
135
136
  setIsAutoRefresh = _useState8[1];
136
137
  // 日历选择器时间
137
138
  var _useState9 = useState([]),
138
- _useState10 = _slicedToArray(_useState9, 2),
139
- rangePickerValue = _useState10[0],
140
- setRangePickerValue = _useState10[1];
139
+ _useState0 = _slicedToArray(_useState9, 2),
140
+ rangePickerValue = _useState0[0],
141
+ setRangePickerValue = _useState0[1];
141
142
  // 是否切换到日历选择
142
- var _useState11 = useState(false),
143
- _useState12 = _slicedToArray(_useState11, 2),
144
- isCalendar = _useState12[0],
145
- setIsCalendar = _useState12[1];
143
+ var _useState1 = useState(false),
144
+ _useState10 = _slicedToArray(_useState1, 2),
145
+ isCalendar = _useState10[0],
146
+ setIsCalendar = _useState10[1];
146
147
  // 历史记录列表存储
147
- var _useState13 = useState([]),
148
- _useState14 = _slicedToArray(_useState13, 2),
149
- historyList = _useState14[0],
150
- setHistoryList = _useState14[1];
148
+ var _useState11 = useState([]),
149
+ _useState12 = _slicedToArray(_useState11, 2),
150
+ historyList = _useState12[0],
151
+ setHistoryList = _useState12[1];
151
152
  // 特殊时间选择器外壳容器
152
153
  var calendarRef = useRef(null);
153
154
  // 定时器计数
@@ -263,8 +264,14 @@ var CWRangePicker = /*#__PURE__*/forwardRef(function (props, ref) {
263
264
 
264
265
  // 输入框回显
265
266
  useEffect(function () {
266
- setInputValue(customRenderTitle ? customRenderTitle(recordDateValue, isFocus) : echoInputValue(recordDateValue, isFocus, locale, format, forceRenderTitle, timeSpanBoundary, isSpecialRelativeTime, _defaultValue));
267
- }, [recordDateValue, isFocus, locale, format, forceRenderTitle, _defaultValue]);
267
+ var sourceChanged = inputSourceRef.current !== recordDateValue;
268
+ inputSourceRef.current = recordDateValue;
269
+ if (sourceChanged) isInputRef.current = false;
270
+ // Localizing the committed value must not overwrite an unsubmitted draft.
271
+ // A new controlled/selected value still takes precedence over that draft.
272
+ if (isFocus && isInputRef.current && !sourceChanged) return;
273
+ setInputValue(customRenderTitle ? customRenderTitle(recordDateValue, isFocus) : echoInputValue(recordDateValue, isFocus, locale, format, forceRenderTitle, timeSpanBoundary, isSpecialRelativeTime, _defaultValue, intl));
274
+ }, [recordDateValue, isFocus, locale, format, forceRenderTitle, _defaultValue, customRenderTitle, intl]);
268
275
  useEffect(function () {
269
276
  var _judgeType5 = judgeType(recordDateValue),
270
277
  _judgeType6 = _slicedToArray(_judgeType5, 1),
@@ -429,7 +436,7 @@ var CWRangePicker = /*#__PURE__*/forwardRef(function (props, ref) {
429
436
  type: "question-circle",
430
437
  className: classnames("cw-range-picker-suffix-tips")
431
438
  })) : showRecoverIcon && !isFocus && !isEqualDateValue ? /*#__PURE__*/React.createElement(_Tooltip, {
432
- title: formatMessage(localeObj["recover"])
439
+ title: intl.get("8aba20b3-9ee3-48b9-863c-224e6bdb4947").d("恢复默认值")
433
440
  }, /*#__PURE__*/React.createElement(RecoverSvg, {
434
441
  onClick: onRecover,
435
442
  className: classnames("cw-range-picker-suffix-recover")
@@ -471,16 +478,16 @@ var CWRangePicker = /*#__PURE__*/forwardRef(function (props, ref) {
471
478
  }, inputValue);
472
479
  var isInvalidDate_ = isInvalidDate(returnValue.value);
473
480
  if (!isInvalidDate_) {
474
- // message.success(localeObj["fit-the-input-format"]);
481
+ // Input format validation succeeded.
475
482
  var passValue = returnValue.value;
476
483
  if (isExceedMaxTimeSpan(passValue, timeSpanBoundary)) {
477
- _message.error(formatMessage(localeObj["the-maximum-time-span-is-exceeded"]));
484
+ _message.error(intl.get("e8a046c4-4611-47b9-bef0-cb46de7dd733").d("超过了限制的最大时间跨度,请重新输入"));
478
485
  return;
479
486
  }
480
487
  _onChange(returnValue);
481
488
  setIsFocus(false);
482
489
  var _getHistoryInfo = getHistoryInfo(returnValue, historyList, {
483
- localeObj: localeObj,
490
+ intl: intl,
484
491
  locale: locale
485
492
  }, format, timeSpanBoundary),
486
493
  _getHistoryInfo2 = _slicedToArray(_getHistoryInfo, 2),
@@ -495,7 +502,7 @@ var CWRangePicker = /*#__PURE__*/forwardRef(function (props, ref) {
495
502
  setRecordDateValue(returnValue);
496
503
  }
497
504
  } else {
498
- _message.error(formatMessage(localeObj["does-not-match-the-input-format"]));
505
+ _message.error(intl.get("e2008629-6fc2-4222-b28c-ada43aa79a74").d("不符合输入格式,请重新输入"));
499
506
  }
500
507
  } else {
501
508
  var finalDateOption = getFinalDateOption(inputValue);
@@ -507,13 +514,13 @@ var CWRangePicker = /*#__PURE__*/forwardRef(function (props, ref) {
507
514
  });
508
515
  var _passValue = _returnValue.value;
509
516
  if (isExceedMaxTimeSpan(_passValue, timeSpanBoundary)) {
510
- _message.error(formatMessage(localeObj["the-maximum-time-span-is-exceeded"]));
517
+ _message.error(intl.get("e8a046c4-4611-47b9-bef0-cb46de7dd733").d("超过了限制的最大时间跨度,请重新输入"));
511
518
  return;
512
519
  }
513
520
  _onChange(_returnValue);
514
521
  setIsFocus(false);
515
522
  var _getHistoryInfo3 = getHistoryInfo(_returnValue, historyList, {
516
- localeObj: localeObj,
523
+ intl: intl,
517
524
  locale: locale
518
525
  }, format, timeSpanBoundary),
519
526
  _getHistoryInfo4 = _slicedToArray(_getHistoryInfo3, 2),
@@ -528,7 +535,7 @@ var CWRangePicker = /*#__PURE__*/forwardRef(function (props, ref) {
528
535
  setRecordDateValue(_returnValue);
529
536
  }
530
537
  } else {
531
- _message.error(formatMessage(localeObj["does-not-match-the-input-format"]));
538
+ _message.error(intl.get("e2008629-6fc2-4222-b28c-ada43aa79a74").d("不符合输入格式,请重新输入"));
532
539
  }
533
540
  }
534
541
  isInputRef.current = false;
@@ -596,16 +603,16 @@ var CWRangePicker = /*#__PURE__*/forwardRef(function (props, ref) {
596
603
  var _values2 = values,
597
604
  resValue = _values2.value;
598
605
  if (isSameDate(resValue[0], resValue[1], "second") || isAfterDate(resValue[0], resValue[1])) {
599
- _message.error(formatMessage(localeObj["the-selected-time-does-not-meet-the-rule-limit"]));
606
+ _message.error(intl.get("92eb0ee0-1f72-4f49-bfad-ff7f0d1bd21d").d("选择的时间二者相同或者某一时间超过当前时间,请重新选择"));
600
607
  return;
601
608
  }
602
609
  if (isExceedMaxTimeSpan(resValue, timeSpanBoundary)) {
603
- _message.error(formatMessage(localeObj["the-maximum-time-span-is-exceeded"]));
610
+ _message.error(intl.get("e8a046c4-4611-47b9-bef0-cb46de7dd733").d("超过了限制的最大时间跨度,请重新输入"));
604
611
  return;
605
612
  }
606
613
  _onChange(values);
607
614
  var _getHistoryInfo5 = getHistoryInfo(values, historyList, {
608
- localeObj: localeObj,
615
+ intl: intl,
609
616
  locale: locale
610
617
  }, format, timeSpanBoundary),
611
618
  _getHistoryInfo6 = _slicedToArray(_getHistoryInfo5, 2),