@riil-frontend/component-topology 6.0.0-alpha.9 → 6.0.1

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 (376) hide show
  1. package/build/1.js +2 -2
  2. package/build/2.js +1 -1
  3. package/build/index.css +1 -1
  4. package/build/index.js +35 -35
  5. package/demo/CHANGELOG/CHANGELOG.md +5 -0
  6. package/es/components/ColorPanel/components/ColorBlock/index.js +37 -0
  7. package/es/components/ColorPanel/components/ColorBlock/index.module.scss +9 -0
  8. package/es/components/ColorPanel/components/FontColorRange/index.js +35 -0
  9. package/es/components/ColorPanel/components/FontColorRange/index.module.scss +25 -0
  10. package/es/components/ColorPanel/index.js +259 -0
  11. package/es/components/ColorPanel/index.module.scss +35 -0
  12. package/es/components/VerticalIconTab/VerticalIconTab.js +11 -1
  13. package/es/components/VerticalIconTab/VerticalIconTab.module.scss +2 -0
  14. package/es/components/collapse/Collapse.js +22 -3
  15. package/es/components/collapse/Collapse.module.scss +24 -0
  16. package/es/components/collapse/index.js +2 -0
  17. package/es/core/common/hooks/useHtElements.js +21 -0
  18. package/es/core/common/icons/icon.js +40 -0
  19. package/es/core/common/icons/useIcons.js +5 -19
  20. package/es/core/components/AlarmListPanel/components/AlarmListItem.js +14 -13
  21. package/es/core/components/AlarmListPanel/components/index.module.scss +5 -5
  22. package/es/core/components/DisplaySettingDrawer/DisplaySetting.js +2 -1
  23. package/es/core/components/DisplaySettingDrawer/DisplaySettingDrawer.js +9 -3
  24. package/es/core/components/DisplaySettingDrawer/EditorDisplaySetting.js +122 -0
  25. package/es/core/components/DisplaySettingDrawer/LineExpandAllRadioGroup.js +0 -3
  26. package/es/core/components/DisplaySettingDrawer/hooks/useDisplaySetting.js +84 -22
  27. package/es/core/components/TopoView/GraphViewPanel.js +22 -0
  28. package/es/core/components/TopoView/editor.module.scss +1 -0
  29. package/es/core/components/TopoView/topoView.js +30 -60
  30. package/es/core/components/titlebar/TitleBar.module.scss +1 -1
  31. package/es/core/editor/components/EditorPlugin.js +18 -2
  32. package/es/core/editor/components/Sidebar/Sidebar.js +29 -7
  33. package/es/core/editor/components/Sidebar/panes.js +10 -5
  34. package/es/core/editor/components/Sidebar/views/CanvasPanel/CanvasPanel.js +11 -30
  35. package/es/core/editor/components/Sidebar/views/CanvasPanel/hooks/useCanvasThemeConfig.js +109 -0
  36. package/es/core/editor/components/Sidebar/views/CanvasPanel/hooks/useUpdateHtTopoDefaultTagStyle.js +27 -0
  37. package/es/core/editor/components/Sidebar/views/CanvasPanel/utils/elementThemeUtil.js +0 -0
  38. package/es/core/editor/components/Sidebar/views/ImagePanel/CiTypeImagePanel.js +3 -3
  39. package/es/core/editor/components/Sidebar/views/ImagePanel/HtCustomImagePanel.js +12 -1
  40. package/es/core/editor/components/Sidebar/views/ImagePanel/HtImagePalette.js +12 -1
  41. package/es/core/editor/components/Sidebar/views/ImagePanel/HtImagePalette.module.scss +3 -3
  42. package/es/core/editor/components/Sidebar/views/ImagePanel/ImagePanel.js +27 -8
  43. package/es/core/editor/components/Toolbar/buttons.js +2 -2
  44. package/es/core/editor/components/Toolbar/widgets/AddResourceButton.js +1 -1
  45. package/es/core/editor/components/Toolbar/widgets/BoxBackgroundButton/BoxBackgroundButton.js +3 -3
  46. package/es/core/editor/components/Toolbar/widgets/EdgeColorButton/Content.js +46 -2
  47. package/es/core/editor/components/Toolbar/widgets/EdgeColorButton/EdgeColorButton.js +98 -6
  48. package/es/core/editor/components/Toolbar/widgets/EdgeTypeButton/EdgeType.js +59 -25
  49. package/es/core/editor/components/Toolbar/widgets/EdgeTypeButton/LineType.js +3 -5
  50. package/es/core/editor/components/Toolbar/widgets/EdgeTypeButton/constants.js +77 -0
  51. package/es/core/editor/components/Toolbar/widgets/EdgeTypeButton/index.js +52 -5
  52. package/es/core/editor/components/Toolbar/widgets/FontColorButton.js +166 -16
  53. package/es/core/editor/components/Toolbar/widgets/FontColorButton.module.scss +42 -0
  54. package/es/core/editor/components/Toolbar/widgets/FontFamilyWidget.js +26 -12
  55. package/es/core/editor/components/Toolbar/widgets/FontSizeWidget.js +37 -12
  56. package/es/core/editor/components/Toolbar/widgets/FontStyleButton.js +92 -39
  57. package/es/core/editor/components/Toolbar/widgets/IconSelect/index.module.scss +4 -2
  58. package/es/core/editor/components/Toolbar/widgets/IconSelect/popUpContent.js +1 -2
  59. package/es/core/editor/components/Toolbar/widgets/Layout/components/LayoutSettings.js +99 -0
  60. package/es/core/editor/components/Toolbar/widgets/Layout/components/LayoutSettings.module.scss +70 -0
  61. package/es/core/editor/components/Toolbar/widgets/Layout/components/LayoutTagImageSelect/index.js +42 -0
  62. package/es/core/editor/components/Toolbar/widgets/Layout/components/LayoutTagImageSelect/index.module.scss +7 -0
  63. package/es/core/editor/components/Toolbar/widgets/Layout/components/LayoutTagSelect/index.js +75 -0
  64. package/es/core/editor/components/Toolbar/widgets/Layout/components/LayoutTagSelect/index.scss +32 -0
  65. package/es/core/editor/components/Toolbar/widgets/Layout/components/LayoutTemplateButton/Icon.js +23 -0
  66. package/es/core/editor/components/Toolbar/widgets/Layout/components/LayoutTemplateButton/assets/index.js +10 -0
  67. package/es/core/editor/components/Toolbar/widgets/Layout/components/LayoutTemplateButton/assets/topo_layout_circular.svg +10 -0
  68. package/es/core/editor/components/Toolbar/widgets/Layout/components/LayoutTemplateButton/assets/topo_layout_hierarchical.svg +10 -0
  69. package/es/core/editor/components/Toolbar/widgets/Layout/components/LayoutTemplateButton/assets/topo_layout_rectangle.svg +12 -0
  70. package/es/core/editor/components/Toolbar/widgets/Layout/components/LayoutTemplateButton/assets/topo_layout_toward.svg +16 -0
  71. package/es/core/editor/components/Toolbar/widgets/Layout/components/LayoutTemplateButton/index.js +31 -0
  72. package/es/core/editor/components/Toolbar/widgets/Layout/components/LayoutTemplateButton/index.module.scss +53 -0
  73. package/es/core/editor/components/Toolbar/widgets/Layout/index.js +130 -15
  74. package/es/core/editor/components/Toolbar/widgets/NodeAlignWidget.js +107 -23
  75. package/es/core/editor/components/Toolbar/widgets/NodeAlignWidget.module.scss +33 -0
  76. package/es/core/editor/components/Toolbar/widgets/NodeImageButton/BoxBackgroundSetting.js +2 -2
  77. package/es/core/editor/components/Toolbar/widgets/NodeImageButton/NodeImageButton.js +20 -7
  78. package/es/core/editor/components/Toolbar/widgets/NodeSizeButton/NodeSizeButton.js +40 -35
  79. package/es/core/editor/components/Toolbar/widgets/NodeSizeButton/NodeSizeButton.module.scss +28 -0
  80. package/es/core/editor/components/Toolbar/widgets/WidgetBox.js +10 -4
  81. package/es/core/editor/components/Toolbar/widgets/WidgetBox.module.scss +10 -1
  82. package/es/core/editor/components/Toolbar/widgets/components/ButtonBox.js +2 -2
  83. package/es/core/editor/components/Toolbar/widgets/components/ButtonBox.module.scss +4 -0
  84. package/es/core/editor/components/Toolbar/widgets/components/DropdownButton.js +19 -8
  85. package/es/core/editor/components/Toolbar/widgets/components/DropdownMenu.js +21 -7
  86. package/es/core/editor/components/Toolbar/widgets/components/textStyleSetting/ElementTextStyleSetting/ElementTextStyleSetting.js +52 -0
  87. package/es/core/editor/components/Toolbar/widgets/components/textStyleSetting/ElementTextStyleSetting/colorUtil.js +67 -0
  88. package/es/core/editor/components/Toolbar/widgets/components/textStyleSetting/ElementTextStyleSetting/elements/box.js +41 -0
  89. package/es/core/editor/components/Toolbar/widgets/components/textStyleSetting/ElementTextStyleSetting/elements/edgeTag.js +65 -0
  90. package/es/core/editor/components/Toolbar/widgets/components/textStyleSetting/ElementTextStyleSetting/elements/groupTitle.js +65 -0
  91. package/es/core/editor/components/Toolbar/widgets/components/textStyleSetting/ElementTextStyleSetting/elements/index.js +14 -0
  92. package/es/core/editor/components/Toolbar/widgets/components/textStyleSetting/ElementTextStyleSetting/elements/layerTitle.js +73 -0
  93. package/es/core/editor/components/Toolbar/widgets/components/textStyleSetting/ElementTextStyleSetting/elements/nodeTag.js +69 -0
  94. package/es/core/editor/components/Toolbar/widgets/components/textStyleSetting/ElementTextStyleSetting/elements/text.js +37 -0
  95. package/es/core/editor/components/Toolbar/widgets/components/textStyleSetting/ElementTextStyleSetting/textStyleUtil.js +124 -0
  96. package/es/core/editor/components/Toolbar/widgets/components/textStyleSetting/GlobalTagStyleSetting/GlobalTagStyleSetting.js +31 -0
  97. package/es/core/editor/components/Toolbar/widgets/components/textStyleSetting/GlobalTagStyleSetting/globalTag.js +98 -0
  98. package/es/core/editor/components/Toolbar/widgets/components/textStyleSetting/textStyleSettingRouter.js +20 -0
  99. package/es/core/editor/components/plugins/AddElementThemePlugin.js +11 -0
  100. package/es/core/editor/components/settings/CloseablePanel.js +33 -0
  101. package/es/core/editor/components/settings/CloseablePanel.module.scss +21 -0
  102. package/es/core/editor/components/settings/PropertyView.js +50 -11
  103. package/es/core/editor/components/settings/Settings.js +37 -122
  104. package/es/core/editor/components/settings/Settings.module.scss +7 -11
  105. package/es/core/editor/components/settings/common/AlignSetting/AlignSetting.module.scss +3 -3
  106. package/es/core/editor/components/settings/common/AlignSetting/AlignTypeList.js +80 -0
  107. package/es/core/editor/components/settings/common/AlignSetting/index.js +20 -72
  108. package/es/core/editor/components/settings/common/GroupNodeList/ResourceList.module.scss +1 -0
  109. package/es/core/editor/components/settings/common/LineType/index.js +11 -102
  110. package/es/core/editor/components/settings/common/NameInput.js +24 -0
  111. package/es/core/editor/components/settings/common/SizeInput/NodeSizeInput.js +21 -18
  112. package/es/core/editor/components/settings/common/text/fontStyleUtil.js +21 -19
  113. package/es/core/editor/components/settings/core/PropertyViewManager.js +81 -0
  114. package/es/core/editor/components/settings/core/edgePropertyViewAdapter.js +22 -0
  115. package/es/core/editor/components/settings/core/getPropertyViewType.js +34 -0
  116. package/es/core/editor/components/settings/core/updateElementProperty.js +21 -0
  117. package/es/core/editor/components/settings/propertyViews/box/BoxPropertyView.js +6 -13
  118. package/es/core/editor/components/settings/propertyViews/box/BoxPropertyViewV1.js +58 -0
  119. package/es/core/editor/components/settings/propertyViews/box/NameInput.js +5 -4
  120. package/es/core/editor/components/settings/propertyViews/edge/CommonEdgePropertyView.js +12 -3
  121. package/es/core/editor/components/settings/propertyViews/edge/EdgeGroupPropertyView.js +7 -8
  122. package/es/core/editor/components/settings/propertyViews/edge/EdgePropertyView.js +9 -23
  123. package/es/core/editor/components/settings/propertyViews/edge/addEdgeProps.js +10 -0
  124. package/es/core/editor/components/settings/propertyViews/edge/edgeGroup/EdgeGroupSetting.js +1 -6
  125. package/es/core/editor/components/settings/propertyViews/group/GroupPropertyView.js +13 -21
  126. package/es/core/editor/components/settings/propertyViews/group/GroupPropertyView.module.scss +8 -1
  127. package/es/core/editor/components/settings/propertyViews/group/GroupPropertyViewV1.js +28 -0
  128. package/es/core/editor/components/settings/propertyViews/group/SettingTab/GroupBasicSetting.js +75 -0
  129. package/es/core/editor/components/settings/propertyViews/group/SettingTab/GroupExpandSetting.js +9 -15
  130. package/es/core/editor/components/settings/propertyViews/group/cluster/ClusterGroupRelateData.js +8 -6
  131. package/es/core/editor/components/settings/propertyViews/index.js +4 -6
  132. package/es/core/editor/components/settings/propertyViews/layer/BasicSetting.js +57 -0
  133. package/es/core/editor/components/settings/propertyViews/layer/LayerPropertyView.js +11 -17
  134. package/es/core/editor/components/settings/propertyViews/layer/LayerPropertyView.module.scss +10 -0
  135. package/es/core/editor/components/settings/propertyViews/layer/LayerPropertyViewV1.js +27 -0
  136. package/es/core/editor/components/settings/propertyViews/multipleElements/MultipleElementLineType.js +5 -7
  137. package/es/core/editor/components/settings/propertyViews/multipleElements/MultipleElementPropertyView.js +2 -15
  138. package/es/core/editor/components/settings/propertyViews/node/NodePropertyView.js +8 -32
  139. package/es/core/editor/components/settings/propertyViews/node/NodePropertyViewV1.js +53 -0
  140. package/es/core/editor/components/settings/propertyViews/node/Setting/BasicSetting.js +49 -0
  141. package/es/core/editor/components/settings/propertyViews/node/Setting/NameInput.js +5 -4
  142. package/es/core/editor/components/settings/propertyViews/node/data/Data.js +2 -1
  143. package/es/core/editor/components/settings/propertyViews/node/data/NodeRelateResourceButton.js +1 -0
  144. package/es/core/editor/components/settings/propertyViews/text/TextPropertyView.js +5 -20
  145. package/es/core/editor/components/titlebar/TopoEditorTitleBar.js +8 -4
  146. package/es/core/editor/config/themes.js +105 -0
  147. package/es/core/editor/hooks/useKeyboardShortcut.js +39 -0
  148. package/es/core/editor/hooks/useNewElementTheme.js +46 -0
  149. package/es/core/editor/store/topoEdit.js +44 -37
  150. package/es/core/editor/utils/edgeTypeStyleUtil.js +34 -11
  151. package/es/core/editor/utils/textStyleUtil.js +0 -0
  152. package/es/core/editor/utils/themeUtil.js +32 -0
  153. package/es/core/hooks/useCanvasTheme.js +54 -0
  154. package/es/core/hooks/useManageStatus.js +1 -9
  155. package/es/core/hooks/usePolling.js +2 -5
  156. package/es/core/hooks/useTopoEdit.js +15 -8
  157. package/es/core/models/Alarm.js +2 -2
  158. package/es/core/models/AttributeMetricDisplay.js +4 -0
  159. package/es/core/models/HistoryManager.js +13 -8
  160. package/es/core/models/{SelectionManager.js → SelectionModel.js} +55 -22
  161. package/es/core/models/TopoApp.js +6 -5
  162. package/es/core/models/selection/ignoreList.js +1 -0
  163. package/es/core/models/utils/linkUtils.js +5 -6
  164. package/es/core/store/models/customIcon.js +1 -3
  165. package/es/core/store/models/selection.js +2 -1
  166. package/es/core/store/models/topoBizMod.js +0 -3
  167. package/es/core/store/models/topoConfig.js +10 -12
  168. package/es/core/store/models/topoMod.js +26 -28
  169. package/es/core/utils/edgeUtil.js +6 -0
  170. package/es/core/utils/showGraphManageStatusUtil.js +7 -1
  171. package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/hooks/useMetricPolling.js +18 -13
  172. package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/services/index.js +38 -19
  173. package/es/core/viewer/components/plugins/ResourceDetail/components/WebConsole/WebConsoleForm/WebConsoleForm.js +13 -29
  174. package/es/core/viewer/components/plugins/ResourceDetail/components/WebConsole/WebConsoleForm/hooks/useWebConsole.js +6 -5
  175. package/es/core/viewer/components/plugins/ViewerPlugin.js +10 -4
  176. package/es/core/viewer/components/titlebar/widgets/SettingButton.js +3 -1
  177. package/es/core/viewer/components/titlebar/widgets/SettingButtonWidget.js +4 -2
  178. package/es/networkTopo/components/editor/propertyViews/edge/EdgeGroupPropertyView.js +2 -1
  179. package/es/networkTopo/components/editor/propertyViews/edge/EdgePropertyView.js +39 -6
  180. package/es/networkTopo/components/editor/propertyViews/edge/LinkPropertyView/LinkPropertyView.js +10 -16
  181. package/es/networkTopo/components/editor/propertyViews/edge/LinkPropertyView/LinkPropertyViewV1.js +37 -0
  182. package/es/networkTopo/components/editor/propertyViews/edge/link/LinkInfoPreview.module.scss +1 -1
  183. package/es/networkTopo/components/editor/useEditorProps.js +1 -3
  184. package/es/networkTopo/createTopo.js +2 -0
  185. package/es/networkTopo/models/LinkDynamicStyleExecutor.js +2 -2
  186. package/es/networkTopo/services/link.js +2 -2
  187. package/es/networkTopo/store/topoTreeMod.js +6 -7
  188. package/es/style.js +28 -27
  189. package/es/utils/htElementUtils.js +3 -0
  190. package/es/utils/topoData.js +1 -0
  191. package/lib/components/ColorPanel/components/ColorBlock/index.js +47 -0
  192. package/lib/components/ColorPanel/components/ColorBlock/index.module.scss +9 -0
  193. package/lib/components/ColorPanel/components/FontColorRange/index.js +49 -0
  194. package/lib/components/ColorPanel/components/FontColorRange/index.module.scss +25 -0
  195. package/lib/components/ColorPanel/index.js +278 -0
  196. package/lib/components/ColorPanel/index.module.scss +35 -0
  197. package/lib/components/VerticalIconTab/VerticalIconTab.js +14 -1
  198. package/lib/components/VerticalIconTab/VerticalIconTab.module.scss +2 -0
  199. package/lib/components/collapse/Collapse.js +28 -3
  200. package/lib/components/collapse/Collapse.module.scss +24 -0
  201. package/lib/components/collapse/index.js +11 -0
  202. package/lib/core/common/hooks/useHtElements.js +27 -0
  203. package/lib/core/common/icons/icon.js +47 -0
  204. package/lib/core/common/icons/useIcons.js +7 -18
  205. package/lib/core/components/AlarmListPanel/components/AlarmListItem.js +14 -13
  206. package/lib/core/components/AlarmListPanel/components/index.module.scss +5 -5
  207. package/lib/core/components/DisplaySettingDrawer/DisplaySetting.js +2 -1
  208. package/lib/core/components/DisplaySettingDrawer/DisplaySettingDrawer.js +10 -3
  209. package/lib/core/components/DisplaySettingDrawer/EditorDisplaySetting.js +147 -0
  210. package/lib/core/components/DisplaySettingDrawer/LineExpandAllRadioGroup.js +0 -3
  211. package/lib/core/components/DisplaySettingDrawer/hooks/useDisplaySetting.js +84 -22
  212. package/lib/core/components/TopoView/GraphViewPanel.js +32 -0
  213. package/lib/core/components/TopoView/editor.module.scss +1 -0
  214. package/lib/core/components/TopoView/topoView.js +36 -67
  215. package/lib/core/components/titlebar/TitleBar.module.scss +1 -1
  216. package/lib/core/editor/components/EditorPlugin.js +26 -2
  217. package/lib/core/editor/components/Sidebar/Sidebar.js +28 -6
  218. package/lib/core/editor/components/Sidebar/panes.js +10 -5
  219. package/lib/core/editor/components/Sidebar/views/CanvasPanel/CanvasPanel.js +12 -31
  220. package/lib/core/editor/components/Sidebar/views/CanvasPanel/hooks/useCanvasThemeConfig.js +123 -0
  221. package/lib/core/editor/components/Sidebar/views/CanvasPanel/hooks/useUpdateHtTopoDefaultTagStyle.js +37 -0
  222. package/lib/core/editor/components/Sidebar/views/CanvasPanel/utils/elementThemeUtil.js +1 -0
  223. package/lib/core/editor/components/Sidebar/views/ImagePanel/CiTypeImagePanel.js +1 -1
  224. package/lib/core/editor/components/Sidebar/views/ImagePanel/HtCustomImagePanel.js +13 -1
  225. package/lib/core/editor/components/Sidebar/views/ImagePanel/HtImagePalette.js +13 -1
  226. package/lib/core/editor/components/Sidebar/views/ImagePanel/HtImagePalette.module.scss +3 -3
  227. package/lib/core/editor/components/Sidebar/views/ImagePanel/ImagePanel.js +36 -12
  228. package/lib/core/editor/components/Toolbar/buttons.js +2 -2
  229. package/lib/core/editor/components/Toolbar/widgets/AddResourceButton.js +1 -1
  230. package/lib/core/editor/components/Toolbar/widgets/BoxBackgroundButton/BoxBackgroundButton.js +3 -3
  231. package/lib/core/editor/components/Toolbar/widgets/EdgeColorButton/Content.js +48 -2
  232. package/lib/core/editor/components/Toolbar/widgets/EdgeColorButton/EdgeColorButton.js +100 -6
  233. package/lib/core/editor/components/Toolbar/widgets/EdgeTypeButton/EdgeType.js +58 -24
  234. package/lib/core/editor/components/Toolbar/widgets/EdgeTypeButton/LineType.js +3 -3
  235. package/lib/core/editor/components/Toolbar/widgets/EdgeTypeButton/constants.js +83 -0
  236. package/lib/core/editor/components/Toolbar/widgets/EdgeTypeButton/index.js +53 -4
  237. package/lib/core/editor/components/Toolbar/widgets/FontColorButton.js +172 -16
  238. package/lib/core/editor/components/Toolbar/widgets/FontColorButton.module.scss +42 -0
  239. package/lib/core/editor/components/Toolbar/widgets/FontFamilyWidget.js +27 -11
  240. package/lib/core/editor/components/Toolbar/widgets/FontSizeWidget.js +38 -11
  241. package/lib/core/editor/components/Toolbar/widgets/FontStyleButton.js +96 -39
  242. package/lib/core/editor/components/Toolbar/widgets/IconSelect/index.module.scss +4 -2
  243. package/lib/core/editor/components/Toolbar/widgets/IconSelect/popUpContent.js +1 -2
  244. package/lib/core/editor/components/Toolbar/widgets/Layout/components/LayoutSettings.js +116 -0
  245. package/lib/core/editor/components/Toolbar/widgets/Layout/components/LayoutSettings.module.scss +70 -0
  246. package/lib/core/editor/components/Toolbar/widgets/Layout/components/LayoutTagImageSelect/index.js +55 -0
  247. package/lib/core/editor/components/Toolbar/widgets/Layout/components/LayoutTagImageSelect/index.module.scss +7 -0
  248. package/lib/core/editor/components/Toolbar/widgets/Layout/components/LayoutTagSelect/index.js +93 -0
  249. package/lib/core/editor/components/Toolbar/widgets/Layout/components/LayoutTagSelect/index.scss +32 -0
  250. package/lib/core/editor/components/Toolbar/widgets/Layout/components/LayoutTemplateButton/Icon.js +32 -0
  251. package/lib/core/editor/components/Toolbar/widgets/Layout/components/LayoutTemplateButton/assets/index.js +22 -0
  252. package/lib/core/editor/components/Toolbar/widgets/Layout/components/LayoutTemplateButton/assets/topo_layout_circular.svg +10 -0
  253. package/lib/core/editor/components/Toolbar/widgets/Layout/components/LayoutTemplateButton/assets/topo_layout_hierarchical.svg +10 -0
  254. package/lib/core/editor/components/Toolbar/widgets/Layout/components/LayoutTemplateButton/assets/topo_layout_rectangle.svg +12 -0
  255. package/lib/core/editor/components/Toolbar/widgets/Layout/components/LayoutTemplateButton/assets/topo_layout_toward.svg +16 -0
  256. package/lib/core/editor/components/Toolbar/widgets/Layout/components/LayoutTemplateButton/index.js +44 -0
  257. package/lib/core/editor/components/Toolbar/widgets/Layout/components/LayoutTemplateButton/index.module.scss +53 -0
  258. package/lib/core/editor/components/Toolbar/widgets/Layout/index.js +135 -16
  259. package/lib/core/editor/components/Toolbar/widgets/NodeAlignWidget.js +110 -23
  260. package/lib/core/editor/components/Toolbar/widgets/NodeAlignWidget.module.scss +33 -0
  261. package/lib/core/editor/components/Toolbar/widgets/NodeImageButton/BoxBackgroundSetting.js +2 -2
  262. package/lib/core/editor/components/Toolbar/widgets/NodeImageButton/NodeImageButton.js +21 -7
  263. package/lib/core/editor/components/Toolbar/widgets/NodeSizeButton/NodeSizeButton.js +40 -34
  264. package/lib/core/editor/components/Toolbar/widgets/NodeSizeButton/NodeSizeButton.module.scss +28 -0
  265. package/lib/core/editor/components/Toolbar/widgets/WidgetBox.js +13 -4
  266. package/lib/core/editor/components/Toolbar/widgets/WidgetBox.module.scss +10 -1
  267. package/lib/core/editor/components/Toolbar/widgets/components/ButtonBox.js +2 -2
  268. package/lib/core/editor/components/Toolbar/widgets/components/ButtonBox.module.scss +4 -0
  269. package/lib/core/editor/components/Toolbar/widgets/components/DropdownButton.js +19 -8
  270. package/lib/core/editor/components/Toolbar/widgets/components/DropdownMenu.js +22 -7
  271. package/lib/core/editor/components/Toolbar/widgets/components/textStyleSetting/ElementTextStyleSetting/ElementTextStyleSetting.js +66 -0
  272. package/lib/core/editor/components/Toolbar/widgets/components/textStyleSetting/ElementTextStyleSetting/colorUtil.js +82 -0
  273. package/lib/core/editor/components/Toolbar/widgets/components/textStyleSetting/ElementTextStyleSetting/elements/box.js +58 -0
  274. package/lib/core/editor/components/Toolbar/widgets/components/textStyleSetting/ElementTextStyleSetting/elements/edgeTag.js +86 -0
  275. package/lib/core/editor/components/Toolbar/widgets/components/textStyleSetting/ElementTextStyleSetting/elements/groupTitle.js +88 -0
  276. package/lib/core/editor/components/Toolbar/widgets/components/textStyleSetting/ElementTextStyleSetting/elements/index.js +28 -0
  277. package/lib/core/editor/components/Toolbar/widgets/components/textStyleSetting/ElementTextStyleSetting/elements/layerTitle.js +90 -0
  278. package/lib/core/editor/components/Toolbar/widgets/components/textStyleSetting/ElementTextStyleSetting/elements/nodeTag.js +90 -0
  279. package/lib/core/editor/components/Toolbar/widgets/components/textStyleSetting/ElementTextStyleSetting/elements/text.js +54 -0
  280. package/lib/core/editor/components/Toolbar/widgets/components/textStyleSetting/ElementTextStyleSetting/textStyleUtil.js +141 -0
  281. package/lib/core/editor/components/Toolbar/widgets/components/textStyleSetting/GlobalTagStyleSetting/GlobalTagStyleSetting.js +46 -0
  282. package/lib/core/editor/components/Toolbar/widgets/components/textStyleSetting/GlobalTagStyleSetting/globalTag.js +111 -0
  283. package/lib/core/editor/components/Toolbar/widgets/components/textStyleSetting/textStyleSettingRouter.js +31 -0
  284. package/lib/core/editor/components/plugins/AddElementThemePlugin.js +20 -0
  285. package/lib/core/editor/components/settings/CloseablePanel.js +46 -0
  286. package/lib/core/editor/components/settings/CloseablePanel.module.scss +21 -0
  287. package/lib/core/editor/components/settings/PropertyView.js +59 -12
  288. package/lib/core/editor/components/settings/Settings.js +40 -122
  289. package/lib/core/editor/components/settings/Settings.module.scss +7 -11
  290. package/lib/core/editor/components/settings/common/AlignSetting/AlignSetting.module.scss +3 -3
  291. package/lib/core/editor/components/settings/common/AlignSetting/AlignTypeList.js +97 -0
  292. package/lib/core/editor/components/settings/common/AlignSetting/index.js +21 -80
  293. package/lib/core/editor/components/settings/common/GroupNodeList/ResourceList.module.scss +1 -0
  294. package/lib/core/editor/components/settings/common/LineType/index.js +11 -109
  295. package/lib/core/editor/components/settings/common/NameInput.js +38 -0
  296. package/lib/core/editor/components/settings/common/SizeInput/NodeSizeInput.js +21 -19
  297. package/lib/core/editor/components/settings/common/text/fontStyleUtil.js +25 -20
  298. package/lib/core/editor/components/settings/core/PropertyViewManager.js +91 -0
  299. package/lib/core/editor/components/settings/core/edgePropertyViewAdapter.js +33 -0
  300. package/lib/core/editor/components/settings/core/getPropertyViewType.js +40 -0
  301. package/lib/core/editor/components/settings/core/updateElementProperty.js +27 -0
  302. package/lib/core/editor/components/settings/propertyViews/box/BoxPropertyView.js +6 -13
  303. package/lib/core/editor/components/settings/propertyViews/box/BoxPropertyViewV1.js +76 -0
  304. package/lib/core/editor/components/settings/propertyViews/box/NameInput.js +6 -5
  305. package/lib/core/editor/components/settings/propertyViews/edge/CommonEdgePropertyView.js +15 -3
  306. package/lib/core/editor/components/settings/propertyViews/edge/EdgeGroupPropertyView.js +9 -12
  307. package/lib/core/editor/components/settings/propertyViews/edge/EdgePropertyView.js +7 -23
  308. package/lib/core/editor/components/settings/propertyViews/edge/addEdgeProps.js +19 -0
  309. package/lib/core/editor/components/settings/propertyViews/edge/edgeGroup/EdgeGroupSetting.js +1 -6
  310. package/lib/core/editor/components/settings/propertyViews/group/GroupPropertyView.js +14 -25
  311. package/lib/core/editor/components/settings/propertyViews/group/GroupPropertyView.module.scss +8 -1
  312. package/lib/core/editor/components/settings/propertyViews/group/GroupPropertyViewV1.js +43 -0
  313. package/lib/core/editor/components/settings/propertyViews/group/SettingTab/GroupBasicSetting.js +98 -0
  314. package/lib/core/editor/components/settings/propertyViews/group/SettingTab/GroupExpandSetting.js +8 -14
  315. package/lib/core/editor/components/settings/propertyViews/group/cluster/ClusterGroupRelateData.js +9 -7
  316. package/lib/core/editor/components/settings/propertyViews/index.js +4 -9
  317. package/lib/core/editor/components/settings/propertyViews/layer/BasicSetting.js +75 -0
  318. package/lib/core/editor/components/settings/propertyViews/layer/LayerPropertyView.js +12 -20
  319. package/lib/core/editor/components/settings/propertyViews/layer/LayerPropertyView.module.scss +10 -0
  320. package/lib/core/editor/components/settings/propertyViews/layer/LayerPropertyViewV1.js +40 -0
  321. package/lib/core/editor/components/settings/propertyViews/multipleElements/MultipleElementLineType.js +4 -6
  322. package/lib/core/editor/components/settings/propertyViews/multipleElements/MultipleElementPropertyView.js +2 -15
  323. package/lib/core/editor/components/settings/propertyViews/node/NodePropertyView.js +8 -35
  324. package/lib/core/editor/components/settings/propertyViews/node/NodePropertyViewV1.js +68 -0
  325. package/lib/core/editor/components/settings/propertyViews/node/Setting/BasicSetting.js +64 -0
  326. package/lib/core/editor/components/settings/propertyViews/node/Setting/NameInput.js +6 -5
  327. package/lib/core/editor/components/settings/propertyViews/node/data/Data.js +2 -1
  328. package/lib/core/editor/components/settings/propertyViews/node/data/NodeRelateResourceButton.js +1 -0
  329. package/lib/core/editor/components/settings/propertyViews/text/TextPropertyView.js +5 -20
  330. package/lib/core/editor/components/titlebar/TopoEditorTitleBar.js +9 -1
  331. package/lib/core/editor/config/themes.js +114 -0
  332. package/lib/core/editor/hooks/useKeyboardShortcut.js +49 -0
  333. package/lib/core/editor/hooks/useNewElementTheme.js +57 -0
  334. package/lib/core/editor/store/topoEdit.js +46 -40
  335. package/lib/core/editor/utils/edgeTypeStyleUtil.js +38 -11
  336. package/lib/core/editor/utils/textStyleUtil.js +1 -0
  337. package/lib/core/editor/utils/themeUtil.js +39 -0
  338. package/lib/core/hooks/useCanvasTheme.js +68 -0
  339. package/lib/core/hooks/useManageStatus.js +1 -9
  340. package/lib/core/hooks/usePolling.js +2 -5
  341. package/lib/core/hooks/useTopoEdit.js +16 -8
  342. package/lib/core/models/Alarm.js +2 -2
  343. package/lib/core/models/AttributeMetricDisplay.js +4 -0
  344. package/lib/core/models/HistoryManager.js +13 -8
  345. package/lib/core/models/{SelectionManager.js → SelectionModel.js} +57 -22
  346. package/lib/core/models/TopoApp.js +7 -5
  347. package/lib/core/models/selection/ignoreList.js +6 -0
  348. package/lib/core/models/utils/linkUtils.js +5 -6
  349. package/lib/core/store/models/customIcon.js +1 -3
  350. package/lib/core/store/models/selection.js +2 -1
  351. package/lib/core/store/models/topoBizMod.js +0 -3
  352. package/lib/core/store/models/topoConfig.js +9 -18
  353. package/lib/core/store/models/topoMod.js +27 -29
  354. package/lib/core/utils/edgeUtil.js +6 -0
  355. package/lib/core/utils/showGraphManageStatusUtil.js +7 -1
  356. package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/hooks/useMetricPolling.js +18 -13
  357. package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/services/index.js +38 -19
  358. package/lib/core/viewer/components/plugins/ResourceDetail/components/WebConsole/WebConsoleForm/WebConsoleForm.js +13 -29
  359. package/lib/core/viewer/components/plugins/ResourceDetail/components/WebConsole/WebConsoleForm/hooks/useWebConsole.js +6 -5
  360. package/lib/core/viewer/components/plugins/ViewerPlugin.js +11 -3
  361. package/lib/core/viewer/components/titlebar/widgets/SettingButton.js +3 -1
  362. package/lib/core/viewer/components/titlebar/widgets/SettingButtonWidget.js +4 -2
  363. package/lib/networkTopo/components/editor/propertyViews/edge/EdgeGroupPropertyView.js +1 -0
  364. package/lib/networkTopo/components/editor/propertyViews/edge/EdgePropertyView.js +45 -7
  365. package/lib/networkTopo/components/editor/propertyViews/edge/LinkPropertyView/LinkPropertyView.js +10 -18
  366. package/lib/networkTopo/components/editor/propertyViews/edge/LinkPropertyView/LinkPropertyViewV1.js +50 -0
  367. package/lib/networkTopo/components/editor/propertyViews/edge/link/LinkInfoPreview.module.scss +1 -1
  368. package/lib/networkTopo/components/editor/useEditorProps.js +1 -4
  369. package/lib/networkTopo/createTopo.js +3 -0
  370. package/lib/networkTopo/models/LinkDynamicStyleExecutor.js +2 -2
  371. package/lib/networkTopo/services/link.js +2 -2
  372. package/lib/networkTopo/store/topoTreeMod.js +6 -8
  373. package/lib/style.js +28 -27
  374. package/lib/utils/htElementUtils.js +5 -0
  375. package/lib/utils/topoData.js +1 -0
  376. package/package.json +5 -4
@@ -3,6 +3,7 @@
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
4
 
5
5
  exports.__esModule = true;
6
+ exports.getBasicIcons = getBasicIcons;
6
7
  exports.getCustomIconHtId = getCustomIconHtId;
7
8
  exports.getCustomIconIdFromHtId = getCustomIconIdFromHtId;
8
9
  exports.getEditorIcons = getEditorIcons;
@@ -10,6 +11,7 @@ exports.getGroupDefaultIcons = getGroupDefaultIcons;
10
11
  exports.getGroupIconGroups = getGroupIconGroups;
11
12
  exports.getNodeDefaultIcons = getNodeDefaultIcons;
12
13
  exports.getNodeIconGroups = getNodeIconGroups;
14
+ exports.getResourceIcons = getResourceIcons;
13
15
  exports.getUserCustomIcons = getUserCustomIcons;
14
16
  exports.getUserCustomIconsForHt = getUserCustomIconsForHt;
15
17
  exports.transformCustomIcon2HtIcon = transformCustomIcon2HtIcon;
@@ -19,6 +21,8 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
19
21
 
20
22
  var _manager = _interopRequireDefault(require("@riil-frontend/component-topology-graph/es/manager"));
21
23
 
24
+ var _ResourceTypeLimit = require("../../../constants/ResourceTypeLimit");
25
+
22
26
  /**
23
27
  * 获取默认图标
24
28
  * @param {*} topo
@@ -27,6 +31,49 @@ var _manager = _interopRequireDefault(require("@riil-frontend/component-topology
27
31
  function getNodeDefaultIcons(topo) {
28
32
  return [].concat(_manager["default"].iconLibManager.getNodeIcons(), topo.options.icons || []);
29
33
  }
34
+ /**
35
+ * 获取资源图标列表
36
+ * 模型树可监控的模型图标
37
+ *
38
+ * @param {*} topo
39
+ */
40
+
41
+
42
+ function getResourceIcons(topo) {
43
+ // 获取模型树缓存
44
+ var modelTree = _manager["default"].ciModel.getModelTreeCache(); // 过滤出可监控的模型
45
+
46
+
47
+ var models = (0, _ResourceTypeLimit.getCiModels)(modelTree).filter(function (model) {
48
+ return !!model.icon;
49
+ }); // 获得图标
50
+
51
+ var icons = models.map(function (model) {
52
+ return _manager["default"].iconFactory.getIcon("ciType." + model.code);
53
+ });
54
+ return [].concat(icons, topo.options.icons || []);
55
+ }
56
+ /**
57
+ * 获取基础图标列表。排除模型图标
58
+ * @param {*} topo
59
+ */
60
+
61
+
62
+ function getBasicIcons(topo, containsGroupIcon) {
63
+ var icons = _manager["default"].iconLibManager.getIcons();
64
+
65
+ icons = icons.filter(function (icon) {
66
+ return !icon.ciType;
67
+ });
68
+
69
+ if (containsGroupIcon === false) {
70
+ icons = icons.filter(function (icon) {
71
+ return icon.type !== 'group';
72
+ });
73
+ }
74
+
75
+ return icons;
76
+ }
30
77
 
31
78
  function getGroupDefaultIcons(topo) {
32
79
  return [].concat(_manager["default"].iconLibManager.getIcons());
@@ -1,9 +1,13 @@
1
1
  "use strict";
2
2
 
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+
3
5
  exports.__esModule = true;
4
6
  exports.useGroupIcons = useGroupIcons;
5
7
  exports.useNodeIcons = useNodeIcons;
6
8
 
9
+ var _manager = _interopRequireDefault(require("@riil-frontend/component-topology-graph/es/manager"));
10
+
7
11
  var _icon = require("./icon");
8
12
 
9
13
  function useCustomIcons(topo) {
@@ -18,10 +22,10 @@ function useNodeIcons(topo) {
18
22
  var customIcons = useCustomIcons(topo);
19
23
  var groups = [{
20
24
  name: '资源图片',
21
- icons: []
25
+ icons: (0, _icon.getResourceIcons)(topo)
22
26
  }, {
23
27
  name: '基础图片',
24
- icons: (0, _icon.getNodeDefaultIcons)(topo)
28
+ icons: (0, _icon.getBasicIcons)(topo)
25
29
  }];
26
30
 
27
31
  if (customIcons.length) {
@@ -35,21 +39,6 @@ function useNodeIcons(topo) {
35
39
  }
36
40
 
37
41
  function useGroupIcons(topo) {
38
- var customIcons = useCustomIcons(topo);
39
- var groups = [{
40
- name: '资源图片',
41
- icons: []
42
- }, {
43
- name: '默认',
44
- icons: (0, _icon.getGroupDefaultIcons)(topo)
45
- }];
46
-
47
- if (customIcons.length) {
48
- groups.push({
49
- name: '自定义',
50
- icons: customIcons
51
- });
52
- }
53
-
42
+ var groups = useNodeIcons(topo);
54
43
  return groups;
55
44
  }
@@ -29,19 +29,16 @@ var alarmLink = function alarmLink(alarmInfo) {
29
29
  var getNode = function getNode(topo, alarmInfo) {
30
30
  var id = alarmInfo.resourceId || alarmInfo.ciId;
31
31
  var node = topo.getHtTopo().getGraphView().dm().getDataByTag(id);
32
+ var ele = getNodeParents(node);
33
+ topo.getHtTopo().getGraphView().fitData(ele, true, 20, true);
34
+ topo.getHtTopo().getGraphView().dm().getSelectionModel().setSelection(ele);
35
+ };
32
36
 
33
- if (node.getParent()) {
34
- var data = node.getParent();
35
- topo.getHtTopo().getGraphView().fitData(data, true, 20, true); // eslint-disable-next-line no-underscore-dangle, eqeqeq
36
-
37
- if (data._animation.start[0] != 'hide') {
38
- topo.getHtTopo().getGraphView().dm().getSelectionModel().setSelection(node);
39
- } else {
40
- topo.getHtTopo().getGraphView().dm().getSelectionModel().setSelection(data);
41
- }
37
+ var getNodeParents = function getNodeParents(node) {
38
+ if (node.getParent() && node.getParent().isExpanded && !node.getParent().isExpanded()) {
39
+ return getNodeParents(node.getParent());
42
40
  } else {
43
- topo.getHtTopo().getGraphView().fitData(node, true, 20, true);
44
- topo.getHtTopo().getGraphView().dm().getSelectionModel().setSelection(node);
41
+ return node;
45
42
  }
46
43
  };
47
44
 
@@ -57,7 +54,9 @@ function AlarmListItem(props) {
57
54
  size: "xs",
58
55
  className: _indexModule["default"]['alarm-color-icon'] + " alarm-color-icon-lv" + alarmInfo.alertLevel
59
56
  })
60
- }, /*#__PURE__*/_react["default"].createElement("span", null, /*#__PURE__*/_react["default"].createElement("div", {
57
+ }, /*#__PURE__*/_react["default"].createElement("span", {
58
+ className: _indexModule["default"].content
59
+ }, /*#__PURE__*/_react["default"].createElement("div", {
61
60
  className: _indexModule["default"].list,
62
61
  onClick: function onClick() {
63
62
  getNode(topo, alarmInfo);
@@ -87,7 +86,9 @@ function RiskListItem(props) {
87
86
  size: "xs",
88
87
  className: _indexModule["default"]['alarm-color-icon'] + " alarm-color-icon-lv2"
89
88
  })
90
- }, /*#__PURE__*/_react["default"].createElement("span", null, /*#__PURE__*/_react["default"].createElement("div", {
89
+ }, /*#__PURE__*/_react["default"].createElement("span", {
90
+ className: _indexModule["default"].content
91
+ }, /*#__PURE__*/_react["default"].createElement("div", {
91
92
  className: _indexModule["default"].list,
92
93
  onClick: function onClick() {
93
94
  getNode(topo, alarmInfo);
@@ -12,13 +12,13 @@
12
12
  }
13
13
 
14
14
  }
15
- .list{
16
- width: 81%;
17
- float: left;
15
+ .content{
16
+ display: flex;
17
+ }
18
+ .list{
19
+ flex: 1;
18
20
  }
19
21
  .listLink{
20
- float: right;
21
- width: 17%;
22
22
  font-size: 12px;
23
23
  color: #4C89FF;
24
24
  height: 100%;
@@ -41,7 +41,8 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
41
41
  */
42
42
  function DisplaySetting(props, ref) {
43
43
  var topo = props.topo,
44
- displaySettingProps = props.displaySettingProps;
44
+ displaySettingProps = props.displaySettingProps,
45
+ isEditor = props.isEditor;
45
46
  var displayConfig = topo.store.getModelState('displayConfig');
46
47
 
47
48
  var _ref = displaySettingProps || {},
@@ -23,6 +23,8 @@ var _DisplaySetting = _interopRequireDefault(require("./DisplaySetting"));
23
23
 
24
24
  var _useDisplaySetting = _interopRequireDefault(require("./hooks/useDisplaySetting"));
25
25
 
26
+ var _EditorDisplaySetting = _interopRequireDefault(require("./EditorDisplaySetting"));
27
+
26
28
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
27
29
 
28
30
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
@@ -31,6 +33,7 @@ function DisplaySettingDrawer(props) {
31
33
  var visible = props.visible,
32
34
  topo = props.topo,
33
35
  displaySettingProps = props.displaySettingProps,
36
+ isEditor = props.isEditor,
34
37
  onClose = props.onClose;
35
38
  var settingRef = (0, _react.useRef)();
36
39
 
@@ -39,7 +42,8 @@ function DisplaySettingDrawer(props) {
39
42
  setLoading = _useState[1];
40
43
 
41
44
  var displaySetting = (0, _useDisplaySetting["default"])((0, _extends2["default"])({}, props, {
42
- settingRef: settingRef
45
+ settingRef: settingRef,
46
+ isEditor: isEditor
43
47
  }));
44
48
 
45
49
  var handleOk = /*#__PURE__*/function () {
@@ -57,7 +61,9 @@ function DisplaySettingDrawer(props) {
57
61
  setLoading(false);
58
62
  onClose();
59
63
 
60
- _message["default"].success('保存成功');
64
+ if (!isEditor) {
65
+ _message["default"].success('保存成功');
66
+ }
61
67
 
62
68
  _context.next = 14;
63
69
  break;
@@ -84,6 +90,7 @@ function DisplaySettingDrawer(props) {
84
90
  };
85
91
  }();
86
92
 
93
+ var DisplaySettingWidget = isEditor ? _EditorDisplaySetting["default"] : _DisplaySetting["default"];
87
94
  return /*#__PURE__*/_react["default"].createElement(_Drawer["default"], {
88
95
  title: "\u663E\u793A\u8BBE\u7F6E",
89
96
  visible: visible,
@@ -95,7 +102,7 @@ function DisplaySettingDrawer(props) {
95
102
 
96
103
  },
97
104
  buttons: ['保存', '取消']
98
- }, visible && /*#__PURE__*/_react["default"].createElement(_DisplaySetting["default"], {
105
+ }, visible && /*#__PURE__*/_react["default"].createElement(DisplaySettingWidget, {
99
106
  ref: settingRef,
100
107
  topo: topo,
101
108
  displaySettingProps: displaySettingProps
@@ -0,0 +1,147 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+
5
+ exports.__esModule = true;
6
+ exports["default"] = void 0;
7
+
8
+ var _box = _interopRequireDefault(require("@alifd/next/lib/box"));
9
+
10
+ var _form = _interopRequireDefault(require("@alifd/next/lib/form"));
11
+
12
+ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
13
+
14
+ var _field = _interopRequireDefault(require("@alifd/next/lib/field"));
15
+
16
+ var _react = _interopRequireWildcard(require("react"));
17
+
18
+ var _rlog = _interopRequireDefault(require("@riil-frontend/component-topology-utils/es/rlog"));
19
+
20
+ var _NodeTag = _interopRequireDefault(require("./NodeTag"));
21
+
22
+ var _EdgeFlow = _interopRequireDefault(require("./EdgeFlow"));
23
+
24
+ var _NodeTip = _interopRequireDefault(require("./NodeTip"));
25
+
26
+ var _LineExpandAllRadioGroup = _interopRequireDefault(require("./LineExpandAllRadioGroup"));
27
+
28
+ var _EdgeFlowDirection = _interopRequireDefault(require("./EdgeFlowDirection"));
29
+
30
+ var _BooleanRadio = _interopRequireDefault(require("../../../components/BooleanRadio"));
31
+
32
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
33
+
34
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
35
+
36
+ /**
37
+ * 显示设置
38
+ *
39
+ * @param {*} props
40
+ * @returns
41
+ */
42
+ function EditorDisplaySetting(props, ref) {
43
+ var topo = props.topo,
44
+ displaySettingProps = props.displaySettingProps;
45
+ var displayConfig = topo.store.getModelState('displayConfig');
46
+
47
+ var _ref = displaySettingProps || {},
48
+ linkTagConfig = _ref.linkTagConfig,
49
+ linkTipConfig = _ref.linkTipConfig,
50
+ showEdgeExpandConfig = _ref.showEdgeExpandConfig,
51
+ extraConfig = _ref.extraConfig,
52
+ showLinkConfig = _ref.showLinkConfig,
53
+ nodeTagProps = _ref.nodeTagProps,
54
+ nodeTipProps = _ref.nodeTipProps,
55
+ isNetworkTopo = _ref.isNetworkTopo;
56
+
57
+ var field = _field["default"].useField({
58
+ autoUnmount: false,
59
+ values: {
60
+ alarmSwitch: displayConfig.alarmSwitch,
61
+ alarmListDefaultOpen: displayConfig.alarmListDefaultOpen,
62
+ nodeTag: displayConfig.nodeTag,
63
+ nodeTip: displayConfig.nodeTip,
64
+ linkTag: displayConfig.linkTag,
65
+ linkTip: displayConfig.linkTip,
66
+ expandAllEdges: displayConfig.expandAllEdges,
67
+ edgeFlow: displayConfig.edgeFlow,
68
+ edgeFlowDirection: displayConfig.edgeFlowDirection
69
+ },
70
+ onChange: function onChange(name, value) {
71
+ _rlog["default"].debug('DisplaySetting-onChange', name, value); // 告警静默设置
72
+
73
+
74
+ if (name === 'alarmSwitch') {
75
+ field.setValue('alarmListDefaultOpen', !!value);
76
+ }
77
+ }
78
+ });
79
+
80
+ (0, _react.useImperativeHandle)(ref, function () {
81
+ return field;
82
+ });
83
+ return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_form["default"], {
84
+ field: field,
85
+ labelAlign: "top"
86
+ }, /*#__PURE__*/_react["default"].createElement(_form["default"].Item, {
87
+ label: /*#__PURE__*/_react["default"].createElement(Label, {
88
+ label: "\u8D44\u6E90\u6807\u6CE8",
89
+ helpText: "\u6700\u591A\u652F\u6301\u52FE\u90093\u9879"
90
+ })
91
+ }, /*#__PURE__*/_react["default"].createElement(_NodeTag["default"], (0, _extends2["default"])({}, nodeTagProps, {
92
+ name: "nodeTag",
93
+ topo: topo
94
+ }))), linkTagConfig && /*#__PURE__*/_react["default"].createElement(_form["default"].Item, {
95
+ label: /*#__PURE__*/_react["default"].createElement(Label, {
96
+ label: "\u94FE\u8DEF\u6807\u6CE8",
97
+ helpText: "\u6700\u591A\u652F\u6301\u52FE\u90092\u9879"
98
+ }),
99
+ patternTrigger: "onChange"
100
+ }, linkTagConfig({
101
+ name: "linkTag",
102
+ topo: topo
103
+ })), /*#__PURE__*/_react["default"].createElement(_form["default"].Item, {
104
+ label: /*#__PURE__*/_react["default"].createElement(Label, {
105
+ label: "\u8D44\u6E90\u60AC\u6D6E\u6846",
106
+ helpText: "\u6700\u591A\u652F\u6301\u52FE\u90094\u9879"
107
+ }),
108
+ patternTrigger: "onChange"
109
+ }, /*#__PURE__*/_react["default"].createElement(_NodeTip["default"], (0, _extends2["default"])({}, nodeTipProps, {
110
+ name: "nodeTip",
111
+ topo: topo
112
+ }))), linkTipConfig && /*#__PURE__*/_react["default"].createElement(_form["default"].Item, {
113
+ label: /*#__PURE__*/_react["default"].createElement(Label, {
114
+ label: "\u94FE\u8DEF\u60AC\u6D6E\u6846",
115
+ helpText: "\u6700\u591A\u652F\u6301\u52FE\u90094\u9879"
116
+ }),
117
+ patternTrigger: "onChange"
118
+ }, linkTipConfig({
119
+ name: "linkTip",
120
+ topo: topo
121
+ })), showEdgeExpandConfig && /*#__PURE__*/_react["default"].createElement(_form["default"].Item, {
122
+ label: /*#__PURE__*/_react["default"].createElement(_LineExpandAllRadioGroup["default"].Label, null),
123
+ patternTrigger: "onChange"
124
+ }, /*#__PURE__*/_react["default"].createElement(_LineExpandAllRadioGroup["default"], {
125
+ name: "expandAllEdges",
126
+ isNetworkTopo: isNetworkTopo
127
+ }))));
128
+ }
129
+
130
+ ;
131
+
132
+ function Label(props) {
133
+ var label = props.label,
134
+ helpText = props.helpText;
135
+ return /*#__PURE__*/_react["default"].createElement(_box["default"], {
136
+ direction: "row",
137
+ spacing: 12
138
+ }, /*#__PURE__*/_react["default"].createElement("div", null, label), /*#__PURE__*/_react["default"].createElement("div", {
139
+ style: {
140
+ color: '#638DB7'
141
+ }
142
+ }, helpText));
143
+ }
144
+
145
+ var _default = /*#__PURE__*/_react["default"].forwardRef(EditorDisplaySetting);
146
+
147
+ exports["default"] = _default;
@@ -41,8 +41,6 @@ var LineExpandAllRadioGroup = /*#__PURE__*/_react["default"].forwardRef(function
41
41
  pluralType = _useState2[0],
42
42
  setPluralType = _useState2[1];
43
43
 
44
- console.log("LineExpandAllRadioGroup-value", value, pluralType);
45
-
46
44
  var handleTypeChange = function handleTypeChange(newValue) {
47
45
  setShowType(newValue); // console.log("handleTypeChange---newValue", newValue, pluralType);
48
46
 
@@ -83,7 +81,6 @@ var LineExpandAllRadioGroup = /*#__PURE__*/_react["default"].forwardRef(function
83
81
  }
84
82
  }
85
83
 
86
- console.log("creatTypeValue", v);
87
84
  return v;
88
85
  }; // useEffect(() => {
89
86
  // setPluralType(plurals[compatibleWith(value)] ?? []);
@@ -16,18 +16,44 @@ var _topo = _interopRequireDefault(require("@riil-frontend/component-topology-co
16
16
  var _default = function _default(props) {
17
17
  var topo = props.topo,
18
18
  displaySettingProps = props.displaySettingProps,
19
- settingRef = props.settingRef;
19
+ settingRef = props.settingRef,
20
+ isEditor = props.isEditor;
20
21
 
21
- var executeByConfig = /*#__PURE__*/function () {
22
- var _ref = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(config) {
22
+ var handleViewerSave = /*#__PURE__*/function () {
23
+ var _ref = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee() {
24
+ var values, prevDisplayConfig, displayConfig, displayConfigDispatchers, extraOnOk;
23
25
  return _regenerator["default"].wrap(function _callee$(_context) {
24
26
  while (1) {
25
27
  switch (_context.prev = _context.next) {
26
28
  case 0:
29
+ values = settingRef.current.getValues(); // console.info('保存显示配置', values)
30
+ // 保存配置
31
+
32
+ prevDisplayConfig = topo.store.getModelState('displayConfig');
33
+ displayConfig = (0, _extends2["default"])({}, prevDisplayConfig, values);
34
+ _context.next = 5;
35
+ return _topo["default"].saveTopoSettings(topo.id, {
36
+ alarmSwitch: displayConfig.alarmSwitch,
37
+ alarmListDefaultOpen: displayConfig.alarmListDefaultOpen,
38
+ extraConfig: JSON.stringify((0, _extends2["default"])({}, displayConfig))
39
+ });
40
+
41
+ case 5:
42
+ // 刷新指标配置
43
+ displayConfigDispatchers = topo.store.getModelDispatchers('displayConfig');
44
+ _context.next = 8;
45
+ return displayConfigDispatchers.update(displayConfig);
46
+
47
+ case 8:
27
48
  // 更新节点名称显示隐藏
28
49
  topo.attributeMetricDisplay.updateNodesNameVisible();
50
+ extraOnOk = (displaySettingProps === null || displaySettingProps === void 0 ? void 0 : displaySettingProps.onOk) || (displaySettingProps === null || displaySettingProps === void 0 ? void 0 : displaySettingProps.onDisplaySettingDrawerOk);
51
+
52
+ if (extraOnOk) {
53
+ extraOnOk(displayConfig);
54
+ }
29
55
 
30
- case 1:
56
+ case 11:
31
57
  case "end":
32
58
  return _context.stop();
33
59
  }
@@ -35,43 +61,44 @@ var _default = function _default(props) {
35
61
  }, _callee);
36
62
  }));
37
63
 
38
- return function executeByConfig(_x) {
64
+ return function handleViewerSave() {
39
65
  return _ref.apply(this, arguments);
40
66
  };
41
67
  }();
42
68
 
43
- var save = /*#__PURE__*/function () {
69
+ var handleEditorSave = /*#__PURE__*/function () {
44
70
  var _ref2 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2() {
45
71
  var values, prevDisplayConfig, displayConfig, displayConfigDispatchers, extraOnOk;
46
72
  return _regenerator["default"].wrap(function _callee2$(_context2) {
47
73
  while (1) {
48
74
  switch (_context2.prev = _context2.next) {
49
75
  case 0:
76
+ topo.historyManager.beginTransaction();
50
77
  values = settingRef.current.getValues(); // console.info('保存显示配置', values)
51
78
  // 保存配置
52
79
 
53
80
  prevDisplayConfig = topo.store.getModelState('displayConfig');
54
- displayConfig = (0, _extends2["default"])({}, prevDisplayConfig, values);
55
- _context2.next = 5;
56
- return _topo["default"].saveTopoSettings(topo.id, {
57
- alarmSwitch: displayConfig.alarmSwitch,
58
- alarmListDefaultOpen: displayConfig.alarmListDefaultOpen,
59
- extraConfig: JSON.stringify((0, _extends2["default"])({}, displayConfig))
60
- });
81
+ displayConfig = (0, _extends2["default"])({}, prevDisplayConfig, values); // 刷新指标配置
61
82
 
62
- case 5:
63
- // 刷新指标配置
64
83
  displayConfigDispatchers = topo.store.getModelDispatchers('displayConfig');
65
- displayConfigDispatchers.update(displayConfig); // 按配置执行
84
+ _context2.next = 7;
85
+ return displayConfigDispatchers.update(displayConfig);
66
86
 
67
- executeByConfig(displayConfig);
68
- extraOnOk = (displaySettingProps === null || displaySettingProps === void 0 ? void 0 : displaySettingProps.onOk) || (displaySettingProps === null || displaySettingProps === void 0 ? void 0 : displaySettingProps.onDisplaySettingDrawerOk);
87
+ case 7:
88
+ extraOnOk = displaySettingProps === null || displaySettingProps === void 0 ? void 0 : displaySettingProps.onOk;
69
89
 
70
- if (extraOnOk) {
71
- extraOnOk(displayConfig);
90
+ if (!extraOnOk) {
91
+ _context2.next = 11;
92
+ break;
72
93
  }
73
94
 
74
- case 10:
95
+ _context2.next = 11;
96
+ return extraOnOk(displayConfig);
97
+
98
+ case 11:
99
+ topo.historyManager.endTransaction();
100
+
101
+ case 12:
75
102
  case "end":
76
103
  return _context2.stop();
77
104
  }
@@ -79,11 +106,46 @@ var _default = function _default(props) {
79
106
  }, _callee2);
80
107
  }));
81
108
 
82
- return function save() {
109
+ return function handleEditorSave() {
83
110
  return _ref2.apply(this, arguments);
84
111
  };
85
112
  }();
86
113
 
114
+ var save = /*#__PURE__*/function () {
115
+ var _ref3 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee3() {
116
+ return _regenerator["default"].wrap(function _callee3$(_context3) {
117
+ while (1) {
118
+ switch (_context3.prev = _context3.next) {
119
+ case 0:
120
+ if (isEditor) {
121
+ _context3.next = 5;
122
+ break;
123
+ }
124
+
125
+ _context3.next = 3;
126
+ return handleViewerSave();
127
+
128
+ case 3:
129
+ _context3.next = 7;
130
+ break;
131
+
132
+ case 5:
133
+ _context3.next = 7;
134
+ return handleEditorSave();
135
+
136
+ case 7:
137
+ case "end":
138
+ return _context3.stop();
139
+ }
140
+ }
141
+ }, _callee3);
142
+ }));
143
+
144
+ return function save() {
145
+ return _ref3.apply(this, arguments);
146
+ };
147
+ }();
148
+
87
149
  return {
88
150
  save: save
89
151
  };
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+
5
+ exports.__esModule = true;
6
+ exports["default"] = GraphViewPanel;
7
+
8
+ var _react = _interopRequireDefault(require("react"));
9
+
10
+ var _useCanvasTheme2 = _interopRequireDefault(require("../../hooks/useCanvasTheme"));
11
+
12
+ var _TopoViewModule = _interopRequireDefault(require("./TopoView.module.scss"));
13
+
14
+ function GraphViewPanel(props) {
15
+ var topo = props.topo,
16
+ hideBackgroundColor = props.hideBackgroundColor;
17
+ var displayConfig = topo.store.useModelState('displayConfig');
18
+ var themeName = displayConfig.canvasTheme || 'white';
19
+
20
+ var _useCanvasTheme = (0, _useCanvasTheme2["default"])({
21
+ topo: topo,
22
+ themeName: themeName
23
+ }),
24
+ canvasColor = _useCanvasTheme.canvasColor;
25
+
26
+ return /*#__PURE__*/_react["default"].createElement("div", {
27
+ className: _TopoViewModule["default"].viewPanel,
28
+ style: {
29
+ background: hideBackgroundColor ? null : canvasColor
30
+ }
31
+ }, props.children);
32
+ }
@@ -1,3 +1,4 @@
1
1
  .borderLine {
2
+ position: relative;
2
3
  border-top: 1px solid #E6E7EB;
3
4
  }