@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.
Files changed (35) hide show
  1. package/lib/Antd3/es/date-picker/locale/ja_JP.js +1 -1
  2. package/lib/Antd3/es/locale/ja_JP.js +1 -1
  3. package/lib/Antd4/comment/index.js +1 -1
  4. package/lib/Antd4/date-picker/locale/ja_JP.js +1 -1
  5. package/lib/Antd4/locale/ja_JP.js +1 -1
  6. package/lib/Antd4/notification/index.copy.js +301 -0
  7. package/lib/BasicLayout/index.js +3 -3
  8. package/lib/CWCascader/rc-cascader/OptionList/Column.js +17 -18
  9. package/lib/CWMessage/MessageContent/TabList/index.js +10 -10
  10. package/lib/CWMessage/MessageContent/index.js +26 -28
  11. package/lib/CWMessage/index.js +34 -37
  12. package/lib/CWRangePicker/index.js +11 -11
  13. package/lib/CWSelect/index.js +3 -3
  14. package/lib/CWTable/CWTable.js +23 -23
  15. package/lib/ConfigProvider/ConfigProvider.js +1 -0
  16. package/lib/DateRangePicker/RangeDateTimePicker.js +3 -3
  17. package/lib/DropdownDatePicker/index.js +3 -3
  18. package/lib/Empty/locale/ja_JP.js +1 -1
  19. package/lib/FilterDropDown/drag.svg +17 -0
  20. package/lib/Joyride/index.js +3 -3
  21. package/lib/ModuleFederation/react-dynamic-remote-component/RemoteComponent.js +38 -39
  22. package/lib/ModuleFederation/react-dynamic-remote-component/load-module.js +22 -23
  23. package/lib/PolymerizationSearch/index.js +7 -7
  24. package/lib/QuickTransfer/CheckList.js +47 -0
  25. package/lib/QuickTransfer/TopicList.js +152 -0
  26. package/lib/QuickTransfer/index.js +13 -13
  27. package/lib/SearchBar/OutSearch.js +9 -2
  28. package/lib/SearchBar/index.js +7 -7
  29. package/lib/SingleSpa/index.js +22 -24
  30. package/lib/TimeRangeSlider/TimeRangeSliderCmp/hooks/useMouse.js +3 -3
  31. package/lib/TimeRangeSlider/index.js +6 -6
  32. package/lib/TimeZoneSelect/index.js +21 -22
  33. package/lib/useConfgiContext/index.js +6 -0
  34. package/package.json +4 -2
  35. package/lib/Card/index.less +0 -10
@@ -0,0 +1,17 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <svg width="7px" height="12px" viewBox="0 0 7 12" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
3
+ <title>形状</title>
4
+ <g id="页面-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" opacity="0.65">
5
+ <g id="4.2请求列表下钻-—快照请求列表页" transform="translate(-1368.000000, -705.000000)" fill="#000000" fill-rule="nonzero">
6
+ <g id="编组-11" transform="translate(232.000000, 554.000000)">
7
+ <g id="默认" transform="translate(857.000000, 10.000000)">
8
+ <g id="源列表" transform="translate(143.000000, 34.000000)">
9
+ <g id="拖拽备份-3" transform="translate(132.000000, 105.000000)">
10
+ <path d="M9.91111111,2 C9.37777778,2 8.97777778,2.4 8.97777778,2.93333333 C8.97777778,3.46666666 9.42222222,3.86666667 9.91111111,3.86666667 C10.4444444,3.86666667 10.8444444,3.46666667 10.8444444,2.93333333 C10.8888889,2.4 10.4444444,2 9.91111111,2 Z M9.91111111,6.71111111 C9.37777778,6.71111111 8.97777778,7.11111111 8.97777778,7.64444444 C8.97777778,8.17777777 9.42222222,8.57777778 9.91111111,8.57777778 C10.4444444,8.57777778 10.8444444,8.17777778 10.8444444,7.64444444 C10.8888889,7.11111111 10.4444444,6.71111111 9.91111111,6.71111111 Z M9.91111111,11.4222222 C9.37777778,11.4222222 8.97777778,11.8222222 8.97777778,12.3555556 C8.97777778,12.8888889 9.42222222,13.2888889 9.91111111,13.2888889 C10.4444444,13.2888889 10.8444444,12.8888889 10.8444444,12.3555556 C10.8888889,11.8222222 10.4444444,11.4222222 9.91111111,11.4222222 C9.42222222,11.4222222 9.91111111,11.4222222 9.91111111,11.4222222 Z M5.82222222,2 C5.33333333,2 4.88888889,2.4 4.88888889,2.93333333 C4.88888889,3.46666666 5.33333333,3.86666667 5.82222222,3.86666667 C6.35555555,3.86666667 6.75555555,3.46666667 6.75555556,2.93333333 C6.8,2.4 6.35555556,2 5.82222222,2 Z M5.82222222,6.71111111 C5.28888889,6.71111111 4.88888889,7.11111111 4.88888889,7.64444444 C4.88888889,8.17777777 5.33333333,8.57777778 5.82222222,8.57777778 C6.35555555,8.57777778 6.75555555,8.17777778 6.75555556,7.64444444 C6.8,7.11111111 6.35555556,6.71111111 5.82222222,6.71111111 Z M5.82222222,11.4222222 C5.28888889,11.4222222 4.88888889,11.8222222 4.88888889,12.3555556 C4.88888889,12.8888889 5.33333333,13.2888889 5.82222222,13.2888889 C6.35555555,13.2888889 6.75555555,12.8888889 6.75555556,12.3555556 C6.8,11.8222222 6.35555556,11.4222222 5.82222222,11.4222222 Z" id="形状"></path>
11
+ </g>
12
+ </g>
13
+ </g>
14
+ </g>
15
+ </g>
16
+ </g>
17
+ </svg>
@@ -79,9 +79,9 @@ function CWJoyride(_ref) {
79
79
  run = _useState8[0],
80
80
  setRun = _useState8[1];
81
81
  var _useState9 = useState(false),
82
- _useState10 = _slicedToArray(_useState9, 2),
83
- isClose = _useState10[0],
84
- setIsClose = _useState10[1]; // 是否点击了关闭 关闭后停止指引但是不算完成
82
+ _useState0 = _slicedToArray(_useState9, 2),
83
+ isClose = _useState0[0],
84
+ setIsClose = _useState0[1]; // 是否点击了关闭 关闭后停止指引但是不算完成
85
85
 
86
86
  var _useLocale = _useLocale2(langConfig),
87
87
  localeObj = _useLocale.langObj;
@@ -15,7 +15,8 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
15
15
  function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
16
16
  function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
17
17
  function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
18
- 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; }
18
+ 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 }; })(); }
19
+ 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); }
19
20
  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); }
20
21
  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); }); }; }
21
22
  import React, { useEffect, useState, useMemo, useCallback } from 'react';
@@ -35,31 +36,30 @@ export var getModule = function getModule(remoteModule) {
35
36
  } else {
36
37
  window.remoteModuleDictionary[id] = new Promise(function (resolve, reject) {
37
38
  var asyncFunc = /*#__PURE__*/function () {
38
- var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
39
- var _module;
40
- return _regeneratorRuntime().wrap(function _callee$(_context) {
41
- while (1) switch (_context.prev = _context.next) {
39
+ var _ref = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee() {
40
+ var _module, _t;
41
+ return _regenerator().w(function (_context) {
42
+ while (1) switch (_context.p = _context.n) {
42
43
  case 0:
43
- _context.prev = 0;
44
- _context.next = 3;
44
+ _context.p = 0;
45
+ _context.n = 1;
45
46
  return attachScript(remoteModule);
46
- case 3:
47
- _context.next = 5;
47
+ case 1:
48
+ _context.n = 2;
48
49
  return loadModule(remoteModule.url, remoteModule.scope, remoteModule.module)();
49
- case 5:
50
- _module = _context.sent;
50
+ case 2:
51
+ _module = _context.v;
51
52
  resolve(_module);
52
- _context.next = 12;
53
+ _context.n = 4;
53
54
  break;
54
- case 9:
55
- _context.prev = 9;
56
- _context.t0 = _context["catch"](0);
57
- reject(_context.t0);
58
- case 12:
59
- case "end":
60
- return _context.stop();
55
+ case 3:
56
+ _context.p = 3;
57
+ _t = _context.v;
58
+ reject(_t);
59
+ case 4:
60
+ return _context.a(2);
61
61
  }
62
- }, _callee, null, [[0, 9]]);
62
+ }, _callee, null, [[0, 3]]);
63
63
  }));
64
64
  return function asyncFunc() {
65
65
  return _ref.apply(this, arguments);
@@ -134,39 +134,38 @@ export var RemoteComponent = function RemoteComponent(props) {
134
134
  // 通过mount函数注入组件所需属性
135
135
 
136
136
  var getMountedProps = useCallback(/*#__PURE__*/function () {
137
- var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(Component) {
138
- var _props;
139
- return _regeneratorRuntime().wrap(function _callee2$(_context2) {
140
- while (1) switch (_context2.prev = _context2.next) {
137
+ var _ref2 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee2(Component) {
138
+ var _props, _t2;
139
+ return _regenerator().w(function (_context2) {
140
+ while (1) switch (_context2.p = _context2.n) {
141
141
  case 0:
142
- _context2.prev = 0;
142
+ _context2.p = 0;
143
143
  if (!(Component.preMount && typeof Component.preMount === 'function')) {
144
- _context2.next = 6;
144
+ _context2.n = 2;
145
145
  break;
146
146
  }
147
- _context2.next = 4;
147
+ _context2.n = 1;
148
148
  return Component.preMount(_objectSpread(_objectSpread({}, props), {}, {
149
149
  loadScript: loadScript
150
150
  }));
151
- case 4:
152
- _props = _context2.sent;
151
+ case 1:
152
+ _props = _context2.v;
153
153
  if (props) {
154
154
  setChildProps(_props);
155
155
  }
156
- case 6:
156
+ case 2:
157
157
  setLoading(false);
158
- _context2.next = 13;
158
+ _context2.n = 4;
159
159
  break;
160
- case 9:
161
- _context2.prev = 9;
162
- _context2.t0 = _context2["catch"](0);
163
- console.error(_context2.t0);
160
+ case 3:
161
+ _context2.p = 3;
162
+ _t2 = _context2.v;
163
+ console.error(_t2);
164
164
  setHasError(true);
165
- case 13:
166
- case "end":
167
- return _context2.stop();
165
+ case 4:
166
+ return _context2.a(2);
168
167
  }
169
- }, _callee2, null, [[0, 9]]);
168
+ }, _callee2, null, [[0, 3]]);
170
169
  }));
171
170
  return function (_x) {
172
171
  return _ref2.apply(this, arguments);
@@ -1,44 +1,43 @@
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 _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; }
1
+ 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 }; })(); }
2
+ 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); }
3
3
  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); }
4
4
  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); }); }; }
5
5
  // 加载指定组件
6
6
  export var loadModule = function loadModule(url, scope, module) {
7
- return /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
8
- var container, factory, Module, error;
9
- return _regeneratorRuntime().wrap(function _callee$(_context) {
10
- while (1) switch (_context.prev = _context.next) {
7
+ return /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee() {
8
+ var container, factory, Module, error, _t;
9
+ return _regenerator().w(function (_context) {
10
+ while (1) switch (_context.p = _context.n) {
11
11
  case 0:
12
- _context.prev = 0;
13
- _context.next = 3;
12
+ _context.p = 0;
13
+ _context.n = 1;
14
14
  return __webpack_init_sharing__('default');
15
- case 3:
15
+ case 1:
16
16
  container = window[scope];
17
17
  if (container.isInitialized) {
18
- _context.next = 8;
18
+ _context.n = 2;
19
19
  break;
20
20
  }
21
21
  container.isInitialized = true;
22
22
  // webpack行为:初始化容器,提供共享模块
23
- _context.next = 8;
23
+ _context.n = 2;
24
24
  return container.init(__webpack_share_scopes__["default"]);
25
- case 8:
26
- _context.next = 10;
25
+ case 2:
26
+ _context.n = 3;
27
27
  return window[scope].get(module);
28
- case 10:
29
- factory = _context.sent;
28
+ case 3:
29
+ factory = _context.v;
30
30
  Module = factory();
31
- return _context.abrupt("return", Module);
32
- case 15:
33
- _context.prev = 15;
34
- _context.t0 = _context["catch"](0);
31
+ return _context.a(2, Module);
32
+ case 4:
33
+ _context.p = 4;
34
+ _t = _context.v;
35
35
  error = new Error("There was a problem loading the remote module. Please check the parameters (url: ".concat(url, " scope: ").concat(scope, " module: ").concat(module, ")"));
36
36
  error.name = 'RemoteModuleLoadingError';
37
37
  throw error;
38
- case 20:
39
- case "end":
40
- return _context.stop();
38
+ case 5:
39
+ return _context.a(2);
41
40
  }
42
- }, _callee, null, [[0, 15]]);
41
+ }, _callee, null, [[0, 4]]);
43
42
  }));
44
43
  };
@@ -46,9 +46,9 @@ var PolymerizationSearchComponent = /*#__PURE__*/forwardRef(function (props, ref
46
46
  visible = _useState8[0],
47
47
  setVisible = _useState8[1];
48
48
  var _useState9 = useState(''),
49
- _useState10 = _slicedToArray(_useState9, 2),
50
- searchValue = _useState10[0],
51
- setSearchValue = _useState10[1];
49
+ _useState0 = _slicedToArray(_useState9, 2),
50
+ searchValue = _useState0[0],
51
+ setSearchValue = _useState0[1];
52
52
  var commonPrefixCls = props.getPrefixCls() + '-polymerizatio-search';
53
53
  useEffect(function () {
54
54
  setValue(mode === 'tag' ? translateString(props.value) : props.value);
@@ -85,10 +85,10 @@ var PolymerizationSearchComponent = /*#__PURE__*/forwardRef(function (props, ref
85
85
  return switchModeClick('textarea');
86
86
  }
87
87
  });
88
- var _useState11 = useState(0),
89
- _useState12 = _slicedToArray(_useState11, 2),
90
- selectIndex = _useState12[0],
91
- setSelectIndex = _useState12[1];
88
+ var _useState1 = useState(0),
89
+ _useState10 = _slicedToArray(_useState1, 2),
90
+ selectIndex = _useState10[0],
91
+ setSelectIndex = _useState10[1];
92
92
  useEffect(function () {
93
93
  if (visible) {
94
94
  setSelectIndex(0);
@@ -0,0 +1,47 @@
1
+ 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); }
2
+ function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
3
+ function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
4
+ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
5
+ function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
6
+ function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
7
+ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
8
+ import React, { Fragment } from 'react';
9
+ import TopicList from './TopicList';
10
+ var CheckList = function CheckList(props) {
11
+ var checkValue = props.checkValue,
12
+ handleDelete = props.handleDelete,
13
+ handlePreviewList = props.handlePreviewList,
14
+ type = props.type,
15
+ render = props.render,
16
+ renderColumns = props.renderColumns,
17
+ dragList = props.dragList;
18
+ var moveList = function moveList(dragIndex, hoverIndex) {
19
+ var tmp = checkValue[dragIndex]; //临时储存文件
20
+ checkValue.splice(dragIndex, 1); //移除拖拽项
21
+ checkValue.splice(hoverIndex, 0, tmp); //插入放置项
22
+ handlePreviewList(_toConsumableArray(checkValue)); //更新修改后的列表
23
+ };
24
+ var isLockSort = type === "list" && checkValue.filter(function (item) {
25
+ return item.disabled;
26
+ }).length;
27
+ var renderList = function renderList(item, index) {
28
+ return /*#__PURE__*/React.createElement(TopicList, _extends({
29
+ labelValue: item,
30
+ type: type,
31
+ renderColumns: renderColumns,
32
+ label: item.key,
33
+ value: item.title && item.title,
34
+ index: index,
35
+ render: render,
36
+ key: item.key,
37
+ handleDelete: handleDelete,
38
+ moveList: moveList,
39
+ dragList: dragList,
40
+ isLockSort: isLockSort
41
+ }, item));
42
+ };
43
+ return /*#__PURE__*/React.createElement(Fragment, null, checkValue.map(function (item, index) {
44
+ return renderList(item, index);
45
+ }));
46
+ };
47
+ export default CheckList;
@@ -0,0 +1,152 @@
1
+ import _Icon from "@chaoswise/ui/lib/Antd/Icon";
2
+ import "@chaoswise/ui/lib/Tooltip/index.less";
3
+ import _Tooltip from "@chaoswise/ui/lib/Tooltip";
4
+ import _ConfigProvider from "@chaoswise/ui/lib/ConfigProvider";
5
+ var _excluded = ["label", "value", "index", "handleDelete", "labelValue", "moveList", "type", "renderColumns", "render", "dragList", "disabled", "isLockSort"];
6
+ function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
7
+ function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
8
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
9
+ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
10
+ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
11
+ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
12
+ function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
13
+ function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
14
+ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
15
+ import React, { Fragment, useRef } from "react";
16
+ import { useDrag, useDrop } from "react-dnd";
17
+ import classnames from "classnames";
18
+ import { getLocale } from "./locale";
19
+ import LockSvg from "./assets/LockSvg";
20
+ import DragSvg from "./assets/DragSvg";
21
+ var TopicList = function TopicList(_ref) {
22
+ var label = _ref.label,
23
+ value = _ref.value,
24
+ index = _ref.index,
25
+ handleDelete = _ref.handleDelete,
26
+ labelValue = _ref.labelValue,
27
+ moveList = _ref.moveList,
28
+ type = _ref.type,
29
+ renderColumns = _ref.renderColumns,
30
+ render = _ref.render,
31
+ dragList = _ref.dragList,
32
+ disabled = _ref.disabled,
33
+ isLockSort = _ref.isLockSort,
34
+ rest = _objectWithoutProperties(_ref, _excluded);
35
+ // 获取当前语言
36
+ var _ConfigProvider$useLo = _ConfigProvider.useLocale(),
37
+ _ConfigProvider$useLo2 = _ConfigProvider$useLo.locale,
38
+ locale = _ConfigProvider$useLo2 === void 0 ? "zh" : _ConfigProvider$useLo2;
39
+ var localeObj = getLocale(locale);
40
+ var dragRef = useRef(null);
41
+ var _useDrag = useDrag({
42
+ item: {
43
+ type: "child",
44
+ value: value,
45
+ index: index,
46
+ label: label,
47
+ labelValue: labelValue
48
+ }
49
+ }),
50
+ _useDrag2 = _slicedToArray(_useDrag, 2),
51
+ drag = _useDrag2[1];
52
+ var _useDrop = useDrop({
53
+ accept: "child",
54
+ hover: function hover(item, monitor) {
55
+ //拖拽目标的Index
56
+ var dragIndex = item.index;
57
+ //放置目标Index
58
+ var hoverIndex = index;
59
+ // 如果拖拽目标和放置目标相同的话,停止执行
60
+ if (dragIndex === hoverIndex) {
61
+ return;
62
+ }
63
+ //如果不做以下处理,则卡片移动到另一个卡片上就会进行交换,下方处理使得卡片能够在跨过中心线后进行交换.
64
+ //获取卡片的边框矩形
65
+ // const hoverBoundingRect = dragRef.current.getBoundingClientRect();
66
+ // //获取X轴中点
67
+ // const hoverMiddleY =
68
+ // (hoverBoundingRect.bottom - hoverBoundingRect.top) / 2;
69
+ // //获取拖拽目标偏移量
70
+ // const clientOffset = monitor.getClientOffset();
71
+ // const hoverClientY = clientOffset.y - hoverBoundingRect.top;
72
+ // 从上往下放置
73
+ // if (dragIndex < hoverIndex && hoverClientY < hoverMiddleY) {
74
+ // return;
75
+ // }
76
+ // // 从下往上放置
77
+ // if (dragIndex > hoverIndex && hoverClientY > hoverMiddleY) {
78
+ // return;
79
+ // }
80
+ moveList(dragIndex, hoverIndex); //调用方法完成交换
81
+ item.index = hoverIndex; //重新赋值index,否则会出现无限交换情况
82
+ },
83
+ collect: function collect(monitor) {
84
+ var _ref2 = monitor.getItem() || {},
85
+ dragIndex = _ref2.index;
86
+ if (dragIndex === index) {
87
+ return {};
88
+ }
89
+ return {
90
+ isOver: monitor.isOver(),
91
+ dropClassName: dragIndex < index ? "drop-over-downward" : "drop-over-upward"
92
+ };
93
+ }
94
+ // drop: (item) => {
95
+ // moveList(item.index, index);
96
+ // },
97
+ }),
98
+ _useDrop2 = _slicedToArray(_useDrop, 2),
99
+ _useDrop2$ = _useDrop2[0],
100
+ isOver = _useDrop2$.isOver,
101
+ dropClassName = _useDrop2$.dropClassName,
102
+ drop = _useDrop2[1];
103
+ var handleDeleted = function handleDeleted(labelValue) {
104
+ handleDelete(labelValue);
105
+ };
106
+ var renderTable = function renderTable(labelValue) {
107
+ return /*#__PURE__*/React.createElement("div", null, renderColumns.map(function (item, index) {
108
+ return /*#__PURE__*/React.createElement("span", {
109
+ style: {
110
+ marginRight: "8px"
111
+ },
112
+ key: index
113
+ }, render(labelValue[item]));
114
+ }));
115
+ };
116
+ var dragProps = dragList && !disabled ? {
117
+ ref: drag(drop(dragRef)),
118
+ style: {
119
+ cursor: "move"
120
+ }
121
+ } : {};
122
+ var listLockSortContent = /*#__PURE__*/React.createElement("div", {
123
+ className: "cw-transfer-right-content-item"
124
+ }, /*#__PURE__*/React.createElement("div", {
125
+ className: "cw-transfer-right-content-item-drag-wrapper"
126
+ }, disabled ? /*#__PURE__*/React.createElement(LockSvg, null) : /*#__PURE__*/React.createElement(_Tooltip, {
127
+ title: localeObj["dragAndDrop"]
128
+ }, /*#__PURE__*/React.createElement(DragSvg, null))), /*#__PURE__*/React.createElement("div", {
129
+ className: "cw-transfer-right-content-item-text-wrapper"
130
+ }, render(value)), !disabled && /*#__PURE__*/React.createElement(_Icon, {
131
+ type: "close",
132
+ className: "cw-transfer-right-content-del",
133
+ onClick: function onClick() {
134
+ return handleDeleted(labelValue);
135
+ }
136
+ }));
137
+ var renderItemContent = type == "list" && isLockSort ? listLockSortContent : /*#__PURE__*/React.createElement(Fragment, null, dragList && /*#__PURE__*/React.createElement(_Tooltip, {
138
+ title: localeObj["dragAndDrop"]
139
+ }, /*#__PURE__*/React.createElement(DragSvg, {
140
+ className: "cw-transfer-right-content-drag"
141
+ })), /*#__PURE__*/React.createElement("div", null, type === "table" ? renderTable(labelValue) : render(value)), /*#__PURE__*/React.createElement(_Icon, {
142
+ type: "close",
143
+ className: "cw-transfer-right-content-del",
144
+ onClick: function onClick() {
145
+ return handleDeleted(labelValue);
146
+ }
147
+ }));
148
+ return /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("div", _extends({
149
+ className: classnames("cw-transfer-right-content-main")
150
+ }, dragProps), renderItemContent));
151
+ };
152
+ export default TopicList;
@@ -175,24 +175,24 @@ var QuickTransfer = /*#__PURE__*/forwardRef(function (props, ref) {
175
175
  setListCheckedKeys = _useState8[1];
176
176
  // 列表穿梭全选状态
177
177
  var _useState9 = useState(false),
178
- _useState10 = _slicedToArray(_useState9, 2),
179
- checkAll = _useState10[0],
180
- setCheckAll = _useState10[1];
178
+ _useState0 = _slicedToArray(_useState9, 2),
179
+ checkAll = _useState0[0],
180
+ setCheckAll = _useState0[1];
181
181
  // 全选按钮效果
182
- var _useState11 = useState(false),
183
- _useState12 = _slicedToArray(_useState11, 2),
184
- indeterminate = _useState12[0],
185
- setIndeterminate = _useState12[1];
182
+ var _useState1 = useState(false),
183
+ _useState10 = _slicedToArray(_useState1, 2),
184
+ indeterminate = _useState10[0],
185
+ setIndeterminate = _useState10[1];
186
186
 
187
187
  // 保存搜索结果
188
+ var _useState11 = useState(""),
189
+ _useState12 = _slicedToArray(_useState11, 2),
190
+ saveSearchValueLeft = _useState12[0],
191
+ setSaveSearchValueLeft = _useState12[1];
188
192
  var _useState13 = useState(""),
189
193
  _useState14 = _slicedToArray(_useState13, 2),
190
- saveSearchValueLeft = _useState14[0],
191
- setSaveSearchValueLeft = _useState14[1];
192
- var _useState15 = useState(""),
193
- _useState16 = _slicedToArray(_useState15, 2),
194
- saveSearchValueRight = _useState16[0],
195
- setSaveSearchValueRight = _useState16[1];
194
+ saveSearchValueRight = _useState14[0],
195
+ setSaveSearchValueRight = _useState14[1];
196
196
  // 获取当前语言
197
197
  var _useLocale = _useLocale2(langConfig),
198
198
  localeObj = _useLocale.langObj;
@@ -19,6 +19,7 @@ function OutSearch(_ref) {
19
19
  var getFieldDecorator = form.getFieldDecorator,
20
20
  getFieldsValue = form.getFieldsValue,
21
21
  resetFields = form.resetFields;
22
+ var prevFilterSignatureRef = useRef(null);
22
23
  //获取外线筛选条件的form方法
23
24
  useEffect(function () {
24
25
  getOutOperation({
@@ -52,9 +53,15 @@ function OutSearch(_ref) {
52
53
  }), innerForm);
53
54
  setFilterOption(outFilterOption.concat(innerFilterOption));
54
55
  //默认显示的搜索框,默认全部显示
55
- setShowCols(defaultShowFilterCols ? defaultShowFilterCols : outFilterOption.concat(innerFilterOption).map(function (item) {
56
+ //仅当可选条件集合或默认勾选变化时才重置勾选,避免父组件render产生新searchContent引用(或拖拽换序)导致用户勾选被重置
57
+ var allIds = outFilterOption.concat(innerFilterOption).map(function (item) {
56
58
  return item.id;
57
- }));
59
+ }).sort();
60
+ var filterSignature = [allIds.join(','), (defaultShowFilterCols || []).join(',')].join('|');
61
+ if (filterSignature !== prevFilterSignatureRef.current) {
62
+ prevFilterSignatureRef.current = filterSignature;
63
+ setShowCols(defaultShowFilterCols ? defaultShowFilterCols : allIds);
64
+ }
58
65
  }, [searchContents, defaultShowFilterCols]);
59
66
  var renderFormItem = function renderFormItem(child, index, isFunc) {
60
67
  return /*#__PURE__*/React.createElement(_Form.Item, {
@@ -175,13 +175,13 @@ var SearchBar = function SearchBar(props) {
175
175
  setExpandSearch = _useState8[1];
176
176
  //外部搜索条件的值,
177
177
  var _useState9 = useState({}),
178
- _useState10 = _slicedToArray(_useState9, 2),
179
- outOperation = _useState10[0],
180
- setOutOperation = _useState10[1];
181
- var _useState11 = useState([]),
182
- _useState12 = _slicedToArray(_useState11, 2),
183
- filterOption = _useState12[0],
184
- setFilterOption = _useState12[1];
178
+ _useState0 = _slicedToArray(_useState9, 2),
179
+ outOperation = _useState0[0],
180
+ setOutOperation = _useState0[1];
181
+ var _useState1 = useState([]),
182
+ _useState10 = _slicedToArray(_useState1, 2),
183
+ filterOption = _useState10[0],
184
+ setFilterOption = _useState10[1];
185
185
  //获取外部搜索条件的操作
186
186
  var getOutOperation = function getOutOperation(operation) {
187
187
  setOutOperation(operation);