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
|
@@ -1,20 +1,19 @@
|
|
|
1
1
|
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
2
|
|
|
3
|
-
import "antd/es/message/style";
|
|
4
|
-
import _message from "antd/es/message";
|
|
5
|
-
import "antd/es/tooltip/style";
|
|
6
|
-
import _Tooltip from "antd/es/tooltip";
|
|
7
|
-
import "antd/es/config-provider/style";
|
|
8
|
-
import _ConfigProvider from "antd/es/config-provider";
|
|
9
|
-
|
|
10
3
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
11
4
|
|
|
12
5
|
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
13
6
|
|
|
7
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
8
|
+
|
|
14
9
|
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
15
10
|
|
|
16
11
|
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
17
12
|
|
|
13
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
14
|
+
|
|
15
|
+
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return generator._invoke = function (innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; }(innerFn, self, context), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; this._invoke = function (method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); }; } function maybeInvokeDelegate(delegate, context) { var method = delegate.iterator[context.method]; if (undefined === method) { if (context.delegate = null, "throw" === context.method) { if (delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel; context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method"); } return ContinueSentinel; } var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) { if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; } return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, define(Gp, "constructor", GeneratorFunctionPrototype), define(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (object) { var keys = []; for (var key in object) { keys.push(key); } return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) { "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); } }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, catch: function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
|
16
|
+
|
|
18
17
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
19
18
|
|
|
20
19
|
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
@@ -23,8 +22,6 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
|
23
22
|
|
|
24
23
|
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; }
|
|
25
24
|
|
|
26
|
-
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; }
|
|
27
|
-
|
|
28
25
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
29
26
|
|
|
30
27
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
@@ -33,7 +30,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
|
|
33
30
|
|
|
34
31
|
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
35
32
|
|
|
36
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf
|
|
33
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
37
34
|
|
|
38
35
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
39
36
|
|
|
@@ -43,58 +40,36 @@ function _assertThisInitialized(self) { if (self === void 0) { throw new Referen
|
|
|
43
40
|
|
|
44
41
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
45
42
|
|
|
46
|
-
function _get() { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }
|
|
43
|
+
function _get() { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }
|
|
47
44
|
|
|
48
45
|
function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }
|
|
49
46
|
|
|
50
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
51
|
-
|
|
52
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
47
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
53
48
|
|
|
54
|
-
function
|
|
55
|
-
|
|
56
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
57
|
-
|
|
58
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
59
|
-
|
|
60
|
-
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
61
|
-
|
|
62
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
49
|
+
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; }
|
|
63
50
|
|
|
64
51
|
import React, { useEffect } from 'react';
|
|
65
52
|
import ReactDOM from 'react-dom';
|
|
66
|
-
import { ANT_PREFIX } from "../../common/constants/global";
|
|
67
53
|
import classnames from 'classnames';
|
|
68
54
|
import { BehaviorSubject, fromEventPattern } from 'rxjs';
|
|
69
55
|
import { filter, take } from 'rxjs/operators';
|
|
70
56
|
import { round } from 'lodash-es';
|
|
71
57
|
import produce from 'immer';
|
|
72
|
-
import {
|
|
73
|
-
import {
|
|
74
|
-
import {
|
|
75
|
-
import
|
|
76
|
-
import
|
|
77
|
-
import {
|
|
78
|
-
import {
|
|
79
|
-
import {
|
|
80
|
-
import {
|
|
81
|
-
import
|
|
82
|
-
import
|
|
83
|
-
import
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
Object.entries(execInfo).forEach(function (_ref) {
|
|
88
|
-
var _ref2 = _slicedToArray(_ref, 2),
|
|
89
|
-
id = _ref2[0],
|
|
90
|
-
val = _ref2[1];
|
|
91
|
-
|
|
92
|
-
// 更新execInfo中的执行状态,后端可能不同步
|
|
93
|
-
// eslint-disable-next-line no-param-reassign
|
|
94
|
-
val.jobStatus = instStatus[id];
|
|
95
|
-
});
|
|
96
|
-
return data;
|
|
97
|
-
}
|
|
58
|
+
import { ConfigProvider, message, Tooltip } from 'antd';
|
|
59
|
+
import { RERENDER_EVENT } from "../graph-common/graph";
|
|
60
|
+
import { GraphCore } from "../graph-core";
|
|
61
|
+
import { CommonNode, ConditionJudgment, LogicalNode, ApplicationNode } from "./graph-model/node";
|
|
62
|
+
import GuideEdge from "../graph-model/edge";
|
|
63
|
+
import { GroupEdge } from "./graph-model/edge";
|
|
64
|
+
import { expandGroupAccordingToNodes, formatGraphData, formatNodeInfoToNodeMeta } from "../graph-core/graph-util";
|
|
65
|
+
import { addNode, copyNode } from "./graph-utils/graph";
|
|
66
|
+
import { COMMONLY_USED, COMPONENTS_TYPE, SIGN_OPERATION } from "./node-types";
|
|
67
|
+
import { Graph } from '@antv/x6';
|
|
68
|
+
import ConditionElement from "./graph-model/node/condition-node/condition-element";
|
|
69
|
+
import LogicalElement from "./graph-model/node/logical-node/logical-element";
|
|
70
|
+
import ApplicationElement from "./graph-model/node/application-node/application-element";
|
|
71
|
+
import NodeElement from "./graph-model/node/common-node/node-element";
|
|
72
|
+
var ANT_PREFIX = ';ant';
|
|
98
73
|
|
|
99
74
|
var ExperimentGraph = /*#__PURE__*/function (_GraphCore) {
|
|
100
75
|
_inherits(ExperimentGraph, _GraphCore);
|
|
@@ -111,8 +86,6 @@ var ExperimentGraph = /*#__PURE__*/function (_GraphCore) {
|
|
|
111
86
|
// 实验数据
|
|
112
87
|
// 实验图数据
|
|
113
88
|
// 当前选中节点
|
|
114
|
-
// 当前弹窗
|
|
115
|
-
// 当前选中的群组
|
|
116
89
|
// 图数据的订阅
|
|
117
90
|
// 查询执行状态的定时器订阅
|
|
118
91
|
// 主动触发的重新渲染订阅
|
|
@@ -124,6 +97,7 @@ var ExperimentGraph = /*#__PURE__*/function (_GraphCore) {
|
|
|
124
97
|
_this = _super.call(this, {
|
|
125
98
|
history: true,
|
|
126
99
|
frozen: true,
|
|
100
|
+
// 异步渲染的画布是否处于冻结状态,处于冻结状态的画布不会立即响应画布中节点和边的变更,直到调用 unfreeze(...) 方法来解除冻结并重新渲染画布。
|
|
127
101
|
background: {
|
|
128
102
|
color: '#ffffff'
|
|
129
103
|
},
|
|
@@ -131,39 +105,60 @@ var ExperimentGraph = /*#__PURE__*/function (_GraphCore) {
|
|
|
131
105
|
size: 10,
|
|
132
106
|
visible: true,
|
|
133
107
|
type: 'doubleMesh',
|
|
108
|
+
// 'dot' | 'fixedDot' | 'mesh' | 'doubleMesh'
|
|
134
109
|
args: [{
|
|
135
110
|
color: '#DCDCDC',
|
|
111
|
+
// 主网格线颜色
|
|
136
112
|
thickness: 2 // 主网格线宽度
|
|
137
113
|
|
|
138
114
|
}, {
|
|
139
115
|
color: '#F3F3F3',
|
|
116
|
+
// 次网格线颜色
|
|
140
117
|
thickness: 1,
|
|
118
|
+
// 次网格线宽度
|
|
141
119
|
factor: 2 // 主次网格线间隔
|
|
142
120
|
|
|
143
121
|
}]
|
|
144
122
|
},
|
|
123
|
+
// 网格线
|
|
145
124
|
snapline: true,
|
|
125
|
+
// 对齐线
|
|
146
126
|
selecting: {
|
|
147
127
|
enabled: true,
|
|
148
128
|
rubberband: false,
|
|
129
|
+
// 是否启用框选
|
|
149
130
|
multiple: true,
|
|
131
|
+
// 是否启用点击多选
|
|
150
132
|
strict: true,
|
|
133
|
+
// 启用框选时,选框完全包围节点时才选中节点,否则只需要选框与节点的包围盒(BBox)相交即可选中节点,默认为 false。
|
|
151
134
|
showNodeSelectionBox: false,
|
|
135
|
+
// 是否显示节点的选择框
|
|
152
136
|
selectNodeOnMoved: false
|
|
153
137
|
},
|
|
138
|
+
// 点选/框选
|
|
154
139
|
keyboard: {
|
|
155
140
|
enabled: true
|
|
156
141
|
},
|
|
142
|
+
// 键盘快捷键
|
|
157
143
|
connecting: {
|
|
158
144
|
snap: {
|
|
159
145
|
radius: 10
|
|
160
146
|
},
|
|
147
|
+
// 当 snap 设置为 true 时连线的过程中距离节点或者连接桩 50px 时会触发自动吸附,可以通过配置 radius 属性自定义触发吸附的距离。当 snap 设置为 false 时不会触发自动吸附。默认值为 false。
|
|
161
148
|
allowBlank: false,
|
|
149
|
+
// 是否允许连接到画布空白位置的点
|
|
150
|
+
allowMulti: false,
|
|
162
151
|
highlight: true,
|
|
163
|
-
|
|
152
|
+
// 拖动边时,是否高亮显示所有可用的连接桩或节点
|
|
153
|
+
router: 'manhattan',
|
|
154
|
+
// 路由
|
|
155
|
+
// connector: 'pai', // 连接器将起点、路由返回的点、终点加工为 元素的 d 属性,决定了边渲染到画布后的样式,默认值为 normal。
|
|
164
156
|
sourceAnchor: 'bottom',
|
|
157
|
+
// 当连接到节点时,通过 sourceAnchor 来指定源节点的锚点。
|
|
165
158
|
targetAnchor: 'center',
|
|
159
|
+
// 当连接到节点时,通过 targetAnchor 来指定目标节点的锚点。
|
|
166
160
|
connectionPoint: 'anchor',
|
|
161
|
+
// 指定连接点,默认值为 boundary。
|
|
167
162
|
createEdge: function createEdge() {
|
|
168
163
|
return new GuideEdge({
|
|
169
164
|
attrs: {
|
|
@@ -185,19 +180,20 @@ var ExperimentGraph = /*#__PURE__*/function (_GraphCore) {
|
|
|
185
180
|
var _edge$target;
|
|
186
181
|
|
|
187
182
|
var edge = args.edge;
|
|
188
|
-
return !!(edge
|
|
183
|
+
return !!(edge !== null && edge !== void 0 && (_edge$target = edge.target) !== null && _edge$target !== void 0 && _edge$target.port);
|
|
189
184
|
},
|
|
185
|
+
// 连接的过程中创建新的边
|
|
190
186
|
// 是否触发交互事件 点击 magnet 时 根据 validateMagnet 返回值来判断是否新增边,触发时机是 magnet 被按下,如果返回 false,则没有任何反应,如果返回 true,会在当前 magnet 创建一条新的边。
|
|
191
|
-
validateMagnet: function validateMagnet(
|
|
192
|
-
var magnet =
|
|
187
|
+
validateMagnet: function validateMagnet(_ref) {
|
|
188
|
+
var magnet = _ref.magnet;
|
|
193
189
|
return magnet.getAttribute('port-group') !== 'in';
|
|
194
190
|
},
|
|
195
191
|
// 显示可用的链接桩 在移动边的时候判断连接是否有效,如果返回 false,当鼠标放开的时候,不会连接到当前元素,否则会连接到当前元素。
|
|
196
|
-
validateConnection: function validateConnection(
|
|
197
|
-
var sourceView =
|
|
198
|
-
targetView =
|
|
199
|
-
sourceMagnet =
|
|
200
|
-
targetMagnet =
|
|
192
|
+
validateConnection: function validateConnection(_ref2) {
|
|
193
|
+
var sourceView = _ref2.sourceView,
|
|
194
|
+
targetView = _ref2.targetView,
|
|
195
|
+
sourceMagnet = _ref2.sourceMagnet,
|
|
196
|
+
targetMagnet = _ref2.targetMagnet;
|
|
201
197
|
|
|
202
198
|
// 不允许连接到自己
|
|
203
199
|
if (sourceView === targetView) {
|
|
@@ -221,13 +217,22 @@ var ExperimentGraph = /*#__PURE__*/function (_GraphCore) {
|
|
|
221
217
|
return !!port;
|
|
222
218
|
}
|
|
223
219
|
},
|
|
220
|
+
// 配置全局的连线规则
|
|
224
221
|
scroller: {
|
|
225
222
|
enabled: true,
|
|
226
223
|
pageVisible: false,
|
|
224
|
+
// 是否分页,默认为 false。
|
|
227
225
|
pageBreak: false,
|
|
226
|
+
// 是否显示分页符,默认为 false。
|
|
228
227
|
pannable: true // 是否启用画布平移能力(在空白位置按下鼠标后拖动平移画布),默认为 false。
|
|
229
228
|
|
|
230
229
|
},
|
|
230
|
+
// 使画布具备滚动、平移、居中、缩放等能力
|
|
231
|
+
mousewheel: {
|
|
232
|
+
enabled: true // modifiers: ['ctrl', 'meta'],
|
|
233
|
+
|
|
234
|
+
},
|
|
235
|
+
// 用滚轮来缩放画布
|
|
231
236
|
highlighting: {
|
|
232
237
|
nodeAvailable: {
|
|
233
238
|
name: 'className',
|
|
@@ -235,12 +240,14 @@ var ExperimentGraph = /*#__PURE__*/function (_GraphCore) {
|
|
|
235
240
|
className: 'available'
|
|
236
241
|
}
|
|
237
242
|
},
|
|
243
|
+
// 连线过程中,节点可以被链接时被使用
|
|
238
244
|
magnetAvailable: {
|
|
239
245
|
name: 'className',
|
|
240
246
|
args: {
|
|
241
247
|
className: 'available'
|
|
242
248
|
}
|
|
243
249
|
},
|
|
250
|
+
// 连线过程中,链接桩可以被链接时被使用
|
|
244
251
|
magnetAdsorbed: {
|
|
245
252
|
name: 'className',
|
|
246
253
|
args: {
|
|
@@ -249,6 +256,7 @@ var ExperimentGraph = /*#__PURE__*/function (_GraphCore) {
|
|
|
249
256
|
} // 连线过程中,自动吸附到链接桩时被使用
|
|
250
257
|
|
|
251
258
|
},
|
|
259
|
+
// 触发某种交互时的高亮样式
|
|
252
260
|
// 当某个链接桩渲染完成时触发的回调。
|
|
253
261
|
onPortRendered: function onPortRendered(args) {
|
|
254
262
|
var port = args.port;
|
|
@@ -257,9 +265,9 @@ var ExperimentGraph = /*#__PURE__*/function (_GraphCore) {
|
|
|
257
265
|
var placement = port.group === 'in' ? 'top' : 'bottom';
|
|
258
266
|
|
|
259
267
|
if (container) {
|
|
260
|
-
ReactDOM.render( /*#__PURE__*/React.createElement(
|
|
268
|
+
ReactDOM.render( /*#__PURE__*/React.createElement(ConfigProvider, {
|
|
261
269
|
prefixCls: ANT_PREFIX
|
|
262
|
-
}, /*#__PURE__*/React.createElement(
|
|
270
|
+
}, /*#__PURE__*/React.createElement(Tooltip, {
|
|
263
271
|
title: port.description,
|
|
264
272
|
placement: placement
|
|
265
273
|
}, /*#__PURE__*/React.createElement("span", {
|
|
@@ -270,27 +278,37 @@ var ExperimentGraph = /*#__PURE__*/function (_GraphCore) {
|
|
|
270
278
|
}
|
|
271
279
|
}
|
|
272
280
|
});
|
|
273
|
-
|
|
274
|
-
_this
|
|
275
|
-
|
|
276
|
-
_this
|
|
277
|
-
|
|
278
|
-
_this
|
|
279
|
-
|
|
280
|
-
_this
|
|
281
|
-
|
|
282
|
-
_this
|
|
283
|
-
|
|
284
|
-
_this
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
281
|
+
|
|
282
|
+
_defineProperty(_assertThisInitialized(_this), "nodeMetas", void 0);
|
|
283
|
+
|
|
284
|
+
_defineProperty(_assertThisInitialized(_this), "edgeMetas", void 0);
|
|
285
|
+
|
|
286
|
+
_defineProperty(_assertThisInitialized(_this), "pendingNodes", []);
|
|
287
|
+
|
|
288
|
+
_defineProperty(_assertThisInitialized(_this), "experimentId", void 0);
|
|
289
|
+
|
|
290
|
+
_defineProperty(_assertThisInitialized(_this), "loading$", new BehaviorSubject(false));
|
|
291
|
+
|
|
292
|
+
_defineProperty(_assertThisInitialized(_this), "experiment$", new BehaviorSubject(null));
|
|
293
|
+
|
|
294
|
+
_defineProperty(_assertThisInitialized(_this), "experimentGraph$", new BehaviorSubject(null));
|
|
295
|
+
|
|
296
|
+
_defineProperty(_assertThisInitialized(_this), "activeNodeInstance$", new BehaviorSubject(null));
|
|
297
|
+
|
|
298
|
+
_defineProperty(_assertThisInitialized(_this), "experimentGraphSub", void 0);
|
|
299
|
+
|
|
300
|
+
_defineProperty(_assertThisInitialized(_this), "executionStatusQuerySub", void 0);
|
|
301
|
+
|
|
302
|
+
_defineProperty(_assertThisInitialized(_this), "reRenderSub", void 0);
|
|
303
|
+
|
|
304
|
+
_defineProperty(_assertThisInitialized(_this), "renderGraph", function (wrapper, container) {
|
|
288
305
|
var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
289
306
|
console.log('renderGraph');
|
|
290
307
|
_this.experimentGraphSub = _this.experimentGraph$.pipe(filter(function (x) {
|
|
291
308
|
return !!x;
|
|
292
309
|
}), // 过滤出有效数据
|
|
293
|
-
take(1)
|
|
310
|
+
take(1) // 只做一次挂载渲染
|
|
311
|
+
).subscribe(function (graphData) {
|
|
294
312
|
if (!_this.graph) {
|
|
295
313
|
var _formatGraphData = formatGraphData(graphData),
|
|
296
314
|
nodes = _formatGraphData.nodes,
|
|
@@ -311,12 +329,17 @@ var ExperimentGraph = /*#__PURE__*/function (_GraphCore) {
|
|
|
311
329
|
}, function (handler) {
|
|
312
330
|
window.removeEventListener(RERENDER_EVENT, handler);
|
|
313
331
|
}).subscribe(_this.handlerResize);
|
|
314
|
-
};
|
|
332
|
+
});
|
|
315
333
|
|
|
316
|
-
_this
|
|
317
|
-
|
|
334
|
+
_defineProperty(_assertThisInitialized(_this), "registerEdge", function () {
|
|
335
|
+
Graph.registerEdge('group-edge', GroupEdge);
|
|
336
|
+
});
|
|
337
|
+
|
|
338
|
+
_defineProperty(_assertThisInitialized(_this), "createTypeNodeMeta", function (nodeMeta, nodeType, experimentId) {
|
|
339
|
+
console.log('===================== createTypeNodeMeta', nodeMeta);
|
|
318
340
|
var data = nodeMeta.data;
|
|
319
|
-
var
|
|
341
|
+
var _ref3 = data,
|
|
342
|
+
type = _ref3.type; // 节点
|
|
320
343
|
|
|
321
344
|
if (type === 'node') {
|
|
322
345
|
/* 条件判断 */
|
|
@@ -331,17 +354,26 @@ var ExperimentGraph = /*#__PURE__*/function (_GraphCore) {
|
|
|
331
354
|
/* 逻辑运算 */
|
|
332
355
|
|
|
333
356
|
|
|
334
|
-
if (nodeType === SIGN_OPERATION.LOGICAL) {
|
|
357
|
+
if (nodeType === SIGN_OPERATION.LOGICAL || nodeType === COMMONLY_USED.LOCKED) {
|
|
335
358
|
return _this.graph.addNode(new LogicalNode(_objectSpread(_objectSpread({}, nodeMeta), {}, {
|
|
336
|
-
shape: 'logical-
|
|
359
|
+
shape: 'logical-node',
|
|
337
360
|
component: /*#__PURE__*/React.createElement(LogicalElement, {
|
|
338
361
|
experimentId: experimentId
|
|
339
362
|
})
|
|
340
363
|
})));
|
|
341
364
|
}
|
|
342
365
|
|
|
366
|
+
if ((nodeType === null || nodeType === void 0 ? void 0 : nodeType.indexOf(COMPONENTS_TYPE.APPLICATION)) === 0) {
|
|
367
|
+
return _this.graph.addNode(new ApplicationNode(_objectSpread(_objectSpread({}, nodeMeta), {}, {
|
|
368
|
+
shape: 'application-node',
|
|
369
|
+
component: /*#__PURE__*/React.createElement(ApplicationElement, {
|
|
370
|
+
experimentId: experimentId
|
|
371
|
+
})
|
|
372
|
+
})));
|
|
373
|
+
}
|
|
374
|
+
|
|
343
375
|
return _this.graph.addNode(new CommonNode(_objectSpread(_objectSpread({}, nodeMeta), {}, {
|
|
344
|
-
shape: '
|
|
376
|
+
shape: 'application-node',
|
|
345
377
|
component: /*#__PURE__*/React.createElement(NodeElement, {
|
|
346
378
|
experimentId: experimentId
|
|
347
379
|
})
|
|
@@ -349,21 +381,21 @@ var ExperimentGraph = /*#__PURE__*/function (_GraphCore) {
|
|
|
349
381
|
}
|
|
350
382
|
|
|
351
383
|
return undefined;
|
|
352
|
-
};
|
|
384
|
+
});
|
|
353
385
|
|
|
354
|
-
_this
|
|
386
|
+
_defineProperty(_assertThisInitialized(_this), "validateContextMenu", function (info) {
|
|
355
387
|
var _info$data, _info$data$edge;
|
|
356
388
|
|
|
357
|
-
return !(info.type === 'edge' &&
|
|
358
|
-
};
|
|
389
|
+
return !(info.type === 'edge' && info !== null && info !== void 0 && (_info$data = info.data) !== null && _info$data !== void 0 && (_info$data$edge = _info$data.edge) !== null && _info$data$edge !== void 0 && _info$data$edge.isGroupEdge());
|
|
390
|
+
});
|
|
359
391
|
|
|
360
|
-
_this
|
|
392
|
+
_defineProperty(_assertThisInitialized(_this), "handlerResize", function (e) {
|
|
361
393
|
if (e.detail === _this.experimentId) {
|
|
362
394
|
_this.resizeGraph();
|
|
363
395
|
}
|
|
364
|
-
};
|
|
396
|
+
});
|
|
365
397
|
|
|
366
|
-
_this
|
|
398
|
+
_defineProperty(_assertThisInitialized(_this), "setActiveAlgoData", function (data) {
|
|
367
399
|
if (!data) {
|
|
368
400
|
_this.activeNodeInstance$.next(null);
|
|
369
401
|
|
|
@@ -374,21 +406,21 @@ var ExperimentGraph = /*#__PURE__*/function (_GraphCore) {
|
|
|
374
406
|
|
|
375
407
|
_this.activeNodeInstance$.next(_objectSpread(_objectSpread({}, oldData), data)); // 完成两种格式的融合,数据结构更复杂以后,这一句可以变成一个专门的方法
|
|
376
408
|
|
|
377
|
-
};
|
|
409
|
+
});
|
|
378
410
|
|
|
379
|
-
_this
|
|
380
|
-
var
|
|
411
|
+
_defineProperty(_assertThisInitialized(_this), "requestAddNode", /*#__PURE__*/function () {
|
|
412
|
+
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(param) {
|
|
381
413
|
var _assertThisInitialize, graph, nodeMeta, clientX, clientY, pos, nodeRes, newNode;
|
|
382
414
|
|
|
383
|
-
return
|
|
415
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
384
416
|
while (1) {
|
|
385
417
|
switch (_context.prev = _context.next) {
|
|
386
418
|
case 0:
|
|
387
|
-
|
|
419
|
+
console.log('requestAddNode');
|
|
388
420
|
_assertThisInitialize = _assertThisInitialized(_this), graph = _assertThisInitialize.graph;
|
|
389
421
|
|
|
390
422
|
if (!graph) {
|
|
391
|
-
_context.next =
|
|
423
|
+
_context.next = 14;
|
|
392
424
|
break;
|
|
393
425
|
}
|
|
394
426
|
|
|
@@ -396,10 +428,10 @@ var ExperimentGraph = /*#__PURE__*/function (_GraphCore) {
|
|
|
396
428
|
pos = graph.clientToLocal(clientX, clientY);
|
|
397
429
|
console.log('nodeMeta', nodeMeta, pos);
|
|
398
430
|
nodeRes = addNode(_objectSpread(_objectSpread({}, nodeMeta), pos));
|
|
399
|
-
_context.next =
|
|
431
|
+
_context.next = 9;
|
|
400
432
|
return _this.updateExperimentGraph([nodeRes]);
|
|
401
433
|
|
|
402
|
-
case
|
|
434
|
+
case 9:
|
|
403
435
|
console.log('requestAddNode nodeRes', nodeRes);
|
|
404
436
|
newNode = formatNodeInfoToNodeMeta(nodeRes);
|
|
405
437
|
console.log('formatNodeInfoToNodeMeta', newNode);
|
|
@@ -410,12 +442,12 @@ var ExperimentGraph = /*#__PURE__*/function (_GraphCore) {
|
|
|
410
442
|
success: true
|
|
411
443
|
});
|
|
412
444
|
|
|
413
|
-
case
|
|
445
|
+
case 14:
|
|
414
446
|
return _context.abrupt("return", {
|
|
415
447
|
success: false
|
|
416
448
|
});
|
|
417
449
|
|
|
418
|
-
case
|
|
450
|
+
case 15:
|
|
419
451
|
case "end":
|
|
420
452
|
return _context.stop();
|
|
421
453
|
}
|
|
@@ -424,14 +456,14 @@ var ExperimentGraph = /*#__PURE__*/function (_GraphCore) {
|
|
|
424
456
|
}));
|
|
425
457
|
|
|
426
458
|
return function (_x) {
|
|
427
|
-
return
|
|
459
|
+
return _ref4.apply(this, arguments);
|
|
428
460
|
};
|
|
429
|
-
}();
|
|
461
|
+
}());
|
|
430
462
|
|
|
431
|
-
_this
|
|
432
|
-
var
|
|
463
|
+
_defineProperty(_assertThisInitialized(_this), "requestDeleteNodes", /*#__PURE__*/function () {
|
|
464
|
+
var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(ids) {
|
|
433
465
|
var nodeInstanceIds, activeNodeInstance;
|
|
434
|
-
return
|
|
466
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
435
467
|
while (1) {
|
|
436
468
|
switch (_context2.prev = _context2.next) {
|
|
437
469
|
case 0:
|
|
@@ -475,14 +507,14 @@ var ExperimentGraph = /*#__PURE__*/function (_GraphCore) {
|
|
|
475
507
|
}));
|
|
476
508
|
|
|
477
509
|
return function (_x2) {
|
|
478
|
-
return
|
|
510
|
+
return _ref5.apply(this, arguments);
|
|
479
511
|
};
|
|
480
|
-
}();
|
|
512
|
+
}());
|
|
481
513
|
|
|
482
|
-
_this
|
|
483
|
-
var
|
|
514
|
+
_defineProperty(_assertThisInitialized(_this), "requestDeleteEdges", /*#__PURE__*/function () {
|
|
515
|
+
var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(edges) {
|
|
484
516
|
var targetEdges;
|
|
485
|
-
return
|
|
517
|
+
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
486
518
|
while (1) {
|
|
487
519
|
switch (_context3.prev = _context3.next) {
|
|
488
520
|
case 0:
|
|
@@ -508,12 +540,12 @@ var ExperimentGraph = /*#__PURE__*/function (_GraphCore) {
|
|
|
508
540
|
}));
|
|
509
541
|
|
|
510
542
|
return function (_x3) {
|
|
511
|
-
return
|
|
543
|
+
return _ref6.apply(this, arguments);
|
|
512
544
|
};
|
|
513
|
-
}();
|
|
545
|
+
}());
|
|
514
546
|
|
|
515
|
-
_this
|
|
516
|
-
return
|
|
547
|
+
_defineProperty(_assertThisInitialized(_this), "undoDeleteNode", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
|
|
548
|
+
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
517
549
|
while (1) {
|
|
518
550
|
switch (_context4.prev = _context4.next) {
|
|
519
551
|
case 0:
|
|
@@ -525,12 +557,12 @@ var ExperimentGraph = /*#__PURE__*/function (_GraphCore) {
|
|
|
525
557
|
}
|
|
526
558
|
}
|
|
527
559
|
}, _callee4);
|
|
528
|
-
}));
|
|
560
|
+
})));
|
|
529
561
|
|
|
530
|
-
_this
|
|
531
|
-
var
|
|
562
|
+
_defineProperty(_assertThisInitialized(_this), "updateNodeData", /*#__PURE__*/function () {
|
|
563
|
+
var _ref8 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(nodeInstanceId, nodeData) {
|
|
532
564
|
var cell, data, newData;
|
|
533
|
-
return
|
|
565
|
+
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
|
|
534
566
|
while (1) {
|
|
535
567
|
switch (_context5.prev = _context5.next) {
|
|
536
568
|
case 0:
|
|
@@ -557,25 +589,25 @@ var ExperimentGraph = /*#__PURE__*/function (_GraphCore) {
|
|
|
557
589
|
}));
|
|
558
590
|
|
|
559
591
|
return function (_x4, _x5) {
|
|
560
|
-
return
|
|
592
|
+
return _ref8.apply(this, arguments);
|
|
561
593
|
};
|
|
562
|
-
}();
|
|
594
|
+
}());
|
|
563
595
|
|
|
564
|
-
_this
|
|
596
|
+
_defineProperty(_assertThisInitialized(_this), "zoomGraph", function (factor) {
|
|
565
597
|
_this.zoom(factor);
|
|
566
|
-
};
|
|
598
|
+
});
|
|
567
599
|
|
|
568
|
-
_this
|
|
600
|
+
_defineProperty(_assertThisInitialized(_this), "zoomGraphToFit", function () {
|
|
569
601
|
_this.zoom('fit');
|
|
570
|
-
};
|
|
602
|
+
});
|
|
571
603
|
|
|
572
|
-
_this
|
|
604
|
+
_defineProperty(_assertThisInitialized(_this), "zoomGraphRealSize", function () {
|
|
573
605
|
_this.zoom('real');
|
|
574
|
-
};
|
|
606
|
+
});
|
|
575
607
|
|
|
576
|
-
_this
|
|
577
|
-
var
|
|
578
|
-
return
|
|
608
|
+
_defineProperty(_assertThisInitialized(_this), "deleteEdgeFromContextMenu", /*#__PURE__*/function () {
|
|
609
|
+
var _ref9 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(edge) {
|
|
610
|
+
return _regeneratorRuntime().wrap(function _callee6$(_context6) {
|
|
579
611
|
while (1) {
|
|
580
612
|
switch (_context6.prev = _context6.next) {
|
|
581
613
|
case 0:
|
|
@@ -594,11 +626,11 @@ var ExperimentGraph = /*#__PURE__*/function (_GraphCore) {
|
|
|
594
626
|
}));
|
|
595
627
|
|
|
596
628
|
return function (_x6) {
|
|
597
|
-
return
|
|
629
|
+
return _ref9.apply(this, arguments);
|
|
598
630
|
};
|
|
599
|
-
}();
|
|
631
|
+
}());
|
|
600
632
|
|
|
601
|
-
_this
|
|
633
|
+
_defineProperty(_assertThisInitialized(_this), "unSelectNode", function () {
|
|
602
634
|
var _assertThisInitialize2 = _assertThisInitialized(_this),
|
|
603
635
|
graph = _assertThisInitialize2.graph;
|
|
604
636
|
|
|
@@ -606,10 +638,8 @@ var ExperimentGraph = /*#__PURE__*/function (_GraphCore) {
|
|
|
606
638
|
graph.cleanSelection();
|
|
607
639
|
}
|
|
608
640
|
|
|
609
|
-
_this.selectedGroup$.next(null);
|
|
610
|
-
|
|
611
641
|
_this.selectedNodes$.next([]);
|
|
612
|
-
};
|
|
642
|
+
});
|
|
613
643
|
|
|
614
644
|
_this.experimentId = expId;
|
|
615
645
|
|
|
@@ -622,8 +652,8 @@ var ExperimentGraph = /*#__PURE__*/function (_GraphCore) {
|
|
|
622
652
|
_createClass(ExperimentGraph, [{
|
|
623
653
|
key: "initialize",
|
|
624
654
|
value: function () {
|
|
625
|
-
var _initialize = _asyncToGenerator( /*#__PURE__*/
|
|
626
|
-
return
|
|
655
|
+
var _initialize = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7() {
|
|
656
|
+
return _regeneratorRuntime().wrap(function _callee7$(_context7) {
|
|
627
657
|
while (1) {
|
|
628
658
|
switch (_context7.prev = _context7.next) {
|
|
629
659
|
case 0:
|
|
@@ -664,17 +694,45 @@ var ExperimentGraph = /*#__PURE__*/function (_GraphCore) {
|
|
|
664
694
|
|
|
665
695
|
return initialize;
|
|
666
696
|
}()
|
|
697
|
+
}, {
|
|
698
|
+
key: "resetGraphData",
|
|
699
|
+
value: function () {
|
|
700
|
+
var _resetGraphData = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8() {
|
|
701
|
+
return _regeneratorRuntime().wrap(function _callee8$(_context8) {
|
|
702
|
+
while (1) {
|
|
703
|
+
switch (_context8.prev = _context8.next) {
|
|
704
|
+
case 0:
|
|
705
|
+
this.experimentGraph$.next({
|
|
706
|
+
nodes: [],
|
|
707
|
+
links: []
|
|
708
|
+
});
|
|
709
|
+
|
|
710
|
+
case 1:
|
|
711
|
+
case "end":
|
|
712
|
+
return _context8.stop();
|
|
713
|
+
}
|
|
714
|
+
}
|
|
715
|
+
}, _callee8, this);
|
|
716
|
+
}));
|
|
717
|
+
|
|
718
|
+
function resetGraphData() {
|
|
719
|
+
return _resetGraphData.apply(this, arguments);
|
|
720
|
+
}
|
|
721
|
+
|
|
722
|
+
return resetGraphData;
|
|
723
|
+
}()
|
|
667
724
|
}, {
|
|
668
725
|
key: "initPreviewData",
|
|
669
726
|
value: function () {
|
|
670
|
-
var _initPreviewData = _asyncToGenerator( /*#__PURE__*/
|
|
727
|
+
var _initPreviewData = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9(graphRes) {
|
|
671
728
|
var _this2 = this;
|
|
672
729
|
|
|
673
730
|
var nodes, links;
|
|
674
|
-
return
|
|
731
|
+
return _regeneratorRuntime().wrap(function _callee9$(_context9) {
|
|
675
732
|
while (1) {
|
|
676
|
-
switch (
|
|
733
|
+
switch (_context9.prev = _context9.next) {
|
|
677
734
|
case 0:
|
|
735
|
+
// await this.resetGraphData()
|
|
678
736
|
console.log('initPreviewData', graphRes);
|
|
679
737
|
nodes = (graphRes === null || graphRes === void 0 ? void 0 : graphRes.nodes) || [];
|
|
680
738
|
links = (graphRes === null || graphRes === void 0 ? void 0 : graphRes.links) || [];
|
|
@@ -692,10 +750,10 @@ var ExperimentGraph = /*#__PURE__*/function (_GraphCore) {
|
|
|
692
750
|
|
|
693
751
|
case 5:
|
|
694
752
|
case "end":
|
|
695
|
-
return
|
|
753
|
+
return _context9.stop();
|
|
696
754
|
}
|
|
697
755
|
}
|
|
698
|
-
},
|
|
756
|
+
}, _callee9);
|
|
699
757
|
}));
|
|
700
758
|
|
|
701
759
|
function initPreviewData(_x7) {
|
|
@@ -708,20 +766,20 @@ var ExperimentGraph = /*#__PURE__*/function (_GraphCore) {
|
|
|
708
766
|
}, {
|
|
709
767
|
key: "loadExperimentGraph",
|
|
710
768
|
value: function () {
|
|
711
|
-
var _loadExperimentGraph = _asyncToGenerator( /*#__PURE__*/
|
|
712
|
-
return
|
|
769
|
+
var _loadExperimentGraph = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee10(graphRes) {
|
|
770
|
+
return _regeneratorRuntime().wrap(function _callee10$(_context10) {
|
|
713
771
|
while (1) {
|
|
714
|
-
switch (
|
|
772
|
+
switch (_context10.prev = _context10.next) {
|
|
715
773
|
case 0:
|
|
716
|
-
|
|
774
|
+
_context10.next = 2;
|
|
717
775
|
return this.experimentGraph$.next(graphRes.data);
|
|
718
776
|
|
|
719
777
|
case 2:
|
|
720
778
|
case "end":
|
|
721
|
-
return
|
|
779
|
+
return _context10.stop();
|
|
722
780
|
}
|
|
723
781
|
}
|
|
724
|
-
},
|
|
782
|
+
}, _callee10, this);
|
|
725
783
|
}));
|
|
726
784
|
|
|
727
785
|
function loadExperimentGraph(_x8) {
|
|
@@ -734,19 +792,19 @@ var ExperimentGraph = /*#__PURE__*/function (_GraphCore) {
|
|
|
734
792
|
}, {
|
|
735
793
|
key: "updateExperimentGraph",
|
|
736
794
|
value: function () {
|
|
737
|
-
var _updateExperimentGraph = _asyncToGenerator( /*#__PURE__*/
|
|
795
|
+
var _updateExperimentGraph = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee11() {
|
|
738
796
|
var nodes,
|
|
739
797
|
links,
|
|
740
798
|
oldGraph,
|
|
741
799
|
newGraph,
|
|
742
|
-
|
|
743
|
-
return
|
|
800
|
+
_args11 = arguments;
|
|
801
|
+
return _regeneratorRuntime().wrap(function _callee11$(_context11) {
|
|
744
802
|
while (1) {
|
|
745
|
-
switch (
|
|
803
|
+
switch (_context11.prev = _context11.next) {
|
|
746
804
|
case 0:
|
|
747
|
-
nodes =
|
|
748
|
-
links =
|
|
749
|
-
console.log('========================== updateExperimentGraph');
|
|
805
|
+
nodes = _args11.length > 0 && _args11[0] !== undefined ? _args11[0] : [];
|
|
806
|
+
links = _args11.length > 1 && _args11[1] !== undefined ? _args11[1] : [];
|
|
807
|
+
console.log('========================== updateExperimentGraph', links);
|
|
750
808
|
oldGraph = this.experimentGraph$.getValue();
|
|
751
809
|
newGraph = produce(oldGraph, function (nextGraph) {
|
|
752
810
|
if (nodes.length) {
|
|
@@ -765,10 +823,10 @@ var ExperimentGraph = /*#__PURE__*/function (_GraphCore) {
|
|
|
765
823
|
|
|
766
824
|
case 6:
|
|
767
825
|
case "end":
|
|
768
|
-
return
|
|
826
|
+
return _context11.stop();
|
|
769
827
|
}
|
|
770
828
|
}
|
|
771
|
-
},
|
|
829
|
+
}, _callee11, this);
|
|
772
830
|
}));
|
|
773
831
|
|
|
774
832
|
function updateExperimentGraph() {
|
|
@@ -781,18 +839,18 @@ var ExperimentGraph = /*#__PURE__*/function (_GraphCore) {
|
|
|
781
839
|
}, {
|
|
782
840
|
key: "delExperimentGraphElement",
|
|
783
841
|
value: function () {
|
|
784
|
-
var _delExperimentGraphElement = _asyncToGenerator( /*#__PURE__*/
|
|
842
|
+
var _delExperimentGraphElement = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee12() {
|
|
785
843
|
var nodes,
|
|
786
844
|
links,
|
|
787
845
|
oldGraph,
|
|
788
846
|
newGraph,
|
|
789
|
-
|
|
790
|
-
return
|
|
847
|
+
_args12 = arguments;
|
|
848
|
+
return _regeneratorRuntime().wrap(function _callee12$(_context12) {
|
|
791
849
|
while (1) {
|
|
792
|
-
switch (
|
|
850
|
+
switch (_context12.prev = _context12.next) {
|
|
793
851
|
case 0:
|
|
794
|
-
nodes =
|
|
795
|
-
links =
|
|
852
|
+
nodes = _args12.length > 0 && _args12[0] !== undefined ? _args12[0] : [];
|
|
853
|
+
links = _args12.length > 1 && _args12[1] !== undefined ? _args12[1] : [];
|
|
796
854
|
oldGraph = this.experimentGraph$.getValue();
|
|
797
855
|
newGraph = produce(oldGraph, function (nextGraph) {
|
|
798
856
|
if (nodes.length) {
|
|
@@ -812,14 +870,15 @@ var ExperimentGraph = /*#__PURE__*/function (_GraphCore) {
|
|
|
812
870
|
});
|
|
813
871
|
}
|
|
814
872
|
});
|
|
873
|
+
console.log('newGraph', newGraph, oldGraph);
|
|
815
874
|
this.experimentGraph$.next(newGraph);
|
|
816
875
|
|
|
817
|
-
case
|
|
876
|
+
case 6:
|
|
818
877
|
case "end":
|
|
819
|
-
return
|
|
878
|
+
return _context12.stop();
|
|
820
879
|
}
|
|
821
880
|
}
|
|
822
|
-
},
|
|
881
|
+
}, _callee12, this);
|
|
823
882
|
}));
|
|
824
883
|
|
|
825
884
|
function delExperimentGraphElement() {
|
|
@@ -838,15 +897,12 @@ var ExperimentGraph = /*#__PURE__*/function (_GraphCore) {
|
|
|
838
897
|
}, {
|
|
839
898
|
key: "renderNode",
|
|
840
899
|
value: function renderNode(nodeMeta) {
|
|
841
|
-
var _this3 = this;
|
|
842
|
-
|
|
843
900
|
console.log('renderNode >>>>>>', nodeMeta);
|
|
844
901
|
var experimentId = this.experimentId;
|
|
845
902
|
var data = nodeMeta.data;
|
|
846
|
-
var
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
id = data.id; // 节点
|
|
903
|
+
var _ref10 = data,
|
|
904
|
+
type = _ref10.type,
|
|
905
|
+
id = _ref10.id; // 节点
|
|
850
906
|
|
|
851
907
|
if (type === 'node') {
|
|
852
908
|
var _id$split;
|
|
@@ -861,22 +917,6 @@ var ExperimentGraph = /*#__PURE__*/function (_GraphCore) {
|
|
|
861
917
|
}
|
|
862
918
|
|
|
863
919
|
return node;
|
|
864
|
-
} // 集合
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
if (type === 'group' && (includedNodes === null || includedNodes === void 0 ? void 0 : includedNodes.length)) {
|
|
868
|
-
var group = this.graph.addNode(new GroupNode(_objectSpread(_objectSpread({}, nodeMeta), {}, {
|
|
869
|
-
shape: 'react-shape',
|
|
870
|
-
component: /*#__PURE__*/React.createElement(NodeGroup, {
|
|
871
|
-
experimentId: experimentId
|
|
872
|
-
})
|
|
873
|
-
})));
|
|
874
|
-
includedNodes.forEach(function (normalNode) {
|
|
875
|
-
var targetNode = _this3.getNodeById(normalNode.id);
|
|
876
|
-
|
|
877
|
-
group.addChild(targetNode);
|
|
878
|
-
});
|
|
879
|
-
return group;
|
|
880
920
|
}
|
|
881
921
|
|
|
882
922
|
return undefined;
|
|
@@ -894,22 +934,34 @@ var ExperimentGraph = /*#__PURE__*/function (_GraphCore) {
|
|
|
894
934
|
}, {
|
|
895
935
|
key: "renderEdge",
|
|
896
936
|
value: function renderEdge(edgeMeta) {
|
|
937
|
+
var _edgeMeta$source$port, _edgeMeta$source$port2;
|
|
938
|
+
|
|
939
|
+
// TODO 条件判断edge
|
|
897
940
|
var type = edgeMeta.type;
|
|
898
941
|
|
|
899
942
|
if (type === 'group') {
|
|
900
|
-
return this.graph.addEdge(new
|
|
943
|
+
return this.graph.addEdge(new GroupEdge(edgeMeta));
|
|
901
944
|
}
|
|
902
945
|
|
|
903
|
-
|
|
946
|
+
var edge = new GuideEdge(edgeMeta);
|
|
947
|
+
console.log('renderEdge >>>>>>', edgeMeta); // 条件判断 是
|
|
948
|
+
|
|
949
|
+
if (edgeMeta !== null && edgeMeta !== void 0 && (_edgeMeta$source$port = edgeMeta.source.port) !== null && _edgeMeta$source$port !== void 0 && _edgeMeta$source$port.startsWith('SIGN_OPERATION_CONDITION-IS')) {
|
|
950
|
+
edge.setLabels(['是']);
|
|
951
|
+
} // 条件判断 否
|
|
952
|
+
|
|
953
|
+
|
|
954
|
+
if (edgeMeta !== null && edgeMeta !== void 0 && (_edgeMeta$source$port2 = edgeMeta.source.port) !== null && _edgeMeta$source$port2 !== void 0 && _edgeMeta$source$port2.startsWith('SIGN_OPERATION_CONDITION-NOT')) {
|
|
955
|
+
edge.setLabels(['否']);
|
|
956
|
+
}
|
|
957
|
+
|
|
958
|
+
return this.graph.addEdge(edge);
|
|
904
959
|
}
|
|
905
960
|
}, {
|
|
906
961
|
key: "onSelectNodes",
|
|
907
962
|
value: function onSelectNodes(nodes) {
|
|
908
963
|
var selectedNodes = nodes.filter(function (cell) {
|
|
909
|
-
return cell.isNode() && !(cell
|
|
910
|
-
});
|
|
911
|
-
var selectedGroups = nodes.filter(function (cell) {
|
|
912
|
-
return cell.isNode() && cell.isGroup();
|
|
964
|
+
return cell.isNode() && !(cell !== null && cell !== void 0 && cell.isGroup());
|
|
913
965
|
});
|
|
914
966
|
|
|
915
967
|
if (selectedNodes.length === 1) {
|
|
@@ -925,12 +977,6 @@ var ExperimentGraph = /*#__PURE__*/function (_GraphCore) {
|
|
|
925
977
|
this.selectedNodes$.next(selectedNodes);
|
|
926
978
|
this.activeNodeInstance$.next(null); // 当没选中任何东西时,清空选中的节点信息
|
|
927
979
|
}
|
|
928
|
-
|
|
929
|
-
if (selectedGroups.length === 1) {
|
|
930
|
-
this.selectedGroup$.next(selectedGroups[0]);
|
|
931
|
-
} else {
|
|
932
|
-
this.selectedGroup$.next(undefined);
|
|
933
|
-
}
|
|
934
980
|
}
|
|
935
981
|
}, {
|
|
936
982
|
key: "onClearSelectNodes",
|
|
@@ -940,15 +986,16 @@ var ExperimentGraph = /*#__PURE__*/function (_GraphCore) {
|
|
|
940
986
|
}, {
|
|
941
987
|
key: "onConnectNode",
|
|
942
988
|
value: function () {
|
|
943
|
-
var _onConnectNode = _asyncToGenerator( /*#__PURE__*/
|
|
944
|
-
var _args$edge, edge, isNew, source, target, node, portId, _this$graph, _this$graph2, data, sourceCell, targetCell, sourceCellData, targetCellData;
|
|
989
|
+
var _onConnectNode = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee13(args) {
|
|
990
|
+
var _args$edge, edge, isNew, _ref11, source, target, node, portId, _source$port, _source$port2, _this$graph, _this$graph2, data, sourceCell, targetCell, sourceCellData, targetCellData;
|
|
945
991
|
|
|
946
|
-
return
|
|
992
|
+
return _regeneratorRuntime().wrap(function _callee13$(_context13) {
|
|
947
993
|
while (1) {
|
|
948
|
-
switch (
|
|
994
|
+
switch (_context13.prev = _context13.next) {
|
|
949
995
|
case 0:
|
|
996
|
+
console.log('<<< canvas >>> onConnectNode', args);
|
|
950
997
|
_args$edge = args.edge, edge = _args$edge === void 0 ? {} : _args$edge, isNew = args.isNew;
|
|
951
|
-
source =
|
|
998
|
+
_ref11 = edge, source = _ref11.source, target = _ref11.target;
|
|
952
999
|
|
|
953
1000
|
if (isNew) {
|
|
954
1001
|
// 处理边虚线样式更新的问题。
|
|
@@ -972,7 +1019,17 @@ var ExperimentGraph = /*#__PURE__*/function (_GraphCore) {
|
|
|
972
1019
|
target: target.cell,
|
|
973
1020
|
outputPortId: source.port,
|
|
974
1021
|
inputPortId: target.port
|
|
975
|
-
};
|
|
1022
|
+
}; // 条件判断 是
|
|
1023
|
+
|
|
1024
|
+
if ((_source$port = source.port) !== null && _source$port !== void 0 && _source$port.startsWith('SIGN_OPERATION_CONDITION-IS')) {
|
|
1025
|
+
edge.setLabels(['是']);
|
|
1026
|
+
} // 条件判断 否
|
|
1027
|
+
|
|
1028
|
+
|
|
1029
|
+
if ((_source$port2 = source.port) !== null && _source$port2 !== void 0 && _source$port2.startsWith('SIGN_OPERATION_CONDITION-NOT')) {
|
|
1030
|
+
edge.setLabels(['否']);
|
|
1031
|
+
}
|
|
1032
|
+
|
|
976
1033
|
sourceCell = (_this$graph = this.graph) === null || _this$graph === void 0 ? void 0 : _this$graph.getCellById(source.cell);
|
|
977
1034
|
targetCell = (_this$graph2 = this.graph) === null || _this$graph2 === void 0 ? void 0 : _this$graph2.getCellById(target.cell);
|
|
978
1035
|
sourceCellData = sourceCell === null || sourceCell === void 0 ? void 0 : sourceCell.getData();
|
|
@@ -986,16 +1043,16 @@ var ExperimentGraph = /*#__PURE__*/function (_GraphCore) {
|
|
|
986
1043
|
}
|
|
987
1044
|
}
|
|
988
1045
|
|
|
989
|
-
return
|
|
1046
|
+
return _context13.abrupt("return", {
|
|
990
1047
|
success: true
|
|
991
1048
|
});
|
|
992
1049
|
|
|
993
|
-
case
|
|
1050
|
+
case 5:
|
|
994
1051
|
case "end":
|
|
995
|
-
return
|
|
1052
|
+
return _context13.stop();
|
|
996
1053
|
}
|
|
997
1054
|
}
|
|
998
|
-
},
|
|
1055
|
+
}, _callee13, this);
|
|
999
1056
|
}));
|
|
1000
1057
|
|
|
1001
1058
|
function onConnectNode(_x9) {
|
|
@@ -1011,8 +1068,9 @@ var ExperimentGraph = /*#__PURE__*/function (_GraphCore) {
|
|
|
1011
1068
|
try {
|
|
1012
1069
|
var edge = args.edge;
|
|
1013
1070
|
var target = edge.target;
|
|
1014
|
-
var
|
|
1015
|
-
|
|
1071
|
+
var _ref12 = target,
|
|
1072
|
+
nodeId = _ref12.cell,
|
|
1073
|
+
portId = _ref12.port;
|
|
1016
1074
|
|
|
1017
1075
|
if (nodeId) {
|
|
1018
1076
|
var targetCell = this.getNodeById(nodeId);
|
|
@@ -1034,7 +1092,7 @@ var ExperimentGraph = /*#__PURE__*/function (_GraphCore) {
|
|
|
1034
1092
|
var parent = node.getParent();
|
|
1035
1093
|
var parentData = parent === null || parent === void 0 ? void 0 : parent.getData();
|
|
1036
1094
|
|
|
1037
|
-
if (parentData && !(parentData
|
|
1095
|
+
if (parentData && !(parentData !== null && parentData !== void 0 && parentData.isCollapsed)) {
|
|
1038
1096
|
expandGroupAccordingToNodes({
|
|
1039
1097
|
moveNodes: [node]
|
|
1040
1098
|
});
|
|
@@ -1043,20 +1101,20 @@ var ExperimentGraph = /*#__PURE__*/function (_GraphCore) {
|
|
|
1043
1101
|
}, {
|
|
1044
1102
|
key: "onMoveNodes",
|
|
1045
1103
|
value: function () {
|
|
1046
|
-
var _onMoveNodes = _asyncToGenerator( /*#__PURE__*/
|
|
1047
|
-
var
|
|
1104
|
+
var _onMoveNodes = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee14(movedNodes) {
|
|
1105
|
+
var _this3 = this;
|
|
1048
1106
|
|
|
1049
1107
|
var targetNodes, newPos, oldGraph, newGraph;
|
|
1050
|
-
return
|
|
1108
|
+
return _regeneratorRuntime().wrap(function _callee14$(_context14) {
|
|
1051
1109
|
while (1) {
|
|
1052
|
-
switch (
|
|
1110
|
+
switch (_context14.prev = _context14.next) {
|
|
1053
1111
|
case 0:
|
|
1054
1112
|
targetNodes = movedNodes.filter(function (arg) {
|
|
1055
1113
|
var node = arg.node;
|
|
1056
1114
|
return !node.isGroup();
|
|
1057
1115
|
});
|
|
1058
1116
|
|
|
1059
|
-
if (targetNodes
|
|
1117
|
+
if (targetNodes !== null && targetNodes !== void 0 && targetNodes.length) {
|
|
1060
1118
|
newPos = targetNodes.map(function (moveNode) {
|
|
1061
1119
|
var current = moveNode.current,
|
|
1062
1120
|
node = moveNode.node;
|
|
@@ -1064,7 +1122,7 @@ var ExperimentGraph = /*#__PURE__*/function (_GraphCore) {
|
|
|
1064
1122
|
y = current.y;
|
|
1065
1123
|
var id = node.id;
|
|
1066
1124
|
|
|
1067
|
-
|
|
1125
|
+
_this3.updateNodeById(id, function (nodes) {
|
|
1068
1126
|
nodes.setData({
|
|
1069
1127
|
x: x,
|
|
1070
1128
|
y: y
|
|
@@ -1098,10 +1156,10 @@ var ExperimentGraph = /*#__PURE__*/function (_GraphCore) {
|
|
|
1098
1156
|
|
|
1099
1157
|
case 2:
|
|
1100
1158
|
case "end":
|
|
1101
|
-
return
|
|
1159
|
+
return _context14.stop();
|
|
1102
1160
|
}
|
|
1103
1161
|
}
|
|
1104
|
-
},
|
|
1162
|
+
}, _callee14, this);
|
|
1105
1163
|
}));
|
|
1106
1164
|
|
|
1107
1165
|
function onMoveNodes(_x10) {
|
|
@@ -1119,13 +1177,13 @@ var ExperimentGraph = /*#__PURE__*/function (_GraphCore) {
|
|
|
1119
1177
|
return !node.isGroup();
|
|
1120
1178
|
});
|
|
1121
1179
|
|
|
1122
|
-
if (normalNodes
|
|
1180
|
+
if (normalNodes !== null && normalNodes !== void 0 && normalNodes.length) {
|
|
1123
1181
|
this.requestDeleteNodes(normalNodes.map(function (node) {
|
|
1124
1182
|
return node.id;
|
|
1125
1183
|
}));
|
|
1126
1184
|
}
|
|
1127
1185
|
|
|
1128
|
-
if (edges
|
|
1186
|
+
if (edges !== null && edges !== void 0 && edges.length) {
|
|
1129
1187
|
this.requestDeleteEdges(edges);
|
|
1130
1188
|
}
|
|
1131
1189
|
} // eslint-disable-next-line class-methods-use-this
|
|
@@ -1146,35 +1204,10 @@ var ExperimentGraph = /*#__PURE__*/function (_GraphCore) {
|
|
|
1146
1204
|
this.addNode(newNode);
|
|
1147
1205
|
this.clearContextMenuInfo();
|
|
1148
1206
|
} catch (error) {
|
|
1149
|
-
|
|
1207
|
+
message.error('复制节点失败,请重试');
|
|
1150
1208
|
}
|
|
1151
1209
|
} // 设置自定义算法组件节点
|
|
1152
1210
|
|
|
1153
|
-
}, {
|
|
1154
|
-
key: "setModal",
|
|
1155
|
-
value: // 打开弹窗
|
|
1156
|
-
function () {
|
|
1157
|
-
var _setModal = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee14(params) {
|
|
1158
|
-
return regeneratorRuntime.wrap(function _callee14$(_context14) {
|
|
1159
|
-
while (1) {
|
|
1160
|
-
switch (_context14.prev = _context14.next) {
|
|
1161
|
-
case 0:
|
|
1162
|
-
this.activeModal$.next(params);
|
|
1163
|
-
|
|
1164
|
-
case 1:
|
|
1165
|
-
case "end":
|
|
1166
|
-
return _context14.stop();
|
|
1167
|
-
}
|
|
1168
|
-
}
|
|
1169
|
-
}, _callee14, this);
|
|
1170
|
-
}));
|
|
1171
|
-
|
|
1172
|
-
function setModal(_x11) {
|
|
1173
|
-
return _setModal.apply(this, arguments);
|
|
1174
|
-
}
|
|
1175
|
-
|
|
1176
|
-
return setModal;
|
|
1177
|
-
}()
|
|
1178
1211
|
}, {
|
|
1179
1212
|
key: "dispose",
|
|
1180
1213
|
value: function dispose() {
|