laif-ds 0.1.34 → 0.1.36
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/_virtual/index.js +5 -2
- package/dist/_virtual/index3.js +2 -7
- package/dist/_virtual/index4.js +2 -5
- package/dist/_virtual/index5.js +4 -4
- package/dist/_virtual/index6.js +5 -2
- package/dist/_virtual/index7.js +5 -2
- package/dist/_virtual/index8.js +5 -0
- package/dist/_virtual/index9.js +5 -0
- package/dist/_virtual/use-sync-external-store-shim.development.js +5 -0
- package/dist/_virtual/use-sync-external-store-shim.production.js +5 -0
- package/dist/components/ui/checkbox.js +12 -12
- package/dist/components/ui/data-table.js +10 -10
- package/dist/components/ui/gantt/components/Chart/Chart.js +1 -1
- package/dist/components/ui/message-input.js +1 -1
- package/dist/components/ui/tables/data-cross-table/data-cross-table.js +348 -0
- package/dist/components/ui/tables/data-cross-table/edit-controls.js +47 -0
- package/dist/components/ui/tables/data-cross-table/editable-input.js +100 -0
- package/dist/components/ui/tables/data-cross-table/truncated-text.js +19 -0
- package/dist/index.d.ts +29 -3
- package/dist/index.js +1 -1
- package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.js +126 -122
- package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +10 -6
- package/dist/node_modules/@radix-ui/react-accordion/dist/index.js +44 -42
- package/dist/node_modules/@radix-ui/react-avatar/dist/index.js +33 -43
- package/dist/node_modules/@radix-ui/react-checkbox/dist/index.js +237 -120
- package/dist/node_modules/@radix-ui/react-collapsible/dist/index.js +17 -16
- package/dist/node_modules/@radix-ui/react-context-menu/dist/index.js +95 -94
- package/dist/node_modules/@radix-ui/react-dialog/dist/index.js +20 -19
- package/dist/node_modules/@radix-ui/react-dropdown-menu/dist/index.js +3 -3
- package/dist/node_modules/@radix-ui/react-hover-card/dist/index.js +14 -13
- package/dist/node_modules/@radix-ui/react-menu/dist/index.js +136 -136
- package/dist/node_modules/@radix-ui/react-menubar/dist/index.js +70 -68
- package/dist/node_modules/@radix-ui/react-navigation-menu/dist/index.js +66 -64
- package/dist/node_modules/@radix-ui/react-popover/dist/index.js +10 -9
- package/dist/node_modules/@radix-ui/react-presence/dist/index.js +16 -16
- package/dist/node_modules/@radix-ui/react-primitive/dist/index.js +11 -10
- package/dist/node_modules/@radix-ui/react-radio-group/dist/index.js +161 -146
- package/dist/node_modules/@radix-ui/react-roving-focus/dist/index.js +87 -84
- package/dist/node_modules/@radix-ui/react-select/dist/index.js +269 -257
- package/dist/node_modules/@radix-ui/react-slider/dist/index.js +3 -3
- package/dist/node_modules/@radix-ui/react-slot/dist/index.js +29 -28
- package/dist/node_modules/@radix-ui/react-switch/dist/index.js +101 -86
- package/dist/node_modules/@radix-ui/react-tabs/dist/index.js +23 -22
- package/dist/node_modules/@radix-ui/react-toggle/dist/index.js +17 -16
- package/dist/node_modules/@radix-ui/react-toggle-group/dist/index.js +25 -23
- package/dist/node_modules/@radix-ui/react-tooltip/dist/index.js +77 -76
- package/dist/node_modules/@radix-ui/react-use-controllable-state/dist/index.js +43 -21
- package/dist/node_modules/@radix-ui/react-use-is-hydrated/dist/index.js +16 -0
- package/dist/node_modules/@radix-ui/react-visually-hidden/dist/index.js +18 -18
- package/dist/node_modules/@tanstack/react-virtual/dist/esm/index.js +36 -0
- package/dist/node_modules/@tanstack/virtual-core/dist/esm/index.js +491 -0
- package/dist/node_modules/@tanstack/virtual-core/dist/esm/utils.js +53 -0
- package/dist/node_modules/classnames/index.js +1 -1
- package/dist/node_modules/hast-util-to-jsx-runtime/lib/index.js +1 -1
- package/dist/node_modules/property-information/lib/html.js +9 -9
- package/dist/node_modules/react-hook-form/dist/index.esm.js +88 -88
- package/dist/node_modules/react-is/index.js +1 -1
- package/dist/node_modules/react-resizable-panels/dist/react-resizable-panels.browser.esm.js +830 -801
- package/dist/node_modules/recharts/es6/util/ReactUtils.js +1 -1
- package/dist/node_modules/remeda/dist/chunk-AIG3BDKO.js +9 -0
- package/dist/node_modules/remeda/dist/{chunk-A3PVMI4K.js → chunk-KI5X74E2.js} +1 -1
- package/dist/node_modules/style-to-object/cjs/index.js +1 -1
- package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js +3 -3
- package/dist/node_modules/unified/lib/index.js +1 -1
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js +68 -0
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js +56 -0
- package/dist/node_modules/use-sync-external-store/shim/index.js +11 -0
- package/dist/styles.css +1 -1
- package/package.json +2 -1
- package/dist/components/ui/data-cross-table.js +0 -216
- package/dist/node_modules/@radix-ui/react-dropdown-menu/node_modules/@radix-ui/react-arrow/dist/index.js +0 -25
- package/dist/node_modules/@radix-ui/react-dropdown-menu/node_modules/@radix-ui/react-collection/dist/index.js +0 -49
- package/dist/node_modules/@radix-ui/react-dropdown-menu/node_modules/@radix-ui/react-dismissable-layer/dist/index.js +0 -128
- package/dist/node_modules/@radix-ui/react-dropdown-menu/node_modules/@radix-ui/react-focus-scope/dist/index.js +0 -138
- package/dist/node_modules/@radix-ui/react-dropdown-menu/node_modules/@radix-ui/react-menu/dist/index.js +0 -625
- package/dist/node_modules/@radix-ui/react-dropdown-menu/node_modules/@radix-ui/react-popper/dist/index.js +0 -221
- package/dist/node_modules/@radix-ui/react-dropdown-menu/node_modules/@radix-ui/react-portal/dist/index.js +0 -17
- package/dist/node_modules/@radix-ui/react-dropdown-menu/node_modules/@radix-ui/react-primitive/dist/index.js +0 -37
- package/dist/node_modules/@radix-ui/react-dropdown-menu/node_modules/@radix-ui/react-roving-focus/dist/index.js +0 -184
- package/dist/node_modules/@radix-ui/react-dropdown-menu/node_modules/@radix-ui/react-use-controllable-state/dist/index.js +0 -55
- package/dist/node_modules/@radix-ui/react-slider/node_modules/@radix-ui/react-collection/dist/index.js +0 -49
- package/dist/node_modules/@radix-ui/react-slider/node_modules/@radix-ui/react-primitive/dist/index.js +0 -33
- package/dist/node_modules/@radix-ui/react-slider/node_modules/@radix-ui/react-use-controllable-state/dist/index.js +0 -55
- package/dist/node_modules/remeda/dist/chunk-OAMXQXGR.js +0 -9
|
@@ -1,147 +1,149 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import * as
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
function
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
2
|
+
import * as Pn from "react";
|
|
3
|
+
import { forwardRef as Qe, useRef as F, useEffect as te, useContext as en, createContext as wn, useState as ue, useLayoutEffect as In, createElement as de, useImperativeHandle as nn, useCallback as T, useMemo as En } from "react";
|
|
4
|
+
const Ce = wn(null);
|
|
5
|
+
Ce.displayName = "PanelGroupContext";
|
|
6
|
+
const A = {
|
|
7
|
+
group: "data-panel-group",
|
|
8
|
+
groupDirection: "data-panel-group-direction",
|
|
9
|
+
groupId: "data-panel-group-id",
|
|
10
|
+
panel: "data-panel",
|
|
11
|
+
panelCollapsible: "data-panel-collapsible",
|
|
12
|
+
panelId: "data-panel-id",
|
|
13
|
+
panelSize: "data-panel-size",
|
|
14
|
+
resizeHandle: "data-resize-handle",
|
|
15
|
+
resizeHandleActive: "data-resize-handle-active",
|
|
16
|
+
resizeHandleEnabled: "data-panel-resize-handle-enabled",
|
|
17
|
+
resizeHandleId: "data-panel-resize-handle-id",
|
|
18
|
+
resizeHandleState: "data-resize-handle-state"
|
|
19
|
+
}, Be = 10, re = In, Ve = Pn.useId, Cn = typeof Ve == "function" ? Ve : () => null;
|
|
20
|
+
let Rn = 0;
|
|
21
|
+
function Te(e = null) {
|
|
22
|
+
const n = Cn(), t = F(e || n || null);
|
|
23
|
+
return t.current === null && (t.current = "" + Rn++), e ?? t.current;
|
|
24
|
+
}
|
|
25
|
+
function tn({
|
|
24
26
|
children: e,
|
|
25
27
|
className: n = "",
|
|
26
28
|
collapsedSize: t,
|
|
27
|
-
collapsible:
|
|
29
|
+
collapsible: r,
|
|
28
30
|
defaultSize: i,
|
|
29
|
-
forwardedRef:
|
|
31
|
+
forwardedRef: o,
|
|
30
32
|
id: l,
|
|
31
33
|
maxSize: s,
|
|
32
34
|
minSize: a,
|
|
33
|
-
onCollapse:
|
|
34
|
-
onExpand:
|
|
35
|
+
onCollapse: m,
|
|
36
|
+
onExpand: P,
|
|
35
37
|
onResize: f,
|
|
36
|
-
order:
|
|
37
|
-
style:
|
|
38
|
-
tagName:
|
|
39
|
-
...
|
|
38
|
+
order: u,
|
|
39
|
+
style: x,
|
|
40
|
+
tagName: h = "div",
|
|
41
|
+
...I
|
|
40
42
|
}) {
|
|
41
|
-
const w =
|
|
43
|
+
const w = en(Ce);
|
|
42
44
|
if (w === null)
|
|
43
45
|
throw Error("Panel components must be rendered within a PanelGroup container");
|
|
44
46
|
const {
|
|
45
|
-
collapsePanel:
|
|
46
|
-
expandPanel:
|
|
47
|
-
getPanelSize:
|
|
48
|
-
getPanelStyle:
|
|
49
|
-
groupId:
|
|
47
|
+
collapsePanel: S,
|
|
48
|
+
expandPanel: R,
|
|
49
|
+
getPanelSize: M,
|
|
50
|
+
getPanelStyle: H,
|
|
51
|
+
groupId: q,
|
|
50
52
|
isPanelCollapsed: C,
|
|
51
|
-
reevaluatePanelConstraints:
|
|
52
|
-
registerPanel:
|
|
53
|
-
resizePanel:
|
|
54
|
-
unregisterPanel:
|
|
55
|
-
} = w,
|
|
53
|
+
reevaluatePanelConstraints: b,
|
|
54
|
+
registerPanel: U,
|
|
55
|
+
resizePanel: j,
|
|
56
|
+
unregisterPanel: W
|
|
57
|
+
} = w, _ = Te(l), D = F({
|
|
56
58
|
callbacks: {
|
|
57
|
-
onCollapse:
|
|
58
|
-
onExpand:
|
|
59
|
+
onCollapse: m,
|
|
60
|
+
onExpand: P,
|
|
59
61
|
onResize: f
|
|
60
62
|
},
|
|
61
63
|
constraints: {
|
|
62
64
|
collapsedSize: t,
|
|
63
|
-
collapsible:
|
|
65
|
+
collapsible: r,
|
|
64
66
|
defaultSize: i,
|
|
65
67
|
maxSize: s,
|
|
66
68
|
minSize: a
|
|
67
69
|
},
|
|
68
|
-
id:
|
|
70
|
+
id: _,
|
|
69
71
|
idIsFromProps: l !== void 0,
|
|
70
|
-
order:
|
|
72
|
+
order: u
|
|
71
73
|
});
|
|
72
|
-
|
|
74
|
+
F({
|
|
73
75
|
didLogMissingDefaultSizeWarning: !1
|
|
74
|
-
}),
|
|
76
|
+
}), re(() => {
|
|
75
77
|
const {
|
|
76
78
|
callbacks: N,
|
|
77
79
|
constraints: k
|
|
78
|
-
} =
|
|
80
|
+
} = D.current, G = {
|
|
79
81
|
...k
|
|
80
82
|
};
|
|
81
|
-
|
|
82
|
-
}),
|
|
83
|
-
const N =
|
|
84
|
-
return
|
|
85
|
-
|
|
83
|
+
D.current.id = _, D.current.idIsFromProps = l !== void 0, D.current.order = u, N.onCollapse = m, N.onExpand = P, N.onResize = f, k.collapsedSize = t, k.collapsible = r, k.defaultSize = i, k.maxSize = s, k.minSize = a, (G.collapsedSize !== k.collapsedSize || G.collapsible !== k.collapsible || G.maxSize !== k.maxSize || G.minSize !== k.minSize) && b(D.current, G);
|
|
84
|
+
}), re(() => {
|
|
85
|
+
const N = D.current;
|
|
86
|
+
return U(N), () => {
|
|
87
|
+
W(N);
|
|
86
88
|
};
|
|
87
|
-
}, [
|
|
89
|
+
}, [u, _, U, W]), nn(o, () => ({
|
|
88
90
|
collapse: () => {
|
|
89
|
-
|
|
91
|
+
S(D.current);
|
|
90
92
|
},
|
|
91
93
|
expand: (N) => {
|
|
92
|
-
|
|
94
|
+
R(D.current, N);
|
|
93
95
|
},
|
|
94
96
|
getId() {
|
|
95
|
-
return
|
|
97
|
+
return _;
|
|
96
98
|
},
|
|
97
99
|
getSize() {
|
|
98
|
-
return
|
|
100
|
+
return M(D.current);
|
|
99
101
|
},
|
|
100
102
|
isCollapsed() {
|
|
101
|
-
return C(
|
|
103
|
+
return C(D.current);
|
|
102
104
|
},
|
|
103
105
|
isExpanded() {
|
|
104
|
-
return !C(
|
|
106
|
+
return !C(D.current);
|
|
105
107
|
},
|
|
106
108
|
resize: (N) => {
|
|
107
|
-
|
|
109
|
+
j(D.current, N);
|
|
108
110
|
}
|
|
109
|
-
}), [
|
|
110
|
-
const
|
|
111
|
-
return de(
|
|
112
|
-
...
|
|
111
|
+
}), [S, R, M, C, _, j]);
|
|
112
|
+
const Q = H(D.current, i);
|
|
113
|
+
return de(h, {
|
|
114
|
+
...I,
|
|
113
115
|
children: e,
|
|
114
116
|
className: n,
|
|
115
|
-
id:
|
|
117
|
+
id: _,
|
|
116
118
|
style: {
|
|
117
|
-
...
|
|
118
|
-
...
|
|
119
|
+
...Q,
|
|
120
|
+
...x
|
|
119
121
|
},
|
|
120
122
|
// CSS selectors
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
123
|
+
[A.groupId]: q,
|
|
124
|
+
[A.panel]: "",
|
|
125
|
+
[A.panelCollapsible]: r || void 0,
|
|
126
|
+
[A.panelId]: _,
|
|
127
|
+
[A.panelSize]: parseFloat("" + Q.flexGrow).toFixed(1)
|
|
126
128
|
});
|
|
127
129
|
}
|
|
128
|
-
const Ln =
|
|
130
|
+
const Ln = Qe((e, n) => de(tn, {
|
|
129
131
|
...e,
|
|
130
132
|
forwardedRef: n
|
|
131
133
|
}));
|
|
132
|
-
|
|
134
|
+
tn.displayName = "Panel";
|
|
133
135
|
Ln.displayName = "forwardRef(Panel)";
|
|
134
|
-
let
|
|
135
|
-
function
|
|
136
|
+
let Ge = null, we = -1, Z = null;
|
|
137
|
+
function An(e, n) {
|
|
136
138
|
if (n) {
|
|
137
|
-
const t = (n &
|
|
139
|
+
const t = (n & an) !== 0, r = (n & un) !== 0, i = (n & cn) !== 0, o = (n & dn) !== 0;
|
|
138
140
|
if (t)
|
|
139
|
-
return i ? "se-resize" :
|
|
140
|
-
if (
|
|
141
|
-
return i ? "sw-resize" :
|
|
141
|
+
return i ? "se-resize" : o ? "ne-resize" : "e-resize";
|
|
142
|
+
if (r)
|
|
143
|
+
return i ? "sw-resize" : o ? "nw-resize" : "w-resize";
|
|
142
144
|
if (i)
|
|
143
145
|
return "s-resize";
|
|
144
|
-
if (
|
|
146
|
+
if (o)
|
|
145
147
|
return "n-resize";
|
|
146
148
|
}
|
|
147
149
|
switch (e) {
|
|
@@ -153,30 +155,37 @@ function In(e, n) {
|
|
|
153
155
|
return "ns-resize";
|
|
154
156
|
}
|
|
155
157
|
}
|
|
156
|
-
function
|
|
157
|
-
|
|
158
|
+
function Dn() {
|
|
159
|
+
Z !== null && (document.head.removeChild(Z), Ge = null, Z = null, we = -1);
|
|
158
160
|
}
|
|
159
|
-
function
|
|
160
|
-
|
|
161
|
-
|
|
161
|
+
function $e(e, n) {
|
|
162
|
+
var t, r;
|
|
163
|
+
const i = An(e, n);
|
|
164
|
+
if (Ge !== i) {
|
|
165
|
+
if (Ge = i, Z === null && (Z = document.createElement("style"), document.head.appendChild(Z)), we >= 0) {
|
|
166
|
+
var o;
|
|
167
|
+
(o = Z.sheet) === null || o === void 0 || o.removeRule(we);
|
|
168
|
+
}
|
|
169
|
+
we = (t = (r = Z.sheet) === null || r === void 0 ? void 0 : r.insertRule(`*{cursor: ${i} !important;}`)) !== null && t !== void 0 ? t : -1;
|
|
170
|
+
}
|
|
162
171
|
}
|
|
163
|
-
function
|
|
172
|
+
function rn(e) {
|
|
164
173
|
return e.type === "keydown";
|
|
165
174
|
}
|
|
166
175
|
function on(e) {
|
|
167
176
|
return e.type.startsWith("pointer");
|
|
168
177
|
}
|
|
169
|
-
function
|
|
178
|
+
function ln(e) {
|
|
170
179
|
return e.type.startsWith("mouse");
|
|
171
180
|
}
|
|
172
|
-
function
|
|
181
|
+
function Re(e) {
|
|
173
182
|
if (on(e)) {
|
|
174
183
|
if (e.isPrimary)
|
|
175
184
|
return {
|
|
176
185
|
x: e.clientX,
|
|
177
186
|
y: e.clientY
|
|
178
187
|
};
|
|
179
|
-
} else if (
|
|
188
|
+
} else if (ln(e))
|
|
180
189
|
return {
|
|
181
190
|
x: e.clientX,
|
|
182
191
|
y: e.clientY
|
|
@@ -186,171 +195,180 @@ function Ce(e) {
|
|
|
186
195
|
y: 1 / 0
|
|
187
196
|
};
|
|
188
197
|
}
|
|
189
|
-
function
|
|
198
|
+
function Mn() {
|
|
190
199
|
if (typeof matchMedia == "function")
|
|
191
200
|
return matchMedia("(pointer:coarse)").matches ? "coarse" : "fine";
|
|
192
201
|
}
|
|
193
|
-
function
|
|
202
|
+
function $n(e, n, t) {
|
|
194
203
|
return e.x < n.x + n.width && e.x + e.width > n.x && e.y < n.y + n.height && e.y + e.height > n.y;
|
|
195
204
|
}
|
|
196
|
-
function
|
|
205
|
+
function Hn(e, n) {
|
|
197
206
|
if (e === n) throw new Error("Cannot compare node with itself");
|
|
198
207
|
const t = {
|
|
199
|
-
a:
|
|
200
|
-
b:
|
|
208
|
+
a: Xe(e),
|
|
209
|
+
b: Xe(n)
|
|
201
210
|
};
|
|
202
|
-
let
|
|
211
|
+
let r;
|
|
203
212
|
for (; t.a.at(-1) === t.b.at(-1); )
|
|
204
|
-
e = t.a.pop(), n = t.b.pop(),
|
|
205
|
-
|
|
213
|
+
e = t.a.pop(), n = t.b.pop(), r = e;
|
|
214
|
+
y(r, "Stacking order can only be calculated for elements with a common ancestor");
|
|
206
215
|
const i = {
|
|
207
|
-
a:
|
|
208
|
-
b:
|
|
216
|
+
a: qe(Oe(t.a)),
|
|
217
|
+
b: qe(Oe(t.b))
|
|
209
218
|
};
|
|
210
219
|
if (i.a === i.b) {
|
|
211
|
-
const
|
|
220
|
+
const o = r.childNodes, l = {
|
|
212
221
|
a: t.a.at(-1),
|
|
213
222
|
b: t.b.at(-1)
|
|
214
223
|
};
|
|
215
|
-
let s =
|
|
224
|
+
let s = o.length;
|
|
216
225
|
for (; s--; ) {
|
|
217
|
-
const a =
|
|
226
|
+
const a = o[s];
|
|
218
227
|
if (a === l.a) return 1;
|
|
219
228
|
if (a === l.b) return -1;
|
|
220
229
|
}
|
|
221
230
|
}
|
|
222
231
|
return Math.sign(i.a - i.b);
|
|
223
232
|
}
|
|
224
|
-
const
|
|
233
|
+
const kn = /\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;
|
|
225
234
|
function Nn(e) {
|
|
226
235
|
var n;
|
|
227
|
-
const t = getComputedStyle((n =
|
|
236
|
+
const t = getComputedStyle((n = sn(e)) !== null && n !== void 0 ? n : e).display;
|
|
228
237
|
return t === "flex" || t === "inline-flex";
|
|
229
238
|
}
|
|
230
|
-
function
|
|
239
|
+
function _n(e) {
|
|
231
240
|
const n = getComputedStyle(e);
|
|
232
|
-
return !!(n.position === "fixed" || n.zIndex !== "auto" && (n.position !== "static" || Nn(e)) || +n.opacity < 1 || "transform" in n && n.transform !== "none" || "webkitTransform" in n && n.webkitTransform !== "none" || "mixBlendMode" in n && n.mixBlendMode !== "normal" || "filter" in n && n.filter !== "none" || "webkitFilter" in n && n.webkitFilter !== "none" || "isolation" in n && n.isolation === "isolate" ||
|
|
241
|
+
return !!(n.position === "fixed" || n.zIndex !== "auto" && (n.position !== "static" || Nn(e)) || +n.opacity < 1 || "transform" in n && n.transform !== "none" || "webkitTransform" in n && n.webkitTransform !== "none" || "mixBlendMode" in n && n.mixBlendMode !== "normal" || "filter" in n && n.filter !== "none" || "webkitFilter" in n && n.webkitFilter !== "none" || "isolation" in n && n.isolation === "isolate" || kn.test(n.willChange) || n.webkitOverflowScrolling === "touch");
|
|
233
242
|
}
|
|
234
|
-
function
|
|
243
|
+
function Oe(e) {
|
|
235
244
|
let n = e.length;
|
|
236
245
|
for (; n--; ) {
|
|
237
246
|
const t = e[n];
|
|
238
|
-
if (
|
|
247
|
+
if (y(t, "Missing node"), _n(t)) return t;
|
|
239
248
|
}
|
|
240
249
|
return null;
|
|
241
250
|
}
|
|
242
|
-
function
|
|
251
|
+
function qe(e) {
|
|
243
252
|
return e && Number(getComputedStyle(e).zIndex) || 0;
|
|
244
253
|
}
|
|
245
|
-
function
|
|
254
|
+
function Xe(e) {
|
|
246
255
|
const n = [];
|
|
247
256
|
for (; e; )
|
|
248
|
-
n.push(e), e =
|
|
257
|
+
n.push(e), e = sn(e);
|
|
249
258
|
return n;
|
|
250
259
|
}
|
|
251
|
-
function
|
|
260
|
+
function sn(e) {
|
|
252
261
|
const {
|
|
253
262
|
parentNode: n
|
|
254
263
|
} = e;
|
|
255
264
|
return n && n instanceof ShadowRoot ? n.host : n;
|
|
256
265
|
}
|
|
257
|
-
const
|
|
258
|
-
let O = [],
|
|
259
|
-
const
|
|
260
|
-
function
|
|
261
|
-
var
|
|
266
|
+
const an = 1, un = 2, cn = 4, dn = 8, Gn = Mn() === "coarse";
|
|
267
|
+
let O = [], ce = !1, ne = /* @__PURE__ */ new Map(), Le = /* @__PURE__ */ new Map();
|
|
268
|
+
const ve = /* @__PURE__ */ new Set();
|
|
269
|
+
function Bn(e, n, t, r, i) {
|
|
270
|
+
var o;
|
|
262
271
|
const {
|
|
263
272
|
ownerDocument: l
|
|
264
273
|
} = n, s = {
|
|
265
274
|
direction: t,
|
|
266
275
|
element: n,
|
|
267
|
-
hitAreaMargins:
|
|
276
|
+
hitAreaMargins: r,
|
|
268
277
|
setResizeHandlerState: i
|
|
269
|
-
}, a = (
|
|
270
|
-
return
|
|
271
|
-
var
|
|
272
|
-
Le.delete(e),
|
|
273
|
-
const f = (
|
|
274
|
-
if (
|
|
275
|
-
const
|
|
276
|
-
|
|
278
|
+
}, a = (o = ne.get(l)) !== null && o !== void 0 ? o : 0;
|
|
279
|
+
return ne.set(l, a + 1), ve.add(s), Ie(), function() {
|
|
280
|
+
var P;
|
|
281
|
+
Le.delete(e), ve.delete(s);
|
|
282
|
+
const f = (P = ne.get(l)) !== null && P !== void 0 ? P : 1;
|
|
283
|
+
if (ne.set(l, f - 1), Ie(), f === 1 && ne.delete(l), O.includes(s)) {
|
|
284
|
+
const u = O.indexOf(s);
|
|
285
|
+
u >= 0 && O.splice(u, 1), We(), i("up", !0, null);
|
|
277
286
|
}
|
|
278
287
|
};
|
|
279
288
|
}
|
|
280
|
-
function
|
|
289
|
+
function Tn(e) {
|
|
281
290
|
const {
|
|
282
291
|
target: n
|
|
283
292
|
} = e, {
|
|
284
293
|
x: t,
|
|
285
|
-
y:
|
|
286
|
-
} =
|
|
287
|
-
|
|
294
|
+
y: r
|
|
295
|
+
} = Re(e);
|
|
296
|
+
ce = !0, Fe({
|
|
288
297
|
target: n,
|
|
289
298
|
x: t,
|
|
290
|
-
y:
|
|
291
|
-
}),
|
|
299
|
+
y: r
|
|
300
|
+
}), Ie(), O.length > 0 && (Ee("down", e), e.preventDefault(), fn(n) || e.stopImmediatePropagation());
|
|
292
301
|
}
|
|
293
|
-
function
|
|
302
|
+
function He(e) {
|
|
294
303
|
const {
|
|
295
304
|
x: n,
|
|
296
305
|
y: t
|
|
297
|
-
} =
|
|
298
|
-
if (
|
|
306
|
+
} = Re(e);
|
|
307
|
+
if (ce && e.buttons === 0 && (ce = !1, Ee("up", e)), !ce) {
|
|
299
308
|
const {
|
|
300
|
-
target:
|
|
309
|
+
target: r
|
|
301
310
|
} = e;
|
|
302
|
-
|
|
303
|
-
target:
|
|
311
|
+
Fe({
|
|
312
|
+
target: r,
|
|
304
313
|
x: n,
|
|
305
314
|
y: t
|
|
306
315
|
});
|
|
307
316
|
}
|
|
308
|
-
|
|
317
|
+
Ee("move", e), We(), O.length > 0 && e.preventDefault();
|
|
309
318
|
}
|
|
310
|
-
function
|
|
319
|
+
function ke(e) {
|
|
311
320
|
const {
|
|
312
321
|
target: n
|
|
313
322
|
} = e, {
|
|
314
323
|
x: t,
|
|
315
|
-
y:
|
|
316
|
-
} =
|
|
317
|
-
Le.clear(),
|
|
324
|
+
y: r
|
|
325
|
+
} = Re(e);
|
|
326
|
+
Le.clear(), ce = !1, O.length > 0 && (e.preventDefault(), fn(n) || e.stopImmediatePropagation()), Ee("up", e), Fe({
|
|
318
327
|
target: n,
|
|
319
328
|
x: t,
|
|
320
|
-
y:
|
|
321
|
-
}),
|
|
329
|
+
y: r
|
|
330
|
+
}), We(), Ie();
|
|
331
|
+
}
|
|
332
|
+
function fn(e) {
|
|
333
|
+
let n = e;
|
|
334
|
+
for (; n; ) {
|
|
335
|
+
if (n.hasAttribute(A.resizeHandle))
|
|
336
|
+
return !0;
|
|
337
|
+
n = n.parentElement;
|
|
338
|
+
}
|
|
339
|
+
return !1;
|
|
322
340
|
}
|
|
323
|
-
function
|
|
341
|
+
function Fe({
|
|
324
342
|
target: e,
|
|
325
343
|
x: n,
|
|
326
344
|
y: t
|
|
327
345
|
}) {
|
|
328
346
|
O.splice(0);
|
|
329
|
-
let
|
|
330
|
-
(e instanceof HTMLElement || e instanceof SVGElement) && (
|
|
347
|
+
let r = null;
|
|
348
|
+
(e instanceof HTMLElement || e instanceof SVGElement) && (r = e), ve.forEach((i) => {
|
|
331
349
|
const {
|
|
332
|
-
element:
|
|
350
|
+
element: o,
|
|
333
351
|
hitAreaMargins: l
|
|
334
|
-
} = i, s =
|
|
352
|
+
} = i, s = o.getBoundingClientRect(), {
|
|
335
353
|
bottom: a,
|
|
336
|
-
left:
|
|
337
|
-
right:
|
|
354
|
+
left: m,
|
|
355
|
+
right: P,
|
|
338
356
|
top: f
|
|
339
|
-
} = s,
|
|
340
|
-
if (n >=
|
|
341
|
-
if (
|
|
357
|
+
} = s, u = Gn ? l.coarse : l.fine;
|
|
358
|
+
if (n >= m - u && n <= P + u && t >= f - u && t <= a + u) {
|
|
359
|
+
if (r !== null && document.contains(r) && o !== r && !o.contains(r) && !r.contains(o) && // Calculating stacking order has a cost, so we should avoid it if possible
|
|
342
360
|
// That is why we only check potentially intersecting handles,
|
|
343
361
|
// and why we skip if the event target is within the handle's DOM
|
|
344
|
-
|
|
345
|
-
let
|
|
346
|
-
for (;
|
|
347
|
-
if (
|
|
348
|
-
|
|
362
|
+
Hn(r, o) > 0) {
|
|
363
|
+
let h = r, I = !1;
|
|
364
|
+
for (; h && !h.contains(o); ) {
|
|
365
|
+
if ($n(h.getBoundingClientRect(), s)) {
|
|
366
|
+
I = !0;
|
|
349
367
|
break;
|
|
350
368
|
}
|
|
351
|
-
|
|
369
|
+
h = h.parentElement;
|
|
352
370
|
}
|
|
353
|
-
if (
|
|
371
|
+
if (I)
|
|
354
372
|
return;
|
|
355
373
|
}
|
|
356
374
|
O.push(i);
|
|
@@ -360,349 +378,347 @@ function He({
|
|
|
360
378
|
function Ne(e, n) {
|
|
361
379
|
Le.set(e, n);
|
|
362
380
|
}
|
|
363
|
-
function
|
|
381
|
+
function We() {
|
|
364
382
|
let e = !1, n = !1;
|
|
365
|
-
O.forEach((
|
|
383
|
+
O.forEach((r) => {
|
|
366
384
|
const {
|
|
367
385
|
direction: i
|
|
368
|
-
} =
|
|
386
|
+
} = r;
|
|
369
387
|
i === "horizontal" ? e = !0 : n = !0;
|
|
370
388
|
});
|
|
371
389
|
let t = 0;
|
|
372
|
-
Le.forEach((
|
|
373
|
-
t |=
|
|
374
|
-
}), e && n ?
|
|
375
|
-
}
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
}
|
|
390
|
+
Le.forEach((r) => {
|
|
391
|
+
t |= r;
|
|
392
|
+
}), e && n ? $e("intersection", t) : e ? $e("horizontal", t) : n ? $e("vertical", t) : Dn();
|
|
393
|
+
}
|
|
394
|
+
let _e = new AbortController();
|
|
395
|
+
function Ie() {
|
|
396
|
+
_e.abort(), _e = new AbortController();
|
|
397
|
+
const e = {
|
|
398
|
+
capture: !0,
|
|
399
|
+
signal: _e.signal
|
|
400
|
+
};
|
|
401
|
+
ve.size && (ce ? (O.length > 0 && ne.forEach((n, t) => {
|
|
383
402
|
const {
|
|
384
|
-
body:
|
|
385
|
-
} =
|
|
386
|
-
|
|
387
|
-
}), window.addEventListener("pointerup",
|
|
403
|
+
body: r
|
|
404
|
+
} = t;
|
|
405
|
+
n > 0 && (r.addEventListener("contextmenu", ke, e), r.addEventListener("pointerleave", He, e), r.addEventListener("pointermove", He, e));
|
|
406
|
+
}), window.addEventListener("pointerup", ke, e), window.addEventListener("pointercancel", ke, e)) : ne.forEach((n, t) => {
|
|
388
407
|
const {
|
|
389
|
-
body:
|
|
390
|
-
} =
|
|
391
|
-
|
|
392
|
-
capture: !0
|
|
393
|
-
}), t.addEventListener("pointermove", me));
|
|
408
|
+
body: r
|
|
409
|
+
} = t;
|
|
410
|
+
n > 0 && (r.addEventListener("pointerdown", Tn, e), r.addEventListener("pointermove", He, e));
|
|
394
411
|
}));
|
|
395
412
|
}
|
|
396
|
-
function
|
|
397
|
-
|
|
413
|
+
function Ee(e, n) {
|
|
414
|
+
ve.forEach((t) => {
|
|
398
415
|
const {
|
|
399
|
-
setResizeHandlerState:
|
|
416
|
+
setResizeHandlerState: r
|
|
400
417
|
} = t, i = O.includes(t);
|
|
401
|
-
|
|
418
|
+
r(e, i, n);
|
|
402
419
|
});
|
|
403
420
|
}
|
|
404
|
-
function
|
|
421
|
+
function Fn() {
|
|
405
422
|
const [e, n] = ue(0);
|
|
406
|
-
return
|
|
423
|
+
return T(() => n((t) => t + 1), []);
|
|
407
424
|
}
|
|
408
|
-
function
|
|
425
|
+
function y(e, n) {
|
|
409
426
|
if (!e)
|
|
410
427
|
throw console.error(n), Error(n);
|
|
411
428
|
}
|
|
412
|
-
|
|
413
|
-
function re(e, n, t = Be) {
|
|
429
|
+
function oe(e, n, t = Be) {
|
|
414
430
|
return e.toFixed(t) === n.toFixed(t) ? 0 : e > n ? 1 : -1;
|
|
415
431
|
}
|
|
416
|
-
function
|
|
417
|
-
return
|
|
432
|
+
function Y(e, n, t = Be) {
|
|
433
|
+
return oe(e, n, t) === 0;
|
|
418
434
|
}
|
|
419
|
-
function
|
|
420
|
-
return
|
|
435
|
+
function K(e, n, t) {
|
|
436
|
+
return oe(e, n, t) === 0;
|
|
421
437
|
}
|
|
422
|
-
function
|
|
438
|
+
function Wn(e, n, t) {
|
|
423
439
|
if (e.length !== n.length)
|
|
424
440
|
return !1;
|
|
425
|
-
for (let
|
|
426
|
-
const i = e[
|
|
427
|
-
if (!
|
|
441
|
+
for (let r = 0; r < e.length; r++) {
|
|
442
|
+
const i = e[r], o = n[r];
|
|
443
|
+
if (!K(i, o, t))
|
|
428
444
|
return !1;
|
|
429
445
|
}
|
|
430
446
|
return !0;
|
|
431
447
|
}
|
|
432
|
-
function
|
|
448
|
+
function ae({
|
|
433
449
|
panelConstraints: e,
|
|
434
450
|
panelIndex: n,
|
|
435
451
|
size: t
|
|
436
452
|
}) {
|
|
437
|
-
const
|
|
438
|
-
|
|
453
|
+
const r = e[n];
|
|
454
|
+
y(r != null, `Panel constraints not found for index ${n}`);
|
|
439
455
|
let {
|
|
440
456
|
collapsedSize: i = 0,
|
|
441
|
-
collapsible:
|
|
457
|
+
collapsible: o,
|
|
442
458
|
maxSize: l = 100,
|
|
443
459
|
minSize: s = 0
|
|
444
|
-
} =
|
|
445
|
-
if (
|
|
446
|
-
if (
|
|
460
|
+
} = r;
|
|
461
|
+
if (oe(t, s) < 0)
|
|
462
|
+
if (o) {
|
|
447
463
|
const a = (i + s) / 2;
|
|
448
|
-
|
|
464
|
+
oe(t, a) < 0 ? t = i : t = s;
|
|
449
465
|
} else
|
|
450
466
|
t = s;
|
|
451
467
|
return t = Math.min(l, t), t = parseFloat(t.toFixed(Be)), t;
|
|
452
468
|
}
|
|
453
|
-
function
|
|
469
|
+
function ye({
|
|
454
470
|
delta: e,
|
|
455
471
|
initialLayout: n,
|
|
456
472
|
panelConstraints: t,
|
|
457
|
-
pivotIndices:
|
|
473
|
+
pivotIndices: r,
|
|
458
474
|
prevLayout: i,
|
|
459
|
-
trigger:
|
|
475
|
+
trigger: o
|
|
460
476
|
}) {
|
|
461
|
-
if (
|
|
477
|
+
if (K(e, 0))
|
|
462
478
|
return n;
|
|
463
|
-
const l = [...n], [s, a] =
|
|
464
|
-
|
|
465
|
-
let
|
|
466
|
-
if (
|
|
479
|
+
const l = [...n], [s, a] = r;
|
|
480
|
+
y(s != null, "Invalid first pivot index"), y(a != null, "Invalid second pivot index");
|
|
481
|
+
let m = 0;
|
|
482
|
+
if (o === "keyboard") {
|
|
467
483
|
{
|
|
468
|
-
const f = e < 0 ? a : s,
|
|
469
|
-
|
|
484
|
+
const f = e < 0 ? a : s, u = t[f];
|
|
485
|
+
y(u, `Panel constraints not found for index ${f}`);
|
|
470
486
|
const {
|
|
471
|
-
collapsedSize:
|
|
472
|
-
collapsible:
|
|
473
|
-
minSize:
|
|
474
|
-
} =
|
|
475
|
-
if (
|
|
487
|
+
collapsedSize: x = 0,
|
|
488
|
+
collapsible: h,
|
|
489
|
+
minSize: I = 0
|
|
490
|
+
} = u;
|
|
491
|
+
if (h) {
|
|
476
492
|
const w = n[f];
|
|
477
|
-
if (
|
|
478
|
-
const
|
|
479
|
-
|
|
493
|
+
if (y(w != null, `Previous layout not found for panel index ${f}`), K(w, x)) {
|
|
494
|
+
const S = I - w;
|
|
495
|
+
oe(S, Math.abs(e)) > 0 && (e = e < 0 ? 0 - S : S);
|
|
480
496
|
}
|
|
481
497
|
}
|
|
482
498
|
}
|
|
483
499
|
{
|
|
484
|
-
const f = e < 0 ? s : a,
|
|
485
|
-
|
|
500
|
+
const f = e < 0 ? s : a, u = t[f];
|
|
501
|
+
y(u, `No panel constraints found for index ${f}`);
|
|
486
502
|
const {
|
|
487
|
-
collapsedSize:
|
|
488
|
-
collapsible:
|
|
489
|
-
minSize:
|
|
490
|
-
} =
|
|
491
|
-
if (
|
|
503
|
+
collapsedSize: x = 0,
|
|
504
|
+
collapsible: h,
|
|
505
|
+
minSize: I = 0
|
|
506
|
+
} = u;
|
|
507
|
+
if (h) {
|
|
492
508
|
const w = n[f];
|
|
493
|
-
if (
|
|
494
|
-
const
|
|
495
|
-
|
|
509
|
+
if (y(w != null, `Previous layout not found for panel index ${f}`), K(w, I)) {
|
|
510
|
+
const S = w - x;
|
|
511
|
+
oe(S, Math.abs(e)) > 0 && (e = e < 0 ? 0 - S : S);
|
|
496
512
|
}
|
|
497
513
|
}
|
|
498
514
|
}
|
|
499
515
|
}
|
|
500
516
|
{
|
|
501
517
|
const f = e < 0 ? 1 : -1;
|
|
502
|
-
let
|
|
518
|
+
let u = e < 0 ? a : s, x = 0;
|
|
503
519
|
for (; ; ) {
|
|
504
|
-
const
|
|
505
|
-
|
|
506
|
-
const
|
|
520
|
+
const I = n[u];
|
|
521
|
+
y(I != null, `Previous layout not found for panel index ${u}`);
|
|
522
|
+
const S = ae({
|
|
507
523
|
panelConstraints: t,
|
|
508
|
-
panelIndex:
|
|
524
|
+
panelIndex: u,
|
|
509
525
|
size: 100
|
|
510
|
-
}) -
|
|
511
|
-
if (
|
|
526
|
+
}) - I;
|
|
527
|
+
if (x += S, u += f, u < 0 || u >= t.length)
|
|
512
528
|
break;
|
|
513
529
|
}
|
|
514
|
-
const
|
|
515
|
-
e = e < 0 ? 0 -
|
|
530
|
+
const h = Math.min(Math.abs(e), Math.abs(x));
|
|
531
|
+
e = e < 0 ? 0 - h : h;
|
|
516
532
|
}
|
|
517
533
|
{
|
|
518
|
-
let
|
|
519
|
-
for (;
|
|
520
|
-
const
|
|
521
|
-
|
|
522
|
-
const
|
|
534
|
+
let u = e < 0 ? s : a;
|
|
535
|
+
for (; u >= 0 && u < t.length; ) {
|
|
536
|
+
const x = Math.abs(e) - Math.abs(m), h = n[u];
|
|
537
|
+
y(h != null, `Previous layout not found for panel index ${u}`);
|
|
538
|
+
const I = h - x, w = ae({
|
|
523
539
|
panelConstraints: t,
|
|
524
|
-
panelIndex:
|
|
525
|
-
size:
|
|
540
|
+
panelIndex: u,
|
|
541
|
+
size: I
|
|
526
542
|
});
|
|
527
|
-
if (!
|
|
543
|
+
if (!K(h, w) && (m += h - w, l[u] = w, m.toPrecision(3).localeCompare(Math.abs(e).toPrecision(3), void 0, {
|
|
528
544
|
numeric: !0
|
|
529
545
|
}) >= 0))
|
|
530
546
|
break;
|
|
531
|
-
e < 0 ?
|
|
547
|
+
e < 0 ? u-- : u++;
|
|
532
548
|
}
|
|
533
549
|
}
|
|
534
|
-
if (
|
|
550
|
+
if (Wn(i, l))
|
|
535
551
|
return i;
|
|
536
552
|
{
|
|
537
|
-
const f = e < 0 ? a : s,
|
|
538
|
-
|
|
539
|
-
const
|
|
553
|
+
const f = e < 0 ? a : s, u = n[f];
|
|
554
|
+
y(u != null, `Previous layout not found for panel index ${f}`);
|
|
555
|
+
const x = u + m, h = ae({
|
|
540
556
|
panelConstraints: t,
|
|
541
557
|
panelIndex: f,
|
|
542
|
-
size:
|
|
558
|
+
size: x
|
|
543
559
|
});
|
|
544
|
-
if (l[f] =
|
|
545
|
-
let
|
|
546
|
-
for (;
|
|
547
|
-
const
|
|
548
|
-
|
|
549
|
-
const
|
|
560
|
+
if (l[f] = h, !K(h, x)) {
|
|
561
|
+
let I = x - h, S = e < 0 ? a : s;
|
|
562
|
+
for (; S >= 0 && S < t.length; ) {
|
|
563
|
+
const R = l[S];
|
|
564
|
+
y(R != null, `Previous layout not found for panel index ${S}`);
|
|
565
|
+
const M = R + I, H = ae({
|
|
550
566
|
panelConstraints: t,
|
|
551
|
-
panelIndex:
|
|
552
|
-
size:
|
|
567
|
+
panelIndex: S,
|
|
568
|
+
size: M
|
|
553
569
|
});
|
|
554
|
-
if (
|
|
570
|
+
if (K(R, H) || (I -= H - R, l[S] = H), K(I, 0))
|
|
555
571
|
break;
|
|
556
|
-
e > 0 ?
|
|
572
|
+
e > 0 ? S-- : S++;
|
|
557
573
|
}
|
|
558
574
|
}
|
|
559
575
|
}
|
|
560
|
-
const
|
|
561
|
-
return
|
|
576
|
+
const P = l.reduce((f, u) => u + f, 0);
|
|
577
|
+
return K(P, 100) ? l : i;
|
|
562
578
|
}
|
|
563
|
-
function
|
|
579
|
+
function Kn({
|
|
564
580
|
layout: e,
|
|
565
581
|
panelsArray: n,
|
|
566
582
|
pivotIndices: t
|
|
567
583
|
}) {
|
|
568
|
-
let
|
|
584
|
+
let r = 0, i = 100, o = 0, l = 0;
|
|
569
585
|
const s = t[0];
|
|
570
|
-
|
|
586
|
+
y(s != null, "No pivot index found"), n.forEach((f, u) => {
|
|
571
587
|
const {
|
|
572
|
-
constraints:
|
|
588
|
+
constraints: x
|
|
573
589
|
} = f, {
|
|
574
|
-
maxSize:
|
|
575
|
-
minSize:
|
|
576
|
-
} =
|
|
577
|
-
|
|
590
|
+
maxSize: h = 100,
|
|
591
|
+
minSize: I = 0
|
|
592
|
+
} = x;
|
|
593
|
+
u === s ? (r = I, i = h) : (o += I, l += h);
|
|
578
594
|
});
|
|
579
|
-
const a = Math.min(i, 100 -
|
|
595
|
+
const a = Math.min(i, 100 - o), m = Math.max(r, 100 - l), P = e[s];
|
|
580
596
|
return {
|
|
581
597
|
valueMax: a,
|
|
582
|
-
valueMin:
|
|
583
|
-
valueNow:
|
|
598
|
+
valueMin: m,
|
|
599
|
+
valueNow: P
|
|
584
600
|
};
|
|
585
601
|
}
|
|
586
|
-
function
|
|
587
|
-
return Array.from(n.querySelectorAll(`[
|
|
602
|
+
function Se(e, n = document) {
|
|
603
|
+
return Array.from(n.querySelectorAll(`[${A.resizeHandleId}][data-panel-group-id="${e}"]`));
|
|
588
604
|
}
|
|
589
|
-
function
|
|
590
|
-
const i =
|
|
605
|
+
function pn(e, n, t = document) {
|
|
606
|
+
const i = Se(e, t).findIndex((o) => o.getAttribute(A.resizeHandleId) === n);
|
|
591
607
|
return i ?? null;
|
|
592
608
|
}
|
|
593
|
-
function
|
|
594
|
-
const
|
|
595
|
-
return
|
|
609
|
+
function gn(e, n, t) {
|
|
610
|
+
const r = pn(e, n, t);
|
|
611
|
+
return r != null ? [r, r + 1] : [-1, -1];
|
|
596
612
|
}
|
|
597
|
-
function
|
|
613
|
+
function mn(e, n = document) {
|
|
598
614
|
var t;
|
|
599
615
|
if (n instanceof HTMLElement && (n == null || (t = n.dataset) === null || t === void 0 ? void 0 : t.panelGroupId) == e)
|
|
600
616
|
return n;
|
|
601
|
-
const
|
|
602
|
-
return
|
|
617
|
+
const r = n.querySelector(`[data-panel-group][data-panel-group-id="${e}"]`);
|
|
618
|
+
return r || null;
|
|
603
619
|
}
|
|
604
|
-
function
|
|
605
|
-
const t = n.querySelector(`[
|
|
620
|
+
function Ae(e, n = document) {
|
|
621
|
+
const t = n.querySelector(`[${A.resizeHandleId}="${e}"]`);
|
|
606
622
|
return t || null;
|
|
607
623
|
}
|
|
608
|
-
function
|
|
609
|
-
var i,
|
|
610
|
-
const a =
|
|
611
|
-
return [f,
|
|
624
|
+
function Un(e, n, t, r = document) {
|
|
625
|
+
var i, o, l, s;
|
|
626
|
+
const a = Ae(n, r), m = Se(e, r), P = a ? m.indexOf(a) : -1, f = (i = (o = t[P]) === null || o === void 0 ? void 0 : o.id) !== null && i !== void 0 ? i : null, u = (l = (s = t[P + 1]) === null || s === void 0 ? void 0 : s.id) !== null && l !== void 0 ? l : null;
|
|
627
|
+
return [f, u];
|
|
612
628
|
}
|
|
613
|
-
function
|
|
629
|
+
function Vn({
|
|
614
630
|
committedValuesRef: e,
|
|
615
631
|
eagerValuesRef: n,
|
|
616
632
|
groupId: t,
|
|
617
|
-
layout:
|
|
633
|
+
layout: r,
|
|
618
634
|
panelDataArray: i,
|
|
619
|
-
panelGroupElement:
|
|
635
|
+
panelGroupElement: o,
|
|
620
636
|
setLayout: l
|
|
621
637
|
}) {
|
|
622
|
-
|
|
638
|
+
F({
|
|
623
639
|
didWarnAboutMissingResizeHandle: !1
|
|
624
|
-
}),
|
|
625
|
-
if (!
|
|
640
|
+
}), re(() => {
|
|
641
|
+
if (!o)
|
|
626
642
|
return;
|
|
627
|
-
const s =
|
|
643
|
+
const s = Se(t, o);
|
|
628
644
|
for (let a = 0; a < i.length - 1; a++) {
|
|
629
645
|
const {
|
|
630
|
-
valueMax:
|
|
631
|
-
valueMin:
|
|
646
|
+
valueMax: m,
|
|
647
|
+
valueMin: P,
|
|
632
648
|
valueNow: f
|
|
633
|
-
} =
|
|
634
|
-
layout:
|
|
649
|
+
} = Kn({
|
|
650
|
+
layout: r,
|
|
635
651
|
panelsArray: i,
|
|
636
652
|
pivotIndices: [a, a + 1]
|
|
637
|
-
}),
|
|
638
|
-
if (
|
|
639
|
-
const
|
|
640
|
-
|
|
653
|
+
}), u = s[a];
|
|
654
|
+
if (u != null) {
|
|
655
|
+
const x = i[a];
|
|
656
|
+
y(x, `No panel data found for index "${a}"`), u.setAttribute("aria-controls", x.id), u.setAttribute("aria-valuemax", "" + Math.round(m)), u.setAttribute("aria-valuemin", "" + Math.round(P)), u.setAttribute("aria-valuenow", f != null ? "" + Math.round(f) : "");
|
|
641
657
|
}
|
|
642
658
|
}
|
|
643
659
|
return () => {
|
|
644
|
-
s.forEach((a,
|
|
660
|
+
s.forEach((a, m) => {
|
|
645
661
|
a.removeAttribute("aria-controls"), a.removeAttribute("aria-valuemax"), a.removeAttribute("aria-valuemin"), a.removeAttribute("aria-valuenow");
|
|
646
662
|
});
|
|
647
663
|
};
|
|
648
|
-
}, [t,
|
|
649
|
-
if (!
|
|
664
|
+
}, [t, r, i, o]), te(() => {
|
|
665
|
+
if (!o)
|
|
650
666
|
return;
|
|
651
667
|
const s = n.current;
|
|
652
|
-
|
|
668
|
+
y(s, "Eager values not found");
|
|
653
669
|
const {
|
|
654
670
|
panelDataArray: a
|
|
655
|
-
} = s,
|
|
656
|
-
|
|
657
|
-
const
|
|
658
|
-
|
|
659
|
-
const f =
|
|
660
|
-
const
|
|
661
|
-
|
|
662
|
-
const [
|
|
663
|
-
if (
|
|
671
|
+
} = s, m = mn(t, o);
|
|
672
|
+
y(m != null, `No group found for id "${t}"`);
|
|
673
|
+
const P = Se(t, o);
|
|
674
|
+
y(P, `No resize handles found for group id "${t}"`);
|
|
675
|
+
const f = P.map((u) => {
|
|
676
|
+
const x = u.getAttribute(A.resizeHandleId);
|
|
677
|
+
y(x, "Resize handle element has no handle id attribute");
|
|
678
|
+
const [h, I] = Un(t, x, a, o);
|
|
679
|
+
if (h == null || I == null)
|
|
664
680
|
return () => {
|
|
665
681
|
};
|
|
666
|
-
const w = (
|
|
667
|
-
if (!
|
|
668
|
-
switch (
|
|
682
|
+
const w = (S) => {
|
|
683
|
+
if (!S.defaultPrevented)
|
|
684
|
+
switch (S.key) {
|
|
669
685
|
case "Enter": {
|
|
670
|
-
|
|
671
|
-
const
|
|
672
|
-
if (
|
|
673
|
-
const
|
|
674
|
-
|
|
675
|
-
const
|
|
676
|
-
collapsedSize:
|
|
686
|
+
S.preventDefault();
|
|
687
|
+
const R = a.findIndex((M) => M.id === h);
|
|
688
|
+
if (R >= 0) {
|
|
689
|
+
const M = a[R];
|
|
690
|
+
y(M, `No panel data found for index ${R}`);
|
|
691
|
+
const H = r[R], {
|
|
692
|
+
collapsedSize: q = 0,
|
|
677
693
|
collapsible: C,
|
|
678
|
-
minSize:
|
|
679
|
-
} =
|
|
680
|
-
if (
|
|
681
|
-
const
|
|
682
|
-
delta:
|
|
683
|
-
initialLayout:
|
|
684
|
-
panelConstraints: a.map((
|
|
685
|
-
pivotIndices:
|
|
686
|
-
prevLayout:
|
|
694
|
+
minSize: b = 0
|
|
695
|
+
} = M.constraints;
|
|
696
|
+
if (H != null && C) {
|
|
697
|
+
const U = ye({
|
|
698
|
+
delta: K(H, q) ? b - q : q - H,
|
|
699
|
+
initialLayout: r,
|
|
700
|
+
panelConstraints: a.map((j) => j.constraints),
|
|
701
|
+
pivotIndices: gn(t, x, o),
|
|
702
|
+
prevLayout: r,
|
|
687
703
|
trigger: "keyboard"
|
|
688
704
|
});
|
|
689
|
-
|
|
705
|
+
r !== U && l(U);
|
|
690
706
|
}
|
|
691
707
|
}
|
|
692
708
|
break;
|
|
693
709
|
}
|
|
694
710
|
}
|
|
695
711
|
};
|
|
696
|
-
return
|
|
697
|
-
|
|
712
|
+
return u.addEventListener("keydown", w), () => {
|
|
713
|
+
u.removeEventListener("keydown", w);
|
|
698
714
|
};
|
|
699
715
|
});
|
|
700
716
|
return () => {
|
|
701
|
-
f.forEach((
|
|
717
|
+
f.forEach((u) => u());
|
|
702
718
|
};
|
|
703
|
-
}, [
|
|
719
|
+
}, [o, e, n, t, r, i, l]);
|
|
704
720
|
}
|
|
705
|
-
function
|
|
721
|
+
function Je(e, n) {
|
|
706
722
|
if (e.length !== n.length)
|
|
707
723
|
return !1;
|
|
708
724
|
for (let t = 0; t < e.length; t++)
|
|
@@ -710,28 +726,28 @@ function qe(e, n) {
|
|
|
710
726
|
return !1;
|
|
711
727
|
return !0;
|
|
712
728
|
}
|
|
713
|
-
function
|
|
729
|
+
function hn(e, n) {
|
|
714
730
|
const t = e === "horizontal", {
|
|
715
|
-
x:
|
|
731
|
+
x: r,
|
|
716
732
|
y: i
|
|
717
|
-
} =
|
|
718
|
-
return t ?
|
|
719
|
-
}
|
|
720
|
-
function
|
|
721
|
-
const
|
|
722
|
-
|
|
723
|
-
const s = l.getAttribute(
|
|
724
|
-
|
|
733
|
+
} = Re(n);
|
|
734
|
+
return t ? r : i;
|
|
735
|
+
}
|
|
736
|
+
function On(e, n, t, r, i) {
|
|
737
|
+
const o = t === "horizontal", l = Ae(n, i);
|
|
738
|
+
y(l, `No resize handle element found for id "${n}"`);
|
|
739
|
+
const s = l.getAttribute(A.groupId);
|
|
740
|
+
y(s, "Resize handle element has no group id attribute");
|
|
725
741
|
let {
|
|
726
742
|
initialCursorPosition: a
|
|
727
|
-
} =
|
|
728
|
-
const
|
|
729
|
-
|
|
730
|
-
const f =
|
|
731
|
-
return (
|
|
732
|
-
}
|
|
733
|
-
function
|
|
734
|
-
if (
|
|
743
|
+
} = r;
|
|
744
|
+
const m = hn(t, e), P = mn(s, i);
|
|
745
|
+
y(P, `No group element found for id "${s}"`);
|
|
746
|
+
const f = P.getBoundingClientRect(), u = o ? f.width : f.height;
|
|
747
|
+
return (m - a) / u * 100;
|
|
748
|
+
}
|
|
749
|
+
function qn(e, n, t, r, i, o) {
|
|
750
|
+
if (rn(e)) {
|
|
735
751
|
const l = t === "horizontal";
|
|
736
752
|
let s = 0;
|
|
737
753
|
e.shiftKey ? s = 100 : i != null ? s = i : s = 10;
|
|
@@ -758,54 +774,54 @@ function Wn(e, n, t, o, i, r) {
|
|
|
758
774
|
}
|
|
759
775
|
return a;
|
|
760
776
|
} else
|
|
761
|
-
return
|
|
777
|
+
return r == null ? 0 : On(e, n, t, r, o);
|
|
762
778
|
}
|
|
763
|
-
function
|
|
779
|
+
function Xn({
|
|
764
780
|
panelDataArray: e
|
|
765
781
|
}) {
|
|
766
|
-
const n = Array(e.length), t = e.map((
|
|
767
|
-
let
|
|
768
|
-
for (let
|
|
769
|
-
const l = t[
|
|
770
|
-
|
|
782
|
+
const n = Array(e.length), t = e.map((o) => o.constraints);
|
|
783
|
+
let r = 0, i = 100;
|
|
784
|
+
for (let o = 0; o < e.length; o++) {
|
|
785
|
+
const l = t[o];
|
|
786
|
+
y(l, `Panel constraints not found for index ${o}`);
|
|
771
787
|
const {
|
|
772
788
|
defaultSize: s
|
|
773
789
|
} = l;
|
|
774
|
-
s != null && (
|
|
790
|
+
s != null && (r++, n[o] = s, i -= s);
|
|
775
791
|
}
|
|
776
|
-
for (let
|
|
777
|
-
const l = t[
|
|
778
|
-
|
|
792
|
+
for (let o = 0; o < e.length; o++) {
|
|
793
|
+
const l = t[o];
|
|
794
|
+
y(l, `Panel constraints not found for index ${o}`);
|
|
779
795
|
const {
|
|
780
796
|
defaultSize: s
|
|
781
797
|
} = l;
|
|
782
798
|
if (s != null)
|
|
783
799
|
continue;
|
|
784
|
-
const a = e.length -
|
|
785
|
-
|
|
800
|
+
const a = e.length - r, m = i / a;
|
|
801
|
+
r++, n[o] = m, i -= m;
|
|
786
802
|
}
|
|
787
803
|
return n;
|
|
788
804
|
}
|
|
789
|
-
function
|
|
790
|
-
n.forEach((
|
|
791
|
-
const
|
|
792
|
-
|
|
805
|
+
function le(e, n, t) {
|
|
806
|
+
n.forEach((r, i) => {
|
|
807
|
+
const o = e[i];
|
|
808
|
+
y(o, `Panel data not found for index ${i}`);
|
|
793
809
|
const {
|
|
794
810
|
callbacks: l,
|
|
795
811
|
constraints: s,
|
|
796
812
|
id: a
|
|
797
|
-
} =
|
|
798
|
-
collapsedSize:
|
|
799
|
-
collapsible:
|
|
813
|
+
} = o, {
|
|
814
|
+
collapsedSize: m = 0,
|
|
815
|
+
collapsible: P
|
|
800
816
|
} = s, f = t[a];
|
|
801
|
-
if (f == null ||
|
|
802
|
-
t[a] =
|
|
817
|
+
if (f == null || r !== f) {
|
|
818
|
+
t[a] = r;
|
|
803
819
|
const {
|
|
804
|
-
onCollapse:
|
|
805
|
-
onExpand:
|
|
806
|
-
onResize:
|
|
820
|
+
onCollapse: u,
|
|
821
|
+
onExpand: x,
|
|
822
|
+
onResize: h
|
|
807
823
|
} = l;
|
|
808
|
-
|
|
824
|
+
h && h(r, f), P && (u || x) && (x && (f == null || Y(f, m)) && !Y(r, m) && x(), u && (f == null || !Y(f, m)) && Y(r, m) && u());
|
|
809
825
|
}
|
|
810
826
|
});
|
|
811
827
|
}
|
|
@@ -817,17 +833,17 @@ function Pe(e, n) {
|
|
|
817
833
|
return !1;
|
|
818
834
|
return !0;
|
|
819
835
|
}
|
|
820
|
-
function
|
|
836
|
+
function Jn({
|
|
821
837
|
defaultSize: e,
|
|
822
838
|
dragState: n,
|
|
823
839
|
layout: t,
|
|
824
|
-
panelData:
|
|
840
|
+
panelData: r,
|
|
825
841
|
panelIndex: i,
|
|
826
|
-
precision:
|
|
842
|
+
precision: o = 3
|
|
827
843
|
}) {
|
|
828
844
|
const l = t[i];
|
|
829
845
|
let s;
|
|
830
|
-
return l == null ? s = e != null ? e.toPrecision(
|
|
846
|
+
return l == null ? s = e != null ? e.toPrecision(o) : "1" : r.length === 1 ? s = "1" : s = l.toPrecision(o), {
|
|
831
847
|
flexBasis: 0,
|
|
832
848
|
flexGrow: s,
|
|
833
849
|
flexShrink: 1,
|
|
@@ -838,7 +854,7 @@ function On({
|
|
|
838
854
|
pointerEvents: n !== null ? "none" : void 0
|
|
839
855
|
};
|
|
840
856
|
}
|
|
841
|
-
function
|
|
857
|
+
function jn(e, n = 10) {
|
|
842
858
|
let t = null;
|
|
843
859
|
return (...i) => {
|
|
844
860
|
t !== null && clearTimeout(t), t = setTimeout(() => {
|
|
@@ -846,7 +862,7 @@ function qn(e, n = 10) {
|
|
|
846
862
|
}, n);
|
|
847
863
|
};
|
|
848
864
|
}
|
|
849
|
-
function
|
|
865
|
+
function je(e) {
|
|
850
866
|
try {
|
|
851
867
|
if (typeof localStorage < "u")
|
|
852
868
|
e.getItem = (n) => localStorage.getItem(n), e.setItem = (n, t) => {
|
|
@@ -859,25 +875,25 @@ function Xe(e) {
|
|
|
859
875
|
};
|
|
860
876
|
}
|
|
861
877
|
}
|
|
862
|
-
function
|
|
878
|
+
function zn(e) {
|
|
863
879
|
return `react-resizable-panels:${e}`;
|
|
864
880
|
}
|
|
865
|
-
function
|
|
881
|
+
function yn(e) {
|
|
866
882
|
return e.map((n) => {
|
|
867
883
|
const {
|
|
868
884
|
constraints: t,
|
|
869
|
-
id:
|
|
885
|
+
id: r,
|
|
870
886
|
idIsFromProps: i,
|
|
871
|
-
order:
|
|
887
|
+
order: o
|
|
872
888
|
} = n;
|
|
873
|
-
return i ?
|
|
889
|
+
return i ? r : o ? `${o}:${JSON.stringify(t)}` : JSON.stringify(t);
|
|
874
890
|
}).sort((n, t) => n.localeCompare(t)).join(",");
|
|
875
891
|
}
|
|
876
|
-
function
|
|
892
|
+
function xn(e, n) {
|
|
877
893
|
try {
|
|
878
|
-
const t =
|
|
879
|
-
if (
|
|
880
|
-
const i = JSON.parse(
|
|
894
|
+
const t = zn(e), r = n.getItem(t);
|
|
895
|
+
if (r) {
|
|
896
|
+
const i = JSON.parse(r);
|
|
881
897
|
if (typeof i == "object" && i != null)
|
|
882
898
|
return i;
|
|
883
899
|
}
|
|
@@ -885,441 +901,441 @@ function yn(e, n) {
|
|
|
885
901
|
}
|
|
886
902
|
return null;
|
|
887
903
|
}
|
|
888
|
-
function
|
|
889
|
-
var
|
|
890
|
-
const
|
|
891
|
-
return (i =
|
|
904
|
+
function Yn(e, n, t) {
|
|
905
|
+
var r, i;
|
|
906
|
+
const o = (r = xn(e, t)) !== null && r !== void 0 ? r : {}, l = yn(n);
|
|
907
|
+
return (i = o[l]) !== null && i !== void 0 ? i : null;
|
|
892
908
|
}
|
|
893
|
-
function
|
|
894
|
-
var
|
|
895
|
-
const l =
|
|
909
|
+
function Zn(e, n, t, r, i) {
|
|
910
|
+
var o;
|
|
911
|
+
const l = zn(e), s = yn(n), a = (o = xn(e, i)) !== null && o !== void 0 ? o : {};
|
|
896
912
|
a[s] = {
|
|
897
913
|
expandToSizes: Object.fromEntries(t.entries()),
|
|
898
|
-
layout:
|
|
914
|
+
layout: r
|
|
899
915
|
};
|
|
900
916
|
try {
|
|
901
917
|
i.setItem(l, JSON.stringify(a));
|
|
902
|
-
} catch (
|
|
903
|
-
console.error(
|
|
918
|
+
} catch (m) {
|
|
919
|
+
console.error(m);
|
|
904
920
|
}
|
|
905
921
|
}
|
|
906
|
-
function
|
|
922
|
+
function Ye({
|
|
907
923
|
layout: e,
|
|
908
924
|
panelConstraints: n
|
|
909
925
|
}) {
|
|
910
|
-
const t = [...e],
|
|
926
|
+
const t = [...e], r = t.reduce((o, l) => o + l, 0);
|
|
911
927
|
if (t.length !== n.length)
|
|
912
|
-
throw Error(`Invalid ${n.length} panel layout: ${t.map((
|
|
913
|
-
if (!
|
|
914
|
-
for (let
|
|
915
|
-
const l = t[
|
|
916
|
-
|
|
917
|
-
const s = 100 /
|
|
918
|
-
t[
|
|
928
|
+
throw Error(`Invalid ${n.length} panel layout: ${t.map((o) => `${o}%`).join(", ")}`);
|
|
929
|
+
if (!K(r, 100) && t.length > 0)
|
|
930
|
+
for (let o = 0; o < n.length; o++) {
|
|
931
|
+
const l = t[o];
|
|
932
|
+
y(l != null, `No layout data found for index ${o}`);
|
|
933
|
+
const s = 100 / r * l;
|
|
934
|
+
t[o] = s;
|
|
919
935
|
}
|
|
920
936
|
let i = 0;
|
|
921
|
-
for (let
|
|
922
|
-
const l = t[
|
|
923
|
-
|
|
924
|
-
const s =
|
|
937
|
+
for (let o = 0; o < n.length; o++) {
|
|
938
|
+
const l = t[o];
|
|
939
|
+
y(l != null, `No layout data found for index ${o}`);
|
|
940
|
+
const s = ae({
|
|
925
941
|
panelConstraints: n,
|
|
926
|
-
panelIndex:
|
|
942
|
+
panelIndex: o,
|
|
927
943
|
size: l
|
|
928
944
|
});
|
|
929
|
-
l != s && (i += l - s, t[
|
|
945
|
+
l != s && (i += l - s, t[o] = s);
|
|
930
946
|
}
|
|
931
|
-
if (!
|
|
932
|
-
for (let
|
|
933
|
-
const l = t[
|
|
934
|
-
|
|
935
|
-
const s = l + i, a =
|
|
947
|
+
if (!K(i, 0))
|
|
948
|
+
for (let o = 0; o < n.length; o++) {
|
|
949
|
+
const l = t[o];
|
|
950
|
+
y(l != null, `No layout data found for index ${o}`);
|
|
951
|
+
const s = l + i, a = ae({
|
|
936
952
|
panelConstraints: n,
|
|
937
|
-
panelIndex:
|
|
953
|
+
panelIndex: o,
|
|
938
954
|
size: s
|
|
939
955
|
});
|
|
940
|
-
if (l !== a && (i -= a - l, t[
|
|
956
|
+
if (l !== a && (i -= a - l, t[o] = a, K(i, 0)))
|
|
941
957
|
break;
|
|
942
958
|
}
|
|
943
959
|
return t;
|
|
944
960
|
}
|
|
945
|
-
const
|
|
946
|
-
getItem: (e) => (
|
|
961
|
+
const Qn = 100, xe = {
|
|
962
|
+
getItem: (e) => (je(xe), xe.getItem(e)),
|
|
947
963
|
setItem: (e, n) => {
|
|
948
|
-
|
|
964
|
+
je(xe), xe.setItem(e, n);
|
|
949
965
|
}
|
|
950
|
-
},
|
|
951
|
-
function
|
|
966
|
+
}, Ze = {};
|
|
967
|
+
function vn({
|
|
952
968
|
autoSaveId: e = null,
|
|
953
969
|
children: n,
|
|
954
970
|
className: t = "",
|
|
955
|
-
direction:
|
|
971
|
+
direction: r,
|
|
956
972
|
forwardedRef: i,
|
|
957
|
-
id:
|
|
973
|
+
id: o = null,
|
|
958
974
|
onLayout: l = null,
|
|
959
975
|
keyboardResizeBy: s = null,
|
|
960
|
-
storage: a =
|
|
961
|
-
style:
|
|
962
|
-
tagName:
|
|
976
|
+
storage: a = xe,
|
|
977
|
+
style: m,
|
|
978
|
+
tagName: P = "div",
|
|
963
979
|
...f
|
|
964
980
|
}) {
|
|
965
|
-
const
|
|
981
|
+
const u = Te(o), x = F(null), [h, I] = ue(null), [w, S] = ue([]), R = Fn(), M = F({}), H = F(/* @__PURE__ */ new Map()), q = F(0), C = F({
|
|
966
982
|
autoSaveId: e,
|
|
967
|
-
direction:
|
|
968
|
-
dragState:
|
|
969
|
-
id:
|
|
983
|
+
direction: r,
|
|
984
|
+
dragState: h,
|
|
985
|
+
id: u,
|
|
970
986
|
keyboardResizeBy: s,
|
|
971
987
|
onLayout: l,
|
|
972
988
|
storage: a
|
|
973
|
-
}),
|
|
989
|
+
}), b = F({
|
|
974
990
|
layout: w,
|
|
975
991
|
panelDataArray: [],
|
|
976
992
|
panelDataArrayChanged: !1
|
|
977
993
|
});
|
|
978
|
-
|
|
994
|
+
F({
|
|
979
995
|
didLogIdAndOrderWarning: !1,
|
|
980
996
|
didLogPanelConstraintsWarning: !1,
|
|
981
997
|
prevPanelIds: []
|
|
982
|
-
}),
|
|
998
|
+
}), nn(i, () => ({
|
|
983
999
|
getId: () => C.current.id,
|
|
984
1000
|
getLayout: () => {
|
|
985
1001
|
const {
|
|
986
|
-
layout:
|
|
987
|
-
} =
|
|
988
|
-
return
|
|
1002
|
+
layout: c
|
|
1003
|
+
} = b.current;
|
|
1004
|
+
return c;
|
|
989
1005
|
},
|
|
990
|
-
setLayout: (
|
|
1006
|
+
setLayout: (c) => {
|
|
991
1007
|
const {
|
|
992
|
-
onLayout:
|
|
1008
|
+
onLayout: g
|
|
993
1009
|
} = C.current, {
|
|
994
|
-
layout:
|
|
995
|
-
panelDataArray:
|
|
996
|
-
} =
|
|
997
|
-
layout:
|
|
998
|
-
panelConstraints:
|
|
1010
|
+
layout: v,
|
|
1011
|
+
panelDataArray: p
|
|
1012
|
+
} = b.current, d = Ye({
|
|
1013
|
+
layout: c,
|
|
1014
|
+
panelConstraints: p.map((z) => z.constraints)
|
|
999
1015
|
});
|
|
1000
|
-
|
|
1016
|
+
Je(v, d) || (S(d), b.current.layout = d, g && g(d), le(p, d, M.current));
|
|
1001
1017
|
}
|
|
1002
|
-
}), []),
|
|
1003
|
-
C.current.autoSaveId = e, C.current.direction =
|
|
1004
|
-
}),
|
|
1018
|
+
}), []), re(() => {
|
|
1019
|
+
C.current.autoSaveId = e, C.current.direction = r, C.current.dragState = h, C.current.id = u, C.current.onLayout = l, C.current.storage = a;
|
|
1020
|
+
}), Vn({
|
|
1005
1021
|
committedValuesRef: C,
|
|
1006
|
-
eagerValuesRef:
|
|
1007
|
-
groupId:
|
|
1022
|
+
eagerValuesRef: b,
|
|
1023
|
+
groupId: u,
|
|
1008
1024
|
layout: w,
|
|
1009
|
-
panelDataArray:
|
|
1010
|
-
setLayout:
|
|
1011
|
-
panelGroupElement:
|
|
1025
|
+
panelDataArray: b.current.panelDataArray,
|
|
1026
|
+
setLayout: S,
|
|
1027
|
+
panelGroupElement: x.current
|
|
1012
1028
|
}), te(() => {
|
|
1013
1029
|
const {
|
|
1014
|
-
panelDataArray:
|
|
1015
|
-
} =
|
|
1030
|
+
panelDataArray: c
|
|
1031
|
+
} = b.current;
|
|
1016
1032
|
if (e) {
|
|
1017
|
-
if (w.length === 0 || w.length !==
|
|
1033
|
+
if (w.length === 0 || w.length !== c.length)
|
|
1018
1034
|
return;
|
|
1019
|
-
let
|
|
1020
|
-
|
|
1021
|
-
const
|
|
1022
|
-
|
|
1035
|
+
let g = Ze[e];
|
|
1036
|
+
g == null && (g = jn(Zn, Qn), Ze[e] = g);
|
|
1037
|
+
const v = [...c], p = new Map(H.current);
|
|
1038
|
+
g(e, v, p, w, a);
|
|
1023
1039
|
}
|
|
1024
1040
|
}, [e, w, a]), te(() => {
|
|
1025
1041
|
});
|
|
1026
|
-
const
|
|
1042
|
+
const U = T((c) => {
|
|
1027
1043
|
const {
|
|
1028
|
-
onLayout:
|
|
1044
|
+
onLayout: g
|
|
1029
1045
|
} = C.current, {
|
|
1030
|
-
layout:
|
|
1031
|
-
panelDataArray:
|
|
1032
|
-
} =
|
|
1033
|
-
if (
|
|
1034
|
-
const d =
|
|
1035
|
-
collapsedSize:
|
|
1036
|
-
panelSize:
|
|
1037
|
-
pivotIndices:
|
|
1038
|
-
} = ee(
|
|
1039
|
-
if (
|
|
1040
|
-
|
|
1041
|
-
const
|
|
1042
|
-
delta:
|
|
1043
|
-
initialLayout:
|
|
1046
|
+
layout: v,
|
|
1047
|
+
panelDataArray: p
|
|
1048
|
+
} = b.current;
|
|
1049
|
+
if (c.constraints.collapsible) {
|
|
1050
|
+
const d = p.map((X) => X.constraints), {
|
|
1051
|
+
collapsedSize: z = 0,
|
|
1052
|
+
panelSize: E,
|
|
1053
|
+
pivotIndices: $
|
|
1054
|
+
} = ee(p, c, v);
|
|
1055
|
+
if (y(E != null, `Panel size not found for panel "${c.id}"`), !Y(E, z)) {
|
|
1056
|
+
H.current.set(c.id, E);
|
|
1057
|
+
const J = se(p, c) === p.length - 1 ? E - z : z - E, L = ye({
|
|
1058
|
+
delta: J,
|
|
1059
|
+
initialLayout: v,
|
|
1044
1060
|
panelConstraints: d,
|
|
1045
|
-
pivotIndices:
|
|
1046
|
-
prevLayout:
|
|
1061
|
+
pivotIndices: $,
|
|
1062
|
+
prevLayout: v,
|
|
1047
1063
|
trigger: "imperative-api"
|
|
1048
1064
|
});
|
|
1049
|
-
Pe(
|
|
1065
|
+
Pe(v, L) || (S(L), b.current.layout = L, g && g(L), le(p, L, M.current));
|
|
1050
1066
|
}
|
|
1051
1067
|
}
|
|
1052
|
-
}, []),
|
|
1068
|
+
}, []), j = T((c, g) => {
|
|
1053
1069
|
const {
|
|
1054
|
-
onLayout:
|
|
1070
|
+
onLayout: v
|
|
1055
1071
|
} = C.current, {
|
|
1056
|
-
layout:
|
|
1072
|
+
layout: p,
|
|
1057
1073
|
panelDataArray: d
|
|
1058
|
-
} =
|
|
1059
|
-
if (
|
|
1060
|
-
const
|
|
1061
|
-
collapsedSize:
|
|
1062
|
-
panelSize:
|
|
1063
|
-
minSize:
|
|
1064
|
-
pivotIndices:
|
|
1065
|
-
} = ee(d,
|
|
1066
|
-
if (
|
|
1067
|
-
const
|
|
1068
|
-
delta:
|
|
1069
|
-
initialLayout:
|
|
1070
|
-
panelConstraints:
|
|
1071
|
-
pivotIndices:
|
|
1072
|
-
prevLayout:
|
|
1074
|
+
} = b.current;
|
|
1075
|
+
if (c.constraints.collapsible) {
|
|
1076
|
+
const z = d.map((V) => V.constraints), {
|
|
1077
|
+
collapsedSize: E = 0,
|
|
1078
|
+
panelSize: $ = 0,
|
|
1079
|
+
minSize: X = 0,
|
|
1080
|
+
pivotIndices: J
|
|
1081
|
+
} = ee(d, c, p), L = g ?? X;
|
|
1082
|
+
if (Y($, E)) {
|
|
1083
|
+
const V = H.current.get(c.id), he = V != null && V >= L ? V : L, Me = se(d, c) === d.length - 1 ? $ - he : he - $, B = ye({
|
|
1084
|
+
delta: Me,
|
|
1085
|
+
initialLayout: p,
|
|
1086
|
+
panelConstraints: z,
|
|
1087
|
+
pivotIndices: J,
|
|
1088
|
+
prevLayout: p,
|
|
1073
1089
|
trigger: "imperative-api"
|
|
1074
1090
|
});
|
|
1075
|
-
Pe(
|
|
1091
|
+
Pe(p, B) || (S(B), b.current.layout = B, v && v(B), le(d, B, M.current));
|
|
1076
1092
|
}
|
|
1077
1093
|
}
|
|
1078
|
-
}, []),
|
|
1094
|
+
}, []), W = T((c) => {
|
|
1079
1095
|
const {
|
|
1080
|
-
layout:
|
|
1081
|
-
panelDataArray:
|
|
1082
|
-
} =
|
|
1083
|
-
panelSize:
|
|
1084
|
-
} = ee(
|
|
1085
|
-
return
|
|
1086
|
-
}, []),
|
|
1096
|
+
layout: g,
|
|
1097
|
+
panelDataArray: v
|
|
1098
|
+
} = b.current, {
|
|
1099
|
+
panelSize: p
|
|
1100
|
+
} = ee(v, c, g);
|
|
1101
|
+
return y(p != null, `Panel size not found for panel "${c.id}"`), p;
|
|
1102
|
+
}, []), _ = T((c, g) => {
|
|
1087
1103
|
const {
|
|
1088
|
-
panelDataArray:
|
|
1089
|
-
} =
|
|
1090
|
-
return
|
|
1091
|
-
defaultSize:
|
|
1092
|
-
dragState:
|
|
1104
|
+
panelDataArray: v
|
|
1105
|
+
} = b.current, p = se(v, c);
|
|
1106
|
+
return Jn({
|
|
1107
|
+
defaultSize: g,
|
|
1108
|
+
dragState: h,
|
|
1093
1109
|
layout: w,
|
|
1094
|
-
panelData:
|
|
1095
|
-
panelIndex:
|
|
1110
|
+
panelData: v,
|
|
1111
|
+
panelIndex: p
|
|
1096
1112
|
});
|
|
1097
|
-
}, [
|
|
1113
|
+
}, [h, w]), D = T((c) => {
|
|
1098
1114
|
const {
|
|
1099
|
-
layout:
|
|
1100
|
-
panelDataArray:
|
|
1101
|
-
} =
|
|
1102
|
-
collapsedSize:
|
|
1115
|
+
layout: g,
|
|
1116
|
+
panelDataArray: v
|
|
1117
|
+
} = b.current, {
|
|
1118
|
+
collapsedSize: p = 0,
|
|
1103
1119
|
collapsible: d,
|
|
1104
|
-
panelSize:
|
|
1105
|
-
} = ee(
|
|
1106
|
-
return z
|
|
1107
|
-
}, []),
|
|
1120
|
+
panelSize: z
|
|
1121
|
+
} = ee(v, c, g);
|
|
1122
|
+
return y(z != null, `Panel size not found for panel "${c.id}"`), d === !0 && Y(z, p);
|
|
1123
|
+
}, []), Q = T((c) => {
|
|
1108
1124
|
const {
|
|
1109
|
-
layout:
|
|
1110
|
-
panelDataArray:
|
|
1111
|
-
} =
|
|
1112
|
-
collapsedSize:
|
|
1125
|
+
layout: g,
|
|
1126
|
+
panelDataArray: v
|
|
1127
|
+
} = b.current, {
|
|
1128
|
+
collapsedSize: p = 0,
|
|
1113
1129
|
collapsible: d,
|
|
1114
|
-
panelSize:
|
|
1115
|
-
} = ee(
|
|
1116
|
-
return z
|
|
1117
|
-
}, []), N =
|
|
1130
|
+
panelSize: z
|
|
1131
|
+
} = ee(v, c, g);
|
|
1132
|
+
return y(z != null, `Panel size not found for panel "${c.id}"`), !d || oe(z, p) > 0;
|
|
1133
|
+
}, []), N = T((c) => {
|
|
1118
1134
|
const {
|
|
1119
|
-
panelDataArray:
|
|
1120
|
-
} =
|
|
1121
|
-
|
|
1122
|
-
const d =
|
|
1123
|
-
return d == null &&
|
|
1124
|
-
}),
|
|
1125
|
-
}, [
|
|
1126
|
-
|
|
1127
|
-
if (
|
|
1128
|
-
|
|
1135
|
+
panelDataArray: g
|
|
1136
|
+
} = b.current;
|
|
1137
|
+
g.push(c), g.sort((v, p) => {
|
|
1138
|
+
const d = v.order, z = p.order;
|
|
1139
|
+
return d == null && z == null ? 0 : d == null ? -1 : z == null ? 1 : d - z;
|
|
1140
|
+
}), b.current.panelDataArrayChanged = !0, R();
|
|
1141
|
+
}, [R]);
|
|
1142
|
+
re(() => {
|
|
1143
|
+
if (b.current.panelDataArrayChanged) {
|
|
1144
|
+
b.current.panelDataArrayChanged = !1;
|
|
1129
1145
|
const {
|
|
1130
|
-
autoSaveId:
|
|
1131
|
-
onLayout:
|
|
1132
|
-
storage:
|
|
1146
|
+
autoSaveId: c,
|
|
1147
|
+
onLayout: g,
|
|
1148
|
+
storage: v
|
|
1133
1149
|
} = C.current, {
|
|
1134
|
-
layout:
|
|
1150
|
+
layout: p,
|
|
1135
1151
|
panelDataArray: d
|
|
1136
|
-
} =
|
|
1137
|
-
let
|
|
1138
|
-
if (
|
|
1139
|
-
const
|
|
1140
|
-
|
|
1152
|
+
} = b.current;
|
|
1153
|
+
let z = null;
|
|
1154
|
+
if (c) {
|
|
1155
|
+
const $ = Yn(c, d, v);
|
|
1156
|
+
$ && (H.current = new Map(Object.entries($.expandToSizes)), z = $.layout);
|
|
1141
1157
|
}
|
|
1142
|
-
|
|
1158
|
+
z == null && (z = Xn({
|
|
1143
1159
|
panelDataArray: d
|
|
1144
1160
|
}));
|
|
1145
|
-
const
|
|
1146
|
-
layout:
|
|
1147
|
-
panelConstraints: d.map((
|
|
1161
|
+
const E = Ye({
|
|
1162
|
+
layout: z,
|
|
1163
|
+
panelConstraints: d.map(($) => $.constraints)
|
|
1148
1164
|
});
|
|
1149
|
-
|
|
1165
|
+
Je(p, E) || (S(E), b.current.layout = E, g && g(E), le(d, E, M.current));
|
|
1150
1166
|
}
|
|
1151
|
-
}),
|
|
1152
|
-
const
|
|
1167
|
+
}), re(() => {
|
|
1168
|
+
const c = b.current;
|
|
1153
1169
|
return () => {
|
|
1154
|
-
|
|
1170
|
+
c.layout = [];
|
|
1155
1171
|
};
|
|
1156
1172
|
}, []);
|
|
1157
|
-
const k =
|
|
1158
|
-
let
|
|
1159
|
-
const
|
|
1160
|
-
return
|
|
1173
|
+
const k = T((c) => {
|
|
1174
|
+
let g = !1;
|
|
1175
|
+
const v = x.current;
|
|
1176
|
+
return v && window.getComputedStyle(v, null).getPropertyValue("direction") === "rtl" && (g = !0), function(d) {
|
|
1161
1177
|
d.preventDefault();
|
|
1162
|
-
const
|
|
1163
|
-
if (!
|
|
1178
|
+
const z = x.current;
|
|
1179
|
+
if (!z)
|
|
1164
1180
|
return () => null;
|
|
1165
1181
|
const {
|
|
1166
|
-
direction:
|
|
1167
|
-
dragState:
|
|
1168
|
-
id:
|
|
1169
|
-
keyboardResizeBy:
|
|
1170
|
-
onLayout:
|
|
1182
|
+
direction: E,
|
|
1183
|
+
dragState: $,
|
|
1184
|
+
id: X,
|
|
1185
|
+
keyboardResizeBy: J,
|
|
1186
|
+
onLayout: L
|
|
1171
1187
|
} = C.current, {
|
|
1172
|
-
layout:
|
|
1173
|
-
panelDataArray:
|
|
1174
|
-
} =
|
|
1175
|
-
initialLayout:
|
|
1176
|
-
} =
|
|
1177
|
-
let
|
|
1178
|
-
const
|
|
1179
|
-
|
|
1180
|
-
const
|
|
1181
|
-
delta:
|
|
1182
|
-
initialLayout:
|
|
1183
|
-
panelConstraints:
|
|
1184
|
-
pivotIndices:
|
|
1185
|
-
prevLayout:
|
|
1186
|
-
trigger:
|
|
1187
|
-
}),
|
|
1188
|
-
(on(d) ||
|
|
1188
|
+
layout: V,
|
|
1189
|
+
panelDataArray: he
|
|
1190
|
+
} = b.current, {
|
|
1191
|
+
initialLayout: be
|
|
1192
|
+
} = $ ?? {}, Me = gn(X, c, z);
|
|
1193
|
+
let B = qn(d, c, E, $, J, z);
|
|
1194
|
+
const Ke = E === "horizontal";
|
|
1195
|
+
Ke && g && (B = -B);
|
|
1196
|
+
const Sn = he.map((bn) => bn.constraints), ze = ye({
|
|
1197
|
+
delta: B,
|
|
1198
|
+
initialLayout: be ?? V,
|
|
1199
|
+
panelConstraints: Sn,
|
|
1200
|
+
pivotIndices: Me,
|
|
1201
|
+
prevLayout: V,
|
|
1202
|
+
trigger: rn(d) ? "keyboard" : "mouse-or-touch"
|
|
1203
|
+
}), Ue = !Pe(V, ze);
|
|
1204
|
+
(on(d) || ln(d)) && q.current != B && (q.current = B, !Ue && B !== 0 ? Ke ? Ne(c, B < 0 ? an : un) : Ne(c, B < 0 ? cn : dn) : Ne(c, 0)), Ue && (S(ze), b.current.layout = ze, L && L(ze), le(he, ze, M.current));
|
|
1189
1205
|
};
|
|
1190
|
-
}, []),
|
|
1206
|
+
}, []), G = T((c, g) => {
|
|
1191
1207
|
const {
|
|
1192
|
-
onLayout:
|
|
1208
|
+
onLayout: v
|
|
1193
1209
|
} = C.current, {
|
|
1194
|
-
layout:
|
|
1210
|
+
layout: p,
|
|
1195
1211
|
panelDataArray: d
|
|
1196
|
-
} =
|
|
1197
|
-
panelSize:
|
|
1198
|
-
pivotIndices:
|
|
1199
|
-
} = ee(d,
|
|
1200
|
-
|
|
1201
|
-
const
|
|
1202
|
-
delta:
|
|
1203
|
-
initialLayout:
|
|
1204
|
-
panelConstraints:
|
|
1205
|
-
pivotIndices:
|
|
1206
|
-
prevLayout:
|
|
1212
|
+
} = b.current, z = d.map((V) => V.constraints), {
|
|
1213
|
+
panelSize: E,
|
|
1214
|
+
pivotIndices: $
|
|
1215
|
+
} = ee(d, c, p);
|
|
1216
|
+
y(E != null, `Panel size not found for panel "${c.id}"`);
|
|
1217
|
+
const J = se(d, c) === d.length - 1 ? E - g : g - E, L = ye({
|
|
1218
|
+
delta: J,
|
|
1219
|
+
initialLayout: p,
|
|
1220
|
+
panelConstraints: z,
|
|
1221
|
+
pivotIndices: $,
|
|
1222
|
+
prevLayout: p,
|
|
1207
1223
|
trigger: "imperative-api"
|
|
1208
1224
|
});
|
|
1209
|
-
Pe(
|
|
1210
|
-
}, []),
|
|
1225
|
+
Pe(p, L) || (S(L), b.current.layout = L, v && v(L), le(d, L, M.current));
|
|
1226
|
+
}, []), fe = T((c, g) => {
|
|
1211
1227
|
const {
|
|
1212
|
-
layout:
|
|
1213
|
-
panelDataArray:
|
|
1214
|
-
} =
|
|
1228
|
+
layout: v,
|
|
1229
|
+
panelDataArray: p
|
|
1230
|
+
} = b.current, {
|
|
1215
1231
|
collapsedSize: d = 0,
|
|
1216
|
-
collapsible:
|
|
1217
|
-
} =
|
|
1218
|
-
collapsedSize:
|
|
1219
|
-
collapsible:
|
|
1220
|
-
maxSize:
|
|
1221
|
-
minSize:
|
|
1222
|
-
} =
|
|
1223
|
-
panelSize:
|
|
1224
|
-
} = ee(
|
|
1225
|
-
|
|
1226
|
-
}, [
|
|
1232
|
+
collapsible: z
|
|
1233
|
+
} = g, {
|
|
1234
|
+
collapsedSize: E = 0,
|
|
1235
|
+
collapsible: $,
|
|
1236
|
+
maxSize: X = 100,
|
|
1237
|
+
minSize: J = 0
|
|
1238
|
+
} = c.constraints, {
|
|
1239
|
+
panelSize: L
|
|
1240
|
+
} = ee(p, c, v);
|
|
1241
|
+
L != null && (z && $ && Y(L, d) ? Y(d, E) || G(c, E) : L < J ? G(c, J) : L > X && G(c, X));
|
|
1242
|
+
}, [G]), pe = T((c, g) => {
|
|
1227
1243
|
const {
|
|
1228
|
-
direction:
|
|
1244
|
+
direction: v
|
|
1229
1245
|
} = C.current, {
|
|
1230
|
-
layout:
|
|
1231
|
-
} =
|
|
1232
|
-
if (!
|
|
1246
|
+
layout: p
|
|
1247
|
+
} = b.current;
|
|
1248
|
+
if (!x.current)
|
|
1233
1249
|
return;
|
|
1234
|
-
const d =
|
|
1235
|
-
|
|
1236
|
-
const
|
|
1237
|
-
|
|
1238
|
-
dragHandleId:
|
|
1250
|
+
const d = Ae(c, x.current);
|
|
1251
|
+
y(d, `Drag handle element not found for id "${c}"`);
|
|
1252
|
+
const z = hn(v, g);
|
|
1253
|
+
I({
|
|
1254
|
+
dragHandleId: c,
|
|
1239
1255
|
dragHandleRect: d.getBoundingClientRect(),
|
|
1240
|
-
initialCursorPosition:
|
|
1241
|
-
initialLayout:
|
|
1256
|
+
initialCursorPosition: z,
|
|
1257
|
+
initialLayout: p
|
|
1242
1258
|
});
|
|
1243
|
-
}, []),
|
|
1244
|
-
|
|
1245
|
-
}, []),
|
|
1259
|
+
}, []), ge = T(() => {
|
|
1260
|
+
I(null);
|
|
1261
|
+
}, []), De = T((c) => {
|
|
1246
1262
|
const {
|
|
1247
|
-
panelDataArray:
|
|
1248
|
-
} =
|
|
1249
|
-
|
|
1250
|
-
}, [
|
|
1251
|
-
collapsePanel:
|
|
1252
|
-
direction:
|
|
1253
|
-
dragState:
|
|
1254
|
-
expandPanel:
|
|
1255
|
-
getPanelSize:
|
|
1256
|
-
getPanelStyle:
|
|
1257
|
-
groupId:
|
|
1258
|
-
isPanelCollapsed:
|
|
1259
|
-
isPanelExpanded:
|
|
1260
|
-
reevaluatePanelConstraints:
|
|
1263
|
+
panelDataArray: g
|
|
1264
|
+
} = b.current, v = se(g, c);
|
|
1265
|
+
v >= 0 && (g.splice(v, 1), delete M.current[c.id], b.current.panelDataArrayChanged = !0, R());
|
|
1266
|
+
}, [R]), ie = En(() => ({
|
|
1267
|
+
collapsePanel: U,
|
|
1268
|
+
direction: r,
|
|
1269
|
+
dragState: h,
|
|
1270
|
+
expandPanel: j,
|
|
1271
|
+
getPanelSize: W,
|
|
1272
|
+
getPanelStyle: _,
|
|
1273
|
+
groupId: u,
|
|
1274
|
+
isPanelCollapsed: D,
|
|
1275
|
+
isPanelExpanded: Q,
|
|
1276
|
+
reevaluatePanelConstraints: fe,
|
|
1261
1277
|
registerPanel: N,
|
|
1262
1278
|
registerResizeHandle: k,
|
|
1263
|
-
resizePanel:
|
|
1264
|
-
startDragging:
|
|
1265
|
-
stopDragging:
|
|
1266
|
-
unregisterPanel:
|
|
1267
|
-
panelGroupElement:
|
|
1268
|
-
}), [
|
|
1279
|
+
resizePanel: G,
|
|
1280
|
+
startDragging: pe,
|
|
1281
|
+
stopDragging: ge,
|
|
1282
|
+
unregisterPanel: De,
|
|
1283
|
+
panelGroupElement: x.current
|
|
1284
|
+
}), [U, h, r, j, W, _, u, D, Q, fe, N, k, G, pe, ge, De]), me = {
|
|
1269
1285
|
display: "flex",
|
|
1270
|
-
flexDirection:
|
|
1286
|
+
flexDirection: r === "horizontal" ? "row" : "column",
|
|
1271
1287
|
height: "100%",
|
|
1272
1288
|
overflow: "hidden",
|
|
1273
1289
|
width: "100%"
|
|
1274
1290
|
};
|
|
1275
|
-
return de(
|
|
1276
|
-
value:
|
|
1277
|
-
}, de(
|
|
1291
|
+
return de(Ce.Provider, {
|
|
1292
|
+
value: ie
|
|
1293
|
+
}, de(P, {
|
|
1278
1294
|
...f,
|
|
1279
1295
|
children: n,
|
|
1280
1296
|
className: t,
|
|
1281
|
-
id:
|
|
1282
|
-
ref:
|
|
1297
|
+
id: o,
|
|
1298
|
+
ref: x,
|
|
1283
1299
|
style: {
|
|
1284
|
-
...
|
|
1285
|
-
...
|
|
1300
|
+
...me,
|
|
1301
|
+
...m
|
|
1286
1302
|
},
|
|
1287
1303
|
// CSS selectors
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1304
|
+
[A.group]: "",
|
|
1305
|
+
[A.groupDirection]: r,
|
|
1306
|
+
[A.groupId]: u
|
|
1291
1307
|
}));
|
|
1292
1308
|
}
|
|
1293
|
-
const
|
|
1309
|
+
const et = Qe((e, n) => de(vn, {
|
|
1294
1310
|
...e,
|
|
1295
1311
|
forwardedRef: n
|
|
1296
1312
|
}));
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
function
|
|
1313
|
+
vn.displayName = "PanelGroup";
|
|
1314
|
+
et.displayName = "forwardRef(PanelGroup)";
|
|
1315
|
+
function se(e, n) {
|
|
1300
1316
|
return e.findIndex((t) => t === n || t.id === n.id);
|
|
1301
1317
|
}
|
|
1302
1318
|
function ee(e, n, t) {
|
|
1303
|
-
const
|
|
1319
|
+
const r = se(e, n), o = r === e.length - 1 ? [r - 1, r] : [r, r + 1], l = t[r];
|
|
1304
1320
|
return {
|
|
1305
1321
|
...n.constraints,
|
|
1306
1322
|
panelSize: l,
|
|
1307
|
-
pivotIndices:
|
|
1323
|
+
pivotIndices: o
|
|
1308
1324
|
};
|
|
1309
1325
|
}
|
|
1310
|
-
function
|
|
1326
|
+
function nt({
|
|
1311
1327
|
disabled: e,
|
|
1312
1328
|
handleId: n,
|
|
1313
1329
|
resizeHandler: t,
|
|
1314
|
-
panelGroupElement:
|
|
1330
|
+
panelGroupElement: r
|
|
1315
1331
|
}) {
|
|
1316
1332
|
te(() => {
|
|
1317
|
-
if (e || t == null ||
|
|
1333
|
+
if (e || t == null || r == null)
|
|
1318
1334
|
return;
|
|
1319
|
-
const i =
|
|
1335
|
+
const i = Ae(n, r);
|
|
1320
1336
|
if (i == null)
|
|
1321
1337
|
return;
|
|
1322
|
-
const
|
|
1338
|
+
const o = (l) => {
|
|
1323
1339
|
if (!l.defaultPrevented)
|
|
1324
1340
|
switch (l.key) {
|
|
1325
1341
|
case "ArrowDown":
|
|
@@ -1333,149 +1349,162 @@ function Zn({
|
|
|
1333
1349
|
}
|
|
1334
1350
|
case "F6": {
|
|
1335
1351
|
l.preventDefault();
|
|
1336
|
-
const s = i.getAttribute(
|
|
1337
|
-
|
|
1338
|
-
const a =
|
|
1339
|
-
|
|
1340
|
-
const
|
|
1341
|
-
a[
|
|
1352
|
+
const s = i.getAttribute(A.groupId);
|
|
1353
|
+
y(s, `No group element found for id "${s}"`);
|
|
1354
|
+
const a = Se(s, r), m = pn(s, n, r);
|
|
1355
|
+
y(m !== null, `No resize element found for id "${n}"`);
|
|
1356
|
+
const P = l.shiftKey ? m > 0 ? m - 1 : a.length - 1 : m + 1 < a.length ? m + 1 : 0;
|
|
1357
|
+
a[P].focus();
|
|
1342
1358
|
break;
|
|
1343
1359
|
}
|
|
1344
1360
|
}
|
|
1345
1361
|
};
|
|
1346
|
-
return i.addEventListener("keydown",
|
|
1347
|
-
i.removeEventListener("keydown",
|
|
1362
|
+
return i.addEventListener("keydown", o), () => {
|
|
1363
|
+
i.removeEventListener("keydown", o);
|
|
1348
1364
|
};
|
|
1349
|
-
}, [
|
|
1365
|
+
}, [r, e, n, t]);
|
|
1350
1366
|
}
|
|
1351
|
-
function
|
|
1367
|
+
function tt({
|
|
1352
1368
|
children: e = null,
|
|
1353
1369
|
className: n = "",
|
|
1354
1370
|
disabled: t = !1,
|
|
1355
|
-
hitAreaMargins:
|
|
1371
|
+
hitAreaMargins: r,
|
|
1356
1372
|
id: i,
|
|
1357
|
-
onBlur:
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1373
|
+
onBlur: o,
|
|
1374
|
+
onClick: l,
|
|
1375
|
+
onDragging: s,
|
|
1376
|
+
onFocus: a,
|
|
1377
|
+
onPointerDown: m,
|
|
1378
|
+
onPointerUp: P,
|
|
1379
|
+
style: f = {},
|
|
1380
|
+
tabIndex: u = 0,
|
|
1381
|
+
tagName: x = "div",
|
|
1382
|
+
...h
|
|
1364
1383
|
}) {
|
|
1365
|
-
var
|
|
1366
|
-
const
|
|
1367
|
-
|
|
1384
|
+
var I, w;
|
|
1385
|
+
const S = F(null), R = F({
|
|
1386
|
+
onClick: l,
|
|
1387
|
+
onDragging: s,
|
|
1388
|
+
onPointerDown: m,
|
|
1389
|
+
onPointerUp: P
|
|
1368
1390
|
});
|
|
1369
1391
|
te(() => {
|
|
1370
|
-
|
|
1392
|
+
R.current.onClick = l, R.current.onDragging = s, R.current.onPointerDown = m, R.current.onPointerUp = P;
|
|
1371
1393
|
});
|
|
1372
|
-
const
|
|
1373
|
-
if (
|
|
1394
|
+
const M = en(Ce);
|
|
1395
|
+
if (M === null)
|
|
1374
1396
|
throw Error("PanelResizeHandle components must be rendered within a PanelGroup container");
|
|
1375
1397
|
const {
|
|
1376
|
-
direction:
|
|
1377
|
-
groupId:
|
|
1378
|
-
registerResizeHandle:
|
|
1379
|
-
startDragging:
|
|
1380
|
-
stopDragging:
|
|
1381
|
-
panelGroupElement:
|
|
1382
|
-
} =
|
|
1383
|
-
state:
|
|
1398
|
+
direction: H,
|
|
1399
|
+
groupId: q,
|
|
1400
|
+
registerResizeHandle: C,
|
|
1401
|
+
startDragging: b,
|
|
1402
|
+
stopDragging: U,
|
|
1403
|
+
panelGroupElement: j
|
|
1404
|
+
} = M, W = Te(i), [_, D] = ue("inactive"), [Q, N] = ue(!1), [k, G] = ue(null), fe = F({
|
|
1405
|
+
state: _
|
|
1384
1406
|
});
|
|
1385
|
-
|
|
1386
|
-
|
|
1407
|
+
re(() => {
|
|
1408
|
+
fe.current.state = _;
|
|
1387
1409
|
}), te(() => {
|
|
1388
1410
|
if (t)
|
|
1389
|
-
|
|
1411
|
+
G(null);
|
|
1390
1412
|
else {
|
|
1391
|
-
const
|
|
1392
|
-
|
|
1413
|
+
const ie = C(W);
|
|
1414
|
+
G(() => ie);
|
|
1393
1415
|
}
|
|
1394
|
-
}, [t,
|
|
1395
|
-
const
|
|
1416
|
+
}, [t, W, C]);
|
|
1417
|
+
const pe = (I = r == null ? void 0 : r.coarse) !== null && I !== void 0 ? I : 15, ge = (w = r == null ? void 0 : r.fine) !== null && w !== void 0 ? w : 5;
|
|
1396
1418
|
return te(() => {
|
|
1397
|
-
if (t ||
|
|
1419
|
+
if (t || k == null)
|
|
1398
1420
|
return;
|
|
1399
|
-
const
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
u && u(!1);
|
|
1427
|
-
break;
|
|
1428
|
-
}
|
|
1421
|
+
const ie = S.current;
|
|
1422
|
+
y(ie, "Element ref not attached");
|
|
1423
|
+
let me = !1;
|
|
1424
|
+
return Bn(W, ie, H, {
|
|
1425
|
+
coarse: pe,
|
|
1426
|
+
fine: ge
|
|
1427
|
+
}, (g, v, p) => {
|
|
1428
|
+
if (!v) {
|
|
1429
|
+
D("inactive");
|
|
1430
|
+
return;
|
|
1431
|
+
}
|
|
1432
|
+
switch (g) {
|
|
1433
|
+
case "down": {
|
|
1434
|
+
D("drag"), me = !1, y(p, 'Expected event to be defined for "down" action'), b(W, p);
|
|
1435
|
+
const {
|
|
1436
|
+
onDragging: d,
|
|
1437
|
+
onPointerDown: z
|
|
1438
|
+
} = R.current;
|
|
1439
|
+
d == null || d(!0), z == null || z();
|
|
1440
|
+
break;
|
|
1441
|
+
}
|
|
1442
|
+
case "move": {
|
|
1443
|
+
const {
|
|
1444
|
+
state: d
|
|
1445
|
+
} = fe.current;
|
|
1446
|
+
me = !0, d !== "drag" && D("hover"), y(p, 'Expected event to be defined for "move" action'), k(p);
|
|
1447
|
+
break;
|
|
1429
1448
|
}
|
|
1430
|
-
|
|
1431
|
-
|
|
1449
|
+
case "up": {
|
|
1450
|
+
D("hover"), U();
|
|
1451
|
+
const {
|
|
1452
|
+
onClick: d,
|
|
1453
|
+
onDragging: z,
|
|
1454
|
+
onPointerUp: E
|
|
1455
|
+
} = R.current;
|
|
1456
|
+
z == null || z(!1), E == null || E(), me || d == null || d();
|
|
1457
|
+
break;
|
|
1458
|
+
}
|
|
1459
|
+
}
|
|
1432
1460
|
});
|
|
1433
|
-
}, [
|
|
1461
|
+
}, [pe, H, t, ge, C, W, k, b, U]), nt({
|
|
1434
1462
|
disabled: t,
|
|
1435
|
-
handleId:
|
|
1436
|
-
resizeHandler:
|
|
1437
|
-
panelGroupElement:
|
|
1438
|
-
}), de(
|
|
1439
|
-
...
|
|
1463
|
+
handleId: W,
|
|
1464
|
+
resizeHandler: k,
|
|
1465
|
+
panelGroupElement: j
|
|
1466
|
+
}), de(x, {
|
|
1467
|
+
...h,
|
|
1440
1468
|
children: e,
|
|
1441
1469
|
className: n,
|
|
1442
1470
|
id: i,
|
|
1443
1471
|
onBlur: () => {
|
|
1444
|
-
|
|
1472
|
+
N(!1), o == null || o();
|
|
1445
1473
|
},
|
|
1446
1474
|
onFocus: () => {
|
|
1447
|
-
|
|
1475
|
+
N(!0), a == null || a();
|
|
1448
1476
|
},
|
|
1449
|
-
ref:
|
|
1477
|
+
ref: S,
|
|
1450
1478
|
role: "separator",
|
|
1451
1479
|
style: {
|
|
1452
1480
|
...{
|
|
1453
1481
|
touchAction: "none",
|
|
1454
1482
|
userSelect: "none"
|
|
1455
1483
|
},
|
|
1456
|
-
...
|
|
1484
|
+
...f
|
|
1457
1485
|
},
|
|
1458
|
-
tabIndex:
|
|
1486
|
+
tabIndex: u,
|
|
1459
1487
|
// CSS selectors
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1488
|
+
[A.groupDirection]: H,
|
|
1489
|
+
[A.groupId]: q,
|
|
1490
|
+
[A.resizeHandle]: "",
|
|
1491
|
+
[A.resizeHandleActive]: _ === "drag" ? "pointer" : Q ? "keyboard" : void 0,
|
|
1492
|
+
[A.resizeHandleEnabled]: !t,
|
|
1493
|
+
[A.resizeHandleId]: W,
|
|
1494
|
+
[A.resizeHandleState]: _
|
|
1467
1495
|
});
|
|
1468
1496
|
}
|
|
1469
|
-
|
|
1497
|
+
tt.displayName = "PanelResizeHandle";
|
|
1470
1498
|
export {
|
|
1499
|
+
A as DATA_ATTRIBUTES,
|
|
1471
1500
|
Ln as Panel,
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1501
|
+
et as PanelGroup,
|
|
1502
|
+
tt as PanelResizeHandle,
|
|
1503
|
+
y as assert,
|
|
1504
|
+
mn as getPanelGroupElement,
|
|
1505
|
+
Ae as getResizeHandleElement,
|
|
1506
|
+
pn as getResizeHandleElementIndex,
|
|
1507
|
+
Se as getResizeHandleElementsForGroup,
|
|
1508
|
+
Un as getResizeHandlePanelIds,
|
|
1509
|
+
$n as intersects
|
|
1481
1510
|
};
|