@byeolnaerim/flex-layout 0.0.6 → 0.0.7
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/dist/flex-layout/components/FlexLayout.cjs +76 -0
- package/dist/flex-layout/components/FlexLayout.cjs.map +1 -0
- package/dist/flex-layout/components/FlexLayout.js +70 -0
- package/dist/flex-layout/components/FlexLayout.js.map +1 -0
- package/dist/flex-layout/components/FlexLayoutContainer.cjs +196 -0
- package/dist/flex-layout/components/FlexLayoutContainer.cjs.map +1 -0
- package/dist/flex-layout/components/FlexLayoutContainer.js +189 -0
- package/dist/flex-layout/components/FlexLayoutContainer.js.map +1 -0
- package/dist/flex-layout/components/FlexLayoutResizePanel.cjs +181 -0
- package/dist/flex-layout/components/FlexLayoutResizePanel.cjs.map +1 -0
- package/dist/flex-layout/components/FlexLayoutResizePanel.js +175 -0
- package/dist/flex-layout/components/FlexLayoutResizePanel.js.map +1 -0
- package/dist/flex-layout/components/FlexLayoutSplitScreen.cjs +1211 -0
- package/dist/flex-layout/components/FlexLayoutSplitScreen.cjs.map +1 -0
- package/dist/flex-layout/components/FlexLayoutSplitScreen.js +1197 -0
- package/dist/flex-layout/components/FlexLayoutSplitScreen.js.map +1 -0
- package/dist/flex-layout/components/FlexLayoutSplitScreenDragBox.cjs +339 -0
- package/dist/flex-layout/components/FlexLayoutSplitScreenDragBox.cjs.map +1 -0
- package/dist/flex-layout/components/FlexLayoutSplitScreenDragBox.js +333 -0
- package/dist/flex-layout/components/FlexLayoutSplitScreenDragBox.js.map +1 -0
- package/dist/flex-layout/components/FlexLayoutSplitScreenDragBoxContainer.cjs +32 -0
- package/dist/flex-layout/components/FlexLayoutSplitScreenDragBoxContainer.cjs.map +1 -0
- package/dist/flex-layout/components/FlexLayoutSplitScreenDragBoxContainer.js +25 -0
- package/dist/flex-layout/components/FlexLayoutSplitScreenDragBoxContainer.js.map +1 -0
- package/dist/flex-layout/components/FlexLayoutSplitScreenDragBoxItem.cjs +40 -0
- package/dist/flex-layout/components/FlexLayoutSplitScreenDragBoxItem.cjs.map +1 -0
- package/dist/flex-layout/components/FlexLayoutSplitScreenDragBoxItem.d.ts +2 -2
- package/dist/flex-layout/components/FlexLayoutSplitScreenDragBoxItem.js +34 -0
- package/dist/flex-layout/components/FlexLayoutSplitScreenDragBoxItem.js.map +1 -0
- package/dist/flex-layout/components/FlexLayoutSplitScreenDragBoxTitleMore.cjs +30 -0
- package/dist/flex-layout/components/FlexLayoutSplitScreenDragBoxTitleMore.cjs.map +1 -0
- package/dist/flex-layout/components/FlexLayoutSplitScreenDragBoxTitleMore.d.ts +2 -1
- package/dist/flex-layout/components/FlexLayoutSplitScreenDragBoxTitleMore.js +24 -0
- package/dist/flex-layout/components/FlexLayoutSplitScreenDragBoxTitleMore.js.map +1 -0
- package/dist/flex-layout/components/FlexLayoutSplitScreenScrollBox.cjs +109 -0
- package/dist/flex-layout/components/FlexLayoutSplitScreenScrollBox.cjs.map +1 -0
- package/dist/flex-layout/components/FlexLayoutSplitScreenScrollBox.js +103 -0
- package/dist/flex-layout/components/FlexLayoutSplitScreenScrollBox.js.map +1 -0
- package/dist/flex-layout/components/FlexLayoutStickyBox.cjs +226 -0
- package/dist/flex-layout/components/FlexLayoutStickyBox.cjs.map +1 -0
- package/dist/flex-layout/components/FlexLayoutStickyBox.d.ts +6 -6
- package/dist/flex-layout/components/FlexLayoutStickyBox.js +224 -0
- package/dist/flex-layout/components/FlexLayoutStickyBox.js.map +1 -0
- package/dist/flex-layout/components/index.cjs +52 -0
- package/dist/flex-layout/components/index.cjs.map +1 -0
- package/dist/flex-layout/components/index.js +9 -0
- package/dist/flex-layout/components/index.js.map +1 -0
- package/dist/flex-layout/hooks/index.cjs +21 -0
- package/dist/flex-layout/hooks/index.cjs.map +1 -0
- package/dist/flex-layout/hooks/index.js +4 -0
- package/dist/flex-layout/hooks/index.js.map +1 -0
- package/dist/{hooks.cjs → flex-layout/hooks/useDrag.cjs} +15 -208
- package/dist/flex-layout/hooks/useDrag.cjs.map +1 -0
- package/dist/flex-layout/hooks/useDrag.d.ts +4 -4
- package/dist/{hooks.js → flex-layout/hooks/useDrag.js} +13 -203
- package/dist/flex-layout/hooks/useDrag.js.map +1 -0
- package/dist/flex-layout/hooks/useFlexLayoutSplitScreen.cjs +118 -0
- package/dist/flex-layout/hooks/useFlexLayoutSplitScreen.cjs.map +1 -0
- package/dist/flex-layout/hooks/useFlexLayoutSplitScreen.js +116 -0
- package/dist/flex-layout/hooks/useFlexLayoutSplitScreen.js.map +1 -0
- package/dist/flex-layout/hooks/useListPaging.cjs +179 -0
- package/dist/flex-layout/hooks/useListPaging.cjs.map +1 -0
- package/dist/flex-layout/hooks/useListPaging.js +175 -0
- package/dist/flex-layout/hooks/useListPaging.js.map +1 -0
- package/dist/flex-layout/hooks/useSizes.cjs +104 -0
- package/dist/flex-layout/hooks/useSizes.cjs.map +1 -0
- package/dist/flex-layout/hooks/useSizes.js +101 -0
- package/dist/flex-layout/hooks/useSizes.js.map +1 -0
- package/dist/flex-layout/index.cjs +42 -0
- package/dist/flex-layout/index.cjs.map +1 -0
- package/dist/flex-layout/index.js +7 -0
- package/dist/flex-layout/index.js.map +1 -0
- package/dist/flex-layout/providers/FlexLayoutContext.cjs +26 -0
- package/dist/flex-layout/providers/FlexLayoutContext.cjs.map +1 -0
- package/dist/flex-layout/providers/FlexLayoutContext.d.ts +2 -1
- package/dist/flex-layout/providers/FlexLayoutContext.js +23 -0
- package/dist/flex-layout/providers/FlexLayoutContext.js.map +1 -0
- package/dist/{providers.cjs → flex-layout/providers/FlexLayoutHooks.cjs} +22 -186
- package/dist/flex-layout/providers/FlexLayoutHooks.cjs.map +1 -0
- package/dist/{providers.js → flex-layout/providers/FlexLayoutHooks.js} +14 -178
- package/dist/flex-layout/providers/FlexLayoutHooks.js.map +1 -0
- package/dist/flex-layout/providers/index.cjs +14 -0
- package/dist/flex-layout/providers/index.cjs.map +1 -0
- package/dist/flex-layout/providers/index.js +3 -0
- package/dist/flex-layout/providers/index.js.map +1 -0
- package/dist/{store.cjs → flex-layout/store/FlexLayoutContainerStore.cjs} +20 -21
- package/dist/flex-layout/store/FlexLayoutContainerStore.cjs.map +1 -0
- package/dist/flex-layout/store/FlexLayoutContainerStore.d.ts +2 -2
- package/dist/{store.js → flex-layout/store/FlexLayoutContainerStore.js} +20 -21
- package/dist/flex-layout/store/FlexLayoutContainerStore.js.map +1 -0
- package/dist/flex-layout/store/index.cjs +14 -0
- package/dist/flex-layout/store/index.cjs.map +1 -0
- package/dist/flex-layout/store/index.js +3 -0
- package/dist/flex-layout/store/index.js.map +1 -0
- package/dist/flex-layout/types/FlexDirectionTypes.cjs +4 -0
- package/dist/flex-layout/types/FlexDirectionTypes.cjs.map +1 -0
- package/dist/flex-layout/types/FlexDirectionTypes.js +3 -0
- package/dist/flex-layout/types/FlexDirectionTypes.js.map +1 -0
- package/dist/flex-layout/types/FlexLayoutTypes.cjs +4 -0
- package/dist/flex-layout/types/FlexLayoutTypes.cjs.map +1 -0
- package/dist/flex-layout/types/FlexLayoutTypes.d.ts +3 -3
- package/dist/flex-layout/types/FlexLayoutTypes.js +3 -0
- package/dist/flex-layout/types/FlexLayoutTypes.js.map +1 -0
- package/dist/{utils.cjs → flex-layout/utils/FlexLayoutUtils.cjs} +3 -4
- package/dist/flex-layout/utils/FlexLayoutUtils.cjs.map +1 -0
- package/dist/{utils.js → flex-layout/utils/FlexLayoutUtils.js} +3 -4
- package/dist/flex-layout/utils/FlexLayoutUtils.js.map +1 -0
- package/dist/flex-layout/utils/index.cjs +14 -0
- package/dist/flex-layout/utils/index.cjs.map +1 -0
- package/dist/flex-layout/utils/index.js +3 -0
- package/dist/flex-layout/utils/index.js.map +1 -0
- package/dist/index.cjs +7 -3451
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1 -3396
- package/dist/index.js.map +1 -1
- package/dist/types/css.d.cjs +4 -0
- package/dist/types/css.d.cjs.map +1 -0
- package/dist/types/css.d.js +3 -0
- package/dist/types/css.d.js.map +1 -0
- package/package.json +31 -2
- package/dist/components.cjs +0 -3042
- package/dist/components.cjs.map +0 -1
- package/dist/components.css +0 -471
- package/dist/components.css.map +0 -1
- package/dist/components.js +0 -3029
- package/dist/components.js.map +0 -1
- package/dist/hooks.cjs.map +0 -1
- package/dist/hooks.js.map +0 -1
- package/dist/index.css +0 -471
- package/dist/index.css.map +0 -1
- package/dist/providers.cjs.map +0 -1
- package/dist/providers.js.map +0 -1
- package/dist/store.cjs.map +0 -1
- package/dist/store.js.map +0 -1
- package/dist/utils.cjs.map +0 -1
- package/dist/utils.js.map +0 -1
|
@@ -0,0 +1,1211 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
4
|
+
var react = require('react');
|
|
5
|
+
var useDrag = require('../hooks/useDrag');
|
|
6
|
+
var useFlexLayoutSplitScreen = require('../hooks/useFlexLayoutSplitScreen');
|
|
7
|
+
var FlexLayoutContainerStore = require('../store/FlexLayoutContainerStore');
|
|
8
|
+
var styles = require('../styles/FlexLayout.module.css');
|
|
9
|
+
var FlexLayout = require('./FlexLayout');
|
|
10
|
+
var FlexLayoutContainer = require('./FlexLayoutContainer');
|
|
11
|
+
var FlexLayoutSplitScreenDragBox = require('./FlexLayoutSplitScreenDragBox');
|
|
12
|
+
var equal = require('fast-deep-equal');
|
|
13
|
+
var rxjs = require('rxjs');
|
|
14
|
+
var FlexLayoutSplitScreenDragBoxContainer = require('./FlexLayoutSplitScreenDragBoxContainer');
|
|
15
|
+
var FlexLayoutSplitScreenDragBoxItem = require('./FlexLayoutSplitScreenDragBoxItem');
|
|
16
|
+
var FlexLayoutSplitScreenDragBoxTitleMore = require('./FlexLayoutSplitScreenDragBoxTitleMore');
|
|
17
|
+
var FlexLayoutSplitScreenScrollBox = require('./FlexLayoutSplitScreenScrollBox');
|
|
18
|
+
|
|
19
|
+
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
20
|
+
|
|
21
|
+
var styles__default = /*#__PURE__*/_interopDefault(styles);
|
|
22
|
+
var FlexLayout__default = /*#__PURE__*/_interopDefault(FlexLayout);
|
|
23
|
+
var FlexLayoutContainer__default = /*#__PURE__*/_interopDefault(FlexLayoutContainer);
|
|
24
|
+
var FlexLayoutSplitScreenDragBox__default = /*#__PURE__*/_interopDefault(FlexLayoutSplitScreenDragBox);
|
|
25
|
+
var equal__default = /*#__PURE__*/_interopDefault(equal);
|
|
26
|
+
var FlexLayoutSplitScreenDragBoxContainer__default = /*#__PURE__*/_interopDefault(FlexLayoutSplitScreenDragBoxContainer);
|
|
27
|
+
var FlexLayoutSplitScreenDragBoxItem__default = /*#__PURE__*/_interopDefault(FlexLayoutSplitScreenDragBoxItem);
|
|
28
|
+
var FlexLayoutSplitScreenDragBoxTitleMore__default = /*#__PURE__*/_interopDefault(FlexLayoutSplitScreenDragBoxTitleMore);
|
|
29
|
+
var FlexLayoutSplitScreenScrollBox__default = /*#__PURE__*/_interopDefault(FlexLayoutSplitScreenScrollBox);
|
|
30
|
+
|
|
31
|
+
function isOverDrop({
|
|
32
|
+
x,
|
|
33
|
+
y,
|
|
34
|
+
element
|
|
35
|
+
}) {
|
|
36
|
+
const {
|
|
37
|
+
x: elementX,
|
|
38
|
+
y: elementY,
|
|
39
|
+
right: elementRight,
|
|
40
|
+
bottom: elementBottom
|
|
41
|
+
} = element.getBoundingClientRect();
|
|
42
|
+
const isElementOver = x < elementX || x > elementRight || y < elementY || y > elementBottom;
|
|
43
|
+
return isElementOver;
|
|
44
|
+
}
|
|
45
|
+
function isInnerDrop({
|
|
46
|
+
x,
|
|
47
|
+
y,
|
|
48
|
+
element
|
|
49
|
+
}) {
|
|
50
|
+
const {
|
|
51
|
+
x: elementX,
|
|
52
|
+
y: elementY,
|
|
53
|
+
right: elementRight,
|
|
54
|
+
bottom: elementBottom
|
|
55
|
+
} = element.getBoundingClientRect();
|
|
56
|
+
const isElementInner = x >= elementX && x <= elementRight && y >= elementY && y <= elementBottom;
|
|
57
|
+
return isElementInner;
|
|
58
|
+
}
|
|
59
|
+
const handleUpdateDropTargetComponents = ({
|
|
60
|
+
orderName,
|
|
61
|
+
parentOrderName,
|
|
62
|
+
containerName,
|
|
63
|
+
parentLayoutName,
|
|
64
|
+
layoutName,
|
|
65
|
+
dropComponent,
|
|
66
|
+
navigationTitle,
|
|
67
|
+
nextContainerName,
|
|
68
|
+
isUsePrefix = true,
|
|
69
|
+
beforeDropTargetComponent,
|
|
70
|
+
afterDropTargetComponent,
|
|
71
|
+
centerDropTargetComponent,
|
|
72
|
+
dropDocumentOutsideOption,
|
|
73
|
+
screenKey = Array.from(
|
|
74
|
+
window.crypto.getRandomValues(new Uint32Array(16)),
|
|
75
|
+
(e) => e.toString(32).padStart(2, "0")
|
|
76
|
+
).join("")
|
|
77
|
+
}) => {
|
|
78
|
+
const nextContainerNameOrderName = parentOrderName ? parentOrderName : orderName;
|
|
79
|
+
let listMap;
|
|
80
|
+
let list;
|
|
81
|
+
let key;
|
|
82
|
+
if (nextContainerNameOrderName === orderName || nextContainerNameOrderName === "center") {
|
|
83
|
+
listMap = orderName === "before" ? { beforeDropTargetComponent } : orderName === "after" ? { afterDropTargetComponent } : {
|
|
84
|
+
centerDropTargetComponent: centerDropTargetComponent.filter(
|
|
85
|
+
(e) => !e.containerName.split("_").at(0).startsWith(
|
|
86
|
+
containerName.split("_").at(0)
|
|
87
|
+
)
|
|
88
|
+
)
|
|
89
|
+
};
|
|
90
|
+
} else {
|
|
91
|
+
listMap = nextContainerNameOrderName === "before" ? { beforeDropTargetComponent } : { afterDropTargetComponent };
|
|
92
|
+
}
|
|
93
|
+
const entries = Object.entries(listMap)[0];
|
|
94
|
+
key = entries[0];
|
|
95
|
+
list = entries[1];
|
|
96
|
+
const newComponent = {
|
|
97
|
+
containerName: `${containerName + "_" + layoutName}${isUsePrefix ? "_" + orderName + "-" + list.length : ""}`,
|
|
98
|
+
component: react.cloneElement(
|
|
99
|
+
dropComponent,
|
|
100
|
+
{ key: screenKey, screenKey }
|
|
101
|
+
),
|
|
102
|
+
navigationTitle,
|
|
103
|
+
dropDocumentOutsideOption,
|
|
104
|
+
screenKey: screenKey || Array.from(
|
|
105
|
+
window.crypto.getRandomValues(new Uint32Array(16)),
|
|
106
|
+
(e) => e.toString(32).padStart(2, "0")
|
|
107
|
+
).join("")
|
|
108
|
+
};
|
|
109
|
+
let allComponents;
|
|
110
|
+
if (nextContainerName) {
|
|
111
|
+
const index = list.findIndex(
|
|
112
|
+
(item) => item.containerName === nextContainerName
|
|
113
|
+
);
|
|
114
|
+
if (index !== -1) {
|
|
115
|
+
if (nextContainerNameOrderName === orderName) {
|
|
116
|
+
if (orderName === "before") {
|
|
117
|
+
allComponents = [
|
|
118
|
+
...list.slice(0, index),
|
|
119
|
+
newComponent,
|
|
120
|
+
...list.slice(index)
|
|
121
|
+
];
|
|
122
|
+
} else {
|
|
123
|
+
allComponents = [
|
|
124
|
+
...list.slice(0, index + 1),
|
|
125
|
+
newComponent,
|
|
126
|
+
...list.slice(index + 1)
|
|
127
|
+
];
|
|
128
|
+
}
|
|
129
|
+
} else {
|
|
130
|
+
if (nextContainerNameOrderName === "after" && orderName === "before") {
|
|
131
|
+
allComponents = [
|
|
132
|
+
...list.slice(0, index),
|
|
133
|
+
newComponent,
|
|
134
|
+
...list.slice(index)
|
|
135
|
+
];
|
|
136
|
+
} else if (nextContainerNameOrderName === "before" && orderName === "after") {
|
|
137
|
+
allComponents = [
|
|
138
|
+
...list.slice(0, index + 1),
|
|
139
|
+
newComponent,
|
|
140
|
+
...list.slice(index + 1)
|
|
141
|
+
];
|
|
142
|
+
} else {
|
|
143
|
+
if (orderName === "before") {
|
|
144
|
+
allComponents = [
|
|
145
|
+
...list.slice(0, index),
|
|
146
|
+
newComponent,
|
|
147
|
+
...list.slice(index)
|
|
148
|
+
];
|
|
149
|
+
} else {
|
|
150
|
+
allComponents = [
|
|
151
|
+
...list.slice(0, index + 1),
|
|
152
|
+
newComponent,
|
|
153
|
+
...list.slice(index + 1)
|
|
154
|
+
];
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
} else {
|
|
159
|
+
if (nextContainerNameOrderName === "center" && orderName === "after") {
|
|
160
|
+
allComponents = [newComponent, ...list];
|
|
161
|
+
} else if (nextContainerNameOrderName === "center" && orderName === "before") {
|
|
162
|
+
allComponents = [...list, newComponent];
|
|
163
|
+
} else {
|
|
164
|
+
allComponents = orderName === "before" ? [newComponent, ...list] : [...list, newComponent];
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
} else {
|
|
168
|
+
allComponents = orderName === "before" ? [newComponent, ...list] : [...list, newComponent];
|
|
169
|
+
}
|
|
170
|
+
const seen = /* @__PURE__ */ new Set();
|
|
171
|
+
const result = allComponents.filter((item) => {
|
|
172
|
+
if (seen.has(item.containerName)) {
|
|
173
|
+
return false;
|
|
174
|
+
}
|
|
175
|
+
seen.add(item.containerName);
|
|
176
|
+
return true;
|
|
177
|
+
});
|
|
178
|
+
useDrag.dropMovementEventSubject.next({
|
|
179
|
+
state: "append",
|
|
180
|
+
targetParentLayoutName: parentLayoutName,
|
|
181
|
+
targetLayoutName: layoutName,
|
|
182
|
+
targetContainerName: containerName,
|
|
183
|
+
orderName
|
|
184
|
+
});
|
|
185
|
+
return { [key]: result };
|
|
186
|
+
};
|
|
187
|
+
const handleRemove = (list, targetContainerName, orderNameSetter) => {
|
|
188
|
+
const result = list.filter((e) => e.containerName !== targetContainerName);
|
|
189
|
+
if (result.length != list.length)
|
|
190
|
+
orderNameSetter(list.length - result.length);
|
|
191
|
+
return result;
|
|
192
|
+
};
|
|
193
|
+
function getAdjacentItem(items, currentIndex) {
|
|
194
|
+
if (currentIndex + 1 < items.length) {
|
|
195
|
+
return {
|
|
196
|
+
adjacentItem: items[currentIndex + 1],
|
|
197
|
+
adjacentIndex: currentIndex + 1
|
|
198
|
+
};
|
|
199
|
+
} else if (currentIndex - 1 >= 0) {
|
|
200
|
+
return {
|
|
201
|
+
adjacentItem: items[currentIndex - 1],
|
|
202
|
+
adjacentIndex: currentIndex - 1
|
|
203
|
+
};
|
|
204
|
+
}
|
|
205
|
+
return { adjacentItem: null, adjacentIndex: currentIndex };
|
|
206
|
+
}
|
|
207
|
+
const getSelfOrderName = (containerName) => {
|
|
208
|
+
const result = containerName.split("_").at(-1)?.split("-").at(0)?.split("=").at(0);
|
|
209
|
+
if (["before", "center", "after"].some((e) => e === result)) {
|
|
210
|
+
return result;
|
|
211
|
+
} else {
|
|
212
|
+
return;
|
|
213
|
+
}
|
|
214
|
+
};
|
|
215
|
+
function FlexLayoutSplitScreen({
|
|
216
|
+
children,
|
|
217
|
+
containerName,
|
|
218
|
+
layoutName,
|
|
219
|
+
navigationTitle,
|
|
220
|
+
dropDocumentOutsideOption,
|
|
221
|
+
screenKey
|
|
222
|
+
}) {
|
|
223
|
+
const {
|
|
224
|
+
direction,
|
|
225
|
+
isSplit,
|
|
226
|
+
boundaryContainerSize,
|
|
227
|
+
afterDropTargetComponent,
|
|
228
|
+
beforeDropTargetComponent,
|
|
229
|
+
centerDropTargetComponent,
|
|
230
|
+
setAfterDropTargetComponent,
|
|
231
|
+
setBeforeDropTargetComponent,
|
|
232
|
+
setCenterDropTargetComponent,
|
|
233
|
+
layoutRef,
|
|
234
|
+
setIsSplit,
|
|
235
|
+
setDirection
|
|
236
|
+
} = useFlexLayoutSplitScreen.useFlexLayoutSplitScreen({
|
|
237
|
+
isSplitInitial: false,
|
|
238
|
+
directionInitial: "row",
|
|
239
|
+
selfContainerName: containerName,
|
|
240
|
+
parentLayoutName: "",
|
|
241
|
+
layoutName
|
|
242
|
+
});
|
|
243
|
+
react.useEffect(() => {
|
|
244
|
+
FlexLayoutContainerStore.resetRootSplitScreen(layoutName);
|
|
245
|
+
const subscribe = FlexLayoutContainerStore.getSplitScreen(layoutName, layoutName).subscribe((layoutInfo) => {
|
|
246
|
+
if (layoutInfo) {
|
|
247
|
+
setBeforeDropTargetComponent([
|
|
248
|
+
...layoutInfo.beforeDropTargetComponent
|
|
249
|
+
]);
|
|
250
|
+
setAfterDropTargetComponent([
|
|
251
|
+
...layoutInfo.afterDropTargetComponent
|
|
252
|
+
]);
|
|
253
|
+
setCenterDropTargetComponent([
|
|
254
|
+
...layoutInfo.centerDropTargetComponent
|
|
255
|
+
]);
|
|
256
|
+
setDirection(layoutInfo.direction);
|
|
257
|
+
if (layoutInfo.beforeDropTargetComponent.length !== 0 || layoutInfo.afterDropTargetComponent.length !== 0) {
|
|
258
|
+
setIsSplit(true);
|
|
259
|
+
}
|
|
260
|
+
} else {
|
|
261
|
+
FlexLayoutContainerStore.setSplitScreen(layoutName, layoutName, {
|
|
262
|
+
afterDropTargetComponent: [],
|
|
263
|
+
beforeDropTargetComponent: [],
|
|
264
|
+
centerDropTargetComponent: [
|
|
265
|
+
{
|
|
266
|
+
containerName,
|
|
267
|
+
component: children,
|
|
268
|
+
navigationTitle,
|
|
269
|
+
dropDocumentOutsideOption,
|
|
270
|
+
screenKey: screenKey ? screenKey : Array.from(
|
|
271
|
+
window.crypto.getRandomValues(
|
|
272
|
+
new Uint32Array(16)
|
|
273
|
+
),
|
|
274
|
+
(e) => e.toString(32).padStart(2, "0")
|
|
275
|
+
).join("")
|
|
276
|
+
}
|
|
277
|
+
],
|
|
278
|
+
direction
|
|
279
|
+
});
|
|
280
|
+
}
|
|
281
|
+
});
|
|
282
|
+
return () => {
|
|
283
|
+
subscribe.unsubscribe();
|
|
284
|
+
FlexLayoutContainerStore.resetRootSplitScreen(layoutName);
|
|
285
|
+
};
|
|
286
|
+
}, [layoutName]);
|
|
287
|
+
react.useEffect(() => {
|
|
288
|
+
const subscribe = useDrag.dropMovementEventSubject.pipe(
|
|
289
|
+
rxjs.distinctUntilChanged((prev, curr) => {
|
|
290
|
+
const filterChildren = (obj) => {
|
|
291
|
+
const {
|
|
292
|
+
children: children2,
|
|
293
|
+
component,
|
|
294
|
+
targetComponent,
|
|
295
|
+
x,
|
|
296
|
+
y,
|
|
297
|
+
...rest
|
|
298
|
+
} = obj || {};
|
|
299
|
+
return rest;
|
|
300
|
+
};
|
|
301
|
+
return equal__default.default(filterChildren(prev), filterChildren(curr));
|
|
302
|
+
})
|
|
303
|
+
).subscribe((event) => {
|
|
304
|
+
if (event.state === "remove") {
|
|
305
|
+
if (event.targetParentLayoutName === layoutName || event.targetParentLayoutName === "" && event.targetLayoutName === layoutName) {
|
|
306
|
+
requestAnimationFrame(() => {
|
|
307
|
+
let removeCallback = (removeOrderName) => {
|
|
308
|
+
if (event.nextContainerName && event.dropTargetComponentEvent && event.targetComponent) {
|
|
309
|
+
const targetComponentsMap = handleUpdateDropTargetComponents({
|
|
310
|
+
orderName: removeOrderName,
|
|
311
|
+
containerName: event.nextContainerName,
|
|
312
|
+
parentLayoutName: "",
|
|
313
|
+
layoutName,
|
|
314
|
+
dropComponent: event.targetComponent,
|
|
315
|
+
navigationTitle: event.dropTargetComponentEvent.navigationTitle,
|
|
316
|
+
isUsePrefix: true,
|
|
317
|
+
afterDropTargetComponent,
|
|
318
|
+
beforeDropTargetComponent,
|
|
319
|
+
centerDropTargetComponent,
|
|
320
|
+
dropDocumentOutsideOption,
|
|
321
|
+
screenKey: event.dropTargetComponentEvent.screenKey
|
|
322
|
+
});
|
|
323
|
+
FlexLayoutContainerStore.setSplitScreen(layoutName, layoutName, {
|
|
324
|
+
...FlexLayoutContainerStore.getCurrentSplitScreenComponents(
|
|
325
|
+
layoutName,
|
|
326
|
+
layoutName
|
|
327
|
+
) || {
|
|
328
|
+
afterDropTargetComponent,
|
|
329
|
+
beforeDropTargetComponent,
|
|
330
|
+
centerDropTargetComponent,
|
|
331
|
+
direction
|
|
332
|
+
},
|
|
333
|
+
...targetComponentsMap
|
|
334
|
+
});
|
|
335
|
+
Promise.resolve().then(
|
|
336
|
+
() => event.dropEndCallback && event.dropEndCallback({
|
|
337
|
+
x: event.x,
|
|
338
|
+
y: event.y,
|
|
339
|
+
containerName
|
|
340
|
+
})
|
|
341
|
+
);
|
|
342
|
+
}
|
|
343
|
+
};
|
|
344
|
+
const currentComponents = FlexLayoutContainerStore.getCurrentSplitScreenComponents(
|
|
345
|
+
layoutName,
|
|
346
|
+
layoutName
|
|
347
|
+
);
|
|
348
|
+
const afterList = handleRemove(
|
|
349
|
+
currentComponents?.afterDropTargetComponent || afterDropTargetComponent,
|
|
350
|
+
event.targetContainerName,
|
|
351
|
+
() => removeCallback("after")
|
|
352
|
+
);
|
|
353
|
+
const beforList = handleRemove(
|
|
354
|
+
currentComponents?.beforeDropTargetComponent || beforeDropTargetComponent,
|
|
355
|
+
event.targetContainerName,
|
|
356
|
+
() => removeCallback("before")
|
|
357
|
+
);
|
|
358
|
+
const centerList = handleRemove(
|
|
359
|
+
currentComponents?.centerDropTargetComponent || centerDropTargetComponent,
|
|
360
|
+
event.targetContainerName,
|
|
361
|
+
() => removeCallback("center")
|
|
362
|
+
);
|
|
363
|
+
FlexLayoutContainerStore.setSplitScreen(layoutName, layoutName, {
|
|
364
|
+
afterDropTargetComponent: afterList,
|
|
365
|
+
beforeDropTargetComponent: beforList,
|
|
366
|
+
centerDropTargetComponent: centerList,
|
|
367
|
+
direction
|
|
368
|
+
});
|
|
369
|
+
});
|
|
370
|
+
}
|
|
371
|
+
} else if (event.state === "append") {
|
|
372
|
+
const {
|
|
373
|
+
x,
|
|
374
|
+
y,
|
|
375
|
+
dropEndCallback,
|
|
376
|
+
dropTargetComponentEvent,
|
|
377
|
+
orderName,
|
|
378
|
+
parentOrderName,
|
|
379
|
+
targetLayoutName,
|
|
380
|
+
targetParentLayoutName,
|
|
381
|
+
targetContainerName,
|
|
382
|
+
targetComponent,
|
|
383
|
+
nextContainerName
|
|
384
|
+
} = event;
|
|
385
|
+
if (layoutRef.current && orderName && x && y && targetComponent && dropTargetComponentEvent && targetLayoutName === layoutName && isInnerDrop({ x, y, element: layoutRef.current })) {
|
|
386
|
+
const {
|
|
387
|
+
direction: dropDirection,
|
|
388
|
+
navigationTitle: navigationTitle2,
|
|
389
|
+
dropDocumentOutsideOption: dropDocumentOutsideOption2
|
|
390
|
+
} = dropTargetComponentEvent;
|
|
391
|
+
const isOrderNameNotCenter = orderName !== "center";
|
|
392
|
+
const isOrderNameCenterAndFirstScreen = orderName === "center" && centerDropTargetComponent.length <= 1;
|
|
393
|
+
if (isOrderNameNotCenter || isOrderNameCenterAndFirstScreen) {
|
|
394
|
+
setIsSplit(true);
|
|
395
|
+
if (isOrderNameNotCenter) {
|
|
396
|
+
setDirection(dropDirection);
|
|
397
|
+
const targetComponentsMap = handleUpdateDropTargetComponents({
|
|
398
|
+
orderName,
|
|
399
|
+
parentOrderName,
|
|
400
|
+
containerName: targetContainerName,
|
|
401
|
+
nextContainerName,
|
|
402
|
+
dropComponent: targetComponent,
|
|
403
|
+
parentLayoutName: "",
|
|
404
|
+
layoutName,
|
|
405
|
+
navigationTitle: navigationTitle2,
|
|
406
|
+
isUsePrefix: true,
|
|
407
|
+
afterDropTargetComponent,
|
|
408
|
+
beforeDropTargetComponent,
|
|
409
|
+
centerDropTargetComponent,
|
|
410
|
+
dropDocumentOutsideOption: dropDocumentOutsideOption2
|
|
411
|
+
});
|
|
412
|
+
FlexLayoutContainerStore.setSplitScreen(layoutName, layoutName, {
|
|
413
|
+
...{
|
|
414
|
+
afterDropTargetComponent,
|
|
415
|
+
beforeDropTargetComponent,
|
|
416
|
+
centerDropTargetComponent,
|
|
417
|
+
direction: dropDirection
|
|
418
|
+
},
|
|
419
|
+
...targetComponentsMap,
|
|
420
|
+
...{ direction: dropDirection }
|
|
421
|
+
});
|
|
422
|
+
Promise.resolve().then(
|
|
423
|
+
() => dropEndCallback && dropEndCallback({
|
|
424
|
+
x: event.x,
|
|
425
|
+
y: event.y,
|
|
426
|
+
containerName
|
|
427
|
+
})
|
|
428
|
+
);
|
|
429
|
+
} else {
|
|
430
|
+
const childScreenInfo = FlexLayoutContainerStore.getCurrentSplitScreenComponents(
|
|
431
|
+
layoutName,
|
|
432
|
+
`${layoutName}_center=${centerDropTargetComponent[0].screenKey}`
|
|
433
|
+
) || {
|
|
434
|
+
afterDropTargetComponent: [],
|
|
435
|
+
beforeDropTargetComponent: [],
|
|
436
|
+
centerDropTargetComponent: [],
|
|
437
|
+
direction
|
|
438
|
+
};
|
|
439
|
+
FlexLayoutContainerStore.setSplitScreen(
|
|
440
|
+
layoutName,
|
|
441
|
+
`${layoutName}_center=${centerDropTargetComponent[0].screenKey}`,
|
|
442
|
+
{
|
|
443
|
+
...childScreenInfo,
|
|
444
|
+
...{
|
|
445
|
+
centerDropTargetComponent: [
|
|
446
|
+
centerDropTargetComponent[0],
|
|
447
|
+
{
|
|
448
|
+
containerName: `${targetContainerName}_${layoutName}_${orderName}`,
|
|
449
|
+
component: targetComponent,
|
|
450
|
+
dropDocumentOutsideOption: dropDocumentOutsideOption2,
|
|
451
|
+
screenKey: centerDropTargetComponent[0].screenKey,
|
|
452
|
+
navigationTitle: navigationTitle2
|
|
453
|
+
}
|
|
454
|
+
]
|
|
455
|
+
}
|
|
456
|
+
}
|
|
457
|
+
);
|
|
458
|
+
}
|
|
459
|
+
}
|
|
460
|
+
}
|
|
461
|
+
}
|
|
462
|
+
});
|
|
463
|
+
return () => {
|
|
464
|
+
subscribe.unsubscribe();
|
|
465
|
+
};
|
|
466
|
+
}, [
|
|
467
|
+
direction,
|
|
468
|
+
layoutName,
|
|
469
|
+
isSplit,
|
|
470
|
+
beforeDropTargetComponent,
|
|
471
|
+
afterDropTargetComponent,
|
|
472
|
+
centerDropTargetComponent
|
|
473
|
+
]);
|
|
474
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `${styles__default.default["flex-split-screen"]}`, ref: layoutRef, children: [
|
|
475
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
476
|
+
FlexLayout__default.default,
|
|
477
|
+
{
|
|
478
|
+
direction,
|
|
479
|
+
layoutName,
|
|
480
|
+
"data-is_split": isSplit,
|
|
481
|
+
panelMovementMode: "bulldozer",
|
|
482
|
+
children: [
|
|
483
|
+
beforeDropTargetComponent.length != 0 ? /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: beforeDropTargetComponent.map(
|
|
484
|
+
({
|
|
485
|
+
containerName: cName,
|
|
486
|
+
component,
|
|
487
|
+
navigationTitle: navigationTitle2,
|
|
488
|
+
dropDocumentOutsideOption: dropDocumentOutsideOption2,
|
|
489
|
+
screenKey: screenKey2
|
|
490
|
+
}, i) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
491
|
+
FlexLayoutContainer__default.default,
|
|
492
|
+
{
|
|
493
|
+
containerName: cName,
|
|
494
|
+
isInitialResizable: true,
|
|
495
|
+
isResizePanel: true,
|
|
496
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
497
|
+
FlexLayoutSplitScreenChild,
|
|
498
|
+
{
|
|
499
|
+
parentDirection: direction,
|
|
500
|
+
layoutName: `${layoutName}_before`,
|
|
501
|
+
parentLayoutName: layoutName,
|
|
502
|
+
containerName: cName,
|
|
503
|
+
depth: 1,
|
|
504
|
+
rootRef: layoutRef,
|
|
505
|
+
screenKey: screenKey2,
|
|
506
|
+
initialCenterComponents: [
|
|
507
|
+
{
|
|
508
|
+
navigationTitle: navigationTitle2,
|
|
509
|
+
component,
|
|
510
|
+
containerName: cName,
|
|
511
|
+
dropDocumentOutsideOption: dropDocumentOutsideOption2,
|
|
512
|
+
screenKey: screenKey2
|
|
513
|
+
}
|
|
514
|
+
],
|
|
515
|
+
rootName: layoutName
|
|
516
|
+
}
|
|
517
|
+
)
|
|
518
|
+
},
|
|
519
|
+
cName
|
|
520
|
+
)
|
|
521
|
+
) }) : /* @__PURE__ */ jsxRuntime.jsx("div", {}),
|
|
522
|
+
centerDropTargetComponent.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx("div", {}) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
523
|
+
FlexLayoutContainer__default.default,
|
|
524
|
+
{
|
|
525
|
+
containerName: `${centerDropTargetComponent[0].containerName}`,
|
|
526
|
+
isInitialResizable: true,
|
|
527
|
+
isResizePanel: isSplit,
|
|
528
|
+
children: isSplit ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
529
|
+
FlexLayoutSplitScreenChild,
|
|
530
|
+
{
|
|
531
|
+
parentDirection: direction,
|
|
532
|
+
layoutName: `${layoutName}_center`,
|
|
533
|
+
parentLayoutName: layoutName,
|
|
534
|
+
containerName: `${centerDropTargetComponent[0].containerName}`,
|
|
535
|
+
depth: 0,
|
|
536
|
+
rootRef: layoutRef,
|
|
537
|
+
screenKey: centerDropTargetComponent[0].screenKey,
|
|
538
|
+
initialCenterComponents: [
|
|
539
|
+
{
|
|
540
|
+
navigationTitle: centerDropTargetComponent[0].navigationTitle,
|
|
541
|
+
component: centerDropTargetComponent[0].component,
|
|
542
|
+
containerName: centerDropTargetComponent[0].containerName,
|
|
543
|
+
dropDocumentOutsideOption: centerDropTargetComponent[0].dropDocumentOutsideOption,
|
|
544
|
+
screenKey: centerDropTargetComponent[0].screenKey
|
|
545
|
+
}
|
|
546
|
+
],
|
|
547
|
+
rootName: layoutName
|
|
548
|
+
}
|
|
549
|
+
) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
550
|
+
FlexLayoutSplitScreenScrollBox__default.default,
|
|
551
|
+
{
|
|
552
|
+
keyName: centerDropTargetComponent[0].containerName,
|
|
553
|
+
isDefaultScrollStyle: true,
|
|
554
|
+
children: centerDropTargetComponent[0].component
|
|
555
|
+
}
|
|
556
|
+
)
|
|
557
|
+
}
|
|
558
|
+
),
|
|
559
|
+
afterDropTargetComponent.length != 0 ? /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: afterDropTargetComponent.map(
|
|
560
|
+
({
|
|
561
|
+
containerName: cName,
|
|
562
|
+
component,
|
|
563
|
+
navigationTitle: navigationTitle2,
|
|
564
|
+
dropDocumentOutsideOption: dropDocumentOutsideOption2,
|
|
565
|
+
screenKey: screenKey2
|
|
566
|
+
}, i) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
567
|
+
FlexLayoutContainer__default.default,
|
|
568
|
+
{
|
|
569
|
+
containerName: cName,
|
|
570
|
+
isInitialResizable: true,
|
|
571
|
+
isResizePanel: afterDropTargetComponent.length - 1 !== i,
|
|
572
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
573
|
+
FlexLayoutSplitScreenChild,
|
|
574
|
+
{
|
|
575
|
+
parentDirection: direction,
|
|
576
|
+
layoutName: `${layoutName}_after`,
|
|
577
|
+
parentLayoutName: layoutName,
|
|
578
|
+
containerName: cName,
|
|
579
|
+
depth: 1,
|
|
580
|
+
rootRef: layoutRef,
|
|
581
|
+
screenKey: screenKey2,
|
|
582
|
+
initialCenterComponents: [
|
|
583
|
+
{
|
|
584
|
+
navigationTitle: navigationTitle2,
|
|
585
|
+
component,
|
|
586
|
+
containerName: cName,
|
|
587
|
+
dropDocumentOutsideOption: dropDocumentOutsideOption2,
|
|
588
|
+
screenKey: screenKey2
|
|
589
|
+
}
|
|
590
|
+
],
|
|
591
|
+
rootName: layoutName
|
|
592
|
+
}
|
|
593
|
+
)
|
|
594
|
+
},
|
|
595
|
+
cName
|
|
596
|
+
)
|
|
597
|
+
) }) : /* @__PURE__ */ jsxRuntime.jsx("div", {})
|
|
598
|
+
]
|
|
599
|
+
}
|
|
600
|
+
),
|
|
601
|
+
boundaryContainerSize && /* @__PURE__ */ jsxRuntime.jsx(
|
|
602
|
+
"div",
|
|
603
|
+
{
|
|
604
|
+
className: `${styles__default.default["flex-split-screen-boundary-container"]}`,
|
|
605
|
+
style: { ...boundaryContainerSize },
|
|
606
|
+
children: "\u2B07\uFE0F\uB4DC\uB86D\uD558\uBA74 \uD654\uBA74\uC774 \uBD84\uD560\uB429\uB2C8\uB2E4."
|
|
607
|
+
}
|
|
608
|
+
)
|
|
609
|
+
] });
|
|
610
|
+
}
|
|
611
|
+
function FlexLayoutSplitScreenChild({
|
|
612
|
+
containerName,
|
|
613
|
+
layoutName,
|
|
614
|
+
parentLayoutName,
|
|
615
|
+
parentDirection,
|
|
616
|
+
depth,
|
|
617
|
+
//isSplit: isSplitInitial,
|
|
618
|
+
rootRef,
|
|
619
|
+
rootName,
|
|
620
|
+
initialCenterComponents,
|
|
621
|
+
screenKey
|
|
622
|
+
}) {
|
|
623
|
+
const {
|
|
624
|
+
direction,
|
|
625
|
+
isSplit,
|
|
626
|
+
boundaryContainerSize,
|
|
627
|
+
afterDropTargetComponent,
|
|
628
|
+
beforeDropTargetComponent,
|
|
629
|
+
centerDropTargetComponent,
|
|
630
|
+
setAfterDropTargetComponent,
|
|
631
|
+
setBeforeDropTargetComponent,
|
|
632
|
+
setCenterDropTargetComponent,
|
|
633
|
+
layoutRef,
|
|
634
|
+
setIsSplit,
|
|
635
|
+
setDirection
|
|
636
|
+
} = useFlexLayoutSplitScreen.useFlexLayoutSplitScreen({
|
|
637
|
+
isSplitInitial: false,
|
|
638
|
+
directionInitial: "row",
|
|
639
|
+
parentDirection,
|
|
640
|
+
selfContainerName: containerName,
|
|
641
|
+
parentLayoutName,
|
|
642
|
+
layoutName
|
|
643
|
+
});
|
|
644
|
+
const [isEmptyContent, setIsEmptyContent] = react.useState(false);
|
|
645
|
+
const [activeIndex, setActiveIndex] = react.useState(0);
|
|
646
|
+
const centerDropTargetComponentRef = react.useRef(centerDropTargetComponent);
|
|
647
|
+
const activeIndexRef = react.useRef(activeIndex);
|
|
648
|
+
react.useEffect(() => {
|
|
649
|
+
const subscribe = FlexLayoutContainerStore.getSplitScreen(rootName, `${layoutName}=${screenKey}`).pipe(rxjs.take(1)).subscribe((layoutInfo) => {
|
|
650
|
+
FlexLayoutContainerStore.setSplitScreen(rootName, `${layoutName}=${screenKey}`, {
|
|
651
|
+
afterDropTargetComponent: layoutInfo?.afterDropTargetComponent || [],
|
|
652
|
+
beforeDropTargetComponent: layoutInfo?.beforeDropTargetComponent || [],
|
|
653
|
+
centerDropTargetComponent: layoutInfo?.centerDropTargetComponent || initialCenterComponents || [],
|
|
654
|
+
direction: layoutInfo?.direction || direction
|
|
655
|
+
});
|
|
656
|
+
});
|
|
657
|
+
return () => {
|
|
658
|
+
FlexLayoutContainerStore.removeSplitScreenChild(rootName, layoutName);
|
|
659
|
+
subscribe.unsubscribe();
|
|
660
|
+
};
|
|
661
|
+
}, [rootName, layoutName, initialCenterComponents]);
|
|
662
|
+
react.useEffect(() => {
|
|
663
|
+
const subscribe = FlexLayoutContainerStore.getSplitScreen(rootName, `${layoutName}=${screenKey}`).subscribe((layoutInfo) => {
|
|
664
|
+
if (layoutInfo) {
|
|
665
|
+
setBeforeDropTargetComponent([
|
|
666
|
+
...layoutInfo.beforeDropTargetComponent
|
|
667
|
+
]);
|
|
668
|
+
setAfterDropTargetComponent([
|
|
669
|
+
...layoutInfo.afterDropTargetComponent
|
|
670
|
+
]);
|
|
671
|
+
setCenterDropTargetComponent([
|
|
672
|
+
...layoutInfo.centerDropTargetComponent
|
|
673
|
+
]);
|
|
674
|
+
setDirection(layoutInfo.direction);
|
|
675
|
+
if (layoutInfo.beforeDropTargetComponent.length !== 0 || layoutInfo.afterDropTargetComponent.length !== 0) {
|
|
676
|
+
setIsSplit(true);
|
|
677
|
+
} else if (layoutInfo.beforeDropTargetComponent.length === 0 && layoutInfo.centerDropTargetComponent.length === 0 && layoutInfo.afterDropTargetComponent.length === 0) {
|
|
678
|
+
useDrag.dropMovementEventSubject.next({
|
|
679
|
+
state: "remove",
|
|
680
|
+
targetContainerName: containerName,
|
|
681
|
+
targetParentLayoutName: "",
|
|
682
|
+
targetLayoutName: parentLayoutName
|
|
683
|
+
});
|
|
684
|
+
setIsEmptyContent(true);
|
|
685
|
+
}
|
|
686
|
+
}
|
|
687
|
+
});
|
|
688
|
+
return () => {
|
|
689
|
+
subscribe.unsubscribe();
|
|
690
|
+
};
|
|
691
|
+
}, [rootName, layoutName]);
|
|
692
|
+
react.useEffect(() => {
|
|
693
|
+
const subscribe = useDrag.dropMovementEventSubject.pipe(
|
|
694
|
+
rxjs.distinctUntilChanged((prev, curr) => {
|
|
695
|
+
const filterChildren = (obj) => {
|
|
696
|
+
const {
|
|
697
|
+
children,
|
|
698
|
+
component,
|
|
699
|
+
targetComponent,
|
|
700
|
+
x,
|
|
701
|
+
y,
|
|
702
|
+
...rest
|
|
703
|
+
} = obj || {};
|
|
704
|
+
return rest;
|
|
705
|
+
};
|
|
706
|
+
return equal__default.default(filterChildren(prev), filterChildren(curr));
|
|
707
|
+
})
|
|
708
|
+
).subscribe((event) => {
|
|
709
|
+
if (event.state === "remove") {
|
|
710
|
+
if (event.targetParentLayoutName === layoutName || event.targetParentLayoutName === "" && event.targetLayoutName === layoutName) {
|
|
711
|
+
requestAnimationFrame(() => {
|
|
712
|
+
let removeCallback = (removeOrderName) => {
|
|
713
|
+
if (event.nextContainerName && event.dropTargetComponentEvent && event.targetComponent) {
|
|
714
|
+
const targetComponentsMap = handleUpdateDropTargetComponents({
|
|
715
|
+
orderName: removeOrderName,
|
|
716
|
+
containerName: event.nextContainerName,
|
|
717
|
+
parentLayoutName,
|
|
718
|
+
layoutName,
|
|
719
|
+
dropComponent: event.targetComponent,
|
|
720
|
+
navigationTitle: event.dropTargetComponentEvent.navigationTitle,
|
|
721
|
+
isUsePrefix: true,
|
|
722
|
+
afterDropTargetComponent,
|
|
723
|
+
beforeDropTargetComponent,
|
|
724
|
+
centerDropTargetComponent,
|
|
725
|
+
dropDocumentOutsideOption: event.dropTargetComponentEvent?.dropDocumentOutsideOption,
|
|
726
|
+
screenKey: event.dropTargetComponentEvent.screenKey
|
|
727
|
+
});
|
|
728
|
+
FlexLayoutContainerStore.setSplitScreen(
|
|
729
|
+
rootName,
|
|
730
|
+
`${layoutName}=${screenKey}`,
|
|
731
|
+
{
|
|
732
|
+
...FlexLayoutContainerStore.getCurrentSplitScreenComponents(
|
|
733
|
+
rootName,
|
|
734
|
+
`${layoutName}=${screenKey}`
|
|
735
|
+
) || {
|
|
736
|
+
afterDropTargetComponent,
|
|
737
|
+
beforeDropTargetComponent,
|
|
738
|
+
centerDropTargetComponent,
|
|
739
|
+
direction
|
|
740
|
+
},
|
|
741
|
+
...targetComponentsMap
|
|
742
|
+
}
|
|
743
|
+
);
|
|
744
|
+
Promise.resolve().then(
|
|
745
|
+
() => event.dropEndCallback && event.dropEndCallback({
|
|
746
|
+
x: event.x,
|
|
747
|
+
y: event.y,
|
|
748
|
+
containerName
|
|
749
|
+
})
|
|
750
|
+
);
|
|
751
|
+
}
|
|
752
|
+
};
|
|
753
|
+
const currentComponents = FlexLayoutContainerStore.getCurrentSplitScreenComponents(
|
|
754
|
+
rootName,
|
|
755
|
+
`${layoutName}=${screenKey}`
|
|
756
|
+
);
|
|
757
|
+
const afterList = handleRemove(
|
|
758
|
+
currentComponents?.afterDropTargetComponent || afterDropTargetComponent,
|
|
759
|
+
event.targetContainerName,
|
|
760
|
+
() => removeCallback("after")
|
|
761
|
+
);
|
|
762
|
+
const beforList = handleRemove(
|
|
763
|
+
currentComponents?.beforeDropTargetComponent || beforeDropTargetComponent,
|
|
764
|
+
event.targetContainerName,
|
|
765
|
+
() => removeCallback("before")
|
|
766
|
+
);
|
|
767
|
+
const centerList = handleRemove(
|
|
768
|
+
currentComponents?.centerDropTargetComponent || centerDropTargetComponent,
|
|
769
|
+
event.targetContainerName,
|
|
770
|
+
() => removeCallback("center")
|
|
771
|
+
);
|
|
772
|
+
FlexLayoutContainerStore.setSplitScreen(
|
|
773
|
+
rootName,
|
|
774
|
+
`${layoutName}=${screenKey}`,
|
|
775
|
+
{
|
|
776
|
+
afterDropTargetComponent: afterList,
|
|
777
|
+
beforeDropTargetComponent: beforList,
|
|
778
|
+
centerDropTargetComponent: centerList,
|
|
779
|
+
direction
|
|
780
|
+
}
|
|
781
|
+
);
|
|
782
|
+
});
|
|
783
|
+
}
|
|
784
|
+
} else if (event.state === "append") {
|
|
785
|
+
const {
|
|
786
|
+
x,
|
|
787
|
+
y,
|
|
788
|
+
dropEndCallback,
|
|
789
|
+
dropTargetComponentEvent,
|
|
790
|
+
orderName,
|
|
791
|
+
targetLayoutName,
|
|
792
|
+
targetParentLayoutName,
|
|
793
|
+
targetContainerName,
|
|
794
|
+
targetComponent,
|
|
795
|
+
nextContainerName,
|
|
796
|
+
parentOrderName
|
|
797
|
+
} = event;
|
|
798
|
+
if (layoutRef.current && orderName && x && y && dropTargetComponentEvent && isInnerDrop({ x, y, element: layoutRef.current })) {
|
|
799
|
+
const {
|
|
800
|
+
direction: dropDirection,
|
|
801
|
+
navigationTitle,
|
|
802
|
+
dropDocumentOutsideOption,
|
|
803
|
+
screenKey: containerScreenKey
|
|
804
|
+
} = dropTargetComponentEvent;
|
|
805
|
+
if (
|
|
806
|
+
//orderName !== 'center' &&
|
|
807
|
+
targetLayoutName === layoutName && targetComponent
|
|
808
|
+
) {
|
|
809
|
+
if (dropDirection === parentDirection && orderName !== "center") {
|
|
810
|
+
useDrag.dropMovementEventSubject.next({
|
|
811
|
+
state: "append",
|
|
812
|
+
targetContainerName,
|
|
813
|
+
targetParentLayoutName: "",
|
|
814
|
+
targetLayoutName: parentLayoutName,
|
|
815
|
+
targetComponent,
|
|
816
|
+
nextContainerName: containerName,
|
|
817
|
+
parentOrderName: getSelfOrderName(layoutName) || orderName,
|
|
818
|
+
orderName,
|
|
819
|
+
x,
|
|
820
|
+
y,
|
|
821
|
+
dropEndCallback,
|
|
822
|
+
dropTargetComponentEvent: {
|
|
823
|
+
navigationTitle,
|
|
824
|
+
dropDocumentOutsideOption,
|
|
825
|
+
direction: parentDirection,
|
|
826
|
+
screenKey
|
|
827
|
+
}
|
|
828
|
+
});
|
|
829
|
+
} else {
|
|
830
|
+
if (orderName !== "center") {
|
|
831
|
+
setDirection(dropDirection);
|
|
832
|
+
setIsSplit(true);
|
|
833
|
+
}
|
|
834
|
+
const targetComponentsMap = handleUpdateDropTargetComponents({
|
|
835
|
+
orderName,
|
|
836
|
+
parentOrderName,
|
|
837
|
+
containerName: targetContainerName,
|
|
838
|
+
nextContainerName,
|
|
839
|
+
parentLayoutName,
|
|
840
|
+
layoutName,
|
|
841
|
+
dropComponent: targetComponent,
|
|
842
|
+
navigationTitle,
|
|
843
|
+
isUsePrefix: orderName !== "center",
|
|
844
|
+
afterDropTargetComponent,
|
|
845
|
+
beforeDropTargetComponent,
|
|
846
|
+
centerDropTargetComponent,
|
|
847
|
+
dropDocumentOutsideOption
|
|
848
|
+
});
|
|
849
|
+
FlexLayoutContainerStore.setSplitScreen(
|
|
850
|
+
rootName,
|
|
851
|
+
`${layoutName}=${screenKey}`,
|
|
852
|
+
{
|
|
853
|
+
...FlexLayoutContainerStore.getCurrentSplitScreenComponents(
|
|
854
|
+
rootName,
|
|
855
|
+
`${layoutName}=${screenKey}`
|
|
856
|
+
) || {
|
|
857
|
+
afterDropTargetComponent,
|
|
858
|
+
beforeDropTargetComponent,
|
|
859
|
+
centerDropTargetComponent,
|
|
860
|
+
direction
|
|
861
|
+
},
|
|
862
|
+
...targetComponentsMap,
|
|
863
|
+
...{ direction: dropDirection }
|
|
864
|
+
}
|
|
865
|
+
);
|
|
866
|
+
Promise.resolve().then(
|
|
867
|
+
() => event.dropEndCallback && event.dropEndCallback({
|
|
868
|
+
x: event.x,
|
|
869
|
+
y: event.y,
|
|
870
|
+
containerName
|
|
871
|
+
})
|
|
872
|
+
);
|
|
873
|
+
}
|
|
874
|
+
}
|
|
875
|
+
}
|
|
876
|
+
}
|
|
877
|
+
});
|
|
878
|
+
return () => {
|
|
879
|
+
subscribe.unsubscribe();
|
|
880
|
+
};
|
|
881
|
+
}, [
|
|
882
|
+
direction,
|
|
883
|
+
parentDirection,
|
|
884
|
+
parentLayoutName,
|
|
885
|
+
layoutName,
|
|
886
|
+
beforeDropTargetComponent,
|
|
887
|
+
afterDropTargetComponent,
|
|
888
|
+
centerDropTargetComponent
|
|
889
|
+
]);
|
|
890
|
+
react.useEffect(() => {
|
|
891
|
+
centerDropTargetComponentRef.current = centerDropTargetComponent;
|
|
892
|
+
}, [centerDropTargetComponent]);
|
|
893
|
+
react.useEffect(() => {
|
|
894
|
+
activeIndexRef.current = activeIndex;
|
|
895
|
+
}, [activeIndex]);
|
|
896
|
+
const [isOnlyOneScreen, setIsOnlyOneScreen] = react.useState(false);
|
|
897
|
+
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: !isEmptyContent && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
898
|
+
"div",
|
|
899
|
+
{
|
|
900
|
+
className: `${styles__default.default["flex-split-screen"]}`,
|
|
901
|
+
ref: layoutRef,
|
|
902
|
+
children: [
|
|
903
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
904
|
+
FlexLayout__default.default,
|
|
905
|
+
{
|
|
906
|
+
direction,
|
|
907
|
+
layoutName: `${layoutName}`,
|
|
908
|
+
panelMovementMode: "bulldozer",
|
|
909
|
+
children: [
|
|
910
|
+
beforeDropTargetComponent.length != 0 ? /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: beforeDropTargetComponent.map(
|
|
911
|
+
({
|
|
912
|
+
containerName: cName,
|
|
913
|
+
component,
|
|
914
|
+
navigationTitle,
|
|
915
|
+
dropDocumentOutsideOption,
|
|
916
|
+
screenKey: screenKey2
|
|
917
|
+
}, i) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
918
|
+
FlexLayoutContainer__default.default,
|
|
919
|
+
{
|
|
920
|
+
containerName: cName,
|
|
921
|
+
isInitialResizable: true,
|
|
922
|
+
isResizePanel: true,
|
|
923
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
924
|
+
FlexLayoutSplitScreenChild,
|
|
925
|
+
{
|
|
926
|
+
parentDirection: direction,
|
|
927
|
+
layoutName: `${layoutName}_before-${depth}`,
|
|
928
|
+
parentLayoutName: layoutName,
|
|
929
|
+
containerName: cName,
|
|
930
|
+
depth: depth + 1,
|
|
931
|
+
rootRef,
|
|
932
|
+
screenKey: screenKey2,
|
|
933
|
+
initialCenterComponents: [
|
|
934
|
+
{
|
|
935
|
+
navigationTitle,
|
|
936
|
+
component,
|
|
937
|
+
containerName: cName,
|
|
938
|
+
dropDocumentOutsideOption,
|
|
939
|
+
screenKey: screenKey2
|
|
940
|
+
}
|
|
941
|
+
],
|
|
942
|
+
rootName
|
|
943
|
+
}
|
|
944
|
+
)
|
|
945
|
+
},
|
|
946
|
+
cName
|
|
947
|
+
)
|
|
948
|
+
) }) : /* @__PURE__ */ jsxRuntime.jsx("div", {}),
|
|
949
|
+
centerDropTargetComponent.length != 0 ? /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
950
|
+
FlexLayoutContainer__default.default,
|
|
951
|
+
{
|
|
952
|
+
containerName: `${(centerDropTargetComponent[activeIndex] || centerDropTargetComponent[0]).containerName}`,
|
|
953
|
+
isInitialResizable: true,
|
|
954
|
+
isResizePanel: isSplit,
|
|
955
|
+
children: isSplit ? /* @__PURE__ */ jsxRuntime.jsx("div", { "data-key": screenKey, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
956
|
+
FlexLayoutSplitScreenChild,
|
|
957
|
+
{
|
|
958
|
+
parentDirection: direction,
|
|
959
|
+
layoutName: `${layoutName}_center-${depth}`,
|
|
960
|
+
parentLayoutName: layoutName,
|
|
961
|
+
containerName: `${(centerDropTargetComponent[activeIndex] || centerDropTargetComponent[0]).containerName}`,
|
|
962
|
+
depth: depth + 1,
|
|
963
|
+
rootRef,
|
|
964
|
+
initialCenterComponents: centerDropTargetComponent.map(
|
|
965
|
+
({
|
|
966
|
+
navigationTitle,
|
|
967
|
+
component,
|
|
968
|
+
containerName: cName,
|
|
969
|
+
dropDocumentOutsideOption,
|
|
970
|
+
screenKey: centerScreenKey
|
|
971
|
+
}) => ({
|
|
972
|
+
navigationTitle,
|
|
973
|
+
component,
|
|
974
|
+
containerName: cName,
|
|
975
|
+
dropDocumentOutsideOption,
|
|
976
|
+
screenKey: centerScreenKey
|
|
977
|
+
})
|
|
978
|
+
),
|
|
979
|
+
screenKey,
|
|
980
|
+
rootName
|
|
981
|
+
}
|
|
982
|
+
) }) : /* @__PURE__ */ jsxRuntime.jsxs(
|
|
983
|
+
FlexLayoutSplitScreenScrollBox__default.default,
|
|
984
|
+
{
|
|
985
|
+
keyName: (centerDropTargetComponent[activeIndex] || centerDropTargetComponent[0]).containerName,
|
|
986
|
+
isDefaultScrollStyle: true,
|
|
987
|
+
children: [
|
|
988
|
+
!isOnlyOneScreen && /* @__PURE__ */ jsxRuntime.jsx(
|
|
989
|
+
"div",
|
|
990
|
+
{
|
|
991
|
+
className: `${styles__default.default["flex-split-screen-drag-box-title-wrapper-sticky"]}`,
|
|
992
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
993
|
+
"div",
|
|
994
|
+
{
|
|
995
|
+
"data-is_split": isSplit,
|
|
996
|
+
"data-layout_name": layoutName,
|
|
997
|
+
"data-parent_layout_name": parentLayoutName,
|
|
998
|
+
"data-container_name": `${(centerDropTargetComponent[activeIndex] || centerDropTargetComponent[0]).containerName}`,
|
|
999
|
+
className: `${styles__default.default["flex-split-screen-drag-box-title-wrapper"]}`,
|
|
1000
|
+
children: [
|
|
1001
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1002
|
+
FlexLayoutSplitScreenDragBoxContainer__default.default,
|
|
1003
|
+
{
|
|
1004
|
+
"data-layout_name": layoutName,
|
|
1005
|
+
layoutName,
|
|
1006
|
+
children: centerDropTargetComponent.map(
|
|
1007
|
+
(item, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1008
|
+
FlexLayoutSplitScreenDragBoxItem__default.default,
|
|
1009
|
+
{
|
|
1010
|
+
onClose: (ev) => {
|
|
1011
|
+
if (activeIndexRef.current === index && centerDropTargetComponent.length === 1) {
|
|
1012
|
+
useDrag.dropMovementEventSubject.next(
|
|
1013
|
+
{
|
|
1014
|
+
state: "remove",
|
|
1015
|
+
targetContainerName: containerName,
|
|
1016
|
+
targetParentLayoutName: parentLayoutName,
|
|
1017
|
+
targetLayoutName: layoutName
|
|
1018
|
+
}
|
|
1019
|
+
);
|
|
1020
|
+
} else {
|
|
1021
|
+
if (centerDropTargetComponent.length === activeIndexRef.current + 1) {
|
|
1022
|
+
setActiveIndex(
|
|
1023
|
+
activeIndexRef.current - 1
|
|
1024
|
+
);
|
|
1025
|
+
}
|
|
1026
|
+
setCenterDropTargetComponent(
|
|
1027
|
+
(prev) => {
|
|
1028
|
+
const result = handleRemove(
|
|
1029
|
+
prev,
|
|
1030
|
+
item.containerName,
|
|
1031
|
+
() => {
|
|
1032
|
+
}
|
|
1033
|
+
);
|
|
1034
|
+
return result;
|
|
1035
|
+
}
|
|
1036
|
+
);
|
|
1037
|
+
}
|
|
1038
|
+
},
|
|
1039
|
+
isActive: activeIndex === index,
|
|
1040
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1041
|
+
FlexLayoutSplitScreenDragBox__default.default,
|
|
1042
|
+
{
|
|
1043
|
+
onClick: () => {
|
|
1044
|
+
setActiveIndex(
|
|
1045
|
+
index
|
|
1046
|
+
);
|
|
1047
|
+
},
|
|
1048
|
+
containerName: item.containerName,
|
|
1049
|
+
dropDocumentOutsideOption: item.dropDocumentOutsideOption,
|
|
1050
|
+
targetComponent: item.component,
|
|
1051
|
+
navigationTitle: item.navigationTitle,
|
|
1052
|
+
"data-container-name": item.containerName,
|
|
1053
|
+
"data-layout-name": layoutName,
|
|
1054
|
+
"data-parent-layout-name": parentLayoutName,
|
|
1055
|
+
dropEndCallback: ({
|
|
1056
|
+
x,
|
|
1057
|
+
y,
|
|
1058
|
+
containerName: appendContainerName
|
|
1059
|
+
}) => {
|
|
1060
|
+
if (!rootRef.current || !layoutRef.current)
|
|
1061
|
+
return;
|
|
1062
|
+
const isRootOver = isOverDrop(
|
|
1063
|
+
{
|
|
1064
|
+
x,
|
|
1065
|
+
y,
|
|
1066
|
+
element: rootRef.current
|
|
1067
|
+
}
|
|
1068
|
+
);
|
|
1069
|
+
const isLayoutInner = isInnerDrop(
|
|
1070
|
+
{
|
|
1071
|
+
x,
|
|
1072
|
+
y,
|
|
1073
|
+
element: layoutRef.current
|
|
1074
|
+
}
|
|
1075
|
+
);
|
|
1076
|
+
if (!isRootOver && !isLayoutInner || !isRootOver && isLayoutInner && centerDropTargetComponentRef.current.length > 1) {
|
|
1077
|
+
const option = {};
|
|
1078
|
+
if (centerDropTargetComponentRef.current.length > 1) {
|
|
1079
|
+
const {
|
|
1080
|
+
adjacentItem,
|
|
1081
|
+
adjacentIndex
|
|
1082
|
+
} = getAdjacentItem(
|
|
1083
|
+
centerDropTargetComponentRef.current,
|
|
1084
|
+
activeIndexRef.current
|
|
1085
|
+
);
|
|
1086
|
+
if (adjacentItem && activeIndexRef.current === index) {
|
|
1087
|
+
Object.assign(
|
|
1088
|
+
option,
|
|
1089
|
+
{
|
|
1090
|
+
x,
|
|
1091
|
+
y,
|
|
1092
|
+
targetComponent: adjacentItem.component,
|
|
1093
|
+
nextContainerName: adjacentItem.containerName,
|
|
1094
|
+
orderName: "center",
|
|
1095
|
+
dropTargetComponentEvent: {
|
|
1096
|
+
navigationTitle: adjacentItem.navigationTitle,
|
|
1097
|
+
dropDocumentOutsideOption: adjacentItem.dropDocumentOutsideOption,
|
|
1098
|
+
direction,
|
|
1099
|
+
screenKey
|
|
1100
|
+
}
|
|
1101
|
+
}
|
|
1102
|
+
);
|
|
1103
|
+
}
|
|
1104
|
+
}
|
|
1105
|
+
if (index === 0) {
|
|
1106
|
+
useDrag.dropMovementEventSubject.next(
|
|
1107
|
+
{
|
|
1108
|
+
state: "remove",
|
|
1109
|
+
targetContainerName: item.containerName,
|
|
1110
|
+
targetParentLayoutName: parentLayoutName,
|
|
1111
|
+
targetLayoutName: layoutName,
|
|
1112
|
+
...option
|
|
1113
|
+
}
|
|
1114
|
+
);
|
|
1115
|
+
} else {
|
|
1116
|
+
useDrag.dropMovementEventSubject.next(
|
|
1117
|
+
{
|
|
1118
|
+
state: "remove",
|
|
1119
|
+
targetContainerName: item.containerName,
|
|
1120
|
+
targetParentLayoutName: "",
|
|
1121
|
+
targetLayoutName: layoutName,
|
|
1122
|
+
...option
|
|
1123
|
+
}
|
|
1124
|
+
);
|
|
1125
|
+
}
|
|
1126
|
+
}
|
|
1127
|
+
},
|
|
1128
|
+
children: item.navigationTitle
|
|
1129
|
+
}
|
|
1130
|
+
)
|
|
1131
|
+
},
|
|
1132
|
+
item.navigationTitle + layoutName + item.containerName
|
|
1133
|
+
)
|
|
1134
|
+
)
|
|
1135
|
+
},
|
|
1136
|
+
layoutName
|
|
1137
|
+
),
|
|
1138
|
+
/* @__PURE__ */ jsxRuntime.jsx(FlexLayoutSplitScreenDragBoxTitleMore__default.default, {})
|
|
1139
|
+
]
|
|
1140
|
+
}
|
|
1141
|
+
)
|
|
1142
|
+
}
|
|
1143
|
+
),
|
|
1144
|
+
(() => {
|
|
1145
|
+
const target = centerDropTargetComponent[activeIndex] || centerDropTargetComponent[0];
|
|
1146
|
+
return target.component;
|
|
1147
|
+
})()
|
|
1148
|
+
]
|
|
1149
|
+
}
|
|
1150
|
+
)
|
|
1151
|
+
},
|
|
1152
|
+
(centerDropTargetComponent[activeIndex] || centerDropTargetComponent[0]).containerName
|
|
1153
|
+
) }) : /* @__PURE__ */ jsxRuntime.jsx("div", {}),
|
|
1154
|
+
afterDropTargetComponent.length != 0 ? /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: afterDropTargetComponent.map(
|
|
1155
|
+
({
|
|
1156
|
+
containerName: cName,
|
|
1157
|
+
component,
|
|
1158
|
+
navigationTitle,
|
|
1159
|
+
dropDocumentOutsideOption,
|
|
1160
|
+
screenKey: screenKey2
|
|
1161
|
+
}, i) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1162
|
+
FlexLayoutContainer__default.default,
|
|
1163
|
+
{
|
|
1164
|
+
containerName: cName,
|
|
1165
|
+
isInitialResizable: true,
|
|
1166
|
+
isResizePanel: i !== afterDropTargetComponent.length - 1,
|
|
1167
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1168
|
+
FlexLayoutSplitScreenChild,
|
|
1169
|
+
{
|
|
1170
|
+
parentDirection: direction,
|
|
1171
|
+
layoutName: `${layoutName}_after-${depth}`,
|
|
1172
|
+
parentLayoutName: layoutName,
|
|
1173
|
+
containerName: cName,
|
|
1174
|
+
depth: depth + 1,
|
|
1175
|
+
rootRef,
|
|
1176
|
+
screenKey: screenKey2,
|
|
1177
|
+
initialCenterComponents: [
|
|
1178
|
+
{
|
|
1179
|
+
navigationTitle,
|
|
1180
|
+
component,
|
|
1181
|
+
containerName: cName,
|
|
1182
|
+
dropDocumentOutsideOption,
|
|
1183
|
+
screenKey: screenKey2
|
|
1184
|
+
}
|
|
1185
|
+
],
|
|
1186
|
+
rootName
|
|
1187
|
+
}
|
|
1188
|
+
)
|
|
1189
|
+
},
|
|
1190
|
+
cName
|
|
1191
|
+
)
|
|
1192
|
+
) }) : /* @__PURE__ */ jsxRuntime.jsx("div", {})
|
|
1193
|
+
]
|
|
1194
|
+
}
|
|
1195
|
+
),
|
|
1196
|
+
boundaryContainerSize && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1197
|
+
"div",
|
|
1198
|
+
{
|
|
1199
|
+
className: `${styles__default.default["flex-split-screen-boundary-container"]}`,
|
|
1200
|
+
style: { ...boundaryContainerSize },
|
|
1201
|
+
children: "\u2B07\uFE0F\uB4DC\uB86D\uD558\uBA74 \uD654\uBA74\uC774 \uBD84\uD560\uB429\uB2C8\uB2E4."
|
|
1202
|
+
}
|
|
1203
|
+
)
|
|
1204
|
+
]
|
|
1205
|
+
}
|
|
1206
|
+
) });
|
|
1207
|
+
}
|
|
1208
|
+
|
|
1209
|
+
module.exports = FlexLayoutSplitScreen;
|
|
1210
|
+
//# sourceMappingURL=FlexLayoutSplitScreen.cjs.map
|
|
1211
|
+
//# sourceMappingURL=FlexLayoutSplitScreen.cjs.map
|