publ-echo-test 0.0.357 → 0.0.359
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.
- package/dist/lib/GridItem/GridItem.js +1 -1
- package/dist/lib/GridItem/GroupItem.js +2 -2
- package/dist/lib/GridItem/types.d.ts +1 -1
- package/dist/lib/GridLayoutEditor/ReactGridLayout.js +10 -7
- package/dist/lib/GridLayoutEditor/group.d.ts +8 -8
- package/dist/lib/GridLayoutEditor/group.js +2 -2
- package/dist/lib/GridLayoutEditor/types.d.ts +1 -1
- package/package.json +1 -1
|
@@ -603,7 +603,7 @@ var GridItem = function (_a) {
|
|
|
603
603
|
"data-grid-id": i,
|
|
604
604
|
"data-z-index": z,
|
|
605
605
|
"data-z-order": zOrder,
|
|
606
|
-
"data-is-
|
|
606
|
+
"data-is-height-variable": props.isheightVariable,
|
|
607
607
|
"data-height-fit-content": heightFitContent,
|
|
608
608
|
"data-z-order-internal": zOrderInternal,
|
|
609
609
|
className: classNames("react-grid-item", child.props.className, className, {
|
|
@@ -29,7 +29,7 @@ import { perc, setTopLeft, setTransform, } from "../GridLayoutEditor/utils/rende
|
|
|
29
29
|
var GroupItem = function (_a) {
|
|
30
30
|
var _b;
|
|
31
31
|
var children = _a.children, props = __rest(_a, ["children"]);
|
|
32
|
-
var resizeHandle = props.resizeHandle, cols = props.cols, zOrder = props.zOrder, zOrderInternal = props.zOrderInternal, isDraggable = props.isDraggable, _c = props.transformScale, transformScale = _c === void 0 ? 1 : _c, isResizable = props.isResizable, useCSSTransforms = props.useCSSTransforms, className = props.className, _d = props.cancel, cancel = _d === void 0 ? "" : _d, _e = props.handle, handle = _e === void 0 ? "" : _e, x = props.x, y = props.y, z = props.z, w = props.w, h = props.h, _f = props.minH, minH = _f === void 0 ? 1 : _f, _g = props.minW, minW = _g === void 0 ? 1 : _g, _h = props.maxH, maxH = _h === void 0 ? Infinity : _h, _j = props.maxW, maxW = _j === void 0 ? Infinity : _j, i = props.i, _k = props.isHiddenVisibility, isHiddenVisibility = _k === void 0 ? false : _k, containerWidth = props.containerWidth, customColWidth = props.customColWidth, autoResize = props.autoResize, minZ = props.minZ, onContextGroup = props.onContextGroup,
|
|
32
|
+
var resizeHandle = props.resizeHandle, cols = props.cols, zOrder = props.zOrder, zOrderInternal = props.zOrderInternal, isDraggable = props.isDraggable, _c = props.transformScale, transformScale = _c === void 0 ? 1 : _c, isResizable = props.isResizable, useCSSTransforms = props.useCSSTransforms, className = props.className, _d = props.cancel, cancel = _d === void 0 ? "" : _d, _e = props.handle, handle = _e === void 0 ? "" : _e, x = props.x, y = props.y, z = props.z, w = props.w, h = props.h, _f = props.minH, minH = _f === void 0 ? 1 : _f, _g = props.minW, minW = _g === void 0 ? 1 : _g, _h = props.maxH, maxH = _h === void 0 ? Infinity : _h, _j = props.maxW, maxW = _j === void 0 ? Infinity : _j, i = props.i, _k = props.isHiddenVisibility, isHiddenVisibility = _k === void 0 ? false : _k, containerWidth = props.containerWidth, customColWidth = props.customColWidth, autoResize = props.autoResize, minZ = props.minZ, onContextGroup = props.onContextGroup, isheightVariable = props.isheightVariable;
|
|
33
33
|
var _l = useState(), resizing = _l[0], setResizing = _l[1];
|
|
34
34
|
var _m = useState(), dragging = _m[0], setDragging = _m[1];
|
|
35
35
|
var _o = useState(), dragStart = _o[0], setDragStart = _o[1];
|
|
@@ -419,7 +419,7 @@ var GroupItem = function (_a) {
|
|
|
419
419
|
"data-z-order": zOrder,
|
|
420
420
|
"data-z-order-internal": zOrderInternal,
|
|
421
421
|
"data-min-z": minZ,
|
|
422
|
-
"data-is-
|
|
422
|
+
"data-is-height-variable": isheightVariable,
|
|
423
423
|
className: classNames("react-group-block", child.props.className, className, {
|
|
424
424
|
static: props.static,
|
|
425
425
|
isResizing: Boolean(resizing) &&
|
|
@@ -535,7 +535,7 @@ var ReactGridLayout = function (_a) {
|
|
|
535
535
|
if (!item) {
|
|
536
536
|
return null;
|
|
537
537
|
}
|
|
538
|
-
return (_jsx(GridItem, {
|
|
538
|
+
return (_jsx(GridItem, { isheightVariable: false, w: activeDrag.w, h: activeDrag.h, x: activeDrag.x, y: activeDrag.y, z: zIndexMap.ISDRAGGING, i: activeDrag.i, heightFitContent: false, className: "placeholder", containerWidth: width, cols: cols, margin: margin, containerPadding: containerPadding || margin, maxRows: maxRows, rowHeight: rowHeight, isDraggable: false, isResizable: false, isBounded: false, useCSSTransforms: useCSSTransforms, transformScale: transformScale, autoResize: !!l.autoResize, minH: l.minH, minW: l.minW, children: item && item }));
|
|
539
539
|
};
|
|
540
540
|
/**
|
|
541
541
|
* Given a grid item, set its style attributes & surround in a <Draggable>.
|
|
@@ -594,6 +594,9 @@ var ReactGridLayout = function (_a) {
|
|
|
594
594
|
var zIndex = editorMode === "EDIT" ? editorZIndex : z;
|
|
595
595
|
// Check if a layout item overlaps any of the activeRows (vertical overlap)
|
|
596
596
|
var isOverlappingActiveRows = function (item) {
|
|
597
|
+
if (selectedBlockId === item.i) {
|
|
598
|
+
return false;
|
|
599
|
+
}
|
|
597
600
|
if (!(activeDragItemOrSelectedItem === null || activeDragItemOrSelectedItem === void 0 ? void 0 : activeDragItemOrSelectedItem.heightFitContent)) {
|
|
598
601
|
return false;
|
|
599
602
|
}
|
|
@@ -614,9 +617,9 @@ var ReactGridLayout = function (_a) {
|
|
|
614
617
|
y: l.y,
|
|
615
618
|
i: l.i,
|
|
616
619
|
});
|
|
617
|
-
return (_jsx(GridItem, { heightFitContent: !!(l === null || l === void 0 ? void 0 : l.heightFitContent),
|
|
618
|
-
? !!block.
|
|
619
|
-
: !!block.
|
|
620
|
+
return (_jsx(GridItem, { heightFitContent: !!(l === null || l === void 0 ? void 0 : l.heightFitContent), isheightVariable: device === "DESKTOP"
|
|
621
|
+
? !!block.isHeightVariableDesktop
|
|
622
|
+
: !!block.isHeightVariableMobile, className: classNames({
|
|
620
623
|
"editable-grid-item": !isRoot && editable,
|
|
621
624
|
"not-editable-grid-item": !isRoot && !editable,
|
|
622
625
|
"bulk-child-item": isInBulk,
|
|
@@ -746,9 +749,9 @@ var ReactGridLayout = function (_a) {
|
|
|
746
749
|
var parent = blockStructure
|
|
747
750
|
? findParentGroupBlock(blockStructure, block.blockId)
|
|
748
751
|
: null;
|
|
749
|
-
return (_jsx(OutsideClickHandler, { onOutsideClick: onDoubleClickOutsideGroup, children: _jsx(GroupItem, { heightFitContent: false,
|
|
750
|
-
? !!block.
|
|
751
|
-
: !!block.
|
|
752
|
+
return (_jsx(OutsideClickHandler, { onOutsideClick: onDoubleClickOutsideGroup, children: _jsx(GroupItem, { heightFitContent: false, isheightVariable: device === "DESKTOP"
|
|
753
|
+
? !!block.isHeightVariableDesktop
|
|
754
|
+
: !!block.isHeightVariableMobile, className: classNames({
|
|
752
755
|
"bulk-child-item": isInBulk,
|
|
753
756
|
"grid-bulk-block": block.blockId === "BULK",
|
|
754
757
|
editing: editingGroupBlock === block.blockId,
|
|
@@ -22,8 +22,8 @@ export type ComponentBlock = {
|
|
|
22
22
|
zOrderDesktopInternal: number | null;
|
|
23
23
|
zOrderMobileInternal: number | null;
|
|
24
24
|
componentBlockId: number;
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
isHeightVariableDesktop: boolean;
|
|
26
|
+
isHeightVariableMobile: boolean;
|
|
27
27
|
};
|
|
28
28
|
export type GroupBlock = {
|
|
29
29
|
blockId: string;
|
|
@@ -31,8 +31,8 @@ export type GroupBlock = {
|
|
|
31
31
|
zOrderDesktopInternal: number | null;
|
|
32
32
|
zOrderMobileInternal: number | null;
|
|
33
33
|
children: (ComponentBlock | GroupBlock)[];
|
|
34
|
-
|
|
35
|
-
|
|
34
|
+
isHeightVariableDesktop: boolean;
|
|
35
|
+
isHeightVariableMobile: boolean;
|
|
36
36
|
};
|
|
37
37
|
export type RootBlock = {
|
|
38
38
|
blockId: "ROOT";
|
|
@@ -40,8 +40,8 @@ export type RootBlock = {
|
|
|
40
40
|
zOrderDesktopInternal: number | null;
|
|
41
41
|
zOrderMobileInternal: number | null;
|
|
42
42
|
children: (ComponentBlock | GroupBlock)[];
|
|
43
|
-
|
|
44
|
-
|
|
43
|
+
isHeightVariableDesktop: boolean;
|
|
44
|
+
isHeightVariableMobile: boolean;
|
|
45
45
|
};
|
|
46
46
|
export type BulkBlockInternal = {
|
|
47
47
|
blockId: "BULK";
|
|
@@ -49,8 +49,8 @@ export type BulkBlockInternal = {
|
|
|
49
49
|
zOrderDesktopInternal: number;
|
|
50
50
|
zOrderMobileInternal: number;
|
|
51
51
|
children: (ComponentBlock | GroupBlock)[];
|
|
52
|
-
|
|
53
|
-
|
|
52
|
+
isHeightVariableDesktop: boolean;
|
|
53
|
+
isHeightVariableMobile: boolean;
|
|
54
54
|
};
|
|
55
55
|
export declare const findBlockByBlockId: (block: Block, blockId: string) => Block | null;
|
|
56
56
|
export declare const findDirectChildrenCbIds: (block: Block, targetId: string) => number[];
|
|
@@ -217,8 +217,8 @@ export var addBulkToTarget = function (block, targetId, bulkBlockIds) {
|
|
|
217
217
|
zOrderDesktopInternal: zOrderDesktopInternal,
|
|
218
218
|
zOrderMobileInternal: zOrderMobileInternal,
|
|
219
219
|
children: bulkBlocks,
|
|
220
|
-
|
|
221
|
-
|
|
220
|
+
isHeightVariableDesktop: false,
|
|
221
|
+
isHeightVariableMobile: false,
|
|
222
222
|
};
|
|
223
223
|
// Add the bulkBlock to the target's children
|
|
224
224
|
targetBlock.children.push(bulkBlock);
|