strategy-panel 1.0.1 → 1.0.2
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/.fatherrc.ts +11 -26
- package/.umirc.ts +4 -0
- package/README.md +33 -33
- package/es/assets/decive.svg +1 -1
- package/es/assets/hand.svg +1 -1
- package/es/assets/lock.svg +8 -0
- package/es/components/canvas/component-tree-panel/category-tree/category-type.d.ts +1 -0
- package/es/{common/graph-common → components/canvas/component-tree-panel/category-tree}/category-type.js +28 -12
- package/es/{pages → components/canvas}/component-tree-panel/category-tree/index.d.ts +17 -16
- package/es/{pages → components/canvas}/component-tree-panel/category-tree/index.js +14 -14
- package/es/{pages → components/canvas}/component-tree-panel/category-tree/index.less +36 -36
- package/es/{pages → components/canvas}/component-tree-panel/category-tree/node-title.d.ts +12 -12
- package/es/{pages → components/canvas}/component-tree-panel/category-tree/node-title.js +5 -3
- package/es/{pages → components/canvas}/component-tree-panel/index.d.ts +17 -17
- package/es/{pages → components/canvas}/component-tree-panel/index.js +1 -0
- package/es/{pages → components/canvas}/component-tree-panel/index.less +1 -0
- package/es/{pages → components/canvas}/config-panel/components/condition-configuration/configure-modal/data-origin.d.ts +49 -49
- package/es/{pages → components/canvas}/config-panel/components/condition-configuration/configure-modal/data-origin.js +26 -34
- package/es/{pages → components/canvas}/config-panel/components/condition-configuration/configure-modal/index.d.ts +11 -11
- package/es/{pages → components/canvas}/config-panel/components/condition-configuration/configure-modal/index.js +15 -23
- package/es/{pages → components/canvas}/config-panel/components/condition-configuration/configure-modal/style.less +1 -1
- package/es/{pages → components/canvas}/config-panel/components/condition-configuration/cross-line.d.ts +9 -9
- package/es/{pages → components/canvas}/config-panel/components/condition-configuration/cross-line.js +6 -10
- package/es/{pages → components/canvas}/config-panel/components/condition-configuration/index.d.ts +10 -9
- package/es/{pages → components/canvas}/config-panel/components/condition-configuration/index.js +17 -13
- package/es/{pages → components/canvas}/config-panel/components/condition-configuration/style.less +74 -74
- package/es/{pages → components/canvas}/config-panel/components/time-trigger/components/cycle-time.d.ts +9 -9
- package/es/{pages → components/canvas}/config-panel/components/time-trigger/components/cycle-time.js +24 -33
- package/es/{pages → components/canvas}/config-panel/components/time-trigger/components/time-horizon.d.ts +10 -10
- package/es/{pages → components/canvas}/config-panel/components/time-trigger/components/time-horizon.js +18 -28
- package/es/{pages → components/canvas}/config-panel/components/time-trigger/delay-time.d.ts +9 -9
- package/es/components/canvas/config-panel/components/time-trigger/effective-time.d.ts +7 -0
- package/es/components/canvas/config-panel/components/time-trigger/effective-time.js +43 -0
- package/es/{pages → components/canvas}/config-panel/components/time-trigger/index.d.ts +9 -8
- package/es/{pages → components/canvas}/config-panel/components/time-trigger/index.js +18 -17
- package/es/{pages → components/canvas}/config-panel/components/time-trigger/interval-time.d.ts +9 -9
- package/es/{pages → components/canvas}/config-panel/components/time-trigger/interval-time.js +4 -8
- package/es/{pages → components/canvas}/config-panel/components/time-trigger/persistent-time.d.ts +9 -9
- package/es/components/canvas/config-panel/components/time-trigger/section-Detail.d.ts +10 -0
- package/es/components/canvas/config-panel/components/time-trigger/section-Detail.js +125 -0
- package/es/components/canvas/config-panel/components/time-trigger/section-time.d.ts +9 -0
- package/es/components/canvas/config-panel/components/time-trigger/section-time.js +81 -0
- package/es/{pages → components/canvas}/config-panel/components/time-trigger/timing-time.d.ts +9 -9
- package/es/{pages → components/canvas}/config-panel/components/time-trigger/timing-time.js +7 -11
- package/es/{pages → components/canvas}/config-panel/config-common.d.ts +38 -37
- package/es/{pages → components/canvas}/config-panel/config-common.js +9 -15
- package/es/{pages → components/canvas}/config-panel/index.d.ts +14 -13
- package/es/{pages → components/canvas}/config-panel/index.js +2 -2
- package/es/{pages → components/canvas}/config-panel/node-form.d.ts +23 -22
- package/es/{pages → components/canvas}/config-panel/node-form.js +14 -16
- package/es/{pages → components/canvas}/config-panel/style.less +90 -81
- package/es/{pages → components/canvas}/dag-canvas/canvas-content.d.ts +11 -10
- package/es/{pages → components/canvas}/dag-canvas/canvas-content.js +23 -12
- package/es/{pages → components/canvas}/dag-canvas/index.d.ts +23 -18
- package/es/{pages → components/canvas}/dag-canvas/index.js +5 -2
- package/es/{pages → components/canvas}/dag-canvas/preview.d.ts +10 -10
- package/es/components/canvas/dag-canvas/preview.js +53 -0
- package/es/{pages → components/canvas}/index.d.ts +48 -42
- package/es/{pages → components/canvas}/index.js +20 -10
- package/es/{pages → components/canvas}/index.less +2 -2
- package/es/{pages → components/canvas}/strategy-header/index.d.ts +48 -56
- package/es/components/canvas/strategy-header/index.js +210 -0
- package/es/{pages → components/canvas}/strategy-header/style.less +4 -3
- package/es/{pages → components/canvas}/strategy-header/theme-switch/index.d.ts +4 -4
- package/es/{pages → components/canvas}/strategy-header/theme-switch/index.js +2 -3
- package/es/index.d.ts +9 -8
- package/es/index.js +8 -7
- package/es/packages/graph-canvas/graph-common.d.ts +19 -0
- package/es/packages/graph-canvas/graph-common.js +19 -0
- package/es/packages/graph-canvas/graph-model/edge/group-edge/index.d.ts +4 -0
- package/es/packages/graph-canvas/graph-model/edge/group-edge/index.js +63 -0
- package/es/packages/graph-canvas/graph-model/edge/index.d.ts +2 -0
- package/es/packages/graph-canvas/graph-model/edge/index.js +2 -0
- package/es/packages/graph-canvas/graph-model/node/application-node/application-element.d.ts +9 -0
- package/es/packages/graph-canvas/graph-model/node/application-node/application-element.js +20 -0
- package/es/packages/graph-canvas/graph-model/node/application-node/application-element.less +17 -0
- package/es/packages/graph-canvas/graph-model/node/application-node/index.d.ts +7 -0
- package/es/{common/graph-common/shape/nodes/GroupNode.js → packages/graph-canvas/graph-model/node/application-node/index.js} +42 -22
- package/es/{common/graph-common/shape/nodes/CommonNode.d.ts → packages/graph-canvas/graph-model/node/common-node/index.d.ts} +7 -5
- package/es/{common/graph-common/shape/nodes/CommonNode.js → packages/graph-canvas/graph-model/node/common-node/index.js} +8 -7
- package/es/{common/graph-common/node-element → packages/graph-canvas/graph-model/node/common-node}/node-element.d.ts +9 -9
- package/es/{common/graph-common/node-element → packages/graph-canvas/graph-model/node/common-node}/node-element.js +16 -14
- package/es/{common/graph-common/node-element → packages/graph-canvas/graph-model/node/common-node}/node-element.less +4 -4
- package/es/{common/graph-common/node-element → packages/graph-canvas/graph-model/node/condition-node}/condition-element.d.ts +9 -9
- package/es/{common/graph-common/node-element → packages/graph-canvas/graph-model/node/condition-node}/condition-element.js +20 -15
- package/es/{common/graph-common/node-element → packages/graph-canvas/graph-model/node/condition-node}/condition-element.less +76 -81
- package/es/packages/graph-canvas/graph-model/node/condition-node/images/rhombus.svg +3 -0
- package/es/{common/graph-common/shape/nodes/ConditionJudgment.d.ts → packages/graph-canvas/graph-model/node/condition-node/index.d.ts} +5 -5
- package/es/{common/graph-common/shape/nodes/ConditionJudgment.js → packages/graph-canvas/graph-model/node/condition-node/index.js} +7 -6
- package/es/packages/graph-canvas/graph-model/node/index.d.ts +5 -0
- package/es/packages/graph-canvas/graph-model/node/index.js +5 -0
- package/es/packages/graph-canvas/graph-model/node/logical-node/images/AND.svg +11 -0
- package/es/packages/graph-canvas/graph-model/node/logical-node/images/OR.svg +11 -0
- package/es/packages/graph-canvas/graph-model/node/logical-node/images/XOR.svg +11 -0
- package/es/packages/graph-canvas/graph-model/node/logical-node/images/locking.svg +5 -0
- package/es/packages/graph-canvas/graph-model/node/logical-node/images/unlock.svg +5 -0
- package/es/packages/graph-canvas/graph-model/node/logical-node/index.d.ts +6 -0
- package/es/{common/graph-common/shape/nodes/LogicalNode.js → packages/graph-canvas/graph-model/node/logical-node/index.js} +15 -15
- package/es/packages/graph-canvas/graph-model/node/logical-node/logical-element.d.ts +9 -0
- package/es/{common/graph-common/node-element → packages/graph-canvas/graph-model/node/logical-node}/logical-element.js +36 -19
- package/es/{common/graph-common/node-element → packages/graph-canvas/graph-model/node/logical-node}/logical-element.less +4 -9
- package/es/packages/graph-canvas/graph-model/node/style.less +8 -0
- package/es/{common → packages/graph-canvas}/graph-utils/graph.d.ts +87 -83
- package/es/{common → packages/graph-canvas}/graph-utils/graph.js +8 -4
- package/es/{pages/rx-models/experiment-graph.d.ts → packages/graph-canvas/index.d.ts} +79 -82
- package/es/{pages/rx-models/experiment-graph.js → packages/graph-canvas/index.js} +285 -252
- package/es/packages/graph-canvas/node-types.d.ts +6 -0
- package/es/packages/graph-canvas/node-types.js +54 -0
- package/es/packages/graph-canvas/typings.d.ts +5 -0
- package/es/{common/constants → packages/graph-common}/global.d.ts +1 -1
- package/es/{common/constants → packages/graph-common}/graph.d.ts +12 -10
- package/es/{common/constants → packages/graph-common}/graph.js +4 -2
- package/es/{pages/rx-models → packages/graph-core}/graph-util.d.ts +182 -186
- package/es/{pages/rx-models → packages/graph-core}/graph-util.js +8 -15
- package/es/{pages/rx-models/graph-core.d.ts → packages/graph-core/index.d.ts} +96 -96
- package/es/{pages/rx-models/graph-core.js → packages/graph-core/index.js} +119 -87
- package/es/packages/graph-core/typing.d.ts +107 -0
- package/es/{common/graph-common → packages/graph-model}/connector/index.d.ts +1 -1
- package/es/packages/graph-model/connector/index.js +14 -0
- package/es/packages/graph-model/edge/edge.less +8 -0
- package/es/packages/graph-model/edge/index.d.ts +5 -0
- package/es/{common/graph-common/shape/edge.js → packages/graph-model/edge/index.js} +10 -61
- package/es/packages/graph-model/node/index.d.ts +7 -0
- package/es/{common/graph-common/shape/nodes/BaseNode.js → packages/graph-model/node/index.js} +12 -3
- package/es/{common/graph-common/node-element/common-element.less → packages/graph-model/node/node-basic.less} +1 -0
- package/es/{hooks → packages/hooks}/useObservableState.d.ts +3 -3
- package/es/packages/hooks/withMode.d.ts +3 -0
- package/es/packages/hooks/withMode.js +12 -0
- package/es/style/default.less +8 -0
- package/es/style/svgRaw.d.ts +1 -0
- package/es/style/svgRaw.js +1 -0
- package/es/typings.d.ts +2 -8
- package/es/utils/utils.d.ts +1 -1
- package/lib/assets/AND.svg +11 -0
- package/lib/assets/OR.svg +11 -0
- package/lib/assets/XOR.svg +11 -0
- package/lib/assets/add.svg +13 -0
- package/lib/assets/alarm.svg +11 -0
- package/lib/assets/application.svg +11 -0
- package/lib/assets/cancel.svg +13 -0
- package/lib/assets/check.svg +12 -0
- package/lib/assets/condition.svg +12 -0
- package/lib/assets/control.svg +11 -0
- package/lib/assets/decive.svg +11 -0
- package/lib/assets/delete.svg +11 -0
- package/lib/assets/device.svg +11 -0
- package/lib/assets/edit.svg +11 -0
- package/lib/assets/hand.svg +11 -0
- package/lib/assets/link.svg +11 -0
- package/lib/assets/lock.svg +8 -0
- package/lib/assets/logical.svg +12 -0
- package/lib/assets/notice.svg +11 -0
- package/lib/assets/order.svg +11 -0
- package/lib/assets/relation.svg +11 -0
- package/lib/assets/rhombus.svg +3 -0
- package/lib/assets/save.svg +13 -0
- package/lib/assets/time.svg +11 -0
- package/lib/assets/variate.svg +12 -0
- package/lib/components/canvas/component-tree-panel/category-tree/category-type.d.ts +1 -0
- package/lib/components/canvas/component-tree-panel/category-tree/category-type.js +111 -0
- package/lib/components/canvas/component-tree-panel/category-tree/index.d.ts +17 -0
- package/lib/components/canvas/component-tree-panel/category-tree/index.js +115 -0
- package/lib/components/canvas/component-tree-panel/category-tree/index.less +36 -0
- package/lib/components/canvas/component-tree-panel/category-tree/node-title.d.ts +12 -0
- package/lib/components/canvas/component-tree-panel/category-tree/node-title.js +75 -0
- package/lib/components/canvas/component-tree-panel/category-tree/node-title.less +113 -0
- package/lib/components/canvas/component-tree-panel/index.d.ts +17 -0
- package/lib/components/canvas/component-tree-panel/index.js +33 -0
- package/lib/components/canvas/component-tree-panel/index.less +52 -0
- package/lib/components/canvas/config-panel/components/condition-configuration/configure-modal/data-origin.d.ts +49 -0
- package/lib/components/canvas/config-panel/components/condition-configuration/configure-modal/data-origin.js +229 -0
- package/lib/components/canvas/config-panel/components/condition-configuration/configure-modal/index.d.ts +11 -0
- package/lib/components/canvas/config-panel/components/condition-configuration/configure-modal/index.js +187 -0
- package/lib/components/canvas/config-panel/components/condition-configuration/configure-modal/style.less +13 -0
- package/lib/components/canvas/config-panel/components/condition-configuration/cross-line.d.ts +9 -0
- package/lib/components/canvas/config-panel/components/condition-configuration/cross-line.js +57 -0
- package/lib/components/canvas/config-panel/components/condition-configuration/index.d.ts +10 -0
- package/lib/components/canvas/config-panel/components/condition-configuration/index.js +216 -0
- package/lib/components/canvas/config-panel/components/condition-configuration/style.less +74 -0
- package/lib/components/canvas/config-panel/components/time-trigger/components/cycle-time.d.ts +9 -0
- package/lib/components/canvas/config-panel/components/time-trigger/components/cycle-time.js +108 -0
- package/lib/components/canvas/config-panel/components/time-trigger/components/time-horizon.d.ts +10 -0
- package/lib/components/canvas/config-panel/components/time-trigger/components/time-horizon.js +78 -0
- package/lib/components/canvas/config-panel/components/time-trigger/delay-time.d.ts +9 -0
- package/lib/components/canvas/config-panel/components/time-trigger/delay-time.js +33 -0
- package/lib/components/canvas/config-panel/components/time-trigger/effective-time.d.ts +7 -0
- package/lib/components/canvas/config-panel/components/time-trigger/effective-time.js +58 -0
- package/lib/components/canvas/config-panel/components/time-trigger/index.d.ts +9 -0
- package/lib/components/canvas/config-panel/components/time-trigger/index.js +114 -0
- package/lib/components/canvas/config-panel/components/time-trigger/interval-time.d.ts +9 -0
- package/lib/components/canvas/config-panel/components/time-trigger/interval-time.js +63 -0
- package/lib/components/canvas/config-panel/components/time-trigger/persistent-time.d.ts +9 -0
- package/lib/components/canvas/config-panel/components/time-trigger/persistent-time.js +33 -0
- package/lib/components/canvas/config-panel/components/time-trigger/section-Detail.d.ts +10 -0
- package/lib/components/canvas/config-panel/components/time-trigger/section-Detail.js +140 -0
- package/lib/components/canvas/config-panel/components/time-trigger/section-time.d.ts +9 -0
- package/lib/components/canvas/config-panel/components/time-trigger/section-time.js +96 -0
- package/lib/components/canvas/config-panel/components/time-trigger/timing-time.d.ts +9 -0
- package/lib/components/canvas/config-panel/components/time-trigger/timing-time.js +65 -0
- package/lib/components/canvas/config-panel/config-common.d.ts +38 -0
- package/lib/components/canvas/config-panel/config-common.js +152 -0
- package/lib/components/canvas/config-panel/index.d.ts +14 -0
- package/lib/components/canvas/config-panel/index.js +68 -0
- package/lib/components/canvas/config-panel/node-form.d.ts +23 -0
- package/lib/components/canvas/config-panel/node-form.js +97 -0
- package/lib/components/canvas/config-panel/style.less +90 -0
- package/lib/components/canvas/dag-canvas/canvas-content.d.ts +11 -0
- package/lib/components/canvas/dag-canvas/canvas-content.js +130 -0
- package/lib/components/canvas/dag-canvas/canvas-content.less +5 -0
- package/lib/components/canvas/dag-canvas/index.d.ts +23 -0
- package/lib/components/canvas/dag-canvas/index.js +53 -0
- package/lib/components/canvas/dag-canvas/index.less +11 -0
- package/lib/components/canvas/dag-canvas/preview.d.ts +10 -0
- package/lib/components/canvas/dag-canvas/preview.js +73 -0
- package/lib/components/canvas/index.d.ts +48 -0
- package/lib/components/canvas/index.js +107 -0
- package/lib/components/canvas/index.less +50 -0
- package/lib/components/canvas/strategy-header/index.d.ts +48 -0
- package/lib/components/canvas/strategy-header/index.js +229 -0
- package/lib/components/canvas/strategy-header/style.less +23 -0
- package/lib/components/canvas/strategy-header/theme-switch/index.d.ts +4 -0
- package/lib/components/canvas/strategy-header/theme-switch/index.js +30 -0
- package/lib/components/canvas/strategy-header/theme-switch/style.less +11 -0
- package/lib/index.d.ts +9 -0
- package/lib/index.js +71 -0
- package/lib/packages/graph-canvas/graph-common.d.ts +19 -0
- package/lib/packages/graph-canvas/graph-common.js +27 -0
- package/lib/packages/graph-canvas/graph-model/edge/group-edge/edge.less +8 -0
- package/lib/packages/graph-canvas/graph-model/edge/group-edge/index.d.ts +4 -0
- package/lib/packages/graph-canvas/graph-model/edge/group-edge/index.js +74 -0
- package/lib/packages/graph-canvas/graph-model/edge/index.d.ts +2 -0
- package/lib/packages/graph-canvas/graph-model/edge/index.js +15 -0
- package/lib/packages/graph-canvas/graph-model/node/application-node/application-element.d.ts +9 -0
- package/lib/packages/graph-canvas/graph-model/node/application-node/application-element.js +31 -0
- package/lib/packages/graph-canvas/graph-model/node/application-node/application-element.less +17 -0
- package/lib/packages/graph-canvas/graph-model/node/application-node/index.d.ts +7 -0
- package/lib/packages/graph-canvas/graph-model/node/application-node/index.js +133 -0
- package/lib/packages/graph-canvas/graph-model/node/common-node/index.d.ts +7 -0
- package/lib/packages/graph-canvas/graph-model/node/common-node/index.js +133 -0
- package/lib/packages/graph-canvas/graph-model/node/common-node/node-element.d.ts +9 -0
- package/lib/packages/graph-canvas/graph-model/node/common-node/node-element.js +69 -0
- package/lib/packages/graph-canvas/graph-model/node/common-node/node-element.less +48 -0
- package/{es/common/graph-common/node-element/logical-element.d.ts → lib/packages/graph-canvas/graph-model/node/condition-node/condition-element.d.ts} +9 -9
- package/lib/packages/graph-canvas/graph-model/node/condition-node/condition-element.js +81 -0
- package/lib/packages/graph-canvas/graph-model/node/condition-node/condition-element.less +76 -0
- package/lib/packages/graph-canvas/graph-model/node/condition-node/images/rhombus.svg +3 -0
- package/{es/common/graph-common/shape/nodes/LogicalNode.d.ts → lib/packages/graph-canvas/graph-model/node/condition-node/index.d.ts} +5 -5
- package/lib/packages/graph-canvas/graph-model/node/condition-node/index.js +143 -0
- package/lib/packages/graph-canvas/graph-model/node/index.d.ts +5 -0
- package/lib/packages/graph-canvas/graph-model/node/index.js +39 -0
- package/lib/packages/graph-canvas/graph-model/node/logical-node/images/AND.svg +11 -0
- package/lib/packages/graph-canvas/graph-model/node/logical-node/images/OR.svg +11 -0
- package/lib/packages/graph-canvas/graph-model/node/logical-node/images/XOR.svg +11 -0
- package/lib/packages/graph-canvas/graph-model/node/logical-node/images/locking.svg +5 -0
- package/lib/packages/graph-canvas/graph-model/node/logical-node/images/unlock.svg +5 -0
- package/lib/packages/graph-canvas/graph-model/node/logical-node/index.d.ts +6 -0
- package/lib/packages/graph-canvas/graph-model/node/logical-node/index.js +143 -0
- package/lib/packages/graph-canvas/graph-model/node/logical-node/logical-element.d.ts +9 -0
- package/lib/packages/graph-canvas/graph-model/node/logical-node/logical-element.js +98 -0
- package/lib/packages/graph-canvas/graph-model/node/logical-node/logical-element.less +49 -0
- package/lib/packages/graph-canvas/graph-model/node/style.less +8 -0
- package/lib/packages/graph-canvas/graph-utils/graph.d.ts +87 -0
- package/lib/packages/graph-canvas/graph-utils/graph.js +124 -0
- package/lib/packages/graph-canvas/index.d.ts +79 -0
- package/lib/packages/graph-canvas/index.js +1292 -0
- package/lib/packages/graph-canvas/node-types.d.ts +6 -0
- package/lib/packages/graph-canvas/node-types.js +66 -0
- package/lib/packages/graph-canvas/typings.d.ts +5 -0
- package/lib/packages/graph-common/global.d.ts +1 -0
- package/lib/packages/graph-common/global.js +8 -0
- package/lib/packages/graph-common/graph.d.ts +12 -0
- package/lib/packages/graph-common/graph.js +37 -0
- package/lib/packages/graph-core/graph-util.d.ts +182 -0
- package/lib/packages/graph-core/graph-util.js +368 -0
- package/lib/packages/graph-core/index.d.ts +96 -0
- package/lib/packages/graph-core/index.js +798 -0
- package/lib/packages/graph-core/typing.d.ts +107 -0
- package/lib/packages/graph-model/connector/index.d.ts +1 -0
- package/lib/packages/graph-model/connector/index.js +17 -0
- package/lib/packages/graph-model/edge/edge.less +8 -0
- package/lib/packages/graph-model/edge/index.d.ts +5 -0
- package/lib/packages/graph-model/edge/index.js +73 -0
- package/lib/packages/graph-model/node/index.d.ts +7 -0
- package/lib/packages/graph-model/node/index.js +63 -0
- package/lib/packages/graph-model/node/node-basic.less +118 -0
- package/lib/packages/hooks/useObservableState.d.ts +3 -0
- package/lib/packages/hooks/useObservableState.js +55 -0
- package/lib/packages/hooks/withMode.d.ts +3 -0
- package/lib/packages/hooks/withMode.js +22 -0
- package/lib/style/basic.less +12 -0
- package/lib/style/default.less +10 -0
- package/lib/style/position.less +25 -0
- package/lib/style/svgRaw.d.ts +1 -0
- package/lib/style/svgRaw.js +8 -0
- package/lib/style/theme-light.less +7 -0
- package/lib/style/variable.less +3 -0
- package/lib/typings.d.ts +8 -0
- package/lib/utils/utils.d.ts +1 -0
- package/lib/utils/utils.js +13 -0
- package/package.json +38 -37
- package/tsconfig.json +1 -1
- package/es/common/graph-common/category-type.d.ts +0 -16
- package/es/common/graph-common/connector/index.js +0 -14
- package/es/common/graph-common/node-element/node-group.d.ts +0 -8
- package/es/common/graph-common/node-element/node-group.js +0 -395
- package/es/common/graph-common/node-element/node-group.less +0 -53
- package/es/common/graph-common/node-popover/index.d.ts +0 -7
- package/es/common/graph-common/node-popover/index.js +0 -11
- package/es/common/graph-common/node-popover/index.less +0 -5
- package/es/common/graph-common/node-types.d.ts +0 -28
- package/es/common/graph-common/node-types.js +0 -60
- package/es/common/graph-common/shape/edge.d.ts +0 -10
- package/es/common/graph-common/shape/node.d.ts +0 -6
- package/es/common/graph-common/shape/node.js +0 -6
- package/es/common/graph-common/shape/nodes/BaseNode.d.ts +0 -4
- package/es/common/graph-common/shape/nodes/GroupNode.d.ts +0 -4
- package/es/component/cut.d.ts +0 -10
- package/es/component/cut.js +0 -34
- package/es/component/cut.less +0 -6
- package/es/component/item-name.d.ts +0 -6
- package/es/component/item-name.js +0 -30
- package/es/component/keyword.d.ts +0 -9
- package/es/component/keyword.js +0 -26
- package/es/component/keyword.less +0 -11
- package/es/component/rx-component/rx-input.d.ts +0 -8
- package/es/component/rx-component/rx-input.js +0 -47
- package/es/hooks/withMode.d.ts +0 -1
- package/es/hooks/withMode.js +0 -16
- package/es/pages/dag-canvas/preview.js +0 -42
- package/es/pages/rx-models/graph-core.less +0 -14
- package/es/pages/rx-models/typing.d.ts +0 -126
- package/es/pages/strategy-header/index.js +0 -154
- /package/es/{pages → components/canvas}/component-tree-panel/category-tree/node-title.less +0 -0
- /package/es/{pages → components/canvas}/config-panel/components/time-trigger/delay-time.js +0 -0
- /package/es/{pages → components/canvas}/config-panel/components/time-trigger/persistent-time.js +0 -0
- /package/es/{pages → components/canvas}/dag-canvas/canvas-content.less +0 -0
- /package/es/{pages → components/canvas}/dag-canvas/index.less +0 -0
- /package/es/{pages → components/canvas}/strategy-header/theme-switch/style.less +0 -0
- /package/es/{common/graph-common/shape → packages/graph-canvas/graph-model/edge/group-edge}/edge.less +0 -0
- /package/es/{common/constants → packages/graph-common}/global.js +0 -0
- /package/es/{hooks → packages/hooks}/useObservableState.js +0 -0
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="30px" height="30px" viewBox="0 0 30 30" version="1.1">
|
|
3
|
+
<title>变量</title>
|
|
4
|
+
<g id="全局样式" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" opacity="0.8">
|
|
5
|
+
<g id="Icons" transform="translate(-576.000000, -1449.000000)" fill="#323232" fill-rule="nonzero">
|
|
6
|
+
<g id="变量" transform="translate(576.000000, 1449.000000)">
|
|
7
|
+
<path d="M28.3875,0 L1.6125,0 C0.721875,0 0,0.721875 0,1.6125 L0,28.3875 C0,29.278125 0.721875,30 1.6125,30 L15.8625,30 C16.753125,30 17.475,29.278125 17.475,28.3875 C17.475,27.496875 16.753125,26.775 15.8625,26.775 L3.225,26.775 L3.225,3.225 L26.775,3.225 L26.775,26.775 L24.825,26.775 C23.934375,26.775 23.2125,27.496875 23.2125,28.3875 C23.2125,29.278125 23.934375,30 24.825,30 L28.3875,30 C29.278125,30 30,29.278125 30,28.3875 L30,1.6125 C30,0.721875 29.278125,0 28.3875,0 Z" id="路径"></path>
|
|
8
|
+
<path d="M10.0021391,11.5414235 C10.0021391,11.0038866 10.1369467,10.600734 10.6761771,10.4663498 C11.6198302,10.1975813 12.4286758,9.79442871 13.3723289,10.0631971 C14.1811744,10.1975813 14.7204048,10.600734 15.1248275,11.5414235 C15.2596351,12.0789603 15.3944427,12.7508813 15.6640579,13.2884182 C15.7992442,13.154034 15.7992442,13.0196498 15.9336731,12.8852656 C16.3380959,12.2133445 16.7425186,11.5414235 17.281749,10.8695024 C17.5513642,10.600734 17.8209793,10.1975813 18.2254021,10.0631971 C18.8994401,9.6600445 19.573478,9.92881292 19.9779008,10.4663498 C20.3823235,11.0038866 20.3823235,11.9445761 19.8430932,12.4821129 C19.3038628,13.154034 18.6298249,13.2884182 17.9557869,13.154034 C17.8209793,13.154034 17.5513642,13.154034 17.4165566,13.0196498 C17.1469414,12.8852656 16.8773262,13.0196498 16.607711,13.2884182 C16.4729034,13.5571866 16.2032883,13.825955 16.0684807,14.0947235 C16.0684807,14.2291077 15.9336731,14.3634919 16.0684807,14.4978761 C16.3380959,15.5729498 16.607711,16.6480235 16.8773262,17.5887129 C17.1469414,18.5294024 17.8209793,18.932555 18.7646325,18.6637866 C19.0342476,18.6637866 19.1690552,18.5294024 19.4386704,18.5294024 C19.4386704,19.2013235 19.3038628,19.3357077 18.7646325,19.6044761 C17.9557869,20.0076287 17.0121338,20.2763972 16.0684807,20.1420129 C15.2596351,20.0076287 14.5855972,19.6044761 14.315982,18.6637866 C14.1811744,18.1262498 14.0463668,17.4543287 13.7767517,16.7824077 C13.6419441,16.9167919 13.6419441,17.0511761 13.5071365,17.1855603 C13.1027137,17.8574814 12.6982909,18.6637866 12.1590606,19.3357077 C11.8894454,19.7388603 11.4850226,20.0076287 11.0805999,20.1420129 C10.4065619,20.4107814 9.73252397,20.1420129 9.46290879,19.6044761 C9.19329361,19.0669393 9.19329361,18.1262498 9.59771638,17.5887129 C10.1369467,16.9167919 10.8109847,16.7824077 11.6198302,16.9167919 C11.7546378,16.9167919 11.8894454,16.9167919 12.024253,17.0511761 C12.4286758,17.3199445 12.6982909,17.1855603 12.8330985,16.7824077 C12.9679061,16.5136393 13.2375213,16.2448708 13.3723289,15.9761024 C13.5071365,15.8417182 13.5071365,15.707334 13.3723289,15.5729498 C13.1027137,14.6322603 12.9679061,13.6915708 12.6982909,12.8852656 C12.2938682,11.6758077 11.7546378,11.272655 10.6761771,11.6758077 C10.4065619,11.5414235 10.2717543,11.5414235 10.0021391,11.5414235 L10.0021391,11.5414235 Z M20.8382458,21.6202393 C21.9167066,19.4700919 22.5907445,17.3199445 22.5907445,14.9010287 C22.5907445,12.4821129 22.1863217,10.3319656 21.107861,8.18181818 L22.7255521,8.18181818 C22.8603597,8.18181818 22.8603597,8.31620239 22.8603597,8.31620239 C24.2084356,10.600734 24.7476659,13.154034 24.4780508,15.9757249 C24.2084356,17.9914881 23.39959,19.7384828 22.4559369,21.3514708 C22.4559369,21.4858551 22.3211293,21.4858551 22.1863217,21.4858551 C21.781899,21.6202393 21.3774762,21.6202393 20.8382458,21.6202393 L20.8382458,21.6202393 Z M7.92852578,8.18181818 C5.90641193,12.7508813 6.04121952,17.1855603 8.33294855,21.6202393 L6.85006506,21.6202393 C6.85006506,21.6202393 6.71525747,21.6202393 6.71525747,21.4858551 C5.77160435,19.8732445 4.96275881,18.260634 4.69314363,16.379255 C4.28872086,13.5571866 4.69314363,10.8695024 6.17602711,8.4505866 C6.3108347,8.31620239 6.44564229,8.18181818 6.58044988,8.18181818 L7.92852578,8.18181818 L7.92852578,8.18181818 Z M18.2727362,28.3768207 C18.2726458,28.9567602 18.5830195,29.4926678 19.0868832,29.7825701 C19.5906916,30.0724766 20.2113687,30.0724766 20.7151771,29.7825701 C21.218915,29.4925424 21.5292426,28.9567143 21.5293241,28.3768207 C21.5293241,27.7966282 21.2191909,27.2609788 20.7151771,26.9710713 C20.2113687,26.6811648 19.5906916,26.6811648 19.0868832,26.9710713 C18.5830195,27.2609735 18.2726458,27.7968812 18.2727362,28.3768207 L18.2727362,28.3768207 Z" id="形状"></path>
|
|
9
|
+
</g>
|
|
10
|
+
</g>
|
|
11
|
+
</g>
|
|
12
|
+
</svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const componentsData: any[];
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.componentsData = void 0;
|
|
7
|
+
|
|
8
|
+
var _nodeTypes = require("../../../../packages/graph-canvas/node-types");
|
|
9
|
+
|
|
10
|
+
var _variate = _interopRequireDefault(require("../../../../assets/variate.svg"));
|
|
11
|
+
|
|
12
|
+
var _lock = _interopRequireDefault(require("../../../../assets/lock.svg"));
|
|
13
|
+
|
|
14
|
+
var _decive = _interopRequireDefault(require("../../../../assets/decive.svg"));
|
|
15
|
+
|
|
16
|
+
var _time = _interopRequireDefault(require("../../../../assets/time.svg"));
|
|
17
|
+
|
|
18
|
+
var _hand = _interopRequireDefault(require("../../../../assets/hand.svg"));
|
|
19
|
+
|
|
20
|
+
var _relation = _interopRequireDefault(require("../../../../assets/relation.svg"));
|
|
21
|
+
|
|
22
|
+
var _logical = _interopRequireDefault(require("../../../../assets/logical.svg"));
|
|
23
|
+
|
|
24
|
+
var _condition = _interopRequireDefault(require("../../../../assets/condition.svg"));
|
|
25
|
+
|
|
26
|
+
var _alarm = _interopRequireDefault(require("../../../../assets/alarm.svg"));
|
|
27
|
+
|
|
28
|
+
var _notice = _interopRequireDefault(require("../../../../assets/notice.svg"));
|
|
29
|
+
|
|
30
|
+
var _order = _interopRequireDefault(require("../../../../assets/order.svg"));
|
|
31
|
+
|
|
32
|
+
var _control = _interopRequireDefault(require("../../../../assets/control.svg"));
|
|
33
|
+
|
|
34
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
35
|
+
|
|
36
|
+
var componentsData = [{
|
|
37
|
+
id: _nodeTypes.COMPONENTS_TYPE.COMMONLY_USED,
|
|
38
|
+
name: '通用组件',
|
|
39
|
+
isDir: true,
|
|
40
|
+
children: [{
|
|
41
|
+
id: _nodeTypes.COMMONLY_USED.VARIATE,
|
|
42
|
+
name: '变量',
|
|
43
|
+
imgUrl: _variate.default
|
|
44
|
+
}, {
|
|
45
|
+
id: _nodeTypes.COMMONLY_USED.LOCKED,
|
|
46
|
+
name: '服务锁定',
|
|
47
|
+
imgUrl: _lock.default
|
|
48
|
+
}]
|
|
49
|
+
}, {
|
|
50
|
+
id: _nodeTypes.COMPONENTS_TYPE.SCENE_DISPLAY,
|
|
51
|
+
name: '场景触发',
|
|
52
|
+
isDir: true,
|
|
53
|
+
children: [{
|
|
54
|
+
id: _nodeTypes.SCENE_DISPLAY.EQUIPMENT,
|
|
55
|
+
name: '设备触发',
|
|
56
|
+
imgUrl: _decive.default,
|
|
57
|
+
number: 1
|
|
58
|
+
}, {
|
|
59
|
+
id: _nodeTypes.SCENE_DISPLAY.TIME,
|
|
60
|
+
name: '时间触发',
|
|
61
|
+
imgUrl: _time.default
|
|
62
|
+
}, {
|
|
63
|
+
id: _nodeTypes.SCENE_DISPLAY.MANUAL,
|
|
64
|
+
name: '手动按钮',
|
|
65
|
+
imgUrl: _hand.default
|
|
66
|
+
}]
|
|
67
|
+
}, {
|
|
68
|
+
id: _nodeTypes.COMPONENTS_TYPE.SIGN_OPERATION,
|
|
69
|
+
name: '运算符号',
|
|
70
|
+
isDir: true,
|
|
71
|
+
children: [{
|
|
72
|
+
id: _nodeTypes.SIGN_OPERATION.RELATION,
|
|
73
|
+
name: '关系运算',
|
|
74
|
+
imgUrl: _relation.default
|
|
75
|
+
}, {
|
|
76
|
+
id: _nodeTypes.SIGN_OPERATION.LOGICAL,
|
|
77
|
+
name: '逻辑运算',
|
|
78
|
+
imgUrl: _logical.default
|
|
79
|
+
}, {
|
|
80
|
+
id: _nodeTypes.SIGN_OPERATION.CONDITION,
|
|
81
|
+
name: '条件判断',
|
|
82
|
+
imgUrl: _condition.default
|
|
83
|
+
}]
|
|
84
|
+
}, {
|
|
85
|
+
id: _nodeTypes.COMPONENTS_TYPE.MOTION_OPERATION,
|
|
86
|
+
name: '运动符号',
|
|
87
|
+
isDir: true,
|
|
88
|
+
children: [{
|
|
89
|
+
id: _nodeTypes.MOTION_OPERATION.ALARM,
|
|
90
|
+
name: '报警',
|
|
91
|
+
imgUrl: _alarm.default
|
|
92
|
+
}, {
|
|
93
|
+
id: _nodeTypes.MOTION_OPERATION.NOTICE,
|
|
94
|
+
name: '通知',
|
|
95
|
+
imgUrl: _notice.default
|
|
96
|
+
}, {
|
|
97
|
+
id: _nodeTypes.MOTION_OPERATION.ORDER,
|
|
98
|
+
name: '派发工单',
|
|
99
|
+
imgUrl: _order.default
|
|
100
|
+
}, {
|
|
101
|
+
id: _nodeTypes.MOTION_OPERATION.CONTROL,
|
|
102
|
+
name: '远程控制',
|
|
103
|
+
imgUrl: _control.default
|
|
104
|
+
}]
|
|
105
|
+
}, {
|
|
106
|
+
id: _nodeTypes.COMPONENTS_TYPE.APPLICATION,
|
|
107
|
+
name: '应用组件',
|
|
108
|
+
isDir: true,
|
|
109
|
+
children: []
|
|
110
|
+
}];
|
|
111
|
+
exports.componentsData = componentsData;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './index.less';
|
|
3
|
+
export interface paneDataItem {
|
|
4
|
+
id: string;
|
|
5
|
+
name: string;
|
|
6
|
+
isDir?: boolean;
|
|
7
|
+
imgUrl?: string;
|
|
8
|
+
number?: number;
|
|
9
|
+
applicationImgUrl?: string;
|
|
10
|
+
children?: paneDataItem[];
|
|
11
|
+
}
|
|
12
|
+
interface Props {
|
|
13
|
+
sortNum?: number;
|
|
14
|
+
panelData?: paneDataItem[];
|
|
15
|
+
}
|
|
16
|
+
declare const CategoryTree: React.FC<Props>;
|
|
17
|
+
export default CategoryTree;
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
|
|
10
|
+
var _antd = require("antd");
|
|
11
|
+
|
|
12
|
+
var _categoryType = require("./category-type");
|
|
13
|
+
|
|
14
|
+
var _nodeTitle = require("./node-title");
|
|
15
|
+
|
|
16
|
+
require("./index.less");
|
|
17
|
+
|
|
18
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19
|
+
|
|
20
|
+
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; }
|
|
21
|
+
|
|
22
|
+
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; }
|
|
23
|
+
|
|
24
|
+
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; }
|
|
25
|
+
|
|
26
|
+
var Panel = _antd.Collapse.Panel;
|
|
27
|
+
|
|
28
|
+
var getComponentsData = function getComponentsData(data) {
|
|
29
|
+
return data === null || data === void 0 ? void 0 : data.reduce(function (pre, next) {
|
|
30
|
+
var existentIndex = pre.findIndex(function (child) {
|
|
31
|
+
return child.id === next.id;
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
if (existentIndex > -1) {
|
|
35
|
+
var _pre$existentIndex;
|
|
36
|
+
|
|
37
|
+
var existentChildren = pre === null || pre === void 0 ? void 0 : (_pre$existentIndex = pre[existentIndex]) === null || _pre$existentIndex === void 0 ? void 0 : _pre$existentIndex.children;
|
|
38
|
+
|
|
39
|
+
if (existentChildren && next.children) {
|
|
40
|
+
var _next$children;
|
|
41
|
+
|
|
42
|
+
pre[existentIndex] = _objectSpread(_objectSpread({}, pre[existentIndex]), next);
|
|
43
|
+
(_next$children = next.children) === null || _next$children === void 0 ? void 0 : _next$children.forEach(function (item) {
|
|
44
|
+
var childIndex = existentChildren === null || existentChildren === void 0 ? void 0 : existentChildren.findIndex(function (child) {
|
|
45
|
+
return child.id === item.id;
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
if (childIndex > -1) {
|
|
49
|
+
existentChildren[childIndex] = item;
|
|
50
|
+
} else {
|
|
51
|
+
existentChildren.push(item);
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
pre[existentIndex].children = existentChildren;
|
|
55
|
+
} else {
|
|
56
|
+
pre[existentIndex] = _objectSpread(_objectSpread({}, pre[existentIndex]), next);
|
|
57
|
+
}
|
|
58
|
+
} else {
|
|
59
|
+
pre.push(next);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
return pre;
|
|
63
|
+
}, _categoryType.componentsData);
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
var CategoryTree = function CategoryTree(props) {
|
|
67
|
+
var _props$sortNum = props.sortNum,
|
|
68
|
+
sortNum = _props$sortNum === void 0 ? 3 : _props$sortNum,
|
|
69
|
+
_props$panelData = props.panelData,
|
|
70
|
+
panelData = _props$panelData === void 0 ? [] : _props$panelData;
|
|
71
|
+
|
|
72
|
+
var isRowFirst = function isRowFirst(index) {
|
|
73
|
+
return (index + 1) % sortNum === 1;
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
var sortIndex = function sortIndex(index) {
|
|
77
|
+
return index % sortNum;
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
var currentPanelData = getComponentsData(panelData);
|
|
81
|
+
var omitEmptyData = currentPanelData === null || currentPanelData === void 0 ? void 0 : currentPanelData.filter(function (item) {
|
|
82
|
+
var _item$children;
|
|
83
|
+
|
|
84
|
+
return (item === null || item === void 0 ? void 0 : (_item$children = item.children) === null || _item$children === void 0 ? void 0 : _item$children.length) > 0;
|
|
85
|
+
});
|
|
86
|
+
var defaultActiveKey = currentPanelData === null || currentPanelData === void 0 ? void 0 : currentPanelData.map(function (item) {
|
|
87
|
+
return item === null || item === void 0 ? void 0 : item.id;
|
|
88
|
+
});
|
|
89
|
+
console.log('xxxxcurrentPanelData', currentPanelData, _categoryType.componentsData);
|
|
90
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
91
|
+
className: "category-tree-list"
|
|
92
|
+
}, /*#__PURE__*/_react.default.createElement(_antd.Collapse, {
|
|
93
|
+
className: "category-tree-collapse",
|
|
94
|
+
defaultActiveKey: defaultActiveKey
|
|
95
|
+
}, omitEmptyData === null || omitEmptyData === void 0 ? void 0 : omitEmptyData.map(function (item) {
|
|
96
|
+
var _item$children2, _item$children3;
|
|
97
|
+
|
|
98
|
+
return /*#__PURE__*/_react.default.createElement(Panel, {
|
|
99
|
+
header: item.name,
|
|
100
|
+
key: item.id
|
|
101
|
+
}, /*#__PURE__*/_react.default.createElement(_antd.Row, null, item !== null && item !== void 0 && (_item$children2 = item.children) !== null && _item$children2 !== void 0 && _item$children2.length ? item === null || item === void 0 ? void 0 : (_item$children3 = item.children) === null || _item$children3 === void 0 ? void 0 : _item$children3.map(function (child, index) {
|
|
102
|
+
return /*#__PURE__*/_react.default.createElement(_antd.Col, {
|
|
103
|
+
key: child.id,
|
|
104
|
+
span: 8
|
|
105
|
+
}, /*#__PURE__*/_react.default.createElement(_nodeTitle.NodeTitle, {
|
|
106
|
+
node: child,
|
|
107
|
+
isRowFirst: isRowFirst(index),
|
|
108
|
+
sortIndex: sortIndex(index)
|
|
109
|
+
}));
|
|
110
|
+
}) : /*#__PURE__*/_react.default.createElement("div", null)));
|
|
111
|
+
})));
|
|
112
|
+
};
|
|
113
|
+
|
|
114
|
+
var _default = CategoryTree;
|
|
115
|
+
exports.default = _default;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
@import (reference) '../../../../style/theme-light';
|
|
2
|
+
|
|
3
|
+
.category-tree-list {
|
|
4
|
+
height: 100%;
|
|
5
|
+
overflow-x: hidden;
|
|
6
|
+
overflow-y: auto;
|
|
7
|
+
background: #fff;
|
|
8
|
+
|
|
9
|
+
.category-tree-collapse {
|
|
10
|
+
border-color: #DCDCDC;
|
|
11
|
+
|
|
12
|
+
.ant-collapse-header {
|
|
13
|
+
height: 36px;
|
|
14
|
+
font-size: 14px;
|
|
15
|
+
line-height: 1 !important;
|
|
16
|
+
background: @light-gray-bg;
|
|
17
|
+
|
|
18
|
+
}
|
|
19
|
+
.ant-collapse-header > div {
|
|
20
|
+
position: absolute;
|
|
21
|
+
right: 0;
|
|
22
|
+
}
|
|
23
|
+
.ant-collapse-header > div > span {
|
|
24
|
+
color: rgba(142, 142, 142, 0.52);
|
|
25
|
+
}
|
|
26
|
+
.ant-collapse-content > .ant-collapse-content-box {
|
|
27
|
+
padding-bottom: 5px;
|
|
28
|
+
}
|
|
29
|
+
.ant-collapse-content {
|
|
30
|
+
border-top: 1px solid #DCDCDC;
|
|
31
|
+
}
|
|
32
|
+
.ant-collapse-item {
|
|
33
|
+
border-bottom: 1px solid #DCDCDC;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { ConnectDragPreview, ConnectDragSource } from 'react-dnd';
|
|
2
|
+
import './node-title.less';
|
|
3
|
+
interface Props {
|
|
4
|
+
node: any;
|
|
5
|
+
isRowFirst: boolean;
|
|
6
|
+
sortIndex: number;
|
|
7
|
+
isDragging: boolean;
|
|
8
|
+
connectDragSource: ConnectDragSource;
|
|
9
|
+
connectDragPreview: ConnectDragPreview;
|
|
10
|
+
}
|
|
11
|
+
export declare const NodeTitle: import("react-dnd").DndComponentClass<(props: Props) => JSX.Element, import("react-dnd").Omit<Props, "connectDragSource" | "connectDragPreview" | "isDragging">>;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.NodeTitle = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
|
|
10
|
+
var _reactDnd = require("react-dnd");
|
|
11
|
+
|
|
12
|
+
var _marked = _interopRequireDefault(require("marked"));
|
|
13
|
+
|
|
14
|
+
var _graph = require("../../../../packages/graph-common/graph");
|
|
15
|
+
|
|
16
|
+
var _application = _interopRequireDefault(require("../../../../assets/application.svg"));
|
|
17
|
+
|
|
18
|
+
require("./node-title.less");
|
|
19
|
+
|
|
20
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
21
|
+
|
|
22
|
+
_marked.default.setOptions({
|
|
23
|
+
gfm: true,
|
|
24
|
+
breaks: true
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
var InnerNodeTitle = function InnerNodeTitle(props) {
|
|
28
|
+
var _props$node = props.node,
|
|
29
|
+
node = _props$node === void 0 ? {} : _props$node,
|
|
30
|
+
isRowFirst = props.isRowFirst,
|
|
31
|
+
sortIndex = props.sortIndex,
|
|
32
|
+
connectDragPreview = props.connectDragPreview,
|
|
33
|
+
connectDragSource = props.connectDragSource;
|
|
34
|
+
var _node$name = node.name,
|
|
35
|
+
name = _node$name === void 0 ? '' : _node$name,
|
|
36
|
+
isDir = node.isDir,
|
|
37
|
+
imgUrl = node.imgUrl;
|
|
38
|
+
console.log('InnerNodeTitlexxxx', node); // 文件夹
|
|
39
|
+
|
|
40
|
+
if (isDir) {
|
|
41
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
42
|
+
className: "folder"
|
|
43
|
+
}, name);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
47
|
+
className: "node-title-wrapper"
|
|
48
|
+
}, connectDragPreview(connectDragSource( /*#__PURE__*/_react.default.createElement("div", {
|
|
49
|
+
className: "node",
|
|
50
|
+
style: {
|
|
51
|
+
marginLeft: !isRowFirst ? -sortIndex : 0
|
|
52
|
+
}
|
|
53
|
+
}, /*#__PURE__*/_react.default.createElement("img", {
|
|
54
|
+
alt: name,
|
|
55
|
+
className: "node-icon",
|
|
56
|
+
src: imgUrl || _application.default
|
|
57
|
+
})))), /*#__PURE__*/_react.default.createElement("span", {
|
|
58
|
+
className: "label"
|
|
59
|
+
}, name));
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
var NodeTitle = (0, _reactDnd.DragSource)(_graph.DRAGGABLE_ALGO_COMPONENT, {
|
|
63
|
+
beginDrag: function beginDrag(props) {
|
|
64
|
+
return {
|
|
65
|
+
component: props.node
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
}, function (connect, monitor) {
|
|
69
|
+
return {
|
|
70
|
+
connectDragSource: connect.dragSource(),
|
|
71
|
+
connectDragPreview: connect.dragPreview(),
|
|
72
|
+
isDragging: monitor.isDragging()
|
|
73
|
+
};
|
|
74
|
+
})(InnerNodeTitle);
|
|
75
|
+
exports.NodeTitle = NodeTitle;
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
.node-title-wrapper {
|
|
2
|
+
//&:hover .node {
|
|
3
|
+
// transform: scale(1.1);
|
|
4
|
+
//}
|
|
5
|
+
.node {
|
|
6
|
+
display: flex;
|
|
7
|
+
align-items: center;
|
|
8
|
+
justify-content: center;
|
|
9
|
+
width: 100%;
|
|
10
|
+
height: 76px;
|
|
11
|
+
font-size: 12px;
|
|
12
|
+
background: #f2f2f2;
|
|
13
|
+
border: 1px dashed #a7a7a7;
|
|
14
|
+
cursor: move;
|
|
15
|
+
transition: all ease-in 0.3s;
|
|
16
|
+
.node-icon {
|
|
17
|
+
width: 23px;
|
|
18
|
+
height: 23px;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
.label {
|
|
22
|
+
display: inline-block;
|
|
23
|
+
width: 100%;
|
|
24
|
+
margin-top: 5px;
|
|
25
|
+
overflow: hidden;
|
|
26
|
+
font-size: 12px;
|
|
27
|
+
white-space: nowrap;
|
|
28
|
+
text-align: center;
|
|
29
|
+
text-overflow: ellipsis;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.keyword {
|
|
34
|
+
color: #f50;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.folder {
|
|
38
|
+
display: flex;
|
|
39
|
+
justify-content: space-between;
|
|
40
|
+
padding-right: 8px;
|
|
41
|
+
padding-left: 15px;
|
|
42
|
+
|
|
43
|
+
.label {
|
|
44
|
+
display: inline-block;
|
|
45
|
+
width: 184px;
|
|
46
|
+
overflow: hidden;
|
|
47
|
+
white-space: nowrap;
|
|
48
|
+
text-overflow: ellipsis;
|
|
49
|
+
}
|
|
50
|
+
.team {
|
|
51
|
+
float: right;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.ant-tree-title {
|
|
56
|
+
:local {
|
|
57
|
+
.doc {
|
|
58
|
+
position: absolute;
|
|
59
|
+
top: 0;
|
|
60
|
+
right: 5px;
|
|
61
|
+
color: transparent; // 防止拖拽时文档两个字被带进去
|
|
62
|
+
font-size: 10px;
|
|
63
|
+
line-height: 30px;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.popover {
|
|
69
|
+
width: 360px;
|
|
70
|
+
overflow: hidden;
|
|
71
|
+
.monitor {
|
|
72
|
+
margin: 8px 0;
|
|
73
|
+
b {
|
|
74
|
+
display: block;
|
|
75
|
+
line-height: 24px;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
.doclink {
|
|
79
|
+
padding: 8px 0 0;
|
|
80
|
+
}
|
|
81
|
+
.description {
|
|
82
|
+
max-height: 600px;
|
|
83
|
+
padding: 8px 4px;
|
|
84
|
+
overflow: auto;
|
|
85
|
+
word-break: break-all;
|
|
86
|
+
background: #fbfbfb;
|
|
87
|
+
border-radius: 4px;
|
|
88
|
+
|
|
89
|
+
h1,
|
|
90
|
+
h2,
|
|
91
|
+
h3,
|
|
92
|
+
h4,
|
|
93
|
+
h5,
|
|
94
|
+
h6,
|
|
95
|
+
a,
|
|
96
|
+
img,
|
|
97
|
+
p,
|
|
98
|
+
pre {
|
|
99
|
+
max-width: 100%;
|
|
100
|
+
margin: 0;
|
|
101
|
+
font-size: 12px !important;
|
|
102
|
+
line-height: 1.5em;
|
|
103
|
+
word-break: break-all !important;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.tag {
|
|
109
|
+
margin: 4px 0;
|
|
110
|
+
.label {
|
|
111
|
+
padding-right: 4px;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { paneDataItem } from './category-tree';
|
|
3
|
+
import './index.less';
|
|
4
|
+
interface Props {
|
|
5
|
+
/**
|
|
6
|
+
* @description classname
|
|
7
|
+
* @description.zh-CN classname
|
|
8
|
+
*/
|
|
9
|
+
className?: string;
|
|
10
|
+
/**
|
|
11
|
+
* @description available
|
|
12
|
+
* @description.zh-CN 菜单数据源头
|
|
13
|
+
*/
|
|
14
|
+
panelData?: paneDataItem[];
|
|
15
|
+
}
|
|
16
|
+
declare const ComponentTreePanel: React.FC<Props>;
|
|
17
|
+
export default ComponentTreePanel;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
|
|
10
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
11
|
+
|
|
12
|
+
var _categoryTree = _interopRequireDefault(require("./category-tree"));
|
|
13
|
+
|
|
14
|
+
require("./index.less");
|
|
15
|
+
|
|
16
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
|
+
|
|
18
|
+
var ComponentTreePanel = function ComponentTreePanel(props) {
|
|
19
|
+
var className = props.className,
|
|
20
|
+
_props$panelData = props.panelData,
|
|
21
|
+
panelData = _props$panelData === void 0 ? [] : _props$panelData;
|
|
22
|
+
console.log('ComponentTreePanelxxxxxxxx', panelData);
|
|
23
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
24
|
+
className: (0, _classnames.default)(className, 'node-source-tree-container', 'node-source-tree-shadow')
|
|
25
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
26
|
+
className: "tab-content-wrapper"
|
|
27
|
+
}, /*#__PURE__*/_react.default.createElement(_categoryTree.default, {
|
|
28
|
+
panelData: panelData
|
|
29
|
+
})));
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
var _default = ComponentTreePanel;
|
|
33
|
+
exports.default = _default;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
.node-source-tree-container {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
height: 100%;
|
|
5
|
+
margin-top: -1px;
|
|
6
|
+
|
|
7
|
+
.tab-wrapper {
|
|
8
|
+
display: flex;
|
|
9
|
+
flex-wrap: nowrap;
|
|
10
|
+
align-items: center;
|
|
11
|
+
height: 36px;
|
|
12
|
+
color: rgba(0, 0, 0, 0.65);
|
|
13
|
+
font-size: 12px;
|
|
14
|
+
background-color: #fff;
|
|
15
|
+
border-bottom: 1px solid rgba(0, 0, 0, 0.08);
|
|
16
|
+
|
|
17
|
+
.tab {
|
|
18
|
+
display: flex;
|
|
19
|
+
flex-grow: 1;
|
|
20
|
+
align-items: center;
|
|
21
|
+
justify-content: center;
|
|
22
|
+
height: 100%;
|
|
23
|
+
padding: 0 8px;
|
|
24
|
+
text-align: center;
|
|
25
|
+
cursor: pointer;
|
|
26
|
+
|
|
27
|
+
&:first-of-type {
|
|
28
|
+
border-right: 1px solid #f0f0f0;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
&:hover {
|
|
32
|
+
color: #1890ff;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
&.active {
|
|
36
|
+
color: #1890ff;
|
|
37
|
+
background-color: #f7f9fb;
|
|
38
|
+
cursor: default;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.tab-content-wrapper {
|
|
44
|
+
flex-grow: 1;
|
|
45
|
+
max-height: 100%;
|
|
46
|
+
overflow-y: auto;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.node-source-tree-shadow {
|
|
51
|
+
box-shadow: 0 2px 30px 0 rgba(0, 0, 0, 0.3);
|
|
52
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
declare type sourceType = 'device_attr' | 'device_event' | 'model_attr' | 'model_event';
|
|
3
|
+
declare type relationItem = {
|
|
4
|
+
/**
|
|
5
|
+
* @description type
|
|
6
|
+
* @description.zh-CN 类型:设备属性、设备事件、模式属性、模型事件
|
|
7
|
+
*/
|
|
8
|
+
type: 'device' | 'model';
|
|
9
|
+
/**
|
|
10
|
+
* @description type
|
|
11
|
+
* @description.zh-CN 类型:设备属性、设备事件、模式属性、模型事件
|
|
12
|
+
*/
|
|
13
|
+
source: sourceType;
|
|
14
|
+
/**
|
|
15
|
+
* @description targetId
|
|
16
|
+
* @description.zh-CN 设备id/模型id
|
|
17
|
+
*/
|
|
18
|
+
targetId: number | string;
|
|
19
|
+
/**
|
|
20
|
+
* @description targetName
|
|
21
|
+
* @description.zh-CN 设备名称/模型名称
|
|
22
|
+
*/
|
|
23
|
+
targetName: string;
|
|
24
|
+
/**
|
|
25
|
+
* @description modelId
|
|
26
|
+
* @description.zh-CN 属性id/事件id
|
|
27
|
+
*/
|
|
28
|
+
modelId: number | string;
|
|
29
|
+
/**
|
|
30
|
+
* @description modelName
|
|
31
|
+
* @description.zh-CN 属性名称/事件名称
|
|
32
|
+
*/
|
|
33
|
+
modelName: string;
|
|
34
|
+
};
|
|
35
|
+
interface Props {
|
|
36
|
+
defaultValue?: 'fixed' | 'variable';
|
|
37
|
+
relationData: {
|
|
38
|
+
[key: string]: {
|
|
39
|
+
meterAttrList?: relationItem[];
|
|
40
|
+
meterEventList?: relationItem[];
|
|
41
|
+
meterModelAttrs?: relationItem[];
|
|
42
|
+
meterModelEvents?: relationItem[];
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
value?: any;
|
|
46
|
+
onChange?: (value: any) => void;
|
|
47
|
+
}
|
|
48
|
+
declare const DataOrigin: React.FC<Props>;
|
|
49
|
+
export default DataOrigin;
|