@riil-frontend/component-topology 5.0.18 → 6.0.0-alpha.2
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 +29 -29
- package/es/components/VerticalIconTab/VerticalIconTab.js +58 -0
- package/es/components/VerticalIconTab/VerticalIconTab.module.scss +63 -0
- package/es/components/VerticalIconTab/index.js +2 -0
- package/es/components/collapse/Collapse.js +7 -0
- package/es/components/collapse/Collapse.module.scss +33 -0
- package/es/components/collapse/CollapseFullheight.module.scss +20 -0
- package/es/components/collapse/Panel.js +3 -0
- package/es/core/common/icons/icon.js +18 -5
- package/es/core/components/AlarmListPanel/components/AlarmListItem.js +41 -10
- package/es/core/components/AlarmListPanel/components/index.module.scss +26 -0
- package/es/core/components/AlarmListPanel/index.js +9 -5
- package/es/core/components/ResourceViewAttributeSetting/Setting.js +5 -19
- package/es/core/components/TopoView/TopoView.module.scss +0 -4
- package/es/core/components/TopoView/editor.module.scss +3 -0
- package/es/core/components/TopoView/topoView.js +67 -33
- package/es/core/editor/components/Sidebar/Sidebar.js +75 -0
- package/es/core/editor/components/Sidebar/Sidebar.module.scss +15 -0
- package/es/core/editor/components/Sidebar/views/BackgroundPanel/BackgroundPanel.js +10 -0
- package/es/core/editor/components/Sidebar/views/BackgroundPanel/index.js +2 -0
- package/es/core/editor/components/Sidebar/views/CanvasPanel/ImagePanel.js +4 -0
- package/es/core/editor/components/Sidebar/views/CanvasPanel/index.js +2 -0
- package/es/core/editor/components/Sidebar/views/ComponentPanel.js +41 -0
- package/es/core/editor/components/Sidebar/views/ImagePanel/CiTypeImagePanel.js +20 -0
- package/es/core/editor/components/Sidebar/views/ImagePanel/CustomImagePanel.js +45 -0
- package/es/core/editor/components/Sidebar/views/ImagePanel/ImagePalette.js +44 -0
- package/es/core/editor/components/Sidebar/views/ImagePanel/ImagePanel.js +28 -0
- package/es/core/editor/components/Sidebar/views/ImagePanel/index.js +2 -0
- package/es/core/editor/components/Sidebar/views/LinkPanel.js +43 -0
- package/es/core/editor/components/Toolbar/EditorToolbar.js +40 -0
- package/es/core/editor/components/Toolbar/Toolbar.js +10 -0
- package/es/core/editor/components/Toolbar/Toolbar.module.scss +21 -0
- package/es/core/editor/components/Toolbar/buttons.js +36 -0
- package/es/core/editor/components/Toolbar/widgets/AddResourceButton.js +23 -0
- package/es/core/editor/components/Toolbar/widgets/AddResourceWidget.js +17 -0
- package/es/core/editor/components/Toolbar/widgets/BoxBackgroundButton/BoxBackgroundButton.js +46 -0
- package/es/core/editor/components/Toolbar/widgets/BoxBackgroundButton/BoxBackgroundSetting.js +8 -0
- package/es/core/editor/components/Toolbar/widgets/BoxBackgroundButton/index.js +2 -0
- package/es/core/editor/components/Toolbar/widgets/CanvasMoveWidget.js +17 -0
- package/es/core/editor/components/Toolbar/widgets/CanvasSelectWidget.js +19 -0
- package/es/core/editor/components/Toolbar/widgets/Divider.js +10 -0
- package/es/core/editor/components/Toolbar/widgets/Divider.module.scss +6 -0
- package/es/core/editor/components/Toolbar/widgets/Dropdown.js +14 -0
- package/es/core/editor/components/Toolbar/widgets/EdgeColorButton/Content.js +8 -0
- package/es/core/editor/components/Toolbar/widgets/EdgeColorButton/EdgeColorButton.js +46 -0
- package/es/core/editor/components/Toolbar/widgets/EdgeColorButton/index.js +2 -0
- package/es/core/editor/components/Toolbar/widgets/EdgeTypeButton/EdgeType.js +8 -0
- package/es/core/editor/components/Toolbar/widgets/EdgeTypeButton/index.js +44 -0
- package/es/core/editor/components/Toolbar/widgets/FontColorButton.js +44 -0
- package/es/core/editor/components/Toolbar/widgets/FontFamilyWidget.js +40 -0
- package/es/core/editor/components/Toolbar/widgets/FontSizeWidget.js +35 -0
- package/es/core/editor/components/Toolbar/widgets/FontStyleButton.js +62 -0
- package/es/core/editor/components/Toolbar/widgets/HistoryRedoButton.js +22 -0
- package/es/core/editor/components/Toolbar/widgets/HistoryUndoButton.js +29 -0
- package/es/core/editor/components/Toolbar/widgets/Layout/index.js +28 -0
- package/es/core/editor/components/Toolbar/widgets/NodeAlignWidget.js +47 -0
- package/es/core/editor/components/Toolbar/widgets/NodeImageButton/BoxBackgroundSetting.js +8 -0
- package/es/core/editor/components/Toolbar/widgets/NodeImageButton/NodeImageButton.js +46 -0
- package/es/core/editor/components/Toolbar/widgets/NodeImageButton/index.js +2 -0
- package/es/core/editor/components/Toolbar/widgets/NodeSizeButton/BoxBackgroundSetting.js +8 -0
- package/es/core/editor/components/Toolbar/widgets/NodeSizeButton/NodeSizeButton.js +42 -0
- package/es/core/editor/components/Toolbar/widgets/NodeSizeButton/index.js +2 -0
- package/es/core/editor/components/Toolbar/widgets/SearchWidget.js +40 -0
- package/es/core/editor/components/Toolbar/widgets/WidgetBox.js +49 -0
- package/es/core/editor/components/Toolbar/widgets/WidgetBox.module.scss +64 -0
- package/es/core/editor/components/Toolbar/widgets/components/ArrowButton.js +19 -0
- package/es/core/editor/components/Toolbar/widgets/components/ArrowButton.module.scss +8 -0
- package/es/core/editor/components/Toolbar/widgets/components/ArrowPopup.js +27 -0
- package/es/core/editor/components/Toolbar/widgets/components/ArrowPopup.module.scss +10 -0
- package/es/core/editor/components/Toolbar/widgets/components/ButtonBox.js +34 -0
- package/es/core/editor/components/Toolbar/widgets/components/ButtonBox.module.scss +30 -0
- package/es/core/editor/components/Toolbar/widgets/components/DropdownButton.js +47 -0
- package/es/core/editor/components/Toolbar/widgets/components/DropdownButton.module.scss +10 -0
- package/es/core/editor/components/Toolbar/widgets/components/DropdownMenu.js +30 -0
- package/es/core/editor/components/Toolbar/widgets/components/MenuSelect.js +20 -0
- package/es/core/editor/components/Toolbar/widgets.js +0 -0
- package/es/core/editor/components/settings/common/SizeInput/NodeSizeInput.js +24 -8
- package/es/core/editor/components/settings/common/SizeInput/NodeSizeInput.module.scss +4 -3
- package/es/core/editor/components/settings/propertyViews/view/BatchSetNodeSize.js +4 -2
- package/es/core/editor/components/titlebar/TopoEditorTitleBar.js +9 -15
- package/es/core/models/HistoryManager.js +32 -6
- package/es/core/models/SelectionManager.js +7 -0
- package/es/core/models/TopoApp.js +4 -2
- package/es/core/store/coreModels.js +5 -5
- package/es/core/store/models/displayConfig.js +2 -2
- package/es/core/store/models/historyManager.js +31 -0
- package/es/core/viewer/components/titlebar/widgets/SearchWidget.js +3 -1
- package/es/networkTopo/components/TopoView.js +2 -98
- package/es/networkTopo/components/Topology.js +3 -33
- package/es/networkTopo/components/editor/useEditorProps.js +34 -0
- package/es/networkTopo/hooks/useLinkDynamicStyle.js +1 -1
- package/es/style.js +1 -1
- package/lib/components/VerticalIconTab/VerticalIconTab.js +74 -0
- package/lib/components/VerticalIconTab/VerticalIconTab.module.scss +63 -0
- package/lib/components/VerticalIconTab/index.js +11 -0
- package/lib/components/collapse/Collapse.js +15 -0
- package/lib/components/collapse/Collapse.module.scss +33 -0
- package/lib/components/collapse/CollapseFullheight.module.scss +20 -0
- package/lib/components/collapse/Panel.js +3 -0
- package/lib/core/common/icons/icon.js +20 -5
- package/lib/core/components/AlarmListPanel/components/AlarmListItem.js +40 -9
- package/lib/core/components/AlarmListPanel/components/index.module.scss +26 -0
- package/lib/core/components/AlarmListPanel/index.js +10 -6
- package/lib/core/components/ResourceViewAttributeSetting/Setting.js +5 -19
- package/lib/core/components/TopoView/TopoView.module.scss +0 -4
- package/lib/core/components/TopoView/editor.module.scss +3 -0
- package/lib/core/components/TopoView/topoView.js +69 -32
- package/lib/core/editor/components/Sidebar/Sidebar.js +95 -0
- package/lib/core/editor/components/Sidebar/Sidebar.module.scss +15 -0
- package/lib/core/editor/components/Sidebar/views/BackgroundPanel/BackgroundPanel.js +19 -0
- package/lib/core/editor/components/Sidebar/views/BackgroundPanel/index.js +11 -0
- package/lib/core/editor/components/Sidebar/views/CanvasPanel/ImagePanel.js +12 -0
- package/lib/core/editor/components/Sidebar/views/CanvasPanel/index.js +11 -0
- package/lib/core/editor/components/Sidebar/views/ComponentPanel.js +53 -0
- package/lib/core/editor/components/Sidebar/views/ImagePanel/CiTypeImagePanel.js +34 -0
- package/lib/core/editor/components/Sidebar/views/ImagePanel/CustomImagePanel.js +58 -0
- package/lib/core/editor/components/Sidebar/views/ImagePanel/ImagePalette.js +56 -0
- package/lib/core/editor/components/Sidebar/views/ImagePanel/ImagePanel.js +43 -0
- package/lib/core/editor/components/Sidebar/views/ImagePanel/index.js +11 -0
- package/lib/core/editor/components/Sidebar/views/LinkPanel.js +56 -0
- package/lib/{networkTopo/components/viewer/titlebar/MoreButtonMenu.js → core/editor/components/Toolbar/EditorToolbar.js} +36 -29
- package/lib/core/editor/components/Toolbar/Toolbar.js +19 -0
- package/lib/core/editor/components/Toolbar/Toolbar.module.scss +21 -0
- package/lib/core/editor/components/Toolbar/buttons.js +62 -0
- package/lib/core/editor/components/Toolbar/widgets/AddResourceButton.js +33 -0
- package/lib/core/editor/components/Toolbar/widgets/AddResourceWidget.js +27 -0
- package/lib/core/editor/components/Toolbar/widgets/BoxBackgroundButton/BoxBackgroundButton.js +63 -0
- package/lib/core/editor/components/Toolbar/widgets/BoxBackgroundButton/BoxBackgroundSetting.js +16 -0
- package/lib/core/editor/components/Toolbar/widgets/BoxBackgroundButton/index.js +11 -0
- package/lib/core/editor/components/Toolbar/widgets/CanvasMoveWidget.js +27 -0
- package/lib/core/editor/components/Toolbar/widgets/CanvasSelectWidget.js +29 -0
- package/lib/core/editor/components/Toolbar/widgets/Divider.js +19 -0
- package/lib/core/editor/components/Toolbar/widgets/Divider.module.scss +6 -0
- package/lib/core/editor/components/Toolbar/widgets/Dropdown.js +26 -0
- package/lib/core/editor/components/Toolbar/widgets/EdgeColorButton/Content.js +16 -0
- package/lib/core/editor/components/Toolbar/widgets/EdgeColorButton/EdgeColorButton.js +63 -0
- package/lib/core/editor/components/Toolbar/widgets/EdgeColorButton/index.js +11 -0
- package/lib/core/editor/components/Toolbar/widgets/EdgeTypeButton/EdgeType.js +16 -0
- package/lib/core/editor/components/Toolbar/widgets/EdgeTypeButton/index.js +61 -0
- package/lib/core/editor/components/Toolbar/widgets/FontColorButton.js +58 -0
- package/lib/core/editor/components/Toolbar/widgets/FontFamilyWidget.js +54 -0
- package/lib/core/editor/components/Toolbar/widgets/FontSizeWidget.js +49 -0
- package/lib/core/editor/components/Toolbar/widgets/FontStyleButton.js +76 -0
- package/lib/core/editor/components/Toolbar/widgets/HistoryRedoButton.js +31 -0
- package/lib/core/editor/components/Toolbar/widgets/HistoryUndoButton.js +38 -0
- package/lib/core/editor/components/Toolbar/widgets/Layout/index.js +40 -0
- package/lib/core/editor/components/Toolbar/widgets/NodeAlignWidget.js +64 -0
- package/lib/core/editor/components/Toolbar/widgets/NodeImageButton/BoxBackgroundSetting.js +16 -0
- package/lib/core/editor/components/Toolbar/widgets/NodeImageButton/NodeImageButton.js +63 -0
- package/lib/core/editor/components/Toolbar/widgets/NodeImageButton/index.js +11 -0
- package/lib/core/editor/components/Toolbar/widgets/NodeSizeButton/BoxBackgroundSetting.js +16 -0
- package/lib/core/editor/components/Toolbar/widgets/NodeSizeButton/NodeSizeButton.js +59 -0
- package/lib/core/editor/components/Toolbar/widgets/NodeSizeButton/index.js +11 -0
- package/lib/core/editor/components/Toolbar/widgets/SearchWidget.js +53 -0
- package/lib/core/editor/components/Toolbar/widgets/WidgetBox.js +63 -0
- package/lib/core/editor/components/Toolbar/widgets/WidgetBox.module.scss +64 -0
- package/lib/core/editor/components/Toolbar/widgets/components/ArrowButton.js +31 -0
- package/lib/core/editor/components/Toolbar/widgets/components/ArrowButton.module.scss +8 -0
- package/lib/core/editor/components/Toolbar/widgets/components/ArrowPopup.js +40 -0
- package/lib/core/editor/components/Toolbar/widgets/components/ArrowPopup.module.scss +10 -0
- package/lib/core/editor/components/Toolbar/widgets/components/ButtonBox.js +48 -0
- package/lib/core/editor/components/Toolbar/widgets/components/ButtonBox.module.scss +30 -0
- package/lib/core/editor/components/Toolbar/widgets/components/DropdownButton.js +64 -0
- package/lib/core/editor/components/Toolbar/widgets/components/DropdownButton.module.scss +10 -0
- package/lib/core/editor/components/Toolbar/widgets/components/DropdownMenu.js +41 -0
- package/lib/core/editor/components/Toolbar/widgets/components/MenuSelect.js +30 -0
- package/lib/core/editor/components/Toolbar/widgets.js +1 -0
- package/lib/core/editor/components/settings/common/SizeInput/NodeSizeInput.js +25 -8
- package/lib/core/editor/components/settings/common/SizeInput/NodeSizeInput.module.scss +4 -3
- package/lib/core/editor/components/settings/propertyViews/view/BatchSetNodeSize.js +5 -2
- package/lib/core/editor/components/titlebar/TopoEditorTitleBar.js +5 -11
- package/lib/core/models/HistoryManager.js +32 -5
- package/lib/core/models/SelectionManager.js +7 -0
- package/lib/core/models/TopoApp.js +4 -1
- package/lib/core/store/coreModels.js +6 -6
- package/lib/core/store/models/displayConfig.js +2 -3
- package/lib/core/store/models/historyManager.js +41 -0
- package/lib/core/viewer/components/titlebar/widgets/SearchWidget.js +3 -1
- package/lib/networkTopo/components/TopoView.js +2 -104
- package/lib/networkTopo/components/Topology.js +3 -41
- package/lib/networkTopo/components/editor/useEditorProps.js +49 -0
- package/lib/networkTopo/hooks/useLinkDynamicStyle.js +2 -2
- package/lib/style.js +1 -1
- package/package.json +3 -3
- package/es/core/components/DisplaySettingDrawer/LinkTip.js +0 -41
- package/es/networkTopo/components/viewer/displaySetting/LinkAttrCustomSettingDrawer.js +0 -59
- package/es/networkTopo/components/viewer/displaySetting/LinkTagCommonRidioGroup.js +0 -24
- package/es/networkTopo/components/viewer/displaySetting/LinkTagCommonRidioGroup.module.scss +0 -23
- package/es/networkTopo/components/viewer/displaySetting/LinkTagV2.js +0 -93
- package/es/networkTopo/components/viewer/titlebar/MoreButtonMenu.js +0 -32
- package/es/networkTopo/components/viewer/titlebar/ViewerTools.js +0 -9
- package/es/networkTopo/components/viewer/titlebar/useSetDefaultTopo.js +0 -30
- package/lib/core/components/DisplaySettingDrawer/LinkTip.js +0 -55
- package/lib/networkTopo/components/viewer/displaySetting/LinkAttrCustomSettingDrawer.js +0 -76
- package/lib/networkTopo/components/viewer/displaySetting/LinkTagCommonRidioGroup.js +0 -35
- package/lib/networkTopo/components/viewer/displaySetting/LinkTagCommonRidioGroup.module.scss +0 -23
- package/lib/networkTopo/components/viewer/displaySetting/LinkTagV2.js +0 -108
- package/lib/networkTopo/components/viewer/titlebar/ViewerTools.js +0 -19
- package/lib/networkTopo/components/viewer/titlebar/useSetDefaultTopo.js +0 -40
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
|
|
2
|
+
var _excluded = ["topo", "showLabel"];
|
|
3
|
+
import React, { useEffect, useState } from 'react';
|
|
4
|
+
import DropdownButton from "../components/DropdownButton";
|
|
5
|
+
import WidgetBox from "../WidgetBox";
|
|
6
|
+
import EdgeType from "./EdgeType";
|
|
7
|
+
/**
|
|
8
|
+
* 线形设置
|
|
9
|
+
* @param {*} props
|
|
10
|
+
* @returns
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
function EdgeTypeButton(props) {
|
|
14
|
+
var topo = props.topo,
|
|
15
|
+
showLabel = props.showLabel,
|
|
16
|
+
otherProps = _objectWithoutPropertiesLoose(props, _excluded);
|
|
17
|
+
|
|
18
|
+
var _useState = useState(true),
|
|
19
|
+
disabled = _useState[0],
|
|
20
|
+
setDisabled = _useState[1]; // 选中的元素
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
var selection = topo.selectionManager.useSelection();
|
|
24
|
+
useEffect(function () {
|
|
25
|
+
setDisabled(false);
|
|
26
|
+
}, [selection]);
|
|
27
|
+
var icon = disabled ? /*#__PURE__*/React.createElement("img", {
|
|
28
|
+
src: "/img/topo/editor/toolbar/\u7EBF\u5F62/Disable.svg",
|
|
29
|
+
alt: ""
|
|
30
|
+
}) : /*#__PURE__*/React.createElement("img", {
|
|
31
|
+
src: "/img/topo/editor/toolbar/\u7EBF\u5F62/Normal.svg",
|
|
32
|
+
alt: ""
|
|
33
|
+
});
|
|
34
|
+
return /*#__PURE__*/React.createElement(WidgetBox, {
|
|
35
|
+
label: "\u7EBF\u5F62",
|
|
36
|
+
tooltip: "\u7EBF\u5F62",
|
|
37
|
+
showLabel: showLabel
|
|
38
|
+
}, /*#__PURE__*/React.createElement(DropdownButton, {
|
|
39
|
+
disabled: disabled,
|
|
40
|
+
trigger: icon
|
|
41
|
+
}, /*#__PURE__*/React.createElement(EdgeType, null)));
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export default EdgeTypeButton;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import React, { useState } from 'react';
|
|
2
|
+
import DropdownButton from "./components/DropdownButton";
|
|
3
|
+
import WidgetBox from "./WidgetBox";
|
|
4
|
+
|
|
5
|
+
function FontFamilySelect(props) {
|
|
6
|
+
var value = props.value,
|
|
7
|
+
onChange = props.onChange;
|
|
8
|
+
|
|
9
|
+
var _useState = useState(false),
|
|
10
|
+
disabled = _useState[0],
|
|
11
|
+
setDisabled = _useState[1];
|
|
12
|
+
|
|
13
|
+
var icon = disabled ? /*#__PURE__*/React.createElement("img", {
|
|
14
|
+
src: "/img/topo/editor/toolbar/\u6587\u5B57\u989C\u8272\u53CA\u586B\u5145/Disable.svg",
|
|
15
|
+
alt: ""
|
|
16
|
+
}) : /*#__PURE__*/React.createElement("img", {
|
|
17
|
+
src: "/img/topo/editor/toolbar/\u6587\u5B57\u989C\u8272\u53CA\u586B\u5145/Normal.svg",
|
|
18
|
+
alt: ""
|
|
19
|
+
});
|
|
20
|
+
return /*#__PURE__*/React.createElement(DropdownButton, {
|
|
21
|
+
disabled: disabled,
|
|
22
|
+
trigger: icon,
|
|
23
|
+
onChange: onChange
|
|
24
|
+
}, "xxxx");
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
function FontColorButton(props) {
|
|
28
|
+
var showLabel = props.showLabel;
|
|
29
|
+
|
|
30
|
+
var _useState2 = useState('微软雅黑'),
|
|
31
|
+
value = _useState2[0],
|
|
32
|
+
setValue = _useState2[1];
|
|
33
|
+
|
|
34
|
+
return /*#__PURE__*/React.createElement(WidgetBox, {
|
|
35
|
+
label: "\u6587\u5B57\u989C\u8272",
|
|
36
|
+
tooltip: "\u6587\u5B57\u989C\u8272",
|
|
37
|
+
showLabel: showLabel
|
|
38
|
+
}, /*#__PURE__*/React.createElement(FontFamilySelect, {
|
|
39
|
+
value: value,
|
|
40
|
+
onChange: setValue
|
|
41
|
+
}));
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export default FontColorButton;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import React, { useState } from 'react';
|
|
2
|
+
import DropdownMenu from "./components/DropdownMenu";
|
|
3
|
+
import WidgetBox from "./WidgetBox";
|
|
4
|
+
|
|
5
|
+
function FontFamilySelect(props) {
|
|
6
|
+
var value = props.value,
|
|
7
|
+
onChange = props.onChange;
|
|
8
|
+
var items = ['宋体', '微软雅黑', '黑体', 'Arial'];
|
|
9
|
+
return /*#__PURE__*/React.createElement(DropdownMenu, {
|
|
10
|
+
value: value,
|
|
11
|
+
onChange: onChange
|
|
12
|
+
}, items.map(function (item) {
|
|
13
|
+
return /*#__PURE__*/React.createElement(DropdownMenu.Item, {
|
|
14
|
+
key: item
|
|
15
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
16
|
+
style: {
|
|
17
|
+
fontFamily: item
|
|
18
|
+
}
|
|
19
|
+
}, item));
|
|
20
|
+
}));
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
function FontFamilyWidget(props) {
|
|
24
|
+
var showLabel = props.showLabel;
|
|
25
|
+
|
|
26
|
+
var _useState = useState('微软雅黑'),
|
|
27
|
+
value = _useState[0],
|
|
28
|
+
setValue = _useState[1];
|
|
29
|
+
|
|
30
|
+
return /*#__PURE__*/React.createElement(WidgetBox, {
|
|
31
|
+
label: "\u5B57\u4F53",
|
|
32
|
+
tooltip: "\u5B57\u4F53",
|
|
33
|
+
showLabel: showLabel
|
|
34
|
+
}, /*#__PURE__*/React.createElement(FontFamilySelect, {
|
|
35
|
+
value: value,
|
|
36
|
+
onChange: setValue
|
|
37
|
+
}));
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export default FontFamilyWidget;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import React, { useState } from 'react';
|
|
2
|
+
import DropdownMenu from "./components/DropdownMenu";
|
|
3
|
+
import WidgetBox from "./WidgetBox";
|
|
4
|
+
|
|
5
|
+
function FontSizeSelect(props) {
|
|
6
|
+
var value = props.value,
|
|
7
|
+
onChange = props.onChange;
|
|
8
|
+
var items = [9, 10, 11, 12, 14, 16, 18, 20, 24, 30, 36];
|
|
9
|
+
return /*#__PURE__*/React.createElement(DropdownMenu, {
|
|
10
|
+
value: value,
|
|
11
|
+
onChange: onChange
|
|
12
|
+
}, items.map(function (item) {
|
|
13
|
+
return /*#__PURE__*/React.createElement(DropdownMenu.Item, {
|
|
14
|
+
key: item
|
|
15
|
+
}, item);
|
|
16
|
+
}));
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
function FontSizeWidget(props) {
|
|
20
|
+
var showLabel = props.showLabel;
|
|
21
|
+
|
|
22
|
+
var _useState = useState(12),
|
|
23
|
+
fontSize = _useState[0],
|
|
24
|
+
setFontSize = _useState[1];
|
|
25
|
+
|
|
26
|
+
return /*#__PURE__*/React.createElement(WidgetBox, {
|
|
27
|
+
label: "\u5B57\u53F7",
|
|
28
|
+
showLabel: showLabel
|
|
29
|
+
}, /*#__PURE__*/React.createElement(FontSizeSelect, {
|
|
30
|
+
value: fontSize,
|
|
31
|
+
onChange: setFontSize
|
|
32
|
+
}));
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export default FontSizeWidget;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import React, { useState, useEffect } from 'react';
|
|
2
|
+
import DropdownMenu from "./components/DropdownMenu";
|
|
3
|
+
import WidgetBox from "./WidgetBox";
|
|
4
|
+
|
|
5
|
+
function FontFamilySelect(props) {
|
|
6
|
+
var value = props.value,
|
|
7
|
+
disabled = props.disabled,
|
|
8
|
+
onChange = props.onChange;
|
|
9
|
+
var items = ['宋体', '微软雅黑', '黑体', 'Arial'];
|
|
10
|
+
var icon = disabled ? /*#__PURE__*/React.createElement("img", {
|
|
11
|
+
src: "/img/topo/editor/toolbar/bold/Disable.svg",
|
|
12
|
+
alt: ""
|
|
13
|
+
}) : /*#__PURE__*/React.createElement("img", {
|
|
14
|
+
src: "/img/topo/editor/toolbar/bold/Normal.svg",
|
|
15
|
+
alt: ""
|
|
16
|
+
});
|
|
17
|
+
return /*#__PURE__*/React.createElement(DropdownMenu, {
|
|
18
|
+
value: value,
|
|
19
|
+
valueRender: function valueRender() {
|
|
20
|
+
return icon;
|
|
21
|
+
},
|
|
22
|
+
onChange: onChange
|
|
23
|
+
}, items.map(function (item) {
|
|
24
|
+
return /*#__PURE__*/React.createElement(DropdownMenu.Item, {
|
|
25
|
+
key: item
|
|
26
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
27
|
+
style: {
|
|
28
|
+
fontFamily: item
|
|
29
|
+
}
|
|
30
|
+
}, item));
|
|
31
|
+
}));
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
function FontStyleButton(props) {
|
|
35
|
+
var topo = props.topo,
|
|
36
|
+
showLabel = props.showLabel;
|
|
37
|
+
|
|
38
|
+
var _useState = useState('微软雅黑'),
|
|
39
|
+
value = _useState[0],
|
|
40
|
+
setValue = _useState[1];
|
|
41
|
+
|
|
42
|
+
var _useState2 = useState(true),
|
|
43
|
+
disabled = _useState2[0],
|
|
44
|
+
setDisabled = _useState2[1]; // 选中的元素
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
var selection = topo.selectionManager.useSelection();
|
|
48
|
+
useEffect(function () {
|
|
49
|
+
setDisabled(false);
|
|
50
|
+
}, [selection]);
|
|
51
|
+
return /*#__PURE__*/React.createElement(WidgetBox, {
|
|
52
|
+
label: "\u6587\u5B57\u6837\u5F0F",
|
|
53
|
+
tooltip: "\u6587\u5B57\u6837\u5F0F",
|
|
54
|
+
showLabel: showLabel
|
|
55
|
+
}, /*#__PURE__*/React.createElement(FontFamilySelect, {
|
|
56
|
+
value: value,
|
|
57
|
+
disabled: disabled,
|
|
58
|
+
onChange: setValue
|
|
59
|
+
}));
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export default FontStyleButton;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import WidgetBox from "./WidgetBox";
|
|
3
|
+
|
|
4
|
+
function HistoryRedoButton(props) {
|
|
5
|
+
var topo = props.topo,
|
|
6
|
+
showLabel = props.showLabel;
|
|
7
|
+
|
|
8
|
+
var _topo$store$useModelS = topo.store.useModelState('historyManager'),
|
|
9
|
+
redoable = _topo$store$useModelS.redoable;
|
|
10
|
+
|
|
11
|
+
var disabled = !redoable;
|
|
12
|
+
return /*#__PURE__*/React.createElement(WidgetBox, {
|
|
13
|
+
label: "\u6062\u590D",
|
|
14
|
+
tooltip: "\u6062\u590D",
|
|
15
|
+
showLabel: showLabel
|
|
16
|
+
}, /*#__PURE__*/React.createElement(WidgetBox.ButtonBox, null, /*#__PURE__*/React.createElement("img", {
|
|
17
|
+
src: "/img/topo/editor/toolbar/redo/" + (disabled ? 'Disable' : 'Normal') + ".svg",
|
|
18
|
+
alt: ""
|
|
19
|
+
})));
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export default HistoryRedoButton;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import React from 'react'; // import { Icon, Button } from '@alifd/next';
|
|
2
|
+
|
|
3
|
+
import WidgetBox from "./WidgetBox";
|
|
4
|
+
|
|
5
|
+
function HistoryUndoButton(props) {
|
|
6
|
+
var topo = props.topo,
|
|
7
|
+
showLabel = props.showLabel;
|
|
8
|
+
|
|
9
|
+
var _topo$store$useModelS = topo.store.useModelState('historyManager'),
|
|
10
|
+
undoable = _topo$store$useModelS.undoable;
|
|
11
|
+
|
|
12
|
+
var disabled = !undoable;
|
|
13
|
+
return /*#__PURE__*/React.createElement(WidgetBox, {
|
|
14
|
+
disabled: disabled,
|
|
15
|
+
label: "\u64A4\u9500",
|
|
16
|
+
tooltip: "\u64A4\u9500",
|
|
17
|
+
showLabel: showLabel
|
|
18
|
+
}, /*#__PURE__*/React.createElement(WidgetBox.ButtonBox, {
|
|
19
|
+
disabled: disabled,
|
|
20
|
+
onClick: function onClick() {
|
|
21
|
+
topo.historyManager.undo();
|
|
22
|
+
}
|
|
23
|
+
}, /*#__PURE__*/React.createElement("img", {
|
|
24
|
+
src: "/img/topo/editor/toolbar/undo/" + (disabled ? 'Disable' : 'Normal') + ".svg",
|
|
25
|
+
alt: ""
|
|
26
|
+
})));
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export default HistoryUndoButton;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
|
|
2
|
+
import _Icon from "@alifd/next/es/icon";
|
|
3
|
+
var _excluded = ["showLabel"];
|
|
4
|
+
import React from 'react';
|
|
5
|
+
import ArrowPopup from "../components/ArrowPopup";
|
|
6
|
+
import WidgetBox from "../WidgetBox";
|
|
7
|
+
|
|
8
|
+
function Layout(props) {
|
|
9
|
+
var topo = props.topo;
|
|
10
|
+
return /*#__PURE__*/React.createElement(ArrowPopup, {
|
|
11
|
+
label: /*#__PURE__*/React.createElement(_Icon, {
|
|
12
|
+
type: "Topology_icon_zoomout",
|
|
13
|
+
size: "small"
|
|
14
|
+
})
|
|
15
|
+
}, /*#__PURE__*/React.createElement("div", null, "\u5E03\u5C40 ", /*#__PURE__*/React.createElement("br", null), "\u5E03\u5C40 ", /*#__PURE__*/React.createElement("br", null), "\u5E03\u5C40 ", /*#__PURE__*/React.createElement("br", null), "\u5E03\u5C40 ", /*#__PURE__*/React.createElement("br", null), "\u5E03\u5C40 ", /*#__PURE__*/React.createElement("br", null), "\u5E03\u5C40 ", /*#__PURE__*/React.createElement("br", null), "\u5E03\u5C40 ", /*#__PURE__*/React.createElement("br", null), "\u5E03\u5C40 ", /*#__PURE__*/React.createElement("br", null)));
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
function LayoutWidget(props) {
|
|
19
|
+
var showLabel = props.showLabel,
|
|
20
|
+
otherProps = _objectWithoutPropertiesLoose(props, _excluded);
|
|
21
|
+
|
|
22
|
+
return /*#__PURE__*/React.createElement(WidgetBox, {
|
|
23
|
+
label: "\u5E03\u5C40",
|
|
24
|
+
showLabel: showLabel
|
|
25
|
+
}, /*#__PURE__*/React.createElement(WidgetBox.ButtonBox, null, /*#__PURE__*/React.createElement(Layout, otherProps)));
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export default LayoutWidget;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
|
|
3
|
+
var _excluded = ["topo", "showLabel"];
|
|
4
|
+
import React, { useState, useEffect } from 'react';
|
|
5
|
+
import WidgetBox from "./WidgetBox";
|
|
6
|
+
import DropdownButton from "./components/DropdownButton";
|
|
7
|
+
|
|
8
|
+
function NodeAlignPopup(props) {
|
|
9
|
+
var topo = props.topo,
|
|
10
|
+
disabled = props.disabled;
|
|
11
|
+
var icon = disabled ? /*#__PURE__*/React.createElement("img", {
|
|
12
|
+
src: "/img/topo/editor/toolbar/\u5BF9\u9F50/Disable.svg",
|
|
13
|
+
alt: ""
|
|
14
|
+
}) : /*#__PURE__*/React.createElement("img", {
|
|
15
|
+
src: "/img/topo/editor/toolbar/\u5BF9\u9F50/Normal.svg",
|
|
16
|
+
alt: ""
|
|
17
|
+
});
|
|
18
|
+
return /*#__PURE__*/React.createElement(DropdownButton, {
|
|
19
|
+
trigger: icon
|
|
20
|
+
}, "\u5BF9\u9F50\u65B9\u5F0F");
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
function NodeAlignWidget(props) {
|
|
24
|
+
var topo = props.topo,
|
|
25
|
+
showLabel = props.showLabel,
|
|
26
|
+
otherProps = _objectWithoutPropertiesLoose(props, _excluded);
|
|
27
|
+
|
|
28
|
+
var _useState = useState(true),
|
|
29
|
+
disabled = _useState[0],
|
|
30
|
+
setDisabled = _useState[1]; // 选中的元素
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
var selection = topo.selectionManager.useSelection();
|
|
34
|
+
useEffect(function () {
|
|
35
|
+
setDisabled(false);
|
|
36
|
+
}, [selection]);
|
|
37
|
+
return /*#__PURE__*/React.createElement(WidgetBox, {
|
|
38
|
+
showLabel: showLabel,
|
|
39
|
+
label: "\u5BF9\u9F50\u65B9\u5F0F",
|
|
40
|
+
tooltip: "\u5BF9\u9F50\u65B9\u5F0F"
|
|
41
|
+
}, /*#__PURE__*/React.createElement(NodeAlignPopup, _extends({
|
|
42
|
+
disabled: disabled,
|
|
43
|
+
selection: selection
|
|
44
|
+
}, otherProps)));
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export default NodeAlignWidget;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
|
|
2
|
+
var _excluded = ["topo", "showLabel"];
|
|
3
|
+
import React, { useEffect, useState } from 'react';
|
|
4
|
+
import DropdownButton from "../components/DropdownButton";
|
|
5
|
+
import WidgetBox from "../WidgetBox";
|
|
6
|
+
import BoxBackgroundSetting from "./BoxBackgroundSetting";
|
|
7
|
+
/**
|
|
8
|
+
* 替换图片设置
|
|
9
|
+
* @param {*} props
|
|
10
|
+
* @returns
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
function NodeImageButton(props) {
|
|
14
|
+
var topo = props.topo,
|
|
15
|
+
showLabel = props.showLabel,
|
|
16
|
+
otherProps = _objectWithoutPropertiesLoose(props, _excluded);
|
|
17
|
+
|
|
18
|
+
var _useState = useState(true),
|
|
19
|
+
disabled = _useState[0],
|
|
20
|
+
setDisabled = _useState[1]; // 选中的元素
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
var selection = topo.selectionManager.useSelection();
|
|
24
|
+
useEffect(function () {
|
|
25
|
+
setDisabled(false);
|
|
26
|
+
}, [selection]);
|
|
27
|
+
var icon = disabled ? /*#__PURE__*/React.createElement("img", {
|
|
28
|
+
src: "/img/topo/editor/toolbar/\u66FF\u6362\u56FE\u7247/Disable.svg",
|
|
29
|
+
alt: ""
|
|
30
|
+
}) : /*#__PURE__*/React.createElement("img", {
|
|
31
|
+
src: "/img/topo/editor/toolbar/\u66FF\u6362\u56FE\u7247/Normal.svg",
|
|
32
|
+
alt: ""
|
|
33
|
+
});
|
|
34
|
+
return /*#__PURE__*/React.createElement(WidgetBox, {
|
|
35
|
+
label: "\u66FF\u6362\u56FE\u7247",
|
|
36
|
+
tooltip: "\u66FF\u6362\u56FE\u7247",
|
|
37
|
+
showLabel: showLabel
|
|
38
|
+
}, /*#__PURE__*/React.createElement(DropdownButton, {
|
|
39
|
+
disabled: disabled,
|
|
40
|
+
trigger: icon
|
|
41
|
+
}, /*#__PURE__*/React.createElement(BoxBackgroundSetting, {
|
|
42
|
+
topo: topo
|
|
43
|
+
})));
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export default NodeImageButton;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
|
|
2
|
+
var _excluded = ["topo", "showLabel"];
|
|
3
|
+
import React, { useEffect, useState } from 'react';
|
|
4
|
+
import BatchSetNodeSize from "../../../settings/propertyViews/view/BatchSetNodeSize";
|
|
5
|
+
import WidgetBox from "../WidgetBox";
|
|
6
|
+
import BoxBackgroundSetting from "./BoxBackgroundSetting";
|
|
7
|
+
/**
|
|
8
|
+
* 图片尺寸设置
|
|
9
|
+
* @param {*} props
|
|
10
|
+
* @returns
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
function NodeSizeButton(props) {
|
|
14
|
+
var topo = props.topo,
|
|
15
|
+
showLabel = props.showLabel,
|
|
16
|
+
otherProps = _objectWithoutPropertiesLoose(props, _excluded);
|
|
17
|
+
|
|
18
|
+
var _useState = useState(true),
|
|
19
|
+
disabled = _useState[0],
|
|
20
|
+
setDisabled = _useState[1]; // 选中的元素
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
var selection = topo.selectionManager.useSelection();
|
|
24
|
+
useEffect(function () {
|
|
25
|
+
setDisabled(false);
|
|
26
|
+
}, [selection]);
|
|
27
|
+
return /*#__PURE__*/React.createElement(WidgetBox, {
|
|
28
|
+
label: "\u56FE\u7247\u5C3A\u5BF8",
|
|
29
|
+
tooltip: "\u56FE\u7247\u5C3A\u5BF8",
|
|
30
|
+
showLabel: showLabel
|
|
31
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
32
|
+
style: {
|
|
33
|
+
width: 136
|
|
34
|
+
}
|
|
35
|
+
}, /*#__PURE__*/React.createElement(BatchSetNodeSize, {
|
|
36
|
+
topo: topo,
|
|
37
|
+
size: "small",
|
|
38
|
+
showLabel: false
|
|
39
|
+
})));
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export default NodeSizeButton;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
|
|
2
|
+
import _Icon from "@alifd/next/es/icon";
|
|
3
|
+
var _excluded = ["showLabel"];
|
|
4
|
+
import React from 'react';
|
|
5
|
+
import WidgetBox from "./WidgetBox";
|
|
6
|
+
import SearchWidget from "../../../../viewer/components/titlebar/widgets/SearchWidget";
|
|
7
|
+
import DropdownButton from "./components/DropdownButton";
|
|
8
|
+
|
|
9
|
+
function TopoSearch(props) {
|
|
10
|
+
var topo = props.topo;
|
|
11
|
+
return /*#__PURE__*/React.createElement(DropdownButton, {
|
|
12
|
+
trigger: /*#__PURE__*/React.createElement(_Icon, {
|
|
13
|
+
type: "search",
|
|
14
|
+
size: "small"
|
|
15
|
+
}),
|
|
16
|
+
showArrow: false
|
|
17
|
+
}, /*#__PURE__*/React.createElement(SearchWidget, {
|
|
18
|
+
topo: topo,
|
|
19
|
+
filterProps: {
|
|
20
|
+
popupProps: {
|
|
21
|
+
container: function container(trigger) {
|
|
22
|
+
return trigger.parentNode;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}));
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
function ToolbarSearchWidget(props) {
|
|
30
|
+
var showLabel = props.showLabel,
|
|
31
|
+
otherProps = _objectWithoutPropertiesLoose(props, _excluded);
|
|
32
|
+
|
|
33
|
+
return /*#__PURE__*/React.createElement(WidgetBox, {
|
|
34
|
+
label: "\u641C\u7D22",
|
|
35
|
+
tooltip: "\u641C\u7D22",
|
|
36
|
+
showLabel: showLabel
|
|
37
|
+
}, /*#__PURE__*/React.createElement(TopoSearch, otherProps));
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export default ToolbarSearchWidget;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
|
|
3
|
+
import _Balloon from "@alifd/next/es/balloon";
|
|
4
|
+
var _excluded = ["active", "disabled", "children"];
|
|
5
|
+
import classNames from 'classnames';
|
|
6
|
+
import React from 'react';
|
|
7
|
+
import styles from "./WidgetBox.module.scss";
|
|
8
|
+
|
|
9
|
+
function WidgetBox(props) {
|
|
10
|
+
var label = props.label,
|
|
11
|
+
showLabel = props.showLabel,
|
|
12
|
+
tooltip = props.tooltip,
|
|
13
|
+
disabled = props.disabled,
|
|
14
|
+
children = props.children;
|
|
15
|
+
var button = /*#__PURE__*/React.createElement("button", {
|
|
16
|
+
disabled: disabled,
|
|
17
|
+
type: "button",
|
|
18
|
+
className: styles.container
|
|
19
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
20
|
+
className: styles.content
|
|
21
|
+
}, children), showLabel !== false && /*#__PURE__*/React.createElement("div", {
|
|
22
|
+
className: styles.label
|
|
23
|
+
}, label));
|
|
24
|
+
|
|
25
|
+
if (!tooltip) {
|
|
26
|
+
return button;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
return /*#__PURE__*/React.createElement(_Balloon.Tooltip, {
|
|
30
|
+
trigger: button,
|
|
31
|
+
align: "b"
|
|
32
|
+
}, tooltip);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
function ButtonBox(props) {
|
|
36
|
+
var _classNames;
|
|
37
|
+
|
|
38
|
+
var active = props.active,
|
|
39
|
+
disabled = props.disabled,
|
|
40
|
+
children = props.children,
|
|
41
|
+
otherProps = _objectWithoutPropertiesLoose(props, _excluded);
|
|
42
|
+
|
|
43
|
+
return /*#__PURE__*/React.createElement("div", _extends({
|
|
44
|
+
className: classNames(styles.ButtonBox, (_classNames = {}, _classNames[styles.ButtonBoxActive] = active, _classNames[styles.ButtonBoxDisabled] = disabled, _classNames))
|
|
45
|
+
}, otherProps), children);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
WidgetBox.ButtonBox = ButtonBox;
|
|
49
|
+
export default WidgetBox;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
.container {
|
|
2
|
+
margin: 0 6px;
|
|
3
|
+
display: flex;
|
|
4
|
+
flex-direction: column;
|
|
5
|
+
|
|
6
|
+
border-radius: 0;
|
|
7
|
+
padding: 0;
|
|
8
|
+
border-width: 0;
|
|
9
|
+
background-color: transparent;
|
|
10
|
+
border-color: transparent;
|
|
11
|
+
|
|
12
|
+
&[disabled] {
|
|
13
|
+
cursor: not-allowed;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
// &:hover {
|
|
17
|
+
// .content {
|
|
18
|
+
// background: rgba(76,137,255,0.1);
|
|
19
|
+
// border-radius: 4px;
|
|
20
|
+
// }
|
|
21
|
+
// }
|
|
22
|
+
|
|
23
|
+
transition: all .1s linear;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.content {
|
|
27
|
+
width: 100%;
|
|
28
|
+
flex: 1;
|
|
29
|
+
display: flex;
|
|
30
|
+
align-items: center;
|
|
31
|
+
justify-content: center;
|
|
32
|
+
|
|
33
|
+
transition: all .1s linear;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.label {
|
|
37
|
+
width: 100%;
|
|
38
|
+
margin-top: 4px;
|
|
39
|
+
font-size: 10px;
|
|
40
|
+
font-family: Helvetica;
|
|
41
|
+
color: #78849C;
|
|
42
|
+
line-height: 12px;
|
|
43
|
+
text-align: center;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.ButtonBox {
|
|
47
|
+
height: 24px;
|
|
48
|
+
display: flex;
|
|
49
|
+
align-items: center;
|
|
50
|
+
justify-content: center;
|
|
51
|
+
padding: 0 4px;
|
|
52
|
+
cursor: pointer;
|
|
53
|
+
|
|
54
|
+
&.ButtonBoxActive,
|
|
55
|
+
&:hover {
|
|
56
|
+
background: rgba(76, 137, 255, 0.1);
|
|
57
|
+
border-radius: 4px;
|
|
58
|
+
}
|
|
59
|
+
&.ButtonBoxDisabled:hover {
|
|
60
|
+
background: transparent;
|
|
61
|
+
cursor: not-allowed;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import _Icon from "@alifd/next/es/icon";
|
|
2
|
+
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
|
|
3
|
+
var _excluded = ["children", "active"];
|
|
4
|
+
import React from 'react';
|
|
5
|
+
import classNames from 'classnames';
|
|
6
|
+
import styles from "./ArrowButton.module.scss";
|
|
7
|
+
export default function ArrowButton(props) {
|
|
8
|
+
var _classNames;
|
|
9
|
+
|
|
10
|
+
var children = props.children,
|
|
11
|
+
active = props.active,
|
|
12
|
+
otherProps = _objectWithoutPropertiesLoose(props, _excluded);
|
|
13
|
+
|
|
14
|
+
return /*#__PURE__*/React.createElement("span", otherProps, children, /*#__PURE__*/React.createElement(_Icon, {
|
|
15
|
+
type: "tree_fold_arrow",
|
|
16
|
+
size: "xxs",
|
|
17
|
+
className: classNames(styles.icon, (_classNames = {}, _classNames[styles.active] = active, _classNames))
|
|
18
|
+
}));
|
|
19
|
+
}
|