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,229 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
|
|
10
|
+
var _antd = require("antd");
|
|
11
|
+
|
|
12
|
+
var _moment = _interopRequireDefault(require("moment"));
|
|
13
|
+
|
|
14
|
+
var _lodashEs = require("lodash-es");
|
|
15
|
+
|
|
16
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
|
+
|
|
18
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
19
|
+
|
|
20
|
+
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."); }
|
|
21
|
+
|
|
22
|
+
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); }
|
|
23
|
+
|
|
24
|
+
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; }
|
|
25
|
+
|
|
26
|
+
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; }
|
|
27
|
+
|
|
28
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
29
|
+
|
|
30
|
+
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; }
|
|
31
|
+
|
|
32
|
+
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; }
|
|
33
|
+
|
|
34
|
+
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; }
|
|
35
|
+
|
|
36
|
+
var nameMap = {
|
|
37
|
+
device_attr: 'meterAttrList',
|
|
38
|
+
device_event: 'meterEventList',
|
|
39
|
+
model_attr: 'meterModelAttrs',
|
|
40
|
+
model_event: 'meterModelEvents'
|
|
41
|
+
}; // const selectTypeData = ['meterAttrList', 'meterEventList', 'meterModelAttrs', 'meterModelEvents']
|
|
42
|
+
|
|
43
|
+
var DataOrigin = function DataOrigin(props) {
|
|
44
|
+
var value = props.value,
|
|
45
|
+
onChange = props.onChange,
|
|
46
|
+
_props$defaultValue = props.defaultValue,
|
|
47
|
+
defaultValue = _props$defaultValue === void 0 ? 'variable' : _props$defaultValue,
|
|
48
|
+
relationData = props.relationData;
|
|
49
|
+
console.log('DataOrigin =========> value', value);
|
|
50
|
+
|
|
51
|
+
var handleValueTypeChange = function handleValueTypeChange(e) {
|
|
52
|
+
var valuesType = e.target.value;
|
|
53
|
+
var payload = valuesType === 'fixed' ? {
|
|
54
|
+
valuesType: valuesType,
|
|
55
|
+
type: 'number'
|
|
56
|
+
} : {
|
|
57
|
+
valuesType: valuesType
|
|
58
|
+
};
|
|
59
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(payload);
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
var handleTypeChange = function handleTypeChange(type) {
|
|
63
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread(_objectSpread({}, value), {}, {
|
|
64
|
+
type: type,
|
|
65
|
+
value: null
|
|
66
|
+
}));
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
var handleValueChange = function handleValueChange(fixedValue) {
|
|
70
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread(_objectSpread({}, value), {}, {
|
|
71
|
+
value: fixedValue
|
|
72
|
+
}));
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
var handleBooleanChange = function handleBooleanChange(fixedValue) {
|
|
76
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread(_objectSpread({}, value), {}, {
|
|
77
|
+
value: fixedValue === 1
|
|
78
|
+
}));
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
var handleDateChange = function handleDateChange(date) {
|
|
82
|
+
handleValueChange(date === null || date === void 0 ? void 0 : date.format('YYYY-MM-DD HH:mm:ss'));
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
var handleVariableChange = function handleVariableChange(variableKeyIndex) {
|
|
86
|
+
console.log('handleVariableChange', variableKeyIndex, relationData);
|
|
87
|
+
|
|
88
|
+
if (variableKeyIndex && relationData) {
|
|
89
|
+
var _relationData$name;
|
|
90
|
+
|
|
91
|
+
var valueList = variableKeyIndex === null || variableKeyIndex === void 0 ? void 0 : variableKeyIndex.split('^');
|
|
92
|
+
|
|
93
|
+
var _valueList = _slicedToArray(valueList, 4),
|
|
94
|
+
name = _valueList[0],
|
|
95
|
+
source = _valueList[1],
|
|
96
|
+
targetId = _valueList[2],
|
|
97
|
+
modelId = _valueList[3];
|
|
98
|
+
|
|
99
|
+
var sourceList = relationData === null || relationData === void 0 ? void 0 : (_relationData$name = relationData[name]) === null || _relationData$name === void 0 ? void 0 : _relationData$name[nameMap[source]];
|
|
100
|
+
var relationValue = sourceList === null || sourceList === void 0 ? void 0 : sourceList.find(function (item) {
|
|
101
|
+
return (item === null || item === void 0 ? void 0 : item.source) === source && (item === null || item === void 0 ? void 0 : item.targetId) === targetId && (item === null || item === void 0 ? void 0 : item.modelId) === modelId;
|
|
102
|
+
});
|
|
103
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread(_objectSpread({}, value), {}, {
|
|
104
|
+
value: relationValue,
|
|
105
|
+
variableKeyIndex: variableKeyIndex
|
|
106
|
+
}));
|
|
107
|
+
}
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
var relationList = (0, _lodashEs.keys)(relationData);
|
|
111
|
+
console.log('relationData relationList', relationData);
|
|
112
|
+
return /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_antd.Radio.Group, {
|
|
113
|
+
value: (value === null || value === void 0 ? void 0 : value.valuesType) || defaultValue,
|
|
114
|
+
onChange: handleValueTypeChange
|
|
115
|
+
}, /*#__PURE__*/_react.default.createElement(_antd.Radio, {
|
|
116
|
+
value: "fixed"
|
|
117
|
+
}, "\u56FA\u5B9A\u503C"), /*#__PURE__*/_react.default.createElement(_antd.Radio, {
|
|
118
|
+
value: "variable"
|
|
119
|
+
}, "\u53D8\u91CF")), (value === null || value === void 0 ? void 0 : value.valuesType) === 'variable' && /*#__PURE__*/_react.default.createElement(_antd.Select, {
|
|
120
|
+
style: {
|
|
121
|
+
marginTop: 15
|
|
122
|
+
},
|
|
123
|
+
value: value === null || value === void 0 ? void 0 : value.variableKeyIndex,
|
|
124
|
+
onChange: handleVariableChange
|
|
125
|
+
}, relationList === null || relationList === void 0 ? void 0 : relationList.map(function (item) {
|
|
126
|
+
var _relationData$item, _relationData$item4, _relationData$item7, _relationData$item10;
|
|
127
|
+
|
|
128
|
+
if ((_relationData$item = relationData[item]) !== null && _relationData$item !== void 0 && _relationData$item.meterAttrList) {
|
|
129
|
+
var _relationData$item2, _relationData$item3, _relationData$item3$m;
|
|
130
|
+
|
|
131
|
+
return ((_relationData$item2 = relationData[item]) === null || _relationData$item2 === void 0 ? void 0 : _relationData$item2.meterAttrList) && /*#__PURE__*/_react.default.createElement(_antd.Select.OptGroup, {
|
|
132
|
+
key: "".concat(item, "-device-attr"),
|
|
133
|
+
label: "".concat(item, " - \u8BBE\u5907\u5C5E\u6027")
|
|
134
|
+
}, (_relationData$item3 = relationData[item]) === null || _relationData$item3 === void 0 ? void 0 : (_relationData$item3$m = _relationData$item3.meterAttrList) === null || _relationData$item3$m === void 0 ? void 0 : _relationData$item3$m.map(function (child) {
|
|
135
|
+
return /*#__PURE__*/_react.default.createElement(_antd.Select.Option, {
|
|
136
|
+
key: "".concat(item, "^").concat(child.source, "^").concat(child.targetId, "^").concat(child.modelId),
|
|
137
|
+
value: "".concat(item, "^").concat(child.source, "^").concat(child.targetId, "^").concat(child.modelId)
|
|
138
|
+
}, child.targetName, "-", child === null || child === void 0 ? void 0 : child.modelName);
|
|
139
|
+
}));
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
if ((_relationData$item4 = relationData[item]) !== null && _relationData$item4 !== void 0 && _relationData$item4.meterEventList) {
|
|
143
|
+
var _relationData$item5, _relationData$item6, _relationData$item6$m;
|
|
144
|
+
|
|
145
|
+
return ((_relationData$item5 = relationData[item]) === null || _relationData$item5 === void 0 ? void 0 : _relationData$item5.meterEventList) && /*#__PURE__*/_react.default.createElement(_antd.Select.OptGroup, {
|
|
146
|
+
key: "".concat(item, "-device-attr"),
|
|
147
|
+
label: "".concat(item, " - \u8BBE\u5907\u5C5E\u6027")
|
|
148
|
+
}, (_relationData$item6 = relationData[item]) === null || _relationData$item6 === void 0 ? void 0 : (_relationData$item6$m = _relationData$item6.meterEventList) === null || _relationData$item6$m === void 0 ? void 0 : _relationData$item6$m.map(function (child) {
|
|
149
|
+
return /*#__PURE__*/_react.default.createElement(_antd.Select.Option, {
|
|
150
|
+
key: "".concat(item, "^").concat(child.source, "^").concat(child.targetId, "^").concat(child.modelId),
|
|
151
|
+
value: "".concat(item, "^").concat(child.source, "^").concat(child.targetId, "^").concat(child.modelId)
|
|
152
|
+
}, child.targetName, "-", child === null || child === void 0 ? void 0 : child.modelName);
|
|
153
|
+
}));
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
if ((_relationData$item7 = relationData[item]) !== null && _relationData$item7 !== void 0 && _relationData$item7.meterModelAttrs) {
|
|
157
|
+
var _relationData$item8, _relationData$item9, _relationData$item9$m;
|
|
158
|
+
|
|
159
|
+
return ((_relationData$item8 = relationData[item]) === null || _relationData$item8 === void 0 ? void 0 : _relationData$item8.meterModelAttrs) && /*#__PURE__*/_react.default.createElement(_antd.Select.OptGroup, {
|
|
160
|
+
key: "".concat(item, "--device-attr"),
|
|
161
|
+
label: "".concat(item, " - \u8BBE\u5907\u5C5E\u6027")
|
|
162
|
+
}, (_relationData$item9 = relationData[item]) === null || _relationData$item9 === void 0 ? void 0 : (_relationData$item9$m = _relationData$item9.meterModelAttrs) === null || _relationData$item9$m === void 0 ? void 0 : _relationData$item9$m.map(function (child) {
|
|
163
|
+
return /*#__PURE__*/_react.default.createElement(_antd.Select.Option, {
|
|
164
|
+
key: "".concat(item, "^").concat(child.source, "^").concat(child.targetId, "^").concat(child.modelId),
|
|
165
|
+
value: "".concat(item, "^").concat(child.source, "^").concat(child.targetId, "^").concat(child.modelId)
|
|
166
|
+
}, child.targetName, "-", child === null || child === void 0 ? void 0 : child.modelName);
|
|
167
|
+
}));
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
if ((_relationData$item10 = relationData[item]) !== null && _relationData$item10 !== void 0 && _relationData$item10.meterModelEvents) {
|
|
171
|
+
var _relationData$item11, _relationData$item12, _relationData$item12$;
|
|
172
|
+
|
|
173
|
+
return ((_relationData$item11 = relationData[item]) === null || _relationData$item11 === void 0 ? void 0 : _relationData$item11.meterModelEvents) && /*#__PURE__*/_react.default.createElement(_antd.Select.OptGroup, {
|
|
174
|
+
key: "".concat(item, "--device-attr"),
|
|
175
|
+
label: "".concat(item, " - \u8BBE\u5907\u5C5E\u6027")
|
|
176
|
+
}, (_relationData$item12 = relationData[item]) === null || _relationData$item12 === void 0 ? void 0 : (_relationData$item12$ = _relationData$item12.meterModelEvents) === null || _relationData$item12$ === void 0 ? void 0 : _relationData$item12$.map(function (child) {
|
|
177
|
+
return /*#__PURE__*/_react.default.createElement(_antd.Select.Option, {
|
|
178
|
+
key: "".concat(item, "^").concat(child.source, "^").concat(child.targetId, "^").concat(child.modelId),
|
|
179
|
+
value: "".concat(item, "^").concat(child.source, "^").concat(child.targetId, "^").concat(child.modelId)
|
|
180
|
+
}, child.targetName, "-", child === null || child === void 0 ? void 0 : child.modelName);
|
|
181
|
+
}));
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
return null;
|
|
185
|
+
})), (value === null || value === void 0 ? void 0 : value.valuesType) === 'fixed' && /*#__PURE__*/_react.default.createElement("div", {
|
|
186
|
+
style: {
|
|
187
|
+
marginTop: 15
|
|
188
|
+
}
|
|
189
|
+
}, /*#__PURE__*/_react.default.createElement(_antd.Select, {
|
|
190
|
+
value: value === null || value === void 0 ? void 0 : value.type,
|
|
191
|
+
onChange: handleTypeChange
|
|
192
|
+
}, /*#__PURE__*/_react.default.createElement(_antd.Select.Option, {
|
|
193
|
+
value: "number"
|
|
194
|
+
}, "\u6570\u503C\u578B"), /*#__PURE__*/_react.default.createElement(_antd.Select.Option, {
|
|
195
|
+
value: "boolean"
|
|
196
|
+
}, "\u5E03\u5C14\u503C"), /*#__PURE__*/_react.default.createElement(_antd.Select.Option, {
|
|
197
|
+
value: "time"
|
|
198
|
+
}, "\u65F6\u95F4\u578B")), (value === null || value === void 0 ? void 0 : value.type) === 'number' && /*#__PURE__*/_react.default.createElement(_antd.InputNumber, {
|
|
199
|
+
value: value === null || value === void 0 ? void 0 : value.value,
|
|
200
|
+
onChange: handleValueChange,
|
|
201
|
+
style: {
|
|
202
|
+
width: '100%',
|
|
203
|
+
marginTop: 15
|
|
204
|
+
}
|
|
205
|
+
}), (value === null || value === void 0 ? void 0 : value.type) === 'boolean' && /*#__PURE__*/_react.default.createElement(_antd.Select, {
|
|
206
|
+
value: value === null || value === void 0 ? void 0 : value.value,
|
|
207
|
+
onChange: handleBooleanChange,
|
|
208
|
+
style: {
|
|
209
|
+
width: '100%',
|
|
210
|
+
marginTop: 15
|
|
211
|
+
}
|
|
212
|
+
}, /*#__PURE__*/_react.default.createElement(_antd.Select.Option, {
|
|
213
|
+
value: 1
|
|
214
|
+
}, "True"), /*#__PURE__*/_react.default.createElement(_antd.Select.Option, {
|
|
215
|
+
value: 0
|
|
216
|
+
}, "False")), (value === null || value === void 0 ? void 0 : value.type) === 'time' && /*#__PURE__*/_react.default.createElement(_antd.DatePicker, {
|
|
217
|
+
showTime: true,
|
|
218
|
+
value: (value === null || value === void 0 ? void 0 : value.value) && (0, _moment.default)(value === null || value === void 0 ? void 0 : value.value),
|
|
219
|
+
placeholder: "",
|
|
220
|
+
onChange: handleDateChange,
|
|
221
|
+
style: {
|
|
222
|
+
width: '100%',
|
|
223
|
+
marginTop: 15
|
|
224
|
+
}
|
|
225
|
+
})));
|
|
226
|
+
};
|
|
227
|
+
|
|
228
|
+
var _default = DataOrigin;
|
|
229
|
+
exports.default = _default;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './style.less';
|
|
3
|
+
interface Props {
|
|
4
|
+
visible: boolean;
|
|
5
|
+
onClose: () => void;
|
|
6
|
+
relationData: any;
|
|
7
|
+
onSubmit: (payload: any) => void;
|
|
8
|
+
configureInfo: any;
|
|
9
|
+
}
|
|
10
|
+
declare const ConfigureModal: React.FC<Props>;
|
|
11
|
+
export default ConfigureModal;
|
|
@@ -0,0 +1,187 @@
|
|
|
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 _react = _interopRequireWildcard(require("react"));
|
|
11
|
+
|
|
12
|
+
var _antd = require("antd");
|
|
13
|
+
|
|
14
|
+
var _lodashEs = require("lodash-es");
|
|
15
|
+
|
|
16
|
+
var _dataOrigin = _interopRequireDefault(require("./data-origin"));
|
|
17
|
+
|
|
18
|
+
require("./style.less");
|
|
19
|
+
|
|
20
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
21
|
+
|
|
22
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
23
|
+
|
|
24
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
25
|
+
|
|
26
|
+
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; }
|
|
27
|
+
|
|
28
|
+
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; }
|
|
29
|
+
|
|
30
|
+
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; }
|
|
31
|
+
|
|
32
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
33
|
+
|
|
34
|
+
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."); }
|
|
35
|
+
|
|
36
|
+
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); }
|
|
37
|
+
|
|
38
|
+
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; }
|
|
39
|
+
|
|
40
|
+
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; }
|
|
41
|
+
|
|
42
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
43
|
+
|
|
44
|
+
var ConfigureModal = function ConfigureModal(props) {
|
|
45
|
+
var visible = props.visible,
|
|
46
|
+
onClose = props.onClose,
|
|
47
|
+
onSubmit = props.onSubmit,
|
|
48
|
+
relationData = props.relationData,
|
|
49
|
+
configureInfo = props.configureInfo;
|
|
50
|
+
|
|
51
|
+
var _Form$useForm = _antd.Form.useForm(),
|
|
52
|
+
_Form$useForm2 = _slicedToArray(_Form$useForm, 1),
|
|
53
|
+
form = _Form$useForm2[0];
|
|
54
|
+
|
|
55
|
+
var compareMode = ['>', '>=', '<', '<=', '==', '!='];
|
|
56
|
+
var initialValues = {
|
|
57
|
+
pre: {
|
|
58
|
+
valuesType: 'variable'
|
|
59
|
+
},
|
|
60
|
+
next: {
|
|
61
|
+
valuesType: 'fixed',
|
|
62
|
+
type: 'number'
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
var handleClose = function handleClose() {
|
|
67
|
+
onClose();
|
|
68
|
+
form.resetFields();
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
var handleSubmit = function handleSubmit(payload) {
|
|
72
|
+
console.log('handleSubmit payload', payload);
|
|
73
|
+
var pre = payload.pre,
|
|
74
|
+
compare = payload.compare,
|
|
75
|
+
next = payload.next;
|
|
76
|
+
var preOmit = (0, _lodashEs.omit)(pre, ['variableKeyIndex']);
|
|
77
|
+
var nextOmit = (0, _lodashEs.omit)(next, ['variableKeyIndex']);
|
|
78
|
+
var store = [preOmit, compare, nextOmit];
|
|
79
|
+
onSubmit === null || onSubmit === void 0 ? void 0 : onSubmit({
|
|
80
|
+
store: store,
|
|
81
|
+
relation: configureInfo === null || configureInfo === void 0 ? void 0 : configureInfo.relation
|
|
82
|
+
});
|
|
83
|
+
handleClose();
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
var formReset = (0, _react.useCallback)(function (configure) {
|
|
87
|
+
if (configure.valuesType === 'fixed') return configure;
|
|
88
|
+
|
|
89
|
+
if (configure.valuesType === 'variable') {
|
|
90
|
+
var configureValue = configure === null || configure === void 0 ? void 0 : configure.value;
|
|
91
|
+
var variableKeyIndex = configureValue && "".concat(configureValue.targetName, "-").concat(configureValue.type, "^").concat(configureValue.source, "^").concat(configureValue.targetId, "^").concat(configureValue.modelId);
|
|
92
|
+
return variableKeyIndex ? _objectSpread(_objectSpread({}, configure), {}, {
|
|
93
|
+
variableKeyIndex: variableKeyIndex
|
|
94
|
+
}) : configure;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
return {};
|
|
98
|
+
}, []);
|
|
99
|
+
(0, _react.useEffect)(function () {
|
|
100
|
+
if (visible && configureInfo) {
|
|
101
|
+
var _configureInfo$store, _configureInfo$store2, _configureInfo$store3;
|
|
102
|
+
|
|
103
|
+
var _payload = {
|
|
104
|
+
pre: formReset(configureInfo === null || configureInfo === void 0 ? void 0 : (_configureInfo$store = configureInfo.store) === null || _configureInfo$store === void 0 ? void 0 : _configureInfo$store[0]),
|
|
105
|
+
compare: configureInfo === null || configureInfo === void 0 ? void 0 : (_configureInfo$store2 = configureInfo.store) === null || _configureInfo$store2 === void 0 ? void 0 : _configureInfo$store2[1],
|
|
106
|
+
next: formReset(configureInfo === null || configureInfo === void 0 ? void 0 : (_configureInfo$store3 = configureInfo.store) === null || _configureInfo$store3 === void 0 ? void 0 : _configureInfo$store3[2])
|
|
107
|
+
};
|
|
108
|
+
form.setFieldsValue(_payload);
|
|
109
|
+
console.log('========================>', _payload);
|
|
110
|
+
}
|
|
111
|
+
}, [visible]);
|
|
112
|
+
console.log('relationData', relationData);
|
|
113
|
+
return /*#__PURE__*/_react.default.createElement(_antd.Modal, {
|
|
114
|
+
width: 400,
|
|
115
|
+
visible: visible,
|
|
116
|
+
footer: null,
|
|
117
|
+
closable: false,
|
|
118
|
+
bodyStyle: {
|
|
119
|
+
padding: 0
|
|
120
|
+
},
|
|
121
|
+
onCancel: handleClose,
|
|
122
|
+
destroyOnClose: true
|
|
123
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
124
|
+
className: "condition-modal-title"
|
|
125
|
+
}, "\u6761\u4EF6\u914D\u7F6E"), /*#__PURE__*/_react.default.createElement("div", {
|
|
126
|
+
className: "condition-modal-body"
|
|
127
|
+
}, /*#__PURE__*/_react.default.createElement(_antd.Form, {
|
|
128
|
+
form: form,
|
|
129
|
+
layout: "vertical",
|
|
130
|
+
initialValues: initialValues,
|
|
131
|
+
onFinish: handleSubmit
|
|
132
|
+
}, /*#__PURE__*/_react.default.createElement(_antd.Form.Item, {
|
|
133
|
+
name: "pre",
|
|
134
|
+
label: "\u9009\u62E9\u7528\u4E8E\u6BD4\u8F83\u7684\u6570\u636E\u6E90",
|
|
135
|
+
rules: [{
|
|
136
|
+
required: true,
|
|
137
|
+
message: '请选择用于比较的数据源'
|
|
138
|
+
}],
|
|
139
|
+
style: {
|
|
140
|
+
marginBottom: 15
|
|
141
|
+
}
|
|
142
|
+
}, /*#__PURE__*/_react.default.createElement(_dataOrigin.default, {
|
|
143
|
+
relationData: relationData === null || relationData === void 0 ? void 0 : relationData.equipment
|
|
144
|
+
})), /*#__PURE__*/_react.default.createElement(_antd.Form.Item, {
|
|
145
|
+
name: "compare",
|
|
146
|
+
label: "\u9009\u62E9\u6BD4\u8F83\u65B9\u5F0F",
|
|
147
|
+
rules: [{
|
|
148
|
+
required: true,
|
|
149
|
+
message: '请选择比较方式'
|
|
150
|
+
}],
|
|
151
|
+
style: {
|
|
152
|
+
marginBottom: 15
|
|
153
|
+
}
|
|
154
|
+
}, /*#__PURE__*/_react.default.createElement(_antd.Select, null, compareMode === null || compareMode === void 0 ? void 0 : compareMode.map(function (item) {
|
|
155
|
+
return /*#__PURE__*/_react.default.createElement(_antd.Select.Option, {
|
|
156
|
+
key: item,
|
|
157
|
+
value: item
|
|
158
|
+
}, item);
|
|
159
|
+
}))), /*#__PURE__*/_react.default.createElement(_antd.Form.Item, {
|
|
160
|
+
name: "next",
|
|
161
|
+
label: "\u9009\u62E9\u7528\u4E8E\u6BD4\u8F83\u7684\u6570\u636E\u6E90",
|
|
162
|
+
rules: [{
|
|
163
|
+
required: true,
|
|
164
|
+
message: '请选择用于比较的数据源'
|
|
165
|
+
}],
|
|
166
|
+
style: {
|
|
167
|
+
marginBottom: 15
|
|
168
|
+
}
|
|
169
|
+
}, /*#__PURE__*/_react.default.createElement(_dataOrigin.default, {
|
|
170
|
+
relationData: relationData === null || relationData === void 0 ? void 0 : relationData.equipment
|
|
171
|
+
})), /*#__PURE__*/_react.default.createElement(_antd.Form.Item, {
|
|
172
|
+
style: {
|
|
173
|
+
textAlign: 'right',
|
|
174
|
+
marginBottom: 10
|
|
175
|
+
}
|
|
176
|
+
}, /*#__PURE__*/_react.default.createElement(_antd.Button, {
|
|
177
|
+
onClick: handleClose,
|
|
178
|
+
className: "mr-15 condition-form-btn"
|
|
179
|
+
}, "\u53D6\u6D88"), /*#__PURE__*/_react.default.createElement(_antd.Button, {
|
|
180
|
+
type: "primary",
|
|
181
|
+
htmlType: "submit",
|
|
182
|
+
className: "condition-form-btn"
|
|
183
|
+
}, "\u786E\u5B9A")))));
|
|
184
|
+
};
|
|
185
|
+
|
|
186
|
+
var _default = ConfigureModal;
|
|
187
|
+
exports.default = _default;
|
|
@@ -0,0 +1,57 @@
|
|
|
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
|
+
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; }
|
|
17
|
+
|
|
18
|
+
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; }
|
|
19
|
+
|
|
20
|
+
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; }
|
|
21
|
+
|
|
22
|
+
var CrossLine = function CrossLine(props) {
|
|
23
|
+
var value = props.value,
|
|
24
|
+
onRelationChange = props.onRelationChange,
|
|
25
|
+
disabled = props.disabled;
|
|
26
|
+
|
|
27
|
+
var handleChange = function handleChange(relation) {
|
|
28
|
+
onRelationChange === null || onRelationChange === void 0 ? void 0 : onRelationChange(_objectSpread(_objectSpread({}, value), {}, {
|
|
29
|
+
relation: relation
|
|
30
|
+
}));
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
34
|
+
className: "condition-cross-line"
|
|
35
|
+
}, /*#__PURE__*/_react.default.createElement(_antd.Divider, {
|
|
36
|
+
style: {
|
|
37
|
+
margin: 0
|
|
38
|
+
}
|
|
39
|
+
}, /*#__PURE__*/_react.default.createElement(_antd.Select, {
|
|
40
|
+
disabled: disabled,
|
|
41
|
+
style: {
|
|
42
|
+
width: 60
|
|
43
|
+
},
|
|
44
|
+
bordered: false,
|
|
45
|
+
value: (value === null || value === void 0 ? void 0 : value.relation) || null,
|
|
46
|
+
onChange: handleChange
|
|
47
|
+
}, /*#__PURE__*/_react.default.createElement(_antd.Select.Option, {
|
|
48
|
+
value: null
|
|
49
|
+
}, "\u65E0"), /*#__PURE__*/_react.default.createElement(_antd.Select.Option, {
|
|
50
|
+
value: "AND"
|
|
51
|
+
}, "AND"), /*#__PURE__*/_react.default.createElement(_antd.Select.Option, {
|
|
52
|
+
value: "OR"
|
|
53
|
+
}, "OR"))));
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
var _default = CrossLine;
|
|
57
|
+
exports.default = _default;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { PanelComponentProps } from "../../../../../packages/graph-canvas/typings";
|
|
3
|
+
import './style.less';
|
|
4
|
+
interface Props extends PanelComponentProps {
|
|
5
|
+
experimentId: string;
|
|
6
|
+
value?: any;
|
|
7
|
+
onChange?: (value: any) => void;
|
|
8
|
+
}
|
|
9
|
+
declare const ConditionConfiguration: React.FC<Props>;
|
|
10
|
+
export default ConditionConfiguration;
|