publ-echo-test 0.0.82 → 0.0.84

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.
@@ -37,7 +37,7 @@ import { bottom, cloneLayoutItem, compact, getAllCollisions, getBoundingArea, ge
37
37
  import { calcGridColWidth, calcXY, resolveRowHeight, } from "../GridItem/utils/calculateUtils";
38
38
  import GridItem from "../GridItem/GridItem";
39
39
  import isEqual from "../../external-lib/lodash.isEqual";
40
- import { findAllChildrenComponentIds, findChildrenComponentIds, findGroupBlocks, getBlockSpecificType, zIndexMap } from "./group";
40
+ import { findAllChildrenComponentIds, findChildrenComponentIds, findGroupBlocks, getBlockIdByComponentId, getBlockSpecificType, zIndexMap } from "./group";
41
41
  import GroupItem from "../GridItem/GroupItem";
42
42
  import OutsideClickHandler from "../GridItem/OutsideClickHandler";
43
43
  var layoutClassName = "react-grid-layout";
@@ -493,7 +493,7 @@ var ReactGridLayout = function (_a) {
493
493
  var bounded = draggable && isBounded && l.isBounded !== false;
494
494
  var editable = editableItems.includes(l.i);
495
495
  var z = l.z || 0;
496
- var isInBulk = bulkIds === null || bulkIds === void 0 ? void 0 : bulkIds.includes(l.i);
496
+ var isInBulk = blockStructure && (bulkIds === null || bulkIds === void 0 ? void 0 : bulkIds.includes(getBlockIdByComponentId(blockStructure, Number(l.i))));
497
497
  var isRoot = editingGroupBlock === 'ROOT';
498
498
  var baseZ = function () {
499
499
  if (isInBulk) {
@@ -51,4 +51,5 @@ export declare const findParentGroupByGroupId: (blockStructure: Block[], targetI
51
51
  export declare const addBlockToRoot: (blockStructure: Block[], newBlock: Block) => Block[];
52
52
  export declare const addBulkToTarget: (blockStructure: Block[], targetId: string, bulkIds: string[]) => Block[];
53
53
  export declare const getBlockWorkDirPath: (blockStructure: Block[], blockId: string) => string | null;
54
+ export declare const getBlockIdByComponentId: (blockStructure: Block[], componentId: number) => string | null;
54
55
  export declare const blockStructure: Block[];
@@ -247,6 +247,24 @@ export var getBlockWorkDirPath = function (blockStructure, blockId) {
247
247
  var path = findPath(blockStructure, blockId, ['']);
248
248
  return path ? path.join('/') : null;
249
249
  };
250
+ export var getBlockIdByComponentId = function (blockStructure, componentId) {
251
+ var findBlock = function (blocks) {
252
+ for (var _i = 0, blocks_6 = blocks; _i < blocks_6.length; _i++) {
253
+ var block = blocks_6[_i];
254
+ if (block.type === 'COMPONENT_BLOCK' && block.componentBlockId === componentId) {
255
+ return block.blockId;
256
+ }
257
+ if ('children' in block && block.children) {
258
+ var result = findBlock(block.children);
259
+ if (result) {
260
+ return result;
261
+ }
262
+ }
263
+ }
264
+ return null;
265
+ };
266
+ return findBlock(blockStructure);
267
+ };
250
268
  export var blockStructure = [
251
269
  {
252
270
  blockId: 'ROOT',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "publ-echo-test",
3
- "version": "0.0.82",
3
+ "version": "0.0.84",
4
4
  "private": false,
5
5
  "main": "dist/lib/index.js",
6
6
  "types": "dist/lib/index.d.js",