pds-dev-kit-web-test 2.5.95 → 2.5.96
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.
@@ -54,6 +54,7 @@ exports.S_gleStyles = void 0;
|
|
54
54
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
55
55
|
var publ_echo_test_1 = require("publ-echo-test");
|
56
56
|
var group_1 = require("publ-echo-test/dist/lib/GridLayoutEditor/group");
|
57
|
+
var renderHelpers_1 = require("publ-echo-test/dist/lib/GridLayoutEditor/utils/renderHelpers");
|
57
58
|
var react_1 = __importStar(require("react"));
|
58
59
|
var ErrorBoundary_1 = require("../../../DynamicLayout/components/Section/ErrorBoundary");
|
59
60
|
var dynamicLayoutContext_1 = require("../../../DynamicLayout/dynamicLayoutContext");
|
@@ -198,6 +199,15 @@ var CustomSection = (0, react_1.forwardRef)(function CustomSection(props, ref) {
|
|
198
199
|
var allRootChildIds = (0, group_1.findAllChildrenBlockIds)(pedigreeState, editingGroupBlock);
|
199
200
|
setBulkBlockIds(allRootChildIds);
|
200
201
|
};
|
202
|
+
var getCollisionGroupIds = function (cdId1) {
|
203
|
+
var layoutItem = (0, renderHelpers_1.getLayoutItem)(layouts[layoutByDevice], cdId1.toString());
|
204
|
+
if (!layoutItem) {
|
205
|
+
return [];
|
206
|
+
}
|
207
|
+
var allCollisions = (0, renderHelpers_1.getAllCollisions)(layouts[layoutByDevice], layoutItem);
|
208
|
+
var blockIds = allCollisions.map(function (each) { return (0, group_1.formatCbIdToBlockId)(Number(each.i)); });
|
209
|
+
return blockIds;
|
210
|
+
};
|
201
211
|
var _m = (0, util_1.parseCustomSectionPlacement)({
|
202
212
|
isMobile: isMobile,
|
203
213
|
customSectionProps: CB_PLACEMENT_PROP_SECTION
|
@@ -209,7 +219,7 @@ var CustomSection = (0, react_1.forwardRef)(function CustomSection(props, ref) {
|
|
209
219
|
};
|
210
220
|
var breakpoint = device === 'MOBILE' ? 'sm' : 'lg';
|
211
221
|
var onClickCB = function (id) {
|
212
|
-
var _a, _b;
|
222
|
+
var _a, _b, _c;
|
213
223
|
var blockId = (0, group_1.formatCbIdToBlockId)(id);
|
214
224
|
if (!isEditMode) {
|
215
225
|
return;
|
@@ -245,24 +255,25 @@ var CustomSection = (0, react_1.forwardRef)(function CustomSection(props, ref) {
|
|
245
255
|
return;
|
246
256
|
}
|
247
257
|
if (shortcutKeyMode === 'COLLISION_SELECT') {
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
258
|
+
// const selectedCBId = selectedBlockId ? formatBlockIdToCbId(selectedBlockId) : undefined;
|
259
|
+
var bulks = getCollisionGroupIds(id);
|
260
|
+
if (selectedBlockId) {
|
261
|
+
bulks.push(selectedBlockId);
|
262
|
+
}
|
263
|
+
setBulkBlockIds(bulks);
|
264
|
+
sectionActionHandler &&
|
265
|
+
sectionActionHandler({
|
266
|
+
type: '@CUSTOMSECTION/BLOCK_CLICKED',
|
267
|
+
payload: {
|
268
|
+
block: {
|
269
|
+
type: 'BULK',
|
270
|
+
blockId: 'BULK',
|
271
|
+
childrenBlockIds: bulks,
|
272
|
+
workDir: (_b = (0, group_1.getBlockWorkDirPath)(newblock, blockId)) !== null && _b !== void 0 ? _b : 'NOT-FOUND',
|
273
|
+
childrenCBIds: bulks.map(function (id) { return (0, group_1.formatBlockIdToCbId)(id); })
|
274
|
+
}
|
275
|
+
}
|
276
|
+
});
|
266
277
|
return;
|
267
278
|
}
|
268
279
|
setSelectedBlockId(blockId);
|
@@ -275,7 +286,7 @@ var CustomSection = (0, react_1.forwardRef)(function CustomSection(props, ref) {
|
|
275
286
|
blockId: blockId,
|
276
287
|
type: 'COMPONENT_BLOCK',
|
277
288
|
cbId: id,
|
278
|
-
workDir: (
|
289
|
+
workDir: (_c = (0, group_1.getBlockWorkDirPath)(newblock, blockId)) !== null && _c !== void 0 ? _c : 'NOT-FOUND'
|
279
290
|
}
|
280
291
|
}
|
281
292
|
});
|