strategy-panel 1.0.1 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.fatherrc.ts +11 -26
- package/.umirc.ts +4 -0
- package/README.md +33 -33
- package/es/assets/decive.svg +1 -1
- package/es/assets/hand.svg +1 -1
- package/es/assets/lock.svg +8 -0
- package/es/components/canvas/component-tree-panel/category-tree/category-type.d.ts +1 -0
- package/es/{common/graph-common → components/canvas/component-tree-panel/category-tree}/category-type.js +28 -12
- package/es/{pages → components/canvas}/component-tree-panel/category-tree/index.d.ts +17 -16
- package/es/{pages → components/canvas}/component-tree-panel/category-tree/index.js +14 -14
- package/es/{pages → components/canvas}/component-tree-panel/category-tree/index.less +36 -36
- package/es/{pages → components/canvas}/component-tree-panel/category-tree/node-title.d.ts +12 -12
- package/es/{pages → components/canvas}/component-tree-panel/category-tree/node-title.js +5 -3
- package/es/{pages → components/canvas}/component-tree-panel/index.d.ts +17 -17
- package/es/{pages → components/canvas}/component-tree-panel/index.js +1 -0
- package/es/{pages → components/canvas}/component-tree-panel/index.less +1 -0
- package/es/{pages → components/canvas}/config-panel/components/condition-configuration/configure-modal/data-origin.d.ts +49 -49
- package/es/{pages → components/canvas}/config-panel/components/condition-configuration/configure-modal/data-origin.js +26 -34
- package/es/{pages → components/canvas}/config-panel/components/condition-configuration/configure-modal/index.d.ts +11 -11
- package/es/{pages → components/canvas}/config-panel/components/condition-configuration/configure-modal/index.js +15 -23
- package/es/{pages → components/canvas}/config-panel/components/condition-configuration/configure-modal/style.less +1 -1
- package/es/{pages → components/canvas}/config-panel/components/condition-configuration/cross-line.d.ts +9 -9
- package/es/{pages → components/canvas}/config-panel/components/condition-configuration/cross-line.js +6 -10
- package/es/{pages → components/canvas}/config-panel/components/condition-configuration/index.d.ts +10 -9
- package/es/{pages → components/canvas}/config-panel/components/condition-configuration/index.js +17 -13
- package/es/{pages → components/canvas}/config-panel/components/condition-configuration/style.less +74 -74
- package/es/{pages → components/canvas}/config-panel/components/time-trigger/components/cycle-time.d.ts +9 -9
- package/es/{pages → components/canvas}/config-panel/components/time-trigger/components/cycle-time.js +24 -33
- package/es/{pages → components/canvas}/config-panel/components/time-trigger/components/time-horizon.d.ts +10 -10
- package/es/{pages → components/canvas}/config-panel/components/time-trigger/components/time-horizon.js +18 -28
- package/es/{pages → components/canvas}/config-panel/components/time-trigger/delay-time.d.ts +9 -9
- package/es/components/canvas/config-panel/components/time-trigger/effective-time.d.ts +7 -0
- package/es/components/canvas/config-panel/components/time-trigger/effective-time.js +43 -0
- package/es/{pages → components/canvas}/config-panel/components/time-trigger/index.d.ts +9 -8
- package/es/{pages → components/canvas}/config-panel/components/time-trigger/index.js +18 -17
- package/es/{pages → components/canvas}/config-panel/components/time-trigger/interval-time.d.ts +9 -9
- package/es/{pages → components/canvas}/config-panel/components/time-trigger/interval-time.js +4 -8
- package/es/{pages → components/canvas}/config-panel/components/time-trigger/persistent-time.d.ts +9 -9
- package/es/components/canvas/config-panel/components/time-trigger/section-Detail.d.ts +10 -0
- package/es/components/canvas/config-panel/components/time-trigger/section-Detail.js +125 -0
- package/es/components/canvas/config-panel/components/time-trigger/section-time.d.ts +9 -0
- package/es/components/canvas/config-panel/components/time-trigger/section-time.js +81 -0
- package/es/{pages → components/canvas}/config-panel/components/time-trigger/timing-time.d.ts +9 -9
- package/es/{pages → components/canvas}/config-panel/components/time-trigger/timing-time.js +7 -11
- package/es/{pages → components/canvas}/config-panel/config-common.d.ts +38 -37
- package/es/{pages → components/canvas}/config-panel/config-common.js +9 -15
- package/es/{pages → components/canvas}/config-panel/index.d.ts +14 -13
- package/es/{pages → components/canvas}/config-panel/index.js +2 -2
- package/es/{pages → components/canvas}/config-panel/node-form.d.ts +23 -22
- package/es/{pages → components/canvas}/config-panel/node-form.js +14 -16
- package/es/{pages → components/canvas}/config-panel/style.less +90 -81
- package/es/{pages → components/canvas}/dag-canvas/canvas-content.d.ts +11 -10
- package/es/{pages → components/canvas}/dag-canvas/canvas-content.js +23 -12
- package/es/{pages → components/canvas}/dag-canvas/index.d.ts +23 -18
- package/es/{pages → components/canvas}/dag-canvas/index.js +5 -2
- package/es/{pages → components/canvas}/dag-canvas/preview.d.ts +10 -10
- package/es/components/canvas/dag-canvas/preview.js +53 -0
- package/es/{pages → components/canvas}/index.d.ts +48 -42
- package/es/{pages → components/canvas}/index.js +20 -10
- package/es/{pages → components/canvas}/index.less +2 -2
- package/es/{pages → components/canvas}/strategy-header/index.d.ts +48 -56
- package/es/components/canvas/strategy-header/index.js +210 -0
- package/es/{pages → components/canvas}/strategy-header/style.less +4 -3
- package/es/{pages → components/canvas}/strategy-header/theme-switch/index.d.ts +4 -4
- package/es/{pages → components/canvas}/strategy-header/theme-switch/index.js +2 -3
- package/es/index.d.ts +9 -8
- package/es/index.js +8 -7
- package/es/packages/graph-canvas/graph-common.d.ts +19 -0
- package/es/packages/graph-canvas/graph-common.js +19 -0
- package/es/packages/graph-canvas/graph-model/edge/group-edge/index.d.ts +4 -0
- package/es/packages/graph-canvas/graph-model/edge/group-edge/index.js +63 -0
- package/es/packages/graph-canvas/graph-model/edge/index.d.ts +2 -0
- package/es/packages/graph-canvas/graph-model/edge/index.js +2 -0
- package/es/packages/graph-canvas/graph-model/node/application-node/application-element.d.ts +9 -0
- package/es/packages/graph-canvas/graph-model/node/application-node/application-element.js +20 -0
- package/es/packages/graph-canvas/graph-model/node/application-node/application-element.less +17 -0
- package/es/packages/graph-canvas/graph-model/node/application-node/index.d.ts +7 -0
- package/es/{common/graph-common/shape/nodes/GroupNode.js → packages/graph-canvas/graph-model/node/application-node/index.js} +42 -22
- package/es/{common/graph-common/shape/nodes/CommonNode.d.ts → packages/graph-canvas/graph-model/node/common-node/index.d.ts} +7 -5
- package/es/{common/graph-common/shape/nodes/CommonNode.js → packages/graph-canvas/graph-model/node/common-node/index.js} +8 -7
- package/es/{common/graph-common/node-element → packages/graph-canvas/graph-model/node/common-node}/node-element.d.ts +9 -9
- package/es/{common/graph-common/node-element → packages/graph-canvas/graph-model/node/common-node}/node-element.js +16 -14
- package/es/{common/graph-common/node-element → packages/graph-canvas/graph-model/node/common-node}/node-element.less +4 -4
- package/es/{common/graph-common/node-element → packages/graph-canvas/graph-model/node/condition-node}/condition-element.d.ts +9 -9
- package/es/{common/graph-common/node-element → packages/graph-canvas/graph-model/node/condition-node}/condition-element.js +20 -15
- package/es/{common/graph-common/node-element → packages/graph-canvas/graph-model/node/condition-node}/condition-element.less +76 -81
- package/es/packages/graph-canvas/graph-model/node/condition-node/images/rhombus.svg +3 -0
- package/es/{common/graph-common/shape/nodes/ConditionJudgment.d.ts → packages/graph-canvas/graph-model/node/condition-node/index.d.ts} +5 -5
- package/es/{common/graph-common/shape/nodes/ConditionJudgment.js → packages/graph-canvas/graph-model/node/condition-node/index.js} +7 -6
- package/es/packages/graph-canvas/graph-model/node/index.d.ts +5 -0
- package/es/packages/graph-canvas/graph-model/node/index.js +5 -0
- package/es/packages/graph-canvas/graph-model/node/logical-node/images/AND.svg +11 -0
- package/es/packages/graph-canvas/graph-model/node/logical-node/images/OR.svg +11 -0
- package/es/packages/graph-canvas/graph-model/node/logical-node/images/XOR.svg +11 -0
- package/es/packages/graph-canvas/graph-model/node/logical-node/images/locking.svg +5 -0
- package/es/packages/graph-canvas/graph-model/node/logical-node/images/unlock.svg +5 -0
- package/es/packages/graph-canvas/graph-model/node/logical-node/index.d.ts +6 -0
- package/es/{common/graph-common/shape/nodes/LogicalNode.js → packages/graph-canvas/graph-model/node/logical-node/index.js} +15 -15
- package/es/packages/graph-canvas/graph-model/node/logical-node/logical-element.d.ts +9 -0
- package/es/{common/graph-common/node-element → packages/graph-canvas/graph-model/node/logical-node}/logical-element.js +36 -19
- package/es/{common/graph-common/node-element → packages/graph-canvas/graph-model/node/logical-node}/logical-element.less +4 -9
- package/es/packages/graph-canvas/graph-model/node/style.less +8 -0
- package/es/{common → packages/graph-canvas}/graph-utils/graph.d.ts +87 -83
- package/es/{common → packages/graph-canvas}/graph-utils/graph.js +8 -4
- package/es/{pages/rx-models/experiment-graph.d.ts → packages/graph-canvas/index.d.ts} +79 -82
- package/es/{pages/rx-models/experiment-graph.js → packages/graph-canvas/index.js} +285 -252
- package/es/packages/graph-canvas/node-types.d.ts +6 -0
- package/es/packages/graph-canvas/node-types.js +54 -0
- package/es/packages/graph-canvas/typings.d.ts +5 -0
- package/es/{common/constants → packages/graph-common}/global.d.ts +1 -1
- package/es/{common/constants → packages/graph-common}/graph.d.ts +12 -10
- package/es/{common/constants → packages/graph-common}/graph.js +4 -2
- package/es/{pages/rx-models → packages/graph-core}/graph-util.d.ts +182 -186
- package/es/{pages/rx-models → packages/graph-core}/graph-util.js +8 -15
- package/es/{pages/rx-models/graph-core.d.ts → packages/graph-core/index.d.ts} +96 -96
- package/es/{pages/rx-models/graph-core.js → packages/graph-core/index.js} +119 -87
- package/es/packages/graph-core/typing.d.ts +107 -0
- package/es/{common/graph-common → packages/graph-model}/connector/index.d.ts +1 -1
- package/es/packages/graph-model/connector/index.js +14 -0
- package/es/packages/graph-model/edge/edge.less +8 -0
- package/es/packages/graph-model/edge/index.d.ts +5 -0
- package/es/{common/graph-common/shape/edge.js → packages/graph-model/edge/index.js} +10 -61
- package/es/packages/graph-model/node/index.d.ts +7 -0
- package/es/{common/graph-common/shape/nodes/BaseNode.js → packages/graph-model/node/index.js} +12 -3
- package/es/{common/graph-common/node-element/common-element.less → packages/graph-model/node/node-basic.less} +1 -0
- package/es/{hooks → packages/hooks}/useObservableState.d.ts +3 -3
- package/es/packages/hooks/withMode.d.ts +3 -0
- package/es/packages/hooks/withMode.js +12 -0
- package/es/style/default.less +8 -0
- package/es/style/svgRaw.d.ts +1 -0
- package/es/style/svgRaw.js +1 -0
- package/es/typings.d.ts +2 -8
- package/es/utils/utils.d.ts +1 -1
- package/lib/assets/AND.svg +11 -0
- package/lib/assets/OR.svg +11 -0
- package/lib/assets/XOR.svg +11 -0
- package/lib/assets/add.svg +13 -0
- package/lib/assets/alarm.svg +11 -0
- package/lib/assets/application.svg +11 -0
- package/lib/assets/cancel.svg +13 -0
- package/lib/assets/check.svg +12 -0
- package/lib/assets/condition.svg +12 -0
- package/lib/assets/control.svg +11 -0
- package/lib/assets/decive.svg +11 -0
- package/lib/assets/delete.svg +11 -0
- package/lib/assets/device.svg +11 -0
- package/lib/assets/edit.svg +11 -0
- package/lib/assets/hand.svg +11 -0
- package/lib/assets/link.svg +11 -0
- package/lib/assets/lock.svg +8 -0
- package/lib/assets/logical.svg +12 -0
- package/lib/assets/notice.svg +11 -0
- package/lib/assets/order.svg +11 -0
- package/lib/assets/relation.svg +11 -0
- package/lib/assets/rhombus.svg +3 -0
- package/lib/assets/save.svg +13 -0
- package/lib/assets/time.svg +11 -0
- package/lib/assets/variate.svg +12 -0
- package/lib/components/canvas/component-tree-panel/category-tree/category-type.d.ts +1 -0
- package/lib/components/canvas/component-tree-panel/category-tree/category-type.js +111 -0
- package/lib/components/canvas/component-tree-panel/category-tree/index.d.ts +17 -0
- package/lib/components/canvas/component-tree-panel/category-tree/index.js +115 -0
- package/lib/components/canvas/component-tree-panel/category-tree/index.less +36 -0
- package/lib/components/canvas/component-tree-panel/category-tree/node-title.d.ts +12 -0
- package/lib/components/canvas/component-tree-panel/category-tree/node-title.js +75 -0
- package/lib/components/canvas/component-tree-panel/category-tree/node-title.less +113 -0
- package/lib/components/canvas/component-tree-panel/index.d.ts +17 -0
- package/lib/components/canvas/component-tree-panel/index.js +33 -0
- package/lib/components/canvas/component-tree-panel/index.less +52 -0
- package/lib/components/canvas/config-panel/components/condition-configuration/configure-modal/data-origin.d.ts +49 -0
- package/lib/components/canvas/config-panel/components/condition-configuration/configure-modal/data-origin.js +229 -0
- package/lib/components/canvas/config-panel/components/condition-configuration/configure-modal/index.d.ts +11 -0
- package/lib/components/canvas/config-panel/components/condition-configuration/configure-modal/index.js +187 -0
- package/lib/components/canvas/config-panel/components/condition-configuration/configure-modal/style.less +13 -0
- package/lib/components/canvas/config-panel/components/condition-configuration/cross-line.d.ts +9 -0
- package/lib/components/canvas/config-panel/components/condition-configuration/cross-line.js +57 -0
- package/lib/components/canvas/config-panel/components/condition-configuration/index.d.ts +10 -0
- package/lib/components/canvas/config-panel/components/condition-configuration/index.js +216 -0
- package/lib/components/canvas/config-panel/components/condition-configuration/style.less +74 -0
- package/lib/components/canvas/config-panel/components/time-trigger/components/cycle-time.d.ts +9 -0
- package/lib/components/canvas/config-panel/components/time-trigger/components/cycle-time.js +108 -0
- package/lib/components/canvas/config-panel/components/time-trigger/components/time-horizon.d.ts +10 -0
- package/lib/components/canvas/config-panel/components/time-trigger/components/time-horizon.js +78 -0
- package/lib/components/canvas/config-panel/components/time-trigger/delay-time.d.ts +9 -0
- package/lib/components/canvas/config-panel/components/time-trigger/delay-time.js +33 -0
- package/lib/components/canvas/config-panel/components/time-trigger/effective-time.d.ts +7 -0
- package/lib/components/canvas/config-panel/components/time-trigger/effective-time.js +58 -0
- package/lib/components/canvas/config-panel/components/time-trigger/index.d.ts +9 -0
- package/lib/components/canvas/config-panel/components/time-trigger/index.js +114 -0
- package/lib/components/canvas/config-panel/components/time-trigger/interval-time.d.ts +9 -0
- package/lib/components/canvas/config-panel/components/time-trigger/interval-time.js +63 -0
- package/lib/components/canvas/config-panel/components/time-trigger/persistent-time.d.ts +9 -0
- package/lib/components/canvas/config-panel/components/time-trigger/persistent-time.js +33 -0
- package/lib/components/canvas/config-panel/components/time-trigger/section-Detail.d.ts +10 -0
- package/lib/components/canvas/config-panel/components/time-trigger/section-Detail.js +140 -0
- package/lib/components/canvas/config-panel/components/time-trigger/section-time.d.ts +9 -0
- package/lib/components/canvas/config-panel/components/time-trigger/section-time.js +96 -0
- package/lib/components/canvas/config-panel/components/time-trigger/timing-time.d.ts +9 -0
- package/lib/components/canvas/config-panel/components/time-trigger/timing-time.js +65 -0
- package/lib/components/canvas/config-panel/config-common.d.ts +38 -0
- package/lib/components/canvas/config-panel/config-common.js +152 -0
- package/lib/components/canvas/config-panel/index.d.ts +14 -0
- package/lib/components/canvas/config-panel/index.js +68 -0
- package/lib/components/canvas/config-panel/node-form.d.ts +23 -0
- package/lib/components/canvas/config-panel/node-form.js +97 -0
- package/lib/components/canvas/config-panel/style.less +90 -0
- package/lib/components/canvas/dag-canvas/canvas-content.d.ts +11 -0
- package/lib/components/canvas/dag-canvas/canvas-content.js +130 -0
- package/lib/components/canvas/dag-canvas/canvas-content.less +5 -0
- package/lib/components/canvas/dag-canvas/index.d.ts +23 -0
- package/lib/components/canvas/dag-canvas/index.js +53 -0
- package/lib/components/canvas/dag-canvas/index.less +11 -0
- package/lib/components/canvas/dag-canvas/preview.d.ts +10 -0
- package/lib/components/canvas/dag-canvas/preview.js +73 -0
- package/lib/components/canvas/index.d.ts +48 -0
- package/lib/components/canvas/index.js +107 -0
- package/lib/components/canvas/index.less +50 -0
- package/lib/components/canvas/strategy-header/index.d.ts +48 -0
- package/lib/components/canvas/strategy-header/index.js +229 -0
- package/lib/components/canvas/strategy-header/style.less +23 -0
- package/lib/components/canvas/strategy-header/theme-switch/index.d.ts +4 -0
- package/lib/components/canvas/strategy-header/theme-switch/index.js +30 -0
- package/lib/components/canvas/strategy-header/theme-switch/style.less +11 -0
- package/lib/index.d.ts +9 -0
- package/lib/index.js +71 -0
- package/lib/packages/graph-canvas/graph-common.d.ts +19 -0
- package/lib/packages/graph-canvas/graph-common.js +27 -0
- package/lib/packages/graph-canvas/graph-model/edge/group-edge/edge.less +8 -0
- package/lib/packages/graph-canvas/graph-model/edge/group-edge/index.d.ts +4 -0
- package/lib/packages/graph-canvas/graph-model/edge/group-edge/index.js +74 -0
- package/lib/packages/graph-canvas/graph-model/edge/index.d.ts +2 -0
- package/lib/packages/graph-canvas/graph-model/edge/index.js +15 -0
- package/lib/packages/graph-canvas/graph-model/node/application-node/application-element.d.ts +9 -0
- package/lib/packages/graph-canvas/graph-model/node/application-node/application-element.js +31 -0
- package/lib/packages/graph-canvas/graph-model/node/application-node/application-element.less +17 -0
- package/lib/packages/graph-canvas/graph-model/node/application-node/index.d.ts +7 -0
- package/lib/packages/graph-canvas/graph-model/node/application-node/index.js +133 -0
- package/lib/packages/graph-canvas/graph-model/node/common-node/index.d.ts +7 -0
- package/lib/packages/graph-canvas/graph-model/node/common-node/index.js +133 -0
- package/lib/packages/graph-canvas/graph-model/node/common-node/node-element.d.ts +9 -0
- package/lib/packages/graph-canvas/graph-model/node/common-node/node-element.js +69 -0
- package/lib/packages/graph-canvas/graph-model/node/common-node/node-element.less +48 -0
- package/{es/common/graph-common/node-element/logical-element.d.ts → lib/packages/graph-canvas/graph-model/node/condition-node/condition-element.d.ts} +9 -9
- package/lib/packages/graph-canvas/graph-model/node/condition-node/condition-element.js +81 -0
- package/lib/packages/graph-canvas/graph-model/node/condition-node/condition-element.less +76 -0
- package/lib/packages/graph-canvas/graph-model/node/condition-node/images/rhombus.svg +3 -0
- package/{es/common/graph-common/shape/nodes/LogicalNode.d.ts → lib/packages/graph-canvas/graph-model/node/condition-node/index.d.ts} +5 -5
- package/lib/packages/graph-canvas/graph-model/node/condition-node/index.js +143 -0
- package/lib/packages/graph-canvas/graph-model/node/index.d.ts +5 -0
- package/lib/packages/graph-canvas/graph-model/node/index.js +39 -0
- package/lib/packages/graph-canvas/graph-model/node/logical-node/images/AND.svg +11 -0
- package/lib/packages/graph-canvas/graph-model/node/logical-node/images/OR.svg +11 -0
- package/lib/packages/graph-canvas/graph-model/node/logical-node/images/XOR.svg +11 -0
- package/lib/packages/graph-canvas/graph-model/node/logical-node/images/locking.svg +5 -0
- package/lib/packages/graph-canvas/graph-model/node/logical-node/images/unlock.svg +5 -0
- package/lib/packages/graph-canvas/graph-model/node/logical-node/index.d.ts +6 -0
- package/lib/packages/graph-canvas/graph-model/node/logical-node/index.js +143 -0
- package/lib/packages/graph-canvas/graph-model/node/logical-node/logical-element.d.ts +9 -0
- package/lib/packages/graph-canvas/graph-model/node/logical-node/logical-element.js +98 -0
- package/lib/packages/graph-canvas/graph-model/node/logical-node/logical-element.less +49 -0
- package/lib/packages/graph-canvas/graph-model/node/style.less +8 -0
- package/lib/packages/graph-canvas/graph-utils/graph.d.ts +87 -0
- package/lib/packages/graph-canvas/graph-utils/graph.js +124 -0
- package/lib/packages/graph-canvas/index.d.ts +79 -0
- package/lib/packages/graph-canvas/index.js +1292 -0
- package/lib/packages/graph-canvas/node-types.d.ts +6 -0
- package/lib/packages/graph-canvas/node-types.js +66 -0
- package/lib/packages/graph-canvas/typings.d.ts +5 -0
- package/lib/packages/graph-common/global.d.ts +1 -0
- package/lib/packages/graph-common/global.js +8 -0
- package/lib/packages/graph-common/graph.d.ts +12 -0
- package/lib/packages/graph-common/graph.js +37 -0
- package/lib/packages/graph-core/graph-util.d.ts +182 -0
- package/lib/packages/graph-core/graph-util.js +368 -0
- package/lib/packages/graph-core/index.d.ts +96 -0
- package/lib/packages/graph-core/index.js +798 -0
- package/lib/packages/graph-core/typing.d.ts +107 -0
- package/lib/packages/graph-model/connector/index.d.ts +1 -0
- package/lib/packages/graph-model/connector/index.js +17 -0
- package/lib/packages/graph-model/edge/edge.less +8 -0
- package/lib/packages/graph-model/edge/index.d.ts +5 -0
- package/lib/packages/graph-model/edge/index.js +73 -0
- package/lib/packages/graph-model/node/index.d.ts +7 -0
- package/lib/packages/graph-model/node/index.js +63 -0
- package/lib/packages/graph-model/node/node-basic.less +118 -0
- package/lib/packages/hooks/useObservableState.d.ts +3 -0
- package/lib/packages/hooks/useObservableState.js +55 -0
- package/lib/packages/hooks/withMode.d.ts +3 -0
- package/lib/packages/hooks/withMode.js +22 -0
- package/lib/style/basic.less +12 -0
- package/lib/style/default.less +10 -0
- package/lib/style/position.less +25 -0
- package/lib/style/svgRaw.d.ts +1 -0
- package/lib/style/svgRaw.js +8 -0
- package/lib/style/theme-light.less +7 -0
- package/lib/style/variable.less +3 -0
- package/lib/typings.d.ts +8 -0
- package/lib/utils/utils.d.ts +1 -0
- package/lib/utils/utils.js +13 -0
- package/package.json +38 -37
- package/tsconfig.json +1 -1
- package/es/common/graph-common/category-type.d.ts +0 -16
- package/es/common/graph-common/connector/index.js +0 -14
- package/es/common/graph-common/node-element/node-group.d.ts +0 -8
- package/es/common/graph-common/node-element/node-group.js +0 -395
- package/es/common/graph-common/node-element/node-group.less +0 -53
- package/es/common/graph-common/node-popover/index.d.ts +0 -7
- package/es/common/graph-common/node-popover/index.js +0 -11
- package/es/common/graph-common/node-popover/index.less +0 -5
- package/es/common/graph-common/node-types.d.ts +0 -28
- package/es/common/graph-common/node-types.js +0 -60
- package/es/common/graph-common/shape/edge.d.ts +0 -10
- package/es/common/graph-common/shape/node.d.ts +0 -6
- package/es/common/graph-common/shape/node.js +0 -6
- package/es/common/graph-common/shape/nodes/BaseNode.d.ts +0 -4
- package/es/common/graph-common/shape/nodes/GroupNode.d.ts +0 -4
- package/es/component/cut.d.ts +0 -10
- package/es/component/cut.js +0 -34
- package/es/component/cut.less +0 -6
- package/es/component/item-name.d.ts +0 -6
- package/es/component/item-name.js +0 -30
- package/es/component/keyword.d.ts +0 -9
- package/es/component/keyword.js +0 -26
- package/es/component/keyword.less +0 -11
- package/es/component/rx-component/rx-input.d.ts +0 -8
- package/es/component/rx-component/rx-input.js +0 -47
- package/es/hooks/withMode.d.ts +0 -1
- package/es/hooks/withMode.js +0 -16
- package/es/pages/dag-canvas/preview.js +0 -42
- package/es/pages/rx-models/graph-core.less +0 -14
- package/es/pages/rx-models/typing.d.ts +0 -126
- package/es/pages/strategy-header/index.js +0 -154
- /package/es/{pages → components/canvas}/component-tree-panel/category-tree/node-title.less +0 -0
- /package/es/{pages → components/canvas}/config-panel/components/time-trigger/delay-time.js +0 -0
- /package/es/{pages → components/canvas}/config-panel/components/time-trigger/persistent-time.js +0 -0
- /package/es/{pages → components/canvas}/dag-canvas/canvas-content.less +0 -0
- /package/es/{pages → components/canvas}/dag-canvas/index.less +0 -0
- /package/es/{pages → components/canvas}/strategy-header/theme-switch/style.less +0 -0
- /package/es/{common/graph-common/shape → packages/graph-canvas/graph-model/edge/group-edge}/edge.less +0 -0
- /package/es/{common/constants → packages/graph-common}/global.js +0 -0
- /package/es/{hooks → packages/hooks}/useObservableState.js +0 -0
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
@import (reference) '../../../style/theme-light';
|
|
2
|
+
|
|
3
|
+
.header-btn {
|
|
4
|
+
display: flex;
|
|
5
|
+
align-items: center;
|
|
6
|
+
margin-right: 25px;
|
|
7
|
+
font-size: 12px;
|
|
8
|
+
cursor: pointer;
|
|
9
|
+
.header-btn-img {
|
|
10
|
+
width: 13px;
|
|
11
|
+
height: 13px;
|
|
12
|
+
margin-right: 5px;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.strategyHeader {
|
|
17
|
+
height: 45px !important;
|
|
18
|
+
line-height: 45px !important;
|
|
19
|
+
padding: 0 15px;
|
|
20
|
+
background: @light-gray-bg;
|
|
21
|
+
border: 1px solid #DCDCDC;
|
|
22
|
+
|
|
23
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
|
|
10
|
+
var _antd = require("antd");
|
|
11
|
+
|
|
12
|
+
require("./style.less");
|
|
13
|
+
|
|
14
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
|
+
|
|
16
|
+
var Index = function Index() {
|
|
17
|
+
var handleThemeChange = function handleThemeChange(checked) {
|
|
18
|
+
console.log('checked', checked);
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
22
|
+
className: "theme-switch"
|
|
23
|
+
}, /*#__PURE__*/_react.default.createElement(_antd.Switch, {
|
|
24
|
+
defaultChecked: false,
|
|
25
|
+
onChange: handleThemeChange
|
|
26
|
+
}));
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
var _default = Index;
|
|
30
|
+
exports.default = _default;
|
package/lib/index.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="@/typings" />
|
|
2
|
+
export { default as StrategyCanvas } from './components/canvas';
|
|
3
|
+
export { default as StrategyHeader } from './components/canvas/strategy-header';
|
|
4
|
+
export { default as ComponentTreePanel } from './components/canvas/component-tree-panel';
|
|
5
|
+
export { default as DAGCanvas } from './components/canvas/dag-canvas';
|
|
6
|
+
export { default as ConfigPanel } from './components/canvas/config-panel';
|
|
7
|
+
export { useExperimentGraph } from './packages/graph-canvas';
|
|
8
|
+
export { useObservableState } from './packages/hooks/useObservableState';
|
|
9
|
+
export { PanelType } from './packages/graph-canvas/node-types';
|
package/lib/index.js
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "ComponentTreePanel", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function get() {
|
|
9
|
+
return _componentTreePanel.default;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
Object.defineProperty(exports, "ConfigPanel", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function get() {
|
|
15
|
+
return _configPanel.default;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
Object.defineProperty(exports, "DAGCanvas", {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: function get() {
|
|
21
|
+
return _dagCanvas.default;
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
Object.defineProperty(exports, "PanelType", {
|
|
25
|
+
enumerable: true,
|
|
26
|
+
get: function get() {
|
|
27
|
+
return _nodeTypes.PanelType;
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
Object.defineProperty(exports, "StrategyCanvas", {
|
|
31
|
+
enumerable: true,
|
|
32
|
+
get: function get() {
|
|
33
|
+
return _canvas.default;
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
Object.defineProperty(exports, "StrategyHeader", {
|
|
37
|
+
enumerable: true,
|
|
38
|
+
get: function get() {
|
|
39
|
+
return _strategyHeader.default;
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
Object.defineProperty(exports, "useExperimentGraph", {
|
|
43
|
+
enumerable: true,
|
|
44
|
+
get: function get() {
|
|
45
|
+
return _graphCanvas.useExperimentGraph;
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
Object.defineProperty(exports, "useObservableState", {
|
|
49
|
+
enumerable: true,
|
|
50
|
+
get: function get() {
|
|
51
|
+
return _useObservableState.useObservableState;
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
var _canvas = _interopRequireDefault(require("./components/canvas"));
|
|
56
|
+
|
|
57
|
+
var _strategyHeader = _interopRequireDefault(require("./components/canvas/strategy-header"));
|
|
58
|
+
|
|
59
|
+
var _componentTreePanel = _interopRequireDefault(require("./components/canvas/component-tree-panel"));
|
|
60
|
+
|
|
61
|
+
var _dagCanvas = _interopRequireDefault(require("./components/canvas/dag-canvas"));
|
|
62
|
+
|
|
63
|
+
var _configPanel = _interopRequireDefault(require("./components/canvas/config-panel"));
|
|
64
|
+
|
|
65
|
+
var _graphCanvas = require("./packages/graph-canvas");
|
|
66
|
+
|
|
67
|
+
var _useObservableState = require("./packages/hooks/useObservableState");
|
|
68
|
+
|
|
69
|
+
var _nodeTypes = require("./packages/graph-canvas/node-types");
|
|
70
|
+
|
|
71
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export declare const initGraphData: {
|
|
2
|
+
nodes: never[];
|
|
3
|
+
links: never[];
|
|
4
|
+
};
|
|
5
|
+
export declare const basicEdgeAttrs: {
|
|
6
|
+
attrs: {
|
|
7
|
+
line: {
|
|
8
|
+
strokeDasharray: number;
|
|
9
|
+
stroke: string;
|
|
10
|
+
strokeWidth: number;
|
|
11
|
+
targetMarker: {
|
|
12
|
+
name: string;
|
|
13
|
+
args: {
|
|
14
|
+
size: string;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.initGraphData = exports.basicEdgeAttrs = void 0;
|
|
7
|
+
var initGraphData = {
|
|
8
|
+
nodes: [],
|
|
9
|
+
links: []
|
|
10
|
+
};
|
|
11
|
+
exports.initGraphData = initGraphData;
|
|
12
|
+
var basicEdgeAttrs = {
|
|
13
|
+
attrs: {
|
|
14
|
+
line: {
|
|
15
|
+
strokeDasharray: 5,
|
|
16
|
+
stroke: '#00A6FF',
|
|
17
|
+
strokeWidth: 1,
|
|
18
|
+
targetMarker: {
|
|
19
|
+
name: 'block',
|
|
20
|
+
args: {
|
|
21
|
+
size: '6'
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
exports.basicEdgeAttrs = basicEdgeAttrs;
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
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); }
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.default = void 0;
|
|
9
|
+
|
|
10
|
+
var _edge = _interopRequireDefault(require("../../../../graph-model/edge"));
|
|
11
|
+
|
|
12
|
+
var _x = require("@antv/x6");
|
|
13
|
+
|
|
14
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
|
+
|
|
16
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
17
|
+
|
|
18
|
+
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); } }
|
|
19
|
+
|
|
20
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
21
|
+
|
|
22
|
+
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); }
|
|
23
|
+
|
|
24
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
25
|
+
|
|
26
|
+
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); }; }
|
|
27
|
+
|
|
28
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
29
|
+
|
|
30
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
31
|
+
|
|
32
|
+
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; } }
|
|
33
|
+
|
|
34
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
35
|
+
|
|
36
|
+
var GroupEdge = /*#__PURE__*/function (_BaseEdge) {
|
|
37
|
+
_inherits(GroupEdge, _BaseEdge);
|
|
38
|
+
|
|
39
|
+
var _super = _createSuper(GroupEdge);
|
|
40
|
+
|
|
41
|
+
function GroupEdge() {
|
|
42
|
+
_classCallCheck(this, GroupEdge);
|
|
43
|
+
|
|
44
|
+
return _super.apply(this, arguments);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
_createClass(GroupEdge, [{
|
|
48
|
+
key: "isGroupEdge",
|
|
49
|
+
value: // eslint-disable-next-line class-methods-use-this
|
|
50
|
+
function isGroupEdge() {
|
|
51
|
+
return true;
|
|
52
|
+
}
|
|
53
|
+
}]);
|
|
54
|
+
|
|
55
|
+
return GroupEdge;
|
|
56
|
+
}(_edge.default);
|
|
57
|
+
|
|
58
|
+
exports.default = GroupEdge;
|
|
59
|
+
GroupEdge.config({
|
|
60
|
+
shape: 'group-edge',
|
|
61
|
+
attrs: {
|
|
62
|
+
line: {
|
|
63
|
+
stroke: '#00A6FF',
|
|
64
|
+
strokeWidth: 1,
|
|
65
|
+
strokeDasharray: 5,
|
|
66
|
+
targetMarker: {
|
|
67
|
+
stroke: 'none',
|
|
68
|
+
fill: 'none'
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
_x.Graph.registerEdge('group-edge', GroupEdge);
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "GroupEdge", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function get() {
|
|
9
|
+
return _groupEdge.default;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
var _groupEdge = _interopRequireDefault(require("./group-edge"));
|
|
14
|
+
|
|
15
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
|
|
10
|
+
require("./application-element.less");
|
|
11
|
+
|
|
12
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
+
|
|
14
|
+
var ApplicationElement = function ApplicationElement(props) {
|
|
15
|
+
var node = props.node;
|
|
16
|
+
var data = (node === null || node === void 0 ? void 0 : node.getData()) || {};
|
|
17
|
+
var applicationImgUrl = data.applicationImgUrl,
|
|
18
|
+
name = data.name;
|
|
19
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
20
|
+
className: "application-element"
|
|
21
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
22
|
+
className: "application-name"
|
|
23
|
+
}, name), /*#__PURE__*/_react.default.createElement("img", {
|
|
24
|
+
alt: "",
|
|
25
|
+
src: applicationImgUrl,
|
|
26
|
+
className: "icon"
|
|
27
|
+
}));
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
var _default = ApplicationElement;
|
|
31
|
+
exports.default = _default;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import BaseNode from "../../../../graph-model/node";
|
|
2
|
+
export declare const APPLICATION_NODE_WIDTH = 400;
|
|
3
|
+
export declare const APPLICATION_NODE_HEIGHT = 300;
|
|
4
|
+
export default class ApplicationNode extends BaseNode {
|
|
5
|
+
getInPorts(): import("@antv/x6/lib/model/port").PortManager.PortMetadata[];
|
|
6
|
+
getOutPorts(): import("@antv/x6/lib/model/port").PortManager.PortMetadata[];
|
|
7
|
+
}
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
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); }
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.default = exports.APPLICATION_NODE_WIDTH = exports.APPLICATION_NODE_HEIGHT = void 0;
|
|
9
|
+
|
|
10
|
+
var _x = require("@antv/x6");
|
|
11
|
+
|
|
12
|
+
var _node = _interopRequireDefault(require("../../../../graph-model/node"));
|
|
13
|
+
|
|
14
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
|
+
|
|
16
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
17
|
+
|
|
18
|
+
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); } }
|
|
19
|
+
|
|
20
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
21
|
+
|
|
22
|
+
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); }
|
|
23
|
+
|
|
24
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
25
|
+
|
|
26
|
+
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); }; }
|
|
27
|
+
|
|
28
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
29
|
+
|
|
30
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
31
|
+
|
|
32
|
+
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; } }
|
|
33
|
+
|
|
34
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
35
|
+
|
|
36
|
+
var APPLICATION_NODE_WIDTH = 400;
|
|
37
|
+
exports.APPLICATION_NODE_WIDTH = APPLICATION_NODE_WIDTH;
|
|
38
|
+
var APPLICATION_NODE_HEIGHT = 300;
|
|
39
|
+
exports.APPLICATION_NODE_HEIGHT = APPLICATION_NODE_HEIGHT;
|
|
40
|
+
|
|
41
|
+
var ApplicationNode = /*#__PURE__*/function (_BaseNode) {
|
|
42
|
+
_inherits(ApplicationNode, _BaseNode);
|
|
43
|
+
|
|
44
|
+
var _super = _createSuper(ApplicationNode);
|
|
45
|
+
|
|
46
|
+
function ApplicationNode() {
|
|
47
|
+
_classCallCheck(this, ApplicationNode);
|
|
48
|
+
|
|
49
|
+
return _super.apply(this, arguments);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
_createClass(ApplicationNode, [{
|
|
53
|
+
key: "getInPorts",
|
|
54
|
+
value: function getInPorts() {
|
|
55
|
+
return this.getPortsByGroup('in');
|
|
56
|
+
}
|
|
57
|
+
}, {
|
|
58
|
+
key: "getOutPorts",
|
|
59
|
+
value: function getOutPorts() {
|
|
60
|
+
return this.getPortsByGroup('out');
|
|
61
|
+
}
|
|
62
|
+
}]);
|
|
63
|
+
|
|
64
|
+
return ApplicationNode;
|
|
65
|
+
}(_node.default);
|
|
66
|
+
|
|
67
|
+
exports.default = ApplicationNode;
|
|
68
|
+
ApplicationNode.config({
|
|
69
|
+
width: APPLICATION_NODE_WIDTH,
|
|
70
|
+
height: APPLICATION_NODE_HEIGHT,
|
|
71
|
+
inherit: 'react-shape',
|
|
72
|
+
ports: {
|
|
73
|
+
groups: {
|
|
74
|
+
in: {
|
|
75
|
+
position: {
|
|
76
|
+
name: 'top'
|
|
77
|
+
},
|
|
78
|
+
zIndex: 2
|
|
79
|
+
},
|
|
80
|
+
out: {
|
|
81
|
+
position: {
|
|
82
|
+
name: 'bottom'
|
|
83
|
+
},
|
|
84
|
+
zIndex: 2
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
attrs: {
|
|
89
|
+
body: {
|
|
90
|
+
magnet: false,
|
|
91
|
+
fill: 'none',
|
|
92
|
+
stroke: 'none',
|
|
93
|
+
refWidth: '100%',
|
|
94
|
+
refHeight: '100%',
|
|
95
|
+
zIndex: 1
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
portMarkup: [{
|
|
99
|
+
tagName: 'foreignObject',
|
|
100
|
+
selector: 'fo',
|
|
101
|
+
attrs: {
|
|
102
|
+
width: 8,
|
|
103
|
+
height: 8,
|
|
104
|
+
x: -4,
|
|
105
|
+
y: -4,
|
|
106
|
+
zIndex: 10,
|
|
107
|
+
// magnet决定是否可交互
|
|
108
|
+
magnet: 'true'
|
|
109
|
+
},
|
|
110
|
+
children: [{
|
|
111
|
+
ns: _x.Dom.ns.xhtml,
|
|
112
|
+
tagName: 'body',
|
|
113
|
+
selector: 'foBody',
|
|
114
|
+
attrs: {
|
|
115
|
+
xmlns: _x.Dom.ns.xhtml
|
|
116
|
+
},
|
|
117
|
+
style: {
|
|
118
|
+
width: '100%',
|
|
119
|
+
height: '100%'
|
|
120
|
+
},
|
|
121
|
+
children: [{
|
|
122
|
+
tagName: 'span',
|
|
123
|
+
selector: 'content',
|
|
124
|
+
style: {
|
|
125
|
+
width: '100%',
|
|
126
|
+
height: '100%'
|
|
127
|
+
}
|
|
128
|
+
}]
|
|
129
|
+
}]
|
|
130
|
+
}]
|
|
131
|
+
});
|
|
132
|
+
|
|
133
|
+
_x.Graph.registerNode('application-node', ApplicationNode);
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import BaseNode from "../../../../graph-model/node";
|
|
2
|
+
export declare const NODE_WIDTH = 180;
|
|
3
|
+
export declare const NODE_HEIGHT = 43;
|
|
4
|
+
export default class CommonNode extends BaseNode {
|
|
5
|
+
getInPorts(): import("@antv/x6/lib/model/port").PortManager.PortMetadata[];
|
|
6
|
+
getOutPorts(): import("@antv/x6/lib/model/port").PortManager.PortMetadata[];
|
|
7
|
+
}
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
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); }
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.default = exports.NODE_WIDTH = exports.NODE_HEIGHT = void 0;
|
|
9
|
+
|
|
10
|
+
var _x = require("@antv/x6");
|
|
11
|
+
|
|
12
|
+
var _node = _interopRequireDefault(require("../../../../graph-model/node"));
|
|
13
|
+
|
|
14
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
|
+
|
|
16
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
17
|
+
|
|
18
|
+
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); } }
|
|
19
|
+
|
|
20
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
21
|
+
|
|
22
|
+
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); }
|
|
23
|
+
|
|
24
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
25
|
+
|
|
26
|
+
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); }; }
|
|
27
|
+
|
|
28
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
29
|
+
|
|
30
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
31
|
+
|
|
32
|
+
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; } }
|
|
33
|
+
|
|
34
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
35
|
+
|
|
36
|
+
var NODE_WIDTH = 180;
|
|
37
|
+
exports.NODE_WIDTH = NODE_WIDTH;
|
|
38
|
+
var NODE_HEIGHT = 43;
|
|
39
|
+
exports.NODE_HEIGHT = NODE_HEIGHT;
|
|
40
|
+
|
|
41
|
+
var CommonNode = /*#__PURE__*/function (_BaseNode) {
|
|
42
|
+
_inherits(CommonNode, _BaseNode);
|
|
43
|
+
|
|
44
|
+
var _super = _createSuper(CommonNode);
|
|
45
|
+
|
|
46
|
+
function CommonNode() {
|
|
47
|
+
_classCallCheck(this, CommonNode);
|
|
48
|
+
|
|
49
|
+
return _super.apply(this, arguments);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
_createClass(CommonNode, [{
|
|
53
|
+
key: "getInPorts",
|
|
54
|
+
value: function getInPorts() {
|
|
55
|
+
return this.getPortsByGroup('in');
|
|
56
|
+
}
|
|
57
|
+
}, {
|
|
58
|
+
key: "getOutPorts",
|
|
59
|
+
value: function getOutPorts() {
|
|
60
|
+
return this.getPortsByGroup('out');
|
|
61
|
+
}
|
|
62
|
+
}]);
|
|
63
|
+
|
|
64
|
+
return CommonNode;
|
|
65
|
+
}(_node.default);
|
|
66
|
+
|
|
67
|
+
exports.default = CommonNode;
|
|
68
|
+
CommonNode.config({
|
|
69
|
+
width: NODE_WIDTH,
|
|
70
|
+
height: NODE_HEIGHT,
|
|
71
|
+
inherit: 'react-shape',
|
|
72
|
+
ports: {
|
|
73
|
+
groups: {
|
|
74
|
+
in: {
|
|
75
|
+
position: {
|
|
76
|
+
name: 'top'
|
|
77
|
+
},
|
|
78
|
+
zIndex: 2
|
|
79
|
+
},
|
|
80
|
+
out: {
|
|
81
|
+
position: {
|
|
82
|
+
name: 'bottom'
|
|
83
|
+
},
|
|
84
|
+
zIndex: 2
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
attrs: {
|
|
89
|
+
body: {
|
|
90
|
+
magnet: false,
|
|
91
|
+
fill: 'none',
|
|
92
|
+
stroke: 'none',
|
|
93
|
+
refWidth: '100%',
|
|
94
|
+
refHeight: '100%',
|
|
95
|
+
zIndex: 1
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
portMarkup: [{
|
|
99
|
+
tagName: 'foreignObject',
|
|
100
|
+
selector: 'fo',
|
|
101
|
+
attrs: {
|
|
102
|
+
width: 8,
|
|
103
|
+
height: 8,
|
|
104
|
+
x: -4,
|
|
105
|
+
y: -4,
|
|
106
|
+
zIndex: 10,
|
|
107
|
+
// magnet决定是否可交互
|
|
108
|
+
magnet: 'true'
|
|
109
|
+
},
|
|
110
|
+
children: [{
|
|
111
|
+
ns: _x.Dom.ns.xhtml,
|
|
112
|
+
tagName: 'body',
|
|
113
|
+
selector: 'foBody',
|
|
114
|
+
attrs: {
|
|
115
|
+
xmlns: _x.Dom.ns.xhtml
|
|
116
|
+
},
|
|
117
|
+
style: {
|
|
118
|
+
width: '100%',
|
|
119
|
+
height: '100%'
|
|
120
|
+
},
|
|
121
|
+
children: [{
|
|
122
|
+
tagName: 'span',
|
|
123
|
+
selector: 'content',
|
|
124
|
+
style: {
|
|
125
|
+
width: '100%',
|
|
126
|
+
height: '100%'
|
|
127
|
+
}
|
|
128
|
+
}]
|
|
129
|
+
}]
|
|
130
|
+
}]
|
|
131
|
+
});
|
|
132
|
+
|
|
133
|
+
_x.Graph.registerNode('base-rect-node', CommonNode);
|