@nokecy/qc-ui 1.0.94 → 1.0.96

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 (152) hide show
  1. package/dist/cjs/ag-grid-plus/ag-gridPlus.js +252 -173
  2. package/dist/cjs/ag-grid-plus/context/gridContext.d.ts +108 -20
  3. package/dist/cjs/ag-grid-plus/context/gridContext.js +12 -4
  4. package/dist/cjs/ag-grid-plus/context/useSchemeDataFlow.d.ts +88 -0
  5. package/dist/cjs/ag-grid-plus/context/useSchemeDataFlow.js +173 -0
  6. package/dist/cjs/ag-grid-plus/context/useSchemeManager.d.ts +111 -0
  7. package/dist/cjs/ag-grid-plus/context/useSchemeManager.js +596 -0
  8. package/dist/cjs/ag-grid-plus/hooks/useAgGridCalculation.d.ts +1 -1
  9. package/dist/cjs/ag-grid-plus/hooks/useAgGridData.d.ts +2 -2
  10. package/dist/cjs/ag-grid-plus/index.d.ts +7 -2
  11. package/dist/cjs/ag-grid-plus/index.js +11 -93
  12. package/dist/cjs/ag-grid-plus/interface.d.ts +0 -31
  13. package/dist/cjs/ag-grid-plus/interface.js +3 -0
  14. package/dist/cjs/ag-grid-plus/setting/ColumnSetting.d.ts +0 -3
  15. package/dist/cjs/ag-grid-plus/setting/ColumnSetting.js +279 -145
  16. package/dist/cjs/ag-grid-plus/setting/QuerySchemeManager.d.ts +11 -0
  17. package/dist/cjs/ag-grid-plus/{querySchemes/components/QuerySchemesManager.js → setting/QuerySchemeManager.js} +193 -108
  18. package/dist/cjs/ag-grid-plus/setting/index.d.ts +2 -2
  19. package/dist/cjs/ag-grid-plus/setting/index.js +33 -48
  20. package/dist/cjs/ag-grid-plus/shared/storage/backendApiAdapter.d.ts +58 -0
  21. package/dist/cjs/ag-grid-plus/shared/storage/backendApiAdapter.js +446 -0
  22. package/dist/cjs/ag-grid-plus/shared/storage/localStorageAdapter.d.ts +57 -0
  23. package/dist/cjs/ag-grid-plus/{schemes → shared}/storage/localStorageAdapter.js +253 -271
  24. package/dist/cjs/ag-grid-plus/shared/storage/schemeStorageAdapter.d.ts +132 -0
  25. package/dist/cjs/array-table/index.js +167 -45
  26. package/dist/cjs/index.d.ts +3 -3
  27. package/dist/cjs/index.js +14 -86
  28. package/dist/esm/ag-grid-plus/ag-gridPlus.js +252 -173
  29. package/dist/esm/ag-grid-plus/context/gridContext.d.ts +108 -20
  30. package/dist/esm/ag-grid-plus/context/gridContext.js +13 -4
  31. package/dist/esm/ag-grid-plus/context/useSchemeDataFlow.d.ts +88 -0
  32. package/dist/esm/ag-grid-plus/context/useSchemeDataFlow.js +165 -0
  33. package/dist/esm/ag-grid-plus/context/useSchemeManager.d.ts +111 -0
  34. package/dist/esm/ag-grid-plus/context/useSchemeManager.js +590 -0
  35. package/dist/esm/ag-grid-plus/hooks/useAgGridCalculation.d.ts +1 -1
  36. package/dist/esm/ag-grid-plus/hooks/useAgGridData.d.ts +2 -2
  37. package/dist/esm/ag-grid-plus/index.d.ts +7 -2
  38. package/dist/esm/ag-grid-plus/index.js +9 -5
  39. package/dist/esm/ag-grid-plus/interface.d.ts +0 -31
  40. package/dist/esm/ag-grid-plus/interface.js +2 -0
  41. package/dist/esm/ag-grid-plus/setting/ColumnSetting.d.ts +0 -3
  42. package/dist/esm/ag-grid-plus/setting/ColumnSetting.js +281 -147
  43. package/dist/esm/ag-grid-plus/setting/QuerySchemeManager.d.ts +11 -0
  44. package/dist/esm/ag-grid-plus/{querySchemes/components/QuerySchemesManager.js → setting/QuerySchemeManager.js} +192 -107
  45. package/dist/esm/ag-grid-plus/setting/index.d.ts +2 -2
  46. package/dist/esm/ag-grid-plus/setting/index.js +33 -48
  47. package/dist/esm/ag-grid-plus/shared/storage/backendApiAdapter.d.ts +58 -0
  48. package/dist/esm/ag-grid-plus/shared/storage/backendApiAdapter.js +444 -0
  49. package/dist/esm/ag-grid-plus/shared/storage/localStorageAdapter.d.ts +57 -0
  50. package/dist/esm/ag-grid-plus/{schemes → shared}/storage/localStorageAdapter.js +252 -271
  51. package/dist/esm/ag-grid-plus/shared/storage/schemeStorageAdapter.d.ts +132 -0
  52. package/dist/esm/array-table/index.js +168 -46
  53. package/dist/esm/index.d.ts +3 -3
  54. package/dist/esm/index.js +11 -11
  55. package/dist/esm/standardFormDialog/useStandardFormSchema.d.ts +1 -1
  56. package/dist/umd/qc-ui.min.css +1 -1
  57. package/dist/umd/qc-ui.min.js +1 -1
  58. package/package.json +1 -1
  59. package/dist/cjs/ag-grid-plus/querySchemes/components/QuerySchemesManager.d.ts +0 -21
  60. package/dist/cjs/ag-grid-plus/querySchemes/components/QuerySchemesManager.less +0 -86
  61. package/dist/cjs/ag-grid-plus/querySchemes/components/index.d.ts +0 -5
  62. package/dist/cjs/ag-grid-plus/querySchemes/components/index.js +0 -12
  63. package/dist/cjs/ag-grid-plus/querySchemes/constants.d.ts +0 -17
  64. package/dist/cjs/ag-grid-plus/querySchemes/constants.js +0 -30
  65. package/dist/cjs/ag-grid-plus/querySchemes/hooks/useQueryOrderManager.d.ts +0 -10
  66. package/dist/cjs/ag-grid-plus/querySchemes/hooks/useQueryOrderManager.js +0 -65
  67. package/dist/cjs/ag-grid-plus/querySchemes/hooks/useQuerySchemes.d.ts +0 -6
  68. package/dist/cjs/ag-grid-plus/querySchemes/hooks/useQuerySchemes.js +0 -564
  69. package/dist/cjs/ag-grid-plus/querySchemes/index.d.ts +0 -11
  70. package/dist/cjs/ag-grid-plus/querySchemes/index.js +0 -113
  71. package/dist/cjs/ag-grid-plus/querySchemes/storage/localStorageAdapter.d.ts +0 -44
  72. package/dist/cjs/ag-grid-plus/querySchemes/storage/localStorageAdapter.js +0 -261
  73. package/dist/cjs/ag-grid-plus/querySchemes/types.d.ts +0 -145
  74. package/dist/cjs/ag-grid-plus/querySchemes/utils/validator.d.ts +0 -36
  75. package/dist/cjs/ag-grid-plus/querySchemes/utils/validator.js +0 -155
  76. package/dist/cjs/ag-grid-plus/schemes/components/SchemeManager.d.ts +0 -16
  77. package/dist/cjs/ag-grid-plus/schemes/components/SchemeManager.js +0 -342
  78. package/dist/cjs/ag-grid-plus/schemes/components/SchemeManager.less +0 -35
  79. package/dist/cjs/ag-grid-plus/schemes/components/SchemeSelector.d.ts +0 -20
  80. package/dist/cjs/ag-grid-plus/schemes/components/SchemeSelector.js +0 -289
  81. package/dist/cjs/ag-grid-plus/schemes/components/SchemeSelector.less +0 -39
  82. package/dist/cjs/ag-grid-plus/schemes/components/index.d.ts +0 -4
  83. package/dist/cjs/ag-grid-plus/schemes/components/index.js +0 -19
  84. package/dist/cjs/ag-grid-plus/schemes/constants.d.ts +0 -23
  85. package/dist/cjs/ag-grid-plus/schemes/constants.js +0 -39
  86. package/dist/cjs/ag-grid-plus/schemes/hooks/useColumnSchemes.d.ts +0 -6
  87. package/dist/cjs/ag-grid-plus/schemes/hooks/useColumnSchemes.js +0 -617
  88. package/dist/cjs/ag-grid-plus/schemes/index.d.ts +0 -23
  89. package/dist/cjs/ag-grid-plus/schemes/index.js +0 -164
  90. package/dist/cjs/ag-grid-plus/schemes/storage/configMerger.d.ts +0 -10
  91. package/dist/cjs/ag-grid-plus/schemes/storage/configMerger.js +0 -34
  92. package/dist/cjs/ag-grid-plus/schemes/storage/localStorageAdapter.d.ts +0 -79
  93. package/dist/cjs/ag-grid-plus/schemes/storage/priorityStorageAdapter.d.ts +0 -122
  94. package/dist/cjs/ag-grid-plus/schemes/storage/priorityStorageAdapter.js +0 -476
  95. package/dist/cjs/ag-grid-plus/schemes/storage/remoteStorageAdapter.d.ts +0 -139
  96. package/dist/cjs/ag-grid-plus/schemes/storage/remoteStorageAdapter.js +0 -746
  97. package/dist/cjs/ag-grid-plus/schemes/storage/useRemoteStorage.d.ts +0 -29
  98. package/dist/cjs/ag-grid-plus/schemes/storage/useRemoteStorage.js +0 -45
  99. package/dist/cjs/ag-grid-plus/schemes/types.d.ts +0 -131
  100. package/dist/cjs/ag-grid-plus/schemes/types.js +0 -5
  101. package/dist/cjs/ag-grid-plus/schemes/utils/validator.d.ts +0 -27
  102. package/dist/cjs/ag-grid-plus/schemes/utils/validator.js +0 -109
  103. package/dist/cjs/ag-grid-plus/storage/index.d.ts +0 -13
  104. package/dist/cjs/ag-grid-plus/storage/index.js +0 -5
  105. package/dist/esm/ag-grid-plus/querySchemes/components/QuerySchemesManager.d.ts +0 -21
  106. package/dist/esm/ag-grid-plus/querySchemes/components/QuerySchemesManager.less +0 -86
  107. package/dist/esm/ag-grid-plus/querySchemes/components/index.d.ts +0 -5
  108. package/dist/esm/ag-grid-plus/querySchemes/components/index.js +0 -5
  109. package/dist/esm/ag-grid-plus/querySchemes/constants.d.ts +0 -17
  110. package/dist/esm/ag-grid-plus/querySchemes/constants.js +0 -24
  111. package/dist/esm/ag-grid-plus/querySchemes/hooks/useQueryOrderManager.d.ts +0 -10
  112. package/dist/esm/ag-grid-plus/querySchemes/hooks/useQueryOrderManager.js +0 -60
  113. package/dist/esm/ag-grid-plus/querySchemes/hooks/useQuerySchemes.d.ts +0 -6
  114. package/dist/esm/ag-grid-plus/querySchemes/hooks/useQuerySchemes.js +0 -559
  115. package/dist/esm/ag-grid-plus/querySchemes/index.d.ts +0 -11
  116. package/dist/esm/ag-grid-plus/querySchemes/index.js +0 -20
  117. package/dist/esm/ag-grid-plus/querySchemes/storage/localStorageAdapter.d.ts +0 -44
  118. package/dist/esm/ag-grid-plus/querySchemes/storage/localStorageAdapter.js +0 -256
  119. package/dist/esm/ag-grid-plus/querySchemes/types.d.ts +0 -145
  120. package/dist/esm/ag-grid-plus/querySchemes/utils/validator.d.ts +0 -36
  121. package/dist/esm/ag-grid-plus/querySchemes/utils/validator.js +0 -144
  122. package/dist/esm/ag-grid-plus/schemes/components/SchemeManager.d.ts +0 -16
  123. package/dist/esm/ag-grid-plus/schemes/components/SchemeManager.js +0 -334
  124. package/dist/esm/ag-grid-plus/schemes/components/SchemeManager.less +0 -35
  125. package/dist/esm/ag-grid-plus/schemes/components/SchemeSelector.d.ts +0 -20
  126. package/dist/esm/ag-grid-plus/schemes/components/SchemeSelector.js +0 -281
  127. package/dist/esm/ag-grid-plus/schemes/components/SchemeSelector.less +0 -39
  128. package/dist/esm/ag-grid-plus/schemes/components/index.d.ts +0 -4
  129. package/dist/esm/ag-grid-plus/schemes/components/index.js +0 -2
  130. package/dist/esm/ag-grid-plus/schemes/constants.d.ts +0 -23
  131. package/dist/esm/ag-grid-plus/schemes/constants.js +0 -33
  132. package/dist/esm/ag-grid-plus/schemes/hooks/useColumnSchemes.d.ts +0 -6
  133. package/dist/esm/ag-grid-plus/schemes/hooks/useColumnSchemes.js +0 -612
  134. package/dist/esm/ag-grid-plus/schemes/index.d.ts +0 -23
  135. package/dist/esm/ag-grid-plus/schemes/index.js +0 -30
  136. package/dist/esm/ag-grid-plus/schemes/storage/configMerger.d.ts +0 -10
  137. package/dist/esm/ag-grid-plus/schemes/storage/configMerger.js +0 -28
  138. package/dist/esm/ag-grid-plus/schemes/storage/localStorageAdapter.d.ts +0 -79
  139. package/dist/esm/ag-grid-plus/schemes/storage/priorityStorageAdapter.d.ts +0 -122
  140. package/dist/esm/ag-grid-plus/schemes/storage/priorityStorageAdapter.js +0 -471
  141. package/dist/esm/ag-grid-plus/schemes/storage/remoteStorageAdapter.d.ts +0 -139
  142. package/dist/esm/ag-grid-plus/schemes/storage/remoteStorageAdapter.js +0 -746
  143. package/dist/esm/ag-grid-plus/schemes/storage/useRemoteStorage.d.ts +0 -29
  144. package/dist/esm/ag-grid-plus/schemes/storage/useRemoteStorage.js +0 -40
  145. package/dist/esm/ag-grid-plus/schemes/types.d.ts +0 -131
  146. package/dist/esm/ag-grid-plus/schemes/types.js +0 -1
  147. package/dist/esm/ag-grid-plus/schemes/utils/validator.d.ts +0 -27
  148. package/dist/esm/ag-grid-plus/schemes/utils/validator.js +0 -100
  149. package/dist/esm/ag-grid-plus/storage/index.d.ts +0 -13
  150. package/dist/esm/ag-grid-plus/storage/index.js +0 -17
  151. /package/dist/cjs/ag-grid-plus/{querySchemes/types.js → shared/storage/schemeStorageAdapter.js} +0 -0
  152. /package/dist/esm/ag-grid-plus/{querySchemes/types.js → shared/storage/schemeStorageAdapter.js} +0 -0
@@ -1,256 +0,0 @@
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 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; }
3
- 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); } }
4
- 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); }); }; }
5
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
6
- function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
7
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
8
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
9
- function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
10
- import { QUERY_SCHEMES_STORAGE_KEY, CURRENT_QUERY_SCHEME_SUFFIX } from "../constants";
11
-
12
- /**
13
- * LocalStorage 存储适配器
14
- * 默认实现,基于浏览器 LocalStorage
15
- */
16
- var LocalStorageAdapter = /*#__PURE__*/function () {
17
- function LocalStorageAdapter() {
18
- _classCallCheck(this, LocalStorageAdapter);
19
- }
20
- _createClass(LocalStorageAdapter, [{
21
- key: "getStorageKey",
22
- value:
23
- /**
24
- * 构造存储键
25
- */
26
- function getStorageKey(gridId) {
27
- return "".concat(QUERY_SCHEMES_STORAGE_KEY, ":").concat(gridId);
28
- }
29
-
30
- /**
31
- * 获取指定表格的所有方案
32
- */
33
- }, {
34
- key: "getSchemes",
35
- value: (function () {
36
- var _getSchemes = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(gridId) {
37
- var key, data, schemes;
38
- return _regeneratorRuntime().wrap(function _callee$(_context) {
39
- while (1) switch (_context.prev = _context.next) {
40
- case 0:
41
- _context.prev = 0;
42
- key = this.getStorageKey(gridId);
43
- data = localStorage.getItem(key);
44
- if (data) {
45
- _context.next = 5;
46
- break;
47
- }
48
- return _context.abrupt("return", []);
49
- case 5:
50
- schemes = JSON.parse(data); // 数据合法性检查
51
- if (Array.isArray(schemes)) {
52
- _context.next = 10;
53
- break;
54
- }
55
- console.warn('[QuerySchemes] 存储数据格式错误,已清空');
56
- localStorage.removeItem(key);
57
- return _context.abrupt("return", []);
58
- case 10:
59
- return _context.abrupt("return", schemes);
60
- case 13:
61
- _context.prev = 13;
62
- _context.t0 = _context["catch"](0);
63
- console.error('[QuerySchemes] 读取方案失败:', _context.t0);
64
- return _context.abrupt("return", []);
65
- case 17:
66
- case "end":
67
- return _context.stop();
68
- }
69
- }, _callee, this, [[0, 13]]);
70
- }));
71
- function getSchemes(_x) {
72
- return _getSchemes.apply(this, arguments);
73
- }
74
- return getSchemes;
75
- }()
76
- /**
77
- * 保存方案列表到存储
78
- */
79
- )
80
- }, {
81
- key: "saveSchemes",
82
- value: (function () {
83
- var _saveSchemes = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(gridId, schemes) {
84
- var key, data;
85
- return _regeneratorRuntime().wrap(function _callee2$(_context2) {
86
- while (1) switch (_context2.prev = _context2.next) {
87
- case 0:
88
- _context2.prev = 0;
89
- key = this.getStorageKey(gridId);
90
- data = JSON.stringify(schemes);
91
- localStorage.setItem(key, data);
92
- _context2.next = 13;
93
- break;
94
- case 6:
95
- _context2.prev = 6;
96
- _context2.t0 = _context2["catch"](0);
97
- console.error('[QuerySchemes] 保存方案失败:', _context2.t0);
98
-
99
- // 如果是容量不足错误,尝试清理旧数据
100
- if (!(_context2.t0 instanceof DOMException && _context2.t0.name === 'QuotaExceededError')) {
101
- _context2.next = 12;
102
- break;
103
- }
104
- console.warn('[QuerySchemes] 存储空间不足,请删除一些旧方案');
105
- throw new Error('存储空间不足,请删除一些旧方案');
106
- case 12:
107
- throw _context2.t0;
108
- case 13:
109
- case "end":
110
- return _context2.stop();
111
- }
112
- }, _callee2, this, [[0, 6]]);
113
- }));
114
- function saveSchemes(_x2, _x3) {
115
- return _saveSchemes.apply(this, arguments);
116
- }
117
- return saveSchemes;
118
- }()
119
- /**
120
- * 清除指定表格的所有方案
121
- */
122
- )
123
- }, {
124
- key: "clearSchemes",
125
- value: (function () {
126
- var _clearSchemes = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(gridId) {
127
- var key;
128
- return _regeneratorRuntime().wrap(function _callee3$(_context3) {
129
- while (1) switch (_context3.prev = _context3.next) {
130
- case 0:
131
- _context3.prev = 0;
132
- key = this.getStorageKey(gridId);
133
- localStorage.removeItem(key);
134
- _context3.next = 9;
135
- break;
136
- case 5:
137
- _context3.prev = 5;
138
- _context3.t0 = _context3["catch"](0);
139
- console.error('[QuerySchemes] 清除方案失败:', _context3.t0);
140
- throw _context3.t0;
141
- case 9:
142
- case "end":
143
- return _context3.stop();
144
- }
145
- }, _callee3, this, [[0, 5]]);
146
- }));
147
- function clearSchemes(_x4) {
148
- return _clearSchemes.apply(this, arguments);
149
- }
150
- return clearSchemes;
151
- }()
152
- /**
153
- * 获取所有表格的方案总大小(调试用)
154
- */
155
- )
156
- }, {
157
- key: "getStorageSize",
158
- value: function getStorageSize() {
159
- var totalSize = 0;
160
- var keys = Object.keys(localStorage);
161
- for (var _i = 0, _keys = keys; _i < _keys.length; _i++) {
162
- var key = _keys[_i];
163
- if (key.startsWith(QUERY_SCHEMES_STORAGE_KEY)) {
164
- var value = localStorage.getItem(key);
165
- if (value) {
166
- totalSize += value.length * 2; // UTF-16 编码,每字符占 2 字节
167
- }
168
- }
169
- }
170
- return totalSize;
171
- }
172
-
173
- /**
174
- * 生成当前方案ID存储键名
175
- */
176
- }, {
177
- key: "getCurrentSchemeKey",
178
- value: function getCurrentSchemeKey(gridId) {
179
- return "".concat(this.getStorageKey(gridId)).concat(CURRENT_QUERY_SCHEME_SUFFIX);
180
- }
181
-
182
- /**
183
- * 获取当前激活的方案ID
184
- */
185
- }, {
186
- key: "getCurrentSchemeId",
187
- value: (function () {
188
- var _getCurrentSchemeId = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(gridId) {
189
- var key, schemeId;
190
- return _regeneratorRuntime().wrap(function _callee4$(_context4) {
191
- while (1) switch (_context4.prev = _context4.next) {
192
- case 0:
193
- _context4.prev = 0;
194
- key = this.getCurrentSchemeKey(gridId);
195
- schemeId = localStorage.getItem(key);
196
- return _context4.abrupt("return", schemeId || null);
197
- case 6:
198
- _context4.prev = 6;
199
- _context4.t0 = _context4["catch"](0);
200
- console.error('[QuerySchemes] 获取当前方案ID失败:', _context4.t0);
201
- return _context4.abrupt("return", null);
202
- case 10:
203
- case "end":
204
- return _context4.stop();
205
- }
206
- }, _callee4, this, [[0, 6]]);
207
- }));
208
- function getCurrentSchemeId(_x5) {
209
- return _getCurrentSchemeId.apply(this, arguments);
210
- }
211
- return getCurrentSchemeId;
212
- }()
213
- /**
214
- * 保存当前激活的方案ID
215
- */
216
- )
217
- }, {
218
- key: "saveCurrentSchemeId",
219
- value: (function () {
220
- var _saveCurrentSchemeId = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(gridId, schemeId) {
221
- var key;
222
- return _regeneratorRuntime().wrap(function _callee5$(_context5) {
223
- while (1) switch (_context5.prev = _context5.next) {
224
- case 0:
225
- _context5.prev = 0;
226
- key = this.getCurrentSchemeKey(gridId);
227
- if (schemeId === null) {
228
- localStorage.removeItem(key);
229
- } else {
230
- localStorage.setItem(key, schemeId);
231
- }
232
- _context5.next = 9;
233
- break;
234
- case 5:
235
- _context5.prev = 5;
236
- _context5.t0 = _context5["catch"](0);
237
- console.error('[QuerySchemes] 保存当前方案ID失败:', _context5.t0);
238
- throw _context5.t0;
239
- case 9:
240
- case "end":
241
- return _context5.stop();
242
- }
243
- }, _callee5, this, [[0, 5]]);
244
- }));
245
- function saveCurrentSchemeId(_x6, _x7) {
246
- return _saveCurrentSchemeId.apply(this, arguments);
247
- }
248
- return saveCurrentSchemeId;
249
- }())
250
- }]);
251
- return LocalStorageAdapter;
252
- }();
253
- /**
254
- * 默认存储适配器实例
255
- */
256
- export var defaultQueryStorageAdapter = new LocalStorageAdapter();
@@ -1,145 +0,0 @@
1
- /**
2
- * 查询方案 (Query Schemes) 类型定义
3
- * 平行于列方案 (Column Schemes),用于管理查询表单的项目顺序
4
- */
5
- /**
6
- * 查询方案数据结构
7
- */
8
- export interface QueryScheme {
9
- /** 方案唯一标识(UUID) */
10
- id: string;
11
- /** 方案名称(用户可编辑) */
12
- name: string;
13
- /** 是否为默认方案(首次加载自动应用) */
14
- isDefault?: boolean;
15
- /** 是否为系统预设方案(不可删除) */
16
- isSystem?: boolean;
17
- /** 创建时间戳 */
18
- createdAt: number;
19
- /** 更新时间戳 */
20
- updatedAt: number;
21
- /** 查询项字段名数组,按显示顺序排列 */
22
- itemsOrder: string[];
23
- /** 隐藏的查询项字段名数组 */
24
- hiddenFields?: string[];
25
- /** 方案描述(可选) */
26
- description?: string;
27
- /** 标签分类(可选,扩展功能) */
28
- tags?: string[];
29
- /** 共享级别(可选,扩展功能) */
30
- shareLevel?: 'private' | 'team' | 'public';
31
- }
32
- /**
33
- * 查询表单项接口扩展
34
- * 在原有 QueryFormItem 基础上添加 order 属性
35
- */
36
- export interface QueryFormItemWithOrder {
37
- /** 字段名(用于排序标识) */
38
- field: string;
39
- /** 字段显示名称 */
40
- headerName?: string;
41
- /** 默认顺序权重(数字越小越靠前) */
42
- order?: number;
43
- /** 其他原有属性 */
44
- [key: string]: any;
45
- }
46
- /**
47
- * 方案管理器配置
48
- */
49
- export interface QuerySchemeManagerConfig {
50
- /** 表格唯一标识 */
51
- gridId: string;
52
- /** 自定义存储适配器(可选) */
53
- storageAdapter?: QueryStorageAdapter;
54
- /** 是否启用自动保存到当前方案(默认 true) */
55
- enableAutoSave?: boolean;
56
- /** 方案切换回调 */
57
- onSchemeChange?: (scheme: QueryScheme | null) => void;
58
- /** 方案保存回调 */
59
- onSchemeSave?: (scheme: QueryScheme) => void;
60
- /** 方案删除回调 */
61
- onSchemeDelete?: (schemeId: string) => void;
62
- }
63
- /**
64
- * 存储适配器接口
65
- * 允许自定义存储实现(LocalStorage / IndexedDB / 后端API等)
66
- */
67
- export interface QueryStorageAdapter {
68
- /**
69
- * 获取指定表格的所有方案
70
- * @param gridId 表格唯一标识
71
- * @returns 方案列表
72
- */
73
- getSchemes(gridId: string): Promise<QueryScheme[]>;
74
- /**
75
- * 保存方案列表到存储
76
- * @param gridId 表格唯一标识
77
- * @param schemes 方案列表
78
- */
79
- saveSchemes(gridId: string, schemes: QueryScheme[]): Promise<void>;
80
- /**
81
- * 清除指定表格的所有方案
82
- * @param gridId 表格唯一标识
83
- */
84
- clearSchemes?(gridId: string): Promise<void>;
85
- /**
86
- * 获取当前激活的方案ID(用于刷新后恢复)
87
- * @param gridId 表格唯一标识
88
- * @returns 方案ID,如果没有则返回 null
89
- */
90
- getCurrentSchemeId?(gridId: string): Promise<string | null>;
91
- /**
92
- * 保存当前激活的方案ID
93
- * @param gridId 表格唯一标识
94
- * @param schemeId 方案ID,null 表示清除
95
- */
96
- saveCurrentSchemeId?(gridId: string, schemeId: string | null): Promise<void>;
97
- }
98
- /**
99
- * 方案验证结果
100
- */
101
- export interface QuerySchemeValidationResult {
102
- /** 是否有效 */
103
- valid: boolean;
104
- /** 无效的字段列表 */
105
- invalidFields: string[];
106
- /** 验证后的有效字段顺序 */
107
- validatedOrder: string[];
108
- /** 警告信息 */
109
- warnings?: string[];
110
- }
111
- /**
112
- * 方案管理器 Hook 返回值
113
- */
114
- export interface UseQuerySchemesReturn {
115
- /** 当前激活的方案 */
116
- currentScheme: QueryScheme | null;
117
- /** 所有可用方案列表 */
118
- schemes: QueryScheme[];
119
- /** 当前配置是否有未保存的修改 */
120
- isDirty: boolean;
121
- /** 是否正在加载 */
122
- loading: boolean;
123
- /** 加载指定方案 */
124
- loadScheme: (schemeId: string) => Promise<void>;
125
- /** 保存当前方案(更新现有方案) */
126
- saveScheme: (updates?: Partial<QueryScheme>) => Promise<void>;
127
- /** 创建新方案 */
128
- createScheme: (name: string, itemsOrder: string[], options?: Partial<QueryScheme>) => Promise<QueryScheme>;
129
- /** 更新方案信息(不影响 itemsOrder) */
130
- updateScheme: (schemeId: string, updates: Partial<Omit<QueryScheme, 'id' | 'itemsOrder'>>) => Promise<void>;
131
- /** 删除方案 */
132
- deleteScheme: (schemeId: string) => Promise<void>;
133
- /** 重置到方案原始状态 */
134
- resetToScheme: () => void;
135
- /** 设置默认方案 */
136
- setDefaultScheme: (schemeId: string) => Promise<void>;
137
- /** 验证方案有效性 */
138
- validateScheme: (scheme: QueryScheme, currentFormItems: QueryFormItemWithOrder[]) => QuerySchemeValidationResult;
139
- }
140
- /**
141
- * 旧格式查询顺序数据(用于迁移)
142
- */
143
- export interface LegacyQueryOrder {
144
- [gridKey: string]: string[];
145
- }
@@ -1,36 +0,0 @@
1
- import type { QueryScheme, QuerySchemeValidationResult, QueryFormItemWithOrder } from '../types';
2
- /**
3
- * 验证方案名称
4
- */
5
- export declare function validateSchemeName(name: string): {
6
- valid: boolean;
7
- error?: string;
8
- };
9
- /**
10
- * 验证方案描述
11
- */
12
- export declare function validateSchemeDescription(description: string): {
13
- valid: boolean;
14
- error?: string;
15
- };
16
- /**
17
- * 检查方案名称是否重复
18
- */
19
- export declare function checkDuplicateName(name: string, schemes: QueryScheme[], excludeId?: string): boolean;
20
- /**
21
- * 生成唯一的方案名称
22
- */
23
- export declare function generateUniqueName(baseName: string, schemes: QueryScheme[]): string;
24
- /**
25
- * 验证方案的字段顺序有效性
26
- */
27
- export declare function validateScheme(scheme: QueryScheme, currentFormItems: QueryFormItemWithOrder[]): QuerySchemeValidationResult;
28
- /**
29
- * 根据 order 属性计算默认顺序
30
- */
31
- export declare function calculateDefaultOrder(formItems: QueryFormItemWithOrder[]): string[];
32
- /**
33
- * 合并方案顺序和当前表单项
34
- * 保留自定义顺序,补充新增字段
35
- */
36
- export declare function mergeOrder(schemeOrder: string[], formItems: QueryFormItemWithOrder[]): string[];
@@ -1,144 +0,0 @@
1
- function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
2
- 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."); }
3
- 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); }
4
- function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
5
- function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
6
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
7
- import { MAX_SCHEME_NAME_LENGTH, MAX_SCHEME_DESCRIPTION_LENGTH } from "../constants";
8
-
9
- /**
10
- * 验证方案名称
11
- */
12
- export function validateSchemeName(name) {
13
- if (!name || name.trim().length === 0) {
14
- return {
15
- valid: false,
16
- error: '方案名称不能为空'
17
- };
18
- }
19
- if (name.length > MAX_SCHEME_NAME_LENGTH) {
20
- return {
21
- valid: false,
22
- error: "\u65B9\u6848\u540D\u79F0\u4E0D\u80FD\u8D85\u8FC7 ".concat(MAX_SCHEME_NAME_LENGTH, " \u4E2A\u5B57\u7B26")
23
- };
24
- }
25
- return {
26
- valid: true
27
- };
28
- }
29
-
30
- /**
31
- * 验证方案描述
32
- */
33
- export function validateSchemeDescription(description) {
34
- if (description && description.length > MAX_SCHEME_DESCRIPTION_LENGTH) {
35
- return {
36
- valid: false,
37
- error: "\u65B9\u6848\u63CF\u8FF0\u4E0D\u80FD\u8D85\u8FC7 ".concat(MAX_SCHEME_DESCRIPTION_LENGTH, " \u4E2A\u5B57\u7B26")
38
- };
39
- }
40
- return {
41
- valid: true
42
- };
43
- }
44
-
45
- /**
46
- * 检查方案名称是否重复
47
- */
48
- export function checkDuplicateName(name, schemes, excludeId) {
49
- return schemes.some(function (s) {
50
- return s.name === name && (excludeId ? s.id !== excludeId : true);
51
- });
52
- }
53
-
54
- /**
55
- * 生成唯一的方案名称
56
- */
57
- export function generateUniqueName(baseName, schemes) {
58
- var counter = 1;
59
- var newName = "".concat(baseName, " (").concat(counter, ")");
60
- while (checkDuplicateName(newName, schemes)) {
61
- counter++;
62
- newName = "".concat(baseName, " (").concat(counter, ")");
63
- }
64
- return newName;
65
- }
66
-
67
- /**
68
- * 验证方案的字段顺序有效性
69
- */
70
- export function validateScheme(scheme, currentFormItems) {
71
- var currentFields = new Set(currentFormItems.map(function (item) {
72
- return item.field;
73
- }));
74
- var schemeFields = scheme.itemsOrder;
75
-
76
- // 找出无效的字段(在方案中但不在当前表单项中)
77
- var invalidFields = schemeFields.filter(function (field) {
78
- return !currentFields.has(field);
79
- });
80
-
81
- // 找出新增的字段(在当前表单项中但不在方案中)
82
- var newFields = currentFormItems.map(function (item) {
83
- return item.field;
84
- }).filter(function (field) {
85
- return !schemeFields.includes(field);
86
- });
87
-
88
- // 生成有效的字段顺序
89
- var validatedOrder = [].concat(_toConsumableArray(schemeFields.filter(function (field) {
90
- return currentFields.has(field);
91
- })), _toConsumableArray(newFields));
92
- var warnings = [];
93
- if (invalidFields.length > 0) {
94
- warnings.push("\u4EE5\u4E0B\u5B57\u6BB5\u5DF2\u4E0D\u5B58\u5728: ".concat(invalidFields.join(', ')));
95
- }
96
- if (newFields.length > 0) {
97
- warnings.push("\u68C0\u6D4B\u5230\u65B0\u589E\u5B57\u6BB5\uFF0C\u5DF2\u81EA\u52A8\u8FFD\u52A0\u5230\u672B\u5C3E: ".concat(newFields.join(', ')));
98
- }
99
- return {
100
- valid: invalidFields.length === 0 && newFields.length === 0,
101
- invalidFields: invalidFields,
102
- validatedOrder: validatedOrder,
103
- warnings: warnings.length > 0 ? warnings : undefined
104
- };
105
- }
106
-
107
- /**
108
- * 根据 order 属性计算默认顺序
109
- */
110
- export function calculateDefaultOrder(formItems) {
111
- return _toConsumableArray(formItems).sort(function (a, b) {
112
- var _a$order, _b$order;
113
- return ((_a$order = a.order) !== null && _a$order !== void 0 ? _a$order : 999) - ((_b$order = b.order) !== null && _b$order !== void 0 ? _b$order : 999);
114
- }).map(function (item) {
115
- return item.field;
116
- });
117
- }
118
-
119
- /**
120
- * 合并方案顺序和当前表单项
121
- * 保留自定义顺序,补充新增字段
122
- */
123
- export function mergeOrder(schemeOrder, formItems) {
124
- var allFields = new Set(formItems.map(function (item) {
125
- return item.field;
126
- }));
127
- var orderedFields = schemeOrder.filter(function (field) {
128
- return allFields.has(field);
129
- });
130
- var newFields = Array.from(allFields).filter(function (field) {
131
- return !schemeOrder.includes(field);
132
- });
133
-
134
- // 新增字段按默认 order 排序后追加
135
- var newFieldsSorted = formItems.filter(function (item) {
136
- return newFields.includes(item.field);
137
- }).sort(function (a, b) {
138
- var _a$order2, _b$order2;
139
- return ((_a$order2 = a.order) !== null && _a$order2 !== void 0 ? _a$order2 : 999) - ((_b$order2 = b.order) !== null && _b$order2 !== void 0 ? _b$order2 : 999);
140
- }).map(function (item) {
141
- return item.field;
142
- });
143
- return [].concat(_toConsumableArray(orderedFields), _toConsumableArray(newFieldsSorted));
144
- }
@@ -1,16 +0,0 @@
1
- import React from 'react';
2
- import type { UseColumnSchemesReturn } from '../types';
3
- import './SchemeManager.less';
4
- export interface SchemeManagerProps {
5
- /** 方案管理器 */
6
- schemeManager: UseColumnSchemesReturn;
7
- /** 模态框是否可见 */
8
- visible: boolean;
9
- /** 关闭回调 */
10
- onClose: () => void;
11
- }
12
- /**
13
- * 方案管理组件
14
- * 在设置面板中完整管理所有列配置方案
15
- */
16
- export declare const SchemeManager: React.FC<SchemeManagerProps>;