publ-echo-test 0.0.136 → 0.0.138

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.
@@ -555,11 +555,6 @@ var ReactGridLayout = function (_a) {
555
555
  }
556
556
  var zOrder = (_a = block[device === 'DESKTOP' ? 'zOrderDesktopInternal' : 'zOrderMobileInternal']) !== null && _a !== void 0 ? _a : 0;
557
557
  var editorZIndex = (function () {
558
- // if (isInBulk) {
559
- // const bulkBlock = findBlockByBlockId(blockStructure, 'BULK');
560
- // const bulkZOrder = bulkBlock?.[device === 'DESKTOP' ? 'zOrderDesktopInternal' : 'zOrderMobileInternal'] ?? 0;
561
- // return zIndexMap.EDITING_GROUP;
562
- // }
563
558
  if (isInBulk) {
564
559
  return zIndexMap.EDITING_GROUP_CHILD + zOrder;
565
560
  }
@@ -105,42 +105,24 @@ export var findDirectChildrenBlockIds = function (block, targetId) {
105
105
  // NOTE: 타겟과 하위 모두.
106
106
  export var findGroupBlocks = function (block, targetId) {
107
107
  var targetBlock = findBlockByBlockId(block, targetId);
108
- // const groupBlocks: Set<GroupBlock> = new Set();
109
108
  if (!targetBlock) {
110
109
  console.error('Target block not found');
111
110
  return [];
112
111
  }
113
- // const addGroupBlocks = (block: GroupBlock | BulkBlockInternal) => {
114
- // block.children.forEach(child => {
115
- // if (child.type === 'GROUP_BLOCK') {
116
- // groupBlocks.add(child as GroupBlock);
117
- // }
118
- // });
119
- // };
120
112
  if (targetBlock.type !== 'GROUP_BLOCK') {
121
113
  console.error('Target block is not a group block');
122
114
  return [];
123
115
  }
124
116
  var groupBlocks = targetBlock.children.filter(function (child) { return child.type === 'GROUP_BLOCK'; });
117
+ var bulkInTarget = groupBlocks.find(function (block) { return block.blockId === 'BULK'; });
118
+ var groupInBulk = bulkInTarget === null || bulkInTarget === void 0 ? void 0 : bulkInTarget.children.filter(function (child) { return child.type === 'GROUP_BLOCK'; });
125
119
  if (targetBlock.blockId === 'ROOT') {
126
120
  return groupBlocks;
127
121
  }
122
+ if (groupInBulk.length > 0) {
123
+ return [targetBlock].concat(groupBlocks).concat(groupInBulk);
124
+ }
128
125
  return [targetBlock].concat(groupBlocks);
129
- // if (targetBlock.blockId === 'ROOT') {
130
- // addGroupBlocks(targetBlock as RootBlock);
131
- // }
132
- // if (targetBlock.type === 'GROUP_BLOCK') {
133
- // groupBlocks.add(targetBlock as GroupBlock);
134
- // addGroupBlocks(targetBlock);
135
- // }
136
- // // Handle BULK blocks
137
- // if (targetBlock.type === 'GROUP_BLOCK') {
138
- // const bulkBlocks = targetBlock.children.filter(child => child.blockId === 'BULK') as BulkBlockInternal[];
139
- // bulkBlocks.forEach(bulk => {
140
- // addGroupBlocks(bulk);
141
- // });
142
- // }
143
- // return Array.from(groupBlocks); // Convert Set back to array
144
126
  };
145
127
  // export const findAllComponentBlockIds = (blockStructure: Block[]): number[] => {
146
128
  // const collectComponentBlockIds = (blocks: Block[]): number[] => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "publ-echo-test",
3
- "version": "0.0.136",
3
+ "version": "0.0.138",
4
4
  "private": false,
5
5
  "main": "dist/lib/index.js",
6
6
  "types": "dist/lib/index.d.js",