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