publ-echo-test 0.0.351 → 0.0.353

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.
@@ -30,7 +30,7 @@ import { Resizable } from "../Resizable";
30
30
  var GridItem = function (_a) {
31
31
  var _b;
32
32
  var children = _a.children, props = __rest(_a, ["children"]);
33
- 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;
33
+ 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, heightFitContent = props.heightFitContent;
34
34
  var _l = useState(), resizing = _l[0], setResizing = _l[1];
35
35
  var _m = useState(), dragging = _m[0], setDragging = _m[1];
36
36
  var _o = useState(), dragStart = _o[0], setDragStart = _o[1];
@@ -604,6 +604,7 @@ var GridItem = function (_a) {
604
604
  "data-z-index": z,
605
605
  "data-z-order": zOrder,
606
606
  "data-is-pinned": props.isPinned,
607
+ "data-height-fit-content": heightFitContent,
607
608
  "data-z-order-internal": zOrderInternal,
608
609
  className: classNames("react-grid-item", child.props.className, className, {
609
610
  static: props.static,
@@ -84,6 +84,7 @@ export type GridItemProps = {
84
84
  zOrder?: number;
85
85
  zOrderInternal?: string;
86
86
  isPinned: boolean;
87
+ heightFitContent: boolean;
87
88
  };
88
89
  export type GridItemDefaultProps = {
89
90
  className: string;
@@ -533,7 +533,7 @@ var ReactGridLayout = function (_a) {
533
533
  if (!item) {
534
534
  return null;
535
535
  }
536
- return (_jsx(GridItem, { isPinned: false, w: activeDrag.w, h: activeDrag.h, x: activeDrag.x, y: activeDrag.y, z: zIndexMap.ISDRAGGING, i: activeDrag.i, 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 }));
536
+ return (_jsx(GridItem, { isPinned: 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 }));
537
537
  };
538
538
  /**
539
539
  * Given a grid item, set its style attributes & surround in a <Draggable>.
@@ -608,7 +608,7 @@ var ReactGridLayout = function (_a) {
608
608
  y: l.y,
609
609
  i: l.i,
610
610
  });
611
- return (_jsx(GridItem, { isPinned: device === "DESKTOP"
611
+ return (_jsx(GridItem, { heightFitContent: !!(l === null || l === void 0 ? void 0 : l.heightFitContent), isPinned: device === "DESKTOP"
612
612
  ? !!block.isPinnedDesktop
613
613
  : !!block.isPinnedMobile, className: classNames({
614
614
  "editable-grid-item": !isRoot && editable,
@@ -740,7 +740,7 @@ var ReactGridLayout = function (_a) {
740
740
  var parent = blockStructure
741
741
  ? findParentGroupBlock(blockStructure, block.blockId)
742
742
  : null;
743
- return (_jsx(OutsideClickHandler, { onOutsideClick: onDoubleClickOutsideGroup, children: _jsx(GroupItem, { isPinned: device === "DESKTOP"
743
+ return (_jsx(OutsideClickHandler, { onOutsideClick: onDoubleClickOutsideGroup, children: _jsx(GroupItem, { heightFitContent: false, isPinned: device === "DESKTOP"
744
744
  ? !!block.isPinnedDesktop
745
745
  : !!block.isPinnedMobile, className: classNames({
746
746
  "bulk-child-item": isInBulk,
@@ -770,7 +770,6 @@ var ReactGridLayout = function (_a) {
770
770
  : null;
771
771
  var activeRows = activeDrag &&
772
772
  Array.from({ length: activeDrag.h }, function (_, i) { return activeDrag.y + i; });
773
- console.log("activeRows", activeRows);
774
773
  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,
775
774
  // width={width}
776
775
  rowHeight: rowHeight, colWidth: colWidth, activeDrag: activeDrag, selectedBlockId: selectedBlockId, totalCols: cols })), selectedLayoutItem && (_jsx(GridBackgroundPlaceholder, { backgroundWidth: getBackgroundWidth(), backgroundHeight: getBackgroundHeight(), margin: margin,
@@ -23,6 +23,7 @@ export type LayoutItem = {
23
23
  groupLayouts?: LayoutItem[];
24
24
  autoResize?: boolean;
25
25
  isPinned?: boolean;
26
+ heightFitContent?: boolean;
26
27
  };
27
28
  export type Layout = LayoutItem[];
28
29
  export type DroppedEvent = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "publ-echo-test",
3
- "version": "0.0.351",
3
+ "version": "0.0.353",
4
4
  "private": false,
5
5
  "main": "dist/lib/index.js",
6
6
  "types": "dist/lib/index.d.js",