@chaoswise/ui 3.0.10 → 3.0.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/BasicLayout/index.js +2 -4
- package/lib/CWMessage/MessageContent/TabList/index.js +18 -11
- package/lib/CWMessage/index.js +27 -15
- package/lib/CWMessage/index.style.js +18 -6
- package/lib/CWUpload/index.js +2 -0
- package/lib/Modal/custom-backup/entiretyDrag.js +4 -8
- package/lib/SearchBar/index.js +2 -2
- package/lib/locales/en_US.json +1 -0
- package/lib/locales/index.js +1 -1
- package/lib/locales/zh_CN.json +1 -0
- package/lib/locales/zh_TW.json +1 -0
- package/package.json +1 -1
package/lib/BasicLayout/index.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import _Icon from "@chaoswise/ui/lib/Icon";
|
|
2
1
|
import _ErrorBoundary from "@chaoswise/ui/lib/ErrorBoundary";
|
|
3
2
|
import _Header from "@chaoswise/ui/lib/Header";
|
|
4
3
|
import _Layout from "@chaoswise/ui/lib/Layout";
|
|
@@ -11,6 +10,7 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
|
|
|
11
10
|
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
12
11
|
import React, { useState, useEffect, useRef } from "react";
|
|
13
12
|
import ReactDOM from "react-dom";
|
|
13
|
+
import { LeftOutlined } from '@ant-design/icons';
|
|
14
14
|
import PropTypes from "prop-types";
|
|
15
15
|
import classnames from "classnames";
|
|
16
16
|
import Breadcrumb from "./Breadcrumb";
|
|
@@ -308,9 +308,7 @@ BasicLayout.defaultProps = {
|
|
|
308
308
|
breadcrumbOptions: {},
|
|
309
309
|
menuOptions: {},
|
|
310
310
|
customContent: true,
|
|
311
|
-
backIcon: /*#__PURE__*/React.createElement(
|
|
312
|
-
type: "left"
|
|
313
|
-
})
|
|
311
|
+
backIcon: /*#__PURE__*/React.createElement(LeftOutlined, null)
|
|
314
312
|
};
|
|
315
313
|
BasicLayout.propTypes = {
|
|
316
314
|
/**
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
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); }
|
|
2
2
|
import _Button from "@chaoswise/ui/lib/Button";
|
|
3
|
+
import _Tag from "@chaoswise/ui/lib/Tag";
|
|
3
4
|
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator["return"] && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, "catch": function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
|
|
4
5
|
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; }
|
|
5
6
|
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,10 +9,11 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
|
|
|
8
9
|
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); }
|
|
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
|
-
import React from
|
|
12
|
-
import moment from
|
|
13
|
-
import
|
|
14
|
-
import {
|
|
12
|
+
import React from 'react';
|
|
13
|
+
import moment from 'moment';
|
|
14
|
+
import classnames from 'classnames';
|
|
15
|
+
import { readInnerMessageApi } from '../../service';
|
|
16
|
+
import { useIntl } from '../../../locales';
|
|
15
17
|
var TabList = function TabList(props) {
|
|
16
18
|
var _props$messages = props.messages,
|
|
17
19
|
messages = _props$messages === void 0 ? [] : _props$messages,
|
|
@@ -31,12 +33,15 @@ var TabList = function TabList(props) {
|
|
|
31
33
|
var _readInnerMessageApi = requestOption.readInnerMessageApi;
|
|
32
34
|
var onHandleMessage = function onHandleMessage(message) {
|
|
33
35
|
var userMessageId = message.userMessageId,
|
|
34
|
-
url = message.url
|
|
36
|
+
url = message.url,
|
|
37
|
+
showMode = message.showMode;
|
|
35
38
|
var params = {
|
|
36
39
|
userMessageIds: [userMessageId],
|
|
37
40
|
all: false
|
|
38
41
|
};
|
|
39
42
|
readInnerMessage(params);
|
|
43
|
+
// 撤回消息不操作
|
|
44
|
+
if (showMode === 'invalid') return;
|
|
40
45
|
var _isClose = onTabListItem(message);
|
|
41
46
|
if (isClose || _isClose) {
|
|
42
47
|
setVisible(false);
|
|
@@ -64,7 +69,7 @@ var TabList = function TabList(props) {
|
|
|
64
69
|
return resRequestApi;
|
|
65
70
|
case 3:
|
|
66
71
|
res = _context.sent;
|
|
67
|
-
if (res.status ==
|
|
72
|
+
if (res.status == 'success') {
|
|
68
73
|
_params = {};
|
|
69
74
|
if (pageInfo.current > 1 && messages.length === 1) {
|
|
70
75
|
_params = {
|
|
@@ -92,22 +97,24 @@ var TabList = function TabList(props) {
|
|
|
92
97
|
var messageList = messages.map(function (message) {
|
|
93
98
|
var _message$title, _message$summary;
|
|
94
99
|
return /*#__PURE__*/React.createElement("div", {
|
|
95
|
-
className: "".concat(messagePrefixCls, "-content-tabs-list"),
|
|
100
|
+
className: classnames("".concat(messagePrefixCls, "-content-tabs-list"), _defineProperty({}, "".concat(messagePrefixCls, "-content-tabs-list-invalid"), message.showMode === 'invalid')),
|
|
96
101
|
key: message.userMessageId
|
|
97
102
|
}, /*#__PURE__*/React.createElement("div", {
|
|
98
103
|
className: "".concat(messagePrefixCls, "-content-tabs-list-title"),
|
|
99
104
|
onClick: function onClick() {
|
|
100
105
|
return onHandleMessage(message);
|
|
101
106
|
}
|
|
102
|
-
},
|
|
107
|
+
}, message.showMode === 'top' && /*#__PURE__*/React.createElement(_Tag, {
|
|
108
|
+
className: "".concat(messagePrefixCls, "-content-tabs-list-title-top")
|
|
109
|
+
}, intl.get('5cc44ee5-8da3-446b-b962-3fe7f77d4f38').d('置顶')), (_message$title = message.title) !== null && _message$title !== void 0 ? _message$title : ''), /*#__PURE__*/React.createElement("div", {
|
|
103
110
|
className: "".concat(messagePrefixCls, "-content-tabs-list-desc")
|
|
104
|
-
}, (_message$summary = message.summary) !== null && _message$summary !== void 0 ? _message$summary :
|
|
111
|
+
}, (_message$summary = message.summary) !== null && _message$summary !== void 0 ? _message$summary : ''), /*#__PURE__*/React.createElement("div", {
|
|
105
112
|
className: "".concat(messagePrefixCls, "-content-tabs-list-date")
|
|
106
|
-
}, message.time ? moment(Number(message.time)).format(
|
|
113
|
+
}, message.time ? moment(Number(message.time)).format('YYYY/MM/DD HH:mm:ss') : ''));
|
|
107
114
|
});
|
|
108
115
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_Button, {
|
|
109
116
|
className: "".concat(messagePrefixCls, "-content-all-read"),
|
|
110
117
|
onClick: onHandleReadAllMessage
|
|
111
|
-
}, intl.get(
|
|
118
|
+
}, intl.get('58bc27cb-aac5-49f8-8c9e-3b0fbb9d9c61').d('全部已读')), messageList);
|
|
112
119
|
};
|
|
113
120
|
export default TabList;
|
package/lib/CWMessage/index.js
CHANGED
|
@@ -253,7 +253,7 @@ function Message(props) {
|
|
|
253
253
|
});
|
|
254
254
|
socket.on("push", /*#__PURE__*/function () {
|
|
255
255
|
var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(data) {
|
|
256
|
-
var _JSON$parse, count, message, _ref6, _ref6$total, total, noticeMessage, userMessageId, type,
|
|
256
|
+
var _JSON$parse, count, message, _ref6, _ref6$total, total, noticeMessage, action, _ref7, userMessageId, type, _ref8, enable, _mode, _ref8$time, time;
|
|
257
257
|
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
258
258
|
while (1) switch (_context3.prev = _context3.next) {
|
|
259
259
|
case 0:
|
|
@@ -261,20 +261,32 @@ function Message(props) {
|
|
|
261
261
|
_ref6 = count || {}, _ref6$total = _ref6.total, total = _ref6$total === void 0 ? 0 : _ref6$total;
|
|
262
262
|
setMessageTotal(total);
|
|
263
263
|
onSocketChange(JSON.parse(data));
|
|
264
|
-
if (message) {
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
264
|
+
if (!message) {
|
|
265
|
+
_context3.next = 10;
|
|
266
|
+
break;
|
|
267
|
+
}
|
|
268
|
+
noticeMessage = message.noticeMessage, action = message.action;
|
|
269
|
+
_ref7 = noticeMessage || {}, userMessageId = _ref7.id, type = _ref7.type;
|
|
270
|
+
if (userMessageId) {
|
|
271
|
+
_context3.next = 9;
|
|
272
|
+
break;
|
|
273
|
+
}
|
|
274
|
+
return _context3.abrupt("return");
|
|
275
|
+
case 9:
|
|
276
|
+
if (action && action.mode === "recall") {
|
|
277
|
+
// 销毁强提醒
|
|
278
|
+
api.destroy(userMessageId);
|
|
279
|
+
// 销毁后如果弹窗开启关闭弹窗
|
|
280
|
+
setVisible(false);
|
|
281
|
+
} else {
|
|
282
|
+
// 生成强提醒
|
|
283
|
+
_ref8 = messageOptionRef.current[type] || {}, enable = _ref8.enable, _mode = _ref8.mode, _ref8$time = _ref8.time, time = _ref8$time === void 0 ? 5 : _ref8$time;
|
|
284
|
+
setMode(_mode);
|
|
285
|
+
if (enable) {
|
|
286
|
+
openNotification(time, userMessageId);
|
|
275
287
|
}
|
|
276
288
|
}
|
|
277
|
-
case
|
|
289
|
+
case 10:
|
|
278
290
|
case "end":
|
|
279
291
|
return _context3.stop();
|
|
280
292
|
}
|
|
@@ -318,7 +330,7 @@ function Message(props) {
|
|
|
318
330
|
};
|
|
319
331
|
}();
|
|
320
332
|
var getMessageQuerySettings = /*#__PURE__*/function () {
|
|
321
|
-
var
|
|
333
|
+
var _ref10 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6() {
|
|
322
334
|
var resRequestApi, res, data;
|
|
323
335
|
return _regeneratorRuntime().wrap(function _callee6$(_context6) {
|
|
324
336
|
while (1) switch (_context6.prev = _context6.next) {
|
|
@@ -339,7 +351,7 @@ function Message(props) {
|
|
|
339
351
|
}, _callee6);
|
|
340
352
|
}));
|
|
341
353
|
return function getMessageQuerySettings() {
|
|
342
|
-
return
|
|
354
|
+
return _ref10.apply(this, arguments);
|
|
343
355
|
};
|
|
344
356
|
}();
|
|
345
357
|
return wrapCSSVar( /*#__PURE__*/React.createElement("div", {
|
|
@@ -124,9 +124,16 @@ var genCustomCWMessageStyle = function genCustomCWMessageStyle(token) {
|
|
|
124
124
|
lineHeight: "20px",
|
|
125
125
|
marginRight: "16px"
|
|
126
126
|
}
|
|
127
|
-
})), "".concat(messagePrefixCls, "-content-tabs-list"), _defineProperty(_defineProperty(_defineProperty({
|
|
127
|
+
})), "".concat(messagePrefixCls, "-content-tabs-list"), _defineProperty(_defineProperty(_defineProperty(_defineProperty({
|
|
128
128
|
paddingTop: "16px"
|
|
129
|
-
}, "".concat(messagePrefixCls, "-content-tabs-list-
|
|
129
|
+
}, "&".concat(messagePrefixCls, "-content-tabs-list-invalid"), _defineProperty({
|
|
130
|
+
color: "red"
|
|
131
|
+
}, "".concat(messagePrefixCls, "-content-tabs-list-title,").concat(messagePrefixCls, "-content-tabs-list-desc,").concat(messagePrefixCls, "-content-tabs-list-date"), {
|
|
132
|
+
color: token.colorTextDisabled,
|
|
133
|
+
"&:hover": {
|
|
134
|
+
color: token.colorTextDisabled
|
|
135
|
+
}
|
|
136
|
+
})), "".concat(messagePrefixCls, "-content-tabs-list-title"), _defineProperty(_defineProperty({
|
|
130
137
|
color: token.colorText,
|
|
131
138
|
height: "20px",
|
|
132
139
|
lineHeight: "20px",
|
|
@@ -134,10 +141,15 @@ var genCustomCWMessageStyle = function genCustomCWMessageStyle(token) {
|
|
|
134
141
|
whiteSpace: "nowrap",
|
|
135
142
|
overflow: "hidden",
|
|
136
143
|
textOverflow: "ellipsis",
|
|
137
|
-
"
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
144
|
+
display: "flex"
|
|
145
|
+
}, "".concat(messagePrefixCls, "-content-tabs-list-title-top"), {
|
|
146
|
+
color: token.colorPrimary,
|
|
147
|
+
backgroundColor: token.colorPrimaryBg,
|
|
148
|
+
marginRight: "10px",
|
|
149
|
+
borderColor: token.colorPrimaryBorder
|
|
150
|
+
}), "&:hover", {
|
|
151
|
+
cursor: "pointer"
|
|
152
|
+
})), "".concat(messagePrefixCls, "-content-tabs-list-desc"), {
|
|
141
153
|
overflow: "hidden",
|
|
142
154
|
textOverflow: "ellipsis",
|
|
143
155
|
display: "-webkit-box",
|
|
@@ -1,9 +1,5 @@
|
|
|
1
|
-
import "
|
|
2
|
-
import
|
|
3
|
-
import "antd/es/button/style";
|
|
4
|
-
import _Button from "antd/es/button";
|
|
5
|
-
import "antd/es/icon/style";
|
|
6
|
-
import _Icon from "antd/es/icon";
|
|
1
|
+
import _Row from "@chaoswise/ui/lib/Row";
|
|
2
|
+
import _Button from "@chaoswise/ui/lib/Button";
|
|
7
3
|
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); }
|
|
8
4
|
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); }
|
|
9
5
|
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; }
|
|
@@ -12,6 +8,7 @@ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object
|
|
|
12
8
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
13
9
|
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); }
|
|
14
10
|
import React, { useEffect } from 'react';
|
|
11
|
+
import { CloseOutlined } from '@ant-design/icons';
|
|
15
12
|
import ReactDraggable from 'react-draggable';
|
|
16
13
|
import classnames from 'classnames';
|
|
17
14
|
import './index.less';
|
|
@@ -101,8 +98,7 @@ var EntiretyDrag = function EntiretyDrag(_ref) {
|
|
|
101
98
|
return e.stopPropagation();
|
|
102
99
|
},
|
|
103
100
|
style: fullScreenStyle
|
|
104
|
-
}, closable && /*#__PURE__*/React.createElement(
|
|
105
|
-
type: "close",
|
|
101
|
+
}, closable && /*#__PURE__*/React.createElement(CloseOutlined, {
|
|
106
102
|
className: "cw-draggable-close-btn",
|
|
107
103
|
onClick: onCancel
|
|
108
104
|
}), title && /*#__PURE__*/React.createElement("div", {
|
package/lib/SearchBar/index.js
CHANGED
|
@@ -278,7 +278,7 @@ var SearchBar = function SearchBar(props) {
|
|
|
278
278
|
if (item.span) {
|
|
279
279
|
return item.span;
|
|
280
280
|
}
|
|
281
|
-
return
|
|
281
|
+
return 6;
|
|
282
282
|
}
|
|
283
283
|
return 0;
|
|
284
284
|
}).reduce(function (prev, next) {
|
|
@@ -288,7 +288,7 @@ var SearchBar = function SearchBar(props) {
|
|
|
288
288
|
return 24;
|
|
289
289
|
} else {
|
|
290
290
|
var remainder = totalSpan % 24;
|
|
291
|
-
if (24 - remainder
|
|
291
|
+
if (24 - remainder >= 6) {
|
|
292
292
|
return 24 - remainder;
|
|
293
293
|
} else {
|
|
294
294
|
return 24;
|
package/lib/locales/en_US.json
CHANGED
|
@@ -23,6 +23,7 @@
|
|
|
23
23
|
"54653cf2-ee7e-4091-b778-30d21facc877": "The page is lost and the platform is retrieving it",
|
|
24
24
|
"56a89179-5086-4c43-8814-06eac1ba9983": "Increase the time span by {span} times",
|
|
25
25
|
"58bc27cb-aac5-49f8-8c9e-3b0fbb9d9c61": "Mark all read",
|
|
26
|
+
"5cc44ee5-8da3-446b-b962-3fe7f77d4f38": "Top",
|
|
26
27
|
"5fe60774-0f08-450f-a9d9-998996485fec": "Drag Move",
|
|
27
28
|
"627a6799-d6da-421d-a2c4-d6982c27a258": "Do you want to continue?",
|
|
28
29
|
"6356dd5c-b99d-4b34-acb3-683e4d5edb40": "Skip",
|
package/lib/locales/index.js
CHANGED
|
@@ -43,7 +43,7 @@ export var useIntl = function useIntl() {
|
|
|
43
43
|
var forceUpdate = useForceUpdate();
|
|
44
44
|
var initLocale = function initLocale() {
|
|
45
45
|
if (!TagInitInstance.getInit()) {
|
|
46
|
-
injectLocale('
|
|
46
|
+
injectLocale('zh_CN', function () {
|
|
47
47
|
TagInitInstance.setInit();
|
|
48
48
|
forceUpdate();
|
|
49
49
|
});
|
package/lib/locales/zh_CN.json
CHANGED
|
@@ -23,6 +23,7 @@
|
|
|
23
23
|
"54653cf2-ee7e-4091-b778-30d21facc877": "页面走丢了,平台正在找回页面",
|
|
24
24
|
"56a89179-5086-4c43-8814-06eac1ba9983": "按{span}倍增加时间跨度",
|
|
25
25
|
"58bc27cb-aac5-49f8-8c9e-3b0fbb9d9c61": "全部已读",
|
|
26
|
+
"5cc44ee5-8da3-446b-b962-3fe7f77d4f38": "置顶",
|
|
26
27
|
"5fe60774-0f08-450f-a9d9-998996485fec": "拖拽移动",
|
|
27
28
|
"627a6799-d6da-421d-a2c4-d6982c27a258": "需要继续下一个任务吗?",
|
|
28
29
|
"6356dd5c-b99d-4b34-acb3-683e4d5edb40": "跳过",
|
package/lib/locales/zh_TW.json
CHANGED
|
@@ -23,6 +23,7 @@
|
|
|
23
23
|
"54653cf2-ee7e-4091-b778-30d21facc877": "頁面走丟了,平臺正在找回頁面",
|
|
24
24
|
"56a89179-5086-4c43-8814-06eac1ba9983": "按{span}倍增加時間跨度",
|
|
25
25
|
"58bc27cb-aac5-49f8-8c9e-3b0fbb9d9c61": "全部已讀",
|
|
26
|
+
"5cc44ee5-8da3-446b-b962-3fe7f77d4f38": "置頂",
|
|
26
27
|
"5fe60774-0f08-450f-a9d9-998996485fec": "拖拽移動",
|
|
27
28
|
"627a6799-d6da-421d-a2c4-d6982c27a258": "需要繼續下一個任務嗎?",
|
|
28
29
|
"6356dd5c-b99d-4b34-acb3-683e4d5edb40": "跳過",
|