@next-core/editor-bricks-helper 0.42.1 → 0.42.4

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/CHANGELOG.md CHANGED
@@ -3,6 +3,36 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [0.42.4](https://github.com/easyops-cn/next-core/compare/@next-core/editor-bricks-helper@0.42.3...@next-core/editor-bricks-helper@0.42.4) (2022-06-23)
7
+
8
+ **Note:** Version bump only for package @next-core/editor-bricks-helper
9
+
10
+
11
+
12
+
13
+
14
+ ## [0.42.3](https://github.com/easyops-cn/next-core/compare/@next-core/editor-bricks-helper@0.42.2...@next-core/editor-bricks-helper@0.42.3) (2022-06-22)
15
+
16
+
17
+ ### Bug Fixes
18
+
19
+ * **BuilderDataManage:** sortUid incorrect after add node ([b7d2c1b](https://github.com/easyops-cn/next-core/commit/b7d2c1ba615f8242f46261218c3dbb7b36db2441))
20
+
21
+
22
+
23
+
24
+
25
+ ## [0.42.2](https://github.com/easyops-cn/next-core/compare/@next-core/editor-bricks-helper@0.42.1...@next-core/editor-bricks-helper@0.42.2) (2022-06-16)
26
+
27
+
28
+ ### Bug Fixes
29
+
30
+ * **BuilderDataManager:** add node redirect parent error ([ac3e0cc](https://github.com/easyops-cn/next-core/commit/ac3e0cc2ab4115062eb057fce803de23bbd77cbf))
31
+
32
+
33
+
34
+
35
+
6
36
  ## [0.42.1](https://github.com/easyops-cn/next-core/compare/@next-core/editor-bricks-helper@0.42.0...@next-core/editor-bricks-helper@0.42.1) (2022-06-15)
7
37
 
8
38
  **Note:** Version bump only for package @next-core/editor-bricks-helper
@@ -1179,8 +1179,9 @@
1179
1179
  var overIndex = sortUids.findIndex(item => item === dragOverNodeUid);
1180
1180
  sortIndex = dragStatus === "top" ? overIndex : overIndex + 1; // 排序修正
1181
1181
 
1182
- sortNodeIds.splice(sortIndex, 0, nodeData.id);
1183
- sortUids.splice(sortIndex, 0, (_dragEdge$child = dragEdge === null || dragEdge === void 0 ? void 0 : dragEdge.child) !== null && _dragEdge$child !== void 0 ? _dragEdge$child : null);
1182
+ sortNodeIds.splice(sortIndex, 0, nodeData.id); // 如果是新增的情况下, 没有edge, 则取dragNodeUid(新创建的uid)
1183
+
1184
+ sortUids.splice(sortIndex, 0, (_dragEdge$child = dragEdge === null || dragEdge === void 0 ? void 0 : dragEdge.child) !== null && _dragEdge$child !== void 0 ? _dragEdge$child : dragNodeUid);
1184
1185
  }
1185
1186
 
1186
1187
  return {
@@ -1218,7 +1219,7 @@
1218
1219
  realDragStatus = "inside";
1219
1220
  } else {
1220
1221
  var overEdge = edges.find(item => item.child === dragOverNodeUid);
1221
- var overParentNode = nodes.find(item => item.$$uid === overEdge.parent);
1222
+ var overParentNode = nodes.find(item => dragStatus === "inside" ? item.$$uid === overEdge.child : item.$$uid === overEdge.parent);
1222
1223
 
1223
1224
  if (overParentNode.instanceId !== parentInstanceId) {
1224
1225
  // 如果instanceId不相同, 说明父元素被修改, dragStatus强制等于inside, uid也需要切换成实际父元素的uid