@chaoswise/ui 2.7.10 → 2.7.12
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/Antd3/es/date-picker/locale/ja_JP.js +1 -1
- package/lib/Antd3/es/locale/ja_JP.js +1 -1
- package/lib/Antd4/comment/index.js +1 -1
- package/lib/Antd4/date-picker/locale/ja_JP.js +1 -1
- package/lib/Antd4/locale/ja_JP.js +1 -1
- package/lib/Antd4/notification/index.copy.js +301 -0
- package/lib/BasicLayout/index.js +3 -3
- package/lib/CWCascader/rc-cascader/OptionList/Column.js +17 -18
- package/lib/CWMessage/MessageContent/TabList/index.js +10 -10
- package/lib/CWMessage/MessageContent/index.js +26 -28
- package/lib/CWMessage/index.js +34 -37
- package/lib/CWRangePicker/index.js +11 -11
- package/lib/CWSelect/index.js +3 -3
- package/lib/CWTable/CWTable.js +23 -23
- package/lib/ConfigProvider/ConfigProvider.js +1 -0
- package/lib/DateRangePicker/RangeDateTimePicker.js +3 -3
- package/lib/DropdownDatePicker/index.js +3 -3
- package/lib/Empty/locale/ja_JP.js +1 -1
- package/lib/FilterDropDown/drag.svg +17 -0
- package/lib/Joyride/index.js +3 -3
- package/lib/ModuleFederation/react-dynamic-remote-component/RemoteComponent.js +38 -39
- package/lib/ModuleFederation/react-dynamic-remote-component/load-module.js +22 -23
- package/lib/PolymerizationSearch/index.js +7 -7
- package/lib/QuickTransfer/CheckList.js +47 -0
- package/lib/QuickTransfer/TopicList.js +152 -0
- package/lib/QuickTransfer/index.js +13 -13
- package/lib/SearchBar/OutSearch.js +9 -2
- package/lib/SearchBar/index.js +7 -7
- package/lib/SingleSpa/index.js +22 -24
- package/lib/TimeRangeSlider/TimeRangeSliderCmp/hooks/useMouse.js +3 -3
- package/lib/TimeRangeSlider/index.js +6 -6
- package/lib/TimeZoneSelect/index.js +21 -22
- package/lib/useConfgiContext/index.js +6 -0
- package/package.json +4 -2
- package/lib/Card/index.less +0 -10
|
@@ -17,7 +17,7 @@ import TimePickerLocale from '../../time-picker/locale/ja_JP';
|
|
|
17
17
|
var locale = {
|
|
18
18
|
lang: _extends({
|
|
19
19
|
placeholder: '日付を選択',
|
|
20
|
-
rangePlaceholder: ['
|
|
20
|
+
rangePlaceholder: ['開始日時', '終了日時']
|
|
21
21
|
}, CalendarLocale),
|
|
22
22
|
timePickerLocale: _extends({}, TimePickerLocale)
|
|
23
23
|
}; // All settings at:
|
|
@@ -44,7 +44,7 @@ var Comment = function Comment(_a) {
|
|
|
44
44
|
return /*#__PURE__*/React.createElement("li", {
|
|
45
45
|
key: "action-".concat(index)
|
|
46
46
|
}, action) // eslint-disable-line react/no-array-index-key
|
|
47
|
-
|
|
47
|
+
;
|
|
48
48
|
})) : null;
|
|
49
49
|
var authorContent = (author || datetime) && /*#__PURE__*/React.createElement("div", {
|
|
50
50
|
className: "".concat(prefixCls, "-content-author")
|
|
@@ -5,7 +5,7 @@ import TimePickerLocale from '../../time-picker/locale/ja_JP'; // Merge into a l
|
|
|
5
5
|
var locale = {
|
|
6
6
|
lang: _extends({
|
|
7
7
|
placeholder: '日付を選択',
|
|
8
|
-
rangePlaceholder: ['
|
|
8
|
+
rangePlaceholder: ['開始日時', '終了日時']
|
|
9
9
|
}, CalendarLocale),
|
|
10
10
|
timePickerLocale: _extends({}, TimePickerLocale)
|
|
11
11
|
}; // All settings at:
|
|
@@ -0,0 +1,301 @@
|
|
|
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;
|
package/lib/BasicLayout/index.js
CHANGED
|
@@ -132,9 +132,9 @@ var BasicLayout = function BasicLayout(_ref) {
|
|
|
132
132
|
};
|
|
133
133
|
var defaultSiderWidth = SIDER_WIDTH_MAP[locale] || siderWidth;
|
|
134
134
|
var _useState9 = useState(defaultSiderWidth),
|
|
135
|
-
|
|
136
|
-
_siderDragWidth =
|
|
137
|
-
_setSiderDragWidth =
|
|
135
|
+
_useState0 = _slicedToArray(_useState9, 2),
|
|
136
|
+
_siderDragWidth = _useState0[0],
|
|
137
|
+
_setSiderDragWidth = _useState0[1];
|
|
138
138
|
useEffect(function () {
|
|
139
139
|
onPassWidth(_siderDragWidth);
|
|
140
140
|
}, [_siderDragWidth]);
|
|
@@ -5,7 +5,8 @@ import _Spin from "@chaoswise/ui/lib/Spin";
|
|
|
5
5
|
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
6
6
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
7
7
|
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); }
|
|
8
|
-
function
|
|
8
|
+
function _regenerator() { /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */ var e, t, r = "function" == typeof Symbol ? Symbol : {}, n = r.iterator || "@@iterator", o = r.toStringTag || "@@toStringTag"; function i(r, n, o, i) { var c = n && n.prototype instanceof Generator ? n : Generator, u = Object.create(c.prototype); return _regeneratorDefine2(u, "_invoke", function (r, n, o) { var i, c, u, f = 0, p = o || [], y = !1, G = { p: 0, n: 0, v: e, a: d, f: d.bind(e, 4), d: function d(t, r) { return i = t, c = 0, u = e, G.n = r, a; } }; function d(r, n) { for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) { var o, i = p[t], d = G.p, l = i[2]; r > 3 ? (o = l === n) && (u = i[(c = i[4]) ? 5 : (c = 3, 3)], i[4] = i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0)); } if (o || r > 1) return a; throw y = !0, n; } return function (o, p, l) { if (f > 1) throw TypeError("Generator is already running"); for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) { i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u); try { if (f = 2, i) { if (c || (o = "next"), t = i[o]) { if (!(t = t.call(i, u))) throw TypeError("iterator result is not an object"); if (!t.done) return t; u = t.value, c < 2 && (c = 0); } else 1 === c && (t = i["return"]) && t.call(i), c < 2 && (u = TypeError("The iterator does not provide a '" + o + "' method"), c = 1); i = e; } else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break; } catch (t) { i = e, c = 1, u = t; } finally { f = 1; } } return { value: t, done: y }; }; }(r, o, i), !0), u; } var a = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} t = Object.getPrototypeOf; var c = [][n] ? t(t([][n]())) : (_regeneratorDefine2(t = {}, n, function () { return this; }), t), u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c); function f(e) { return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, _regeneratorDefine2(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, _regeneratorDefine2(u, "constructor", GeneratorFunctionPrototype), _regeneratorDefine2(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = "GeneratorFunction", _regeneratorDefine2(GeneratorFunctionPrototype, o, "GeneratorFunction"), _regeneratorDefine2(u), _regeneratorDefine2(u, o, "Generator"), _regeneratorDefine2(u, n, function () { return this; }), _regeneratorDefine2(u, "toString", function () { return "[object Generator]"; }), (_regenerator = function _regenerator() { return { w: i, m: f }; })(); }
|
|
9
|
+
function _regeneratorDefine2(e, r, n, t) { var i = Object.defineProperty; try { i({}, "", {}); } catch (e) { i = 0; } _regeneratorDefine2 = function _regeneratorDefine(e, r, n, t) { function o(r, n) { _regeneratorDefine2(e, r, function (e) { return this._invoke(r, n, e); }); } r ? i ? i(e, r, { value: n, enumerable: !t, configurable: !t, writable: !t }) : e[r] = n : (o("next", 0), o("throw", 1), o("return", 2)); }, _regeneratorDefine2(e, r, n, t); }
|
|
9
10
|
function asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); }
|
|
10
11
|
function _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; }
|
|
11
12
|
function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
|
|
@@ -114,21 +115,20 @@ export default function Column(_ref) {
|
|
|
114
115
|
});
|
|
115
116
|
}, [options, checkedSet, fieldNames, halfCheckedSet, loadingKeys, prevValuePath]);
|
|
116
117
|
var onChange = /*#__PURE__*/function () {
|
|
117
|
-
var _ref2 = _asyncToGenerator(/*#__PURE__*/
|
|
118
|
-
return
|
|
119
|
-
while (1) switch (_context.
|
|
118
|
+
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(e) {
|
|
119
|
+
return _regenerator().w(function (_context) {
|
|
120
|
+
while (1) switch (_context.n) {
|
|
120
121
|
case 0:
|
|
121
122
|
setInputValue(e.target.value);
|
|
122
123
|
setColumnId(scrollColumnId);
|
|
123
124
|
setColumnLoading(true);
|
|
124
125
|
setLoadingType("search");
|
|
125
|
-
_context.
|
|
126
|
+
_context.n = 1;
|
|
126
127
|
return onInputChange(e, scrollColumnId);
|
|
127
|
-
case
|
|
128
|
+
case 1:
|
|
128
129
|
setColumnLoading(false);
|
|
129
|
-
case
|
|
130
|
-
|
|
131
|
-
return _context.stop();
|
|
130
|
+
case 2:
|
|
131
|
+
return _context.a(2);
|
|
132
132
|
}
|
|
133
133
|
}, _callee);
|
|
134
134
|
}));
|
|
@@ -144,10 +144,10 @@ export default function Column(_ref) {
|
|
|
144
144
|
flex: 1
|
|
145
145
|
},
|
|
146
146
|
onScroll: (/*#__PURE__*/function () {
|
|
147
|
-
var _ref3 = _asyncToGenerator(/*#__PURE__*/
|
|
147
|
+
var _ref3 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee2(e) {
|
|
148
148
|
var isScrollBottom;
|
|
149
|
-
return
|
|
150
|
-
while (1) switch (_context2.
|
|
149
|
+
return _regenerator().w(function (_context2) {
|
|
150
|
+
while (1) switch (_context2.n) {
|
|
151
151
|
case 0:
|
|
152
152
|
isScrollBottom = function _isScrollBottom() {
|
|
153
153
|
var element = e.target;
|
|
@@ -157,18 +157,17 @@ export default function Column(_ref) {
|
|
|
157
157
|
setColumnId(scrollColumnId);
|
|
158
158
|
onScroll(e, scrollColumnId);
|
|
159
159
|
if (!isScrollBottom()) {
|
|
160
|
-
_context2.
|
|
160
|
+
_context2.n = 2;
|
|
161
161
|
break;
|
|
162
162
|
}
|
|
163
163
|
setColumnLoading(true);
|
|
164
164
|
setLoadingType("scroll");
|
|
165
|
-
_context2.
|
|
165
|
+
_context2.n = 1;
|
|
166
166
|
return onSrollBottom(e, scrollColumnId);
|
|
167
|
-
case
|
|
167
|
+
case 1:
|
|
168
168
|
setColumnLoading(false);
|
|
169
|
-
case
|
|
170
|
-
|
|
171
|
-
return _context2.stop();
|
|
169
|
+
case 2:
|
|
170
|
+
return _context2.a(2);
|
|
172
171
|
}
|
|
173
172
|
}, _callee2);
|
|
174
173
|
}));
|
|
@@ -2,7 +2,8 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
2
2
|
import "@chaoswise/ui/lib/Button/index.less";
|
|
3
3
|
import _Button from "@chaoswise/ui/lib/Button";
|
|
4
4
|
import _useLocale2 from "@chaoswise/ui/lib/useLocale";
|
|
5
|
-
function
|
|
5
|
+
function _regenerator() { /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */ var e, t, r = "function" == typeof Symbol ? Symbol : {}, n = r.iterator || "@@iterator", o = r.toStringTag || "@@toStringTag"; function i(r, n, o, i) { var c = n && n.prototype instanceof Generator ? n : Generator, u = Object.create(c.prototype); return _regeneratorDefine2(u, "_invoke", function (r, n, o) { var i, c, u, f = 0, p = o || [], y = !1, G = { p: 0, n: 0, v: e, a: d, f: d.bind(e, 4), d: function d(t, r) { return i = t, c = 0, u = e, G.n = r, a; } }; function d(r, n) { for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) { var o, i = p[t], d = G.p, l = i[2]; r > 3 ? (o = l === n) && (u = i[(c = i[4]) ? 5 : (c = 3, 3)], i[4] = i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0)); } if (o || r > 1) return a; throw y = !0, n; } return function (o, p, l) { if (f > 1) throw TypeError("Generator is already running"); for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) { i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u); try { if (f = 2, i) { if (c || (o = "next"), t = i[o]) { if (!(t = t.call(i, u))) throw TypeError("iterator result is not an object"); if (!t.done) return t; u = t.value, c < 2 && (c = 0); } else 1 === c && (t = i["return"]) && t.call(i), c < 2 && (u = TypeError("The iterator does not provide a '" + o + "' method"), c = 1); i = e; } else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break; } catch (t) { i = e, c = 1, u = t; } finally { f = 1; } } return { value: t, done: y }; }; }(r, o, i), !0), u; } var a = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} t = Object.getPrototypeOf; var c = [][n] ? t(t([][n]())) : (_regeneratorDefine2(t = {}, n, function () { return this; }), t), u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c); function f(e) { return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, _regeneratorDefine2(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, _regeneratorDefine2(u, "constructor", GeneratorFunctionPrototype), _regeneratorDefine2(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = "GeneratorFunction", _regeneratorDefine2(GeneratorFunctionPrototype, o, "GeneratorFunction"), _regeneratorDefine2(u), _regeneratorDefine2(u, o, "Generator"), _regeneratorDefine2(u, n, function () { return this; }), _regeneratorDefine2(u, "toString", function () { return "[object Generator]"; }), (_regenerator = function _regenerator() { return { w: i, m: f }; })(); }
|
|
6
|
+
function _regeneratorDefine2(e, r, n, t) { var i = Object.defineProperty; try { i({}, "", {}); } catch (e) { i = 0; } _regeneratorDefine2 = function _regeneratorDefine(e, r, n, t) { function o(r, n) { _regeneratorDefine2(e, r, function (e) { return this._invoke(r, n, e); }); } r ? i ? i(e, r, { value: n, enumerable: !t, configurable: !t, writable: !t }) : e[r] = n : (o("next", 0), o("throw", 1), o("return", 2)); }, _regeneratorDefine2(e, r, n, t); }
|
|
6
7
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
7
8
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
8
9
|
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
@@ -59,16 +60,16 @@ var TabList = function TabList(props) {
|
|
|
59
60
|
}
|
|
60
61
|
};
|
|
61
62
|
var readInnerMessage = /*#__PURE__*/function () {
|
|
62
|
-
var _ref = _asyncToGenerator(/*#__PURE__*/
|
|
63
|
+
var _ref = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(params) {
|
|
63
64
|
var resRequestApi, res, _params;
|
|
64
|
-
return
|
|
65
|
-
while (1) switch (_context.
|
|
65
|
+
return _regenerator().w(function (_context) {
|
|
66
|
+
while (1) switch (_context.n) {
|
|
66
67
|
case 0:
|
|
67
68
|
resRequestApi = _readInnerMessageApi || readInnerMessageApi;
|
|
68
|
-
_context.
|
|
69
|
+
_context.n = 1;
|
|
69
70
|
return resRequestApi(params, gatewayPrefix);
|
|
70
|
-
case
|
|
71
|
-
res = _context.
|
|
71
|
+
case 1:
|
|
72
|
+
res = _context.v;
|
|
72
73
|
if (res.status == "success") {
|
|
73
74
|
_params = {};
|
|
74
75
|
if (pageInfo.current > 1 && messages.length === 1) {
|
|
@@ -84,9 +85,8 @@ var TabList = function TabList(props) {
|
|
|
84
85
|
getMessageList(_params);
|
|
85
86
|
getMessageUnreadCount();
|
|
86
87
|
}
|
|
87
|
-
case
|
|
88
|
-
|
|
89
|
-
return _context.stop();
|
|
88
|
+
case 2:
|
|
89
|
+
return _context.a(2);
|
|
90
90
|
}
|
|
91
91
|
}, _callee);
|
|
92
92
|
}));
|