@object-ui/components 4.4.0 → 4.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +27 -0
- package/dist/index.css +9 -0
- package/dist/index.js +217 -133
- package/dist/index.umd.cjs +2 -2
- package/package.json +5 -5
package/dist/index.js
CHANGED
|
@@ -6902,8 +6902,37 @@ e.register("page", Lc, Rc), e.register("app", Lc, {
|
|
|
6902
6902
|
label: "Record Page"
|
|
6903
6903
|
});
|
|
6904
6904
|
//#endregion
|
|
6905
|
-
//#region src/
|
|
6906
|
-
|
|
6905
|
+
//#region src/lib/lazy-icon.tsx
|
|
6906
|
+
function zc(e) {
|
|
6907
|
+
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();
|
|
6908
|
+
}
|
|
6909
|
+
var Bc = new Set(At);
|
|
6910
|
+
function Vc(e) {
|
|
6911
|
+
return Bc.has(e);
|
|
6912
|
+
}
|
|
6913
|
+
var Hc = /* @__PURE__ */ new Map();
|
|
6914
|
+
function Uc(e) {
|
|
6915
|
+
if (!e) return me;
|
|
6916
|
+
let t = Hc.get(e);
|
|
6917
|
+
if (t) return t;
|
|
6918
|
+
let n = zc(e);
|
|
6919
|
+
if (!Vc(n)) return Hc.set(e, me), me;
|
|
6920
|
+
let r = (e) => h.createElement(kt, {
|
|
6921
|
+
name: n,
|
|
6922
|
+
fallback: me,
|
|
6923
|
+
...e
|
|
6924
|
+
});
|
|
6925
|
+
return r.displayName = `LucideIcon(${e})`, Hc.set(e, r), r;
|
|
6926
|
+
}
|
|
6927
|
+
var Wc = ({ name: e, ...t }) => {
|
|
6928
|
+
if (!e) return h.createElement(me, t);
|
|
6929
|
+
let n = zc(e);
|
|
6930
|
+
return Vc(n) ? h.createElement(kt, {
|
|
6931
|
+
name: n,
|
|
6932
|
+
fallback: me,
|
|
6933
|
+
...t
|
|
6934
|
+
}) : h.createElement(me, t);
|
|
6935
|
+
}, Gc = (e) => {
|
|
6907
6936
|
let { "data-obj-id": t, "data-obj-type": n, style: r, ...i } = e || {};
|
|
6908
6937
|
return {
|
|
6909
6938
|
designer: {
|
|
@@ -6913,29 +6942,113 @@ var zc = (e) => {
|
|
|
6913
6942
|
},
|
|
6914
6943
|
rest: i
|
|
6915
6944
|
};
|
|
6916
|
-
},
|
|
6945
|
+
}, Kc = (e) => e == null ? "" : typeof e == "string" ? e : typeof e == "object" ? e.default || e.value || "" : String(e), qc = (e, t) => !e || typeof e != "string" ? e || "" : e.includes("{") ? e.replace(/\{([a-zA-Z0-9_.]+)\}/g, (e, n) => {
|
|
6917
6946
|
let r = n.split(".").reduce((e, t) => e == null ? e : e[t], t);
|
|
6918
6947
|
return r == null ? "" : String(r);
|
|
6919
|
-
}).replace(/\s+/g, " ").trim() : e
|
|
6948
|
+
}).replace(/\s+/g, " ").trim() : e, Jc = (e) => {
|
|
6949
|
+
let t = typeof e == "number" ? e : Number(e);
|
|
6950
|
+
return Number.isFinite(t) ? t >= 1e4 ? `${Math.round(t / 1e3)}k` : t >= 1e3 ? `${(t / 1e3).toFixed(1).replace(/\.0$/, "")}k` : String(t) : String(e);
|
|
6951
|
+
}, Yc = (e, t = []) => {
|
|
6952
|
+
if (!e) return t;
|
|
6953
|
+
let n = Array.isArray(e) ? e : [e];
|
|
6954
|
+
for (let e of n) {
|
|
6955
|
+
if (!e || typeof e != "object") continue;
|
|
6956
|
+
if (e.type === "record:related_list" || e.type === "record_related_list") {
|
|
6957
|
+
t.push(e);
|
|
6958
|
+
continue;
|
|
6959
|
+
}
|
|
6960
|
+
let n = [
|
|
6961
|
+
e.children,
|
|
6962
|
+
e.properties?.children,
|
|
6963
|
+
e.properties?.items,
|
|
6964
|
+
e.body,
|
|
6965
|
+
e.items
|
|
6966
|
+
];
|
|
6967
|
+
for (let e of n) e && Yc(e, t);
|
|
6968
|
+
}
|
|
6969
|
+
return t;
|
|
6970
|
+
};
|
|
6920
6971
|
e.register("page:tabs", ({ schema: e, className: t, ...n }) => {
|
|
6921
|
-
let { designer: r } =
|
|
6972
|
+
let { designer: r } = Gc(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, [u, d] = h.useState({}), f = h.useMemo(() => {
|
|
6973
|
+
let e = /* @__PURE__ */ new Map();
|
|
6974
|
+
return i.forEach((t, n) => {
|
|
6975
|
+
if (t.count !== void 0 && t.count !== null && t.count !== "") return;
|
|
6976
|
+
let r = Yc(t.children), i = [];
|
|
6977
|
+
for (let e of r) {
|
|
6978
|
+
let t = e?.properties?.objectName || e?.objectName;
|
|
6979
|
+
if (!t) continue;
|
|
6980
|
+
let n = e?.properties?.relationshipField || e?.relationshipField;
|
|
6981
|
+
i.push({
|
|
6982
|
+
objectName: t,
|
|
6983
|
+
relationshipField: n
|
|
6984
|
+
});
|
|
6985
|
+
}
|
|
6986
|
+
i.length > 0 && e.set(n, i);
|
|
6987
|
+
}), e;
|
|
6988
|
+
}, [i]);
|
|
6989
|
+
h.useEffect(() => {
|
|
6990
|
+
if (!l || typeof l.find != "function" || f.size === 0) return;
|
|
6991
|
+
let e = !1;
|
|
6992
|
+
for (let [t, n] of f) Promise.all(n.map((e) => {
|
|
6993
|
+
let t = {};
|
|
6994
|
+
if (e.relationshipField) {
|
|
6995
|
+
if (!c) return Promise.resolve(0);
|
|
6996
|
+
t[e.relationshipField] = c;
|
|
6997
|
+
}
|
|
6998
|
+
return Promise.resolve(l.find(e.objectName, {
|
|
6999
|
+
where: t,
|
|
7000
|
+
limit: 1
|
|
7001
|
+
})).then((e) => {
|
|
7002
|
+
let t = typeof e?.total == "number" ? e.total : Array.isArray(e?.data) ? e.data.length : Array.isArray(e) ? e.length : 0;
|
|
7003
|
+
return typeof t == "number" ? t : 0;
|
|
7004
|
+
}).catch(() => 0);
|
|
7005
|
+
})).then((n) => {
|
|
7006
|
+
if (e) return;
|
|
7007
|
+
let r = n.reduce((e, t) => e + t, 0);
|
|
7008
|
+
d((e) => e[t] === r ? e : {
|
|
7009
|
+
...e,
|
|
7010
|
+
[t]: r
|
|
7011
|
+
});
|
|
7012
|
+
});
|
|
7013
|
+
return () => {
|
|
7014
|
+
e = !0;
|
|
7015
|
+
};
|
|
7016
|
+
}, [
|
|
7017
|
+
l,
|
|
7018
|
+
f,
|
|
7019
|
+
c
|
|
7020
|
+
]);
|
|
7021
|
+
let m = i.map((e, t) => ({
|
|
6922
7022
|
...e,
|
|
6923
7023
|
value: `tab-${t}`,
|
|
6924
|
-
labelStr:
|
|
6925
|
-
|
|
7024
|
+
labelStr: Kc(e.label),
|
|
7025
|
+
count: e.count !== void 0 && e.count !== null && e.count !== "" ? e.count : u[t]
|
|
7026
|
+
})), g = m[0]?.value, _ = G(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"), v = () => G(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");
|
|
6926
7027
|
return /* @__PURE__ */ w(_o, {
|
|
6927
|
-
defaultValue:
|
|
7028
|
+
defaultValue: g,
|
|
6928
7029
|
orientation: o ? "vertical" : "horizontal",
|
|
6929
7030
|
className: G(t, o && "flex gap-4 w-full"),
|
|
6930
7031
|
...r,
|
|
6931
7032
|
children: [/* @__PURE__ */ C(vo, {
|
|
6932
|
-
className:
|
|
6933
|
-
children:
|
|
7033
|
+
className: _,
|
|
7034
|
+
children: m.map((e) => /* @__PURE__ */ w(yo, {
|
|
6934
7035
|
value: e.value,
|
|
6935
|
-
className:
|
|
6936
|
-
children:
|
|
7036
|
+
className: v(),
|
|
7037
|
+
children: [
|
|
7038
|
+
e.icon && /* @__PURE__ */ C(Wc, {
|
|
7039
|
+
name: e.icon,
|
|
7040
|
+
className: "mr-1.5 h-3.5 w-3.5 shrink-0 opacity-70",
|
|
7041
|
+
"aria-hidden": !0
|
|
7042
|
+
}),
|
|
7043
|
+
/* @__PURE__ */ C("span", { children: e.labelStr }),
|
|
7044
|
+
e.count !== void 0 && e.count !== null && e.count !== "" && /* @__PURE__ */ C("span", {
|
|
7045
|
+
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",
|
|
7046
|
+
"aria-label": `${Jc(e.count)} items`,
|
|
7047
|
+
children: Jc(e.count)
|
|
7048
|
+
})
|
|
7049
|
+
]
|
|
6937
7050
|
}, e.value))
|
|
6938
|
-
}),
|
|
7051
|
+
}), m.map((e) => /* @__PURE__ */ C(bo, {
|
|
6939
7052
|
value: e.value,
|
|
6940
7053
|
className: G("mt-3", o && "mt-0 flex-1"),
|
|
6941
7054
|
children: K(e.children)
|
|
@@ -6947,7 +7060,7 @@ e.register("page:tabs", ({ schema: e, className: t, ...n }) => {
|
|
|
6947
7060
|
category: "layout",
|
|
6948
7061
|
isContainer: !0
|
|
6949
7062
|
}), e.register("page:card", ({ schema: e, className: t, ...n }) => {
|
|
6950
|
-
let { designer: r } =
|
|
7063
|
+
let { designer: r } = Gc(n), i = Kc(e?.title), a = e?.bordered !== !1, o = e?.body, s = e?.footer;
|
|
6951
7064
|
return /* @__PURE__ */ w(hn, {
|
|
6952
7065
|
className: G(t, !a && "border-0 shadow-none bg-transparent"),
|
|
6953
7066
|
...r,
|
|
@@ -6966,10 +7079,10 @@ e.register("page:tabs", ({ schema: e, className: t, ...n }) => {
|
|
|
6966
7079
|
category: "layout",
|
|
6967
7080
|
isContainer: !0
|
|
6968
7081
|
}), e.register("page:accordion", ({ schema: e, className: t, ...n }) => {
|
|
6969
|
-
let { designer: r } =
|
|
7082
|
+
let { designer: r } = Gc(n), i = e?.items || [], a = !!e?.allowMultiple, o = i.map((e, t) => ({
|
|
6970
7083
|
...e,
|
|
6971
7084
|
value: `panel-${t}`,
|
|
6972
|
-
labelStr:
|
|
7085
|
+
labelStr: Kc(e.label)
|
|
6973
7086
|
})), s = o.filter((e) => e.collapsed === !1).map((e) => e.value), c = o.map((e) => /* @__PURE__ */ w(Pt, {
|
|
6974
7087
|
value: e.value,
|
|
6975
7088
|
children: [/* @__PURE__ */ C(Ft, { children: e.labelStr }), /* @__PURE__ */ C(It, { children: K(e.children) })]
|
|
@@ -6994,7 +7107,7 @@ e.register("page:tabs", ({ schema: e, className: t, ...n }) => {
|
|
|
6994
7107
|
category: "layout",
|
|
6995
7108
|
isContainer: !0
|
|
6996
7109
|
}), e.register("page:section", ({ schema: e, className: t, ...n }) => {
|
|
6997
|
-
let { designer: r } =
|
|
7110
|
+
let { designer: r } = Gc(n);
|
|
6998
7111
|
return /* @__PURE__ */ C("section", {
|
|
6999
7112
|
className: G("space-y-4", t),
|
|
7000
7113
|
...r,
|
|
@@ -7006,7 +7119,7 @@ e.register("page:tabs", ({ schema: e, className: t, ...n }) => {
|
|
|
7006
7119
|
category: "layout",
|
|
7007
7120
|
isContainer: !0
|
|
7008
7121
|
}), e.register("page:header", ({ schema: e, className: t, ...n }) => {
|
|
7009
|
-
let { designer: r } =
|
|
7122
|
+
let { designer: r } = Gc(n), i = p(), a = e?.title ?? e?.properties?.title, o = e?.subtitle ?? e?.properties?.subtitle, s = qc(Kc(a), i?.data), c = qc(Kc(o), i?.data), l = (e?.breadcrumb ?? e?.properties?.breadcrumb) !== !1;
|
|
7010
7123
|
return /* @__PURE__ */ w("header", {
|
|
7011
7124
|
className: G("flex flex-col gap-2 pb-4 border-b", t),
|
|
7012
7125
|
...r,
|
|
@@ -7032,7 +7145,7 @@ e.register("page:tabs", ({ schema: e, className: t, ...n }) => {
|
|
|
7032
7145
|
label: "Page Header",
|
|
7033
7146
|
category: "layout"
|
|
7034
7147
|
}), e.register("page:footer", ({ schema: e, className: t, ...n }) => {
|
|
7035
|
-
let { designer: r } =
|
|
7148
|
+
let { designer: r } = Gc(n);
|
|
7036
7149
|
return /* @__PURE__ */ w(S, { children: [/* @__PURE__ */ C(la, { className: "my-4" }), /* @__PURE__ */ C("footer", {
|
|
7037
7150
|
className: G("flex items-center justify-between text-sm text-muted-foreground", t),
|
|
7038
7151
|
...r,
|
|
@@ -7044,7 +7157,7 @@ e.register("page:tabs", ({ schema: e, className: t, ...n }) => {
|
|
|
7044
7157
|
category: "layout",
|
|
7045
7158
|
isContainer: !0
|
|
7046
7159
|
}), e.register("page:sidebar", ({ schema: e, className: t, ...n }) => {
|
|
7047
|
-
let { designer: r } =
|
|
7160
|
+
let { designer: r } = Gc(n);
|
|
7048
7161
|
return /* @__PURE__ */ C("aside", {
|
|
7049
7162
|
className: G("flex flex-col gap-4 w-full md:w-80 shrink-0", t),
|
|
7050
7163
|
...r,
|
|
@@ -7308,7 +7421,7 @@ e.register("page:tabs", ({ schema: e, className: t, ...n }) => {
|
|
|
7308
7421
|
});
|
|
7309
7422
|
//#endregion
|
|
7310
7423
|
//#region src/renderers/navigation/header-bar.tsx
|
|
7311
|
-
function
|
|
7424
|
+
function Xc({ crumb: e, isLast: t }) {
|
|
7312
7425
|
let n = s(e.label) ?? "";
|
|
7313
7426
|
return e.siblings && e.siblings.length > 0 ? /* @__PURE__ */ w(Mr, { children: [/* @__PURE__ */ w(Nr, {
|
|
7314
7427
|
className: "flex items-center gap-1",
|
|
@@ -7340,7 +7453,7 @@ e.register("header-bar", ({ schema: e }) => /* @__PURE__ */ w("header", {
|
|
|
7340
7453
|
orientation: "vertical",
|
|
7341
7454
|
className: "mr-2 h-4"
|
|
7342
7455
|
}),
|
|
7343
|
-
/* @__PURE__ */ C(on, { children: /* @__PURE__ */ C(sn, { children: e.crumbs?.map((t, n) => /* @__PURE__ */ w(h.Fragment, { children: [/* @__PURE__ */ C(cn, { children: /* @__PURE__ */ C(
|
|
7456
|
+
/* @__PURE__ */ C(on, { children: /* @__PURE__ */ C(sn, { children: e.crumbs?.map((t, n) => /* @__PURE__ */ w(h.Fragment, { children: [/* @__PURE__ */ C(cn, { children: /* @__PURE__ */ C(Xc, {
|
|
7344
7457
|
crumb: t,
|
|
7345
7458
|
isLast: n === e.crumbs.length - 1
|
|
7346
7459
|
}) }), n < e.crumbs.length - 1 && /* @__PURE__ */ C(dn, {})] }, n)) }) }),
|
|
@@ -7568,7 +7681,7 @@ e.register("header-bar", ({ schema: e }) => /* @__PURE__ */ w("header", {
|
|
|
7568
7681
|
});
|
|
7569
7682
|
//#endregion
|
|
7570
7683
|
//#region src/renderers/data-display/tree-view.tsx
|
|
7571
|
-
var
|
|
7684
|
+
var Zc = ({ node: e, onNodeClick: t }) => {
|
|
7572
7685
|
let [n, r] = x(!1), i = e.children && e.children.length > 0;
|
|
7573
7686
|
return /* @__PURE__ */ w("div", {
|
|
7574
7687
|
className: "relative",
|
|
@@ -7596,7 +7709,7 @@ var Uc = ({ node: e, onNodeClick: t }) => {
|
|
|
7596
7709
|
]
|
|
7597
7710
|
}), i && n && /* @__PURE__ */ C("div", {
|
|
7598
7711
|
className: "relative ml-[11px] pl-3 border-l border-border animate-in slide-in-from-left-2 fade-in duration-200",
|
|
7599
|
-
children: e.children.map((e) => /* @__PURE__ */ C(
|
|
7712
|
+
children: e.children.map((e) => /* @__PURE__ */ C(Zc, {
|
|
7600
7713
|
node: e,
|
|
7601
7714
|
onNodeClick: t
|
|
7602
7715
|
}, e.id))
|
|
@@ -7618,7 +7731,7 @@ e.register("tree-view", ({ schema: e, className: t, ...n }) => {
|
|
|
7618
7731
|
})
|
|
7619
7732
|
}), /* @__PURE__ */ C("div", {
|
|
7620
7733
|
className: "space-y-1",
|
|
7621
|
-
children: a.map((e) => /* @__PURE__ */ C(
|
|
7734
|
+
children: a.map((e) => /* @__PURE__ */ C(Zc, {
|
|
7622
7735
|
node: e,
|
|
7623
7736
|
onNodeClick: r
|
|
7624
7737
|
}, e.id))
|
|
@@ -7690,41 +7803,12 @@ e.register("tree-view", ({ schema: e, className: t, ...n }) => {
|
|
|
7690
7803
|
}
|
|
7691
7804
|
});
|
|
7692
7805
|
//#endregion
|
|
7693
|
-
//#region src/
|
|
7694
|
-
|
|
7695
|
-
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();
|
|
7696
|
-
}
|
|
7697
|
-
var Gc = new Set(At);
|
|
7698
|
-
function Kc(e) {
|
|
7699
|
-
return Gc.has(e);
|
|
7700
|
-
}
|
|
7701
|
-
var qc = /* @__PURE__ */ new Map();
|
|
7702
|
-
function Jc(e) {
|
|
7703
|
-
if (!e) return me;
|
|
7704
|
-
let t = qc.get(e);
|
|
7705
|
-
if (t) return t;
|
|
7706
|
-
let n = Wc(e);
|
|
7707
|
-
if (!Kc(n)) return qc.set(e, me), me;
|
|
7708
|
-
let r = (e) => h.createElement(kt, {
|
|
7709
|
-
name: n,
|
|
7710
|
-
fallback: me,
|
|
7711
|
-
...e
|
|
7712
|
-
});
|
|
7713
|
-
return r.displayName = `LucideIcon(${e})`, qc.set(e, r), r;
|
|
7714
|
-
}
|
|
7715
|
-
var Yc = ({ name: e, ...t }) => {
|
|
7716
|
-
if (!e) return h.createElement(me, t);
|
|
7717
|
-
let n = Wc(e);
|
|
7718
|
-
return Kc(n) ? h.createElement(kt, {
|
|
7719
|
-
name: n,
|
|
7720
|
-
fallback: me,
|
|
7721
|
-
...t
|
|
7722
|
-
}) : h.createElement(me, t);
|
|
7723
|
-
}, Xc = (e) => e ? Jc(e) : null;
|
|
7806
|
+
//#region src/renderers/data-display/statistic.tsx
|
|
7807
|
+
var Qc = (e) => e ? Uc(e) : null;
|
|
7724
7808
|
//#endregion
|
|
7725
7809
|
//#region src/renderers/overlay/hover-card.tsx
|
|
7726
7810
|
e.register("statistic", ({ schema: e }) => {
|
|
7727
|
-
let t = e.icon ?
|
|
7811
|
+
let t = e.icon ? Qc(e.icon) : null;
|
|
7728
7812
|
return /* @__PURE__ */ w("div", {
|
|
7729
7813
|
className: G("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),
|
|
7730
7814
|
children: [
|
|
@@ -8734,13 +8818,13 @@ e.register("statistic", ({ schema: e }) => {
|
|
|
8734
8818
|
});
|
|
8735
8819
|
//#endregion
|
|
8736
8820
|
//#region src/renderers/overlay/dropdown-menu.tsx
|
|
8737
|
-
var
|
|
8821
|
+
var $c = (e) => e ? e.map((e, t) => e.type === "separator" ? /* @__PURE__ */ C(Gr, {}, t) : e.type === "label" ? /* @__PURE__ */ C(Wr, { children: e.label }, t) : e.children ? /* @__PURE__ */ w(Ir, { children: [/* @__PURE__ */ w(Rr, {
|
|
8738
8822
|
inset: e.inset,
|
|
8739
8823
|
children: [e.icon && /* @__PURE__ */ C("span", {
|
|
8740
8824
|
className: "mr-2",
|
|
8741
8825
|
children: e.icon
|
|
8742
8826
|
}), e.label]
|
|
8743
|
-
}), /* @__PURE__ */ C(zr, { children:
|
|
8827
|
+
}), /* @__PURE__ */ C(zr, { children: $c(e.children) })] }, t) : /* @__PURE__ */ w(Vr, {
|
|
8744
8828
|
disabled: e.disabled,
|
|
8745
8829
|
inset: e.inset,
|
|
8746
8830
|
onSelect: e.onSelect,
|
|
@@ -8770,7 +8854,7 @@ e.register("dropdown-menu", ({ schema: e, className: t, ...n }) => /* @__PURE__
|
|
|
8770
8854
|
children: [
|
|
8771
8855
|
e.label && /* @__PURE__ */ C(Wr, { children: e.label }),
|
|
8772
8856
|
e.label && /* @__PURE__ */ C(Gr, {}),
|
|
8773
|
-
|
|
8857
|
+
$c(e.items)
|
|
8774
8858
|
]
|
|
8775
8859
|
})]
|
|
8776
8860
|
}), {
|
|
@@ -8838,10 +8922,10 @@ e.register("dropdown-menu", ({ schema: e, className: t, ...n }) => /* @__PURE__
|
|
|
8838
8922
|
});
|
|
8839
8923
|
//#endregion
|
|
8840
8924
|
//#region src/renderers/overlay/context-menu.tsx
|
|
8841
|
-
var
|
|
8925
|
+
var el = (e) => e ? e.map((e, t) => e.type === "separator" ? /* @__PURE__ */ C(br, {}, t) : e.type === "label" ? /* @__PURE__ */ C(yr, { children: e.label }, t) : e.children ? /* @__PURE__ */ w(dr, { children: [/* @__PURE__ */ C(pr, {
|
|
8842
8926
|
inset: e.inset,
|
|
8843
8927
|
children: e.label
|
|
8844
|
-
}), /* @__PURE__ */ C(mr, { children:
|
|
8928
|
+
}), /* @__PURE__ */ C(mr, { children: el(e.children) })] }, t) : /* @__PURE__ */ w(gr, {
|
|
8845
8929
|
disabled: e.disabled,
|
|
8846
8930
|
inset: e.inset,
|
|
8847
8931
|
onSelect: e.onSelect,
|
|
@@ -8865,7 +8949,7 @@ e.register("context-menu", ({ schema: e, className: t, ...n }) => {
|
|
|
8865
8949
|
})
|
|
8866
8950
|
}), /* @__PURE__ */ C(hr, {
|
|
8867
8951
|
className: i,
|
|
8868
|
-
children:
|
|
8952
|
+
children: el(e.items)
|
|
8869
8953
|
})]
|
|
8870
8954
|
});
|
|
8871
8955
|
}, {
|
|
@@ -9504,7 +9588,7 @@ e.register("context-menu", ({ schema: e, className: t, ...n }) => {
|
|
|
9504
9588
|
});
|
|
9505
9589
|
//#endregion
|
|
9506
9590
|
//#region src/renderers/complex/data-table.tsx
|
|
9507
|
-
var
|
|
9591
|
+
var tl = {
|
|
9508
9592
|
"table.rowsPerPage": "Rows per page",
|
|
9509
9593
|
"table.pageInfo": "Page {{current}} of {{total}}",
|
|
9510
9594
|
"table.totalRecords": "{{count}} total",
|
|
@@ -9525,12 +9609,12 @@ var $c = {
|
|
|
9525
9609
|
"table.delete": "Delete",
|
|
9526
9610
|
"common.actions": "Actions"
|
|
9527
9611
|
};
|
|
9528
|
-
function
|
|
9612
|
+
function nl() {
|
|
9529
9613
|
try {
|
|
9530
9614
|
let e = f();
|
|
9531
9615
|
return e.t("table.rowsPerPage") === "table.rowsPerPage" ? {
|
|
9532
9616
|
t: (e, t) => {
|
|
9533
|
-
let n =
|
|
9617
|
+
let n = tl[e] || e;
|
|
9534
9618
|
if (t) for (let [e, r] of Object.entries(t)) n = n.replace(`{{${e}}}`, String(r));
|
|
9535
9619
|
return n;
|
|
9536
9620
|
},
|
|
@@ -9542,7 +9626,7 @@ function el() {
|
|
|
9542
9626
|
} catch {
|
|
9543
9627
|
return {
|
|
9544
9628
|
t: (e, t) => {
|
|
9545
|
-
let n =
|
|
9629
|
+
let n = tl[e] || e;
|
|
9546
9630
|
if (t) for (let [e, r] of Object.entries(t)) n = n.replace(`{{${e}}}`, String(r));
|
|
9547
9631
|
return n;
|
|
9548
9632
|
},
|
|
@@ -9551,7 +9635,7 @@ function el() {
|
|
|
9551
9635
|
}
|
|
9552
9636
|
}
|
|
9553
9637
|
e.register("data-table", ({ schema: t }) => {
|
|
9554
|
-
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: T, rowStyle: E, className: D, cellClassName: O, frozenColumns: k = 0, showRowNumbers: A = !1, showAddRow: ee = !1, borderless: te = !1 } = t, { t: j, language: ne } =
|
|
9638
|
+
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: T, rowStyle: E, className: D, cellClassName: O, frozenColumns: k = 0, showRowNumbers: A = !1, showAddRow: ee = !1, borderless: te = !1 } = t, { t: j, language: ne } = nl(), re = /^\d{4}-\d{2}-\d{2}(?:T\d{2}:\d{2}(?::\d{2}(?:\.\d+)?)?(?:Z|[+-]\d{2}:?\d{2})?)?$/, ae = h.useCallback((e) => {
|
|
9555
9639
|
if (typeof e != "string" || e.length < 8 || !re.test(e)) return e;
|
|
9556
9640
|
let t = Date.parse(e);
|
|
9557
9641
|
if (Number.isNaN(t)) return e;
|
|
@@ -10366,19 +10450,19 @@ e.register("data-table", ({ schema: t }) => {
|
|
|
10366
10450
|
});
|
|
10367
10451
|
//#endregion
|
|
10368
10452
|
//#region src/renderers/action/resolve-icon.ts
|
|
10369
|
-
function
|
|
10453
|
+
function rl(e) {
|
|
10370
10454
|
return e.split("-").map((e) => e.charAt(0).toUpperCase() + e.slice(1)).join("");
|
|
10371
10455
|
}
|
|
10372
|
-
var
|
|
10373
|
-
function
|
|
10456
|
+
var il = { Home: "House" };
|
|
10457
|
+
function al(e) {
|
|
10374
10458
|
if (!e) return null;
|
|
10375
|
-
let t =
|
|
10376
|
-
return Ge[
|
|
10459
|
+
let t = rl(e);
|
|
10460
|
+
return Ge[il[t] || t] ?? null;
|
|
10377
10461
|
}
|
|
10378
10462
|
//#endregion
|
|
10379
10463
|
//#region src/renderers/action/action-button.tsx
|
|
10380
|
-
var
|
|
10381
|
-
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 =
|
|
10464
|
+
var ol = g(({ schema: e, className: t, context: n, ...r }, i) => {
|
|
10465
|
+
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 = al(e.icon), S = e.variant === "primary" ? "default" : e.variant || "default", T = e.size === "md" ? "default" : e.size || "default", E = _(async () => {
|
|
10382
10466
|
if (!m) {
|
|
10383
10467
|
h(!0);
|
|
10384
10468
|
try {
|
|
@@ -10427,7 +10511,7 @@ var il = g(({ schema: e, className: t, context: n, ...r }, i) => {
|
|
|
10427
10511
|
]
|
|
10428
10512
|
});
|
|
10429
10513
|
});
|
|
10430
|
-
|
|
10514
|
+
ol.displayName = "ActionButtonRenderer", e.register("action:button", ol, {
|
|
10431
10515
|
namespace: "action",
|
|
10432
10516
|
label: "Action Button",
|
|
10433
10517
|
inputs: [
|
|
@@ -10506,8 +10590,8 @@ il.displayName = "ActionButtonRenderer", e.register("action:button", il, {
|
|
|
10506
10590
|
});
|
|
10507
10591
|
//#endregion
|
|
10508
10592
|
//#region src/renderers/action/action-icon.tsx
|
|
10509
|
-
var
|
|
10510
|
-
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 =
|
|
10593
|
+
var sl = g(({ schema: e, className: t, context: n, ...r }, i) => {
|
|
10594
|
+
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 = al(e.icon), y = e.variant === "primary" ? "default" : e.variant || "ghost", b = _(async () => {
|
|
10511
10595
|
if (!p) {
|
|
10512
10596
|
m(!0);
|
|
10513
10597
|
try {
|
|
@@ -10563,7 +10647,7 @@ var al = g(({ schema: e, className: t, context: n, ...r }, i) => {
|
|
|
10563
10647
|
}), /* @__PURE__ */ C(Ea, { children: /* @__PURE__ */ C("p", { children: e.label || e.description }) })] })
|
|
10564
10648
|
}) : S;
|
|
10565
10649
|
});
|
|
10566
|
-
|
|
10650
|
+
sl.displayName = "ActionIconRenderer", e.register("action:icon", sl, {
|
|
10567
10651
|
namespace: "action",
|
|
10568
10652
|
label: "Action Icon",
|
|
10569
10653
|
inputs: [
|
|
@@ -10628,7 +10712,7 @@ al.displayName = "ActionIconRenderer", e.register("action:icon", al, {
|
|
|
10628
10712
|
});
|
|
10629
10713
|
//#endregion
|
|
10630
10714
|
//#region src/renderers/action/action-menu.tsx
|
|
10631
|
-
function
|
|
10715
|
+
function cl() {
|
|
10632
10716
|
try {
|
|
10633
10717
|
let { t: e } = Dt(), t = e("detail.moreActions");
|
|
10634
10718
|
return !t || t === "detail.moreActions" ? "More actions" : t;
|
|
@@ -10636,9 +10720,9 @@ function ol() {
|
|
|
10636
10720
|
return "More actions";
|
|
10637
10721
|
}
|
|
10638
10722
|
}
|
|
10639
|
-
var
|
|
10723
|
+
var ll = ({ action: e, onExecute: t }) => {
|
|
10640
10724
|
let n = u(c(e.visible)), r = u(c(e.enabled)), i = y(() => {
|
|
10641
|
-
let t =
|
|
10725
|
+
let t = al(e.icon);
|
|
10642
10726
|
return t ? /* @__PURE__ */ C(t, { className: "mr-2 h-4 w-4" }) : null;
|
|
10643
10727
|
}, [e.icon]);
|
|
10644
10728
|
return e.visible && !n ? null : /* @__PURE__ */ w(Vr, {
|
|
@@ -10650,9 +10734,9 @@ var sl = ({ action: e, onExecute: t }) => {
|
|
|
10650
10734
|
children: [i, /* @__PURE__ */ C("span", { children: e.label || e.name })]
|
|
10651
10735
|
});
|
|
10652
10736
|
};
|
|
10653
|
-
|
|
10654
|
-
var
|
|
10655
|
-
let { "data-obj-id": i, "data-obj-type": a, style: o, ...s } = n, { execute: d } = l(), [f, p] = x(!1), m =
|
|
10737
|
+
ll.displayName = "ActionMenuItem";
|
|
10738
|
+
var ul = g(({ schema: e, className: t, ...n }, r) => {
|
|
10739
|
+
let { "data-obj-id": i, "data-obj-type": a, style: o, ...s } = n, { execute: d } = l(), [f, p] = x(!1), m = cl(), g = u(c(e.visible)), v = al(e.icon) || Oe, y = e.variant || "ghost", b = e.size || "icon", T = _(async (e) => {
|
|
10656
10740
|
p(!0);
|
|
10657
10741
|
try {
|
|
10658
10742
|
if (typeof e.onClick == "function") {
|
|
@@ -10699,14 +10783,14 @@ var cl = g(({ schema: e, className: t, ...n }, r) => {
|
|
|
10699
10783
|
align: "end",
|
|
10700
10784
|
children: E.map((e, t) => {
|
|
10701
10785
|
let n = e.tags?.includes("separator-before") && t > 0;
|
|
10702
|
-
return /* @__PURE__ */ w(h.Fragment, { children: [n && /* @__PURE__ */ C(Gr, {}), /* @__PURE__ */ C(
|
|
10786
|
+
return /* @__PURE__ */ w(h.Fragment, { children: [n && /* @__PURE__ */ C(Gr, {}), /* @__PURE__ */ C(ll, {
|
|
10703
10787
|
action: e,
|
|
10704
10788
|
onExecute: T
|
|
10705
10789
|
})] }, e.name || t);
|
|
10706
10790
|
})
|
|
10707
10791
|
})] });
|
|
10708
10792
|
});
|
|
10709
|
-
|
|
10793
|
+
ul.displayName = "ActionMenuRenderer", e.register("action:menu", ul, {
|
|
10710
10794
|
namespace: "action",
|
|
10711
10795
|
label: "Action Menu",
|
|
10712
10796
|
inputs: [
|
|
@@ -10751,8 +10835,8 @@ cl.displayName = "ActionMenuRenderer", e.register("action:menu", cl, {
|
|
|
10751
10835
|
});
|
|
10752
10836
|
//#endregion
|
|
10753
10837
|
//#region src/renderers/action/action-group.tsx
|
|
10754
|
-
var
|
|
10755
|
-
let [i, a] = x(!1), o = u(c(e.visible)), s = u(c(e.enabled)), l =
|
|
10838
|
+
var dl = ({ action: e, variant: t, size: n, onExecute: r }) => {
|
|
10839
|
+
let [i, a] = x(!1), o = u(c(e.visible)), s = u(c(e.enabled)), l = al(e.icon), d = e.variant === "primary" ? "default" : e.variant || t || "outline", f = e.size === "md" ? "default" : e.size || n || "sm", p = _(async () => {
|
|
10756
10840
|
if (!i) {
|
|
10757
10841
|
a(!0);
|
|
10758
10842
|
try {
|
|
@@ -10780,8 +10864,8 @@ var ll = ({ action: e, variant: t, size: n, onExecute: r }) => {
|
|
|
10780
10864
|
]
|
|
10781
10865
|
});
|
|
10782
10866
|
};
|
|
10783
|
-
|
|
10784
|
-
var
|
|
10867
|
+
dl.displayName = "InlineActionButton";
|
|
10868
|
+
var fl = g(({ schema: e, className: t, ...n }, r) => {
|
|
10785
10869
|
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 || [];
|
|
10786
10870
|
e.location && (g = g.filter((t) => !t.locations || t.locations.includes(e.location)));
|
|
10787
10871
|
let v = _(async (e) => {
|
|
@@ -10802,7 +10886,7 @@ var ul = g(({ schema: e, className: t, ...n }, r) => {
|
|
|
10802
10886
|
}, [d]);
|
|
10803
10887
|
if (e.visible && !m || g.length === 0) return null;
|
|
10804
10888
|
if ((e.display || "inline") === "dropdown") {
|
|
10805
|
-
let n =
|
|
10889
|
+
let n = al(e.icon);
|
|
10806
10890
|
return /* @__PURE__ */ w(Mr, { children: [/* @__PURE__ */ C(Nr, {
|
|
10807
10891
|
asChild: !0,
|
|
10808
10892
|
children: /* @__PURE__ */ w(q, {
|
|
@@ -10824,7 +10908,7 @@ var ul = g(({ schema: e, className: t, ...n }, r) => {
|
|
|
10824
10908
|
}), /* @__PURE__ */ C(Br, {
|
|
10825
10909
|
align: "end",
|
|
10826
10910
|
children: g.map((e, t) => {
|
|
10827
|
-
let n =
|
|
10911
|
+
let n = al(e.icon), r = e.tags?.includes("separator-before") && t > 0;
|
|
10828
10912
|
return /* @__PURE__ */ w(h.Fragment, { children: [r && /* @__PURE__ */ C(Gr, {}), /* @__PURE__ */ w(Vr, {
|
|
10829
10913
|
onSelect: async (t) => {
|
|
10830
10914
|
t.preventDefault(), p(!0);
|
|
@@ -10847,7 +10931,7 @@ var ul = g(({ schema: e, className: t, ...n }, r) => {
|
|
|
10847
10931
|
"data-obj-id": i,
|
|
10848
10932
|
"data-obj-type": a,
|
|
10849
10933
|
style: o,
|
|
10850
|
-
children: g.map((t) => /* @__PURE__ */ C(
|
|
10934
|
+
children: g.map((t) => /* @__PURE__ */ C(dl, {
|
|
10851
10935
|
action: t,
|
|
10852
10936
|
variant: e.variant,
|
|
10853
10937
|
size: e.size,
|
|
@@ -10855,7 +10939,7 @@ var ul = g(({ schema: e, className: t, ...n }, r) => {
|
|
|
10855
10939
|
}, t.name))
|
|
10856
10940
|
});
|
|
10857
10941
|
});
|
|
10858
|
-
|
|
10942
|
+
fl.displayName = "ActionGroupRenderer", e.register("action:group", fl, {
|
|
10859
10943
|
namespace: "action",
|
|
10860
10944
|
label: "Action Group",
|
|
10861
10945
|
inputs: [
|
|
@@ -10925,7 +11009,7 @@ ul.displayName = "ActionGroupRenderer", e.register("action:group", ul, {
|
|
|
10925
11009
|
});
|
|
10926
11010
|
//#endregion
|
|
10927
11011
|
//#region src/renderers/action/action-bar.tsx
|
|
10928
|
-
function
|
|
11012
|
+
function pl() {
|
|
10929
11013
|
try {
|
|
10930
11014
|
let { t: e } = Dt(), t = e("common.actions");
|
|
10931
11015
|
return !t || t === "common.actions" ? "Actions" : t;
|
|
@@ -10933,8 +11017,8 @@ function dl() {
|
|
|
10933
11017
|
return "Actions";
|
|
10934
11018
|
}
|
|
10935
11019
|
}
|
|
10936
|
-
var
|
|
10937
|
-
let a =
|
|
11020
|
+
var ml = g(({ schema: t, className: n, ...r }, i) => {
|
|
11021
|
+
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, ...T } = r, E = u(c(t.visible)), D = Sa(), O = y(() => {
|
|
10938
11022
|
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();
|
|
10939
11023
|
return n.filter((e) => e.name ? r.has(e.name) ? !1 : (r.add(e.name), !0) : !0);
|
|
10940
11024
|
}, [t.actions, t.location]), k = y(() => {
|
|
@@ -10990,7 +11074,7 @@ var fl = g(({ schema: t, className: n, ...r }, i) => {
|
|
|
10990
11074
|
}), j.length > 0 && ie]
|
|
10991
11075
|
});
|
|
10992
11076
|
});
|
|
10993
|
-
|
|
11077
|
+
ml.displayName = "ActionBarRenderer", e.register("action:bar", ml, {
|
|
10994
11078
|
namespace: "action",
|
|
10995
11079
|
label: "Action Bar",
|
|
10996
11080
|
inputs: [
|
|
@@ -11070,7 +11154,7 @@ fl.displayName = "ActionBarRenderer", e.register("action:bar", fl, {
|
|
|
11070
11154
|
});
|
|
11071
11155
|
//#endregion
|
|
11072
11156
|
//#region src/renderers/placeholders.tsx
|
|
11073
|
-
var
|
|
11157
|
+
var hl = ({ schema: e, className: t }) => {
|
|
11074
11158
|
let n = e.type, r = n.startsWith("view:"), i = n.startsWith("widget:"), a = n.startsWith("field:");
|
|
11075
11159
|
return /* @__PURE__ */ w("div", {
|
|
11076
11160
|
className: G("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),
|
|
@@ -11097,15 +11181,15 @@ var pl = ({ schema: e, className: t }) => {
|
|
|
11097
11181
|
})]
|
|
11098
11182
|
})]
|
|
11099
11183
|
});
|
|
11100
|
-
},
|
|
11101
|
-
function
|
|
11102
|
-
|
|
11103
|
-
e.get(t) || e.register(t,
|
|
11184
|
+
}, gl = /* @__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(".");
|
|
11185
|
+
function _l() {
|
|
11186
|
+
gl.forEach((t) => {
|
|
11187
|
+
e.get(t) || e.register(t, hl);
|
|
11104
11188
|
});
|
|
11105
11189
|
}
|
|
11106
11190
|
//#endregion
|
|
11107
11191
|
//#region src/hooks/use-config-draft.ts
|
|
11108
|
-
function
|
|
11192
|
+
function vl(e, t) {
|
|
11109
11193
|
let n = t?.maxHistory ?? 50, [r, i] = x({ ...e }), [a, o] = x(t?.mode === "create"), s = b([]), c = b([]), [, l] = x(0);
|
|
11110
11194
|
v(() => {
|
|
11111
11195
|
i({ ...e }), o(t?.mode === "create"), s.current = [], c.current = [];
|
|
@@ -11142,7 +11226,7 @@ function gl(e, t) {
|
|
|
11142
11226
|
}
|
|
11143
11227
|
//#endregion
|
|
11144
11228
|
//#region src/hooks/use-resize-observer.tsx
|
|
11145
|
-
function
|
|
11229
|
+
function yl(e) {
|
|
11146
11230
|
let [t, n] = m.useState({
|
|
11147
11231
|
width: 0,
|
|
11148
11232
|
height: 0
|
|
@@ -11172,16 +11256,16 @@ function _l(e) {
|
|
|
11172
11256
|
}
|
|
11173
11257
|
//#endregion
|
|
11174
11258
|
//#region src/hooks/use-export-job.ts
|
|
11175
|
-
var
|
|
11259
|
+
var bl = [
|
|
11176
11260
|
"completed",
|
|
11177
11261
|
"failed",
|
|
11178
11262
|
"cancelled",
|
|
11179
11263
|
"expired"
|
|
11180
11264
|
];
|
|
11181
|
-
function
|
|
11182
|
-
return !!e &&
|
|
11265
|
+
function xl(e) {
|
|
11266
|
+
return !!e && bl.includes(e);
|
|
11183
11267
|
}
|
|
11184
|
-
function
|
|
11268
|
+
function Sl(e = {}) {
|
|
11185
11269
|
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({
|
|
11186
11270
|
onComplete: i,
|
|
11187
11271
|
onError: a
|
|
@@ -11206,7 +11290,7 @@ function bl(e = {}) {
|
|
|
11206
11290
|
try {
|
|
11207
11291
|
let e = await t.getExportJobProgress(f.current);
|
|
11208
11292
|
if (h.current) return;
|
|
11209
|
-
if (s(e),
|
|
11293
|
+
if (s(e), xl(e.status)) {
|
|
11210
11294
|
if (d(!1), e.status === "completed") g.current.onComplete?.(e);
|
|
11211
11295
|
else {
|
|
11212
11296
|
let t = e.error?.message ?? `Export ${e.status}`, n = Error(t);
|
|
@@ -11240,7 +11324,7 @@ function bl(e = {}) {
|
|
|
11240
11324
|
processedRecords: 0,
|
|
11241
11325
|
totalRecords: i.estimatedRecords,
|
|
11242
11326
|
percentComplete: 0
|
|
11243
|
-
}),
|
|
11327
|
+
}), xl(i.status)) {
|
|
11244
11328
|
if (d(!1), i.status === "completed" && t.getExportJobProgress) try {
|
|
11245
11329
|
let e = await t.getExportJobProgress(i.jobId);
|
|
11246
11330
|
s(e), g.current.onComplete?.(e);
|
|
@@ -11293,7 +11377,7 @@ function bl(e = {}) {
|
|
|
11293
11377
|
}
|
|
11294
11378
|
//#endregion
|
|
11295
11379
|
//#region src/debug/DebugPanel.tsx
|
|
11296
|
-
function
|
|
11380
|
+
function Cl({ schema: e }) {
|
|
11297
11381
|
return e ? /* @__PURE__ */ C("pre", {
|
|
11298
11382
|
className: "text-[11px] leading-relaxed font-mono overflow-auto max-h-[60vh] whitespace-pre-wrap break-all",
|
|
11299
11383
|
children: JSON.stringify(e, null, 2)
|
|
@@ -11302,7 +11386,7 @@ function xl({ schema: e }) {
|
|
|
11302
11386
|
children: "No schema available"
|
|
11303
11387
|
});
|
|
11304
11388
|
}
|
|
11305
|
-
function
|
|
11389
|
+
function wl({ dataContext: e }) {
|
|
11306
11390
|
return e ? /* @__PURE__ */ C("pre", {
|
|
11307
11391
|
className: "text-[11px] leading-relaxed font-mono overflow-auto max-h-[60vh] whitespace-pre-wrap break-all",
|
|
11308
11392
|
children: JSON.stringify(e, null, 2)
|
|
@@ -11311,7 +11395,7 @@ function Sl({ dataContext: e }) {
|
|
|
11311
11395
|
children: "No data context available"
|
|
11312
11396
|
});
|
|
11313
11397
|
}
|
|
11314
|
-
function
|
|
11398
|
+
function Tl() {
|
|
11315
11399
|
let t = y(() => {
|
|
11316
11400
|
try {
|
|
11317
11401
|
return e.getAllTypes();
|
|
@@ -11338,7 +11422,7 @@ function Cl() {
|
|
|
11338
11422
|
})]
|
|
11339
11423
|
});
|
|
11340
11424
|
}
|
|
11341
|
-
function
|
|
11425
|
+
function El({ flags: e }) {
|
|
11342
11426
|
return e ? /* @__PURE__ */ C("pre", {
|
|
11343
11427
|
className: "text-[11px] leading-relaxed font-mono overflow-auto max-h-[60vh] whitespace-pre-wrap break-all",
|
|
11344
11428
|
children: JSON.stringify(e, null, 2)
|
|
@@ -11347,14 +11431,14 @@ function wl({ flags: e }) {
|
|
|
11347
11431
|
children: "No debug flags"
|
|
11348
11432
|
});
|
|
11349
11433
|
}
|
|
11350
|
-
function
|
|
11434
|
+
function Dl(e) {
|
|
11351
11435
|
let n = t.getInstance(), [r, i] = x(() => n.getEntries(e));
|
|
11352
11436
|
return h.useEffect(() => (i(n.getEntries(e)), n.subscribe(() => {
|
|
11353
11437
|
i(n.getEntries(e));
|
|
11354
11438
|
})), [n, e]), r;
|
|
11355
11439
|
}
|
|
11356
|
-
function
|
|
11357
|
-
let e =
|
|
11440
|
+
function Ol() {
|
|
11441
|
+
let e = Dl("perf").map((e) => e.data);
|
|
11358
11442
|
return e.length === 0 ? /* @__PURE__ */ C("p", {
|
|
11359
11443
|
className: "text-xs text-muted-foreground italic",
|
|
11360
11444
|
children: "No performance data collected yet"
|
|
@@ -11380,8 +11464,8 @@ function El() {
|
|
|
11380
11464
|
})]
|
|
11381
11465
|
});
|
|
11382
11466
|
}
|
|
11383
|
-
function
|
|
11384
|
-
let e =
|
|
11467
|
+
function kl() {
|
|
11468
|
+
let e = Dl("expr").map((e) => e.data);
|
|
11385
11469
|
return e.length === 0 ? /* @__PURE__ */ C("p", {
|
|
11386
11470
|
className: "text-xs text-muted-foreground italic",
|
|
11387
11471
|
children: "No expression evaluations tracked yet"
|
|
@@ -11407,8 +11491,8 @@ function Dl() {
|
|
|
11407
11491
|
})]
|
|
11408
11492
|
});
|
|
11409
11493
|
}
|
|
11410
|
-
function
|
|
11411
|
-
let e =
|
|
11494
|
+
function Al() {
|
|
11495
|
+
let e = Dl("event").map((e) => e.data);
|
|
11412
11496
|
return e.length === 0 ? /* @__PURE__ */ C("p", {
|
|
11413
11497
|
className: "text-xs text-muted-foreground italic",
|
|
11414
11498
|
children: "No events captured yet"
|
|
@@ -11440,42 +11524,42 @@ function Ol() {
|
|
|
11440
11524
|
})]
|
|
11441
11525
|
});
|
|
11442
11526
|
}
|
|
11443
|
-
function
|
|
11527
|
+
function jl({ open: e, onClose: t, flags: n, schema: r, dataContext: i, extraTabs: a = [], className: o }) {
|
|
11444
11528
|
let s = y(() => [
|
|
11445
11529
|
{
|
|
11446
11530
|
id: "schema",
|
|
11447
11531
|
label: "Schema",
|
|
11448
|
-
render: () => /* @__PURE__ */ C(
|
|
11532
|
+
render: () => /* @__PURE__ */ C(Cl, { schema: r })
|
|
11449
11533
|
},
|
|
11450
11534
|
{
|
|
11451
11535
|
id: "data",
|
|
11452
11536
|
label: "Data",
|
|
11453
|
-
render: () => /* @__PURE__ */ C(
|
|
11537
|
+
render: () => /* @__PURE__ */ C(wl, { dataContext: i })
|
|
11454
11538
|
},
|
|
11455
11539
|
{
|
|
11456
11540
|
id: "perf",
|
|
11457
11541
|
label: "Perf",
|
|
11458
|
-
render: () => /* @__PURE__ */ C(
|
|
11542
|
+
render: () => /* @__PURE__ */ C(Ol, {})
|
|
11459
11543
|
},
|
|
11460
11544
|
{
|
|
11461
11545
|
id: "expr",
|
|
11462
11546
|
label: "Expr",
|
|
11463
|
-
render: () => /* @__PURE__ */ C(
|
|
11547
|
+
render: () => /* @__PURE__ */ C(kl, {})
|
|
11464
11548
|
},
|
|
11465
11549
|
{
|
|
11466
11550
|
id: "events",
|
|
11467
11551
|
label: "Events",
|
|
11468
|
-
render: () => /* @__PURE__ */ C(
|
|
11552
|
+
render: () => /* @__PURE__ */ C(Al, {})
|
|
11469
11553
|
},
|
|
11470
11554
|
{
|
|
11471
11555
|
id: "registry",
|
|
11472
11556
|
label: "Registry",
|
|
11473
|
-
render: () => /* @__PURE__ */ C(
|
|
11557
|
+
render: () => /* @__PURE__ */ C(Tl, {})
|
|
11474
11558
|
},
|
|
11475
11559
|
{
|
|
11476
11560
|
id: "flags",
|
|
11477
11561
|
label: "Flags",
|
|
11478
|
-
render: () => /* @__PURE__ */ C(
|
|
11562
|
+
render: () => /* @__PURE__ */ C(El, { flags: n })
|
|
11479
11563
|
}
|
|
11480
11564
|
], [
|
|
11481
11565
|
r,
|
|
@@ -11528,8 +11612,8 @@ function kl({ open: e, onClose: t, flags: n, schema: r, dataContext: i, extraTab
|
|
|
11528
11612
|
}
|
|
11529
11613
|
//#endregion
|
|
11530
11614
|
//#region src/index.ts
|
|
11531
|
-
function
|
|
11615
|
+
function Ml() {
|
|
11532
11616
|
return !0;
|
|
11533
11617
|
}
|
|
11534
11618
|
//#endregion
|
|
11535
|
-
export { Nt as Accordion, It as AccordionContent, Pt as AccordionItem, Ft as AccordionTrigger, rc 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, q 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, cc 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, dc as DataEmptyState, fc as DataErrorState, uc as DataLoadingState, Cs as DatePicker,
|
|
11619
|
+
export { Nt as Accordion, It as AccordionContent, Pt as AccordionItem, Ft as AccordionTrigger, rc 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, q 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, cc 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, dc as DataEmptyState, fc as DataErrorState, uc as DataLoadingState, Cs as DatePicker, jl 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, hc 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, oc as FormSkeleton, ic as GridSkeleton, nc as GroupingEditor, ii as HoverCard, oi as HoverCardContent, ai as HoverCardTrigger, Y 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, ac as KanbanSkeleton, Js as Kbd, Ys as KbdGroup, J as Label, Wc as LazyIcon, sc 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, pc 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, $s 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, 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, X 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, Z as Skeleton, ao as Slider, ys as SortBuilder, ec 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, lc as ViewSkeleton, rn as badgeVariants, Zo as buttonGroupVariants, Lt as buttonVariants, G as cn, Ke as cva, Uc as getLazyIcon, Ml as initializeComponents, Ai as navigationMenuTriggerStyle, _l as registerPlaceholders, K as renderChildren, zc as toKebabIconName, So as toggleVariants, vl as useConfigDraft, Sl as useExportJob, Zr as useFormField, Sa as useIsMobile, yl as useResizeObserver, Pa as useSidebar };
|