publ-echo-test 0.0.116 → 0.0.117

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 { findAllChildrenCbIds, findDirectChildrenBlockIds, findGroupBlocks, formatBlockIdToCbId, getBlockSpecificType, zIndexMap } from "./group";
40
+ import { findAllChildrenCbIds, findDirectChildrenBlockIds, findGroupBlocks, formatCbIdToBlockId, 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";
@@ -515,7 +515,7 @@ var ReactGridLayout = function (_a) {
515
515
  var originalKey = String(child.key).split(".$");
516
516
  return originalKey[1] === l.i;
517
517
  });
518
- var isInBulk = blockStructure && (bulkIds === null || bulkIds === void 0 ? void 0 : bulkIds.includes(formatBlockIdToCbId(Number(activeDrag.i))));
518
+ var isInBulk = blockStructure && (bulkIds === null || bulkIds === void 0 ? void 0 : bulkIds.includes(formatCbIdToBlockId(Number(activeDrag.i))));
519
519
  if (!item) {
520
520
  return null;
521
521
  }
@@ -544,7 +544,7 @@ var ReactGridLayout = function (_a) {
544
544
  var bounded = draggable && isBounded && l.isBounded !== false;
545
545
  var editable = editableItems.includes(l.i);
546
546
  var z = l.z || 0;
547
- var isInBulk = blockStructure && (bulkIds === null || bulkIds === void 0 ? void 0 : bulkIds.includes(formatBlockIdToCbId(Number(activeDrag === null || activeDrag === void 0 ? void 0 : activeDrag.i))));
547
+ var isInBulk = blockStructure && (bulkIds === null || bulkIds === void 0 ? void 0 : bulkIds.includes(formatCbIdToBlockId(Number(activeDrag === null || activeDrag === void 0 ? void 0 : activeDrag.i))));
548
548
  var isRoot = editingGroupBlock === 'ROOT';
549
549
  var baseZ = function () {
550
550
  if (isInBulk) {
@@ -49,5 +49,5 @@ export declare const findDirectChildrenBlockIds: (block: Block, targetId: string
49
49
  export declare const findGroupBlocks: (blockStructure: Block, targetId: string) => GroupBlock[];
50
50
  export declare const addBulkToTarget: (block: Block, targetId: string, bulkBlockIds: string[]) => Block;
51
51
  export declare const getBlockWorkDirPath: (block: Block, blockId: string) => string | null;
52
- export declare function formatBlockIdToCbId(cbId: number): string;
53
- export declare function formatCbIdToBlockId(cbId: number): string | null;
52
+ export declare function formatBlockIdToCbId(blockId: string): number | null;
53
+ export declare function formatCbIdToBlockId(cbId: number): string;
@@ -234,12 +234,12 @@ export var getBlockWorkDirPath = function (block, blockId) {
234
234
  var path = findPath(block, blockId, ['']);
235
235
  return path ? path.join('/') : null;
236
236
  };
237
- export function formatBlockIdToCbId(cbId) {
238
- return "CB_".concat(cbId);
237
+ export function formatBlockIdToCbId(blockId) {
238
+ var match = blockId.match(/^CB_(\d+)$/);
239
+ return match ? parseInt(match[1], 10) : null;
239
240
  }
240
241
  export function formatCbIdToBlockId(cbId) {
241
- var match = cbId.toString().match(/^CB_(\d+)$/);
242
- return match ? parseInt(match[1], 10).toString() : null;
242
+ return "CB_".concat(cbId);
243
243
  }
244
244
  // export const findAccessibleChildrenBlocks = (
245
245
  // block: Block,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "publ-echo-test",
3
- "version": "0.0.116",
3
+ "version": "0.0.117",
4
4
  "private": false,
5
5
  "main": "dist/lib/index.js",
6
6
  "types": "dist/lib/index.d.js",