publ-echo-test 0.0.112 → 0.0.114
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.
@@ -57,8 +57,8 @@ var ReactGridLayout = function (_a) {
|
|
57
57
|
var _6 = useState(), droppingDOMNode = _6[0], setDroppingDOMNode = _6[1];
|
58
58
|
var _7 = useState(), droppingPosition = _7[0], setDroppingPosition = _7[1];
|
59
59
|
var _8 = useState(false), isMounted = _8[0], setIsMounted = _8[1];
|
60
|
-
var editableItems = blockStructure ? findChildrenComponentIds(blockStructure
|
61
|
-
var editingGroupAllChildren = (blockStructure && editingGroupBlock) ? findAllChildrenComponentIds(blockStructure
|
60
|
+
var editableItems = blockStructure ? findChildrenComponentIds(blockStructure, editingGroupBlock) : [];
|
61
|
+
var editingGroupAllChildren = (blockStructure && editingGroupBlock) ? findAllChildrenComponentIds(blockStructure, editingGroupBlock).map(function (i) { return i.toString(); }) : [];
|
62
62
|
var _9 = useState([]), oldGroupChildren = _9[0], setOldGroupChildren = _9[1];
|
63
63
|
var _10 = useState(function () {
|
64
64
|
return synchronizeLayoutWithChildren(props.layout || [], children, cols, compactType, allowOverlap);
|
@@ -147,7 +147,7 @@ var ReactGridLayout = function (_a) {
|
|
147
147
|
if (!blockStructure) {
|
148
148
|
return;
|
149
149
|
}
|
150
|
-
var childrenIds = findAllChildrenComponentIds(blockStructure
|
150
|
+
var childrenIds = findAllChildrenComponentIds(blockStructure, i).map(function (i) { return i.toString(); });
|
151
151
|
var children_1 = childrenIds.map(function (id) {
|
152
152
|
var item = getLayoutItem(layout, id);
|
153
153
|
return cloneLayoutItem(item);
|
@@ -174,7 +174,7 @@ var ReactGridLayout = function (_a) {
|
|
174
174
|
if (!blockStructure) {
|
175
175
|
return;
|
176
176
|
}
|
177
|
-
var children_2 = findChildrenComponentIds(blockStructure
|
177
|
+
var children_2 = findChildrenComponentIds(blockStructure, i).map(function (id) {
|
178
178
|
var item = getLayoutItem(layout, id);
|
179
179
|
return cloneLayoutItem(item);
|
180
180
|
});
|
@@ -515,7 +515,7 @@ var ReactGridLayout = function (_a) {
|
|
515
515
|
var originalKey = String(child.key).split(".$");
|
516
516
|
return originalKey[1] === l.i;
|
517
517
|
});
|
518
|
-
var isInBulk = blockStructure && (bulkIds === null || bulkIds === void 0 ? void 0 : bulkIds.includes(getBlockIdByComponentId(blockStructure
|
518
|
+
var isInBulk = blockStructure && (bulkIds === null || bulkIds === void 0 ? void 0 : bulkIds.includes(getBlockIdByComponentId(blockStructure, Number(activeDrag.i))));
|
519
519
|
if (!item) {
|
520
520
|
return null;
|
521
521
|
}
|
@@ -544,7 +544,7 @@ var ReactGridLayout = function (_a) {
|
|
544
544
|
var bounded = draggable && isBounded && l.isBounded !== false;
|
545
545
|
var editable = editableItems.includes(l.i);
|
546
546
|
var z = l.z || 0;
|
547
|
-
var isInBulk = blockStructure && (bulkIds === null || bulkIds === void 0 ? void 0 : bulkIds.includes(getBlockIdByComponentId(blockStructure
|
547
|
+
var isInBulk = blockStructure && (bulkIds === null || bulkIds === void 0 ? void 0 : bulkIds.includes(getBlockIdByComponentId(blockStructure, Number(l.i))));
|
548
548
|
var isRoot = editingGroupBlock === 'ROOT';
|
549
549
|
var baseZ = function () {
|
550
550
|
if (isInBulk) {
|
@@ -639,7 +639,7 @@ var ReactGridLayout = function (_a) {
|
|
639
639
|
if (!blockStructure) {
|
640
640
|
return;
|
641
641
|
}
|
642
|
-
var childrenIds = findAllChildrenComponentIds(blockStructure
|
642
|
+
var childrenIds = findAllChildrenComponentIds(blockStructure, block.blockId).map(function (i) { return i.toString(); });
|
643
643
|
var groupItem = getBoundingArea(layout, childrenIds);
|
644
644
|
// const draggable =
|
645
645
|
// typeof l.isDraggable === "boolean"
|
@@ -698,7 +698,7 @@ var ReactGridLayout = function (_a) {
|
|
698
698
|
// resizeHandle={resizeHandle}
|
699
699
|
isHiddenVisibility: isHiddenVisibility, customColWidth: colWidth, autoResize: false, onContextGroup: handleClickContextGroup, children: _jsx("div", { onClick: handleClick, onDoubleClick: handleDoubleClick }) }, block.blockId) }));
|
700
700
|
};
|
701
|
-
var currentGroupBlocks = blockStructure ? findGroupBlocks(blockStructure
|
701
|
+
var currentGroupBlocks = blockStructure ? findGroupBlocks(blockStructure, editingGroupBlock) : [];
|
702
702
|
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, 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("div", { className: "grid-placeholder", style: {
|
703
703
|
marginTop: margin[1] + "px",
|
704
704
|
marginBottom: margin[1] + "px",
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { DragEvent, ReactElement, RefObject } from "react";
|
2
2
|
import { ResizeHandleAxis, ResizeHandleType } from "../Resizable/types";
|
3
3
|
import { ResizeEventType } from "../GridItem/types";
|
4
|
-
import {
|
4
|
+
import { Block } from "./group";
|
5
5
|
export type CompactType = "vertical" | "horizontal";
|
6
6
|
export type LayoutItem = {
|
7
7
|
w: number;
|
@@ -79,7 +79,7 @@ export type ReactGridLayoutProps = {
|
|
79
79
|
minNbRow?: number;
|
80
80
|
customColWidth?: number;
|
81
81
|
onFitToContent?: OnFitContentCallBack;
|
82
|
-
blockStructure?:
|
82
|
+
blockStructure?: Block[];
|
83
83
|
onDoubleClickGroup?: (e: React.MouseEvent, id: string, type: string) => void;
|
84
84
|
selectedGroupBlock?: 'ROOT' | string;
|
85
85
|
editingGroupBlock?: 'ROOT' | string;
|