react-semaphor 0.0.603 → 0.0.604
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/chunks/{dashboard-plus-DaQzKbBt.js → dashboard-plus-BCYkzhJl.js} +8 -8
- package/dist/chunks/{dashboard-plus-C77hCbZC.js → dashboard-plus-DLNR8UT-.js} +481 -471
- package/dist/chunks/index-Bca4CpHf.js +866 -0
- package/dist/chunks/{index-sYcwJnZF.js → index-CzP4rV5O.js} +41704 -40828
- package/dist/dashboard/index.cjs +1 -1
- package/dist/dashboard/index.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +3 -3
- package/dist/style.css +1 -1
- package/dist/surfboard/index.cjs +1 -1
- package/dist/surfboard/index.js +1 -1
- package/dist/types/dashboard.d.ts +6 -1
- package/dist/types/main.d.ts +7 -1
- package/dist/types/surfboard.d.ts +6 -1
- package/dist/types/types.d.ts +6 -1
- package/package.json +1 -1
- package/dist/chunks/index-CggdOrtY.js +0 -871
|
@@ -4,7 +4,7 @@ var yr = (t) => {
|
|
|
4
4
|
var Jn = (t, a, n) => a.has(t) || yr("Cannot " + n);
|
|
5
5
|
var Ae = (t, a, n) => (Jn(t, a, "read from private field"), n ? n.call(t) : a.get(t)), Ma = (t, a, n) => a.has(t) ? yr("Cannot add the same private member more than once") : a instanceof WeakSet ? a.add(t) : a.set(t, n), Ta = (t, a, n, r) => (Jn(t, a, "write to private field"), r ? r.call(t, n) : a.set(t, n), n), Ea = (t, a, n) => (Jn(t, a, "access private method"), n);
|
|
6
6
|
import { jsxs as s, jsx as e, Fragment as se } from "react/jsx-runtime";
|
|
7
|
-
import { L as Vi, M as ji, N as vr, O as Bi, P as Hr, Q as at, R as Ui, T as $i, V as ne, W as Qr, u as ae, X as ca, Y as da, Z as V, _ as ua, $ as We, a0 as ws, I as wt, a1 as Oe, a2 as zt, a3 as Xr, a4 as $e, a5 as Lt, a6 as Pt, a7 as _t, a8 as na, a9 as B, aa as De, ab as Na, ac as ve, ad as Zr, ae as Ia, af as qi, ag as Nr, ah as el, ai as K, aj as Ss, ak as Yi, al as tl, am as al, an as Oa, ao as be, j as br, ap as ue, aq as me, ar as he, as as pe, at as Ra, au as Fa, av as Q, aw as nl, ax as ht, ay as pt, az as Gi, aA as St, aB as ot, aC as Pe, aD as ma, aE as _e, aF as je, aG as Be, aH as Xe, aI as On, aJ as Qe, aK as ln, aL as Ki, aM as kt, aN as ba, aO as Wi, aP as Va, aQ as rt, aR as ut, aS as ks, aT as Ji, aU as Pn, aV as Zt, aW as sl, aX as rl, aY as bt, aZ as on, a_ as ja, a$ as Re, b0 as ce, b1 as Me, b2 as Ba, b3 as Dt, b4 as Ua, b5 as Hi, b6 as ha, b7 as et, b8 as cn, b9 as st, ba as ll, bb as os, bc as Mt, bd as wa, be as dn, bf as un, bg as Qi, bh as Sa, bi as Ds, bj as Ms, bk as Ts, bl as Es, bm as $a, bn as mn, bo as il, bp as As, bq as _n, br as Is, bs as Xi, bt as Os, bu as Zi, bv as eo, bw as Ut, bx as $t, by as Ie, bz as ea, bA as ol, K as re, bB as Nt, J as E, bC as Vn, bD as cl, bE as dl, bF as ul, bG as ml, bH as hl, bI as pl, bJ as fl, bK as gl, bL as to, bM as ao, bN as Aa, bO as Rs, bP as no, bQ as so, bR as ro, i as lo, bS as xl, bT as Qa, bU as pa, bV as hn, bW as pn, bX as fn, bY as gn, bZ as fa, b_ as qa, b$ as Ct, c0 as jn, A as Tt, c1 as Fs, r as yl, q as vl, l as vt, c2 as Le, c3 as io, c4 as sa, c5 as ta, c6 as Nl, c7 as oo, k as bl, c8 as Xa, c9 as Jt, ca as co, n as aa, m as It, o as Ot, cb as cs, cc as zs, cd as Ls, ce as Bn, cf as ra, x as Cr, cg as Ve, ch as Ps, ci as Tn, cj as _s, ck as uo, cl as mo, cm as ho, cn as Cl, co as po, cp as Un, cq as fo, cr as za, cs as go, ct as ds, cu as Ht, cv as Ge, cw as Qt, cx as xo, cy as yo, cz as vo, cA as Vs, cB as No, cC as js, cD as Bs, cE as bo, cF as wl, cG as Sl, cH as Co, cI as wo, cJ as Za, cK as So, cL as Us, cM as ko, cN as Do, cO as wr, cP as Mo, E as xn, b as $s, cQ as qs, cR as To, cS as Eo, cT as Ao, cU as Io, cV as Oo, cW as kl, cX as Ys, cY as Dl, cZ as Ml, c_ as Tl, c$ as El, d0 as Al, d1 as Gs, d2 as Ks, d3 as Il, d4 as Ol, d5 as Rl, d6 as $n, d7 as qn, d8 as Ro, d9 as Fo, da as zo, db as Lo, dc as Po, dd as _o, de as Vo, df as jo, dg as Ze, dh as tt, di as Ce, dj as we, dk as Se, dl as Bo, dm as Uo, dn as $o, dp as qo, dq as Yo, y as Go, dr as Sr, ds as Fl, dt as Ko, du as Wo, dv as wn, dw as kr, dx as Jo, dy as Dr, dz as Mr, dA as Ho, dB as Qo, dC as Xo, dD as Zo, dE as Ws, dF as Js, dG as Hs, dH as Ya, dI as Qs, dJ as la, dK as ec, dL as Yn, dM as zl, dN as Hn, dO as tc, dP as ac, dQ as Tr, dR as nc, dS as sc, dT as rc, dU as lc, dV as ic, w as Er, dW as Ar, dX as oc, dY as cc, dZ as dc, d_ as uc, d$ as mc, e0 as hc, e1 as pc, e2 as fc, e3 as gc, e4 as xc, e5 as yc, e6 as vc, e7 as Nc, e8 as bc, e9 as Cc, ea as wc, eb as Sc, ec as kc, ed as Dc, ee as Xs, ef as Qn, eg as Mc, eh as Tc, ei as us, ej as Ec, ek as En, el as An, em as Ga, en as Ac, eo as Ir, ep as Ic, eq as ms, er as Ll, es as Zs, et as Oc, eu as Xn, ev as er, ew as Rc, ex as Fc, ey as zc, ez as en, eA as Lc, eB as hs, eC as Pc, eD as _c, eE as Vc, eF as ps, eG as fs, eH as Rn, eI as jc, eJ as La, eK as tn, eL as Bc, eM as Uc, eN as $c, eO as qc, eP as Yc, F as Pl, eQ as Gc, eR as Kc, p as Wc, eS as Jc, B as Hc, eT as Qc, eU as Xc, S as Zc, eV as ed, U as td, eW as ad, C as nd } from "./index-
|
|
7
|
+
import { L as Vi, M as ji, N as vr, O as Bi, P as Hr, Q as at, R as Ui, T as $i, V as ne, W as Qr, u as ae, X as ca, Y as da, Z as V, _ as ua, $ as We, a0 as ws, I as wt, a1 as Oe, a2 as zt, a3 as Xr, a4 as $e, a5 as Lt, a6 as Pt, a7 as _t, a8 as na, a9 as B, aa as De, ab as Na, ac as ve, ad as Zr, ae as Ia, af as qi, ag as Nr, ah as el, ai as K, aj as Ss, ak as Yi, al as tl, am as al, an as Oa, ao as be, j as br, ap as ue, aq as me, ar as he, as as pe, at as Ra, au as Fa, av as Q, aw as nl, ax as ht, ay as pt, az as Gi, aA as St, aB as ot, aC as Pe, aD as ma, aE as _e, aF as je, aG as Be, aH as Xe, aI as On, aJ as Qe, aK as ln, aL as Ki, aM as kt, aN as ba, aO as Wi, aP as Va, aQ as rt, aR as ut, aS as ks, aT as Ji, aU as Pn, aV as Zt, aW as sl, aX as rl, aY as bt, aZ as on, a_ as ja, a$ as Re, b0 as ce, b1 as Me, b2 as Ba, b3 as Dt, b4 as Ua, b5 as Hi, b6 as ha, b7 as et, b8 as cn, b9 as st, ba as ll, bb as os, bc as Mt, bd as wa, be as dn, bf as un, bg as Qi, bh as Sa, bi as Ds, bj as Ms, bk as Ts, bl as Es, bm as $a, bn as mn, bo as il, bp as As, bq as _n, br as Is, bs as Xi, bt as Os, bu as Zi, bv as eo, bw as Ut, bx as $t, by as Ie, bz as ea, bA as ol, K as re, bB as Nt, J as E, bC as Vn, bD as cl, bE as dl, bF as ul, bG as ml, bH as hl, bI as pl, bJ as fl, bK as gl, bL as to, bM as ao, bN as Aa, bO as Rs, bP as no, bQ as so, bR as ro, i as lo, bS as xl, bT as Qa, bU as pa, bV as hn, bW as pn, bX as fn, bY as gn, bZ as fa, b_ as qa, b$ as Ct, c0 as jn, A as Tt, c1 as Fs, r as yl, q as vl, l as vt, c2 as Le, c3 as io, c4 as sa, c5 as ta, c6 as Nl, c7 as oo, k as bl, c8 as Xa, c9 as Jt, ca as co, n as aa, m as It, o as Ot, cb as cs, cc as zs, cd as Ls, ce as Bn, cf as ra, x as Cr, cg as Ve, ch as Ps, ci as Tn, cj as _s, ck as uo, cl as mo, cm as ho, cn as Cl, co as po, cp as Un, cq as fo, cr as za, cs as go, ct as ds, cu as Ht, cv as Ge, cw as Qt, cx as xo, cy as yo, cz as vo, cA as Vs, cB as No, cC as js, cD as Bs, cE as bo, cF as wl, cG as Sl, cH as Co, cI as wo, cJ as Za, cK as So, cL as Us, cM as ko, cN as Do, cO as wr, cP as Mo, E as xn, b as $s, cQ as qs, cR as To, cS as Eo, cT as Ao, cU as Io, cV as Oo, cW as kl, cX as Ys, cY as Dl, cZ as Ml, c_ as Tl, c$ as El, d0 as Al, d1 as Gs, d2 as Ks, d3 as Il, d4 as Ol, d5 as Rl, d6 as $n, d7 as qn, d8 as Ro, d9 as Fo, da as zo, db as Lo, dc as Po, dd as _o, de as Vo, df as jo, dg as Ze, dh as tt, di as Ce, dj as we, dk as Se, dl as Bo, dm as Uo, dn as $o, dp as qo, dq as Yo, y as Go, dr as Sr, ds as Fl, dt as Ko, du as Wo, dv as wn, dw as kr, dx as Jo, dy as Dr, dz as Mr, dA as Ho, dB as Qo, dC as Xo, dD as Zo, dE as Ws, dF as Js, dG as Hs, dH as Ya, dI as Qs, dJ as la, dK as ec, dL as Yn, dM as zl, dN as Hn, dO as tc, dP as ac, dQ as Tr, dR as nc, dS as sc, dT as rc, dU as lc, dV as ic, w as Er, dW as Ar, dX as oc, dY as cc, dZ as dc, d_ as uc, d$ as mc, e0 as hc, e1 as pc, e2 as fc, e3 as gc, e4 as xc, e5 as yc, e6 as vc, e7 as Nc, e8 as bc, e9 as Cc, ea as wc, eb as Sc, ec as kc, ed as Dc, ee as Xs, ef as Qn, eg as Mc, eh as Tc, ei as us, ej as Ec, ek as En, el as An, em as Ga, en as Ac, eo as Ir, ep as Ic, eq as ms, er as Ll, es as Zs, et as Oc, eu as Xn, ev as er, ew as Rc, ex as Fc, ey as zc, ez as en, eA as Lc, eB as hs, eC as Pc, eD as _c, eE as Vc, eF as ps, eG as fs, eH as Rn, eI as jc, eJ as La, eK as tn, eL as Bc, eM as Uc, eN as $c, eO as qc, eP as Yc, F as Pl, eQ as Gc, eR as Kc, p as Wc, eS as Jc, B as Hc, eT as Qc, eU as Xc, S as Zc, eV as ed, U as td, eW as ad, C as nd } from "./index-CzP4rV5O.js";
|
|
8
8
|
import * as nt from "react";
|
|
9
9
|
import dt, { useState as j, useCallback as Ne, useEffect as Te, useRef as Vt, useMemo as Ke, Suspense as _l, useContext as sd } from "react";
|
|
10
10
|
import "react-dom";
|
|
@@ -1666,12 +1666,12 @@ function cu() {
|
|
|
1666
1666
|
async function f({
|
|
1667
1667
|
email: T,
|
|
1668
1668
|
subject: F,
|
|
1669
|
-
frequency:
|
|
1669
|
+
frequency: b,
|
|
1670
1670
|
time: k
|
|
1671
1671
|
}) {
|
|
1672
1672
|
const { authToken: N, ...D } = Wi(), w = Intl.DateTimeFormat().resolvedOptions().timeZone, I = {
|
|
1673
1673
|
email: T,
|
|
1674
|
-
frequency:
|
|
1674
|
+
frequency: b,
|
|
1675
1675
|
time: k,
|
|
1676
1676
|
timezone: w,
|
|
1677
1677
|
endUserId: d,
|
|
@@ -1697,15 +1697,15 @@ function cu() {
|
|
|
1697
1697
|
console.error(z), a("error"), r(z.message);
|
|
1698
1698
|
}
|
|
1699
1699
|
}
|
|
1700
|
-
async function
|
|
1700
|
+
async function C(T) {
|
|
1701
1701
|
const F = "https://semaphor.cloud/api/v1/subscriptions/delete";
|
|
1702
1702
|
i(T);
|
|
1703
1703
|
try {
|
|
1704
1704
|
await ba(F, (c == null ? void 0 : c.accessToken) || "", { id: T }), v(), setTimeout(() => {
|
|
1705
1705
|
i(null);
|
|
1706
1706
|
}, 2e3);
|
|
1707
|
-
} catch (
|
|
1708
|
-
console.error(
|
|
1707
|
+
} catch (b) {
|
|
1708
|
+
console.error(b), i(null), a("error"), r(b.message);
|
|
1709
1709
|
}
|
|
1710
1710
|
}
|
|
1711
1711
|
return {
|
|
@@ -1716,7 +1716,7 @@ function cu() {
|
|
|
1716
1716
|
isDeleting: l,
|
|
1717
1717
|
refetch: v,
|
|
1718
1718
|
handleScheduleSubscription: f,
|
|
1719
|
-
handleDeleteSubscription:
|
|
1719
|
+
handleDeleteSubscription: C,
|
|
1720
1720
|
status: t,
|
|
1721
1721
|
error: n
|
|
1722
1722
|
};
|
|
@@ -2221,11 +2221,11 @@ function Ou({
|
|
|
2221
2221
|
var N, D, w;
|
|
2222
2222
|
const { selectVisual: g } = ks(), x = Ji(t.id), { isConsoleMode: y } = Pn(), p = ae(
|
|
2223
2223
|
(I) => I.actions.setIsDashboardPanelOpen
|
|
2224
|
-
), [v, f] = j(!1), [
|
|
2224
|
+
), [v, f] = j(!1), [C, T] = j(!1);
|
|
2225
2225
|
Te(() => {
|
|
2226
|
-
n ? (f(!0), T(!0)) :
|
|
2227
|
-
}, [n,
|
|
2228
|
-
const F = () => t.ownership.isOwner ? t.ownership.status === "private" ? /* @__PURE__ */ e(tr, { className: "h-3 w-3 text-purple-500" }) : /* @__PURE__ */ e(Bt, { className: "h-3.5 w-3.5 text-blue-600" }) : /* @__PURE__ */ e(ia, { className: "h-3.5 w-3.5 text-slate-500" }),
|
|
2226
|
+
n ? (f(!0), T(!0)) : C && (f(!1), T(!1));
|
|
2227
|
+
}, [n, C]);
|
|
2228
|
+
const F = () => t.ownership.isOwner ? t.ownership.status === "private" ? /* @__PURE__ */ e(tr, { className: "h-3 w-3 text-purple-500" }) : /* @__PURE__ */ e(Bt, { className: "h-3.5 w-3.5 text-blue-600" }) : /* @__PURE__ */ e(ia, { className: "h-3.5 w-3.5 text-slate-500" }), b = () => /* @__PURE__ */ e(on, { className: "h-4 w-4 text-slate-400" }), k = () => {
|
|
2229
2229
|
g(t), c == null || c(t);
|
|
2230
2230
|
};
|
|
2231
2231
|
return /* @__PURE__ */ s(
|
|
@@ -2240,7 +2240,7 @@ function Ou({
|
|
|
2240
2240
|
tabIndex: 0,
|
|
2241
2241
|
onClick: k,
|
|
2242
2242
|
children: [
|
|
2243
|
-
/* @__PURE__ */ e("div", { className: "flex-shrink-0", children: /* @__PURE__ */ e("div", { className: "flex h-8 w-8 items-center justify-center rounded-md bg-slate-100 dark:bg-slate-800", children:
|
|
2243
|
+
/* @__PURE__ */ e("div", { className: "flex-shrink-0", children: /* @__PURE__ */ e("div", { className: "flex h-8 w-8 items-center justify-center rounded-md bg-slate-100 dark:bg-slate-800", children: b() }) }),
|
|
2244
2244
|
/* @__PURE__ */ s("div", { className: "flex w-full items-start justify-between", children: [
|
|
2245
2245
|
/* @__PURE__ */ s("div", { className: "flex-1", children: [
|
|
2246
2246
|
/* @__PURE__ */ s("div", { className: "flex items-center gap-2", children: [
|
|
@@ -2755,12 +2755,12 @@ function Vu({
|
|
|
2755
2755
|
] }),
|
|
2756
2756
|
/* @__PURE__ */ s("div", { className: "grid grid-cols-1 gap-1", children: [
|
|
2757
2757
|
o.slice(0, 3).map((g, x) => {
|
|
2758
|
-
var f,
|
|
2758
|
+
var f, C;
|
|
2759
2759
|
const y = ((f = a.find(
|
|
2760
2760
|
(T) => T.id === g.orgUserId
|
|
2761
|
-
)) == null ? void 0 : f.name) || "Unknown User", p = ((
|
|
2761
|
+
)) == null ? void 0 : f.name) || "Unknown User", p = ((C = a.find(
|
|
2762
2762
|
(T) => T.id === g.orgUserId
|
|
2763
|
-
)) == null ? void 0 :
|
|
2763
|
+
)) == null ? void 0 : C.type) || "", v = xt(
|
|
2764
2764
|
g.role,
|
|
2765
2765
|
n(p)
|
|
2766
2766
|
);
|
|
@@ -2798,12 +2798,12 @@ function Vu({
|
|
|
2798
2798
|
] }),
|
|
2799
2799
|
/* @__PURE__ */ s("div", { className: "grid grid-cols-1 gap-1", children: [
|
|
2800
2800
|
u.slice(0, 3).map((g, x) => {
|
|
2801
|
-
var f,
|
|
2801
|
+
var f, C;
|
|
2802
2802
|
const y = ((f = a.find(
|
|
2803
2803
|
(T) => T.id === g.tenantUserId
|
|
2804
|
-
)) == null ? void 0 : f.name) || "Unknown User", p = ((
|
|
2804
|
+
)) == null ? void 0 : f.name) || "Unknown User", p = ((C = a.find(
|
|
2805
2805
|
(T) => T.id === g.tenantUserId
|
|
2806
|
-
)) == null ? void 0 :
|
|
2806
|
+
)) == null ? void 0 : C.type) || "", v = xt(
|
|
2807
2807
|
g.role,
|
|
2808
2808
|
n(p)
|
|
2809
2809
|
);
|
|
@@ -3195,11 +3195,11 @@ function Zl({
|
|
|
3195
3195
|
handleRemoveAccess: u,
|
|
3196
3196
|
handleUpdateAccess: d
|
|
3197
3197
|
}) {
|
|
3198
|
-
const m = Ba(), h = Dt(), g = Ua(), x = Hi(), y = ha(), p = c || ((
|
|
3199
|
-
const k = m.some((D) => D.id ===
|
|
3200
|
-
k ? y.removeSelectedUser(
|
|
3201
|
-
}), v = o || y.updateSelectedUserRole, f = u || y.addUserToRemove,
|
|
3202
|
-
y.addUserToUpdate({ id:
|
|
3198
|
+
const m = Ba(), h = Dt(), g = Ua(), x = Hi(), y = ha(), p = c || ((b) => {
|
|
3199
|
+
const k = m.some((D) => D.id === b), N = h.includes(b);
|
|
3200
|
+
k ? y.removeSelectedUser(b) : N ? y.removeUserFromRemove(b) : y.addSelectedUser({ id: b, role: "VIEWER" });
|
|
3201
|
+
}), v = o || y.updateSelectedUserRole, f = u || y.addUserToRemove, C = d || ((b, k, N) => {
|
|
3202
|
+
y.addUserToUpdate({ id: b, currentRole: k, newRole: N });
|
|
3203
3203
|
}), T = l, F = h;
|
|
3204
3204
|
return /* @__PURE__ */ s("div", { className: "space-y-2", children: [
|
|
3205
3205
|
/* @__PURE__ */ s("div", { className: "flex items-center justify-between", children: [
|
|
@@ -3229,7 +3229,7 @@ function Zl({
|
|
|
3229
3229
|
size: "sm",
|
|
3230
3230
|
onClick: () => {
|
|
3231
3231
|
m.length === T.length ? y.setSelectedUsers([]) : y.setSelectedUsers(
|
|
3232
|
-
T.map((
|
|
3232
|
+
T.map((b) => ({ id: b.id, role: "VIEWER" }))
|
|
3233
3233
|
);
|
|
3234
3234
|
},
|
|
3235
3235
|
className: "h-auto p-1 text-xs",
|
|
@@ -3247,16 +3247,16 @@ function Zl({
|
|
|
3247
3247
|
availableUsers: T || []
|
|
3248
3248
|
}
|
|
3249
3249
|
),
|
|
3250
|
-
!a && !n && (T == null ? void 0 : T.length) > 0 && T.map((
|
|
3251
|
-
const k = t ? Fu(
|
|
3252
|
-
(M) => M.id ===
|
|
3250
|
+
!a && !n && (T == null ? void 0 : T.length) > 0 && T.map((b) => {
|
|
3251
|
+
const k = t ? Fu(b, t, i) : void 0, N = F.includes(b.id), D = !!k, w = D && !N, I = m.some(
|
|
3252
|
+
(M) => M.id === b.id
|
|
3253
3253
|
), S = m.find(
|
|
3254
|
-
(M) => M.id ===
|
|
3255
|
-
), z = r(
|
|
3254
|
+
(M) => M.id === b.id
|
|
3255
|
+
), z = r(b.type);
|
|
3256
3256
|
return /* @__PURE__ */ e(
|
|
3257
3257
|
Bu,
|
|
3258
3258
|
{
|
|
3259
|
-
user:
|
|
3259
|
+
user: b,
|
|
3260
3260
|
userShare: k,
|
|
3261
3261
|
isUserRemoving: N,
|
|
3262
3262
|
hasAccess: w,
|
|
@@ -3268,10 +3268,10 @@ function Zl({
|
|
|
3268
3268
|
usersToUpdate: g,
|
|
3269
3269
|
handleUserToggle: p,
|
|
3270
3270
|
handleRemoveAccess: f,
|
|
3271
|
-
handleUpdateAccess:
|
|
3271
|
+
handleUpdateAccess: C,
|
|
3272
3272
|
handleUserRoleChange: v
|
|
3273
3273
|
},
|
|
3274
|
-
|
|
3274
|
+
b.id
|
|
3275
3275
|
);
|
|
3276
3276
|
})
|
|
3277
3277
|
] })
|
|
@@ -3350,9 +3350,9 @@ function Uu({
|
|
|
3350
3350
|
isRemoving: o = !1
|
|
3351
3351
|
}) {
|
|
3352
3352
|
const u = Mt(), d = ga().filter(
|
|
3353
|
-
(
|
|
3354
|
-
), m = a.role !== "NONE" ? a.role : "NONE", h = l ? l.newRole : m, g = a.role !== "NONE" && !i && (!l || l.newRole === m), x = l !== null && l.newRole !== m, y = i, p = m === "NONE" || !m, v = (
|
|
3355
|
-
switch (
|
|
3353
|
+
(C) => C.value === "VIEWER" || C.value === "EDITOR" || C.value === "CONTRIBUTOR"
|
|
3354
|
+
), m = a.role !== "NONE" ? a.role : "NONE", h = l ? l.newRole : m, g = a.role !== "NONE" && !i && (!l || l.newRole === m), x = l !== null && l.newRole !== m, y = i, p = m === "NONE" || !m, v = (C) => {
|
|
3355
|
+
switch (C) {
|
|
3356
3356
|
case "VIEWER":
|
|
3357
3357
|
return /* @__PURE__ */ e(Oa, { className: "h-4 w-4" });
|
|
3358
3358
|
case "EDITOR":
|
|
@@ -3362,8 +3362,8 @@ function Uu({
|
|
|
3362
3362
|
default:
|
|
3363
3363
|
return /* @__PURE__ */ e(Oa, { className: "h-4 w-4" });
|
|
3364
3364
|
}
|
|
3365
|
-
}, f = (
|
|
3366
|
-
r(m,
|
|
3365
|
+
}, f = (C) => {
|
|
3366
|
+
r(m, C);
|
|
3367
3367
|
};
|
|
3368
3368
|
return /* @__PURE__ */ e("div", { className: "space-y-4", children: /* @__PURE__ */ s(
|
|
3369
3369
|
wa,
|
|
@@ -3443,22 +3443,22 @@ function Uu({
|
|
|
3443
3443
|
] }) })
|
|
3444
3444
|
] })
|
|
3445
3445
|
] }),
|
|
3446
|
-
/* @__PURE__ */ e("div", { className: "grid grid-cols-2 gap-3", children: d.map((
|
|
3446
|
+
/* @__PURE__ */ e("div", { className: "grid grid-cols-2 gap-3", children: d.map((C) => /* @__PURE__ */ s(
|
|
3447
3447
|
V,
|
|
3448
3448
|
{
|
|
3449
|
-
variant: h ===
|
|
3449
|
+
variant: h === C.value ? "default" : "outline",
|
|
3450
3450
|
className: "h-auto flex-col items-start gap-2 p-3",
|
|
3451
|
-
onClick: () => f(
|
|
3451
|
+
onClick: () => f(C.value),
|
|
3452
3452
|
disabled: n || c || o,
|
|
3453
3453
|
children: [
|
|
3454
3454
|
/* @__PURE__ */ s("div", { className: "flex items-center gap-2", children: [
|
|
3455
|
-
v(
|
|
3456
|
-
/* @__PURE__ */ e("span", { className: "font-medium", children:
|
|
3455
|
+
v(C.value),
|
|
3456
|
+
/* @__PURE__ */ e("span", { className: "font-medium", children: C.label })
|
|
3457
3457
|
] }),
|
|
3458
|
-
/* @__PURE__ */ e("p", { className: "text-left text-xs text-muted-foreground", children:
|
|
3458
|
+
/* @__PURE__ */ e("p", { className: "text-left text-xs text-muted-foreground", children: C.description })
|
|
3459
3459
|
]
|
|
3460
3460
|
},
|
|
3461
|
-
|
|
3461
|
+
C.value
|
|
3462
3462
|
)) })
|
|
3463
3463
|
] }) })
|
|
3464
3464
|
]
|
|
@@ -3565,10 +3565,10 @@ function Yu({
|
|
|
3565
3565
|
isRemoving: c = !1
|
|
3566
3566
|
}) {
|
|
3567
3567
|
var ie, X;
|
|
3568
|
-
const o = $a(), u = mn(), { searchQuery: d, setSearchQuery: m, debouncedSearchQuery: h } = il(), g = Ba(), x = Dt(), y = Ua(), p = Mt(), v = As(), f = ha(), [
|
|
3568
|
+
const o = $a(), u = mn(), { searchQuery: d, setSearchQuery: m, debouncedSearchQuery: h } = il(), g = Ba(), x = Dt(), y = Ua(), p = Mt(), v = As(), f = ha(), [C, T] = dt.useState("specific_users"), F = () => {
|
|
3569
3569
|
if (o === "org") return "organization";
|
|
3570
3570
|
if (o === "tenant") return "tenant";
|
|
3571
|
-
},
|
|
3571
|
+
}, b = () => {
|
|
3572
3572
|
if (o === "tenant" && u)
|
|
3573
3573
|
return u;
|
|
3574
3574
|
}, { allUsers: k, existingShares: N, isLoadingUsers: D } = oa({
|
|
@@ -3576,13 +3576,13 @@ function Yu({
|
|
|
3576
3576
|
resourceId: (t == null ? void 0 : t.id) || "",
|
|
3577
3577
|
resourceType: a,
|
|
3578
3578
|
userType: F(),
|
|
3579
|
-
tenantId:
|
|
3579
|
+
tenantId: b()
|
|
3580
3580
|
});
|
|
3581
3581
|
dt.useEffect(() => {
|
|
3582
3582
|
f.setCurrentContext("org-tab"), f.setCurrentMode(
|
|
3583
|
-
|
|
3583
|
+
C === "all_users" ? "allOrgUsers" : "specificOrgUsers"
|
|
3584
3584
|
);
|
|
3585
|
-
}, [f,
|
|
3585
|
+
}, [f, C]);
|
|
3586
3586
|
const w = (G) => {
|
|
3587
3587
|
var Y, oe;
|
|
3588
3588
|
const J = G;
|
|
@@ -3617,14 +3617,14 @@ function Yu({
|
|
|
3617
3617
|
f.setOrgWideRole(($ == null ? void 0 : $.role) || "NONE");
|
|
3618
3618
|
}, $ = (X = (ie = N == null ? void 0 : N.shares) == null ? void 0 : ie.orgUsersOnly) == null ? void 0 : X[0];
|
|
3619
3619
|
dt.useEffect(() => {
|
|
3620
|
-
|
|
3621
|
-
}, [
|
|
3620
|
+
C === "all_users" && $ && $.role !== void 0 && f.setOrgWideRole($.role);
|
|
3621
|
+
}, [C, $, f]);
|
|
3622
3622
|
const U = D, le = !1;
|
|
3623
3623
|
return n ? /* @__PURE__ */ s(se, { children: [
|
|
3624
3624
|
/* @__PURE__ */ e(
|
|
3625
3625
|
ei,
|
|
3626
3626
|
{
|
|
3627
|
-
shareType:
|
|
3627
|
+
shareType: C,
|
|
3628
3628
|
onShareTypeChange: w,
|
|
3629
3629
|
currentUser: n,
|
|
3630
3630
|
options: [
|
|
@@ -3649,7 +3649,7 @@ function Yu({
|
|
|
3649
3649
|
]
|
|
3650
3650
|
}
|
|
3651
3651
|
),
|
|
3652
|
-
|
|
3652
|
+
C === "specific_users" ? /* @__PURE__ */ s("div", { className: "mt-3 space-y-2", children: [
|
|
3653
3653
|
/* @__PURE__ */ e(Kl, { value: d, onChange: m }),
|
|
3654
3654
|
/* @__PURE__ */ e(
|
|
3655
3655
|
Wl,
|
|
@@ -3727,9 +3727,9 @@ function Pr({
|
|
|
3727
3727
|
isRemoving: c = !1
|
|
3728
3728
|
}) {
|
|
3729
3729
|
var W;
|
|
3730
|
-
const { searchQuery: o, debouncedSearchQuery: u, setSearchQuery: d } = il(), m = Ba(), h = Dt(), g = Ua(), x = Mt(), y = _n(), p = Is(), v = mn(), f = ha(), { data:
|
|
3730
|
+
const { searchQuery: o, debouncedSearchQuery: u, setSearchQuery: d } = il(), m = Ba(), h = Dt(), g = Ua(), x = Mt(), y = _n(), p = Is(), v = mn(), f = ha(), { data: C, isLoading: T } = vu({
|
|
3731
3731
|
enabled: (n == null ? void 0 : n.type) === "organization"
|
|
3732
|
-
}), [F,
|
|
3732
|
+
}), [F, b] = j(
|
|
3733
3733
|
(n == null ? void 0 : n.type) === "organization" ? "all_tenants" : "specific_tenant_users"
|
|
3734
3734
|
);
|
|
3735
3735
|
dt.useEffect(() => {
|
|
@@ -3737,7 +3737,7 @@ function Pr({
|
|
|
3737
3737
|
}, [f, n == null ? void 0 : n.type]);
|
|
3738
3738
|
const k = (_) => {
|
|
3739
3739
|
var ge, q, de, Ee;
|
|
3740
|
-
|
|
3740
|
+
b(
|
|
3741
3741
|
_
|
|
3742
3742
|
);
|
|
3743
3743
|
let te;
|
|
@@ -3872,7 +3872,7 @@ function Pr({
|
|
|
3872
3872
|
placeholder: T ? "Loading tenants..." : "Select a tenant..."
|
|
3873
3873
|
}
|
|
3874
3874
|
) }),
|
|
3875
|
-
/* @__PURE__ */ e(pe, { className: "z-[51]", children: (W =
|
|
3875
|
+
/* @__PURE__ */ e(pe, { className: "z-[51]", children: (W = C == null ? void 0 : C.tenants) == null ? void 0 : W.map((_) => /* @__PURE__ */ e(Q, { value: _.id, children: _.name }, _.id)) })
|
|
3876
3876
|
]
|
|
3877
3877
|
}
|
|
3878
3878
|
)
|
|
@@ -4032,7 +4032,7 @@ function _r({
|
|
|
4032
4032
|
Mt(), Os();
|
|
4033
4033
|
const x = mn();
|
|
4034
4034
|
$a();
|
|
4035
|
-
const y = As(), p = Is(), v = _n(), { buildShareData: f, validateShareData:
|
|
4035
|
+
const y = As(), p = Is(), v = _n(), { buildShareData: f, validateShareData: C, isCurrentStateValid: T } = ai(), F = n || r || l, b = () => {
|
|
4036
4036
|
var I, S, z, M;
|
|
4037
4037
|
if (F) return "Updating...";
|
|
4038
4038
|
if (o === "specific_users") {
|
|
@@ -4066,20 +4066,20 @@ function _r({
|
|
|
4066
4066
|
return "Share";
|
|
4067
4067
|
}, k = () => F || !t || o === "all_tenant_users" && !x || o === "specific_tenant_users" && !x ? !0 : !T, N = () => {
|
|
4068
4068
|
const I = f();
|
|
4069
|
-
I &&
|
|
4069
|
+
I && C(I) && i(I);
|
|
4070
4070
|
}, D = () => {
|
|
4071
4071
|
var I, S, z, M;
|
|
4072
4072
|
if (o === "all_users")
|
|
4073
4073
|
if (!u || u.role === void 0) {
|
|
4074
4074
|
const A = f();
|
|
4075
|
-
A &&
|
|
4075
|
+
A && C(A) && i(A);
|
|
4076
4076
|
} else {
|
|
4077
4077
|
const A = u.role;
|
|
4078
4078
|
if (y === A)
|
|
4079
4079
|
d == null || d();
|
|
4080
4080
|
else {
|
|
4081
4081
|
const P = f();
|
|
4082
|
-
if (P &&
|
|
4082
|
+
if (P && C(P)) {
|
|
4083
4083
|
const R = {
|
|
4084
4084
|
...P,
|
|
4085
4085
|
updateAccess: !0
|
|
@@ -4092,14 +4092,14 @@ function _r({
|
|
|
4092
4092
|
const A = (S = (I = a == null ? void 0 : a.shares) == null ? void 0 : I.allTenantsOnly) == null ? void 0 : S[0];
|
|
4093
4093
|
if (!A || A.role === void 0) {
|
|
4094
4094
|
const O = f();
|
|
4095
|
-
O &&
|
|
4095
|
+
O && C(O) && i(O);
|
|
4096
4096
|
} else {
|
|
4097
4097
|
const O = A.role;
|
|
4098
4098
|
if (p === O)
|
|
4099
4099
|
d == null || d();
|
|
4100
4100
|
else {
|
|
4101
4101
|
const R = f();
|
|
4102
|
-
if (R &&
|
|
4102
|
+
if (R && C(R)) {
|
|
4103
4103
|
const L = {
|
|
4104
4104
|
...R,
|
|
4105
4105
|
updateAccess: !0
|
|
@@ -4112,14 +4112,14 @@ function _r({
|
|
|
4112
4112
|
const A = (M = (z = a == null ? void 0 : a.shares) == null ? void 0 : z.tenantWide) == null ? void 0 : M[0];
|
|
4113
4113
|
if (!A || A.role === void 0) {
|
|
4114
4114
|
const O = f();
|
|
4115
|
-
O &&
|
|
4115
|
+
O && C(O) && i(O);
|
|
4116
4116
|
} else {
|
|
4117
4117
|
const O = A.role;
|
|
4118
4118
|
if (v === O)
|
|
4119
4119
|
d == null || d();
|
|
4120
4120
|
else {
|
|
4121
4121
|
const R = f();
|
|
4122
|
-
if (R &&
|
|
4122
|
+
if (R && C(R)) {
|
|
4123
4123
|
const L = {
|
|
4124
4124
|
...R,
|
|
4125
4125
|
updateAccess: !0
|
|
@@ -4164,7 +4164,7 @@ function _r({
|
|
|
4164
4164
|
/* @__PURE__ */ e(Pe, { className: "mr-2 h-4 w-4 animate-spin" }),
|
|
4165
4165
|
"Updating..."
|
|
4166
4166
|
] }) : /* @__PURE__ */ e(sn, { className: "mr-2 h-4 w-4" }),
|
|
4167
|
-
!F &&
|
|
4167
|
+
!F && b()
|
|
4168
4168
|
]
|
|
4169
4169
|
}
|
|
4170
4170
|
) }),
|
|
@@ -4179,7 +4179,7 @@ function _r({
|
|
|
4179
4179
|
/* @__PURE__ */ e(Pe, { className: "mr-2 h-4 w-4 animate-spin" }),
|
|
4180
4180
|
"Updating..."
|
|
4181
4181
|
] }) : /* @__PURE__ */ e(Bt, { className: "mr-2 h-4 w-4" }),
|
|
4182
|
-
!F &&
|
|
4182
|
+
!F && b()
|
|
4183
4183
|
]
|
|
4184
4184
|
}
|
|
4185
4185
|
)
|
|
@@ -4204,25 +4204,25 @@ function Gu({
|
|
|
4204
4204
|
if (c === "specific_users") {
|
|
4205
4205
|
if (u.length === 0 && d.length === 0 && m.length === 0)
|
|
4206
4206
|
return "Select users to share with";
|
|
4207
|
-
const
|
|
4208
|
-
return
|
|
4207
|
+
const b = u.length + d.length + m.length;
|
|
4208
|
+
return b === 0 ? "Select users to share with" : u.length > 0 && d.length > 0 ? `Update access for ${b} user${b !== 1 ? "s" : ""}` : d.length > 0 && u.length === 0 && m.length === 0 ? `Remove access for ${d.length} user${d.length !== 1 ? "s" : ""}` : u.length > 0 && d.length === 0 && m.length === 0 ? `Share with ${u.length} user${u.length !== 1 ? "s" : ""}` : m.length > 0 && u.length === 0 && d.length === 0 ? `Update access for ${m.length} user${m.length !== 1 ? "s" : ""}` : `Update access for ${b} user${b !== 1 ? "s" : ""}`;
|
|
4209
4209
|
} else if (c === "all_users") {
|
|
4210
4210
|
if (!o || o.role === "NONE")
|
|
4211
4211
|
return "Share with All Users";
|
|
4212
|
-
const
|
|
4213
|
-
return h ===
|
|
4212
|
+
const b = o.role;
|
|
4213
|
+
return h === b ? "Remove Access" : "Update Access";
|
|
4214
4214
|
}
|
|
4215
4215
|
return "Share";
|
|
4216
|
-
}, f = () => p || !t ? !0 : !y,
|
|
4217
|
-
const
|
|
4218
|
-
|
|
4216
|
+
}, f = () => p || !t ? !0 : !y, C = () => {
|
|
4217
|
+
const b = g();
|
|
4218
|
+
b && x(b) && l(b);
|
|
4219
4219
|
}, T = () => {
|
|
4220
4220
|
if (!o || o.role === "NONE") {
|
|
4221
|
-
const
|
|
4222
|
-
|
|
4221
|
+
const b = g();
|
|
4222
|
+
b && x(b) && l(b);
|
|
4223
4223
|
} else {
|
|
4224
|
-
const
|
|
4225
|
-
if (h ===
|
|
4224
|
+
const b = o.role;
|
|
4225
|
+
if (h === b) {
|
|
4226
4226
|
const N = g();
|
|
4227
4227
|
if (N && x(N)) {
|
|
4228
4228
|
const D = {
|
|
@@ -4248,7 +4248,7 @@ function Gu({
|
|
|
4248
4248
|
c === "specific_users" && /* @__PURE__ */ e(se, { children: (u.length > 0 || d.length > 0 || m.length > 0) && /* @__PURE__ */ s(
|
|
4249
4249
|
V,
|
|
4250
4250
|
{
|
|
4251
|
-
onClick:
|
|
4251
|
+
onClick: C,
|
|
4252
4252
|
disabled: !t || p,
|
|
4253
4253
|
variant: "default",
|
|
4254
4254
|
children: [
|
|
@@ -4298,7 +4298,7 @@ function ni({
|
|
|
4298
4298
|
resourceId: (t == null ? void 0 : t.id) || "",
|
|
4299
4299
|
resourceType: a,
|
|
4300
4300
|
userType: "organization"
|
|
4301
|
-
}),
|
|
4301
|
+
}), C = (D = (N = v == null ? void 0 : v.shares) == null ? void 0 : N.tenantWide) == null ? void 0 : D[0], T = (I = (w = f == null ? void 0 : f.shares) == null ? void 0 : w.orgUsersOnly) == null ? void 0 : I[0], F = () => {
|
|
4302
4302
|
if (y === "org")
|
|
4303
4303
|
return h;
|
|
4304
4304
|
switch (p) {
|
|
@@ -4311,10 +4311,10 @@ function ni({
|
|
|
4311
4311
|
default:
|
|
4312
4312
|
return "specific_tenant_users";
|
|
4313
4313
|
}
|
|
4314
|
-
},
|
|
4314
|
+
}, b = dt.useCallback(() => {
|
|
4315
4315
|
x.resetShareState(), i();
|
|
4316
4316
|
}, [x, i]), k = (u == null ? void 0 : u.type) === "organization";
|
|
4317
|
-
return /* @__PURE__ */ e(zt, { open: !0, onOpenChange:
|
|
4317
|
+
return /* @__PURE__ */ e(zt, { open: !0, onOpenChange: b, children: /* @__PURE__ */ s(Lt, { className: "z-[51] flex max-h-[80vh] max-w-3xl flex-col", children: [
|
|
4318
4318
|
/* @__PURE__ */ s(Pt, { children: [
|
|
4319
4319
|
/* @__PURE__ */ e(_t, { children: /* @__PURE__ */ s("span", { className: "flex items-center gap-2", children: [
|
|
4320
4320
|
/* @__PURE__ */ e(sn, { className: "h-5 w-5" }),
|
|
@@ -4420,7 +4420,7 @@ function ni({
|
|
|
4420
4420
|
onShare: c,
|
|
4421
4421
|
onClose: i,
|
|
4422
4422
|
shareTabType: F(),
|
|
4423
|
-
currentAllUsersShare:
|
|
4423
|
+
currentAllUsersShare: C,
|
|
4424
4424
|
onRemoveAccess: o
|
|
4425
4425
|
}
|
|
4426
4426
|
)
|
|
@@ -4437,7 +4437,7 @@ function ni({
|
|
|
4437
4437
|
onShare: c,
|
|
4438
4438
|
onClose: i,
|
|
4439
4439
|
shareTabType: d,
|
|
4440
|
-
currentAllUsersShare:
|
|
4440
|
+
currentAllUsersShare: C,
|
|
4441
4441
|
onRemoveAccess: o
|
|
4442
4442
|
}
|
|
4443
4443
|
)
|
|
@@ -4573,7 +4573,7 @@ function si(t, a, n) {
|
|
|
4573
4573
|
m.map((y) => {
|
|
4574
4574
|
var v, f;
|
|
4575
4575
|
const p = (f = (v = o == null ? void 0 : o.shares) == null ? void 0 : v.specificTenantUsers) == null ? void 0 : f.find(
|
|
4576
|
-
(
|
|
4576
|
+
(C) => C.tenantUserId === y
|
|
4577
4577
|
);
|
|
4578
4578
|
return {
|
|
4579
4579
|
scope: "specific_tenant_user",
|
|
@@ -4737,8 +4737,8 @@ function ri(t, a, n, r) {
|
|
|
4737
4737
|
l,
|
|
4738
4738
|
i,
|
|
4739
4739
|
t.map((v) => {
|
|
4740
|
-
var
|
|
4741
|
-
const f = (T = (
|
|
4740
|
+
var C, T;
|
|
4741
|
+
const f = (T = (C = o == null ? void 0 : o.shares) == null ? void 0 : C.specificTenantUsers) == null ? void 0 : T.find(
|
|
4742
4742
|
(F) => F.tenantUserId === v
|
|
4743
4743
|
);
|
|
4744
4744
|
return {
|
|
@@ -4761,13 +4761,13 @@ function ri(t, a, n, r) {
|
|
|
4761
4761
|
if (p) {
|
|
4762
4762
|
const f = (m = (d = o == null ? void 0 : o.shares) == null ? void 0 : d.allTenantsOnly) == null ? void 0 : m[0];
|
|
4763
4763
|
if (f) {
|
|
4764
|
-
const
|
|
4764
|
+
const C = Xt(l, i, [
|
|
4765
4765
|
{
|
|
4766
4766
|
scope: "all_tenants_only",
|
|
4767
4767
|
role: f.role
|
|
4768
4768
|
}
|
|
4769
4769
|
]);
|
|
4770
|
-
c(
|
|
4770
|
+
c(C, {
|
|
4771
4771
|
onSuccess: () => {
|
|
4772
4772
|
u();
|
|
4773
4773
|
},
|
|
@@ -4779,13 +4779,13 @@ function ri(t, a, n, r) {
|
|
|
4779
4779
|
} else if (v) {
|
|
4780
4780
|
const f = (g = (h = o == null ? void 0 : o.shares) == null ? void 0 : h.tenantWide) == null ? void 0 : g[0];
|
|
4781
4781
|
if (f) {
|
|
4782
|
-
const
|
|
4782
|
+
const C = Xt(l, i, [
|
|
4783
4783
|
{
|
|
4784
4784
|
scope: "all_tenant_users",
|
|
4785
4785
|
role: f.role
|
|
4786
4786
|
}
|
|
4787
4787
|
]);
|
|
4788
|
-
c(
|
|
4788
|
+
c(C, {
|
|
4789
4789
|
onSuccess: () => {
|
|
4790
4790
|
u();
|
|
4791
4791
|
},
|
|
@@ -4797,13 +4797,13 @@ function ri(t, a, n, r) {
|
|
|
4797
4797
|
} else {
|
|
4798
4798
|
const f = (y = (x = o == null ? void 0 : o.shares) == null ? void 0 : x.orgUsersOnly) == null ? void 0 : y[0];
|
|
4799
4799
|
if (f) {
|
|
4800
|
-
const
|
|
4800
|
+
const C = Xt(l, i, [
|
|
4801
4801
|
{
|
|
4802
4802
|
scope: "org_users_only",
|
|
4803
4803
|
role: f.role
|
|
4804
4804
|
}
|
|
4805
4805
|
]);
|
|
4806
|
-
c(
|
|
4806
|
+
c(C, {
|
|
4807
4807
|
onSuccess: () => {
|
|
4808
4808
|
u();
|
|
4809
4809
|
},
|
|
@@ -5069,6 +5069,8 @@ function Xu() {
|
|
|
5069
5069
|
// type: isShowingVisual ? card.type : 'table', /// CHECK THIS!!!!
|
|
5070
5070
|
sql: x,
|
|
5071
5071
|
customCfg: d ? n.customCfg : null,
|
|
5072
|
+
preferences: n.preferences,
|
|
5073
|
+
// Preserve all preferences including column sizing
|
|
5072
5074
|
...y && {
|
|
5073
5075
|
customCardPreferences: {
|
|
5074
5076
|
...n.customCardPreferences,
|
|
@@ -5076,7 +5078,7 @@ function Xu() {
|
|
|
5076
5078
|
}
|
|
5077
5079
|
}
|
|
5078
5080
|
}, v = a.cards.map(
|
|
5079
|
-
(
|
|
5081
|
+
(C) => C.id === n.id ? p : C
|
|
5080
5082
|
);
|
|
5081
5083
|
return {
|
|
5082
5084
|
...a,
|
|
@@ -5147,11 +5149,11 @@ function sr() {
|
|
|
5147
5149
|
(t == null ? void 0 : t.accessToken) || "",
|
|
5148
5150
|
p.id,
|
|
5149
5151
|
a
|
|
5150
|
-
),
|
|
5151
|
-
if (!
|
|
5152
|
+
), C = v.frameObject;
|
|
5153
|
+
if (!C)
|
|
5152
5154
|
return { success: !1, error: "Visual has no frame data" };
|
|
5153
5155
|
const T = {
|
|
5154
|
-
...
|
|
5156
|
+
...C,
|
|
5155
5157
|
id: Nt()
|
|
5156
5158
|
};
|
|
5157
5159
|
return d(h, T, "end"), c(!0), u(T.id), m(!1), { success: !0, fromCache: f };
|
|
@@ -5184,7 +5186,7 @@ function sr() {
|
|
|
5184
5186
|
function Zu() {
|
|
5185
5187
|
const [t, a] = j(""), [n, r] = j(!1), [l, i] = j(""), [c, o] = j(""), [u, d] = j(!1), [m, h] = j(
|
|
5186
5188
|
null
|
|
5187
|
-
), [g, x] = j(!1), [y, p] = j(null), [v, f] = j(null), { setIsDashboardEditing:
|
|
5189
|
+
), [g, x] = j(!1), [y, p] = j(null), [v, f] = j(null), { setIsDashboardEditing: C, setIsVisualEditing: T } = wt(), { handleEditLibraryVisual: F, handleAddLibraryVisual: b } = sr(), {
|
|
5188
5190
|
resources: k,
|
|
5189
5191
|
isLoading: N,
|
|
5190
5192
|
isError: D,
|
|
@@ -5258,7 +5260,7 @@ function Zu() {
|
|
|
5258
5260
|
}, q = (ee) => {
|
|
5259
5261
|
F(ee);
|
|
5260
5262
|
}, de = (ee) => {
|
|
5261
|
-
|
|
5263
|
+
b(ee);
|
|
5262
5264
|
}, Ee = (ee) => {
|
|
5263
5265
|
const ke = k.find((Ue) => Ue.id === ee);
|
|
5264
5266
|
ke && I({
|
|
@@ -5455,13 +5457,13 @@ function em({
|
|
|
5455
5457
|
onDashboardItemClick: h
|
|
5456
5458
|
}) {
|
|
5457
5459
|
var N, D, w;
|
|
5458
|
-
const { selectDashboard: g } = ks(), x = to(t.id), { isConsoleMode: y } = Pn(), [p, v] = j(!1), [f,
|
|
5460
|
+
const { selectDashboard: g } = ks(), x = to(t.id), { isConsoleMode: y } = Pn(), [p, v] = j(!1), [f, C] = j(!1), T = ae(
|
|
5459
5461
|
(I) => I.actions.setIsDashboardPanelOpen
|
|
5460
5462
|
);
|
|
5461
5463
|
Te(() => {
|
|
5462
|
-
n ? (v(!0),
|
|
5464
|
+
n ? (v(!0), C(!0)) : f && (v(!1), C(!1));
|
|
5463
5465
|
}, [n, f]);
|
|
5464
|
-
const F = () => t.ownership.isOwner ? t.ownership.status === "private" ? /* @__PURE__ */ e(tr, { className: "h-3 w-3 text-purple-500" }) : /* @__PURE__ */ e(Bt, { className: "h-3.5 w-3.5 text-blue-600" }) : /* @__PURE__ */ e(ia, { className: "h-3.5 w-3.5 text-slate-500" }),
|
|
5466
|
+
const F = () => t.ownership.isOwner ? t.ownership.status === "private" ? /* @__PURE__ */ e(tr, { className: "h-3 w-3 text-purple-500" }) : /* @__PURE__ */ e(Bt, { className: "h-3.5 w-3.5 text-blue-600" }) : /* @__PURE__ */ e(ia, { className: "h-3.5 w-3.5 text-slate-500" }), b = () => /* @__PURE__ */ e(ao, { className: "h-4 w-4 text-slate-400" }), k = () => {
|
|
5465
5467
|
g(t), i(t.id), h == null || h(t.id);
|
|
5466
5468
|
};
|
|
5467
5469
|
return /* @__PURE__ */ s(
|
|
@@ -5476,7 +5478,7 @@ function em({
|
|
|
5476
5478
|
tabIndex: 0,
|
|
5477
5479
|
onClick: k,
|
|
5478
5480
|
children: [
|
|
5479
|
-
/* @__PURE__ */ e("div", { className: "flex-shrink-0", children: /* @__PURE__ */ e("div", { className: "flex h-8 w-8 items-center justify-center rounded-md bg-slate-100 dark:bg-slate-800", children:
|
|
5481
|
+
/* @__PURE__ */ e("div", { className: "flex-shrink-0", children: /* @__PURE__ */ e("div", { className: "flex h-8 w-8 items-center justify-center rounded-md bg-slate-100 dark:bg-slate-800", children: b() }) }),
|
|
5480
5482
|
/* @__PURE__ */ s("div", { className: "flex w-full items-start justify-between", children: [
|
|
5481
5483
|
/* @__PURE__ */ s("div", { className: "flex-1", children: [
|
|
5482
5484
|
/* @__PURE__ */ s("div", { className: "flex items-center gap-2", children: [
|
|
@@ -5607,14 +5609,14 @@ function tm({ onRetry: t }) {
|
|
|
5607
5609
|
function am(t) {
|
|
5608
5610
|
const [a, n] = j(""), [r, l] = j(!1), [i, c] = j(""), [o, u] = j(""), [d, m] = j(!1), [h, g] = j(
|
|
5609
5611
|
null
|
|
5610
|
-
), [x, y] = j(!1), [p, v] = j(null), [f,
|
|
5612
|
+
), [x, y] = j(!1), [p, v] = j(null), [f, C] = j(null), T = Aa(
|
|
5611
5613
|
(Z) => Z.lastSelectedDashboard
|
|
5612
5614
|
), F = Aa(
|
|
5613
5615
|
(Z) => Z.actions.selectDashboard
|
|
5614
5616
|
);
|
|
5615
5617
|
ha(), Dt(), $a(), Mt();
|
|
5616
5618
|
const {
|
|
5617
|
-
resources:
|
|
5619
|
+
resources: b,
|
|
5618
5620
|
isLoading: k,
|
|
5619
5621
|
isError: N,
|
|
5620
5622
|
createResource: D,
|
|
@@ -5639,7 +5641,7 @@ function am(t) {
|
|
|
5639
5641
|
(h == null ? void 0 : h.id) || null,
|
|
5640
5642
|
R,
|
|
5641
5643
|
L
|
|
5642
|
-
), { currentUser: le } = qt(), ie =
|
|
5644
|
+
), { currentUser: le } = qt(), ie = b.filter(
|
|
5643
5645
|
(Z) => {
|
|
5644
5646
|
var ee, ke;
|
|
5645
5647
|
return ((ee = Z == null ? void 0 : Z.title) == null ? void 0 : ee.toLowerCase().includes(a.toLowerCase())) || ((ke = Z == null ? void 0 : Z.description) == null ? void 0 : ke.toLowerCase().includes(a.toLowerCase()));
|
|
@@ -5662,8 +5664,8 @@ function am(t) {
|
|
|
5662
5664
|
}, oe = () => {
|
|
5663
5665
|
p && I(p.id);
|
|
5664
5666
|
}, W = (Z) => {
|
|
5665
|
-
|
|
5666
|
-
onSettled: () =>
|
|
5667
|
+
C(Z), S(Z, {
|
|
5668
|
+
onSettled: () => C(null)
|
|
5667
5669
|
});
|
|
5668
5670
|
}, {
|
|
5669
5671
|
startUpdating: _,
|
|
@@ -5686,7 +5688,7 @@ function am(t) {
|
|
|
5686
5688
|
}
|
|
5687
5689
|
);
|
|
5688
5690
|
}, de = (Z) => {
|
|
5689
|
-
const ee =
|
|
5691
|
+
const ee = b.find(
|
|
5690
5692
|
(ke) => ke.id === Z
|
|
5691
5693
|
);
|
|
5692
5694
|
ee && w({
|
|
@@ -5971,9 +5973,9 @@ function sm() {
|
|
|
5971
5973
|
(_) => _.selectedDashboard
|
|
5972
5974
|
), f = Aa(
|
|
5973
5975
|
(_) => _.initialDashboard
|
|
5974
|
-
),
|
|
5976
|
+
), C = v ? (W = v == null ? void 0 : v.permissions) == null ? void 0 : W.canEdit : (oe = f == null ? void 0 : f.permissions) == null ? void 0 : oe.canEdit, T = ae((_) => _.showFilters), F = ae(
|
|
5975
5977
|
(_) => _.showDashboardJSON
|
|
5976
|
-
),
|
|
5978
|
+
), b = ae((_) => _.onSaveFunction), k = ae(
|
|
5977
5979
|
(_) => _.actions.setShowFilters
|
|
5978
5980
|
), { addFrame: N, setSelectedFrameId: D } = ae(
|
|
5979
5981
|
(_) => _.actions
|
|
@@ -5989,7 +5991,7 @@ function sm() {
|
|
|
5989
5991
|
}
|
|
5990
5992
|
}
|
|
5991
5993
|
}, [A, c == null ? void 0 : c.id, M]);
|
|
5992
|
-
const O = a.orgUserId || a.tenantId, P = o && !p && O &&
|
|
5994
|
+
const O = a.orgUserId || a.tenantId, P = o && !p && O && C;
|
|
5993
5995
|
function R() {
|
|
5994
5996
|
var q, de;
|
|
5995
5997
|
const _ = u.dataSource;
|
|
@@ -6065,7 +6067,7 @@ function sm() {
|
|
|
6065
6067
|
template: te,
|
|
6066
6068
|
filterValues: y
|
|
6067
6069
|
};
|
|
6068
|
-
await vs(ge, t == null ? void 0 : t.accessToken), be.success("Lens saved"),
|
|
6070
|
+
await vs(ge, t == null ? void 0 : t.accessToken), be.success("Lens saved"), b == null || b(_), h(!1);
|
|
6069
6071
|
}
|
|
6070
6072
|
if (p) return null;
|
|
6071
6073
|
const J = (i == null ? void 0 : i.name) || c.title, Y = a.orgUserId || a.tenantId && a.endUserId && a.endUserEmail;
|
|
@@ -6221,10 +6223,10 @@ function rm({
|
|
|
6221
6223
|
m.current && y(m.current.offsetWidth);
|
|
6222
6224
|
}, []);
|
|
6223
6225
|
function v() {
|
|
6224
|
-
var
|
|
6225
|
-
return l ? "Loading..." : i ? "Error" : n ? (
|
|
6226
|
+
var C;
|
|
6227
|
+
return l ? "Loading..." : i ? "Error" : n ? (C = a == null ? void 0 : a.find((T) => T.id === n)) == null ? void 0 : C.name : `Select ${t}`;
|
|
6226
6228
|
}
|
|
6227
|
-
function f(
|
|
6229
|
+
function f(C, T) {
|
|
6228
6230
|
r(T), g(!1);
|
|
6229
6231
|
}
|
|
6230
6232
|
return /* @__PURE__ */ s(ht, { open: h, onOpenChange: g, children: [
|
|
@@ -6269,26 +6271,26 @@ function rm({
|
|
|
6269
6271
|
t == null ? void 0 : t.toLowerCase(),
|
|
6270
6272
|
" found."
|
|
6271
6273
|
] }),
|
|
6272
|
-
/* @__PURE__ */ e(fa, { children: p == null ? void 0 : p.map((
|
|
6274
|
+
/* @__PURE__ */ e(fa, { children: p == null ? void 0 : p.map((C) => /* @__PURE__ */ e(
|
|
6273
6275
|
qa,
|
|
6274
6276
|
{
|
|
6275
6277
|
className: "overflow-x-auto",
|
|
6276
|
-
value:
|
|
6277
|
-
onSelect: (T) => f(T,
|
|
6278
|
+
value: C.name,
|
|
6279
|
+
onSelect: (T) => f(T, C.id),
|
|
6278
6280
|
children: /* @__PURE__ */ s("div", { className: "flex items-center gap-2", children: [
|
|
6279
6281
|
/* @__PURE__ */ e(
|
|
6280
6282
|
ma,
|
|
6281
6283
|
{
|
|
6282
6284
|
className: K(
|
|
6283
6285
|
"size-4",
|
|
6284
|
-
n ===
|
|
6286
|
+
n === C.id ? "opacity-100" : "opacity-0"
|
|
6285
6287
|
)
|
|
6286
6288
|
}
|
|
6287
6289
|
),
|
|
6288
|
-
/* @__PURE__ */ e("div", { title:
|
|
6290
|
+
/* @__PURE__ */ e("div", { title: C.name, children: C.name })
|
|
6289
6291
|
] })
|
|
6290
6292
|
},
|
|
6291
|
-
|
|
6293
|
+
C.id
|
|
6292
6294
|
)) })
|
|
6293
6295
|
] })
|
|
6294
6296
|
] })
|
|
@@ -6391,15 +6393,15 @@ function lm({ column: t }) {
|
|
|
6391
6393
|
), o = E((p) => p.sqlGen), { modelItems: u, connectionType: d } = Tt(), m = E((p) => p.actions.setSqlGen), h = E((p) => p.actions.setCardSql), g = E((p) => p.actions.setRunSql);
|
|
6392
6394
|
function x(p, v) {
|
|
6393
6395
|
var F;
|
|
6394
|
-
const f = yl(p, o, v),
|
|
6395
|
-
(
|
|
6396
|
+
const f = yl(p, o, v), C = (F = u == null ? void 0 : u.find(
|
|
6397
|
+
(b) => b.id === c
|
|
6396
6398
|
)) == null ? void 0 : F.name;
|
|
6397
6399
|
m(f);
|
|
6398
6400
|
const T = vl(
|
|
6399
6401
|
f,
|
|
6400
6402
|
vt(l || ""),
|
|
6401
6403
|
vt(r),
|
|
6402
|
-
|
|
6404
|
+
C || "",
|
|
6403
6405
|
d,
|
|
6404
6406
|
i || ""
|
|
6405
6407
|
);
|
|
@@ -6621,7 +6623,7 @@ function dm() {
|
|
|
6621
6623
|
setFilterColumns: y,
|
|
6622
6624
|
setOrderByColumns: p,
|
|
6623
6625
|
setPivotByColumns: v
|
|
6624
|
-
} = re(), { columns: f } = bl(), { formattedTableName:
|
|
6626
|
+
} = re(), { columns: f } = bl(), { formattedTableName: C } = Tt(), T = Xa(
|
|
6625
6627
|
Jt(co, {
|
|
6626
6628
|
activationConstraint: {
|
|
6627
6629
|
distance: 1
|
|
@@ -6709,7 +6711,7 @@ function dm() {
|
|
|
6709
6711
|
} else
|
|
6710
6712
|
u(a), d(n), m(r), h(i);
|
|
6711
6713
|
};
|
|
6712
|
-
function
|
|
6714
|
+
function b(A) {
|
|
6713
6715
|
o(A.active.id), c(null), u(a), d(n), m(r), h(i);
|
|
6714
6716
|
}
|
|
6715
6717
|
function k(A) {
|
|
@@ -6783,7 +6785,7 @@ function dm() {
|
|
|
6783
6785
|
type: A.data_type,
|
|
6784
6786
|
sql: cs(
|
|
6785
6787
|
A.data_type,
|
|
6786
|
-
|
|
6788
|
+
C,
|
|
6787
6789
|
vt(A.column_name)
|
|
6788
6790
|
),
|
|
6789
6791
|
role: "filter"
|
|
@@ -6853,7 +6855,7 @@ function dm() {
|
|
|
6853
6855
|
return {
|
|
6854
6856
|
handleDragOver: F,
|
|
6855
6857
|
handleDragEnd: S,
|
|
6856
|
-
handleDragStart:
|
|
6858
|
+
handleDragStart: b,
|
|
6857
6859
|
handleDragCancel: M,
|
|
6858
6860
|
sensors: T
|
|
6859
6861
|
};
|
|
@@ -6940,10 +6942,10 @@ function mm({
|
|
|
6940
6942
|
addColumnToMetricColumns: p,
|
|
6941
6943
|
addColumnToGroupBy: v,
|
|
6942
6944
|
setCardSql: f,
|
|
6943
|
-
setRunSql:
|
|
6945
|
+
setRunSql: C,
|
|
6944
6946
|
setSqlGen: T,
|
|
6945
6947
|
setIsShowingVisual: F
|
|
6946
|
-
} = re(), { connectionType:
|
|
6948
|
+
} = re(), { connectionType: b, modelItems: k, selectedDatamodelName: N } = Tt();
|
|
6947
6949
|
function D(L) {
|
|
6948
6950
|
var $;
|
|
6949
6951
|
if (d) {
|
|
@@ -6956,10 +6958,10 @@ function mm({
|
|
|
6956
6958
|
vt(t),
|
|
6957
6959
|
vt(a),
|
|
6958
6960
|
le || "",
|
|
6959
|
-
|
|
6961
|
+
b,
|
|
6960
6962
|
h || ""
|
|
6961
6963
|
);
|
|
6962
|
-
ie && (f(ie),
|
|
6964
|
+
ie && (f(ie), C(!0));
|
|
6963
6965
|
}
|
|
6964
6966
|
if (!d) {
|
|
6965
6967
|
if (It(L.data_type))
|
|
@@ -7015,22 +7017,22 @@ function mm({
|
|
|
7015
7017
|
schemaName: t,
|
|
7016
7018
|
tableName: a,
|
|
7017
7019
|
modelName: N,
|
|
7018
|
-
connectionType:
|
|
7020
|
+
connectionType: b,
|
|
7019
7021
|
databaseName: h || ""
|
|
7020
7022
|
});
|
|
7021
7023
|
F(!1);
|
|
7022
|
-
const $ =
|
|
7023
|
-
f($),
|
|
7024
|
+
const $ = b === "MSSQL" ? `SELECT top 10 * FROM ${L}` : `SELECT * FROM ${L} LIMIT 10`;
|
|
7025
|
+
f($), C(!0);
|
|
7024
7026
|
}
|
|
7025
7027
|
function I() {
|
|
7026
7028
|
const L = Cr({
|
|
7027
7029
|
schemaName: t,
|
|
7028
7030
|
tableName: a,
|
|
7029
7031
|
modelName: N,
|
|
7030
|
-
connectionType:
|
|
7032
|
+
connectionType: b,
|
|
7031
7033
|
databaseName: h || ""
|
|
7032
7034
|
});
|
|
7033
|
-
f(`SELECT COUNT(*) as count FROM ${L}`),
|
|
7035
|
+
f(`SELECT COUNT(*) as count FROM ${L}`), C(!0);
|
|
7034
7036
|
}
|
|
7035
7037
|
const S = (n == null ? void 0 : n.filter(
|
|
7036
7038
|
(L) => L.column_name.toLowerCase().includes(l.toLowerCase())
|
|
@@ -7180,10 +7182,10 @@ function ii({
|
|
|
7180
7182
|
connectionItems: p,
|
|
7181
7183
|
modelItems: v,
|
|
7182
7184
|
schemaItems: f,
|
|
7183
|
-
databaseItems:
|
|
7185
|
+
databaseItems: C,
|
|
7184
7186
|
tableItems: T,
|
|
7185
7187
|
columns: F,
|
|
7186
|
-
isConnectionsLoading:
|
|
7188
|
+
isConnectionsLoading: b,
|
|
7187
7189
|
isModelsLoading: k,
|
|
7188
7190
|
isConnectionsError: N,
|
|
7189
7191
|
isModelsError: D,
|
|
@@ -7241,7 +7243,7 @@ function ii({
|
|
|
7241
7243
|
onChange: Y,
|
|
7242
7244
|
isError: I,
|
|
7243
7245
|
isLoading: w,
|
|
7244
|
-
items:
|
|
7246
|
+
items: C,
|
|
7245
7247
|
value: u || "",
|
|
7246
7248
|
title: "Database",
|
|
7247
7249
|
type: "combobox"
|
|
@@ -7348,7 +7350,7 @@ function ii({
|
|
|
7348
7350
|
title: "Connection",
|
|
7349
7351
|
value: i || "",
|
|
7350
7352
|
onChange: J,
|
|
7351
|
-
isLoading:
|
|
7353
|
+
isLoading: b,
|
|
7352
7354
|
isError: N,
|
|
7353
7355
|
type: "combobox",
|
|
7354
7356
|
connectionTooltip: ((fe = p == null ? void 0 : p.find(
|
|
@@ -7564,8 +7566,8 @@ function ui(t) {
|
|
|
7564
7566
|
}, [c, o, l]);
|
|
7565
7567
|
function y(p, v) {
|
|
7566
7568
|
if (m.current = p, !h.current[l.id]) {
|
|
7567
|
-
const f = p.getModel(),
|
|
7568
|
-
h.current[l.id] = f || (v == null ? void 0 : v.editor.createModel(
|
|
7569
|
+
const f = p.getModel(), C = x();
|
|
7570
|
+
h.current[l.id] = f || (v == null ? void 0 : v.editor.createModel(C, t)) || p.getModel();
|
|
7569
7571
|
}
|
|
7570
7572
|
p.setModel(h.current[l.id]);
|
|
7571
7573
|
}
|
|
@@ -7822,11 +7824,11 @@ function ym() {
|
|
|
7822
7824
|
setCardPreferences: p,
|
|
7823
7825
|
setCardType: v,
|
|
7824
7826
|
setCardPython: f,
|
|
7825
|
-
runAssistant:
|
|
7827
|
+
runAssistant: C,
|
|
7826
7828
|
setShowAIDialog: T
|
|
7827
7829
|
} = re();
|
|
7828
7830
|
E((U) => U.onSave), E((U) => U.onClose), E((U) => U.actions.setSqlGen);
|
|
7829
|
-
const F = E((U) => U.runSql),
|
|
7831
|
+
const F = E((U) => U.runSql), b = E((U) => U.actions.setRunSql), k = E(
|
|
7830
7832
|
(U) => U.actions.setIsSqlRunning
|
|
7831
7833
|
), {
|
|
7832
7834
|
data: N,
|
|
@@ -7861,8 +7863,8 @@ function ym() {
|
|
|
7861
7863
|
// setQueryError,
|
|
7862
7864
|
z
|
|
7863
7865
|
]), Te(() => {
|
|
7864
|
-
F && (t.getQueryData(M) || A(),
|
|
7865
|
-
}, [F, A,
|
|
7866
|
+
F && (t.getQueryData(M) || A(), b(!1));
|
|
7867
|
+
}, [F, A, b, M, t]);
|
|
7866
7868
|
async function P() {
|
|
7867
7869
|
const U = `Can you help me debug this query in the current table scope?
|
|
7868
7870
|
|
|
@@ -7877,7 +7879,7 @@ function ym() {
|
|
|
7877
7879
|
${u ? `Python:
|
|
7878
7880
|
${u}` : ""}
|
|
7879
7881
|
`;
|
|
7880
|
-
|
|
7882
|
+
C(U);
|
|
7881
7883
|
}
|
|
7882
7884
|
function R() {
|
|
7883
7885
|
return /* @__PURE__ */ s(se, { children: [
|
|
@@ -8043,14 +8045,14 @@ ${u}` : ""}
|
|
|
8043
8045
|
);
|
|
8044
8046
|
}
|
|
8045
8047
|
function vm({ card: t }) {
|
|
8046
|
-
var
|
|
8048
|
+
var C, T, F, b, k, N, D, w, I, S, z;
|
|
8047
8049
|
const [a, n] = j(!1), [r, l] = j(
|
|
8048
8050
|
[]
|
|
8049
8051
|
), { authToken: i } = Oe(), c = vo(i == null ? void 0 : i.accessToken), o = ae((M) => M.themeStyle), u = {
|
|
8050
|
-
colors: ((T = (
|
|
8052
|
+
colors: ((T = (C = o == null ? void 0 : o.chart) == null ? void 0 : C.dataset) == null ? void 0 : T.backgroundColor) || []
|
|
8051
8053
|
};
|
|
8052
8054
|
(F = t.customCardPreferences) != null && F.inputData;
|
|
8053
|
-
const { getCard: d } = Vs(((
|
|
8055
|
+
const { getCard: d } = Vs(((b = t.customCardPreferences) == null ? void 0 : b.url) || ""), m = ((k = t.customCardPreferences) == null ? void 0 : k.visualType) || "single", h = E((M) => M.frame), { setCustomCardPreferences: g } = re(), { data: x } = Ve(t), y = Ne((M, A) => {
|
|
8054
8056
|
l((O) => ({
|
|
8055
8057
|
...O,
|
|
8056
8058
|
[M]: A
|
|
@@ -8134,7 +8136,7 @@ function mi({
|
|
|
8134
8136
|
...a
|
|
8135
8137
|
}) {
|
|
8136
8138
|
var D;
|
|
8137
|
-
const n = E((w) => w.card), r = js(n), l = ((D = n.customCardPreferences) == null ? void 0 : D.showCardHeader) ?? !0, i = E((w) => w.frame), c = ae((w) => w.dashboard.filters), o = E((w) => w.actions.setRunSql), { updateFilter: u } = wt(), d = c == null ? void 0 : c.find((w) => w.id === i.filterId), { data: m, isLoading: h, isFetching: g, errorMessage: x, pagination: y } = Ve(n), { setCard: p, updateCardInFrame: v } = re(), { data: f } = Bs(n),
|
|
8139
|
+
const n = E((w) => w.card), r = js(n), l = ((D = n.customCardPreferences) == null ? void 0 : D.showCardHeader) ?? !0, i = E((w) => w.frame), c = ae((w) => w.dashboard.filters), o = E((w) => w.actions.setRunSql), { updateFilter: u } = wt(), d = c == null ? void 0 : c.find((w) => w.id === i.filterId), { data: m, isLoading: h, isFetching: g, errorMessage: x, pagination: y } = Ve(n), { setCard: p, updateCardInFrame: v } = re(), { data: f } = Bs(n), C = Ke(() => {
|
|
8138
8140
|
var w;
|
|
8139
8141
|
return n.type !== "pivotTable" || !((w = m == null ? void 0 : m.records) != null && w.length) ? null : {
|
|
8140
8142
|
records: m.records,
|
|
@@ -8150,7 +8152,7 @@ function mi({
|
|
|
8150
8152
|
m == null ? void 0 : m.subtotalColumns,
|
|
8151
8153
|
m == null ? void 0 : m.pivotSchema,
|
|
8152
8154
|
m == null ? void 0 : m.groupByColumns
|
|
8153
|
-
]), T = bo(n,
|
|
8155
|
+
]), T = bo(n, C), F = (w, I) => {
|
|
8154
8156
|
var z, M;
|
|
8155
8157
|
const S = {
|
|
8156
8158
|
...n,
|
|
@@ -8161,7 +8163,7 @@ function mi({
|
|
|
8161
8163
|
}
|
|
8162
8164
|
};
|
|
8163
8165
|
p(S), v(S), n.sql && ((M = (z = n.preferences) == null ? void 0 : z.tablePrefs) != null && M.enableDevModePagination) && o(!0);
|
|
8164
|
-
},
|
|
8166
|
+
}, b = Ke(() => !n.id || !(m != null && m.records) ? null : wl({
|
|
8165
8167
|
card: n,
|
|
8166
8168
|
data: m == null ? void 0 : m.records,
|
|
8167
8169
|
cardType: n.type,
|
|
@@ -8198,11 +8200,11 @@ function mi({
|
|
|
8198
8200
|
return k(n);
|
|
8199
8201
|
if (!["table", "pivotTable", "aggregateTable", "custom"].includes(
|
|
8200
8202
|
n.type
|
|
8201
|
-
) &&
|
|
8203
|
+
) && b)
|
|
8202
8204
|
return /* @__PURE__ */ e("div", { className: "relative h-full min-h-0 w-full flex-1 grow basis-0", children: h || g ? /* @__PURE__ */ e(se, {}) : /* @__PURE__ */ e(
|
|
8203
8205
|
So,
|
|
8204
8206
|
{
|
|
8205
|
-
cfg:
|
|
8207
|
+
cfg: b
|
|
8206
8208
|
}
|
|
8207
8209
|
) });
|
|
8208
8210
|
if (n.type === "table")
|
|
@@ -8425,14 +8427,14 @@ const ss = ({
|
|
|
8425
8427
|
/* @__PURE__ */ e(V, { onClick: l, variant: "outline", children: "Close" })
|
|
8426
8428
|
] });
|
|
8427
8429
|
function wm() {
|
|
8428
|
-
const [t, a] = j(!1), [n, r] = j(""), [l, i] = j(""), [c, o] = j(""), [u, d] = j(""), m = E((
|
|
8430
|
+
const [t, a] = j(!1), [n, r] = j(""), [l, i] = j(""), [c, o] = j(""), [u, d] = j(""), m = E((b) => b.card), h = E((b) => b.card.customCfg), g = h ? JSON.stringify(h, null, 2) : "", { data: x } = Ve(m), { data: y } = Bs(m), { setCardCustomCfg: p, setCustomVisualCode: v } = re(), f = (b) => {
|
|
8429
8431
|
var k, N;
|
|
8430
8432
|
return JSON.stringify(
|
|
8431
8433
|
{
|
|
8432
|
-
...
|
|
8434
|
+
...b,
|
|
8433
8435
|
data: {
|
|
8434
|
-
...
|
|
8435
|
-
datasets: (N = (k =
|
|
8436
|
+
...b.data,
|
|
8437
|
+
datasets: (N = (k = b.data) == null ? void 0 : k.datasets) == null ? void 0 : N.map((D) => ({
|
|
8436
8438
|
...D,
|
|
8437
8439
|
data: []
|
|
8438
8440
|
}))
|
|
@@ -8441,10 +8443,10 @@ function wm() {
|
|
|
8441
8443
|
null,
|
|
8442
8444
|
2
|
|
8443
8445
|
);
|
|
8444
|
-
},
|
|
8446
|
+
}, C = () => {
|
|
8445
8447
|
var k, N;
|
|
8446
8448
|
if (!((k = x == null ? void 0 : x.records) != null && k.length)) return;
|
|
8447
|
-
const
|
|
8449
|
+
const b = wl({
|
|
8448
8450
|
card: m,
|
|
8449
8451
|
data: x.records,
|
|
8450
8452
|
cardType: m.type,
|
|
@@ -8453,19 +8455,19 @@ function wm() {
|
|
|
8453
8455
|
preferences: m.preferences,
|
|
8454
8456
|
topoJson: y
|
|
8455
8457
|
});
|
|
8456
|
-
if (
|
|
8457
|
-
r(f(
|
|
8458
|
-
const D = To(
|
|
8458
|
+
if (b) {
|
|
8459
|
+
r(f(b)), o(((N = m.preferences) == null ? void 0 : N.customVisualCode) || "");
|
|
8460
|
+
const D = To(b, h);
|
|
8459
8461
|
i(f(D));
|
|
8460
8462
|
}
|
|
8461
8463
|
}, T = () => {
|
|
8462
8464
|
try {
|
|
8463
8465
|
if (c && v(c), l) {
|
|
8464
|
-
const
|
|
8466
|
+
const b = JSON.parse(
|
|
8465
8467
|
l
|
|
8466
8468
|
), k = Eo(
|
|
8467
8469
|
JSON.parse(n),
|
|
8468
|
-
|
|
8470
|
+
b
|
|
8469
8471
|
);
|
|
8470
8472
|
p(k), d("");
|
|
8471
8473
|
}
|
|
@@ -8478,7 +8480,7 @@ function wm() {
|
|
|
8478
8480
|
ve,
|
|
8479
8481
|
{
|
|
8480
8482
|
tooltip: "Customize Visual",
|
|
8481
|
-
onClick:
|
|
8483
|
+
onClick: C,
|
|
8482
8484
|
className: F ? "" : "text-green-600 hover:text-green-700",
|
|
8483
8485
|
children: /* @__PURE__ */ e(qs, { className: "h-4 w-4" })
|
|
8484
8486
|
}
|
|
@@ -8493,8 +8495,8 @@ function wm() {
|
|
|
8493
8495
|
customCode: c,
|
|
8494
8496
|
cardCustomCfgString: g,
|
|
8495
8497
|
mergedConfig: l,
|
|
8496
|
-
onConfigChange: (
|
|
8497
|
-
onCodeChange: (
|
|
8498
|
+
onConfigChange: (b) => i(b ?? ""),
|
|
8499
|
+
onCodeChange: (b) => o(b ?? "")
|
|
8498
8500
|
}
|
|
8499
8501
|
)
|
|
8500
8502
|
] }),
|
|
@@ -8984,11 +8986,11 @@ function Tm() {
|
|
|
8984
8986
|
}, u = (y, p) => {
|
|
8985
8987
|
const v = y.dataTransfer.getData("tabIndex");
|
|
8986
8988
|
if (v === p.toString()) return;
|
|
8987
|
-
const f = Array.from(t.cards), [
|
|
8988
|
-
f.splice(p, 0,
|
|
8989
|
+
const f = Array.from(t.cards), [C] = f.splice(parseInt(v), 1);
|
|
8990
|
+
f.splice(p, 0, C), n({ ...t, cards: f });
|
|
8989
8991
|
};
|
|
8990
8992
|
function d(y) {
|
|
8991
|
-
const p = t.cards.filter((
|
|
8993
|
+
const p = t.cards.filter((C) => C.id !== y), v = p[0], f = {
|
|
8992
8994
|
...t,
|
|
8993
8995
|
cards: p,
|
|
8994
8996
|
// update the active card to the first card in the frame
|
|
@@ -9128,11 +9130,11 @@ function yi() {
|
|
|
9128
9130
|
function x(p) {
|
|
9129
9131
|
const v = {
|
|
9130
9132
|
...t,
|
|
9131
|
-
cards: t.cards.map((
|
|
9133
|
+
cards: t.cards.map((C) => C.id === a.id ? a : C),
|
|
9132
9134
|
activeCardId: p
|
|
9133
9135
|
};
|
|
9134
9136
|
l(v);
|
|
9135
|
-
const f = v.cards.find((
|
|
9137
|
+
const f = v.cards.find((C) => C.id === p);
|
|
9136
9138
|
f.sql && u(!0), c(f);
|
|
9137
9139
|
}
|
|
9138
9140
|
function y() {
|
|
@@ -9168,7 +9170,7 @@ function yi() {
|
|
|
9168
9170
|
function Sn({
|
|
9169
9171
|
children: t
|
|
9170
9172
|
}) {
|
|
9171
|
-
var F,
|
|
9173
|
+
var F, b;
|
|
9172
9174
|
E((k) => k.frame);
|
|
9173
9175
|
const a = E((k) => k.card), n = E((k) => k.isDevMode), r = E((k) => k.isShowingVisual), l = ae((k) => k.isVisualEditing), i = E((k) => k.pythonStdOut);
|
|
9174
9176
|
E((k) => k.actions.setRunSql);
|
|
@@ -9184,7 +9186,7 @@ function Sn({
|
|
|
9184
9186
|
const k = JSON.stringify(g == null ? void 0 : g.records, null, 2), N = new Blob([k], { type: "application/json" }), D = URL.createObjectURL(N), w = document.createElement("a");
|
|
9185
9187
|
w.href = D, w.download = `${a.title}.json`, w.click();
|
|
9186
9188
|
}
|
|
9187
|
-
function
|
|
9189
|
+
function C() {
|
|
9188
9190
|
const N = [
|
|
9189
9191
|
Object.keys(
|
|
9190
9192
|
g == null ? void 0 : g.records.reduce((S, z) => ({ ...S, ...z }), {})
|
|
@@ -9220,7 +9222,7 @@ function Sn({
|
|
|
9220
9222
|
className: "h-7 w-fit px-1 font-mono text-xs text-muted-foreground/70",
|
|
9221
9223
|
variant: "ghost",
|
|
9222
9224
|
size: "icon",
|
|
9223
|
-
onClick:
|
|
9225
|
+
onClick: C,
|
|
9224
9226
|
children: /* @__PURE__ */ e(Vo, { className: "size-4" })
|
|
9225
9227
|
}
|
|
9226
9228
|
),
|
|
@@ -9251,7 +9253,7 @@ function Sn({
|
|
|
9251
9253
|
st,
|
|
9252
9254
|
{
|
|
9253
9255
|
id: "pagination",
|
|
9254
|
-
checked: ((
|
|
9256
|
+
checked: ((b = (F = a.preferences) == null ? void 0 : F.tablePrefs) == null ? void 0 : b.enableDevModePagination) ?? !1,
|
|
9255
9257
|
onCheckedChange: (k) => {
|
|
9256
9258
|
var N;
|
|
9257
9259
|
h({
|
|
@@ -9354,12 +9356,12 @@ function Im() {
|
|
|
9354
9356
|
), d = (p = u == null ? void 0 : u.visuals) == null ? void 0 : p.find(
|
|
9355
9357
|
(f) => f.name === (t == null ? void 0 : t.componentName)
|
|
9356
9358
|
);
|
|
9357
|
-
function m(f,
|
|
9359
|
+
function m(f, C) {
|
|
9358
9360
|
if (!t) return;
|
|
9359
9361
|
const F = {
|
|
9360
9362
|
...(t == null ? void 0 : t.dataInputCardIds) || {},
|
|
9361
9363
|
[f]: {
|
|
9362
|
-
cardId:
|
|
9364
|
+
cardId: C,
|
|
9363
9365
|
hookRef: null
|
|
9364
9366
|
}
|
|
9365
9367
|
};
|
|
@@ -9370,27 +9372,27 @@ function Im() {
|
|
|
9370
9372
|
}
|
|
9371
9373
|
function h(f) {
|
|
9372
9374
|
var T, F;
|
|
9373
|
-
const
|
|
9375
|
+
const C = (T = l == null ? void 0 : l.cards) == null ? void 0 : T.filter((b) => {
|
|
9374
9376
|
var k;
|
|
9375
|
-
return ((k =
|
|
9376
|
-
}).map((
|
|
9377
|
-
value:
|
|
9378
|
-
label:
|
|
9377
|
+
return ((k = b == null ? void 0 : b.customCardPreferences) == null ? void 0 : k.visualType) !== "multiple";
|
|
9378
|
+
}).map((b) => ({
|
|
9379
|
+
value: b.id,
|
|
9380
|
+
label: b.tabTitle || b.title
|
|
9379
9381
|
}));
|
|
9380
|
-
return /* @__PURE__ */ e("div", { className: "space-y-2", children: (F = f == null ? void 0 : f.dataInputs) == null ? void 0 : F.map((
|
|
9382
|
+
return /* @__PURE__ */ e("div", { className: "space-y-2", children: (F = f == null ? void 0 : f.dataInputs) == null ? void 0 : F.map((b, k) => {
|
|
9381
9383
|
var N, D;
|
|
9382
9384
|
return /* @__PURE__ */ s(
|
|
9383
9385
|
"div",
|
|
9384
9386
|
{
|
|
9385
9387
|
className: "grid grid-cols-10 gap-2",
|
|
9386
9388
|
children: [
|
|
9387
|
-
/* @__PURE__ */ e("div", { className: "col-span-4 flex items-center", children:
|
|
9389
|
+
/* @__PURE__ */ e("div", { className: "col-span-4 flex items-center", children: b }),
|
|
9388
9390
|
/* @__PURE__ */ e(
|
|
9389
9391
|
ct,
|
|
9390
9392
|
{
|
|
9391
9393
|
className: "col-span-6 h-8 w-full justify-between",
|
|
9392
9394
|
label: "",
|
|
9393
|
-
options:
|
|
9395
|
+
options: C || [],
|
|
9394
9396
|
value: ((D = (N = t == null ? void 0 : t.dataInputCardIds) == null ? void 0 : N[k]) == null ? void 0 : D.cardId) || "",
|
|
9395
9397
|
onValueChange: (w) => m(k, w)
|
|
9396
9398
|
}
|
|
@@ -9401,43 +9403,43 @@ function Im() {
|
|
|
9401
9403
|
);
|
|
9402
9404
|
}) });
|
|
9403
9405
|
}
|
|
9404
|
-
function g(f,
|
|
9405
|
-
var
|
|
9406
|
+
function g(f, C, T = [], F = "") {
|
|
9407
|
+
var b, k;
|
|
9406
9408
|
return t ? f === "input" ? /* @__PURE__ */ e(
|
|
9407
9409
|
De,
|
|
9408
9410
|
{
|
|
9409
9411
|
className: `h-8 w-full ${ot}`,
|
|
9410
|
-
value: ((
|
|
9412
|
+
value: ((b = t == null ? void 0 : t.settings) == null ? void 0 : b[C]) || F,
|
|
9411
9413
|
onChange: (N) => {
|
|
9412
9414
|
c({
|
|
9413
9415
|
...t,
|
|
9414
9416
|
settings: {
|
|
9415
9417
|
...t == null ? void 0 : t.settings,
|
|
9416
|
-
[
|
|
9418
|
+
[C]: N.target.value
|
|
9417
9419
|
}
|
|
9418
9420
|
});
|
|
9419
9421
|
}
|
|
9420
9422
|
},
|
|
9421
|
-
|
|
9423
|
+
C
|
|
9422
9424
|
) : f === "select" ? /* @__PURE__ */ e(
|
|
9423
9425
|
ct,
|
|
9424
9426
|
{
|
|
9425
9427
|
className: "h-8 w-full",
|
|
9426
9428
|
label: "",
|
|
9427
9429
|
options: T,
|
|
9428
|
-
value: ((k = t == null ? void 0 : t.settings) == null ? void 0 : k[
|
|
9430
|
+
value: ((k = t == null ? void 0 : t.settings) == null ? void 0 : k[C]) || F,
|
|
9429
9431
|
onValueChange: (N) => {
|
|
9430
9432
|
c({
|
|
9431
9433
|
...t,
|
|
9432
|
-
settings: { ...t == null ? void 0 : t.settings, [
|
|
9434
|
+
settings: { ...t == null ? void 0 : t.settings, [C]: N }
|
|
9433
9435
|
});
|
|
9434
9436
|
}
|
|
9435
9437
|
}
|
|
9436
9438
|
) : null : null;
|
|
9437
9439
|
}
|
|
9438
9440
|
function x(f) {
|
|
9439
|
-
const
|
|
9440
|
-
return /* @__PURE__ */ e("div", { className: "space-y-3", children:
|
|
9441
|
+
const C = Object.entries((f == null ? void 0 : f.settings) || {});
|
|
9442
|
+
return /* @__PURE__ */ e("div", { className: "space-y-3", children: C.map(([T, F]) => /* @__PURE__ */ s("div", { className: "space-y-1", children: [
|
|
9441
9443
|
/* @__PURE__ */ e(B, { children: F.title }),
|
|
9442
9444
|
g(
|
|
9443
9445
|
F.ui,
|
|
@@ -9913,19 +9915,19 @@ function or() {
|
|
|
9913
9915
|
const t = E((x) => x.selectedConnectionId), a = E((x) => x.selectedDatamodelId), n = E((x) => x.selectedDatabaseName), r = E((x) => x.selectedSchemaName), l = E((x) => x.selectedTableName), i = ae((x) => x.dashboard.filters) || [], c = ae((x) => x.actions.addFilter), o = ae((x) => x.actions.removeFilter), { removeFilterValues: u } = wt(), { modelItems: d, tableName: m, connectionType: h } = Tt();
|
|
9914
9916
|
function g(x, y = "dashboard", p) {
|
|
9915
9917
|
var D;
|
|
9916
|
-
const v = vt(x.column_name), f = vt(n || ""),
|
|
9918
|
+
const v = vt(x.column_name), f = vt(n || ""), C = vt(r || ""), T = vt(m);
|
|
9917
9919
|
let F = Go({
|
|
9918
|
-
schemaName:
|
|
9920
|
+
schemaName: C,
|
|
9919
9921
|
tableName: T,
|
|
9920
9922
|
connectionType: h,
|
|
9921
9923
|
databaseName: f
|
|
9922
|
-
}),
|
|
9924
|
+
}), b = `${F}.${v}`;
|
|
9923
9925
|
const k = (D = d == null ? void 0 : d.find(
|
|
9924
9926
|
(w) => w.id === a
|
|
9925
9927
|
)) == null ? void 0 : D.name;
|
|
9926
|
-
a && a !== "none" && (
|
|
9928
|
+
a && a !== "none" && (b = `${Sr}.${k}.${v}`, F = `${Sr}.${k}`), p != null && p.qualifiedFieldName && (b = p.qualifiedFieldName), p != null && p.entityName && (F = p.entityName);
|
|
9927
9929
|
const N = i == null ? void 0 : i.find(
|
|
9928
|
-
(w) => w.column ===
|
|
9930
|
+
(w) => w.column === b && w.table === T && (w.database === f || w.database === n)
|
|
9929
9931
|
);
|
|
9930
9932
|
if (N)
|
|
9931
9933
|
u(N.id), o(N.id);
|
|
@@ -9935,7 +9937,7 @@ function or() {
|
|
|
9935
9937
|
location: y,
|
|
9936
9938
|
id: w,
|
|
9937
9939
|
//uuidv4(),
|
|
9938
|
-
column:
|
|
9940
|
+
column: b,
|
|
9939
9941
|
title: x.column_name,
|
|
9940
9942
|
dataType: x.data_type,
|
|
9941
9943
|
table: "api",
|
|
@@ -9953,7 +9955,7 @@ function or() {
|
|
|
9953
9955
|
id: w,
|
|
9954
9956
|
//uuidv4(),
|
|
9955
9957
|
location: y,
|
|
9956
|
-
column:
|
|
9958
|
+
column: b,
|
|
9957
9959
|
//columnName, //`${qualifiedTableName}.${formattedColumnName}`,
|
|
9958
9960
|
title: x.column_name,
|
|
9959
9961
|
dataType: x.data_type,
|
|
@@ -10478,12 +10480,12 @@ function Um() {
|
|
|
10478
10480
|
{
|
|
10479
10481
|
value: i || "none",
|
|
10480
10482
|
onValueChange: (p) => {
|
|
10481
|
-
var v, f,
|
|
10483
|
+
var v, f, C;
|
|
10482
10484
|
return l(
|
|
10483
10485
|
((v = t == null ? void 0 : t.formatNumber) == null ? void 0 : v.decimalPlaces) || 0,
|
|
10484
10486
|
((f = t == null ? void 0 : t.formatNumber) == null ? void 0 : f.currency) || "",
|
|
10485
10487
|
p,
|
|
10486
|
-
((
|
|
10488
|
+
((C = t == null ? void 0 : t.formatNumber) == null ? void 0 : C.suffix) || ""
|
|
10487
10489
|
);
|
|
10488
10490
|
},
|
|
10489
10491
|
children: [
|
|
@@ -10504,12 +10506,12 @@ function Um() {
|
|
|
10504
10506
|
{
|
|
10505
10507
|
value: c || "none",
|
|
10506
10508
|
onValueChange: (p) => {
|
|
10507
|
-
var v, f,
|
|
10509
|
+
var v, f, C;
|
|
10508
10510
|
console.log("currency", p), l(
|
|
10509
10511
|
((v = t == null ? void 0 : t.formatNumber) == null ? void 0 : v.decimalPlaces) || 0,
|
|
10510
10512
|
p === "none" ? "" : p,
|
|
10511
10513
|
((f = t == null ? void 0 : t.formatNumber) == null ? void 0 : f.locale) || "",
|
|
10512
|
-
((
|
|
10514
|
+
((C = t == null ? void 0 : t.formatNumber) == null ? void 0 : C.suffix) || ""
|
|
10513
10515
|
);
|
|
10514
10516
|
},
|
|
10515
10517
|
children: [
|
|
@@ -10532,12 +10534,12 @@ function Um() {
|
|
|
10532
10534
|
{
|
|
10533
10535
|
value: ((x = (g = t == null ? void 0 : t.formatNumber) == null ? void 0 : g.decimalPlaces) == null ? void 0 : x.toString()) || "0",
|
|
10534
10536
|
onValueChange: (p) => {
|
|
10535
|
-
var v, f,
|
|
10537
|
+
var v, f, C;
|
|
10536
10538
|
return l(
|
|
10537
10539
|
Number(p),
|
|
10538
10540
|
((v = t == null ? void 0 : t.formatNumber) == null ? void 0 : v.currency) || "",
|
|
10539
10541
|
((f = t == null ? void 0 : t.formatNumber) == null ? void 0 : f.locale) || "",
|
|
10540
|
-
((
|
|
10542
|
+
((C = t == null ? void 0 : t.formatNumber) == null ? void 0 : C.suffix) || ""
|
|
10541
10543
|
);
|
|
10542
10544
|
},
|
|
10543
10545
|
children: [
|
|
@@ -10556,11 +10558,11 @@ function Um() {
|
|
|
10556
10558
|
className: "h-8 font-mono text-xs focus-visible:ring-0 focus-visible:ring-ring focus-visible:ring-offset-0",
|
|
10557
10559
|
placeholder: "K, M, B, %",
|
|
10558
10560
|
onChange: (p) => {
|
|
10559
|
-
var v, f,
|
|
10561
|
+
var v, f, C;
|
|
10560
10562
|
return l(
|
|
10561
10563
|
((v = t == null ? void 0 : t.formatNumber) == null ? void 0 : v.decimalPlaces) || 0,
|
|
10562
10564
|
((f = t == null ? void 0 : t.formatNumber) == null ? void 0 : f.currency) || "",
|
|
10563
|
-
((
|
|
10565
|
+
((C = t == null ? void 0 : t.formatNumber) == null ? void 0 : C.locale) || "",
|
|
10564
10566
|
p.target.value
|
|
10565
10567
|
);
|
|
10566
10568
|
}
|
|
@@ -10733,7 +10735,7 @@ const qm = [
|
|
|
10733
10735
|
value: t
|
|
10734
10736
|
}));
|
|
10735
10737
|
function Km() {
|
|
10736
|
-
var u, d, m, h, g, x, y, p, v, f,
|
|
10738
|
+
var u, d, m, h, g, x, y, p, v, f, C, T, F, b, k, N, D, w;
|
|
10737
10739
|
const t = E((I) => I.card), a = (d = (u = t == null ? void 0 : t.preferences) == null ? void 0 : u.mapVisualOptions) == null ? void 0 : d.topoJsonUrl, [n, r] = j(
|
|
10738
10740
|
((h = (m = t == null ? void 0 : t.preferences) == null ? void 0 : m.mapVisualOptions) == null ? void 0 : h.customTopoJsonUrl) || ""
|
|
10739
10741
|
), { setCardPreferences: l } = re(), { data: i } = Bs(t), c = Object.keys((i == null ? void 0 : i.objects) || {}).map((I) => ({
|
|
@@ -10873,7 +10875,7 @@ function Km() {
|
|
|
10873
10875
|
className: `h-9 w-full ${ot}`,
|
|
10874
10876
|
type: "number",
|
|
10875
10877
|
step: 0.1,
|
|
10876
|
-
value: ((T = (
|
|
10878
|
+
value: ((T = (C = t.preferences) == null ? void 0 : C.mapVisualOptions) == null ? void 0 : T.projectionScale) || 1,
|
|
10877
10879
|
onChange: (I) => {
|
|
10878
10880
|
var S;
|
|
10879
10881
|
l({
|
|
@@ -10893,7 +10895,7 @@ function Km() {
|
|
|
10893
10895
|
className: `h-9 w-full ${ot}`,
|
|
10894
10896
|
type: "number",
|
|
10895
10897
|
step: 10,
|
|
10896
|
-
value: ((k = (
|
|
10898
|
+
value: ((k = (b = (F = t.preferences) == null ? void 0 : F.mapVisualOptions) == null ? void 0 : b.projectionOffset) == null ? void 0 : k[0]) || 0,
|
|
10897
10899
|
onChange: (I) => {
|
|
10898
10900
|
var S, z, M, A;
|
|
10899
10901
|
l({
|
|
@@ -11140,17 +11142,17 @@ function wi({ color: t, onColorChange: a, onClose: n }) {
|
|
|
11140
11142
|
const h = (v) => {
|
|
11141
11143
|
l(v), x(v, i, o);
|
|
11142
11144
|
}, g = (v) => {
|
|
11143
|
-
const f = v.currentTarget.getBoundingClientRect(),
|
|
11144
|
-
c(F), u(
|
|
11145
|
-
}, x = (v, f,
|
|
11146
|
-
const T = Xm(v, f,
|
|
11145
|
+
const f = v.currentTarget.getBoundingClientRect(), C = Math.max(0, Math.min(1, (v.clientX - f.left) / f.width)), T = Math.max(0, Math.min(1, (v.clientY - f.top) / f.height)), F = C * 100, b = (1 - T) * 100;
|
|
11146
|
+
c(F), u(b), x(r, F, b);
|
|
11147
|
+
}, x = (v, f, C) => {
|
|
11148
|
+
const T = Xm(v, f, C), F = Qm(T.r, T.g, T.b);
|
|
11147
11149
|
m(F);
|
|
11148
11150
|
}, y = (v) => {
|
|
11149
11151
|
if (m(v), /^#[0-9A-Fa-f]{6}$/.test(v)) {
|
|
11150
11152
|
const f = jr(v);
|
|
11151
11153
|
if (f) {
|
|
11152
|
-
const
|
|
11153
|
-
l(
|
|
11154
|
+
const C = Br(f.r, f.g, f.b);
|
|
11155
|
+
l(C.h), c(C.s), u(C.l);
|
|
11154
11156
|
}
|
|
11155
11157
|
}
|
|
11156
11158
|
}, p = () => {
|
|
@@ -11339,7 +11341,7 @@ const Zm = [
|
|
|
11339
11341
|
// yellow-400
|
|
11340
11342
|
];
|
|
11341
11343
|
function Si() {
|
|
11342
|
-
var T, F,
|
|
11344
|
+
var T, F, b, k, N, D, w, I, S, z;
|
|
11343
11345
|
const t = E((M) => M.card), a = E((M) => {
|
|
11344
11346
|
var A;
|
|
11345
11347
|
return (A = M.card) == null ? void 0 : A.preferences;
|
|
@@ -11388,7 +11390,7 @@ function Si() {
|
|
|
11388
11390
|
l,
|
|
11389
11391
|
(T = t == null ? void 0 : t.config) == null ? void 0 : T.groupByColumns,
|
|
11390
11392
|
(F = t == null ? void 0 : t.config) == null ? void 0 : F.pivotByColumns,
|
|
11391
|
-
(
|
|
11393
|
+
(b = t == null ? void 0 : t.config) == null ? void 0 : b.metricColumns,
|
|
11392
11394
|
t == null ? void 0 : t.type
|
|
11393
11395
|
]), g = Ke(() => Jo(), []);
|
|
11394
11396
|
Te(() => {
|
|
@@ -11456,14 +11458,14 @@ function Si() {
|
|
|
11456
11458
|
h.forEach((P, R) => {
|
|
11457
11459
|
O[P] = Dr(P, R, void 0);
|
|
11458
11460
|
}), c(O);
|
|
11459
|
-
},
|
|
11461
|
+
}, C = Object.keys(((z = a == null ? void 0 : a.colorConfig) == null ? void 0 : z.segments) || {}).length > 0;
|
|
11460
11462
|
return /* @__PURE__ */ s(Ce, { value: "colors", className: "border-b-0", children: [
|
|
11461
11463
|
/* @__PURE__ */ e(we, { className: "flex w-full items-center gap-2 py-2 text-sm font-medium hover:no-underline", children: /* @__PURE__ */ s("div", { className: "flex items-center gap-2", children: [
|
|
11462
11464
|
/* @__PURE__ */ e(Bd, { className: "h-4 w-4 text-muted-foreground" }),
|
|
11463
11465
|
/* @__PURE__ */ e("span", { children: "Colors" })
|
|
11464
11466
|
] }) }),
|
|
11465
11467
|
/* @__PURE__ */ e(Se, { className: "", children: /* @__PURE__ */ s("div", { className: "space-y-3", children: [
|
|
11466
|
-
/* @__PURE__ */ e("div", { className: "space-y-2", children: /* @__PURE__ */ e("div", { className: "flex items-center justify-between", children:
|
|
11468
|
+
/* @__PURE__ */ e("div", { className: "space-y-2", children: /* @__PURE__ */ e("div", { className: "flex items-center justify-between", children: C && /* @__PURE__ */ s(
|
|
11467
11469
|
"button",
|
|
11468
11470
|
{
|
|
11469
11471
|
className: "ml-auto flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground",
|
|
@@ -11859,7 +11861,7 @@ function cr({
|
|
|
11859
11861
|
] });
|
|
11860
11862
|
}
|
|
11861
11863
|
function Ur({ axis: t, label: a, type: n, config: r, onChange: l }) {
|
|
11862
|
-
var h, g, x, y, p, v, f,
|
|
11864
|
+
var h, g, x, y, p, v, f, C, T, F, b, k;
|
|
11863
11865
|
const i = (N, D) => {
|
|
11864
11866
|
l({
|
|
11865
11867
|
...r,
|
|
@@ -11991,7 +11993,7 @@ function Ur({ axis: t, label: a, type: n, config: r, onChange: l }) {
|
|
|
11991
11993
|
{
|
|
11992
11994
|
type: "number",
|
|
11993
11995
|
placeholder: "auto",
|
|
11994
|
-
value: ((f = r == null ? void 0 : r.scale) == null ? void 0 : f.min) === "auto" || ((
|
|
11996
|
+
value: ((f = r == null ? void 0 : r.scale) == null ? void 0 : f.min) === "auto" || ((C = r == null ? void 0 : r.scale) == null ? void 0 : C.min) === void 0 ? "" : String(r.scale.min),
|
|
11995
11997
|
onSave: (N) => u("min", N),
|
|
11996
11998
|
className: ""
|
|
11997
11999
|
}
|
|
@@ -12017,7 +12019,7 @@ function Ur({ axis: t, label: a, type: n, config: r, onChange: l }) {
|
|
|
12017
12019
|
{
|
|
12018
12020
|
type: "number",
|
|
12019
12021
|
placeholder: "auto",
|
|
12020
|
-
value: ((
|
|
12022
|
+
value: ((b = r == null ? void 0 : r.scale) == null ? void 0 : b.stepSize) === "auto" || ((k = r == null ? void 0 : r.scale) == null ? void 0 : k.stepSize) === void 0 ? "" : String(r.scale.stepSize),
|
|
12021
12023
|
onSave: (N) => u("stepSize", N),
|
|
12022
12024
|
className: ""
|
|
12023
12025
|
}
|
|
@@ -12215,7 +12217,7 @@ function Mi() {
|
|
|
12215
12217
|
...(i ? ["center", "left", "right"] : ["center", "top", "bottom"]).filter((L) => L !== v),
|
|
12216
12218
|
"custom"
|
|
12217
12219
|
];
|
|
12218
|
-
const
|
|
12220
|
+
const C = () => Qe(v), T = ["center", "start", "end"], F = ["center", "start", "end", "top", "bottom"], b = u ? ["auto", "number", "currency", "percent", "none"] : ["number", "currency", "percent", "none"], k = [
|
|
12219
12221
|
{ value: "USD", label: "USD - US Dollar" },
|
|
12220
12222
|
{ value: "EUR", label: "EUR - Euro" },
|
|
12221
12223
|
{ value: "GBP", label: "GBP - British Pound" },
|
|
@@ -12260,7 +12262,7 @@ function Mi() {
|
|
|
12260
12262
|
onValueChange: (R) => g("position", R),
|
|
12261
12263
|
children: [
|
|
12262
12264
|
/* @__PURE__ */ e(me, { className: "h-8 text-xs", children: /* @__PURE__ */ e(he, {}) }),
|
|
12263
|
-
/* @__PURE__ */ e(pe, { children: f.map((R) => /* @__PURE__ */ e(Q, { value: R, className: "text-xs", children: R === "auto" ?
|
|
12265
|
+
/* @__PURE__ */ e(pe, { children: f.map((R) => /* @__PURE__ */ e(Q, { value: R, className: "text-xs", children: R === "auto" ? C() : R === "custom" ? "Custom (Advanced)" : Qe(R) }, R)) })
|
|
12264
12266
|
]
|
|
12265
12267
|
}
|
|
12266
12268
|
)
|
|
@@ -12314,7 +12316,7 @@ function Mi() {
|
|
|
12314
12316
|
onValueChange: (R) => g("format", R),
|
|
12315
12317
|
children: [
|
|
12316
12318
|
/* @__PURE__ */ e(me, { className: "h-8 text-xs", children: /* @__PURE__ */ e(he, {}) }),
|
|
12317
|
-
/* @__PURE__ */ e(pe, { children:
|
|
12319
|
+
/* @__PURE__ */ e(pe, { children: b.map((R) => /* @__PURE__ */ e(Q, { value: R, className: "text-xs", children: R === "auto" && u ? "Auto (Use Axis)" : R === "none" ? "None (Raw Value)" : Qe(R) }, R)) })
|
|
12318
12320
|
]
|
|
12319
12321
|
}
|
|
12320
12322
|
)
|
|
@@ -12857,7 +12859,7 @@ function ph({
|
|
|
12857
12859
|
o(t.id, S);
|
|
12858
12860
|
}
|
|
12859
12861
|
}
|
|
12860
|
-
function
|
|
12862
|
+
function C() {
|
|
12861
12863
|
if (r === ya)
|
|
12862
12864
|
return /* @__PURE__ */ e(
|
|
12863
12865
|
"div",
|
|
@@ -12893,7 +12895,7 @@ function ph({
|
|
|
12893
12895
|
}
|
|
12894
12896
|
);
|
|
12895
12897
|
}
|
|
12896
|
-
function
|
|
12898
|
+
function b() {
|
|
12897
12899
|
return /* @__PURE__ */ e("div", { "data-setting-actions": "", className: "flex h-full items-center gap-2", children: /* @__PURE__ */ e(
|
|
12898
12900
|
"button",
|
|
12899
12901
|
{
|
|
@@ -12920,11 +12922,11 @@ function ph({
|
|
|
12920
12922
|
return /* @__PURE__ */ e("div", { ...m, ...d, ref: h, style: p, children: /* @__PURE__ */ s("div", { className: "group flex items-center justify-between gap-2", children: [
|
|
12921
12923
|
/* @__PURE__ */ s("div", { className: "grow", children: [
|
|
12922
12924
|
/* @__PURE__ */ s("div", { className: "flex h-8 grow items-center justify-between rounded-md bg-muted", children: [
|
|
12923
|
-
|
|
12925
|
+
b(),
|
|
12924
12926
|
T(),
|
|
12925
12927
|
F()
|
|
12926
12928
|
] }),
|
|
12927
|
-
l &&
|
|
12929
|
+
l && C()
|
|
12928
12930
|
] }),
|
|
12929
12931
|
/* @__PURE__ */ e(
|
|
12930
12932
|
"div",
|
|
@@ -12952,8 +12954,8 @@ function ls({
|
|
|
12952
12954
|
const { setNodeRef: c, isOver: o, over: u } = Qs({
|
|
12953
12955
|
id: t
|
|
12954
12956
|
}), d = ta((f) => f.activeId), m = E((f) => {
|
|
12955
|
-
var
|
|
12956
|
-
return (
|
|
12957
|
+
var C;
|
|
12958
|
+
return (C = f.card) == null ? void 0 : C.type;
|
|
12957
12959
|
}), h = o || ((v = (p = u == null ? void 0 : u.data) == null ? void 0 : p.current) == null ? void 0 : v.type) === l, g = d ? r : n, x = l === zn ? "Rows" : l === Ln ? "Pivot Columns" : "Columns";
|
|
12958
12960
|
function y() {
|
|
12959
12961
|
if (!g || g.length === 0)
|
|
@@ -13010,36 +13012,36 @@ function Ai({ children: t, id: a, type: n }) {
|
|
|
13010
13012
|
}
|
|
13011
13013
|
function gh() {
|
|
13012
13014
|
const t = E((f) => {
|
|
13013
|
-
var
|
|
13014
|
-
return (
|
|
13015
|
+
var C;
|
|
13016
|
+
return (C = f.card.queryConfig) == null ? void 0 : C.orderBy;
|
|
13015
13017
|
}) || [], a = E((f) => {
|
|
13016
|
-
var
|
|
13017
|
-
return (
|
|
13018
|
+
var C;
|
|
13019
|
+
return (C = f.card.queryConfig) == null ? void 0 : C.groupByColumns;
|
|
13018
13020
|
}) || [], n = E((f) => {
|
|
13019
|
-
var
|
|
13020
|
-
return (
|
|
13021
|
+
var C;
|
|
13022
|
+
return (C = f.card.queryConfig) == null ? void 0 : C.metricColumns;
|
|
13021
13023
|
}) || [], { addOrderByColumn: r, removeOrderByColumn: l, updateOrderByColumn: i } = re(), c = [...a, ...n];
|
|
13022
13024
|
if (c.length === 0)
|
|
13023
13025
|
return /* @__PURE__ */ e(se, {});
|
|
13024
|
-
const o = /* @__PURE__ */ e(dd, { className: "size-3.5 text-muted-foreground hover:text-foreground" }), u = /* @__PURE__ */ e(id, { className: "size-3.5 text-muted-foreground hover:text-foreground" }), d = /* @__PURE__ */ e(cd, { className: "size-3.5 text-muted-foreground hover:text-foreground" }), m = /* @__PURE__ */ e(ld, { className: "size-3.5 text-muted-foreground hover:text-foreground" }), h = c == null ? void 0 : c.filter((f) => !t.some((
|
|
13026
|
+
const o = /* @__PURE__ */ e(dd, { className: "size-3.5 text-muted-foreground hover:text-foreground" }), u = /* @__PURE__ */ e(id, { className: "size-3.5 text-muted-foreground hover:text-foreground" }), d = /* @__PURE__ */ e(cd, { className: "size-3.5 text-muted-foreground hover:text-foreground" }), m = /* @__PURE__ */ e(ld, { className: "size-3.5 text-muted-foreground hover:text-foreground" }), h = c == null ? void 0 : c.filter((f) => !t.some((C) => C.columnId === f.id)).map((f) => ({
|
|
13025
13027
|
id: f.id,
|
|
13026
13028
|
value: f.label || f.name
|
|
13027
13029
|
}));
|
|
13028
|
-
function g(f,
|
|
13030
|
+
function g(f, C) {
|
|
13029
13031
|
const T = x(f);
|
|
13030
|
-
return T ? T.role === "metric" ?
|
|
13032
|
+
return T ? T.role === "metric" ? C === "asc" ? d : m : C === "asc" ? o : u : null;
|
|
13031
13033
|
}
|
|
13032
13034
|
function x(f) {
|
|
13033
|
-
return c.find((
|
|
13035
|
+
return c.find((C) => C.id === f);
|
|
13034
13036
|
}
|
|
13035
13037
|
function y(f) {
|
|
13036
|
-
const
|
|
13038
|
+
const C = t.find(
|
|
13037
13039
|
(T) => T.columnId === f
|
|
13038
13040
|
);
|
|
13039
|
-
if (
|
|
13041
|
+
if (C) {
|
|
13040
13042
|
const T = {
|
|
13041
|
-
...
|
|
13042
|
-
direction:
|
|
13043
|
+
...C,
|
|
13044
|
+
direction: C.direction === "asc" ? "desc" : "asc"
|
|
13043
13045
|
};
|
|
13044
13046
|
i(T);
|
|
13045
13047
|
}
|
|
@@ -13051,10 +13053,10 @@ function gh() {
|
|
|
13051
13053
|
});
|
|
13052
13054
|
};
|
|
13053
13055
|
function v(f) {
|
|
13054
|
-
const
|
|
13056
|
+
const C = t.find(
|
|
13055
13057
|
(T) => T.columnId === f
|
|
13056
13058
|
);
|
|
13057
|
-
|
|
13059
|
+
C && l(C);
|
|
13058
13060
|
}
|
|
13059
13061
|
return /* @__PURE__ */ e(
|
|
13060
13062
|
la,
|
|
@@ -13076,7 +13078,7 @@ function gh() {
|
|
|
13076
13078
|
}
|
|
13077
13079
|
) }),
|
|
13078
13080
|
t.map((f) => {
|
|
13079
|
-
var
|
|
13081
|
+
var C, T;
|
|
13080
13082
|
return /* @__PURE__ */ e(
|
|
13081
13083
|
Ai,
|
|
13082
13084
|
{
|
|
@@ -13090,7 +13092,7 @@ function gh() {
|
|
|
13090
13092
|
/* @__PURE__ */ s("div", { className: "flex h-full grow items-center justify-between gap-2 rounded-sm bg-muted px-2", children: [
|
|
13091
13093
|
/* @__PURE__ */ s("div", { className: "flex items-center gap-3", children: [
|
|
13092
13094
|
/* @__PURE__ */ e(jl, { className: "size-3 cursor-move text-muted-foreground hover:text-foreground" }),
|
|
13093
|
-
/* @__PURE__ */ e(Wn, { className: "w-[175px] text-sm", children: ((
|
|
13095
|
+
/* @__PURE__ */ e(Wn, { className: "w-[175px] text-sm", children: ((C = x(f.columnId)) == null ? void 0 : C.label) || ((T = x(f.columnId)) == null ? void 0 : T.name) })
|
|
13094
13096
|
] }),
|
|
13095
13097
|
/* @__PURE__ */ e(
|
|
13096
13098
|
"button",
|
|
@@ -13278,13 +13280,13 @@ function yh({
|
|
|
13278
13280
|
}) {
|
|
13279
13281
|
const n = ae((T) => T.themeStyle), r = E(
|
|
13280
13282
|
(T) => {
|
|
13281
|
-
var F,
|
|
13282
|
-
return (
|
|
13283
|
+
var F, b;
|
|
13284
|
+
return (b = (F = T.card) == null ? void 0 : F.queryConfig) == null ? void 0 : b.filters;
|
|
13283
13285
|
}
|
|
13284
13286
|
), l = E(
|
|
13285
13287
|
(T) => {
|
|
13286
|
-
var F,
|
|
13287
|
-
return (
|
|
13288
|
+
var F, b;
|
|
13289
|
+
return (b = (F = T.card.queryConfig) == null ? void 0 : F.filterColumns) == null ? void 0 : b.find(
|
|
13288
13290
|
(k) => k.name === t.name
|
|
13289
13291
|
);
|
|
13290
13292
|
}
|
|
@@ -13309,21 +13311,21 @@ function yh({
|
|
|
13309
13311
|
dataType: t.type
|
|
13310
13312
|
}, { data: g, isLoading: x, isFetching: y, isError: p } = zl(h), v = Ke(() => {
|
|
13311
13313
|
var F;
|
|
13312
|
-
return h.column ? (F = g == null ? void 0 : g.records) == null ? void 0 : F.map((
|
|
13314
|
+
return h.column ? (F = g == null ? void 0 : g.records) == null ? void 0 : F.map((b) => {
|
|
13313
13315
|
let k = h.column.split(".").slice(-1)[0].replace(/"/g, "");
|
|
13314
|
-
return
|
|
13315
|
-
id:
|
|
13316
|
+
return b[k] === void 0 && (k = k.toLowerCase()), {
|
|
13317
|
+
id: b[k],
|
|
13316
13318
|
//idx,
|
|
13317
|
-
value:
|
|
13319
|
+
value: b[k]
|
|
13318
13320
|
// this is needed if
|
|
13319
13321
|
};
|
|
13320
13322
|
}) : [];
|
|
13321
13323
|
}, [g, h.column]);
|
|
13322
13324
|
function f(T) {
|
|
13323
|
-
const F = T.map((
|
|
13325
|
+
const F = T.map((b) => b.id);
|
|
13324
13326
|
m(t.name, F);
|
|
13325
13327
|
}
|
|
13326
|
-
function
|
|
13328
|
+
function C() {
|
|
13327
13329
|
return x || y ? /* @__PURE__ */ e(
|
|
13328
13330
|
zs,
|
|
13329
13331
|
{
|
|
@@ -13353,7 +13355,7 @@ function yh({
|
|
|
13353
13355
|
id: t.id,
|
|
13354
13356
|
sortableType: a,
|
|
13355
13357
|
column: t,
|
|
13356
|
-
children:
|
|
13358
|
+
children: C()
|
|
13357
13359
|
}
|
|
13358
13360
|
);
|
|
13359
13361
|
}
|
|
@@ -13502,13 +13504,13 @@ function bh({
|
|
|
13502
13504
|
}, { isLoading: u, isFetching: d, isError: m, data: h } = zl(o), g = h == null ? void 0 : h.records, { dateRange: x, setDateRange: y, initialDateRange: p } = ac(g), { updateEditorFilterValue: v } = re();
|
|
13503
13505
|
function f(F) {
|
|
13504
13506
|
var k, N;
|
|
13505
|
-
const
|
|
13507
|
+
const b = {
|
|
13506
13508
|
gte: (k = F == null ? void 0 : F.from) == null ? void 0 : k.toISOString(),
|
|
13507
13509
|
lte: (N = F == null ? void 0 : F.to) == null ? void 0 : N.toISOString()
|
|
13508
13510
|
};
|
|
13509
|
-
v(t.name,
|
|
13511
|
+
v(t.name, b);
|
|
13510
13512
|
}
|
|
13511
|
-
function
|
|
13513
|
+
function C() {
|
|
13512
13514
|
v(t.name, null, !0), y(p);
|
|
13513
13515
|
}
|
|
13514
13516
|
function T() {
|
|
@@ -13522,7 +13524,7 @@ function bh({
|
|
|
13522
13524
|
dateRange: x,
|
|
13523
13525
|
setDateRange: y,
|
|
13524
13526
|
onApply: f,
|
|
13525
|
-
onClear:
|
|
13527
|
+
onClear: C
|
|
13526
13528
|
}
|
|
13527
13529
|
) : /* @__PURE__ */ e(B, { className: "flex h-8 w-72 items-center bg-muted px-2", children: "No Data" });
|
|
13528
13530
|
}
|
|
@@ -13760,11 +13762,11 @@ function Mh(t) {
|
|
|
13760
13762
|
setRunSql: h,
|
|
13761
13763
|
switchCardType: g,
|
|
13762
13764
|
setQueryConfig: x
|
|
13763
|
-
} = re(), y = E((q) => q.currentAssitantScope) || [], p = E((q) => q.userInputForAI), v = E((q) => q.triggerAIRun), f = E((q) => q.card),
|
|
13765
|
+
} = re(), y = E((q) => q.currentAssitantScope) || [], p = E((q) => q.userInputForAI), v = E((q) => q.triggerAIRun), f = E((q) => q.card), C = E(
|
|
13764
13766
|
(q) => q.selectedDatabaseName
|
|
13765
13767
|
), T = E((q) => q.selectedTableName), F = E(
|
|
13766
13768
|
(q) => q.selectedConnectionId
|
|
13767
|
-
),
|
|
13769
|
+
), b = E(
|
|
13768
13770
|
(q) => q.selectedSchemaName
|
|
13769
13771
|
), k = ae(
|
|
13770
13772
|
(q) => q.dashboard.aiScopeTables
|
|
@@ -13922,8 +13924,8 @@ function Mh(t) {
|
|
|
13922
13924
|
}
|
|
13923
13925
|
function W() {
|
|
13924
13926
|
const q = {
|
|
13925
|
-
databaseName:
|
|
13926
|
-
schemaName:
|
|
13927
|
+
databaseName: C || "",
|
|
13928
|
+
schemaName: b || "",
|
|
13927
13929
|
tableName: T || "",
|
|
13928
13930
|
datamodelId: O || "",
|
|
13929
13931
|
datamodelName: Er(M),
|
|
@@ -13934,8 +13936,8 @@ function Mh(t) {
|
|
|
13934
13936
|
}
|
|
13935
13937
|
function _() {
|
|
13936
13938
|
const q = {
|
|
13937
|
-
databaseName:
|
|
13938
|
-
schemaName:
|
|
13939
|
+
databaseName: C || "",
|
|
13940
|
+
schemaName: b || "",
|
|
13939
13941
|
tableName: T || "",
|
|
13940
13942
|
datamodelName: Er(M),
|
|
13941
13943
|
connectionId: F || "",
|
|
@@ -13988,9 +13990,9 @@ const Th = [
|
|
|
13988
13990
|
}
|
|
13989
13991
|
];
|
|
13990
13992
|
function $r() {
|
|
13991
|
-
const t = Vt(null), [a, n] = j(!1), [r, l] = j(On), [i, c] = j(!1), [o, u] = j(!1), d = dc(), { setCurrentAIContext: m } = uc(), { clearQueue: h } = mc(), { clearFileAttachments: g } = hc(), x = pc("editor"), y = ae((fe) => fe.dashboard.aiContext), p = E((fe) => fe.card.dataSource), v = E((fe) => fe.actions.setCardSql), f = E((fe) => fe.actions.setRunSql),
|
|
13993
|
+
const t = Vt(null), [a, n] = j(!1), [r, l] = j(On), [i, c] = j(!1), [o, u] = j(!1), d = dc(), { setCurrentAIContext: m } = uc(), { clearQueue: h } = mc(), { clearFileAttachments: g } = hc(), x = pc("editor"), y = ae((fe) => fe.dashboard.aiContext), p = E((fe) => fe.card.dataSource), v = E((fe) => fe.actions.setCardSql), f = E((fe) => fe.actions.setRunSql), C = E((fe) => fe.showAIDialog), T = ae(
|
|
13992
13994
|
(fe) => fe.handleOpenAssistantProfile
|
|
13993
|
-
), { setShowAIDialog: F, setCardPython:
|
|
13995
|
+
), { setShowAIDialog: F, setCardPython: b } = re(), { setDataSource: k } = re(), { assistantProfile: N } = fc(), {
|
|
13994
13996
|
messages: D,
|
|
13995
13997
|
setMessages: w,
|
|
13996
13998
|
sendMessage: I,
|
|
@@ -14046,10 +14048,10 @@ function $r() {
|
|
|
14046
14048
|
});
|
|
14047
14049
|
Te(() => {
|
|
14048
14050
|
var fe;
|
|
14049
|
-
|
|
14051
|
+
C && ((fe = t.current) == null || fe.focus(), m({
|
|
14050
14052
|
selectedEntities: (p == null ? void 0 : p.selectedEntities) || []
|
|
14051
14053
|
}));
|
|
14052
|
-
}, [
|
|
14054
|
+
}, [C, p, m]), yc({
|
|
14053
14055
|
assistantType: "editor",
|
|
14054
14056
|
status: M,
|
|
14055
14057
|
isLoading: S,
|
|
@@ -14057,7 +14059,7 @@ function $r() {
|
|
|
14057
14059
|
});
|
|
14058
14060
|
const { hasActiveTools: de } = vc(D);
|
|
14059
14061
|
function Ee(fe, xe) {
|
|
14060
|
-
xe === "sql" ? (v(fe), f(!0)) : xe === "python" && (
|
|
14062
|
+
xe === "sql" ? (v(fe), f(!0)) : xe === "python" && (b(fe), f(!0));
|
|
14061
14063
|
}
|
|
14062
14064
|
function Z() {
|
|
14063
14065
|
var fe;
|
|
@@ -14471,7 +14473,7 @@ const ur = (t) => {
|
|
|
14471
14473
|
});
|
|
14472
14474
|
},
|
|
14473
14475
|
[h, g, n]
|
|
14474
|
-
),
|
|
14476
|
+
), C = Ne(
|
|
14475
14477
|
(z, M) => {
|
|
14476
14478
|
if (!h) return;
|
|
14477
14479
|
const O = g("metrics")[z];
|
|
@@ -14495,7 +14497,7 @@ const ur = (t) => {
|
|
|
14495
14497
|
h && a(h, { comparisonType: z });
|
|
14496
14498
|
},
|
|
14497
14499
|
[h, a]
|
|
14498
|
-
),
|
|
14500
|
+
), b = Ne(
|
|
14499
14501
|
(z) => {
|
|
14500
14502
|
h && a(h, { showTrendline: z });
|
|
14501
14503
|
},
|
|
@@ -14593,13 +14595,13 @@ const ur = (t) => {
|
|
|
14593
14595
|
handleAggregationChange: p,
|
|
14594
14596
|
handleDateFormatChange: v,
|
|
14595
14597
|
handleGranularityChange: f,
|
|
14596
|
-
handleAliasTemplateChange:
|
|
14598
|
+
handleAliasTemplateChange: C,
|
|
14597
14599
|
handleValueAliasesChange: T,
|
|
14598
14600
|
removeField: I,
|
|
14599
14601
|
handleFieldClick: w,
|
|
14600
14602
|
// KPI-specific handlers
|
|
14601
14603
|
handleKpiComparisonTypeChange: F,
|
|
14602
|
-
handleKpiShowTrendlineChange:
|
|
14604
|
+
handleKpiShowTrendlineChange: b,
|
|
14603
14605
|
handleKpiTrendlineWindowChange: k,
|
|
14604
14606
|
handleKpiTrendlineGranularityChange: N,
|
|
14605
14607
|
handleKpiTargetValueChange: D,
|
|
@@ -14738,18 +14740,18 @@ function Ih() {
|
|
|
14738
14740
|
}, g = (n === "all" ? d : d.filter(
|
|
14739
14741
|
(T) => m(T) === n
|
|
14740
14742
|
)).reduce((T, F) => {
|
|
14741
|
-
const
|
|
14742
|
-
return T[
|
|
14743
|
+
const b = F.qualifiedEntityName || "Other Fields";
|
|
14744
|
+
return T[b] || (T[b] = {
|
|
14743
14745
|
label: Ac(F.entityName),
|
|
14744
14746
|
fields: []
|
|
14745
|
-
}), T[
|
|
14747
|
+
}), T[b].fields.push(F), T;
|
|
14746
14748
|
}, {}), y = Object.keys(g), p = d.filter(
|
|
14747
14749
|
(T) => m(T) === "dimensions"
|
|
14748
14750
|
).length, v = d.filter(
|
|
14749
14751
|
(T) => m(T) === "metrics"
|
|
14750
14752
|
).length, f = d.filter(
|
|
14751
14753
|
(T) => m(T) === "calculated"
|
|
14752
|
-
).length,
|
|
14754
|
+
).length, C = d.length > 0;
|
|
14753
14755
|
return o ? /* @__PURE__ */ e("div", { className: "flex h-[calc(100vh-200px)] w-[290px] flex-col items-center justify-center", children: /* @__PURE__ */ e(Za, { size: "md", color: "muted", "aria-label": "Loading data" }) }) : u ? /* @__PURE__ */ s("div", { className: "flex h-[calc(100vh-200px)] w-[290px] flex-col items-center justify-center", children: [
|
|
14754
14756
|
/* @__PURE__ */ e(Ct, { className: "mb-4 h-12 w-12 text-red-300" }),
|
|
14755
14757
|
/* @__PURE__ */ e("p", { className: "mb-2 text-sm text-red-500", children: "Error loading fields" }),
|
|
@@ -14773,7 +14775,7 @@ function Ih() {
|
|
|
14773
14775
|
}
|
|
14774
14776
|
)
|
|
14775
14777
|
] }),
|
|
14776
|
-
|
|
14778
|
+
C && /* @__PURE__ */ e(
|
|
14777
14779
|
Ut,
|
|
14778
14780
|
{
|
|
14779
14781
|
defaultValue: "all",
|
|
@@ -14809,7 +14811,7 @@ function Ih() {
|
|
|
14809
14811
|
defaultValue: y,
|
|
14810
14812
|
className: "space-y-2",
|
|
14811
14813
|
children: Object.entries(g).map(([T, F]) => {
|
|
14812
|
-
const
|
|
14814
|
+
const b = c.find((k) => k.entityName === T) || {
|
|
14813
14815
|
entityName: T,
|
|
14814
14816
|
label: F.label
|
|
14815
14817
|
};
|
|
@@ -14819,17 +14821,24 @@ function Ih() {
|
|
|
14819
14821
|
value: T,
|
|
14820
14822
|
className: "border-none",
|
|
14821
14823
|
children: [
|
|
14822
|
-
/* @__PURE__ */ e(we, { className: "group rounded-md px-2.5 py-2 text-muted-foreground hover:bg-muted hover:no-underline", children: /* @__PURE__ */ s(
|
|
14823
|
-
|
|
14824
|
-
|
|
14825
|
-
|
|
14826
|
-
|
|
14827
|
-
|
|
14828
|
-
className: "
|
|
14829
|
-
|
|
14830
|
-
|
|
14831
|
-
|
|
14832
|
-
|
|
14824
|
+
/* @__PURE__ */ e(we, { className: "group rounded-md px-2.5 py-2 text-muted-foreground hover:bg-muted hover:no-underline", children: /* @__PURE__ */ s(
|
|
14825
|
+
"div",
|
|
14826
|
+
{
|
|
14827
|
+
title: b.label || b.entityName,
|
|
14828
|
+
className: "flex items-center gap-2",
|
|
14829
|
+
children: [
|
|
14830
|
+
/* @__PURE__ */ e("span", { className: "max-w-[190px] truncate text-ellipsis whitespace-nowrap text-sm font-medium text-primary", children: b.label || b.entityName }),
|
|
14831
|
+
/* @__PURE__ */ e(
|
|
14832
|
+
ce,
|
|
14833
|
+
{
|
|
14834
|
+
variant: "secondary",
|
|
14835
|
+
className: "rounded-full text-xs text-muted-foreground group-hover:bg-background",
|
|
14836
|
+
children: F.fields.length
|
|
14837
|
+
}
|
|
14838
|
+
)
|
|
14839
|
+
]
|
|
14840
|
+
}
|
|
14841
|
+
) }),
|
|
14833
14842
|
/* @__PURE__ */ e(Se, { className: "pb-2", children: /* @__PURE__ */ e("div", { className: "space-y-1", children: F.fields.map((k) => /* @__PURE__ */ e(Ah, { field: k }, k.id)) }) })
|
|
14834
14843
|
]
|
|
14835
14844
|
},
|
|
@@ -15151,10 +15160,10 @@ function Fh({
|
|
|
15151
15160
|
toggleJoinExpansion: p,
|
|
15152
15161
|
getAvailableSourceEntities: v,
|
|
15153
15162
|
getAvailableTargetEntities: f,
|
|
15154
|
-
addJoinKeyGroup:
|
|
15163
|
+
addJoinKeyGroup: C,
|
|
15155
15164
|
updateGroupOperator: T,
|
|
15156
15165
|
removeJoinKeyGroup: F,
|
|
15157
|
-
addJoinKey:
|
|
15166
|
+
addJoinKey: b,
|
|
15158
15167
|
updateJoinKey: k,
|
|
15159
15168
|
removeJoinKey: N,
|
|
15160
15169
|
generateSQLPreview: D,
|
|
@@ -15454,7 +15463,7 @@ function Fh({
|
|
|
15454
15463
|
type: "button",
|
|
15455
15464
|
variant: "outline",
|
|
15456
15465
|
size: "sm",
|
|
15457
|
-
onClick: () =>
|
|
15466
|
+
onClick: () => C(S.id),
|
|
15458
15467
|
children: [
|
|
15459
15468
|
/* @__PURE__ */ e($e, { className: "mr-1 h-3 w-3" }),
|
|
15460
15469
|
" Add Condition Group"
|
|
@@ -15684,7 +15693,7 @@ function Fh({
|
|
|
15684
15693
|
variant: "outline",
|
|
15685
15694
|
size: "sm",
|
|
15686
15695
|
className: "mt-2",
|
|
15687
|
-
onClick: () =>
|
|
15696
|
+
onClick: () => b(S.id, P),
|
|
15688
15697
|
children: [
|
|
15689
15698
|
/* @__PURE__ */ e($e, { className: "mr-1 h-3 w-3" }),
|
|
15690
15699
|
" Add Condition"
|
|
@@ -15883,18 +15892,18 @@ FROM ${x.name}`;
|
|
|
15883
15892
|
if (!v) return;
|
|
15884
15893
|
const f = p.joinKeyGroups.filter((T) => T.keys && T.keys.length > 0).map((T) => {
|
|
15885
15894
|
const F = T.keys.filter(
|
|
15886
|
-
(
|
|
15895
|
+
(b) => {
|
|
15887
15896
|
var k, N, D, w;
|
|
15888
|
-
return ((k =
|
|
15897
|
+
return ((k = b.source) == null ? void 0 : k.name) && ((N = b.target) == null ? void 0 : N.name) && ((D = b.source) == null ? void 0 : D.entityName) && ((w = b.target) == null ? void 0 : w.entityName);
|
|
15889
15898
|
}
|
|
15890
15899
|
).map(
|
|
15891
|
-
(
|
|
15900
|
+
(b) => `${b.source.entityName}.${b.source.name} ${b.operator} ${b.target.entityName}.${b.target.name}`
|
|
15892
15901
|
);
|
|
15893
15902
|
return F.length > 1 ? `(${F.join(` ${T.operator} `)})` : F[0];
|
|
15894
|
-
}).filter(Boolean),
|
|
15903
|
+
}).filter(Boolean), C = f.length > 1 ? f.join(" OR ") : f[0] || "condition_here";
|
|
15895
15904
|
y += `
|
|
15896
15905
|
${p.joinType} JOIN ${v.name}
|
|
15897
|
-
ON ${
|
|
15906
|
+
ON ${C}`;
|
|
15898
15907
|
}), y;
|
|
15899
15908
|
};
|
|
15900
15909
|
return i.length < 2 ? null : /* @__PURE__ */ e(se, { children: /* @__PURE__ */ e("div", { className: "space-y-4", children: /* @__PURE__ */ s("div", { className: "flex items-center justify-between", children: [
|
|
@@ -15995,9 +16004,9 @@ function Ph({
|
|
|
15995
16004
|
}, [t]);
|
|
15996
16005
|
const o = (p) => {
|
|
15997
16006
|
r((v) => v.some(
|
|
15998
|
-
(
|
|
16007
|
+
(C) => C.name === p.name && C.type === p.type
|
|
15999
16008
|
) ? v.filter(
|
|
16000
|
-
(
|
|
16009
|
+
(C) => !(C.name === p.name && C.type === p.type)
|
|
16001
16010
|
) : [...v, p]);
|
|
16002
16011
|
}, u = () => {
|
|
16003
16012
|
r([...c]);
|
|
@@ -16005,7 +16014,7 @@ function Ph({
|
|
|
16005
16014
|
r([]);
|
|
16006
16015
|
}, m = () => {
|
|
16007
16016
|
if (n.length === 0) return;
|
|
16008
|
-
const p = n[0], v = p.connectionId || "", f = p.connectionType || "", T = n.some((
|
|
16017
|
+
const p = n[0], v = p.connectionId || "", f = p.connectionType || "", T = n.some((b) => b.type === "dataset") ? "semanticDomain" : "database";
|
|
16009
16018
|
l({
|
|
16010
16019
|
connectionId: v,
|
|
16011
16020
|
connectionType: f,
|
|
@@ -16408,35 +16417,35 @@ function $h({
|
|
|
16408
16417
|
var F;
|
|
16409
16418
|
const [n, r] = j(!1), { data: l } = pi();
|
|
16410
16419
|
Uh();
|
|
16411
|
-
const c = ((F = E((
|
|
16420
|
+
const c = ((F = E((b) => b.card).customCardPreferences) == null ? void 0 : F.url) || "";
|
|
16412
16421
|
nr(c);
|
|
16413
16422
|
const { setCardType: o, setCardPreferences: u, setIsDevMode: d } = E(
|
|
16414
|
-
(
|
|
16423
|
+
(b) => b.actions
|
|
16415
16424
|
), { setCardCustomCfg: m, setCustomCardPreferences: h, setQueryConfig: g } = re(), [x, y] = Rs("chart-section-active", null), p = Ke(() => x ? [
|
|
16416
16425
|
x,
|
|
16417
|
-
...Gr.filter((
|
|
16426
|
+
...Gr.filter((b) => b !== x)
|
|
16418
16427
|
] : Gr, [x]);
|
|
16419
|
-
function v(
|
|
16420
|
-
m(null), u({}), o(
|
|
16428
|
+
function v(b) {
|
|
16429
|
+
m(null), u({}), o(b), ["custom", "text", "map"].includes(b) && (d(!0), g(void 0)), a(b), r(!1);
|
|
16421
16430
|
}
|
|
16422
|
-
function f(
|
|
16431
|
+
function f(b) {
|
|
16423
16432
|
m(null), u({}), o("custom"), h({
|
|
16424
16433
|
type: "component",
|
|
16425
16434
|
visualType: "single",
|
|
16426
|
-
url:
|
|
16427
|
-
componentName:
|
|
16428
|
-
icon:
|
|
16429
|
-
pluginChartType:
|
|
16435
|
+
url: b.url,
|
|
16436
|
+
componentName: b.name,
|
|
16437
|
+
icon: b.icon,
|
|
16438
|
+
pluginChartType: b.chartType
|
|
16430
16439
|
}), g(void 0), a("custom"), r(!1);
|
|
16431
16440
|
}
|
|
16432
|
-
const
|
|
16441
|
+
const C = () => {
|
|
16433
16442
|
var k;
|
|
16434
16443
|
if (t === "custom") {
|
|
16435
16444
|
const N = E.getState().card;
|
|
16436
16445
|
return ((k = N == null ? void 0 : N.customCardPreferences) == null ? void 0 : k.componentName) || "Custom Visual";
|
|
16437
16446
|
}
|
|
16438
|
-
const
|
|
16439
|
-
return (
|
|
16447
|
+
const b = Xn.find((N) => N.id === t);
|
|
16448
|
+
return (b == null ? void 0 : b.label) || "Select chart type";
|
|
16440
16449
|
};
|
|
16441
16450
|
return /* @__PURE__ */ e("div", { className: "mb-6", children: /* @__PURE__ */ s(ht, { open: n, onOpenChange: r, children: [
|
|
16442
16451
|
/* @__PURE__ */ e(pt, { asChild: !0, children: /* @__PURE__ */ s(
|
|
@@ -16461,14 +16470,14 @@ function $h({
|
|
|
16461
16470
|
}
|
|
16462
16471
|
return /* @__PURE__ */ e(nn, { className: "h-4 w-4" });
|
|
16463
16472
|
}
|
|
16464
|
-
const
|
|
16465
|
-
if (
|
|
16466
|
-
const D =
|
|
16473
|
+
const b = Xn.find((D) => D.id === t);
|
|
16474
|
+
if (b) {
|
|
16475
|
+
const D = b.icon;
|
|
16467
16476
|
return /* @__PURE__ */ e(D, { className: "h-4 w-4" });
|
|
16468
16477
|
}
|
|
16469
16478
|
return /* @__PURE__ */ e(nn, { className: "h-4 w-4" });
|
|
16470
16479
|
})(),
|
|
16471
|
-
/* @__PURE__ */ e("span", { children:
|
|
16480
|
+
/* @__PURE__ */ e("span", { children: C() })
|
|
16472
16481
|
] }),
|
|
16473
16482
|
/* @__PURE__ */ e(pa, { className: "ml-2 h-4 w-4 shrink-0 opacity-50" })
|
|
16474
16483
|
]
|
|
@@ -16478,8 +16487,8 @@ function $h({
|
|
|
16478
16487
|
/* @__PURE__ */ e(pn, { placeholder: "Search chart types..." }),
|
|
16479
16488
|
/* @__PURE__ */ s(fn, { className: "mb-2 max-h-[300px]", children: [
|
|
16480
16489
|
/* @__PURE__ */ e(gn, { children: "No chart type found." }),
|
|
16481
|
-
p.map((
|
|
16482
|
-
if (
|
|
16490
|
+
p.map((b) => {
|
|
16491
|
+
if (b === "default")
|
|
16483
16492
|
return /* @__PURE__ */ e(
|
|
16484
16493
|
fa,
|
|
16485
16494
|
{
|
|
@@ -16520,7 +16529,7 @@ function $h({
|
|
|
16520
16529
|
},
|
|
16521
16530
|
"default"
|
|
16522
16531
|
);
|
|
16523
|
-
if (
|
|
16532
|
+
if (b === "standardPlugin") {
|
|
16524
16533
|
const k = l.filter(
|
|
16525
16534
|
(N) => N.pluginType === "standard"
|
|
16526
16535
|
);
|
|
@@ -16557,7 +16566,7 @@ function $h({
|
|
|
16557
16566
|
"standardPlugin"
|
|
16558
16567
|
) : null;
|
|
16559
16568
|
}
|
|
16560
|
-
if (
|
|
16569
|
+
if (b === "customPlugin") {
|
|
16561
16570
|
const k = l.filter(
|
|
16562
16571
|
(N) => N.pluginType === "custom"
|
|
16563
16572
|
);
|
|
@@ -16934,19 +16943,19 @@ function Hh({
|
|
|
16934
16943
|
id: (l == null ? void 0 : l.id) || Nt(),
|
|
16935
16944
|
field: (l == null ? void 0 : l.field) || null,
|
|
16936
16945
|
selectedValues: l ? Array.isArray(l.value) ? l.value : [l.value] : []
|
|
16937
|
-
}), x = n.filter((
|
|
16946
|
+
}), x = n.filter((b) => {
|
|
16938
16947
|
var N;
|
|
16939
16948
|
return c ? !1 : !((N = r == null ? void 0 : r.conditions) == null ? void 0 : N.some(
|
|
16940
|
-
(D) => D.field.id ===
|
|
16941
|
-
)) &&
|
|
16942
|
-
}), y = (
|
|
16949
|
+
(D) => D.field.id === b.id
|
|
16950
|
+
)) && b.label.toLowerCase().includes(d.toLowerCase());
|
|
16951
|
+
}), y = (b) => {
|
|
16943
16952
|
g({
|
|
16944
16953
|
...h,
|
|
16945
|
-
field:
|
|
16954
|
+
field: b
|
|
16946
16955
|
}), u("values");
|
|
16947
16956
|
}, p = () => {
|
|
16948
16957
|
if (h.field && h.selectedValues.length > 0) {
|
|
16949
|
-
const
|
|
16958
|
+
const b = {
|
|
16950
16959
|
id: h.id,
|
|
16951
16960
|
field: h.field,
|
|
16952
16961
|
operator: "in",
|
|
@@ -16955,7 +16964,7 @@ function Hh({
|
|
|
16955
16964
|
let k;
|
|
16956
16965
|
if (c) {
|
|
16957
16966
|
const N = ((r == null ? void 0 : r.conditions) || []).map(
|
|
16958
|
-
(D) => D.id === l.id ?
|
|
16967
|
+
(D) => D.id === l.id ? b : D
|
|
16959
16968
|
);
|
|
16960
16969
|
k = {
|
|
16961
16970
|
...r,
|
|
@@ -16967,7 +16976,7 @@ function Hh({
|
|
|
16967
16976
|
id: (r == null ? void 0 : r.id) || Nt(),
|
|
16968
16977
|
logicalOperator: "AND",
|
|
16969
16978
|
negate: !1,
|
|
16970
|
-
conditions: [...N,
|
|
16979
|
+
conditions: [...N, b],
|
|
16971
16980
|
groups: []
|
|
16972
16981
|
};
|
|
16973
16982
|
}
|
|
@@ -16975,24 +16984,24 @@ function Hh({
|
|
|
16975
16984
|
}
|
|
16976
16985
|
}, v = () => {
|
|
16977
16986
|
if (!c || !l) return;
|
|
16978
|
-
const
|
|
16987
|
+
const b = ((r == null ? void 0 : r.conditions) || []).filter(
|
|
16979
16988
|
(k) => k.id !== l.id
|
|
16980
16989
|
);
|
|
16981
|
-
if (
|
|
16990
|
+
if (b.length > 0) {
|
|
16982
16991
|
const k = {
|
|
16983
16992
|
...r,
|
|
16984
|
-
conditions:
|
|
16993
|
+
conditions: b
|
|
16985
16994
|
};
|
|
16986
16995
|
i(k);
|
|
16987
16996
|
} else
|
|
16988
16997
|
i(void 0);
|
|
16989
16998
|
a(!1);
|
|
16990
|
-
}, f = (
|
|
16999
|
+
}, f = (b) => {
|
|
16991
17000
|
g({
|
|
16992
17001
|
...h,
|
|
16993
|
-
selectedValues:
|
|
17002
|
+
selectedValues: b
|
|
16994
17003
|
});
|
|
16995
|
-
},
|
|
17004
|
+
}, C = () => {
|
|
16996
17005
|
c && l ? (g({
|
|
16997
17006
|
id: l.id,
|
|
16998
17007
|
field: l.field,
|
|
@@ -17004,25 +17013,25 @@ function Hh({
|
|
|
17004
17013
|
}), u("fields")), m("");
|
|
17005
17014
|
};
|
|
17006
17015
|
return Te(() => {
|
|
17007
|
-
t &&
|
|
17016
|
+
t && C();
|
|
17008
17017
|
}, [t, c, l]), /* @__PURE__ */ e(zt, { open: t, onOpenChange: a, children: /* @__PURE__ */ s(Lt, { className: "max-w-2xl", children: [
|
|
17009
17018
|
/* @__PURE__ */ e(Pt, { children: /* @__PURE__ */ e(_t, { children: c ? `Edit Filter: ${(T = h.field) == null ? void 0 : T.label}` : o === "fields" ? "Select Field to Filter" : `Select Values for ${(F = h.field) == null ? void 0 : F.label}` }) }),
|
|
17010
17019
|
/* @__PURE__ */ s("div", { className: "space-y-4", children: [
|
|
17011
17020
|
!c && (r == null ? void 0 : r.conditions) && r.conditions.length > 0 && o === "fields" && /* @__PURE__ */ s("div", { className: "space-y-2", children: [
|
|
17012
17021
|
/* @__PURE__ */ e(B, { className: "text-xs font-medium text-muted-foreground", children: "Current Filters:" }),
|
|
17013
|
-
/* @__PURE__ */ e("div", { className: "flex flex-wrap gap-2", children: r.conditions.map((
|
|
17022
|
+
/* @__PURE__ */ e("div", { className: "flex flex-wrap gap-2", children: r.conditions.map((b) => /* @__PURE__ */ s(
|
|
17014
17023
|
"div",
|
|
17015
17024
|
{
|
|
17016
17025
|
className: "flex items-center gap-1 px-2 py-1 bg-muted rounded-md text-xs",
|
|
17017
17026
|
children: [
|
|
17018
17027
|
/* @__PURE__ */ s("span", { className: "font-medium", children: [
|
|
17019
|
-
|
|
17028
|
+
b.field.label,
|
|
17020
17029
|
":"
|
|
17021
17030
|
] }),
|
|
17022
|
-
/* @__PURE__ */ e("span", { className: "text-muted-foreground", children: Array.isArray(
|
|
17031
|
+
/* @__PURE__ */ e("span", { className: "text-muted-foreground", children: Array.isArray(b.value) ? `${b.value.length} values` : String(b.value) })
|
|
17023
17032
|
]
|
|
17024
17033
|
},
|
|
17025
|
-
|
|
17034
|
+
b.id
|
|
17026
17035
|
)) })
|
|
17027
17036
|
] }),
|
|
17028
17037
|
o === "fields" && !c ? /* @__PURE__ */ s("div", { className: "space-y-4", children: [
|
|
@@ -17033,30 +17042,30 @@ function Hh({
|
|
|
17033
17042
|
{
|
|
17034
17043
|
placeholder: "Search fields...",
|
|
17035
17044
|
value: d,
|
|
17036
|
-
onChange: (
|
|
17045
|
+
onChange: (b) => m(b.target.value),
|
|
17037
17046
|
className: "pl-10"
|
|
17038
17047
|
}
|
|
17039
17048
|
)
|
|
17040
17049
|
] }),
|
|
17041
|
-
/* @__PURE__ */ e("div", { className: "grid grid-cols-2 gap-2 max-h-[400px] overflow-y-auto", children: x.map((
|
|
17050
|
+
/* @__PURE__ */ e("div", { className: "grid grid-cols-2 gap-2 max-h-[400px] overflow-y-auto", children: x.map((b) => /* @__PURE__ */ s(
|
|
17042
17051
|
V,
|
|
17043
17052
|
{
|
|
17044
17053
|
variant: "outline",
|
|
17045
17054
|
className: "justify-start h-auto py-2 px-3",
|
|
17046
|
-
onClick: () => y(
|
|
17055
|
+
onClick: () => y(b),
|
|
17047
17056
|
children: [
|
|
17048
|
-
/* @__PURE__ */ e(mr, { dataType: Le(
|
|
17057
|
+
/* @__PURE__ */ e(mr, { dataType: Le(b.dataType) }),
|
|
17049
17058
|
/* @__PURE__ */ s("div", { className: "ml-2 text-left", children: [
|
|
17050
|
-
/* @__PURE__ */ e("div", { className: "text-sm font-medium", children:
|
|
17059
|
+
/* @__PURE__ */ e("div", { className: "text-sm font-medium", children: b.label }),
|
|
17051
17060
|
/* @__PURE__ */ s("div", { className: "text-xs text-muted-foreground", children: [
|
|
17052
|
-
|
|
17061
|
+
b.entityName,
|
|
17053
17062
|
".",
|
|
17054
|
-
|
|
17063
|
+
b.name
|
|
17055
17064
|
] })
|
|
17056
17065
|
] })
|
|
17057
17066
|
]
|
|
17058
17067
|
},
|
|
17059
|
-
|
|
17068
|
+
b.id
|
|
17060
17069
|
)) }),
|
|
17061
17070
|
x.length === 0 && d && /* @__PURE__ */ s("div", { className: "text-center py-4 text-sm text-muted-foreground", children: [
|
|
17062
17071
|
'No fields found matching "',
|
|
@@ -17074,7 +17083,7 @@ function Hh({
|
|
|
17074
17083
|
}
|
|
17075
17084
|
),
|
|
17076
17085
|
/* @__PURE__ */ s("div", { className: "flex justify-between pt-4 border-t", children: [
|
|
17077
|
-
/* @__PURE__ */ e("div", { children: c ? /* @__PURE__ */ e(V, { variant: "destructive", onClick: v, children: "Delete Filter" }) : /* @__PURE__ */ e(V, { variant: "outline", onClick:
|
|
17086
|
+
/* @__PURE__ */ e("div", { children: c ? /* @__PURE__ */ e(V, { variant: "destructive", onClick: v, children: "Delete Filter" }) : /* @__PURE__ */ e(V, { variant: "outline", onClick: C, children: "Reset" }) }),
|
|
17078
17087
|
/* @__PURE__ */ s("div", { className: "flex gap-2", children: [
|
|
17079
17088
|
/* @__PURE__ */ e(V, { variant: "outline", onClick: () => a(!1), children: "Cancel" }),
|
|
17080
17089
|
/* @__PURE__ */ e(
|
|
@@ -17190,10 +17199,10 @@ function Xh({
|
|
|
17190
17199
|
handleAggregationChange: p,
|
|
17191
17200
|
handleDateFormatChange: v,
|
|
17192
17201
|
handleGranularityChange: f,
|
|
17193
|
-
handleAliasTemplateChange:
|
|
17202
|
+
handleAliasTemplateChange: C,
|
|
17194
17203
|
handleValueAliasesChange: T,
|
|
17195
17204
|
removeField: F,
|
|
17196
|
-
handleKpiComparisonTypeChange:
|
|
17205
|
+
handleKpiComparisonTypeChange: b,
|
|
17197
17206
|
handleKpiShowTrendlineChange: k,
|
|
17198
17207
|
handleKpiTrendlineWindowChange: N,
|
|
17199
17208
|
handleKpiTrendlineGranularityChange: D,
|
|
@@ -17216,7 +17225,7 @@ function Xh({
|
|
|
17216
17225
|
const ze = (Je = fe(H)[0]) == null ? void 0 : Je.value;
|
|
17217
17226
|
ze && !U && (R(ze), a === "groupBy" && v(n, ze, "")), a === "groupBy" && f(n, H);
|
|
17218
17227
|
}, de = (H) => {
|
|
17219
|
-
J(H), a === "metrics" &&
|
|
17228
|
+
J(H), a === "metrics" && C(n, H);
|
|
17220
17229
|
}, Ee = (H) => {
|
|
17221
17230
|
oe(H), a === "metrics" && T(n, H);
|
|
17222
17231
|
}, Z = (H) => {
|
|
@@ -17304,10 +17313,11 @@ function Xh({
|
|
|
17304
17313
|
}, xe = fe(ie), qe = a !== "pivotBy", gt = ft && a === "groupBy", vn = !lt && ft && a === "groupBy", Nn = lt && ft && a === "groupBy", bn = lt && a === "metrics" && ((gr = x.config) == null ? void 0 : gr.comparisonType) === "target", Wa = a === "metrics", Yt = () => /* @__PURE__ */ e(
|
|
17305
17314
|
"div",
|
|
17306
17315
|
{
|
|
17316
|
+
title: `${t.entityName}.${t.name}`,
|
|
17307
17317
|
onPointerDown: (H) => {
|
|
17308
17318
|
H.stopPropagation();
|
|
17309
17319
|
},
|
|
17310
|
-
className: "cursor-default overflow-hidden text-ellipsis whitespace-nowrap px-0.5 text-xs text-gray-500",
|
|
17320
|
+
className: "max-w-[270px] cursor-default overflow-hidden text-ellipsis whitespace-nowrap px-0.5 text-xs text-gray-500",
|
|
17311
17321
|
children: `${t.entityName}.${t.name}`
|
|
17312
17322
|
}
|
|
17313
17323
|
), Ye = () => qe ? /* @__PURE__ */ s("div", { className: "space-y-1", children: [
|
|
@@ -17382,7 +17392,7 @@ function Xh({
|
|
|
17382
17392
|
ue,
|
|
17383
17393
|
{
|
|
17384
17394
|
value: ((H = x.config) == null ? void 0 : H.comparisonType) || "none",
|
|
17385
|
-
onValueChange:
|
|
17395
|
+
onValueChange: b,
|
|
17386
17396
|
children: [
|
|
17387
17397
|
/* @__PURE__ */ e(me, { className: "h-8 w-full text-xs", children: /* @__PURE__ */ e(he, { placeholder: "Select comparison type..." }) }),
|
|
17388
17398
|
/* @__PURE__ */ s(pe, { children: [
|
|
@@ -17822,7 +17832,7 @@ function Dn({
|
|
|
17822
17832
|
}), { updateSortByColumn: u } = re(), d = E((y) => y.card), m = E((y) => y.card.type), h = a.length > 0, g = (y, p) => {
|
|
17823
17833
|
var f;
|
|
17824
17834
|
!((f = d.config) != null && f.sortByColumns) || d.config.sortByColumns.findIndex(
|
|
17825
|
-
(
|
|
17835
|
+
(C) => C.id === y
|
|
17826
17836
|
) === -1 || u(d.id, y, { direction: p });
|
|
17827
17837
|
};
|
|
17828
17838
|
if (t === "sortBy" && l === !1)
|
|
@@ -17866,7 +17876,7 @@ function Dn({
|
|
|
17866
17876
|
zone: t,
|
|
17867
17877
|
index: p,
|
|
17868
17878
|
sortDirection: f,
|
|
17869
|
-
onSortDirectionChange: (
|
|
17879
|
+
onSortDirectionChange: (C) => g(y.id, C),
|
|
17870
17880
|
hasPivotColumns: i,
|
|
17871
17881
|
cardType: m
|
|
17872
17882
|
}
|
|
@@ -18010,7 +18020,7 @@ function tp() {
|
|
|
18010
18020
|
return null;
|
|
18011
18021
|
const i = ((m = (d = t.preferences) == null ? void 0 : d.kpiVisualOptions) == null ? void 0 : m.metricComparison) || {}, c = (f) => {
|
|
18012
18022
|
var T;
|
|
18013
|
-
const
|
|
18023
|
+
const C = {
|
|
18014
18024
|
...t.preferences,
|
|
18015
18025
|
kpiVisualOptions: {
|
|
18016
18026
|
...(T = t.preferences) == null ? void 0 : T.kpiVisualOptions,
|
|
@@ -18020,7 +18030,7 @@ function tp() {
|
|
|
18020
18030
|
}
|
|
18021
18031
|
}
|
|
18022
18032
|
};
|
|
18023
|
-
a(
|
|
18033
|
+
a(C);
|
|
18024
18034
|
};
|
|
18025
18035
|
return /* @__PURE__ */ s(Ce, { value: "comparison", className: "border-none", children: [
|
|
18026
18036
|
/* @__PURE__ */ e(we, { className: "flex items-center gap-2 py-2 text-sm hover:no-underline", children: /* @__PURE__ */ s("div", { className: "flex items-center gap-2", children: [
|
|
@@ -18062,15 +18072,15 @@ function tp() {
|
|
|
18062
18072
|
}),
|
|
18063
18073
|
children: [
|
|
18064
18074
|
/* @__PURE__ */ e(me, { id: "calculation-type", className: "h-7 text-xs", children: /* @__PURE__ */ e(he, {}) }),
|
|
18065
|
-
/* @__PURE__ */ e(pe, { children: Object.entries(Mn).map(([f,
|
|
18075
|
+
/* @__PURE__ */ e(pe, { children: Object.entries(Mn).map(([f, C]) => /* @__PURE__ */ e(Q, { value: f, className: "text-xs", children: C.label }, f)) })
|
|
18066
18076
|
]
|
|
18067
18077
|
}
|
|
18068
18078
|
),
|
|
18069
18079
|
(() => {
|
|
18070
|
-
var
|
|
18080
|
+
var C, T, F;
|
|
18071
18081
|
const f = i.calculationType || "difference";
|
|
18072
18082
|
return /* @__PURE__ */ s("div", { className: "space-y-2 rounded-md bg-muted/50 p-2 text-xs", children: [
|
|
18073
|
-
/* @__PURE__ */ e("p", { className: "text-muted-foreground", children: (
|
|
18083
|
+
/* @__PURE__ */ e("p", { className: "text-muted-foreground", children: (C = Mn[f]) == null ? void 0 : C.description }),
|
|
18074
18084
|
/* @__PURE__ */ s("div", { className: "text-muted-foreground", children: [
|
|
18075
18085
|
/* @__PURE__ */ e("span", { className: "font-medium", children: "Formula:" }),
|
|
18076
18086
|
" ",
|
|
@@ -18539,7 +18549,7 @@ function rp({
|
|
|
18539
18549
|
groups: []
|
|
18540
18550
|
}
|
|
18541
18551
|
);
|
|
18542
|
-
E((
|
|
18552
|
+
E((b) => b.card.dataSource);
|
|
18543
18553
|
const { columns: l, isLoading: i } = Ga(), o = a || l || [], u = {
|
|
18544
18554
|
id: "default",
|
|
18545
18555
|
qualifiedFieldName: "default",
|
|
@@ -18549,9 +18559,9 @@ function rp({
|
|
|
18549
18559
|
entityId: "default",
|
|
18550
18560
|
entityName: "Default",
|
|
18551
18561
|
entityType: "table"
|
|
18552
|
-
}, d = (
|
|
18562
|
+
}, d = (b) => {
|
|
18553
18563
|
const k = (N) => {
|
|
18554
|
-
if (N.id ===
|
|
18564
|
+
if (N.id === b) {
|
|
18555
18565
|
const D = o[0] || u, w = Le(D.dataType) === "date";
|
|
18556
18566
|
return {
|
|
18557
18567
|
...N,
|
|
@@ -18572,9 +18582,9 @@ function rp({
|
|
|
18572
18582
|
};
|
|
18573
18583
|
};
|
|
18574
18584
|
r(k(n));
|
|
18575
|
-
}, m = (
|
|
18585
|
+
}, m = (b) => {
|
|
18576
18586
|
const k = (N) => {
|
|
18577
|
-
if (N.id ===
|
|
18587
|
+
if (N.id === b) {
|
|
18578
18588
|
const D = o[0] || u, w = Le(D.dataType) === "date";
|
|
18579
18589
|
return {
|
|
18580
18590
|
...N,
|
|
@@ -18603,8 +18613,8 @@ function rp({
|
|
|
18603
18613
|
};
|
|
18604
18614
|
};
|
|
18605
18615
|
r(k(n));
|
|
18606
|
-
}, h = (
|
|
18607
|
-
const N = (D) => D.id ===
|
|
18616
|
+
}, h = (b, k) => {
|
|
18617
|
+
const N = (D) => D.id === b ? {
|
|
18608
18618
|
...D,
|
|
18609
18619
|
conditions: D.conditions.filter((w) => w.id !== k)
|
|
18610
18620
|
} : {
|
|
@@ -18612,8 +18622,8 @@ function rp({
|
|
|
18612
18622
|
groups: D.groups.map(N)
|
|
18613
18623
|
};
|
|
18614
18624
|
r(N(n));
|
|
18615
|
-
}, g = (
|
|
18616
|
-
const N = (D) => D.id ===
|
|
18625
|
+
}, g = (b, k) => {
|
|
18626
|
+
const N = (D) => D.id === b ? {
|
|
18617
18627
|
...D,
|
|
18618
18628
|
groups: D.groups.filter((w) => w.id !== k)
|
|
18619
18629
|
} : {
|
|
@@ -18621,12 +18631,12 @@ function rp({
|
|
|
18621
18631
|
groups: D.groups.map(N)
|
|
18622
18632
|
};
|
|
18623
18633
|
r(N(n));
|
|
18624
|
-
}, x = (
|
|
18634
|
+
}, x = (b, k, N, D) => {
|
|
18625
18635
|
if (N === "field")
|
|
18626
18636
|
throw new Error(
|
|
18627
18637
|
"Use a dedicated method to update the field property with a Field object"
|
|
18628
18638
|
);
|
|
18629
|
-
const w = (I) => I.id ===
|
|
18639
|
+
const w = (I) => I.id === b ? {
|
|
18630
18640
|
...I,
|
|
18631
18641
|
conditions: I.conditions.map((S) => S.id === k ? {
|
|
18632
18642
|
...S,
|
|
@@ -18637,8 +18647,8 @@ function rp({
|
|
|
18637
18647
|
groups: I.groups.map(w)
|
|
18638
18648
|
};
|
|
18639
18649
|
r(w(n));
|
|
18640
|
-
}, y = (
|
|
18641
|
-
const D = (w) => w.id ===
|
|
18650
|
+
}, y = (b, k, N) => {
|
|
18651
|
+
const D = (w) => w.id === b ? {
|
|
18642
18652
|
...w,
|
|
18643
18653
|
conditions: w.conditions.map((I) => I.id === k ? { ...I, ...N } : I)
|
|
18644
18654
|
} : {
|
|
@@ -18646,8 +18656,8 @@ function rp({
|
|
|
18646
18656
|
groups: w.groups.map(D)
|
|
18647
18657
|
};
|
|
18648
18658
|
r(D(n));
|
|
18649
|
-
}, p = (
|
|
18650
|
-
const N = (D) => D.id ===
|
|
18659
|
+
}, p = (b, k) => {
|
|
18660
|
+
const N = (D) => D.id === b ? {
|
|
18651
18661
|
...D,
|
|
18652
18662
|
logicalOperator: k
|
|
18653
18663
|
} : {
|
|
@@ -18655,8 +18665,8 @@ function rp({
|
|
|
18655
18665
|
groups: D.groups.map(N)
|
|
18656
18666
|
};
|
|
18657
18667
|
r(N(n));
|
|
18658
|
-
}, v = (
|
|
18659
|
-
const N = (D) => D.id ===
|
|
18668
|
+
}, v = (b, k) => {
|
|
18669
|
+
const N = (D) => D.id === b ? {
|
|
18660
18670
|
...D,
|
|
18661
18671
|
negate: k
|
|
18662
18672
|
} : {
|
|
@@ -18664,8 +18674,8 @@ function rp({
|
|
|
18664
18674
|
groups: D.groups.map(N)
|
|
18665
18675
|
};
|
|
18666
18676
|
r(N(n));
|
|
18667
|
-
}, f = (
|
|
18668
|
-
const D = (w) => w.id ===
|
|
18677
|
+
}, f = (b, k, N) => {
|
|
18678
|
+
const D = (w) => w.id === b ? {
|
|
18669
18679
|
...w,
|
|
18670
18680
|
conditions: hs(w.conditions, k, N)
|
|
18671
18681
|
} : {
|
|
@@ -18673,8 +18683,8 @@ function rp({
|
|
|
18673
18683
|
groups: w.groups.map(D)
|
|
18674
18684
|
};
|
|
18675
18685
|
r(D(n));
|
|
18676
|
-
},
|
|
18677
|
-
const D = (w) => w.id ===
|
|
18686
|
+
}, C = (b, k, N) => {
|
|
18687
|
+
const D = (w) => w.id === b ? {
|
|
18678
18688
|
...w,
|
|
18679
18689
|
groups: hs(w.groups, k, N)
|
|
18680
18690
|
} : {
|
|
@@ -18682,8 +18692,8 @@ function rp({
|
|
|
18682
18692
|
groups: w.groups.map(D)
|
|
18683
18693
|
};
|
|
18684
18694
|
r(D(n));
|
|
18685
|
-
}, T = (
|
|
18686
|
-
if (!
|
|
18695
|
+
}, T = (b) => {
|
|
18696
|
+
if (!b || b.conditions.length === 0 && b.groups.length === 0)
|
|
18687
18697
|
return "-- No filters defined";
|
|
18688
18698
|
const k = (D) => {
|
|
18689
18699
|
let w = "";
|
|
@@ -18731,7 +18741,7 @@ function rp({
|
|
|
18731
18741
|
const z = S.join(` ${D.logicalOperator} `), M = S.length > 1 ? `(${z})` : z;
|
|
18732
18742
|
return D.negate ? `NOT ${M}` : M;
|
|
18733
18743
|
};
|
|
18734
|
-
return N(
|
|
18744
|
+
return N(b);
|
|
18735
18745
|
}, F = n.conditions.length > 0 || n.groups.length > 0;
|
|
18736
18746
|
return {
|
|
18737
18747
|
currentFilters: n,
|
|
@@ -18747,7 +18757,7 @@ function rp({
|
|
|
18747
18757
|
updateGroupOperator: p,
|
|
18748
18758
|
updateGroupNegate: v,
|
|
18749
18759
|
reorderConditions: f,
|
|
18750
|
-
reorderGroups:
|
|
18760
|
+
reorderGroups: C,
|
|
18751
18761
|
generateSQLPreview: T,
|
|
18752
18762
|
hasAnyFilters: F
|
|
18753
18763
|
};
|
|
@@ -19218,7 +19228,7 @@ function Ii({
|
|
|
19218
19228
|
ue,
|
|
19219
19229
|
{
|
|
19220
19230
|
value: r,
|
|
19221
|
-
onValueChange: (
|
|
19231
|
+
onValueChange: (C) => c(n, C),
|
|
19222
19232
|
children: [
|
|
19223
19233
|
/* @__PURE__ */ e(me, { className: "w-24", children: /* @__PURE__ */ e(he, {}) }),
|
|
19224
19234
|
/* @__PURE__ */ s(pe, { children: [
|
|
@@ -19233,8 +19243,8 @@ function Ii({
|
|
|
19233
19243
|
cp,
|
|
19234
19244
|
{
|
|
19235
19245
|
value: t.field,
|
|
19236
|
-
onValueChange: (
|
|
19237
|
-
const T =
|
|
19246
|
+
onValueChange: (C) => {
|
|
19247
|
+
const T = C, F = Le(T.dataType) === "date";
|
|
19238
19248
|
u(n, t.id, {
|
|
19239
19249
|
field: T,
|
|
19240
19250
|
value: "",
|
|
@@ -19251,22 +19261,22 @@ function Ii({
|
|
|
19251
19261
|
ue,
|
|
19252
19262
|
{
|
|
19253
19263
|
value: t.operator,
|
|
19254
|
-
onValueChange: (
|
|
19255
|
-
|
|
19256
|
-
operator:
|
|
19264
|
+
onValueChange: (C) => {
|
|
19265
|
+
C === "in" || C === "not in" ? u(n, t.id, {
|
|
19266
|
+
operator: C,
|
|
19257
19267
|
value: []
|
|
19258
|
-
}) :
|
|
19259
|
-
operator:
|
|
19268
|
+
}) : C === "isNull" || C === "isNotNull" ? u(n, t.id, {
|
|
19269
|
+
operator: C,
|
|
19260
19270
|
value: null
|
|
19261
19271
|
}) : u(n, t.id, {
|
|
19262
|
-
operator:
|
|
19272
|
+
operator: C,
|
|
19263
19273
|
value: ""
|
|
19264
19274
|
});
|
|
19265
19275
|
},
|
|
19266
19276
|
children: [
|
|
19267
|
-
/* @__PURE__ */ e(me, { className: "w-
|
|
19277
|
+
/* @__PURE__ */ e(me, { className: "w-32", children: /* @__PURE__ */ e(he, { children: t.operator ? Wr(t.operator) : "" }) }),
|
|
19268
19278
|
/* @__PURE__ */ e(pe, { children: vp(Le(t.field.dataType)).map(
|
|
19269
|
-
(
|
|
19279
|
+
(C) => /* @__PURE__ */ e(Q, { className: "hover:bg-muted", value: C, children: Wr(C) }, C)
|
|
19270
19280
|
) })
|
|
19271
19281
|
]
|
|
19272
19282
|
}
|
|
@@ -19278,9 +19288,9 @@ function Ii({
|
|
|
19278
19288
|
dp,
|
|
19279
19289
|
{
|
|
19280
19290
|
field: t.field,
|
|
19281
|
-
selected: Array.isArray(t.value) && t.value.every((
|
|
19282
|
-
onChange: (
|
|
19283
|
-
value:
|
|
19291
|
+
selected: Array.isArray(t.value) && t.value.every((C) => typeof C == "string") ? t.value : [],
|
|
19292
|
+
onChange: (C) => u(n, t.id, {
|
|
19293
|
+
value: C
|
|
19284
19294
|
}),
|
|
19285
19295
|
placeholder: `Select values for ${t.operator}...`,
|
|
19286
19296
|
className: "flex-1"
|
|
@@ -19291,8 +19301,8 @@ function Ii({
|
|
|
19291
19301
|
Re,
|
|
19292
19302
|
{
|
|
19293
19303
|
value: typeof t.value == "string" ? t.value : "",
|
|
19294
|
-
onChange: (
|
|
19295
|
-
value:
|
|
19304
|
+
onChange: (C) => u(n, t.id, {
|
|
19305
|
+
value: C.target.value
|
|
19296
19306
|
}),
|
|
19297
19307
|
className: "flex-1",
|
|
19298
19308
|
placeholder: t.operator.charAt(0).toUpperCase() + t.operator.slice(1) + "..."
|
|
@@ -19302,7 +19312,7 @@ function Ii({
|
|
|
19302
19312
|
{
|
|
19303
19313
|
field: t.field,
|
|
19304
19314
|
value: typeof t.value == "string" ? t.value : "",
|
|
19305
|
-
onChange: (
|
|
19315
|
+
onChange: (C) => u(n, t.id, { value: C }),
|
|
19306
19316
|
placeholder: "Select value...",
|
|
19307
19317
|
className: "flex-1"
|
|
19308
19318
|
}
|
|
@@ -19310,8 +19320,8 @@ function Ii({
|
|
|
19310
19320
|
ue,
|
|
19311
19321
|
{
|
|
19312
19322
|
value: typeof t.value == "boolean" ? String(t.value) : "",
|
|
19313
|
-
onValueChange: (
|
|
19314
|
-
value:
|
|
19323
|
+
onValueChange: (C) => u(n, t.id, {
|
|
19324
|
+
value: C === "true"
|
|
19315
19325
|
}),
|
|
19316
19326
|
children: [
|
|
19317
19327
|
/* @__PURE__ */ e(me, { className: "flex-1", children: /* @__PURE__ */ e(he, { placeholder: "Select value..." }) }),
|
|
@@ -19331,7 +19341,7 @@ function Ii({
|
|
|
19331
19341
|
{
|
|
19332
19342
|
value: t.value,
|
|
19333
19343
|
operator: t.operator,
|
|
19334
|
-
onChange: (
|
|
19344
|
+
onChange: (C) => u(n, t.id, { value: C }),
|
|
19335
19345
|
className: "flex-1"
|
|
19336
19346
|
}
|
|
19337
19347
|
)
|
|
@@ -19339,7 +19349,7 @@ function Ii({
|
|
|
19339
19349
|
Re,
|
|
19340
19350
|
{
|
|
19341
19351
|
value: typeof t.value == "string" || typeof t.value == "number" ? t.value : "",
|
|
19342
|
-
onChange: (
|
|
19352
|
+
onChange: (C) => l(n, t.id, "value", C.target.value),
|
|
19343
19353
|
className: "flex-1",
|
|
19344
19354
|
placeholder: t.operator === "in" || t.operator === "not in" ? "value1, value2, value3" : "Value"
|
|
19345
19355
|
}
|
|
@@ -19379,10 +19389,10 @@ function Np({
|
|
|
19379
19389
|
const {
|
|
19380
19390
|
attributes: v,
|
|
19381
19391
|
listeners: f,
|
|
19382
|
-
setNodeRef:
|
|
19392
|
+
setNodeRef: C,
|
|
19383
19393
|
transform: T,
|
|
19384
19394
|
transition: F,
|
|
19385
|
-
isDragging:
|
|
19395
|
+
isDragging: b
|
|
19386
19396
|
} = Ya({ id: t.id }), k = {
|
|
19387
19397
|
transform: sa.Transform.toString(T),
|
|
19388
19398
|
transition: F
|
|
@@ -19406,9 +19416,9 @@ function Np({
|
|
|
19406
19416
|
return /* @__PURE__ */ s(
|
|
19407
19417
|
"div",
|
|
19408
19418
|
{
|
|
19409
|
-
ref:
|
|
19419
|
+
ref: C,
|
|
19410
19420
|
style: k,
|
|
19411
|
-
className: `rounded-lg ${a > 0 ? "mt-2 border border-border" : ""} ${
|
|
19421
|
+
className: `rounded-lg ${a > 0 ? "mt-2 border border-border" : ""} ${b ? "z-50 opacity-50" : ""}`,
|
|
19412
19422
|
children: [
|
|
19413
19423
|
a > 0 && /* @__PURE__ */ s("div", { className: "flex items-center justify-between rounded-t-lg bg-muted p-2", children: [
|
|
19414
19424
|
/* @__PURE__ */ s("div", { className: "flex items-center gap-2", children: [
|
|
@@ -19572,13 +19582,13 @@ function bp({
|
|
|
19572
19582
|
updateGroupNegate: p,
|
|
19573
19583
|
reorderConditions: v,
|
|
19574
19584
|
reorderGroups: f,
|
|
19575
|
-
generateSQLPreview:
|
|
19585
|
+
generateSQLPreview: C,
|
|
19576
19586
|
hasAnyFilters: T,
|
|
19577
19587
|
setCurrentFilters: F
|
|
19578
19588
|
} = rp({
|
|
19579
19589
|
initialFilters: t,
|
|
19580
19590
|
availableFields: a
|
|
19581
|
-
}),
|
|
19591
|
+
}), b = Xa(
|
|
19582
19592
|
Jt(Rn),
|
|
19583
19593
|
Jt(fs, {
|
|
19584
19594
|
coordinateGetter: ps
|
|
@@ -19600,7 +19610,7 @@ function bp({
|
|
|
19600
19610
|
/* @__PURE__ */ e(
|
|
19601
19611
|
La,
|
|
19602
19612
|
{
|
|
19603
|
-
sensors:
|
|
19613
|
+
sensors: b,
|
|
19604
19614
|
collisionDetection: tn,
|
|
19605
19615
|
onDragEnd: (A) => {
|
|
19606
19616
|
const { active: O, over: P } = A;
|
|
@@ -19641,7 +19651,7 @@ function bp({
|
|
|
19641
19651
|
/* @__PURE__ */ e(
|
|
19642
19652
|
La,
|
|
19643
19653
|
{
|
|
19644
|
-
sensors:
|
|
19654
|
+
sensors: b,
|
|
19645
19655
|
collisionDetection: tn,
|
|
19646
19656
|
onDragEnd: (A) => {
|
|
19647
19657
|
const { active: O, over: P } = A;
|
|
@@ -19742,7 +19752,7 @@ function bp({
|
|
|
19742
19752
|
] }) }),
|
|
19743
19753
|
T && /* @__PURE__ */ s("div", { className: "mt-4 border-t border-border pt-4", children: [
|
|
19744
19754
|
/* @__PURE__ */ e("div", { className: "mb-2 text-xs font-medium text-muted-foreground", children: "SQL WHERE Clause Preview" }),
|
|
19745
|
-
/* @__PURE__ */ e("div", { className: "overflow-x-auto rounded-md border bg-muted p-3", children: /* @__PURE__ */ e("pre", { className: "whitespace-pre-wrap font-mono text-xs text-muted-foreground", children:
|
|
19755
|
+
/* @__PURE__ */ e("div", { className: "overflow-x-auto rounded-md border bg-muted p-3", children: /* @__PURE__ */ e("pre", { className: "whitespace-pre-wrap font-mono text-xs text-muted-foreground", children: C(i) }) })
|
|
19746
19756
|
] })
|
|
19747
19757
|
] }) }) }),
|
|
19748
19758
|
/* @__PURE__ */ s("div", { className: "flex justify-end gap-2", children: [
|
|
@@ -19826,18 +19836,18 @@ function wp({
|
|
|
19826
19836
|
i(null);
|
|
19827
19837
|
return;
|
|
19828
19838
|
}
|
|
19829
|
-
const f = p.id,
|
|
19839
|
+
const f = p.id, C = v.id, T = d(f), F = d(C) || C;
|
|
19830
19840
|
if (F === "sortBy") {
|
|
19831
19841
|
if (T === "source") {
|
|
19832
|
-
const
|
|
19833
|
-
if (!
|
|
19842
|
+
const b = a.find((N) => N.id === f);
|
|
19843
|
+
if (!b) {
|
|
19834
19844
|
i(null);
|
|
19835
19845
|
return;
|
|
19836
19846
|
}
|
|
19837
19847
|
if (!(n("groupBy").some(
|
|
19838
|
-
(N) => N.name ===
|
|
19848
|
+
(N) => N.name === b.name && N.qualifiedEntityName === b.qualifiedEntityName
|
|
19839
19849
|
) || n("metrics").some(
|
|
19840
|
-
(N) => N.name ===
|
|
19850
|
+
(N) => N.name === b.name && N.qualifiedEntityName === b.qualifiedEntityName
|
|
19841
19851
|
))) {
|
|
19842
19852
|
i(null);
|
|
19843
19853
|
return;
|
|
@@ -19851,18 +19861,18 @@ function wp({
|
|
|
19851
19861
|
}
|
|
19852
19862
|
}
|
|
19853
19863
|
if (T === "source" && F === "sortBy") {
|
|
19854
|
-
const
|
|
19855
|
-
if (!
|
|
19864
|
+
const b = [...a].find((D) => D.id === f);
|
|
19865
|
+
if (!b) {
|
|
19856
19866
|
i(null);
|
|
19857
19867
|
return;
|
|
19858
19868
|
}
|
|
19859
19869
|
const k = n("sortBy");
|
|
19860
|
-
if (En(
|
|
19870
|
+
if (En(b, k)) {
|
|
19861
19871
|
i(null);
|
|
19862
19872
|
return;
|
|
19863
19873
|
}
|
|
19864
19874
|
const N = An(
|
|
19865
|
-
|
|
19875
|
+
b,
|
|
19866
19876
|
"sortBy",
|
|
19867
19877
|
k
|
|
19868
19878
|
);
|
|
@@ -19870,8 +19880,8 @@ function wp({
|
|
|
19870
19880
|
return;
|
|
19871
19881
|
}
|
|
19872
19882
|
if (T === "source" && F !== "source" && F !== "sortBy") {
|
|
19873
|
-
const
|
|
19874
|
-
if (!
|
|
19883
|
+
const b = [...a].find((w) => w.id === f);
|
|
19884
|
+
if (!b) {
|
|
19875
19885
|
i(null);
|
|
19876
19886
|
return;
|
|
19877
19887
|
}
|
|
@@ -19887,11 +19897,11 @@ function wp({
|
|
|
19887
19897
|
i(null);
|
|
19888
19898
|
return;
|
|
19889
19899
|
}
|
|
19890
|
-
if (w !==
|
|
19900
|
+
if (w !== b.qualifiedEntityName && b.qualifiedEntityName)
|
|
19891
19901
|
if (o) {
|
|
19892
19902
|
if (!Bc(
|
|
19893
19903
|
w,
|
|
19894
|
-
|
|
19904
|
+
b.qualifiedEntityName,
|
|
19895
19905
|
o
|
|
19896
19906
|
)) {
|
|
19897
19907
|
us(), i(null);
|
|
@@ -19903,12 +19913,12 @@ function wp({
|
|
|
19903
19913
|
}
|
|
19904
19914
|
}
|
|
19905
19915
|
const N = n(F);
|
|
19906
|
-
if (En(
|
|
19916
|
+
if (En(b, N)) {
|
|
19907
19917
|
i(null);
|
|
19908
19918
|
return;
|
|
19909
19919
|
}
|
|
19910
19920
|
const D = An(
|
|
19911
|
-
|
|
19921
|
+
b,
|
|
19912
19922
|
F,
|
|
19913
19923
|
N
|
|
19914
19924
|
);
|
|
@@ -19916,7 +19926,7 @@ function wp({
|
|
|
19916
19926
|
return;
|
|
19917
19927
|
}
|
|
19918
19928
|
if (T && F && T !== "source" && F !== "source" && T !== F) {
|
|
19919
|
-
const
|
|
19929
|
+
const b = n(T), k = n(F), N = b.find((I) => I.id === f);
|
|
19920
19930
|
if (!N) {
|
|
19921
19931
|
i(null);
|
|
19922
19932
|
return;
|
|
@@ -19930,16 +19940,16 @@ function wp({
|
|
|
19930
19940
|
En(N, k) || r(F, [...k, D]);
|
|
19931
19941
|
return;
|
|
19932
19942
|
}
|
|
19933
|
-
const w =
|
|
19943
|
+
const w = b.filter(
|
|
19934
19944
|
(I) => I.id !== f
|
|
19935
19945
|
);
|
|
19936
19946
|
r(T, w), r(F, [...k, D]);
|
|
19937
19947
|
return;
|
|
19938
19948
|
}
|
|
19939
19949
|
if (T && F && T === F && T !== "source") {
|
|
19940
|
-
const
|
|
19950
|
+
const b = n(T), k = b.findIndex((D) => D.id === f), N = b.findIndex((D) => D.id === C);
|
|
19941
19951
|
if (k !== N) {
|
|
19942
|
-
const D = hs(
|
|
19952
|
+
const D = hs(b, k, N);
|
|
19943
19953
|
r(T, D);
|
|
19944
19954
|
}
|
|
19945
19955
|
}
|
|
@@ -20255,7 +20265,7 @@ function Ap({
|
|
|
20255
20265
|
// setActiveCard,
|
|
20256
20266
|
}) {
|
|
20257
20267
|
var le;
|
|
20258
|
-
const x = E((ie) => ie.card), y = ae((ie) => ie.filterValues), p = (y == null ? void 0 : y.length) || 0, { updateCardConfig: v, setCard: f, updateCardInFrame:
|
|
20268
|
+
const x = E((ie) => ie.card), y = ae((ie) => ie.filterValues), p = (y == null ? void 0 : y.length) || 0, { updateCardConfig: v, setCard: f, updateCardInFrame: C, setCardId: T } = re(), { updateCardId: F } = wt(), [b, k] = j(null), N = E((ie) => ie.showAIDialog), [D, w] = j(!1), { isConsoleMode: I } = Pn(), S = E(
|
|
20259
20269
|
(ie) => {
|
|
20260
20270
|
var X;
|
|
20261
20271
|
return ((X = ie.card.customCardPreferences) == null ? void 0 : X.url) && ie.card.type === "custom";
|
|
@@ -20275,7 +20285,7 @@ function Ap({
|
|
|
20275
20285
|
pageSize: X
|
|
20276
20286
|
}
|
|
20277
20287
|
};
|
|
20278
|
-
f(G),
|
|
20288
|
+
f(G), C(G);
|
|
20279
20289
|
};
|
|
20280
20290
|
function L() {
|
|
20281
20291
|
return /* @__PURE__ */ e("div", { className: "border-b border-border bg-background p-4", children: /* @__PURE__ */ s("div", { className: "space-y-4", children: [
|
|
@@ -20416,7 +20426,7 @@ function Ap({
|
|
|
20416
20426
|
if (G.success) {
|
|
20417
20427
|
T(X);
|
|
20418
20428
|
const J = { ...x, id: X };
|
|
20419
|
-
f(J),
|
|
20429
|
+
f(J), C(J), k(null), be.success("Card ID updated successfully");
|
|
20420
20430
|
} else
|
|
20421
20431
|
k(
|
|
20422
20432
|
G.error || "Failed to update Card ID"
|
|
@@ -20432,7 +20442,7 @@ function Ap({
|
|
|
20432
20442
|
),
|
|
20433
20443
|
/* @__PURE__ */ e(_s, { text: x.id, className: "h-5 w-5" })
|
|
20434
20444
|
] }),
|
|
20435
|
-
|
|
20445
|
+
b && /* @__PURE__ */ e("p", { className: "text-xs text-destructive", children: b })
|
|
20436
20446
|
] }),
|
|
20437
20447
|
(z == null ? void 0 : z.sql) && /* @__PURE__ */ e("h3", { className: "mb-1 px-2 font-mono text-xs font-medium", children: "Generated SQL Query" }),
|
|
20438
20448
|
/* @__PURE__ */ e(ci, { sql: z == null ? void 0 : z.sql, error: M })
|
|
@@ -20507,11 +20517,11 @@ function Rp() {
|
|
|
20507
20517
|
i(!0);
|
|
20508
20518
|
}, v = (J) => {
|
|
20509
20519
|
m(J);
|
|
20510
|
-
}, f = E((J) => J.frame),
|
|
20520
|
+
}, f = E((J) => J.frame), C = E((J) => J.card);
|
|
20511
20521
|
E((J) => J.activeTabCardId), E(
|
|
20512
20522
|
(J) => J.actions.getAvailableFields
|
|
20513
20523
|
);
|
|
20514
|
-
const { addCard: T, removeCard: F, updateCard:
|
|
20524
|
+
const { addCard: T, removeCard: F, updateCard: b, setActiveCard: k, updateFilters: N } = re(), {
|
|
20515
20525
|
columns: D = [],
|
|
20516
20526
|
isLoading: w,
|
|
20517
20527
|
error: I
|
|
@@ -20521,7 +20531,7 @@ function Rp() {
|
|
|
20521
20531
|
distance: 8
|
|
20522
20532
|
}
|
|
20523
20533
|
})
|
|
20524
|
-
), z =
|
|
20534
|
+
), z = C, {
|
|
20525
20535
|
getFieldsForContainer: M,
|
|
20526
20536
|
setFieldsForContainer: A
|
|
20527
20537
|
} = ur(z), { activeField: O, handleDragStart: P, handleDragEnd: R } = wp({
|
|
@@ -20533,7 +20543,7 @@ function Rp() {
|
|
|
20533
20543
|
Y && N(J, Y);
|
|
20534
20544
|
}, $ = (J) => {
|
|
20535
20545
|
var Y;
|
|
20536
|
-
|
|
20546
|
+
b(J, {
|
|
20537
20547
|
config: {
|
|
20538
20548
|
...(Y = f.cards.find((oe) => oe.id === J)) == null ? void 0 : Y.config,
|
|
20539
20549
|
filters: void 0
|
|
@@ -20588,7 +20598,7 @@ function Rp() {
|
|
|
20588
20598
|
onFiltersClick: p,
|
|
20589
20599
|
filterCount: ie,
|
|
20590
20600
|
activeCard: z,
|
|
20591
|
-
dataSourceState:
|
|
20601
|
+
dataSourceState: C.dataSource || za,
|
|
20592
20602
|
columns: D,
|
|
20593
20603
|
columnsLoading: w,
|
|
20594
20604
|
columnsError: I,
|
|
@@ -20630,7 +20640,7 @@ function Rp() {
|
|
|
20630
20640
|
);
|
|
20631
20641
|
}
|
|
20632
20642
|
function Fp({ authToken: t, onSave: a, onClose: n }) {
|
|
20633
|
-
const r = Vt(null), l = E((
|
|
20643
|
+
const r = Vt(null), l = E((C) => C.showAIDialog), i = E((C) => C.isDevMode), { setAuthToken: c } = wt(), { setShowAIDialog: o, setOnSave: u, setOnClose: d } = re(), {
|
|
20634
20644
|
handleDragOver: m,
|
|
20635
20645
|
handleDragEnd: h,
|
|
20636
20646
|
handleDragStart: g,
|
|
@@ -20642,11 +20652,11 @@ function Fp({ authToken: t, onSave: a, onClose: n }) {
|
|
|
20642
20652
|
}, [a, u, n, d]), Te(() => {
|
|
20643
20653
|
t && t.accessToken && c(t);
|
|
20644
20654
|
}, [t, c]), Te(() => {
|
|
20645
|
-
var
|
|
20646
|
-
l ? ((
|
|
20655
|
+
var C, T;
|
|
20656
|
+
l ? ((C = r.current) == null || C.resize(40), o(!0)) : (o(!1), (T = r.current) == null || T.resize(0));
|
|
20647
20657
|
}, [l, o]);
|
|
20648
|
-
function p(
|
|
20649
|
-
|
|
20658
|
+
function p(C) {
|
|
20659
|
+
C < 1 ? o(!1) : l || o(!0);
|
|
20650
20660
|
}
|
|
20651
20661
|
function v() {
|
|
20652
20662
|
return /* @__PURE__ */ s(se, { children: [
|
|
@@ -20781,8 +20791,8 @@ function Vp() {
|
|
|
20781
20791
|
} = Ga(), m = o.filter(
|
|
20782
20792
|
(f) => f.name.toLowerCase().includes(t.toLowerCase()) || f.dataType.toLowerCase().includes(t.toLowerCase()) || f.label && f.label.toLowerCase().includes(t.toLowerCase())
|
|
20783
20793
|
), h = (f) => {
|
|
20784
|
-
const
|
|
20785
|
-
return
|
|
20794
|
+
const C = Le(f.dataType);
|
|
20795
|
+
return C === "number" ? "metrics" : (["date", "string", "boolean"].includes(C), "dimensions");
|
|
20786
20796
|
}, g = n === "all" ? m : m.filter(
|
|
20787
20797
|
(f) => h(f) === n
|
|
20788
20798
|
), x = m.filter(
|
|
@@ -20790,13 +20800,13 @@ function Vp() {
|
|
|
20790
20800
|
).length, y = m.filter(
|
|
20791
20801
|
(f) => h(f) === "metrics"
|
|
20792
20802
|
).length, p = (f) => {
|
|
20793
|
-
const
|
|
20803
|
+
const C = {
|
|
20794
20804
|
column_name: f.name,
|
|
20795
20805
|
data_type: f.dataType,
|
|
20796
20806
|
label: f.label,
|
|
20797
20807
|
description: f.description
|
|
20798
20808
|
};
|
|
20799
|
-
i(
|
|
20809
|
+
i(C, "dashboard", f);
|
|
20800
20810
|
};
|
|
20801
20811
|
if (u)
|
|
20802
20812
|
return /* @__PURE__ */ e("div", { className: "flex h-full grow flex-col items-center justify-center px-3", children: /* @__PURE__ */ e(Za, { size: "md", color: "muted", "aria-label": "Loading fields" }) });
|
|
@@ -20868,7 +20878,7 @@ function Vp() {
|
|
|
20868
20878
|
" fields found"
|
|
20869
20879
|
] }),
|
|
20870
20880
|
g.map((f) => {
|
|
20871
|
-
const
|
|
20881
|
+
const C = l == null ? void 0 : l.some(
|
|
20872
20882
|
(T) => {
|
|
20873
20883
|
var F;
|
|
20874
20884
|
return T.title === f.name || ((F = T.column) == null ? void 0 : F.includes(f.name));
|
|
@@ -20881,7 +20891,7 @@ function Vp() {
|
|
|
20881
20891
|
className: K(
|
|
20882
20892
|
"group flex cursor-pointer items-center justify-between border border-dashed border-background px-3 py-[6px] text-sm transition-colors hover:bg-muted/50",
|
|
20883
20893
|
{
|
|
20884
|
-
"bg-muted":
|
|
20894
|
+
"bg-muted": C
|
|
20885
20895
|
}
|
|
20886
20896
|
),
|
|
20887
20897
|
children: /* @__PURE__ */ s("div", { className: "flex items-center gap-2", children: [
|