@riil-frontend/component-topology 2.15.43 → 2.15.46

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 (139) hide show
  1. package/build/index.css +1 -1
  2. package/build/index.js +22 -22
  3. package/es/components/Drawer/index.js +8 -2
  4. package/es/components/TagImageSelect/index.js +3 -1
  5. package/es/components/TagSelect/index.js +3 -3
  6. package/es/components/TemplateButton/index.module.scss +1 -0
  7. package/es/core/common/hooks/ht/useDataModelDataPropertyChange.js +13 -4
  8. package/es/core/common/icons/icon.js +1 -1
  9. package/es/core/common/icons/useIcons.js +1 -1
  10. package/es/core/components/TopoView/topoView.js +8 -18
  11. package/es/core/{models/createTopoApp.js → createTopoApp.js} +1 -1
  12. package/es/core/editor/components/BackgroundView/index.js +80 -44
  13. package/es/core/editor/components/BackgroundView/index.module.scss +1 -0
  14. package/es/core/editor/components/{iconManage/IconManage.js → CustomIconPlugin/CustomIconPlugin.js} +3 -3
  15. package/es/core/editor/components/{iconManage → CustomIconPlugin}/RenameDialog.js +1 -1
  16. package/es/core/editor/components/{iconManage → CustomIconPlugin}/UploadIconDialog.js +16 -2
  17. package/es/core/editor/components/{iconManage → CustomIconPlugin}/UploadIconDialog.module.scss +0 -0
  18. package/es/core/editor/components/{iconManage → CustomIconPlugin}/UploadIconDialog.scss +0 -0
  19. package/es/core/editor/components/{iconManage → CustomIconPlugin}/UploadIconDialogWrapper.js +1 -1
  20. package/es/core/editor/components/CustomIconPlugin/index.js +2 -0
  21. package/es/core/editor/components/{iconManage → CustomIconPlugin}/utils/svgToShape.js +0 -0
  22. package/es/core/editor/components/EditorPlugin.js +2 -2
  23. package/es/core/editor/components/settings/common/LayoutSettings.js +11 -19
  24. package/es/core/editor/components/settings/propertyViews/group/DataTab/hoooks/useGroupRelateResource.js +4 -4
  25. package/es/core/editor/components/settings/propertyViews/group/SettingTab/GroupExpandSetting.js +13 -8
  26. package/es/core/editor/components/settings/propertyViews/group/SettingTab/Setting.js +2 -0
  27. package/es/core/models/TopoApp.js +9 -5
  28. package/es/core/services/background.js +26 -1
  29. package/es/core/store/coreModels.js +32 -26
  30. package/es/core/store/createStore.js +1 -1
  31. package/es/core/test/Test.js +3 -1
  32. package/es/core/viewer/contextmenu/buildNodeContextmenu.js +65 -64
  33. package/es/createTopo.js +1 -1
  34. package/es/hooks/useAlarm.js +3 -6
  35. package/es/hooks/useResourceConfig.js +1 -1
  36. package/es/hooks/useTopoEdit.js +4 -8
  37. package/es/models/{iconManage.js → customIcon.js} +1 -1
  38. package/es/models/topoBizMod.js +22 -52
  39. package/es/models/{topoCreateMod.js → topoConfig.js} +8 -4
  40. package/es/models/topoMod.js +32 -69
  41. package/es/{components → topoCenter/components}/Link/form.js +0 -0
  42. package/es/{components → topoCenter/components}/Link/hook.js +0 -0
  43. package/es/{components → topoCenter/components}/Link/index copy.js +1 -1
  44. package/es/{components → topoCenter/components}/Link/index.js +1 -1
  45. package/es/{components → topoCenter/components}/Link/index.module.scss +0 -0
  46. package/es/{components → topoCenter/components}/Link/setting.js +0 -0
  47. package/es/topoCenter/components/TopoView.js +16 -3
  48. package/es/topoCenter/components/Topology.js +0 -5
  49. package/es/{core/editor/components → topoCenter/components/editor}/LinkDynamicStyleSettingDrawer/RuleSetting.js +0 -0
  50. package/es/{core/editor/components → topoCenter/components/editor}/LinkDynamicStyleSettingDrawer/RuleSetting.module.scss +0 -0
  51. package/es/{core/editor/components → topoCenter/components/editor}/LinkDynamicStyleSettingDrawer/index.js +0 -0
  52. package/es/{core/editor/components → topoCenter/components/editor}/LinkDynamicStyleSettingDrawer/rule/Rule.js +0 -0
  53. package/es/{core/editor/components → topoCenter/components/editor}/LinkDynamicStyleSettingDrawer/rule/Rule.module.scss +0 -0
  54. package/es/{core/editor/components → topoCenter/components/editor}/LinkDynamicStyleSettingDrawer/rule/RuleCondition.js +0 -0
  55. package/es/{core/editor/components → topoCenter/components/editor}/LinkDynamicStyleSettingDrawer/rule/RuleCondition.module.scss +0 -0
  56. package/es/{core/editor/components → topoCenter/components/editor}/LinkDynamicStyleSettingDrawer/rule/RuleCondition.scss +0 -0
  57. package/es/{core/editor/components → topoCenter/components/editor}/LinkDynamicStyleSettingDrawer/rule/RuleStyle.js +0 -0
  58. package/es/{core/editor/components → topoCenter/components/editor}/LinkDynamicStyleSettingDrawer/rule/RuleStyle.module.scss +0 -0
  59. package/es/topoCenter/components/editor/propertyViews/edge/EdgeGroupPropertyView.js +1 -1
  60. package/es/topoCenter/components/editor/propertyViews/edge/LinkPropertyView/Data/index.js +3 -3
  61. package/es/topoCenter/components/editor/propertyViews/edge/addLinkDrawer/AddLinkDrawer.js +1 -1
  62. package/es/topoCenter/components/editor/propertyViews/edge/addLinkDrawer/components/editLinkInfo.js +1 -1
  63. package/es/topoCenter/components/editor/propertyViews/edge/link/{LindInfoPreview.js → LinkInfoPreview.js} +1 -1
  64. package/es/topoCenter/components/editor/propertyViews/edge/link/{LindInfoPreview.module.scss → LinkInfoPreview.module.scss} +0 -0
  65. package/es/{hooks → topoCenter/hooks/viewer}/useRelateTopo.js +2 -2
  66. package/es/{models → topoCenter/store}/linkDynamicStyle.js +3 -3
  67. package/es/{models → topoCenter/store}/linkDynamicStyleConfig.js +2 -1
  68. package/es/{models → topoCenter/store}/linkManager.js +0 -0
  69. package/lib/components/Drawer/index.js +7 -2
  70. package/lib/components/TagImageSelect/index.js +3 -1
  71. package/lib/components/TagSelect/index.js +3 -3
  72. package/lib/components/TemplateButton/index.module.scss +1 -0
  73. package/lib/core/common/hooks/ht/useDataModelDataPropertyChange.js +13 -4
  74. package/lib/core/common/icons/icon.js +1 -1
  75. package/lib/core/common/icons/useIcons.js +1 -1
  76. package/lib/core/components/TopoView/topoView.js +9 -20
  77. package/lib/core/{models/createTopoApp.js → createTopoApp.js} +1 -1
  78. package/lib/core/editor/components/BackgroundView/index.js +80 -44
  79. package/lib/core/editor/components/BackgroundView/index.module.scss +1 -0
  80. package/lib/core/editor/components/{iconManage/IconManage.js → CustomIconPlugin/CustomIconPlugin.js} +3 -3
  81. package/lib/core/editor/components/{iconManage → CustomIconPlugin}/RenameDialog.js +1 -1
  82. package/lib/core/editor/components/{iconManage → CustomIconPlugin}/UploadIconDialog.js +17 -2
  83. package/lib/core/editor/components/{iconManage → CustomIconPlugin}/UploadIconDialog.module.scss +0 -0
  84. package/lib/core/editor/components/{iconManage → CustomIconPlugin}/UploadIconDialog.scss +0 -0
  85. package/lib/core/editor/components/{iconManage → CustomIconPlugin}/UploadIconDialogWrapper.js +1 -1
  86. package/lib/core/editor/components/CustomIconPlugin/index.js +11 -0
  87. package/lib/core/editor/components/{iconManage → CustomIconPlugin}/utils/svgToShape.js +0 -0
  88. package/lib/core/editor/components/EditorPlugin.js +2 -2
  89. package/lib/core/editor/components/settings/common/LayoutSettings.js +10 -18
  90. package/lib/core/editor/components/settings/propertyViews/group/DataTab/hoooks/useGroupRelateResource.js +2 -4
  91. package/lib/core/editor/components/settings/propertyViews/group/SettingTab/GroupExpandSetting.js +12 -7
  92. package/lib/core/editor/components/settings/propertyViews/group/SettingTab/Setting.js +2 -0
  93. package/lib/core/models/TopoApp.js +9 -5
  94. package/lib/core/services/background.js +26 -1
  95. package/lib/core/store/coreModels.js +35 -26
  96. package/lib/core/store/createStore.js +2 -2
  97. package/lib/core/test/Test.js +3 -1
  98. package/lib/core/viewer/contextmenu/buildNodeContextmenu.js +65 -64
  99. package/lib/createTopo.js +1 -1
  100. package/lib/hooks/useAlarm.js +3 -6
  101. package/lib/hooks/useResourceConfig.js +1 -1
  102. package/lib/hooks/useTopoEdit.js +4 -8
  103. package/lib/models/{iconManage.js → customIcon.js} +1 -1
  104. package/lib/models/topoBizMod.js +22 -52
  105. package/lib/models/{topoCreateMod.js → topoConfig.js} +7 -4
  106. package/lib/models/topoMod.js +32 -69
  107. package/lib/{components → topoCenter/components}/Link/form.js +0 -0
  108. package/lib/{components → topoCenter/components}/Link/hook.js +0 -0
  109. package/lib/{components → topoCenter/components}/Link/index copy.js +1 -1
  110. package/lib/{components → topoCenter/components}/Link/index.js +1 -1
  111. package/lib/{components → topoCenter/components}/Link/index.module.scss +0 -0
  112. package/lib/{components → topoCenter/components}/Link/setting.js +0 -0
  113. package/lib/topoCenter/components/TopoView.js +19 -3
  114. package/lib/topoCenter/components/Topology.js +0 -7
  115. package/lib/{core/editor/components → topoCenter/components/editor}/LinkDynamicStyleSettingDrawer/RuleSetting.js +0 -0
  116. package/lib/{core/editor/components → topoCenter/components/editor}/LinkDynamicStyleSettingDrawer/RuleSetting.module.scss +0 -0
  117. package/lib/{core/editor/components → topoCenter/components/editor}/LinkDynamicStyleSettingDrawer/index.js +0 -0
  118. package/lib/{core/editor/components → topoCenter/components/editor}/LinkDynamicStyleSettingDrawer/rule/Rule.js +0 -0
  119. package/lib/{core/editor/components → topoCenter/components/editor}/LinkDynamicStyleSettingDrawer/rule/Rule.module.scss +0 -0
  120. package/lib/{core/editor/components → topoCenter/components/editor}/LinkDynamicStyleSettingDrawer/rule/RuleCondition.js +0 -0
  121. package/lib/{core/editor/components → topoCenter/components/editor}/LinkDynamicStyleSettingDrawer/rule/RuleCondition.module.scss +0 -0
  122. package/lib/{core/editor/components → topoCenter/components/editor}/LinkDynamicStyleSettingDrawer/rule/RuleCondition.scss +0 -0
  123. package/lib/{core/editor/components → topoCenter/components/editor}/LinkDynamicStyleSettingDrawer/rule/RuleStyle.js +0 -0
  124. package/lib/{core/editor/components → topoCenter/components/editor}/LinkDynamicStyleSettingDrawer/rule/RuleStyle.module.scss +0 -0
  125. package/lib/topoCenter/components/editor/propertyViews/edge/EdgeGroupPropertyView.js +2 -2
  126. package/lib/topoCenter/components/editor/propertyViews/edge/LinkPropertyView/Data/index.js +8 -8
  127. package/lib/topoCenter/components/editor/propertyViews/edge/addLinkDrawer/AddLinkDrawer.js +1 -1
  128. package/lib/topoCenter/components/editor/propertyViews/edge/addLinkDrawer/components/editLinkInfo.js +1 -1
  129. package/lib/topoCenter/components/editor/propertyViews/edge/link/{LindInfoPreview.js → LinkInfoPreview.js} +4 -4
  130. package/lib/topoCenter/components/editor/propertyViews/edge/link/{LindInfoPreview.module.scss → LinkInfoPreview.module.scss} +0 -0
  131. package/lib/{hooks → topoCenter/hooks/viewer}/useRelateTopo.js +2 -2
  132. package/lib/{models → topoCenter/store}/linkDynamicStyle.js +3 -3
  133. package/lib/{models → topoCenter/store}/linkDynamicStyleConfig.js +2 -1
  134. package/lib/{models → topoCenter/store}/linkManager.js +0 -0
  135. package/package.json +2 -2
  136. package/es/core/editor/LinkDynamicStyleConfig.js +0 -16
  137. package/es/core/store/getStoreModels.js +0 -40
  138. package/lib/core/editor/LinkDynamicStyleConfig.js +0 -21
  139. package/lib/core/store/getStoreModels.js +0 -67
@@ -38,7 +38,6 @@ function _default(topoApp) {
38
38
  topoLoadError: false,
39
39
  id: undefined,
40
40
  topoId: "",
41
- topoName: "",
42
41
  type: undefined,
43
42
  data: null,
44
43
  // 后端返回的分组、连线、节点数据
@@ -46,22 +45,6 @@ function _default(topoApp) {
46
45
  // ht 拓扑数据,用于首次load
47
46
  currentTopo: undefined,
48
47
  topoPermission: undefined,
49
- currentNode: {
50
- id: "",
51
- name: "无数据"
52
- },
53
- topoAlarmIsOpen: false,
54
- // 拓扑通道是否打开
55
- alarmPanelIsOpen: false,
56
- // 告警弹窗是否打开
57
- alarmData: null,
58
- // 概览抽屉中告警列表相关数据 TODO 抽取
59
- currentCiInfo: null,
60
- // 概览抽屉当前CI元数据 TODO 抽取
61
- addLinkIsOpen: false,
62
- // 添加链路抽屉显示
63
- ciConnectable: [],
64
- // 可创建联系ci列表
65
48
  resAndMetrics: {
66
49
  res: [],
67
50
  metrics: [],
@@ -206,10 +189,19 @@ function _default(topoApp) {
206
189
  }, _callee2);
207
190
  }))();
208
191
  },
192
+
193
+ /**
194
+ * 设置拓扑类型
195
+ * @param {*} type
196
+ */
197
+ setTopoType: function setTopoType(type) {
198
+ this.update({
199
+ type: type
200
+ });
201
+ },
209
202
  clearData: function clearData() {
210
203
  this.update({
211
204
  topoId: "",
212
- topoName: "",
213
205
  topoData: null,
214
206
  graphLoaded: false,
215
207
  data: null,
@@ -438,7 +430,7 @@ function _default(topoApp) {
438
430
  _rlog["default"].debug("topoMod.initTopoData 查询数据完成", topoId, linkTo, result);
439
431
 
440
432
  _context6.next = 40;
441
- return Promise.all([topoApp.ciTyeCache.getCiTypeMap((0, _topoData.getCiTypes)(result)), dispatch.iconManage.loadCustomIcons()]);
433
+ return Promise.all([topoApp.ciTyeCache.getCiTypeMap((0, _topoData.getCiTypes)(result)), dispatch.customIcon.loadCustomIcons()]);
442
434
 
443
435
  case 40:
444
436
  _yield$Promise$all = _context6.sent;
@@ -463,6 +455,7 @@ function _default(topoApp) {
463
455
 
464
456
  _this5.update({
465
457
  type: (_result$config = result.config) === null || _result$config === void 0 ? void 0 : _result$config.showType,
458
+ currentTopo: topoData.config,
466
459
  data: result,
467
460
  topoData: topoData,
468
461
  resAndMetrics: resAndMetrics,
@@ -602,97 +595,67 @@ function _default(topoApp) {
602
595
  }, _callee10);
603
596
  }))();
604
597
  },
605
- getCiInfo: function getCiInfo(conditions, state) {
598
+ getTopoPermission: function getTopoPermission(playload, rootState) {
606
599
  var _this8 = this;
607
600
 
608
601
  return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee11() {
609
- var result;
602
+ var id, update, topoPermission, getTopoPermission;
610
603
  return _regenerator["default"].wrap(function _callee11$(_context11) {
611
604
  while (1) {
612
605
  switch (_context11.prev = _context11.next) {
613
- case 0:
614
- _context11.next = 2;
615
- return (0, _model.getCiMeta)(conditions);
616
-
617
- case 2:
618
- result = _context11.sent;
619
-
620
- // rlog.debug("getCiInfo", result);
621
- _this8.update({
622
- // alarmList: result.datas,
623
- currentCiInfo: result // drawerAlarmPageInfo,
624
-
625
- });
626
-
627
- case 4:
628
- case "end":
629
- return _context11.stop();
630
- }
631
- }
632
- }, _callee11);
633
- }))();
634
- },
635
- getTopoPermission: function getTopoPermission(playload, rootState) {
636
- var _this9 = this;
637
-
638
- return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee12() {
639
- var id, update, topoPermission, getTopoPermission;
640
- return _regenerator["default"].wrap(function _callee12$(_context12) {
641
- while (1) {
642
- switch (_context12.prev = _context12.next) {
643
606
  case 0:
644
607
  id = playload.id, update = playload.update;
645
- _context12.prev = 1;
608
+ _context11.prev = 1;
646
609
  getTopoPermission = topoApp.options.getTopoPermission || _topo["default"].auth.getTopoPermission;
647
- _context12.next = 5;
610
+ _context11.next = 5;
648
611
  return getTopoPermission(id);
649
612
 
650
613
  case 5:
651
- topoPermission = _context12.sent;
652
- _context12.next = 11;
614
+ topoPermission = _context11.sent;
615
+ _context11.next = 11;
653
616
  break;
654
617
 
655
618
  case 8:
656
- _context12.prev = 8;
657
- _context12.t0 = _context12["catch"](1);
619
+ _context11.prev = 8;
620
+ _context11.t0 = _context11["catch"](1);
658
621
 
659
- _rlog["default"].error("\u67E5\u8BE2\u62D3\u6251" + id + "\u7684\u6743\u9650\u5931\u8D25", _context12.t0); // 尚未区分拓扑图不存在还是接口请求报错
622
+ _rlog["default"].error("\u67E5\u8BE2\u62D3\u6251" + id + "\u7684\u6743\u9650\u5931\u8D25", _context11.t0); // 尚未区分拓扑图不存在还是接口请求报错
660
623
 
661
624
 
662
625
  case 11:
663
- _context12.next = 13;
626
+ _context11.next = 13;
664
627
  return dispatch.functionAuth.checkAuth('createTopo');
665
628
 
666
629
  case 13:
667
- if (!_context12.sent) {
668
- _context12.next = 17;
630
+ if (!_context11.sent) {
631
+ _context11.next = 17;
669
632
  break;
670
633
  }
671
634
 
672
- _context12.t1 = 'delete';
673
- _context12.next = 18;
635
+ _context11.t1 = 'delete';
636
+ _context11.next = 18;
674
637
  break;
675
638
 
676
639
  case 17:
677
- _context12.t1 = 'read';
640
+ _context11.t1 = 'read';
678
641
 
679
642
  case 18:
680
- topoPermission = _context12.t1;
643
+ topoPermission = _context11.t1;
681
644
 
682
645
  if (update !== false) {
683
- _this9.update({
646
+ _this8.update({
684
647
  topoPermission: topoPermission
685
648
  });
686
649
  }
687
650
 
688
- return _context12.abrupt("return", topoPermission);
651
+ return _context11.abrupt("return", topoPermission);
689
652
 
690
653
  case 21:
691
654
  case "end":
692
- return _context12.stop();
655
+ return _context11.stop();
693
656
  }
694
657
  }
695
- }, _callee12, null, [[1, 8]]);
658
+ }, _callee11, null, [[1, 8]]);
696
659
  }))();
697
660
  }
698
661
  };
@@ -38,7 +38,7 @@ var LinkDrawer = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
38
38
  topo = props.topo;
39
39
  var store = topo.store;
40
40
 
41
- var _store$useModel = store.useModel('topoCreateMod'),
41
+ var _store$useModel = store.useModel('topoConfig'),
42
42
  editState = _store$useModel[0],
43
43
  editDispatchers = _store$useModel[1];
44
44
 
@@ -38,7 +38,7 @@ var LinkDrawer = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
38
38
  topo = props.topo;
39
39
  var store = topo.store;
40
40
 
41
- var _store$useModel = store.useModel('topoCreateMod'),
41
+ var _store$useModel = store.useModel('topoConfig'),
42
42
  editState = _store$useModel[0],
43
43
  editDispatchers = _store$useModel[1];
44
44
 
@@ -27,6 +27,10 @@ var _indexModule = _interopRequireDefault(require("../../components/index.module
27
27
 
28
28
  var _AlarmListPanel = _interopRequireDefault(require("../../core/components/AlarmListPanel"));
29
29
 
30
+ var _useLinkDynamicStyle = _interopRequireDefault(require("../hooks/useLinkDynamicStyle"));
31
+
32
+ var _useRelateTopo = _interopRequireDefault(require("../hooks/viewer/useRelateTopo"));
33
+
30
34
  var _excluded = ["topo", "titleBar", "onEnterEdit"];
31
35
 
32
36
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
@@ -36,7 +40,7 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
36
40
  /**
37
41
  * 拓扑组件。变化无权限、无数据显示
38
42
  */
39
- function NetworkTopology(props) {
43
+ function NetworkTopologyCore(props) {
40
44
  var topo = props.topo,
41
45
  titleBar = props.titleBar,
42
46
  onEnterEdit = props.onEnterEdit,
@@ -46,6 +50,12 @@ function NetworkTopology(props) {
46
50
  topoId = topoState.topoId,
47
51
  topoData = topoState.topoData,
48
52
  topoPermission = topoState.topoPermission;
53
+ (0, _useLinkDynamicStyle["default"])({
54
+ topo: topo
55
+ });
56
+ var relateTopo = (0, _useRelateTopo["default"])({
57
+ topo: topo
58
+ });
49
59
 
50
60
  var renderTopoView = function renderTopoView() {
51
61
  var viewerProps = (0, _extends2["default"])({}, props.viewerProps, {
@@ -54,11 +64,17 @@ function NetworkTopology(props) {
54
64
  AlarmListPanel: _AlarmListPanel["default"],
55
65
  plugins: []
56
66
  });
67
+
68
+ var handleEvent = function handleEvent(event) {
69
+ relateTopo.onEvent(event);
70
+ };
71
+
57
72
  return /*#__PURE__*/_react["default"].createElement(_TopoView["default"], (0, _extends2["default"])({}, otherProps, {
58
73
  topo: topo,
59
74
  viewerProps: viewerProps,
60
75
  titleBar: titleBar,
61
- onEnterEdit: onEnterEdit
76
+ onEnterEdit: onEnterEdit,
77
+ onEvent: handleEvent
62
78
  }));
63
79
  };
64
80
 
@@ -97,5 +113,5 @@ function NetworkTopology(props) {
97
113
  }, renderContent()));
98
114
  }
99
115
 
100
- var _default = NetworkTopology;
116
+ var _default = NetworkTopologyCore;
101
117
  exports["default"] = _default;
@@ -9,8 +9,6 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
9
9
 
10
10
  var _react = _interopRequireWildcard(require("react"));
11
11
 
12
- var _componentTopologyGraph = require("@riil-frontend/component-topology-graph");
13
-
14
12
  var _TopoView = _interopRequireDefault(require("./TopoView"));
15
13
 
16
14
  var _LayerRelatedResourceList = _interopRequireDefault(require("./editor/propertyViews/LayerRelatedResourceList"));
@@ -21,8 +19,6 @@ var _EdgeGroupPropertyView = _interopRequireDefault(require("./editor/propertyVi
21
19
 
22
20
  var _LinkPropertyView = _interopRequireDefault(require("./editor/propertyViews/edge/LinkPropertyView"));
23
21
 
24
- var _useLinkDynamicStyle = _interopRequireDefault(require("../hooks/useLinkDynamicStyle"));
25
-
26
22
  var _AddLinkDrawer = _interopRequireDefault(require("./editor/propertyViews/edge/addLinkDrawer/AddLinkDrawer"));
27
23
 
28
24
  var _useTopoEdit = _interopRequireDefault(require("../hooks/useTopoEdit"));
@@ -34,9 +30,6 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
34
30
  function NetworkTopologyFull(props) {
35
31
  var topo = props.topo,
36
32
  customEditorProps = props.editorProps;
37
- (0, _useLinkDynamicStyle["default"])({
38
- topo: topo
39
- });
40
33
  var topoEdit = (0, _useTopoEdit["default"])({
41
34
  topo: topo
42
35
  });
@@ -13,7 +13,7 @@ var _TabView = _interopRequireDefault(require("../../../../../core/editor/compon
13
13
 
14
14
  var _EdgeGroupSetting = _interopRequireDefault(require("../../../../../core/editor/components/settings/propertyViews/edge/edgeGroup/EdgeGroupSetting"));
15
15
 
16
- var _LindInfoPreview = _interopRequireDefault(require("./link/LindInfoPreview"));
16
+ var _LinkInfoPreview = _interopRequireDefault(require("./link/LinkInfoPreview"));
17
17
 
18
18
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
19
19
 
@@ -37,7 +37,7 @@ function EdgeGroupPropertyView(props) {
37
37
  return /*#__PURE__*/_react["default"].createElement(_TabView["default"], null, /*#__PURE__*/_react["default"].createElement(_tab["default"].Item, {
38
38
  title: "\u6570\u636E",
39
39
  key: "1"
40
- }, /*#__PURE__*/_react["default"].createElement(_LindInfoPreview["default"], {
40
+ }, /*#__PURE__*/_react["default"].createElement(_LinkInfoPreview["default"], {
41
41
  data: aggLink,
42
42
  topo: topo
43
43
  })), /*#__PURE__*/_react["default"].createElement(_tab["default"].Item, {
@@ -9,9 +9,9 @@ var _button = _interopRequireDefault(require("@alifd/next/lib/button"));
9
9
 
10
10
  var _react = _interopRequireDefault(require("react"));
11
11
 
12
- var _LindInfoPreview = _interopRequireDefault(require("../../link/LindInfoPreview"));
12
+ var _LinkInfoPreview = _interopRequireDefault(require("../../link/LinkInfoPreview"));
13
13
 
14
- var _LindInfoPreviewModule = _interopRequireDefault(require("../../link/LindInfoPreview.module.scss"));
14
+ var _LinkInfoPreviewModule = _interopRequireDefault(require("../../link/LinkInfoPreview.module.scss"));
15
15
 
16
16
  var _rlog = _interopRequireDefault(require("@riil-frontend/component-topology-utils/es/rlog"));
17
17
 
@@ -35,7 +35,7 @@ function LinkDataTab(props) {
35
35
  return item.id === edge.getTag();
36
36
  });
37
37
 
38
- var _topo$store$useModel = topo.store.useModel("topoCreateMod"),
38
+ var _topo$store$useModel = topo.store.useModel("topoConfig"),
39
39
  editState = _topo$store$useModel[0],
40
40
  editDispatchers = _topo$store$useModel[1];
41
41
 
@@ -47,15 +47,15 @@ function LinkDataTab(props) {
47
47
  };
48
48
 
49
49
  return /*#__PURE__*/_react["default"].createElement("div", {
50
- className: _LindInfoPreviewModule["default"].panelFullHeight
51
- }, /*#__PURE__*/_react["default"].createElement(_LindInfoPreview["default"], {
52
- className: _LindInfoPreviewModule["default"].lindInfoPreview,
50
+ className: _LinkInfoPreviewModule["default"].panelFullHeight
51
+ }, /*#__PURE__*/_react["default"].createElement(_LinkInfoPreview["default"], {
52
+ className: _LinkInfoPreviewModule["default"].lindInfoPreview,
53
53
  data: link,
54
54
  topo: topo
55
55
  }), /*#__PURE__*/_react["default"].createElement("div", {
56
- className: _LindInfoPreviewModule["default"].footer
56
+ className: _LinkInfoPreviewModule["default"].footer
57
57
  }, /*#__PURE__*/_react["default"].createElement(_button["default"], {
58
- className: _LindInfoPreviewModule["default"].button,
58
+ className: _LinkInfoPreviewModule["default"].button,
59
59
  type: "primary",
60
60
  disabled: !permission.writeable,
61
61
  onClick: openEditLinkDrawer
@@ -49,7 +49,7 @@ function AddLinkDrawer(props) {
49
49
  lineData = props.lineData;
50
50
  var store = topo.store;
51
51
 
52
- var _store$useModel = store.useModel("topoCreateMod"),
52
+ var _store$useModel = store.useModel("topoConfig"),
53
53
  editState = _store$useModel[0],
54
54
  editDispatchers = _store$useModel[1];
55
55
 
@@ -102,7 +102,7 @@ function EditLinkInfo(props) {
102
102
  setSource(source);
103
103
  setTarget(target);
104
104
  field.setValues(attributes);
105
- }, [source, target, field, attributes]); // const [editState, editDispatchers] = store.useModel("topoCreateMod");
105
+ }, [source, target, field, attributes]); // const [editState, editDispatchers] = store.useModel("topoConfig");
106
106
 
107
107
  var labelAlign = "top";
108
108
  var formItemLayout = {
@@ -11,7 +11,7 @@ var _collapse = _interopRequireDefault(require("@alifd/next/lib/collapse"));
11
11
 
12
12
  var _react = _interopRequireWildcard(require("react"));
13
13
 
14
- var _LindInfoPreviewModule = _interopRequireDefault(require("./LindInfoPreview.module.scss"));
14
+ var _LinkInfoPreviewModule = _interopRequireDefault(require("./LinkInfoPreview.module.scss"));
15
15
 
16
16
  var _attributeFormatter = require("../../../../../../core/models/attributeFormatter");
17
17
 
@@ -73,11 +73,11 @@ function LindInfoPreview(props) {
73
73
  key: field.name,
74
74
  direction: "row",
75
75
  spacing: 8,
76
- className: _LindInfoPreviewModule["default"].row
76
+ className: _LinkInfoPreviewModule["default"].row
77
77
  }, /*#__PURE__*/_react["default"].createElement(_box["default"], {
78
- className: _LindInfoPreviewModule["default"].label
78
+ className: _LinkInfoPreviewModule["default"].label
79
79
  }, field.label), /*#__PURE__*/_react["default"].createElement(_box["default"], {
80
- className: field.name === "use" ? _LindInfoPreviewModule["default"].uselabelValue : _LindInfoPreviewModule["default"].labelValue,
80
+ className: field.name === "use" ? _LinkInfoPreviewModule["default"].uselabelValue : _LinkInfoPreviewModule["default"].labelValue,
81
81
  flex: 1
82
82
  }, getValue(field.name)));
83
83
  }); // <Collapse
@@ -13,10 +13,10 @@ var _componentTopologyGraph = require("@riil-frontend/component-topology-graph")
13
13
 
14
14
  var _rlog = _interopRequireDefault(require("@riil-frontend/component-topology-utils/es/rlog"));
15
15
 
16
- var _tree = require("../utils/tree");
16
+ var _tree = require("../../../utils/tree");
17
17
 
18
18
  /**
19
- * 关联拓扑
19
+ * 关联拓扑:FIXME 移到拓扑中心
20
20
  *
21
21
  * 双击容器打开关联拓扑图
22
22
  * 双击缩略图返回原拓扑图
@@ -16,7 +16,7 @@ var _lodash = _interopRequireDefault(require("lodash"));
16
16
  var _rlog = _interopRequireDefault(require("@riil-frontend/component-topology-utils/es/rlog"));
17
17
 
18
18
  /**
19
- * 动态设置链路样式 Model
19
+ * 动态设置链路样式 Model。-- 功能已废弃
20
20
  */
21
21
  var defaultConfig = {
22
22
  networkLink: {
@@ -220,12 +220,12 @@ function _default(engine) {
220
220
 
221
221
  links = [];
222
222
 
223
- if (!(isEdit && rootState.topoCreateMod.topoData.links.length)) {
223
+ if (!(isEdit && rootState.topoConfig.topoData.links.length)) {
224
224
  _context3.next = 10;
225
225
  break;
226
226
  }
227
227
 
228
- links = rootState.topoCreateMod.topoData.links;
228
+ links = rootState.topoConfig.topoData.links;
229
229
  _context3.next = 13;
230
230
  break;
231
231
 
@@ -15,7 +15,8 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
15
15
 
16
16
  var _cloneDeep = _interopRequireDefault(require("lodash/cloneDeep"));
17
17
 
18
- var ruleKey = 0;
18
+ var ruleKey = 0; // -- 功能已废弃
19
+
19
20
  var _default = {
20
21
  // 定义 model 的初始 state
21
22
  state: {
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riil-frontend/component-topology",
3
- "version": "2.15.43",
3
+ "version": "2.15.46",
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.43/build/index.html",
113
+ "homepage": "https://unpkg.com/@riil-frontend/component-topology@2.15.46/build/index.html",
114
114
  "gitHead": "2da19ffccbb7ca60a8acf396e39f542c68bb33f5"
115
115
  }
@@ -1,16 +0,0 @@
1
- var LinkDynamicStyleConfig = /*#__PURE__*/function () {
2
- function LinkDynamicStyleConfig(topo) {
3
- this.topo = void 0;
4
- this.topo = topo;
5
- }
6
-
7
- var _proto = LinkDynamicStyleConfig.prototype;
8
-
9
- _proto.getDispatchers = function getDispatchers() {
10
- this.topo.store.getModelDispatchers('linkDynamicStyle');
11
- };
12
-
13
- return LinkDynamicStyleConfig;
14
- }();
15
-
16
- export { LinkDynamicStyleConfig as default };
@@ -1,40 +0,0 @@
1
- import topoMod from "../../models/topoMod";
2
- import iconManage from "../../models/iconManage";
3
- import ciModel from "../../models/ciModel";
4
- import functionAuth from "../../topoCenter/store/functionAuth";
5
- import selection from "../../models/selection";
6
- import topoBizMod from "../../models/topoBizMod";
7
- import topoCreateMod from "../../models/topoCreateMod";
8
- import topoEdit from "../../models/topoEdit";
9
- import topoView from "../../models/topoView";
10
- import topoAlarm from "../../models/topoAlarm";
11
- import topoGraphView from "../../models/topoGraphView";
12
- import background from "../../models/background";
13
- import displayConfig from "../../models/displayConfig";
14
- import resourceWebControllUrlSetting from "../../models/resourceWebControllUrlSetting";
15
- import topoBaseInfoOverview from "../../models/topoBaseInfoOverview";
16
- import linkManager from "../../models/linkManager";
17
- import topoLinkMod from "../../topoCenter/store/topoLinkMod";
18
- import topoCenter from "../../topoCenter/store/topoCenter";
19
- import topoTreeMod from "../../topoCenter/store/topoTreeMod";
20
- export default {
21
- topoMod: topoMod,
22
- iconManage: iconManage,
23
- ciModel: ciModel,
24
- functionAuth: functionAuth,
25
- selection: selection,
26
- resourceWebControllUrlSetting: resourceWebControllUrlSetting,
27
- topoBizMod: topoBizMod,
28
- topoCreateMod: topoCreateMod,
29
- topoLinkMod: topoLinkMod,
30
- topoView: topoView,
31
- background: background,
32
- topoGraphView: topoGraphView,
33
- topoAlarm: topoAlarm,
34
- displayConfig: displayConfig,
35
- topoBaseInfoOverview: topoBaseInfoOverview,
36
- topoEdit: topoEdit,
37
- topoCenter: topoCenter,
38
- topoTreeMod: topoTreeMod,
39
- linkManager: linkManager
40
- };
@@ -1,21 +0,0 @@
1
- "use strict";
2
-
3
- exports.__esModule = true;
4
- exports["default"] = void 0;
5
-
6
- var LinkDynamicStyleConfig = /*#__PURE__*/function () {
7
- function LinkDynamicStyleConfig(topo) {
8
- this.topo = void 0;
9
- this.topo = topo;
10
- }
11
-
12
- var _proto = LinkDynamicStyleConfig.prototype;
13
-
14
- _proto.getDispatchers = function getDispatchers() {
15
- this.topo.store.getModelDispatchers('linkDynamicStyle');
16
- };
17
-
18
- return LinkDynamicStyleConfig;
19
- }();
20
-
21
- exports["default"] = LinkDynamicStyleConfig;