@riil-frontend/component-topology 6.0.0-alpha.7 → 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.
- package/build/1.js +2 -2
- package/build/2.js +1 -1
- package/build/index.css +1 -1
- package/build/index.js +21 -21
- package/es/core/common/icons/useIcons.js +7 -1
- package/es/core/editor/components/Sidebar/views/CanvasPanel/CanvasPanel.js +13 -18
- package/es/core/editor/components/Toolbar/EditorToolbar.js +16 -9
- package/es/core/editor/components/Toolbar/buttons.js +20 -18
- package/es/core/editor/components/Toolbar/widgets/AddResourceButton.js +2 -2
- package/es/core/editor/components/Toolbar/widgets/EdgeTypeButton/EdgeType.js +25 -8
- package/es/core/editor/components/Toolbar/widgets/EdgeTypeButton/EdgeType.module.scss +1 -3
- package/es/core/editor/components/Toolbar/widgets/EdgeTypeButton/LineType.js +14 -5
- package/es/core/editor/components/Toolbar/widgets/HistoryRedoButton.js +1 -1
- package/es/core/editor/components/Toolbar/widgets/HistoryUndoButton.js +2 -2
- package/es/core/editor/components/Toolbar/widgets/IconSelect/IconSelect.js +109 -0
- package/es/core/editor/components/Toolbar/widgets/IconSelect/constant.js +64 -0
- package/es/core/editor/components/Toolbar/widgets/IconSelect/index.js +101 -0
- package/es/core/editor/components/Toolbar/widgets/IconSelect/index.module.scss +151 -0
- package/es/core/editor/components/Toolbar/widgets/IconSelect/popUpContent.js +50 -0
- package/es/core/editor/components/Toolbar/widgets/NodeImageButton/BoxBackgroundSetting.js +14 -4
- package/es/core/editor/components/Toolbar/widgets/NodeImageButton/NodeImageButton.js +36 -6
- package/es/core/editor/components/Toolbar/widgets/NodeSizeButton/NodeSizeButton.js +87 -8
- package/es/core/editor/components/settings/common/NodeSizeInput/NodeSizeInput.js +3 -3
- package/es/core/editor/components/settings/common/SizeInput/NodeSizeInput.js +10 -6
- package/es/core/editor/components/settings/common/SizeInput/NodeSizeNumberPicker.js +7 -6
- package/es/core/editor/components/settings/propertyViews/multipleElements/BatchSetNodeSize/BatchSetNodeSize.js +8 -9
- package/es/core/editor/components/settings/propertyViews/view/BatchSetNodeSize.js +9 -6
- package/es/core/hooks/useTopoEdit.js +19 -8
- package/es/core/models/TopoApp.js +1 -1
- package/lib/core/common/icons/useIcons.js +7 -1
- package/lib/core/editor/components/Sidebar/views/CanvasPanel/CanvasPanel.js +13 -18
- package/lib/core/editor/components/Toolbar/EditorToolbar.js +14 -7
- package/lib/core/editor/components/Toolbar/buttons.js +21 -20
- package/lib/core/editor/components/Toolbar/widgets/AddResourceButton.js +2 -2
- package/lib/core/editor/components/Toolbar/widgets/EdgeTypeButton/EdgeType.js +25 -8
- package/lib/core/editor/components/Toolbar/widgets/EdgeTypeButton/EdgeType.module.scss +1 -3
- package/lib/core/editor/components/Toolbar/widgets/EdgeTypeButton/LineType.js +15 -5
- package/lib/core/editor/components/Toolbar/widgets/HistoryRedoButton.js +1 -1
- package/lib/core/editor/components/Toolbar/widgets/HistoryUndoButton.js +2 -2
- package/lib/core/editor/components/Toolbar/widgets/IconSelect/IconSelect.js +126 -0
- package/lib/core/editor/components/Toolbar/widgets/IconSelect/constant.js +69 -0
- package/lib/core/editor/components/Toolbar/widgets/IconSelect/index.js +117 -0
- package/lib/core/editor/components/Toolbar/widgets/IconSelect/index.module.scss +151 -0
- package/lib/core/editor/components/Toolbar/widgets/IconSelect/popUpContent.js +62 -0
- package/lib/core/editor/components/Toolbar/widgets/NodeImageButton/BoxBackgroundSetting.js +20 -4
- package/lib/core/editor/components/Toolbar/widgets/NodeImageButton/NodeImageButton.js +35 -5
- package/lib/core/editor/components/Toolbar/widgets/NodeSizeButton/NodeSizeButton.js +87 -7
- package/lib/core/editor/components/settings/common/NodeSizeInput/NodeSizeInput.js +2 -2
- package/lib/core/editor/components/settings/common/SizeInput/NodeSizeInput.js +11 -7
- package/lib/core/editor/components/settings/common/SizeInput/NodeSizeNumberPicker.js +6 -6
- package/lib/core/editor/components/settings/propertyViews/multipleElements/BatchSetNodeSize/BatchSetNodeSize.js +6 -8
- package/lib/core/editor/components/settings/propertyViews/view/BatchSetNodeSize.js +7 -5
- package/lib/core/hooks/useTopoEdit.js +19 -8
- package/lib/core/models/TopoApp.js +1 -1
- package/package.json +2 -2
@@ -94,7 +94,7 @@ function BatchSetNodeSize(props) {
|
|
94
94
|
if (lock) {
|
95
95
|
var _setSize;
|
96
96
|
|
97
|
-
setSize((_setSize = {}, _setSize[name] = value, _setSize[name ===
|
97
|
+
setSize((_setSize = {}, _setSize[name] = value, _setSize[name === "width" ? "height" : "width"] = undefined, _setSize));
|
98
98
|
} else {
|
99
99
|
var _extends2;
|
100
100
|
|
@@ -103,11 +103,11 @@ function BatchSetNodeSize(props) {
|
|
103
103
|
|
104
104
|
topo.historyManager.beginTransaction();
|
105
105
|
nodes.forEach(function (node) {
|
106
|
-
if (name ===
|
106
|
+
if (name === "width") {
|
107
107
|
if (lock) {
|
108
108
|
var height = nodesSizeRatioMap.getNodeHeight(node, value);
|
109
109
|
|
110
|
-
_rlog["default"].debug(
|
110
|
+
_rlog["default"].debug("多元素锁定设置宽", node, value, height);
|
111
111
|
|
112
112
|
node.setHeight(height);
|
113
113
|
}
|
@@ -133,12 +133,10 @@ function BatchSetNodeSize(props) {
|
|
133
133
|
nodesSizeRatioMap.reset();
|
134
134
|
};
|
135
135
|
|
136
|
-
return /*#__PURE__*/_react["default"].createElement(_SizeInput["default"], {
|
136
|
+
return /*#__PURE__*/_react["default"].createElement(_SizeInput["default"], (0, _extends3["default"])({}, props, {
|
137
137
|
value: size,
|
138
138
|
lock: lock,
|
139
139
|
onChange: handleChange,
|
140
140
|
onLockChange: onLockChange
|
141
|
-
});
|
142
|
-
}
|
143
|
-
|
144
|
-
;
|
141
|
+
}));
|
142
|
+
}
|
@@ -15,11 +15,13 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
15
15
|
|
16
16
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
17
17
|
|
18
|
+
// 这个似乎不需要了
|
18
19
|
function BatchSetNodeSize(props) {
|
19
|
-
var
|
20
|
+
var value = props.value,
|
21
|
+
size = props.size,
|
22
|
+
disabled = props.disabled;
|
20
23
|
return /*#__PURE__*/_react["default"].createElement(_SizeInput["default"], (0, _extends2["default"])({}, props, {
|
21
|
-
|
24
|
+
disabled: disabled,
|
25
|
+
value: value
|
22
26
|
}));
|
23
|
-
}
|
24
|
-
|
25
|
-
;
|
27
|
+
}
|
@@ -469,14 +469,15 @@ var useTopoEdit = function useTopoEdit(params) {
|
|
469
469
|
|
470
470
|
_rlog["default"].debug("bindGroupResources--id, tag", id, tag);
|
471
471
|
|
472
|
-
|
472
|
+
topo.historyManager.beginTransaction();
|
473
|
+
_context12.next = 5;
|
473
474
|
return resourceConfig.updateGroupResources(group, resources);
|
474
475
|
|
475
|
-
case
|
476
|
-
_context12.next =
|
476
|
+
case 5:
|
477
|
+
_context12.next = 7;
|
477
478
|
return editDispatchers.fetchDataByConfig();
|
478
479
|
|
479
|
-
case
|
480
|
+
case 7:
|
480
481
|
_yield$editDispatcher2 = _context12.sent;
|
481
482
|
elements = _yield$editDispatcher2.elements;
|
482
483
|
// 区域里的子区域及子区域的节点、新增的链路
|
@@ -492,7 +493,9 @@ var useTopoEdit = function useTopoEdit(params) {
|
|
492
493
|
}
|
493
494
|
}
|
494
495
|
|
495
|
-
|
496
|
+
topo.historyManager.endTransaction();
|
497
|
+
|
498
|
+
case 14:
|
496
499
|
case "end":
|
497
500
|
return _context12.stop();
|
498
501
|
}
|
@@ -618,7 +621,8 @@ var useTopoEdit = function useTopoEdit(params) {
|
|
618
621
|
newElements: newElements
|
619
622
|
});
|
620
623
|
|
621
|
-
topo.getHtTopo().addElements(newElements);
|
624
|
+
topo.getHtTopo().addElements(newElements);
|
625
|
+
topo.fitContent(false, 0); // 临时放这里,仅拓扑中心有
|
622
626
|
|
623
627
|
if (topo.linkDynamicStyleExecutor) {
|
624
628
|
topo.linkDynamicStyleExecutor.execute();
|
@@ -630,7 +634,7 @@ var useTopoEdit = function useTopoEdit(params) {
|
|
630
634
|
resourceTabactiveKey: null
|
631
635
|
});
|
632
636
|
|
633
|
-
case
|
637
|
+
case 14:
|
634
638
|
case "end":
|
635
639
|
return _context15.stop();
|
636
640
|
}
|
@@ -684,6 +688,12 @@ var useTopoEdit = function useTopoEdit(params) {
|
|
684
688
|
function getAddResourceDrawerMode() {
|
685
689
|
return getAddResourceType() === "addToFirstLayer" ? "new" : "all";
|
686
690
|
}
|
691
|
+
/**
|
692
|
+
* 未选中元素添加资源
|
693
|
+
*
|
694
|
+
* @param {*} data
|
695
|
+
*/
|
696
|
+
|
687
697
|
|
688
698
|
var onSaveComboRes = /*#__PURE__*/function () {
|
689
699
|
var _ref6 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee7(data) {
|
@@ -712,12 +722,13 @@ var useTopoEdit = function useTopoEdit(params) {
|
|
712
722
|
return bindViewResources(data);
|
713
723
|
|
714
724
|
case 9:
|
725
|
+
topo.fitContent(false, 0);
|
715
726
|
topo.historyManager.endTransaction();
|
716
727
|
topoEditDispatchers.update({
|
717
728
|
resourceTabactiveKey: null
|
718
729
|
});
|
719
730
|
|
720
|
-
case
|
731
|
+
case 12:
|
721
732
|
case "end":
|
722
733
|
return _context7.stop();
|
723
734
|
}
|
@@ -52,7 +52,7 @@ var _ElementTagTipConfig = _interopRequireDefault(require("./tagstips/ElementTag
|
|
52
52
|
var _SelectionManager = _interopRequireDefault(require("./SelectionManager"));
|
53
53
|
|
54
54
|
// eslint-disable-next-line no-undef
|
55
|
-
var version = typeof "6.0.0-alpha.
|
55
|
+
var version = typeof "6.0.0-alpha.9" === 'string' ? "6.0.0-alpha.9" : null;
|
56
56
|
console.info("\u62D3\u6251\u7248\u672C: " + version);
|
57
57
|
/**
|
58
58
|
* 拓扑显示和编辑
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@riil-frontend/component-topology",
|
3
|
-
"version": "6.0.0-alpha.
|
3
|
+
"version": "6.0.0-alpha.9",
|
4
4
|
"description": "拓扑",
|
5
5
|
"scripts": {
|
6
6
|
"start": "build-scripts start",
|
@@ -115,6 +115,6 @@
|
|
115
115
|
"access": "public"
|
116
116
|
},
|
117
117
|
"license": "MIT",
|
118
|
-
"homepage": "https://unpkg.com/@riil-frontend/component-topology@6.0.0-alpha.
|
118
|
+
"homepage": "https://unpkg.com/@riil-frontend/component-topology@6.0.0-alpha.9/build/index.html",
|
119
119
|
"gitHead": "2da19ffccbb7ca60a8acf396e39f542c68bb33f5"
|
120
120
|
}
|