@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
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import _Popover from "@chaoswise/ui/lib/Popover";
|
|
2
2
|
import _Icon from "@chaoswise/ui/lib/Icon";
|
|
3
|
-
import _ConfigProvider from "@chaoswise/ui/lib/ConfigProvider";
|
|
4
3
|
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
5
4
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
6
5
|
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
@@ -10,21 +9,10 @@ function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
|
10
9
|
import React, { useEffect, useState } from 'react';
|
|
11
10
|
import TenantList from './TenantList';
|
|
12
11
|
import TenantTree from './TenantTree';
|
|
13
|
-
|
|
14
|
-
zh: "title",
|
|
15
|
-
zh_CN: "title",
|
|
16
|
-
zh_TW: "zh_TW_Title",
|
|
17
|
-
en: "enTitle",
|
|
18
|
-
en_US: "enTitle"
|
|
19
|
-
};
|
|
12
|
+
import useIntl from '../../useIntl';
|
|
20
13
|
function UserSetting(_ref) {
|
|
21
14
|
var option = _ref.option;
|
|
22
|
-
|
|
23
|
-
return null;
|
|
24
|
-
}
|
|
25
|
-
var _ConfigProvider$useLo = _ConfigProvider.useLocale(),
|
|
26
|
-
_ConfigProvider$useLo2 = _ConfigProvider$useLo.locale,
|
|
27
|
-
locale = _ConfigProvider$useLo2 === void 0 ? 'zh_CN' : _ConfigProvider$useLo2;
|
|
15
|
+
var intl = useIntl();
|
|
28
16
|
var _useState = useState([]),
|
|
29
17
|
_useState2 = _slicedToArray(_useState, 2),
|
|
30
18
|
myTenantList = _useState2[0],
|
|
@@ -33,21 +21,22 @@ function UserSetting(_ref) {
|
|
|
33
21
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
34
22
|
myTenantTree = _useState4[0],
|
|
35
23
|
setMyTenantTree = _useState4[1];
|
|
36
|
-
var
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
showLock =
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
onClick =
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
24
|
+
var _ref2 = option || {},
|
|
25
|
+
fName = _ref2.fName,
|
|
26
|
+
name = _ref2.name,
|
|
27
|
+
tenant = _ref2.tenant,
|
|
28
|
+
_ref2$showLock = _ref2.showLock,
|
|
29
|
+
showLock = _ref2$showLock === void 0 ? false : _ref2$showLock,
|
|
30
|
+
tenantList = _ref2.tenantList,
|
|
31
|
+
tenantTree = _ref2.tenantTree,
|
|
32
|
+
_ref2$onClick = _ref2.onClick,
|
|
33
|
+
onClick = _ref2$onClick === void 0 ? function () {} : _ref2$onClick,
|
|
34
|
+
defaultTenant = _ref2.defaultTenant,
|
|
35
|
+
defaultSubTenant = _ref2.defaultSubTenant,
|
|
36
|
+
currentTenant = _ref2.currentTenant,
|
|
37
|
+
currentSubTenant = _ref2.currentSubTenant,
|
|
38
|
+
onTenantChange = _ref2.onTenantChange,
|
|
39
|
+
onSubTenantChange = _ref2.onSubTenantChange;
|
|
51
40
|
useEffect(function () {
|
|
52
41
|
if (tenantList) {
|
|
53
42
|
return;
|
|
@@ -58,6 +47,9 @@ function UserSetting(_ref) {
|
|
|
58
47
|
return;
|
|
59
48
|
}
|
|
60
49
|
}, [tenantTree]);
|
|
50
|
+
if (!option) {
|
|
51
|
+
return null;
|
|
52
|
+
}
|
|
61
53
|
var onItemClick = function onItemClick(eventKey, currentKey, props) {
|
|
62
54
|
if (eventKey === 'switch-tenant' && !onTenantChange) {
|
|
63
55
|
var url = "/douc/api/v1/sso/switchAccount?switchAccountId=".concat(currentKey, "&service=").concat(encodeURIComponent(window.location.href), "&type=switchAccount");
|
|
@@ -71,21 +63,15 @@ function UserSetting(_ref) {
|
|
|
71
63
|
};
|
|
72
64
|
var data = [{
|
|
73
65
|
key: 'user-setting',
|
|
74
|
-
title:
|
|
75
|
-
enTitle: 'Personal settings',
|
|
76
|
-
zh_TW_Title: "個人設置",
|
|
66
|
+
title: intl.get("6113730d-2cd4-41fa-b761-2f2d156bcb02").d("个人设置"),
|
|
77
67
|
icon: 'setting'
|
|
78
68
|
}, {
|
|
79
69
|
key: 'lock-screen',
|
|
80
|
-
title:
|
|
81
|
-
enTitle: 'Enable screen lock',
|
|
82
|
-
zh_TW_Title: "開啓鎖屏",
|
|
70
|
+
title: intl.get("b4b21c1d-1b4a-44f5-b68a-c7798d31702c").d("开启锁屏"),
|
|
83
71
|
icon: 'lock'
|
|
84
72
|
}, {
|
|
85
73
|
key: 'switch-tenant',
|
|
86
|
-
title:
|
|
87
|
-
enTitle: 'Switch tenant',
|
|
88
|
-
zh_TW_Title: "切換租戶",
|
|
74
|
+
title: intl.get("7bdd6240-2b6f-4ef0-bd75-ed87b0410cff").d("切换租户"),
|
|
89
75
|
icon: 'swap',
|
|
90
76
|
showRight: true,
|
|
91
77
|
noEvent: true,
|
|
@@ -99,9 +85,7 @@ function UserSetting(_ref) {
|
|
|
99
85
|
})
|
|
100
86
|
}, {
|
|
101
87
|
key: 'sub-tenant',
|
|
102
|
-
title:
|
|
103
|
-
enTitle: 'Go to subtenant',
|
|
104
|
-
zh_TW_Title: "子租戶",
|
|
88
|
+
title: intl.get("70380e9c-81b6-4a9b-ba67-a0964212ca03").d("子租户"),
|
|
105
89
|
icon: 'login',
|
|
106
90
|
showRight: true,
|
|
107
91
|
noEvent: true,
|
|
@@ -115,9 +99,7 @@ function UserSetting(_ref) {
|
|
|
115
99
|
})
|
|
116
100
|
}, {
|
|
117
101
|
key: 'logout',
|
|
118
|
-
title:
|
|
119
|
-
enTitle: 'Logout',
|
|
120
|
-
zh_TW_Title: "退出",
|
|
102
|
+
title: intl.get("4afd0e89-832b-4a6b-ac68-948dadec566b").d("退出"),
|
|
121
103
|
icon: 'poweroff'
|
|
122
104
|
}];
|
|
123
105
|
return /*#__PURE__*/React.createElement(_Popover, {
|
|
@@ -146,7 +128,7 @@ function UserSetting(_ref) {
|
|
|
146
128
|
type: item.icon
|
|
147
129
|
}), /*#__PURE__*/React.createElement("span", {
|
|
148
130
|
className: "cw-user-setting-item"
|
|
149
|
-
}, item
|
|
131
|
+
}, item.title), item.showRight && /*#__PURE__*/React.createElement(_Icon, {
|
|
150
132
|
type: "right",
|
|
151
133
|
style: {
|
|
152
134
|
marginLeft: 4,
|
|
@@ -4,18 +4,15 @@ import "@chaoswise/ui/lib/Button/index.less";
|
|
|
4
4
|
import _Button from "@chaoswise/ui/lib/Button";
|
|
5
5
|
import "@chaoswise/ui/lib/message/index.less";
|
|
6
6
|
import _message from "@chaoswise/ui/lib/message";
|
|
7
|
-
import
|
|
7
|
+
import useIntl from '../../../useIntl';
|
|
8
8
|
import React from "react";
|
|
9
|
-
import langConfig from '../../locale';
|
|
10
|
-
import { formatMessage } from "../../../utils";
|
|
11
9
|
import "./index.less";
|
|
12
10
|
var CustomImg = function CustomImg(_ref) {
|
|
13
11
|
var onChange = _ref.onChange,
|
|
14
12
|
iconInfo = _ref.iconInfo,
|
|
15
13
|
setCustomFileInfo = _ref.setCustomFileInfo,
|
|
16
14
|
customFileInfo = _ref.customFileInfo;
|
|
17
|
-
var
|
|
18
|
-
localeObj = _useLocale.langObj;
|
|
15
|
+
var intl = useIntl();
|
|
19
16
|
var beforeUpload = function beforeUpload(file) {
|
|
20
17
|
var type = file.type,
|
|
21
18
|
size = file.size;
|
|
@@ -29,15 +26,15 @@ var CustomImg = function CustomImg(_ref) {
|
|
|
29
26
|
return size > 2 * 1024 * 1024;
|
|
30
27
|
};
|
|
31
28
|
if (checkTypeIsImage()) {
|
|
32
|
-
_message.error(
|
|
29
|
+
_message.error(intl.get("19490744-b31a-4610-b264-ca472b370dbf").d("暂不支持该格式文件"));
|
|
33
30
|
return false;
|
|
34
31
|
}
|
|
35
32
|
if (checkSizeIsNull()) {
|
|
36
|
-
_message.error(
|
|
33
|
+
_message.error(intl.get("136730ef-10dc-48da-a4fa-86fbc94fc2a6").d("不能上传空文件"));
|
|
37
34
|
return false;
|
|
38
35
|
}
|
|
39
36
|
if (checkSizeIsBig()) {
|
|
40
|
-
_message.error(
|
|
37
|
+
_message.error(intl.get("7af82063-1c60-4754-81e7-4f2053975fa4").d("图片大小不超过2M"));
|
|
41
38
|
return false;
|
|
42
39
|
}
|
|
43
40
|
var reader = new FileReader();
|
|
@@ -57,7 +54,7 @@ var CustomImg = function CustomImg(_ref) {
|
|
|
57
54
|
// console.log(reader.result, "reader.result");
|
|
58
55
|
};
|
|
59
56
|
reader.onerror = function () {
|
|
60
|
-
_message.error(
|
|
57
|
+
_message.error(intl.get("b1aa1471-3aef-44fa-a1d5-d23f041eb548").d("读取文件失败"));
|
|
61
58
|
};
|
|
62
59
|
return false;
|
|
63
60
|
};
|
|
@@ -84,8 +81,8 @@ var CustomImg = function CustomImg(_ref) {
|
|
|
84
81
|
className: "custom-img"
|
|
85
82
|
}, /*#__PURE__*/React.createElement(_Button, {
|
|
86
83
|
icon: "upload"
|
|
87
|
-
},
|
|
84
|
+
}, intl.get("1a190483-11d6-4fc7-bdd8-9ebed6dcf14e").d("上传本地图片")), /*#__PURE__*/React.createElement("div", {
|
|
88
85
|
className: "custom-img-tip"
|
|
89
|
-
},
|
|
86
|
+
}, intl.get("5fcf813f-3ece-4afb-9ef5-e5c526238cc5").d("推荐上传40*40的PNG、SVG、JPG、JGPG,⼤⼩不超过2M"))))));
|
|
90
87
|
};
|
|
91
88
|
export default CustomImg;
|
|
@@ -4,19 +4,19 @@ import "@chaoswise/ui/lib/Tooltip/index.less";
|
|
|
4
4
|
import _Tooltip from "@chaoswise/ui/lib/Tooltip";
|
|
5
5
|
import "@chaoswise/ui/lib/Input/index.less";
|
|
6
6
|
import _Input from "@chaoswise/ui/lib/Input";
|
|
7
|
-
import _useLocale2 from "@chaoswise/ui/lib/useLocale";
|
|
8
7
|
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
9
8
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
10
9
|
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
11
10
|
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; }
|
|
12
11
|
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; } }
|
|
13
12
|
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
13
|
+
import useIntl from '../../../useIntl';
|
|
14
|
+
import { isChineseLocale } from '../../../locales/runtime';
|
|
15
|
+
import useConfigLocale from '../../../ConfigProvider/useLocale';
|
|
14
16
|
import React, { useEffect, useState, useMemo } from "react";
|
|
15
17
|
import Icon from "@icon-park/react/es/all";
|
|
16
18
|
import { iconData } from "../../constants/icon";
|
|
17
19
|
import classnames from "classnames";
|
|
18
|
-
import langConfig from '../../locale';
|
|
19
|
-
import { formatMessage } from "../../../utils";
|
|
20
20
|
import "./index.less";
|
|
21
21
|
var SearchIcon = function SearchIcon(_ref) {
|
|
22
22
|
var iconInfo = _ref.iconInfo,
|
|
@@ -29,10 +29,10 @@ var SearchIcon = function SearchIcon(_ref) {
|
|
|
29
29
|
_useState2 = _slicedToArray(_useState, 2),
|
|
30
30
|
iconList = _useState2[0],
|
|
31
31
|
setIconList = _useState2[1];
|
|
32
|
-
var
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
locale =
|
|
32
|
+
var intl = useIntl();
|
|
33
|
+
var _useConfigLocale = useConfigLocale(),
|
|
34
|
+
_useConfigLocale$loca = _useConfigLocale.locale,
|
|
35
|
+
locale = _useConfigLocale$loca === void 0 ? "zh_CN" : _useConfigLocale$loca;
|
|
36
36
|
var iconSelectList = useMemo(function () {
|
|
37
37
|
return iconData.filter(function (item) {
|
|
38
38
|
return category.includes(item.category);
|
|
@@ -70,14 +70,14 @@ var SearchIcon = function SearchIcon(_ref) {
|
|
|
70
70
|
}, /*#__PURE__*/React.createElement("div", {
|
|
71
71
|
className: "icon-selsect-search"
|
|
72
72
|
}, /*#__PURE__*/React.createElement(_Input.Search, {
|
|
73
|
-
placeholder:
|
|
73
|
+
placeholder: intl.get("7c22e9e9-1057-4812-bb70-9fb13ee5816d").d("请输入搜索关键字"),
|
|
74
74
|
onChange: onSearch,
|
|
75
75
|
allowClear: true
|
|
76
76
|
})), /*#__PURE__*/React.createElement("div", {
|
|
77
77
|
className: "icon-selsect-content"
|
|
78
78
|
}, iconList.length > 0 ? iconList.map(function (item) {
|
|
79
79
|
return /*#__PURE__*/React.createElement(_Tooltip, {
|
|
80
|
-
title: locale
|
|
80
|
+
title: isChineseLocale(locale) ? item.title : item.name // todo 繁体未做
|
|
81
81
|
,
|
|
82
82
|
key: item.name
|
|
83
83
|
}, /*#__PURE__*/React.createElement("div", {
|
package/lib/IconSelect/index.js
CHANGED
|
@@ -2,7 +2,6 @@ import _Dropdown from "@chaoswise/ui/lib/Dropdown";
|
|
|
2
2
|
import "@chaoswise/ui/lib/Button/index.less";
|
|
3
3
|
import _Button from "@chaoswise/ui/lib/Button";
|
|
4
4
|
import _Space from "@chaoswise/ui/lib/Space";
|
|
5
|
-
import _useLocale2 from "@chaoswise/ui/lib/useLocale";
|
|
6
5
|
import "@chaoswise/ui/lib/Tabs/index.less";
|
|
7
6
|
import _Tabs from "@chaoswise/ui/lib/Tabs";
|
|
8
7
|
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
@@ -11,12 +10,11 @@ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r)
|
|
|
11
10
|
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; }
|
|
12
11
|
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; } }
|
|
13
12
|
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
13
|
+
import useIntl from '../useIntl';
|
|
14
14
|
import React, { useEffect, useState } from "react";
|
|
15
15
|
import Icon from "@icon-park/react/es/all";
|
|
16
16
|
import CustomImg from "./components/CustomImg";
|
|
17
17
|
import SearchIcon from "./components/SearchIcon";
|
|
18
|
-
import langConfig from './locale';
|
|
19
|
-
import { formatMessage } from "../utils";
|
|
20
18
|
import "./index.less";
|
|
21
19
|
import PropTypes from "prop-types";
|
|
22
20
|
var TabPane = _Tabs.TabPane;
|
|
@@ -41,8 +39,7 @@ function IconSelect(_ref) {
|
|
|
41
39
|
customFileInfo = _useState6[0],
|
|
42
40
|
setCustomFileInfo = _useState6[1]; //组件图标数据集合
|
|
43
41
|
|
|
44
|
-
var
|
|
45
|
-
localeObj = _useLocale.langObj;
|
|
42
|
+
var intl = useIntl();
|
|
46
43
|
var _value = value || defaultValue;
|
|
47
44
|
|
|
48
45
|
//切换tab
|
|
@@ -74,7 +71,7 @@ function IconSelect(_ref) {
|
|
|
74
71
|
className: "icon-select-dropdown-tabs"
|
|
75
72
|
}, /*#__PURE__*/React.createElement(TabPane, {
|
|
76
73
|
key: "icon",
|
|
77
|
-
tab:
|
|
74
|
+
tab: intl.get("703fc2b8-0d1b-43ce-a7f8-9ea38de6c293").d("图标库")
|
|
78
75
|
}, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(SearchIcon, {
|
|
79
76
|
category: category,
|
|
80
77
|
iconInfo: iconInfo,
|
|
@@ -83,7 +80,7 @@ function IconSelect(_ref) {
|
|
|
83
80
|
onChange: onChange
|
|
84
81
|
}))), /*#__PURE__*/React.createElement(TabPane, {
|
|
85
82
|
key: "customImg",
|
|
86
|
-
tab:
|
|
83
|
+
tab: intl.get("a3a25b03-18bc-4b75-b795-0c16fd0dcc22").d("自定义图片")
|
|
87
84
|
}, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CustomImg, {
|
|
88
85
|
iconInfo: iconInfo,
|
|
89
86
|
customFileInfo: customFileInfo,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import "@chaoswise/ui/lib/Modal/index.less";
|
|
2
2
|
import _Modal from "@chaoswise/ui/lib/Modal";
|
|
3
|
+
import _useIntl from "@chaoswise/ui/lib/useIntl";
|
|
3
4
|
var _excluded = ["visible", "src"];
|
|
4
5
|
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
5
6
|
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; }
|
|
@@ -11,6 +12,7 @@ function ImgModal(_ref) {
|
|
|
11
12
|
_ref$src = _ref.src,
|
|
12
13
|
src = _ref$src === void 0 ? '' : _ref$src,
|
|
13
14
|
resProps = _objectWithoutProperties(_ref, _excluded);
|
|
15
|
+
var intl = _useIntl();
|
|
14
16
|
return /*#__PURE__*/React.createElement(_Modal, _extends({
|
|
15
17
|
visible: visible,
|
|
16
18
|
footer: null
|
|
@@ -23,7 +25,7 @@ function ImgModal(_ref) {
|
|
|
23
25
|
maxWidth: '100%'
|
|
24
26
|
},
|
|
25
27
|
src: src,
|
|
26
|
-
alt: "
|
|
28
|
+
alt: intl.get("2341c10c-cea7-4980-8331-8b176515485d").d("图片丢失,请检查您的图片地址")
|
|
27
29
|
})));
|
|
28
30
|
}
|
|
29
31
|
export default ImgModal;
|
package/lib/Joyride/List.js
CHANGED
|
@@ -2,10 +2,8 @@ import _Carousel from "@chaoswise/ui/lib/Carousel";
|
|
|
2
2
|
import _Icon from "@chaoswise/ui/lib/Icon";
|
|
3
3
|
import "@chaoswise/ui/lib/Progress/index.less";
|
|
4
4
|
import _Progress from "@chaoswise/ui/lib/Progress";
|
|
5
|
-
import
|
|
5
|
+
import useIntl from '../useIntl';
|
|
6
6
|
import React from "react";
|
|
7
|
-
import langConfig from './locale';
|
|
8
|
-
import { formatMessage } from "../utils";
|
|
9
7
|
import { map, chunk } from "lodash-es";
|
|
10
8
|
function List(_ref) {
|
|
11
9
|
var _ref$pageSize = _ref.pageSize,
|
|
@@ -14,8 +12,11 @@ function List(_ref) {
|
|
|
14
12
|
data = _ref$data === void 0 ? {} : _ref$data,
|
|
15
13
|
_ref$onItemClick = _ref.onItemClick,
|
|
16
14
|
onItemClick = _ref$onItemClick === void 0 ? function () {} : _ref$onItemClick;
|
|
17
|
-
var
|
|
18
|
-
|
|
15
|
+
var intl = useIntl();
|
|
16
|
+
var taskCount = data.nviceGuidanceLists ? data.nviceGuidanceLists.length : 0;
|
|
17
|
+
var totalText = intl.get("e5859a06-2a3e-46f9-a333-4b676d35adcd", {
|
|
18
|
+
taskCount: taskCount
|
|
19
|
+
}).d("共有{taskCount}项任务");
|
|
19
20
|
var getPercent = function getPercent() {
|
|
20
21
|
if (data && data.nviceGuidanceLists) {
|
|
21
22
|
var finiedNum = data.nviceGuidanceLists.filter(function (item) {
|
|
@@ -29,7 +30,7 @@ function List(_ref) {
|
|
|
29
30
|
className: "cw-joyride-taskCard"
|
|
30
31
|
}, /*#__PURE__*/React.createElement("div", {
|
|
31
32
|
className: "cw-joyride-taskCard-title"
|
|
32
|
-
},
|
|
33
|
+
}, intl.get("17330d4a-215d-4662-b3f1-1e5f4a511b4e").d("我的新手任务")), /*#__PURE__*/React.createElement("div", {
|
|
33
34
|
className: "cw-joyride-taskCard-top",
|
|
34
35
|
style: {
|
|
35
36
|
marginBottom: 25
|
|
@@ -42,7 +43,7 @@ function List(_ref) {
|
|
|
42
43
|
style: {
|
|
43
44
|
marginLeft: 20
|
|
44
45
|
}
|
|
45
|
-
},
|
|
46
|
+
}, totalText)), /*#__PURE__*/React.createElement("div", {
|
|
46
47
|
className: "cw-joyride-taskCard-bottom"
|
|
47
48
|
}, /*#__PURE__*/React.createElement(_Carousel, {
|
|
48
49
|
className: "joyride-carousel"
|
|
@@ -62,7 +63,7 @@ function List(_ref) {
|
|
|
62
63
|
return onItemClick(item, index);
|
|
63
64
|
},
|
|
64
65
|
className: isFinish ? "cw-joyride-carousel-finish" : "cw-joyride-carousel-noFinish"
|
|
65
|
-
}, isFinish ?
|
|
66
|
+
}, isFinish ? intl.get("434bcb1f-9c8f-47d7-8b7e-b5832a69d873").d("已完成") : intl.get("d6a28397-1112-41a6-b9ae-a061f866dfd5").d("去完成"), isFinish && /*#__PURE__*/React.createElement(_Icon, {
|
|
66
67
|
type: "check-circle",
|
|
67
68
|
theme: "filled",
|
|
68
69
|
className: "cw-joyride-car-icon"
|
package/lib/Joyride/index.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import "@chaoswise/ui/lib/Modal/index.less";
|
|
2
2
|
import _Modal from "@chaoswise/ui/lib/Modal";
|
|
3
3
|
import _Icon from "@chaoswise/ui/lib/Icon";
|
|
4
|
-
import _useLocale2 from "@chaoswise/ui/lib/useLocale";
|
|
5
4
|
var _excluded = ["run", "steps", "beginCallback", "finishCallback", "nextCallback", "callback", "onClose", "isShowHomeModal", "isShowNextModal", "isShowFinishedModal", "onFinished", "onNextCancel", "onFinishCancel", "onWelecomCancel"];
|
|
6
5
|
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
7
6
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
@@ -18,6 +17,7 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
|
|
|
18
17
|
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
19
18
|
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; }
|
|
20
19
|
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; }
|
|
20
|
+
import useIntl from '../useIntl';
|
|
21
21
|
import React, { useState, useEffect, useMemo, Fragment } from "react";
|
|
22
22
|
import Joyride, { STATUS, ACTIONS } from "react-joyride";
|
|
23
23
|
import PropTypes from "prop-types";
|
|
@@ -25,8 +25,6 @@ import "./index.less";
|
|
|
25
25
|
import welcomeImg from "./img/welcomeImg.png";
|
|
26
26
|
import finishImg from "./img/finishImg.png";
|
|
27
27
|
import List from './List';
|
|
28
|
-
import langConfig from './locale';
|
|
29
|
-
import { formatMessage } from "../utils";
|
|
30
28
|
import { merge } from "lodash-es";
|
|
31
29
|
|
|
32
30
|
/**
|
|
@@ -83,8 +81,7 @@ function CWJoyride(_ref) {
|
|
|
83
81
|
isClose = _useState0[0],
|
|
84
82
|
setIsClose = _useState0[1]; // 是否点击了关闭 关闭后停止指引但是不算完成
|
|
85
83
|
|
|
86
|
-
var
|
|
87
|
-
localeObj = _useLocale.langObj;
|
|
84
|
+
var intl = useIntl();
|
|
88
85
|
|
|
89
86
|
// 根据受控状态控制state状态
|
|
90
87
|
useEffect(function () {
|
|
@@ -156,26 +153,26 @@ function CWJoyride(_ref) {
|
|
|
156
153
|
style: {
|
|
157
154
|
color: "#8C8C8C"
|
|
158
155
|
}
|
|
159
|
-
},
|
|
156
|
+
}, intl.get("1af45112-1b5c-40f3-9690-1a149e930f88").d("跳过")),
|
|
160
157
|
next: /*#__PURE__*/React.createElement("span", {
|
|
161
158
|
style: {
|
|
162
159
|
color: "#1890FF"
|
|
163
160
|
}
|
|
164
|
-
},
|
|
161
|
+
}, intl.get("989a0bb6-6956-41d0-b5c2-329f8b1e846c").d("下一步")),
|
|
165
162
|
last: /*#__PURE__*/React.createElement("span", {
|
|
166
163
|
style: {
|
|
167
164
|
color: "#1890FF"
|
|
168
165
|
}
|
|
169
|
-
},
|
|
166
|
+
}, intl.get("50564a90-872a-4261-adf7-9c5ee27f0952").d("完成")),
|
|
170
167
|
back: /*#__PURE__*/React.createElement("span", {
|
|
171
168
|
style: {
|
|
172
169
|
color: "#5D5D5D"
|
|
173
170
|
}
|
|
174
|
-
},
|
|
171
|
+
}, intl.get("dd25dcba-5aea-4f44-9653-9ff61442e830").d("上一步"))
|
|
175
172
|
}, item.locale || {})
|
|
176
173
|
});
|
|
177
174
|
});
|
|
178
|
-
}, [steps]);
|
|
175
|
+
}, [steps, intl]);
|
|
179
176
|
var welcomeHandleOk = function welcomeHandleOk() {
|
|
180
177
|
setWelcomeVisible(false);
|
|
181
178
|
setRun(true);
|
|
@@ -301,20 +298,20 @@ function CWJoyride(_ref) {
|
|
|
301
298
|
color: "#000",
|
|
302
299
|
fontWeight: 500
|
|
303
300
|
}
|
|
304
|
-
},
|
|
301
|
+
}, intl.get("126af199-2d93-436e-9ad3-8d63d825a7c6").d("欢迎来到~")), /*#__PURE__*/React.createElement("div", {
|
|
305
302
|
style: {
|
|
306
303
|
fontSize: 26,
|
|
307
304
|
color: "#000",
|
|
308
305
|
fontWeight: 600,
|
|
309
306
|
marginBottom: 24
|
|
310
307
|
}
|
|
311
|
-
},
|
|
308
|
+
}, intl.get("480cc919-f7c1-4720-a96f-11637c85d264").d("云智慧IT服务管理系统")), /*#__PURE__*/React.createElement("span", {
|
|
312
309
|
className: "cw-joyride-back",
|
|
313
310
|
onClick: welcomeHandleCancel
|
|
314
|
-
},
|
|
311
|
+
}, intl.get("086555de-352e-42b3-abd5-166f357b8aae").d("我不想进入")), /*#__PURE__*/React.createElement("span", {
|
|
315
312
|
className: "cw-joyride-enter",
|
|
316
313
|
onClick: welcomeHandleOk
|
|
317
|
-
},
|
|
314
|
+
}, intl.get("718d3498-3987-499b-b635-48894d4d159b").d("让我们开始新手指引吧"), /*#__PURE__*/React.createElement(_Icon, {
|
|
318
315
|
type: "arrow-right",
|
|
319
316
|
className: "cw-joyride-icon"
|
|
320
317
|
})))), /*#__PURE__*/React.createElement(_Modal, {
|
|
@@ -337,21 +334,21 @@ function CWJoyride(_ref) {
|
|
|
337
334
|
}
|
|
338
335
|
}, /*#__PURE__*/React.createElement("div", {
|
|
339
336
|
className: "cw-joyride-finish-title"
|
|
340
|
-
},
|
|
337
|
+
}, intl.get("e877d942-a34f-4b1a-85ac-9df28c4348fa").d("非常好!您已经完成此任务!")), /*#__PURE__*/React.createElement("div", {
|
|
341
338
|
style: {
|
|
342
339
|
fontSize: 16,
|
|
343
340
|
marginBottom: 24
|
|
344
341
|
},
|
|
345
342
|
className: "cw-joyride-finish-title"
|
|
346
|
-
},
|
|
343
|
+
}, intl.get("91bcccbc-6ec0-4297-a3d4-21ff9933741e").d("需要继续下一个任务吗?")), /*#__PURE__*/React.createElement("div", {
|
|
347
344
|
className: "cw-joyride-bottom"
|
|
348
345
|
}, /*#__PURE__*/React.createElement("span", {
|
|
349
346
|
className: "cw-joyride-back",
|
|
350
347
|
onClick: taskHandleCancel
|
|
351
|
-
},
|
|
348
|
+
}, intl.get("c15be09c-4779-4f40-8937-0f9a08f79407").d("不想继续了")), /*#__PURE__*/React.createElement("span", {
|
|
352
349
|
className: "cw-joyride-enter",
|
|
353
350
|
onClick: taskHandleOk
|
|
354
|
-
},
|
|
351
|
+
}, intl.get("809ebf17-05b1-4f18-9976-361efaf22257").d("继续下一个任务"), /*#__PURE__*/React.createElement(_Icon, {
|
|
355
352
|
type: "arrow-right",
|
|
356
353
|
className: "cw-joyride-icon"
|
|
357
354
|
}))))), /*#__PURE__*/React.createElement(_Modal, {
|
|
@@ -374,21 +371,21 @@ function CWJoyride(_ref) {
|
|
|
374
371
|
}
|
|
375
372
|
}, /*#__PURE__*/React.createElement("div", {
|
|
376
373
|
className: "cw-joyride-finish-title"
|
|
377
|
-
},
|
|
374
|
+
}, intl.get("c306cdef-1ef1-4492-a96f-699b2dd56c08").d("恭喜您已经完成所有任务!")), /*#__PURE__*/React.createElement("div", {
|
|
378
375
|
style: {
|
|
379
376
|
fontSize: 16,
|
|
380
377
|
marginBottom: 24
|
|
381
378
|
},
|
|
382
379
|
className: "cw-joyride-finish-title"
|
|
383
|
-
},
|
|
380
|
+
}, intl.get("9e61cd51-beca-4864-b95e-05a6db85a44d").d("再看一次新手引导吗?")), /*#__PURE__*/React.createElement("div", {
|
|
384
381
|
className: "cw-joyride-bottom"
|
|
385
382
|
}, /*#__PURE__*/React.createElement("span", {
|
|
386
383
|
className: "cw-joyride-back",
|
|
387
384
|
onClick: finishHandleCancel
|
|
388
|
-
},
|
|
385
|
+
}, intl.get("989b9a66-7de0-44bc-9572-d9c228580237").d("不了")), /*#__PURE__*/React.createElement("span", {
|
|
389
386
|
className: "cw-joyride-enter",
|
|
390
387
|
onClick: finishHandleOk
|
|
391
|
-
},
|
|
388
|
+
}, intl.get("0ff0f80d-d766-461c-91e3-22eb0f15a5e4").d("再看一次新手指引"), /*#__PURE__*/React.createElement(_Icon, {
|
|
392
389
|
type: "arrow-right",
|
|
393
390
|
className: "cw-joyride-icon"
|
|
394
391
|
}))))));
|
package/lib/Pagination/index.js
CHANGED
|
@@ -7,7 +7,6 @@ import "@chaoswise/ui/lib/SimplePagination/index.less";
|
|
|
7
7
|
import _SimplePagination from "@chaoswise/ui/lib/SimplePagination";
|
|
8
8
|
import "@chaoswise/ui/lib/Input/index.less";
|
|
9
9
|
import _Input from "@chaoswise/ui/lib/Input";
|
|
10
|
-
import _useLocale2 from "@chaoswise/ui/lib/useLocale";
|
|
11
10
|
import "@chaoswise/ui/lib/CWSelect/index.less";
|
|
12
11
|
import _CWSelect from "@chaoswise/ui/lib/CWSelect";
|
|
13
12
|
var _excluded = ["form", "total", "simple", "current", "size", "onShowSizeChange", "defaultCurrent", "pageSize", "defaultPageSize", "showTotal", "pageSizeOptions", "showQuickJumper", "showSizeChanger", "onChange", "disabled", "className", "itemRender", "hideOnSinglePage", "newLayout", "getPopupContainer"];
|
|
@@ -25,11 +24,12 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
|
|
|
25
24
|
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
26
25
|
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; }
|
|
27
26
|
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; }
|
|
27
|
+
import useIntl from '../useIntl';
|
|
28
|
+
import { isChineseLocale } from '../locales/runtime';
|
|
29
|
+
import useConfigLocale from '../ConfigProvider/useLocale';
|
|
28
30
|
import React, { useState, useEffect, useRef, useCallback, Fragment, useMemo } from "react";
|
|
29
31
|
import PropTypes from "prop-types";
|
|
30
32
|
import classnames from "classnames";
|
|
31
|
-
import langConfig from "./locale";
|
|
32
|
-
import { formatMessage } from "../utils";
|
|
33
33
|
import "./index.less";
|
|
34
34
|
var Option = _CWSelect.Option;
|
|
35
35
|
|
|
@@ -70,10 +70,10 @@ function CWPagination(props) {
|
|
|
70
70
|
newLayout = _props$newLayout === void 0 ? false : _props$newLayout,
|
|
71
71
|
getPopupContainer = props.getPopupContainer,
|
|
72
72
|
rest = _objectWithoutProperties(props, _excluded);
|
|
73
|
-
var
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
locale =
|
|
73
|
+
var intl = useIntl();
|
|
74
|
+
var _useConfigLocale = useConfigLocale(),
|
|
75
|
+
_useConfigLocale$loca = _useConfigLocale.locale,
|
|
76
|
+
locale = _useConfigLocale$loca === void 0 ? "zh_CN" : _useConfigLocale$loca;
|
|
77
77
|
var _useState = useState(""),
|
|
78
78
|
_useState2 = _slicedToArray(_useState, 2),
|
|
79
79
|
value = _useState2[0],
|
|
@@ -237,21 +237,21 @@ function CWPagination(props) {
|
|
|
237
237
|
return /*#__PURE__*/React.createElement(Option, {
|
|
238
238
|
value: value,
|
|
239
239
|
key: value
|
|
240
|
-
}, /*#__PURE__*/React.createElement(Fragment, null,
|
|
240
|
+
}, /*#__PURE__*/React.createElement(Fragment, null, intl.get("acf777b3-ca63-422a-bd56-05bd1bc6c789", {
|
|
241
241
|
item: value
|
|
242
|
-
})));
|
|
242
|
+
}).d("每页{item}条")));
|
|
243
243
|
})) : null;
|
|
244
244
|
var isShowTotal = !simple && showTotal && !disabled ? /*#__PURE__*/React.createElement("span", {
|
|
245
245
|
className: "cw-pagination-count"
|
|
246
|
-
}, typeof showTotal === "boolean" ? /*#__PURE__*/React.createElement(Fragment, null, locale
|
|
246
|
+
}, typeof showTotal === "boolean" ? /*#__PURE__*/React.createElement(Fragment, null, isChineseLocale(locale) ? /*#__PURE__*/React.createElement(Fragment, null, intl.get("00b3f4d8-c170-44ac-8093-c4f862a69602").d("共"), /*#__PURE__*/React.createElement("span", {
|
|
247
247
|
style: {
|
|
248
248
|
padding: "0 4px"
|
|
249
249
|
}
|
|
250
|
-
}, total),
|
|
250
|
+
}, total), intl.get("30e2d76f-ae4c-4e76-8127-442489c56a5b").d("条")) : /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("span", {
|
|
251
251
|
style: {
|
|
252
252
|
padding: "0 4px"
|
|
253
253
|
}
|
|
254
|
-
}, total),
|
|
254
|
+
}, total), intl.get("00b3f4d8-c170-44ac-8093-c4f862a69602").d("共"))) : /*#__PURE__*/React.createElement(Fragment, null, showTotal(total, [total === 0 ? 0 : (_current - 1) * _pageSize + 1, _current * _pageSize > total ? total : _current * _pageSize], pageCount))) : null;
|
|
255
255
|
var quickjumper = !simple && showQuickJumper && !disabled ? /*#__PURE__*/React.createElement("div", {
|
|
256
256
|
className: "cw-pagination-input-main",
|
|
257
257
|
style: {
|
|
@@ -259,7 +259,7 @@ function CWPagination(props) {
|
|
|
259
259
|
marginLeft: 16
|
|
260
260
|
},
|
|
261
261
|
ref: inputRef
|
|
262
|
-
}, /*#__PURE__*/React.createElement("span", null,
|
|
262
|
+
}, /*#__PURE__*/React.createElement("span", null, intl.get("04ff2a8c-2d76-4876-8987-e9e47137bdda").d("跳到")), /*#__PURE__*/React.createElement(_Input, {
|
|
263
263
|
value: value,
|
|
264
264
|
size: size === "small" ? "small" : "default",
|
|
265
265
|
onPressEnter: inputEnterHandle,
|
|
@@ -267,7 +267,7 @@ function CWPagination(props) {
|
|
|
267
267
|
className: "cw-pagination-jump-input",
|
|
268
268
|
onChange: inputChange,
|
|
269
269
|
type: "text"
|
|
270
|
-
}), /*#__PURE__*/React.createElement("span", null,
|
|
270
|
+
}), /*#__PURE__*/React.createElement("span", null, intl.get("2009fddc-5e22-466d-b922-618361b38495").d("页"))) : null;
|
|
271
271
|
var finalRenderPagination = /*#__PURE__*/React.createElement("div", {
|
|
272
272
|
className: "cw-pagination-wrapper",
|
|
273
273
|
style: {
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import _Menu from "@chaoswise/ui/lib/Menu";
|
|
2
|
+
import _useIntl from "@chaoswise/ui/lib/useIntl";
|
|
2
3
|
import React from "react";
|
|
3
4
|
import { translateString, analysisString } from './util';
|
|
4
5
|
var DropdownMenu = function DropdownMenu(props) {
|
|
6
|
+
var intl = _useIntl();
|
|
5
7
|
var value = props.value,
|
|
6
8
|
list = props.list,
|
|
7
9
|
commonPrefixCls = props.commonPrefixCls,
|
|
@@ -14,12 +16,12 @@ var DropdownMenu = function DropdownMenu(props) {
|
|
|
14
16
|
var itemClassName = commonPrefixCls + '-dropdown-item';
|
|
15
17
|
// 内置的
|
|
16
18
|
// // list innerList searchList
|
|
17
|
-
var innerList =
|
|
19
|
+
var innerList = /*#__PURE__*/React.createElement(_Menu.Item, {
|
|
18
20
|
className: itemClassName,
|
|
19
21
|
style: {
|
|
20
22
|
cursor: 'default'
|
|
21
23
|
}
|
|
22
|
-
}, "
|
|
24
|
+
}, intl.get("3695c1f5-4de2-4efd-a1f6-47196e2ff8e0").d("搜索"), dealedValue);
|
|
23
25
|
|
|
24
26
|
// 外侧传的列表数据
|
|
25
27
|
var outList = [];
|