ns-base-module 1.0.13 → 1.0.14
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/dist/ChooseModal/index.js +1 -1
- package/dist/Entry/components/TreeSelect.d.ts +4 -5
- package/dist/Entry/components/TreeSelect.d.ts.map +1 -1
- package/dist/Entry/components/TreeSelect.js +13 -5
- package/dist/IconTools/index.d.ts.map +1 -1
- package/dist/IconTools/index.js +1 -1
- package/dist/SubtotalsModal/addSubtotals.d.ts.map +1 -1
- package/dist/SubtotalsModal/addSubtotals.js +1 -1
- package/dist/SubtotalsModal/index.d.ts.map +1 -1
- package/dist/SubtotalsModal/index.js +1 -1
- package/dist/SubtotalsModal/viewSubtotals.d.ts.map +1 -1
- package/dist/SubtotalsModal/viewSubtotals.js +1 -1
- package/dist/TableHeaderConfigPopover/index.d.ts +2 -0
- package/dist/TableHeaderConfigPopover/index.d.ts.map +1 -1
- package/dist/TableHeaderConfigPopover/index.js +227 -108
- package/dist/TableHeaderConfigPopover/updateColumns.d.ts +10 -0
- package/dist/TableHeaderConfigPopover/updateColumns.d.ts.map +1 -0
- package/dist/TableHeaderConfigPopover/updateColumns.js +26 -0
- package/dist/TableHeaderConfigPopover/utils.d.ts +13 -0
- package/dist/TableHeaderConfigPopover/utils.d.ts.map +1 -1
- package/dist/TableHeaderConfigPopover/utils.js +188 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -1
- package/dist/umd/ns-base-module.min.js +1 -1
- package/dist/utils/utils.d.ts +6 -7
- package/dist/utils/utils.d.ts.map +1 -1
- package/dist/utils/utils.js +104 -103
- package/package.json +1 -1
|
@@ -3,18 +3,18 @@ var _excluded = ["menuCode", "formTemplateCode"];
|
|
|
3
3
|
function _objectDestructuringEmpty(obj) { if (obj == null) throw new TypeError("Cannot destructure " + obj); }
|
|
4
4
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
5
5
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
6
|
-
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 new 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 new 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 new 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; }
|
|
7
|
-
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
8
|
-
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
9
6
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
10
7
|
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."); }
|
|
11
8
|
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
12
9
|
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
10
|
+
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 new 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 new 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 new 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; }
|
|
13
11
|
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; }
|
|
14
12
|
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; }
|
|
15
13
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
16
14
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
17
15
|
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); }
|
|
16
|
+
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
17
|
+
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
18
18
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
19
19
|
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."); }
|
|
20
20
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
@@ -32,7 +32,7 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
32
32
|
// import { initLang } from "@/utils/language";
|
|
33
33
|
import { CopyOutlined, DeleteOutlined, PlusOutlined, SettingOutlined, ShareAltOutlined, UserOutlined } from "@ant-design/icons";
|
|
34
34
|
import { Button, Checkbox, Input, message, Popconfirm, Popover, Radio, Tooltip, Tree } from "antd";
|
|
35
|
-
import { cloneDeep, find, isEmpty } from "lodash";
|
|
35
|
+
import { cloneDeep, find, isArray, isEmpty } from "lodash";
|
|
36
36
|
import React, { memo, useEffect, useMemo, useState } from "react";
|
|
37
37
|
import { DndProvider } from "react-dnd";
|
|
38
38
|
import { HTML5Backend } from "react-dnd-html5-backend";
|
|
@@ -70,6 +70,34 @@ var ColumnsToolbarRender = /*#__PURE__*/memo(function (props) {
|
|
|
70
70
|
setCheckShare(false);
|
|
71
71
|
}
|
|
72
72
|
}, [props.editItem]);
|
|
73
|
+
var saveTempale = /*#__PURE__*/function () {
|
|
74
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(params) {
|
|
75
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
76
|
+
while (1) switch (_context.prev = _context.next) {
|
|
77
|
+
case 0:
|
|
78
|
+
if (!(props !== null && props !== void 0 && props.saveColumn)) {
|
|
79
|
+
_context.next = 6;
|
|
80
|
+
break;
|
|
81
|
+
}
|
|
82
|
+
_context.next = 3;
|
|
83
|
+
return props === null || props === void 0 ? void 0 : props.saveColumn(params);
|
|
84
|
+
case 3:
|
|
85
|
+
return _context.abrupt("return", _context.sent);
|
|
86
|
+
case 6:
|
|
87
|
+
_context.next = 8;
|
|
88
|
+
return setFormTemplates(_objectSpread({}, params));
|
|
89
|
+
case 8:
|
|
90
|
+
return _context.abrupt("return", _context.sent);
|
|
91
|
+
case 9:
|
|
92
|
+
case "end":
|
|
93
|
+
return _context.stop();
|
|
94
|
+
}
|
|
95
|
+
}, _callee);
|
|
96
|
+
}));
|
|
97
|
+
return function saveTempale(_x) {
|
|
98
|
+
return _ref.apply(this, arguments);
|
|
99
|
+
};
|
|
100
|
+
}();
|
|
73
101
|
var loopColumns = function loopColumns(arr, firstLoop) {
|
|
74
102
|
return arr.map(function (field) {
|
|
75
103
|
// if (firstLoop && field.defaultDisplay === false) {
|
|
@@ -90,6 +118,7 @@ var ColumnsToolbarRender = /*#__PURE__*/memo(function (props) {
|
|
|
90
118
|
useEffect(function () {
|
|
91
119
|
if (!columns) return;
|
|
92
120
|
// setCheckAll(true);
|
|
121
|
+
console.log("组件内部:", columns);
|
|
93
122
|
var _columns = columns.filter(function (item) {
|
|
94
123
|
return item.visitable !== false;
|
|
95
124
|
});
|
|
@@ -124,9 +153,9 @@ var ColumnsToolbarRender = /*#__PURE__*/memo(function (props) {
|
|
|
124
153
|
};
|
|
125
154
|
|
|
126
155
|
// 拖拽
|
|
127
|
-
var onDrop = function onDrop(
|
|
128
|
-
var node =
|
|
129
|
-
dragNode =
|
|
156
|
+
var onDrop = function onDrop(_ref2) {
|
|
157
|
+
var node = _ref2.node,
|
|
158
|
+
dragNode = _ref2.dragNode;
|
|
130
159
|
var nextColumns = cloneDeep(columnsTree);
|
|
131
160
|
|
|
132
161
|
// 找到 旧位置 删除自己
|
|
@@ -160,7 +189,9 @@ var ColumnsToolbarRender = /*#__PURE__*/memo(function (props) {
|
|
|
160
189
|
};
|
|
161
190
|
|
|
162
191
|
// 单选
|
|
163
|
-
var _onCheck = function onCheck(cols, checkedKeys) {
|
|
192
|
+
var _onCheck = function onCheck(cols, checkedKeys, event) {
|
|
193
|
+
// console.log("eventevent:", event);
|
|
194
|
+
var halfCheckedKeys = event.halfCheckedKeys;
|
|
164
195
|
var nextColumnsTree = cloneDeep(columnsTree);
|
|
165
196
|
// const flatArr = flatColumns(nextColumnsTree, true);
|
|
166
197
|
var flatCols = flatColumns(cols, true);
|
|
@@ -176,6 +207,13 @@ var ColumnsToolbarRender = /*#__PURE__*/memo(function (props) {
|
|
|
176
207
|
if (findItem) {
|
|
177
208
|
if (!checkedKeys.includes(item === null || item === void 0 ? void 0 : item.dataIndex)) {
|
|
178
209
|
item.checked = false;
|
|
210
|
+
if (_toConsumableArray(halfCheckedKeys).includes(item === null || item === void 0 ? void 0 : item.dataIndex)) {
|
|
211
|
+
item.parentChecked = true;
|
|
212
|
+
} else {
|
|
213
|
+
if (isArray(item.children)) {
|
|
214
|
+
item.parentChecked = false;
|
|
215
|
+
}
|
|
216
|
+
}
|
|
179
217
|
} else {
|
|
180
218
|
item.checked = true;
|
|
181
219
|
}
|
|
@@ -188,6 +226,7 @@ var ColumnsToolbarRender = /*#__PURE__*/memo(function (props) {
|
|
|
188
226
|
}
|
|
189
227
|
setCheckTree(nextColumnsTree, flatCols, checkedKeys);
|
|
190
228
|
setColumnsTree(nextColumnsTree);
|
|
229
|
+
console.log("nextColumnsTree:", nextColumnsTree);
|
|
191
230
|
updateColumns(nextColumnsTree);
|
|
192
231
|
};
|
|
193
232
|
|
|
@@ -383,20 +422,20 @@ var ColumnsToolbarRender = /*#__PURE__*/memo(function (props) {
|
|
|
383
422
|
setTemplateName(e.target.value);
|
|
384
423
|
};
|
|
385
424
|
var saveColums = /*#__PURE__*/function () {
|
|
386
|
-
var
|
|
425
|
+
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
387
426
|
var _props$editItem4, _props$editItem5, _props$handleSaveCall;
|
|
388
427
|
var params;
|
|
389
|
-
return _regeneratorRuntime().wrap(function
|
|
390
|
-
while (1) switch (
|
|
428
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
429
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
391
430
|
case 0:
|
|
392
431
|
if (templateName) {
|
|
393
|
-
|
|
432
|
+
_context2.next = 3;
|
|
394
433
|
break;
|
|
395
434
|
}
|
|
396
435
|
message.warning(initLang({
|
|
397
436
|
id: "prompt.placeholderTemplate"
|
|
398
437
|
}));
|
|
399
|
-
return
|
|
438
|
+
return _context2.abrupt("return");
|
|
400
439
|
case 3:
|
|
401
440
|
params = {
|
|
402
441
|
name: templateName,
|
|
@@ -409,18 +448,26 @@ var ColumnsToolbarRender = /*#__PURE__*/memo(function (props) {
|
|
|
409
448
|
code: ((_props$editItem5 = props.editItem) === null || _props$editItem5 === void 0 ? void 0 : _props$editItem5.value) || null,
|
|
410
449
|
query_type: props.crossQuery ? "cross" : "list"
|
|
411
450
|
};
|
|
412
|
-
|
|
413
|
-
return
|
|
451
|
+
_context2.next = 6;
|
|
452
|
+
return saveTempale(params);
|
|
414
453
|
case 6:
|
|
454
|
+
// if (props?.saveColumn) {
|
|
455
|
+
// await props?.saveColumn(params);s
|
|
456
|
+
// } else {
|
|
457
|
+
// await setFormTemplates({
|
|
458
|
+
// ...params,
|
|
459
|
+
// });
|
|
460
|
+
// }
|
|
461
|
+
|
|
415
462
|
(_props$handleSaveCall = props.handleSaveCallback) === null || _props$handleSaveCall === void 0 || _props$handleSaveCall.call(props);
|
|
416
463
|
case 7:
|
|
417
464
|
case "end":
|
|
418
|
-
return
|
|
465
|
+
return _context2.stop();
|
|
419
466
|
}
|
|
420
|
-
},
|
|
467
|
+
}, _callee2);
|
|
421
468
|
}));
|
|
422
469
|
return function saveColums() {
|
|
423
|
-
return
|
|
470
|
+
return _ref3.apply(this, arguments);
|
|
424
471
|
};
|
|
425
472
|
}();
|
|
426
473
|
|
|
@@ -509,7 +556,6 @@ var ColumnsToolbarRender = /*#__PURE__*/memo(function (props) {
|
|
|
509
556
|
}, initLang({
|
|
510
557
|
id: "prompt.fixed.left"
|
|
511
558
|
})), /*#__PURE__*/React.createElement(Tree, {
|
|
512
|
-
className: "draggable-tree-wrapper",
|
|
513
559
|
blockNode: true,
|
|
514
560
|
checkable: true,
|
|
515
561
|
showLine: true,
|
|
@@ -518,8 +564,8 @@ var ColumnsToolbarRender = /*#__PURE__*/memo(function (props) {
|
|
|
518
564
|
}).map(function (col) {
|
|
519
565
|
return col.dataIndex;
|
|
520
566
|
}),
|
|
521
|
-
onCheck: function onCheck(checkedKeys) {
|
|
522
|
-
return _onCheck(leftFixed, checkedKeys);
|
|
567
|
+
onCheck: function onCheck(checkedKeys, event) {
|
|
568
|
+
return _onCheck(leftFixed, checkedKeys, event);
|
|
523
569
|
},
|
|
524
570
|
treeData: leftFixed === null || leftFixed === void 0 ? void 0 : leftFixed.map(function (c) {
|
|
525
571
|
return {
|
|
@@ -550,8 +596,8 @@ var ColumnsToolbarRender = /*#__PURE__*/memo(function (props) {
|
|
|
550
596
|
}).map(function (col) {
|
|
551
597
|
return col.dataIndex;
|
|
552
598
|
}),
|
|
553
|
-
onCheck: function onCheck(checkKey) {
|
|
554
|
-
return _onCheck(unFixed, checkKey);
|
|
599
|
+
onCheck: function onCheck(checkKey, event) {
|
|
600
|
+
return _onCheck(unFixed, checkKey, event);
|
|
555
601
|
},
|
|
556
602
|
treeData: unFixed === null || unFixed === void 0 ? void 0 : unFixed.map(function (c) {
|
|
557
603
|
return {
|
|
@@ -572,7 +618,6 @@ var ColumnsToolbarRender = /*#__PURE__*/memo(function (props) {
|
|
|
572
618
|
}, initLang({
|
|
573
619
|
id: "prompt.fixed.right"
|
|
574
620
|
})), /*#__PURE__*/React.createElement(Tree, {
|
|
575
|
-
className: "draggable-tree-wrapper",
|
|
576
621
|
blockNode: true,
|
|
577
622
|
checkable: true,
|
|
578
623
|
showLine: true,
|
|
@@ -581,8 +626,8 @@ var ColumnsToolbarRender = /*#__PURE__*/memo(function (props) {
|
|
|
581
626
|
}).map(function (col) {
|
|
582
627
|
return col.dataIndex;
|
|
583
628
|
}),
|
|
584
|
-
onCheck: function onCheck(checkKeys) {
|
|
585
|
-
return _onCheck(rightFixed, checkKeys);
|
|
629
|
+
onCheck: function onCheck(checkKeys, event) {
|
|
630
|
+
return _onCheck(rightFixed, checkKeys, event);
|
|
586
631
|
},
|
|
587
632
|
treeData: rightFixed === null || rightFixed === void 0 ? void 0 : rightFixed.map(function (c) {
|
|
588
633
|
return {
|
|
@@ -620,10 +665,10 @@ var ColumnsToolbarRender = /*#__PURE__*/memo(function (props) {
|
|
|
620
665
|
});
|
|
621
666
|
|
|
622
667
|
// 模板列表
|
|
623
|
-
var ColumnsToolbar = function ColumnsToolbar(
|
|
624
|
-
var menuCode =
|
|
625
|
-
formTemplateCode =
|
|
626
|
-
props = _objectWithoutProperties(
|
|
668
|
+
var ColumnsToolbar = function ColumnsToolbar(_ref4) {
|
|
669
|
+
var menuCode = _ref4.menuCode,
|
|
670
|
+
formTemplateCode = _ref4.formTemplateCode,
|
|
671
|
+
props = _objectWithoutProperties(_ref4, _excluded);
|
|
627
672
|
var _useState7 = useState(),
|
|
628
673
|
_useState8 = _slicedToArray(_useState7, 2),
|
|
629
674
|
value = _useState8[0],
|
|
@@ -648,25 +693,75 @@ var ColumnsToolbar = function ColumnsToolbar(_ref3) {
|
|
|
648
693
|
_useState18 = _slicedToArray(_useState17, 2),
|
|
649
694
|
editItem = _useState18[0],
|
|
650
695
|
setEditItem = _useState18[1];
|
|
696
|
+
var _useState19 = useState(),
|
|
697
|
+
_useState20 = _slicedToArray(_useState19, 2),
|
|
698
|
+
curItem = _useState20[0],
|
|
699
|
+
setCurItem = _useState20[1];
|
|
700
|
+
var saveTempale = /*#__PURE__*/function () {
|
|
701
|
+
var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(params) {
|
|
702
|
+
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
703
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
704
|
+
case 0:
|
|
705
|
+
if (!(props !== null && props !== void 0 && props.saveColumn)) {
|
|
706
|
+
_context3.next = 6;
|
|
707
|
+
break;
|
|
708
|
+
}
|
|
709
|
+
_context3.next = 3;
|
|
710
|
+
return props === null || props === void 0 ? void 0 : props.saveColumn(params);
|
|
711
|
+
case 3:
|
|
712
|
+
return _context3.abrupt("return", _context3.sent);
|
|
713
|
+
case 6:
|
|
714
|
+
_context3.next = 8;
|
|
715
|
+
return setFormTemplates(_objectSpread({}, params));
|
|
716
|
+
case 8:
|
|
717
|
+
return _context3.abrupt("return", _context3.sent);
|
|
718
|
+
case 9:
|
|
719
|
+
case "end":
|
|
720
|
+
return _context3.stop();
|
|
721
|
+
}
|
|
722
|
+
}, _callee3);
|
|
723
|
+
}));
|
|
724
|
+
return function saveTempale(_x2) {
|
|
725
|
+
return _ref5.apply(this, arguments);
|
|
726
|
+
};
|
|
727
|
+
}();
|
|
651
728
|
var getColumnsFilter = /*#__PURE__*/function () {
|
|
652
|
-
var
|
|
653
|
-
var _res
|
|
654
|
-
var res,
|
|
655
|
-
return _regeneratorRuntime().wrap(function
|
|
656
|
-
while (1) switch (
|
|
729
|
+
var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
|
|
730
|
+
var _res;
|
|
731
|
+
var res, _res2, _templateUser, _template;
|
|
732
|
+
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
733
|
+
while (1) switch (_context4.prev = _context4.next) {
|
|
657
734
|
case 0:
|
|
658
|
-
|
|
735
|
+
res = {}; // debugger;
|
|
736
|
+
if (!(props !== null && props !== void 0 && props.request)) {
|
|
737
|
+
_context4.next = 8;
|
|
738
|
+
break;
|
|
739
|
+
}
|
|
740
|
+
_context4.next = 4;
|
|
741
|
+
return props === null || props === void 0 ? void 0 : props.request();
|
|
742
|
+
case 4:
|
|
743
|
+
res = _context4.sent;
|
|
744
|
+
res = {
|
|
745
|
+
data: {
|
|
746
|
+
data: res
|
|
747
|
+
}
|
|
748
|
+
};
|
|
749
|
+
_context4.next = 11;
|
|
750
|
+
break;
|
|
751
|
+
case 8:
|
|
752
|
+
_context4.next = 10;
|
|
659
753
|
return queryColumnsConfig({
|
|
660
754
|
menuCode: menuCode,
|
|
661
755
|
formTemplateCode: formTemplateCode,
|
|
662
756
|
queryType: props.crossQuery ? "cross" : "list"
|
|
663
757
|
});
|
|
664
|
-
case
|
|
665
|
-
res =
|
|
666
|
-
|
|
758
|
+
case 10:
|
|
759
|
+
res = _context4.sent;
|
|
760
|
+
case 11:
|
|
761
|
+
if ((_res = res) !== null && _res !== void 0 && (_res = _res.data) !== null && _res !== void 0 && _res.data) {
|
|
667
762
|
_templateUser = [];
|
|
668
763
|
_template = [];
|
|
669
|
-
res === null ||
|
|
764
|
+
(_res2 = res) === null || _res2 === void 0 || (_res2 = _res2.data) === null || _res2 === void 0 || _res2.data.forEach(function (item) {
|
|
670
765
|
if (item.perms_type === "private") {
|
|
671
766
|
_templateUser.push(item);
|
|
672
767
|
} else {
|
|
@@ -677,19 +772,20 @@ var ColumnsToolbar = function ColumnsToolbar(_ref3) {
|
|
|
677
772
|
}
|
|
678
773
|
if (item.is_default === "Y") {
|
|
679
774
|
setValue(item.value);
|
|
775
|
+
setCurItem(item);
|
|
680
776
|
}
|
|
681
777
|
});
|
|
682
778
|
setTemplate(_template);
|
|
683
779
|
setTemplateUser(_templateUser);
|
|
684
780
|
}
|
|
685
|
-
case
|
|
781
|
+
case 12:
|
|
686
782
|
case "end":
|
|
687
|
-
return
|
|
783
|
+
return _context4.stop();
|
|
688
784
|
}
|
|
689
|
-
},
|
|
785
|
+
}, _callee4);
|
|
690
786
|
}));
|
|
691
787
|
return function getColumnsFilter() {
|
|
692
|
-
return
|
|
788
|
+
return _ref6.apply(this, arguments);
|
|
693
789
|
};
|
|
694
790
|
}();
|
|
695
791
|
|
|
@@ -747,33 +843,33 @@ var ColumnsToolbar = function ColumnsToolbar(_ref3) {
|
|
|
747
843
|
|
|
748
844
|
// 复制成个人模板
|
|
749
845
|
var handleCopy = /*#__PURE__*/function () {
|
|
750
|
-
var
|
|
846
|
+
var _ref7 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(item) {
|
|
751
847
|
var params;
|
|
752
|
-
return _regeneratorRuntime().wrap(function
|
|
753
|
-
while (1) switch (
|
|
848
|
+
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
|
|
849
|
+
while (1) switch (_context5.prev = _context5.next) {
|
|
754
850
|
case 0:
|
|
755
851
|
params = {
|
|
756
852
|
name: item.label + "-copy",
|
|
757
|
-
is_default: "
|
|
853
|
+
is_default: "N",
|
|
758
854
|
configs: item.define,
|
|
759
855
|
menu_code: menuCode,
|
|
760
856
|
form_template_code: formTemplateCode,
|
|
761
857
|
perms_type: "private",
|
|
762
858
|
code: null,
|
|
763
859
|
query_type: props.crossQuery ? "cross" : "list"
|
|
764
|
-
};
|
|
765
|
-
|
|
766
|
-
return
|
|
860
|
+
}; // await setFormTemplates(params);
|
|
861
|
+
_context5.next = 3;
|
|
862
|
+
return saveTempale(params);
|
|
767
863
|
case 3:
|
|
768
864
|
getColumnsFilter();
|
|
769
865
|
case 4:
|
|
770
866
|
case "end":
|
|
771
|
-
return
|
|
867
|
+
return _context5.stop();
|
|
772
868
|
}
|
|
773
|
-
},
|
|
869
|
+
}, _callee5);
|
|
774
870
|
}));
|
|
775
|
-
return function handleCopy(
|
|
776
|
-
return
|
|
871
|
+
return function handleCopy(_x3) {
|
|
872
|
+
return _ref7.apply(this, arguments);
|
|
777
873
|
};
|
|
778
874
|
}();
|
|
779
875
|
var onChange = function onChange(e) {
|
|
@@ -782,6 +878,7 @@ var ColumnsToolbar = function ColumnsToolbar(_ref3) {
|
|
|
782
878
|
arr.forEach(function (item) {
|
|
783
879
|
if (item.value === e.target.value) {
|
|
784
880
|
props.updateColumns(JSON.parse(item.define));
|
|
881
|
+
setCurItem(item);
|
|
785
882
|
return;
|
|
786
883
|
}
|
|
787
884
|
});
|
|
@@ -796,12 +893,12 @@ var ColumnsToolbar = function ColumnsToolbar(_ref3) {
|
|
|
796
893
|
setEditItem(item);
|
|
797
894
|
};
|
|
798
895
|
var handleOptionDelete = /*#__PURE__*/function () {
|
|
799
|
-
var
|
|
800
|
-
return _regeneratorRuntime().wrap(function
|
|
801
|
-
while (1) switch (
|
|
896
|
+
var _ref8 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6() {
|
|
897
|
+
return _regeneratorRuntime().wrap(function _callee6$(_context6) {
|
|
898
|
+
while (1) switch (_context6.prev = _context6.next) {
|
|
802
899
|
case 0:
|
|
803
|
-
|
|
804
|
-
return
|
|
900
|
+
_context6.next = 2;
|
|
901
|
+
return saveTempale({
|
|
805
902
|
menu_code: menuCode,
|
|
806
903
|
form_template_code: formTemplateCode,
|
|
807
904
|
is_deleted: "Y",
|
|
@@ -809,15 +906,22 @@ var ColumnsToolbar = function ColumnsToolbar(_ref3) {
|
|
|
809
906
|
query_type: props.crossQuery ? "cross" : "list"
|
|
810
907
|
});
|
|
811
908
|
case 2:
|
|
909
|
+
// await setFormTemplates({
|
|
910
|
+
// menu_code: menuCode,
|
|
911
|
+
// form_template_code: formTemplateCode,
|
|
912
|
+
// is_deleted: "Y",
|
|
913
|
+
// code: editItem?.value,
|
|
914
|
+
// query_type: props.crossQuery ? "cross" : "list",
|
|
915
|
+
// });
|
|
812
916
|
getColumnsFilter();
|
|
813
917
|
case 3:
|
|
814
918
|
case "end":
|
|
815
|
-
return
|
|
919
|
+
return _context6.stop();
|
|
816
920
|
}
|
|
817
|
-
},
|
|
921
|
+
}, _callee6);
|
|
818
922
|
}));
|
|
819
923
|
return function handleOptionDelete() {
|
|
820
|
-
return
|
|
924
|
+
return _ref8.apply(this, arguments);
|
|
821
925
|
};
|
|
822
926
|
}();
|
|
823
927
|
var confirm = function confirm() {
|
|
@@ -826,25 +930,28 @@ var ColumnsToolbar = function ColumnsToolbar(_ref3) {
|
|
|
826
930
|
var cancel = function cancel() {};
|
|
827
931
|
|
|
828
932
|
// 设置默认
|
|
829
|
-
var handleSaveDefault = function handleSaveDefault() {
|
|
933
|
+
var handleSaveDefault = function handleSaveDefault(isDefault) {
|
|
830
934
|
var arr = [].concat(_toConsumableArray(templateUser), _toConsumableArray(template));
|
|
831
935
|
arr.forEach(function (item) {
|
|
832
936
|
if (item.value === value) {
|
|
833
|
-
|
|
937
|
+
saveTempale({
|
|
834
938
|
menu_code: menuCode,
|
|
835
939
|
form_template_code: formTemplateCode,
|
|
836
|
-
is_default:
|
|
940
|
+
is_default: isDefault,
|
|
837
941
|
code: item === null || item === void 0 ? void 0 : item.value,
|
|
838
942
|
name: item === null || item === void 0 ? void 0 : item.label,
|
|
839
943
|
configs: item === null || item === void 0 ? void 0 : item.define,
|
|
840
944
|
query_type: props.crossQuery ? "cross" : "list",
|
|
841
945
|
perms_type: item.perms_type
|
|
842
946
|
}).then(function (res) {
|
|
843
|
-
var _res$
|
|
844
|
-
if ((res === null || res === void 0 || (_res$
|
|
947
|
+
var _res$data;
|
|
948
|
+
if ((res === null || res === void 0 || (_res$data = res.data) === null || _res$data === void 0 ? void 0 : _res$data.code) === 200) {
|
|
845
949
|
message.success(initLang({
|
|
846
950
|
id: "message.success.set"
|
|
847
951
|
}));
|
|
952
|
+
// 刷新列表
|
|
953
|
+
setCurItem({});
|
|
954
|
+
getColumnsFilter();
|
|
848
955
|
}
|
|
849
956
|
});
|
|
850
957
|
return;
|
|
@@ -880,6 +987,9 @@ var ColumnsToolbar = function ColumnsToolbar(_ref3) {
|
|
|
880
987
|
},
|
|
881
988
|
handleSaveCallback: handleSaveCallback,
|
|
882
989
|
menuCode: menuCode,
|
|
990
|
+
saveColumn: props.saveColumn,
|
|
991
|
+
request: props.request,
|
|
992
|
+
crossQuery: props.crossQuery,
|
|
883
993
|
formTemplateCode: formTemplateCode,
|
|
884
994
|
editItem: editItem
|
|
885
995
|
}) : /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Radio.Group, {
|
|
@@ -905,6 +1015,16 @@ var ColumnsToolbar = function ColumnsToolbar(_ref3) {
|
|
|
905
1015
|
className: "set-text-default"
|
|
906
1016
|
}, initLang({
|
|
907
1017
|
id: "prompt.text.default"
|
|
1018
|
+
})), /*#__PURE__*/React.createElement(Tooltip, {
|
|
1019
|
+
placement: "top",
|
|
1020
|
+
title: initLang({
|
|
1021
|
+
id: "prompt.setTemplate"
|
|
1022
|
+
})
|
|
1023
|
+
}, /*#__PURE__*/React.createElement(SettingOutlined, {
|
|
1024
|
+
className: "set-icon",
|
|
1025
|
+
onClick: function onClick() {
|
|
1026
|
+
return handleSet(item);
|
|
1027
|
+
}
|
|
908
1028
|
})), /*#__PURE__*/React.createElement(Popconfirm, {
|
|
909
1029
|
title: initLang({
|
|
910
1030
|
id: "message.confirm.delete"
|
|
@@ -927,17 +1047,7 @@ var ColumnsToolbar = function ColumnsToolbar(_ref3) {
|
|
|
927
1047
|
onClick: function onClick() {
|
|
928
1048
|
return handleDel(item);
|
|
929
1049
|
}
|
|
930
|
-
})))
|
|
931
|
-
placement: "top",
|
|
932
|
-
title: initLang({
|
|
933
|
-
id: "prompt.setTemplate"
|
|
934
|
-
})
|
|
935
|
-
}, /*#__PURE__*/React.createElement(SettingOutlined, {
|
|
936
|
-
className: "set-icon",
|
|
937
|
-
onClick: function onClick() {
|
|
938
|
-
return handleSet(item);
|
|
939
|
-
}
|
|
940
|
-
}))));
|
|
1050
|
+
})))));
|
|
941
1051
|
})), /*#__PURE__*/React.createElement("div", {
|
|
942
1052
|
className: "list-title"
|
|
943
1053
|
}, /*#__PURE__*/React.createElement(ShareAltOutlined, {
|
|
@@ -955,29 +1065,17 @@ var ColumnsToolbar = function ColumnsToolbar(_ref3) {
|
|
|
955
1065
|
className: "set-text-default"
|
|
956
1066
|
}, initLang({
|
|
957
1067
|
id: "prompt.text.default"
|
|
958
|
-
})), item.owner === "
|
|
959
|
-
title: initLang({
|
|
960
|
-
id: "message.confirm.delete"
|
|
961
|
-
}),
|
|
962
|
-
okText: initLang({
|
|
963
|
-
id: "button.ok"
|
|
964
|
-
}),
|
|
965
|
-
cancelText: initLang({
|
|
966
|
-
id: "button.cancel"
|
|
967
|
-
}),
|
|
968
|
-
onConfirm: confirm,
|
|
969
|
-
onCancel: cancel
|
|
970
|
-
}, /*#__PURE__*/React.createElement(Tooltip, {
|
|
1068
|
+
})), item.owner === "N" && /*#__PURE__*/React.createElement("span", null, /*#__PURE__*/React.createElement(Tooltip, {
|
|
971
1069
|
placement: "top",
|
|
972
1070
|
title: initLang({
|
|
973
|
-
id: "prompt.
|
|
1071
|
+
id: "prompt.copyTemplate"
|
|
974
1072
|
})
|
|
975
|
-
}, /*#__PURE__*/React.createElement(
|
|
1073
|
+
}, /*#__PURE__*/React.createElement(CopyOutlined, {
|
|
976
1074
|
className: "set-icon",
|
|
977
1075
|
onClick: function onClick() {
|
|
978
|
-
return
|
|
1076
|
+
return handleCopy(item);
|
|
979
1077
|
}
|
|
980
|
-
}))), /*#__PURE__*/React.createElement(Tooltip, {
|
|
1078
|
+
}))), item.owner === "Y" && /*#__PURE__*/React.createElement("span", null, /*#__PURE__*/React.createElement(Tooltip, {
|
|
981
1079
|
placement: "top",
|
|
982
1080
|
title: initLang({
|
|
983
1081
|
id: "prompt.setTemplate"
|
|
@@ -987,40 +1085,61 @@ var ColumnsToolbar = function ColumnsToolbar(_ref3) {
|
|
|
987
1085
|
onClick: function onClick() {
|
|
988
1086
|
return handleSet(item);
|
|
989
1087
|
}
|
|
990
|
-
}))
|
|
1088
|
+
})), /*#__PURE__*/React.createElement(Popconfirm, {
|
|
1089
|
+
title: initLang({
|
|
1090
|
+
id: "message.confirm.delete"
|
|
1091
|
+
}),
|
|
1092
|
+
okText: initLang({
|
|
1093
|
+
id: "button.ok"
|
|
1094
|
+
}),
|
|
1095
|
+
cancelText: initLang({
|
|
1096
|
+
id: "button.cancel"
|
|
1097
|
+
}),
|
|
1098
|
+
onConfirm: confirm,
|
|
1099
|
+
onCancel: cancel
|
|
1100
|
+
}, /*#__PURE__*/React.createElement(Tooltip, {
|
|
991
1101
|
placement: "top",
|
|
992
1102
|
title: initLang({
|
|
993
|
-
id: "prompt.
|
|
1103
|
+
id: "prompt.delTemplate"
|
|
994
1104
|
})
|
|
995
|
-
}, /*#__PURE__*/React.createElement(
|
|
1105
|
+
}, /*#__PURE__*/React.createElement(DeleteOutlined, {
|
|
996
1106
|
className: "set-icon",
|
|
997
1107
|
onClick: function onClick() {
|
|
998
|
-
return
|
|
1108
|
+
return handleDel(item);
|
|
999
1109
|
}
|
|
1000
|
-
}))));
|
|
1001
|
-
}))), /*#__PURE__*/React.createElement("div", {
|
|
1110
|
+
})))));
|
|
1111
|
+
}))), (curItem === null || curItem === void 0 ? void 0 : curItem.perms_type) !== "public" && /*#__PURE__*/React.createElement("div", {
|
|
1002
1112
|
style: {
|
|
1003
1113
|
position: "absolute",
|
|
1004
1114
|
right: 12,
|
|
1005
1115
|
bottom: 16
|
|
1006
1116
|
}
|
|
1007
|
-
}, /*#__PURE__*/React.createElement(Button, {
|
|
1008
|
-
onClick:
|
|
1117
|
+
}, (curItem === null || curItem === void 0 ? void 0 : curItem.is_default) === "Y" ? /*#__PURE__*/React.createElement(Button, {
|
|
1118
|
+
onClick: function onClick() {
|
|
1119
|
+
return handleSaveDefault("N");
|
|
1120
|
+
},
|
|
1121
|
+
size: "small"
|
|
1122
|
+
}, initLang({
|
|
1123
|
+
id: "button.set.cancelDefault"
|
|
1124
|
+
})) : /*#__PURE__*/React.createElement(Button, {
|
|
1125
|
+
onClick: function onClick() {
|
|
1126
|
+
return handleSaveDefault("Y");
|
|
1127
|
+
},
|
|
1009
1128
|
size: "small",
|
|
1010
1129
|
type: "primary"
|
|
1011
1130
|
}, initLang({
|
|
1012
1131
|
id: "button.set.default"
|
|
1013
1132
|
})))));
|
|
1014
1133
|
};
|
|
1015
|
-
var Index = function Index(
|
|
1016
|
-
var props = Object.assign({}, (_objectDestructuringEmpty(
|
|
1134
|
+
var Index = function Index(_ref9) {
|
|
1135
|
+
var props = Object.assign({}, (_objectDestructuringEmpty(_ref9), _ref9));
|
|
1017
1136
|
return /*#__PURE__*/React.createElement(Popover, {
|
|
1018
|
-
placement: "
|
|
1137
|
+
placement: "bottomLeft",
|
|
1019
1138
|
trigger: "click",
|
|
1020
1139
|
title: "",
|
|
1021
1140
|
content: /*#__PURE__*/React.createElement(ColumnsToolbar, props)
|
|
1022
1141
|
}, /*#__PURE__*/React.createElement(Tooltip, {
|
|
1023
|
-
placement: "
|
|
1142
|
+
placement: "left",
|
|
1024
1143
|
title: initLang({
|
|
1025
1144
|
id: "prompt.setTemplate"
|
|
1026
1145
|
})
|