pds-dev-kit-web-test 2.5.184 → 2.5.185
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.
@@ -141,7 +141,6 @@ var CustomSection = (0, react_1.forwardRef)(function CustomSection(props, ref) {
|
|
141
141
|
(0, react_1.useEffect)(function () {
|
142
142
|
if (editingSectionId !== props.id) {
|
143
143
|
setSelectedBlockId(null);
|
144
|
-
// breakGroupCB();
|
145
144
|
setBulkBlockIds([]);
|
146
145
|
}
|
147
146
|
}, [editingSectionId]);
|
@@ -155,10 +154,23 @@ var CustomSection = (0, react_1.forwardRef)(function CustomSection(props, ref) {
|
|
155
154
|
return;
|
156
155
|
}
|
157
156
|
if (shortcutKeyMode === 'SELECT_ALL') {
|
158
|
-
if (
|
159
|
-
|
160
|
-
|
161
|
-
|
157
|
+
// if (componentBlocks?.length === 1) {
|
158
|
+
// const blockId = formatCbIdToBlockId(componentBlocks[0].id);
|
159
|
+
// setSelectedBlockId(blockId);
|
160
|
+
// sectionActionHandler &&
|
161
|
+
// sectionActionHandler({
|
162
|
+
// type: '@CUSTOMSECTION/BLOCK_CLICKED',
|
163
|
+
// payload: {
|
164
|
+
// block: {
|
165
|
+
// blockId,
|
166
|
+
// type: '',
|
167
|
+
// cbId: id,
|
168
|
+
// workDir: getBlockWorkDirPath(newblock, editingGroupBlock) ?? 'NOT-FOUND'
|
169
|
+
// }
|
170
|
+
// }
|
171
|
+
// });
|
172
|
+
// return;
|
173
|
+
// }
|
162
174
|
makeAllInOneGroup();
|
163
175
|
return;
|
164
176
|
}
|
@@ -265,8 +277,45 @@ var CustomSection = (0, react_1.forwardRef)(function CustomSection(props, ref) {
|
|
265
277
|
}
|
266
278
|
}, [selectedBlockId, shortcutKeyMode, sectionActionHandler, setSelectedBlockId]);
|
267
279
|
var makeAllInOneGroup = function () {
|
268
|
-
var _a;
|
280
|
+
var _a, _b, _c, _d, _e;
|
269
281
|
var allRootChildIds = (0, group_1.findDirectChildrenBlockIds)(pedigreeState, editingGroupBlock);
|
282
|
+
if (allRootChildIds.length === 1) {
|
283
|
+
var block = (0, group_1.findBlockByBlockId)(newblock, allRootChildIds[0]);
|
284
|
+
if (!block) {
|
285
|
+
return;
|
286
|
+
}
|
287
|
+
if (block.type === 'COMPONENT_BLOCK') {
|
288
|
+
sectionActionHandler &&
|
289
|
+
sectionActionHandler({
|
290
|
+
type: '@CUSTOMSECTION/BLOCK_CLICKED',
|
291
|
+
payload: {
|
292
|
+
block: {
|
293
|
+
blockId: block.blockId,
|
294
|
+
type: block.type,
|
295
|
+
cbId: block.componentBlockId,
|
296
|
+
workDir: (_a = (0, group_1.getBlockWorkDirPath)(newblock, editingGroupBlock)) !== null && _a !== void 0 ? _a : 'NOT-FOUND'
|
297
|
+
}
|
298
|
+
}
|
299
|
+
});
|
300
|
+
return;
|
301
|
+
}
|
302
|
+
if (block.type === 'GROUP_BLOCK') {
|
303
|
+
sectionActionHandler &&
|
304
|
+
sectionActionHandler({
|
305
|
+
type: '@CUSTOMSECTION/BLOCK_CLICKED',
|
306
|
+
payload: {
|
307
|
+
block: {
|
308
|
+
blockId: block.blockId,
|
309
|
+
type: 'GROUP_BLOCK',
|
310
|
+
workDir: (_b = (0, group_1.getBlockWorkDirPath)(newblock, editingGroupBlock)) !== null && _b !== void 0 ? _b : 'NOT-FOUND',
|
311
|
+
childrenBlockIds: (_c = (0, group_1.findDirectChildrenBlockIds)(newblock, block.blockId)) !== null && _c !== void 0 ? _c : [],
|
312
|
+
childrenCBIds: (_d = (0, group_1.findDirectChildrenCbIds)(newblock, block.blockId)) !== null && _d !== void 0 ? _d : []
|
313
|
+
}
|
314
|
+
}
|
315
|
+
});
|
316
|
+
}
|
317
|
+
return;
|
318
|
+
}
|
270
319
|
setBulkBlockIds(allRootChildIds);
|
271
320
|
sectionActionHandler &&
|
272
321
|
sectionActionHandler({
|
@@ -276,7 +325,7 @@ var CustomSection = (0, react_1.forwardRef)(function CustomSection(props, ref) {
|
|
276
325
|
type: 'BULK',
|
277
326
|
blockId: 'BULK',
|
278
327
|
childrenBlockIds: allRootChildIds,
|
279
|
-
workDir: (
|
328
|
+
workDir: (_e = (0, group_1.getBlockWorkDirPath)(newblock, editingGroupBlock)) !== null && _e !== void 0 ? _e : 'NOT-FOUND',
|
280
329
|
childrenCBIds: allRootChildIds
|
281
330
|
.map(function (id) { return (0, group_1.formatBlockIdToCbId)(id); })
|
282
331
|
.filter(function (each) { return each !== null; })
|