@riil-frontend/component-topology 5.0.18 → 6.0.0-alpha.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/build/1.js +2 -2
- package/build/2.js +1 -1
- package/build/index.css +1 -1
- package/build/index.js +29 -29
- package/es/components/VerticalIconTab/VerticalIconTab.js +58 -0
- package/es/components/VerticalIconTab/VerticalIconTab.module.scss +63 -0
- package/es/components/VerticalIconTab/index.js +2 -0
- package/es/components/collapse/Collapse.js +7 -0
- package/es/components/collapse/Collapse.module.scss +33 -0
- package/es/components/collapse/CollapseFullheight.module.scss +20 -0
- package/es/components/collapse/Panel.js +3 -0
- package/es/core/common/icons/icon.js +18 -5
- package/es/core/components/AlarmListPanel/components/AlarmListItem.js +41 -10
- package/es/core/components/AlarmListPanel/components/index.module.scss +26 -0
- package/es/core/components/AlarmListPanel/index.js +9 -5
- package/es/core/components/ResourceViewAttributeSetting/Setting.js +5 -19
- package/es/core/components/TopoView/TopoView.module.scss +0 -4
- package/es/core/components/TopoView/editor.module.scss +3 -0
- package/es/core/components/TopoView/topoView.js +67 -33
- package/es/core/editor/components/Sidebar/Sidebar.js +75 -0
- package/es/core/editor/components/Sidebar/Sidebar.module.scss +15 -0
- package/es/core/editor/components/Sidebar/views/BackgroundPanel/BackgroundPanel.js +10 -0
- package/es/core/editor/components/Sidebar/views/BackgroundPanel/index.js +2 -0
- package/es/core/editor/components/Sidebar/views/CanvasPanel/ImagePanel.js +4 -0
- package/es/core/editor/components/Sidebar/views/CanvasPanel/index.js +2 -0
- package/es/core/editor/components/Sidebar/views/ComponentPanel.js +41 -0
- package/es/core/editor/components/Sidebar/views/ImagePanel/CiTypeImagePanel.js +20 -0
- package/es/core/editor/components/Sidebar/views/ImagePanel/CustomImagePanel.js +45 -0
- package/es/core/editor/components/Sidebar/views/ImagePanel/ImagePalette.js +44 -0
- package/es/core/editor/components/Sidebar/views/ImagePanel/ImagePanel.js +28 -0
- package/es/core/editor/components/Sidebar/views/ImagePanel/index.js +2 -0
- package/es/core/editor/components/Sidebar/views/LinkPanel.js +43 -0
- package/es/core/editor/components/Toolbar/EditorToolbar.js +40 -0
- package/es/core/editor/components/Toolbar/Toolbar.js +10 -0
- package/es/core/editor/components/Toolbar/Toolbar.module.scss +21 -0
- package/es/core/editor/components/Toolbar/buttons.js +36 -0
- package/es/core/editor/components/Toolbar/widgets/AddResourceButton.js +23 -0
- package/es/core/editor/components/Toolbar/widgets/AddResourceWidget.js +17 -0
- package/es/core/editor/components/Toolbar/widgets/BoxBackgroundButton/BoxBackgroundButton.js +46 -0
- package/es/core/editor/components/Toolbar/widgets/BoxBackgroundButton/BoxBackgroundSetting.js +8 -0
- package/es/core/editor/components/Toolbar/widgets/BoxBackgroundButton/index.js +2 -0
- package/es/core/editor/components/Toolbar/widgets/CanvasMoveWidget.js +17 -0
- package/es/core/editor/components/Toolbar/widgets/CanvasSelectWidget.js +19 -0
- package/es/core/editor/components/Toolbar/widgets/Divider.js +10 -0
- package/es/core/editor/components/Toolbar/widgets/Divider.module.scss +6 -0
- package/es/core/editor/components/Toolbar/widgets/Dropdown.js +14 -0
- package/es/core/editor/components/Toolbar/widgets/EdgeColorButton/Content.js +8 -0
- package/es/core/editor/components/Toolbar/widgets/EdgeColorButton/EdgeColorButton.js +46 -0
- package/es/core/editor/components/Toolbar/widgets/EdgeColorButton/index.js +2 -0
- package/es/core/editor/components/Toolbar/widgets/EdgeTypeButton/EdgeType.js +8 -0
- package/es/core/editor/components/Toolbar/widgets/EdgeTypeButton/index.js +44 -0
- package/es/core/editor/components/Toolbar/widgets/FontColorButton.js +44 -0
- package/es/core/editor/components/Toolbar/widgets/FontFamilyWidget.js +40 -0
- package/es/core/editor/components/Toolbar/widgets/FontSizeWidget.js +35 -0
- package/es/core/editor/components/Toolbar/widgets/FontStyleButton.js +62 -0
- package/es/core/editor/components/Toolbar/widgets/HistoryRedoButton.js +22 -0
- package/es/core/editor/components/Toolbar/widgets/HistoryUndoButton.js +29 -0
- package/es/core/editor/components/Toolbar/widgets/Layout/index.js +28 -0
- package/es/core/editor/components/Toolbar/widgets/NodeAlignWidget.js +47 -0
- package/es/core/editor/components/Toolbar/widgets/NodeImageButton/BoxBackgroundSetting.js +8 -0
- package/es/core/editor/components/Toolbar/widgets/NodeImageButton/NodeImageButton.js +46 -0
- package/es/core/editor/components/Toolbar/widgets/NodeImageButton/index.js +2 -0
- package/es/core/editor/components/Toolbar/widgets/NodeSizeButton/BoxBackgroundSetting.js +8 -0
- package/es/core/editor/components/Toolbar/widgets/NodeSizeButton/NodeSizeButton.js +42 -0
- package/es/core/editor/components/Toolbar/widgets/NodeSizeButton/index.js +2 -0
- package/es/core/editor/components/Toolbar/widgets/SearchWidget.js +40 -0
- package/es/core/editor/components/Toolbar/widgets/WidgetBox.js +49 -0
- package/es/core/editor/components/Toolbar/widgets/WidgetBox.module.scss +64 -0
- package/es/core/editor/components/Toolbar/widgets/components/ArrowButton.js +19 -0
- package/es/core/editor/components/Toolbar/widgets/components/ArrowButton.module.scss +8 -0
- package/es/core/editor/components/Toolbar/widgets/components/ArrowPopup.js +27 -0
- package/es/core/editor/components/Toolbar/widgets/components/ArrowPopup.module.scss +10 -0
- package/es/core/editor/components/Toolbar/widgets/components/ButtonBox.js +34 -0
- package/es/core/editor/components/Toolbar/widgets/components/ButtonBox.module.scss +30 -0
- package/es/core/editor/components/Toolbar/widgets/components/DropdownButton.js +47 -0
- package/es/core/editor/components/Toolbar/widgets/components/DropdownButton.module.scss +10 -0
- package/es/core/editor/components/Toolbar/widgets/components/DropdownMenu.js +30 -0
- package/es/core/editor/components/Toolbar/widgets/components/MenuSelect.js +20 -0
- package/es/core/editor/components/Toolbar/widgets.js +0 -0
- package/es/core/editor/components/settings/common/SizeInput/NodeSizeInput.js +24 -8
- package/es/core/editor/components/settings/common/SizeInput/NodeSizeInput.module.scss +4 -3
- package/es/core/editor/components/settings/propertyViews/view/BatchSetNodeSize.js +4 -2
- package/es/core/editor/components/titlebar/TopoEditorTitleBar.js +9 -15
- package/es/core/models/HistoryManager.js +32 -6
- package/es/core/models/SelectionManager.js +7 -0
- package/es/core/models/TopoApp.js +4 -2
- package/es/core/store/coreModels.js +5 -5
- package/es/core/store/models/displayConfig.js +2 -2
- package/es/core/store/models/historyManager.js +31 -0
- package/es/core/viewer/components/titlebar/widgets/SearchWidget.js +3 -1
- package/es/networkTopo/components/TopoView.js +2 -98
- package/es/networkTopo/components/Topology.js +3 -33
- package/es/networkTopo/components/editor/useEditorProps.js +34 -0
- package/es/networkTopo/hooks/useLinkDynamicStyle.js +1 -1
- package/es/style.js +1 -1
- package/lib/components/VerticalIconTab/VerticalIconTab.js +74 -0
- package/lib/components/VerticalIconTab/VerticalIconTab.module.scss +63 -0
- package/lib/components/VerticalIconTab/index.js +11 -0
- package/lib/components/collapse/Collapse.js +15 -0
- package/lib/components/collapse/Collapse.module.scss +33 -0
- package/lib/components/collapse/CollapseFullheight.module.scss +20 -0
- package/lib/components/collapse/Panel.js +3 -0
- package/lib/core/common/icons/icon.js +20 -5
- package/lib/core/components/AlarmListPanel/components/AlarmListItem.js +40 -9
- package/lib/core/components/AlarmListPanel/components/index.module.scss +26 -0
- package/lib/core/components/AlarmListPanel/index.js +10 -6
- package/lib/core/components/ResourceViewAttributeSetting/Setting.js +5 -19
- package/lib/core/components/TopoView/TopoView.module.scss +0 -4
- package/lib/core/components/TopoView/editor.module.scss +3 -0
- package/lib/core/components/TopoView/topoView.js +69 -32
- package/lib/core/editor/components/Sidebar/Sidebar.js +95 -0
- package/lib/core/editor/components/Sidebar/Sidebar.module.scss +15 -0
- package/lib/core/editor/components/Sidebar/views/BackgroundPanel/BackgroundPanel.js +19 -0
- package/lib/core/editor/components/Sidebar/views/BackgroundPanel/index.js +11 -0
- package/lib/core/editor/components/Sidebar/views/CanvasPanel/ImagePanel.js +12 -0
- package/lib/core/editor/components/Sidebar/views/CanvasPanel/index.js +11 -0
- package/lib/core/editor/components/Sidebar/views/ComponentPanel.js +53 -0
- package/lib/core/editor/components/Sidebar/views/ImagePanel/CiTypeImagePanel.js +34 -0
- package/lib/core/editor/components/Sidebar/views/ImagePanel/CustomImagePanel.js +58 -0
- package/lib/core/editor/components/Sidebar/views/ImagePanel/ImagePalette.js +56 -0
- package/lib/core/editor/components/Sidebar/views/ImagePanel/ImagePanel.js +43 -0
- package/lib/core/editor/components/Sidebar/views/ImagePanel/index.js +11 -0
- package/lib/core/editor/components/Sidebar/views/LinkPanel.js +56 -0
- package/lib/{networkTopo/components/viewer/titlebar/MoreButtonMenu.js → core/editor/components/Toolbar/EditorToolbar.js} +36 -29
- package/lib/core/editor/components/Toolbar/Toolbar.js +19 -0
- package/lib/core/editor/components/Toolbar/Toolbar.module.scss +21 -0
- package/lib/core/editor/components/Toolbar/buttons.js +62 -0
- package/lib/core/editor/components/Toolbar/widgets/AddResourceButton.js +33 -0
- package/lib/core/editor/components/Toolbar/widgets/AddResourceWidget.js +27 -0
- package/lib/core/editor/components/Toolbar/widgets/BoxBackgroundButton/BoxBackgroundButton.js +63 -0
- package/lib/core/editor/components/Toolbar/widgets/BoxBackgroundButton/BoxBackgroundSetting.js +16 -0
- package/lib/core/editor/components/Toolbar/widgets/BoxBackgroundButton/index.js +11 -0
- package/lib/core/editor/components/Toolbar/widgets/CanvasMoveWidget.js +27 -0
- package/lib/core/editor/components/Toolbar/widgets/CanvasSelectWidget.js +29 -0
- package/lib/core/editor/components/Toolbar/widgets/Divider.js +19 -0
- package/lib/core/editor/components/Toolbar/widgets/Divider.module.scss +6 -0
- package/lib/core/editor/components/Toolbar/widgets/Dropdown.js +26 -0
- package/lib/core/editor/components/Toolbar/widgets/EdgeColorButton/Content.js +16 -0
- package/lib/core/editor/components/Toolbar/widgets/EdgeColorButton/EdgeColorButton.js +63 -0
- package/lib/core/editor/components/Toolbar/widgets/EdgeColorButton/index.js +11 -0
- package/lib/core/editor/components/Toolbar/widgets/EdgeTypeButton/EdgeType.js +16 -0
- package/lib/core/editor/components/Toolbar/widgets/EdgeTypeButton/index.js +61 -0
- package/lib/core/editor/components/Toolbar/widgets/FontColorButton.js +58 -0
- package/lib/core/editor/components/Toolbar/widgets/FontFamilyWidget.js +54 -0
- package/lib/core/editor/components/Toolbar/widgets/FontSizeWidget.js +49 -0
- package/lib/core/editor/components/Toolbar/widgets/FontStyleButton.js +76 -0
- package/lib/core/editor/components/Toolbar/widgets/HistoryRedoButton.js +31 -0
- package/lib/core/editor/components/Toolbar/widgets/HistoryUndoButton.js +38 -0
- package/lib/core/editor/components/Toolbar/widgets/Layout/index.js +40 -0
- package/lib/core/editor/components/Toolbar/widgets/NodeAlignWidget.js +64 -0
- package/lib/core/editor/components/Toolbar/widgets/NodeImageButton/BoxBackgroundSetting.js +16 -0
- package/lib/core/editor/components/Toolbar/widgets/NodeImageButton/NodeImageButton.js +63 -0
- package/lib/core/editor/components/Toolbar/widgets/NodeImageButton/index.js +11 -0
- package/lib/core/editor/components/Toolbar/widgets/NodeSizeButton/BoxBackgroundSetting.js +16 -0
- package/lib/core/editor/components/Toolbar/widgets/NodeSizeButton/NodeSizeButton.js +59 -0
- package/lib/core/editor/components/Toolbar/widgets/NodeSizeButton/index.js +11 -0
- package/lib/core/editor/components/Toolbar/widgets/SearchWidget.js +53 -0
- package/lib/core/editor/components/Toolbar/widgets/WidgetBox.js +63 -0
- package/lib/core/editor/components/Toolbar/widgets/WidgetBox.module.scss +64 -0
- package/lib/core/editor/components/Toolbar/widgets/components/ArrowButton.js +31 -0
- package/lib/core/editor/components/Toolbar/widgets/components/ArrowButton.module.scss +8 -0
- package/lib/core/editor/components/Toolbar/widgets/components/ArrowPopup.js +40 -0
- package/lib/core/editor/components/Toolbar/widgets/components/ArrowPopup.module.scss +10 -0
- package/lib/core/editor/components/Toolbar/widgets/components/ButtonBox.js +48 -0
- package/lib/core/editor/components/Toolbar/widgets/components/ButtonBox.module.scss +30 -0
- package/lib/core/editor/components/Toolbar/widgets/components/DropdownButton.js +64 -0
- package/lib/core/editor/components/Toolbar/widgets/components/DropdownButton.module.scss +10 -0
- package/lib/core/editor/components/Toolbar/widgets/components/DropdownMenu.js +41 -0
- package/lib/core/editor/components/Toolbar/widgets/components/MenuSelect.js +30 -0
- package/lib/core/editor/components/Toolbar/widgets.js +1 -0
- package/lib/core/editor/components/settings/common/SizeInput/NodeSizeInput.js +25 -8
- package/lib/core/editor/components/settings/common/SizeInput/NodeSizeInput.module.scss +4 -3
- package/lib/core/editor/components/settings/propertyViews/view/BatchSetNodeSize.js +5 -2
- package/lib/core/editor/components/titlebar/TopoEditorTitleBar.js +5 -11
- package/lib/core/models/HistoryManager.js +32 -5
- package/lib/core/models/SelectionManager.js +7 -0
- package/lib/core/models/TopoApp.js +4 -1
- package/lib/core/store/coreModels.js +6 -6
- package/lib/core/store/models/displayConfig.js +2 -3
- package/lib/core/store/models/historyManager.js +41 -0
- package/lib/core/viewer/components/titlebar/widgets/SearchWidget.js +3 -1
- package/lib/networkTopo/components/TopoView.js +2 -104
- package/lib/networkTopo/components/Topology.js +3 -41
- package/lib/networkTopo/components/editor/useEditorProps.js +49 -0
- package/lib/networkTopo/hooks/useLinkDynamicStyle.js +2 -2
- package/lib/style.js +1 -1
- package/package.json +3 -3
- package/es/core/components/DisplaySettingDrawer/LinkTip.js +0 -41
- package/es/networkTopo/components/viewer/displaySetting/LinkAttrCustomSettingDrawer.js +0 -59
- package/es/networkTopo/components/viewer/displaySetting/LinkTagCommonRidioGroup.js +0 -24
- package/es/networkTopo/components/viewer/displaySetting/LinkTagCommonRidioGroup.module.scss +0 -23
- package/es/networkTopo/components/viewer/displaySetting/LinkTagV2.js +0 -93
- package/es/networkTopo/components/viewer/titlebar/MoreButtonMenu.js +0 -32
- package/es/networkTopo/components/viewer/titlebar/ViewerTools.js +0 -9
- package/es/networkTopo/components/viewer/titlebar/useSetDefaultTopo.js +0 -30
- package/lib/core/components/DisplaySettingDrawer/LinkTip.js +0 -55
- package/lib/networkTopo/components/viewer/displaySetting/LinkAttrCustomSettingDrawer.js +0 -76
- package/lib/networkTopo/components/viewer/displaySetting/LinkTagCommonRidioGroup.js +0 -35
- package/lib/networkTopo/components/viewer/displaySetting/LinkTagCommonRidioGroup.module.scss +0 -23
- package/lib/networkTopo/components/viewer/displaySetting/LinkTagV2.js +0 -108
- package/lib/networkTopo/components/viewer/titlebar/ViewerTools.js +0 -19
- package/lib/networkTopo/components/viewer/titlebar/useSetDefaultTopo.js +0 -40
|
@@ -34,7 +34,7 @@ function TopoEditorTitleBar(props) {
|
|
|
34
34
|
topoEditApi = props.topoEditApi;
|
|
35
35
|
var store = topo.store;
|
|
36
36
|
|
|
37
|
-
var _store$useModel = store.useModel(
|
|
37
|
+
var _store$useModel = store.useModel('topoEdit'),
|
|
38
38
|
topoEditState = _store$useModel[0],
|
|
39
39
|
topoEditDispatchers = _store$useModel[1];
|
|
40
40
|
|
|
@@ -88,12 +88,6 @@ function TopoEditorTitleBar(props) {
|
|
|
88
88
|
}, /*#__PURE__*/_react["default"].createElement(_DebugTools["default"], {
|
|
89
89
|
topo: topo
|
|
90
90
|
}), /*#__PURE__*/_react["default"].createElement(_button["default"], {
|
|
91
|
-
type: "primary",
|
|
92
|
-
className: _TitleBarModule["default"].button,
|
|
93
|
-
onClick: function onClick() {
|
|
94
|
-
topoEditApi.showGlobalAddResourceDrawer();
|
|
95
|
-
}
|
|
96
|
-
}, "\u6DFB\u52A0\u8D44\u6E90"), /*#__PURE__*/_react["default"].createElement(_button["default"], {
|
|
97
91
|
className: _TitleBarModule["default"].button,
|
|
98
92
|
onClick: function onClick() {
|
|
99
93
|
setExitFlag(false);
|
|
@@ -103,8 +97,8 @@ function TopoEditorTitleBar(props) {
|
|
|
103
97
|
className: _TitleBarModule["default"].button,
|
|
104
98
|
onClick: function onClick() {
|
|
105
99
|
_dialog["default"].confirm({
|
|
106
|
-
title:
|
|
107
|
-
content:
|
|
100
|
+
title: '提示',
|
|
101
|
+
content: '若直接退出,图上修改的内容将不会保存!',
|
|
108
102
|
onOk: function () {
|
|
109
103
|
var _onOk = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2() {
|
|
110
104
|
return _regenerator["default"].wrap(function _callee2$(_context2) {
|
|
@@ -150,10 +144,10 @@ function TopoEditorTitleBar(props) {
|
|
|
150
144
|
return onCancel;
|
|
151
145
|
}(),
|
|
152
146
|
cancelProps: {
|
|
153
|
-
children:
|
|
147
|
+
children: '退出'
|
|
154
148
|
},
|
|
155
149
|
okProps: {
|
|
156
|
-
children:
|
|
150
|
+
children: '保存并退出'
|
|
157
151
|
}
|
|
158
152
|
});
|
|
159
153
|
}
|
|
@@ -20,18 +20,39 @@ var HistoryManager = /*#__PURE__*/function () {
|
|
|
20
20
|
this.htHistoryManager = htHistoryManager;
|
|
21
21
|
|
|
22
22
|
_rlog["default"].info('HistoryManager 初始化', htHistoryManager);
|
|
23
|
-
} // 增加快捷键支持
|
|
24
23
|
|
|
24
|
+
this.updateStore = this.updateStore.bind(this);
|
|
25
|
+
this.init();
|
|
26
|
+
}
|
|
25
27
|
|
|
26
28
|
var _proto = HistoryManager.prototype;
|
|
27
29
|
|
|
28
|
-
_proto.
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
30
|
+
_proto.init = function init() {
|
|
31
|
+
this.htHistoryManager.addPropertyChangeListener(this.updateStore);
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
_proto.destroy = function destroy() {
|
|
35
|
+
this.htHistoryManager.removePropertyChangeListener(this.updateStore);
|
|
36
|
+
this.topo.store.getModelDispatchers('historyManager').reset();
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
_proto.updateStore = function updateStore(e) {
|
|
40
|
+
var property = e.property;
|
|
41
|
+
|
|
42
|
+
if (['histories', 'historyIndex'].indexOf(property) === -1) {
|
|
32
43
|
return;
|
|
33
44
|
}
|
|
34
45
|
|
|
46
|
+
var histories = this.getHistories();
|
|
47
|
+
var historyIndex = this.getHistoryIndex();
|
|
48
|
+
var undoable = historyIndex !== -1;
|
|
49
|
+
this.topo.store.getModelDispatchers('historyManager').update({
|
|
50
|
+
undoable: undoable
|
|
51
|
+
});
|
|
52
|
+
} // 增加快捷键支持
|
|
53
|
+
;
|
|
54
|
+
|
|
55
|
+
_proto.handleKeyDown = function handleKeyDown(e) {
|
|
35
56
|
var isCtrlDown = ht.Default.isCtrlDown;
|
|
36
57
|
|
|
37
58
|
if (isCtrlDown(e)) {
|
|
@@ -152,6 +173,12 @@ var HistoryManager = /*#__PURE__*/function () {
|
|
|
152
173
|
_proto.undo = function undo() {
|
|
153
174
|
var _this3 = this;
|
|
154
175
|
|
|
176
|
+
// 事务中禁用回退
|
|
177
|
+
// eslint-disable-next-line no-underscore-dangle
|
|
178
|
+
if (this.htHistoryManager._betweenTransaction) {
|
|
179
|
+
return;
|
|
180
|
+
}
|
|
181
|
+
|
|
155
182
|
_rlog["default"].debug('HistoryManager.undo', this.getHistories(), this.getHistoryIndex());
|
|
156
183
|
|
|
157
184
|
var storeHistory = this.getCurrentStoreHistory(true);
|
|
@@ -59,6 +59,13 @@ var SelectionManager = /*#__PURE__*/function () {
|
|
|
59
59
|
this.removeListener();
|
|
60
60
|
};
|
|
61
61
|
|
|
62
|
+
_proto.useSelection = function useSelection() {
|
|
63
|
+
var _this$topo$store$useM = this.topo.store.useModelState('selection'),
|
|
64
|
+
selection = _this$topo$store$useM.selection;
|
|
65
|
+
|
|
66
|
+
return selection;
|
|
67
|
+
};
|
|
68
|
+
|
|
62
69
|
_proto.handleSelectionChange = function handleSelectionChange(e) {
|
|
63
70
|
_rlog["default"].info('Selection handleSelectionChange', e);
|
|
64
71
|
|
|
@@ -49,8 +49,10 @@ var _topoFactory = _interopRequireDefault(require("./topoFactory"));
|
|
|
49
49
|
|
|
50
50
|
var _ElementTagTipConfig = _interopRequireDefault(require("./tagstips/ElementTagTipConfig"));
|
|
51
51
|
|
|
52
|
+
var _SelectionManager = _interopRequireDefault(require("./SelectionManager"));
|
|
53
|
+
|
|
52
54
|
// eslint-disable-next-line no-undef
|
|
53
|
-
var version = typeof "
|
|
55
|
+
var version = typeof "6.0.0-alpha.2" === 'string' ? "6.0.0-alpha.2" : null;
|
|
54
56
|
console.info("\u62D3\u6251\u7248\u672C: " + version);
|
|
55
57
|
/**
|
|
56
58
|
* 拓扑显示和编辑
|
|
@@ -106,6 +108,7 @@ var Topo = /*#__PURE__*/function () {
|
|
|
106
108
|
|
|
107
109
|
this.test = new _Test["default"](this);
|
|
108
110
|
this.uid = _topoFactory["default"].add(options.name, this);
|
|
111
|
+
this.selectionManager = new _SelectionManager["default"](this);
|
|
109
112
|
};
|
|
110
113
|
|
|
111
114
|
_proto.destroy = function destroy() {
|
|
@@ -11,19 +11,19 @@ var _customIcon = _interopRequireDefault(require("./models/customIcon"));
|
|
|
11
11
|
|
|
12
12
|
var _ciModel = _interopRequireDefault(require("./models/ciModel"));
|
|
13
13
|
|
|
14
|
-
var _selection = _interopRequireDefault(require("./models/selection"));
|
|
15
|
-
|
|
16
14
|
var _topoBizMod = _interopRequireDefault(require("./models/topoBizMod"));
|
|
17
15
|
|
|
18
16
|
var _topoConfig = _interopRequireDefault(require("./models/topoConfig"));
|
|
19
17
|
|
|
20
18
|
var _topoEdit = _interopRequireDefault(require("./models/topoEdit"));
|
|
21
19
|
|
|
22
|
-
var
|
|
20
|
+
var _background = _interopRequireDefault(require("./models/background"));
|
|
23
21
|
|
|
24
|
-
var
|
|
22
|
+
var _selection = _interopRequireDefault(require("./models/selection"));
|
|
25
23
|
|
|
26
|
-
var
|
|
24
|
+
var _historyManager = _interopRequireDefault(require("./models/historyManager"));
|
|
25
|
+
|
|
26
|
+
var _topoGraphView = _interopRequireDefault(require("./models/topoGraphView"));
|
|
27
27
|
|
|
28
28
|
var _topoAlarm = _interopRequireDefault(require("./models/topoAlarm"));
|
|
29
29
|
|
|
@@ -40,7 +40,7 @@ var _default = {
|
|
|
40
40
|
selection: _selection["default"],
|
|
41
41
|
topoBizMod: _topoBizMod["default"],
|
|
42
42
|
topoConfig: _topoConfig["default"],
|
|
43
|
-
|
|
43
|
+
historyManager: _historyManager["default"],
|
|
44
44
|
background: _background["default"],
|
|
45
45
|
topoGraphView: _topoGraphView["default"],
|
|
46
46
|
ciModel: _ciModel["default"],
|
|
@@ -11,14 +11,13 @@ var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/
|
|
|
11
11
|
|
|
12
12
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
13
13
|
|
|
14
|
-
var _lodash = _interopRequireDefault(require("lodash"));
|
|
15
|
-
|
|
16
14
|
var _rlog = _interopRequireDefault(require("@riil-frontend/component-topology-utils/es/rlog"));
|
|
17
15
|
|
|
18
16
|
/**
|
|
19
17
|
* 动态设置链路样式 Model
|
|
20
18
|
*/
|
|
21
|
-
|
|
19
|
+
// import _ from 'lodash';
|
|
20
|
+
function _default(topo) {
|
|
22
21
|
return {
|
|
23
22
|
// 定义 model 的初始 state
|
|
24
23
|
state: {
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
exports.__esModule = true;
|
|
6
|
+
exports["default"] = _default;
|
|
7
|
+
|
|
8
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
|
+
|
|
10
|
+
var _rlog = _interopRequireDefault(require("@riil-frontend/component-topology-utils/es/rlog"));
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* 动态设置链路样式 Model
|
|
14
|
+
*/
|
|
15
|
+
// import _ from 'lodash';
|
|
16
|
+
var defaultState = {
|
|
17
|
+
undoable: false,
|
|
18
|
+
redoable: false
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
function _default(topo) {
|
|
22
|
+
return {
|
|
23
|
+
// 定义 model 的初始 state
|
|
24
|
+
state: (0, _extends2["default"])({}, defaultState),
|
|
25
|
+
// 定义改变该模型状态的纯函数
|
|
26
|
+
reducers: {
|
|
27
|
+
update: function update(prevState, payload) {
|
|
28
|
+
return (0, _extends2["default"])({}, prevState, payload);
|
|
29
|
+
},
|
|
30
|
+
reset: function reset() {
|
|
31
|
+
return defaultState;
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
// 定义处理该模型副作用的函数
|
|
35
|
+
effects: function effects(dispatch) {
|
|
36
|
+
return {};
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
;
|
|
@@ -28,7 +28,8 @@ var searchTypes = [{
|
|
|
28
28
|
function SearchWidget(props) {
|
|
29
29
|
var _topo$view$topoClient;
|
|
30
30
|
|
|
31
|
-
var topo = props.topo
|
|
31
|
+
var topo = props.topo,
|
|
32
|
+
filterProps = props.filterProps;
|
|
32
33
|
|
|
33
34
|
var _useState = (0, _react.useState)('name'),
|
|
34
35
|
searchType = _useState[0],
|
|
@@ -75,6 +76,7 @@ function SearchWidget(props) {
|
|
|
75
76
|
onFilterChange: setSearchType,
|
|
76
77
|
onSearch: onSearch,
|
|
77
78
|
hasClear: true,
|
|
79
|
+
filterProps: filterProps,
|
|
78
80
|
style: {
|
|
79
81
|
width: '270px'
|
|
80
82
|
}
|
|
@@ -5,14 +5,10 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
5
5
|
exports.__esModule = true;
|
|
6
6
|
exports["default"] = void 0;
|
|
7
7
|
|
|
8
|
-
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
9
|
-
|
|
10
8
|
var _loading = _interopRequireDefault(require("@alifd/next/lib/loading"));
|
|
11
9
|
|
|
12
10
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
13
11
|
|
|
14
|
-
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
15
|
-
|
|
16
12
|
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
|
|
17
13
|
|
|
18
14
|
var _react = _interopRequireWildcard(require("react"));
|
|
@@ -33,19 +29,11 @@ var _useLinkDynamicStyle = _interopRequireDefault(require("../hooks/useLinkDynam
|
|
|
33
29
|
|
|
34
30
|
var _useRelateTopo = _interopRequireDefault(require("../hooks/viewer/useRelateTopo"));
|
|
35
31
|
|
|
36
|
-
var _ViewerTools = _interopRequireDefault(require("./viewer/titlebar/ViewerTools"));
|
|
37
|
-
|
|
38
32
|
var _useEdgeFlow = _interopRequireDefault(require("../hooks/viewer/useEdgeFlow"));
|
|
39
33
|
|
|
40
|
-
var _LinkTip = _interopRequireDefault(require("../../core/components/DisplaySettingDrawer/LinkTip"));
|
|
41
|
-
|
|
42
|
-
var _LinkTagV = _interopRequireDefault(require("./viewer/displaySetting/LinkTagV2"));
|
|
43
|
-
|
|
44
34
|
var _useEdgeExpand = _interopRequireDefault(require("../hooks/useEdgeExpand"));
|
|
45
35
|
|
|
46
|
-
var
|
|
47
|
-
|
|
48
|
-
var _excluded = ["topo", "titleBar", "onEnterEdit", "nodataPage", "notfoundPageProps", "noPermissionPageProps"];
|
|
36
|
+
var _excluded = ["topo", "viewerProps", "titleBar", "nodataPage", "notfoundPageProps", "noPermissionPageProps"];
|
|
49
37
|
|
|
50
38
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
51
39
|
|
|
@@ -56,8 +44,8 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
56
44
|
*/
|
|
57
45
|
function NetworkTopologyCore(props) {
|
|
58
46
|
var topo = props.topo,
|
|
47
|
+
viewerProps = props.viewerProps,
|
|
59
48
|
titleBar = props.titleBar,
|
|
60
|
-
onEnterEdit = props.onEnterEdit,
|
|
61
49
|
nodataPage = props.nodataPage,
|
|
62
50
|
notfoundPageProps = props.notfoundPageProps,
|
|
63
51
|
noPermissionPageProps = props.noPermissionPageProps,
|
|
@@ -81,95 +69,6 @@ function NetworkTopologyCore(props) {
|
|
|
81
69
|
});
|
|
82
70
|
|
|
83
71
|
var renderTopoView = function renderTopoView() {
|
|
84
|
-
var hancleDisplaySettingOk = /*#__PURE__*/function () {
|
|
85
|
-
var _ref = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(config) {
|
|
86
|
-
return _regenerator["default"].wrap(function _callee$(_context) {
|
|
87
|
-
while (1) {
|
|
88
|
-
switch (_context.prev = _context.next) {
|
|
89
|
-
case 0:
|
|
90
|
-
// 单多链路切换
|
|
91
|
-
// console.log("单多链路切换-config", config.expandAllEdges);
|
|
92
|
-
if (config.expandAllEdges !== 1) {
|
|
93
|
-
topo.getHtTopo().expandAllEdgeGroups();
|
|
94
|
-
(0, _linkUtils.showLinkByConfig)({
|
|
95
|
-
topo: topo,
|
|
96
|
-
showType: config.expandAllEdges
|
|
97
|
-
});
|
|
98
|
-
} else {
|
|
99
|
-
(0, _linkUtils.showLinkByConfig)({
|
|
100
|
-
topo: topo,
|
|
101
|
-
showType: config.expandAllEdges
|
|
102
|
-
});
|
|
103
|
-
topo.getHtTopo().collapseAllEdgeGroups();
|
|
104
|
-
} // 更新链路动态样式
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
if (topo.linkDynamicStyleExecutor) {
|
|
108
|
-
topo.linkDynamicStyleExecutor.execute();
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
case 2:
|
|
112
|
-
case "end":
|
|
113
|
-
return _context.stop();
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
}, _callee);
|
|
117
|
-
}));
|
|
118
|
-
|
|
119
|
-
return function hancleDisplaySettingOk(_x) {
|
|
120
|
-
return _ref.apply(this, arguments);
|
|
121
|
-
};
|
|
122
|
-
}();
|
|
123
|
-
|
|
124
|
-
var viewerProps = (0, _extends2["default"])({}, props.viewerProps, {
|
|
125
|
-
plugins: [],
|
|
126
|
-
// 右侧工具栏按钮
|
|
127
|
-
ViewerTitlebarRightTools: _ViewerTools["default"],
|
|
128
|
-
displaySettingProps: {
|
|
129
|
-
isNetworkTopo: true,
|
|
130
|
-
// 资源标注选项配置
|
|
131
|
-
nodeTagProps: {
|
|
132
|
-
commonOptions: [{
|
|
133
|
-
value: 'graph:name',
|
|
134
|
-
label: '图片名称'
|
|
135
|
-
}, {
|
|
136
|
-
value: 'attribute:display_name',
|
|
137
|
-
label: '显示名称'
|
|
138
|
-
}, {
|
|
139
|
-
value: 'attribute:ipv4_address',
|
|
140
|
-
label: 'IP地址'
|
|
141
|
-
}]
|
|
142
|
-
},
|
|
143
|
-
// 资源悬浮框选项配置
|
|
144
|
-
nodeTipProps: {
|
|
145
|
-
commonOptions: [{
|
|
146
|
-
value: 'attribute:ipv4_address',
|
|
147
|
-
label: 'IP地址'
|
|
148
|
-
}, {
|
|
149
|
-
value: 'attribute:display_name',
|
|
150
|
-
label: '显示名称'
|
|
151
|
-
}, {
|
|
152
|
-
value: 'ciType:display_name',
|
|
153
|
-
label: '资源类型'
|
|
154
|
-
}]
|
|
155
|
-
},
|
|
156
|
-
showLinkConfig: true,
|
|
157
|
-
// 是否显示链路流动效果配置
|
|
158
|
-
linkTagConfig: function linkTagConfig(params) {
|
|
159
|
-
return /*#__PURE__*/_react["default"].createElement(_LinkTagV["default"], params);
|
|
160
|
-
},
|
|
161
|
-
linkTipConfig: function linkTipConfig(params) {
|
|
162
|
-
return /*#__PURE__*/_react["default"].createElement(_LinkTip["default"], params);
|
|
163
|
-
},
|
|
164
|
-
showEdgeExpandConfig: true,
|
|
165
|
-
// 是否显示连线展开折叠配置
|
|
166
|
-
// TODO 额外配置,单多链路切换、动态效果迁移到这里
|
|
167
|
-
// extraConfig: () => <div>1111</div>,
|
|
168
|
-
// 点击回调
|
|
169
|
-
onOk: hancleDisplaySettingOk
|
|
170
|
-
}
|
|
171
|
-
});
|
|
172
|
-
|
|
173
72
|
var handleEvent = function handleEvent(event) {
|
|
174
73
|
relateTopo.onEvent(event);
|
|
175
74
|
};
|
|
@@ -181,7 +80,6 @@ function NetworkTopologyCore(props) {
|
|
|
181
80
|
}),
|
|
182
81
|
viewerProps: viewerProps,
|
|
183
82
|
titleBar: titleBar,
|
|
184
|
-
onEnterEdit: onEnterEdit,
|
|
185
83
|
onEvent: handleEvent
|
|
186
84
|
}));
|
|
187
85
|
};
|
|
@@ -7,59 +7,21 @@ exports["default"] = NetworkTopologyFull;
|
|
|
7
7
|
|
|
8
8
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
9
|
|
|
10
|
-
var _react =
|
|
10
|
+
var _react = _interopRequireDefault(require("react"));
|
|
11
11
|
|
|
12
12
|
var _TopoView = _interopRequireDefault(require("./TopoView"));
|
|
13
13
|
|
|
14
|
-
var _LayerRelatedResourceList = _interopRequireDefault(require("./editor/propertyViews/LayerRelatedResourceList"));
|
|
15
|
-
|
|
16
|
-
var _LayerConfigPlugin = _interopRequireDefault(require("./editor/plugins/LayerConfigPlugin"));
|
|
17
|
-
|
|
18
|
-
var _EdgeGroupPropertyView = _interopRequireDefault(require("./editor/propertyViews/edge/EdgeGroupPropertyView"));
|
|
19
|
-
|
|
20
|
-
var _LinkPropertyView = _interopRequireDefault(require("./editor/propertyViews/edge/LinkPropertyView"));
|
|
21
|
-
|
|
22
|
-
var _AddLinkDrawer = _interopRequireDefault(require("./editor/propertyViews/edge/addLinkDrawer/AddLinkDrawer"));
|
|
23
|
-
|
|
24
14
|
var _useTopoEdit = _interopRequireDefault(require("../hooks/useTopoEdit"));
|
|
25
15
|
|
|
26
|
-
var
|
|
27
|
-
|
|
28
|
-
var _useGroupSortResources2 = _interopRequireDefault(require("../hooks/editor/useGroupSortResources"));
|
|
29
|
-
|
|
30
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
31
|
-
|
|
32
|
-
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; }
|
|
16
|
+
var _useEditorProps = _interopRequireDefault(require("./editor/useEditorProps"));
|
|
33
17
|
|
|
34
18
|
function NetworkTopologyFull(props) {
|
|
35
19
|
var topo = props.topo,
|
|
36
|
-
customEditorProps = props.editorProps,
|
|
37
20
|
showTools = props.showTools;
|
|
38
21
|
var topoEdit = (0, _useTopoEdit["default"])({
|
|
39
22
|
topo: topo
|
|
40
23
|
});
|
|
41
|
-
var editorProps = (0,
|
|
42
|
-
useGroupSortResources: function useGroupSortResources(nodes) {
|
|
43
|
-
return (0, _useGroupSortResources2["default"])(topo.store, nodes);
|
|
44
|
-
},
|
|
45
|
-
layerRelatedResourceList: _LayerRelatedResourceList["default"],
|
|
46
|
-
multipleElementPropertyViewProps: {
|
|
47
|
-
showElementAlign: true
|
|
48
|
-
},
|
|
49
|
-
// 连线属性面板
|
|
50
|
-
edgePropertyViews: {
|
|
51
|
-
edge: _EdgePropertyView["default"],
|
|
52
|
-
link: _LinkPropertyView["default"],
|
|
53
|
-
edgeGroup: _EdgeGroupPropertyView["default"]
|
|
54
|
-
},
|
|
55
|
-
getEdgePropertyViewType: function getEdgePropertyViewType(_ref) {
|
|
56
|
-
var edge = _ref.edge;
|
|
57
|
-
return edge.getTag() ? "link" : null;
|
|
58
|
-
},
|
|
59
|
-
showLinkConfig: true
|
|
60
|
-
}, customEditorProps, {
|
|
61
|
-
plugins: [_LayerConfigPlugin["default"], _AddLinkDrawer["default"]]
|
|
62
|
-
});
|
|
24
|
+
var editorProps = (0, _useEditorProps["default"])(props);
|
|
63
25
|
return /*#__PURE__*/_react["default"].createElement(_TopoView["default"], (0, _extends2["default"])({}, props, {
|
|
64
26
|
editorProps: editorProps,
|
|
65
27
|
graphViewProps: (0, _extends2["default"])({}, props.graphViewProps, {
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
exports.__esModule = true;
|
|
6
|
+
exports["default"] = useEditorProps;
|
|
7
|
+
|
|
8
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
|
+
|
|
10
|
+
var _useGroupSortResources2 = _interopRequireDefault(require("../../hooks/editor/useGroupSortResources"));
|
|
11
|
+
|
|
12
|
+
var _LayerConfigPlugin = _interopRequireDefault(require("./plugins/LayerConfigPlugin"));
|
|
13
|
+
|
|
14
|
+
var _AddLinkDrawer = _interopRequireDefault(require("./propertyViews/edge/addLinkDrawer/AddLinkDrawer"));
|
|
15
|
+
|
|
16
|
+
var _EdgeGroupPropertyView = _interopRequireDefault(require("./propertyViews/edge/EdgeGroupPropertyView"));
|
|
17
|
+
|
|
18
|
+
var _EdgePropertyView = _interopRequireDefault(require("./propertyViews/edge/EdgePropertyView"));
|
|
19
|
+
|
|
20
|
+
var _LinkPropertyView = _interopRequireDefault(require("./propertyViews/edge/LinkPropertyView"));
|
|
21
|
+
|
|
22
|
+
var _LayerRelatedResourceList = _interopRequireDefault(require("./propertyViews/LayerRelatedResourceList"));
|
|
23
|
+
|
|
24
|
+
function useEditorProps(props) {
|
|
25
|
+
var topo = props.topo,
|
|
26
|
+
customEditorProps = props.editorProps;
|
|
27
|
+
return (0, _extends2["default"])({
|
|
28
|
+
useGroupSortResources: function useGroupSortResources(nodes) {
|
|
29
|
+
return (0, _useGroupSortResources2["default"])(topo.store, nodes);
|
|
30
|
+
},
|
|
31
|
+
layerRelatedResourceList: _LayerRelatedResourceList["default"],
|
|
32
|
+
multipleElementPropertyViewProps: {
|
|
33
|
+
showElementAlign: true
|
|
34
|
+
},
|
|
35
|
+
// 连线属性面板
|
|
36
|
+
edgePropertyViews: {
|
|
37
|
+
edge: _EdgePropertyView["default"],
|
|
38
|
+
link: _LinkPropertyView["default"],
|
|
39
|
+
edgeGroup: _EdgeGroupPropertyView["default"]
|
|
40
|
+
},
|
|
41
|
+
getEdgePropertyViewType: function getEdgePropertyViewType(_ref) {
|
|
42
|
+
var edge = _ref.edge;
|
|
43
|
+
return edge.getTag() ? 'link' : null;
|
|
44
|
+
},
|
|
45
|
+
showLinkConfig: true,
|
|
46
|
+
// 是否显示链路相关配置
|
|
47
|
+
plugins: [_LayerConfigPlugin["default"], _AddLinkDrawer["default"]]
|
|
48
|
+
}, customEditorProps);
|
|
49
|
+
}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
4
|
|
|
5
5
|
exports.__esModule = true;
|
|
6
|
-
exports["default"] =
|
|
6
|
+
exports["default"] = useLinkDynamicStyle;
|
|
7
7
|
|
|
8
8
|
var _react = require("react");
|
|
9
9
|
|
|
@@ -15,7 +15,7 @@ var _LinkDynamicStyleExecutor = _interopRequireDefault(require("../models/LinkDy
|
|
|
15
15
|
* @param {*} props
|
|
16
16
|
* @returns
|
|
17
17
|
*/
|
|
18
|
-
function
|
|
18
|
+
function useLinkDynamicStyle(props) {
|
|
19
19
|
var topo = props.topo;
|
|
20
20
|
var linkDynamicStyleExecutor = (0, _react.useMemo)(function () {
|
|
21
21
|
return new _LinkDynamicStyleExecutor["default"](topo);
|
package/lib/style.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
require('@riil-frontend/component-topology-graph/lib/style');
|
|
2
|
+
require('@alifd/next/lib/box/style');
|
|
2
3
|
require('@alifd/next/lib/message/style');
|
|
3
4
|
require('@alifd/next/lib/dialog/style');
|
|
4
5
|
require('@riil-frontend/component-topology-utils/lib/style');
|
|
@@ -25,7 +26,6 @@ require('@alifd/next/lib/divider/style');
|
|
|
25
26
|
require('@alifd/next/lib/overlay/style');
|
|
26
27
|
require('@alifd/next/lib/checkbox/style');
|
|
27
28
|
require('@riil-frontend/component-crucial-link-topo/lib/style');
|
|
28
|
-
require('@alifd/next/lib/box/style');
|
|
29
29
|
require('@alifd/next/lib/list/style');
|
|
30
30
|
require('@alifd/next/lib/card/style');
|
|
31
31
|
require('@alifd/next/lib/radio/style');
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@riil-frontend/component-topology",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "6.0.0-alpha.2",
|
|
4
4
|
"description": "拓扑",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"start": "build-scripts start",
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"@riil-frontend/component-action-tree": "^1.0.13",
|
|
62
62
|
"@riil-frontend/component-common-res-list": "^1.0.13",
|
|
63
63
|
"@riil-frontend/component-condition-res-list": "^1.0.18",
|
|
64
|
-
"@riil-frontend/component-crucial-link-topo": "0.0.1-alpha.
|
|
64
|
+
"@riil-frontend/component-crucial-link-topo": "0.0.1-alpha.31",
|
|
65
65
|
"@riil-frontend/component-extra-title": "^1.0.3",
|
|
66
66
|
"@riil-frontend/component-more-buttons-menu": "^2.0.1",
|
|
67
67
|
"@riil-frontend/component-no-data-page": "^3.0.4",
|
|
@@ -115,6 +115,6 @@
|
|
|
115
115
|
"access": "public"
|
|
116
116
|
},
|
|
117
117
|
"license": "MIT",
|
|
118
|
-
"homepage": "https://unpkg.com/@riil-frontend/component-topology@
|
|
118
|
+
"homepage": "https://unpkg.com/@riil-frontend/component-topology@6.0.0-alpha.2/build/index.html",
|
|
119
119
|
"gitHead": "2da19ffccbb7ca60a8acf396e39f542c68bb33f5"
|
|
120
120
|
}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { DEFAULT_TIP_COMMON_CONFIG } from "../../../constants/ResourceInfoDisplay";
|
|
4
|
-
import LinkAttrCustomSettingDrawer from "../../../networkTopo/components/viewer/displaySetting/LinkAttrCustomSettingDrawer";
|
|
5
|
-
import BasicConfig from "./ResourceDisplay/BasicConfig"; // 源端口、目的端口、总流量、带宽利用率
|
|
6
|
-
|
|
7
|
-
var CommonOptions = [{
|
|
8
|
-
value: 'attribute:source_id',
|
|
9
|
-
label: '源端口'
|
|
10
|
-
}, {
|
|
11
|
-
value: 'attribute:destination_id',
|
|
12
|
-
label: '目的端口'
|
|
13
|
-
}, {
|
|
14
|
-
value: 'metric:interface_totalbps',
|
|
15
|
-
label: '总速率'
|
|
16
|
-
}, {
|
|
17
|
-
value: 'metric:bandwidth_utilization',
|
|
18
|
-
label: '带宽利用率'
|
|
19
|
-
}];
|
|
20
|
-
/**
|
|
21
|
-
* 资源标注配置
|
|
22
|
-
* @param {*} props
|
|
23
|
-
* @returns
|
|
24
|
-
*/
|
|
25
|
-
|
|
26
|
-
function LinkTip(props, ref) {
|
|
27
|
-
return /*#__PURE__*/React.createElement(BasicConfig, _extends({
|
|
28
|
-
ref: ref
|
|
29
|
-
}, props, {
|
|
30
|
-
limit: 4,
|
|
31
|
-
elementType: "link",
|
|
32
|
-
showType: "tip",
|
|
33
|
-
commonOptions: CommonOptions,
|
|
34
|
-
defaultCommonConfig: DEFAULT_TIP_COMMON_CONFIG,
|
|
35
|
-
customSettingDrawer: function customSettingDrawer(params) {
|
|
36
|
-
return /*#__PURE__*/React.createElement(LinkAttrCustomSettingDrawer, params);
|
|
37
|
-
}
|
|
38
|
-
}));
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
export default /*#__PURE__*/React.forwardRef(LinkTip);
|