@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.
Files changed (214) hide show
  1. package/build/1.js +2 -2
  2. package/build/2.js +1 -1
  3. package/build/index.css +2 -2
  4. package/build/index.js +28 -28
  5. 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
  6. package/es/components/BatchAttrMetric/index.js +1 -1
  7. package/es/components/BatchAttrMetric/setting.js +4 -4
  8. package/es/components/BatchAttrMetric/utils.js +2 -2
  9. package/es/components/Drawer/index.js +4 -3
  10. package/es/components/Drawer/index.module.scss +13 -0
  11. package/es/components/FormTable/index.js +3 -3
  12. package/es/components/IndexSettingDrawer/CiList.js +1 -1
  13. package/es/components/IndexSettingDrawer/CiListItem.js +1 -1
  14. package/es/components/IndexSettingDrawer/IndexList.js +1 -1
  15. package/es/components/IndexSettingDrawer/index.js +1 -1
  16. package/es/components/Link/form.js +6 -6
  17. package/es/components/Link/index.js +2 -2
  18. package/es/components/Link/setting.js +4 -4
  19. package/es/components/MultiResourceDrawer/Content.js +1 -1
  20. package/es/components/MultiResourceDrawer/ResourceCard/index.js +2 -2
  21. package/es/components/ResourceList/ResourceSelect.js +3 -2
  22. package/es/components/ResourceList/ResourceSelect.module.scss +7 -0
  23. package/es/components/ResourceSelect/ResourceSelectDrawer.js +3 -1
  24. package/es/components/SingleResourceDrawer/index.js +1 -1
  25. package/es/core/{editor/components/settings/group/GroupNodeList → common}/icons/defaultIcons.d.ts +15 -0
  26. package/es/core/{editor/components/settings/group/GroupNodeList → common}/icons/defaultIcons.js +62 -0
  27. package/es/core/common/text.module.scss +5 -0
  28. package/es/core/components/TopoView/Topo.js +0 -6
  29. package/es/core/components/TopoView/TopoContent.js +1 -1
  30. package/es/core/editor/components/EditorPlugin.js +1 -1
  31. package/es/core/editor/components/LinkDynamicStyleSettingDrawer/RuleSetting.js +2 -2
  32. package/es/core/editor/components/LinkDynamicStyleSettingDrawer/rule/ColorPicker.js +1 -1
  33. package/es/core/editor/components/LinkDynamicStyleSettingDrawer/rule/ColorPicker.module.scss +7 -3
  34. package/es/core/editor/components/LinkDynamicStyleSettingDrawer/rule/Rule.js +1 -1
  35. package/es/core/editor/components/LinkDynamicStyleSettingDrawer/rule/RuleCondition.js +2 -2
  36. package/es/core/editor/components/LinkDynamicStyleSettingDrawer/rule/RuleStyle.js +4 -4
  37. package/es/core/editor/components/iconManage/RenameDialog.js +4 -4
  38. package/es/core/editor/components/iconManage/UploadIconDialog.js +6 -6
  39. package/es/core/editor/components/settings/README.md +2 -0
  40. package/es/core/editor/components/settings/Settings.js +47 -42
  41. package/es/core/editor/components/settings/Settings.module.scss +6 -1
  42. package/es/core/editor/components/settings/SettingsForm.js +2 -2
  43. package/es/core/editor/components/settings/Style.js +7 -7
  44. package/es/core/editor/components/settings/common/LayoutSettings.js +1 -1
  45. package/es/core/editor/components/settings/common/LineType.js +2 -2
  46. package/es/core/editor/components/settings/common/NodeAlignType.js +2 -2
  47. package/es/core/editor/components/settings/common/{NodeSizeInput.d.ts → NodeSizeInput/NodeSizeInput.d.ts} +0 -0
  48. package/es/core/editor/components/settings/common/{NodeSizeInput.js → NodeSizeInput/NodeSizeInput.js} +6 -4
  49. package/es/core/editor/components/settings/common/NodeSizeInput/img/icon_/350/247/243/351/224/201.svg +16 -0
  50. package/es/core/editor/components/settings/common/NodeSizeInput/img/icon_/351/224/201.svg +15 -0
  51. package/es/core/editor/components/settings/common/text/FontStyleCheckbox.d.ts +1 -0
  52. package/es/core/editor/components/settings/common/text/FontStyleCheckbox.js +50 -0
  53. package/es/core/editor/components/settings/common/text/FontStyleCheckbox.module.scss +31 -0
  54. package/es/core/editor/components/settings/common/text/TextStyle.d.ts +1 -0
  55. package/es/core/editor/components/settings/common/text/TextStyle.js +133 -0
  56. package/es/core/editor/components/settings/common/text/fontStyleUtil.d.ts +19 -0
  57. package/es/core/editor/components/settings/common/text/fontStyleUtil.js +53 -0
  58. package/es/core/editor/components/settings/common/text/img/bold.svg +12 -0
  59. package/es/core/editor/components/settings/common/text/img/italics.svg +10 -0
  60. package/es/core/editor/components/settings/common/text/img/underline.svg +12 -0
  61. package/es/core/editor/components/settings/group/GroupNodeList/ResourceList.js +23 -7
  62. package/es/core/editor/components/settings/group/GroupNodeList/ResourceList.module.scss +16 -0
  63. package/es/core/editor/components/settings/group/GroupNodeList/ResourceSelectButton.js +1 -1
  64. package/es/core/editor/components/settings/group/GroupNodeList/icon.d.ts +10 -0
  65. package/es/core/editor/components/settings/group/GroupNodeList/icon.js +20 -1
  66. package/es/core/editor/components/settings/layer/LayerSettingsForm.js +8 -8
  67. package/es/core/editor/components/settings/link/LinkPropertyView.js +8 -8
  68. package/es/core/editor/components/settings/node/NodeIconSelect.d.ts +1 -0
  69. package/es/core/editor/components/settings/node/NodeIconSelect.js +42 -0
  70. package/es/core/editor/components/settings/node/NodePropertyView.d.ts +1 -1
  71. package/es/core/editor/components/settings/node/NodePropertyView.js +128 -133
  72. package/es/core/editor/components/settings/node/NodeRelateResourceButton.d.ts +4 -0
  73. package/es/core/editor/components/settings/node/NodeRelateResourceButton.js +22 -0
  74. package/es/core/editor/components/settings/node/TopoTreeSelect.d.ts +1 -0
  75. package/es/core/editor/components/settings/node/TopoTreeSelect.js +40 -0
  76. package/es/core/editor/components/settings/text/TextPropertyView.js +32 -146
  77. package/es/core/editor/components/settings/view/ViewPropertyView.js +7 -7
  78. package/es/core/editor/components/titlebar/TopoEditorTitleBar.js +3 -4
  79. package/es/core/editor/{buildContextmenu.d.ts → contextmenu/buildContextmenu.d.ts} +1 -4
  80. package/es/core/editor/contextmenu/buildContextmenu.js +10 -0
  81. package/es/core/models/plugins/resourceWebControllUrl.js +1 -1
  82. package/es/core/utils/showMessage.js +1 -1
  83. package/es/core/viewer/components/plugins/ResourceDetail/topoDrawer.js +3 -3
  84. package/es/core/viewer/components/plugins/ResourceWebControllUrlSettingDialog.js +5 -5
  85. package/es/core/viewer/components/titlebar/TopoViewerTitleBar.js +1 -1
  86. package/es/core/viewer/components/titlebar/ViewerTools.js +4 -4
  87. package/es/core/viewer/components/titlebar/widgets/EditButton.js +1 -1
  88. package/es/core/viewer/components/titlebar/widgets/SearchWidget.js +1 -1
  89. package/es/hooks/usePolling.js +0 -1
  90. package/es/hooks/useSelection.js +9 -3
  91. package/es/hooks/useTopoEdit.js +2 -2
  92. package/es/models/iconManage.js +2 -2
  93. package/es/models/linkDynamicStyleConfig.js +1 -1
  94. package/es/models/topoBizMod.js +1 -1
  95. package/es/plugins/useSelectionPlugin.d.ts +23 -0
  96. package/es/plugins/useSelectionPlugin.js +84 -0
  97. package/es/style.js +30 -42
  98. package/es/topoCenter/components/Topology.js +2 -2
  99. package/es/topoCenter/viewer/index.js +2 -2
  100. package/es/utils/htElementDataUtil.js +1 -1
  101. package/es/utils/topoData.js +1 -1
  102. package/es/utils/tree.js +1 -1
  103. package/lib/common/components/ResourceTable/ResourceTable.js +2 -4
  104. package/lib/components/BatchAttrMetric/index.js +2 -4
  105. package/lib/components/BatchAttrMetric/setting.js +2 -4
  106. package/lib/components/Drawer/index.js +2 -1
  107. package/lib/components/Drawer/index.module.scss +13 -0
  108. package/lib/components/IndexSettingDrawer/IndexList.js +2 -4
  109. package/lib/components/IndexSettingDrawer/index.js +2 -4
  110. package/lib/components/Link/form.js +2 -4
  111. package/lib/components/Link/hook.js +2 -4
  112. package/lib/components/Link/index.js +2 -4
  113. package/lib/components/Link/setting.js +2 -4
  114. package/lib/components/MultiResourceDrawer/Content.js +2 -4
  115. package/lib/components/MultiResourceDrawer/index.js +2 -4
  116. package/lib/components/ResourceList/ResourceSelect.js +5 -5
  117. package/lib/components/ResourceList/ResourceSelect.module.scss +7 -0
  118. package/lib/components/ResourceList/ResourceSelectConnect.js +2 -4
  119. package/lib/components/ResourceSelect/DefaultResourceSelectDrawer.js +2 -4
  120. package/lib/components/ResourceSelect/ResourceSelectDrawer.js +5 -5
  121. package/lib/components/SingleResourceDrawer/index.js +2 -4
  122. package/lib/core/{editor/components/settings/group/GroupNodeList → common}/icons/defaultIcons.d.ts +15 -0
  123. package/lib/core/{editor/components/settings/group/GroupNodeList → common}/icons/defaultIcons.js +68 -1
  124. package/lib/core/common/text.module.scss +5 -0
  125. package/lib/core/components/TopoApp.js +2 -4
  126. package/lib/core/components/TopoAppProvider.js +2 -4
  127. package/lib/core/components/TopoAppView.js +2 -4
  128. package/lib/core/components/TopoView/Topo.js +2 -16
  129. package/lib/core/components/TopoView/Topo404.js +2 -4
  130. package/lib/core/components/TopoView/TopoContent.js +2 -4
  131. package/lib/core/components/TopoView/TopoNoPermission.js +2 -4
  132. package/lib/core/components/TopoView/topoView.js +2 -4
  133. package/lib/core/components/buildProvider.js +2 -4
  134. package/lib/core/components/titlebar/TitleBar.js +2 -4
  135. package/lib/core/components/titlebar/widgets/TitleWidget.js +2 -4
  136. package/lib/core/editor/components/LinkDynamicStyleSettingDrawer/RuleSetting.js +2 -4
  137. package/lib/core/editor/components/LinkDynamicStyleSettingDrawer/index.js +2 -4
  138. package/lib/core/editor/components/LinkDynamicStyleSettingDrawer/rule/ColorPicker.js +2 -4
  139. package/lib/core/editor/components/LinkDynamicStyleSettingDrawer/rule/ColorPicker.module.scss +7 -3
  140. package/lib/core/editor/components/LinkDynamicStyleSettingDrawer/rule/RuleCondition.js +2 -4
  141. package/lib/core/editor/components/LinkDynamicStyleSettingDrawer/rule/RuleStyle.js +2 -4
  142. package/lib/core/editor/components/ResourceViewAttributeSetting/ResourceViewAttributeSettingPlugin.js +2 -4
  143. package/lib/core/editor/components/ResourceViewAttributeSetting/Setting.js +2 -4
  144. package/lib/core/editor/components/iconManage/IconManage.js +2 -4
  145. package/lib/core/editor/components/iconManage/RenameDialog.js +2 -4
  146. package/lib/core/editor/components/iconManage/UploadIconDialog.js +2 -2
  147. package/lib/core/editor/components/iconManage/UploadIconDialogWrapper.js +2 -4
  148. package/lib/core/editor/components/settings/README.md +2 -0
  149. package/lib/core/editor/components/settings/Settings.js +45 -44
  150. package/lib/core/editor/components/settings/Settings.module.scss +6 -1
  151. package/lib/core/editor/components/settings/SettingsForm.js +2 -4
  152. package/lib/core/editor/components/settings/Style.js +2 -4
  153. package/lib/core/editor/components/settings/common/LayoutSettings.js +2 -4
  154. package/lib/core/editor/components/settings/common/LineType.js +2 -4
  155. package/lib/core/editor/components/settings/common/NodeAlignType.js +2 -4
  156. package/lib/core/editor/components/settings/common/{NodeSizeInput.d.ts → NodeSizeInput/NodeSizeInput.d.ts} +0 -0
  157. package/lib/core/editor/components/settings/common/{NodeSizeInput.js → NodeSizeInput/NodeSizeInput.js} +4 -4
  158. package/lib/core/editor/components/settings/common/NodeSizeInput/img/icon_/350/247/243/351/224/201.svg +16 -0
  159. package/lib/core/editor/components/settings/common/NodeSizeInput/img/icon_/351/224/201.svg +15 -0
  160. package/lib/core/editor/components/settings/common/text/FontStyleCheckbox.d.ts +1 -0
  161. package/lib/core/editor/components/settings/common/text/FontStyleCheckbox.js +68 -0
  162. package/lib/core/editor/components/settings/common/text/FontStyleCheckbox.module.scss +31 -0
  163. package/lib/core/editor/components/settings/common/text/TextStyle.d.ts +1 -0
  164. package/lib/core/editor/components/settings/common/text/TextStyle.js +150 -0
  165. package/lib/core/editor/components/settings/common/text/fontStyleUtil.d.ts +19 -0
  166. package/lib/core/editor/components/settings/common/text/fontStyleUtil.js +58 -0
  167. package/lib/core/editor/components/settings/common/text/img/bold.svg +12 -0
  168. package/lib/core/editor/components/settings/common/text/img/italics.svg +10 -0
  169. package/lib/core/editor/components/settings/common/text/img/underline.svg +12 -0
  170. package/lib/core/editor/components/settings/group/GroupNodeList/GroupNodeList.js +2 -4
  171. package/lib/core/editor/components/settings/group/GroupNodeList/ResourceList.js +24 -11
  172. package/lib/core/editor/components/settings/group/GroupNodeList/ResourceList.module.scss +16 -0
  173. package/lib/core/editor/components/settings/group/GroupNodeList/ResourceSelectButton.js +2 -4
  174. package/lib/core/editor/components/settings/group/GroupNodeList/icon.d.ts +10 -0
  175. package/lib/core/editor/components/settings/group/GroupNodeList/icon.js +23 -1
  176. package/lib/core/editor/components/settings/layer/LayerSettingsForm.js +2 -4
  177. package/lib/core/editor/components/settings/link/LinkPropertyView.js +2 -4
  178. package/lib/core/editor/components/settings/node/NodeIconSelect.d.ts +1 -0
  179. package/lib/core/editor/components/settings/node/NodeIconSelect.js +57 -0
  180. package/lib/core/editor/components/settings/node/NodePropertyView.d.ts +1 -1
  181. package/lib/core/editor/components/settings/node/NodePropertyView.js +127 -131
  182. package/lib/core/editor/components/settings/node/NodeRelateResourceButton.d.ts +4 -0
  183. package/lib/core/editor/components/settings/node/NodeRelateResourceButton.js +31 -0
  184. package/lib/core/editor/components/settings/node/TopoTreeSelect.d.ts +1 -0
  185. package/lib/core/editor/components/settings/node/TopoTreeSelect.js +53 -0
  186. package/lib/core/editor/components/settings/text/TextPropertyView.js +31 -153
  187. package/lib/core/editor/components/settings/view/ViewPropertyView.js +3 -5
  188. package/lib/core/editor/components/titlebar/TopoEditorTitleBar.js +4 -7
  189. package/lib/core/editor/components/titlebar/widgets/SaveButton.js +2 -4
  190. package/lib/core/editor/{buildContextmenu.d.ts → contextmenu/buildContextmenu.d.ts} +1 -4
  191. package/lib/core/editor/{buildContextmenu.js → contextmenu/buildContextmenu.js} +3 -7
  192. package/lib/core/models/cache/DictCache.js +2 -4
  193. package/lib/core/viewer/components/plugins/ResourceDetail/ResourceDetailDrawerPlugin.js +2 -4
  194. package/lib/core/viewer/components/plugins/ResourceDetail/topoDrawer.js +2 -4
  195. package/lib/core/viewer/components/plugins/ResourceWebControllUrlSettingDialog.js +2 -4
  196. package/lib/core/viewer/components/titlebar/TopoViewerTitleBar.js +2 -4
  197. package/lib/core/viewer/components/titlebar/ViewerTools.js +2 -4
  198. package/lib/core/viewer/components/titlebar/widgets/EditButton.js +2 -4
  199. package/lib/core/viewer/components/titlebar/widgets/SearchWidget.js +2 -4
  200. package/lib/hooks/usePolling.js +0 -1
  201. package/lib/hooks/useSelection.js +9 -3
  202. package/lib/hooks/useTopoEdit.js +2 -4
  203. package/lib/models/topoBizMod.js +1 -1
  204. package/lib/models/topoCreateMod.js +2 -4
  205. package/lib/plugins/useSelectionPlugin.d.ts +23 -0
  206. package/lib/plugins/useSelectionPlugin.js +90 -0
  207. package/lib/style.js +3 -15
  208. package/lib/topoCenter/components/Topology.js +2 -4
  209. package/lib/topoCenter/viewer/components/TopologyViewer.js +2 -4
  210. package/lib/utils/htElementDataUtil.js +1 -1
  211. package/lib/utils/topoData.js +1 -1
  212. package/lib/utils/tree.js +1 -1
  213. package/package.json +6 -6
  214. 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
- label: '图标库1',
17
+ name: '图标库1',
18
18
  icons: [
19
- {value: '1', label: '图标1', url: ''},
20
- {value: '2', label: '图标2', url: ''},
21
- {value: '3', label: '图标3', url: ''}
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/es/drawer";
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/es/button";
2
- import _Table from "@alifd/next/es/table";
3
- import _Grid from "@alifd/next/es/grid";
4
- import _Message from "@alifd/next/es/message";
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/es/balloon";
2
- import _Button from "@alifd/next/es/button";
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/es/drawer";
1
+ import _Drawer from "@alifd/next/lib/drawer";
2
2
  import _extends from "@babel/runtime/helpers/extends";
3
- import _Button from "@alifd/next/es/button";
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,3 +1,16 @@
1
+ .drawer {
2
+ & > div {
3
+ display: flex;
4
+ }
5
+
6
+ :global {
7
+ .next-drawer-body {
8
+ flex: 1;
9
+ }
10
+ }
11
+ }
12
+
13
+
1
14
  .footer {
2
15
  position: absolute;
3
16
  bottom: 0;
@@ -1,7 +1,7 @@
1
- import _Table from "@alifd/next/es/table";
2
- import _Button from "@alifd/next/es/button";
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/es/search";
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 _List from "@alifd/next/es/list";
1
+ import _List from "@alifd/next/lib/list";
2
2
  import React from 'react';
3
3
  import ListItem from "./CiListItem";
4
4
  import styles from "./index.module.scss";
@@ -1,4 +1,4 @@
1
- import _Icon from "@alifd/next/es/icon";
1
+ import _Icon from "@alifd/next/lib/icon";
2
2
  import React from 'react';
3
3
  import styles from "./index.module.scss";
4
4
 
@@ -1,4 +1,4 @@
1
- import _Table from "@alifd/next/es/table";
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,4 +1,4 @@
1
- import _Divider from "@alifd/next/es/divider";
1
+ import _Divider from "@alifd/next/lib/divider";
2
2
  import React, { useEffect, useRef } from 'react';
3
3
  import { store as pageStore } from 'ice/TopoCenter';
4
4
  import { isAvailableArray } from '@riil-frontend/utils';
@@ -1,11 +1,11 @@
1
- import _Button from "@alifd/next/es/button";
2
- import _Icon from "@alifd/next/es/icon";
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/es/form";
5
- import _Field from "@alifd/next/es/field";
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/es/grid";
8
- import _Select from "@alifd/next/es/select";
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/es/drawer";
2
- import _Loading from "@alifd/next/es/loading";
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/es/loading";
2
- import _Message from "@alifd/next/es/message";
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/es/button";
6
- import _Icon from "@alifd/next/es/icon";
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';
@@ -1,4 +1,4 @@
1
- import _Message from "@alifd/next/es/message";
1
+ import _Message from "@alifd/next/lib/message";
2
2
  import React, { useImperativeHandle, useRef, useState } from 'react';
3
3
  import { isAvailableArray } from '@riil-frontend/utils';
4
4
  import Dynamic from "./Dynamic";
@@ -1,5 +1,5 @@
1
- import _Card from "@alifd/next/es/card";
2
- import _Checkbox from "@alifd/next/es/checkbox";
1
+ import _Card from "@alifd/next/lib/card";
2
+ import _Checkbox from "@alifd/next/lib/checkbox";
3
3
  import React from 'react';
4
4
  import styles from "./index.module.scss";
5
5
 
@@ -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 '@riil-frontend/component-topology-utils/es/plugins/useSelectionPlugin';
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,
@@ -0,0 +1,7 @@
1
+ .table {
2
+ height: 100%;
3
+ :global {
4
+ .next-table-body {
5
+ }
6
+ }
7
+ }
@@ -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 默认处理
@@ -1,4 +1,4 @@
1
- import _Message from "@alifd/next/es/message";
1
+ import _Message from "@alifd/next/lib/message";
2
2
  import React, { useRef } from 'react';
3
3
  import { isAvailableArray } from '@riil-frontend/utils';
4
4
  import Drawer from "../Drawer";
@@ -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;
@@ -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',
@@ -0,0 +1,5 @@
1
+ .textEllipsis {
2
+ overflow: hidden;
3
+ text-overflow:ellipsis;
4
+ white-space: nowrap;
5
+ }
@@ -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/es/loading";
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,4 +1,4 @@
1
- import _Loading from "@alifd/next/es/loading";
1
+ import _Loading from "@alifd/next/lib/loading";
2
2
  import React from 'react';
3
3
  import IconManage from "./iconManage/IconManage";
4
4
  import LinkDynamicStyleSettingDrawer from "./LinkDynamicStyleSettingDrawer";
@@ -1,5 +1,5 @@
1
- import _Button from "@alifd/next/es/button";
2
- import _Icon from "@alifd/next/es/icon";
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";
@@ -1,4 +1,4 @@
1
- import _Balloon from "@alifd/next/es/balloon";
1
+ import _Balloon from "@alifd/next/lib/balloon";
2
2
  import _inheritsLoose from "@babel/runtime/helpers/inheritsLoose";
3
3
  import React, { Component, useRef } from 'react';
4
4
  import { SketchPicker } from 'react-color';
@@ -1,11 +1,15 @@
1
- @import "@alifd/next/variables";
1
+ @import "@alifd/theme-19926/variables";
2
2
 
3
3
  .swatch {
4
4
  background: #fff;
5
- border-radius: 1px;
6
- border: 1px solid var(--input-border-color);
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,4 +1,4 @@
1
- import _Icon from "@alifd/next/es/icon";
1
+ import _Icon from "@alifd/next/lib/icon";
2
2
  import _extends from "@babel/runtime/helpers/extends";
3
3
  import React from 'react';
4
4
  import RuleCondition from "./RuleCondition";
@@ -1,5 +1,5 @@
1
- import _NumberPicker from "@alifd/next/es/number-picker";
2
- import _Select from "@alifd/next/es/select";
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/es/number-picker";
2
- import _Form from "@alifd/next/es/form";
3
- import _Field from "@alifd/next/es/field";
4
- import _Select from "@alifd/next/es/select";
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/es/dialog";
2
- import _Input from "@alifd/next/es/input";
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/es/field";
5
- import _Form from "@alifd/next/es/form";
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/es/dialog";
2
- import _Upload from "@alifd/next/es/upload";
3
- import _Icon from "@alifd/next/es/icon";
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/es/message";
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.data,
162
+ id: file.response.result,
163
163
  name: getFileName(file),
164
- url: topoServer.icon.getDownloadUrl(file.response.data),
164
+ url: topoServer.icon.getDownloadUrl(file.response.result),
165
165
  json: file.json
166
166
  };
167
167
  })
@@ -0,0 +1,2 @@
1
+ # 属性面板
2
+
@@ -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 attrTypes = ['attrObject', 'position', 'styleMap']; // TODO 待优化
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 = useCallback(function (name, value) {
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
- if (localStorage.getItem('topo.debug') === 'true') {
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: 260px;
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/es/select";
2
- import _Form from "@alifd/next/es/form";
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;