publ-echo-test 0.0.388 → 0.0.390

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.
@@ -16,4 +16,5 @@ type PlaceholderProps = {
16
16
  };
17
17
  export declare function GridBackgroundPlaceholder({ device, margin, rowHeight, colWidth, backgroundWidth, backgroundHeight, activeDrag, selectedBlockId, activeRows, totalCols, // 💡 새로 받은 totalCols 사용
18
18
  activeBlock, layout, }: PlaceholderProps): import("react/jsx-runtime").JSX.Element;
19
+ export declare function getShowActiveRows(block: ComponentBlock | GroupBlock, layout: LayoutItem[]): boolean;
19
20
  export {};
@@ -44,7 +44,7 @@ export function GridBackgroundPlaceholder(_a) {
44
44
  }), _jsx("foreignObject", { x: gridContentWidth + textPadding, y: y_top, width: colWidth, height: rowHeight, style: { overflow: "visible" }, children: _jsx("div", { className: "grid-indicator-text" }) })] }, "active-row-".concat(row)));
45
45
  })] }) }));
46
46
  }
47
- function getShowActiveRows(block, layout) {
47
+ export function getShowActiveRows(block, layout) {
48
48
  if (block.type === "GROUP_BLOCK") {
49
49
  var hasFitContentCB = block.children.some(function (child) {
50
50
  if (child.type === "COMPONENT_BLOCK") {
@@ -41,7 +41,7 @@ import isEqual from "../../external-lib/lodash.isEqual";
41
41
  import { findAllChildrenCbIds, findBlockByBlockId, findDirectChildrenBlockIds, findDirectChildrenCbIds, findGroupBlocks, findParentGroupBlock, formatCbIdToBlockId, getBlockIdKind, getBlockSpecificType, zIndexMap, } from "./group";
42
42
  import GroupItem from "../GridItem/GroupItem";
43
43
  import OutsideClickHandler from "../GridItem/OutsideClickHandler";
44
- import { GridBackgroundPlaceholder } from "./Placeholder";
44
+ import { getShowActiveRows, GridBackgroundPlaceholder } from "./Placeholder";
45
45
  var layoutClassName = "react-grid-layout";
46
46
  var ReactGridLayout = function (_a) {
47
47
  var children = _a.children, props = __rest(_a, ["children"]);
@@ -573,11 +573,19 @@ var ReactGridLayout = function (_a) {
573
573
  var zIndex = editorMode === "EDIT" ? editorZIndex : z;
574
574
  // Check if a layout item overlaps any of the activeRows (vertical overlap)
575
575
  var isOverlappingActiveRows = function (item) {
576
- if ((parsedSelectedBlockId === null || parsedSelectedBlockId === void 0 ? void 0 : parsedSelectedBlockId.cbId) === item.i) {
577
- return false;
576
+ if ((activeBlock === null || activeBlock === void 0 ? void 0 : activeBlock.type) === "COMPONENT_BLOCK") {
577
+ if ((parsedSelectedBlockId === null || parsedSelectedBlockId === void 0 ? void 0 : parsedSelectedBlockId.cbId) === item.i) {
578
+ return false;
579
+ }
580
+ if (!(activeDragItemOrSelectedItem === null || activeDragItemOrSelectedItem === void 0 ? void 0 : activeDragItemOrSelectedItem.heightFitContent)) {
581
+ return false;
582
+ }
578
583
  }
579
- if (!(activeDragItemOrSelectedItem === null || activeDragItemOrSelectedItem === void 0 ? void 0 : activeDragItemOrSelectedItem.heightFitContent)) {
580
- return false;
584
+ if ((activeBlock === null || activeBlock === void 0 ? void 0 : activeBlock.type) === "GROUP_BLOCK") {
585
+ var hasFitContentCB = getShowActiveRows(activeBlock, layout);
586
+ if (!hasFitContentCB) {
587
+ return false;
588
+ }
581
589
  }
582
590
  if (!activeRows || activeRows.length === 0) {
583
591
  return false;
@@ -728,6 +736,7 @@ var ReactGridLayout = function (_a) {
728
736
  var parent = blockStructure
729
737
  ? findParentGroupBlock(blockStructure, block.blockId)
730
738
  : null;
739
+ console.log("active rows", activeRows);
731
740
  return (_jsx(OutsideClickHandler, { onOutsideClick: onDoubleClickOutsideGroup, children: _jsx(GroupItem, { heightFitContent: false, isheightVariable: device === "DESKTOP"
732
741
  ? !!block.isHeightVariableDesktop
733
742
  : !!block.isHeightVariableMobile, className: classNames({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "publ-echo-test",
3
- "version": "0.0.388",
3
+ "version": "0.0.390",
4
4
  "private": false,
5
5
  "main": "dist/lib/index.js",
6
6
  "types": "dist/lib/index.d.js",