@nokecy/qc-ui 1.1.39 → 1.1.40
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/adapters/abpPagedApiAdapter.d.ts +8 -0
- package/dist/cjs/adapters/abpPagedApiAdapter.js +35 -0
- package/dist/cjs/adapters/index.d.ts +6 -0
- package/dist/cjs/adapters/index.js +12 -0
- package/dist/cjs/adapters/pagedApiAdapter.d.ts +25 -0
- package/dist/cjs/adapters/pagedApiAdapter.js +5 -0
- package/dist/cjs/ag-grid-plus/ag-gridPlus.js +51 -205
- package/dist/cjs/ag-grid-plus/context/gridContext.d.ts +3 -0
- package/dist/cjs/ag-grid-plus/context/queryFormContext.d.ts +20 -0
- package/dist/cjs/ag-grid-plus/context/queryFormContext.js +25 -0
- package/dist/cjs/ag-grid-plus/errors/ErrorBoundary.d.ts +1 -1
- package/dist/cjs/ag-grid-plus/hooks/index.d.ts +1 -3
- package/dist/cjs/ag-grid-plus/hooks/index.js +7 -39
- package/dist/cjs/ag-grid-plus/hooks/useRowId.d.ts +13 -0
- package/dist/cjs/ag-grid-plus/hooks/useRowId.js +57 -0
- package/dist/cjs/ag-grid-plus/interface.d.ts +9 -0
- package/dist/cjs/ag-grid-plus/setting/QuerySchemeManager.js +6 -6
- package/dist/cjs/ag-grid-plus/setting/columnGroupUtils.js +2 -3
- package/dist/cjs/ag-grid-plus/types.d.ts +9 -0
- package/dist/cjs/ag-grid-plus/utils/aggregation.d.ts +17 -0
- package/dist/cjs/ag-grid-plus/utils/aggregation.js +101 -0
- package/dist/cjs/ag-grid-plus/utils/columnProcessors.js +2 -2
- package/dist/cjs/ag-grid-plus/utils/entityExtensionColumns.d.ts +12 -3
- package/dist/cjs/ag-grid-plus/utils/entityExtensionColumns.js +20 -5
- package/dist/cjs/ag-grid-plus/utils/queryFormDerivation.d.ts +19 -0
- package/dist/cjs/ag-grid-plus/utils/queryFormDerivation.js +49 -0
- package/dist/cjs/ag-grid-plus/utils/requestParams.d.ts +15 -0
- package/dist/cjs/ag-grid-plus/utils/requestParams.js +31 -0
- package/dist/cjs/ag-grid-plus/utils/rowSelection.d.ts +9 -0
- package/dist/cjs/ag-grid-plus/utils/rowSelection.js +24 -0
- package/dist/cjs/ag-grid-plus/utils.js +2 -2
- package/dist/cjs/array-table/arrayBase.js +2 -0
- package/dist/cjs/array-table/utils.js +22 -4
- package/dist/cjs/components/RegexEditor/hooks/useRegexValidation.js +2 -3
- package/dist/cjs/components/RegexEditor/hooks/useTemplateManager.js +1 -0
- package/dist/cjs/components/RegexEditor/validation/types.d.ts +1 -3
- package/dist/cjs/components/RegexEditor/visualizer/astToRailroad.d.ts +0 -2
- package/dist/cjs/dashboard/dashboard/index.js +8 -11
- package/dist/cjs/dashboard/dashboard/utils.js +3 -6
- package/dist/cjs/dashboard/widget/index.js +3 -3
- package/dist/cjs/dashboard/widget/selector/index.js +5 -7
- package/dist/cjs/dashboard/widget/utils.js +3 -4
- package/dist/cjs/dialogSelect/index.d.ts +3 -0
- package/dist/cjs/dialogSelect/index.js +16 -13
- package/dist/cjs/generatedListPage/GeneratedListPage.js +20 -19
- package/dist/cjs/generatedListPage/_utils/toAbpPagedRequest.d.ts +15 -0
- package/dist/cjs/generatedListPage/_utils/toAbpPagedRequest.js +26 -0
- package/dist/cjs/generatedListPage/types.d.ts +3 -0
- package/dist/cjs/index.d.ts +1 -0
- package/dist/cjs/index.js +57 -0
- package/dist/cjs/standardFormDialog/types.d.ts +7 -0
- package/dist/cjs/standardFormDialog/useStandardFormSchema.d.ts +1 -1
- package/dist/cjs/standardFormDialog/withStandardForm.js +5 -4
- package/dist/esm/adapters/abpPagedApiAdapter.d.ts +8 -0
- package/dist/esm/adapters/abpPagedApiAdapter.js +29 -0
- package/dist/esm/adapters/index.d.ts +6 -0
- package/dist/esm/adapters/index.js +6 -0
- package/dist/esm/adapters/pagedApiAdapter.d.ts +25 -0
- package/dist/esm/adapters/pagedApiAdapter.js +1 -0
- package/dist/esm/ag-grid-plus/ag-gridPlus.js +49 -203
- package/dist/esm/ag-grid-plus/context/gridContext.d.ts +3 -0
- package/dist/esm/ag-grid-plus/context/queryFormContext.d.ts +20 -0
- package/dist/esm/ag-grid-plus/context/queryFormContext.js +19 -0
- package/dist/esm/ag-grid-plus/hooks/index.d.ts +1 -3
- package/dist/esm/ag-grid-plus/hooks/index.js +2 -6
- package/dist/esm/ag-grid-plus/hooks/useRowId.d.ts +13 -0
- package/dist/esm/ag-grid-plus/hooks/useRowId.js +52 -0
- package/dist/esm/ag-grid-plus/interface.d.ts +9 -0
- package/dist/esm/ag-grid-plus/setting/QuerySchemeManager.js +6 -6
- package/dist/esm/ag-grid-plus/setting/columnGroupUtils.js +7 -6
- package/dist/esm/ag-grid-plus/types.d.ts +9 -0
- package/dist/esm/ag-grid-plus/utils/aggregation.d.ts +17 -0
- package/dist/esm/ag-grid-plus/utils/aggregation.js +93 -0
- package/dist/esm/ag-grid-plus/utils/columnProcessors.js +2 -2
- package/dist/esm/ag-grid-plus/utils/entityExtensionColumns.d.ts +12 -3
- package/dist/esm/ag-grid-plus/utils/entityExtensionColumns.js +20 -5
- package/dist/esm/ag-grid-plus/utils/queryFormDerivation.d.ts +19 -0
- package/dist/esm/ag-grid-plus/utils/queryFormDerivation.js +42 -0
- package/dist/esm/ag-grid-plus/utils/requestParams.d.ts +15 -0
- package/dist/esm/ag-grid-plus/utils/requestParams.js +24 -0
- package/dist/esm/ag-grid-plus/utils/rowSelection.d.ts +9 -0
- package/dist/esm/ag-grid-plus/utils/rowSelection.js +18 -0
- package/dist/esm/ag-grid-plus/utils.js +2 -2
- package/dist/esm/array-table/arrayBase.js +2 -0
- package/dist/esm/array-table/utils.js +22 -4
- package/dist/esm/components/RegexEditor/hooks/useRegexValidation.js +2 -2
- package/dist/esm/components/RegexEditor/hooks/useTemplateManager.js +1 -0
- package/dist/esm/components/RegexEditor/validation/types.d.ts +0 -1
- package/dist/esm/components/RegexEditor/visualizer/astToRailroad.d.ts +0 -1
- package/dist/esm/dashboard/dashboard/index.js +8 -11
- package/dist/esm/dashboard/dashboard/utils.js +3 -2
- package/dist/esm/dashboard/widget/index.js +3 -3
- package/dist/esm/dashboard/widget/selector/index.js +5 -7
- package/dist/esm/dashboard/widget/utils.js +3 -3
- package/dist/esm/dialogSelect/index.d.ts +3 -0
- package/dist/esm/dialogSelect/index.js +16 -13
- package/dist/esm/generatedListPage/GeneratedListPage.js +20 -19
- package/dist/esm/generatedListPage/_utils/toAbpPagedRequest.d.ts +15 -0
- package/dist/esm/generatedListPage/_utils/toAbpPagedRequest.js +20 -0
- package/dist/esm/generatedListPage/types.d.ts +3 -0
- package/dist/esm/index.d.ts +1 -0
- package/dist/esm/index.js +3 -0
- package/dist/esm/standardFormDialog/types.d.ts +7 -0
- package/dist/esm/standardFormDialog/withStandardForm.js +5 -4
- package/dist/umd/qc-ui.min.css +1 -1
- package/dist/umd/qc-ui.min.js +1 -1
- package/package.json +52 -13
- package/dist/cjs/ag-grid-plus/hooks/useAgGridCalculation.d.ts +0 -88
- package/dist/cjs/ag-grid-plus/hooks/useAgGridCalculation.js +0 -224
- package/dist/cjs/ag-grid-plus/hooks/useAgGridData.d.ts +0 -91
- package/dist/cjs/ag-grid-plus/hooks/useAgGridData.js +0 -230
- package/dist/cjs/ag-grid-plus/hooks/useGridState.d.ts +0 -153
- package/dist/cjs/ag-grid-plus/hooks/useGridState.js +0 -258
- package/dist/esm/ag-grid-plus/hooks/useAgGridCalculation.d.ts +0 -88
- package/dist/esm/ag-grid-plus/hooks/useAgGridCalculation.js +0 -217
- package/dist/esm/ag-grid-plus/hooks/useAgGridData.d.ts +0 -91
- package/dist/esm/ag-grid-plus/hooks/useAgGridData.js +0 -225
- package/dist/esm/ag-grid-plus/hooks/useGridState.d.ts +0 -153
- package/dist/esm/ag-grid-plus/hooks/useGridState.js +0 -258
|
@@ -1,8 +1,4 @@
|
|
|
1
1
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
-
import _debounce from "lodash/debounce";
|
|
3
|
-
import _isArray from "lodash/isArray";
|
|
4
|
-
import _isEmpty from "lodash/isEmpty";
|
|
5
|
-
import _cloneDeep from "lodash/cloneDeep";
|
|
6
2
|
var _excluded = ["storageKey", "editMode", "widgets", "defaultLayout", "widgetWrapClassName", "widgetWrapStyle", "layout", "minHeight", "maxWidgetLength", "toolbar", "onLayoutChange", "onReset", "onReload", "onRemoveWidget", "onAddWidget", "onCancelEdit", "onEdit", "onRevert", "onSave"];
|
|
7
3
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
8
4
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
@@ -23,6 +19,7 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
|
23
19
|
import { CheckOutlined, CloseOutlined, DashboardOutlined, DeleteOutlined, PlusOutlined, ReloadOutlined, RetweetOutlined } from '@ant-design/icons';
|
|
24
20
|
import { Button, Empty, message, Spin, Tooltip } from 'antd';
|
|
25
21
|
import classnames from 'classnames';
|
|
22
|
+
import { cloneDeep, isEmpty, isArray, debounce } from 'lodash';
|
|
26
23
|
import React, { forwardRef, useCallback, useEffect, useImperativeHandle, useMemo, useReducer, useRef, useState } from 'react';
|
|
27
24
|
import { Responsive, WidthProvider } from 'react-grid-layout';
|
|
28
25
|
import KeyEvent from 'react-keyevent';
|
|
@@ -85,7 +82,7 @@ var Dashboard = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
85
82
|
var dom = useRef(null);
|
|
86
83
|
|
|
87
84
|
//获取操作
|
|
88
|
-
var fetch = useCallback(
|
|
85
|
+
var fetch = useCallback(debounce( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
89
86
|
var response, _layout, resArr, data;
|
|
90
87
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
91
88
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -97,10 +94,10 @@ var Dashboard = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
97
94
|
});
|
|
98
95
|
case 3:
|
|
99
96
|
response = _context.sent;
|
|
100
|
-
_layout =
|
|
97
|
+
_layout = isArray(defaultLayout) ? defaultLayout : [];
|
|
101
98
|
if (response) {
|
|
102
99
|
resArr = JSON.parse(response).currentLayout;
|
|
103
|
-
if (!
|
|
100
|
+
if (!isEmpty(resArr)) {
|
|
104
101
|
_layout = resArr;
|
|
105
102
|
}
|
|
106
103
|
}
|
|
@@ -194,7 +191,7 @@ var Dashboard = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
194
191
|
}(), [storageKey, widgets]);
|
|
195
192
|
|
|
196
193
|
//改变布局触发
|
|
197
|
-
var onLayoutChange = useCallback(
|
|
194
|
+
var onLayoutChange = useCallback(debounce(function (layout, layouts, callback) {
|
|
198
195
|
window.dispatchEvent(new Event('resize'));
|
|
199
196
|
if (!stateEditMode) {
|
|
200
197
|
return;
|
|
@@ -234,7 +231,7 @@ var Dashboard = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
234
231
|
//删除小程序
|
|
235
232
|
var removeWidget = useCallback(function (widgetKey) {
|
|
236
233
|
var removedWidget;
|
|
237
|
-
var newLayout =
|
|
234
|
+
var newLayout = cloneDeep(dirtyCurrentLayout);
|
|
238
235
|
newLayout.map(function (item, index) {
|
|
239
236
|
if (item['i'] === widgetKey) {
|
|
240
237
|
removedWidget = item;
|
|
@@ -352,7 +349,7 @@ var Dashboard = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
352
349
|
|
|
353
350
|
//响应外部数据
|
|
354
351
|
useEffect(function () {
|
|
355
|
-
if (!
|
|
352
|
+
if (!isArray(customLayout)) {
|
|
356
353
|
return;
|
|
357
354
|
}
|
|
358
355
|
var data = calcMinAndMax(customLayout, widgets);
|
|
@@ -504,7 +501,7 @@ var Dashboard = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
504
501
|
size: "small",
|
|
505
502
|
onClick: revert,
|
|
506
503
|
icon: /*#__PURE__*/React.createElement(RetweetOutlined, null)
|
|
507
|
-
}, '恢复'), !
|
|
504
|
+
}, '恢复'), !isEmpty(finLayout) && /*#__PURE__*/React.createElement(Button, {
|
|
508
505
|
size: "small",
|
|
509
506
|
danger: true,
|
|
510
507
|
onClick: reset,
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
-
import _cloneDeep from "lodash/cloneDeep"; // import { updateApi as modifySmartChartConfig } from '@/pages/common/widgets/smartchart/service'
|
|
3
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; }
|
|
4
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); } }
|
|
5
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
|
+
// import { updateApi as modifySmartChartConfig } from '@/pages/common/widgets/smartchart/service'
|
|
6
|
+
import { cloneDeep } from 'lodash';
|
|
6
7
|
export var request = /*#__PURE__*/function () {
|
|
7
8
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(url, options) {
|
|
8
9
|
var method, _options$data, dataId, dataType, bigData, res;
|
|
@@ -52,7 +53,7 @@ export var copy = function copy(str) {
|
|
|
52
53
|
}, 1000);
|
|
53
54
|
};
|
|
54
55
|
export var formatLayout = function formatLayout(layout) {
|
|
55
|
-
var data =
|
|
56
|
+
var data = cloneDeep(layout);
|
|
56
57
|
data.forEach(function (item) {
|
|
57
58
|
delete item.minW;
|
|
58
59
|
delete item.maxW;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
-
import _get from "lodash/get";
|
|
3
2
|
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; }
|
|
4
3
|
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; }
|
|
5
4
|
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; }
|
|
@@ -12,6 +11,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
12
11
|
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
13
12
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
14
13
|
import classnames from 'classnames';
|
|
14
|
+
import { get } from 'lodash';
|
|
15
15
|
import React, { useState } from 'react';
|
|
16
16
|
import "./index.less";
|
|
17
17
|
import { ConfigBar } from "./utils";
|
|
@@ -28,8 +28,8 @@ var Widget = function Widget(props) {
|
|
|
28
28
|
_useState2 = _slicedToArray(_useState, 2),
|
|
29
29
|
configShow = _useState2[0],
|
|
30
30
|
setConfigShow = _useState2[1];
|
|
31
|
-
var component =
|
|
32
|
-
var configComponent =
|
|
31
|
+
var component = get(widgets, widgetType + '.component');
|
|
32
|
+
var configComponent = get(widgets, widgetType + '.configComponent');
|
|
33
33
|
return /*#__PURE__*/React.createElement("div", {
|
|
34
34
|
className: classnames(widgetWrapClassName, 'react-dashboard-widget'),
|
|
35
35
|
style: widgetWrapStyle
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
import _get from "lodash/get";
|
|
2
|
-
import _isEmpty from "lodash/isEmpty";
|
|
3
|
-
import _cloneDeep from "lodash/cloneDeep";
|
|
4
1
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
5
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."); }
|
|
6
3
|
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
@@ -14,6 +11,7 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
14
11
|
import { AppstoreAddOutlined, PlusOutlined, SearchOutlined } from '@ant-design/icons';
|
|
15
12
|
import { Button, Drawer, Empty, Input } from 'antd';
|
|
16
13
|
import classnames from 'classnames';
|
|
14
|
+
import { cloneDeep, isEmpty, get } from 'lodash';
|
|
17
15
|
import React, { useCallback, useEffect, useMemo, useState } from 'react';
|
|
18
16
|
import "./index.less";
|
|
19
17
|
var Search = Input.Search;
|
|
@@ -89,7 +87,7 @@ var WidgetSelector = function WidgetSelector(props) {
|
|
|
89
87
|
handleCalcMenuData();
|
|
90
88
|
}, []);
|
|
91
89
|
var finWidgets = useMemo(function () {
|
|
92
|
-
var finData =
|
|
90
|
+
var finData = cloneDeep(widgets);
|
|
93
91
|
Object.keys(finData).map(function (key) {
|
|
94
92
|
//初始化数据
|
|
95
93
|
finData[key].length = 0;
|
|
@@ -174,7 +172,7 @@ var WidgetSelector = function WidgetSelector(props) {
|
|
|
174
172
|
height: '100%',
|
|
175
173
|
overflowY: 'auto'
|
|
176
174
|
}
|
|
177
|
-
}, !
|
|
175
|
+
}, !isEmpty(finWidgets) ? /*#__PURE__*/React.createElement("div", {
|
|
178
176
|
className: "react-dashboard-widget-waterfall",
|
|
179
177
|
style: {
|
|
180
178
|
columnCount: Math.ceil((width - 200) / 200)
|
|
@@ -195,8 +193,8 @@ var WidgetSelector = function WidgetSelector(props) {
|
|
|
195
193
|
}, /*#__PURE__*/React.createElement("div", {
|
|
196
194
|
className: 'react-dashboard-widget-iconWrap',
|
|
197
195
|
style: {
|
|
198
|
-
backgroundColor:
|
|
199
|
-
backgroundImage:
|
|
196
|
+
backgroundColor: get(widgets, key + '.iconBackground'),
|
|
197
|
+
backgroundImage: get(widgets, key + '.iconBackground')
|
|
200
198
|
}
|
|
201
199
|
}, item.icon), /*#__PURE__*/React.createElement("div", {
|
|
202
200
|
className: 'react-dashboard-widget-name'
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import _get from "lodash/get";
|
|
2
1
|
import { Drawer } from 'antd';
|
|
2
|
+
import { get } from 'lodash';
|
|
3
3
|
import React, { useCallback, useEffect, useMemo } from 'react';
|
|
4
4
|
import { DeleteOutlined, SettingOutlined } from '@ant-design/icons';
|
|
5
5
|
|
|
@@ -27,7 +27,7 @@ export var ConfigBar = function ConfigBar(props) {
|
|
|
27
27
|
var widgetType = getWidgetType(widgetKey, widgets);
|
|
28
28
|
return /*#__PURE__*/React.createElement(React.Fragment, null, editMode && /*#__PURE__*/React.createElement("div", {
|
|
29
29
|
className: 'react-dashboard-mask'
|
|
30
|
-
}), editMode &&
|
|
30
|
+
}), editMode && get('widgets', widgetType + '.configComponent') && /*#__PURE__*/React.createElement("div", {
|
|
31
31
|
className: 'react-dashboard-configicon',
|
|
32
32
|
onClick: function onClick() {
|
|
33
33
|
return setConfigShow(true);
|
|
@@ -65,7 +65,7 @@ export var ConfigWrap = function ConfigWrap(props, widgets) {
|
|
|
65
65
|
return;
|
|
66
66
|
}
|
|
67
67
|
var widgetType = getWidgetType(widgetKey, widgets);
|
|
68
|
-
return
|
|
68
|
+
return get(widgets, widgetType + '.name') + '设置';
|
|
69
69
|
}, [widgetKey, widgets, getWidgetType]);
|
|
70
70
|
useEffect(function () {
|
|
71
71
|
afterVisibleChange(visible);
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { SelectProps } from 'antd/lib/select';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { ColDef, ColGroupDef } from 'ag-grid-community';
|
|
4
|
+
import type { PagedApiAdapter } from '../adapters';
|
|
4
5
|
interface IDialogSelectProps extends SelectProps<any> {
|
|
5
6
|
hideBtn?: boolean;
|
|
6
7
|
request?: any;
|
|
@@ -10,6 +11,8 @@ interface IDialogSelectProps extends SelectProps<any> {
|
|
|
10
11
|
queryFun?: (item: any) => void;
|
|
11
12
|
onChangeItem?: (item: any) => void;
|
|
12
13
|
useAutoComplete?: boolean;
|
|
14
|
+
/** 分页 API 适配器(默认 ABP)。@author nokecy */
|
|
15
|
+
pagedApiAdapter?: PagedApiAdapter;
|
|
13
16
|
}
|
|
14
17
|
declare const DialogSelect: (props: IDialogSelectProps) => React.JSX.Element;
|
|
15
18
|
export { IDialogSelectProps };
|
|
@@ -24,6 +24,7 @@ import React, { useState } from 'react';
|
|
|
24
24
|
import { AgGridPlus } from "../ag-grid-plus";
|
|
25
25
|
import { useBoolean, useControllableValue } from 'ahooks';
|
|
26
26
|
import DraggableModal from "../draggableModal";
|
|
27
|
+
import { abpPagedApiAdapter } from "../adapters";
|
|
27
28
|
var DialogSelect = function DialogSelect(props) {
|
|
28
29
|
var request = props.request,
|
|
29
30
|
columnDefs = props.columnDefs,
|
|
@@ -148,27 +149,29 @@ var DialogSelect = function DialogSelect(props) {
|
|
|
148
149
|
},
|
|
149
150
|
request: ( /*#__PURE__*/function () {
|
|
150
151
|
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(params, _, record) {
|
|
151
|
-
var
|
|
152
|
+
var _props$pagedApiAdapte;
|
|
153
|
+
var adapter, data, requestData;
|
|
152
154
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
153
155
|
while (1) switch (_context.prev = _context.next) {
|
|
154
156
|
case 0:
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
157
|
+
adapter = (_props$pagedApiAdapte = props.pagedApiAdapter) !== null && _props$pagedApiAdapte !== void 0 ? _props$pagedApiAdapte : abpPagedApiAdapter;
|
|
158
|
+
_context.next = 3;
|
|
159
|
+
return request(adapter.toRequest({
|
|
160
|
+
filter: props !== null && props !== void 0 && props.queryFun ? props === null || props === void 0 ? void 0 : props.queryFun(params === null || params === void 0 ? void 0 : params.filter) : params === null || params === void 0 ? void 0 : params.filter,
|
|
161
|
+
sorter: params === null || params === void 0 ? void 0 : params.sorter,
|
|
162
|
+
skipCount: params === null || params === void 0 ? void 0 : params.skipCount,
|
|
163
|
+
maxResultCount: params === null || params === void 0 ? void 0 : params.maxResultCount
|
|
164
|
+
}), record);
|
|
165
|
+
case 3:
|
|
163
166
|
data = _context.sent;
|
|
164
167
|
requestData = {
|
|
165
168
|
success: true,
|
|
166
|
-
data: data
|
|
167
|
-
total: data
|
|
169
|
+
data: adapter.getItems(data),
|
|
170
|
+
total: adapter.getTotal(data)
|
|
168
171
|
};
|
|
169
|
-
setItems(data
|
|
172
|
+
setItems(adapter.getItems(data));
|
|
170
173
|
return _context.abrupt("return", requestData);
|
|
171
|
-
case
|
|
174
|
+
case 7:
|
|
172
175
|
case "end":
|
|
173
176
|
return _context.stop();
|
|
174
177
|
}
|
|
@@ -41,6 +41,8 @@ var ConfigurableToolbar = /*#__PURE__*/lazy(function () {
|
|
|
41
41
|
});
|
|
42
42
|
// 直接导入操作列组件,避免懒加载导致的渲染问题
|
|
43
43
|
import OptionsColumn from "./OptionsColumn";
|
|
44
|
+
import { toAbpPagedRequest } from "./_utils/toAbpPagedRequest";
|
|
45
|
+
import { abpPagedApiAdapter } from "../adapters";
|
|
44
46
|
|
|
45
47
|
/**
|
|
46
48
|
* 通用列表页面生成器组件
|
|
@@ -79,7 +81,8 @@ var GeneratedListPage = function GeneratedListPage(config) {
|
|
|
79
81
|
defaultPageSize: 20
|
|
80
82
|
} : _config$paginationCon,
|
|
81
83
|
externalGridRef = config.gridRef,
|
|
82
|
-
externalOnRefresh = config.onRefresh
|
|
84
|
+
externalOnRefresh = config.onRefresh,
|
|
85
|
+
pagedApiAdapter = config.pagedApiAdapter;
|
|
83
86
|
|
|
84
87
|
// 内部Grid引用
|
|
85
88
|
var internalGridRef = useRef();
|
|
@@ -253,7 +256,7 @@ var GeneratedListPage = function GeneratedListPage(config) {
|
|
|
253
256
|
_context2.next = 5;
|
|
254
257
|
return managedRequest(params, /*#__PURE__*/function () {
|
|
255
258
|
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(requestParams, signal) {
|
|
256
|
-
var treeData, flatData, filteredData, filterText, apiParams, data, items, _treeData, _flatData, _filteredData, _filterText;
|
|
259
|
+
var treeData, flatData, filteredData, filterText, pagedAdapter, apiParams, data, items, _treeData, _flatData, _filteredData, _filterText;
|
|
257
260
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
258
261
|
while (1) switch (_context.prev = _context.next) {
|
|
259
262
|
case 0:
|
|
@@ -282,25 +285,23 @@ var GeneratedListPage = function GeneratedListPage(config) {
|
|
|
282
285
|
});
|
|
283
286
|
case 8:
|
|
284
287
|
// 普通列表数据处理
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
};
|
|
295
|
-
_context.next = 11;
|
|
288
|
+
// 注入了适配器时走适配器的 toRequest;否则保持原有 toAbpPagedRequest(向后兼容)
|
|
289
|
+
pagedAdapter = pagedApiAdapter !== null && pagedApiAdapter !== void 0 ? pagedApiAdapter : abpPagedApiAdapter;
|
|
290
|
+
apiParams = pagedApiAdapter ? pagedAdapter.toRequest({
|
|
291
|
+
skipCount: requestParams === null || requestParams === void 0 ? void 0 : requestParams.skipCount,
|
|
292
|
+
maxResultCount: requestParams === null || requestParams === void 0 ? void 0 : requestParams.maxResultCount,
|
|
293
|
+
filter: requestParams === null || requestParams === void 0 ? void 0 : requestParams.filter,
|
|
294
|
+
sorter: requestParams === null || requestParams === void 0 ? void 0 : requestParams.sorter
|
|
295
|
+
}) : toAbpPagedRequest(requestParams, paginationConfig);
|
|
296
|
+
_context.next = 12;
|
|
296
297
|
return measureApiCall(function () {
|
|
297
298
|
return apiConfig.list(apiParams);
|
|
298
299
|
});
|
|
299
|
-
case
|
|
300
|
+
case 12:
|
|
300
301
|
data = _context.sent;
|
|
301
|
-
items = data
|
|
302
|
+
items = pagedAdapter.getItems(data); // 自动树形模式 - 从扁平数据构建树形结构
|
|
302
303
|
if (!(treeConfig !== null && treeConfig !== void 0 && treeConfig.enabled && treeConfig.autoMode)) {
|
|
303
|
-
_context.next =
|
|
304
|
+
_context.next = 20;
|
|
304
305
|
break;
|
|
305
306
|
}
|
|
306
307
|
_treeData = buildTreeFromFlat(items);
|
|
@@ -319,13 +320,13 @@ var GeneratedListPage = function GeneratedListPage(config) {
|
|
|
319
320
|
data: _filteredData,
|
|
320
321
|
total: _filteredData.length
|
|
321
322
|
});
|
|
322
|
-
case
|
|
323
|
+
case 20:
|
|
323
324
|
return _context.abrupt("return", {
|
|
324
325
|
success: true,
|
|
325
326
|
data: items,
|
|
326
|
-
total: data
|
|
327
|
+
total: pagedAdapter.getTotal(data)
|
|
327
328
|
});
|
|
328
|
-
case
|
|
329
|
+
case 21:
|
|
329
330
|
case "end":
|
|
330
331
|
return _context.stop();
|
|
331
332
|
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 列表请求参数 → ABP 分页契约映射(从 GeneratedListPage 内联逻辑抽出)。
|
|
3
|
+
* @author nokecy
|
|
4
|
+
*/
|
|
5
|
+
export interface ListRequestParams {
|
|
6
|
+
maxResultCount?: number;
|
|
7
|
+
skipCount?: number;
|
|
8
|
+
filter?: string;
|
|
9
|
+
sorter?: string;
|
|
10
|
+
}
|
|
11
|
+
export interface PaginationConfig {
|
|
12
|
+
enabled?: boolean;
|
|
13
|
+
defaultPageSize?: number;
|
|
14
|
+
}
|
|
15
|
+
export declare function toAbpPagedRequest(requestParams: ListRequestParams | undefined, paginationConfig: PaginationConfig): Record<string, unknown>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 列表请求参数 → ABP 分页契约映射(从 GeneratedListPage 内联逻辑抽出)。
|
|
3
|
+
* @author nokecy
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
export function toAbpPagedRequest(requestParams, paginationConfig) {
|
|
7
|
+
if (paginationConfig.enabled) {
|
|
8
|
+
return {
|
|
9
|
+
PageSize: (requestParams === null || requestParams === void 0 ? void 0 : requestParams.maxResultCount) || paginationConfig.defaultPageSize,
|
|
10
|
+
Filter: requestParams === null || requestParams === void 0 ? void 0 : requestParams.filter,
|
|
11
|
+
MaxResultCount: (requestParams === null || requestParams === void 0 ? void 0 : requestParams.maxResultCount) || paginationConfig.defaultPageSize,
|
|
12
|
+
SkipCount: (requestParams === null || requestParams === void 0 ? void 0 : requestParams.skipCount) || 0,
|
|
13
|
+
Sorting: requestParams === null || requestParams === void 0 ? void 0 : requestParams.sorter
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
return {
|
|
17
|
+
Filter: requestParams === null || requestParams === void 0 ? void 0 : requestParams.filter,
|
|
18
|
+
Sorting: requestParams === null || requestParams === void 0 ? void 0 : requestParams.sorter
|
|
19
|
+
};
|
|
20
|
+
}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import { GridRef } from "../ag-grid-plus/interface";
|
|
3
3
|
import { ColDef } from "ag-grid-community";
|
|
4
4
|
import { ButtonProps } from "antd";
|
|
5
|
+
import { PagedApiAdapter } from '../adapters';
|
|
5
6
|
/**
|
|
6
7
|
* 权限配置接口
|
|
7
8
|
*/
|
|
@@ -200,6 +201,8 @@ export interface GeneratedListPageConfig<T = any> {
|
|
|
200
201
|
gridRef?: React.RefObject<GridRef>;
|
|
201
202
|
/** 刷新回调 */
|
|
202
203
|
onRefresh?: () => void;
|
|
204
|
+
/** 分页 API 适配器(默认 ABP);非 ABP 后端可注入。@author nokecy */
|
|
205
|
+
pagedApiAdapter?: PagedApiAdapter;
|
|
203
206
|
}
|
|
204
207
|
/**
|
|
205
208
|
* 操作列组件属性接口
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -30,4 +30,5 @@ export type * from "./fullScreenAlert";
|
|
|
30
30
|
export type * from "./RuleBuilder";
|
|
31
31
|
export type { ColumnConfig } from "./array-table/columnHelper";
|
|
32
32
|
export type { CentralizedColumnScheme, QueryScheme, SchemeStorageAdapter, SchemeSyncDataDto, CurrentSchemeDto, SchemeStorageConfig, LocalStorageAdapterConfig, BackendApiAdapterConfig, UseSchemeManagerConfig, GridPlusContextValue, GlobalConfigPermissions, } from "./ag-grid-plus";
|
|
33
|
+
export * from './adapters';
|
|
33
34
|
export type { ParseResult as RegexParseResult, ValidationResult as RegexValidationResult, RegexError, ComplexityMetrics, ASTNode, AstRegExp, RegexTemplate, TestResult as RegexTestResult, CodeMirrorWrapperProps, RegexEditorProps, RegexFlags, MatchResult, RegexTesterProps, FlagsSelectorProps, MatchItemProps, RegexRailroadDiagramProps, } from "./components/RegexEditor";
|
package/dist/esm/index.js
CHANGED
|
@@ -93,6 +93,13 @@ export interface WithStandardFormConfig {
|
|
|
93
93
|
};
|
|
94
94
|
/** 自定义组件映射 */
|
|
95
95
|
customComponents?: Record<string, React.ComponentType<any>>;
|
|
96
|
+
/**
|
|
97
|
+
* 是否在内部构建的 schema 中注入隐藏的审计字段(creationTime / lastModificationTime)。
|
|
98
|
+
* 默认 true,保持向后兼容;显式传 false 时跳过注入。
|
|
99
|
+
* 仅对使用 businessFields 内部构建 schema 的场景生效,externalSchema 不受此控制。
|
|
100
|
+
* @author nokecy
|
|
101
|
+
*/
|
|
102
|
+
auditFields?: boolean;
|
|
96
103
|
}
|
|
97
104
|
/**
|
|
98
105
|
* StandardFormDialog组件属性接口
|
|
@@ -64,7 +64,9 @@ export var withStandardForm = function withStandardForm(config) {
|
|
|
64
64
|
_config$customHandler = config.customHandlers,
|
|
65
65
|
customHandlers = _config$customHandler === void 0 ? {} : _config$customHandler,
|
|
66
66
|
_config$customCompone = config.customComponents,
|
|
67
|
-
customComponents = _config$customCompone === void 0 ? {} : _config$customCompone
|
|
67
|
+
customComponents = _config$customCompone === void 0 ? {} : _config$customCompone,
|
|
68
|
+
_config$auditFields = config.auditFields,
|
|
69
|
+
auditFields = _config$auditFields === void 0 ? true : _config$auditFields;
|
|
68
70
|
|
|
69
71
|
// 验证配置
|
|
70
72
|
if (!externalSchema && !businessFields) {
|
|
@@ -89,8 +91,7 @@ export var withStandardForm = function withStandardForm(config) {
|
|
|
89
91
|
'x-component': 'Input',
|
|
90
92
|
'x-display': 'hidden'
|
|
91
93
|
}
|
|
92
|
-
}, businessFields),
|
|
93
|
-
// 审计字段(如果需要)
|
|
94
|
+
}, businessFields), auditFields !== false ? {
|
|
94
95
|
creationTime: {
|
|
95
96
|
type: 'string',
|
|
96
97
|
title: '创建时间',
|
|
@@ -113,7 +114,7 @@ export var withStandardForm = function withStandardForm(config) {
|
|
|
113
114
|
},
|
|
114
115
|
'x-display': 'hidden'
|
|
115
116
|
}
|
|
116
|
-
})
|
|
117
|
+
} : {})
|
|
117
118
|
};
|
|
118
119
|
|
|
119
120
|
// 表单布局配置(向后兼容)
|