@next-core/editor-bricks-helper 0.44.1 → 0.45.0

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,17 @@
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.45.0](https://github.com/easyops-cn/next-core/compare/@next-core/editor-bricks-helper@0.44.1...@next-core/editor-bricks-helper@0.45.0) (2022-08-09)
7
+
8
+
9
+ ### Features
10
+
11
+ * support drag snippet not update builder data ([3b73fe4](https://github.com/easyops-cn/next-core/commit/3b73fe4b39851667a749a8bb353f561adb131ebb))
12
+
13
+
14
+
15
+
16
+
6
17
  ## [0.44.1](https://github.com/easyops-cn/next-core/compare/@next-core/editor-bricks-helper@0.44.0...@next-core/editor-bricks-helper@0.44.1) (2022-08-08)
7
18
 
8
19
  **Note:** Version bump only for package @next-core/editor-bricks-helper
@@ -1233,6 +1233,7 @@
1233
1233
  }
1234
1234
 
1235
1235
  workbenchNodeAdd(detail) {
1236
+ var isNeedUpdateSnippet = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
1236
1237
  var {
1237
1238
  nodes,
1238
1239
  edges,
@@ -1285,7 +1286,7 @@
1285
1286
 
1286
1287
  if (nodeData.bricks) {
1287
1288
  // snippet
1288
- this.snippetApply({
1289
+ var snippetData = {
1289
1290
  parentUid,
1290
1291
  nodeDetails: nodeData.bricks.map(brickConf => getSnippetNodeDetail({
1291
1292
  parent: parentInstanceId,
@@ -1297,8 +1298,13 @@
1297
1298
  })),
1298
1299
  nodeIds,
1299
1300
  nodeUids
1300
- });
1301
- return;
1301
+ };
1302
+
1303
+ if (isNeedUpdateSnippet) {
1304
+ this.snippetApply(snippetData);
1305
+ } else {
1306
+ return snippetData;
1307
+ }
1302
1308
  }
1303
1309
 
1304
1310
  this.runAddNodeAction({