publ-echo-test 0.0.65 → 0.0.67

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 { findAllChildrenButGroup, findAllChildrenComponentIds, findChildrenIds, findGroupBlocks, getBlockSpecificType, zIndexMap } from "./group";
40
+ import { findAllChildrenComponentIds, findChildrenIds, findGroupBlocks, 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";
@@ -139,6 +139,7 @@ var ReactGridLayout = function (_a) {
139
139
  var _b;
140
140
  var e = _a.e, node = _a.node;
141
141
  var l = (_b = getLayoutItem(layout, i)) !== null && _b !== void 0 ? _b : { i: i, x: x, y: y, w: 1, h: 1 };
142
+ console.log(l);
142
143
  if (!l)
143
144
  return;
144
145
  setOldDragItem(cloneLayoutItem(l));
@@ -147,7 +148,7 @@ var ReactGridLayout = function (_a) {
147
148
  if (!blockStructure) {
148
149
  return;
149
150
  }
150
- var childrenIds = findAllChildrenButGroup(blockStructure, i);
151
+ var childrenIds = findAllChildrenComponentIds(blockStructure, i).map(function (i) { return i.toString(); });
151
152
  var children_1 = childrenIds.map(function (id) {
152
153
  var item = getLayoutItem(layout, id);
153
154
  return cloneLayoutItem(item);
@@ -45,9 +45,8 @@ export declare const findChildrenIds: (blockStructure: Block[], targetId: string
45
45
  export declare const findAllChildrenIds: (blockStructure: Block[], targetId: string) => string[];
46
46
  export declare const findAllChildrenComponentIds: (blockStructure: Block[], targetId: string) => number[];
47
47
  export declare const findAllParentGroups: (blockStructure: Block[], targetId: string) => GroupBlock[];
48
- export declare const findAllChildrenButGroup: (blockStructure: Block[], targetId: string) => string[];
49
48
  export declare const findGroupBlocks: (blockStructure: Block[], targetId: string) => GroupBlock[];
50
- export declare const findAllComponentBlockIds: (blockStructure: Block[]) => string[];
49
+ export declare const findAllComponentBlockIds: (blockStructure: Block[]) => number[];
51
50
  export declare const findParentGroupByGroupId: (blockStructure: Block[], targetId: string) => string | null;
52
51
  export declare const addBlockToRoot: (blockStructure: Block[], newBlock: Block) => Block[];
53
52
  export declare const addBulkToTarget: (blockStructure: Block[], targetId: string, bulkIds: string[]) => Block[];
@@ -107,23 +107,22 @@ export var findAllParentGroups = function (blockStructure, targetId) {
107
107
  };
108
108
  return findParentGroups(blockStructure, targetId) || [];
109
109
  };
110
- export var findAllChildrenButGroup = function (blockStructure, targetId) {
111
- var collectChildrenIds = function (block) {
112
- var ids = [];
113
- if ('children' in block && block.children) {
114
- for (var _i = 0, _a = block.children; _i < _a.length; _i++) {
115
- var child = _a[_i];
116
- if (child.type !== 'GROUP_BLOCK') {
117
- ids.push(child.blockId);
118
- }
119
- ids = ids.concat(collectChildrenIds(child));
120
- }
121
- }
122
- return ids;
123
- };
124
- var targetBlock = findBlockById(blockStructure, targetId);
125
- return targetBlock ? collectChildrenIds(targetBlock) : [];
126
- };
110
+ // export const findAllChildrenButGroup = (blockStructure: Block[], targetId: string): string[] => {
111
+ // const collectChildrenIds = (block: Block): string[] => {
112
+ // let ids: string[] = [];
113
+ // if ('children' in block && block.children) {
114
+ // for (const child of block.children) {
115
+ // if (child.type !== 'GROUP_BLOCK') {
116
+ // ids.push(child.blockId);
117
+ // }
118
+ // ids = ids.concat(collectChildrenIds(child));
119
+ // }
120
+ // }
121
+ // return ids;
122
+ // };
123
+ // const targetBlock = findBlockById(blockStructure, targetId);
124
+ // return targetBlock ? collectChildrenIds(targetBlock) : [];
125
+ // };
127
126
  export var findGroupBlocks = function (blockStructure, targetId) {
128
127
  var targetBlock = findBlockById(blockStructure, targetId);
129
128
  var groupBlocks = [];
@@ -147,7 +146,7 @@ export var findAllComponentBlockIds = function (blockStructure) {
147
146
  for (var _i = 0, blocks_3 = blocks; _i < blocks_3.length; _i++) {
148
147
  var block = blocks_3[_i];
149
148
  if (block.type === 'COMPONENT_BLOCK') {
150
- ids.push(block.blockId);
149
+ ids.push(block.componentBlockId);
151
150
  }
152
151
  if ('children' in block && block.children) {
153
152
  ids = ids.concat(collectComponentBlockIds(block.children));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "publ-echo-test",
3
- "version": "0.0.65",
3
+ "version": "0.0.67",
4
4
  "private": false,
5
5
  "main": "dist/lib/index.js",
6
6
  "types": "dist/lib/index.d.js",