@riil-frontend/component-topology 11.0.0 → 11.0.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/index.js +1 -1
- package/es/components/BatchAttrMetric2/SelectTable.js +21 -0
- package/es/components/BatchAttrMetric2/constant.js +30 -0
- package/es/components/BatchAttrMetric2/index.js +75 -0
- package/es/components/BatchAttrMetric2/index.module.scss +76 -0
- package/es/components/BatchAttrMetric2/setting.js +188 -0
- package/es/components/BatchAttrMetric2/utils.js +80 -0
- package/es/components/ModelAttrSelectDrawer/components/ModelAttrSelect.js +7 -0
- package/es/components/ModelAttrSelectDrawer/components/ModelAttrSelectDrawer.js +36 -0
- package/es/components/ModelAttrSelectDrawer/index.js +2 -0
- package/es/core/components/DisplaySettingDrawer/NodeTag.js +1 -0
- package/es/core/hooks/useTopoEdit.js +139 -95
- package/es/core/models/TopoApp.js +1 -1
- package/es/core/models/tagstips/ElementTagTipConfig.js +15 -5
- package/es/core/utils/showGraphManageStatusUtil.js +3 -3
- package/es/utils/tree.js +2 -9
- package/es/utils/treeUtil.js +13 -0
- package/lib/components/BatchAttrMetric2/SelectTable.js +29 -0
- package/lib/components/BatchAttrMetric2/constant.js +36 -0
- package/lib/components/BatchAttrMetric2/index.js +93 -0
- package/lib/components/BatchAttrMetric2/index.module.scss +76 -0
- package/lib/components/BatchAttrMetric2/setting.js +216 -0
- package/lib/components/BatchAttrMetric2/utils.js +97 -0
- package/lib/components/ModelAttrSelectDrawer/components/ModelAttrSelect.js +15 -0
- package/lib/components/ModelAttrSelectDrawer/components/ModelAttrSelectDrawer.js +51 -0
- package/lib/components/ModelAttrSelectDrawer/index.js +11 -0
- package/lib/core/components/DisplaySettingDrawer/NodeTag.js +1 -0
- package/lib/core/hooks/useTopoEdit.js +139 -95
- package/lib/core/models/TopoApp.js +1 -1
- package/lib/core/models/tagstips/ElementTagTipConfig.js +15 -5
- package/lib/core/utils/showGraphManageStatusUtil.js +3 -3
- package/lib/utils/tree.js +3 -11
- package/lib/utils/treeUtil.js +20 -0
- package/package.json +6 -4
package/lib/utils/tree.js
CHANGED
@@ -10,6 +10,8 @@ exports.treeNodeCount = exports.loopTreeFun = exports.loopTreeByKey = exports.lo
|
|
10
10
|
|
11
11
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
12
12
|
|
13
|
+
var _treeUtil = require("./treeUtil");
|
14
|
+
|
13
15
|
var iconImg = ['/img/topo/Tree_Icon_Folder1.svg', '/img/topo/Tree_Icon_Topology.svg'];
|
14
16
|
/**
|
15
17
|
* 递归数组生成树结构
|
@@ -149,22 +151,12 @@ var loopTreeByKey = function loopTreeByKey(data, key, value, callback) {
|
|
149
151
|
|
150
152
|
|
151
153
|
exports.loopTreeByKey = loopTreeByKey;
|
152
|
-
|
153
|
-
var loopTreeFun = function loopTreeFun(data, callback) {
|
154
|
-
data.forEach(function (item, index, arr) {
|
155
|
-
if (item !== null && item !== void 0 && item.children) {
|
156
|
-
loopTreeFun(item.children, callback);
|
157
|
-
}
|
158
|
-
|
159
|
-
callback(item, index, arr);
|
160
|
-
});
|
161
|
-
};
|
154
|
+
var loopTreeFun = _treeUtil.loopTreeNode;
|
162
155
|
/**
|
163
156
|
* 更新文件夹下拓扑数量(目前只支持两级文件夹计算)
|
164
157
|
* @param {array} data
|
165
158
|
*/
|
166
159
|
|
167
|
-
|
168
160
|
exports.loopTreeFun = loopTreeFun;
|
169
161
|
|
170
162
|
var treeNodeCount = function treeNodeCount(data) {
|
@@ -0,0 +1,20 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
exports.__esModule = true;
|
4
|
+
exports.loopTreeNode = void 0;
|
5
|
+
|
6
|
+
/**
|
7
|
+
* 单纯递归循环遍历树
|
8
|
+
* @param {array} data
|
9
|
+
*/
|
10
|
+
var loopTreeNode = function loopTreeNode(data, callback) {
|
11
|
+
data.forEach(function (item, index, arr) {
|
12
|
+
if (item !== null && item !== void 0 && item.children) {
|
13
|
+
loopTreeNode(item.children, callback);
|
14
|
+
}
|
15
|
+
|
16
|
+
callback(item, index, arr);
|
17
|
+
});
|
18
|
+
};
|
19
|
+
|
20
|
+
exports.loopTreeNode = loopTreeNode;
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@riil-frontend/component-topology",
|
3
|
-
"version": "11.0.
|
3
|
+
"version": "11.0.2",
|
4
4
|
"description": "拓扑",
|
5
5
|
"scripts": {
|
6
6
|
"start": "build-scripts start",
|
@@ -12,7 +12,8 @@
|
|
12
12
|
"eslint": "eslint --cache --ext .js,.jsx,.ts,.tsx ./",
|
13
13
|
"eslint:fix": "npm run eslint -- --fix",
|
14
14
|
"stylelint": "stylelint \"**/*.{css,scss,less}\"",
|
15
|
-
"lint": "npm run eslint && npm run stylelint"
|
15
|
+
"lint": "npm run eslint && npm run stylelint",
|
16
|
+
"react-devtools": "react-devtools"
|
16
17
|
},
|
17
18
|
"main": "lib/index.js",
|
18
19
|
"module": "es/index.js",
|
@@ -74,7 +75,7 @@
|
|
74
75
|
"@riil-frontend/component-table-filter-tags": "latest",
|
75
76
|
"@riil-frontend/component-table-layout": "^2.0.2",
|
76
77
|
"@riil-frontend/component-topology-common": "^1.1.2",
|
77
|
-
"@riil-frontend/component-topology-graph": "^2.8.
|
78
|
+
"@riil-frontend/component-topology-graph": "^2.8.2",
|
78
79
|
"@riil-frontend/css": "^2.0.2",
|
79
80
|
"@riil-frontend/hooks": "latest",
|
80
81
|
"@riil-frontend/next-collapse": "^1.0.1-a.0",
|
@@ -91,6 +92,7 @@
|
|
91
92
|
"enzyme-adapter-react-16": "^1.15.4",
|
92
93
|
"eslint": "^6.0.1",
|
93
94
|
"html2canvas": "^1.3.2",
|
95
|
+
"jest": "^29.6.2",
|
94
96
|
"jspdf": "^2.3.1",
|
95
97
|
"lnk-cli": "^1.0.1",
|
96
98
|
"lodash": "^4.17.19",
|
@@ -116,6 +118,6 @@
|
|
116
118
|
"access": "public"
|
117
119
|
},
|
118
120
|
"license": "MIT",
|
119
|
-
"homepage": "https://unpkg.com/@riil-frontend/component-topology@11.0.
|
121
|
+
"homepage": "https://unpkg.com/@riil-frontend/component-topology@11.0.2/build/index.html",
|
120
122
|
"gitHead": "2da19ffccbb7ca60a8acf396e39f542c68bb33f5"
|
121
123
|
}
|