publ-echo 0.0.129 → 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.
|
@@ -608,9 +608,7 @@ var ReactGridLayout = function (_a) {
|
|
|
608
608
|
i: l.i,
|
|
609
609
|
});
|
|
610
610
|
var showBlockData = editable && !isInBulk && overlapsActiveRows;
|
|
611
|
-
return (_jsx(GridItem, { heightFitContent: !!(l === null || l === void 0 ? void 0 : l.heightFitContent), isheightVariable: device
|
|
612
|
-
? !!block.isHeightVariableDesktop
|
|
613
|
-
: !!block.isHeightVariableMobile, parentGroupId: parent ? parent.blockId : undefined, className: classNames({
|
|
611
|
+
return (_jsx(GridItem, { heightFitContent: !!(l === null || l === void 0 ? void 0 : l.heightFitContent), isheightVariable: getIsHeightVariable(block, device), parentGroupId: parent ? parent.blockId : undefined, className: classNames({
|
|
614
612
|
"editable-grid-item": !isRoot && editable,
|
|
615
613
|
"not-editable-grid-item": !isRoot && !editable,
|
|
616
614
|
"bulk-child-item": isInBulk,
|
|
@@ -775,15 +773,12 @@ var ReactGridLayout = function (_a) {
|
|
|
775
773
|
y: groupItem.y,
|
|
776
774
|
i: block.blockId,
|
|
777
775
|
});
|
|
778
|
-
var
|
|
779
|
-
var showBlockData = editable && !isInBulk && overlapsActiveRows;
|
|
776
|
+
var showBlockData = !isInBulk && overlapsActiveRows;
|
|
780
777
|
return (_jsx(OutsideClickHandler, { onOutsideClick: onDoubleClickOutsideGroup, onMouseEnter: function () {
|
|
781
778
|
setHoveredGroupId(block.blockId);
|
|
782
779
|
}, onMouseLeave: function () {
|
|
783
780
|
setHoveredGroupId(null);
|
|
784
|
-
}, children: _jsx(GroupItem, { heightFitContent: false, isheightVariable: device
|
|
785
|
-
? !!block.isHeightVariableDesktop
|
|
786
|
-
: !!block.isHeightVariableMobile, className: classNames({
|
|
781
|
+
}, children: _jsx(GroupItem, { heightFitContent: false, isheightVariable: getIsHeightVariable(block, device), className: classNames({
|
|
787
782
|
"bulk-child-item": isInBulk,
|
|
788
783
|
"grid-bulk-block": block.blockId === "BULK",
|
|
789
784
|
editing: editingGroupBlock === block.blockId,
|
|
@@ -832,9 +827,7 @@ var ReactGridLayout = function (_a) {
|
|
|
832
827
|
var activeRows = activeDragItemOrSelectedItem &&
|
|
833
828
|
Array.from({ length: activeDragItemOrSelectedItem.h }, function (_, i) { return activeDragItemOrSelectedItem.y + i; });
|
|
834
829
|
var heightVariableRows = getRowsForHeightFitContentItems(layout);
|
|
835
|
-
var shouldShowAllHeightVariableRows = device
|
|
836
|
-
? activeBlock === null || activeBlock === void 0 ? void 0 : activeBlock.isHeightVariableDesktop
|
|
837
|
-
: activeBlock === null || activeBlock === void 0 ? void 0 : activeBlock.isHeightVariableMobile;
|
|
830
|
+
var shouldShowAllHeightVariableRows = getIsHeightVariable(activeBlock, device);
|
|
838
831
|
var activeRowsFiltered = shouldShowAllHeightVariableRows
|
|
839
832
|
? heightVariableRows
|
|
840
833
|
: activeRows;
|
|
@@ -842,4 +835,13 @@ var ReactGridLayout = function (_a) {
|
|
|
842
835
|
// width={width}
|
|
843
836
|
rowHeight: rowHeight, activeRows: activeRowsFiltered !== null && activeRowsFiltered !== void 0 ? activeRowsFiltered : [], colWidth: colWidth, activeDrag: activeDragItemOrSelectedItem, activeBlock: activeBlock, selectedBlockId: selectedBlockId, totalCols: cols, layout: layout }))] }));
|
|
844
837
|
};
|
|
838
|
+
function getIsHeightVariable(block, device) {
|
|
839
|
+
var heightVariable = device === "DESKTOP"
|
|
840
|
+
? block.isHeightVariableDesktop
|
|
841
|
+
: block.isHeightVariableMobile;
|
|
842
|
+
if (heightVariable === undefined || heightVariable === null) {
|
|
843
|
+
return true;
|
|
844
|
+
}
|
|
845
|
+
return heightVariable;
|
|
846
|
+
}
|
|
845
847
|
export default ReactGridLayout;
|