@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.
- package/build/1.js +2 -2
- package/build/2.js +1 -1
- package/build/index.css +1 -1
- package/build/index.js +28 -28
- package/es/components/ColorPanel/components/ColorBlock/index.js +37 -0
- package/es/components/ColorPanel/components/ColorBlock/index.module.scss +8 -0
- package/es/components/ColorPanel/components/FontColorRange/index.js +35 -0
- package/es/components/ColorPanel/components/FontColorRange/index.module.scss +22 -0
- package/es/components/ColorPanel/index.js +199 -0
- package/es/components/ColorPanel/index.module.scss +37 -0
- package/es/components/VerticalIconTab/VerticalIconTab.module.scss +7 -2
- package/es/components/collapse/Collapse.module.scss +12 -1
- package/es/core/common/hooks/useHtElements.js +21 -0
- package/es/core/common/icons/useIcons.js +7 -1
- package/es/core/components/AlarmListPanel/components/AlarmListItem.js +15 -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 +6 -2
- package/es/core/components/DisplaySettingDrawer/EditorDisplaySetting.js +122 -0
- package/es/core/components/DisplaySettingDrawer/hooks/useDisplaySetting.js +74 -20
- package/es/core/components/TopoView/TopoGraphViewPanel.js +20 -0
- package/es/core/components/TopoView/editor.module.scss +1 -0
- package/es/core/components/TopoView/topoView.js +39 -18
- package/es/core/editor/components/Sidebar/Sidebar.js +26 -50
- package/es/core/editor/components/Sidebar/Sidebar.module.scss +5 -1
- package/es/core/editor/components/Sidebar/panes.js +32 -0
- package/es/core/editor/components/Sidebar/views/BackgroundPanel/BackgroundPanel.js +1 -2
- package/es/core/editor/components/Sidebar/views/CanvasPanel/CanvasPanel.js +96 -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/ImagePanel/CiTypeImagePanel.js +1 -1
- package/es/core/editor/components/Sidebar/views/ImagePanel/CustomImagePanel.js +8 -33
- package/es/core/editor/components/Sidebar/views/ImagePanel/HtCustomImagePanel.js +42 -0
- package/es/core/editor/components/Sidebar/views/ImagePanel/HtImagePalette.js +42 -0
- package/es/core/editor/components/Sidebar/views/ImagePanel/HtImagePalette.module.scss +5 -0
- package/es/core/editor/components/Sidebar/views/ImagePanel/ImagePanel.js +2 -1
- 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/hooks/useFontStyleSetting.js +35 -0
- package/es/core/editor/components/Toolbar/widgets/AddResourceButton.js +56 -7
- 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 +10 -1
- package/es/core/editor/components/Toolbar/widgets/EdgeColorButton/EdgeWidthRange.js +33 -0
- package/es/core/editor/components/Toolbar/widgets/EdgeColorButton/EdgeWidthRange.module.scss +26 -0
- 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 +59 -6
- package/es/core/editor/components/Toolbar/widgets/FontColorButton.js +36 -4
- package/es/core/editor/components/Toolbar/widgets/FontColorButton.module.scss +35 -0
- package/es/core/editor/components/Toolbar/widgets/FontFamilyWidget.js +12 -2
- package/es/core/editor/components/Toolbar/widgets/FontSizeWidget.js +12 -2
- 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 +127 -14
- package/es/core/editor/components/Toolbar/widgets/NodeAlignWidget.js +28 -22
- package/es/core/editor/components/Toolbar/widgets/NodeImageButton/BoxBackgroundSetting.js +14 -4
- package/es/core/editor/components/Toolbar/widgets/NodeImageButton/NodeImageButton.js +37 -6
- package/es/core/editor/components/Toolbar/widgets/NodeSizeButton/NodeSizeButton.js +90 -12
- package/es/core/editor/components/Toolbar/widgets/NodeSizeButton/NodeSizeButton.module.scss +28 -0
- package/es/core/editor/components/Toolbar/widgets/WidgetBox.js +9 -21
- package/es/core/editor/components/Toolbar/widgets/WidgetBox.module.scss +11 -1
- package/es/core/editor/components/Toolbar/widgets/components/ButtonBox.js +4 -2
- package/es/core/editor/components/Toolbar/widgets/components/DropdownButton.js +8 -5
- package/es/core/editor/components/settings/Settings.js +0 -23
- package/es/core/editor/components/settings/Settings.module.scss +1 -2
- package/es/core/editor/components/settings/common/AlignSetting/AlignTypeList.js +76 -0
- package/es/core/editor/components/settings/common/AlignSetting/index.js +18 -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/propertyViews/group/SettingTab/GroupExpandSetting.js +0 -8
- package/es/core/editor/components/settings/propertyViews/layer/DataTab/DefaultLayerAddResourceDrawer.js +48 -0
- package/es/core/editor/components/settings/propertyViews/layer/DataTab/LayerAddResourceButton.js +12 -18
- package/es/core/editor/components/settings/propertyViews/layer/DataTab/LayerAddResourceDrawer.js +13 -46
- package/es/core/editor/components/settings/propertyViews/layer/DataTab/RelateData.js +2 -1
- 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/view/BatchSetNodeSize.js +9 -6
- package/es/core/editor/components/titlebar/TopoEditorTitleBar.js +8 -4
- package/es/core/editor/hooks/useLayerAddResource.js +28 -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/{store/models → editor/store}/topoEdit.js +8 -1
- package/es/core/editor/utils/edgeTypeStyleUtil.js +96 -0
- package/es/core/hooks/useCanvasTheme.js +35 -0
- package/es/core/hooks/useTopoEdit.js +36 -58
- package/es/core/models/HistoryManager.js +10 -3
- package/es/core/models/SelectionManager.js +16 -1
- package/es/core/models/TopoApp.js +1 -1
- package/es/core/models/TopoGraphView.js +8 -2
- package/es/core/models/utils/linkUtils.js +1 -1
- package/es/core/store/coreModels.js +6 -7
- package/es/core/store/models/selection.js +2 -1
- 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/topoData.js +1 -0
- package/lib/components/ColorPanel/components/ColorBlock/index.js +47 -0
- package/lib/components/ColorPanel/components/ColorBlock/index.module.scss +8 -0
- package/lib/components/ColorPanel/components/FontColorRange/index.js +49 -0
- package/lib/components/ColorPanel/components/FontColorRange/index.module.scss +22 -0
- package/lib/components/ColorPanel/index.js +217 -0
- package/lib/components/ColorPanel/index.module.scss +37 -0
- package/lib/components/VerticalIconTab/VerticalIconTab.module.scss +7 -2
- package/lib/components/collapse/Collapse.module.scss +12 -1
- package/lib/core/common/hooks/useHtElements.js +27 -0
- package/lib/core/common/icons/useIcons.js +7 -1
- package/lib/core/components/AlarmListPanel/components/AlarmListItem.js +15 -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 +7 -2
- package/lib/core/components/DisplaySettingDrawer/EditorDisplaySetting.js +147 -0
- package/lib/core/components/DisplaySettingDrawer/hooks/useDisplaySetting.js +74 -20
- package/lib/core/components/TopoView/TopoGraphViewPanel.js +30 -0
- package/lib/core/components/TopoView/editor.module.scss +1 -0
- package/lib/core/components/TopoView/topoView.js +41 -19
- package/lib/core/editor/components/Sidebar/Sidebar.js +25 -52
- package/lib/core/editor/components/Sidebar/Sidebar.module.scss +5 -1
- package/lib/core/editor/components/Sidebar/panes.js +45 -0
- package/lib/core/editor/components/Sidebar/views/BackgroundPanel/BackgroundPanel.js +1 -2
- package/lib/core/editor/components/Sidebar/views/CanvasPanel/CanvasPanel.js +109 -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/ImagePanel/CiTypeImagePanel.js +2 -2
- package/lib/core/editor/components/Sidebar/views/ImagePanel/CustomImagePanel.js +8 -32
- package/lib/core/editor/components/Sidebar/views/ImagePanel/HtCustomImagePanel.js +55 -0
- package/lib/core/editor/components/Sidebar/views/ImagePanel/HtImagePalette.js +55 -0
- package/lib/core/editor/components/Sidebar/views/ImagePanel/HtImagePalette.module.scss +5 -0
- package/lib/core/editor/components/Sidebar/views/ImagePanel/ImagePanel.js +3 -1
- 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/hooks/useFontStyleSetting.js +50 -0
- package/lib/core/editor/components/Toolbar/widgets/AddResourceButton.js +63 -7
- 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 +11 -1
- package/lib/core/editor/components/Toolbar/widgets/EdgeColorButton/EdgeWidthRange.js +47 -0
- package/lib/core/editor/components/Toolbar/widgets/EdgeColorButton/EdgeWidthRange.module.scss +26 -0
- 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 +61 -5
- package/lib/core/editor/components/Toolbar/widgets/FontColorButton.js +39 -4
- package/lib/core/editor/components/Toolbar/widgets/FontColorButton.module.scss +35 -0
- package/lib/core/editor/components/Toolbar/widgets/FontFamilyWidget.js +13 -2
- package/lib/core/editor/components/Toolbar/widgets/FontSizeWidget.js +13 -2
- 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 +132 -15
- package/lib/core/editor/components/Toolbar/widgets/NodeAlignWidget.js +30 -23
- package/lib/core/editor/components/Toolbar/widgets/NodeImageButton/BoxBackgroundSetting.js +20 -4
- package/lib/core/editor/components/Toolbar/widgets/NodeImageButton/NodeImageButton.js +36 -5
- package/lib/core/editor/components/Toolbar/widgets/NodeSizeButton/NodeSizeButton.js +91 -11
- package/lib/core/editor/components/Toolbar/widgets/NodeSizeButton/NodeSizeButton.module.scss +28 -0
- package/lib/core/editor/components/Toolbar/widgets/WidgetBox.js +11 -24
- package/lib/core/editor/components/Toolbar/widgets/WidgetBox.module.scss +11 -1
- package/lib/core/editor/components/Toolbar/widgets/components/ButtonBox.js +4 -2
- package/lib/core/editor/components/Toolbar/widgets/components/DropdownButton.js +8 -5
- package/lib/core/editor/components/settings/Settings.js +0 -23
- package/lib/core/editor/components/settings/Settings.module.scss +1 -2
- package/lib/core/editor/components/settings/common/AlignSetting/AlignTypeList.js +93 -0
- package/lib/core/editor/components/settings/common/AlignSetting/index.js +19 -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/propertyViews/group/SettingTab/GroupExpandSetting.js +0 -8
- package/lib/core/editor/components/settings/propertyViews/layer/DataTab/DefaultLayerAddResourceDrawer.js +63 -0
- package/lib/core/editor/components/settings/propertyViews/layer/DataTab/LayerAddResourceButton.js +13 -22
- package/lib/core/editor/components/settings/propertyViews/layer/DataTab/LayerAddResourceDrawer.js +12 -50
- package/lib/core/editor/components/settings/propertyViews/layer/DataTab/RelateData.js +2 -1
- 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/view/BatchSetNodeSize.js +7 -5
- package/lib/core/editor/components/titlebar/TopoEditorTitleBar.js +9 -1
- package/lib/core/editor/hooks/useLayerAddResource.js +34 -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/{store/models → editor/store}/topoEdit.js +8 -1
- package/lib/core/editor/utils/edgeTypeStyleUtil.js +109 -0
- package/lib/core/hooks/useCanvasTheme.js +49 -0
- package/lib/core/hooks/useTopoEdit.js +36 -60
- package/lib/core/models/HistoryManager.js +10 -3
- package/lib/core/models/SelectionManager.js +17 -1
- package/lib/core/models/TopoApp.js +1 -1
- package/lib/core/models/TopoGraphView.js +8 -2
- package/lib/core/models/utils/linkUtils.js +1 -1
- package/lib/core/store/coreModels.js +5 -7
- package/lib/core/store/models/selection.js +2 -1
- 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/topoData.js +1 -0
- package/package.json +2 -2
- package/es/core/editor/components/Sidebar/views/CanvasPanel/ImagePanel.js +0 -4
- package/es/core/editor/components/Toolbar/widgets/AddResourceWidget.js +0 -17
- package/es/core/store/models/topoView.js +0 -36
- package/lib/core/editor/components/Sidebar/views/CanvasPanel/ImagePanel.js +0 -12
- package/lib/core/editor/components/Toolbar/widgets/AddResourceWidget.js +0 -27
- package/lib/core/store/models/topoView.js +0 -47
|
@@ -1,123 +1,16 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
var LINE_TYPE_OPTIONS = [{
|
|
8
|
-
value: "boundary",
|
|
9
|
-
label: "直线",
|
|
10
|
-
icon: "topo_linear_icon_straightline"
|
|
11
|
-
}, {
|
|
12
|
-
value: "boundary.arrow",
|
|
13
|
-
label: "直线单向箭头",
|
|
14
|
-
icon: "topo_linear_icon_oneway_straightline"
|
|
15
|
-
}, {
|
|
16
|
-
value: "boundary.both.arrow",
|
|
17
|
-
label: "直线双向箭头",
|
|
18
|
-
icon: "topo_linear_icon_expanded_straightline"
|
|
19
|
-
}, {
|
|
20
|
-
value: "ortho",
|
|
21
|
-
label: "双折线",
|
|
22
|
-
icon: "topo_linear_icon_bilinear"
|
|
23
|
-
}, {
|
|
24
|
-
value: "ortho.arrow",
|
|
25
|
-
label: "双折线单向箭头",
|
|
26
|
-
icon: "topo_linear_icon_oneway_bilinear"
|
|
27
|
-
}, {
|
|
28
|
-
value: "flex",
|
|
29
|
-
label: "弧线",
|
|
30
|
-
icon: "topo_linear_icon_arcline"
|
|
31
|
-
}, {
|
|
32
|
-
value: "flex.arrow",
|
|
33
|
-
label: "弧线单向箭头",
|
|
34
|
-
icon: "topo_linear_icon_oneway_arcline"
|
|
35
|
-
}, {
|
|
36
|
-
value: "oposite",
|
|
37
|
-
label: "内向双向箭头",
|
|
38
|
-
icon: "topo_linear_icon_narrow_straightline"
|
|
39
|
-
}, {
|
|
40
|
-
value: "h.v",
|
|
41
|
-
label: "纵向折线",
|
|
42
|
-
icon: "topo_linear_icon_vertical_foldline"
|
|
43
|
-
}, {
|
|
44
|
-
value: "h.v.arrow",
|
|
45
|
-
label: "纵向折线带箭头",
|
|
46
|
-
icon: "topo_linear_icon_oneway_vertical_foldline"
|
|
47
|
-
}, {
|
|
48
|
-
value: "v.h",
|
|
49
|
-
label: "水平折线",
|
|
50
|
-
icon: "topo_linear_icon_horizontal_foldline"
|
|
51
|
-
}, {
|
|
52
|
-
value: "v.h.arrow",
|
|
53
|
-
label: "水平折线带箭头",
|
|
54
|
-
icon: "topo_linear_icon_oneway_horizontal_foldline"
|
|
55
|
-
}];
|
|
56
|
-
|
|
57
|
-
var LineType = function LineType(props) {
|
|
58
|
-
var topo = props.topo,
|
|
59
|
-
getEdges = props.getEdges,
|
|
60
|
-
selected = props.selected,
|
|
61
|
-
onChange = props.onChange;
|
|
62
|
-
|
|
63
|
-
var _useState = useState(selected),
|
|
64
|
-
value = _useState[0],
|
|
65
|
-
setValue = _useState[1];
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { getEdgesBySelection, setEdgesType } from "../../../../utils/edgeTypeStyleUtil";
|
|
3
|
+
import LineType from "../../../Toolbar/widgets/EdgeTypeButton/LineType";
|
|
4
|
+
export default function LineTypeSetting(props) {
|
|
5
|
+
var topo = props.topo;
|
|
66
6
|
|
|
67
7
|
var setLineType = function setLineType(type) {
|
|
68
|
-
var edges =
|
|
69
|
-
|
|
70
|
-
edges.forEach(function (edge) {
|
|
71
|
-
htTopo.setGraphLinear(edge, {
|
|
72
|
-
type: type
|
|
73
|
-
});
|
|
74
|
-
|
|
75
|
-
if (edge.isEdgeGroupAgent()) {
|
|
76
|
-
// 连线组折叠时同时设置子连线
|
|
77
|
-
var edgeChildren = edge.getEdgeGroup().getEdges().toArray();
|
|
78
|
-
htTopo.toggleEdgeGroup(edge.getSource(), edge.getTarget(), true);
|
|
79
|
-
edgeChildren.forEach(function (edgeChild) {
|
|
80
|
-
htTopo.setGraphLinear(edgeChild, {
|
|
81
|
-
type: type
|
|
82
|
-
});
|
|
83
|
-
});
|
|
84
|
-
htTopo.toggleEdgeGroup(edge.getSource(), edge.getTarget(), false);
|
|
85
|
-
}
|
|
86
|
-
});
|
|
8
|
+
var edges = getEdgesBySelection(topo);
|
|
9
|
+
setEdgesType(edges, type, topo);
|
|
87
10
|
};
|
|
88
11
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
topo
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
onChange(data.value);
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
setValue(data.value);
|
|
98
|
-
setLineType(data.value);
|
|
99
|
-
topo.historyManager.endTransaction();
|
|
100
|
-
};
|
|
101
|
-
|
|
102
|
-
return /*#__PURE__*/React.createElement(_Box, {
|
|
103
|
-
spacing: 16,
|
|
104
|
-
wrap: true,
|
|
105
|
-
direction: "row",
|
|
106
|
-
className: styles.LineType
|
|
107
|
-
}, LINE_TYPE_OPTIONS.map(function (item, index, array) {
|
|
108
|
-
return /*#__PURE__*/React.createElement(_Button, {
|
|
109
|
-
key: index,
|
|
110
|
-
className: "" + styles.redioBtn,
|
|
111
|
-
title: item.label,
|
|
112
|
-
onClick: function onClick() {
|
|
113
|
-
handleChange(item);
|
|
114
|
-
}
|
|
115
|
-
}, /*#__PURE__*/React.createElement("img", {
|
|
116
|
-
src: "/img/topo/editor/lineType/" + item.icon + ".svg",
|
|
117
|
-
alt: "",
|
|
118
|
-
className: styles.iconImg
|
|
119
|
-
}));
|
|
120
|
-
}));
|
|
121
|
-
};
|
|
122
|
-
|
|
123
|
-
export default LineType;
|
|
12
|
+
return /*#__PURE__*/React.createElement(LineType, {
|
|
13
|
+
onChange: setLineType,
|
|
14
|
+
topo: topo
|
|
15
|
+
});
|
|
16
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import React, { useState } from 'react';
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
|
-
import rlog from
|
|
4
|
+
import rlog from '@riil-frontend/component-topology-utils/es/rlog';
|
|
5
5
|
import SizeInput from "../SizeInput";
|
|
6
6
|
var NODE_SIZE_LOCK = 'NODE_SIZE_LOCK';
|
|
7
7
|
/**
|
|
@@ -103,14 +103,14 @@ function NodeSizeInput(props) {
|
|
|
103
103
|
return val ? Math.round(val) : val;
|
|
104
104
|
}
|
|
105
105
|
|
|
106
|
-
return /*#__PURE__*/React.createElement(SizeInput, {
|
|
106
|
+
return /*#__PURE__*/React.createElement(SizeInput, _extends({}, props, {
|
|
107
107
|
value: value,
|
|
108
108
|
lock: lock,
|
|
109
109
|
max: max,
|
|
110
110
|
step: step,
|
|
111
111
|
onChange: handleChange,
|
|
112
112
|
onLockChange: switchLock
|
|
113
|
-
});
|
|
113
|
+
}));
|
|
114
114
|
}
|
|
115
115
|
|
|
116
116
|
NodeSizeInput.propTypes = {
|
|
@@ -1,15 +1,12 @@
|
|
|
1
1
|
import _Box from "@alifd/next/es/box";
|
|
2
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
3
|
-
import _Grid from "@alifd/next/es/grid";
|
|
4
3
|
import _Form from "@alifd/next/es/form";
|
|
5
4
|
import React, { useState } from 'react';
|
|
6
5
|
import PropTypes from 'prop-types';
|
|
6
|
+
import rlog from '@riil-frontend/component-topology-utils/es/rlog';
|
|
7
7
|
import NodeSizeNumberPicker from "./NodeSizeNumberPicker";
|
|
8
8
|
import styles from "./NodeSizeInput.module.scss";
|
|
9
|
-
import rlog from "@riil-frontend/component-topology-utils/es/rlog";
|
|
10
9
|
var FormItem = _Form.Item;
|
|
11
|
-
var Row = _Grid.Row,
|
|
12
|
-
Col = _Grid.Col;
|
|
13
10
|
/**
|
|
14
11
|
* 节点大小组件
|
|
15
12
|
*
|
|
@@ -22,11 +19,13 @@ function SizeInput(props) {
|
|
|
22
19
|
max = props.max,
|
|
23
20
|
step = props.step,
|
|
24
21
|
onChange = props.onChange,
|
|
25
|
-
lock = props.lock,
|
|
26
|
-
onLockChange = props.onLockChange,
|
|
27
22
|
_props$showLabel = props.showLabel,
|
|
28
23
|
showLabel = _props$showLabel === void 0 ? true : _props$showLabel,
|
|
29
|
-
|
|
24
|
+
numberPickerProps = props.numberPickerProps,
|
|
25
|
+
size = props.size,
|
|
26
|
+
lock = props.lock,
|
|
27
|
+
disabled = props.disabled,
|
|
28
|
+
onLockChange = props.onLockChange;
|
|
30
29
|
|
|
31
30
|
var handleChange = function handleChange(name, attrValue) {
|
|
32
31
|
var _extends2;
|
|
@@ -45,6 +44,18 @@ function SizeInput(props) {
|
|
|
45
44
|
return val ? Math.round(val) : val;
|
|
46
45
|
}
|
|
47
46
|
|
|
47
|
+
var renderLock = function renderLock() {
|
|
48
|
+
var imgSrc = "/img/topo/editor/toolbar/" + (lock ? 'lock' : 'unlock') + "/" + (disabled ? 'Disable' : 'Normal') + ".svg";
|
|
49
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
50
|
+
className: styles.lockBtn,
|
|
51
|
+
onClick: switchLock
|
|
52
|
+
}, /*#__PURE__*/React.createElement("img", {
|
|
53
|
+
src: imgSrc,
|
|
54
|
+
alt: "",
|
|
55
|
+
width: 8
|
|
56
|
+
}));
|
|
57
|
+
};
|
|
58
|
+
|
|
48
59
|
return /*#__PURE__*/React.createElement(_Form, {
|
|
49
60
|
labelAlign: "top",
|
|
50
61
|
component: "div",
|
|
@@ -65,27 +76,24 @@ function SizeInput(props) {
|
|
|
65
76
|
style: {
|
|
66
77
|
marginBottom: 0
|
|
67
78
|
}
|
|
68
|
-
}, /*#__PURE__*/React.createElement(NodeSizeNumberPicker, {
|
|
79
|
+
}, /*#__PURE__*/React.createElement(NodeSizeNumberPicker, _extends({
|
|
69
80
|
value: parseValue(value.width),
|
|
70
81
|
label: showLabel ? '宽:' : '',
|
|
82
|
+
innerAfter: showLabel ? undefined : 'W',
|
|
71
83
|
min: 1,
|
|
72
84
|
max: max,
|
|
73
85
|
step: step,
|
|
86
|
+
disabled: disabled,
|
|
74
87
|
placeholder: "\u8BF7\u8F93\u5165",
|
|
75
|
-
size: size
|
|
88
|
+
size: size
|
|
89
|
+
}, numberPickerProps, {
|
|
76
90
|
style: {
|
|
77
91
|
width: '100%'
|
|
78
92
|
},
|
|
79
93
|
onChange: function onChange(val) {
|
|
80
94
|
return handleChange('width', val);
|
|
81
95
|
}
|
|
82
|
-
}))), /*#__PURE__*/React.createElement("div", {
|
|
83
|
-
className: styles.lockBtn,
|
|
84
|
-
onClick: switchLock
|
|
85
|
-
}, /*#__PURE__*/React.createElement("img", {
|
|
86
|
-
src: require(lock ? './img/icon_锁.svg' : './img/icon_解锁.svg'),
|
|
87
|
-
alt: ""
|
|
88
|
-
})), /*#__PURE__*/React.createElement("div", {
|
|
96
|
+
})))), renderLock(), /*#__PURE__*/React.createElement("div", {
|
|
89
97
|
style: {
|
|
90
98
|
flex: 1
|
|
91
99
|
}
|
|
@@ -95,22 +103,24 @@ function SizeInput(props) {
|
|
|
95
103
|
style: {
|
|
96
104
|
marginBottom: 0
|
|
97
105
|
}
|
|
98
|
-
}, /*#__PURE__*/React.createElement(NodeSizeNumberPicker, {
|
|
106
|
+
}, /*#__PURE__*/React.createElement(NodeSizeNumberPicker, _extends({
|
|
99
107
|
value: parseValue(value.height),
|
|
100
|
-
label: showLabel ? '高:' : ''
|
|
101
|
-
,
|
|
108
|
+
label: showLabel ? '高:' : '',
|
|
109
|
+
innerAfter: showLabel ? undefined : 'H',
|
|
102
110
|
min: 1,
|
|
103
111
|
max: max,
|
|
104
112
|
step: step,
|
|
113
|
+
disabled: disabled,
|
|
105
114
|
placeholder: "\u8BF7\u8F93\u5165",
|
|
106
|
-
size: size
|
|
115
|
+
size: size
|
|
116
|
+
}, numberPickerProps, {
|
|
107
117
|
style: {
|
|
108
118
|
width: '100%'
|
|
109
119
|
},
|
|
110
120
|
onChange: function onChange(val) {
|
|
111
121
|
return handleChange('height', val);
|
|
112
122
|
}
|
|
113
|
-
}))))));
|
|
123
|
+
})))))));
|
|
114
124
|
}
|
|
115
125
|
|
|
116
126
|
SizeInput.propTypes = {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import _NumberPicker from "@alifd/next/es/number-picker";
|
|
2
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
3
3
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
|
|
4
|
-
var _excluded = ["value", "onChange", "min", "onBlur", "onKeyDown"];
|
|
5
|
-
import React, { useState, useEffect } from
|
|
4
|
+
var _excluded = ["value", "onChange", "min", "onBlur", "onKeyDown", "disabled"];
|
|
5
|
+
import React, { useState, useEffect } from "react";
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* 节点大小组件
|
|
@@ -16,6 +16,7 @@ export default function NodeSizeNumberPicker(props) {
|
|
|
16
16
|
min = props.min,
|
|
17
17
|
onBlur = props.onBlur,
|
|
18
18
|
onKeyDown = props.onKeyDown,
|
|
19
|
+
disabled = props.disabled,
|
|
19
20
|
otherProps = _objectWithoutPropertiesLoose(props, _excluded);
|
|
20
21
|
|
|
21
22
|
var _useState = useState(value),
|
|
@@ -48,13 +49,13 @@ export default function NodeSizeNumberPicker(props) {
|
|
|
48
49
|
|
|
49
50
|
var handleChange = function handleChange(value, e) {
|
|
50
51
|
// 失去焦点最大最小值
|
|
51
|
-
if (e.type ===
|
|
52
|
+
if (e.type === "blur") {
|
|
52
53
|
onChange(!value ? min : value);
|
|
53
54
|
return;
|
|
54
55
|
} // 加减号立即变更
|
|
55
56
|
|
|
56
57
|
|
|
57
|
-
if (e.triggerType ===
|
|
58
|
+
if (e.triggerType === "up" || e.triggerType === "down") {
|
|
58
59
|
onChange(value);
|
|
59
60
|
return;
|
|
60
61
|
}
|
|
@@ -65,9 +66,9 @@ export default function NodeSizeNumberPicker(props) {
|
|
|
65
66
|
return /*#__PURE__*/React.createElement(_NumberPicker, _extends({}, otherProps, {
|
|
66
67
|
value: inputValue,
|
|
67
68
|
min: min,
|
|
69
|
+
disabled: disabled,
|
|
68
70
|
onChange: handleChange,
|
|
69
71
|
onBlur: handleBlur,
|
|
70
72
|
onKeyDown: handleKeyDown
|
|
71
73
|
}));
|
|
72
|
-
}
|
|
73
|
-
;
|
|
74
|
+
}
|
package/es/core/editor/components/settings/propertyViews/group/SettingTab/GroupExpandSetting.js
CHANGED
|
@@ -71,13 +71,5 @@ export default function GroupExpandSetting(props) {
|
|
|
71
71
|
setExpanded: function setExpanded(val) {
|
|
72
72
|
return group.setExpanded(val);
|
|
73
73
|
}
|
|
74
|
-
}))), /*#__PURE__*/React.createElement(CollapsePanel, {
|
|
75
|
-
key: "\u5BF9\u9F50\u65B9\u5F0F",
|
|
76
|
-
title: "\u5BF9\u9F50\u65B9\u5F0F"
|
|
77
|
-
}, /*#__PURE__*/React.createElement(_Form.Item, {
|
|
78
|
-
label: ""
|
|
79
|
-
}, /*#__PURE__*/React.createElement(AlignSetting, {
|
|
80
|
-
onChange: alignOnChange,
|
|
81
|
-
selected: "left"
|
|
82
74
|
}))));
|
|
83
75
|
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
2
|
+
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
3
|
+
import React, { useState, useEffect } from 'react';
|
|
4
|
+
import ResourceSelectDrawer from "../../../../../../../components/NetworkTopoResourceSelectDrawer";
|
|
5
|
+
|
|
6
|
+
var LayerAddResourceDrawer = function LayerAddResourceDrawer(props) {
|
|
7
|
+
var visible = props.visible,
|
|
8
|
+
layer = props.layer,
|
|
9
|
+
topo = props.topo,
|
|
10
|
+
topoEdit = props.topoEdit,
|
|
11
|
+
onClose = props.onClose;
|
|
12
|
+
|
|
13
|
+
var onOk = /*#__PURE__*/function () {
|
|
14
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(selected) {
|
|
15
|
+
var layerData;
|
|
16
|
+
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
17
|
+
while (1) {
|
|
18
|
+
switch (_context.prev = _context.next) {
|
|
19
|
+
case 0:
|
|
20
|
+
layerData = {
|
|
21
|
+
id: layer.tag,
|
|
22
|
+
tag: layer.attrObject.tag
|
|
23
|
+
};
|
|
24
|
+
_context.next = 3;
|
|
25
|
+
return topoEdit.addLayerResources(layerData, selected);
|
|
26
|
+
|
|
27
|
+
case 3:
|
|
28
|
+
case "end":
|
|
29
|
+
return _context.stop();
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}, _callee);
|
|
33
|
+
}));
|
|
34
|
+
|
|
35
|
+
return function onOk(_x) {
|
|
36
|
+
return _ref.apply(this, arguments);
|
|
37
|
+
};
|
|
38
|
+
}();
|
|
39
|
+
|
|
40
|
+
return /*#__PURE__*/React.createElement(ResourceSelectDrawer, {
|
|
41
|
+
visible: visible,
|
|
42
|
+
getExcludeIds: topoEdit.getAllNodeResourceIds,
|
|
43
|
+
onOk: onOk,
|
|
44
|
+
onClose: onClose
|
|
45
|
+
});
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
export default LayerAddResourceDrawer;
|
package/es/core/editor/components/settings/propertyViews/layer/DataTab/LayerAddResourceButton.js
CHANGED
|
@@ -1,35 +1,29 @@
|
|
|
1
|
-
import React
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import useLayerAddResource from "../../../../../hooks/useLayerAddResource";
|
|
2
3
|
import AddResourceButton from "../../../common/AddResourceButton";
|
|
3
4
|
import LayerAddResourceDrawer from "./LayerAddResourceDrawer";
|
|
4
5
|
export default function LayerAddResourceButton(props) {
|
|
5
6
|
var topo = props.topo,
|
|
6
|
-
|
|
7
|
+
editorProps = props.editorProps,
|
|
7
8
|
layerData = props.layerData,
|
|
8
|
-
CustomAddResourceDrawer = props.addResourceDrawer,
|
|
9
9
|
onAdd = props.onAdd,
|
|
10
10
|
topoEdit = props.topoEdit;
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
var AddResourceDrawer = CustomAddResourceDrawer || LayerAddResourceDrawer;
|
|
11
|
+
var layerAddResource = useLayerAddResource({
|
|
12
|
+
topo: topo,
|
|
13
|
+
topoEdit: topoEdit,
|
|
14
|
+
layerData: layerData
|
|
15
|
+
});
|
|
17
16
|
|
|
18
17
|
var handleClick = function handleClick() {
|
|
19
|
-
|
|
18
|
+
layerAddResource.open();
|
|
20
19
|
};
|
|
21
20
|
|
|
22
21
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(AddResourceButton, {
|
|
23
22
|
onClick: handleClick
|
|
24
|
-
}), /*#__PURE__*/React.createElement(
|
|
25
|
-
visible: drawerVisible,
|
|
23
|
+
}), /*#__PURE__*/React.createElement(LayerAddResourceDrawer, {
|
|
26
24
|
layer: layerData,
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
onClose: function onClose() {
|
|
30
|
-
setDrawerVisible(false);
|
|
31
|
-
},
|
|
32
|
-
setVisible: setDrawerVisible
|
|
25
|
+
editorProps: editorProps,
|
|
26
|
+
layerAddResource: layerAddResource
|
|
33
27
|
}));
|
|
34
28
|
}
|
|
35
29
|
;
|
package/es/core/editor/components/settings/propertyViews/layer/DataTab/LayerAddResourceDrawer.js
CHANGED
|
@@ -1,48 +1,15 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
var
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(selected) {
|
|
15
|
-
var layerData;
|
|
16
|
-
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
17
|
-
while (1) {
|
|
18
|
-
switch (_context.prev = _context.next) {
|
|
19
|
-
case 0:
|
|
20
|
-
layerData = {
|
|
21
|
-
id: layer.tag,
|
|
22
|
-
tag: layer.attrObject.tag
|
|
23
|
-
};
|
|
24
|
-
_context.next = 3;
|
|
25
|
-
return topoEdit.addLayerResources(layerData, selected);
|
|
26
|
-
|
|
27
|
-
case 3:
|
|
28
|
-
case "end":
|
|
29
|
-
return _context.stop();
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
}, _callee);
|
|
33
|
-
}));
|
|
34
|
-
|
|
35
|
-
return function onOk(_x) {
|
|
36
|
-
return _ref.apply(this, arguments);
|
|
37
|
-
};
|
|
38
|
-
}();
|
|
39
|
-
|
|
40
|
-
return /*#__PURE__*/React.createElement(ResourceSelectDrawer, {
|
|
41
|
-
visible: visible,
|
|
42
|
-
getExcludeIds: topoEdit.getAllNodeResourceIds,
|
|
43
|
-
onOk: onOk,
|
|
44
|
-
onClose: onClose
|
|
45
|
-
});
|
|
46
|
-
};
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import DefaultLayerAddResourceDrawer from "./DefaultLayerAddResourceDrawer";
|
|
4
|
+
|
|
5
|
+
function LayerAddResourceDrawer(props) {
|
|
6
|
+
var layer = props.layer,
|
|
7
|
+
editorProps = props.editorProps,
|
|
8
|
+
layerAddResource = props.layerAddResource;
|
|
9
|
+
var AddResourceDrawer = (editorProps === null || editorProps === void 0 ? void 0 : editorProps.layerResourceSelectComponent) || DefaultLayerAddResourceDrawer;
|
|
10
|
+
return /*#__PURE__*/React.createElement(AddResourceDrawer, _extends({
|
|
11
|
+
layer: layer
|
|
12
|
+
}, layerAddResource.drawerProps));
|
|
13
|
+
}
|
|
47
14
|
|
|
48
15
|
export default LayerAddResourceDrawer;
|
|
@@ -18,9 +18,10 @@ export default function LayerRelateData(props) {
|
|
|
18
18
|
title: "\u5173\u8054\u8D44\u6E90",
|
|
19
19
|
extra: /*#__PURE__*/React.createElement(LayerAddResourceButton, {
|
|
20
20
|
topo: topo,
|
|
21
|
+
topoEdit: topoEditApi,
|
|
22
|
+
editorProps: editorProps,
|
|
21
23
|
layer: layer,
|
|
22
24
|
layerData: values,
|
|
23
|
-
topoEdit: topoEditApi,
|
|
24
25
|
onAdd: function onAdd() {
|
|
25
26
|
/* TODO 刷新列表 refreshList */
|
|
26
27
|
},
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
import rlog from
|
|
3
|
-
import React, { useState, useEffect, useRef, useCallback, useMemo } from
|
|
2
|
+
import rlog from "@riil-frontend/component-topology-utils/es/rlog";
|
|
3
|
+
import React, { useState, useEffect, useRef, useCallback, useMemo } from "react";
|
|
4
4
|
import SizeInput from "../../../common/SizeInput";
|
|
5
5
|
|
|
6
6
|
var NodesSizeRatioMap = /*#__PURE__*/function () {
|
|
@@ -80,7 +80,7 @@ export default function BatchSetNodeSize(props) {
|
|
|
80
80
|
if (lock) {
|
|
81
81
|
var _setSize;
|
|
82
82
|
|
|
83
|
-
setSize((_setSize = {}, _setSize[name] = value, _setSize[name ===
|
|
83
|
+
setSize((_setSize = {}, _setSize[name] = value, _setSize[name === "width" ? "height" : "width"] = undefined, _setSize));
|
|
84
84
|
} else {
|
|
85
85
|
var _extends2;
|
|
86
86
|
|
|
@@ -89,10 +89,10 @@ export default function BatchSetNodeSize(props) {
|
|
|
89
89
|
|
|
90
90
|
topo.historyManager.beginTransaction();
|
|
91
91
|
nodes.forEach(function (node) {
|
|
92
|
-
if (name ===
|
|
92
|
+
if (name === "width") {
|
|
93
93
|
if (lock) {
|
|
94
94
|
var height = nodesSizeRatioMap.getNodeHeight(node, value);
|
|
95
|
-
rlog.debug(
|
|
95
|
+
rlog.debug("多元素锁定设置宽", node, value, height);
|
|
96
96
|
node.setHeight(height);
|
|
97
97
|
}
|
|
98
98
|
|
|
@@ -117,11 +117,10 @@ export default function BatchSetNodeSize(props) {
|
|
|
117
117
|
nodesSizeRatioMap.reset();
|
|
118
118
|
};
|
|
119
119
|
|
|
120
|
-
return /*#__PURE__*/React.createElement(SizeInput, {
|
|
120
|
+
return /*#__PURE__*/React.createElement(SizeInput, _extends({}, props, {
|
|
121
121
|
value: size,
|
|
122
122
|
lock: lock,
|
|
123
123
|
onChange: handleChange,
|
|
124
124
|
onLockChange: onLockChange
|
|
125
|
-
});
|
|
126
|
-
}
|
|
127
|
-
;
|
|
125
|
+
}));
|
|
126
|
+
}
|
package/es/core/editor/components/settings/propertyViews/multipleElements/MultipleElementLineType.js
CHANGED
|
@@ -1,52 +1,15 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import LineType from "
|
|
2
|
+
import { getEdgesBySelection, setEdgesType } from "../../../../utils/edgeTypeStyleUtil";
|
|
3
|
+
import LineType from "../../../Toolbar/widgets/EdgeTypeButton/LineType";
|
|
4
4
|
export default function MultipleElementLineType(props) {
|
|
5
5
|
var topo = props.topo;
|
|
6
6
|
|
|
7
|
-
var setLineType = function setLineType(type) {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
var nodeIds = nodes.map(function (node) {
|
|
11
|
-
return node.getId();
|
|
12
|
-
});
|
|
13
|
-
nodes.forEach(function (node) {
|
|
14
|
-
if (node instanceof ht.Group) {
|
|
15
|
-
var children = node.getChildren().toArray();
|
|
16
|
-
nodeIds.push.apply(nodeIds, getChildrenNodeIds(children));
|
|
17
|
-
}
|
|
18
|
-
});
|
|
19
|
-
return nodeIds;
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
var getSelectedEdges = function getSelectedEdges() {
|
|
23
|
-
var gv = topo.getGraphView();
|
|
24
|
-
var selection = gv.getSelectionModel().getSelection().toArray();
|
|
25
|
-
var edges = selection.filter(function (element) {
|
|
26
|
-
return element instanceof ht.Edge;
|
|
27
|
-
}); // 查询选中节点间的连线
|
|
28
|
-
|
|
29
|
-
var nodes = selection.filter(function (element) {
|
|
30
|
-
return element instanceof ht.Node;
|
|
31
|
-
});
|
|
32
|
-
var nodeIds = getChildrenNodeIds(nodes);
|
|
33
|
-
var dm = gv.getDataModel();
|
|
34
|
-
getEdges(dm).forEach(function (edge) {
|
|
35
|
-
if (nodeIds.find(function (nodeId) {
|
|
36
|
-
return nodeId === edge.getSource().getId();
|
|
37
|
-
}) && nodeIds.find(function (nodeId) {
|
|
38
|
-
return nodeId === edge.getTarget().getId();
|
|
39
|
-
}) && !edges.find(function (item) {
|
|
40
|
-
return item === edge;
|
|
41
|
-
})) {
|
|
42
|
-
edges.push(edge);
|
|
43
|
-
}
|
|
44
|
-
});
|
|
45
|
-
return edges;
|
|
7
|
+
var setLineType = function setLineType(type) {
|
|
8
|
+
var edges = getEdgesBySelection(topo);
|
|
9
|
+
setEdgesType(edges, type, topo);
|
|
46
10
|
};
|
|
47
11
|
|
|
48
12
|
return /*#__PURE__*/React.createElement(LineType, {
|
|
49
|
-
getEdges: getSelectedEdges,
|
|
50
13
|
onChange: setLineType,
|
|
51
14
|
topo: topo
|
|
52
15
|
});
|
|
@@ -34,19 +34,7 @@ export default function MultipleElementPropertyView(props) {
|
|
|
34
34
|
|
|
35
35
|
useEffect(function () {
|
|
36
36
|
field.setValues(values);
|
|
37
|
-
}, [values]);
|
|
38
|
-
|
|
39
|
-
var alignOnChange = function alignOnChange(v) {
|
|
40
|
-
// console.log('setAlignmentBySelectionNodes', v);
|
|
41
|
-
topo.historyManager.beginTransaction();
|
|
42
|
-
topo.getHtTopo().setAlignmentBySelectionNodes(v);
|
|
43
|
-
|
|
44
|
-
_onChange('groupAlign', v); // topoEditApi.setAlignmentBySelectionNodes(v);
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
topo.historyManager.endTransaction();
|
|
48
|
-
}; // TODO 临时方案,满足应用部署拓扑多选元素属性面板不显示对齐
|
|
49
|
-
|
|
37
|
+
}, [values]); // TODO 临时方案,满足应用部署拓扑多选元素属性面板不显示对齐
|
|
50
38
|
|
|
51
39
|
if (!(editorProps !== null && editorProps !== void 0 && (_editorProps$multiple = editorProps.multipleElementPropertyViewProps) !== null && _editorProps$multiple !== void 0 && _editorProps$multiple.showElementAlign) && topoShowType === TPL_TREE) {
|
|
52
40
|
return /*#__PURE__*/React.createElement(ViewPropertyView, props);
|
|
@@ -78,8 +66,7 @@ export default function MultipleElementPropertyView(props) {
|
|
|
78
66
|
key: "\u5BF9\u9F50\u65B9\u5F0F",
|
|
79
67
|
title: "\u5BF9\u9F50\u65B9\u5F0F"
|
|
80
68
|
}, /*#__PURE__*/React.createElement(AlignSetting, {
|
|
81
|
-
|
|
82
|
-
selected: "left"
|
|
69
|
+
topo: topo
|
|
83
70
|
})), /*#__PURE__*/React.createElement(CollapsePanel, {
|
|
84
71
|
key: "\u7EBF\u5F62",
|
|
85
72
|
title: "\u7EBF\u5F62"
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
import React, { useState, useEffect, useRef, useCallback } from
|
|
3
|
-
import SizeInput from "../../common/SizeInput";
|
|
2
|
+
import React, { useState, useEffect, useRef, useCallback } from "react";
|
|
3
|
+
import SizeInput from "../../common/SizeInput"; // 这个似乎不需要了
|
|
4
|
+
|
|
4
5
|
export default function BatchSetNodeSize(props) {
|
|
5
|
-
var
|
|
6
|
+
var value = props.value,
|
|
7
|
+
size = props.size,
|
|
8
|
+
disabled = props.disabled;
|
|
6
9
|
return /*#__PURE__*/React.createElement(SizeInput, _extends({}, props, {
|
|
7
|
-
|
|
10
|
+
disabled: disabled,
|
|
11
|
+
value: value
|
|
8
12
|
}));
|
|
9
|
-
}
|
|
10
|
-
;
|
|
13
|
+
}
|