publ-echo 0.0.130 → 0.0.132
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,
|
|
@@ -780,9 +778,7 @@ var ReactGridLayout = function (_a) {
|
|
|
780
778
|
setHoveredGroupId(block.blockId);
|
|
781
779
|
}, onMouseLeave: function () {
|
|
782
780
|
setHoveredGroupId(null);
|
|
783
|
-
}, children: _jsx(GroupItem, { heightFitContent: false, isheightVariable: device
|
|
784
|
-
? !!block.isHeightVariableDesktop
|
|
785
|
-
: !!block.isHeightVariableMobile, className: classNames({
|
|
781
|
+
}, children: _jsx(GroupItem, { heightFitContent: false, isheightVariable: getIsHeightVariable(block, device), className: classNames({
|
|
786
782
|
"bulk-child-item": isInBulk,
|
|
787
783
|
"grid-bulk-block": block.blockId === "BULK",
|
|
788
784
|
editing: editingGroupBlock === block.blockId,
|
|
@@ -831,9 +827,7 @@ var ReactGridLayout = function (_a) {
|
|
|
831
827
|
var activeRows = activeDragItemOrSelectedItem &&
|
|
832
828
|
Array.from({ length: activeDragItemOrSelectedItem.h }, function (_, i) { return activeDragItemOrSelectedItem.y + i; });
|
|
833
829
|
var heightVariableRows = getRowsForHeightFitContentItems(layout);
|
|
834
|
-
var shouldShowAllHeightVariableRows = device
|
|
835
|
-
? activeBlock === null || activeBlock === void 0 ? void 0 : activeBlock.isHeightVariableDesktop
|
|
836
|
-
: activeBlock === null || activeBlock === void 0 ? void 0 : activeBlock.isHeightVariableMobile;
|
|
830
|
+
var shouldShowAllHeightVariableRows = getIsHeightVariable(activeBlock, device);
|
|
837
831
|
var activeRowsFiltered = shouldShowAllHeightVariableRows
|
|
838
832
|
? heightVariableRows
|
|
839
833
|
: activeRows;
|
|
@@ -841,4 +835,13 @@ var ReactGridLayout = function (_a) {
|
|
|
841
835
|
// width={width}
|
|
842
836
|
rowHeight: rowHeight, activeRows: activeRowsFiltered !== null && activeRowsFiltered !== void 0 ? activeRowsFiltered : [], colWidth: colWidth, activeDrag: activeDragItemOrSelectedItem, activeBlock: activeBlock, selectedBlockId: selectedBlockId, totalCols: cols, layout: layout }))] }));
|
|
843
837
|
};
|
|
838
|
+
function getIsHeightVariable(block, device) {
|
|
839
|
+
var heightVariable = device === "DESKTOP"
|
|
840
|
+
? block === null || block === void 0 ? void 0 : block.isHeightVariableDesktop
|
|
841
|
+
: block === null || block === void 0 ? void 0 : block.isHeightVariableMobile;
|
|
842
|
+
if (heightVariable === undefined || heightVariable === null) {
|
|
843
|
+
return true;
|
|
844
|
+
}
|
|
845
|
+
return heightVariable;
|
|
846
|
+
}
|
|
844
847
|
export default ReactGridLayout;
|