publ-echo-test 0.0.130 → 0.0.131

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.
@@ -561,13 +561,16 @@ var ReactGridLayout = function (_a) {
561
561
  // return zIndexMap.EDITING_GROUP;
562
562
  // }
563
563
  if (!isRoot && isInBulk) {
564
- return zIndexMap.EDITING_GROUP;
564
+ return zIndexMap.EDITING_GROUP_CHILD + zOrder;
565
565
  }
566
566
  if (!isRoot && editable) {
567
- return zIndexMap.EDITING_GROUP;
567
+ return zIndexMap.EDITING_GROUP_CHILD + zOrder;
568
568
  }
569
569
  if (isRoot && editable) {
570
- return zIndexMap.ROOT;
570
+ return zIndexMap.ROOT + zOrder;
571
+ }
572
+ if (isRoot && !editable) {
573
+ return zIndexMap.ROOT + zOrder;
571
574
  }
572
575
  if (!editable) {
573
576
  return 0;
@@ -666,13 +669,16 @@ var ReactGridLayout = function (_a) {
666
669
  var isInBulk = bulkIds === null || bulkIds === void 0 ? void 0 : bulkIds.includes(block.blockId);
667
670
  var isBulk = block.blockId === 'BULK';
668
671
  var baseZ = (function () {
669
- if (isBulk) {
672
+ if (isEditingGroup) {
670
673
  return zIndexMap.EDITING_GROUP;
671
674
  }
672
- if (isInBulk) {
675
+ if (isBulk) {
676
+ return zIndexMap.EDITING_GROUP_CHILD + zOrder;
677
+ }
678
+ if (isInBulk) { // 위와 같지만 이것은 not-editable이긴 함.
673
679
  // const bulkBlock = findBlockByBlockId(blockStructure, 'BULK');
674
680
  // const bulkZOrder = bulkBlock?.[device === 'DESKTOP' ? 'zOrderDesktopInternal' : 'zOrderMobileInternal'] ?? 0;
675
- return zIndexMap.EDITING_GROUP;
681
+ return zIndexMap.EDITING_GROUP_CHILD + zOrder;
676
682
  }
677
683
  if (!isRoot && type === 'GROUP_BLOCK') {
678
684
  return zIndexMap.EDITING_GROUP;
@@ -685,7 +691,7 @@ var ReactGridLayout = function (_a) {
685
691
  }
686
692
  return zIndexMap.CB;
687
693
  })();
688
- var zIndex = editorMode === 'EDIT' ? baseZ + zOrder : zOrder;
694
+ var zIndex = editorMode === 'EDIT' ? baseZ : zOrder;
689
695
  var handleClick = function (e) {
690
696
  onClickGroup && onClickGroup(e, block.blockId, type);
691
697
  };
@@ -1,5 +1,6 @@
1
1
  export declare const zIndexMap: {
2
2
  BULK: number;
3
+ EDITING_GROUP_CHILD: number;
3
4
  EDITING_GROUP: number;
4
5
  GROUP: number;
5
6
  CB: number;
@@ -9,7 +9,8 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
9
9
  };
10
10
  export var zIndexMap = {
11
11
  'BULK': 20000,
12
- 'EDITING_GROUP': 10000,
12
+ 'EDITING_GROUP_CHILD': 10000,
13
+ 'EDITING_GROUP': 9000,
13
14
  'GROUP': 5000,
14
15
  'CB': 500,
15
16
  'ROOT': 500, //?
@@ -211,12 +212,16 @@ export var addBulkToTarget = function (block, targetId, bulkBlockIds) {
211
212
  }
212
213
  // Remove bulk blocks from target's children
213
214
  targetBlock.children = targetBlock.children.filter(function (child) { return !bulkBlockIds.includes(child.blockId); });
215
+ var zOrdersDesktop = bulkBlocks.map(function (block) { return block.zOrderDesktopInternal; }).filter(function (each) { return each !== null; });
216
+ var zOrdersMobile = bulkBlocks.map(function (block) { return block.zOrderMobileInternal; }).filter(function (each) { return each !== null; });
217
+ var zOrderDesktopInternal = Math.max.apply(Math, zOrdersDesktop);
218
+ var zOrderMobileInternal = Math.max.apply(Math, zOrdersMobile);
214
219
  // Create the new bulkBlock
215
220
  var bulkBlock = {
216
221
  blockId: 'BULK',
217
222
  type: 'GROUP_BLOCK',
218
- zOrderDesktopInternal: zIndexMap.BULK,
219
- zOrderMobileInternal: zIndexMap.BULK,
223
+ zOrderDesktopInternal: zOrderDesktopInternal,
224
+ zOrderMobileInternal: zOrderMobileInternal,
220
225
  children: bulkBlocks,
221
226
  };
222
227
  // Add the bulkBlock to the target's children
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "publ-echo-test",
3
- "version": "0.0.130",
3
+ "version": "0.0.131",
4
4
  "private": false,
5
5
  "main": "dist/lib/index.js",
6
6
  "types": "dist/lib/index.d.js",