@next-core/editor-bricks-helper 0.32.17 → 0.32.21

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,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.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)
6
+ ## [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)
7
7
 
8
8
  **Note:** Version bump only for package @next-core/editor-bricks-helper
9
9
 
@@ -11,7 +11,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
11
11
 
12
12
 
13
13
 
14
- ## [0.32.16](https://github.com/easyops-cn/next-core/compare/@next-core/editor-bricks-helper@0.32.15...@next-core/editor-bricks-helper@0.32.16) (2021-11-12)
14
+ ## [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)
15
15
 
16
16
  **Note:** Version bump only for package @next-core/editor-bricks-helper
17
17
 
@@ -19,7 +19,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
19
19
 
20
20
 
21
21
 
22
- ## [0.32.15](https://github.com/easyops-cn/next-core/compare/@next-core/editor-bricks-helper@0.32.14...@next-core/editor-bricks-helper@0.32.15) (2021-11-11)
22
+ ## [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)
23
23
 
24
24
  **Note:** Version bump only for package @next-core/editor-bricks-helper
25
25
 
@@ -27,7 +27,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
27
27
 
28
28
 
29
29
 
30
- ## [0.32.14](https://github.com/easyops-cn/next-core/compare/@next-core/editor-bricks-helper@0.32.13...@next-core/editor-bricks-helper@0.32.14) (2021-11-10)
30
+ ## [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)
31
31
 
32
32
  **Note:** Version bump only for package @next-core/editor-bricks-helper
33
33
 
@@ -35,203 +35,124 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
35
35
 
36
36
 
37
37
 
38
- ## [0.32.13](https://github.com/easyops-cn/next-core/compare/@next-core/editor-bricks-helper@0.32.12...@next-core/editor-bricks-helper@0.32.13) (2021-11-09)
38
+ ## [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)
39
39
 
40
40
  **Note:** Version bump only for package @next-core/editor-bricks-helper
41
41
 
42
+ ## [0.32.16](https://github.com/easyops-cn/next-core/compare/@next-core/editor-bricks-helper@0.32.15...@next-core/editor-bricks-helper@0.32.16) (2021-11-12)
42
43
 
44
+ **Note:** Version bump only for package @next-core/editor-bricks-helper
43
45
 
46
+ ## [0.32.15](https://github.com/easyops-cn/next-core/compare/@next-core/editor-bricks-helper@0.32.14...@next-core/editor-bricks-helper@0.32.15) (2021-11-11)
44
47
 
48
+ **Note:** Version bump only for package @next-core/editor-bricks-helper
45
49
 
46
- ## [0.32.12](https://github.com/easyops-cn/next-core/compare/@next-core/editor-bricks-helper@0.32.11...@next-core/editor-bricks-helper@0.32.12) (2021-11-08)
50
+ ## [0.32.14](https://github.com/easyops-cn/next-core/compare/@next-core/editor-bricks-helper@0.32.13...@next-core/editor-bricks-helper@0.32.14) (2021-11-10)
47
51
 
48
52
  **Note:** Version bump only for package @next-core/editor-bricks-helper
49
53
 
54
+ ## [0.32.13](https://github.com/easyops-cn/next-core/compare/@next-core/editor-bricks-helper@0.32.12...@next-core/editor-bricks-helper@0.32.13) (2021-11-09)
50
55
 
56
+ **Note:** Version bump only for package @next-core/editor-bricks-helper
51
57
 
58
+ ## [0.32.12](https://github.com/easyops-cn/next-core/compare/@next-core/editor-bricks-helper@0.32.11...@next-core/editor-bricks-helper@0.32.12) (2021-11-08)
52
59
 
60
+ **Note:** Version bump only for package @next-core/editor-bricks-helper
53
61
 
54
62
  ## [0.32.11](https://github.com/easyops-cn/next-core/compare/@next-core/editor-bricks-helper@0.32.10...@next-core/editor-bricks-helper@0.32.11) (2021-11-08)
55
63
 
56
64
  **Note:** Version bump only for package @next-core/editor-bricks-helper
57
65
 
58
-
59
-
60
-
61
-
62
66
  ## [0.32.10](https://github.com/easyops-cn/next-core/compare/@next-core/editor-bricks-helper@0.32.9...@next-core/editor-bricks-helper@0.32.10) (2021-11-08)
63
67
 
64
68
  **Note:** Version bump only for package @next-core/editor-bricks-helper
65
69
 
66
-
67
-
68
-
69
-
70
70
  ## [0.32.9](https://github.com/easyops-cn/next-core/compare/@next-core/editor-bricks-helper@0.32.8...@next-core/editor-bricks-helper@0.32.9) (2021-11-04)
71
71
 
72
72
  **Note:** Version bump only for package @next-core/editor-bricks-helper
73
73
 
74
-
75
-
76
-
77
-
78
74
  ## [0.32.8](https://github.com/easyops-cn/next-core/compare/@next-core/editor-bricks-helper@0.32.7...@next-core/editor-bricks-helper@0.32.8) (2021-11-04)
79
75
 
80
76
  **Note:** Version bump only for package @next-core/editor-bricks-helper
81
77
 
82
-
83
-
84
-
85
-
86
78
  ## [0.32.7](https://github.com/easyops-cn/next-core/compare/@next-core/editor-bricks-helper@0.32.6...@next-core/editor-bricks-helper@0.32.7) (2021-11-02)
87
79
 
88
80
  **Note:** Version bump only for package @next-core/editor-bricks-helper
89
81
 
90
-
91
-
92
-
93
-
94
82
  ## [0.32.6](https://github.com/easyops-cn/next-core/compare/@next-core/editor-bricks-helper@0.32.5...@next-core/editor-bricks-helper@0.32.6) (2021-11-01)
95
83
 
96
84
  **Note:** Version bump only for package @next-core/editor-bricks-helper
97
85
 
98
-
99
-
100
-
101
-
102
86
  ## [0.32.5](https://github.com/easyops-cn/next-core/compare/@next-core/editor-bricks-helper@0.32.4...@next-core/editor-bricks-helper@0.32.5) (2021-11-01)
103
87
 
104
88
  **Note:** Version bump only for package @next-core/editor-bricks-helper
105
89
 
106
-
107
-
108
-
109
-
110
90
  ## [0.32.4](https://github.com/easyops-cn/next-core/compare/@next-core/editor-bricks-helper@0.32.3...@next-core/editor-bricks-helper@0.32.4) (2021-10-29)
111
91
 
112
92
  **Note:** Version bump only for package @next-core/editor-bricks-helper
113
93
 
114
-
115
-
116
-
117
-
118
94
  ## [0.32.3](https://github.com/easyops-cn/next-core/compare/@next-core/editor-bricks-helper@0.32.2...@next-core/editor-bricks-helper@0.32.3) (2021-10-29)
119
95
 
120
96
  **Note:** Version bump only for package @next-core/editor-bricks-helper
121
97
 
122
-
123
-
124
-
125
-
126
98
  ## [0.32.2](https://github.com/easyops-cn/next-core/compare/@next-core/editor-bricks-helper@0.32.1...@next-core/editor-bricks-helper@0.32.2) (2021-10-28)
127
99
 
128
100
  **Note:** Version bump only for package @next-core/editor-bricks-helper
129
101
 
130
-
131
-
132
-
133
-
134
102
  ## [0.32.1](https://github.com/easyops-cn/next-core/compare/@next-core/editor-bricks-helper@0.32.0...@next-core/editor-bricks-helper@0.32.1) (2021-10-28)
135
103
 
136
104
  **Note:** Version bump only for package @next-core/editor-bricks-helper
137
105
 
138
-
139
-
140
-
141
-
142
106
  # [0.32.0](https://github.com/easyops-cn/next-core/compare/@next-core/editor-bricks-helper@0.31.7...@next-core/editor-bricks-helper@0.32.0) (2021-10-28)
143
107
 
144
-
145
108
  ### Features
146
109
 
147
- * **buildDataManage:** add the updateBrick function to update the widget ([a5929b4](https://github.com/easyops-cn/next-core/commit/a5929b4dee4148d95c6e37b4fe6eb2b4ee9f8570))
148
- * **buildDataManage:** update api.md ([93dbfe3](https://github.com/easyops-cn/next-core/commit/93dbfe3c22175c3242bc05a6fce1c02356633669))
149
- * **buildDataManage:** update unit test ([4a6f6f4](https://github.com/easyops-cn/next-core/commit/4a6f6f469c29977ed4741d7fe19f8fbad088116e))
150
-
151
-
152
-
153
-
110
+ - **buildDataManage:** add the updateBrick function to update the widget ([a5929b4](https://github.com/easyops-cn/next-core/commit/a5929b4dee4148d95c6e37b4fe6eb2b4ee9f8570))
111
+ - **buildDataManage:** update api.md ([93dbfe3](https://github.com/easyops-cn/next-core/commit/93dbfe3c22175c3242bc05a6fce1c02356633669))
112
+ - **buildDataManage:** update unit test ([4a6f6f4](https://github.com/easyops-cn/next-core/commit/4a6f6f469c29977ed4741d7fe19f8fbad088116e))
154
113
 
155
114
  ## [0.31.7](https://github.com/easyops-cn/next-core/compare/@next-core/editor-bricks-helper@0.31.6...@next-core/editor-bricks-helper@0.31.7) (2021-10-27)
156
115
 
157
116
  **Note:** Version bump only for package @next-core/editor-bricks-helper
158
117
 
159
-
160
-
161
-
162
-
163
118
  ## [0.31.6](https://github.com/easyops-cn/next-core/compare/@next-core/editor-bricks-helper@0.31.5...@next-core/editor-bricks-helper@0.31.6) (2021-10-27)
164
119
 
165
120
  **Note:** Version bump only for package @next-core/editor-bricks-helper
166
121
 
167
-
168
-
169
-
170
-
171
122
  ## [0.31.5](https://github.com/easyops-cn/next-core/compare/@next-core/editor-bricks-helper@0.31.4...@next-core/editor-bricks-helper@0.31.5) (2021-10-22)
172
123
 
173
-
174
124
  ### Bug Fixes
175
125
 
176
- * dispose specific null fields ([0f50281](https://github.com/easyops-cn/next-core/commit/0f502815abf47faf4156bfbf91029125bbda01a4))
177
-
178
-
179
-
180
-
126
+ - dispose specific null fields ([0f50281](https://github.com/easyops-cn/next-core/commit/0f502815abf47faf4156bfbf91029125bbda01a4))
181
127
 
182
128
  ## [0.31.4](https://github.com/easyops-cn/next-core/compare/@next-core/editor-bricks-helper@0.31.3...@next-core/editor-bricks-helper@0.31.4) (2021-10-21)
183
129
 
184
130
  **Note:** Version bump only for package @next-core/editor-bricks-helper
185
131
 
186
-
187
-
188
-
189
-
190
132
  ## [0.31.3](https://github.com/easyops-cn/next-core/compare/@next-core/editor-bricks-helper@0.31.2...@next-core/editor-bricks-helper@0.31.3) (2021-10-20)
191
133
 
192
134
  **Note:** Version bump only for package @next-core/editor-bricks-helper
193
135
 
194
-
195
-
196
-
197
-
198
136
  ## [0.31.2](https://github.com/easyops-cn/next-core/compare/@next-core/editor-bricks-helper@0.31.1...@next-core/editor-bricks-helper@0.31.2) (2021-10-20)
199
137
 
200
138
  **Note:** Version bump only for package @next-core/editor-bricks-helper
201
139
 
202
-
203
-
204
-
205
-
206
140
  ## [0.31.1](https://github.com/easyops-cn/next-core/compare/@next-core/editor-bricks-helper@0.31.0...@next-core/editor-bricks-helper@0.31.1) (2021-10-15)
207
141
 
208
142
  **Note:** Version bump only for package @next-core/editor-bricks-helper
209
143
 
210
-
211
-
212
-
213
-
214
144
  # [0.31.0](https://github.com/easyops-cn/next-core/compare/@next-core/editor-bricks-helper@0.30.54...@next-core/editor-bricks-helper@0.31.0) (2021-10-13)
215
145
 
216
-
217
146
  ### Features
218
147
 
219
- * update getAppendingNodesAndEdges unit test ([b464000](https://github.com/easyops-cn/next-core/commit/b464000ef2ceca1bc821c9d483c0b76ff828e401))
220
- * update getAppendingNodesAndEdges unit test ([32fd0fb](https://github.com/easyops-cn/next-core/commit/32fd0fbb7c972d9978cd29ce52684ca4c5af1d1e))
221
- * update useBrick if condition, and support widget to expand ([df4b47a](https://github.com/easyops-cn/next-core/commit/df4b47ad3337c7723d50ee81e7bb1b86076bc5b2))
222
-
223
-
224
-
225
-
148
+ - update getAppendingNodesAndEdges unit test ([b464000](https://github.com/easyops-cn/next-core/commit/b464000ef2ceca1bc821c9d483c0b76ff828e401))
149
+ - update getAppendingNodesAndEdges unit test ([32fd0fb](https://github.com/easyops-cn/next-core/commit/32fd0fbb7c972d9978cd29ce52684ca4c5af1d1e))
150
+ - update useBrick if condition, and support widget to expand ([df4b47a](https://github.com/easyops-cn/next-core/commit/df4b47ad3337c7723d50ee81e7bb1b86076bc5b2))
226
151
 
227
152
  ## [0.30.54](https://github.com/easyops-cn/next-core/compare/@next-core/editor-bricks-helper@0.30.53...@next-core/editor-bricks-helper@0.30.54) (2021-10-12)
228
153
 
229
154
  **Note:** Version bump only for package @next-core/editor-bricks-helper
230
155
 
231
-
232
-
233
-
234
-
235
156
  ## [0.30.53](https://github.com/easyops-cn/next-core/compare/@next-core/editor-bricks-helper@0.30.52...@next-core/editor-bricks-helper@0.30.53) (2021-10-11)
236
157
 
237
158
  **Note:** Version bump only for package @next-core/editor-bricks-helper
@@ -182,12 +182,13 @@
182
182
  return uniqueIdCursor += 1;
183
183
  }
184
184
 
185
- function expandTemplateEdges({
186
- nodes,
187
- // Here expanded edges should be excluded.
188
- edges,
189
- rootId
190
- }) {
185
+ function expandTemplateEdges(_ref) {
186
+ var {
187
+ nodes,
188
+ // Here expanded edges should be excluded.
189
+ edges,
190
+ rootId
191
+ } = _ref;
191
192
  var newEdges = edges.slice();
192
193
  var reorderedEdgesMap = new WeakMap();
193
194
 
@@ -265,14 +266,16 @@
265
266
  return edges;
266
267
  }
267
268
 
268
- function reorderBuilderEdges({
269
- rootId,
270
- nodes,
271
- edges
272
- }, {
273
- parentUid,
274
- nodeUids
275
- }) {
269
+ function reorderBuilderEdges(_ref, _ref2) {
270
+ var {
271
+ rootId,
272
+ nodes,
273
+ edges
274
+ } = _ref;
275
+ var {
276
+ parentUid,
277
+ nodeUids
278
+ } = _ref2;
276
279
  // When we do edge-reordering, we simply remove existed
277
280
  // expanded edges and re-expand them.
278
281
  var edgesExcludeExpanded = edges.filter(edge => !edge.$$isTemplateExpanded);
@@ -289,11 +292,12 @@
289
292
  });
290
293
  }
291
294
 
292
- function deleteNodeFromTree(nodeUid, {
293
- rootId,
294
- nodes,
295
- edges
296
- }) {
295
+ function deleteNodeFromTree(nodeUid, _ref) {
296
+ var {
297
+ rootId,
298
+ nodes,
299
+ edges
300
+ } = _ref;
297
301
  var idsToDelete = new Set();
298
302
  collectIdsToDelete(nodeUid, edges, idsToDelete);
299
303
  return {
@@ -350,7 +354,9 @@
350
354
  }
351
355
 
352
356
  if (!lodash.isEmpty(node.$$parsedLifeCycle)) {
353
- handlers = handlers.concat(Object.entries(node.$$parsedLifeCycle).flatMap(([lifeCycleName, lifeCycleConf]) => {
357
+ handlers = handlers.concat(Object.entries(node.$$parsedLifeCycle).flatMap(_ref => {
358
+ var [lifeCycleName, lifeCycleConf] = _ref;
359
+
354
360
  switch (lifeCycleName) {
355
361
  case "onBeforePageLoad":
356
362
  case "onPageLoad":
@@ -436,7 +442,8 @@
436
442
  return Object.fromEntries(Object.entries(nodeData).filter(entry => !nodeIgnoreFields.includes(entry[0])).concat([["alias", (_nodeData$alias = nodeData.alias) !== null && _nodeData$alias !== void 0 ? _nodeData$alias : brickUtils.isBrickNode(nodeData) ? nodeData.brick.split(".").pop() : undefined], ["$$uid", nodeUid], ["$$matchedSelectors", matchedSelectors], ["$$isTemplateInternalNode", isTemplateInternalNode], ["$$normalized", normalized]]).concat(parsedFields));
437
443
  }
438
444
 
439
- function getAppendingNodesAndEdges(nodeData, nodeUid, templateSourceMap, storyList = []) {
445
+ function getAppendingNodesAndEdges(nodeData, nodeUid, templateSourceMap) {
446
+ var storyList = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : [];
440
447
  var nodes = [];
441
448
  var edges = [];
442
449
 
@@ -835,12 +842,13 @@
835
842
  var newNodes = nodes.slice();
836
843
  var newEdges = edges.slice();
837
844
 
838
- var walk = ({
839
- parentUid,
840
- nodeUid,
841
- nodeData,
842
- children
843
- }) => {
845
+ var walk = _ref => {
846
+ var {
847
+ parentUid,
848
+ nodeUid,
849
+ nodeData,
850
+ children
851
+ } = _ref;
844
852
  var {
845
853
  nodes: appendingNodes,
846
854
  edges: appendingEdges
@@ -1161,10 +1169,11 @@
1161
1169
  return data;
1162
1170
  }
1163
1171
 
1164
- function useBuilderNode({
1165
- nodeUid,
1166
- isRoot
1167
- }) {
1172
+ function useBuilderNode(_ref) {
1173
+ var {
1174
+ nodeUid,
1175
+ isRoot
1176
+ } = _ref;
1168
1177
  var {
1169
1178
  rootId,
1170
1179
  nodes
@@ -1272,16 +1281,17 @@
1272
1281
  return droppingStatus;
1273
1282
  }
1274
1283
 
1275
- function EditorContainer({
1276
- nodeUid,
1277
- type,
1278
- isTransparentContainer,
1279
- editorContainerStyle,
1280
- editorBodyStyle,
1281
- children
1282
- }) {
1284
+ function EditorContainer(_ref) {
1283
1285
  var _droppingStatus$get$v, _droppingStatus$get;
1284
1286
 
1287
+ var {
1288
+ nodeUid,
1289
+ type,
1290
+ isTransparentContainer,
1291
+ editorContainerStyle,
1292
+ editorBodyStyle,
1293
+ children
1294
+ } = _ref;
1285
1295
  var editorContainerRef = React.useRef();
1286
1296
  var highlightNodes = useHighlightNodes();
1287
1297
  var node = useBuilderNode({
@@ -1483,10 +1493,11 @@
1483
1493
  var styles$2 = {"slotContentLayoutBlock":"EditorBrickAsComponent--slotContentLayoutBlock--1aed4lu","selfLayoutBlock":"EditorBrickAsComponent--selfLayoutBlock--1aed4lu","selfLayoutContainer":"EditorBrickAsComponent--selfLayoutContainer--1aed4lu","slotContentLayoutInline":"EditorBrickAsComponent--slotContentLayoutInline--1aed4lu","selfLayoutInline":"EditorBrickAsComponent--selfLayoutInline--1aed4lu","dragging":"EditorBrickAsComponent--dragging--1aed4lu","baseView":"EditorBrickAsComponent--baseView--1aed4lu"};
1484
1494
  styleInject(css_248z$2);
1485
1495
 
1486
- function EditorBrickAsComponent({
1487
- node,
1488
- slotContentLayout
1489
- }) {
1496
+ function EditorBrickAsComponent(_ref) {
1497
+ var {
1498
+ node,
1499
+ slotContentLayout
1500
+ } = _ref;
1490
1501
  var [initialized, setInitialized] = React__default["default"].useState(false);
1491
1502
  var [editorBrick, setEditorBrick] = React__default["default"].useState();
1492
1503
  var [loadEditorError, setLoadEditorError] = React__default["default"].useState();
@@ -1576,11 +1587,12 @@
1576
1587
  }))) : /*#__PURE__*/React__default["default"].createElement("span", null, loadEditorError) : /*#__PURE__*/React__default["default"].createElement("span", null, "Loading...");
1577
1588
  }
1578
1589
 
1579
- function useBuilderGroupedChildNodes({
1580
- nodeUid,
1581
- isRoot,
1582
- doNotExpandTemplates
1583
- }) {
1590
+ function useBuilderGroupedChildNodes(_ref) {
1591
+ var {
1592
+ nodeUid,
1593
+ isRoot,
1594
+ doNotExpandTemplates
1595
+ } = _ref;
1584
1596
  var {
1585
1597
  rootId,
1586
1598
  nodes,
@@ -1593,12 +1605,13 @@
1593
1605
  doNotExpandTemplates
1594
1606
  }), [doNotExpandTemplates, edges, isRoot, nodeUid, nodes, rootId]);
1595
1607
  }
1596
- function getBuilderGroupedChildNodes({
1597
- nodeUid,
1598
- nodes,
1599
- edges,
1600
- doNotExpandTemplates
1601
- }) {
1608
+ function getBuilderGroupedChildNodes(_ref2) {
1609
+ var {
1610
+ nodeUid,
1611
+ nodes,
1612
+ edges,
1613
+ doNotExpandTemplates
1614
+ } = _ref2;
1602
1615
  var groups = new Map();
1603
1616
  var relatedEdges = lodash.sortBy(edges.filter(edge => edge.parent === nodeUid && (doNotExpandTemplates ? !edge.$$isTemplateInternal : !edge.$$isTemplateDelegated)), [edge => edge.sort]);
1604
1617
 
@@ -1616,10 +1629,13 @@
1616
1629
  _loop(edge);
1617
1630
  }
1618
1631
 
1619
- return Array.from(groups.entries()).map(([mountPoint, childNodes]) => ({
1620
- mountPoint,
1621
- childNodes
1622
- }));
1632
+ return Array.from(groups.entries()).map(_ref3 => {
1633
+ var [mountPoint, childNodes] = _ref3;
1634
+ return {
1635
+ mountPoint,
1636
+ childNodes
1637
+ };
1638
+ });
1623
1639
  }
1624
1640
 
1625
1641
  /**
@@ -1914,18 +1930,22 @@
1914
1930
  // The reverse operation of *normalize*.
1915
1931
  // https://github.com/easyops-cn/next-basics/blob/5a6710d567821bcb4a0c71e22d55212193d8b0cb/bricks/next-builder/src/shared/storyboard/buildStoryboard.ts#L394
1916
1932
  function reverseNormalize(brickConf, ctx) {
1917
- return Object.fromEntries(Object.entries(brickConf).map(([key, value]) => value === undefined || ignoredFieldsInBrick.includes(key) ? undefined : jsonFieldsInBrick.includes(key) ? [key, JSON.stringify(value)] : yamlFieldsInBrick.includes(key) ? [key, yaml__default["default"].safeDump(value)] : [key, value]).filter(Boolean).concat(Object.entries(ctx.nodeData), [["brick", ctx.nodeData.type === "template" ? brickConf.template : brickConf.brick], ["portal", ctx.isPortalCanvas || brickConf.portal]]));
1933
+ return Object.fromEntries(Object.entries(brickConf).map(_ref => {
1934
+ var [key, value] = _ref;
1935
+ return value === undefined || ignoredFieldsInBrick.includes(key) ? undefined : jsonFieldsInBrick.includes(key) ? [key, JSON.stringify(value)] : yamlFieldsInBrick.includes(key) ? [key, yaml__default["default"].safeDump(value)] : [key, value];
1936
+ }).filter(Boolean).concat(Object.entries(ctx.nodeData), [["brick", ctx.nodeData.type === "template" ? brickConf.template : brickConf.brick], ["portal", ctx.isPortalCanvas || brickConf.portal]]));
1918
1937
  }
1919
1938
 
1920
- function getSnippetNodeDetail({
1921
- parent,
1922
- parentUid,
1923
- mountPoint,
1924
- nodeUid,
1925
- brickConf,
1926
- isPortalCanvas,
1927
- sort
1928
- }) {
1939
+ function getSnippetNodeDetail(_ref) {
1940
+ var {
1941
+ parent,
1942
+ parentUid,
1943
+ mountPoint,
1944
+ nodeUid,
1945
+ brickConf,
1946
+ isPortalCanvas,
1947
+ sort
1948
+ } = _ref;
1929
1949
  var type = brickConf.template ? "template" : brickConf.bg ? "provider" : "brick";
1930
1950
  return {
1931
1951
  nodeUid,
@@ -1939,34 +1959,42 @@
1939
1959
  sort
1940
1960
  }
1941
1961
  }),
1942
- children: brickConf.slots ? Object.entries(brickConf.slots).flatMap(([mountPoint, slotConf]) => slotConf.bricks.map(childBrickConf => ({
1943
- childBrickConf,
1944
- mountPoint
1945
- }))).map(({
1946
- childBrickConf,
1947
- mountPoint
1948
- }, index) => getSnippetNodeDetail({
1949
- parentUid: nodeUid,
1950
- mountPoint,
1951
- nodeUid: getUniqueNodeId(),
1952
- brickConf: childBrickConf,
1953
- sort: index
1954
- })) : []
1962
+ children: brickConf.slots ? Object.entries(brickConf.slots).flatMap(_ref2 => {
1963
+ var [mountPoint, slotConf] = _ref2;
1964
+ return slotConf.bricks.map(childBrickConf => ({
1965
+ childBrickConf,
1966
+ mountPoint
1967
+ }));
1968
+ }).map((_ref3, index) => {
1969
+ var {
1970
+ childBrickConf,
1971
+ mountPoint
1972
+ } = _ref3;
1973
+ return getSnippetNodeDetail({
1974
+ parentUid: nodeUid,
1975
+ mountPoint,
1976
+ nodeUid: getUniqueNodeId(),
1977
+ brickConf: childBrickConf,
1978
+ sort: index
1979
+ });
1980
+ }) : []
1955
1981
  };
1956
1982
  }
1957
1983
 
1958
- function processDrop({
1959
- manager,
1960
- type,
1961
- data,
1962
- droppingIndex,
1963
- droppingParentUid,
1964
- droppingParentInstanceId,
1965
- droppingMountPoint,
1966
- droppingChildNodes,
1967
- droppingSiblingGroups,
1968
- isPortalCanvas
1969
- }) {
1984
+ function processDrop(_ref) {
1985
+ var {
1986
+ manager,
1987
+ type,
1988
+ data,
1989
+ droppingIndex,
1990
+ droppingParentUid,
1991
+ droppingParentInstanceId,
1992
+ droppingMountPoint,
1993
+ droppingChildNodes,
1994
+ droppingSiblingGroups,
1995
+ isPortalCanvas
1996
+ } = _ref;
1997
+
1970
1998
  if (type === exports.BuilderDataTransferType.NODE_TO_ADD) {
1971
1999
  // Drag a new node into canvas.
1972
2000
  var {
@@ -2080,21 +2108,22 @@
2080
2108
  styleInject(css_248z$1);
2081
2109
 
2082
2110
  var _excluded = ["type"];
2083
- function DropZone({
2084
- nodeUid,
2085
- isRoot,
2086
- separateCanvas,
2087
- isPortalCanvas,
2088
- independentPortalCanvas,
2089
- canvasIndex,
2090
- mountPoint,
2091
- fullscreen,
2092
- delegatedContext,
2093
- dropZoneStyle,
2094
- dropZoneBodyStyle,
2095
- slotContentLayout,
2096
- showOutlineIfEmpty
2097
- }) {
2111
+ function DropZone(_ref) {
2112
+ var {
2113
+ nodeUid,
2114
+ isRoot,
2115
+ separateCanvas,
2116
+ isPortalCanvas,
2117
+ independentPortalCanvas,
2118
+ canvasIndex,
2119
+ mountPoint,
2120
+ fullscreen,
2121
+ delegatedContext,
2122
+ dropZoneStyle,
2123
+ dropZoneBodyStyle,
2124
+ slotContentLayout,
2125
+ showOutlineIfEmpty
2126
+ } = _ref;
2098
2127
  var dropZoneBody = React__default["default"].useRef();
2099
2128
  var [dropPositionCursor, setDropPositionCursor] = React__default["default"].useState(null);
2100
2129
  var dropPositionCursorRef = React__default["default"].useRef();
@@ -2269,17 +2298,18 @@
2269
2298
  styleInject(css_248z);
2270
2299
 
2271
2300
  /* istanbul-ignore-file */
2272
- function SlotContainer({
2273
- nodeUid,
2274
- slotName,
2275
- slotContainerStyle,
2276
- dropZoneStyle,
2277
- dropZoneBodyStyle,
2278
- slotContentLayout,
2279
- showOutlineIfEmpty
2280
- }) {
2301
+ function SlotContainer(_ref) {
2281
2302
  var _droppingStatus$get;
2282
2303
 
2304
+ var {
2305
+ nodeUid,
2306
+ slotName,
2307
+ slotContainerStyle,
2308
+ dropZoneStyle,
2309
+ dropZoneBodyStyle,
2310
+ slotContentLayout,
2311
+ showOutlineIfEmpty
2312
+ } = _ref;
2283
2313
  var node = useBuilderNode({
2284
2314
  nodeUid
2285
2315
  });
@@ -2325,9 +2355,10 @@
2325
2355
 
2326
2356
  var refCount = 0;
2327
2357
 
2328
- function LegacyBuilderProvider({
2329
- children
2330
- }) {
2358
+ function LegacyBuilderProvider(_ref) {
2359
+ var {
2360
+ children
2361
+ } = _ref;
2331
2362
  var context = createSingletonBuilderContext();
2332
2363
  /**
2333
2364
  * If the global context was used to store the DND context
@@ -2353,8 +2384,8 @@
2353
2384
  function EditorElementFactory(EditorComponent, options) {
2354
2385
  var NewEditorElement = _decorate__default["default"](null, function (_initialize, _UpdatingElement) {
2355
2386
  class NewEditorElement extends _UpdatingElement {
2356
- constructor(...args) {
2357
- super(...args);
2387
+ constructor() {
2388
+ super(...arguments);
2358
2389
 
2359
2390
  _initialize(this);
2360
2391
  }
@@ -2434,11 +2465,12 @@
2434
2465
  /** @deprecated no more usage but for compatibility only. */
2435
2466
  var DroppingStatusContext = /*#__PURE__*/React.createContext({});
2436
2467
 
2437
- function useBuilderNodeMountPoints({
2438
- nodeUid,
2439
- isRoot,
2440
- doNotExpandTemplates
2441
- }) {
2468
+ function useBuilderNodeMountPoints(_ref) {
2469
+ var {
2470
+ nodeUid,
2471
+ isRoot,
2472
+ doNotExpandTemplates
2473
+ } = _ref;
2442
2474
  var {
2443
2475
  rootId,
2444
2476
  edges