@riil-frontend/component-topology 3.1.13 → 3.2.0

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.
@@ -14,6 +14,7 @@ export function getSystemIcons() {
14
14
  });
15
15
  return [].concat(DEFAULT_NODE_ICONS, networkTopoCiTypeIcons);
16
16
  }
17
+ console.error(getSystemIcons(), getNetworkTopoCiTypeIcons());
17
18
  export function getIconLibs() {
18
19
  return [{
19
20
  id: '1',
@@ -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 "3.1.13" === 'string' ? "3.1.13" : null;
23
+ var version = typeof "3.2.0" === 'string' ? "3.2.0" : null;
24
24
  console.info("\u62D3\u6251\u7248\u672C: " + version);
25
25
  /**
26
26
  * 拓扑显示和编辑
@@ -381,6 +381,7 @@ export default function (topoApp) {
381
381
  topoConfig = _context6.sent;
382
382
  result = _extends({}, data, {
383
383
  global: topoConfig.global,
384
+ customGlobal: data.global,
384
385
  serialize: topoConfig.serialize
385
386
  });
386
387
  _context6.next = 27;
@@ -268,7 +268,7 @@ export function buildTopoGraphData() {// TODO 构造拓扑图数据移到这里
268
268
  }
269
269
 
270
270
  function buildGlobal(_ref2) {
271
- var _result$config, _engine$viewProps, _result$global2, _engine$options$viewe, _engine$options$edito, _engine$options$edito2;
271
+ var _result$config, _engine$viewProps, _result$global2, _result$customGlobal, _result$customGlobal2, _engine$options$viewe, _engine$options$edito, _engine$options$edito2;
272
272
 
273
273
  var result = _ref2.data,
274
274
  permission = _ref2.permission,
@@ -295,14 +295,15 @@ function buildGlobal(_ref2) {
295
295
  };
296
296
  }
297
297
 
298
- return _extends({
298
+ console.error(111, result);
299
+ return {
299
300
  // 背景图
300
301
  backgroundImgUrl: (_engine$viewProps = engine.viewProps) !== null && _engine$viewProps !== void 0 && _engine$viewProps.hideBackground ? null : getBackgroundImageUrl(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.background),
301
302
  control: _extends({
302
303
  editable: topoPermissionUtil.isEditable(permission),
303
304
  // 是否可编辑----控制[编辑]按钮
304
305
  moveable: true
305
- }, (result === null || result === void 0 ? void 0 : (_result$global2 = result.global) === null || _result$global2 === void 0 ? void 0 : _result$global2.control) || {}),
306
+ }, (result === null || result === void 0 ? void 0 : (_result$global2 = result.global) === null || _result$global2 === void 0 ? void 0 : _result$global2.control) || {}, (result === null || result === void 0 ? void 0 : (_result$customGlobal = result.customGlobal) === null || _result$customGlobal === void 0 ? void 0 : _result$customGlobal.control) || {}),
306
307
  topoDisplayConfig: _extends({
307
308
  // alarmSwitch: (result.global || {}).alarmSwitch ?? true,
308
309
  showLog: false,
@@ -315,9 +316,8 @@ function buildGlobal(_ref2) {
315
316
  // 是否显示链路名称
316
317
  nodeLabelStyle: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.nodeLabelStyle,
317
318
  edgeFlow: edgeFlow
318
- }, (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.topoDisplayConfig) || {}),
319
- linkTo: linkTo
320
- }, result.global || {}, {
319
+ }, (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.topoDisplayConfig) || {}, (result === null || result === void 0 ? void 0 : (_result$customGlobal2 = result.customGlobal) === null || _result$customGlobal2 === void 0 ? void 0 : _result$customGlobal2.topoDisplayConfig) || {}),
320
+ linkTo: linkTo,
321
321
  viewMode: {
322
322
  // 右键菜单
323
323
  contextMenu: mergeContextmenu(buildViewerContextMenu(engine), (_engine$options$viewe = engine.options.viewer) === null || _engine$options$viewe === void 0 ? void 0 : _engine$options$viewe.contextmenu, engine)
@@ -330,7 +330,7 @@ function buildGlobal(_ref2) {
330
330
  icons: getEditorIcons(engine),
331
331
  // 获取默认节点图标,可选参数。如果无返回值则继续使用内部默认
332
332
  getDefaultNodeIcon: engine.options.getDefaultNodeIcon
333
- });
333
+ };
334
334
  }
335
335
  /**
336
336
  * 将从后端接收的数据转化为topo组件中需要的数据
@@ -37,6 +37,8 @@ function getSystemIcons() {
37
37
  return [].concat(_defaultIcons.DEFAULT_NODE_ICONS, networkTopoCiTypeIcons);
38
38
  }
39
39
 
40
+ console.error(getSystemIcons(), (0, _networkTopoCiTypeIcons["default"])());
41
+
40
42
  function getIconLibs() {
41
43
  return [{
42
44
  id: '1',
@@ -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 "3.1.13" === 'string' ? "3.1.13" : null;
51
+ var version = typeof "3.2.0" === 'string' ? "3.2.0" : null;
52
52
  console.info("\u62D3\u6251\u7248\u672C: " + version);
53
53
  /**
54
54
  * 拓扑显示和编辑
@@ -400,6 +400,7 @@ function _default(topoApp) {
400
400
  topoConfig = _context6.sent;
401
401
  result = (0, _extends2["default"])({}, data, {
402
402
  global: topoConfig.global,
403
+ customGlobal: data.global,
403
404
  serialize: topoConfig.serialize
404
405
  });
405
406
  _context6.next = 27;
@@ -310,7 +310,7 @@ function buildTopoGraphData() {// TODO 构造拓扑图数据移到这里
310
310
  }
311
311
 
312
312
  function buildGlobal(_ref2) {
313
- var _result$config, _engine$viewProps, _result$global2, _engine$options$viewe, _engine$options$edito, _engine$options$edito2;
313
+ var _result$config, _engine$viewProps, _result$global2, _result$customGlobal, _result$customGlobal2, _engine$options$viewe, _engine$options$edito, _engine$options$edito2;
314
314
 
315
315
  var result = _ref2.data,
316
316
  permission = _ref2.permission,
@@ -337,14 +337,15 @@ function buildGlobal(_ref2) {
337
337
  };
338
338
  }
339
339
 
340
- return (0, _extends2["default"])({
340
+ console.error(111, result);
341
+ return {
341
342
  // 背景图
342
343
  backgroundImgUrl: (_engine$viewProps = engine.viewProps) !== null && _engine$viewProps !== void 0 && _engine$viewProps.hideBackground ? null : (0, _backgroundUtil.getBackgroundImageUrl)(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.background),
343
344
  control: (0, _extends2["default"])({
344
345
  editable: _topoPermissionUtil["default"].isEditable(permission),
345
346
  // 是否可编辑----控制[编辑]按钮
346
347
  moveable: true
347
- }, (result === null || result === void 0 ? void 0 : (_result$global2 = result.global) === null || _result$global2 === void 0 ? void 0 : _result$global2.control) || {}),
348
+ }, (result === null || result === void 0 ? void 0 : (_result$global2 = result.global) === null || _result$global2 === void 0 ? void 0 : _result$global2.control) || {}, (result === null || result === void 0 ? void 0 : (_result$customGlobal = result.customGlobal) === null || _result$customGlobal === void 0 ? void 0 : _result$customGlobal.control) || {}),
348
349
  topoDisplayConfig: (0, _extends2["default"])({
349
350
  // alarmSwitch: (result.global || {}).alarmSwitch ?? true,
350
351
  showLog: false,
@@ -357,9 +358,8 @@ function buildGlobal(_ref2) {
357
358
  // 是否显示链路名称
358
359
  nodeLabelStyle: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.nodeLabelStyle,
359
360
  edgeFlow: edgeFlow
360
- }, (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.topoDisplayConfig) || {}),
361
- linkTo: linkTo
362
- }, result.global || {}, {
361
+ }, (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.topoDisplayConfig) || {}, (result === null || result === void 0 ? void 0 : (_result$customGlobal2 = result.customGlobal) === null || _result$customGlobal2 === void 0 ? void 0 : _result$customGlobal2.topoDisplayConfig) || {}),
362
+ linkTo: linkTo,
363
363
  viewMode: {
364
364
  // 右键菜单
365
365
  contextMenu: (0, _mergeContextmenu["default"])((0, _buildContextmenu["default"])(engine), (_engine$options$viewe = engine.options.viewer) === null || _engine$options$viewe === void 0 ? void 0 : _engine$options$viewe.contextmenu, engine)
@@ -372,7 +372,7 @@ function buildGlobal(_ref2) {
372
372
  icons: (0, _icon.getEditorIcons)(engine),
373
373
  // 获取默认节点图标,可选参数。如果无返回值则继续使用内部默认
374
374
  getDefaultNodeIcon: engine.options.getDefaultNodeIcon
375
- });
375
+ };
376
376
  }
377
377
  /**
378
378
  * 将从后端接收的数据转化为topo组件中需要的数据
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riil-frontend/component-topology",
3
- "version": "3.1.13",
3
+ "version": "3.2.0",
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@3.1.13/build/index.html",
113
+ "homepage": "https://unpkg.com/@riil-frontend/component-topology@3.2.0/build/index.html",
114
114
  "gitHead": "2da19ffccbb7ca60a8acf396e39f542c68bb33f5"
115
115
  }