@chaoswise/ui 3.0.11 → 3.0.13
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/AppHolder/index.js +19 -0
- package/lib/Badge/index.style.js +42 -10
- package/lib/BasicLayout/Sider.js +6 -2
- package/lib/BasicLayout/style/sider.js +53 -49
- package/lib/CWMessage/MessageContent/TabList/index.js +20 -13
- package/lib/CWMessage/MessageContent/index.js +6 -6
- package/lib/CWMessage/index.js +79 -77
- package/lib/CWMessage/index.style.js +16 -6
- package/lib/CWRangePicker/DropdownMenu/index.js +39 -35
- package/lib/CWRangePicker/DropdownMenu/index.style.js +129 -130
- package/lib/CWRangePicker/Refresh/index.js +6 -2
- package/lib/CWRangePicker/Refresh/index.style.js +16 -19
- package/lib/CWRangePicker/TimeSpan/index.js +7 -2
- package/lib/CWRangePicker/TimeSpan/index.style.js +9 -12
- package/lib/CWRangePicker/index.js +6 -2
- package/lib/CWRangePicker/index.style.js +47 -52
- package/lib/CWTable/CWTable.js +1 -1
- package/lib/CWTree/index.js +6 -2
- package/lib/CWTree/index.style.js +97 -99
- package/lib/ChangeIcon/index.js +1 -1
- package/lib/ConfigProvider/ConfigProvider.js +15 -3
- package/lib/Exception/index.js +1 -1
- package/lib/FilterDropDown/index.js +1 -1
- package/lib/Header/TopNavigationMenu/index.js +1 -1
- package/lib/Header/UserSetting/index.js +1 -1
- package/lib/Header/index.js +1 -1
- package/lib/IconSelect/index.js +1 -1
- package/lib/LayoutWrapper/Footer.js +5 -1
- package/lib/LayoutWrapper/Header.js +5 -1
- package/lib/LayoutWrapper/index.js +5 -2
- package/lib/LeftNavigation/index.js +1 -1
- package/lib/QuickTransfer/index.js +5 -1
- package/lib/SearchBar/index.js +1 -1
- package/lib/SimplePagination/index.js +1 -1
- package/lib/Tag/index.style.js +41 -9
- package/lib/Tooltip/index.js +2 -2
- package/lib/TooltipText/index.js +1 -1
- package/lib/UniversalLayout/index.js +5 -1
- package/lib/antd-style/functions/index.js +6 -5
- 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
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import _App from "@chaoswise/ui/lib/App";
|
|
2
|
+
var message;
|
|
3
|
+
var notification;
|
|
4
|
+
var modal;
|
|
5
|
+
var AppHolder = function AppHolder() {
|
|
6
|
+
var staticFunction = _App.useApp();
|
|
7
|
+
message = staticFunction.message;
|
|
8
|
+
modal = staticFunction.modal;
|
|
9
|
+
notification = staticFunction.notification;
|
|
10
|
+
return null;
|
|
11
|
+
};
|
|
12
|
+
export default AppHolder;
|
|
13
|
+
// 这里的问题是 AppHolder 组件在首次定义的时候,message、modal 和 notification 还没有被赋值。当你在其他地方尝试访问 AppHolder.message 时,这些属性是 undefined 的。
|
|
14
|
+
// AppHolder.message = message;
|
|
15
|
+
// AppHolder.modal = modal;
|
|
16
|
+
// AppHolder.notification = notification;
|
|
17
|
+
|
|
18
|
+
// 具名导出的方式可以保证AppHolder组件在渲染时正确赋值这些变量,并且在其他模块中可以正确导入和使用这些变量
|
|
19
|
+
export { message, notification, modal };
|
package/lib/Badge/index.style.js
CHANGED
|
@@ -1,15 +1,43 @@
|
|
|
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
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
3
2
|
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; }
|
|
4
3
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
5
4
|
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); }
|
|
6
|
-
function _taggedTemplateLiteral(e, t) { return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } })); }
|
|
7
5
|
import { genStyleHooks } from "../Antd5/theme/internal";
|
|
8
|
-
import {
|
|
9
|
-
var k_loadingK =
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
6
|
+
import { Keyframes } from "@ant-design/cssinjs";
|
|
7
|
+
var k_loadingK = new Keyframes("k_loadingK", {
|
|
8
|
+
"0%": {
|
|
9
|
+
left: 0,
|
|
10
|
+
transform: "scale(1.1)",
|
|
11
|
+
zIndex: 0
|
|
12
|
+
},
|
|
13
|
+
"50%": {
|
|
14
|
+
left: "100%",
|
|
15
|
+
transform: "scale(1)",
|
|
16
|
+
zIndex: 1
|
|
17
|
+
},
|
|
18
|
+
"100%": {
|
|
19
|
+
left: 0,
|
|
20
|
+
transform: 'scale(1.1)',
|
|
21
|
+
zIndex: 0
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
var k_loadingL = new Keyframes("k_loadingL", {
|
|
25
|
+
"0%": {
|
|
26
|
+
left: "100%",
|
|
27
|
+
transform: 'scale(1.1)',
|
|
28
|
+
zIndex: 1
|
|
29
|
+
},
|
|
30
|
+
"50%": {
|
|
31
|
+
left: 0,
|
|
32
|
+
transform: "scale(1)",
|
|
33
|
+
zIndex: 1
|
|
34
|
+
},
|
|
35
|
+
"100%": {
|
|
36
|
+
left: "100%",
|
|
37
|
+
transform: 'scale(1.1)',
|
|
38
|
+
zIndex: 0
|
|
39
|
+
}
|
|
40
|
+
});
|
|
13
41
|
var genCustomBadgeStyle = function genCustomBadgeStyle(token) {
|
|
14
42
|
var prefixCls = token.antCls;
|
|
15
43
|
var badgePrefix = "".concat(prefixCls, "-badge");
|
|
@@ -35,11 +63,15 @@ var genCustomBadgeStyle = function genCustomBadgeStyle(token) {
|
|
|
35
63
|
},
|
|
36
64
|
"&::before": {
|
|
37
65
|
background: token.colorPrimary,
|
|
38
|
-
|
|
66
|
+
animationName: k_loadingK,
|
|
67
|
+
animationDuration: '1s',
|
|
68
|
+
animationIterationCount: 'infinite'
|
|
39
69
|
},
|
|
40
70
|
"&:after": {
|
|
41
71
|
background: token.colorSuccess,
|
|
42
|
-
|
|
72
|
+
animationName: k_loadingL,
|
|
73
|
+
animationDuration: '1s',
|
|
74
|
+
animationIterationCount: 'infinite'
|
|
43
75
|
}
|
|
44
76
|
}), "".concat(badgePrefix, "-processing-text"), {
|
|
45
77
|
display: "inline-block",
|
|
@@ -62,6 +94,6 @@ var genCustomBadgeStyle = function genCustomBadgeStyle(token) {
|
|
|
62
94
|
// ============================== Export ==============================
|
|
63
95
|
export default genStyleHooks("CWBadge", function (token) {
|
|
64
96
|
return [
|
|
65
|
-
//
|
|
97
|
+
//
|
|
66
98
|
genCustomBadgeStyle(token)];
|
|
67
99
|
});
|
package/lib/BasicLayout/Sider.js
CHANGED
|
@@ -23,6 +23,7 @@ import { Resizable } from "re-resizable";
|
|
|
23
23
|
import { MenuFoldOutlined, MenuUnfoldOutlined } from "@ant-design/icons";
|
|
24
24
|
import { useTheme } from '../antd-style';
|
|
25
25
|
import classnames from 'classnames';
|
|
26
|
+
import useConfigContext from "../useConfigContext";
|
|
26
27
|
import useStyle from "./style/sider";
|
|
27
28
|
var AntSider = _Layout.Sider;
|
|
28
29
|
function Sider(_ref) {
|
|
@@ -37,7 +38,10 @@ function Sider(_ref) {
|
|
|
37
38
|
_setSiderDragWidth = _ref._setSiderDragWidth,
|
|
38
39
|
menuOptions = _ref.menuOptions,
|
|
39
40
|
onCollapse = _ref.onCollapse;
|
|
40
|
-
var
|
|
41
|
+
var _useConfigContext = useConfigContext(),
|
|
42
|
+
getPrefixCls = _useConfigContext.getPrefixCls;
|
|
43
|
+
var prefixCls = getPrefixCls("basic-layout");
|
|
44
|
+
var _useStyle = useStyle("".concat(prefixCls, "-cw-side")),
|
|
41
45
|
_useStyle2 = _slicedToArray(_useStyle, 3),
|
|
42
46
|
wrapCSSVar = _useStyle2[0],
|
|
43
47
|
hashId = _useStyle2[1],
|
|
@@ -116,7 +120,7 @@ function Sider(_ref) {
|
|
|
116
120
|
width: selfCollapsed ? siderCollapsedWidth : _siderDragWidth
|
|
117
121
|
}
|
|
118
122
|
}), /*#__PURE__*/React.createElement(AntSider, {
|
|
119
|
-
className: classnames(hashId, cssVarCls, "cw-side"),
|
|
123
|
+
className: classnames(hashId, cssVarCls, "".concat(prefixCls, "-cw-side")),
|
|
120
124
|
width: canDrag ? "100%" : _siderDragWidth,
|
|
121
125
|
collapsed: selfCollapsed,
|
|
122
126
|
collapsedWidth: siderCollapsedWidth,
|
|
@@ -1,3 +1,7 @@
|
|
|
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
|
+
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; }
|
|
3
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
4
|
+
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); }
|
|
1
5
|
import { genStyleHooks } from "../../Antd5/theme/internal";
|
|
2
6
|
var prepareComponentToken = function prepareComponentToken(token) {
|
|
3
7
|
return {
|
|
@@ -8,62 +12,62 @@ var prepareComponentToken = function prepareComponentToken(token) {
|
|
|
8
12
|
};
|
|
9
13
|
};
|
|
10
14
|
var genCustomSiderStyle = function genCustomSiderStyle(token) {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
15
|
+
var prefixCls = token.antCls;
|
|
16
|
+
var basicLayoutPrefixCls = "".concat(prefixCls, "-basic-layout");
|
|
17
|
+
return _defineProperty({}, "".concat(basicLayoutPrefixCls, "-cw-side"), {
|
|
18
|
+
fontSize: "14px",
|
|
19
|
+
height: "100%",
|
|
20
|
+
boxShadow: "none",
|
|
21
|
+
overflow: "auto",
|
|
22
|
+
overflowX: "hidden",
|
|
23
|
+
".cw-side-menu-box": {
|
|
14
24
|
height: "100%",
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
25
|
+
width: "100%",
|
|
26
|
+
".cw-side-menu": {
|
|
27
|
+
height: "calc(100% - 40px)",
|
|
28
|
+
width: "100%",
|
|
29
|
+
overflow: "auto"
|
|
30
|
+
},
|
|
31
|
+
".cw-sider-bottom-box": {
|
|
32
|
+
position: "relative",
|
|
33
|
+
borderTop: "1px solid transparent",
|
|
34
|
+
height: "40px",
|
|
20
35
|
width: "100%",
|
|
21
|
-
"
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
36
|
+
backgroundColor: "#fff",
|
|
37
|
+
display: "flex",
|
|
38
|
+
justifyContent: "space-between",
|
|
39
|
+
alignItems: "center",
|
|
40
|
+
padding: "0 12px",
|
|
41
|
+
".cw-sider-setting": {
|
|
42
|
+
color: token.siderBtnColor,
|
|
43
|
+
"&:hover": {
|
|
44
|
+
color: token.siderBtnHoverColor
|
|
45
|
+
}
|
|
25
46
|
},
|
|
26
|
-
".cw-sider-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
"
|
|
37
|
-
color: token.
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
width: "24px",
|
|
46
|
-
height: "24px",
|
|
47
|
-
cursor: "pointer",
|
|
48
|
-
lineHeight: "24px",
|
|
49
|
-
fontSize: "16px",
|
|
50
|
-
textAlign: "center",
|
|
51
|
-
color: token.siderBtnColor,
|
|
52
|
-
"&:hover": {
|
|
53
|
-
color: token.siderBtnHoverColor
|
|
54
|
-
}
|
|
55
|
-
},
|
|
56
|
-
".cw-sider-version": {
|
|
57
|
-
fontSize: "12px",
|
|
58
|
-
color: token.versionColor,
|
|
59
|
-
"&:hover": {
|
|
60
|
-
color: token.siderBtnHoverColor
|
|
61
|
-
}
|
|
47
|
+
".cw-sider-collapsed-btn": {
|
|
48
|
+
background: token.collapsedBtnBg,
|
|
49
|
+
display: "inline-block",
|
|
50
|
+
width: "24px",
|
|
51
|
+
height: "24px",
|
|
52
|
+
cursor: "pointer",
|
|
53
|
+
lineHeight: "24px",
|
|
54
|
+
fontSize: "16px",
|
|
55
|
+
textAlign: "center",
|
|
56
|
+
color: token.siderBtnColor,
|
|
57
|
+
"&:hover": {
|
|
58
|
+
color: token.siderBtnHoverColor
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
".cw-sider-version": {
|
|
62
|
+
fontSize: "12px",
|
|
63
|
+
color: token.versionColor,
|
|
64
|
+
"&:hover": {
|
|
65
|
+
color: token.siderBtnHoverColor
|
|
62
66
|
}
|
|
63
67
|
}
|
|
64
68
|
}
|
|
65
69
|
}
|
|
66
|
-
};
|
|
70
|
+
});
|
|
67
71
|
};
|
|
68
72
|
// ============================== Export ==============================
|
|
69
73
|
export default genStyleHooks(["BasicLayout", "Sider"], function (token) {
|
|
@@ -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);
|
|
@@ -59,12 +64,12 @@ var TabList = function TabList(props) {
|
|
|
59
64
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
60
65
|
while (1) switch (_context.prev = _context.next) {
|
|
61
66
|
case 0:
|
|
62
|
-
resRequestApi = _readInnerMessageApi
|
|
67
|
+
resRequestApi = _readInnerMessageApi || readInnerMessageApi;
|
|
63
68
|
_context.next = 3;
|
|
64
|
-
return resRequestApi;
|
|
69
|
+
return resRequestApi(params, gatewayPrefix);
|
|
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;
|
|
@@ -82,9 +82,9 @@ var MessageContent = function MessageContent(props) {
|
|
|
82
82
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
83
83
|
while (1) switch (_context.prev = _context.next) {
|
|
84
84
|
case 0:
|
|
85
|
-
resRequestApi = _getMessageTypeApi
|
|
85
|
+
resRequestApi = _getMessageTypeApi || getMessageTypeApi;
|
|
86
86
|
_context.next = 3;
|
|
87
|
-
return resRequestApi;
|
|
87
|
+
return resRequestApi(gatewayPrefix);
|
|
88
88
|
case 3:
|
|
89
89
|
res = _context.sent;
|
|
90
90
|
if (res && res.status == "success") {
|
|
@@ -115,9 +115,9 @@ var MessageContent = function MessageContent(props) {
|
|
|
115
115
|
case 0:
|
|
116
116
|
setLoading(true);
|
|
117
117
|
conditionsRef.current = _objectSpread(_objectSpread({}, conditionsRef.current), params);
|
|
118
|
-
resRequestApi = _getMessageListApi
|
|
118
|
+
resRequestApi = _getMessageListApi || getMessageListApi;
|
|
119
119
|
_context2.next = 5;
|
|
120
|
-
return resRequestApi;
|
|
120
|
+
return resRequestApi(conditionsRef.current, gatewayPrefix);
|
|
121
121
|
case 5:
|
|
122
122
|
res = _context2.sent;
|
|
123
123
|
if (res && res.status == "success") {
|
|
@@ -143,9 +143,9 @@ var MessageContent = function MessageContent(props) {
|
|
|
143
143
|
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
144
144
|
while (1) switch (_context3.prev = _context3.next) {
|
|
145
145
|
case 0:
|
|
146
|
-
resRequestApi = _getMessageUnreadCountApi
|
|
146
|
+
resRequestApi = _getMessageUnreadCountApi || getMessageUnreadCountApi;
|
|
147
147
|
_context3.next = 3;
|
|
148
|
-
return resRequestApi;
|
|
148
|
+
return resRequestApi(gatewayPrefix);
|
|
149
149
|
case 3:
|
|
150
150
|
res = _context3.sent;
|
|
151
151
|
if (res && res.status == "success") {
|
package/lib/CWMessage/index.js
CHANGED
|
@@ -99,6 +99,8 @@ function Message(props) {
|
|
|
99
99
|
setTotal = _useState8[1];
|
|
100
100
|
// 保存消息配置
|
|
101
101
|
var messageOptionRef = useRef({});
|
|
102
|
+
// 获取socket信息
|
|
103
|
+
var socketConnectInfo = useRef();
|
|
102
104
|
// 分页配置初始化
|
|
103
105
|
var _useState9 = useState({
|
|
104
106
|
current: 1,
|
|
@@ -124,6 +126,11 @@ function Message(props) {
|
|
|
124
126
|
useEffect(function () {
|
|
125
127
|
getMessageQuerySettings();
|
|
126
128
|
connectSocket();
|
|
129
|
+
return function () {
|
|
130
|
+
if (socketConnectInfo.current) {
|
|
131
|
+
socketConnectInfo.current.disconnect && socketConnectInfo.current.disconnect();
|
|
132
|
+
}
|
|
133
|
+
};
|
|
127
134
|
}, []);
|
|
128
135
|
useEffect(function () {
|
|
129
136
|
setPageInfo(function (pre) {
|
|
@@ -166,9 +173,9 @@ function Message(props) {
|
|
|
166
173
|
userMessageId: id,
|
|
167
174
|
clientType: "BROWSER"
|
|
168
175
|
};
|
|
169
|
-
resRequestApi = _getMessageDetailApi
|
|
176
|
+
resRequestApi = _getMessageDetailApi || getMessageDetailApi;
|
|
170
177
|
_context.next = 4;
|
|
171
|
-
return resRequestApi;
|
|
178
|
+
return resRequestApi(params, gatewayPrefix);
|
|
172
179
|
case 4:
|
|
173
180
|
res = _context.sent;
|
|
174
181
|
if (res && res.status == "success") {
|
|
@@ -203,24 +210,13 @@ function Message(props) {
|
|
|
203
210
|
}();
|
|
204
211
|
var readInnerMessage = /*#__PURE__*/function () {
|
|
205
212
|
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(params) {
|
|
206
|
-
var resRequestApi
|
|
213
|
+
var resRequestApi;
|
|
207
214
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
208
215
|
while (1) switch (_context2.prev = _context2.next) {
|
|
209
216
|
case 0:
|
|
210
|
-
resRequestApi = _readInnerMessageApi
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
case 3:
|
|
214
|
-
res = _context2.sent;
|
|
215
|
-
if (res.status == "success") {
|
|
216
|
-
// if (pageInfo.current > 1 && dataSource.length === 1) {
|
|
217
|
-
// let _params = { current: pageInfo.current - 1 };
|
|
218
|
-
// setPageInfo((pre) => ({ ...pre, current: pre.current - 1 }));
|
|
219
|
-
// conditionsRef.current = { ...conditionsRef.current, ..._params };
|
|
220
|
-
// }
|
|
221
|
-
// 已读消息
|
|
222
|
-
}
|
|
223
|
-
case 5:
|
|
217
|
+
resRequestApi = _readInnerMessageApi || readInnerMessageApi;
|
|
218
|
+
resRequestApi(params, gatewayPrefix);
|
|
219
|
+
case 2:
|
|
224
220
|
case "end":
|
|
225
221
|
return _context2.stop();
|
|
226
222
|
}
|
|
@@ -230,17 +226,53 @@ function Message(props) {
|
|
|
230
226
|
return _ref3.apply(this, arguments);
|
|
231
227
|
};
|
|
232
228
|
}();
|
|
229
|
+
var getSocketPostMessage = function getSocketPostMessage(data) {
|
|
230
|
+
var _JSON$parse = JSON.parse(data),
|
|
231
|
+
count = _JSON$parse.count,
|
|
232
|
+
message = _JSON$parse.message;
|
|
233
|
+
var _ref4 = count || {},
|
|
234
|
+
_ref4$total = _ref4.total,
|
|
235
|
+
total = _ref4$total === void 0 ? 0 : _ref4$total;
|
|
236
|
+
setMessageTotal(total);
|
|
237
|
+
onSocketChange(JSON.parse(data));
|
|
238
|
+
if (message) {
|
|
239
|
+
var noticeMessage = message.noticeMessage,
|
|
240
|
+
action = message.action;
|
|
241
|
+
var _ref5 = noticeMessage || {},
|
|
242
|
+
userMessageId = _ref5.id,
|
|
243
|
+
type = _ref5.type;
|
|
244
|
+
if (!userMessageId) return;
|
|
245
|
+
if (action && action.mode === "recall") {
|
|
246
|
+
// 销毁强提醒
|
|
247
|
+
api.destroy(userMessageId);
|
|
248
|
+
// 销毁后如果弹窗开启关闭弹窗
|
|
249
|
+
setVisible(false);
|
|
250
|
+
} else {
|
|
251
|
+
// 生成强提醒
|
|
252
|
+
var _ref6 = messageOptionRef.current[type] || {},
|
|
253
|
+
enable = _ref6.enable,
|
|
254
|
+
_mode = _ref6.mode,
|
|
255
|
+
_ref6$time = _ref6.time,
|
|
256
|
+
time = _ref6$time === void 0 ? 5 : _ref6$time;
|
|
257
|
+
setMode(_mode);
|
|
258
|
+
if (enable) {
|
|
259
|
+
openNotification(time, userMessageId);
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
};
|
|
233
264
|
var connectSocket = /*#__PURE__*/function () {
|
|
234
|
-
var
|
|
265
|
+
var _ref7 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
|
|
235
266
|
var resRequestApi, res, finalOrigin, socket;
|
|
236
|
-
return _regeneratorRuntime().wrap(function
|
|
237
|
-
while (1) switch (
|
|
267
|
+
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
268
|
+
while (1) switch (_context4.prev = _context4.next) {
|
|
238
269
|
case 0:
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
270
|
+
// 获取sessionId
|
|
271
|
+
resRequestApi = _getSessionId || getSessionId;
|
|
272
|
+
_context4.next = 3;
|
|
273
|
+
return resRequestApi(gatewayPrefix);
|
|
242
274
|
case 3:
|
|
243
|
-
res =
|
|
275
|
+
res = _context4.sent;
|
|
244
276
|
if (res && res.status == "success") {
|
|
245
277
|
finalOrigin = socketOrigin ? socketOrigin : "ws://".concat(window.location.host);
|
|
246
278
|
socket = io(finalOrigin, {
|
|
@@ -250,50 +282,20 @@ function Message(props) {
|
|
|
250
282
|
sessionId: res.data,
|
|
251
283
|
clientType: "BROWSER"
|
|
252
284
|
}
|
|
253
|
-
});
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
258
|
-
while (1) switch (_context3.prev = _context3.next) {
|
|
259
|
-
case 0:
|
|
260
|
-
_JSON$parse = JSON.parse(data), count = _JSON$parse.count, message = _JSON$parse.message;
|
|
261
|
-
_ref6 = count || {}, _ref6$total = _ref6.total, total = _ref6$total === void 0 ? 0 : _ref6$total;
|
|
262
|
-
setMessageTotal(total);
|
|
263
|
-
onSocketChange(JSON.parse(data));
|
|
264
|
-
if (message) {
|
|
265
|
-
noticeMessage = message.noticeMessage;
|
|
266
|
-
if (noticeMessage) {
|
|
267
|
-
userMessageId = noticeMessage.id, type = noticeMessage.type;
|
|
268
|
-
if (userMessageId) {
|
|
269
|
-
_ref7 = messageOptionRef.current[type] || {}, enable = _ref7.enable, _mode = _ref7.mode, _ref7$time = _ref7.time, time = _ref7$time === void 0 ? 5 : _ref7$time;
|
|
270
|
-
setMode(_mode);
|
|
271
|
-
if (enable) {
|
|
272
|
-
openNotification(time, userMessageId);
|
|
273
|
-
}
|
|
274
|
-
}
|
|
275
|
-
}
|
|
276
|
-
}
|
|
277
|
-
case 5:
|
|
278
|
-
case "end":
|
|
279
|
-
return _context3.stop();
|
|
280
|
-
}
|
|
281
|
-
}, _callee3);
|
|
282
|
-
}));
|
|
283
|
-
return function (_x4) {
|
|
284
|
-
return _ref5.apply(this, arguments);
|
|
285
|
-
};
|
|
286
|
-
}());
|
|
285
|
+
}); // 记录socket连接信息,用于关闭socket连接
|
|
286
|
+
socketConnectInfo.current = socket;
|
|
287
|
+
// 监听从服务器传来的消息
|
|
288
|
+
socket.on("push", getSocketPostMessage);
|
|
287
289
|
// socket重连
|
|
288
|
-
socket.on("reconnect_attempt", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
290
|
+
socket.on("reconnect_attempt", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
|
|
289
291
|
var res;
|
|
290
|
-
return _regeneratorRuntime().wrap(function
|
|
291
|
-
while (1) switch (
|
|
292
|
+
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
293
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
292
294
|
case 0:
|
|
293
|
-
|
|
295
|
+
_context3.next = 2;
|
|
294
296
|
return resRequestApi;
|
|
295
297
|
case 2:
|
|
296
|
-
res =
|
|
298
|
+
res = _context3.sent;
|
|
297
299
|
if (res && res.status == "success") {
|
|
298
300
|
socket.io.opts.query = {
|
|
299
301
|
sessionId: res.data,
|
|
@@ -302,41 +304,41 @@ function Message(props) {
|
|
|
302
304
|
}
|
|
303
305
|
case 4:
|
|
304
306
|
case "end":
|
|
305
|
-
return
|
|
307
|
+
return _context3.stop();
|
|
306
308
|
}
|
|
307
|
-
},
|
|
309
|
+
}, _callee3);
|
|
308
310
|
})));
|
|
309
311
|
}
|
|
310
312
|
case 5:
|
|
311
313
|
case "end":
|
|
312
|
-
return
|
|
314
|
+
return _context4.stop();
|
|
313
315
|
}
|
|
314
|
-
},
|
|
316
|
+
}, _callee4);
|
|
315
317
|
}));
|
|
316
318
|
return function connectSocket() {
|
|
317
|
-
return
|
|
319
|
+
return _ref7.apply(this, arguments);
|
|
318
320
|
};
|
|
319
321
|
}();
|
|
320
322
|
var getMessageQuerySettings = /*#__PURE__*/function () {
|
|
321
|
-
var _ref9 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
323
|
+
var _ref9 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5() {
|
|
322
324
|
var resRequestApi, res, data;
|
|
323
|
-
return _regeneratorRuntime().wrap(function
|
|
324
|
-
while (1) switch (
|
|
325
|
+
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
|
|
326
|
+
while (1) switch (_context5.prev = _context5.next) {
|
|
325
327
|
case 0:
|
|
326
|
-
resRequestApi = _getMessageQuerySettingsApi
|
|
327
|
-
|
|
328
|
-
return resRequestApi;
|
|
328
|
+
resRequestApi = _getMessageQuerySettingsApi || getMessageQuerySettingsApi;
|
|
329
|
+
_context5.next = 3;
|
|
330
|
+
return resRequestApi(gatewayPrefix);
|
|
329
331
|
case 3:
|
|
330
|
-
res =
|
|
332
|
+
res = _context5.sent;
|
|
331
333
|
if (res && res.status === "success") {
|
|
332
334
|
data = res.data;
|
|
333
335
|
messageOptionRef.current = data || {};
|
|
334
336
|
}
|
|
335
337
|
case 5:
|
|
336
338
|
case "end":
|
|
337
|
-
return
|
|
339
|
+
return _context5.stop();
|
|
338
340
|
}
|
|
339
|
-
},
|
|
341
|
+
}, _callee5);
|
|
340
342
|
}));
|
|
341
343
|
return function getMessageQuerySettings() {
|
|
342
344
|
return _ref9.apply(this, arguments);
|