publ-echo-test 0.0.206 → 0.0.208
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.
@@ -60,8 +60,6 @@ var GridItem = function (_a) {
|
|
60
60
|
if (mutation.type === 'attributes') {
|
61
61
|
var oldClass = mutation.oldValue || '';
|
62
62
|
var newClass = (_b = (_a = mutation.target) === null || _a === void 0 ? void 0 : _a.getAttribute('class')) !== null && _b !== void 0 ? _b : '';
|
63
|
-
console.log('oldClass:', oldClass);
|
64
|
-
console.log('newClass:', newClass);
|
65
63
|
// hover로 인해 "hovered" 클래스가 추가된 경우
|
66
64
|
if (!oldClass.includes('hovered') && newClass.includes('hovered')) {
|
67
65
|
console.log('Hover 상태로 변경됨');
|
@@ -43,7 +43,7 @@ import OutsideClickHandler from '../GridItem/OutsideClickHandler';
|
|
43
43
|
var layoutClassName = 'react-grid-layout';
|
44
44
|
var ReactGridLayout = function (_a) {
|
45
45
|
var children = _a.children, props = __rest(_a, ["children"]);
|
46
|
-
var _b = props.autoSize, autoSize = _b === void 0 ? true : _b, _c = props.cols, cols = _c === void 0 ? 12 : _c, _d = props.className, className = _d === void 0 ? '' : _d, _e = props.style, style = _e === void 0 ? {} : _e, _f = props.draggableHandle, draggableHandle = _f === void 0 ? '' : _f, _g = props.draggableCancel, draggableCancel = _g === void 0 ? '' : _g, _h = props.containerPadding, containerPadding = _h === void 0 ? undefined : _h, _j = props.rowHeight, rowHeight = _j === void 0 ? 150 : _j, _k = props.maxRows, maxRows = _k === void 0 ? Infinity : _k, _l = props.margin, margin = _l === void 0 ? [10, 10] : _l, _m = props.isBounded, isBounded = _m === void 0 ? false : _m, _o = props.isDraggable, isDraggable = _o === void 0 ? true : _o, _p = props.isResizable, isResizable = _p === void 0 ? true : _p, _q = props.allowOverlap, allowOverlap = _q === void 0 ? false : _q, _r = props.isDroppable, isDroppable = _r === void 0 ? false : _r, _s = props.useCSSTransforms, useCSSTransforms = _s === void 0 ? true : _s, _t = props.transformScale, transformScale = _t === void 0 ? 1 : _t, _u = props.compactType, compactType = _u === void 0 ? 'vertical' : _u, _v = props.preventCollision, preventCollision = _v === void 0 ? false : _v, _w = props.droppingItem, droppingItem = _w === void 0 ? {
|
46
|
+
var sectionId = props.sectionId, _b = props.autoSize, autoSize = _b === void 0 ? true : _b, _c = props.cols, cols = _c === void 0 ? 12 : _c, _d = props.className, className = _d === void 0 ? '' : _d, _e = props.style, style = _e === void 0 ? {} : _e, _f = props.draggableHandle, draggableHandle = _f === void 0 ? '' : _f, _g = props.draggableCancel, draggableCancel = _g === void 0 ? '' : _g, _h = props.containerPadding, containerPadding = _h === void 0 ? undefined : _h, _j = props.rowHeight, rowHeight = _j === void 0 ? 150 : _j, _k = props.maxRows, maxRows = _k === void 0 ? Infinity : _k, _l = props.margin, margin = _l === void 0 ? [10, 10] : _l, _m = props.isBounded, isBounded = _m === void 0 ? false : _m, _o = props.isDraggable, isDraggable = _o === void 0 ? true : _o, _p = props.isResizable, isResizable = _p === void 0 ? true : _p, _q = props.allowOverlap, allowOverlap = _q === void 0 ? false : _q, _r = props.isDroppable, isDroppable = _r === void 0 ? false : _r, _s = props.useCSSTransforms, useCSSTransforms = _s === void 0 ? true : _s, _t = props.transformScale, transformScale = _t === void 0 ? 1 : _t, _u = props.compactType, compactType = _u === void 0 ? 'vertical' : _u, _v = props.preventCollision, preventCollision = _v === void 0 ? false : _v, _w = props.droppingItem, droppingItem = _w === void 0 ? {
|
47
47
|
i: '__dropping-elem__',
|
48
48
|
h: 1,
|
49
49
|
w: 1,
|
@@ -739,7 +739,7 @@ var ReactGridLayout = function (_a) {
|
|
739
739
|
var currentGroupBlocks = blockStructure
|
740
740
|
? findGroupBlocks(blockStructure, editingGroupBlock)
|
741
741
|
: [];
|
742
|
-
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: {
|
742
|
+
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("div", { className: 'grid-placeholder', style: {
|
743
743
|
marginTop: margin[1] + 'px',
|
744
744
|
marginBottom: margin[1] + 'px',
|
745
745
|
marginLeft: margin[0] + 'px',
|
@@ -107,11 +107,9 @@ export var findDirectChildrenBlockIds = function (block, targetId) {
|
|
107
107
|
export var findGroupBlocks = function (block, targetId) {
|
108
108
|
var targetBlock = findBlockByBlockId(block, targetId);
|
109
109
|
if (!targetBlock) {
|
110
|
-
console.error('Target block not found');
|
111
110
|
return [];
|
112
111
|
}
|
113
112
|
if (targetBlock.type !== 'GROUP_BLOCK') {
|
114
|
-
console.error('Target block is not a group block');
|
115
113
|
return [];
|
116
114
|
}
|
117
115
|
var groupBlocks = targetBlock.children.filter(function (child) { return child.type === 'GROUP_BLOCK'; });
|
@@ -1,8 +1,8 @@
|
|
1
|
-
import { DragEvent, ReactElement, RefObject } from
|
2
|
-
import { ResizeHandleAxis, ResizeHandleType } from
|
3
|
-
import { ResizeEventType } from
|
4
|
-
import { Block } from
|
5
|
-
export type CompactType =
|
1
|
+
import { DragEvent, ReactElement, RefObject } from 'react';
|
2
|
+
import { ResizeHandleAxis, ResizeHandleType } from '../Resizable/types';
|
3
|
+
import { ResizeEventType } from '../GridItem/types';
|
4
|
+
import { Block } from './group';
|
5
|
+
export type CompactType = 'vertical' | 'horizontal';
|
6
6
|
export type LayoutItem = {
|
7
7
|
w: number;
|
8
8
|
h: number;
|
@@ -35,6 +35,7 @@ export type UpdatedItem = {
|
|
35
35
|
y: number;
|
36
36
|
};
|
37
37
|
export type ReactGridLayoutProps = {
|
38
|
+
sectionId: string;
|
38
39
|
children: ReactElement<any> | ReactElement[];
|
39
40
|
className?: string;
|
40
41
|
style?: Object;
|
@@ -142,7 +143,7 @@ export type ResponsiveGridLayoutStateType = {
|
|
142
143
|
layout: Layout;
|
143
144
|
layouts?: ResponsiveLayout<string>;
|
144
145
|
};
|
145
|
-
type CoreType = Omit<ReactGridLayoutProps,
|
146
|
+
type CoreType = Omit<ReactGridLayoutProps, 'cols' | 'layout' | 'margin' | 'containerPadding' | 'transformScale' | 'onLayoutChange' | 'isHiddenVisibility'>;
|
146
147
|
export type ResponsiveGridLayoutProps = {
|
147
148
|
breakpoint?: Breakpoint;
|
148
149
|
breakpoints?: Breakpoints<Breakpoint>;
|
@@ -156,7 +157,7 @@ export type ResponsiveGridLayoutProps = {
|
|
156
157
|
zoom?: number;
|
157
158
|
} & CoreType;
|
158
159
|
export type Breakpoint = string;
|
159
|
-
export type DefaultBreakpoints =
|
160
|
+
export type DefaultBreakpoints = 'lg' | 'md' | 'sm' | 'xs' | 'xxs';
|
160
161
|
export type ResponsiveLayout<T extends Breakpoint> = Record<T, Layout>;
|
161
162
|
export type Breakpoints<T extends Breakpoint> = Record<T, number>;
|
162
163
|
export type OnLayoutChangeCallback = (properties: {
|