@riil-frontend/component-topology 6.0.0-alpha.2 → 6.0.0-alpha.21

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 (257) 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 +28 -28
  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 +22 -0
  9. package/es/components/ColorPanel/index.js +199 -0
  10. package/es/components/ColorPanel/index.module.scss +37 -0
  11. package/es/components/VerticalIconTab/VerticalIconTab.module.scss +7 -2
  12. package/es/components/collapse/Collapse.module.scss +12 -1
  13. package/es/core/common/hooks/useHtElements.js +21 -0
  14. package/es/core/common/icons/useIcons.js +7 -1
  15. package/es/core/components/AlarmListPanel/components/AlarmListItem.js +15 -13
  16. package/es/core/components/AlarmListPanel/components/index.module.scss +5 -5
  17. package/es/core/components/DisplaySettingDrawer/DisplaySetting.js +2 -1
  18. package/es/core/components/DisplaySettingDrawer/DisplaySettingDrawer.js +6 -2
  19. package/es/core/components/DisplaySettingDrawer/EditorDisplaySetting.js +122 -0
  20. package/es/core/components/DisplaySettingDrawer/hooks/useDisplaySetting.js +74 -20
  21. package/es/core/components/TopoView/TopoGraphViewPanel.js +20 -0
  22. package/es/core/components/TopoView/editor.module.scss +1 -0
  23. package/es/core/components/TopoView/topoView.js +39 -18
  24. package/es/core/editor/components/Sidebar/Sidebar.js +26 -50
  25. package/es/core/editor/components/Sidebar/Sidebar.module.scss +5 -1
  26. package/es/core/editor/components/Sidebar/panes.js +32 -0
  27. package/es/core/editor/components/Sidebar/views/BackgroundPanel/BackgroundPanel.js +1 -2
  28. package/es/core/editor/components/Sidebar/views/CanvasPanel/CanvasPanel.js +96 -0
  29. package/es/core/editor/components/Sidebar/views/CanvasPanel/CanvasPanel.module.scss +74 -0
  30. package/es/core/editor/components/Sidebar/views/CanvasPanel/index.js +1 -1
  31. package/es/core/editor/components/Sidebar/views/ImagePanel/CiTypeImagePanel.js +1 -1
  32. package/es/core/editor/components/Sidebar/views/ImagePanel/CustomImagePanel.js +8 -33
  33. package/es/core/editor/components/Sidebar/views/ImagePanel/HtCustomImagePanel.js +42 -0
  34. package/es/core/editor/components/Sidebar/views/ImagePanel/HtImagePalette.js +42 -0
  35. package/es/core/editor/components/Sidebar/views/ImagePanel/HtImagePalette.module.scss +5 -0
  36. package/es/core/editor/components/Sidebar/views/ImagePanel/ImagePanel.js +2 -1
  37. package/es/core/editor/components/Toolbar/EditorToolbar.js +23 -13
  38. package/es/core/editor/components/Toolbar/Toolbar.js +1 -1
  39. package/es/core/editor/components/Toolbar/Toolbar.module.scss +14 -3
  40. package/es/core/editor/components/Toolbar/buttons.js +20 -18
  41. package/es/core/editor/components/Toolbar/hooks/useFontStyleSetting.js +35 -0
  42. package/es/core/editor/components/Toolbar/widgets/AddResourceButton.js +56 -7
  43. package/es/core/editor/components/Toolbar/widgets/CanvasMoveWidget.js +13 -2
  44. package/es/core/editor/components/Toolbar/widgets/CanvasSelectWidget.js +11 -2
  45. package/es/core/editor/components/Toolbar/widgets/EdgeColorButton/Content.js +10 -1
  46. package/es/core/editor/components/Toolbar/widgets/EdgeColorButton/EdgeWidthRange.js +33 -0
  47. package/es/core/editor/components/Toolbar/widgets/EdgeColorButton/EdgeWidthRange.module.scss +26 -0
  48. package/es/core/editor/components/Toolbar/widgets/EdgeTypeButton/EdgeType.js +184 -3
  49. package/es/core/editor/components/Toolbar/widgets/EdgeTypeButton/EdgeType.module.scss +44 -0
  50. package/es/core/editor/components/Toolbar/widgets/EdgeTypeButton/LineType.js +53 -0
  51. package/es/core/editor/components/Toolbar/widgets/EdgeTypeButton/LineType.module.scss +31 -0
  52. package/es/core/editor/components/Toolbar/widgets/EdgeTypeButton/constants.js +77 -0
  53. package/es/core/editor/components/Toolbar/widgets/EdgeTypeButton/index.js +59 -6
  54. package/es/core/editor/components/Toolbar/widgets/FontColorButton.js +36 -4
  55. package/es/core/editor/components/Toolbar/widgets/FontColorButton.module.scss +35 -0
  56. package/es/core/editor/components/Toolbar/widgets/FontFamilyWidget.js +12 -2
  57. package/es/core/editor/components/Toolbar/widgets/FontSizeWidget.js +12 -2
  58. package/es/core/editor/components/Toolbar/widgets/HistoryRedoButton.js +3 -2
  59. package/es/core/editor/components/Toolbar/widgets/HistoryUndoButton.js +5 -4
  60. package/es/core/editor/components/Toolbar/widgets/IconSelect/IconSelect.js +109 -0
  61. package/es/core/editor/components/Toolbar/widgets/IconSelect/constant.js +64 -0
  62. package/es/core/editor/components/Toolbar/widgets/IconSelect/index.js +101 -0
  63. package/es/core/editor/components/Toolbar/widgets/IconSelect/index.module.scss +153 -0
  64. package/es/core/editor/components/Toolbar/widgets/IconSelect/popUpContent.js +49 -0
  65. package/es/core/editor/components/Toolbar/widgets/Layout/components/LayoutSettings.js +99 -0
  66. package/es/core/editor/components/Toolbar/widgets/Layout/components/LayoutSettings.module.scss +70 -0
  67. package/es/core/editor/components/Toolbar/widgets/Layout/components/LayoutTagImageSelect/index.js +42 -0
  68. package/es/core/editor/components/Toolbar/widgets/Layout/components/LayoutTagImageSelect/index.module.scss +7 -0
  69. package/es/core/editor/components/Toolbar/widgets/Layout/components/LayoutTagSelect/index.js +75 -0
  70. package/es/core/editor/components/Toolbar/widgets/Layout/components/LayoutTagSelect/index.scss +32 -0
  71. package/es/core/editor/components/Toolbar/widgets/Layout/components/LayoutTemplateButton/Icon.js +23 -0
  72. package/es/core/editor/components/Toolbar/widgets/Layout/components/LayoutTemplateButton/assets/index.js +10 -0
  73. package/es/core/editor/components/Toolbar/widgets/Layout/components/LayoutTemplateButton/assets/topo_layout_circular.svg +10 -0
  74. package/es/core/editor/components/Toolbar/widgets/Layout/components/LayoutTemplateButton/assets/topo_layout_hierarchical.svg +10 -0
  75. package/es/core/editor/components/Toolbar/widgets/Layout/components/LayoutTemplateButton/assets/topo_layout_rectangle.svg +12 -0
  76. package/es/core/editor/components/Toolbar/widgets/Layout/components/LayoutTemplateButton/assets/topo_layout_toward.svg +16 -0
  77. package/es/core/editor/components/Toolbar/widgets/Layout/components/LayoutTemplateButton/index.js +31 -0
  78. package/es/core/editor/components/Toolbar/widgets/Layout/components/LayoutTemplateButton/index.module.scss +53 -0
  79. package/es/core/editor/components/Toolbar/widgets/Layout/index.js +127 -14
  80. package/es/core/editor/components/Toolbar/widgets/NodeAlignWidget.js +28 -22
  81. package/es/core/editor/components/Toolbar/widgets/NodeImageButton/BoxBackgroundSetting.js +14 -4
  82. package/es/core/editor/components/Toolbar/widgets/NodeImageButton/NodeImageButton.js +37 -6
  83. package/es/core/editor/components/Toolbar/widgets/NodeSizeButton/NodeSizeButton.js +90 -12
  84. package/es/core/editor/components/Toolbar/widgets/NodeSizeButton/NodeSizeButton.module.scss +28 -0
  85. package/es/core/editor/components/Toolbar/widgets/WidgetBox.js +9 -21
  86. package/es/core/editor/components/Toolbar/widgets/WidgetBox.module.scss +11 -1
  87. package/es/core/editor/components/Toolbar/widgets/components/ButtonBox.js +4 -2
  88. package/es/core/editor/components/Toolbar/widgets/components/DropdownButton.js +8 -5
  89. package/es/core/editor/components/settings/Settings.js +0 -23
  90. package/es/core/editor/components/settings/Settings.module.scss +1 -2
  91. package/es/core/editor/components/settings/common/AlignSetting/AlignTypeList.js +76 -0
  92. package/es/core/editor/components/settings/common/AlignSetting/index.js +18 -72
  93. package/es/core/editor/components/settings/common/LineType/index.js +12 -119
  94. package/es/core/editor/components/settings/common/NodeSizeInput/NodeSizeInput.js +3 -3
  95. package/es/core/editor/components/settings/common/SizeInput/NodeSizeInput.js +31 -21
  96. package/es/core/editor/components/settings/common/SizeInput/NodeSizeNumberPicker.js +7 -6
  97. package/es/core/editor/components/settings/propertyViews/group/SettingTab/GroupExpandSetting.js +0 -8
  98. package/es/core/editor/components/settings/propertyViews/layer/DataTab/DefaultLayerAddResourceDrawer.js +48 -0
  99. package/es/core/editor/components/settings/propertyViews/layer/DataTab/LayerAddResourceButton.js +12 -18
  100. package/es/core/editor/components/settings/propertyViews/layer/DataTab/LayerAddResourceDrawer.js +13 -46
  101. package/es/core/editor/components/settings/propertyViews/layer/DataTab/RelateData.js +2 -1
  102. package/es/core/editor/components/settings/propertyViews/multipleElements/BatchSetNodeSize/BatchSetNodeSize.js +8 -9
  103. package/es/core/editor/components/settings/propertyViews/multipleElements/MultipleElementLineType.js +5 -42
  104. package/es/core/editor/components/settings/propertyViews/multipleElements/MultipleElementPropertyView.js +2 -15
  105. package/es/core/editor/components/settings/propertyViews/view/BatchSetNodeSize.js +9 -6
  106. package/es/core/editor/components/titlebar/TopoEditorTitleBar.js +8 -4
  107. package/es/core/editor/hooks/useLayerAddResource.js +28 -0
  108. package/es/core/{store/models → editor/store}/background.js +0 -0
  109. package/es/core/{store/models → editor/store}/historyManager.js +0 -0
  110. package/es/core/{store/models → editor/store}/topoEdit.js +8 -1
  111. package/es/core/editor/utils/edgeTypeStyleUtil.js +96 -0
  112. package/es/core/hooks/useCanvasTheme.js +35 -0
  113. package/es/core/hooks/useTopoEdit.js +36 -58
  114. package/es/core/models/HistoryManager.js +10 -3
  115. package/es/core/models/SelectionManager.js +16 -1
  116. package/es/core/models/TopoApp.js +1 -1
  117. package/es/core/models/TopoGraphView.js +8 -2
  118. package/es/core/models/utils/linkUtils.js +1 -1
  119. package/es/core/store/coreModels.js +6 -7
  120. package/es/core/store/models/selection.js +2 -1
  121. package/es/core/viewer/components/titlebar/widgets/SettingButton.js +3 -1
  122. package/es/core/viewer/components/titlebar/widgets/SettingButtonWidget.js +4 -2
  123. package/es/networkTopo/createTopo.js +2 -0
  124. package/es/networkTopo/services/link.js +2 -2
  125. package/es/networkTopo/store/topoTreeMod.js +6 -7
  126. package/es/style.js +1 -0
  127. package/es/utils/topoData.js +1 -0
  128. package/lib/components/ColorPanel/components/ColorBlock/index.js +47 -0
  129. package/lib/components/ColorPanel/components/ColorBlock/index.module.scss +8 -0
  130. package/lib/components/ColorPanel/components/FontColorRange/index.js +49 -0
  131. package/lib/components/ColorPanel/components/FontColorRange/index.module.scss +22 -0
  132. package/lib/components/ColorPanel/index.js +217 -0
  133. package/lib/components/ColorPanel/index.module.scss +37 -0
  134. package/lib/components/VerticalIconTab/VerticalIconTab.module.scss +7 -2
  135. package/lib/components/collapse/Collapse.module.scss +12 -1
  136. package/lib/core/common/hooks/useHtElements.js +27 -0
  137. package/lib/core/common/icons/useIcons.js +7 -1
  138. package/lib/core/components/AlarmListPanel/components/AlarmListItem.js +15 -13
  139. package/lib/core/components/AlarmListPanel/components/index.module.scss +5 -5
  140. package/lib/core/components/DisplaySettingDrawer/DisplaySetting.js +2 -1
  141. package/lib/core/components/DisplaySettingDrawer/DisplaySettingDrawer.js +7 -2
  142. package/lib/core/components/DisplaySettingDrawer/EditorDisplaySetting.js +147 -0
  143. package/lib/core/components/DisplaySettingDrawer/hooks/useDisplaySetting.js +74 -20
  144. package/lib/core/components/TopoView/TopoGraphViewPanel.js +30 -0
  145. package/lib/core/components/TopoView/editor.module.scss +1 -0
  146. package/lib/core/components/TopoView/topoView.js +41 -19
  147. package/lib/core/editor/components/Sidebar/Sidebar.js +25 -52
  148. package/lib/core/editor/components/Sidebar/Sidebar.module.scss +5 -1
  149. package/lib/core/editor/components/Sidebar/panes.js +45 -0
  150. package/lib/core/editor/components/Sidebar/views/BackgroundPanel/BackgroundPanel.js +1 -2
  151. package/lib/core/editor/components/Sidebar/views/CanvasPanel/CanvasPanel.js +109 -0
  152. package/lib/core/editor/components/Sidebar/views/CanvasPanel/CanvasPanel.module.scss +74 -0
  153. package/lib/core/editor/components/Sidebar/views/CanvasPanel/index.js +2 -2
  154. package/lib/core/editor/components/Sidebar/views/ImagePanel/CiTypeImagePanel.js +2 -2
  155. package/lib/core/editor/components/Sidebar/views/ImagePanel/CustomImagePanel.js +8 -32
  156. package/lib/core/editor/components/Sidebar/views/ImagePanel/HtCustomImagePanel.js +55 -0
  157. package/lib/core/editor/components/Sidebar/views/ImagePanel/HtImagePalette.js +55 -0
  158. package/lib/core/editor/components/Sidebar/views/ImagePanel/HtImagePalette.module.scss +5 -0
  159. package/lib/core/editor/components/Sidebar/views/ImagePanel/ImagePanel.js +3 -1
  160. package/lib/core/editor/components/Toolbar/EditorToolbar.js +22 -11
  161. package/lib/core/editor/components/Toolbar/Toolbar.js +1 -1
  162. package/lib/core/editor/components/Toolbar/Toolbar.module.scss +14 -3
  163. package/lib/core/editor/components/Toolbar/buttons.js +21 -20
  164. package/lib/core/editor/components/Toolbar/hooks/useFontStyleSetting.js +50 -0
  165. package/lib/core/editor/components/Toolbar/widgets/AddResourceButton.js +63 -7
  166. package/lib/core/editor/components/Toolbar/widgets/CanvasMoveWidget.js +13 -2
  167. package/lib/core/editor/components/Toolbar/widgets/CanvasSelectWidget.js +11 -2
  168. package/lib/core/editor/components/Toolbar/widgets/EdgeColorButton/Content.js +11 -1
  169. package/lib/core/editor/components/Toolbar/widgets/EdgeColorButton/EdgeWidthRange.js +47 -0
  170. package/lib/core/editor/components/Toolbar/widgets/EdgeColorButton/EdgeWidthRange.module.scss +26 -0
  171. package/lib/core/editor/components/Toolbar/widgets/EdgeTypeButton/EdgeType.js +194 -3
  172. package/lib/core/editor/components/Toolbar/widgets/EdgeTypeButton/EdgeType.module.scss +44 -0
  173. package/lib/core/editor/components/Toolbar/widgets/EdgeTypeButton/LineType.js +71 -0
  174. package/lib/core/editor/components/Toolbar/widgets/EdgeTypeButton/LineType.module.scss +31 -0
  175. package/lib/core/editor/components/Toolbar/widgets/EdgeTypeButton/constants.js +83 -0
  176. package/lib/core/editor/components/Toolbar/widgets/EdgeTypeButton/index.js +61 -5
  177. package/lib/core/editor/components/Toolbar/widgets/FontColorButton.js +39 -4
  178. package/lib/core/editor/components/Toolbar/widgets/FontColorButton.module.scss +35 -0
  179. package/lib/core/editor/components/Toolbar/widgets/FontFamilyWidget.js +13 -2
  180. package/lib/core/editor/components/Toolbar/widgets/FontSizeWidget.js +13 -2
  181. package/lib/core/editor/components/Toolbar/widgets/HistoryRedoButton.js +4 -2
  182. package/lib/core/editor/components/Toolbar/widgets/HistoryUndoButton.js +5 -3
  183. package/lib/core/editor/components/Toolbar/widgets/IconSelect/IconSelect.js +126 -0
  184. package/lib/core/editor/components/Toolbar/widgets/IconSelect/constant.js +69 -0
  185. package/lib/core/editor/components/Toolbar/widgets/IconSelect/index.js +117 -0
  186. package/lib/core/editor/components/Toolbar/widgets/IconSelect/index.module.scss +153 -0
  187. package/lib/core/editor/components/Toolbar/widgets/IconSelect/popUpContent.js +61 -0
  188. package/lib/core/editor/components/Toolbar/widgets/Layout/components/LayoutSettings.js +116 -0
  189. package/lib/core/editor/components/Toolbar/widgets/Layout/components/LayoutSettings.module.scss +70 -0
  190. package/lib/core/editor/components/Toolbar/widgets/Layout/components/LayoutTagImageSelect/index.js +55 -0
  191. package/lib/core/editor/components/Toolbar/widgets/Layout/components/LayoutTagImageSelect/index.module.scss +7 -0
  192. package/lib/core/editor/components/Toolbar/widgets/Layout/components/LayoutTagSelect/index.js +93 -0
  193. package/lib/core/editor/components/Toolbar/widgets/Layout/components/LayoutTagSelect/index.scss +32 -0
  194. package/lib/core/editor/components/Toolbar/widgets/Layout/components/LayoutTemplateButton/Icon.js +32 -0
  195. package/lib/core/editor/components/Toolbar/widgets/Layout/components/LayoutTemplateButton/assets/index.js +22 -0
  196. package/lib/core/editor/components/Toolbar/widgets/Layout/components/LayoutTemplateButton/assets/topo_layout_circular.svg +10 -0
  197. package/lib/core/editor/components/Toolbar/widgets/Layout/components/LayoutTemplateButton/assets/topo_layout_hierarchical.svg +10 -0
  198. package/lib/core/editor/components/Toolbar/widgets/Layout/components/LayoutTemplateButton/assets/topo_layout_rectangle.svg +12 -0
  199. package/lib/core/editor/components/Toolbar/widgets/Layout/components/LayoutTemplateButton/assets/topo_layout_toward.svg +16 -0
  200. package/lib/core/editor/components/Toolbar/widgets/Layout/components/LayoutTemplateButton/index.js +44 -0
  201. package/lib/core/editor/components/Toolbar/widgets/Layout/components/LayoutTemplateButton/index.module.scss +53 -0
  202. package/lib/core/editor/components/Toolbar/widgets/Layout/index.js +132 -15
  203. package/lib/core/editor/components/Toolbar/widgets/NodeAlignWidget.js +30 -23
  204. package/lib/core/editor/components/Toolbar/widgets/NodeImageButton/BoxBackgroundSetting.js +20 -4
  205. package/lib/core/editor/components/Toolbar/widgets/NodeImageButton/NodeImageButton.js +36 -5
  206. package/lib/core/editor/components/Toolbar/widgets/NodeSizeButton/NodeSizeButton.js +91 -11
  207. package/lib/core/editor/components/Toolbar/widgets/NodeSizeButton/NodeSizeButton.module.scss +28 -0
  208. package/lib/core/editor/components/Toolbar/widgets/WidgetBox.js +11 -24
  209. package/lib/core/editor/components/Toolbar/widgets/WidgetBox.module.scss +11 -1
  210. package/lib/core/editor/components/Toolbar/widgets/components/ButtonBox.js +4 -2
  211. package/lib/core/editor/components/Toolbar/widgets/components/DropdownButton.js +8 -5
  212. package/lib/core/editor/components/settings/Settings.js +0 -23
  213. package/lib/core/editor/components/settings/Settings.module.scss +1 -2
  214. package/lib/core/editor/components/settings/common/AlignSetting/AlignTypeList.js +93 -0
  215. package/lib/core/editor/components/settings/common/AlignSetting/index.js +19 -80
  216. package/lib/core/editor/components/settings/common/LineType/index.js +13 -126
  217. package/lib/core/editor/components/settings/common/NodeSizeInput/NodeSizeInput.js +2 -2
  218. package/lib/core/editor/components/settings/common/SizeInput/NodeSizeInput.js +32 -23
  219. package/lib/core/editor/components/settings/common/SizeInput/NodeSizeNumberPicker.js +6 -6
  220. package/lib/core/editor/components/settings/propertyViews/group/SettingTab/GroupExpandSetting.js +0 -8
  221. package/lib/core/editor/components/settings/propertyViews/layer/DataTab/DefaultLayerAddResourceDrawer.js +63 -0
  222. package/lib/core/editor/components/settings/propertyViews/layer/DataTab/LayerAddResourceButton.js +13 -22
  223. package/lib/core/editor/components/settings/propertyViews/layer/DataTab/LayerAddResourceDrawer.js +12 -50
  224. package/lib/core/editor/components/settings/propertyViews/layer/DataTab/RelateData.js +2 -1
  225. package/lib/core/editor/components/settings/propertyViews/multipleElements/BatchSetNodeSize/BatchSetNodeSize.js +6 -8
  226. package/lib/core/editor/components/settings/propertyViews/multipleElements/MultipleElementLineType.js +5 -42
  227. package/lib/core/editor/components/settings/propertyViews/multipleElements/MultipleElementPropertyView.js +2 -15
  228. package/lib/core/editor/components/settings/propertyViews/view/BatchSetNodeSize.js +7 -5
  229. package/lib/core/editor/components/titlebar/TopoEditorTitleBar.js +9 -1
  230. package/lib/core/editor/hooks/useLayerAddResource.js +34 -0
  231. package/lib/core/{store/models → editor/store}/background.js +0 -0
  232. package/lib/core/{store/models → editor/store}/historyManager.js +0 -0
  233. package/lib/core/{store/models → editor/store}/topoEdit.js +8 -1
  234. package/lib/core/editor/utils/edgeTypeStyleUtil.js +109 -0
  235. package/lib/core/hooks/useCanvasTheme.js +49 -0
  236. package/lib/core/hooks/useTopoEdit.js +36 -60
  237. package/lib/core/models/HistoryManager.js +10 -3
  238. package/lib/core/models/SelectionManager.js +17 -1
  239. package/lib/core/models/TopoApp.js +1 -1
  240. package/lib/core/models/TopoGraphView.js +8 -2
  241. package/lib/core/models/utils/linkUtils.js +1 -1
  242. package/lib/core/store/coreModels.js +5 -7
  243. package/lib/core/store/models/selection.js +2 -1
  244. package/lib/core/viewer/components/titlebar/widgets/SettingButton.js +3 -1
  245. package/lib/core/viewer/components/titlebar/widgets/SettingButtonWidget.js +4 -2
  246. package/lib/networkTopo/createTopo.js +3 -0
  247. package/lib/networkTopo/services/link.js +2 -2
  248. package/lib/networkTopo/store/topoTreeMod.js +6 -8
  249. package/lib/style.js +1 -0
  250. package/lib/utils/topoData.js +1 -0
  251. package/package.json +2 -2
  252. package/es/core/editor/components/Sidebar/views/CanvasPanel/ImagePanel.js +0 -4
  253. package/es/core/editor/components/Toolbar/widgets/AddResourceWidget.js +0 -17
  254. package/es/core/store/models/topoView.js +0 -36
  255. package/lib/core/editor/components/Sidebar/views/CanvasPanel/ImagePanel.js +0 -12
  256. package/lib/core/editor/components/Toolbar/widgets/AddResourceWidget.js +0 -27
  257. package/lib/core/store/models/topoView.js +0 -47
@@ -0,0 +1,47 @@
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 _react = _interopRequireDefault(require("react"));
9
+
10
+ var _propTypes = _interopRequireDefault(require("prop-types"));
11
+
12
+ var _indexModule = _interopRequireDefault(require("./index.module.scss"));
13
+
14
+ /**
15
+ * 颜色选择
16
+ *
17
+ * @param props
18
+ * @return {*}
19
+ * @constructor
20
+ */
21
+ function ColorBlock(props) {
22
+ var color = props.color,
23
+ onChange = props.onChange,
24
+ index = props.index;
25
+ return /*#__PURE__*/_react["default"].createElement("div", {
26
+ style: {
27
+ background: color.color,
28
+ borderColor: color.borderColor
29
+ },
30
+ className: _indexModule["default"].content,
31
+ onClick: function onClick() {
32
+ onChange(color.color, 'select', index);
33
+ }
34
+ }, "\xA0");
35
+ }
36
+
37
+ ColorBlock.propTypes = {
38
+ color: _propTypes["default"].object,
39
+ // eslint-disable-next-line react/no-unused-prop-types
40
+ onChange: _propTypes["default"].func
41
+ };
42
+ ColorBlock.defaultProps = {
43
+ color: {},
44
+ onChange: function onChange() {}
45
+ };
46
+ var _default = ColorBlock;
47
+ exports["default"] = _default;
@@ -0,0 +1,8 @@
1
+ @import '~@alifd/next/variables.scss';
2
+
3
+ .content{
4
+ width: 25px;
5
+ height: 25px;
6
+ border-radius: 50%;
7
+ border: 1px solid;
8
+ }
@@ -0,0 +1,49 @@
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 _range = _interopRequireDefault(require("@alifd/next/lib/range"));
9
+
10
+ var _react = _interopRequireWildcard(require("react"));
11
+
12
+ var _indexModule = _interopRequireDefault(require("./index.module.scss"));
13
+
14
+ 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); }
15
+
16
+ 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; }
17
+
18
+ function FontColorRange(props) {
19
+ var onChange = props.onChange,
20
+ _props$unit = props.unit,
21
+ unit = _props$unit === void 0 ? 'px' : _props$unit,
22
+ list = props.list,
23
+ max = props.max,
24
+ min = props.min,
25
+ defaultValue = props.defaultValue;
26
+
27
+ var _useState = (0, _react.useState)(defaultValue),
28
+ value = _useState[0],
29
+ setValue = _useState[1];
30
+
31
+ return /*#__PURE__*/_react["default"].createElement("div", {
32
+ className: _indexModule["default"].content
33
+ }, /*#__PURE__*/_react["default"].createElement("div", {
34
+ className: _indexModule["default"].range
35
+ }, /*#__PURE__*/_react["default"].createElement(_range["default"], {
36
+ defaultValue: value,
37
+ min: min,
38
+ max: max,
39
+ marks: list,
40
+ hasTip: false,
41
+ onChange: onChange,
42
+ onProcess: setValue
43
+ })), /*#__PURE__*/_react["default"].createElement("div", {
44
+ className: _indexModule["default"].unit
45
+ }, value, unit));
46
+ }
47
+
48
+ var _default = FontColorRange;
49
+ exports["default"] = _default;
@@ -0,0 +1,22 @@
1
+ @import '~@alifd/next/variables.scss';
2
+
3
+
4
+ .content {
5
+ display: flex;
6
+ flex-direction: row;
7
+ width: 81%;
8
+ margin-left: 6%;
9
+ .range {
10
+ flex: 1;
11
+ }
12
+
13
+ .unit {
14
+ margin-left: 10px;
15
+ }
16
+
17
+ :global {
18
+ .#{$css-prefix}range .#{$css-prefix}range-mark {
19
+ display: none;
20
+ }
21
+ }
22
+ }
@@ -0,0 +1,217 @@
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 _balloon = _interopRequireDefault(require("@alifd/next/lib/balloon"));
9
+
10
+ var _react = _interopRequireWildcard(require("react"));
11
+
12
+ var _classnames4 = _interopRequireDefault(require("classnames"));
13
+
14
+ var _reactColor = require("react-color");
15
+
16
+ var _ColorBlock = _interopRequireDefault(require("./components/ColorBlock"));
17
+
18
+ var _indexModule = _interopRequireDefault(require("./index.module.scss"));
19
+
20
+ 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); }
21
+
22
+ 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; }
23
+
24
+ /* eslint-disable eqeqeq */
25
+
26
+ /* eslint-disable jsx-a11y/alt-text */
27
+
28
+ /**
29
+ * 颜色选择
30
+ *
31
+ * @param props
32
+ * @return {*}
33
+ * @constructor
34
+ */
35
+ function ColorPanel(props) {
36
+ var _classnames2, _classnames3;
37
+
38
+ var value = props.value,
39
+ showClear = props.showClear,
40
+ dataSource = props.dataSource,
41
+ onChange = props.onChange,
42
+ onPickerFocus = props.onPickerFocus,
43
+ onPickerBlur = props.onPickerBlur;
44
+
45
+ var _useState = (0, _react.useState)(value),
46
+ data = _useState[0],
47
+ setData = _useState[1];
48
+
49
+ var _useState2 = (0, _react.useState)(),
50
+ active = _useState2[0],
51
+ setActive = _useState2[1];
52
+
53
+ var colorChange = function colorChange(value, type, key) {
54
+ setActive(key);
55
+ onChange(value, type);
56
+ };
57
+
58
+ var changClick = function changClick(key) {
59
+ setActive(key);
60
+ };
61
+
62
+ var setColors = function setColors() {
63
+ // eslint-disable-next-line array-callback-return
64
+ return dataSource.map(function (item, index) {
65
+ // eslint-disable-next-line eqeqeq
66
+ if (showClear && index != 1 || !showClear) {
67
+ var _classnames;
68
+
69
+ // eslint-disable-next-line eqeqeq
70
+ return /*#__PURE__*/_react["default"].createElement("li", {
71
+ key: index,
72
+ className: (0, _classnames4["default"])(_indexModule["default"].li, (_classnames = {}, _classnames[_indexModule["default"].marginTop] = index == 6 || index == 12, _classnames[_indexModule["default"].active] = index == active, _classnames))
73
+ }, /*#__PURE__*/_react["default"].createElement("div", {
74
+ className: _indexModule["default"].liBox
75
+ }, /*#__PURE__*/_react["default"].createElement(_ColorBlock["default"], {
76
+ color: item,
77
+ onChange: colorChange,
78
+ index: index
79
+ })));
80
+ }
81
+ });
82
+ };
83
+
84
+ var handleChange = function handleChange(color) {
85
+ var prevValue = color.hex;
86
+ var rgb = color.rgb;
87
+ var rgba = "rgba(" + rgb.r + "," + rgb.g + "," + rgb.b + "," + rgb.a + ")";
88
+
89
+ if (data !== prevValue) {
90
+ setData(rgba);
91
+ onChange(rgba, 'change');
92
+ }
93
+ };
94
+
95
+ var defaultTrigger = /*#__PURE__*/_react["default"].createElement("div", {
96
+ className: _indexModule["default"].swatch,
97
+ style: {
98
+ background: value
99
+ }
100
+ }, /*#__PURE__*/_react["default"].createElement("img", {
101
+ src: "/img/topo/editor/toolbar/\u6587\u5B57\u989C\u8272\u53CA\u586B\u5145/\u66F4\u591A\u989C\u8272.svg",
102
+ alt: ""
103
+ }));
104
+
105
+ return /*#__PURE__*/_react["default"].createElement("div", {
106
+ className: _indexModule["default"].content
107
+ }, /*#__PURE__*/_react["default"].createElement("ul", {
108
+ className: _indexModule["default"].ul
109
+ }, showClear && /*#__PURE__*/_react["default"].createElement("li", {
110
+ className: (0, _classnames4["default"])(_indexModule["default"].li, (_classnames2 = {}, _classnames2[_indexModule["default"].active] = active == '-1', _classnames2))
111
+ }, /*#__PURE__*/_react["default"].createElement("div", {
112
+ className: _indexModule["default"].liBox
113
+ }, /*#__PURE__*/_react["default"].createElement("div", {
114
+ className: _indexModule["default"].swatch,
115
+ onClick: function onClick() {
116
+ colorChange('noColor', 'select', '-1');
117
+ }
118
+ }, /*#__PURE__*/_react["default"].createElement("img", {
119
+ src: "/img/topo/editor/toolbar/\u6587\u5B57\u989C\u8272\u53CA\u586B\u5145/\u80CC\u666F\u900F\u660E.svg",
120
+ alt: ""
121
+ })))), setColors(), /*#__PURE__*/_react["default"].createElement("li", {
122
+ className: (0, _classnames4["default"])(_indexModule["default"].li, (_classnames3 = {}, _classnames3[_indexModule["default"].active] = active == '17', _classnames3))
123
+ }, /*#__PURE__*/_react["default"].createElement("div", {
124
+ className: _indexModule["default"].liBox,
125
+ onClick: function onClick() {
126
+ changClick('17');
127
+ }
128
+ }, /*#__PURE__*/_react["default"].createElement(_balloon["default"], {
129
+ trigger: defaultTrigger,
130
+ closable: false,
131
+ triggerType: "click",
132
+ animation: false,
133
+ followTrigger: true,
134
+ align: "rt",
135
+ alignEdge: true,
136
+ style: {
137
+ paddingBottom: 0
138
+ },
139
+ onBlur: onPickerBlur,
140
+ onFocus: onPickerFocus
141
+ }, /*#__PURE__*/_react["default"].createElement(_reactColor.SketchPicker, {
142
+ color: data // width={230}
143
+ ,
144
+ disableAlpha: true,
145
+ styles: {
146
+ 'default': {
147
+ picker: {
148
+ boxShadow: 'none',
149
+ padding: 0
150
+ }
151
+ }
152
+ },
153
+ onChange: handleChange
154
+ }))))));
155
+ }
156
+
157
+ ColorPanel.defaultProps = {
158
+ value: undefined,
159
+ showClear: false,
160
+ dataSource: [{
161
+ color: 'rgba(255, 255, 255, 1)',
162
+ borderColor: 'rgba(219, 219, 219, 1)'
163
+ }, {
164
+ color: 'rgba(245, 245, 245, 1)',
165
+ borderColor: 'rgba(208, 208, 208, 1)'
166
+ }, {
167
+ color: 'rgba(230, 230, 230, 1)',
168
+ borderColor: 'rgba(196, 196, 196, 1)'
169
+ }, {
170
+ color: 'rgba(168, 168, 168, 1)',
171
+ borderColor: 'rgba(146, 146, 146, 1)'
172
+ }, {
173
+ color: 'rgba(97, 97, 97, 1)',
174
+ borderColor: 'rgba(85, 85, 85, 1)'
175
+ }, {
176
+ color: 'rgba(49, 49, 49, 1)',
177
+ borderColor: 'rgba(43, 43, 43, 1)'
178
+ }, {
179
+ color: 'rgba(251, 115, 80, 1)',
180
+ borderColor: 'rgba(213, 98, 69, 1)'
181
+ }, {
182
+ color: 'rgba(255, 166, 41, 1)',
183
+ borderColor: 'rgba(219, 144, 45, 1)'
184
+ }, {
185
+ color: 'rgba(255, 205, 42, 1)',
186
+ borderColor: 'rgba(216, 175, 37, 1)'
187
+ }, {
188
+ color: 'rgba(18, 174, 92, 1)',
189
+ borderColor: 'rgba(23, 148, 79, 1)'
190
+ }, {
191
+ color: 'rgba(83, 184, 255, 1)',
192
+ borderColor: 'rgba(74, 156, 217, 1)'
193
+ }, {
194
+ color: 'rgba(183, 128, 255, 1)',
195
+ borderColor: 'rgba(155, 109, 216, 1)'
196
+ }, {
197
+ color: 'rgba(254, 192, 174, 1)',
198
+ borderColor: 'rgba(217, 163, 148, 1)'
199
+ }, {
200
+ color: 'rgba(252, 209, 156, 1)',
201
+ borderColor: 'rgba(215, 178, 133, 1)'
202
+ }, {
203
+ color: 'rgba(255, 232, 163, 1)',
204
+ borderColor: 'rgba(217, 198, 139, 1)'
205
+ }, {
206
+ color: 'rgba(176, 244, 197, 1)',
207
+ borderColor: 'rgba(153, 209, 171, 1)'
208
+ }, {
209
+ color: 'rgba(189, 227, 255, 1)',
210
+ borderColor: 'rgba(161, 193, 217, 1)'
211
+ }],
212
+ onChange: function onChange() {},
213
+ onPickerFocus: function onPickerFocus() {},
214
+ onPickerBlur: function onPickerBlur() {}
215
+ };
216
+ var _default = ColorPanel;
217
+ exports["default"] = _default;
@@ -0,0 +1,37 @@
1
+ @import '~@alifd/next/variables.scss';
2
+
3
+ .content{
4
+ padding: 9px;
5
+ padding-top: 8px;
6
+ width: 226px;
7
+ .ul{
8
+ width: 100%;
9
+ margin-left: 6px;
10
+ .li{
11
+ display: inline-block;
12
+ width: 34.6px;
13
+ line-height: 40px;
14
+ .liBox{
15
+ width: 31px;
16
+ height: 31px;
17
+ border-radius: 50%;
18
+ padding: 1px;
19
+ border: 2px solid #fff;
20
+ }
21
+ }
22
+ .li.active{
23
+ .liBox{
24
+ border-color: #4C89FF;
25
+ }
26
+ }
27
+ .marginTop{
28
+ margin-top: 6px;
29
+ }
30
+ }
31
+ }
32
+ .swatch{
33
+ width: 25px;
34
+ height: 25px;
35
+ border-radius: 50%;
36
+ overflow: hidden;
37
+ }
@@ -11,7 +11,7 @@
11
11
  width: 60px;
12
12
  height: 100%;
13
13
  padding-top: 4px;
14
- // border-right: 1px solid #E6E7EB;
14
+ border-right: 1px solid var(--tab-wrapped-border-line-color);
15
15
  background: none !important;
16
16
 
17
17
  :global {
@@ -37,6 +37,10 @@
37
37
  &:hover {
38
38
  background-color: rgba(76, 137, 255, 0.1);
39
39
  }
40
+
41
+ .tab-title {
42
+ margin-top: 3px;
43
+ }
40
44
  }
41
45
  }
42
46
  }
@@ -45,8 +49,9 @@
45
49
  .content {
46
50
  width: 260px;
47
51
  height: 100%;
48
- transition: all .1s linear;
52
+ border-left: none !important;
49
53
  border-right: 1px solid var(--tab-wrapped-border-line-color);
54
+ transition: width .1s linear;
50
55
 
51
56
  :global {
52
57
  .#{$css-prefix}tabs-tabpane {
@@ -26,8 +26,19 @@
26
26
 
27
27
  .#{$css-prefix}collapse-panel-content,
28
28
  .#{$css-prefix}collapse-panel-expanded>.#{$css-prefix}collapse-panel-content {
29
- padding-left: 32px;
29
+ // padding-left: 32px;
30
30
  padding-top: 8px;
31
31
  }
32
32
  }
33
+
34
+ &.contentNoPadding {
35
+
36
+ :global {
37
+
38
+ .#{$css-prefix}collapse-panel-content,
39
+ .#{$css-prefix}collapse-panel-expanded>.#{$css-prefix}collapse-panel-content {
40
+ padding: 8px 0;
41
+ }
42
+ }
43
+ }
33
44
  }
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+
3
+ exports.__esModule = true;
4
+ exports["default"] = useHtElements;
5
+
6
+ var _react = require("react");
7
+
8
+ function useHtElements(props) {
9
+ var topo = props.topo,
10
+ ids = props.ids;
11
+
12
+ var _useState = (0, _react.useState)(ids),
13
+ idList = _useState[0],
14
+ setIdList = _useState[1];
15
+
16
+ (0, _react.useEffect)(function () {
17
+ if (ids.join(',') !== idList.join(',')) {
18
+ setIdList(ids);
19
+ }
20
+ }, [ids, idList]);
21
+ var elements = (0, _react.useMemo)(function () {
22
+ return idList.map(function (id) {
23
+ return topo.getDataModel().getDataById(id);
24
+ });
25
+ }, [topo, idList]);
26
+ return elements;
27
+ }
@@ -17,8 +17,11 @@ function useCustomIcons(topo) {
17
17
  function useNodeIcons(topo) {
18
18
  var customIcons = useCustomIcons(topo);
19
19
  var groups = [{
20
- name: '默认',
20
+ name: '资源图片',
21
21
  icons: (0, _icon.getNodeDefaultIcons)(topo)
22
+ }, {
23
+ name: '基础图片',
24
+ icons: []
22
25
  }];
23
26
 
24
27
  if (customIcons.length) {
@@ -34,6 +37,9 @@ function useNodeIcons(topo) {
34
37
  function useGroupIcons(topo) {
35
38
  var customIcons = useCustomIcons(topo);
36
39
  var groups = [{
40
+ name: '资源图片',
41
+ icons: []
42
+ }, {
37
43
  name: '默认',
38
44
  icons: (0, _icon.getGroupDefaultIcons)(topo)
39
45
  }];
@@ -29,19 +29,17 @@ 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
+ topo.getHtTopo().getGraphView().setZoom(1.5);
36
+ };
32
37
 
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
- }
38
+ var getNodeParents = function getNodeParents(node) {
39
+ if (node.getParent() && node.getParent().isExpanded && !node.getParent().isExpanded()) {
40
+ return getNodeParents(node.getParent());
42
41
  } else {
43
- topo.getHtTopo().getGraphView().fitData(node, true, 20, true);
44
- topo.getHtTopo().getGraphView().dm().getSelectionModel().setSelection(node);
42
+ return node;
45
43
  }
46
44
  };
47
45
 
@@ -57,7 +55,9 @@ function AlarmListItem(props) {
57
55
  size: "xs",
58
56
  className: _indexModule["default"]['alarm-color-icon'] + " alarm-color-icon-lv" + alarmInfo.alertLevel
59
57
  })
60
- }, /*#__PURE__*/_react["default"].createElement("span", null, /*#__PURE__*/_react["default"].createElement("div", {
58
+ }, /*#__PURE__*/_react["default"].createElement("span", {
59
+ className: _indexModule["default"].content
60
+ }, /*#__PURE__*/_react["default"].createElement("div", {
61
61
  className: _indexModule["default"].list,
62
62
  onClick: function onClick() {
63
63
  getNode(topo, alarmInfo);
@@ -87,7 +87,9 @@ function RiskListItem(props) {
87
87
  size: "xs",
88
88
  className: _indexModule["default"]['alarm-color-icon'] + " alarm-color-icon-lv2"
89
89
  })
90
- }, /*#__PURE__*/_react["default"].createElement("span", null, /*#__PURE__*/_react["default"].createElement("div", {
90
+ }, /*#__PURE__*/_react["default"].createElement("span", {
91
+ className: _indexModule["default"].content
92
+ }, /*#__PURE__*/_react["default"].createElement("div", {
91
93
  className: _indexModule["default"].list,
92
94
  onClick: function onClick() {
93
95
  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 () {
@@ -84,6 +88,7 @@ function DisplaySettingDrawer(props) {
84
88
  };
85
89
  }();
86
90
 
91
+ var DisplaySettingWidget = isEditor ? _EditorDisplaySetting["default"] : _DisplaySetting["default"];
87
92
  return /*#__PURE__*/_react["default"].createElement(_Drawer["default"], {
88
93
  title: "\u663E\u793A\u8BBE\u7F6E",
89
94
  visible: visible,
@@ -95,7 +100,7 @@ function DisplaySettingDrawer(props) {
95
100
 
96
101
  },
97
102
  buttons: ['保存', '取消']
98
- }, visible && /*#__PURE__*/_react["default"].createElement(_DisplaySetting["default"], {
103
+ }, visible && /*#__PURE__*/_react["default"].createElement(DisplaySettingWidget, {
99
104
  ref: settingRef,
100
105
  topo: topo,
101
106
  displaySettingProps: displaySettingProps