@riil-frontend/component-topology 4.0.26 → 4.0.28
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 +7 -7
- package/es/core/components/DisplaySettingDrawer/LineExpandAllRadioGroup.js +3 -3
- package/es/core/models/TopoApp.js +1 -1
- package/es/core/models/utils/linkUtils.js +11 -2
- package/lib/core/components/DisplaySettingDrawer/LineExpandAllRadioGroup.js +2 -2
- package/lib/core/models/TopoApp.js +1 -1
- package/lib/core/models/utils/linkUtils.js +14 -3
- package/package.json +2 -2
|
@@ -5,9 +5,9 @@ import _Box from "@alifd/next/es/box";
|
|
|
5
5
|
import _Radio from "@alifd/next/es/radio";
|
|
6
6
|
import React, { useEffect, useState, useRef } from "react";
|
|
7
7
|
import styles from "./ResourceDisplay/CommonCheckboxGroup.module.scss";
|
|
8
|
-
import { plurals } from "../../models/utils/linkUtils";
|
|
8
|
+
import { plurals, compatibleWith } from "../../models/utils/linkUtils";
|
|
9
9
|
var LineExpandAllRadioGroup = /*#__PURE__*/React.forwardRef(function LineExpandAllRadioGroup(props, ref) {
|
|
10
|
-
var _plurals;
|
|
10
|
+
var _plurals$compatibleWi;
|
|
11
11
|
|
|
12
12
|
var value = props.value,
|
|
13
13
|
onChange = props.onChange,
|
|
@@ -19,7 +19,7 @@ var LineExpandAllRadioGroup = /*#__PURE__*/React.forwardRef(function LineExpandA
|
|
|
19
19
|
showType = _useState[0],
|
|
20
20
|
setShowType = _useState[1];
|
|
21
21
|
|
|
22
|
-
var _useState2 = useState((_plurals = plurals[value
|
|
22
|
+
var _useState2 = useState((_plurals$compatibleWi = plurals[compatibleWith(value)]) !== null && _plurals$compatibleWi !== void 0 ? _plurals$compatibleWi : []),
|
|
23
23
|
pluralType = _useState2[0],
|
|
24
24
|
setPluralType = _useState2[1];
|
|
25
25
|
|
|
@@ -21,7 +21,7 @@ import PluginManager from "./PluginManager";
|
|
|
21
21
|
import topoFactory from "./topoFactory";
|
|
22
22
|
import ElementTagTipConfig from "./tagstips/ElementTagTipConfig"; // eslint-disable-next-line no-undef
|
|
23
23
|
|
|
24
|
-
var version = typeof "4.0.
|
|
24
|
+
var version = typeof "4.0.28" === 'string' ? "4.0.28" : null;
|
|
25
25
|
console.info("\u62D3\u6251\u7248\u672C: " + version);
|
|
26
26
|
/**
|
|
27
27
|
* 拓扑显示和编辑
|
|
@@ -157,6 +157,15 @@ function _getLinksDetail() {
|
|
|
157
157
|
}
|
|
158
158
|
|
|
159
159
|
export function buildTopoLinkData() {}
|
|
160
|
+
export var compatibleWith = function compatibleWith(value) {
|
|
161
|
+
var pluralType = value !== null && value !== void 0 ? value : 2;
|
|
162
|
+
|
|
163
|
+
if (value === false) {
|
|
164
|
+
pluralType = 2;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
return pluralType;
|
|
168
|
+
};
|
|
160
169
|
/**
|
|
161
170
|
* 链路显示模式
|
|
162
171
|
*/
|
|
@@ -169,14 +178,14 @@ export var plurals = {
|
|
|
169
178
|
4: ["phy", "agg"]
|
|
170
179
|
};
|
|
171
180
|
export var showLinkByConfig = function showLinkByConfig(props) {
|
|
172
|
-
var _plurals$
|
|
181
|
+
var _plurals$compatibleWi;
|
|
173
182
|
|
|
174
183
|
var topo = props.topo,
|
|
175
184
|
_props$showType = props.showType,
|
|
176
185
|
showType = _props$showType === void 0 ? 2 : _props$showType;
|
|
177
186
|
console.log("showLinkByConfig-----------------------------", props, showType); //const displayConfig = topo.store.getModelState("displayConfig");
|
|
178
187
|
|
|
179
|
-
var types = (_plurals$
|
|
188
|
+
var types = (_plurals$compatibleWi = plurals[compatibleWith(showType)]) !== null && _plurals$compatibleWi !== void 0 ? _plurals$compatibleWi : []; // 查询所有连线
|
|
180
189
|
|
|
181
190
|
var gv = topo.getGraphView();
|
|
182
191
|
var dm = gv.getDataModel();
|
|
@@ -26,7 +26,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
26
26
|
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; }
|
|
27
27
|
|
|
28
28
|
var LineExpandAllRadioGroup = /*#__PURE__*/_react["default"].forwardRef(function LineExpandAllRadioGroup(props, ref) {
|
|
29
|
-
var _plurals;
|
|
29
|
+
var _plurals$compatibleWi;
|
|
30
30
|
|
|
31
31
|
var value = props.value,
|
|
32
32
|
onChange = props.onChange,
|
|
@@ -38,7 +38,7 @@ var LineExpandAllRadioGroup = /*#__PURE__*/_react["default"].forwardRef(function
|
|
|
38
38
|
showType = _useState[0],
|
|
39
39
|
setShowType = _useState[1];
|
|
40
40
|
|
|
41
|
-
var _useState2 = (0, _react.useState)((_plurals = _linkUtils.plurals[
|
|
41
|
+
var _useState2 = (0, _react.useState)((_plurals$compatibleWi = _linkUtils.plurals[(0, _linkUtils.compatibleWith)(value)]) !== null && _plurals$compatibleWi !== void 0 ? _plurals$compatibleWi : []),
|
|
42
42
|
pluralType = _useState2[0],
|
|
43
43
|
setPluralType = _useState2[1];
|
|
44
44
|
|
|
@@ -50,7 +50,7 @@ var _topoFactory = _interopRequireDefault(require("./topoFactory"));
|
|
|
50
50
|
var _ElementTagTipConfig = _interopRequireDefault(require("./tagstips/ElementTagTipConfig"));
|
|
51
51
|
|
|
52
52
|
// eslint-disable-next-line no-undef
|
|
53
|
-
var version = typeof "4.0.
|
|
53
|
+
var version = typeof "4.0.28" === 'string' ? "4.0.28" : null;
|
|
54
54
|
console.info("\u62D3\u6251\u7248\u672C: " + version);
|
|
55
55
|
/**
|
|
56
56
|
* 拓扑显示和编辑
|
|
@@ -4,7 +4,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
|
|
5
5
|
exports.__esModule = true;
|
|
6
6
|
exports.buildTopoLinkData = buildTopoLinkData;
|
|
7
|
-
exports.getInterfaceObject = void 0;
|
|
7
|
+
exports.getInterfaceObject = exports.compatibleWith = void 0;
|
|
8
8
|
exports.getLinksDetail = getLinksDetail;
|
|
9
9
|
exports.isAggLink = isAggLink;
|
|
10
10
|
exports.mergeLinksData = mergeLinksData;
|
|
@@ -180,11 +180,22 @@ function _getLinksDetail() {
|
|
|
180
180
|
}
|
|
181
181
|
|
|
182
182
|
function buildTopoLinkData() {}
|
|
183
|
+
|
|
184
|
+
var compatibleWith = function compatibleWith(value) {
|
|
185
|
+
var pluralType = value !== null && value !== void 0 ? value : 2;
|
|
186
|
+
|
|
187
|
+
if (value === false) {
|
|
188
|
+
pluralType = 2;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
return pluralType;
|
|
192
|
+
};
|
|
183
193
|
/**
|
|
184
194
|
* 链路显示模式
|
|
185
195
|
*/
|
|
186
196
|
|
|
187
197
|
|
|
198
|
+
exports.compatibleWith = compatibleWith;
|
|
188
199
|
var plurals = {
|
|
189
200
|
0: [],
|
|
190
201
|
1: [],
|
|
@@ -195,14 +206,14 @@ var plurals = {
|
|
|
195
206
|
exports.plurals = plurals;
|
|
196
207
|
|
|
197
208
|
var showLinkByConfig = function showLinkByConfig(props) {
|
|
198
|
-
var _plurals$
|
|
209
|
+
var _plurals$compatibleWi;
|
|
199
210
|
|
|
200
211
|
var topo = props.topo,
|
|
201
212
|
_props$showType = props.showType,
|
|
202
213
|
showType = _props$showType === void 0 ? 2 : _props$showType;
|
|
203
214
|
console.log("showLinkByConfig-----------------------------", props, showType); //const displayConfig = topo.store.getModelState("displayConfig");
|
|
204
215
|
|
|
205
|
-
var types = (_plurals$
|
|
216
|
+
var types = (_plurals$compatibleWi = plurals[compatibleWith(showType)]) !== null && _plurals$compatibleWi !== void 0 ? _plurals$compatibleWi : []; // 查询所有连线
|
|
206
217
|
|
|
207
218
|
var gv = topo.getGraphView();
|
|
208
219
|
var dm = gv.getDataModel();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@riil-frontend/component-topology",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.28",
|
|
4
4
|
"description": "拓扑",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"start": "build-scripts start",
|
|
@@ -114,6 +114,6 @@
|
|
|
114
114
|
"access": "public"
|
|
115
115
|
},
|
|
116
116
|
"license": "MIT",
|
|
117
|
-
"homepage": "https://unpkg.com/@riil-frontend/component-topology@4.0.
|
|
117
|
+
"homepage": "https://unpkg.com/@riil-frontend/component-topology@4.0.28/build/index.html",
|
|
118
118
|
"gitHead": "2da19ffccbb7ca60a8acf396e39f542c68bb33f5"
|
|
119
119
|
}
|