@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,153 @@
|
|
|
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
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
8
|
+
|
|
9
|
+
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."); }
|
|
10
|
+
|
|
11
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
12
|
+
|
|
13
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
14
|
+
|
|
15
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
16
|
+
|
|
17
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
18
|
+
|
|
19
|
+
import dayjs from 'dayjs';
|
|
20
|
+
|
|
21
|
+
var getFilter = function getFilter(objectKey, value) {
|
|
22
|
+
if (typeof value === 'string') {
|
|
23
|
+
return "".concat(objectKey, " =* ").concat(value);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
if (typeof value === 'number') {
|
|
27
|
+
return "".concat(objectKey, " = ").concat(value);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
if (typeof value === 'boolean') {
|
|
31
|
+
return "".concat(objectKey, " = ").concat(value);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
if (value instanceof Array) {
|
|
35
|
+
return "".concat(objectKey, " >= ").concat(dayjs(value[0]).format("YYYY-MM-DD"), " ,") + "".concat(objectKey, " <= ").concat(dayjs(value[1]).add(1, 'days').format("YYYY-MM-DD"));
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
return getObjectFilter(value, objectKey);
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
var getObjectFilter = function getObjectFilter(obj, objKey) {
|
|
42
|
+
var key = Object.keys(obj)[0];
|
|
43
|
+
var value = obj[key];
|
|
44
|
+
var objectKey = "".concat(objKey, ".").concat(key);
|
|
45
|
+
|
|
46
|
+
if (typeof value === 'number') {
|
|
47
|
+
return "".concat(objectKey, " = ").concat(value);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
if (typeof value === 'string') {
|
|
51
|
+
return "".concat(objectKey, " =* ").concat(value);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
if (typeof value === 'boolean') {
|
|
55
|
+
return "".concat(objectKey, " = ").concat(value);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
if (value instanceof Array) {
|
|
59
|
+
return "".concat(objectKey, " >= ").concat(dayjs(value[0]).format("YYYY-MM-DD"), " ,") + "".concat(objectKey, " <= ").concat(dayjs(value[1]).add(1, 'days').format("YYYY-MM-DD"));
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
return getObjectFilter(value, "".concat(objKey, ".").concat(key));
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
var convertFilterModel = function convertFilterModel(filterModel) {
|
|
66
|
+
var items = [];
|
|
67
|
+
Object.keys(filterModel).map(function (key) {
|
|
68
|
+
var value = filterModel[key];
|
|
69
|
+
|
|
70
|
+
if (value && value != "") {
|
|
71
|
+
items.push(getFilter(key, value));
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
return items.join(",");
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
var convertSortModel = function convertSortModel(sortModel) {
|
|
78
|
+
var sorter = sortModel.map(function (sort) {
|
|
79
|
+
var key = sort.colId;
|
|
80
|
+
var value = sort.sort;
|
|
81
|
+
return "".concat(key.replace(',', '.'), " ").concat(value == 'desc' ? 'desc' : 'asc');
|
|
82
|
+
}).join(' , ');
|
|
83
|
+
return sorter;
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
var dateValueFormatter = function dateValueFormatter(params) {
|
|
87
|
+
return params.value ? dayjs(params.value).format("YYYY-MM-DD") : "";
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
var dateTimeValueFormatter = function dateTimeValueFormatter(params) {
|
|
91
|
+
return params.value ? dayjs(params.value).format("YYYY-MM-DD HH:mm:ss") : "";
|
|
92
|
+
}; //@ts-ignore
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
var flatten = function flatten(arr, parentPropName, parentref) {
|
|
96
|
+
var data = arr ? arr.reduce(function (result, item) {
|
|
97
|
+
return [].concat(_toConsumableArray(result), [_objectSpread(_objectSpread({}, item), {}, {
|
|
98
|
+
hierarchy: parentref ? [].concat(_toConsumableArray(parentref), [item[parentPropName]]) : [item[parentPropName]]
|
|
99
|
+
})], _toConsumableArray(flatten(item.children, parentPropName, parentref ? [].concat(_toConsumableArray(parentref), [item[parentPropName]]) : [item[parentPropName]])));
|
|
100
|
+
}, []) : [];
|
|
101
|
+
return data;
|
|
102
|
+
};
|
|
103
|
+
|
|
104
|
+
var toTree = function toTree(data) {
|
|
105
|
+
// 删除 所有 children,以防止多次调用
|
|
106
|
+
data.forEach(function (item) {
|
|
107
|
+
delete item.children;
|
|
108
|
+
}); // 将数据存储为 以 id 为 KEY 的 map 索引数据列
|
|
109
|
+
|
|
110
|
+
var map = {};
|
|
111
|
+
data.forEach(function (item) {
|
|
112
|
+
map[item.id] = item;
|
|
113
|
+
});
|
|
114
|
+
var val = [];
|
|
115
|
+
data.forEach(function (item) {
|
|
116
|
+
// 以当前遍历项,的pid,去map对象中找到索引的id
|
|
117
|
+
var parent = map[item.parentId]; // 好绕啊,如果找到索引,那么说明此项不在顶级当中,那么需要把此项添加到,他对应的父级中
|
|
118
|
+
|
|
119
|
+
if (parent) {
|
|
120
|
+
(parent.children || (parent.children = [])).push(item);
|
|
121
|
+
} else {
|
|
122
|
+
//如果没有在map中找到对应的索引ID,那么直接把 当前的item添加到 val结果集中,作为顶级
|
|
123
|
+
val.push(item);
|
|
124
|
+
}
|
|
125
|
+
});
|
|
126
|
+
return val;
|
|
127
|
+
};
|
|
128
|
+
|
|
129
|
+
var flattenTreeDeep = function flattenTreeDeep(treeData) {
|
|
130
|
+
var childrenName = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'childrens';
|
|
131
|
+
|
|
132
|
+
var flattenData = function flattenData(treeData, res, parentId) {
|
|
133
|
+
var childrenName = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 'childrens';
|
|
134
|
+
treeData.forEach(function (item) {
|
|
135
|
+
res.push(_objectSpread(_objectSpread({}, item), {}, {
|
|
136
|
+
parentId: parentId
|
|
137
|
+
}));
|
|
138
|
+
|
|
139
|
+
if (item[childrenName] && item[childrenName].length !== 0) {
|
|
140
|
+
flattenData(item[childrenName], res, item.id);
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
delete item[childrenName];
|
|
144
|
+
});
|
|
145
|
+
return res;
|
|
146
|
+
};
|
|
147
|
+
|
|
148
|
+
var res = [];
|
|
149
|
+
flattenData(treeData, res, null, childrenName);
|
|
150
|
+
return res;
|
|
151
|
+
};
|
|
152
|
+
|
|
153
|
+
export { dateValueFormatter, dateTimeValueFormatter, convertFilterModel, convertSortModel, flattenTreeDeep, toTree, flatten };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { AgGridReactProps, AgGridColumnProps } from 'ag-grid-react';
|
|
3
|
+
import { ArrayBaseMixins } from '@formily/antd-v5';
|
|
4
|
+
declare type ComposedArrayTable = React.FC<React.PropsWithChildren<AgGridReactProps>> & ArrayBaseMixins & {
|
|
5
|
+
Column?: React.FC<React.PropsWithChildren<AgGridColumnProps>>;
|
|
6
|
+
};
|
|
7
|
+
export declare const ArrayTable: ComposedArrayTable;
|
|
8
|
+
export default ArrayTable;
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
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); }
|
|
2
|
+
|
|
3
|
+
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; }
|
|
4
|
+
|
|
5
|
+
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; }
|
|
6
|
+
|
|
7
|
+
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; }
|
|
8
|
+
|
|
9
|
+
import React, { Fragment, useRef } from 'react';
|
|
10
|
+
import { AgGridReact } from 'ag-grid-react';
|
|
11
|
+
import { useField, observer, useFieldSchema, RecursionField } from '@formily/react';
|
|
12
|
+
import { isArr } from '@formily/shared';
|
|
13
|
+
import { ArrayBase } from '@formily/antd-v5';
|
|
14
|
+
import uniqueId from 'lodash/uniqueId';
|
|
15
|
+
|
|
16
|
+
var isColumnComponent = function isColumnComponent(schema) {
|
|
17
|
+
var _schema$xComponent;
|
|
18
|
+
|
|
19
|
+
return ((_schema$xComponent = schema['x-component']) === null || _schema$xComponent === void 0 ? void 0 : _schema$xComponent.indexOf('Column')) > -1;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
var isOperationsComponent = function isOperationsComponent(schema) {
|
|
23
|
+
var _schema$xComponent2;
|
|
24
|
+
|
|
25
|
+
return ((_schema$xComponent2 = schema['x-component']) === null || _schema$xComponent2 === void 0 ? void 0 : _schema$xComponent2.indexOf('Operations')) > -1;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
var isAdditionComponent = function isAdditionComponent(schema) {
|
|
29
|
+
var _schema$xComponent3;
|
|
30
|
+
|
|
31
|
+
return ((_schema$xComponent3 = schema['x-component']) === null || _schema$xComponent3 === void 0 ? void 0 : _schema$xComponent3.indexOf('Addition')) > -1;
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
var useArrayTableSources = function useArrayTableSources() {
|
|
35
|
+
var arrayField = useField();
|
|
36
|
+
var schema = useFieldSchema();
|
|
37
|
+
|
|
38
|
+
var parseSources = function parseSources(schema) {
|
|
39
|
+
if (isColumnComponent(schema) || isOperationsComponent(schema) || isAdditionComponent(schema)) {
|
|
40
|
+
var _schema$xComponentP, _schema$xComponentP2, _field$component;
|
|
41
|
+
|
|
42
|
+
if (!((_schema$xComponentP = schema['x-component-props']) !== null && _schema$xComponentP !== void 0 && _schema$xComponentP['dataIndex']) && !schema['name']) return [];
|
|
43
|
+
var name = ((_schema$xComponentP2 = schema['x-component-props']) === null || _schema$xComponentP2 === void 0 ? void 0 : _schema$xComponentP2['dataIndex']) || schema['name'];
|
|
44
|
+
var field = arrayField.query(arrayField.address.concat(name)).take();
|
|
45
|
+
var columnProps = (field === null || field === void 0 ? void 0 : (_field$component = field.component) === null || _field$component === void 0 ? void 0 : _field$component[1]) || schema['x-component-props'] || {};
|
|
46
|
+
var display = (field === null || field === void 0 ? void 0 : field.display) || schema['x-display'];
|
|
47
|
+
return [{
|
|
48
|
+
name: name,
|
|
49
|
+
display: display,
|
|
50
|
+
field: field,
|
|
51
|
+
schema: schema,
|
|
52
|
+
columnProps: columnProps
|
|
53
|
+
}];
|
|
54
|
+
} else if (schema.properties) {
|
|
55
|
+
return schema.reduceProperties(function (buf, schema) {
|
|
56
|
+
return buf.concat(parseSources(schema));
|
|
57
|
+
}, []);
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
var parseArrayItems = function parseArrayItems(schema) {
|
|
62
|
+
if (!schema) return [];
|
|
63
|
+
var sources = [];
|
|
64
|
+
var items = isArr(schema) ? schema : [schema];
|
|
65
|
+
return items.reduce(function (columns, schema) {
|
|
66
|
+
var item = parseSources(schema);
|
|
67
|
+
|
|
68
|
+
if (item) {
|
|
69
|
+
return columns.concat(item);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
return columns;
|
|
73
|
+
}, sources);
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
if (!schema) throw new Error('can not found schema object');
|
|
77
|
+
return parseArrayItems(schema.items);
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
var useArrayTableColumns = function useArrayTableColumns(field, sources) {
|
|
81
|
+
return sources.reduce(function (buf, _ref, key) {
|
|
82
|
+
var name = _ref.name,
|
|
83
|
+
columnProps = _ref.columnProps,
|
|
84
|
+
schema = _ref.schema,
|
|
85
|
+
display = _ref.display;
|
|
86
|
+
if (display !== 'visible') return buf;
|
|
87
|
+
if (!isColumnComponent(schema)) return buf;
|
|
88
|
+
return buf.concat(_objectSpread(_objectSpread({}, columnProps), {}, {
|
|
89
|
+
field: name,
|
|
90
|
+
cellRenderer: function cellRenderer(_ref2) {
|
|
91
|
+
var _field$value;
|
|
92
|
+
|
|
93
|
+
var value = _ref2.value,
|
|
94
|
+
record = _ref2.data;
|
|
95
|
+
var index = field === null || field === void 0 ? void 0 : (_field$value = field.value) === null || _field$value === void 0 ? void 0 : _field$value.indexOf(record);
|
|
96
|
+
var children = /*#__PURE__*/React.createElement(ArrayBase.Item, {
|
|
97
|
+
index: index,
|
|
98
|
+
record: function record() {
|
|
99
|
+
var _field$value2;
|
|
100
|
+
|
|
101
|
+
return field === null || field === void 0 ? void 0 : (_field$value2 = field.value) === null || _field$value2 === void 0 ? void 0 : _field$value2[index];
|
|
102
|
+
}
|
|
103
|
+
}, /*#__PURE__*/React.createElement(RecursionField, {
|
|
104
|
+
schema: schema,
|
|
105
|
+
name: index,
|
|
106
|
+
onlyRenderProperties: true
|
|
107
|
+
}));
|
|
108
|
+
return children;
|
|
109
|
+
}
|
|
110
|
+
}));
|
|
111
|
+
}, []);
|
|
112
|
+
};
|
|
113
|
+
|
|
114
|
+
var useAddition = function useAddition() {
|
|
115
|
+
var schema = useFieldSchema();
|
|
116
|
+
return schema.reduceProperties(function (addition, schema, key) {
|
|
117
|
+
if (isAdditionComponent(schema)) {
|
|
118
|
+
return /*#__PURE__*/React.createElement(RecursionField, {
|
|
119
|
+
schema: schema,
|
|
120
|
+
name: key
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
return addition;
|
|
125
|
+
}, null);
|
|
126
|
+
};
|
|
127
|
+
|
|
128
|
+
export var ArrayTable = observer(function (props) {
|
|
129
|
+
var ref = useRef();
|
|
130
|
+
var field = useField();
|
|
131
|
+
var dataSource = Array.isArray(field.value) ? field.value.slice() : [];
|
|
132
|
+
var sources = useArrayTableSources();
|
|
133
|
+
var columns = useArrayTableColumns(field, sources);
|
|
134
|
+
var addition = useAddition();
|
|
135
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
136
|
+
ref: ref,
|
|
137
|
+
style: {
|
|
138
|
+
height: 600
|
|
139
|
+
}
|
|
140
|
+
}, /*#__PURE__*/React.createElement(ArrayBase, null, /*#__PURE__*/React.createElement(AgGridReact, {
|
|
141
|
+
className: "ag-theme-alpine",
|
|
142
|
+
getRowId: function getRowId(_ref3) {
|
|
143
|
+
var data = _ref3.data;
|
|
144
|
+
return data._id;
|
|
145
|
+
},
|
|
146
|
+
pagination: false,
|
|
147
|
+
columnDefs: columns,
|
|
148
|
+
rowData: dataSource
|
|
149
|
+
}), sources.map(function (column, key) {
|
|
150
|
+
//专门用来承接对Column的状态管理
|
|
151
|
+
if (!isColumnComponent(column.schema)) return;
|
|
152
|
+
return /*#__PURE__*/React.createElement(RecursionField, {
|
|
153
|
+
name: column.name,
|
|
154
|
+
schema: column.schema,
|
|
155
|
+
onlyRenderSelf: true,
|
|
156
|
+
key: key
|
|
157
|
+
});
|
|
158
|
+
}), addition));
|
|
159
|
+
});
|
|
160
|
+
ArrayTable.displayName = 'ArrayTable';
|
|
161
|
+
|
|
162
|
+
ArrayTable.Column = function () {
|
|
163
|
+
return /*#__PURE__*/React.createElement(Fragment, null);
|
|
164
|
+
};
|
|
165
|
+
|
|
166
|
+
ArrayBase.mixin(ArrayTable);
|
|
167
|
+
|
|
168
|
+
var Addition = function Addition(props) {
|
|
169
|
+
return /*#__PURE__*/React.createElement(ArrayBase.Addition, _extends({}, props, {
|
|
170
|
+
defaultValue: _objectSpread(_objectSpread({}, props.defaultValue), {}, {
|
|
171
|
+
_id: uniqueId()
|
|
172
|
+
})
|
|
173
|
+
}));
|
|
174
|
+
};
|
|
175
|
+
|
|
176
|
+
ArrayTable.Addition = Addition;
|
|
177
|
+
export default ArrayTable;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React, { useEffect } from 'react';
|
|
2
|
+
import { ArrayBase } from '@formily/antd-v5';
|
|
3
|
+
export default (function (props) {
|
|
4
|
+
var onChange = props.onChange;
|
|
5
|
+
var index = ArrayBase.useIndex();
|
|
6
|
+
useEffect(function () {
|
|
7
|
+
onChange(index + 1);
|
|
8
|
+
}, [index]);
|
|
9
|
+
return /*#__PURE__*/React.createElement("span", props, "#", index + 1, ".");
|
|
10
|
+
});
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export default (function () {
|
|
2
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("input", {
|
|
3
|
+
className: "modal-state",
|
|
4
|
+
id: "modal-2",
|
|
5
|
+
type: "checkbox"
|
|
6
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
7
|
+
className: "modal"
|
|
8
|
+
}, /*#__PURE__*/React.createElement("label", {
|
|
9
|
+
className: "modal__bg",
|
|
10
|
+
for: "modal-2"
|
|
11
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
12
|
+
className: "modal__inner"
|
|
13
|
+
}, /*#__PURE__*/React.createElement("label", {
|
|
14
|
+
className: "modal__close",
|
|
15
|
+
for: "modal-2"
|
|
16
|
+
}))));
|
|
17
|
+
});
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './style';
|
|
3
|
+
export interface ToolBarPropsIF {
|
|
4
|
+
extraLeft?: React.ReactNode;
|
|
5
|
+
extraRight?: React.ReactNode;
|
|
6
|
+
style?: React.HTMLAttributes<HTMLDivElement>;
|
|
7
|
+
className?: string;
|
|
8
|
+
fixed?: boolean;
|
|
9
|
+
}
|
|
10
|
+
declare const Toolbar: (props: ToolBarPropsIF) => JSX.Element;
|
|
11
|
+
export default Toolbar;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import classNames from 'classnames';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import "./style";
|
|
4
|
+
var prefixCls = 'react-dashboard-toolbar';
|
|
5
|
+
|
|
6
|
+
var Toolbar = function Toolbar(props) {
|
|
7
|
+
var extraLeft = props.extraLeft,
|
|
8
|
+
extraRight = props.extraRight,
|
|
9
|
+
fixed = props.fixed,
|
|
10
|
+
className = props.className,
|
|
11
|
+
style = props.style;
|
|
12
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
13
|
+
className: classNames(prefixCls, fixed ? "".concat(prefixCls, "-fixed") : '', className),
|
|
14
|
+
style: style
|
|
15
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
16
|
+
className: "".concat(prefixCls, "-left")
|
|
17
|
+
}, extraLeft), /*#__PURE__*/React.createElement("div", {
|
|
18
|
+
className: "".concat(prefixCls, "-space")
|
|
19
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
20
|
+
className: "".concat(prefixCls, "-right")
|
|
21
|
+
}, extraRight));
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export default Toolbar;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import './index.less';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "./index.less";
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
.react-dashboard-toolbar {
|
|
2
|
+
display: flex;
|
|
3
|
+
align-items: center;
|
|
4
|
+
justify-content: space-between;
|
|
5
|
+
// width: 100%;
|
|
6
|
+
padding: 0 10px;
|
|
7
|
+
padding-bottom: 10px;
|
|
8
|
+
// background: var(--component-background);
|
|
9
|
+
|
|
10
|
+
&:after {
|
|
11
|
+
display: block;
|
|
12
|
+
clear: both;
|
|
13
|
+
content: '';
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
&-left {
|
|
17
|
+
float: left;
|
|
18
|
+
|
|
19
|
+
button {
|
|
20
|
+
margin-right: 10px;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
&-right {
|
|
25
|
+
float: right;
|
|
26
|
+
|
|
27
|
+
button {
|
|
28
|
+
margin-left: 10px;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
&-space {
|
|
33
|
+
flex: auto;
|
|
34
|
+
height: 1px;
|
|
35
|
+
margin: 0 !important;
|
|
36
|
+
padding: 0 !important;
|
|
37
|
+
border: 0 !important;
|
|
38
|
+
-webkit-box-flex: 1;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
&-fixed {
|
|
42
|
+
position: fixed;
|
|
43
|
+
right: 0;
|
|
44
|
+
bottom: 0;
|
|
45
|
+
z-index: 9;
|
|
46
|
+
border-top: 1px solid rgba(128, 128, 128, 0.1);
|
|
47
|
+
box-shadow: 0 -1px 2px rgba(128, 128, 128, 0.03);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import type { Component, FunctionComponent, ReactElement } from 'react';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import './index.less';
|
|
4
|
+
export declare type LayoutItem = {
|
|
5
|
+
w: number;
|
|
6
|
+
h: number;
|
|
7
|
+
x: number;
|
|
8
|
+
y: number;
|
|
9
|
+
i: string;
|
|
10
|
+
minW: number;
|
|
11
|
+
maxW: number;
|
|
12
|
+
minH: number;
|
|
13
|
+
maxH: number;
|
|
14
|
+
};
|
|
15
|
+
export declare type LayoutsIF = LayoutItem[];
|
|
16
|
+
export interface WidgetIF {
|
|
17
|
+
name: string;
|
|
18
|
+
description: string;
|
|
19
|
+
tags: string[];
|
|
20
|
+
component: Component | FunctionComponent;
|
|
21
|
+
configComponent: Component | FunctionComponent | null;
|
|
22
|
+
maxLength: number;
|
|
23
|
+
snapShot: ImageBitmapSource;
|
|
24
|
+
icon: ReactElement;
|
|
25
|
+
iconBackground: string;
|
|
26
|
+
size: {
|
|
27
|
+
defaultWidth: number;
|
|
28
|
+
defaultHeight: number;
|
|
29
|
+
maxWidth: number;
|
|
30
|
+
maxHeight: number;
|
|
31
|
+
minWidth: number;
|
|
32
|
+
minHeight: number;
|
|
33
|
+
};
|
|
34
|
+
[key: string]: any;
|
|
35
|
+
}
|
|
36
|
+
export interface WidgetsIF {
|
|
37
|
+
[key: string]: WidgetIF;
|
|
38
|
+
}
|
|
39
|
+
export interface Dashboard {
|
|
40
|
+
widgets: WidgetsIF;
|
|
41
|
+
editMode?: boolean;
|
|
42
|
+
defaultLayout?: LayoutsIF;
|
|
43
|
+
widgetWrapClassName?: string;
|
|
44
|
+
widgetWrapStyle?: React.CSSProperties;
|
|
45
|
+
layout?: LayoutsIF;
|
|
46
|
+
minHeight?: number;
|
|
47
|
+
maxWidgetLength?: number;
|
|
48
|
+
toolbar?: boolean;
|
|
49
|
+
storageKey?: string;
|
|
50
|
+
onLayoutChange?: (layout: LayoutsIF) => void;
|
|
51
|
+
onReset?: (dirtyCurrentLayout: LayoutsIF, currentLayout: LayoutItem) => void;
|
|
52
|
+
onRemoveWidget?: (widget: WidgetIF, dirtyCurrentLayout: LayoutsIF, currentLayout: LayoutsIF) => void;
|
|
53
|
+
onAddWidget?: (widget: WidgetIF, dirtyCurrentLayout: LayoutsIF, currentLayout: LayoutsIF) => void;
|
|
54
|
+
onReload?: (currentLayout: LayoutsIF) => void;
|
|
55
|
+
onCancelEdit?: (dirtyCurrentLayout: LayoutsIF, currentLayout: LayoutItem) => void;
|
|
56
|
+
onEdit?: (currentLayout: LayoutsIF) => void;
|
|
57
|
+
onSave?: (currentLayout: LayoutsIF) => void;
|
|
58
|
+
onRevert?: (dirtyCurrentLayout: LayoutsIF, currentLayout: LayoutItem) => void;
|
|
59
|
+
[key: string]: any;
|
|
60
|
+
}
|
|
61
|
+
declare const Dashboard: React.ForwardRefExoticComponent<Pick<Dashboard, keyof Dashboard> & React.RefAttributes<unknown>>;
|
|
62
|
+
export default Dashboard;
|