pds-dev-kit-web-test 2.5.183 → 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 ((componentBlocks === null || componentBlocks === void 0 ? void 0 : componentBlocks.length) === 1) {
159
- setSelectedBlockId((0, group_1.formatCbIdToBlockId)(componentBlocks[0].id));
160
- return;
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,61 @@ var CustomSection = (0, react_1.forwardRef)(function CustomSection(props, ref) {
265
277
  }
266
278
  }, [selectedBlockId, shortcutKeyMode, sectionActionHandler, setSelectedBlockId]);
267
279
  var makeAllInOneGroup = function () {
280
+ var _a, _b, _c, _d, _e;
268
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
+ }
269
319
  setBulkBlockIds(allRootChildIds);
320
+ sectionActionHandler &&
321
+ sectionActionHandler({
322
+ type: '@CUSTOMSECTION/BLOCK_CLICKED',
323
+ payload: {
324
+ block: {
325
+ type: 'BULK',
326
+ blockId: 'BULK',
327
+ childrenBlockIds: allRootChildIds,
328
+ workDir: (_e = (0, group_1.getBlockWorkDirPath)(newblock, editingGroupBlock)) !== null && _e !== void 0 ? _e : 'NOT-FOUND',
329
+ childrenCBIds: allRootChildIds
330
+ .map(function (id) { return (0, group_1.formatBlockIdToCbId)(id); })
331
+ .filter(function (each) { return each !== null; })
332
+ }
333
+ }
334
+ });
270
335
  };
271
336
  var getCollisionGroupIds = function (cdId1) {
272
337
  var layoutItem = (0, renderHelpers_1.getLayoutItem)(layouts[layoutByDevice], cdId1.toString());
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pds-dev-kit-web-test",
3
- "version": "2.5.183",
3
+ "version": "2.5.185",
4
4
  "license": "MIT",
5
5
  "private": false,
6
6
  "main": "dist/index.js",