@riil-frontend/component-topology 10.0.1 → 10.0.3

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.
Files changed (26) hide show
  1. package/build/1.js +1 -1
  2. package/build/index.css +1 -1
  3. package/build/index.js +12 -12
  4. package/es/core/editor/components/BackgroundView/index.js +4 -2
  5. package/es/core/editor/components/BackgroundView/index.module.scss +12 -3
  6. package/es/core/editor/components/Sidebar/panes.js +1 -1
  7. package/es/core/editor/components/Sidebar/views/ImagePanel/CiTypeImagePanel.js +2 -5
  8. package/es/core/editor/components/Sidebar/views/ImagePanel/HtImagePalette.js +7 -0
  9. package/es/core/editor/components/Sidebar/views/ImagePanel/ImagePanel.js +123 -34
  10. package/es/core/editor/components/Toolbar/components/Tooltip.js +0 -1
  11. package/es/core/editor/components/Toolbar/widgets/FontSizeWidget.js +1 -1
  12. package/es/core/editor/components/Toolbar/widgets/NodeSizeButton/NodeSizeButton.js +1 -1
  13. package/es/core/models/AttributeMetricDisplay.js +10 -8
  14. package/es/core/models/TopoApp.js +6 -3
  15. package/lib/core/editor/components/BackgroundView/index.js +4 -2
  16. package/lib/core/editor/components/BackgroundView/index.module.scss +12 -3
  17. package/lib/core/editor/components/Sidebar/panes.js +1 -1
  18. package/lib/core/editor/components/Sidebar/views/ImagePanel/CiTypeImagePanel.js +2 -6
  19. package/lib/core/editor/components/Sidebar/views/ImagePanel/HtImagePalette.js +7 -0
  20. package/lib/core/editor/components/Sidebar/views/ImagePanel/ImagePanel.js +123 -32
  21. package/lib/core/editor/components/Toolbar/components/Tooltip.js +0 -1
  22. package/lib/core/editor/components/Toolbar/widgets/FontSizeWidget.js +1 -1
  23. package/lib/core/editor/components/Toolbar/widgets/NodeSizeButton/NodeSizeButton.js +1 -1
  24. package/lib/core/models/AttributeMetricDisplay.js +10 -8
  25. package/lib/core/models/TopoApp.js +6 -3
  26. package/package.json +2 -2
@@ -16,7 +16,6 @@ var _TooltipModule = _interopRequireDefault(require("./Tooltip.module.scss"));
16
16
  function Tooltip(props) {
17
17
  var title = props.title;
18
18
  return /*#__PURE__*/_react["default"].createElement(_balloon["default"], (0, _extends2["default"])({
19
- v2: true,
20
19
  triggerType: "hover",
21
20
  title: "\u79FB\u52A8",
22
21
  align: "br",
@@ -54,7 +54,7 @@ function FontSizeWidget(props) {
54
54
  (0, _react.useEffect)(function () {}, [selection]);
55
55
  return /*#__PURE__*/_react["default"].createElement(_WidgetBox["default"], {
56
56
  label: "\u5B57\u53F7",
57
- tooltip: "\u9009\u53D6\u6587\u5B57\u7684\u65B0\u5B57\u4F53",
57
+ tooltip: "\u66F4\u6539\u6587\u5B57\u5927\u5C0F",
58
58
  showLabel: showLabel,
59
59
  disabled: disabled
60
60
  }, /*#__PURE__*/_react["default"].createElement(FontSizeSelect, {
@@ -92,7 +92,7 @@ function NodeSizeButton(props) {
92
92
  return /*#__PURE__*/_react["default"].createElement(_WidgetBox["default"], {
93
93
  label: "\u56FE\u7247\u5C3A\u5BF8",
94
94
  disabled: disabled,
95
- tooltip: "\u56FE\u7247\u5C3A\u5BF8",
95
+ tooltip: "\u5C3A\u5BF8\u8BBE\u7F6E",
96
96
  showLabel: showLabel
97
97
  }, /*#__PURE__*/_react["default"].createElement("div", {
98
98
  className: _NodeSizeButtonModule["default"].toolbarNodeSizeSetting
@@ -628,12 +628,11 @@ var AttributeMetricDisplay = /*#__PURE__*/function () {
628
628
  ;
629
629
 
630
630
  _proto.buildTagsTips = function buildTagsTips() {
631
- var _this6 = this;
632
-
633
631
  var data = this.getData(); // 获取标注、悬浮框配置
634
632
 
635
633
  var ciConfigs = this.getResourceTagTipConfig(); // console.log("buildTagsTips---ciConfigs", ciConfigs);
636
634
 
635
+ var formatter = new _attributeFormatter["default"](this.topo);
637
636
  var ciTagsAndTips = ciConfigs.map(function (ciConfig) {
638
637
  var ciDataItem = (0, _topoData.findItem)(data, "id", ciConfig.id); // console.log("buildTagsTips-ciDataItem", ciDataItem);
639
638
 
@@ -646,12 +645,16 @@ var AttributeMetricDisplay = /*#__PURE__*/function () {
646
645
  } // 获取ci数据
647
646
 
648
647
 
649
- var ciData = (0, _extends2["default"])({}, (0, _topoData.findItem)(data, "id", ciConfig.id), {
648
+ var ciData = (0, _extends2["default"])({}, ciDataItem, {
650
649
  ciType: ciConfig.ciType
651
- });
652
- var formatter = new _attributeFormatter["default"](_this6.topo); // console.log("AttributeFormatter-----", ciData, ciConfig);
650
+ }); // console.log("AttributeFormatter-----", ciData, ciConfig);
653
651
 
654
- var tags = formatter.formatAttrs(ciConfig.tags, ciData); // 链路标注箭头
652
+ var tags = formatter.formatAttrs(ciConfig.tags, ciData) // 展示的所有标注不带对应的名字(包括属性和指标)
653
+ .map(function (item) {
654
+ return (0, _extends2["default"])({}, item, {
655
+ name: ''
656
+ });
657
+ }); // 链路标注箭头
655
658
 
656
659
  if (ciConfig.type === "edge") {
657
660
  tags = {
@@ -668,8 +671,7 @@ var AttributeMetricDisplay = /*#__PURE__*/function () {
668
671
  };
669
672
  }); // console.log("ciTagsAndTips", ciTagsAndTips);
670
673
 
671
- var elementTagsAndTips = [].concat(ciTagsAndTips, this.extElementTagTipBuilder ? this.extElementTagTipBuilder.getExtElementTagsAndTips() : []);
672
- console.log("ciTagsAndTips", elementTagsAndTips); // 刷新标注、浮层
674
+ var elementTagsAndTips = [].concat(ciTagsAndTips, this.extElementTagTipBuilder ? this.extElementTagTipBuilder.getExtElementTagsAndTips() : []); // 刷新标注、浮层
673
675
  // rlog.debug('AttributeMetricDisplay.buildTagsTips', {tagsAndTips: elementTagsAndTips, ciConfigs});
674
676
 
675
677
  return elementTagsAndTips;
@@ -56,7 +56,7 @@ var _SelectionModel = _interopRequireDefault(require("./SelectionModel"));
56
56
  var _CiCache = _interopRequireDefault(require("./cache/CiCache"));
57
57
 
58
58
  // eslint-disable-next-line no-undef
59
- var version = typeof "10.0.1" === 'string' ? "10.0.1" : null;
59
+ var version = typeof "10.0.3" === 'string' ? "10.0.3" : null;
60
60
  console.info("\u62D3\u6251\u7248\u672C: " + version);
61
61
  /**
62
62
  * 拓扑显示和编辑
@@ -602,8 +602,11 @@ var Topo = /*#__PURE__*/function () {
602
602
  return this.options.onSwitchToEditMode(this);
603
603
 
604
604
  case 13:
605
- // 更新节点名称显示隐藏
606
- this.attributeMetricDisplay.updateNodesNameVisible(); // 加载自定义上传的图标
605
+ if (this.getDataModel()) {
606
+ // 更新节点名称显示隐藏
607
+ this.attributeMetricDisplay.updateNodesNameVisible();
608
+ } // 加载自定义上传的图标
609
+
607
610
 
608
611
  iconManageDispatchers = this.store.getModelDispatchers('customIcon');
609
612
  iconManageDispatchers.loadEditorIcons();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riil-frontend/component-topology",
3
- "version": "10.0.1",
3
+ "version": "10.0.3",
4
4
  "description": "拓扑",
5
5
  "scripts": {
6
6
  "start": "build-scripts start",
@@ -116,6 +116,6 @@
116
116
  "access": "public"
117
117
  },
118
118
  "license": "MIT",
119
- "homepage": "https://unpkg.com/@riil-frontend/component-topology@10.0.1/build/index.html",
119
+ "homepage": "https://unpkg.com/@riil-frontend/component-topology@10.0.3/build/index.html",
120
120
  "gitHead": "2da19ffccbb7ca60a8acf396e39f542c68bb33f5"
121
121
  }