@riil-frontend/component-topology 2.12.3 → 2.12.5-alpha.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/build/1.js +2 -2
  3. package/build/2.js +1 -1
  4. package/build/index.css +1 -1
  5. package/build/index.js +23 -23
  6. package/es/components/Link/index.js +1 -1
  7. package/es/components/Link/index.module.scss +2 -2
  8. package/es/components/ResourceSelectDrawer/ResourceSelectList.js +4 -1
  9. package/es/components/SingleResourceDrawer/SingleResourceDrawer.js +52 -0
  10. package/es/components/SingleResourceDrawer/index.js +2 -52
  11. package/es/core/components/TopoView/topoView.js +2 -1
  12. package/es/core/editor/components/LinkDynamicStyleSettingDrawer/rule/ColorPicker.module.scss +1 -1
  13. package/es/core/editor/components/ResourceViewAttributeSetting/ResourceViewAttributeSettingPlugin.js +1 -1
  14. package/es/core/editor/components/ResourceViewAttributeSetting/Setting.js +1 -1
  15. package/es/core/editor/components/settings/common/GroupNodeList/ResourceList.js +1 -1
  16. package/es/core/editor/components/settings/common/text/FontStyleCheckbox.module.scss +1 -1
  17. package/es/core/editor/components/settings/node/BindResourceDrawer.js +54 -0
  18. package/es/core/editor/components/settings/node/NodeRelateResourceButton.js +4 -3
  19. package/es/core/models/TopoApp.js +28 -16
  20. package/es/hooks/useContainerLinkTopo.js +1 -1
  21. package/es/hooks/usePolling.js +1 -1
  22. package/es/hooks/useTopoEdit.js +1 -1
  23. package/es/style.js +0 -30
  24. package/es/topoCenter/models/TopoCenter.js +40 -12
  25. package/es/utils/htElementUtils.js +21 -1
  26. package/lib/components/Link/index.js +6 -6
  27. package/lib/components/Link/index.module.scss +2 -2
  28. package/lib/components/ResourceSelectDrawer/ResourceSelectList.js +4 -1
  29. package/lib/components/SingleResourceDrawer/SingleResourceDrawer.js +66 -0
  30. package/lib/components/SingleResourceDrawer/index.js +2 -57
  31. package/lib/core/components/TopoView/topoView.js +14 -12
  32. package/lib/core/editor/components/LinkDynamicStyleSettingDrawer/rule/ColorPicker.module.scss +1 -1
  33. package/lib/core/editor/components/ResourceViewAttributeSetting/ResourceViewAttributeSettingPlugin.js +3 -3
  34. package/lib/core/editor/components/ResourceViewAttributeSetting/Setting.js +2 -2
  35. package/lib/core/editor/components/settings/common/GroupNodeList/ResourceList.js +1 -3
  36. package/lib/core/editor/components/settings/common/text/FontStyleCheckbox.module.scss +1 -1
  37. package/lib/core/editor/components/settings/node/BindResourceDrawer.js +68 -0
  38. package/lib/core/editor/components/settings/node/NodeRelateResourceButton.js +6 -2
  39. package/lib/core/models/TopoApp.js +29 -17
  40. package/lib/hooks/useContainerLinkTopo.js +2 -2
  41. package/lib/hooks/usePolling.js +3 -3
  42. package/lib/hooks/useTopoEdit.js +10 -10
  43. package/lib/style.js +3 -4
  44. package/lib/topoCenter/models/TopoCenter.js +40 -12
  45. package/lib/utils/htElementUtils.js +23 -1
  46. package/package.json +4 -4
@@ -5,6 +5,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
5
5
  exports.__esModule = true;
6
6
  exports.getEdges = getEdges;
7
7
  exports.getElements = getElements;
8
+ exports.getGroupChildren = getGroupChildren;
8
9
  exports.getGroupChildrenData = getGroupChildrenData;
9
10
  exports.getGroupData = getGroupData;
10
11
  exports.getGroupElementByTag = getGroupElementByTag;
@@ -112,7 +113,28 @@ function getGroupNodes(dataModel, groupIdOrTag) {
112
113
  return element.groupId === groupIdOrTag || element.groupTag === groupIdOrTag;
113
114
  });
114
115
  }
116
+ /**
117
+ * 获取容器里的节点列表
118
+ *
119
+ * @param group
120
+ * @return {*}
121
+ */
122
+
123
+
124
+ function getGroupChildren(group) {
125
+ // HT为了支持区域内无节点可展开增加了站位节点,因此 节点的layer等于container_blank的过滤掉就可以了
126
+ return group.getChildren().getArray().filter(function (node) {
127
+ return node._layer !== 'container_blank';
128
+ });
129
+ }
130
+ /**
131
+ * 获取容器里的节点数据列表
132
+ *
133
+ * @param group
134
+ * @return {*}
135
+ */
136
+
115
137
 
116
138
  function getGroupChildrenData(group) {
117
- return group.getChildren().getArray().map(getNodeData);
139
+ return getGroupChildren(group).map(getNodeData);
118
140
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riil-frontend/component-topology",
3
- "version": "2.12.3",
3
+ "version": "2.12.5-alpha.3",
4
4
  "description": "拓扑",
5
5
  "scripts": {
6
6
  "start": "build-scripts start",
@@ -9,7 +9,7 @@
9
9
  "build:warch": "build-scripts build --watch",
10
10
  "test": "build-scripts test",
11
11
  "publish:npm": "npm publish",
12
- "prepublishOnly": "npm run build",
12
+ "prepublishOnly1": "npm run build",
13
13
  "eslint": "eslint --cache --ext .js,.jsx,.ts,.tsx ./",
14
14
  "eslint:fix": "npm run eslint -- --fix",
15
15
  "stylelint": "stylelint \"**/*.{css,scss,less}\"",
@@ -52,7 +52,7 @@
52
52
  },
53
53
  "devDependencies": {
54
54
  "@alifd/next": "^1.21.16",
55
- "@alifd/theme-19926": "^0.20.0",
55
+ "@alifd/theme-19926": "^0.25.0",
56
56
  "@formily/next": "1.3.13",
57
57
  "@formily/next-components": "1.3.13",
58
58
  "@iceworks/spec": "^1.0.0",
@@ -105,6 +105,6 @@
105
105
  "access": "public"
106
106
  },
107
107
  "license": "MIT",
108
- "homepage": "https://unpkg.com/@riil-frontend/component-topology@2.12.3/build/index.html",
108
+ "homepage": "https://unpkg.com/@riil-frontend/component-topology@2.12.5-alpha.3/build/index.html",
109
109
  "gitHead": "e53aaebbab89c4155be21b26a1cbac09542ad400"
110
110
  }