@object-ui/layout 3.3.1 → 3.4.0
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/CHANGELOG.md +21 -0
- package/dist/index.js +898 -868
- package/dist/index.umd.cjs +3 -3
- package/dist/packages/layout/src/NavigationRenderer.d.ts +19 -2
- package/package.json +8 -8
package/dist/index.js
CHANGED
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
import { ComponentRegistry as e } from "@object-ui/core";
|
|
2
2
|
import t, { createContext as n, memo as r, useCallback as i, useContext as a, useEffect as o, useLayoutEffect as s, useMemo as c, useReducer as l, useRef as u, useState as d } from "react";
|
|
3
|
-
import { Badge as f, Collapsible as p, CollapsibleContent as m, CollapsibleTrigger as h, Input as g, Separator as _, Sidebar as v, SidebarContent as y, SidebarFooter as b, SidebarGroup as x, SidebarGroupContent as S, SidebarGroupLabel as C, SidebarHeader as w, SidebarInput as T, SidebarInset as E, SidebarMenu as D, SidebarMenuAction as
|
|
4
|
-
import { Link as
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { menuItemToNavigationItem as L } from "@object-ui/types";
|
|
3
|
+
import { Badge as f, Collapsible as p, CollapsibleContent as m, CollapsibleTrigger as h, Input as g, Separator as _, Sidebar as v, SidebarContent as y, SidebarFooter as b, SidebarGroup as x, SidebarGroupContent as S, SidebarGroupLabel as C, SidebarHeader as w, SidebarInput as T, SidebarInset as E, SidebarMenu as D, SidebarMenuAction as O, SidebarMenuButton as k, SidebarMenuItem as A, SidebarMenuSub as j, SidebarMenuSubButton as M, SidebarMenuSubItem as ee, SidebarProvider as N, cn as P, getLazyIcon as F } from "@object-ui/components";
|
|
4
|
+
import { Link as I, NavLink as te, useLocation as L } from "react-router-dom";
|
|
5
|
+
import { ChevronRight as R, FileText as ne, GripVertical as z, Layers as B, Pin as re, PinOff as ie, Search as ae, Star as V } from "lucide-react";
|
|
6
|
+
import { createPortal as H, unstable_batchedUpdates as oe } from "react-dom";
|
|
7
|
+
import { menuItemToNavigationItem as U } from "@object-ui/types";
|
|
9
8
|
import { SchemaRenderer as se } from "@object-ui/react";
|
|
10
9
|
//#region \0rolldown/runtime.js
|
|
11
|
-
var
|
|
10
|
+
var W = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t.exports), ce = /* @__PURE__ */ ((e) => typeof require < "u" ? require : typeof Proxy < "u" ? new Proxy(e, { get: (e, t) => (typeof require < "u" ? require : e)[t] }) : e)(function(e) {
|
|
12
11
|
if (typeof require < "u") return require.apply(this, arguments);
|
|
13
12
|
throw Error("Calling `require` for \"" + e + "\" in an environment that doesn't expose the `require` function. See https://rolldown.rs/in-depth/bundling-cjs#require-external-modules for more details.");
|
|
14
|
-
}),
|
|
13
|
+
}), le = /* @__PURE__ */ W(((e) => {
|
|
15
14
|
var t = Symbol.for("react.transitional.element"), n = Symbol.for("react.fragment");
|
|
16
15
|
function r(e, n, r) {
|
|
17
16
|
var i = null;
|
|
@@ -26,11 +25,11 @@ var R = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t
|
|
|
26
25
|
};
|
|
27
26
|
}
|
|
28
27
|
e.Fragment = n, e.jsx = r, e.jsxs = r;
|
|
29
|
-
})),
|
|
28
|
+
})), ue = /* @__PURE__ */ W(((e) => {
|
|
30
29
|
process.env.NODE_ENV !== "production" && (function() {
|
|
31
30
|
function t(e) {
|
|
32
31
|
if (e == null) return null;
|
|
33
|
-
if (typeof e == "function") return e.$$typeof ===
|
|
32
|
+
if (typeof e == "function") return e.$$typeof === O ? null : e.displayName || e.name || null;
|
|
34
33
|
if (typeof e == "string") return e;
|
|
35
34
|
switch (e) {
|
|
36
35
|
case _: return "Fragment";
|
|
@@ -83,14 +82,14 @@ var R = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t
|
|
|
83
82
|
}
|
|
84
83
|
}
|
|
85
84
|
function a() {
|
|
86
|
-
var e =
|
|
85
|
+
var e = k.A;
|
|
87
86
|
return e === null ? null : e.getOwner();
|
|
88
87
|
}
|
|
89
88
|
function o() {
|
|
90
89
|
return Error("react-stack-top-frame");
|
|
91
90
|
}
|
|
92
91
|
function s(e) {
|
|
93
|
-
if (
|
|
92
|
+
if (A.call(e, "key")) {
|
|
94
93
|
var t = Object.getOwnPropertyDescriptor(e, "key").get;
|
|
95
94
|
if (t && t.isReactWarning) return !1;
|
|
96
95
|
}
|
|
@@ -98,7 +97,7 @@ var R = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t
|
|
|
98
97
|
}
|
|
99
98
|
function c(e, t) {
|
|
100
99
|
function n() {
|
|
101
|
-
|
|
100
|
+
ee || (ee = !0, console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)", t));
|
|
102
101
|
}
|
|
103
102
|
n.isReactWarning = !0, Object.defineProperty(e, "key", {
|
|
104
103
|
get: n,
|
|
@@ -107,7 +106,7 @@ var R = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t
|
|
|
107
106
|
}
|
|
108
107
|
function l() {
|
|
109
108
|
var e = t(this.type);
|
|
110
|
-
return
|
|
109
|
+
return N[e] || (N[e] = !0, console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")), e = this.props.ref, e === void 0 ? null : e;
|
|
111
110
|
}
|
|
112
111
|
function u(e, t, n, r, i, a) {
|
|
113
112
|
var o = n.ref;
|
|
@@ -147,17 +146,17 @@ var R = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t
|
|
|
147
146
|
}
|
|
148
147
|
function d(e, n, i, o, l, d) {
|
|
149
148
|
var p = n.children;
|
|
150
|
-
if (p !== void 0) if (o) if (
|
|
149
|
+
if (p !== void 0) if (o) if (j(p)) {
|
|
151
150
|
for (o = 0; o < p.length; o++) f(p[o]);
|
|
152
151
|
Object.freeze && Object.freeze(p);
|
|
153
152
|
} else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
154
153
|
else f(p);
|
|
155
|
-
if (
|
|
154
|
+
if (A.call(n, "key")) {
|
|
156
155
|
p = t(e);
|
|
157
156
|
var m = Object.keys(n).filter(function(e) {
|
|
158
157
|
return e !== "key";
|
|
159
158
|
});
|
|
160
|
-
o = 0 < m.length ? "{key: someKey, " + m.join(": ..., ") + ": ...}" : "{key: someKey}",
|
|
159
|
+
o = 0 < m.length ? "{key: someKey, " + m.join(": ..., ") + ": ...}" : "{key: someKey}", I[p + o] || (m = 0 < m.length ? "{" + m.join(": ..., ") + ": ...}" : "{}", console.error("A props object containing a \"key\" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />", o, p, m, p), I[p + o] = !0);
|
|
161
160
|
}
|
|
162
161
|
if (p = null, i !== void 0 && (r(i), p = "" + i), s(n) && (r(n.key), p = "" + n.key), "key" in n) for (var h in i = {}, n) h !== "key" && (i[h] = n[h]);
|
|
163
162
|
else i = n;
|
|
@@ -169,40 +168,40 @@ var R = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t
|
|
|
169
168
|
function p(e) {
|
|
170
169
|
return typeof e == "object" && !!e && e.$$typeof === h;
|
|
171
170
|
}
|
|
172
|
-
var m = ce("react"), h = Symbol.for("react.transitional.element"), g = Symbol.for("react.portal"), _ = Symbol.for("react.fragment"), v = Symbol.for("react.strict_mode"), y = Symbol.for("react.profiler"), b = Symbol.for("react.consumer"), x = Symbol.for("react.context"), S = Symbol.for("react.forward_ref"), C = Symbol.for("react.suspense"), w = Symbol.for("react.suspense_list"), T = Symbol.for("react.memo"), E = Symbol.for("react.lazy"), D = Symbol.for("react.activity"),
|
|
171
|
+
var m = ce("react"), h = Symbol.for("react.transitional.element"), g = Symbol.for("react.portal"), _ = Symbol.for("react.fragment"), v = Symbol.for("react.strict_mode"), y = Symbol.for("react.profiler"), b = Symbol.for("react.consumer"), x = Symbol.for("react.context"), S = Symbol.for("react.forward_ref"), C = Symbol.for("react.suspense"), w = Symbol.for("react.suspense_list"), T = Symbol.for("react.memo"), E = Symbol.for("react.lazy"), D = Symbol.for("react.activity"), O = Symbol.for("react.client.reference"), k = m.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, A = Object.prototype.hasOwnProperty, j = Array.isArray, M = console.createTask ? console.createTask : function() {
|
|
173
172
|
return null;
|
|
174
173
|
};
|
|
175
174
|
m = { react_stack_bottom_frame: function(e) {
|
|
176
175
|
return e();
|
|
177
176
|
} };
|
|
178
|
-
var
|
|
177
|
+
var ee, N = {}, P = m.react_stack_bottom_frame.bind(m, o)(), F = M(i(o)), I = {};
|
|
179
178
|
e.Fragment = _, e.jsx = function(e, t, n) {
|
|
180
|
-
var r = 1e4 >
|
|
181
|
-
return d(e, t, n, !1, r ? Error("react-stack-top-frame") :
|
|
179
|
+
var r = 1e4 > k.recentlyCreatedOwnerStacks++;
|
|
180
|
+
return d(e, t, n, !1, r ? Error("react-stack-top-frame") : P, r ? M(i(e)) : F);
|
|
182
181
|
}, e.jsxs = function(e, t, n) {
|
|
183
|
-
var r = 1e4 >
|
|
184
|
-
return d(e, t, n, !0, r ? Error("react-stack-top-frame") :
|
|
182
|
+
var r = 1e4 > k.recentlyCreatedOwnerStacks++;
|
|
183
|
+
return d(e, t, n, !0, r ? Error("react-stack-top-frame") : P, r ? M(i(e)) : F);
|
|
185
184
|
};
|
|
186
185
|
})();
|
|
187
|
-
})),
|
|
188
|
-
process.env.NODE_ENV === "production" ? t.exports =
|
|
186
|
+
})), G = (/* @__PURE__ */ W(((e, t) => {
|
|
187
|
+
process.env.NODE_ENV === "production" ? t.exports = le() : t.exports = ue();
|
|
189
188
|
})))();
|
|
190
|
-
function
|
|
191
|
-
return /* @__PURE__ */ (0,
|
|
192
|
-
className:
|
|
189
|
+
function de({ title: e, description: t, action: n, className: r, children: i, ...a }) {
|
|
190
|
+
return /* @__PURE__ */ (0, G.jsx)("div", {
|
|
191
|
+
className: P("flex flex-col gap-4 pb-4 md:pb-8", r),
|
|
193
192
|
...a,
|
|
194
|
-
children: /* @__PURE__ */ (0,
|
|
193
|
+
children: /* @__PURE__ */ (0, G.jsxs)("div", {
|
|
195
194
|
className: "flex flex-wrap items-end gap-x-4 gap-y-2",
|
|
196
|
-
children: [/* @__PURE__ */ (0,
|
|
195
|
+
children: [/* @__PURE__ */ (0, G.jsxs)("div", {
|
|
197
196
|
className: "flex flex-col gap-1 min-w-0",
|
|
198
|
-
children: [/* @__PURE__ */ (0,
|
|
197
|
+
children: [/* @__PURE__ */ (0, G.jsx)("h1", {
|
|
199
198
|
className: "text-2xl font-bold tracking-tight md:text-3xl truncate",
|
|
200
199
|
children: e
|
|
201
|
-
}), t && /* @__PURE__ */ (0,
|
|
200
|
+
}), t && /* @__PURE__ */ (0, G.jsx)("p", {
|
|
202
201
|
className: "text-sm text-muted-foreground",
|
|
203
202
|
children: t
|
|
204
203
|
})]
|
|
205
|
-
}), (n || i) && /* @__PURE__ */ (0,
|
|
204
|
+
}), (n || i) && /* @__PURE__ */ (0, G.jsxs)("div", {
|
|
206
205
|
className: "flex items-center gap-2 ml-auto sm:ml-0",
|
|
207
206
|
children: [n, i]
|
|
208
207
|
})]
|
|
@@ -211,7 +210,7 @@ function ue({ title: e, description: t, action: n, className: r, children: i, ..
|
|
|
211
210
|
}
|
|
212
211
|
//#endregion
|
|
213
212
|
//#region src/AppShell.tsx
|
|
214
|
-
function
|
|
213
|
+
function K(e) {
|
|
215
214
|
let t = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);
|
|
216
215
|
if (!t) return null;
|
|
217
216
|
let n = parseInt(t[1], 16) / 255, r = parseInt(t[2], 16) / 255, i = parseInt(t[3], 16) / 255, a = Math.max(n, r, i), o = Math.min(n, r, i), s = 0, c = 0, l = (a + o) / 2;
|
|
@@ -229,9 +228,23 @@ function V(e) {
|
|
|
229
228
|
break;
|
|
230
229
|
}
|
|
231
230
|
}
|
|
232
|
-
return
|
|
231
|
+
return {
|
|
232
|
+
h: s * 360,
|
|
233
|
+
s: c * 100,
|
|
234
|
+
l: l * 100
|
|
235
|
+
};
|
|
236
|
+
}
|
|
237
|
+
function fe(e) {
|
|
238
|
+
let t = K(e);
|
|
239
|
+
return t ? `${Math.round(t.h)} ${Math.round(t.s)}% ${Math.round(t.l)}%` : null;
|
|
240
|
+
}
|
|
241
|
+
function pe(e) {
|
|
242
|
+
let t = K(e);
|
|
243
|
+
if (!t) return null;
|
|
244
|
+
let n = Math.max(t.l, 65), r = t.s > 80 ? Math.max(t.s - 10, 70) : t.s;
|
|
245
|
+
return `${Math.round(t.h)} ${Math.round(r)}% ${Math.round(n)}%`;
|
|
233
246
|
}
|
|
234
|
-
function
|
|
247
|
+
function me(e) {
|
|
235
248
|
let t = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);
|
|
236
249
|
if (!t) return "0 0% 100%";
|
|
237
250
|
let n = (e) => {
|
|
@@ -240,23 +253,34 @@ function de(e) {
|
|
|
240
253
|
}, r = n(parseInt(t[1], 16)), i = n(parseInt(t[2], 16)), a = n(parseInt(t[3], 16));
|
|
241
254
|
return .2126 * r + .7152 * i + .0722 * a > .6 ? "222 47% 11%" : "0 0% 100%";
|
|
242
255
|
}
|
|
243
|
-
function
|
|
256
|
+
function he(e, t) {
|
|
244
257
|
o(() => {
|
|
245
|
-
let n = document.documentElement
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
258
|
+
let n = document.documentElement, r = () => n.classList.contains("dark"), i = () => {
|
|
259
|
+
if (e?.primaryColor) {
|
|
260
|
+
let t = fe(e.primaryColor), i = pe(e.primaryColor), a = r() && i || t;
|
|
261
|
+
a && (n.style.setProperty("--brand-primary", e.primaryColor), n.style.setProperty("--brand-primary-hsl", t || a), n.style.setProperty("--primary", a), n.style.setProperty("--primary-foreground", r() ? "222 47% 11%" : me(e.primaryColor)), n.style.setProperty("--ring", a), n.style.setProperty("--sidebar-primary", a), n.style.setProperty("--sidebar-ring", a));
|
|
262
|
+
} else n.style.removeProperty("--brand-primary"), n.style.removeProperty("--brand-primary-hsl"), n.style.removeProperty("--primary"), n.style.removeProperty("--primary-foreground"), n.style.removeProperty("--ring"), n.style.removeProperty("--sidebar-primary"), n.style.removeProperty("--sidebar-ring");
|
|
263
|
+
if (e?.accentColor) {
|
|
264
|
+
let t = fe(e.accentColor), i = pe(e.accentColor), a = r() && i || t;
|
|
265
|
+
a && (n.style.setProperty("--brand-accent", e.accentColor), n.style.setProperty("--brand-accent-hsl", t || a), n.style.setProperty("--accent", a), n.style.setProperty("--accent-foreground", r() ? "222 47% 11%" : me(e.accentColor)));
|
|
266
|
+
} else n.style.removeProperty("--brand-accent"), n.style.removeProperty("--brand-accent-hsl"), n.style.removeProperty("--accent"), n.style.removeProperty("--accent-foreground");
|
|
267
|
+
};
|
|
268
|
+
i();
|
|
269
|
+
let a = new MutationObserver((e) => {
|
|
270
|
+
for (let t of e) if (t.type === "attributes" && t.attributeName === "class") {
|
|
271
|
+
i();
|
|
272
|
+
break;
|
|
273
|
+
}
|
|
274
|
+
});
|
|
275
|
+
if (a.observe(n, {
|
|
276
|
+
attributes: !0,
|
|
277
|
+
attributeFilter: ["class"]
|
|
278
|
+
}), e?.favicon) {
|
|
255
279
|
let t = document.querySelector("#favicon") || document.querySelector("link[rel=\"icon\"]");
|
|
256
280
|
t && (t.href = e.favicon);
|
|
257
281
|
}
|
|
258
282
|
return t && (document.title = t), () => {
|
|
259
|
-
n.style.removeProperty("--brand-primary"), n.style.removeProperty("--brand-primary-hsl"), n.style.removeProperty("--brand-accent"), n.style.removeProperty("--brand-accent-hsl"), n.style.removeProperty("--primary"), n.style.removeProperty("--primary-foreground"), n.style.removeProperty("--ring"), n.style.removeProperty("--sidebar-primary"), n.style.removeProperty("--sidebar-ring"), n.style.removeProperty("--accent"), n.style.removeProperty("--accent-foreground");
|
|
283
|
+
a.disconnect(), n.style.removeProperty("--brand-primary"), n.style.removeProperty("--brand-primary-hsl"), n.style.removeProperty("--brand-accent"), n.style.removeProperty("--brand-accent-hsl"), n.style.removeProperty("--primary"), n.style.removeProperty("--primary-foreground"), n.style.removeProperty("--ring"), n.style.removeProperty("--sidebar-primary"), n.style.removeProperty("--sidebar-ring"), n.style.removeProperty("--accent"), n.style.removeProperty("--accent-foreground");
|
|
260
284
|
};
|
|
261
285
|
}, [
|
|
262
286
|
e?.primaryColor,
|
|
@@ -265,19 +289,19 @@ function fe(e, t) {
|
|
|
265
289
|
t
|
|
266
290
|
]);
|
|
267
291
|
}
|
|
268
|
-
function
|
|
269
|
-
return
|
|
292
|
+
function ge({ sidebar: e, navbar: t, children: n, className: r, defaultOpen: i = !0, branding: a }) {
|
|
293
|
+
return he(a, a?.title), /* @__PURE__ */ (0, G.jsxs)(N, {
|
|
270
294
|
defaultOpen: i,
|
|
271
295
|
className: "!flex-col",
|
|
272
|
-
children: [/* @__PURE__ */ (0,
|
|
296
|
+
children: [/* @__PURE__ */ (0, G.jsx)("header", {
|
|
273
297
|
className: "sticky top-0 z-30 flex h-14 w-full shrink-0 items-center gap-2 border-b bg-background px-2 sm:px-4",
|
|
274
298
|
children: t
|
|
275
|
-
}), /* @__PURE__ */ (0,
|
|
299
|
+
}), /* @__PURE__ */ (0, G.jsxs)("div", {
|
|
276
300
|
className: "flex flex-1 min-h-0 w-full",
|
|
277
|
-
children: [e, /* @__PURE__ */ (0,
|
|
301
|
+
children: [e, /* @__PURE__ */ (0, G.jsx)(E, {
|
|
278
302
|
className: "min-w-0",
|
|
279
|
-
children: /* @__PURE__ */ (0,
|
|
280
|
-
className:
|
|
303
|
+
children: /* @__PURE__ */ (0, G.jsx)("main", {
|
|
304
|
+
className: P("flex-1 min-w-0 overflow-auto p-3 sm:p-4 md:p-6", r),
|
|
281
305
|
children: n
|
|
282
306
|
})
|
|
283
307
|
})]
|
|
@@ -286,11 +310,11 @@ function pe({ sidebar: e, navbar: t, children: n, className: r, defaultOpen: i =
|
|
|
286
310
|
}
|
|
287
311
|
//#endregion
|
|
288
312
|
//#region src/PageCard.tsx
|
|
289
|
-
function
|
|
290
|
-
return /* @__PURE__ */ (0,
|
|
291
|
-
className:
|
|
313
|
+
function _e({ className: e, children: t, ...n }) {
|
|
314
|
+
return /* @__PURE__ */ (0, G.jsx)("div", {
|
|
315
|
+
className: P("rounded-xl border bg-card text-card-foreground shadow", e),
|
|
292
316
|
...n,
|
|
293
|
-
children: /* @__PURE__ */ (0,
|
|
317
|
+
children: /* @__PURE__ */ (0, G.jsx)("div", {
|
|
294
318
|
className: "p-6",
|
|
295
319
|
children: t
|
|
296
320
|
})
|
|
@@ -298,7 +322,7 @@ function me({ className: e, children: t, ...n }) {
|
|
|
298
322
|
}
|
|
299
323
|
//#endregion
|
|
300
324
|
//#region src/ResponsiveGrid.tsx
|
|
301
|
-
var
|
|
325
|
+
var ve = {
|
|
302
326
|
xs: {
|
|
303
327
|
1: "grid-cols-1",
|
|
304
328
|
2: "grid-cols-2",
|
|
@@ -348,11 +372,11 @@ var he = {
|
|
|
348
372
|
12: "2xl:grid-cols-12"
|
|
349
373
|
}
|
|
350
374
|
};
|
|
351
|
-
function
|
|
375
|
+
function ye(e) {
|
|
352
376
|
if (!e) return "grid-cols-1";
|
|
353
377
|
let t = [];
|
|
354
378
|
for (let [n, r] of Object.entries(e)) {
|
|
355
|
-
let e =
|
|
379
|
+
let e = ve[n];
|
|
356
380
|
if (e && r) {
|
|
357
381
|
let n = Object.keys(e).map(Number).reduce((e, t) => Math.abs(t - r) < Math.abs(e - r) ? t : e);
|
|
358
382
|
t.push(e[n]);
|
|
@@ -360,7 +384,7 @@ function H(e) {
|
|
|
360
384
|
}
|
|
361
385
|
return t.join(" ") || "grid-cols-1";
|
|
362
386
|
}
|
|
363
|
-
var
|
|
387
|
+
var be = {
|
|
364
388
|
0: "gap-0",
|
|
365
389
|
1: "gap-1",
|
|
366
390
|
2: "gap-2",
|
|
@@ -369,53 +393,53 @@ var ge = {
|
|
|
369
393
|
5: "gap-5",
|
|
370
394
|
6: "gap-6",
|
|
371
395
|
8: "gap-8"
|
|
372
|
-
},
|
|
373
|
-
className:
|
|
396
|
+
}, xe = ({ columns: e, gap: t = 4, className: n, children: r }) => /* @__PURE__ */ (0, G.jsx)("div", {
|
|
397
|
+
className: P("grid", ye(e), typeof t == "number" ? be[t] || `gap-${t}` : "", n),
|
|
374
398
|
children: r
|
|
375
399
|
});
|
|
376
400
|
//#endregion
|
|
377
401
|
//#region ../../node_modules/.pnpm/@dnd-kit+utilities@3.2.2_react@19.2.5/node_modules/@dnd-kit/utilities/dist/utilities.esm.js
|
|
378
|
-
function
|
|
402
|
+
function Se() {
|
|
379
403
|
var e = [...arguments];
|
|
380
404
|
return c(() => (t) => {
|
|
381
405
|
e.forEach((e) => e(t));
|
|
382
406
|
}, e);
|
|
383
407
|
}
|
|
384
|
-
var
|
|
385
|
-
function
|
|
408
|
+
var Ce = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0;
|
|
409
|
+
function we(e) {
|
|
386
410
|
let t = Object.prototype.toString.call(e);
|
|
387
411
|
return t === "[object Window]" || t === "[object global]";
|
|
388
412
|
}
|
|
389
|
-
function
|
|
413
|
+
function Te(e) {
|
|
390
414
|
return "nodeType" in e;
|
|
391
415
|
}
|
|
392
|
-
function
|
|
393
|
-
return e ?
|
|
416
|
+
function q(e) {
|
|
417
|
+
return e ? we(e) ? e : Te(e) ? e.ownerDocument?.defaultView ?? window : window : window;
|
|
394
418
|
}
|
|
395
|
-
function
|
|
396
|
-
let { Document: t } =
|
|
419
|
+
function Ee(e) {
|
|
420
|
+
let { Document: t } = q(e);
|
|
397
421
|
return e instanceof t;
|
|
398
422
|
}
|
|
399
|
-
function
|
|
400
|
-
return
|
|
423
|
+
function De(e) {
|
|
424
|
+
return we(e) ? !1 : e instanceof q(e).HTMLElement;
|
|
401
425
|
}
|
|
402
|
-
function
|
|
403
|
-
return e instanceof
|
|
426
|
+
function Oe(e) {
|
|
427
|
+
return e instanceof q(e).SVGElement;
|
|
404
428
|
}
|
|
405
|
-
function
|
|
406
|
-
return e ?
|
|
429
|
+
function ke(e) {
|
|
430
|
+
return e ? we(e) ? e.document : Te(e) ? Ee(e) ? e : De(e) || Oe(e) ? e.ownerDocument : document : document : document;
|
|
407
431
|
}
|
|
408
|
-
var
|
|
409
|
-
function
|
|
432
|
+
var J = Ce ? s : o;
|
|
433
|
+
function Ae(e) {
|
|
410
434
|
let t = u(e);
|
|
411
|
-
return
|
|
435
|
+
return J(() => {
|
|
412
436
|
t.current = e;
|
|
413
437
|
}), i(function() {
|
|
414
438
|
var e = [...arguments];
|
|
415
439
|
return t.current == null ? void 0 : t.current(...e);
|
|
416
440
|
}, []);
|
|
417
441
|
}
|
|
418
|
-
function
|
|
442
|
+
function je() {
|
|
419
443
|
let e = u(null);
|
|
420
444
|
return [i((t, n) => {
|
|
421
445
|
e.current = setInterval(t, n);
|
|
@@ -423,41 +447,41 @@ function we() {
|
|
|
423
447
|
e.current !== null && (clearInterval(e.current), e.current = null);
|
|
424
448
|
}, [])];
|
|
425
449
|
}
|
|
426
|
-
function
|
|
450
|
+
function Me(e, t) {
|
|
427
451
|
t === void 0 && (t = [e]);
|
|
428
452
|
let n = u(e);
|
|
429
|
-
return
|
|
453
|
+
return J(() => {
|
|
430
454
|
n.current !== e && (n.current = e);
|
|
431
455
|
}, t), n;
|
|
432
456
|
}
|
|
433
|
-
function
|
|
457
|
+
function Ne(e, t) {
|
|
434
458
|
let n = u();
|
|
435
459
|
return c(() => {
|
|
436
460
|
let t = e(n.current);
|
|
437
461
|
return n.current = t, t;
|
|
438
462
|
}, [...t]);
|
|
439
463
|
}
|
|
440
|
-
function
|
|
441
|
-
let t =
|
|
464
|
+
function Pe(e) {
|
|
465
|
+
let t = Ae(e), n = u(null);
|
|
442
466
|
return [n, i((e) => {
|
|
443
467
|
e !== n.current && t?.(e, n.current), n.current = e;
|
|
444
468
|
}, [])];
|
|
445
469
|
}
|
|
446
|
-
function
|
|
470
|
+
function Fe(e) {
|
|
447
471
|
let t = u();
|
|
448
472
|
return o(() => {
|
|
449
473
|
t.current = e;
|
|
450
474
|
}, [e]), t.current;
|
|
451
475
|
}
|
|
452
|
-
var
|
|
453
|
-
function
|
|
476
|
+
var Ie = {};
|
|
477
|
+
function Le(e, t) {
|
|
454
478
|
return c(() => {
|
|
455
479
|
if (t) return t;
|
|
456
|
-
let n =
|
|
457
|
-
return
|
|
480
|
+
let n = Ie[e] == null ? 0 : Ie[e] + 1;
|
|
481
|
+
return Ie[e] = n, e + "-" + n;
|
|
458
482
|
}, [e, t]);
|
|
459
483
|
}
|
|
460
|
-
function
|
|
484
|
+
function Re(e) {
|
|
461
485
|
return function(t) {
|
|
462
486
|
return [...arguments].slice(1).reduce((t, n) => {
|
|
463
487
|
let r = Object.entries(n);
|
|
@@ -469,22 +493,22 @@ function je(e) {
|
|
|
469
493
|
}, { ...t });
|
|
470
494
|
};
|
|
471
495
|
}
|
|
472
|
-
var
|
|
473
|
-
function
|
|
496
|
+
var ze = /* @__PURE__ */ Re(1), Be = /* @__PURE__ */ Re(-1);
|
|
497
|
+
function Ve(e) {
|
|
474
498
|
return "clientX" in e && "clientY" in e;
|
|
475
499
|
}
|
|
476
|
-
function
|
|
500
|
+
function He(e) {
|
|
477
501
|
if (!e) return !1;
|
|
478
|
-
let { KeyboardEvent: t } =
|
|
502
|
+
let { KeyboardEvent: t } = q(e.target);
|
|
479
503
|
return t && e instanceof t;
|
|
480
504
|
}
|
|
481
|
-
function
|
|
505
|
+
function Ue(e) {
|
|
482
506
|
if (!e) return !1;
|
|
483
|
-
let { TouchEvent: t } =
|
|
507
|
+
let { TouchEvent: t } = q(e.target);
|
|
484
508
|
return t && e instanceof t;
|
|
485
509
|
}
|
|
486
|
-
function
|
|
487
|
-
if (
|
|
510
|
+
function We(e) {
|
|
511
|
+
if (Ue(e)) {
|
|
488
512
|
if (e.touches && e.touches.length) {
|
|
489
513
|
let { clientX: t, clientY: n } = e.touches[0];
|
|
490
514
|
return {
|
|
@@ -499,12 +523,12 @@ function Le(e) {
|
|
|
499
523
|
};
|
|
500
524
|
}
|
|
501
525
|
}
|
|
502
|
-
return
|
|
526
|
+
return Ve(e) ? {
|
|
503
527
|
x: e.clientX,
|
|
504
528
|
y: e.clientY
|
|
505
529
|
} : null;
|
|
506
530
|
}
|
|
507
|
-
var
|
|
531
|
+
var Ge = /* @__PURE__ */ Object.freeze({
|
|
508
532
|
Translate: { toString(e) {
|
|
509
533
|
if (!e) return;
|
|
510
534
|
let { x: t, y: n } = e;
|
|
@@ -516,27 +540,27 @@ var Re = /* @__PURE__ */ Object.freeze({
|
|
|
516
540
|
return "scaleX(" + t + ") scaleY(" + n + ")";
|
|
517
541
|
} },
|
|
518
542
|
Transform: { toString(e) {
|
|
519
|
-
if (e) return [
|
|
543
|
+
if (e) return [Ge.Translate.toString(e), Ge.Scale.toString(e)].join(" ");
|
|
520
544
|
} },
|
|
521
545
|
Transition: { toString(e) {
|
|
522
546
|
let { property: t, duration: n, easing: r } = e;
|
|
523
547
|
return t + " " + n + "ms " + r;
|
|
524
548
|
} }
|
|
525
|
-
}),
|
|
526
|
-
function
|
|
527
|
-
return e.matches(
|
|
549
|
+
}), Ke = "a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";
|
|
550
|
+
function qe(e) {
|
|
551
|
+
return e.matches(Ke) ? e : e.querySelector(Ke);
|
|
528
552
|
}
|
|
529
553
|
//#endregion
|
|
530
554
|
//#region ../../node_modules/.pnpm/@dnd-kit+accessibility@3.1.1_react@19.2.5/node_modules/@dnd-kit/accessibility/dist/accessibility.esm.js
|
|
531
|
-
var
|
|
532
|
-
function
|
|
555
|
+
var Je = { display: "none" };
|
|
556
|
+
function Ye(e) {
|
|
533
557
|
let { id: n, value: r } = e;
|
|
534
558
|
return t.createElement("div", {
|
|
535
559
|
id: n,
|
|
536
|
-
style:
|
|
560
|
+
style: Je
|
|
537
561
|
}, r);
|
|
538
562
|
}
|
|
539
|
-
function
|
|
563
|
+
function Xe(e) {
|
|
540
564
|
let { id: n, announcement: r, ariaLiveType: i = "assertive" } = e;
|
|
541
565
|
return t.createElement("div", {
|
|
542
566
|
id: n,
|
|
@@ -559,7 +583,7 @@ function Ue(e) {
|
|
|
559
583
|
"aria-atomic": !0
|
|
560
584
|
}, r);
|
|
561
585
|
}
|
|
562
|
-
function
|
|
586
|
+
function Ze() {
|
|
563
587
|
let [e, t] = d("");
|
|
564
588
|
return {
|
|
565
589
|
announce: i((e) => {
|
|
@@ -570,22 +594,22 @@ function We() {
|
|
|
570
594
|
}
|
|
571
595
|
//#endregion
|
|
572
596
|
//#region ../../node_modules/.pnpm/@dnd-kit+core@6.3.1_react-dom@19.2.5_react@19.2.5__react@19.2.5/node_modules/@dnd-kit/core/dist/core.esm.js
|
|
573
|
-
var
|
|
574
|
-
function
|
|
575
|
-
let t = a(
|
|
597
|
+
var Qe = /* @__PURE__ */ n(null);
|
|
598
|
+
function $e(e) {
|
|
599
|
+
let t = a(Qe);
|
|
576
600
|
o(() => {
|
|
577
601
|
if (!t) throw Error("useDndMonitor must be used within a children of <DndContext>");
|
|
578
602
|
return t(e);
|
|
579
603
|
}, [e, t]);
|
|
580
604
|
}
|
|
581
|
-
function
|
|
605
|
+
function et() {
|
|
582
606
|
let [e] = d(() => /* @__PURE__ */ new Set()), t = i((t) => (e.add(t), () => e.delete(t)), [e]);
|
|
583
607
|
return [i((t) => {
|
|
584
608
|
let { type: n, event: r } = t;
|
|
585
609
|
e.forEach((e) => e[n]?.call(e, r));
|
|
586
610
|
}, [e]), t];
|
|
587
611
|
}
|
|
588
|
-
var
|
|
612
|
+
var tt = { draggable: "\n To pick up a draggable item, press the space bar.\n While dragging, use the arrow keys to move the item.\n Press space again to drop the item in its new position, or press escape to cancel.\n " }, nt = {
|
|
589
613
|
onDragStart(e) {
|
|
590
614
|
let { active: t } = e;
|
|
591
615
|
return "Picked up draggable item " + t.id + ".";
|
|
@@ -603,11 +627,11 @@ var Je = { draggable: "\n To pick up a draggable item, press the space bar.\n
|
|
|
603
627
|
return "Dragging was cancelled. Draggable item " + t.id + " was dropped.";
|
|
604
628
|
}
|
|
605
629
|
};
|
|
606
|
-
function
|
|
607
|
-
let { announcements: n =
|
|
630
|
+
function rt(e) {
|
|
631
|
+
let { announcements: n = nt, container: r, hiddenTextDescribedById: i, screenReaderInstructions: a = tt } = e, { announce: s, announcement: l } = Ze(), u = Le("DndLiveRegion"), [f, p] = d(!1);
|
|
608
632
|
if (o(() => {
|
|
609
633
|
p(!0);
|
|
610
|
-
}, []),
|
|
634
|
+
}, []), $e(c(() => ({
|
|
611
635
|
onDragStart(e) {
|
|
612
636
|
let { active: t } = e;
|
|
613
637
|
s(n.onDragStart({ active: t }));
|
|
@@ -641,62 +665,62 @@ function Xe(e) {
|
|
|
641
665
|
}));
|
|
642
666
|
}
|
|
643
667
|
}), [s, n])), !f) return null;
|
|
644
|
-
let m = t.createElement(t.Fragment, null, t.createElement(
|
|
668
|
+
let m = t.createElement(t.Fragment, null, t.createElement(Ye, {
|
|
645
669
|
id: i,
|
|
646
670
|
value: a.draggable
|
|
647
|
-
}), t.createElement(
|
|
671
|
+
}), t.createElement(Xe, {
|
|
648
672
|
id: u,
|
|
649
673
|
announcement: l
|
|
650
674
|
}));
|
|
651
|
-
return r ?
|
|
675
|
+
return r ? H(m, r) : m;
|
|
652
676
|
}
|
|
653
|
-
var
|
|
677
|
+
var Y;
|
|
654
678
|
(function(e) {
|
|
655
679
|
e.DragStart = "dragStart", e.DragMove = "dragMove", e.DragEnd = "dragEnd", e.DragCancel = "dragCancel", e.DragOver = "dragOver", e.RegisterDroppable = "registerDroppable", e.SetDroppableDisabled = "setDroppableDisabled", e.UnregisterDroppable = "unregisterDroppable";
|
|
656
|
-
})(
|
|
657
|
-
function
|
|
658
|
-
function
|
|
680
|
+
})(Y ||= {});
|
|
681
|
+
function it() {}
|
|
682
|
+
function at(e, t) {
|
|
659
683
|
return c(() => ({
|
|
660
684
|
sensor: e,
|
|
661
685
|
options: t ?? {}
|
|
662
686
|
}), [e, t]);
|
|
663
687
|
}
|
|
664
|
-
function
|
|
688
|
+
function ot() {
|
|
665
689
|
var e = [...arguments];
|
|
666
690
|
return c(() => [...e].filter((e) => e != null), [...e]);
|
|
667
691
|
}
|
|
668
|
-
var
|
|
692
|
+
var X = /* @__PURE__ */ Object.freeze({
|
|
669
693
|
x: 0,
|
|
670
694
|
y: 0
|
|
671
695
|
});
|
|
672
|
-
function
|
|
696
|
+
function st(e, t) {
|
|
673
697
|
return Math.sqrt((e.x - t.x) ** 2 + (e.y - t.y) ** 2);
|
|
674
698
|
}
|
|
675
|
-
function
|
|
699
|
+
function ct(e, t) {
|
|
676
700
|
let { data: { value: n } } = e, { data: { value: r } } = t;
|
|
677
701
|
return n - r;
|
|
678
702
|
}
|
|
679
|
-
function
|
|
703
|
+
function lt(e, t) {
|
|
680
704
|
let { data: { value: n } } = e, { data: { value: r } } = t;
|
|
681
705
|
return r - n;
|
|
682
706
|
}
|
|
683
|
-
function
|
|
707
|
+
function ut(e, t) {
|
|
684
708
|
if (!e || e.length === 0) return null;
|
|
685
709
|
let [n] = e;
|
|
686
710
|
return t ? n[t] : n;
|
|
687
711
|
}
|
|
688
|
-
function
|
|
712
|
+
function dt(e, t, n) {
|
|
689
713
|
return t === void 0 && (t = e.left), n === void 0 && (n = e.top), {
|
|
690
714
|
x: t + e.width * .5,
|
|
691
715
|
y: n + e.height * .5
|
|
692
716
|
};
|
|
693
717
|
}
|
|
694
|
-
var
|
|
695
|
-
let { collisionRect: t, droppableRects: n, droppableContainers: r } = e, i =
|
|
718
|
+
var ft = (e) => {
|
|
719
|
+
let { collisionRect: t, droppableRects: n, droppableContainers: r } = e, i = dt(t, t.left, t.top), a = [];
|
|
696
720
|
for (let e of r) {
|
|
697
721
|
let { id: t } = e, r = n.get(t);
|
|
698
722
|
if (r) {
|
|
699
|
-
let n =
|
|
723
|
+
let n = st(dt(r), i);
|
|
700
724
|
a.push({
|
|
701
725
|
id: t,
|
|
702
726
|
data: {
|
|
@@ -706,9 +730,9 @@ var at = (e) => {
|
|
|
706
730
|
});
|
|
707
731
|
}
|
|
708
732
|
}
|
|
709
|
-
return a.sort(
|
|
733
|
+
return a.sort(ct);
|
|
710
734
|
};
|
|
711
|
-
function
|
|
735
|
+
function pt(e, t) {
|
|
712
736
|
let n = Math.max(t.top, e.top), r = Math.max(t.left, e.left), i = Math.min(t.left + t.width, e.left + e.width), a = Math.min(t.top + t.height, e.top + e.height), o = i - r, s = a - n;
|
|
713
737
|
if (r < i && n < a) {
|
|
714
738
|
let n = t.width * t.height, r = e.width * e.height, i = o * s, a = i / (n + r - i);
|
|
@@ -716,12 +740,12 @@ function ot(e, t) {
|
|
|
716
740
|
}
|
|
717
741
|
return 0;
|
|
718
742
|
}
|
|
719
|
-
var
|
|
743
|
+
var mt = (e) => {
|
|
720
744
|
let { collisionRect: t, droppableRects: n, droppableContainers: r } = e, i = [];
|
|
721
745
|
for (let e of r) {
|
|
722
746
|
let { id: r } = e, a = n.get(r);
|
|
723
747
|
if (a) {
|
|
724
|
-
let n =
|
|
748
|
+
let n = pt(a, t);
|
|
725
749
|
n > 0 && i.push({
|
|
726
750
|
id: r,
|
|
727
751
|
data: {
|
|
@@ -731,22 +755,22 @@ var st = (e) => {
|
|
|
731
755
|
});
|
|
732
756
|
}
|
|
733
757
|
}
|
|
734
|
-
return i.sort(
|
|
758
|
+
return i.sort(lt);
|
|
735
759
|
};
|
|
736
|
-
function
|
|
760
|
+
function ht(e, t, n) {
|
|
737
761
|
return {
|
|
738
762
|
...e,
|
|
739
763
|
scaleX: t && n ? t.width / n.width : 1,
|
|
740
764
|
scaleY: t && n ? t.height / n.height : 1
|
|
741
765
|
};
|
|
742
766
|
}
|
|
743
|
-
function
|
|
767
|
+
function gt(e, t) {
|
|
744
768
|
return e && t ? {
|
|
745
769
|
x: e.left - t.left,
|
|
746
770
|
y: e.top - t.top
|
|
747
|
-
} :
|
|
771
|
+
} : X;
|
|
748
772
|
}
|
|
749
|
-
function
|
|
773
|
+
function _t(e) {
|
|
750
774
|
return function(t) {
|
|
751
775
|
return [...arguments].slice(1).reduce((t, n) => ({
|
|
752
776
|
...t,
|
|
@@ -757,8 +781,8 @@ function ut(e) {
|
|
|
757
781
|
}), { ...t });
|
|
758
782
|
};
|
|
759
783
|
}
|
|
760
|
-
var
|
|
761
|
-
function
|
|
784
|
+
var vt = /* @__PURE__ */ _t(1);
|
|
785
|
+
function yt(e) {
|
|
762
786
|
if (e.startsWith("matrix3d(")) {
|
|
763
787
|
let t = e.slice(9, -1).split(/, /);
|
|
764
788
|
return {
|
|
@@ -778,8 +802,8 @@ function ft(e) {
|
|
|
778
802
|
}
|
|
779
803
|
return null;
|
|
780
804
|
}
|
|
781
|
-
function
|
|
782
|
-
let r =
|
|
805
|
+
function bt(e, t, n) {
|
|
806
|
+
let r = yt(t);
|
|
783
807
|
if (!r) return e;
|
|
784
808
|
let { scaleX: i, scaleY: a, x: o, y: s } = r, c = e.left - o - (1 - i) * parseFloat(n), l = e.top - s - (1 - a) * parseFloat(n.slice(n.indexOf(" ") + 1)), u = i ? e.width / i : e.width, d = a ? e.height / a : e.height;
|
|
785
809
|
return {
|
|
@@ -791,13 +815,13 @@ function pt(e, t, n) {
|
|
|
791
815
|
left: c
|
|
792
816
|
};
|
|
793
817
|
}
|
|
794
|
-
var
|
|
795
|
-
function
|
|
796
|
-
t === void 0 && (t =
|
|
818
|
+
var xt = { ignoreTransform: !1 };
|
|
819
|
+
function St(e, t) {
|
|
820
|
+
t === void 0 && (t = xt);
|
|
797
821
|
let n = e.getBoundingClientRect();
|
|
798
822
|
if (t.ignoreTransform) {
|
|
799
|
-
let { transform: t, transformOrigin: r } =
|
|
800
|
-
t && (n =
|
|
823
|
+
let { transform: t, transformOrigin: r } = q(e).getComputedStyle(e);
|
|
824
|
+
t && (n = bt(n, t, r));
|
|
801
825
|
}
|
|
802
826
|
let { top: r, left: i, width: a, height: o, bottom: s, right: c } = n;
|
|
803
827
|
return {
|
|
@@ -809,10 +833,10 @@ function ht(e, t) {
|
|
|
809
833
|
right: c
|
|
810
834
|
};
|
|
811
835
|
}
|
|
812
|
-
function
|
|
813
|
-
return
|
|
836
|
+
function Ct(e) {
|
|
837
|
+
return St(e, { ignoreTransform: !0 });
|
|
814
838
|
}
|
|
815
|
-
function
|
|
839
|
+
function wt(e) {
|
|
816
840
|
let t = e.innerWidth, n = e.innerHeight;
|
|
817
841
|
return {
|
|
818
842
|
top: 0,
|
|
@@ -823,11 +847,11 @@ function _t(e) {
|
|
|
823
847
|
height: n
|
|
824
848
|
};
|
|
825
849
|
}
|
|
826
|
-
function
|
|
827
|
-
return t === void 0 && (t =
|
|
850
|
+
function Tt(e, t) {
|
|
851
|
+
return t === void 0 && (t = q(e).getComputedStyle(e)), t.position === "fixed";
|
|
828
852
|
}
|
|
829
|
-
function
|
|
830
|
-
t === void 0 && (t =
|
|
853
|
+
function Et(e, t) {
|
|
854
|
+
t === void 0 && (t = q(e).getComputedStyle(e));
|
|
831
855
|
let n = /(auto|scroll|overlay)/;
|
|
832
856
|
return [
|
|
833
857
|
"overflow",
|
|
@@ -838,48 +862,48 @@ function yt(e, t) {
|
|
|
838
862
|
return typeof r == "string" ? n.test(r) : !1;
|
|
839
863
|
});
|
|
840
864
|
}
|
|
841
|
-
function
|
|
865
|
+
function Dt(e, t) {
|
|
842
866
|
let n = [];
|
|
843
867
|
function r(i) {
|
|
844
868
|
if (t != null && n.length >= t || !i) return n;
|
|
845
|
-
if (
|
|
846
|
-
if (!
|
|
847
|
-
let a =
|
|
848
|
-
return i !== e &&
|
|
869
|
+
if (Ee(i) && i.scrollingElement != null && !n.includes(i.scrollingElement)) return n.push(i.scrollingElement), n;
|
|
870
|
+
if (!De(i) || Oe(i) || n.includes(i)) return n;
|
|
871
|
+
let a = q(e).getComputedStyle(i);
|
|
872
|
+
return i !== e && Et(i, a) && n.push(i), Tt(i, a) ? n : r(i.parentNode);
|
|
849
873
|
}
|
|
850
874
|
return e ? r(e) : n;
|
|
851
875
|
}
|
|
852
|
-
function
|
|
853
|
-
let [t] =
|
|
876
|
+
function Ot(e) {
|
|
877
|
+
let [t] = Dt(e, 1);
|
|
854
878
|
return t ?? null;
|
|
855
879
|
}
|
|
856
|
-
function
|
|
857
|
-
return !
|
|
880
|
+
function kt(e) {
|
|
881
|
+
return !Ce || !e ? null : we(e) ? e : Te(e) ? Ee(e) || e === ke(e).scrollingElement ? window : De(e) ? e : null : null;
|
|
858
882
|
}
|
|
859
|
-
function
|
|
860
|
-
return
|
|
883
|
+
function At(e) {
|
|
884
|
+
return we(e) ? e.scrollX : e.scrollLeft;
|
|
861
885
|
}
|
|
862
|
-
function
|
|
863
|
-
return
|
|
886
|
+
function jt(e) {
|
|
887
|
+
return we(e) ? e.scrollY : e.scrollTop;
|
|
864
888
|
}
|
|
865
|
-
function
|
|
889
|
+
function Mt(e) {
|
|
866
890
|
return {
|
|
867
|
-
x:
|
|
868
|
-
y:
|
|
891
|
+
x: At(e),
|
|
892
|
+
y: jt(e)
|
|
869
893
|
};
|
|
870
894
|
}
|
|
871
|
-
var
|
|
895
|
+
var Z;
|
|
872
896
|
(function(e) {
|
|
873
897
|
e[e.Forward = 1] = "Forward", e[e.Backward = -1] = "Backward";
|
|
874
|
-
})(
|
|
875
|
-
function
|
|
876
|
-
return !
|
|
898
|
+
})(Z ||= {});
|
|
899
|
+
function Nt(e) {
|
|
900
|
+
return !Ce || !e ? !1 : e === document.scrollingElement;
|
|
877
901
|
}
|
|
878
|
-
function
|
|
902
|
+
function Pt(e) {
|
|
879
903
|
let t = {
|
|
880
904
|
x: 0,
|
|
881
905
|
y: 0
|
|
882
|
-
}, n =
|
|
906
|
+
}, n = Nt(e) ? {
|
|
883
907
|
height: window.innerHeight,
|
|
884
908
|
width: window.innerWidth
|
|
885
909
|
} : {
|
|
@@ -898,14 +922,14 @@ function Dt(e) {
|
|
|
898
922
|
minScroll: t
|
|
899
923
|
};
|
|
900
924
|
}
|
|
901
|
-
var
|
|
925
|
+
var Ft = {
|
|
902
926
|
x: .2,
|
|
903
927
|
y: .2
|
|
904
928
|
};
|
|
905
|
-
function
|
|
929
|
+
function It(e, t, n, r, i) {
|
|
906
930
|
let { top: a, left: o, right: s, bottom: c } = n;
|
|
907
|
-
r === void 0 && (r = 10), i === void 0 && (i =
|
|
908
|
-
let { isTop: l, isBottom: u, isLeft: d, isRight: f } =
|
|
931
|
+
r === void 0 && (r = 10), i === void 0 && (i = Ft);
|
|
932
|
+
let { isTop: l, isBottom: u, isLeft: d, isRight: f } = Pt(e), p = {
|
|
909
933
|
x: 0,
|
|
910
934
|
y: 0
|
|
911
935
|
}, m = {
|
|
@@ -915,12 +939,12 @@ function kt(e, t, n, r, i) {
|
|
|
915
939
|
height: t.height * i.y,
|
|
916
940
|
width: t.width * i.x
|
|
917
941
|
};
|
|
918
|
-
return !l && a <= t.top + h.height ? (p.y =
|
|
942
|
+
return !l && a <= t.top + h.height ? (p.y = Z.Backward, m.y = r * Math.abs((t.top + h.height - a) / h.height)) : !u && c >= t.bottom - h.height && (p.y = Z.Forward, m.y = r * Math.abs((t.bottom - h.height - c) / h.height)), !f && s >= t.right - h.width ? (p.x = Z.Forward, m.x = r * Math.abs((t.right - h.width - s) / h.width)) : !d && o <= t.left + h.width && (p.x = Z.Backward, m.x = r * Math.abs((t.left + h.width - o) / h.width)), {
|
|
919
943
|
direction: p,
|
|
920
944
|
speed: m
|
|
921
945
|
};
|
|
922
946
|
}
|
|
923
|
-
function
|
|
947
|
+
function Lt(e) {
|
|
924
948
|
if (e === document.scrollingElement) {
|
|
925
949
|
let { innerWidth: e, innerHeight: t } = window;
|
|
926
950
|
return {
|
|
@@ -942,37 +966,37 @@ function At(e) {
|
|
|
942
966
|
height: e.clientHeight
|
|
943
967
|
};
|
|
944
968
|
}
|
|
945
|
-
function
|
|
946
|
-
return e.reduce((e, t) =>
|
|
969
|
+
function Rt(e) {
|
|
970
|
+
return e.reduce((e, t) => ze(e, Mt(t)), X);
|
|
947
971
|
}
|
|
948
|
-
function
|
|
949
|
-
return e.reduce((e, t) => e +
|
|
972
|
+
function zt(e) {
|
|
973
|
+
return e.reduce((e, t) => e + At(t), 0);
|
|
950
974
|
}
|
|
951
|
-
function
|
|
952
|
-
return e.reduce((e, t) => e +
|
|
975
|
+
function Bt(e) {
|
|
976
|
+
return e.reduce((e, t) => e + jt(t), 0);
|
|
953
977
|
}
|
|
954
|
-
function
|
|
955
|
-
if (t === void 0 && (t =
|
|
978
|
+
function Vt(e, t) {
|
|
979
|
+
if (t === void 0 && (t = St), !e) return;
|
|
956
980
|
let { top: n, left: r, bottom: i, right: a } = t(e);
|
|
957
|
-
|
|
981
|
+
Ot(e) && (i <= 0 || a <= 0 || n >= window.innerHeight || r >= window.innerWidth) && e.scrollIntoView({
|
|
958
982
|
block: "center",
|
|
959
983
|
inline: "center"
|
|
960
984
|
});
|
|
961
985
|
}
|
|
962
|
-
var
|
|
986
|
+
var Ht = [[
|
|
963
987
|
"x",
|
|
964
988
|
["left", "right"],
|
|
965
|
-
|
|
989
|
+
zt
|
|
966
990
|
], [
|
|
967
991
|
"y",
|
|
968
992
|
["top", "bottom"],
|
|
969
|
-
|
|
970
|
-
]],
|
|
993
|
+
Bt
|
|
994
|
+
]], Ut = class {
|
|
971
995
|
constructor(e, t) {
|
|
972
996
|
this.rect = void 0, this.width = void 0, this.height = void 0, this.top = void 0, this.bottom = void 0, this.right = void 0, this.left = void 0;
|
|
973
|
-
let n =
|
|
997
|
+
let n = Dt(t), r = Rt(n);
|
|
974
998
|
this.rect = { ...e }, this.width = e.width, this.height = e.height;
|
|
975
|
-
for (let [e, t, i] of
|
|
999
|
+
for (let [e, t, i] of Ht) for (let a of t) Object.defineProperty(this, a, {
|
|
976
1000
|
get: () => {
|
|
977
1001
|
let t = i(n), o = r[e] - t;
|
|
978
1002
|
return this.rect[a] + o;
|
|
@@ -981,7 +1005,7 @@ var Ft = [[
|
|
|
981
1005
|
});
|
|
982
1006
|
Object.defineProperty(this, "rect", { enumerable: !1 });
|
|
983
1007
|
}
|
|
984
|
-
},
|
|
1008
|
+
}, Wt = class {
|
|
985
1009
|
constructor(e) {
|
|
986
1010
|
this.target = void 0, this.listeners = [], this.removeAll = () => {
|
|
987
1011
|
this.listeners.forEach((e) => this.target?.removeEventListener(...e));
|
|
@@ -996,72 +1020,72 @@ var Ft = [[
|
|
|
996
1020
|
]);
|
|
997
1021
|
}
|
|
998
1022
|
};
|
|
999
|
-
function
|
|
1000
|
-
let { EventTarget: t } =
|
|
1001
|
-
return e instanceof t ? e :
|
|
1023
|
+
function Gt(e) {
|
|
1024
|
+
let { EventTarget: t } = q(e);
|
|
1025
|
+
return e instanceof t ? e : ke(e);
|
|
1002
1026
|
}
|
|
1003
|
-
function
|
|
1027
|
+
function Kt(e, t) {
|
|
1004
1028
|
let n = Math.abs(e.x), r = Math.abs(e.y);
|
|
1005
1029
|
return typeof t == "number" ? Math.sqrt(n ** 2 + r ** 2) > t : "x" in t && "y" in t ? n > t.x && r > t.y : "x" in t ? n > t.x : "y" in t ? r > t.y : !1;
|
|
1006
1030
|
}
|
|
1007
|
-
var
|
|
1031
|
+
var Q;
|
|
1008
1032
|
(function(e) {
|
|
1009
1033
|
e.Click = "click", e.DragStart = "dragstart", e.Keydown = "keydown", e.ContextMenu = "contextmenu", e.Resize = "resize", e.SelectionChange = "selectionchange", e.VisibilityChange = "visibilitychange";
|
|
1010
|
-
})(
|
|
1011
|
-
function
|
|
1034
|
+
})(Q ||= {});
|
|
1035
|
+
function qt(e) {
|
|
1012
1036
|
e.preventDefault();
|
|
1013
1037
|
}
|
|
1014
|
-
function
|
|
1038
|
+
function Jt(e) {
|
|
1015
1039
|
e.stopPropagation();
|
|
1016
1040
|
}
|
|
1017
|
-
var
|
|
1041
|
+
var $;
|
|
1018
1042
|
(function(e) {
|
|
1019
1043
|
e.Space = "Space", e.Down = "ArrowDown", e.Right = "ArrowRight", e.Left = "ArrowLeft", e.Up = "ArrowUp", e.Esc = "Escape", e.Enter = "Enter", e.Tab = "Tab";
|
|
1020
|
-
})(
|
|
1021
|
-
var
|
|
1022
|
-
start: [
|
|
1023
|
-
cancel: [
|
|
1044
|
+
})($ ||= {});
|
|
1045
|
+
var Yt = {
|
|
1046
|
+
start: [$.Space, $.Enter],
|
|
1047
|
+
cancel: [$.Esc],
|
|
1024
1048
|
end: [
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1049
|
+
$.Space,
|
|
1050
|
+
$.Enter,
|
|
1051
|
+
$.Tab
|
|
1028
1052
|
]
|
|
1029
|
-
},
|
|
1053
|
+
}, Xt = (e, t) => {
|
|
1030
1054
|
let { currentCoordinates: n } = t;
|
|
1031
1055
|
switch (e.code) {
|
|
1032
|
-
case
|
|
1056
|
+
case $.Right: return {
|
|
1033
1057
|
...n,
|
|
1034
1058
|
x: n.x + 25
|
|
1035
1059
|
};
|
|
1036
|
-
case
|
|
1060
|
+
case $.Left: return {
|
|
1037
1061
|
...n,
|
|
1038
1062
|
x: n.x - 25
|
|
1039
1063
|
};
|
|
1040
|
-
case
|
|
1064
|
+
case $.Down: return {
|
|
1041
1065
|
...n,
|
|
1042
1066
|
y: n.y + 25
|
|
1043
1067
|
};
|
|
1044
|
-
case
|
|
1068
|
+
case $.Up: return {
|
|
1045
1069
|
...n,
|
|
1046
1070
|
y: n.y - 25
|
|
1047
1071
|
};
|
|
1048
1072
|
}
|
|
1049
|
-
},
|
|
1073
|
+
}, Zt = class {
|
|
1050
1074
|
constructor(e) {
|
|
1051
1075
|
this.props = void 0, this.autoScrollEnabled = !1, this.referenceCoordinates = void 0, this.listeners = void 0, this.windowListeners = void 0, this.props = e;
|
|
1052
1076
|
let { event: { target: t } } = e;
|
|
1053
|
-
this.props = e, this.listeners = new
|
|
1077
|
+
this.props = e, this.listeners = new Wt(ke(t)), this.windowListeners = new Wt(q(t)), this.handleKeyDown = this.handleKeyDown.bind(this), this.handleCancel = this.handleCancel.bind(this), this.attach();
|
|
1054
1078
|
}
|
|
1055
1079
|
attach() {
|
|
1056
|
-
this.handleStart(), this.windowListeners.add(
|
|
1080
|
+
this.handleStart(), this.windowListeners.add(Q.Resize, this.handleCancel), this.windowListeners.add(Q.VisibilityChange, this.handleCancel), setTimeout(() => this.listeners.add(Q.Keydown, this.handleKeyDown));
|
|
1057
1081
|
}
|
|
1058
1082
|
handleStart() {
|
|
1059
1083
|
let { activeNode: e, onStart: t } = this.props, n = e.node.current;
|
|
1060
|
-
n &&
|
|
1084
|
+
n && Vt(n), t(X);
|
|
1061
1085
|
}
|
|
1062
1086
|
handleKeyDown(e) {
|
|
1063
|
-
if (
|
|
1064
|
-
let { active: t, context: n, options: r } = this.props, { keyboardCodes: i =
|
|
1087
|
+
if (He(e)) {
|
|
1088
|
+
let { active: t, context: n, options: r } = this.props, { keyboardCodes: i = Yt, coordinateGetter: a = Xt, scrollBehavior: o = "smooth" } = r, { code: s } = e;
|
|
1065
1089
|
if (i.end.includes(s)) {
|
|
1066
1090
|
this.handleEnd(e);
|
|
1067
1091
|
return;
|
|
@@ -1073,7 +1097,7 @@ var Ht = {
|
|
|
1073
1097
|
let { collisionRect: c } = n.current, l = c ? {
|
|
1074
1098
|
x: c.left,
|
|
1075
1099
|
y: c.top
|
|
1076
|
-
} :
|
|
1100
|
+
} : X;
|
|
1077
1101
|
this.referenceCoordinates ||= l;
|
|
1078
1102
|
let u = a(e, {
|
|
1079
1103
|
active: t,
|
|
@@ -1081,17 +1105,17 @@ var Ht = {
|
|
|
1081
1105
|
currentCoordinates: l
|
|
1082
1106
|
});
|
|
1083
1107
|
if (u) {
|
|
1084
|
-
let t =
|
|
1108
|
+
let t = Be(u, l), r = {
|
|
1085
1109
|
x: 0,
|
|
1086
1110
|
y: 0
|
|
1087
1111
|
}, { scrollableAncestors: i } = n.current;
|
|
1088
1112
|
for (let n of i) {
|
|
1089
|
-
let i = e.code, { isTop: a, isRight: s, isLeft: c, isBottom: l, maxScroll: d, minScroll: f } =
|
|
1090
|
-
x: Math.min(i ===
|
|
1091
|
-
y: Math.min(i ===
|
|
1092
|
-
}, h = i ===
|
|
1113
|
+
let i = e.code, { isTop: a, isRight: s, isLeft: c, isBottom: l, maxScroll: d, minScroll: f } = Pt(n), p = Lt(n), m = {
|
|
1114
|
+
x: Math.min(i === $.Right ? p.right - p.width / 2 : p.right, Math.max(i === $.Right ? p.left : p.left + p.width / 2, u.x)),
|
|
1115
|
+
y: Math.min(i === $.Down ? p.bottom - p.height / 2 : p.bottom, Math.max(i === $.Down ? p.top : p.top + p.height / 2, u.y))
|
|
1116
|
+
}, h = i === $.Right && !s || i === $.Left && !c, g = i === $.Down && !l || i === $.Up && !a;
|
|
1093
1117
|
if (h && m.x !== u.x) {
|
|
1094
|
-
let e = n.scrollLeft + t.x, a = i ===
|
|
1118
|
+
let e = n.scrollLeft + t.x, a = i === $.Right && e <= d.x || i === $.Left && e >= f.x;
|
|
1095
1119
|
if (a && !t.y) {
|
|
1096
1120
|
n.scrollTo({
|
|
1097
1121
|
left: e,
|
|
@@ -1099,13 +1123,13 @@ var Ht = {
|
|
|
1099
1123
|
});
|
|
1100
1124
|
return;
|
|
1101
1125
|
}
|
|
1102
|
-
a ? r.x = n.scrollLeft - e : r.x = i ===
|
|
1126
|
+
a ? r.x = n.scrollLeft - e : r.x = i === $.Right ? n.scrollLeft - d.x : n.scrollLeft - f.x, r.x && n.scrollBy({
|
|
1103
1127
|
left: -r.x,
|
|
1104
1128
|
behavior: o
|
|
1105
1129
|
});
|
|
1106
1130
|
break;
|
|
1107
1131
|
} else if (g && m.y !== u.y) {
|
|
1108
|
-
let e = n.scrollTop + t.y, a = i ===
|
|
1132
|
+
let e = n.scrollTop + t.y, a = i === $.Down && e <= d.y || i === $.Up && e >= f.y;
|
|
1109
1133
|
if (a && !t.x) {
|
|
1110
1134
|
n.scrollTo({
|
|
1111
1135
|
top: e,
|
|
@@ -1113,14 +1137,14 @@ var Ht = {
|
|
|
1113
1137
|
});
|
|
1114
1138
|
return;
|
|
1115
1139
|
}
|
|
1116
|
-
a ? r.y = n.scrollTop - e : r.y = i ===
|
|
1140
|
+
a ? r.y = n.scrollTop - e : r.y = i === $.Down ? n.scrollTop - d.y : n.scrollTop - f.y, r.y && n.scrollBy({
|
|
1117
1141
|
top: -r.y,
|
|
1118
1142
|
behavior: o
|
|
1119
1143
|
});
|
|
1120
1144
|
break;
|
|
1121
1145
|
}
|
|
1122
1146
|
}
|
|
1123
|
-
this.handleMove(e,
|
|
1147
|
+
this.handleMove(e, ze(Be(u, this.referenceCoordinates), r));
|
|
1124
1148
|
}
|
|
1125
1149
|
}
|
|
1126
1150
|
}
|
|
@@ -1140,10 +1164,10 @@ var Ht = {
|
|
|
1140
1164
|
this.listeners.removeAll(), this.windowListeners.removeAll();
|
|
1141
1165
|
}
|
|
1142
1166
|
};
|
|
1143
|
-
|
|
1167
|
+
Zt.activators = [{
|
|
1144
1168
|
eventName: "onKeyDown",
|
|
1145
1169
|
handler: (e, t, n) => {
|
|
1146
|
-
let { keyboardCodes: r =
|
|
1170
|
+
let { keyboardCodes: r = Yt, onActivation: i } = t, { active: a } = n, { code: o } = e.nativeEvent;
|
|
1147
1171
|
if (r.start.includes(o)) {
|
|
1148
1172
|
let t = a.activatorNode.current;
|
|
1149
1173
|
return t && e.target !== t ? !1 : (e.preventDefault(), i?.({ event: e.nativeEvent }), !0);
|
|
@@ -1151,31 +1175,31 @@ Wt.activators = [{
|
|
|
1151
1175
|
return !1;
|
|
1152
1176
|
}
|
|
1153
1177
|
}];
|
|
1154
|
-
function
|
|
1178
|
+
function Qt(e) {
|
|
1155
1179
|
return !!(e && "distance" in e);
|
|
1156
1180
|
}
|
|
1157
|
-
function
|
|
1181
|
+
function $t(e) {
|
|
1158
1182
|
return !!(e && "delay" in e);
|
|
1159
1183
|
}
|
|
1160
|
-
var
|
|
1184
|
+
var en = class {
|
|
1161
1185
|
constructor(e, t, n) {
|
|
1162
|
-
n === void 0 && (n =
|
|
1186
|
+
n === void 0 && (n = Gt(e.event.target)), this.props = void 0, this.events = void 0, this.autoScrollEnabled = !0, this.document = void 0, this.activated = !1, this.initialCoordinates = void 0, this.timeoutId = null, this.listeners = void 0, this.documentListeners = void 0, this.windowListeners = void 0, this.props = e, this.events = t;
|
|
1163
1187
|
let { event: r } = e, { target: i } = r;
|
|
1164
|
-
this.props = e, this.events = t, this.document =
|
|
1188
|
+
this.props = e, this.events = t, this.document = ke(i), this.documentListeners = new Wt(this.document), this.listeners = new Wt(n), this.windowListeners = new Wt(q(i)), this.initialCoordinates = We(r) ?? X, this.handleStart = this.handleStart.bind(this), this.handleMove = this.handleMove.bind(this), this.handleEnd = this.handleEnd.bind(this), this.handleCancel = this.handleCancel.bind(this), this.handleKeydown = this.handleKeydown.bind(this), this.removeTextSelection = this.removeTextSelection.bind(this), this.attach();
|
|
1165
1189
|
}
|
|
1166
1190
|
attach() {
|
|
1167
1191
|
let { events: e, props: { options: { activationConstraint: t, bypassActivationConstraint: n } } } = this;
|
|
1168
|
-
if (this.listeners.add(e.move.name, this.handleMove, { passive: !1 }), this.listeners.add(e.end.name, this.handleEnd), e.cancel && this.listeners.add(e.cancel.name, this.handleCancel), this.windowListeners.add(
|
|
1192
|
+
if (this.listeners.add(e.move.name, this.handleMove, { passive: !1 }), this.listeners.add(e.end.name, this.handleEnd), e.cancel && this.listeners.add(e.cancel.name, this.handleCancel), this.windowListeners.add(Q.Resize, this.handleCancel), this.windowListeners.add(Q.DragStart, qt), this.windowListeners.add(Q.VisibilityChange, this.handleCancel), this.windowListeners.add(Q.ContextMenu, qt), this.documentListeners.add(Q.Keydown, this.handleKeydown), t) {
|
|
1169
1193
|
if (n != null && n({
|
|
1170
1194
|
event: this.props.event,
|
|
1171
1195
|
activeNode: this.props.activeNode,
|
|
1172
1196
|
options: this.props.options
|
|
1173
1197
|
})) return this.handleStart();
|
|
1174
|
-
if (
|
|
1198
|
+
if ($t(t)) {
|
|
1175
1199
|
this.timeoutId = setTimeout(this.handleStart, t.delay), this.handlePending(t);
|
|
1176
1200
|
return;
|
|
1177
1201
|
}
|
|
1178
|
-
if (
|
|
1202
|
+
if (Qt(t)) {
|
|
1179
1203
|
this.handlePending(t);
|
|
1180
1204
|
return;
|
|
1181
1205
|
}
|
|
@@ -1191,18 +1215,18 @@ var qt = class {
|
|
|
1191
1215
|
}
|
|
1192
1216
|
handleStart() {
|
|
1193
1217
|
let { initialCoordinates: e } = this, { onStart: t } = this.props;
|
|
1194
|
-
e && (this.activated = !0, this.documentListeners.add(
|
|
1218
|
+
e && (this.activated = !0, this.documentListeners.add(Q.Click, Jt, { capture: !0 }), this.removeTextSelection(), this.documentListeners.add(Q.SelectionChange, this.removeTextSelection), t(e));
|
|
1195
1219
|
}
|
|
1196
1220
|
handleMove(e) {
|
|
1197
1221
|
let { activated: t, initialCoordinates: n, props: r } = this, { onMove: i, options: { activationConstraint: a } } = r;
|
|
1198
1222
|
if (!n) return;
|
|
1199
|
-
let o =
|
|
1223
|
+
let o = We(e) ?? X, s = Be(n, o);
|
|
1200
1224
|
if (!t && a) {
|
|
1201
|
-
if (
|
|
1202
|
-
if (a.tolerance != null &&
|
|
1203
|
-
if (
|
|
1225
|
+
if (Qt(a)) {
|
|
1226
|
+
if (a.tolerance != null && Kt(s, a.tolerance)) return this.handleCancel();
|
|
1227
|
+
if (Kt(s, a.distance)) return this.handleStart();
|
|
1204
1228
|
}
|
|
1205
|
-
if (
|
|
1229
|
+
if ($t(a) && Kt(s, a.tolerance)) return this.handleCancel();
|
|
1206
1230
|
this.handlePending(a, s);
|
|
1207
1231
|
return;
|
|
1208
1232
|
}
|
|
@@ -1217,86 +1241,86 @@ var qt = class {
|
|
|
1217
1241
|
this.detach(), this.activated || e(this.props.active), t();
|
|
1218
1242
|
}
|
|
1219
1243
|
handleKeydown(e) {
|
|
1220
|
-
e.code ===
|
|
1244
|
+
e.code === $.Esc && this.handleCancel();
|
|
1221
1245
|
}
|
|
1222
1246
|
removeTextSelection() {
|
|
1223
1247
|
var e;
|
|
1224
1248
|
(e = this.document.getSelection()) == null || e.removeAllRanges();
|
|
1225
1249
|
}
|
|
1226
|
-
},
|
|
1250
|
+
}, tn = {
|
|
1227
1251
|
cancel: { name: "pointercancel" },
|
|
1228
1252
|
move: { name: "pointermove" },
|
|
1229
1253
|
end: { name: "pointerup" }
|
|
1230
|
-
},
|
|
1254
|
+
}, nn = class extends en {
|
|
1231
1255
|
constructor(e) {
|
|
1232
|
-
let { event: t } = e, n =
|
|
1233
|
-
super(e,
|
|
1256
|
+
let { event: t } = e, n = ke(t.target);
|
|
1257
|
+
super(e, tn, n);
|
|
1234
1258
|
}
|
|
1235
1259
|
};
|
|
1236
|
-
|
|
1260
|
+
nn.activators = [{
|
|
1237
1261
|
eventName: "onPointerDown",
|
|
1238
1262
|
handler: (e, t) => {
|
|
1239
1263
|
let { nativeEvent: n } = e, { onActivation: r } = t;
|
|
1240
1264
|
return !n.isPrimary || n.button !== 0 ? !1 : (r?.({ event: n }), !0);
|
|
1241
1265
|
}
|
|
1242
1266
|
}];
|
|
1243
|
-
var
|
|
1267
|
+
var rn = {
|
|
1244
1268
|
move: { name: "mousemove" },
|
|
1245
1269
|
end: { name: "mouseup" }
|
|
1246
|
-
},
|
|
1270
|
+
}, an;
|
|
1247
1271
|
(function(e) {
|
|
1248
1272
|
e[e.RightClick = 2] = "RightClick";
|
|
1249
|
-
})(
|
|
1250
|
-
var
|
|
1273
|
+
})(an ||= {});
|
|
1274
|
+
var on = class extends en {
|
|
1251
1275
|
constructor(e) {
|
|
1252
|
-
super(e,
|
|
1276
|
+
super(e, rn, ke(e.event.target));
|
|
1253
1277
|
}
|
|
1254
1278
|
};
|
|
1255
|
-
|
|
1279
|
+
on.activators = [{
|
|
1256
1280
|
eventName: "onMouseDown",
|
|
1257
1281
|
handler: (e, t) => {
|
|
1258
1282
|
let { nativeEvent: n } = e, { onActivation: r } = t;
|
|
1259
|
-
return n.button ===
|
|
1283
|
+
return n.button === an.RightClick ? !1 : (r?.({ event: n }), !0);
|
|
1260
1284
|
}
|
|
1261
1285
|
}];
|
|
1262
|
-
var
|
|
1286
|
+
var sn = {
|
|
1263
1287
|
cancel: { name: "touchcancel" },
|
|
1264
1288
|
move: { name: "touchmove" },
|
|
1265
1289
|
end: { name: "touchend" }
|
|
1266
|
-
},
|
|
1290
|
+
}, cn = class extends en {
|
|
1267
1291
|
constructor(e) {
|
|
1268
|
-
super(e,
|
|
1292
|
+
super(e, sn);
|
|
1269
1293
|
}
|
|
1270
1294
|
static setup() {
|
|
1271
|
-
return window.addEventListener(
|
|
1295
|
+
return window.addEventListener(sn.move.name, e, {
|
|
1272
1296
|
capture: !1,
|
|
1273
1297
|
passive: !1
|
|
1274
1298
|
}), function() {
|
|
1275
|
-
window.removeEventListener(
|
|
1299
|
+
window.removeEventListener(sn.move.name, e);
|
|
1276
1300
|
};
|
|
1277
1301
|
function e() {}
|
|
1278
1302
|
}
|
|
1279
1303
|
};
|
|
1280
|
-
|
|
1304
|
+
cn.activators = [{
|
|
1281
1305
|
eventName: "onTouchStart",
|
|
1282
1306
|
handler: (e, t) => {
|
|
1283
1307
|
let { nativeEvent: n } = e, { onActivation: r } = t, { touches: i } = n;
|
|
1284
1308
|
return i.length > 1 ? !1 : (r?.({ event: n }), !0);
|
|
1285
1309
|
}
|
|
1286
1310
|
}];
|
|
1287
|
-
var
|
|
1311
|
+
var ln;
|
|
1288
1312
|
(function(e) {
|
|
1289
1313
|
e[e.Pointer = 0] = "Pointer", e[e.DraggableRect = 1] = "DraggableRect";
|
|
1290
|
-
})(
|
|
1291
|
-
var
|
|
1314
|
+
})(ln ||= {});
|
|
1315
|
+
var un;
|
|
1292
1316
|
(function(e) {
|
|
1293
1317
|
e[e.TreeOrder = 0] = "TreeOrder", e[e.ReversedTreeOrder = 1] = "ReversedTreeOrder";
|
|
1294
|
-
})(
|
|
1295
|
-
function
|
|
1296
|
-
let { acceleration: t, activator: n =
|
|
1318
|
+
})(un ||= {});
|
|
1319
|
+
function dn(e) {
|
|
1320
|
+
let { acceleration: t, activator: n = ln.Pointer, canScroll: r, draggingRect: a, enabled: s, interval: l = 5, order: d = un.TreeOrder, pointerCoordinates: f, scrollableAncestors: p, scrollableAncestorRects: m, delta: h, threshold: g } = e, _ = pn({
|
|
1297
1321
|
delta: h,
|
|
1298
1322
|
disabled: !s
|
|
1299
|
-
}), [v, y] =
|
|
1323
|
+
}), [v, y] = je(), b = u({
|
|
1300
1324
|
x: 0,
|
|
1301
1325
|
y: 0
|
|
1302
1326
|
}), x = u({
|
|
@@ -1304,13 +1328,13 @@ function rn(e) {
|
|
|
1304
1328
|
y: 0
|
|
1305
1329
|
}), S = c(() => {
|
|
1306
1330
|
switch (n) {
|
|
1307
|
-
case
|
|
1331
|
+
case ln.Pointer: return f ? {
|
|
1308
1332
|
top: f.y,
|
|
1309
1333
|
bottom: f.y,
|
|
1310
1334
|
left: f.x,
|
|
1311
1335
|
right: f.x
|
|
1312
1336
|
} : null;
|
|
1313
|
-
case
|
|
1337
|
+
case ln.DraggableRect: return a;
|
|
1314
1338
|
}
|
|
1315
1339
|
}, [
|
|
1316
1340
|
n,
|
|
@@ -1321,7 +1345,7 @@ function rn(e) {
|
|
|
1321
1345
|
if (!e) return;
|
|
1322
1346
|
let t = b.current.x * x.current.x, n = b.current.y * x.current.y;
|
|
1323
1347
|
e.scrollBy(t, n);
|
|
1324
|
-
}, []), T = c(() => d ===
|
|
1348
|
+
}, []), T = c(() => d === un.TreeOrder ? [...p].reverse() : p, [d, p]);
|
|
1325
1349
|
o(() => {
|
|
1326
1350
|
if (!s || !p.length || !S) {
|
|
1327
1351
|
y();
|
|
@@ -1331,7 +1355,7 @@ function rn(e) {
|
|
|
1331
1355
|
if (r?.(e) === !1) continue;
|
|
1332
1356
|
let n = m[p.indexOf(e)];
|
|
1333
1357
|
if (!n) continue;
|
|
1334
|
-
let { direction: i, speed: a } =
|
|
1358
|
+
let { direction: i, speed: a } = It(e, n, S, t, g);
|
|
1335
1359
|
for (let e of ["x", "y"]) _[e][i[e]] || (a[e] = 0, i[e] = 0);
|
|
1336
1360
|
if (a.x > 0 || a.y > 0) {
|
|
1337
1361
|
y(), C.current = e, v(w, l), b.current = a, x.current = i;
|
|
@@ -1361,32 +1385,32 @@ function rn(e) {
|
|
|
1361
1385
|
JSON.stringify(g)
|
|
1362
1386
|
]);
|
|
1363
1387
|
}
|
|
1364
|
-
var
|
|
1388
|
+
var fn = {
|
|
1365
1389
|
x: {
|
|
1366
|
-
[
|
|
1367
|
-
[
|
|
1390
|
+
[Z.Backward]: !1,
|
|
1391
|
+
[Z.Forward]: !1
|
|
1368
1392
|
},
|
|
1369
1393
|
y: {
|
|
1370
|
-
[
|
|
1371
|
-
[
|
|
1394
|
+
[Z.Backward]: !1,
|
|
1395
|
+
[Z.Forward]: !1
|
|
1372
1396
|
}
|
|
1373
1397
|
};
|
|
1374
|
-
function
|
|
1375
|
-
let { delta: t, disabled: n } = e, r =
|
|
1376
|
-
return
|
|
1377
|
-
if (n || !r || !e) return
|
|
1398
|
+
function pn(e) {
|
|
1399
|
+
let { delta: t, disabled: n } = e, r = Fe(t);
|
|
1400
|
+
return Ne((e) => {
|
|
1401
|
+
if (n || !r || !e) return fn;
|
|
1378
1402
|
let i = {
|
|
1379
1403
|
x: Math.sign(t.x - r.x),
|
|
1380
1404
|
y: Math.sign(t.y - r.y)
|
|
1381
1405
|
};
|
|
1382
1406
|
return {
|
|
1383
1407
|
x: {
|
|
1384
|
-
[
|
|
1385
|
-
[
|
|
1408
|
+
[Z.Backward]: e.x[Z.Backward] || i.x === -1,
|
|
1409
|
+
[Z.Forward]: e.x[Z.Forward] || i.x === 1
|
|
1386
1410
|
},
|
|
1387
1411
|
y: {
|
|
1388
|
-
[
|
|
1389
|
-
[
|
|
1412
|
+
[Z.Backward]: e.y[Z.Backward] || i.y === -1,
|
|
1413
|
+
[Z.Forward]: e.y[Z.Forward] || i.y === 1
|
|
1390
1414
|
}
|
|
1391
1415
|
};
|
|
1392
1416
|
}, [
|
|
@@ -1395,11 +1419,11 @@ function on(e) {
|
|
|
1395
1419
|
r
|
|
1396
1420
|
]);
|
|
1397
1421
|
}
|
|
1398
|
-
function
|
|
1422
|
+
function mn(e, t) {
|
|
1399
1423
|
let n = t == null ? void 0 : e.get(t), r = n ? n.node.current : null;
|
|
1400
|
-
return
|
|
1424
|
+
return Ne((e) => t == null ? null : r ?? e ?? null, [r, t]);
|
|
1401
1425
|
}
|
|
1402
|
-
function
|
|
1426
|
+
function hn(e, t) {
|
|
1403
1427
|
return c(() => e.reduce((e, n) => {
|
|
1404
1428
|
let { sensor: r } = n, i = r.activators.map((e) => ({
|
|
1405
1429
|
eventName: e.eventName,
|
|
@@ -1408,21 +1432,21 @@ function cn(e, t) {
|
|
|
1408
1432
|
return [...e, ...i];
|
|
1409
1433
|
}, []), [e, t]);
|
|
1410
1434
|
}
|
|
1411
|
-
var
|
|
1435
|
+
var gn;
|
|
1412
1436
|
(function(e) {
|
|
1413
1437
|
e[e.Always = 0] = "Always", e[e.BeforeDragging = 1] = "BeforeDragging", e[e.WhileDragging = 2] = "WhileDragging";
|
|
1414
|
-
})(
|
|
1415
|
-
var
|
|
1438
|
+
})(gn ||= {});
|
|
1439
|
+
var _n;
|
|
1416
1440
|
(function(e) {
|
|
1417
1441
|
e.Optimized = "optimized";
|
|
1418
|
-
})(
|
|
1419
|
-
var
|
|
1420
|
-
function
|
|
1421
|
-
let { dragging: n, dependencies: r, config: a } = t, [s, c] = d(null), { frequency: l, measure: f, strategy: p } = a, m = u(e), h = b(), g =
|
|
1442
|
+
})(_n ||= {});
|
|
1443
|
+
var vn = /* @__PURE__ */ new Map();
|
|
1444
|
+
function yn(e, t) {
|
|
1445
|
+
let { dragging: n, dependencies: r, config: a } = t, [s, c] = d(null), { frequency: l, measure: f, strategy: p } = a, m = u(e), h = b(), g = Me(h), _ = i(function(e) {
|
|
1422
1446
|
e === void 0 && (e = []), !g.current && c((t) => t === null ? e : t.concat(e.filter((e) => !t.includes(e))));
|
|
1423
|
-
}, [g]), v = u(null), y =
|
|
1424
|
-
if (h && !n) return
|
|
1425
|
-
if (!t || t ===
|
|
1447
|
+
}, [g]), v = u(null), y = Ne((t) => {
|
|
1448
|
+
if (h && !n) return vn;
|
|
1449
|
+
if (!t || t === vn || m.current !== e || s != null) {
|
|
1426
1450
|
let t = /* @__PURE__ */ new Map();
|
|
1427
1451
|
for (let n of e) {
|
|
1428
1452
|
if (!n) continue;
|
|
@@ -1430,7 +1454,7 @@ function fn(e, t) {
|
|
|
1430
1454
|
t.set(n.id, n.rect.current);
|
|
1431
1455
|
continue;
|
|
1432
1456
|
}
|
|
1433
|
-
let e = n.node.current, r = e ? new
|
|
1457
|
+
let e = n.node.current, r = e ? new Ut(f(e), e) : null;
|
|
1434
1458
|
n.rect.current = r, r && t.set(n.id, r);
|
|
1435
1459
|
}
|
|
1436
1460
|
return t;
|
|
@@ -1465,39 +1489,39 @@ function fn(e, t) {
|
|
|
1465
1489
|
};
|
|
1466
1490
|
function b() {
|
|
1467
1491
|
switch (p) {
|
|
1468
|
-
case
|
|
1469
|
-
case
|
|
1492
|
+
case gn.Always: return !1;
|
|
1493
|
+
case gn.BeforeDragging: return n;
|
|
1470
1494
|
default: return !n;
|
|
1471
1495
|
}
|
|
1472
1496
|
}
|
|
1473
1497
|
}
|
|
1474
|
-
function
|
|
1475
|
-
return
|
|
1498
|
+
function bn(e, t) {
|
|
1499
|
+
return Ne((n) => e ? n || (typeof t == "function" ? t(e) : e) : null, [t, e]);
|
|
1476
1500
|
}
|
|
1477
|
-
function
|
|
1478
|
-
return
|
|
1501
|
+
function xn(e, t) {
|
|
1502
|
+
return bn(e, t);
|
|
1479
1503
|
}
|
|
1480
|
-
function
|
|
1481
|
-
let { callback: t, disabled: n } = e, r =
|
|
1504
|
+
function Sn(e) {
|
|
1505
|
+
let { callback: t, disabled: n } = e, r = Ae(t), i = c(() => {
|
|
1482
1506
|
if (n || typeof window > "u" || window.MutationObserver === void 0) return;
|
|
1483
1507
|
let { MutationObserver: e } = window;
|
|
1484
1508
|
return new e(r);
|
|
1485
1509
|
}, [r, n]);
|
|
1486
1510
|
return o(() => () => i?.disconnect(), [i]), i;
|
|
1487
1511
|
}
|
|
1488
|
-
function
|
|
1489
|
-
let { callback: t, disabled: n } = e, r =
|
|
1512
|
+
function Cn(e) {
|
|
1513
|
+
let { callback: t, disabled: n } = e, r = Ae(t), i = c(() => {
|
|
1490
1514
|
if (n || typeof window > "u" || window.ResizeObserver === void 0) return;
|
|
1491
1515
|
let { ResizeObserver: e } = window;
|
|
1492
1516
|
return new e(r);
|
|
1493
1517
|
}, [n]);
|
|
1494
1518
|
return o(() => () => i?.disconnect(), [i]), i;
|
|
1495
1519
|
}
|
|
1496
|
-
function
|
|
1497
|
-
return new
|
|
1520
|
+
function wn(e) {
|
|
1521
|
+
return new Ut(St(e), e);
|
|
1498
1522
|
}
|
|
1499
|
-
function
|
|
1500
|
-
t === void 0 && (t =
|
|
1523
|
+
function Tn(e, t, n) {
|
|
1524
|
+
t === void 0 && (t = wn);
|
|
1501
1525
|
let [r, i] = d(null);
|
|
1502
1526
|
function a() {
|
|
1503
1527
|
i((r) => {
|
|
@@ -1507,7 +1531,7 @@ function vn(e, t, n) {
|
|
|
1507
1531
|
return JSON.stringify(r) === JSON.stringify(i) ? r : i;
|
|
1508
1532
|
});
|
|
1509
1533
|
}
|
|
1510
|
-
let o =
|
|
1534
|
+
let o = Sn({ callback(t) {
|
|
1511
1535
|
if (e) for (let n of t) {
|
|
1512
1536
|
let { type: t, target: r } = n;
|
|
1513
1537
|
if (t === "childList" && r instanceof HTMLElement && r.contains(e)) {
|
|
@@ -1515,36 +1539,36 @@ function vn(e, t, n) {
|
|
|
1515
1539
|
break;
|
|
1516
1540
|
}
|
|
1517
1541
|
}
|
|
1518
|
-
} }), s =
|
|
1519
|
-
return
|
|
1542
|
+
} }), s = Cn({ callback: a });
|
|
1543
|
+
return J(() => {
|
|
1520
1544
|
a(), e ? (s?.observe(e), o?.observe(document.body, {
|
|
1521
1545
|
childList: !0,
|
|
1522
1546
|
subtree: !0
|
|
1523
1547
|
})) : (s?.disconnect(), o?.disconnect());
|
|
1524
1548
|
}, [e]), r;
|
|
1525
1549
|
}
|
|
1526
|
-
function
|
|
1527
|
-
return
|
|
1550
|
+
function En(e) {
|
|
1551
|
+
return gt(e, bn(e));
|
|
1528
1552
|
}
|
|
1529
|
-
var
|
|
1530
|
-
function
|
|
1531
|
-
let t = u(e), n =
|
|
1553
|
+
var Dn = [];
|
|
1554
|
+
function On(e) {
|
|
1555
|
+
let t = u(e), n = Ne((n) => e ? n && n !== Dn && e && t.current && e.parentNode === t.current.parentNode ? n : Dt(e) : Dn, [e]);
|
|
1532
1556
|
return o(() => {
|
|
1533
1557
|
t.current = e;
|
|
1534
1558
|
}, [e]), n;
|
|
1535
1559
|
}
|
|
1536
|
-
function
|
|
1560
|
+
function kn(e) {
|
|
1537
1561
|
let [t, n] = d(null), r = u(e), a = i((e) => {
|
|
1538
|
-
let t =
|
|
1539
|
-
t && n((e) => e ? (e.set(t,
|
|
1562
|
+
let t = kt(e.target);
|
|
1563
|
+
t && n((e) => e ? (e.set(t, Mt(t)), new Map(e)) : null);
|
|
1540
1564
|
}, []);
|
|
1541
1565
|
return o(() => {
|
|
1542
1566
|
let t = r.current;
|
|
1543
1567
|
if (e !== t) {
|
|
1544
1568
|
i(t);
|
|
1545
1569
|
let o = e.map((e) => {
|
|
1546
|
-
let t =
|
|
1547
|
-
return t ? (t.addEventListener("scroll", a, { passive: !0 }), [t,
|
|
1570
|
+
let t = kt(e);
|
|
1571
|
+
return t ? (t.addEventListener("scroll", a, { passive: !0 }), [t, Mt(t)]) : null;
|
|
1548
1572
|
}).filter((e) => e != null);
|
|
1549
1573
|
n(o.length ? new Map(o) : null), r.current = e;
|
|
1550
1574
|
}
|
|
@@ -1553,24 +1577,24 @@ function Sn(e) {
|
|
|
1553
1577
|
};
|
|
1554
1578
|
function i(e) {
|
|
1555
1579
|
e.forEach((e) => {
|
|
1556
|
-
|
|
1580
|
+
kt(e)?.removeEventListener("scroll", a);
|
|
1557
1581
|
});
|
|
1558
1582
|
}
|
|
1559
|
-
}, [a, e]), c(() => e.length ? t ? Array.from(t.values()).reduce((e, t) =>
|
|
1583
|
+
}, [a, e]), c(() => e.length ? t ? Array.from(t.values()).reduce((e, t) => ze(e, t), X) : Rt(e) : X, [e, t]);
|
|
1560
1584
|
}
|
|
1561
|
-
function
|
|
1585
|
+
function An(e, t) {
|
|
1562
1586
|
t === void 0 && (t = []);
|
|
1563
1587
|
let n = u(null);
|
|
1564
1588
|
return o(() => {
|
|
1565
1589
|
n.current = null;
|
|
1566
1590
|
}, t), o(() => {
|
|
1567
|
-
let t = e !==
|
|
1591
|
+
let t = e !== X;
|
|
1568
1592
|
t && !n.current && (n.current = e), !t && n.current && (n.current = null);
|
|
1569
|
-
}, [e]), n.current ?
|
|
1593
|
+
}, [e]), n.current ? Be(e, n.current) : X;
|
|
1570
1594
|
}
|
|
1571
|
-
function
|
|
1595
|
+
function jn(e) {
|
|
1572
1596
|
o(() => {
|
|
1573
|
-
if (!
|
|
1597
|
+
if (!Ce) return;
|
|
1574
1598
|
let t = e.map((e) => {
|
|
1575
1599
|
let { sensor: t } = e;
|
|
1576
1600
|
return t.setup == null ? void 0 : t.setup();
|
|
@@ -1583,7 +1607,7 @@ function wn(e) {
|
|
|
1583
1607
|
return t;
|
|
1584
1608
|
}));
|
|
1585
1609
|
}
|
|
1586
|
-
function
|
|
1610
|
+
function Mn(e, t) {
|
|
1587
1611
|
return c(() => e.reduce((e, n) => {
|
|
1588
1612
|
let { eventName: r, handler: i } = n;
|
|
1589
1613
|
return e[r] = (e) => {
|
|
@@ -1591,30 +1615,30 @@ function Tn(e, t) {
|
|
|
1591
1615
|
}, e;
|
|
1592
1616
|
}, {}), [e, t]);
|
|
1593
1617
|
}
|
|
1594
|
-
function
|
|
1595
|
-
return c(() => e ?
|
|
1618
|
+
function Nn(e) {
|
|
1619
|
+
return c(() => e ? wt(e) : null, [e]);
|
|
1596
1620
|
}
|
|
1597
|
-
var
|
|
1598
|
-
function
|
|
1599
|
-
t === void 0 && (t =
|
|
1600
|
-
let [n] = e, r =
|
|
1621
|
+
var Pn = [];
|
|
1622
|
+
function Fn(e, t) {
|
|
1623
|
+
t === void 0 && (t = St);
|
|
1624
|
+
let [n] = e, r = Nn(n ? q(n) : null), [i, a] = d(Pn);
|
|
1601
1625
|
function o() {
|
|
1602
|
-
a(() => e.length ? e.map((e) =>
|
|
1626
|
+
a(() => e.length ? e.map((e) => Nt(e) ? r : new Ut(t(e), e)) : Pn);
|
|
1603
1627
|
}
|
|
1604
|
-
let s =
|
|
1605
|
-
return
|
|
1628
|
+
let s = Cn({ callback: o });
|
|
1629
|
+
return J(() => {
|
|
1606
1630
|
s?.disconnect(), o(), e.forEach((e) => s?.observe(e));
|
|
1607
1631
|
}, [e]), i;
|
|
1608
1632
|
}
|
|
1609
|
-
function
|
|
1633
|
+
function In(e) {
|
|
1610
1634
|
if (!e) return null;
|
|
1611
1635
|
if (e.children.length > 1) return e;
|
|
1612
1636
|
let t = e.children[0];
|
|
1613
|
-
return
|
|
1637
|
+
return De(t) ? t : e;
|
|
1614
1638
|
}
|
|
1615
|
-
function
|
|
1616
|
-
let { measure: t } = e, [n, r] = d(null), a =
|
|
1617
|
-
for (let { target: n } of e) if (
|
|
1639
|
+
function Ln(e) {
|
|
1640
|
+
let { measure: t } = e, [n, r] = d(null), a = Cn({ callback: i((e) => {
|
|
1641
|
+
for (let { target: n } of e) if (De(n)) {
|
|
1618
1642
|
r((e) => {
|
|
1619
1643
|
let r = t(n);
|
|
1620
1644
|
return e ? {
|
|
@@ -1625,8 +1649,8 @@ function An(e) {
|
|
|
1625
1649
|
});
|
|
1626
1650
|
break;
|
|
1627
1651
|
}
|
|
1628
|
-
}, [t]) }), [o, s] =
|
|
1629
|
-
let n =
|
|
1652
|
+
}, [t]) }), [o, s] = Pe(i((e) => {
|
|
1653
|
+
let n = In(e);
|
|
1630
1654
|
a?.disconnect(), n && a?.observe(n), r(n ? t(n) : null);
|
|
1631
1655
|
}, [t, a]));
|
|
1632
1656
|
return c(() => ({
|
|
@@ -1639,21 +1663,21 @@ function An(e) {
|
|
|
1639
1663
|
s
|
|
1640
1664
|
]);
|
|
1641
1665
|
}
|
|
1642
|
-
var
|
|
1643
|
-
sensor:
|
|
1666
|
+
var Rn = [{
|
|
1667
|
+
sensor: nn,
|
|
1644
1668
|
options: {}
|
|
1645
1669
|
}, {
|
|
1646
|
-
sensor:
|
|
1670
|
+
sensor: Zt,
|
|
1647
1671
|
options: {}
|
|
1648
|
-
}],
|
|
1649
|
-
draggable: { measure:
|
|
1672
|
+
}], zn = { current: {} }, Bn = {
|
|
1673
|
+
draggable: { measure: Ct },
|
|
1650
1674
|
droppable: {
|
|
1651
|
-
measure:
|
|
1652
|
-
strategy:
|
|
1653
|
-
frequency:
|
|
1675
|
+
measure: Ct,
|
|
1676
|
+
strategy: gn.WhileDragging,
|
|
1677
|
+
frequency: _n.Optimized
|
|
1654
1678
|
},
|
|
1655
|
-
dragOverlay: { measure:
|
|
1656
|
-
},
|
|
1679
|
+
dragOverlay: { measure: St }
|
|
1680
|
+
}, Vn = class extends Map {
|
|
1657
1681
|
get(e) {
|
|
1658
1682
|
return e == null ? void 0 : super.get(e) ?? void 0;
|
|
1659
1683
|
}
|
|
@@ -1669,7 +1693,7 @@ var jn = [{
|
|
|
1669
1693
|
getNodeFor(e) {
|
|
1670
1694
|
return this.get(e)?.node.current ?? void 0;
|
|
1671
1695
|
}
|
|
1672
|
-
},
|
|
1696
|
+
}, Hn = {
|
|
1673
1697
|
activatorEvent: null,
|
|
1674
1698
|
active: null,
|
|
1675
1699
|
activeNode: null,
|
|
@@ -1678,31 +1702,31 @@ var jn = [{
|
|
|
1678
1702
|
containerNodeRect: null,
|
|
1679
1703
|
draggableNodes: /* @__PURE__ */ new Map(),
|
|
1680
1704
|
droppableRects: /* @__PURE__ */ new Map(),
|
|
1681
|
-
droppableContainers: /* @__PURE__ */ new
|
|
1705
|
+
droppableContainers: /* @__PURE__ */ new Vn(),
|
|
1682
1706
|
over: null,
|
|
1683
1707
|
dragOverlay: {
|
|
1684
1708
|
nodeRef: { current: null },
|
|
1685
1709
|
rect: null,
|
|
1686
|
-
setRef:
|
|
1710
|
+
setRef: it
|
|
1687
1711
|
},
|
|
1688
1712
|
scrollableAncestors: [],
|
|
1689
1713
|
scrollableAncestorRects: [],
|
|
1690
|
-
measuringConfiguration:
|
|
1691
|
-
measureDroppableContainers:
|
|
1714
|
+
measuringConfiguration: Bn,
|
|
1715
|
+
measureDroppableContainers: it,
|
|
1692
1716
|
windowRect: null,
|
|
1693
1717
|
measuringScheduled: !1
|
|
1694
|
-
},
|
|
1718
|
+
}, Un = /* @__PURE__ */ n({
|
|
1695
1719
|
activatorEvent: null,
|
|
1696
1720
|
activators: [],
|
|
1697
1721
|
active: null,
|
|
1698
1722
|
activeNodeRect: null,
|
|
1699
1723
|
ariaDescribedById: { draggable: "" },
|
|
1700
|
-
dispatch:
|
|
1724
|
+
dispatch: it,
|
|
1701
1725
|
draggableNodes: /* @__PURE__ */ new Map(),
|
|
1702
1726
|
over: null,
|
|
1703
|
-
measureDroppableContainers:
|
|
1704
|
-
}),
|
|
1705
|
-
function
|
|
1727
|
+
measureDroppableContainers: it
|
|
1728
|
+
}), Wn = /* @__PURE__ */ n(Hn);
|
|
1729
|
+
function Gn() {
|
|
1706
1730
|
return {
|
|
1707
1731
|
draggable: {
|
|
1708
1732
|
active: null,
|
|
@@ -1716,12 +1740,12 @@ function Rn() {
|
|
|
1716
1740
|
y: 0
|
|
1717
1741
|
}
|
|
1718
1742
|
},
|
|
1719
|
-
droppable: { containers: new
|
|
1743
|
+
droppable: { containers: new Vn() }
|
|
1720
1744
|
};
|
|
1721
1745
|
}
|
|
1722
|
-
function
|
|
1746
|
+
function Kn(e, t) {
|
|
1723
1747
|
switch (t.type) {
|
|
1724
|
-
case
|
|
1748
|
+
case Y.DragStart: return {
|
|
1725
1749
|
...e,
|
|
1726
1750
|
draggable: {
|
|
1727
1751
|
...e.draggable,
|
|
@@ -1729,7 +1753,7 @@ function zn(e, t) {
|
|
|
1729
1753
|
active: t.active
|
|
1730
1754
|
}
|
|
1731
1755
|
};
|
|
1732
|
-
case
|
|
1756
|
+
case Y.DragMove: return e.draggable.active == null ? e : {
|
|
1733
1757
|
...e,
|
|
1734
1758
|
draggable: {
|
|
1735
1759
|
...e.draggable,
|
|
@@ -1739,8 +1763,8 @@ function zn(e, t) {
|
|
|
1739
1763
|
}
|
|
1740
1764
|
}
|
|
1741
1765
|
};
|
|
1742
|
-
case
|
|
1743
|
-
case
|
|
1766
|
+
case Y.DragEnd:
|
|
1767
|
+
case Y.DragCancel: return {
|
|
1744
1768
|
...e,
|
|
1745
1769
|
draggable: {
|
|
1746
1770
|
...e.draggable,
|
|
@@ -1755,8 +1779,8 @@ function zn(e, t) {
|
|
|
1755
1779
|
}
|
|
1756
1780
|
}
|
|
1757
1781
|
};
|
|
1758
|
-
case
|
|
1759
|
-
let { element: n } = t, { id: r } = n, i = new
|
|
1782
|
+
case Y.RegisterDroppable: {
|
|
1783
|
+
let { element: n } = t, { id: r } = n, i = new Vn(e.droppable.containers);
|
|
1760
1784
|
return i.set(r, n), {
|
|
1761
1785
|
...e,
|
|
1762
1786
|
droppable: {
|
|
@@ -1765,10 +1789,10 @@ function zn(e, t) {
|
|
|
1765
1789
|
}
|
|
1766
1790
|
};
|
|
1767
1791
|
}
|
|
1768
|
-
case
|
|
1792
|
+
case Y.SetDroppableDisabled: {
|
|
1769
1793
|
let { id: n, key: r, disabled: i } = t, a = e.droppable.containers.get(n);
|
|
1770
1794
|
if (!a || r !== a.key) return e;
|
|
1771
|
-
let o = new
|
|
1795
|
+
let o = new Vn(e.droppable.containers);
|
|
1772
1796
|
return o.set(n, {
|
|
1773
1797
|
...a,
|
|
1774
1798
|
disabled: i
|
|
@@ -1780,10 +1804,10 @@ function zn(e, t) {
|
|
|
1780
1804
|
}
|
|
1781
1805
|
};
|
|
1782
1806
|
}
|
|
1783
|
-
case
|
|
1807
|
+
case Y.UnregisterDroppable: {
|
|
1784
1808
|
let { id: n, key: r } = t, i = e.droppable.containers.get(n);
|
|
1785
1809
|
if (!i || r !== i.key) return e;
|
|
1786
|
-
let a = new
|
|
1810
|
+
let a = new Vn(e.droppable.containers);
|
|
1787
1811
|
return a.delete(n), {
|
|
1788
1812
|
...e,
|
|
1789
1813
|
droppable: {
|
|
@@ -1795,11 +1819,11 @@ function zn(e, t) {
|
|
|
1795
1819
|
default: return e;
|
|
1796
1820
|
}
|
|
1797
1821
|
}
|
|
1798
|
-
function
|
|
1799
|
-
let { disabled: t } = e, { active: n, activatorEvent: r, draggableNodes: i } = a(
|
|
1822
|
+
function qn(e) {
|
|
1823
|
+
let { disabled: t } = e, { active: n, activatorEvent: r, draggableNodes: i } = a(Un), s = Fe(r), c = Fe(n?.id);
|
|
1800
1824
|
return o(() => {
|
|
1801
1825
|
if (!t && !r && s && c != null) {
|
|
1802
|
-
if (!
|
|
1826
|
+
if (!He(s) || document.activeElement === s.target) return;
|
|
1803
1827
|
let e = i.get(c);
|
|
1804
1828
|
if (!e) return;
|
|
1805
1829
|
let { activatorNode: t, node: n } = e;
|
|
@@ -1807,7 +1831,7 @@ function Bn(e) {
|
|
|
1807
1831
|
requestAnimationFrame(() => {
|
|
1808
1832
|
for (let e of [t.current, n.current]) {
|
|
1809
1833
|
if (!e) continue;
|
|
1810
|
-
let t =
|
|
1834
|
+
let t = qe(e);
|
|
1811
1835
|
if (t) {
|
|
1812
1836
|
t.focus();
|
|
1813
1837
|
break;
|
|
@@ -1823,25 +1847,25 @@ function Bn(e) {
|
|
|
1823
1847
|
s
|
|
1824
1848
|
]), null;
|
|
1825
1849
|
}
|
|
1826
|
-
function
|
|
1850
|
+
function Jn(e, t) {
|
|
1827
1851
|
let { transform: n, ...r } = t;
|
|
1828
1852
|
return e != null && e.length ? e.reduce((e, t) => t({
|
|
1829
1853
|
transform: e,
|
|
1830
1854
|
...r
|
|
1831
1855
|
}), n) : n;
|
|
1832
1856
|
}
|
|
1833
|
-
function
|
|
1857
|
+
function Yn(e) {
|
|
1834
1858
|
return c(() => ({
|
|
1835
1859
|
draggable: {
|
|
1836
|
-
...
|
|
1860
|
+
...Bn.draggable,
|
|
1837
1861
|
...e?.draggable
|
|
1838
1862
|
},
|
|
1839
1863
|
droppable: {
|
|
1840
|
-
...
|
|
1864
|
+
...Bn.droppable,
|
|
1841
1865
|
...e?.droppable
|
|
1842
1866
|
},
|
|
1843
1867
|
dragOverlay: {
|
|
1844
|
-
...
|
|
1868
|
+
...Bn.dragOverlay,
|
|
1845
1869
|
...e?.dragOverlay
|
|
1846
1870
|
}
|
|
1847
1871
|
}), [
|
|
@@ -1850,12 +1874,12 @@ function Hn(e) {
|
|
|
1850
1874
|
e?.dragOverlay
|
|
1851
1875
|
]);
|
|
1852
1876
|
}
|
|
1853
|
-
function
|
|
1877
|
+
function Xn(e) {
|
|
1854
1878
|
let { activeNode: t, measure: n, initialRect: r, config: i = !0 } = e, a = u(!1), { x: o, y: s } = typeof i == "boolean" ? {
|
|
1855
1879
|
x: i,
|
|
1856
1880
|
y: i
|
|
1857
1881
|
} : i;
|
|
1858
|
-
|
|
1882
|
+
J(() => {
|
|
1859
1883
|
if (!o && !s || !t) {
|
|
1860
1884
|
a.current = !1;
|
|
1861
1885
|
return;
|
|
@@ -1863,9 +1887,9 @@ function Un(e) {
|
|
|
1863
1887
|
if (a.current || !r) return;
|
|
1864
1888
|
let e = t?.node.current;
|
|
1865
1889
|
if (!e || e.isConnected === !1) return;
|
|
1866
|
-
let i =
|
|
1890
|
+
let i = gt(n(e), r);
|
|
1867
1891
|
if (o || (i.x = 0), s || (i.y = 0), a.current = !0, Math.abs(i.x) > 0 || Math.abs(i.y) > 0) {
|
|
1868
|
-
let t =
|
|
1892
|
+
let t = Ot(e);
|
|
1869
1893
|
t && t.scrollBy({
|
|
1870
1894
|
top: i.y,
|
|
1871
1895
|
left: i.x
|
|
@@ -1879,40 +1903,40 @@ function Un(e) {
|
|
|
1879
1903
|
n
|
|
1880
1904
|
]);
|
|
1881
1905
|
}
|
|
1882
|
-
var
|
|
1883
|
-
...
|
|
1906
|
+
var Zn = /* @__PURE__ */ n({
|
|
1907
|
+
...X,
|
|
1884
1908
|
scaleX: 1,
|
|
1885
1909
|
scaleY: 1
|
|
1886
|
-
}),
|
|
1910
|
+
}), Qn;
|
|
1887
1911
|
(function(e) {
|
|
1888
1912
|
e[e.Uninitialized = 0] = "Uninitialized", e[e.Initializing = 1] = "Initializing", e[e.Initialized = 2] = "Initialized";
|
|
1889
|
-
})(
|
|
1890
|
-
var
|
|
1891
|
-
let { id: n, accessibility: r, autoScroll: a = !0, children: s, sensors: f =
|
|
1913
|
+
})(Qn ||= {});
|
|
1914
|
+
var $n = /* @__PURE__ */ r(function(e) {
|
|
1915
|
+
let { id: n, accessibility: r, autoScroll: a = !0, children: s, sensors: f = Rn, collisionDetection: p = mt, measuring: m, modifiers: h, ...g } = e, [_, v] = l(Kn, void 0, Gn), [y, b] = et(), [x, S] = d(Qn.Uninitialized), C = x === Qn.Initialized, { draggable: { active: w, nodes: T, translate: E }, droppable: { containers: D } } = _, O = w == null ? null : T.get(w), k = u({
|
|
1892
1916
|
initial: null,
|
|
1893
1917
|
translated: null
|
|
1894
|
-
}),
|
|
1918
|
+
}), A = c(() => w == null ? null : {
|
|
1895
1919
|
id: w,
|
|
1896
|
-
data:
|
|
1897
|
-
rect:
|
|
1898
|
-
}, [w,
|
|
1920
|
+
data: O?.data ?? zn,
|
|
1921
|
+
rect: k
|
|
1922
|
+
}, [w, O]), j = u(null), [M, ee] = d(null), [N, P] = d(null), F = Me(g, Object.values(g)), I = Le("DndDescribedBy", n), te = c(() => D.getEnabled(), [D]), L = Yn(m), { droppableRects: R, measureDroppableContainers: ne, measuringScheduled: z } = yn(te, {
|
|
1899
1923
|
dragging: C,
|
|
1900
1924
|
dependencies: [E.x, E.y],
|
|
1901
|
-
config:
|
|
1902
|
-
}),
|
|
1903
|
-
|
|
1925
|
+
config: L.droppable
|
|
1926
|
+
}), B = mn(T, w), re = c(() => N ? We(N) : null, [N]), ie = Ae(), ae = xn(B, L.draggable.measure);
|
|
1927
|
+
Xn({
|
|
1904
1928
|
activeNode: w == null ? null : T.get(w),
|
|
1905
|
-
config:
|
|
1906
|
-
initialRect:
|
|
1907
|
-
measure:
|
|
1929
|
+
config: ie.layoutShiftCompensation,
|
|
1930
|
+
initialRect: ae,
|
|
1931
|
+
measure: L.draggable.measure
|
|
1908
1932
|
});
|
|
1909
|
-
let
|
|
1933
|
+
let V = Tn(B, L.draggable.measure, ae), H = Tn(B ? B.parentElement : null), U = u({
|
|
1910
1934
|
activatorEvent: null,
|
|
1911
1935
|
active: null,
|
|
1912
|
-
activeNode:
|
|
1936
|
+
activeNode: B,
|
|
1913
1937
|
collisionRect: null,
|
|
1914
1938
|
collisions: null,
|
|
1915
|
-
droppableRects:
|
|
1939
|
+
droppableRects: R,
|
|
1916
1940
|
draggableNodes: T,
|
|
1917
1941
|
draggingNode: null,
|
|
1918
1942
|
draggingNodeRect: null,
|
|
@@ -1920,44 +1944,44 @@ var Kn = /* @__PURE__ */ r(function(e) {
|
|
|
1920
1944
|
over: null,
|
|
1921
1945
|
scrollableAncestors: [],
|
|
1922
1946
|
scrollAdjustedTranslate: null
|
|
1923
|
-
}),
|
|
1947
|
+
}), se = D.getNodeFor(U.current.over?.id), W = Ln({ measure: L.dragOverlay.measure }), ce = W.nodeRef.current ?? B, le = C ? W.rect ?? V : null, ue = !!(W.nodeRef.current && W.rect), G = En(ue ? null : V), de = Nn(ce ? q(ce) : null), K = On(C ? se ?? B : null), fe = Fn(K), pe = Jn(h, {
|
|
1924
1948
|
transform: {
|
|
1925
|
-
x: E.x -
|
|
1926
|
-
y: E.y -
|
|
1949
|
+
x: E.x - G.x,
|
|
1950
|
+
y: E.y - G.y,
|
|
1927
1951
|
scaleX: 1,
|
|
1928
1952
|
scaleY: 1
|
|
1929
1953
|
},
|
|
1930
|
-
activatorEvent:
|
|
1931
|
-
active:
|
|
1932
|
-
activeNodeRect:
|
|
1933
|
-
containerNodeRect:
|
|
1934
|
-
draggingNodeRect:
|
|
1935
|
-
over:
|
|
1936
|
-
overlayNodeRect:
|
|
1937
|
-
scrollableAncestors:
|
|
1938
|
-
scrollableAncestorRects:
|
|
1939
|
-
windowRect:
|
|
1940
|
-
}),
|
|
1941
|
-
active:
|
|
1942
|
-
collisionRect:
|
|
1943
|
-
droppableRects:
|
|
1944
|
-
droppableContainers:
|
|
1945
|
-
pointerCoordinates:
|
|
1946
|
-
}) : null,
|
|
1954
|
+
activatorEvent: N,
|
|
1955
|
+
active: A,
|
|
1956
|
+
activeNodeRect: V,
|
|
1957
|
+
containerNodeRect: H,
|
|
1958
|
+
draggingNodeRect: le,
|
|
1959
|
+
over: U.current.over,
|
|
1960
|
+
overlayNodeRect: W.rect,
|
|
1961
|
+
scrollableAncestors: K,
|
|
1962
|
+
scrollableAncestorRects: fe,
|
|
1963
|
+
windowRect: de
|
|
1964
|
+
}), me = re ? ze(re, E) : null, he = kn(K), ge = An(he), _e = An(he, [V]), ve = ze(pe, ge), ye = le ? vt(le, pe) : null, be = A && ye ? p({
|
|
1965
|
+
active: A,
|
|
1966
|
+
collisionRect: ye,
|
|
1967
|
+
droppableRects: R,
|
|
1968
|
+
droppableContainers: te,
|
|
1969
|
+
pointerCoordinates: me
|
|
1970
|
+
}) : null, xe = ut(be, "id"), [Se, Ce] = d(null), we = ht(ue ? pe : ze(pe, _e), Se?.rect ?? null, V), Te = u(null), Ee = i((e, t) => {
|
|
1947
1971
|
let { sensor: n, options: r } = t;
|
|
1948
|
-
if (
|
|
1949
|
-
let i = T.get(
|
|
1972
|
+
if (j.current == null) return;
|
|
1973
|
+
let i = T.get(j.current);
|
|
1950
1974
|
if (!i) return;
|
|
1951
1975
|
let a = e.nativeEvent;
|
|
1952
|
-
|
|
1953
|
-
active:
|
|
1976
|
+
Te.current = new n({
|
|
1977
|
+
active: j.current,
|
|
1954
1978
|
activeNode: i,
|
|
1955
1979
|
event: a,
|
|
1956
1980
|
options: r,
|
|
1957
|
-
context:
|
|
1981
|
+
context: U,
|
|
1958
1982
|
onAbort(e) {
|
|
1959
1983
|
if (!T.get(e)) return;
|
|
1960
|
-
let { onDragAbort: t } =
|
|
1984
|
+
let { onDragAbort: t } = F.current, n = { id: e };
|
|
1961
1985
|
t?.(n), y({
|
|
1962
1986
|
type: "onDragAbort",
|
|
1963
1987
|
event: n
|
|
@@ -1965,7 +1989,7 @@ var Kn = /* @__PURE__ */ r(function(e) {
|
|
|
1965
1989
|
},
|
|
1966
1990
|
onPending(e, t, n, r) {
|
|
1967
1991
|
if (!T.get(e)) return;
|
|
1968
|
-
let { onDragPending: i } =
|
|
1992
|
+
let { onDragPending: i } = F.current, a = {
|
|
1969
1993
|
id: e,
|
|
1970
1994
|
constraint: t,
|
|
1971
1995
|
initialCoordinates: n,
|
|
@@ -1977,56 +2001,56 @@ var Kn = /* @__PURE__ */ r(function(e) {
|
|
|
1977
2001
|
});
|
|
1978
2002
|
},
|
|
1979
2003
|
onStart(e) {
|
|
1980
|
-
let t =
|
|
2004
|
+
let t = j.current;
|
|
1981
2005
|
if (t == null) return;
|
|
1982
2006
|
let n = T.get(t);
|
|
1983
2007
|
if (!n) return;
|
|
1984
|
-
let { onDragStart: r } =
|
|
2008
|
+
let { onDragStart: r } = F.current, i = {
|
|
1985
2009
|
activatorEvent: a,
|
|
1986
2010
|
active: {
|
|
1987
2011
|
id: t,
|
|
1988
2012
|
data: n.data,
|
|
1989
|
-
rect:
|
|
2013
|
+
rect: k
|
|
1990
2014
|
}
|
|
1991
2015
|
};
|
|
1992
2016
|
oe(() => {
|
|
1993
|
-
r?.(i), S(
|
|
1994
|
-
type:
|
|
2017
|
+
r?.(i), S(Qn.Initializing), v({
|
|
2018
|
+
type: Y.DragStart,
|
|
1995
2019
|
initialCoordinates: e,
|
|
1996
2020
|
active: t
|
|
1997
2021
|
}), y({
|
|
1998
2022
|
type: "onDragStart",
|
|
1999
2023
|
event: i
|
|
2000
|
-
}),
|
|
2024
|
+
}), ee(Te.current), P(a);
|
|
2001
2025
|
});
|
|
2002
2026
|
},
|
|
2003
2027
|
onMove(e) {
|
|
2004
2028
|
v({
|
|
2005
|
-
type:
|
|
2029
|
+
type: Y.DragMove,
|
|
2006
2030
|
coordinates: e
|
|
2007
2031
|
});
|
|
2008
2032
|
},
|
|
2009
|
-
onEnd: o(
|
|
2010
|
-
onCancel: o(
|
|
2033
|
+
onEnd: o(Y.DragEnd),
|
|
2034
|
+
onCancel: o(Y.DragCancel)
|
|
2011
2035
|
});
|
|
2012
2036
|
function o(e) {
|
|
2013
2037
|
return async function() {
|
|
2014
|
-
let { active: t, collisions: n, over: r, scrollAdjustedTranslate: i } =
|
|
2038
|
+
let { active: t, collisions: n, over: r, scrollAdjustedTranslate: i } = U.current, o = null;
|
|
2015
2039
|
if (t && i) {
|
|
2016
|
-
let { cancelDrop: s } =
|
|
2040
|
+
let { cancelDrop: s } = F.current;
|
|
2017
2041
|
o = {
|
|
2018
2042
|
activatorEvent: a,
|
|
2019
2043
|
active: t,
|
|
2020
2044
|
collisions: n,
|
|
2021
2045
|
delta: i,
|
|
2022
2046
|
over: r
|
|
2023
|
-
}, e ===
|
|
2047
|
+
}, e === Y.DragEnd && typeof s == "function" && await Promise.resolve(s(o)) && (e = Y.DragCancel);
|
|
2024
2048
|
}
|
|
2025
|
-
|
|
2026
|
-
v({ type: e }), S(
|
|
2027
|
-
let t = e ===
|
|
2049
|
+
j.current = null, oe(() => {
|
|
2050
|
+
v({ type: e }), S(Qn.Uninitialized), Ce(null), ee(null), P(null), Te.current = null;
|
|
2051
|
+
let t = e === Y.DragEnd ? "onDragEnd" : "onDragCancel";
|
|
2028
2052
|
if (o) {
|
|
2029
|
-
let e =
|
|
2053
|
+
let e = F.current[t];
|
|
2030
2054
|
e?.(o), y({
|
|
2031
2055
|
type: t,
|
|
2032
2056
|
event: o
|
|
@@ -2035,24 +2059,24 @@ var Kn = /* @__PURE__ */ r(function(e) {
|
|
|
2035
2059
|
});
|
|
2036
2060
|
};
|
|
2037
2061
|
}
|
|
2038
|
-
}, [T]),
|
|
2062
|
+
}, [T]), De = hn(f, i((e, t) => (n, r) => {
|
|
2039
2063
|
let i = n.nativeEvent, a = T.get(r);
|
|
2040
|
-
if (
|
|
2064
|
+
if (j.current !== null || !a || i.dndKit || i.defaultPrevented) return;
|
|
2041
2065
|
let o = { active: a };
|
|
2042
|
-
e(n, t.options, o) === !0 && (i.dndKit = { capturedBy: t.sensor },
|
|
2043
|
-
}, [T,
|
|
2044
|
-
|
|
2045
|
-
|
|
2046
|
-
}, [
|
|
2047
|
-
let { onDragMove: e } =
|
|
2066
|
+
e(n, t.options, o) === !0 && (i.dndKit = { capturedBy: t.sensor }, j.current = r, Ee(n, t));
|
|
2067
|
+
}, [T, Ee]));
|
|
2068
|
+
jn(f), J(() => {
|
|
2069
|
+
V && x === Qn.Initializing && S(Qn.Initialized);
|
|
2070
|
+
}, [V, x]), o(() => {
|
|
2071
|
+
let { onDragMove: e } = F.current, { active: t, activatorEvent: n, collisions: r, over: i } = U.current;
|
|
2048
2072
|
if (!t || !n) return;
|
|
2049
2073
|
let a = {
|
|
2050
2074
|
active: t,
|
|
2051
2075
|
activatorEvent: n,
|
|
2052
2076
|
collisions: r,
|
|
2053
2077
|
delta: {
|
|
2054
|
-
x:
|
|
2055
|
-
y:
|
|
2078
|
+
x: ve.x,
|
|
2079
|
+
y: ve.y
|
|
2056
2080
|
},
|
|
2057
2081
|
over: i
|
|
2058
2082
|
};
|
|
@@ -2062,10 +2086,10 @@ var Kn = /* @__PURE__ */ r(function(e) {
|
|
|
2062
2086
|
event: a
|
|
2063
2087
|
});
|
|
2064
2088
|
});
|
|
2065
|
-
}, [
|
|
2066
|
-
let { active: e, activatorEvent: t, collisions: n, droppableContainers: r, scrollAdjustedTranslate: i } =
|
|
2067
|
-
if (!e ||
|
|
2068
|
-
let { onDragOver: a } =
|
|
2089
|
+
}, [ve.x, ve.y]), o(() => {
|
|
2090
|
+
let { active: e, activatorEvent: t, collisions: n, droppableContainers: r, scrollAdjustedTranslate: i } = U.current;
|
|
2091
|
+
if (!e || j.current == null || !t || !i) return;
|
|
2092
|
+
let { onDragOver: a } = F.current, o = r.get(xe), s = o && o.rect.current ? {
|
|
2069
2093
|
id: o.id,
|
|
2070
2094
|
rect: o.rect.current,
|
|
2071
2095
|
data: o.data,
|
|
@@ -2081,123 +2105,123 @@ var Kn = /* @__PURE__ */ r(function(e) {
|
|
|
2081
2105
|
over: s
|
|
2082
2106
|
};
|
|
2083
2107
|
oe(() => {
|
|
2084
|
-
|
|
2108
|
+
Ce(s), a?.(c), y({
|
|
2085
2109
|
type: "onDragOver",
|
|
2086
2110
|
event: c
|
|
2087
2111
|
});
|
|
2088
2112
|
});
|
|
2089
|
-
}, [
|
|
2090
|
-
|
|
2091
|
-
activatorEvent:
|
|
2092
|
-
active:
|
|
2093
|
-
activeNode:
|
|
2094
|
-
collisionRect:
|
|
2095
|
-
collisions:
|
|
2096
|
-
droppableRects:
|
|
2113
|
+
}, [xe]), J(() => {
|
|
2114
|
+
U.current = {
|
|
2115
|
+
activatorEvent: N,
|
|
2116
|
+
active: A,
|
|
2117
|
+
activeNode: B,
|
|
2118
|
+
collisionRect: ye,
|
|
2119
|
+
collisions: be,
|
|
2120
|
+
droppableRects: R,
|
|
2097
2121
|
draggableNodes: T,
|
|
2098
|
-
draggingNode:
|
|
2099
|
-
draggingNodeRect:
|
|
2122
|
+
draggingNode: ce,
|
|
2123
|
+
draggingNodeRect: le,
|
|
2100
2124
|
droppableContainers: D,
|
|
2101
|
-
over:
|
|
2102
|
-
scrollableAncestors:
|
|
2103
|
-
scrollAdjustedTranslate:
|
|
2104
|
-
},
|
|
2105
|
-
initial:
|
|
2106
|
-
translated:
|
|
2125
|
+
over: Se,
|
|
2126
|
+
scrollableAncestors: K,
|
|
2127
|
+
scrollAdjustedTranslate: ve
|
|
2128
|
+
}, k.current = {
|
|
2129
|
+
initial: le,
|
|
2130
|
+
translated: ye
|
|
2107
2131
|
};
|
|
2108
2132
|
}, [
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
|
|
2133
|
+
A,
|
|
2134
|
+
B,
|
|
2135
|
+
be,
|
|
2136
|
+
ye,
|
|
2113
2137
|
T,
|
|
2114
|
-
|
|
2115
|
-
|
|
2116
|
-
|
|
2138
|
+
ce,
|
|
2139
|
+
le,
|
|
2140
|
+
R,
|
|
2117
2141
|
D,
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
]),
|
|
2122
|
-
...
|
|
2142
|
+
Se,
|
|
2143
|
+
K,
|
|
2144
|
+
ve
|
|
2145
|
+
]), dn({
|
|
2146
|
+
...ie,
|
|
2123
2147
|
delta: E,
|
|
2124
|
-
draggingRect:
|
|
2125
|
-
pointerCoordinates:
|
|
2126
|
-
scrollableAncestors:
|
|
2127
|
-
scrollableAncestorRects:
|
|
2148
|
+
draggingRect: ye,
|
|
2149
|
+
pointerCoordinates: me,
|
|
2150
|
+
scrollableAncestors: K,
|
|
2151
|
+
scrollableAncestorRects: fe
|
|
2128
2152
|
});
|
|
2129
|
-
let
|
|
2130
|
-
active:
|
|
2131
|
-
activeNode:
|
|
2132
|
-
activeNodeRect:
|
|
2133
|
-
activatorEvent:
|
|
2134
|
-
collisions:
|
|
2135
|
-
containerNodeRect:
|
|
2136
|
-
dragOverlay:
|
|
2153
|
+
let Oe = c(() => ({
|
|
2154
|
+
active: A,
|
|
2155
|
+
activeNode: B,
|
|
2156
|
+
activeNodeRect: V,
|
|
2157
|
+
activatorEvent: N,
|
|
2158
|
+
collisions: be,
|
|
2159
|
+
containerNodeRect: H,
|
|
2160
|
+
dragOverlay: W,
|
|
2137
2161
|
draggableNodes: T,
|
|
2138
2162
|
droppableContainers: D,
|
|
2139
|
-
droppableRects:
|
|
2140
|
-
over:
|
|
2141
|
-
measureDroppableContainers:
|
|
2142
|
-
scrollableAncestors:
|
|
2143
|
-
scrollableAncestorRects:
|
|
2144
|
-
measuringConfiguration:
|
|
2145
|
-
measuringScheduled:
|
|
2146
|
-
windowRect:
|
|
2163
|
+
droppableRects: R,
|
|
2164
|
+
over: Se,
|
|
2165
|
+
measureDroppableContainers: ne,
|
|
2166
|
+
scrollableAncestors: K,
|
|
2167
|
+
scrollableAncestorRects: fe,
|
|
2168
|
+
measuringConfiguration: L,
|
|
2169
|
+
measuringScheduled: z,
|
|
2170
|
+
windowRect: de
|
|
2147
2171
|
}), [
|
|
2148
|
-
|
|
2149
|
-
|
|
2150
|
-
z,
|
|
2151
|
-
j,
|
|
2152
|
-
Se,
|
|
2153
|
-
le,
|
|
2172
|
+
A,
|
|
2173
|
+
B,
|
|
2154
2174
|
V,
|
|
2175
|
+
N,
|
|
2176
|
+
be,
|
|
2177
|
+
H,
|
|
2178
|
+
W,
|
|
2155
2179
|
T,
|
|
2156
2180
|
D,
|
|
2157
|
-
|
|
2158
|
-
|
|
2159
|
-
|
|
2160
|
-
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
-
]),
|
|
2166
|
-
activatorEvent:
|
|
2167
|
-
activators:
|
|
2168
|
-
active:
|
|
2169
|
-
activeNodeRect:
|
|
2170
|
-
ariaDescribedById: { draggable:
|
|
2181
|
+
R,
|
|
2182
|
+
Se,
|
|
2183
|
+
ne,
|
|
2184
|
+
K,
|
|
2185
|
+
fe,
|
|
2186
|
+
L,
|
|
2187
|
+
z,
|
|
2188
|
+
de
|
|
2189
|
+
]), ke = c(() => ({
|
|
2190
|
+
activatorEvent: N,
|
|
2191
|
+
activators: De,
|
|
2192
|
+
active: A,
|
|
2193
|
+
activeNodeRect: V,
|
|
2194
|
+
ariaDescribedById: { draggable: I },
|
|
2171
2195
|
dispatch: v,
|
|
2172
2196
|
draggableNodes: T,
|
|
2173
|
-
over:
|
|
2174
|
-
measureDroppableContainers:
|
|
2197
|
+
over: Se,
|
|
2198
|
+
measureDroppableContainers: ne
|
|
2175
2199
|
}), [
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
-
|
|
2179
|
-
|
|
2200
|
+
N,
|
|
2201
|
+
De,
|
|
2202
|
+
A,
|
|
2203
|
+
V,
|
|
2180
2204
|
v,
|
|
2181
|
-
|
|
2205
|
+
I,
|
|
2182
2206
|
T,
|
|
2183
|
-
|
|
2184
|
-
|
|
2207
|
+
Se,
|
|
2208
|
+
ne
|
|
2185
2209
|
]);
|
|
2186
|
-
return t.createElement(
|
|
2210
|
+
return t.createElement(Qe.Provider, { value: b }, t.createElement(Un.Provider, { value: ke }, t.createElement(Wn.Provider, { value: Oe }, t.createElement(Zn.Provider, { value: we }, s)), t.createElement(qn, { disabled: r?.restoreFocus === !1 })), t.createElement(rt, {
|
|
2187
2211
|
...r,
|
|
2188
|
-
hiddenTextDescribedById:
|
|
2212
|
+
hiddenTextDescribedById: I
|
|
2189
2213
|
}));
|
|
2190
|
-
function
|
|
2191
|
-
let e =
|
|
2214
|
+
function Ae() {
|
|
2215
|
+
let e = M?.autoScrollEnabled === !1, t = typeof a == "object" ? a.enabled === !1 : a === !1, n = C && !e && !t;
|
|
2192
2216
|
return typeof a == "object" ? {
|
|
2193
2217
|
...a,
|
|
2194
2218
|
enabled: n
|
|
2195
2219
|
} : { enabled: n };
|
|
2196
2220
|
}
|
|
2197
|
-
}),
|
|
2198
|
-
function
|
|
2199
|
-
let { id: t, data: n, disabled: r = !1, attributes: i } = e, o =
|
|
2200
|
-
return
|
|
2221
|
+
}), er = /* @__PURE__ */ n(null), tr = "button", nr = "Draggable";
|
|
2222
|
+
function rr(e) {
|
|
2223
|
+
let { id: t, data: n, disabled: r = !1, attributes: i } = e, o = Le(nr), { activators: s, activatorEvent: l, active: u, activeNodeRect: d, ariaDescribedById: f, draggableNodes: p, over: m } = a(Un), { role: h = tr, roleDescription: g = "draggable", tabIndex: _ = 0 } = i ?? {}, v = u?.id === t, y = a(v ? Zn : er), [b, x] = Pe(), [S, C] = Pe(), w = Mn(s, t), T = Me(n);
|
|
2224
|
+
return J(() => (p.set(t, {
|
|
2201
2225
|
id: t,
|
|
2202
2226
|
key: o,
|
|
2203
2227
|
node: b,
|
|
@@ -2214,7 +2238,7 @@ function Xn(e) {
|
|
|
2214
2238
|
role: h,
|
|
2215
2239
|
tabIndex: _,
|
|
2216
2240
|
"aria-disabled": r,
|
|
2217
|
-
"aria-pressed": v && h ===
|
|
2241
|
+
"aria-pressed": v && h === tr ? !0 : void 0,
|
|
2218
2242
|
"aria-roledescription": g,
|
|
2219
2243
|
"aria-describedby": f.draggable
|
|
2220
2244
|
}), [
|
|
@@ -2234,15 +2258,15 @@ function Xn(e) {
|
|
|
2234
2258
|
transform: y
|
|
2235
2259
|
};
|
|
2236
2260
|
}
|
|
2237
|
-
function
|
|
2238
|
-
return a(
|
|
2261
|
+
function ir() {
|
|
2262
|
+
return a(Wn);
|
|
2239
2263
|
}
|
|
2240
|
-
var
|
|
2241
|
-
function
|
|
2242
|
-
let { data: t, disabled: n = !1, id: r, resizeObserverConfig: s } = e, c =
|
|
2243
|
-
|
|
2264
|
+
var ar = "Droppable", or = { timeout: 25 };
|
|
2265
|
+
function sr(e) {
|
|
2266
|
+
let { data: t, disabled: n = !1, id: r, resizeObserverConfig: s } = e, c = Le(ar), { active: l, dispatch: d, over: f, measureDroppableContainers: p } = a(Un), m = u({ disabled: n }), h = u(!1), g = u(null), _ = u(null), { disabled: v, updateMeasurementsFor: y, timeout: b } = {
|
|
2267
|
+
...or,
|
|
2244
2268
|
...s
|
|
2245
|
-
}, x =
|
|
2269
|
+
}, x = Me(y ?? r), S = Cn({
|
|
2246
2270
|
callback: i(() => {
|
|
2247
2271
|
if (!h.current) {
|
|
2248
2272
|
h.current = !0;
|
|
@@ -2253,13 +2277,13 @@ function er(e) {
|
|
|
2253
2277
|
}, b);
|
|
2254
2278
|
}, [b]),
|
|
2255
2279
|
disabled: v || !l
|
|
2256
|
-
}), [C, w] =
|
|
2280
|
+
}), [C, w] = Pe(i((e, t) => {
|
|
2257
2281
|
S && (t && (S.unobserve(t), h.current = !1), e && S.observe(e));
|
|
2258
|
-
}, [S])), T =
|
|
2282
|
+
}, [S])), T = Me(t);
|
|
2259
2283
|
return o(() => {
|
|
2260
2284
|
!S || !C.current || (S.disconnect(), h.current = !1, S.observe(C.current));
|
|
2261
2285
|
}, [C, S]), o(() => (d({
|
|
2262
|
-
type:
|
|
2286
|
+
type: Y.RegisterDroppable,
|
|
2263
2287
|
element: {
|
|
2264
2288
|
id: r,
|
|
2265
2289
|
key: c,
|
|
@@ -2269,12 +2293,12 @@ function er(e) {
|
|
|
2269
2293
|
data: T
|
|
2270
2294
|
}
|
|
2271
2295
|
}), () => d({
|
|
2272
|
-
type:
|
|
2296
|
+
type: Y.UnregisterDroppable,
|
|
2273
2297
|
key: c,
|
|
2274
2298
|
id: r
|
|
2275
2299
|
})), [r]), o(() => {
|
|
2276
2300
|
n !== m.current.disabled && (d({
|
|
2277
|
-
type:
|
|
2301
|
+
type: Y.SetDroppableDisabled,
|
|
2278
2302
|
id: r,
|
|
2279
2303
|
key: c,
|
|
2280
2304
|
disabled: n
|
|
@@ -2295,43 +2319,43 @@ function er(e) {
|
|
|
2295
2319
|
}
|
|
2296
2320
|
//#endregion
|
|
2297
2321
|
//#region ../../node_modules/.pnpm/@dnd-kit+sortable@10.0.0_@dnd-kit+core@6.3.1_react-dom@19.2.5_react@19.2.5__react@19.2.5__react@19.2.5/node_modules/@dnd-kit/sortable/dist/sortable.esm.js
|
|
2298
|
-
function
|
|
2322
|
+
function cr(e, t, n) {
|
|
2299
2323
|
let r = e.slice();
|
|
2300
2324
|
return r.splice(n < 0 ? r.length + n : n, 0, r.splice(t, 1)[0]), r;
|
|
2301
2325
|
}
|
|
2302
|
-
function
|
|
2326
|
+
function lr(e, t) {
|
|
2303
2327
|
return e.reduce((e, n, r) => {
|
|
2304
2328
|
let i = t.get(n);
|
|
2305
2329
|
return i && (e[r] = i), e;
|
|
2306
2330
|
}, Array(e.length));
|
|
2307
2331
|
}
|
|
2308
|
-
function
|
|
2332
|
+
function ur(e) {
|
|
2309
2333
|
return e !== null && e >= 0;
|
|
2310
2334
|
}
|
|
2311
|
-
function
|
|
2335
|
+
function dr(e, t) {
|
|
2312
2336
|
if (e === t) return !0;
|
|
2313
2337
|
if (e.length !== t.length) return !1;
|
|
2314
2338
|
for (let n = 0; n < e.length; n++) if (e[n] !== t[n]) return !1;
|
|
2315
2339
|
return !0;
|
|
2316
2340
|
}
|
|
2317
|
-
function
|
|
2341
|
+
function fr(e) {
|
|
2318
2342
|
return typeof e == "boolean" ? {
|
|
2319
2343
|
draggable: e,
|
|
2320
2344
|
droppable: e
|
|
2321
2345
|
} : e;
|
|
2322
2346
|
}
|
|
2323
|
-
var
|
|
2324
|
-
let { rects: t, activeIndex: n, overIndex: r, index: i } = e, a =
|
|
2347
|
+
var pr = (e) => {
|
|
2348
|
+
let { rects: t, activeIndex: n, overIndex: r, index: i } = e, a = cr(t, r, n), o = t[i], s = a[i];
|
|
2325
2349
|
return !s || !o ? null : {
|
|
2326
2350
|
x: s.left - o.left,
|
|
2327
2351
|
y: s.top - o.top,
|
|
2328
2352
|
scaleX: s.width / o.width,
|
|
2329
2353
|
scaleY: s.height / o.height
|
|
2330
2354
|
};
|
|
2331
|
-
},
|
|
2355
|
+
}, mr = {
|
|
2332
2356
|
scaleX: 1,
|
|
2333
2357
|
scaleY: 1
|
|
2334
|
-
},
|
|
2358
|
+
}, hr = (e) => {
|
|
2335
2359
|
let { activeIndex: t, activeNodeRect: n, index: r, rects: i, overIndex: a } = e, o = i[t] ?? n;
|
|
2336
2360
|
if (!o) return null;
|
|
2337
2361
|
if (r === t) {
|
|
@@ -2339,45 +2363,45 @@ var or = (e) => {
|
|
|
2339
2363
|
return e ? {
|
|
2340
2364
|
x: 0,
|
|
2341
2365
|
y: t < a ? e.top + e.height - (o.top + o.height) : e.top - o.top,
|
|
2342
|
-
...
|
|
2366
|
+
...mr
|
|
2343
2367
|
} : null;
|
|
2344
2368
|
}
|
|
2345
|
-
let s =
|
|
2369
|
+
let s = gr(i, r, t);
|
|
2346
2370
|
return r > t && r <= a ? {
|
|
2347
2371
|
x: 0,
|
|
2348
2372
|
y: -o.height - s,
|
|
2349
|
-
...
|
|
2373
|
+
...mr
|
|
2350
2374
|
} : r < t && r >= a ? {
|
|
2351
2375
|
x: 0,
|
|
2352
2376
|
y: o.height + s,
|
|
2353
|
-
...
|
|
2377
|
+
...mr
|
|
2354
2378
|
} : {
|
|
2355
2379
|
x: 0,
|
|
2356
2380
|
y: 0,
|
|
2357
|
-
...
|
|
2381
|
+
...mr
|
|
2358
2382
|
};
|
|
2359
2383
|
};
|
|
2360
|
-
function
|
|
2384
|
+
function gr(e, t, n) {
|
|
2361
2385
|
let r = e[t], i = e[t - 1], a = e[t + 1];
|
|
2362
2386
|
return r ? n < t ? i ? r.top - (i.top + i.height) : a ? a.top - (r.top + r.height) : 0 : a ? a.top - (r.top + r.height) : i ? r.top - (i.top + i.height) : 0 : 0;
|
|
2363
2387
|
}
|
|
2364
|
-
var
|
|
2388
|
+
var _r = "Sortable", vr = /* @__PURE__ */ t.createContext({
|
|
2365
2389
|
activeIndex: -1,
|
|
2366
|
-
containerId:
|
|
2390
|
+
containerId: _r,
|
|
2367
2391
|
disableTransforms: !1,
|
|
2368
2392
|
items: [],
|
|
2369
2393
|
overIndex: -1,
|
|
2370
2394
|
useDragOverlay: !1,
|
|
2371
2395
|
sortedRects: [],
|
|
2372
|
-
strategy:
|
|
2396
|
+
strategy: pr,
|
|
2373
2397
|
disabled: {
|
|
2374
2398
|
draggable: !1,
|
|
2375
2399
|
droppable: !1
|
|
2376
2400
|
}
|
|
2377
2401
|
});
|
|
2378
|
-
function
|
|
2379
|
-
let { children: n, id: r, items: i, strategy: a =
|
|
2380
|
-
|
|
2402
|
+
function yr(e) {
|
|
2403
|
+
let { children: n, id: r, items: i, strategy: a = pr, disabled: s = !1 } = e, { active: l, dragOverlay: d, droppableRects: f, over: p, measureDroppableContainers: m } = ir(), h = Le(_r, r), g = d.rect !== null, _ = c(() => i.map((e) => typeof e == "object" && "id" in e ? e.id : e), [i]), v = l != null, y = l ? _.indexOf(l.id) : -1, b = p ? _.indexOf(p.id) : -1, x = u(_), S = !dr(_, x.current), C = b !== -1 && y === -1 || S, w = fr(s);
|
|
2404
|
+
J(() => {
|
|
2381
2405
|
S && v && m(_);
|
|
2382
2406
|
}, [
|
|
2383
2407
|
S,
|
|
@@ -2395,7 +2419,7 @@ function fr(e) {
|
|
|
2395
2419
|
items: _,
|
|
2396
2420
|
overIndex: b,
|
|
2397
2421
|
useDragOverlay: g,
|
|
2398
|
-
sortedRects:
|
|
2422
|
+
sortedRects: lr(_, f),
|
|
2399
2423
|
strategy: a
|
|
2400
2424
|
}), [
|
|
2401
2425
|
y,
|
|
@@ -2409,29 +2433,29 @@ function fr(e) {
|
|
|
2409
2433
|
g,
|
|
2410
2434
|
a
|
|
2411
2435
|
]);
|
|
2412
|
-
return t.createElement(
|
|
2436
|
+
return t.createElement(vr.Provider, { value: T }, n);
|
|
2413
2437
|
}
|
|
2414
|
-
var
|
|
2438
|
+
var br = (e) => {
|
|
2415
2439
|
let { id: t, items: n, activeIndex: r, overIndex: i } = e;
|
|
2416
|
-
return
|
|
2417
|
-
},
|
|
2440
|
+
return cr(n, r, i).indexOf(t);
|
|
2441
|
+
}, xr = (e) => {
|
|
2418
2442
|
let { containerId: t, isSorting: n, wasDragging: r, index: i, items: a, newIndex: o, previousItems: s, previousContainerId: c, transition: l } = e;
|
|
2419
2443
|
return !l || !r || s !== a && i === o ? !1 : n ? !0 : o !== i && t === c;
|
|
2420
|
-
},
|
|
2444
|
+
}, Sr = {
|
|
2421
2445
|
duration: 200,
|
|
2422
2446
|
easing: "ease"
|
|
2423
|
-
},
|
|
2424
|
-
property:
|
|
2447
|
+
}, Cr = "transform", wr = /* @__PURE__ */ Ge.Transition.toString({
|
|
2448
|
+
property: Cr,
|
|
2425
2449
|
duration: 0,
|
|
2426
2450
|
easing: "linear"
|
|
2427
|
-
}),
|
|
2428
|
-
function
|
|
2451
|
+
}), Tr = { roleDescription: "sortable" };
|
|
2452
|
+
function Er(e) {
|
|
2429
2453
|
let { disabled: t, index: n, node: r, rect: i } = e, [a, s] = d(null), c = u(n);
|
|
2430
|
-
return
|
|
2454
|
+
return J(() => {
|
|
2431
2455
|
if (!t && n !== c.current && r.current) {
|
|
2432
2456
|
let e = i.current;
|
|
2433
2457
|
if (e) {
|
|
2434
|
-
let t =
|
|
2458
|
+
let t = St(r.current, { ignoreTransform: !0 }), n = {
|
|
2435
2459
|
x: e.left - t.left,
|
|
2436
2460
|
y: e.top - t.top,
|
|
2437
2461
|
scaleX: e.width / t.width,
|
|
@@ -2450,8 +2474,8 @@ function yr(e) {
|
|
|
2450
2474
|
a && s(null);
|
|
2451
2475
|
}, [a]), a;
|
|
2452
2476
|
}
|
|
2453
|
-
function
|
|
2454
|
-
let { animateLayoutChanges: t =
|
|
2477
|
+
function Dr(e) {
|
|
2478
|
+
let { animateLayoutChanges: t = xr, attributes: n, disabled: r, data: i, getNewIndex: s = br, id: l, strategy: d, resizeObserverConfig: f, transition: p = Sr } = e, { items: m, containerId: h, activeIndex: g, disabled: _, disableTransforms: v, sortedRects: y, overIndex: b, useDragOverlay: x, strategy: S } = a(vr), C = Or(r, _), w = m.indexOf(l), T = c(() => ({
|
|
2455
2479
|
sortable: {
|
|
2456
2480
|
containerId: h,
|
|
2457
2481
|
index: w,
|
|
@@ -2463,7 +2487,7 @@ function br(e) {
|
|
|
2463
2487
|
i,
|
|
2464
2488
|
w,
|
|
2465
2489
|
m
|
|
2466
|
-
]), E = c(() => m.slice(m.indexOf(l)), [m, l]), { rect: D, node:
|
|
2490
|
+
]), E = c(() => m.slice(m.indexOf(l)), [m, l]), { rect: D, node: O, isOver: k, setNodeRef: A } = sr({
|
|
2467
2491
|
id: l,
|
|
2468
2492
|
data: T,
|
|
2469
2493
|
disabled: C.droppable,
|
|
@@ -2471,98 +2495,98 @@ function br(e) {
|
|
|
2471
2495
|
updateMeasurementsFor: E,
|
|
2472
2496
|
...f
|
|
2473
2497
|
}
|
|
2474
|
-
}), { active:
|
|
2498
|
+
}), { active: j, activatorEvent: M, activeNodeRect: ee, attributes: N, setNodeRef: P, listeners: F, isDragging: I, over: te, setActivatorNodeRef: L, transform: R } = rr({
|
|
2475
2499
|
id: l,
|
|
2476
2500
|
data: T,
|
|
2477
2501
|
attributes: {
|
|
2478
|
-
...
|
|
2502
|
+
...Tr,
|
|
2479
2503
|
...n
|
|
2480
2504
|
},
|
|
2481
2505
|
disabled: C.draggable
|
|
2482
|
-
}),
|
|
2506
|
+
}), ne = Se(A, P), z = !!j, B = z && !v && ur(g) && ur(b), re = !x && I, ie = B ? (re && B ? R : null) ?? (d ?? S)({
|
|
2483
2507
|
rects: y,
|
|
2484
|
-
activeNodeRect:
|
|
2508
|
+
activeNodeRect: ee,
|
|
2485
2509
|
activeIndex: g,
|
|
2486
2510
|
overIndex: b,
|
|
2487
2511
|
index: w
|
|
2488
|
-
}) : null,
|
|
2512
|
+
}) : null, ae = ur(g) && ur(b) ? s({
|
|
2489
2513
|
id: l,
|
|
2490
2514
|
items: m,
|
|
2491
2515
|
activeIndex: g,
|
|
2492
2516
|
overIndex: b
|
|
2493
|
-
}) : w,
|
|
2494
|
-
activeId:
|
|
2517
|
+
}) : w, V = j?.id, H = u({
|
|
2518
|
+
activeId: V,
|
|
2495
2519
|
items: m,
|
|
2496
|
-
newIndex:
|
|
2520
|
+
newIndex: ae,
|
|
2497
2521
|
containerId: h
|
|
2498
|
-
}),
|
|
2499
|
-
active:
|
|
2522
|
+
}), oe = m !== H.current.items, U = t({
|
|
2523
|
+
active: j,
|
|
2500
2524
|
containerId: h,
|
|
2501
|
-
isDragging:
|
|
2502
|
-
isSorting:
|
|
2525
|
+
isDragging: I,
|
|
2526
|
+
isSorting: z,
|
|
2503
2527
|
id: l,
|
|
2504
2528
|
index: w,
|
|
2505
2529
|
items: m,
|
|
2506
|
-
newIndex:
|
|
2507
|
-
previousItems:
|
|
2508
|
-
previousContainerId:
|
|
2530
|
+
newIndex: H.current.newIndex,
|
|
2531
|
+
previousItems: H.current.items,
|
|
2532
|
+
previousContainerId: H.current.containerId,
|
|
2509
2533
|
transition: p,
|
|
2510
|
-
wasDragging:
|
|
2511
|
-
}),
|
|
2512
|
-
disabled: !
|
|
2534
|
+
wasDragging: H.current.activeId != null
|
|
2535
|
+
}), se = Er({
|
|
2536
|
+
disabled: !U,
|
|
2513
2537
|
index: w,
|
|
2514
|
-
node:
|
|
2538
|
+
node: O,
|
|
2515
2539
|
rect: D
|
|
2516
2540
|
});
|
|
2517
2541
|
return o(() => {
|
|
2518
|
-
|
|
2542
|
+
z && H.current.newIndex !== ae && (H.current.newIndex = ae), h !== H.current.containerId && (H.current.containerId = h), m !== H.current.items && (H.current.items = m);
|
|
2519
2543
|
}, [
|
|
2520
|
-
|
|
2521
|
-
|
|
2544
|
+
z,
|
|
2545
|
+
ae,
|
|
2522
2546
|
h,
|
|
2523
2547
|
m
|
|
2524
2548
|
]), o(() => {
|
|
2525
|
-
if (
|
|
2526
|
-
if (
|
|
2527
|
-
|
|
2549
|
+
if (V === H.current.activeId) return;
|
|
2550
|
+
if (V != null && H.current.activeId == null) {
|
|
2551
|
+
H.current.activeId = V;
|
|
2528
2552
|
return;
|
|
2529
2553
|
}
|
|
2530
2554
|
let e = setTimeout(() => {
|
|
2531
|
-
|
|
2555
|
+
H.current.activeId = V;
|
|
2532
2556
|
}, 50);
|
|
2533
2557
|
return () => clearTimeout(e);
|
|
2534
|
-
}, [
|
|
2535
|
-
active:
|
|
2558
|
+
}, [V]), {
|
|
2559
|
+
active: j,
|
|
2536
2560
|
activeIndex: g,
|
|
2537
|
-
attributes:
|
|
2561
|
+
attributes: N,
|
|
2538
2562
|
data: T,
|
|
2539
2563
|
rect: D,
|
|
2540
2564
|
index: w,
|
|
2541
|
-
newIndex:
|
|
2565
|
+
newIndex: ae,
|
|
2542
2566
|
items: m,
|
|
2543
|
-
isOver:
|
|
2544
|
-
isSorting:
|
|
2545
|
-
isDragging:
|
|
2546
|
-
listeners:
|
|
2547
|
-
node:
|
|
2567
|
+
isOver: k,
|
|
2568
|
+
isSorting: z,
|
|
2569
|
+
isDragging: I,
|
|
2570
|
+
listeners: F,
|
|
2571
|
+
node: O,
|
|
2548
2572
|
overIndex: b,
|
|
2549
|
-
over:
|
|
2550
|
-
setNodeRef:
|
|
2551
|
-
setActivatorNodeRef:
|
|
2552
|
-
setDroppableNodeRef:
|
|
2553
|
-
setDraggableNodeRef:
|
|
2554
|
-
transform:
|
|
2555
|
-
transition:
|
|
2573
|
+
over: te,
|
|
2574
|
+
setNodeRef: ne,
|
|
2575
|
+
setActivatorNodeRef: L,
|
|
2576
|
+
setDroppableNodeRef: A,
|
|
2577
|
+
setDraggableNodeRef: P,
|
|
2578
|
+
transform: se ?? ie,
|
|
2579
|
+
transition: W()
|
|
2556
2580
|
};
|
|
2557
|
-
function
|
|
2558
|
-
if (
|
|
2559
|
-
if (!(
|
|
2581
|
+
function W() {
|
|
2582
|
+
if (se || oe && H.current.newIndex === w) return wr;
|
|
2583
|
+
if (!(re && !He(M) || !p) && (z || U)) return Ge.Transition.toString({
|
|
2560
2584
|
...p,
|
|
2561
|
-
property:
|
|
2585
|
+
property: Cr
|
|
2562
2586
|
});
|
|
2563
2587
|
}
|
|
2564
2588
|
}
|
|
2565
|
-
function
|
|
2589
|
+
function Or(e, t) {
|
|
2566
2590
|
return typeof e == "boolean" ? {
|
|
2567
2591
|
draggable: e,
|
|
2568
2592
|
droppable: !1
|
|
@@ -2571,19 +2595,13 @@ function xr(e, t) {
|
|
|
2571
2595
|
droppable: e?.droppable ?? t.droppable
|
|
2572
2596
|
};
|
|
2573
2597
|
}
|
|
2574
|
-
|
|
2598
|
+
$.Down, $.Right, $.Up, $.Left;
|
|
2575
2599
|
//#endregion
|
|
2576
2600
|
//#region src/NavigationRenderer.tsx
|
|
2577
|
-
|
|
2578
|
-
|
|
2579
|
-
|
|
2580
|
-
|
|
2581
|
-
if (t) return t;
|
|
2582
|
-
if (F[e]) return Sr.set(e, F[e]), F[e];
|
|
2583
|
-
let n = e.split("-").filter(Boolean).map((e) => e.charAt(0).toUpperCase() + e.slice(1)).join("");
|
|
2584
|
-
return F[n] ? (Sr.set(e, F[n]), F[n]) : F.FileText;
|
|
2585
|
-
}
|
|
2586
|
-
function $(e, t) {
|
|
2601
|
+
function kr(e) {
|
|
2602
|
+
return e ? F(e) : ne;
|
|
2603
|
+
}
|
|
2604
|
+
function Ar(e, t) {
|
|
2587
2605
|
if (typeof e == "string") return e;
|
|
2588
2606
|
if (t) {
|
|
2589
2607
|
let n = t(e.key, {
|
|
@@ -2594,12 +2612,12 @@ function $(e, t) {
|
|
|
2594
2612
|
}
|
|
2595
2613
|
return e.defaultValue || e.key;
|
|
2596
2614
|
}
|
|
2597
|
-
function
|
|
2598
|
-
let
|
|
2599
|
-
return t && e.type === "object" && e.objectName &&
|
|
2615
|
+
function jr(e, t, n, r, i) {
|
|
2616
|
+
let a = Ar(e.label, n);
|
|
2617
|
+
return typeof e.label == "string" ? t && e.type === "object" && e.objectName ? t(e.objectName, a) : r && e.type === "dashboard" && e.dashboardName ? r(e.dashboardName, a) : i && e.type === "group" && e.id ? i(e.id, a) : a : a;
|
|
2600
2618
|
}
|
|
2601
|
-
var
|
|
2602
|
-
function
|
|
2619
|
+
var Mr = (e) => !(e === !1 || e === "false"), Nr = () => !0;
|
|
2620
|
+
function Pr(e, t) {
|
|
2603
2621
|
switch (e.type) {
|
|
2604
2622
|
case "object": {
|
|
2605
2623
|
let n = `${t}/${e.objectName ?? ""}`;
|
|
@@ -2630,37 +2648,37 @@ function Dr(e, t) {
|
|
|
2630
2648
|
};
|
|
2631
2649
|
}
|
|
2632
2650
|
}
|
|
2633
|
-
function
|
|
2651
|
+
function Fr(e, t) {
|
|
2634
2652
|
if (!t.trim()) return e;
|
|
2635
2653
|
let n = t.toLowerCase().trim();
|
|
2636
2654
|
return e.reduce((e, r) => {
|
|
2637
2655
|
if (r.type === "separator") return e;
|
|
2638
2656
|
if (r.type === "group" && r.children?.length) {
|
|
2639
|
-
let n =
|
|
2657
|
+
let n = Fr(r.children, t);
|
|
2640
2658
|
return n.length > 0 && e.push({
|
|
2641
2659
|
...r,
|
|
2642
2660
|
children: n
|
|
2643
2661
|
}), e;
|
|
2644
2662
|
}
|
|
2645
|
-
return
|
|
2663
|
+
return Ar(r.label).toLowerCase().includes(n) && e.push(r), e;
|
|
2646
2664
|
}, []);
|
|
2647
2665
|
}
|
|
2648
|
-
var
|
|
2649
|
-
function
|
|
2650
|
-
let { attributes:
|
|
2666
|
+
var Ir = 5;
|
|
2667
|
+
function Lr({ item: e, basePath: t, evalVis: n, checkPerm: r, onAction: i, enablePinning: a, onPinToggle: o, enableReorder: s, resolveObjectLabel: c, resolveDashboardLabel: l, resolveGroupLabel: u, t: d }) {
|
|
2668
|
+
let { attributes: f, listeners: p, setNodeRef: m, transform: h, transition: g, isDragging: _ } = Dr({
|
|
2651
2669
|
id: e.id,
|
|
2652
2670
|
disabled: !s
|
|
2653
2671
|
});
|
|
2654
|
-
return /* @__PURE__ */ (0,
|
|
2655
|
-
ref:
|
|
2672
|
+
return /* @__PURE__ */ (0, G.jsx)("div", {
|
|
2673
|
+
ref: m,
|
|
2656
2674
|
style: {
|
|
2657
|
-
transform:
|
|
2658
|
-
transition:
|
|
2659
|
-
opacity:
|
|
2660
|
-
zIndex:
|
|
2675
|
+
transform: Ge.Transform.toString(h),
|
|
2676
|
+
transition: g,
|
|
2677
|
+
opacity: _ ? .5 : void 0,
|
|
2678
|
+
zIndex: _ ? 10 : void 0
|
|
2661
2679
|
},
|
|
2662
|
-
...
|
|
2663
|
-
children: /* @__PURE__ */ (0,
|
|
2680
|
+
...f,
|
|
2681
|
+
children: /* @__PURE__ */ (0, G.jsx)(Rr, {
|
|
2664
2682
|
item: e,
|
|
2665
2683
|
basePath: t,
|
|
2666
2684
|
evalVis: n,
|
|
@@ -2668,28 +2686,30 @@ function Ar({ item: e, basePath: t, evalVis: n, checkPerm: r, onAction: i, enabl
|
|
|
2668
2686
|
onAction: i,
|
|
2669
2687
|
enablePinning: a,
|
|
2670
2688
|
onPinToggle: o,
|
|
2671
|
-
dragListeners: s ?
|
|
2689
|
+
dragListeners: s ? p : void 0,
|
|
2672
2690
|
resolveObjectLabel: c,
|
|
2673
|
-
|
|
2691
|
+
resolveDashboardLabel: l,
|
|
2692
|
+
resolveGroupLabel: u,
|
|
2693
|
+
t: d
|
|
2674
2694
|
})
|
|
2675
2695
|
});
|
|
2676
2696
|
}
|
|
2677
|
-
function
|
|
2678
|
-
let
|
|
2697
|
+
function Rr({ item: e, basePath: t, evalVis: n, checkPerm: r, onAction: i, enablePinning: a, onPinToggle: o, dragListeners: s, resolveObjectLabel: c, resolveDashboardLabel: l, resolveGroupLabel: u, t: g }) {
|
|
2698
|
+
let v = L(), [y, b] = d(e.defaultOpen !== !1);
|
|
2679
2699
|
if (!n(e.visible) || e.requiredPermissions?.length && !r(e.requiredPermissions)) return null;
|
|
2680
|
-
if (e.type === "separator") return /* @__PURE__ */ (0,
|
|
2700
|
+
if (e.type === "separator") return /* @__PURE__ */ (0, G.jsx)(_, { className: "my-2" });
|
|
2681
2701
|
if (e.type === "group") {
|
|
2682
2702
|
let s = (e.children ?? []).slice().sort((e, t) => (e.order ?? 0) - (t.order ?? 0));
|
|
2683
|
-
return /* @__PURE__ */ (0,
|
|
2684
|
-
open:
|
|
2685
|
-
onOpenChange:
|
|
2686
|
-
children: /* @__PURE__ */ (0,
|
|
2703
|
+
return /* @__PURE__ */ (0, G.jsx)(p, {
|
|
2704
|
+
open: y,
|
|
2705
|
+
onOpenChange: b,
|
|
2706
|
+
children: /* @__PURE__ */ (0, G.jsxs)(x, { children: [/* @__PURE__ */ (0, G.jsx)(C, {
|
|
2687
2707
|
asChild: !0,
|
|
2688
|
-
children: /* @__PURE__ */ (0,
|
|
2708
|
+
children: /* @__PURE__ */ (0, G.jsxs)(h, {
|
|
2689
2709
|
className: "flex w-full items-center justify-between",
|
|
2690
|
-
children: [
|
|
2710
|
+
children: [jr(e, c, g, l, u), /* @__PURE__ */ (0, G.jsx)(R, { className: `ml-auto h-4 w-4 transition-transform ${y ? "rotate-90" : ""}` })]
|
|
2691
2711
|
})
|
|
2692
|
-
}), /* @__PURE__ */ (0,
|
|
2712
|
+
}), /* @__PURE__ */ (0, G.jsx)(m, { children: /* @__PURE__ */ (0, G.jsx)(S, { children: /* @__PURE__ */ (0, G.jsx)(D, { children: s.map((e) => /* @__PURE__ */ (0, G.jsx)(Rr, {
|
|
2693
2713
|
item: e,
|
|
2694
2714
|
basePath: t,
|
|
2695
2715
|
evalVis: n,
|
|
@@ -2698,88 +2718,96 @@ function jr({ item: e, basePath: t, evalVis: n, checkPerm: r, onAction: i, enabl
|
|
|
2698
2718
|
enablePinning: a,
|
|
2699
2719
|
onPinToggle: o,
|
|
2700
2720
|
resolveObjectLabel: c,
|
|
2701
|
-
|
|
2721
|
+
resolveDashboardLabel: l,
|
|
2722
|
+
resolveGroupLabel: u,
|
|
2723
|
+
t: g
|
|
2702
2724
|
}, e.id)) }) }) })] })
|
|
2703
2725
|
});
|
|
2704
2726
|
}
|
|
2705
2727
|
if (e.type === "action") {
|
|
2706
|
-
let t =
|
|
2707
|
-
return /* @__PURE__ */ (0,
|
|
2708
|
-
s && /* @__PURE__ */ (0,
|
|
2728
|
+
let t = kr(e.icon), n = Ar(e.label, g);
|
|
2729
|
+
return /* @__PURE__ */ (0, G.jsxs)(A, { children: [
|
|
2730
|
+
s && /* @__PURE__ */ (0, G.jsx)("span", {
|
|
2709
2731
|
className: "absolute left-0.5 top-1/2 -translate-y-1/2 cursor-grab text-muted-foreground",
|
|
2710
|
-
"aria-label": "Drag to reorder",
|
|
2732
|
+
"aria-label": g ? g("console.nav.dragToReorder", { defaultValue: "Drag to reorder" }) : "Drag to reorder",
|
|
2711
2733
|
...s,
|
|
2712
|
-
children: /* @__PURE__ */ (0,
|
|
2734
|
+
children: /* @__PURE__ */ (0, G.jsx)(z, { className: "h-3.5 w-3.5" })
|
|
2713
2735
|
}),
|
|
2714
|
-
/* @__PURE__ */ (0,
|
|
2715
|
-
tooltip:
|
|
2736
|
+
/* @__PURE__ */ (0, G.jsxs)(k, {
|
|
2737
|
+
tooltip: n,
|
|
2716
2738
|
onClick: () => i?.(e),
|
|
2717
2739
|
children: [
|
|
2718
|
-
/* @__PURE__ */ (0,
|
|
2719
|
-
/* @__PURE__ */ (0,
|
|
2720
|
-
e.badge != null && /* @__PURE__ */ (0,
|
|
2740
|
+
/* @__PURE__ */ (0, G.jsx)(t, { className: "h-4 w-4" }),
|
|
2741
|
+
/* @__PURE__ */ (0, G.jsx)("span", { children: n }),
|
|
2742
|
+
e.badge != null && /* @__PURE__ */ (0, G.jsx)(f, {
|
|
2721
2743
|
variant: e.badgeVariant ?? "default",
|
|
2722
2744
|
className: "ml-auto text-[10px] px-1.5 py-0",
|
|
2723
2745
|
children: e.badge
|
|
2724
2746
|
})
|
|
2725
2747
|
]
|
|
2726
2748
|
}),
|
|
2727
|
-
a && o && /* @__PURE__ */ (0,
|
|
2749
|
+
a && o && /* @__PURE__ */ (0, G.jsx)(O, {
|
|
2728
2750
|
showOnHover: !0,
|
|
2729
2751
|
onClick: () => o(e.id, !e.pinned),
|
|
2730
|
-
"aria-label": e.pinned ?
|
|
2731
|
-
|
|
2752
|
+
"aria-label": g ? g(e.pinned ? "console.nav.unpinItem" : "console.nav.pinItem", {
|
|
2753
|
+
defaultValue: e.pinned ? `Unpin ${n}` : `Pin ${n}`,
|
|
2754
|
+
name: n
|
|
2755
|
+
}) : e.pinned ? `Unpin ${n}` : `Pin ${n}`,
|
|
2756
|
+
children: e.pinned ? /* @__PURE__ */ (0, G.jsx)(ie, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ (0, G.jsx)(re, { className: "h-3.5 w-3.5" })
|
|
2732
2757
|
})
|
|
2733
2758
|
] });
|
|
2734
2759
|
}
|
|
2735
|
-
let
|
|
2736
|
-
/* @__PURE__ */ (0,
|
|
2737
|
-
/* @__PURE__ */ (0,
|
|
2738
|
-
e.badge != null && /* @__PURE__ */ (0,
|
|
2760
|
+
let w = kr(e.icon), { href: T, external: E } = Pr(e, t), j = T !== "#" && v.pathname.startsWith(T), M = jr(e, c, g, l, u), ee = /* @__PURE__ */ (0, G.jsxs)(G.Fragment, { children: [
|
|
2761
|
+
/* @__PURE__ */ (0, G.jsx)(w, { className: "h-4 w-4" }),
|
|
2762
|
+
/* @__PURE__ */ (0, G.jsx)("span", { children: M }),
|
|
2763
|
+
e.badge != null && /* @__PURE__ */ (0, G.jsx)(f, {
|
|
2739
2764
|
variant: e.badgeVariant ?? "default",
|
|
2740
2765
|
className: "ml-auto text-[10px] px-1.5 py-0",
|
|
2741
2766
|
children: e.badge
|
|
2742
2767
|
})
|
|
2743
2768
|
] });
|
|
2744
|
-
return /* @__PURE__ */ (0,
|
|
2745
|
-
s && /* @__PURE__ */ (0,
|
|
2769
|
+
return /* @__PURE__ */ (0, G.jsxs)(A, { children: [
|
|
2770
|
+
s && /* @__PURE__ */ (0, G.jsx)("span", {
|
|
2746
2771
|
className: "absolute left-0.5 top-1/2 -translate-y-1/2 cursor-grab text-muted-foreground",
|
|
2747
|
-
"aria-label": "Drag to reorder",
|
|
2772
|
+
"aria-label": g ? g("console.nav.dragToReorder", { defaultValue: "Drag to reorder" }) : "Drag to reorder",
|
|
2748
2773
|
...s,
|
|
2749
|
-
children: /* @__PURE__ */ (0,
|
|
2774
|
+
children: /* @__PURE__ */ (0, G.jsx)(z, { className: "h-3.5 w-3.5" })
|
|
2750
2775
|
}),
|
|
2751
|
-
/* @__PURE__ */ (0,
|
|
2776
|
+
/* @__PURE__ */ (0, G.jsx)(k, {
|
|
2752
2777
|
asChild: !0,
|
|
2753
|
-
isActive:
|
|
2754
|
-
tooltip:
|
|
2755
|
-
children:
|
|
2756
|
-
href:
|
|
2778
|
+
isActive: j,
|
|
2779
|
+
tooltip: M,
|
|
2780
|
+
children: E ? /* @__PURE__ */ (0, G.jsx)("a", {
|
|
2781
|
+
href: T,
|
|
2757
2782
|
target: "_blank",
|
|
2758
2783
|
rel: "noopener noreferrer",
|
|
2759
|
-
children:
|
|
2760
|
-
}) : /* @__PURE__ */ (0,
|
|
2761
|
-
to:
|
|
2762
|
-
children:
|
|
2784
|
+
children: ee
|
|
2785
|
+
}) : /* @__PURE__ */ (0, G.jsx)(I, {
|
|
2786
|
+
to: T,
|
|
2787
|
+
children: ee
|
|
2763
2788
|
})
|
|
2764
2789
|
}),
|
|
2765
|
-
a && o && /* @__PURE__ */ (0,
|
|
2790
|
+
a && o && /* @__PURE__ */ (0, G.jsx)(O, {
|
|
2766
2791
|
showOnHover: !0,
|
|
2767
2792
|
onClick: () => o(e.id, !e.pinned),
|
|
2768
|
-
"aria-label": e.pinned ?
|
|
2769
|
-
|
|
2793
|
+
"aria-label": g ? g(e.pinned ? "console.nav.unpinItem" : "console.nav.pinItem", {
|
|
2794
|
+
defaultValue: e.pinned ? `Unpin ${M}` : `Pin ${M}`,
|
|
2795
|
+
name: M
|
|
2796
|
+
}) : e.pinned ? `Unpin ${M}` : `Pin ${M}`,
|
|
2797
|
+
children: e.pinned ? /* @__PURE__ */ (0, G.jsx)(ie, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ (0, G.jsx)(re, { className: "h-3.5 w-3.5" })
|
|
2770
2798
|
})
|
|
2771
2799
|
] });
|
|
2772
2800
|
}
|
|
2773
|
-
function
|
|
2774
|
-
let
|
|
2801
|
+
function zr({ items: e, basePath: t = "", evaluateVisibility: n = Mr, checkPermission: r = Nr, onAction: i, searchQuery: a, enablePinning: o, onPinToggle: s, enableReorder: l, onReorder: u, resolveObjectLabel: d, resolveDashboardLabel: f, resolveGroupLabel: p, t: m }) {
|
|
2802
|
+
let h = c(() => a ? Fr(e, a) : e, [e, a]), g = c(() => Br(h), [h]), _ = h.slice().sort((e, t) => (e.order ?? 0) - (t.order ?? 0)), v = ot(at(nn, { activationConstraint: { distance: Ir } }), at(Zt)), y = (e) => {
|
|
2775
2803
|
let { active: t, over: n } = e;
|
|
2776
2804
|
if (!n || t.id === n.id || !u) return;
|
|
2777
|
-
let r =
|
|
2778
|
-
r === -1 || i === -1 || u(
|
|
2805
|
+
let r = _.findIndex((e) => e.id === t.id), i = _.findIndex((e) => e.id === n.id);
|
|
2806
|
+
r === -1 || i === -1 || u(cr(_, r, i).map((e, t) => ({
|
|
2779
2807
|
...e,
|
|
2780
2808
|
order: t
|
|
2781
2809
|
})));
|
|
2782
|
-
},
|
|
2810
|
+
}, b = {
|
|
2783
2811
|
basePath: t,
|
|
2784
2812
|
evalVis: n,
|
|
2785
2813
|
checkPerm: r,
|
|
@@ -2787,132 +2815,134 @@ function Mr({ items: e, basePath: t = "", evaluateVisibility: n = Tr, checkPermi
|
|
|
2787
2815
|
enablePinning: o,
|
|
2788
2816
|
onPinToggle: s,
|
|
2789
2817
|
resolveObjectLabel: d,
|
|
2790
|
-
|
|
2791
|
-
|
|
2818
|
+
resolveDashboardLabel: f,
|
|
2819
|
+
resolveGroupLabel: p,
|
|
2820
|
+
t: m
|
|
2821
|
+
}, w = _.some((e) => e.type === "group"), T = g.length > 0 && o ? /* @__PURE__ */ (0, G.jsxs)(x, { children: [/* @__PURE__ */ (0, G.jsxs)(C, {
|
|
2792
2822
|
className: "flex items-center gap-1.5",
|
|
2793
|
-
children: [/* @__PURE__ */ (0,
|
|
2794
|
-
}), /* @__PURE__ */ (0,
|
|
2823
|
+
children: [/* @__PURE__ */ (0, G.jsx)(V, { className: "h-3.5 w-3.5" }), m ? m("console.nav.favorites", { defaultValue: "Favorites" }) : "Favorites"]
|
|
2824
|
+
}), /* @__PURE__ */ (0, G.jsx)(S, { children: /* @__PURE__ */ (0, G.jsx)(D, { children: g.map((e) => /* @__PURE__ */ (0, G.jsx)(Rr, {
|
|
2795
2825
|
item: e,
|
|
2796
|
-
...
|
|
2826
|
+
...b
|
|
2797
2827
|
}, `fav-${e.id}`)) }) })] }) : null;
|
|
2798
|
-
if (!
|
|
2799
|
-
let e =
|
|
2800
|
-
return /* @__PURE__ */ (0,
|
|
2801
|
-
sensors:
|
|
2802
|
-
collisionDetection:
|
|
2803
|
-
onDragEnd:
|
|
2804
|
-
children: /* @__PURE__ */ (0,
|
|
2828
|
+
if (!w) {
|
|
2829
|
+
let e = _.filter((e) => e.type !== "group").map((e) => e.id);
|
|
2830
|
+
return /* @__PURE__ */ (0, G.jsxs)(G.Fragment, { children: [T, /* @__PURE__ */ (0, G.jsx)(x, { children: /* @__PURE__ */ (0, G.jsx)(S, { children: l ? /* @__PURE__ */ (0, G.jsx)($n, {
|
|
2831
|
+
sensors: v,
|
|
2832
|
+
collisionDetection: ft,
|
|
2833
|
+
onDragEnd: y,
|
|
2834
|
+
children: /* @__PURE__ */ (0, G.jsx)(yr, {
|
|
2805
2835
|
items: e,
|
|
2806
|
-
strategy:
|
|
2807
|
-
children: /* @__PURE__ */ (0,
|
|
2836
|
+
strategy: hr,
|
|
2837
|
+
children: /* @__PURE__ */ (0, G.jsx)(D, { children: _.map((e) => /* @__PURE__ */ (0, G.jsx)(Lr, {
|
|
2808
2838
|
item: e,
|
|
2809
2839
|
enableReorder: l,
|
|
2810
|
-
...
|
|
2840
|
+
...b
|
|
2811
2841
|
}, e.id)) })
|
|
2812
2842
|
})
|
|
2813
|
-
}) : /* @__PURE__ */ (0,
|
|
2843
|
+
}) : /* @__PURE__ */ (0, G.jsx)(D, { children: _.map((e) => /* @__PURE__ */ (0, G.jsx)(Rr, {
|
|
2814
2844
|
item: e,
|
|
2815
|
-
...
|
|
2845
|
+
...b
|
|
2816
2846
|
}, e.id)) }) }) })] });
|
|
2817
2847
|
}
|
|
2818
|
-
let
|
|
2819
|
-
if (
|
|
2820
|
-
let t =
|
|
2821
|
-
|
|
2848
|
+
let E = [], O = [], k = (e) => {
|
|
2849
|
+
if (O.length === 0) return;
|
|
2850
|
+
let t = O;
|
|
2851
|
+
O = [], E.push(/* @__PURE__ */ (0, G.jsx)(x, { children: /* @__PURE__ */ (0, G.jsx)(S, { children: /* @__PURE__ */ (0, G.jsx)(D, { children: t.map((e) => /* @__PURE__ */ (0, G.jsx)(Rr, {
|
|
2822
2852
|
item: e,
|
|
2823
|
-
...
|
|
2853
|
+
...b
|
|
2824
2854
|
}, e.id)) }) }) }, e));
|
|
2825
2855
|
};
|
|
2826
|
-
return
|
|
2827
|
-
e.type === "group" ? (
|
|
2856
|
+
return _.forEach((e, t) => {
|
|
2857
|
+
e.type === "group" ? (k(`leaf-${t}`), E.push(/* @__PURE__ */ (0, G.jsx)(Rr, {
|
|
2828
2858
|
item: e,
|
|
2829
|
-
...
|
|
2830
|
-
}, e.id))) :
|
|
2831
|
-
}),
|
|
2859
|
+
...b
|
|
2860
|
+
}, e.id))) : O.push(e);
|
|
2861
|
+
}), k("leaf-end"), /* @__PURE__ */ (0, G.jsxs)(G.Fragment, { children: [T, E] });
|
|
2832
2862
|
}
|
|
2833
|
-
function
|
|
2863
|
+
function Br(e) {
|
|
2834
2864
|
let t = [];
|
|
2835
|
-
for (let n of e) n.pinned && n.type !== "group" && n.type !== "separator" && t.push(n), n.children?.length && t.push(...
|
|
2865
|
+
for (let n of e) n.pinned && n.type !== "group" && n.type !== "separator" && t.push(n), n.children?.length && t.push(...Br(n.children));
|
|
2836
2866
|
return t;
|
|
2837
2867
|
}
|
|
2838
2868
|
//#endregion
|
|
2839
2869
|
//#region src/AppSchemaRenderer.tsx
|
|
2840
|
-
function
|
|
2870
|
+
function Vr({ areas: e, activeAreaId: t, onAreaChange: n, evalVis: r, checkPerm: i }) {
|
|
2841
2871
|
let a = e.filter((e) => !(!r(e.visible) || e.requiredPermissions?.length && !i(e.requiredPermissions)));
|
|
2842
|
-
return a.length <= 1 ? null : /* @__PURE__ */ (0,
|
|
2872
|
+
return a.length <= 1 ? null : /* @__PURE__ */ (0, G.jsxs)(x, { children: [/* @__PURE__ */ (0, G.jsxs)(C, {
|
|
2843
2873
|
className: "flex items-center gap-1.5",
|
|
2844
|
-
children: [/* @__PURE__ */ (0,
|
|
2845
|
-
}), /* @__PURE__ */ (0,
|
|
2846
|
-
let r =
|
|
2847
|
-
return /* @__PURE__ */ (0,
|
|
2874
|
+
children: [/* @__PURE__ */ (0, G.jsx)(B, { className: "h-3.5 w-3.5" }), "Area"]
|
|
2875
|
+
}), /* @__PURE__ */ (0, G.jsx)(S, { children: /* @__PURE__ */ (0, G.jsx)(D, { children: a.map((e) => {
|
|
2876
|
+
let r = kr(e.icon);
|
|
2877
|
+
return /* @__PURE__ */ (0, G.jsx)(A, { children: /* @__PURE__ */ (0, G.jsxs)(k, {
|
|
2848
2878
|
isActive: e.id === t,
|
|
2849
|
-
tooltip:
|
|
2879
|
+
tooltip: Ar(e.label),
|
|
2850
2880
|
onClick: () => n(e.id),
|
|
2851
|
-
children: [/* @__PURE__ */ (0,
|
|
2881
|
+
children: [/* @__PURE__ */ (0, G.jsx)(r, { className: "h-4 w-4" }), /* @__PURE__ */ (0, G.jsx)("span", { children: Ar(e.label) })]
|
|
2852
2882
|
}) }, e.id);
|
|
2853
2883
|
}) }) })] });
|
|
2854
2884
|
}
|
|
2855
|
-
function
|
|
2856
|
-
let n =
|
|
2857
|
-
return r.length === 0 ? null : /* @__PURE__ */ (0,
|
|
2885
|
+
function Hr({ items: e, basePath: t }) {
|
|
2886
|
+
let n = L(), r = e.filter((e) => e.type !== "group" && e.type !== "separator").slice(0, 5);
|
|
2887
|
+
return r.length === 0 ? null : /* @__PURE__ */ (0, G.jsx)("div", {
|
|
2858
2888
|
className: "fixed bottom-0 left-0 right-0 z-50 flex items-center justify-around border-t bg-background/95 backdrop-blur-sm px-2 py-1 sm:hidden safe-area-bottom",
|
|
2859
2889
|
role: "navigation",
|
|
2860
2890
|
"aria-label": "Mobile navigation",
|
|
2861
2891
|
children: r.map((e) => {
|
|
2862
|
-
let r =
|
|
2892
|
+
let r = kr(e.icon), i = "#";
|
|
2863
2893
|
e.type === "object" ? (i = `${t}/${e.objectName}`, e.viewName && (i += `/view/${e.viewName}`)) : e.type === "dashboard" ? i = e.dashboardName ? `${t}/dashboard/${e.dashboardName}` : "#" : e.type === "page" ? i = e.pageName ? `${t}/page/${e.pageName}` : "#" : e.type === "report" ? i = e.reportName ? `${t}/report/${e.reportName}` : "#" : e.type === "url" && (i = e.url ?? "#");
|
|
2864
2894
|
let a = i !== "#" && n.pathname.startsWith(i);
|
|
2865
|
-
return /* @__PURE__ */ (0,
|
|
2895
|
+
return /* @__PURE__ */ (0, G.jsxs)(I, {
|
|
2866
2896
|
to: i,
|
|
2867
2897
|
className: `flex flex-col items-center gap-0.5 px-2 py-1.5 transition-colors min-w-[44px] min-h-[44px] justify-center ${a ? "text-primary" : "text-muted-foreground hover:text-foreground"}`,
|
|
2868
|
-
children: [/* @__PURE__ */ (0,
|
|
2898
|
+
children: [/* @__PURE__ */ (0, G.jsx)(r, { className: "h-5 w-5" }), /* @__PURE__ */ (0, G.jsx)("span", {
|
|
2869
2899
|
className: "text-[10px] truncate max-w-[60px]",
|
|
2870
|
-
children:
|
|
2900
|
+
children: Ar(e.label)
|
|
2871
2901
|
})]
|
|
2872
2902
|
}, e.id);
|
|
2873
2903
|
})
|
|
2874
2904
|
});
|
|
2875
2905
|
}
|
|
2876
|
-
function
|
|
2877
|
-
let _ =
|
|
2878
|
-
return /* @__PURE__ */ (0,
|
|
2906
|
+
function Ur({ schema: e, basePath: t, evalVis: n, checkPerm: r, onAction: i, sidebarHeader: a, sidebarFooter: o, sidebarExtra: s, activeAreaId: c, setActiveAreaId: l, resolvedNavigation: u, enableSearch: f, enablePinning: p, onPinToggle: m, enableReorder: h, onReorder: g }) {
|
|
2907
|
+
let _ = kr(e.logo), x = e.areas ?? [], [S, C] = d("");
|
|
2908
|
+
return /* @__PURE__ */ (0, G.jsxs)(v, {
|
|
2879
2909
|
collapsible: "icon",
|
|
2880
2910
|
children: [
|
|
2881
|
-
/* @__PURE__ */ (0,
|
|
2911
|
+
/* @__PURE__ */ (0, G.jsxs)(w, { children: [a ?? /* @__PURE__ */ (0, G.jsx)(D, { children: /* @__PURE__ */ (0, G.jsx)(A, { children: /* @__PURE__ */ (0, G.jsxs)(k, {
|
|
2882
2912
|
size: "lg",
|
|
2883
2913
|
tooltip: e.title ?? e.name,
|
|
2884
|
-
children: [/* @__PURE__ */ (0,
|
|
2914
|
+
children: [/* @__PURE__ */ (0, G.jsx)("div", {
|
|
2885
2915
|
className: "flex aspect-square size-8 items-center justify-center rounded-lg bg-primary text-primary-foreground",
|
|
2886
|
-
children: e.logo && e.logo.startsWith("http") ? /* @__PURE__ */ (0,
|
|
2916
|
+
children: e.logo && e.logo.startsWith("http") ? /* @__PURE__ */ (0, G.jsx)("img", {
|
|
2887
2917
|
src: e.logo,
|
|
2888
2918
|
alt: e.title ?? "",
|
|
2889
2919
|
className: "size-6 object-contain"
|
|
2890
|
-
}) : /* @__PURE__ */ (0,
|
|
2891
|
-
}), /* @__PURE__ */ (0,
|
|
2920
|
+
}) : /* @__PURE__ */ (0, G.jsx)(_, { className: "size-4" })
|
|
2921
|
+
}), /* @__PURE__ */ (0, G.jsxs)("div", {
|
|
2892
2922
|
className: "grid flex-1 text-left text-sm leading-tight",
|
|
2893
|
-
children: [/* @__PURE__ */ (0,
|
|
2923
|
+
children: [/* @__PURE__ */ (0, G.jsx)("span", {
|
|
2894
2924
|
className: "truncate font-semibold",
|
|
2895
2925
|
children: e.title ?? e.name ?? "App"
|
|
2896
|
-
}), e.description && /* @__PURE__ */ (0,
|
|
2926
|
+
}), e.description && /* @__PURE__ */ (0, G.jsx)("span", {
|
|
2897
2927
|
className: "truncate text-xs text-muted-foreground",
|
|
2898
2928
|
children: e.description
|
|
2899
2929
|
})]
|
|
2900
2930
|
})]
|
|
2901
|
-
}) }) }), f && /* @__PURE__ */ (0,
|
|
2931
|
+
}) }) }), f && /* @__PURE__ */ (0, G.jsx)(T, {
|
|
2902
2932
|
placeholder: "Search navigation…",
|
|
2903
2933
|
value: S,
|
|
2904
2934
|
onChange: (e) => C(e.target.value),
|
|
2905
2935
|
"aria-label": "Search navigation"
|
|
2906
2936
|
})] }),
|
|
2907
|
-
/* @__PURE__ */ (0,
|
|
2908
|
-
x.length > 1 && c && /* @__PURE__ */ (0,
|
|
2937
|
+
/* @__PURE__ */ (0, G.jsxs)(y, { children: [
|
|
2938
|
+
x.length > 1 && c && /* @__PURE__ */ (0, G.jsx)(Vr, {
|
|
2909
2939
|
areas: x,
|
|
2910
2940
|
activeAreaId: c,
|
|
2911
2941
|
onAreaChange: l,
|
|
2912
2942
|
evalVis: n,
|
|
2913
2943
|
checkPerm: r
|
|
2914
2944
|
}),
|
|
2915
|
-
/* @__PURE__ */ (0,
|
|
2945
|
+
/* @__PURE__ */ (0, G.jsx)(zr, {
|
|
2916
2946
|
items: u,
|
|
2917
2947
|
basePath: t,
|
|
2918
2948
|
evaluateVisibility: n,
|
|
@@ -2926,22 +2956,22 @@ function Ir({ schema: e, basePath: t, evalVis: n, checkPerm: r, onAction: i, sid
|
|
|
2926
2956
|
}),
|
|
2927
2957
|
s
|
|
2928
2958
|
] }),
|
|
2929
|
-
o && /* @__PURE__ */ (0,
|
|
2959
|
+
o && /* @__PURE__ */ (0, G.jsx)(b, { children: o })
|
|
2930
2960
|
]
|
|
2931
2961
|
});
|
|
2932
2962
|
}
|
|
2933
|
-
function
|
|
2934
|
-
let x = r ?? ((e) => !(e === !1 || e === "false")), S = i ?? (() => !0), C = c(() => (e.menu ?? []).map((e, t) =>
|
|
2963
|
+
function Wr({ schema: e, basePath: t = "", mobileNavMode: n = "drawer", evaluateVisibility: r, checkPermission: i, onAction: a, navbar: s, sidebarHeader: l, sidebarFooter: u, sidebarExtra: f, children: p, className: m, defaultOpen: h = !0, enableSearch: g, enablePinning: _, onPinToggle: v, enableReorder: y, onReorder: b }) {
|
|
2964
|
+
let x = r ?? ((e) => !(e === !1 || e === "false")), S = i ?? (() => !0), C = c(() => (e.menu ?? []).map((e, t) => U(e, t)), [e.menu]), w = e.navigation ?? C, T = e.areas ?? [], [E, D] = d(() => T.length > 0 ? T[0].id : null), O = T.map((e) => e.id).join(",");
|
|
2935
2965
|
o(() => {
|
|
2936
2966
|
T.length > 0 ? D((e) => T.some((t) => t.id === e) ? e : T[0].id) : D(null);
|
|
2937
|
-
}, [e.name,
|
|
2938
|
-
let
|
|
2967
|
+
}, [e.name, O]);
|
|
2968
|
+
let k = T.find((e) => e.id === E)?.navigation ?? w, A = {
|
|
2939
2969
|
title: e.title,
|
|
2940
2970
|
favicon: e.favicon,
|
|
2941
2971
|
logo: e.logo
|
|
2942
2972
|
};
|
|
2943
|
-
return /* @__PURE__ */ (0,
|
|
2944
|
-
sidebar: /* @__PURE__ */ (0,
|
|
2973
|
+
return /* @__PURE__ */ (0, G.jsxs)(G.Fragment, { children: [/* @__PURE__ */ (0, G.jsx)(ge, {
|
|
2974
|
+
sidebar: /* @__PURE__ */ (0, G.jsx)(Ur, {
|
|
2945
2975
|
schema: e,
|
|
2946
2976
|
basePath: t,
|
|
2947
2977
|
evalVis: x,
|
|
@@ -2952,7 +2982,7 @@ function Lr({ schema: e, basePath: t = "", mobileNavMode: n = "drawer", evaluate
|
|
|
2952
2982
|
sidebarExtra: f,
|
|
2953
2983
|
activeAreaId: E,
|
|
2954
2984
|
setActiveAreaId: D,
|
|
2955
|
-
resolvedNavigation:
|
|
2985
|
+
resolvedNavigation: k,
|
|
2956
2986
|
enableSearch: g,
|
|
2957
2987
|
enablePinning: _,
|
|
2958
2988
|
onPinToggle: v,
|
|
@@ -2962,28 +2992,28 @@ function Lr({ schema: e, basePath: t = "", mobileNavMode: n = "drawer", evaluate
|
|
|
2962
2992
|
navbar: s,
|
|
2963
2993
|
className: m,
|
|
2964
2994
|
defaultOpen: h,
|
|
2965
|
-
branding:
|
|
2995
|
+
branding: A,
|
|
2966
2996
|
children: p
|
|
2967
|
-
}), n === "bottom_nav" && /* @__PURE__ */ (0,
|
|
2968
|
-
items:
|
|
2997
|
+
}), n === "bottom_nav" && /* @__PURE__ */ (0, G.jsx)(Hr, {
|
|
2998
|
+
items: k,
|
|
2969
2999
|
basePath: t
|
|
2970
3000
|
})] });
|
|
2971
3001
|
}
|
|
2972
3002
|
//#endregion
|
|
2973
3003
|
//#region src/Page.tsx
|
|
2974
|
-
var
|
|
2975
|
-
function
|
|
2976
|
-
let a =
|
|
2977
|
-
return /* @__PURE__ */ (0,
|
|
3004
|
+
var Gr = (e) => e ? Array.isArray(e) ? e : [e] : [];
|
|
3005
|
+
function Kr({ schema: e, className: t, style: n, id: r, ...i }) {
|
|
3006
|
+
let a = Gr(e.children);
|
|
3007
|
+
return /* @__PURE__ */ (0, G.jsxs)("div", {
|
|
2978
3008
|
id: r || e.id,
|
|
2979
|
-
className:
|
|
3009
|
+
className: P("flex flex-col h-full space-y-4", t),
|
|
2980
3010
|
style: n,
|
|
2981
|
-
children: [/* @__PURE__ */ (0,
|
|
3011
|
+
children: [/* @__PURE__ */ (0, G.jsx)(de, {
|
|
2982
3012
|
title: e.title,
|
|
2983
3013
|
description: e.description
|
|
2984
|
-
}), /* @__PURE__ */ (0,
|
|
3014
|
+
}), /* @__PURE__ */ (0, G.jsx)("div", {
|
|
2985
3015
|
className: "flex-1 overflow-auto",
|
|
2986
|
-
children: a.map((e, t) => /* @__PURE__ */ (0,
|
|
3016
|
+
children: a.map((e, t) => /* @__PURE__ */ (0, G.jsx)(se, {
|
|
2987
3017
|
schema: e,
|
|
2988
3018
|
...i
|
|
2989
3019
|
}, e?.id || t))
|
|
@@ -2992,38 +3022,38 @@ function zr({ schema: e, className: t, style: n, id: r, ...i }) {
|
|
|
2992
3022
|
}
|
|
2993
3023
|
//#endregion
|
|
2994
3024
|
//#region src/SidebarNav.tsx
|
|
2995
|
-
function
|
|
3025
|
+
function qr(e) {
|
|
2996
3026
|
return "items" in e && !("href" in e);
|
|
2997
3027
|
}
|
|
2998
|
-
function
|
|
2999
|
-
return e.children && e.children.length > 0 ? /* @__PURE__ */ (0,
|
|
3028
|
+
function Jr({ item: e, pathname: t }) {
|
|
3029
|
+
return e.children && e.children.length > 0 ? /* @__PURE__ */ (0, G.jsx)(p, {
|
|
3000
3030
|
asChild: !0,
|
|
3001
3031
|
defaultOpen: !0,
|
|
3002
3032
|
className: "group/collapsible",
|
|
3003
|
-
children: /* @__PURE__ */ (0,
|
|
3033
|
+
children: /* @__PURE__ */ (0, G.jsxs)(A, { children: [/* @__PURE__ */ (0, G.jsx)(h, {
|
|
3004
3034
|
asChild: !0,
|
|
3005
|
-
children: /* @__PURE__ */ (0,
|
|
3035
|
+
children: /* @__PURE__ */ (0, G.jsxs)(k, {
|
|
3006
3036
|
tooltip: e.title,
|
|
3007
3037
|
children: [
|
|
3008
|
-
e.icon && /* @__PURE__ */ (0,
|
|
3009
|
-
/* @__PURE__ */ (0,
|
|
3010
|
-
e.badge != null && /* @__PURE__ */ (0,
|
|
3038
|
+
e.icon && /* @__PURE__ */ (0, G.jsx)(e.icon, {}),
|
|
3039
|
+
/* @__PURE__ */ (0, G.jsx)("span", { children: e.title }),
|
|
3040
|
+
e.badge != null && /* @__PURE__ */ (0, G.jsx)(f, {
|
|
3011
3041
|
variant: e.badgeVariant || "default",
|
|
3012
3042
|
className: "ml-auto mr-1 h-5 min-w-5 px-1 text-xs",
|
|
3013
3043
|
children: e.badge
|
|
3014
3044
|
}),
|
|
3015
|
-
/* @__PURE__ */ (0,
|
|
3045
|
+
/* @__PURE__ */ (0, G.jsx)(R, { className: "ml-auto h-4 w-4 transition-transform duration-200 group-data-[state=open]/collapsible:rotate-90" })
|
|
3016
3046
|
]
|
|
3017
3047
|
})
|
|
3018
|
-
}), /* @__PURE__ */ (0,
|
|
3048
|
+
}), /* @__PURE__ */ (0, G.jsx)(m, { children: /* @__PURE__ */ (0, G.jsx)(j, { children: e.children.map((e) => /* @__PURE__ */ (0, G.jsx)(ee, { children: /* @__PURE__ */ (0, G.jsx)(M, {
|
|
3019
3049
|
asChild: !0,
|
|
3020
3050
|
isActive: t === e.href,
|
|
3021
|
-
children: /* @__PURE__ */ (0,
|
|
3051
|
+
children: /* @__PURE__ */ (0, G.jsxs)(te, {
|
|
3022
3052
|
to: e.href,
|
|
3023
3053
|
children: [
|
|
3024
|
-
e.icon && /* @__PURE__ */ (0,
|
|
3025
|
-
/* @__PURE__ */ (0,
|
|
3026
|
-
e.badge != null && /* @__PURE__ */ (0,
|
|
3054
|
+
e.icon && /* @__PURE__ */ (0, G.jsx)(e.icon, {}),
|
|
3055
|
+
/* @__PURE__ */ (0, G.jsx)("span", { children: e.title }),
|
|
3056
|
+
e.badge != null && /* @__PURE__ */ (0, G.jsx)(f, {
|
|
3027
3057
|
variant: e.badgeVariant || "default",
|
|
3028
3058
|
className: "ml-auto h-5 min-w-5 px-1 text-xs",
|
|
3029
3059
|
children: e.badge
|
|
@@ -3031,16 +3061,16 @@ function Vr({ item: e, pathname: t }) {
|
|
|
3031
3061
|
]
|
|
3032
3062
|
})
|
|
3033
3063
|
}) }, e.href)) }) })] })
|
|
3034
|
-
}) : /* @__PURE__ */ (0,
|
|
3064
|
+
}) : /* @__PURE__ */ (0, G.jsx)(A, { children: /* @__PURE__ */ (0, G.jsx)(k, {
|
|
3035
3065
|
asChild: !0,
|
|
3036
3066
|
isActive: t === e.href,
|
|
3037
3067
|
tooltip: e.title,
|
|
3038
|
-
children: /* @__PURE__ */ (0,
|
|
3068
|
+
children: /* @__PURE__ */ (0, G.jsxs)(te, {
|
|
3039
3069
|
to: e.href,
|
|
3040
3070
|
children: [
|
|
3041
|
-
e.icon && /* @__PURE__ */ (0,
|
|
3042
|
-
/* @__PURE__ */ (0,
|
|
3043
|
-
e.badge != null && /* @__PURE__ */ (0,
|
|
3071
|
+
e.icon && /* @__PURE__ */ (0, G.jsx)(e.icon, {}),
|
|
3072
|
+
/* @__PURE__ */ (0, G.jsx)("span", { children: e.title }),
|
|
3073
|
+
e.badge != null && /* @__PURE__ */ (0, G.jsx)(f, {
|
|
3044
3074
|
variant: e.badgeVariant || "default",
|
|
3045
3075
|
className: "ml-auto h-5 min-w-5 px-1 text-xs",
|
|
3046
3076
|
children: e.badge
|
|
@@ -3049,8 +3079,8 @@ function Vr({ item: e, pathname: t }) {
|
|
|
3049
3079
|
})
|
|
3050
3080
|
}) });
|
|
3051
3081
|
}
|
|
3052
|
-
function
|
|
3053
|
-
let s =
|
|
3082
|
+
function Yr({ items: e, title: n = "Application", className: r, collapsible: i = "icon", searchEnabled: a = !1, searchPlaceholder: o = "Search..." }) {
|
|
3083
|
+
let s = L(), [c, l] = t.useState(""), u = t.useMemo(() => e.length === 0 ? [] : qr(e[0]) ? e.map((e) => ({
|
|
3054
3084
|
groupLabel: e.label,
|
|
3055
3085
|
items: e.items
|
|
3056
3086
|
})) : [{ items: e }], [e]), d = t.useMemo(() => {
|
|
@@ -3061,14 +3091,14 @@ function Hr({ items: e, title: n = "Application", className: r, collapsible: i =
|
|
|
3061
3091
|
items: t.items.filter((t) => t.title.toLowerCase().includes(e) || t.children?.some((t) => t.title.toLowerCase().includes(e)))
|
|
3062
3092
|
})).filter((e) => e.items.length > 0);
|
|
3063
3093
|
}, [u, c]);
|
|
3064
|
-
return /* @__PURE__ */ (0,
|
|
3094
|
+
return /* @__PURE__ */ (0, G.jsx)(v, {
|
|
3065
3095
|
className: r,
|
|
3066
3096
|
collapsible: i,
|
|
3067
|
-
children: /* @__PURE__ */ (0,
|
|
3097
|
+
children: /* @__PURE__ */ (0, G.jsxs)(y, { children: [a && /* @__PURE__ */ (0, G.jsx)("div", {
|
|
3068
3098
|
className: "px-3 py-2",
|
|
3069
|
-
children: /* @__PURE__ */ (0,
|
|
3099
|
+
children: /* @__PURE__ */ (0, G.jsxs)("div", {
|
|
3070
3100
|
className: "relative",
|
|
3071
|
-
children: [/* @__PURE__ */ (0,
|
|
3101
|
+
children: [/* @__PURE__ */ (0, G.jsx)(ae, { className: "absolute left-2.5 top-2.5 h-4 w-4 text-muted-foreground" }), /* @__PURE__ */ (0, G.jsx)(g, {
|
|
3072
3102
|
type: "search",
|
|
3073
3103
|
placeholder: o,
|
|
3074
3104
|
value: c,
|
|
@@ -3076,16 +3106,16 @@ function Hr({ items: e, title: n = "Application", className: r, collapsible: i =
|
|
|
3076
3106
|
className: "pl-8 h-9"
|
|
3077
3107
|
})]
|
|
3078
3108
|
})
|
|
3079
|
-
}), d.map((e, t) => /* @__PURE__ */ (0,
|
|
3080
|
-
t > 0 && /* @__PURE__ */ (0,
|
|
3109
|
+
}), d.map((e, t) => /* @__PURE__ */ (0, G.jsxs)(x, { children: [
|
|
3110
|
+
t > 0 && /* @__PURE__ */ (0, G.jsx)("div", {
|
|
3081
3111
|
className: "mx-3 mb-1 h-px bg-sidebar-border/60",
|
|
3082
3112
|
"aria-hidden": !0
|
|
3083
3113
|
}),
|
|
3084
|
-
/* @__PURE__ */ (0,
|
|
3114
|
+
/* @__PURE__ */ (0, G.jsx)(C, {
|
|
3085
3115
|
className: "text-[10px] font-semibold uppercase tracking-wider text-sidebar-foreground/60",
|
|
3086
3116
|
children: e.groupLabel || n
|
|
3087
3117
|
}),
|
|
3088
|
-
/* @__PURE__ */ (0,
|
|
3118
|
+
/* @__PURE__ */ (0, G.jsx)(S, { children: /* @__PURE__ */ (0, G.jsx)(D, { children: e.items.map((e) => /* @__PURE__ */ (0, G.jsx)(Jr, {
|
|
3089
3119
|
item: e,
|
|
3090
3120
|
pathname: s.pathname
|
|
3091
3121
|
}, e.href)) }) })
|
|
@@ -3094,8 +3124,8 @@ function Hr({ items: e, title: n = "Application", className: r, collapsible: i =
|
|
|
3094
3124
|
}
|
|
3095
3125
|
//#endregion
|
|
3096
3126
|
//#region src/index.ts
|
|
3097
|
-
function
|
|
3098
|
-
e.register("page-header",
|
|
3127
|
+
function Xr() {
|
|
3128
|
+
e.register("page-header", de, {
|
|
3099
3129
|
namespace: "layout",
|
|
3100
3130
|
label: "Page Header",
|
|
3101
3131
|
category: "Layout",
|
|
@@ -3106,16 +3136,16 @@ function Ur() {
|
|
|
3106
3136
|
name: "description",
|
|
3107
3137
|
type: "string"
|
|
3108
3138
|
}]
|
|
3109
|
-
}), e.register("page:header",
|
|
3139
|
+
}), e.register("page:header", de, { namespace: "layout" }), e.register("page:card", _e, {
|
|
3110
3140
|
namespace: "layout",
|
|
3111
3141
|
label: "Page Card",
|
|
3112
3142
|
category: "Layout",
|
|
3113
3143
|
isContainer: !0
|
|
3114
|
-
}), e.register("app-shell",
|
|
3144
|
+
}), e.register("app-shell", ge, {
|
|
3115
3145
|
namespace: "layout",
|
|
3116
3146
|
label: "App Shell",
|
|
3117
3147
|
category: "Layout"
|
|
3118
|
-
}), e.register("responsive-grid",
|
|
3148
|
+
}), e.register("responsive-grid", xe, {
|
|
3119
3149
|
namespace: "layout",
|
|
3120
3150
|
label: "Responsive Grid",
|
|
3121
3151
|
category: "Layout",
|
|
@@ -3127,7 +3157,7 @@ function Ur() {
|
|
|
3127
3157
|
name: "gap",
|
|
3128
3158
|
type: "number"
|
|
3129
3159
|
}]
|
|
3130
|
-
}), e.register("navigation-renderer",
|
|
3160
|
+
}), e.register("navigation-renderer", zr, {
|
|
3131
3161
|
namespace: "layout",
|
|
3132
3162
|
label: "Navigation Renderer",
|
|
3133
3163
|
category: "Layout",
|
|
@@ -3138,7 +3168,7 @@ function Ur() {
|
|
|
3138
3168
|
name: "basePath",
|
|
3139
3169
|
type: "string"
|
|
3140
3170
|
}]
|
|
3141
|
-
}), e.register("app-schema-renderer",
|
|
3171
|
+
}), e.register("app-schema-renderer", Wr, {
|
|
3142
3172
|
namespace: "layout",
|
|
3143
3173
|
label: "App Schema Renderer",
|
|
3144
3174
|
category: "Layout",
|
|
@@ -3160,7 +3190,7 @@ function Ur() {
|
|
|
3160
3190
|
});
|
|
3161
3191
|
}
|
|
3162
3192
|
try {
|
|
3163
|
-
|
|
3193
|
+
Xr();
|
|
3164
3194
|
} catch {}
|
|
3165
3195
|
//#endregion
|
|
3166
|
-
export {
|
|
3196
|
+
export { Wr as AppSchemaRenderer, ge as AppShell, zr as NavigationRenderer, Kr as Page, _e as PageCard, de as PageHeader, xe as ResponsiveGrid, Yr as SidebarNav, Fr as filterNavigationItems, Xr as registerLayout, kr as resolveIcon, Ar as resolveLabel, he as useAppShellBranding };
|