@riil-frontend/component-topology 2.15.40 → 2.15.43
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 +1 -1
- package/build/index.css +1 -1
- package/build/index.js +22 -22
- package/es/common/components/ColorPicker/ColorPicker.js +5 -2
- package/es/components/Drawer/index.js +11 -13
- package/es/components/Drawer/index.module.scss +15 -6
- package/es/components/ResourceSelectDrawer/ResourceSelectDrawer.js +1 -1
- package/es/components/ResourceSelectDrawer/ResourceSelectDrawer.module.scss +2 -11
- package/es/core/editor/components/settings/propertyViews/node/NodePropertyView.js +4 -3
- package/es/core/models/TopoApp.js +1 -1
- package/lib/common/components/ColorPicker/ColorPicker.js +5 -2
- package/lib/components/Drawer/index.js +12 -13
- package/lib/components/Drawer/index.module.scss +15 -6
- package/lib/components/ResourceSelectDrawer/ResourceSelectDrawer.js +1 -1
- package/lib/components/ResourceSelectDrawer/ResourceSelectDrawer.module.scss +2 -11
- package/lib/core/editor/components/settings/propertyViews/node/NodePropertyView.js +3 -2
- package/lib/core/models/TopoApp.js +1 -1
- package/package.json +2 -2
|
@@ -21,9 +21,11 @@ var ColorPicker = /*#__PURE__*/function (_Component) {
|
|
|
21
21
|
var _this$props = _this.props,
|
|
22
22
|
prevValue = _this$props.value,
|
|
23
23
|
onChange = _this$props.onChange;
|
|
24
|
+
var value = color.hex; // const rgb = color.rgb;
|
|
25
|
+
// const rgba = `rgba(${rgb.r},${rgb.g},${rgb.b},${rgb.a})`
|
|
24
26
|
|
|
25
|
-
if (
|
|
26
|
-
onChange(
|
|
27
|
+
if (value !== prevValue) {
|
|
28
|
+
onChange(value);
|
|
27
29
|
}
|
|
28
30
|
};
|
|
29
31
|
|
|
@@ -58,6 +60,7 @@ var ColorPicker = /*#__PURE__*/function (_Component) {
|
|
|
58
60
|
}, /*#__PURE__*/React.createElement(SketchPicker, {
|
|
59
61
|
color: value // width={230}
|
|
60
62
|
,
|
|
63
|
+
disableAlpha: true,
|
|
61
64
|
styles: {
|
|
62
65
|
'default': {
|
|
63
66
|
picker: {
|
|
@@ -2,28 +2,24 @@ import _Drawer from "@alifd/next/es/drawer";
|
|
|
2
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
3
3
|
import _Button from "@alifd/next/es/button";
|
|
4
4
|
import React from 'react';
|
|
5
|
+
import classnames from 'classnames';
|
|
5
6
|
import styles from "./index.module.scss";
|
|
6
7
|
var headerStyle = {
|
|
7
|
-
position: 'absolute',
|
|
8
|
-
top: 0,
|
|
9
|
-
left: 0,
|
|
10
|
-
width: '100%',
|
|
11
8
|
zIndex: 1000
|
|
12
9
|
};
|
|
13
|
-
var bodyStyle = {
|
|
14
|
-
margin: '46px auto',
|
|
15
|
-
padding: '16px 24px'
|
|
16
|
-
};
|
|
10
|
+
var bodyStyle = {};
|
|
17
11
|
|
|
18
12
|
var Drawer = function Drawer(props) {
|
|
19
13
|
var visible = props.visible,
|
|
20
14
|
disabled = props.disabled,
|
|
21
15
|
loading = props.loading,
|
|
22
16
|
title = props.title,
|
|
23
|
-
_props$
|
|
24
|
-
|
|
17
|
+
_props$footer = props.footer,
|
|
18
|
+
footer = _props$footer === void 0 ? true : _props$footer,
|
|
25
19
|
_props$buttons = props.buttons,
|
|
26
20
|
buttons = _props$buttons === void 0 ? props.buttons || ['保存', '取消'] : _props$buttons,
|
|
21
|
+
_props$footerActions = props.footerActions,
|
|
22
|
+
footerActions = _props$footerActions === void 0 ? ['确定', '取消'] : _props$footerActions,
|
|
27
23
|
onClose = props.onClose,
|
|
28
24
|
onSave = props.onSave,
|
|
29
25
|
drawerProps = props.drawerProps,
|
|
@@ -34,12 +30,14 @@ var Drawer = function Drawer(props) {
|
|
|
34
30
|
width: "40%",
|
|
35
31
|
headerStyle: headerStyle,
|
|
36
32
|
bodyStyle: bodyStyle,
|
|
37
|
-
closeMode: ['close', 'esc']
|
|
38
|
-
className: styles.drawer
|
|
33
|
+
closeMode: ['close', 'esc']
|
|
39
34
|
}, drawerProps, {
|
|
35
|
+
className: classnames(styles.drawer, drawerProps.className),
|
|
40
36
|
visible: visible,
|
|
41
37
|
onClose: onClose
|
|
42
|
-
}),
|
|
38
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
39
|
+
className: classnames(styles.content, drawerProps.bodyClassName)
|
|
40
|
+
}, children), footer && /*#__PURE__*/React.createElement("div", {
|
|
43
41
|
className: styles.footer
|
|
44
42
|
}, /*#__PURE__*/React.createElement(_Button, {
|
|
45
43
|
className: styles.button,
|
|
@@ -3,26 +3,35 @@
|
|
|
3
3
|
.drawer {
|
|
4
4
|
& > div {
|
|
5
5
|
display: flex;
|
|
6
|
+
flex-direction: column;
|
|
6
7
|
}
|
|
7
8
|
|
|
8
9
|
:global {
|
|
10
|
+
.#{$css-prefix}drawer-header {
|
|
11
|
+
}
|
|
9
12
|
.#{$css-prefix}drawer-body {
|
|
10
13
|
flex: 1;
|
|
14
|
+
display: flex;
|
|
15
|
+
flex-direction: column;
|
|
16
|
+
padding: 0;
|
|
17
|
+
overflow: auto;
|
|
11
18
|
}
|
|
12
19
|
}
|
|
13
20
|
}
|
|
14
21
|
|
|
22
|
+
.content {
|
|
23
|
+
flex: 1;
|
|
24
|
+
padding: 16px 24px;
|
|
25
|
+
overflow: auto;
|
|
26
|
+
|
|
27
|
+
}
|
|
15
28
|
|
|
16
29
|
.footer {
|
|
17
|
-
|
|
18
|
-
bottom: 0;
|
|
19
|
-
width: 100%;
|
|
30
|
+
background: #fff;
|
|
20
31
|
border-top: 1px solid #e8e8e8;
|
|
32
|
+
border-radius: 0 0 4px 4px;
|
|
21
33
|
padding: 10px 16px;
|
|
22
34
|
text-align: right;
|
|
23
|
-
left: 0;
|
|
24
|
-
background: #fff;
|
|
25
|
-
border-radius: 0 0 4px 4px;
|
|
26
35
|
|
|
27
36
|
& .button {
|
|
28
37
|
&:not(:first-child) {
|
|
@@ -5,7 +5,7 @@ import _Field from "@alifd/next/es/field";
|
|
|
5
5
|
import _extends from "@babel/runtime/helpers/extends";
|
|
6
6
|
import _Collapse from "@alifd/next/es/collapse";
|
|
7
7
|
import _Select from "@alifd/next/es/select";
|
|
8
|
-
import React, {
|
|
8
|
+
import React, { useEffect } from 'react';
|
|
9
9
|
import NodeSizeInput from "../../common/NodeSizeInput/NodeSizeInput";
|
|
10
10
|
import textStyles from "../../../../../common/text.module.scss";
|
|
11
11
|
import NodeIconSelect from "./NodeIconSelect";
|
|
@@ -73,8 +73,9 @@ export default function NodePropertyView(props) {
|
|
|
73
73
|
};
|
|
74
74
|
|
|
75
75
|
var handleBindTopoChange = function handleBindTopoChange(value, data) {
|
|
76
|
-
//
|
|
77
|
-
node.a('name', data.label);
|
|
76
|
+
// 设置名称为拓扑名称,清空自定义名称
|
|
77
|
+
node.a('name', data.label);
|
|
78
|
+
node.a('customName', null);
|
|
78
79
|
};
|
|
79
80
|
|
|
80
81
|
var renderData = function renderData() {
|
|
@@ -20,7 +20,7 @@ import { updateEdgeExpanded } from "../utils/edgeUtil";
|
|
|
20
20
|
import PluginManager from "./PluginManager";
|
|
21
21
|
import topoFactory from "./topoFactory"; // eslint-disable-next-line no-undef
|
|
22
22
|
|
|
23
|
-
var version = typeof "2.15.
|
|
23
|
+
var version = typeof "2.15.43" === 'string' ? "2.15.43" : null;
|
|
24
24
|
console.info("\u62D3\u6251\u7248\u672C: " + version);
|
|
25
25
|
/**
|
|
26
26
|
* 拓扑显示和编辑
|
|
@@ -37,9 +37,11 @@ var ColorPicker = /*#__PURE__*/function (_Component) {
|
|
|
37
37
|
var _this$props = _this.props,
|
|
38
38
|
prevValue = _this$props.value,
|
|
39
39
|
onChange = _this$props.onChange;
|
|
40
|
+
var value = color.hex; // const rgb = color.rgb;
|
|
41
|
+
// const rgba = `rgba(${rgb.r},${rgb.g},${rgb.b},${rgb.a})`
|
|
40
42
|
|
|
41
|
-
if (
|
|
42
|
-
onChange(
|
|
43
|
+
if (value !== prevValue) {
|
|
44
|
+
onChange(value);
|
|
43
45
|
}
|
|
44
46
|
};
|
|
45
47
|
|
|
@@ -76,6 +78,7 @@ var ColorPicker = /*#__PURE__*/function (_Component) {
|
|
|
76
78
|
}, /*#__PURE__*/_react["default"].createElement(_reactColor.SketchPicker, {
|
|
77
79
|
color: value // width={230}
|
|
78
80
|
,
|
|
81
|
+
disableAlpha: true,
|
|
79
82
|
styles: {
|
|
80
83
|
'default': {
|
|
81
84
|
picker: {
|
|
@@ -13,29 +13,26 @@ var _button = _interopRequireDefault(require("@alifd/next/lib/button"));
|
|
|
13
13
|
|
|
14
14
|
var _react = _interopRequireDefault(require("react"));
|
|
15
15
|
|
|
16
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
17
|
+
|
|
16
18
|
var _indexModule = _interopRequireDefault(require("./index.module.scss"));
|
|
17
19
|
|
|
18
20
|
var headerStyle = {
|
|
19
|
-
position: 'absolute',
|
|
20
|
-
top: 0,
|
|
21
|
-
left: 0,
|
|
22
|
-
width: '100%',
|
|
23
21
|
zIndex: 1000
|
|
24
22
|
};
|
|
25
|
-
var bodyStyle = {
|
|
26
|
-
margin: '46px auto',
|
|
27
|
-
padding: '16px 24px'
|
|
28
|
-
};
|
|
23
|
+
var bodyStyle = {};
|
|
29
24
|
|
|
30
25
|
var Drawer = function Drawer(props) {
|
|
31
26
|
var visible = props.visible,
|
|
32
27
|
disabled = props.disabled,
|
|
33
28
|
loading = props.loading,
|
|
34
29
|
title = props.title,
|
|
35
|
-
_props$
|
|
36
|
-
|
|
30
|
+
_props$footer = props.footer,
|
|
31
|
+
footer = _props$footer === void 0 ? true : _props$footer,
|
|
37
32
|
_props$buttons = props.buttons,
|
|
38
33
|
buttons = _props$buttons === void 0 ? props.buttons || ['保存', '取消'] : _props$buttons,
|
|
34
|
+
_props$footerActions = props.footerActions,
|
|
35
|
+
footerActions = _props$footerActions === void 0 ? ['确定', '取消'] : _props$footerActions,
|
|
39
36
|
onClose = props.onClose,
|
|
40
37
|
onSave = props.onSave,
|
|
41
38
|
drawerProps = props.drawerProps,
|
|
@@ -46,12 +43,14 @@ var Drawer = function Drawer(props) {
|
|
|
46
43
|
width: "40%",
|
|
47
44
|
headerStyle: headerStyle,
|
|
48
45
|
bodyStyle: bodyStyle,
|
|
49
|
-
closeMode: ['close', 'esc']
|
|
50
|
-
className: _indexModule["default"].drawer
|
|
46
|
+
closeMode: ['close', 'esc']
|
|
51
47
|
}, drawerProps, {
|
|
48
|
+
className: (0, _classnames["default"])(_indexModule["default"].drawer, drawerProps.className),
|
|
52
49
|
visible: visible,
|
|
53
50
|
onClose: onClose
|
|
54
|
-
}),
|
|
51
|
+
}), /*#__PURE__*/_react["default"].createElement("div", {
|
|
52
|
+
className: (0, _classnames["default"])(_indexModule["default"].content, drawerProps.bodyClassName)
|
|
53
|
+
}, children), footer && /*#__PURE__*/_react["default"].createElement("div", {
|
|
55
54
|
className: _indexModule["default"].footer
|
|
56
55
|
}, /*#__PURE__*/_react["default"].createElement(_button["default"], {
|
|
57
56
|
className: _indexModule["default"].button,
|
|
@@ -3,26 +3,35 @@
|
|
|
3
3
|
.drawer {
|
|
4
4
|
& > div {
|
|
5
5
|
display: flex;
|
|
6
|
+
flex-direction: column;
|
|
6
7
|
}
|
|
7
8
|
|
|
8
9
|
:global {
|
|
10
|
+
.#{$css-prefix}drawer-header {
|
|
11
|
+
}
|
|
9
12
|
.#{$css-prefix}drawer-body {
|
|
10
13
|
flex: 1;
|
|
14
|
+
display: flex;
|
|
15
|
+
flex-direction: column;
|
|
16
|
+
padding: 0;
|
|
17
|
+
overflow: auto;
|
|
11
18
|
}
|
|
12
19
|
}
|
|
13
20
|
}
|
|
14
21
|
|
|
22
|
+
.content {
|
|
23
|
+
flex: 1;
|
|
24
|
+
padding: 16px 24px;
|
|
25
|
+
overflow: auto;
|
|
26
|
+
|
|
27
|
+
}
|
|
15
28
|
|
|
16
29
|
.footer {
|
|
17
|
-
|
|
18
|
-
bottom: 0;
|
|
19
|
-
width: 100%;
|
|
30
|
+
background: #fff;
|
|
20
31
|
border-top: 1px solid #e8e8e8;
|
|
32
|
+
border-radius: 0 0 4px 4px;
|
|
21
33
|
padding: 10px 16px;
|
|
22
34
|
text-align: right;
|
|
23
|
-
left: 0;
|
|
24
|
-
background: #fff;
|
|
25
|
-
border-radius: 0 0 4px 4px;
|
|
26
35
|
|
|
27
36
|
& .button {
|
|
28
37
|
&:not(:first-child) {
|
|
@@ -108,7 +108,7 @@ function ResourceSelectDrawer(props) {
|
|
|
108
108
|
onClose: onClose,
|
|
109
109
|
drawerProps: {
|
|
110
110
|
width: '616px',
|
|
111
|
-
|
|
111
|
+
bodyClassName: _ResourceSelectDrawerModule["default"].body
|
|
112
112
|
},
|
|
113
113
|
buttons: ['确定', '取消']
|
|
114
114
|
}, visible && /*#__PURE__*/_react["default"].createElement(_ResourceSelectList["default"], {
|
|
@@ -99,8 +99,9 @@ function NodePropertyView(props) {
|
|
|
99
99
|
};
|
|
100
100
|
|
|
101
101
|
var handleBindTopoChange = function handleBindTopoChange(value, data) {
|
|
102
|
-
//
|
|
103
|
-
node.a('name', data.label);
|
|
102
|
+
// 设置名称为拓扑名称,清空自定义名称
|
|
103
|
+
node.a('name', data.label);
|
|
104
|
+
node.a('customName', null);
|
|
104
105
|
};
|
|
105
106
|
|
|
106
107
|
var renderData = function renderData() {
|
|
@@ -48,7 +48,7 @@ var _PluginManager = _interopRequireDefault(require("./PluginManager"));
|
|
|
48
48
|
var _topoFactory = _interopRequireDefault(require("./topoFactory"));
|
|
49
49
|
|
|
50
50
|
// eslint-disable-next-line no-undef
|
|
51
|
-
var version = typeof "2.15.
|
|
51
|
+
var version = typeof "2.15.43" === 'string' ? "2.15.43" : null;
|
|
52
52
|
console.info("\u62D3\u6251\u7248\u672C: " + version);
|
|
53
53
|
/**
|
|
54
54
|
* 拓扑显示和编辑
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@riil-frontend/component-topology",
|
|
3
|
-
"version": "2.15.
|
|
3
|
+
"version": "2.15.43",
|
|
4
4
|
"description": "拓扑",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"start": "build-scripts start",
|
|
@@ -110,6 +110,6 @@
|
|
|
110
110
|
"access": "public"
|
|
111
111
|
},
|
|
112
112
|
"license": "MIT",
|
|
113
|
-
"homepage": "https://unpkg.com/@riil-frontend/component-topology@2.15.
|
|
113
|
+
"homepage": "https://unpkg.com/@riil-frontend/component-topology@2.15.43/build/index.html",
|
|
114
114
|
"gitHead": "2da19ffccbb7ca60a8acf396e39f542c68bb33f5"
|
|
115
115
|
}
|