@riil-frontend/component-topology 2.15.16 → 2.15.17

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.
@@ -0,0 +1 @@
1
+ [{"id":10000,"isSystem":1,"fileCode":"chinamap_light"},{"id":10001,"isSystem":1,"fileCode":"chinamap_dark"},{"id":10002,"isSystem":1,"fileCode":"test"}]
@@ -8,8 +8,11 @@ import ColorPicker from "../../../../../../common/components/ColorPicker";
8
8
  import LineType from "../../common/LineType";
9
9
  var CollapsePanel = _Collapse.Panel;
10
10
 
11
- function parseValues(values) {
12
- return _extends({}, values);
11
+ function parseValues(values, edge) {
12
+ return _extends({}, values, {
13
+ 'styleMap.edge.width': edge.s('edge.width') // element.getStyleMap() 如果是默认值则不返回
14
+
15
+ });
13
16
  }
14
17
 
15
18
  export default function CommonEdgePropertyView(props) {
@@ -21,7 +24,7 @@ export default function CommonEdgePropertyView(props) {
21
24
 
22
25
  var field = _Field.useField({
23
26
  autoUnmount: false,
24
- values: parseValues(values),
27
+ values: parseValues(values, edge),
25
28
  onChange: function onChange(name, value) {
26
29
  var newValues = field.getValues();
27
30
 
@@ -32,7 +35,7 @@ export default function CommonEdgePropertyView(props) {
32
35
  });
33
36
 
34
37
  useEffect(function () {
35
- field.setValues(parseValues(values));
38
+ field.setValues(parseValues(values, edge));
36
39
  }, [values]);
37
40
 
38
41
  var setLineColor = function setLineColor(color) {
@@ -486,7 +486,7 @@ var AttributeMetricDisplay = /*#__PURE__*/function () {
486
486
  }()
487
487
  /**
488
488
  * 临时由前端翻译引用属性名称
489
- * @param {*} ciDatas
489
+ * @param {array} ciDatas
490
490
  * @returns
491
491
  */
492
492
  ;
@@ -526,12 +526,20 @@ var AttributeMetricDisplay = /*#__PURE__*/function () {
526
526
  });
527
527
  });
528
528
  });
529
- refIds = Object.keys(refIdMap); // 查询引用对象
529
+ refIds = Object.keys(refIdMap);
530
530
 
531
- _context3.next = 6;
532
- return queryCisByIds(refIds);
531
+ if (refIds.length) {
532
+ _context3.next = 6;
533
+ break;
534
+ }
535
+
536
+ return _context3.abrupt("return", ciDatas);
533
537
 
534
538
  case 6:
539
+ _context3.next = 8;
540
+ return queryCisByIds(refIds);
541
+
542
+ case 8:
535
543
  refCis = _context3.sent;
536
544
  refCiMap = keyBy(refCis, 'id');
537
545
  rlog.debug('translateRefAttribute', {
@@ -559,7 +567,7 @@ var AttributeMetricDisplay = /*#__PURE__*/function () {
559
567
  });
560
568
  }));
561
569
 
562
- case 10:
570
+ case 12:
563
571
  case "end":
564
572
  return _context3.stop();
565
573
  }
@@ -19,7 +19,7 @@ import GraphDataModel from "./GraphDataModel";
19
19
  import { updateEdgeExpanded } from "../utils/edgeUtil";
20
20
  import PluginManager from "./PluginManager"; // eslint-disable-next-line no-undef
21
21
 
22
- var version = typeof "2.15.16" === 'string' ? "2.15.16" : null;
22
+ var version = typeof "2.15.17" === 'string' ? "2.15.17" : null;
23
23
  console.info("\u62D3\u6251\u7248\u672C: " + version);
24
24
  var topoDebug = {};
25
25
  window.topoDebug = topoDebug;
@@ -27,8 +27,11 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
27
27
 
28
28
  var CollapsePanel = _collapse["default"].Panel;
29
29
 
30
- function parseValues(values) {
31
- return (0, _extends2["default"])({}, values);
30
+ function parseValues(values, edge) {
31
+ return (0, _extends2["default"])({}, values, {
32
+ 'styleMap.edge.width': edge.s('edge.width') // element.getStyleMap() 如果是默认值则不返回
33
+
34
+ });
32
35
  }
33
36
 
34
37
  function CommonEdgePropertyView(props) {
@@ -40,7 +43,7 @@ function CommonEdgePropertyView(props) {
40
43
 
41
44
  var field = _field["default"].useField({
42
45
  autoUnmount: false,
43
- values: parseValues(values),
46
+ values: parseValues(values, edge),
44
47
  onChange: function onChange(name, value) {
45
48
  var newValues = field.getValues();
46
49
 
@@ -51,7 +54,7 @@ function CommonEdgePropertyView(props) {
51
54
  });
52
55
 
53
56
  (0, _react.useEffect)(function () {
54
- field.setValues(parseValues(values));
57
+ field.setValues(parseValues(values, edge));
55
58
  }, [values]);
56
59
 
57
60
  var setLineColor = function setLineColor(color) {
@@ -505,7 +505,7 @@ var AttributeMetricDisplay = /*#__PURE__*/function () {
505
505
  }()
506
506
  /**
507
507
  * 临时由前端翻译引用属性名称
508
- * @param {*} ciDatas
508
+ * @param {array} ciDatas
509
509
  * @returns
510
510
  */
511
511
  ;
@@ -545,12 +545,20 @@ var AttributeMetricDisplay = /*#__PURE__*/function () {
545
545
  });
546
546
  });
547
547
  });
548
- refIds = Object.keys(refIdMap); // 查询引用对象
548
+ refIds = Object.keys(refIdMap);
549
549
 
550
- _context3.next = 6;
551
- return (0, _services.queryCisByIds)(refIds);
550
+ if (refIds.length) {
551
+ _context3.next = 6;
552
+ break;
553
+ }
554
+
555
+ return _context3.abrupt("return", ciDatas);
552
556
 
553
557
  case 6:
558
+ _context3.next = 8;
559
+ return (0, _services.queryCisByIds)(refIds);
560
+
561
+ case 8:
554
562
  refCis = _context3.sent;
555
563
  refCiMap = (0, _lodash.keyBy)(refCis, 'id');
556
564
 
@@ -578,7 +586,7 @@ var AttributeMetricDisplay = /*#__PURE__*/function () {
578
586
  });
579
587
  }));
580
588
 
581
- case 10:
589
+ case 12:
582
590
  case "end":
583
591
  return _context3.stop();
584
592
  }
@@ -46,7 +46,7 @@ var _edgeUtil = require("../utils/edgeUtil");
46
46
  var _PluginManager = _interopRequireDefault(require("./PluginManager"));
47
47
 
48
48
  // eslint-disable-next-line no-undef
49
- var version = typeof "2.15.16" === 'string' ? "2.15.16" : null;
49
+ var version = typeof "2.15.17" === 'string' ? "2.15.17" : null;
50
50
  console.info("\u62D3\u6251\u7248\u672C: " + version);
51
51
  var topoDebug = {};
52
52
  window.topoDebug = topoDebug;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riil-frontend/component-topology",
3
- "version": "2.15.16",
3
+ "version": "2.15.17",
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.16/build/index.html",
113
+ "homepage": "https://unpkg.com/@riil-frontend/component-topology@2.15.17/build/index.html",
114
114
  "gitHead": "2da19ffccbb7ca60a8acf396e39f542c68bb33f5"
115
115
  }