@riil-frontend/component-topology 6.0.0-alpha.8 → 6.0.0-alpha.9

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 (53) hide show
  1. package/build/1.js +2 -2
  2. package/build/2.js +1 -1
  3. package/build/index.css +1 -1
  4. package/build/index.js +21 -21
  5. package/es/core/common/icons/useIcons.js +7 -1
  6. package/es/core/editor/components/Sidebar/views/CanvasPanel/CanvasPanel.js +13 -18
  7. package/es/core/editor/components/Toolbar/EditorToolbar.js +16 -9
  8. package/es/core/editor/components/Toolbar/buttons.js +20 -18
  9. package/es/core/editor/components/Toolbar/widgets/AddResourceButton.js +2 -2
  10. package/es/core/editor/components/Toolbar/widgets/EdgeTypeButton/EdgeType.js +25 -8
  11. package/es/core/editor/components/Toolbar/widgets/EdgeTypeButton/EdgeType.module.scss +1 -3
  12. package/es/core/editor/components/Toolbar/widgets/EdgeTypeButton/LineType.js +14 -5
  13. package/es/core/editor/components/Toolbar/widgets/HistoryRedoButton.js +1 -1
  14. package/es/core/editor/components/Toolbar/widgets/HistoryUndoButton.js +2 -2
  15. package/es/core/editor/components/Toolbar/widgets/IconSelect/IconSelect.js +109 -0
  16. package/es/core/editor/components/Toolbar/widgets/IconSelect/constant.js +64 -0
  17. package/es/core/editor/components/Toolbar/widgets/IconSelect/index.js +101 -0
  18. package/es/core/editor/components/Toolbar/widgets/IconSelect/index.module.scss +151 -0
  19. package/es/core/editor/components/Toolbar/widgets/IconSelect/popUpContent.js +50 -0
  20. package/es/core/editor/components/Toolbar/widgets/NodeImageButton/BoxBackgroundSetting.js +14 -4
  21. package/es/core/editor/components/Toolbar/widgets/NodeImageButton/NodeImageButton.js +36 -6
  22. package/es/core/editor/components/Toolbar/widgets/NodeSizeButton/NodeSizeButton.js +87 -8
  23. package/es/core/editor/components/settings/common/NodeSizeInput/NodeSizeInput.js +3 -3
  24. package/es/core/editor/components/settings/common/SizeInput/NodeSizeInput.js +10 -6
  25. package/es/core/editor/components/settings/common/SizeInput/NodeSizeNumberPicker.js +7 -6
  26. package/es/core/editor/components/settings/propertyViews/multipleElements/BatchSetNodeSize/BatchSetNodeSize.js +8 -9
  27. package/es/core/editor/components/settings/propertyViews/view/BatchSetNodeSize.js +9 -6
  28. package/es/core/models/TopoApp.js +1 -1
  29. package/lib/core/common/icons/useIcons.js +7 -1
  30. package/lib/core/editor/components/Sidebar/views/CanvasPanel/CanvasPanel.js +13 -18
  31. package/lib/core/editor/components/Toolbar/EditorToolbar.js +14 -7
  32. package/lib/core/editor/components/Toolbar/buttons.js +21 -20
  33. package/lib/core/editor/components/Toolbar/widgets/AddResourceButton.js +2 -2
  34. package/lib/core/editor/components/Toolbar/widgets/EdgeTypeButton/EdgeType.js +25 -8
  35. package/lib/core/editor/components/Toolbar/widgets/EdgeTypeButton/EdgeType.module.scss +1 -3
  36. package/lib/core/editor/components/Toolbar/widgets/EdgeTypeButton/LineType.js +15 -5
  37. package/lib/core/editor/components/Toolbar/widgets/HistoryRedoButton.js +1 -1
  38. package/lib/core/editor/components/Toolbar/widgets/HistoryUndoButton.js +2 -2
  39. package/lib/core/editor/components/Toolbar/widgets/IconSelect/IconSelect.js +126 -0
  40. package/lib/core/editor/components/Toolbar/widgets/IconSelect/constant.js +69 -0
  41. package/lib/core/editor/components/Toolbar/widgets/IconSelect/index.js +117 -0
  42. package/lib/core/editor/components/Toolbar/widgets/IconSelect/index.module.scss +151 -0
  43. package/lib/core/editor/components/Toolbar/widgets/IconSelect/popUpContent.js +62 -0
  44. package/lib/core/editor/components/Toolbar/widgets/NodeImageButton/BoxBackgroundSetting.js +20 -4
  45. package/lib/core/editor/components/Toolbar/widgets/NodeImageButton/NodeImageButton.js +35 -5
  46. package/lib/core/editor/components/Toolbar/widgets/NodeSizeButton/NodeSizeButton.js +87 -7
  47. package/lib/core/editor/components/settings/common/NodeSizeInput/NodeSizeInput.js +2 -2
  48. package/lib/core/editor/components/settings/common/SizeInput/NodeSizeInput.js +11 -7
  49. package/lib/core/editor/components/settings/common/SizeInput/NodeSizeNumberPicker.js +6 -6
  50. package/lib/core/editor/components/settings/propertyViews/multipleElements/BatchSetNodeSize/BatchSetNodeSize.js +6 -8
  51. package/lib/core/editor/components/settings/propertyViews/view/BatchSetNodeSize.js +7 -5
  52. package/lib/core/models/TopoApp.js +1 -1
  53. package/package.json +2 -2
@@ -0,0 +1,151 @@
1
+ @import "@alifd/next/variables";
2
+
3
+ .TopoIconSelect {
4
+
5
+
6
+ .iconSelect {}
7
+
8
+
9
+
10
+ }
11
+
12
+ .iconCollapse {
13
+ width: 240px;
14
+ max-height: 218px;
15
+ overflow-y: auto;
16
+
17
+ :global {
18
+ .#{$css-prefix}collapse-panel-expanded {
19
+ .#{$css-prefix}collapse-panel-content {
20
+ padding: 0px 0px 5px 0px;
21
+ }
22
+ }
23
+
24
+ .#{$css-prefix}collapse-panel {
25
+ border-top: none;
26
+ background-color: #FFF;
27
+ }
28
+
29
+ .#{$css-prefix}collapse-panel-title {
30
+ background: none;
31
+ font-size: 12px;
32
+ font-family: PingFangSC-Medium, PingFang SC;
33
+ font-weight: 500;
34
+ color: #4D6277;
35
+ line-height: 17px;
36
+ }
37
+
38
+ .#{$css-prefix}collapse-panel:not(:first-child) {
39
+ border-top: none;
40
+ }
41
+
42
+ .#{$css-prefix}collapse-panel-content {
43
+ padding: 0px 0px 5px 0px;
44
+ }
45
+ }
46
+ }
47
+
48
+ .iconSelect {
49
+ width: 100%;
50
+
51
+ .selected {
52
+ height: 26px;
53
+ display: block;
54
+
55
+ .iconImgWrapper {
56
+ display: inline-block;
57
+ width: 18px;
58
+ height: 18px;
59
+ line-height: 18px;
60
+ text-align: center;
61
+ // vertical-align: middle;
62
+ }
63
+
64
+ .iconImg {
65
+ display: inline-block;
66
+ width: auto;
67
+ height: auto;
68
+ max-width: 18px;
69
+ max-height: 18px;
70
+ vertical-align: middle;
71
+ }
72
+
73
+ .icontitle {
74
+ text-align: left;
75
+ vertical-align: top;
76
+ display: inline-block;
77
+ font-size: 12px;
78
+ font-family: PingFangSC-Regular, PingFang SC;
79
+ font-weight: 400;
80
+ color: #4D6277;
81
+ //margin-top: 2px;
82
+ line-height: 26px;
83
+ margin-left: 7px;
84
+ }
85
+
86
+ :global {
87
+ .#{$css-prefix}tag {
88
+ background: none;
89
+ }
90
+ }
91
+ }
92
+ }
93
+
94
+
95
+
96
+ .collPanel {
97
+ padding: 5px;
98
+ }
99
+
100
+
101
+
102
+
103
+ .iconli {
104
+ width: 52px;
105
+ height: 68px;
106
+ text-align: center;
107
+ border: 2px solid #FFF;
108
+ overflow: hidden;
109
+ cursor: pointer;
110
+
111
+ .iconImgWrapper {
112
+ width: 32px;
113
+ height: 32px;
114
+ line-height: 32px;
115
+ text-align: center;
116
+ margin: 5px 8px 5px 8px;
117
+ }
118
+
119
+ .iconImg {
120
+ display: inline-block;
121
+ width: auto;
122
+ height: auto;
123
+ max-width: 32px;
124
+ max-height: 32px;
125
+ vertical-align: middle;
126
+ }
127
+
128
+ .icontitle {
129
+ width: 48px;
130
+ max-width: 50px;
131
+ text-align: center;
132
+ font-size: 12px;
133
+ -webkit-text-size-adjust: none;
134
+ display: block;
135
+ white-space: nowrap;
136
+ text-overflow: ellipsis;
137
+ overflow: hidden;
138
+ font-family: PingFangSC-Regular, PingFang SC;
139
+ font-weight: 400;
140
+ color: #4D6277;
141
+ line-height: 11px;
142
+ }
143
+
144
+
145
+ // float: left;
146
+ }
147
+
148
+ .selectedTag {
149
+ border-radius: 4px;
150
+ border: 2px solid #4C89FF;
151
+ }
@@ -0,0 +1,50 @@
1
+ import _Box from "@alifd/next/es/box";
2
+ import _Collapse from "@alifd/next/es/collapse";
3
+ import React from 'react';
4
+ import styles from "./index.module.scss";
5
+ var Panel = _Collapse.Panel;
6
+
7
+ function PopUpContent(props) {
8
+ var iconList = props.iconList,
9
+ onChange = props.onChange,
10
+ selectedId = props.selectedId;
11
+
12
+ var itemOnClick = function itemOnClick(e) {
13
+ onChange(e);
14
+ };
15
+
16
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_Collapse, {
17
+ className: styles.iconCollapse,
18
+ defaultExpandedKeys: [0]
19
+ }, iconList.map(function (item, index) {
20
+ return /*#__PURE__*/React.createElement(Panel, {
21
+ title: item.name,
22
+ key: index,
23
+ className: styles.collPanel
24
+ }, /*#__PURE__*/React.createElement(_Box, {
25
+ spacing: 4,
26
+ direction: "row",
27
+ wrap: true
28
+ }, item.icons.map(function (icon, idx) {
29
+ return /*#__PURE__*/React.createElement("div", {
30
+ key: idx,
31
+ className: styles.iconli + " " + (selectedId === icon.id ? styles.selectedTag : ''),
32
+ onClick: function onClick() {
33
+ itemOnClick(icon);
34
+ },
35
+ title: icon.name
36
+ }, /*#__PURE__*/React.createElement("div", {
37
+ className: styles.iconImgWrapper
38
+ }, /*#__PURE__*/React.createElement("img", {
39
+ className: styles.iconImg,
40
+ alt: "",
41
+ src: icon.url,
42
+ size: "xxl"
43
+ })), /*#__PURE__*/React.createElement("span", {
44
+ className: styles.icontitle
45
+ }, icon.name));
46
+ })));
47
+ })));
48
+ }
49
+
50
+ export default PopUpContent;
@@ -1,8 +1,18 @@
1
- import React from 'react';
1
+ import React, { useEffect, useState, forwardRef, useImperativeHandle } from "react";
2
+ import TopoIconSelect from "../IconSelect";
3
+ import { useNodeIcons } from "../../../../../common/icons/useIcons";
2
4
 
3
- function BoxBackgroundSetting(props) {
4
- // const { } = props
5
- return /*#__PURE__*/React.createElement("div", null, "xxx");
5
+ function BoxBackgroundSetting(props, ref) {
6
+ var value = props.value,
7
+ onChange = props.onChange,
8
+ topo = props.topo;
9
+ useEffect(function () {}, []);
10
+ var icons = useNodeIcons(topo);
11
+ return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(TopoIconSelect, {
12
+ value: value,
13
+ iconList: icons,
14
+ onChange: onChange
15
+ }));
6
16
  }
7
17
 
8
18
  export default BoxBackgroundSetting;
@@ -1,13 +1,13 @@
1
1
  import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
2
2
  var _excluded = ["topo", "showLabel"];
3
- import React, { useEffect, useState } from 'react';
3
+ import React, { useEffect, useState } from "react";
4
4
  import DropdownButton from "../components/DropdownButton";
5
5
  import WidgetBox from "../WidgetBox";
6
6
  import BoxBackgroundSetting from "./BoxBackgroundSetting";
7
7
  /**
8
8
  * 替换图片设置
9
- * @param {*} props
10
- * @returns
9
+ * @param {*} props
10
+ * @returns
11
11
  */
12
12
 
13
13
  function NodeImageButton(props) {
@@ -17,13 +17,41 @@ function NodeImageButton(props) {
17
17
 
18
18
  var _useState = useState(true),
19
19
  disabled = _useState[0],
20
- setDisabled = _useState[1]; // 选中的元素
20
+ setDisabled = _useState[1];
21
+
22
+ var _useState2 = useState(),
23
+ imgVal = _useState2[0],
24
+ setImgVal = _useState2[1]; // 选中的元素
21
25
 
22
26
 
23
27
  var selection = topo.selectionManager.useSelection();
24
28
  useEffect(function () {
25
- setDisabled(false);
29
+ console.log("NodeImageButton-selection", selection);
30
+
31
+ if (selection && selection.length > 0) {
32
+ setDisabled(false);
33
+ setImgVal(selection[0].image);
34
+ } else {
35
+ setDisabled(true);
36
+ }
26
37
  }, [selection]);
38
+
39
+ var onChange = function onChange(prop) {
40
+ console.log("onChange-prop", prop, selection); //const { name, value } = prop;
41
+ // const gv = topo.view.topoClient.getGraphView();
42
+ //const element = topo.getSelectionModel().getFirstData();
43
+
44
+ var elements = topo.getSelectionModel();
45
+ console.log("onChange-elements", elements);
46
+ elements.each(function (element) {
47
+ element.setImage(prop);
48
+ }); // selection.map((element) => {
49
+ // element.setImage(prop);
50
+ // });
51
+ // if (name === "image") {
52
+ // }
53
+ };
54
+
27
55
  var icon = disabled ? /*#__PURE__*/React.createElement("img", {
28
56
  src: "/img/topo/editor/toolbar/\u66FF\u6362\u56FE\u7247/Disable.svg",
29
57
  alt: ""
@@ -39,7 +67,9 @@ function NodeImageButton(props) {
39
67
  disabled: disabled,
40
68
  trigger: icon
41
69
  }, /*#__PURE__*/React.createElement(BoxBackgroundSetting, {
42
- topo: topo
70
+ topo: topo,
71
+ onChange: onChange,
72
+ value: imgVal
43
73
  })));
44
74
  }
45
75
 
@@ -1,13 +1,16 @@
1
1
  import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
2
2
  var _excluded = ["topo", "showLabel"];
3
- import React, { useEffect, useState } from 'react';
4
- import BatchSetNodeSize from "../../../settings/propertyViews/view/BatchSetNodeSize";
3
+ import React, { useEffect, useState } from "react"; // import BatchSetNodeSize from "../../../settings/propertyViews/view/BatchSetNodeSize";
4
+
5
+ import BatchSetNodeSize from "../../../settings/propertyViews/multipleElements/BatchSetNodeSize/BatchSetNodeSize";
6
+ import NodeSizeInput from "../../../settings/common/NodeSizeInput/NodeSizeInput";
7
+ import useSettingRuntimeState from "../../../settings/useSettingRuntimeState";
5
8
  import WidgetBox from "../WidgetBox";
6
9
  import BoxBackgroundSetting from "./BoxBackgroundSetting";
7
10
  /**
8
11
  * 图片尺寸设置
9
- * @param {*} props
10
- * @returns
12
+ * @param {*} props
13
+ * @returns
11
14
  */
12
15
 
13
16
  function NodeSizeButton(props) {
@@ -17,13 +20,49 @@ function NodeSizeButton(props) {
17
20
 
18
21
  var _useState = useState(true),
19
22
  disabled = _useState[0],
20
- setDisabled = _useState[1]; // 选中的元素
23
+ setDisabled = _useState[1];
24
+
25
+ var _useState2 = useState(),
26
+ size = _useState2[0],
27
+ setSize = _useState2[1]; // 选中的元素
21
28
 
22
29
 
23
30
  var selection = topo.selectionManager.useSelection();
31
+ var settingRuntimeState = useSettingRuntimeState();
24
32
  useEffect(function () {
25
- setDisabled(false);
33
+ if (selection && selection.length > 0) {
34
+ console.log("NodeSizeButton-selection", selection);
35
+ setDisabled(false);
36
+
37
+ if (selection.length === 1) {
38
+ setSize({
39
+ width: selection[0].width,
40
+ height: selection[0].height
41
+ });
42
+ }
43
+ } else {
44
+ setDisabled(true);
45
+ setSize({
46
+ width: null,
47
+ height: null
48
+ });
49
+ }
26
50
  }, [selection]);
51
+
52
+ var _onChange = function onChange(prop) {
53
+ console.log("onChange-prop", prop);
54
+ var name = prop.name,
55
+ value = prop.value;
56
+ var gv = topo.view.topoClient.getGraphView();
57
+ var element = topo.getSelectionModel().getFirstData();
58
+
59
+ if (name === "width") {
60
+ element.setWidth(value);
61
+ } else if (name === "height") {
62
+ element.setHeight(value);
63
+ }
64
+ };
65
+
27
66
  return /*#__PURE__*/React.createElement(WidgetBox, {
28
67
  label: "\u56FE\u7247\u5C3A\u5BF8",
29
68
  tooltip: "\u56FE\u7247\u5C3A\u5BF8",
@@ -32,11 +71,51 @@ function NodeSizeButton(props) {
32
71
  style: {
33
72
  width: 136
34
73
  }
35
- }, /*#__PURE__*/React.createElement(BatchSetNodeSize, {
74
+ }, selection.length > 1 ? /*#__PURE__*/React.createElement(BatchSetNodeSize, {
36
75
  topo: topo,
37
76
  size: "small",
77
+ value: size,
78
+ disabled: disabled,
38
79
  showLabel: false,
39
- hasTrigger: false
80
+ hasTrigger: false,
81
+ onChange: function onChange(size) {
82
+ topo.historyManager.beginTransaction();
83
+
84
+ _onChange({
85
+ name: "width",
86
+ value: size.width
87
+ });
88
+
89
+ _onChange({
90
+ name: "height",
91
+ value: size.height
92
+ });
93
+
94
+ topo.historyManager.endTransaction();
95
+ }
96
+ }) : /*#__PURE__*/React.createElement(NodeSizeInput, {
97
+ topo: topo,
98
+ size: "small",
99
+ value: size,
100
+ disabled: disabled,
101
+ showLabel: false,
102
+ hasTrigger: false,
103
+ settingRuntimeState: settingRuntimeState,
104
+ onChange: function onChange(size) {
105
+ topo.historyManager.beginTransaction();
106
+
107
+ _onChange({
108
+ name: "width",
109
+ value: size.width
110
+ });
111
+
112
+ _onChange({
113
+ name: "height",
114
+ value: size.height
115
+ });
116
+
117
+ topo.historyManager.endTransaction();
118
+ }
40
119
  })));
41
120
  }
42
121
 
@@ -1,7 +1,7 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import React, { useState } from 'react';
3
3
  import PropTypes from 'prop-types';
4
- import rlog from "@riil-frontend/component-topology-utils/es/rlog";
4
+ import rlog from '@riil-frontend/component-topology-utils/es/rlog';
5
5
  import SizeInput from "../SizeInput";
6
6
  var NODE_SIZE_LOCK = 'NODE_SIZE_LOCK';
7
7
  /**
@@ -103,14 +103,14 @@ function NodeSizeInput(props) {
103
103
  return val ? Math.round(val) : val;
104
104
  }
105
105
 
106
- return /*#__PURE__*/React.createElement(SizeInput, {
106
+ return /*#__PURE__*/React.createElement(SizeInput, _extends({}, props, {
107
107
  value: value,
108
108
  lock: lock,
109
109
  max: max,
110
110
  step: step,
111
111
  onChange: handleChange,
112
112
  onLockChange: switchLock
113
- });
113
+ }));
114
114
  }
115
115
 
116
116
  NodeSizeInput.propTypes = {
@@ -4,9 +4,9 @@ import _Grid from "@alifd/next/es/grid";
4
4
  import _Form from "@alifd/next/es/form";
5
5
  import React, { useState } from 'react';
6
6
  import PropTypes from 'prop-types';
7
+ import rlog from '@riil-frontend/component-topology-utils/es/rlog';
7
8
  import NodeSizeNumberPicker from "./NodeSizeNumberPicker";
8
9
  import styles from "./NodeSizeInput.module.scss";
9
- import rlog from "@riil-frontend/component-topology-utils/es/rlog";
10
10
  var FormItem = _Form.Item;
11
11
  var Row = _Grid.Row,
12
12
  Col = _Grid.Col;
@@ -22,12 +22,13 @@ function SizeInput(props) {
22
22
  max = props.max,
23
23
  step = props.step,
24
24
  onChange = props.onChange,
25
- lock = props.lock,
26
- onLockChange = props.onLockChange,
27
25
  _props$showLabel = props.showLabel,
28
26
  showLabel = _props$showLabel === void 0 ? true : _props$showLabel,
29
27
  hasTrigger = props.hasTrigger,
30
- size = props.size;
28
+ size = props.size,
29
+ lock = props.lock,
30
+ disabled = props.disabled,
31
+ onLockChange = props.onLockChange;
31
32
 
32
33
  var handleChange = function handleChange(name, attrValue) {
33
34
  var _extends2;
@@ -69,9 +70,11 @@ function SizeInput(props) {
69
70
  }, /*#__PURE__*/React.createElement(NodeSizeNumberPicker, {
70
71
  value: parseValue(value.width),
71
72
  label: showLabel ? '宽:' : '',
73
+ innerAfter: showLabel ? undefined : 'W',
72
74
  min: 1,
73
75
  max: max,
74
76
  step: step,
77
+ disabled: disabled,
75
78
  placeholder: "\u8BF7\u8F93\u5165",
76
79
  size: size,
77
80
  hasTrigger: hasTrigger,
@@ -99,11 +102,12 @@ function SizeInput(props) {
99
102
  }
100
103
  }, /*#__PURE__*/React.createElement(NodeSizeNumberPicker, {
101
104
  value: parseValue(value.height),
102
- label: showLabel ? '高:' : '' // addonTextAfter="H"
103
- ,
105
+ label: showLabel ? '高:' : '',
106
+ innerAfter: showLabel ? undefined : 'H',
104
107
  min: 1,
105
108
  max: max,
106
109
  step: step,
110
+ disabled: disabled,
107
111
  placeholder: "\u8BF7\u8F93\u5165",
108
112
  size: size,
109
113
  hasTrigger: hasTrigger,
@@ -1,8 +1,8 @@
1
1
  import _NumberPicker from "@alifd/next/es/number-picker";
2
2
  import _extends from "@babel/runtime/helpers/extends";
3
3
  import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
4
- var _excluded = ["value", "onChange", "min", "onBlur", "onKeyDown"];
5
- import React, { useState, useEffect } from 'react';
4
+ var _excluded = ["value", "onChange", "min", "onBlur", "onKeyDown", "disabled"];
5
+ import React, { useState, useEffect } from "react";
6
6
 
7
7
  /**
8
8
  * 节点大小组件
@@ -16,6 +16,7 @@ export default function NodeSizeNumberPicker(props) {
16
16
  min = props.min,
17
17
  onBlur = props.onBlur,
18
18
  onKeyDown = props.onKeyDown,
19
+ disabled = props.disabled,
19
20
  otherProps = _objectWithoutPropertiesLoose(props, _excluded);
20
21
 
21
22
  var _useState = useState(value),
@@ -48,13 +49,13 @@ export default function NodeSizeNumberPicker(props) {
48
49
 
49
50
  var handleChange = function handleChange(value, e) {
50
51
  // 失去焦点最大最小值
51
- if (e.type === 'blur') {
52
+ if (e.type === "blur") {
52
53
  onChange(!value ? min : value);
53
54
  return;
54
55
  } // 加减号立即变更
55
56
 
56
57
 
57
- if (e.triggerType === 'up' || e.triggerType === 'down') {
58
+ if (e.triggerType === "up" || e.triggerType === "down") {
58
59
  onChange(value);
59
60
  return;
60
61
  }
@@ -65,9 +66,9 @@ export default function NodeSizeNumberPicker(props) {
65
66
  return /*#__PURE__*/React.createElement(_NumberPicker, _extends({}, otherProps, {
66
67
  value: inputValue,
67
68
  min: min,
69
+ disabled: disabled,
68
70
  onChange: handleChange,
69
71
  onBlur: handleBlur,
70
72
  onKeyDown: handleKeyDown
71
73
  }));
72
- }
73
- ;
74
+ }
@@ -1,6 +1,6 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
- import rlog from '@riil-frontend/component-topology-utils/es/rlog';
3
- import React, { useState, useEffect, useRef, useCallback, useMemo } from 'react';
2
+ import rlog from "@riil-frontend/component-topology-utils/es/rlog";
3
+ import React, { useState, useEffect, useRef, useCallback, useMemo } from "react";
4
4
  import SizeInput from "../../../common/SizeInput";
5
5
 
6
6
  var NodesSizeRatioMap = /*#__PURE__*/function () {
@@ -80,7 +80,7 @@ export default function BatchSetNodeSize(props) {
80
80
  if (lock) {
81
81
  var _setSize;
82
82
 
83
- setSize((_setSize = {}, _setSize[name] = value, _setSize[name === 'width' ? 'height' : 'width'] = undefined, _setSize));
83
+ setSize((_setSize = {}, _setSize[name] = value, _setSize[name === "width" ? "height" : "width"] = undefined, _setSize));
84
84
  } else {
85
85
  var _extends2;
86
86
 
@@ -89,10 +89,10 @@ export default function BatchSetNodeSize(props) {
89
89
 
90
90
  topo.historyManager.beginTransaction();
91
91
  nodes.forEach(function (node) {
92
- if (name === 'width') {
92
+ if (name === "width") {
93
93
  if (lock) {
94
94
  var height = nodesSizeRatioMap.getNodeHeight(node, value);
95
- rlog.debug('多元素锁定设置宽', node, value, height);
95
+ rlog.debug("多元素锁定设置宽", node, value, height);
96
96
  node.setHeight(height);
97
97
  }
98
98
 
@@ -117,11 +117,10 @@ export default function BatchSetNodeSize(props) {
117
117
  nodesSizeRatioMap.reset();
118
118
  };
119
119
 
120
- return /*#__PURE__*/React.createElement(SizeInput, {
120
+ return /*#__PURE__*/React.createElement(SizeInput, _extends({}, props, {
121
121
  value: size,
122
122
  lock: lock,
123
123
  onChange: handleChange,
124
124
  onLockChange: onLockChange
125
- });
126
- }
127
- ;
125
+ }));
126
+ }
@@ -1,10 +1,13 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
- import React, { useState, useEffect, useRef, useCallback } from 'react';
3
- import SizeInput from "../../common/SizeInput";
2
+ import React, { useState, useEffect, useRef, useCallback } from "react";
3
+ import SizeInput from "../../common/SizeInput"; // 这个似乎不需要了
4
+
4
5
  export default function BatchSetNodeSize(props) {
5
- var size = props.size;
6
+ var value = props.value,
7
+ size = props.size,
8
+ disabled = props.disabled;
6
9
  return /*#__PURE__*/React.createElement(SizeInput, _extends({}, props, {
7
- value: {}
10
+ disabled: disabled,
11
+ value: value
8
12
  }));
9
- }
10
- ;
13
+ }
@@ -22,7 +22,7 @@ import topoFactory from "./topoFactory";
22
22
  import ElementTagTipConfig from "./tagstips/ElementTagTipConfig";
23
23
  import SelectionManager from "./SelectionManager"; // eslint-disable-next-line no-undef
24
24
 
25
- var version = typeof "6.0.0-alpha.8" === 'string' ? "6.0.0-alpha.8" : null;
25
+ var version = typeof "6.0.0-alpha.9" === 'string' ? "6.0.0-alpha.9" : null;
26
26
  console.info("\u62D3\u6251\u7248\u672C: " + version);
27
27
  /**
28
28
  * 拓扑显示和编辑
@@ -17,7 +17,10 @@ function useCustomIcons(topo) {
17
17
  function useNodeIcons(topo) {
18
18
  var customIcons = useCustomIcons(topo);
19
19
  var groups = [{
20
- name: '默认',
20
+ name: '资源图片',
21
+ icons: []
22
+ }, {
23
+ name: '基础图片',
21
24
  icons: (0, _icon.getNodeDefaultIcons)(topo)
22
25
  }];
23
26
 
@@ -34,6 +37,9 @@ function useNodeIcons(topo) {
34
37
  function useGroupIcons(topo) {
35
38
  var customIcons = useCustomIcons(topo);
36
39
  var groups = [{
40
+ name: '资源图片',
41
+ icons: []
42
+ }, {
37
43
  name: '默认',
38
44
  icons: (0, _icon.getGroupDefaultIcons)(topo)
39
45
  }];