@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/CHANGELOG.md CHANGED
@@ -3,6 +3,37 @@
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.37.1](https://github.com/easyops-cn/next-core/compare/@next-core/editor-bricks-helper@0.37.0...@next-core/editor-bricks-helper@0.37.1) (2022-03-15)
7
+
8
+ **Note:** Version bump only for package @next-core/editor-bricks-helper
9
+
10
+
11
+
12
+
13
+
14
+ # [0.37.0](https://github.com/easyops-cn/next-core/compare/@next-core/editor-bricks-helper@0.36.1...@next-core/editor-bricks-helper@0.37.0) (2022-03-09)
15
+
16
+
17
+ ### Features
18
+
19
+ * support get widget editor brick ([ca88ed4](https://github.com/easyops-cn/next-core/commit/ca88ed4d440472229ff0b760625eba3b1dbd923e))
20
+ * update unit test ([f9760ab](https://github.com/easyops-cn/next-core/commit/f9760abcff5c2e0375ab968145630d20035232bc))
21
+
22
+
23
+
24
+
25
+
26
+ ## [0.36.1](https://github.com/easyops-cn/next-core/compare/@next-core/editor-bricks-helper@0.36.0...@next-core/editor-bricks-helper@0.36.1) (2022-03-09)
27
+
28
+
29
+ ### Bug Fixes
30
+
31
+ * refine builder node name ([d2ed295](https://github.com/easyops-cn/next-core/commit/d2ed2958adb77b1a41c9ef927c7c89b596da7fae))
32
+
33
+
34
+
35
+
36
+
6
37
  # [0.36.0](https://github.com/easyops-cn/next-core/compare/@next-core/editor-bricks-helper@0.35.4...@next-core/editor-bricks-helper@0.36.0) (2022-03-08)
7
38
 
8
39
 
@@ -443,16 +443,16 @@
443
443
  var tempParsedId = void 0;
444
444
  var tempParsedTestId = void 0;
445
445
 
446
- if ((tempParsedId = parsed === null || parsed === void 0 ? void 0 : parsed.id, typeof tempParsedId === "string") && !computationRegExp.test(tempParsedId)) {
446
+ 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)) {
447
+ parsedTestId = tempParsedTestId;
448
+ } else if ((tempParsedId = parsed === null || parsed === void 0 ? void 0 : parsed.id, typeof tempParsedId === "string") && !computationRegExp.test(tempParsedId)) {
447
449
  parsedId = tempParsedId;
448
450
  matchedSelectors.push("#".concat(parsedId));
449
- } 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)) {
450
- parsedTestId = tempParsedTestId;
451
451
  }
452
452
  }
453
453
  }
454
454
 
455
- return Object.fromEntries(Object.entries(nodeData).filter(entry => !nodeIgnoreFields.includes(entry[0])).concat([["alias", nodeData.alias || (brickUtils.isBrickNode(nodeData) ? parsedId || parsedTestId || nodeData.brick.split(".").pop() : undefined)], ["$$uid", nodeUid], ["$$matchedSelectors", matchedSelectors], ["$$isTemplateInternalNode", isTemplateInternalNode], ["$$normalized", normalized]]).concat(parsedFields));
455
+ return Object.fromEntries(Object.entries(nodeData).filter(entry => !nodeIgnoreFields.includes(entry[0])).concat([["alias", nodeData.alias || (brickUtils.isBrickNode(nodeData) ? nodeData.ref || parsedTestId || parsedId || nodeData.brick.split(".").pop() : undefined)], ["$$uid", nodeUid], ["$$matchedSelectors", matchedSelectors], ["$$isTemplateInternalNode", isTemplateInternalNode], ["$$normalized", normalized]]).concat(parsedFields));
456
456
  }
457
457
 
458
458
  function getAppendingNodesAndEdges(nodeData, nodeUid, templateSourceMap) {
@@ -1514,7 +1514,11 @@
1514
1514
  tryEditorBricks.push(ANY_ROUTE_EDITOR);
1515
1515
  } else if (brickUtils.isBrickNode(node)) {
1516
1516
  if (node.brick.includes("-")) {
1517
+ var _node$brick$split$;
1518
+
1519
+ var isWidget = (_node$brick$split$ = node.brick.split(".")[1]) === null || _node$brick$split$ === void 0 ? void 0 : _node$brick$split$.startsWith("tpl-");
1517
1520
  tryEditorBricks.push("".concat(node.brick, "--editor"));
1521
+ isWidget && tryEditorBricks.push("editors-of-".concat(node.brick, "--editor"));
1518
1522
  }
1519
1523
 
1520
1524
  if (editor) {