@riil-frontend/component-topology 11.0.28 → 11.0.30

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 (960) hide show
  1. package/README.md +2 -1
  2. package/build/1.js +2 -2
  3. package/build/2.js +1 -1
  4. package/build/index.css +4 -2
  5. package/build/index.js +50 -35
  6. package/es/common/components/ColorPicker/ColorPicker.js +18 -9
  7. package/es/common/components/ResourceTable/ResourceTable.js +9 -6
  8. package/es/common/plugins/useSelectionPlugin.js +23 -14
  9. package/es/components/BatchAttrMetric/constant.js +2 -2
  10. package/es/components/BatchAttrMetric/index.js +17 -10
  11. package/es/components/BatchAttrMetric/setting.js +52 -30
  12. package/es/components/BatchAttrMetric/utils.js +4 -2
  13. package/es/components/BooleanRadio.js +7 -5
  14. package/es/components/ColorPanel/components/ColorBlock/index.js +4 -3
  15. package/es/components/ColorPanel/components/FontColorRange/index.js +13 -9
  16. package/es/components/ColorPanel/index.js +40 -18
  17. package/es/components/Drawer/Drawer.js +18 -14
  18. package/es/components/FormTable/index.js +18 -13
  19. package/es/components/FullheightTab/FullheightTab.js +2 -0
  20. package/es/components/LayoutDirectionSelect/LayoutDirectionSelect.js +3 -6
  21. package/es/components/LayoutSelect/LayoutSelect.js +3 -6
  22. package/es/components/ModelAttrSelectDrawer/components/ModelAttrSelectDrawer.js +4 -4
  23. package/es/components/ModelAttrSelectDrawer/components/MultipleTypeAttributeSelectDrawer.js +20 -15
  24. package/es/components/MultiResourceDrawer/Content.js +22 -12
  25. package/es/components/MultiResourceDrawer/Dynamic.js +4 -2
  26. package/es/components/MultiResourceDrawer/ResourceCard/index.js +6 -4
  27. package/es/components/MultiResourceDrawer/ResourceSelect.js +4 -2
  28. package/es/components/MultiResourceDrawer/Static.js +4 -2
  29. package/es/components/MultiResourceDrawer/index.js +16 -8
  30. package/es/components/ResourceList/ResourceSelect.js +44 -27
  31. package/es/components/ResourceList/ResourceSelectConnect.js +7 -3
  32. package/es/components/ResourceSelect/ResourceSelectDrawer.js +11 -7
  33. package/es/components/ResourceSelectDrawer/ResourceSelectDrawer.js +27 -14
  34. package/es/components/ResourceSelectDrawer/ResourceSelectList.js +8 -4
  35. package/es/components/SingleResourceDrawer/SelectDrawer.js +15 -6
  36. package/es/components/SingleResourceDrawer/SingleResourceDrawer.js +14 -7
  37. package/es/components/TagImageSelect/index.js +11 -8
  38. package/es/components/TagSelect/index.js +12 -8
  39. package/es/components/TemplateButton/Icon.js +7 -5
  40. package/es/components/TemplateButton/index.js +9 -6
  41. package/es/components/VerticalIconTab/VerticalIconTab.js +11 -7
  42. package/es/components/collapse/Collapse.js +8 -4
  43. package/es/components/collapse/Panel.js +17 -7
  44. package/es/constants/ResourceInfoDisplay.js +6 -6
  45. package/es/constants/ResourceTypeLimit.js +11 -20
  46. package/es/contextmenu/createMenuCommands.js +8 -7
  47. package/es/core/common/contextmenu/mergeContextmenu.js +2 -2
  48. package/es/core/common/hooks/ht/useDataModelDataPropertyChange.js +2 -0
  49. package/es/core/common/hooks/useHtElement.js +2 -1
  50. package/es/core/common/hooks/useHtElements.js +6 -5
  51. package/es/core/common/icons/icon.js +18 -17
  52. package/es/core/common/icons/useIcons.js +4 -1
  53. package/es/core/components/AlarmListPanel/components/AlarmListItem.js +13 -4
  54. package/es/core/components/AlarmListPanel/hooks/useAlarmList.js +7 -2
  55. package/es/core/components/AlarmListPanel/index.js +4 -2
  56. package/es/core/components/DisplaySettingDrawer/DisplaySetting.js +17 -11
  57. package/es/core/components/DisplaySettingDrawer/DisplaySettingDrawer.js +23 -13
  58. package/es/core/components/DisplaySettingDrawer/EdgeFlow.js +3 -1
  59. package/es/core/components/DisplaySettingDrawer/EdgeFlowDirection.js +3 -1
  60. package/es/core/components/DisplaySettingDrawer/LineExpandAllRadioGroup.js +25 -14
  61. package/es/core/components/DisplaySettingDrawer/LinkTag.js +3 -3
  62. package/es/core/components/DisplaySettingDrawer/NodeTag.js +1 -1
  63. package/es/core/components/DisplaySettingDrawer/NodeTip.js +1 -1
  64. package/es/core/components/DisplaySettingDrawer/ResourceDisplay/BasicConfig.js +32 -25
  65. package/es/core/components/DisplaySettingDrawer/ResourceDisplay/CommonCheckboxGroup.js +7 -3
  66. package/es/core/components/DisplaySettingDrawer/components/NodeAttrSettingDrawer.js +9 -6
  67. package/es/core/components/DisplaySettingDrawer/demo/Demo.js +3 -4
  68. package/es/core/components/DisplaySettingDrawer/hooks/useDisplaySetting.js +33 -10
  69. package/es/core/components/DisplaySettingDrawer/tagtip/CustomSettingDrawer/CustomSetting.js +5 -3
  70. package/es/core/components/DisplaySettingDrawer/tagtip/CustomSettingDrawer/CustomSettingDrawer.js +2 -0
  71. package/es/core/components/ResourceViewAttributeSetting/Setting.js +12 -7
  72. package/es/core/components/ResourceViewAttributeSetting/nodeCiTypeAttrUtil.js +25 -7
  73. package/es/core/components/TopoView/GraphViewPanel.js +15 -10
  74. package/es/core/components/TopoView/topoView.js +62 -38
  75. package/es/core/components/titlebar/TitleBar.js +12 -4
  76. package/es/core/components/titlebar/widgets/TitleWidget.js +4 -2
  77. package/es/core/createTopoApp.js +1 -1
  78. package/es/core/editor/components/BackgroundView/UploadDialog/index.js +53 -21
  79. package/es/core/editor/components/BackgroundView/index.js +65 -24
  80. package/es/core/editor/components/BottomFloatTool/HelpIcon.js +15 -8
  81. package/es/core/editor/components/CustomIconPlugin/CustomIconPlugin.js +2 -5
  82. package/es/core/editor/components/CustomIconPlugin/RenameDialog.js +19 -7
  83. package/es/core/editor/components/CustomIconPlugin/UploadIconDialog.js +67 -24
  84. package/es/core/editor/components/CustomIconPlugin/UploadIconDialogWrapper.js +5 -3
  85. package/es/core/editor/components/CustomIconPlugin/utils/svgToShape.js +8 -3
  86. package/es/core/editor/components/EditorPlugin.js +8 -4
  87. package/es/core/editor/components/GroupAddResourceDrawerPlugin/GroupAddResourceDrawer.js +12 -6
  88. package/es/core/editor/components/GroupAddResourceDrawerPlugin/index.js +6 -6
  89. package/es/core/editor/components/Sidebar/Sidebar.js +17 -8
  90. package/es/core/editor/components/Sidebar/views/CanvasPanel/CanvasPanel.js +7 -5
  91. package/es/core/editor/components/Sidebar/views/CanvasPanel/hooks/useCanvasThemeConfig.js +30 -14
  92. package/es/core/editor/components/Sidebar/views/ComponentPanel.js +7 -7
  93. package/es/core/editor/components/Sidebar/views/ImagePanel/CiTypeImagePanel.js +2 -2
  94. package/es/core/editor/components/Sidebar/views/ImagePanel/CustomImagePanel.js +2 -2
  95. package/es/core/editor/components/Sidebar/views/ImagePanel/HtCustomImagePanel.js +10 -7
  96. package/es/core/editor/components/Sidebar/views/ImagePanel/HtImagePalette.js +10 -7
  97. package/es/core/editor/components/Sidebar/views/ImagePanel/ImagePalette.js +7 -7
  98. package/es/core/editor/components/Sidebar/views/ImagePanel/ImagePanel.js +12 -4
  99. package/es/core/editor/components/Sidebar/views/LinkPanel.js +8 -7
  100. package/es/core/editor/components/Toolbar/EditorToolbar.js +7 -2
  101. package/es/core/editor/components/Toolbar/Toolbar.js +2 -0
  102. package/es/core/editor/components/Toolbar/buttons.js +15 -30
  103. package/es/core/editor/components/Toolbar/components/Tooltip.js +3 -2
  104. package/es/core/editor/components/Toolbar/widgets/AddResourceButton.js +11 -8
  105. package/es/core/editor/components/Toolbar/widgets/BoxBackgroundButton/BoxBackgroundButton.js +13 -7
  106. package/es/core/editor/components/Toolbar/widgets/BoxBackgroundButton/BoxBackgroundSetting.js +42 -19
  107. package/es/core/editor/components/Toolbar/widgets/BoxBackgroundButton/BoxBackgroundUtil.js +29 -9
  108. package/es/core/editor/components/Toolbar/widgets/CanvasMoveWidget.js +7 -3
  109. package/es/core/editor/components/Toolbar/widgets/CanvasSelectWidget.js +7 -3
  110. package/es/core/editor/components/Toolbar/widgets/Divider.js +2 -0
  111. package/es/core/editor/components/Toolbar/widgets/EdgeColorButton/Content.js +8 -6
  112. package/es/core/editor/components/Toolbar/widgets/EdgeColorButton/EdgeColorButton.js +27 -13
  113. package/es/core/editor/components/Toolbar/widgets/EdgeTypeButton/EdgeType.js +20 -15
  114. package/es/core/editor/components/Toolbar/widgets/EdgeTypeButton/LineType.js +6 -5
  115. package/es/core/editor/components/Toolbar/widgets/EdgeTypeButton/constants.js +3 -2
  116. package/es/core/editor/components/Toolbar/widgets/EdgeTypeButton/index.js +27 -14
  117. package/es/core/editor/components/Toolbar/widgets/FontColorButton.js +44 -24
  118. package/es/core/editor/components/Toolbar/widgets/FontFamilyWidget.js +7 -4
  119. package/es/core/editor/components/Toolbar/widgets/FontSizeWidget.js +10 -8
  120. package/es/core/editor/components/Toolbar/widgets/FontStyleButton.js +27 -16
  121. package/es/core/editor/components/Toolbar/widgets/HistoryRedoButton.js +6 -2
  122. package/es/core/editor/components/Toolbar/widgets/HistoryUndoButton.js +8 -4
  123. package/es/core/editor/components/Toolbar/widgets/IconSelect/IconSelect.js +23 -9
  124. package/es/core/editor/components/Toolbar/widgets/IconSelect/index.js +23 -9
  125. package/es/core/editor/components/Toolbar/widgets/IconSelect/index.module.scss +1 -1
  126. package/es/core/editor/components/Toolbar/widgets/IconSelect/popUpContent.js +6 -2
  127. package/es/core/editor/components/Toolbar/widgets/Layout/components/LayoutSettings.js +14 -10
  128. package/es/core/editor/components/Toolbar/widgets/Layout/components/LayoutTagImageSelect/index.js +12 -9
  129. package/es/core/editor/components/Toolbar/widgets/Layout/components/LayoutTagSelect/index.js +16 -12
  130. package/es/core/editor/components/Toolbar/widgets/Layout/components/LayoutTemplateButton/Icon.js +7 -5
  131. package/es/core/editor/components/Toolbar/widgets/Layout/components/LayoutTemplateButton/index.js +9 -6
  132. package/es/core/editor/components/Toolbar/widgets/Layout/index.js +46 -27
  133. package/es/core/editor/components/Toolbar/widgets/NodeAlignWidget.js +33 -20
  134. package/es/core/editor/components/Toolbar/widgets/NodeImageButton/BoxBackgroundSetting.js +4 -2
  135. package/es/core/editor/components/Toolbar/widgets/NodeImageButton/NodeImageButton.js +18 -12
  136. package/es/core/editor/components/Toolbar/widgets/NodeSizeButton/BoxBackgroundSetting.js +2 -0
  137. package/es/core/editor/components/Toolbar/widgets/NodeSizeButton/NodeSizeButton.js +25 -16
  138. package/es/core/editor/components/Toolbar/widgets/SearchWidget.js +5 -1
  139. package/es/core/editor/components/Toolbar/widgets/WidgetBox.js +11 -6
  140. package/es/core/editor/components/Toolbar/widgets/components/ArrowButton.js +4 -2
  141. package/es/core/editor/components/Toolbar/widgets/components/ArrowPopup.js +4 -2
  142. package/es/core/editor/components/Toolbar/widgets/components/ButtonBox.js +9 -5
  143. package/es/core/editor/components/Toolbar/widgets/components/DropdownButton.js +18 -9
  144. package/es/core/editor/components/Toolbar/widgets/components/DropdownMenu.js +10 -5
  145. package/es/core/editor/components/Toolbar/widgets/components/MenuSelect.js +4 -2
  146. package/es/core/editor/components/Toolbar/widgets/components/textStyleSetting/ElementTextStyleSetting/ElementTextStyleSetting.js +11 -5
  147. package/es/core/editor/components/Toolbar/widgets/components/textStyleSetting/ElementTextStyleSetting/colorUtil.js +9 -4
  148. package/es/core/editor/components/Toolbar/widgets/components/textStyleSetting/ElementTextStyleSetting/elements/box.js +6 -4
  149. package/es/core/editor/components/Toolbar/widgets/components/textStyleSetting/ElementTextStyleSetting/elements/edgeTag.js +15 -6
  150. package/es/core/editor/components/Toolbar/widgets/components/textStyleSetting/ElementTextStyleSetting/elements/groupTitle.js +10 -5
  151. package/es/core/editor/components/Toolbar/widgets/components/textStyleSetting/ElementTextStyleSetting/elements/layerTitle.js +13 -6
  152. package/es/core/editor/components/Toolbar/widgets/components/textStyleSetting/ElementTextStyleSetting/elements/nodeTag.js +17 -7
  153. package/es/core/editor/components/Toolbar/widgets/components/textStyleSetting/ElementTextStyleSetting/elements/text.js +6 -2
  154. package/es/core/editor/components/Toolbar/widgets/components/textStyleSetting/ElementTextStyleSetting/textStyleUtil.js +24 -8
  155. package/es/core/editor/components/Toolbar/widgets/components/textStyleSetting/GlobalTagStyleSetting/GlobalTagStyleSetting.js +7 -3
  156. package/es/core/editor/components/Toolbar/widgets/components/textStyleSetting/GlobalTagStyleSetting/globalTag.js +33 -15
  157. package/es/core/editor/components/Toolbar/widgets/components/textStyleSetting/textStyleSettingRouter.js +2 -0
  158. package/es/core/editor/components/plugins/AddElementThemePlugin.js +2 -0
  159. package/es/core/editor/components/plugins/CorePlugin.js +5 -3
  160. package/es/core/editor/components/plugins/SaveLoading.js +4 -2
  161. package/es/core/editor/components/settings/CloseablePanel.js +5 -3
  162. package/es/core/editor/components/settings/PropertyView.js +17 -7
  163. package/es/core/editor/components/settings/Settings.js +13 -7
  164. package/es/core/editor/components/settings/common/AddResourceButton.js +2 -0
  165. package/es/core/editor/components/settings/common/AlignSetting/AlignTypeList.js +14 -11
  166. package/es/core/editor/components/settings/common/AlignSetting/index.js +11 -5
  167. package/es/core/editor/components/settings/common/GroupNodeList/ResourceList.js +10 -2
  168. package/es/core/editor/components/settings/common/LayoutSettings.js +15 -12
  169. package/es/core/editor/components/settings/common/LineType/index.js +2 -0
  170. package/es/core/editor/components/settings/common/NameInput.js +3 -1
  171. package/es/core/editor/components/settings/common/NodeSizeInput/NodeSizeInput.js +28 -9
  172. package/es/core/editor/components/settings/common/SizeInput/NodeSizeInput.js +20 -12
  173. package/es/core/editor/components/settings/common/SizeInput/NodeSizeNumberPicker.js +21 -10
  174. package/es/core/editor/components/settings/common/tab/TabView.js +2 -0
  175. package/es/core/editor/components/settings/common/text/FontStyleCheckbox.js +5 -1
  176. package/es/core/editor/components/settings/common/text/TextStyle.js +7 -2
  177. package/es/core/editor/components/settings/common/text/fontStyleUtil.js +6 -2
  178. package/es/core/editor/components/settings/core/PropertyViewManager.js +19 -0
  179. package/es/core/editor/components/settings/core/edgePropertyViewAdapter.js +2 -0
  180. package/es/core/editor/components/settings/core/getPropertyViewType.js +4 -0
  181. package/es/core/editor/components/settings/core/updateElementProperty.js +1 -0
  182. package/es/core/editor/components/settings/propertyViews/PropertyViewFactory.js +1 -0
  183. package/es/core/editor/components/settings/propertyViews/box/BoxPropertyView.js +9 -3
  184. package/es/core/editor/components/settings/propertyViews/box/BoxPropertyViewV1.js +8 -2
  185. package/es/core/editor/components/settings/propertyViews/box/NameInput.js +11 -3
  186. package/es/core/editor/components/settings/propertyViews/edge/CommonEdgePropertyView.js +13 -5
  187. package/es/core/editor/components/settings/propertyViews/edge/EdgeGroupPropertyView.js +2 -0
  188. package/es/core/editor/components/settings/propertyViews/edge/EdgePropertyView.js +10 -4
  189. package/es/core/editor/components/settings/propertyViews/edge/edgeGroup/EdgeGroupSetting.js +9 -3
  190. package/es/core/editor/components/settings/propertyViews/group/DataTab/GroupAddResourceButton.js +4 -2
  191. package/es/core/editor/components/settings/propertyViews/group/DataTab/GroupNodeList.js +8 -7
  192. package/es/core/editor/components/settings/propertyViews/group/DataTab/GroupRelateData/GroupRelateData.js +10 -4
  193. package/es/core/editor/components/settings/propertyViews/group/DataTab/RelateData.js +4 -4
  194. package/es/core/editor/components/settings/propertyViews/group/DataTab/hoooks/useGroupRelateResource.js +12 -11
  195. package/es/core/editor/components/settings/propertyViews/group/GroupPropertyView.js +3 -3
  196. package/es/core/editor/components/settings/propertyViews/group/GroupPropertyViewV1.js +3 -3
  197. package/es/core/editor/components/settings/propertyViews/group/SettingTab/GroupBasicSetting.js +11 -7
  198. package/es/core/editor/components/settings/propertyViews/group/SettingTab/GroupExpandSetting.js +19 -17
  199. package/es/core/editor/components/settings/propertyViews/group/SettingTab/GroupExpandStatus.js +5 -3
  200. package/es/core/editor/components/settings/propertyViews/group/SettingTab/GroupIconSelect.js +4 -2
  201. package/es/core/editor/components/settings/propertyViews/group/SettingTab/Setting.js +15 -6
  202. package/es/core/editor/components/settings/propertyViews/group/cluster/ClusterGroupRelateData.js +6 -4
  203. package/es/core/editor/components/settings/propertyViews/index.js +2 -0
  204. package/es/core/editor/components/settings/propertyViews/layer/BasicSetting.js +7 -3
  205. package/es/core/editor/components/settings/propertyViews/layer/DataTab/DefaultLayerAddResourceDrawer.js +13 -7
  206. package/es/core/editor/components/settings/propertyViews/layer/DataTab/LayerAddResourceButton.js +6 -4
  207. package/es/core/editor/components/settings/propertyViews/layer/DataTab/LayerAddResourceDrawer.js +4 -2
  208. package/es/core/editor/components/settings/propertyViews/layer/DataTab/NodeList.js +2 -2
  209. package/es/core/editor/components/settings/propertyViews/layer/DataTab/RelateData.js +6 -4
  210. package/es/core/editor/components/settings/propertyViews/layer/LayerPropertyView.js +6 -6
  211. package/es/core/editor/components/settings/propertyViews/layer/LayerPropertyViewV1.js +6 -6
  212. package/es/core/editor/components/settings/propertyViews/layer/SettingTab/Setting.js +16 -9
  213. package/es/core/editor/components/settings/propertyViews/layer/SettingTab/Setting_bak.js +18 -16
  214. package/es/core/editor/components/settings/propertyViews/multipleElements/BatchSetNodeIcon.js +2 -2
  215. package/es/core/editor/components/settings/propertyViews/multipleElements/BatchSetNodeSize/BatchSetNodeSize.js +35 -13
  216. package/es/core/editor/components/settings/propertyViews/multipleElements/MultipleElementLineType.js +2 -0
  217. package/es/core/editor/components/settings/propertyViews/multipleElements/MultipleElementPropertyView.js +11 -7
  218. package/es/core/editor/components/settings/propertyViews/node/NodeIconSelect.js +6 -4
  219. package/es/core/editor/components/settings/propertyViews/node/NodeIconSelectTest.js +2 -2
  220. package/es/core/editor/components/settings/propertyViews/node/NodePropertyView.js +9 -7
  221. package/es/core/editor/components/settings/propertyViews/node/NodePropertyViewV1.js +12 -7
  222. package/es/core/editor/components/settings/propertyViews/node/Setting/BasicSetting.js +11 -6
  223. package/es/core/editor/components/settings/propertyViews/node/Setting/NameInput.js +11 -3
  224. package/es/core/editor/components/settings/propertyViews/node/Setting/Setting.js +14 -6
  225. package/es/core/editor/components/settings/propertyViews/node/data/BindIpInput.js +23 -18
  226. package/es/core/editor/components/settings/propertyViews/node/data/BindResourceDrawer.js +17 -8
  227. package/es/core/editor/components/settings/propertyViews/node/data/Data.js +29 -19
  228. package/es/core/editor/components/settings/propertyViews/node/data/NodeRelateResourceButton.js +10 -7
  229. package/es/core/editor/components/settings/propertyViews/node/data/PlatformDisplay.js +5 -1
  230. package/es/core/editor/components/settings/propertyViews/text/TextPropertyView.js +17 -5
  231. package/es/core/editor/components/settings/propertyViews/view/BackgroundSize.js +10 -5
  232. package/es/core/editor/components/settings/propertyViews/view/BatchSetNodeSize.js +3 -5
  233. package/es/core/editor/components/settings/propertyViews/view/GlobalEdgeToggle.js +11 -5
  234. package/es/core/editor/components/settings/propertyViews/view/GlobalLayout.js +7 -6
  235. package/es/core/editor/components/settings/propertyViews/view/GlobalNodeLabelStyle.js +7 -2
  236. package/es/core/editor/components/settings/propertyViews/view/ViewLineTypeSetting.js +3 -0
  237. package/es/core/editor/components/settings/propertyViews/view/ViewPropertyView.js +3 -3
  238. package/es/core/editor/components/settings/propertyViews/view/ViewPropertyViewV2.js +3 -3
  239. package/es/core/editor/components/settings/propertyViews/view/hooks/useBackgroundConfig.js +4 -3
  240. package/es/core/editor/components/settings/propertyViews/view/hooks/useBackgroundSizeConfig.js +12 -4
  241. package/es/core/editor/components/settings/useSettingRuntimeState.js +6 -2
  242. package/es/core/editor/components/titlebar/TopoEditorTitleBar.js +26 -12
  243. package/es/core/editor/components/titlebar/widgets/DebugTools.js +4 -1
  244. package/es/core/editor/config/themes.js +7 -8
  245. package/es/core/editor/contextmenu/buildContextmenu.js +1 -2
  246. package/es/core/editor/hooks/useKeyboardShortcut.js +10 -7
  247. package/es/core/editor/hooks/useLayerAddResource.js +6 -4
  248. package/es/core/editor/hooks/useNewElementTheme.js +14 -7
  249. package/es/core/editor/hooks/useUpdateHtTopoDefaultTagStyle.js +3 -2
  250. package/es/core/editor/store/background.js +8 -4
  251. package/es/core/editor/store/historyManager.js +1 -0
  252. package/es/core/editor/store/topoEdit.js +4 -3
  253. package/es/core/editor/utils/edgeTypeStyleUtil.js +15 -9
  254. package/es/core/editor/utils/themeUtil.js +3 -0
  255. package/es/core/event/topoEventListener.js +2 -0
  256. package/es/core/hooks/ht/useHtDataPropertyChangeListener.js +7 -3
  257. package/es/core/hooks/useAlarm.js +24 -12
  258. package/es/core/hooks/useCanvasTheme.js +10 -9
  259. package/es/core/hooks/useCanvasThemeConfig.js +4 -2
  260. package/es/core/hooks/useCiAttributeChange.js +10 -3
  261. package/es/core/hooks/useEventData.js +4 -2
  262. package/es/core/hooks/useGraphAlarmDisplay.js +27 -11
  263. package/es/core/hooks/useGroupAddResource.js +5 -2
  264. package/es/core/hooks/useManageStatus.js +1 -1
  265. package/es/core/hooks/usePolling.js +69 -41
  266. package/es/core/hooks/useResourceConfig.js +57 -22
  267. package/es/core/hooks/useRouterAdapter.js +4 -2
  268. package/es/core/hooks/useSelection.js +4 -1
  269. package/es/core/hooks/useTopoEdit.js +261 -112
  270. package/es/core/hooks/useTopoEventListener.js +1 -1
  271. package/es/core/hooks/useTopoFullscreen.js +8 -7
  272. package/es/core/models/Alarm.js +139 -50
  273. package/es/core/models/AttributeMetricDisplay.js +166 -89
  274. package/es/core/models/DataModel.js +37 -4
  275. package/es/core/models/EdgeGroup.js +7 -2
  276. package/es/core/models/GraphDataModel.js +7 -0
  277. package/es/core/models/HistoryManager.js +52 -21
  278. package/es/core/models/PluginManager.js +9 -0
  279. package/es/core/models/SelectionModel.js +36 -11
  280. package/es/core/models/TopoApp.js +178 -74
  281. package/es/core/models/TopoGraphView.js +30 -8
  282. package/es/core/models/TopoViewer.js +5 -1
  283. package/es/core/models/attributeFormatter/formatter/ciTypeAttrTransform.js +3 -2
  284. package/es/core/models/attributeFormatter/formatter/commonTransform.js +8 -6
  285. package/es/core/models/attributeFormatter/formatter/graphTransform.js +5 -2
  286. package/es/core/models/attributeFormatter/index.js +8 -1
  287. package/es/core/models/cache/CiCache.js +17 -4
  288. package/es/core/models/cache/CiTypeCache.js +35 -8
  289. package/es/core/models/cache/DictCache.js +19 -4
  290. package/es/core/models/common/ContextMenu.js +9 -0
  291. package/es/core/models/graph/Background.js +16 -3
  292. package/es/core/models/plugins/index.js +1 -3
  293. package/es/core/models/plugins/resourceWebControllUrl.js +39 -9
  294. package/es/core/models/tagstips/ElementTagTipConfig.js +55 -16
  295. package/es/core/models/tagstips/utils.js +4 -4
  296. package/es/core/models/topoData.js +24 -8
  297. package/es/core/models/topoFactory.js +6 -0
  298. package/es/core/models/utils/linkUtils.js +35 -24
  299. package/es/core/models/utils/nodeNameVisibleUtil.js +25 -16
  300. package/es/core/services/alarm.js +5 -3
  301. package/es/core/services/background.js +24 -9
  302. package/es/core/services/cmdb/metric.js +5 -3
  303. package/es/core/services/cmdb.js +6 -3
  304. package/es/core/services/index.js +18 -7
  305. package/es/core/services/overview.js +58 -25
  306. package/es/core/services/topo/basic.js +5 -3
  307. package/es/core/services/topo/tagtip.js +6 -3
  308. package/es/core/store/coreModels.js +2 -4
  309. package/es/core/store/createStore.js +3 -0
  310. package/es/core/store/models/ciModel.js +16 -5
  311. package/es/core/store/models/customIcon.js +55 -19
  312. package/es/core/store/models/displayConfig.js +11 -5
  313. package/es/core/store/models/selection.js +5 -4
  314. package/es/core/store/models/topoAlarm.js +42 -10
  315. package/es/core/store/models/topoBaseInfoOverview.js +5 -4
  316. package/es/core/store/models/topoBizMod.js +14 -5
  317. package/es/core/store/models/topoConfig.js +85 -39
  318. package/es/core/store/models/topoGraphView.js +7 -5
  319. package/es/core/store/models/topoMod.js +111 -38
  320. package/es/core/store/models/viewer/lock.js +1 -0
  321. package/es/core/store/models/viewer/resourceDetail.js +5 -2
  322. package/es/core/store/models/viewer/resourceWebControllUrlSetting.js +1 -0
  323. package/es/core/test/Test.js +14 -12
  324. package/es/core/upgrade/v140UpgradeSerializeNodeImageSize.js +5 -0
  325. package/es/core/utils/backgroundUtil.js +7 -5
  326. package/es/core/utils/edgeUtil.js +11 -4
  327. package/es/core/utils/graphLinkUtil.js +8 -5
  328. package/es/core/utils/imageUtil.js +9 -3
  329. package/es/core/utils/metricUtil.js +1 -1
  330. package/es/core/utils/resourceUtil.js +3 -3
  331. package/es/core/utils/saveSerialize.js +6 -3
  332. package/es/core/utils/showGraphManageStatusUtil.js +18 -14
  333. package/es/core/utils/showMessage.js +2 -0
  334. package/es/core/viewer/components/plugins/ElementDetailDrawer/components/DetailDrawer.js +2 -0
  335. package/es/core/viewer/components/plugins/ElementDetailDrawer/hooks/useElementDetailManager.js +59 -32
  336. package/es/core/viewer/components/plugins/ResourceDetail/DefaultDetailContent.js +14 -8
  337. package/es/core/viewer/components/plugins/ResourceDetail/ResourceDetail.js +11 -6
  338. package/es/core/viewer/components/plugins/ResourceDetail/ResourceDetailDrawer.js +12 -9
  339. package/es/core/viewer/components/plugins/ResourceDetail/ResourceDetailPlugin.js +7 -2
  340. package/es/core/viewer/components/plugins/ResourceDetail/components/ClusterMemberTable.js +22 -10
  341. package/es/core/viewer/components/plugins/ResourceDetail/components/DrawerTitle.js +16 -7
  342. package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/BaseInfo.js +23 -18
  343. package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/BaseInfoBlock.js +10 -10
  344. package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/BlockBox.js +2 -2
  345. package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/EventsCard.js +17 -10
  346. package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/NetworkBaseInfo.js +27 -19
  347. package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/ResourceOverview.js +200 -90
  348. package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/ResourceOverviewMetric.js +29 -25
  349. package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/SingleResourceStrategyLink.js +6 -6
  350. package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/Configurator/index.js +70 -33
  351. package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/LinkTopo.js +4 -2
  352. package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/LinkTopoCard.js +27 -13
  353. package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/constants.js +4 -8
  354. package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/hooks/useMetricPolling.js +18 -14
  355. package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/services/index.js +62 -23
  356. package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/hooks/useAlarmAndRiskData.js +37 -24
  357. package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/hooks/useMetricModels.js +43 -22
  358. package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/useCiAttrAndMetricData.js +4 -2
  359. package/es/core/viewer/components/plugins/ResourceDetail/components/WebConsole/WebConsoleContainer.js +4 -1
  360. package/es/core/viewer/components/plugins/ResourceDetail/components/WebConsole/WebConsoleForm/WebConsoleForm.js +15 -8
  361. package/es/core/viewer/components/plugins/ResourceDetail/components/WebConsole/WebConsoleForm/hooks/useWebConsole.js +24 -10
  362. package/es/core/viewer/components/plugins/ResourceDetail/getCiDisplayMetricModels.js +12 -5
  363. package/es/core/viewer/components/plugins/ResourceDetail/hooks/useUserId.js +16 -7
  364. package/es/core/viewer/components/plugins/ResourceWebControllUrlSettingDialog.js +18 -6
  365. package/es/core/viewer/components/plugins/ViewerPlugin.js +1 -1
  366. package/es/core/viewer/components/titlebar/BasicTools.js +3 -3
  367. package/es/core/viewer/components/titlebar/TopoViewerTitleBar.js +4 -4
  368. package/es/core/viewer/components/titlebar/widgets/AlarmButton.js +6 -2
  369. package/es/core/viewer/components/titlebar/widgets/AlarmListShowButton.js +16 -14
  370. package/es/core/viewer/components/titlebar/widgets/EditButton.js +8 -4
  371. package/es/core/viewer/components/titlebar/widgets/MoreButtonMenu.js +1 -1
  372. package/es/core/viewer/components/titlebar/widgets/NodesDragSwitch.js +18 -14
  373. package/es/core/viewer/components/titlebar/widgets/NodesDragSwitchWrapper.js +5 -1
  374. package/es/core/viewer/components/titlebar/widgets/SearchWidget.js +17 -9
  375. package/es/core/viewer/components/titlebar/widgets/SettingButton.js +10 -7
  376. package/es/core/viewer/components/titlebar/widgets/SettingButtonWidget.js +5 -5
  377. package/es/core/viewer/contextmenu/buildLinkContextmenu.js +1 -2
  378. package/es/core/viewer/contextmenu/buildNodeContextmenu.js +2 -8
  379. package/es/createTopo.js +1 -2
  380. package/es/mock/mock.js +4 -6
  381. package/es/networkTopo/components/Link/form.js +41 -25
  382. package/es/networkTopo/components/Link/hook.js +86 -48
  383. package/es/networkTopo/components/Link/index.js +63 -33
  384. package/es/networkTopo/components/Link/setting.js +65 -45
  385. package/es/networkTopo/components/TopoView.js +20 -14
  386. package/es/networkTopo/getTopoData.js +37 -21
  387. package/es/networkTopo/hooks/useEdgeExpand.js +3 -2
  388. package/es/networkTopo/hooks/useGroupResources.js +4 -2
  389. package/es/networkTopo/hooks/useLinkDynamicStyle.js +4 -2
  390. package/es/networkTopo/hooks/viewer/useEdgeFlow.js +7 -6
  391. package/es/networkTopo/hooks/viewer/useRelateTopo.js +23 -8
  392. package/es/networkTopo/models/EdgeGroupTagTipBuilder.js +10 -2
  393. package/es/networkTopo/models/ExtElementTagTipBuilder.js +5 -0
  394. package/es/networkTopo/models/IpNodeTagsTipsBuilder.js +11 -2
  395. package/es/networkTopo/models/LinkDynamicStyleExecutor.js +49 -28
  396. package/es/networkTopo/models/LinkTagsTipsBuilder.js +51 -41
  397. package/es/networkTopo/models/TopoCenter.js +26 -8
  398. package/es/networkTopo/services/alert.js +10 -5
  399. package/es/networkTopo/services/authorization.js +25 -11
  400. package/es/networkTopo/services/cmdb.js +165 -80
  401. package/es/networkTopo/services/funcAuth.js +5 -3
  402. package/es/networkTopo/services/link.js +34 -11
  403. package/es/networkTopo/services/mdc.js +17 -10
  404. package/es/networkTopo/services/metric.js +12 -6
  405. package/es/networkTopo/services/model.js +223 -92
  406. package/es/networkTopo/services/risk.js +5 -3
  407. package/es/networkTopo/services/topo/auth.js +13 -7
  408. package/es/networkTopo/services/topo/basic.js +137 -57
  409. package/es/networkTopo/services/topo/blacklist.js +11 -5
  410. package/es/networkTopo/services/topo/ciInfo.js +13 -5
  411. package/es/networkTopo/services/topo/icon.js +24 -11
  412. package/es/networkTopo/services/topo/networkLink.js +11 -5
  413. package/es/networkTopo/services/topo/relation.js +5 -3
  414. package/es/networkTopo/services/topo/resourceWebUrl.js +17 -7
  415. package/es/networkTopo/store/functionAuth.js +16 -7
  416. package/es/networkTopo/store/topoCenter.js +53 -18
  417. package/es/networkTopo/store/topoLinkMod.js +4 -3
  418. package/es/networkTopo/store/topoTreeMod.js +71 -19
  419. package/es/networkTopo/utils/SortResourcesUtil.js +3 -1
  420. package/es/networkTopo/utils/__tests__/resourcePermissionUtil.test.js +7 -4
  421. package/es/networkTopo/utils/edgeGroupTagUtil.js +15 -8
  422. package/es/networkTopo/utils/exitLinkUtil.js +54 -38
  423. package/es/networkTopo/utils/exportData.js +16 -10
  424. package/es/networkTopo/utils/linPermissionUtil.js +2 -4
  425. package/es/networkTopo/utils/resourcePermissionUtil.js +6 -4
  426. package/es/networkTopo/utils/storage.js +3 -2
  427. package/es/networkTopo/viewer/components/TopologyViewer.js +4 -3
  428. package/es/networkTopo/viewer/index.js +1 -2
  429. package/es/utils/ResourceConfigUtil.js +23 -18
  430. package/es/utils/SpecialCharacterValidateUtil.js +1 -0
  431. package/es/utils/ciType.js +5 -1
  432. package/es/utils/clusterUtil.js +20 -15
  433. package/es/utils/format.js +26 -12
  434. package/es/utils/htElementUtils.js +51 -25
  435. package/es/utils/template.js +7 -6
  436. package/es/utils/topoData.js +64 -52
  437. package/es/utils/topoMocks.js +4 -3
  438. package/es/utils/tree.js +33 -14
  439. package/es/utils/treeUtil.js +1 -0
  440. package/lib/common/components/ColorPicker/ColorPicker.js +30 -9
  441. package/lib/common/components/ColorPicker/index.js +3 -0
  442. package/lib/common/components/ResourceTable/ResourceTable.js +18 -6
  443. package/lib/common/plugins/useSelectionPlugin.js +24 -13
  444. package/lib/components/BatchAttrMetric/SelectTable.js +3 -0
  445. package/lib/components/BatchAttrMetric/constant.js +2 -2
  446. package/lib/components/BatchAttrMetric/index.js +27 -9
  447. package/lib/components/BatchAttrMetric/setting.js +72 -30
  448. package/lib/components/BatchAttrMetric/utils.js +9 -1
  449. package/lib/components/BooleanRadio.js +15 -5
  450. package/lib/components/ColorPanel/components/ColorBlock/index.js +8 -2
  451. package/lib/components/ColorPanel/components/FontColorRange/index.js +19 -9
  452. package/lib/components/ColorPanel/index.js +50 -17
  453. package/lib/components/Drawer/Drawer.js +25 -14
  454. package/lib/components/Drawer/index.js +3 -0
  455. package/lib/components/FormTable/index.js +32 -13
  456. package/lib/components/FullheightTab/FullheightTab.js +7 -0
  457. package/lib/components/FullheightTab/index.js +3 -0
  458. package/lib/components/LayoutDirectionSelect/Item.js +9 -0
  459. package/lib/components/LayoutDirectionSelect/LayoutDirectionSelect.js +13 -5
  460. package/lib/components/LayoutDirectionSelect/index.js +3 -0
  461. package/lib/components/LayoutSelect/LayoutSelect.js +12 -5
  462. package/lib/components/LayoutSelect/index.js +3 -0
  463. package/lib/components/Link.js +7 -0
  464. package/lib/components/ModelAttrSelectDrawer/components/ModelAttrSelectDrawer.js +11 -4
  465. package/lib/components/ModelAttrSelectDrawer/components/MultipleTypeAttributeSelectDrawer.js +27 -15
  466. package/lib/components/ModelAttrSelectDrawer/index.js +3 -0
  467. package/lib/components/MultiResourceDrawer/Content.js +31 -11
  468. package/lib/components/MultiResourceDrawer/Dynamic.js +10 -2
  469. package/lib/components/MultiResourceDrawer/ResourceCard/index.js +11 -4
  470. package/lib/components/MultiResourceDrawer/ResourceSelect.js +10 -2
  471. package/lib/components/MultiResourceDrawer/Static.js +10 -2
  472. package/lib/components/MultiResourceDrawer/index.js +23 -8
  473. package/lib/components/NetworkTopoResourceSelectDrawer/NetworkTopoResourceSelectDrawer.js +6 -0
  474. package/lib/components/NetworkTopoResourceSelectDrawer/index.js +3 -0
  475. package/lib/components/ResourceList/ResourceSelect.js +64 -27
  476. package/lib/components/ResourceList/ResourceSelectConnect.js +17 -3
  477. package/lib/components/ResourceList/index.js +3 -0
  478. package/lib/components/ResourceSelect/ResourceSelectDrawer.js +21 -6
  479. package/lib/components/ResourceSelectDrawer/ResourceSelectDrawer.js +39 -13
  480. package/lib/components/ResourceSelectDrawer/ResourceSelectList.js +15 -4
  481. package/lib/components/ResourceSelectDrawer/index.js +3 -0
  482. package/lib/components/SingleResourceDrawer/SelectDrawer.js +23 -6
  483. package/lib/components/SingleResourceDrawer/SingleResourceDrawer.js +22 -6
  484. package/lib/components/SingleResourceDrawer/index.js +3 -0
  485. package/lib/components/TagImageSelect/index.js +18 -8
  486. package/lib/components/TagSelect/index.js +22 -8
  487. package/lib/components/TemplateButton/Icon.js +10 -5
  488. package/lib/components/TemplateButton/assets/index.js +5 -0
  489. package/lib/components/TemplateButton/index.js +16 -6
  490. package/lib/components/VerticalIconTab/VerticalIconTab.js +23 -6
  491. package/lib/components/VerticalIconTab/index.js +3 -0
  492. package/lib/components/collapse/Collapse.js +16 -4
  493. package/lib/components/collapse/Panel.js +33 -7
  494. package/lib/components/collapse/index.js +3 -0
  495. package/lib/constants/ResourceInfoDisplay.js +6 -6
  496. package/lib/constants/ResourceTypeLimit.js +20 -20
  497. package/lib/contextmenu/createMenuCommands.js +11 -6
  498. package/lib/core/common/contextmenu/mergeContextmenu.js +6 -2
  499. package/lib/core/common/hooks/ht/useDataModelDataPropertyChange.js +5 -0
  500. package/lib/core/common/hooks/useHtElement.js +4 -1
  501. package/lib/core/common/hooks/useHtElements.js +8 -5
  502. package/lib/core/common/icons/icon.js +36 -16
  503. package/lib/core/common/icons/useIcons.js +10 -1
  504. package/lib/core/components/AlarmListPanel/components/AlarmListItem.js +22 -4
  505. package/lib/core/components/AlarmListPanel/constants/uicbb.js +1 -0
  506. package/lib/core/components/AlarmListPanel/hooks/useAlarmList.js +9 -2
  507. package/lib/core/components/AlarmListPanel/index.js +18 -2
  508. package/lib/core/components/DisplaySettingDrawer/DisplaySetting.js +34 -10
  509. package/lib/core/components/DisplaySettingDrawer/DisplaySettingDrawer.js +38 -13
  510. package/lib/core/components/DisplaySettingDrawer/EdgeFlow.js +8 -1
  511. package/lib/core/components/DisplaySettingDrawer/EdgeFlowDirection.js +8 -1
  512. package/lib/core/components/DisplaySettingDrawer/LineExpandAllRadioGroup.js +38 -14
  513. package/lib/core/components/DisplaySettingDrawer/LinkTag.js +10 -1
  514. package/lib/core/components/DisplaySettingDrawer/NodeTag.js +10 -1
  515. package/lib/core/components/DisplaySettingDrawer/NodeTip.js +10 -1
  516. package/lib/core/components/DisplaySettingDrawer/ResourceDisplay/BasicConfig.js +46 -24
  517. package/lib/core/components/DisplaySettingDrawer/ResourceDisplay/CommonCheckboxGroup.js +14 -3
  518. package/lib/core/components/DisplaySettingDrawer/components/NodeAttrSettingDrawer.js +21 -5
  519. package/lib/core/components/DisplaySettingDrawer/demo/Demo.js +6 -4
  520. package/lib/core/components/DisplaySettingDrawer/hooks/useDisplaySetting.js +39 -10
  521. package/lib/core/components/DisplaySettingDrawer/index.js +3 -0
  522. package/lib/core/components/DisplaySettingDrawer/tagtip/CustomSettingDrawer/CustomSetting.js +11 -3
  523. package/lib/core/components/DisplaySettingDrawer/tagtip/CustomSettingDrawer/CustomSettingDrawer.js +5 -0
  524. package/lib/core/components/ResourceViewAttributeSetting/Setting.js +22 -6
  525. package/lib/core/components/ResourceViewAttributeSetting/nodeCiTypeAttrUtil.js +27 -6
  526. package/lib/core/components/TopoAppProvider.js +5 -0
  527. package/lib/core/components/TopoView/GraphViewPanel.js +24 -10
  528. package/lib/core/components/TopoView/index.js +3 -0
  529. package/lib/core/components/TopoView/topoView.js +97 -35
  530. package/lib/core/components/buildProvider.js +5 -0
  531. package/lib/core/components/titlebar/TitleBar.js +21 -4
  532. package/lib/core/components/titlebar/index.js +17 -0
  533. package/lib/core/components/titlebar/widgets/TitleWidget.js +9 -2
  534. package/lib/core/createTopoApp.js +5 -0
  535. package/lib/core/editor/components/BackgroundView/UploadDialog/index.js +69 -21
  536. package/lib/core/editor/components/BackgroundView/index.js +87 -24
  537. package/lib/core/editor/components/BottomFloatTool/HelpIcon.js +25 -8
  538. package/lib/core/editor/components/CustomIconPlugin/CustomIconPlugin.js +10 -5
  539. package/lib/core/editor/components/CustomIconPlugin/RenameDialog.js +35 -7
  540. package/lib/core/editor/components/CustomIconPlugin/UploadIconDialog.js +87 -24
  541. package/lib/core/editor/components/CustomIconPlugin/UploadIconDialogWrapper.js +11 -3
  542. package/lib/core/editor/components/CustomIconPlugin/index.js +3 -0
  543. package/lib/core/editor/components/CustomIconPlugin/utils/svgToShape.js +13 -3
  544. package/lib/core/editor/components/EditorPlugin.js +23 -4
  545. package/lib/core/editor/components/GroupAddResourceDrawerPlugin/GroupAddResourceDrawer.js +19 -6
  546. package/lib/core/editor/components/GroupAddResourceDrawerPlugin/index.js +11 -5
  547. package/lib/core/editor/components/Sidebar/Sidebar.js +26 -8
  548. package/lib/core/editor/components/Sidebar/panes.js +7 -0
  549. package/lib/core/editor/components/Sidebar/views/BackgroundPanel/BackgroundPanel.js +4 -0
  550. package/lib/core/editor/components/Sidebar/views/BackgroundPanel/index.js +3 -0
  551. package/lib/core/editor/components/Sidebar/views/CanvasPanel/CanvasPanel.js +15 -5
  552. package/lib/core/editor/components/Sidebar/views/CanvasPanel/hooks/useCanvasThemeConfig.js +38 -14
  553. package/lib/core/editor/components/Sidebar/views/CanvasPanel/index.js +3 -0
  554. package/lib/core/editor/components/Sidebar/views/ComponentPanel.js +12 -6
  555. package/lib/core/editor/components/Sidebar/views/ImagePanel/CiTypeImagePanel.js +8 -1
  556. package/lib/core/editor/components/Sidebar/views/ImagePanel/CustomImagePanel.js +9 -1
  557. package/lib/core/editor/components/Sidebar/views/ImagePanel/HtCustomImagePanel.js +17 -6
  558. package/lib/core/editor/components/Sidebar/views/ImagePanel/HtImagePalette.js +17 -6
  559. package/lib/core/editor/components/Sidebar/views/ImagePanel/ImagePalette.js +12 -6
  560. package/lib/core/editor/components/Sidebar/views/ImagePanel/ImagePanel.js +29 -4
  561. package/lib/core/editor/components/Sidebar/views/ImagePanel/index.js +3 -0
  562. package/lib/core/editor/components/Sidebar/views/LinkPanel.js +13 -6
  563. package/lib/core/editor/components/Toolbar/EditorToolbar.js +17 -2
  564. package/lib/core/editor/components/Toolbar/Toolbar.js +5 -0
  565. package/lib/core/editor/components/Toolbar/buttons.js +35 -30
  566. package/lib/core/editor/components/Toolbar/components/Tooltip.js +8 -2
  567. package/lib/core/editor/components/Toolbar/widgets/AddResourceButton.js +21 -8
  568. package/lib/core/editor/components/Toolbar/widgets/BoxBackgroundButton/BoxBackgroundButton.js +21 -7
  569. package/lib/core/editor/components/Toolbar/widgets/BoxBackgroundButton/BoxBackgroundSetting.js +52 -19
  570. package/lib/core/editor/components/Toolbar/widgets/BoxBackgroundButton/BoxBackgroundUtil.js +37 -9
  571. package/lib/core/editor/components/Toolbar/widgets/BoxBackgroundButton/index.js +3 -0
  572. package/lib/core/editor/components/Toolbar/widgets/CanvasMoveWidget.js +13 -3
  573. package/lib/core/editor/components/Toolbar/widgets/CanvasSelectWidget.js +11 -3
  574. package/lib/core/editor/components/Toolbar/widgets/Divider.js +5 -0
  575. package/lib/core/editor/components/Toolbar/widgets/EdgeColorButton/Content.js +12 -6
  576. package/lib/core/editor/components/Toolbar/widgets/EdgeColorButton/EdgeColorButton.js +36 -12
  577. package/lib/core/editor/components/Toolbar/widgets/EdgeColorButton/index.js +3 -0
  578. package/lib/core/editor/components/Toolbar/widgets/EdgeTypeButton/EdgeType.js +31 -15
  579. package/lib/core/editor/components/Toolbar/widgets/EdgeTypeButton/LineType.js +16 -4
  580. package/lib/core/editor/components/Toolbar/widgets/EdgeTypeButton/constants.js +3 -2
  581. package/lib/core/editor/components/Toolbar/widgets/EdgeTypeButton/index.js +37 -13
  582. package/lib/core/editor/components/Toolbar/widgets/FontColorButton.js +57 -24
  583. package/lib/core/editor/components/Toolbar/widgets/FontFamilyWidget.js +15 -4
  584. package/lib/core/editor/components/Toolbar/widgets/FontSizeWidget.js +18 -8
  585. package/lib/core/editor/components/Toolbar/widgets/FontStyleButton.js +39 -16
  586. package/lib/core/editor/components/Toolbar/widgets/HistoryRedoButton.js +10 -2
  587. package/lib/core/editor/components/Toolbar/widgets/HistoryUndoButton.js +10 -3
  588. package/lib/core/editor/components/Toolbar/widgets/IconSelect/IconSelect.js +32 -9
  589. package/lib/core/editor/components/Toolbar/widgets/IconSelect/index.js +31 -9
  590. package/lib/core/editor/components/Toolbar/widgets/IconSelect/index.module.scss +1 -1
  591. package/lib/core/editor/components/Toolbar/widgets/IconSelect/popUpContent.js +12 -2
  592. package/lib/core/editor/components/Toolbar/widgets/Layout/components/LayoutSettings.js +23 -10
  593. package/lib/core/editor/components/Toolbar/widgets/Layout/components/LayoutTagImageSelect/index.js +19 -9
  594. package/lib/core/editor/components/Toolbar/widgets/Layout/components/LayoutTagSelect/index.js +26 -13
  595. package/lib/core/editor/components/Toolbar/widgets/Layout/components/LayoutTemplateButton/Icon.js +10 -5
  596. package/lib/core/editor/components/Toolbar/widgets/Layout/components/LayoutTemplateButton/assets/index.js +6 -0
  597. package/lib/core/editor/components/Toolbar/widgets/Layout/components/LayoutTemplateButton/index.js +16 -6
  598. package/lib/core/editor/components/Toolbar/widgets/Layout/index.js +55 -28
  599. package/lib/core/editor/components/Toolbar/widgets/NodeAlignWidget.js +44 -20
  600. package/lib/core/editor/components/Toolbar/widgets/NodeImageButton/BoxBackgroundSetting.js +10 -2
  601. package/lib/core/editor/components/Toolbar/widgets/NodeImageButton/NodeImageButton.js +26 -12
  602. package/lib/core/editor/components/Toolbar/widgets/NodeImageButton/index.js +3 -0
  603. package/lib/core/editor/components/Toolbar/widgets/NodeSizeButton/BoxBackgroundSetting.js +4 -0
  604. package/lib/core/editor/components/Toolbar/widgets/NodeSizeButton/NodeSizeButton.js +33 -13
  605. package/lib/core/editor/components/Toolbar/widgets/NodeSizeButton/index.js +3 -0
  606. package/lib/core/editor/components/Toolbar/widgets/SearchWidget.js +12 -1
  607. package/lib/core/editor/components/Toolbar/widgets/WidgetBox.js +20 -6
  608. package/lib/core/editor/components/Toolbar/widgets/components/ArrowButton.js +11 -2
  609. package/lib/core/editor/components/Toolbar/widgets/components/ArrowPopup.js +11 -1
  610. package/lib/core/editor/components/Toolbar/widgets/components/ButtonBox.js +17 -5
  611. package/lib/core/editor/components/Toolbar/widgets/components/DropdownButton.js +27 -9
  612. package/lib/core/editor/components/Toolbar/widgets/components/DropdownMenu.js +16 -5
  613. package/lib/core/editor/components/Toolbar/widgets/components/MenuSelect.js +8 -2
  614. package/lib/core/editor/components/Toolbar/widgets/components/textStyleSetting/ElementTextStyleSetting/ElementTextStyleSetting.js +17 -5
  615. package/lib/core/editor/components/Toolbar/widgets/components/textStyleSetting/ElementTextStyleSetting/colorUtil.js +14 -2
  616. package/lib/core/editor/components/Toolbar/widgets/components/textStyleSetting/ElementTextStyleSetting/elements/box.js +14 -4
  617. package/lib/core/editor/components/Toolbar/widgets/components/textStyleSetting/ElementTextStyleSetting/elements/edgeTag.js +24 -6
  618. package/lib/core/editor/components/Toolbar/widgets/components/textStyleSetting/ElementTextStyleSetting/elements/groupTitle.js +24 -5
  619. package/lib/core/editor/components/Toolbar/widgets/components/textStyleSetting/ElementTextStyleSetting/elements/index.js +8 -0
  620. package/lib/core/editor/components/Toolbar/widgets/components/textStyleSetting/ElementTextStyleSetting/elements/layerTitle.js +21 -6
  621. package/lib/core/editor/components/Toolbar/widgets/components/textStyleSetting/ElementTextStyleSetting/elements/nodeTag.js +26 -7
  622. package/lib/core/editor/components/Toolbar/widgets/components/textStyleSetting/ElementTextStyleSetting/elements/text.js +14 -2
  623. package/lib/core/editor/components/Toolbar/widgets/components/textStyleSetting/ElementTextStyleSetting/textStyleUtil.js +32 -8
  624. package/lib/core/editor/components/Toolbar/widgets/components/textStyleSetting/GlobalTagStyleSetting/GlobalTagStyleSetting.js +14 -3
  625. package/lib/core/editor/components/Toolbar/widgets/components/textStyleSetting/GlobalTagStyleSetting/globalTag.js +37 -15
  626. package/lib/core/editor/components/Toolbar/widgets/components/textStyleSetting/textStyleSettingRouter.js +7 -0
  627. package/lib/core/editor/components/plugins/AddElementThemePlugin.js +5 -0
  628. package/lib/core/editor/components/plugins/CorePlugin.js +9 -3
  629. package/lib/core/editor/components/plugins/SaveLoading.js +11 -2
  630. package/lib/core/editor/components/settings/CloseablePanel.js +12 -3
  631. package/lib/core/editor/components/settings/PropertyView.js +27 -7
  632. package/lib/core/editor/components/settings/Settings.js +20 -7
  633. package/lib/core/editor/components/settings/common/AddResourceButton.js +7 -0
  634. package/lib/core/editor/components/settings/common/AlignSetting/AlignTypeList.js +25 -11
  635. package/lib/core/editor/components/settings/common/AlignSetting/index.js +18 -5
  636. package/lib/core/editor/components/settings/common/GroupNodeList/ResourceList.js +18 -2
  637. package/lib/core/editor/components/settings/common/LayoutSettings.js +24 -12
  638. package/lib/core/editor/components/settings/common/LineType/index.js +7 -0
  639. package/lib/core/editor/components/settings/common/NameInput.js +11 -1
  640. package/lib/core/editor/components/settings/common/NodeAlignType.js +8 -0
  641. package/lib/core/editor/components/settings/common/NodeSizeInput/NodeSizeInput.js +42 -9
  642. package/lib/core/editor/components/settings/common/SizeInput/NodeSizeInput.js +32 -12
  643. package/lib/core/editor/components/settings/common/SizeInput/NodeSizeNumberPicker.js +29 -10
  644. package/lib/core/editor/components/settings/common/SizeInput/index.js +3 -0
  645. package/lib/core/editor/components/settings/common/tab/TabView.js +6 -0
  646. package/lib/core/editor/components/settings/common/text/FontStyleCheckbox.js +18 -1
  647. package/lib/core/editor/components/settings/common/text/TextStyle.js +19 -2
  648. package/lib/core/editor/components/settings/common/text/fontStyleUtil.js +8 -2
  649. package/lib/core/editor/components/settings/core/PropertyViewManager.js +23 -0
  650. package/lib/core/editor/components/settings/core/edgePropertyViewAdapter.js +5 -0
  651. package/lib/core/editor/components/settings/core/getPropertyViewType.js +5 -0
  652. package/lib/core/editor/components/settings/core/updateElementProperty.js +3 -0
  653. package/lib/core/editor/components/settings/propertyViews/PropertyViewFactory.js +2 -0
  654. package/lib/core/editor/components/settings/propertyViews/box/BoxPropertyView.js +20 -3
  655. package/lib/core/editor/components/settings/propertyViews/box/BoxPropertyViewV1.js +19 -2
  656. package/lib/core/editor/components/settings/propertyViews/box/NameInput.js +19 -3
  657. package/lib/core/editor/components/settings/propertyViews/edge/CommonEdgePropertyView.js +29 -5
  658. package/lib/core/editor/components/settings/propertyViews/edge/EdgeGroupPropertyView.js +7 -0
  659. package/lib/core/editor/components/settings/propertyViews/edge/EdgePropertyView.js +16 -4
  660. package/lib/core/editor/components/settings/propertyViews/edge/edgeGroup/EdgeGroupSetting.js +19 -3
  661. package/lib/core/editor/components/settings/propertyViews/group/DataTab/GroupAddResourceButton.js +9 -2
  662. package/lib/core/editor/components/settings/propertyViews/group/DataTab/GroupNodeList.js +14 -7
  663. package/lib/core/editor/components/settings/propertyViews/group/DataTab/GroupRelateData/GroupRelateData.js +20 -4
  664. package/lib/core/editor/components/settings/propertyViews/group/DataTab/RelateData.js +10 -4
  665. package/lib/core/editor/components/settings/propertyViews/group/DataTab/hoooks/useGroupRelateResource.js +17 -11
  666. package/lib/core/editor/components/settings/propertyViews/group/GroupPropertyView.js +11 -3
  667. package/lib/core/editor/components/settings/propertyViews/group/GroupPropertyViewV1.js +13 -3
  668. package/lib/core/editor/components/settings/propertyViews/group/SettingTab/GroupBasicSetting.js +27 -7
  669. package/lib/core/editor/components/settings/propertyViews/group/SettingTab/GroupExpandSetting.js +29 -15
  670. package/lib/core/editor/components/settings/propertyViews/group/SettingTab/GroupExpandStatus.js +10 -3
  671. package/lib/core/editor/components/settings/propertyViews/group/SettingTab/GroupIconSelect.js +11 -2
  672. package/lib/core/editor/components/settings/propertyViews/group/SettingTab/Setting.js +31 -6
  673. package/lib/core/editor/components/settings/propertyViews/group/cluster/ClusterGroupRelateData.js +19 -4
  674. package/lib/core/editor/components/settings/propertyViews/group/hooks/useGroup.js +4 -0
  675. package/lib/core/editor/components/settings/propertyViews/index.js +10 -0
  676. package/lib/core/editor/components/settings/propertyViews/layer/BasicSetting.js +18 -3
  677. package/lib/core/editor/components/settings/propertyViews/layer/DataTab/DefaultLayerAddResourceDrawer.js +20 -7
  678. package/lib/core/editor/components/settings/propertyViews/layer/DataTab/LayerAddResourceButton.js +13 -4
  679. package/lib/core/editor/components/settings/propertyViews/layer/DataTab/LayerAddResourceDrawer.js +8 -2
  680. package/lib/core/editor/components/settings/propertyViews/layer/DataTab/NodeList.js +9 -1
  681. package/lib/core/editor/components/settings/propertyViews/layer/DataTab/RelateData.js +14 -4
  682. package/lib/core/editor/components/settings/propertyViews/layer/LayerPropertyView.js +13 -6
  683. package/lib/core/editor/components/settings/propertyViews/layer/LayerPropertyViewV1.js +14 -6
  684. package/lib/core/editor/components/settings/propertyViews/layer/SettingTab/Setting.js +31 -7
  685. package/lib/core/editor/components/settings/propertyViews/layer/SettingTab/Setting_bak.js +35 -16
  686. package/lib/core/editor/components/settings/propertyViews/multipleElements/BatchSetNodeIcon.js +7 -2
  687. package/lib/core/editor/components/settings/propertyViews/multipleElements/BatchSetNodeSize/BatchSetNodeSize.js +44 -13
  688. package/lib/core/editor/components/settings/propertyViews/multipleElements/MultipleElementLineType.js +7 -0
  689. package/lib/core/editor/components/settings/propertyViews/multipleElements/MultipleElementPropertyView.js +25 -7
  690. package/lib/core/editor/components/settings/propertyViews/node/NodeIconSelect.js +11 -3
  691. package/lib/core/editor/components/settings/propertyViews/node/NodeIconSelectTest.js +9 -2
  692. package/lib/core/editor/components/settings/propertyViews/node/NodePropertyView.js +17 -8
  693. package/lib/core/editor/components/settings/propertyViews/node/NodePropertyViewV1.js +22 -7
  694. package/lib/core/editor/components/settings/propertyViews/node/Setting/BasicSetting.js +19 -6
  695. package/lib/core/editor/components/settings/propertyViews/node/Setting/NameInput.js +19 -3
  696. package/lib/core/editor/components/settings/propertyViews/node/Setting/Setting.js +26 -6
  697. package/lib/core/editor/components/settings/propertyViews/node/Setting/index.js +3 -0
  698. package/lib/core/editor/components/settings/propertyViews/node/TopoTreeSelect.js +8 -0
  699. package/lib/core/editor/components/settings/propertyViews/node/data/BindIpInput.js +32 -18
  700. package/lib/core/editor/components/settings/propertyViews/node/data/BindResourceDrawer.js +25 -7
  701. package/lib/core/editor/components/settings/propertyViews/node/data/Data.js +47 -19
  702. package/lib/core/editor/components/settings/propertyViews/node/data/NodeRelateResourceButton.js +19 -6
  703. package/lib/core/editor/components/settings/propertyViews/node/data/PlatformDisplay.js +7 -1
  704. package/lib/core/editor/components/settings/propertyViews/text/TextPropertyView.js +29 -5
  705. package/lib/core/editor/components/settings/propertyViews/view/BackgroundSize.js +18 -5
  706. package/lib/core/editor/components/settings/propertyViews/view/BatchSetNodeSize.js +9 -3
  707. package/lib/core/editor/components/settings/propertyViews/view/GlobalEdgeToggle.js +15 -4
  708. package/lib/core/editor/components/settings/propertyViews/view/GlobalLayout.js +12 -5
  709. package/lib/core/editor/components/settings/propertyViews/view/GlobalNodeLabelStyle.js +17 -2
  710. package/lib/core/editor/components/settings/propertyViews/view/ViewLineTypeSetting.js +8 -0
  711. package/lib/core/editor/components/settings/propertyViews/view/ViewPropertyView.js +19 -3
  712. package/lib/core/editor/components/settings/propertyViews/view/ViewPropertyViewV2.js +11 -3
  713. package/lib/core/editor/components/settings/propertyViews/view/hooks/useBackgroundConfig.js +6 -3
  714. package/lib/core/editor/components/settings/propertyViews/view/hooks/useBackgroundSizeConfig.js +19 -4
  715. package/lib/core/editor/components/settings/useSettingRuntimeState.js +10 -2
  716. package/lib/core/editor/components/titlebar/TopoEditorTitleBar.js +42 -12
  717. package/lib/core/editor/components/titlebar/widgets/DebugTools.js +8 -1
  718. package/lib/core/editor/components/titlebar/widgets/SaveButton.js +5 -0
  719. package/lib/core/editor/config/themes.js +10 -8
  720. package/lib/core/editor/contextmenu/buildContextmenu.js +2 -2
  721. package/lib/core/editor/hooks/useKeyboardShortcut.js +14 -7
  722. package/lib/core/editor/hooks/useLayerAddResource.js +8 -4
  723. package/lib/core/editor/hooks/useNewElementTheme.js +20 -7
  724. package/lib/core/editor/hooks/useUpdateHtTopoDefaultTagStyle.js +6 -1
  725. package/lib/core/editor/store/background.js +16 -6
  726. package/lib/core/editor/store/historyManager.js +6 -1
  727. package/lib/core/editor/store/topoEdit.js +13 -5
  728. package/lib/core/editor/utils/edgeTypeStyleUtil.js +22 -9
  729. package/lib/core/editor/utils/themeUtil.js +6 -0
  730. package/lib/core/event/topoEventListener.js +3 -0
  731. package/lib/core/hooks/ht/useHtDataPropertyChangeListener.js +11 -3
  732. package/lib/core/hooks/useAlarm.js +33 -11
  733. package/lib/core/hooks/useCanvasTheme.js +16 -9
  734. package/lib/core/hooks/useCanvasThemeConfig.js +8 -2
  735. package/lib/core/hooks/useCiAttributeChange.js +14 -3
  736. package/lib/core/hooks/useEventData.js +7 -2
  737. package/lib/core/hooks/useGraphAlarmDisplay.js +34 -11
  738. package/lib/core/hooks/useGroupAddResource.js +7 -2
  739. package/lib/core/hooks/useManageStatus.js +6 -1
  740. package/lib/core/hooks/usePolling.js +82 -40
  741. package/lib/core/hooks/useResourceConfig.js +66 -22
  742. package/lib/core/hooks/useRouterAdapter.js +6 -1
  743. package/lib/core/hooks/useSelection.js +5 -1
  744. package/lib/core/hooks/useTopoEdit.js +301 -112
  745. package/lib/core/hooks/useTopoEventListener.js +4 -1
  746. package/lib/core/hooks/useTopoFullscreen.js +12 -7
  747. package/lib/core/index.js +2 -0
  748. package/lib/core/models/Alarm.js +159 -49
  749. package/lib/core/models/AttributeMetricDisplay.js +173 -89
  750. package/lib/core/models/DataModel.js +39 -4
  751. package/lib/core/models/EdgeGroup.js +8 -2
  752. package/lib/core/models/GraphDataModel.js +8 -0
  753. package/lib/core/models/HistoryManager.js +64 -21
  754. package/lib/core/models/PluginManager.js +11 -0
  755. package/lib/core/models/SelectionModel.js +44 -11
  756. package/lib/core/models/TopoApp.js +204 -72
  757. package/lib/core/models/TopoGraphView.js +35 -7
  758. package/lib/core/models/TopoViewer.js +7 -0
  759. package/lib/core/models/attributeFormatter/formatter/attributeTransform.js +3 -0
  760. package/lib/core/models/attributeFormatter/formatter/ciTypeAttrTransform.js +4 -2
  761. package/lib/core/models/attributeFormatter/formatter/commonTransform.js +10 -6
  762. package/lib/core/models/attributeFormatter/formatter/graphTransform.js +8 -2
  763. package/lib/core/models/attributeFormatter/formatter/metricTransform.js +3 -0
  764. package/lib/core/models/attributeFormatter/index.js +14 -0
  765. package/lib/core/models/cache/CiCache.js +22 -3
  766. package/lib/core/models/cache/CiTypeCache.js +43 -7
  767. package/lib/core/models/cache/DictCache.js +29 -3
  768. package/lib/core/models/common/ContextMenu.js +10 -0
  769. package/lib/core/models/graph/Background.js +19 -3
  770. package/lib/core/models/plugins/index.js +1 -2
  771. package/lib/core/models/plugins/resourceWebControllUrl.js +47 -9
  772. package/lib/core/models/tagstips/ElementTagTipConfig.js +64 -15
  773. package/lib/core/models/tagstips/utils.js +9 -3
  774. package/lib/core/models/topoData.js +36 -8
  775. package/lib/core/models/topoFactory.js +6 -0
  776. package/lib/core/models/utils/getRelationDetailByIds.js +1 -0
  777. package/lib/core/models/utils/linkUtils.js +48 -19
  778. package/lib/core/models/utils/nodeNameVisibleUtil.js +30 -15
  779. package/lib/core/services/alarm.js +14 -3
  780. package/lib/core/services/background.js +29 -9
  781. package/lib/core/services/cmdb/metric.js +10 -3
  782. package/lib/core/services/cmdb.js +12 -3
  783. package/lib/core/services/index.js +24 -7
  784. package/lib/core/services/overview.js +63 -23
  785. package/lib/core/services/topo/basic.js +11 -3
  786. package/lib/core/services/topo/index.js +6 -0
  787. package/lib/core/services/topo/tagtip.js +11 -3
  788. package/lib/core/store/coreModels.js +16 -0
  789. package/lib/core/store/createStore.js +7 -0
  790. package/lib/core/store/models/ciModel.js +23 -5
  791. package/lib/core/store/models/customIcon.js +72 -21
  792. package/lib/core/store/models/displayConfig.js +21 -7
  793. package/lib/core/store/models/selection.js +13 -6
  794. package/lib/core/store/models/topoAlarm.js +52 -12
  795. package/lib/core/store/models/topoBaseInfoOverview.js +14 -6
  796. package/lib/core/store/models/topoBizMod.js +22 -5
  797. package/lib/core/store/models/topoConfig.js +109 -41
  798. package/lib/core/store/models/topoGraphView.js +16 -7
  799. package/lib/core/store/models/topoMod.js +131 -36
  800. package/lib/core/store/models/viewer/lock.js +4 -0
  801. package/lib/core/store/models/viewer/resourceDetail.js +8 -2
  802. package/lib/core/store/models/viewer/resourceWebControllUrlSetting.js +5 -0
  803. package/lib/core/test/Test.js +15 -12
  804. package/lib/core/upgrade/v140UpgradeSerializeNodeImageSize.js +6 -0
  805. package/lib/core/utils/backgroundUtil.js +9 -5
  806. package/lib/core/utils/edgeUtil.js +17 -3
  807. package/lib/core/utils/graphLinkUtil.js +9 -4
  808. package/lib/core/utils/imageUtil.js +12 -3
  809. package/lib/core/utils/linkUtil.js +1 -0
  810. package/lib/core/utils/manageStatusUtil.js +1 -0
  811. package/lib/core/utils/metricUtil.js +4 -0
  812. package/lib/core/utils/resourceUtil.js +4 -2
  813. package/lib/core/utils/saveSerialize.js +9 -3
  814. package/lib/core/utils/showGraphManageStatusUtil.js +23 -14
  815. package/lib/core/utils/showMessage.js +9 -0
  816. package/lib/core/viewer/components/plugins/ElementDetailDrawer/components/DetailDrawer.js +7 -0
  817. package/lib/core/viewer/components/plugins/ElementDetailDrawer/hooks/useElementDetailManager.js +64 -32
  818. package/lib/core/viewer/components/plugins/MetricPollingPlugin.js +4 -0
  819. package/lib/core/viewer/components/plugins/ResourceDetail/DefaultDetailContent.js +23 -8
  820. package/lib/core/viewer/components/plugins/ResourceDetail/ResourceDetail.js +20 -6
  821. package/lib/core/viewer/components/plugins/ResourceDetail/ResourceDetailDrawer.js +21 -9
  822. package/lib/core/viewer/components/plugins/ResourceDetail/ResourceDetailPlugin.js +11 -2
  823. package/lib/core/viewer/components/plugins/ResourceDetail/components/ClusterMemberTable.js +36 -10
  824. package/lib/core/viewer/components/plugins/ResourceDetail/components/DrawerTitle.js +24 -7
  825. package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/BaseInfo.js +24 -15
  826. package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/BaseInfoBlock.js +17 -10
  827. package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/BlockBox.js +7 -2
  828. package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/EventsCard.js +29 -10
  829. package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/NetworkBaseInfo.js +36 -17
  830. package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/ResourceOverview.js +229 -88
  831. package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/ResourceOverviewMetric.js +40 -25
  832. package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/SingleResourceStrategyLink.js +8 -5
  833. package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/Configurator/index.js +87 -32
  834. package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/LinkTopo.js +12 -2
  835. package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/LinkTopoCard.js +38 -13
  836. package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/constants.js +4 -8
  837. package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/hooks/useMetricPolling.js +31 -12
  838. package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/services/index.js +83 -19
  839. package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/hooks/useAlarmAndRiskData.js +44 -23
  840. package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/hooks/useMetricModels.js +49 -21
  841. package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/index.js +3 -0
  842. package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/useCiAttrAndMetricData.js +5 -2
  843. package/lib/core/viewer/components/plugins/ResourceDetail/components/WebConsole/WebConsoleContainer.js +8 -1
  844. package/lib/core/viewer/components/plugins/ResourceDetail/components/WebConsole/WebConsoleForm/WebConsoleForm.js +27 -8
  845. package/lib/core/viewer/components/plugins/ResourceDetail/components/WebConsole/WebConsoleForm/hooks/useWebConsole.js +33 -10
  846. package/lib/core/viewer/components/plugins/ResourceDetail/getCiDisplayMetricModels.js +17 -5
  847. package/lib/core/viewer/components/plugins/ResourceDetail/hooks/useUserId.js +23 -7
  848. package/lib/core/viewer/components/plugins/ResourceDetail/index.js +3 -0
  849. package/lib/core/viewer/components/plugins/ResourceWebControllUrlSettingDialog.js +33 -6
  850. package/lib/core/viewer/components/plugins/ViewerPlugin.js +9 -1
  851. package/lib/core/viewer/components/titlebar/BasicTools.js +12 -3
  852. package/lib/core/viewer/components/titlebar/TopoViewerTitleBar.js +14 -4
  853. package/lib/core/viewer/components/titlebar/ViewerTools.js +5 -0
  854. package/lib/core/viewer/components/titlebar/widgets/AlarmButton.js +11 -2
  855. package/lib/core/viewer/components/titlebar/widgets/AlarmListShowButton.js +28 -15
  856. package/lib/core/viewer/components/titlebar/widgets/EditButton.js +14 -3
  857. package/lib/core/viewer/components/titlebar/widgets/MoreButtonMenu.js +10 -1
  858. package/lib/core/viewer/components/titlebar/widgets/NodesDragSwitch.js +26 -13
  859. package/lib/core/viewer/components/titlebar/widgets/NodesDragSwitchWrapper.js +10 -1
  860. package/lib/core/viewer/components/titlebar/widgets/SearchWidget.js +25 -9
  861. package/lib/core/viewer/components/titlebar/widgets/SettingButton.js +18 -6
  862. package/lib/core/viewer/components/titlebar/widgets/SettingButtonWidget.js +9 -4
  863. package/lib/core/viewer/contextmenu/buildContextmenu.js +5 -0
  864. package/lib/core/viewer/contextmenu/buildLinkContextmenu.js +2 -2
  865. package/lib/core/viewer/contextmenu/buildNodeContextmenu.js +3 -8
  866. package/lib/core/viewer/contextmenu/buildViewContextmenu.js +1 -0
  867. package/lib/createTopo.js +8 -2
  868. package/lib/index.js +19 -0
  869. package/lib/mock/mock.js +4 -5
  870. package/lib/networkTopo/components/Link/form.js +57 -25
  871. package/lib/networkTopo/components/Link/hook.js +100 -48
  872. package/lib/networkTopo/components/Link/index.js +77 -32
  873. package/lib/networkTopo/components/Link/setting.js +86 -45
  874. package/lib/networkTopo/components/Topo404.js +9 -0
  875. package/lib/networkTopo/components/TopoNoPermission.js +9 -0
  876. package/lib/networkTopo/components/TopoView.js +37 -13
  877. package/lib/networkTopo/createTopo.js +6 -0
  878. package/lib/networkTopo/getTopoData.js +43 -16
  879. package/lib/networkTopo/hooks/useEdgeExpand.js +6 -1
  880. package/lib/networkTopo/hooks/useGroupResources.js +5 -2
  881. package/lib/networkTopo/hooks/useLinkDynamicStyle.js +7 -1
  882. package/lib/networkTopo/hooks/viewer/useEdgeFlow.js +8 -5
  883. package/lib/networkTopo/hooks/viewer/useRelateTopo.js +31 -7
  884. package/lib/networkTopo/index.js +7 -0
  885. package/lib/networkTopo/models/EdgeGroupTagTipBuilder.js +12 -2
  886. package/lib/networkTopo/models/ExtElementTagTipBuilder.js +8 -0
  887. package/lib/networkTopo/models/IpNodeTagsTipsBuilder.js +15 -2
  888. package/lib/networkTopo/models/LinkDynamicStyleExecutor.js +54 -26
  889. package/lib/networkTopo/models/LinkTagsTipsBuilder.js +55 -40
  890. package/lib/networkTopo/models/TopoCenter.js +39 -8
  891. package/lib/networkTopo/services/alert.js +15 -5
  892. package/lib/networkTopo/services/authorization.js +35 -16
  893. package/lib/networkTopo/services/cmdb.js +211 -72
  894. package/lib/networkTopo/services/funcAuth.js +10 -3
  895. package/lib/networkTopo/services/index.js +7 -0
  896. package/lib/networkTopo/services/link.js +47 -11
  897. package/lib/networkTopo/services/mdc.js +26 -9
  898. package/lib/networkTopo/services/metric.js +20 -6
  899. package/lib/networkTopo/services/model.js +291 -89
  900. package/lib/networkTopo/services/risk.js +10 -3
  901. package/lib/networkTopo/services/topo/auth.js +19 -7
  902. package/lib/networkTopo/services/topo/basic.js +154 -57
  903. package/lib/networkTopo/services/topo/blacklist.js +17 -5
  904. package/lib/networkTopo/services/topo/ciInfo.js +20 -5
  905. package/lib/networkTopo/services/topo/icon.js +30 -11
  906. package/lib/networkTopo/services/topo/index.js +15 -0
  907. package/lib/networkTopo/services/topo/networkLink.js +17 -5
  908. package/lib/networkTopo/services/topo/relation.js +11 -3
  909. package/lib/networkTopo/services/topo/resourceWebUrl.js +25 -9
  910. package/lib/networkTopo/store/functionAuth.js +24 -9
  911. package/lib/networkTopo/store/index.js +6 -0
  912. package/lib/networkTopo/store/topoCenter.js +63 -22
  913. package/lib/networkTopo/store/topoLinkMod.js +12 -5
  914. package/lib/networkTopo/store/topoTreeMod.js +83 -19
  915. package/lib/networkTopo/utils/SortResourcesUtil.js +4 -1
  916. package/lib/networkTopo/utils/__tests__/resourcePermissionUtil.test.js +7 -4
  917. package/lib/networkTopo/utils/edgeGroupTagUtil.js +19 -7
  918. package/lib/networkTopo/utils/exitLinkUtil.js +58 -38
  919. package/lib/networkTopo/utils/exportData.js +25 -10
  920. package/lib/networkTopo/utils/linPermissionUtil.js +3 -3
  921. package/lib/networkTopo/utils/linkUtil.js +2 -0
  922. package/lib/networkTopo/utils/resourcePermissionUtil.js +14 -4
  923. package/lib/networkTopo/utils/storage.js +5 -3
  924. package/lib/networkTopo/viewer/components/TitleBar.js +6 -0
  925. package/lib/networkTopo/viewer/components/TopologyViewer.js +12 -3
  926. package/lib/networkTopo/viewer/createTopoViewer.js +5 -0
  927. package/lib/networkTopo/viewer/index.js +9 -0
  928. package/lib/utils/ResourceConfigUtil.js +31 -17
  929. package/lib/utils/SpecialCharacterValidateUtil.js +2 -0
  930. package/lib/utils/ciType.js +7 -1
  931. package/lib/utils/clusterUtil.js +35 -15
  932. package/lib/utils/copyUtil.js +2 -0
  933. package/lib/utils/format.js +38 -12
  934. package/lib/utils/htElementDataUtil.js +12 -0
  935. package/lib/utils/htElementUtils.js +87 -26
  936. package/lib/utils/listToTree.js +3 -0
  937. package/lib/utils/resourceElementUtil.js +2 -0
  938. package/lib/utils/template.js +7 -6
  939. package/lib/utils/topoData.js +97 -51
  940. package/lib/utils/topoMocks.js +4 -3
  941. package/lib/utils/topoPermissionUtil.js +1 -0
  942. package/lib/utils/tree.js +46 -14
  943. package/lib/utils/treeUtil.js +3 -0
  944. package/package.json +3 -3
  945. package/es/components/IndexSettingDrawer/CiList.js +0 -26
  946. package/es/components/IndexSettingDrawer/CiListItem.js +0 -37
  947. package/es/components/IndexSettingDrawer/IndexList.js +0 -62
  948. package/es/components/IndexSettingDrawer/index.js +0 -60
  949. package/es/components/IndexSettingDrawer/index.module.scss +0 -44
  950. package/es/networkTopo/store/linkDynamicStyle.js +0 -259
  951. package/es/networkTopo/store/linkDynamicStyleConfig.js +0 -180
  952. package/es/networkTopo/store/linkManager.js +0 -38
  953. package/lib/components/IndexSettingDrawer/CiList.js +0 -32
  954. package/lib/components/IndexSettingDrawer/CiListItem.js +0 -43
  955. package/lib/components/IndexSettingDrawer/IndexList.js +0 -70
  956. package/lib/components/IndexSettingDrawer/index.js +0 -68
  957. package/lib/components/IndexSettingDrawer/index.module.scss +0 -44
  958. package/lib/networkTopo/store/linkDynamicStyle.js +0 -263
  959. package/lib/networkTopo/store/linkDynamicStyleConfig.js +0 -186
  960. package/lib/networkTopo/store/linkManager.js +0 -42
@@ -1,20 +1,31 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+
4
5
  exports.__esModule = true;
5
6
  exports["default"] = _default;
7
+
8
+ var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
9
+
6
10
  var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
11
+
7
12
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
13
+
8
14
  var _moment = _interopRequireDefault(require("moment"));
15
+
9
16
  var _topo = _interopRequireDefault(require("@riil-frontend/component-topology-common/es/services/topo"));
17
+
10
18
  var _rlog = _interopRequireDefault(require("@riil-frontend/component-topology-utils/es/rlog"));
19
+
11
20
  var _topoData = require("../../../utils/topoData");
21
+
12
22
  var _tree = require("../../../utils/tree");
23
+
13
24
  var _topoPermissionUtil = _interopRequireDefault(require("../../../utils/topoPermissionUtil"));
25
+
14
26
  var _getTopoData = require("../../../networkTopo/getTopoData");
15
- function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator["return"] && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(typeof e + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, "catch": function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
16
- // const clone = (data) => JSON.parse(JSON.stringify(data));
17
27
 
28
+ // const clone = (data) => JSON.parse(JSON.stringify(data));
18
29
  function _default(topoApp) {
19
30
  return {
20
31
  state: {
@@ -24,7 +35,6 @@ function _default(topoApp) {
24
35
  graphLoaded: false,
25
36
  graphLoaded2: false,
26
37
  // 支持编辑模式完全load完
27
-
28
38
  // 额外参数
29
39
  initParams: {},
30
40
  topoLoadError: false,
@@ -46,8 +56,8 @@ function _default(topoApp) {
46
56
  metrics: []
47
57
  },
48
58
  linkTo: null // 关联拓扑来源
49
- },
50
59
 
60
+ },
51
61
  reducers: {
52
62
  update: function update(prevState, payload) {
53
63
  return (0, _extends2["default"])({}, prevState, payload);
@@ -60,21 +70,26 @@ function _default(topoApp) {
60
70
  */
61
71
  initData: function initData(params, rootState) {
62
72
  var _this = this;
63
- return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
73
+
74
+ return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee() {
64
75
  var topoModState, type, id;
65
- return _regeneratorRuntime().wrap(function _callee$(_context) {
76
+ return _regenerator["default"].wrap(function _callee$(_context) {
66
77
  while (1) switch (_context.prev = _context.next) {
67
78
  case 0:
68
79
  if (params === void 0) {
69
80
  params = {};
70
81
  }
82
+
71
83
  topoModState = rootState.topoMod; // 处理URL参数
84
+
72
85
  type = params.type || 'view';
73
86
  id = params.id || topoModState.topoId || '';
87
+
74
88
  _rlog["default"].debug("topoMod.init \u521D\u59CB\u5316(" + id + ")...", {
75
89
  params: params,
76
90
  rootState: rootState
77
91
  });
92
+
78
93
  _this.update({
79
94
  viewState: type,
80
95
  currentTopo: id ? {
@@ -85,22 +100,27 @@ function _default(topoApp) {
85
100
  graphLoaded2: false,
86
101
  initParams: params
87
102
  });
103
+
88
104
  if (!id) {
89
105
  _context.next = 9;
90
106
  break;
91
107
  }
108
+
92
109
  _context.next = 9;
93
110
  return _this.openTopoPage({
94
111
  id: id,
95
112
  viewState: type
96
113
  });
114
+
97
115
  case 9:
98
116
  _this.update({
99
117
  loading: false
100
118
  });
119
+
101
120
  _rlog["default"].debug('topoMod.initTopoCenter 初始化完成', {
102
121
  rootState: rootState
103
122
  });
123
+
104
124
  case 11:
105
125
  case "end":
106
126
  return _context.stop();
@@ -108,6 +128,7 @@ function _default(topoApp) {
108
128
  }, _callee);
109
129
  }))();
110
130
  },
131
+
111
132
  /**
112
133
  * 重置
113
134
  */
@@ -121,6 +142,7 @@ function _default(topoApp) {
121
142
  });
122
143
  topoApp.close();
123
144
  },
145
+
124
146
  /**
125
147
  *
126
148
  * @param playload {object}
@@ -131,14 +153,16 @@ function _default(topoApp) {
131
153
  */
132
154
  openTopoPage: function openTopoPage(playload, rootState) {
133
155
  var _this2 = this;
134
- return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
156
+
157
+ return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2() {
135
158
  var id, data, linkTo, viewState, topoId;
136
- return _regeneratorRuntime().wrap(function _callee2$(_context2) {
159
+ return _regenerator["default"].wrap(function _callee2$(_context2) {
137
160
  while (1) switch (_context2.prev = _context2.next) {
138
161
  case 0:
139
162
  id = playload.id, data = playload.data, linkTo = playload.linkTo;
140
163
  viewState = playload.mode || playload.viewState || 'view';
141
164
  topoId = id || data.config.id;
165
+
142
166
  _this2.update({
143
167
  viewState: viewState,
144
168
  currentTopo: playload,
@@ -147,20 +171,24 @@ function _default(topoApp) {
147
171
  graphLoaded2: false,
148
172
  topoPermission: undefined
149
173
  });
174
+
150
175
  _context2.next = 6;
151
176
  return _this2.initTopoData({
152
177
  topoId: topoId,
153
178
  data: data,
154
179
  linkTo: linkTo
155
180
  });
181
+
156
182
  case 6:
157
183
  if (viewState === 'edit') {
158
184
  // TODO 待优化进入编辑模式方式
159
185
  _this2.update({
160
186
  graphLoaded2: false
161
187
  });
188
+
162
189
  _this2.enterEditMode();
163
190
  }
191
+
164
192
  case 7:
165
193
  case "end":
166
194
  return _context2.stop();
@@ -168,6 +196,7 @@ function _default(topoApp) {
168
196
  }, _callee2);
169
197
  }))();
170
198
  },
199
+
171
200
  /**
172
201
  * 设置拓扑类型
173
202
  * @param {*} type
@@ -186,6 +215,7 @@ function _default(topoApp) {
186
215
  currentTopo: undefined,
187
216
  data: null,
188
217
  globalConfig: null // 全局配置
218
+
189
219
  });
190
220
  },
191
221
  switchToViewMode: function switchToViewMode(playload, rootState) {
@@ -198,15 +228,18 @@ function _default(topoApp) {
198
228
  },
199
229
  openDefaultTopoPage: function openDefaultTopoPage(conditions, rootState) {
200
230
  var _this3 = this;
201
- return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
231
+
232
+ return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee3() {
202
233
  var topoId, treeData;
203
- return _regeneratorRuntime().wrap(function _callee3$(_context3) {
234
+ return _regenerator["default"].wrap(function _callee3$(_context3) {
204
235
  while (1) switch (_context3.prev = _context3.next) {
205
236
  case 0:
206
237
  if (conditions === void 0) {
207
238
  conditions = {};
208
239
  }
240
+
209
241
  topoId = rootState.topoTreeMod.defId;
242
+
210
243
  if (!topoId) {
211
244
  // 查找第一个
212
245
  treeData = rootState.topoTreeMod.treeData;
@@ -215,12 +248,13 @@ function _default(topoApp) {
215
248
  topoId = item.id;
216
249
  }
217
250
  });
218
- }
251
+ } // 右侧切换拓扑图
252
+
219
253
 
220
- // 右侧切换拓扑图
221
254
  _this3.openTopoPage({
222
255
  id: topoId
223
256
  });
257
+
224
258
  case 4:
225
259
  case "end":
226
260
  return _context3.stop();
@@ -230,15 +264,18 @@ function _default(topoApp) {
230
264
  },
231
265
  refreshPermission: function refreshPermission() {
232
266
  var _this4 = this;
233
- return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
234
- return _regeneratorRuntime().wrap(function _callee4$(_context4) {
267
+
268
+ return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee4() {
269
+ return _regenerator["default"].wrap(function _callee4$(_context4) {
235
270
  while (1) switch (_context4.prev = _context4.next) {
236
271
  case 0:
237
272
  _context4.next = 2;
238
273
  return dispatch.functionAuth.refresh();
274
+
239
275
  case 2:
240
276
  _context4.next = 4;
241
277
  return _this4.refreshTopoTree();
278
+
242
279
  case 4:
243
280
  case "end":
244
281
  return _context4.stop();
@@ -247,12 +284,13 @@ function _default(topoApp) {
247
284
  }))();
248
285
  },
249
286
  refreshTopoTree: function refreshTopoTree() {
250
- return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5() {
251
- return _regeneratorRuntime().wrap(function _callee5$(_context5) {
287
+ return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee5() {
288
+ return _regenerator["default"].wrap(function _callee5$(_context5) {
252
289
  while (1) switch (_context5.prev = _context5.next) {
253
290
  case 0:
254
291
  _context5.next = 2;
255
292
  return dispatch.topoTreeMod.refreshTree();
293
+
256
294
  case 2:
257
295
  case "end":
258
296
  return _context5.stop();
@@ -260,6 +298,7 @@ function _default(topoApp) {
260
298
  }, _callee5);
261
299
  }))();
262
300
  },
301
+
263
302
  /**
264
303
  * 加载拓扑图数据。
265
304
  * 场景:首次打开、导航树切换、点刷新按钮、编辑进入显示
@@ -272,16 +311,20 @@ function _default(topoApp) {
272
311
  */
273
312
  initTopoData: function initTopoData(props, state) {
274
313
  var _this5 = this;
275
- return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6() {
314
+
315
+ return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee6() {
276
316
  var _result$config;
317
+
277
318
  var startTime, topoId, data, linkToData, refresh, clear, linkTo, startState, permission, result, graphConfig, topoConfig, extraConfig, _combTopoData, topoData, resAndMetrics, _yield$Promise$all, newData, endTime;
278
- return _regeneratorRuntime().wrap(function _callee6$(_context6) {
319
+
320
+ return _regenerator["default"].wrap(function _callee6$(_context6) {
279
321
  while (1) switch (_context6.prev = _context6.next) {
280
322
  case 0:
281
323
  startTime = (0, _moment["default"])();
282
324
  topoId = props.topoId, data = props.data, linkToData = props.linkTo, refresh = props.refresh, clear = props.clear;
283
325
  _context6.next = 4;
284
326
  return topoApp.open(topoId);
327
+
285
328
  case 4:
286
329
  // 关联拓扑图
287
330
  linkTo = refresh === true ? state.topoMod.linkTo : linkToData || null;
@@ -292,57 +335,70 @@ function _default(topoApp) {
292
335
  topoLoadError: false,
293
336
  linkTo: linkTo
294
337
  };
338
+
295
339
  if (clear === true || topoId < 0) {
296
340
  Object.assign(startState, {
297
341
  topoData: null,
298
342
  data: null,
299
343
  globalConfig: null // 全局配置
344
+
300
345
  });
301
346
  }
302
347
 
303
348
  _this5.update(startState);
349
+
304
350
  dispatch.topoBizMod.update({
305
351
  pollingSwitch: false
306
352
  });
307
- topoApp.options.onLoadStart();
353
+ topoApp.options.onLoadStart(); // TODO 待移到拓扑中心
308
354
 
309
- // TODO 待移到拓扑中心
310
355
  permission = 'write';
356
+
311
357
  if (!topoApp.options.usePermission) {
312
358
  _context6.next = 19;
313
359
  break;
314
360
  }
361
+
315
362
  _context6.next = 14;
316
363
  return _this5.getTopoPermission({
317
364
  id: topoId
318
365
  });
366
+
319
367
  case 14:
320
368
  permission = _context6.sent;
369
+
321
370
  if (_topoPermissionUtil["default"].isReadable(permission)) {
322
371
  _context6.next = 19;
323
372
  break;
324
373
  }
374
+
325
375
  _this5.update({
326
376
  loading: false,
327
377
  topoData: null,
328
378
  data: null,
329
379
  globalConfig: null // 全局配置
380
+
330
381
  });
331
382
 
332
383
  topoApp.options.onLoad();
333
384
  return _context6.abrupt("return");
385
+
334
386
  case 19:
335
387
  if (!data) {
336
388
  _context6.next = 30;
337
389
  break;
338
390
  }
391
+
339
392
  graphConfig = {};
393
+
340
394
  if (!topoId) {
341
395
  _context6.next = 27;
342
396
  break;
343
397
  }
398
+
344
399
  _context6.next = 24;
345
400
  return _topo["default"].getTopoData(topoId);
401
+
346
402
  case 24:
347
403
  topoConfig = _context6.sent;
348
404
  if (!topoConfig) _rlog["default"].error("\u672A\u67E5\u8BE2\u5230\u62D3\u6251id " + topoId + " \u7684\u6570\u636E\uFF0C\u8BF7\u68C0\u67E5");
@@ -351,20 +407,25 @@ function _default(topoApp) {
351
407
  customGlobal: data.global,
352
408
  serialize: topoConfig === null || topoConfig === void 0 ? void 0 : topoConfig.serialize
353
409
  };
410
+
354
411
  case 27:
355
412
  result = (0, _extends2["default"])({}, data, graphConfig);
356
413
  _context6.next = 33;
357
414
  break;
415
+
358
416
  case 30:
359
417
  _context6.next = 32;
360
418
  return topoApp.options.loadData(topoId, topoApp.serverApi);
419
+
361
420
  case 32:
362
421
  result = _context6.sent;
422
+
363
423
  case 33:
364
424
  if (result) {
365
425
  _context6.next = 37;
366
426
  break;
367
427
  }
428
+
368
429
  _this5.update({
369
430
  loading: false,
370
431
  data: null,
@@ -372,13 +433,18 @@ function _default(topoApp) {
372
433
  // 全局配置
373
434
  topoData: null
374
435
  });
436
+
375
437
  topoApp.options.onLoad();
376
438
  return _context6.abrupt("return");
439
+
377
440
  case 37:
378
441
  result = (0, _topoData.parseTopoData)(result);
442
+
379
443
  _rlog["default"].debug('topoMod.initTopoData 查询数据完成', topoId, linkTo, result);
444
+
380
445
  _context6.next = 41;
381
446
  return dispatch.customIcon.loadCustomIcons();
447
+
382
448
  case 41:
383
449
  extraConfig = result.global.extraConfig;
384
450
  _context6.next = 44;
@@ -386,6 +452,7 @@ function _default(topoApp) {
386
452
  alarmSwitch: result.global.alarmSwitch,
387
453
  alarmListDefaultOpen: result.global.alarmListDefaultOpen
388
454
  }));
455
+
389
456
  case 44:
390
457
  _combTopoData = (0, _topoData.combTopoData)({
391
458
  engine: topoApp,
@@ -393,6 +460,7 @@ function _default(topoApp) {
393
460
  linkTo: linkTo,
394
461
  globalConfig: extraConfig
395
462
  }), topoData = _combTopoData.topoData, resAndMetrics = _combTopoData.resAndMetrics; // rlog.debug("topoMod.initTopoData combTopoData", { topoData, resAndMetrics, });
463
+
396
464
  _context6.next = 47;
397
465
  return _this5.update({
398
466
  currentTopo: topoData.config,
@@ -402,17 +470,17 @@ function _default(topoApp) {
402
470
  topoData: topoData,
403
471
  resAndMetrics: resAndMetrics
404
472
  });
473
+
405
474
  case 47:
406
475
  dispatch.topoBizMod.combBatchCiInfo(resAndMetrics);
407
- dispatch.background.init(extraConfig);
476
+ dispatch.background.init(extraConfig); // TODO 优化打开拓扑图显示告警速度:打开拓扑图立即请求告警
408
477
 
409
- // TODO 优化打开拓扑图显示告警速度:打开拓扑图立即请求告警
410
- topoApp.alarm.open();
478
+ topoApp.alarm.open(); // 加载标注悬浮框数据
411
479
 
412
- // 加载标注悬浮框数据
413
480
  _context6.next = 52;
414
481
  return Promise.all([(0, _getTopoData.addLinkData)(result), topoApp.ciTyeCache.load((0, _topoData.getCiTypes)(result)), topoApp.elementTagTipConfig.init(result) // 暂停新配置开发
415
482
  ]);
483
+
416
484
  case 52:
417
485
  _yield$Promise$all = _context6.sent;
418
486
  newData = _yield$Promise$all[0];
@@ -420,17 +488,22 @@ function _default(topoApp) {
420
488
  return _this5.update({
421
489
  data: newData
422
490
  });
491
+
423
492
  case 56:
424
493
  dispatch.topoBizMod.update({
425
494
  pollingSwitch: true
426
495
  });
427
496
  topoApp.onTopoDataLoaded(topoData);
428
497
  endTime = (0, _moment["default"])();
498
+
429
499
  _rlog["default"].info('topoMod.initTopoData 初始化拓扑图数据完成. 耗时: ', endTime.diff(startTime, 'seconds', true));
500
+
430
501
  topoApp.options.onLoad();
502
+
431
503
  _this5.update({
432
504
  loading: false
433
505
  });
506
+
434
507
  case 62:
435
508
  case "end":
436
509
  return _context6.stop();
@@ -438,19 +511,23 @@ function _default(topoApp) {
438
511
  }, _callee6);
439
512
  }))();
440
513
  },
514
+
441
515
  /**
442
516
  * 刷新拓扑图
443
517
  */
444
518
  refreshTopo: function refreshTopo(payload, rootState) {
445
519
  var _this6 = this;
446
- return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7() {
520
+
521
+ return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee7() {
447
522
  var _payload, clear;
448
- return _regeneratorRuntime().wrap(function _callee7$(_context7) {
523
+
524
+ return _regenerator["default"].wrap(function _callee7$(_context7) {
449
525
  while (1) switch (_context7.prev = _context7.next) {
450
526
  case 0:
451
527
  if (payload === void 0) {
452
528
  payload = {};
453
529
  }
530
+
454
531
  _payload = payload, clear = _payload.clear;
455
532
  _context7.next = 4;
456
533
  return _this6.initTopoData({
@@ -458,6 +535,7 @@ function _default(topoApp) {
458
535
  refresh: true,
459
536
  clear: clear
460
537
  });
538
+
461
539
  case 4:
462
540
  case "end":
463
541
  return _context7.stop();
@@ -467,31 +545,36 @@ function _default(topoApp) {
467
545
  },
468
546
  operationTopoPage: function operationTopoPage(conditions, state) {
469
547
  var _this7 = this;
470
- return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8() {
548
+
549
+ return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee8() {
471
550
  var td;
472
- return _regeneratorRuntime().wrap(function _callee8$(_context8) {
551
+ return _regenerator["default"].wrap(function _callee8$(_context8) {
473
552
  while (1) switch (_context8.prev = _context8.next) {
474
553
  case 0:
475
554
  if (conditions === void 0) {
476
555
  conditions = {};
477
556
  }
557
+
478
558
  if (conditions.id === state.topoMod.topoId) {
479
559
  if (conditions.type === 'delete') {
480
560
  _this7.update({
481
561
  topoId: conditions.defId
482
562
  });
483
563
  }
564
+
484
565
  if (conditions.type === 'rename') {
485
566
  td = (0, _extends2["default"])({}, state.topoMod.topoData, {
486
567
  config: (0, _extends2["default"])({}, state.topoMod.topoData.config, {
487
568
  name: conditions.name
488
569
  })
489
570
  });
571
+
490
572
  _this7.update({
491
573
  topoData: td
492
574
  });
493
575
  }
494
576
  }
577
+
495
578
  case 2:
496
579
  case "end":
497
580
  return _context8.stop();
@@ -500,11 +583,12 @@ function _default(topoApp) {
500
583
  }))();
501
584
  },
502
585
  openPermissionSetting: function openPermissionSetting(payload, rootState) {
503
- return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9() {
504
- return _regeneratorRuntime().wrap(function _callee9$(_context9) {
586
+ return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee9() {
587
+ return _regenerator["default"].wrap(function _callee9$(_context9) {
505
588
  while (1) switch (_context9.prev = _context9.next) {
506
589
  case 0:
507
590
  dispatch.permissionSetting.open();
591
+
508
592
  case 1:
509
593
  case "end":
510
594
  return _context9.stop();
@@ -513,14 +597,16 @@ function _default(topoApp) {
513
597
  }))();
514
598
  },
515
599
  updateDelId: function updateDelId(conditions, state) {
516
- return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee10() {
517
- return _regeneratorRuntime().wrap(function _callee10$(_context10) {
600
+ return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee10() {
601
+ return _regenerator["default"].wrap(function _callee10$(_context10) {
518
602
  while (1) switch (_context10.prev = _context10.next) {
519
603
  case 0:
520
604
  if (conditions === void 0) {
521
605
  conditions = '';
522
606
  }
607
+
523
608
  _rlog["default"].debug('updateDelId', conditions);
609
+
524
610
  case 2:
525
611
  case "end":
526
612
  return _context10.stop();
@@ -530,32 +616,41 @@ function _default(topoApp) {
530
616
  },
531
617
  getTopoPermission: function getTopoPermission(playload, rootState) {
532
618
  var _this8 = this;
533
- return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee11() {
619
+
620
+ return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee11() {
534
621
  var id, update, topoPermission;
535
- return _regeneratorRuntime().wrap(function _callee11$(_context11) {
622
+ return _regenerator["default"].wrap(function _callee11$(_context11) {
536
623
  while (1) switch (_context11.prev = _context11.next) {
537
624
  case 0:
538
625
  id = playload.id, update = playload.update;
539
626
  _context11.prev = 1;
540
627
  _context11.next = 4;
541
628
  return topoApp.serverApi.auth.getTopoPermission(id);
629
+
542
630
  case 4:
543
631
  topoPermission = _context11.sent;
632
+
544
633
  _rlog["default"].debug('查询拓扑权限', topoPermission);
634
+
545
635
  _context11.next = 11;
546
636
  break;
637
+
547
638
  case 8:
548
639
  _context11.prev = 8;
549
640
  _context11.t0 = _context11["catch"](1);
550
- _rlog["default"].error("\u67E5\u8BE2\u62D3\u6251" + id + "\u7684\u6743\u9650\u5931\u8D25", _context11.t0);
551
- // 尚未区分拓扑图不存在还是接口请求报错
641
+
642
+ _rlog["default"].error("\u67E5\u8BE2\u62D3\u6251" + id + "\u7684\u6743\u9650\u5931\u8D25", _context11.t0); // 尚未区分拓扑图不存在还是接口请求报错
643
+
644
+
552
645
  case 11:
553
646
  if (update !== false) {
554
647
  _this8.update({
555
648
  topoPermission: topoPermission
556
649
  });
557
650
  }
651
+
558
652
  return _context11.abrupt("return", topoPermission);
653
+
559
654
  case 13:
560
655
  case "end":
561
656
  return _context11.stop();
@@ -1,10 +1,14 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+
4
5
  exports.__esModule = true;
5
6
  exports["default"] = void 0;
7
+
6
8
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
9
+
7
10
  var _rlog = _interopRequireDefault(require("@riil-frontend/component-topology-utils/es/rlog"));
11
+
8
12
  /**
9
13
  * 锁定
10
14
  */