strategy-panel 1.0.1-rc-19 → 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.
Files changed (41) hide show
  1. package/es/assets/decive.svg +1 -1
  2. package/es/assets/hand.svg +1 -1
  3. package/es/assets/lock.svg +7 -7
  4. package/es/components/canvas/component-tree-panel/category-tree/category-type.js +24 -12
  5. package/es/components/canvas/component-tree-panel/category-tree/index.js +1 -0
  6. package/es/components/canvas/component-tree-panel/category-tree/node-title.js +4 -2
  7. package/es/components/canvas/component-tree-panel/index.js +1 -0
  8. package/es/components/canvas/config-panel/components/condition-configuration/index.js +6 -3
  9. package/es/components/canvas/config-panel/style.less +90 -90
  10. package/es/components/canvas/strategy-header/index.js +8 -4
  11. package/es/packages/graph-canvas/graph-model/node/common-node/node-element.js +4 -0
  12. package/es/packages/graph-canvas/graph-model/node/common-node/node-element.less +3 -3
  13. package/es/packages/graph-canvas/graph-model/node/condition-node/condition-element.js +13 -3
  14. package/es/packages/graph-canvas/graph-model/node/condition-node/condition-element.less +5 -5
  15. package/es/packages/graph-canvas/graph-model/node/logical-node/images/locking.svg +5 -8
  16. package/es/packages/graph-canvas/graph-model/node/logical-node/images/unlock.svg +3 -6
  17. package/es/packages/graph-canvas/graph-model/node/logical-node/logical-element.js +28 -6
  18. package/es/packages/graph-canvas/graph-model/node/logical-node/logical-element.less +3 -3
  19. package/es/style/default.less +10 -10
  20. package/es/typings.d.ts +8 -7
  21. package/lib/assets/decive.svg +1 -1
  22. package/lib/assets/hand.svg +1 -1
  23. package/lib/assets/lock.svg +7 -7
  24. package/lib/components/canvas/component-tree-panel/category-tree/category-type.js +38 -12
  25. package/lib/components/canvas/component-tree-panel/category-tree/index.js +1 -0
  26. package/lib/components/canvas/component-tree-panel/category-tree/node-title.js +5 -2
  27. package/lib/components/canvas/component-tree-panel/index.js +1 -0
  28. package/lib/components/canvas/config-panel/components/condition-configuration/index.js +9 -3
  29. package/lib/components/canvas/config-panel/style.less +90 -90
  30. package/lib/components/canvas/strategy-header/index.js +11 -4
  31. package/lib/packages/graph-canvas/graph-model/node/common-node/node-element.js +4 -0
  32. package/lib/packages/graph-canvas/graph-model/node/common-node/node-element.less +3 -3
  33. package/lib/packages/graph-canvas/graph-model/node/condition-node/condition-element.js +14 -3
  34. package/lib/packages/graph-canvas/graph-model/node/condition-node/condition-element.less +5 -5
  35. package/lib/packages/graph-canvas/graph-model/node/logical-node/images/locking.svg +5 -8
  36. package/lib/packages/graph-canvas/graph-model/node/logical-node/images/unlock.svg +3 -6
  37. package/lib/packages/graph-canvas/graph-model/node/logical-node/logical-element.js +34 -6
  38. package/lib/packages/graph-canvas/graph-model/node/logical-node/logical-element.less +3 -3
  39. package/lib/style/default.less +10 -10
  40. package/lib/typings.d.ts +8 -7
  41. package/package.json +35 -35
@@ -1,5 +1,5 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
- <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="24px" height="24px" viewBox="0 0 24 24" version="1.1">
2
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="28px" height="28px" viewBox="0 0 28 28" version="1.1">
3
3
  <title>设备管理 (2)</title>
4
4
  <g id="全局样式" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" opacity="0.8">
5
5
  <g id="Icons" transform="translate(-431.000000, -1228.000000)" fill="#323232" fill-rule="nonzero">
@@ -1,5 +1,5 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
- <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="28px" height="27px" viewBox="0 0 28 27" version="1.1">
2
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="28px" height="28px" viewBox="0 0 28 28" version="1.1">
3
3
  <title>手动</title>
4
4
  <g id="全局样式" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" opacity="0.8">
5
5
  <g id="Icons" transform="translate(-582.000000, -1228.000000)" fill="#323232" fill-rule="nonzero">
@@ -1,8 +1,8 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" width="24.744" height="31.16" viewBox="0 0 24.744 31.16">
2
- <defs>
3
- <style>.a{fill:#595959;}</style>
4
- </defs>
5
- <path class="a" d="M46.413,18.491V16.044a5.769,5.769,0,0,0-1.6-4.286,5.734,5.734,0,0,0-4.189-1.57,5.251,5.251,0,0,0-3.955,1.6,5.925,5.925,0,0,0-1.505,4.255v2.446H33.975V15.118a5.507,5.507,0,0,1,.493-2.34,6.22,6.22,0,0,1,1.4-1.949,6.7,6.7,0,0,1,2.141-1.338A7.431,7.431,0,0,1,40.755,9a6.645,6.645,0,0,1,2.5.487,7.207,7.207,0,0,1,2.167,1.356,6.658,6.658,0,0,1,1.488,1.974,5.076,5.076,0,0,1,.524,2.3v3.373Z" transform="translate(-28.35 -7.51)"></path>
6
- <path class="a" d="M33.245,0a8.872,8.872,0,0,0-3.291.6A8.147,8.147,0,0,0,27.34,2.233,7.665,7.665,0,0,0,25.6,4.648a7.026,7.026,0,0,0-.628,2.961v4.863h4.168V8.534a4.48,4.48,0,0,1,1.092-3.225,3.8,3.8,0,0,1,2.878-1.141,4.282,4.282,0,0,1,3.143,1.141,4.325,4.325,0,0,1,1.158,3.225v3.936h4V7.608a6.6,6.6,0,0,0-.678-2.961,8.107,8.107,0,0,0-1.819-2.415A8.656,8.656,0,0,0,36.3.6a8.087,8.087,0,0,0-3.06-.6" transform="translate(-20.84)"></path>
7
- <path class="a" d="M21.764,90.293v9.458a1.457,1.457,0,0,1-.1.554,1.351,1.351,0,0,1-.266.429,1,1,0,0,1-.332.231,1.048,1.048,0,0,1-.427.074H3.937a.962.962,0,0,1-.388-.064.936.936,0,0,1-.3-.2.913.913,0,0,1-.186-.307,1.315,1.315,0,0,1-.081-.481V90.293H21.764m.8-2.98H2.15a2.047,2.047,0,0,0-1.522.645A2.128,2.128,0,0,0,0,89.5V99.982a4.273,4.273,0,0,0,.281,1.555,3.846,3.846,0,0,0,3.655,2.481H20.642a3.945,3.945,0,0,0,2.928-1.24,4.311,4.311,0,0,0,.86-1.356,4.412,4.412,0,0,0,.314-1.67V89.5a2.2,2.2,0,0,0-2.183-2.183" transform="translate(0 -72.858)"></path>
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="24.744" height="31.16" viewBox="0 0 24.744 31.16">
2
+ <defs>
3
+ <style>.a{fill:#595959;}</style>
4
+ </defs>
5
+ <path class="a" d="M46.413,18.491V16.044a5.769,5.769,0,0,0-1.6-4.286,5.734,5.734,0,0,0-4.189-1.57,5.251,5.251,0,0,0-3.955,1.6,5.925,5.925,0,0,0-1.505,4.255v2.446H33.975V15.118a5.507,5.507,0,0,1,.493-2.34,6.22,6.22,0,0,1,1.4-1.949,6.7,6.7,0,0,1,2.141-1.338A7.431,7.431,0,0,1,40.755,9a6.645,6.645,0,0,1,2.5.487,7.207,7.207,0,0,1,2.167,1.356,6.658,6.658,0,0,1,1.488,1.974,5.076,5.076,0,0,1,.524,2.3v3.373Z" transform="translate(-28.35 -7.51)"></path>
6
+ <path class="a" d="M33.245,0a8.872,8.872,0,0,0-3.291.6A8.147,8.147,0,0,0,27.34,2.233,7.665,7.665,0,0,0,25.6,4.648a7.026,7.026,0,0,0-.628,2.961v4.863h4.168V8.534a4.48,4.48,0,0,1,1.092-3.225,3.8,3.8,0,0,1,2.878-1.141,4.282,4.282,0,0,1,3.143,1.141,4.325,4.325,0,0,1,1.158,3.225v3.936h4V7.608a6.6,6.6,0,0,0-.678-2.961,8.107,8.107,0,0,0-1.819-2.415A8.656,8.656,0,0,0,36.3.6a8.087,8.087,0,0,0-3.06-.6" transform="translate(-20.84)"></path>
7
+ <path class="a" d="M21.764,90.293v9.458a1.457,1.457,0,0,1-.1.554,1.351,1.351,0,0,1-.266.429,1,1,0,0,1-.332.231,1.048,1.048,0,0,1-.427.074H3.937a.962.962,0,0,1-.388-.064.936.936,0,0,1-.3-.2.913.913,0,0,1-.186-.307,1.315,1.315,0,0,1-.081-.481V90.293H21.764m.8-2.98H2.15a2.047,2.047,0,0,0-1.522.645A2.128,2.128,0,0,0,0,89.5V99.982a4.273,4.273,0,0,0,.281,1.555,3.846,3.846,0,0,0,3.655,2.481H20.642a3.945,3.945,0,0,0,2.928-1.24,4.311,4.311,0,0,0,.86-1.356,4.412,4.412,0,0,0,.314-1.67V89.5a2.2,2.2,0,0,0-2.183-2.183" transform="translate(0 -72.858)"></path>
8
8
  </svg>
@@ -1,4 +1,16 @@
1
1
  import { COMPONENTS_TYPE, COMMONLY_USED, SCENE_DISPLAY, SIGN_OPERATION, MOTION_OPERATION } from "../../../../packages/graph-canvas/node-types";
2
+ import variate from "../../../../assets/variate.svg";
3
+ import lock from "../../../../assets/lock.svg";
4
+ import device from "../../../../assets/decive.svg";
5
+ import time from "../../../../assets/time.svg";
6
+ import hand from "../../../../assets/hand.svg";
7
+ import relation from "../../../../assets/relation.svg";
8
+ import logical from "../../../../assets/logical.svg";
9
+ import condition from "../../../../assets/condition.svg";
10
+ import alarm from "../../../../assets/alarm.svg";
11
+ import notice from "../../../../assets/notice.svg";
12
+ import order from "../../../../assets/order.svg";
13
+ import control from "../../../../assets/control.svg";
2
14
  export var componentsData = [{
3
15
  id: COMPONENTS_TYPE.COMMONLY_USED,
4
16
  name: '通用组件',
@@ -6,11 +18,11 @@ export var componentsData = [{
6
18
  children: [{
7
19
  id: COMMONLY_USED.VARIATE,
8
20
  name: '变量',
9
- imgUrl: require("../../../../assets/variate.svg")
21
+ imgUrl: variate
10
22
  }, {
11
23
  id: COMMONLY_USED.LOCKED,
12
24
  name: '服务锁定',
13
- imgUrl: require("../../../../assets/lock.svg")
25
+ imgUrl: lock
14
26
  }]
15
27
  }, {
16
28
  id: COMPONENTS_TYPE.SCENE_DISPLAY,
@@ -19,16 +31,16 @@ export var componentsData = [{
19
31
  children: [{
20
32
  id: SCENE_DISPLAY.EQUIPMENT,
21
33
  name: '设备触发',
22
- imgUrl: require("../../../../assets/decive.svg"),
34
+ imgUrl: device,
23
35
  number: 1
24
36
  }, {
25
37
  id: SCENE_DISPLAY.TIME,
26
38
  name: '时间触发',
27
- imgUrl: require("../../../../assets/time.svg")
39
+ imgUrl: time
28
40
  }, {
29
41
  id: SCENE_DISPLAY.MANUAL,
30
42
  name: '手动按钮',
31
- imgUrl: require("../../../../assets/hand.svg")
43
+ imgUrl: hand
32
44
  }]
33
45
  }, {
34
46
  id: COMPONENTS_TYPE.SIGN_OPERATION,
@@ -37,15 +49,15 @@ export var componentsData = [{
37
49
  children: [{
38
50
  id: SIGN_OPERATION.RELATION,
39
51
  name: '关系运算',
40
- imgUrl: require("../../../../assets/relation.svg")
52
+ imgUrl: relation
41
53
  }, {
42
54
  id: SIGN_OPERATION.LOGICAL,
43
55
  name: '逻辑运算',
44
- imgUrl: require("../../../../assets/logical.svg")
56
+ imgUrl: logical
45
57
  }, {
46
58
  id: SIGN_OPERATION.CONDITION,
47
59
  name: '条件判断',
48
- imgUrl: require("../../../../assets/condition.svg")
60
+ imgUrl: condition
49
61
  }]
50
62
  }, {
51
63
  id: COMPONENTS_TYPE.MOTION_OPERATION,
@@ -54,19 +66,19 @@ export var componentsData = [{
54
66
  children: [{
55
67
  id: MOTION_OPERATION.ALARM,
56
68
  name: '报警',
57
- imgUrl: require("../../../../assets/alarm.svg")
69
+ imgUrl: alarm
58
70
  }, {
59
71
  id: MOTION_OPERATION.NOTICE,
60
72
  name: '通知',
61
- imgUrl: require("../../../../assets/notice.svg")
73
+ imgUrl: notice
62
74
  }, {
63
75
  id: MOTION_OPERATION.ORDER,
64
76
  name: '派发工单',
65
- imgUrl: require("../../../../assets/order.svg")
77
+ imgUrl: order
66
78
  }, {
67
79
  id: MOTION_OPERATION.CONTROL,
68
80
  name: '远程控制',
69
- imgUrl: require("../../../../assets/control.svg")
81
+ imgUrl: control
70
82
  }]
71
83
  }, {
72
84
  id: COMPONENTS_TYPE.APPLICATION,
@@ -72,6 +72,7 @@ var CategoryTree = function CategoryTree(props) {
72
72
  var defaultActiveKey = currentPanelData === null || currentPanelData === void 0 ? void 0 : currentPanelData.map(function (item) {
73
73
  return item === null || item === void 0 ? void 0 : item.id;
74
74
  });
75
+ console.log('xxxxcurrentPanelData', currentPanelData, componentsData);
75
76
  return /*#__PURE__*/React.createElement("div", {
76
77
  className: "category-tree-list"
77
78
  }, /*#__PURE__*/React.createElement(Collapse, {
@@ -2,6 +2,7 @@ import React from 'react';
2
2
  import { DragSource } from 'react-dnd';
3
3
  import marked from 'marked';
4
4
  import { DRAGGABLE_ALGO_COMPONENT } from "../../../../packages/graph-common/graph";
5
+ import application from "../../../../assets/application.svg";
5
6
  import "./node-title.less";
6
7
  marked.setOptions({
7
8
  gfm: true,
@@ -18,7 +19,8 @@ var InnerNodeTitle = function InnerNodeTitle(props) {
18
19
  var _node$name = node.name,
19
20
  name = _node$name === void 0 ? '' : _node$name,
20
21
  isDir = node.isDir,
21
- imgUrl = node.imgUrl; // 文件夹
22
+ imgUrl = node.imgUrl;
23
+ console.log('InnerNodeTitlexxxx', node); // 文件夹
22
24
 
23
25
  if (isDir) {
24
26
  return /*#__PURE__*/React.createElement("div", {
@@ -36,7 +38,7 @@ var InnerNodeTitle = function InnerNodeTitle(props) {
36
38
  }, /*#__PURE__*/React.createElement("img", {
37
39
  alt: name,
38
40
  className: "node-icon",
39
- src: imgUrl || require("../../../../assets/application.svg")
41
+ src: imgUrl || application
40
42
  })))), /*#__PURE__*/React.createElement("span", {
41
43
  className: "label"
42
44
  }, name));
@@ -7,6 +7,7 @@ var ComponentTreePanel = function ComponentTreePanel(props) {
7
7
  var className = props.className,
8
8
  _props$panelData = props.panelData,
9
9
  panelData = _props$panelData === void 0 ? [] : _props$panelData;
10
+ console.log('ComponentTreePanelxxxxxxxx', panelData);
10
11
  return /*#__PURE__*/React.createElement("div", {
11
12
  className: classNames(className, 'node-source-tree-container', 'node-source-tree-shadow')
12
13
  }, /*#__PURE__*/React.createElement("div", {
@@ -20,6 +20,9 @@ import { useObservableState } from "../../../../../packages/hooks/useObservableS
20
20
  import { COMMONLY_USED, SCENE_DISPLAY } from "../../../../../packages/graph-canvas/node-types";
21
21
  import ConfigureModal from "./configure-modal";
22
22
  import CrossLine from "./cross-line";
23
+ import editSvg from "../../../../../assets/edit.svg";
24
+ import deleteSvg from "../../../../../assets/delete.svg";
25
+ import addSvg from "../../../../../assets/add.svg";
23
26
  import "./style.less";
24
27
 
25
28
  var getRelationData = function getRelationData(expGraph, nodeId) {
@@ -145,7 +148,7 @@ var ConditionConfiguration = function ConditionConfiguration(props) {
145
148
  onClick: function onClick() {
146
149
  return handleOpenEdit(item, index);
147
150
  },
148
- src: require("../../../../../assets/edit.svg"),
151
+ src: editSvg,
149
152
  className: classNames('icon', 'mr-10')
150
153
  }), /*#__PURE__*/React.createElement(Popconfirm, {
151
154
  placement: "left",
@@ -156,7 +159,7 @@ var ConditionConfiguration = function ConditionConfiguration(props) {
156
159
  return handleRemoveCondition(index);
157
160
  }
158
161
  }, /*#__PURE__*/React.createElement(ReactSVG, {
159
- src: require("../../../../../assets/delete.svg"),
162
+ src: deleteSvg,
160
163
  className: "icon"
161
164
  })))), index !== value.length - 1 && /*#__PURE__*/React.createElement(CrossLine, {
162
165
  disabled: modeDisabled,
@@ -170,7 +173,7 @@ var ConditionConfiguration = function ConditionConfiguration(props) {
170
173
  className: "condition-edit-box",
171
174
  onClick: handleOpenConfigure
172
175
  }, /*#__PURE__*/React.createElement(ReactSVG, {
173
- src: require("../../../../../assets/add.svg"),
176
+ src: addSvg,
174
177
  className: "icon"
175
178
  }), "\u6DFB\u52A0"), /*#__PURE__*/React.createElement(ConfigureModal, {
176
179
  visible: visible,
@@ -1,90 +1,90 @@
1
- @e9-color: #e9e9e9;
2
- @f2-color: #F2F2F2;
3
- @black-color: #323232;
4
-
5
- .config-panel {
6
- width: 350px;
7
- min-width: 350px;
8
- margin-top: -1px;
9
- margin-right: -360px;
10
- border: 1px solid @e9-color;
11
- transition: margin-right 0.3s ease-out;
12
- &.selected {
13
- margin-right: 0;
14
- }
15
- }
16
-
17
- .setting {
18
- height: 100%;
19
- .form {
20
- flex-grow: 1;
21
- height: 100%;
22
- padding: 10px 0;
23
- overflow-x: hidden;
24
- overflow-y: auto;
25
- background: #fff;
26
- }
27
- }
28
-
29
- .no-margin-bottom {
30
- margin-bottom: 0 !important;
31
- }
32
-
33
- .config-panel-form{
34
- & > .border-bottom:last-child{
35
- margin-bottom: 50px;
36
- }
37
- }
38
-
39
- .border-bottom {
40
- margin-bottom: 6px;
41
- padding: 0 10px 12px;
42
- border-bottom: 1px solid @e9-color;
43
- &.inner-bottom-box{
44
- margin: 0 -10px -13px;
45
- }
46
- &.inner-bottom-box:not(:first-child) {
47
- margin-top: 18px;
48
- }
49
-
50
- .ant-form-item-with-help .ant-form-item-explain {
51
- display: none;
52
- }
53
- .ant-input,
54
- .ant-input-number,
55
- .ant-input-number-status-error:not(.ant-input-number-disabled):not(.ant-input-number-borderless).ant-input-number,
56
- .ant-input-number-status-error:not(.ant-input-number-disabled):not(.ant-input-number-borderless).ant-input-number:hover{
57
- border-radius: 4px;
58
- color: @black-color !important;
59
- background: @f2-color !important;
60
- }
61
- .ant-picker,
62
- .ant-picker:not([disabled]):hover,
63
- .ant-picker-status-error.ant-picker, .ant-picker-status-error.ant-picker:not([disabled]):hover{
64
- border-radius: 4px;
65
- color: @black-color !important;
66
- background: @f2-color !important;
67
- }
68
- .ant-form-item-has-error .ant-input-number:not([disabled]):hover,
69
- .ant-form-item-has-error .ant-picker:not([disabled]):hover,
70
- .ant-form-item-has-error .ant-select:not(.ant-select-disabled):not(.ant-select-customize-input) .ant-select-selector{
71
- border-radius: 4px;
72
- color: @black-color !important;
73
- background: @f2-color !important;
74
- }
75
- .ant-select:not(.ant-select-customize-input) .ant-select-selector{
76
- border-radius: 4px;
77
- color: @black-color !important;
78
- background: @f2-color !important;
79
- }
80
-
81
- .id-line{
82
- margin-top: 5px;
83
- text-align: right;
84
- user-select: all;
85
- }
86
- }
87
-
88
- .section-detail-select{
89
- display: flex;
90
- }
1
+ @e9-color: #e9e9e9;
2
+ @f2-color: #F2F2F2;
3
+ @black-color: #323232;
4
+
5
+ .config-panel {
6
+ width: 350px;
7
+ min-width: 350px;
8
+ margin-top: -1px;
9
+ margin-right: -360px;
10
+ border: 1px solid @e9-color;
11
+ transition: margin-right 0.3s ease-out;
12
+ &.selected {
13
+ margin-right: 0;
14
+ }
15
+ }
16
+
17
+ .setting {
18
+ height: 100%;
19
+ .form {
20
+ flex-grow: 1;
21
+ height: 100%;
22
+ padding: 10px 0;
23
+ overflow-x: hidden;
24
+ overflow-y: auto;
25
+ background: #fff;
26
+ }
27
+ }
28
+
29
+ .no-margin-bottom {
30
+ margin-bottom: 0 !important;
31
+ }
32
+
33
+ .config-panel-form{
34
+ & > .border-bottom:last-child{
35
+ margin-bottom: 50px;
36
+ }
37
+ }
38
+
39
+ .border-bottom {
40
+ margin-bottom: 6px;
41
+ padding: 0 10px 12px;
42
+ border-bottom: 1px solid @e9-color;
43
+ &.inner-bottom-box{
44
+ margin: 0 -10px -13px;
45
+ }
46
+ &.inner-bottom-box:not(:first-child) {
47
+ margin-top: 18px;
48
+ }
49
+
50
+ .ant-form-item-with-help .ant-form-item-explain {
51
+ display: none;
52
+ }
53
+ .ant-input,
54
+ .ant-input-number,
55
+ .ant-input-number-status-error:not(.ant-input-number-disabled):not(.ant-input-number-borderless).ant-input-number,
56
+ .ant-input-number-status-error:not(.ant-input-number-disabled):not(.ant-input-number-borderless).ant-input-number:hover{
57
+ border-radius: 4px;
58
+ color: @black-color !important;
59
+ background: @f2-color !important;
60
+ }
61
+ .ant-picker,
62
+ .ant-picker:not([disabled]):hover,
63
+ .ant-picker-status-error.ant-picker, .ant-picker-status-error.ant-picker:not([disabled]):hover{
64
+ border-radius: 4px;
65
+ color: @black-color !important;
66
+ background: @f2-color !important;
67
+ }
68
+ .ant-form-item-has-error .ant-input-number:not([disabled]):hover,
69
+ .ant-form-item-has-error .ant-picker:not([disabled]):hover,
70
+ .ant-form-item-has-error .ant-select:not(.ant-select-disabled):not(.ant-select-customize-input) .ant-select-selector{
71
+ border-radius: 4px;
72
+ color: @black-color !important;
73
+ background: @f2-color !important;
74
+ }
75
+ .ant-select:not(.ant-select-customize-input) .ant-select-selector{
76
+ border-radius: 4px;
77
+ color: @black-color !important;
78
+ background: @f2-color !important;
79
+ }
80
+
81
+ .id-line{
82
+ margin-top: 5px;
83
+ text-align: right;
84
+ user-select: all;
85
+ }
86
+ }
87
+
88
+ .section-detail-select{
89
+ display: flex;
90
+ }
@@ -10,6 +10,9 @@ import React from 'react';
10
10
  import { DataUri } from '@antv/x6';
11
11
  import { content } from '@antv/x6/es/style/raw';
12
12
  import { useExperimentGraph } from "../../../packages/graph-canvas";
13
+ import saveSvg from "../../../assets/save.svg";
14
+ import cancelSvg from "../../../assets/cancel.svg";
15
+ import checkSvg from "../../../assets/check.svg";
13
16
  import { raw } from "../../../style/svgRaw";
14
17
  import "../../../style/position.less";
15
18
  import "./style.less";
@@ -49,6 +52,7 @@ var Index = function Index(props) {
49
52
  var _expGraph$graph3;
50
53
 
51
54
  expGraph === null || expGraph === void 0 ? void 0 : (_expGraph$graph3 = expGraph.graph) === null || _expGraph$graph3 === void 0 ? void 0 : _expGraph$graph3.toSVG(function (dataUri) {
55
+ // DataUri.downloadDataUri(DataUri.svgToDataUrl(dataUri), 'chart.svg');
52
56
  var img = new Image();
53
57
  img.src = DataUri.svgToDataUrl(dataUri);
54
58
 
@@ -166,7 +170,7 @@ var Index = function Index(props) {
166
170
  }, /*#__PURE__*/React.createElement("img", {
167
171
  alt: "",
168
172
  className: "header-btn-img",
169
- src: require("../../../assets/cancel.svg")
173
+ src: cancelSvg
170
174
  }), "\u53D6\u6D88"), /*#__PURE__*/React.createElement("span", {
171
175
  className: "header-btn",
172
176
  onClick: function onClick() {
@@ -175,7 +179,7 @@ var Index = function Index(props) {
175
179
  }, /*#__PURE__*/React.createElement("img", {
176
180
  alt: "",
177
181
  className: "header-btn-img",
178
- src: require("../../../assets/save.svg")
182
+ src: saveSvg
179
183
  }), "\u4FDD\u5B58"), isActive ? /*#__PURE__*/React.createElement("span", {
180
184
  className: "header-btn",
181
185
  style: {
@@ -187,7 +191,7 @@ var Index = function Index(props) {
187
191
  }, /*#__PURE__*/React.createElement("img", {
188
192
  alt: "",
189
193
  className: "header-btn-img",
190
- src: require("../../../assets/cancel.svg")
194
+ src: cancelSvg
191
195
  }), "\u505C\u7528") : /*#__PURE__*/React.createElement("span", {
192
196
  className: "header-btn",
193
197
  style: {
@@ -199,7 +203,7 @@ var Index = function Index(props) {
199
203
  }, /*#__PURE__*/React.createElement("img", {
200
204
  alt: "",
201
205
  className: "header-btn-img",
202
- src: require("../../../assets/check.svg")
206
+ src: checkSvg
203
207
  }), "\u542F\u7528"))));
204
208
  };
205
209
 
@@ -35,12 +35,16 @@ var NodeElement = function NodeElement(props) {
35
35
 
36
36
  var nodeId = activeNodeInstance && activeNodeInstance.id;
37
37
  var nodeFormData = typeof nodeData === 'string' ? JSON.parse(nodeData) : nodeData;
38
+ console.log('NodeElement', data);
38
39
  return /*#__PURE__*/React.createElement("div", {
39
40
  className: classNames('node-element', {
40
41
  selected: !!nodeId && nodeId === id
41
42
  })
42
43
  }, /*#__PURE__*/React.createElement(ReactSVG, {
43
44
  src: imgUrl,
45
+ beforeInjection: function beforeInjection(svg) {
46
+ svg.setAttribute('viewBox', '0 0 30 30');
47
+ },
44
48
  className: "icon"
45
49
  }), /*#__PURE__*/React.createElement("div", {
46
50
  className: "name"
@@ -25,9 +25,9 @@
25
25
  }
26
26
  }
27
27
  .icon {
28
- width: 20px;
29
- height: 20px;
30
- margin-right: 12px;
28
+ width: 20px !important;
29
+ height: 20px !important;
30
+ margin-right: 12px !important;
31
31
  svg {
32
32
  width: 20px;
33
33
  height: 20px;
@@ -15,6 +15,7 @@ import classNames from 'classnames';
15
15
  import { ReactSVG } from 'react-svg';
16
16
  import { useExperimentGraph } from "../../..";
17
17
  import { useObservableState } from "../../../../hooks/useObservableState";
18
+ import rhombus from "./images/rhombus.svg";
18
19
  import "./condition-element.less";
19
20
 
20
21
  var ConditionElement = function ConditionElement(props) {
@@ -40,13 +41,22 @@ var ConditionElement = function ConditionElement(props) {
40
41
  selected: !!nodeId && nodeId === id
41
42
  })
42
43
  }, /*#__PURE__*/React.createElement(ReactSVG, {
43
- src: require("./images/rhombus.svg"),
44
- className: classNames('node-rhombus-element-bg')
44
+ src: rhombus,
45
+ className: classNames('node-rhombus-element-bg'),
46
+ beforeInjection: function beforeInjection(svg) {
47
+ svg.setAttribute('width', '259px');
48
+ svg.setAttribute('height', '110px'); // svg.setAttribute('viewBox', '0 0 120 800');
49
+ }
45
50
  }), /*#__PURE__*/React.createElement("div", {
46
51
  className: "rhombus-inner"
47
52
  }, /*#__PURE__*/React.createElement(ReactSVG, {
48
53
  src: imgUrl,
49
- className: "icon"
54
+ className: "icon",
55
+ beforeInjection: function beforeInjection(svg) {
56
+ svg.setAttribute('width', '10px');
57
+ svg.setAttribute('height', '10px');
58
+ svg.setAttribute('viewBox', '0 0 30 30');
59
+ }
50
60
  }), /*#__PURE__*/React.createElement("div", {
51
61
  className: "name"
52
62
  }, (nodeFormData === null || nodeFormData === void 0 ? void 0 : nodeFormData.realName) || name)));
@@ -37,13 +37,13 @@
37
37
  &.selected,
38
38
  &:hover {
39
39
  .node-rhombus-element-bg{
40
- svg path {
40
+ div svg path {
41
41
  fill: @node-element-primary-color;
42
42
  }
43
43
  }
44
44
  .icon {
45
- svg path {
46
- fill: #fff;
45
+ div svg path {
46
+ fill: #fff !important;
47
47
  }
48
48
  }
49
49
  .name {
@@ -54,12 +54,12 @@
54
54
  .icon {
55
55
  width: 20px;
56
56
  height: 20px;
57
- margin-right: 12px;
57
+ margin-right: 12px !important;
58
58
  svg {
59
59
  width: 20px;
60
60
  height: 20px;
61
61
  path {
62
- fill: @node-element-primary-color;
62
+ fill: @node-element-primary-color !important;
63
63
  }
64
64
  }
65
65
  }
@@ -1,8 +1,5 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" width="24.744" height="31.16" viewBox="0 0 24.744 31.16">
2
- <defs>
3
- <style>.a{fill:#595959;}</style>
4
- </defs>
5
- <path class="a" d="M46.413,18.491V16.044a5.769,5.769,0,0,0-1.6-4.286,5.734,5.734,0,0,0-4.189-1.57,5.251,5.251,0,0,0-3.955,1.6,5.925,5.925,0,0,0-1.505,4.255v2.446H33.975V15.118a5.507,5.507,0,0,1,.493-2.34,6.22,6.22,0,0,1,1.4-1.949,6.7,6.7,0,0,1,2.141-1.338A7.431,7.431,0,0,1,40.755,9a6.645,6.645,0,0,1,2.5.487,7.207,7.207,0,0,1,2.167,1.356,6.658,6.658,0,0,1,1.488,1.974,5.076,5.076,0,0,1,.524,2.3v3.373Z" transform="translate(-28.35 -7.51)"></path>
6
- <path class="a" d="M33.245,0a8.872,8.872,0,0,0-3.291.6A8.147,8.147,0,0,0,27.34,2.233,7.665,7.665,0,0,0,25.6,4.648a7.026,7.026,0,0,0-.628,2.961v4.863h4.168V8.534a4.48,4.48,0,0,1,1.092-3.225,3.8,3.8,0,0,1,2.878-1.141,4.282,4.282,0,0,1,3.143,1.141,4.325,4.325,0,0,1,1.158,3.225v3.936h4V7.608a6.6,6.6,0,0,0-.678-2.961,8.107,8.107,0,0,0-1.819-2.415A8.656,8.656,0,0,0,36.3.6a8.087,8.087,0,0,0-3.06-.6" transform="translate(-20.84)"></path>
7
- <path class="a" d="M21.764,90.293v9.458a1.457,1.457,0,0,1-.1.554,1.351,1.351,0,0,1-.266.429,1,1,0,0,1-.332.231,1.048,1.048,0,0,1-.427.074H3.937a.962.962,0,0,1-.388-.064.936.936,0,0,1-.3-.2.913.913,0,0,1-.186-.307,1.315,1.315,0,0,1-.081-.481V90.293H21.764m.8-2.98H2.15a2.047,2.047,0,0,0-1.522.645A2.128,2.128,0,0,0,0,89.5V99.982a4.273,4.273,0,0,0,.281,1.555,3.846,3.846,0,0,0,3.655,2.481H20.642a3.945,3.945,0,0,0,2.928-1.24,4.311,4.311,0,0,0,.86-1.356,4.412,4.412,0,0,0,.314-1.67V89.5a2.2,2.2,0,0,0-2.183-2.183" transform="translate(0 -72.858)"></path>
8
- </svg>
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="24.744" height="31.16" viewBox="0 0 24.744 31.16">
2
+ <path fill="#595959" d="M46.413,18.491V16.044a5.769,5.769,0,0,0-1.6-4.286,5.734,5.734,0,0,0-4.189-1.57,5.251,5.251,0,0,0-3.955,1.6,5.925,5.925,0,0,0-1.505,4.255v2.446H33.975V15.118a5.507,5.507,0,0,1,.493-2.34,6.22,6.22,0,0,1,1.4-1.949,6.7,6.7,0,0,1,2.141-1.338A7.431,7.431,0,0,1,40.755,9a6.645,6.645,0,0,1,2.5.487,7.207,7.207,0,0,1,2.167,1.356,6.658,6.658,0,0,1,1.488,1.974,5.076,5.076,0,0,1,.524,2.3v3.373Z" transform="translate(-28.35 -7.51)"></path>
3
+ <path fill="#595959" d="M33.245,0a8.872,8.872,0,0,0-3.291.6A8.147,8.147,0,0,0,27.34,2.233,7.665,7.665,0,0,0,25.6,4.648a7.026,7.026,0,0,0-.628,2.961v4.863h4.168V8.534a4.48,4.48,0,0,1,1.092-3.225,3.8,3.8,0,0,1,2.878-1.141,4.282,4.282,0,0,1,3.143,1.141,4.325,4.325,0,0,1,1.158,3.225v3.936h4V7.608a6.6,6.6,0,0,0-.678-2.961,8.107,8.107,0,0,0-1.819-2.415A8.656,8.656,0,0,0,36.3.6a8.087,8.087,0,0,0-3.06-.6" transform="translate(-20.84)"></path>
4
+ <path fill="#595959" d="M21.764,90.293v9.458a1.457,1.457,0,0,1-.1.554,1.351,1.351,0,0,1-.266.429,1,1,0,0,1-.332.231,1.048,1.048,0,0,1-.427.074H3.937a.962.962,0,0,1-.388-.064.936.936,0,0,1-.3-.2.913.913,0,0,1-.186-.307,1.315,1.315,0,0,1-.081-.481V90.293H21.764m.8-2.98H2.15a2.047,2.047,0,0,0-1.522.645A2.128,2.128,0,0,0,0,89.5V99.982a4.273,4.273,0,0,0,.281,1.555,3.846,3.846,0,0,0,3.655,2.481H20.642a3.945,3.945,0,0,0,2.928-1.24,4.311,4.311,0,0,0,.86-1.356,4.412,4.412,0,0,0,.314-1.67V89.5a2.2,2.2,0,0,0-2.183-2.183" transform="translate(0 -72.858)"></path>
5
+ </svg>
@@ -1,8 +1,5 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" width="33.008" height="31.16" viewBox="0 0 33.008 31.16">
2
- <defs>
3
- <style>.a{fill:#595959;}</style>
4
- </defs>
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="33" height="33" viewBox="0 0 33 33">
5
2
  <g transform="translate(-1.496 -1.733)">
6
- <path class="a" d="M30.765,26.483V35.9a1.557,1.557,0,0,1-.1.582,1,1,0,0,1-.579.612,1.028,1.028,0,0,1-.419.072h-16.7a1.118,1.118,0,0,1-.431-.068.878.878,0,0,1-.293-.194.756.756,0,0,1-.166-.266,1.3,1.3,0,0,1-.08-.473V26.483H30.765M33.822,9a8.852,8.852,0,0,0-3.284.594,8.126,8.126,0,0,0-2.608,1.634A7.593,7.593,0,0,0,26.2,13.655a7.123,7.123,0,0,0-.627,2.971v4.951h4.159V17.55a4.529,4.529,0,0,1,1.089-3.235A3.763,3.763,0,0,1,33.69,13.16a4.294,4.294,0,0,1,3.152,1.155,4.337,4.337,0,0,1,1.172,3.235v3.961h3.994V16.626a6.551,6.551,0,0,0-.693-2.971,8.251,8.251,0,0,0-1.832-2.426,8.633,8.633,0,0,0-2.608-1.634A8.069,8.069,0,0,0,33.822,9M31.578,23.492H11.146A2.17,2.17,0,0,0,9,25.67v10.5a4.269,4.269,0,0,0,.281,1.551,3.741,3.741,0,0,0,.809,1.271,3.853,3.853,0,0,0,1.254.858,4.039,4.039,0,0,0,1.617.314h16.7a3.98,3.98,0,0,0,1.634-.33,3.987,3.987,0,0,0,2.145-2.244,4.535,4.535,0,0,0,.313-1.683V25.67a2.142,2.142,0,0,0-2.179-2.179" transform="translate(-7.504 -7.268)"></path>
3
+ <path fill="#595959" d="M30.765,26.483V35.9a1.557,1.557,0,0,1-.1.582,1,1,0,0,1-.579.612,1.028,1.028,0,0,1-.419.072h-16.7a1.118,1.118,0,0,1-.431-.068.878.878,0,0,1-.293-.194.756.756,0,0,1-.166-.266,1.3,1.3,0,0,1-.08-.473V26.483H30.765M33.822,9a8.852,8.852,0,0,0-3.284.594,8.126,8.126,0,0,0-2.608,1.634A7.593,7.593,0,0,0,26.2,13.655a7.123,7.123,0,0,0-.627,2.971v4.951h4.159V17.55a4.529,4.529,0,0,1,1.089-3.235A3.763,3.763,0,0,1,33.69,13.16a4.294,4.294,0,0,1,3.152,1.155,4.337,4.337,0,0,1,1.172,3.235v3.961h3.994V16.626a6.551,6.551,0,0,0-.693-2.971,8.251,8.251,0,0,0-1.832-2.426,8.633,8.633,0,0,0-2.608-1.634A8.069,8.069,0,0,0,33.822,9M31.578,23.492H11.146A2.17,2.17,0,0,0,9,25.67v10.5a4.269,4.269,0,0,0,.281,1.551,3.741,3.741,0,0,0,.809,1.271,3.853,3.853,0,0,0,1.254.858,4.039,4.039,0,0,0,1.617.314h16.7a3.98,3.98,0,0,0,1.634-.33,3.987,3.987,0,0,0,2.145-2.244,4.535,4.535,0,0,0,.313-1.683V25.67a2.142,2.142,0,0,0-2.179-2.179" transform="translate(-7.504 -7.268)"></path>
7
4
  </g>
8
- </svg>
5
+ </svg>
@@ -15,16 +15,24 @@ import classNames from 'classnames';
15
15
  import { ReactSVG } from 'react-svg';
16
16
  import { useExperimentGraph } from "../../..";
17
17
  import { useObservableState } from "../../../../hooks/useObservableState";
18
+ import { COMMONLY_USED } from "../../../node-types";
19
+ import ORSvg from "./images/OR.svg";
20
+ import ANDSvg from "./images/AND.svg";
21
+ import XORSvg from "./images/XOR.svg";
22
+ import lockingSvg from "./images/locking.svg";
23
+ import unlockSvg from "./images/unlock.svg";
18
24
  import "./logical-element.less";
19
25
  var operatorUrl = {
20
- '|': require("./images/OR.svg"),
21
- '&': require("./images/AND.svg"),
22
- '^': require("./images/XOR.svg"),
23
- LOCK: require("./images/locking.svg"),
24
- UNLOCK: require("./images/unlock.svg")
26
+ '|': ORSvg,
27
+ '&': ANDSvg,
28
+ '^': XORSvg,
29
+ LOCK: lockingSvg,
30
+ UNLOCK: unlockSvg
25
31
  };
26
32
 
27
33
  var LogicalElement = function LogicalElement(props) {
34
+ var _data$id, _data$id$split;
35
+
28
36
  var node = props.node,
29
37
  experimentId = props.experimentId;
30
38
  var data = (node === null || node === void 0 ? void 0 : node.getData()) || {};
@@ -41,13 +49,27 @@ var LogicalElement = function LogicalElement(props) {
41
49
  activeNodeInstance = _useObservableState2[0];
42
50
 
43
51
  var nodeId = activeNodeInstance && activeNodeInstance.id;
52
+ var nodeType = data === null || data === void 0 ? void 0 : (_data$id = data.id) === null || _data$id === void 0 ? void 0 : (_data$id$split = _data$id.split('-')) === null || _data$id$split === void 0 ? void 0 : _data$id$split[0];
53
+ console.log('operatorxxxxxx666', nodeType, operator, data);
44
54
  return /*#__PURE__*/React.createElement("div", {
45
55
  className: classNames('logical-element', {
46
56
  selected: !!nodeId && nodeId === id
47
57
  })
48
58
  }, /*#__PURE__*/React.createElement(ReactSVG, {
49
59
  src: operator ? (operatorUrl === null || operatorUrl === void 0 ? void 0 : operatorUrl[operator]) || imgUrl : imgUrl,
50
- className: "icon"
60
+ className: "icon",
61
+ style: {
62
+ marginLeft: operator === 'UNLOCK' ? 4 : 0
63
+ },
64
+ beforeInjection: function beforeInjection(svg) {
65
+ if (nodeType === COMMONLY_USED.LOCKED) {
66
+ svg.setAttribute('width', operator === 'UNLOCK' ? '35px' : '25px');
67
+ svg.setAttribute('height', operator === 'UNLOCK' ? '35px' : '30px');
68
+ svg.setAttribute('viewBox', operator === 'UNLOCK' ? '0 0 35 35' : '0 0 25 30');
69
+ } else {
70
+ svg.setAttribute('viewBox', '0 0 28 28');
71
+ }
72
+ }
51
73
  }));
52
74
  };
53
75