@next-core/editor-bricks-helper 0.44.0 → 0.45.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/dist/index.esm.js
CHANGED
|
@@ -1231,6 +1231,7 @@ class BuilderDataManager {
|
|
|
1231
1231
|
}
|
|
1232
1232
|
|
|
1233
1233
|
workbenchNodeAdd(detail) {
|
|
1234
|
+
var isNeedUpdateSnippet = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
1234
1235
|
var {
|
|
1235
1236
|
nodes,
|
|
1236
1237
|
edges,
|
|
@@ -1283,7 +1284,7 @@ class BuilderDataManager {
|
|
|
1283
1284
|
|
|
1284
1285
|
if (nodeData.bricks) {
|
|
1285
1286
|
// snippet
|
|
1286
|
-
|
|
1287
|
+
var snippetData = {
|
|
1287
1288
|
parentUid,
|
|
1288
1289
|
nodeDetails: nodeData.bricks.map(brickConf => getSnippetNodeDetail({
|
|
1289
1290
|
parent: parentInstanceId,
|
|
@@ -1295,8 +1296,13 @@ class BuilderDataManager {
|
|
|
1295
1296
|
})),
|
|
1296
1297
|
nodeIds,
|
|
1297
1298
|
nodeUids
|
|
1298
|
-
}
|
|
1299
|
-
|
|
1299
|
+
};
|
|
1300
|
+
|
|
1301
|
+
if (isNeedUpdateSnippet) {
|
|
1302
|
+
this.snippetApply(snippetData);
|
|
1303
|
+
} else {
|
|
1304
|
+
return snippetData;
|
|
1305
|
+
}
|
|
1300
1306
|
}
|
|
1301
1307
|
|
|
1302
1308
|
this.runAddNodeAction({
|