@next-core/editor-bricks-helper 0.36.0 → 0.37.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
@@ -441,16 +441,16 @@ function getBuilderNode(nodeData, nodeUid, isTemplateInternalNode) {
441
441
  var tempParsedId = void 0;
442
442
  var tempParsedTestId = void 0;
443
443
 
444
- if ((tempParsedId = parsed === null || parsed === void 0 ? void 0 : parsed.id, typeof tempParsedId === "string") && !computationRegExp.test(tempParsedId)) {
444
+ if ((tempParsedTestId = parsed === null || parsed === void 0 ? void 0 : (_parsed$dataset = parsed.dataset) === null || _parsed$dataset === void 0 ? void 0 : _parsed$dataset.testid, typeof tempParsedTestId === "string") && !computationRegExp.test(tempParsedTestId)) {
445
+ parsedTestId = tempParsedTestId;
446
+ } else if ((tempParsedId = parsed === null || parsed === void 0 ? void 0 : parsed.id, typeof tempParsedId === "string") && !computationRegExp.test(tempParsedId)) {
445
447
  parsedId = tempParsedId;
446
448
  matchedSelectors.push("#".concat(parsedId));
447
- } else if ((tempParsedTestId = parsed === null || parsed === void 0 ? void 0 : (_parsed$dataset = parsed.dataset) === null || _parsed$dataset === void 0 ? void 0 : _parsed$dataset.testid, typeof tempParsedTestId === "string") && !computationRegExp.test(tempParsedTestId)) {
448
- parsedTestId = tempParsedTestId;
449
449
  }
450
450
  }
451
451
  }
452
452
 
453
- return Object.fromEntries(Object.entries(nodeData).filter(entry => !nodeIgnoreFields.includes(entry[0])).concat([["alias", nodeData.alias || (isBrickNode(nodeData) ? parsedId || parsedTestId || nodeData.brick.split(".").pop() : undefined)], ["$$uid", nodeUid], ["$$matchedSelectors", matchedSelectors], ["$$isTemplateInternalNode", isTemplateInternalNode], ["$$normalized", normalized]]).concat(parsedFields));
453
+ return Object.fromEntries(Object.entries(nodeData).filter(entry => !nodeIgnoreFields.includes(entry[0])).concat([["alias", nodeData.alias || (isBrickNode(nodeData) ? nodeData.ref || parsedTestId || parsedId || nodeData.brick.split(".").pop() : undefined)], ["$$uid", nodeUid], ["$$matchedSelectors", matchedSelectors], ["$$isTemplateInternalNode", isTemplateInternalNode], ["$$normalized", normalized]]).concat(parsedFields));
454
454
  }
455
455
 
456
456
  function getAppendingNodesAndEdges(nodeData, nodeUid, templateSourceMap) {
@@ -1512,7 +1512,11 @@ function _getEditorBrick() {
1512
1512
  tryEditorBricks.push(ANY_ROUTE_EDITOR);
1513
1513
  } else if (isBrickNode(node)) {
1514
1514
  if (node.brick.includes("-")) {
1515
+ var _node$brick$split$;
1516
+
1517
+ var isWidget = (_node$brick$split$ = node.brick.split(".")[1]) === null || _node$brick$split$ === void 0 ? void 0 : _node$brick$split$.startsWith("tpl-");
1515
1518
  tryEditorBricks.push("".concat(node.brick, "--editor"));
1519
+ isWidget && tryEditorBricks.push("editors-of-".concat(node.brick, "--editor"));
1516
1520
  }
1517
1521
 
1518
1522
  if (editor) {