@riil-frontend/component-topology 6.0.18 → 6.0.20
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/index.js +6 -6
- package/es/core/editor/components/Toolbar/widgets/components/textStyleSetting/ElementTextStyleSetting/elements/edgeTag.js +5 -1
- package/es/core/editor/components/Toolbar/widgets/components/textStyleSetting/ElementTextStyleSetting/elements/nodeTag.js +5 -1
- package/es/core/editor/components/settings/propertyViews/index.js +2 -1
- package/es/core/editor/components/settings/propertyViews/view/ViewPropertyViewV2.js +53 -0
- package/es/core/models/TopoApp.js +1 -1
- package/lib/core/editor/components/Toolbar/widgets/components/textStyleSetting/ElementTextStyleSetting/elements/edgeTag.js +5 -1
- package/lib/core/editor/components/Toolbar/widgets/components/textStyleSetting/ElementTextStyleSetting/elements/nodeTag.js +5 -1
- package/lib/core/editor/components/settings/propertyViews/index.js +3 -1
- package/lib/core/editor/components/settings/propertyViews/view/ViewPropertyViewV2.js +66 -0
- package/lib/core/models/TopoApp.js +1 -1
- package/package.json +2 -2
@@ -34,12 +34,16 @@ export function setTextStyle(element, style, topo) {
|
|
34
34
|
tagStyle.fontItalic = italic;
|
35
35
|
}
|
36
36
|
|
37
|
-
if ('background' in style
|
37
|
+
if ('background' in style) {
|
38
38
|
// 背景颜色
|
39
39
|
var prevStyle = getTextStyle(element);
|
40
40
|
tagStyle.background = formatBackgroundRgbaColor(prevStyle, style);
|
41
41
|
}
|
42
42
|
|
43
|
+
if ('opacity' in style) {
|
44
|
+
tagStyle.opacity = opacity;
|
45
|
+
}
|
46
|
+
|
43
47
|
if (Object.keys(tagStyle).length) {
|
44
48
|
topo.getHtTopo().setEdgeLabelStyle(element, tagStyle);
|
45
49
|
}
|
@@ -33,12 +33,16 @@ export function setTextStyle(element, style, topo) {
|
|
33
33
|
tagStyle.fontItalic = italic;
|
34
34
|
}
|
35
35
|
|
36
|
-
if ('background' in style
|
36
|
+
if ('background' in style) {
|
37
37
|
// 背景颜色
|
38
38
|
var prevStyle = getTextStyle(element);
|
39
39
|
tagStyle.background = formatBackgroundRgbaColor(prevStyle, style);
|
40
40
|
}
|
41
41
|
|
42
|
+
if ('opacity' in style) {
|
43
|
+
tagStyle.opacity = opacity;
|
44
|
+
}
|
45
|
+
|
42
46
|
if (Object.keys(tagStyle).length) {
|
43
47
|
topo.getHtTopo().setNodeLabelStyle(element, tagStyle);
|
44
48
|
}
|
@@ -3,8 +3,9 @@ import LayerPropertyView from "./layer/LayerPropertyView";
|
|
3
3
|
import TextPropertyView from "./text/TextPropertyView";
|
4
4
|
import GroupPropertyView from "./group/GroupPropertyView";
|
5
5
|
import BoxPropertyView from "./box/BoxPropertyView";
|
6
|
+
import ViewPropertyView from "./view/ViewPropertyViewV2";
|
6
7
|
var propertyPanelMap = {
|
7
|
-
|
8
|
+
view: ViewPropertyView,
|
8
9
|
group: GroupPropertyView,
|
9
10
|
node: NodePropertyView,
|
10
11
|
// edge: EdgePropertyView,
|
@@ -0,0 +1,53 @@
|
|
1
|
+
import _Form from "@alifd/next/es/form";
|
2
|
+
import _Collapse from "@alifd/next/es/collapse";
|
3
|
+
import React from 'react';
|
4
|
+
import useBackgroundConfig from "./hooks/useBackgroundConfig";
|
5
|
+
import BackgroundSize from "./BackgroundSize";
|
6
|
+
var CollapsePanel = _Collapse.Panel;
|
7
|
+
export default function ViewPropertyView(props) {
|
8
|
+
var topo = props.topo,
|
9
|
+
topoShowType = props.topoShowType,
|
10
|
+
editorProps = props.editorProps,
|
11
|
+
settingRuntimeState = props.settingRuntimeState;
|
12
|
+
var backgroundConfig = useBackgroundConfig({
|
13
|
+
topo: topo
|
14
|
+
});
|
15
|
+
var collapsePanels = [{
|
16
|
+
key: '背景',
|
17
|
+
visible: !!backgroundConfig.current,
|
18
|
+
createCollapsePanel: function createCollapsePanel() {
|
19
|
+
return /*#__PURE__*/React.createElement(CollapsePanel, {
|
20
|
+
key: "\u80CC\u666F",
|
21
|
+
title: "\u80CC\u666F"
|
22
|
+
}, /*#__PURE__*/React.createElement(_Form.Item, {
|
23
|
+
label: "\u80CC\u666F\u5C3A\u5BF8",
|
24
|
+
style: {
|
25
|
+
marginBottom: 0
|
26
|
+
}
|
27
|
+
}, /*#__PURE__*/React.createElement(BackgroundSize, {
|
28
|
+
topo: topo,
|
29
|
+
backgroundConfig: backgroundConfig,
|
30
|
+
settingRuntimeState: settingRuntimeState
|
31
|
+
})));
|
32
|
+
}
|
33
|
+
}];
|
34
|
+
var visibleCollapsePanels = collapsePanels.filter(function (panel) {
|
35
|
+
return panel.visible;
|
36
|
+
});
|
37
|
+
return /*#__PURE__*/React.createElement("div", {
|
38
|
+
style: {
|
39
|
+
paddingTop: 4
|
40
|
+
}
|
41
|
+
}, /*#__PURE__*/React.createElement(_Form, {
|
42
|
+
labelAlign: "top"
|
43
|
+
}, /*#__PURE__*/React.createElement(_Form.Item, null, !!collapsePanels.length && /*#__PURE__*/React.createElement(_Collapse, {
|
44
|
+
defaultExpandedKeys: collapsePanels.map(function (panel) {
|
45
|
+
return panel.key;
|
46
|
+
}),
|
47
|
+
style: {
|
48
|
+
border: 'none'
|
49
|
+
}
|
50
|
+
}, visibleCollapsePanels.map(function (panel) {
|
51
|
+
return panel.createCollapsePanel();
|
52
|
+
})))));
|
53
|
+
}
|
@@ -23,7 +23,7 @@ import topoFactory from "./topoFactory";
|
|
23
23
|
import ElementTagTipConfig from "./tagstips/ElementTagTipConfig";
|
24
24
|
import SelectionModel from "./SelectionModel"; // eslint-disable-next-line no-undef
|
25
25
|
|
26
|
-
var version = typeof "6.0.
|
26
|
+
var version = typeof "6.0.20" === 'string' ? "6.0.20" : null;
|
27
27
|
console.info("\u62D3\u6251\u7248\u672C: " + version);
|
28
28
|
/**
|
29
29
|
* 拓扑显示和编辑
|
@@ -51,12 +51,16 @@ function setTextStyle(element, style, topo) {
|
|
51
51
|
tagStyle.fontItalic = italic;
|
52
52
|
}
|
53
53
|
|
54
|
-
if ('background' in style
|
54
|
+
if ('background' in style) {
|
55
55
|
// 背景颜色
|
56
56
|
var prevStyle = getTextStyle(element);
|
57
57
|
tagStyle.background = (0, _colorUtil.formatBackgroundRgbaColor)(prevStyle, style);
|
58
58
|
}
|
59
59
|
|
60
|
+
if ('opacity' in style) {
|
61
|
+
tagStyle.opacity = opacity;
|
62
|
+
}
|
63
|
+
|
60
64
|
if (Object.keys(tagStyle).length) {
|
61
65
|
topo.getHtTopo().setEdgeLabelStyle(element, tagStyle);
|
62
66
|
}
|
@@ -50,12 +50,16 @@ function setTextStyle(element, style, topo) {
|
|
50
50
|
tagStyle.fontItalic = italic;
|
51
51
|
}
|
52
52
|
|
53
|
-
if ('background' in style
|
53
|
+
if ('background' in style) {
|
54
54
|
// 背景颜色
|
55
55
|
var prevStyle = getTextStyle(element);
|
56
56
|
tagStyle.background = (0, _colorUtil.formatBackgroundRgbaColor)(prevStyle, style);
|
57
57
|
}
|
58
58
|
|
59
|
+
if ('opacity' in style) {
|
60
|
+
tagStyle.opacity = opacity;
|
61
|
+
}
|
62
|
+
|
59
63
|
if (Object.keys(tagStyle).length) {
|
60
64
|
topo.getHtTopo().setNodeLabelStyle(element, tagStyle);
|
61
65
|
}
|
@@ -15,8 +15,10 @@ var _GroupPropertyView = _interopRequireDefault(require("./group/GroupPropertyVi
|
|
15
15
|
|
16
16
|
var _BoxPropertyView = _interopRequireDefault(require("./box/BoxPropertyView"));
|
17
17
|
|
18
|
+
var _ViewPropertyViewV = _interopRequireDefault(require("./view/ViewPropertyViewV2"));
|
19
|
+
|
18
20
|
var propertyPanelMap = {
|
19
|
-
|
21
|
+
view: _ViewPropertyViewV["default"],
|
20
22
|
group: _GroupPropertyView["default"],
|
21
23
|
node: _NodePropertyView["default"],
|
22
24
|
// edge: EdgePropertyView,
|
@@ -0,0 +1,66 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
4
|
+
|
5
|
+
exports.__esModule = true;
|
6
|
+
exports["default"] = ViewPropertyView;
|
7
|
+
|
8
|
+
var _form = _interopRequireDefault(require("@alifd/next/lib/form"));
|
9
|
+
|
10
|
+
var _collapse = _interopRequireDefault(require("@alifd/next/lib/collapse"));
|
11
|
+
|
12
|
+
var _react = _interopRequireDefault(require("react"));
|
13
|
+
|
14
|
+
var _useBackgroundConfig = _interopRequireDefault(require("./hooks/useBackgroundConfig"));
|
15
|
+
|
16
|
+
var _BackgroundSize = _interopRequireDefault(require("./BackgroundSize"));
|
17
|
+
|
18
|
+
var CollapsePanel = _collapse["default"].Panel;
|
19
|
+
|
20
|
+
function ViewPropertyView(props) {
|
21
|
+
var topo = props.topo,
|
22
|
+
topoShowType = props.topoShowType,
|
23
|
+
editorProps = props.editorProps,
|
24
|
+
settingRuntimeState = props.settingRuntimeState;
|
25
|
+
var backgroundConfig = (0, _useBackgroundConfig["default"])({
|
26
|
+
topo: topo
|
27
|
+
});
|
28
|
+
var collapsePanels = [{
|
29
|
+
key: '背景',
|
30
|
+
visible: !!backgroundConfig.current,
|
31
|
+
createCollapsePanel: function createCollapsePanel() {
|
32
|
+
return /*#__PURE__*/_react["default"].createElement(CollapsePanel, {
|
33
|
+
key: "\u80CC\u666F",
|
34
|
+
title: "\u80CC\u666F"
|
35
|
+
}, /*#__PURE__*/_react["default"].createElement(_form["default"].Item, {
|
36
|
+
label: "\u80CC\u666F\u5C3A\u5BF8",
|
37
|
+
style: {
|
38
|
+
marginBottom: 0
|
39
|
+
}
|
40
|
+
}, /*#__PURE__*/_react["default"].createElement(_BackgroundSize["default"], {
|
41
|
+
topo: topo,
|
42
|
+
backgroundConfig: backgroundConfig,
|
43
|
+
settingRuntimeState: settingRuntimeState
|
44
|
+
})));
|
45
|
+
}
|
46
|
+
}];
|
47
|
+
var visibleCollapsePanels = collapsePanels.filter(function (panel) {
|
48
|
+
return panel.visible;
|
49
|
+
});
|
50
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
51
|
+
style: {
|
52
|
+
paddingTop: 4
|
53
|
+
}
|
54
|
+
}, /*#__PURE__*/_react["default"].createElement(_form["default"], {
|
55
|
+
labelAlign: "top"
|
56
|
+
}, /*#__PURE__*/_react["default"].createElement(_form["default"].Item, null, !!collapsePanels.length && /*#__PURE__*/_react["default"].createElement(_collapse["default"], {
|
57
|
+
defaultExpandedKeys: collapsePanels.map(function (panel) {
|
58
|
+
return panel.key;
|
59
|
+
}),
|
60
|
+
style: {
|
61
|
+
border: 'none'
|
62
|
+
}
|
63
|
+
}, visibleCollapsePanels.map(function (panel) {
|
64
|
+
return panel.createCollapsePanel();
|
65
|
+
})))));
|
66
|
+
}
|
@@ -54,7 +54,7 @@ var _ElementTagTipConfig = _interopRequireDefault(require("./tagstips/ElementTag
|
|
54
54
|
var _SelectionModel = _interopRequireDefault(require("./SelectionModel"));
|
55
55
|
|
56
56
|
// eslint-disable-next-line no-undef
|
57
|
-
var version = typeof "6.0.
|
57
|
+
var version = typeof "6.0.20" === 'string' ? "6.0.20" : null;
|
58
58
|
console.info("\u62D3\u6251\u7248\u672C: " + version);
|
59
59
|
/**
|
60
60
|
* 拓扑显示和编辑
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@riil-frontend/component-topology",
|
3
|
-
"version": "6.0.
|
3
|
+
"version": "6.0.20",
|
4
4
|
"description": "拓扑",
|
5
5
|
"scripts": {
|
6
6
|
"start": "build-scripts start",
|
@@ -116,6 +116,6 @@
|
|
116
116
|
"access": "public"
|
117
117
|
},
|
118
118
|
"license": "MIT",
|
119
|
-
"homepage": "https://unpkg.com/@riil-frontend/component-topology@6.0.
|
119
|
+
"homepage": "https://unpkg.com/@riil-frontend/component-topology@6.0.20/build/index.html",
|
120
120
|
"gitHead": "2da19ffccbb7ca60a8acf396e39f542c68bb33f5"
|
121
121
|
}
|