publ-echo-test 0.0.349 → 0.0.351

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.
@@ -53,7 +53,6 @@ var ReactGridLayout = function (_a) {
53
53
  _x = props.resizeHandles, // TODO fix
54
54
  resizeHandles = _x === void 0 ? ["se"] : _x, _y = props.width, width = _y === void 0 ? 0 : _y, resizeHandle = props.resizeHandle, _z = props.isHiddenVisibility, isHiddenVisibility = _z === void 0 ? true : _z, innerRef = props.innerRef, minNbRow = props.minNbRow, customColWidth = props.customColWidth, blockStructure = props.blockStructure, onDoubleClickGroup = props.onDoubleClickGroup, _0 = props.editingGroupBlock, editingGroupBlock = _0 === void 0 ? "ROOT" : _0, _1 = props.selectedGroupBlock, selectedGroupBlock = _1 === void 0 ? "ROOT" : _1, onClickGroup = props.onClickGroup, bulkIds = props.bulkIds, onDoubleClickOutsideGroup = props.onDoubleClickOutsideGroup;
55
55
  var device = cols === 24 ? "DESKTOP" : "MOBILE";
56
- console.log("selectedBlockId", selectedBlockId);
57
56
  var _2 = useState(), activeDrag = _2[0], setActiveDrag = _2[1];
58
57
  var _3 = useState(), oldDragItem = _3[0], setOldDragItem = _3[1];
59
58
  var _4 = useState(), oldLayout = _4[0], setOldLayout = _4[1];
@@ -591,6 +590,24 @@ var ReactGridLayout = function (_a) {
591
590
  return z;
592
591
  })();
593
592
  var zIndex = editorMode === "EDIT" ? editorZIndex : z;
593
+ // Check if a layout item overlaps any of the activeRows (vertical overlap)
594
+ var isOverlappingActiveRows = function (item) {
595
+ if (!activeRows || activeRows.length === 0)
596
+ return false;
597
+ var minActive = Math.min.apply(Math, activeRows);
598
+ var maxActive = Math.max.apply(Math, activeRows);
599
+ var itemTop = item.y;
600
+ var itemBottom = item.y + item.h - 1;
601
+ // overlap if ranges [itemTop, itemBottom] and [minActive, maxActive] intersect
602
+ return !(itemBottom < minActive || itemTop > maxActive);
603
+ };
604
+ var overlapsActiveRows = isOverlappingActiveRows({
605
+ w: l.w,
606
+ h: l.h,
607
+ x: l.x,
608
+ y: l.y,
609
+ i: l.i,
610
+ });
594
611
  return (_jsx(GridItem, { isPinned: device === "DESKTOP"
595
612
  ? !!block.isPinnedDesktop
596
613
  : !!block.isPinnedMobile, className: classNames({
@@ -598,6 +615,7 @@ var ReactGridLayout = function (_a) {
598
615
  "not-editable-grid-item": !isRoot && !editable,
599
616
  "bulk-child-item": isInBulk,
600
617
  "outside-of-editing-group": !isInsideOfEditingGroup,
618
+ "show-block-data": overlapsActiveRows,
601
619
  }), z: zIndex, zOrder: l.z, zOrderInternal: parent
602
620
  ? "".concat(parent[device === "DESKTOP"
603
621
  ? "zOrderDesktopInternal"
@@ -750,6 +768,9 @@ var ReactGridLayout = function (_a) {
750
768
  var selectedLayoutItem = selectedBlockId
751
769
  ? getLayoutItem(layout, selectedBlockId)
752
770
  : null;
771
+ var activeRows = activeDrag &&
772
+ Array.from({ length: activeDrag.h }, function (_, i) { return activeDrag.y + i; });
773
+ console.log("activeRows", activeRows);
753
774
  return (_jsxs("div", { ref: innerRef, className: mergedClassName, style: mergedStyle, onDrop: isDroppable ? onDropHandler : noop, onDragLeave: isDroppable ? onDragLeaveHandler : noop, onDragEnter: isDroppable ? onDragEnterHandler : noop, onDragOver: isDroppable ? onDragOverHandler : noop, "data-grid-row-height": rowHeight, "data-grid-cols": cols, "data-section-id": sectionId, children: [currentGroupBlocks.map(function (each) { return processGroup(each); }), React.Children.map(children, function (child) { return processGridItem(child); }), placeholder(), activeDrag && _jsx("div", { className: "grid-guide-line-center" }), activeDrag && (_jsx(GridBackgroundPlaceholder, { backgroundWidth: getBackgroundWidth(), backgroundHeight: getBackgroundHeight(), margin: margin,
754
775
  // width={width}
755
776
  rowHeight: rowHeight, colWidth: colWidth, activeDrag: activeDrag, selectedBlockId: selectedBlockId, totalCols: cols })), selectedLayoutItem && (_jsx(GridBackgroundPlaceholder, { backgroundWidth: getBackgroundWidth(), backgroundHeight: getBackgroundHeight(), margin: margin,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "publ-echo-test",
3
- "version": "0.0.349",
3
+ "version": "0.0.351",
4
4
  "private": false,
5
5
  "main": "dist/lib/index.js",
6
6
  "types": "dist/lib/index.d.js",