@riil-frontend/component-topology 6.0.0-alpha.3 → 6.0.0-alpha.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 (269) 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/es/components/ColorPanel/components/ColorBlock/index.js +37 -0
  6. package/es/components/ColorPanel/components/ColorBlock/index.module.scss +8 -0
  7. package/es/components/ColorPanel/components/FontColorRange/index.js +35 -0
  8. package/es/components/ColorPanel/components/FontColorRange/index.module.scss +23 -0
  9. package/es/components/ColorPanel/index.js +237 -0
  10. package/es/components/ColorPanel/index.module.scss +34 -0
  11. package/es/components/VerticalIconTab/VerticalIconTab.module.scss +5 -1
  12. package/es/components/collapse/Collapse.js +22 -3
  13. package/es/components/collapse/Collapse.module.scss +23 -0
  14. package/es/components/collapse/index.js +2 -0
  15. package/es/core/common/hooks/useHtElements.js +21 -0
  16. package/es/core/common/icons/icon.js +41 -0
  17. package/es/core/common/icons/useIcons.js +8 -16
  18. package/es/core/components/AlarmListPanel/components/AlarmListItem.js +14 -13
  19. package/es/core/components/AlarmListPanel/components/index.module.scss +5 -5
  20. package/es/core/components/DisplaySettingDrawer/DisplaySetting.js +2 -1
  21. package/es/core/components/DisplaySettingDrawer/DisplaySettingDrawer.js +6 -2
  22. package/es/core/components/DisplaySettingDrawer/EditorDisplaySetting.js +122 -0
  23. package/es/core/components/DisplaySettingDrawer/LineExpandAllRadioGroup.js +0 -3
  24. package/es/core/components/DisplaySettingDrawer/hooks/useDisplaySetting.js +76 -19
  25. package/es/core/components/TopoView/GraphViewPanel.js +20 -0
  26. package/es/core/components/TopoView/editor.module.scss +1 -0
  27. package/es/core/components/TopoView/topoView.js +29 -49
  28. package/es/core/components/titlebar/TitleBar.module.scss +1 -1
  29. package/es/core/editor/components/Sidebar/Sidebar.js +40 -50
  30. package/es/core/editor/components/Sidebar/panes.js +32 -0
  31. package/es/core/editor/components/Sidebar/views/CanvasPanel/CanvasPanel.js +96 -0
  32. package/es/core/editor/components/Sidebar/views/CanvasPanel/CanvasPanel.module.scss +74 -0
  33. package/es/core/editor/components/Sidebar/views/CanvasPanel/index.js +1 -1
  34. package/es/core/editor/components/Sidebar/views/ImagePanel/CiTypeImagePanel.js +3 -3
  35. package/es/core/editor/components/Sidebar/views/ImagePanel/HtCustomImagePanel.js +2 -5
  36. package/es/core/editor/components/Sidebar/views/ImagePanel/HtImagePalette.js +2 -4
  37. package/es/core/editor/components/Sidebar/views/ImagePanel/HtImagePalette.module.scss +5 -0
  38. package/es/core/editor/components/Sidebar/views/ImagePanel/ImagePanel.js +20 -7
  39. package/es/core/editor/components/Toolbar/EditorToolbar.js +23 -13
  40. package/es/core/editor/components/Toolbar/Toolbar.js +1 -1
  41. package/es/core/editor/components/Toolbar/Toolbar.module.scss +14 -3
  42. package/es/core/editor/components/Toolbar/buttons.js +20 -18
  43. package/es/core/editor/components/Toolbar/hooks/useFontStyleSetting.js +35 -0
  44. package/es/core/editor/components/Toolbar/widgets/AddResourceButton.js +8 -7
  45. package/es/core/editor/components/Toolbar/widgets/CanvasMoveWidget.js +13 -2
  46. package/es/core/editor/components/Toolbar/widgets/CanvasSelectWidget.js +11 -2
  47. package/es/core/editor/components/Toolbar/widgets/EdgeColorButton/Content.js +36 -2
  48. package/es/core/editor/components/Toolbar/widgets/EdgeColorButton/EdgeColorButton.js +76 -5
  49. package/es/core/editor/components/Toolbar/widgets/EdgeTypeButton/EdgeType.js +184 -3
  50. package/es/core/editor/components/Toolbar/widgets/EdgeTypeButton/EdgeType.module.scss +44 -0
  51. package/es/core/editor/components/Toolbar/widgets/EdgeTypeButton/LineType.js +53 -0
  52. package/es/core/editor/components/Toolbar/widgets/EdgeTypeButton/LineType.module.scss +31 -0
  53. package/es/core/editor/components/Toolbar/widgets/EdgeTypeButton/constants.js +77 -0
  54. package/es/core/editor/components/Toolbar/widgets/EdgeTypeButton/index.js +59 -6
  55. package/es/core/editor/components/Toolbar/widgets/FontColorButton.js +36 -4
  56. package/es/core/editor/components/Toolbar/widgets/FontColorButton.module.scss +35 -0
  57. package/es/core/editor/components/Toolbar/widgets/FontFamilyWidget.js +12 -2
  58. package/es/core/editor/components/Toolbar/widgets/FontSizeWidget.js +12 -2
  59. package/es/core/editor/components/Toolbar/widgets/HistoryRedoButton.js +3 -2
  60. package/es/core/editor/components/Toolbar/widgets/HistoryUndoButton.js +5 -4
  61. package/es/core/editor/components/Toolbar/widgets/IconSelect/IconSelect.js +109 -0
  62. package/es/core/editor/components/Toolbar/widgets/IconSelect/constant.js +64 -0
  63. package/es/core/editor/components/Toolbar/widgets/IconSelect/index.js +101 -0
  64. package/es/core/editor/components/Toolbar/widgets/IconSelect/index.module.scss +153 -0
  65. package/es/core/editor/components/Toolbar/widgets/IconSelect/popUpContent.js +49 -0
  66. package/es/core/editor/components/Toolbar/widgets/Layout/components/LayoutSettings.js +99 -0
  67. package/es/core/editor/components/Toolbar/widgets/Layout/components/LayoutSettings.module.scss +70 -0
  68. package/es/core/editor/components/Toolbar/widgets/Layout/components/LayoutTagImageSelect/index.js +42 -0
  69. package/es/core/editor/components/Toolbar/widgets/Layout/components/LayoutTagImageSelect/index.module.scss +7 -0
  70. package/es/core/editor/components/Toolbar/widgets/Layout/components/LayoutTagSelect/index.js +75 -0
  71. package/es/core/editor/components/Toolbar/widgets/Layout/components/LayoutTagSelect/index.scss +32 -0
  72. package/es/core/editor/components/Toolbar/widgets/Layout/components/LayoutTemplateButton/Icon.js +23 -0
  73. package/es/core/editor/components/Toolbar/widgets/Layout/components/LayoutTemplateButton/assets/index.js +10 -0
  74. package/es/core/editor/components/Toolbar/widgets/Layout/components/LayoutTemplateButton/assets/topo_layout_circular.svg +10 -0
  75. package/es/core/editor/components/Toolbar/widgets/Layout/components/LayoutTemplateButton/assets/topo_layout_hierarchical.svg +10 -0
  76. package/es/core/editor/components/Toolbar/widgets/Layout/components/LayoutTemplateButton/assets/topo_layout_rectangle.svg +12 -0
  77. package/es/core/editor/components/Toolbar/widgets/Layout/components/LayoutTemplateButton/assets/topo_layout_toward.svg +16 -0
  78. package/es/core/editor/components/Toolbar/widgets/Layout/components/LayoutTemplateButton/index.js +31 -0
  79. package/es/core/editor/components/Toolbar/widgets/Layout/components/LayoutTemplateButton/index.module.scss +53 -0
  80. package/es/core/editor/components/Toolbar/widgets/Layout/index.js +128 -15
  81. package/es/core/editor/components/Toolbar/widgets/NodeAlignWidget.js +115 -22
  82. package/es/core/editor/components/Toolbar/widgets/NodeAlignWidget.module.scss +12 -0
  83. package/es/core/editor/components/Toolbar/widgets/NodeImageButton/BoxBackgroundSetting.js +15 -5
  84. package/es/core/editor/components/Toolbar/widgets/NodeImageButton/NodeImageButton.js +41 -7
  85. package/es/core/editor/components/Toolbar/widgets/NodeSizeButton/NodeSizeButton.js +94 -13
  86. package/es/core/editor/components/Toolbar/widgets/NodeSizeButton/NodeSizeButton.module.scss +28 -0
  87. package/es/core/editor/components/Toolbar/widgets/WidgetBox.js +15 -22
  88. package/es/core/editor/components/Toolbar/widgets/WidgetBox.module.scss +11 -1
  89. package/es/core/editor/components/Toolbar/widgets/components/ButtonBox.js +4 -2
  90. package/es/core/editor/components/Toolbar/widgets/components/DropdownButton.js +8 -5
  91. package/es/core/editor/components/settings/CloseablePanel.js +28 -0
  92. package/es/core/editor/components/settings/OpenPropertyPanelListener.js +33 -0
  93. package/es/core/editor/components/settings/PropertyView.js +27 -8
  94. package/es/core/editor/components/settings/Settings.js +4 -44
  95. package/es/core/editor/components/settings/Settings.module.scss +8 -4
  96. package/es/core/editor/components/settings/common/AlignSetting/AlignTypeList.js +76 -0
  97. package/es/core/editor/components/settings/common/AlignSetting/index.js +20 -71
  98. package/es/core/editor/components/settings/common/LineType/index.js +12 -119
  99. package/es/core/editor/components/settings/common/NodeSizeInput/NodeSizeInput.js +3 -3
  100. package/es/core/editor/components/settings/common/SizeInput/NodeSizeInput.js +31 -21
  101. package/es/core/editor/components/settings/common/SizeInput/NodeSizeNumberPicker.js +7 -6
  102. package/es/core/editor/components/settings/propertyViews/group/SettingTab/GroupExpandSetting.js +0 -8
  103. package/es/core/editor/components/settings/propertyViews/multipleElements/BatchSetNodeSize/BatchSetNodeSize.js +8 -9
  104. package/es/core/editor/components/settings/propertyViews/multipleElements/MultipleElementLineType.js +5 -42
  105. package/es/core/editor/components/settings/propertyViews/multipleElements/MultipleElementPropertyView.js +2 -15
  106. package/es/core/editor/components/settings/propertyViews/view/BatchSetNodeSize.js +9 -6
  107. package/es/core/editor/components/titlebar/TopoEditorTitleBar.js +8 -4
  108. package/es/core/editor/hooks/useKeyboardShortcut.js +42 -0
  109. package/es/core/{store/models → editor/store}/background.js +0 -0
  110. package/es/core/{store/models → editor/store}/historyManager.js +0 -0
  111. package/es/core/editor/store/topoEdit.js +49 -0
  112. package/es/core/editor/utils/edgeTypeStyleUtil.js +96 -0
  113. package/es/core/hooks/useCanvasTheme.js +35 -0
  114. package/es/core/hooks/useTopoEdit.js +38 -58
  115. package/es/core/models/Alarm.js +2 -2
  116. package/es/core/models/HistoryManager.js +10 -3
  117. package/es/core/models/SelectionManager.js +16 -1
  118. package/es/core/models/TopoApp.js +1 -1
  119. package/es/core/models/TopoGraphView.js +8 -2
  120. package/es/core/models/utils/linkUtils.js +1 -1
  121. package/es/core/store/coreModels.js +6 -7
  122. package/es/core/store/models/selection.js +2 -1
  123. package/es/core/store/models/topoBizMod.js +0 -3
  124. package/es/core/store/models/topoMod.js +26 -28
  125. package/es/core/viewer/components/plugins/ResourceDetail/components/WebConsole/WebConsoleForm/WebConsoleForm.js +13 -29
  126. package/es/core/viewer/components/plugins/ResourceDetail/components/WebConsole/WebConsoleForm/hooks/useWebConsole.js +6 -5
  127. package/es/core/viewer/components/titlebar/widgets/SettingButton.js +3 -1
  128. package/es/core/viewer/components/titlebar/widgets/SettingButtonWidget.js +4 -2
  129. package/es/networkTopo/createTopo.js +2 -0
  130. package/es/networkTopo/services/link.js +2 -2
  131. package/es/networkTopo/store/topoTreeMod.js +6 -7
  132. package/es/style.js +1 -0
  133. package/es/utils/topoData.js +1 -0
  134. package/lib/components/ColorPanel/components/ColorBlock/index.js +47 -0
  135. package/lib/components/ColorPanel/components/ColorBlock/index.module.scss +8 -0
  136. package/lib/components/ColorPanel/components/FontColorRange/index.js +49 -0
  137. package/lib/components/ColorPanel/components/FontColorRange/index.module.scss +23 -0
  138. package/lib/components/ColorPanel/index.js +255 -0
  139. package/lib/components/ColorPanel/index.module.scss +34 -0
  140. package/lib/components/VerticalIconTab/VerticalIconTab.module.scss +5 -1
  141. package/lib/components/collapse/Collapse.js +28 -3
  142. package/lib/components/collapse/Collapse.module.scss +23 -0
  143. package/lib/components/collapse/index.js +11 -0
  144. package/lib/core/common/hooks/useHtElements.js +27 -0
  145. package/lib/core/common/icons/icon.js +48 -0
  146. package/lib/core/common/icons/useIcons.js +10 -15
  147. package/lib/core/components/AlarmListPanel/components/AlarmListItem.js +14 -13
  148. package/lib/core/components/AlarmListPanel/components/index.module.scss +5 -5
  149. package/lib/core/components/DisplaySettingDrawer/DisplaySetting.js +2 -1
  150. package/lib/core/components/DisplaySettingDrawer/DisplaySettingDrawer.js +7 -2
  151. package/lib/core/components/DisplaySettingDrawer/EditorDisplaySetting.js +147 -0
  152. package/lib/core/components/DisplaySettingDrawer/LineExpandAllRadioGroup.js +0 -3
  153. package/lib/core/components/DisplaySettingDrawer/hooks/useDisplaySetting.js +76 -19
  154. package/lib/core/components/TopoView/GraphViewPanel.js +30 -0
  155. package/lib/core/components/TopoView/editor.module.scss +1 -0
  156. package/lib/core/components/TopoView/topoView.js +32 -50
  157. package/lib/core/components/titlebar/TitleBar.module.scss +1 -1
  158. package/lib/core/editor/components/Sidebar/Sidebar.js +39 -53
  159. package/lib/core/editor/components/Sidebar/panes.js +45 -0
  160. package/lib/core/editor/components/Sidebar/views/CanvasPanel/CanvasPanel.js +109 -0
  161. package/lib/core/editor/components/Sidebar/views/CanvasPanel/CanvasPanel.module.scss +74 -0
  162. package/lib/core/editor/components/Sidebar/views/CanvasPanel/index.js +2 -2
  163. package/lib/core/editor/components/Sidebar/views/ImagePanel/CiTypeImagePanel.js +1 -1
  164. package/lib/core/editor/components/Sidebar/views/ImagePanel/HtCustomImagePanel.js +2 -5
  165. package/lib/core/editor/components/Sidebar/views/ImagePanel/HtImagePalette.js +3 -4
  166. package/lib/core/editor/components/Sidebar/views/ImagePanel/HtImagePalette.module.scss +5 -0
  167. package/lib/core/editor/components/Sidebar/views/ImagePanel/ImagePanel.js +29 -11
  168. package/lib/core/editor/components/Toolbar/EditorToolbar.js +22 -11
  169. package/lib/core/editor/components/Toolbar/Toolbar.js +1 -1
  170. package/lib/core/editor/components/Toolbar/Toolbar.module.scss +14 -3
  171. package/lib/core/editor/components/Toolbar/buttons.js +21 -20
  172. package/lib/core/editor/components/Toolbar/hooks/useFontStyleSetting.js +50 -0
  173. package/lib/core/editor/components/Toolbar/widgets/AddResourceButton.js +8 -7
  174. package/lib/core/editor/components/Toolbar/widgets/CanvasMoveWidget.js +13 -2
  175. package/lib/core/editor/components/Toolbar/widgets/CanvasSelectWidget.js +11 -2
  176. package/lib/core/editor/components/Toolbar/widgets/EdgeColorButton/Content.js +38 -2
  177. package/lib/core/editor/components/Toolbar/widgets/EdgeColorButton/EdgeColorButton.js +77 -5
  178. package/lib/core/editor/components/Toolbar/widgets/EdgeTypeButton/EdgeType.js +194 -3
  179. package/lib/core/editor/components/Toolbar/widgets/EdgeTypeButton/EdgeType.module.scss +44 -0
  180. package/lib/core/editor/components/Toolbar/widgets/EdgeTypeButton/LineType.js +71 -0
  181. package/lib/core/editor/components/Toolbar/widgets/EdgeTypeButton/LineType.module.scss +31 -0
  182. package/lib/core/editor/components/Toolbar/widgets/EdgeTypeButton/constants.js +83 -0
  183. package/lib/core/editor/components/Toolbar/widgets/EdgeTypeButton/index.js +61 -5
  184. package/lib/core/editor/components/Toolbar/widgets/FontColorButton.js +39 -4
  185. package/lib/core/editor/components/Toolbar/widgets/FontColorButton.module.scss +35 -0
  186. package/lib/core/editor/components/Toolbar/widgets/FontFamilyWidget.js +13 -2
  187. package/lib/core/editor/components/Toolbar/widgets/FontSizeWidget.js +13 -2
  188. package/lib/core/editor/components/Toolbar/widgets/HistoryRedoButton.js +4 -2
  189. package/lib/core/editor/components/Toolbar/widgets/HistoryUndoButton.js +5 -3
  190. package/lib/core/editor/components/Toolbar/widgets/IconSelect/IconSelect.js +126 -0
  191. package/lib/core/editor/components/Toolbar/widgets/IconSelect/constant.js +69 -0
  192. package/lib/core/editor/components/Toolbar/widgets/IconSelect/index.js +117 -0
  193. package/lib/core/editor/components/Toolbar/widgets/IconSelect/index.module.scss +153 -0
  194. package/lib/core/editor/components/Toolbar/widgets/IconSelect/popUpContent.js +61 -0
  195. package/lib/core/editor/components/Toolbar/widgets/Layout/components/LayoutSettings.js +116 -0
  196. package/lib/core/editor/components/Toolbar/widgets/Layout/components/LayoutSettings.module.scss +70 -0
  197. package/lib/core/editor/components/Toolbar/widgets/Layout/components/LayoutTagImageSelect/index.js +55 -0
  198. package/lib/core/editor/components/Toolbar/widgets/Layout/components/LayoutTagImageSelect/index.module.scss +7 -0
  199. package/lib/core/editor/components/Toolbar/widgets/Layout/components/LayoutTagSelect/index.js +93 -0
  200. package/lib/core/editor/components/Toolbar/widgets/Layout/components/LayoutTagSelect/index.scss +32 -0
  201. package/lib/core/editor/components/Toolbar/widgets/Layout/components/LayoutTemplateButton/Icon.js +32 -0
  202. package/lib/core/editor/components/Toolbar/widgets/Layout/components/LayoutTemplateButton/assets/index.js +22 -0
  203. package/lib/core/editor/components/Toolbar/widgets/Layout/components/LayoutTemplateButton/assets/topo_layout_circular.svg +10 -0
  204. package/lib/core/editor/components/Toolbar/widgets/Layout/components/LayoutTemplateButton/assets/topo_layout_hierarchical.svg +10 -0
  205. package/lib/core/editor/components/Toolbar/widgets/Layout/components/LayoutTemplateButton/assets/topo_layout_rectangle.svg +12 -0
  206. package/lib/core/editor/components/Toolbar/widgets/Layout/components/LayoutTemplateButton/assets/topo_layout_toward.svg +16 -0
  207. package/lib/core/editor/components/Toolbar/widgets/Layout/components/LayoutTemplateButton/index.js +44 -0
  208. package/lib/core/editor/components/Toolbar/widgets/Layout/components/LayoutTemplateButton/index.module.scss +53 -0
  209. package/lib/core/editor/components/Toolbar/widgets/Layout/index.js +133 -16
  210. package/lib/core/editor/components/Toolbar/widgets/NodeAlignWidget.js +118 -22
  211. package/lib/core/editor/components/Toolbar/widgets/NodeAlignWidget.module.scss +12 -0
  212. package/lib/core/editor/components/Toolbar/widgets/NodeImageButton/BoxBackgroundSetting.js +21 -5
  213. package/lib/core/editor/components/Toolbar/widgets/NodeImageButton/NodeImageButton.js +41 -6
  214. package/lib/core/editor/components/Toolbar/widgets/NodeSizeButton/NodeSizeButton.js +96 -12
  215. package/lib/core/editor/components/Toolbar/widgets/NodeSizeButton/NodeSizeButton.module.scss +28 -0
  216. package/lib/core/editor/components/Toolbar/widgets/WidgetBox.js +16 -22
  217. package/lib/core/editor/components/Toolbar/widgets/WidgetBox.module.scss +11 -1
  218. package/lib/core/editor/components/Toolbar/widgets/components/ButtonBox.js +4 -2
  219. package/lib/core/editor/components/Toolbar/widgets/components/DropdownButton.js +8 -5
  220. package/lib/core/editor/components/settings/CloseablePanel.js +40 -0
  221. package/lib/core/editor/components/settings/OpenPropertyPanelListener.js +43 -0
  222. package/lib/core/editor/components/settings/PropertyView.js +30 -8
  223. package/lib/core/editor/components/settings/Settings.js +4 -44
  224. package/lib/core/editor/components/settings/Settings.module.scss +8 -4
  225. package/lib/core/editor/components/settings/common/AlignSetting/AlignTypeList.js +93 -0
  226. package/lib/core/editor/components/settings/common/AlignSetting/index.js +21 -79
  227. package/lib/core/editor/components/settings/common/LineType/index.js +13 -126
  228. package/lib/core/editor/components/settings/common/NodeSizeInput/NodeSizeInput.js +2 -2
  229. package/lib/core/editor/components/settings/common/SizeInput/NodeSizeInput.js +32 -23
  230. package/lib/core/editor/components/settings/common/SizeInput/NodeSizeNumberPicker.js +6 -6
  231. package/lib/core/editor/components/settings/propertyViews/group/SettingTab/GroupExpandSetting.js +0 -8
  232. package/lib/core/editor/components/settings/propertyViews/multipleElements/BatchSetNodeSize/BatchSetNodeSize.js +6 -8
  233. package/lib/core/editor/components/settings/propertyViews/multipleElements/MultipleElementLineType.js +5 -42
  234. package/lib/core/editor/components/settings/propertyViews/multipleElements/MultipleElementPropertyView.js +2 -15
  235. package/lib/core/editor/components/settings/propertyViews/view/BatchSetNodeSize.js +7 -5
  236. package/lib/core/editor/components/titlebar/TopoEditorTitleBar.js +9 -1
  237. package/lib/core/editor/hooks/useKeyboardShortcut.js +52 -0
  238. package/lib/core/{store/models → editor/store}/background.js +0 -0
  239. package/lib/core/{store/models → editor/store}/historyManager.js +0 -0
  240. package/lib/core/editor/store/topoEdit.js +59 -0
  241. package/lib/core/editor/utils/edgeTypeStyleUtil.js +109 -0
  242. package/lib/core/hooks/useCanvasTheme.js +49 -0
  243. package/lib/core/hooks/useTopoEdit.js +39 -60
  244. package/lib/core/models/Alarm.js +2 -2
  245. package/lib/core/models/HistoryManager.js +10 -3
  246. package/lib/core/models/SelectionManager.js +17 -1
  247. package/lib/core/models/TopoApp.js +1 -1
  248. package/lib/core/models/TopoGraphView.js +8 -2
  249. package/lib/core/models/utils/linkUtils.js +1 -1
  250. package/lib/core/store/coreModels.js +5 -7
  251. package/lib/core/store/models/selection.js +2 -1
  252. package/lib/core/store/models/topoBizMod.js +0 -3
  253. package/lib/core/store/models/topoMod.js +27 -29
  254. package/lib/core/viewer/components/plugins/ResourceDetail/components/WebConsole/WebConsoleForm/WebConsoleForm.js +13 -29
  255. package/lib/core/viewer/components/plugins/ResourceDetail/components/WebConsole/WebConsoleForm/hooks/useWebConsole.js +6 -5
  256. package/lib/core/viewer/components/titlebar/widgets/SettingButton.js +3 -1
  257. package/lib/core/viewer/components/titlebar/widgets/SettingButtonWidget.js +4 -2
  258. package/lib/networkTopo/createTopo.js +3 -0
  259. package/lib/networkTopo/services/link.js +2 -2
  260. package/lib/networkTopo/store/topoTreeMod.js +6 -8
  261. package/lib/style.js +1 -0
  262. package/lib/utils/topoData.js +1 -0
  263. package/package.json +4 -4
  264. package/es/core/editor/components/Sidebar/views/CanvasPanel/ImagePanel.js +0 -4
  265. package/es/core/store/models/topoEdit.js +0 -39
  266. package/es/core/store/models/topoView.js +0 -36
  267. package/lib/core/editor/components/Sidebar/views/CanvasPanel/ImagePanel.js +0 -12
  268. package/lib/core/store/models/topoEdit.js +0 -51
  269. package/lib/core/store/models/topoView.js +0 -47
@@ -37,46 +37,30 @@ function WebConsoleForm(props) {
37
37
  webConsoleUrl = _useWebConsole.webConsoleUrl,
38
38
  save = _useWebConsole.save;
39
39
 
40
- var _useState = (0, _react.useState)(true),
40
+ var _useState = (0, _react.useState)(false),
41
41
  isEdit = _useState[0],
42
- handleInput = _useState[1];
43
-
44
- var _useState2 = (0, _react.useState)(false),
45
- isSave = _useState2[0],
46
- handleSaveBtn = _useState2[1];
47
-
48
- var _useState3 = (0, _react.useState)(false),
49
- isShow = _useState3[0],
50
- handleEdit = _useState3[1];
42
+ setIsEdit = _useState[1];
51
43
 
52
44
  var field = _field["default"].useField({
53
45
  autoUnmount: true,
54
- values: {},
55
- onChange: function onChange(name, value) {
56
- field.getValue('url').length > 0 ? handleSaveBtn(false) : handleSaveBtn(true);
57
- }
46
+ values: {
47
+ url: webConsoleUrl || ''
48
+ },
49
+ onChange: function onChange(name, value) {}
58
50
  });
59
51
 
60
52
  (0, _react.useEffect)(function () {
61
- field.setValue('url', webConsoleUrl);
53
+ field.setValue('url', webConsoleUrl || '');
54
+ field.validate();
62
55
  }, [webConsoleUrl]);
63
- (0, _react.useEffect)(function () {
64
- field.getError('url') == null ? handleSaveBtn(false) : handleSaveBtn(true);
65
- }, [field.getError('url')]);
66
56
 
67
57
  function handleEditLink() {
68
- handleInput(false);
69
- handleEdit(true);
58
+ setIsEdit(true);
70
59
  }
71
60
 
72
61
  function saveData() {
73
62
  save(field.getValue('url'));
74
- handleEdit(function (isShow) {
75
- return !isShow;
76
- });
77
- handleInput(function (isEdit) {
78
- return !isEdit;
79
- });
63
+ setIsEdit(false);
80
64
  }
81
65
 
82
66
  return /*#__PURE__*/_react["default"].createElement(_loading["default"], {
@@ -104,10 +88,10 @@ function WebConsoleForm(props) {
104
88
  name: "url",
105
89
  placeholder: "\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740",
106
90
  trim: true,
107
- disabled: isEdit
108
- })), /*#__PURE__*/_react["default"].createElement(FormItem, null, isShow ? /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(_button["default"], {
91
+ disabled: !isEdit
92
+ })), /*#__PURE__*/_react["default"].createElement(FormItem, null, isEdit ? /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(_button["default"], {
109
93
  type: "primary",
110
- disabled: isSave,
94
+ disabled: !!field.getError('url'),
111
95
  onClick: saveData,
112
96
  name: "baocun"
113
97
  }, "\u4FDD\u5B58")) : /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(_button["default"], {
@@ -71,16 +71,17 @@ function useWebConsole(props) {
71
71
  var requestWebConsoleUrl = (0, _ahooks.useRequest)(queryWebConsoleUrlById, {
72
72
  manual: true,
73
73
  onSuccess: function onSuccess(result) {
74
- if (ipv4Address != undefined) {
75
- result = result === undefined ? "http://" + ipv4Address : result;
76
- } else {
77
- result = result === undefined ? null : result;
74
+ var url = result;
75
+
76
+ if (!url && ipv4Address) {
77
+ url = "http://" + ipv4Address;
78
78
  }
79
79
 
80
- setWebConsoleUrl(result);
80
+ setWebConsoleUrl(url);
81
81
  }
82
82
  });
83
83
  (0, _react.useEffect)(function () {
84
+ setWebConsoleUrl(null);
84
85
  requestWebConsoleUrl.run(ciId);
85
86
  }, [ciId]); // 保存Web控制台url
86
87
 
@@ -25,7 +25,8 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
25
25
  function SettingButton(props) {
26
26
  var topo = props.topo,
27
27
  displaySettingProps = props.displaySettingProps,
28
- style = props.style;
28
+ style = props.style,
29
+ isEditor = props.isEditor;
29
30
 
30
31
  var _useState = (0, _react.useState)(false),
31
32
  visible = _useState[0],
@@ -54,6 +55,7 @@ function SettingButton(props) {
54
55
  })), /*#__PURE__*/_react["default"].createElement(_DisplaySettingDrawer["default"], {
55
56
  visible: visible,
56
57
  topo: topo,
58
+ isEditor: isEditor,
57
59
  displaySettingProps: displaySettingProps,
58
60
  onClose: function onClose() {
59
61
  setVisible(false);
@@ -17,11 +17,13 @@ var _SettingButton = _interopRequireDefault(require("./SettingButton"));
17
17
  function SettingButtonWidget(props) {
18
18
  var topo = props.topo,
19
19
  viewerProps = props.viewerProps,
20
- style = props.style;
20
+ style = props.style,
21
+ isEditor = props.isEditor;
21
22
  return /*#__PURE__*/_react["default"].createElement(_SettingButton["default"], {
22
23
  topo: topo,
23
24
  displaySettingProps: viewerProps === null || viewerProps === void 0 ? void 0 : viewerProps.displaySettingProps,
24
- style: style
25
+ style: style,
26
+ isEditor: isEditor
25
27
  });
26
28
  }
27
29
 
@@ -10,8 +10,11 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
10
10
 
11
11
  var _TopoCenter = _interopRequireDefault(require("./models/TopoCenter"));
12
12
 
13
+ var _services = _interopRequireDefault(require("./services"));
14
+
13
15
  function createTopo(options) {
14
16
  var topoApp = new _TopoCenter["default"]((0, _extends2["default"])({}, options));
17
+ topoApp.serverApi = _services["default"];
15
18
  return topoApp;
16
19
  }
17
20
 
@@ -173,10 +173,10 @@ var _default = {
173
173
  // const idtxt = `'${ids[0]}','${ids[1]}'`;
174
174
  stag = ids[0];
175
175
  ttag = ids[1];
176
- condition = "type('network_link') && !network_link.destination_device_id && network_link.source_device_id ='" + stag + "'";
176
+ condition = "type('network_link') && !destination_id && network_link.source_device_id ='" + stag + "'";
177
177
 
178
178
  if (ttag) {
179
- condition = "type('network_link') && !network_link.destination_device_id && network_link.source_device_id ='" + stag + "' && network_link.destination_device_id='" + ttag + "'";
179
+ condition = "type('network_link') && !destination_id && network_link.source_device_id ='" + stag + "' && network_link.destination_device_id='" + ttag + "'";
180
180
  }
181
181
 
182
182
  parm = {
@@ -13,8 +13,6 @@ var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/
13
13
 
14
14
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
15
15
 
16
- var _services = _interopRequireDefault(require("../services"));
17
-
18
16
  var _rlog = _interopRequireDefault(require("@riil-frontend/component-topology-utils/es/rlog"));
19
17
 
20
18
  var _tree = require("../../utils/tree");
@@ -101,7 +99,7 @@ function _default(topoApp) {
101
99
  }
102
100
 
103
101
  _context2.next = 4;
104
- return _services["default"].getTopoTree();
102
+ return topoApp.serverApi.getTopoTree();
105
103
 
106
104
  case 4:
107
105
  resTreeData = _context2.sent;
@@ -110,7 +108,7 @@ function _default(topoApp) {
110
108
 
111
109
  case 7:
112
110
  _context2.next = 9;
113
- return _services["default"].getTopoTreeByLoginUser();
111
+ return topoApp.serverApi.getTopoTreeByLoginUser();
114
112
 
115
113
  case 9:
116
114
  resTreeData = _context2.sent;
@@ -177,7 +175,7 @@ function _default(topoApp) {
177
175
  _rlog["default"].debug('editTopoOnTree', conditions);
178
176
 
179
177
  _context4.next = 4;
180
- return _services["default"].editTopoonTree(parseInt(conditions.id, 10), conditions.name, conditions.type);
178
+ return topoApp.serverApi.editTopoonTree(parseInt(conditions.id, 10), conditions.name, conditions.type);
181
179
 
182
180
  case 4:
183
181
  resTreeData = _context4.sent;
@@ -263,7 +261,7 @@ function _default(topoApp) {
263
261
 
264
262
  case 8:
265
263
  _context5.next = 10;
266
- return _services["default"].deleteTopoonTree(parseInt(conditions, 10));
264
+ return topoApp.serverApi.deleteTopoonTree(parseInt(conditions, 10));
267
265
 
268
266
  case 10:
269
267
  return _context5.abrupt("return", _context5.sent);
@@ -287,7 +285,7 @@ function _default(topoApp) {
287
285
 
288
286
  case 18:
289
287
  _context5.next = 20;
290
- return _services["default"].deleteTopoonTree(parseInt(conditions, 10));
288
+ return topoApp.serverApi.deleteTopoonTree(parseInt(conditions, 10));
291
289
 
292
290
  case 20:
293
291
  return _context5.abrupt("return", _context5.sent);
@@ -316,7 +314,7 @@ function _default(topoApp) {
316
314
  _rlog["default"].debug('setDefTopoOnTree', conditions);
317
315
 
318
316
  _context6.next = 4;
319
- return _services["default"].setDefTopo(parseInt(conditions, 10));
317
+ return topoApp.serverApi.setDefTopo(parseInt(conditions, 10));
320
318
 
321
319
  case 4:
322
320
  resTreeData = _context6.sent;
package/lib/style.js CHANGED
@@ -41,4 +41,5 @@ require('@alifd/next/lib/number-picker/style');
41
41
 
42
42
  require('@alifd/next/lib/tag/style');
43
43
  require('@riil-frontend/component-riil-event-emitter/lib/style');
44
+ require('@alifd/next/lib/range/style');
44
45
  require('./index.scss');
@@ -366,6 +366,7 @@ function buildGlobal(_ref2) {
366
366
  showLinkName: false,
367
367
  // 是否显示链路名称
368
368
  nodeLabelStyle: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.nodeLabelStyle,
369
+ defaultEdgeLabelStyle: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.defaultEdgeLabelStyle,
369
370
  edgeFlow: edgeFlow
370
371
  }, (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.topoDisplayConfig) || {}, (result === null || result === void 0 ? void 0 : (_result$customGlobal2 = result.customGlobal) === null || _result$customGlobal2 === void 0 ? void 0 : _result$customGlobal2.topoDisplayConfig) || {}),
371
372
  linkTo: linkTo,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riil-frontend/component-topology",
3
- "version": "6.0.0-alpha.3",
3
+ "version": "6.0.0-alpha.30",
4
4
  "description": "拓扑",
5
5
  "scripts": {
6
6
  "start": "build-scripts start",
@@ -61,7 +61,7 @@
61
61
  "@riil-frontend/component-action-tree": "^1.0.13",
62
62
  "@riil-frontend/component-common-res-list": "^1.0.13",
63
63
  "@riil-frontend/component-condition-res-list": "^1.0.18",
64
- "@riil-frontend/component-crucial-link-topo": "0.0.1-alpha.31",
64
+ "@riil-frontend/component-crucial-link-topo": "0.1.0",
65
65
  "@riil-frontend/component-extra-title": "^1.0.3",
66
66
  "@riil-frontend/component-more-buttons-menu": "^2.0.1",
67
67
  "@riil-frontend/component-no-data-page": "^3.0.4",
@@ -73,7 +73,7 @@
73
73
  "@riil-frontend/component-table-filter-tags": "latest",
74
74
  "@riil-frontend/component-table-layout": "^2.0.2",
75
75
  "@riil-frontend/component-topology-common": "^1.1.2",
76
- "@riil-frontend/component-topology-graph": "^2.7.2",
76
+ "@riil-frontend/component-topology-graph": "^2.8.0",
77
77
  "@riil-frontend/css": "^2.0.2",
78
78
  "@riil-frontend/hooks": "latest",
79
79
  "@riil-frontend/next-collapse": "^1.0.1-a.0",
@@ -115,6 +115,6 @@
115
115
  "access": "public"
116
116
  },
117
117
  "license": "MIT",
118
- "homepage": "https://unpkg.com/@riil-frontend/component-topology@6.0.0-alpha.3/build/index.html",
118
+ "homepage": "https://unpkg.com/@riil-frontend/component-topology@6.0.0-alpha.30/build/index.html",
119
119
  "gitHead": "2da19ffccbb7ca60a8acf396e39f542c68bb33f5"
120
120
  }
@@ -1,4 +0,0 @@
1
- import React from 'react';
2
- export default function ImagePanel(props) {
3
- return /*#__PURE__*/React.createElement("div", null, "ImagePanel");
4
- }
@@ -1,39 +0,0 @@
1
- import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
2
- import _extends from "@babel/runtime/helpers/extends";
3
- import _regeneratorRuntime from "@babel/runtime/regenerator";
4
-
5
- /**
6
- * 拓扑编辑 Model
7
- */
8
- import rlog from '@riil-frontend/component-topology-utils/es/rlog';
9
- import topoService from '@riil-frontend/component-topology-common/es/services/topo';
10
- export default {
11
- // 定义 model 的初始 state
12
- state: {
13
- saving: false
14
- },
15
- // 定义改变该模型状态的纯函数
16
- reducers: {
17
- update: function update(prevState, payload) {
18
- return _extends({}, prevState, payload);
19
- }
20
- },
21
- // 定义处理该模型副作用的函数
22
- effects: function effects(dispatch) {
23
- return {
24
- init: function init(payload, rootState) {
25
- return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
26
- return _regeneratorRuntime.wrap(function _callee$(_context) {
27
- while (1) {
28
- switch (_context.prev = _context.next) {
29
- case 0:
30
- case "end":
31
- return _context.stop();
32
- }
33
- }
34
- }, _callee);
35
- }))();
36
- }
37
- };
38
- }
39
- };
@@ -1,36 +0,0 @@
1
- import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
2
- import _extends from "@babel/runtime/helpers/extends";
3
- import _regeneratorRuntime from "@babel/runtime/regenerator";
4
-
5
- /**
6
- * 拓扑图 Model
7
- */
8
- import rlog from '@riil-frontend/component-topology-utils/es/rlog';
9
- export default {
10
- // 定义 model 的初始 state
11
- state: {},
12
- // 定义改变该模型状态的纯函数
13
- reducers: {
14
- update: function update(prevState, payload) {
15
- return _extends({}, prevState, payload);
16
- }
17
- },
18
- // 定义处理该模型副作用的函数
19
- effects: function effects(dispatch) {
20
- return {
21
- init: function init(payload, rootState) {
22
- return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
23
- return _regeneratorRuntime.wrap(function _callee$(_context) {
24
- while (1) {
25
- switch (_context.prev = _context.next) {
26
- case 0:
27
- case "end":
28
- return _context.stop();
29
- }
30
- }
31
- }, _callee);
32
- }))();
33
- }
34
- };
35
- }
36
- };
@@ -1,12 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
5
- exports.__esModule = true;
6
- exports["default"] = ImagePanel;
7
-
8
- var _react = _interopRequireDefault(require("react"));
9
-
10
- function ImagePanel(props) {
11
- return /*#__PURE__*/_react["default"].createElement("div", null, "ImagePanel");
12
- }
@@ -1,51 +0,0 @@
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 _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
9
-
10
- var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
11
-
12
- var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
13
-
14
- var _rlog = _interopRequireDefault(require("@riil-frontend/component-topology-utils/es/rlog"));
15
-
16
- var _topo = _interopRequireDefault(require("@riil-frontend/component-topology-common/es/services/topo"));
17
-
18
- /**
19
- * 拓扑编辑 Model
20
- */
21
- var _default = {
22
- // 定义 model 的初始 state
23
- state: {
24
- saving: false
25
- },
26
- // 定义改变该模型状态的纯函数
27
- reducers: {
28
- update: function update(prevState, payload) {
29
- return (0, _extends2["default"])({}, prevState, payload);
30
- }
31
- },
32
- // 定义处理该模型副作用的函数
33
- effects: function effects(dispatch) {
34
- return {
35
- init: function init(payload, rootState) {
36
- return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee() {
37
- return _regenerator["default"].wrap(function _callee$(_context) {
38
- while (1) {
39
- switch (_context.prev = _context.next) {
40
- case 0:
41
- case "end":
42
- return _context.stop();
43
- }
44
- }
45
- }, _callee);
46
- }))();
47
- }
48
- };
49
- }
50
- };
51
- exports["default"] = _default;
@@ -1,47 +0,0 @@
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 _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
9
-
10
- var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
11
-
12
- var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
13
-
14
- var _rlog = _interopRequireDefault(require("@riil-frontend/component-topology-utils/es/rlog"));
15
-
16
- /**
17
- * 拓扑图 Model
18
- */
19
- var _default = {
20
- // 定义 model 的初始 state
21
- state: {},
22
- // 定义改变该模型状态的纯函数
23
- reducers: {
24
- update: function update(prevState, payload) {
25
- return (0, _extends2["default"])({}, prevState, payload);
26
- }
27
- },
28
- // 定义处理该模型副作用的函数
29
- effects: function effects(dispatch) {
30
- return {
31
- init: function init(payload, rootState) {
32
- return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee() {
33
- return _regenerator["default"].wrap(function _callee$(_context) {
34
- while (1) {
35
- switch (_context.prev = _context.next) {
36
- case 0:
37
- case "end":
38
- return _context.stop();
39
- }
40
- }
41
- }, _callee);
42
- }))();
43
- }
44
- };
45
- }
46
- };
47
- exports["default"] = _default;