@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,301 +0,0 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
-
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
3
|
-
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
4
|
-
var __awaiter = this && this.__awaiter || function (thisArg, _arguments, P, generator) {
|
|
5
|
-
function adopt(value) {
|
|
6
|
-
return value instanceof P ? value : new P(function (resolve) {
|
|
7
|
-
resolve(value);
|
|
8
|
-
});
|
|
9
|
-
}
|
|
10
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
11
|
-
function fulfilled(value) {
|
|
12
|
-
try {
|
|
13
|
-
step(generator.next(value));
|
|
14
|
-
} catch (e) {
|
|
15
|
-
reject(e);
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
function rejected(value) {
|
|
19
|
-
try {
|
|
20
|
-
step(generator["throw"](value));
|
|
21
|
-
} catch (e) {
|
|
22
|
-
reject(e);
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
function step(result) {
|
|
26
|
-
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
27
|
-
}
|
|
28
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
29
|
-
});
|
|
30
|
-
};
|
|
31
|
-
import * as React from 'react';
|
|
32
|
-
import Notification from 'rc-notification';
|
|
33
|
-
import CloseOutlined from "@ant-design/icons/es/icons/CloseOutlined";
|
|
34
|
-
import classNames from 'classnames';
|
|
35
|
-
import CheckCircleOutlined from "@ant-design/icons/es/icons/CheckCircleOutlined";
|
|
36
|
-
import CloseCircleOutlined from "@ant-design/icons/es/icons/CloseCircleOutlined";
|
|
37
|
-
import ExclamationCircleOutlined from "@ant-design/icons/es/icons/ExclamationCircleOutlined";
|
|
38
|
-
import InfoCircleOutlined from "@ant-design/icons/es/icons/InfoCircleOutlined";
|
|
39
|
-
import createUseNotification from './hooks/useNotification';
|
|
40
|
-
import ConfigProvider, { globalConfig } from '../config-provider';
|
|
41
|
-
var notificationInstance = {};
|
|
42
|
-
var defaultDuration = 4.5;
|
|
43
|
-
var defaultTop = 24;
|
|
44
|
-
var defaultBottom = 24;
|
|
45
|
-
var defaultPrefixCls = '';
|
|
46
|
-
var defaultPlacement = 'topRight';
|
|
47
|
-
var defaultGetContainer;
|
|
48
|
-
var defaultCloseIcon;
|
|
49
|
-
var rtl = false;
|
|
50
|
-
var maxCount;
|
|
51
|
-
function setNotificationConfig(options) {
|
|
52
|
-
var duration = options.duration,
|
|
53
|
-
placement = options.placement,
|
|
54
|
-
bottom = options.bottom,
|
|
55
|
-
top = options.top,
|
|
56
|
-
getContainer = options.getContainer,
|
|
57
|
-
closeIcon = options.closeIcon,
|
|
58
|
-
prefixCls = options.prefixCls;
|
|
59
|
-
if (prefixCls !== undefined) {
|
|
60
|
-
defaultPrefixCls = prefixCls;
|
|
61
|
-
}
|
|
62
|
-
if (duration !== undefined) {
|
|
63
|
-
defaultDuration = duration;
|
|
64
|
-
}
|
|
65
|
-
if (placement !== undefined) {
|
|
66
|
-
defaultPlacement = placement;
|
|
67
|
-
} else if (options.rtl) {
|
|
68
|
-
defaultPlacement = 'topLeft';
|
|
69
|
-
}
|
|
70
|
-
if (bottom !== undefined) {
|
|
71
|
-
defaultBottom = bottom;
|
|
72
|
-
}
|
|
73
|
-
if (top !== undefined) {
|
|
74
|
-
defaultTop = top;
|
|
75
|
-
}
|
|
76
|
-
if (getContainer !== undefined) {
|
|
77
|
-
defaultGetContainer = getContainer;
|
|
78
|
-
}
|
|
79
|
-
if (closeIcon !== undefined) {
|
|
80
|
-
defaultCloseIcon = closeIcon;
|
|
81
|
-
}
|
|
82
|
-
if (options.rtl !== undefined) {
|
|
83
|
-
rtl = options.rtl;
|
|
84
|
-
}
|
|
85
|
-
if (options.maxCount !== undefined) {
|
|
86
|
-
maxCount = options.maxCount;
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
function getPlacementStyle(placement) {
|
|
90
|
-
var top = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : defaultTop;
|
|
91
|
-
var bottom = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : defaultBottom;
|
|
92
|
-
var style;
|
|
93
|
-
switch (placement) {
|
|
94
|
-
case 'top':
|
|
95
|
-
style = {
|
|
96
|
-
left: '50%',
|
|
97
|
-
transform: 'translateX(-50%)',
|
|
98
|
-
right: 'auto',
|
|
99
|
-
top: top,
|
|
100
|
-
bottom: 'auto'
|
|
101
|
-
};
|
|
102
|
-
break;
|
|
103
|
-
case 'topLeft':
|
|
104
|
-
style = {
|
|
105
|
-
left: 0,
|
|
106
|
-
top: top,
|
|
107
|
-
bottom: 'auto'
|
|
108
|
-
};
|
|
109
|
-
break;
|
|
110
|
-
case 'topRight':
|
|
111
|
-
style = {
|
|
112
|
-
right: 0,
|
|
113
|
-
top: top,
|
|
114
|
-
bottom: 'auto'
|
|
115
|
-
};
|
|
116
|
-
break;
|
|
117
|
-
case 'bottom':
|
|
118
|
-
style = {
|
|
119
|
-
left: '50%',
|
|
120
|
-
transform: 'translateX(-50%)',
|
|
121
|
-
right: 'auto',
|
|
122
|
-
top: 'auto',
|
|
123
|
-
bottom: bottom
|
|
124
|
-
};
|
|
125
|
-
break;
|
|
126
|
-
case 'bottomLeft':
|
|
127
|
-
style = {
|
|
128
|
-
left: 0,
|
|
129
|
-
top: 'auto',
|
|
130
|
-
bottom: bottom
|
|
131
|
-
};
|
|
132
|
-
break;
|
|
133
|
-
default:
|
|
134
|
-
style = {
|
|
135
|
-
right: 0,
|
|
136
|
-
top: 'auto',
|
|
137
|
-
bottom: bottom
|
|
138
|
-
};
|
|
139
|
-
break;
|
|
140
|
-
}
|
|
141
|
-
return style;
|
|
142
|
-
}
|
|
143
|
-
function getNotificationInstance(args, callback) {
|
|
144
|
-
var _args$placement = args.placement,
|
|
145
|
-
placement = _args$placement === void 0 ? defaultPlacement : _args$placement,
|
|
146
|
-
top = args.top,
|
|
147
|
-
bottom = args.bottom,
|
|
148
|
-
_args$getContainer = args.getContainer,
|
|
149
|
-
getContainer = _args$getContainer === void 0 ? defaultGetContainer : _args$getContainer,
|
|
150
|
-
customizePrefixCls = args.prefixCls;
|
|
151
|
-
var _globalConfig = globalConfig(),
|
|
152
|
-
getPrefixCls = _globalConfig.getPrefixCls,
|
|
153
|
-
getIconPrefixCls = _globalConfig.getIconPrefixCls;
|
|
154
|
-
var prefixCls = getPrefixCls('notification', customizePrefixCls || defaultPrefixCls);
|
|
155
|
-
var iconPrefixCls = getIconPrefixCls();
|
|
156
|
-
var cacheKey = "".concat(prefixCls, "-").concat(placement);
|
|
157
|
-
var cacheInstance = notificationInstance[cacheKey];
|
|
158
|
-
if (cacheInstance) {
|
|
159
|
-
Promise.resolve(cacheInstance).then(function (instance) {
|
|
160
|
-
callback({
|
|
161
|
-
prefixCls: "".concat(prefixCls, "-notice"),
|
|
162
|
-
iconPrefixCls: iconPrefixCls,
|
|
163
|
-
instance: instance
|
|
164
|
-
});
|
|
165
|
-
});
|
|
166
|
-
return;
|
|
167
|
-
}
|
|
168
|
-
var notificationClass = classNames("".concat(prefixCls, "-").concat(placement), _defineProperty({}, "".concat(prefixCls, "-rtl"), rtl === true));
|
|
169
|
-
notificationInstance[cacheKey] = new Promise(function (resolve) {
|
|
170
|
-
Notification.newInstance({
|
|
171
|
-
prefixCls: prefixCls,
|
|
172
|
-
className: notificationClass,
|
|
173
|
-
style: getPlacementStyle(placement, top, bottom),
|
|
174
|
-
getContainer: getContainer,
|
|
175
|
-
maxCount: maxCount
|
|
176
|
-
}, function (notification) {
|
|
177
|
-
resolve(notification);
|
|
178
|
-
callback({
|
|
179
|
-
prefixCls: "".concat(prefixCls, "-notice"),
|
|
180
|
-
iconPrefixCls: iconPrefixCls,
|
|
181
|
-
instance: notification
|
|
182
|
-
});
|
|
183
|
-
});
|
|
184
|
-
});
|
|
185
|
-
}
|
|
186
|
-
var typeToIcon = {
|
|
187
|
-
success: CheckCircleOutlined,
|
|
188
|
-
info: InfoCircleOutlined,
|
|
189
|
-
error: CloseCircleOutlined,
|
|
190
|
-
warning: ExclamationCircleOutlined
|
|
191
|
-
};
|
|
192
|
-
function getRCNoticeProps(args, prefixCls, iconPrefixCls) {
|
|
193
|
-
var durationArg = args.duration,
|
|
194
|
-
icon = args.icon,
|
|
195
|
-
type = args.type,
|
|
196
|
-
description = args.description,
|
|
197
|
-
message = args.message,
|
|
198
|
-
btn = args.btn,
|
|
199
|
-
onClose = args.onClose,
|
|
200
|
-
onClick = args.onClick,
|
|
201
|
-
key = args.key,
|
|
202
|
-
style = args.style,
|
|
203
|
-
className = args.className,
|
|
204
|
-
_args$closeIcon = args.closeIcon,
|
|
205
|
-
closeIcon = _args$closeIcon === void 0 ? defaultCloseIcon : _args$closeIcon;
|
|
206
|
-
var duration = durationArg === undefined ? defaultDuration : durationArg;
|
|
207
|
-
var iconNode = null;
|
|
208
|
-
if (icon) {
|
|
209
|
-
iconNode = /*#__PURE__*/React.createElement("span", {
|
|
210
|
-
className: "".concat(prefixCls, "-icon")
|
|
211
|
-
}, args.icon);
|
|
212
|
-
} else if (type) {
|
|
213
|
-
iconNode = /*#__PURE__*/React.createElement(typeToIcon[type] || null, {
|
|
214
|
-
className: "".concat(prefixCls, "-icon ").concat(prefixCls, "-icon-").concat(type)
|
|
215
|
-
});
|
|
216
|
-
}
|
|
217
|
-
var closeIconToRender = /*#__PURE__*/React.createElement("span", {
|
|
218
|
-
className: "".concat(prefixCls, "-close-x")
|
|
219
|
-
}, closeIcon || /*#__PURE__*/React.createElement(CloseOutlined, {
|
|
220
|
-
className: "".concat(prefixCls, "-close-icon")
|
|
221
|
-
}));
|
|
222
|
-
var autoMarginTag = !description && iconNode ? /*#__PURE__*/React.createElement("span", {
|
|
223
|
-
className: "".concat(prefixCls, "-message-single-line-auto-margin")
|
|
224
|
-
}) : null;
|
|
225
|
-
return {
|
|
226
|
-
content: /*#__PURE__*/React.createElement(ConfigProvider, {
|
|
227
|
-
iconPrefixCls: iconPrefixCls
|
|
228
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
229
|
-
className: iconNode ? "".concat(prefixCls, "-with-icon") : '',
|
|
230
|
-
role: "alert"
|
|
231
|
-
}, iconNode, /*#__PURE__*/React.createElement("div", {
|
|
232
|
-
className: "".concat(prefixCls, "-message")
|
|
233
|
-
}, autoMarginTag, message), /*#__PURE__*/React.createElement("div", {
|
|
234
|
-
className: "".concat(prefixCls, "-description")
|
|
235
|
-
}, description), btn ? /*#__PURE__*/React.createElement("span", {
|
|
236
|
-
className: "".concat(prefixCls, "-btn")
|
|
237
|
-
}, btn) : null)),
|
|
238
|
-
duration: duration,
|
|
239
|
-
closable: true,
|
|
240
|
-
closeIcon: closeIconToRender,
|
|
241
|
-
onClose: onClose,
|
|
242
|
-
onClick: onClick,
|
|
243
|
-
key: key,
|
|
244
|
-
style: style || {},
|
|
245
|
-
className: classNames(className, _defineProperty({}, "".concat(prefixCls, "-").concat(type), !!type))
|
|
246
|
-
};
|
|
247
|
-
}
|
|
248
|
-
function notice(args) {
|
|
249
|
-
getNotificationInstance(args, function (_ref) {
|
|
250
|
-
var prefixCls = _ref.prefixCls,
|
|
251
|
-
iconPrefixCls = _ref.iconPrefixCls,
|
|
252
|
-
instance = _ref.instance;
|
|
253
|
-
instance.notice(getRCNoticeProps(args, prefixCls, iconPrefixCls));
|
|
254
|
-
});
|
|
255
|
-
}
|
|
256
|
-
var api = {
|
|
257
|
-
open: notice,
|
|
258
|
-
close: function close(key) {
|
|
259
|
-
Object.keys(notificationInstance).forEach(function (cacheKey) {
|
|
260
|
-
return Promise.resolve(notificationInstance[cacheKey]).then(function (instance) {
|
|
261
|
-
instance.removeNotice(key);
|
|
262
|
-
});
|
|
263
|
-
});
|
|
264
|
-
},
|
|
265
|
-
config: setNotificationConfig,
|
|
266
|
-
destroy: function destroy() {
|
|
267
|
-
Object.keys(notificationInstance).forEach(function (cacheKey) {
|
|
268
|
-
Promise.resolve(notificationInstance[cacheKey]).then(function (instance) {
|
|
269
|
-
instance.destroy();
|
|
270
|
-
});
|
|
271
|
-
delete notificationInstance[cacheKey]; // lgtm[js/missing-await]
|
|
272
|
-
});
|
|
273
|
-
}
|
|
274
|
-
};
|
|
275
|
-
['success', 'info', 'warning', 'error'].forEach(function (type) {
|
|
276
|
-
api[type] = function (args) {
|
|
277
|
-
return api.open(_extends(_extends({}, args), {
|
|
278
|
-
type: type
|
|
279
|
-
}));
|
|
280
|
-
};
|
|
281
|
-
});
|
|
282
|
-
api.warn = api.warning;
|
|
283
|
-
api.useNotification = createUseNotification(getNotificationInstance, getRCNoticeProps);
|
|
284
|
-
/** @private test Only function. Not work on production */
|
|
285
|
-
|
|
286
|
-
export var getInstance = function getInstance(cacheKey) {
|
|
287
|
-
return __awaiter(void 0, void 0, void 0, /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
|
288
|
-
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
289
|
-
while (1) {
|
|
290
|
-
switch (_context.prev = _context.next) {
|
|
291
|
-
case 0:
|
|
292
|
-
return _context.abrupt("return", process.env.NODE_ENV === 'test' ? notificationInstance[cacheKey] : null);
|
|
293
|
-
case 1:
|
|
294
|
-
case "end":
|
|
295
|
-
return _context.stop();
|
|
296
|
-
}
|
|
297
|
-
}
|
|
298
|
-
}, _callee);
|
|
299
|
-
}));
|
|
300
|
-
};
|
|
301
|
-
export default api;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import zh_CN from './zh_CN.js';
|
|
2
|
-
import en_US from './en_US.js';
|
|
3
|
-
import zh_TW from './zh_TW.js';
|
|
4
|
-
import ja_JP from './ja_JP.js';
|
|
5
|
-
export default {
|
|
6
|
-
zh_CN: zh_CN,
|
|
7
|
-
en_US: en_US,
|
|
8
|
-
zh_TW: zh_TW,
|
|
9
|
-
ja_JP: ja_JP,
|
|
10
|
-
// 兼容
|
|
11
|
-
zh: zh_CN,
|
|
12
|
-
en: en_US
|
|
13
|
-
};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export default {
|
|
2
|
-
"markAllRead": "Mark all read",
|
|
3
|
-
"no_new_messages": "No new messages",
|
|
4
|
-
"more": "More",
|
|
5
|
-
"totalItems": "{total} total",
|
|
6
|
-
"ok": "OK",
|
|
7
|
-
"playAutomatically": "Message alerts can be played automatically only when interactive behavior is required"
|
|
8
|
-
};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import zh_CN from './zh_CN.js';
|
|
2
|
-
import en_US from './en_US.js';
|
|
3
|
-
import zh_TW from './zh_TW.js';
|
|
4
|
-
import ja_JP from './ja_JP.js';
|
|
5
|
-
export default {
|
|
6
|
-
zh_CN: zh_CN,
|
|
7
|
-
en_US: en_US,
|
|
8
|
-
zh_TW: zh_TW,
|
|
9
|
-
ja_JP: ja_JP,
|
|
10
|
-
// 兼容
|
|
11
|
-
zh: zh_CN,
|
|
12
|
-
en: en_US
|
|
13
|
-
};
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
export default {
|
|
2
|
-
recover: "Restore default",
|
|
3
|
-
forwardSmooth: "Forward smooth",
|
|
4
|
-
backSmooth: "Back smooth",
|
|
5
|
-
ExpandSpan: "Increase the time span by {span} times",
|
|
6
|
-
refresh: "Refresh",
|
|
7
|
-
autoRefresh: "Auto refresh",
|
|
8
|
-
s: "Second",
|
|
9
|
-
m: "Minute",
|
|
10
|
-
h: "Hour",
|
|
11
|
-
d: "Day",
|
|
12
|
-
mo: "Month",
|
|
13
|
-
y: "Year",
|
|
14
|
-
more: "More",
|
|
15
|
-
"select-calendar": "Select From Calendar",
|
|
16
|
-
recently: "recently",
|
|
17
|
-
relative: "relative",
|
|
18
|
-
absolute: "absolute",
|
|
19
|
-
unixTimestamp: "Unix",
|
|
20
|
-
other: "other",
|
|
21
|
-
history: 'History',
|
|
22
|
-
clear: 'Clear',
|
|
23
|
-
"enter manually": "You can manually enter a query statement in the following format",
|
|
24
|
-
"fit-the-input-format": "Fit the input format",
|
|
25
|
-
"does-not-match-the-input-format": "Does not match the input format",
|
|
26
|
-
"the-selected-time-does-not-meet-the-rule-limit": "If the selected time is the same or exceeds the current time, select another time",
|
|
27
|
-
"the-maximum-time-span-is-exceeded": "The maximum time span is exceeded, please re-enter",
|
|
28
|
-
"unconverted-title": "Unconverted title"
|
|
29
|
-
};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import zh_CN from './zh_CN.js';
|
|
2
|
-
import en_US from './en_US.js';
|
|
3
|
-
import zh_TW from './zh_TW.js';
|
|
4
|
-
import ja_JP from './ja_JP.js';
|
|
5
|
-
export default {
|
|
6
|
-
zh_CN: zh_CN,
|
|
7
|
-
en_US: en_US,
|
|
8
|
-
zh_TW: zh_TW,
|
|
9
|
-
ja_JP: ja_JP,
|
|
10
|
-
// 兼容
|
|
11
|
-
zh: zh_CN,
|
|
12
|
-
en: en_US
|
|
13
|
-
};
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
export default {
|
|
2
|
-
recover: "デフォルトに戻す",
|
|
3
|
-
forwardSmooth: "前方スムージング",
|
|
4
|
-
backSmooth: "後方スムージング",
|
|
5
|
-
ExpandSpan: "時間範囲を{span}倍に拡大",
|
|
6
|
-
refresh: "リフレッシュ",
|
|
7
|
-
autoRefresh: "自動リフレッシュ",
|
|
8
|
-
s: "秒",
|
|
9
|
-
m: "分",
|
|
10
|
-
h: "時間",
|
|
11
|
-
d: "日",
|
|
12
|
-
mo: "月",
|
|
13
|
-
y: "年",
|
|
14
|
-
more: "さらに表示",
|
|
15
|
-
"select-calendar": "カレンダーから選択",
|
|
16
|
-
recently: "最近",
|
|
17
|
-
relative: "相対",
|
|
18
|
-
absolute: "絶対",
|
|
19
|
-
unixTimestamp: "Unix",
|
|
20
|
-
other: "その他",
|
|
21
|
-
history: '履歴',
|
|
22
|
-
clear: 'クリア',
|
|
23
|
-
"enter manually": "以下の形式で手動入力できます",
|
|
24
|
-
"fit-the-input-format": "入力形式に適合",
|
|
25
|
-
"does-not-match-the-input-format": "入力形式に一致しません。再入力してください",
|
|
26
|
-
"the-selected-time-does-not-meet-the-rule-limit": "選択した時刻が同じか現在時刻を超えています。別の時刻を選択してください",
|
|
27
|
-
"the-maximum-time-span-is-exceeded": "最大時間範囲を超過しています。再入力してください",
|
|
28
|
-
"unconverted-title": "未変換のタイトル"
|
|
29
|
-
};
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
export default {
|
|
2
|
-
recover: "恢复默认值",
|
|
3
|
-
forwardSmooth: "向前平滑",
|
|
4
|
-
backSmooth: "向后平滑",
|
|
5
|
-
ExpandSpan: "按{span}倍增加时间跨度",
|
|
6
|
-
refresh: "刷新",
|
|
7
|
-
autoRefresh: "自动刷新",
|
|
8
|
-
s: "秒",
|
|
9
|
-
m: "分钟",
|
|
10
|
-
h: "小时",
|
|
11
|
-
d: "天",
|
|
12
|
-
mo: "个月",
|
|
13
|
-
y: "年",
|
|
14
|
-
more: "更多",
|
|
15
|
-
"select-calendar": "日历选择",
|
|
16
|
-
recently: "最近",
|
|
17
|
-
relative: "相对",
|
|
18
|
-
absolute: "绝对",
|
|
19
|
-
unixTimestamp: "Unix",
|
|
20
|
-
other: "其他",
|
|
21
|
-
history: '历史记录',
|
|
22
|
-
clear: '清空',
|
|
23
|
-
"enter manually": "可根据以下类型,按查询语句格式手动输入",
|
|
24
|
-
"fit-the-input-format": "符合输入格式",
|
|
25
|
-
"does-not-match-the-input-format": "不符合输入格式,请重新输入",
|
|
26
|
-
"the-selected-time-does-not-meet-the-rule-limit": "选择的时间二者相同或者某一时间超过当前时间,请重新选择",
|
|
27
|
-
"the-maximum-time-span-is-exceeded": "超过了限制的最大时间跨度,请重新输入",
|
|
28
|
-
"unconverted-title": "未转化标题"
|
|
29
|
-
};
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
export default {
|
|
2
|
-
recover: "恢復默認值",
|
|
3
|
-
forwardSmooth: "向前平滑",
|
|
4
|
-
backSmooth: "向後平滑",
|
|
5
|
-
ExpandSpan: "按{span}倍增加時間跨度",
|
|
6
|
-
refresh: "刷新",
|
|
7
|
-
autoRefresh: "自動刷新",
|
|
8
|
-
s: "秒",
|
|
9
|
-
m: "分鐘",
|
|
10
|
-
h: "小時",
|
|
11
|
-
d: "天",
|
|
12
|
-
mo: "個月",
|
|
13
|
-
y: "年",
|
|
14
|
-
more: "更多",
|
|
15
|
-
"select-calendar": "日曆選擇",
|
|
16
|
-
recently: "最近",
|
|
17
|
-
relative: "相對",
|
|
18
|
-
absolute: "絕對",
|
|
19
|
-
unixTimestamp: "Unix",
|
|
20
|
-
other: "其他",
|
|
21
|
-
history: "歷史記錄",
|
|
22
|
-
clear: "清空",
|
|
23
|
-
"enter manually": "可根據以下類型,按查詢語句格式手動輸入",
|
|
24
|
-
"fit-the-input-format": "符合輸入格式",
|
|
25
|
-
"does-not-match-the-input-format": "不符合輸入格式,請重新輸入",
|
|
26
|
-
"the-selected-time-does-not-meet-the-rule-limit": "選擇的時間二者相同或者某一時間超過當前時間,請重新選擇",
|
|
27
|
-
"the-maximum-time-span-is-exceeded": "超過了限制的最大時間跨度,請重新輸入",
|
|
28
|
-
"unconverted-title": "未轉化標題"
|
|
29
|
-
};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import zh_CN from './zh_CN.js';
|
|
2
|
-
import en_US from './en_US.js';
|
|
3
|
-
import zh_TW from './zh_TW.js';
|
|
4
|
-
import ja_JP from './ja_JP.js';
|
|
5
|
-
export default {
|
|
6
|
-
zh_CN: zh_CN,
|
|
7
|
-
en_US: en_US,
|
|
8
|
-
zh_TW: zh_TW,
|
|
9
|
-
ja_JP: ja_JP,
|
|
10
|
-
// 兼容
|
|
11
|
-
zh: zh_CN,
|
|
12
|
-
en: en_US
|
|
13
|
-
};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import zh_CN from './zh_CN.js';
|
|
2
|
-
import en_US from './en_US.js';
|
|
3
|
-
import zh_TW from './zh_TW.js';
|
|
4
|
-
import ja_JP from './ja_JP.js';
|
|
5
|
-
export default {
|
|
6
|
-
zh_CN: zh_CN,
|
|
7
|
-
en_US: en_US,
|
|
8
|
-
zh_TW: zh_TW,
|
|
9
|
-
ja_JP: ja_JP,
|
|
10
|
-
// 兼容
|
|
11
|
-
zh: zh_CN,
|
|
12
|
-
en: en_US
|
|
13
|
-
};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import zh_CN from './zh_CN.js';
|
|
2
|
-
import en_US from './en_US.js';
|
|
3
|
-
import zh_TW from './zh_TW.js';
|
|
4
|
-
import ja_JP from './ja_JP.js';
|
|
5
|
-
export default {
|
|
6
|
-
zh_CN: zh_CN,
|
|
7
|
-
en_US: en_US,
|
|
8
|
-
zh_TW: zh_TW,
|
|
9
|
-
ja_JP: ja_JP,
|
|
10
|
-
// 兼容
|
|
11
|
-
zh: zh_CN,
|
|
12
|
-
en: en_US
|
|
13
|
-
};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import zh_CN from './zh_CN.js';
|
|
2
|
-
import en_US from './en_US.js';
|
|
3
|
-
import zh_TW from './zh_TW.js';
|
|
4
|
-
import ja_JP from './ja_JP.js';
|
|
5
|
-
export default {
|
|
6
|
-
zh_CN: zh_CN,
|
|
7
|
-
en_US: en_US,
|
|
8
|
-
zh_TW: zh_TW,
|
|
9
|
-
ja_JP: ja_JP,
|
|
10
|
-
// 兼容
|
|
11
|
-
zh: zh_CN,
|
|
12
|
-
en: en_US
|
|
13
|
-
};
|