@riil-frontend/component-topology 12.0.0-dev.4 → 12.0.0-dev.41
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 +1 -1
- package/build/index.css +1 -1
- package/build/index.js +13 -13
- package/es/components/BatchAttrMetric/setting.js +1 -1
- package/es/components/ModelAttrSelectDrawer/components/MultipleTypeAttributeSelectDrawer.js +1 -1
- package/es/components/ResourceSelectDrawer/ResourceSelectDrawer.js +1 -1
- package/es/components/TemplateButton/index.module.scss +1 -1
- package/es/core/components/AlarmListPanel/components/AlarmListItem.js +59 -4
- package/es/core/components/AlarmListPanel/index.js +1 -1
- package/es/core/components/DisplaySettingDrawer/DisplaySetting.js +1 -1
- package/es/core/components/DisplaySettingDrawer/DisplaySettingDrawer.js +2 -2
- package/es/core/components/DisplaySettingDrawer/ResourceDisplay/BasicConfig.js +1 -1
- package/es/core/components/DisplaySettingDrawer/components/NodeAttrSettingDrawer.js +1 -1
- package/es/core/components/ResourceViewAttributeSetting/Setting.js +1 -1
- package/es/core/components/TopoView/topoView.js +6 -2
- package/es/core/editor/components/BackgroundView/index.js +1 -1
- package/es/core/editor/components/CustomIconPlugin/UploadIconDialog.js +1 -1
- package/es/core/editor/components/EditorPlugin.js +1 -1
- package/es/core/editor/components/Sidebar/views/ComponentPanel.js +1 -1
- package/es/core/editor/components/Sidebar/views/ImagePanel/CiTypeImagePanel.js +1 -1
- package/es/core/editor/components/Sidebar/views/ImagePanel/CustomImagePanel.js +1 -1
- package/es/core/editor/components/Sidebar/views/ImagePanel/HtCustomImagePanel.js +1 -1
- package/es/core/editor/components/Sidebar/views/ImagePanel/HtImagePalette.js +1 -1
- package/es/core/editor/components/Sidebar/views/ImagePanel/ImagePalette.js +1 -1
- package/es/core/editor/components/Sidebar/views/LinkPanel.js +1 -1
- package/es/core/editor/components/Toolbar/widgets/EdgeColorButton/EdgeColorButton.js +5 -12
- package/es/core/editor/components/Toolbar/widgets/EdgeTypeButton/EdgeType.js +27 -10
- package/es/core/editor/components/Toolbar/widgets/EdgeTypeButton/EdgeType.module.scss +21 -1
- package/es/core/editor/components/Toolbar/widgets/EdgeTypeButton/LineType.js +9 -0
- package/es/core/editor/components/Toolbar/widgets/EdgeTypeButton/index.js +2 -2
- package/es/core/editor/components/Toolbar/widgets/Layout/index.js +17 -3
- package/es/core/editor/components/settings/common/NodeSizeInput/NodeSizeInput.js +1 -1
- package/es/core/editor/components/settings/common/SizeInput/NodeSizeInput.js +1 -1
- package/es/core/editor/components/settings/propertyViews/layer/BasicSetting.js +1 -1
- package/es/core/editor/components/settings/propertyViews/layer/SettingTab/Setting.js +1 -1
- package/es/core/editor/components/settings/propertyViews/view/hooks/useBackgroundSizeConfig.js +1 -1
- package/es/core/editor/hooks/useKeyboardShortcut.js +3 -1
- package/es/core/editor/store/background.js +1 -1
- package/es/core/editor/store/historyManager.js +1 -1
- package/es/core/editor/store/topoEdit.js +1 -1
- package/es/core/editor/utils/copyElementUtil.js +12 -0
- package/es/core/editor/utils/edgeTypeStyleUtil.js +8 -7
- package/es/core/hooks/ht/useHtDataPropertyChangeListener.js +1 -1
- package/es/core/hooks/useAlarm.js +131 -81
- package/es/core/hooks/useCiAttributeChange.js +1 -1
- package/es/core/hooks/useCmpLinkAlarm.js +153 -0
- package/es/core/hooks/useEventData.js +1 -2
- package/es/core/hooks/useGraphAlarmDisplay.js +91 -56
- package/es/core/hooks/useManageStatus.js +1 -1
- package/es/core/hooks/usePolling.js +1 -1
- package/es/core/hooks/useResourceConfig.js +1 -3
- package/es/core/hooks/useTopoEdit.js +51 -54
- package/es/core/models/Alarm.js +69 -143
- package/es/core/models/AttributeMetricDisplay.js +15 -6
- package/es/core/models/HistoryManager.js +1 -1
- package/es/core/models/SelectionModel.js +1 -1
- package/es/core/models/TopoApp.js +2 -2
- package/es/core/models/attributeFormatter/formatter/graphTransform.js +1 -1
- package/es/core/models/attributeFormatter/index.js +1 -1
- package/es/core/models/cache/CiCache.d.ts +1 -1
- package/es/core/models/cache/CiCache.js +3 -3
- package/es/core/models/cache/CiTypeCache.js +5 -1
- package/es/core/models/cache/DictCache.js +1 -1
- package/es/core/models/plugins/resourceWebControllUrl.js +1 -1
- package/es/core/models/tagstips/ElementTagTipConfig.js +1 -1
- package/es/core/models/topoData.js +0 -1
- package/es/core/services/alarm.js +1 -1
- package/es/core/services/index.js +1 -1
- package/es/core/services/topo/basic.js +2 -2
- package/es/core/store/models/customIcon.js +1 -1
- package/es/core/store/models/displayConfig.js +1 -1
- package/es/core/store/models/selection.js +1 -1
- package/es/core/store/models/topoBaseInfoOverview.js +1 -1
- package/es/core/store/models/topoBizMod.js +1 -1
- package/es/core/store/models/topoConfig.js +7 -10
- package/es/core/store/models/topoGraphView.js +1 -1
- package/es/core/store/models/topoMod.js +82 -135
- package/es/core/store/models/viewer/lock.js +1 -1
- package/es/core/store/models/viewer/resourceDetail.js +1 -1
- package/es/core/store/models/viewer/resourceWebControllUrlSetting.js +1 -1
- package/es/core/utils/edgeUtil.js +10 -1
- package/es/core/utils/metricUtil.js +8 -4
- package/es/core/utils/showGraphManageStatusUtil.js +3 -2
- package/es/core/utils/showMessage.js +1 -1
- package/es/core/viewer/components/plugins/ResourceDetail/ResourceDetail.js +1 -0
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/EventsCard.js +46 -21
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/ResourceOverview.js +3 -1
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/LinkTopoCard.js +4 -2
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/hooks/useMetricPolling.js +1 -1
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/services/index.js +1 -1
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/hooks/useAlarmAndRiskData.js +20 -18
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/index.module.scss +8 -0
- package/es/core/viewer/components/plugins/ResourceDetail/components/WebConsole/WebConsoleForm/hooks/useWebConsole.js +1 -1
- package/es/core/viewer/components/plugins/ViewerPlugin.js +3 -1
- package/es/core/viewer/components/titlebar/widgets/AlarmButton.js +1 -5
- package/es/networkTopo/components/Link/index.js +1 -1
- package/es/networkTopo/components/TopoView.js +6 -11
- package/es/networkTopo/hooks/useEdgeExpand.js +2 -3
- package/es/networkTopo/hooks/viewer/useRelateTopo.js +1 -1
- package/es/networkTopo/models/LinkDynamicStyleExecutor.js +1 -1
- package/es/networkTopo/models/LinkTagsTipsBuilder.js +1 -1
- package/es/networkTopo/models/TopoCenter.js +1 -1
- package/es/networkTopo/services/model.js +1 -1
- package/es/networkTopo/services/topo/basic.js +4 -4
- package/es/networkTopo/services/topo/ciInfo.js +1 -1
- package/es/networkTopo/store/functionAuth.js +1 -1
- package/es/networkTopo/store/topoCenter.js +261 -224
- package/es/networkTopo/store/topoTreeMod.js +1 -1
- package/es/networkTopo/utils/exportData.js +1 -1
- package/es/style.js +2 -2
- package/es/utils/ResourceConfigUtil.js +4 -37
- package/es/utils/ciRefAttributeTranslateUtil.d.ts +19 -0
- package/es/utils/ciRefAttributeTranslateUtil.js +155 -0
- package/es/utils/format.js +1 -1
- package/es/utils/topoData.js +4 -2
- package/lib/components/BatchAttrMetric/setting.js +2 -2
- package/lib/components/ModelAttrSelectDrawer/components/MultipleTypeAttributeSelectDrawer.js +2 -2
- package/lib/components/ResourceSelectDrawer/ResourceSelectDrawer.js +2 -2
- package/lib/components/TemplateButton/index.module.scss +1 -1
- package/lib/core/components/AlarmListPanel/components/AlarmListItem.js +61 -4
- package/lib/core/components/AlarmListPanel/index.js +1 -1
- package/lib/core/components/DisplaySettingDrawer/DisplaySetting.js +2 -2
- package/lib/core/components/DisplaySettingDrawer/DisplaySettingDrawer.js +2 -2
- package/lib/core/components/DisplaySettingDrawer/ResourceDisplay/BasicConfig.js +3 -3
- package/lib/core/components/DisplaySettingDrawer/components/NodeAttrSettingDrawer.js +2 -2
- package/lib/core/components/ResourceViewAttributeSetting/Setting.js +2 -2
- package/lib/core/components/TopoView/topoView.js +14 -10
- package/lib/core/editor/components/BackgroundView/index.js +3 -3
- package/lib/core/editor/components/CustomIconPlugin/UploadIconDialog.js +2 -2
- package/lib/core/editor/components/EditorPlugin.js +3 -3
- package/lib/core/editor/components/Sidebar/views/ComponentPanel.js +2 -4
- package/lib/core/editor/components/Sidebar/views/ImagePanel/CiTypeImagePanel.js +1 -1
- package/lib/core/editor/components/Sidebar/views/ImagePanel/CustomImagePanel.js +1 -1
- package/lib/core/editor/components/Sidebar/views/ImagePanel/HtCustomImagePanel.js +2 -2
- package/lib/core/editor/components/Sidebar/views/ImagePanel/HtImagePalette.js +2 -2
- package/lib/core/editor/components/Sidebar/views/ImagePanel/ImagePalette.js +2 -4
- package/lib/core/editor/components/Sidebar/views/LinkPanel.js +2 -4
- package/lib/core/editor/components/Toolbar/widgets/EdgeColorButton/EdgeColorButton.js +6 -12
- package/lib/core/editor/components/Toolbar/widgets/EdgeTypeButton/EdgeType.js +27 -9
- package/lib/core/editor/components/Toolbar/widgets/EdgeTypeButton/EdgeType.module.scss +21 -1
- package/lib/core/editor/components/Toolbar/widgets/EdgeTypeButton/LineType.js +8 -0
- package/lib/core/editor/components/Toolbar/widgets/EdgeTypeButton/index.js +1 -1
- package/lib/core/editor/components/Toolbar/widgets/Layout/index.js +16 -2
- package/lib/core/editor/components/settings/common/NodeSizeInput/NodeSizeInput.js +5 -5
- package/lib/core/editor/components/settings/common/SizeInput/NodeSizeInput.js +1 -1
- package/lib/core/editor/components/settings/propertyViews/layer/BasicSetting.js +1 -1
- package/lib/core/editor/components/settings/propertyViews/layer/SettingTab/Setting.js +3 -3
- package/lib/core/editor/components/settings/propertyViews/view/hooks/useBackgroundSizeConfig.js +2 -2
- package/lib/core/editor/hooks/useKeyboardShortcut.js +2 -0
- package/lib/core/editor/store/background.js +1 -1
- package/lib/core/editor/store/historyManager.js +1 -1
- package/lib/core/editor/store/topoEdit.js +1 -1
- package/lib/core/editor/utils/copyElementUtil.js +15 -0
- package/lib/core/editor/utils/edgeTypeStyleUtil.js +8 -6
- package/lib/core/hooks/ht/useHtDataPropertyChangeListener.js +1 -3
- package/lib/core/hooks/useAlarm.js +130 -79
- package/lib/core/hooks/useCiAttributeChange.js +1 -1
- package/lib/core/hooks/useCmpLinkAlarm.js +166 -0
- package/lib/core/hooks/useEventData.js +1 -2
- package/lib/core/hooks/useGraphAlarmDisplay.js +91 -55
- package/lib/core/hooks/useManageStatus.js +1 -1
- package/lib/core/hooks/usePolling.js +3 -3
- package/lib/core/hooks/useResourceConfig.js +1 -3
- package/lib/core/hooks/useTopoEdit.js +50 -53
- package/lib/core/models/Alarm.js +76 -152
- package/lib/core/models/AttributeMetricDisplay.js +18 -6
- package/lib/core/models/HistoryManager.js +8 -8
- package/lib/core/models/SelectionModel.js +5 -5
- package/lib/core/models/TopoApp.js +4 -6
- package/lib/core/models/attributeFormatter/formatter/graphTransform.js +2 -4
- package/lib/core/models/attributeFormatter/index.js +1 -1
- package/lib/core/models/cache/CiCache.d.ts +1 -1
- package/lib/core/models/cache/CiCache.js +3 -3
- package/lib/core/models/cache/CiTypeCache.js +6 -2
- package/lib/core/models/cache/DictCache.js +2 -2
- package/lib/core/models/plugins/resourceWebControllUrl.js +2 -2
- package/lib/core/models/tagstips/ElementTagTipConfig.js +2 -2
- package/lib/core/models/topoData.js +0 -1
- package/lib/core/services/alarm.js +2 -2
- package/lib/core/services/index.js +1 -1
- package/lib/core/services/topo/basic.js +2 -2
- package/lib/core/store/models/customIcon.js +3 -3
- package/lib/core/store/models/displayConfig.js +1 -1
- package/lib/core/store/models/selection.js +1 -1
- package/lib/core/store/models/topoBaseInfoOverview.js +1 -1
- package/lib/core/store/models/topoBizMod.js +1 -1
- package/lib/core/store/models/topoConfig.js +7 -10
- package/lib/core/store/models/topoGraphView.js +1 -1
- package/lib/core/store/models/topoMod.js +89 -142
- package/lib/core/store/models/viewer/lock.js +1 -1
- package/lib/core/store/models/viewer/resourceDetail.js +1 -1
- package/lib/core/store/models/viewer/resourceWebControllUrlSetting.js +1 -1
- package/lib/core/utils/edgeUtil.js +12 -1
- package/lib/core/utils/metricUtil.js +8 -4
- package/lib/core/utils/showGraphManageStatusUtil.js +3 -2
- package/lib/core/utils/showMessage.js +2 -2
- package/lib/core/viewer/components/plugins/ResourceDetail/ResourceDetail.js +1 -0
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/EventsCard.js +48 -21
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/ResourceOverview.js +3 -1
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/LinkTopoCard.js +4 -2
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/hooks/useMetricPolling.js +6 -6
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/services/index.js +3 -5
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/hooks/useAlarmAndRiskData.js +20 -18
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/index.module.scss +8 -0
- package/lib/core/viewer/components/plugins/ResourceDetail/components/WebConsole/WebConsoleForm/hooks/useWebConsole.js +2 -2
- package/lib/core/viewer/components/plugins/ViewerPlugin.js +3 -1
- package/lib/core/viewer/components/titlebar/widgets/AlarmButton.js +1 -5
- package/lib/networkTopo/components/Link/index.js +2 -2
- package/lib/networkTopo/components/TopoView.js +5 -14
- package/lib/networkTopo/hooks/useEdgeExpand.js +2 -3
- package/lib/networkTopo/hooks/viewer/useRelateTopo.js +4 -4
- package/lib/networkTopo/models/LinkDynamicStyleExecutor.js +3 -5
- package/lib/networkTopo/models/LinkTagsTipsBuilder.js +3 -3
- package/lib/networkTopo/models/TopoCenter.js +1 -1
- package/lib/networkTopo/services/model.js +1 -3
- package/lib/networkTopo/services/topo/basic.js +4 -6
- package/lib/networkTopo/services/topo/ciInfo.js +0 -2
- package/lib/networkTopo/store/functionAuth.js +1 -1
- package/lib/networkTopo/store/topoCenter.js +263 -226
- package/lib/networkTopo/store/topoTreeMod.js +5 -5
- package/lib/networkTopo/utils/exportData.js +1 -3
- package/lib/style.js +2 -2
- package/lib/utils/ResourceConfigUtil.js +4 -39
- package/lib/utils/ciRefAttributeTranslateUtil.d.ts +19 -0
- package/lib/utils/ciRefAttributeTranslateUtil.js +168 -0
- package/lib/utils/format.js +1 -1
- package/lib/utils/topoData.js +4 -2
- package/package.json +4 -4
@@ -7,7 +7,7 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
7
7
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
|
8
8
|
var _excluded = ["value", "defaultSet", "dataSource"];
|
9
9
|
import React, { useState, useMemo, useEffect } from 'react';
|
10
|
-
import rlog from '@riil-frontend/component-topology-utils
|
10
|
+
import { rlog } from '@riil-frontend/component-topology-utils';
|
11
11
|
import ActionTree from '@riil-frontend/component-action-tree';
|
12
12
|
import NoDataPage from '@riil-frontend/component-topology-common/es/components/NoDataPage';
|
13
13
|
import TableLayout from '@riil-frontend/component-table-layout';
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import React, { useState, useEffect, useRef, useImperativeHandle, forwardRef } from 'react';
|
2
|
-
import rlog from '@riil-frontend/component-topology-utils
|
2
|
+
import { rlog } from '@riil-frontend/component-topology-utils';
|
3
3
|
import ModelAttrSelectDrawer from "./ModelAttrSelectDrawer";
|
4
4
|
|
5
5
|
function parseValue(value) {
|
@@ -2,7 +2,7 @@ import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
2
2
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
3
3
|
import React, { useState, useEffect, useRef, useCallback } from 'react';
|
4
4
|
import PropTypes from 'prop-types';
|
5
|
-
import rlog from '@riil-frontend/component-topology-utils
|
5
|
+
import { rlog } from '@riil-frontend/component-topology-utils';
|
6
6
|
import Drawer from "../Drawer";
|
7
7
|
import ResourceSelectList from "./ResourceSelectList";
|
8
8
|
import styles from "./ResourceSelectDrawer.module.scss";
|
@@ -1,3 +1,5 @@
|
|
1
|
+
import _Balloon from "@alifd/next/es/balloon";
|
2
|
+
import _extends from "@babel/runtime/helpers/extends";
|
1
3
|
import _List from "@alifd/next/es/list";
|
2
4
|
import _Icon from "@alifd/next/es/icon";
|
3
5
|
import React, { useState, useEffect } from 'react';
|
@@ -30,7 +32,8 @@ function AlarmListItem(props) {
|
|
30
32
|
// 传入参数
|
31
33
|
var topo = props.topo,
|
32
34
|
alarmInfo = props.alarmInfo,
|
33
|
-
onClick = props.onClick;
|
35
|
+
onClick = props.onClick; // console.log("AlarmListPanel", topo, alarmInfo);
|
36
|
+
|
34
37
|
return /*#__PURE__*/React.createElement(_List.Item, {
|
35
38
|
className: styles.AlarmListItem,
|
36
39
|
media: /*#__PURE__*/React.createElement(_Icon, {
|
@@ -85,10 +88,62 @@ function RiskListItem(props) {
|
|
85
88
|
}, "\u67E5\u770B\u8BE6\u60C5"))));
|
86
89
|
}
|
87
90
|
|
91
|
+
function SubListItem(props) {
|
92
|
+
// 传入参数
|
93
|
+
var topo = props.topo,
|
94
|
+
alarmInfo = props.alarmInfo,
|
95
|
+
onClick = props.onClick;
|
96
|
+
var creatAlarmTips = topo.viewProps.creatAlarmTips;
|
97
|
+
var subNode = topo.getData().nodes.find(function (node) {
|
98
|
+
return node.ciId === alarmInfo.mainCiId;
|
99
|
+
});
|
100
|
+
var plarm = alarmInfo.cmpCode ? "\u3010" + (subNode === null || subNode === void 0 ? void 0 : subNode.sourceName) + "\u3011" : "【本级平台】";
|
101
|
+
return /*#__PURE__*/React.createElement(_List.Item, {
|
102
|
+
className: styles.AlarmListItem,
|
103
|
+
media: /*#__PURE__*/React.createElement(_Icon, {
|
104
|
+
type: "gaojing-3",
|
105
|
+
size: "xs",
|
106
|
+
className: styles["alarm-color-icon"] + " alarm-color-icon-lv" + alarmInfo.alertLevel
|
107
|
+
})
|
108
|
+
}, /*#__PURE__*/React.createElement("span", {
|
109
|
+
className: styles.content
|
110
|
+
}, /*#__PURE__*/React.createElement("div", {
|
111
|
+
className: styles.list,
|
112
|
+
onClick: function onClick() {
|
113
|
+
getNode(topo, alarmInfo);
|
114
|
+
}
|
115
|
+
}, "" + plarm + alarmInfo.alertObject + alarmInfo.alertTitle), alarmInfo.cmpCode ? /*#__PURE__*/React.createElement(_Balloon, {
|
116
|
+
trigger: /*#__PURE__*/React.createElement("span", {
|
117
|
+
className: styles.listLink
|
118
|
+
}, "\u67E5\u770B\u8BE6\u60C5"),
|
119
|
+
closable: true,
|
120
|
+
triggerType: "click",
|
121
|
+
align: "bl",
|
122
|
+
popupClassName: styles["enjoydata-alarm-table-balloon"],
|
123
|
+
popupStyle: {
|
124
|
+
maxWidth: "700px",
|
125
|
+
width: 530
|
126
|
+
}
|
127
|
+
}, creatAlarmTips(_extends({}, alarmInfo, {
|
128
|
+
sourceName: plarm
|
129
|
+
}))) : /*#__PURE__*/React.createElement("div", {
|
130
|
+
className: styles.listLink
|
131
|
+
}, /*#__PURE__*/React.createElement(Link, {
|
132
|
+
onClick: onClick,
|
133
|
+
to: alarmLink(alarmInfo)
|
134
|
+
}, "\u67E5\u770B\u8BE6\u60C5"))));
|
135
|
+
}
|
136
|
+
|
88
137
|
function ListItem(props) {
|
89
|
-
var
|
90
|
-
|
91
|
-
|
138
|
+
var topo = props.topo,
|
139
|
+
alarmInfo = props.alarmInfo;
|
140
|
+
|
141
|
+
if (topo.isCMPTopo) {
|
142
|
+
return /*#__PURE__*/React.createElement(SubListItem, props);
|
143
|
+
} else {
|
144
|
+
var ListItemWidget = alarmInfo.eventType === "risk" ? RiskListItem : AlarmListItem;
|
145
|
+
return /*#__PURE__*/React.createElement(ListItemWidget, props);
|
146
|
+
}
|
92
147
|
}
|
93
148
|
|
94
149
|
export default ListItem;
|
@@ -3,7 +3,7 @@ import _Button from "@alifd/next/es/button";
|
|
3
3
|
import _Card from "@alifd/next/es/card";
|
4
4
|
import React, { useState, useEffect } from 'react';
|
5
5
|
import NoDataPage from '@riil-frontend/component-no-data-page';
|
6
|
-
import rlog from '@riil-frontend/component-topology-utils
|
6
|
+
import { rlog } from '@riil-frontend/component-topology-utils';
|
7
7
|
import AlarmListItem from "./components/AlarmListItem";
|
8
8
|
import styles from "./index.module.scss";
|
9
9
|
import { alarmListDemo } from "./mocks";
|
@@ -3,7 +3,7 @@ import _Form from "@alifd/next/es/form";
|
|
3
3
|
import _extends from "@babel/runtime/helpers/extends";
|
4
4
|
import _Field from "@alifd/next/es/field";
|
5
5
|
import React, { useEffect, useImperativeHandle, useState } from 'react';
|
6
|
-
import rlog from '@riil-frontend/component-topology-utils
|
6
|
+
import { rlog } from '@riil-frontend/component-topology-utils';
|
7
7
|
import NodeTag from "./NodeTag";
|
8
8
|
import EdgeFlow from "./EdgeFlow";
|
9
9
|
import NodeTip from "./NodeTip";
|
@@ -2,8 +2,8 @@ import _Message from "@alifd/next/es/message";
|
|
2
2
|
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
3
3
|
import _extends from "@babel/runtime/helpers/extends";
|
4
4
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
5
|
-
import React, {
|
6
|
-
import rlog from '@riil-frontend/component-topology-utils
|
5
|
+
import React, { useRef, useState } from 'react';
|
6
|
+
import { rlog } from '@riil-frontend/component-topology-utils';
|
7
7
|
import Drawer from "../../../components/Drawer";
|
8
8
|
import DisplaySetting from "./DisplaySetting";
|
9
9
|
import useDisplaySetting from "./hooks/useDisplaySetting";
|
@@ -2,7 +2,7 @@ import _Button from "@alifd/next/es/button";
|
|
2
2
|
import _Box from "@alifd/next/es/box";
|
3
3
|
import _Radio from "@alifd/next/es/radio";
|
4
4
|
import React, { useImperativeHandle, useRef } from 'react';
|
5
|
-
import rlog from '@riil-frontend/component-topology-utils
|
5
|
+
import { rlog } from '@riil-frontend/component-topology-utils';
|
6
6
|
import { DEFAULT_CUSTOM_CONFIG } from "../../../../constants/ResourceInfoDisplay";
|
7
7
|
import CommonCheckboxGroup from "./CommonCheckboxGroup";
|
8
8
|
import ResourceDiplayInfoSetting from "../../ResourceViewAttributeSetting/Setting";
|
@@ -3,7 +3,7 @@ import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutP
|
|
3
3
|
var _excluded = ["topo", "showType", "value"];
|
4
4
|
import React, { forwardRef, useEffect, useState } from 'react';
|
5
5
|
import PropTypes from 'prop-types';
|
6
|
-
import rlog from '@riil-frontend/component-topology-utils
|
6
|
+
import { rlog } from '@riil-frontend/component-topology-utils';
|
7
7
|
import ModelAttrSelectDrawer from "../../../../components/ModelAttrSelectDrawer";
|
8
8
|
import { getNodeModels } from "../../ResourceViewAttributeSetting/nodeCiTypeAttrUtil";
|
9
9
|
/**
|
@@ -2,7 +2,7 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
|
3
3
|
var _excluded = ["topo", "elementType", "showType", "value"];
|
4
4
|
import React, { forwardRef, useState } from 'react';
|
5
|
-
import rlog from '@riil-frontend/component-topology-utils
|
5
|
+
import { rlog } from '@riil-frontend/component-topology-utils';
|
6
6
|
import { getNodeModels } from "./nodeCiTypeAttrUtil";
|
7
7
|
import ModelAttrSelectDrawer from "../../../components/ModelAttrSelectDrawer";
|
8
8
|
/**
|
@@ -5,7 +5,7 @@ import PropTypes from 'prop-types';
|
|
5
5
|
import classnames from 'classnames';
|
6
6
|
import TopoGraph, { TopoEvent } from '@riil-frontend/component-topology-graph';
|
7
7
|
import PortalContainer from '@riil-frontend/component-topology-graph/es/components/PortalContainer';
|
8
|
-
import rlog from '@riil-frontend/component-topology-utils
|
8
|
+
import { rlog } from '@riil-frontend/component-topology-utils'; // 通用
|
9
9
|
|
10
10
|
import showMessage from "../../utils/showMessage";
|
11
11
|
import { TPL_TREE } from "../../../utils/template";
|
@@ -161,7 +161,11 @@ var Topology = function Topology(props) {
|
|
161
161
|
|
162
162
|
if (initSelectionId) {
|
163
163
|
var ele = topo.getHtTopo().getGraphView().dm().getDataByTag(initSelectionId);
|
164
|
-
|
164
|
+
|
165
|
+
if (ele) {
|
166
|
+
topo.getHtTopo().getGraphView().sm().setSelection([ele]);
|
167
|
+
}
|
168
|
+
|
165
169
|
var selectionDispatchers = topo.store.getModelDispatchers('selection');
|
166
170
|
selectionDispatchers.update({
|
167
171
|
initSelectionId: null
|
@@ -13,7 +13,7 @@ import UploadDialog from "./UploadDialog";
|
|
13
13
|
import api from "../../../services/background";
|
14
14
|
import { getBackgroundImageUrl, getBackgroundThumbnailImageUrl } from "../../../utils/backgroundUtil";
|
15
15
|
import { getImageSize } from "../../../utils/imageUtil";
|
16
|
-
import rlog from '@riil-frontend/component-topology-utils
|
16
|
+
import { rlog } from '@riil-frontend/component-topology-utils';
|
17
17
|
|
18
18
|
function List(props) {
|
19
19
|
var selected = props.selected,
|
@@ -11,7 +11,7 @@ import React from 'react';
|
|
11
11
|
import topoServer from '@riil-frontend/component-topology-common/es/services/topo/index';
|
12
12
|
import _ from 'lodash';
|
13
13
|
import { getToken } from '@riil-frontend/utils';
|
14
|
-
import rlog from '@riil-frontend/component-topology-utils
|
14
|
+
import { rlog } from '@riil-frontend/component-topology-utils';
|
15
15
|
import { validateSpecialCharacter } from "../../../../utils/SpecialCharacterValidateUtil";
|
16
16
|
import "./UploadIconDialog.scss";
|
17
17
|
import styles from "./UploadIconDialog.module.scss";
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
2
2
|
import React, { useEffect } from 'react';
|
3
|
-
import rlog from '@riil-frontend/component-topology-utils
|
3
|
+
import { rlog } from '@riil-frontend/component-topology-utils';
|
4
4
|
import CustomIconPlugin from "./CustomIconPlugin";
|
5
5
|
import SaveLoading from "./plugins/SaveLoading";
|
6
6
|
import GroupAddResourceDrawerPlugin from "./GroupAddResourceDrawerPlugin";
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import React, { useEffect, useRef, useMemo } from 'react';
|
2
|
-
import rlog from '@riil-frontend/component-topology-utils
|
2
|
+
import { rlog } from '@riil-frontend/component-topology-utils';
|
3
3
|
import { getUserCustomIconsForHt } from "../../../../../common/icons/icon";
|
4
4
|
import HtCustomImagePanel from "./HtCustomImagePanel";
|
5
5
|
/**
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import React, { useEffect, useRef } from 'react';
|
2
2
|
import ResizeObserver from 'resize-observer-polyfill';
|
3
|
-
import rlog from '@riil-frontend/component-topology-utils
|
3
|
+
import { rlog } from '@riil-frontend/component-topology-utils';
|
4
4
|
import styles from "./HtImagePalette.module.scss";
|
5
5
|
/**
|
6
6
|
* 组件面板
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import React, { useEffect, useRef } from 'react';
|
2
|
-
import rlog from '@riil-frontend/component-topology-utils
|
2
|
+
import { rlog } from '@riil-frontend/component-topology-utils';
|
3
3
|
import ResizeObserver from 'resize-observer-polyfill';
|
4
4
|
import styles from "./HtImagePalette.module.scss";
|
5
5
|
/**
|
@@ -1,6 +1,7 @@
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
2
2
|
import React, { useEffect, useState } from 'react';
|
3
3
|
import { getEdgesBySelection } from "../../../../utils/edgeTypeStyleUtil";
|
4
|
+
import { isCustomEdge } from "../../../../../utils/edgeUtil";
|
4
5
|
import DropdownButton from "../components/DropdownButton";
|
5
6
|
import WidgetBox from "../WidgetBox";
|
6
7
|
import Content from "./Content";
|
@@ -36,15 +37,7 @@ function EdgeColorButton(props) {
|
|
36
37
|
};
|
37
38
|
|
38
39
|
var getLines = function getLines(list) {
|
39
|
-
|
40
|
-
var arr = [];
|
41
|
-
loopEdges(list, function (edge) {
|
42
|
-
// eslint-disable-next-line eqeqeq
|
43
|
-
if (edge.getAttrObject().type == 'line') {
|
44
|
-
arr.push(edge);
|
45
|
-
}
|
46
|
-
});
|
47
|
-
return arr;
|
40
|
+
return list.filter(isCustomEdge);
|
48
41
|
};
|
49
42
|
|
50
43
|
useEffect(function () {
|
@@ -53,7 +46,7 @@ function EdgeColorButton(props) {
|
|
53
46
|
var list = getLines(edges);
|
54
47
|
setLineWidth(1); // eslint-disable-next-line eqeqeq
|
55
48
|
|
56
|
-
if (selection.length == 1 &&
|
49
|
+
if (selection.length == 1 && list.length === 1) {
|
57
50
|
setLineWidth(list[0] && (list[0].a('styles') && list[0].a('styles').width || list[0].getStyleMap()['edge.width']) || 2);
|
58
51
|
}
|
59
52
|
|
@@ -67,7 +60,7 @@ function EdgeColorButton(props) {
|
|
67
60
|
var edges = getEdgesBySelection(topo);
|
68
61
|
loopEdges(edges, function (edge) {
|
69
62
|
// eslint-disable-next-line eqeqeq
|
70
|
-
if (edge
|
63
|
+
if (isCustomEdge(edge)) {
|
71
64
|
var color = colors.hex;
|
72
65
|
edge.s('edge.color', color);
|
73
66
|
edge.s('edge.dash.color', color);
|
@@ -95,7 +88,7 @@ function EdgeColorButton(props) {
|
|
95
88
|
topo.historyManager.beginTransaction();
|
96
89
|
loopEdges(edges, function (edge) {
|
97
90
|
// eslint-disable-next-line eqeqeq
|
98
|
-
if (edge
|
91
|
+
if (isCustomEdge(edge)) {
|
99
92
|
edge.s('edge.dash.width', width);
|
100
93
|
edge.s('edge.width', width);
|
101
94
|
var style = edge.a('styles') || {};
|
@@ -1,8 +1,9 @@
|
|
1
|
+
import _Box from "@alifd/next/es/box";
|
1
2
|
import _Field from "@alifd/next/es/field";
|
2
3
|
import _Select from "@alifd/next/es/select";
|
3
4
|
import _Form from "@alifd/next/es/form";
|
4
5
|
import React, { useEffect, useState } from 'react';
|
5
|
-
import { getEdgesBySelection,
|
6
|
+
import { getEdgesBySelection, isNodeAllEdges } from "../../../../utils/edgeTypeStyleUtil";
|
6
7
|
import styles from "./EdgeType.module.scss";
|
7
8
|
import LineType from "./LineType";
|
8
9
|
var FormItem = _Form.Item;
|
@@ -142,12 +143,19 @@ function EdgeType(props) {
|
|
142
143
|
className: styles.lineBox
|
143
144
|
}, /*#__PURE__*/React.createElement(_Form, {
|
144
145
|
field: field,
|
145
|
-
inline: true,
|
146
146
|
labelAlign: "top"
|
147
147
|
}, /*#__PURE__*/React.createElement(FormItem, null, /*#__PURE__*/React.createElement(LineType, {
|
148
148
|
name: "lineButton"
|
149
|
-
})), /*#__PURE__*/React.createElement(
|
150
|
-
|
149
|
+
})), /*#__PURE__*/React.createElement(_Form.Item, null, /*#__PURE__*/React.createElement(_Box, {
|
150
|
+
direction: "row",
|
151
|
+
style: {
|
152
|
+
gap: 8
|
153
|
+
}
|
154
|
+
}, /*#__PURE__*/React.createElement(FormItem, {
|
155
|
+
label: "\u8D77\u70B9",
|
156
|
+
style: {
|
157
|
+
margin: 0
|
158
|
+
}
|
151
159
|
}, /*#__PURE__*/React.createElement(_Select, {
|
152
160
|
name: "startPoint",
|
153
161
|
placeholder: " ",
|
@@ -155,7 +163,8 @@ function EdgeType(props) {
|
|
155
163
|
container: function container(trigger) {
|
156
164
|
return trigger.parentNode;
|
157
165
|
}
|
158
|
-
}
|
166
|
+
},
|
167
|
+
className: styles.endPointSelect
|
159
168
|
}, START_TYPE_OPTIONS.map(function (item, index) {
|
160
169
|
return /*#__PURE__*/React.createElement(Option, {
|
161
170
|
value: item.value,
|
@@ -168,7 +177,10 @@ function EdgeType(props) {
|
|
168
177
|
className: styles.iconImg
|
169
178
|
}));
|
170
179
|
}))), /*#__PURE__*/React.createElement(FormItem, {
|
171
|
-
label: "\u7EC8\u70B9"
|
180
|
+
label: "\u7EC8\u70B9",
|
181
|
+
style: {
|
182
|
+
margin: 0
|
183
|
+
}
|
172
184
|
}, /*#__PURE__*/React.createElement(_Select, {
|
173
185
|
name: "endPoint",
|
174
186
|
placeholder: " ",
|
@@ -176,7 +188,8 @@ function EdgeType(props) {
|
|
176
188
|
container: function container(trigger) {
|
177
189
|
return trigger.parentNode;
|
178
190
|
}
|
179
|
-
}
|
191
|
+
},
|
192
|
+
className: styles.endPointSelect
|
180
193
|
}, END_TYPE_OPTIONS.map(function (item, index) {
|
181
194
|
return /*#__PURE__*/React.createElement(Option, {
|
182
195
|
value: item.value,
|
@@ -189,7 +202,10 @@ function EdgeType(props) {
|
|
189
202
|
className: styles.iconImg
|
190
203
|
}));
|
191
204
|
}))), /*#__PURE__*/React.createElement(FormItem, {
|
192
|
-
label: "\u7C7B\u578B"
|
205
|
+
label: "\u7C7B\u578B",
|
206
|
+
style: {
|
207
|
+
margin: 0
|
208
|
+
}
|
193
209
|
}, /*#__PURE__*/React.createElement(_Select, {
|
194
210
|
name: "lineMold",
|
195
211
|
popupProps: {
|
@@ -197,7 +213,8 @@ function EdgeType(props) {
|
|
197
213
|
return trigger.parentNode;
|
198
214
|
}
|
199
215
|
},
|
200
|
-
placeholder: " "
|
216
|
+
placeholder: " ",
|
217
|
+
className: styles.lineMoldSelect
|
201
218
|
}, LINE_MOLD_OPTIONS.map(function (item, index) {
|
202
219
|
return /*#__PURE__*/React.createElement(Option, {
|
203
220
|
value: item.value,
|
@@ -209,7 +226,7 @@ function EdgeType(props) {
|
|
209
226
|
alt: "",
|
210
227
|
className: styles.iconImg
|
211
228
|
}));
|
212
|
-
})))));
|
229
|
+
})))))));
|
213
230
|
}
|
214
231
|
|
215
232
|
EdgeType.defaultProps = {
|
@@ -1,10 +1,30 @@
|
|
1
1
|
@import '~@alifd/next/variables.scss';
|
2
2
|
|
3
3
|
.lineBox{
|
4
|
-
width: 236px;
|
5
4
|
background: #FFFFFF;
|
6
5
|
border-radius: 4px;
|
7
6
|
margin-bottom: -7px;
|
7
|
+
|
8
|
+
.endPointSelect {
|
9
|
+
min-width: 0;
|
10
|
+
width: 64px;
|
11
|
+
:global {
|
12
|
+
.#{$css-prefix}select-inner {
|
13
|
+
min-width:0 !important;
|
14
|
+
}
|
15
|
+
}
|
16
|
+
}
|
17
|
+
|
18
|
+
.lineMoldSelect {
|
19
|
+
min-width: 0;
|
20
|
+
width: 88px;
|
21
|
+
:global {
|
22
|
+
.#{$css-prefix}select-inner {
|
23
|
+
min-width:0 !important;
|
24
|
+
}
|
25
|
+
}
|
26
|
+
}
|
27
|
+
|
8
28
|
:global {
|
9
29
|
.#{$css-prefix}form-item:first-child{
|
10
30
|
margin-top: 0;
|
@@ -38,6 +38,15 @@ var LINE_TYPE_OPTIONS = [{
|
|
38
38
|
// icon: 'topo_linear_icon_pointsline',
|
39
39
|
// },
|
40
40
|
];
|
41
|
+
|
42
|
+
if (localStorage.getItem('topo.test.edge.customType') === 'true') {
|
43
|
+
LINE_TYPE_OPTIONS.push({
|
44
|
+
value: 'points',
|
45
|
+
label: '自由线形',
|
46
|
+
icon: 'topo_linear_icon_pointsline'
|
47
|
+
});
|
48
|
+
}
|
49
|
+
|
41
50
|
var LineType = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
42
51
|
var value = props.value,
|
43
52
|
onChange = props.onChange,
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
2
2
|
import React, { useEffect, useState } from 'react';
|
3
|
-
import { getEdgesBySelection,
|
3
|
+
import { getEdgesBySelection, setEdgesType, updateEdgesData } from "../../../../utils/edgeTypeStyleUtil";
|
4
4
|
import DropdownButton from "../components/DropdownButton";
|
5
5
|
import WidgetBox from "../WidgetBox";
|
6
6
|
import { EDGE_END_POINT_TYPE_MAP, LINE_MOLD_MAP } from "./constants";
|
@@ -52,7 +52,7 @@ function EdgeTypeButton(props) {
|
|
52
52
|
return;
|
53
53
|
}
|
54
54
|
|
55
|
-
|
55
|
+
updateEdgesData(topo, edges, function (edge) {
|
56
56
|
if (name === 'startPoint') {
|
57
57
|
// 删除设置
|
58
58
|
['sourceArrow', 'sourceSolidCircle', 'sourceNoneCircle'].forEach(function (iconName) {
|
@@ -7,7 +7,7 @@ import React, { useState, useMemo } from 'react';
|
|
7
7
|
import LayoutSettings from "./components/LayoutSettings";
|
8
8
|
import WidgetBox from "../WidgetBox";
|
9
9
|
import DropdownButton from "../components/DropdownButton";
|
10
|
-
import { isGroup, isLayer } from "../../../../../../utils/htElementDataUtil";
|
10
|
+
import { isGroup, isLayer, isNode } from "../../../../../../utils/htElementDataUtil";
|
11
11
|
|
12
12
|
function Layout(props) {
|
13
13
|
var topo = props.topo,
|
@@ -24,6 +24,11 @@ function Layout(props) {
|
|
24
24
|
selection = _topo$store$useModelS.selection;
|
25
25
|
|
26
26
|
var setDisabled = function setDisabled(data) {
|
27
|
+
if (topoShowType !== 'layers' && selection.length === 1) {
|
28
|
+
//中心节点布局,选中一个节点非分层情况下,需要星型和树形布局亮起来
|
29
|
+
return data == 'rectangle' || data == 'hierarchical';
|
30
|
+
}
|
31
|
+
|
27
32
|
if (topoShowType == 'layers' && selection.length == 1 && !isGroup(selection[0])) {
|
28
33
|
return data != 'rectangle';
|
29
34
|
} else {
|
@@ -41,7 +46,11 @@ function Layout(props) {
|
|
41
46
|
|
42
47
|
|
43
48
|
if (topoShowType != 'layers' && selection.length == 1) {
|
44
|
-
|
49
|
+
if (layouType == 'hierarchical') {
|
50
|
+
topo.getHtTopo().layoutInContainer(layouType);
|
51
|
+
} else {
|
52
|
+
topo.getHtTopo().layoutTopoBySelectNode(layouType, selectionElements[0]);
|
53
|
+
}
|
45
54
|
} // eslint-disable-next-line eqeqeq
|
46
55
|
|
47
56
|
|
@@ -56,7 +65,7 @@ function Layout(props) {
|
|
56
65
|
topo.historyManager.beginTransaction();
|
57
66
|
setLayout(v); // eslint-disable-next-line eqeqeq
|
58
67
|
|
59
|
-
if (topoShowType != 'layers' && ((_selection$ = selection[0]) === null || _selection$ === void 0 ? void 0 : _selection$.className) != 'ht.Node' || topoShowType == 'partition' && selection.length == 1 || topoShowType == 'layers' && selection.length == 1) {
|
68
|
+
if (topoShowType != 'layers' && ((_selection$ = selection[0]) === null || _selection$ === void 0 ? void 0 : _selection$.className) != 'ht.Node' || topoShowType == 'partition' && selection.length == 1 || topoShowType == 'layers' && selection.length == 1 || topoShowType !== 'layers' && selection.length === 1) {
|
60
69
|
globalLayout(v);
|
61
70
|
}
|
62
71
|
|
@@ -135,6 +144,11 @@ function isLayoutEnabled(props) {
|
|
135
144
|
|
136
145
|
if (topoShowType !== 'layers' && !selection.length) {
|
137
146
|
return true;
|
147
|
+
} //中心节点布局,选中一个节点不是分层的情况下,按钮亮起
|
148
|
+
|
149
|
+
|
150
|
+
if (topoShowType !== 'layers' && selection.length === 1 && (isNode(selection[0]) || isGroup(selection[0]))) {
|
151
|
+
return true;
|
138
152
|
}
|
139
153
|
|
140
154
|
return false;
|
@@ -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
|
4
|
+
import { rlog } from '@riil-frontend/component-topology-utils';
|
5
5
|
import SizeInput from "../SizeInput";
|
6
6
|
var NODE_SIZE_LOCK = 'NODE_SIZE_LOCK';
|
7
7
|
/**
|
@@ -4,7 +4,7 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
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
|
7
|
+
import { rlog } from '@riil-frontend/component-topology-utils';
|
8
8
|
import NodeSizeNumberPicker from "./NodeSizeNumberPicker";
|
9
9
|
import styles from "./NodeSizeInput.module.scss";
|
10
10
|
var FormItem = _Form.Item;
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import _Form from "@alifd/next/es/form";
|
2
2
|
import _extends from "@babel/runtime/helpers/extends";
|
3
3
|
import _Field from "@alifd/next/es/field";
|
4
|
-
import rlog from '@riil-frontend/component-topology-utils
|
4
|
+
import { rlog } from '@riil-frontend/component-topology-utils';
|
5
5
|
import React, { useEffect } from 'react';
|
6
6
|
import { SPECIAL_CHARACTER_FORM_ITEM_VALIDATE_PROPS, validateSpecialCharacter } from "../../../../../../utils/SpecialCharacterValidateUtil";
|
7
7
|
import NameInput from "../../common/NameInput";
|
@@ -5,7 +5,7 @@ import _Input from "@alifd/next/es/input";
|
|
5
5
|
import _Field from "@alifd/next/es/field";
|
6
6
|
import _Collapse from "@alifd/next/es/collapse";
|
7
7
|
import React, { useState, useEffect } from 'react';
|
8
|
-
import rlog from '@riil-frontend/component-topology-utils
|
8
|
+
import { rlog } from '@riil-frontend/component-topology-utils';
|
9
9
|
import AlignSetting from "../../../common/AlignSetting"; // import BatchSetNodeSize from '../../view/BatchSetNodeSize';
|
10
10
|
|
11
11
|
import { SPECIAL_CHARACTER_FORM_ITEM_VALIDATE_PROPS, validateSpecialCharacter } from "../../../../../../../utils/SpecialCharacterValidateUtil"; // import LineType from '../../../common/LineType';
|
package/es/core/editor/components/settings/propertyViews/view/hooks/useBackgroundSizeConfig.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import rlog from '@riil-frontend/component-topology-utils
|
1
|
+
import { rlog } from '@riil-frontend/component-topology-utils';
|
2
2
|
import { useEffect, useState } from 'react';
|
3
3
|
import useDataModelDataPropertyChange from "../../../../../../common/hooks/ht/useDataModelDataPropertyChange";
|
4
4
|
export default (function (props) {
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import hotkeys from 'hotkeys-js';
|
2
2
|
import { useEffect } from 'react';
|
3
|
-
import { handleCopyHotkey, handlePasteHotkey } from "../utils/copyElementUtil";
|
3
|
+
import { destroyPasteEventListener, handleCopyHotkey, handlePasteHotkey, initPasteEventListener } from "../utils/copyElementUtil";
|
4
4
|
|
5
5
|
function initKeyboardShortcuts(props) {
|
6
6
|
var topo = props.topo,
|
@@ -35,8 +35,10 @@ function unbindKeyboardShortcuts(props) {
|
|
35
35
|
|
36
36
|
export default function useKeyboardShortcut(props) {
|
37
37
|
useEffect(function () {
|
38
|
+
initPasteEventListener();
|
38
39
|
initKeyboardShortcuts(props);
|
39
40
|
return function () {
|
41
|
+
destroyPasteEventListener();
|
40
42
|
unbindKeyboardShortcuts(props);
|
41
43
|
};
|
42
44
|
}, []);
|
@@ -5,7 +5,7 @@ import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
5
5
|
/**
|
6
6
|
* 背景图
|
7
7
|
*/
|
8
|
-
import rlog from '@riil-frontend/component-topology-utils
|
8
|
+
import { rlog } from '@riil-frontend/component-topology-utils';
|
9
9
|
export default {
|
10
10
|
// 定义 model 的初始 state
|
11
11
|
state: {
|