@byeolnaerim/flex-layout 0.0.5 → 0.0.6
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/README.en.md +314 -0
- package/README.ko.md +312 -0
- package/README.md +314 -0
- package/dist/components.cjs +651 -657
- package/dist/components.cjs.map +1 -1
- package/dist/components.js +546 -553
- package/dist/components.js.map +1 -1
- package/dist/flex-layout/components/FlexLayout.d.ts +2 -0
- package/dist/flex-layout/components/FlexLayoutContainer.d.ts +2 -0
- package/dist/flex-layout/components/FlexLayoutResizePanel.d.ts +2 -0
- package/dist/flex-layout/components/FlexLayoutSplitScreen.d.ts +11 -0
- package/dist/flex-layout/components/FlexLayoutSplitScreenDragBox.d.ts +27 -0
- package/dist/flex-layout/components/FlexLayoutSplitScreenDragBoxContainer.d.ts +5 -0
- package/dist/flex-layout/components/FlexLayoutSplitScreenDragBoxItem.d.ts +8 -0
- package/dist/flex-layout/components/FlexLayoutSplitScreenDragBoxTitleMore.d.ts +3 -0
- package/dist/flex-layout/components/FlexLayoutSplitScreenScrollBox.d.ts +9 -0
- package/dist/flex-layout/components/FlexLayoutStickyBox.d.ts +29 -0
- package/dist/flex-layout/components/index.d.ts +7 -0
- package/dist/flex-layout/hooks/index.d.ts +2 -0
- package/dist/{useDrag-DR01Ob3s.d.ts → flex-layout/hooks/useDrag.d.ts} +19 -22
- package/dist/flex-layout/hooks/useFlexLayoutSplitScreen.d.ts +28 -0
- package/dist/{hooks.d.ts → flex-layout/hooks/useListPaging.d.ts} +6 -12
- package/dist/flex-layout/hooks/useSizes.d.ts +8 -0
- package/dist/flex-layout/index.d.ts +5 -0
- package/dist/flex-layout/providers/FlexLayoutContext.d.ts +8 -0
- package/dist/flex-layout/providers/FlexLayoutHooks.d.ts +51 -0
- package/dist/flex-layout/providers/index.d.ts +1 -0
- package/dist/flex-layout/store/FlexLayoutContainerStore.d.ts +62 -0
- package/dist/flex-layout/store/index.d.ts +1 -0
- package/dist/flex-layout/styles/FlexLayout.module.css +416 -0
- package/dist/flex-layout/styles/listScroll.module.css +85 -0
- package/dist/flex-layout/styles/shake.module.css +41 -0
- package/dist/flex-layout/types/FlexDirectionTypes.d.ts +6 -0
- package/dist/flex-layout/types/FlexLayoutTypes.d.ts +53 -0
- package/dist/flex-layout/utils/FlexLayoutUtils.d.ts +26 -0
- package/dist/flex-layout/utils/index.d.ts +1 -0
- package/dist/hooks.cjs.map +1 -1
- package/dist/hooks.js.map +1 -1
- package/dist/index.cjs +3454 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +471 -0
- package/dist/index.css.map +1 -0
- package/dist/index.d.ts +1 -2
- package/dist/index.js +3395 -0
- package/dist/index.js.map +1 -1
- package/package.json +18 -64
- package/dist/FlexLayoutSplitScreenDragBox-eCtq4kLd.d.cts +0 -31
- package/dist/FlexLayoutSplitScreenDragBox-eCtq4kLd.d.ts +0 -31
- package/dist/components.d.cts +0 -122
- package/dist/components.d.ts +0 -122
- package/dist/hooks.d.cts +0 -37
- package/dist/index.d.cts +0 -2
- package/dist/providers.d.cts +0 -54
- package/dist/providers.d.ts +0 -54
- package/dist/store.d.cts +0 -67
- package/dist/store.d.ts +0 -67
- package/dist/useDrag-CYQnhUFk.d.cts +0 -108
- package/dist/utils.d.cts +0 -28
- package/dist/utils.d.ts +0 -28
package/dist/components.js
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { createContext, memo, useRef, useState, useEffect, Children, isValidElement, Fragment
|
|
1
|
+
import React2, { createContext, memo, useRef, useState, useEffect, Children, isValidElement, Fragment, useCallback, useContext, useLayoutEffect, cloneElement } from 'react';
|
|
2
2
|
import equal from 'fast-deep-equal';
|
|
3
3
|
import { BehaviorSubject, Subject, fromEvent, distinctUntilChanged as distinctUntilChanged$1, take as take$1, combineLatest, map as map$1 } from 'rxjs';
|
|
4
4
|
import { throttleTime, take, filter, map, distinctUntilChanged } from 'rxjs/operators';
|
|
5
|
-
import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
|
|
6
5
|
|
|
7
6
|
// src/flex-layout/components/FlexLayout.tsx
|
|
8
7
|
function updateScrollStore(subject, newValue) {
|
|
@@ -438,9 +437,11 @@ function FlexLayoutProvider({
|
|
|
438
437
|
value,
|
|
439
438
|
children
|
|
440
439
|
}) {
|
|
441
|
-
return /* @__PURE__ */
|
|
440
|
+
return /* @__PURE__ */ React.createElement(FlexLayoutContext.Provider, { value }, children);
|
|
442
441
|
}
|
|
443
|
-
|
|
442
|
+
|
|
443
|
+
// src/flex-layout/components/FlexLayout.tsx
|
|
444
|
+
function FlexLayout({
|
|
444
445
|
layoutName,
|
|
445
446
|
direction,
|
|
446
447
|
children,
|
|
@@ -449,10 +450,10 @@ var FlexLayout = ({
|
|
|
449
450
|
panelClassName,
|
|
450
451
|
panelMovementMode = "divorce",
|
|
451
452
|
...props
|
|
452
|
-
})
|
|
453
|
+
}) {
|
|
453
454
|
const containerCount = Children.count(children);
|
|
454
455
|
const fitContent = direction === "row" ? "width" : "height";
|
|
455
|
-
const isFragmentElement = (node) => isValidElement(node) && node.type === Fragment
|
|
456
|
+
const isFragmentElement = (node) => isValidElement(node) && node.type === Fragment;
|
|
456
457
|
const nodes = Children.toArray(children).flatMap(
|
|
457
458
|
(node) => isFragmentElement(node) ? Children.toArray(node.props.children) : [node]
|
|
458
459
|
);
|
|
@@ -462,7 +463,7 @@ var FlexLayout = ({
|
|
|
462
463
|
if (flattenedChildren.length === 0) {
|
|
463
464
|
return null;
|
|
464
465
|
}
|
|
465
|
-
return /* @__PURE__ */
|
|
466
|
+
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
|
|
466
467
|
FlexLayoutProvider,
|
|
467
468
|
{
|
|
468
469
|
value: {
|
|
@@ -472,35 +473,31 @@ var FlexLayout = ({
|
|
|
472
473
|
panelClassName,
|
|
473
474
|
containerCount,
|
|
474
475
|
fitContent
|
|
476
|
+
}
|
|
477
|
+
},
|
|
478
|
+
/* @__PURE__ */ React.createElement(
|
|
479
|
+
"div",
|
|
480
|
+
{
|
|
481
|
+
className: `${FlexLayout_default["flex-layout"]} ${className && className !== "" ? className : ""}`,
|
|
482
|
+
...ref ? { ref } : {},
|
|
483
|
+
...props,
|
|
484
|
+
"data-layout_name": layoutName,
|
|
485
|
+
"data-direction": direction
|
|
475
486
|
},
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
{
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
{
|
|
491
|
-
layoutName,
|
|
492
|
-
containerName: child.props.containerName,
|
|
493
|
-
sizeName: fitContent
|
|
494
|
-
}
|
|
495
|
-
)
|
|
496
|
-
] }, index);
|
|
497
|
-
})
|
|
498
|
-
}
|
|
499
|
-
)
|
|
500
|
-
}
|
|
501
|
-
) });
|
|
502
|
-
};
|
|
503
|
-
var FlexLayout_default2 = FlexLayout;
|
|
487
|
+
flattenedChildren.map((child, index) => {
|
|
488
|
+
if (!child || !isValidElement(child)) return null;
|
|
489
|
+
return /* @__PURE__ */ React.createElement(Fragment, { key: index }, child, /* @__PURE__ */ React.createElement(
|
|
490
|
+
ContainerOpenCloseProvider,
|
|
491
|
+
{
|
|
492
|
+
layoutName,
|
|
493
|
+
containerName: child.props.containerName,
|
|
494
|
+
sizeName: fitContent
|
|
495
|
+
}
|
|
496
|
+
));
|
|
497
|
+
})
|
|
498
|
+
)
|
|
499
|
+
));
|
|
500
|
+
}
|
|
504
501
|
var useSize = (sizeName) => {
|
|
505
502
|
const ref = useRef(null);
|
|
506
503
|
const [size, setSize] = useState(void 0);
|
|
@@ -541,7 +538,7 @@ var flexDirectionModel = {
|
|
|
541
538
|
resizeCursor: "ns-resize"
|
|
542
539
|
}
|
|
543
540
|
};
|
|
544
|
-
|
|
541
|
+
function FlexLayoutResizePanel({
|
|
545
542
|
direction,
|
|
546
543
|
containerCount,
|
|
547
544
|
panelMode = "default",
|
|
@@ -549,7 +546,7 @@ var FlexLayoutResizePanel = ({
|
|
|
549
546
|
layoutName,
|
|
550
547
|
panelClassName,
|
|
551
548
|
panelMovementMode
|
|
552
|
-
})
|
|
549
|
+
}) {
|
|
553
550
|
let isResizePanelClickRef = useRef(false);
|
|
554
551
|
let prevTouchEvent = null;
|
|
555
552
|
let parentSizeRef = useRef(0);
|
|
@@ -628,6 +625,8 @@ var FlexLayoutResizePanel = ({
|
|
|
628
625
|
}
|
|
629
626
|
const targetFlexGrow = targetSize / (parentSizeRef.current - 1) * containerCountRef.current;
|
|
630
627
|
const nextElementFlexGrow = nextElementSize / (parentSizeRef.current - 1) * containerCountRef.current;
|
|
628
|
+
if (!(targetElement instanceof HTMLElement)) return;
|
|
629
|
+
if (!(nextElement instanceof HTMLElement)) return;
|
|
631
630
|
targetElement.style.flex = `${targetFlexGrow} 1 0%`;
|
|
632
631
|
nextElement.style.flex = `${nextElementFlexGrow} 1 0%`;
|
|
633
632
|
}
|
|
@@ -676,20 +675,21 @@ var FlexLayoutResizePanel = ({
|
|
|
676
675
|
if (!panelRef.current) return;
|
|
677
676
|
setResizePanelRef(layoutName, containerName, panelRef);
|
|
678
677
|
}, [containerName, layoutName]);
|
|
679
|
-
return /* @__PURE__ */
|
|
678
|
+
return /* @__PURE__ */ React.createElement(
|
|
680
679
|
"div",
|
|
681
680
|
{
|
|
682
681
|
id: containerName + "_resize_panel",
|
|
683
682
|
className: `${FlexLayout_default["flex-resize-panel"]} ${FlexLayout_default[panelMode]} ${panelClassName && panelClassName !== "" ? panelClassName : ""}`,
|
|
684
683
|
ref: panelRef,
|
|
685
684
|
onMouseDown: panelMouseDownEvent,
|
|
686
|
-
onTouchStart: panelMouseDownEvent
|
|
687
|
-
|
|
688
|
-
}
|
|
685
|
+
onTouchStart: panelMouseDownEvent
|
|
686
|
+
},
|
|
687
|
+
/* @__PURE__ */ React.createElement("div", { className: FlexLayout_default.hover })
|
|
689
688
|
);
|
|
690
|
-
}
|
|
691
|
-
|
|
692
|
-
|
|
689
|
+
}
|
|
690
|
+
|
|
691
|
+
// src/flex-layout/components/FlexLayoutContainer.tsx
|
|
692
|
+
function FlexLayoutContainer({
|
|
693
693
|
isFitContent,
|
|
694
694
|
isFitResize,
|
|
695
695
|
// fitContent,
|
|
@@ -703,7 +703,7 @@ var FlexLayoutContainer = ({
|
|
|
703
703
|
children,
|
|
704
704
|
className,
|
|
705
705
|
panelMode
|
|
706
|
-
})
|
|
706
|
+
}) {
|
|
707
707
|
const {
|
|
708
708
|
direction,
|
|
709
709
|
panelMovementMode,
|
|
@@ -826,46 +826,42 @@ var FlexLayoutContainer = ({
|
|
|
826
826
|
});
|
|
827
827
|
}
|
|
828
828
|
}, []);
|
|
829
|
-
return /* @__PURE__ */
|
|
830
|
-
|
|
829
|
+
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
|
|
830
|
+
"div",
|
|
831
|
+
{
|
|
832
|
+
id: containerName,
|
|
833
|
+
"data-container_name": containerName,
|
|
834
|
+
ref: flexContainerRef,
|
|
835
|
+
className: `${FlexLayout_default["flex-container"]} ${className && className !== "" ? className : ""}`,
|
|
836
|
+
...growState !== void 0 ? { ["data-grow"]: growState } : {},
|
|
837
|
+
...prevGrowState != void 0 ? { ["data-prev_grow"]: prevGrowState } : {},
|
|
838
|
+
"data-is_resize": isInitialResizable,
|
|
839
|
+
"data-is_resize_panel": isResizePanel,
|
|
840
|
+
style: growState !== void 0 && {
|
|
841
|
+
flex: `${growState} 1 0%`
|
|
842
|
+
} || {}
|
|
843
|
+
},
|
|
844
|
+
isFitContent && /* @__PURE__ */ React.createElement(
|
|
831
845
|
"div",
|
|
832
846
|
{
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
) || children
|
|
852
|
-
}
|
|
853
|
-
),
|
|
854
|
-
isResizePanel && /* @__PURE__ */ jsx(
|
|
855
|
-
FlexLayoutResizePanel_default,
|
|
856
|
-
{
|
|
857
|
-
containerName,
|
|
858
|
-
layoutName,
|
|
859
|
-
direction,
|
|
860
|
-
containerCount,
|
|
861
|
-
panelMode,
|
|
862
|
-
panelClassName,
|
|
863
|
-
panelMovementMode
|
|
864
|
-
}
|
|
865
|
-
)
|
|
866
|
-
] });
|
|
867
|
-
};
|
|
868
|
-
var FlexLayoutContainer_default = FlexLayoutContainer;
|
|
847
|
+
className: `${FlexLayout_default["flex-content-fit-wrapper"]}`,
|
|
848
|
+
ref
|
|
849
|
+
},
|
|
850
|
+
children
|
|
851
|
+
) || children
|
|
852
|
+
), isResizePanel && /* @__PURE__ */ React.createElement(
|
|
853
|
+
FlexLayoutResizePanel,
|
|
854
|
+
{
|
|
855
|
+
containerName,
|
|
856
|
+
layoutName,
|
|
857
|
+
direction,
|
|
858
|
+
containerCount,
|
|
859
|
+
panelMode,
|
|
860
|
+
panelClassName,
|
|
861
|
+
panelMovementMode
|
|
862
|
+
}
|
|
863
|
+
));
|
|
864
|
+
}
|
|
869
865
|
var dragState = new Subject();
|
|
870
866
|
var filterChildren = (obj) => {
|
|
871
867
|
const { children, ...rest } = obj || {};
|
|
@@ -1237,10 +1233,18 @@ function FlexLayoutSplitScreenDragBox({
|
|
|
1237
1233
|
velocity.current = { vx, vy };
|
|
1238
1234
|
if (!scrollRAF.current) {
|
|
1239
1235
|
const step = () => {
|
|
1240
|
-
scrollTargetRef?.current
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1236
|
+
const target = scrollTargetRef?.current ?? document.scrollingElement;
|
|
1237
|
+
if (target?.scrollBy) {
|
|
1238
|
+
target.scrollBy(
|
|
1239
|
+
velocity.current.vx,
|
|
1240
|
+
velocity.current.vy
|
|
1241
|
+
);
|
|
1242
|
+
} else {
|
|
1243
|
+
window.scrollBy(
|
|
1244
|
+
velocity.current.vx,
|
|
1245
|
+
velocity.current.vy
|
|
1246
|
+
);
|
|
1247
|
+
}
|
|
1244
1248
|
if (velocity.current.vx === 0 && velocity.current.vy === 0) {
|
|
1245
1249
|
scrollRAF.current = null;
|
|
1246
1250
|
return;
|
|
@@ -1392,7 +1396,7 @@ function FlexLayoutSplitScreenDragBox({
|
|
|
1392
1396
|
el.removeEventListener("contextmenu", onCtx);
|
|
1393
1397
|
};
|
|
1394
1398
|
}, []);
|
|
1395
|
-
return /* @__PURE__ */
|
|
1399
|
+
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
|
|
1396
1400
|
"div",
|
|
1397
1401
|
{
|
|
1398
1402
|
className: `${className || ""} ${FlexLayout_default["flex-split-screen-drag-box"]}`,
|
|
@@ -1475,14 +1479,16 @@ function FlexLayoutSplitScreenDragBox({
|
|
|
1475
1479
|
});
|
|
1476
1480
|
},
|
|
1477
1481
|
style: { ...style },
|
|
1478
|
-
...props
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
)
|
|
1482
|
+
...props
|
|
1483
|
+
},
|
|
1484
|
+
children
|
|
1485
|
+
));
|
|
1482
1486
|
}
|
|
1483
1487
|
|
|
1484
1488
|
// src/flex-layout/styles/listScroll.module.css
|
|
1485
1489
|
var listScroll_default = {};
|
|
1490
|
+
|
|
1491
|
+
// src/flex-layout/components/FlexLayoutSplitScreenScrollBox.tsx
|
|
1486
1492
|
var FlexLayoutSplitScreenScrollBox = ({
|
|
1487
1493
|
className,
|
|
1488
1494
|
children,
|
|
@@ -1546,7 +1552,7 @@ var FlexLayoutSplitScreenScrollBox = ({
|
|
|
1546
1552
|
scrollRef.current?.removeEventListener("wheel", handleWheel);
|
|
1547
1553
|
};
|
|
1548
1554
|
}, []);
|
|
1549
|
-
return /* @__PURE__ */
|
|
1555
|
+
return /* @__PURE__ */ React.createElement(
|
|
1550
1556
|
"div",
|
|
1551
1557
|
{
|
|
1552
1558
|
ref: scrollRef,
|
|
@@ -1569,27 +1575,29 @@ var FlexLayoutSplitScreenScrollBox = ({
|
|
|
1569
1575
|
});
|
|
1570
1576
|
},
|
|
1571
1577
|
className: `${className || ""} ${isDefaultScrollStyle ? listScroll_default["default-scroll"] : listScroll_default["list-scroll"]} ${direction ? listScroll_default[direction] : ""}`,
|
|
1572
|
-
...props
|
|
1573
|
-
|
|
1574
|
-
|
|
1578
|
+
...props
|
|
1579
|
+
},
|
|
1580
|
+
children
|
|
1575
1581
|
);
|
|
1576
1582
|
};
|
|
1577
1583
|
var FlexLayoutSplitScreenScrollBox_default = memo(FlexLayoutSplitScreenScrollBox);
|
|
1584
|
+
|
|
1585
|
+
// src/flex-layout/components/FlexLayoutSplitScreenDragBoxContainer.tsx
|
|
1578
1586
|
function FlexLayoutSplitScreenDragBoxContainer({
|
|
1579
1587
|
className,
|
|
1580
1588
|
children,
|
|
1581
1589
|
layoutName,
|
|
1582
1590
|
...props
|
|
1583
1591
|
}) {
|
|
1584
|
-
return /* @__PURE__ */
|
|
1592
|
+
return /* @__PURE__ */ React.createElement(
|
|
1585
1593
|
FlexLayoutSplitScreenScrollBox_default,
|
|
1586
1594
|
{
|
|
1587
1595
|
keyName: layoutName,
|
|
1588
1596
|
className: `${FlexLayout_default["flex-split-screen-drag-box-title-container"]} ${className && className !== "" && className || ""}`,
|
|
1589
1597
|
direction: "x",
|
|
1590
|
-
...props
|
|
1591
|
-
|
|
1592
|
-
|
|
1598
|
+
...props
|
|
1599
|
+
},
|
|
1600
|
+
children
|
|
1593
1601
|
);
|
|
1594
1602
|
}
|
|
1595
1603
|
function FlexLayoutSplitScreenDragBoxItem({
|
|
@@ -1605,35 +1613,35 @@ function FlexLayoutSplitScreenDragBoxItem({
|
|
|
1605
1613
|
allSplitScreenCount.next(allSplitScreenCount.value - 1);
|
|
1606
1614
|
};
|
|
1607
1615
|
}, []);
|
|
1608
|
-
return /* @__PURE__ */
|
|
1616
|
+
return /* @__PURE__ */ React.createElement(
|
|
1609
1617
|
"div",
|
|
1610
1618
|
{
|
|
1611
1619
|
className: `${FlexLayout_default["flex-split-screen-drag-box-title-item"]} ${isActive ? FlexLayout_default["active"] : ""}`,
|
|
1612
|
-
...props
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
]
|
|
1617
|
-
}
|
|
1620
|
+
...props
|
|
1621
|
+
},
|
|
1622
|
+
children,
|
|
1623
|
+
/* @__PURE__ */ React.createElement("button", { type: "button", onClick: (ev) => onClose(ev) }, "X")
|
|
1618
1624
|
);
|
|
1619
1625
|
}
|
|
1626
|
+
|
|
1627
|
+
// src/flex-layout/components/FlexLayoutSplitScreenDragBoxTitleMore.tsx
|
|
1620
1628
|
function FlexLayoutSplitScreenDragBoxTitleMore({
|
|
1621
1629
|
className,
|
|
1622
1630
|
...props
|
|
1623
1631
|
}) {
|
|
1624
|
-
return /* @__PURE__ */
|
|
1632
|
+
return /* @__PURE__ */ React.createElement(
|
|
1625
1633
|
"button",
|
|
1626
1634
|
{
|
|
1627
1635
|
...props,
|
|
1628
|
-
className: `${FlexLayout_default["flex-split-screen-drag-box-title-more"]} ${className || ""}
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
]
|
|
1634
|
-
}
|
|
1636
|
+
className: `${FlexLayout_default["flex-split-screen-drag-box-title-more"]} ${className || ""}`
|
|
1637
|
+
},
|
|
1638
|
+
/* @__PURE__ */ React.createElement("span", null, "."),
|
|
1639
|
+
/* @__PURE__ */ React.createElement("span", null, "."),
|
|
1640
|
+
/* @__PURE__ */ React.createElement("span", null, ".")
|
|
1635
1641
|
);
|
|
1636
1642
|
}
|
|
1643
|
+
|
|
1644
|
+
// src/flex-layout/components/FlexLayoutSplitScreen.tsx
|
|
1637
1645
|
function isOverDrop({
|
|
1638
1646
|
x,
|
|
1639
1647
|
y,
|
|
@@ -2077,142 +2085,137 @@ function FlexLayoutSplitScreen({
|
|
|
2077
2085
|
afterDropTargetComponent,
|
|
2078
2086
|
centerDropTargetComponent
|
|
2079
2087
|
]);
|
|
2080
|
-
return /* @__PURE__ */
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
|
|
2088
|
+
return /* @__PURE__ */ React.createElement("div", { className: `${FlexLayout_default["flex-split-screen"]}`, ref: layoutRef }, /* @__PURE__ */ React.createElement(
|
|
2089
|
+
FlexLayout,
|
|
2090
|
+
{
|
|
2091
|
+
direction,
|
|
2092
|
+
layoutName,
|
|
2093
|
+
"data-is_split": isSplit,
|
|
2094
|
+
panelMovementMode: "bulldozer"
|
|
2095
|
+
},
|
|
2096
|
+
beforeDropTargetComponent.length != 0 ? /* @__PURE__ */ React.createElement(React.Fragment, null, beforeDropTargetComponent.map(
|
|
2097
|
+
({
|
|
2098
|
+
containerName: cName,
|
|
2099
|
+
component,
|
|
2100
|
+
navigationTitle: navigationTitle2,
|
|
2101
|
+
dropDocumentOutsideOption: dropDocumentOutsideOption2,
|
|
2102
|
+
screenKey: screenKey2
|
|
2103
|
+
}, i) => /* @__PURE__ */ React.createElement(
|
|
2104
|
+
FlexLayoutContainer,
|
|
2105
|
+
{
|
|
2106
|
+
containerName: cName,
|
|
2107
|
+
isInitialResizable: true,
|
|
2108
|
+
isResizePanel: true,
|
|
2109
|
+
key: cName
|
|
2110
|
+
},
|
|
2111
|
+
/* @__PURE__ */ React.createElement(
|
|
2112
|
+
FlexLayoutSplitScreenChild,
|
|
2113
|
+
{
|
|
2114
|
+
parentDirection: direction,
|
|
2115
|
+
layoutName: `${layoutName}_before`,
|
|
2116
|
+
parentLayoutName: layoutName,
|
|
2117
|
+
containerName: cName,
|
|
2118
|
+
depth: 1,
|
|
2119
|
+
rootRef: layoutRef,
|
|
2120
|
+
screenKey: screenKey2,
|
|
2121
|
+
initialCenterComponents: [
|
|
2098
2122
|
{
|
|
2123
|
+
navigationTitle: navigationTitle2,
|
|
2124
|
+
component,
|
|
2099
2125
|
containerName: cName,
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
|
|
2104
|
-
|
|
2105
|
-
|
|
2106
|
-
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
|
|
2114
|
-
|
|
2115
|
-
|
|
2116
|
-
|
|
2117
|
-
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
|
|
2122
|
-
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
|
|
2127
|
-
) }) : /* @__PURE__ */ jsx("div", {}),
|
|
2128
|
-
centerDropTargetComponent.length === 0 ? /* @__PURE__ */ jsx("div", {}) : /* @__PURE__ */ jsx(
|
|
2129
|
-
FlexLayoutContainer_default,
|
|
2126
|
+
dropDocumentOutsideOption: dropDocumentOutsideOption2,
|
|
2127
|
+
screenKey: screenKey2
|
|
2128
|
+
}
|
|
2129
|
+
],
|
|
2130
|
+
rootName: layoutName
|
|
2131
|
+
}
|
|
2132
|
+
)
|
|
2133
|
+
)
|
|
2134
|
+
)) : /* @__PURE__ */ React.createElement("div", null),
|
|
2135
|
+
centerDropTargetComponent.length === 0 ? /* @__PURE__ */ React.createElement("div", null) : /* @__PURE__ */ React.createElement(
|
|
2136
|
+
FlexLayoutContainer,
|
|
2137
|
+
{
|
|
2138
|
+
containerName: `${centerDropTargetComponent[0].containerName}`,
|
|
2139
|
+
isInitialResizable: true,
|
|
2140
|
+
isResizePanel: isSplit
|
|
2141
|
+
},
|
|
2142
|
+
isSplit ? /* @__PURE__ */ React.createElement(
|
|
2143
|
+
FlexLayoutSplitScreenChild,
|
|
2144
|
+
{
|
|
2145
|
+
parentDirection: direction,
|
|
2146
|
+
layoutName: `${layoutName}_center`,
|
|
2147
|
+
parentLayoutName: layoutName,
|
|
2148
|
+
containerName: `${centerDropTargetComponent[0].containerName}`,
|
|
2149
|
+
depth: 0,
|
|
2150
|
+
rootRef: layoutRef,
|
|
2151
|
+
screenKey: centerDropTargetComponent[0].screenKey,
|
|
2152
|
+
initialCenterComponents: [
|
|
2130
2153
|
{
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
|
|
2134
|
-
|
|
2135
|
-
|
|
2136
|
-
{
|
|
2137
|
-
parentDirection: direction,
|
|
2138
|
-
layoutName: `${layoutName}_center`,
|
|
2139
|
-
parentLayoutName: layoutName,
|
|
2140
|
-
containerName: `${centerDropTargetComponent[0].containerName}`,
|
|
2141
|
-
depth: 0,
|
|
2142
|
-
rootRef: layoutRef,
|
|
2143
|
-
screenKey: centerDropTargetComponent[0].screenKey,
|
|
2144
|
-
initialCenterComponents: [
|
|
2145
|
-
{
|
|
2146
|
-
navigationTitle: centerDropTargetComponent[0].navigationTitle,
|
|
2147
|
-
component: centerDropTargetComponent[0].component,
|
|
2148
|
-
containerName: centerDropTargetComponent[0].containerName,
|
|
2149
|
-
dropDocumentOutsideOption: centerDropTargetComponent[0].dropDocumentOutsideOption,
|
|
2150
|
-
screenKey: centerDropTargetComponent[0].screenKey
|
|
2151
|
-
}
|
|
2152
|
-
],
|
|
2153
|
-
rootName: layoutName
|
|
2154
|
-
}
|
|
2155
|
-
) : /* @__PURE__ */ jsx(
|
|
2156
|
-
FlexLayoutSplitScreenScrollBox_default,
|
|
2157
|
-
{
|
|
2158
|
-
keyName: centerDropTargetComponent[0].containerName,
|
|
2159
|
-
isDefaultScrollStyle: true,
|
|
2160
|
-
children: centerDropTargetComponent[0].component
|
|
2161
|
-
}
|
|
2162
|
-
)
|
|
2154
|
+
navigationTitle: centerDropTargetComponent[0].navigationTitle,
|
|
2155
|
+
component: centerDropTargetComponent[0].component,
|
|
2156
|
+
containerName: centerDropTargetComponent[0].containerName,
|
|
2157
|
+
dropDocumentOutsideOption: centerDropTargetComponent[0].dropDocumentOutsideOption,
|
|
2158
|
+
screenKey: centerDropTargetComponent[0].screenKey
|
|
2163
2159
|
}
|
|
2164
|
-
|
|
2165
|
-
|
|
2166
|
-
|
|
2167
|
-
|
|
2168
|
-
|
|
2169
|
-
|
|
2170
|
-
|
|
2171
|
-
|
|
2172
|
-
|
|
2173
|
-
|
|
2160
|
+
],
|
|
2161
|
+
rootName: layoutName
|
|
2162
|
+
}
|
|
2163
|
+
) : /* @__PURE__ */ React.createElement(
|
|
2164
|
+
FlexLayoutSplitScreenScrollBox_default,
|
|
2165
|
+
{
|
|
2166
|
+
keyName: centerDropTargetComponent[0].containerName,
|
|
2167
|
+
isDefaultScrollStyle: true
|
|
2168
|
+
},
|
|
2169
|
+
centerDropTargetComponent[0].component
|
|
2170
|
+
)
|
|
2171
|
+
),
|
|
2172
|
+
afterDropTargetComponent.length != 0 ? /* @__PURE__ */ React.createElement(React.Fragment, null, afterDropTargetComponent.map(
|
|
2173
|
+
({
|
|
2174
|
+
containerName: cName,
|
|
2175
|
+
component,
|
|
2176
|
+
navigationTitle: navigationTitle2,
|
|
2177
|
+
dropDocumentOutsideOption: dropDocumentOutsideOption2,
|
|
2178
|
+
screenKey: screenKey2
|
|
2179
|
+
}, i) => /* @__PURE__ */ React.createElement(
|
|
2180
|
+
FlexLayoutContainer,
|
|
2181
|
+
{
|
|
2182
|
+
containerName: cName,
|
|
2183
|
+
isInitialResizable: true,
|
|
2184
|
+
isResizePanel: afterDropTargetComponent.length - 1 !== i,
|
|
2185
|
+
key: cName
|
|
2186
|
+
},
|
|
2187
|
+
/* @__PURE__ */ React.createElement(
|
|
2188
|
+
FlexLayoutSplitScreenChild,
|
|
2189
|
+
{
|
|
2190
|
+
parentDirection: direction,
|
|
2191
|
+
layoutName: `${layoutName}_after`,
|
|
2192
|
+
parentLayoutName: layoutName,
|
|
2193
|
+
containerName: cName,
|
|
2194
|
+
depth: 1,
|
|
2195
|
+
rootRef: layoutRef,
|
|
2196
|
+
screenKey: screenKey2,
|
|
2197
|
+
initialCenterComponents: [
|
|
2174
2198
|
{
|
|
2199
|
+
navigationTitle: navigationTitle2,
|
|
2200
|
+
component,
|
|
2175
2201
|
containerName: cName,
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
-
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
|
|
2186
|
-
|
|
2187
|
-
|
|
2188
|
-
|
|
2189
|
-
|
|
2190
|
-
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
dropDocumentOutsideOption: dropDocumentOutsideOption2,
|
|
2194
|
-
screenKey: screenKey2
|
|
2195
|
-
}
|
|
2196
|
-
],
|
|
2197
|
-
rootName: layoutName
|
|
2198
|
-
}
|
|
2199
|
-
)
|
|
2200
|
-
},
|
|
2201
|
-
cName
|
|
2202
|
-
)
|
|
2203
|
-
) }) : /* @__PURE__ */ jsx("div", {})
|
|
2204
|
-
]
|
|
2205
|
-
}
|
|
2206
|
-
),
|
|
2207
|
-
boundaryContainerSize && /* @__PURE__ */ jsx(
|
|
2208
|
-
"div",
|
|
2209
|
-
{
|
|
2210
|
-
className: `${FlexLayout_default["flex-split-screen-boundary-container"]}`,
|
|
2211
|
-
style: { ...boundaryContainerSize },
|
|
2212
|
-
children: "\u2B07\uFE0F\uB4DC\uB86D\uD558\uBA74 \uD654\uBA74\uC774 \uBD84\uD560\uB429\uB2C8\uB2E4."
|
|
2213
|
-
}
|
|
2214
|
-
)
|
|
2215
|
-
] });
|
|
2202
|
+
dropDocumentOutsideOption: dropDocumentOutsideOption2,
|
|
2203
|
+
screenKey: screenKey2
|
|
2204
|
+
}
|
|
2205
|
+
],
|
|
2206
|
+
rootName: layoutName
|
|
2207
|
+
}
|
|
2208
|
+
)
|
|
2209
|
+
)
|
|
2210
|
+
)) : /* @__PURE__ */ React.createElement("div", null)
|
|
2211
|
+
), boundaryContainerSize && /* @__PURE__ */ React.createElement(
|
|
2212
|
+
"div",
|
|
2213
|
+
{
|
|
2214
|
+
className: `${FlexLayout_default["flex-split-screen-boundary-container"]}`,
|
|
2215
|
+
style: { ...boundaryContainerSize }
|
|
2216
|
+
},
|
|
2217
|
+
"\u2B07\uFE0F\uB4DC\uB86D\uD558\uBA74 \uD654\uBA74\uC774 \uBD84\uD560\uB429\uB2C8\uB2E4."
|
|
2218
|
+
));
|
|
2216
2219
|
}
|
|
2217
2220
|
function FlexLayoutSplitScreenChild({
|
|
2218
2221
|
containerName,
|
|
@@ -2500,319 +2503,309 @@ function FlexLayoutSplitScreenChild({
|
|
|
2500
2503
|
activeIndexRef.current = activeIndex;
|
|
2501
2504
|
}, [activeIndex]);
|
|
2502
2505
|
const [isOnlyOneScreen, setIsOnlyOneScreen] = useState(false);
|
|
2503
|
-
return /* @__PURE__ */
|
|
2506
|
+
return /* @__PURE__ */ React.createElement(React.Fragment, null, !isEmptyContent && /* @__PURE__ */ React.createElement(
|
|
2504
2507
|
"div",
|
|
2505
2508
|
{
|
|
2506
2509
|
className: `${FlexLayout_default["flex-split-screen"]}`,
|
|
2507
|
-
ref: layoutRef
|
|
2508
|
-
|
|
2509
|
-
|
|
2510
|
-
|
|
2510
|
+
ref: layoutRef
|
|
2511
|
+
},
|
|
2512
|
+
/* @__PURE__ */ React.createElement(
|
|
2513
|
+
FlexLayout,
|
|
2514
|
+
{
|
|
2515
|
+
direction,
|
|
2516
|
+
layoutName: `${layoutName}`,
|
|
2517
|
+
panelMovementMode: "bulldozer"
|
|
2518
|
+
},
|
|
2519
|
+
beforeDropTargetComponent.length != 0 ? /* @__PURE__ */ React.createElement(React.Fragment, null, beforeDropTargetComponent.map(
|
|
2520
|
+
({
|
|
2521
|
+
containerName: cName,
|
|
2522
|
+
component,
|
|
2523
|
+
navigationTitle,
|
|
2524
|
+
dropDocumentOutsideOption,
|
|
2525
|
+
screenKey: screenKey2
|
|
2526
|
+
}, i) => /* @__PURE__ */ React.createElement(
|
|
2527
|
+
FlexLayoutContainer,
|
|
2511
2528
|
{
|
|
2512
|
-
|
|
2513
|
-
|
|
2514
|
-
|
|
2515
|
-
|
|
2516
|
-
|
|
2517
|
-
|
|
2518
|
-
|
|
2519
|
-
|
|
2529
|
+
containerName: cName,
|
|
2530
|
+
isInitialResizable: true,
|
|
2531
|
+
isResizePanel: true,
|
|
2532
|
+
key: cName
|
|
2533
|
+
},
|
|
2534
|
+
/* @__PURE__ */ React.createElement(
|
|
2535
|
+
FlexLayoutSplitScreenChild,
|
|
2536
|
+
{
|
|
2537
|
+
parentDirection: direction,
|
|
2538
|
+
layoutName: `${layoutName}_before-${depth}`,
|
|
2539
|
+
parentLayoutName: layoutName,
|
|
2540
|
+
containerName: cName,
|
|
2541
|
+
depth: depth + 1,
|
|
2542
|
+
rootRef,
|
|
2543
|
+
screenKey: screenKey2,
|
|
2544
|
+
initialCenterComponents: [
|
|
2545
|
+
{
|
|
2520
2546
|
navigationTitle,
|
|
2547
|
+
component,
|
|
2548
|
+
containerName: cName,
|
|
2521
2549
|
dropDocumentOutsideOption,
|
|
2522
2550
|
screenKey: screenKey2
|
|
2523
|
-
}
|
|
2524
|
-
|
|
2525
|
-
|
|
2526
|
-
|
|
2527
|
-
|
|
2528
|
-
|
|
2529
|
-
|
|
2530
|
-
|
|
2531
|
-
|
|
2532
|
-
|
|
2533
|
-
|
|
2534
|
-
|
|
2535
|
-
|
|
2536
|
-
|
|
2537
|
-
|
|
2538
|
-
|
|
2539
|
-
|
|
2540
|
-
|
|
2541
|
-
|
|
2542
|
-
|
|
2543
|
-
|
|
2544
|
-
|
|
2545
|
-
|
|
2546
|
-
|
|
2547
|
-
|
|
2548
|
-
|
|
2549
|
-
|
|
2550
|
-
|
|
2551
|
-
|
|
2552
|
-
|
|
2553
|
-
|
|
2554
|
-
|
|
2555
|
-
|
|
2556
|
-
|
|
2551
|
+
}
|
|
2552
|
+
],
|
|
2553
|
+
rootName
|
|
2554
|
+
}
|
|
2555
|
+
)
|
|
2556
|
+
)
|
|
2557
|
+
)) : /* @__PURE__ */ React.createElement("div", null),
|
|
2558
|
+
centerDropTargetComponent.length != 0 ? /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
|
|
2559
|
+
FlexLayoutContainer,
|
|
2560
|
+
{
|
|
2561
|
+
containerName: `${(centerDropTargetComponent[activeIndex] || centerDropTargetComponent[0]).containerName}`,
|
|
2562
|
+
isInitialResizable: true,
|
|
2563
|
+
isResizePanel: isSplit,
|
|
2564
|
+
key: (centerDropTargetComponent[activeIndex] || centerDropTargetComponent[0]).containerName
|
|
2565
|
+
},
|
|
2566
|
+
isSplit ? /* @__PURE__ */ React.createElement("div", { "data-key": screenKey }, /* @__PURE__ */ React.createElement(
|
|
2567
|
+
FlexLayoutSplitScreenChild,
|
|
2568
|
+
{
|
|
2569
|
+
parentDirection: direction,
|
|
2570
|
+
layoutName: `${layoutName}_center-${depth}`,
|
|
2571
|
+
parentLayoutName: layoutName,
|
|
2572
|
+
containerName: `${(centerDropTargetComponent[activeIndex] || centerDropTargetComponent[0]).containerName}`,
|
|
2573
|
+
depth: depth + 1,
|
|
2574
|
+
rootRef,
|
|
2575
|
+
initialCenterComponents: centerDropTargetComponent.map(
|
|
2576
|
+
({
|
|
2577
|
+
navigationTitle,
|
|
2578
|
+
component,
|
|
2579
|
+
containerName: cName,
|
|
2580
|
+
dropDocumentOutsideOption,
|
|
2581
|
+
screenKey: centerScreenKey
|
|
2582
|
+
}) => ({
|
|
2583
|
+
navigationTitle,
|
|
2584
|
+
component,
|
|
2585
|
+
containerName: cName,
|
|
2586
|
+
dropDocumentOutsideOption,
|
|
2587
|
+
screenKey: centerScreenKey
|
|
2588
|
+
})
|
|
2589
|
+
),
|
|
2590
|
+
screenKey,
|
|
2591
|
+
rootName
|
|
2592
|
+
}
|
|
2593
|
+
)) : /* @__PURE__ */ React.createElement(
|
|
2594
|
+
FlexLayoutSplitScreenScrollBox_default,
|
|
2595
|
+
{
|
|
2596
|
+
keyName: (centerDropTargetComponent[activeIndex] || centerDropTargetComponent[0]).containerName,
|
|
2597
|
+
isDefaultScrollStyle: true
|
|
2598
|
+
},
|
|
2599
|
+
!isOnlyOneScreen && /* @__PURE__ */ React.createElement(
|
|
2600
|
+
"div",
|
|
2601
|
+
{
|
|
2602
|
+
className: `${FlexLayout_default["flex-split-screen-drag-box-title-wrapper-sticky"]}`
|
|
2603
|
+
},
|
|
2604
|
+
/* @__PURE__ */ React.createElement(
|
|
2605
|
+
"div",
|
|
2606
|
+
{
|
|
2607
|
+
"data-is_split": isSplit,
|
|
2608
|
+
"data-layout_name": layoutName,
|
|
2609
|
+
"data-parent_layout_name": parentLayoutName,
|
|
2610
|
+
"data-container_name": `${(centerDropTargetComponent[activeIndex] || centerDropTargetComponent[0]).containerName}`,
|
|
2611
|
+
className: `${FlexLayout_default["flex-split-screen-drag-box-title-wrapper"]}`
|
|
2612
|
+
},
|
|
2613
|
+
/* @__PURE__ */ React.createElement(
|
|
2614
|
+
FlexLayoutSplitScreenDragBoxContainer,
|
|
2557
2615
|
{
|
|
2558
|
-
|
|
2559
|
-
|
|
2560
|
-
|
|
2561
|
-
|
|
2562
|
-
|
|
2563
|
-
|
|
2564
|
-
|
|
2565
|
-
layoutName: `${layoutName}_center-${depth}`,
|
|
2566
|
-
parentLayoutName: layoutName,
|
|
2567
|
-
containerName: `${(centerDropTargetComponent[activeIndex] || centerDropTargetComponent[0]).containerName}`,
|
|
2568
|
-
depth: depth + 1,
|
|
2569
|
-
rootRef,
|
|
2570
|
-
initialCenterComponents: centerDropTargetComponent.map(
|
|
2571
|
-
({
|
|
2572
|
-
navigationTitle,
|
|
2573
|
-
component,
|
|
2574
|
-
containerName: cName,
|
|
2575
|
-
dropDocumentOutsideOption,
|
|
2576
|
-
screenKey: centerScreenKey
|
|
2577
|
-
}) => ({
|
|
2578
|
-
navigationTitle,
|
|
2579
|
-
component,
|
|
2580
|
-
containerName: cName,
|
|
2581
|
-
dropDocumentOutsideOption,
|
|
2582
|
-
screenKey: centerScreenKey
|
|
2583
|
-
})
|
|
2584
|
-
),
|
|
2585
|
-
screenKey,
|
|
2586
|
-
rootName
|
|
2587
|
-
}
|
|
2588
|
-
) }) : /* @__PURE__ */ jsxs(
|
|
2589
|
-
FlexLayoutSplitScreenScrollBox_default,
|
|
2616
|
+
key: layoutName,
|
|
2617
|
+
"data-layout_name": layoutName,
|
|
2618
|
+
layoutName
|
|
2619
|
+
},
|
|
2620
|
+
centerDropTargetComponent.map(
|
|
2621
|
+
(item, index) => /* @__PURE__ */ React.createElement(
|
|
2622
|
+
FlexLayoutSplitScreenDragBoxItem,
|
|
2590
2623
|
{
|
|
2591
|
-
|
|
2592
|
-
|
|
2593
|
-
|
|
2594
|
-
|
|
2595
|
-
|
|
2596
|
-
|
|
2597
|
-
|
|
2598
|
-
|
|
2599
|
-
|
|
2600
|
-
|
|
2601
|
-
|
|
2602
|
-
|
|
2603
|
-
|
|
2604
|
-
|
|
2605
|
-
|
|
2606
|
-
children: [
|
|
2607
|
-
/* @__PURE__ */ jsx(
|
|
2608
|
-
FlexLayoutSplitScreenDragBoxContainer,
|
|
2609
|
-
{
|
|
2610
|
-
"data-layout_name": layoutName,
|
|
2611
|
-
layoutName,
|
|
2612
|
-
children: centerDropTargetComponent.map(
|
|
2613
|
-
(item, index) => /* @__PURE__ */ jsx(
|
|
2614
|
-
FlexLayoutSplitScreenDragBoxItem,
|
|
2615
|
-
{
|
|
2616
|
-
onClose: (ev) => {
|
|
2617
|
-
if (activeIndexRef.current === index && centerDropTargetComponent.length === 1) {
|
|
2618
|
-
dropMovementEventSubject.next(
|
|
2619
|
-
{
|
|
2620
|
-
state: "remove",
|
|
2621
|
-
targetContainerName: containerName,
|
|
2622
|
-
targetParentLayoutName: parentLayoutName,
|
|
2623
|
-
targetLayoutName: layoutName
|
|
2624
|
-
}
|
|
2625
|
-
);
|
|
2626
|
-
} else {
|
|
2627
|
-
if (centerDropTargetComponent.length === activeIndexRef.current + 1) {
|
|
2628
|
-
setActiveIndex(
|
|
2629
|
-
activeIndexRef.current - 1
|
|
2630
|
-
);
|
|
2631
|
-
}
|
|
2632
|
-
setCenterDropTargetComponent(
|
|
2633
|
-
(prev) => {
|
|
2634
|
-
const result = handleRemove(
|
|
2635
|
-
prev,
|
|
2636
|
-
item.containerName,
|
|
2637
|
-
() => {
|
|
2638
|
-
}
|
|
2639
|
-
);
|
|
2640
|
-
return result;
|
|
2641
|
-
}
|
|
2642
|
-
);
|
|
2643
|
-
}
|
|
2644
|
-
},
|
|
2645
|
-
isActive: activeIndex === index,
|
|
2646
|
-
children: /* @__PURE__ */ jsx(
|
|
2647
|
-
FlexLayoutSplitScreenDragBox,
|
|
2648
|
-
{
|
|
2649
|
-
onClick: () => {
|
|
2650
|
-
setActiveIndex(
|
|
2651
|
-
index
|
|
2652
|
-
);
|
|
2653
|
-
},
|
|
2654
|
-
containerName: item.containerName,
|
|
2655
|
-
dropDocumentOutsideOption: item.dropDocumentOutsideOption,
|
|
2656
|
-
targetComponent: item.component,
|
|
2657
|
-
navigationTitle: item.navigationTitle,
|
|
2658
|
-
"data-container-name": item.containerName,
|
|
2659
|
-
"data-layout-name": layoutName,
|
|
2660
|
-
"data-parent-layout-name": parentLayoutName,
|
|
2661
|
-
dropEndCallback: ({
|
|
2662
|
-
x,
|
|
2663
|
-
y,
|
|
2664
|
-
containerName: appendContainerName
|
|
2665
|
-
}) => {
|
|
2666
|
-
if (!rootRef.current || !layoutRef.current)
|
|
2667
|
-
return;
|
|
2668
|
-
const isRootOver = isOverDrop(
|
|
2669
|
-
{
|
|
2670
|
-
x,
|
|
2671
|
-
y,
|
|
2672
|
-
element: rootRef.current
|
|
2673
|
-
}
|
|
2674
|
-
);
|
|
2675
|
-
const isLayoutInner = isInnerDrop(
|
|
2676
|
-
{
|
|
2677
|
-
x,
|
|
2678
|
-
y,
|
|
2679
|
-
element: layoutRef.current
|
|
2680
|
-
}
|
|
2681
|
-
);
|
|
2682
|
-
if (!isRootOver && !isLayoutInner || !isRootOver && isLayoutInner && centerDropTargetComponentRef.current.length > 1) {
|
|
2683
|
-
const option = {};
|
|
2684
|
-
if (centerDropTargetComponentRef.current.length > 1) {
|
|
2685
|
-
const {
|
|
2686
|
-
adjacentItem,
|
|
2687
|
-
adjacentIndex
|
|
2688
|
-
} = getAdjacentItem(
|
|
2689
|
-
centerDropTargetComponentRef.current,
|
|
2690
|
-
activeIndexRef.current
|
|
2691
|
-
);
|
|
2692
|
-
if (adjacentItem && activeIndexRef.current === index) {
|
|
2693
|
-
Object.assign(
|
|
2694
|
-
option,
|
|
2695
|
-
{
|
|
2696
|
-
x,
|
|
2697
|
-
y,
|
|
2698
|
-
targetComponent: adjacentItem.component,
|
|
2699
|
-
nextContainerName: adjacentItem.containerName,
|
|
2700
|
-
orderName: "center",
|
|
2701
|
-
dropTargetComponentEvent: {
|
|
2702
|
-
navigationTitle: adjacentItem.navigationTitle,
|
|
2703
|
-
dropDocumentOutsideOption: adjacentItem.dropDocumentOutsideOption,
|
|
2704
|
-
direction,
|
|
2705
|
-
screenKey
|
|
2706
|
-
}
|
|
2707
|
-
}
|
|
2708
|
-
);
|
|
2709
|
-
}
|
|
2710
|
-
}
|
|
2711
|
-
if (index === 0) {
|
|
2712
|
-
dropMovementEventSubject.next(
|
|
2713
|
-
{
|
|
2714
|
-
state: "remove",
|
|
2715
|
-
targetContainerName: item.containerName,
|
|
2716
|
-
targetParentLayoutName: parentLayoutName,
|
|
2717
|
-
targetLayoutName: layoutName,
|
|
2718
|
-
...option
|
|
2719
|
-
}
|
|
2720
|
-
);
|
|
2721
|
-
} else {
|
|
2722
|
-
dropMovementEventSubject.next(
|
|
2723
|
-
{
|
|
2724
|
-
state: "remove",
|
|
2725
|
-
targetContainerName: item.containerName,
|
|
2726
|
-
targetParentLayoutName: "",
|
|
2727
|
-
targetLayoutName: layoutName,
|
|
2728
|
-
...option
|
|
2729
|
-
}
|
|
2730
|
-
);
|
|
2731
|
-
}
|
|
2732
|
-
}
|
|
2733
|
-
},
|
|
2734
|
-
children: item.navigationTitle
|
|
2735
|
-
}
|
|
2736
|
-
)
|
|
2737
|
-
},
|
|
2738
|
-
item.navigationTitle + layoutName + item.containerName
|
|
2739
|
-
)
|
|
2740
|
-
)
|
|
2741
|
-
},
|
|
2742
|
-
layoutName
|
|
2743
|
-
),
|
|
2744
|
-
/* @__PURE__ */ jsx(FlexLayoutSplitScreenDragBoxTitleMore, {})
|
|
2745
|
-
]
|
|
2746
|
-
}
|
|
2747
|
-
)
|
|
2624
|
+
onClose: (ev) => {
|
|
2625
|
+
if (activeIndexRef.current === index && centerDropTargetComponent.length === 1) {
|
|
2626
|
+
dropMovementEventSubject.next(
|
|
2627
|
+
{
|
|
2628
|
+
state: "remove",
|
|
2629
|
+
targetContainerName: containerName,
|
|
2630
|
+
targetParentLayoutName: parentLayoutName,
|
|
2631
|
+
targetLayoutName: layoutName
|
|
2632
|
+
}
|
|
2633
|
+
);
|
|
2634
|
+
} else {
|
|
2635
|
+
if (centerDropTargetComponent.length === activeIndexRef.current + 1) {
|
|
2636
|
+
setActiveIndex(
|
|
2637
|
+
activeIndexRef.current - 1
|
|
2638
|
+
);
|
|
2748
2639
|
}
|
|
2749
|
-
|
|
2750
|
-
|
|
2751
|
-
|
|
2752
|
-
|
|
2753
|
-
|
|
2754
|
-
|
|
2755
|
-
|
|
2756
|
-
|
|
2757
|
-
|
|
2758
|
-
|
|
2759
|
-
|
|
2760
|
-
|
|
2761
|
-
|
|
2762
|
-
|
|
2763
|
-
|
|
2764
|
-
|
|
2765
|
-
|
|
2766
|
-
|
|
2767
|
-
}, i) => /* @__PURE__ */ jsx(
|
|
2768
|
-
FlexLayoutContainer_default,
|
|
2769
|
-
{
|
|
2770
|
-
containerName: cName,
|
|
2771
|
-
isInitialResizable: true,
|
|
2772
|
-
isResizePanel: i !== afterDropTargetComponent.length - 1,
|
|
2773
|
-
children: /* @__PURE__ */ jsx(
|
|
2774
|
-
FlexLayoutSplitScreenChild,
|
|
2640
|
+
setCenterDropTargetComponent(
|
|
2641
|
+
(prev) => {
|
|
2642
|
+
const result = handleRemove(
|
|
2643
|
+
prev,
|
|
2644
|
+
item.containerName,
|
|
2645
|
+
() => {
|
|
2646
|
+
}
|
|
2647
|
+
);
|
|
2648
|
+
return result;
|
|
2649
|
+
}
|
|
2650
|
+
);
|
|
2651
|
+
}
|
|
2652
|
+
},
|
|
2653
|
+
key: item.navigationTitle + layoutName + item.containerName,
|
|
2654
|
+
isActive: activeIndex === index
|
|
2655
|
+
},
|
|
2656
|
+
/* @__PURE__ */ React.createElement(
|
|
2657
|
+
FlexLayoutSplitScreenDragBox,
|
|
2775
2658
|
{
|
|
2776
|
-
|
|
2777
|
-
|
|
2778
|
-
|
|
2779
|
-
|
|
2780
|
-
|
|
2781
|
-
|
|
2782
|
-
|
|
2783
|
-
|
|
2784
|
-
|
|
2785
|
-
|
|
2786
|
-
|
|
2787
|
-
|
|
2788
|
-
|
|
2789
|
-
|
|
2659
|
+
onClick: () => {
|
|
2660
|
+
setActiveIndex(
|
|
2661
|
+
index
|
|
2662
|
+
);
|
|
2663
|
+
},
|
|
2664
|
+
containerName: item.containerName,
|
|
2665
|
+
dropDocumentOutsideOption: item.dropDocumentOutsideOption,
|
|
2666
|
+
targetComponent: item.component,
|
|
2667
|
+
navigationTitle: item.navigationTitle,
|
|
2668
|
+
"data-container-name": item.containerName,
|
|
2669
|
+
"data-layout-name": layoutName,
|
|
2670
|
+
"data-parent-layout-name": parentLayoutName,
|
|
2671
|
+
dropEndCallback: ({
|
|
2672
|
+
x,
|
|
2673
|
+
y,
|
|
2674
|
+
containerName: appendContainerName
|
|
2675
|
+
}) => {
|
|
2676
|
+
if (!rootRef.current || !layoutRef.current)
|
|
2677
|
+
return;
|
|
2678
|
+
const isRootOver = isOverDrop(
|
|
2679
|
+
{
|
|
2680
|
+
x,
|
|
2681
|
+
y,
|
|
2682
|
+
element: rootRef.current
|
|
2683
|
+
}
|
|
2684
|
+
);
|
|
2685
|
+
const isLayoutInner = isInnerDrop(
|
|
2686
|
+
{
|
|
2687
|
+
x,
|
|
2688
|
+
y,
|
|
2689
|
+
element: layoutRef.current
|
|
2690
|
+
}
|
|
2691
|
+
);
|
|
2692
|
+
if (!isRootOver && !isLayoutInner || !isRootOver && isLayoutInner && centerDropTargetComponentRef.current.length > 1) {
|
|
2693
|
+
const option = {};
|
|
2694
|
+
if (centerDropTargetComponentRef.current.length > 1) {
|
|
2695
|
+
const {
|
|
2696
|
+
adjacentItem,
|
|
2697
|
+
adjacentIndex
|
|
2698
|
+
} = getAdjacentItem(
|
|
2699
|
+
centerDropTargetComponentRef.current,
|
|
2700
|
+
activeIndexRef.current
|
|
2701
|
+
);
|
|
2702
|
+
if (adjacentItem && activeIndexRef.current === index) {
|
|
2703
|
+
Object.assign(
|
|
2704
|
+
option,
|
|
2705
|
+
{
|
|
2706
|
+
x,
|
|
2707
|
+
y,
|
|
2708
|
+
targetComponent: adjacentItem.component,
|
|
2709
|
+
nextContainerName: adjacentItem.containerName,
|
|
2710
|
+
orderName: "center",
|
|
2711
|
+
dropTargetComponentEvent: {
|
|
2712
|
+
navigationTitle: adjacentItem.navigationTitle,
|
|
2713
|
+
dropDocumentOutsideOption: adjacentItem.dropDocumentOutsideOption,
|
|
2714
|
+
direction,
|
|
2715
|
+
screenKey
|
|
2716
|
+
}
|
|
2717
|
+
}
|
|
2718
|
+
);
|
|
2719
|
+
}
|
|
2720
|
+
}
|
|
2721
|
+
if (index === 0) {
|
|
2722
|
+
dropMovementEventSubject.next(
|
|
2723
|
+
{
|
|
2724
|
+
state: "remove",
|
|
2725
|
+
targetContainerName: item.containerName,
|
|
2726
|
+
targetParentLayoutName: parentLayoutName,
|
|
2727
|
+
targetLayoutName: layoutName,
|
|
2728
|
+
...option
|
|
2729
|
+
}
|
|
2730
|
+
);
|
|
2731
|
+
} else {
|
|
2732
|
+
dropMovementEventSubject.next(
|
|
2733
|
+
{
|
|
2734
|
+
state: "remove",
|
|
2735
|
+
targetContainerName: item.containerName,
|
|
2736
|
+
targetParentLayoutName: "",
|
|
2737
|
+
targetLayoutName: layoutName,
|
|
2738
|
+
...option
|
|
2739
|
+
}
|
|
2740
|
+
);
|
|
2741
|
+
}
|
|
2790
2742
|
}
|
|
2791
|
-
|
|
2792
|
-
|
|
2793
|
-
|
|
2743
|
+
}
|
|
2744
|
+
},
|
|
2745
|
+
item.navigationTitle
|
|
2794
2746
|
)
|
|
2795
|
-
|
|
2796
|
-
cName
|
|
2747
|
+
)
|
|
2797
2748
|
)
|
|
2798
|
-
)
|
|
2799
|
-
|
|
2800
|
-
|
|
2801
|
-
|
|
2802
|
-
|
|
2803
|
-
|
|
2749
|
+
),
|
|
2750
|
+
/* @__PURE__ */ React.createElement(FlexLayoutSplitScreenDragBoxTitleMore, null)
|
|
2751
|
+
)
|
|
2752
|
+
),
|
|
2753
|
+
(() => {
|
|
2754
|
+
const target = centerDropTargetComponent[activeIndex] || centerDropTargetComponent[0];
|
|
2755
|
+
return target.component;
|
|
2756
|
+
})()
|
|
2757
|
+
)
|
|
2758
|
+
)) : /* @__PURE__ */ React.createElement("div", null),
|
|
2759
|
+
afterDropTargetComponent.length != 0 ? /* @__PURE__ */ React.createElement(React.Fragment, null, afterDropTargetComponent.map(
|
|
2760
|
+
({
|
|
2761
|
+
containerName: cName,
|
|
2762
|
+
component,
|
|
2763
|
+
navigationTitle,
|
|
2764
|
+
dropDocumentOutsideOption,
|
|
2765
|
+
screenKey: screenKey2
|
|
2766
|
+
}, i) => /* @__PURE__ */ React.createElement(
|
|
2767
|
+
FlexLayoutContainer,
|
|
2804
2768
|
{
|
|
2805
|
-
|
|
2806
|
-
|
|
2807
|
-
|
|
2808
|
-
|
|
2769
|
+
containerName: cName,
|
|
2770
|
+
isInitialResizable: true,
|
|
2771
|
+
isResizePanel: i !== afterDropTargetComponent.length - 1,
|
|
2772
|
+
key: cName
|
|
2773
|
+
},
|
|
2774
|
+
/* @__PURE__ */ React.createElement(
|
|
2775
|
+
FlexLayoutSplitScreenChild,
|
|
2776
|
+
{
|
|
2777
|
+
parentDirection: direction,
|
|
2778
|
+
layoutName: `${layoutName}_after-${depth}`,
|
|
2779
|
+
parentLayoutName: layoutName,
|
|
2780
|
+
containerName: cName,
|
|
2781
|
+
depth: depth + 1,
|
|
2782
|
+
rootRef,
|
|
2783
|
+
screenKey: screenKey2,
|
|
2784
|
+
initialCenterComponents: [
|
|
2785
|
+
{
|
|
2786
|
+
navigationTitle,
|
|
2787
|
+
component,
|
|
2788
|
+
containerName: cName,
|
|
2789
|
+
dropDocumentOutsideOption,
|
|
2790
|
+
screenKey: screenKey2
|
|
2791
|
+
}
|
|
2792
|
+
],
|
|
2793
|
+
rootName
|
|
2794
|
+
}
|
|
2795
|
+
)
|
|
2809
2796
|
)
|
|
2810
|
-
|
|
2811
|
-
|
|
2812
|
-
|
|
2797
|
+
)) : /* @__PURE__ */ React.createElement("div", null)
|
|
2798
|
+
),
|
|
2799
|
+
boundaryContainerSize && /* @__PURE__ */ React.createElement(
|
|
2800
|
+
"div",
|
|
2801
|
+
{
|
|
2802
|
+
className: `${FlexLayout_default["flex-split-screen-boundary-container"]}`,
|
|
2803
|
+
style: { ...boundaryContainerSize }
|
|
2804
|
+
},
|
|
2805
|
+
"\u2B07\uFE0F\uB4DC\uB86D\uD558\uBA74 \uD654\uBA74\uC774 \uBD84\uD560\uB429\uB2C8\uB2E4."
|
|
2806
|
+
)
|
|
2807
|
+
));
|
|
2813
2808
|
}
|
|
2814
|
-
FlexLayoutSplitScreen.displayName = "FlexLayoutSplitScreen";
|
|
2815
|
-
var FlexLayoutSplitScreen_default = FlexLayoutSplitScreen;
|
|
2816
2809
|
function clamp(n, min, max) {
|
|
2817
2810
|
return Math.max(min, Math.min(max, n));
|
|
2818
2811
|
}
|
|
@@ -3004,7 +2997,7 @@ var FlexLayoutStickyBox = ({
|
|
|
3004
2997
|
}
|
|
3005
2998
|
};
|
|
3006
2999
|
}, [ioRoot, resolvedEdge, offset, debug]);
|
|
3007
|
-
return /* @__PURE__ */
|
|
3000
|
+
return /* @__PURE__ */ React2.createElement(
|
|
3008
3001
|
"div",
|
|
3009
3002
|
{
|
|
3010
3003
|
ref: rootRef,
|
|
@@ -3017,20 +3010,20 @@ var FlexLayoutStickyBox = ({
|
|
|
3017
3010
|
// 부모 높이를 채우도록 설정
|
|
3018
3011
|
...style
|
|
3019
3012
|
},
|
|
3020
|
-
...rest
|
|
3021
|
-
|
|
3022
|
-
|
|
3023
|
-
|
|
3024
|
-
|
|
3025
|
-
|
|
3026
|
-
|
|
3027
|
-
|
|
3028
|
-
|
|
3029
|
-
|
|
3013
|
+
...rest
|
|
3014
|
+
},
|
|
3015
|
+
/* @__PURE__ */ React2.createElement(
|
|
3016
|
+
"div",
|
|
3017
|
+
{
|
|
3018
|
+
ref: contentRef,
|
|
3019
|
+
style: contentDynamicStyle
|
|
3020
|
+
},
|
|
3021
|
+
children
|
|
3022
|
+
)
|
|
3030
3023
|
);
|
|
3031
3024
|
};
|
|
3032
3025
|
var FlexLayoutStickyBox_default = FlexLayoutStickyBox;
|
|
3033
3026
|
|
|
3034
|
-
export {
|
|
3027
|
+
export { FlexLayout, FlexLayoutContainer, FlexLayoutResizePanel, FlexLayoutSplitScreen, FlexLayoutSplitScreenDragBox, FlexLayoutSplitScreenScrollBox_default as FlexLayoutSplitScreenScrollBox, FlexLayoutStickyBox_default as FlexLayoutStickyBox };
|
|
3035
3028
|
//# sourceMappingURL=components.js.map
|
|
3036
3029
|
//# sourceMappingURL=components.js.map
|