@object-ui/components 4.7.0 → 4.8.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/dist/index.js
CHANGED
|
@@ -6,9 +6,9 @@ import * as m from "react";
|
|
|
6
6
|
import h, { forwardRef as g, useCallback as _, useEffect as v, useMemo as y, useRef as b, useState as x, useSyncExternalStore as S } from "react";
|
|
7
7
|
import { Fragment as C, jsx as w, jsxs as T } from "react/jsx-runtime";
|
|
8
8
|
import * as E from "@radix-ui/react-accordion";
|
|
9
|
-
import { AlertCircle as D, ArrowDown as O, ArrowLeft as k, ArrowRight as A, ArrowUp as ee, Box as te, CalendarIcon as j, Check as ne, CheckCircle2 as re, ChevronDown as M, ChevronDownIcon as ie, ChevronLeft as ae, ChevronLeftIcon as oe, ChevronRight as se, ChevronRightIcon as ce, ChevronUp as le, ChevronsLeft as ue, ChevronsRight as de, ChevronsUpDown as fe, Circle as pe, CircleCheck as me, Database as he, Dot as ge, Download as _e, Edit as ve, File as ye, FileQuestion as be, Folder as xe, FolderOpen as Se, GripVertical as Ce, InboxIcon as we, Info as N, Loader2 as P, LoaderCircle as Te, Maximize2 as Ee, Minus as De, MoreHorizontal as Oe, OctagonX as ke, PanelLeft as Ae, Plus as je, Redo2 as Me, Rocket as Ne, RotateCcw as Pe, Save as Fe, Search as Ie, Settings as Le, Trash2 as Re, TrendingDown as ze, TrendingUp as Be, TriangleAlert as Ve, Undo2 as He, Upload as Ue, X as
|
|
10
|
-
import * as
|
|
11
|
-
import { Slot as
|
|
9
|
+
import { AlertCircle as D, ArrowDown as O, ArrowLeft as k, ArrowRight as A, ArrowUp as ee, Box as te, CalendarIcon as j, Check as ne, CheckCircle2 as re, ChevronDown as M, ChevronDownIcon as ie, ChevronLeft as ae, ChevronLeftIcon as oe, ChevronRight as se, ChevronRightIcon as ce, ChevronUp as le, ChevronsLeft as ue, ChevronsRight as de, ChevronsUpDown as fe, Circle as pe, CircleCheck as me, Database as he, Dot as ge, Download as _e, Edit as ve, File as ye, FileQuestion as be, Folder as xe, FolderOpen as Se, GripVertical as Ce, InboxIcon as we, Info as N, Loader2 as P, LoaderCircle as Te, Maximize2 as Ee, Minus as De, MoreHorizontal as Oe, OctagonX as ke, PanelLeft as Ae, Plus as je, Redo2 as Me, Rocket as Ne, RotateCcw as Pe, Save as Fe, Search as Ie, Settings as Le, Trash2 as Re, TrendingDown as ze, TrendingUp as Be, TriangleAlert as Ve, Undo2 as He, Upload as Ue, X as We, icons as Ge } from "lucide-react";
|
|
10
|
+
import * as F from "@radix-ui/react-alert-dialog";
|
|
11
|
+
import { Slot as I } from "@radix-ui/react-slot";
|
|
12
12
|
import { cva as Ke, cva as L } from "class-variance-authority";
|
|
13
13
|
import * as qe from "@radix-ui/react-aspect-ratio";
|
|
14
14
|
import * as Je from "@radix-ui/react-avatar";
|
|
@@ -180,7 +180,7 @@ var Lt = L("inline-flex items-center justify-center gap-2 whitespace-nowrap roun
|
|
|
180
180
|
variant: "default",
|
|
181
181
|
size: "default"
|
|
182
182
|
}
|
|
183
|
-
}), J = m.forwardRef(({ className: e, variant: t, size: n, asChild: r = !1, ...i }, a) => /* @__PURE__ */ w(r ?
|
|
183
|
+
}), J = m.forwardRef(({ className: e, variant: t, size: n, asChild: r = !1, ...i }, a) => /* @__PURE__ */ w(r ? I : "button", {
|
|
184
184
|
className: K(Lt({
|
|
185
185
|
variant: t,
|
|
186
186
|
size: n,
|
|
@@ -192,18 +192,18 @@ var Lt = L("inline-flex items-center justify-center gap-2 whitespace-nowrap roun
|
|
|
192
192
|
J.displayName = "Button";
|
|
193
193
|
//#endregion
|
|
194
194
|
//#region src/ui/alert-dialog.tsx
|
|
195
|
-
var Rt =
|
|
195
|
+
var Rt = F.Root, zt = F.Trigger, Bt = F.Portal, Vt = m.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ w(F.Overlay, {
|
|
196
196
|
className: K("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0", e),
|
|
197
197
|
...t,
|
|
198
198
|
ref: n
|
|
199
199
|
}));
|
|
200
|
-
Vt.displayName =
|
|
201
|
-
var Ht = m.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ T(Bt, { children: [/* @__PURE__ */ w(Vt, {}), /* @__PURE__ */ w(
|
|
200
|
+
Vt.displayName = F.Overlay.displayName;
|
|
201
|
+
var Ht = m.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ T(Bt, { children: [/* @__PURE__ */ w(Vt, {}), /* @__PURE__ */ w(F.Content, {
|
|
202
202
|
ref: n,
|
|
203
203
|
className: K("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg", e),
|
|
204
204
|
...t
|
|
205
205
|
})] }));
|
|
206
|
-
Ht.displayName =
|
|
206
|
+
Ht.displayName = F.Content.displayName;
|
|
207
207
|
var Ut = ({ className: e, ...t }) => /* @__PURE__ */ w("div", {
|
|
208
208
|
className: K("flex flex-col space-y-2 text-center sm:text-left", e),
|
|
209
209
|
...t
|
|
@@ -214,30 +214,30 @@ var Wt = ({ className: e, ...t }) => /* @__PURE__ */ w("div", {
|
|
|
214
214
|
...t
|
|
215
215
|
});
|
|
216
216
|
Wt.displayName = "AlertDialogFooter";
|
|
217
|
-
var Gt = m.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ w(
|
|
217
|
+
var Gt = m.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ w(F.Title, {
|
|
218
218
|
ref: n,
|
|
219
219
|
className: K("text-lg font-semibold", e),
|
|
220
220
|
...t
|
|
221
221
|
}));
|
|
222
|
-
Gt.displayName =
|
|
223
|
-
var Kt = m.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ w(
|
|
222
|
+
Gt.displayName = F.Title.displayName;
|
|
223
|
+
var Kt = m.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ w(F.Description, {
|
|
224
224
|
ref: n,
|
|
225
225
|
className: K("text-sm text-muted-foreground", e),
|
|
226
226
|
...t
|
|
227
227
|
}));
|
|
228
|
-
Kt.displayName =
|
|
229
|
-
var qt = m.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ w(
|
|
228
|
+
Kt.displayName = F.Description.displayName;
|
|
229
|
+
var qt = m.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ w(F.Action, {
|
|
230
230
|
ref: n,
|
|
231
231
|
className: K(Lt(), e),
|
|
232
232
|
...t
|
|
233
233
|
}));
|
|
234
|
-
qt.displayName =
|
|
235
|
-
var Jt = m.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ w(
|
|
234
|
+
qt.displayName = F.Action.displayName;
|
|
235
|
+
var Jt = m.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ w(F.Cancel, {
|
|
236
236
|
ref: n,
|
|
237
237
|
className: K(Lt({ variant: "outline" }), "mt-2 sm:mt-0", e),
|
|
238
238
|
...t
|
|
239
239
|
}));
|
|
240
|
-
Jt.displayName =
|
|
240
|
+
Jt.displayName = F.Cancel.displayName;
|
|
241
241
|
//#endregion
|
|
242
242
|
//#region src/ui/alert.tsx
|
|
243
243
|
var Yt = L("relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground", {
|
|
@@ -322,7 +322,7 @@ var cn = m.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ w("li", {
|
|
|
322
322
|
...t
|
|
323
323
|
}));
|
|
324
324
|
cn.displayName = "BreadcrumbItem";
|
|
325
|
-
var ln = m.forwardRef(({ asChild: e, className: t, ...n }, r) => /* @__PURE__ */ w(e ?
|
|
325
|
+
var ln = m.forwardRef(({ asChild: e, className: t, ...n }, r) => /* @__PURE__ */ w(e ? I : "a", {
|
|
326
326
|
ref: r,
|
|
327
327
|
className: K("transition-colors hover:text-foreground", t),
|
|
328
328
|
...n
|
|
@@ -731,7 +731,7 @@ var qn = m.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__ *
|
|
|
731
731
|
...n,
|
|
732
732
|
children: [t, /* @__PURE__ */ T(B.Close, {
|
|
733
733
|
className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",
|
|
734
|
-
children: [/* @__PURE__ */ w(
|
|
734
|
+
children: [/* @__PURE__ */ w(We, { className: "h-4 w-4" }), /* @__PURE__ */ w("span", {
|
|
735
735
|
className: "sr-only",
|
|
736
736
|
children: "Close"
|
|
737
737
|
})]
|
|
@@ -1045,7 +1045,7 @@ var ei = m.forwardRef(({ className: e, ...t }, n) => {
|
|
|
1045
1045
|
ei.displayName = "FormLabel";
|
|
1046
1046
|
var ti = m.forwardRef(({ ...e }, t) => {
|
|
1047
1047
|
let { error: n, formItemId: r, formDescriptionId: i, formMessageId: a } = Zr();
|
|
1048
|
-
return /* @__PURE__ */ w(
|
|
1048
|
+
return /* @__PURE__ */ w(I, {
|
|
1049
1049
|
ref: t,
|
|
1050
1050
|
id: r,
|
|
1051
1051
|
"aria-describedby": n ? `${i} ${a}` : `${i}`,
|
|
@@ -1503,7 +1503,7 @@ var ha = L("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out
|
|
|
1503
1503
|
...i,
|
|
1504
1504
|
children: [n, /* @__PURE__ */ T(B.Close, {
|
|
1505
1505
|
className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",
|
|
1506
|
-
children: [/* @__PURE__ */ w(
|
|
1506
|
+
children: [/* @__PURE__ */ w(We, { className: "h-4 w-4" }), /* @__PURE__ */ w("span", {
|
|
1507
1507
|
className: "sr-only",
|
|
1508
1508
|
children: "Close"
|
|
1509
1509
|
})]
|
|
@@ -1745,14 +1745,14 @@ var Ga = m.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ w("div", {
|
|
|
1745
1745
|
...t
|
|
1746
1746
|
}));
|
|
1747
1747
|
Ga.displayName = "SidebarGroup";
|
|
1748
|
-
var Ka = m.forwardRef(({ className: e, asChild: t = !1, ...n }, r) => /* @__PURE__ */ w(t ?
|
|
1748
|
+
var Ka = m.forwardRef(({ className: e, asChild: t = !1, ...n }, r) => /* @__PURE__ */ w(t ? I : "div", {
|
|
1749
1749
|
ref: r,
|
|
1750
1750
|
"data-sidebar": "group-label",
|
|
1751
1751
|
className: K("flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 outline-none ring-sidebar-ring transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0", "group-data-[state=collapsed]:group-data-[collapsible=icon]:-mt-8 group-data-[state=collapsed]:group-data-[collapsible=icon]:opacity-0", e),
|
|
1752
1752
|
...n
|
|
1753
1753
|
}));
|
|
1754
1754
|
Ka.displayName = "SidebarGroupLabel";
|
|
1755
|
-
var qa = m.forwardRef(({ className: e, asChild: t = !1, ...n }, r) => /* @__PURE__ */ w(t ?
|
|
1755
|
+
var qa = m.forwardRef(({ className: e, asChild: t = !1, ...n }, r) => /* @__PURE__ */ w(t ? I : "button", {
|
|
1756
1756
|
ref: r,
|
|
1757
1757
|
"data-sidebar": "group-action",
|
|
1758
1758
|
className: K("absolute right-3 top-3.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0", "after:absolute after:-inset-2 after:md:hidden", "group-data-[state=collapsed]:group-data-[collapsible=icon]:hidden", e),
|
|
@@ -1797,7 +1797,7 @@ var Za = L("peer/menu-button flex w-full items-center gap-2 overflow-hidden roun
|
|
|
1797
1797
|
size: "default"
|
|
1798
1798
|
}
|
|
1799
1799
|
}), Qa = m.forwardRef(({ asChild: e = !1, isActive: t = !1, variant: n = "default", size: r = "default", tooltip: i, className: a, ...o }, s) => {
|
|
1800
|
-
let c = e ?
|
|
1800
|
+
let c = e ? I : "button", { isMobile: l, state: u } = Pa(), d = /* @__PURE__ */ w(c, {
|
|
1801
1801
|
ref: s,
|
|
1802
1802
|
"data-sidebar": "menu-button",
|
|
1803
1803
|
"data-size": r,
|
|
@@ -1819,7 +1819,7 @@ var Za = L("peer/menu-button flex w-full items-center gap-2 overflow-hidden roun
|
|
|
1819
1819
|
})] })) : d;
|
|
1820
1820
|
});
|
|
1821
1821
|
Qa.displayName = "SidebarMenuButton";
|
|
1822
|
-
var $a = m.forwardRef(({ className: e, asChild: t = !1, showOnHover: n = !1, ...r }, i) => /* @__PURE__ */ w(t ?
|
|
1822
|
+
var $a = m.forwardRef(({ className: e, asChild: t = !1, showOnHover: n = !1, ...r }, i) => /* @__PURE__ */ w(t ? I : "button", {
|
|
1823
1823
|
ref: i,
|
|
1824
1824
|
"data-sidebar": "menu-action",
|
|
1825
1825
|
className: K("absolute right-1 top-1.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 peer-hover/menu-button:text-sidebar-accent-foreground [&>svg]:size-4 [&>svg]:shrink-0", "after:absolute after:-inset-2 after:md:hidden", "peer-data-[size=sm]/menu-button:top-1", "peer-data-[size=default]/menu-button:top-1.5", "peer-data-[size=lg]/menu-button:top-2.5", "group-data-[state=collapsed]:group-data-[collapsible=icon]:hidden", n && "group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 peer-data-[active=true]/menu-button:text-sidebar-accent-foreground md:opacity-0", e),
|
|
@@ -1863,7 +1863,7 @@ var ro = m.forwardRef(({ ...e }, t) => /* @__PURE__ */ w("li", {
|
|
|
1863
1863
|
...e
|
|
1864
1864
|
}));
|
|
1865
1865
|
ro.displayName = "SidebarMenuSubItem";
|
|
1866
|
-
var io = m.forwardRef(({ asChild: e = !1, size: t = "md", isActive: n, className: r, ...i }, a) => /* @__PURE__ */ w(e ?
|
|
1866
|
+
var io = m.forwardRef(({ asChild: e = !1, size: t = "md", isActive: n, className: r, ...i }, a) => /* @__PURE__ */ w(e ? I : "a", {
|
|
1867
1867
|
ref: a,
|
|
1868
1868
|
"data-sidebar": "menu-sub-button",
|
|
1869
1869
|
"data-size": t,
|
|
@@ -2205,7 +2205,7 @@ function Bo(e) {
|
|
|
2205
2205
|
return e.split("-").map((e) => e.charAt(0).toUpperCase() + e.slice(1)).join("");
|
|
2206
2206
|
}
|
|
2207
2207
|
var Vo = { Home: "House" }, Ho = g(({ schema: e, className: t, ...n }, r) => {
|
|
2208
|
-
let { "data-obj-id": i, "data-obj-type": a, style: o, ...s } = n, c = Bo(e.name), l = Vo[c] || c, u =
|
|
2208
|
+
let { "data-obj-id": i, "data-obj-type": a, style: o, ...s } = n, c = Bo(e.name), l = Vo[c] || c, u = Ge[l];
|
|
2209
2209
|
if (!u) return console.warn(`Icon "${e.name}" (lookup: "${c}"${l === c ? "" : ` -> "${l}"`}) not found in lucide-react`), null;
|
|
2210
2210
|
let d = e.size ? {
|
|
2211
2211
|
width: e.size,
|
|
@@ -2533,7 +2533,7 @@ function Go({ value: e, onChange: t, placeholder: n, className: r, label: i, ...
|
|
|
2533
2533
|
type: "button",
|
|
2534
2534
|
variant: "ghost",
|
|
2535
2535
|
onClick: () => s(!1),
|
|
2536
|
-
children: [/* @__PURE__ */ w(
|
|
2536
|
+
children: [/* @__PURE__ */ w(We, { className: "size-4 mr-1" }), " Cancel"]
|
|
2537
2537
|
}), /* @__PURE__ */ T(J, {
|
|
2538
2538
|
type: "button",
|
|
2539
2539
|
onClick: f,
|
|
@@ -2929,7 +2929,7 @@ var Jo = { Home: "House" }, Yo = g(({ schema: e, ...t }, n) => {
|
|
|
2929
2929
|
let { "data-obj-id": r, "data-obj-type": i, style: a, ...o } = t, s = null;
|
|
2930
2930
|
if (e.icon) {
|
|
2931
2931
|
let t = qo(e.icon);
|
|
2932
|
-
s =
|
|
2932
|
+
s = Ge[Jo[t] || t];
|
|
2933
2933
|
}
|
|
2934
2934
|
let c = e.loading || t.loading, l = e.disabled || t.disabled || c;
|
|
2935
2935
|
return /* @__PURE__ */ T(J, {
|
|
@@ -3843,7 +3843,7 @@ e.register("input", Xo, {
|
|
|
3843
3843
|
size: "sm",
|
|
3844
3844
|
className: "h-6 w-6 p-0 hover:bg-destructive/10 hover:text-destructive",
|
|
3845
3845
|
onClick: () => p(t),
|
|
3846
|
-
children: /* @__PURE__ */ w(
|
|
3846
|
+
children: /* @__PURE__ */ w(We, { className: "h-3 w-3" })
|
|
3847
3847
|
}),
|
|
3848
3848
|
/* @__PURE__ */ w("div", { className: "absolute inset-0 bg-gradient-to-r from-transparent via-primary/5 to-transparent -translate-x-full group-hover/file:animate-[shimmer_1s_infinite] pointer-events-none" })
|
|
3849
3849
|
]
|
|
@@ -3910,7 +3910,7 @@ function Qo({ className: e, orientation: t, ...n }) {
|
|
|
3910
3910
|
});
|
|
3911
3911
|
}
|
|
3912
3912
|
function $o({ className: e, asChild: t = !1, ...n }) {
|
|
3913
|
-
return /* @__PURE__ */ w(t ?
|
|
3913
|
+
return /* @__PURE__ */ w(t ? I : "div", {
|
|
3914
3914
|
className: K("bg-muted flex items-center gap-2 rounded-md border px-4 text-sm font-medium shadow-xs [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4", e),
|
|
3915
3915
|
...n
|
|
3916
3916
|
});
|
|
@@ -4281,7 +4281,7 @@ function _s({ fields: e = [], value: t, onChange: n, className: r, showClearAll:
|
|
|
4281
4281
|
size: "icon",
|
|
4282
4282
|
className: "h-9 w-9 shrink-0",
|
|
4283
4283
|
onClick: () => l(t.id),
|
|
4284
|
-
children: [/* @__PURE__ */ w(
|
|
4284
|
+
children: [/* @__PURE__ */ w(We, { className: "h-4 w-4" }), /* @__PURE__ */ w("span", {
|
|
4285
4285
|
className: "sr-only",
|
|
4286
4286
|
children: "Remove condition"
|
|
4287
4287
|
})]
|
|
@@ -4398,7 +4398,7 @@ function vs({ field: e, value: t, multiple: n, onChange: r }) {
|
|
|
4398
4398
|
children: b[C[0]] || C[0]
|
|
4399
4399
|
}), /* @__PURE__ */ T("span", {
|
|
4400
4400
|
className: "flex items-center gap-1 shrink-0",
|
|
4401
|
-
children: [C.length > 0 && /* @__PURE__ */ w(
|
|
4401
|
+
children: [C.length > 0 && /* @__PURE__ */ w(We, {
|
|
4402
4402
|
className: "h-3.5 w-3.5 opacity-60 hover:opacity-100",
|
|
4403
4403
|
onClick: (e) => {
|
|
4404
4404
|
e.stopPropagation(), r(n ? [] : "");
|
|
@@ -4543,7 +4543,7 @@ function ys({ fields: e = [], value: t = [], onChange: n, className: r }) {
|
|
|
4543
4543
|
size: "icon",
|
|
4544
4544
|
className: "h-9 w-9 shrink-0",
|
|
4545
4545
|
onClick: () => u(t.id),
|
|
4546
|
-
children: /* @__PURE__ */ w(
|
|
4546
|
+
children: /* @__PURE__ */ w(We, { className: "h-4 w-4" })
|
|
4547
4547
|
})
|
|
4548
4548
|
]
|
|
4549
4549
|
}, t.id))
|
|
@@ -4831,7 +4831,7 @@ function Ss({ open: e, onClose: t, schema: n, draft: r, isDirty: i, onFieldChang
|
|
|
4831
4831
|
className: "h-7 w-7 p-0",
|
|
4832
4832
|
"data-testid": "config-panel-close",
|
|
4833
4833
|
title: b,
|
|
4834
|
-
children: /* @__PURE__ */ w(
|
|
4834
|
+
children: /* @__PURE__ */ w(We, { className: "h-3.5 w-3.5" })
|
|
4835
4835
|
})
|
|
4836
4836
|
]
|
|
4837
4837
|
})]
|
|
@@ -5024,7 +5024,7 @@ var Ns = L("space-y-2"), Ps = m.forwardRef(({ className: e, label: t, descriptio
|
|
|
5024
5024
|
className: K(r && "text-destructive", i && "after:content-['*'] after:ml-0.5 after:text-destructive"),
|
|
5025
5025
|
children: t
|
|
5026
5026
|
}),
|
|
5027
|
-
/* @__PURE__ */ w(
|
|
5027
|
+
/* @__PURE__ */ w(I, {
|
|
5028
5028
|
id: u,
|
|
5029
5029
|
"aria-describedby": [n && d, r && f].filter(Boolean).join(" ") || void 0,
|
|
5030
5030
|
"aria-invalid": !!r,
|
|
@@ -5102,7 +5102,7 @@ var Rs = L("group/item flex items-center border border-transparent text-sm round
|
|
|
5102
5102
|
}
|
|
5103
5103
|
});
|
|
5104
5104
|
function zs({ className: e, variant: t = "default", size: n = "default", asChild: r = !1, ...i }) {
|
|
5105
|
-
return /* @__PURE__ */ w(r ?
|
|
5105
|
+
return /* @__PURE__ */ w(r ? I : "div", {
|
|
5106
5106
|
"data-slot": "item",
|
|
5107
5107
|
"data-variant": t,
|
|
5108
5108
|
"data-size": n,
|
|
@@ -5296,7 +5296,7 @@ var nc = ({ isOpen: e, selectedRecord: t, mode: n, close: r, setIsOpen: i, width
|
|
|
5296
5296
|
"aria-label": "Close",
|
|
5297
5297
|
title: "Close",
|
|
5298
5298
|
className: "inline-flex h-7 w-7 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-accent hover:text-foreground focus:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
5299
|
-
children: /* @__PURE__ */ w(
|
|
5299
|
+
children: /* @__PURE__ */ w(We, { className: "h-3.5 w-3.5" })
|
|
5300
5300
|
})
|
|
5301
5301
|
})]
|
|
5302
5302
|
})]
|
|
@@ -5526,7 +5526,7 @@ function ac({ value: e, onChange: t, fieldOptions: n, maxLevels: r = 3, classNam
|
|
|
5526
5526
|
onClick: () => {
|
|
5527
5527
|
l(s.filter((e, n) => n !== t));
|
|
5528
5528
|
},
|
|
5529
|
-
children: /* @__PURE__ */ w(
|
|
5529
|
+
children: /* @__PURE__ */ w(We, { className: "h-3 w-3" })
|
|
5530
5530
|
})
|
|
5531
5531
|
]
|
|
5532
5532
|
}, t)), s.length < r && (() => {
|
|
@@ -5857,8 +5857,36 @@ function fc({ variant: e, ...t }) {
|
|
|
5857
5857
|
}
|
|
5858
5858
|
}
|
|
5859
5859
|
//#endregion
|
|
5860
|
+
//#region src/custom/refresh-indicator.tsx
|
|
5861
|
+
var pc = !1;
|
|
5862
|
+
function mc() {
|
|
5863
|
+
if (pc || typeof document > "u") return;
|
|
5864
|
+
let e = "objui-refresh-indicator-kf";
|
|
5865
|
+
if (document.getElementById(e)) {
|
|
5866
|
+
pc = !0;
|
|
5867
|
+
return;
|
|
5868
|
+
}
|
|
5869
|
+
let t = document.createElement("style");
|
|
5870
|
+
t.id = e, t.textContent = "\n@keyframes objui-refresh-bar {\n 0% { transform: translateX(-100%); }\n 100% { transform: translateX(400%); }\n}\n", document.head.appendChild(t), pc = !0;
|
|
5871
|
+
}
|
|
5872
|
+
var hc = ({ active: e, ariaLabel: t = "Refreshing", className: n, ...r }) => (m.useEffect(() => {
|
|
5873
|
+
e && mc();
|
|
5874
|
+
}, [e]), e ? /* @__PURE__ */ w("div", {
|
|
5875
|
+
className: K("pointer-events-none absolute inset-x-0 top-0 z-20 h-0.5 overflow-hidden", n),
|
|
5876
|
+
role: "progressbar",
|
|
5877
|
+
"aria-busy": "true",
|
|
5878
|
+
"aria-label": t,
|
|
5879
|
+
"data-testid": "refresh-indicator",
|
|
5880
|
+
...r,
|
|
5881
|
+
children: /* @__PURE__ */ w("div", {
|
|
5882
|
+
className: "h-full w-1/4 rounded-full bg-primary/70",
|
|
5883
|
+
style: { animation: "objui-refresh-bar 1.1s ease-in-out infinite" }
|
|
5884
|
+
})
|
|
5885
|
+
}) : null);
|
|
5886
|
+
hc.displayName = "RefreshIndicator";
|
|
5887
|
+
//#endregion
|
|
5860
5888
|
//#region src/custom/view-states.tsx
|
|
5861
|
-
function
|
|
5889
|
+
function gc({ className: e, message: t = "Loading…", ...n }) {
|
|
5862
5890
|
return /* @__PURE__ */ T("div", {
|
|
5863
5891
|
role: "status",
|
|
5864
5892
|
"aria-label": t,
|
|
@@ -5871,7 +5899,7 @@ function pc({ className: e, message: t = "Loading…", ...n }) {
|
|
|
5871
5899
|
})]
|
|
5872
5900
|
});
|
|
5873
5901
|
}
|
|
5874
|
-
function
|
|
5902
|
+
function _c({ className: e, icon: t, title: n = "No data", description: r, action: i, children: a, ...o }) {
|
|
5875
5903
|
return /* @__PURE__ */ T("div", {
|
|
5876
5904
|
"data-slot": "data-empty-state",
|
|
5877
5905
|
className: K("flex flex-col items-center justify-center gap-3 p-6 text-center", e),
|
|
@@ -5894,7 +5922,7 @@ function mc({ className: e, icon: t, title: n = "No data", description: r, actio
|
|
|
5894
5922
|
]
|
|
5895
5923
|
});
|
|
5896
5924
|
}
|
|
5897
|
-
function
|
|
5925
|
+
function vc({ className: e, title: t = "Something went wrong", message: n, onRetry: r, retryLabel: i = "Retry", children: a, ...o }) {
|
|
5898
5926
|
return /* @__PURE__ */ T("div", {
|
|
5899
5927
|
role: "alert",
|
|
5900
5928
|
"data-slot": "data-error-state",
|
|
@@ -5925,25 +5953,25 @@ function hc({ className: e, title: t = "Something went wrong", message: n, onRet
|
|
|
5925
5953
|
}
|
|
5926
5954
|
//#endregion
|
|
5927
5955
|
//#region src/custom/mobile-dialog-content.tsx
|
|
5928
|
-
var
|
|
5956
|
+
var yc = m.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__ */ T(Wn, { children: [/* @__PURE__ */ w(Kn, {}), /* @__PURE__ */ T(B.Content, {
|
|
5929
5957
|
ref: r,
|
|
5930
5958
|
className: K("fixed inset-0 z-50 w-full bg-background p-4 shadow-lg duration-200", "h-[100dvh]", "sm:inset-auto sm:left-[50%] sm:top-[50%] sm:translate-x-[-50%] sm:translate-y-[-50%]", "sm:max-w-lg sm:h-auto sm:max-h-[90vh] sm:rounded-lg sm:border sm:p-6", "data-[state=open]:animate-in data-[state=closed]:animate-out", "data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0", "data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95", "data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%]", "data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%]", e),
|
|
5931
5959
|
...n,
|
|
5932
5960
|
children: [t, /* @__PURE__ */ T(B.Close, {
|
|
5933
5961
|
className: K("absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity", "hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2", "disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground", "min-h-[44px] min-w-[44px] sm:min-h-0 sm:min-w-0 flex items-center justify-center"),
|
|
5934
|
-
children: [/* @__PURE__ */ w(
|
|
5962
|
+
children: [/* @__PURE__ */ w(We, { className: "h-5 w-5 sm:h-4 sm:w-4" }), /* @__PURE__ */ w("span", {
|
|
5935
5963
|
className: "sr-only",
|
|
5936
5964
|
children: "Close"
|
|
5937
5965
|
})]
|
|
5938
5966
|
})]
|
|
5939
5967
|
})] }));
|
|
5940
|
-
|
|
5968
|
+
yc.displayName = "MobileDialogContent";
|
|
5941
5969
|
//#endregion
|
|
5942
5970
|
//#region src/custom/export-progress-dialog.tsx
|
|
5943
|
-
function
|
|
5971
|
+
function bc(e) {
|
|
5944
5972
|
return !e && e !== 0 ? "" : e < 1024 ? `${e} B` : e < 1024 * 1024 ? `${(e / 1024).toFixed(1)} KB` : e < 1024 * 1024 * 1024 ? `${(e / (1024 * 1024)).toFixed(1)} MB` : `${(e / (1024 * 1024 * 1024)).toFixed(2)} GB`;
|
|
5945
5973
|
}
|
|
5946
|
-
function
|
|
5974
|
+
function xc({ open: e, onOpenChange: t, job: n, title: r, description: i, filename: a, allowCloseWhileRunning: o = !0, className: s, onAfterDownload: c, closeAfterDownloadMs: l }) {
|
|
5947
5975
|
let { progress: u, error: d, isRunning: f, cancel: p, download: h, reset: g } = n, _ = u?.status, v = typeof u?.percentComplete == "number" ? Math.max(0, Math.min(100, u.percentComplete)) : void 0, y = _ === "completed", b = _ === "failed" || _ === "expired", x = _ === "cancelled", S = m.useCallback(async () => {
|
|
5948
5976
|
await h(a) && (c?.(), l && l > 0 && setTimeout(() => t(!1), l));
|
|
5949
5977
|
}, [
|
|
@@ -6005,7 +6033,7 @@ function vc({ open: e, onOpenChange: t, job: n, title: r, description: i, filena
|
|
|
6005
6033
|
}),
|
|
6006
6034
|
u?.fileSize ? /* @__PURE__ */ w("div", {
|
|
6007
6035
|
className: "text-xs text-muted-foreground",
|
|
6008
|
-
children:
|
|
6036
|
+
children: bc(u.fileSize)
|
|
6009
6037
|
}) : null,
|
|
6010
6038
|
(d || u?.error) && /* @__PURE__ */ w("div", {
|
|
6011
6039
|
"data-testid": "export-progress-error",
|
|
@@ -6022,7 +6050,7 @@ function vc({ open: e, onOpenChange: t, job: n, title: r, description: i, filena
|
|
|
6022
6050
|
variant: "ghost",
|
|
6023
6051
|
onClick: () => p(),
|
|
6024
6052
|
"data-testid": "export-progress-cancel",
|
|
6025
|
-
children: [/* @__PURE__ */ w(
|
|
6053
|
+
children: [/* @__PURE__ */ w(We, {
|
|
6026
6054
|
className: "h-4 w-4",
|
|
6027
6055
|
"aria-hidden": "true"
|
|
6028
6056
|
}), /* @__PURE__ */ w("span", {
|
|
@@ -6145,7 +6173,7 @@ e.register("combobox", ({ schema: e, ...t }) => {
|
|
|
6145
6173
|
});
|
|
6146
6174
|
//#endregion
|
|
6147
6175
|
//#region src/renderers/layout/card.tsx
|
|
6148
|
-
var
|
|
6176
|
+
var Sc = g(({ schema: e, className: t, ...n }, r) => {
|
|
6149
6177
|
let { "data-obj-id": i, "data-obj-type": a, style: o, ...s } = n, c = e.clickable || !!n.onClick;
|
|
6150
6178
|
return /* @__PURE__ */ T(hn, {
|
|
6151
6179
|
ref: r,
|
|
@@ -6168,7 +6196,7 @@ var yc = g(({ schema: e, className: t, ...n }, r) => {
|
|
|
6168
6196
|
]
|
|
6169
6197
|
});
|
|
6170
6198
|
});
|
|
6171
|
-
e.register("card",
|
|
6199
|
+
e.register("card", Sc, {
|
|
6172
6200
|
namespace: "ui",
|
|
6173
6201
|
label: "Card",
|
|
6174
6202
|
inputs: [
|
|
@@ -6283,7 +6311,7 @@ e.register("card", yc, {
|
|
|
6283
6311
|
});
|
|
6284
6312
|
//#endregion
|
|
6285
6313
|
//#region src/renderers/layout/grid.tsx
|
|
6286
|
-
var
|
|
6314
|
+
var Cc = {
|
|
6287
6315
|
1: "grid-cols-1",
|
|
6288
6316
|
2: "grid-cols-2",
|
|
6289
6317
|
3: "grid-cols-3",
|
|
@@ -6296,7 +6324,7 @@ var bc = {
|
|
|
6296
6324
|
10: "grid-cols-10",
|
|
6297
6325
|
11: "grid-cols-11",
|
|
6298
6326
|
12: "grid-cols-12"
|
|
6299
|
-
},
|
|
6327
|
+
}, wc = {
|
|
6300
6328
|
1: "sm:grid-cols-1",
|
|
6301
6329
|
2: "sm:grid-cols-2",
|
|
6302
6330
|
3: "sm:grid-cols-3",
|
|
@@ -6309,7 +6337,7 @@ var bc = {
|
|
|
6309
6337
|
10: "sm:grid-cols-10",
|
|
6310
6338
|
11: "sm:grid-cols-11",
|
|
6311
6339
|
12: "sm:grid-cols-12"
|
|
6312
|
-
},
|
|
6340
|
+
}, Tc = {
|
|
6313
6341
|
1: "md:grid-cols-1",
|
|
6314
6342
|
2: "md:grid-cols-2",
|
|
6315
6343
|
3: "md:grid-cols-3",
|
|
@@ -6322,7 +6350,7 @@ var bc = {
|
|
|
6322
6350
|
10: "md:grid-cols-10",
|
|
6323
6351
|
11: "md:grid-cols-11",
|
|
6324
6352
|
12: "md:grid-cols-12"
|
|
6325
|
-
},
|
|
6353
|
+
}, Ec = {
|
|
6326
6354
|
1: "lg:grid-cols-1",
|
|
6327
6355
|
2: "lg:grid-cols-2",
|
|
6328
6356
|
3: "lg:grid-cols-3",
|
|
@@ -6335,7 +6363,7 @@ var bc = {
|
|
|
6335
6363
|
10: "lg:grid-cols-10",
|
|
6336
6364
|
11: "lg:grid-cols-11",
|
|
6337
6365
|
12: "lg:grid-cols-12"
|
|
6338
|
-
},
|
|
6366
|
+
}, Dc = {
|
|
6339
6367
|
1: "xl:grid-cols-1",
|
|
6340
6368
|
2: "xl:grid-cols-2",
|
|
6341
6369
|
3: "xl:grid-cols-3",
|
|
@@ -6348,7 +6376,7 @@ var bc = {
|
|
|
6348
6376
|
10: "xl:grid-cols-10",
|
|
6349
6377
|
11: "xl:grid-cols-11",
|
|
6350
6378
|
12: "xl:grid-cols-12"
|
|
6351
|
-
},
|
|
6379
|
+
}, Oc = {
|
|
6352
6380
|
0: "gap-0",
|
|
6353
6381
|
1: "gap-1",
|
|
6354
6382
|
2: "gap-2",
|
|
@@ -6365,7 +6393,7 @@ var bc = {
|
|
|
6365
6393
|
e.register("grid", ({ schema: e, className: t, ...n }) => {
|
|
6366
6394
|
let r = 2, i, a, o, s;
|
|
6367
6395
|
typeof e.columns == "number" ? r = e.columns : typeof e.columns == "object" && e.columns !== null && (r = e.columns.xs ?? 1, i = e.columns.sm, a = e.columns.md, o = e.columns.lg, s = e.columns.xl), e.smColumns && (i = e.smColumns), e.mdColumns && (a = e.mdColumns), e.lgColumns && (o = e.lgColumns), e.xlColumns && (s = e.xlColumns);
|
|
6368
|
-
let c = e.gap ?? 4, l = K("grid",
|
|
6396
|
+
let c = e.gap ?? 4, l = K("grid", Cc[r] || "grid-cols-2", i && wc[i], a && Tc[a], o && Ec[o], s && Dc[s], Oc[c] || `gap-[${c * .25}rem]`, t), { "data-obj-id": u, "data-obj-type": d, style: f, ...p } = n;
|
|
6369
6397
|
return /* @__PURE__ */ w("div", {
|
|
6370
6398
|
className: l,
|
|
6371
6399
|
...p,
|
|
@@ -6555,7 +6583,7 @@ e.register("grid", ({ schema: e, className: t, ...n }) => {
|
|
|
6555
6583
|
});
|
|
6556
6584
|
//#endregion
|
|
6557
6585
|
//#region src/renderers/layout/stack.tsx
|
|
6558
|
-
var
|
|
6586
|
+
var kc = g(({ schema: e, className: t, ...n }, r) => {
|
|
6559
6587
|
let i = e.direction || "col", a = e.justify || "start", o = e.align || "stretch", s = e.gap ?? e.spacing ?? 2, c = e.wrap || !1, l = K("flex", i === "row" && "flex-row", i === "col" && "flex-col", i === "row-reverse" && "flex-row-reverse", i === "col-reverse" && "flex-col-reverse", a === "start" && "justify-start", a === "end" && "justify-end", a === "center" && "justify-center", a === "between" && "justify-between", a === "around" && "justify-around", a === "evenly" && "justify-evenly", o === "start" && "items-start", o === "end" && "items-end", o === "center" && "items-center", o === "baseline" && "items-baseline", o === "stretch" && "items-stretch", s === 0 && "gap-0", s === 1 && "gap-1", s === 2 && "gap-1.5 sm:gap-2", s === 3 && "gap-2 sm:gap-3", s === 4 && "gap-2 sm:gap-3 md:gap-4", s === 5 && "gap-3 sm:gap-4 md:gap-5", s === 6 && "gap-3 sm:gap-4 md:gap-6", s === 8 && "gap-4 sm:gap-6 md:gap-8", s === 10 && "gap-5 sm:gap-7 md:gap-10", c && "flex-wrap", t), { "data-obj-id": u, "data-obj-type": d, style: f, ...p } = n;
|
|
6560
6588
|
return /* @__PURE__ */ w("div", {
|
|
6561
6589
|
ref: r,
|
|
@@ -6567,7 +6595,7 @@ var Ec = g(({ schema: e, className: t, ...n }, r) => {
|
|
|
6567
6595
|
children: e.children && q(e.children)
|
|
6568
6596
|
});
|
|
6569
6597
|
});
|
|
6570
|
-
e.register("stack",
|
|
6598
|
+
e.register("stack", kc, {
|
|
6571
6599
|
namespace: "ui",
|
|
6572
6600
|
label: "Stack",
|
|
6573
6601
|
inputs: [
|
|
@@ -6639,7 +6667,7 @@ e.register("stack", Ec, {
|
|
|
6639
6667
|
});
|
|
6640
6668
|
//#endregion
|
|
6641
6669
|
//#region src/renderers/layout/container.tsx
|
|
6642
|
-
var
|
|
6670
|
+
var Ac = g(({ schema: e, className: t, ...n }, r) => {
|
|
6643
6671
|
let i = e.maxWidth || "xl", a = e.padding || 4, o = e.centered !== !1, s = K("w-full", i === "sm" && "max-w-sm", i === "md" && "max-w-md", i === "lg" && "max-w-lg", i === "xl" && "max-w-xl", i === "2xl" && "max-w-2xl", i === "3xl" && "max-w-3xl", i === "4xl" && "max-w-4xl", i === "5xl" && "max-w-5xl", i === "6xl" && "max-w-6xl", i === "7xl" && "max-w-7xl", i === "full" && "max-w-full", i === "screen" && "max-w-screen-2xl", o && "mx-auto", a === 0 && "p-0", a === 1 && "p-0.5 sm:p-1", a === 2 && "p-1 sm:p-2", a === 3 && "p-2 sm:p-3", a === 4 && "p-2 sm:p-3 md:p-4", a === 5 && "p-3 sm:p-4 md:p-5", a === 6 && "p-3 sm:p-4 md:p-6", a === 7 && "p-4 sm:p-5 md:p-7", a === 8 && "p-4 sm:p-6 md:p-8", a === 10 && "p-5 sm:p-7 md:p-10", a === 12 && "p-6 sm:p-8 md:p-12", a === 16 && "p-8 sm:p-10 md:p-16", t), { "data-obj-id": c, "data-obj-type": l, style: u, ...d } = n;
|
|
6644
6672
|
return /* @__PURE__ */ w("div", {
|
|
6645
6673
|
ref: r,
|
|
@@ -6651,7 +6679,7 @@ var Dc = g(({ schema: e, className: t, ...n }, r) => {
|
|
|
6651
6679
|
children: e.children && q(e.children)
|
|
6652
6680
|
});
|
|
6653
6681
|
});
|
|
6654
|
-
e.register("container",
|
|
6682
|
+
e.register("container", Ac, {
|
|
6655
6683
|
namespace: "ui",
|
|
6656
6684
|
label: "Container",
|
|
6657
6685
|
inputs: [
|
|
@@ -6714,7 +6742,7 @@ e.register("container", Dc, {
|
|
|
6714
6742
|
});
|
|
6715
6743
|
//#endregion
|
|
6716
6744
|
//#region src/renderers/layout/page.tsx
|
|
6717
|
-
function
|
|
6745
|
+
function jc(e) {
|
|
6718
6746
|
switch (e) {
|
|
6719
6747
|
case "small": return "w-64";
|
|
6720
6748
|
case "medium": return "w-80";
|
|
@@ -6723,7 +6751,7 @@ function Oc(e) {
|
|
|
6723
6751
|
default: return e || "w-full";
|
|
6724
6752
|
}
|
|
6725
6753
|
}
|
|
6726
|
-
function
|
|
6754
|
+
function Mc(e) {
|
|
6727
6755
|
switch (e) {
|
|
6728
6756
|
case "utility": return "max-w-4xl";
|
|
6729
6757
|
case "home": return "max-w-screen-2xl";
|
|
@@ -6731,10 +6759,10 @@ function kc(e) {
|
|
|
6731
6759
|
default: return "max-w-7xl";
|
|
6732
6760
|
}
|
|
6733
6761
|
}
|
|
6734
|
-
function
|
|
6762
|
+
function Nc(e, t) {
|
|
6735
6763
|
return e?.find((e) => e.name?.toLowerCase() === t.toLowerCase());
|
|
6736
6764
|
}
|
|
6737
|
-
function
|
|
6765
|
+
function Pc(e, t) {
|
|
6738
6766
|
if (!e) return [];
|
|
6739
6767
|
let n = new Set(t.map((e) => e.toLowerCase()));
|
|
6740
6768
|
return e.filter((e) => !n.has(e.name?.toLowerCase() ?? ""));
|
|
@@ -6746,8 +6774,8 @@ var $ = ({ region: e, className: t }) => {
|
|
|
6746
6774
|
"data-region": e.name,
|
|
6747
6775
|
children: n.map((t, n) => /* @__PURE__ */ w(a, { schema: t }, t?.id || `${e.name}-${n}`))
|
|
6748
6776
|
});
|
|
6749
|
-
},
|
|
6750
|
-
let r =
|
|
6777
|
+
}, Fc = ({ regions: e, pageType: t, className: n }) => {
|
|
6778
|
+
let r = Nc(e, "header"), i = Nc(e, "sidebar"), a = Nc(e, "main"), o = Nc(e, "aside"), s = Nc(e, "footer"), c = Pc(e, [
|
|
6751
6779
|
"header",
|
|
6752
6780
|
"sidebar",
|
|
6753
6781
|
"main",
|
|
@@ -6760,13 +6788,13 @@ var $ = ({ region: e, className: t }) => {
|
|
|
6760
6788
|
children: [
|
|
6761
6789
|
r && /* @__PURE__ */ w($, {
|
|
6762
6790
|
region: r,
|
|
6763
|
-
className: K(
|
|
6791
|
+
className: K(jc(r.width))
|
|
6764
6792
|
}),
|
|
6765
6793
|
/* @__PURE__ */ T("div", {
|
|
6766
6794
|
className: "flex flex-1 gap-6",
|
|
6767
6795
|
children: [
|
|
6768
6796
|
i && /* @__PURE__ */ w("aside", {
|
|
6769
|
-
className: K("shrink-0",
|
|
6797
|
+
className: K("shrink-0", jc(i.width || "small")),
|
|
6770
6798
|
children: /* @__PURE__ */ w($, { region: i })
|
|
6771
6799
|
}),
|
|
6772
6800
|
/* @__PURE__ */ T("div", {
|
|
@@ -6774,14 +6802,14 @@ var $ = ({ region: e, className: t }) => {
|
|
|
6774
6802
|
children: [a && /* @__PURE__ */ w($, { region: a }), c.map((e, t) => /* @__PURE__ */ w($, { region: e }, e.name || `extra-${t}`))]
|
|
6775
6803
|
}),
|
|
6776
6804
|
o && /* @__PURE__ */ w("aside", {
|
|
6777
|
-
className: K("shrink-0",
|
|
6805
|
+
className: K("shrink-0", jc(o.width || "small")),
|
|
6778
6806
|
children: /* @__PURE__ */ w($, { region: o })
|
|
6779
6807
|
})
|
|
6780
6808
|
]
|
|
6781
6809
|
}),
|
|
6782
6810
|
s && /* @__PURE__ */ w($, {
|
|
6783
6811
|
region: s,
|
|
6784
|
-
className: K(
|
|
6812
|
+
className: K(jc(s.width))
|
|
6785
6813
|
})
|
|
6786
6814
|
]
|
|
6787
6815
|
}) : /* @__PURE__ */ w("div", {
|
|
@@ -6789,22 +6817,22 @@ var $ = ({ region: e, className: t }) => {
|
|
|
6789
6817
|
"data-page-layout": t,
|
|
6790
6818
|
children: e.map((e, t) => /* @__PURE__ */ w($, { region: e }, e.name || t))
|
|
6791
6819
|
});
|
|
6792
|
-
},
|
|
6820
|
+
}, Ic = ({ schema: e }) => {
|
|
6793
6821
|
let t = e.body || e.children, n = Array.isArray(t) ? t : t ? [t] : [];
|
|
6794
6822
|
return n.length === 0 ? null : /* @__PURE__ */ w("div", {
|
|
6795
6823
|
className: "space-y-6",
|
|
6796
6824
|
children: n.map((e, t) => /* @__PURE__ */ w(a, { schema: e }, e?.id || t))
|
|
6797
6825
|
});
|
|
6798
|
-
},
|
|
6826
|
+
}, Lc = ({ schema: e }) => e.regions && e.regions.length > 0 ? /* @__PURE__ */ w(Fc, {
|
|
6799
6827
|
regions: e.regions,
|
|
6800
6828
|
pageType: e.pageType
|
|
6801
|
-
}) : /* @__PURE__ */ w(
|
|
6802
|
-
default:
|
|
6803
|
-
"full-width":
|
|
6829
|
+
}) : /* @__PURE__ */ w(Ic, { schema: e }), Rc = {
|
|
6830
|
+
default: Lc,
|
|
6831
|
+
"full-width": Lc,
|
|
6804
6832
|
"header-sidebar-main": ({ schema: e }) => {
|
|
6805
6833
|
let t = e.regions || [];
|
|
6806
|
-
if (t.length === 0) return /* @__PURE__ */ w(
|
|
6807
|
-
let n =
|
|
6834
|
+
if (t.length === 0) return /* @__PURE__ */ w(Ic, { schema: e });
|
|
6835
|
+
let n = Nc(t, "header"), r = Nc(t, "sidebar"), i = Nc(t, "main"), a = Pc(t, [
|
|
6808
6836
|
"header",
|
|
6809
6837
|
"sidebar",
|
|
6810
6838
|
"main"
|
|
@@ -6815,7 +6843,7 @@ var $ = ({ region: e, className: t }) => {
|
|
|
6815
6843
|
children: [n && /* @__PURE__ */ w($, { region: n }), /* @__PURE__ */ T("div", {
|
|
6816
6844
|
className: "flex flex-1 gap-6",
|
|
6817
6845
|
children: [r && /* @__PURE__ */ w("aside", {
|
|
6818
|
-
className: K("shrink-0",
|
|
6846
|
+
className: K("shrink-0", jc(r.width || "medium")),
|
|
6819
6847
|
children: /* @__PURE__ */ w($, { region: r })
|
|
6820
6848
|
}), /* @__PURE__ */ T("div", {
|
|
6821
6849
|
className: "flex-1 min-w-0 space-y-6",
|
|
@@ -6826,8 +6854,8 @@ var $ = ({ region: e, className: t }) => {
|
|
|
6826
6854
|
},
|
|
6827
6855
|
"three-column": ({ schema: e }) => {
|
|
6828
6856
|
let t = e.regions || [];
|
|
6829
|
-
if (t.length === 0) return /* @__PURE__ */ w(
|
|
6830
|
-
let n =
|
|
6857
|
+
if (t.length === 0) return /* @__PURE__ */ w(Ic, { schema: e });
|
|
6858
|
+
let n = Nc(t, "header"), r = Nc(t, "sidebar"), i = Nc(t, "main"), a = Nc(t, "aside"), o = Nc(t, "footer"), s = Pc(t, [
|
|
6831
6859
|
"header",
|
|
6832
6860
|
"sidebar",
|
|
6833
6861
|
"main",
|
|
@@ -6843,7 +6871,7 @@ var $ = ({ region: e, className: t }) => {
|
|
|
6843
6871
|
className: "flex flex-1 gap-6",
|
|
6844
6872
|
children: [
|
|
6845
6873
|
r && /* @__PURE__ */ w("aside", {
|
|
6846
|
-
className: K("shrink-0",
|
|
6874
|
+
className: K("shrink-0", jc(r.width || "small")),
|
|
6847
6875
|
children: /* @__PURE__ */ w($, { region: r })
|
|
6848
6876
|
}),
|
|
6849
6877
|
/* @__PURE__ */ T("div", {
|
|
@@ -6851,7 +6879,7 @@ var $ = ({ region: e, className: t }) => {
|
|
|
6851
6879
|
children: [i && /* @__PURE__ */ w($, { region: i }), s.map((e, t) => /* @__PURE__ */ w($, { region: e }, e.name || `extra-${t}`))]
|
|
6852
6880
|
}),
|
|
6853
6881
|
a && /* @__PURE__ */ w("aside", {
|
|
6854
|
-
className: K("shrink-0",
|
|
6882
|
+
className: K("shrink-0", jc(a.width || "small")),
|
|
6855
6883
|
children: /* @__PURE__ */ w($, { region: a })
|
|
6856
6884
|
})
|
|
6857
6885
|
]
|
|
@@ -6862,8 +6890,8 @@ var $ = ({ region: e, className: t }) => {
|
|
|
6862
6890
|
},
|
|
6863
6891
|
dashboard: ({ schema: e }) => {
|
|
6864
6892
|
let t = e.regions || [];
|
|
6865
|
-
if (t.length === 0) return /* @__PURE__ */ w(
|
|
6866
|
-
let n =
|
|
6893
|
+
if (t.length === 0) return /* @__PURE__ */ w(Ic, { schema: e });
|
|
6894
|
+
let n = Nc(t, "header"), r = Nc(t, "footer"), i = Pc(t, ["header", "footer"]);
|
|
6867
6895
|
return /* @__PURE__ */ T("div", {
|
|
6868
6896
|
className: "flex flex-col gap-6",
|
|
6869
6897
|
"data-template": "dashboard",
|
|
@@ -6878,30 +6906,30 @@ var $ = ({ region: e, className: t }) => {
|
|
|
6878
6906
|
});
|
|
6879
6907
|
}
|
|
6880
6908
|
};
|
|
6881
|
-
function
|
|
6882
|
-
return e.template &&
|
|
6909
|
+
function zc(e) {
|
|
6910
|
+
return e.template && Rc[e.template] || null;
|
|
6883
6911
|
}
|
|
6884
|
-
var
|
|
6912
|
+
var Bc = ({ schema: e }) => e.regions && e.regions.length > 0 ? /* @__PURE__ */ w(Fc, {
|
|
6885
6913
|
regions: e.regions,
|
|
6886
6914
|
pageType: "record"
|
|
6887
|
-
}) : /* @__PURE__ */ w(
|
|
6915
|
+
}) : /* @__PURE__ */ w(Ic, { schema: e }), Vc = ({ schema: e }) => e.regions && e.regions.length > 0 ? /* @__PURE__ */ w(Fc, {
|
|
6888
6916
|
regions: e.regions,
|
|
6889
6917
|
pageType: "home"
|
|
6890
|
-
}) : /* @__PURE__ */ w(
|
|
6918
|
+
}) : /* @__PURE__ */ w(Ic, { schema: e }), Hc = ({ schema: e }) => e.regions && e.regions.length > 0 ? /* @__PURE__ */ w(Fc, {
|
|
6891
6919
|
regions: e.regions,
|
|
6892
6920
|
pageType: "app"
|
|
6893
|
-
}) : /* @__PURE__ */ w(
|
|
6921
|
+
}) : /* @__PURE__ */ w(Ic, { schema: e }), Uc = ({ schema: e }) => e.regions && e.regions.length > 0 ? /* @__PURE__ */ w(Fc, {
|
|
6894
6922
|
regions: e.regions,
|
|
6895
6923
|
pageType: "utility"
|
|
6896
|
-
}) : /* @__PURE__ */ w(
|
|
6924
|
+
}) : /* @__PURE__ */ w(Ic, { schema: e }), Wc = ({ schema: e, className: t, ...n }) => {
|
|
6897
6925
|
let r = e.pageType || "record", { "data-obj-id": a, "data-obj-type": o, style: s, ...c } = n, l = y(() => {
|
|
6898
|
-
let t =
|
|
6926
|
+
let t = zc(e);
|
|
6899
6927
|
if (t) return /* @__PURE__ */ w(t, { schema: e });
|
|
6900
6928
|
switch (r) {
|
|
6901
|
-
case "home": return /* @__PURE__ */ w(
|
|
6902
|
-
case "app": return /* @__PURE__ */ w(
|
|
6903
|
-
case "utility": return /* @__PURE__ */ w(
|
|
6904
|
-
default: return /* @__PURE__ */ w(
|
|
6929
|
+
case "home": return /* @__PURE__ */ w(Vc, { schema: e });
|
|
6930
|
+
case "app": return /* @__PURE__ */ w(Hc, { schema: e });
|
|
6931
|
+
case "utility": return /* @__PURE__ */ w(Uc, { schema: e });
|
|
6932
|
+
default: return /* @__PURE__ */ w(Bc, { schema: e });
|
|
6905
6933
|
}
|
|
6906
6934
|
}, [e, r]), u = /* @__PURE__ */ w("div", {
|
|
6907
6935
|
className: K("min-h-full w-full bg-background p-4 md:p-6 lg:p-8", t),
|
|
@@ -6911,7 +6939,7 @@ var Lc = ({ schema: e }) => e.regions && e.regions.length > 0 ? /* @__PURE__ */
|
|
|
6911
6939
|
style: s,
|
|
6912
6940
|
...c,
|
|
6913
6941
|
children: /* @__PURE__ */ T("div", {
|
|
6914
|
-
className: K("mx-auto space-y-8",
|
|
6942
|
+
className: K("mx-auto space-y-8", Mc(r)),
|
|
6915
6943
|
children: [r !== "record" && (e.title || e.description) && /* @__PURE__ */ T("div", {
|
|
6916
6944
|
className: "space-y-2",
|
|
6917
6945
|
children: [e.title && /* @__PURE__ */ w("h1", {
|
|
@@ -6928,7 +6956,7 @@ var Lc = ({ schema: e }) => e.regions && e.regions.length > 0 ? /* @__PURE__ */
|
|
|
6928
6956
|
definitions: e.variables,
|
|
6929
6957
|
children: u
|
|
6930
6958
|
}) : u;
|
|
6931
|
-
},
|
|
6959
|
+
}, Gc = {
|
|
6932
6960
|
namespace: "ui",
|
|
6933
6961
|
label: "Page",
|
|
6934
6962
|
icon: "Layout",
|
|
@@ -6979,68 +7007,68 @@ var Lc = ({ schema: e }) => e.regions && e.regions.length > 0 ? /* @__PURE__ */
|
|
|
6979
7007
|
}
|
|
6980
7008
|
]
|
|
6981
7009
|
};
|
|
6982
|
-
e.register("page",
|
|
6983
|
-
...
|
|
7010
|
+
e.register("page", Wc, Gc), e.register("app", Wc, {
|
|
7011
|
+
...Gc,
|
|
6984
7012
|
label: "App Page"
|
|
6985
|
-
}), e.register("utility",
|
|
6986
|
-
...
|
|
7013
|
+
}), e.register("utility", Wc, {
|
|
7014
|
+
...Gc,
|
|
6987
7015
|
label: "Utility Page"
|
|
6988
|
-
}), e.register("home",
|
|
6989
|
-
...
|
|
7016
|
+
}), e.register("home", Wc, {
|
|
7017
|
+
...Gc,
|
|
6990
7018
|
label: "Home Page"
|
|
6991
|
-
}), e.register("record",
|
|
6992
|
-
...
|
|
7019
|
+
}), e.register("record", Wc, {
|
|
7020
|
+
...Gc,
|
|
6993
7021
|
label: "Record Page"
|
|
6994
7022
|
});
|
|
6995
7023
|
//#endregion
|
|
6996
7024
|
//#region src/lib/lazy-icon.tsx
|
|
6997
|
-
function
|
|
7025
|
+
function Kc(e) {
|
|
6998
7026
|
return e.includes("-") ? e.toLowerCase() : e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").replace(/([A-Z]+)([A-Z][a-z])/g, "$1-$2").toLowerCase();
|
|
6999
7027
|
}
|
|
7000
|
-
var
|
|
7001
|
-
function
|
|
7002
|
-
return
|
|
7028
|
+
var qc = new Set(At);
|
|
7029
|
+
function Jc(e) {
|
|
7030
|
+
return qc.has(e);
|
|
7003
7031
|
}
|
|
7004
|
-
var
|
|
7005
|
-
function
|
|
7032
|
+
var Yc = /* @__PURE__ */ new Map();
|
|
7033
|
+
function Xc(e) {
|
|
7006
7034
|
if (!e) return he;
|
|
7007
|
-
let t =
|
|
7035
|
+
let t = Yc.get(e);
|
|
7008
7036
|
if (t) return t;
|
|
7009
|
-
let n =
|
|
7010
|
-
if (!
|
|
7037
|
+
let n = Kc(e);
|
|
7038
|
+
if (!Jc(n)) return Yc.set(e, he), he;
|
|
7011
7039
|
let r = (e) => h.createElement(kt, {
|
|
7012
7040
|
name: n,
|
|
7013
7041
|
fallback: he,
|
|
7014
7042
|
...e
|
|
7015
7043
|
});
|
|
7016
|
-
return r.displayName = `LucideIcon(${e})`,
|
|
7044
|
+
return r.displayName = `LucideIcon(${e})`, Yc.set(e, r), r;
|
|
7017
7045
|
}
|
|
7018
|
-
var
|
|
7046
|
+
var Zc = ({ name: e, ...t }) => {
|
|
7019
7047
|
if (!e) return h.createElement(he, t);
|
|
7020
|
-
let n =
|
|
7021
|
-
return
|
|
7048
|
+
let n = Kc(e);
|
|
7049
|
+
return Jc(n) ? h.createElement(kt, {
|
|
7022
7050
|
name: n,
|
|
7023
7051
|
fallback: he,
|
|
7024
7052
|
...t
|
|
7025
7053
|
}) : h.createElement(he, t);
|
|
7026
|
-
},
|
|
7027
|
-
function
|
|
7054
|
+
}, Qc = /* @__PURE__ */ new Map(), $c = /* @__PURE__ */ new Map(), el = /* @__PURE__ */ new Set();
|
|
7055
|
+
function tl(e, t, n) {
|
|
7028
7056
|
return `${e}::${t ?? ""}::${n ?? ""}`;
|
|
7029
7057
|
}
|
|
7030
|
-
function
|
|
7031
|
-
for (let e of
|
|
7058
|
+
function nl() {
|
|
7059
|
+
for (let e of el) e();
|
|
7032
7060
|
}
|
|
7033
|
-
function
|
|
7034
|
-
return
|
|
7061
|
+
function rl(e, t, n) {
|
|
7062
|
+
return Qc.get(tl(e, t, n));
|
|
7035
7063
|
}
|
|
7036
|
-
function
|
|
7037
|
-
let i =
|
|
7038
|
-
|
|
7064
|
+
function il(e, t, n, r) {
|
|
7065
|
+
let i = tl(e, t, n);
|
|
7066
|
+
Qc.get(i) !== r && (Qc.set(i, r), nl());
|
|
7039
7067
|
}
|
|
7040
|
-
async function
|
|
7041
|
-
let i =
|
|
7068
|
+
async function al(e, t, n, r) {
|
|
7069
|
+
let i = tl(t, n, r), a = Qc.get(i);
|
|
7042
7070
|
if (a !== void 0) return a;
|
|
7043
|
-
let o =
|
|
7071
|
+
let o = $c.get(i);
|
|
7044
7072
|
if (o) return o;
|
|
7045
7073
|
let s = (async () => {
|
|
7046
7074
|
let a = {};
|
|
@@ -7053,44 +7081,44 @@ async function nl(e, t, n, r) {
|
|
|
7053
7081
|
where: a,
|
|
7054
7082
|
limit: 1
|
|
7055
7083
|
}), o = typeof i?.total == "number" ? i.total : Array.isArray(i?.data) ? i.data.length : Array.isArray(i) ? i.length : 0, s = typeof o == "number" ? o : 0;
|
|
7056
|
-
return
|
|
7084
|
+
return il(t, n, r, s), s;
|
|
7057
7085
|
} catch {
|
|
7058
7086
|
return 0;
|
|
7059
7087
|
} finally {
|
|
7060
|
-
|
|
7088
|
+
$c.delete(i);
|
|
7061
7089
|
}
|
|
7062
7090
|
})();
|
|
7063
|
-
return
|
|
7091
|
+
return $c.set(i, s), s;
|
|
7064
7092
|
}
|
|
7065
|
-
function
|
|
7093
|
+
function ol(e, t) {
|
|
7066
7094
|
let n = !1, r = `${e}::`;
|
|
7067
|
-
for (let e of
|
|
7068
|
-
n &&
|
|
7095
|
+
for (let e of Qc.keys()) e.startsWith(r) && (t !== void 0 && !e.endsWith(`::${t}`) || (Qc.delete(e), n = !0));
|
|
7096
|
+
n && nl();
|
|
7069
7097
|
}
|
|
7070
|
-
function
|
|
7071
|
-
|
|
7098
|
+
function sl() {
|
|
7099
|
+
Qc.size !== 0 && (Qc.clear(), nl());
|
|
7072
7100
|
}
|
|
7073
|
-
function
|
|
7074
|
-
return
|
|
7075
|
-
|
|
7101
|
+
function cl(e) {
|
|
7102
|
+
return el.add(e), () => {
|
|
7103
|
+
el.delete(e);
|
|
7076
7104
|
};
|
|
7077
7105
|
}
|
|
7078
|
-
function
|
|
7079
|
-
return
|
|
7106
|
+
function ll() {
|
|
7107
|
+
return Qc;
|
|
7080
7108
|
}
|
|
7081
|
-
function
|
|
7082
|
-
if (S(
|
|
7109
|
+
function ul(e, t, n) {
|
|
7110
|
+
if (S(cl, ll, ll), e) return rl(e, t, n);
|
|
7083
7111
|
}
|
|
7084
|
-
var
|
|
7085
|
-
get:
|
|
7086
|
-
set:
|
|
7087
|
-
fetch:
|
|
7088
|
-
invalidate:
|
|
7089
|
-
invalidateAll:
|
|
7112
|
+
var dl = {
|
|
7113
|
+
get: rl,
|
|
7114
|
+
set: il,
|
|
7115
|
+
fetch: al,
|
|
7116
|
+
invalidate: ol,
|
|
7117
|
+
invalidateAll: sl,
|
|
7090
7118
|
_reset: () => {
|
|
7091
|
-
|
|
7119
|
+
Qc.clear(), $c.clear(), nl();
|
|
7092
7120
|
}
|
|
7093
|
-
},
|
|
7121
|
+
}, fl = (e) => {
|
|
7094
7122
|
let { "data-obj-id": t, "data-obj-type": n, style: r, ...i } = e || {};
|
|
7095
7123
|
return {
|
|
7096
7124
|
designer: {
|
|
@@ -7100,13 +7128,13 @@ var cl = {
|
|
|
7100
7128
|
},
|
|
7101
7129
|
rest: i
|
|
7102
7130
|
};
|
|
7103
|
-
},
|
|
7131
|
+
}, pl = (e) => e == null ? "" : typeof e == "string" ? e : typeof e == "object" ? e.default || e.value || "" : String(e), ml = (e, t) => !e || typeof e != "string" ? e || "" : e.includes("{") ? e.replace(/\{([a-zA-Z0-9_.]+)\}/g, (e, n) => {
|
|
7104
7132
|
let r = n.split(".").reduce((e, t) => e == null ? e : e[t], t);
|
|
7105
7133
|
return r == null ? "" : String(r);
|
|
7106
|
-
}).replace(/\s+/g, " ").trim() : e,
|
|
7134
|
+
}).replace(/\s+/g, " ").trim() : e, hl = (e) => {
|
|
7107
7135
|
let t = typeof e == "number" ? e : Number(e);
|
|
7108
7136
|
return Number.isFinite(t) ? t >= 1e4 ? `${Math.round(t / 1e3)}k` : t >= 1e3 ? `${(t / 1e3).toFixed(1).replace(/\.0$/, "")}k` : String(t) : String(e);
|
|
7109
|
-
},
|
|
7137
|
+
}, gl = (e, t = []) => {
|
|
7110
7138
|
if (!e) return t;
|
|
7111
7139
|
let n = Array.isArray(e) ? e : [e];
|
|
7112
7140
|
for (let e of n) {
|
|
@@ -7122,18 +7150,18 @@ var cl = {
|
|
|
7122
7150
|
e.body,
|
|
7123
7151
|
e.items
|
|
7124
7152
|
];
|
|
7125
|
-
for (let e of n) e &&
|
|
7153
|
+
for (let e of n) e && gl(e, t);
|
|
7126
7154
|
}
|
|
7127
7155
|
return t;
|
|
7128
7156
|
};
|
|
7129
7157
|
e.register("page:tabs", ({ schema: e, className: t, ...n }) => {
|
|
7130
|
-
let { designer: r } =
|
|
7131
|
-
|
|
7158
|
+
let { designer: r } = fl(n), i = e?.items || [], a = e?.properties?.type || e?.tabStyle || "line", o = (e?.position || "top") === "left", s = p(), c = s?.data?.id, l = s?.dataSource;
|
|
7159
|
+
ul(void 0, void 0, c);
|
|
7132
7160
|
let u = h.useMemo(() => {
|
|
7133
7161
|
let e = /* @__PURE__ */ new Map();
|
|
7134
7162
|
return i.forEach((t, n) => {
|
|
7135
7163
|
if (t.count !== void 0 && t.count !== null && t.count !== "") return;
|
|
7136
|
-
let r =
|
|
7164
|
+
let r = gl(t.children), i = [];
|
|
7137
7165
|
for (let e of r) {
|
|
7138
7166
|
let t = e?.properties?.objectName || e?.objectName;
|
|
7139
7167
|
if (!t) continue;
|
|
@@ -7149,7 +7177,7 @@ e.register("page:tabs", ({ schema: e, className: t, ...n }) => {
|
|
|
7149
7177
|
h.useEffect(() => {
|
|
7150
7178
|
if (!l || typeof l.find != "function" || u.size === 0) return;
|
|
7151
7179
|
let e = !1;
|
|
7152
|
-
for (let t of u.values()) for (let n of t) if (
|
|
7180
|
+
for (let t of u.values()) for (let n of t) if (dl.fetch((e, t) => l.find(e, t), n.objectName, n.relationshipField, c).catch(() => 0), e) return;
|
|
7153
7181
|
return () => {
|
|
7154
7182
|
e = !0;
|
|
7155
7183
|
};
|
|
@@ -7163,14 +7191,14 @@ e.register("page:tabs", ({ schema: e, className: t, ...n }) => {
|
|
|
7163
7191
|
if (!t || t.length === 0) return;
|
|
7164
7192
|
let n = 0, r = !1;
|
|
7165
7193
|
for (let e of t) {
|
|
7166
|
-
let t =
|
|
7194
|
+
let t = dl.get(e.objectName, e.relationshipField, c);
|
|
7167
7195
|
t !== void 0 && (n += t, r = !0);
|
|
7168
7196
|
}
|
|
7169
7197
|
return r ? n : void 0;
|
|
7170
7198
|
}, f = i.map((e, t) => ({
|
|
7171
7199
|
...e,
|
|
7172
7200
|
value: `tab-${t}`,
|
|
7173
|
-
labelStr:
|
|
7201
|
+
labelStr: pl(e.label),
|
|
7174
7202
|
count: e.count !== void 0 && e.count !== null && e.count !== "" ? e.count : d(t)
|
|
7175
7203
|
})), m = f[0]?.value, g = K(o && "flex-col h-auto items-stretch p-1", a === "card" && "bg-transparent gap-1", a === "pill" && "bg-muted rounded-full p-1 gap-1", !o && "sticky top-0 z-20 bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/60"), _ = () => K(o && "justify-start", a === "card" && "data-[state=active]:bg-background data-[state=active]:border data-[state=active]:shadow-sm rounded-md", a === "pill" && "rounded-full data-[state=active]:bg-background");
|
|
7176
7204
|
return /* @__PURE__ */ T(_o, {
|
|
@@ -7184,7 +7212,7 @@ e.register("page:tabs", ({ schema: e, className: t, ...n }) => {
|
|
|
7184
7212
|
value: e.value,
|
|
7185
7213
|
className: _(),
|
|
7186
7214
|
children: [
|
|
7187
|
-
e.icon && /* @__PURE__ */ w(
|
|
7215
|
+
e.icon && /* @__PURE__ */ w(Zc, {
|
|
7188
7216
|
name: e.icon,
|
|
7189
7217
|
className: "mr-1.5 h-3.5 w-3.5 shrink-0 opacity-70",
|
|
7190
7218
|
"aria-hidden": !0
|
|
@@ -7192,8 +7220,8 @@ e.register("page:tabs", ({ schema: e, className: t, ...n }) => {
|
|
|
7192
7220
|
/* @__PURE__ */ w("span", { children: e.labelStr }),
|
|
7193
7221
|
e.count !== void 0 && e.count !== null && e.count !== "" && /* @__PURE__ */ w("span", {
|
|
7194
7222
|
className: "ml-1.5 inline-flex h-4 min-w-[1rem] items-center justify-center rounded-full bg-muted px-1 text-[10px] font-medium leading-none text-muted-foreground",
|
|
7195
|
-
"aria-label": `${
|
|
7196
|
-
children:
|
|
7223
|
+
"aria-label": `${hl(e.count)} items`,
|
|
7224
|
+
children: hl(e.count)
|
|
7197
7225
|
})
|
|
7198
7226
|
]
|
|
7199
7227
|
}, e.value))
|
|
@@ -7209,7 +7237,7 @@ e.register("page:tabs", ({ schema: e, className: t, ...n }) => {
|
|
|
7209
7237
|
category: "layout",
|
|
7210
7238
|
isContainer: !0
|
|
7211
7239
|
}), e.register("page:card", ({ schema: e, className: t, ...n }) => {
|
|
7212
|
-
let { designer: r } =
|
|
7240
|
+
let { designer: r } = fl(n), i = pl(e?.title), a = e?.bordered !== !1, o = e?.body, s = e?.footer;
|
|
7213
7241
|
return /* @__PURE__ */ T(hn, {
|
|
7214
7242
|
className: K(t, !a && "border-0 shadow-none bg-transparent"),
|
|
7215
7243
|
...r,
|
|
@@ -7228,10 +7256,10 @@ e.register("page:tabs", ({ schema: e, className: t, ...n }) => {
|
|
|
7228
7256
|
category: "layout",
|
|
7229
7257
|
isContainer: !0
|
|
7230
7258
|
}), e.register("page:accordion", ({ schema: e, className: t, ...n }) => {
|
|
7231
|
-
let { designer: r } =
|
|
7259
|
+
let { designer: r } = fl(n), i = e?.items || [], a = !!e?.allowMultiple, o = i.map((e, t) => ({
|
|
7232
7260
|
...e,
|
|
7233
7261
|
value: `panel-${t}`,
|
|
7234
|
-
labelStr:
|
|
7262
|
+
labelStr: pl(e.label)
|
|
7235
7263
|
})), s = o.filter((e) => e.collapsed === !1).map((e) => e.value), c = o.map((e) => /* @__PURE__ */ T(Pt, {
|
|
7236
7264
|
value: e.value,
|
|
7237
7265
|
children: [/* @__PURE__ */ w(Ft, { children: e.labelStr }), /* @__PURE__ */ w(It, { children: q(e.children) })]
|
|
@@ -7256,7 +7284,7 @@ e.register("page:tabs", ({ schema: e, className: t, ...n }) => {
|
|
|
7256
7284
|
category: "layout",
|
|
7257
7285
|
isContainer: !0
|
|
7258
7286
|
}), e.register("page:section", ({ schema: e, className: t, ...n }) => {
|
|
7259
|
-
let { designer: r } =
|
|
7287
|
+
let { designer: r } = fl(n);
|
|
7260
7288
|
return /* @__PURE__ */ w("section", {
|
|
7261
7289
|
className: K("space-y-4", t),
|
|
7262
7290
|
...r,
|
|
@@ -7268,7 +7296,7 @@ e.register("page:tabs", ({ schema: e, className: t, ...n }) => {
|
|
|
7268
7296
|
category: "layout",
|
|
7269
7297
|
isContainer: !0
|
|
7270
7298
|
}), e.register("page:header", ({ schema: e, className: t, ...n }) => {
|
|
7271
|
-
let { designer: r } =
|
|
7299
|
+
let { designer: r } = fl(n), i = p(), a = e?.title ?? e?.properties?.title, o = e?.subtitle ?? e?.properties?.subtitle, s = ml(pl(a), i?.data), c = ml(pl(o), i?.data), l = (e?.breadcrumb ?? e?.properties?.breadcrumb) !== !1;
|
|
7272
7300
|
return /* @__PURE__ */ T("header", {
|
|
7273
7301
|
className: K("flex flex-col gap-2 pb-4 border-b", t),
|
|
7274
7302
|
...r,
|
|
@@ -7294,7 +7322,7 @@ e.register("page:tabs", ({ schema: e, className: t, ...n }) => {
|
|
|
7294
7322
|
label: "Page Header",
|
|
7295
7323
|
category: "layout"
|
|
7296
7324
|
}), e.register("page:footer", ({ schema: e, className: t, ...n }) => {
|
|
7297
|
-
let { designer: r } =
|
|
7325
|
+
let { designer: r } = fl(n);
|
|
7298
7326
|
return /* @__PURE__ */ T(C, { children: [/* @__PURE__ */ w(la, { className: "my-4" }), /* @__PURE__ */ w("footer", {
|
|
7299
7327
|
className: K("flex items-center justify-between text-sm text-muted-foreground", t),
|
|
7300
7328
|
...r,
|
|
@@ -7306,7 +7334,7 @@ e.register("page:tabs", ({ schema: e, className: t, ...n }) => {
|
|
|
7306
7334
|
category: "layout",
|
|
7307
7335
|
isContainer: !0
|
|
7308
7336
|
}), e.register("page:sidebar", ({ schema: e, className: t, ...n }) => {
|
|
7309
|
-
let { designer: r } =
|
|
7337
|
+
let { designer: r } = fl(n);
|
|
7310
7338
|
return /* @__PURE__ */ w("aside", {
|
|
7311
7339
|
className: K("flex flex-col gap-4 w-full md:w-80 shrink-0", t),
|
|
7312
7340
|
...r,
|
|
@@ -7570,7 +7598,7 @@ e.register("page:tabs", ({ schema: e, className: t, ...n }) => {
|
|
|
7570
7598
|
});
|
|
7571
7599
|
//#endregion
|
|
7572
7600
|
//#region src/renderers/navigation/header-bar.tsx
|
|
7573
|
-
function
|
|
7601
|
+
function _l({ crumb: e, isLast: t }) {
|
|
7574
7602
|
let n = s(e.label) ?? "";
|
|
7575
7603
|
return e.siblings && e.siblings.length > 0 ? /* @__PURE__ */ T(Mr, { children: [/* @__PURE__ */ T(Nr, {
|
|
7576
7604
|
className: "flex items-center gap-1",
|
|
@@ -7602,7 +7630,7 @@ e.register("header-bar", ({ schema: e }) => /* @__PURE__ */ T("header", {
|
|
|
7602
7630
|
orientation: "vertical",
|
|
7603
7631
|
className: "mr-2 h-4"
|
|
7604
7632
|
}),
|
|
7605
|
-
/* @__PURE__ */ w(on, { children: /* @__PURE__ */ w(sn, { children: e.crumbs?.map((t, n) => /* @__PURE__ */ T(h.Fragment, { children: [/* @__PURE__ */ w(cn, { children: /* @__PURE__ */ w(
|
|
7633
|
+
/* @__PURE__ */ w(on, { children: /* @__PURE__ */ w(sn, { children: e.crumbs?.map((t, n) => /* @__PURE__ */ T(h.Fragment, { children: [/* @__PURE__ */ w(cn, { children: /* @__PURE__ */ w(_l, {
|
|
7606
7634
|
crumb: t,
|
|
7607
7635
|
isLast: n === e.crumbs.length - 1
|
|
7608
7636
|
}) }), n < e.crumbs.length - 1 && /* @__PURE__ */ w(dn, {})] }, n)) }) }),
|
|
@@ -7830,7 +7858,7 @@ e.register("header-bar", ({ schema: e }) => /* @__PURE__ */ T("header", {
|
|
|
7830
7858
|
});
|
|
7831
7859
|
//#endregion
|
|
7832
7860
|
//#region src/renderers/data-display/tree-view.tsx
|
|
7833
|
-
var
|
|
7861
|
+
var vl = ({ node: e, onNodeClick: t }) => {
|
|
7834
7862
|
let [n, r] = x(!1), i = e.children && e.children.length > 0;
|
|
7835
7863
|
return /* @__PURE__ */ T("div", {
|
|
7836
7864
|
className: "relative",
|
|
@@ -7858,7 +7886,7 @@ var hl = ({ node: e, onNodeClick: t }) => {
|
|
|
7858
7886
|
]
|
|
7859
7887
|
}), i && n && /* @__PURE__ */ w("div", {
|
|
7860
7888
|
className: "relative ml-[11px] pl-3 border-l border-border animate-in slide-in-from-left-2 fade-in duration-200",
|
|
7861
|
-
children: e.children.map((e) => /* @__PURE__ */ w(
|
|
7889
|
+
children: e.children.map((e) => /* @__PURE__ */ w(vl, {
|
|
7862
7890
|
node: e,
|
|
7863
7891
|
onNodeClick: t
|
|
7864
7892
|
}, e.id))
|
|
@@ -7880,7 +7908,7 @@ e.register("tree-view", ({ schema: e, className: t, ...n }) => {
|
|
|
7880
7908
|
})
|
|
7881
7909
|
}), /* @__PURE__ */ w("div", {
|
|
7882
7910
|
className: "space-y-1",
|
|
7883
|
-
children: a.map((e) => /* @__PURE__ */ w(
|
|
7911
|
+
children: a.map((e) => /* @__PURE__ */ w(vl, {
|
|
7884
7912
|
node: e,
|
|
7885
7913
|
onNodeClick: r
|
|
7886
7914
|
}, e.id))
|
|
@@ -7953,11 +7981,11 @@ e.register("tree-view", ({ schema: e, className: t, ...n }) => {
|
|
|
7953
7981
|
});
|
|
7954
7982
|
//#endregion
|
|
7955
7983
|
//#region src/renderers/data-display/statistic.tsx
|
|
7956
|
-
var
|
|
7984
|
+
var yl = (e) => e ? Xc(e) : null;
|
|
7957
7985
|
//#endregion
|
|
7958
7986
|
//#region src/renderers/overlay/hover-card.tsx
|
|
7959
7987
|
e.register("statistic", ({ schema: e }) => {
|
|
7960
|
-
let t = e.icon ?
|
|
7988
|
+
let t = e.icon ? yl(e.icon) : null;
|
|
7961
7989
|
return /* @__PURE__ */ T("div", {
|
|
7962
7990
|
className: K("group relative flex flex-col p-4 sm:p-5 md:p-6 rounded-xl border bg-card text-card-foreground shadow-sm", e.className),
|
|
7963
7991
|
children: [
|
|
@@ -8967,13 +8995,13 @@ e.register("statistic", ({ schema: e }) => {
|
|
|
8967
8995
|
});
|
|
8968
8996
|
//#endregion
|
|
8969
8997
|
//#region src/renderers/overlay/dropdown-menu.tsx
|
|
8970
|
-
var
|
|
8998
|
+
var bl = (e) => e ? e.map((e, t) => e.type === "separator" ? /* @__PURE__ */ w(Gr, {}, t) : e.type === "label" ? /* @__PURE__ */ w(Wr, { children: e.label }, t) : e.children ? /* @__PURE__ */ T(Ir, { children: [/* @__PURE__ */ T(Rr, {
|
|
8971
8999
|
inset: e.inset,
|
|
8972
9000
|
children: [e.icon && /* @__PURE__ */ w("span", {
|
|
8973
9001
|
className: "mr-2",
|
|
8974
9002
|
children: e.icon
|
|
8975
9003
|
}), e.label]
|
|
8976
|
-
}), /* @__PURE__ */ w(zr, { children:
|
|
9004
|
+
}), /* @__PURE__ */ w(zr, { children: bl(e.children) })] }, t) : /* @__PURE__ */ T(Vr, {
|
|
8977
9005
|
disabled: e.disabled,
|
|
8978
9006
|
inset: e.inset,
|
|
8979
9007
|
onSelect: e.onSelect,
|
|
@@ -9003,7 +9031,7 @@ e.register("dropdown-menu", ({ schema: e, className: t, ...n }) => /* @__PURE__
|
|
|
9003
9031
|
children: [
|
|
9004
9032
|
e.label && /* @__PURE__ */ w(Wr, { children: e.label }),
|
|
9005
9033
|
e.label && /* @__PURE__ */ w(Gr, {}),
|
|
9006
|
-
|
|
9034
|
+
bl(e.items)
|
|
9007
9035
|
]
|
|
9008
9036
|
})]
|
|
9009
9037
|
}), {
|
|
@@ -9071,10 +9099,10 @@ e.register("dropdown-menu", ({ schema: e, className: t, ...n }) => /* @__PURE__
|
|
|
9071
9099
|
});
|
|
9072
9100
|
//#endregion
|
|
9073
9101
|
//#region src/renderers/overlay/context-menu.tsx
|
|
9074
|
-
var
|
|
9102
|
+
var xl = (e) => e ? e.map((e, t) => e.type === "separator" ? /* @__PURE__ */ w(br, {}, t) : e.type === "label" ? /* @__PURE__ */ w(yr, { children: e.label }, t) : e.children ? /* @__PURE__ */ T(dr, { children: [/* @__PURE__ */ w(pr, {
|
|
9075
9103
|
inset: e.inset,
|
|
9076
9104
|
children: e.label
|
|
9077
|
-
}), /* @__PURE__ */ w(mr, { children:
|
|
9105
|
+
}), /* @__PURE__ */ w(mr, { children: xl(e.children) })] }, t) : /* @__PURE__ */ T(gr, {
|
|
9078
9106
|
disabled: e.disabled,
|
|
9079
9107
|
inset: e.inset,
|
|
9080
9108
|
onSelect: e.onSelect,
|
|
@@ -9098,7 +9126,7 @@ e.register("context-menu", ({ schema: e, className: t, ...n }) => {
|
|
|
9098
9126
|
})
|
|
9099
9127
|
}), /* @__PURE__ */ w(hr, {
|
|
9100
9128
|
className: i,
|
|
9101
|
-
children:
|
|
9129
|
+
children: xl(e.items)
|
|
9102
9130
|
})]
|
|
9103
9131
|
});
|
|
9104
9132
|
}, {
|
|
@@ -9737,7 +9765,7 @@ e.register("context-menu", ({ schema: e, className: t, ...n }) => {
|
|
|
9737
9765
|
});
|
|
9738
9766
|
//#endregion
|
|
9739
9767
|
//#region src/renderers/complex/data-table.tsx
|
|
9740
|
-
var
|
|
9768
|
+
var Sl = {
|
|
9741
9769
|
"table.rowsPerPage": "Rows per page",
|
|
9742
9770
|
"table.pageInfo": "Page {{current}} of {{total}}",
|
|
9743
9771
|
"table.totalRecords": "{{count}} total",
|
|
@@ -9758,12 +9786,12 @@ var yl = {
|
|
|
9758
9786
|
"table.delete": "Delete",
|
|
9759
9787
|
"common.actions": "Actions"
|
|
9760
9788
|
};
|
|
9761
|
-
function
|
|
9789
|
+
function Cl() {
|
|
9762
9790
|
try {
|
|
9763
9791
|
let e = f();
|
|
9764
9792
|
return e.t("table.rowsPerPage") === "table.rowsPerPage" ? {
|
|
9765
9793
|
t: (e, t) => {
|
|
9766
|
-
let n =
|
|
9794
|
+
let n = Sl[e] || e;
|
|
9767
9795
|
if (t) for (let [e, r] of Object.entries(t)) n = n.replace(`{{${e}}}`, String(r));
|
|
9768
9796
|
return n;
|
|
9769
9797
|
},
|
|
@@ -9775,7 +9803,7 @@ function bl() {
|
|
|
9775
9803
|
} catch {
|
|
9776
9804
|
return {
|
|
9777
9805
|
t: (e, t) => {
|
|
9778
|
-
let n =
|
|
9806
|
+
let n = Sl[e] || e;
|
|
9779
9807
|
if (t) for (let [e, r] of Object.entries(t)) n = n.replace(`{{${e}}}`, String(r));
|
|
9780
9808
|
return n;
|
|
9781
9809
|
},
|
|
@@ -9784,7 +9812,7 @@ function bl() {
|
|
|
9784
9812
|
}
|
|
9785
9813
|
}
|
|
9786
9814
|
e.register("data-table", ({ schema: t }) => {
|
|
9787
|
-
let { caption: n, columns: r = [], data: i = [], pagination: a = !0, pageSize: o = 10, searchable: s = !0, selectable: c = !1, sortable: l = !0, exportable: u = !1, rowActions: d = !1, resizableColumns: f = !0, reorderableColumns: p = !0, editable: m = !1, singleClickEdit: g = !1, selectionStyle: _ = "always", rowClassName: S, rowStyle: E, className: D, cellClassName: O, frozenColumns: k = 0, showRowNumbers: A = !1, showAddRow: ee = !1, borderless: te = !1 } = t, { t: j, language: ne } =
|
|
9815
|
+
let { caption: n, columns: r = [], data: i = [], pagination: a = !0, pageSize: o = 10, searchable: s = !0, selectable: c = !1, sortable: l = !0, exportable: u = !1, rowActions: d = !1, resizableColumns: f = !0, reorderableColumns: p = !0, editable: m = !1, singleClickEdit: g = !1, selectionStyle: _ = "always", rowClassName: S, rowStyle: E, className: D, cellClassName: O, frozenColumns: k = 0, showRowNumbers: A = !1, showAddRow: ee = !1, borderless: te = !1 } = t, { t: j, language: ne } = Cl(), re = /^\d{4}-\d{2}-\d{2}(?:T\d{2}:\d{2}(?::\d{2}(?:\.\d+)?)?(?:Z|[+-]\d{2}:?\d{2})?)?$/, ie = h.useCallback((e) => {
|
|
9788
9816
|
if (typeof e != "string" || e.length < 8 || !re.test(e)) return e;
|
|
9789
9817
|
let t = Date.parse(e);
|
|
9790
9818
|
if (Number.isNaN(t)) return e;
|
|
@@ -9824,7 +9852,7 @@ e.register("data-table", ({ schema: t }) => {
|
|
|
9824
9852
|
e[n.accessorKey] = Math.min(400, Math.max(80, t * 8 + 48));
|
|
9825
9853
|
}
|
|
9826
9854
|
return e;
|
|
9827
|
-
}, [r, oe]), [me, he] = x(""), [ge, ye] = x(null), [be, xe] = x(null), [Se, we] = x(/* @__PURE__ */ new Set()), [N, P] = x(1), [Te, Ee] = x(o), [De, ke] = x(ce), [Ae, Me] = x({}), [Ne, Pe] = x(null), [Le, ze] = x(null), [Be, Ve] = x(null), [He, Ue] = x(""), [
|
|
9855
|
+
}, [r, oe]), [me, he] = x(""), [ge, ye] = x(null), [be, xe] = x(null), [Se, we] = x(/* @__PURE__ */ new Set()), [N, P] = x(1), [Te, Ee] = x(o), [De, ke] = x(ce), [Ae, Me] = x({}), [Ne, Pe] = x(null), [Le, ze] = x(null), [Be, Ve] = x(null), [He, Ue] = x(""), [Ge, F] = x(/* @__PURE__ */ new Map()), [I, Ke] = x(!1), [L, qe] = x(null), Je = b(null), Ye = b(0), Xe = b(0), Ze = b(null);
|
|
9828
9856
|
v(() => {
|
|
9829
9857
|
ke(ce);
|
|
9830
9858
|
}, [ce]);
|
|
@@ -9915,22 +9943,22 @@ e.register("data-table", ({ schema: t }) => {
|
|
|
9915
9943
|
rowIndex: e,
|
|
9916
9944
|
columnKey: t
|
|
9917
9945
|
});
|
|
9918
|
-
let n =
|
|
9946
|
+
let n = Ge.get(e), r = z[e][t];
|
|
9919
9947
|
Ue(n?.[t] ?? r ?? "");
|
|
9920
9948
|
}, dt = (e = !1) => {
|
|
9921
9949
|
if (!Be || !e && Be === null) return;
|
|
9922
|
-
let { rowIndex: n, columnKey: r } = Be, i = (N - 1) * Te + n, a = R[i], o = new Map(
|
|
9923
|
-
s[r] = He, o.set(n, s),
|
|
9950
|
+
let { rowIndex: n, columnKey: r } = Be, i = (N - 1) * Te + n, a = R[i], o = new Map(Ge), s = o.get(n) || {};
|
|
9951
|
+
s[r] = He, o.set(n, s), F(o), t.onCellChange && t.onCellChange(i, r, He, a), Ve(null), Ue("");
|
|
9924
9952
|
}, ft = () => {
|
|
9925
9953
|
Ve(null), Ue("");
|
|
9926
9954
|
}, pt = async (e) => {
|
|
9927
|
-
let n = (N - 1) * Te + e, r = R[n], i =
|
|
9955
|
+
let n = (N - 1) * Te + e, r = R[n], i = Ge.get(e);
|
|
9928
9956
|
if (!(!i || Object.keys(i).length === 0)) {
|
|
9929
9957
|
Ke(!0);
|
|
9930
9958
|
try {
|
|
9931
9959
|
t.onRowSave && await t.onRowSave(n, i, r);
|
|
9932
|
-
let a = new Map(
|
|
9933
|
-
a.delete(e),
|
|
9960
|
+
let a = new Map(Ge);
|
|
9961
|
+
a.delete(e), F(a);
|
|
9934
9962
|
} catch (e) {
|
|
9935
9963
|
console.error("Failed to save row:", e);
|
|
9936
9964
|
} finally {
|
|
@@ -9938,13 +9966,13 @@ e.register("data-table", ({ schema: t }) => {
|
|
|
9938
9966
|
}
|
|
9939
9967
|
}
|
|
9940
9968
|
}, mt = (e) => {
|
|
9941
|
-
let t = new Map(
|
|
9942
|
-
t.delete(e),
|
|
9969
|
+
let t = new Map(Ge);
|
|
9970
|
+
t.delete(e), F(t);
|
|
9943
9971
|
}, ht = async () => {
|
|
9944
|
-
if (
|
|
9972
|
+
if (Ge.size !== 0) {
|
|
9945
9973
|
Ke(!0);
|
|
9946
9974
|
try {
|
|
9947
|
-
let e = Array.from(
|
|
9975
|
+
let e = Array.from(Ge.entries()).map(([e, t]) => {
|
|
9948
9976
|
let n = (N - 1) * Te + e;
|
|
9949
9977
|
return {
|
|
9950
9978
|
rowIndex: n,
|
|
@@ -9952,7 +9980,7 @@ e.register("data-table", ({ schema: t }) => {
|
|
|
9952
9980
|
row: R[n]
|
|
9953
9981
|
};
|
|
9954
9982
|
});
|
|
9955
|
-
t.onBatchSave && await t.onBatchSave(e),
|
|
9983
|
+
t.onBatchSave && await t.onBatchSave(e), F(/* @__PURE__ */ new Map());
|
|
9956
9984
|
} catch (e) {
|
|
9957
9985
|
console.error("Failed to save batch:", e);
|
|
9958
9986
|
} finally {
|
|
@@ -9960,7 +9988,7 @@ e.register("data-table", ({ schema: t }) => {
|
|
|
9960
9988
|
}
|
|
9961
9989
|
}
|
|
9962
9990
|
}, G = () => {
|
|
9963
|
-
|
|
9991
|
+
F(/* @__PURE__ */ new Map());
|
|
9964
9992
|
}, gt = (e, t, n) => {
|
|
9965
9993
|
if ((e.ctrlKey || e.metaKey) && e.key === "c" && !Be) {
|
|
9966
9994
|
e.preventDefault();
|
|
@@ -9986,7 +10014,7 @@ e.register("data-table", ({ schema: t }) => {
|
|
|
9986
10014
|
}), yt = z.some((e, t) => {
|
|
9987
10015
|
let n = B(e, (N - 1) * Te + t);
|
|
9988
10016
|
return Se.has(n);
|
|
9989
|
-
}) && !vt, bt =
|
|
10017
|
+
}) && !vt, bt = Ge.size > 0, xt = s || u || c && Se.size > 0 || bt;
|
|
9990
10018
|
return /* @__PURE__ */ T("div", {
|
|
9991
10019
|
className: `flex flex-col h-full gap-2 sm:gap-4 ${D || ""}`,
|
|
9992
10020
|
children: [
|
|
@@ -10011,21 +10039,21 @@ e.register("data-table", ({ schema: t }) => {
|
|
|
10011
10039
|
bt && /* @__PURE__ */ T(C, { children: [
|
|
10012
10040
|
/* @__PURE__ */ w("div", {
|
|
10013
10041
|
className: "text-sm text-muted-foreground",
|
|
10014
|
-
children: j("table.modified", { count:
|
|
10042
|
+
children: j("table.modified", { count: Ge.size })
|
|
10015
10043
|
}),
|
|
10016
10044
|
/* @__PURE__ */ T(J, {
|
|
10017
10045
|
variant: "outline",
|
|
10018
10046
|
size: "sm",
|
|
10019
10047
|
onClick: G,
|
|
10020
|
-
disabled:
|
|
10021
|
-
children: [/* @__PURE__ */ w(
|
|
10048
|
+
disabled: I,
|
|
10049
|
+
children: [/* @__PURE__ */ w(We, { className: "h-4 w-4 mr-2" }), j("table.cancelAll")]
|
|
10022
10050
|
}),
|
|
10023
10051
|
/* @__PURE__ */ T(J, {
|
|
10024
10052
|
variant: "default",
|
|
10025
10053
|
size: "sm",
|
|
10026
10054
|
onClick: ht,
|
|
10027
|
-
disabled:
|
|
10028
|
-
children: [/* @__PURE__ */ w(Fe, { className: "h-4 w-4 mr-2" }), j("table.saveAll", { count:
|
|
10055
|
+
disabled: I,
|
|
10056
|
+
children: [/* @__PURE__ */ w(Fe, { className: "h-4 w-4 mr-2" }), j("table.saveAll", { count: Ge.size })]
|
|
10029
10057
|
})
|
|
10030
10058
|
] }),
|
|
10031
10059
|
u && /* @__PURE__ */ T(J, {
|
|
@@ -10140,7 +10168,7 @@ e.register("data-table", ({ schema: t }) => {
|
|
|
10140
10168
|
})
|
|
10141
10169
|
})
|
|
10142
10170
|
}) : /* @__PURE__ */ T(C, { children: [z.map((e, n) => {
|
|
10143
|
-
let r = (N - 1) * Te + n, i = B(e, r), a = Se.has(i), o =
|
|
10171
|
+
let r = (N - 1) * Te + n, i = B(e, r), a = Se.has(i), o = Ge.has(n), s = Ge.get(n) || {};
|
|
10144
10172
|
return /* @__PURE__ */ T(po, {
|
|
10145
10173
|
"data-state": a ? "selected" : void 0,
|
|
10146
10174
|
className: K("bg-background border-b border-border group/row transition-colors", "hover:bg-muted/40", "data-[state=selected]:bg-primary/5 data-[state=selected]:hover:bg-primary/10", "focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-inset", t.onRowClick && "cursor-pointer", o && "bg-amber-50 dark:bg-amber-950/20", S && S(e, n)),
|
|
@@ -10220,14 +10248,14 @@ e.register("data-table", ({ schema: t }) => {
|
|
|
10220
10248
|
variant: "ghost",
|
|
10221
10249
|
size: "icon",
|
|
10222
10250
|
onClick: () => mt(n),
|
|
10223
|
-
disabled:
|
|
10251
|
+
disabled: I,
|
|
10224
10252
|
title: "Cancel changes",
|
|
10225
|
-
children: /* @__PURE__ */ w(
|
|
10253
|
+
children: /* @__PURE__ */ w(We, { className: "h-4 w-4" })
|
|
10226
10254
|
}), /* @__PURE__ */ w(J, {
|
|
10227
10255
|
variant: "ghost",
|
|
10228
10256
|
size: "icon",
|
|
10229
10257
|
onClick: () => pt(n),
|
|
10230
|
-
disabled:
|
|
10258
|
+
disabled: I,
|
|
10231
10259
|
title: "Save row",
|
|
10232
10260
|
children: /* @__PURE__ */ w(Fe, { className: "h-4 w-4 text-green-600" })
|
|
10233
10261
|
})] }) : (t.onRowEdit || t.onRowDelete) && /* @__PURE__ */ T(Mr, { children: [/* @__PURE__ */ w(Nr, {
|
|
@@ -10386,7 +10414,7 @@ e.register("data-table", ({ schema: t }) => {
|
|
|
10386
10414
|
type: "button",
|
|
10387
10415
|
className: "flex w-full items-center gap-2 rounded-sm px-2 py-1.5 text-sm hover:bg-accent hover:text-accent-foreground cursor-pointer",
|
|
10388
10416
|
onClick: () => H(L.columnKey),
|
|
10389
|
-
children: [/* @__PURE__ */ w(
|
|
10417
|
+
children: [/* @__PURE__ */ w(We, { className: "h-3.5 w-3.5" }), j("table.hideColumn")]
|
|
10390
10418
|
})]
|
|
10391
10419
|
})
|
|
10392
10420
|
]
|
|
@@ -10599,19 +10627,19 @@ e.register("data-table", ({ schema: t }) => {
|
|
|
10599
10627
|
});
|
|
10600
10628
|
//#endregion
|
|
10601
10629
|
//#region src/renderers/action/resolve-icon.ts
|
|
10602
|
-
function
|
|
10630
|
+
function wl(e) {
|
|
10603
10631
|
return e.split("-").map((e) => e.charAt(0).toUpperCase() + e.slice(1)).join("");
|
|
10604
10632
|
}
|
|
10605
|
-
var
|
|
10606
|
-
function
|
|
10633
|
+
var Tl = { Home: "House" };
|
|
10634
|
+
function El(e) {
|
|
10607
10635
|
if (!e) return null;
|
|
10608
|
-
let t =
|
|
10609
|
-
return
|
|
10636
|
+
let t = wl(e);
|
|
10637
|
+
return Ge[Tl[t] || t] ?? null;
|
|
10610
10638
|
}
|
|
10611
10639
|
//#endregion
|
|
10612
10640
|
//#region src/renderers/action/action-button.tsx
|
|
10613
|
-
var
|
|
10614
|
-
let { "data-obj-id": a, "data-obj-type": o, style: s, data: d, ...f } = r, { execute: p } = l(), [m, h] = x(!1), g = typeof d == "object" && d ? d : {}, v = u(c(e.visible), g), y = u(c(e.enabled), g), b =
|
|
10641
|
+
var Dl = g(({ schema: e, className: t, context: n, ...r }, i) => {
|
|
10642
|
+
let { "data-obj-id": a, "data-obj-type": o, style: s, data: d, ...f } = r, { execute: p } = l(), [m, h] = x(!1), g = typeof d == "object" && d ? d : {}, v = u(c(e.visible), g), y = u(c(e.enabled), g), b = El(e.icon), S = e.variant === "primary" ? "default" : e.variant || "default", C = e.size === "md" ? "default" : e.size || "default", E = _(async () => {
|
|
10615
10643
|
if (!m) {
|
|
10616
10644
|
h(!0);
|
|
10617
10645
|
try {
|
|
@@ -10660,7 +10688,7 @@ var wl = g(({ schema: e, className: t, context: n, ...r }, i) => {
|
|
|
10660
10688
|
]
|
|
10661
10689
|
});
|
|
10662
10690
|
});
|
|
10663
|
-
|
|
10691
|
+
Dl.displayName = "ActionButtonRenderer", e.register("action:button", Dl, {
|
|
10664
10692
|
namespace: "action",
|
|
10665
10693
|
label: "Action Button",
|
|
10666
10694
|
inputs: [
|
|
@@ -10739,8 +10767,8 @@ wl.displayName = "ActionButtonRenderer", e.register("action:button", wl, {
|
|
|
10739
10767
|
});
|
|
10740
10768
|
//#endregion
|
|
10741
10769
|
//#region src/renderers/action/action-icon.tsx
|
|
10742
|
-
var
|
|
10743
|
-
let { "data-obj-id": a, "data-obj-type": o, style: s, ...d } = r, { execute: f } = l(), [p, m] = x(!1), h = u(c(e.visible)), g = u(c(e.enabled)), v =
|
|
10770
|
+
var Ol = g(({ schema: e, className: t, context: n, ...r }, i) => {
|
|
10771
|
+
let { "data-obj-id": a, "data-obj-type": o, style: s, ...d } = r, { execute: f } = l(), [p, m] = x(!1), h = u(c(e.visible)), g = u(c(e.enabled)), v = El(e.icon), y = e.variant === "primary" ? "default" : e.variant || "ghost", b = _(async () => {
|
|
10744
10772
|
if (!p) {
|
|
10745
10773
|
m(!0);
|
|
10746
10774
|
try {
|
|
@@ -10796,7 +10824,7 @@ var Tl = g(({ schema: e, className: t, context: n, ...r }, i) => {
|
|
|
10796
10824
|
}), /* @__PURE__ */ w(Ea, { children: /* @__PURE__ */ w("p", { children: e.label || e.description }) })] })
|
|
10797
10825
|
}) : S;
|
|
10798
10826
|
});
|
|
10799
|
-
|
|
10827
|
+
Ol.displayName = "ActionIconRenderer", e.register("action:icon", Ol, {
|
|
10800
10828
|
namespace: "action",
|
|
10801
10829
|
label: "Action Icon",
|
|
10802
10830
|
inputs: [
|
|
@@ -10861,7 +10889,7 @@ Tl.displayName = "ActionIconRenderer", e.register("action:icon", Tl, {
|
|
|
10861
10889
|
});
|
|
10862
10890
|
//#endregion
|
|
10863
10891
|
//#region src/renderers/action/action-menu.tsx
|
|
10864
|
-
function
|
|
10892
|
+
function kl() {
|
|
10865
10893
|
try {
|
|
10866
10894
|
let { t: e } = Dt(), t = e("detail.moreActions");
|
|
10867
10895
|
return !t || t === "detail.moreActions" ? "More actions" : t;
|
|
@@ -10869,9 +10897,9 @@ function El() {
|
|
|
10869
10897
|
return "More actions";
|
|
10870
10898
|
}
|
|
10871
10899
|
}
|
|
10872
|
-
var
|
|
10900
|
+
var Al = ({ action: e, onExecute: t }) => {
|
|
10873
10901
|
let n = u(c(e.visible)), r = u(c(e.enabled)), i = y(() => {
|
|
10874
|
-
let t =
|
|
10902
|
+
let t = El(e.icon);
|
|
10875
10903
|
return t ? /* @__PURE__ */ w(t, { className: "mr-2 h-4 w-4" }) : null;
|
|
10876
10904
|
}, [e.icon]);
|
|
10877
10905
|
return e.visible && !n ? null : /* @__PURE__ */ T(Vr, {
|
|
@@ -10883,9 +10911,9 @@ var Dl = ({ action: e, onExecute: t }) => {
|
|
|
10883
10911
|
children: [i, /* @__PURE__ */ w("span", { children: e.label || e.name })]
|
|
10884
10912
|
});
|
|
10885
10913
|
};
|
|
10886
|
-
|
|
10887
|
-
var
|
|
10888
|
-
let { "data-obj-id": i, "data-obj-type": a, style: o, ...s } = n, { execute: d } = l(), [f, p] = x(!1), m =
|
|
10914
|
+
Al.displayName = "ActionMenuItem";
|
|
10915
|
+
var jl = g(({ schema: e, className: t, ...n }, r) => {
|
|
10916
|
+
let { "data-obj-id": i, "data-obj-type": a, style: o, ...s } = n, { execute: d } = l(), [f, p] = x(!1), m = kl(), g = u(c(e.visible)), v = El(e.icon) || Oe, y = e.variant || "ghost", b = e.size || "icon", S = _(async (e) => {
|
|
10889
10917
|
p(!0);
|
|
10890
10918
|
try {
|
|
10891
10919
|
if (typeof e.onClick == "function") {
|
|
@@ -10932,14 +10960,14 @@ var Ol = g(({ schema: e, className: t, ...n }, r) => {
|
|
|
10932
10960
|
align: "end",
|
|
10933
10961
|
children: E.map((e, t) => {
|
|
10934
10962
|
let n = e.tags?.includes("separator-before") && t > 0;
|
|
10935
|
-
return /* @__PURE__ */ T(h.Fragment, { children: [n && /* @__PURE__ */ w(Gr, {}), /* @__PURE__ */ w(
|
|
10963
|
+
return /* @__PURE__ */ T(h.Fragment, { children: [n && /* @__PURE__ */ w(Gr, {}), /* @__PURE__ */ w(Al, {
|
|
10936
10964
|
action: e,
|
|
10937
10965
|
onExecute: S
|
|
10938
10966
|
})] }, e.name || t);
|
|
10939
10967
|
})
|
|
10940
10968
|
})] });
|
|
10941
10969
|
});
|
|
10942
|
-
|
|
10970
|
+
jl.displayName = "ActionMenuRenderer", e.register("action:menu", jl, {
|
|
10943
10971
|
namespace: "action",
|
|
10944
10972
|
label: "Action Menu",
|
|
10945
10973
|
inputs: [
|
|
@@ -10984,8 +11012,8 @@ Ol.displayName = "ActionMenuRenderer", e.register("action:menu", Ol, {
|
|
|
10984
11012
|
});
|
|
10985
11013
|
//#endregion
|
|
10986
11014
|
//#region src/renderers/action/action-group.tsx
|
|
10987
|
-
var
|
|
10988
|
-
let [i, a] = x(!1), o = u(c(e.visible)), s = u(c(e.enabled)), l =
|
|
11015
|
+
var Ml = ({ action: e, variant: t, size: n, onExecute: r }) => {
|
|
11016
|
+
let [i, a] = x(!1), o = u(c(e.visible)), s = u(c(e.enabled)), l = El(e.icon), d = e.variant === "primary" ? "default" : e.variant || t || "outline", f = e.size === "md" ? "default" : e.size || n || "sm", p = _(async () => {
|
|
10989
11017
|
if (!i) {
|
|
10990
11018
|
a(!0);
|
|
10991
11019
|
try {
|
|
@@ -11013,8 +11041,8 @@ var kl = ({ action: e, variant: t, size: n, onExecute: r }) => {
|
|
|
11013
11041
|
]
|
|
11014
11042
|
});
|
|
11015
11043
|
};
|
|
11016
|
-
|
|
11017
|
-
var
|
|
11044
|
+
Ml.displayName = "InlineActionButton";
|
|
11045
|
+
var Nl = g(({ schema: e, className: t, ...n }, r) => {
|
|
11018
11046
|
let { "data-obj-id": i, "data-obj-type": a, style: o, ...s } = n, { execute: d } = l(), [f, p] = x(!1), m = u(c(e.visible)), g = e.actions || [];
|
|
11019
11047
|
e.location && (g = g.filter((t) => !t.locations || t.locations.includes(e.location)));
|
|
11020
11048
|
let v = _(async (e) => {
|
|
@@ -11035,7 +11063,7 @@ var Al = g(({ schema: e, className: t, ...n }, r) => {
|
|
|
11035
11063
|
}, [d]);
|
|
11036
11064
|
if (e.visible && !m || g.length === 0) return null;
|
|
11037
11065
|
if ((e.display || "inline") === "dropdown") {
|
|
11038
|
-
let n =
|
|
11066
|
+
let n = El(e.icon);
|
|
11039
11067
|
return /* @__PURE__ */ T(Mr, { children: [/* @__PURE__ */ w(Nr, {
|
|
11040
11068
|
asChild: !0,
|
|
11041
11069
|
children: /* @__PURE__ */ T(J, {
|
|
@@ -11057,7 +11085,7 @@ var Al = g(({ schema: e, className: t, ...n }, r) => {
|
|
|
11057
11085
|
}), /* @__PURE__ */ w(Br, {
|
|
11058
11086
|
align: "end",
|
|
11059
11087
|
children: g.map((e, t) => {
|
|
11060
|
-
let n =
|
|
11088
|
+
let n = El(e.icon), r = e.tags?.includes("separator-before") && t > 0;
|
|
11061
11089
|
return /* @__PURE__ */ T(h.Fragment, { children: [r && /* @__PURE__ */ w(Gr, {}), /* @__PURE__ */ T(Vr, {
|
|
11062
11090
|
onSelect: async (t) => {
|
|
11063
11091
|
t.preventDefault(), p(!0);
|
|
@@ -11080,7 +11108,7 @@ var Al = g(({ schema: e, className: t, ...n }, r) => {
|
|
|
11080
11108
|
"data-obj-id": i,
|
|
11081
11109
|
"data-obj-type": a,
|
|
11082
11110
|
style: o,
|
|
11083
|
-
children: g.map((t) => /* @__PURE__ */ w(
|
|
11111
|
+
children: g.map((t) => /* @__PURE__ */ w(Ml, {
|
|
11084
11112
|
action: t,
|
|
11085
11113
|
variant: e.variant,
|
|
11086
11114
|
size: e.size,
|
|
@@ -11088,7 +11116,7 @@ var Al = g(({ schema: e, className: t, ...n }, r) => {
|
|
|
11088
11116
|
}, t.name))
|
|
11089
11117
|
});
|
|
11090
11118
|
});
|
|
11091
|
-
|
|
11119
|
+
Nl.displayName = "ActionGroupRenderer", e.register("action:group", Nl, {
|
|
11092
11120
|
namespace: "action",
|
|
11093
11121
|
label: "Action Group",
|
|
11094
11122
|
inputs: [
|
|
@@ -11158,7 +11186,7 @@ Al.displayName = "ActionGroupRenderer", e.register("action:group", Al, {
|
|
|
11158
11186
|
});
|
|
11159
11187
|
//#endregion
|
|
11160
11188
|
//#region src/renderers/action/action-bar.tsx
|
|
11161
|
-
function
|
|
11189
|
+
function Pl() {
|
|
11162
11190
|
try {
|
|
11163
11191
|
let { t: e } = Dt(), t = e("common.actions");
|
|
11164
11192
|
return !t || t === "common.actions" ? "Actions" : t;
|
|
@@ -11166,8 +11194,8 @@ function jl() {
|
|
|
11166
11194
|
return "Actions";
|
|
11167
11195
|
}
|
|
11168
11196
|
}
|
|
11169
|
-
var
|
|
11170
|
-
let a =
|
|
11197
|
+
var Fl = g(({ schema: t, className: n, ...r }, i) => {
|
|
11198
|
+
let a = Pl(), { "data-obj-id": o, "data-obj-type": s, style: l, data: d, actions: f, systemActions: p, location: m, maxVisible: h, mobileMaxVisible: g, direction: _, gap: v, variant: b, size: x, visible: S, ...C } = r, E = u(c(t.visible)), D = Sa(), O = y(() => {
|
|
11171
11199
|
let e = t.actions || [], n = t.location ? e.filter((e) => !e.locations || e.locations.length === 0 || e.locations.includes(t.location)) : e, r = /* @__PURE__ */ new Set();
|
|
11172
11200
|
return n.filter((e) => e.name ? r.has(e.name) ? !1 : (r.add(e.name), !0) : !0);
|
|
11173
11201
|
}, [t.actions, t.location]), k = y(() => {
|
|
@@ -11223,7 +11251,7 @@ var Ml = g(({ schema: t, className: n, ...r }, i) => {
|
|
|
11223
11251
|
}), j.length > 0 && ie]
|
|
11224
11252
|
});
|
|
11225
11253
|
});
|
|
11226
|
-
|
|
11254
|
+
Fl.displayName = "ActionBarRenderer", e.register("action:bar", Fl, {
|
|
11227
11255
|
namespace: "action",
|
|
11228
11256
|
label: "Action Bar",
|
|
11229
11257
|
inputs: [
|
|
@@ -11303,7 +11331,7 @@ Ml.displayName = "ActionBarRenderer", e.register("action:bar", Ml, {
|
|
|
11303
11331
|
});
|
|
11304
11332
|
//#endregion
|
|
11305
11333
|
//#region src/renderers/placeholders.tsx
|
|
11306
|
-
var
|
|
11334
|
+
var Il = ({ schema: e, className: t }) => {
|
|
11307
11335
|
let n = e.type, r = n.startsWith("view:"), i = n.startsWith("widget:"), a = n.startsWith("field:");
|
|
11308
11336
|
return /* @__PURE__ */ T("div", {
|
|
11309
11337
|
className: K("flex flex-col items-center justify-center p-6 border-2 border-dashed rounded-lg bg-muted/30 transition-colors hover:bg-muted/50", r && "border-blue-300 bg-blue-50/50 min-h-[200px]", i && "border-purple-300 bg-purple-50/50 min-h-[150px]", a && "border-yellow-300 bg-yellow-50/50 p-2 min-h-[40px] flex-row gap-2 justify-start", t),
|
|
@@ -11330,15 +11358,15 @@ var Nl = ({ schema: e, className: t }) => {
|
|
|
11330
11358
|
})]
|
|
11331
11359
|
})]
|
|
11332
11360
|
});
|
|
11333
|
-
},
|
|
11334
|
-
function
|
|
11335
|
-
|
|
11336
|
-
e.get(t) || e.register(t,
|
|
11361
|
+
}, Ll = /* @__PURE__ */ "view:grid.view:kanban.view:map.view:calendar.view:gantt.view:timeline.view:gallery.view:simple.view:wizard.view:tabbed.view:drawer.view:modal.view:split.field:text.field:textarea.field:password.field:email.field:url.field:phone.field:markdown.field:html.field:code.field:number.field:currency.field:percent.field:slider.field:boolean.field:checkboxes.field:select.field:multiselect.field:radio.field:date.field:datetime.field:time.field:duration.field:lookup.field:master_detail.field:tree.field:image.field:file.field:video.field:audio.field:avatar.field:color.field:rating.field:signature.field:qrcode.field:progress.field:json.field:address.field:location.page:header.page-header.page:footer.page:tabs.page:accordion.page:card.page:sidebar.record:details.record:highlights.record:related_list.record:activity.record:chatter.record:path.app:launcher.nav:menu.nav:breadcrumb.global:search.global:notifications.user:profile.widget:metric.widget:bar.widget:line.widget:pie.widget:funnel.widget:radar.widget:scatter.widget:heatmap.widget:pivot.widget:table.widget:text.widget:image.ai:input.ai:suggestion.ai:feedback".split(".");
|
|
11362
|
+
function Rl() {
|
|
11363
|
+
Ll.forEach((t) => {
|
|
11364
|
+
e.get(t) || e.register(t, Il);
|
|
11337
11365
|
});
|
|
11338
11366
|
}
|
|
11339
11367
|
//#endregion
|
|
11340
11368
|
//#region src/hooks/use-config-draft.ts
|
|
11341
|
-
function
|
|
11369
|
+
function zl(e, t) {
|
|
11342
11370
|
let n = t?.maxHistory ?? 50, [r, i] = x({ ...e }), [a, o] = x(t?.mode === "create"), s = b([]), c = b([]), [, l] = x(0);
|
|
11343
11371
|
v(() => {
|
|
11344
11372
|
i({ ...e }), o(t?.mode === "create"), s.current = [], c.current = [];
|
|
@@ -11375,7 +11403,7 @@ function Il(e, t) {
|
|
|
11375
11403
|
}
|
|
11376
11404
|
//#endregion
|
|
11377
11405
|
//#region src/hooks/use-resize-observer.tsx
|
|
11378
|
-
function
|
|
11406
|
+
function Bl(e) {
|
|
11379
11407
|
let [t, n] = m.useState({
|
|
11380
11408
|
width: 0,
|
|
11381
11409
|
height: 0
|
|
@@ -11405,16 +11433,16 @@ function Ll(e) {
|
|
|
11405
11433
|
}
|
|
11406
11434
|
//#endregion
|
|
11407
11435
|
//#region src/hooks/use-export-job.ts
|
|
11408
|
-
var
|
|
11436
|
+
var Vl = [
|
|
11409
11437
|
"completed",
|
|
11410
11438
|
"failed",
|
|
11411
11439
|
"cancelled",
|
|
11412
11440
|
"expired"
|
|
11413
11441
|
];
|
|
11414
|
-
function
|
|
11415
|
-
return !!e &&
|
|
11442
|
+
function Hl(e) {
|
|
11443
|
+
return !!e && Vl.includes(e);
|
|
11416
11444
|
}
|
|
11417
|
-
function
|
|
11445
|
+
function Ul(e = {}) {
|
|
11418
11446
|
let { dataSource: t, pollIntervalMs: n = 1500, maxAttempts: r = 600, onComplete: i, onError: a } = e, [o, s] = x(null), [c, l] = x(null), [u, d] = x(!1), f = b(null), p = b(null), m = b(0), h = b(!1), g = b({
|
|
11419
11447
|
onComplete: i,
|
|
11420
11448
|
onError: a
|
|
@@ -11439,7 +11467,7 @@ function Bl(e = {}) {
|
|
|
11439
11467
|
try {
|
|
11440
11468
|
let e = await t.getExportJobProgress(f.current);
|
|
11441
11469
|
if (h.current) return;
|
|
11442
|
-
if (s(e),
|
|
11470
|
+
if (s(e), Hl(e.status)) {
|
|
11443
11471
|
if (d(!1), e.status === "completed") g.current.onComplete?.(e);
|
|
11444
11472
|
else {
|
|
11445
11473
|
let t = e.error?.message ?? `Export ${e.status}`, n = Error(t);
|
|
@@ -11473,7 +11501,7 @@ function Bl(e = {}) {
|
|
|
11473
11501
|
processedRecords: 0,
|
|
11474
11502
|
totalRecords: i.estimatedRecords,
|
|
11475
11503
|
percentComplete: 0
|
|
11476
|
-
}),
|
|
11504
|
+
}), Hl(i.status)) {
|
|
11477
11505
|
if (d(!1), i.status === "completed" && t.getExportJobProgress) try {
|
|
11478
11506
|
let e = await t.getExportJobProgress(i.jobId);
|
|
11479
11507
|
s(e), g.current.onComplete?.(e);
|
|
@@ -11526,7 +11554,7 @@ function Bl(e = {}) {
|
|
|
11526
11554
|
}
|
|
11527
11555
|
//#endregion
|
|
11528
11556
|
//#region src/debug/DebugPanel.tsx
|
|
11529
|
-
function
|
|
11557
|
+
function Wl({ schema: e }) {
|
|
11530
11558
|
return e ? /* @__PURE__ */ w("pre", {
|
|
11531
11559
|
className: "text-[11px] leading-relaxed font-mono overflow-auto max-h-[60vh] whitespace-pre-wrap break-all",
|
|
11532
11560
|
children: JSON.stringify(e, null, 2)
|
|
@@ -11535,7 +11563,7 @@ function Vl({ schema: e }) {
|
|
|
11535
11563
|
children: "No schema available"
|
|
11536
11564
|
});
|
|
11537
11565
|
}
|
|
11538
|
-
function
|
|
11566
|
+
function Gl({ dataContext: e }) {
|
|
11539
11567
|
return e ? /* @__PURE__ */ w("pre", {
|
|
11540
11568
|
className: "text-[11px] leading-relaxed font-mono overflow-auto max-h-[60vh] whitespace-pre-wrap break-all",
|
|
11541
11569
|
children: JSON.stringify(e, null, 2)
|
|
@@ -11544,7 +11572,7 @@ function Hl({ dataContext: e }) {
|
|
|
11544
11572
|
children: "No data context available"
|
|
11545
11573
|
});
|
|
11546
11574
|
}
|
|
11547
|
-
function
|
|
11575
|
+
function Kl() {
|
|
11548
11576
|
let t = y(() => {
|
|
11549
11577
|
try {
|
|
11550
11578
|
return e.getAllTypes();
|
|
@@ -11571,7 +11599,7 @@ function Ul() {
|
|
|
11571
11599
|
})]
|
|
11572
11600
|
});
|
|
11573
11601
|
}
|
|
11574
|
-
function
|
|
11602
|
+
function ql({ flags: e }) {
|
|
11575
11603
|
return e ? /* @__PURE__ */ w("pre", {
|
|
11576
11604
|
className: "text-[11px] leading-relaxed font-mono overflow-auto max-h-[60vh] whitespace-pre-wrap break-all",
|
|
11577
11605
|
children: JSON.stringify(e, null, 2)
|
|
@@ -11580,14 +11608,14 @@ function Wl({ flags: e }) {
|
|
|
11580
11608
|
children: "No debug flags"
|
|
11581
11609
|
});
|
|
11582
11610
|
}
|
|
11583
|
-
function
|
|
11611
|
+
function Jl(e) {
|
|
11584
11612
|
let n = t.getInstance(), [r, i] = x(() => n.getEntries(e));
|
|
11585
11613
|
return h.useEffect(() => (i(n.getEntries(e)), n.subscribe(() => {
|
|
11586
11614
|
i(n.getEntries(e));
|
|
11587
11615
|
})), [n, e]), r;
|
|
11588
11616
|
}
|
|
11589
|
-
function
|
|
11590
|
-
let e =
|
|
11617
|
+
function Yl() {
|
|
11618
|
+
let e = Jl("perf").map((e) => e.data);
|
|
11591
11619
|
return e.length === 0 ? /* @__PURE__ */ w("p", {
|
|
11592
11620
|
className: "text-xs text-muted-foreground italic",
|
|
11593
11621
|
children: "No performance data collected yet"
|
|
@@ -11613,8 +11641,8 @@ function Kl() {
|
|
|
11613
11641
|
})]
|
|
11614
11642
|
});
|
|
11615
11643
|
}
|
|
11616
|
-
function
|
|
11617
|
-
let e =
|
|
11644
|
+
function Xl() {
|
|
11645
|
+
let e = Jl("expr").map((e) => e.data);
|
|
11618
11646
|
return e.length === 0 ? /* @__PURE__ */ w("p", {
|
|
11619
11647
|
className: "text-xs text-muted-foreground italic",
|
|
11620
11648
|
children: "No expression evaluations tracked yet"
|
|
@@ -11640,8 +11668,8 @@ function ql() {
|
|
|
11640
11668
|
})]
|
|
11641
11669
|
});
|
|
11642
11670
|
}
|
|
11643
|
-
function
|
|
11644
|
-
let e =
|
|
11671
|
+
function Zl() {
|
|
11672
|
+
let e = Jl("event").map((e) => e.data);
|
|
11645
11673
|
return e.length === 0 ? /* @__PURE__ */ w("p", {
|
|
11646
11674
|
className: "text-xs text-muted-foreground italic",
|
|
11647
11675
|
children: "No events captured yet"
|
|
@@ -11673,42 +11701,42 @@ function Jl() {
|
|
|
11673
11701
|
})]
|
|
11674
11702
|
});
|
|
11675
11703
|
}
|
|
11676
|
-
function
|
|
11704
|
+
function Ql({ open: e, onClose: t, flags: n, schema: r, dataContext: i, extraTabs: a = [], className: o }) {
|
|
11677
11705
|
let s = y(() => [
|
|
11678
11706
|
{
|
|
11679
11707
|
id: "schema",
|
|
11680
11708
|
label: "Schema",
|
|
11681
|
-
render: () => /* @__PURE__ */ w(
|
|
11709
|
+
render: () => /* @__PURE__ */ w(Wl, { schema: r })
|
|
11682
11710
|
},
|
|
11683
11711
|
{
|
|
11684
11712
|
id: "data",
|
|
11685
11713
|
label: "Data",
|
|
11686
|
-
render: () => /* @__PURE__ */ w(
|
|
11714
|
+
render: () => /* @__PURE__ */ w(Gl, { dataContext: i })
|
|
11687
11715
|
},
|
|
11688
11716
|
{
|
|
11689
11717
|
id: "perf",
|
|
11690
11718
|
label: "Perf",
|
|
11691
|
-
render: () => /* @__PURE__ */ w(
|
|
11719
|
+
render: () => /* @__PURE__ */ w(Yl, {})
|
|
11692
11720
|
},
|
|
11693
11721
|
{
|
|
11694
11722
|
id: "expr",
|
|
11695
11723
|
label: "Expr",
|
|
11696
|
-
render: () => /* @__PURE__ */ w(
|
|
11724
|
+
render: () => /* @__PURE__ */ w(Xl, {})
|
|
11697
11725
|
},
|
|
11698
11726
|
{
|
|
11699
11727
|
id: "events",
|
|
11700
11728
|
label: "Events",
|
|
11701
|
-
render: () => /* @__PURE__ */ w(
|
|
11729
|
+
render: () => /* @__PURE__ */ w(Zl, {})
|
|
11702
11730
|
},
|
|
11703
11731
|
{
|
|
11704
11732
|
id: "registry",
|
|
11705
11733
|
label: "Registry",
|
|
11706
|
-
render: () => /* @__PURE__ */ w(
|
|
11734
|
+
render: () => /* @__PURE__ */ w(Kl, {})
|
|
11707
11735
|
},
|
|
11708
11736
|
{
|
|
11709
11737
|
id: "flags",
|
|
11710
11738
|
label: "Flags",
|
|
11711
|
-
render: () => /* @__PURE__ */ w(
|
|
11739
|
+
render: () => /* @__PURE__ */ w(ql, { flags: n })
|
|
11712
11740
|
}
|
|
11713
11741
|
], [
|
|
11714
11742
|
r,
|
|
@@ -11761,8 +11789,8 @@ function Yl({ open: e, onClose: t, flags: n, schema: r, dataContext: i, extraTab
|
|
|
11761
11789
|
}
|
|
11762
11790
|
//#endregion
|
|
11763
11791
|
//#region src/index.ts
|
|
11764
|
-
function
|
|
11792
|
+
function $l() {
|
|
11765
11793
|
return !0;
|
|
11766
11794
|
}
|
|
11767
11795
|
//#endregion
|
|
11768
|
-
export { Nt as Accordion, It as AccordionContent, Pt as AccordionItem, Ft as AccordionTrigger, oc as ActionParamDialog, Xt as Alert, Qt as AlertDescription, Rt as AlertDialog, qt as AlertDialogAction, Jt as AlertDialogCancel, Ht as AlertDialogContent, Kt as AlertDialogDescription, Wt as AlertDialogFooter, Ut as AlertDialogHeader, Vt as AlertDialogOverlay, Bt as AlertDialogPortal, Gt as AlertDialogTitle, zt as AlertDialogTrigger, Zt as AlertTitle, $t as AspectRatio, en as Avatar, nn as AvatarFallback, tn as AvatarImage, an as Badge, on as Breadcrumb, fn as BreadcrumbEllipsis, cn as BreadcrumbItem, ln as BreadcrumbLink, sn as BreadcrumbList, un as BreadcrumbPage, dn as BreadcrumbSeparator, J as Button, Qo as ButtonGroup, es as ButtonGroupSeparator, $o as ButtonGroupText, pn as Calendar, mn as CalendarDayButton, hn as Card, yn as CardContent, vn as CardDescription, bn as CardFooter, gn as CardHeader, _n as CardTitle, Cn as Carousel, wn as CarouselContent, Tn as CarouselItem, Dn as CarouselNext, En as CarouselPrevious, jn as ChartContainer, Fn as ChartLegend, In as ChartLegendContent, dc as ChartSkeleton, Mn as ChartStyle, Nn as ChartTooltip, Pn as ChartTooltipContent, Rn as Checkbox, zn as Collapsible, Vn as CollapsibleContent, Bn as CollapsibleTrigger, ts as Combobox, Qn as Command, $n as CommandDialog, nr as CommandEmpty, rr as CommandGroup, er as CommandInput, ar as CommandItem, tr as CommandList, ir as CommandSeparator, or as CommandShortcut, bs as ConfigFieldRenderer, Ss as ConfigPanelRenderer, ns as ConfigRow, sr as ContextMenu, _r as ContextMenuCheckboxItem, hr as ContextMenuContent, lr as ContextMenuGroup, gr as ContextMenuItem, yr as ContextMenuLabel, ur as ContextMenuPortal, fr as ContextMenuRadioGroup, vr as ContextMenuRadioItem, br as ContextMenuSeparator, xr as ContextMenuShortcut, dr as ContextMenuSub, mr as ContextMenuSubContent, pr as ContextMenuSubTrigger, cr as ContextMenuTrigger,
|
|
11796
|
+
export { Nt as Accordion, It as AccordionContent, Pt as AccordionItem, Ft as AccordionTrigger, oc as ActionParamDialog, Xt as Alert, Qt as AlertDescription, Rt as AlertDialog, qt as AlertDialogAction, Jt as AlertDialogCancel, Ht as AlertDialogContent, Kt as AlertDialogDescription, Wt as AlertDialogFooter, Ut as AlertDialogHeader, Vt as AlertDialogOverlay, Bt as AlertDialogPortal, Gt as AlertDialogTitle, zt as AlertDialogTrigger, Zt as AlertTitle, $t as AspectRatio, en as Avatar, nn as AvatarFallback, tn as AvatarImage, an as Badge, on as Breadcrumb, fn as BreadcrumbEllipsis, cn as BreadcrumbItem, ln as BreadcrumbLink, sn as BreadcrumbList, un as BreadcrumbPage, dn as BreadcrumbSeparator, J as Button, Qo as ButtonGroup, es as ButtonGroupSeparator, $o as ButtonGroupText, pn as Calendar, mn as CalendarDayButton, hn as Card, yn as CardContent, vn as CardDescription, bn as CardFooter, gn as CardHeader, _n as CardTitle, Cn as Carousel, wn as CarouselContent, Tn as CarouselItem, Dn as CarouselNext, En as CarouselPrevious, jn as ChartContainer, Fn as ChartLegend, In as ChartLegendContent, dc as ChartSkeleton, Mn as ChartStyle, Nn as ChartTooltip, Pn as ChartTooltipContent, Rn as Checkbox, zn as Collapsible, Vn as CollapsibleContent, Bn as CollapsibleTrigger, ts as Combobox, Qn as Command, $n as CommandDialog, nr as CommandEmpty, rr as CommandGroup, er as CommandInput, ar as CommandItem, tr as CommandList, ir as CommandSeparator, or as CommandShortcut, bs as ConfigFieldRenderer, Ss as ConfigPanelRenderer, ns as ConfigRow, sr as ContextMenu, _r as ContextMenuCheckboxItem, hr as ContextMenuContent, lr as ContextMenuGroup, gr as ContextMenuItem, yr as ContextMenuLabel, ur as ContextMenuPortal, fr as ContextMenuRadioGroup, vr as ContextMenuRadioItem, br as ContextMenuSeparator, xr as ContextMenuShortcut, dr as ContextMenuSub, mr as ContextMenuSubContent, pr as ContextMenuSubTrigger, cr as ContextMenuTrigger, _c as DataEmptyState, vc as DataErrorState, gc as DataLoadingState, Cs as DatePicker, Ql as DebugPanel, Hn as Dialog, Gn as DialogClose, qn as DialogContent, Zn as DialogDescription, Yn as DialogFooter, Jn as DialogHeader, Kn as DialogOverlay, Wn as DialogPortal, Xn as DialogTitle, Un as DialogTrigger, Sr as Drawer, Tr as DrawerClose, Dr as DrawerContent, jr as DrawerDescription, kr as DrawerFooter, Or as DrawerHeader, Er as DrawerOverlay, wr as DrawerPortal, Ar as DrawerTitle, Cr as DrawerTrigger, Mr as DropdownMenu, Hr as DropdownMenuCheckboxItem, Br as DropdownMenuContent, Pr as DropdownMenuGroup, Vr as DropdownMenuItem, Wr as DropdownMenuLabel, Fr as DropdownMenuPortal, Lr as DropdownMenuRadioGroup, Ur as DropdownMenuRadioItem, Gr as DropdownMenuSeparator, Kr as DropdownMenuShortcut, Ir as DropdownMenuSub, zr as DropdownMenuSubContent, Rr as DropdownMenuSubTrigger, Nr as DropdownMenuTrigger, Ts as Empty, js as EmptyContent, As as EmptyDescription, Es as EmptyHeader, Os as EmptyMedia, ks as EmptyTitle, Ms as EmptyValue, xc as ExportProgressDialog, Ps as Field, _s as FilterBuilder, Jr as Form, ti as FormControl, ni as FormDescription, Xr as FormField, $r as FormItem, ei as FormLabel, ri as FormMessage, lc as FormSkeleton, sc as GridSkeleton, ac as GroupingEditor, ii as HoverCard, oi as HoverCardContent, ai as HoverCardTrigger, X as Input, Fs as InputGroup, si as InputOTP, ci as InputOTPGroup, ui as InputOTPSeparator, li as InputOTPSlot, zs as Item, Gs as ItemActions, Hs as ItemContent, Ws as ItemDescription, qs as ItemFooter, Is as ItemGroup, Ks as ItemHeader, Vs as ItemMedia, Ls as ItemSeparator, Us as ItemTitle, cc as KanbanSkeleton, Js as Kbd, Ys as KbdGroup, Y as Label, Zc as LazyIcon, uc as ListSkeleton, vs as LookupValuePicker, gi as Menubar, Si as MenubarCheckboxItem, bi as MenubarContent, fi as MenubarGroup, xi as MenubarItem, wi as MenubarLabel, di as MenubarMenu, pi as MenubarPortal, mi as MenubarRadioGroup, Ci as MenubarRadioItem, Ti as MenubarSeparator, Ei as MenubarShortcut, hi as MenubarSub, yi as MenubarSubContent, vi as MenubarSubTrigger, _i as MenubarTrigger, yc as MobileDialogContent, Xs as NativeSelect, Di as NavigationMenu, Mi as NavigationMenuContent, Fi as NavigationMenuIndicator, ki as NavigationMenuItem, Ni as NavigationMenuLink, Oi as NavigationMenuList, ji as NavigationMenuTrigger, Pi as NavigationMenuViewport, nc as NavigationOverlay, Ii as Pagination, Li as PaginationContent, Hi as PaginationEllipsis, Ri as PaginationItem, zi as PaginationLink, Vi as PaginationNext, Bi as PaginationPrevious, Ui as Popover, Gi as PopoverContent, Wi as PopoverTrigger, Ki as Progress, qi as RadioGroup, Ji as RadioGroupItem, hc as RefreshIndicator, dl as RelatedCountStore, Zi as ResizableHandle, Xi as ResizablePanel, Yi as ResizablePanelGroup, Qi as ScrollArea, $i as ScrollBar, xs as SectionHeader, ea as Select, oa as SelectContent, ta as SelectGroup, Z as SelectItem, sa as SelectLabel, aa as SelectScrollDownButton, ia as SelectScrollUpButton, ca as SelectSeparator, ra as SelectTrigger, na as SelectValue, la as Separator, ua as Sheet, fa as SheetClose, ga as SheetContent, ba as SheetDescription, va as SheetFooter, _a as SheetHeader, ma as SheetOverlay, pa as SheetPortal, ya as SheetTitle, da as SheetTrigger, Ia as Sidebar, Wa as SidebarContent, Ha as SidebarFooter, Ga as SidebarGroup, qa as SidebarGroupAction, Ja as SidebarGroupContent, Ka as SidebarGroupLabel, Va as SidebarHeader, Ba as SidebarInput, za as SidebarInset, Ya as SidebarMenu, $a as SidebarMenuAction, eo as SidebarMenuBadge, Qa as SidebarMenuButton, Xa as SidebarMenuItem, to as SidebarMenuSkeleton, no as SidebarMenuSub, io as SidebarMenuSubButton, ro as SidebarMenuSubItem, Fa as SidebarProvider, Ra as SidebarRail, Ua as SidebarSeparator, La as SidebarTrigger, Q as Skeleton, ao as Slider, ys as SortBuilder, rc as Spinner, so as Switch, co as Table, uo as TableBody, go as TableCaption, ho as TableCell, fo as TableFooter, mo as TableHead, lo as TableHeader, po as TableRow, _o as Tabs, bo as TabsContent, vo as TabsList, yo as TabsTrigger, xo as Textarea, oo as Toaster, Co as Toggle, To as ToggleGroup, Eo as ToggleGroupItem, wa as Tooltip, Ea as TooltipContent, Ca as TooltipProvider, Ta as TooltipTrigger, Mo as TypographyBlockquote, Do as TypographyH1, Oo as TypographyH2, ko as TypographyH3, Ao as TypographyH4, Po as TypographyInlineCode, Io as TypographyLarge, Fo as TypographyLead, No as TypographyList, Ro as TypographyMuted, jo as TypographyP, Lo as TypographySmall, fc as ViewSkeleton, rn as badgeVariants, Zo as buttonGroupVariants, Lt as buttonVariants, K as cn, Ke as cva, Xc as getLazyIcon, $l as initializeComponents, Ai as navigationMenuTriggerStyle, Rl as registerPlaceholders, q as renderChildren, Kc as toKebabIconName, So as toggleVariants, zl as useConfigDraft, Ul as useExportJob, Zr as useFormField, Sa as useIsMobile, ul as useRelatedCount, Bl as useResizeObserver, Pa as useSidebar };
|