@nokecy/qc-ui 1.1.68 → 1.1.70
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/cjs/ag-grid-plus/ag-gridPlus.js +1 -16
- package/dist/cjs/ag-grid-plus/setting/ColumnConfigForm.js +3 -1
- package/dist/cjs/ag-grid-plus/setting/ColumnConfigTable.js +7 -3
- package/dist/cjs/ag-grid-plus/setting/ColumnNameCellRenderer.js +9 -6
- package/dist/cjs/ag-grid-plus/setting/ColumnSetting.js +4 -2
- package/dist/cjs/ag-grid-plus/setting/MoveNodeModal.js +3 -1
- package/dist/cjs/ag-grid-plus/setting/NameColumnRenderer.js +6 -4
- package/dist/cjs/ag-grid-plus/setting/QuerySchemeManager.js +10 -8
- package/dist/cjs/ag-grid-plus/utils/columnProcessors.js +6 -3
- package/dist/cjs/array-table/readOnlyFormatters.d.ts +8 -0
- package/dist/cjs/array-table/readOnlyFormatters.js +23 -1
- package/dist/cjs/array-table/utils.js +49 -12
- package/dist/cjs/generatedListPage/_utils/defaultHandlers.d.ts +1 -1
- package/dist/cjs/generatedListPage/_utils/defaultHandlers.js +130 -42
- package/dist/cjs/generatedListPage/types.d.ts +2 -2
- package/dist/esm/ag-grid-plus/ag-gridPlus.js +3 -18
- package/dist/esm/ag-grid-plus/setting/ColumnConfigForm.js +4 -2
- package/dist/esm/ag-grid-plus/setting/ColumnConfigTable.js +8 -4
- package/dist/esm/ag-grid-plus/setting/ColumnNameCellRenderer.js +10 -7
- package/dist/esm/ag-grid-plus/setting/ColumnSetting.js +5 -3
- package/dist/esm/ag-grid-plus/setting/MoveNodeModal.js +4 -2
- package/dist/esm/ag-grid-plus/setting/NameColumnRenderer.js +7 -5
- package/dist/esm/ag-grid-plus/setting/QuerySchemeManager.js +11 -9
- package/dist/esm/ag-grid-plus/utils/columnProcessors.js +6 -3
- package/dist/esm/array-table/readOnlyFormatters.d.ts +8 -0
- package/dist/esm/array-table/readOnlyFormatters.js +22 -0
- package/dist/esm/array-table/utils.js +50 -13
- package/dist/esm/generatedListPage/_utils/defaultHandlers.d.ts +1 -1
- package/dist/esm/generatedListPage/_utils/defaultHandlers.js +130 -42
- package/dist/esm/generatedListPage/types.d.ts +2 -2
- package/dist/umd/qc-ui.min.js +1 -1
- package/package.json +1 -1
|
@@ -9,6 +9,68 @@ var _antd = require("antd");
|
|
|
9
9
|
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; }
|
|
10
10
|
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); } }
|
|
11
11
|
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); }); }; }
|
|
12
|
+
/**
|
|
13
|
+
* 按 blob 收的请求,后端的 JSON 错误体(无权限、业务校验等)也是 Blob,要读出来才能给出原因。@author nokecy
|
|
14
|
+
*/
|
|
15
|
+
var readBlobErrorMessage = /*#__PURE__*/function () {
|
|
16
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(data) {
|
|
17
|
+
var _JSON$parse;
|
|
18
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
19
|
+
while (1) switch (_context.prev = _context.next) {
|
|
20
|
+
case 0:
|
|
21
|
+
if (data instanceof Blob) {
|
|
22
|
+
_context.next = 2;
|
|
23
|
+
break;
|
|
24
|
+
}
|
|
25
|
+
return _context.abrupt("return", undefined);
|
|
26
|
+
case 2:
|
|
27
|
+
_context.prev = 2;
|
|
28
|
+
_context.t2 = JSON;
|
|
29
|
+
_context.next = 6;
|
|
30
|
+
return data.text();
|
|
31
|
+
case 6:
|
|
32
|
+
_context.t3 = _context.sent;
|
|
33
|
+
_context.t4 = _JSON$parse = _context.t2.parse.call(_context.t2, _context.t3);
|
|
34
|
+
_context.t1 = _context.t4 === null;
|
|
35
|
+
if (_context.t1) {
|
|
36
|
+
_context.next = 11;
|
|
37
|
+
break;
|
|
38
|
+
}
|
|
39
|
+
_context.t1 = _JSON$parse === void 0;
|
|
40
|
+
case 11:
|
|
41
|
+
_context.t0 = _context.t1;
|
|
42
|
+
if (_context.t0) {
|
|
43
|
+
_context.next = 14;
|
|
44
|
+
break;
|
|
45
|
+
}
|
|
46
|
+
_context.t0 = (_JSON$parse = _JSON$parse.error) === null || _JSON$parse === void 0;
|
|
47
|
+
case 14:
|
|
48
|
+
if (!_context.t0) {
|
|
49
|
+
_context.next = 18;
|
|
50
|
+
break;
|
|
51
|
+
}
|
|
52
|
+
_context.t5 = void 0;
|
|
53
|
+
_context.next = 19;
|
|
54
|
+
break;
|
|
55
|
+
case 18:
|
|
56
|
+
_context.t5 = _JSON$parse.message;
|
|
57
|
+
case 19:
|
|
58
|
+
return _context.abrupt("return", _context.t5);
|
|
59
|
+
case 22:
|
|
60
|
+
_context.prev = 22;
|
|
61
|
+
_context.t6 = _context["catch"](2);
|
|
62
|
+
return _context.abrupt("return", undefined);
|
|
63
|
+
case 25:
|
|
64
|
+
case "end":
|
|
65
|
+
return _context.stop();
|
|
66
|
+
}
|
|
67
|
+
}, _callee, null, [[2, 22]]);
|
|
68
|
+
}));
|
|
69
|
+
return function readBlobErrorMessage(_x) {
|
|
70
|
+
return _ref.apply(this, arguments);
|
|
71
|
+
};
|
|
72
|
+
}();
|
|
73
|
+
|
|
12
74
|
/**
|
|
13
75
|
* 默认的导出处理器
|
|
14
76
|
* @param exportApi 导出API函数
|
|
@@ -16,26 +78,28 @@ function _asyncToGenerator(fn) { return function () { var self = this, args = ar
|
|
|
16
78
|
* @param fileName 文件名
|
|
17
79
|
*/
|
|
18
80
|
var defaultHandleExport = exports.defaultHandleExport = /*#__PURE__*/function () {
|
|
19
|
-
var
|
|
20
|
-
var hide, response, url, link, _error$response, errorMessage;
|
|
21
|
-
return _regeneratorRuntime().wrap(function
|
|
22
|
-
while (1) switch (
|
|
81
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(exportApi, params, fileName) {
|
|
82
|
+
var hide, response, url, link, _error$response, _error$response2, errorMessage;
|
|
83
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
84
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
23
85
|
case 0:
|
|
24
86
|
hide = _antd.message.loading('正在导出,请稍后', 0);
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
return exportApi(params
|
|
87
|
+
_context2.prev = 1;
|
|
88
|
+
_context2.next = 4;
|
|
89
|
+
return exportApi(params, {
|
|
90
|
+
responseType: 'blob'
|
|
91
|
+
});
|
|
28
92
|
case 4:
|
|
29
|
-
response =
|
|
93
|
+
response = _context2.sent;
|
|
30
94
|
if (response instanceof Blob) {
|
|
31
|
-
|
|
95
|
+
_context2.next = 8;
|
|
32
96
|
break;
|
|
33
97
|
}
|
|
34
98
|
console.error('导出API返回的不是Blob对象:', response);
|
|
35
99
|
throw new Error('导出数据格式错误,请检查API配置');
|
|
36
100
|
case 8:
|
|
37
101
|
if (!(response.size === 0)) {
|
|
38
|
-
|
|
102
|
+
_context2.next = 10;
|
|
39
103
|
break;
|
|
40
104
|
}
|
|
41
105
|
throw new Error('导出的文件为空');
|
|
@@ -52,27 +116,51 @@ var defaultHandleExport = exports.defaultHandleExport = /*#__PURE__*/function ()
|
|
|
52
116
|
document.body.removeChild(link);
|
|
53
117
|
window.URL.revokeObjectURL(url);
|
|
54
118
|
_antd.message.success('导出成功');
|
|
55
|
-
|
|
119
|
+
_context2.next = 38;
|
|
56
120
|
break;
|
|
57
121
|
case 21:
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
console.error('导出失败:',
|
|
61
|
-
|
|
122
|
+
_context2.prev = 21;
|
|
123
|
+
_context2.t0 = _context2["catch"](1);
|
|
124
|
+
console.error('导出失败:', _context2.t0);
|
|
125
|
+
_context2.next = 26;
|
|
126
|
+
return readBlobErrorMessage((_error$response = _context2.t0.response) === null || _error$response === void 0 ? void 0 : _error$response.data);
|
|
127
|
+
case 26:
|
|
128
|
+
_context2.t3 = _context2.sent;
|
|
129
|
+
if (_context2.t3) {
|
|
130
|
+
_context2.next = 29;
|
|
131
|
+
break;
|
|
132
|
+
}
|
|
133
|
+
_context2.t3 = (_error$response2 = _context2.t0.response) === null || _error$response2 === void 0 || (_error$response2 = _error$response2.data) === null || _error$response2 === void 0 || (_error$response2 = _error$response2.error) === null || _error$response2 === void 0 ? void 0 : _error$response2.message;
|
|
134
|
+
case 29:
|
|
135
|
+
_context2.t2 = _context2.t3;
|
|
136
|
+
if (_context2.t2) {
|
|
137
|
+
_context2.next = 32;
|
|
138
|
+
break;
|
|
139
|
+
}
|
|
140
|
+
_context2.t2 = _context2.t0.message;
|
|
141
|
+
case 32:
|
|
142
|
+
_context2.t1 = _context2.t2;
|
|
143
|
+
if (_context2.t1) {
|
|
144
|
+
_context2.next = 35;
|
|
145
|
+
break;
|
|
146
|
+
}
|
|
147
|
+
_context2.t1 = '导出失败';
|
|
148
|
+
case 35:
|
|
149
|
+
errorMessage = _context2.t1;
|
|
62
150
|
_antd.message.error("\u5BFC\u51FA\u5931\u8D25\uFF1A".concat(errorMessage));
|
|
63
|
-
throw
|
|
64
|
-
case
|
|
65
|
-
|
|
151
|
+
throw _context2.t0;
|
|
152
|
+
case 38:
|
|
153
|
+
_context2.prev = 38;
|
|
66
154
|
hide();
|
|
67
|
-
return
|
|
68
|
-
case
|
|
155
|
+
return _context2.finish(38);
|
|
156
|
+
case 41:
|
|
69
157
|
case "end":
|
|
70
|
-
return
|
|
158
|
+
return _context2.stop();
|
|
71
159
|
}
|
|
72
|
-
},
|
|
160
|
+
}, _callee2, null, [[1, 21, 38, 41]]);
|
|
73
161
|
}));
|
|
74
|
-
return function defaultHandleExport(
|
|
75
|
-
return
|
|
162
|
+
return function defaultHandleExport(_x2, _x3, _x4) {
|
|
163
|
+
return _ref2.apply(this, arguments);
|
|
76
164
|
};
|
|
77
165
|
}();
|
|
78
166
|
|
|
@@ -83,14 +171,14 @@ var defaultHandleExport = exports.defaultHandleExport = /*#__PURE__*/function ()
|
|
|
83
171
|
* @param onSuccess 成功回调
|
|
84
172
|
*/
|
|
85
173
|
var defaultHandleDelete = exports.defaultHandleDelete = /*#__PURE__*/function () {
|
|
86
|
-
var
|
|
87
|
-
var hide, _error$
|
|
88
|
-
return _regeneratorRuntime().wrap(function
|
|
89
|
-
while (1) switch (
|
|
174
|
+
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(deleteApi, id, onSuccess) {
|
|
175
|
+
var hide, _error$response3, errorMessage;
|
|
176
|
+
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
177
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
90
178
|
case 0:
|
|
91
179
|
hide = _antd.message.loading('正在删除,请稍后', 0);
|
|
92
|
-
|
|
93
|
-
|
|
180
|
+
_context3.prev = 1;
|
|
181
|
+
_context3.next = 4;
|
|
94
182
|
return deleteApi({
|
|
95
183
|
id: id
|
|
96
184
|
});
|
|
@@ -99,27 +187,27 @@ var defaultHandleDelete = exports.defaultHandleDelete = /*#__PURE__*/function ()
|
|
|
99
187
|
if (onSuccess) {
|
|
100
188
|
onSuccess();
|
|
101
189
|
}
|
|
102
|
-
|
|
190
|
+
_context3.next = 14;
|
|
103
191
|
break;
|
|
104
192
|
case 8:
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
console.error('删除失败:',
|
|
108
|
-
errorMessage = ((_error$
|
|
193
|
+
_context3.prev = 8;
|
|
194
|
+
_context3.t0 = _context3["catch"](1);
|
|
195
|
+
console.error('删除失败:', _context3.t0);
|
|
196
|
+
errorMessage = ((_error$response3 = _context3.t0.response) === null || _error$response3 === void 0 || (_error$response3 = _error$response3.data) === null || _error$response3 === void 0 || (_error$response3 = _error$response3.error) === null || _error$response3 === void 0 ? void 0 : _error$response3.message) || _context3.t0.message || '删除失败';
|
|
109
197
|
_antd.message.error("\u5220\u9664\u5931\u8D25\uFF1A".concat(errorMessage));
|
|
110
|
-
throw
|
|
198
|
+
throw _context3.t0;
|
|
111
199
|
case 14:
|
|
112
|
-
|
|
200
|
+
_context3.prev = 14;
|
|
113
201
|
hide();
|
|
114
|
-
return
|
|
202
|
+
return _context3.finish(14);
|
|
115
203
|
case 17:
|
|
116
204
|
case "end":
|
|
117
|
-
return
|
|
205
|
+
return _context3.stop();
|
|
118
206
|
}
|
|
119
|
-
},
|
|
207
|
+
}, _callee3, null, [[1, 8, 14, 17]]);
|
|
120
208
|
}));
|
|
121
|
-
return function defaultHandleDelete(
|
|
122
|
-
return
|
|
209
|
+
return function defaultHandleDelete(_x5, _x6, _x7) {
|
|
210
|
+
return _ref3.apply(this, arguments);
|
|
123
211
|
};
|
|
124
212
|
}();
|
|
125
213
|
|
|
@@ -77,8 +77,8 @@ export interface ApiConfig<T = any> {
|
|
|
77
77
|
list: (params: ListParams) => Promise<PagedResult<T>>;
|
|
78
78
|
/** 删除API */
|
|
79
79
|
delete?: (params: DeleteParams) => Promise<void>;
|
|
80
|
-
/** 导出API */
|
|
81
|
-
export?: (params: ExportParams) => Promise<Blob>;
|
|
80
|
+
/** 导出API;第二参会传 `{ responseType: 'blob' }`,openapi 生成的函数直接透传给请求 */
|
|
81
|
+
export?: (params: ExportParams, options?: Record<string, any>) => Promise<Blob>;
|
|
82
82
|
/** 获取导入模板API */
|
|
83
83
|
getImportTemplate?: () => Promise<Blob>;
|
|
84
84
|
/** 导入API */
|
|
@@ -20,7 +20,7 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
|
|
|
20
20
|
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; }
|
|
21
21
|
import { ModuleRegistry } from 'ag-grid-community';
|
|
22
22
|
import { AgGridReact } from 'ag-grid-react';
|
|
23
|
-
import { Spin, Pagination, Card, Tag,
|
|
23
|
+
import { Spin, Pagination, Card, Tag, Popover, Badge, Button, theme } from 'antd';
|
|
24
24
|
import React, { useCallback, useEffect, useImperativeHandle, useMemo, useRef, useState } from 'react';
|
|
25
25
|
import { AllEnterpriseModule } from "ag-grid-enterprise";
|
|
26
26
|
|
|
@@ -36,7 +36,7 @@ import ToolBar from "./toolBar";
|
|
|
36
36
|
import SettingItem from "./settingItem";
|
|
37
37
|
import { RedoOutlined, FilterOutlined } from '@ant-design/icons';
|
|
38
38
|
import { convertFilterModel, dateTimeValueFormatter, dateValueFormatter, flatten, toTree } from "./utils";
|
|
39
|
-
import { mergeInferredColumnType, processEnumColumn } from "./utils/columnProcessors";
|
|
39
|
+
import { mergeInferredColumnType, processEllipsisColumn, processEnumColumn } from "./utils/columnProcessors";
|
|
40
40
|
import AdvancedQueryBuilder from "./queryForm/AdvancedQueryBuilder";
|
|
41
41
|
import { v4 as uuidv4 } from 'uuid';
|
|
42
42
|
import Setting from "./setting";
|
|
@@ -63,7 +63,6 @@ import { GridPlusError, ErrorType, ErrorSeverity } from "./errors";
|
|
|
63
63
|
import { logger } from "./utils/logger";
|
|
64
64
|
import { getEntityExtensionColumns } from "./utils/entityExtensionColumns";
|
|
65
65
|
import { message } from 'antd';
|
|
66
|
-
var Text = Typography.Text;
|
|
67
66
|
var getSort = function getSort(columnState) {
|
|
68
67
|
return columnState ? "".concat(columnState.colId, " ").concat(columnState.sort) : "";
|
|
69
68
|
};
|
|
@@ -470,21 +469,7 @@ function AgGridPlus(props) {
|
|
|
470
469
|
}
|
|
471
470
|
//@ts-ignore
|
|
472
471
|
if (col !== null && col !== void 0 && col.ellipsis) {
|
|
473
|
-
return
|
|
474
|
-
cellRenderer: function cellRenderer(_ref) {
|
|
475
|
-
var value = _ref.value;
|
|
476
|
-
return /*#__PURE__*/React.createElement(Text, {
|
|
477
|
-
ellipsis: {
|
|
478
|
-
tooltip: value
|
|
479
|
-
},
|
|
480
|
-
style: {
|
|
481
|
-
display: 'flex',
|
|
482
|
-
justifyContent: 'center',
|
|
483
|
-
alignItems: 'center'
|
|
484
|
-
}
|
|
485
|
-
}, value);
|
|
486
|
-
}
|
|
487
|
-
});
|
|
472
|
+
return processEllipsisColumn(mergeInferredColumnType(col, dataType));
|
|
488
473
|
}
|
|
489
474
|
if (col.cellRenderer) {
|
|
490
475
|
return _objectSpread(_objectSpread({}, mergeInferredColumnType(col, dataType)), {}, {
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
import React, { useCallback } from 'react';
|
|
8
|
-
import { Button, Popconfirm, Space, Tooltip } from 'antd';
|
|
8
|
+
import { Button, Popconfirm, Space, Tooltip, theme } from 'antd';
|
|
9
9
|
import { DeleteOutlined, HolderOutlined } from '@ant-design/icons';
|
|
10
10
|
import { FormGrid, FormItem, FormLayout, Input, Select, NumberPicker, Switch } from '@formily/antd-v5';
|
|
11
11
|
import { createSchemaField } from '@formily/react';
|
|
@@ -29,12 +29,14 @@ var SchemaField = createSchemaField({
|
|
|
29
29
|
* 自定义排序抓手
|
|
30
30
|
*/
|
|
31
31
|
var CustomSortHandle = function CustomSortHandle() {
|
|
32
|
+
var _theme$useToken = theme.useToken(),
|
|
33
|
+
token = _theme$useToken.token; // 颜色取主题 token,跟随亮/暗主题 @author nokecy
|
|
32
34
|
return /*#__PURE__*/React.createElement(Tooltip, {
|
|
33
35
|
title: "\u62D6\u52A8\u6392\u5E8F\uFF08\u4EC5\u652F\u6301\u540C\u7EA7\uFF09"
|
|
34
36
|
}, /*#__PURE__*/React.createElement(HolderOutlined, {
|
|
35
37
|
style: {
|
|
36
38
|
fontSize: 16,
|
|
37
|
-
color:
|
|
39
|
+
color: token.colorTextTertiary,
|
|
38
40
|
cursor: 'move'
|
|
39
41
|
}
|
|
40
42
|
}));
|
|
@@ -20,7 +20,7 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
20
20
|
*/
|
|
21
21
|
|
|
22
22
|
import React, { useCallback, useMemo, useState, useRef, useEffect } from 'react';
|
|
23
|
-
import { Button, Select, Switch, Space, Popconfirm, message, Tag } from 'antd';
|
|
23
|
+
import { Button, Select, Switch, Space, Popconfirm, message, Tag, theme } from 'antd';
|
|
24
24
|
import { DeleteOutlined, FolderOutlined, FolderAddOutlined, FileOutlined } from '@ant-design/icons';
|
|
25
25
|
import { AgGridReact } from 'ag-grid-react';
|
|
26
26
|
import { generateId, normalizeCellAlign } from "./columnGroupUtils";
|
|
@@ -239,6 +239,8 @@ var ColumnConfigTable = function ColumnConfigTable(_ref2) {
|
|
|
239
239
|
_ref2$scrollY = _ref2.scrollY,
|
|
240
240
|
scrollY = _ref2$scrollY === void 0 ? 480 : _ref2$scrollY;
|
|
241
241
|
var gridTheme = useAgGridTheme();
|
|
242
|
+
var _theme$useToken = theme.useToken(),
|
|
243
|
+
token = _theme$useToken.token; // 颜色取主题 token,跟随亮/暗主题 @author nokecy
|
|
242
244
|
var _useState = useState(items),
|
|
243
245
|
_useState2 = _slicedToArray(_useState, 2),
|
|
244
246
|
localItems = _useState2[0],
|
|
@@ -681,16 +683,18 @@ var ColumnConfigTable = function ColumnConfigTable(_ref2) {
|
|
|
681
683
|
return localItems.filter(isNodeVisible);
|
|
682
684
|
}, [localItems, expandedKeys, simple]);
|
|
683
685
|
|
|
684
|
-
//
|
|
686
|
+
// 添加拖拽样式:选择器限定在本表容器(.qc-column-config-table)内,免得弹窗打开期间染到背后列表的行;
|
|
687
|
+
// 拖拽幽灵挂在 body 上,只能全局。颜色取主题 token。@author nokecy
|
|
685
688
|
useEffect(function () {
|
|
686
689
|
var style = document.createElement('style');
|
|
687
|
-
style.textContent = "\n /* \u62D6\u62FD\u884C\u6837\u5F0F */\n .ag-row-dragging {\n opacity: 0.5;\n transition: opacity 0.2s ease;\n }\n\n /* \u62D6\u62FD\u5E7D\u7075\u6837\u5F0F */\n .ag-dnd-ghost {\n background:
|
|
690
|
+
style.textContent = "\n /* \u62D6\u62FD\u884C\u6837\u5F0F */\n .qc-column-config-table .ag-row-dragging {\n opacity: 0.5;\n transition: opacity 0.2s ease;\n }\n\n /* \u62D6\u62FD\u5E7D\u7075\u6837\u5F0F */\n .ag-dnd-ghost {\n background: ".concat(token.colorBgElevated, " !important;\n color: ").concat(token.colorText, " !important;\n border: 2px dashed ").concat(token.colorPrimary, " !important;\n border-radius: 4px !important;\n padding: 8px !important;\n box-shadow: ").concat(token.boxShadowSecondary, " !important;\n opacity: 0.9 !important;\n font-size: 14px !important;\n }\n\n /* \u53EF\u653E\u7F6E\u76EE\u6807\u9AD8\u4EAE */\n .qc-column-config-table .ag-row-hover.ag-row {\n background-color: ").concat(token.controlItemBgHover, " !important;\n transition: background-color 0.2s ease;\n }\n\n /* \u5206\u7EC4\u884C\u7279\u6B8A\u9AD8\u4EAE */\n .qc-column-config-table .ag-row-hover.ag-row[row-id*=\"group\"] {\n background-color: ").concat(token.controlItemBgActive, " !important;\n border: 2px solid ").concat(token.colorPrimary, ";\n transition: all 0.2s ease;\n }\n\n /* \u884C\u52A8\u753B */\n .qc-column-config-table .ag-row {\n transition: transform 0.3s ease, opacity 0.3s ease;\n }\n\n /* \u62D6\u62FD\u624B\u67C4\u6837\u5F0F */\n .qc-column-config-table .ag-row .ag-cell[col-id=\"type\"] {\n cursor: grab !important;\n }\n\n .qc-column-config-table .ag-row-dragging .ag-cell[col-id=\"type\"] {\n cursor: grabbing !important;\n }\n ");
|
|
688
691
|
document.head.appendChild(style);
|
|
689
692
|
return function () {
|
|
690
693
|
document.head.removeChild(style);
|
|
691
694
|
};
|
|
692
|
-
}, []);
|
|
695
|
+
}, [token]);
|
|
693
696
|
return /*#__PURE__*/React.createElement("div", {
|
|
697
|
+
className: "qc-column-config-table",
|
|
694
698
|
style: {
|
|
695
699
|
width: '100%'
|
|
696
700
|
}
|
|
@@ -15,7 +15,7 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
17
|
import React, { useState, useCallback, useMemo } from 'react';
|
|
18
|
-
import { Input, Typography, Button, Tooltip } from 'antd';
|
|
18
|
+
import { Input, Typography, Button, Tooltip, theme } from 'antd';
|
|
19
19
|
import { UndoOutlined, InfoCircleOutlined, HolderOutlined } from '@ant-design/icons';
|
|
20
20
|
var Text = Typography.Text;
|
|
21
21
|
/**
|
|
@@ -27,6 +27,9 @@ export var ColumnNameCellRenderer = function ColumnNameCellRenderer(props) {
|
|
|
27
27
|
expandedKeys = props.expandedKeys,
|
|
28
28
|
onToggleExpand = props.onToggleExpand,
|
|
29
29
|
allItems = props.allItems;
|
|
30
|
+
var _theme$useToken = theme.useToken(),
|
|
31
|
+
token = _theme$useToken.token; // 颜色取主题 token,跟随亮/暗主题 @author nokecy
|
|
32
|
+
|
|
30
33
|
var _useState = useState(false),
|
|
31
34
|
_useState2 = _slicedToArray(_useState, 2),
|
|
32
35
|
isEditing = _useState2[0],
|
|
@@ -111,7 +114,7 @@ export var ColumnNameCellRenderer = function ColumnNameCellRenderer(props) {
|
|
|
111
114
|
width: 16,
|
|
112
115
|
display: 'inline-block',
|
|
113
116
|
fontSize: '12px',
|
|
114
|
-
color:
|
|
117
|
+
color: token.colorTextSecondary
|
|
115
118
|
}
|
|
116
119
|
}, isExpanded ? '▼' : '▶') : /*#__PURE__*/React.createElement("span", {
|
|
117
120
|
style: {
|
|
@@ -120,7 +123,7 @@ export var ColumnNameCellRenderer = function ColumnNameCellRenderer(props) {
|
|
|
120
123
|
}
|
|
121
124
|
}), /*#__PURE__*/React.createElement(HolderOutlined, {
|
|
122
125
|
style: {
|
|
123
|
-
color:
|
|
126
|
+
color: token.colorTextTertiary,
|
|
124
127
|
cursor: 'grab',
|
|
125
128
|
fontSize: '14px'
|
|
126
129
|
}
|
|
@@ -143,7 +146,7 @@ export var ColumnNameCellRenderer = function ColumnNameCellRenderer(props) {
|
|
|
143
146
|
type: "secondary",
|
|
144
147
|
style: {
|
|
145
148
|
fontSize: '11px',
|
|
146
|
-
color:
|
|
149
|
+
color: token.colorTextTertiary,
|
|
147
150
|
lineHeight: '16px'
|
|
148
151
|
}
|
|
149
152
|
}, "\u539F\u59CB: ", item.originalHeaderName), /*#__PURE__*/React.createElement(Tooltip, {
|
|
@@ -151,7 +154,7 @@ export var ColumnNameCellRenderer = function ColumnNameCellRenderer(props) {
|
|
|
151
154
|
}, /*#__PURE__*/React.createElement(InfoCircleOutlined, {
|
|
152
155
|
style: {
|
|
153
156
|
fontSize: '11px',
|
|
154
|
-
color:
|
|
157
|
+
color: token.colorPrimary,
|
|
155
158
|
cursor: 'help'
|
|
156
159
|
}
|
|
157
160
|
}))), /*#__PURE__*/React.createElement("div", {
|
|
@@ -173,10 +176,10 @@ export var ColumnNameCellRenderer = function ColumnNameCellRenderer(props) {
|
|
|
173
176
|
flex: 1,
|
|
174
177
|
fontSize: '14px',
|
|
175
178
|
fontWeight: item.type === 'group' ? 600 : 400,
|
|
176
|
-
borderBottom: isEditing ?
|
|
179
|
+
borderBottom: isEditing ? "1px solid ".concat(token.colorPrimary) : '1px solid transparent',
|
|
177
180
|
transition: 'border-color 0.2s',
|
|
178
181
|
padding: '0 4px',
|
|
179
|
-
color: isModified ?
|
|
182
|
+
color: isModified ? token.colorPrimary : token.colorText
|
|
180
183
|
}
|
|
181
184
|
}), isModified && /*#__PURE__*/React.createElement(Tooltip, {
|
|
182
185
|
title: "\u91CD\u7F6E\u4E3A\u539F\u59CB\u540D\u79F0"
|
|
@@ -25,7 +25,7 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
|
|
|
25
25
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
26
26
|
import React, { useState, useCallback, useMemo, useEffect } from 'react';
|
|
27
27
|
import { logger } from "../utils/logger";
|
|
28
|
-
import { Modal, Tabs, Space, Button, Input, message, Popconfirm, Tag, Tooltip, Empty } from 'antd';
|
|
28
|
+
import { Modal, Tabs, Space, Button, Input, message, Popconfirm, Tag, Tooltip, Empty, theme } from 'antd';
|
|
29
29
|
import { SaveOutlined, ReloadOutlined, EditOutlined, DeleteOutlined, StarOutlined, StarFilled, SearchOutlined,
|
|
30
30
|
// 全局配置相关图标
|
|
31
31
|
GlobalOutlined, RollbackOutlined, ClearOutlined, ExclamationCircleOutlined } from '@ant-design/icons';
|
|
@@ -52,6 +52,8 @@ var ColumnSetting = function ColumnSetting(_ref) {
|
|
|
52
52
|
onSaveColumnState = _ref.onSaveColumnState,
|
|
53
53
|
allColDefsProp = _ref.allColDefs;
|
|
54
54
|
var gridTheme = useAgGridTheme();
|
|
55
|
+
var _theme$useToken = theme.useToken(),
|
|
56
|
+
token = _theme$useToken.token; // 颜色取主题 token,跟随亮/暗主题 @author nokecy
|
|
55
57
|
// 使用新的集中式方案管理 API(包含状态数据和操作方法)
|
|
56
58
|
var _useGridSchemes = useGridSchemes(),
|
|
57
59
|
columnSchemes = _useGridSchemes.columnSchemes,
|
|
@@ -946,7 +948,7 @@ var ColumnSetting = function ColumnSetting(_ref) {
|
|
|
946
948
|
title: '重置所有用户配置',
|
|
947
949
|
content: /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("p", {
|
|
948
950
|
style: {
|
|
949
|
-
color:
|
|
951
|
+
color: token.colorError,
|
|
950
952
|
fontWeight: 'bold'
|
|
951
953
|
}
|
|
952
954
|
}, "\u6B64\u64CD\u4F5C\u4E0D\u53EF\u6062\u590D\uFF01"), /*#__PURE__*/React.createElement("p", null, "\u786E\u5B9A\u8981\u5220\u9664\u6240\u6709\u7528\u6237\u7684\u4E2A\u4EBA\u5217\u914D\u7F6E\u5417\uFF1F"), /*#__PURE__*/React.createElement("p", null, "\u6267\u884C\u540E\uFF0C\u6240\u6709\u7528\u6237\u5C06\u4F7F\u7528\u5168\u5C40\u9ED8\u8BA4\u914D\u7F6E\u3002")),
|
|
@@ -1177,7 +1179,7 @@ var ColumnSetting = function ColumnSetting(_ref) {
|
|
|
1177
1179
|
marginLeft: 16,
|
|
1178
1180
|
fontSize: 14,
|
|
1179
1181
|
fontWeight: 'normal',
|
|
1180
|
-
color:
|
|
1182
|
+
color: token.colorPrimary
|
|
1181
1183
|
}
|
|
1182
1184
|
}, "- \u5F53\u524D\u65B9\u6848: ", currentScheme.name, isUsingGlobalFallback && currentScheme.isGlobal && /*#__PURE__*/React.createElement(Tag, {
|
|
1183
1185
|
color: "orange",
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import React, { useMemo } from 'react';
|
|
7
|
-
import { Modal, Tree, message } from 'antd';
|
|
7
|
+
import { Modal, Tree, message, theme } from 'antd';
|
|
8
8
|
import { FolderOutlined, FileOutlined } from '@ant-design/icons';
|
|
9
9
|
import DraggableModal from "../../draggableModal";
|
|
10
10
|
var MoveNodeModal = function MoveNodeModal(_ref) {
|
|
@@ -13,6 +13,8 @@ var MoveNodeModal = function MoveNodeModal(_ref) {
|
|
|
13
13
|
allItems = _ref.allItems,
|
|
14
14
|
onCancel = _ref.onCancel,
|
|
15
15
|
onConfirm = _ref.onConfirm;
|
|
16
|
+
var _theme$useToken = theme.useToken(),
|
|
17
|
+
token = _theme$useToken.token; // 颜色取主题 token,跟随亮/暗主题 @author nokecy
|
|
16
18
|
/**
|
|
17
19
|
* 将扁平数据转换为 Tree 结构
|
|
18
20
|
*/
|
|
@@ -133,7 +135,7 @@ var MoveNodeModal = function MoveNodeModal(_ref) {
|
|
|
133
135
|
}, /*#__PURE__*/React.createElement("div", {
|
|
134
136
|
style: {
|
|
135
137
|
marginBottom: 16,
|
|
136
|
-
color:
|
|
138
|
+
color: token.colorTextSecondary
|
|
137
139
|
}
|
|
138
140
|
}, "\u8BF7\u9009\u62E9\u76EE\u6807\u7236\u8282\u70B9(\u53EA\u80FD\u9009\u62E9\u5206\u7EC4\u8282\u70B9):"), /*#__PURE__*/React.createElement(Tree, {
|
|
139
141
|
showIcon: true,
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import React from 'react';
|
|
7
|
-
import { Input, Tag } from 'antd';
|
|
7
|
+
import { Input, Tag, theme } from 'antd';
|
|
8
8
|
import { FolderOutlined, FileOutlined } from '@ant-design/icons';
|
|
9
9
|
/**
|
|
10
10
|
* 名称列渲染组件
|
|
@@ -18,6 +18,8 @@ var NameColumnRenderer = function NameColumnRenderer(_ref) {
|
|
|
18
18
|
var type = record.type,
|
|
19
19
|
level = record.level,
|
|
20
20
|
_isNew = record._isNew;
|
|
21
|
+
var _theme$useToken = theme.useToken(),
|
|
22
|
+
token = _theme$useToken.token; // 颜色取主题 token,跟随亮/暗主题 @author nokecy
|
|
21
23
|
|
|
22
24
|
// 计算缩进(每层 20px)
|
|
23
25
|
var indent = level * 20;
|
|
@@ -38,12 +40,12 @@ var NameColumnRenderer = function NameColumnRenderer(_ref) {
|
|
|
38
40
|
// 节点类型图标
|
|
39
41
|
var NodeIcon = type === 'group' ? /*#__PURE__*/React.createElement(FolderOutlined, {
|
|
40
42
|
style: {
|
|
41
|
-
color:
|
|
43
|
+
color: token.colorPrimary,
|
|
42
44
|
fontSize: 14
|
|
43
45
|
}
|
|
44
46
|
}) : /*#__PURE__*/React.createElement(FileOutlined, {
|
|
45
47
|
style: {
|
|
46
|
-
color:
|
|
48
|
+
color: token.colorSuccess,
|
|
47
49
|
fontSize: 14
|
|
48
50
|
}
|
|
49
51
|
});
|
|
@@ -56,7 +58,7 @@ var NameColumnRenderer = function NameColumnRenderer(_ref) {
|
|
|
56
58
|
}
|
|
57
59
|
}, level > 0 && /*#__PURE__*/React.createElement("span", {
|
|
58
60
|
style: {
|
|
59
|
-
color:
|
|
61
|
+
color: token.colorTextTertiary,
|
|
60
62
|
fontFamily: 'monospace',
|
|
61
63
|
fontSize: 12,
|
|
62
64
|
flexShrink: 0
|
|
@@ -80,7 +82,7 @@ var NameColumnRenderer = function NameColumnRenderer(_ref) {
|
|
|
80
82
|
placeholder: type === 'group' ? '请输入分组名称' : '请输入列名称',
|
|
81
83
|
style: {
|
|
82
84
|
flex: 1,
|
|
83
|
-
background: _isNew ?
|
|
85
|
+
background: _isNew ? token.colorWarningBg : 'transparent' // 新添加的节点高亮
|
|
84
86
|
}
|
|
85
87
|
}));
|
|
86
88
|
};
|
|
@@ -25,7 +25,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
25
25
|
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; } }
|
|
26
26
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
27
27
|
import React, { useState, useCallback, useMemo, useRef } from 'react';
|
|
28
|
-
import { Tabs, Button, Input, Space, message, Popconfirm, Tag, Tooltip, Switch } from 'antd';
|
|
28
|
+
import { Tabs, Button, Input, Space, message, Popconfirm, Tag, Tooltip, Switch, theme } from 'antd';
|
|
29
29
|
import DraggableModal from "../../draggableModal";
|
|
30
30
|
import { EditOutlined, DeleteOutlined, StarOutlined, StarFilled } from '@ant-design/icons';
|
|
31
31
|
import { AgGridReact } from 'ag-grid-react';
|
|
@@ -51,6 +51,8 @@ var QuerySchemeManager = function QuerySchemeManager(_ref) {
|
|
|
51
51
|
visible = _ref.visible,
|
|
52
52
|
onClose = _ref.onClose;
|
|
53
53
|
var gridTheme = useAgGridTheme();
|
|
54
|
+
var _theme$useToken = theme.useToken(),
|
|
55
|
+
token = _theme$useToken.token; // 颜色取主题 token,跟随亮/暗主题 @author nokecy
|
|
54
56
|
// 获取方案管理 API
|
|
55
57
|
var _useGridSchemes = useGridSchemes(),
|
|
56
58
|
querySchemes = _useGridSchemes.querySchemes,
|
|
@@ -599,7 +601,7 @@ var QuerySchemeManager = function QuerySchemeManager(_ref) {
|
|
|
599
601
|
}
|
|
600
602
|
return /*#__PURE__*/React.createElement(Space, null, scheme.isDefault && /*#__PURE__*/React.createElement(StarFilled, {
|
|
601
603
|
style: {
|
|
602
|
-
color:
|
|
604
|
+
color: token.colorWarning
|
|
603
605
|
}
|
|
604
606
|
}), /*#__PURE__*/React.createElement("span", null, scheme.name), isCurrent && /*#__PURE__*/React.createElement(Tag, {
|
|
605
607
|
color: "blue"
|
|
@@ -701,7 +703,7 @@ var QuerySchemeManager = function QuerySchemeManager(_ref) {
|
|
|
701
703
|
marginLeft: 16,
|
|
702
704
|
fontSize: 14,
|
|
703
705
|
fontWeight: 'normal',
|
|
704
|
-
color:
|
|
706
|
+
color: token.colorPrimary
|
|
705
707
|
}
|
|
706
708
|
}, "- \u5F53\u524D\u65B9\u6848: ", currentScheme.name)),
|
|
707
709
|
open: visible,
|
|
@@ -722,30 +724,30 @@ var QuerySchemeManager = function QuerySchemeManager(_ref) {
|
|
|
722
724
|
style: {
|
|
723
725
|
marginBottom: 16,
|
|
724
726
|
padding: '12px 16px',
|
|
725
|
-
background: currentScheme ?
|
|
727
|
+
background: currentScheme ? token.colorPrimaryBg : token.colorFillTertiary,
|
|
726
728
|
borderRadius: 4,
|
|
727
729
|
border: '1px solid',
|
|
728
|
-
borderColor: currentScheme ?
|
|
730
|
+
borderColor: currentScheme ? token.colorPrimaryBorder : token.colorBorder
|
|
729
731
|
}
|
|
730
732
|
}, currentScheme ? /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
|
|
731
733
|
style: {
|
|
732
734
|
fontWeight: 600,
|
|
733
735
|
marginBottom: 4,
|
|
734
|
-
color:
|
|
736
|
+
color: token.colorPrimary
|
|
735
737
|
}
|
|
736
738
|
}, "\u5F53\u524D\u65B9\u6848: ", currentScheme.name), currentScheme.description && /*#__PURE__*/React.createElement("div", {
|
|
737
739
|
style: {
|
|
738
740
|
fontSize: 12,
|
|
739
|
-
color:
|
|
741
|
+
color: token.colorTextSecondary
|
|
740
742
|
}
|
|
741
743
|
}, currentScheme.description)) : /*#__PURE__*/React.createElement("div", {
|
|
742
744
|
style: {
|
|
743
|
-
color:
|
|
745
|
+
color: token.colorTextSecondary
|
|
744
746
|
}
|
|
745
747
|
}, "\u672A\u9009\u62E9\u65B9\u6848 - \u4F7F\u7528\u4E34\u65F6\u914D\u7F6E")), /*#__PURE__*/React.createElement("div", {
|
|
746
748
|
style: {
|
|
747
749
|
marginBottom: 16,
|
|
748
|
-
color:
|
|
750
|
+
color: token.colorTextSecondary
|
|
749
751
|
}
|
|
750
752
|
}, "\u62D6\u62FD\u4E0B\u65B9\u67E5\u8BE2\u9879\u8C03\u6574\u987A\u5E8F\uFF0C\u4F7F\u7528\u5F00\u5173\u63A7\u5236\u663E\u793A/\u9690\u85CF\uFF0C\u5B8C\u6210\u540E\u53EF\u5E94\u7528\u6216\u4FDD\u5B58\u4E3A\u65B9\u6848"), /*#__PURE__*/React.createElement("div", {
|
|
751
753
|
style: {
|