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,60 +0,0 @@
|
|
|
1
|
-
var _nodeTypeMeta;
|
|
2
|
-
|
|
3
|
-
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; }
|
|
4
|
-
|
|
5
|
-
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
6
|
-
|
|
7
|
-
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
8
|
-
|
|
9
|
-
function _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); }
|
|
10
|
-
|
|
11
|
-
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
12
|
-
|
|
13
|
-
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
14
|
-
|
|
15
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
16
|
-
|
|
17
|
-
import { CONDITION_HEIGHT, CONDITION_WIDTH, LOGICAL_EDG } from "../constants/graph";
|
|
18
|
-
export var SCENE_DISPLAY = {
|
|
19
|
-
EQUIPMENT: 'SCENE_DISPLAY_EQUIPMENT',
|
|
20
|
-
TIME: 'SCENE_DISPLAY_TIME',
|
|
21
|
-
MANUAL: 'SCENE_DISPLAY_MANUAL' // 手动触发
|
|
22
|
-
|
|
23
|
-
}; // 场景触发
|
|
24
|
-
|
|
25
|
-
export var COMPONENTS_TYPE = {
|
|
26
|
-
COMMONLY_USED: 'COMMONLY_USED',
|
|
27
|
-
SCENE_DISPLAY: 'SCENE_DISPLAY',
|
|
28
|
-
SIGN_OPERATION: 'SIGN_OPERATION',
|
|
29
|
-
MOTION_OPERATION: 'MOTION_OPERATION',
|
|
30
|
-
APPLICATION: 'APPLICATION' // 应用组件
|
|
31
|
-
|
|
32
|
-
};
|
|
33
|
-
export var COMMONLY_USED = {
|
|
34
|
-
VARIATE: 'COMMONLY_USED_VARIATE' // 变量
|
|
35
|
-
|
|
36
|
-
}; // 通用组件
|
|
37
|
-
|
|
38
|
-
export var SIGN_OPERATION = {
|
|
39
|
-
RELATION: 'SIGN_OPERATION_RELATION',
|
|
40
|
-
LOGICAL: 'SIGN_OPERATION_LOGICAL',
|
|
41
|
-
CONDITION: 'SIGN_OPERATION_CONDITION' // 条件判断
|
|
42
|
-
|
|
43
|
-
}; // 运算符号
|
|
44
|
-
|
|
45
|
-
export var MOTION_OPERATION = {
|
|
46
|
-
ALARM: 'MOTION_OPERATION_ALARM',
|
|
47
|
-
NOTICE: 'MOTION_OPERATION_NOTICE',
|
|
48
|
-
ORDER: 'MOTION_OPERATION_ORDER',
|
|
49
|
-
CONTROL: 'MOTION_OPERATION_CONTROL' // 远程控制
|
|
50
|
-
|
|
51
|
-
}; // 运动符号
|
|
52
|
-
|
|
53
|
-
export var ALL_NODE_TYPE = [].concat(_toConsumableArray(Object.values(COMMONLY_USED)), _toConsumableArray(Object.values(SCENE_DISPLAY)), _toConsumableArray(Object.values(SIGN_OPERATION)), _toConsumableArray(Object.values(MOTION_OPERATION)), _toConsumableArray(Object.values(COMPONENTS_TYPE)));
|
|
54
|
-
export var nodeTypeMeta = (_nodeTypeMeta = {}, _defineProperty(_nodeTypeMeta, SIGN_OPERATION.CONDITION, {
|
|
55
|
-
width: CONDITION_WIDTH,
|
|
56
|
-
height: CONDITION_HEIGHT
|
|
57
|
-
}), _defineProperty(_nodeTypeMeta, SIGN_OPERATION.LOGICAL, {
|
|
58
|
-
width: LOGICAL_EDG,
|
|
59
|
-
height: LOGICAL_EDG
|
|
60
|
-
}), _nodeTypeMeta);
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { Shape } from '@antv/x6';
|
|
2
|
-
import './edge.less';
|
|
3
|
-
export declare class BaseEdge extends Shape.Edge {
|
|
4
|
-
isGroupEdge(): boolean;
|
|
5
|
-
}
|
|
6
|
-
export declare class GuideEdge extends BaseEdge {
|
|
7
|
-
}
|
|
8
|
-
export declare class X6DemoGroupEdge extends GuideEdge {
|
|
9
|
-
isGroupEdge(): boolean;
|
|
10
|
-
}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import BaseNode from './nodes/BaseNode';
|
|
2
|
-
import CommonNode from './nodes/CommonNode';
|
|
3
|
-
import GroupNode from './nodes/GroupNode';
|
|
4
|
-
import ConditionJudgment from './nodes/ConditionJudgment';
|
|
5
|
-
import LogicalNode from './nodes/LogicalNode';
|
|
6
|
-
export { BaseNode, CommonNode, GroupNode, LogicalNode, ConditionJudgment };
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import BaseNode from "./nodes/BaseNode";
|
|
2
|
-
import CommonNode from "./nodes/CommonNode";
|
|
3
|
-
import GroupNode from "./nodes/GroupNode";
|
|
4
|
-
import ConditionJudgment from "./nodes/ConditionJudgment";
|
|
5
|
-
import LogicalNode from "./nodes/LogicalNode";
|
|
6
|
-
export { BaseNode, CommonNode, GroupNode, LogicalNode, ConditionJudgment };
|
package/es/component/cut.d.ts
DELETED
package/es/component/cut.js
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import React, { useCallback } from 'react';
|
|
2
|
-
import "./cut.less";
|
|
3
|
-
export var Cut = function Cut(props) {
|
|
4
|
-
var left = props.left,
|
|
5
|
-
_props$right = props.right,
|
|
6
|
-
right = _props$right === void 0 ? 0 : _props$right,
|
|
7
|
-
max = props.max,
|
|
8
|
-
children = props.children;
|
|
9
|
-
var getText = useCallback(function () {
|
|
10
|
-
var len = children.length;
|
|
11
|
-
var ellipsis = '...';
|
|
12
|
-
var leftStr = '';
|
|
13
|
-
var rightStr = '';
|
|
14
|
-
|
|
15
|
-
if (len > max) {
|
|
16
|
-
if (left && len) {
|
|
17
|
-
leftStr = children.substr(0, left);
|
|
18
|
-
} else {
|
|
19
|
-
leftStr = children.substr(0, max);
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
if (right) {
|
|
23
|
-
rightStr = children.substr(-right, right);
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
return "".concat(leftStr).concat(ellipsis).concat(rightStr);
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
return children;
|
|
30
|
-
}, [left, right, max, children]);
|
|
31
|
-
return /*#__PURE__*/React.createElement("span", {
|
|
32
|
-
className: "no-wrap"
|
|
33
|
-
}, getText());
|
|
34
|
-
};
|
package/es/component/cut.less
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { unescape } from 'lodash-es';
|
|
3
|
-
import { Cut } from "./cut";
|
|
4
|
-
import { Keyword } from "./keyword";
|
|
5
|
-
export var ItemName = function ItemName(props) {
|
|
6
|
-
var data = props.data;
|
|
7
|
-
var keyword = data.keyword,
|
|
8
|
-
_data$cutParas = data.cutParas,
|
|
9
|
-
cutParas = _data$cutParas === void 0 ? {} : _data$cutParas;
|
|
10
|
-
var name = unescape(data.name);
|
|
11
|
-
var max = cutParas.max,
|
|
12
|
-
side = cutParas.side;
|
|
13
|
-
|
|
14
|
-
if (keyword) {
|
|
15
|
-
return /*#__PURE__*/React.createElement(Keyword, {
|
|
16
|
-
raw: name,
|
|
17
|
-
keyword: keyword
|
|
18
|
-
});
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
if (max) {
|
|
22
|
-
return /*#__PURE__*/React.createElement(Cut, {
|
|
23
|
-
max: max,
|
|
24
|
-
left: side,
|
|
25
|
-
right: side
|
|
26
|
-
}, name);
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
return /*#__PURE__*/React.createElement("span", null, name);
|
|
30
|
-
};
|
package/es/component/keyword.js
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
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; }
|
|
2
|
-
|
|
3
|
-
import React from 'react';
|
|
4
|
-
import classnames from 'classnames';
|
|
5
|
-
import "./keyword.less";
|
|
6
|
-
export var Keyword = function Keyword(props) {
|
|
7
|
-
var raw = props.raw,
|
|
8
|
-
keyword = props.keyword,
|
|
9
|
-
className = props.className;
|
|
10
|
-
|
|
11
|
-
if (keyword) {
|
|
12
|
-
var regex = new RegExp(keyword, 'ig');
|
|
13
|
-
var arr = raw.split(regex);
|
|
14
|
-
return /*#__PURE__*/React.createElement("span", {
|
|
15
|
-
className: classnames(_defineProperty({
|
|
16
|
-
'keyword-wrapper': true
|
|
17
|
-
}, className, !!className))
|
|
18
|
-
}, arr.map(function (section, index) {
|
|
19
|
-
return index !== arr.length - 1 ? /*#__PURE__*/React.createElement("span", {
|
|
20
|
-
key: section + index
|
|
21
|
-
}, section, /*#__PURE__*/React.createElement("strong", null, keyword)) : section;
|
|
22
|
-
}));
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
return null;
|
|
26
|
-
};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Observable } from 'rxjs';
|
|
3
|
-
import { InputProps } from 'antd/es/input';
|
|
4
|
-
interface RxInputProps extends Omit<InputProps, 'value'> {
|
|
5
|
-
value: Observable<string>;
|
|
6
|
-
}
|
|
7
|
-
export declare const RxInput: React.FC<RxInputProps>;
|
|
8
|
-
export {};
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import "antd/es/input/style";
|
|
2
|
-
import _Input from "antd/es/input";
|
|
3
|
-
import "antd/es/config-provider/style";
|
|
4
|
-
import _ConfigProvider from "antd/es/config-provider";
|
|
5
|
-
var _excluded = ["value"];
|
|
6
|
-
|
|
7
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
8
|
-
|
|
9
|
-
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; }
|
|
10
|
-
|
|
11
|
-
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; }
|
|
12
|
-
|
|
13
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
14
|
-
|
|
15
|
-
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
16
|
-
|
|
17
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
18
|
-
|
|
19
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
20
|
-
|
|
21
|
-
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
22
|
-
|
|
23
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
24
|
-
|
|
25
|
-
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
26
|
-
|
|
27
|
-
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
28
|
-
|
|
29
|
-
import React from 'react';
|
|
30
|
-
import { useObservableState } from "../../hooks/useObservableState";
|
|
31
|
-
import { ANT_PREFIX } from "../../common/constants/global";
|
|
32
|
-
export var RxInput = function RxInput(props) {
|
|
33
|
-
var value = props.value,
|
|
34
|
-
otherProps = _objectWithoutProperties(props, _excluded);
|
|
35
|
-
|
|
36
|
-
var _useObservableState = useObservableState(function () {
|
|
37
|
-
return value;
|
|
38
|
-
}),
|
|
39
|
-
_useObservableState2 = _slicedToArray(_useObservableState, 1),
|
|
40
|
-
realValue = _useObservableState2[0];
|
|
41
|
-
|
|
42
|
-
return /*#__PURE__*/React.createElement(_ConfigProvider, {
|
|
43
|
-
prefixCls: ANT_PREFIX
|
|
44
|
-
}, /*#__PURE__*/React.createElement(_Input, _objectSpread({
|
|
45
|
-
value: realValue
|
|
46
|
-
}, otherProps)));
|
|
47
|
-
};
|
package/es/hooks/withMode.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function withMode(WrappedComponent: any, mode: Types.ModeType): JSX.Element;
|
package/es/hooks/withMode.js
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
2
|
-
|
|
3
|
-
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; }
|
|
4
|
-
|
|
5
|
-
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; }
|
|
6
|
-
|
|
7
|
-
import React from 'react';
|
|
8
|
-
export function withMode(WrappedComponent, mode) {
|
|
9
|
-
var WithModeComponent = function WithModeComponent(props) {
|
|
10
|
-
return /*#__PURE__*/React.createElement(WrappedComponent.type, _objectSpread({}, props));
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
return /*#__PURE__*/React.createElement(WithModeComponent, _objectSpread(_objectSpread({}, (WrappedComponent === null || WrappedComponent === void 0 ? void 0 : WrappedComponent.props) || {}), {}, {
|
|
14
|
-
mode: mode
|
|
15
|
-
}));
|
|
16
|
-
}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import React, { useEffect, useRef } from 'react';
|
|
2
|
-
import '@antv/x6-react-shape';
|
|
3
|
-
import classNames from 'classnames';
|
|
4
|
-
import { useExperimentGraph, useUnmountExperimentGraph } from "../rx-models/experiment-graph";
|
|
5
|
-
import "./canvas-content.less";
|
|
6
|
-
|
|
7
|
-
var CanvasContent = function CanvasContent(props) {
|
|
8
|
-
var experimentId = props.experimentId,
|
|
9
|
-
className = props.className,
|
|
10
|
-
viewData = props.viewData; // 处理画布卸载
|
|
11
|
-
|
|
12
|
-
useUnmountExperimentGraph(experimentId);
|
|
13
|
-
var containerRef = useRef(null);
|
|
14
|
-
var canvasRef = useRef(null);
|
|
15
|
-
var expGraph = useExperimentGraph(experimentId); // 渲染画布
|
|
16
|
-
|
|
17
|
-
useEffect(function () {
|
|
18
|
-
window.renderForm = expGraph.setActiveAlgoData;
|
|
19
|
-
window.requestIdleCallback(function () {
|
|
20
|
-
var _expGraph$graph;
|
|
21
|
-
|
|
22
|
-
expGraph.renderGraph(containerRef.current, canvasRef.current, {
|
|
23
|
-
interacting: false
|
|
24
|
-
});
|
|
25
|
-
expGraph === null || expGraph === void 0 ? void 0 : (_expGraph$graph = expGraph.graph) === null || _expGraph$graph === void 0 ? void 0 : _expGraph$graph.hideGrid();
|
|
26
|
-
expGraph.onClearSelectNodes();
|
|
27
|
-
console.log('initPreviewData', viewData);
|
|
28
|
-
expGraph.initPreviewData(viewData).then();
|
|
29
|
-
});
|
|
30
|
-
return function () {
|
|
31
|
-
delete window.renderForm;
|
|
32
|
-
};
|
|
33
|
-
}, [expGraph]);
|
|
34
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
35
|
-
ref: containerRef,
|
|
36
|
-
className: classNames(className, 'canvas-content')
|
|
37
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
38
|
-
ref: canvasRef
|
|
39
|
-
}));
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
export default CanvasContent;
|
|
@@ -1,126 +0,0 @@
|
|
|
1
|
-
import type { EdgeView } from '@antv/x6'
|
|
2
|
-
|
|
3
|
-
// 实验
|
|
4
|
-
export namespace NExperiment {
|
|
5
|
-
export interface Experiment {
|
|
6
|
-
description: string
|
|
7
|
-
name: string
|
|
8
|
-
id: number
|
|
9
|
-
gmtCreate: string
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
// 实验图
|
|
14
|
-
export namespace NExperimentGraph {
|
|
15
|
-
export interface ExperimentGraph {
|
|
16
|
-
nodes: Node[]
|
|
17
|
-
groups: Group[]
|
|
18
|
-
links: Link[]
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export interface ModalParams {
|
|
22
|
-
type: string
|
|
23
|
-
experimentId: string
|
|
24
|
-
nodeInstanceId?: number
|
|
25
|
-
node?: Node
|
|
26
|
-
ctx?: any
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
export interface ContextMenuInfo {
|
|
30
|
-
type: 'edge' | 'graph'
|
|
31
|
-
data: EdgeView.PositionEventArgs<any>
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
export interface Node {
|
|
35
|
-
outPorts: OutPort[]
|
|
36
|
-
inPorts: InPort[]
|
|
37
|
-
positionX: number
|
|
38
|
-
positionY: number
|
|
39
|
-
codeName?: string
|
|
40
|
-
category?: string
|
|
41
|
-
name: string
|
|
42
|
-
id: string
|
|
43
|
-
nodeInstanceId?: number
|
|
44
|
-
groupId?: number
|
|
45
|
-
status?: number
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
export interface Port {
|
|
49
|
-
sequence: number
|
|
50
|
-
id: string
|
|
51
|
-
description?: string
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
export type OutPort = Port
|
|
55
|
-
|
|
56
|
-
export type InPort = Port
|
|
57
|
-
|
|
58
|
-
export interface Group {
|
|
59
|
-
isCollapsed: boolean
|
|
60
|
-
experimentId: number
|
|
61
|
-
name: string
|
|
62
|
-
id: number
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
export interface Link {
|
|
66
|
-
inputPortId: number
|
|
67
|
-
outputPortId: number
|
|
68
|
-
source: number
|
|
69
|
-
type?: string
|
|
70
|
-
target: number
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
// 执行状态
|
|
75
|
-
export namespace NExecutionStatus {
|
|
76
|
-
// 当前选中的组件
|
|
77
|
-
export interface ActiveNode {
|
|
78
|
-
type: 'legacy' | 'algo'
|
|
79
|
-
[k: string]: any
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
// 实验的执行状态
|
|
83
|
-
export interface ExecutionStatus {
|
|
84
|
-
instStatus: InstStatus
|
|
85
|
-
execInfo: ExecInfo
|
|
86
|
-
status: string
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
export interface InstStatus {
|
|
90
|
-
[k: string]: string
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
export interface GroupStatus {}
|
|
94
|
-
|
|
95
|
-
export interface ExecInfo {
|
|
96
|
-
[k: string]: ExecDetail
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
export interface ExecDetail {
|
|
100
|
-
defName: string
|
|
101
|
-
quickViewData: QuickViewData
|
|
102
|
-
jobStatus: string
|
|
103
|
-
percentage: number
|
|
104
|
-
lastTime: number
|
|
105
|
-
name: string
|
|
106
|
-
startTime: string
|
|
107
|
-
endTime: string
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
export interface QuickViewData {}
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
// 模型
|
|
114
|
-
export namespace NModel {
|
|
115
|
-
export interface Model {
|
|
116
|
-
codeName: string
|
|
117
|
-
isNew: boolean
|
|
118
|
-
catId: number
|
|
119
|
-
parentId: number
|
|
120
|
-
category: string
|
|
121
|
-
owner: string
|
|
122
|
-
name: string
|
|
123
|
-
id: number
|
|
124
|
-
type: string
|
|
125
|
-
}
|
|
126
|
-
}
|
|
@@ -1,154 +0,0 @@
|
|
|
1
|
-
import "antd/es/input/style";
|
|
2
|
-
import _Input from "antd/es/input";
|
|
3
|
-
|
|
4
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
5
|
-
|
|
6
|
-
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
7
|
-
|
|
8
|
-
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); }
|
|
9
|
-
|
|
10
|
-
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; }
|
|
11
|
-
|
|
12
|
-
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; }
|
|
13
|
-
|
|
14
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
15
|
-
|
|
16
|
-
import React, { useState } from 'react';
|
|
17
|
-
import { useExperimentGraph } from "../rx-models/experiment-graph"; // import ThemeSwitch from './theme-switch';
|
|
18
|
-
|
|
19
|
-
import "../../style/position.less";
|
|
20
|
-
import "./style.less";
|
|
21
|
-
|
|
22
|
-
var Index = function Index(props) {
|
|
23
|
-
var name = props.name,
|
|
24
|
-
_props$isActive = props.isActive,
|
|
25
|
-
isActive = _props$isActive === void 0 ? false : _props$isActive,
|
|
26
|
-
onActiveSwitch = props.onActiveSwitch,
|
|
27
|
-
onCancel = props.onCancel,
|
|
28
|
-
onSave = props.onSave,
|
|
29
|
-
experimentId = props.experimentId,
|
|
30
|
-
onNameChange = props.onNameChange,
|
|
31
|
-
extraHeaderData = props.extraHeaderData;
|
|
32
|
-
|
|
33
|
-
var _useState = useState(false),
|
|
34
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
35
|
-
bordered = _useState2[0],
|
|
36
|
-
setBordered = _useState2[1];
|
|
37
|
-
|
|
38
|
-
var expGraph = useExperimentGraph(experimentId);
|
|
39
|
-
|
|
40
|
-
var handleSave = function handleSave(type) {
|
|
41
|
-
var _expGraph$graph, _expGraph$graph2;
|
|
42
|
-
|
|
43
|
-
var nodes = expGraph === null || expGraph === void 0 ? void 0 : (_expGraph$graph = expGraph.graph) === null || _expGraph$graph === void 0 ? void 0 : _expGraph$graph.getNodes();
|
|
44
|
-
var nodesData = nodes === null || nodes === void 0 ? void 0 : nodes.map(function (item) {
|
|
45
|
-
return item === null || item === void 0 ? void 0 : item.store.data;
|
|
46
|
-
});
|
|
47
|
-
var edges = expGraph === null || expGraph === void 0 ? void 0 : (_expGraph$graph2 = expGraph.graph) === null || _expGraph$graph2 === void 0 ? void 0 : _expGraph$graph2.getEdges();
|
|
48
|
-
var edgesData = edges === null || edges === void 0 ? void 0 : edges.map(function (item) {
|
|
49
|
-
return item === null || item === void 0 ? void 0 : item.store.data;
|
|
50
|
-
});
|
|
51
|
-
console.log({
|
|
52
|
-
nodes: nodesData,
|
|
53
|
-
links: edgesData
|
|
54
|
-
});
|
|
55
|
-
onSave === null || onSave === void 0 ? void 0 : onSave(type, {
|
|
56
|
-
nodes: nodesData,
|
|
57
|
-
links: edgesData
|
|
58
|
-
});
|
|
59
|
-
};
|
|
60
|
-
|
|
61
|
-
var handleFocus = function handleFocus() {
|
|
62
|
-
setBordered(true);
|
|
63
|
-
};
|
|
64
|
-
|
|
65
|
-
var handleEditName = function handleEditName(strategyName) {
|
|
66
|
-
onNameChange === null || onNameChange === void 0 ? void 0 : onNameChange(strategyName);
|
|
67
|
-
};
|
|
68
|
-
|
|
69
|
-
var handleBlur = function handleBlur(e) {
|
|
70
|
-
handleEditName(e.target.value);
|
|
71
|
-
setBordered(false);
|
|
72
|
-
};
|
|
73
|
-
|
|
74
|
-
var handlePressEnter = function handlePressEnter(e) {
|
|
75
|
-
e.target.blur();
|
|
76
|
-
};
|
|
77
|
-
|
|
78
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
79
|
-
className: "strategyHeader"
|
|
80
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
81
|
-
className: "pos-btw"
|
|
82
|
-
}, /*#__PURE__*/React.createElement(_Input, {
|
|
83
|
-
defaultValue: name,
|
|
84
|
-
placeholder: "\u7B56\u7565\u540D\u79F0",
|
|
85
|
-
style: {
|
|
86
|
-
width: 265
|
|
87
|
-
},
|
|
88
|
-
bordered: bordered,
|
|
89
|
-
onFocus: handleFocus,
|
|
90
|
-
onBlur: handleBlur,
|
|
91
|
-
onPressEnter: handlePressEnter
|
|
92
|
-
}), /*#__PURE__*/React.createElement("div", {
|
|
93
|
-
className: "pos-end"
|
|
94
|
-
}, extraHeaderData === null || extraHeaderData === void 0 ? void 0 : extraHeaderData.map(function (item, index) {
|
|
95
|
-
return (
|
|
96
|
-
/*#__PURE__*/
|
|
97
|
-
// eslint-disable-next-line react/no-array-index-key
|
|
98
|
-
React.createElement("span", {
|
|
99
|
-
key: index,
|
|
100
|
-
onClick: item === null || item === void 0 ? void 0 : item.onClick,
|
|
101
|
-
className: "header-btn"
|
|
102
|
-
}, /*#__PURE__*/React.createElement("img", {
|
|
103
|
-
alt: "",
|
|
104
|
-
className: "header-btn-img",
|
|
105
|
-
src: item.imgUrl
|
|
106
|
-
}), item.name)
|
|
107
|
-
);
|
|
108
|
-
}), /*#__PURE__*/React.createElement("span", {
|
|
109
|
-
onClick: function onClick() {
|
|
110
|
-
handleSave('application');
|
|
111
|
-
},
|
|
112
|
-
className: "header-btn"
|
|
113
|
-
}, /*#__PURE__*/React.createElement("img", {
|
|
114
|
-
alt: "",
|
|
115
|
-
className: "header-btn-img",
|
|
116
|
-
src: require("../../assets/save.svg")
|
|
117
|
-
}), "\u4FDD\u5B58\u4E3A\u5E94\u7528"), /*#__PURE__*/React.createElement("span", {
|
|
118
|
-
className: "header-btn",
|
|
119
|
-
onClick: onCancel
|
|
120
|
-
}, /*#__PURE__*/React.createElement("img", {
|
|
121
|
-
alt: "",
|
|
122
|
-
className: "header-btn-img",
|
|
123
|
-
src: require("../../assets/cancel.svg")
|
|
124
|
-
}), "\u53D6\u6D88"), /*#__PURE__*/React.createElement("span", {
|
|
125
|
-
className: "header-btn",
|
|
126
|
-
onClick: function onClick() {
|
|
127
|
-
handleSave('data');
|
|
128
|
-
}
|
|
129
|
-
}, /*#__PURE__*/React.createElement("img", {
|
|
130
|
-
alt: "",
|
|
131
|
-
className: "header-btn-img",
|
|
132
|
-
src: require("../../assets/save.svg")
|
|
133
|
-
}), "\u4FDD\u5B58"), isActive ? /*#__PURE__*/React.createElement("span", {
|
|
134
|
-
className: "header-btn",
|
|
135
|
-
onClick: function onClick() {
|
|
136
|
-
onActiveSwitch === null || onActiveSwitch === void 0 ? void 0 : onActiveSwitch(false);
|
|
137
|
-
}
|
|
138
|
-
}, /*#__PURE__*/React.createElement("img", {
|
|
139
|
-
alt: "",
|
|
140
|
-
className: "header-btn-img",
|
|
141
|
-
src: require("../../assets/cancel.svg")
|
|
142
|
-
}), "\u505C\u7528") : /*#__PURE__*/React.createElement("span", {
|
|
143
|
-
className: "header-btn",
|
|
144
|
-
onClick: function onClick() {
|
|
145
|
-
onActiveSwitch === null || onActiveSwitch === void 0 ? void 0 : onActiveSwitch(true);
|
|
146
|
-
}
|
|
147
|
-
}, /*#__PURE__*/React.createElement("img", {
|
|
148
|
-
alt: "",
|
|
149
|
-
className: "header-btn-img",
|
|
150
|
-
src: require("../../assets/check.svg")
|
|
151
|
-
}), "\u542F\u7528"))));
|
|
152
|
-
};
|
|
153
|
-
|
|
154
|
-
export default Index;
|
|
File without changes
|
|
File without changes
|
/package/es/{pages → components/canvas}/config-panel/components/time-trigger/persistent-time.js
RENAMED
|
File without changes
|