@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.
Files changed (228) hide show
  1. package/build/1.js +1 -1
  2. package/build/index.css +1 -1
  3. package/build/index.js +13 -13
  4. package/es/components/BatchAttrMetric/setting.js +1 -1
  5. package/es/components/ModelAttrSelectDrawer/components/MultipleTypeAttributeSelectDrawer.js +1 -1
  6. package/es/components/ResourceSelectDrawer/ResourceSelectDrawer.js +1 -1
  7. package/es/components/TemplateButton/index.module.scss +1 -1
  8. package/es/core/components/AlarmListPanel/components/AlarmListItem.js +59 -4
  9. package/es/core/components/AlarmListPanel/index.js +1 -1
  10. package/es/core/components/DisplaySettingDrawer/DisplaySetting.js +1 -1
  11. package/es/core/components/DisplaySettingDrawer/DisplaySettingDrawer.js +2 -2
  12. package/es/core/components/DisplaySettingDrawer/ResourceDisplay/BasicConfig.js +1 -1
  13. package/es/core/components/DisplaySettingDrawer/components/NodeAttrSettingDrawer.js +1 -1
  14. package/es/core/components/ResourceViewAttributeSetting/Setting.js +1 -1
  15. package/es/core/components/TopoView/topoView.js +6 -2
  16. package/es/core/editor/components/BackgroundView/index.js +1 -1
  17. package/es/core/editor/components/CustomIconPlugin/UploadIconDialog.js +1 -1
  18. package/es/core/editor/components/EditorPlugin.js +1 -1
  19. package/es/core/editor/components/Sidebar/views/ComponentPanel.js +1 -1
  20. package/es/core/editor/components/Sidebar/views/ImagePanel/CiTypeImagePanel.js +1 -1
  21. package/es/core/editor/components/Sidebar/views/ImagePanel/CustomImagePanel.js +1 -1
  22. package/es/core/editor/components/Sidebar/views/ImagePanel/HtCustomImagePanel.js +1 -1
  23. package/es/core/editor/components/Sidebar/views/ImagePanel/HtImagePalette.js +1 -1
  24. package/es/core/editor/components/Sidebar/views/ImagePanel/ImagePalette.js +1 -1
  25. package/es/core/editor/components/Sidebar/views/LinkPanel.js +1 -1
  26. package/es/core/editor/components/Toolbar/widgets/EdgeColorButton/EdgeColorButton.js +5 -12
  27. package/es/core/editor/components/Toolbar/widgets/EdgeTypeButton/EdgeType.js +27 -10
  28. package/es/core/editor/components/Toolbar/widgets/EdgeTypeButton/EdgeType.module.scss +21 -1
  29. package/es/core/editor/components/Toolbar/widgets/EdgeTypeButton/LineType.js +9 -0
  30. package/es/core/editor/components/Toolbar/widgets/EdgeTypeButton/index.js +2 -2
  31. package/es/core/editor/components/Toolbar/widgets/Layout/index.js +17 -3
  32. package/es/core/editor/components/settings/common/NodeSizeInput/NodeSizeInput.js +1 -1
  33. package/es/core/editor/components/settings/common/SizeInput/NodeSizeInput.js +1 -1
  34. package/es/core/editor/components/settings/propertyViews/layer/BasicSetting.js +1 -1
  35. package/es/core/editor/components/settings/propertyViews/layer/SettingTab/Setting.js +1 -1
  36. package/es/core/editor/components/settings/propertyViews/view/hooks/useBackgroundSizeConfig.js +1 -1
  37. package/es/core/editor/hooks/useKeyboardShortcut.js +3 -1
  38. package/es/core/editor/store/background.js +1 -1
  39. package/es/core/editor/store/historyManager.js +1 -1
  40. package/es/core/editor/store/topoEdit.js +1 -1
  41. package/es/core/editor/utils/copyElementUtil.js +12 -0
  42. package/es/core/editor/utils/edgeTypeStyleUtil.js +8 -7
  43. package/es/core/hooks/ht/useHtDataPropertyChangeListener.js +1 -1
  44. package/es/core/hooks/useAlarm.js +131 -81
  45. package/es/core/hooks/useCiAttributeChange.js +1 -1
  46. package/es/core/hooks/useCmpLinkAlarm.js +153 -0
  47. package/es/core/hooks/useEventData.js +1 -2
  48. package/es/core/hooks/useGraphAlarmDisplay.js +91 -56
  49. package/es/core/hooks/useManageStatus.js +1 -1
  50. package/es/core/hooks/usePolling.js +1 -1
  51. package/es/core/hooks/useResourceConfig.js +1 -3
  52. package/es/core/hooks/useTopoEdit.js +51 -54
  53. package/es/core/models/Alarm.js +69 -143
  54. package/es/core/models/AttributeMetricDisplay.js +15 -6
  55. package/es/core/models/HistoryManager.js +1 -1
  56. package/es/core/models/SelectionModel.js +1 -1
  57. package/es/core/models/TopoApp.js +2 -2
  58. package/es/core/models/attributeFormatter/formatter/graphTransform.js +1 -1
  59. package/es/core/models/attributeFormatter/index.js +1 -1
  60. package/es/core/models/cache/CiCache.d.ts +1 -1
  61. package/es/core/models/cache/CiCache.js +3 -3
  62. package/es/core/models/cache/CiTypeCache.js +5 -1
  63. package/es/core/models/cache/DictCache.js +1 -1
  64. package/es/core/models/plugins/resourceWebControllUrl.js +1 -1
  65. package/es/core/models/tagstips/ElementTagTipConfig.js +1 -1
  66. package/es/core/models/topoData.js +0 -1
  67. package/es/core/services/alarm.js +1 -1
  68. package/es/core/services/index.js +1 -1
  69. package/es/core/services/topo/basic.js +2 -2
  70. package/es/core/store/models/customIcon.js +1 -1
  71. package/es/core/store/models/displayConfig.js +1 -1
  72. package/es/core/store/models/selection.js +1 -1
  73. package/es/core/store/models/topoBaseInfoOverview.js +1 -1
  74. package/es/core/store/models/topoBizMod.js +1 -1
  75. package/es/core/store/models/topoConfig.js +7 -10
  76. package/es/core/store/models/topoGraphView.js +1 -1
  77. package/es/core/store/models/topoMod.js +82 -135
  78. package/es/core/store/models/viewer/lock.js +1 -1
  79. package/es/core/store/models/viewer/resourceDetail.js +1 -1
  80. package/es/core/store/models/viewer/resourceWebControllUrlSetting.js +1 -1
  81. package/es/core/utils/edgeUtil.js +10 -1
  82. package/es/core/utils/metricUtil.js +8 -4
  83. package/es/core/utils/showGraphManageStatusUtil.js +3 -2
  84. package/es/core/utils/showMessage.js +1 -1
  85. package/es/core/viewer/components/plugins/ResourceDetail/ResourceDetail.js +1 -0
  86. package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/EventsCard.js +46 -21
  87. package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/ResourceOverview.js +3 -1
  88. package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/LinkTopoCard.js +4 -2
  89. package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/hooks/useMetricPolling.js +1 -1
  90. package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/services/index.js +1 -1
  91. package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/hooks/useAlarmAndRiskData.js +20 -18
  92. package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/index.module.scss +8 -0
  93. package/es/core/viewer/components/plugins/ResourceDetail/components/WebConsole/WebConsoleForm/hooks/useWebConsole.js +1 -1
  94. package/es/core/viewer/components/plugins/ViewerPlugin.js +3 -1
  95. package/es/core/viewer/components/titlebar/widgets/AlarmButton.js +1 -5
  96. package/es/networkTopo/components/Link/index.js +1 -1
  97. package/es/networkTopo/components/TopoView.js +6 -11
  98. package/es/networkTopo/hooks/useEdgeExpand.js +2 -3
  99. package/es/networkTopo/hooks/viewer/useRelateTopo.js +1 -1
  100. package/es/networkTopo/models/LinkDynamicStyleExecutor.js +1 -1
  101. package/es/networkTopo/models/LinkTagsTipsBuilder.js +1 -1
  102. package/es/networkTopo/models/TopoCenter.js +1 -1
  103. package/es/networkTopo/services/model.js +1 -1
  104. package/es/networkTopo/services/topo/basic.js +4 -4
  105. package/es/networkTopo/services/topo/ciInfo.js +1 -1
  106. package/es/networkTopo/store/functionAuth.js +1 -1
  107. package/es/networkTopo/store/topoCenter.js +261 -224
  108. package/es/networkTopo/store/topoTreeMod.js +1 -1
  109. package/es/networkTopo/utils/exportData.js +1 -1
  110. package/es/style.js +2 -2
  111. package/es/utils/ResourceConfigUtil.js +4 -37
  112. package/es/utils/ciRefAttributeTranslateUtil.d.ts +19 -0
  113. package/es/utils/ciRefAttributeTranslateUtil.js +155 -0
  114. package/es/utils/format.js +1 -1
  115. package/es/utils/topoData.js +4 -2
  116. package/lib/components/BatchAttrMetric/setting.js +2 -2
  117. package/lib/components/ModelAttrSelectDrawer/components/MultipleTypeAttributeSelectDrawer.js +2 -2
  118. package/lib/components/ResourceSelectDrawer/ResourceSelectDrawer.js +2 -2
  119. package/lib/components/TemplateButton/index.module.scss +1 -1
  120. package/lib/core/components/AlarmListPanel/components/AlarmListItem.js +61 -4
  121. package/lib/core/components/AlarmListPanel/index.js +1 -1
  122. package/lib/core/components/DisplaySettingDrawer/DisplaySetting.js +2 -2
  123. package/lib/core/components/DisplaySettingDrawer/DisplaySettingDrawer.js +2 -2
  124. package/lib/core/components/DisplaySettingDrawer/ResourceDisplay/BasicConfig.js +3 -3
  125. package/lib/core/components/DisplaySettingDrawer/components/NodeAttrSettingDrawer.js +2 -2
  126. package/lib/core/components/ResourceViewAttributeSetting/Setting.js +2 -2
  127. package/lib/core/components/TopoView/topoView.js +14 -10
  128. package/lib/core/editor/components/BackgroundView/index.js +3 -3
  129. package/lib/core/editor/components/CustomIconPlugin/UploadIconDialog.js +2 -2
  130. package/lib/core/editor/components/EditorPlugin.js +3 -3
  131. package/lib/core/editor/components/Sidebar/views/ComponentPanel.js +2 -4
  132. package/lib/core/editor/components/Sidebar/views/ImagePanel/CiTypeImagePanel.js +1 -1
  133. package/lib/core/editor/components/Sidebar/views/ImagePanel/CustomImagePanel.js +1 -1
  134. package/lib/core/editor/components/Sidebar/views/ImagePanel/HtCustomImagePanel.js +2 -2
  135. package/lib/core/editor/components/Sidebar/views/ImagePanel/HtImagePalette.js +2 -2
  136. package/lib/core/editor/components/Sidebar/views/ImagePanel/ImagePalette.js +2 -4
  137. package/lib/core/editor/components/Sidebar/views/LinkPanel.js +2 -4
  138. package/lib/core/editor/components/Toolbar/widgets/EdgeColorButton/EdgeColorButton.js +6 -12
  139. package/lib/core/editor/components/Toolbar/widgets/EdgeTypeButton/EdgeType.js +27 -9
  140. package/lib/core/editor/components/Toolbar/widgets/EdgeTypeButton/EdgeType.module.scss +21 -1
  141. package/lib/core/editor/components/Toolbar/widgets/EdgeTypeButton/LineType.js +8 -0
  142. package/lib/core/editor/components/Toolbar/widgets/EdgeTypeButton/index.js +1 -1
  143. package/lib/core/editor/components/Toolbar/widgets/Layout/index.js +16 -2
  144. package/lib/core/editor/components/settings/common/NodeSizeInput/NodeSizeInput.js +5 -5
  145. package/lib/core/editor/components/settings/common/SizeInput/NodeSizeInput.js +1 -1
  146. package/lib/core/editor/components/settings/propertyViews/layer/BasicSetting.js +1 -1
  147. package/lib/core/editor/components/settings/propertyViews/layer/SettingTab/Setting.js +3 -3
  148. package/lib/core/editor/components/settings/propertyViews/view/hooks/useBackgroundSizeConfig.js +2 -2
  149. package/lib/core/editor/hooks/useKeyboardShortcut.js +2 -0
  150. package/lib/core/editor/store/background.js +1 -1
  151. package/lib/core/editor/store/historyManager.js +1 -1
  152. package/lib/core/editor/store/topoEdit.js +1 -1
  153. package/lib/core/editor/utils/copyElementUtil.js +15 -0
  154. package/lib/core/editor/utils/edgeTypeStyleUtil.js +8 -6
  155. package/lib/core/hooks/ht/useHtDataPropertyChangeListener.js +1 -3
  156. package/lib/core/hooks/useAlarm.js +130 -79
  157. package/lib/core/hooks/useCiAttributeChange.js +1 -1
  158. package/lib/core/hooks/useCmpLinkAlarm.js +166 -0
  159. package/lib/core/hooks/useEventData.js +1 -2
  160. package/lib/core/hooks/useGraphAlarmDisplay.js +91 -55
  161. package/lib/core/hooks/useManageStatus.js +1 -1
  162. package/lib/core/hooks/usePolling.js +3 -3
  163. package/lib/core/hooks/useResourceConfig.js +1 -3
  164. package/lib/core/hooks/useTopoEdit.js +50 -53
  165. package/lib/core/models/Alarm.js +76 -152
  166. package/lib/core/models/AttributeMetricDisplay.js +18 -6
  167. package/lib/core/models/HistoryManager.js +8 -8
  168. package/lib/core/models/SelectionModel.js +5 -5
  169. package/lib/core/models/TopoApp.js +4 -6
  170. package/lib/core/models/attributeFormatter/formatter/graphTransform.js +2 -4
  171. package/lib/core/models/attributeFormatter/index.js +1 -1
  172. package/lib/core/models/cache/CiCache.d.ts +1 -1
  173. package/lib/core/models/cache/CiCache.js +3 -3
  174. package/lib/core/models/cache/CiTypeCache.js +6 -2
  175. package/lib/core/models/cache/DictCache.js +2 -2
  176. package/lib/core/models/plugins/resourceWebControllUrl.js +2 -2
  177. package/lib/core/models/tagstips/ElementTagTipConfig.js +2 -2
  178. package/lib/core/models/topoData.js +0 -1
  179. package/lib/core/services/alarm.js +2 -2
  180. package/lib/core/services/index.js +1 -1
  181. package/lib/core/services/topo/basic.js +2 -2
  182. package/lib/core/store/models/customIcon.js +3 -3
  183. package/lib/core/store/models/displayConfig.js +1 -1
  184. package/lib/core/store/models/selection.js +1 -1
  185. package/lib/core/store/models/topoBaseInfoOverview.js +1 -1
  186. package/lib/core/store/models/topoBizMod.js +1 -1
  187. package/lib/core/store/models/topoConfig.js +7 -10
  188. package/lib/core/store/models/topoGraphView.js +1 -1
  189. package/lib/core/store/models/topoMod.js +89 -142
  190. package/lib/core/store/models/viewer/lock.js +1 -1
  191. package/lib/core/store/models/viewer/resourceDetail.js +1 -1
  192. package/lib/core/store/models/viewer/resourceWebControllUrlSetting.js +1 -1
  193. package/lib/core/utils/edgeUtil.js +12 -1
  194. package/lib/core/utils/metricUtil.js +8 -4
  195. package/lib/core/utils/showGraphManageStatusUtil.js +3 -2
  196. package/lib/core/utils/showMessage.js +2 -2
  197. package/lib/core/viewer/components/plugins/ResourceDetail/ResourceDetail.js +1 -0
  198. package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/EventsCard.js +48 -21
  199. package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/ResourceOverview.js +3 -1
  200. package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/LinkTopoCard.js +4 -2
  201. package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/hooks/useMetricPolling.js +6 -6
  202. package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/services/index.js +3 -5
  203. package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/hooks/useAlarmAndRiskData.js +20 -18
  204. package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/index.module.scss +8 -0
  205. package/lib/core/viewer/components/plugins/ResourceDetail/components/WebConsole/WebConsoleForm/hooks/useWebConsole.js +2 -2
  206. package/lib/core/viewer/components/plugins/ViewerPlugin.js +3 -1
  207. package/lib/core/viewer/components/titlebar/widgets/AlarmButton.js +1 -5
  208. package/lib/networkTopo/components/Link/index.js +2 -2
  209. package/lib/networkTopo/components/TopoView.js +5 -14
  210. package/lib/networkTopo/hooks/useEdgeExpand.js +2 -3
  211. package/lib/networkTopo/hooks/viewer/useRelateTopo.js +4 -4
  212. package/lib/networkTopo/models/LinkDynamicStyleExecutor.js +3 -5
  213. package/lib/networkTopo/models/LinkTagsTipsBuilder.js +3 -3
  214. package/lib/networkTopo/models/TopoCenter.js +1 -1
  215. package/lib/networkTopo/services/model.js +1 -3
  216. package/lib/networkTopo/services/topo/basic.js +4 -6
  217. package/lib/networkTopo/services/topo/ciInfo.js +0 -2
  218. package/lib/networkTopo/store/functionAuth.js +1 -1
  219. package/lib/networkTopo/store/topoCenter.js +263 -226
  220. package/lib/networkTopo/store/topoTreeMod.js +5 -5
  221. package/lib/networkTopo/utils/exportData.js +1 -3
  222. package/lib/style.js +2 -2
  223. package/lib/utils/ResourceConfigUtil.js +4 -39
  224. package/lib/utils/ciRefAttributeTranslateUtil.d.ts +19 -0
  225. package/lib/utils/ciRefAttributeTranslateUtil.js +168 -0
  226. package/lib/utils/format.js +1 -1
  227. package/lib/utils/topoData.js +4 -2
  228. 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/es/rlog';
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/es/rlog';
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/lib/rlog';
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";
@@ -26,7 +26,7 @@
26
26
  line-height: 20px;
27
27
  font-size: 18px;
28
28
  margin-top: 14px;
29
- color: $color-text1-3;
29
+ color: $color-text1-4;
30
30
  outline: none;
31
31
  }
32
32
 
@@ -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 alarmInfo = props.alarmInfo;
90
- var ListItemWidget = alarmInfo.eventType === 'risk' ? RiskListItem : AlarmListItem;
91
- return /*#__PURE__*/React.createElement(ListItemWidget, props);
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/es/rlog';
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/es/rlog';
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, { useEffect, useRef, useState } from 'react';
6
- import rlog from '@riil-frontend/component-topology-utils/lib/rlog';
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/es/rlog';
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/lib/rlog';
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/lib/rlog';
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/es/rlog'; // 通用
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
- topo.getHtTopo().getGraphView().sm().setSelection([ele]);
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/es/rlog';
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/es/rlog';
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/es/rlog';
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 } from 'react';
2
- import rlog from '@riil-frontend/component-topology-utils/es/rlog';
2
+ import { rlog } from '@riil-frontend/component-topology-utils';
3
3
  /**
4
4
  * 组件面板
5
5
  * @param {*} props
@@ -1,5 +1,5 @@
1
1
  import React, { useMemo } from 'react';
2
- import rlog from '@riil-frontend/component-topology-utils/es/rlog';
2
+ import { rlog } from '@riil-frontend/component-topology-utils';
3
3
  import ImagePalette from "./HtImagePalette";
4
4
  /**
5
5
  * 组件面板
@@ -1,5 +1,5 @@
1
1
  import React, { useEffect, useRef, useMemo } from 'react';
2
- import rlog from '@riil-frontend/component-topology-utils/es/rlog';
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/es/rlog';
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/es/rlog';
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,5 +1,5 @@
1
1
  import React, { useEffect, useRef } from 'react';
2
- import rlog from '@riil-frontend/component-topology-utils/es/rlog';
2
+ import { rlog } from '@riil-frontend/component-topology-utils';
3
3
  /**
4
4
  * 组件面板
5
5
  * @param {*} props
@@ -1,5 +1,5 @@
1
1
  import React, { useEffect, useRef } from 'react';
2
- import rlog from '@riil-frontend/component-topology-utils/es/rlog';
2
+ import { rlog } from '@riil-frontend/component-topology-utils';
3
3
  /**
4
4
  * 链路面板
5
5
  * @param {*} props
@@ -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
- // eslint-disable-next-line prefer-const
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 && selection[0].a('type') == 'line') {
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.getAttrObject().type == 'line') {
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.getAttrObject().type == 'line') {
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, loopEdgesAndChildren, isNodeAllEdges } from "../../../../utils/edgeTypeStyleUtil";
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(FormItem, {
150
- label: "\u8D77\u70B9"
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, setEdgesAndChildren, setEdgesType } from "../../../../utils/edgeTypeStyleUtil";
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
- setEdgesAndChildren(topo, edges, function (edge) {
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
- topo.getHtTopo().layoutInContainer(layouType);
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/es/rlog';
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/es/rlog';
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/es/rlog';
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/es/rlog';
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';
@@ -1,4 +1,4 @@
1
- import rlog from '@riil-frontend/component-topology-utils/es/rlog';
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/es/rlog';
8
+ import { rlog } from '@riil-frontend/component-topology-utils';
9
9
  export default {
10
10
  // 定义 model 的初始 state
11
11
  state: {