@nokecy/qc-ui 0.1.18 → 0.1.21
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/_utils/boolSelect.d.ts +4 -0
- package/dist/cjs/ag-grid-plus/_utils/boolSelect.js +61 -0
- package/dist/cjs/ag-grid-plus/ag-gridPlus.d.ts +7 -0
- package/dist/cjs/ag-grid-plus/ag-gridPlus.js +397 -0
- package/dist/cjs/ag-grid-plus/global.scss +23 -0
- package/dist/cjs/ag-grid-plus/gridManager/index.d.ts +8 -0
- package/dist/cjs/ag-grid-plus/gridManager/index.js +51 -0
- package/dist/cjs/ag-grid-plus/index.d.ts +4 -0
- package/dist/cjs/ag-grid-plus/index.js +67 -0
- package/dist/cjs/ag-grid-plus/index.less +7 -0
- package/dist/cjs/ag-grid-plus/interface.d.ts +37 -0
- package/dist/cjs/ag-grid-plus/interface.js +17 -0
- package/dist/cjs/ag-grid-plus/queryForm/index.d.ts +10 -0
- package/dist/cjs/ag-grid-plus/queryForm/index.js +236 -0
- package/dist/cjs/ag-grid-plus/queryForm/index.less +48 -0
- package/dist/cjs/ag-grid-plus/queryForm/queryForm.d.ts +3 -0
- package/dist/cjs/ag-grid-plus/queryForm/queryForm.js +112 -0
- package/dist/cjs/ag-grid-plus/setting/index.d.ts +8 -0
- package/dist/cjs/ag-grid-plus/setting/index.js +214 -0
- package/dist/cjs/ag-grid-plus/settingItem/index.d.ts +3 -0
- package/dist/cjs/ag-grid-plus/settingItem/index.js +27 -0
- package/dist/cjs/ag-grid-plus/toolBar/index.d.ts +20 -0
- package/dist/cjs/ag-grid-plus/toolBar/index.js +196 -0
- package/dist/cjs/ag-grid-plus/toolBar/style.d.ts +5 -0
- package/dist/cjs/ag-grid-plus/toolBar/style.js +142 -0
- package/dist/cjs/ag-grid-plus/utils.d.ts +9 -0
- package/dist/cjs/ag-grid-plus/utils.js +174 -0
- package/dist/cjs/array-table/index.d.ts +8 -0
- package/dist/cjs/array-table/index.js +201 -0
- package/dist/cjs/array-table-index/index.d.ts +3 -0
- package/dist/cjs/array-table-index/index.js +29 -0
- package/dist/cjs/dashboard/dashboard/components/index.d.ts +2 -0
- package/dist/cjs/dashboard/dashboard/components/index.js +15 -0
- package/dist/cjs/dashboard/dashboard/components/modal/index.d.ts +3 -0
- package/dist/cjs/dashboard/dashboard/components/modal/index.js +26 -0
- package/dist/cjs/dashboard/dashboard/components/toolbar/index.d.ts +11 -0
- package/dist/cjs/dashboard/dashboard/components/toolbar/index.js +37 -0
- package/dist/cjs/dashboard/dashboard/components/toolbar/style/index.d.ts +1 -0
- package/dist/cjs/dashboard/dashboard/components/toolbar/style/index.js +3 -0
- package/dist/cjs/dashboard/dashboard/components/toolbar/style/index.less +49 -0
- package/dist/cjs/dashboard/dashboard/index.d.ts +62 -0
- package/dist/cjs/dashboard/dashboard/index.js +607 -0
- package/dist/cjs/dashboard/dashboard/index.less +173 -0
- package/dist/cjs/dashboard/dashboard/service.d.ts +8 -0
- package/dist/cjs/dashboard/dashboard/service.js +114 -0
- package/dist/cjs/dashboard/dashboard/utils.d.ts +9 -0
- package/dist/cjs/dashboard/dashboard/utils.js +125 -0
- package/dist/cjs/dashboard/index.d.ts +3 -0
- package/dist/cjs/dashboard/index.js +30 -0
- package/dist/cjs/dashboard/utils.d.ts +24 -0
- package/dist/cjs/dashboard/utils.js +162 -0
- package/dist/cjs/dashboard/widget/index.d.ts +13 -0
- package/dist/cjs/dashboard/widget/index.js +77 -0
- package/dist/cjs/dashboard/widget/index.less +7 -0
- package/dist/cjs/dashboard/widget/selector/index.d.ts +4 -0
- package/dist/cjs/dashboard/widget/selector/index.js +274 -0
- package/dist/cjs/dashboard/widget/selector/index.less +172 -0
- package/dist/cjs/dashboard/widget/utils.d.ts +4 -0
- package/dist/cjs/dashboard/widget/utils.js +114 -0
- package/dist/cjs/elsa/components/finishNode.d.ts +0 -0
- package/dist/cjs/elsa/components/finishNode.js +1 -0
- package/dist/cjs/elsa/components/forkNode.d.ts +0 -0
- package/dist/cjs/elsa/components/forkNode.js +1 -0
- package/dist/cjs/elsa/components/ifNode.d.ts +0 -0
- package/dist/cjs/elsa/components/ifNode.js +1 -0
- package/dist/cjs/elsa/components/joinNode.d.ts +0 -0
- package/dist/cjs/elsa/components/joinNode.js +1 -0
- package/dist/cjs/elsa/components/setNameNode.d.ts +0 -0
- package/dist/cjs/elsa/components/setNameNode.js +1 -0
- package/dist/cjs/elsa/components/startNode.d.ts +3 -0
- package/dist/cjs/elsa/components/startNode.js +24 -0
- package/dist/cjs/elsa/components/switchNode.d.ts +0 -0
- package/dist/cjs/elsa/components/switchNode.js +1 -0
- package/dist/cjs/elsa/components/timerNode.d.ts +0 -0
- package/dist/cjs/elsa/components/timerNode.js +1 -0
- package/dist/cjs/elsa/components/userTaskNode/index.d.ts +7 -0
- package/dist/cjs/elsa/components/userTaskNode/index.js +50 -0
- package/dist/cjs/elsa/components/userTaskNode/index.less +0 -0
- package/dist/cjs/elsa/components/userTaskNode/register.d.ts +1 -0
- package/dist/cjs/elsa/components/userTaskNode/register.js +54 -0
- package/dist/cjs/elsa/elsa.design.d.ts +4 -0
- package/dist/cjs/elsa/elsa.design.js +123 -0
- package/dist/cjs/elsa/index.d.ts +4 -0
- package/dist/cjs/elsa/index.js +40 -0
- package/dist/cjs/elsa/index.less +21 -0
- package/dist/cjs/extensible-grid/index.d.ts +4 -0
- package/dist/cjs/extensible-grid/index.js +39 -0
- package/dist/cjs/extensible-grid/interface.d.ts +14 -0
- package/dist/cjs/extensible-grid/interface.js +5 -0
- package/dist/cjs/index.d.ts +8 -0
- package/dist/cjs/index.js +67 -0
- package/dist/cjs/xflow/components/Wrapper.d.ts +3 -0
- package/dist/cjs/xflow/components/Wrapper.js +26 -0
- package/dist/cjs/xflow/components/XFlow.d.ts +3 -0
- package/dist/cjs/xflow/components/XFlow.js +47 -0
- package/dist/cjs/xflow/components/XFlowGraph.d.ts +4 -0
- package/dist/cjs/xflow/components/XFlowGraph.js +73 -0
- package/dist/cjs/xflow/components/graph-toolbar/index.d.ts +19 -0
- package/dist/cjs/xflow/components/graph-toolbar/index.js +60 -0
- package/dist/cjs/xflow/components/graph-toolbar/index.less +11 -0
- package/dist/cjs/xflow/components/index.d.ts +3 -0
- package/dist/cjs/xflow/components/index.js +31 -0
- package/dist/cjs/xflow/components/keyboard/index.d.ts +3 -0
- package/dist/cjs/xflow/components/keyboard/index.js +40 -0
- package/dist/cjs/xflow/components/minimap/index.d.ts +3 -0
- package/dist/cjs/xflow/components/minimap/index.js +53 -0
- package/dist/cjs/xflow/components/scroller/index.d.ts +4 -0
- package/dist/cjs/xflow/components/scroller/index.js +49 -0
- package/dist/cjs/xflow/components/selection/index.d.ts +3 -0
- package/dist/cjs/xflow/components/selection/index.js +40 -0
- package/dist/cjs/xflow/components/snapline/index.d.ts +3 -0
- package/dist/cjs/xflow/components/snapline/index.js +40 -0
- package/dist/cjs/xflow/components/transform/index.d.ts +3 -0
- package/dist/cjs/xflow/components/transform/index.js +38 -0
- package/dist/cjs/xflow/context/GraphContext.d.ts +10 -0
- package/dist/cjs/xflow/context/GraphContext.js +21 -0
- package/dist/cjs/xflow/hooks/clipboard/index.d.ts +2 -0
- package/dist/cjs/xflow/hooks/clipboard/index.js +34 -0
- package/dist/cjs/xflow/hooks/dnd/index.d.ts +2 -0
- package/dist/cjs/xflow/hooks/dnd/index.js +29 -0
- package/dist/cjs/xflow/hooks/format/index.d.ts +5 -0
- package/dist/cjs/xflow/hooks/format/index.js +60 -0
- package/dist/cjs/xflow/hooks/graph/index.d.ts +1 -0
- package/dist/cjs/xflow/hooks/graph/index.js +19 -0
- package/dist/cjs/xflow/hooks/history/index.d.ts +4 -0
- package/dist/cjs/xflow/hooks/history/index.js +63 -0
- package/dist/cjs/xflow/hooks/keyboard/index.d.ts +13 -0
- package/dist/cjs/xflow/hooks/keyboard/index.js +55 -0
- package/dist/cjs/xflow/hooks/selection/index.d.ts +3 -0
- package/dist/cjs/xflow/hooks/selection/index.js +41 -0
- package/dist/cjs/xflow/hooks/snapline/index.d.ts +2 -0
- package/dist/cjs/xflow/hooks/snapline/index.js +21 -0
- package/dist/cjs/xflow/hooks/transform/index.d.ts +2 -0
- package/dist/cjs/xflow/hooks/transform/index.js +21 -0
- package/dist/cjs/xflow/index.d.ts +3 -0
- package/dist/cjs/xflow/index.js +44 -0
- package/dist/cjs/xflow/styles/index.less +0 -0
- package/dist/cjs/xflow/types/index.d.ts +19 -0
- package/dist/cjs/xflow/types/index.js +5 -0
- package/dist/cjs/xflow/util/algorithm.d.ts +1 -0
- package/dist/cjs/xflow/util/algorithm.js +10 -0
- package/dist/cjs/xflow/util/index.d.ts +2 -0
- package/dist/cjs/xflow/util/index.js +16 -0
- package/dist/cjs/xflow/util/main.d.ts +2 -0
- package/dist/cjs/xflow/util/main.js +31 -0
- package/dist/cjs/xflow/util/model.d.ts +2 -0
- package/dist/cjs/xflow/util/model.js +29 -0
- package/dist/esm/ag-grid-plus/_utils/boolSelect.d.ts +4 -0
- package/dist/esm/ag-grid-plus/_utils/boolSelect.js +48 -0
- package/dist/esm/ag-grid-plus/ag-gridPlus.d.ts +7 -0
- package/dist/esm/ag-grid-plus/ag-gridPlus.js +369 -0
- package/dist/esm/ag-grid-plus/global.scss +23 -0
- package/dist/esm/ag-grid-plus/gridManager/index.d.ts +8 -0
- package/dist/esm/ag-grid-plus/gridManager/index.js +44 -0
- package/dist/esm/ag-grid-plus/index.d.ts +4 -0
- package/dist/esm/ag-grid-plus/index.js +4 -0
- package/dist/esm/ag-grid-plus/index.less +7 -0
- package/dist/esm/ag-grid-plus/interface.d.ts +37 -0
- package/dist/esm/ag-grid-plus/interface.js +9 -0
- package/dist/esm/ag-grid-plus/queryForm/index.d.ts +10 -0
- package/dist/esm/ag-grid-plus/queryForm/index.js +214 -0
- package/dist/esm/ag-grid-plus/queryForm/index.less +48 -0
- package/dist/esm/ag-grid-plus/queryForm/queryForm.d.ts +3 -0
- package/dist/esm/ag-grid-plus/queryForm/queryForm.js +94 -0
- package/dist/esm/ag-grid-plus/setting/index.d.ts +8 -0
- package/dist/esm/ag-grid-plus/setting/index.js +196 -0
- package/dist/esm/ag-grid-plus/settingItem/index.d.ts +3 -0
- package/dist/esm/ag-grid-plus/settingItem/index.js +17 -0
- package/dist/esm/ag-grid-plus/toolBar/index.d.ts +20 -0
- package/dist/esm/ag-grid-plus/toolBar/index.js +176 -0
- package/dist/esm/ag-grid-plus/toolBar/style.d.ts +5 -0
- package/dist/esm/ag-grid-plus/toolBar/style.js +135 -0
- package/dist/esm/ag-grid-plus/utils.d.ts +9 -0
- package/dist/esm/ag-grid-plus/utils.js +153 -0
- package/dist/esm/array-table/index.d.ts +8 -0
- package/dist/esm/array-table/index.js +177 -0
- package/dist/esm/array-table-index/index.d.ts +3 -0
- package/dist/esm/array-table-index/index.js +10 -0
- package/dist/esm/dashboard/dashboard/components/index.d.ts +2 -0
- package/dist/esm/dashboard/dashboard/components/index.js +2 -0
- package/dist/esm/dashboard/dashboard/components/modal/index.d.ts +3 -0
- package/dist/esm/dashboard/dashboard/components/modal/index.js +17 -0
- package/dist/esm/dashboard/dashboard/components/toolbar/index.d.ts +11 -0
- package/dist/esm/dashboard/dashboard/components/toolbar/index.js +24 -0
- package/dist/esm/dashboard/dashboard/components/toolbar/style/index.d.ts +1 -0
- package/dist/esm/dashboard/dashboard/components/toolbar/style/index.js +1 -0
- package/dist/esm/dashboard/dashboard/components/toolbar/style/index.less +49 -0
- package/dist/esm/dashboard/dashboard/index.d.ts +62 -0
- package/dist/esm/dashboard/dashboard/index.js +574 -0
- package/dist/esm/dashboard/dashboard/index.less +173 -0
- package/dist/esm/dashboard/dashboard/service.d.ts +8 -0
- package/dist/esm/dashboard/dashboard/service.js +102 -0
- package/dist/esm/dashboard/dashboard/utils.d.ts +9 -0
- package/dist/esm/dashboard/dashboard/utils.js +106 -0
- package/dist/esm/dashboard/index.d.ts +3 -0
- package/dist/esm/dashboard/index.js +3 -0
- package/dist/esm/dashboard/utils.d.ts +24 -0
- package/dist/esm/dashboard/utils.js +142 -0
- package/dist/esm/dashboard/widget/index.d.ts +13 -0
- package/dist/esm/dashboard/widget/index.js +60 -0
- package/dist/esm/dashboard/widget/index.less +7 -0
- package/dist/esm/dashboard/widget/selector/index.d.ts +4 -0
- package/dist/esm/dashboard/widget/selector/index.js +252 -0
- package/dist/esm/dashboard/widget/selector/index.less +172 -0
- package/dist/esm/dashboard/widget/utils.d.ts +4 -0
- package/dist/esm/dashboard/widget/utils.js +87 -0
- package/dist/esm/elsa/components/finishNode.d.ts +0 -0
- package/dist/esm/elsa/components/finishNode.js +0 -0
- package/dist/esm/elsa/components/forkNode.d.ts +0 -0
- package/dist/esm/elsa/components/forkNode.js +0 -0
- package/dist/esm/elsa/components/ifNode.d.ts +0 -0
- package/dist/esm/elsa/components/ifNode.js +0 -0
- package/dist/esm/elsa/components/joinNode.d.ts +0 -0
- package/dist/esm/elsa/components/joinNode.js +0 -0
- package/dist/esm/elsa/components/setNameNode.d.ts +0 -0
- package/dist/esm/elsa/components/setNameNode.js +0 -0
- package/dist/esm/elsa/components/startNode.d.ts +3 -0
- package/dist/esm/elsa/components/startNode.js +14 -0
- package/dist/esm/elsa/components/switchNode.d.ts +0 -0
- package/dist/esm/elsa/components/switchNode.js +0 -0
- package/dist/esm/elsa/components/timerNode.d.ts +0 -0
- package/dist/esm/elsa/components/timerNode.js +0 -0
- package/dist/esm/elsa/components/userTaskNode/index.d.ts +7 -0
- package/dist/esm/elsa/components/userTaskNode/index.js +33 -0
- package/dist/esm/elsa/components/userTaskNode/index.less +0 -0
- package/dist/esm/elsa/components/userTaskNode/register.d.ts +1 -0
- package/dist/esm/elsa/components/userTaskNode/register.js +48 -0
- package/dist/esm/elsa/elsa.design.d.ts +4 -0
- package/dist/esm/elsa/elsa.design.js +105 -0
- package/dist/esm/elsa/index.d.ts +4 -0
- package/dist/esm/elsa/index.js +25 -0
- package/dist/esm/elsa/index.less +21 -0
- package/dist/esm/extensible-grid/index.d.ts +4 -0
- package/dist/esm/extensible-grid/index.js +28 -0
- package/dist/esm/extensible-grid/interface.d.ts +14 -0
- package/dist/esm/extensible-grid/interface.js +1 -0
- package/dist/esm/index.d.ts +8 -0
- package/dist/esm/index.js +8 -0
- package/dist/esm/xflow/components/Wrapper.d.ts +3 -0
- package/dist/esm/xflow/components/Wrapper.js +15 -0
- package/dist/esm/xflow/components/XFlow.d.ts +3 -0
- package/dist/esm/xflow/components/XFlow.js +32 -0
- package/dist/esm/xflow/components/XFlowGraph.d.ts +4 -0
- package/dist/esm/xflow/components/XFlowGraph.js +54 -0
- package/dist/esm/xflow/components/graph-toolbar/index.d.ts +19 -0
- package/dist/esm/xflow/components/graph-toolbar/index.js +44 -0
- package/dist/esm/xflow/components/graph-toolbar/index.less +11 -0
- package/dist/esm/xflow/components/index.d.ts +3 -0
- package/dist/esm/xflow/components/index.js +3 -0
- package/dist/esm/xflow/components/keyboard/index.d.ts +3 -0
- package/dist/esm/xflow/components/keyboard/index.js +22 -0
- package/dist/esm/xflow/components/minimap/index.d.ts +3 -0
- package/dist/esm/xflow/components/minimap/index.js +35 -0
- package/dist/esm/xflow/components/scroller/index.d.ts +4 -0
- package/dist/esm/xflow/components/scroller/index.js +28 -0
- package/dist/esm/xflow/components/selection/index.d.ts +3 -0
- package/dist/esm/xflow/components/selection/index.js +22 -0
- package/dist/esm/xflow/components/snapline/index.d.ts +3 -0
- package/dist/esm/xflow/components/snapline/index.js +22 -0
- package/dist/esm/xflow/components/transform/index.d.ts +3 -0
- package/dist/esm/xflow/components/transform/index.js +20 -0
- package/dist/esm/xflow/context/GraphContext.d.ts +10 -0
- package/dist/esm/xflow/context/GraphContext.js +9 -0
- package/dist/esm/xflow/hooks/clipboard/index.d.ts +2 -0
- package/dist/esm/xflow/hooks/clipboard/index.js +22 -0
- package/dist/esm/xflow/hooks/dnd/index.d.ts +2 -0
- package/dist/esm/xflow/hooks/dnd/index.js +17 -0
- package/dist/esm/xflow/hooks/format/index.d.ts +5 -0
- package/dist/esm/xflow/hooks/format/index.js +48 -0
- package/dist/esm/xflow/hooks/graph/index.d.ts +1 -0
- package/dist/esm/xflow/hooks/graph/index.js +8 -0
- package/dist/esm/xflow/hooks/history/index.d.ts +4 -0
- package/dist/esm/xflow/hooks/history/index.js +45 -0
- package/dist/esm/xflow/hooks/keyboard/index.d.ts +13 -0
- package/dist/esm/xflow/hooks/keyboard/index.js +40 -0
- package/dist/esm/xflow/hooks/selection/index.d.ts +3 -0
- package/dist/esm/xflow/hooks/selection/index.js +25 -0
- package/dist/esm/xflow/hooks/snapline/index.d.ts +2 -0
- package/dist/esm/xflow/hooks/snapline/index.js +9 -0
- package/dist/esm/xflow/hooks/transform/index.d.ts +2 -0
- package/dist/esm/xflow/hooks/transform/index.js +9 -0
- package/dist/esm/xflow/index.d.ts +3 -0
- package/dist/esm/xflow/index.js +3 -0
- package/dist/esm/xflow/styles/index.less +0 -0
- package/dist/esm/xflow/types/index.d.ts +19 -0
- package/dist/esm/xflow/types/index.js +1 -0
- package/dist/esm/xflow/util/algorithm.d.ts +1 -0
- package/dist/esm/xflow/util/algorithm.js +1 -0
- package/dist/esm/xflow/util/index.d.ts +2 -0
- package/dist/esm/xflow/util/index.js +2 -0
- package/dist/esm/xflow/util/main.d.ts +2 -0
- package/dist/esm/xflow/util/main.js +2 -0
- package/dist/esm/xflow/util/model.d.ts +2 -0
- package/dist/esm/xflow/util/model.js +19 -0
- package/dist/umd/qc-ui.min.css +1 -0
- package/dist/umd/qc-ui.min.js +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
|
+
|
|
3
|
+
import _uniqueId from "lodash/uniqueId";
|
|
4
|
+
|
|
5
|
+
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 exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return generator._invoke = function (innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; }(innerFn, self, context), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; this._invoke = function (method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); }; } function maybeInvokeDelegate(delegate, context) { var method = delegate.iterator[context.method]; if (undefined === method) { if (context.delegate = null, "throw" === context.method) { if (delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel; context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method"); } return ContinueSentinel; } var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) { if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; } return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, define(Gp, "constructor", GeneratorFunctionPrototype), define(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (object) { var keys = []; for (var key in object) { keys.push(key); } return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) { "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); } }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, catch: function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
|
6
|
+
|
|
7
|
+
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
8
|
+
|
|
9
|
+
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); }); }; }
|
|
10
|
+
|
|
11
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
12
|
+
|
|
13
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
14
|
+
|
|
15
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
16
|
+
|
|
17
|
+
import { ArrayTable, FormDialog, FormGrid, FormItem, FormLayout, FormTab, Input, Select, Space, NumberPicker, Switch } from '@formily/antd-v5';
|
|
18
|
+
import { createSchemaField } from '@formily/react';
|
|
19
|
+
import { onFormInit } from '@formily/core';
|
|
20
|
+
import React, { useMemo } from "react";
|
|
21
|
+
import { SettingOutlined } from '@ant-design/icons';
|
|
22
|
+
|
|
23
|
+
var Setting = function Setting(props) {
|
|
24
|
+
var gridApi = props.gridApi,
|
|
25
|
+
columnApi = props.columnApi,
|
|
26
|
+
onSaveColumnState = props.onSaveColumnState;
|
|
27
|
+
var SchemaField = useMemo(function () {
|
|
28
|
+
return createSchemaField({
|
|
29
|
+
components: {
|
|
30
|
+
FormTab: FormTab,
|
|
31
|
+
FormItem: FormItem,
|
|
32
|
+
FormGrid: FormGrid,
|
|
33
|
+
Space: Space,
|
|
34
|
+
Input: Input,
|
|
35
|
+
Select: Select,
|
|
36
|
+
ArrayTable: ArrayTable,
|
|
37
|
+
NumberPicker: NumberPicker,
|
|
38
|
+
Switch: Switch
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
}, []);
|
|
42
|
+
var formProps = {
|
|
43
|
+
effects: function effects() {
|
|
44
|
+
onFormInit(function (form) {
|
|
45
|
+
form.setInitialValuesIn('items', getColumnData());
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
var getColumnData = function getColumnData() {
|
|
51
|
+
var columnStates = columnApi.getColumnState();
|
|
52
|
+
var columnRowData = [];
|
|
53
|
+
var columns = columnStates.map(function (columnState) {
|
|
54
|
+
var colDef = gridApi === null || gridApi === void 0 ? void 0 : gridApi.getColumnDef(columnState.colId);
|
|
55
|
+
columnRowData.push(_objectSpread({
|
|
56
|
+
field: colDef.field,
|
|
57
|
+
headerName: colDef.headerName,
|
|
58
|
+
width: columnState.width,
|
|
59
|
+
hide: columnState.hide
|
|
60
|
+
}, columnState));
|
|
61
|
+
});
|
|
62
|
+
return columnRowData;
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
var portalId = "workProcedure".concat(_uniqueId());
|
|
66
|
+
return /*#__PURE__*/React.createElement(FormDialog.Portal, {
|
|
67
|
+
id: portalId
|
|
68
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
69
|
+
style: {
|
|
70
|
+
margin: "0 4px",
|
|
71
|
+
color: "#000",
|
|
72
|
+
fontSize: 16,
|
|
73
|
+
cursor: "pointer"
|
|
74
|
+
},
|
|
75
|
+
onClick: /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
76
|
+
var formDialog;
|
|
77
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
78
|
+
while (1) {
|
|
79
|
+
switch (_context.prev = _context.next) {
|
|
80
|
+
case 0:
|
|
81
|
+
formDialog = FormDialog({
|
|
82
|
+
title: "个性化设置",
|
|
83
|
+
width: 960
|
|
84
|
+
}, portalId, function () {
|
|
85
|
+
return /*#__PURE__*/React.createElement(FormLayout, null, /*#__PURE__*/React.createElement(SchemaField, null, /*#__PURE__*/React.createElement(SchemaField.Void, {
|
|
86
|
+
"x-component": "FormGrid",
|
|
87
|
+
"x-component-props": {
|
|
88
|
+
maxColumns: [1, 3],
|
|
89
|
+
strictAutoFit: true
|
|
90
|
+
}
|
|
91
|
+
}, /*#__PURE__*/React.createElement(SchemaField.Array, {
|
|
92
|
+
name: "items",
|
|
93
|
+
title: "",
|
|
94
|
+
"x-component": "ArrayTable",
|
|
95
|
+
"x-validator": [{
|
|
96
|
+
message: ""
|
|
97
|
+
}],
|
|
98
|
+
"x-decorator": "FormItem",
|
|
99
|
+
"x-decorator-props": {
|
|
100
|
+
gridSpan: 3
|
|
101
|
+
}
|
|
102
|
+
}, /*#__PURE__*/React.createElement(SchemaField.Object, null, /*#__PURE__*/React.createElement(SchemaField.Void, {
|
|
103
|
+
"x-component": "ArrayTable.Column",
|
|
104
|
+
"x-component-props": {
|
|
105
|
+
width: 150,
|
|
106
|
+
title: "字段名"
|
|
107
|
+
}
|
|
108
|
+
}, /*#__PURE__*/React.createElement(SchemaField.String, {
|
|
109
|
+
name: "field",
|
|
110
|
+
"x-decorator": "FormItem",
|
|
111
|
+
"x-component": "Input",
|
|
112
|
+
"x-read-pretty": true
|
|
113
|
+
})), /*#__PURE__*/React.createElement(SchemaField.Void, {
|
|
114
|
+
"x-component": "ArrayTable.Column",
|
|
115
|
+
"x-component-props": {
|
|
116
|
+
width: 150,
|
|
117
|
+
title: "列名"
|
|
118
|
+
}
|
|
119
|
+
}, /*#__PURE__*/React.createElement(SchemaField.String, {
|
|
120
|
+
name: "headerName",
|
|
121
|
+
"x-decorator": "FormItem",
|
|
122
|
+
"x-component": "Input",
|
|
123
|
+
"x-read-pretty": true
|
|
124
|
+
})), /*#__PURE__*/React.createElement(SchemaField.Void, {
|
|
125
|
+
"x-component": "ArrayTable.Column",
|
|
126
|
+
"x-component-props": {
|
|
127
|
+
width: 150,
|
|
128
|
+
title: "宽度"
|
|
129
|
+
}
|
|
130
|
+
}, /*#__PURE__*/React.createElement(SchemaField.String, {
|
|
131
|
+
name: "width",
|
|
132
|
+
"x-decorator": "FormItem",
|
|
133
|
+
"x-component": "NumberPicker"
|
|
134
|
+
})), /*#__PURE__*/React.createElement(SchemaField.Void, {
|
|
135
|
+
"x-component": "ArrayTable.Column",
|
|
136
|
+
"x-component-props": {
|
|
137
|
+
width: 150,
|
|
138
|
+
title: "占满"
|
|
139
|
+
}
|
|
140
|
+
}, /*#__PURE__*/React.createElement(SchemaField.String, {
|
|
141
|
+
name: "flex",
|
|
142
|
+
"x-decorator": "FormItem",
|
|
143
|
+
"x-component": "Switch"
|
|
144
|
+
})), /*#__PURE__*/React.createElement(SchemaField.Void, {
|
|
145
|
+
"x-component": "ArrayTable.Column",
|
|
146
|
+
"x-component-props": {
|
|
147
|
+
width: 150,
|
|
148
|
+
title: '固定位置'
|
|
149
|
+
}
|
|
150
|
+
}, /*#__PURE__*/React.createElement(SchemaField.String, {
|
|
151
|
+
name: "pinned",
|
|
152
|
+
"x-decorator": "FormItem",
|
|
153
|
+
"x-component": "Select",
|
|
154
|
+
enum: [{
|
|
155
|
+
value: "left",
|
|
156
|
+
label: "左固定"
|
|
157
|
+
}, {
|
|
158
|
+
value: "right",
|
|
159
|
+
label: "右固定"
|
|
160
|
+
}, {
|
|
161
|
+
value: undefined,
|
|
162
|
+
label: "不固定"
|
|
163
|
+
}]
|
|
164
|
+
})), /*#__PURE__*/React.createElement(SchemaField.Void, {
|
|
165
|
+
"x-component": "ArrayTable.Column",
|
|
166
|
+
"x-component-props": {
|
|
167
|
+
width: 150,
|
|
168
|
+
title: '隐藏'
|
|
169
|
+
}
|
|
170
|
+
}, /*#__PURE__*/React.createElement(SchemaField.String, {
|
|
171
|
+
name: "hide",
|
|
172
|
+
"x-decorator": "FormItem",
|
|
173
|
+
"x-component": "Switch"
|
|
174
|
+
})))))));
|
|
175
|
+
});
|
|
176
|
+
formDialog.forConfirm(function (payload, next) {
|
|
177
|
+
var values = payload.values;
|
|
178
|
+
var falg = columnApi.applyColumnState({
|
|
179
|
+
state: values.items,
|
|
180
|
+
applyOrder: true
|
|
181
|
+
});
|
|
182
|
+
onSaveColumnState && onSaveColumnState(values.items);
|
|
183
|
+
next(payload);
|
|
184
|
+
}).open(formProps);
|
|
185
|
+
|
|
186
|
+
case 2:
|
|
187
|
+
case "end":
|
|
188
|
+
return _context.stop();
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
}, _callee);
|
|
192
|
+
}))
|
|
193
|
+
}, /*#__PURE__*/React.createElement(SettingOutlined, null)));
|
|
194
|
+
};
|
|
195
|
+
|
|
196
|
+
export default Setting;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
var SettingItem = function SettingItem(props) {
|
|
4
|
+
var onClick = props.onClick,
|
|
5
|
+
icon = props.icon;
|
|
6
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
7
|
+
style: {
|
|
8
|
+
margin: "0 4px",
|
|
9
|
+
color: "#000",
|
|
10
|
+
fontSize: 16,
|
|
11
|
+
cursor: "pointer"
|
|
12
|
+
},
|
|
13
|
+
onClick: onClick
|
|
14
|
+
}, icon);
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export default SettingItem;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { LabelTooltipType } from 'antd/es/form/FormItemLabel';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
declare type SettingPropType = React.ReactNode;
|
|
4
|
+
export declare type ListToolBarProps = {
|
|
5
|
+
prefixCls?: string;
|
|
6
|
+
className?: string;
|
|
7
|
+
style?: React.CSSProperties;
|
|
8
|
+
/** 标题 */
|
|
9
|
+
title?: React.ReactNode;
|
|
10
|
+
/** 副标题 */
|
|
11
|
+
subTitle?: React.ReactNode;
|
|
12
|
+
/** 标题提示 */
|
|
13
|
+
tooltip?: string | LabelTooltipType;
|
|
14
|
+
/** 工具栏右侧操作区 */
|
|
15
|
+
actions?: React.ReactNode[];
|
|
16
|
+
/** 工作栏右侧设置区 */
|
|
17
|
+
settings?: SettingPropType[];
|
|
18
|
+
};
|
|
19
|
+
declare const ListToolBar: React.FC<ListToolBarProps>;
|
|
20
|
+
export default ListToolBar;
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
2
|
+
|
|
3
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
4
|
+
|
|
5
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
6
|
+
|
|
7
|
+
import { LabelIconTip } from '@ant-design/pro-utils';
|
|
8
|
+
import { ConfigProvider, Tooltip } from 'antd';
|
|
9
|
+
import classNames from 'classnames';
|
|
10
|
+
import React, { useContext, useMemo } from 'react';
|
|
11
|
+
import { useStyle } from "./style";
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* 获取配置区域 DOM Item
|
|
15
|
+
*
|
|
16
|
+
* @param setting 配置项
|
|
17
|
+
*/
|
|
18
|
+
function getSettingItem(setting) {
|
|
19
|
+
if ( /*#__PURE__*/React.isValidElement(setting)) {
|
|
20
|
+
return setting;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
if (setting) {
|
|
24
|
+
var settingConfig = setting;
|
|
25
|
+
var icon = settingConfig.icon,
|
|
26
|
+
tooltip = settingConfig.tooltip,
|
|
27
|
+
_onClick = settingConfig.onClick,
|
|
28
|
+
key = settingConfig.key;
|
|
29
|
+
|
|
30
|
+
if (icon && tooltip) {
|
|
31
|
+
return /*#__PURE__*/React.createElement(Tooltip, {
|
|
32
|
+
title: tooltip
|
|
33
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
34
|
+
key: key,
|
|
35
|
+
onClick: function onClick() {
|
|
36
|
+
if (_onClick) {
|
|
37
|
+
_onClick(key);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}, icon));
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
return icon;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
return null;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
var ListToolBar = function ListToolBar(_ref) {
|
|
50
|
+
var customizePrefixCls = _ref.prefixCls,
|
|
51
|
+
title = _ref.title,
|
|
52
|
+
subTitle = _ref.subTitle,
|
|
53
|
+
tooltip = _ref.tooltip,
|
|
54
|
+
className = _ref.className,
|
|
55
|
+
style = _ref.style,
|
|
56
|
+
_ref$actions = _ref.actions,
|
|
57
|
+
actions = _ref$actions === void 0 ? [] : _ref$actions,
|
|
58
|
+
_ref$settings = _ref.settings,
|
|
59
|
+
settings = _ref$settings === void 0 ? [] : _ref$settings;
|
|
60
|
+
|
|
61
|
+
var _useContext = useContext(ConfigProvider.ConfigContext),
|
|
62
|
+
getPrefixCls = _useContext.getPrefixCls;
|
|
63
|
+
|
|
64
|
+
var prefixCls = getPrefixCls('pro-table-list-toolbar', customizePrefixCls);
|
|
65
|
+
|
|
66
|
+
var _useStyle = useStyle(prefixCls),
|
|
67
|
+
hashId = _useStyle.hashId;
|
|
68
|
+
/** 有没有 title,需要结合多个场景判断 */
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
var hasTitle = useMemo(function () {
|
|
72
|
+
return title || subTitle || tooltip;
|
|
73
|
+
}, [subTitle, title, tooltip]);
|
|
74
|
+
/** 没有 key 的时候帮忙加一下 key 不加的话很烦人 */
|
|
75
|
+
|
|
76
|
+
var actionDom = useMemo(function () {
|
|
77
|
+
if (!Array.isArray(actions)) {
|
|
78
|
+
return actions;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
if (actions.length < 1) {
|
|
82
|
+
return null;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
86
|
+
style: {
|
|
87
|
+
display: 'flex',
|
|
88
|
+
alignItems: 'center',
|
|
89
|
+
gap: 8
|
|
90
|
+
}
|
|
91
|
+
}, actions.map(function (action, index) {
|
|
92
|
+
if (! /*#__PURE__*/React.isValidElement(action)) {
|
|
93
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
94
|
+
return /*#__PURE__*/React.createElement(React.Fragment, {
|
|
95
|
+
key: index
|
|
96
|
+
}, action);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
return /*#__PURE__*/React.cloneElement(action, _objectSpread({
|
|
100
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
101
|
+
key: index
|
|
102
|
+
}, action === null || action === void 0 ? void 0 : action.props));
|
|
103
|
+
}));
|
|
104
|
+
}, [actions]);
|
|
105
|
+
var hasRight = useMemo(function () {
|
|
106
|
+
return hasTitle || actionDom || (settings === null || settings === void 0 ? void 0 : settings.length);
|
|
107
|
+
}, [actionDom, hasTitle, settings === null || settings === void 0 ? void 0 : settings.length]);
|
|
108
|
+
var hasLeft = useMemo(function () {
|
|
109
|
+
return tooltip || title || subTitle;
|
|
110
|
+
}, [hasTitle, subTitle, title, tooltip]);
|
|
111
|
+
var leftTitleDom = useMemo(function () {
|
|
112
|
+
// 保留dom是为了占位,不然 right 就变到左边了
|
|
113
|
+
if (!hasLeft && hasRight) {
|
|
114
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
115
|
+
className: "".concat(prefixCls, "-left ").concat(hashId)
|
|
116
|
+
});
|
|
117
|
+
} // 减少 space 的dom,渲染的时候能节省点性能
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
if (hasTitle) {
|
|
121
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
122
|
+
className: "".concat(prefixCls, "-left ").concat(hashId)
|
|
123
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
124
|
+
className: "".concat(prefixCls, "-title ").concat(hashId)
|
|
125
|
+
}, /*#__PURE__*/React.createElement(LabelIconTip, {
|
|
126
|
+
tooltip: tooltip,
|
|
127
|
+
label: title,
|
|
128
|
+
subTitle: subTitle
|
|
129
|
+
})));
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
133
|
+
className: "".concat(prefixCls, "-left ").concat(hashId)
|
|
134
|
+
}, hasTitle && /*#__PURE__*/React.createElement("div", {
|
|
135
|
+
className: "".concat(prefixCls, "-title ").concat(hashId)
|
|
136
|
+
}, /*#__PURE__*/React.createElement(LabelIconTip, {
|
|
137
|
+
tooltip: tooltip,
|
|
138
|
+
label: title,
|
|
139
|
+
subTitle: subTitle
|
|
140
|
+
})));
|
|
141
|
+
}, [hasLeft, hasRight, hasTitle, hashId, prefixCls, subTitle, title, tooltip]);
|
|
142
|
+
var rightTitleDom = useMemo(function () {
|
|
143
|
+
if (!hasRight) return null;
|
|
144
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
145
|
+
className: "".concat(prefixCls, "-right ").concat(hashId),
|
|
146
|
+
style: {
|
|
147
|
+
alignItems: 'center'
|
|
148
|
+
}
|
|
149
|
+
}, actionDom, settings !== null && settings !== void 0 && settings.length ? /*#__PURE__*/React.createElement("div", {
|
|
150
|
+
className: "".concat(prefixCls, "-setting-items ").concat(hashId)
|
|
151
|
+
}, settings.map(function (setting, index) {
|
|
152
|
+
var settingItem = getSettingItem(setting);
|
|
153
|
+
return (
|
|
154
|
+
/*#__PURE__*/
|
|
155
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
156
|
+
React.createElement("div", {
|
|
157
|
+
key: index,
|
|
158
|
+
className: "".concat(prefixCls, "-setting-item ").concat(hashId)
|
|
159
|
+
}, settingItem)
|
|
160
|
+
);
|
|
161
|
+
})) : null);
|
|
162
|
+
}, [hasRight, prefixCls, hashId, hasTitle, actionDom, settings]);
|
|
163
|
+
var titleNode = useMemo(function () {
|
|
164
|
+
if (!hasRight && !hasLeft) return null;
|
|
165
|
+
var containerClassName = classNames("".concat(prefixCls, "-container"), hashId, {});
|
|
166
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
167
|
+
className: containerClassName
|
|
168
|
+
}, leftTitleDom, rightTitleDom);
|
|
169
|
+
}, [hasLeft, hasRight, hashId, leftTitleDom, prefixCls, rightTitleDom]);
|
|
170
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
171
|
+
style: style,
|
|
172
|
+
className: classNames(prefixCls, hashId, className)
|
|
173
|
+
}, titleNode);
|
|
174
|
+
};
|
|
175
|
+
|
|
176
|
+
export default ListToolBar;
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
2
|
+
|
|
3
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
4
|
+
|
|
5
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
6
|
+
|
|
7
|
+
import { useStyle as useAntdStyle } from '@ant-design/pro-provider';
|
|
8
|
+
|
|
9
|
+
var genProListStyle = function genProListStyle(token) {
|
|
10
|
+
var _token$componentCls;
|
|
11
|
+
|
|
12
|
+
return _defineProperty({}, token.componentCls, (_token$componentCls = {
|
|
13
|
+
lineHeight: '1',
|
|
14
|
+
'&-container': {
|
|
15
|
+
display: 'flex',
|
|
16
|
+
justifyContent: 'space-between',
|
|
17
|
+
paddingBlock: 8,
|
|
18
|
+
//token.padding,
|
|
19
|
+
paddingInline: 0,
|
|
20
|
+
'&-mobile': {
|
|
21
|
+
flexDirection: 'column'
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
'&-title': {
|
|
25
|
+
display: 'flex',
|
|
26
|
+
alignItems: 'center',
|
|
27
|
+
justifyContent: 'flex-start',
|
|
28
|
+
color: token.colorTextHeading,
|
|
29
|
+
fontWeight: '500',
|
|
30
|
+
fontSize: token.fontSizeLG
|
|
31
|
+
},
|
|
32
|
+
'&-search:not(:last-child)': {
|
|
33
|
+
display: 'flex',
|
|
34
|
+
alignItems: 'center',
|
|
35
|
+
justifyContent: 'flex-start'
|
|
36
|
+
},
|
|
37
|
+
'&-setting-item': {
|
|
38
|
+
marginBlock: 0,
|
|
39
|
+
marginInline: 4,
|
|
40
|
+
color: token.colorIconHover,
|
|
41
|
+
fontSize: token.fontSizeLG,
|
|
42
|
+
cursor: 'pointer',
|
|
43
|
+
'> span': {
|
|
44
|
+
display: 'block',
|
|
45
|
+
width: '100%',
|
|
46
|
+
height: '100%'
|
|
47
|
+
},
|
|
48
|
+
'&:hover': {
|
|
49
|
+
color: token.colorPrimary
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
'&-left': _defineProperty({
|
|
53
|
+
display: 'flex',
|
|
54
|
+
flexWrap: 'wrap',
|
|
55
|
+
alignItems: 'center',
|
|
56
|
+
gap: 8,
|
|
57
|
+
justifyContent: 'flex-start',
|
|
58
|
+
maxWidth: 'calc(100% - 200px)'
|
|
59
|
+
}, "".concat(token.antCls, "-tabs"), {
|
|
60
|
+
width: '100%'
|
|
61
|
+
}),
|
|
62
|
+
'&-right': {
|
|
63
|
+
display: 'flex',
|
|
64
|
+
flexWrap: 'wrap',
|
|
65
|
+
justifyContent: 'flex-end',
|
|
66
|
+
gap: 8
|
|
67
|
+
},
|
|
68
|
+
'&-extra-line': {
|
|
69
|
+
marginBlockEnd: token.margin
|
|
70
|
+
},
|
|
71
|
+
'&-setting-items': {
|
|
72
|
+
display: 'flex',
|
|
73
|
+
gap: 8,
|
|
74
|
+
lineHeight: '32px',
|
|
75
|
+
alignItems: 'center'
|
|
76
|
+
},
|
|
77
|
+
'&-filter': _defineProperty({
|
|
78
|
+
'&:not(:last-child)': {
|
|
79
|
+
marginInlineEnd: token.margin
|
|
80
|
+
},
|
|
81
|
+
display: 'flex',
|
|
82
|
+
alignItems: 'center'
|
|
83
|
+
}, "div.$".concat(token.antCls, "-pro-table-search"), {
|
|
84
|
+
marginBlock: 0,
|
|
85
|
+
marginInline: 0,
|
|
86
|
+
paddingBlock: 0,
|
|
87
|
+
paddingInline: 0
|
|
88
|
+
}),
|
|
89
|
+
'&-inline-menu-item': {
|
|
90
|
+
display: 'inline-block',
|
|
91
|
+
marginInlineEnd: token.marginLG,
|
|
92
|
+
cursor: 'pointer',
|
|
93
|
+
opacity: '0.75',
|
|
94
|
+
'&-active': {
|
|
95
|
+
fontWeight: 'bold',
|
|
96
|
+
opacity: '1'
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}, _defineProperty(_token$componentCls, "".concat(token.antCls, "-tabs-top > ").concat(token.antCls, "-tabs-nav"), _defineProperty({
|
|
100
|
+
marginBlockEnd: 0,
|
|
101
|
+
'&::before': {
|
|
102
|
+
borderBlockEnd: 0
|
|
103
|
+
}
|
|
104
|
+
}, "".concat(token.antCls, "-tabs-nav-list"), {
|
|
105
|
+
marginBlockStart: 0,
|
|
106
|
+
'${token.antCls}-tabs-tab': {
|
|
107
|
+
paddingBlockStart: 0
|
|
108
|
+
}
|
|
109
|
+
})), _defineProperty(_token$componentCls, '&-dropdownmenu-label', {
|
|
110
|
+
fontWeight: 'bold',
|
|
111
|
+
fontSize: token.fontSizeIcon,
|
|
112
|
+
textAlign: 'center',
|
|
113
|
+
cursor: 'pointer'
|
|
114
|
+
}), _defineProperty(_token$componentCls, '@media (max-width: 768px)', _defineProperty({}, token.componentCls, {
|
|
115
|
+
'&-container': {
|
|
116
|
+
display: 'flex',
|
|
117
|
+
flexWrap: 'wrap',
|
|
118
|
+
flexDirection: 'column'
|
|
119
|
+
},
|
|
120
|
+
'&-left': {
|
|
121
|
+
marginBlockEnd: '16px',
|
|
122
|
+
maxWidth: '100%'
|
|
123
|
+
}
|
|
124
|
+
})), _token$componentCls));
|
|
125
|
+
};
|
|
126
|
+
|
|
127
|
+
export function useStyle(prefixCls) {
|
|
128
|
+
return useAntdStyle('ProTableListToolBar', function (token) {
|
|
129
|
+
var proListToken = _objectSpread(_objectSpread({}, token), {}, {
|
|
130
|
+
componentCls: ".".concat(prefixCls)
|
|
131
|
+
});
|
|
132
|
+
|
|
133
|
+
return [genProListStyle(proListToken)];
|
|
134
|
+
});
|
|
135
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ValueFormatterParams } from 'ag-grid-community';
|
|
2
|
+
declare const convertFilterModel: (filterModel: any) => string;
|
|
3
|
+
declare const convertSortModel: (sortModel: any[]) => string;
|
|
4
|
+
declare const dateValueFormatter: (params: ValueFormatterParams) => string;
|
|
5
|
+
declare const dateTimeValueFormatter: (params: ValueFormatterParams) => string;
|
|
6
|
+
declare const flatten: (arr: any[], parentPropName: any, parentref?: any[]) => any;
|
|
7
|
+
declare const toTree: (data: any[]) => any[];
|
|
8
|
+
declare const flattenTreeDeep: (treeData: any[], childrenName?: string) => any[];
|
|
9
|
+
export { dateValueFormatter, dateTimeValueFormatter, convertFilterModel, convertSortModel, flattenTreeDeep, toTree, flatten };
|