react-semaphor 0.0.452 → 0.0.453
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/{index-BO0t6pTc.js → index-BZFkR8xE.js} +8324 -8317
- package/dist/chunks/{index-B7RCpnK3.js → index-j-0yo5HL.js} +92 -87
- package/dist/dashboard/index.cjs +1 -1
- package/dist/dashboard/index.js +1 -1
- package/dist/index.cjs +3 -3
- package/dist/index.js +120 -123
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { c as z, p as Wt, u as L, a as at, b as
|
|
2
|
-
import { D as _o, cv as Ro, ct as qo, ct as jo, cy as Bo, cx as Po, cw as Ho, cz as Go, cA as Uo, cu as $o, cr as Qo, cs as Jo } from "./chunks/index-
|
|
1
|
+
import { c as z, p as Wt, u as L, a as at, b as He, d as Tn, e as zn, B as X, P as Ze, f as An, g as Fn, h as Ln, i as En, L as G, I as ue, j as Vn, k as _n, l as Rn, m as K, n as qn, o as jn, q as Bn, r as bs, s as yn, t as R, C as Kt, v as vs, S as we, w as Se, x as ke, y as Me, z as Oe, A as De, E as de, T as Pn, F as Ge, G as Ue, H as kt, J as Ie, K as Yt, M as Mt, N as Zt, O as Dt, Q as Te, R as Hn, U as It, V as Gn, W as Un, X as bn, Y as xs, Z as f, _ as $n, $ as Xe, a0 as ft, a1 as Cs, a2 as Qn, a3 as Jn, a4 as Wn, a5 as Kn, a6 as Yn, a7 as Zn, a8 as Xn, a9 as xe, aa as ea, ab as ta, ac as na, ad as aa, ae as sa, af as be, ag as Ns, ah as Ce, ai as ws, aj as Be, ak as Ne, al as Ss, am as ks, an as Ms, ao as Ds, ap as gt, aq as ze, ar as Is, as as Os, at as Y, au as ra, av as Ts, aw as zs, ax as As, ay as Pt, az as la, aA as Xt, aB as Ot, aC as et, aD as ia, aE as yt, aF as Ht, aG as pe, aH as Fs, aI as Ls, aJ as ot, aK as Es, aL as Vs, aM as _s, aN as oa, aO as Rs, aP as Tt, aQ as qs, aR as js, aS as Bs, aT as vn, aU as Ps, aV as Hs, aW as en, aX as ve, aY as Gs, aZ as Gt, a_ as Ee, a$ as he, b0 as Ve, b1 as Us, b2 as $s, b3 as Qs, b4 as Js, b5 as Ws, b6 as At, b7 as Ks, b8 as xn, b9 as Ys, ba as Cn, bb as Zs, bc as Xs, bd as er, be as tr, bf as ca, bg as nr, bh as tn, bi as da, bj as ar, bk as sr, bl as Ke, bm as rr, bn as lr, bo as ua, bp as ir, bq as or, br as cr, bs as dr, bt as ur, bu as zt, bv as ma, bw as mr, bx as nn, by as an, bz as Ye, bA as pt, bB as hr, bC as pr, bD as fr, bE as sn, bF as ha, bG as gr, bH as bt, bI as pa, bJ as vt, bK as fa, bL as ga, bM as ya, bN as yr, bO as br, bP as vr, bQ as xr, bR as Fe, bS as le, bT as ie, bU as oe, bV as rn, bW as Cr, bX as Nr, bY as wr, bZ as Sr, b_ as Nn, b$ as ba, c0 as kr, c1 as Mr, c2 as Dr, c3 as Ir, c4 as ln, c5 as va, c6 as xa, c7 as on, c8 as Or, c9 as Ca, ca as Tr, cb as zr, cc as Ar, cd as Fr, ce as Lr, cf as Er, cg as Vr, ch as _r, ci as Ft, cj as Na, ck as Rr, cl as qr, cm as jr, cn as Br, co as Pr, cp as Hr, cq as Gr } from "./chunks/index-BZFkR8xE.js";
|
|
2
|
+
import { D as _o, cv as Ro, ct as qo, ct as jo, cy as Bo, cx as Po, cw as Ho, cz as Go, cA as Uo, cu as $o, cr as Qo, cs as Jo } from "./chunks/index-BZFkR8xE.js";
|
|
3
3
|
import { EMPTY_SELECTION as Ko } from "./types/index.js";
|
|
4
4
|
import { jsxs as r, jsx as e, Fragment as te } from "react/jsx-runtime";
|
|
5
|
-
import * as
|
|
5
|
+
import * as We from "react";
|
|
6
6
|
import Ae, { useState as J, useMemo as _e, useRef as tt, useCallback as wa, useEffect as me, Suspense as Ur } from "react";
|
|
7
7
|
import "react-dom";
|
|
8
8
|
/**
|
|
@@ -681,7 +681,7 @@ const Dl = z("ListX", [
|
|
|
681
681
|
* This source code is licensed under the ISC license.
|
|
682
682
|
* See the LICENSE file in the root directory of this source tree.
|
|
683
683
|
*/
|
|
684
|
-
const
|
|
684
|
+
const Pe = z("LoaderCircle", [
|
|
685
685
|
["path", { d: "M21 12a9 9 0 1 1-6.219-8.56", key: "13zald" }]
|
|
686
686
|
]);
|
|
687
687
|
/**
|
|
@@ -1059,7 +1059,7 @@ async function Gl(t, a) {
|
|
|
1059
1059
|
}) : null;
|
|
1060
1060
|
}
|
|
1061
1061
|
function Ul() {
|
|
1062
|
-
const [t, a] = J(""), [n, s] = J(!1), l = L((p) => p.lenses), { setLenses: o, setSelectedLensId: i } = at(), [u, c] = J(!1), [h, d] = J(!1), g = L((p) => p.dashboard), C = L((p) => p.filterValues), { authToken: m } =
|
|
1062
|
+
const [t, a] = J(""), [n, s] = J(!1), l = L((p) => p.lenses), { setLenses: o, setSelectedLensId: i } = at(), [u, c] = J(!1), [h, d] = J(!1), g = L((p) => p.dashboard), C = L((p) => p.filterValues), { authToken: m } = He();
|
|
1063
1063
|
async function N() {
|
|
1064
1064
|
c(!0);
|
|
1065
1065
|
const p = Ba(
|
|
@@ -1080,7 +1080,7 @@ function Ul() {
|
|
|
1080
1080
|
className: "h-7 p-2",
|
|
1081
1081
|
size: "sm",
|
|
1082
1082
|
children: [
|
|
1083
|
-
/* @__PURE__ */ e(
|
|
1083
|
+
/* @__PURE__ */ e(Ze, { className: "mr-2 h-4 w-4" }),
|
|
1084
1084
|
"Lens"
|
|
1085
1085
|
]
|
|
1086
1086
|
}
|
|
@@ -1120,7 +1120,7 @@ function Ul() {
|
|
|
1120
1120
|
] });
|
|
1121
1121
|
}
|
|
1122
1122
|
function $l() {
|
|
1123
|
-
const [t, a] = J(!1), n = L((d) => d.lenses), s = L((d) => d.selectedLensId), { setLenses: l, setSelectedLensId: o } = at(), { authToken: i } =
|
|
1123
|
+
const [t, a] = J(!1), n = L((d) => d.lenses), s = L((d) => d.selectedLensId), { setLenses: l, setSelectedLensId: o } = at(), { authToken: i } = He();
|
|
1124
1124
|
async function u(d) {
|
|
1125
1125
|
o(d);
|
|
1126
1126
|
}
|
|
@@ -1242,7 +1242,7 @@ async function Ql() {
|
|
|
1242
1242
|
function Jl({
|
|
1243
1243
|
iconClassName: t
|
|
1244
1244
|
}) {
|
|
1245
|
-
const { authToken: a } =
|
|
1245
|
+
const { authToken: a } = He();
|
|
1246
1246
|
L((l) => {
|
|
1247
1247
|
var o;
|
|
1248
1248
|
return (o = l.dashboard) == null ? void 0 : o.title;
|
|
@@ -1257,7 +1257,7 @@ function Jl({
|
|
|
1257
1257
|
tooltip: "Download PDF",
|
|
1258
1258
|
className: "h-7 p-2",
|
|
1259
1259
|
onClick: s,
|
|
1260
|
-
children: n ? /* @__PURE__ */ e(
|
|
1260
|
+
children: n ? /* @__PURE__ */ e(Pe, { className: R("size-3.5 animate-spin", t) }) : /* @__PURE__ */ e(vs, { className: R("size-4", t) })
|
|
1261
1261
|
}
|
|
1262
1262
|
);
|
|
1263
1263
|
}
|
|
@@ -1313,8 +1313,8 @@ function Wl({
|
|
|
1313
1313
|
error: o,
|
|
1314
1314
|
isDeleting: i
|
|
1315
1315
|
} = Kl(), [u, c] = J(""), [h, d] = J(kn[0].value), [g, C] = J("06:00"), [m, N] = J("");
|
|
1316
|
-
return /* @__PURE__ */ e(Pn, { delayDuration: 0, children: /* @__PURE__ */ r(
|
|
1317
|
-
/* @__PURE__ */ e(
|
|
1316
|
+
return /* @__PURE__ */ e(Pn, { delayDuration: 0, children: /* @__PURE__ */ r(Ge, { children: [
|
|
1317
|
+
/* @__PURE__ */ e(Ue, { asChild: !0, children: /* @__PURE__ */ e(
|
|
1318
1318
|
K,
|
|
1319
1319
|
{
|
|
1320
1320
|
tooltip: "Schedule Dashboard",
|
|
@@ -1395,7 +1395,7 @@ function Wl({
|
|
|
1395
1395
|
className: "h-8 p-2",
|
|
1396
1396
|
disabled: l === "loading" || !u,
|
|
1397
1397
|
children: [
|
|
1398
|
-
l === "loading" && /* @__PURE__ */ e(
|
|
1398
|
+
l === "loading" && /* @__PURE__ */ e(Pe, { className: "mr-2 size-4 animate-spin" }),
|
|
1399
1399
|
l === "success" && /* @__PURE__ */ e(Yt, { className: "mr-2 size-4" }),
|
|
1400
1400
|
l === "error" && /* @__PURE__ */ r(Mt, { children: [
|
|
1401
1401
|
/* @__PURE__ */ e(Zt, { children: /* @__PURE__ */ e(Oa, { className: "mr-2 size-4 text-destructive" }) }),
|
|
@@ -1435,7 +1435,7 @@ function Wl({
|
|
|
1435
1435
|
}
|
|
1436
1436
|
),
|
|
1437
1437
|
/* @__PURE__ */ e(Mn, { tooltip: `${p.endUserEmail}`, children: /* @__PURE__ */ e(Ol, { className: "size-3.5" }) }),
|
|
1438
|
-
i === p.id ? /* @__PURE__ */ e(
|
|
1438
|
+
i === p.id ? /* @__PURE__ */ e(Pe, { className: "size-3.5 animate-spin" }) : /* @__PURE__ */ e(
|
|
1439
1439
|
ql,
|
|
1440
1440
|
{
|
|
1441
1441
|
onClick: () => s(p.id),
|
|
@@ -1527,7 +1527,7 @@ function Kl() {
|
|
|
1527
1527
|
};
|
|
1528
1528
|
}
|
|
1529
1529
|
function Yl() {
|
|
1530
|
-
const { authToken: t } =
|
|
1530
|
+
const { authToken: t } = He();
|
|
1531
1531
|
L((S) => S.theme);
|
|
1532
1532
|
const a = L((S) => S.lenses), n = L((S) => S.selectedLensId), s = a == null ? void 0 : a.find((S) => S.id === n), l = L((S) => S.dashboard);
|
|
1533
1533
|
L((S) => S.selectedSheetId);
|
|
@@ -1550,7 +1550,7 @@ function Yl() {
|
|
|
1550
1550
|
if (!o || !k) return;
|
|
1551
1551
|
const S = {
|
|
1552
1552
|
connectionId: i,
|
|
1553
|
-
id:
|
|
1553
|
+
id: Xe(),
|
|
1554
1554
|
title: "Title",
|
|
1555
1555
|
// description: 'Description',
|
|
1556
1556
|
preferences: {
|
|
@@ -1565,7 +1565,7 @@ function Yl() {
|
|
|
1565
1565
|
sql: "",
|
|
1566
1566
|
data: []
|
|
1567
1567
|
}, q = {
|
|
1568
|
-
id:
|
|
1568
|
+
id: Xe(),
|
|
1569
1569
|
cards: [S],
|
|
1570
1570
|
activeCardId: S.id
|
|
1571
1571
|
};
|
|
@@ -1606,7 +1606,7 @@ function Yl() {
|
|
|
1606
1606
|
disabled: !o,
|
|
1607
1607
|
onClick: E,
|
|
1608
1608
|
children: [
|
|
1609
|
-
/* @__PURE__ */ e(
|
|
1609
|
+
/* @__PURE__ */ e(Ze, { className: "mr-2 h-4 w-4" }),
|
|
1610
1610
|
"Frame"
|
|
1611
1611
|
]
|
|
1612
1612
|
}
|
|
@@ -1671,8 +1671,8 @@ function Zl({
|
|
|
1671
1671
|
icon: c,
|
|
1672
1672
|
showNone: h = !1
|
|
1673
1673
|
}) {
|
|
1674
|
-
const d =
|
|
1675
|
-
|
|
1674
|
+
const d = We.useRef(null), [g, C] = We.useState(!1), [m, N] = We.useState("100%"), p = h ? [...a || [], { id: "none", name: "None" }] : a;
|
|
1675
|
+
We.useLayoutEffect(() => {
|
|
1676
1676
|
d.current && N(d.current.offsetWidth);
|
|
1677
1677
|
}, []);
|
|
1678
1678
|
function x() {
|
|
@@ -1682,8 +1682,8 @@ function Zl({
|
|
|
1682
1682
|
function y(w, k) {
|
|
1683
1683
|
s(k), C(!1);
|
|
1684
1684
|
}
|
|
1685
|
-
return /* @__PURE__ */ r(
|
|
1686
|
-
/* @__PURE__ */ e(
|
|
1685
|
+
return /* @__PURE__ */ r(Ge, { open: g, onOpenChange: C, children: [
|
|
1686
|
+
/* @__PURE__ */ e(Ue, { asChild: !0, children: /* @__PURE__ */ r(
|
|
1687
1687
|
X,
|
|
1688
1688
|
{
|
|
1689
1689
|
ref: d,
|
|
@@ -1751,7 +1751,7 @@ function Zl({
|
|
|
1751
1751
|
)
|
|
1752
1752
|
] });
|
|
1753
1753
|
}
|
|
1754
|
-
function
|
|
1754
|
+
function rt({
|
|
1755
1755
|
title: t,
|
|
1756
1756
|
items: a,
|
|
1757
1757
|
value: n,
|
|
@@ -2178,7 +2178,7 @@ function ni() {
|
|
|
2178
2178
|
id: ye(O),
|
|
2179
2179
|
// Unique ID
|
|
2180
2180
|
name: O,
|
|
2181
|
-
label:
|
|
2181
|
+
label: it(O, b),
|
|
2182
2182
|
type: B,
|
|
2183
2183
|
role: "metric",
|
|
2184
2184
|
aggregate: b
|
|
@@ -2294,9 +2294,9 @@ function ni() {
|
|
|
2294
2294
|
const { active: b, over: O } = I, B = b.data.current;
|
|
2295
2295
|
if ((B == null ? void 0 : B.type) === hn && O) {
|
|
2296
2296
|
const U = l.findIndex(
|
|
2297
|
-
(v) =>
|
|
2297
|
+
(v) => lt(v.columnId) === b.id
|
|
2298
2298
|
), j = l.findIndex(
|
|
2299
|
-
(v) =>
|
|
2299
|
+
(v) => lt(v.columnId) === O.id
|
|
2300
2300
|
);
|
|
2301
2301
|
if (U !== -1 && j !== -1 && U !== j) {
|
|
2302
2302
|
const v = [...l], [P] = v.splice(U, 1);
|
|
@@ -2316,9 +2316,9 @@ function ni() {
|
|
|
2316
2316
|
};
|
|
2317
2317
|
}
|
|
2318
2318
|
function ye(t) {
|
|
2319
|
-
return `${t}-${
|
|
2319
|
+
return `${t}-${Xe()}`;
|
|
2320
2320
|
}
|
|
2321
|
-
function
|
|
2321
|
+
function it(t, a) {
|
|
2322
2322
|
const n = la(t.replace(/_/g, " "));
|
|
2323
2323
|
switch (a) {
|
|
2324
2324
|
case "SUM":
|
|
@@ -2337,7 +2337,7 @@ function ot(t, a) {
|
|
|
2337
2337
|
return n;
|
|
2338
2338
|
}
|
|
2339
2339
|
}
|
|
2340
|
-
function
|
|
2340
|
+
function lt(t) {
|
|
2341
2341
|
return `${hn}-${t}`;
|
|
2342
2342
|
}
|
|
2343
2343
|
function nt(t, a) {
|
|
@@ -2425,7 +2425,7 @@ function ai({
|
|
|
2425
2425
|
role: "metric",
|
|
2426
2426
|
id: ye(b.column_name),
|
|
2427
2427
|
name: b.column_name,
|
|
2428
|
-
label:
|
|
2428
|
+
label: it(b.column_name, "COUNT"),
|
|
2429
2429
|
type: b.data_type,
|
|
2430
2430
|
aggregate: "COUNT"
|
|
2431
2431
|
};
|
|
@@ -2449,7 +2449,7 @@ function ai({
|
|
|
2449
2449
|
role: "metric",
|
|
2450
2450
|
id: ye(b.column_name),
|
|
2451
2451
|
name: b.column_name,
|
|
2452
|
-
label:
|
|
2452
|
+
label: it(b.column_name, "SUM"),
|
|
2453
2453
|
type: b.data_type,
|
|
2454
2454
|
aggregate: "SUM"
|
|
2455
2455
|
};
|
|
@@ -2548,7 +2548,7 @@ function ai({
|
|
|
2548
2548
|
}),
|
|
2549
2549
|
children: [
|
|
2550
2550
|
/* @__PURE__ */ e(
|
|
2551
|
-
|
|
2551
|
+
Ze,
|
|
2552
2552
|
{
|
|
2553
2553
|
className: R("mr-1 size-4", {
|
|
2554
2554
|
"text-green-400": Z(),
|
|
@@ -2569,7 +2569,7 @@ function ai({
|
|
|
2569
2569
|
variant: "secondary",
|
|
2570
2570
|
className: "flex",
|
|
2571
2571
|
children: [
|
|
2572
|
-
s !== "Success" ? /* @__PURE__ */ e(
|
|
2572
|
+
s !== "Success" ? /* @__PURE__ */ e(Pe, { className: "mr-2 h-4 w-4 animate-spin text-foreground/50" }) : /* @__PURE__ */ e(Il, { className: "mr-2 size-4" }),
|
|
2573
2573
|
"Top 10"
|
|
2574
2574
|
]
|
|
2575
2575
|
}
|
|
@@ -2583,7 +2583,7 @@ function ai({
|
|
|
2583
2583
|
variant: "secondary",
|
|
2584
2584
|
className: "w-full",
|
|
2585
2585
|
children: [
|
|
2586
|
-
s !== "Success" ? /* @__PURE__ */ e(
|
|
2586
|
+
s !== "Success" ? /* @__PURE__ */ e(Pe, { className: "mr-2 h-4 w-4 animate-spin text-foreground/50" }) : /* @__PURE__ */ e(qa, { className: "mr-2 size-4" }),
|
|
2587
2587
|
"Count"
|
|
2588
2588
|
]
|
|
2589
2589
|
}
|
|
@@ -2612,8 +2612,8 @@ function ai({
|
|
|
2612
2612
|
},
|
|
2613
2613
|
b.column_name
|
|
2614
2614
|
)) }),
|
|
2615
|
-
/* @__PURE__ */ e(
|
|
2616
|
-
/* @__PURE__ */ e(
|
|
2615
|
+
/* @__PURE__ */ e(et, { orientation: "vertical" }),
|
|
2616
|
+
/* @__PURE__ */ e(et, { orientation: "horizontal" })
|
|
2617
2617
|
]
|
|
2618
2618
|
}
|
|
2619
2619
|
)
|
|
@@ -2680,7 +2680,7 @@ function Ga({
|
|
|
2680
2680
|
function ge() {
|
|
2681
2681
|
window.location.href = "mailto:support@semaphor.cloud?subject=Help&body=I need help with...";
|
|
2682
2682
|
}
|
|
2683
|
-
function
|
|
2683
|
+
function Je(re) {
|
|
2684
2684
|
re === !0 ? ce && (C(ce.userSql), setTimeout(() => {
|
|
2685
2685
|
_();
|
|
2686
2686
|
}, 100)) : C(""), g(re);
|
|
@@ -2689,7 +2689,7 @@ function Ga({
|
|
|
2689
2689
|
if (!s || b === "S3" || b === "API") return null;
|
|
2690
2690
|
if (!o || o === "none")
|
|
2691
2691
|
return /* @__PURE__ */ e(
|
|
2692
|
-
|
|
2692
|
+
rt,
|
|
2693
2693
|
{
|
|
2694
2694
|
refetch: B,
|
|
2695
2695
|
showNone: !0,
|
|
@@ -2715,7 +2715,7 @@ function Ga({
|
|
|
2715
2715
|
if (!s || b === "S3" || b === "API") return null;
|
|
2716
2716
|
if (!i || i === "none")
|
|
2717
2717
|
return /* @__PURE__ */ e(
|
|
2718
|
-
|
|
2718
|
+
rt,
|
|
2719
2719
|
{
|
|
2720
2720
|
refetch: U,
|
|
2721
2721
|
showNone: !0,
|
|
@@ -2731,7 +2731,7 @@ function Ga({
|
|
|
2731
2731
|
}
|
|
2732
2732
|
function gs() {
|
|
2733
2733
|
return !s || b === "S3" || b === "API" || !i || i === "none" ? null : /* @__PURE__ */ e(
|
|
2734
|
-
|
|
2734
|
+
rt,
|
|
2735
2735
|
{
|
|
2736
2736
|
refetch: j,
|
|
2737
2737
|
onChange: ne,
|
|
@@ -2750,7 +2750,7 @@ function Ga({
|
|
|
2750
2750
|
return b === "API" ? (Le = !1, Le) : ((b === "S3" || s && i && i !== "none" && u) && (Le = !0), Le);
|
|
2751
2751
|
}
|
|
2752
2752
|
return re() ? /* @__PURE__ */ e(
|
|
2753
|
-
|
|
2753
|
+
rt,
|
|
2754
2754
|
{
|
|
2755
2755
|
refetch: v,
|
|
2756
2756
|
onChange: d,
|
|
@@ -2775,7 +2775,7 @@ function Ga({
|
|
|
2775
2775
|
children: [
|
|
2776
2776
|
/* @__PURE__ */ r("section", { className: "space-y-3 px-6 py-4", children: [
|
|
2777
2777
|
/* @__PURE__ */ e(
|
|
2778
|
-
|
|
2778
|
+
rt,
|
|
2779
2779
|
{
|
|
2780
2780
|
refetch: F,
|
|
2781
2781
|
items: m,
|
|
@@ -2804,7 +2804,7 @@ function Ga({
|
|
|
2804
2804
|
{
|
|
2805
2805
|
className: "data-[state=checked]:bg-muted-foreground/80",
|
|
2806
2806
|
checked: h,
|
|
2807
|
-
onCheckedChange:
|
|
2807
|
+
onCheckedChange: Je,
|
|
2808
2808
|
id: "dev-mode"
|
|
2809
2809
|
}
|
|
2810
2810
|
),
|
|
@@ -2847,7 +2847,7 @@ function Ua({ sql: t, error: a, onClick: n }) {
|
|
|
2847
2847
|
align: "start",
|
|
2848
2848
|
className: "w-full min-w-fit max-w-[700px]",
|
|
2849
2849
|
children: /* @__PURE__ */ e("div", { className: "flex justify-between space-x-4", children: /* @__PURE__ */ r("div", { className: "flex grow flex-col space-y-2", children: [
|
|
2850
|
-
/* @__PURE__ */ r(
|
|
2850
|
+
/* @__PURE__ */ r(ot, { className: "max-h-[250px] min-h-0 overflow-scroll text-xs leading-relaxed text-foreground/80", children: [
|
|
2851
2851
|
a && a,
|
|
2852
2852
|
t && /* @__PURE__ */ r("div", { className: "flex flex-col space-y-1.5", children: [
|
|
2853
2853
|
/* @__PURE__ */ e("span", { className: "text-xs font-semibold", children: "Resolved SQL" }),
|
|
@@ -2955,7 +2955,7 @@ function Qa(t) {
|
|
|
2955
2955
|
key: n
|
|
2956
2956
|
}, a.attr), Qa(a.child)));
|
|
2957
2957
|
}
|
|
2958
|
-
function
|
|
2958
|
+
function $e(t) {
|
|
2959
2959
|
return (a) => /* @__PURE__ */ Ae.createElement(di, Nt({
|
|
2960
2960
|
attr: wt({}, t.attr)
|
|
2961
2961
|
}, a), Qa(t.child));
|
|
@@ -2984,7 +2984,7 @@ function di(t) {
|
|
|
2984
2984
|
return Dn !== void 0 ? /* @__PURE__ */ Ae.createElement(Dn.Consumer, null, (n) => a(n)) : a($a);
|
|
2985
2985
|
}
|
|
2986
2986
|
function ui(t) {
|
|
2987
|
-
return
|
|
2987
|
+
return $e({ attr: { viewBox: "0 0 448 512" }, child: [{ tag: "path", attr: { d: "M439.8 200.5c-7.7-30.9-22.3-54.2-53.4-54.2h-40.1v47.4c0 36.8-31.2 67.8-66.8 67.8H172.7c-29.2 0-53.4 25-53.4 54.3v101.8c0 29 25.2 46 53.4 54.3 33.8 9.9 66.3 11.7 106.8 0 26.9-7.8 53.4-23.5 53.4-54.3v-40.7H226.2v-13.6h160.2c31.1 0 42.6-21.7 53.4-54.2 11.2-33.5 10.7-65.7 0-108.6zM286.2 404c11.1 0 20.1 9.1 20.1 20.3 0 11.3-9 20.4-20.1 20.4-11 0-20.1-9.2-20.1-20.4.1-11.3 9.1-20.3 20.1-20.3zM167.8 248.1h106.8c29.7 0 53.4-24.5 53.4-54.3V91.9c0-29-24.4-50.7-53.4-55.6-35.8-5.9-74.7-5.6-106.8.1-45.2 8-53.4 24.7-53.4 55.6v40.7h106.9v13.6h-147c-31.1 0-58.3 18.7-66.8 54.2-9.8 40.7-10.2 66.1 0 108.6 7.6 31.6 25.7 54.2 56.8 54.2H101v-48.8c0-35.3 30.5-66.4 66.8-66.4zm-6.7-142.6c-11.1 0-20.1-9.1-20.1-20.3.1-11.3 9-20.4 20.1-20.4 11 0 20.1 9.2 20.1 20.4s-9 20.3-20.1 20.3z" }, child: [] }] })(t);
|
|
2988
2988
|
}
|
|
2989
2989
|
function Ja(t) {
|
|
2990
2990
|
const { theme: a } = Vs(), n = L((p) => p.theme), s = f((p) => p.frame), l = f((p) => p.card), o = f((p) => p.activeTabCardId), i = _s(), { refetch: u } = pe(l), { updateCardTab: c, setRunSql: h } = Y(), d = tt(), g = tt({}), C = s.cards.find((p) => p.id === o), m = wa(() => {
|
|
@@ -3136,7 +3136,7 @@ function pi({ jsonString: t }) {
|
|
|
3136
3136
|
}
|
|
3137
3137
|
function Wa(t) {
|
|
3138
3138
|
var se, W, ce;
|
|
3139
|
-
const [a, n] = J(""), [s, l] = J(null), { authToken: o } =
|
|
3139
|
+
const [a, n] = J(""), [s, l] = J(null), { authToken: o } = He(), i = f((_) => {
|
|
3140
3140
|
var ae;
|
|
3141
3141
|
return (ae = _ == null ? void 0 : _.card) == null ? void 0 : ae.sql;
|
|
3142
3142
|
}), u = f((_) => {
|
|
@@ -3275,7 +3275,7 @@ function Wa(t) {
|
|
|
3275
3275
|
...g,
|
|
3276
3276
|
_
|
|
3277
3277
|
]).filter(
|
|
3278
|
-
(
|
|
3278
|
+
(Je) => Je.connectionId === _.connectionId
|
|
3279
3279
|
);
|
|
3280
3280
|
F(ge);
|
|
3281
3281
|
}
|
|
@@ -3614,7 +3614,7 @@ function yi() {
|
|
|
3614
3614
|
className: "shrink-0",
|
|
3615
3615
|
size: "sm",
|
|
3616
3616
|
children: [
|
|
3617
|
-
E || H ? /* @__PURE__ */ e(
|
|
3617
|
+
E || H ? /* @__PURE__ */ e(Pe, { className: "mr-2 h-4 w-4 animate-spin" }) : /* @__PURE__ */ e(Us, { className: "mr-2 h-4 w-4" }),
|
|
3618
3618
|
"Run"
|
|
3619
3619
|
]
|
|
3620
3620
|
}
|
|
@@ -3730,14 +3730,14 @@ function bi({ data: t }) {
|
|
|
3730
3730
|
u.id
|
|
3731
3731
|
)) : /* @__PURE__ */ e(At, { children: /* @__PURE__ */ e(Cn, { colSpan: l.length, className: "h-24 text-center", children: "No results." }) }) })
|
|
3732
3732
|
] }),
|
|
3733
|
-
/* @__PURE__ */ e(
|
|
3733
|
+
/* @__PURE__ */ e(et, { orientation: "horizontal" })
|
|
3734
3734
|
] });
|
|
3735
3735
|
}
|
|
3736
3736
|
function vi({ card: t }) {
|
|
3737
3737
|
var w, k, T, D, M, E, H, ee, S, q, Z;
|
|
3738
3738
|
const [a, n] = J(!1), [s, l] = J(
|
|
3739
3739
|
[]
|
|
3740
|
-
), { authToken: o } =
|
|
3740
|
+
), { authToken: o } = He(), i = tr(o == null ? void 0 : o.accessToken), u = L((Q) => Q.themeStyle), c = {
|
|
3741
3741
|
colors: ((k = (w = u == null ? void 0 : u.chart) == null ? void 0 : w.dataset) == null ? void 0 : k.backgroundColor) || []
|
|
3742
3742
|
};
|
|
3743
3743
|
(T = t.customCardPreferences) != null && T.inputData;
|
|
@@ -3863,10 +3863,7 @@ function Xa({
|
|
|
3863
3863
|
}
|
|
3864
3864
|
) });
|
|
3865
3865
|
if (n.type === "table" && (c != null && c.records) && (c == null ? void 0 : c.records.length) > 0)
|
|
3866
|
-
return /* @__PURE__ */
|
|
3867
|
-
/* @__PURE__ */ e(dr, { card: n, data: c == null ? void 0 : c.records }),
|
|
3868
|
-
/* @__PURE__ */ e(Pe, { orientation: "horizontal" })
|
|
3869
|
-
] });
|
|
3866
|
+
return /* @__PURE__ */ e("div", { className: "relative mb-2 flex h-full min-h-0 w-full flex-1 grow basis-0", children: /* @__PURE__ */ e(dr, { card: n, data: c == null ? void 0 : c.records }) });
|
|
3870
3867
|
}
|
|
3871
3868
|
return /* @__PURE__ */ r(
|
|
3872
3869
|
ar,
|
|
@@ -3878,7 +3875,7 @@ function Xa({
|
|
|
3878
3875
|
s && /* @__PURE__ */ r(sr, { className: "flex flex-row items-start justify-between py-4", children: [
|
|
3879
3876
|
/* @__PURE__ */ r("div", { children: [
|
|
3880
3877
|
/* @__PURE__ */ e(
|
|
3881
|
-
|
|
3878
|
+
Ke,
|
|
3882
3879
|
{
|
|
3883
3880
|
enabled: !0,
|
|
3884
3881
|
text: n.title,
|
|
@@ -3888,7 +3885,7 @@ function Xa({
|
|
|
3888
3885
|
n.title
|
|
3889
3886
|
),
|
|
3890
3887
|
/* @__PURE__ */ e(
|
|
3891
|
-
|
|
3888
|
+
Ke,
|
|
3892
3889
|
{
|
|
3893
3890
|
enabled: !0,
|
|
3894
3891
|
text: n.description || "",
|
|
@@ -3900,7 +3897,7 @@ function Xa({
|
|
|
3900
3897
|
] }),
|
|
3901
3898
|
u && /* @__PURE__ */ r("div", { className: "flex items-center gap-3", children: [
|
|
3902
3899
|
/* @__PURE__ */ e(
|
|
3903
|
-
|
|
3900
|
+
Ke,
|
|
3904
3901
|
{
|
|
3905
3902
|
enabled: !0,
|
|
3906
3903
|
className: "my-1",
|
|
@@ -3966,9 +3963,9 @@ const qt = ({
|
|
|
3966
3963
|
onCodeChange: l
|
|
3967
3964
|
}) => /* @__PURE__ */ r(nn, { defaultValue: "final-config", className: "flex w-1/2 flex-col", children: [
|
|
3968
3965
|
/* @__PURE__ */ r(an, { className: "justify-start rounded-sm rounded-b-none border border-b-0", children: [
|
|
3969
|
-
/* @__PURE__ */ e(
|
|
3970
|
-
/* @__PURE__ */ e(
|
|
3971
|
-
/* @__PURE__ */ e(
|
|
3966
|
+
/* @__PURE__ */ e(Ye, { value: "final-config", children: "Config" }),
|
|
3967
|
+
/* @__PURE__ */ e(Ye, { value: "custom-config", children: "Changes" }),
|
|
3968
|
+
/* @__PURE__ */ e(Ye, { value: "custom-code", children: "Custom Code" })
|
|
3972
3969
|
] }),
|
|
3973
3970
|
/* @__PURE__ */ e(
|
|
3974
3971
|
pt,
|
|
@@ -4122,7 +4119,7 @@ function es(t) {
|
|
|
4122
4119
|
return a;
|
|
4123
4120
|
}
|
|
4124
4121
|
function ts() {
|
|
4125
|
-
const { authToken: t } =
|
|
4122
|
+
const { authToken: t } = He(), { data: a, isLoading: n, isFetching: s, isError: l } = Un({
|
|
4126
4123
|
queryKey: ["plugins", t == null ? void 0 : t.accessToken],
|
|
4127
4124
|
queryFn: () => pr(t == null ? void 0 : t.accessToken)
|
|
4128
4125
|
// staleTime: Infinity,
|
|
@@ -4183,22 +4180,22 @@ const ki = ({
|
|
|
4183
4180
|
return /* @__PURE__ */ e(K, { onClick: n, tooltip: t, children: s ? /* @__PURE__ */ e(s, { className: "h-4 w-4" }) : l });
|
|
4184
4181
|
};
|
|
4185
4182
|
function ns(t) {
|
|
4186
|
-
return
|
|
4183
|
+
return $e({ attr: { viewBox: "0 0 256 256", fill: "currentColor" }, child: [{ tag: "path", attr: { d: "M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm87.63,96H191.48A64.1,64.1,0,0,0,136,64.52V40.37A88.13,88.13,0,0,1,215.63,120ZM120,120H80.68A48.09,48.09,0,0,1,120,80.68Zm0,16v39.32A48.09,48.09,0,0,1,80.68,136Zm16,0h39.32A48.09,48.09,0,0,1,136,175.32Zm0-16V80.68A48.09,48.09,0,0,1,175.32,120ZM120,40.37V64.52A64.1,64.1,0,0,0,64.52,120H40.37A88.13,88.13,0,0,1,120,40.37ZM40.37,136H64.52A64.1,64.1,0,0,0,120,191.48v24.15A88.13,88.13,0,0,1,40.37,136ZM136,215.63V191.48A64.1,64.1,0,0,0,191.48,136h24.15A88.13,88.13,0,0,1,136,215.63Z" }, child: [] }] })(t);
|
|
4187
4184
|
}
|
|
4188
4185
|
function Mi(t) {
|
|
4189
|
-
return
|
|
4186
|
+
return $e({ attr: { viewBox: "0 0 256 256", fill: "currentColor" }, child: [{ tag: "path", attr: { d: "M48,180c0,11,7.18,20,16,20a14.24,14.24,0,0,0,10.22-4.66A8,8,0,0,1,85.78,206.4,30.06,30.06,0,0,1,64,216c-17.65,0-32-16.15-32-36s14.35-36,32-36a30.06,30.06,0,0,1,21.78,9.6,8,8,0,0,1-11.56,11.06A14.24,14.24,0,0,0,64,160C55.18,160,48,169,48,180Zm79.6-8.69c-4-1.16-8.14-2.35-10.45-3.84-1.25-.81-1.23-1-1.12-1.9a4.57,4.57,0,0,1,2-3.67c4.6-3.12,15.34-1.73,19.82-.56A8,8,0,0,0,142,145.86c-2.12-.55-21-5.22-32.84,2.76a20.58,20.58,0,0,0-9,14.95c-2,15.88,13.65,20.41,23,23.11,12.06,3.49,13.12,4.92,12.78,7.59-.31,2.41-1.26,3.34-2.14,3.93-4.6,3.06-15.17,1.56-19.55.36A8,8,0,0,0,109.94,214a61.34,61.34,0,0,0,15.19,2c5.82,0,12.3-1,17.49-4.46a20.82,20.82,0,0,0,9.19-15.23C154,179,137.49,174.17,127.6,171.31Zm83.09-26.84a8,8,0,0,0-10.23,4.84L188,184.21l-12.47-34.9a8,8,0,0,0-15.07,5.38l20,56a8,8,0,0,0,15.07,0l20-56A8,8,0,0,0,210.69,144.47ZM216,88v24a8,8,0,0,1-16,0V96H152a8,8,0,0,1-8-8V40H56v72a8,8,0,0,1-16,0V40A16,16,0,0,1,56,24h96a8,8,0,0,1,5.66,2.34l56,56A8,8,0,0,1,216,88Zm-27.31-8L160,51.31V80Z" }, child: [] }] })(t);
|
|
4190
4187
|
}
|
|
4191
4188
|
function as(t) {
|
|
4192
|
-
return
|
|
4189
|
+
return $e({ attr: { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "path", attr: { d: "M6 16m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0" }, child: [] }, { tag: "path", attr: { d: "M16 19m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0" }, child: [] }, { tag: "path", attr: { d: "M14.5 7.5m-4.5 0a4.5 4.5 0 1 0 9 0a4.5 4.5 0 1 0 -9 0" }, child: [] }] })(t);
|
|
4193
4190
|
}
|
|
4194
4191
|
function ss(t) {
|
|
4195
|
-
return
|
|
4192
|
+
return $e({ attr: { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "path", attr: { d: "M4.387 3h15.226a1 1 0 0 1 .948 1.316l-5.105 15.316a2 2 0 0 1 -1.898 1.368h-3.116a2 2 0 0 1 -1.898 -1.368l-5.104 -15.316a1 1 0 0 1 .947 -1.316" }, child: [] }, { tag: "path", attr: { d: "M5 9h14" }, child: [] }, { tag: "path", attr: { d: "M7 15h10" }, child: [] }] })(t);
|
|
4196
4193
|
}
|
|
4197
4194
|
function rs(t) {
|
|
4198
|
-
return
|
|
4195
|
+
return $e({ attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { fill: "none", d: "M0 0h24v24H0z" }, child: [] }, { tag: "path", attr: { d: "m2 19.99 7.5-7.51 4 4 7.09-7.97L22 9.92l-8.5 9.56-4-4-6 6.01-1.5-1.5zm1.5-4.5 6-6.01 4 4L22 3.92l-1.41-1.41-7.09 7.97-4-4L2 13.99l1.5 1.5z" }, child: [] }] })(t);
|
|
4199
4196
|
}
|
|
4200
4197
|
function ls(t) {
|
|
4201
|
-
return
|
|
4198
|
+
return $e({ attr: { version: "1.2", baseProfile: "tiny", viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { d: "M4 18c-.552 0-1-.448-1-1v-6.382l-.553.276c-.495.248-1.095.046-1.342-.447-.247-.494-.046-1.094.448-1.342l2-1c.31-.155.678-.139.973.044.294.183.474.504.474.851v8c0 .552-.448 1-1 1zM13 18h-5c-.404 0-.769-.244-.924-.617-.155-.374-.069-.804.217-1.09l4-4c.254-.254.394-.591.394-.95 0-.358-.14-.695-.394-.949-.508-.508-1.39-.508-1.9.001-.253.252-.393.589-.393.948 0 .552-.448 1-1 1s-1-.448-1-1c0-.894.348-1.733.98-2.364 1.265-1.263 3.464-1.263 4.727.001.632.631.979 1.471.979 2.363 0 .893-.348 1.733-.979 2.364l-2.293 2.293h2.586c.552 0 1 .448 1 1s-.448 1-1 1zM20.955 12.377c.338-.457.545-1.016.545-1.627 0-1.517-1.234-2.75-2.75-2.75-1.031 0-1.966.569-2.44 1.484-.254.49-.063 1.094.428 1.348.49.254 1.094.062 1.348-.428.128-.249.383-.404.664-.404.414 0 .75.336.75.75s-.336.75-.75.75c-.552 0-1 .448-1 1s.448 1 1 1c.689 0 1.25.561 1.25 1.25s-.561 1.25-1.25 1.25-1.25-.561-1.25-1.25c0-.552-.448-1-1-1s-1 .448-1 1c0 1.792 1.458 3.25 3.25 3.25s3.25-1.458 3.25-3.25c0-.939-.406-1.779-1.045-2.373z" }, child: [] }] })(t);
|
|
4202
4199
|
}
|
|
4203
4200
|
function is({
|
|
4204
4201
|
onChartTypeChange: t,
|
|
@@ -4447,8 +4444,8 @@ function Di({
|
|
|
4447
4444
|
function Ii() {
|
|
4448
4445
|
var o, i;
|
|
4449
4446
|
const [t, a] = J(!1), n = f((u) => u.card), s = n.type, l = L((u) => u.isVisualEditing);
|
|
4450
|
-
return /* @__PURE__ */ r(
|
|
4451
|
-
/* @__PURE__ */ e(
|
|
4447
|
+
return /* @__PURE__ */ r(Ge, { open: t, onOpenChange: a, children: [
|
|
4448
|
+
/* @__PURE__ */ e(Ue, { asChild: !0, children: /* @__PURE__ */ e(X, { size: "sm", variant: l ? "ghost" : "outline", children: /* @__PURE__ */ e(
|
|
4452
4449
|
Di,
|
|
4453
4450
|
{
|
|
4454
4451
|
className: "size-4",
|
|
@@ -4501,12 +4498,12 @@ function Oi() {
|
|
|
4501
4498
|
s
|
|
4502
4499
|
);
|
|
4503
4500
|
me(() => {
|
|
4504
|
-
var F, A, $, ne, V, se, W, ce, _, ae, ge,
|
|
4501
|
+
var F, A, $, ne, V, se, W, ce, _, ae, ge, Je, ct, dt;
|
|
4505
4502
|
i(On(n, s)), c(
|
|
4506
4503
|
(($ = (A = (F = n == null ? void 0 : n.chartOptions) == null ? void 0 : F.scales) == null ? void 0 : A[l]) == null ? void 0 : $.min) === 0 ? 0 : ""
|
|
4507
4504
|
), d(((se = (V = (ne = n == null ? void 0 : n.chartOptions) == null ? void 0 : ne.scales) == null ? void 0 : V[l]) == null ? void 0 : se.max) || ""), N(
|
|
4508
4505
|
((ae = (_ = (ce = (W = n == null ? void 0 : n.chartOptions) == null ? void 0 : W.scales) == null ? void 0 : ce[l]) == null ? void 0 : _.ticks) == null ? void 0 : ae.stepSize) || ""
|
|
4509
|
-
), x(((ge = n == null ? void 0 : n.numberAxisFormat) == null ? void 0 : ge.decimalPlaces) || 0), w(((
|
|
4506
|
+
), x(((ge = n == null ? void 0 : n.numberAxisFormat) == null ? void 0 : ge.decimalPlaces) || 0), w(((Je = n == null ? void 0 : n.numberAxisFormat) == null ? void 0 : Je.suffix) || ""), T(((ct = n == null ? void 0 : n.numberAxisFormat) == null ? void 0 : ct.currency) || ""), M(((dt = n == null ? void 0 : n.numberAxisFormat) == null ? void 0 : dt.locale) || "");
|
|
4510
4507
|
}, [t, n, l, s]);
|
|
4511
4508
|
function q(F, A) {
|
|
4512
4509
|
return A === "" || /^[0-9\b]+$/.test(A) ? Number(A) : Number(F);
|
|
@@ -4699,8 +4696,8 @@ function Oi() {
|
|
|
4699
4696
|
};
|
|
4700
4697
|
H($);
|
|
4701
4698
|
}
|
|
4702
|
-
return /* @__PURE__ */ r(
|
|
4703
|
-
/* @__PURE__ */ e(
|
|
4699
|
+
return /* @__PURE__ */ r(Ge, { onOpenChange: (F) => a(F), children: [
|
|
4700
|
+
/* @__PURE__ */ e(Ue, { asChild: !0, children: /* @__PURE__ */ e(K, { tooltip: "Format Number", children: /* @__PURE__ */ e(pl, { className: "size-4" }) }) }),
|
|
4704
4701
|
/* @__PURE__ */ e(sn, { align: "end", className: "max-w-65", children: /* @__PURE__ */ r("div", { className: "grid gap-4", children: [
|
|
4705
4702
|
/* @__PURE__ */ r("div", { className: "space-y-2", children: [
|
|
4706
4703
|
/* @__PURE__ */ e("h4", { className: "font-medium leading-none", children: "Format Options" }),
|
|
@@ -4759,8 +4756,8 @@ function Ti() {
|
|
|
4759
4756
|
align: u
|
|
4760
4757
|
});
|
|
4761
4758
|
};
|
|
4762
|
-
return /* @__PURE__ */ r(
|
|
4763
|
-
/* @__PURE__ */ e(
|
|
4759
|
+
return /* @__PURE__ */ r(Ge, { children: [
|
|
4760
|
+
/* @__PURE__ */ e(Ue, { asChild: !0, children: /* @__PURE__ */ e(K, { tooltip: "Legend Settings", children: /* @__PURE__ */ e(Sl, { className: "size-4" }) }) }),
|
|
4764
4761
|
/* @__PURE__ */ e(sn, { align: "end", className: "w-72", children: /* @__PURE__ */ r("div", { className: "grid gap-4", children: [
|
|
4765
4762
|
/* @__PURE__ */ r("div", { className: "space-y-2", children: [
|
|
4766
4763
|
/* @__PURE__ */ e("h4", { className: "font-medium leading-none", children: "Legend Options" }),
|
|
@@ -4952,7 +4949,7 @@ function mt() {
|
|
|
4952
4949
|
lastSelectedSchema: a.lastSelectedSchema,
|
|
4953
4950
|
lastSelectedTable: a.lastSelectedTable,
|
|
4954
4951
|
lastSelectedDatamodelId: a.lastSelectedDatamodelId,
|
|
4955
|
-
id:
|
|
4952
|
+
id: Xe(),
|
|
4956
4953
|
title: "Title",
|
|
4957
4954
|
description: "",
|
|
4958
4955
|
preferences: {
|
|
@@ -4980,7 +4977,7 @@ function mt() {
|
|
|
4980
4977
|
function M() {
|
|
4981
4978
|
const v = {
|
|
4982
4979
|
...a,
|
|
4983
|
-
id:
|
|
4980
|
+
id: Xe(),
|
|
4984
4981
|
title: `${a.title} Copy`,
|
|
4985
4982
|
tabTitle: `${a.tabTitle || a.title} Copy`
|
|
4986
4983
|
};
|
|
@@ -5044,7 +5041,7 @@ function mt() {
|
|
|
5044
5041
|
t.cards.map((v) => /* @__PURE__ */ e(pt, { className: "mt-0 grow", value: v.id, children: b() }, v.id)),
|
|
5045
5042
|
/* @__PURE__ */ e(an, { className: "group mx-4 justify-between overflow-x-auto", children: /* @__PURE__ */ r("div", { className: "flex items-center", children: [
|
|
5046
5043
|
t.cards.map((v, P) => /* @__PURE__ */ r(
|
|
5047
|
-
|
|
5044
|
+
Ye,
|
|
5048
5045
|
{
|
|
5049
5046
|
draggable: !0,
|
|
5050
5047
|
onDragStart: (F) => S(F, P),
|
|
@@ -5055,7 +5052,7 @@ function mt() {
|
|
|
5055
5052
|
children: [
|
|
5056
5053
|
Q(t, v),
|
|
5057
5054
|
/* @__PURE__ */ e(
|
|
5058
|
-
|
|
5055
|
+
Ke,
|
|
5059
5056
|
{
|
|
5060
5057
|
enabled: t.activeCardId === v.id,
|
|
5061
5058
|
text: v.tabTitle || v.title,
|
|
@@ -5083,7 +5080,7 @@ function mt() {
|
|
|
5083
5080
|
className: "ml-1 h-8 px-2 hover:bg-muted-foreground/50",
|
|
5084
5081
|
variant: "outline",
|
|
5085
5082
|
onClick: T,
|
|
5086
|
-
children: /* @__PURE__ */ e(
|
|
5083
|
+
children: /* @__PURE__ */ e(Ze, { className: "h-4 w-4" })
|
|
5087
5084
|
}
|
|
5088
5085
|
),
|
|
5089
5086
|
/* @__PURE__ */ e(
|
|
@@ -5101,7 +5098,7 @@ function mt() {
|
|
|
5101
5098
|
);
|
|
5102
5099
|
}
|
|
5103
5100
|
function b() {
|
|
5104
|
-
return a.type === "kpi" ? /* @__PURE__ */ e("div", { className: "flex h-full items-center justify-center", children: /* @__PURE__ */ e("div", { className: "w-1/2 rounded-md border", children: /* @__PURE__ */ e(br, { card: a, data: p == null ? void 0 : p.records, isPending: k }) }) }) : a.type === "text" ? /* @__PURE__ */ e("div", { className: "flex h-full items-center justify-center", children: /* @__PURE__ */ e("div", { className: "w-1/2 rounded-md border", children: /* @__PURE__ */ e(
|
|
5101
|
+
return a.type === "kpi" ? /* @__PURE__ */ e("div", { className: "flex h-full items-center justify-center", children: /* @__PURE__ */ e("div", { className: "w-1/2 rounded-md border", children: /* @__PURE__ */ e(br, { card: a, data: p == null ? void 0 : p.records, isPending: k }) }) }) : a.type === "text" ? /* @__PURE__ */ e("div", { className: "flex h-full items-center justify-center", children: /* @__PURE__ */ e("div", { className: "w-1/2 rounded-md border", children: /* @__PURE__ */ e(ot, { className: "mx-3 my-6 h-[300px] overflow-y-auto break-words px-3", children: /* @__PURE__ */ e(
|
|
5105
5102
|
vr,
|
|
5106
5103
|
{
|
|
5107
5104
|
isLoading: o,
|
|
@@ -5133,7 +5130,7 @@ function mt() {
|
|
|
5133
5130
|
{
|
|
5134
5131
|
className: "relative isolate flex h-full flex-col py-2 pb-3",
|
|
5135
5132
|
children: [
|
|
5136
|
-
(x || y) && /* @__PURE__ */ e("div", { className: "absolute bottom-0 left-0 right-0 top-0 z-50 m-auto flex h-10 w-10 items-center justify-center rounded-md bg-muted", children: /* @__PURE__ */ e(
|
|
5133
|
+
(x || y) && /* @__PURE__ */ e("div", { className: "absolute bottom-0 left-0 right-0 top-0 z-50 m-auto flex h-10 w-10 items-center justify-center rounded-md bg-muted", children: /* @__PURE__ */ e(Pe, { className: "h-8 w-8 animate-spin text-muted-foreground" }) }),
|
|
5137
5134
|
/* @__PURE__ */ r(
|
|
5138
5135
|
"div",
|
|
5139
5136
|
{
|
|
@@ -5224,9 +5221,9 @@ function Fi() {
|
|
|
5224
5221
|
const a = t.replace(/\n/g, "<br>");
|
|
5225
5222
|
return /* @__PURE__ */ r("div", { className: "relative flex w-full flex-col border-r", children: [
|
|
5226
5223
|
/* @__PURE__ */ e("div", { className: "sticky top-0 flex max-h-11 min-h-11 grow items-center border-b bg-muted px-3 font-mono text-xs font-semibold text-foreground/70", children: "Python Output" }),
|
|
5227
|
-
/* @__PURE__ */ r(
|
|
5224
|
+
/* @__PURE__ */ r(ot, { className: "overflow-y-auto px-2 pt-1 font-mono text-xs text-foreground/90", children: [
|
|
5228
5225
|
/* @__PURE__ */ e("div", { dangerouslySetInnerHTML: { __html: a } }),
|
|
5229
|
-
/* @__PURE__ */ e(
|
|
5226
|
+
/* @__PURE__ */ e(et, { orientation: "horizontal" })
|
|
5230
5227
|
] })
|
|
5231
5228
|
] });
|
|
5232
5229
|
}
|
|
@@ -5390,8 +5387,8 @@ function Ei() {
|
|
|
5390
5387
|
value: o,
|
|
5391
5388
|
onValueChange: N,
|
|
5392
5389
|
children: /* @__PURE__ */ r(an, { className: "h-9 w-full", children: [
|
|
5393
|
-
/* @__PURE__ */ e(
|
|
5394
|
-
/* @__PURE__ */ e(
|
|
5390
|
+
/* @__PURE__ */ e(Ye, { className: "h-7 w-full", value: "single", children: "Single Visual" }),
|
|
5391
|
+
/* @__PURE__ */ e(Ye, { className: "h-7 w-full", value: "multiple", children: "Multi-Visual" })
|
|
5395
5392
|
] })
|
|
5396
5393
|
}
|
|
5397
5394
|
)
|
|
@@ -5431,7 +5428,7 @@ function Ei() {
|
|
|
5431
5428
|
}
|
|
5432
5429
|
);
|
|
5433
5430
|
}
|
|
5434
|
-
function
|
|
5431
|
+
function Qe() {
|
|
5435
5432
|
const [t, a] = J([]), n = f((h) => h.card.preferences), { setFilterOnClickColumnIndex: s, setCardPreferences: l } = f(
|
|
5436
5433
|
(h) => h.actions
|
|
5437
5434
|
), o = f(
|
|
@@ -5499,14 +5496,14 @@ function Je() {
|
|
|
5499
5496
|
}
|
|
5500
5497
|
);
|
|
5501
5498
|
}
|
|
5502
|
-
return /* @__PURE__ */ r("div", { className: "space-y-2", children: [
|
|
5499
|
+
return /* @__PURE__ */ r("div", { className: "max-h-[150px] space-y-2 overflow-y-auto", children: [
|
|
5503
5500
|
/* @__PURE__ */ e(G, { children: "On Click" }),
|
|
5504
5501
|
o == null ? void 0 : o.map((h, d) => {
|
|
5505
5502
|
var g, C;
|
|
5506
5503
|
return /* @__PURE__ */ e(
|
|
5507
5504
|
"div",
|
|
5508
5505
|
{
|
|
5509
|
-
className: "
|
|
5506
|
+
className: "group flex items-center justify-between space-y-2",
|
|
5510
5507
|
children: /* @__PURE__ */ r("div", { className: "grow", children: [
|
|
5511
5508
|
/* @__PURE__ */ r("div", { className: "flex items-center space-x-2 py-2", children: [
|
|
5512
5509
|
/* @__PURE__ */ e(
|
|
@@ -5592,8 +5589,8 @@ function Vi({ idx: t }) {
|
|
|
5592
5589
|
});
|
|
5593
5590
|
}
|
|
5594
5591
|
}
|
|
5595
|
-
return /* @__PURE__ */ r(
|
|
5596
|
-
/* @__PURE__ */ e(
|
|
5592
|
+
return /* @__PURE__ */ r(Ge, { children: [
|
|
5593
|
+
/* @__PURE__ */ e(Ue, { children: /* @__PURE__ */ e(_l, { className: "size-4 rotate-[135deg] cursor-pointer text-muted-foreground hover:text-foreground" }) }),
|
|
5597
5594
|
/* @__PURE__ */ e(kt, { className: "w-fit px-2 py-1", children: /* @__PURE__ */ r("div", { className: "flex gap-1", children: [
|
|
5598
5595
|
/* @__PURE__ */ e(
|
|
5599
5596
|
"button",
|
|
@@ -5839,7 +5836,7 @@ function ms() {
|
|
|
5839
5836
|
if (M)
|
|
5840
5837
|
c(M.id), u(M.id);
|
|
5841
5838
|
else {
|
|
5842
|
-
const H =
|
|
5839
|
+
const H = Xe();
|
|
5843
5840
|
return d === "api" && t ? (i({
|
|
5844
5841
|
location: N,
|
|
5845
5842
|
id: H,
|
|
@@ -5881,7 +5878,7 @@ function ms() {
|
|
|
5881
5878
|
}
|
|
5882
5879
|
return { assignFilter: C };
|
|
5883
5880
|
}
|
|
5884
|
-
function
|
|
5881
|
+
function st() {
|
|
5885
5882
|
const t = L(
|
|
5886
5883
|
(u) => u.dashboard.filters
|
|
5887
5884
|
), a = f((u) => u.frame), { setFrame: n } = Y(), { columns: s } = xe(), { assignFilter: l } = ms();
|
|
@@ -5901,9 +5898,9 @@ function _i({
|
|
|
5901
5898
|
onSelect: a
|
|
5902
5899
|
}) {
|
|
5903
5900
|
var i;
|
|
5904
|
-
const [n, s] =
|
|
5905
|
-
return /* @__PURE__ */ r(
|
|
5906
|
-
/* @__PURE__ */ e(
|
|
5901
|
+
const [n, s] = We.useState(!1), [l, o] = We.useState("");
|
|
5902
|
+
return /* @__PURE__ */ r(Ge, { open: n, onOpenChange: s, children: [
|
|
5903
|
+
/* @__PURE__ */ e(Ue, { asChild: !0, children: /* @__PURE__ */ r(
|
|
5907
5904
|
X,
|
|
5908
5905
|
{
|
|
5909
5906
|
size: "sm",
|
|
@@ -5984,8 +5981,8 @@ function Ri({
|
|
|
5984
5981
|
/* @__PURE__ */ r(le, { value: "item-3", children: [
|
|
5985
5982
|
/* @__PURE__ */ e(ie, { children: "Filters" }),
|
|
5986
5983
|
/* @__PURE__ */ r(oe, { className: "space-y-4 px-2", children: [
|
|
5987
|
-
/* @__PURE__ */ e(
|
|
5988
|
-
/* @__PURE__ */ e(
|
|
5984
|
+
/* @__PURE__ */ e(Qe, {}),
|
|
5985
|
+
/* @__PURE__ */ e(st, {})
|
|
5989
5986
|
] })
|
|
5990
5987
|
] })
|
|
5991
5988
|
] }) });
|
|
@@ -6077,8 +6074,8 @@ function qi({
|
|
|
6077
6074
|
/* @__PURE__ */ r(le, { value: "item-3", children: [
|
|
6078
6075
|
/* @__PURE__ */ e(ie, { children: "Filters" }),
|
|
6079
6076
|
/* @__PURE__ */ r(oe, { className: "space-y-4 px-2", children: [
|
|
6080
|
-
/* @__PURE__ */ e(
|
|
6081
|
-
/* @__PURE__ */ e(
|
|
6077
|
+
/* @__PURE__ */ e(Qe, {}),
|
|
6078
|
+
/* @__PURE__ */ e(st, {})
|
|
6082
6079
|
] })
|
|
6083
6080
|
] })
|
|
6084
6081
|
] }) });
|
|
@@ -6120,8 +6117,8 @@ function Pi() {
|
|
|
6120
6117
|
),
|
|
6121
6118
|
!["kpi"].includes(t) && /* @__PURE__ */ r("div", { className: "space-y-4", children: [
|
|
6122
6119
|
/* @__PURE__ */ e(pn, {}),
|
|
6123
|
-
/* @__PURE__ */ e(
|
|
6124
|
-
/* @__PURE__ */ e(
|
|
6120
|
+
/* @__PURE__ */ e(Qe, {}),
|
|
6121
|
+
/* @__PURE__ */ e(st, {})
|
|
6125
6122
|
] })
|
|
6126
6123
|
] });
|
|
6127
6124
|
}
|
|
@@ -6742,7 +6739,7 @@ function Wi() {
|
|
|
6742
6739
|
)
|
|
6743
6740
|
] }) }),
|
|
6744
6741
|
/* @__PURE__ */ e(Te, { className: "my-4" }),
|
|
6745
|
-
/* @__PURE__ */ e(
|
|
6742
|
+
/* @__PURE__ */ e(Qe, {})
|
|
6746
6743
|
] });
|
|
6747
6744
|
}
|
|
6748
6745
|
function Ki() {
|
|
@@ -6818,8 +6815,8 @@ function ht({
|
|
|
6818
6815
|
!["range", "text"].includes(t) && /* @__PURE__ */ r(le, { value: "item-3", children: [
|
|
6819
6816
|
/* @__PURE__ */ e(ie, { children: "Filters" }),
|
|
6820
6817
|
/* @__PURE__ */ r(oe, { className: "space-y-4 px-2", children: [
|
|
6821
|
-
/* @__PURE__ */ e(
|
|
6822
|
-
/* @__PURE__ */ e(
|
|
6818
|
+
/* @__PURE__ */ e(Qe, {}),
|
|
6819
|
+
/* @__PURE__ */ e(st, {})
|
|
6823
6820
|
] })
|
|
6824
6821
|
] })
|
|
6825
6822
|
] }) });
|
|
@@ -6897,8 +6894,8 @@ function Yi() {
|
|
|
6897
6894
|
/* @__PURE__ */ r(le, { value: "item-3", children: [
|
|
6898
6895
|
/* @__PURE__ */ e(ie, { children: "Filters" }),
|
|
6899
6896
|
/* @__PURE__ */ r(oe, { className: "space-y-4 px-2", children: [
|
|
6900
|
-
/* @__PURE__ */ e(
|
|
6901
|
-
/* @__PURE__ */ e(
|
|
6897
|
+
/* @__PURE__ */ e(Qe, {}),
|
|
6898
|
+
/* @__PURE__ */ e(st, {})
|
|
6902
6899
|
] })
|
|
6903
6900
|
] })
|
|
6904
6901
|
] }) });
|
|
@@ -6917,8 +6914,8 @@ function Zi({
|
|
|
6917
6914
|
/* @__PURE__ */ e(Fe, { defaultValue: ["item-3"], type: "multiple", children: /* @__PURE__ */ r(le, { value: "item-3", children: [
|
|
6918
6915
|
/* @__PURE__ */ e(ie, { children: "Filters" }),
|
|
6919
6916
|
/* @__PURE__ */ r(oe, { className: "space-y-4 px-2", children: [
|
|
6920
|
-
/* @__PURE__ */ e(
|
|
6921
|
-
/* @__PURE__ */ e(
|
|
6917
|
+
/* @__PURE__ */ e(Qe, {}),
|
|
6918
|
+
/* @__PURE__ */ e(st, {})
|
|
6922
6919
|
] })
|
|
6923
6920
|
] }) }),
|
|
6924
6921
|
/* @__PURE__ */ r("div", { className: "flex items-center space-x-2", children: [
|
|
@@ -7032,9 +7029,9 @@ function no() {
|
|
|
7032
7029
|
return /* @__PURE__ */ e(Pi, {});
|
|
7033
7030
|
}
|
|
7034
7031
|
}
|
|
7035
|
-
return /* @__PURE__ */ r(
|
|
7032
|
+
return /* @__PURE__ */ r(ot, { className: "h-full w-full text-sm", children: [
|
|
7036
7033
|
a(t),
|
|
7037
|
-
/* @__PURE__ */ e(
|
|
7034
|
+
/* @__PURE__ */ e(et, { orientation: "horizontal" })
|
|
7038
7035
|
] });
|
|
7039
7036
|
}
|
|
7040
7037
|
function hs({
|
|
@@ -7109,7 +7106,7 @@ function so({ column: t }) {
|
|
|
7109
7106
|
const o = {
|
|
7110
7107
|
...t,
|
|
7111
7108
|
aggregate: l,
|
|
7112
|
-
label:
|
|
7109
|
+
label: it(t.name, l)
|
|
7113
7110
|
};
|
|
7114
7111
|
a(t.id, o);
|
|
7115
7112
|
}
|
|
@@ -7223,7 +7220,7 @@ function oo({ column: t }) {
|
|
|
7223
7220
|
), u = i ? n.indexOf(i) : -1;
|
|
7224
7221
|
return /* @__PURE__ */ r("div", { className: "space-y-3", children: [
|
|
7225
7222
|
i && /* @__PURE__ */ e(us, { idx: u, col: i, children: /* @__PURE__ */ e(
|
|
7226
|
-
|
|
7223
|
+
Ke,
|
|
7227
7224
|
{
|
|
7228
7225
|
enabled: !0,
|
|
7229
7226
|
className: "w-[130px]",
|
|
@@ -7241,7 +7238,7 @@ function oo({ column: t }) {
|
|
|
7241
7238
|
o && /* @__PURE__ */ r("div", { className: "flex items-center justify-between gap-2", children: [
|
|
7242
7239
|
/* @__PURE__ */ e(G, { children: "Pivot Header" }),
|
|
7243
7240
|
/* @__PURE__ */ e(
|
|
7244
|
-
|
|
7241
|
+
Ke,
|
|
7245
7242
|
{
|
|
7246
7243
|
enabled: !0,
|
|
7247
7244
|
text: t.aliasTemplate || "",
|
|
@@ -7333,7 +7330,7 @@ function co({
|
|
|
7333
7330
|
name: M.column_name,
|
|
7334
7331
|
type: S,
|
|
7335
7332
|
role: "metric",
|
|
7336
|
-
label:
|
|
7333
|
+
label: it(M.column_name, "SUM"),
|
|
7337
7334
|
aggregate: E ? "SUM" : "COUNT"
|
|
7338
7335
|
};
|
|
7339
7336
|
u(t.id, q);
|
|
@@ -7540,7 +7537,7 @@ function mo() {
|
|
|
7540
7537
|
return /* @__PURE__ */ e(
|
|
7541
7538
|
on,
|
|
7542
7539
|
{
|
|
7543
|
-
items: t.map((y) =>
|
|
7540
|
+
items: t.map((y) => lt(y.columnId)),
|
|
7544
7541
|
children: /* @__PURE__ */ r("div", { className: "space-y-2 rounded-md p-4 text-sm", children: [
|
|
7545
7542
|
/* @__PURE__ */ e(G, { className: "text-sm", children: "Sort By" }),
|
|
7546
7543
|
g.length > 0 && /* @__PURE__ */ e("div", { className: "mr-5", children: /* @__PURE__ */ e(
|
|
@@ -7561,7 +7558,7 @@ function mo() {
|
|
|
7561
7558
|
return /* @__PURE__ */ e(
|
|
7562
7559
|
ps,
|
|
7563
7560
|
{
|
|
7564
|
-
id:
|
|
7561
|
+
id: lt(y.columnId),
|
|
7565
7562
|
type: hn,
|
|
7566
7563
|
children: /* @__PURE__ */ e(
|
|
7567
7564
|
"div",
|
|
@@ -7596,7 +7593,7 @@ function mo() {
|
|
|
7596
7593
|
y.columnId
|
|
7597
7594
|
)
|
|
7598
7595
|
},
|
|
7599
|
-
|
|
7596
|
+
lt(y.columnId)
|
|
7600
7597
|
);
|
|
7601
7598
|
})
|
|
7602
7599
|
] })
|
|
@@ -7680,7 +7677,7 @@ function ho() {
|
|
|
7680
7677
|
),
|
|
7681
7678
|
/* @__PURE__ */ e(mo, {})
|
|
7682
7679
|
] }),
|
|
7683
|
-
/* @__PURE__ */ e(
|
|
7680
|
+
/* @__PURE__ */ e(et, { orientation: "horizontal" })
|
|
7684
7681
|
] })
|
|
7685
7682
|
] });
|
|
7686
7683
|
}
|
|
@@ -8186,7 +8183,7 @@ function No() {
|
|
|
8186
8183
|
variant: "secondary",
|
|
8187
8184
|
onClick: T,
|
|
8188
8185
|
children: [
|
|
8189
|
-
/* @__PURE__ */ e(
|
|
8186
|
+
/* @__PURE__ */ e(Ze, { className: "mr-2 size-3" }),
|
|
8190
8187
|
"Current Table"
|
|
8191
8188
|
]
|
|
8192
8189
|
}
|
|
@@ -8219,7 +8216,7 @@ function No() {
|
|
|
8219
8216
|
onClick: () => {
|
|
8220
8217
|
N([]), p();
|
|
8221
8218
|
},
|
|
8222
|
-
children: /* @__PURE__ */ e(
|
|
8219
|
+
children: /* @__PURE__ */ e(Ze, { className: "size-4 text-muted-foreground" })
|
|
8223
8220
|
}
|
|
8224
8221
|
),
|
|
8225
8222
|
/* @__PURE__ */ e(
|
|
@@ -8388,7 +8385,7 @@ function So() {
|
|
|
8388
8385
|
}
|
|
8389
8386
|
function ko() {
|
|
8390
8387
|
const t = f((o) => o.selectedDatabaseName), a = f((o) => o.selectedTableName), n = L((o) => o.dashboard.filters) || [], { columns: s } = xe(), { assignFilter: l } = ms();
|
|
8391
|
-
return /* @__PURE__ */ e(
|
|
8388
|
+
return /* @__PURE__ */ e(ot, { className: "flex-1 basis-0 flex-col px-3", children: s == null ? void 0 : s.map((o) => {
|
|
8392
8389
|
const i = n == null ? void 0 : n.find(
|
|
8393
8390
|
(u) => u.column === be(o.column_name) && u.table === a && u.database === t
|
|
8394
8391
|
);
|
|
@@ -8572,7 +8569,7 @@ export {
|
|
|
8572
8569
|
Ro as DashboardWC,
|
|
8573
8570
|
Ko as EMPTY_SELECTION,
|
|
8574
8571
|
Wl as ScheduleDashboard,
|
|
8575
|
-
|
|
8572
|
+
rt as SelectComponent,
|
|
8576
8573
|
qo as SemaphorDataProvider,
|
|
8577
8574
|
jo as SemaphorQueryClient,
|
|
8578
8575
|
Lo as Surfboard,
|