@riil-frontend/component-topology 6.0.0-alpha.4 → 6.0.0-alpha.41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/1.js +2 -2
- package/build/2.js +1 -1
- package/build/index.css +1 -1
- package/build/index.js +35 -35
- package/es/components/ColorPanel/components/ColorBlock/index.js +37 -0
- package/es/components/ColorPanel/components/ColorBlock/index.module.scss +9 -0
- package/es/components/ColorPanel/components/FontColorRange/index.js +35 -0
- package/es/components/ColorPanel/components/FontColorRange/index.module.scss +25 -0
- package/es/components/ColorPanel/index.js +237 -0
- package/es/components/ColorPanel/index.module.scss +35 -0
- package/es/components/VerticalIconTab/VerticalIconTab.module.scss +5 -1
- package/es/components/collapse/Collapse.js +22 -3
- package/es/components/collapse/Collapse.module.scss +24 -0
- package/es/components/collapse/index.js +2 -0
- package/es/core/common/hooks/useHtElements.js +21 -0
- package/es/core/common/icons/icon.js +41 -0
- package/es/core/common/icons/useIcons.js +8 -16
- package/es/core/components/AlarmListPanel/components/AlarmListItem.js +14 -13
- package/es/core/components/AlarmListPanel/components/index.module.scss +5 -5
- package/es/core/components/DisplaySettingDrawer/DisplaySetting.js +2 -1
- package/es/core/components/DisplaySettingDrawer/DisplaySettingDrawer.js +9 -3
- package/es/core/components/DisplaySettingDrawer/EditorDisplaySetting.js +122 -0
- package/es/core/components/DisplaySettingDrawer/LineExpandAllRadioGroup.js +0 -3
- package/es/core/components/DisplaySettingDrawer/hooks/useDisplaySetting.js +76 -19
- package/es/core/components/TopoView/GraphViewPanel.js +21 -0
- package/es/core/components/TopoView/editor.module.scss +1 -0
- package/es/core/components/TopoView/topoView.js +29 -49
- package/es/core/components/titlebar/TitleBar.module.scss +1 -1
- package/es/core/editor/components/EditorPlugin.js +2 -1
- package/es/core/editor/components/Sidebar/Sidebar.js +41 -50
- package/es/core/editor/components/Sidebar/panes.js +32 -0
- package/es/core/editor/components/Sidebar/views/CanvasPanel/CanvasPanel.js +38 -0
- package/es/core/editor/components/Sidebar/views/CanvasPanel/CanvasPanel.module.scss +74 -0
- package/es/core/editor/components/Sidebar/views/CanvasPanel/index.js +1 -1
- package/es/core/editor/components/Sidebar/views/CanvasPanel/themes.js +63 -0
- package/es/core/editor/components/Sidebar/views/CanvasPanel/useCanvasThemeConfig.js +115 -0
- package/es/core/editor/components/Sidebar/views/ImagePanel/CiTypeImagePanel.js +3 -3
- package/es/core/editor/components/Sidebar/views/ImagePanel/HtCustomImagePanel.js +14 -6
- package/es/core/editor/components/Sidebar/views/ImagePanel/HtImagePalette.js +14 -5
- package/es/core/editor/components/Sidebar/views/ImagePanel/HtImagePalette.module.scss +5 -0
- package/es/core/editor/components/Sidebar/views/ImagePanel/ImagePanel.js +20 -7
- package/es/core/editor/components/Toolbar/EditorToolbar.js +23 -13
- package/es/core/editor/components/Toolbar/Toolbar.js +1 -1
- package/es/core/editor/components/Toolbar/Toolbar.module.scss +14 -3
- package/es/core/editor/components/Toolbar/buttons.js +20 -18
- package/es/core/editor/components/Toolbar/widgets/AddResourceButton.js +8 -7
- package/es/core/editor/components/Toolbar/widgets/BoxBackgroundButton/BoxBackgroundButton.js +2 -2
- package/es/core/editor/components/Toolbar/widgets/CanvasMoveWidget.js +13 -2
- package/es/core/editor/components/Toolbar/widgets/CanvasSelectWidget.js +11 -2
- package/es/core/editor/components/Toolbar/widgets/EdgeColorButton/Content.js +46 -2
- package/es/core/editor/components/Toolbar/widgets/EdgeColorButton/EdgeColorButton.js +98 -6
- package/es/core/editor/components/Toolbar/widgets/EdgeTypeButton/EdgeType.js +184 -3
- package/es/core/editor/components/Toolbar/widgets/EdgeTypeButton/EdgeType.module.scss +44 -0
- package/es/core/editor/components/Toolbar/widgets/EdgeTypeButton/LineType.js +53 -0
- package/es/core/editor/components/Toolbar/widgets/EdgeTypeButton/LineType.module.scss +31 -0
- package/es/core/editor/components/Toolbar/widgets/EdgeTypeButton/constants.js +77 -0
- package/es/core/editor/components/Toolbar/widgets/EdgeTypeButton/index.js +74 -6
- package/es/core/editor/components/Toolbar/widgets/FontColorButton.js +70 -16
- package/es/core/editor/components/Toolbar/widgets/FontColorButton.module.scss +43 -0
- package/es/core/editor/components/Toolbar/widgets/FontFamilyWidget.js +25 -11
- package/es/core/editor/components/Toolbar/widgets/FontSizeWidget.js +29 -13
- package/es/core/editor/components/Toolbar/widgets/FontStyleButton.js +100 -39
- package/es/core/editor/components/Toolbar/widgets/HistoryRedoButton.js +3 -2
- package/es/core/editor/components/Toolbar/widgets/HistoryUndoButton.js +5 -4
- package/es/core/editor/components/Toolbar/widgets/IconSelect/IconSelect.js +109 -0
- package/es/core/editor/components/Toolbar/widgets/IconSelect/constant.js +64 -0
- package/es/core/editor/components/Toolbar/widgets/IconSelect/index.js +101 -0
- package/es/core/editor/components/Toolbar/widgets/IconSelect/index.module.scss +153 -0
- package/es/core/editor/components/Toolbar/widgets/IconSelect/popUpContent.js +49 -0
- package/es/core/editor/components/Toolbar/widgets/Layout/components/LayoutSettings.js +99 -0
- package/es/core/editor/components/Toolbar/widgets/Layout/components/LayoutSettings.module.scss +70 -0
- package/es/core/editor/components/Toolbar/widgets/Layout/components/LayoutTagImageSelect/index.js +42 -0
- package/es/core/editor/components/Toolbar/widgets/Layout/components/LayoutTagImageSelect/index.module.scss +7 -0
- package/es/core/editor/components/Toolbar/widgets/Layout/components/LayoutTagSelect/index.js +75 -0
- package/es/core/editor/components/Toolbar/widgets/Layout/components/LayoutTagSelect/index.scss +32 -0
- package/es/core/editor/components/Toolbar/widgets/Layout/components/LayoutTemplateButton/Icon.js +23 -0
- package/es/core/editor/components/Toolbar/widgets/Layout/components/LayoutTemplateButton/assets/index.js +10 -0
- package/es/core/editor/components/Toolbar/widgets/Layout/components/LayoutTemplateButton/assets/topo_layout_circular.svg +10 -0
- package/es/core/editor/components/Toolbar/widgets/Layout/components/LayoutTemplateButton/assets/topo_layout_hierarchical.svg +10 -0
- package/es/core/editor/components/Toolbar/widgets/Layout/components/LayoutTemplateButton/assets/topo_layout_rectangle.svg +12 -0
- package/es/core/editor/components/Toolbar/widgets/Layout/components/LayoutTemplateButton/assets/topo_layout_toward.svg +16 -0
- package/es/core/editor/components/Toolbar/widgets/Layout/components/LayoutTemplateButton/index.js +31 -0
- package/es/core/editor/components/Toolbar/widgets/Layout/components/LayoutTemplateButton/index.module.scss +53 -0
- package/es/core/editor/components/Toolbar/widgets/Layout/index.js +128 -15
- package/es/core/editor/components/Toolbar/widgets/NodeAlignWidget.js +95 -23
- package/es/core/editor/components/Toolbar/widgets/NodeAlignWidget.module.scss +33 -0
- package/es/core/editor/components/Toolbar/widgets/NodeImageButton/BoxBackgroundSetting.js +15 -5
- package/es/core/editor/components/Toolbar/widgets/NodeImageButton/NodeImageButton.js +41 -7
- package/es/core/editor/components/Toolbar/widgets/NodeSizeButton/NodeSizeButton.js +98 -13
- package/es/core/editor/components/Toolbar/widgets/NodeSizeButton/NodeSizeButton.module.scss +28 -0
- package/es/core/editor/components/Toolbar/widgets/WidgetBox.js +15 -22
- package/es/core/editor/components/Toolbar/widgets/WidgetBox.module.scss +11 -1
- package/es/core/editor/components/Toolbar/widgets/components/ButtonBox.js +5 -3
- package/es/core/editor/components/Toolbar/widgets/components/ButtonBox.module.scss +3 -0
- package/es/core/editor/components/Toolbar/widgets/components/DropdownButton.js +21 -3
- package/es/core/editor/components/Toolbar/widgets/components/DropdownMenu.js +16 -6
- package/es/core/editor/components/Toolbar/widgets/components/textStyleSetting/ElementTextStyleSetting/ElementTextStyleSetting.js +49 -0
- package/es/core/editor/components/Toolbar/widgets/components/textStyleSetting/ElementTextStyleSetting/colorUtil.js +59 -0
- package/es/core/editor/components/Toolbar/widgets/components/textStyleSetting/ElementTextStyleSetting/elements/box.js +30 -0
- package/es/core/editor/components/Toolbar/widgets/components/textStyleSetting/ElementTextStyleSetting/elements/edgeTag.js +25 -0
- package/es/core/editor/components/Toolbar/widgets/components/textStyleSetting/ElementTextStyleSetting/elements/groupTitle.js +41 -0
- package/es/core/editor/components/Toolbar/widgets/components/textStyleSetting/ElementTextStyleSetting/elements/index.js +14 -0
- package/es/core/editor/components/Toolbar/widgets/components/textStyleSetting/ElementTextStyleSetting/elements/layerTitle.js +49 -0
- package/es/core/editor/components/Toolbar/widgets/components/textStyleSetting/ElementTextStyleSetting/elements/nodeTag.js +36 -0
- package/es/core/editor/components/Toolbar/widgets/components/textStyleSetting/ElementTextStyleSetting/elements/text.js +32 -0
- package/es/core/editor/components/Toolbar/widgets/components/textStyleSetting/ElementTextStyleSetting/textStyleUtil.js +71 -0
- package/es/core/editor/components/Toolbar/widgets/components/textStyleSetting/GlobalTagStyleSetting/GlobalTagStyleSetting.js +25 -0
- package/es/core/editor/components/Toolbar/widgets/components/textStyleSetting/GlobalTagStyleSetting/globalTag.js +52 -0
- package/es/core/editor/components/Toolbar/widgets/components/textStyleSetting/textStyleSettingRouter.js +20 -0
- package/es/core/editor/components/settings/CloseablePanel.js +33 -0
- package/es/core/editor/components/settings/CloseablePanel.module.scss +9 -0
- package/es/core/editor/components/settings/OpenPropertyPanelListener.js +33 -0
- package/es/core/editor/components/settings/PropertyView.js +29 -8
- package/es/core/editor/components/settings/Settings.js +4 -44
- package/es/core/editor/components/settings/Settings.module.scss +8 -4
- package/es/core/editor/components/settings/common/AlignSetting/AlignSetting.module.scss +2 -2
- package/es/core/editor/components/settings/common/AlignSetting/AlignTypeList.js +80 -0
- package/es/core/editor/components/settings/common/AlignSetting/index.js +20 -72
- package/es/core/editor/components/settings/common/LineType/index.js +12 -119
- package/es/core/editor/components/settings/common/NodeSizeInput/NodeSizeInput.js +3 -3
- package/es/core/editor/components/settings/common/SizeInput/NodeSizeInput.js +31 -21
- package/es/core/editor/components/settings/common/SizeInput/NodeSizeNumberPicker.js +7 -6
- package/es/core/editor/components/settings/common/text/fontStyleUtil.js +11 -19
- package/es/core/editor/components/settings/propertyViews/edge/CommonEdgePropertyView.js +7 -1
- package/es/core/editor/components/settings/propertyViews/group/SettingTab/GroupExpandSetting.js +0 -8
- package/es/core/editor/components/settings/propertyViews/multipleElements/BatchSetNodeSize/BatchSetNodeSize.js +8 -9
- package/es/core/editor/components/settings/propertyViews/multipleElements/MultipleElementLineType.js +5 -42
- package/es/core/editor/components/settings/propertyViews/multipleElements/MultipleElementPropertyView.js +2 -15
- package/es/core/editor/components/settings/propertyViews/text/TextPropertyView.js +1 -1
- package/es/core/editor/components/settings/propertyViews/view/BatchSetNodeSize.js +9 -6
- package/es/core/editor/components/titlebar/TopoEditorTitleBar.js +8 -4
- package/es/core/editor/hooks/useKeyboardShortcut.js +42 -0
- package/es/core/{store/models → editor/store}/background.js +0 -0
- package/es/core/{store/models → editor/store}/historyManager.js +0 -0
- package/es/core/editor/store/topoEdit.js +49 -0
- package/es/core/editor/utils/edgeTypeStyleUtil.js +96 -0
- package/es/core/editor/utils/textStyleUtil.js +0 -0
- package/es/core/hooks/useCanvasTheme.js +61 -0
- package/es/core/hooks/usePolling.js +2 -5
- package/es/core/hooks/useTopoEdit.js +38 -58
- package/es/core/models/Alarm.js +2 -2
- package/es/core/models/AttributeMetricDisplay.js +4 -0
- package/es/core/models/HistoryManager.js +11 -3
- package/es/core/models/SelectionManager.js +28 -9
- package/es/core/models/TopoApp.js +1 -1
- package/es/core/models/TopoGraphView.js +8 -2
- package/es/core/models/selection/ignoreList.js +1 -0
- package/es/core/models/utils/linkUtils.js +5 -6
- package/es/core/store/coreModels.js +6 -7
- package/es/core/store/models/selection.js +2 -1
- package/es/core/store/models/topoBizMod.js +0 -3
- package/es/core/store/models/topoConfig.js +10 -12
- package/es/core/store/models/topoMod.js +26 -28
- package/es/core/utils/edgeUtil.js +6 -0
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/hooks/useMetricPolling.js +3 -4
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/services/index.js +19 -5
- package/es/core/viewer/components/plugins/ResourceDetail/components/WebConsole/WebConsoleForm/WebConsoleForm.js +13 -29
- package/es/core/viewer/components/plugins/ResourceDetail/components/WebConsole/WebConsoleForm/hooks/useWebConsole.js +6 -5
- package/es/core/viewer/components/titlebar/widgets/SettingButton.js +3 -1
- package/es/core/viewer/components/titlebar/widgets/SettingButtonWidget.js +4 -2
- package/es/networkTopo/createTopo.js +2 -0
- package/es/networkTopo/services/link.js +2 -2
- package/es/networkTopo/store/topoTreeMod.js +6 -7
- package/es/style.js +1 -0
- package/es/utils/htElementUtils.js +3 -0
- package/es/utils/topoData.js +1 -0
- package/lib/components/ColorPanel/components/ColorBlock/index.js +47 -0
- package/lib/components/ColorPanel/components/ColorBlock/index.module.scss +9 -0
- package/lib/components/ColorPanel/components/FontColorRange/index.js +49 -0
- package/lib/components/ColorPanel/components/FontColorRange/index.module.scss +25 -0
- package/lib/components/ColorPanel/index.js +255 -0
- package/lib/components/ColorPanel/index.module.scss +35 -0
- package/lib/components/VerticalIconTab/VerticalIconTab.module.scss +5 -1
- package/lib/components/collapse/Collapse.js +28 -3
- package/lib/components/collapse/Collapse.module.scss +24 -0
- package/lib/components/collapse/index.js +11 -0
- package/lib/core/common/hooks/useHtElements.js +27 -0
- package/lib/core/common/icons/icon.js +48 -0
- package/lib/core/common/icons/useIcons.js +10 -15
- package/lib/core/components/AlarmListPanel/components/AlarmListItem.js +14 -13
- package/lib/core/components/AlarmListPanel/components/index.module.scss +5 -5
- package/lib/core/components/DisplaySettingDrawer/DisplaySetting.js +2 -1
- package/lib/core/components/DisplaySettingDrawer/DisplaySettingDrawer.js +10 -3
- package/lib/core/components/DisplaySettingDrawer/EditorDisplaySetting.js +147 -0
- package/lib/core/components/DisplaySettingDrawer/LineExpandAllRadioGroup.js +0 -3
- package/lib/core/components/DisplaySettingDrawer/hooks/useDisplaySetting.js +76 -19
- package/lib/core/components/TopoView/GraphViewPanel.js +31 -0
- package/lib/core/components/TopoView/editor.module.scss +1 -0
- package/lib/core/components/TopoView/topoView.js +32 -50
- package/lib/core/components/titlebar/TitleBar.module.scss +1 -1
- package/lib/core/editor/components/EditorPlugin.js +3 -1
- package/lib/core/editor/components/Sidebar/Sidebar.js +40 -53
- package/lib/core/editor/components/Sidebar/panes.js +45 -0
- package/lib/core/editor/components/Sidebar/views/CanvasPanel/CanvasPanel.js +53 -0
- package/lib/core/editor/components/Sidebar/views/CanvasPanel/CanvasPanel.module.scss +74 -0
- package/lib/core/editor/components/Sidebar/views/CanvasPanel/index.js +2 -2
- package/lib/core/editor/components/Sidebar/views/CanvasPanel/themes.js +72 -0
- package/lib/core/editor/components/Sidebar/views/CanvasPanel/useCanvasThemeConfig.js +128 -0
- package/lib/core/editor/components/Sidebar/views/ImagePanel/CiTypeImagePanel.js +1 -1
- package/lib/core/editor/components/Sidebar/views/ImagePanel/HtCustomImagePanel.js +15 -6
- package/lib/core/editor/components/Sidebar/views/ImagePanel/HtImagePalette.js +16 -5
- package/lib/core/editor/components/Sidebar/views/ImagePanel/HtImagePalette.module.scss +5 -0
- package/lib/core/editor/components/Sidebar/views/ImagePanel/ImagePanel.js +29 -11
- package/lib/core/editor/components/Toolbar/EditorToolbar.js +22 -11
- package/lib/core/editor/components/Toolbar/Toolbar.js +1 -1
- package/lib/core/editor/components/Toolbar/Toolbar.module.scss +14 -3
- package/lib/core/editor/components/Toolbar/buttons.js +21 -20
- package/lib/core/editor/components/Toolbar/widgets/AddResourceButton.js +8 -7
- package/lib/core/editor/components/Toolbar/widgets/BoxBackgroundButton/BoxBackgroundButton.js +2 -2
- package/lib/core/editor/components/Toolbar/widgets/CanvasMoveWidget.js +13 -2
- package/lib/core/editor/components/Toolbar/widgets/CanvasSelectWidget.js +11 -2
- package/lib/core/editor/components/Toolbar/widgets/EdgeColorButton/Content.js +48 -2
- package/lib/core/editor/components/Toolbar/widgets/EdgeColorButton/EdgeColorButton.js +100 -6
- package/lib/core/editor/components/Toolbar/widgets/EdgeTypeButton/EdgeType.js +194 -3
- package/lib/core/editor/components/Toolbar/widgets/EdgeTypeButton/EdgeType.module.scss +44 -0
- package/lib/core/editor/components/Toolbar/widgets/EdgeTypeButton/LineType.js +71 -0
- package/lib/core/editor/components/Toolbar/widgets/EdgeTypeButton/LineType.module.scss +31 -0
- package/lib/core/editor/components/Toolbar/widgets/EdgeTypeButton/constants.js +83 -0
- package/lib/core/editor/components/Toolbar/widgets/EdgeTypeButton/index.js +76 -5
- package/lib/core/editor/components/Toolbar/widgets/FontColorButton.js +75 -16
- package/lib/core/editor/components/Toolbar/widgets/FontColorButton.module.scss +43 -0
- package/lib/core/editor/components/Toolbar/widgets/FontFamilyWidget.js +26 -10
- package/lib/core/editor/components/Toolbar/widgets/FontSizeWidget.js +30 -12
- package/lib/core/editor/components/Toolbar/widgets/FontStyleButton.js +105 -39
- package/lib/core/editor/components/Toolbar/widgets/HistoryRedoButton.js +4 -2
- package/lib/core/editor/components/Toolbar/widgets/HistoryUndoButton.js +5 -3
- package/lib/core/editor/components/Toolbar/widgets/IconSelect/IconSelect.js +126 -0
- package/lib/core/editor/components/Toolbar/widgets/IconSelect/constant.js +69 -0
- package/lib/core/editor/components/Toolbar/widgets/IconSelect/index.js +117 -0
- package/lib/core/editor/components/Toolbar/widgets/IconSelect/index.module.scss +153 -0
- package/lib/core/editor/components/Toolbar/widgets/IconSelect/popUpContent.js +61 -0
- package/lib/core/editor/components/Toolbar/widgets/Layout/components/LayoutSettings.js +116 -0
- package/lib/core/editor/components/Toolbar/widgets/Layout/components/LayoutSettings.module.scss +70 -0
- package/lib/core/editor/components/Toolbar/widgets/Layout/components/LayoutTagImageSelect/index.js +55 -0
- package/lib/core/editor/components/Toolbar/widgets/Layout/components/LayoutTagImageSelect/index.module.scss +7 -0
- package/lib/core/editor/components/Toolbar/widgets/Layout/components/LayoutTagSelect/index.js +93 -0
- package/lib/core/editor/components/Toolbar/widgets/Layout/components/LayoutTagSelect/index.scss +32 -0
- package/lib/core/editor/components/Toolbar/widgets/Layout/components/LayoutTemplateButton/Icon.js +32 -0
- package/lib/core/editor/components/Toolbar/widgets/Layout/components/LayoutTemplateButton/assets/index.js +22 -0
- package/lib/core/editor/components/Toolbar/widgets/Layout/components/LayoutTemplateButton/assets/topo_layout_circular.svg +10 -0
- package/lib/core/editor/components/Toolbar/widgets/Layout/components/LayoutTemplateButton/assets/topo_layout_hierarchical.svg +10 -0
- package/lib/core/editor/components/Toolbar/widgets/Layout/components/LayoutTemplateButton/assets/topo_layout_rectangle.svg +12 -0
- package/lib/core/editor/components/Toolbar/widgets/Layout/components/LayoutTemplateButton/assets/topo_layout_toward.svg +16 -0
- package/lib/core/editor/components/Toolbar/widgets/Layout/components/LayoutTemplateButton/index.js +44 -0
- package/lib/core/editor/components/Toolbar/widgets/Layout/components/LayoutTemplateButton/index.module.scss +53 -0
- package/lib/core/editor/components/Toolbar/widgets/Layout/index.js +133 -16
- package/lib/core/editor/components/Toolbar/widgets/NodeAlignWidget.js +98 -23
- package/lib/core/editor/components/Toolbar/widgets/NodeAlignWidget.module.scss +33 -0
- package/lib/core/editor/components/Toolbar/widgets/NodeImageButton/BoxBackgroundSetting.js +21 -5
- package/lib/core/editor/components/Toolbar/widgets/NodeImageButton/NodeImageButton.js +41 -6
- package/lib/core/editor/components/Toolbar/widgets/NodeSizeButton/NodeSizeButton.js +99 -12
- package/lib/core/editor/components/Toolbar/widgets/NodeSizeButton/NodeSizeButton.module.scss +28 -0
- package/lib/core/editor/components/Toolbar/widgets/WidgetBox.js +16 -22
- package/lib/core/editor/components/Toolbar/widgets/WidgetBox.module.scss +11 -1
- package/lib/core/editor/components/Toolbar/widgets/components/ButtonBox.js +5 -3
- package/lib/core/editor/components/Toolbar/widgets/components/ButtonBox.module.scss +3 -0
- package/lib/core/editor/components/Toolbar/widgets/components/DropdownButton.js +21 -3
- package/lib/core/editor/components/Toolbar/widgets/components/DropdownMenu.js +17 -6
- package/lib/core/editor/components/Toolbar/widgets/components/textStyleSetting/ElementTextStyleSetting/ElementTextStyleSetting.js +63 -0
- package/lib/core/editor/components/Toolbar/widgets/components/textStyleSetting/ElementTextStyleSetting/colorUtil.js +72 -0
- package/lib/core/editor/components/Toolbar/widgets/components/textStyleSetting/ElementTextStyleSetting/elements/box.js +45 -0
- package/lib/core/editor/components/Toolbar/widgets/components/textStyleSetting/ElementTextStyleSetting/elements/edgeTag.js +40 -0
- package/lib/core/editor/components/Toolbar/widgets/components/textStyleSetting/ElementTextStyleSetting/elements/groupTitle.js +57 -0
- package/lib/core/editor/components/Toolbar/widgets/components/textStyleSetting/ElementTextStyleSetting/elements/index.js +28 -0
- package/lib/core/editor/components/Toolbar/widgets/components/textStyleSetting/ElementTextStyleSetting/elements/layerTitle.js +64 -0
- package/lib/core/editor/components/Toolbar/widgets/components/textStyleSetting/ElementTextStyleSetting/elements/nodeTag.js +52 -0
- package/lib/core/editor/components/Toolbar/widgets/components/textStyleSetting/ElementTextStyleSetting/elements/text.js +47 -0
- package/lib/core/editor/components/Toolbar/widgets/components/textStyleSetting/ElementTextStyleSetting/textStyleUtil.js +83 -0
- package/lib/core/editor/components/Toolbar/widgets/components/textStyleSetting/GlobalTagStyleSetting/GlobalTagStyleSetting.js +39 -0
- package/lib/core/editor/components/Toolbar/widgets/components/textStyleSetting/GlobalTagStyleSetting/globalTag.js +65 -0
- package/lib/core/editor/components/Toolbar/widgets/components/textStyleSetting/textStyleSettingRouter.js +31 -0
- package/lib/core/editor/components/settings/CloseablePanel.js +46 -0
- package/lib/core/editor/components/settings/CloseablePanel.module.scss +9 -0
- package/lib/core/editor/components/settings/OpenPropertyPanelListener.js +43 -0
- package/lib/core/editor/components/settings/PropertyView.js +32 -8
- package/lib/core/editor/components/settings/Settings.js +4 -44
- package/lib/core/editor/components/settings/Settings.module.scss +8 -4
- package/lib/core/editor/components/settings/common/AlignSetting/AlignSetting.module.scss +2 -2
- package/lib/core/editor/components/settings/common/AlignSetting/AlignTypeList.js +97 -0
- package/lib/core/editor/components/settings/common/AlignSetting/index.js +21 -80
- package/lib/core/editor/components/settings/common/LineType/index.js +13 -126
- package/lib/core/editor/components/settings/common/NodeSizeInput/NodeSizeInput.js +2 -2
- package/lib/core/editor/components/settings/common/SizeInput/NodeSizeInput.js +32 -23
- package/lib/core/editor/components/settings/common/SizeInput/NodeSizeNumberPicker.js +6 -6
- package/lib/core/editor/components/settings/common/text/fontStyleUtil.js +12 -20
- package/lib/core/editor/components/settings/propertyViews/edge/CommonEdgePropertyView.js +7 -1
- package/lib/core/editor/components/settings/propertyViews/group/SettingTab/GroupExpandSetting.js +0 -8
- package/lib/core/editor/components/settings/propertyViews/multipleElements/BatchSetNodeSize/BatchSetNodeSize.js +6 -8
- package/lib/core/editor/components/settings/propertyViews/multipleElements/MultipleElementLineType.js +5 -42
- package/lib/core/editor/components/settings/propertyViews/multipleElements/MultipleElementPropertyView.js +2 -15
- package/lib/core/editor/components/settings/propertyViews/text/TextPropertyView.js +1 -1
- package/lib/core/editor/components/settings/propertyViews/view/BatchSetNodeSize.js +7 -5
- package/lib/core/editor/components/titlebar/TopoEditorTitleBar.js +9 -1
- package/lib/core/editor/hooks/useKeyboardShortcut.js +52 -0
- package/lib/core/{store/models → editor/store}/background.js +0 -0
- package/lib/core/{store/models → editor/store}/historyManager.js +0 -0
- package/lib/core/editor/store/topoEdit.js +59 -0
- package/lib/core/editor/utils/edgeTypeStyleUtil.js +109 -0
- package/lib/core/editor/utils/textStyleUtil.js +1 -0
- package/lib/core/hooks/useCanvasTheme.js +75 -0
- package/lib/core/hooks/usePolling.js +2 -5
- package/lib/core/hooks/useTopoEdit.js +39 -60
- package/lib/core/models/Alarm.js +2 -2
- package/lib/core/models/AttributeMetricDisplay.js +4 -0
- package/lib/core/models/HistoryManager.js +11 -3
- package/lib/core/models/SelectionManager.js +30 -9
- package/lib/core/models/TopoApp.js +1 -1
- package/lib/core/models/TopoGraphView.js +8 -2
- package/lib/core/models/selection/ignoreList.js +6 -0
- package/lib/core/models/utils/linkUtils.js +5 -6
- package/lib/core/store/coreModels.js +5 -7
- package/lib/core/store/models/selection.js +2 -1
- package/lib/core/store/models/topoBizMod.js +0 -3
- package/lib/core/store/models/topoConfig.js +9 -18
- package/lib/core/store/models/topoMod.js +27 -29
- package/lib/core/utils/edgeUtil.js +6 -0
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/hooks/useMetricPolling.js +3 -4
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/services/index.js +19 -5
- package/lib/core/viewer/components/plugins/ResourceDetail/components/WebConsole/WebConsoleForm/WebConsoleForm.js +13 -29
- package/lib/core/viewer/components/plugins/ResourceDetail/components/WebConsole/WebConsoleForm/hooks/useWebConsole.js +6 -5
- package/lib/core/viewer/components/titlebar/widgets/SettingButton.js +3 -1
- package/lib/core/viewer/components/titlebar/widgets/SettingButtonWidget.js +4 -2
- package/lib/networkTopo/createTopo.js +3 -0
- package/lib/networkTopo/services/link.js +2 -2
- package/lib/networkTopo/store/topoTreeMod.js +6 -8
- package/lib/style.js +1 -0
- package/lib/utils/htElementUtils.js +5 -0
- package/lib/utils/topoData.js +1 -0
- package/package.json +5 -4
- package/es/core/editor/components/Sidebar/views/CanvasPanel/ImagePanel.js +0 -4
- package/es/core/store/models/topoEdit.js +0 -39
- package/es/core/store/models/topoView.js +0 -36
- package/lib/core/editor/components/Sidebar/views/CanvasPanel/ImagePanel.js +0 -12
- package/lib/core/store/models/topoEdit.js +0 -51
- package/lib/core/store/models/topoView.js +0 -47
@@ -3,137 +3,24 @@
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
4
4
|
|
5
5
|
exports.__esModule = true;
|
6
|
-
exports["default"] =
|
6
|
+
exports["default"] = LineTypeSetting;
|
7
7
|
|
8
|
-
var
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
9
9
|
|
10
|
-
var
|
10
|
+
var _edgeTypeStyleUtil = require("../../../../utils/edgeTypeStyleUtil");
|
11
11
|
|
12
|
-
var
|
12
|
+
var _LineType = _interopRequireDefault(require("../../../Toolbar/widgets/EdgeTypeButton/LineType"));
|
13
13
|
|
14
|
-
|
15
|
-
|
16
|
-
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); }
|
17
|
-
|
18
|
-
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; }
|
19
|
-
|
20
|
-
// 直线 2. 直线单向箭头 3. 直线双向箭头 4. 双折线 5. 双折线单向箭头 6. 弧线
|
21
|
-
// 7. 弧线单向箭头 8. 内向双向箭头 9. 纵向折线 10. 纵向折线带箭头 11. 水平折线 12. 水平折线带箭头
|
22
|
-
var LINE_TYPE_OPTIONS = [{
|
23
|
-
value: "boundary",
|
24
|
-
label: "直线",
|
25
|
-
icon: "topo_linear_icon_straightline"
|
26
|
-
}, {
|
27
|
-
value: "boundary.arrow",
|
28
|
-
label: "直线单向箭头",
|
29
|
-
icon: "topo_linear_icon_oneway_straightline"
|
30
|
-
}, {
|
31
|
-
value: "boundary.both.arrow",
|
32
|
-
label: "直线双向箭头",
|
33
|
-
icon: "topo_linear_icon_expanded_straightline"
|
34
|
-
}, {
|
35
|
-
value: "ortho",
|
36
|
-
label: "双折线",
|
37
|
-
icon: "topo_linear_icon_bilinear"
|
38
|
-
}, {
|
39
|
-
value: "ortho.arrow",
|
40
|
-
label: "双折线单向箭头",
|
41
|
-
icon: "topo_linear_icon_oneway_bilinear"
|
42
|
-
}, {
|
43
|
-
value: "flex",
|
44
|
-
label: "弧线",
|
45
|
-
icon: "topo_linear_icon_arcline"
|
46
|
-
}, {
|
47
|
-
value: "flex.arrow",
|
48
|
-
label: "弧线单向箭头",
|
49
|
-
icon: "topo_linear_icon_oneway_arcline"
|
50
|
-
}, {
|
51
|
-
value: "oposite",
|
52
|
-
label: "内向双向箭头",
|
53
|
-
icon: "topo_linear_icon_narrow_straightline"
|
54
|
-
}, {
|
55
|
-
value: "h.v",
|
56
|
-
label: "纵向折线",
|
57
|
-
icon: "topo_linear_icon_vertical_foldline"
|
58
|
-
}, {
|
59
|
-
value: "h.v.arrow",
|
60
|
-
label: "纵向折线带箭头",
|
61
|
-
icon: "topo_linear_icon_oneway_vertical_foldline"
|
62
|
-
}, {
|
63
|
-
value: "v.h",
|
64
|
-
label: "水平折线",
|
65
|
-
icon: "topo_linear_icon_horizontal_foldline"
|
66
|
-
}, {
|
67
|
-
value: "v.h.arrow",
|
68
|
-
label: "水平折线带箭头",
|
69
|
-
icon: "topo_linear_icon_oneway_horizontal_foldline"
|
70
|
-
}];
|
71
|
-
|
72
|
-
var LineType = function LineType(props) {
|
73
|
-
var topo = props.topo,
|
74
|
-
getEdges = props.getEdges,
|
75
|
-
selected = props.selected,
|
76
|
-
onChange = props.onChange;
|
77
|
-
|
78
|
-
var _useState = (0, _react.useState)(selected),
|
79
|
-
value = _useState[0],
|
80
|
-
setValue = _useState[1];
|
14
|
+
function LineTypeSetting(props) {
|
15
|
+
var topo = props.topo;
|
81
16
|
|
82
17
|
var setLineType = function setLineType(type) {
|
83
|
-
var edges =
|
84
|
-
|
85
|
-
edges.forEach(function (edge) {
|
86
|
-
htTopo.setGraphLinear(edge, {
|
87
|
-
type: type
|
88
|
-
});
|
89
|
-
|
90
|
-
if (edge.isEdgeGroupAgent()) {
|
91
|
-
// 连线组折叠时同时设置子连线
|
92
|
-
var edgeChildren = edge.getEdgeGroup().getEdges().toArray();
|
93
|
-
htTopo.toggleEdgeGroup(edge.getSource(), edge.getTarget(), true);
|
94
|
-
edgeChildren.forEach(function (edgeChild) {
|
95
|
-
htTopo.setGraphLinear(edgeChild, {
|
96
|
-
type: type
|
97
|
-
});
|
98
|
-
});
|
99
|
-
htTopo.toggleEdgeGroup(edge.getSource(), edge.getTarget(), false);
|
100
|
-
}
|
101
|
-
});
|
18
|
+
var edges = (0, _edgeTypeStyleUtil.getEdgesBySelection)(topo);
|
19
|
+
(0, _edgeTypeStyleUtil.setEdgesType)(edges, type, topo);
|
102
20
|
};
|
103
21
|
|
104
|
-
|
105
|
-
|
106
|
-
topo
|
107
|
-
|
108
|
-
|
109
|
-
onChange(data.value);
|
110
|
-
}
|
111
|
-
|
112
|
-
setValue(data.value);
|
113
|
-
setLineType(data.value);
|
114
|
-
topo.historyManager.endTransaction();
|
115
|
-
};
|
116
|
-
|
117
|
-
return /*#__PURE__*/_react["default"].createElement(_box["default"], {
|
118
|
-
spacing: 16,
|
119
|
-
wrap: true,
|
120
|
-
direction: "row",
|
121
|
-
className: _LineTypeModule["default"].LineType
|
122
|
-
}, LINE_TYPE_OPTIONS.map(function (item, index, array) {
|
123
|
-
return /*#__PURE__*/_react["default"].createElement(_button["default"], {
|
124
|
-
key: index,
|
125
|
-
className: "" + _LineTypeModule["default"].redioBtn,
|
126
|
-
title: item.label,
|
127
|
-
onClick: function onClick() {
|
128
|
-
handleChange(item);
|
129
|
-
}
|
130
|
-
}, /*#__PURE__*/_react["default"].createElement("img", {
|
131
|
-
src: "/img/topo/editor/lineType/" + item.icon + ".svg",
|
132
|
-
alt: "",
|
133
|
-
className: _LineTypeModule["default"].iconImg
|
134
|
-
}));
|
135
|
-
}));
|
136
|
-
};
|
137
|
-
|
138
|
-
var _default = LineType;
|
139
|
-
exports["default"] = _default;
|
22
|
+
return /*#__PURE__*/_react["default"].createElement(_LineType["default"], {
|
23
|
+
onChange: setLineType,
|
24
|
+
topo: topo
|
25
|
+
});
|
26
|
+
}
|
@@ -124,14 +124,14 @@ function NodeSizeInput(props) {
|
|
124
124
|
return val ? Math.round(val) : val;
|
125
125
|
}
|
126
126
|
|
127
|
-
return /*#__PURE__*/_react["default"].createElement(_SizeInput["default"], {
|
127
|
+
return /*#__PURE__*/_react["default"].createElement(_SizeInput["default"], (0, _extends3["default"])({}, props, {
|
128
128
|
value: value,
|
129
129
|
lock: lock,
|
130
130
|
max: max,
|
131
131
|
step: step,
|
132
132
|
onChange: handleChange,
|
133
133
|
onLockChange: switchLock
|
134
|
-
});
|
134
|
+
}));
|
135
135
|
}
|
136
136
|
|
137
137
|
NodeSizeInput.propTypes = {
|
@@ -9,27 +9,23 @@ var _box = _interopRequireDefault(require("@alifd/next/lib/box"));
|
|
9
9
|
|
10
10
|
var _extends3 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
11
11
|
|
12
|
-
var _grid = _interopRequireDefault(require("@alifd/next/lib/grid"));
|
13
|
-
|
14
12
|
var _form = _interopRequireDefault(require("@alifd/next/lib/form"));
|
15
13
|
|
16
14
|
var _react = _interopRequireWildcard(require("react"));
|
17
15
|
|
18
16
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
19
17
|
|
18
|
+
var _rlog = _interopRequireDefault(require("@riil-frontend/component-topology-utils/es/rlog"));
|
19
|
+
|
20
20
|
var _NodeSizeNumberPicker = _interopRequireDefault(require("./NodeSizeNumberPicker"));
|
21
21
|
|
22
22
|
var _NodeSizeInputModule = _interopRequireDefault(require("./NodeSizeInput.module.scss"));
|
23
23
|
|
24
|
-
var _rlog = _interopRequireDefault(require("@riil-frontend/component-topology-utils/es/rlog"));
|
25
|
-
|
26
24
|
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
25
|
|
28
26
|
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; }
|
29
27
|
|
30
28
|
var FormItem = _form["default"].Item;
|
31
|
-
var Row = _grid["default"].Row,
|
32
|
-
Col = _grid["default"].Col;
|
33
29
|
/**
|
34
30
|
* 节点大小组件
|
35
31
|
*
|
@@ -42,11 +38,13 @@ function SizeInput(props) {
|
|
42
38
|
max = props.max,
|
43
39
|
step = props.step,
|
44
40
|
onChange = props.onChange,
|
45
|
-
lock = props.lock,
|
46
|
-
onLockChange = props.onLockChange,
|
47
41
|
_props$showLabel = props.showLabel,
|
48
42
|
showLabel = _props$showLabel === void 0 ? true : _props$showLabel,
|
49
|
-
|
43
|
+
numberPickerProps = props.numberPickerProps,
|
44
|
+
size = props.size,
|
45
|
+
lock = props.lock,
|
46
|
+
disabled = props.disabled,
|
47
|
+
onLockChange = props.onLockChange;
|
50
48
|
|
51
49
|
var handleChange = function handleChange(name, attrValue) {
|
52
50
|
var _extends2;
|
@@ -64,6 +62,18 @@ function SizeInput(props) {
|
|
64
62
|
return val ? Math.round(val) : val;
|
65
63
|
}
|
66
64
|
|
65
|
+
var renderLock = function renderLock() {
|
66
|
+
var imgSrc = "/img/topo/editor/toolbar/" + (lock ? 'lock' : 'unlock') + "/" + (disabled ? 'Disable' : 'Normal') + ".svg";
|
67
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
68
|
+
className: _NodeSizeInputModule["default"].lockBtn,
|
69
|
+
onClick: switchLock
|
70
|
+
}, /*#__PURE__*/_react["default"].createElement("img", {
|
71
|
+
src: imgSrc,
|
72
|
+
alt: "",
|
73
|
+
width: 12
|
74
|
+
}));
|
75
|
+
};
|
76
|
+
|
67
77
|
return /*#__PURE__*/_react["default"].createElement(_form["default"], {
|
68
78
|
labelAlign: "top",
|
69
79
|
component: "div",
|
@@ -84,27 +94,24 @@ function SizeInput(props) {
|
|
84
94
|
style: {
|
85
95
|
marginBottom: 0
|
86
96
|
}
|
87
|
-
}, /*#__PURE__*/_react["default"].createElement(_NodeSizeNumberPicker["default"], {
|
97
|
+
}, /*#__PURE__*/_react["default"].createElement(_NodeSizeNumberPicker["default"], (0, _extends3["default"])({
|
88
98
|
value: parseValue(value.width),
|
89
99
|
label: showLabel ? '宽:' : '',
|
100
|
+
innerAfter: showLabel ? undefined : 'W',
|
90
101
|
min: 1,
|
91
102
|
max: max,
|
92
103
|
step: step,
|
104
|
+
disabled: disabled,
|
93
105
|
placeholder: "\u8BF7\u8F93\u5165",
|
94
|
-
size: size
|
106
|
+
size: size
|
107
|
+
}, numberPickerProps, {
|
95
108
|
style: {
|
96
109
|
width: '100%'
|
97
110
|
},
|
98
111
|
onChange: function onChange(val) {
|
99
112
|
return handleChange('width', val);
|
100
113
|
}
|
101
|
-
}))), /*#__PURE__*/_react["default"].createElement("div", {
|
102
|
-
className: _NodeSizeInputModule["default"].lockBtn,
|
103
|
-
onClick: switchLock
|
104
|
-
}, /*#__PURE__*/_react["default"].createElement("img", {
|
105
|
-
src: require(lock ? './img/icon_锁.svg' : './img/icon_解锁.svg'),
|
106
|
-
alt: ""
|
107
|
-
})), /*#__PURE__*/_react["default"].createElement("div", {
|
114
|
+
})))), renderLock(), /*#__PURE__*/_react["default"].createElement("div", {
|
108
115
|
style: {
|
109
116
|
flex: 1
|
110
117
|
}
|
@@ -114,22 +121,24 @@ function SizeInput(props) {
|
|
114
121
|
style: {
|
115
122
|
marginBottom: 0
|
116
123
|
}
|
117
|
-
}, /*#__PURE__*/_react["default"].createElement(_NodeSizeNumberPicker["default"], {
|
124
|
+
}, /*#__PURE__*/_react["default"].createElement(_NodeSizeNumberPicker["default"], (0, _extends3["default"])({
|
118
125
|
value: parseValue(value.height),
|
119
|
-
label: showLabel ? '高:' : ''
|
120
|
-
,
|
126
|
+
label: showLabel ? '高:' : '',
|
127
|
+
innerAfter: showLabel ? undefined : 'H',
|
121
128
|
min: 1,
|
122
129
|
max: max,
|
123
130
|
step: step,
|
131
|
+
disabled: disabled,
|
124
132
|
placeholder: "\u8BF7\u8F93\u5165",
|
125
|
-
size: size
|
133
|
+
size: size
|
134
|
+
}, numberPickerProps, {
|
126
135
|
style: {
|
127
136
|
width: '100%'
|
128
137
|
},
|
129
138
|
onChange: function onChange(val) {
|
130
139
|
return handleChange('height', val);
|
131
140
|
}
|
132
|
-
}))))));
|
141
|
+
})))))));
|
133
142
|
}
|
134
143
|
|
135
144
|
SizeInput.propTypes = {
|
@@ -13,7 +13,7 @@ var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runt
|
|
13
13
|
|
14
14
|
var _react = _interopRequireWildcard(require("react"));
|
15
15
|
|
16
|
-
var _excluded = ["value", "onChange", "min", "onBlur", "onKeyDown"];
|
16
|
+
var _excluded = ["value", "onChange", "min", "onBlur", "onKeyDown", "disabled"];
|
17
17
|
|
18
18
|
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); }
|
19
19
|
|
@@ -31,6 +31,7 @@ function NodeSizeNumberPicker(props) {
|
|
31
31
|
min = props.min,
|
32
32
|
onBlur = props.onBlur,
|
33
33
|
onKeyDown = props.onKeyDown,
|
34
|
+
disabled = props.disabled,
|
34
35
|
otherProps = (0, _objectWithoutPropertiesLoose2["default"])(props, _excluded);
|
35
36
|
|
36
37
|
var _useState = (0, _react.useState)(value),
|
@@ -63,13 +64,13 @@ function NodeSizeNumberPicker(props) {
|
|
63
64
|
|
64
65
|
var handleChange = function handleChange(value, e) {
|
65
66
|
// 失去焦点最大最小值
|
66
|
-
if (e.type ===
|
67
|
+
if (e.type === "blur") {
|
67
68
|
onChange(!value ? min : value);
|
68
69
|
return;
|
69
70
|
} // 加减号立即变更
|
70
71
|
|
71
72
|
|
72
|
-
if (e.triggerType ===
|
73
|
+
if (e.triggerType === "up" || e.triggerType === "down") {
|
73
74
|
onChange(value);
|
74
75
|
return;
|
75
76
|
}
|
@@ -80,10 +81,9 @@ function NodeSizeNumberPicker(props) {
|
|
80
81
|
return /*#__PURE__*/_react["default"].createElement(_numberPicker["default"], (0, _extends2["default"])({}, otherProps, {
|
81
82
|
value: inputValue,
|
82
83
|
min: min,
|
84
|
+
disabled: disabled,
|
83
85
|
onChange: handleChange,
|
84
86
|
onBlur: handleBlur,
|
85
87
|
onKeyDown: handleKeyDown
|
86
88
|
}));
|
87
|
-
}
|
88
|
-
|
89
|
-
;
|
89
|
+
}
|
@@ -9,17 +9,17 @@ var fontStyleUtil = {
|
|
9
9
|
font = '';
|
10
10
|
}
|
11
11
|
|
12
|
-
var
|
12
|
+
var str = font.trim();
|
13
13
|
var bold = font.indexOf('bold') > -1;
|
14
14
|
var italic = font.indexOf('italic') > -1;
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
if (
|
22
|
-
fontSize = parseInt(
|
15
|
+
str = str.trim().replace('bold ', '').trim().replace('italic ', '').trim();
|
16
|
+
var arr = str.split(' ');
|
17
|
+
var fontSizeStr = arr[0];
|
18
|
+
var fontFamily = str.replace(fontSizeStr, '').trim() || null;
|
19
|
+
var fontSize = null;
|
20
|
+
|
21
|
+
if (fontSizeStr) {
|
22
|
+
fontSize = parseInt(fontSizeStr.replace('px', ''), 10);
|
23
23
|
}
|
24
24
|
|
25
25
|
return {
|
@@ -31,17 +31,9 @@ var fontStyleUtil = {
|
|
31
31
|
},
|
32
32
|
// 字体样式格式: bold italic 12px 黑体 或 12px 黑体
|
33
33
|
build: function build(style) {
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
font += 'bold ';
|
38
|
-
}
|
39
|
-
|
40
|
-
if (style.font.italic) {
|
41
|
-
font += 'italic ';
|
42
|
-
}
|
43
|
-
|
44
|
-
return "" + font + style.font.fontSize + "px " + style.font.fontFamily;
|
34
|
+
return [style.bold ? 'bold' : null, style.italic ? 'italic' : null, style.fontSize ? style.fontSize + "px" : null, style.fontFamily].filter(function (item) {
|
35
|
+
return item !== null;
|
36
|
+
}).join(' ');
|
45
37
|
},
|
46
38
|
getFontStyleMap: function getFontStyleMap(obj, prefix) {
|
47
39
|
var map = {};
|
@@ -62,8 +62,10 @@ function CommonEdgePropertyView(props) {
|
|
62
62
|
}, [values]);
|
63
63
|
|
64
64
|
var setLineColor = function setLineColor(color) {
|
65
|
-
|
65
|
+
// 同时修改实线、虚线
|
66
66
|
edge.s("edge.color", color);
|
67
|
+
edge.s("edge.dash.color", color);
|
68
|
+
var style = edge.a("styles") || {};
|
67
69
|
edge.a("styles", (0, _extends2["default"])({}, style, {
|
68
70
|
color: color
|
69
71
|
}));
|
@@ -114,6 +116,10 @@ function CommonEdgePropertyView(props) {
|
|
114
116
|
style: {
|
115
117
|
width: "100%"
|
116
118
|
},
|
119
|
+
onChange: function onChange(val) {
|
120
|
+
// 同时修改实线、虚线的线宽
|
121
|
+
edge.s('edge.dash.width', val);
|
122
|
+
},
|
117
123
|
onFocus: function onFocus() {
|
118
124
|
topo.historyManager.beginTransaction();
|
119
125
|
},
|
package/lib/core/editor/components/settings/propertyViews/group/SettingTab/GroupExpandSetting.js
CHANGED
@@ -89,13 +89,5 @@ function GroupExpandSetting(props) {
|
|
89
89
|
setExpanded: function setExpanded(val) {
|
90
90
|
return group.setExpanded(val);
|
91
91
|
}
|
92
|
-
}))), /*#__PURE__*/_react["default"].createElement(CollapsePanel, {
|
93
|
-
key: "\u5BF9\u9F50\u65B9\u5F0F",
|
94
|
-
title: "\u5BF9\u9F50\u65B9\u5F0F"
|
95
|
-
}, /*#__PURE__*/_react["default"].createElement(_form["default"].Item, {
|
96
|
-
label: ""
|
97
|
-
}, /*#__PURE__*/_react["default"].createElement(_AlignSetting["default"], {
|
98
|
-
onChange: alignOnChange,
|
99
|
-
selected: "left"
|
100
92
|
}))));
|
101
93
|
}
|
@@ -94,7 +94,7 @@ function BatchSetNodeSize(props) {
|
|
94
94
|
if (lock) {
|
95
95
|
var _setSize;
|
96
96
|
|
97
|
-
setSize((_setSize = {}, _setSize[name] = value, _setSize[name ===
|
97
|
+
setSize((_setSize = {}, _setSize[name] = value, _setSize[name === "width" ? "height" : "width"] = undefined, _setSize));
|
98
98
|
} else {
|
99
99
|
var _extends2;
|
100
100
|
|
@@ -103,11 +103,11 @@ function BatchSetNodeSize(props) {
|
|
103
103
|
|
104
104
|
topo.historyManager.beginTransaction();
|
105
105
|
nodes.forEach(function (node) {
|
106
|
-
if (name ===
|
106
|
+
if (name === "width") {
|
107
107
|
if (lock) {
|
108
108
|
var height = nodesSizeRatioMap.getNodeHeight(node, value);
|
109
109
|
|
110
|
-
_rlog["default"].debug(
|
110
|
+
_rlog["default"].debug("多元素锁定设置宽", node, value, height);
|
111
111
|
|
112
112
|
node.setHeight(height);
|
113
113
|
}
|
@@ -133,12 +133,10 @@ function BatchSetNodeSize(props) {
|
|
133
133
|
nodesSizeRatioMap.reset();
|
134
134
|
};
|
135
135
|
|
136
|
-
return /*#__PURE__*/_react["default"].createElement(_SizeInput["default"], {
|
136
|
+
return /*#__PURE__*/_react["default"].createElement(_SizeInput["default"], (0, _extends3["default"])({}, props, {
|
137
137
|
value: size,
|
138
138
|
lock: lock,
|
139
139
|
onChange: handleChange,
|
140
140
|
onLockChange: onLockChange
|
141
|
-
});
|
142
|
-
}
|
143
|
-
|
144
|
-
;
|
141
|
+
}));
|
142
|
+
}
|
@@ -7,56 +7,19 @@ exports["default"] = MultipleElementLineType;
|
|
7
7
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
9
9
|
|
10
|
-
var
|
10
|
+
var _edgeTypeStyleUtil = require("../../../../utils/edgeTypeStyleUtil");
|
11
11
|
|
12
|
-
var _LineType = _interopRequireDefault(require("
|
12
|
+
var _LineType = _interopRequireDefault(require("../../../Toolbar/widgets/EdgeTypeButton/LineType"));
|
13
13
|
|
14
14
|
function MultipleElementLineType(props) {
|
15
15
|
var topo = props.topo;
|
16
16
|
|
17
|
-
var setLineType = function setLineType(type) {
|
18
|
-
|
19
|
-
|
20
|
-
var nodeIds = nodes.map(function (node) {
|
21
|
-
return node.getId();
|
22
|
-
});
|
23
|
-
nodes.forEach(function (node) {
|
24
|
-
if (node instanceof ht.Group) {
|
25
|
-
var children = node.getChildren().toArray();
|
26
|
-
nodeIds.push.apply(nodeIds, getChildrenNodeIds(children));
|
27
|
-
}
|
28
|
-
});
|
29
|
-
return nodeIds;
|
30
|
-
};
|
31
|
-
|
32
|
-
var getSelectedEdges = function getSelectedEdges() {
|
33
|
-
var gv = topo.getGraphView();
|
34
|
-
var selection = gv.getSelectionModel().getSelection().toArray();
|
35
|
-
var edges = selection.filter(function (element) {
|
36
|
-
return element instanceof ht.Edge;
|
37
|
-
}); // 查询选中节点间的连线
|
38
|
-
|
39
|
-
var nodes = selection.filter(function (element) {
|
40
|
-
return element instanceof ht.Node;
|
41
|
-
});
|
42
|
-
var nodeIds = getChildrenNodeIds(nodes);
|
43
|
-
var dm = gv.getDataModel();
|
44
|
-
(0, _htElementUtils.getEdges)(dm).forEach(function (edge) {
|
45
|
-
if (nodeIds.find(function (nodeId) {
|
46
|
-
return nodeId === edge.getSource().getId();
|
47
|
-
}) && nodeIds.find(function (nodeId) {
|
48
|
-
return nodeId === edge.getTarget().getId();
|
49
|
-
}) && !edges.find(function (item) {
|
50
|
-
return item === edge;
|
51
|
-
})) {
|
52
|
-
edges.push(edge);
|
53
|
-
}
|
54
|
-
});
|
55
|
-
return edges;
|
17
|
+
var setLineType = function setLineType(type) {
|
18
|
+
var edges = (0, _edgeTypeStyleUtil.getEdgesBySelection)(topo);
|
19
|
+
(0, _edgeTypeStyleUtil.setEdgesType)(edges, type, topo);
|
56
20
|
};
|
57
21
|
|
58
22
|
return /*#__PURE__*/_react["default"].createElement(_LineType["default"], {
|
59
|
-
getEdges: getSelectedEdges,
|
60
23
|
onChange: setLineType,
|
61
24
|
topo: topo
|
62
25
|
});
|
@@ -55,19 +55,7 @@ function MultipleElementPropertyView(props) {
|
|
55
55
|
|
56
56
|
(0, _react.useEffect)(function () {
|
57
57
|
field.setValues(values);
|
58
|
-
}, [values]);
|
59
|
-
|
60
|
-
var alignOnChange = function alignOnChange(v) {
|
61
|
-
// console.log('setAlignmentBySelectionNodes', v);
|
62
|
-
topo.historyManager.beginTransaction();
|
63
|
-
topo.getHtTopo().setAlignmentBySelectionNodes(v);
|
64
|
-
|
65
|
-
_onChange('groupAlign', v); // topoEditApi.setAlignmentBySelectionNodes(v);
|
66
|
-
|
67
|
-
|
68
|
-
topo.historyManager.endTransaction();
|
69
|
-
}; // TODO 临时方案,满足应用部署拓扑多选元素属性面板不显示对齐
|
70
|
-
|
58
|
+
}, [values]); // TODO 临时方案,满足应用部署拓扑多选元素属性面板不显示对齐
|
71
59
|
|
72
60
|
if (!(editorProps !== null && editorProps !== void 0 && (_editorProps$multiple = editorProps.multipleElementPropertyViewProps) !== null && _editorProps$multiple !== void 0 && _editorProps$multiple.showElementAlign) && topoShowType === _template.TPL_TREE) {
|
73
61
|
return /*#__PURE__*/_react["default"].createElement(_ViewPropertyView["default"], props);
|
@@ -99,8 +87,7 @@ function MultipleElementPropertyView(props) {
|
|
99
87
|
key: "\u5BF9\u9F50\u65B9\u5F0F",
|
100
88
|
title: "\u5BF9\u9F50\u65B9\u5F0F"
|
101
89
|
}, /*#__PURE__*/_react["default"].createElement(_AlignSetting["default"], {
|
102
|
-
|
103
|
-
selected: "left"
|
90
|
+
topo: topo
|
104
91
|
})), /*#__PURE__*/_react["default"].createElement(CollapsePanel, {
|
105
92
|
key: "\u7EBF\u5F62",
|
106
93
|
title: "\u7EBF\u5F62"
|
@@ -56,7 +56,7 @@ function TextPropertyView(props) {
|
|
56
56
|
|
57
57
|
_onChange('styleMap.label.color', value.color, newValues);
|
58
58
|
|
59
|
-
var font = _fontStyleUtil["default"].build(value);
|
59
|
+
var font = _fontStyleUtil["default"].build(value.font);
|
60
60
|
|
61
61
|
_onChange('styleMap.text.font', font, newValues);
|
62
62
|
|
@@ -15,11 +15,13 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
15
15
|
|
16
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
17
|
|
18
|
+
// 这个似乎不需要了
|
18
19
|
function BatchSetNodeSize(props) {
|
19
|
-
var
|
20
|
+
var value = props.value,
|
21
|
+
size = props.size,
|
22
|
+
disabled = props.disabled;
|
20
23
|
return /*#__PURE__*/_react["default"].createElement(_SizeInput["default"], (0, _extends2["default"])({}, props, {
|
21
|
-
|
24
|
+
disabled: disabled,
|
25
|
+
value: value
|
22
26
|
}));
|
23
|
-
}
|
24
|
-
|
25
|
-
;
|
27
|
+
}
|
@@ -9,6 +9,8 @@ var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"))
|
|
9
9
|
|
10
10
|
var _box = _interopRequireDefault(require("@alifd/next/lib/box"));
|
11
11
|
|
12
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
13
|
+
|
12
14
|
var _dialog = _interopRequireDefault(require("@alifd/next/lib/dialog"));
|
13
15
|
|
14
16
|
var _button = _interopRequireDefault(require("@alifd/next/lib/button"));
|
@@ -25,6 +27,8 @@ var _TitleBarModule = _interopRequireDefault(require("../../../components/titleb
|
|
25
27
|
|
26
28
|
var _DebugTools = _interopRequireDefault(require("./widgets/DebugTools"));
|
27
29
|
|
30
|
+
var _SettingButtonWidget = _interopRequireDefault(require("../../../viewer/components/titlebar/widgets/SettingButtonWidget"));
|
31
|
+
|
28
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); }
|
29
33
|
|
30
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; }
|
@@ -151,5 +155,9 @@ function TopoEditorTitleBar(props) {
|
|
151
155
|
}
|
152
156
|
});
|
153
157
|
}
|
154
|
-
}, "\u9000\u51FA"))
|
158
|
+
}, "\u9000\u51FA"), /*#__PURE__*/_react["default"].createElement(_SettingButtonWidget["default"], (0, _extends2["default"])({
|
159
|
+
isEditor: true
|
160
|
+
}, props, {
|
161
|
+
viewerProps: topo.viewProps.viewerProps
|
162
|
+
})))));
|
155
163
|
}
|