publ-echo-test 0.0.367 β 0.0.368
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.
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ComponentBlock, GroupBlock } from "./group";
|
|
1
2
|
import { LayoutItem } from "./types";
|
|
2
3
|
type PlaceholderProps = {
|
|
3
4
|
device: "DESKTOP" | "MOBILE";
|
|
@@ -10,6 +11,8 @@ type PlaceholderProps = {
|
|
|
10
11
|
selectedBlockId: string | null;
|
|
11
12
|
totalCols: number;
|
|
12
13
|
activeRows: number[];
|
|
14
|
+
activeBlock?: ComponentBlock | GroupBlock | null;
|
|
13
15
|
};
|
|
14
|
-
export declare function GridBackgroundPlaceholder({ device, margin, rowHeight, colWidth, backgroundWidth, backgroundHeight, activeDrag, selectedBlockId, activeRows, totalCols,
|
|
16
|
+
export declare function GridBackgroundPlaceholder({ device, margin, rowHeight, colWidth, backgroundWidth, backgroundHeight, activeDrag, selectedBlockId, activeRows, totalCols, // π‘ μλ‘ λ°μ totalCols μ¬μ©
|
|
17
|
+
activeBlock, }: PlaceholderProps): import("react/jsx-runtime").JSX.Element;
|
|
15
18
|
export {};
|
|
@@ -7,7 +7,8 @@ export function GridBackgroundPlaceholder(_a) {
|
|
|
7
7
|
// );
|
|
8
8
|
var device = _a.device, margin = _a.margin,
|
|
9
9
|
// width, // π¨ μ κ±°
|
|
10
|
-
rowHeight = _a.rowHeight, colWidth = _a.colWidth, backgroundWidth = _a.backgroundWidth, backgroundHeight = _a.backgroundHeight, activeDrag = _a.activeDrag, selectedBlockId = _a.selectedBlockId, activeRows = _a.activeRows, totalCols = _a.totalCols
|
|
10
|
+
rowHeight = _a.rowHeight, colWidth = _a.colWidth, backgroundWidth = _a.backgroundWidth, backgroundHeight = _a.backgroundHeight, activeDrag = _a.activeDrag, selectedBlockId = _a.selectedBlockId, activeRows = _a.activeRows, totalCols = _a.totalCols, // π‘ μλ‘ λ°μ totalCols μ¬μ©
|
|
11
|
+
activeBlock = _a.activeBlock;
|
|
11
12
|
// π¨ activeColsλ totalCols propμΌλ‘ λ°μμ μ¬μ©
|
|
12
13
|
// const activeCols = Array.from({ length: 24 }, (_, i) => 0 + i);
|
|
13
14
|
var activeCols = Array.from({ length: totalCols }, function (_, i) { return 0 + i; });
|
|
@@ -18,8 +19,8 @@ export function GridBackgroundPlaceholder(_a) {
|
|
|
18
19
|
// λλ, λ§μ§λ§ μμμλ margin[0]μ΄ μλ€κ³ κ°μ νκ³ κ³μ°ν©λλ€.
|
|
19
20
|
var gridContentWidth = totalCols * (colWidth + margin[0]) - margin[0];
|
|
20
21
|
var isHeightVariable = device === "DESKTOP"
|
|
21
|
-
? !!
|
|
22
|
-
: !!
|
|
22
|
+
? !!(activeBlock === null || activeBlock === void 0 ? void 0 : activeBlock.isHeightVariableDesktop)
|
|
23
|
+
: !!(activeBlock === null || activeBlock === void 0 ? void 0 : activeBlock.isHeightVariableMobile);
|
|
23
24
|
var showActiveRows = !!activeDrag.heightFitContent || isHeightVariable;
|
|
24
25
|
console.log("activeDrag in Placeholder", activeDrag); // --- IGNORE ---
|
|
25
26
|
console.log("isHeightVariable in Placeholder", isHeightVariable); // --- IGNORE ---
|
|
@@ -773,6 +773,6 @@ var ReactGridLayout = function (_a) {
|
|
|
773
773
|
: activeRows;
|
|
774
774
|
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" }), activeDragItemOrSelectedItem && (_jsx(GridBackgroundPlaceholder, { device: device, backgroundWidth: getBackgroundWidth(), backgroundHeight: getBackgroundHeight(), margin: margin,
|
|
775
775
|
// width={width}
|
|
776
|
-
rowHeight: rowHeight, activeRows: activeRowsFiltered !== null && activeRowsFiltered !== void 0 ? activeRowsFiltered : [], colWidth: colWidth, activeDrag: activeDragItemOrSelectedItem, selectedBlockId: selectedBlockId, totalCols: cols }))] }));
|
|
776
|
+
rowHeight: rowHeight, activeRows: activeRowsFiltered !== null && activeRowsFiltered !== void 0 ? activeRowsFiltered : [], colWidth: colWidth, activeDrag: activeDragItemOrSelectedItem, activeBlock: activeBlock, selectedBlockId: selectedBlockId, totalCols: cols }))] }));
|
|
777
777
|
};
|
|
778
778
|
export default ReactGridLayout;
|