@riil-frontend/component-topology 2.3.20-dev.1 → 2.4.1
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 +2 -2
- package/build/index.js +28 -28
- package/demo/5/345/205/266/344/273/226/347/273/204/344/273/266//345/233/276/346/240/207/351/200/211/346/213/251.md +5 -5
- package/es/components/BatchAttrMetric/index.js +1 -1
- package/es/components/BatchAttrMetric/setting.js +4 -4
- package/es/components/BatchAttrMetric/utils.js +2 -2
- package/es/components/Drawer/index.js +4 -3
- package/es/components/Drawer/index.module.scss +13 -0
- package/es/components/FormTable/index.js +3 -3
- package/es/components/IndexSettingDrawer/CiList.js +1 -1
- package/es/components/IndexSettingDrawer/CiListItem.js +1 -1
- package/es/components/IndexSettingDrawer/IndexList.js +1 -1
- package/es/components/IndexSettingDrawer/index.js +1 -1
- package/es/components/Link/form.js +6 -6
- package/es/components/Link/index.js +2 -2
- package/es/components/Link/setting.js +4 -4
- package/es/components/MultiResourceDrawer/Content.js +1 -1
- package/es/components/MultiResourceDrawer/ResourceCard/index.js +2 -2
- package/es/components/ResourceList/ResourceSelect.js +3 -2
- package/es/components/ResourceList/ResourceSelect.module.scss +7 -0
- package/es/components/ResourceSelect/ResourceSelectDrawer.js +3 -1
- package/es/components/SingleResourceDrawer/index.js +1 -1
- package/es/core/{editor/components/settings/group/GroupNodeList → common}/icons/defaultIcons.d.ts +15 -0
- package/es/core/{editor/components/settings/group/GroupNodeList → common}/icons/defaultIcons.js +62 -0
- package/es/core/common/text.module.scss +5 -0
- package/es/core/components/TopoView/Topo.js +0 -6
- package/es/core/components/TopoView/TopoContent.js +1 -1
- package/es/core/editor/components/EditorPlugin.js +1 -1
- package/es/core/editor/components/LinkDynamicStyleSettingDrawer/RuleSetting.js +2 -2
- package/es/core/editor/components/LinkDynamicStyleSettingDrawer/rule/ColorPicker.js +1 -1
- package/es/core/editor/components/LinkDynamicStyleSettingDrawer/rule/ColorPicker.module.scss +7 -3
- package/es/core/editor/components/LinkDynamicStyleSettingDrawer/rule/Rule.js +1 -1
- package/es/core/editor/components/LinkDynamicStyleSettingDrawer/rule/RuleCondition.js +2 -2
- package/es/core/editor/components/LinkDynamicStyleSettingDrawer/rule/RuleStyle.js +4 -4
- package/es/core/editor/components/iconManage/RenameDialog.js +4 -4
- package/es/core/editor/components/iconManage/UploadIconDialog.js +6 -6
- package/es/core/editor/components/settings/README.md +2 -0
- package/es/core/editor/components/settings/Settings.js +47 -42
- package/es/core/editor/components/settings/Settings.module.scss +6 -1
- package/es/core/editor/components/settings/SettingsForm.js +2 -2
- package/es/core/editor/components/settings/Style.js +7 -7
- package/es/core/editor/components/settings/common/LayoutSettings.js +1 -1
- package/es/core/editor/components/settings/common/LineType.js +2 -2
- package/es/core/editor/components/settings/common/NodeAlignType.js +2 -2
- package/es/core/editor/components/settings/common/{NodeSizeInput.d.ts → NodeSizeInput/NodeSizeInput.d.ts} +0 -0
- package/es/core/editor/components/settings/common/{NodeSizeInput.js → NodeSizeInput/NodeSizeInput.js} +6 -4
- package/es/core/editor/components/settings/common/NodeSizeInput/img/icon_/350/247/243/351/224/201.svg +16 -0
- package/es/core/editor/components/settings/common/NodeSizeInput/img/icon_/351/224/201.svg +15 -0
- package/es/core/editor/components/settings/common/text/FontStyleCheckbox.d.ts +1 -0
- package/es/core/editor/components/settings/common/text/FontStyleCheckbox.js +50 -0
- package/es/core/editor/components/settings/common/text/FontStyleCheckbox.module.scss +31 -0
- package/es/core/editor/components/settings/common/text/TextStyle.d.ts +1 -0
- package/es/core/editor/components/settings/common/text/TextStyle.js +133 -0
- package/es/core/editor/components/settings/common/text/fontStyleUtil.d.ts +19 -0
- package/es/core/editor/components/settings/common/text/fontStyleUtil.js +53 -0
- package/es/core/editor/components/settings/common/text/img/bold.svg +12 -0
- package/es/core/editor/components/settings/common/text/img/italics.svg +10 -0
- package/es/core/editor/components/settings/common/text/img/underline.svg +12 -0
- package/es/core/editor/components/settings/group/GroupNodeList/ResourceList.js +23 -7
- package/es/core/editor/components/settings/group/GroupNodeList/ResourceList.module.scss +16 -0
- package/es/core/editor/components/settings/group/GroupNodeList/ResourceSelectButton.js +1 -1
- package/es/core/editor/components/settings/group/GroupNodeList/icon.d.ts +10 -0
- package/es/core/editor/components/settings/group/GroupNodeList/icon.js +20 -1
- package/es/core/editor/components/settings/layer/LayerSettingsForm.js +8 -8
- package/es/core/editor/components/settings/link/LinkPropertyView.js +8 -8
- package/es/core/editor/components/settings/node/NodeIconSelect.d.ts +1 -0
- package/es/core/editor/components/settings/node/NodeIconSelect.js +42 -0
- package/es/core/editor/components/settings/node/NodePropertyView.d.ts +1 -1
- package/es/core/editor/components/settings/node/NodePropertyView.js +128 -133
- package/es/core/editor/components/settings/node/NodeRelateResourceButton.d.ts +4 -0
- package/es/core/editor/components/settings/node/NodeRelateResourceButton.js +22 -0
- package/es/core/editor/components/settings/node/TopoTreeSelect.d.ts +1 -0
- package/es/core/editor/components/settings/node/TopoTreeSelect.js +40 -0
- package/es/core/editor/components/settings/text/TextPropertyView.js +32 -146
- package/es/core/editor/components/settings/view/ViewPropertyView.js +7 -7
- package/es/core/editor/components/titlebar/TopoEditorTitleBar.js +3 -4
- package/es/core/editor/{buildContextmenu.d.ts → contextmenu/buildContextmenu.d.ts} +1 -4
- package/es/core/editor/contextmenu/buildContextmenu.js +10 -0
- package/es/core/models/plugins/resourceWebControllUrl.js +1 -1
- package/es/core/utils/showMessage.js +1 -1
- package/es/core/viewer/components/plugins/ResourceDetail/topoDrawer.js +3 -3
- package/es/core/viewer/components/plugins/ResourceWebControllUrlSettingDialog.js +5 -5
- package/es/core/viewer/components/titlebar/TopoViewerTitleBar.js +1 -1
- package/es/core/viewer/components/titlebar/ViewerTools.js +4 -4
- package/es/core/viewer/components/titlebar/widgets/EditButton.js +1 -1
- package/es/core/viewer/components/titlebar/widgets/SearchWidget.js +1 -1
- package/es/hooks/usePolling.js +0 -1
- package/es/hooks/useSelection.js +9 -3
- package/es/hooks/useTopoEdit.js +2 -2
- package/es/models/iconManage.js +2 -2
- package/es/models/linkDynamicStyleConfig.js +1 -1
- package/es/models/topoBizMod.js +1 -1
- package/es/plugins/useSelectionPlugin.d.ts +23 -0
- package/es/plugins/useSelectionPlugin.js +84 -0
- package/es/style.js +30 -42
- package/es/topoCenter/components/Topology.js +2 -2
- package/es/topoCenter/viewer/index.js +2 -2
- package/es/utils/htElementDataUtil.js +1 -1
- package/es/utils/topoData.js +1 -1
- package/es/utils/tree.js +1 -1
- package/lib/common/components/ResourceTable/ResourceTable.js +2 -4
- package/lib/components/BatchAttrMetric/index.js +2 -4
- package/lib/components/BatchAttrMetric/setting.js +2 -4
- package/lib/components/Drawer/index.js +2 -1
- package/lib/components/Drawer/index.module.scss +13 -0
- package/lib/components/IndexSettingDrawer/IndexList.js +2 -4
- package/lib/components/IndexSettingDrawer/index.js +2 -4
- package/lib/components/Link/form.js +2 -4
- package/lib/components/Link/hook.js +2 -4
- package/lib/components/Link/index.js +2 -4
- package/lib/components/Link/setting.js +2 -4
- package/lib/components/MultiResourceDrawer/Content.js +2 -4
- package/lib/components/MultiResourceDrawer/index.js +2 -4
- package/lib/components/ResourceList/ResourceSelect.js +5 -5
- package/lib/components/ResourceList/ResourceSelect.module.scss +7 -0
- package/lib/components/ResourceList/ResourceSelectConnect.js +2 -4
- package/lib/components/ResourceSelect/DefaultResourceSelectDrawer.js +2 -4
- package/lib/components/ResourceSelect/ResourceSelectDrawer.js +5 -5
- package/lib/components/SingleResourceDrawer/index.js +2 -4
- package/lib/core/{editor/components/settings/group/GroupNodeList → common}/icons/defaultIcons.d.ts +15 -0
- package/lib/core/{editor/components/settings/group/GroupNodeList → common}/icons/defaultIcons.js +68 -1
- package/lib/core/common/text.module.scss +5 -0
- package/lib/core/components/TopoApp.js +2 -4
- package/lib/core/components/TopoAppProvider.js +2 -4
- package/lib/core/components/TopoAppView.js +2 -4
- package/lib/core/components/TopoView/Topo.js +2 -16
- package/lib/core/components/TopoView/Topo404.js +2 -4
- package/lib/core/components/TopoView/TopoContent.js +2 -4
- package/lib/core/components/TopoView/TopoNoPermission.js +2 -4
- package/lib/core/components/TopoView/topoView.js +2 -4
- package/lib/core/components/buildProvider.js +2 -4
- package/lib/core/components/titlebar/TitleBar.js +2 -4
- package/lib/core/components/titlebar/widgets/TitleWidget.js +2 -4
- package/lib/core/editor/components/LinkDynamicStyleSettingDrawer/RuleSetting.js +2 -4
- package/lib/core/editor/components/LinkDynamicStyleSettingDrawer/index.js +2 -4
- package/lib/core/editor/components/LinkDynamicStyleSettingDrawer/rule/ColorPicker.js +2 -4
- package/lib/core/editor/components/LinkDynamicStyleSettingDrawer/rule/ColorPicker.module.scss +7 -3
- package/lib/core/editor/components/LinkDynamicStyleSettingDrawer/rule/RuleCondition.js +2 -4
- package/lib/core/editor/components/LinkDynamicStyleSettingDrawer/rule/RuleStyle.js +2 -4
- package/lib/core/editor/components/ResourceViewAttributeSetting/ResourceViewAttributeSettingPlugin.js +2 -4
- package/lib/core/editor/components/ResourceViewAttributeSetting/Setting.js +2 -4
- package/lib/core/editor/components/iconManage/IconManage.js +2 -4
- package/lib/core/editor/components/iconManage/RenameDialog.js +2 -4
- package/lib/core/editor/components/iconManage/UploadIconDialog.js +2 -2
- package/lib/core/editor/components/iconManage/UploadIconDialogWrapper.js +2 -4
- package/lib/core/editor/components/settings/README.md +2 -0
- package/lib/core/editor/components/settings/Settings.js +45 -44
- package/lib/core/editor/components/settings/Settings.module.scss +6 -1
- package/lib/core/editor/components/settings/SettingsForm.js +2 -4
- package/lib/core/editor/components/settings/Style.js +2 -4
- package/lib/core/editor/components/settings/common/LayoutSettings.js +2 -4
- package/lib/core/editor/components/settings/common/LineType.js +2 -4
- package/lib/core/editor/components/settings/common/NodeAlignType.js +2 -4
- package/lib/core/editor/components/settings/common/{NodeSizeInput.d.ts → NodeSizeInput/NodeSizeInput.d.ts} +0 -0
- package/lib/core/editor/components/settings/common/{NodeSizeInput.js → NodeSizeInput/NodeSizeInput.js} +4 -4
- package/lib/core/editor/components/settings/common/NodeSizeInput/img/icon_/350/247/243/351/224/201.svg +16 -0
- package/lib/core/editor/components/settings/common/NodeSizeInput/img/icon_/351/224/201.svg +15 -0
- package/lib/core/editor/components/settings/common/text/FontStyleCheckbox.d.ts +1 -0
- package/lib/core/editor/components/settings/common/text/FontStyleCheckbox.js +68 -0
- package/lib/core/editor/components/settings/common/text/FontStyleCheckbox.module.scss +31 -0
- package/lib/core/editor/components/settings/common/text/TextStyle.d.ts +1 -0
- package/lib/core/editor/components/settings/common/text/TextStyle.js +150 -0
- package/lib/core/editor/components/settings/common/text/fontStyleUtil.d.ts +19 -0
- package/lib/core/editor/components/settings/common/text/fontStyleUtil.js +58 -0
- package/lib/core/editor/components/settings/common/text/img/bold.svg +12 -0
- package/lib/core/editor/components/settings/common/text/img/italics.svg +10 -0
- package/lib/core/editor/components/settings/common/text/img/underline.svg +12 -0
- package/lib/core/editor/components/settings/group/GroupNodeList/GroupNodeList.js +2 -4
- package/lib/core/editor/components/settings/group/GroupNodeList/ResourceList.js +24 -11
- package/lib/core/editor/components/settings/group/GroupNodeList/ResourceList.module.scss +16 -0
- package/lib/core/editor/components/settings/group/GroupNodeList/ResourceSelectButton.js +2 -4
- package/lib/core/editor/components/settings/group/GroupNodeList/icon.d.ts +10 -0
- package/lib/core/editor/components/settings/group/GroupNodeList/icon.js +23 -1
- package/lib/core/editor/components/settings/layer/LayerSettingsForm.js +2 -4
- package/lib/core/editor/components/settings/link/LinkPropertyView.js +2 -4
- package/lib/core/editor/components/settings/node/NodeIconSelect.d.ts +1 -0
- package/lib/core/editor/components/settings/node/NodeIconSelect.js +57 -0
- package/lib/core/editor/components/settings/node/NodePropertyView.d.ts +1 -1
- package/lib/core/editor/components/settings/node/NodePropertyView.js +127 -131
- package/lib/core/editor/components/settings/node/NodeRelateResourceButton.d.ts +4 -0
- package/lib/core/editor/components/settings/node/NodeRelateResourceButton.js +31 -0
- package/lib/core/editor/components/settings/node/TopoTreeSelect.d.ts +1 -0
- package/lib/core/editor/components/settings/node/TopoTreeSelect.js +53 -0
- package/lib/core/editor/components/settings/text/TextPropertyView.js +31 -153
- package/lib/core/editor/components/settings/view/ViewPropertyView.js +3 -5
- package/lib/core/editor/components/titlebar/TopoEditorTitleBar.js +4 -7
- package/lib/core/editor/components/titlebar/widgets/SaveButton.js +2 -4
- package/lib/core/editor/{buildContextmenu.d.ts → contextmenu/buildContextmenu.d.ts} +1 -4
- package/lib/core/editor/{buildContextmenu.js → contextmenu/buildContextmenu.js} +3 -7
- package/lib/core/models/cache/DictCache.js +2 -4
- package/lib/core/viewer/components/plugins/ResourceDetail/ResourceDetailDrawerPlugin.js +2 -4
- package/lib/core/viewer/components/plugins/ResourceDetail/topoDrawer.js +2 -4
- package/lib/core/viewer/components/plugins/ResourceWebControllUrlSettingDialog.js +2 -4
- package/lib/core/viewer/components/titlebar/TopoViewerTitleBar.js +2 -4
- package/lib/core/viewer/components/titlebar/ViewerTools.js +2 -4
- package/lib/core/viewer/components/titlebar/widgets/EditButton.js +2 -4
- package/lib/core/viewer/components/titlebar/widgets/SearchWidget.js +2 -4
- package/lib/hooks/usePolling.js +0 -1
- package/lib/hooks/useSelection.js +9 -3
- package/lib/hooks/useTopoEdit.js +2 -4
- package/lib/models/topoBizMod.js +1 -1
- package/lib/models/topoCreateMod.js +2 -4
- package/lib/plugins/useSelectionPlugin.d.ts +23 -0
- package/lib/plugins/useSelectionPlugin.js +90 -0
- package/lib/style.js +3 -15
- package/lib/topoCenter/components/Topology.js +2 -4
- package/lib/topoCenter/viewer/components/TopologyViewer.js +2 -4
- package/lib/utils/htElementDataUtil.js +1 -1
- package/lib/utils/topoData.js +1 -1
- package/lib/utils/tree.js +1 -1
- package/package.json +6 -6
- package/es/core/editor/buildContextmenu.js +0 -14
|
@@ -7,18 +7,18 @@ order: 3
|
|
|
7
7
|
|
|
8
8
|
图标原比例显示,垂直居中
|
|
9
9
|
|
|
10
|
-
- onChange
|
|
11
10
|
- defaultValue
|
|
12
11
|
- value
|
|
12
|
+
- onChange `function(value)`
|
|
13
13
|
- dataSource
|
|
14
14
|
```
|
|
15
15
|
[
|
|
16
16
|
{
|
|
17
|
-
|
|
17
|
+
name: '图标库1',
|
|
18
18
|
icons: [
|
|
19
|
-
{
|
|
20
|
-
{
|
|
21
|
-
{
|
|
19
|
+
{id: '1', name: '图标1', url: ''},
|
|
20
|
+
{id: '2', name: '图标2', url: ''},
|
|
21
|
+
{id: '3', name: '图标3', url: ''}
|
|
22
22
|
]
|
|
23
23
|
},
|
|
24
24
|
]
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import _Drawer from "@alifd/next/
|
|
1
|
+
import _Drawer from "@alifd/next/lib/drawer";
|
|
2
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
3
3
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
|
|
4
4
|
var _excluded = ["saveCb"],
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import _Button from "@alifd/next/
|
|
2
|
-
import _Table from "@alifd/next/
|
|
3
|
-
import _Grid from "@alifd/next/
|
|
4
|
-
import _Message from "@alifd/next/
|
|
1
|
+
import _Button from "@alifd/next/lib/button";
|
|
2
|
+
import _Table from "@alifd/next/lib/table";
|
|
3
|
+
import _Grid from "@alifd/next/lib/grid";
|
|
4
|
+
import _Message from "@alifd/next/lib/message";
|
|
5
5
|
import _extends from "@babel/runtime/helpers/extends";
|
|
6
6
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
|
|
7
7
|
var _excluded = ["defaultSet", "dataType"];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import _Balloon from "@alifd/next/
|
|
2
|
-
import _Button from "@alifd/next/
|
|
1
|
+
import _Balloon from "@alifd/next/lib/balloon";
|
|
2
|
+
import _Button from "@alifd/next/lib/button";
|
|
3
3
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
|
|
4
4
|
import _extends from "@babel/runtime/helpers/extends";
|
|
5
5
|
var _excluded = ["list"];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import _Drawer from "@alifd/next/
|
|
1
|
+
import _Drawer from "@alifd/next/lib/drawer";
|
|
2
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
3
|
-
import _Button from "@alifd/next/
|
|
3
|
+
import _Button from "@alifd/next/lib/button";
|
|
4
4
|
import React from 'react';
|
|
5
5
|
import styles from "./index.module.scss";
|
|
6
6
|
var headerStyle = {
|
|
@@ -32,7 +32,8 @@ var Drawer = function Drawer(props) {
|
|
|
32
32
|
width: "40%",
|
|
33
33
|
headerStyle: headerStyle,
|
|
34
34
|
bodyStyle: bodyStyle,
|
|
35
|
-
closeMode: ['close', 'esc']
|
|
35
|
+
closeMode: ['close', 'esc'],
|
|
36
|
+
className: styles.drawer
|
|
36
37
|
}, drawerProps, {
|
|
37
38
|
visible: visible,
|
|
38
39
|
onClose: onClose
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import _Table from "@alifd/next/
|
|
2
|
-
import _Button from "@alifd/next/
|
|
1
|
+
import _Table from "@alifd/next/lib/table";
|
|
2
|
+
import _Button from "@alifd/next/lib/button";
|
|
3
3
|
import _extends from "@babel/runtime/helpers/extends";
|
|
4
|
-
import _Search from "@alifd/next/
|
|
4
|
+
import _Search from "@alifd/next/lib/search";
|
|
5
5
|
import React from 'react';
|
|
6
6
|
import { SchemaForm, SchemaMarkupField as Field } from '@formily/next';
|
|
7
7
|
import Pagination from '@riil-frontend/component-pager';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import _Table from "@alifd/next/
|
|
1
|
+
import _Table from "@alifd/next/lib/table";
|
|
2
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
3
3
|
import React, { useMemo, useState } from 'react';
|
|
4
4
|
import NoDataPage from '@riil-frontend/component-topology-utils/es/components/NoDataPage';
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import _Button from "@alifd/next/
|
|
2
|
-
import _Icon from "@alifd/next/
|
|
1
|
+
import _Button from "@alifd/next/lib/button";
|
|
2
|
+
import _Icon from "@alifd/next/lib/icon";
|
|
3
3
|
import _extends from "@babel/runtime/helpers/extends";
|
|
4
|
-
import _Form from "@alifd/next/
|
|
5
|
-
import _Field from "@alifd/next/
|
|
4
|
+
import _Form from "@alifd/next/lib/form";
|
|
5
|
+
import _Field from "@alifd/next/lib/field";
|
|
6
6
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
|
|
7
|
-
import _Grid from "@alifd/next/
|
|
8
|
-
import _Select from "@alifd/next/
|
|
7
|
+
import _Grid from "@alifd/next/lib/grid";
|
|
8
|
+
import _Select from "@alifd/next/lib/select";
|
|
9
9
|
var _excluded = ["isAddMode", "link"];
|
|
10
10
|
import React, { forwardRef, useState, useImperativeHandle, useEffect, useCallback } from 'react';
|
|
11
11
|
import { isAvailableArray } from '@riil-frontend/utils';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import _Drawer from "@alifd/next/
|
|
2
|
-
import _Loading from "@alifd/next/
|
|
1
|
+
import _Drawer from "@alifd/next/lib/drawer";
|
|
2
|
+
import _Loading from "@alifd/next/lib/loading";
|
|
3
3
|
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
4
4
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
5
5
|
import React, { forwardRef, useCallback, useEffect, useImperativeHandle, useState } from 'react';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import _Loading from "@alifd/next/
|
|
2
|
-
import _Message from "@alifd/next/
|
|
1
|
+
import _Loading from "@alifd/next/lib/loading";
|
|
2
|
+
import _Message from "@alifd/next/lib/message";
|
|
3
3
|
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
4
4
|
import _extends from "@babel/runtime/helpers/extends";
|
|
5
|
-
import _Button from "@alifd/next/
|
|
6
|
-
import _Icon from "@alifd/next/
|
|
5
|
+
import _Button from "@alifd/next/lib/button";
|
|
6
|
+
import _Icon from "@alifd/next/lib/icon";
|
|
7
7
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
8
8
|
import React, { useState } from 'react';
|
|
9
9
|
import ExtraTitle from '@riil-frontend/component-extra-title';
|
|
@@ -5,12 +5,13 @@ import _ from 'lodash';
|
|
|
5
5
|
import useNextFormTable from '@ahooksjs/next-form-table';
|
|
6
6
|
import useFilterPlugin from '@ahooksjs/use-filter-plugin';
|
|
7
7
|
import useSortablePlugin from '@ahooksjs/use-sortable-plugin';
|
|
8
|
-
import useSelectionPlugin from
|
|
8
|
+
import useSelectionPlugin from "../../plugins/useSelectionPlugin";
|
|
9
9
|
import { fetchCommonQuery } from '@riil-frontend/component-topology-utils/es/services/cmdb';
|
|
10
10
|
import { getTitleCell } from '@riil-frontend/component-topology-utils/es/utils/table';
|
|
11
11
|
import { DICT } from '@riil-frontend/component-topology-utils/es/utils/storage';
|
|
12
12
|
import { formatDataForTable, getIp } from "../../utils/format";
|
|
13
13
|
import RiilTable from "../FormTable";
|
|
14
|
+
import styles from "./ResourceSelect.module.scss";
|
|
14
15
|
var PRIMARY_KEY = 'id';
|
|
15
16
|
|
|
16
17
|
var getTableData = /*#__PURE__*/function () {
|
|
@@ -181,7 +182,7 @@ var ResourceList = function ResourceList(props, ref) {
|
|
|
181
182
|
}
|
|
182
183
|
}];
|
|
183
184
|
return /*#__PURE__*/React.createElement(RiilTable, {
|
|
184
|
-
className: className,
|
|
185
|
+
className: className || styles.table,
|
|
185
186
|
formProps: formProps,
|
|
186
187
|
tableProps: tableProps,
|
|
187
188
|
paginationProps: paginationProps,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
|
|
3
|
-
var _excluded = ["visible", "setVisible", "onAdd", "getTableData", "onOk"];
|
|
3
|
+
var _excluded = ["visible", "setVisible", "onAdd", "getTableData", "onOk", "layer", "topo"];
|
|
4
4
|
import React, { useState, useEffect, useRef, useCallback } from 'react';
|
|
5
5
|
import ResourceTable from "../../common/components/ResourceTable/ResourceTable";
|
|
6
6
|
import Drawer from "../Drawer";
|
|
@@ -11,6 +11,8 @@ export default function ResourceSelectDrawer(props) {
|
|
|
11
11
|
onAdd = props.onAdd,
|
|
12
12
|
getTableData = props.getTableData,
|
|
13
13
|
onOk = props.onOk,
|
|
14
|
+
layer = props.layer,
|
|
15
|
+
topo = props.topo,
|
|
14
16
|
otherProps = _objectWithoutPropertiesLoose(props, _excluded);
|
|
15
17
|
|
|
16
18
|
var tableRef = useRef(); // TODO 默认处理
|
package/es/core/{editor/components/settings/group/GroupNodeList → common}/icons/defaultIcons.d.ts
RENAMED
|
@@ -1,3 +1,18 @@
|
|
|
1
|
+
export const DEFAULT_NODE_ICONS: ({
|
|
2
|
+
url: any;
|
|
3
|
+
id: string;
|
|
4
|
+
name: string;
|
|
5
|
+
ciType: string;
|
|
6
|
+
jsonUrl: string;
|
|
7
|
+
oldId: string;
|
|
8
|
+
} | {
|
|
9
|
+
url: any;
|
|
10
|
+
id: string;
|
|
11
|
+
name: string;
|
|
12
|
+
jsonUrl: string;
|
|
13
|
+
oldId: string;
|
|
14
|
+
ciType?: undefined;
|
|
15
|
+
})[];
|
|
1
16
|
declare var _default: {
|
|
2
17
|
'editor.icon.cloud.small': {
|
|
3
18
|
url: string;
|
package/es/core/{editor/components/settings/group/GroupNodeList → common}/icons/defaultIcons.js
RENAMED
|
@@ -1,3 +1,65 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
export var DEFAULT_NODE_ICONS = [{
|
|
3
|
+
id: 'ciType/network.switch',
|
|
4
|
+
name: '交换机',
|
|
5
|
+
ciType: 'network.switch',
|
|
6
|
+
jsonUrl: '/ht/image/topo/l/交换机_96.json',
|
|
7
|
+
oldId: 'editor.icon.switch'
|
|
8
|
+
}, {
|
|
9
|
+
id: 'ciType/network.coreswitch',
|
|
10
|
+
name: '核心交换机',
|
|
11
|
+
jsonUrl: '/ht/image/topo/l/核心交换机_96.json',
|
|
12
|
+
oldId: 'editor.icon.coreswitch'
|
|
13
|
+
}, {
|
|
14
|
+
id: 'ciType/network.router',
|
|
15
|
+
name: '路由器',
|
|
16
|
+
ciType: 'network.router',
|
|
17
|
+
jsonUrl: '/ht/image/topo/l/路由器_96.json',
|
|
18
|
+
oldId: 'editor.icon.router'
|
|
19
|
+
}, {
|
|
20
|
+
id: 'ciType/db',
|
|
21
|
+
name: '数据库',
|
|
22
|
+
jsonUrl: '/ht/image/topo/l/数据库_96.json',
|
|
23
|
+
oldId: 'editor.icon.db'
|
|
24
|
+
}, {
|
|
25
|
+
id: 'dc',
|
|
26
|
+
name: '数据中心',
|
|
27
|
+
jsonUrl: '/ht/image/topo/l/数据中心_144.json',
|
|
28
|
+
oldId: 'editor.icon.dc'
|
|
29
|
+
}, {
|
|
30
|
+
id: 'firewall',
|
|
31
|
+
name: '防火墙',
|
|
32
|
+
jsonUrl: '/ht/image/topo/l/防火墙_96.json',
|
|
33
|
+
oldId: 'editor.icon.firewall'
|
|
34
|
+
}, {
|
|
35
|
+
id: 'server',
|
|
36
|
+
name: '服务器',
|
|
37
|
+
jsonUrl: '/ht/image/topo/l/服务器_96.json',
|
|
38
|
+
oldId: 'editor.icon.server'
|
|
39
|
+
}, {
|
|
40
|
+
id: 'icon.cloud',
|
|
41
|
+
name: '云',
|
|
42
|
+
jsonUrl: '/ht/image/topo/l/云_144.json',
|
|
43
|
+
oldId: 'editor.icon.cloud'
|
|
44
|
+
}, {
|
|
45
|
+
id: 'building',
|
|
46
|
+
name: '楼宇',
|
|
47
|
+
jsonUrl: '/ht/image/topo/l/楼宇_144.json',
|
|
48
|
+
oldId: 'editor.icon.building'
|
|
49
|
+
}, {
|
|
50
|
+
id: 'internet',
|
|
51
|
+
name: '互联网',
|
|
52
|
+
jsonUrl: '/ht/image/topo/l/互联网_144.json',
|
|
53
|
+
oldId: 'editor.icon.internet'
|
|
54
|
+
}].map(function (item) {
|
|
55
|
+
return _extends({}, item, {
|
|
56
|
+
url: item.url || item.jsonUrl.replace('.json', '.png')
|
|
57
|
+
});
|
|
58
|
+
}); // 注册
|
|
59
|
+
|
|
60
|
+
DEFAULT_NODE_ICONS.forEach(function (icon) {
|
|
61
|
+
ht.Default.setImage(icon.id, icon.jsonUrl || icon.url);
|
|
62
|
+
});
|
|
1
63
|
export default {
|
|
2
64
|
'editor.icon.cloud.small': {
|
|
3
65
|
url: '/ht/image/topo/s/云_64.png',
|
|
@@ -1,11 +1,5 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import React, { useState, useEffect, useRef, useCallback } from 'react';
|
|
3
|
-
import NodataPage from '@riil-frontend/component-topology-utils/es/components/NoDataPage/index';
|
|
4
|
-
import TopoView from "./topoView";
|
|
5
|
-
import topoPermissonUtil from "../../../utils/topoPermissionUtil";
|
|
6
|
-
import Topo404 from "./Topo404";
|
|
7
|
-
import TopoNoPermission from "./TopoNoPermission";
|
|
8
|
-
import styles from "../../../components/index.module.scss";
|
|
9
3
|
import TopoContent from "./TopoContent";
|
|
10
4
|
/**
|
|
11
5
|
* 拓扑组件。变化无权限、无数据显示
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import _Loading from "@alifd/next/
|
|
1
|
+
import _Loading from "@alifd/next/lib/loading";
|
|
2
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
3
3
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
|
|
4
4
|
var _excluded = ["engine", "topo", "topoState", "titleBar", "onEnterEdit"];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import _Button from "@alifd/next/
|
|
2
|
-
import _Icon from "@alifd/next/
|
|
1
|
+
import _Button from "@alifd/next/lib/button";
|
|
2
|
+
import _Icon from "@alifd/next/lib/icon";
|
|
3
3
|
import React, { useRef, useState } from 'react';
|
|
4
4
|
import Rule from "./rule/Rule";
|
|
5
5
|
import styles from "./RuleSetting.module.scss";
|
package/es/core/editor/components/LinkDynamicStyleSettingDrawer/rule/ColorPicker.module.scss
CHANGED
|
@@ -1,11 +1,15 @@
|
|
|
1
|
-
@import "@alifd/
|
|
1
|
+
@import "@alifd/theme-19926/variables";
|
|
2
2
|
|
|
3
3
|
.swatch {
|
|
4
4
|
background: #fff;
|
|
5
|
-
border-radius:
|
|
6
|
-
border: 1px solid
|
|
5
|
+
border-radius: 4px;
|
|
6
|
+
border: 1px solid $input-border-color;
|
|
7
7
|
display: inline-block;
|
|
8
8
|
cursor: pointer;
|
|
9
9
|
width: 70px;
|
|
10
10
|
height: 28px;
|
|
11
|
+
|
|
12
|
+
&:hover {
|
|
13
|
+
border: 1px solid $input-hover-border-color;
|
|
14
|
+
}
|
|
11
15
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import _NumberPicker from "@alifd/next/
|
|
2
|
-
import _Select from "@alifd/next/
|
|
1
|
+
import _NumberPicker from "@alifd/next/lib/number-picker";
|
|
2
|
+
import _Select from "@alifd/next/lib/select";
|
|
3
3
|
import React, { Component, useCallback, useState } from 'react';
|
|
4
4
|
import RiilRuleTree from '@riil-frontend/component-riil-rule-tree';
|
|
5
5
|
import isEqual from 'lodash/isEqual';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import _NumberPicker from "@alifd/next/
|
|
2
|
-
import _Form from "@alifd/next/
|
|
3
|
-
import _Field from "@alifd/next/
|
|
4
|
-
import _Select from "@alifd/next/
|
|
1
|
+
import _NumberPicker from "@alifd/next/lib/number-picker";
|
|
2
|
+
import _Form from "@alifd/next/lib/form";
|
|
3
|
+
import _Field from "@alifd/next/lib/field";
|
|
4
|
+
import _Select from "@alifd/next/lib/select";
|
|
5
5
|
import React, { useEffect } from 'react';
|
|
6
6
|
import isEqual from 'lodash/isEqual';
|
|
7
7
|
import ColorPicker from "./ColorPicker";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import _Dialog from "@alifd/next/
|
|
2
|
-
import _Input from "@alifd/next/
|
|
1
|
+
import _Dialog from "@alifd/next/lib/dialog";
|
|
2
|
+
import _Input from "@alifd/next/lib/input";
|
|
3
3
|
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
4
|
-
import _Field from "@alifd/next/
|
|
5
|
-
import _Form from "@alifd/next/
|
|
4
|
+
import _Field from "@alifd/next/lib/field";
|
|
5
|
+
import _Form from "@alifd/next/lib/form";
|
|
6
6
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
7
7
|
import React, { useEffect } from 'react';
|
|
8
8
|
import _ from 'lodash';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import _Dialog from "@alifd/next/
|
|
2
|
-
import _Upload from "@alifd/next/
|
|
3
|
-
import _Icon from "@alifd/next/
|
|
1
|
+
import _Dialog from "@alifd/next/lib/dialog";
|
|
2
|
+
import _Upload from "@alifd/next/lib/upload";
|
|
3
|
+
import _Icon from "@alifd/next/lib/icon";
|
|
4
4
|
import _extends from "@babel/runtime/helpers/extends";
|
|
5
|
-
import _Message from "@alifd/next/
|
|
5
|
+
import _Message from "@alifd/next/lib/message";
|
|
6
6
|
import _inheritsLoose from "@babel/runtime/helpers/inheritsLoose";
|
|
7
7
|
import React from 'react';
|
|
8
8
|
import topoServer from '@riil-frontend/component-topology-utils/es/services/topo/index';
|
|
@@ -159,9 +159,9 @@ var UploadIconDialog = /*#__PURE__*/function (_React$Component) {
|
|
|
159
159
|
type: _this.props.type,
|
|
160
160
|
data: files.map(function (file) {
|
|
161
161
|
return {
|
|
162
|
-
id: file.response.
|
|
162
|
+
id: file.response.result,
|
|
163
163
|
name: getFileName(file),
|
|
164
|
-
url: topoServer.icon.getDownloadUrl(file.response.
|
|
164
|
+
url: topoServer.icon.getDownloadUrl(file.response.result),
|
|
165
165
|
json: file.json
|
|
166
166
|
};
|
|
167
167
|
})
|
|
@@ -8,9 +8,31 @@ import TextPropertyView from "./text/TextPropertyView";
|
|
|
8
8
|
import NodePropertyView from "./node/NodePropertyView";
|
|
9
9
|
import ViewPropertyView from "./view/ViewPropertyView";
|
|
10
10
|
import LinkPropertyView from "./link/LinkPropertyView";
|
|
11
|
-
export default function Settings(props) {
|
|
12
|
-
var _selection$;
|
|
13
11
|
|
|
12
|
+
function getElementType(selection) {
|
|
13
|
+
var selectionElement = selection[0];
|
|
14
|
+
var selectionSize = selection.length;
|
|
15
|
+
var elementType;
|
|
16
|
+
|
|
17
|
+
if (!selectionSize) {
|
|
18
|
+
elementType = 'view';
|
|
19
|
+
} else if (isGroup(selectionElement)) {
|
|
20
|
+
elementType = 'group';
|
|
21
|
+
} else if (isNode(selectionElement)) {
|
|
22
|
+
elementType = 'node';
|
|
23
|
+
} else if (isEdge(selectionElement)) {
|
|
24
|
+
elementType = 'line';
|
|
25
|
+
} else if (isLayer(selectionElement)) {
|
|
26
|
+
// 分层
|
|
27
|
+
elementType = 'layer';
|
|
28
|
+
} else if (isText(selectionElement)) {
|
|
29
|
+
elementType = 'text';
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
return elementType;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export default function Settings(props) {
|
|
14
36
|
var topo = props.topo,
|
|
15
37
|
topoEditApi = props.topoEditApi,
|
|
16
38
|
selection = props.selection,
|
|
@@ -22,9 +44,27 @@ export default function Settings(props) {
|
|
|
22
44
|
useEffect(function () {// const selectionModel = topo.getSelectionModel();
|
|
23
45
|
// console.info('selection change', selection)
|
|
24
46
|
}, [selection]);
|
|
25
|
-
var
|
|
47
|
+
var propertyPanelMap = {
|
|
48
|
+
view: SettingsForm,
|
|
49
|
+
node: NodePropertyView,
|
|
50
|
+
layer: LayerSettingsForm,
|
|
51
|
+
text: TextPropertyView
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
if (localStorage.getItem('topo.debug') === 'true') {
|
|
55
|
+
Object.assign(propertyPanelMap, {
|
|
56
|
+
line: LinkPropertyView,
|
|
57
|
+
view: ViewPropertyView
|
|
58
|
+
});
|
|
59
|
+
} else {
|
|
60
|
+
if (!selectionSize) {
|
|
61
|
+
// 未选择元素
|
|
62
|
+
return null;
|
|
63
|
+
}
|
|
64
|
+
} // TODO 待优化
|
|
65
|
+
|
|
26
66
|
|
|
27
|
-
var updateElementProperty =
|
|
67
|
+
var updateElementProperty = function updateElementProperty(name, value) {
|
|
28
68
|
// const element = topo.getDataModel().getDataById(selection[0].id);
|
|
29
69
|
var element = topo.getSelectionModel().getFirstData(); // console.info('updateElementProperty', {selection, element, name, value});
|
|
30
70
|
|
|
@@ -43,52 +83,17 @@ export default function Settings(props) {
|
|
|
43
83
|
} else if (name === 'image') {
|
|
44
84
|
element.setImage(value);
|
|
45
85
|
}
|
|
46
|
-
}, [(_selection$ = selection[0]) === null || _selection$ === void 0 ? void 0 : _selection$.id]);
|
|
47
|
-
var propertyPanelMap = {
|
|
48
|
-
view: SettingsForm,
|
|
49
|
-
layer: LayerSettingsForm // text: TextPropertyView,
|
|
50
|
-
// node: NodePropertyView,
|
|
51
|
-
|
|
52
86
|
};
|
|
53
87
|
|
|
54
|
-
|
|
55
|
-
Object.assign(propertyPanelMap, {
|
|
56
|
-
text: TextPropertyView,
|
|
57
|
-
node: NodePropertyView,
|
|
58
|
-
line: LinkPropertyView,
|
|
59
|
-
view: ViewPropertyView
|
|
60
|
-
});
|
|
61
|
-
} else {
|
|
62
|
-
if (!selectionSize) {
|
|
63
|
-
// 未选择元素
|
|
64
|
-
return null;
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
var elementType;
|
|
69
|
-
var selectionElement = selection[0];
|
|
70
|
-
|
|
71
|
-
if (!selectionSize) {
|
|
72
|
-
elementType = 'view';
|
|
73
|
-
} else if (isGroup(selectionElement)) {
|
|
74
|
-
elementType = 'group';
|
|
75
|
-
} else if (isNode(selectionElement)) {
|
|
76
|
-
elementType = 'node';
|
|
77
|
-
} else if (isEdge(selectionElement)) {
|
|
78
|
-
elementType = 'line';
|
|
79
|
-
} else if (isLayer(selectionElement)) {
|
|
80
|
-
// 分层
|
|
81
|
-
elementType = 'layer';
|
|
82
|
-
} else if (isText(selectionElement)) {
|
|
83
|
-
elementType = 'text';
|
|
84
|
-
}
|
|
85
|
-
|
|
88
|
+
var elementType = getElementType(selection);
|
|
86
89
|
var Component = propertyPanelMap[elementType];
|
|
87
90
|
|
|
88
91
|
if (!Component) {
|
|
89
92
|
return null;
|
|
90
93
|
}
|
|
91
94
|
|
|
95
|
+
var attrTypes = ['attrObject', 'position', 'styleMap'];
|
|
96
|
+
|
|
92
97
|
var values = _extends({}, selection[0]);
|
|
93
98
|
|
|
94
99
|
attrTypes.forEach(function (type) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
.settingsPanel {
|
|
2
|
-
width:
|
|
2
|
+
width: 280px;
|
|
3
3
|
height: 100%;
|
|
4
4
|
position: absolute;
|
|
5
5
|
top: 0;
|
|
@@ -34,6 +34,11 @@
|
|
|
34
34
|
}
|
|
35
35
|
.next-collapse-panel-title {
|
|
36
36
|
background: none;
|
|
37
|
+
font-size: 12px;
|
|
38
|
+
padding-bottom: 0;
|
|
39
|
+
}
|
|
40
|
+
.next-collapse-panel-content {
|
|
41
|
+
padding-left: 32px;
|
|
37
42
|
}
|
|
38
43
|
}
|
|
39
44
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import _Select from "@alifd/next/
|
|
2
|
-
import _Form from "@alifd/next/
|
|
1
|
+
import _Select from "@alifd/next/lib/select";
|
|
2
|
+
import _Form from "@alifd/next/lib/form";
|
|
3
3
|
import React, { useState, useEffect, useRef, useCallback } from 'react';
|
|
4
4
|
import Style from "./Style";
|
|
5
5
|
var FormItem = _Form.Item;
|