@object-ui/layout 17.7.0 → 18.0.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 +319 -0
- package/dist/AppSchemaRenderer.d.ts +1 -5
- package/dist/NavigationRenderer.d.ts +79 -10
- package/dist/PageHeader.d.ts +6 -5
- package/dist/index.js +414 -358
- package/dist/index.umd.cjs +1 -1
- package/package.json +7 -7
package/dist/index.js
CHANGED
|
@@ -3,15 +3,15 @@ import { ComponentRegistry as a } from "@object-ui/core";
|
|
|
3
3
|
import { Badge as o, Button as s, Collapsible as c, CollapsibleContent as l, CollapsibleTrigger as u, Input as d, LazyIcon as f, Separator as p, Sidebar as m, SidebarContent as h, SidebarFooter as g, SidebarGroup as _, SidebarGroupContent as v, SidebarGroupLabel as y, SidebarHeader as b, SidebarInput as x, SidebarInset as S, SidebarMenu as C, SidebarMenuAction as w, SidebarMenuButton as T, SidebarMenuItem as E, SidebarMenuSub as D, SidebarMenuSubButton as O, SidebarMenuSubItem as k, SidebarProvider as A, cn as j, getLazyIcon as M, useIsMobile as N } from "@object-ui/components";
|
|
4
4
|
import { Fragment as P, jsx as F, jsxs as I } from "react/jsx-runtime";
|
|
5
5
|
import { Link as L, NavLink as R, useLocation as z } from "react-router-dom";
|
|
6
|
-
import { ArrowLeft as
|
|
7
|
-
import { menuItemToNavigationItem as
|
|
8
|
-
import { resolveI18nLabel as
|
|
9
|
-
import { DndContext as
|
|
10
|
-
import { SortableContext as
|
|
11
|
-
import { CSS as
|
|
12
|
-
import { SchemaRenderer as
|
|
6
|
+
import { ArrowLeft as B, ChevronRight as ee, FileText as te, Layers as V, Pin as ne, PinOff as re, Search as ie, Star as H } from "lucide-react";
|
|
7
|
+
import { menuItemToNavigationItem as ae } from "@object-ui/types";
|
|
8
|
+
import { resolveI18nLabel as U } from "@objectstack/spec/ui";
|
|
9
|
+
import { DndContext as oe, KeyboardSensor as W, PointerSensor as G, closestCenter as se, useDndContext as K, useSensor as q, useSensors as ce } from "@dnd-kit/core";
|
|
10
|
+
import { SortableContext as le, arrayMove as ue, sortableKeyboardCoordinates as de, useSortable as fe } from "@dnd-kit/sortable";
|
|
11
|
+
import { CSS as pe } from "@dnd-kit/utilities";
|
|
12
|
+
import { SchemaRenderer as me, isElementApiDataSourceShape as he, useRecordContext as ge } from "@object-ui/react";
|
|
13
13
|
//#region src/PageCard.tsx
|
|
14
|
-
function
|
|
14
|
+
function _e({ className: e, children: t, ...n }) {
|
|
15
15
|
return /* @__PURE__ */ F("div", {
|
|
16
16
|
className: j("rounded-xl border bg-card text-card-foreground shadow", e),
|
|
17
17
|
...n,
|
|
@@ -23,7 +23,7 @@ function ye({ className: e, children: t, ...n }) {
|
|
|
23
23
|
}
|
|
24
24
|
//#endregion
|
|
25
25
|
//#region src/AppShell.tsx
|
|
26
|
-
function
|
|
26
|
+
function ve(e) {
|
|
27
27
|
let t = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);
|
|
28
28
|
if (!t) return null;
|
|
29
29
|
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;
|
|
@@ -45,17 +45,17 @@ function be(e) {
|
|
|
45
45
|
l: l * 100
|
|
46
46
|
};
|
|
47
47
|
}
|
|
48
|
-
function
|
|
49
|
-
let t =
|
|
48
|
+
function ye(e) {
|
|
49
|
+
let t = ve(e);
|
|
50
50
|
return t ? `${Math.round(t.h)} ${Math.round(t.s)}% ${Math.round(t.l)}%` : null;
|
|
51
51
|
}
|
|
52
|
-
function
|
|
53
|
-
let t =
|
|
52
|
+
function be(e) {
|
|
53
|
+
let t = ve(e);
|
|
54
54
|
if (!t) return null;
|
|
55
55
|
let n = Math.max(t.l, 65), r = t.s > 80 ? Math.max(t.s - 10, 70) : t.s;
|
|
56
56
|
return `${Math.round(t.h)} ${Math.round(r)}% ${Math.round(n)}%`;
|
|
57
57
|
}
|
|
58
|
-
function
|
|
58
|
+
function xe(e) {
|
|
59
59
|
let t = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);
|
|
60
60
|
if (!t) return "0 0% 100%";
|
|
61
61
|
let n = (e) => {
|
|
@@ -64,16 +64,16 @@ function Ce(e) {
|
|
|
64
64
|
}, r = n(parseInt(t[1], 16)), i = n(parseInt(t[2], 16)), a = n(parseInt(t[3], 16));
|
|
65
65
|
return .2126 * r + .7152 * i + .0722 * a > .6 ? "222 47% 11%" : "0 0% 100%";
|
|
66
66
|
}
|
|
67
|
-
function
|
|
67
|
+
function Se(e, t) {
|
|
68
68
|
n(() => {
|
|
69
69
|
let n = document.documentElement, r = () => n.classList.contains("dark"), i = () => {
|
|
70
70
|
if (e?.primaryColor) {
|
|
71
|
-
let t =
|
|
72
|
-
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%" :
|
|
71
|
+
let t = ye(e.primaryColor), i = be(e.primaryColor), a = r() && i || t;
|
|
72
|
+
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%" : xe(e.primaryColor)), n.style.setProperty("--ring", a), n.style.setProperty("--sidebar-primary", a), n.style.setProperty("--sidebar-ring", a));
|
|
73
73
|
} 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");
|
|
74
74
|
if (e?.accentColor) {
|
|
75
|
-
let t =
|
|
76
|
-
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%" :
|
|
75
|
+
let t = ye(e.accentColor), i = be(e.accentColor), a = r() && i || t;
|
|
76
|
+
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%" : xe(e.accentColor)));
|
|
77
77
|
} else n.style.removeProperty("--brand-accent"), n.style.removeProperty("--brand-accent-hsl"), n.style.removeProperty("--accent"), n.style.removeProperty("--accent-foreground");
|
|
78
78
|
};
|
|
79
79
|
i();
|
|
@@ -103,12 +103,12 @@ function we(e, t) {
|
|
|
103
103
|
t
|
|
104
104
|
]);
|
|
105
105
|
}
|
|
106
|
-
function
|
|
107
|
-
return
|
|
106
|
+
function Ce({ sidebar: e, navbar: t, children: n, className: r, defaultOpen: i = !0, branding: a, rightRail: o }) {
|
|
107
|
+
return Se(a, a?.title), /* @__PURE__ */ I(A, {
|
|
108
108
|
defaultOpen: i,
|
|
109
109
|
className: "!flex-col h-svh overflow-hidden",
|
|
110
110
|
children: [/* @__PURE__ */ F("header", {
|
|
111
|
-
className: "sticky top-0 z-30 flex h-
|
|
111
|
+
className: "sticky top-0 z-30 flex h-12 w-full shrink-0 items-center gap-2 border-b bg-background px-2 sm:px-4",
|
|
112
112
|
children: t
|
|
113
113
|
}), /* @__PURE__ */ I("div", {
|
|
114
114
|
className: "flex flex-1 min-h-0 w-full",
|
|
@@ -128,15 +128,16 @@ function Te({ sidebar: e, navbar: t, children: n, className: r, defaultOpen: i =
|
|
|
128
128
|
}
|
|
129
129
|
//#endregion
|
|
130
130
|
//#region src/navOrder.ts
|
|
131
|
-
function
|
|
131
|
+
function we(e, t) {
|
|
132
132
|
return (e.order ?? 0) - (t.order ?? 0);
|
|
133
133
|
}
|
|
134
134
|
//#endregion
|
|
135
135
|
//#region src/NavigationRenderer.tsx
|
|
136
|
-
|
|
137
|
-
|
|
136
|
+
var Te = "group-data-[state=collapsed]:group-data-[collapsible=icon]:pointer-events-none", Ee = "group-data-[state=collapsed]:group-data-[collapsible=icon]:invisible group-data-[state=collapsed]:group-data-[collapsible=icon]:transition-[margin,opacity,visibility]";
|
|
137
|
+
function J(e) {
|
|
138
|
+
return e ? M(e) : te;
|
|
138
139
|
}
|
|
139
|
-
function
|
|
140
|
+
function De(e, t) {
|
|
140
141
|
if (typeof e == "string") return e;
|
|
141
142
|
if (t) {
|
|
142
143
|
let n = t(e.key, {
|
|
@@ -147,16 +148,16 @@ function Ee(e, t) {
|
|
|
147
148
|
}
|
|
148
149
|
return e.defaultValue || e.key;
|
|
149
150
|
}
|
|
150
|
-
function
|
|
151
|
-
return e.type === "separator" ? "" : e.label === void 0 ?
|
|
151
|
+
function Y(e, t, n, r) {
|
|
152
|
+
return e.type === "separator" ? "" : e.label === void 0 ? Ae(e, n) : Oe(e.label, t, r);
|
|
152
153
|
}
|
|
153
|
-
function
|
|
154
|
-
return typeof e == "string" ? e :
|
|
154
|
+
function Oe(e, t, n) {
|
|
155
|
+
return typeof e == "string" ? e : ke(e) ? De(e, t) : U(e, n) ?? "";
|
|
155
156
|
}
|
|
156
|
-
function
|
|
157
|
+
function ke(e) {
|
|
157
158
|
return typeof e == "object" && !!e && ("key" in e || "defaultValue" in e);
|
|
158
159
|
}
|
|
159
|
-
function
|
|
160
|
+
function Ae(e, t) {
|
|
160
161
|
let n = (e) => {
|
|
161
162
|
let n = t?.(e);
|
|
162
163
|
return typeof n == "string" && n.trim() !== "" ? n : void 0;
|
|
@@ -202,51 +203,51 @@ function ke(e, t) {
|
|
|
202
203
|
}
|
|
203
204
|
return e.id;
|
|
204
205
|
}
|
|
205
|
-
var
|
|
206
|
-
function
|
|
207
|
-
let { evaluateVisibility: n =
|
|
208
|
-
if (!n(e.visible) || e.requiredPermissions?.length && !r(e.requiredPermissions)) return !1;
|
|
206
|
+
var je = (e, t) => !(t && he(t.dataSource) || e === !1 || e === "false"), Me = () => !0, Ne = () => !0;
|
|
207
|
+
function Pe(e, t) {
|
|
208
|
+
let { evaluateVisibility: n = je, checkPermission: r = Me, checkCapability: i = Ne, checkDocTarget: a } = t;
|
|
209
|
+
if (!n(e.visible, e) || e.requiredPermissions?.length && !r(e.requiredPermissions)) return !1;
|
|
209
210
|
let o = e.requiresObject, s = e.requiresService;
|
|
210
211
|
return !(o && !i("object", o) || s && !i("service", s) || e.type === "doc" && a && !a({
|
|
211
212
|
book: e.book,
|
|
212
213
|
doc: e.doc
|
|
213
214
|
}));
|
|
214
215
|
}
|
|
215
|
-
function
|
|
216
|
+
function X(e, t = {}) {
|
|
216
217
|
let { hasActionHandler: n = !1 } = t;
|
|
217
|
-
for (let r of e) if (
|
|
218
|
+
for (let r of e) if (Pe(r, t) && r.type !== "separator") {
|
|
218
219
|
if (r.type === "group") {
|
|
219
|
-
if (
|
|
220
|
+
if (X(r.children ?? [], t)) return !0;
|
|
220
221
|
continue;
|
|
221
222
|
}
|
|
222
223
|
if (r.type !== "action" || n) return !0;
|
|
223
224
|
}
|
|
224
225
|
return !1;
|
|
225
226
|
}
|
|
226
|
-
var
|
|
227
|
-
function
|
|
227
|
+
var Fe = /\{(current_user_id|current_org_id|[a-z][a-z0-9_]*)\}/g;
|
|
228
|
+
function Z(e, t) {
|
|
228
229
|
if (!e.includes("{")) return e;
|
|
229
|
-
let n = !1, r = e.replace(
|
|
230
|
+
let n = !1, r = e.replace(Fe, (e, r) => {
|
|
230
231
|
let i;
|
|
231
232
|
return i = r === "current_user_id" ? t?.currentUserId : r === "current_org_id" ? t?.currentOrgId : t?.contextValues?.[r], i || (n = !0, "");
|
|
232
233
|
});
|
|
233
234
|
return n ? null : r;
|
|
234
235
|
}
|
|
235
|
-
var
|
|
236
|
-
function
|
|
236
|
+
var Ie = "runAction";
|
|
237
|
+
function Le(e, t) {
|
|
237
238
|
let n = t.runAction;
|
|
238
|
-
return typeof n != "string" || n === "" ? e : `${e}${e.includes("?") ? "&" : "?"}${
|
|
239
|
+
return typeof n != "string" || n === "" ? e : `${e}${e.includes("?") ? "&" : "?"}${Ie}=${encodeURIComponent(n)}`;
|
|
239
240
|
}
|
|
240
|
-
function
|
|
241
|
+
function Re(e, t, n) {
|
|
241
242
|
let r = (e) => encodeURIComponent(e);
|
|
242
243
|
return e && t ? `${n}/docs/${r(e)}/${r(t)}` : t ? `${n}/docs/${r(t)}` : e ? `${n}/docs/${r(e)}` : "#";
|
|
243
244
|
}
|
|
244
|
-
function
|
|
245
|
+
function Q(e, t, n) {
|
|
245
246
|
switch (e.type) {
|
|
246
247
|
case "object": {
|
|
247
248
|
let r = `${t}/${e.objectName ?? ""}`, i = e.recordId;
|
|
248
249
|
if (i) {
|
|
249
|
-
let t =
|
|
250
|
+
let t = Z(i, n);
|
|
250
251
|
if (t) {
|
|
251
252
|
let n = `${r}/record/${encodeURIComponent(t)}`;
|
|
252
253
|
return {
|
|
@@ -260,17 +261,17 @@ function Z(e, t, n) {
|
|
|
260
261
|
let t = new URLSearchParams();
|
|
261
262
|
for (let [e, r] of Object.entries(a)) {
|
|
262
263
|
if (r == null || e === "") continue;
|
|
263
|
-
let i =
|
|
264
|
+
let i = Z(String(r), n);
|
|
264
265
|
i !== null && t.set(`filter[${e}]`, i);
|
|
265
266
|
}
|
|
266
267
|
let i = t.toString();
|
|
267
268
|
return {
|
|
268
|
-
href:
|
|
269
|
+
href: Le(i ? `${r}/data?${i}` : `${r}/data`, e),
|
|
269
270
|
external: !1
|
|
270
271
|
};
|
|
271
272
|
}
|
|
272
273
|
return {
|
|
273
|
-
href:
|
|
274
|
+
href: Le(e.viewName ? `${r}/view/${e.viewName}` : r, e),
|
|
274
275
|
external: !1
|
|
275
276
|
};
|
|
276
277
|
}
|
|
@@ -288,7 +289,7 @@ function Z(e, t, n) {
|
|
|
288
289
|
let e = new URLSearchParams();
|
|
289
290
|
for (let [t, i] of Object.entries(r)) if (i != null) {
|
|
290
291
|
if (typeof i == "string") {
|
|
291
|
-
let r =
|
|
292
|
+
let r = Z(i, n);
|
|
292
293
|
r !== null && e.set(t, r);
|
|
293
294
|
} else e.set(t, JSON.stringify(i));
|
|
294
295
|
}
|
|
@@ -326,7 +327,7 @@ function Z(e, t, n) {
|
|
|
326
327
|
let e = new URLSearchParams();
|
|
327
328
|
for (let [t, r] of Object.entries(a)) if (t !== "type" && t !== "name" && r != null) {
|
|
328
329
|
if (typeof r == "string") {
|
|
329
|
-
let i =
|
|
330
|
+
let i = Z(r, n);
|
|
330
331
|
i && e.set(t, i);
|
|
331
332
|
} else e.set(t, JSON.stringify(r));
|
|
332
333
|
}
|
|
@@ -357,7 +358,7 @@ function Z(e, t, n) {
|
|
|
357
358
|
};
|
|
358
359
|
}
|
|
359
360
|
case "doc": return {
|
|
360
|
-
href:
|
|
361
|
+
href: Re(e.book, e.doc, t),
|
|
361
362
|
external: !1
|
|
362
363
|
};
|
|
363
364
|
default: return {
|
|
@@ -366,27 +367,27 @@ function Z(e, t, n) {
|
|
|
366
367
|
};
|
|
367
368
|
}
|
|
368
369
|
}
|
|
369
|
-
var
|
|
370
|
-
function
|
|
370
|
+
var ze = 50, Be = 40, Ve = 30, He = 25, Ue = 10, We = 5;
|
|
371
|
+
function Ge(e) {
|
|
371
372
|
let t = /* @__PURE__ */ new Map();
|
|
372
373
|
return new URLSearchParams(e).forEach((e, n) => {
|
|
373
374
|
let r = /^filter\[(.+)\]$/.exec(n);
|
|
374
375
|
r && r[1] && e !== "" && t.set(r[1], e);
|
|
375
376
|
}), t;
|
|
376
377
|
}
|
|
377
|
-
function
|
|
378
|
+
function Ke(e, t) {
|
|
378
379
|
return t.startsWith(`${e}.`) ? t.slice(e.length + 1) : t;
|
|
379
380
|
}
|
|
380
|
-
function
|
|
381
|
-
let { href: a, external: o } =
|
|
381
|
+
function qe(e, t, n, r, i) {
|
|
382
|
+
let { href: a, external: o } = Q(e, r, i);
|
|
382
383
|
if (o || a === "#") return 0;
|
|
383
384
|
if (e.type === "object" && e.objectName) {
|
|
384
385
|
let a = `${r}/${e.objectName}`;
|
|
385
386
|
if (t !== a && !t.startsWith(`${a}/`)) return 0;
|
|
386
387
|
let o = t === a ? [] : t.slice(a.length + 1).split("/"), s = e.recordId;
|
|
387
388
|
if (s) {
|
|
388
|
-
let e =
|
|
389
|
-
if (e) return o[0] === "record" && decodeURIComponent(o[1] ?? "") === e ?
|
|
389
|
+
let e = Z(s, i);
|
|
390
|
+
if (e) return o[0] === "record" && decodeURIComponent(o[1] ?? "") === e ? ze : 0;
|
|
390
391
|
}
|
|
391
392
|
let c = e.filters;
|
|
392
393
|
if (c && typeof c == "object" && !Array.isArray(c)) {
|
|
@@ -394,41 +395,41 @@ function Ge(e, t, n, r, i) {
|
|
|
394
395
|
let e = /* @__PURE__ */ new Map();
|
|
395
396
|
for (let [t, n] of Object.entries(c)) {
|
|
396
397
|
if (n == null || t === "") continue;
|
|
397
|
-
let r =
|
|
398
|
+
let r = Z(String(n), i);
|
|
398
399
|
r !== null && e.set(t, r);
|
|
399
400
|
}
|
|
400
401
|
if (e.size !== n.size) return 0;
|
|
401
402
|
for (let [t, r] of e) if (n.get(t) !== r) return 0;
|
|
402
|
-
return
|
|
403
|
+
return Be;
|
|
403
404
|
}
|
|
404
|
-
return e.viewName ? o[0] !== "view" || !o[1] ? 0 :
|
|
405
|
+
return e.viewName ? o[0] !== "view" || !o[1] ? 0 : Ke(e.objectName, decodeURIComponent(o[1])) === Ke(e.objectName, e.viewName) ? Ve : 0 : o.length === 0 ? He : Ue;
|
|
405
406
|
}
|
|
406
407
|
let s = a.split("?")[0];
|
|
407
|
-
if (t === s) return
|
|
408
|
+
if (t === s) return He;
|
|
408
409
|
let c = e.componentRef;
|
|
409
|
-
return c && c.split(":")[1] === "directory" ? 0 : t.startsWith(`${s}/`) ?
|
|
410
|
+
return c && c.split(":")[1] === "directory" ? 0 : t.startsWith(`${s}/`) ? We : 0;
|
|
410
411
|
}
|
|
411
|
-
function
|
|
412
|
-
let a =
|
|
412
|
+
function Je(e, t, n, r, i) {
|
|
413
|
+
let a = Ge(n), o = null, s = 0, c = (e) => {
|
|
413
414
|
if (e) for (let n of e) {
|
|
414
415
|
if (n.type === "group") {
|
|
415
416
|
c(n.children);
|
|
416
417
|
continue;
|
|
417
418
|
}
|
|
418
|
-
let e =
|
|
419
|
+
let e = qe(n, t, a, r, i);
|
|
419
420
|
e > s && (o = n, s = e);
|
|
420
421
|
}
|
|
421
422
|
};
|
|
422
423
|
return c(e), o;
|
|
423
424
|
}
|
|
424
|
-
var
|
|
425
|
-
function
|
|
425
|
+
var Ye = e.createContext(null);
|
|
426
|
+
function Xe(e, t, n = (e) => Y(e)) {
|
|
426
427
|
if (!t.trim()) return e;
|
|
427
428
|
let r = t.toLowerCase().trim();
|
|
428
429
|
return e.reduce((e, i) => {
|
|
429
430
|
if (i.type === "separator") return e;
|
|
430
431
|
if (i.type === "group" && i.children?.length) {
|
|
431
|
-
let r =
|
|
432
|
+
let r = Xe(i.children, t, n);
|
|
432
433
|
return r.length > 0 && e.push({
|
|
433
434
|
...i,
|
|
434
435
|
children: r
|
|
@@ -437,272 +438,330 @@ function qe(e, t, n = (e) => q(e)) {
|
|
|
437
438
|
return n(i).toLowerCase().includes(r) && e.push(i), e;
|
|
438
439
|
}, []);
|
|
439
440
|
}
|
|
440
|
-
var
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
};
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
441
|
+
var Ze = 5, Qe = {
|
|
442
|
+
coordinateGetter: de,
|
|
443
|
+
keyboardCodes: {
|
|
444
|
+
start: ["Space"],
|
|
445
|
+
cancel: ["Escape"],
|
|
446
|
+
end: ["Space"]
|
|
447
|
+
}
|
|
448
|
+
}, $e = () => null, et = (e) => e.activatorEvent?.type === "keydown";
|
|
449
|
+
function tt() {
|
|
450
|
+
let e = (e) => e.preventDefault();
|
|
451
|
+
window.addEventListener("click", e, { capture: !0 }), window.setTimeout(() => window.removeEventListener("click", e, { capture: !0 }), 50);
|
|
452
|
+
}
|
|
453
|
+
function nt({ items: e, onReorder: t, rowProps: n }) {
|
|
454
|
+
let r = ce(q(G, { activationConstraint: { distance: Ze } }), q(W, Qe)), i = e.map((e) => e.id);
|
|
455
|
+
return /* @__PURE__ */ F(oe, {
|
|
456
|
+
id: "nav-pinned",
|
|
457
|
+
sensors: r,
|
|
458
|
+
collisionDetection: se,
|
|
459
|
+
onDragEnd: (e) => {
|
|
460
|
+
et(e) || tt();
|
|
461
|
+
let { active: n, over: r } = e;
|
|
462
|
+
if (!r || n.id === r.id) return;
|
|
463
|
+
let a = i.indexOf(String(n.id)), o = i.indexOf(String(r.id));
|
|
464
|
+
a !== -1 && o !== -1 && t(ue(i, a, o));
|
|
465
|
+
},
|
|
466
|
+
onDragCancel: (e) => {
|
|
467
|
+
et(e) || tt();
|
|
468
|
+
},
|
|
469
|
+
children: /* @__PURE__ */ F(le, {
|
|
470
|
+
items: i,
|
|
471
|
+
strategy: $e,
|
|
472
|
+
children: /* @__PURE__ */ F(C, { children: e.map((e) => /* @__PURE__ */ F(it, {
|
|
473
|
+
item: e,
|
|
474
|
+
rowProps: n
|
|
475
|
+
}, `fav-${e.id}`)) })
|
|
470
476
|
})
|
|
471
477
|
});
|
|
472
478
|
}
|
|
473
|
-
function
|
|
474
|
-
|
|
479
|
+
function rt(e) {
|
|
480
|
+
return {
|
|
481
|
+
ref: e.ref,
|
|
482
|
+
...e.listeners,
|
|
483
|
+
"aria-describedby": e.describedBy,
|
|
484
|
+
onKeyUp: (e) => {
|
|
485
|
+
e.code === "Space" && e.preventDefault();
|
|
486
|
+
}
|
|
487
|
+
};
|
|
488
|
+
}
|
|
489
|
+
function it({ item: e, rowProps: t }) {
|
|
490
|
+
let { attributes: n, listeners: r, setNodeRef: i, setActivatorNodeRef: a, transform: o, transition: s, isDragging: c, isOver: l, activeIndex: u, index: d } = fe({ id: e.id }), { activatorEvent: f } = K(), p = {
|
|
491
|
+
transform: c && f?.type === "keydown" ? void 0 : pe.Transform.toString(o),
|
|
492
|
+
transition: s,
|
|
493
|
+
opacity: c ? .5 : void 0,
|
|
494
|
+
zIndex: c ? 10 : void 0
|
|
495
|
+
}, m = l && !c && u !== -1 ? u < d ? "after" : "before" : null;
|
|
496
|
+
return /* @__PURE__ */ F($, {
|
|
497
|
+
item: e,
|
|
498
|
+
...t,
|
|
499
|
+
dragActivator: {
|
|
500
|
+
ref: a,
|
|
501
|
+
listeners: r,
|
|
502
|
+
describedBy: n["aria-describedby"]
|
|
503
|
+
},
|
|
504
|
+
row: {
|
|
505
|
+
ref: i,
|
|
506
|
+
style: p,
|
|
507
|
+
dropIndicator: m
|
|
508
|
+
}
|
|
509
|
+
});
|
|
510
|
+
}
|
|
511
|
+
function at({ at: e }) {
|
|
512
|
+
return /* @__PURE__ */ F("span", {
|
|
513
|
+
"aria-hidden": "true",
|
|
514
|
+
"data-drop-indicator": e,
|
|
515
|
+
className: j("pointer-events-none absolute inset-x-2 h-0.5 rounded-full bg-primary", e === "before" ? "-top-px" : "-bottom-px")
|
|
516
|
+
});
|
|
517
|
+
}
|
|
518
|
+
function $({ item: t, basePath: n, evalVis: r, checkPerm: a, checkCap: s, checkDocTarget: d, onAction: f, enablePinning: m, onPinToggle: h, renderItemAction: g, dragActivator: b, row: x, inList: S = !0, resolveTargetLabel: D, locale: O, t: k, templateContext: A }) {
|
|
519
|
+
let M = N(), R = M ? "min-h-[44px] text-[15px] gap-3 rounded-xl" : void 0, z = j("shrink-0", M ? "h-5 w-5" : "h-4 w-4"), B = (() => {
|
|
475
520
|
if (typeof t.expanded == "boolean") return t.expanded;
|
|
476
521
|
if (typeof t.defaultOpen == "boolean") return t.defaultOpen;
|
|
477
|
-
})(),
|
|
478
|
-
if (t.type !== "group" || !
|
|
479
|
-
let e = (t) => !!t?.some((t) => t.id ===
|
|
522
|
+
})(), te = t.type === "group" ? t.children?.length ?? 0 : 0, V = e.useContext(Ye), ie = e.useMemo(() => {
|
|
523
|
+
if (t.type !== "group" || !V) return !1;
|
|
524
|
+
let e = (t) => !!t?.some((t) => t.id === V || t.type === "group" && e(t.children));
|
|
480
525
|
return e(t.children);
|
|
481
|
-
}, [t,
|
|
526
|
+
}, [t, V]) ? !0 : B ?? !(te >= 8), [H, ae] = i(ie), U = {
|
|
482
527
|
evaluateVisibility: r,
|
|
483
528
|
checkPermission: a,
|
|
484
529
|
checkCapability: s,
|
|
485
530
|
checkDocTarget: d,
|
|
486
531
|
hasActionHandler: !!f
|
|
487
532
|
};
|
|
488
|
-
if (!
|
|
489
|
-
if (t.type === "separator") return /* @__PURE__ */ F(
|
|
533
|
+
if (!Pe(t, U)) return null;
|
|
534
|
+
if (t.type === "separator") return /* @__PURE__ */ F("li", {
|
|
535
|
+
"aria-hidden": "true",
|
|
536
|
+
children: /* @__PURE__ */ F(p, { className: "my-2" })
|
|
537
|
+
});
|
|
490
538
|
if (t.type === "group") {
|
|
491
|
-
let e = (t.children ?? []).slice().sort(
|
|
492
|
-
if (!
|
|
493
|
-
let i =
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
539
|
+
let e = (t.children ?? []).slice().sort(we);
|
|
540
|
+
if (!X(e, U)) return null;
|
|
541
|
+
let i = Y(t, k, D, O), o = {
|
|
542
|
+
basePath: n,
|
|
543
|
+
evalVis: r,
|
|
544
|
+
checkPerm: a,
|
|
545
|
+
checkCap: s,
|
|
546
|
+
checkDocTarget: d,
|
|
547
|
+
onAction: f,
|
|
548
|
+
enablePinning: m,
|
|
549
|
+
onPinToggle: h,
|
|
550
|
+
renderItemAction: g,
|
|
551
|
+
resolveTargetLabel: D,
|
|
552
|
+
locale: O,
|
|
553
|
+
t: k,
|
|
554
|
+
templateContext: A
|
|
555
|
+
}, p = /* @__PURE__ */ F(c, {
|
|
556
|
+
open: H,
|
|
557
|
+
onOpenChange: ae,
|
|
497
558
|
children: /* @__PURE__ */ I(_, { children: [/* @__PURE__ */ F(y, {
|
|
498
559
|
asChild: !0,
|
|
560
|
+
className: j(Te, Ee),
|
|
499
561
|
children: /* @__PURE__ */ I(u, {
|
|
500
|
-
className: j("flex w-full items-center justify-between",
|
|
501
|
-
children: [i, /* @__PURE__ */ F(
|
|
562
|
+
className: j("flex w-full items-center justify-between", M && "min-h-[44px] text-[15px] rounded-xl"),
|
|
563
|
+
children: [i, /* @__PURE__ */ F(ee, { className: j("ml-auto transition-transform", M ? "h-5 w-5" : "h-4 w-4", H && "rotate-90") })]
|
|
502
564
|
})
|
|
503
565
|
}), /* @__PURE__ */ F(l, { children: /* @__PURE__ */ F(v, { children: /* @__PURE__ */ F(C, { children: e.map((e) => /* @__PURE__ */ F($, {
|
|
504
566
|
item: e,
|
|
505
|
-
|
|
506
|
-
evalVis: r,
|
|
507
|
-
checkPerm: a,
|
|
508
|
-
checkCap: s,
|
|
509
|
-
checkDocTarget: d,
|
|
510
|
-
onAction: f,
|
|
511
|
-
enablePinning: m,
|
|
512
|
-
onPinToggle: h,
|
|
513
|
-
resolveTargetLabel: b,
|
|
514
|
-
locale: x,
|
|
515
|
-
t: S,
|
|
516
|
-
templateContext: D
|
|
567
|
+
...o
|
|
517
568
|
}, e.id)) }) }) })] })
|
|
518
569
|
});
|
|
570
|
+
return S ? /* @__PURE__ */ F("li", { children: p }) : p;
|
|
519
571
|
}
|
|
520
572
|
if (t.type === "action") {
|
|
521
573
|
if (!f) return null;
|
|
522
|
-
let e =
|
|
523
|
-
return /* @__PURE__ */ I(E, {
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
574
|
+
let e = J(t.icon), r = Y(t, k, D, O);
|
|
575
|
+
return /* @__PURE__ */ I(E, {
|
|
576
|
+
ref: x?.ref,
|
|
577
|
+
style: x?.style,
|
|
578
|
+
children: [
|
|
579
|
+
x?.dropIndicator && /* @__PURE__ */ F(at, { at: x.dropIndicator }),
|
|
580
|
+
/* @__PURE__ */ I(T, {
|
|
581
|
+
tooltip: r,
|
|
582
|
+
onClick: () => f?.(t),
|
|
583
|
+
className: j(R, b && "cursor-grab"),
|
|
584
|
+
...b ? rt(b) : {},
|
|
585
|
+
children: [
|
|
586
|
+
/* @__PURE__ */ F(e, { className: z }),
|
|
587
|
+
/* @__PURE__ */ F("span", { children: r }),
|
|
588
|
+
t.badge != null && /* @__PURE__ */ F(o, {
|
|
589
|
+
variant: t.badgeVariant ?? "default",
|
|
590
|
+
className: "ml-auto text-[10px] px-1.5 py-0",
|
|
591
|
+
children: t.badge
|
|
592
|
+
})
|
|
593
|
+
]
|
|
594
|
+
}),
|
|
595
|
+
g ? g(t, {
|
|
596
|
+
external: !1,
|
|
597
|
+
label: r,
|
|
598
|
+
basePath: n
|
|
599
|
+
}) : m && h && /* @__PURE__ */ F(w, {
|
|
600
|
+
showOnHover: !0,
|
|
601
|
+
onClick: () => h(t.id, !t.pinned, t, n),
|
|
602
|
+
"aria-label": k ? k(t.pinned ? "console.nav.unpinItem" : "console.nav.pinItem", {
|
|
603
|
+
defaultValue: t.pinned ? `Unpin ${r}` : `Pin ${r}`,
|
|
604
|
+
name: r
|
|
605
|
+
}) : t.pinned ? `Unpin ${r}` : `Pin ${r}`,
|
|
606
|
+
children: t.pinned ? /* @__PURE__ */ F(re, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ F(ne, { className: "h-3.5 w-3.5" })
|
|
607
|
+
})
|
|
608
|
+
]
|
|
609
|
+
});
|
|
554
610
|
}
|
|
555
|
-
let oe =
|
|
556
|
-
/* @__PURE__ */ F(oe, { className:
|
|
557
|
-
/* @__PURE__ */ F("span", { children:
|
|
611
|
+
let oe = J(t.icon), { href: W, external: G } = Q(t, n, A), se = V !== null && t.id === V, K = Y(t, k, D, O), q = /* @__PURE__ */ I(P, { children: [
|
|
612
|
+
/* @__PURE__ */ F(oe, { className: z }),
|
|
613
|
+
/* @__PURE__ */ F("span", { children: K }),
|
|
558
614
|
t.badge != null && /* @__PURE__ */ F(o, {
|
|
559
615
|
variant: t.badgeVariant ?? "default",
|
|
560
616
|
className: "ml-auto text-[10px] px-1.5 py-0",
|
|
561
617
|
children: t.badge
|
|
562
618
|
})
|
|
563
|
-
] });
|
|
564
|
-
return /* @__PURE__ */ I(E, {
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
619
|
+
] }), ce = b ? rt(b) : {};
|
|
620
|
+
return /* @__PURE__ */ I(E, {
|
|
621
|
+
ref: x?.ref,
|
|
622
|
+
style: x?.style,
|
|
623
|
+
children: [
|
|
624
|
+
x?.dropIndicator && /* @__PURE__ */ F(at, { at: x.dropIndicator }),
|
|
625
|
+
/* @__PURE__ */ F(T, {
|
|
626
|
+
asChild: !0,
|
|
627
|
+
isActive: se,
|
|
628
|
+
tooltip: K,
|
|
629
|
+
className: j(R, b && "cursor-grab"),
|
|
630
|
+
children: G ? /* @__PURE__ */ F("a", {
|
|
631
|
+
href: W,
|
|
632
|
+
target: "_blank",
|
|
633
|
+
rel: "noopener noreferrer",
|
|
634
|
+
...ce,
|
|
635
|
+
children: q
|
|
636
|
+
}) : /* @__PURE__ */ F(L, {
|
|
637
|
+
to: W,
|
|
638
|
+
...ce,
|
|
639
|
+
children: q
|
|
640
|
+
})
|
|
641
|
+
}),
|
|
642
|
+
g ? g(t, {
|
|
643
|
+
href: W === "#" ? void 0 : W,
|
|
644
|
+
external: G,
|
|
645
|
+
label: K,
|
|
646
|
+
basePath: n
|
|
647
|
+
}) : m && h && /* @__PURE__ */ F(w, {
|
|
648
|
+
showOnHover: !0,
|
|
649
|
+
onClick: () => h(t.id, !t.pinned, t, n),
|
|
650
|
+
"aria-label": k ? k(t.pinned ? "console.nav.unpinItem" : "console.nav.pinItem", {
|
|
651
|
+
defaultValue: t.pinned ? `Unpin ${K}` : `Pin ${K}`,
|
|
652
|
+
name: K
|
|
653
|
+
}) : t.pinned ? `Unpin ${K}` : `Pin ${K}`,
|
|
654
|
+
children: t.pinned ? /* @__PURE__ */ F(re, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ F(ne, { className: "h-3.5 w-3.5" })
|
|
584
655
|
})
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
showOnHover: !0,
|
|
588
|
-
onClick: () => h(t.id, !t.pinned, t, n),
|
|
589
|
-
"aria-label": S ? S(t.pinned ? "console.nav.unpinItem" : "console.nav.pinItem", {
|
|
590
|
-
defaultValue: t.pinned ? `Unpin ${U}` : `Pin ${U}`,
|
|
591
|
-
name: U
|
|
592
|
-
}) : t.pinned ? `Unpin ${U}` : `Pin ${U}`,
|
|
593
|
-
children: t.pinned ? /* @__PURE__ */ F(ae, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ F(ie, { className: "h-3.5 w-3.5" })
|
|
594
|
-
})
|
|
595
|
-
] });
|
|
656
|
+
]
|
|
657
|
+
});
|
|
596
658
|
}
|
|
597
|
-
function
|
|
598
|
-
let
|
|
599
|
-
e,
|
|
600
|
-
b.pathname,
|
|
601
|
-
b.search,
|
|
659
|
+
function ot({ items: t, basePath: n = "", evaluateVisibility: i = je, checkPermission: a = Me, checkCapability: o = Ne, checkDocTarget: s, onAction: c, searchQuery: l, enablePinning: u, onPinToggle: d, renderItemAction: f, extraFavorites: p, pinnedOrder: m, onPinnedReorder: h, resolveTargetLabel: g, locale: b, t: x, templateContext: S }) {
|
|
660
|
+
let w = z(), T = r(() => Je(t, w.pathname, w.search, n, S)?.id ?? null, [
|
|
602
661
|
t,
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
e,
|
|
606
|
-
c,
|
|
607
|
-
h,
|
|
608
|
-
p,
|
|
609
|
-
m
|
|
610
|
-
]), w = r(() => Ze(S, {
|
|
611
|
-
evaluateVisibility: n,
|
|
612
|
-
checkPermission: i,
|
|
613
|
-
checkCapability: a,
|
|
614
|
-
checkDocTarget: o
|
|
615
|
-
}), [
|
|
616
|
-
S,
|
|
662
|
+
w.pathname,
|
|
663
|
+
w.search,
|
|
617
664
|
n,
|
|
665
|
+
S
|
|
666
|
+
]), E = r(() => l ? Xe(t, l, (e) => Y(e, x, g, b)) : t, [
|
|
667
|
+
t,
|
|
668
|
+
l,
|
|
669
|
+
x,
|
|
670
|
+
g,
|
|
671
|
+
b
|
|
672
|
+
]), D = r(() => st(ct(E, {
|
|
673
|
+
evaluateVisibility: i,
|
|
674
|
+
checkPermission: a,
|
|
675
|
+
checkCapability: o,
|
|
676
|
+
checkDocTarget: s
|
|
677
|
+
}), m), [
|
|
678
|
+
E,
|
|
618
679
|
i,
|
|
619
680
|
a,
|
|
620
|
-
o
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
}), /* @__PURE__ */ F(v, { children: /* @__PURE__ */ F(C, { children: w.map((e) => /* @__PURE__ */ F($, {
|
|
681
|
+
o,
|
|
682
|
+
s,
|
|
683
|
+
m
|
|
684
|
+
]), O = E.slice().sort(we), k = {
|
|
685
|
+
basePath: n,
|
|
686
|
+
evalVis: i,
|
|
687
|
+
checkPerm: a,
|
|
688
|
+
checkCap: o,
|
|
689
|
+
checkDocTarget: s,
|
|
690
|
+
onAction: c,
|
|
691
|
+
enablePinning: u,
|
|
692
|
+
onPinToggle: d,
|
|
693
|
+
renderItemAction: f,
|
|
694
|
+
resolveTargetLabel: g,
|
|
695
|
+
locale: b,
|
|
696
|
+
t: x,
|
|
697
|
+
templateContext: S
|
|
698
|
+
}, A = O.some((e) => e.type === "group"), M = !!u && D.length > 0, N = e.Children.toArray(p).length > 0, P = M || N ? /* @__PURE__ */ I(_, { children: [/* @__PURE__ */ I(y, {
|
|
699
|
+
className: j("flex items-center gap-1.5", Te, Ee),
|
|
700
|
+
children: [/* @__PURE__ */ F(H, { className: "h-3.5 w-3.5" }), x ? x("console.nav.favorites", { defaultValue: "Favorites" }) : "Favorites"]
|
|
701
|
+
}), /* @__PURE__ */ I(v, { children: [M && (h ? /* @__PURE__ */ F(nt, {
|
|
702
|
+
items: D,
|
|
703
|
+
onReorder: h,
|
|
704
|
+
rowProps: k
|
|
705
|
+
}) : /* @__PURE__ */ F(C, { children: D.map((e) => /* @__PURE__ */ F($, {
|
|
646
706
|
item: e,
|
|
647
|
-
...
|
|
648
|
-
}, `fav-${e.id}`)) })
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
items: e,
|
|
656
|
-
strategy: he,
|
|
657
|
-
children: /* @__PURE__ */ F(C, { children: T.map((e) => /* @__PURE__ */ F(Ye, {
|
|
658
|
-
item: e,
|
|
659
|
-
enableReorder: d,
|
|
660
|
-
...O
|
|
661
|
-
}, e.id)) })
|
|
662
|
-
})
|
|
663
|
-
}) : /* @__PURE__ */ F(C, { children: T.map((e) => /* @__PURE__ */ F($, {
|
|
707
|
+
...k
|
|
708
|
+
}, `fav-${e.id}`)) })), N && /* @__PURE__ */ F(C, {
|
|
709
|
+
className: j(M && "mt-1"),
|
|
710
|
+
children: p
|
|
711
|
+
})] })] }) : null;
|
|
712
|
+
if (!A) return /* @__PURE__ */ I(Ye.Provider, {
|
|
713
|
+
value: T,
|
|
714
|
+
children: [P, /* @__PURE__ */ F(_, { children: /* @__PURE__ */ F(v, { children: /* @__PURE__ */ F(C, { children: O.map((e) => /* @__PURE__ */ F($, {
|
|
664
715
|
item: e,
|
|
665
|
-
...
|
|
666
|
-
}, e.id)) })
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
let j = [], M = [], N = (e) => {
|
|
673
|
-
if (M.length === 0) return;
|
|
674
|
-
let t = M;
|
|
675
|
-
M = [], j.push(/* @__PURE__ */ F(_, { children: /* @__PURE__ */ F(v, { children: /* @__PURE__ */ F(C, { children: t.map((e) => /* @__PURE__ */ F($, {
|
|
716
|
+
...k
|
|
717
|
+
}, e.id)) }) }) })]
|
|
718
|
+
});
|
|
719
|
+
let L = [], R = [], B = (e) => {
|
|
720
|
+
if (R.length === 0) return;
|
|
721
|
+
let t = R;
|
|
722
|
+
R = [], L.push(/* @__PURE__ */ F(_, { children: /* @__PURE__ */ F(v, { children: /* @__PURE__ */ F(C, { children: t.map((e) => /* @__PURE__ */ F($, {
|
|
676
723
|
item: e,
|
|
677
|
-
...
|
|
724
|
+
...k
|
|
678
725
|
}, e.id)) }) }) }, e));
|
|
679
726
|
};
|
|
680
|
-
return
|
|
681
|
-
e.type === "group" ? (
|
|
727
|
+
return O.forEach((e, t) => {
|
|
728
|
+
e.type === "group" ? (B(`leaf-${t}`), L.push(/* @__PURE__ */ F($, {
|
|
682
729
|
item: e,
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
730
|
+
inList: !1,
|
|
731
|
+
...k
|
|
732
|
+
}, e.id))) : R.push(e);
|
|
733
|
+
}), B("leaf-end"), /* @__PURE__ */ I(Ye.Provider, {
|
|
734
|
+
value: T,
|
|
735
|
+
children: [P, L]
|
|
688
736
|
});
|
|
689
737
|
}
|
|
690
|
-
function
|
|
738
|
+
function st(e, t) {
|
|
739
|
+
let n = [], r = /* @__PURE__ */ new Set();
|
|
740
|
+
for (let t of e) r.has(t.id) || (r.add(t.id), n.push(t));
|
|
741
|
+
if (!t?.length) return n;
|
|
742
|
+
let i = new Map(t.map((e, t) => [e, t]));
|
|
743
|
+
return n.map((e, n) => ({
|
|
744
|
+
item: e,
|
|
745
|
+
key: i.get(e.id) ?? t.length + n
|
|
746
|
+
})).sort((e, t) => e.key - t.key).map(({ item: e }) => e);
|
|
747
|
+
}
|
|
748
|
+
function ct(e, t) {
|
|
691
749
|
let n = [];
|
|
692
|
-
for (let r of e)
|
|
750
|
+
for (let r of e) Pe(r, t) && (r.type !== "group" && r.type !== "separator" && r.pinned && n.push(r), r.children?.length && n.push(...ct(r.children, t)));
|
|
693
751
|
return n;
|
|
694
752
|
}
|
|
695
753
|
//#endregion
|
|
696
754
|
//#region src/AppSchemaRenderer.tsx
|
|
697
|
-
|
|
698
|
-
|
|
755
|
+
var lt = "group-data-[state=collapsed]:group-data-[collapsible=icon]:invisible group-data-[state=collapsed]:group-data-[collapsible=icon]:transition-[margin,opacity,visibility]";
|
|
756
|
+
function ut(e) {
|
|
757
|
+
return U(e, void 0) ?? "";
|
|
699
758
|
}
|
|
700
|
-
function
|
|
759
|
+
function dt({ areas: e, activeAreaId: t, onAreaChange: n }) {
|
|
701
760
|
return e.length <= 1 ? null : /* @__PURE__ */ I(_, { children: [/* @__PURE__ */ I(y, {
|
|
702
|
-
className:
|
|
703
|
-
children: [/* @__PURE__ */ F(
|
|
761
|
+
className: `flex items-center gap-1.5 ${lt}`,
|
|
762
|
+
children: [/* @__PURE__ */ F(V, { className: "h-3.5 w-3.5" }), "Area"]
|
|
704
763
|
}), /* @__PURE__ */ F(v, { children: /* @__PURE__ */ F(C, { children: e.map((e) => {
|
|
705
|
-
let r =
|
|
764
|
+
let r = J(e.icon), i = ut(e.label);
|
|
706
765
|
return /* @__PURE__ */ F(E, { children: /* @__PURE__ */ I(T, {
|
|
707
766
|
isActive: e.id === t,
|
|
708
767
|
tooltip: i,
|
|
@@ -711,24 +770,24 @@ function $e({ areas: e, activeAreaId: t, onAreaChange: n }) {
|
|
|
711
770
|
}) }, e.id);
|
|
712
771
|
}) }) })] });
|
|
713
772
|
}
|
|
714
|
-
function
|
|
773
|
+
function ft({ items: e, basePath: t, guards: n, onAction: r }) {
|
|
715
774
|
let i = z(), a = (e) => {
|
|
716
775
|
let t = [];
|
|
717
|
-
for (let r of e.slice().sort(
|
|
776
|
+
for (let r of e.slice().sort(we)) X([r], n) && r.type !== "separator" && (r.type === "group" ? t.push(...a(r.children || [])) : t.push(r));
|
|
718
777
|
return t;
|
|
719
778
|
}, s = a(e).slice(0, 5);
|
|
720
779
|
if (s.length === 0) return null;
|
|
721
|
-
let c =
|
|
780
|
+
let c = Je(e, i.pathname, i.search, t)?.id ?? null;
|
|
722
781
|
return /* @__PURE__ */ F("div", {
|
|
723
782
|
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",
|
|
724
783
|
role: "navigation",
|
|
725
784
|
"aria-label": "Mobile navigation",
|
|
726
785
|
children: s.map((e) => {
|
|
727
|
-
let n =
|
|
786
|
+
let n = J(e.icon), { href: i, external: a } = Q(e, t), s = `relative flex flex-col items-center gap-0.5 px-2 py-1.5 transition-colors min-w-[44px] min-h-[44px] justify-center ${e.id === c ? "text-primary" : "text-muted-foreground hover:text-foreground"}`, l = /* @__PURE__ */ I(P, { children: [
|
|
728
787
|
/* @__PURE__ */ F(n, { className: "h-5 w-5" }),
|
|
729
788
|
/* @__PURE__ */ F("span", {
|
|
730
789
|
className: "text-[10px] truncate max-w-[60px]",
|
|
731
|
-
children:
|
|
790
|
+
children: Y(e)
|
|
732
791
|
}),
|
|
733
792
|
e.badge != null && /* @__PURE__ */ F(o, {
|
|
734
793
|
variant: e.badgeVariant,
|
|
@@ -755,8 +814,8 @@ function et({ items: e, basePath: t, guards: n, onAction: r }) {
|
|
|
755
814
|
})
|
|
756
815
|
});
|
|
757
816
|
}
|
|
758
|
-
function
|
|
759
|
-
let
|
|
817
|
+
function pt({ schema: e, basePath: t, evalVis: n, checkPerm: r, checkCap: a, checkDocTarget: o, onAction: s, sidebarHeader: c, sidebarFooter: l, sidebarExtra: u, visibleAreas: d, activeAreaId: f, setActiveAreaId: p, resolvedNavigation: _, enableSearch: v, enablePinning: y, onPinToggle: S }) {
|
|
818
|
+
let w = e.branding?.logo, D = J(e.icon), [O, k] = i("");
|
|
760
819
|
return /* @__PURE__ */ I(m, {
|
|
761
820
|
collapsible: "icon",
|
|
762
821
|
children: [
|
|
@@ -765,11 +824,11 @@ function tt({ schema: e, basePath: t, evalVis: n, checkPerm: r, checkCap: a, che
|
|
|
765
824
|
tooltip: e.title ?? e.name,
|
|
766
825
|
children: [/* @__PURE__ */ F("div", {
|
|
767
826
|
className: "flex aspect-square size-8 items-center justify-center rounded-lg bg-primary text-primary-foreground",
|
|
768
|
-
children:
|
|
769
|
-
src:
|
|
827
|
+
children: w ? /* @__PURE__ */ F("img", {
|
|
828
|
+
src: w,
|
|
770
829
|
alt: e.title ?? "",
|
|
771
830
|
className: "size-6 object-contain"
|
|
772
|
-
}) : /* @__PURE__ */ F(
|
|
831
|
+
}) : /* @__PURE__ */ F(D, { className: "size-4" })
|
|
773
832
|
}), /* @__PURE__ */ I("div", {
|
|
774
833
|
className: "grid flex-1 text-left text-sm leading-tight",
|
|
775
834
|
children: [/* @__PURE__ */ F("span", {
|
|
@@ -782,17 +841,17 @@ function tt({ schema: e, basePath: t, evalVis: n, checkPerm: r, checkCap: a, che
|
|
|
782
841
|
})]
|
|
783
842
|
}) }) }), v && /* @__PURE__ */ F(x, {
|
|
784
843
|
placeholder: "Search navigation…",
|
|
785
|
-
value:
|
|
786
|
-
onChange: (e) =>
|
|
844
|
+
value: O,
|
|
845
|
+
onChange: (e) => k(e.target.value),
|
|
787
846
|
"aria-label": "Search navigation"
|
|
788
847
|
})] }),
|
|
789
848
|
/* @__PURE__ */ I(h, { children: [
|
|
790
|
-
d.length > 1 && f && /* @__PURE__ */ F(
|
|
849
|
+
d.length > 1 && f && /* @__PURE__ */ F(dt, {
|
|
791
850
|
areas: d,
|
|
792
851
|
activeAreaId: f,
|
|
793
852
|
onAreaChange: p
|
|
794
853
|
}),
|
|
795
|
-
/* @__PURE__ */ F(
|
|
854
|
+
/* @__PURE__ */ F(ot, {
|
|
796
855
|
items: _,
|
|
797
856
|
basePath: t,
|
|
798
857
|
evaluateVisibility: n,
|
|
@@ -800,11 +859,9 @@ function tt({ schema: e, basePath: t, evalVis: n, checkPerm: r, checkCap: a, che
|
|
|
800
859
|
checkCapability: a,
|
|
801
860
|
checkDocTarget: o,
|
|
802
861
|
onAction: s,
|
|
803
|
-
searchQuery:
|
|
862
|
+
searchQuery: O,
|
|
804
863
|
enablePinning: y,
|
|
805
|
-
onPinToggle: S
|
|
806
|
-
enableReorder: w,
|
|
807
|
-
onReorder: D
|
|
864
|
+
onPinToggle: S
|
|
808
865
|
}),
|
|
809
866
|
u
|
|
810
867
|
] }),
|
|
@@ -812,74 +869,72 @@ function tt({ schema: e, basePath: t, evalVis: n, checkPerm: r, checkCap: a, che
|
|
|
812
869
|
]
|
|
813
870
|
});
|
|
814
871
|
}
|
|
815
|
-
function
|
|
816
|
-
let
|
|
817
|
-
evaluateVisibility:
|
|
818
|
-
checkPermission:
|
|
819
|
-
checkCapability:
|
|
872
|
+
function mt({ schema: e, basePath: t = "", mobileNavMode: a = "drawer", evaluateVisibility: o, checkPermission: s, checkCapability: c, checkDocTarget: l, onAction: u, navbar: d, sidebarHeader: f, sidebarFooter: p, sidebarExtra: m, children: h, className: g, defaultOpen: _ = !0, enableSearch: v, enablePinning: y, onPinToggle: b }) {
|
|
873
|
+
let x = o ?? ((e) => e !== !1 && e !== "false"), S = s ?? (() => !0), C = c ?? (() => !0), w = r(() => (e.menu ?? []).map((e, t) => ae(e, t)), [e.menu]), T = e.navigation ?? w, E = {
|
|
874
|
+
evaluateVisibility: x,
|
|
875
|
+
checkPermission: S,
|
|
876
|
+
checkCapability: C,
|
|
820
877
|
checkDocTarget: l,
|
|
821
878
|
hasActionHandler: !!u
|
|
822
|
-
},
|
|
879
|
+
}, D = (e.areas ?? []).filter((e) => X(e.navigation, E)), [O, k] = i(() => D.length > 0 ? D[0].id : null), A = D.map((e) => e.id).join(",");
|
|
823
880
|
n(() => {
|
|
824
|
-
|
|
825
|
-
}, [e.name,
|
|
826
|
-
let
|
|
881
|
+
D.length > 0 ? k((e) => D.some((t) => t.id === e) ? e : D[0].id) : k(null);
|
|
882
|
+
}, [e.name, A]);
|
|
883
|
+
let j = D.find((e) => e.id === O) ?? D[0], M = j?.navigation ?? T, N = {
|
|
827
884
|
title: e.title,
|
|
828
885
|
favicon: e.branding?.favicon
|
|
829
|
-
},
|
|
886
|
+
}, L = /* @__PURE__ */ F(pt, {
|
|
830
887
|
schema: e,
|
|
831
888
|
basePath: t,
|
|
832
|
-
evalVis:
|
|
833
|
-
checkPerm:
|
|
834
|
-
checkCap:
|
|
889
|
+
evalVis: x,
|
|
890
|
+
checkPerm: S,
|
|
891
|
+
checkCap: C,
|
|
835
892
|
checkDocTarget: l,
|
|
836
893
|
onAction: u,
|
|
837
894
|
sidebarHeader: f,
|
|
838
895
|
sidebarFooter: p,
|
|
839
896
|
sidebarExtra: m,
|
|
840
|
-
visibleAreas:
|
|
841
|
-
activeAreaId:
|
|
842
|
-
setActiveAreaId:
|
|
843
|
-
resolvedNavigation:
|
|
897
|
+
visibleAreas: D,
|
|
898
|
+
activeAreaId: j?.id ?? null,
|
|
899
|
+
setActiveAreaId: k,
|
|
900
|
+
resolvedNavigation: M,
|
|
844
901
|
enableSearch: v,
|
|
845
902
|
enablePinning: y,
|
|
846
|
-
onPinToggle: b
|
|
847
|
-
enableReorder: x,
|
|
848
|
-
onReorder: S
|
|
903
|
+
onPinToggle: b
|
|
849
904
|
});
|
|
850
|
-
return /* @__PURE__ */ I(P, { children: [/* @__PURE__ */ F(
|
|
851
|
-
sidebar:
|
|
905
|
+
return /* @__PURE__ */ I(P, { children: [/* @__PURE__ */ F(Ce, {
|
|
906
|
+
sidebar: L,
|
|
852
907
|
navbar: d,
|
|
853
908
|
className: g,
|
|
854
909
|
defaultOpen: _,
|
|
855
|
-
branding:
|
|
910
|
+
branding: N,
|
|
856
911
|
children: h
|
|
857
|
-
}), a === "bottom_nav" && /* @__PURE__ */ F(
|
|
858
|
-
items:
|
|
912
|
+
}), a === "bottom_nav" && /* @__PURE__ */ F(ft, {
|
|
913
|
+
items: M,
|
|
859
914
|
basePath: t,
|
|
860
|
-
guards:
|
|
915
|
+
guards: E,
|
|
861
916
|
onAction: u
|
|
862
917
|
})] });
|
|
863
918
|
}
|
|
864
919
|
//#endregion
|
|
865
920
|
//#region src/PageHeader.tsx
|
|
866
|
-
var
|
|
921
|
+
var ht = (e) => {
|
|
867
922
|
let t = e?.name ?? e?.full_name ?? e?.display_name ?? e?.label ?? e?.title ?? e?.subject;
|
|
868
923
|
return t != null && String(t).trim() ? String(t) : [
|
|
869
924
|
e?.salutation,
|
|
870
925
|
e?.first_name,
|
|
871
926
|
e?.last_name
|
|
872
927
|
].filter((e) => typeof e == "string" && e.trim()).map((e) => e.trim()).join(" ") || (typeof e?.email == "string" && e.email.trim() ? e.email.trim() : null);
|
|
873
|
-
},
|
|
928
|
+
}, gt = (e, t) => !e || typeof e != "string" ? e ?? "" : e.includes("{") ? e.replace(/\{([a-zA-Z0-9_.]+)\}/g, (e, n) => {
|
|
874
929
|
let r = n.split(".").reduce((e, t) => e == null ? e : e[t], t);
|
|
875
|
-
return r == null ? "" : typeof r == "object" ?
|
|
930
|
+
return r == null ? "" : typeof r == "object" ? ht(r) ?? "" : String(r);
|
|
876
931
|
}).replace(/\s*[-–—|/·,:]\s*(?=\s*[-–—|/·,:]|$)/g, "").replace(/^\s*[-–—|/·,:]\s*/, "").replace(/\s+/g, " ").trim() : e;
|
|
877
|
-
function
|
|
878
|
-
let p =
|
|
932
|
+
function _t({ title: t, subtitle: n, icon: r, action: i, actions: a, showBack: o, schema: c, className: l, children: u, ...d }) {
|
|
933
|
+
let p = ge(), m = typeof t == "string" && /\{[a-zA-Z0-9_.]+\}/.test(t), h = gt(t, p?.data) || (m ? "" : t), g = n, _ = typeof g == "string" && /\{[a-zA-Z0-9_.]+\}/.test(g), v = gt(g, p?.data) || (_ ? "" : g), y = !!p?.recordId, b = !!p?.embedded, x = o ?? (y && !b), S = e.useCallback(() => {
|
|
879
934
|
if (typeof window > "u") return;
|
|
880
935
|
let e = window.location.pathname, t = e.replace(/\/record\/[^/]+\/?$/, "");
|
|
881
936
|
t === e ? window.history.length > 1 && window.history.back() : (window.history.pushState({}, "", t + window.location.search), window.dispatchEvent(new PopStateEvent("popstate")));
|
|
882
|
-
}, []), C = Array.isArray(c?.children) ? c.children.filter(Boolean).map((e, t) => /* @__PURE__ */ F(
|
|
937
|
+
}, []), C = Array.isArray(c?.children) ? c.children.filter(Boolean).map((e, t) => /* @__PURE__ */ F(me, { schema: e }, e?.id || `pgh-child-${t}`)) : null, w = Array.isArray(a) && a.length > 0 && a || Array.isArray(c?.actions) && c.actions.length > 0 && c.actions || Array.isArray(c?.properties?.actions) && c.properties.actions.length > 0 && c.properties.actions || null, T = i || u || (w ? /* @__PURE__ */ F(me, { schema: {
|
|
883
938
|
type: "record:quick_actions",
|
|
884
939
|
properties: {
|
|
885
940
|
actions: w,
|
|
@@ -901,7 +956,7 @@ function at({ title: t, subtitle: n, icon: r, action: i, actions: a, showBack: o
|
|
|
901
956
|
onClick: S,
|
|
902
957
|
"aria-label": "Back to list",
|
|
903
958
|
className: "flex-shrink-0 -ml-2",
|
|
904
|
-
children: /* @__PURE__ */ F(
|
|
959
|
+
children: /* @__PURE__ */ F(B, { className: "size-4" })
|
|
905
960
|
}),
|
|
906
961
|
r && (h || v) && /* @__PURE__ */ F("div", {
|
|
907
962
|
className: "flex-shrink-0 grid place-items-center size-10 rounded-md bg-primary/10 text-primary",
|
|
@@ -930,10 +985,11 @@ function at({ title: t, subtitle: n, icon: r, action: i, actions: a, showBack: o
|
|
|
930
985
|
}
|
|
931
986
|
//#endregion
|
|
932
987
|
//#region src/SidebarNav.tsx
|
|
933
|
-
|
|
988
|
+
var vt = "group-data-[state=collapsed]:group-data-[collapsible=icon]:invisible group-data-[state=collapsed]:group-data-[collapsible=icon]:transition-[margin,opacity,visibility]";
|
|
989
|
+
function yt(e) {
|
|
934
990
|
return "items" in e && !("href" in e);
|
|
935
991
|
}
|
|
936
|
-
function
|
|
992
|
+
function bt({ item: e, pathname: t }) {
|
|
937
993
|
return e.children && e.children.length > 0 ? /* @__PURE__ */ F(c, {
|
|
938
994
|
asChild: !0,
|
|
939
995
|
defaultOpen: !0,
|
|
@@ -951,7 +1007,7 @@ function st({ item: e, pathname: t }) {
|
|
|
951
1007
|
className: "ml-auto mr-1 h-5 min-w-5 px-1 text-xs",
|
|
952
1008
|
children: e.badge
|
|
953
1009
|
}),
|
|
954
|
-
/* @__PURE__ */ F(
|
|
1010
|
+
/* @__PURE__ */ F(ee, { className: "ml-auto h-4 w-4 transition-transform duration-200 group-data-[state=open]/collapsible:rotate-90" })
|
|
955
1011
|
]
|
|
956
1012
|
})
|
|
957
1013
|
}), /* @__PURE__ */ F(l, {
|
|
@@ -993,8 +1049,8 @@ function st({ item: e, pathname: t }) {
|
|
|
993
1049
|
})
|
|
994
1050
|
}) });
|
|
995
1051
|
}
|
|
996
|
-
function
|
|
997
|
-
let s = z(), [c, l] = e.useState(""), u = e.useMemo(() => t.length === 0 ? [] :
|
|
1052
|
+
function xt({ items: t, title: n = "Application", className: r, collapsible: i = "icon", searchEnabled: a = !1, searchPlaceholder: o = "Search…" }) {
|
|
1053
|
+
let s = z(), [c, l] = e.useState(""), u = e.useMemo(() => t.length === 0 ? [] : yt(t[0]) ? t.map((e) => ({
|
|
998
1054
|
groupLabel: e.label,
|
|
999
1055
|
items: e.items
|
|
1000
1056
|
})) : [{ items: t }], [t]), f = e.useMemo(() => {
|
|
@@ -1012,7 +1068,7 @@ function ct({ items: t, title: n = "Application", className: r, collapsible: i =
|
|
|
1012
1068
|
className: "px-3 py-2",
|
|
1013
1069
|
children: /* @__PURE__ */ I("div", {
|
|
1014
1070
|
className: "relative",
|
|
1015
|
-
children: [/* @__PURE__ */ F(
|
|
1071
|
+
children: [/* @__PURE__ */ F(ie, { className: "absolute left-2.5 top-2.5 h-4 w-4 text-muted-foreground" }), /* @__PURE__ */ F(d, {
|
|
1016
1072
|
type: "search",
|
|
1017
1073
|
placeholder: o,
|
|
1018
1074
|
value: c,
|
|
@@ -1026,10 +1082,10 @@ function ct({ items: t, title: n = "Application", className: r, collapsible: i =
|
|
|
1026
1082
|
"aria-hidden": !0
|
|
1027
1083
|
}),
|
|
1028
1084
|
/* @__PURE__ */ F(y, {
|
|
1029
|
-
className:
|
|
1085
|
+
className: `text-[10px] font-semibold uppercase tracking-wider text-sidebar-foreground/60 ${vt}`,
|
|
1030
1086
|
children: e.groupLabel || n
|
|
1031
1087
|
}),
|
|
1032
|
-
/* @__PURE__ */ F(v, { children: /* @__PURE__ */ F(C, { children: e.items.map((e) => /* @__PURE__ */ F(
|
|
1088
|
+
/* @__PURE__ */ F(v, { children: /* @__PURE__ */ F(C, { children: e.items.map((e) => /* @__PURE__ */ F(bt, {
|
|
1033
1089
|
item: e,
|
|
1034
1090
|
pathname: s.pathname
|
|
1035
1091
|
}, e.href)) }) })
|
|
@@ -1038,7 +1094,7 @@ function ct({ items: t, title: n = "Application", className: r, collapsible: i =
|
|
|
1038
1094
|
}
|
|
1039
1095
|
//#endregion
|
|
1040
1096
|
//#region src/ResponsiveGrid.tsx
|
|
1041
|
-
var
|
|
1097
|
+
var St = {
|
|
1042
1098
|
xs: {
|
|
1043
1099
|
1: "grid-cols-1",
|
|
1044
1100
|
2: "grid-cols-2",
|
|
@@ -1088,11 +1144,11 @@ var lt = {
|
|
|
1088
1144
|
12: "2xl:grid-cols-12"
|
|
1089
1145
|
}
|
|
1090
1146
|
};
|
|
1091
|
-
function
|
|
1147
|
+
function Ct(e) {
|
|
1092
1148
|
if (!e) return "grid-cols-1";
|
|
1093
1149
|
let t = [];
|
|
1094
1150
|
for (let [n, r] of Object.entries(e)) {
|
|
1095
|
-
let e =
|
|
1151
|
+
let e = St[n];
|
|
1096
1152
|
if (e && r) {
|
|
1097
1153
|
let n = Object.keys(e).map(Number).reduce((e, t) => Math.abs(t - r) < Math.abs(e - r) ? t : e);
|
|
1098
1154
|
t.push(e[n]);
|
|
@@ -1100,7 +1156,7 @@ function ut(e) {
|
|
|
1100
1156
|
}
|
|
1101
1157
|
return t.join(" ") || "grid-cols-1";
|
|
1102
1158
|
}
|
|
1103
|
-
var
|
|
1159
|
+
var wt = {
|
|
1104
1160
|
0: "gap-0",
|
|
1105
1161
|
1: "gap-1",
|
|
1106
1162
|
2: "gap-2",
|
|
@@ -1109,25 +1165,25 @@ var dt = {
|
|
|
1109
1165
|
5: "gap-5",
|
|
1110
1166
|
6: "gap-6",
|
|
1111
1167
|
8: "gap-8"
|
|
1112
|
-
},
|
|
1113
|
-
let i =
|
|
1168
|
+
}, Tt = ({ columns: e, gap: t = 4, className: n, children: r }) => {
|
|
1169
|
+
let i = Ct(e), a = typeof t == "number" ? wt[t] || `gap-${t}` : "";
|
|
1114
1170
|
return /* @__PURE__ */ F("div", {
|
|
1115
1171
|
className: j("grid", i, a, n),
|
|
1116
1172
|
children: r
|
|
1117
1173
|
});
|
|
1118
|
-
},
|
|
1174
|
+
}, Et = { type: "app" }, Dt = ({ schema: e, children: n, ...r }) => t(mt, {
|
|
1119
1175
|
...r,
|
|
1120
|
-
schema: e?.schema ??
|
|
1176
|
+
schema: e?.schema ?? Et,
|
|
1121
1177
|
children: n
|
|
1122
1178
|
});
|
|
1123
|
-
function
|
|
1124
|
-
a.register("page:card",
|
|
1179
|
+
function Ot() {
|
|
1180
|
+
a.register("page:card", _e, {
|
|
1125
1181
|
namespace: "layout",
|
|
1126
1182
|
skipFallback: !0,
|
|
1127
1183
|
label: "Page Card",
|
|
1128
1184
|
category: "Layout",
|
|
1129
1185
|
isContainer: !0
|
|
1130
|
-
}), a.register("app-schema-renderer",
|
|
1186
|
+
}), a.register("app-schema-renderer", Dt, {
|
|
1131
1187
|
namespace: "layout",
|
|
1132
1188
|
label: "App Schema Renderer",
|
|
1133
1189
|
category: "Layout",
|
|
@@ -1151,7 +1207,7 @@ function ht() {
|
|
|
1151
1207
|
});
|
|
1152
1208
|
}
|
|
1153
1209
|
try {
|
|
1154
|
-
|
|
1210
|
+
Ot();
|
|
1155
1211
|
} catch {}
|
|
1156
1212
|
//#endregion
|
|
1157
|
-
export {
|
|
1213
|
+
export { mt as AppSchemaRenderer, Ce as AppShell, Ie as NAV_RUN_ACTION_PARAM, ot as NavigationRenderer, _e as PageCard, _t as PageHeader, Tt as ResponsiveGrid, xt as SidebarNav, Xe as filterNavigationItems, X as hasVisibleNavigationItems, Ot as registerLayout, Je as resolveActiveNavItem, Q as resolveHref, J as resolveIcon, De as resolveLabel, Y as resolveNavItemLabel, Se as useAppShellBranding };
|