@riil-frontend/component-topology 2.12.2 → 2.12.5-alpha.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/1.js +2 -2
- package/build/2.js +1 -1
- package/build/index.css +1 -1
- package/build/index.js +21 -21
- package/es/components/Link/index.js +1 -1
- package/es/components/Link/index.module.scss +2 -2
- package/es/components/MultiResourceDrawer/index.js +3 -2
- package/es/components/ResourceSelectDrawer/ResourceSelectDrawer.js +1 -0
- package/es/components/ResourceSelectDrawer/ResourceSelectList.js +6 -1
- package/es/components/SingleResourceDrawer/SelectDrawer.js +54 -0
- package/es/components/SingleResourceDrawer/index.js +3 -3
- package/es/core/common/icons/defaultIcons.js +9 -2
- package/es/core/components/TopoView/topoView.js +3 -2
- package/es/core/editor/components/LinkDynamicStyleSettingDrawer/rule/ColorPicker.module.scss +1 -1
- package/es/core/editor/components/ResourceViewAttributeSetting/ResourceViewAttributeSettingPlugin.js +1 -1
- package/es/core/editor/components/ResourceViewAttributeSetting/Setting.js +1 -1
- package/es/core/editor/components/settings/Settings.js +5 -29
- package/es/core/editor/components/settings/{group → common}/GroupNodeList/ResourceList.js +0 -0
- package/es/core/editor/components/settings/{group → common}/GroupNodeList/ResourceList.module.scss +0 -0
- package/es/core/editor/components/settings/{group → common}/GroupNodeList/ResourceSelectButton.js +12 -14
- package/es/core/editor/components/settings/{group → common}/GroupNodeList/icon.js +0 -0
- package/es/core/editor/components/settings/common/text/FontStyleCheckbox.module.scss +1 -1
- package/es/core/editor/components/settings/group/DataTab/GroupNodeList.js +19 -0
- package/es/core/editor/components/settings/group/DataTab/RelateData.js +45 -0
- package/es/core/editor/components/settings/group/GroupPropertyView.js +44 -0
- package/es/core/editor/components/settings/group/GroupPropertyView.module.scss +3 -0
- package/es/core/editor/components/settings/group/SettingTab/GroupExpandSetting.js +27 -0
- package/es/core/editor/components/settings/group/SettingTab/NodeIconSelect.js +32 -0
- package/es/core/editor/components/settings/group/SettingTab/Setting.js +86 -0
- package/es/core/editor/components/settings/group/hooks/useGroup.js +9 -0
- package/es/core/editor/components/settings/group/hooks/useGroupExpand.js +20 -0
- package/es/core/editor/components/settings/layer/LayerSettingsForm.js +2 -2
- package/es/core/editor/components/settings/{group/GroupNodeList/GroupNodeList.js → layer/NodeList.js} +3 -3
- package/es/core/editor/components/settings/link/LinkPropertyView.js +3 -3
- package/es/core/editor/components/settings/node/NodeIconSelect.js +1 -1
- package/es/core/editor/components/settings/propertyViews.js +23 -0
- package/es/core/models/TopoApp.js +28 -16
- package/es/hooks/useContainerLinkTopo.js +1 -1
- package/es/hooks/usePolling.js +1 -1
- package/es/hooks/useTopoEdit.js +139 -103
- package/es/style.js +3 -4
- package/es/topoCenter/models/TopoCenter.js +40 -12
- package/es/utils/htElementUtils.js +36 -7
- package/lib/components/Link/index.js +6 -6
- package/lib/components/Link/index.module.scss +2 -2
- package/lib/components/MultiResourceDrawer/index.js +3 -2
- package/lib/components/ResourceSelectDrawer/ResourceSelectDrawer.js +1 -0
- package/lib/components/ResourceSelectDrawer/ResourceSelectList.js +6 -1
- package/lib/components/SingleResourceDrawer/SelectDrawer.js +68 -0
- package/lib/components/SingleResourceDrawer/index.js +3 -3
- package/lib/core/common/icons/defaultIcons.js +11 -2
- package/lib/core/components/TopoView/topoView.js +15 -13
- package/lib/core/editor/components/LinkDynamicStyleSettingDrawer/rule/ColorPicker.module.scss +1 -1
- package/lib/core/editor/components/ResourceViewAttributeSetting/ResourceViewAttributeSettingPlugin.js +3 -3
- package/lib/core/editor/components/ResourceViewAttributeSetting/Setting.js +2 -2
- package/lib/core/editor/components/settings/Settings.js +5 -34
- package/lib/core/editor/components/settings/{group → common}/GroupNodeList/ResourceList.js +0 -0
- package/lib/core/editor/components/settings/{group → common}/GroupNodeList/ResourceList.module.scss +0 -0
- package/lib/core/editor/components/settings/{group → common}/GroupNodeList/ResourceSelectButton.js +13 -14
- package/lib/core/editor/components/settings/{group → common}/GroupNodeList/icon.js +0 -0
- package/lib/core/editor/components/settings/common/text/FontStyleCheckbox.module.scss +1 -1
- package/lib/core/editor/components/settings/group/DataTab/GroupNodeList.js +33 -0
- package/lib/core/editor/components/settings/group/DataTab/RelateData.js +57 -0
- package/lib/core/editor/components/settings/group/GroupPropertyView.js +58 -0
- package/lib/core/editor/components/settings/group/GroupPropertyView.module.scss +3 -0
- package/lib/core/editor/components/settings/group/SettingTab/GroupExpandSetting.js +37 -0
- package/lib/core/editor/components/settings/group/SettingTab/NodeIconSelect.js +45 -0
- package/lib/core/editor/components/settings/group/SettingTab/Setting.js +106 -0
- package/lib/core/editor/components/settings/group/hooks/useGroup.js +15 -0
- package/lib/core/editor/components/settings/group/hooks/useGroupExpand.js +26 -0
- package/lib/core/editor/components/settings/layer/LayerSettingsForm.js +3 -3
- package/lib/core/editor/components/settings/{group/GroupNodeList/GroupNodeList.js → layer/NodeList.js} +3 -3
- package/lib/core/editor/components/settings/link/LinkPropertyView.js +3 -3
- package/lib/core/editor/components/settings/node/NodeIconSelect.js +1 -1
- package/lib/core/editor/components/settings/propertyViews.js +38 -0
- package/lib/core/models/TopoApp.js +29 -17
- package/lib/hooks/useContainerLinkTopo.js +2 -2
- package/lib/hooks/usePolling.js +3 -3
- package/lib/hooks/useTopoEdit.js +149 -112
- package/lib/style.js +3 -4
- package/lib/topoCenter/models/TopoCenter.js +40 -12
- package/lib/utils/htElementUtils.js +44 -7
- package/package.json +10 -10
|
@@ -9,9 +9,9 @@ import _Grid from "@alifd/next/lib/grid";
|
|
|
9
9
|
import _Form from "@alifd/next/lib/form";
|
|
10
10
|
import React, { useState, useEffect } from 'react';
|
|
11
11
|
import ColorPicker from "../../LinkDynamicStyleSettingDrawer/rule/ColorPicker";
|
|
12
|
-
import GroupNodeList from "../group/
|
|
13
|
-
import ResourceSelectButton from "../
|
|
14
|
-
import { getIconMap } from "../
|
|
12
|
+
import GroupNodeList from "../group/DataTab/GroupNodeList";
|
|
13
|
+
import ResourceSelectButton from "../common/GroupNodeList/ResourceSelectButton";
|
|
14
|
+
import { getIconMap } from "../common/GroupNodeList/icon";
|
|
15
15
|
import LineType from "../common/LineType";
|
|
16
16
|
var FormItem = _Form.Item;
|
|
17
17
|
var Row = _Grid.Row,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { getIconGroups } from "../
|
|
2
|
+
import { getIconGroups } from "../common/GroupNodeList/icon";
|
|
3
3
|
import IconSelect from '@riil-frontend/component-topo-icon-select';
|
|
4
4
|
export default function NodeIconSelect(props) {
|
|
5
5
|
var value = props.value,
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import SettingsForm from "./SettingsForm";
|
|
2
|
+
import NodePropertyView from "./node/NodePropertyView";
|
|
3
|
+
import LayerSettingsForm from "./layer/LayerSettingsForm";
|
|
4
|
+
import TextPropertyView from "./text/TextPropertyView";
|
|
5
|
+
import LinkPropertyView from "./link/LinkPropertyView";
|
|
6
|
+
import ViewPropertyView from "./view/ViewPropertyView";
|
|
7
|
+
import GroupPropertyView from "./group/GroupPropertyView";
|
|
8
|
+
var propertyPanelMap = {
|
|
9
|
+
// view: SettingsForm,
|
|
10
|
+
node: NodePropertyView,
|
|
11
|
+
layer: LayerSettingsForm,
|
|
12
|
+
text: TextPropertyView,
|
|
13
|
+
group: GroupPropertyView
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
if (localStorage.getItem('topo.debug') === 'true') {
|
|
17
|
+
Object.assign(propertyPanelMap, {
|
|
18
|
+
line: LinkPropertyView,
|
|
19
|
+
view: ViewPropertyView
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export default propertyPanelMap;
|
|
@@ -2,7 +2,7 @@ import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
|
2
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
3
3
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
4
4
|
import topoService from '@riil-frontend/component-topology-common/es/services/topo';
|
|
5
|
-
import { setRequest } from '@riil-frontend/component-topology-common';
|
|
5
|
+
import { setRequest } from '@riil-frontend/component-topology-common/es/index';
|
|
6
6
|
import rlog from '@riil-frontend/component-topology-utils/es/rlog';
|
|
7
7
|
import CiTyeCache from "./cache/CiTyeCache";
|
|
8
8
|
import Alarm from "./common/Alarm";
|
|
@@ -478,42 +478,54 @@ var TopoApp = /*#__PURE__*/function () {
|
|
|
478
478
|
/*#__PURE__*/
|
|
479
479
|
function () {
|
|
480
480
|
var _enterEditMode = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee11() {
|
|
481
|
-
var topoDispatchers, editDispatchers, ciSetDoc, linkDynamicStyleDispatcher
|
|
481
|
+
var topoDispatchers, editDispatchers, iconManageDispatchers, ciSetDoc, linkDynamicStyleDispatcher;
|
|
482
482
|
return _regeneratorRuntime.wrap(function _callee11$(_context11) {
|
|
483
483
|
while (1) {
|
|
484
484
|
switch (_context11.prev = _context11.next) {
|
|
485
485
|
case 0:
|
|
486
|
-
_context11.next = 2;
|
|
487
|
-
return this.view.switchToEditMode();
|
|
488
|
-
|
|
489
|
-
case 2:
|
|
490
486
|
topoDispatchers = this.store.getModelDispatchers('topoMod');
|
|
491
487
|
topoDispatchers.update({
|
|
492
488
|
viewState: 'edit'
|
|
493
489
|
});
|
|
490
|
+
|
|
491
|
+
if (!this.options.beforeSwitchToEditMode) {
|
|
492
|
+
_context11.next = 5;
|
|
493
|
+
break;
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
_context11.next = 5;
|
|
497
|
+
return this.options.beforeSwitchToEditMode();
|
|
498
|
+
|
|
499
|
+
case 5:
|
|
500
|
+
_context11.next = 7;
|
|
501
|
+
return this.view.switchToEditMode();
|
|
502
|
+
|
|
503
|
+
case 7:
|
|
494
504
|
editDispatchers = this.store.getModelDispatchers('topoCreateMod');
|
|
495
505
|
editDispatchers.switchToEditMode();
|
|
496
506
|
|
|
497
507
|
if (this.options.onSwitchToEditMode) {
|
|
498
508
|
this.options.onSwitchToEditMode();
|
|
499
|
-
} //
|
|
509
|
+
} // 加载自定义图标
|
|
500
510
|
|
|
501
511
|
|
|
512
|
+
iconManageDispatchers = this.store.getModelDispatchers('iconManage');
|
|
513
|
+
iconManageDispatchers.loadIcons(); // 每个节点的属性指标显示配置 TODO 每个节点都传了属性指标列表,待优化
|
|
514
|
+
|
|
502
515
|
ciSetDoc = this.store.getModelState('topoBizMod').ciSetDoc;
|
|
503
516
|
this.view.topoClient.saveMarkSetting({
|
|
504
517
|
tagAndTipSet: ciSetDoc
|
|
505
518
|
}); // 刷新链路动态样式
|
|
506
519
|
|
|
507
520
|
linkDynamicStyleDispatcher = this.store.getModelDispatchers('linkDynamicStyle');
|
|
508
|
-
linkDynamicStyleDispatcher.execute(); //
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
case 15:
|
|
521
|
+
linkDynamicStyleDispatcher.execute(); // 加载关联拓扑图数据 FIXME 关联拓扑图时动态获取
|
|
522
|
+
// const topoTreeData = formatTreeDataSelect(
|
|
523
|
+
// this.store.getModelState('topoTreeMod').treeData,
|
|
524
|
+
// this.id
|
|
525
|
+
// );
|
|
526
|
+
// this.view.topoClient.setTopoTreeData(topoTreeData);
|
|
527
|
+
|
|
528
|
+
case 16:
|
|
517
529
|
case "end":
|
|
518
530
|
return _context11.stop();
|
|
519
531
|
}
|
package/es/hooks/usePolling.js
CHANGED
|
@@ -4,7 +4,7 @@ import { useState, useEffect, useMemo } from 'react';
|
|
|
4
4
|
import { useRequest } from 'ahooks';
|
|
5
5
|
import _ from 'lodash';
|
|
6
6
|
import rlog from '@riil-frontend/component-topology-utils/es/rlog';
|
|
7
|
-
import
|
|
7
|
+
import TopoEvent from '@riil-frontend/component-topology-graph/es/event';
|
|
8
8
|
import { metricValueFormat } from '@riil-frontend/utils';
|
|
9
9
|
import { findItem } from "../utils/topoData";
|
|
10
10
|
import DictCache from "../core/models/cache/DictCache";
|