publ-echo 0.0.111 → 0.0.114

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.
@@ -410,12 +410,6 @@ var GridItem = function (_a) {
410
410
  cssTransforms: useCSSTransforms,
411
411
  }),
412
412
  style: __assign(__assign(__assign({}, props.style), child.props.style), createStyle(pos)),
413
- onClick: function (event) {
414
- var _a;
415
- if ((_a = child.props.className) === null || _a === void 0 ? void 0 : _a.includes('not-editable-grid-item')) {
416
- event.preventDefault();
417
- }
418
- },
419
413
  });
420
414
  newChild = mixinResizable(newChild, pos, isResizable);
421
415
  newChild = mixinDraggable(newChild, isDraggable);
@@ -567,11 +567,11 @@ var ReactGridLayout = function (_a) {
567
567
  var zOrder = (_a = block[device === 'DESKTOP' ? 'zOrderDesktopInternal' : 'zOrderMobileInternal']) !== null && _a !== void 0 ? _a : 0;
568
568
  var isInsideOfEditingGroup = editingGroupAllChildren.includes(l.i);
569
569
  var editorZIndex = (function () {
570
- if (isInBulk) {
571
- return zIndexMap.EDITING_GROUP_CHILD + z;
570
+ if (isRoot && isInBulk) {
571
+ return z;
572
572
  }
573
573
  if (!isRoot && isInsideOfEditingGroup) {
574
- return zIndexMap.EDITING_GROUP_CHILD + z;
574
+ return zIndexMap.CB_IN_EDITING_GROUP + z;
575
575
  }
576
576
  if (isRoot && editable) {
577
577
  return zIndexMap.ROOT + z;
@@ -672,37 +672,32 @@ var ReactGridLayout = function (_a) {
672
672
  if (!groupItem) {
673
673
  return _jsx(_Fragment, {});
674
674
  }
675
- var zOrder = (_a = block[device === 'DESKTOP' ? 'zOrderDesktopInternal' : 'zOrderMobileInternal']) !== null && _a !== void 0 ? _a : 0;
675
+ var internalZOrder = (_a = block[device === 'DESKTOP' ? 'zOrderDesktopInternal' : 'zOrderMobileInternal']) !== null && _a !== void 0 ? _a : 0;
676
676
  var isEditingGroup = block.blockId === editingGroupBlock;
677
677
  var type = getBlockSpecificType(block);
678
678
  var isRoot = editingGroupBlock === 'ROOT';
679
679
  var isInBulk = bulkIds === null || bulkIds === void 0 ? void 0 : bulkIds.includes(block.blockId);
680
680
  var isBulk = block.blockId === 'BULK';
681
681
  var baseZ = (function () {
682
- if (isEditingGroup) {
683
- return zIndexMap.EDITING_GROUP;
684
- }
685
682
  if (isBulk) {
686
- return zIndexMap.EDITING_GROUP_CHILD + groupItem.z;
683
+ // groupItem.z : 그룹 내 CB중 가장 큰 zorder
684
+ return zIndexMap.CB_IN_EDITING_GROUP + groupItem.z;
687
685
  }
688
686
  if (isInBulk) {
689
- // 위와 같지만 이것은 not-editable이긴 함.
690
- // const bulkBlock = findBlockByBlockId(blockStructure, 'BULK');
691
- // const bulkZOrder = bulkBlock?.[device === 'DESKTOP' ? 'zOrderDesktopInternal' : 'zOrderMobileInternal'] ?? 0;
692
- return zIndexMap.EDITING_GROUP_CHILD + zOrder;
687
+ return zIndexMap.CB_IN_EDITING_GROUP + internalZOrder;
688
+ }
689
+ if (isEditingGroup) {
690
+ return zIndexMap.EDITING_GROUP;
693
691
  }
694
692
  if (!isRoot && type === 'GROUP_BLOCK') {
695
- return zIndexMap.EDITING_GROUP_CHILD + zOrder;
693
+ return zIndexMap.EDITABLE_GROUP + internalZOrder;
696
694
  }
697
695
  if (type === 'GROUP_BLOCK') {
698
696
  return zIndexMap.GROUP;
699
697
  }
700
- if (type === 'BULK') {
701
- return zIndexMap.BULK;
702
- }
703
- return zIndexMap.CB;
698
+ return -1; // NOTE: ERROR
704
699
  })();
705
- var zIndex = editorMode === 'EDIT' ? baseZ : zOrder;
700
+ var zIndex = editorMode === 'EDIT' ? baseZ : internalZOrder;
706
701
  var handleClick = function (e) {
707
702
  onClickGroup && onClickGroup(e, block.blockId, type);
708
703
  };
@@ -721,11 +716,11 @@ var ReactGridLayout = function (_a) {
721
716
  'grid-bulk-block': block.blockId === 'BULK',
722
717
  editing: editingGroupBlock === block.blockId,
723
718
  selected: selectedGroupBlock === block.blockId,
724
- }), z: zIndex, minZ: groupItem.minZ, zOrder: zOrder, zOrderInternal: parent
719
+ }), z: zIndex, minZ: groupItem.minZ, zOrder: internalZOrder, zOrderInternal: parent
725
720
  ? "".concat(parent[device === 'DESKTOP'
726
721
  ? 'zOrderDesktopInternal'
727
- : 'zOrderMobileInternal'], " > ").concat(zOrder)
728
- : zOrder.toString(), containerWidth: width, cols: cols, margin: margin, containerPadding: containerPadding || margin, maxRows: maxRows, rowHeight: rowHeight, cancel: draggableCancel, handle: draggableHandle, onDragStop: onDragStopGroupHandler, onDragStart: onDragStartHandler, onDrag: onDragHandler, onResizeStart: onResizeStartHandler, onResize: onResizeHandler, onResizeStop: onResizeStopHandler, onFitToContent: onFitToContentHandler, isDraggable: !viewOnly && !isEditingGroup && !isInBulk, isResizable: !viewOnly && !isEditingGroup && !isInBulk, isBounded: false, useCSSTransforms: useCSSTransforms && isMounted, usePercentages: !isMounted, transformScale: transformScale, w: groupItem.w, h: groupItem.h, x: groupItem.x, y: groupItem.y, i: block.blockId,
722
+ : 'zOrderMobileInternal'], " > ").concat(internalZOrder)
723
+ : internalZOrder.toString(), containerWidth: width, cols: cols, margin: margin, containerPadding: containerPadding || margin, maxRows: maxRows, rowHeight: rowHeight, cancel: draggableCancel, handle: draggableHandle, onDragStop: onDragStopGroupHandler, onDragStart: onDragStartHandler, onDrag: onDragHandler, onResizeStart: onResizeStartHandler, onResize: onResizeHandler, onResizeStop: onResizeStopHandler, onFitToContent: onFitToContentHandler, isDraggable: !viewOnly && !isEditingGroup && !isInBulk, isResizable: !viewOnly && !isEditingGroup && !isInBulk, isBounded: false, useCSSTransforms: useCSSTransforms && isMounted, usePercentages: !isMounted, transformScale: transformScale, w: groupItem.w, h: groupItem.h, x: groupItem.x, y: groupItem.y, i: block.blockId,
729
724
  // minH={l.minH}
730
725
  // minW={l.minW}
731
726
  // maxH={l.maxH}
@@ -1,7 +1,8 @@
1
1
  export declare const zIndexMap: {
2
2
  ISDRAGGING: number;
3
3
  BULK: number;
4
- EDITING_GROUP_CHILD: number;
4
+ EDITABLE_GROUP: number;
5
+ CB_IN_EDITING_GROUP: number;
5
6
  EDITING_GROUP: number;
6
7
  GROUP: number;
7
8
  CB: number;
@@ -9,8 +9,9 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
9
9
  };
10
10
  export var zIndexMap = {
11
11
  ISDRAGGING: 999999,
12
- BULK: 20000,
13
- EDITING_GROUP_CHILD: 10000,
12
+ BULK: 30000,
13
+ EDITABLE_GROUP: 20000,
14
+ CB_IN_EDITING_GROUP: 10000,
14
15
  EDITING_GROUP: 9000,
15
16
  GROUP: 5000,
16
17
  CB: 0,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "publ-echo",
3
- "version": "0.0.111",
3
+ "version": "0.0.114",
4
4
  "private": false,
5
5
  "main": "dist/lib/index.js",
6
6
  "types": "dist/lib/index.d.js",