publ-echo 0.0.128 → 0.0.129
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.
|
@@ -742,6 +742,41 @@ var ReactGridLayout = function (_a) {
|
|
|
742
742
|
var parent = blockStructure
|
|
743
743
|
? findParentGroupBlock(blockStructure, block.blockId)
|
|
744
744
|
: null;
|
|
745
|
+
// Check if a layout item overlaps any of the activeRows (vertical overlap)
|
|
746
|
+
var isOverlappingActiveRows = function (item) {
|
|
747
|
+
if ((activeBlock === null || activeBlock === void 0 ? void 0 : activeBlock.type) === "COMPONENT_BLOCK") {
|
|
748
|
+
if ((parsedSelectedBlockId === null || parsedSelectedBlockId === void 0 ? void 0 : parsedSelectedBlockId.cbId) === item.i) {
|
|
749
|
+
return false;
|
|
750
|
+
}
|
|
751
|
+
if (!(activeDragItemOrSelectedItem === null || activeDragItemOrSelectedItem === void 0 ? void 0 : activeDragItemOrSelectedItem.heightFitContent)) {
|
|
752
|
+
return false;
|
|
753
|
+
}
|
|
754
|
+
}
|
|
755
|
+
if ((activeBlock === null || activeBlock === void 0 ? void 0 : activeBlock.type) === "GROUP_BLOCK") {
|
|
756
|
+
var hasFitContentCB = getShowActiveRows(activeBlock, layout);
|
|
757
|
+
if (!hasFitContentCB) {
|
|
758
|
+
return false;
|
|
759
|
+
}
|
|
760
|
+
}
|
|
761
|
+
if (!activeRows || activeRows.length === 0) {
|
|
762
|
+
return false;
|
|
763
|
+
}
|
|
764
|
+
var minActive = Math.min.apply(Math, activeRows);
|
|
765
|
+
var maxActive = Math.max.apply(Math, activeRows);
|
|
766
|
+
var itemTop = item.y;
|
|
767
|
+
var itemBottom = item.y + item.h - 1;
|
|
768
|
+
// overlap if ranges [itemTop, itemBottom] and [minActive, maxActive] intersect
|
|
769
|
+
return !(itemBottom < minActive || itemTop > maxActive);
|
|
770
|
+
};
|
|
771
|
+
var overlapsActiveRows = isOverlappingActiveRows({
|
|
772
|
+
w: groupItem.w,
|
|
773
|
+
h: groupItem.h,
|
|
774
|
+
x: groupItem.x,
|
|
775
|
+
y: groupItem.y,
|
|
776
|
+
i: block.blockId,
|
|
777
|
+
});
|
|
778
|
+
var editable = editableBlockIds.includes(Number(block.blockId));
|
|
779
|
+
var showBlockData = editable && !isInBulk && overlapsActiveRows;
|
|
745
780
|
return (_jsx(OutsideClickHandler, { onOutsideClick: onDoubleClickOutsideGroup, onMouseEnter: function () {
|
|
746
781
|
setHoveredGroupId(block.blockId);
|
|
747
782
|
}, onMouseLeave: function () {
|
|
@@ -753,6 +788,7 @@ var ReactGridLayout = function (_a) {
|
|
|
753
788
|
"grid-bulk-block": block.blockId === "BULK",
|
|
754
789
|
editing: editingGroupBlock === block.blockId,
|
|
755
790
|
selected: selectedGroupBlock === block.blockId,
|
|
791
|
+
"show-block-data": showBlockData,
|
|
756
792
|
}), z: zIndex, minZ: groupItem.minZ, zOrder: internalZOrder, zOrderInternal: parent
|
|
757
793
|
? "".concat(parent[device === "DESKTOP"
|
|
758
794
|
? "zOrderDesktopInternal"
|