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
package/es/{pages → components/canvas}/config-panel/components/time-trigger/components/cycle-time.js
RENAMED
|
@@ -1,14 +1,3 @@
|
|
|
1
|
-
import "antd/es/time-picker/style";
|
|
2
|
-
import _TimePicker from "antd/es/time-picker";
|
|
3
|
-
import "antd/es/select/style";
|
|
4
|
-
import _Select from "antd/es/select";
|
|
5
|
-
import "antd/es/form/style";
|
|
6
|
-
import _Form from "antd/es/form";
|
|
7
|
-
import "antd/es/col/style";
|
|
8
|
-
import _Col from "antd/es/col";
|
|
9
|
-
import "antd/es/row/style";
|
|
10
|
-
import _Row from "antd/es/row";
|
|
11
|
-
|
|
12
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; }
|
|
13
2
|
|
|
14
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; }
|
|
@@ -16,7 +5,9 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
16
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; }
|
|
17
6
|
|
|
18
7
|
import React from 'react';
|
|
8
|
+
import { Col, Form, TimePicker, Row, Select } from 'antd';
|
|
19
9
|
import classNames from 'classnames';
|
|
10
|
+
import moment from 'moment';
|
|
20
11
|
import "../../../style.less";
|
|
21
12
|
var MonthDayList = Array.from(new Array(31), function (item, index) {
|
|
22
13
|
return index + 1;
|
|
@@ -35,66 +26,66 @@ var CycleTime = function CycleTime(props) {
|
|
|
35
26
|
|
|
36
27
|
var cycleTimeChange = function cycleTimeChange(time) {
|
|
37
28
|
onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread(_objectSpread({}, value), {}, {
|
|
38
|
-
time: time
|
|
29
|
+
time: time === null || time === void 0 ? void 0 : time.valueOf()
|
|
39
30
|
}));
|
|
40
31
|
};
|
|
41
32
|
|
|
42
33
|
return /*#__PURE__*/React.createElement("div", {
|
|
43
34
|
className: classNames('border-bottom', 'inner-bottom-box')
|
|
44
|
-
}, /*#__PURE__*/React.createElement(
|
|
35
|
+
}, /*#__PURE__*/React.createElement(Row, {
|
|
45
36
|
gutter: 8
|
|
46
|
-
}, (value === null || value === void 0 ? void 0 : value.cycle) !== 'day' && /*#__PURE__*/React.createElement(
|
|
37
|
+
}, (value === null || value === void 0 ? void 0 : value.cycle) !== 'day' && /*#__PURE__*/React.createElement(Col, {
|
|
47
38
|
span: 12
|
|
48
|
-
}, /*#__PURE__*/React.createElement(
|
|
39
|
+
}, /*#__PURE__*/React.createElement(Form.Item, {
|
|
49
40
|
label: "\u89E6\u53D1\u65F6\u95F4",
|
|
50
41
|
required: true,
|
|
51
42
|
className: "no-margin-bottom",
|
|
52
|
-
validateStatus:
|
|
53
|
-
}, (value === null || value === void 0 ? void 0 : value.cycle) === 'week' && /*#__PURE__*/React.createElement(
|
|
43
|
+
validateStatus: value !== null && value !== void 0 && value.date ? 'success' : 'error'
|
|
44
|
+
}, (value === null || value === void 0 ? void 0 : value.cycle) === 'week' && /*#__PURE__*/React.createElement(Select, {
|
|
54
45
|
disabled: disabled,
|
|
55
46
|
value: value === null || value === void 0 ? void 0 : value.date,
|
|
56
47
|
onChange: timeTypeChange
|
|
57
|
-
}, /*#__PURE__*/React.createElement(
|
|
48
|
+
}, /*#__PURE__*/React.createElement(Select.Option, {
|
|
58
49
|
value: 8
|
|
59
|
-
}, "\u5DE5\u4F5C\u65E5"), /*#__PURE__*/React.createElement(
|
|
50
|
+
}, "\u5DE5\u4F5C\u65E5"), /*#__PURE__*/React.createElement(Select.Option, {
|
|
60
51
|
value: 9
|
|
61
|
-
}, "\u975E\u5DE5\u4F5C\u65E5"), /*#__PURE__*/React.createElement(
|
|
52
|
+
}, "\u975E\u5DE5\u4F5C\u65E5"), /*#__PURE__*/React.createElement(Select.Option, {
|
|
62
53
|
value: 1
|
|
63
|
-
}, "\u5468\u4E00"), /*#__PURE__*/React.createElement(
|
|
54
|
+
}, "\u5468\u4E00"), /*#__PURE__*/React.createElement(Select.Option, {
|
|
64
55
|
value: 2
|
|
65
|
-
}, "\u5468\u4E8C"), /*#__PURE__*/React.createElement(
|
|
56
|
+
}, "\u5468\u4E8C"), /*#__PURE__*/React.createElement(Select.Option, {
|
|
66
57
|
value: 3
|
|
67
|
-
}, "\u5468\u4E09"), /*#__PURE__*/React.createElement(
|
|
58
|
+
}, "\u5468\u4E09"), /*#__PURE__*/React.createElement(Select.Option, {
|
|
68
59
|
value: 4
|
|
69
|
-
}, "\u5468\u56DB"), /*#__PURE__*/React.createElement(
|
|
60
|
+
}, "\u5468\u56DB"), /*#__PURE__*/React.createElement(Select.Option, {
|
|
70
61
|
value: 5
|
|
71
|
-
}, "\u5468\u4E94"), /*#__PURE__*/React.createElement(
|
|
62
|
+
}, "\u5468\u4E94"), /*#__PURE__*/React.createElement(Select.Option, {
|
|
72
63
|
value: 6
|
|
73
|
-
}, "\u5468\u516D"), /*#__PURE__*/React.createElement(
|
|
64
|
+
}, "\u5468\u516D"), /*#__PURE__*/React.createElement(Select.Option, {
|
|
74
65
|
value: 7
|
|
75
|
-
}, "\u5468\u65E5")), (value === null || value === void 0 ? void 0 : value.cycle) === 'month' && /*#__PURE__*/React.createElement(
|
|
66
|
+
}, "\u5468\u65E5")), (value === null || value === void 0 ? void 0 : value.cycle) === 'month' && /*#__PURE__*/React.createElement(Select, {
|
|
76
67
|
disabled: disabled,
|
|
77
68
|
value: value === null || value === void 0 ? void 0 : value.date,
|
|
78
69
|
onChange: timeTypeChange
|
|
79
70
|
}, MonthDayList === null || MonthDayList === void 0 ? void 0 : MonthDayList.map(function (item) {
|
|
80
|
-
return /*#__PURE__*/React.createElement(
|
|
71
|
+
return /*#__PURE__*/React.createElement(Select.Option, {
|
|
81
72
|
key: item,
|
|
82
73
|
value: item
|
|
83
74
|
}, item, "\u65E5");
|
|
84
|
-
})))), /*#__PURE__*/React.createElement(
|
|
75
|
+
})))), /*#__PURE__*/React.createElement(Col, {
|
|
85
76
|
span: (value === null || value === void 0 ? void 0 : value.cycle) === 'day' ? 24 : 12
|
|
86
|
-
}, /*#__PURE__*/React.createElement(
|
|
77
|
+
}, /*#__PURE__*/React.createElement(Form.Item, {
|
|
87
78
|
required: (value === null || value === void 0 ? void 0 : value.cycle) === 'day',
|
|
88
79
|
label: (value === null || value === void 0 ? void 0 : value.cycle) === 'day' ? '触发时间' : ' ',
|
|
89
80
|
className: "no-margin-bottom",
|
|
90
|
-
validateStatus:
|
|
91
|
-
}, /*#__PURE__*/React.createElement(
|
|
81
|
+
validateStatus: value !== null && value !== void 0 && value.time ? 'success' : 'error'
|
|
82
|
+
}, /*#__PURE__*/React.createElement(TimePicker, {
|
|
92
83
|
disabled: disabled,
|
|
93
84
|
placeholder: "",
|
|
94
85
|
style: {
|
|
95
86
|
width: '100%'
|
|
96
87
|
},
|
|
97
|
-
value: value === null || value === void 0 ? void 0 : value.time,
|
|
88
|
+
value: (value === null || value === void 0 ? void 0 : value.time) && moment(value.time),
|
|
98
89
|
onChange: cycleTimeChange
|
|
99
90
|
})))));
|
|
100
91
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import '
|
|
3
|
-
interface Props {
|
|
4
|
-
title: string;
|
|
5
|
-
value?: any;
|
|
6
|
-
onChange?: (value: any) => void;
|
|
7
|
-
disabled?: boolean;
|
|
8
|
-
}
|
|
9
|
-
declare const TimeHorizon: React.FC<Props>;
|
|
10
|
-
export default TimeHorizon;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import '../../../style.less';
|
|
3
|
+
interface Props {
|
|
4
|
+
title: string;
|
|
5
|
+
value?: any;
|
|
6
|
+
onChange?: (value: any) => void;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
}
|
|
9
|
+
declare const TimeHorizon: React.FC<Props>;
|
|
10
|
+
export default TimeHorizon;
|
|
@@ -1,14 +1,3 @@
|
|
|
1
|
-
import "antd/es/select/style";
|
|
2
|
-
import _Select from "antd/es/select";
|
|
3
|
-
import "antd/es/input-number/style";
|
|
4
|
-
import _InputNumber from "antd/es/input-number";
|
|
5
|
-
import "antd/es/form/style";
|
|
6
|
-
import _Form from "antd/es/form";
|
|
7
|
-
import "antd/es/col/style";
|
|
8
|
-
import _Col from "antd/es/col";
|
|
9
|
-
import "antd/es/row/style";
|
|
10
|
-
import _Row from "antd/es/row";
|
|
11
|
-
|
|
12
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; }
|
|
13
2
|
|
|
14
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; }
|
|
@@ -16,6 +5,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
16
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; }
|
|
17
6
|
|
|
18
7
|
import React from 'react';
|
|
8
|
+
import { Col, Form, InputNumber, Row, Select } from 'antd';
|
|
19
9
|
import "../../../style.less";
|
|
20
10
|
|
|
21
11
|
var TimeHorizon = function TimeHorizon(props) {
|
|
@@ -36,40 +26,40 @@ var TimeHorizon = function TimeHorizon(props) {
|
|
|
36
26
|
}));
|
|
37
27
|
};
|
|
38
28
|
|
|
39
|
-
return /*#__PURE__*/React.createElement(
|
|
29
|
+
return /*#__PURE__*/React.createElement(Row, {
|
|
40
30
|
gutter: 8
|
|
41
|
-
}, /*#__PURE__*/React.createElement(
|
|
31
|
+
}, /*#__PURE__*/React.createElement(Col, {
|
|
42
32
|
span: 12
|
|
43
|
-
}, /*#__PURE__*/React.createElement(
|
|
33
|
+
}, /*#__PURE__*/React.createElement(Form.Item, {
|
|
44
34
|
label: title,
|
|
45
35
|
required: true,
|
|
46
36
|
className: "no-margin-bottom",
|
|
47
|
-
validateStatus:
|
|
48
|
-
}, /*#__PURE__*/React.createElement(
|
|
37
|
+
validateStatus: value !== null && value !== void 0 && value.duration ? 'success' : 'error'
|
|
38
|
+
}, /*#__PURE__*/React.createElement(InputNumber, {
|
|
49
39
|
disabled: disabled,
|
|
50
40
|
value: value === null || value === void 0 ? void 0 : value.duration,
|
|
51
41
|
onChange: timeNumberChange,
|
|
52
42
|
style: {
|
|
53
43
|
width: '100%'
|
|
54
44
|
}
|
|
55
|
-
}))), /*#__PURE__*/React.createElement(
|
|
45
|
+
}))), /*#__PURE__*/React.createElement(Col, {
|
|
56
46
|
span: 12
|
|
57
|
-
}, /*#__PURE__*/React.createElement(
|
|
47
|
+
}, /*#__PURE__*/React.createElement(Form.Item, {
|
|
58
48
|
label: " ",
|
|
59
49
|
className: "no-margin-bottom",
|
|
60
|
-
validateStatus:
|
|
61
|
-
}, /*#__PURE__*/React.createElement(
|
|
50
|
+
validateStatus: value !== null && value !== void 0 && value.unit ? 'success' : 'error'
|
|
51
|
+
}, /*#__PURE__*/React.createElement(Select, {
|
|
62
52
|
disabled: disabled,
|
|
63
53
|
value: value === null || value === void 0 ? void 0 : value.unit,
|
|
64
54
|
onChange: timeTypeChange
|
|
65
|
-
}, /*#__PURE__*/React.createElement(
|
|
66
|
-
value: "
|
|
67
|
-
}, "s"), /*#__PURE__*/React.createElement(
|
|
68
|
-
value: "
|
|
69
|
-
}, "min"), /*#__PURE__*/React.createElement(
|
|
70
|
-
value: "
|
|
71
|
-
}, "h"), /*#__PURE__*/React.createElement(
|
|
72
|
-
value: "
|
|
55
|
+
}, /*#__PURE__*/React.createElement(Select.Option, {
|
|
56
|
+
value: "SECONDS"
|
|
57
|
+
}, "s"), /*#__PURE__*/React.createElement(Select.Option, {
|
|
58
|
+
value: "MINUTES"
|
|
59
|
+
}, "min"), /*#__PURE__*/React.createElement(Select.Option, {
|
|
60
|
+
value: "HOURS"
|
|
61
|
+
}, "h"), /*#__PURE__*/React.createElement(Select.Option, {
|
|
62
|
+
value: "DAYS"
|
|
73
63
|
}, "\u5929")))));
|
|
74
64
|
};
|
|
75
65
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import '../../style.less';
|
|
3
|
-
interface Props {
|
|
4
|
-
value?: any;
|
|
5
|
-
onChange?: (value: any) => void;
|
|
6
|
-
disabled?: boolean;
|
|
7
|
-
}
|
|
8
|
-
declare const DelayTime: React.FC<Props>;
|
|
9
|
-
export default DelayTime;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import '../../style.less';
|
|
3
|
+
interface Props {
|
|
4
|
+
value?: any;
|
|
5
|
+
onChange?: (value: any) => void;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
}
|
|
8
|
+
declare const DelayTime: React.FC<Props>;
|
|
9
|
+
export default DelayTime;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { DatePicker } from 'antd';
|
|
2
|
+
import { cloneDeep } from 'lodash';
|
|
3
|
+
import moment from 'moment';
|
|
4
|
+
import classNames from 'classnames';
|
|
5
|
+
import React from 'react';
|
|
6
|
+
var RangePicker = DatePicker.RangePicker;
|
|
7
|
+
|
|
8
|
+
var EffectiveTime = function EffectiveTime(props) {
|
|
9
|
+
var _props$value = props.value,
|
|
10
|
+
value = _props$value === void 0 ? [{}] : _props$value,
|
|
11
|
+
onChange = props.onChange;
|
|
12
|
+
|
|
13
|
+
var handleDateChange = function handleDateChange(range, index) {
|
|
14
|
+
var _range$, _range$2;
|
|
15
|
+
|
|
16
|
+
var cloneValue = cloneDeep(value);
|
|
17
|
+
cloneValue[index] = {
|
|
18
|
+
startDateTime: range === null || range === void 0 ? void 0 : (_range$ = range[0]) === null || _range$ === void 0 ? void 0 : _range$.format('YYYY-MM-DD HH:mm'),
|
|
19
|
+
endDateTime: range === null || range === void 0 ? void 0 : (_range$2 = range[1]) === null || _range$2 === void 0 ? void 0 : _range$2.format('YYYY-MM-DD HH:mm')
|
|
20
|
+
};
|
|
21
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(cloneValue);
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
25
|
+
className: classNames('border-bottom', 'inner-bottom-box')
|
|
26
|
+
}, value === null || value === void 0 ? void 0 : value.map(function (item, index) {
|
|
27
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
28
|
+
key: (item === null || item === void 0 ? void 0 : item.key) || index
|
|
29
|
+
}, /*#__PURE__*/React.createElement(RangePicker, {
|
|
30
|
+
value: (item === null || item === void 0 ? void 0 : item.startDateTime) && (item === null || item === void 0 ? void 0 : item.endDateTime) && [moment(item === null || item === void 0 ? void 0 : item.startDateTime), moment(item === null || item === void 0 ? void 0 : item.endDateTime)],
|
|
31
|
+
onChange: function onChange(range) {
|
|
32
|
+
return handleDateChange(range, index);
|
|
33
|
+
},
|
|
34
|
+
style: {
|
|
35
|
+
width: '100%'
|
|
36
|
+
},
|
|
37
|
+
showTime: true,
|
|
38
|
+
format: "YYYY-MM-DD HH:mm"
|
|
39
|
+
}));
|
|
40
|
+
}));
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
export default EffectiveTime;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { PanelComponentProps } from "../../../../../packages/graph-canvas/typings";
|
|
3
|
+
import '../../style.less';
|
|
4
|
+
interface Props extends PanelComponentProps {
|
|
5
|
+
value?: any;
|
|
6
|
+
onChange?: (value: any) => void;
|
|
7
|
+
}
|
|
8
|
+
declare const TimeTrigger: React.FC<Props>;
|
|
9
|
+
export default TimeTrigger;
|
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
import "antd/es/select/style";
|
|
2
|
-
import _Select from "antd/es/select";
|
|
3
|
-
import "antd/es/form/style";
|
|
4
|
-
import _Form from "antd/es/form";
|
|
5
|
-
|
|
6
1
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
7
2
|
|
|
8
3
|
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,10 +11,12 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
16
11
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
17
12
|
|
|
18
13
|
import React, { useState } from 'react';
|
|
14
|
+
import { Form, Select } from 'antd';
|
|
19
15
|
import DelayTime from "./delay-time";
|
|
20
16
|
import PersistentTime from "./persistent-time";
|
|
21
17
|
import IntervalTime from "./interval-time";
|
|
22
18
|
import TimingTime from "./timing-time";
|
|
19
|
+
import SectionTime from "./section-time";
|
|
23
20
|
import classNames from 'classnames';
|
|
24
21
|
import "../../style.less";
|
|
25
22
|
|
|
@@ -42,7 +39,7 @@ var TimeTrigger = function TimeTrigger(props) {
|
|
|
42
39
|
};
|
|
43
40
|
|
|
44
41
|
var modeComponent = {
|
|
45
|
-
|
|
42
|
+
delayed: /*#__PURE__*/React.createElement(DelayTime, {
|
|
46
43
|
disabled: modeDisabled,
|
|
47
44
|
value: value,
|
|
48
45
|
onChange: onChange
|
|
@@ -61,29 +58,33 @@ var TimeTrigger = function TimeTrigger(props) {
|
|
|
61
58
|
disabled: modeDisabled,
|
|
62
59
|
value: value,
|
|
63
60
|
onChange: onChange
|
|
61
|
+
}),
|
|
62
|
+
section: /*#__PURE__*/React.createElement(SectionTime, {
|
|
63
|
+
disabled: modeDisabled,
|
|
64
|
+
value: value,
|
|
65
|
+
onChange: onChange
|
|
64
66
|
})
|
|
65
67
|
};
|
|
68
|
+
console.log('xxxxxxxxxxxxx time-trigger', value);
|
|
66
69
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
67
70
|
className: classNames('border-bottom', 'inner-bottom-box')
|
|
68
|
-
}, /*#__PURE__*/React.createElement(
|
|
71
|
+
}, /*#__PURE__*/React.createElement(Form.Item, {
|
|
69
72
|
label: "\u89E6\u53D1\u6A21\u5F0F",
|
|
70
73
|
required: true,
|
|
71
74
|
className: "no-margin-bottom",
|
|
72
|
-
validateStatus:
|
|
73
|
-
}, /*#__PURE__*/React.createElement(
|
|
75
|
+
validateStatus: value !== null && value !== void 0 && value.mode || isFirst ? 'success' : 'error'
|
|
76
|
+
}, /*#__PURE__*/React.createElement(Select, {
|
|
74
77
|
disabled: modeDisabled,
|
|
75
78
|
allowClear: true,
|
|
76
79
|
onChange: handleModeChange,
|
|
77
80
|
value: value === null || value === void 0 ? void 0 : value.mode
|
|
78
|
-
}, /*#__PURE__*/React.createElement(
|
|
79
|
-
value: "
|
|
80
|
-
}, "\u5EF6\u8FDF"), /*#__PURE__*/React.createElement(
|
|
81
|
+
}, /*#__PURE__*/React.createElement(Select.Option, {
|
|
82
|
+
value: "delayed"
|
|
83
|
+
}, "\u5EF6\u8FDF"), /*#__PURE__*/React.createElement(Select.Option, {
|
|
81
84
|
value: "duration"
|
|
82
|
-
}, "\u6301\u7EED"), /*#__PURE__*/React.createElement(
|
|
83
|
-
value: "
|
|
84
|
-
}, "\u95F4
|
|
85
|
-
value: "timing"
|
|
86
|
-
}, "\u5B9A\u65F6")))), (value === null || value === void 0 ? void 0 : value.mode) && modeComponent[value.mode]);
|
|
85
|
+
}, "\u6301\u7EED"), /*#__PURE__*/React.createElement(Select.Option, {
|
|
86
|
+
value: "section"
|
|
87
|
+
}, "\u533A\u95F4")))), (value === null || value === void 0 ? void 0 : value.mode) && modeComponent[value.mode]);
|
|
87
88
|
};
|
|
88
89
|
|
|
89
90
|
export default TimeTrigger;
|
package/es/{pages → components/canvas}/config-panel/components/time-trigger/interval-time.d.ts
RENAMED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import '../../style.less';
|
|
3
|
-
interface Props {
|
|
4
|
-
value?: any;
|
|
5
|
-
onChange?: (value: any) => void;
|
|
6
|
-
disabled: boolean;
|
|
7
|
-
}
|
|
8
|
-
declare const IntervalTime: React.FC<Props>;
|
|
9
|
-
export default IntervalTime;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import '../../style.less';
|
|
3
|
+
interface Props {
|
|
4
|
+
value?: any;
|
|
5
|
+
onChange?: (value: any) => void;
|
|
6
|
+
disabled: boolean;
|
|
7
|
+
}
|
|
8
|
+
declare const IntervalTime: React.FC<Props>;
|
|
9
|
+
export default IntervalTime;
|
package/es/{pages → components/canvas}/config-panel/components/time-trigger/interval-time.js
RENAMED
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
import "antd/es/input-number/style";
|
|
2
|
-
import _InputNumber from "antd/es/input-number";
|
|
3
|
-
import "antd/es/form/style";
|
|
4
|
-
import _Form from "antd/es/form";
|
|
5
|
-
|
|
6
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; }
|
|
7
2
|
|
|
8
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; }
|
|
@@ -10,6 +5,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
10
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; }
|
|
11
6
|
|
|
12
7
|
import React from 'react';
|
|
8
|
+
import { Form, InputNumber } from 'antd';
|
|
13
9
|
import TimeHorizon from "./components/time-horizon";
|
|
14
10
|
import classNames from 'classnames';
|
|
15
11
|
import "../../style.less";
|
|
@@ -34,12 +30,12 @@ var IntervalTime = function IntervalTime(props) {
|
|
|
34
30
|
onChange: onChange
|
|
35
31
|
})), /*#__PURE__*/React.createElement("div", {
|
|
36
32
|
className: classNames('border-bottom', 'inner-bottom-box')
|
|
37
|
-
}, /*#__PURE__*/React.createElement(
|
|
33
|
+
}, /*#__PURE__*/React.createElement(Form.Item, {
|
|
38
34
|
label: "\u95F4\u9694\u6B21\u6570",
|
|
39
35
|
required: true,
|
|
40
36
|
className: 'no-margin-bottom',
|
|
41
|
-
validateStatus:
|
|
42
|
-
}, /*#__PURE__*/React.createElement(
|
|
37
|
+
validateStatus: value !== null && value !== void 0 && value.intervalTimes ? 'success' : 'error'
|
|
38
|
+
}, /*#__PURE__*/React.createElement(InputNumber, {
|
|
43
39
|
style: {
|
|
44
40
|
width: '100%'
|
|
45
41
|
},
|
package/es/{pages → components/canvas}/config-panel/components/time-trigger/persistent-time.d.ts
RENAMED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import '../../style.less';
|
|
3
|
-
interface Props {
|
|
4
|
-
value?: any;
|
|
5
|
-
onChange?: (value: any) => void;
|
|
6
|
-
disabled?: boolean;
|
|
7
|
-
}
|
|
8
|
-
declare const PersistentTime: React.FC<Props>;
|
|
9
|
-
export default PersistentTime;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import '../../style.less';
|
|
3
|
+
interface Props {
|
|
4
|
+
value?: any;
|
|
5
|
+
onChange?: (value: any) => void;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
}
|
|
8
|
+
declare const PersistentTime: React.FC<Props>;
|
|
9
|
+
export default PersistentTime;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { FC } from 'react';
|
|
2
|
+
import '../../style.less';
|
|
3
|
+
interface Props {
|
|
4
|
+
mode: 'HOURS' | 'DAYS' | 'MONTHS';
|
|
5
|
+
value?: any;
|
|
6
|
+
onChange?: (value: any) => void;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
}
|
|
9
|
+
declare const SectionDetail: FC<Props>;
|
|
10
|
+
export default SectionDetail;
|
|
@@ -0,0 +1,125 @@
|
|
|
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 { TimePicker, Select } from 'antd';
|
|
4
|
+
import { cloneDeep } from 'lodash';
|
|
5
|
+
import moment from 'moment';
|
|
6
|
+
import React from 'react';
|
|
7
|
+
import "../../style.less";
|
|
8
|
+
var RangePicker = TimePicker.RangePicker;
|
|
9
|
+
var MonthList = Array.from(new Array(12), function (item, index) {
|
|
10
|
+
return index + 1;
|
|
11
|
+
});
|
|
12
|
+
var DayList = Array.from(new Array(31), function (item, index) {
|
|
13
|
+
return index + 1;
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
var SectionDetail = function SectionDetail(props) {
|
|
17
|
+
var _props$value = props.value,
|
|
18
|
+
value = _props$value === void 0 ? [{}] : _props$value,
|
|
19
|
+
mode = props.mode,
|
|
20
|
+
onChange = props.onChange;
|
|
21
|
+
|
|
22
|
+
var handleDateChange = function handleDateChange(range, index) {
|
|
23
|
+
var _range$, _range$2;
|
|
24
|
+
|
|
25
|
+
var cloneValue = cloneDeep(value);
|
|
26
|
+
cloneValue[index].times = {
|
|
27
|
+
startTime: range === null || range === void 0 ? void 0 : (_range$ = range[0]) === null || _range$ === void 0 ? void 0 : _range$.format('HH:mm'),
|
|
28
|
+
endTime: range === null || range === void 0 ? void 0 : (_range$2 = range[1]) === null || _range$2 === void 0 ? void 0 : _range$2.format('HH:mm')
|
|
29
|
+
};
|
|
30
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(cloneValue);
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
var handleSelectChange = function handleSelectChange(name, range, index) {
|
|
34
|
+
var _cloneValue$index;
|
|
35
|
+
|
|
36
|
+
var cloneValue = cloneDeep(value);
|
|
37
|
+
|
|
38
|
+
if (cloneValue !== null && cloneValue !== void 0 && (_cloneValue$index = cloneValue[index]) !== null && _cloneValue$index !== void 0 && _cloneValue$index.range) {
|
|
39
|
+
cloneValue[index].range[name] = range;
|
|
40
|
+
} else {
|
|
41
|
+
cloneValue[index].range = _defineProperty({}, name, range);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(cloneValue);
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
return value === null || value === void 0 ? void 0 : value.map(function (item, index) {
|
|
48
|
+
var _item$times, _item$times2, _item$times3, _item$times4, _item$range, _item$range2, _item$range3, _item$range4;
|
|
49
|
+
|
|
50
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
51
|
+
key: (item === null || item === void 0 ? void 0 : item.key) || index
|
|
52
|
+
}, mode === 'HOURS' && /*#__PURE__*/React.createElement(RangePicker, {
|
|
53
|
+
value: (item === null || item === void 0 ? void 0 : (_item$times = item.times) === null || _item$times === void 0 ? void 0 : _item$times.startTime) && (item === null || item === void 0 ? void 0 : (_item$times2 = item.times) === null || _item$times2 === void 0 ? void 0 : _item$times2.endTime) && [moment(item === null || item === void 0 ? void 0 : (_item$times3 = item.times) === null || _item$times3 === void 0 ? void 0 : _item$times3.startTime, 'HH:mm'), moment(item === null || item === void 0 ? void 0 : (_item$times4 = item.times) === null || _item$times4 === void 0 ? void 0 : _item$times4.endTime, 'HH:mm')],
|
|
54
|
+
onChange: function onChange(range) {
|
|
55
|
+
return handleDateChange(range, index);
|
|
56
|
+
},
|
|
57
|
+
style: {
|
|
58
|
+
width: '100%'
|
|
59
|
+
},
|
|
60
|
+
format: "HH:mm"
|
|
61
|
+
}), mode === 'MONTHS' && /*#__PURE__*/React.createElement("div", {
|
|
62
|
+
className: "section-detail-select"
|
|
63
|
+
}, /*#__PURE__*/React.createElement(Select, {
|
|
64
|
+
style: {
|
|
65
|
+
width: '50%'
|
|
66
|
+
},
|
|
67
|
+
placeholder: "\u8BF7\u9009\u62E9\u5F00\u59CB\u65F6\u95F4",
|
|
68
|
+
value: item === null || item === void 0 ? void 0 : (_item$range = item.range) === null || _item$range === void 0 ? void 0 : _item$range.start,
|
|
69
|
+
onChange: function onChange(range) {
|
|
70
|
+
return handleSelectChange('start', range, index);
|
|
71
|
+
}
|
|
72
|
+
}, MonthList === null || MonthList === void 0 ? void 0 : MonthList.map(function (child) {
|
|
73
|
+
return /*#__PURE__*/React.createElement(Select.Option, {
|
|
74
|
+
key: child,
|
|
75
|
+
value: child
|
|
76
|
+
}, child);
|
|
77
|
+
})), /*#__PURE__*/React.createElement(Select, {
|
|
78
|
+
style: {
|
|
79
|
+
width: '50%'
|
|
80
|
+
},
|
|
81
|
+
placeholder: "\u8BF7\u9009\u62E9\u7ED3\u675F\u65F6\u95F4",
|
|
82
|
+
value: item === null || item === void 0 ? void 0 : (_item$range2 = item.range) === null || _item$range2 === void 0 ? void 0 : _item$range2.end,
|
|
83
|
+
onChange: function onChange(range) {
|
|
84
|
+
return handleSelectChange('end', range, index);
|
|
85
|
+
}
|
|
86
|
+
}, MonthList === null || MonthList === void 0 ? void 0 : MonthList.map(function (child) {
|
|
87
|
+
return /*#__PURE__*/React.createElement(Select.Option, {
|
|
88
|
+
key: child,
|
|
89
|
+
value: child
|
|
90
|
+
}, child);
|
|
91
|
+
}))), mode === 'DAYS' && /*#__PURE__*/React.createElement("div", {
|
|
92
|
+
className: "section-detail-select"
|
|
93
|
+
}, /*#__PURE__*/React.createElement(Select, {
|
|
94
|
+
style: {
|
|
95
|
+
width: '50%'
|
|
96
|
+
},
|
|
97
|
+
placeholder: "\u8BF7\u9009\u62E9\u5F00\u59CB\u65F6\u95F4",
|
|
98
|
+
value: item === null || item === void 0 ? void 0 : (_item$range3 = item.range) === null || _item$range3 === void 0 ? void 0 : _item$range3.start,
|
|
99
|
+
onChange: function onChange(range) {
|
|
100
|
+
return handleSelectChange('start', range, index);
|
|
101
|
+
}
|
|
102
|
+
}, DayList === null || DayList === void 0 ? void 0 : DayList.map(function (child) {
|
|
103
|
+
return /*#__PURE__*/React.createElement(Select.Option, {
|
|
104
|
+
key: child,
|
|
105
|
+
value: child
|
|
106
|
+
}, child);
|
|
107
|
+
})), /*#__PURE__*/React.createElement(Select, {
|
|
108
|
+
style: {
|
|
109
|
+
width: '50%'
|
|
110
|
+
},
|
|
111
|
+
placeholder: "\u8BF7\u9009\u62E9\u7ED3\u675F\u65F6\u95F4",
|
|
112
|
+
value: item === null || item === void 0 ? void 0 : (_item$range4 = item.range) === null || _item$range4 === void 0 ? void 0 : _item$range4.end,
|
|
113
|
+
onChange: function onChange(range) {
|
|
114
|
+
return handleSelectChange('end', range, index);
|
|
115
|
+
}
|
|
116
|
+
}, DayList === null || DayList === void 0 ? void 0 : DayList.map(function (child) {
|
|
117
|
+
return /*#__PURE__*/React.createElement(Select.Option, {
|
|
118
|
+
key: child,
|
|
119
|
+
value: child
|
|
120
|
+
}, child);
|
|
121
|
+
}))));
|
|
122
|
+
});
|
|
123
|
+
};
|
|
124
|
+
|
|
125
|
+
export default SectionDetail;
|