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
|
@@ -31,7 +31,6 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
|
31
31
|
import { Graph } from '@antv/x6';
|
|
32
32
|
import { BehaviorSubject, fromEventPattern, merge } from 'rxjs';
|
|
33
33
|
import { debounceTime, map, tap, scan } from 'rxjs/operators';
|
|
34
|
-
import "./graph-core.less";
|
|
35
34
|
|
|
36
35
|
function setCellsSelectedStatus(cells, selected) {
|
|
37
36
|
cells.forEach(function (cell) {
|
|
@@ -57,31 +56,51 @@ export var GraphCore = /*#__PURE__*/function () {
|
|
|
57
56
|
// 节点移动的订阅
|
|
58
57
|
// 删除节点或连线的订阅
|
|
59
58
|
// 复制节点的订阅
|
|
59
|
+
// 撤销
|
|
60
60
|
function GraphCore(options) {
|
|
61
61
|
var _this = this;
|
|
62
62
|
|
|
63
63
|
_classCallCheck(this, GraphCore);
|
|
64
64
|
|
|
65
|
-
this
|
|
66
|
-
|
|
67
|
-
this
|
|
68
|
-
|
|
69
|
-
this
|
|
70
|
-
|
|
71
|
-
this
|
|
72
|
-
|
|
73
|
-
this
|
|
74
|
-
|
|
75
|
-
this
|
|
76
|
-
|
|
77
|
-
this
|
|
78
|
-
|
|
79
|
-
this
|
|
80
|
-
|
|
81
|
-
this
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
65
|
+
_defineProperty(this, "wrapper", void 0);
|
|
66
|
+
|
|
67
|
+
_defineProperty(this, "container", void 0);
|
|
68
|
+
|
|
69
|
+
_defineProperty(this, "nodeMetas", void 0);
|
|
70
|
+
|
|
71
|
+
_defineProperty(this, "edgeMetas", void 0);
|
|
72
|
+
|
|
73
|
+
_defineProperty(this, "options", void 0);
|
|
74
|
+
|
|
75
|
+
_defineProperty(this, "graph", void 0);
|
|
76
|
+
|
|
77
|
+
_defineProperty(this, "contextMenuInfo$", new BehaviorSubject(null));
|
|
78
|
+
|
|
79
|
+
_defineProperty(this, "selectedNodes$", new BehaviorSubject([]));
|
|
80
|
+
|
|
81
|
+
_defineProperty(this, "copyableNodeId$", new BehaviorSubject(''));
|
|
82
|
+
|
|
83
|
+
_defineProperty(this, "windowResizeSub", void 0);
|
|
84
|
+
|
|
85
|
+
_defineProperty(this, "contextMenuSub", void 0);
|
|
86
|
+
|
|
87
|
+
_defineProperty(this, "nodeContextMenuSub", void 0);
|
|
88
|
+
|
|
89
|
+
_defineProperty(this, "selectNodeSub", void 0);
|
|
90
|
+
|
|
91
|
+
_defineProperty(this, "connectNodeSub", void 0);
|
|
92
|
+
|
|
93
|
+
_defineProperty(this, "connectionRemovedSub", void 0);
|
|
94
|
+
|
|
95
|
+
_defineProperty(this, "moveNodesSub", void 0);
|
|
96
|
+
|
|
97
|
+
_defineProperty(this, "deleteNodeOrEdgeSub", void 0);
|
|
98
|
+
|
|
99
|
+
_defineProperty(this, "copyNodeSub", void 0);
|
|
100
|
+
|
|
101
|
+
_defineProperty(this, "undoNode", void 0);
|
|
102
|
+
|
|
103
|
+
_defineProperty(this, "resizeGraph", function () {
|
|
85
104
|
var graph = _this.graph,
|
|
86
105
|
wrapper = _this.wrapper;
|
|
87
106
|
|
|
@@ -92,104 +111,104 @@ export var GraphCore = /*#__PURE__*/function () {
|
|
|
92
111
|
graph.resize(width, height);
|
|
93
112
|
});
|
|
94
113
|
}
|
|
95
|
-
};
|
|
114
|
+
});
|
|
96
115
|
|
|
97
|
-
this
|
|
116
|
+
_defineProperty(this, "addNode", function (nodeMeta) {
|
|
98
117
|
var _this$nodeMetas;
|
|
99
118
|
|
|
100
119
|
(_this$nodeMetas = _this.nodeMetas) === null || _this$nodeMetas === void 0 ? void 0 : _this$nodeMetas.push(nodeMeta);
|
|
101
120
|
return _this.renderNode(nodeMeta);
|
|
102
|
-
};
|
|
121
|
+
});
|
|
103
122
|
|
|
104
|
-
this
|
|
123
|
+
_defineProperty(this, "addEdge", function (edgeMeta) {
|
|
105
124
|
var _this$edgeMetas;
|
|
106
125
|
|
|
107
126
|
(_this$edgeMetas = _this.edgeMetas) === null || _this$edgeMetas === void 0 ? void 0 : _this$edgeMetas.push(edgeMeta);
|
|
108
127
|
return _this.renderEdge(edgeMeta);
|
|
109
|
-
};
|
|
128
|
+
});
|
|
110
129
|
|
|
111
|
-
this
|
|
130
|
+
_defineProperty(this, "getNodeById", function (nodeId) {
|
|
112
131
|
var _this$graph;
|
|
113
132
|
|
|
114
133
|
var node = (_this$graph = _this.graph) === null || _this$graph === void 0 ? void 0 : _this$graph.getCellById(nodeId);
|
|
115
134
|
|
|
116
|
-
if (node
|
|
135
|
+
if (node !== null && node !== void 0 && node.isNode()) {
|
|
117
136
|
return node;
|
|
118
137
|
}
|
|
119
138
|
|
|
120
139
|
return undefined;
|
|
121
|
-
};
|
|
140
|
+
});
|
|
122
141
|
|
|
123
|
-
this
|
|
142
|
+
_defineProperty(this, "getNodes", function () {
|
|
124
143
|
var _this$graph2;
|
|
125
144
|
|
|
126
145
|
return ((_this$graph2 = _this.graph) === null || _this$graph2 === void 0 ? void 0 : _this$graph2.getNodes()) || [];
|
|
127
|
-
};
|
|
146
|
+
});
|
|
128
147
|
|
|
129
|
-
this
|
|
148
|
+
_defineProperty(this, "getEdgeById", function (nodeId) {
|
|
130
149
|
var _this$graph3;
|
|
131
150
|
|
|
132
151
|
var edge = (_this$graph3 = _this.graph) === null || _this$graph3 === void 0 ? void 0 : _this$graph3.getCellById(nodeId);
|
|
133
152
|
|
|
134
|
-
if (edge
|
|
153
|
+
if (edge !== null && edge !== void 0 && edge.isEdge()) {
|
|
135
154
|
return edge;
|
|
136
155
|
}
|
|
137
156
|
|
|
138
157
|
return undefined;
|
|
139
|
-
};
|
|
158
|
+
});
|
|
140
159
|
|
|
141
|
-
this
|
|
160
|
+
_defineProperty(this, "getEdges", function () {
|
|
142
161
|
var _this$graph4;
|
|
143
162
|
|
|
144
163
|
return ((_this$graph4 = _this.graph) === null || _this$graph4 === void 0 ? void 0 : _this$graph4.getEdges()) || [];
|
|
145
|
-
};
|
|
164
|
+
});
|
|
146
165
|
|
|
147
|
-
this
|
|
166
|
+
_defineProperty(this, "getCellById", function (cellId) {
|
|
148
167
|
var _this$graph5;
|
|
149
168
|
|
|
150
169
|
var cell = (_this$graph5 = _this.graph) === null || _this$graph5 === void 0 ? void 0 : _this$graph5.getCellById(cellId);
|
|
151
170
|
|
|
152
|
-
if (
|
|
171
|
+
if (cell !== null && cell !== void 0 && cell.isNode() || cell !== null && cell !== void 0 && cell.isEdge()) {
|
|
153
172
|
return cell;
|
|
154
173
|
}
|
|
155
174
|
|
|
156
175
|
return undefined;
|
|
157
|
-
};
|
|
176
|
+
});
|
|
158
177
|
|
|
159
|
-
this
|
|
178
|
+
_defineProperty(this, "getCells", function () {
|
|
160
179
|
var _this$graph6;
|
|
161
180
|
|
|
162
181
|
return ((_this$graph6 = _this.graph) === null || _this$graph6 === void 0 ? void 0 : _this$graph6.getCells()) || [];
|
|
163
|
-
};
|
|
182
|
+
});
|
|
164
183
|
|
|
165
|
-
this
|
|
184
|
+
_defineProperty(this, "updateNodeById", function (nodeId, handler) {
|
|
166
185
|
handler(_this.getNodeById(nodeId));
|
|
167
|
-
};
|
|
186
|
+
});
|
|
168
187
|
|
|
169
|
-
this
|
|
188
|
+
_defineProperty(this, "updateNodes", function (handler) {
|
|
170
189
|
handler(_this.getNodes());
|
|
171
|
-
};
|
|
190
|
+
});
|
|
172
191
|
|
|
173
|
-
this
|
|
192
|
+
_defineProperty(this, "updateEdgeById", function (edgeId, handler) {
|
|
174
193
|
var _this$graph7;
|
|
175
194
|
|
|
176
195
|
var edge = (_this$graph7 = _this.graph) === null || _this$graph7 === void 0 ? void 0 : _this$graph7.getCellById(edgeId);
|
|
177
196
|
|
|
178
|
-
if (edge
|
|
197
|
+
if (edge !== null && edge !== void 0 && edge.isEdge()) {
|
|
179
198
|
handler(edge);
|
|
180
199
|
} else {
|
|
181
200
|
handler(undefined);
|
|
182
201
|
}
|
|
183
|
-
};
|
|
202
|
+
});
|
|
184
203
|
|
|
185
|
-
this
|
|
204
|
+
_defineProperty(this, "updateEdges", function (handler) {
|
|
186
205
|
var _this$graph8;
|
|
187
206
|
|
|
188
207
|
var edges = ((_this$graph8 = _this.graph) === null || _this$graph8 === void 0 ? void 0 : _this$graph8.getEdges()) || [];
|
|
189
208
|
handler(edges);
|
|
190
|
-
};
|
|
209
|
+
});
|
|
191
210
|
|
|
192
|
-
this
|
|
211
|
+
_defineProperty(this, "deleteNodes", function (nodes) {
|
|
193
212
|
var _this$graph9;
|
|
194
213
|
|
|
195
214
|
var target = [].concat(nodes); // @ts-ignore
|
|
@@ -198,9 +217,9 @@ export var GraphCore = /*#__PURE__*/function () {
|
|
|
198
217
|
return !target.includes(nodeMeta.id);
|
|
199
218
|
});
|
|
200
219
|
(_this$graph9 = _this.graph) === null || _this$graph9 === void 0 ? void 0 : _this$graph9.removeCells(target);
|
|
201
|
-
};
|
|
220
|
+
});
|
|
202
221
|
|
|
203
|
-
this
|
|
222
|
+
_defineProperty(this, "deleteEdges", function (edges) {
|
|
204
223
|
var _this$graph10;
|
|
205
224
|
|
|
206
225
|
var target = [].concat(edges);
|
|
@@ -212,13 +231,13 @@ export var GraphCore = /*#__PURE__*/function () {
|
|
|
212
231
|
return !targetIds.includes(edgeMeta.id);
|
|
213
232
|
});
|
|
214
233
|
(_this$graph10 = _this.graph) === null || _this$graph10 === void 0 ? void 0 : _this$graph10.removeCells(target);
|
|
215
|
-
};
|
|
234
|
+
});
|
|
216
235
|
|
|
217
|
-
this
|
|
236
|
+
_defineProperty(this, "clearContextMenuInfo", function () {
|
|
218
237
|
_this.contextMenuInfo$.next(null);
|
|
219
|
-
};
|
|
238
|
+
});
|
|
220
239
|
|
|
221
|
-
this
|
|
240
|
+
_defineProperty(this, "zoom", function (factor) {
|
|
222
241
|
if (typeof factor === 'number') {
|
|
223
242
|
var _this$graph11;
|
|
224
243
|
|
|
@@ -235,9 +254,9 @@ export var GraphCore = /*#__PURE__*/function () {
|
|
|
235
254
|
(_this$graph13 = _this.graph) === null || _this$graph13 === void 0 ? void 0 : _this$graph13.scale(1);
|
|
236
255
|
(_this$graph14 = _this.graph) === null || _this$graph14 === void 0 ? void 0 : _this$graph14.centerContent();
|
|
237
256
|
}
|
|
238
|
-
};
|
|
257
|
+
});
|
|
239
258
|
|
|
240
|
-
this
|
|
259
|
+
_defineProperty(this, "toggleSelectionEnabled", function (enabled) {
|
|
241
260
|
var graph = _this.graph;
|
|
242
261
|
|
|
243
262
|
if (graph) {
|
|
@@ -251,9 +270,9 @@ export var GraphCore = /*#__PURE__*/function () {
|
|
|
251
270
|
graph.disableRubberband(); // graph.scroller.widget?.setCursor('grab', { silent: true })
|
|
252
271
|
}
|
|
253
272
|
}
|
|
254
|
-
};
|
|
273
|
+
});
|
|
255
274
|
|
|
256
|
-
this
|
|
275
|
+
_defineProperty(this, "selectNodes", function (ids) {
|
|
257
276
|
var graph = _this.graph;
|
|
258
277
|
|
|
259
278
|
if (graph) {
|
|
@@ -268,37 +287,37 @@ export var GraphCore = /*#__PURE__*/function () {
|
|
|
268
287
|
graph.scrollToCell(cell);
|
|
269
288
|
}
|
|
270
289
|
}
|
|
271
|
-
};
|
|
290
|
+
});
|
|
272
291
|
|
|
273
|
-
this
|
|
292
|
+
_defineProperty(this, "unSelectNode", function () {
|
|
274
293
|
var graph = _this.graph;
|
|
275
294
|
|
|
276
295
|
if (graph) {
|
|
277
296
|
graph.cleanSelection();
|
|
278
297
|
}
|
|
279
|
-
};
|
|
298
|
+
});
|
|
280
299
|
|
|
281
|
-
this
|
|
300
|
+
_defineProperty(this, "redo", function () {
|
|
282
301
|
var graph = _this.graph;
|
|
283
302
|
|
|
284
303
|
if (graph) {
|
|
285
304
|
graph.redo();
|
|
286
305
|
}
|
|
287
|
-
};
|
|
306
|
+
});
|
|
288
307
|
|
|
289
|
-
this
|
|
308
|
+
_defineProperty(this, "undo", function () {
|
|
290
309
|
var graph = _this.graph;
|
|
291
310
|
|
|
292
311
|
if (graph) {
|
|
293
312
|
graph.undo();
|
|
294
313
|
}
|
|
295
|
-
};
|
|
314
|
+
});
|
|
296
315
|
|
|
297
|
-
this
|
|
316
|
+
_defineProperty(this, "setCopyableNodeId", function (id) {
|
|
298
317
|
_this.copyableNodeId$.next(id);
|
|
299
|
-
};
|
|
318
|
+
});
|
|
300
319
|
|
|
301
|
-
this
|
|
320
|
+
_defineProperty(this, "throwRenderError", function () {
|
|
302
321
|
if (!_this.wrapper) {
|
|
303
322
|
throw new Error('Wrapper element is needed.');
|
|
304
323
|
}
|
|
@@ -314,7 +333,7 @@ export var GraphCore = /*#__PURE__*/function () {
|
|
|
314
333
|
if (!_this.edgeMetas) {
|
|
315
334
|
throw new Error('EdgeMetas could not be empty');
|
|
316
335
|
}
|
|
317
|
-
};
|
|
336
|
+
});
|
|
318
337
|
|
|
319
338
|
var _wrapper = options.wrapper,
|
|
320
339
|
container = options.container,
|
|
@@ -393,6 +412,7 @@ export var GraphCore = /*#__PURE__*/function () {
|
|
|
393
412
|
value: function render(params) {
|
|
394
413
|
var _this2 = this;
|
|
395
414
|
|
|
415
|
+
console.log('<<<<<<< core >>>>>> render');
|
|
396
416
|
this.setMeta(params);
|
|
397
417
|
|
|
398
418
|
if (this.isMetaValid) {
|
|
@@ -489,6 +509,9 @@ export var GraphCore = /*#__PURE__*/function () {
|
|
|
489
509
|
}, function (handler) {
|
|
490
510
|
graph.off('edge:connected', handler);
|
|
491
511
|
}).subscribe(function (args) {
|
|
512
|
+
// TODO connectNode
|
|
513
|
+
console.log('<<<<<<< core >>>>>> connectNode', args);
|
|
514
|
+
|
|
492
515
|
_this2.onConnectNode(args);
|
|
493
516
|
}); // 处理连线删除事件
|
|
494
517
|
|
|
@@ -496,7 +519,8 @@ export var GraphCore = /*#__PURE__*/function () {
|
|
|
496
519
|
graph.on('edge:removed', handler);
|
|
497
520
|
}, function (handler) {
|
|
498
521
|
graph.off('edge:removed', handler);
|
|
499
|
-
}
|
|
522
|
+
} // eslint-disable-next-line consistent-return
|
|
523
|
+
).subscribe(function (args) {
|
|
500
524
|
_this2.onConnectionRemoved(args);
|
|
501
525
|
}); // 处理节点移动事件
|
|
502
526
|
|
|
@@ -562,6 +586,14 @@ export var GraphCore = /*#__PURE__*/function () {
|
|
|
562
586
|
nodes: selectedNodes,
|
|
563
587
|
edges: selectedEdges
|
|
564
588
|
});
|
|
589
|
+
}); // 处理删除节点或连线事件
|
|
590
|
+
|
|
591
|
+
this.undoNode = fromEventPattern(function (handler) {
|
|
592
|
+
graph.bindKey(['ctrl+z'], handler);
|
|
593
|
+
}, function () {
|
|
594
|
+
graph.unbindKey(['ctrl+z']);
|
|
595
|
+
}).subscribe(function () {
|
|
596
|
+
graph.undo();
|
|
565
597
|
}); // 处理节点复制事件
|
|
566
598
|
|
|
567
599
|
this.copyNodeSub = fromEventPattern(function (handler) {
|
|
@@ -587,7 +619,7 @@ export var GraphCore = /*#__PURE__*/function () {
|
|
|
587
619
|
switch (action) {
|
|
588
620
|
case 'command+c':
|
|
589
621
|
case 'ctrl+c':
|
|
590
|
-
if (selectedCells
|
|
622
|
+
if (selectedCells !== null && selectedCells !== void 0 && selectedCells.length) {
|
|
591
623
|
_this2.setCopyableNodeId(selectedCells[0].id); // 当前只支持单节点的复制粘贴
|
|
592
624
|
|
|
593
625
|
}
|
|
@@ -613,20 +645,20 @@ export var GraphCore = /*#__PURE__*/function () {
|
|
|
613
645
|
}, {
|
|
614
646
|
key: "renderNode",
|
|
615
647
|
value: function renderNode(nodeMeta) {
|
|
616
|
-
console.log('renderNode => ', nodeMeta);
|
|
648
|
+
console.log('<<<<<<< core >>>>>> renderNode => ', nodeMeta);
|
|
617
649
|
return this.graph.addNode(nodeMeta);
|
|
618
650
|
}
|
|
619
651
|
}, {
|
|
620
652
|
key: "renderEdge",
|
|
621
653
|
value: function renderEdge(edgeMeta) {
|
|
622
|
-
console.log('renderEdge => ', edgeMeta);
|
|
654
|
+
console.log('<<<<<<< core >>>>>> renderEdge => ', edgeMeta);
|
|
623
655
|
return this.graph.addEdge(edgeMeta);
|
|
624
656
|
}
|
|
625
657
|
}, {
|
|
626
658
|
key: "afterLayout",
|
|
627
659
|
value: function afterLayout() {
|
|
628
660
|
if (process.env.NODE_ENV === 'development') {
|
|
629
|
-
console.log('[GraphCore] call afterLayout');
|
|
661
|
+
console.log('<<<<<<< core >>>>>> [GraphCore] call afterLayout');
|
|
630
662
|
}
|
|
631
663
|
}
|
|
632
664
|
}, {
|
|
@@ -638,14 +670,14 @@ export var GraphCore = /*#__PURE__*/function () {
|
|
|
638
670
|
key: "onContextMenu",
|
|
639
671
|
value: function onContextMenu(data) {
|
|
640
672
|
if (process.env.NODE_ENV === 'development') {
|
|
641
|
-
console.log('[GraphCore] context menu info:', data);
|
|
673
|
+
console.log('<<<<<<< core >>>>>> [GraphCore] context menu info:', data);
|
|
642
674
|
}
|
|
643
675
|
}
|
|
644
676
|
}, {
|
|
645
677
|
key: "onNodeContextMenu",
|
|
646
678
|
value: function onNodeContextMenu(data) {
|
|
647
679
|
if (process.env.NODE_ENV === 'development') {
|
|
648
|
-
console.log('[GraphCore] context menu info:', data);
|
|
680
|
+
console.log('<<<<<<< core >>>>>> [GraphCore] context menu info:', data);
|
|
649
681
|
}
|
|
650
682
|
}
|
|
651
683
|
}, {
|
|
@@ -654,35 +686,35 @@ export var GraphCore = /*#__PURE__*/function () {
|
|
|
654
686
|
this.selectedNodes$.next(nodes);
|
|
655
687
|
|
|
656
688
|
if (process.env.NODE_ENV === 'development') {
|
|
657
|
-
console.log('[GraphCore] select nodes:', nodes);
|
|
689
|
+
console.log('<<<<<<< core >>>>>> [GraphCore] select nodes:', nodes);
|
|
658
690
|
}
|
|
659
691
|
}
|
|
660
692
|
}, {
|
|
661
693
|
key: "onConnectNode",
|
|
662
694
|
value: function onConnectNode(args) {
|
|
663
695
|
if (process.env.NODE_ENV === 'development') {
|
|
664
|
-
console.log('[GraphCore] connect nodes:', args);
|
|
696
|
+
console.log('<<<<<<< core >>>>>> [GraphCore] connect nodes:', args);
|
|
665
697
|
}
|
|
666
698
|
}
|
|
667
699
|
}, {
|
|
668
700
|
key: "onConnectionRemoved",
|
|
669
701
|
value: function onConnectionRemoved(args) {
|
|
670
702
|
if (process.env.NODE_ENV === 'development') {
|
|
671
|
-
console.log('[GraphCore] delete connection:', args);
|
|
703
|
+
console.log('<<<<<<< core >>>>>> [GraphCore] delete connection:', args);
|
|
672
704
|
}
|
|
673
705
|
}
|
|
674
706
|
}, {
|
|
675
707
|
key: "onMoveNodeStart",
|
|
676
708
|
value: function onMoveNodeStart(args) {
|
|
677
709
|
if (process.env.NODE_ENV === 'development') {
|
|
678
|
-
console.log('[GraphCore] move nodes start:', args);
|
|
710
|
+
console.log('<<<<<<< core >>>>>> [GraphCore] move nodes start:', args);
|
|
679
711
|
}
|
|
680
712
|
}
|
|
681
713
|
}, {
|
|
682
714
|
key: "onMoveNodes",
|
|
683
715
|
value: function onMoveNodes(args) {
|
|
684
716
|
if (process.env.NODE_ENV === 'development') {
|
|
685
|
-
console.log('[GraphCore] move nodes:', args);
|
|
717
|
+
console.log('<<<<<<< core >>>>>> [GraphCore] move nodes:', args);
|
|
686
718
|
}
|
|
687
719
|
} // 按下删除键的回调,默认参数为当前选中的节点和边
|
|
688
720
|
|
|
@@ -690,7 +722,7 @@ export var GraphCore = /*#__PURE__*/function () {
|
|
|
690
722
|
key: "onDeleteNodeOrEdge",
|
|
691
723
|
value: function onDeleteNodeOrEdge(args) {
|
|
692
724
|
if (process.env.NODE_ENV === 'development') {
|
|
693
|
-
console.log('[GraphCore] delete nodes or edge:', args);
|
|
725
|
+
console.log('<<<<<<< core >>>>>> [GraphCore] delete nodes or edge:', args);
|
|
694
726
|
}
|
|
695
727
|
} // 校验节点是否可复制,为 true 则可被用于复制
|
|
696
728
|
|
|
@@ -698,7 +730,7 @@ export var GraphCore = /*#__PURE__*/function () {
|
|
|
698
730
|
key: "validateNodeCopyable",
|
|
699
731
|
value: function validateNodeCopyable(node) {
|
|
700
732
|
if (process.env.NODE_ENV === 'development') {
|
|
701
|
-
console.log('[GraphCore] validate nodes copyable:', node);
|
|
733
|
+
console.log('<<<<<<< core >>>>>> [GraphCore] validate nodes copyable:', node);
|
|
702
734
|
}
|
|
703
735
|
|
|
704
736
|
return true;
|
|
@@ -708,7 +740,7 @@ export var GraphCore = /*#__PURE__*/function () {
|
|
|
708
740
|
key: "onCopyNode",
|
|
709
741
|
value: function onCopyNode(copyNode) {
|
|
710
742
|
if (process.env.NODE_ENV === 'development') {
|
|
711
|
-
console.log('[GraphCore] copy nodes:', copyNode);
|
|
743
|
+
console.log('<<<<<<< core >>>>>> [GraphCore] copy nodes:', copyNode);
|
|
712
744
|
}
|
|
713
745
|
}
|
|
714
746
|
/* 以下为主动触发的方法 */
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import type { EdgeView } from '@antv/x6';
|
|
2
|
+
|
|
3
|
+
// 实验
|
|
4
|
+
export namespace NExperiment {
|
|
5
|
+
export interface Experiment {
|
|
6
|
+
description: string;
|
|
7
|
+
name: string;
|
|
8
|
+
id: number;
|
|
9
|
+
gmtCreate: string;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
// 实验图
|
|
14
|
+
export namespace NExperimentGraph {
|
|
15
|
+
export interface ExperimentGraph {
|
|
16
|
+
nodes: Node[];
|
|
17
|
+
groups: Group[];
|
|
18
|
+
links: Link[];
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export interface ModalParams {
|
|
22
|
+
type: string;
|
|
23
|
+
experimentId: string;
|
|
24
|
+
nodeInstanceId?: number;
|
|
25
|
+
node?: Node;
|
|
26
|
+
ctx?: any;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export interface ContextMenuInfo {
|
|
30
|
+
type: 'edge' | 'graph';
|
|
31
|
+
data: EdgeView.PositionEventArgs<any>;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export interface Node {
|
|
35
|
+
outPorts: OutPort[];
|
|
36
|
+
inPorts: InPort[];
|
|
37
|
+
positionX: number;
|
|
38
|
+
positionY: number;
|
|
39
|
+
codeName?: string;
|
|
40
|
+
category?: string;
|
|
41
|
+
name: string;
|
|
42
|
+
id: string;
|
|
43
|
+
nodeInstanceId?: number;
|
|
44
|
+
groupId?: number;
|
|
45
|
+
status?: number;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export interface Port {
|
|
49
|
+
sequence: number;
|
|
50
|
+
id: string;
|
|
51
|
+
description?: string;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export type OutPort = Port;
|
|
55
|
+
|
|
56
|
+
export type InPort = Port;
|
|
57
|
+
|
|
58
|
+
export interface Group {
|
|
59
|
+
isCollapsed: boolean;
|
|
60
|
+
experimentId: number;
|
|
61
|
+
name: string;
|
|
62
|
+
id: number;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export interface Link {
|
|
66
|
+
inputPortId: number;
|
|
67
|
+
outputPortId: number;
|
|
68
|
+
source: number;
|
|
69
|
+
type?: string;
|
|
70
|
+
target: number;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
// 执行状态
|
|
75
|
+
export namespace NExecutionStatus {
|
|
76
|
+
// 当前选中的组件
|
|
77
|
+
export interface ActiveNode {
|
|
78
|
+
type: 'legacy' | 'algo';
|
|
79
|
+
[k: string]: any;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export interface ExecDetail {
|
|
83
|
+
defName: string;
|
|
84
|
+
quickViewData: QuickViewData;
|
|
85
|
+
jobStatus: string;
|
|
86
|
+
percentage: number;
|
|
87
|
+
lastTime: number;
|
|
88
|
+
name: string;
|
|
89
|
+
startTime: string;
|
|
90
|
+
endTime: string;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
// 模型
|
|
95
|
+
export namespace NModel {
|
|
96
|
+
export interface Model {
|
|
97
|
+
codeName: string;
|
|
98
|
+
isNew: boolean;
|
|
99
|
+
catId: number;
|
|
100
|
+
parentId: number;
|
|
101
|
+
category: string;
|
|
102
|
+
owner: string;
|
|
103
|
+
name: string;
|
|
104
|
+
id: number;
|
|
105
|
+
type: string;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Graph } from '@antv/x6';
|
|
2
|
+
Graph.registerConnector('pai', function (s, t) {
|
|
3
|
+
var offset = 4;
|
|
4
|
+
var control = 80;
|
|
5
|
+
var v1 = {
|
|
6
|
+
x: s.x,
|
|
7
|
+
y: s.y + offset + control
|
|
8
|
+
};
|
|
9
|
+
var v2 = {
|
|
10
|
+
x: t.x,
|
|
11
|
+
y: t.y - offset - control
|
|
12
|
+
};
|
|
13
|
+
return "\n M ".concat(s.x, " ").concat(s.y, "\n L ").concat(s.x, " ").concat(s.y + offset, "\n C ").concat(v1.x, " ").concat(v1.y, " ").concat(v2.x, " ").concat(v2.y, " ").concat(t.x, " ").concat(t.y - offset, "\n L ").concat(t.x, " ").concat(t.y, "\n ");
|
|
14
|
+
}, true);
|