@nokecy/qc-ui 0.1.17 → 0.1.18
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/package.json +2 -2
- package/dist/cjs/ag-grid-plus/_utils/boolSelect.d.ts +0 -4
- package/dist/cjs/ag-grid-plus/_utils/boolSelect.js +0 -61
- package/dist/cjs/ag-grid-plus/ag-gridPlus.d.ts +0 -7
- package/dist/cjs/ag-grid-plus/ag-gridPlus.js +0 -397
- package/dist/cjs/ag-grid-plus/global.scss +0 -23
- package/dist/cjs/ag-grid-plus/gridManager/index.d.ts +0 -8
- package/dist/cjs/ag-grid-plus/gridManager/index.js +0 -51
- package/dist/cjs/ag-grid-plus/index.d.ts +0 -4
- package/dist/cjs/ag-grid-plus/index.js +0 -67
- package/dist/cjs/ag-grid-plus/index.less +0 -7
- package/dist/cjs/ag-grid-plus/interface.d.ts +0 -37
- package/dist/cjs/ag-grid-plus/interface.js +0 -17
- package/dist/cjs/ag-grid-plus/queryForm/index.d.ts +0 -10
- package/dist/cjs/ag-grid-plus/queryForm/index.js +0 -222
- package/dist/cjs/ag-grid-plus/queryForm/index.less +0 -48
- package/dist/cjs/ag-grid-plus/queryForm/queryForm.d.ts +0 -3
- package/dist/cjs/ag-grid-plus/queryForm/queryForm.js +0 -112
- package/dist/cjs/ag-grid-plus/setting/index.d.ts +0 -8
- package/dist/cjs/ag-grid-plus/setting/index.js +0 -214
- package/dist/cjs/ag-grid-plus/settingItem/index.d.ts +0 -3
- package/dist/cjs/ag-grid-plus/settingItem/index.js +0 -27
- package/dist/cjs/ag-grid-plus/toolBar/index.d.ts +0 -20
- package/dist/cjs/ag-grid-plus/toolBar/index.js +0 -196
- package/dist/cjs/ag-grid-plus/toolBar/style.d.ts +0 -5
- package/dist/cjs/ag-grid-plus/toolBar/style.js +0 -142
- package/dist/cjs/ag-grid-plus/utils.d.ts +0 -9
- package/dist/cjs/ag-grid-plus/utils.js +0 -174
- package/dist/cjs/array-table/index.d.ts +0 -8
- package/dist/cjs/array-table/index.js +0 -201
- package/dist/cjs/array-table-index/index.d.ts +0 -3
- package/dist/cjs/array-table-index/index.js +0 -29
- package/dist/cjs/dashboard/dashboard/components/index.d.ts +0 -2
- package/dist/cjs/dashboard/dashboard/components/index.js +0 -15
- package/dist/cjs/dashboard/dashboard/components/modal/index.d.ts +0 -3
- package/dist/cjs/dashboard/dashboard/components/modal/index.js +0 -26
- package/dist/cjs/dashboard/dashboard/components/toolbar/index.d.ts +0 -11
- package/dist/cjs/dashboard/dashboard/components/toolbar/index.js +0 -37
- package/dist/cjs/dashboard/dashboard/components/toolbar/style/index.d.ts +0 -1
- package/dist/cjs/dashboard/dashboard/components/toolbar/style/index.js +0 -3
- package/dist/cjs/dashboard/dashboard/components/toolbar/style/index.less +0 -49
- package/dist/cjs/dashboard/dashboard/index.d.ts +0 -62
- package/dist/cjs/dashboard/dashboard/index.js +0 -607
- package/dist/cjs/dashboard/dashboard/index.less +0 -173
- package/dist/cjs/dashboard/dashboard/service.d.ts +0 -8
- package/dist/cjs/dashboard/dashboard/service.js +0 -114
- package/dist/cjs/dashboard/dashboard/utils.d.ts +0 -9
- package/dist/cjs/dashboard/dashboard/utils.js +0 -125
- package/dist/cjs/dashboard/index.d.ts +0 -3
- package/dist/cjs/dashboard/index.js +0 -30
- package/dist/cjs/dashboard/utils.d.ts +0 -24
- package/dist/cjs/dashboard/utils.js +0 -162
- package/dist/cjs/dashboard/widget/index.d.ts +0 -13
- package/dist/cjs/dashboard/widget/index.js +0 -77
- package/dist/cjs/dashboard/widget/index.less +0 -7
- package/dist/cjs/dashboard/widget/selector/index.d.ts +0 -4
- package/dist/cjs/dashboard/widget/selector/index.js +0 -274
- package/dist/cjs/dashboard/widget/selector/index.less +0 -172
- package/dist/cjs/dashboard/widget/utils.d.ts +0 -4
- package/dist/cjs/dashboard/widget/utils.js +0 -114
- package/dist/cjs/elsa/components/finishNode.d.ts +0 -0
- package/dist/cjs/elsa/components/finishNode.js +0 -1
- package/dist/cjs/elsa/components/forkNode.d.ts +0 -0
- package/dist/cjs/elsa/components/forkNode.js +0 -1
- package/dist/cjs/elsa/components/ifNode.d.ts +0 -0
- package/dist/cjs/elsa/components/ifNode.js +0 -1
- package/dist/cjs/elsa/components/joinNode.d.ts +0 -0
- package/dist/cjs/elsa/components/joinNode.js +0 -1
- package/dist/cjs/elsa/components/setNameNode.d.ts +0 -0
- package/dist/cjs/elsa/components/setNameNode.js +0 -1
- package/dist/cjs/elsa/components/startNode.d.ts +0 -3
- package/dist/cjs/elsa/components/startNode.js +0 -24
- package/dist/cjs/elsa/components/switchNode.d.ts +0 -0
- package/dist/cjs/elsa/components/switchNode.js +0 -1
- package/dist/cjs/elsa/components/timerNode.d.ts +0 -0
- package/dist/cjs/elsa/components/timerNode.js +0 -1
- package/dist/cjs/elsa/components/userTaskNode/index.d.ts +0 -7
- package/dist/cjs/elsa/components/userTaskNode/index.js +0 -50
- package/dist/cjs/elsa/components/userTaskNode/index.less +0 -0
- package/dist/cjs/elsa/components/userTaskNode/register.d.ts +0 -1
- package/dist/cjs/elsa/components/userTaskNode/register.js +0 -54
- package/dist/cjs/elsa/elsa.design.d.ts +0 -4
- package/dist/cjs/elsa/elsa.design.js +0 -123
- package/dist/cjs/elsa/index.d.ts +0 -4
- package/dist/cjs/elsa/index.js +0 -40
- package/dist/cjs/elsa/index.less +0 -21
- package/dist/cjs/extensible-grid/index.d.ts +0 -4
- package/dist/cjs/extensible-grid/index.js +0 -39
- package/dist/cjs/extensible-grid/interface.d.ts +0 -14
- package/dist/cjs/extensible-grid/interface.js +0 -5
- package/dist/cjs/index.d.ts +0 -8
- package/dist/cjs/index.js +0 -67
- package/dist/cjs/xflow/components/Wrapper.d.ts +0 -3
- package/dist/cjs/xflow/components/Wrapper.js +0 -26
- package/dist/cjs/xflow/components/XFlow.d.ts +0 -3
- package/dist/cjs/xflow/components/XFlow.js +0 -47
- package/dist/cjs/xflow/components/XFlowGraph.d.ts +0 -4
- package/dist/cjs/xflow/components/XFlowGraph.js +0 -73
- package/dist/cjs/xflow/components/graph-toolbar/index.d.ts +0 -19
- package/dist/cjs/xflow/components/graph-toolbar/index.js +0 -60
- package/dist/cjs/xflow/components/graph-toolbar/index.less +0 -11
- package/dist/cjs/xflow/components/index.d.ts +0 -3
- package/dist/cjs/xflow/components/index.js +0 -31
- package/dist/cjs/xflow/components/keyboard/index.d.ts +0 -3
- package/dist/cjs/xflow/components/keyboard/index.js +0 -40
- package/dist/cjs/xflow/components/minimap/index.d.ts +0 -3
- package/dist/cjs/xflow/components/minimap/index.js +0 -53
- package/dist/cjs/xflow/components/scroller/index.d.ts +0 -4
- package/dist/cjs/xflow/components/scroller/index.js +0 -49
- package/dist/cjs/xflow/components/selection/index.d.ts +0 -3
- package/dist/cjs/xflow/components/selection/index.js +0 -40
- package/dist/cjs/xflow/components/snapline/index.d.ts +0 -3
- package/dist/cjs/xflow/components/snapline/index.js +0 -40
- package/dist/cjs/xflow/components/transform/index.d.ts +0 -3
- package/dist/cjs/xflow/components/transform/index.js +0 -38
- package/dist/cjs/xflow/context/GraphContext.d.ts +0 -10
- package/dist/cjs/xflow/context/GraphContext.js +0 -21
- package/dist/cjs/xflow/hooks/clipboard/index.d.ts +0 -2
- package/dist/cjs/xflow/hooks/clipboard/index.js +0 -34
- package/dist/cjs/xflow/hooks/dnd/index.d.ts +0 -2
- package/dist/cjs/xflow/hooks/dnd/index.js +0 -29
- package/dist/cjs/xflow/hooks/format/index.d.ts +0 -5
- package/dist/cjs/xflow/hooks/format/index.js +0 -60
- package/dist/cjs/xflow/hooks/graph/index.d.ts +0 -1
- package/dist/cjs/xflow/hooks/graph/index.js +0 -19
- package/dist/cjs/xflow/hooks/history/index.d.ts +0 -4
- package/dist/cjs/xflow/hooks/history/index.js +0 -63
- package/dist/cjs/xflow/hooks/keyboard/index.d.ts +0 -13
- package/dist/cjs/xflow/hooks/keyboard/index.js +0 -55
- package/dist/cjs/xflow/hooks/selection/index.d.ts +0 -3
- package/dist/cjs/xflow/hooks/selection/index.js +0 -41
- package/dist/cjs/xflow/hooks/snapline/index.d.ts +0 -2
- package/dist/cjs/xflow/hooks/snapline/index.js +0 -21
- package/dist/cjs/xflow/hooks/transform/index.d.ts +0 -2
- package/dist/cjs/xflow/hooks/transform/index.js +0 -21
- package/dist/cjs/xflow/index.d.ts +0 -3
- package/dist/cjs/xflow/index.js +0 -44
- package/dist/cjs/xflow/styles/index.less +0 -0
- package/dist/cjs/xflow/types/index.d.ts +0 -19
- package/dist/cjs/xflow/types/index.js +0 -5
- package/dist/cjs/xflow/util/algorithm.d.ts +0 -1
- package/dist/cjs/xflow/util/algorithm.js +0 -10
- package/dist/cjs/xflow/util/index.d.ts +0 -2
- package/dist/cjs/xflow/util/index.js +0 -16
- package/dist/cjs/xflow/util/main.d.ts +0 -2
- package/dist/cjs/xflow/util/main.js +0 -31
- package/dist/cjs/xflow/util/model.d.ts +0 -2
- package/dist/cjs/xflow/util/model.js +0 -29
- package/dist/esm/ag-grid-plus/_utils/boolSelect.d.ts +0 -4
- package/dist/esm/ag-grid-plus/_utils/boolSelect.js +0 -48
- package/dist/esm/ag-grid-plus/ag-gridPlus.d.ts +0 -7
- package/dist/esm/ag-grid-plus/ag-gridPlus.js +0 -369
- package/dist/esm/ag-grid-plus/global.scss +0 -23
- package/dist/esm/ag-grid-plus/gridManager/index.d.ts +0 -8
- package/dist/esm/ag-grid-plus/gridManager/index.js +0 -44
- package/dist/esm/ag-grid-plus/index.d.ts +0 -4
- package/dist/esm/ag-grid-plus/index.js +0 -4
- package/dist/esm/ag-grid-plus/index.less +0 -7
- package/dist/esm/ag-grid-plus/interface.d.ts +0 -37
- package/dist/esm/ag-grid-plus/interface.js +0 -9
- package/dist/esm/ag-grid-plus/queryForm/index.d.ts +0 -10
- package/dist/esm/ag-grid-plus/queryForm/index.js +0 -200
- package/dist/esm/ag-grid-plus/queryForm/index.less +0 -48
- package/dist/esm/ag-grid-plus/queryForm/queryForm.d.ts +0 -3
- package/dist/esm/ag-grid-plus/queryForm/queryForm.js +0 -94
- package/dist/esm/ag-grid-plus/setting/index.d.ts +0 -8
- package/dist/esm/ag-grid-plus/setting/index.js +0 -196
- package/dist/esm/ag-grid-plus/settingItem/index.d.ts +0 -3
- package/dist/esm/ag-grid-plus/settingItem/index.js +0 -17
- package/dist/esm/ag-grid-plus/toolBar/index.d.ts +0 -20
- package/dist/esm/ag-grid-plus/toolBar/index.js +0 -176
- package/dist/esm/ag-grid-plus/toolBar/style.d.ts +0 -5
- package/dist/esm/ag-grid-plus/toolBar/style.js +0 -135
- package/dist/esm/ag-grid-plus/utils.d.ts +0 -9
- package/dist/esm/ag-grid-plus/utils.js +0 -153
- package/dist/esm/array-table/index.d.ts +0 -8
- package/dist/esm/array-table/index.js +0 -177
- package/dist/esm/array-table-index/index.d.ts +0 -3
- package/dist/esm/array-table-index/index.js +0 -10
- package/dist/esm/dashboard/dashboard/components/index.d.ts +0 -2
- package/dist/esm/dashboard/dashboard/components/index.js +0 -2
- package/dist/esm/dashboard/dashboard/components/modal/index.d.ts +0 -3
- package/dist/esm/dashboard/dashboard/components/modal/index.js +0 -17
- package/dist/esm/dashboard/dashboard/components/toolbar/index.d.ts +0 -11
- package/dist/esm/dashboard/dashboard/components/toolbar/index.js +0 -24
- package/dist/esm/dashboard/dashboard/components/toolbar/style/index.d.ts +0 -1
- package/dist/esm/dashboard/dashboard/components/toolbar/style/index.js +0 -1
- package/dist/esm/dashboard/dashboard/components/toolbar/style/index.less +0 -49
- package/dist/esm/dashboard/dashboard/index.d.ts +0 -62
- package/dist/esm/dashboard/dashboard/index.js +0 -574
- package/dist/esm/dashboard/dashboard/index.less +0 -173
- package/dist/esm/dashboard/dashboard/service.d.ts +0 -8
- package/dist/esm/dashboard/dashboard/service.js +0 -102
- package/dist/esm/dashboard/dashboard/utils.d.ts +0 -9
- package/dist/esm/dashboard/dashboard/utils.js +0 -106
- package/dist/esm/dashboard/index.d.ts +0 -3
- package/dist/esm/dashboard/index.js +0 -3
- package/dist/esm/dashboard/utils.d.ts +0 -24
- package/dist/esm/dashboard/utils.js +0 -142
- package/dist/esm/dashboard/widget/index.d.ts +0 -13
- package/dist/esm/dashboard/widget/index.js +0 -60
- package/dist/esm/dashboard/widget/index.less +0 -7
- package/dist/esm/dashboard/widget/selector/index.d.ts +0 -4
- package/dist/esm/dashboard/widget/selector/index.js +0 -252
- package/dist/esm/dashboard/widget/selector/index.less +0 -172
- package/dist/esm/dashboard/widget/utils.d.ts +0 -4
- package/dist/esm/dashboard/widget/utils.js +0 -87
- 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 +0 -3
- package/dist/esm/elsa/components/startNode.js +0 -14
- 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 +0 -7
- package/dist/esm/elsa/components/userTaskNode/index.js +0 -33
- package/dist/esm/elsa/components/userTaskNode/index.less +0 -0
- package/dist/esm/elsa/components/userTaskNode/register.d.ts +0 -1
- package/dist/esm/elsa/components/userTaskNode/register.js +0 -48
- package/dist/esm/elsa/elsa.design.d.ts +0 -4
- package/dist/esm/elsa/elsa.design.js +0 -105
- package/dist/esm/elsa/index.d.ts +0 -4
- package/dist/esm/elsa/index.js +0 -25
- package/dist/esm/elsa/index.less +0 -21
- package/dist/esm/extensible-grid/index.d.ts +0 -4
- package/dist/esm/extensible-grid/index.js +0 -28
- package/dist/esm/extensible-grid/interface.d.ts +0 -14
- package/dist/esm/extensible-grid/interface.js +0 -1
- package/dist/esm/index.d.ts +0 -8
- package/dist/esm/index.js +0 -8
- package/dist/esm/xflow/components/Wrapper.d.ts +0 -3
- package/dist/esm/xflow/components/Wrapper.js +0 -15
- package/dist/esm/xflow/components/XFlow.d.ts +0 -3
- package/dist/esm/xflow/components/XFlow.js +0 -32
- package/dist/esm/xflow/components/XFlowGraph.d.ts +0 -4
- package/dist/esm/xflow/components/XFlowGraph.js +0 -54
- package/dist/esm/xflow/components/graph-toolbar/index.d.ts +0 -19
- package/dist/esm/xflow/components/graph-toolbar/index.js +0 -44
- package/dist/esm/xflow/components/graph-toolbar/index.less +0 -11
- package/dist/esm/xflow/components/index.d.ts +0 -3
- package/dist/esm/xflow/components/index.js +0 -3
- package/dist/esm/xflow/components/keyboard/index.d.ts +0 -3
- package/dist/esm/xflow/components/keyboard/index.js +0 -22
- package/dist/esm/xflow/components/minimap/index.d.ts +0 -3
- package/dist/esm/xflow/components/minimap/index.js +0 -35
- package/dist/esm/xflow/components/scroller/index.d.ts +0 -4
- package/dist/esm/xflow/components/scroller/index.js +0 -28
- package/dist/esm/xflow/components/selection/index.d.ts +0 -3
- package/dist/esm/xflow/components/selection/index.js +0 -22
- package/dist/esm/xflow/components/snapline/index.d.ts +0 -3
- package/dist/esm/xflow/components/snapline/index.js +0 -22
- package/dist/esm/xflow/components/transform/index.d.ts +0 -3
- package/dist/esm/xflow/components/transform/index.js +0 -20
- package/dist/esm/xflow/context/GraphContext.d.ts +0 -10
- package/dist/esm/xflow/context/GraphContext.js +0 -9
- package/dist/esm/xflow/hooks/clipboard/index.d.ts +0 -2
- package/dist/esm/xflow/hooks/clipboard/index.js +0 -22
- package/dist/esm/xflow/hooks/dnd/index.d.ts +0 -2
- package/dist/esm/xflow/hooks/dnd/index.js +0 -17
- package/dist/esm/xflow/hooks/format/index.d.ts +0 -5
- package/dist/esm/xflow/hooks/format/index.js +0 -48
- package/dist/esm/xflow/hooks/graph/index.d.ts +0 -1
- package/dist/esm/xflow/hooks/graph/index.js +0 -8
- package/dist/esm/xflow/hooks/history/index.d.ts +0 -4
- package/dist/esm/xflow/hooks/history/index.js +0 -45
- package/dist/esm/xflow/hooks/keyboard/index.d.ts +0 -13
- package/dist/esm/xflow/hooks/keyboard/index.js +0 -40
- package/dist/esm/xflow/hooks/selection/index.d.ts +0 -3
- package/dist/esm/xflow/hooks/selection/index.js +0 -25
- package/dist/esm/xflow/hooks/snapline/index.d.ts +0 -2
- package/dist/esm/xflow/hooks/snapline/index.js +0 -9
- package/dist/esm/xflow/hooks/transform/index.d.ts +0 -2
- package/dist/esm/xflow/hooks/transform/index.js +0 -9
- package/dist/esm/xflow/index.d.ts +0 -3
- package/dist/esm/xflow/index.js +0 -3
- package/dist/esm/xflow/styles/index.less +0 -0
- package/dist/esm/xflow/types/index.d.ts +0 -19
- package/dist/esm/xflow/types/index.js +0 -1
- package/dist/esm/xflow/util/algorithm.d.ts +0 -1
- package/dist/esm/xflow/util/algorithm.js +0 -1
- package/dist/esm/xflow/util/index.d.ts +0 -2
- package/dist/esm/xflow/util/index.js +0 -2
- package/dist/esm/xflow/util/main.d.ts +0 -2
- package/dist/esm/xflow/util/main.js +0 -2
- package/dist/esm/xflow/util/model.d.ts +0 -2
- package/dist/esm/xflow/util/model.js +0 -19
- package/dist/umd/qc-ui.min.css +0 -1
- package/dist/umd/qc-ui.min.js +0 -1
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import _get from "lodash/get";
|
|
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
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
10
|
-
|
|
11
|
-
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
12
|
-
|
|
13
|
-
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); }
|
|
14
|
-
|
|
15
|
-
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; }
|
|
16
|
-
|
|
17
|
-
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
18
|
-
|
|
19
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
20
|
-
|
|
21
|
-
import classnames from 'classnames';
|
|
22
|
-
import React, { useState } from 'react';
|
|
23
|
-
import "./index.less";
|
|
24
|
-
import { ConfigBar } from "./utils";
|
|
25
|
-
|
|
26
|
-
//widget渲染器
|
|
27
|
-
var Widget = function Widget(props) {
|
|
28
|
-
var widgets = props.widgets,
|
|
29
|
-
widgetKey = props.widgetKey,
|
|
30
|
-
widgetType = props.widgetType,
|
|
31
|
-
editMode = props.editMode,
|
|
32
|
-
onDeleteWidget = props.onDeleteWidget,
|
|
33
|
-
widgetWrapClassName = props.widgetWrapClassName,
|
|
34
|
-
widgetWrapStyle = props.widgetWrapStyle;
|
|
35
|
-
|
|
36
|
-
var _useState = useState(false),
|
|
37
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
38
|
-
configShow = _useState2[0],
|
|
39
|
-
setConfigShow = _useState2[1];
|
|
40
|
-
|
|
41
|
-
var component = _get(widgets, widgetType + '.component');
|
|
42
|
-
|
|
43
|
-
var configComponent = _get(widgets, widgetType + '.configComponent');
|
|
44
|
-
|
|
45
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
46
|
-
className: classnames(widgetWrapClassName, 'react-dashboard-widget'),
|
|
47
|
-
style: widgetWrapStyle
|
|
48
|
-
}, component && /*#__PURE__*/React.createElement(component, _objectSpread({}, props)), /*#__PURE__*/React.createElement(ConfigBar, {
|
|
49
|
-
widgetKey: widgetKey,
|
|
50
|
-
editMode: editMode,
|
|
51
|
-
onDeleteWidget: onDeleteWidget,
|
|
52
|
-
setConfigShow: setConfigShow,
|
|
53
|
-
widgets: widgets
|
|
54
|
-
}), configComponent && /*#__PURE__*/React.createElement(configComponent, _objectSpread(_objectSpread({}, props), {}, {
|
|
55
|
-
visible: configShow,
|
|
56
|
-
setVisible: setConfigShow
|
|
57
|
-
})));
|
|
58
|
-
};
|
|
59
|
-
|
|
60
|
-
export default Widget;
|
|
@@ -1,252 +0,0 @@
|
|
|
1
|
-
import _get from "lodash/get";
|
|
2
|
-
import _isEmpty from "lodash/isEmpty";
|
|
3
|
-
import _cloneDeep from "lodash/cloneDeep";
|
|
4
|
-
|
|
5
|
-
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
6
|
-
|
|
7
|
-
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."); }
|
|
8
|
-
|
|
9
|
-
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
10
|
-
|
|
11
|
-
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
12
|
-
|
|
13
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
14
|
-
|
|
15
|
-
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
16
|
-
|
|
17
|
-
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); }
|
|
18
|
-
|
|
19
|
-
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; }
|
|
20
|
-
|
|
21
|
-
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
22
|
-
|
|
23
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
24
|
-
|
|
25
|
-
import { AppstoreAddOutlined, PlusOutlined, SearchOutlined } from '@ant-design/icons';
|
|
26
|
-
import { Button, Drawer, Empty, Input } from 'antd';
|
|
27
|
-
import classnames from 'classnames';
|
|
28
|
-
import React, { useCallback, useEffect, useMemo, useState } from 'react';
|
|
29
|
-
import "./index.less";
|
|
30
|
-
var Search = Input.Search;
|
|
31
|
-
|
|
32
|
-
var WidgetSelector = function WidgetSelector(props) {
|
|
33
|
-
var widgets = props.widgets,
|
|
34
|
-
currentLayout = props.currentLayout,
|
|
35
|
-
addWidget = props.addWidget,
|
|
36
|
-
_props$children = props.children,
|
|
37
|
-
children = _props$children === void 0 ? /*#__PURE__*/React.createElement(Button, {
|
|
38
|
-
size: "small",
|
|
39
|
-
type: "primary",
|
|
40
|
-
icon: /*#__PURE__*/React.createElement(PlusOutlined, null),
|
|
41
|
-
style: {
|
|
42
|
-
marginLeft: '10px'
|
|
43
|
-
}
|
|
44
|
-
}, '添加') : _props$children;
|
|
45
|
-
|
|
46
|
-
var _useState = useState(false),
|
|
47
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
48
|
-
visible = _useState2[0],
|
|
49
|
-
setVisible = _useState2[1];
|
|
50
|
-
|
|
51
|
-
var _useState3 = useState(600),
|
|
52
|
-
_useState4 = _slicedToArray(_useState3, 1),
|
|
53
|
-
width = _useState4[0];
|
|
54
|
-
|
|
55
|
-
var _useState5 = useState([]),
|
|
56
|
-
_useState6 = _slicedToArray(_useState5, 2),
|
|
57
|
-
menuData = _useState6[0],
|
|
58
|
-
setMenuData = _useState6[1];
|
|
59
|
-
|
|
60
|
-
var _useState7 = useState(''),
|
|
61
|
-
_useState8 = _slicedToArray(_useState7, 2),
|
|
62
|
-
activeMenuKey = _useState8[0],
|
|
63
|
-
setActiveMenuKey = _useState8[1];
|
|
64
|
-
|
|
65
|
-
var _useState9 = useState(''),
|
|
66
|
-
_useState10 = _slicedToArray(_useState9, 2),
|
|
67
|
-
keywords = _useState10[0],
|
|
68
|
-
setKeywords = _useState10[1]; //计算左侧菜单
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
var handleCalcMenuData = useCallback(function () {
|
|
72
|
-
var tags = [];
|
|
73
|
-
Object.keys(widgets).map(function (key) {
|
|
74
|
-
var item = widgets[key];
|
|
75
|
-
tags.push.apply(tags, _toConsumableArray(item['tags']));
|
|
76
|
-
});
|
|
77
|
-
var tempObj = {};
|
|
78
|
-
tags.map(function (item) {
|
|
79
|
-
if (tempObj[item]) {
|
|
80
|
-
tempObj[item]['count']++;
|
|
81
|
-
} else {
|
|
82
|
-
tempObj[item] = {
|
|
83
|
-
title: item,
|
|
84
|
-
count: 1
|
|
85
|
-
};
|
|
86
|
-
}
|
|
87
|
-
});
|
|
88
|
-
var menuData = [];
|
|
89
|
-
Object.keys(tempObj).map(function (key, index, arr) {
|
|
90
|
-
menuData.push(tempObj[key]);
|
|
91
|
-
});
|
|
92
|
-
setMenuData(menuData);
|
|
93
|
-
}, [widgets]); //菜单变化
|
|
94
|
-
|
|
95
|
-
var handleMenuChange = useCallback(function (item, index) {
|
|
96
|
-
setActiveMenuKey(item.title);
|
|
97
|
-
}, []); //查询
|
|
98
|
-
|
|
99
|
-
var handleSearch = useCallback(function (value) {
|
|
100
|
-
setActiveMenuKey(menuData[0].title);
|
|
101
|
-
setKeywords(value);
|
|
102
|
-
}, [menuData]);
|
|
103
|
-
useEffect(function () {
|
|
104
|
-
handleCalcMenuData();
|
|
105
|
-
}, []);
|
|
106
|
-
var finWidgets = useMemo(function () {
|
|
107
|
-
var finData = _cloneDeep(widgets);
|
|
108
|
-
|
|
109
|
-
Object.keys(finData).map(function (key) {
|
|
110
|
-
//初始化数据
|
|
111
|
-
finData[key].length = 0;
|
|
112
|
-
finData[key].visible = true; //菜单切换
|
|
113
|
-
|
|
114
|
-
if (finData[key]['tags'].indexOf(activeMenuKey) < 0 && activeMenuKey) {
|
|
115
|
-
finData[key].visible = false;
|
|
116
|
-
} //查询
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
if (finData[key]['name'].toLowerCase().indexOf(keywords.toLowerCase()) < 0 && finData[key]['description'].toLowerCase().indexOf(keywords.toLowerCase()) < 0) {
|
|
120
|
-
finData[key].visible = false;
|
|
121
|
-
}
|
|
122
|
-
});
|
|
123
|
-
console.log('finData', finData); //已添加次数
|
|
124
|
-
|
|
125
|
-
currentLayout.forEach(function (item) {
|
|
126
|
-
var _finData$key;
|
|
127
|
-
|
|
128
|
-
var key = item.i.split('-')[0];
|
|
129
|
-
console.log('item.i', item.i);
|
|
130
|
-
console.log('finData[key]', finData[key]);
|
|
131
|
-
finData[key].length = finData[key].length ? ((_finData$key = finData[key]) === null || _finData$key === void 0 ? void 0 : _finData$key.length) + 1 : 1;
|
|
132
|
-
});
|
|
133
|
-
return finData;
|
|
134
|
-
}, [currentLayout, widgets, keywords, activeMenuKey, visible]);
|
|
135
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
136
|
-
style: {
|
|
137
|
-
display: 'inline-block'
|
|
138
|
-
},
|
|
139
|
-
onClick: function onClick() {
|
|
140
|
-
setVisible(true);
|
|
141
|
-
}
|
|
142
|
-
}, children), /*#__PURE__*/React.createElement(Drawer // className="react-dashboard-widget-selector"
|
|
143
|
-
, {
|
|
144
|
-
width: width,
|
|
145
|
-
title: /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(AppstoreAddOutlined, {
|
|
146
|
-
style: {
|
|
147
|
-
margin: '0 5px'
|
|
148
|
-
}
|
|
149
|
-
}), '选择小程序'),
|
|
150
|
-
visible: visible,
|
|
151
|
-
onClose: function onClose() {
|
|
152
|
-
setVisible(false);
|
|
153
|
-
},
|
|
154
|
-
footer: null,
|
|
155
|
-
bodyStyle: {
|
|
156
|
-
padding: 0
|
|
157
|
-
},
|
|
158
|
-
zIndex: 1006
|
|
159
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
160
|
-
className: 'react-dashboard-widget-wrap'
|
|
161
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
162
|
-
className: 'react-dashboard-widget-leftBar'
|
|
163
|
-
}, /*#__PURE__*/React.createElement(Search, {
|
|
164
|
-
placeholder: '请输入小程序名称',
|
|
165
|
-
value: keywords,
|
|
166
|
-
onSearch: handleSearch,
|
|
167
|
-
onChange: function onChange(e) {
|
|
168
|
-
return handleSearch(e.target.value);
|
|
169
|
-
},
|
|
170
|
-
prefix: /*#__PURE__*/React.createElement(SearchOutlined, {
|
|
171
|
-
className: 'react-dashboard-widget-searchIcon'
|
|
172
|
-
}),
|
|
173
|
-
allowClear: true,
|
|
174
|
-
enterButton: true
|
|
175
|
-
}), /*#__PURE__*/React.createElement("div", {
|
|
176
|
-
style: {
|
|
177
|
-
marginTop: 10
|
|
178
|
-
}
|
|
179
|
-
}, menuData.map(function (item, index) {
|
|
180
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
181
|
-
className: classnames('react-dashboard-widget-item', activeMenuKey == item.title ? 'react-dashboard-widget-active' : ''),
|
|
182
|
-
key: item.title,
|
|
183
|
-
onClick: function onClick() {
|
|
184
|
-
return handleMenuChange(item, index);
|
|
185
|
-
}
|
|
186
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
187
|
-
className: 'react-dashboard-widget-name'
|
|
188
|
-
}, item['title']), /*#__PURE__*/React.createElement("div", {
|
|
189
|
-
className: 'react-dashboard-widget-Badge'
|
|
190
|
-
}, item.count));
|
|
191
|
-
}))), /*#__PURE__*/React.createElement("div", {
|
|
192
|
-
className: classnames('react-dashboard-widget-Layer'),
|
|
193
|
-
style: {
|
|
194
|
-
height: '100%',
|
|
195
|
-
overflowY: 'auto'
|
|
196
|
-
}
|
|
197
|
-
}, !_isEmpty(finWidgets) ? /*#__PURE__*/React.createElement("div", {
|
|
198
|
-
className: "react-dashboard-widget-waterfall",
|
|
199
|
-
style: {
|
|
200
|
-
columnCount: Math.ceil((width - 200) / 200)
|
|
201
|
-
}
|
|
202
|
-
}, Object.keys(finWidgets).map(function (key) {
|
|
203
|
-
var item = finWidgets[key];
|
|
204
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
205
|
-
key: key,
|
|
206
|
-
className: classnames('react-dashboard-widget-item'),
|
|
207
|
-
style: {
|
|
208
|
-
display: item.visible ? 'block' : 'none'
|
|
209
|
-
}
|
|
210
|
-
}, /*#__PURE__*/React.createElement("img", {
|
|
211
|
-
src: item['snapShot'],
|
|
212
|
-
className: 'react-dashboard-widget-shortcut'
|
|
213
|
-
}), /*#__PURE__*/React.createElement("div", {
|
|
214
|
-
className: 'react-dashboard-widget-bottombar'
|
|
215
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
216
|
-
className: 'react-dashboard-widget-iconWrap',
|
|
217
|
-
style: {
|
|
218
|
-
backgroundColor: _get(widgets, key + '.iconBackground'),
|
|
219
|
-
backgroundImage: _get(widgets, key + '.iconBackground')
|
|
220
|
-
}
|
|
221
|
-
}, item.icon), /*#__PURE__*/React.createElement("div", {
|
|
222
|
-
className: 'react-dashboard-widget-name'
|
|
223
|
-
}, item.name), /*#__PURE__*/React.createElement("div", {
|
|
224
|
-
className: 'react-dashboard-widget-description'
|
|
225
|
-
}, item.description)), /*#__PURE__*/React.createElement("div", {
|
|
226
|
-
className: 'react-dashboard-widget-mask'
|
|
227
|
-
}, item.length < item.maxLength ? /*#__PURE__*/React.createElement(Button, {
|
|
228
|
-
type: "primary",
|
|
229
|
-
shape: "circle",
|
|
230
|
-
icon: /*#__PURE__*/React.createElement(PlusOutlined, null),
|
|
231
|
-
size: "large",
|
|
232
|
-
onClick: function onClick() {
|
|
233
|
-
return addWidget(item, key);
|
|
234
|
-
}
|
|
235
|
-
}) : /*#__PURE__*/React.createElement("div", {
|
|
236
|
-
style: {
|
|
237
|
-
padding: 20,
|
|
238
|
-
color: '#fff',
|
|
239
|
-
fontWeight: 'bold'
|
|
240
|
-
}
|
|
241
|
-
}, '该小程序最多添加', item.maxLength, '个')));
|
|
242
|
-
})) : /*#__PURE__*/React.createElement("div", {
|
|
243
|
-
className: "react-dashboard-widget-emptyContent",
|
|
244
|
-
style: {
|
|
245
|
-
minHeight: 'calc(100% - 20px)'
|
|
246
|
-
}
|
|
247
|
-
}, /*#__PURE__*/React.createElement(Empty, {
|
|
248
|
-
description: /*#__PURE__*/React.createElement("span", null, '该条件下暂无小程序')
|
|
249
|
-
}))))));
|
|
250
|
-
};
|
|
251
|
-
|
|
252
|
-
export default WidgetSelector;
|
|
@@ -1,172 +0,0 @@
|
|
|
1
|
-
.react-dashboard-widget-selector{
|
|
2
|
-
position:fixed;
|
|
3
|
-
top:50%;
|
|
4
|
-
left:50%;
|
|
5
|
-
transform:translate(-50%, -50%);
|
|
6
|
-
z-index:1006;
|
|
7
|
-
width:60%;
|
|
8
|
-
height:60%;
|
|
9
|
-
max-width:800px;
|
|
10
|
-
max-height:600px;
|
|
11
|
-
background:var(--component-background);
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
.react-dashboard-widget-wrap {
|
|
15
|
-
display: flex;
|
|
16
|
-
height:100%;
|
|
17
|
-
|
|
18
|
-
.react-dashboard-widget-leftBar {
|
|
19
|
-
padding: 10px;
|
|
20
|
-
width: 180px;
|
|
21
|
-
border-right: 1px solid rgba(0, 0, 0, 0.1);
|
|
22
|
-
background: var(--component-background);
|
|
23
|
-
.react-dashboard-widget-searchIcon {
|
|
24
|
-
color: var(--text-color);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
.react-dashboard-widget-item {
|
|
28
|
-
display: flex;
|
|
29
|
-
justify-content: space-between;
|
|
30
|
-
padding: 10px;
|
|
31
|
-
|
|
32
|
-
.react-dashboard-widget-Badge {
|
|
33
|
-
|
|
34
|
-
.ant-badge-count {
|
|
35
|
-
color: var(--text-color);
|
|
36
|
-
background-color: var(--component-background-1) !important;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
cursor: pointer;
|
|
42
|
-
|
|
43
|
-
&:hover {
|
|
44
|
-
background: var(--component-background-3);
|
|
45
|
-
font-weight: bold;
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
.react-dashboard-widget-active {
|
|
50
|
-
background: rgba(0, 0, 0, 0.03);
|
|
51
|
-
font-weight: bold;
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
.react-dashboard-widget-Layer {
|
|
56
|
-
flex: 1 1;
|
|
57
|
-
overflow-y: auto;
|
|
58
|
-
overflow-x: hidden;
|
|
59
|
-
padding: 10px;
|
|
60
|
-
background: rgba(0, 0, 0, 0.01);
|
|
61
|
-
&::-webkit-scrollbar {
|
|
62
|
-
width: 1px;
|
|
63
|
-
height: 1px;
|
|
64
|
-
overflow: auto;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
&::-webkit-scrollbar-thumb {
|
|
68
|
-
background-color: var(--primary-color);
|
|
69
|
-
min-height: 25px;
|
|
70
|
-
min-width: 25px;
|
|
71
|
-
|
|
72
|
-
&:hover {
|
|
73
|
-
background-color: #a8a8a8;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
&:active {
|
|
77
|
-
background-color: #787878;
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
&::-webkit-scrollbar-track {
|
|
82
|
-
background-color: #f7f7f7;
|
|
83
|
-
border: 1px solid #efefef;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
.react-dashboard-widget-waterfall {
|
|
87
|
-
width: 100%;
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
.ant-popover-inner-content {
|
|
91
|
-
background: rgba(0, 0, 0, 0.01);
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
.react-dashboard-widget-item {
|
|
96
|
-
cursor: pointer;
|
|
97
|
-
height: auto;
|
|
98
|
-
margin-bottom: 10px;
|
|
99
|
-
width: 100%;
|
|
100
|
-
height: auto;
|
|
101
|
-
border-radius: 5px;
|
|
102
|
-
overflow: hidden;
|
|
103
|
-
// box-shadow: 0 0 0px rgba(255, 255, 255, 1);
|
|
104
|
-
transition: all 0.3s;
|
|
105
|
-
border: 1px solid rgba(0, 0, 0, 0.1);
|
|
106
|
-
-webkit-column-break-inside: avoid;
|
|
107
|
-
position: relative;
|
|
108
|
-
background: var(--component-background);
|
|
109
|
-
.react-dashboard-widget-shortcut {
|
|
110
|
-
width: 100%;
|
|
111
|
-
height: auto;
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
.react-dashboard-widget-mask {
|
|
115
|
-
opacity: 0;
|
|
116
|
-
position: absolute;
|
|
117
|
-
top: 0;
|
|
118
|
-
left: 0;
|
|
119
|
-
width: 100%;
|
|
120
|
-
height: 100%;
|
|
121
|
-
background: rgba(0, 0, 0, 0.5);
|
|
122
|
-
display: flex;
|
|
123
|
-
justify-content: center;
|
|
124
|
-
align-items: center;
|
|
125
|
-
transition: all 0.3s;
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
&:hover {
|
|
129
|
-
transition: all 0.3s;
|
|
130
|
-
|
|
131
|
-
border: 1px solid var(--component-background-3);
|
|
132
|
-
|
|
133
|
-
.react-dashboard-widget-mask {
|
|
134
|
-
opacity: 1;
|
|
135
|
-
transition: all 0.3s;
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
.react-dashboard-widget-bottombar {
|
|
140
|
-
border-top: 1px solid rgba(0, 0, 0, 0.1);
|
|
141
|
-
width: 100%;
|
|
142
|
-
|
|
143
|
-
padding: 5px;
|
|
144
|
-
|
|
145
|
-
.react-dashboard-widget-iconWrap {
|
|
146
|
-
display: inline-block;
|
|
147
|
-
width: 28px;
|
|
148
|
-
height: 28px;
|
|
149
|
-
line-height: 28px;
|
|
150
|
-
text-align: center;
|
|
151
|
-
border-radius: 7px;
|
|
152
|
-
color: #fff;
|
|
153
|
-
margin-right: 5px;
|
|
154
|
-
font-size: 16px;
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
.react-dashboard-widget-name {
|
|
158
|
-
font-size: 16px;
|
|
159
|
-
flex: 1;
|
|
160
|
-
color: var(--text-color);
|
|
161
|
-
line-height: 28px;
|
|
162
|
-
font-weight: bold;
|
|
163
|
-
display: inline;
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
.react-dashboard-widget-description {
|
|
167
|
-
margin-top: 5px;
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
|
-
}
|
|
172
|
-
}
|
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
import _get from "lodash/get";
|
|
2
|
-
import { Drawer } from 'antd';
|
|
3
|
-
import React, { useCallback, useEffect, useMemo } from 'react';
|
|
4
|
-
import { DeleteOutlined, SettingOutlined } from '@ant-design/icons'; // import allWidgets from '../../widgets';
|
|
5
|
-
//获取widget的类型
|
|
6
|
-
|
|
7
|
-
export var getWidgetType = function getWidgetType(i, widgets) {
|
|
8
|
-
var allWidgets = widgets;
|
|
9
|
-
var widgetType = '';
|
|
10
|
-
Object.keys(allWidgets).map(function (key) {
|
|
11
|
-
if (i.indexOf(key) >= 0) {
|
|
12
|
-
widgetType = key;
|
|
13
|
-
}
|
|
14
|
-
});
|
|
15
|
-
return widgetType;
|
|
16
|
-
}; //widget配置和删除按钮
|
|
17
|
-
|
|
18
|
-
export var ConfigBar = function ConfigBar(props) {
|
|
19
|
-
var widgetKey = props.widgetKey,
|
|
20
|
-
editMode = props.editMode,
|
|
21
|
-
onDeleteWidget = props.onDeleteWidget,
|
|
22
|
-
_props$setConfigShow = props.setConfigShow,
|
|
23
|
-
setConfigShow = _props$setConfigShow === void 0 ? function () {} : _props$setConfigShow,
|
|
24
|
-
widgets = props.widgets;
|
|
25
|
-
var widgetType = getWidgetType(widgetKey, widgets);
|
|
26
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, editMode && /*#__PURE__*/React.createElement("div", {
|
|
27
|
-
className: 'react-dashboard-mask'
|
|
28
|
-
}), editMode && _get('widgets', widgetType + '.configComponent') && /*#__PURE__*/React.createElement("div", {
|
|
29
|
-
className: 'react-dashboard-configicon',
|
|
30
|
-
onClick: function onClick() {
|
|
31
|
-
return setConfigShow(true);
|
|
32
|
-
}
|
|
33
|
-
}, /*#__PURE__*/React.createElement(SettingOutlined, null)), editMode && /*#__PURE__*/React.createElement("div", {
|
|
34
|
-
className: 'react-dashboard-deleteicon',
|
|
35
|
-
onClick: function onClick() {
|
|
36
|
-
return onDeleteWidget();
|
|
37
|
-
}
|
|
38
|
-
}, /*#__PURE__*/React.createElement(DeleteOutlined, null)));
|
|
39
|
-
}; //config的容器
|
|
40
|
-
|
|
41
|
-
export var ConfigWrap = function ConfigWrap(props, widgets) {
|
|
42
|
-
var widgetKey = props.widgetKey,
|
|
43
|
-
visible = props.visible,
|
|
44
|
-
setVisible = props.setVisible,
|
|
45
|
-
width = props.width,
|
|
46
|
-
children = props.children;
|
|
47
|
-
var afterVisibleChange = useCallback(function (visible) {
|
|
48
|
-
if (visible) {
|
|
49
|
-
var widgetConfigPanel = document.getElementsByClassName('widgetConfigPanel')[0];
|
|
50
|
-
widgetConfigPanel && widgetConfigPanel.addEventListener('mousedown', function (e) {
|
|
51
|
-
e.stopPropagation();
|
|
52
|
-
});
|
|
53
|
-
} else {
|
|
54
|
-
var _widgetConfigPanel = document.getElementsByClassName('widgetConfigPanel')[0];
|
|
55
|
-
_widgetConfigPanel && _widgetConfigPanel.removeEventListener('mousedown', function (e) {
|
|
56
|
-
e.stopPropagation();
|
|
57
|
-
});
|
|
58
|
-
}
|
|
59
|
-
}, [visible]);
|
|
60
|
-
var title = useMemo(function () {
|
|
61
|
-
if (!widgetKey) {
|
|
62
|
-
return;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
var widgetType = getWidgetType(widgetKey, widgets);
|
|
66
|
-
return _get(widgets, widgetType + '.name') + '设置';
|
|
67
|
-
}, [widgetKey, widgets, getWidgetType]);
|
|
68
|
-
useEffect(function () {
|
|
69
|
-
afterVisibleChange(visible);
|
|
70
|
-
}, [visible]);
|
|
71
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, visible && /*#__PURE__*/React.createElement(Drawer, {
|
|
72
|
-
className: "react-dashboard-widgetConfigPanel",
|
|
73
|
-
title: title,
|
|
74
|
-
placement: "right",
|
|
75
|
-
closable: true,
|
|
76
|
-
onClose: function onClose() {
|
|
77
|
-
return setVisible(false);
|
|
78
|
-
},
|
|
79
|
-
visible: visible,
|
|
80
|
-
width: width,
|
|
81
|
-
bodyStyle: {
|
|
82
|
-
padding: '0px'
|
|
83
|
-
},
|
|
84
|
-
afterVisibleChange: afterVisibleChange,
|
|
85
|
-
zIndex: 1005
|
|
86
|
-
}, children));
|
|
87
|
-
};
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
|
|
3
|
-
var StartNode = function StartNode(props) {
|
|
4
|
-
var node = props.node;
|
|
5
|
-
var data = node.getData();
|
|
6
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
7
|
-
className: "algo-node"
|
|
8
|
-
}, /*#__PURE__*/React.createElement("img", {
|
|
9
|
-
src: data.url,
|
|
10
|
-
alt: ""
|
|
11
|
-
}), /*#__PURE__*/React.createElement("span", null, data.name));
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
export default StartNode;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|