@object-ui/layout 3.3.1 → 3.3.2
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 +9 -0
- package/dist/index.js +668 -675
- package/dist/index.umd.cjs +3 -3
- package/dist/packages/layout/src/NavigationRenderer.d.ts +2 -1
- package/package.json +6 -6
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 ee, SidebarMenuButton as O, SidebarMenuItem as k, SidebarMenuSub as A, SidebarMenuSubButton as te, SidebarMenuSubItem as ne, SidebarProvider as j, cn as M } from "@object-ui/components";
|
|
4
|
-
import { Link as
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import { SchemaRenderer as se } from "@object-ui/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 ee, SidebarMenuButton as O, SidebarMenuItem as k, SidebarMenuSub as A, SidebarMenuSubButton as te, SidebarMenuSubItem as ne, SidebarProvider as j, cn as M, getLazyIcon as N } from "@object-ui/components";
|
|
4
|
+
import { Link as P, NavLink as re, useLocation as F } from "react-router-dom";
|
|
5
|
+
import { ChevronRight as I, FileText as ie, GripVertical as L, Layers as R, Pin as ae, PinOff as oe, Search as se, Star as z } from "lucide-react";
|
|
6
|
+
import { createPortal as B, unstable_batchedUpdates as ce } from "react-dom";
|
|
7
|
+
import { menuItemToNavigationItem as V } from "@object-ui/types";
|
|
8
|
+
import { SchemaRenderer as le } from "@object-ui/react";
|
|
10
9
|
//#region \0rolldown/runtime.js
|
|
11
|
-
var
|
|
10
|
+
var H = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t.exports), ue = /* @__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
|
+
}), de = /* @__PURE__ */ H(((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,7 +25,7 @@ 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
|
+
})), fe = /* @__PURE__ */ H(((e) => {
|
|
30
29
|
process.env.NODE_ENV !== "production" && (function() {
|
|
31
30
|
function t(e) {
|
|
32
31
|
if (e == null) return null;
|
|
@@ -169,7 +168,7 @@ 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 =
|
|
171
|
+
var m = ue("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"), ee = Symbol.for("react.client.reference"), O = m.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, k = Object.prototype.hasOwnProperty, A = Array.isArray, te = console.createTask ? console.createTask : function() {
|
|
173
172
|
return null;
|
|
174
173
|
};
|
|
175
174
|
m = { react_stack_bottom_frame: function(e) {
|
|
@@ -184,25 +183,25 @@ var R = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t
|
|
|
184
183
|
return d(e, t, n, !0, r ? Error("react-stack-top-frame") : M, r ? te(i(e)) : N);
|
|
185
184
|
};
|
|
186
185
|
})();
|
|
187
|
-
})),
|
|
188
|
-
process.env.NODE_ENV === "production" ? t.exports =
|
|
186
|
+
})), U = (/* @__PURE__ */ H(((e, t) => {
|
|
187
|
+
process.env.NODE_ENV === "production" ? t.exports = de() : t.exports = fe();
|
|
189
188
|
})))();
|
|
190
|
-
function
|
|
191
|
-
return /* @__PURE__ */ (0,
|
|
189
|
+
function pe({ title: e, description: t, action: n, className: r, children: i, ...a }) {
|
|
190
|
+
return /* @__PURE__ */ (0, U.jsx)("div", {
|
|
192
191
|
className: M("flex flex-col gap-4 pb-4 md:pb-8", r),
|
|
193
192
|
...a,
|
|
194
|
-
children: /* @__PURE__ */ (0,
|
|
193
|
+
children: /* @__PURE__ */ (0, U.jsxs)("div", {
|
|
195
194
|
className: "flex flex-wrap items-end gap-x-4 gap-y-2",
|
|
196
|
-
children: [/* @__PURE__ */ (0,
|
|
195
|
+
children: [/* @__PURE__ */ (0, U.jsxs)("div", {
|
|
197
196
|
className: "flex flex-col gap-1 min-w-0",
|
|
198
|
-
children: [/* @__PURE__ */ (0,
|
|
197
|
+
children: [/* @__PURE__ */ (0, U.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, U.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, U.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 W(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;
|
|
@@ -231,7 +230,7 @@ function V(e) {
|
|
|
231
230
|
}
|
|
232
231
|
return `${Math.round(s * 360)} ${Math.round(c * 100)}% ${Math.round(l * 100)}%`;
|
|
233
232
|
}
|
|
234
|
-
function
|
|
233
|
+
function me(e) {
|
|
235
234
|
let t = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);
|
|
236
235
|
if (!t) return "0 0% 100%";
|
|
237
236
|
let n = (e) => {
|
|
@@ -240,16 +239,16 @@ function de(e) {
|
|
|
240
239
|
}, r = n(parseInt(t[1], 16)), i = n(parseInt(t[2], 16)), a = n(parseInt(t[3], 16));
|
|
241
240
|
return .2126 * r + .7152 * i + .0722 * a > .6 ? "222 47% 11%" : "0 0% 100%";
|
|
242
241
|
}
|
|
243
|
-
function
|
|
242
|
+
function he(e, t) {
|
|
244
243
|
o(() => {
|
|
245
244
|
let n = document.documentElement;
|
|
246
245
|
if (e?.primaryColor) {
|
|
247
|
-
let t =
|
|
248
|
-
t && (n.style.setProperty("--brand-primary", e.primaryColor), n.style.setProperty("--brand-primary-hsl", t), n.style.setProperty("--primary", t), n.style.setProperty("--primary-foreground",
|
|
246
|
+
let t = W(e.primaryColor);
|
|
247
|
+
t && (n.style.setProperty("--brand-primary", e.primaryColor), n.style.setProperty("--brand-primary-hsl", t), n.style.setProperty("--primary", t), n.style.setProperty("--primary-foreground", me(e.primaryColor)), n.style.setProperty("--ring", t), n.style.setProperty("--sidebar-primary", t), n.style.setProperty("--sidebar-ring", t));
|
|
249
248
|
} 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");
|
|
250
249
|
if (e?.accentColor) {
|
|
251
|
-
let t =
|
|
252
|
-
t && (n.style.setProperty("--brand-accent", e.accentColor), n.style.setProperty("--brand-accent-hsl", t), n.style.setProperty("--accent", t), n.style.setProperty("--accent-foreground",
|
|
250
|
+
let t = W(e.accentColor);
|
|
251
|
+
t && (n.style.setProperty("--brand-accent", e.accentColor), n.style.setProperty("--brand-accent-hsl", t), n.style.setProperty("--accent", t), n.style.setProperty("--accent-foreground", me(e.accentColor)));
|
|
253
252
|
} else n.style.removeProperty("--brand-accent"), n.style.removeProperty("--brand-accent-hsl"), n.style.removeProperty("--accent"), n.style.removeProperty("--accent-foreground");
|
|
254
253
|
if (e?.favicon) {
|
|
255
254
|
let t = document.querySelector("#favicon") || document.querySelector("link[rel=\"icon\"]");
|
|
@@ -265,18 +264,18 @@ function fe(e, t) {
|
|
|
265
264
|
t
|
|
266
265
|
]);
|
|
267
266
|
}
|
|
268
|
-
function
|
|
269
|
-
return
|
|
267
|
+
function ge({ sidebar: e, navbar: t, children: n, className: r, defaultOpen: i = !0, branding: a }) {
|
|
268
|
+
return he(a, a?.title), /* @__PURE__ */ (0, U.jsxs)(j, {
|
|
270
269
|
defaultOpen: i,
|
|
271
270
|
className: "!flex-col",
|
|
272
|
-
children: [/* @__PURE__ */ (0,
|
|
271
|
+
children: [/* @__PURE__ */ (0, U.jsx)("header", {
|
|
273
272
|
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
273
|
children: t
|
|
275
|
-
}), /* @__PURE__ */ (0,
|
|
274
|
+
}), /* @__PURE__ */ (0, U.jsxs)("div", {
|
|
276
275
|
className: "flex flex-1 min-h-0 w-full",
|
|
277
|
-
children: [e, /* @__PURE__ */ (0,
|
|
276
|
+
children: [e, /* @__PURE__ */ (0, U.jsx)(E, {
|
|
278
277
|
className: "min-w-0",
|
|
279
|
-
children: /* @__PURE__ */ (0,
|
|
278
|
+
children: /* @__PURE__ */ (0, U.jsx)("main", {
|
|
280
279
|
className: M("flex-1 min-w-0 overflow-auto p-3 sm:p-4 md:p-6", r),
|
|
281
280
|
children: n
|
|
282
281
|
})
|
|
@@ -286,11 +285,11 @@ function pe({ sidebar: e, navbar: t, children: n, className: r, defaultOpen: i =
|
|
|
286
285
|
}
|
|
287
286
|
//#endregion
|
|
288
287
|
//#region src/PageCard.tsx
|
|
289
|
-
function
|
|
290
|
-
return /* @__PURE__ */ (0,
|
|
288
|
+
function _e({ className: e, children: t, ...n }) {
|
|
289
|
+
return /* @__PURE__ */ (0, U.jsx)("div", {
|
|
291
290
|
className: M("rounded-xl border bg-card text-card-foreground shadow", e),
|
|
292
291
|
...n,
|
|
293
|
-
children: /* @__PURE__ */ (0,
|
|
292
|
+
children: /* @__PURE__ */ (0, U.jsx)("div", {
|
|
294
293
|
className: "p-6",
|
|
295
294
|
children: t
|
|
296
295
|
})
|
|
@@ -298,7 +297,7 @@ function me({ className: e, children: t, ...n }) {
|
|
|
298
297
|
}
|
|
299
298
|
//#endregion
|
|
300
299
|
//#region src/ResponsiveGrid.tsx
|
|
301
|
-
var
|
|
300
|
+
var ve = {
|
|
302
301
|
xs: {
|
|
303
302
|
1: "grid-cols-1",
|
|
304
303
|
2: "grid-cols-2",
|
|
@@ -348,11 +347,11 @@ var he = {
|
|
|
348
347
|
12: "2xl:grid-cols-12"
|
|
349
348
|
}
|
|
350
349
|
};
|
|
351
|
-
function
|
|
350
|
+
function ye(e) {
|
|
352
351
|
if (!e) return "grid-cols-1";
|
|
353
352
|
let t = [];
|
|
354
353
|
for (let [n, r] of Object.entries(e)) {
|
|
355
|
-
let e =
|
|
354
|
+
let e = ve[n];
|
|
356
355
|
if (e && r) {
|
|
357
356
|
let n = Object.keys(e).map(Number).reduce((e, t) => Math.abs(t - r) < Math.abs(e - r) ? t : e);
|
|
358
357
|
t.push(e[n]);
|
|
@@ -360,7 +359,7 @@ function H(e) {
|
|
|
360
359
|
}
|
|
361
360
|
return t.join(" ") || "grid-cols-1";
|
|
362
361
|
}
|
|
363
|
-
var
|
|
362
|
+
var be = {
|
|
364
363
|
0: "gap-0",
|
|
365
364
|
1: "gap-1",
|
|
366
365
|
2: "gap-2",
|
|
@@ -369,53 +368,53 @@ var ge = {
|
|
|
369
368
|
5: "gap-5",
|
|
370
369
|
6: "gap-6",
|
|
371
370
|
8: "gap-8"
|
|
372
|
-
},
|
|
373
|
-
className: M("grid",
|
|
371
|
+
}, xe = ({ columns: e, gap: t = 4, className: n, children: r }) => /* @__PURE__ */ (0, U.jsx)("div", {
|
|
372
|
+
className: M("grid", ye(e), typeof t == "number" ? be[t] || `gap-${t}` : "", n),
|
|
374
373
|
children: r
|
|
375
374
|
});
|
|
376
375
|
//#endregion
|
|
377
376
|
//#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
|
|
377
|
+
function Se() {
|
|
379
378
|
var e = [...arguments];
|
|
380
379
|
return c(() => (t) => {
|
|
381
380
|
e.forEach((e) => e(t));
|
|
382
381
|
}, e);
|
|
383
382
|
}
|
|
384
|
-
var
|
|
385
|
-
function
|
|
383
|
+
var Ce = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0;
|
|
384
|
+
function G(e) {
|
|
386
385
|
let t = Object.prototype.toString.call(e);
|
|
387
386
|
return t === "[object Window]" || t === "[object global]";
|
|
388
387
|
}
|
|
389
|
-
function
|
|
388
|
+
function we(e) {
|
|
390
389
|
return "nodeType" in e;
|
|
391
390
|
}
|
|
392
|
-
function
|
|
393
|
-
return e ?
|
|
391
|
+
function K(e) {
|
|
392
|
+
return e ? G(e) ? e : we(e) ? e.ownerDocument?.defaultView ?? window : window : window;
|
|
394
393
|
}
|
|
395
|
-
function
|
|
396
|
-
let { Document: t } =
|
|
394
|
+
function Te(e) {
|
|
395
|
+
let { Document: t } = K(e);
|
|
397
396
|
return e instanceof t;
|
|
398
397
|
}
|
|
399
|
-
function
|
|
400
|
-
return
|
|
398
|
+
function Ee(e) {
|
|
399
|
+
return G(e) ? !1 : e instanceof K(e).HTMLElement;
|
|
401
400
|
}
|
|
402
|
-
function
|
|
403
|
-
return e instanceof
|
|
401
|
+
function De(e) {
|
|
402
|
+
return e instanceof K(e).SVGElement;
|
|
404
403
|
}
|
|
405
|
-
function
|
|
406
|
-
return e ?
|
|
404
|
+
function Oe(e) {
|
|
405
|
+
return e ? G(e) ? e.document : we(e) ? Te(e) ? e : Ee(e) || De(e) ? e.ownerDocument : document : document : document;
|
|
407
406
|
}
|
|
408
|
-
var
|
|
409
|
-
function
|
|
407
|
+
var q = Ce ? s : o;
|
|
408
|
+
function ke(e) {
|
|
410
409
|
let t = u(e);
|
|
411
|
-
return
|
|
410
|
+
return q(() => {
|
|
412
411
|
t.current = e;
|
|
413
412
|
}), i(function() {
|
|
414
413
|
var e = [...arguments];
|
|
415
414
|
return t.current == null ? void 0 : t.current(...e);
|
|
416
415
|
}, []);
|
|
417
416
|
}
|
|
418
|
-
function
|
|
417
|
+
function Ae() {
|
|
419
418
|
let e = u(null);
|
|
420
419
|
return [i((t, n) => {
|
|
421
420
|
e.current = setInterval(t, n);
|
|
@@ -423,41 +422,41 @@ function we() {
|
|
|
423
422
|
e.current !== null && (clearInterval(e.current), e.current = null);
|
|
424
423
|
}, [])];
|
|
425
424
|
}
|
|
426
|
-
function
|
|
425
|
+
function je(e, t) {
|
|
427
426
|
t === void 0 && (t = [e]);
|
|
428
427
|
let n = u(e);
|
|
429
|
-
return
|
|
428
|
+
return q(() => {
|
|
430
429
|
n.current !== e && (n.current = e);
|
|
431
430
|
}, t), n;
|
|
432
431
|
}
|
|
433
|
-
function
|
|
432
|
+
function Me(e, t) {
|
|
434
433
|
let n = u();
|
|
435
434
|
return c(() => {
|
|
436
435
|
let t = e(n.current);
|
|
437
436
|
return n.current = t, t;
|
|
438
437
|
}, [...t]);
|
|
439
438
|
}
|
|
440
|
-
function
|
|
441
|
-
let t =
|
|
439
|
+
function Ne(e) {
|
|
440
|
+
let t = ke(e), n = u(null);
|
|
442
441
|
return [n, i((e) => {
|
|
443
442
|
e !== n.current && t?.(e, n.current), n.current = e;
|
|
444
443
|
}, [])];
|
|
445
444
|
}
|
|
446
|
-
function
|
|
445
|
+
function Pe(e) {
|
|
447
446
|
let t = u();
|
|
448
447
|
return o(() => {
|
|
449
448
|
t.current = e;
|
|
450
449
|
}, [e]), t.current;
|
|
451
450
|
}
|
|
452
|
-
var
|
|
453
|
-
function
|
|
451
|
+
var Fe = {};
|
|
452
|
+
function Ie(e, t) {
|
|
454
453
|
return c(() => {
|
|
455
454
|
if (t) return t;
|
|
456
|
-
let n =
|
|
457
|
-
return
|
|
455
|
+
let n = Fe[e] == null ? 0 : Fe[e] + 1;
|
|
456
|
+
return Fe[e] = n, e + "-" + n;
|
|
458
457
|
}, [e, t]);
|
|
459
458
|
}
|
|
460
|
-
function
|
|
459
|
+
function Le(e) {
|
|
461
460
|
return function(t) {
|
|
462
461
|
return [...arguments].slice(1).reduce((t, n) => {
|
|
463
462
|
let r = Object.entries(n);
|
|
@@ -469,22 +468,22 @@ function je(e) {
|
|
|
469
468
|
}, { ...t });
|
|
470
469
|
};
|
|
471
470
|
}
|
|
472
|
-
var
|
|
473
|
-
function
|
|
471
|
+
var Re = /* @__PURE__ */ Le(1), ze = /* @__PURE__ */ Le(-1);
|
|
472
|
+
function Be(e) {
|
|
474
473
|
return "clientX" in e && "clientY" in e;
|
|
475
474
|
}
|
|
476
|
-
function
|
|
475
|
+
function Ve(e) {
|
|
477
476
|
if (!e) return !1;
|
|
478
|
-
let { KeyboardEvent: t } =
|
|
477
|
+
let { KeyboardEvent: t } = K(e.target);
|
|
479
478
|
return t && e instanceof t;
|
|
480
479
|
}
|
|
481
|
-
function
|
|
480
|
+
function He(e) {
|
|
482
481
|
if (!e) return !1;
|
|
483
|
-
let { TouchEvent: t } =
|
|
482
|
+
let { TouchEvent: t } = K(e.target);
|
|
484
483
|
return t && e instanceof t;
|
|
485
484
|
}
|
|
486
|
-
function
|
|
487
|
-
if (
|
|
485
|
+
function Ue(e) {
|
|
486
|
+
if (He(e)) {
|
|
488
487
|
if (e.touches && e.touches.length) {
|
|
489
488
|
let { clientX: t, clientY: n } = e.touches[0];
|
|
490
489
|
return {
|
|
@@ -499,12 +498,12 @@ function Le(e) {
|
|
|
499
498
|
};
|
|
500
499
|
}
|
|
501
500
|
}
|
|
502
|
-
return
|
|
501
|
+
return Be(e) ? {
|
|
503
502
|
x: e.clientX,
|
|
504
503
|
y: e.clientY
|
|
505
504
|
} : null;
|
|
506
505
|
}
|
|
507
|
-
var
|
|
506
|
+
var We = /* @__PURE__ */ Object.freeze({
|
|
508
507
|
Translate: { toString(e) {
|
|
509
508
|
if (!e) return;
|
|
510
509
|
let { x: t, y: n } = e;
|
|
@@ -516,27 +515,27 @@ var Re = /* @__PURE__ */ Object.freeze({
|
|
|
516
515
|
return "scaleX(" + t + ") scaleY(" + n + ")";
|
|
517
516
|
} },
|
|
518
517
|
Transform: { toString(e) {
|
|
519
|
-
if (e) return [
|
|
518
|
+
if (e) return [We.Translate.toString(e), We.Scale.toString(e)].join(" ");
|
|
520
519
|
} },
|
|
521
520
|
Transition: { toString(e) {
|
|
522
521
|
let { property: t, duration: n, easing: r } = e;
|
|
523
522
|
return t + " " + n + "ms " + r;
|
|
524
523
|
} }
|
|
525
|
-
}),
|
|
526
|
-
function
|
|
527
|
-
return e.matches(
|
|
524
|
+
}), Ge = "a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";
|
|
525
|
+
function Ke(e) {
|
|
526
|
+
return e.matches(Ge) ? e : e.querySelector(Ge);
|
|
528
527
|
}
|
|
529
528
|
//#endregion
|
|
530
529
|
//#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
|
|
530
|
+
var qe = { display: "none" };
|
|
531
|
+
function Je(e) {
|
|
533
532
|
let { id: n, value: r } = e;
|
|
534
533
|
return t.createElement("div", {
|
|
535
534
|
id: n,
|
|
536
|
-
style:
|
|
535
|
+
style: qe
|
|
537
536
|
}, r);
|
|
538
537
|
}
|
|
539
|
-
function
|
|
538
|
+
function Ye(e) {
|
|
540
539
|
let { id: n, announcement: r, ariaLiveType: i = "assertive" } = e;
|
|
541
540
|
return t.createElement("div", {
|
|
542
541
|
id: n,
|
|
@@ -559,7 +558,7 @@ function Ue(e) {
|
|
|
559
558
|
"aria-atomic": !0
|
|
560
559
|
}, r);
|
|
561
560
|
}
|
|
562
|
-
function
|
|
561
|
+
function Xe() {
|
|
563
562
|
let [e, t] = d("");
|
|
564
563
|
return {
|
|
565
564
|
announce: i((e) => {
|
|
@@ -570,22 +569,22 @@ function We() {
|
|
|
570
569
|
}
|
|
571
570
|
//#endregion
|
|
572
571
|
//#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(
|
|
572
|
+
var Ze = /* @__PURE__ */ n(null);
|
|
573
|
+
function Qe(e) {
|
|
574
|
+
let t = a(Ze);
|
|
576
575
|
o(() => {
|
|
577
576
|
if (!t) throw Error("useDndMonitor must be used within a children of <DndContext>");
|
|
578
577
|
return t(e);
|
|
579
578
|
}, [e, t]);
|
|
580
579
|
}
|
|
581
|
-
function
|
|
580
|
+
function $e() {
|
|
582
581
|
let [e] = d(() => /* @__PURE__ */ new Set()), t = i((t) => (e.add(t), () => e.delete(t)), [e]);
|
|
583
582
|
return [i((t) => {
|
|
584
583
|
let { type: n, event: r } = t;
|
|
585
584
|
e.forEach((e) => e[n]?.call(e, r));
|
|
586
585
|
}, [e]), t];
|
|
587
586
|
}
|
|
588
|
-
var
|
|
587
|
+
var et = { 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 " }, tt = {
|
|
589
588
|
onDragStart(e) {
|
|
590
589
|
let { active: t } = e;
|
|
591
590
|
return "Picked up draggable item " + t.id + ".";
|
|
@@ -603,11 +602,11 @@ var Je = { draggable: "\n To pick up a draggable item, press the space bar.\n
|
|
|
603
602
|
return "Dragging was cancelled. Draggable item " + t.id + " was dropped.";
|
|
604
603
|
}
|
|
605
604
|
};
|
|
606
|
-
function
|
|
607
|
-
let { announcements: n =
|
|
605
|
+
function nt(e) {
|
|
606
|
+
let { announcements: n = tt, container: r, hiddenTextDescribedById: i, screenReaderInstructions: a = et } = e, { announce: s, announcement: l } = Xe(), u = Ie("DndLiveRegion"), [f, p] = d(!1);
|
|
608
607
|
if (o(() => {
|
|
609
608
|
p(!0);
|
|
610
|
-
}, []),
|
|
609
|
+
}, []), Qe(c(() => ({
|
|
611
610
|
onDragStart(e) {
|
|
612
611
|
let { active: t } = e;
|
|
613
612
|
s(n.onDragStart({ active: t }));
|
|
@@ -641,27 +640,27 @@ function Xe(e) {
|
|
|
641
640
|
}));
|
|
642
641
|
}
|
|
643
642
|
}), [s, n])), !f) return null;
|
|
644
|
-
let m = t.createElement(t.Fragment, null, t.createElement(
|
|
643
|
+
let m = t.createElement(t.Fragment, null, t.createElement(Je, {
|
|
645
644
|
id: i,
|
|
646
645
|
value: a.draggable
|
|
647
|
-
}), t.createElement(
|
|
646
|
+
}), t.createElement(Ye, {
|
|
648
647
|
id: u,
|
|
649
648
|
announcement: l
|
|
650
649
|
}));
|
|
651
|
-
return r ?
|
|
650
|
+
return r ? B(m, r) : m;
|
|
652
651
|
}
|
|
653
652
|
var J;
|
|
654
653
|
(function(e) {
|
|
655
654
|
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
655
|
})(J ||= {});
|
|
657
|
-
function
|
|
658
|
-
function
|
|
656
|
+
function rt() {}
|
|
657
|
+
function it(e, t) {
|
|
659
658
|
return c(() => ({
|
|
660
659
|
sensor: e,
|
|
661
660
|
options: t ?? {}
|
|
662
661
|
}), [e, t]);
|
|
663
662
|
}
|
|
664
|
-
function
|
|
663
|
+
function at() {
|
|
665
664
|
var e = [...arguments];
|
|
666
665
|
return c(() => [...e].filter((e) => e != null), [...e]);
|
|
667
666
|
}
|
|
@@ -669,34 +668,34 @@ var Y = /* @__PURE__ */ Object.freeze({
|
|
|
669
668
|
x: 0,
|
|
670
669
|
y: 0
|
|
671
670
|
});
|
|
672
|
-
function
|
|
671
|
+
function ot(e, t) {
|
|
673
672
|
return Math.sqrt((e.x - t.x) ** 2 + (e.y - t.y) ** 2);
|
|
674
673
|
}
|
|
675
|
-
function
|
|
674
|
+
function st(e, t) {
|
|
676
675
|
let { data: { value: n } } = e, { data: { value: r } } = t;
|
|
677
676
|
return n - r;
|
|
678
677
|
}
|
|
679
|
-
function
|
|
678
|
+
function ct(e, t) {
|
|
680
679
|
let { data: { value: n } } = e, { data: { value: r } } = t;
|
|
681
680
|
return r - n;
|
|
682
681
|
}
|
|
683
|
-
function
|
|
682
|
+
function lt(e, t) {
|
|
684
683
|
if (!e || e.length === 0) return null;
|
|
685
684
|
let [n] = e;
|
|
686
685
|
return t ? n[t] : n;
|
|
687
686
|
}
|
|
688
|
-
function
|
|
687
|
+
function ut(e, t, n) {
|
|
689
688
|
return t === void 0 && (t = e.left), n === void 0 && (n = e.top), {
|
|
690
689
|
x: t + e.width * .5,
|
|
691
690
|
y: n + e.height * .5
|
|
692
691
|
};
|
|
693
692
|
}
|
|
694
|
-
var
|
|
695
|
-
let { collisionRect: t, droppableRects: n, droppableContainers: r } = e, i =
|
|
693
|
+
var dt = (e) => {
|
|
694
|
+
let { collisionRect: t, droppableRects: n, droppableContainers: r } = e, i = ut(t, t.left, t.top), a = [];
|
|
696
695
|
for (let e of r) {
|
|
697
696
|
let { id: t } = e, r = n.get(t);
|
|
698
697
|
if (r) {
|
|
699
|
-
let n =
|
|
698
|
+
let n = ot(ut(r), i);
|
|
700
699
|
a.push({
|
|
701
700
|
id: t,
|
|
702
701
|
data: {
|
|
@@ -706,9 +705,9 @@ var at = (e) => {
|
|
|
706
705
|
});
|
|
707
706
|
}
|
|
708
707
|
}
|
|
709
|
-
return a.sort(
|
|
708
|
+
return a.sort(st);
|
|
710
709
|
};
|
|
711
|
-
function
|
|
710
|
+
function ft(e, t) {
|
|
712
711
|
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
712
|
if (r < i && n < a) {
|
|
714
713
|
let n = t.width * t.height, r = e.width * e.height, i = o * s, a = i / (n + r - i);
|
|
@@ -716,12 +715,12 @@ function ot(e, t) {
|
|
|
716
715
|
}
|
|
717
716
|
return 0;
|
|
718
717
|
}
|
|
719
|
-
var
|
|
718
|
+
var pt = (e) => {
|
|
720
719
|
let { collisionRect: t, droppableRects: n, droppableContainers: r } = e, i = [];
|
|
721
720
|
for (let e of r) {
|
|
722
721
|
let { id: r } = e, a = n.get(r);
|
|
723
722
|
if (a) {
|
|
724
|
-
let n =
|
|
723
|
+
let n = ft(a, t);
|
|
725
724
|
n > 0 && i.push({
|
|
726
725
|
id: r,
|
|
727
726
|
data: {
|
|
@@ -731,22 +730,22 @@ var st = (e) => {
|
|
|
731
730
|
});
|
|
732
731
|
}
|
|
733
732
|
}
|
|
734
|
-
return i.sort(
|
|
733
|
+
return i.sort(ct);
|
|
735
734
|
};
|
|
736
|
-
function
|
|
735
|
+
function mt(e, t, n) {
|
|
737
736
|
return {
|
|
738
737
|
...e,
|
|
739
738
|
scaleX: t && n ? t.width / n.width : 1,
|
|
740
739
|
scaleY: t && n ? t.height / n.height : 1
|
|
741
740
|
};
|
|
742
741
|
}
|
|
743
|
-
function
|
|
742
|
+
function ht(e, t) {
|
|
744
743
|
return e && t ? {
|
|
745
744
|
x: e.left - t.left,
|
|
746
745
|
y: e.top - t.top
|
|
747
746
|
} : Y;
|
|
748
747
|
}
|
|
749
|
-
function
|
|
748
|
+
function gt(e) {
|
|
750
749
|
return function(t) {
|
|
751
750
|
return [...arguments].slice(1).reduce((t, n) => ({
|
|
752
751
|
...t,
|
|
@@ -757,8 +756,8 @@ function ut(e) {
|
|
|
757
756
|
}), { ...t });
|
|
758
757
|
};
|
|
759
758
|
}
|
|
760
|
-
var
|
|
761
|
-
function
|
|
759
|
+
var _t = /* @__PURE__ */ gt(1);
|
|
760
|
+
function vt(e) {
|
|
762
761
|
if (e.startsWith("matrix3d(")) {
|
|
763
762
|
let t = e.slice(9, -1).split(/, /);
|
|
764
763
|
return {
|
|
@@ -778,8 +777,8 @@ function ft(e) {
|
|
|
778
777
|
}
|
|
779
778
|
return null;
|
|
780
779
|
}
|
|
781
|
-
function
|
|
782
|
-
let r =
|
|
780
|
+
function yt(e, t, n) {
|
|
781
|
+
let r = vt(t);
|
|
783
782
|
if (!r) return e;
|
|
784
783
|
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
784
|
return {
|
|
@@ -791,13 +790,13 @@ function pt(e, t, n) {
|
|
|
791
790
|
left: c
|
|
792
791
|
};
|
|
793
792
|
}
|
|
794
|
-
var
|
|
795
|
-
function
|
|
796
|
-
t === void 0 && (t =
|
|
793
|
+
var bt = { ignoreTransform: !1 };
|
|
794
|
+
function xt(e, t) {
|
|
795
|
+
t === void 0 && (t = bt);
|
|
797
796
|
let n = e.getBoundingClientRect();
|
|
798
797
|
if (t.ignoreTransform) {
|
|
799
|
-
let { transform: t, transformOrigin: r } =
|
|
800
|
-
t && (n =
|
|
798
|
+
let { transform: t, transformOrigin: r } = K(e).getComputedStyle(e);
|
|
799
|
+
t && (n = yt(n, t, r));
|
|
801
800
|
}
|
|
802
801
|
let { top: r, left: i, width: a, height: o, bottom: s, right: c } = n;
|
|
803
802
|
return {
|
|
@@ -809,10 +808,10 @@ function ht(e, t) {
|
|
|
809
808
|
right: c
|
|
810
809
|
};
|
|
811
810
|
}
|
|
812
|
-
function
|
|
813
|
-
return
|
|
811
|
+
function St(e) {
|
|
812
|
+
return xt(e, { ignoreTransform: !0 });
|
|
814
813
|
}
|
|
815
|
-
function
|
|
814
|
+
function Ct(e) {
|
|
816
815
|
let t = e.innerWidth, n = e.innerHeight;
|
|
817
816
|
return {
|
|
818
817
|
top: 0,
|
|
@@ -823,11 +822,11 @@ function _t(e) {
|
|
|
823
822
|
height: n
|
|
824
823
|
};
|
|
825
824
|
}
|
|
826
|
-
function
|
|
827
|
-
return t === void 0 && (t =
|
|
825
|
+
function wt(e, t) {
|
|
826
|
+
return t === void 0 && (t = K(e).getComputedStyle(e)), t.position === "fixed";
|
|
828
827
|
}
|
|
829
|
-
function
|
|
830
|
-
t === void 0 && (t =
|
|
828
|
+
function Tt(e, t) {
|
|
829
|
+
t === void 0 && (t = K(e).getComputedStyle(e));
|
|
831
830
|
let n = /(auto|scroll|overlay)/;
|
|
832
831
|
return [
|
|
833
832
|
"overflow",
|
|
@@ -838,48 +837,48 @@ function yt(e, t) {
|
|
|
838
837
|
return typeof r == "string" ? n.test(r) : !1;
|
|
839
838
|
});
|
|
840
839
|
}
|
|
841
|
-
function
|
|
840
|
+
function Et(e, t) {
|
|
842
841
|
let n = [];
|
|
843
842
|
function r(i) {
|
|
844
843
|
if (t != null && n.length >= t || !i) return n;
|
|
845
|
-
if (
|
|
846
|
-
if (!
|
|
847
|
-
let a =
|
|
848
|
-
return i !== e &&
|
|
844
|
+
if (Te(i) && i.scrollingElement != null && !n.includes(i.scrollingElement)) return n.push(i.scrollingElement), n;
|
|
845
|
+
if (!Ee(i) || De(i) || n.includes(i)) return n;
|
|
846
|
+
let a = K(e).getComputedStyle(i);
|
|
847
|
+
return i !== e && Tt(i, a) && n.push(i), wt(i, a) ? n : r(i.parentNode);
|
|
849
848
|
}
|
|
850
849
|
return e ? r(e) : n;
|
|
851
850
|
}
|
|
852
|
-
function
|
|
853
|
-
let [t] =
|
|
851
|
+
function Dt(e) {
|
|
852
|
+
let [t] = Et(e, 1);
|
|
854
853
|
return t ?? null;
|
|
855
854
|
}
|
|
856
|
-
function
|
|
857
|
-
return !
|
|
855
|
+
function Ot(e) {
|
|
856
|
+
return !Ce || !e ? null : G(e) ? e : we(e) ? Te(e) || e === Oe(e).scrollingElement ? window : Ee(e) ? e : null : null;
|
|
858
857
|
}
|
|
859
|
-
function
|
|
860
|
-
return
|
|
858
|
+
function kt(e) {
|
|
859
|
+
return G(e) ? e.scrollX : e.scrollLeft;
|
|
861
860
|
}
|
|
862
|
-
function
|
|
863
|
-
return
|
|
861
|
+
function At(e) {
|
|
862
|
+
return G(e) ? e.scrollY : e.scrollTop;
|
|
864
863
|
}
|
|
865
|
-
function
|
|
864
|
+
function jt(e) {
|
|
866
865
|
return {
|
|
867
|
-
x:
|
|
868
|
-
y:
|
|
866
|
+
x: kt(e),
|
|
867
|
+
y: At(e)
|
|
869
868
|
};
|
|
870
869
|
}
|
|
871
870
|
var X;
|
|
872
871
|
(function(e) {
|
|
873
872
|
e[e.Forward = 1] = "Forward", e[e.Backward = -1] = "Backward";
|
|
874
873
|
})(X ||= {});
|
|
875
|
-
function
|
|
876
|
-
return !
|
|
874
|
+
function Mt(e) {
|
|
875
|
+
return !Ce || !e ? !1 : e === document.scrollingElement;
|
|
877
876
|
}
|
|
878
|
-
function
|
|
877
|
+
function Nt(e) {
|
|
879
878
|
let t = {
|
|
880
879
|
x: 0,
|
|
881
880
|
y: 0
|
|
882
|
-
}, n =
|
|
881
|
+
}, n = Mt(e) ? {
|
|
883
882
|
height: window.innerHeight,
|
|
884
883
|
width: window.innerWidth
|
|
885
884
|
} : {
|
|
@@ -898,14 +897,14 @@ function Dt(e) {
|
|
|
898
897
|
minScroll: t
|
|
899
898
|
};
|
|
900
899
|
}
|
|
901
|
-
var
|
|
900
|
+
var Pt = {
|
|
902
901
|
x: .2,
|
|
903
902
|
y: .2
|
|
904
903
|
};
|
|
905
|
-
function
|
|
904
|
+
function Ft(e, t, n, r, i) {
|
|
906
905
|
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 } =
|
|
906
|
+
r === void 0 && (r = 10), i === void 0 && (i = Pt);
|
|
907
|
+
let { isTop: l, isBottom: u, isLeft: d, isRight: f } = Nt(e), p = {
|
|
909
908
|
x: 0,
|
|
910
909
|
y: 0
|
|
911
910
|
}, m = {
|
|
@@ -920,7 +919,7 @@ function kt(e, t, n, r, i) {
|
|
|
920
919
|
speed: m
|
|
921
920
|
};
|
|
922
921
|
}
|
|
923
|
-
function
|
|
922
|
+
function It(e) {
|
|
924
923
|
if (e === document.scrollingElement) {
|
|
925
924
|
let { innerWidth: e, innerHeight: t } = window;
|
|
926
925
|
return {
|
|
@@ -942,37 +941,37 @@ function At(e) {
|
|
|
942
941
|
height: e.clientHeight
|
|
943
942
|
};
|
|
944
943
|
}
|
|
945
|
-
function
|
|
946
|
-
return e.reduce((e, t) =>
|
|
944
|
+
function Lt(e) {
|
|
945
|
+
return e.reduce((e, t) => Re(e, jt(t)), Y);
|
|
947
946
|
}
|
|
948
|
-
function
|
|
949
|
-
return e.reduce((e, t) => e +
|
|
947
|
+
function Rt(e) {
|
|
948
|
+
return e.reduce((e, t) => e + kt(t), 0);
|
|
950
949
|
}
|
|
951
|
-
function
|
|
952
|
-
return e.reduce((e, t) => e +
|
|
950
|
+
function zt(e) {
|
|
951
|
+
return e.reduce((e, t) => e + At(t), 0);
|
|
953
952
|
}
|
|
954
|
-
function
|
|
955
|
-
if (t === void 0 && (t =
|
|
953
|
+
function Bt(e, t) {
|
|
954
|
+
if (t === void 0 && (t = xt), !e) return;
|
|
956
955
|
let { top: n, left: r, bottom: i, right: a } = t(e);
|
|
957
|
-
|
|
956
|
+
Dt(e) && (i <= 0 || a <= 0 || n >= window.innerHeight || r >= window.innerWidth) && e.scrollIntoView({
|
|
958
957
|
block: "center",
|
|
959
958
|
inline: "center"
|
|
960
959
|
});
|
|
961
960
|
}
|
|
962
|
-
var
|
|
961
|
+
var Vt = [[
|
|
963
962
|
"x",
|
|
964
963
|
["left", "right"],
|
|
965
|
-
|
|
964
|
+
Rt
|
|
966
965
|
], [
|
|
967
966
|
"y",
|
|
968
967
|
["top", "bottom"],
|
|
969
|
-
|
|
970
|
-
]],
|
|
968
|
+
zt
|
|
969
|
+
]], Ht = class {
|
|
971
970
|
constructor(e, t) {
|
|
972
971
|
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 =
|
|
972
|
+
let n = Et(t), r = Lt(n);
|
|
974
973
|
this.rect = { ...e }, this.width = e.width, this.height = e.height;
|
|
975
|
-
for (let [e, t, i] of
|
|
974
|
+
for (let [e, t, i] of Vt) for (let a of t) Object.defineProperty(this, a, {
|
|
976
975
|
get: () => {
|
|
977
976
|
let t = i(n), o = r[e] - t;
|
|
978
977
|
return this.rect[a] + o;
|
|
@@ -981,7 +980,7 @@ var Ft = [[
|
|
|
981
980
|
});
|
|
982
981
|
Object.defineProperty(this, "rect", { enumerable: !1 });
|
|
983
982
|
}
|
|
984
|
-
},
|
|
983
|
+
}, Ut = class {
|
|
985
984
|
constructor(e) {
|
|
986
985
|
this.target = void 0, this.listeners = [], this.removeAll = () => {
|
|
987
986
|
this.listeners.forEach((e) => this.target?.removeEventListener(...e));
|
|
@@ -996,11 +995,11 @@ var Ft = [[
|
|
|
996
995
|
]);
|
|
997
996
|
}
|
|
998
997
|
};
|
|
999
|
-
function
|
|
1000
|
-
let { EventTarget: t } =
|
|
1001
|
-
return e instanceof t ? e :
|
|
998
|
+
function Wt(e) {
|
|
999
|
+
let { EventTarget: t } = K(e);
|
|
1000
|
+
return e instanceof t ? e : Oe(e);
|
|
1002
1001
|
}
|
|
1003
|
-
function
|
|
1002
|
+
function Gt(e, t) {
|
|
1004
1003
|
let n = Math.abs(e.x), r = Math.abs(e.y);
|
|
1005
1004
|
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
1005
|
}
|
|
@@ -1008,17 +1007,17 @@ var Z;
|
|
|
1008
1007
|
(function(e) {
|
|
1009
1008
|
e.Click = "click", e.DragStart = "dragstart", e.Keydown = "keydown", e.ContextMenu = "contextmenu", e.Resize = "resize", e.SelectionChange = "selectionchange", e.VisibilityChange = "visibilitychange";
|
|
1010
1009
|
})(Z ||= {});
|
|
1011
|
-
function
|
|
1010
|
+
function Kt(e) {
|
|
1012
1011
|
e.preventDefault();
|
|
1013
1012
|
}
|
|
1014
|
-
function
|
|
1013
|
+
function qt(e) {
|
|
1015
1014
|
e.stopPropagation();
|
|
1016
1015
|
}
|
|
1017
1016
|
var Q;
|
|
1018
1017
|
(function(e) {
|
|
1019
1018
|
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
1019
|
})(Q ||= {});
|
|
1021
|
-
var
|
|
1020
|
+
var Jt = {
|
|
1022
1021
|
start: [Q.Space, Q.Enter],
|
|
1023
1022
|
cancel: [Q.Esc],
|
|
1024
1023
|
end: [
|
|
@@ -1026,7 +1025,7 @@ var Ht = {
|
|
|
1026
1025
|
Q.Enter,
|
|
1027
1026
|
Q.Tab
|
|
1028
1027
|
]
|
|
1029
|
-
},
|
|
1028
|
+
}, Yt = (e, t) => {
|
|
1030
1029
|
let { currentCoordinates: n } = t;
|
|
1031
1030
|
switch (e.code) {
|
|
1032
1031
|
case Q.Right: return {
|
|
@@ -1046,22 +1045,22 @@ var Ht = {
|
|
|
1046
1045
|
y: n.y - 25
|
|
1047
1046
|
};
|
|
1048
1047
|
}
|
|
1049
|
-
},
|
|
1048
|
+
}, Xt = class {
|
|
1050
1049
|
constructor(e) {
|
|
1051
1050
|
this.props = void 0, this.autoScrollEnabled = !1, this.referenceCoordinates = void 0, this.listeners = void 0, this.windowListeners = void 0, this.props = e;
|
|
1052
1051
|
let { event: { target: t } } = e;
|
|
1053
|
-
this.props = e, this.listeners = new
|
|
1052
|
+
this.props = e, this.listeners = new Ut(Oe(t)), this.windowListeners = new Ut(K(t)), this.handleKeyDown = this.handleKeyDown.bind(this), this.handleCancel = this.handleCancel.bind(this), this.attach();
|
|
1054
1053
|
}
|
|
1055
1054
|
attach() {
|
|
1056
1055
|
this.handleStart(), this.windowListeners.add(Z.Resize, this.handleCancel), this.windowListeners.add(Z.VisibilityChange, this.handleCancel), setTimeout(() => this.listeners.add(Z.Keydown, this.handleKeyDown));
|
|
1057
1056
|
}
|
|
1058
1057
|
handleStart() {
|
|
1059
1058
|
let { activeNode: e, onStart: t } = this.props, n = e.node.current;
|
|
1060
|
-
n &&
|
|
1059
|
+
n && Bt(n), t(Y);
|
|
1061
1060
|
}
|
|
1062
1061
|
handleKeyDown(e) {
|
|
1063
|
-
if (
|
|
1064
|
-
let { active: t, context: n, options: r } = this.props, { keyboardCodes: i =
|
|
1062
|
+
if (Ve(e)) {
|
|
1063
|
+
let { active: t, context: n, options: r } = this.props, { keyboardCodes: i = Jt, coordinateGetter: a = Yt, scrollBehavior: o = "smooth" } = r, { code: s } = e;
|
|
1065
1064
|
if (i.end.includes(s)) {
|
|
1066
1065
|
this.handleEnd(e);
|
|
1067
1066
|
return;
|
|
@@ -1081,12 +1080,12 @@ var Ht = {
|
|
|
1081
1080
|
currentCoordinates: l
|
|
1082
1081
|
});
|
|
1083
1082
|
if (u) {
|
|
1084
|
-
let t =
|
|
1083
|
+
let t = ze(u, l), r = {
|
|
1085
1084
|
x: 0,
|
|
1086
1085
|
y: 0
|
|
1087
1086
|
}, { scrollableAncestors: i } = n.current;
|
|
1088
1087
|
for (let n of i) {
|
|
1089
|
-
let i = e.code, { isTop: a, isRight: s, isLeft: c, isBottom: l, maxScroll: d, minScroll: f } =
|
|
1088
|
+
let i = e.code, { isTop: a, isRight: s, isLeft: c, isBottom: l, maxScroll: d, minScroll: f } = Nt(n), p = It(n), m = {
|
|
1090
1089
|
x: Math.min(i === Q.Right ? p.right - p.width / 2 : p.right, Math.max(i === Q.Right ? p.left : p.left + p.width / 2, u.x)),
|
|
1091
1090
|
y: Math.min(i === Q.Down ? p.bottom - p.height / 2 : p.bottom, Math.max(i === Q.Down ? p.top : p.top + p.height / 2, u.y))
|
|
1092
1091
|
}, h = i === Q.Right && !s || i === Q.Left && !c, g = i === Q.Down && !l || i === Q.Up && !a;
|
|
@@ -1120,7 +1119,7 @@ var Ht = {
|
|
|
1120
1119
|
break;
|
|
1121
1120
|
}
|
|
1122
1121
|
}
|
|
1123
|
-
this.handleMove(e,
|
|
1122
|
+
this.handleMove(e, Re(ze(u, this.referenceCoordinates), r));
|
|
1124
1123
|
}
|
|
1125
1124
|
}
|
|
1126
1125
|
}
|
|
@@ -1140,10 +1139,10 @@ var Ht = {
|
|
|
1140
1139
|
this.listeners.removeAll(), this.windowListeners.removeAll();
|
|
1141
1140
|
}
|
|
1142
1141
|
};
|
|
1143
|
-
|
|
1142
|
+
Xt.activators = [{
|
|
1144
1143
|
eventName: "onKeyDown",
|
|
1145
1144
|
handler: (e, t, n) => {
|
|
1146
|
-
let { keyboardCodes: r =
|
|
1145
|
+
let { keyboardCodes: r = Jt, onActivation: i } = t, { active: a } = n, { code: o } = e.nativeEvent;
|
|
1147
1146
|
if (r.start.includes(o)) {
|
|
1148
1147
|
let t = a.activatorNode.current;
|
|
1149
1148
|
return t && e.target !== t ? !1 : (e.preventDefault(), i?.({ event: e.nativeEvent }), !0);
|
|
@@ -1151,31 +1150,31 @@ Wt.activators = [{
|
|
|
1151
1150
|
return !1;
|
|
1152
1151
|
}
|
|
1153
1152
|
}];
|
|
1154
|
-
function
|
|
1153
|
+
function Zt(e) {
|
|
1155
1154
|
return !!(e && "distance" in e);
|
|
1156
1155
|
}
|
|
1157
|
-
function
|
|
1156
|
+
function Qt(e) {
|
|
1158
1157
|
return !!(e && "delay" in e);
|
|
1159
1158
|
}
|
|
1160
|
-
var
|
|
1159
|
+
var $t = class {
|
|
1161
1160
|
constructor(e, t, n) {
|
|
1162
|
-
n === void 0 && (n =
|
|
1161
|
+
n === void 0 && (n = Wt(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
1162
|
let { event: r } = e, { target: i } = r;
|
|
1164
|
-
this.props = e, this.events = t, this.document =
|
|
1163
|
+
this.props = e, this.events = t, this.document = Oe(i), this.documentListeners = new Ut(this.document), this.listeners = new Ut(n), this.windowListeners = new Ut(K(i)), this.initialCoordinates = Ue(r) ?? Y, 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
1164
|
}
|
|
1166
1165
|
attach() {
|
|
1167
1166
|
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(Z.Resize, this.handleCancel), this.windowListeners.add(Z.DragStart,
|
|
1167
|
+
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(Z.Resize, this.handleCancel), this.windowListeners.add(Z.DragStart, Kt), this.windowListeners.add(Z.VisibilityChange, this.handleCancel), this.windowListeners.add(Z.ContextMenu, Kt), this.documentListeners.add(Z.Keydown, this.handleKeydown), t) {
|
|
1169
1168
|
if (n != null && n({
|
|
1170
1169
|
event: this.props.event,
|
|
1171
1170
|
activeNode: this.props.activeNode,
|
|
1172
1171
|
options: this.props.options
|
|
1173
1172
|
})) return this.handleStart();
|
|
1174
|
-
if (
|
|
1173
|
+
if (Qt(t)) {
|
|
1175
1174
|
this.timeoutId = setTimeout(this.handleStart, t.delay), this.handlePending(t);
|
|
1176
1175
|
return;
|
|
1177
1176
|
}
|
|
1178
|
-
if (
|
|
1177
|
+
if (Zt(t)) {
|
|
1179
1178
|
this.handlePending(t);
|
|
1180
1179
|
return;
|
|
1181
1180
|
}
|
|
@@ -1191,18 +1190,18 @@ var qt = class {
|
|
|
1191
1190
|
}
|
|
1192
1191
|
handleStart() {
|
|
1193
1192
|
let { initialCoordinates: e } = this, { onStart: t } = this.props;
|
|
1194
|
-
e && (this.activated = !0, this.documentListeners.add(Z.Click,
|
|
1193
|
+
e && (this.activated = !0, this.documentListeners.add(Z.Click, qt, { capture: !0 }), this.removeTextSelection(), this.documentListeners.add(Z.SelectionChange, this.removeTextSelection), t(e));
|
|
1195
1194
|
}
|
|
1196
1195
|
handleMove(e) {
|
|
1197
1196
|
let { activated: t, initialCoordinates: n, props: r } = this, { onMove: i, options: { activationConstraint: a } } = r;
|
|
1198
1197
|
if (!n) return;
|
|
1199
|
-
let o =
|
|
1198
|
+
let o = Ue(e) ?? Y, s = ze(n, o);
|
|
1200
1199
|
if (!t && a) {
|
|
1201
|
-
if (
|
|
1202
|
-
if (a.tolerance != null &&
|
|
1203
|
-
if (
|
|
1200
|
+
if (Zt(a)) {
|
|
1201
|
+
if (a.tolerance != null && Gt(s, a.tolerance)) return this.handleCancel();
|
|
1202
|
+
if (Gt(s, a.distance)) return this.handleStart();
|
|
1204
1203
|
}
|
|
1205
|
-
if (
|
|
1204
|
+
if (Qt(a) && Gt(s, a.tolerance)) return this.handleCancel();
|
|
1206
1205
|
this.handlePending(a, s);
|
|
1207
1206
|
return;
|
|
1208
1207
|
}
|
|
@@ -1223,80 +1222,80 @@ var qt = class {
|
|
|
1223
1222
|
var e;
|
|
1224
1223
|
(e = this.document.getSelection()) == null || e.removeAllRanges();
|
|
1225
1224
|
}
|
|
1226
|
-
},
|
|
1225
|
+
}, en = {
|
|
1227
1226
|
cancel: { name: "pointercancel" },
|
|
1228
1227
|
move: { name: "pointermove" },
|
|
1229
1228
|
end: { name: "pointerup" }
|
|
1230
|
-
},
|
|
1229
|
+
}, tn = class extends $t {
|
|
1231
1230
|
constructor(e) {
|
|
1232
|
-
let { event: t } = e, n =
|
|
1233
|
-
super(e,
|
|
1231
|
+
let { event: t } = e, n = Oe(t.target);
|
|
1232
|
+
super(e, en, n);
|
|
1234
1233
|
}
|
|
1235
1234
|
};
|
|
1236
|
-
|
|
1235
|
+
tn.activators = [{
|
|
1237
1236
|
eventName: "onPointerDown",
|
|
1238
1237
|
handler: (e, t) => {
|
|
1239
1238
|
let { nativeEvent: n } = e, { onActivation: r } = t;
|
|
1240
1239
|
return !n.isPrimary || n.button !== 0 ? !1 : (r?.({ event: n }), !0);
|
|
1241
1240
|
}
|
|
1242
1241
|
}];
|
|
1243
|
-
var
|
|
1242
|
+
var nn = {
|
|
1244
1243
|
move: { name: "mousemove" },
|
|
1245
1244
|
end: { name: "mouseup" }
|
|
1246
|
-
},
|
|
1245
|
+
}, rn;
|
|
1247
1246
|
(function(e) {
|
|
1248
1247
|
e[e.RightClick = 2] = "RightClick";
|
|
1249
|
-
})(
|
|
1250
|
-
var
|
|
1248
|
+
})(rn ||= {});
|
|
1249
|
+
var an = class extends $t {
|
|
1251
1250
|
constructor(e) {
|
|
1252
|
-
super(e,
|
|
1251
|
+
super(e, nn, Oe(e.event.target));
|
|
1253
1252
|
}
|
|
1254
1253
|
};
|
|
1255
|
-
|
|
1254
|
+
an.activators = [{
|
|
1256
1255
|
eventName: "onMouseDown",
|
|
1257
1256
|
handler: (e, t) => {
|
|
1258
1257
|
let { nativeEvent: n } = e, { onActivation: r } = t;
|
|
1259
|
-
return n.button ===
|
|
1258
|
+
return n.button === rn.RightClick ? !1 : (r?.({ event: n }), !0);
|
|
1260
1259
|
}
|
|
1261
1260
|
}];
|
|
1262
|
-
var
|
|
1261
|
+
var on = {
|
|
1263
1262
|
cancel: { name: "touchcancel" },
|
|
1264
1263
|
move: { name: "touchmove" },
|
|
1265
1264
|
end: { name: "touchend" }
|
|
1266
|
-
},
|
|
1265
|
+
}, sn = class extends $t {
|
|
1267
1266
|
constructor(e) {
|
|
1268
|
-
super(e,
|
|
1267
|
+
super(e, on);
|
|
1269
1268
|
}
|
|
1270
1269
|
static setup() {
|
|
1271
|
-
return window.addEventListener(
|
|
1270
|
+
return window.addEventListener(on.move.name, e, {
|
|
1272
1271
|
capture: !1,
|
|
1273
1272
|
passive: !1
|
|
1274
1273
|
}), function() {
|
|
1275
|
-
window.removeEventListener(
|
|
1274
|
+
window.removeEventListener(on.move.name, e);
|
|
1276
1275
|
};
|
|
1277
1276
|
function e() {}
|
|
1278
1277
|
}
|
|
1279
1278
|
};
|
|
1280
|
-
|
|
1279
|
+
sn.activators = [{
|
|
1281
1280
|
eventName: "onTouchStart",
|
|
1282
1281
|
handler: (e, t) => {
|
|
1283
1282
|
let { nativeEvent: n } = e, { onActivation: r } = t, { touches: i } = n;
|
|
1284
1283
|
return i.length > 1 ? !1 : (r?.({ event: n }), !0);
|
|
1285
1284
|
}
|
|
1286
1285
|
}];
|
|
1287
|
-
var
|
|
1286
|
+
var cn;
|
|
1288
1287
|
(function(e) {
|
|
1289
1288
|
e[e.Pointer = 0] = "Pointer", e[e.DraggableRect = 1] = "DraggableRect";
|
|
1290
|
-
})(
|
|
1291
|
-
var
|
|
1289
|
+
})(cn ||= {});
|
|
1290
|
+
var ln;
|
|
1292
1291
|
(function(e) {
|
|
1293
1292
|
e[e.TreeOrder = 0] = "TreeOrder", e[e.ReversedTreeOrder = 1] = "ReversedTreeOrder";
|
|
1294
|
-
})(
|
|
1295
|
-
function
|
|
1296
|
-
let { acceleration: t, activator: n =
|
|
1293
|
+
})(ln ||= {});
|
|
1294
|
+
function un(e) {
|
|
1295
|
+
let { acceleration: t, activator: n = cn.Pointer, canScroll: r, draggingRect: a, enabled: s, interval: l = 5, order: d = ln.TreeOrder, pointerCoordinates: f, scrollableAncestors: p, scrollableAncestorRects: m, delta: h, threshold: g } = e, _ = fn({
|
|
1297
1296
|
delta: h,
|
|
1298
1297
|
disabled: !s
|
|
1299
|
-
}), [v, y] =
|
|
1298
|
+
}), [v, y] = Ae(), b = u({
|
|
1300
1299
|
x: 0,
|
|
1301
1300
|
y: 0
|
|
1302
1301
|
}), x = u({
|
|
@@ -1304,13 +1303,13 @@ function rn(e) {
|
|
|
1304
1303
|
y: 0
|
|
1305
1304
|
}), S = c(() => {
|
|
1306
1305
|
switch (n) {
|
|
1307
|
-
case
|
|
1306
|
+
case cn.Pointer: return f ? {
|
|
1308
1307
|
top: f.y,
|
|
1309
1308
|
bottom: f.y,
|
|
1310
1309
|
left: f.x,
|
|
1311
1310
|
right: f.x
|
|
1312
1311
|
} : null;
|
|
1313
|
-
case
|
|
1312
|
+
case cn.DraggableRect: return a;
|
|
1314
1313
|
}
|
|
1315
1314
|
}, [
|
|
1316
1315
|
n,
|
|
@@ -1321,7 +1320,7 @@ function rn(e) {
|
|
|
1321
1320
|
if (!e) return;
|
|
1322
1321
|
let t = b.current.x * x.current.x, n = b.current.y * x.current.y;
|
|
1323
1322
|
e.scrollBy(t, n);
|
|
1324
|
-
}, []), T = c(() => d ===
|
|
1323
|
+
}, []), T = c(() => d === ln.TreeOrder ? [...p].reverse() : p, [d, p]);
|
|
1325
1324
|
o(() => {
|
|
1326
1325
|
if (!s || !p.length || !S) {
|
|
1327
1326
|
y();
|
|
@@ -1331,7 +1330,7 @@ function rn(e) {
|
|
|
1331
1330
|
if (r?.(e) === !1) continue;
|
|
1332
1331
|
let n = m[p.indexOf(e)];
|
|
1333
1332
|
if (!n) continue;
|
|
1334
|
-
let { direction: i, speed: a } =
|
|
1333
|
+
let { direction: i, speed: a } = Ft(e, n, S, t, g);
|
|
1335
1334
|
for (let e of ["x", "y"]) _[e][i[e]] || (a[e] = 0, i[e] = 0);
|
|
1336
1335
|
if (a.x > 0 || a.y > 0) {
|
|
1337
1336
|
y(), C.current = e, v(w, l), b.current = a, x.current = i;
|
|
@@ -1361,7 +1360,7 @@ function rn(e) {
|
|
|
1361
1360
|
JSON.stringify(g)
|
|
1362
1361
|
]);
|
|
1363
1362
|
}
|
|
1364
|
-
var
|
|
1363
|
+
var dn = {
|
|
1365
1364
|
x: {
|
|
1366
1365
|
[X.Backward]: !1,
|
|
1367
1366
|
[X.Forward]: !1
|
|
@@ -1371,10 +1370,10 @@ var an = {
|
|
|
1371
1370
|
[X.Forward]: !1
|
|
1372
1371
|
}
|
|
1373
1372
|
};
|
|
1374
|
-
function
|
|
1375
|
-
let { delta: t, disabled: n } = e, r =
|
|
1376
|
-
return
|
|
1377
|
-
if (n || !r || !e) return
|
|
1373
|
+
function fn(e) {
|
|
1374
|
+
let { delta: t, disabled: n } = e, r = Pe(t);
|
|
1375
|
+
return Me((e) => {
|
|
1376
|
+
if (n || !r || !e) return dn;
|
|
1378
1377
|
let i = {
|
|
1379
1378
|
x: Math.sign(t.x - r.x),
|
|
1380
1379
|
y: Math.sign(t.y - r.y)
|
|
@@ -1395,11 +1394,11 @@ function on(e) {
|
|
|
1395
1394
|
r
|
|
1396
1395
|
]);
|
|
1397
1396
|
}
|
|
1398
|
-
function
|
|
1397
|
+
function pn(e, t) {
|
|
1399
1398
|
let n = t == null ? void 0 : e.get(t), r = n ? n.node.current : null;
|
|
1400
|
-
return
|
|
1399
|
+
return Me((e) => t == null ? null : r ?? e ?? null, [r, t]);
|
|
1401
1400
|
}
|
|
1402
|
-
function
|
|
1401
|
+
function mn(e, t) {
|
|
1403
1402
|
return c(() => e.reduce((e, n) => {
|
|
1404
1403
|
let { sensor: r } = n, i = r.activators.map((e) => ({
|
|
1405
1404
|
eventName: e.eventName,
|
|
@@ -1408,21 +1407,21 @@ function cn(e, t) {
|
|
|
1408
1407
|
return [...e, ...i];
|
|
1409
1408
|
}, []), [e, t]);
|
|
1410
1409
|
}
|
|
1411
|
-
var
|
|
1410
|
+
var hn;
|
|
1412
1411
|
(function(e) {
|
|
1413
1412
|
e[e.Always = 0] = "Always", e[e.BeforeDragging = 1] = "BeforeDragging", e[e.WhileDragging = 2] = "WhileDragging";
|
|
1414
|
-
})(
|
|
1415
|
-
var
|
|
1413
|
+
})(hn ||= {});
|
|
1414
|
+
var gn;
|
|
1416
1415
|
(function(e) {
|
|
1417
1416
|
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 =
|
|
1417
|
+
})(gn ||= {});
|
|
1418
|
+
var _n = /* @__PURE__ */ new Map();
|
|
1419
|
+
function vn(e, t) {
|
|
1420
|
+
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 = je(h), _ = i(function(e) {
|
|
1422
1421
|
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 ===
|
|
1422
|
+
}, [g]), v = u(null), y = Me((t) => {
|
|
1423
|
+
if (h && !n) return _n;
|
|
1424
|
+
if (!t || t === _n || m.current !== e || s != null) {
|
|
1426
1425
|
let t = /* @__PURE__ */ new Map();
|
|
1427
1426
|
for (let n of e) {
|
|
1428
1427
|
if (!n) continue;
|
|
@@ -1430,7 +1429,7 @@ function fn(e, t) {
|
|
|
1430
1429
|
t.set(n.id, n.rect.current);
|
|
1431
1430
|
continue;
|
|
1432
1431
|
}
|
|
1433
|
-
let e = n.node.current, r = e ? new
|
|
1432
|
+
let e = n.node.current, r = e ? new Ht(f(e), e) : null;
|
|
1434
1433
|
n.rect.current = r, r && t.set(n.id, r);
|
|
1435
1434
|
}
|
|
1436
1435
|
return t;
|
|
@@ -1465,39 +1464,39 @@ function fn(e, t) {
|
|
|
1465
1464
|
};
|
|
1466
1465
|
function b() {
|
|
1467
1466
|
switch (p) {
|
|
1468
|
-
case
|
|
1469
|
-
case
|
|
1467
|
+
case hn.Always: return !1;
|
|
1468
|
+
case hn.BeforeDragging: return n;
|
|
1470
1469
|
default: return !n;
|
|
1471
1470
|
}
|
|
1472
1471
|
}
|
|
1473
1472
|
}
|
|
1474
|
-
function
|
|
1475
|
-
return
|
|
1473
|
+
function yn(e, t) {
|
|
1474
|
+
return Me((n) => e ? n || (typeof t == "function" ? t(e) : e) : null, [t, e]);
|
|
1476
1475
|
}
|
|
1477
|
-
function
|
|
1478
|
-
return
|
|
1476
|
+
function bn(e, t) {
|
|
1477
|
+
return yn(e, t);
|
|
1479
1478
|
}
|
|
1480
|
-
function
|
|
1481
|
-
let { callback: t, disabled: n } = e, r =
|
|
1479
|
+
function xn(e) {
|
|
1480
|
+
let { callback: t, disabled: n } = e, r = ke(t), i = c(() => {
|
|
1482
1481
|
if (n || typeof window > "u" || window.MutationObserver === void 0) return;
|
|
1483
1482
|
let { MutationObserver: e } = window;
|
|
1484
1483
|
return new e(r);
|
|
1485
1484
|
}, [r, n]);
|
|
1486
1485
|
return o(() => () => i?.disconnect(), [i]), i;
|
|
1487
1486
|
}
|
|
1488
|
-
function
|
|
1489
|
-
let { callback: t, disabled: n } = e, r =
|
|
1487
|
+
function Sn(e) {
|
|
1488
|
+
let { callback: t, disabled: n } = e, r = ke(t), i = c(() => {
|
|
1490
1489
|
if (n || typeof window > "u" || window.ResizeObserver === void 0) return;
|
|
1491
1490
|
let { ResizeObserver: e } = window;
|
|
1492
1491
|
return new e(r);
|
|
1493
1492
|
}, [n]);
|
|
1494
1493
|
return o(() => () => i?.disconnect(), [i]), i;
|
|
1495
1494
|
}
|
|
1496
|
-
function
|
|
1497
|
-
return new
|
|
1495
|
+
function Cn(e) {
|
|
1496
|
+
return new Ht(xt(e), e);
|
|
1498
1497
|
}
|
|
1499
|
-
function
|
|
1500
|
-
t === void 0 && (t =
|
|
1498
|
+
function wn(e, t, n) {
|
|
1499
|
+
t === void 0 && (t = Cn);
|
|
1501
1500
|
let [r, i] = d(null);
|
|
1502
1501
|
function a() {
|
|
1503
1502
|
i((r) => {
|
|
@@ -1507,7 +1506,7 @@ function vn(e, t, n) {
|
|
|
1507
1506
|
return JSON.stringify(r) === JSON.stringify(i) ? r : i;
|
|
1508
1507
|
});
|
|
1509
1508
|
}
|
|
1510
|
-
let o =
|
|
1509
|
+
let o = xn({ callback(t) {
|
|
1511
1510
|
if (e) for (let n of t) {
|
|
1512
1511
|
let { type: t, target: r } = n;
|
|
1513
1512
|
if (t === "childList" && r instanceof HTMLElement && r.contains(e)) {
|
|
@@ -1515,36 +1514,36 @@ function vn(e, t, n) {
|
|
|
1515
1514
|
break;
|
|
1516
1515
|
}
|
|
1517
1516
|
}
|
|
1518
|
-
} }), s =
|
|
1519
|
-
return
|
|
1517
|
+
} }), s = Sn({ callback: a });
|
|
1518
|
+
return q(() => {
|
|
1520
1519
|
a(), e ? (s?.observe(e), o?.observe(document.body, {
|
|
1521
1520
|
childList: !0,
|
|
1522
1521
|
subtree: !0
|
|
1523
1522
|
})) : (s?.disconnect(), o?.disconnect());
|
|
1524
1523
|
}, [e]), r;
|
|
1525
1524
|
}
|
|
1526
|
-
function
|
|
1527
|
-
return
|
|
1525
|
+
function Tn(e) {
|
|
1526
|
+
return ht(e, yn(e));
|
|
1528
1527
|
}
|
|
1529
|
-
var
|
|
1530
|
-
function
|
|
1531
|
-
let t = u(e), n =
|
|
1528
|
+
var En = [];
|
|
1529
|
+
function Dn(e) {
|
|
1530
|
+
let t = u(e), n = Me((n) => e ? n && n !== En && e && t.current && e.parentNode === t.current.parentNode ? n : Et(e) : En, [e]);
|
|
1532
1531
|
return o(() => {
|
|
1533
1532
|
t.current = e;
|
|
1534
1533
|
}, [e]), n;
|
|
1535
1534
|
}
|
|
1536
|
-
function
|
|
1535
|
+
function On(e) {
|
|
1537
1536
|
let [t, n] = d(null), r = u(e), a = i((e) => {
|
|
1538
|
-
let t =
|
|
1539
|
-
t && n((e) => e ? (e.set(t,
|
|
1537
|
+
let t = Ot(e.target);
|
|
1538
|
+
t && n((e) => e ? (e.set(t, jt(t)), new Map(e)) : null);
|
|
1540
1539
|
}, []);
|
|
1541
1540
|
return o(() => {
|
|
1542
1541
|
let t = r.current;
|
|
1543
1542
|
if (e !== t) {
|
|
1544
1543
|
i(t);
|
|
1545
1544
|
let o = e.map((e) => {
|
|
1546
|
-
let t =
|
|
1547
|
-
return t ? (t.addEventListener("scroll", a, { passive: !0 }), [t,
|
|
1545
|
+
let t = Ot(e);
|
|
1546
|
+
return t ? (t.addEventListener("scroll", a, { passive: !0 }), [t, jt(t)]) : null;
|
|
1548
1547
|
}).filter((e) => e != null);
|
|
1549
1548
|
n(o.length ? new Map(o) : null), r.current = e;
|
|
1550
1549
|
}
|
|
@@ -1553,12 +1552,12 @@ function Sn(e) {
|
|
|
1553
1552
|
};
|
|
1554
1553
|
function i(e) {
|
|
1555
1554
|
e.forEach((e) => {
|
|
1556
|
-
|
|
1555
|
+
Ot(e)?.removeEventListener("scroll", a);
|
|
1557
1556
|
});
|
|
1558
1557
|
}
|
|
1559
|
-
}, [a, e]), c(() => e.length ? t ? Array.from(t.values()).reduce((e, t) =>
|
|
1558
|
+
}, [a, e]), c(() => e.length ? t ? Array.from(t.values()).reduce((e, t) => Re(e, t), Y) : Lt(e) : Y, [e, t]);
|
|
1560
1559
|
}
|
|
1561
|
-
function
|
|
1560
|
+
function kn(e, t) {
|
|
1562
1561
|
t === void 0 && (t = []);
|
|
1563
1562
|
let n = u(null);
|
|
1564
1563
|
return o(() => {
|
|
@@ -1566,11 +1565,11 @@ function Cn(e, t) {
|
|
|
1566
1565
|
}, t), o(() => {
|
|
1567
1566
|
let t = e !== Y;
|
|
1568
1567
|
t && !n.current && (n.current = e), !t && n.current && (n.current = null);
|
|
1569
|
-
}, [e]), n.current ?
|
|
1568
|
+
}, [e]), n.current ? ze(e, n.current) : Y;
|
|
1570
1569
|
}
|
|
1571
|
-
function
|
|
1570
|
+
function An(e) {
|
|
1572
1571
|
o(() => {
|
|
1573
|
-
if (!
|
|
1572
|
+
if (!Ce) return;
|
|
1574
1573
|
let t = e.map((e) => {
|
|
1575
1574
|
let { sensor: t } = e;
|
|
1576
1575
|
return t.setup == null ? void 0 : t.setup();
|
|
@@ -1583,7 +1582,7 @@ function wn(e) {
|
|
|
1583
1582
|
return t;
|
|
1584
1583
|
}));
|
|
1585
1584
|
}
|
|
1586
|
-
function
|
|
1585
|
+
function jn(e, t) {
|
|
1587
1586
|
return c(() => e.reduce((e, n) => {
|
|
1588
1587
|
let { eventName: r, handler: i } = n;
|
|
1589
1588
|
return e[r] = (e) => {
|
|
@@ -1591,30 +1590,30 @@ function Tn(e, t) {
|
|
|
1591
1590
|
}, e;
|
|
1592
1591
|
}, {}), [e, t]);
|
|
1593
1592
|
}
|
|
1594
|
-
function
|
|
1595
|
-
return c(() => e ?
|
|
1593
|
+
function Mn(e) {
|
|
1594
|
+
return c(() => e ? Ct(e) : null, [e]);
|
|
1596
1595
|
}
|
|
1597
|
-
var
|
|
1598
|
-
function
|
|
1599
|
-
t === void 0 && (t =
|
|
1600
|
-
let [n] = e, r =
|
|
1596
|
+
var Nn = [];
|
|
1597
|
+
function Pn(e, t) {
|
|
1598
|
+
t === void 0 && (t = xt);
|
|
1599
|
+
let [n] = e, r = Mn(n ? K(n) : null), [i, a] = d(Nn);
|
|
1601
1600
|
function o() {
|
|
1602
|
-
a(() => e.length ? e.map((e) =>
|
|
1601
|
+
a(() => e.length ? e.map((e) => Mt(e) ? r : new Ht(t(e), e)) : Nn);
|
|
1603
1602
|
}
|
|
1604
|
-
let s =
|
|
1605
|
-
return
|
|
1603
|
+
let s = Sn({ callback: o });
|
|
1604
|
+
return q(() => {
|
|
1606
1605
|
s?.disconnect(), o(), e.forEach((e) => s?.observe(e));
|
|
1607
1606
|
}, [e]), i;
|
|
1608
1607
|
}
|
|
1609
|
-
function
|
|
1608
|
+
function Fn(e) {
|
|
1610
1609
|
if (!e) return null;
|
|
1611
1610
|
if (e.children.length > 1) return e;
|
|
1612
1611
|
let t = e.children[0];
|
|
1613
|
-
return
|
|
1612
|
+
return Ee(t) ? t : e;
|
|
1614
1613
|
}
|
|
1615
|
-
function
|
|
1616
|
-
let { measure: t } = e, [n, r] = d(null), a =
|
|
1617
|
-
for (let { target: n } of e) if (
|
|
1614
|
+
function In(e) {
|
|
1615
|
+
let { measure: t } = e, [n, r] = d(null), a = Sn({ callback: i((e) => {
|
|
1616
|
+
for (let { target: n } of e) if (Ee(n)) {
|
|
1618
1617
|
r((e) => {
|
|
1619
1618
|
let r = t(n);
|
|
1620
1619
|
return e ? {
|
|
@@ -1625,8 +1624,8 @@ function An(e) {
|
|
|
1625
1624
|
});
|
|
1626
1625
|
break;
|
|
1627
1626
|
}
|
|
1628
|
-
}, [t]) }), [o, s] =
|
|
1629
|
-
let n =
|
|
1627
|
+
}, [t]) }), [o, s] = Ne(i((e) => {
|
|
1628
|
+
let n = Fn(e);
|
|
1630
1629
|
a?.disconnect(), n && a?.observe(n), r(n ? t(n) : null);
|
|
1631
1630
|
}, [t, a]));
|
|
1632
1631
|
return c(() => ({
|
|
@@ -1639,21 +1638,21 @@ function An(e) {
|
|
|
1639
1638
|
s
|
|
1640
1639
|
]);
|
|
1641
1640
|
}
|
|
1642
|
-
var
|
|
1643
|
-
sensor:
|
|
1641
|
+
var Ln = [{
|
|
1642
|
+
sensor: tn,
|
|
1644
1643
|
options: {}
|
|
1645
1644
|
}, {
|
|
1646
|
-
sensor:
|
|
1645
|
+
sensor: Xt,
|
|
1647
1646
|
options: {}
|
|
1648
|
-
}],
|
|
1649
|
-
draggable: { measure:
|
|
1647
|
+
}], Rn = { current: {} }, zn = {
|
|
1648
|
+
draggable: { measure: St },
|
|
1650
1649
|
droppable: {
|
|
1651
|
-
measure:
|
|
1652
|
-
strategy:
|
|
1653
|
-
frequency:
|
|
1650
|
+
measure: St,
|
|
1651
|
+
strategy: hn.WhileDragging,
|
|
1652
|
+
frequency: gn.Optimized
|
|
1654
1653
|
},
|
|
1655
|
-
dragOverlay: { measure:
|
|
1656
|
-
},
|
|
1654
|
+
dragOverlay: { measure: xt }
|
|
1655
|
+
}, Bn = class extends Map {
|
|
1657
1656
|
get(e) {
|
|
1658
1657
|
return e == null ? void 0 : super.get(e) ?? void 0;
|
|
1659
1658
|
}
|
|
@@ -1669,7 +1668,7 @@ var jn = [{
|
|
|
1669
1668
|
getNodeFor(e) {
|
|
1670
1669
|
return this.get(e)?.node.current ?? void 0;
|
|
1671
1670
|
}
|
|
1672
|
-
},
|
|
1671
|
+
}, Vn = {
|
|
1673
1672
|
activatorEvent: null,
|
|
1674
1673
|
active: null,
|
|
1675
1674
|
activeNode: null,
|
|
@@ -1678,31 +1677,31 @@ var jn = [{
|
|
|
1678
1677
|
containerNodeRect: null,
|
|
1679
1678
|
draggableNodes: /* @__PURE__ */ new Map(),
|
|
1680
1679
|
droppableRects: /* @__PURE__ */ new Map(),
|
|
1681
|
-
droppableContainers: /* @__PURE__ */ new
|
|
1680
|
+
droppableContainers: /* @__PURE__ */ new Bn(),
|
|
1682
1681
|
over: null,
|
|
1683
1682
|
dragOverlay: {
|
|
1684
1683
|
nodeRef: { current: null },
|
|
1685
1684
|
rect: null,
|
|
1686
|
-
setRef:
|
|
1685
|
+
setRef: rt
|
|
1687
1686
|
},
|
|
1688
1687
|
scrollableAncestors: [],
|
|
1689
1688
|
scrollableAncestorRects: [],
|
|
1690
|
-
measuringConfiguration:
|
|
1691
|
-
measureDroppableContainers:
|
|
1689
|
+
measuringConfiguration: zn,
|
|
1690
|
+
measureDroppableContainers: rt,
|
|
1692
1691
|
windowRect: null,
|
|
1693
1692
|
measuringScheduled: !1
|
|
1694
|
-
},
|
|
1693
|
+
}, Hn = /* @__PURE__ */ n({
|
|
1695
1694
|
activatorEvent: null,
|
|
1696
1695
|
activators: [],
|
|
1697
1696
|
active: null,
|
|
1698
1697
|
activeNodeRect: null,
|
|
1699
1698
|
ariaDescribedById: { draggable: "" },
|
|
1700
|
-
dispatch:
|
|
1699
|
+
dispatch: rt,
|
|
1701
1700
|
draggableNodes: /* @__PURE__ */ new Map(),
|
|
1702
1701
|
over: null,
|
|
1703
|
-
measureDroppableContainers:
|
|
1704
|
-
}),
|
|
1705
|
-
function
|
|
1702
|
+
measureDroppableContainers: rt
|
|
1703
|
+
}), Un = /* @__PURE__ */ n(Vn);
|
|
1704
|
+
function Wn() {
|
|
1706
1705
|
return {
|
|
1707
1706
|
draggable: {
|
|
1708
1707
|
active: null,
|
|
@@ -1716,10 +1715,10 @@ function Rn() {
|
|
|
1716
1715
|
y: 0
|
|
1717
1716
|
}
|
|
1718
1717
|
},
|
|
1719
|
-
droppable: { containers: new
|
|
1718
|
+
droppable: { containers: new Bn() }
|
|
1720
1719
|
};
|
|
1721
1720
|
}
|
|
1722
|
-
function
|
|
1721
|
+
function Gn(e, t) {
|
|
1723
1722
|
switch (t.type) {
|
|
1724
1723
|
case J.DragStart: return {
|
|
1725
1724
|
...e,
|
|
@@ -1756,7 +1755,7 @@ function zn(e, t) {
|
|
|
1756
1755
|
}
|
|
1757
1756
|
};
|
|
1758
1757
|
case J.RegisterDroppable: {
|
|
1759
|
-
let { element: n } = t, { id: r } = n, i = new
|
|
1758
|
+
let { element: n } = t, { id: r } = n, i = new Bn(e.droppable.containers);
|
|
1760
1759
|
return i.set(r, n), {
|
|
1761
1760
|
...e,
|
|
1762
1761
|
droppable: {
|
|
@@ -1768,7 +1767,7 @@ function zn(e, t) {
|
|
|
1768
1767
|
case J.SetDroppableDisabled: {
|
|
1769
1768
|
let { id: n, key: r, disabled: i } = t, a = e.droppable.containers.get(n);
|
|
1770
1769
|
if (!a || r !== a.key) return e;
|
|
1771
|
-
let o = new
|
|
1770
|
+
let o = new Bn(e.droppable.containers);
|
|
1772
1771
|
return o.set(n, {
|
|
1773
1772
|
...a,
|
|
1774
1773
|
disabled: i
|
|
@@ -1783,7 +1782,7 @@ function zn(e, t) {
|
|
|
1783
1782
|
case J.UnregisterDroppable: {
|
|
1784
1783
|
let { id: n, key: r } = t, i = e.droppable.containers.get(n);
|
|
1785
1784
|
if (!i || r !== i.key) return e;
|
|
1786
|
-
let a = new
|
|
1785
|
+
let a = new Bn(e.droppable.containers);
|
|
1787
1786
|
return a.delete(n), {
|
|
1788
1787
|
...e,
|
|
1789
1788
|
droppable: {
|
|
@@ -1795,11 +1794,11 @@ function zn(e, t) {
|
|
|
1795
1794
|
default: return e;
|
|
1796
1795
|
}
|
|
1797
1796
|
}
|
|
1798
|
-
function
|
|
1799
|
-
let { disabled: t } = e, { active: n, activatorEvent: r, draggableNodes: i } = a(
|
|
1797
|
+
function Kn(e) {
|
|
1798
|
+
let { disabled: t } = e, { active: n, activatorEvent: r, draggableNodes: i } = a(Hn), s = Pe(r), c = Pe(n?.id);
|
|
1800
1799
|
return o(() => {
|
|
1801
1800
|
if (!t && !r && s && c != null) {
|
|
1802
|
-
if (!
|
|
1801
|
+
if (!Ve(s) || document.activeElement === s.target) return;
|
|
1803
1802
|
let e = i.get(c);
|
|
1804
1803
|
if (!e) return;
|
|
1805
1804
|
let { activatorNode: t, node: n } = e;
|
|
@@ -1807,7 +1806,7 @@ function Bn(e) {
|
|
|
1807
1806
|
requestAnimationFrame(() => {
|
|
1808
1807
|
for (let e of [t.current, n.current]) {
|
|
1809
1808
|
if (!e) continue;
|
|
1810
|
-
let t =
|
|
1809
|
+
let t = Ke(e);
|
|
1811
1810
|
if (t) {
|
|
1812
1811
|
t.focus();
|
|
1813
1812
|
break;
|
|
@@ -1823,25 +1822,25 @@ function Bn(e) {
|
|
|
1823
1822
|
s
|
|
1824
1823
|
]), null;
|
|
1825
1824
|
}
|
|
1826
|
-
function
|
|
1825
|
+
function qn(e, t) {
|
|
1827
1826
|
let { transform: n, ...r } = t;
|
|
1828
1827
|
return e != null && e.length ? e.reduce((e, t) => t({
|
|
1829
1828
|
transform: e,
|
|
1830
1829
|
...r
|
|
1831
1830
|
}), n) : n;
|
|
1832
1831
|
}
|
|
1833
|
-
function
|
|
1832
|
+
function Jn(e) {
|
|
1834
1833
|
return c(() => ({
|
|
1835
1834
|
draggable: {
|
|
1836
|
-
...
|
|
1835
|
+
...zn.draggable,
|
|
1837
1836
|
...e?.draggable
|
|
1838
1837
|
},
|
|
1839
1838
|
droppable: {
|
|
1840
|
-
...
|
|
1839
|
+
...zn.droppable,
|
|
1841
1840
|
...e?.droppable
|
|
1842
1841
|
},
|
|
1843
1842
|
dragOverlay: {
|
|
1844
|
-
...
|
|
1843
|
+
...zn.dragOverlay,
|
|
1845
1844
|
...e?.dragOverlay
|
|
1846
1845
|
}
|
|
1847
1846
|
}), [
|
|
@@ -1850,12 +1849,12 @@ function Hn(e) {
|
|
|
1850
1849
|
e?.dragOverlay
|
|
1851
1850
|
]);
|
|
1852
1851
|
}
|
|
1853
|
-
function
|
|
1852
|
+
function Yn(e) {
|
|
1854
1853
|
let { activeNode: t, measure: n, initialRect: r, config: i = !0 } = e, a = u(!1), { x: o, y: s } = typeof i == "boolean" ? {
|
|
1855
1854
|
x: i,
|
|
1856
1855
|
y: i
|
|
1857
1856
|
} : i;
|
|
1858
|
-
|
|
1857
|
+
q(() => {
|
|
1859
1858
|
if (!o && !s || !t) {
|
|
1860
1859
|
a.current = !1;
|
|
1861
1860
|
return;
|
|
@@ -1863,9 +1862,9 @@ function Un(e) {
|
|
|
1863
1862
|
if (a.current || !r) return;
|
|
1864
1863
|
let e = t?.node.current;
|
|
1865
1864
|
if (!e || e.isConnected === !1) return;
|
|
1866
|
-
let i =
|
|
1865
|
+
let i = ht(n(e), r);
|
|
1867
1866
|
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 =
|
|
1867
|
+
let t = Dt(e);
|
|
1869
1868
|
t && t.scrollBy({
|
|
1870
1869
|
top: i.y,
|
|
1871
1870
|
left: i.x
|
|
@@ -1879,40 +1878,40 @@ function Un(e) {
|
|
|
1879
1878
|
n
|
|
1880
1879
|
]);
|
|
1881
1880
|
}
|
|
1882
|
-
var
|
|
1881
|
+
var Xn = /* @__PURE__ */ n({
|
|
1883
1882
|
...Y,
|
|
1884
1883
|
scaleX: 1,
|
|
1885
1884
|
scaleY: 1
|
|
1886
|
-
}),
|
|
1885
|
+
}), Zn;
|
|
1887
1886
|
(function(e) {
|
|
1888
1887
|
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 =
|
|
1888
|
+
})(Zn ||= {});
|
|
1889
|
+
var Qn = /* @__PURE__ */ r(function(e) {
|
|
1890
|
+
let { id: n, accessibility: r, autoScroll: a = !0, children: s, sensors: f = Ln, collisionDetection: p = pt, measuring: m, modifiers: h, ...g } = e, [_, v] = l(Gn, void 0, Wn), [y, b] = $e(), [x, S] = d(Zn.Uninitialized), C = x === Zn.Initialized, { draggable: { active: w, nodes: T, translate: E }, droppable: { containers: D } } = _, ee = w == null ? null : T.get(w), O = u({
|
|
1892
1891
|
initial: null,
|
|
1893
1892
|
translated: null
|
|
1894
1893
|
}), k = c(() => w == null ? null : {
|
|
1895
1894
|
id: w,
|
|
1896
|
-
data: ee?.data ??
|
|
1895
|
+
data: ee?.data ?? Rn,
|
|
1897
1896
|
rect: O
|
|
1898
|
-
}, [w, ee]), A = u(null), [te, ne] = d(null), [j, M] = d(null), N =
|
|
1897
|
+
}, [w, ee]), A = u(null), [te, ne] = d(null), [j, M] = d(null), N = je(g, Object.values(g)), P = Ie("DndDescribedBy", n), re = c(() => D.getEnabled(), [D]), F = Jn(m), { droppableRects: I, measureDroppableContainers: ie, measuringScheduled: L } = vn(re, {
|
|
1899
1898
|
dragging: C,
|
|
1900
1899
|
dependencies: [E.x, E.y],
|
|
1901
1900
|
config: F.droppable
|
|
1902
|
-
}),
|
|
1903
|
-
|
|
1901
|
+
}), R = pn(T, w), ae = c(() => j ? Ue(j) : null, [j]), oe = Me(), se = bn(R, F.draggable.measure);
|
|
1902
|
+
Yn({
|
|
1904
1903
|
activeNode: w == null ? null : T.get(w),
|
|
1905
|
-
config:
|
|
1906
|
-
initialRect:
|
|
1904
|
+
config: oe.layoutShiftCompensation,
|
|
1905
|
+
initialRect: se,
|
|
1907
1906
|
measure: F.draggable.measure
|
|
1908
1907
|
});
|
|
1909
|
-
let z =
|
|
1908
|
+
let z = wn(R, F.draggable.measure, se), B = wn(R ? R.parentElement : null), V = u({
|
|
1910
1909
|
activatorEvent: null,
|
|
1911
1910
|
active: null,
|
|
1912
|
-
activeNode:
|
|
1911
|
+
activeNode: R,
|
|
1913
1912
|
collisionRect: null,
|
|
1914
1913
|
collisions: null,
|
|
1915
|
-
droppableRects:
|
|
1914
|
+
droppableRects: I,
|
|
1916
1915
|
draggableNodes: T,
|
|
1917
1916
|
draggingNode: null,
|
|
1918
1917
|
draggingNodeRect: null,
|
|
@@ -1920,41 +1919,41 @@ var Kn = /* @__PURE__ */ r(function(e) {
|
|
|
1920
1919
|
over: null,
|
|
1921
1920
|
scrollableAncestors: [],
|
|
1922
1921
|
scrollAdjustedTranslate: null
|
|
1923
|
-
}),
|
|
1922
|
+
}), le = D.getNodeFor(V.current.over?.id), H = In({ measure: F.dragOverlay.measure }), ue = H.nodeRef.current ?? R, de = C ? H.rect ?? z : null, fe = !!(H.nodeRef.current && H.rect), U = Tn(fe ? null : z), pe = Mn(ue ? K(ue) : null), W = Dn(C ? le ?? R : null), me = Pn(W), he = qn(h, {
|
|
1924
1923
|
transform: {
|
|
1925
|
-
x: E.x -
|
|
1926
|
-
y: E.y -
|
|
1924
|
+
x: E.x - U.x,
|
|
1925
|
+
y: E.y - U.y,
|
|
1927
1926
|
scaleX: 1,
|
|
1928
1927
|
scaleY: 1
|
|
1929
1928
|
},
|
|
1930
1929
|
activatorEvent: j,
|
|
1931
1930
|
active: k,
|
|
1932
1931
|
activeNodeRect: z,
|
|
1933
|
-
containerNodeRect:
|
|
1934
|
-
draggingNodeRect:
|
|
1935
|
-
over:
|
|
1936
|
-
overlayNodeRect:
|
|
1937
|
-
scrollableAncestors:
|
|
1938
|
-
scrollableAncestorRects:
|
|
1939
|
-
windowRect:
|
|
1940
|
-
}),
|
|
1932
|
+
containerNodeRect: B,
|
|
1933
|
+
draggingNodeRect: de,
|
|
1934
|
+
over: V.current.over,
|
|
1935
|
+
overlayNodeRect: H.rect,
|
|
1936
|
+
scrollableAncestors: W,
|
|
1937
|
+
scrollableAncestorRects: me,
|
|
1938
|
+
windowRect: pe
|
|
1939
|
+
}), ge = ae ? Re(ae, E) : null, _e = On(W), ve = kn(_e), ye = kn(_e, [z]), be = Re(he, ve), xe = de ? _t(de, he) : null, Se = k && xe ? p({
|
|
1941
1940
|
active: k,
|
|
1942
|
-
collisionRect:
|
|
1943
|
-
droppableRects:
|
|
1941
|
+
collisionRect: xe,
|
|
1942
|
+
droppableRects: I,
|
|
1944
1943
|
droppableContainers: re,
|
|
1945
|
-
pointerCoordinates:
|
|
1946
|
-
}) : null, Ce =
|
|
1944
|
+
pointerCoordinates: ge
|
|
1945
|
+
}) : null, Ce = lt(Se, "id"), [G, we] = d(null), Te = mt(fe ? he : Re(he, ye), G?.rect ?? null, z), Ee = u(null), De = i((e, t) => {
|
|
1947
1946
|
let { sensor: n, options: r } = t;
|
|
1948
1947
|
if (A.current == null) return;
|
|
1949
1948
|
let i = T.get(A.current);
|
|
1950
1949
|
if (!i) return;
|
|
1951
1950
|
let a = e.nativeEvent;
|
|
1952
|
-
|
|
1951
|
+
Ee.current = new n({
|
|
1953
1952
|
active: A.current,
|
|
1954
1953
|
activeNode: i,
|
|
1955
1954
|
event: a,
|
|
1956
1955
|
options: r,
|
|
1957
|
-
context:
|
|
1956
|
+
context: V,
|
|
1958
1957
|
onAbort(e) {
|
|
1959
1958
|
if (!T.get(e)) return;
|
|
1960
1959
|
let { onDragAbort: t } = N.current, n = { id: e };
|
|
@@ -1989,15 +1988,15 @@ var Kn = /* @__PURE__ */ r(function(e) {
|
|
|
1989
1988
|
rect: O
|
|
1990
1989
|
}
|
|
1991
1990
|
};
|
|
1992
|
-
|
|
1993
|
-
r?.(i), S(
|
|
1991
|
+
ce(() => {
|
|
1992
|
+
r?.(i), S(Zn.Initializing), v({
|
|
1994
1993
|
type: J.DragStart,
|
|
1995
1994
|
initialCoordinates: e,
|
|
1996
1995
|
active: t
|
|
1997
1996
|
}), y({
|
|
1998
1997
|
type: "onDragStart",
|
|
1999
1998
|
event: i
|
|
2000
|
-
}), ne(
|
|
1999
|
+
}), ne(Ee.current), M(a);
|
|
2001
2000
|
});
|
|
2002
2001
|
},
|
|
2003
2002
|
onMove(e) {
|
|
@@ -2011,7 +2010,7 @@ var Kn = /* @__PURE__ */ r(function(e) {
|
|
|
2011
2010
|
});
|
|
2012
2011
|
function o(e) {
|
|
2013
2012
|
return async function() {
|
|
2014
|
-
let { active: t, collisions: n, over: r, scrollAdjustedTranslate: i } =
|
|
2013
|
+
let { active: t, collisions: n, over: r, scrollAdjustedTranslate: i } = V.current, o = null;
|
|
2015
2014
|
if (t && i) {
|
|
2016
2015
|
let { cancelDrop: s } = N.current;
|
|
2017
2016
|
o = {
|
|
@@ -2022,8 +2021,8 @@ var Kn = /* @__PURE__ */ r(function(e) {
|
|
|
2022
2021
|
over: r
|
|
2023
2022
|
}, e === J.DragEnd && typeof s == "function" && await Promise.resolve(s(o)) && (e = J.DragCancel);
|
|
2024
2023
|
}
|
|
2025
|
-
A.current = null,
|
|
2026
|
-
v({ type: e }), S(
|
|
2024
|
+
A.current = null, ce(() => {
|
|
2025
|
+
v({ type: e }), S(Zn.Uninitialized), we(null), ne(null), M(null), Ee.current = null;
|
|
2027
2026
|
let t = e === J.DragEnd ? "onDragEnd" : "onDragCancel";
|
|
2028
2027
|
if (o) {
|
|
2029
2028
|
let e = N.current[t];
|
|
@@ -2035,35 +2034,35 @@ var Kn = /* @__PURE__ */ r(function(e) {
|
|
|
2035
2034
|
});
|
|
2036
2035
|
};
|
|
2037
2036
|
}
|
|
2038
|
-
}, [T]),
|
|
2037
|
+
}, [T]), Oe = mn(f, i((e, t) => (n, r) => {
|
|
2039
2038
|
let i = n.nativeEvent, a = T.get(r);
|
|
2040
2039
|
if (A.current !== null || !a || i.dndKit || i.defaultPrevented) return;
|
|
2041
2040
|
let o = { active: a };
|
|
2042
|
-
e(n, t.options, o) === !0 && (i.dndKit = { capturedBy: t.sensor }, A.current = r,
|
|
2043
|
-
}, [T,
|
|
2044
|
-
|
|
2045
|
-
z && x ===
|
|
2041
|
+
e(n, t.options, o) === !0 && (i.dndKit = { capturedBy: t.sensor }, A.current = r, De(n, t));
|
|
2042
|
+
}, [T, De]));
|
|
2043
|
+
An(f), q(() => {
|
|
2044
|
+
z && x === Zn.Initializing && S(Zn.Initialized);
|
|
2046
2045
|
}, [z, x]), o(() => {
|
|
2047
|
-
let { onDragMove: e } = N.current, { active: t, activatorEvent: n, collisions: r, over: i } =
|
|
2046
|
+
let { onDragMove: e } = N.current, { active: t, activatorEvent: n, collisions: r, over: i } = V.current;
|
|
2048
2047
|
if (!t || !n) return;
|
|
2049
2048
|
let a = {
|
|
2050
2049
|
active: t,
|
|
2051
2050
|
activatorEvent: n,
|
|
2052
2051
|
collisions: r,
|
|
2053
2052
|
delta: {
|
|
2054
|
-
x:
|
|
2055
|
-
y:
|
|
2053
|
+
x: be.x,
|
|
2054
|
+
y: be.y
|
|
2056
2055
|
},
|
|
2057
2056
|
over: i
|
|
2058
2057
|
};
|
|
2059
|
-
|
|
2058
|
+
ce(() => {
|
|
2060
2059
|
e?.(a), y({
|
|
2061
2060
|
type: "onDragMove",
|
|
2062
2061
|
event: a
|
|
2063
2062
|
});
|
|
2064
2063
|
});
|
|
2065
|
-
}, [
|
|
2066
|
-
let { active: e, activatorEvent: t, collisions: n, droppableContainers: r, scrollAdjustedTranslate: i } =
|
|
2064
|
+
}, [be.x, be.y]), o(() => {
|
|
2065
|
+
let { active: e, activatorEvent: t, collisions: n, droppableContainers: r, scrollAdjustedTranslate: i } = V.current;
|
|
2067
2066
|
if (!e || A.current == null || !t || !i) return;
|
|
2068
2067
|
let { onDragOver: a } = N.current, o = r.get(Ce), s = o && o.rect.current ? {
|
|
2069
2068
|
id: o.id,
|
|
@@ -2080,124 +2079,124 @@ var Kn = /* @__PURE__ */ r(function(e) {
|
|
|
2080
2079
|
},
|
|
2081
2080
|
over: s
|
|
2082
2081
|
};
|
|
2083
|
-
|
|
2082
|
+
ce(() => {
|
|
2084
2083
|
we(s), a?.(c), y({
|
|
2085
2084
|
type: "onDragOver",
|
|
2086
2085
|
event: c
|
|
2087
2086
|
});
|
|
2088
2087
|
});
|
|
2089
|
-
}, [Ce]),
|
|
2090
|
-
|
|
2088
|
+
}, [Ce]), q(() => {
|
|
2089
|
+
V.current = {
|
|
2091
2090
|
activatorEvent: j,
|
|
2092
2091
|
active: k,
|
|
2093
|
-
activeNode:
|
|
2094
|
-
collisionRect:
|
|
2092
|
+
activeNode: R,
|
|
2093
|
+
collisionRect: xe,
|
|
2095
2094
|
collisions: Se,
|
|
2096
|
-
droppableRects:
|
|
2095
|
+
droppableRects: I,
|
|
2097
2096
|
draggableNodes: T,
|
|
2098
|
-
draggingNode:
|
|
2099
|
-
draggingNodeRect:
|
|
2097
|
+
draggingNode: ue,
|
|
2098
|
+
draggingNodeRect: de,
|
|
2100
2099
|
droppableContainers: D,
|
|
2101
|
-
over:
|
|
2102
|
-
scrollableAncestors:
|
|
2103
|
-
scrollAdjustedTranslate:
|
|
2100
|
+
over: G,
|
|
2101
|
+
scrollableAncestors: W,
|
|
2102
|
+
scrollAdjustedTranslate: be
|
|
2104
2103
|
}, O.current = {
|
|
2105
|
-
initial:
|
|
2106
|
-
translated:
|
|
2104
|
+
initial: de,
|
|
2105
|
+
translated: xe
|
|
2107
2106
|
};
|
|
2108
2107
|
}, [
|
|
2109
2108
|
k,
|
|
2110
|
-
|
|
2109
|
+
R,
|
|
2111
2110
|
Se,
|
|
2112
|
-
|
|
2111
|
+
xe,
|
|
2113
2112
|
T,
|
|
2113
|
+
ue,
|
|
2114
2114
|
de,
|
|
2115
|
-
|
|
2116
|
-
ie,
|
|
2115
|
+
I,
|
|
2117
2116
|
D,
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
]),
|
|
2122
|
-
...
|
|
2117
|
+
G,
|
|
2118
|
+
W,
|
|
2119
|
+
be
|
|
2120
|
+
]), un({
|
|
2121
|
+
...oe,
|
|
2123
2122
|
delta: E,
|
|
2124
|
-
draggingRect:
|
|
2125
|
-
pointerCoordinates:
|
|
2126
|
-
scrollableAncestors:
|
|
2127
|
-
scrollableAncestorRects:
|
|
2123
|
+
draggingRect: xe,
|
|
2124
|
+
pointerCoordinates: ge,
|
|
2125
|
+
scrollableAncestors: W,
|
|
2126
|
+
scrollableAncestorRects: me
|
|
2128
2127
|
});
|
|
2129
|
-
let
|
|
2128
|
+
let ke = c(() => ({
|
|
2130
2129
|
active: k,
|
|
2131
|
-
activeNode:
|
|
2130
|
+
activeNode: R,
|
|
2132
2131
|
activeNodeRect: z,
|
|
2133
2132
|
activatorEvent: j,
|
|
2134
2133
|
collisions: Se,
|
|
2135
|
-
containerNodeRect:
|
|
2136
|
-
dragOverlay:
|
|
2134
|
+
containerNodeRect: B,
|
|
2135
|
+
dragOverlay: H,
|
|
2137
2136
|
draggableNodes: T,
|
|
2138
2137
|
droppableContainers: D,
|
|
2139
|
-
droppableRects:
|
|
2140
|
-
over:
|
|
2141
|
-
measureDroppableContainers:
|
|
2142
|
-
scrollableAncestors:
|
|
2143
|
-
scrollableAncestorRects:
|
|
2138
|
+
droppableRects: I,
|
|
2139
|
+
over: G,
|
|
2140
|
+
measureDroppableContainers: ie,
|
|
2141
|
+
scrollableAncestors: W,
|
|
2142
|
+
scrollableAncestorRects: me,
|
|
2144
2143
|
measuringConfiguration: F,
|
|
2145
|
-
measuringScheduled:
|
|
2146
|
-
windowRect:
|
|
2144
|
+
measuringScheduled: L,
|
|
2145
|
+
windowRect: pe
|
|
2147
2146
|
}), [
|
|
2148
2147
|
k,
|
|
2149
|
-
|
|
2148
|
+
R,
|
|
2150
2149
|
z,
|
|
2151
2150
|
j,
|
|
2152
2151
|
Se,
|
|
2153
|
-
|
|
2154
|
-
|
|
2152
|
+
B,
|
|
2153
|
+
H,
|
|
2155
2154
|
T,
|
|
2156
2155
|
D,
|
|
2156
|
+
I,
|
|
2157
|
+
G,
|
|
2157
2158
|
ie,
|
|
2158
|
-
|
|
2159
|
-
|
|
2160
|
-
H,
|
|
2161
|
-
ge,
|
|
2159
|
+
W,
|
|
2160
|
+
me,
|
|
2162
2161
|
F,
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
-
]),
|
|
2162
|
+
L,
|
|
2163
|
+
pe
|
|
2164
|
+
]), Ae = c(() => ({
|
|
2166
2165
|
activatorEvent: j,
|
|
2167
|
-
activators:
|
|
2166
|
+
activators: Oe,
|
|
2168
2167
|
active: k,
|
|
2169
2168
|
activeNodeRect: z,
|
|
2170
2169
|
ariaDescribedById: { draggable: P },
|
|
2171
2170
|
dispatch: v,
|
|
2172
2171
|
draggableNodes: T,
|
|
2173
|
-
over:
|
|
2174
|
-
measureDroppableContainers:
|
|
2172
|
+
over: G,
|
|
2173
|
+
measureDroppableContainers: ie
|
|
2175
2174
|
}), [
|
|
2176
2175
|
j,
|
|
2177
|
-
|
|
2176
|
+
Oe,
|
|
2178
2177
|
k,
|
|
2179
2178
|
z,
|
|
2180
2179
|
v,
|
|
2181
2180
|
P,
|
|
2182
2181
|
T,
|
|
2183
|
-
|
|
2184
|
-
|
|
2182
|
+
G,
|
|
2183
|
+
ie
|
|
2185
2184
|
]);
|
|
2186
|
-
return t.createElement(
|
|
2185
|
+
return t.createElement(Ze.Provider, { value: b }, t.createElement(Hn.Provider, { value: Ae }, t.createElement(Un.Provider, { value: ke }, t.createElement(Xn.Provider, { value: Te }, s)), t.createElement(Kn, { disabled: r?.restoreFocus === !1 })), t.createElement(nt, {
|
|
2187
2186
|
...r,
|
|
2188
2187
|
hiddenTextDescribedById: P
|
|
2189
2188
|
}));
|
|
2190
|
-
function
|
|
2189
|
+
function Me() {
|
|
2191
2190
|
let e = te?.autoScrollEnabled === !1, t = typeof a == "object" ? a.enabled === !1 : a === !1, n = C && !e && !t;
|
|
2192
2191
|
return typeof a == "object" ? {
|
|
2193
2192
|
...a,
|
|
2194
2193
|
enabled: n
|
|
2195
2194
|
} : { enabled: n };
|
|
2196
2195
|
}
|
|
2197
|
-
}),
|
|
2198
|
-
function
|
|
2199
|
-
let { id: t, data: n, disabled: r = !1, attributes: i } = e, o =
|
|
2200
|
-
return
|
|
2196
|
+
}), $n = /* @__PURE__ */ n(null), er = "button", tr = "Draggable";
|
|
2197
|
+
function nr(e) {
|
|
2198
|
+
let { id: t, data: n, disabled: r = !1, attributes: i } = e, o = Ie(tr), { activators: s, activatorEvent: l, active: u, activeNodeRect: d, ariaDescribedById: f, draggableNodes: p, over: m } = a(Hn), { role: h = er, roleDescription: g = "draggable", tabIndex: _ = 0 } = i ?? {}, v = u?.id === t, y = a(v ? Xn : $n), [b, x] = Ne(), [S, C] = Ne(), w = jn(s, t), T = je(n);
|
|
2199
|
+
return q(() => (p.set(t, {
|
|
2201
2200
|
id: t,
|
|
2202
2201
|
key: o,
|
|
2203
2202
|
node: b,
|
|
@@ -2214,7 +2213,7 @@ function Xn(e) {
|
|
|
2214
2213
|
role: h,
|
|
2215
2214
|
tabIndex: _,
|
|
2216
2215
|
"aria-disabled": r,
|
|
2217
|
-
"aria-pressed": v && h ===
|
|
2216
|
+
"aria-pressed": v && h === er ? !0 : void 0,
|
|
2218
2217
|
"aria-roledescription": g,
|
|
2219
2218
|
"aria-describedby": f.draggable
|
|
2220
2219
|
}), [
|
|
@@ -2234,15 +2233,15 @@ function Xn(e) {
|
|
|
2234
2233
|
transform: y
|
|
2235
2234
|
};
|
|
2236
2235
|
}
|
|
2237
|
-
function
|
|
2238
|
-
return a(
|
|
2236
|
+
function rr() {
|
|
2237
|
+
return a(Un);
|
|
2239
2238
|
}
|
|
2240
|
-
var
|
|
2241
|
-
function
|
|
2242
|
-
let { data: t, disabled: n = !1, id: r, resizeObserverConfig: s } = e, c =
|
|
2243
|
-
|
|
2239
|
+
var ir = "Droppable", ar = { timeout: 25 };
|
|
2240
|
+
function or(e) {
|
|
2241
|
+
let { data: t, disabled: n = !1, id: r, resizeObserverConfig: s } = e, c = Ie(ir), { active: l, dispatch: d, over: f, measureDroppableContainers: p } = a(Hn), m = u({ disabled: n }), h = u(!1), g = u(null), _ = u(null), { disabled: v, updateMeasurementsFor: y, timeout: b } = {
|
|
2242
|
+
...ar,
|
|
2244
2243
|
...s
|
|
2245
|
-
}, x =
|
|
2244
|
+
}, x = je(y ?? r), S = Sn({
|
|
2246
2245
|
callback: i(() => {
|
|
2247
2246
|
if (!h.current) {
|
|
2248
2247
|
h.current = !0;
|
|
@@ -2253,9 +2252,9 @@ function er(e) {
|
|
|
2253
2252
|
}, b);
|
|
2254
2253
|
}, [b]),
|
|
2255
2254
|
disabled: v || !l
|
|
2256
|
-
}), [C, w] =
|
|
2255
|
+
}), [C, w] = Ne(i((e, t) => {
|
|
2257
2256
|
S && (t && (S.unobserve(t), h.current = !1), e && S.observe(e));
|
|
2258
|
-
}, [S])), T =
|
|
2257
|
+
}, [S])), T = je(t);
|
|
2259
2258
|
return o(() => {
|
|
2260
2259
|
!S || !C.current || (S.disconnect(), h.current = !1, S.observe(C.current));
|
|
2261
2260
|
}, [C, S]), o(() => (d({
|
|
@@ -2295,43 +2294,43 @@ function er(e) {
|
|
|
2295
2294
|
}
|
|
2296
2295
|
//#endregion
|
|
2297
2296
|
//#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
|
|
2297
|
+
function sr(e, t, n) {
|
|
2299
2298
|
let r = e.slice();
|
|
2300
2299
|
return r.splice(n < 0 ? r.length + n : n, 0, r.splice(t, 1)[0]), r;
|
|
2301
2300
|
}
|
|
2302
|
-
function
|
|
2301
|
+
function cr(e, t) {
|
|
2303
2302
|
return e.reduce((e, n, r) => {
|
|
2304
2303
|
let i = t.get(n);
|
|
2305
2304
|
return i && (e[r] = i), e;
|
|
2306
2305
|
}, Array(e.length));
|
|
2307
2306
|
}
|
|
2308
|
-
function
|
|
2307
|
+
function lr(e) {
|
|
2309
2308
|
return e !== null && e >= 0;
|
|
2310
2309
|
}
|
|
2311
|
-
function
|
|
2310
|
+
function ur(e, t) {
|
|
2312
2311
|
if (e === t) return !0;
|
|
2313
2312
|
if (e.length !== t.length) return !1;
|
|
2314
2313
|
for (let n = 0; n < e.length; n++) if (e[n] !== t[n]) return !1;
|
|
2315
2314
|
return !0;
|
|
2316
2315
|
}
|
|
2317
|
-
function
|
|
2316
|
+
function dr(e) {
|
|
2318
2317
|
return typeof e == "boolean" ? {
|
|
2319
2318
|
draggable: e,
|
|
2320
2319
|
droppable: e
|
|
2321
2320
|
} : e;
|
|
2322
2321
|
}
|
|
2323
|
-
var
|
|
2324
|
-
let { rects: t, activeIndex: n, overIndex: r, index: i } = e, a =
|
|
2322
|
+
var fr = (e) => {
|
|
2323
|
+
let { rects: t, activeIndex: n, overIndex: r, index: i } = e, a = sr(t, r, n), o = t[i], s = a[i];
|
|
2325
2324
|
return !s || !o ? null : {
|
|
2326
2325
|
x: s.left - o.left,
|
|
2327
2326
|
y: s.top - o.top,
|
|
2328
2327
|
scaleX: s.width / o.width,
|
|
2329
2328
|
scaleY: s.height / o.height
|
|
2330
2329
|
};
|
|
2331
|
-
},
|
|
2330
|
+
}, pr = {
|
|
2332
2331
|
scaleX: 1,
|
|
2333
2332
|
scaleY: 1
|
|
2334
|
-
},
|
|
2333
|
+
}, mr = (e) => {
|
|
2335
2334
|
let { activeIndex: t, activeNodeRect: n, index: r, rects: i, overIndex: a } = e, o = i[t] ?? n;
|
|
2336
2335
|
if (!o) return null;
|
|
2337
2336
|
if (r === t) {
|
|
@@ -2339,45 +2338,45 @@ var or = (e) => {
|
|
|
2339
2338
|
return e ? {
|
|
2340
2339
|
x: 0,
|
|
2341
2340
|
y: t < a ? e.top + e.height - (o.top + o.height) : e.top - o.top,
|
|
2342
|
-
...
|
|
2341
|
+
...pr
|
|
2343
2342
|
} : null;
|
|
2344
2343
|
}
|
|
2345
|
-
let s =
|
|
2344
|
+
let s = hr(i, r, t);
|
|
2346
2345
|
return r > t && r <= a ? {
|
|
2347
2346
|
x: 0,
|
|
2348
2347
|
y: -o.height - s,
|
|
2349
|
-
...
|
|
2348
|
+
...pr
|
|
2350
2349
|
} : r < t && r >= a ? {
|
|
2351
2350
|
x: 0,
|
|
2352
2351
|
y: o.height + s,
|
|
2353
|
-
...
|
|
2352
|
+
...pr
|
|
2354
2353
|
} : {
|
|
2355
2354
|
x: 0,
|
|
2356
2355
|
y: 0,
|
|
2357
|
-
...
|
|
2356
|
+
...pr
|
|
2358
2357
|
};
|
|
2359
2358
|
};
|
|
2360
|
-
function
|
|
2359
|
+
function hr(e, t, n) {
|
|
2361
2360
|
let r = e[t], i = e[t - 1], a = e[t + 1];
|
|
2362
2361
|
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
2362
|
}
|
|
2364
|
-
var
|
|
2363
|
+
var gr = "Sortable", _r = /* @__PURE__ */ t.createContext({
|
|
2365
2364
|
activeIndex: -1,
|
|
2366
|
-
containerId:
|
|
2365
|
+
containerId: gr,
|
|
2367
2366
|
disableTransforms: !1,
|
|
2368
2367
|
items: [],
|
|
2369
2368
|
overIndex: -1,
|
|
2370
2369
|
useDragOverlay: !1,
|
|
2371
2370
|
sortedRects: [],
|
|
2372
|
-
strategy:
|
|
2371
|
+
strategy: fr,
|
|
2373
2372
|
disabled: {
|
|
2374
2373
|
draggable: !1,
|
|
2375
2374
|
droppable: !1
|
|
2376
2375
|
}
|
|
2377
2376
|
});
|
|
2378
|
-
function
|
|
2379
|
-
let { children: n, id: r, items: i, strategy: a =
|
|
2380
|
-
|
|
2377
|
+
function vr(e) {
|
|
2378
|
+
let { children: n, id: r, items: i, strategy: a = fr, disabled: s = !1 } = e, { active: l, dragOverlay: d, droppableRects: f, over: p, measureDroppableContainers: m } = rr(), h = Ie(gr, 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 = !ur(_, x.current), C = b !== -1 && y === -1 || S, w = dr(s);
|
|
2379
|
+
q(() => {
|
|
2381
2380
|
S && v && m(_);
|
|
2382
2381
|
}, [
|
|
2383
2382
|
S,
|
|
@@ -2395,7 +2394,7 @@ function fr(e) {
|
|
|
2395
2394
|
items: _,
|
|
2396
2395
|
overIndex: b,
|
|
2397
2396
|
useDragOverlay: g,
|
|
2398
|
-
sortedRects:
|
|
2397
|
+
sortedRects: cr(_, f),
|
|
2399
2398
|
strategy: a
|
|
2400
2399
|
}), [
|
|
2401
2400
|
y,
|
|
@@ -2409,29 +2408,29 @@ function fr(e) {
|
|
|
2409
2408
|
g,
|
|
2410
2409
|
a
|
|
2411
2410
|
]);
|
|
2412
|
-
return t.createElement(
|
|
2411
|
+
return t.createElement(_r.Provider, { value: T }, n);
|
|
2413
2412
|
}
|
|
2414
|
-
var
|
|
2413
|
+
var yr = (e) => {
|
|
2415
2414
|
let { id: t, items: n, activeIndex: r, overIndex: i } = e;
|
|
2416
|
-
return
|
|
2417
|
-
},
|
|
2415
|
+
return sr(n, r, i).indexOf(t);
|
|
2416
|
+
}, br = (e) => {
|
|
2418
2417
|
let { containerId: t, isSorting: n, wasDragging: r, index: i, items: a, newIndex: o, previousItems: s, previousContainerId: c, transition: l } = e;
|
|
2419
2418
|
return !l || !r || s !== a && i === o ? !1 : n ? !0 : o !== i && t === c;
|
|
2420
|
-
},
|
|
2419
|
+
}, xr = {
|
|
2421
2420
|
duration: 200,
|
|
2422
2421
|
easing: "ease"
|
|
2423
|
-
},
|
|
2424
|
-
property:
|
|
2422
|
+
}, Sr = "transform", Cr = /* @__PURE__ */ We.Transition.toString({
|
|
2423
|
+
property: Sr,
|
|
2425
2424
|
duration: 0,
|
|
2426
2425
|
easing: "linear"
|
|
2427
|
-
}),
|
|
2428
|
-
function
|
|
2426
|
+
}), wr = { roleDescription: "sortable" };
|
|
2427
|
+
function Tr(e) {
|
|
2429
2428
|
let { disabled: t, index: n, node: r, rect: i } = e, [a, s] = d(null), c = u(n);
|
|
2430
|
-
return
|
|
2429
|
+
return q(() => {
|
|
2431
2430
|
if (!t && n !== c.current && r.current) {
|
|
2432
2431
|
let e = i.current;
|
|
2433
2432
|
if (e) {
|
|
2434
|
-
let t =
|
|
2433
|
+
let t = xt(r.current, { ignoreTransform: !0 }), n = {
|
|
2435
2434
|
x: e.left - t.left,
|
|
2436
2435
|
y: e.top - t.top,
|
|
2437
2436
|
scaleX: e.width / t.width,
|
|
@@ -2450,8 +2449,8 @@ function yr(e) {
|
|
|
2450
2449
|
a && s(null);
|
|
2451
2450
|
}, [a]), a;
|
|
2452
2451
|
}
|
|
2453
|
-
function
|
|
2454
|
-
let { animateLayoutChanges: t =
|
|
2452
|
+
function Er(e) {
|
|
2453
|
+
let { animateLayoutChanges: t = br, attributes: n, disabled: r, data: i, getNewIndex: s = yr, id: l, strategy: d, resizeObserverConfig: f, transition: p = xr } = e, { items: m, containerId: h, activeIndex: g, disabled: _, disableTransforms: v, sortedRects: y, overIndex: b, useDragOverlay: x, strategy: S } = a(_r), C = Dr(r, _), w = m.indexOf(l), T = c(() => ({
|
|
2455
2454
|
sortable: {
|
|
2456
2455
|
containerId: h,
|
|
2457
2456
|
index: w,
|
|
@@ -2463,7 +2462,7 @@ function br(e) {
|
|
|
2463
2462
|
i,
|
|
2464
2463
|
w,
|
|
2465
2464
|
m
|
|
2466
|
-
]), E = c(() => m.slice(m.indexOf(l)), [m, l]), { rect: D, node: ee, isOver: O, setNodeRef: k } =
|
|
2465
|
+
]), E = c(() => m.slice(m.indexOf(l)), [m, l]), { rect: D, node: ee, isOver: O, setNodeRef: k } = or({
|
|
2467
2466
|
id: l,
|
|
2468
2467
|
data: T,
|
|
2469
2468
|
disabled: C.droppable,
|
|
@@ -2471,98 +2470,98 @@ function br(e) {
|
|
|
2471
2470
|
updateMeasurementsFor: E,
|
|
2472
2471
|
...f
|
|
2473
2472
|
}
|
|
2474
|
-
}), { active: A, activatorEvent: te, activeNodeRect: ne, attributes: j, setNodeRef: M, listeners: N, isDragging: P, over: re, setActivatorNodeRef: F, transform:
|
|
2473
|
+
}), { active: A, activatorEvent: te, activeNodeRect: ne, attributes: j, setNodeRef: M, listeners: N, isDragging: P, over: re, setActivatorNodeRef: F, transform: I } = nr({
|
|
2475
2474
|
id: l,
|
|
2476
2475
|
data: T,
|
|
2477
2476
|
attributes: {
|
|
2478
|
-
...
|
|
2477
|
+
...wr,
|
|
2479
2478
|
...n
|
|
2480
2479
|
},
|
|
2481
2480
|
disabled: C.draggable
|
|
2482
|
-
}),
|
|
2481
|
+
}), ie = Se(k, M), L = !!A, R = L && !v && lr(g) && lr(b), ae = !x && P, oe = R ? (ae && R ? I : null) ?? (d ?? S)({
|
|
2483
2482
|
rects: y,
|
|
2484
2483
|
activeNodeRect: ne,
|
|
2485
2484
|
activeIndex: g,
|
|
2486
2485
|
overIndex: b,
|
|
2487
2486
|
index: w
|
|
2488
|
-
}) : null,
|
|
2487
|
+
}) : null, se = lr(g) && lr(b) ? s({
|
|
2489
2488
|
id: l,
|
|
2490
2489
|
items: m,
|
|
2491
2490
|
activeIndex: g,
|
|
2492
2491
|
overIndex: b
|
|
2493
|
-
}) : w,
|
|
2494
|
-
activeId:
|
|
2492
|
+
}) : w, z = A?.id, B = u({
|
|
2493
|
+
activeId: z,
|
|
2495
2494
|
items: m,
|
|
2496
|
-
newIndex:
|
|
2495
|
+
newIndex: se,
|
|
2497
2496
|
containerId: h
|
|
2498
|
-
}),
|
|
2497
|
+
}), ce = m !== B.current.items, V = t({
|
|
2499
2498
|
active: A,
|
|
2500
2499
|
containerId: h,
|
|
2501
2500
|
isDragging: P,
|
|
2502
|
-
isSorting:
|
|
2501
|
+
isSorting: L,
|
|
2503
2502
|
id: l,
|
|
2504
2503
|
index: w,
|
|
2505
2504
|
items: m,
|
|
2506
|
-
newIndex:
|
|
2507
|
-
previousItems:
|
|
2508
|
-
previousContainerId:
|
|
2505
|
+
newIndex: B.current.newIndex,
|
|
2506
|
+
previousItems: B.current.items,
|
|
2507
|
+
previousContainerId: B.current.containerId,
|
|
2509
2508
|
transition: p,
|
|
2510
|
-
wasDragging:
|
|
2511
|
-
}),
|
|
2512
|
-
disabled: !
|
|
2509
|
+
wasDragging: B.current.activeId != null
|
|
2510
|
+
}), le = Tr({
|
|
2511
|
+
disabled: !V,
|
|
2513
2512
|
index: w,
|
|
2514
2513
|
node: ee,
|
|
2515
2514
|
rect: D
|
|
2516
2515
|
});
|
|
2517
2516
|
return o(() => {
|
|
2518
|
-
|
|
2517
|
+
L && B.current.newIndex !== se && (B.current.newIndex = se), h !== B.current.containerId && (B.current.containerId = h), m !== B.current.items && (B.current.items = m);
|
|
2519
2518
|
}, [
|
|
2520
|
-
|
|
2521
|
-
|
|
2519
|
+
L,
|
|
2520
|
+
se,
|
|
2522
2521
|
h,
|
|
2523
2522
|
m
|
|
2524
2523
|
]), o(() => {
|
|
2525
|
-
if (
|
|
2526
|
-
if (
|
|
2527
|
-
|
|
2524
|
+
if (z === B.current.activeId) return;
|
|
2525
|
+
if (z != null && B.current.activeId == null) {
|
|
2526
|
+
B.current.activeId = z;
|
|
2528
2527
|
return;
|
|
2529
2528
|
}
|
|
2530
2529
|
let e = setTimeout(() => {
|
|
2531
|
-
|
|
2530
|
+
B.current.activeId = z;
|
|
2532
2531
|
}, 50);
|
|
2533
2532
|
return () => clearTimeout(e);
|
|
2534
|
-
}, [
|
|
2533
|
+
}, [z]), {
|
|
2535
2534
|
active: A,
|
|
2536
2535
|
activeIndex: g,
|
|
2537
2536
|
attributes: j,
|
|
2538
2537
|
data: T,
|
|
2539
2538
|
rect: D,
|
|
2540
2539
|
index: w,
|
|
2541
|
-
newIndex:
|
|
2540
|
+
newIndex: se,
|
|
2542
2541
|
items: m,
|
|
2543
2542
|
isOver: O,
|
|
2544
|
-
isSorting:
|
|
2543
|
+
isSorting: L,
|
|
2545
2544
|
isDragging: P,
|
|
2546
2545
|
listeners: N,
|
|
2547
2546
|
node: ee,
|
|
2548
2547
|
overIndex: b,
|
|
2549
2548
|
over: re,
|
|
2550
|
-
setNodeRef:
|
|
2549
|
+
setNodeRef: ie,
|
|
2551
2550
|
setActivatorNodeRef: F,
|
|
2552
2551
|
setDroppableNodeRef: k,
|
|
2553
2552
|
setDraggableNodeRef: M,
|
|
2554
|
-
transform:
|
|
2555
|
-
transition:
|
|
2553
|
+
transform: le ?? oe,
|
|
2554
|
+
transition: H()
|
|
2556
2555
|
};
|
|
2557
|
-
function
|
|
2558
|
-
if (
|
|
2559
|
-
if (!(
|
|
2556
|
+
function H() {
|
|
2557
|
+
if (le || ce && B.current.newIndex === w) return Cr;
|
|
2558
|
+
if (!(ae && !Ve(te) || !p) && (L || V)) return We.Transition.toString({
|
|
2560
2559
|
...p,
|
|
2561
|
-
property:
|
|
2560
|
+
property: Sr
|
|
2562
2561
|
});
|
|
2563
2562
|
}
|
|
2564
2563
|
}
|
|
2565
|
-
function
|
|
2564
|
+
function Dr(e, t) {
|
|
2566
2565
|
return typeof e == "boolean" ? {
|
|
2567
2566
|
draggable: e,
|
|
2568
2567
|
droppable: !1
|
|
@@ -2574,14 +2573,8 @@ function xr(e, t) {
|
|
|
2574
2573
|
Q.Down, Q.Right, Q.Up, Q.Left;
|
|
2575
2574
|
//#endregion
|
|
2576
2575
|
//#region src/NavigationRenderer.tsx
|
|
2577
|
-
|
|
2578
|
-
|
|
2579
|
-
if (!e) return F.FileText;
|
|
2580
|
-
let t = Sr.get(e);
|
|
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;
|
|
2576
|
+
function Or(e) {
|
|
2577
|
+
return e ? N(e) : ie;
|
|
2585
2578
|
}
|
|
2586
2579
|
function $(e, t) {
|
|
2587
2580
|
if (typeof e == "string") return e;
|
|
@@ -2594,12 +2587,12 @@ function $(e, t) {
|
|
|
2594
2587
|
}
|
|
2595
2588
|
return e.defaultValue || e.key;
|
|
2596
2589
|
}
|
|
2597
|
-
function
|
|
2590
|
+
function kr(e, t, n) {
|
|
2598
2591
|
let r = $(e.label, n);
|
|
2599
2592
|
return t && e.type === "object" && e.objectName && typeof e.label == "string" ? t(e.objectName, r) : r;
|
|
2600
2593
|
}
|
|
2601
|
-
var
|
|
2602
|
-
function
|
|
2594
|
+
var Ar = (e) => !(e === !1 || e === "false"), jr = () => !0;
|
|
2595
|
+
function Mr(e, t) {
|
|
2603
2596
|
switch (e.type) {
|
|
2604
2597
|
case "object": {
|
|
2605
2598
|
let n = `${t}/${e.objectName ?? ""}`;
|
|
@@ -2630,13 +2623,13 @@ function Dr(e, t) {
|
|
|
2630
2623
|
};
|
|
2631
2624
|
}
|
|
2632
2625
|
}
|
|
2633
|
-
function
|
|
2626
|
+
function Nr(e, t) {
|
|
2634
2627
|
if (!t.trim()) return e;
|
|
2635
2628
|
let n = t.toLowerCase().trim();
|
|
2636
2629
|
return e.reduce((e, r) => {
|
|
2637
2630
|
if (r.type === "separator") return e;
|
|
2638
2631
|
if (r.type === "group" && r.children?.length) {
|
|
2639
|
-
let n =
|
|
2632
|
+
let n = Nr(r.children, t);
|
|
2640
2633
|
return n.length > 0 && e.push({
|
|
2641
2634
|
...r,
|
|
2642
2635
|
children: n
|
|
@@ -2645,22 +2638,22 @@ function Or(e, t) {
|
|
|
2645
2638
|
return $(r.label).toLowerCase().includes(n) && e.push(r), e;
|
|
2646
2639
|
}, []);
|
|
2647
2640
|
}
|
|
2648
|
-
var
|
|
2649
|
-
function
|
|
2650
|
-
let { attributes: u, listeners: d, setNodeRef: f, transform: p, transition: m, isDragging: h } =
|
|
2641
|
+
var Pr = 5;
|
|
2642
|
+
function Fr({ item: e, basePath: t, evalVis: n, checkPerm: r, onAction: i, enablePinning: a, onPinToggle: o, enableReorder: s, resolveObjectLabel: c, t: l }) {
|
|
2643
|
+
let { attributes: u, listeners: d, setNodeRef: f, transform: p, transition: m, isDragging: h } = Er({
|
|
2651
2644
|
id: e.id,
|
|
2652
2645
|
disabled: !s
|
|
2653
2646
|
});
|
|
2654
|
-
return /* @__PURE__ */ (0,
|
|
2647
|
+
return /* @__PURE__ */ (0, U.jsx)("div", {
|
|
2655
2648
|
ref: f,
|
|
2656
2649
|
style: {
|
|
2657
|
-
transform:
|
|
2650
|
+
transform: We.Transform.toString(p),
|
|
2658
2651
|
transition: m,
|
|
2659
2652
|
opacity: h ? .5 : void 0,
|
|
2660
2653
|
zIndex: h ? 10 : void 0
|
|
2661
2654
|
},
|
|
2662
2655
|
...u,
|
|
2663
|
-
children: /* @__PURE__ */ (0,
|
|
2656
|
+
children: /* @__PURE__ */ (0, U.jsx)(Ir, {
|
|
2664
2657
|
item: e,
|
|
2665
2658
|
basePath: t,
|
|
2666
2659
|
evalVis: n,
|
|
@@ -2674,22 +2667,22 @@ function Ar({ item: e, basePath: t, evalVis: n, checkPerm: r, onAction: i, enabl
|
|
|
2674
2667
|
})
|
|
2675
2668
|
});
|
|
2676
2669
|
}
|
|
2677
|
-
function
|
|
2678
|
-
let u =
|
|
2670
|
+
function Ir({ item: e, basePath: t, evalVis: n, checkPerm: r, onAction: i, enablePinning: a, onPinToggle: o, dragListeners: s, resolveObjectLabel: c, t: l }) {
|
|
2671
|
+
let u = F(), [g, v] = d(e.defaultOpen !== !1);
|
|
2679
2672
|
if (!n(e.visible) || e.requiredPermissions?.length && !r(e.requiredPermissions)) return null;
|
|
2680
|
-
if (e.type === "separator") return /* @__PURE__ */ (0,
|
|
2673
|
+
if (e.type === "separator") return /* @__PURE__ */ (0, U.jsx)(_, { className: "my-2" });
|
|
2681
2674
|
if (e.type === "group") {
|
|
2682
2675
|
let s = (e.children ?? []).slice().sort((e, t) => (e.order ?? 0) - (t.order ?? 0));
|
|
2683
|
-
return /* @__PURE__ */ (0,
|
|
2676
|
+
return /* @__PURE__ */ (0, U.jsx)(p, {
|
|
2684
2677
|
open: g,
|
|
2685
2678
|
onOpenChange: v,
|
|
2686
|
-
children: /* @__PURE__ */ (0,
|
|
2679
|
+
children: /* @__PURE__ */ (0, U.jsxs)(x, { children: [/* @__PURE__ */ (0, U.jsx)(C, {
|
|
2687
2680
|
asChild: !0,
|
|
2688
|
-
children: /* @__PURE__ */ (0,
|
|
2681
|
+
children: /* @__PURE__ */ (0, U.jsxs)(h, {
|
|
2689
2682
|
className: "flex w-full items-center justify-between",
|
|
2690
|
-
children: [$(e.label, l), /* @__PURE__ */ (0,
|
|
2683
|
+
children: [$(e.label, l), /* @__PURE__ */ (0, U.jsx)(I, { className: `ml-auto h-4 w-4 transition-transform ${g ? "rotate-90" : ""}` })]
|
|
2691
2684
|
})
|
|
2692
|
-
}), /* @__PURE__ */ (0,
|
|
2685
|
+
}), /* @__PURE__ */ (0, U.jsx)(m, { children: /* @__PURE__ */ (0, U.jsx)(S, { children: /* @__PURE__ */ (0, U.jsx)(D, { children: s.map((e) => /* @__PURE__ */ (0, U.jsx)(Ir, {
|
|
2693
2686
|
item: e,
|
|
2694
2687
|
basePath: t,
|
|
2695
2688
|
evalVis: n,
|
|
@@ -2703,79 +2696,79 @@ function jr({ item: e, basePath: t, evalVis: n, checkPerm: r, onAction: i, enabl
|
|
|
2703
2696
|
});
|
|
2704
2697
|
}
|
|
2705
2698
|
if (e.type === "action") {
|
|
2706
|
-
let t =
|
|
2707
|
-
return /* @__PURE__ */ (0,
|
|
2708
|
-
s && /* @__PURE__ */ (0,
|
|
2699
|
+
let t = Or(e.icon);
|
|
2700
|
+
return /* @__PURE__ */ (0, U.jsxs)(k, { children: [
|
|
2701
|
+
s && /* @__PURE__ */ (0, U.jsx)("span", {
|
|
2709
2702
|
className: "absolute left-0.5 top-1/2 -translate-y-1/2 cursor-grab text-muted-foreground",
|
|
2710
2703
|
"aria-label": "Drag to reorder",
|
|
2711
2704
|
...s,
|
|
2712
|
-
children: /* @__PURE__ */ (0,
|
|
2705
|
+
children: /* @__PURE__ */ (0, U.jsx)(L, { className: "h-3.5 w-3.5" })
|
|
2713
2706
|
}),
|
|
2714
|
-
/* @__PURE__ */ (0,
|
|
2707
|
+
/* @__PURE__ */ (0, U.jsxs)(O, {
|
|
2715
2708
|
tooltip: $(e.label, l),
|
|
2716
2709
|
onClick: () => i?.(e),
|
|
2717
2710
|
children: [
|
|
2718
|
-
/* @__PURE__ */ (0,
|
|
2719
|
-
/* @__PURE__ */ (0,
|
|
2720
|
-
e.badge != null && /* @__PURE__ */ (0,
|
|
2711
|
+
/* @__PURE__ */ (0, U.jsx)(t, { className: "h-4 w-4" }),
|
|
2712
|
+
/* @__PURE__ */ (0, U.jsx)("span", { children: $(e.label, l) }),
|
|
2713
|
+
e.badge != null && /* @__PURE__ */ (0, U.jsx)(f, {
|
|
2721
2714
|
variant: e.badgeVariant ?? "default",
|
|
2722
2715
|
className: "ml-auto text-[10px] px-1.5 py-0",
|
|
2723
2716
|
children: e.badge
|
|
2724
2717
|
})
|
|
2725
2718
|
]
|
|
2726
2719
|
}),
|
|
2727
|
-
a && o && /* @__PURE__ */ (0,
|
|
2720
|
+
a && o && /* @__PURE__ */ (0, U.jsx)(ee, {
|
|
2728
2721
|
showOnHover: !0,
|
|
2729
2722
|
onClick: () => o(e.id, !e.pinned),
|
|
2730
2723
|
"aria-label": e.pinned ? `Unpin ${$(e.label, l)}` : `Pin ${$(e.label, l)}`,
|
|
2731
|
-
children: e.pinned ? /* @__PURE__ */ (0,
|
|
2724
|
+
children: e.pinned ? /* @__PURE__ */ (0, U.jsx)(oe, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ (0, U.jsx)(ae, { className: "h-3.5 w-3.5" })
|
|
2732
2725
|
})
|
|
2733
2726
|
] });
|
|
2734
2727
|
}
|
|
2735
|
-
let y =
|
|
2736
|
-
/* @__PURE__ */ (0,
|
|
2737
|
-
/* @__PURE__ */ (0,
|
|
2738
|
-
e.badge != null && /* @__PURE__ */ (0,
|
|
2728
|
+
let y = Or(e.icon), { href: b, external: w } = Mr(e, t), T = b !== "#" && u.pathname.startsWith(b), E = kr(e, c, l), A = /* @__PURE__ */ (0, U.jsxs)(U.Fragment, { children: [
|
|
2729
|
+
/* @__PURE__ */ (0, U.jsx)(y, { className: "h-4 w-4" }),
|
|
2730
|
+
/* @__PURE__ */ (0, U.jsx)("span", { children: E }),
|
|
2731
|
+
e.badge != null && /* @__PURE__ */ (0, U.jsx)(f, {
|
|
2739
2732
|
variant: e.badgeVariant ?? "default",
|
|
2740
2733
|
className: "ml-auto text-[10px] px-1.5 py-0",
|
|
2741
2734
|
children: e.badge
|
|
2742
2735
|
})
|
|
2743
2736
|
] });
|
|
2744
|
-
return /* @__PURE__ */ (0,
|
|
2745
|
-
s && /* @__PURE__ */ (0,
|
|
2737
|
+
return /* @__PURE__ */ (0, U.jsxs)(k, { children: [
|
|
2738
|
+
s && /* @__PURE__ */ (0, U.jsx)("span", {
|
|
2746
2739
|
className: "absolute left-0.5 top-1/2 -translate-y-1/2 cursor-grab text-muted-foreground",
|
|
2747
2740
|
"aria-label": "Drag to reorder",
|
|
2748
2741
|
...s,
|
|
2749
|
-
children: /* @__PURE__ */ (0,
|
|
2742
|
+
children: /* @__PURE__ */ (0, U.jsx)(L, { className: "h-3.5 w-3.5" })
|
|
2750
2743
|
}),
|
|
2751
|
-
/* @__PURE__ */ (0,
|
|
2744
|
+
/* @__PURE__ */ (0, U.jsx)(O, {
|
|
2752
2745
|
asChild: !0,
|
|
2753
2746
|
isActive: T,
|
|
2754
2747
|
tooltip: E,
|
|
2755
|
-
children: w ? /* @__PURE__ */ (0,
|
|
2748
|
+
children: w ? /* @__PURE__ */ (0, U.jsx)("a", {
|
|
2756
2749
|
href: b,
|
|
2757
2750
|
target: "_blank",
|
|
2758
2751
|
rel: "noopener noreferrer",
|
|
2759
2752
|
children: A
|
|
2760
|
-
}) : /* @__PURE__ */ (0,
|
|
2753
|
+
}) : /* @__PURE__ */ (0, U.jsx)(P, {
|
|
2761
2754
|
to: b,
|
|
2762
2755
|
children: A
|
|
2763
2756
|
})
|
|
2764
2757
|
}),
|
|
2765
|
-
a && o && /* @__PURE__ */ (0,
|
|
2758
|
+
a && o && /* @__PURE__ */ (0, U.jsx)(ee, {
|
|
2766
2759
|
showOnHover: !0,
|
|
2767
2760
|
onClick: () => o(e.id, !e.pinned),
|
|
2768
2761
|
"aria-label": e.pinned ? `Unpin ${E}` : `Pin ${E}`,
|
|
2769
|
-
children: e.pinned ? /* @__PURE__ */ (0,
|
|
2762
|
+
children: e.pinned ? /* @__PURE__ */ (0, U.jsx)(oe, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ (0, U.jsx)(ae, { className: "h-3.5 w-3.5" })
|
|
2770
2763
|
})
|
|
2771
2764
|
] });
|
|
2772
2765
|
}
|
|
2773
|
-
function
|
|
2774
|
-
let p = c(() => a ?
|
|
2766
|
+
function Lr({ items: e, basePath: t = "", evaluateVisibility: n = Ar, checkPermission: r = jr, onAction: i, searchQuery: a, enablePinning: o, onPinToggle: s, enableReorder: l, onReorder: u, resolveObjectLabel: d, t: f }) {
|
|
2767
|
+
let p = c(() => a ? Nr(e, a) : e, [e, a]), m = c(() => Rr(p), [p]), h = p.slice().sort((e, t) => (e.order ?? 0) - (t.order ?? 0)), g = at(it(tn, { activationConstraint: { distance: Pr } }), it(Xt)), _ = (e) => {
|
|
2775
2768
|
let { active: t, over: n } = e;
|
|
2776
2769
|
if (!n || t.id === n.id || !u) return;
|
|
2777
2770
|
let r = h.findIndex((e) => e.id === t.id), i = h.findIndex((e) => e.id === n.id);
|
|
2778
|
-
r === -1 || i === -1 || u(
|
|
2771
|
+
r === -1 || i === -1 || u(sr(h, r, i).map((e, t) => ({
|
|
2779
2772
|
...e,
|
|
2780
2773
|
order: t
|
|
2781
2774
|
})));
|
|
@@ -2788,29 +2781,29 @@ function Mr({ items: e, basePath: t = "", evaluateVisibility: n = Tr, checkPermi
|
|
|
2788
2781
|
onPinToggle: s,
|
|
2789
2782
|
resolveObjectLabel: d,
|
|
2790
2783
|
t: f
|
|
2791
|
-
}, y = h.some((e) => e.type === "group"), b = m.length > 0 && o ? /* @__PURE__ */ (0,
|
|
2784
|
+
}, y = h.some((e) => e.type === "group"), b = m.length > 0 && o ? /* @__PURE__ */ (0, U.jsxs)(x, { children: [/* @__PURE__ */ (0, U.jsxs)(C, {
|
|
2792
2785
|
className: "flex items-center gap-1.5",
|
|
2793
|
-
children: [/* @__PURE__ */ (0,
|
|
2794
|
-
}), /* @__PURE__ */ (0,
|
|
2786
|
+
children: [/* @__PURE__ */ (0, U.jsx)(z, { className: "h-3.5 w-3.5" }), "Favorites"]
|
|
2787
|
+
}), /* @__PURE__ */ (0, U.jsx)(S, { children: /* @__PURE__ */ (0, U.jsx)(D, { children: m.map((e) => /* @__PURE__ */ (0, U.jsx)(Ir, {
|
|
2795
2788
|
item: e,
|
|
2796
2789
|
...v
|
|
2797
2790
|
}, `fav-${e.id}`)) }) })] }) : null;
|
|
2798
2791
|
if (!y) {
|
|
2799
2792
|
let e = h.filter((e) => e.type !== "group").map((e) => e.id);
|
|
2800
|
-
return /* @__PURE__ */ (0,
|
|
2793
|
+
return /* @__PURE__ */ (0, U.jsxs)(U.Fragment, { children: [b, /* @__PURE__ */ (0, U.jsx)(x, { children: /* @__PURE__ */ (0, U.jsx)(S, { children: l ? /* @__PURE__ */ (0, U.jsx)(Qn, {
|
|
2801
2794
|
sensors: g,
|
|
2802
|
-
collisionDetection:
|
|
2795
|
+
collisionDetection: dt,
|
|
2803
2796
|
onDragEnd: _,
|
|
2804
|
-
children: /* @__PURE__ */ (0,
|
|
2797
|
+
children: /* @__PURE__ */ (0, U.jsx)(vr, {
|
|
2805
2798
|
items: e,
|
|
2806
|
-
strategy:
|
|
2807
|
-
children: /* @__PURE__ */ (0,
|
|
2799
|
+
strategy: mr,
|
|
2800
|
+
children: /* @__PURE__ */ (0, U.jsx)(D, { children: h.map((e) => /* @__PURE__ */ (0, U.jsx)(Fr, {
|
|
2808
2801
|
item: e,
|
|
2809
2802
|
enableReorder: l,
|
|
2810
2803
|
...v
|
|
2811
2804
|
}, e.id)) })
|
|
2812
2805
|
})
|
|
2813
|
-
}) : /* @__PURE__ */ (0,
|
|
2806
|
+
}) : /* @__PURE__ */ (0, U.jsx)(D, { children: h.map((e) => /* @__PURE__ */ (0, U.jsx)(Ir, {
|
|
2814
2807
|
item: e,
|
|
2815
2808
|
...v
|
|
2816
2809
|
}, e.id)) }) }) })] });
|
|
@@ -2818,54 +2811,54 @@ function Mr({ items: e, basePath: t = "", evaluateVisibility: n = Tr, checkPermi
|
|
|
2818
2811
|
let w = [], T = [], E = (e) => {
|
|
2819
2812
|
if (T.length === 0) return;
|
|
2820
2813
|
let t = T;
|
|
2821
|
-
T = [], w.push(/* @__PURE__ */ (0,
|
|
2814
|
+
T = [], w.push(/* @__PURE__ */ (0, U.jsx)(x, { children: /* @__PURE__ */ (0, U.jsx)(S, { children: /* @__PURE__ */ (0, U.jsx)(D, { children: t.map((e) => /* @__PURE__ */ (0, U.jsx)(Ir, {
|
|
2822
2815
|
item: e,
|
|
2823
2816
|
...v
|
|
2824
2817
|
}, e.id)) }) }) }, e));
|
|
2825
2818
|
};
|
|
2826
2819
|
return h.forEach((e, t) => {
|
|
2827
|
-
e.type === "group" ? (E(`leaf-${t}`), w.push(/* @__PURE__ */ (0,
|
|
2820
|
+
e.type === "group" ? (E(`leaf-${t}`), w.push(/* @__PURE__ */ (0, U.jsx)(Ir, {
|
|
2828
2821
|
item: e,
|
|
2829
2822
|
...v
|
|
2830
2823
|
}, e.id))) : T.push(e);
|
|
2831
|
-
}), E("leaf-end"), /* @__PURE__ */ (0,
|
|
2824
|
+
}), E("leaf-end"), /* @__PURE__ */ (0, U.jsxs)(U.Fragment, { children: [b, w] });
|
|
2832
2825
|
}
|
|
2833
|
-
function
|
|
2826
|
+
function Rr(e) {
|
|
2834
2827
|
let t = [];
|
|
2835
|
-
for (let n of e) n.pinned && n.type !== "group" && n.type !== "separator" && t.push(n), n.children?.length && t.push(...
|
|
2828
|
+
for (let n of e) n.pinned && n.type !== "group" && n.type !== "separator" && t.push(n), n.children?.length && t.push(...Rr(n.children));
|
|
2836
2829
|
return t;
|
|
2837
2830
|
}
|
|
2838
2831
|
//#endregion
|
|
2839
2832
|
//#region src/AppSchemaRenderer.tsx
|
|
2840
|
-
function
|
|
2833
|
+
function zr({ areas: e, activeAreaId: t, onAreaChange: n, evalVis: r, checkPerm: i }) {
|
|
2841
2834
|
let a = e.filter((e) => !(!r(e.visible) || e.requiredPermissions?.length && !i(e.requiredPermissions)));
|
|
2842
|
-
return a.length <= 1 ? null : /* @__PURE__ */ (0,
|
|
2835
|
+
return a.length <= 1 ? null : /* @__PURE__ */ (0, U.jsxs)(x, { children: [/* @__PURE__ */ (0, U.jsxs)(C, {
|
|
2843
2836
|
className: "flex items-center gap-1.5",
|
|
2844
|
-
children: [/* @__PURE__ */ (0,
|
|
2845
|
-
}), /* @__PURE__ */ (0,
|
|
2846
|
-
let r =
|
|
2847
|
-
return /* @__PURE__ */ (0,
|
|
2837
|
+
children: [/* @__PURE__ */ (0, U.jsx)(R, { className: "h-3.5 w-3.5" }), "Area"]
|
|
2838
|
+
}), /* @__PURE__ */ (0, U.jsx)(S, { children: /* @__PURE__ */ (0, U.jsx)(D, { children: a.map((e) => {
|
|
2839
|
+
let r = Or(e.icon);
|
|
2840
|
+
return /* @__PURE__ */ (0, U.jsx)(k, { children: /* @__PURE__ */ (0, U.jsxs)(O, {
|
|
2848
2841
|
isActive: e.id === t,
|
|
2849
2842
|
tooltip: $(e.label),
|
|
2850
2843
|
onClick: () => n(e.id),
|
|
2851
|
-
children: [/* @__PURE__ */ (0,
|
|
2844
|
+
children: [/* @__PURE__ */ (0, U.jsx)(r, { className: "h-4 w-4" }), /* @__PURE__ */ (0, U.jsx)("span", { children: $(e.label) })]
|
|
2852
2845
|
}) }, e.id);
|
|
2853
2846
|
}) }) })] });
|
|
2854
2847
|
}
|
|
2855
|
-
function
|
|
2856
|
-
let n =
|
|
2857
|
-
return r.length === 0 ? null : /* @__PURE__ */ (0,
|
|
2848
|
+
function Br({ items: e, basePath: t }) {
|
|
2849
|
+
let n = F(), r = e.filter((e) => e.type !== "group" && e.type !== "separator").slice(0, 5);
|
|
2850
|
+
return r.length === 0 ? null : /* @__PURE__ */ (0, U.jsx)("div", {
|
|
2858
2851
|
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
2852
|
role: "navigation",
|
|
2860
2853
|
"aria-label": "Mobile navigation",
|
|
2861
2854
|
children: r.map((e) => {
|
|
2862
|
-
let r =
|
|
2855
|
+
let r = Or(e.icon), i = "#";
|
|
2863
2856
|
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
2857
|
let a = i !== "#" && n.pathname.startsWith(i);
|
|
2865
|
-
return /* @__PURE__ */ (0,
|
|
2858
|
+
return /* @__PURE__ */ (0, U.jsxs)(P, {
|
|
2866
2859
|
to: i,
|
|
2867
2860
|
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,
|
|
2861
|
+
children: [/* @__PURE__ */ (0, U.jsx)(r, { className: "h-5 w-5" }), /* @__PURE__ */ (0, U.jsx)("span", {
|
|
2869
2862
|
className: "text-[10px] truncate max-w-[60px]",
|
|
2870
2863
|
children: $(e.label)
|
|
2871
2864
|
})]
|
|
@@ -2873,46 +2866,46 @@ function Fr({ items: e, basePath: t }) {
|
|
|
2873
2866
|
})
|
|
2874
2867
|
});
|
|
2875
2868
|
}
|
|
2876
|
-
function
|
|
2877
|
-
let _ =
|
|
2878
|
-
return /* @__PURE__ */ (0,
|
|
2869
|
+
function Vr({ 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 }) {
|
|
2870
|
+
let _ = Or(e.logo), x = e.areas ?? [], [S, C] = d("");
|
|
2871
|
+
return /* @__PURE__ */ (0, U.jsxs)(v, {
|
|
2879
2872
|
collapsible: "icon",
|
|
2880
2873
|
children: [
|
|
2881
|
-
/* @__PURE__ */ (0,
|
|
2874
|
+
/* @__PURE__ */ (0, U.jsxs)(w, { children: [a ?? /* @__PURE__ */ (0, U.jsx)(D, { children: /* @__PURE__ */ (0, U.jsx)(k, { children: /* @__PURE__ */ (0, U.jsxs)(O, {
|
|
2882
2875
|
size: "lg",
|
|
2883
2876
|
tooltip: e.title ?? e.name,
|
|
2884
|
-
children: [/* @__PURE__ */ (0,
|
|
2877
|
+
children: [/* @__PURE__ */ (0, U.jsx)("div", {
|
|
2885
2878
|
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,
|
|
2879
|
+
children: e.logo && e.logo.startsWith("http") ? /* @__PURE__ */ (0, U.jsx)("img", {
|
|
2887
2880
|
src: e.logo,
|
|
2888
2881
|
alt: e.title ?? "",
|
|
2889
2882
|
className: "size-6 object-contain"
|
|
2890
|
-
}) : /* @__PURE__ */ (0,
|
|
2891
|
-
}), /* @__PURE__ */ (0,
|
|
2883
|
+
}) : /* @__PURE__ */ (0, U.jsx)(_, { className: "size-4" })
|
|
2884
|
+
}), /* @__PURE__ */ (0, U.jsxs)("div", {
|
|
2892
2885
|
className: "grid flex-1 text-left text-sm leading-tight",
|
|
2893
|
-
children: [/* @__PURE__ */ (0,
|
|
2886
|
+
children: [/* @__PURE__ */ (0, U.jsx)("span", {
|
|
2894
2887
|
className: "truncate font-semibold",
|
|
2895
2888
|
children: e.title ?? e.name ?? "App"
|
|
2896
|
-
}), e.description && /* @__PURE__ */ (0,
|
|
2889
|
+
}), e.description && /* @__PURE__ */ (0, U.jsx)("span", {
|
|
2897
2890
|
className: "truncate text-xs text-muted-foreground",
|
|
2898
2891
|
children: e.description
|
|
2899
2892
|
})]
|
|
2900
2893
|
})]
|
|
2901
|
-
}) }) }), f && /* @__PURE__ */ (0,
|
|
2894
|
+
}) }) }), f && /* @__PURE__ */ (0, U.jsx)(T, {
|
|
2902
2895
|
placeholder: "Search navigation…",
|
|
2903
2896
|
value: S,
|
|
2904
2897
|
onChange: (e) => C(e.target.value),
|
|
2905
2898
|
"aria-label": "Search navigation"
|
|
2906
2899
|
})] }),
|
|
2907
|
-
/* @__PURE__ */ (0,
|
|
2908
|
-
x.length > 1 && c && /* @__PURE__ */ (0,
|
|
2900
|
+
/* @__PURE__ */ (0, U.jsxs)(y, { children: [
|
|
2901
|
+
x.length > 1 && c && /* @__PURE__ */ (0, U.jsx)(zr, {
|
|
2909
2902
|
areas: x,
|
|
2910
2903
|
activeAreaId: c,
|
|
2911
2904
|
onAreaChange: l,
|
|
2912
2905
|
evalVis: n,
|
|
2913
2906
|
checkPerm: r
|
|
2914
2907
|
}),
|
|
2915
|
-
/* @__PURE__ */ (0,
|
|
2908
|
+
/* @__PURE__ */ (0, U.jsx)(Lr, {
|
|
2916
2909
|
items: u,
|
|
2917
2910
|
basePath: t,
|
|
2918
2911
|
evaluateVisibility: n,
|
|
@@ -2926,12 +2919,12 @@ function Ir({ schema: e, basePath: t, evalVis: n, checkPerm: r, onAction: i, sid
|
|
|
2926
2919
|
}),
|
|
2927
2920
|
s
|
|
2928
2921
|
] }),
|
|
2929
|
-
o && /* @__PURE__ */ (0,
|
|
2922
|
+
o && /* @__PURE__ */ (0, U.jsx)(b, { children: o })
|
|
2930
2923
|
]
|
|
2931
2924
|
});
|
|
2932
2925
|
}
|
|
2933
|
-
function
|
|
2934
|
-
let x = r ?? ((e) => !(e === !1 || e === "false")), S = i ?? (() => !0), C = c(() => (e.menu ?? []).map((e, t) =>
|
|
2926
|
+
function Hr({ 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 }) {
|
|
2927
|
+
let x = r ?? ((e) => !(e === !1 || e === "false")), S = i ?? (() => !0), C = c(() => (e.menu ?? []).map((e, t) => V(e, t)), [e.menu]), w = e.navigation ?? C, T = e.areas ?? [], [E, D] = d(() => T.length > 0 ? T[0].id : null), ee = T.map((e) => e.id).join(",");
|
|
2935
2928
|
o(() => {
|
|
2936
2929
|
T.length > 0 ? D((e) => T.some((t) => t.id === e) ? e : T[0].id) : D(null);
|
|
2937
2930
|
}, [e.name, ee]);
|
|
@@ -2940,8 +2933,8 @@ function Lr({ schema: e, basePath: t = "", mobileNavMode: n = "drawer", evaluate
|
|
|
2940
2933
|
favicon: e.favicon,
|
|
2941
2934
|
logo: e.logo
|
|
2942
2935
|
};
|
|
2943
|
-
return /* @__PURE__ */ (0,
|
|
2944
|
-
sidebar: /* @__PURE__ */ (0,
|
|
2936
|
+
return /* @__PURE__ */ (0, U.jsxs)(U.Fragment, { children: [/* @__PURE__ */ (0, U.jsx)(ge, {
|
|
2937
|
+
sidebar: /* @__PURE__ */ (0, U.jsx)(Vr, {
|
|
2945
2938
|
schema: e,
|
|
2946
2939
|
basePath: t,
|
|
2947
2940
|
evalVis: x,
|
|
@@ -2964,26 +2957,26 @@ function Lr({ schema: e, basePath: t = "", mobileNavMode: n = "drawer", evaluate
|
|
|
2964
2957
|
defaultOpen: h,
|
|
2965
2958
|
branding: k,
|
|
2966
2959
|
children: p
|
|
2967
|
-
}), n === "bottom_nav" && /* @__PURE__ */ (0,
|
|
2960
|
+
}), n === "bottom_nav" && /* @__PURE__ */ (0, U.jsx)(Br, {
|
|
2968
2961
|
items: O,
|
|
2969
2962
|
basePath: t
|
|
2970
2963
|
})] });
|
|
2971
2964
|
}
|
|
2972
2965
|
//#endregion
|
|
2973
2966
|
//#region src/Page.tsx
|
|
2974
|
-
var
|
|
2975
|
-
function
|
|
2976
|
-
let a =
|
|
2977
|
-
return /* @__PURE__ */ (0,
|
|
2967
|
+
var Ur = (e) => e ? Array.isArray(e) ? e : [e] : [];
|
|
2968
|
+
function Wr({ schema: e, className: t, style: n, id: r, ...i }) {
|
|
2969
|
+
let a = Ur(e.children);
|
|
2970
|
+
return /* @__PURE__ */ (0, U.jsxs)("div", {
|
|
2978
2971
|
id: r || e.id,
|
|
2979
2972
|
className: M("flex flex-col h-full space-y-4", t),
|
|
2980
2973
|
style: n,
|
|
2981
|
-
children: [/* @__PURE__ */ (0,
|
|
2974
|
+
children: [/* @__PURE__ */ (0, U.jsx)(pe, {
|
|
2982
2975
|
title: e.title,
|
|
2983
2976
|
description: e.description
|
|
2984
|
-
}), /* @__PURE__ */ (0,
|
|
2977
|
+
}), /* @__PURE__ */ (0, U.jsx)("div", {
|
|
2985
2978
|
className: "flex-1 overflow-auto",
|
|
2986
|
-
children: a.map((e, t) => /* @__PURE__ */ (0,
|
|
2979
|
+
children: a.map((e, t) => /* @__PURE__ */ (0, U.jsx)(le, {
|
|
2987
2980
|
schema: e,
|
|
2988
2981
|
...i
|
|
2989
2982
|
}, e?.id || t))
|
|
@@ -2992,38 +2985,38 @@ function zr({ schema: e, className: t, style: n, id: r, ...i }) {
|
|
|
2992
2985
|
}
|
|
2993
2986
|
//#endregion
|
|
2994
2987
|
//#region src/SidebarNav.tsx
|
|
2995
|
-
function
|
|
2988
|
+
function Gr(e) {
|
|
2996
2989
|
return "items" in e && !("href" in e);
|
|
2997
2990
|
}
|
|
2998
|
-
function
|
|
2999
|
-
return e.children && e.children.length > 0 ? /* @__PURE__ */ (0,
|
|
2991
|
+
function Kr({ item: e, pathname: t }) {
|
|
2992
|
+
return e.children && e.children.length > 0 ? /* @__PURE__ */ (0, U.jsx)(p, {
|
|
3000
2993
|
asChild: !0,
|
|
3001
2994
|
defaultOpen: !0,
|
|
3002
2995
|
className: "group/collapsible",
|
|
3003
|
-
children: /* @__PURE__ */ (0,
|
|
2996
|
+
children: /* @__PURE__ */ (0, U.jsxs)(k, { children: [/* @__PURE__ */ (0, U.jsx)(h, {
|
|
3004
2997
|
asChild: !0,
|
|
3005
|
-
children: /* @__PURE__ */ (0,
|
|
2998
|
+
children: /* @__PURE__ */ (0, U.jsxs)(O, {
|
|
3006
2999
|
tooltip: e.title,
|
|
3007
3000
|
children: [
|
|
3008
|
-
e.icon && /* @__PURE__ */ (0,
|
|
3009
|
-
/* @__PURE__ */ (0,
|
|
3010
|
-
e.badge != null && /* @__PURE__ */ (0,
|
|
3001
|
+
e.icon && /* @__PURE__ */ (0, U.jsx)(e.icon, {}),
|
|
3002
|
+
/* @__PURE__ */ (0, U.jsx)("span", { children: e.title }),
|
|
3003
|
+
e.badge != null && /* @__PURE__ */ (0, U.jsx)(f, {
|
|
3011
3004
|
variant: e.badgeVariant || "default",
|
|
3012
3005
|
className: "ml-auto mr-1 h-5 min-w-5 px-1 text-xs",
|
|
3013
3006
|
children: e.badge
|
|
3014
3007
|
}),
|
|
3015
|
-
/* @__PURE__ */ (0,
|
|
3008
|
+
/* @__PURE__ */ (0, U.jsx)(I, { className: "ml-auto h-4 w-4 transition-transform duration-200 group-data-[state=open]/collapsible:rotate-90" })
|
|
3016
3009
|
]
|
|
3017
3010
|
})
|
|
3018
|
-
}), /* @__PURE__ */ (0,
|
|
3011
|
+
}), /* @__PURE__ */ (0, U.jsx)(m, { children: /* @__PURE__ */ (0, U.jsx)(A, { children: e.children.map((e) => /* @__PURE__ */ (0, U.jsx)(ne, { children: /* @__PURE__ */ (0, U.jsx)(te, {
|
|
3019
3012
|
asChild: !0,
|
|
3020
3013
|
isActive: t === e.href,
|
|
3021
|
-
children: /* @__PURE__ */ (0,
|
|
3014
|
+
children: /* @__PURE__ */ (0, U.jsxs)(re, {
|
|
3022
3015
|
to: e.href,
|
|
3023
3016
|
children: [
|
|
3024
|
-
e.icon && /* @__PURE__ */ (0,
|
|
3025
|
-
/* @__PURE__ */ (0,
|
|
3026
|
-
e.badge != null && /* @__PURE__ */ (0,
|
|
3017
|
+
e.icon && /* @__PURE__ */ (0, U.jsx)(e.icon, {}),
|
|
3018
|
+
/* @__PURE__ */ (0, U.jsx)("span", { children: e.title }),
|
|
3019
|
+
e.badge != null && /* @__PURE__ */ (0, U.jsx)(f, {
|
|
3027
3020
|
variant: e.badgeVariant || "default",
|
|
3028
3021
|
className: "ml-auto h-5 min-w-5 px-1 text-xs",
|
|
3029
3022
|
children: e.badge
|
|
@@ -3031,16 +3024,16 @@ function Vr({ item: e, pathname: t }) {
|
|
|
3031
3024
|
]
|
|
3032
3025
|
})
|
|
3033
3026
|
}) }, e.href)) }) })] })
|
|
3034
|
-
}) : /* @__PURE__ */ (0,
|
|
3027
|
+
}) : /* @__PURE__ */ (0, U.jsx)(k, { children: /* @__PURE__ */ (0, U.jsx)(O, {
|
|
3035
3028
|
asChild: !0,
|
|
3036
3029
|
isActive: t === e.href,
|
|
3037
3030
|
tooltip: e.title,
|
|
3038
|
-
children: /* @__PURE__ */ (0,
|
|
3031
|
+
children: /* @__PURE__ */ (0, U.jsxs)(re, {
|
|
3039
3032
|
to: e.href,
|
|
3040
3033
|
children: [
|
|
3041
|
-
e.icon && /* @__PURE__ */ (0,
|
|
3042
|
-
/* @__PURE__ */ (0,
|
|
3043
|
-
e.badge != null && /* @__PURE__ */ (0,
|
|
3034
|
+
e.icon && /* @__PURE__ */ (0, U.jsx)(e.icon, {}),
|
|
3035
|
+
/* @__PURE__ */ (0, U.jsx)("span", { children: e.title }),
|
|
3036
|
+
e.badge != null && /* @__PURE__ */ (0, U.jsx)(f, {
|
|
3044
3037
|
variant: e.badgeVariant || "default",
|
|
3045
3038
|
className: "ml-auto h-5 min-w-5 px-1 text-xs",
|
|
3046
3039
|
children: e.badge
|
|
@@ -3049,8 +3042,8 @@ function Vr({ item: e, pathname: t }) {
|
|
|
3049
3042
|
})
|
|
3050
3043
|
}) });
|
|
3051
3044
|
}
|
|
3052
|
-
function
|
|
3053
|
-
let s =
|
|
3045
|
+
function qr({ items: e, title: n = "Application", className: r, collapsible: i = "icon", searchEnabled: a = !1, searchPlaceholder: o = "Search..." }) {
|
|
3046
|
+
let s = F(), [c, l] = t.useState(""), u = t.useMemo(() => e.length === 0 ? [] : Gr(e[0]) ? e.map((e) => ({
|
|
3054
3047
|
groupLabel: e.label,
|
|
3055
3048
|
items: e.items
|
|
3056
3049
|
})) : [{ items: e }], [e]), d = t.useMemo(() => {
|
|
@@ -3061,14 +3054,14 @@ function Hr({ items: e, title: n = "Application", className: r, collapsible: i =
|
|
|
3061
3054
|
items: t.items.filter((t) => t.title.toLowerCase().includes(e) || t.children?.some((t) => t.title.toLowerCase().includes(e)))
|
|
3062
3055
|
})).filter((e) => e.items.length > 0);
|
|
3063
3056
|
}, [u, c]);
|
|
3064
|
-
return /* @__PURE__ */ (0,
|
|
3057
|
+
return /* @__PURE__ */ (0, U.jsx)(v, {
|
|
3065
3058
|
className: r,
|
|
3066
3059
|
collapsible: i,
|
|
3067
|
-
children: /* @__PURE__ */ (0,
|
|
3060
|
+
children: /* @__PURE__ */ (0, U.jsxs)(y, { children: [a && /* @__PURE__ */ (0, U.jsx)("div", {
|
|
3068
3061
|
className: "px-3 py-2",
|
|
3069
|
-
children: /* @__PURE__ */ (0,
|
|
3062
|
+
children: /* @__PURE__ */ (0, U.jsxs)("div", {
|
|
3070
3063
|
className: "relative",
|
|
3071
|
-
children: [/* @__PURE__ */ (0,
|
|
3064
|
+
children: [/* @__PURE__ */ (0, U.jsx)(se, { className: "absolute left-2.5 top-2.5 h-4 w-4 text-muted-foreground" }), /* @__PURE__ */ (0, U.jsx)(g, {
|
|
3072
3065
|
type: "search",
|
|
3073
3066
|
placeholder: o,
|
|
3074
3067
|
value: c,
|
|
@@ -3076,16 +3069,16 @@ function Hr({ items: e, title: n = "Application", className: r, collapsible: i =
|
|
|
3076
3069
|
className: "pl-8 h-9"
|
|
3077
3070
|
})]
|
|
3078
3071
|
})
|
|
3079
|
-
}), d.map((e, t) => /* @__PURE__ */ (0,
|
|
3080
|
-
t > 0 && /* @__PURE__ */ (0,
|
|
3072
|
+
}), d.map((e, t) => /* @__PURE__ */ (0, U.jsxs)(x, { children: [
|
|
3073
|
+
t > 0 && /* @__PURE__ */ (0, U.jsx)("div", {
|
|
3081
3074
|
className: "mx-3 mb-1 h-px bg-sidebar-border/60",
|
|
3082
3075
|
"aria-hidden": !0
|
|
3083
3076
|
}),
|
|
3084
|
-
/* @__PURE__ */ (0,
|
|
3077
|
+
/* @__PURE__ */ (0, U.jsx)(C, {
|
|
3085
3078
|
className: "text-[10px] font-semibold uppercase tracking-wider text-sidebar-foreground/60",
|
|
3086
3079
|
children: e.groupLabel || n
|
|
3087
3080
|
}),
|
|
3088
|
-
/* @__PURE__ */ (0,
|
|
3081
|
+
/* @__PURE__ */ (0, U.jsx)(S, { children: /* @__PURE__ */ (0, U.jsx)(D, { children: e.items.map((e) => /* @__PURE__ */ (0, U.jsx)(Kr, {
|
|
3089
3082
|
item: e,
|
|
3090
3083
|
pathname: s.pathname
|
|
3091
3084
|
}, e.href)) }) })
|
|
@@ -3094,8 +3087,8 @@ function Hr({ items: e, title: n = "Application", className: r, collapsible: i =
|
|
|
3094
3087
|
}
|
|
3095
3088
|
//#endregion
|
|
3096
3089
|
//#region src/index.ts
|
|
3097
|
-
function
|
|
3098
|
-
e.register("page-header",
|
|
3090
|
+
function Jr() {
|
|
3091
|
+
e.register("page-header", pe, {
|
|
3099
3092
|
namespace: "layout",
|
|
3100
3093
|
label: "Page Header",
|
|
3101
3094
|
category: "Layout",
|
|
@@ -3106,16 +3099,16 @@ function Ur() {
|
|
|
3106
3099
|
name: "description",
|
|
3107
3100
|
type: "string"
|
|
3108
3101
|
}]
|
|
3109
|
-
}), e.register("page:header",
|
|
3102
|
+
}), e.register("page:header", pe, { namespace: "layout" }), e.register("page:card", _e, {
|
|
3110
3103
|
namespace: "layout",
|
|
3111
3104
|
label: "Page Card",
|
|
3112
3105
|
category: "Layout",
|
|
3113
3106
|
isContainer: !0
|
|
3114
|
-
}), e.register("app-shell",
|
|
3107
|
+
}), e.register("app-shell", ge, {
|
|
3115
3108
|
namespace: "layout",
|
|
3116
3109
|
label: "App Shell",
|
|
3117
3110
|
category: "Layout"
|
|
3118
|
-
}), e.register("responsive-grid",
|
|
3111
|
+
}), e.register("responsive-grid", xe, {
|
|
3119
3112
|
namespace: "layout",
|
|
3120
3113
|
label: "Responsive Grid",
|
|
3121
3114
|
category: "Layout",
|
|
@@ -3127,7 +3120,7 @@ function Ur() {
|
|
|
3127
3120
|
name: "gap",
|
|
3128
3121
|
type: "number"
|
|
3129
3122
|
}]
|
|
3130
|
-
}), e.register("navigation-renderer",
|
|
3123
|
+
}), e.register("navigation-renderer", Lr, {
|
|
3131
3124
|
namespace: "layout",
|
|
3132
3125
|
label: "Navigation Renderer",
|
|
3133
3126
|
category: "Layout",
|
|
@@ -3138,7 +3131,7 @@ function Ur() {
|
|
|
3138
3131
|
name: "basePath",
|
|
3139
3132
|
type: "string"
|
|
3140
3133
|
}]
|
|
3141
|
-
}), e.register("app-schema-renderer",
|
|
3134
|
+
}), e.register("app-schema-renderer", Hr, {
|
|
3142
3135
|
namespace: "layout",
|
|
3143
3136
|
label: "App Schema Renderer",
|
|
3144
3137
|
category: "Layout",
|
|
@@ -3160,7 +3153,7 @@ function Ur() {
|
|
|
3160
3153
|
});
|
|
3161
3154
|
}
|
|
3162
3155
|
try {
|
|
3163
|
-
|
|
3156
|
+
Jr();
|
|
3164
3157
|
} catch {}
|
|
3165
3158
|
//#endregion
|
|
3166
|
-
export {
|
|
3159
|
+
export { Hr as AppSchemaRenderer, ge as AppShell, Lr as NavigationRenderer, Wr as Page, _e as PageCard, pe as PageHeader, xe as ResponsiveGrid, qr as SidebarNav, Nr as filterNavigationItems, Jr as registerLayout, Or as resolveIcon, $ as resolveLabel, he as useAppShellBranding };
|