@next-core/editor-bricks-helper 0.32.35 → 0.33.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 +15 -60
- package/dist/index.bundle.js +19 -8
- package/dist/index.bundle.js.map +1 -1
- package/dist/index.esm.js +19 -8
- package/dist/index.esm.js.map +1 -1
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
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.
|
|
6
|
+
## [0.33.1](https://github.com/easyops-cn/next-core/compare/@next-core/editor-bricks-helper@0.33.0...@next-core/editor-bricks-helper@0.33.1) (2021-12-24)
|
|
7
7
|
|
|
8
8
|
**Note:** Version bump only for package @next-core/editor-bricks-helper
|
|
9
9
|
|
|
@@ -11,23 +11,18 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
**Note:** Version bump only for package @next-core/editor-bricks-helper
|
|
17
|
-
|
|
14
|
+
# [0.33.0](https://github.com/easyops-cn/next-core/compare/@next-core/editor-bricks-helper@0.32.36...@next-core/editor-bricks-helper@0.33.0) (2021-12-23)
|
|
18
15
|
|
|
19
16
|
|
|
17
|
+
### Features
|
|
20
18
|
|
|
21
|
-
|
|
22
|
-
## [0.32.33](https://github.com/easyops-cn/next-core/compare/@next-core/editor-bricks-helper@0.32.32...@next-core/editor-bricks-helper@0.32.33) (2021-12-06)
|
|
23
|
-
|
|
24
|
-
**Note:** Version bump only for package @next-core/editor-bricks-helper
|
|
19
|
+
* display brick alias/id/dataset.testid/brick.name in order ([3645841](https://github.com/easyops-cn/next-core/commit/3645841ccf12f8ca3fe74f673a541ec75ff45d1c))
|
|
25
20
|
|
|
26
21
|
|
|
27
22
|
|
|
28
23
|
|
|
29
24
|
|
|
30
|
-
## [0.32.
|
|
25
|
+
## [0.32.36](https://github.com/easyops-cn/next-core/compare/@next-core/editor-bricks-helper@0.32.35...@next-core/editor-bricks-helper@0.32.36) (2021-12-17)
|
|
31
26
|
|
|
32
27
|
**Note:** Version bump only for package @next-core/editor-bricks-helper
|
|
33
28
|
|
|
@@ -35,118 +30,78 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
35
30
|
|
|
36
31
|
|
|
37
32
|
|
|
38
|
-
## [0.32.
|
|
33
|
+
## [0.32.35](https://github.com/easyops-cn/next-core/compare/@next-core/editor-bricks-helper@0.32.34...@next-core/editor-bricks-helper@0.32.35) (2021-12-15)
|
|
39
34
|
|
|
40
35
|
**Note:** Version bump only for package @next-core/editor-bricks-helper
|
|
41
36
|
|
|
37
|
+
## [0.32.34](https://github.com/easyops-cn/next-core/compare/@next-core/editor-bricks-helper@0.32.33...@next-core/editor-bricks-helper@0.32.34) (2021-12-06)
|
|
42
38
|
|
|
39
|
+
**Note:** Version bump only for package @next-core/editor-bricks-helper
|
|
43
40
|
|
|
41
|
+
## [0.32.33](https://github.com/easyops-cn/next-core/compare/@next-core/editor-bricks-helper@0.32.32...@next-core/editor-bricks-helper@0.32.33) (2021-12-06)
|
|
44
42
|
|
|
43
|
+
**Note:** Version bump only for package @next-core/editor-bricks-helper
|
|
45
44
|
|
|
46
|
-
## [0.32.
|
|
45
|
+
## [0.32.32](https://github.com/easyops-cn/next-core/compare/@next-core/editor-bricks-helper@0.32.31...@next-core/editor-bricks-helper@0.32.32) (2021-12-05)
|
|
47
46
|
|
|
48
47
|
**Note:** Version bump only for package @next-core/editor-bricks-helper
|
|
49
48
|
|
|
49
|
+
## [0.32.31](https://github.com/easyops-cn/next-core/compare/@next-core/editor-bricks-helper@0.32.30...@next-core/editor-bricks-helper@0.32.31) (2021-12-03)
|
|
50
50
|
|
|
51
|
+
**Note:** Version bump only for package @next-core/editor-bricks-helper
|
|
51
52
|
|
|
53
|
+
## [0.32.30](https://github.com/easyops-cn/next-core/compare/@next-core/editor-bricks-helper@0.32.29...@next-core/editor-bricks-helper@0.32.30) (2021-12-03)
|
|
52
54
|
|
|
55
|
+
**Note:** Version bump only for package @next-core/editor-bricks-helper
|
|
53
56
|
|
|
54
57
|
## [0.32.29](https://github.com/easyops-cn/next-core/compare/@next-core/editor-bricks-helper@0.32.28...@next-core/editor-bricks-helper@0.32.29) (2021-12-01)
|
|
55
58
|
|
|
56
59
|
**Note:** Version bump only for package @next-core/editor-bricks-helper
|
|
57
60
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
61
|
## [0.32.28](https://github.com/easyops-cn/next-core/compare/@next-core/editor-bricks-helper@0.32.27...@next-core/editor-bricks-helper@0.32.28) (2021-11-29)
|
|
63
62
|
|
|
64
63
|
**Note:** Version bump only for package @next-core/editor-bricks-helper
|
|
65
64
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
65
|
## [0.32.27](https://github.com/easyops-cn/next-core/compare/@next-core/editor-bricks-helper@0.32.26...@next-core/editor-bricks-helper@0.32.27) (2021-11-26)
|
|
71
66
|
|
|
72
67
|
**Note:** Version bump only for package @next-core/editor-bricks-helper
|
|
73
68
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
69
|
## [0.32.26](https://github.com/easyops-cn/next-core/compare/@next-core/editor-bricks-helper@0.32.25...@next-core/editor-bricks-helper@0.32.26) (2021-11-25)
|
|
79
70
|
|
|
80
71
|
**Note:** Version bump only for package @next-core/editor-bricks-helper
|
|
81
72
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
73
|
## [0.32.25](https://github.com/easyops-cn/next-core/compare/@next-core/editor-bricks-helper@0.32.24...@next-core/editor-bricks-helper@0.32.25) (2021-11-25)
|
|
87
74
|
|
|
88
75
|
**Note:** Version bump only for package @next-core/editor-bricks-helper
|
|
89
76
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
77
|
## [0.32.24](https://github.com/easyops-cn/next-core/compare/@next-core/editor-bricks-helper@0.32.23...@next-core/editor-bricks-helper@0.32.24) (2021-11-25)
|
|
95
78
|
|
|
96
79
|
**Note:** Version bump only for package @next-core/editor-bricks-helper
|
|
97
80
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
81
|
## [0.32.23](https://github.com/easyops-cn/next-core/compare/@next-core/editor-bricks-helper@0.32.22...@next-core/editor-bricks-helper@0.32.23) (2021-11-25)
|
|
103
82
|
|
|
104
83
|
**Note:** Version bump only for package @next-core/editor-bricks-helper
|
|
105
84
|
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
85
|
## [0.32.22](https://github.com/easyops-cn/next-core/compare/@next-core/editor-bricks-helper@0.32.21...@next-core/editor-bricks-helper@0.32.22) (2021-11-23)
|
|
111
86
|
|
|
112
87
|
**Note:** Version bump only for package @next-core/editor-bricks-helper
|
|
113
88
|
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
89
|
## [0.32.21](https://github.com/easyops-cn/next-core/compare/@next-core/editor-bricks-helper@0.32.20...@next-core/editor-bricks-helper@0.32.21) (2021-11-23)
|
|
119
90
|
|
|
120
91
|
**Note:** Version bump only for package @next-core/editor-bricks-helper
|
|
121
92
|
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
93
|
## [0.32.20](https://github.com/easyops-cn/next-core/compare/@next-core/editor-bricks-helper@0.32.19...@next-core/editor-bricks-helper@0.32.20) (2021-11-23)
|
|
127
94
|
|
|
128
95
|
**Note:** Version bump only for package @next-core/editor-bricks-helper
|
|
129
96
|
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
97
|
## [0.32.19](https://github.com/easyops-cn/next-core/compare/@next-core/editor-bricks-helper@0.32.18...@next-core/editor-bricks-helper@0.32.19) (2021-11-18)
|
|
135
98
|
|
|
136
99
|
**Note:** Version bump only for package @next-core/editor-bricks-helper
|
|
137
100
|
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
101
|
## [0.32.18](https://github.com/easyops-cn/next-core/compare/@next-core/editor-bricks-helper@0.32.17...@next-core/editor-bricks-helper@0.32.18) (2021-11-18)
|
|
143
102
|
|
|
144
103
|
**Note:** Version bump only for package @next-core/editor-bricks-helper
|
|
145
104
|
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
105
|
## [0.32.17](https://github.com/easyops-cn/next-core/compare/@next-core/editor-bricks-helper@0.32.16...@next-core/editor-bricks-helper@0.32.17) (2021-11-12)
|
|
151
106
|
|
|
152
107
|
**Note:** Version bump only for package @next-core/editor-bricks-helper
|
package/dist/index.bundle.js
CHANGED
|
@@ -414,10 +414,11 @@
|
|
|
414
414
|
}
|
|
415
415
|
}
|
|
416
416
|
|
|
417
|
-
var nodeIgnoreFields = ["parent", "children", "graphInfo", "mountPoint"];
|
|
418
|
-
|
|
419
|
-
var _nodeData$alias;
|
|
417
|
+
var nodeIgnoreFields = ["parent", "children", "graphInfo", "mountPoint"]; // Match evaluations and placeholders,
|
|
418
|
+
// E.g.: `<% QUERY.x %>` or `${QUERY.x}`.
|
|
420
419
|
|
|
420
|
+
var computationRegExp = /[<{]/;
|
|
421
|
+
function getBuilderNode(nodeData, nodeUid, isTemplateInternalNode) {
|
|
421
422
|
var matchedSelectors = [];
|
|
422
423
|
|
|
423
424
|
if (nodeData.brick) {
|
|
@@ -427,19 +428,29 @@
|
|
|
427
428
|
var normalized = brickUtils.normalizeBuilderNode(nodeData);
|
|
428
429
|
var jsonFieldsInBrick = ["properties", "events", "lifeCycle"];
|
|
429
430
|
var parsedFields = [];
|
|
431
|
+
var parsedId;
|
|
432
|
+
var parsedTestId;
|
|
430
433
|
|
|
431
434
|
for (var field of jsonFieldsInBrick) {
|
|
432
435
|
var parsed = lodash.cloneDeep(normalized === null || normalized === void 0 ? void 0 : normalized[field]);
|
|
433
436
|
parsedFields.push(["$$parsed".concat(lodash.upperFirst(field)), parsed !== null && parsed !== void 0 ? parsed : {}]);
|
|
434
437
|
|
|
435
|
-
if (field === "properties"
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
438
|
+
if (field === "properties") {
|
|
439
|
+
var _parsed$dataset;
|
|
440
|
+
|
|
441
|
+
var tempParsedId = void 0;
|
|
442
|
+
var tempParsedTestId = void 0;
|
|
443
|
+
|
|
444
|
+
if ((tempParsedId = parsed === null || parsed === void 0 ? void 0 : parsed.id, typeof tempParsedId === "string") && !computationRegExp.test(tempParsedId)) {
|
|
445
|
+
parsedId = tempParsedId;
|
|
446
|
+
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
|
+
}
|
|
439
450
|
}
|
|
440
451
|
}
|
|
441
452
|
|
|
442
|
-
return Object.fromEntries(Object.entries(nodeData).filter(entry => !nodeIgnoreFields.includes(entry[0])).concat([["alias",
|
|
453
|
+
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));
|
|
443
454
|
}
|
|
444
455
|
|
|
445
456
|
function getAppendingNodesAndEdges(nodeData, nodeUid, templateSourceMap) {
|