@riil-frontend/component-topology 6.0.0-alpha.3 → 6.0.0-alpha.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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 +8 -0
- package/es/components/ColorPanel/components/FontColorRange/index.js +35 -0
- package/es/components/ColorPanel/components/FontColorRange/index.module.scss +23 -0
- package/es/components/ColorPanel/index.js +237 -0
- package/es/components/ColorPanel/index.module.scss +34 -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 +23 -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 +6 -2
- 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 +20 -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/Sidebar/Sidebar.js +40 -50
- package/es/core/editor/components/Sidebar/panes.js +32 -0
- 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 +3 -3
- package/es/core/editor/components/Sidebar/views/ImagePanel/HtCustomImagePanel.js +2 -5
- package/es/core/editor/components/Sidebar/views/ImagePanel/HtImagePalette.js +2 -4
- 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/hooks/useFontStyleSetting.js +35 -0
- package/es/core/editor/components/Toolbar/widgets/AddResourceButton.js +8 -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 +36 -2
- package/es/core/editor/components/Toolbar/widgets/EdgeColorButton/EdgeColorButton.js +76 -5
- 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 +128 -15
- package/es/core/editor/components/Toolbar/widgets/NodeAlignWidget.js +115 -22
- package/es/core/editor/components/Toolbar/widgets/NodeAlignWidget.module.scss +12 -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 +94 -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 +4 -2
- package/es/core/editor/components/Toolbar/widgets/components/DropdownButton.js +8 -5
- package/es/core/editor/components/settings/CloseablePanel.js +28 -0
- package/es/core/editor/components/settings/OpenPropertyPanelListener.js +33 -0
- package/es/core/editor/components/settings/PropertyView.js +27 -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/AlignTypeList.js +76 -0
- package/es/core/editor/components/settings/common/AlignSetting/index.js +20 -71
- 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/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/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/hooks/useCanvasTheme.js +35 -0
- package/es/core/hooks/useTopoEdit.js +38 -58
- package/es/core/models/Alarm.js +2 -2
- 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/store/models/topoBizMod.js +0 -3
- package/es/core/store/models/topoMod.js +26 -28
- 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/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 +23 -0
- package/lib/components/ColorPanel/index.js +255 -0
- package/lib/components/ColorPanel/index.module.scss +34 -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 +23 -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 +7 -2
- 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 +30 -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/Sidebar/Sidebar.js +39 -53
- package/lib/core/editor/components/Sidebar/panes.js +45 -0
- 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 +1 -1
- package/lib/core/editor/components/Sidebar/views/ImagePanel/HtCustomImagePanel.js +2 -5
- package/lib/core/editor/components/Sidebar/views/ImagePanel/HtImagePalette.js +3 -4
- 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/hooks/useFontStyleSetting.js +50 -0
- package/lib/core/editor/components/Toolbar/widgets/AddResourceButton.js +8 -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 +38 -2
- package/lib/core/editor/components/Toolbar/widgets/EdgeColorButton/EdgeColorButton.js +77 -5
- 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 +133 -16
- package/lib/core/editor/components/Toolbar/widgets/NodeAlignWidget.js +118 -22
- package/lib/core/editor/components/Toolbar/widgets/NodeAlignWidget.module.scss +12 -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 +96 -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 +4 -2
- package/lib/core/editor/components/Toolbar/widgets/components/DropdownButton.js +8 -5
- package/lib/core/editor/components/settings/CloseablePanel.js +40 -0
- package/lib/core/editor/components/settings/OpenPropertyPanelListener.js +43 -0
- package/lib/core/editor/components/settings/PropertyView.js +30 -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/AlignTypeList.js +93 -0
- package/lib/core/editor/components/settings/common/AlignSetting/index.js +21 -79
- 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/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/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/hooks/useCanvasTheme.js +49 -0
- package/lib/core/hooks/useTopoEdit.js +39 -60
- package/lib/core/models/Alarm.js +2 -2
- 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/store/models/topoBizMod.js +0 -3
- package/lib/core/store/models/topoMod.js +27 -29
- 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/topoData.js +1 -0
- package/package.json +4 -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
@@ -2,7 +2,6 @@ import _Message from "@alifd/next/es/message";
|
|
2
2
|
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
3
3
|
import _extends from "@babel/runtime/helpers/extends";
|
4
4
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
5
|
-
import topoService from "../services";
|
6
5
|
import rlog from '@riil-frontend/component-topology-utils/es/rlog';
|
7
6
|
import { formatTree, loopTree, loopTreeFun, findParentIdsById, treeNodeCount } from "../../utils/tree";
|
8
7
|
|
@@ -88,7 +87,7 @@ export default function (topoApp) {
|
|
88
87
|
}
|
89
88
|
|
90
89
|
_context2.next = 4;
|
91
|
-
return
|
90
|
+
return topoApp.serverApi.getTopoTree();
|
92
91
|
|
93
92
|
case 4:
|
94
93
|
resTreeData = _context2.sent;
|
@@ -97,7 +96,7 @@ export default function (topoApp) {
|
|
97
96
|
|
98
97
|
case 7:
|
99
98
|
_context2.next = 9;
|
100
|
-
return
|
99
|
+
return topoApp.serverApi.getTopoTreeByLoginUser();
|
101
100
|
|
102
101
|
case 9:
|
103
102
|
resTreeData = _context2.sent;
|
@@ -163,7 +162,7 @@ export default function (topoApp) {
|
|
163
162
|
|
164
163
|
rlog.debug('editTopoOnTree', conditions);
|
165
164
|
_context4.next = 4;
|
166
|
-
return
|
165
|
+
return topoApp.serverApi.editTopoonTree(parseInt(conditions.id, 10), conditions.name, conditions.type);
|
167
166
|
|
168
167
|
case 4:
|
169
168
|
resTreeData = _context4.sent;
|
@@ -247,7 +246,7 @@ export default function (topoApp) {
|
|
247
246
|
|
248
247
|
case 8:
|
249
248
|
_context5.next = 10;
|
250
|
-
return
|
249
|
+
return topoApp.serverApi.deleteTopoonTree(parseInt(conditions, 10));
|
251
250
|
|
252
251
|
case 10:
|
253
252
|
return _context5.abrupt("return", _context5.sent);
|
@@ -271,7 +270,7 @@ export default function (topoApp) {
|
|
271
270
|
|
272
271
|
case 18:
|
273
272
|
_context5.next = 20;
|
274
|
-
return
|
273
|
+
return topoApp.serverApi.deleteTopoonTree(parseInt(conditions, 10));
|
275
274
|
|
276
275
|
case 20:
|
277
276
|
return _context5.abrupt("return", _context5.sent);
|
@@ -299,7 +298,7 @@ export default function (topoApp) {
|
|
299
298
|
|
300
299
|
rlog.debug('setDefTopoOnTree', conditions);
|
301
300
|
_context6.next = 4;
|
302
|
-
return
|
301
|
+
return topoApp.serverApi.setDefTopo(parseInt(conditions, 10));
|
303
302
|
|
304
303
|
case 4:
|
305
304
|
resTreeData = _context6.sent;
|
package/es/style.js
CHANGED
package/es/utils/topoData.js
CHANGED
@@ -317,6 +317,7 @@ function buildGlobal(_ref2) {
|
|
317
317
|
showLinkName: false,
|
318
318
|
// 是否显示链路名称
|
319
319
|
nodeLabelStyle: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.nodeLabelStyle,
|
320
|
+
defaultEdgeLabelStyle: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.defaultEdgeLabelStyle,
|
320
321
|
edgeFlow: edgeFlow
|
321
322
|
}, (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.topoDisplayConfig) || {}, (result === null || result === void 0 ? void 0 : (_result$customGlobal2 = result.customGlobal) === null || _result$customGlobal2 === void 0 ? void 0 : _result$customGlobal2.topoDisplayConfig) || {}),
|
322
323
|
linkTo: linkTo,
|
@@ -0,0 +1,47 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
4
|
+
|
5
|
+
exports.__esModule = true;
|
6
|
+
exports["default"] = void 0;
|
7
|
+
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
9
|
+
|
10
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
11
|
+
|
12
|
+
var _indexModule = _interopRequireDefault(require("./index.module.scss"));
|
13
|
+
|
14
|
+
/**
|
15
|
+
* 颜色选择
|
16
|
+
*
|
17
|
+
* @param props
|
18
|
+
* @return {*}
|
19
|
+
* @constructor
|
20
|
+
*/
|
21
|
+
function ColorBlock(props) {
|
22
|
+
var color = props.color,
|
23
|
+
onChange = props.onChange,
|
24
|
+
index = props.index;
|
25
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
26
|
+
style: {
|
27
|
+
background: color.color,
|
28
|
+
borderColor: color.borderColor
|
29
|
+
},
|
30
|
+
className: _indexModule["default"].content,
|
31
|
+
onClick: function onClick() {
|
32
|
+
onChange(color.color, 'select', index);
|
33
|
+
}
|
34
|
+
}, "\xA0");
|
35
|
+
}
|
36
|
+
|
37
|
+
ColorBlock.propTypes = {
|
38
|
+
color: _propTypes["default"].object,
|
39
|
+
// eslint-disable-next-line react/no-unused-prop-types
|
40
|
+
onChange: _propTypes["default"].func
|
41
|
+
};
|
42
|
+
ColorBlock.defaultProps = {
|
43
|
+
color: {},
|
44
|
+
onChange: function onChange() {}
|
45
|
+
};
|
46
|
+
var _default = ColorBlock;
|
47
|
+
exports["default"] = _default;
|
@@ -0,0 +1,49 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
4
|
+
|
5
|
+
exports.__esModule = true;
|
6
|
+
exports["default"] = void 0;
|
7
|
+
|
8
|
+
var _range = _interopRequireDefault(require("@alifd/next/lib/range"));
|
9
|
+
|
10
|
+
var _react = _interopRequireWildcard(require("react"));
|
11
|
+
|
12
|
+
var _indexModule = _interopRequireDefault(require("./index.module.scss"));
|
13
|
+
|
14
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
15
|
+
|
16
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
17
|
+
|
18
|
+
function FontColorRange(props) {
|
19
|
+
var onChange = props.onChange,
|
20
|
+
_props$unit = props.unit,
|
21
|
+
unit = _props$unit === void 0 ? 'px' : _props$unit,
|
22
|
+
list = props.list,
|
23
|
+
max = props.max,
|
24
|
+
min = props.min,
|
25
|
+
defaultValue = props.defaultValue;
|
26
|
+
|
27
|
+
var _useState = (0, _react.useState)(defaultValue),
|
28
|
+
value = _useState[0],
|
29
|
+
setValue = _useState[1];
|
30
|
+
|
31
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
32
|
+
className: _indexModule["default"].content
|
33
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
34
|
+
className: _indexModule["default"].range
|
35
|
+
}, /*#__PURE__*/_react["default"].createElement(_range["default"], {
|
36
|
+
defaultValue: value,
|
37
|
+
min: min,
|
38
|
+
max: max,
|
39
|
+
marks: list,
|
40
|
+
hasTip: false,
|
41
|
+
onChange: onChange,
|
42
|
+
onProcess: setValue
|
43
|
+
})), /*#__PURE__*/_react["default"].createElement("div", {
|
44
|
+
className: _indexModule["default"].unit
|
45
|
+
}, value, unit));
|
46
|
+
}
|
47
|
+
|
48
|
+
var _default = FontColorRange;
|
49
|
+
exports["default"] = _default;
|
@@ -0,0 +1,23 @@
|
|
1
|
+
@import '~@alifd/next/variables.scss';
|
2
|
+
|
3
|
+
|
4
|
+
.content {
|
5
|
+
display: flex;
|
6
|
+
flex-direction: row;
|
7
|
+
width: 84%;
|
8
|
+
margin-left: 6%;
|
9
|
+
overflow: hidden;
|
10
|
+
.range {
|
11
|
+
flex: 1;
|
12
|
+
}
|
13
|
+
|
14
|
+
.unit {
|
15
|
+
margin-left: 10px;
|
16
|
+
}
|
17
|
+
|
18
|
+
:global {
|
19
|
+
.#{$css-prefix}range .#{$css-prefix}range-mark {
|
20
|
+
display: none;
|
21
|
+
}
|
22
|
+
}
|
23
|
+
}
|
@@ -0,0 +1,255 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
4
|
+
|
5
|
+
exports.__esModule = true;
|
6
|
+
exports["default"] = void 0;
|
7
|
+
|
8
|
+
var _balloon = _interopRequireDefault(require("@alifd/next/lib/balloon"));
|
9
|
+
|
10
|
+
var _react = _interopRequireWildcard(require("react"));
|
11
|
+
|
12
|
+
var _classnames4 = _interopRequireDefault(require("classnames"));
|
13
|
+
|
14
|
+
var _reactColor = require("react-color");
|
15
|
+
|
16
|
+
var _ColorBlock = _interopRequireDefault(require("./components/ColorBlock"));
|
17
|
+
|
18
|
+
var _indexModule = _interopRequireDefault(require("./index.module.scss"));
|
19
|
+
|
20
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
21
|
+
|
22
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
23
|
+
|
24
|
+
/* eslint-disable eqeqeq */
|
25
|
+
|
26
|
+
/* eslint-disable jsx-a11y/alt-text */
|
27
|
+
|
28
|
+
/**
|
29
|
+
* 颜色选择
|
30
|
+
*
|
31
|
+
* @param props
|
32
|
+
* @return {*}
|
33
|
+
* @constructor
|
34
|
+
*/
|
35
|
+
function ColorPanel(props) {
|
36
|
+
var _classnames2, _classnames3;
|
37
|
+
|
38
|
+
var value = props.value,
|
39
|
+
showClear = props.showClear,
|
40
|
+
dataSource = props.dataSource,
|
41
|
+
onChange = props.onChange,
|
42
|
+
onPickerFocus = props.onPickerFocus,
|
43
|
+
onPickerBlur = props.onPickerBlur;
|
44
|
+
|
45
|
+
var _useState = (0, _react.useState)(value),
|
46
|
+
data = _useState[0],
|
47
|
+
setData = _useState[1];
|
48
|
+
|
49
|
+
var _useState2 = (0, _react.useState)(),
|
50
|
+
active = _useState2[0],
|
51
|
+
setActive = _useState2[1];
|
52
|
+
|
53
|
+
var colorChange = function colorChange(value, type, key) {
|
54
|
+
setActive(key);
|
55
|
+
onChange(getColor16(value), type);
|
56
|
+
};
|
57
|
+
|
58
|
+
var changClick = function changClick(key) {
|
59
|
+
setActive(key);
|
60
|
+
};
|
61
|
+
|
62
|
+
var setColors = function setColors() {
|
63
|
+
// eslint-disable-next-line array-callback-return
|
64
|
+
return dataSource.map(function (item, index) {
|
65
|
+
// eslint-disable-next-line eqeqeq
|
66
|
+
if (showClear && index != 1 || !showClear) {
|
67
|
+
var _classnames;
|
68
|
+
|
69
|
+
// eslint-disable-next-line eqeqeq
|
70
|
+
return /*#__PURE__*/_react["default"].createElement("li", {
|
71
|
+
key: index,
|
72
|
+
className: (0, _classnames4["default"])(_indexModule["default"].li, (_classnames = {}, _classnames[_indexModule["default"].marginTop] = index == 6 || index == 12, _classnames[_indexModule["default"].active] = index == active, _classnames))
|
73
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
74
|
+
className: _indexModule["default"].liBox
|
75
|
+
}, /*#__PURE__*/_react["default"].createElement(_ColorBlock["default"], {
|
76
|
+
color: item,
|
77
|
+
onChange: colorChange,
|
78
|
+
index: index
|
79
|
+
})));
|
80
|
+
}
|
81
|
+
});
|
82
|
+
};
|
83
|
+
|
84
|
+
var handleChange = function handleChange(color) {
|
85
|
+
var prevValue = color.hex;
|
86
|
+
var rgb = color.rgb;
|
87
|
+
var rgba = "rgba(" + rgb.r + "," + rgb.g + "," + rgb.b + "," + rgb.a + ")";
|
88
|
+
|
89
|
+
if (data !== prevValue) {
|
90
|
+
setData(rgba);
|
91
|
+
onChange({
|
92
|
+
hex: prevValue,
|
93
|
+
rgb: rgb
|
94
|
+
}, 'change');
|
95
|
+
}
|
96
|
+
};
|
97
|
+
|
98
|
+
var getColor16 = function getColor16(color) {
|
99
|
+
var that = color;
|
100
|
+
|
101
|
+
if (/^(rgba|RGBA)/.test(color)) {
|
102
|
+
var aColor = that.replace(/(?:\(|\)|rgba|RGBA)*/g, '').split(',');
|
103
|
+
var strHex = '#';
|
104
|
+
|
105
|
+
for (var i = 0; i < 3; i++) {
|
106
|
+
var hex = Number(aColor[i]).toString(16);
|
107
|
+
|
108
|
+
if (hex.length < 2) {
|
109
|
+
hex = "0" + hex;
|
110
|
+
}
|
111
|
+
|
112
|
+
strHex += hex;
|
113
|
+
}
|
114
|
+
|
115
|
+
if (strHex.length !== 7) {
|
116
|
+
strHex = that;
|
117
|
+
}
|
118
|
+
|
119
|
+
return {
|
120
|
+
hex: strHex,
|
121
|
+
rgb: {
|
122
|
+
r: aColor[0],
|
123
|
+
g: aColor[1],
|
124
|
+
b: aColor[2],
|
125
|
+
a: aColor[3]
|
126
|
+
}
|
127
|
+
};
|
128
|
+
}
|
129
|
+
|
130
|
+
return that;
|
131
|
+
};
|
132
|
+
|
133
|
+
var defaultTrigger = /*#__PURE__*/_react["default"].createElement("div", {
|
134
|
+
className: _indexModule["default"].swatch,
|
135
|
+
style: {
|
136
|
+
background: value
|
137
|
+
}
|
138
|
+
}, /*#__PURE__*/_react["default"].createElement("img", {
|
139
|
+
src: "/img/topo/editor/toolbar/\u6587\u5B57\u989C\u8272\u53CA\u586B\u5145/\u66F4\u591A\u989C\u8272.svg",
|
140
|
+
alt: ""
|
141
|
+
}));
|
142
|
+
|
143
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
144
|
+
className: _indexModule["default"].content
|
145
|
+
}, /*#__PURE__*/_react["default"].createElement("ul", {
|
146
|
+
className: _indexModule["default"].ul
|
147
|
+
}, showClear && /*#__PURE__*/_react["default"].createElement("li", {
|
148
|
+
className: (0, _classnames4["default"])(_indexModule["default"].li, (_classnames2 = {}, _classnames2[_indexModule["default"].active] = active == '-1', _classnames2))
|
149
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
150
|
+
className: _indexModule["default"].liBox
|
151
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
152
|
+
className: _indexModule["default"].swatch,
|
153
|
+
onClick: function onClick() {
|
154
|
+
colorChange('noColor', 'select', '-1');
|
155
|
+
}
|
156
|
+
}, /*#__PURE__*/_react["default"].createElement("img", {
|
157
|
+
src: "/img/topo/editor/toolbar/\u6587\u5B57\u989C\u8272\u53CA\u586B\u5145/\u80CC\u666F\u900F\u660E.svg",
|
158
|
+
alt: ""
|
159
|
+
})))), setColors(), /*#__PURE__*/_react["default"].createElement("li", {
|
160
|
+
className: (0, _classnames4["default"])(_indexModule["default"].li, (_classnames3 = {}, _classnames3[_indexModule["default"].active] = active == '17', _classnames3))
|
161
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
162
|
+
className: _indexModule["default"].liBox,
|
163
|
+
onClick: function onClick() {
|
164
|
+
changClick('17');
|
165
|
+
}
|
166
|
+
}, /*#__PURE__*/_react["default"].createElement(_balloon["default"], {
|
167
|
+
trigger: defaultTrigger,
|
168
|
+
closable: false,
|
169
|
+
triggerType: "click",
|
170
|
+
animation: false,
|
171
|
+
followTrigger: true,
|
172
|
+
align: "rt",
|
173
|
+
alignEdge: true,
|
174
|
+
style: {
|
175
|
+
paddingBottom: 0
|
176
|
+
},
|
177
|
+
onBlur: onPickerBlur,
|
178
|
+
onFocus: onPickerFocus
|
179
|
+
}, /*#__PURE__*/_react["default"].createElement(_reactColor.SketchPicker, {
|
180
|
+
color: data // width={230}
|
181
|
+
,
|
182
|
+
disableAlpha: true,
|
183
|
+
styles: {
|
184
|
+
'default': {
|
185
|
+
picker: {
|
186
|
+
boxShadow: 'none',
|
187
|
+
padding: 0
|
188
|
+
}
|
189
|
+
}
|
190
|
+
},
|
191
|
+
onChange: handleChange
|
192
|
+
}))))));
|
193
|
+
}
|
194
|
+
|
195
|
+
ColorPanel.defaultProps = {
|
196
|
+
value: undefined,
|
197
|
+
showClear: false,
|
198
|
+
dataSource: [{
|
199
|
+
color: 'rgba(255, 255, 255, 1)',
|
200
|
+
borderColor: 'rgba(219, 219, 219, 1)'
|
201
|
+
}, {
|
202
|
+
color: 'rgba(245, 245, 245, 1)',
|
203
|
+
borderColor: 'rgba(208, 208, 208, 1)'
|
204
|
+
}, {
|
205
|
+
color: 'rgba(230, 230, 230, 1)',
|
206
|
+
borderColor: 'rgba(196, 196, 196, 1)'
|
207
|
+
}, {
|
208
|
+
color: 'rgba(168, 168, 168, 1)',
|
209
|
+
borderColor: 'rgba(146, 146, 146, 1)'
|
210
|
+
}, {
|
211
|
+
color: 'rgba(97, 97, 97, 1)',
|
212
|
+
borderColor: 'rgba(85, 85, 85, 1)'
|
213
|
+
}, {
|
214
|
+
color: 'rgba(49, 49, 49, 1)',
|
215
|
+
borderColor: 'rgba(43, 43, 43, 1)'
|
216
|
+
}, {
|
217
|
+
color: 'rgba(251, 115, 80, 1)',
|
218
|
+
borderColor: 'rgba(213, 98, 69, 1)'
|
219
|
+
}, {
|
220
|
+
color: 'rgba(255, 166, 41, 1)',
|
221
|
+
borderColor: 'rgba(219, 144, 45, 1)'
|
222
|
+
}, {
|
223
|
+
color: 'rgba(255, 205, 42, 1)',
|
224
|
+
borderColor: 'rgba(216, 175, 37, 1)'
|
225
|
+
}, {
|
226
|
+
color: 'rgba(18, 174, 92, 1)',
|
227
|
+
borderColor: 'rgba(23, 148, 79, 1)'
|
228
|
+
}, {
|
229
|
+
color: 'rgba(83, 184, 255, 1)',
|
230
|
+
borderColor: 'rgba(74, 156, 217, 1)'
|
231
|
+
}, {
|
232
|
+
color: 'rgba(183, 128, 255, 1)',
|
233
|
+
borderColor: 'rgba(155, 109, 216, 1)'
|
234
|
+
}, {
|
235
|
+
color: 'rgba(254, 192, 174, 1)',
|
236
|
+
borderColor: 'rgba(217, 163, 148, 1)'
|
237
|
+
}, {
|
238
|
+
color: 'rgba(252, 209, 156, 1)',
|
239
|
+
borderColor: 'rgba(215, 178, 133, 1)'
|
240
|
+
}, {
|
241
|
+
color: 'rgba(255, 232, 163, 1)',
|
242
|
+
borderColor: 'rgba(217, 198, 139, 1)'
|
243
|
+
}, {
|
244
|
+
color: 'rgba(176, 244, 197, 1)',
|
245
|
+
borderColor: 'rgba(153, 209, 171, 1)'
|
246
|
+
}, {
|
247
|
+
color: 'rgba(189, 227, 255, 1)',
|
248
|
+
borderColor: 'rgba(161, 193, 217, 1)'
|
249
|
+
}],
|
250
|
+
onChange: function onChange() {},
|
251
|
+
onPickerFocus: function onPickerFocus() {},
|
252
|
+
onPickerBlur: function onPickerBlur() {}
|
253
|
+
};
|
254
|
+
var _default = ColorPanel;
|
255
|
+
exports["default"] = _default;
|
@@ -0,0 +1,34 @@
|
|
1
|
+
@import '~@alifd/next/variables.scss';
|
2
|
+
|
3
|
+
.content{
|
4
|
+
width: 210px;
|
5
|
+
.ul{
|
6
|
+
width: 100%;
|
7
|
+
.li{
|
8
|
+
display: inline-block;
|
9
|
+
width: 34.6px;
|
10
|
+
line-height: 40px;
|
11
|
+
.liBox{
|
12
|
+
width: 31px;
|
13
|
+
height: 31px;
|
14
|
+
border-radius: 50%;
|
15
|
+
padding: 1px;
|
16
|
+
border: 2px solid #fff;
|
17
|
+
}
|
18
|
+
}
|
19
|
+
.li.active{
|
20
|
+
.liBox{
|
21
|
+
border-color: #4C89FF;
|
22
|
+
}
|
23
|
+
}
|
24
|
+
.marginTop{
|
25
|
+
margin-top: 6px;
|
26
|
+
}
|
27
|
+
}
|
28
|
+
}
|
29
|
+
.swatch{
|
30
|
+
width: 25px;
|
31
|
+
height: 25px;
|
32
|
+
border-radius: 50%;
|
33
|
+
overflow: hidden;
|
34
|
+
}
|
@@ -37,6 +37,10 @@
|
|
37
37
|
&:hover {
|
38
38
|
background-color: rgba(76, 137, 255, 0.1);
|
39
39
|
}
|
40
|
+
|
41
|
+
.tab-title {
|
42
|
+
margin-top: 3px;
|
43
|
+
}
|
40
44
|
}
|
41
45
|
}
|
42
46
|
}
|
@@ -45,9 +49,9 @@
|
|
45
49
|
.content {
|
46
50
|
width: 260px;
|
47
51
|
height: 100%;
|
48
|
-
transition: all .1s linear;
|
49
52
|
border-left: none !important;
|
50
53
|
border-right: 1px solid var(--tab-wrapped-border-line-color);
|
54
|
+
transition: width .1s linear;
|
51
55
|
|
52
56
|
:global {
|
53
57
|
.#{$css-prefix}tabs-tabpane {
|
@@ -5,11 +5,36 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
5
5
|
exports.__esModule = true;
|
6
6
|
exports["default"] = void 0;
|
7
7
|
|
8
|
+
var _collapse = _interopRequireDefault(require("@alifd/next/lib/collapse"));
|
9
|
+
|
10
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
11
|
+
|
12
|
+
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
|
13
|
+
|
8
14
|
var _react = _interopRequireDefault(require("react"));
|
9
15
|
|
10
|
-
|
11
|
-
|
16
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
17
|
+
|
18
|
+
var _Panel = _interopRequireDefault(require("./Panel"));
|
19
|
+
|
20
|
+
var _CollapseModule = _interopRequireDefault(require("./Collapse.module.scss"));
|
21
|
+
|
22
|
+
var _excluded = ["className", "accordion", "fullheight", "noContentPadding"];
|
23
|
+
|
24
|
+
function CollapseWrapper(props) {
|
25
|
+
var _classNames;
|
26
|
+
|
27
|
+
var className = props.className,
|
28
|
+
accordion = props.accordion,
|
29
|
+
fullheight = props.fullheight,
|
30
|
+
noContentPadding = props.noContentPadding,
|
31
|
+
otherProps = (0, _objectWithoutPropertiesLoose2["default"])(props, _excluded);
|
32
|
+
return /*#__PURE__*/_react["default"].createElement(_collapse["default"], (0, _extends2["default"])({}, otherProps, {
|
33
|
+
accordion: accordion,
|
34
|
+
className: (0, _classnames["default"])(className, _CollapseModule["default"].collapse, (_classNames = {}, _classNames[_CollapseModule["default"].fullheight] = accordion && fullheight, _classNames[_CollapseModule["default"].contentNoPadding] = noContentPadding, _classNames))
|
35
|
+
}));
|
12
36
|
}
|
13
37
|
|
14
|
-
|
38
|
+
CollapseWrapper.Panel = _Panel["default"];
|
39
|
+
var _default = CollapseWrapper;
|
15
40
|
exports["default"] = _default;
|
@@ -31,6 +31,29 @@
|
|
31
31
|
}
|
32
32
|
}
|
33
33
|
|
34
|
+
&.fullheight {
|
35
|
+
height: 100%;
|
36
|
+
display: flex;
|
37
|
+
flex-direction: column;
|
38
|
+
|
39
|
+
:global {
|
40
|
+
.#{$css-prefix}collapse-panel-content {
|
41
|
+
flex: 1;
|
42
|
+
overflow: auto;
|
43
|
+
}
|
44
|
+
.#{$css-prefix}collapse-panel.#{$css-prefix}collapse-panel-expanded {
|
45
|
+
flex: 1;
|
46
|
+
display: flex;
|
47
|
+
flex-direction: column;
|
48
|
+
|
49
|
+
.#{$css-prefix}collapse-panel-content {
|
50
|
+
flex: 1;
|
51
|
+
overflow: auto;
|
52
|
+
}
|
53
|
+
}
|
54
|
+
}
|
55
|
+
}
|
56
|
+
|
34
57
|
&.contentNoPadding {
|
35
58
|
|
36
59
|
:global {
|
@@ -0,0 +1,11 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
4
|
+
|
5
|
+
exports.__esModule = true;
|
6
|
+
exports["default"] = void 0;
|
7
|
+
|
8
|
+
var _Collapse = _interopRequireDefault(require("./Collapse"));
|
9
|
+
|
10
|
+
var _default = _Collapse["default"];
|
11
|
+
exports["default"] = _default;
|
@@ -0,0 +1,27 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
exports.__esModule = true;
|
4
|
+
exports["default"] = useHtElements;
|
5
|
+
|
6
|
+
var _react = require("react");
|
7
|
+
|
8
|
+
function useHtElements(props) {
|
9
|
+
var topo = props.topo,
|
10
|
+
ids = props.ids;
|
11
|
+
|
12
|
+
var _useState = (0, _react.useState)(ids),
|
13
|
+
idList = _useState[0],
|
14
|
+
setIdList = _useState[1];
|
15
|
+
|
16
|
+
(0, _react.useEffect)(function () {
|
17
|
+
if (ids.join(',') !== idList.join(',')) {
|
18
|
+
setIdList(ids);
|
19
|
+
}
|
20
|
+
}, [ids, idList]);
|
21
|
+
var elements = (0, _react.useMemo)(function () {
|
22
|
+
return idList.map(function (id) {
|
23
|
+
return topo.getDataModel().getDataById(id);
|
24
|
+
});
|
25
|
+
}, [topo, idList]);
|
26
|
+
return elements;
|
27
|
+
}
|