react-semaphor 0.0.440 → 0.0.441
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-DZVUg4jE.js → index-1ptj-DdW.js} +82 -82
- package/dist/chunks/{index-B5cVrMjI.js → index-CVGp1HR6.js} +6984 -6967
- package/dist/dashboard/index.cjs +1 -1
- package/dist/dashboard/index.js +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.js +186 -181
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c as A, p as nn, u as _, a as rt, b as Ve, d as
|
|
2
|
-
import { D as Go, cs as Uo, cq as $o, cq as Qo, cv as Ko, cu as Jo, ct as Wo, cw as Yo, cx as Zo, cr as Xo, co as ec, cp as tc } from "./chunks/index-
|
|
1
|
+
import { c as A, p as nn, u as _, a as rt, b as Ve, d as jn, e as Bn, B as ee, P as mt, f as Pn, g as Hn, h as Gn, i as Un, L as U, I as he, j as $n, k as Qn, l as Kn, m as X, n as Jn, o as Wn, q as Yn, r as ks, s as On, t as G, C as an, v as Ms, S as ke, w as Me, x as De, y as Ie, z as Fe, A as Oe, E as ue, T as Zn, F as Je, G as We, H as It, J as ze, K as sn, M as Ot, N as rn, O as Tt, Q as Le, R as Xn, U as zt, V as ea, W as Ae, X as Tn, Y as Re, Z as f, _ as ta, $ as nt, a0 as bt, a1 as Ds, a2 as na, a3 as aa, a4 as sa, a5 as ra, a6 as ia, a7 as la, a8 as oa, a9 as ca, aa as da, ab as ua, ac as ma, ad as ha, ae as xe, af as Is, ag as Se, ah as $e, ai as we, aj as Os, ak as Ts, al as zs, am as vt, an as Ee, ao as As, ap as xt, aq as Fs, ar as W, as as Ls, at as Es, au as _s, av as Jt, aw as pa, ax as ln, ay as At, az as Qe, aA as fa, aB as Ct, aC as ge, aD as Vs, aE as qs, aF as it, aG as Rs, aH as js, aI as Bs, aJ as ga, aK as Ps, aL as Ft, aM as Hs, aN as Gs, aO as Us, aP as zn, aQ as $s, aR as Qs, aS as on, aT as Ce, aU as Ks, aV as Wt, aW as je, aX as pe, aY as Be, aZ as Js, a_ as Ws, a$ as Ys, b0 as Zs, b1 as Xs, b2 as Rt, b3 as er, b4 as An, b5 as tr, b6 as Fn, b7 as nr, b8 as ar, b9 as sr, ba as rr, bb as ya, bc as ir, bd as cn, be as ba, bf as lr, bg as or, bh as et, bi as cr, bj as dr, bk as va, bl as ur, bm as mr, bn as hr, bo as pr, bp as fr, bq as Lt, br as xa, bs as gr, bt as dn, bu as un, bv as tt, bw as yt, bx as yr, by as br, bz as vr, bA as mn, bB as Ca, bC as Na, bD as Nt, bE as xr, bF as St, bG as Sa, bH as wa, bI as ka, bJ as Cr, bK as Nr, bL as Sr, bM as wr, bN as qe, bO as le, bP as oe, bQ as ce, bR as hn, bS as kr, bT as Mr, bU as Dr, bV as Ir, bW as Ln, bX as Ma, bY as Or, bZ as Tr, b_ as zr, b$ as Ar, c0 as pn, c1 as Da, c2 as Ia, c3 as fn, c4 as Fr, c5 as Oa, c6 as Lr, c7 as Er, c8 as _r, c9 as Vr, ca as qr, cb as Rr, cc as jr, cd as Br, ce as Pr, cf as jt, cg as Ta, ch as Hr, ci as Gr, cj as Ur, ck as $r, cl as Qr, cm as Kr, cn as Jr } from "./chunks/index-CVGp1HR6.js";
|
|
2
|
+
import { D as Go, cs as Uo, cq as $o, cq as Qo, cv as Ko, cu as Jo, ct as Wo, cw as Yo, cx as Zo, cr as Xo, co as ec, cp as tc } from "./chunks/index-CVGp1HR6.js";
|
|
3
3
|
import { jsxs as r, jsx as e, Fragment as ae } from "react/jsx-runtime";
|
|
4
4
|
import * as Xe from "react";
|
|
5
5
|
import _e, { useState as J, useMemo as Pe, useEffect as me, useRef as at, useCallback as za, Suspense as Wr } from "react";
|
|
@@ -243,7 +243,7 @@ const mi = A("ChartArea", [
|
|
|
243
243
|
* This source code is licensed under the ISC license.
|
|
244
244
|
* See the LICENSE file in the root directory of this source tree.
|
|
245
245
|
*/
|
|
246
|
-
const
|
|
246
|
+
const gn = A("ChartColumnIncreasing", [
|
|
247
247
|
["path", { d: "M13 17V9", key: "1fwyjl" }],
|
|
248
248
|
["path", { d: "M18 17V5", key: "sfb6ij" }],
|
|
249
249
|
["path", { d: "M3 3v16a2 2 0 0 0 2 2h16", key: "c24i48" }],
|
|
@@ -268,7 +268,7 @@ const Fa = A("ChartColumnStacked", [
|
|
|
268
268
|
* This source code is licensed under the ISC license.
|
|
269
269
|
* See the LICENSE file in the root directory of this source tree.
|
|
270
270
|
*/
|
|
271
|
-
const
|
|
271
|
+
const yn = A("ChartLine", [
|
|
272
272
|
["path", { d: "M3 3v16a2 2 0 0 0 2 2h16", key: "c24i48" }],
|
|
273
273
|
["path", { d: "m19 9-5 5-4-4-3 3", key: "2osh9i" }]
|
|
274
274
|
]);
|
|
@@ -918,7 +918,7 @@ const Gi = A("Square", [
|
|
|
918
918
|
* This source code is licensed under the ISC license.
|
|
919
919
|
* See the LICENSE file in the root directory of this source tree.
|
|
920
920
|
*/
|
|
921
|
-
const
|
|
921
|
+
const bn = A("Table2", [
|
|
922
922
|
[
|
|
923
923
|
"path",
|
|
924
924
|
{
|
|
@@ -1088,8 +1088,8 @@ function Zi() {
|
|
|
1088
1088
|
);
|
|
1089
1089
|
v && (o([...i || [], v]), l(v.id), d(!1)), c(!1);
|
|
1090
1090
|
}
|
|
1091
|
-
return /* @__PURE__ */ r(
|
|
1092
|
-
/* @__PURE__ */ e(
|
|
1091
|
+
return /* @__PURE__ */ r(jn, { open: h, onOpenChange: d, children: [
|
|
1092
|
+
/* @__PURE__ */ e(Bn, { asChild: !0, children: /* @__PURE__ */ r(
|
|
1093
1093
|
ee,
|
|
1094
1094
|
{
|
|
1095
1095
|
variant: "secondary",
|
|
@@ -1101,10 +1101,10 @@ function Zi() {
|
|
|
1101
1101
|
]
|
|
1102
1102
|
}
|
|
1103
1103
|
) }),
|
|
1104
|
-
/* @__PURE__ */ r(
|
|
1105
|
-
/* @__PURE__ */ r(
|
|
1106
|
-
/* @__PURE__ */ e(
|
|
1107
|
-
/* @__PURE__ */ e(
|
|
1104
|
+
/* @__PURE__ */ r(Pn, { className: "sm:max-w-[425px]", children: [
|
|
1105
|
+
/* @__PURE__ */ r(Hn, { children: [
|
|
1106
|
+
/* @__PURE__ */ e(Gn, { children: "Create Lens" }),
|
|
1107
|
+
/* @__PURE__ */ e(Un, { children: "Lenses are private by default and are only visible to you." })
|
|
1108
1108
|
] }),
|
|
1109
1109
|
/* @__PURE__ */ e("div", { className: "grid gap-4 py-4", children: /* @__PURE__ */ r("div", { className: "grid grid-cols-8 items-center gap-4", children: [
|
|
1110
1110
|
/* @__PURE__ */ e(U, { className: "text-right", children: "Name" }),
|
|
@@ -1121,7 +1121,7 @@ function Zi() {
|
|
|
1121
1121
|
)
|
|
1122
1122
|
] }) }),
|
|
1123
1123
|
n && /* @__PURE__ */ e("p", { className: "text-sm", children: "The lens name already exists. Use a differnet name." }),
|
|
1124
|
-
/* @__PURE__ */ e(
|
|
1124
|
+
/* @__PURE__ */ e($n, { children: /* @__PURE__ */ e(
|
|
1125
1125
|
ee,
|
|
1126
1126
|
{
|
|
1127
1127
|
size: "sm",
|
|
@@ -1169,20 +1169,20 @@ function Xi() {
|
|
|
1169
1169
|
await Yt(C, l == null ? void 0 : l.accessToken);
|
|
1170
1170
|
}
|
|
1171
1171
|
}
|
|
1172
|
-
return /* @__PURE__ */ r(
|
|
1173
|
-
/* @__PURE__ */ e(
|
|
1174
|
-
/* @__PURE__ */ r(
|
|
1175
|
-
/* @__PURE__ */ e(
|
|
1176
|
-
/* @__PURE__ */ e(
|
|
1172
|
+
return /* @__PURE__ */ r(Qn, { open: t, onOpenChange: a, children: [
|
|
1173
|
+
/* @__PURE__ */ e(Kn, { asChild: !0, children: /* @__PURE__ */ e(X, { tooltip: "Lenses", className: "h-7 p-2", children: /* @__PURE__ */ e(ki, { className: "h-4 w-4" }) }) }),
|
|
1174
|
+
/* @__PURE__ */ r(Jn, { align: "end", className: "w-60", children: [
|
|
1175
|
+
/* @__PURE__ */ e(Wn, { className: "px-3", children: "Lenses" }),
|
|
1176
|
+
/* @__PURE__ */ e(Yn, {}),
|
|
1177
1177
|
/* @__PURE__ */ r(
|
|
1178
1178
|
ks,
|
|
1179
1179
|
{
|
|
1180
1180
|
value: s,
|
|
1181
1181
|
onValueChange: u,
|
|
1182
1182
|
children: [
|
|
1183
|
-
/* @__PURE__ */ e(
|
|
1183
|
+
/* @__PURE__ */ e(On, { value: "original", children: "Original" }),
|
|
1184
1184
|
n == null ? void 0 : n.map((d) => /* @__PURE__ */ r(
|
|
1185
|
-
|
|
1185
|
+
On,
|
|
1186
1186
|
{
|
|
1187
1187
|
className: "group flex justify-between gap-2",
|
|
1188
1188
|
value: d.id,
|
|
@@ -1312,7 +1312,7 @@ function ye({
|
|
|
1312
1312
|
}
|
|
1313
1313
|
);
|
|
1314
1314
|
}
|
|
1315
|
-
const
|
|
1315
|
+
const En = [
|
|
1316
1316
|
{ value: "daily", label: "Daily" },
|
|
1317
1317
|
{ value: "weekly", label: "Weekly" },
|
|
1318
1318
|
{ value: "biweekly", label: "Bi-Weekly" },
|
|
@@ -1328,8 +1328,8 @@ function nl({
|
|
|
1328
1328
|
status: i,
|
|
1329
1329
|
error: o,
|
|
1330
1330
|
isDeleting: l
|
|
1331
|
-
} = al(), [u, c] = J(""), [h, d] = J(
|
|
1332
|
-
return /* @__PURE__ */ e(
|
|
1331
|
+
} = al(), [u, c] = J(""), [h, d] = J(En[0].value), [y, x] = J("06:00"), [m, C] = J("");
|
|
1332
|
+
return /* @__PURE__ */ e(Zn, { delayDuration: 0, children: /* @__PURE__ */ r(Je, { children: [
|
|
1333
1333
|
/* @__PURE__ */ e(We, { asChild: !0, children: /* @__PURE__ */ e(
|
|
1334
1334
|
X,
|
|
1335
1335
|
{
|
|
@@ -1378,7 +1378,7 @@ function nl({
|
|
|
1378
1378
|
{
|
|
1379
1379
|
className: "col-span-2 h-8",
|
|
1380
1380
|
label: "Select Frequency",
|
|
1381
|
-
options:
|
|
1381
|
+
options: En,
|
|
1382
1382
|
value: h,
|
|
1383
1383
|
onValueChange: (p) => d(p)
|
|
1384
1384
|
}
|
|
@@ -1428,7 +1428,7 @@ function nl({
|
|
|
1428
1428
|
/* @__PURE__ */ e("h4", { className: "font-medium leading-none", children: "Subscriptions" }),
|
|
1429
1429
|
/* @__PURE__ */ e("p", { className: "text-sm text-muted-foreground", children: "Active email subscriptions" })
|
|
1430
1430
|
] }),
|
|
1431
|
-
|
|
1431
|
+
Xn
|
|
1432
1432
|
] }) }),
|
|
1433
1433
|
/* @__PURE__ */ e("div", { className: "grid gap-2", children: a == null ? void 0 : a.map((p) => /* @__PURE__ */ r(
|
|
1434
1434
|
"div",
|
|
@@ -1444,13 +1444,13 @@ function nl({
|
|
|
1444
1444
|
] }) }),
|
|
1445
1445
|
/* @__PURE__ */ r("div", { className: "col-span-2 flex items-center justify-end gap-4", children: [
|
|
1446
1446
|
/* @__PURE__ */ e(
|
|
1447
|
-
|
|
1447
|
+
_n,
|
|
1448
1448
|
{
|
|
1449
1449
|
tooltip: `Next Run: ${new Date(p.nextRun).toLocaleString()} ${p.timezone}`,
|
|
1450
1450
|
children: /* @__PURE__ */ e(hi, { className: "size-3.5" })
|
|
1451
1451
|
}
|
|
1452
1452
|
),
|
|
1453
|
-
/* @__PURE__ */ e(
|
|
1453
|
+
/* @__PURE__ */ e(_n, { tooltip: `${p.endUserEmail}`, children: /* @__PURE__ */ e(Li, { className: "size-3.5" }) }),
|
|
1454
1454
|
l === p.id ? /* @__PURE__ */ e(Ke, { className: "size-3.5 animate-spin" }) : /* @__PURE__ */ e(
|
|
1455
1455
|
Qi,
|
|
1456
1456
|
{
|
|
@@ -1468,15 +1468,15 @@ function nl({
|
|
|
1468
1468
|
] }) })
|
|
1469
1469
|
] }) });
|
|
1470
1470
|
}
|
|
1471
|
-
const
|
|
1471
|
+
const _n = ({
|
|
1472
1472
|
children: t,
|
|
1473
1473
|
tooltip: a
|
|
1474
|
-
}) => /* @__PURE__ */ e(
|
|
1474
|
+
}) => /* @__PURE__ */ e(Zn, { delayDuration: 0, children: /* @__PURE__ */ r(Ot, { children: [
|
|
1475
1475
|
/* @__PURE__ */ e(rn, { asChild: !0, children: t }),
|
|
1476
1476
|
/* @__PURE__ */ e(Tt, { children: a })
|
|
1477
1477
|
] }) });
|
|
1478
1478
|
function al() {
|
|
1479
|
-
const [t, a] = J("idle"), [n, s] = J(""), [i, o] = J(null), l = _((S) => S.authToken), u = _((S) => S.dashboard.id), c = _((S) => S.dashboard.title), { endUserId: h } =
|
|
1479
|
+
const [t, a] = J("idle"), [n, s] = J(""), [i, o] = J(null), l = _((S) => S.authToken), u = _((S) => S.dashboard.id), c = _((S) => S.dashboard.title), { endUserId: h } = ea((l == null ? void 0 : l.accessToken) || ""), d = "https://semaphor.cloud/api/v1/subscriptions/get", y = {
|
|
1480
1480
|
dashboardId: u,
|
|
1481
1481
|
endUserId: h
|
|
1482
1482
|
}, { data: x, isLoading: m, isError: C, isFetching: p, refetch: v } = Ae({
|
|
@@ -1504,7 +1504,7 @@ function al() {
|
|
|
1504
1504
|
a("loading");
|
|
1505
1505
|
const V = "https://semaphor.cloud/api/v1/subscriptions/create";
|
|
1506
1506
|
try {
|
|
1507
|
-
const Z = await
|
|
1507
|
+
const Z = await Tn(
|
|
1508
1508
|
V,
|
|
1509
1509
|
(R == null ? void 0 : R.accessToken) || "",
|
|
1510
1510
|
{
|
|
@@ -1522,7 +1522,7 @@ function al() {
|
|
|
1522
1522
|
const z = "https://semaphor.cloud/api/v1/subscriptions/delete";
|
|
1523
1523
|
o(S);
|
|
1524
1524
|
try {
|
|
1525
|
-
await
|
|
1525
|
+
await Tn(z, (l == null ? void 0 : l.accessToken) || "", { id: S }), v(), setTimeout(() => {
|
|
1526
1526
|
o(null);
|
|
1527
1527
|
}, 2e3);
|
|
1528
1528
|
} catch (k) {
|
|
@@ -1560,7 +1560,7 @@ function sl() {
|
|
|
1560
1560
|
), { addFrame: C, setSelectedFrameId: p } = _(
|
|
1561
1561
|
(M) => M.actions
|
|
1562
1562
|
), { getSelectedSheet: v, setIsDashboardEditing: g, setShowDashboardJSON: N } = _((M) => M.actions), S = v(), { tenantId: z, endUserId: k } = Pe(
|
|
1563
|
-
() =>
|
|
1563
|
+
() => ea(t == null ? void 0 : t.accessToken),
|
|
1564
1564
|
[t == null ? void 0 : t.accessToken]
|
|
1565
1565
|
), O = Pe(() => z || k, [z, k]), R = () => {
|
|
1566
1566
|
if (!o || !S) return;
|
|
@@ -1634,7 +1634,7 @@ function sl() {
|
|
|
1634
1634
|
className: "h-7 p-2",
|
|
1635
1635
|
onClick: j,
|
|
1636
1636
|
size: "sm",
|
|
1637
|
-
children: /* @__PURE__ */ e(
|
|
1637
|
+
children: /* @__PURE__ */ e(ta, { className: "h-4 w-4" })
|
|
1638
1638
|
}
|
|
1639
1639
|
),
|
|
1640
1640
|
o && !d && /* @__PURE__ */ e(
|
|
@@ -1721,9 +1721,9 @@ function rl({
|
|
|
1721
1721
|
{
|
|
1722
1722
|
className: "w-full p-0",
|
|
1723
1723
|
style: { minWidth: m },
|
|
1724
|
-
children: /* @__PURE__ */ r(
|
|
1724
|
+
children: /* @__PURE__ */ r(na, { children: [
|
|
1725
1725
|
/* @__PURE__ */ r("div", { className: "flex h-9 items-center justify-between border-b pr-1", children: [
|
|
1726
|
-
/* @__PURE__ */ e(
|
|
1726
|
+
/* @__PURE__ */ e(aa, { className: "h-9", placeholder: "Search..." }),
|
|
1727
1727
|
/* @__PURE__ */ e(X, { className: "h-7", onClick: l, children: /* @__PURE__ */ e(
|
|
1728
1728
|
Ua,
|
|
1729
1729
|
{
|
|
@@ -1734,14 +1734,14 @@ function rl({
|
|
|
1734
1734
|
}
|
|
1735
1735
|
) })
|
|
1736
1736
|
] }),
|
|
1737
|
-
/* @__PURE__ */ r(
|
|
1738
|
-
/* @__PURE__ */ r(
|
|
1737
|
+
/* @__PURE__ */ r(sa, { children: [
|
|
1738
|
+
/* @__PURE__ */ r(ra, { children: [
|
|
1739
1739
|
"No ",
|
|
1740
1740
|
t == null ? void 0 : t.toLowerCase(),
|
|
1741
1741
|
" found."
|
|
1742
1742
|
] }),
|
|
1743
|
-
/* @__PURE__ */ e(
|
|
1744
|
-
|
|
1743
|
+
/* @__PURE__ */ e(ia, { children: p == null ? void 0 : p.map((N) => /* @__PURE__ */ e(
|
|
1744
|
+
la,
|
|
1745
1745
|
{
|
|
1746
1746
|
className: "overflow-x-auto",
|
|
1747
1747
|
value: N.name,
|
|
@@ -1790,7 +1790,7 @@ function ct({
|
|
|
1790
1790
|
if (t === "Schema")
|
|
1791
1791
|
return /* @__PURE__ */ e(qi, { className: "size-4" });
|
|
1792
1792
|
if (t === "Table")
|
|
1793
|
-
return /* @__PURE__ */ e(
|
|
1793
|
+
return /* @__PURE__ */ e(bn, { className: "size-4" });
|
|
1794
1794
|
if (t === "Model")
|
|
1795
1795
|
return /* @__PURE__ */ e(di, { className: "size-4" });
|
|
1796
1796
|
}
|
|
@@ -1850,7 +1850,7 @@ function ct({
|
|
|
1850
1850
|
}
|
|
1851
1851
|
);
|
|
1852
1852
|
}
|
|
1853
|
-
return /* @__PURE__ */ e(
|
|
1853
|
+
return /* @__PURE__ */ e(oa, { delayDuration: 0, children: /* @__PURE__ */ e("div", { className: "flex items-center gap-2", children: d === "select" ? m() : C() }) });
|
|
1854
1854
|
}
|
|
1855
1855
|
function il({ column: t }) {
|
|
1856
1856
|
const [a, n] = J(!1), s = f((p) => p.selectedTableName), i = f(
|
|
@@ -1862,11 +1862,11 @@ function il({ column: t }) {
|
|
|
1862
1862
|
), u = f((p) => p.sqlGen), { modelItems: c, connectionType: h } = Ne(), d = f((p) => p.actions.setSqlGen), y = f((p) => p.actions.setCardSql), x = f((p) => p.actions.setRunSql);
|
|
1863
1863
|
function m(p, v) {
|
|
1864
1864
|
var z;
|
|
1865
|
-
const g =
|
|
1865
|
+
const g = ma(p, u, v), N = (z = c == null ? void 0 : c.find(
|
|
1866
1866
|
(k) => k.id === l
|
|
1867
1867
|
)) == null ? void 0 : z.name;
|
|
1868
1868
|
d(g);
|
|
1869
|
-
const S =
|
|
1869
|
+
const S = ha(
|
|
1870
1870
|
g,
|
|
1871
1871
|
xe(i || ""),
|
|
1872
1872
|
xe(s),
|
|
@@ -1920,10 +1920,10 @@ function il({ column: t }) {
|
|
|
1920
1920
|
)
|
|
1921
1921
|
] });
|
|
1922
1922
|
}
|
|
1923
|
-
return /* @__PURE__ */ r(
|
|
1924
|
-
/* @__PURE__ */ e(
|
|
1923
|
+
return /* @__PURE__ */ r(ca, { openDelay: 0, open: a, onOpenChange: n, children: [
|
|
1924
|
+
/* @__PURE__ */ e(da, { asChild: !0, children: /* @__PURE__ */ e(Ra, { className: "invisible size-3.5 cursor-pointer text-foreground/40 group-hover:visible" }) }),
|
|
1925
1925
|
/* @__PURE__ */ e(
|
|
1926
|
-
|
|
1926
|
+
ua,
|
|
1927
1927
|
{
|
|
1928
1928
|
align: "center",
|
|
1929
1929
|
className: "w-20 rounded-md p-0 shadow-none",
|
|
@@ -1932,9 +1932,9 @@ function il({ column: t }) {
|
|
|
1932
1932
|
)
|
|
1933
1933
|
] });
|
|
1934
1934
|
}
|
|
1935
|
-
function
|
|
1935
|
+
function vn({ column: t }) {
|
|
1936
1936
|
return /* @__PURE__ */ r(Ot, { children: [
|
|
1937
|
-
/* @__PURE__ */ e(Is, { className: "shrink-0", asChild: !0, children: Se(t.data_type) ? /* @__PURE__ */ e(Ja, { className: "size-3 text-muted-foreground" }) : $e(t.data_type) ? /* @__PURE__ */ e(Pa, { className: "size-3 text-muted-foreground" }) : we(t.data_type) ? /* @__PURE__ */ e(Os, { className: "size-3 text-muted-foreground" }) : Ts(t.data_type) ? /* @__PURE__ */ e($i, { className: "size-3 text-muted-foreground" }) : t.data_type.
|
|
1937
|
+
/* @__PURE__ */ e(Is, { className: "shrink-0", asChild: !0, children: Se(t.data_type) ? /* @__PURE__ */ e(Ja, { className: "size-3 text-muted-foreground" }) : $e(t.data_type) ? /* @__PURE__ */ e(Pa, { className: "size-3 text-muted-foreground" }) : we(t.data_type) ? /* @__PURE__ */ e(Os, { className: "size-3 text-muted-foreground" }) : Ts(t.data_type) ? /* @__PURE__ */ e($i, { className: "size-3 text-muted-foreground" }) : t.data_type.startsWith("json") ? /* @__PURE__ */ e(ui, { className: "size-3 text-muted-foreground" }) : /* @__PURE__ */ e(Pi, { className: "size-3 text-muted-foreground" }) }),
|
|
1938
1938
|
/* @__PURE__ */ e(Tt, { children: /* @__PURE__ */ e("p", { className: "text-xs", children: t.data_type }) })
|
|
1939
1939
|
] });
|
|
1940
1940
|
}
|
|
@@ -1950,7 +1950,7 @@ function Bt({
|
|
|
1950
1950
|
a
|
|
1951
1951
|
),
|
|
1952
1952
|
children: [
|
|
1953
|
-
/* @__PURE__ */ e(
|
|
1953
|
+
/* @__PURE__ */ e(vn, { column: t }),
|
|
1954
1954
|
/* @__PURE__ */ e("span", { children: t.column_name })
|
|
1955
1955
|
]
|
|
1956
1956
|
}
|
|
@@ -2062,7 +2062,7 @@ function Za(t) {
|
|
|
2062
2062
|
currentConnection: u
|
|
2063
2063
|
};
|
|
2064
2064
|
}
|
|
2065
|
-
function
|
|
2065
|
+
function xn(t) {
|
|
2066
2066
|
var v;
|
|
2067
2067
|
const a = _((g) => g.authToken) || t, n = f(
|
|
2068
2068
|
(g) => g.selectedConnectionId
|
|
@@ -2126,7 +2126,7 @@ function vn(t) {
|
|
|
2126
2126
|
};
|
|
2127
2127
|
}
|
|
2128
2128
|
function Ne(t, a) {
|
|
2129
|
-
var
|
|
2129
|
+
var wn, kn, Mn, Dn, In;
|
|
2130
2130
|
const n = Ve().authToken || t, s = f(
|
|
2131
2131
|
(B) => B.selectedConnectionId
|
|
2132
2132
|
), i = f(
|
|
@@ -2239,7 +2239,7 @@ function Ne(t, a) {
|
|
|
2239
2239
|
isColumnsFetching: ne,
|
|
2240
2240
|
isColumnsError: K,
|
|
2241
2241
|
refetchColumns: de
|
|
2242
|
-
} =
|
|
2242
|
+
} = xn(t);
|
|
2243
2243
|
me(() => {
|
|
2244
2244
|
(j === "S3" || j === "API") && (d(""), y(""), h(""), j === "API" && x("api"));
|
|
2245
2245
|
}, [
|
|
@@ -2249,7 +2249,7 @@ function Ne(t, a) {
|
|
|
2249
2249
|
y,
|
|
2250
2250
|
h
|
|
2251
2251
|
]);
|
|
2252
|
-
const q = (S == null ? void 0 : S.type) === "API" ? (
|
|
2252
|
+
const q = (S == null ? void 0 : S.type) === "API" ? (wn = S == null ? void 0 : S.type) == null ? void 0 : wn.toLowerCase() : u || "", te = Y ? "" : l || "";
|
|
2253
2253
|
function fe(B) {
|
|
2254
2254
|
y(B), x("");
|
|
2255
2255
|
}
|
|
@@ -2262,14 +2262,14 @@ function Ne(t, a) {
|
|
|
2262
2262
|
function Et(B) {
|
|
2263
2263
|
h(B === "none" ? "" : B), B !== "none" && B !== "" && d("");
|
|
2264
2264
|
}
|
|
2265
|
-
M && ((
|
|
2265
|
+
M && ((kn = M == null ? void 0 : M.databases) == null ? void 0 : kn.length) > 0, b && ((Mn = b == null ? void 0 : b.schemas) == null ? void 0 : Mn.length) > 0;
|
|
2266
2266
|
const _t = v == null ? void 0 : v.connections.map(
|
|
2267
2267
|
(B) => ({
|
|
2268
2268
|
id: B.id,
|
|
2269
2269
|
name: B.name,
|
|
2270
2270
|
type: B.type
|
|
2271
2271
|
})
|
|
2272
|
-
), Vt = (
|
|
2272
|
+
), Vt = (Dn = k == null ? void 0 : k.datamodels) == null ? void 0 : Dn.map((B) => ({
|
|
2273
2273
|
id: B.id,
|
|
2274
2274
|
name: B.name
|
|
2275
2275
|
})), qt = M == null ? void 0 : M.databases.map((B) => ({
|
|
@@ -2281,9 +2281,9 @@ function Ne(t, a) {
|
|
|
2281
2281
|
})), ie = w == null ? void 0 : w.tables.map((B) => ({
|
|
2282
2282
|
id: B.table_name,
|
|
2283
2283
|
name: B.table_name
|
|
2284
|
-
})), be = (
|
|
2284
|
+
})), be = (In = k == null ? void 0 : k.datamodels.find(
|
|
2285
2285
|
(B) => B.id === i
|
|
2286
|
-
)) == null ? void 0 :
|
|
2286
|
+
)) == null ? void 0 : In.name, ws = xt({
|
|
2287
2287
|
schemaName: te,
|
|
2288
2288
|
tableName: q,
|
|
2289
2289
|
modelName: be,
|
|
@@ -2351,7 +2351,7 @@ const Pt = {
|
|
|
2351
2351
|
type: "string"
|
|
2352
2352
|
}, Xa = {
|
|
2353
2353
|
id: "__placeholder__"
|
|
2354
|
-
}, He = "droppable-group-by", Ge = "droppable-metrics", Ue = "droppable-pivot-by", wt = "sortable-group-by", Zt = "sortable-metrics", kt = "sortable-pivot-by", Xt = "droppable-filters", en = "sortable-filters",
|
|
2354
|
+
}, He = "droppable-group-by", Ge = "droppable-metrics", Ue = "droppable-pivot-by", wt = "sortable-group-by", Zt = "sortable-metrics", kt = "sortable-pivot-by", Xt = "droppable-filters", en = "sortable-filters", Cn = "sortable-order-by";
|
|
2355
2355
|
function cl() {
|
|
2356
2356
|
const t = Ee((I) => I.insertIndex), a = f(
|
|
2357
2357
|
(I) => {
|
|
@@ -2391,7 +2391,7 @@ function cl() {
|
|
|
2391
2391
|
setFilterColumns: C,
|
|
2392
2392
|
setOrderByColumns: p,
|
|
2393
2393
|
setPivotByColumns: v
|
|
2394
|
-
} = W(), { columns: g } =
|
|
2394
|
+
} = W(), { columns: g } = xn(), { formattedTableName: N } = Ne(), S = Ls(
|
|
2395
2395
|
Es(_s, {
|
|
2396
2396
|
activationConstraint: {
|
|
2397
2397
|
distance: 1
|
|
@@ -2605,7 +2605,7 @@ function cl() {
|
|
|
2605
2605
|
}
|
|
2606
2606
|
function Z(I) {
|
|
2607
2607
|
const { active: b, over: T } = I, H = b.data.current;
|
|
2608
|
-
if ((H == null ? void 0 : H.type) ===
|
|
2608
|
+
if ((H == null ? void 0 : H.type) === Cn && T) {
|
|
2609
2609
|
const F = i.findIndex(
|
|
2610
2610
|
(w) => dt(w.columnId) === b.id
|
|
2611
2611
|
), D = i.findIndex(
|
|
@@ -2632,7 +2632,7 @@ function ve(t) {
|
|
|
2632
2632
|
return `${t}-${nt()}`;
|
|
2633
2633
|
}
|
|
2634
2634
|
function ut(t, a) {
|
|
2635
|
-
const n =
|
|
2635
|
+
const n = pa(t.replace(/_/g, " "));
|
|
2636
2636
|
switch (a) {
|
|
2637
2637
|
case "SUM":
|
|
2638
2638
|
return `Sum of ${n}`;
|
|
@@ -2651,10 +2651,10 @@ function ut(t, a) {
|
|
|
2651
2651
|
}
|
|
2652
2652
|
}
|
|
2653
2653
|
function dt(t) {
|
|
2654
|
-
return `${
|
|
2654
|
+
return `${Cn}-${t}`;
|
|
2655
2655
|
}
|
|
2656
2656
|
function st(t, a) {
|
|
2657
|
-
const n =
|
|
2657
|
+
const n = pa(t.replace(/_/g, " "));
|
|
2658
2658
|
switch (a) {
|
|
2659
2659
|
case "day":
|
|
2660
2660
|
return `Date of ${n}`;
|
|
@@ -2707,11 +2707,11 @@ function dl({
|
|
|
2707
2707
|
function j(b) {
|
|
2708
2708
|
var T;
|
|
2709
2709
|
if (o) {
|
|
2710
|
-
const H =
|
|
2710
|
+
const H = ma(b, i);
|
|
2711
2711
|
S(H);
|
|
2712
2712
|
const F = (T = O == null ? void 0 : O.find(
|
|
2713
2713
|
(w) => w.id === y
|
|
2714
|
-
)) == null ? void 0 : T.name, D =
|
|
2714
|
+
)) == null ? void 0 : T.name, D = ha(
|
|
2715
2715
|
H,
|
|
2716
2716
|
xe(t),
|
|
2717
2717
|
xe(a),
|
|
@@ -2832,7 +2832,7 @@ function dl({
|
|
|
2832
2832
|
onClick: () => j(b),
|
|
2833
2833
|
children: [
|
|
2834
2834
|
/* @__PURE__ */ r("div", { className: "flex items-center space-x-2", children: [
|
|
2835
|
-
/* @__PURE__ */ e(
|
|
2835
|
+
/* @__PURE__ */ e(vn, { column: b }),
|
|
2836
2836
|
/* @__PURE__ */ e("span", { children: b.column_name })
|
|
2837
2837
|
] }),
|
|
2838
2838
|
/* @__PURE__ */ e(
|
|
@@ -2850,7 +2850,7 @@ function dl({
|
|
|
2850
2850
|
function I() {
|
|
2851
2851
|
return /* @__PURE__ */ r(ae, { children: [
|
|
2852
2852
|
/* @__PURE__ */ r(
|
|
2853
|
-
|
|
2853
|
+
fa,
|
|
2854
2854
|
{
|
|
2855
2855
|
title: `${Z() ? "Remove from" : "Add to"} Assistant Scope`,
|
|
2856
2856
|
pressed: Z(),
|
|
@@ -2903,7 +2903,12 @@ function dl({
|
|
|
2903
2903
|
)
|
|
2904
2904
|
] });
|
|
2905
2905
|
}
|
|
2906
|
-
return
|
|
2906
|
+
return s !== "Success" ? (
|
|
2907
|
+
// <div className="flex h-full w-full items-center justify-center">
|
|
2908
|
+
// <Loader2 className="h-6 w-6 animate-spin text-muted-foreground/70" />
|
|
2909
|
+
// </div>
|
|
2910
|
+
/* @__PURE__ */ e("div", { className: "flex grow flex-col justify-start gap-2 px-6", children: Array.from({ length: 10 }).map((b, T) => /* @__PURE__ */ e(ln, { className: "h-8 w-full" }, T)) })
|
|
2911
|
+
) : /* @__PURE__ */ r("div", { className: "flex grow flex-col space-y-4 px-4", children: [
|
|
2907
2912
|
o && /* @__PURE__ */ e("div", { className: "mx-2 flex items-center justify-center gap-2", children: I() }),
|
|
2908
2913
|
/* @__PURE__ */ r(
|
|
2909
2914
|
At,
|
|
@@ -3147,10 +3152,10 @@ function ts({ sql: t, error: a, onClick: n }) {
|
|
|
3147
3152
|
l(!0);
|
|
3148
3153
|
}, 100);
|
|
3149
3154
|
}
|
|
3150
|
-
return /* @__PURE__ */ r(
|
|
3151
|
-
/* @__PURE__ */ e(
|
|
3155
|
+
return /* @__PURE__ */ r(ca, { openDelay: a ? 0 : 500, children: [
|
|
3156
|
+
/* @__PURE__ */ e(da, { asChild: !0, children: /* @__PURE__ */ e(ee, { variant: "link", className: "h-5 p-0", children: a ? /* @__PURE__ */ e(Va, { className: "h-4 w-4 text-red-500" }) : /* @__PURE__ */ e(qs, { className: "h-4 w-4 text-muted-foreground" }) }) }),
|
|
3152
3157
|
/* @__PURE__ */ e(
|
|
3153
|
-
|
|
3158
|
+
ua,
|
|
3154
3159
|
{
|
|
3155
3160
|
align: "start",
|
|
3156
3161
|
className: "w-full min-w-fit max-w-[700px]",
|
|
@@ -3189,7 +3194,7 @@ var ns = {
|
|
|
3189
3194
|
className: void 0,
|
|
3190
3195
|
style: void 0,
|
|
3191
3196
|
attr: void 0
|
|
3192
|
-
},
|
|
3197
|
+
}, Vn = _e.createContext && /* @__PURE__ */ _e.createContext(ns), ul = ["attr", "size", "title"];
|
|
3193
3198
|
function ml(t, a) {
|
|
3194
3199
|
if (t == null) return {};
|
|
3195
3200
|
var n = hl(t, a), s, i;
|
|
@@ -3220,7 +3225,7 @@ function Mt() {
|
|
|
3220
3225
|
return t;
|
|
3221
3226
|
}, Mt.apply(this, arguments);
|
|
3222
3227
|
}
|
|
3223
|
-
function
|
|
3228
|
+
function qn(t, a) {
|
|
3224
3229
|
var n = Object.keys(t);
|
|
3225
3230
|
if (Object.getOwnPropertySymbols) {
|
|
3226
3231
|
var s = Object.getOwnPropertySymbols(t);
|
|
@@ -3233,9 +3238,9 @@ function Vn(t, a) {
|
|
|
3233
3238
|
function Dt(t) {
|
|
3234
3239
|
for (var a = 1; a < arguments.length; a++) {
|
|
3235
3240
|
var n = arguments[a] != null ? arguments[a] : {};
|
|
3236
|
-
a % 2 ?
|
|
3241
|
+
a % 2 ? qn(Object(n), !0).forEach(function(s) {
|
|
3237
3242
|
pl(t, s, n[s]);
|
|
3238
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(n)) :
|
|
3243
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(n)) : qn(Object(n)).forEach(function(s) {
|
|
3239
3244
|
Object.defineProperty(t, s, Object.getOwnPropertyDescriptor(n, s));
|
|
3240
3245
|
});
|
|
3241
3246
|
}
|
|
@@ -3289,7 +3294,7 @@ function yl(t) {
|
|
|
3289
3294
|
xmlns: "http://www.w3.org/2000/svg"
|
|
3290
3295
|
}), o && /* @__PURE__ */ _e.createElement("title", null, o), t.children);
|
|
3291
3296
|
};
|
|
3292
|
-
return
|
|
3297
|
+
return Vn !== void 0 ? /* @__PURE__ */ _e.createElement(Vn.Consumer, null, (n) => a(n)) : a(ns);
|
|
3293
3298
|
}
|
|
3294
3299
|
function bl(t) {
|
|
3295
3300
|
return lt({ 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);
|
|
@@ -3297,7 +3302,7 @@ function bl(t) {
|
|
|
3297
3302
|
function ss(t) {
|
|
3298
3303
|
const { theme: a } = js(), n = _((p) => p.theme), s = f((p) => p.frame), i = f((p) => p.card), o = f((p) => p.activeTabCardId), l = Bs(), { refetch: u } = ge(i), { updateCardTab: c, setRunSql: h } = W(), d = at(), y = at({}), x = s.cards.find((p) => p.id === o), m = za(() => {
|
|
3299
3304
|
let p = "";
|
|
3300
|
-
return t === "python" && (p = (x == null ? void 0 : x.python) ||
|
|
3305
|
+
return t === "python" && (p = (x == null ? void 0 : x.python) || ga), t === "sql" && (p = (x == null ? void 0 : x.sql) || ""), p;
|
|
3301
3306
|
}, [t, x]);
|
|
3302
3307
|
me(() => {
|
|
3303
3308
|
if (o && i.id && i.id !== o) {
|
|
@@ -3398,7 +3403,7 @@ function xl() {
|
|
|
3398
3403
|
className: "pt-3",
|
|
3399
3404
|
theme: "default",
|
|
3400
3405
|
onChange: s,
|
|
3401
|
-
value: t ||
|
|
3406
|
+
value: t || ga,
|
|
3402
3407
|
options: {
|
|
3403
3408
|
minimap: {
|
|
3404
3409
|
enabled: !1
|
|
@@ -3561,7 +3566,7 @@ function rs(t) {
|
|
|
3561
3566
|
datamodelName: Ct(k),
|
|
3562
3567
|
connectionId: v || "",
|
|
3563
3568
|
connectionType: O || ""
|
|
3564
|
-
}, te =
|
|
3569
|
+
}, te = zn([...y, q]);
|
|
3565
3570
|
E(te);
|
|
3566
3571
|
}
|
|
3567
3572
|
function Q() {
|
|
@@ -3578,7 +3583,7 @@ function rs(t) {
|
|
|
3578
3583
|
[...N || [], ...y],
|
|
3579
3584
|
q
|
|
3580
3585
|
) || y.length === 0) {
|
|
3581
|
-
const fe =
|
|
3586
|
+
const fe = zn([
|
|
3582
3587
|
...N || [],
|
|
3583
3588
|
...y,
|
|
3584
3589
|
q
|
|
@@ -3676,7 +3681,7 @@ function is({
|
|
|
3676
3681
|
);
|
|
3677
3682
|
}
|
|
3678
3683
|
function ls() {
|
|
3679
|
-
const { setTempQueryData: t, setSqlGen: a } = W(), n =
|
|
3684
|
+
const { setTempQueryData: t, setSqlGen: a } = W(), n = on(), s = f((c) => c.tempQueryData), i = f((c) => c.onClose), o = f((c) => c.card), { queryKey: l } = ge(o);
|
|
3680
3685
|
function u() {
|
|
3681
3686
|
if (s) {
|
|
3682
3687
|
const { queryKey: c, queryData: h } = s;
|
|
@@ -3698,7 +3703,7 @@ function ls() {
|
|
|
3698
3703
|
);
|
|
3699
3704
|
}
|
|
3700
3705
|
function os() {
|
|
3701
|
-
const { setTempQueryData: t } = W(), a =
|
|
3706
|
+
const { setTempQueryData: t } = W(), a = on(), n = f((m) => m.tempQueryData), s = f((m) => m.card), { queryKey: i } = ge(s), {
|
|
3702
3707
|
setCardSql: o,
|
|
3703
3708
|
setSqlGen: l,
|
|
3704
3709
|
setCardPython: u,
|
|
@@ -3740,7 +3745,7 @@ function Sl(t, a) {
|
|
|
3740
3745
|
return t[0].id;
|
|
3741
3746
|
}
|
|
3742
3747
|
function wl() {
|
|
3743
|
-
const t =
|
|
3748
|
+
const t = on(), [a, n] = J(!1), [s, i] = J(!1);
|
|
3744
3749
|
f((w) => w.frame);
|
|
3745
3750
|
const o = f((w) => w.card);
|
|
3746
3751
|
f((w) => w.isShowingVisual), f(
|
|
@@ -3937,7 +3942,7 @@ function wl() {
|
|
|
3937
3942
|
),
|
|
3938
3943
|
/* @__PURE__ */ e(os, {}),
|
|
3939
3944
|
/* @__PURE__ */ e(
|
|
3940
|
-
|
|
3945
|
+
fa,
|
|
3941
3946
|
{
|
|
3942
3947
|
pressed: a,
|
|
3943
3948
|
onPressedChange: (w) => n(w),
|
|
@@ -4021,7 +4026,7 @@ function kl({ data: t }) {
|
|
|
4021
4026
|
er,
|
|
4022
4027
|
{
|
|
4023
4028
|
className: "h-11 font-semibold text-foreground",
|
|
4024
|
-
children: c.isPlaceholder ? null :
|
|
4029
|
+
children: c.isPlaceholder ? null : An(
|
|
4025
4030
|
c.column.columnDef.header,
|
|
4026
4031
|
c.getContext()
|
|
4027
4032
|
)
|
|
@@ -4033,10 +4038,10 @@ function kl({ data: t }) {
|
|
|
4033
4038
|
{
|
|
4034
4039
|
className: "h-11 whitespace-nowrap py-2",
|
|
4035
4040
|
"data-state": u.getIsSelected() && "selected",
|
|
4036
|
-
children: u.getVisibleCells().map((c) => /* @__PURE__ */ e(
|
|
4041
|
+
children: u.getVisibleCells().map((c) => /* @__PURE__ */ e(Fn, { className: "py-2", children: An(c.column.columnDef.cell, c.getContext()) }, c.id))
|
|
4037
4042
|
},
|
|
4038
4043
|
u.id
|
|
4039
|
-
)) : /* @__PURE__ */ e(Rt, { children: /* @__PURE__ */ e(
|
|
4044
|
+
)) : /* @__PURE__ */ e(Rt, { children: /* @__PURE__ */ e(Fn, { colSpan: i.length, className: "h-24 text-center", children: "No results." }) }) })
|
|
4040
4045
|
] }),
|
|
4041
4046
|
/* @__PURE__ */ e(Qe, { orientation: "horizontal" })
|
|
4042
4047
|
] });
|
|
@@ -4049,7 +4054,7 @@ function Ml({ card: t }) {
|
|
|
4049
4054
|
colors: ((S = (N = u == null ? void 0 : u.chart) == null ? void 0 : N.dataset) == null ? void 0 : S.backgroundColor) || []
|
|
4050
4055
|
};
|
|
4051
4056
|
(z = t.customCardPreferences) != null && z.inputData;
|
|
4052
|
-
const { getCard: h } =
|
|
4057
|
+
const { getCard: h } = ya(((k = t.customCardPreferences) == null ? void 0 : k.url) || ""), d = ((O = t.customCardPreferences) == null ? void 0 : O.visualType) || "single", y = f(($) => $.frame), { setCustomCardPreferences: x } = W(), { data: m } = ge(t), C = za(($, I) => {
|
|
4053
4058
|
i((b) => ({
|
|
4054
4059
|
...b,
|
|
4055
4060
|
[$]: I
|
|
@@ -4134,7 +4139,7 @@ function cs({
|
|
|
4134
4139
|
var v;
|
|
4135
4140
|
const n = f((g) => g.card), s = ((v = n.customCardPreferences) == null ? void 0 : v.showCardHeader) ?? !0, i = f((g) => g.frame), o = _((g) => g.dashboard.filters);
|
|
4136
4141
|
f((g) => g.actions.setRunSql);
|
|
4137
|
-
const { updateFilter: l } = rt(), u = o == null ? void 0 : o.find((g) => g.id === i.filterId), { data: c, isLoading: h, isFetching: d } = ge(n), { setCard: y } = W(), { data: x } =
|
|
4142
|
+
const { updateFilter: l } = rt(), u = o == null ? void 0 : o.find((g) => g.id === i.filterId), { data: c, isLoading: h, isFetching: d } = ge(n), { setCard: y } = W(), { data: x } = cn(n), m = Pe(() => !n.id || !(c != null && c.records) ? null : ba({
|
|
4138
4143
|
data: c == null ? void 0 : c.records,
|
|
4139
4144
|
cardType: n.type,
|
|
4140
4145
|
queryConfig: n.queryConfig,
|
|
@@ -4214,7 +4219,7 @@ function cs({
|
|
|
4214
4219
|
children: /* @__PURE__ */ e(U, { children: u.title })
|
|
4215
4220
|
}
|
|
4216
4221
|
),
|
|
4217
|
-
/* @__PURE__ */ e(
|
|
4222
|
+
/* @__PURE__ */ e(va, { filter: u })
|
|
4218
4223
|
] })
|
|
4219
4224
|
] }),
|
|
4220
4225
|
/* @__PURE__ */ e(ur, { className: "flex grow flex-col", children: p() })
|
|
@@ -4248,9 +4253,9 @@ const $t = ({
|
|
|
4248
4253
|
value: a,
|
|
4249
4254
|
onChange: n
|
|
4250
4255
|
}
|
|
4251
|
-
), Dl = () => /* @__PURE__ */ r(
|
|
4252
|
-
/* @__PURE__ */ e("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ e(
|
|
4253
|
-
/* @__PURE__ */ r(
|
|
4256
|
+
), Dl = () => /* @__PURE__ */ r(Hn, { children: [
|
|
4257
|
+
/* @__PURE__ */ e("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ e(Gn, { children: "Customize Card" }) }),
|
|
4258
|
+
/* @__PURE__ */ r(Un, { children: [
|
|
4254
4259
|
"See the configuration options and documentation",
|
|
4255
4260
|
/* @__PURE__ */ e(
|
|
4256
4261
|
"a",
|
|
@@ -4269,8 +4274,8 @@ const $t = ({
|
|
|
4269
4274
|
mergedConfig: n,
|
|
4270
4275
|
onConfigChange: s,
|
|
4271
4276
|
onCodeChange: i
|
|
4272
|
-
}) => /* @__PURE__ */ r(
|
|
4273
|
-
/* @__PURE__ */ r(
|
|
4277
|
+
}) => /* @__PURE__ */ r(dn, { defaultValue: "final-config", className: "flex w-1/2 flex-col", children: [
|
|
4278
|
+
/* @__PURE__ */ r(un, { className: "justify-start rounded-sm rounded-b-none border border-b-0", children: [
|
|
4274
4279
|
/* @__PURE__ */ e(tt, { value: "final-config", children: "Config" }),
|
|
4275
4280
|
/* @__PURE__ */ e(tt, { value: "custom-config", children: "Changes" }),
|
|
4276
4281
|
/* @__PURE__ */ e(tt, { value: "custom-code", children: "Custom Code" })
|
|
@@ -4328,14 +4333,14 @@ const $t = ({
|
|
|
4328
4333
|
onReset: n,
|
|
4329
4334
|
onApply: s,
|
|
4330
4335
|
onClose: i
|
|
4331
|
-
}) => /* @__PURE__ */ r(
|
|
4336
|
+
}) => /* @__PURE__ */ r($n, { className: "flex items-center", children: [
|
|
4332
4337
|
/* @__PURE__ */ e(U, { className: "mr-2 text-red-500", children: t }),
|
|
4333
4338
|
/* @__PURE__ */ e(ee, { disabled: !a, onClick: n, variant: "outline", children: "Reset" }),
|
|
4334
4339
|
/* @__PURE__ */ e(ee, { onClick: s, variant: "outline", children: "Apply" }),
|
|
4335
4340
|
/* @__PURE__ */ e(ee, { onClick: i, variant: "outline", children: "Close" })
|
|
4336
4341
|
] });
|
|
4337
4342
|
function Tl() {
|
|
4338
|
-
const [t, a] = J(!1), [n, s] = J(""), [i, o] = J(""), [l, u] = J(""), [c, h] = J(""), d = f((k) => k.card), y = f((k) => k.card.customCfg), x = y ? JSON.stringify(y, null, 2) : "", { data: m } = ge(d), { data: C } =
|
|
4343
|
+
const [t, a] = J(!1), [n, s] = J(""), [i, o] = J(""), [l, u] = J(""), [c, h] = J(""), d = f((k) => k.card), y = f((k) => k.card.customCfg), x = y ? JSON.stringify(y, null, 2) : "", { data: m } = ge(d), { data: C } = cn(d), { setCardCustomCfg: p, setCustomVisualCode: v } = W(), g = (k) => {
|
|
4339
4344
|
var O, R;
|
|
4340
4345
|
return JSON.stringify(
|
|
4341
4346
|
{
|
|
@@ -4354,7 +4359,7 @@ function Tl() {
|
|
|
4354
4359
|
}, N = () => {
|
|
4355
4360
|
var O, R;
|
|
4356
4361
|
if (!((O = m == null ? void 0 : m.records) != null && O.length)) return;
|
|
4357
|
-
const k =
|
|
4362
|
+
const k = ba({
|
|
4358
4363
|
data: m.records,
|
|
4359
4364
|
cardType: d.type,
|
|
4360
4365
|
queryConfig: d.queryConfig,
|
|
@@ -4382,8 +4387,8 @@ function Tl() {
|
|
|
4382
4387
|
h("Invalid JSON configuration");
|
|
4383
4388
|
}
|
|
4384
4389
|
}, z = Object.keys(y || {}).length === 0;
|
|
4385
|
-
return /* @__PURE__ */ r(
|
|
4386
|
-
/* @__PURE__ */ e(
|
|
4390
|
+
return /* @__PURE__ */ r(jn, { open: t, onOpenChange: a, children: [
|
|
4391
|
+
/* @__PURE__ */ e(Bn, { asChild: !0, children: /* @__PURE__ */ e(
|
|
4387
4392
|
X,
|
|
4388
4393
|
{
|
|
4389
4394
|
tooltip: "Customize Visual",
|
|
@@ -4392,10 +4397,10 @@ function Tl() {
|
|
|
4392
4397
|
children: /* @__PURE__ */ e(fr, { className: "h-4 w-4" })
|
|
4393
4398
|
}
|
|
4394
4399
|
) }),
|
|
4395
|
-
/* @__PURE__ */ r(
|
|
4400
|
+
/* @__PURE__ */ r(Pn, { className: "flex h-[600px] grow flex-col overflow-auto sm:min-w-[900px] lg:min-w-[1200px]", children: [
|
|
4396
4401
|
/* @__PURE__ */ e(Dl, {}),
|
|
4397
4402
|
/* @__PURE__ */ r("div", { className: "flex grow gap-2", children: [
|
|
4398
|
-
/* @__PURE__ */ e(Lt, { FallbackComponent:
|
|
4403
|
+
/* @__PURE__ */ e(Lt, { FallbackComponent: xa, children: /* @__PURE__ */ e(cs, { className: "w-1/2 rounded shadow-none" }) }),
|
|
4399
4404
|
/* @__PURE__ */ e(
|
|
4400
4405
|
Il,
|
|
4401
4406
|
{
|
|
@@ -4521,7 +4526,7 @@ function gs({
|
|
|
4521
4526
|
tooltip: "Table",
|
|
4522
4527
|
onClick: () => c("table"),
|
|
4523
4528
|
className: "h-10 p-4",
|
|
4524
|
-
children: /* @__PURE__ */ e(
|
|
4529
|
+
children: /* @__PURE__ */ e(bn, { className: G("size-5", a) })
|
|
4525
4530
|
}
|
|
4526
4531
|
),
|
|
4527
4532
|
/* @__PURE__ */ e(
|
|
@@ -4531,7 +4536,7 @@ function gs({
|
|
|
4531
4536
|
tooltip: "Bar Chart",
|
|
4532
4537
|
onClick: () => c("bar"),
|
|
4533
4538
|
className: "h-10 p-4",
|
|
4534
|
-
children: /* @__PURE__ */ e(
|
|
4539
|
+
children: /* @__PURE__ */ e(gn, { className: G("size-5", a) })
|
|
4535
4540
|
}
|
|
4536
4541
|
),
|
|
4537
4542
|
/* @__PURE__ */ e(
|
|
@@ -4541,7 +4546,7 @@ function gs({
|
|
|
4541
4546
|
tooltip: "Line Chart",
|
|
4542
4547
|
onClick: () => c("line"),
|
|
4543
4548
|
className: "h-10 p-4",
|
|
4544
|
-
children: /* @__PURE__ */ e(
|
|
4549
|
+
children: /* @__PURE__ */ e(yn, { className: G("size-5", a) })
|
|
4545
4550
|
}
|
|
4546
4551
|
),
|
|
4547
4552
|
/* @__PURE__ */ e(
|
|
@@ -4699,9 +4704,9 @@ function Ll({
|
|
|
4699
4704
|
const i = ds();
|
|
4700
4705
|
switch (t) {
|
|
4701
4706
|
case "bar":
|
|
4702
|
-
return /* @__PURE__ */ e(fn, { className: a });
|
|
4703
|
-
case "line":
|
|
4704
4707
|
return /* @__PURE__ */ e(gn, { className: a });
|
|
4708
|
+
case "line":
|
|
4709
|
+
return /* @__PURE__ */ e(yn, { className: a });
|
|
4705
4710
|
case "pie":
|
|
4706
4711
|
return /* @__PURE__ */ e(Ea, { className: a });
|
|
4707
4712
|
case "radar":
|
|
@@ -4731,7 +4736,7 @@ function Ll({
|
|
|
4731
4736
|
case "custom":
|
|
4732
4737
|
return n && i ? /* @__PURE__ */ e(i, { className: a }) : s ? s == null ? void 0 : s.charAt(0).toUpperCase() : /* @__PURE__ */ e($a, { className: a });
|
|
4733
4738
|
default:
|
|
4734
|
-
return /* @__PURE__ */ e(
|
|
4739
|
+
return /* @__PURE__ */ e(bn, { className: a });
|
|
4735
4740
|
}
|
|
4736
4741
|
}
|
|
4737
4742
|
function El() {
|
|
@@ -4748,7 +4753,7 @@ function El() {
|
|
|
4748
4753
|
}
|
|
4749
4754
|
) }) }),
|
|
4750
4755
|
/* @__PURE__ */ r(
|
|
4751
|
-
|
|
4756
|
+
mn,
|
|
4752
4757
|
{
|
|
4753
4758
|
onOpenAutoFocus: (u) => u.preventDefault(),
|
|
4754
4759
|
className: "w-50",
|
|
@@ -4766,9 +4771,9 @@ function El() {
|
|
|
4766
4771
|
] });
|
|
4767
4772
|
}
|
|
4768
4773
|
const pt = "focus-visible:ring-0 focus-visible:ring-ring focus-visible:ring-offset-0";
|
|
4769
|
-
function
|
|
4774
|
+
function Rn(t, a) {
|
|
4770
4775
|
var s, i, o;
|
|
4771
|
-
const n =
|
|
4776
|
+
const n = Ca(t, a);
|
|
4772
4777
|
return ((o = (i = (s = t == null ? void 0 : t.chartOptions) == null ? void 0 : s.scales) == null ? void 0 : i[n]) == null ? void 0 : o.type) || "linear";
|
|
4773
4778
|
}
|
|
4774
4779
|
function _l() {
|
|
@@ -4776,8 +4781,8 @@ function _l() {
|
|
|
4776
4781
|
const [t, a] = J(!1), n = f((L) => {
|
|
4777
4782
|
var E;
|
|
4778
4783
|
return (E = L.card) == null ? void 0 : E.preferences;
|
|
4779
|
-
}), s =
|
|
4780
|
-
|
|
4784
|
+
}), s = Ca(n, {}), [i, o] = J(
|
|
4785
|
+
Rn(n)
|
|
4781
4786
|
), [l, u] = J(
|
|
4782
4787
|
((H = (T = (b = n == null ? void 0 : n.chartOptions) == null ? void 0 : b.scales) == null ? void 0 : T[s]) == null ? void 0 : H.min) || ""
|
|
4783
4788
|
), [c, h] = J(
|
|
@@ -4790,7 +4795,7 @@ function _l() {
|
|
|
4790
4795
|
}), M = ["pie", "doughnut", "polarArea"].includes(Y);
|
|
4791
4796
|
me(() => {
|
|
4792
4797
|
var L, E, se, Q, re, P, ne, K, de, q, te, fe, Te, Ze;
|
|
4793
|
-
o(
|
|
4798
|
+
o(Rn(n)), u(
|
|
4794
4799
|
((se = (E = (L = n == null ? void 0 : n.chartOptions) == null ? void 0 : L.scales) == null ? void 0 : E[s]) == null ? void 0 : se.min) === 0 ? 0 : ""
|
|
4795
4800
|
), h(((P = (re = (Q = n == null ? void 0 : n.chartOptions) == null ? void 0 : Q.scales) == null ? void 0 : re[s]) == null ? void 0 : P.max) || ""), m(
|
|
4796
4801
|
((q = (de = (K = (ne = n == null ? void 0 : n.chartOptions) == null ? void 0 : ne.scales) == null ? void 0 : K[s]) == null ? void 0 : de.ticks) == null ? void 0 : q.stepSize) || ""
|
|
@@ -4939,7 +4944,7 @@ function _l() {
|
|
|
4939
4944
|
}
|
|
4940
4945
|
return /* @__PURE__ */ r(Je, { onOpenChange: (L) => a(L), children: [
|
|
4941
4946
|
/* @__PURE__ */ e(We, { asChild: !0, children: /* @__PURE__ */ e(X, { tooltip: "Format Number", children: /* @__PURE__ */ e(vi, { className: "size-4" }) }) }),
|
|
4942
|
-
/* @__PURE__ */ e(
|
|
4947
|
+
/* @__PURE__ */ e(mn, { align: "end", className: "max-w-65", children: /* @__PURE__ */ r("div", { className: "grid gap-4", children: [
|
|
4943
4948
|
/* @__PURE__ */ r("div", { className: "space-y-2", children: [
|
|
4944
4949
|
/* @__PURE__ */ e("h4", { className: "font-medium leading-none", children: "Format Options" }),
|
|
4945
4950
|
/* @__PURE__ */ e("p", { className: "text-sm text-muted-foreground", children: "Set the format for number axis" })
|
|
@@ -4969,7 +4974,7 @@ function _l() {
|
|
|
4969
4974
|
i == "linear" && /* @__PURE__ */ r("div", { className: "grid grid-cols-3 items-center gap-2 py-1", children: [
|
|
4970
4975
|
/* @__PURE__ */ e(U, { htmlFor: "scale-option", children: "Setup" }),
|
|
4971
4976
|
/* @__PURE__ */ r(
|
|
4972
|
-
|
|
4977
|
+
Na,
|
|
4973
4978
|
{
|
|
4974
4979
|
disabled: M,
|
|
4975
4980
|
id: "scale-option",
|
|
@@ -5042,7 +5047,7 @@ function Vl() {
|
|
|
5042
5047
|
};
|
|
5043
5048
|
return /* @__PURE__ */ r(Je, { children: [
|
|
5044
5049
|
/* @__PURE__ */ e(We, { asChild: !0, children: /* @__PURE__ */ e(X, { tooltip: "Legend Settings", children: /* @__PURE__ */ e(Oi, { className: "size-4" }) }) }),
|
|
5045
|
-
/* @__PURE__ */ e(
|
|
5050
|
+
/* @__PURE__ */ e(mn, { align: "end", className: "w-72", children: /* @__PURE__ */ r("div", { className: "grid gap-4", children: [
|
|
5046
5051
|
/* @__PURE__ */ r("div", { className: "space-y-2", children: [
|
|
5047
5052
|
/* @__PURE__ */ e("h4", { className: "font-medium leading-none", children: "Legend Options" }),
|
|
5048
5053
|
/* @__PURE__ */ e("p", { className: "text-sm text-muted-foreground", children: "Set the legend options for the chart." })
|
|
@@ -5051,7 +5056,7 @@ function Vl() {
|
|
|
5051
5056
|
/* @__PURE__ */ r("div", { className: "grid grid-cols-3 items-center gap-4", children: [
|
|
5052
5057
|
/* @__PURE__ */ e(U, { htmlFor: "displayLegend", children: "Display" }),
|
|
5053
5058
|
/* @__PURE__ */ e("div", { className: "col-span-2 flex h-8 items-center", children: /* @__PURE__ */ e(
|
|
5054
|
-
|
|
5059
|
+
Sa,
|
|
5055
5060
|
{
|
|
5056
5061
|
checked: n,
|
|
5057
5062
|
onCheckedChange: i,
|
|
@@ -5068,7 +5073,7 @@ function Vl() {
|
|
|
5068
5073
|
{
|
|
5069
5074
|
tooltip: "Top",
|
|
5070
5075
|
onClick: () => o("top"),
|
|
5071
|
-
children: /* @__PURE__ */ e(
|
|
5076
|
+
children: /* @__PURE__ */ e(wa, { className: "size-4" })
|
|
5072
5077
|
}
|
|
5073
5078
|
),
|
|
5074
5079
|
/* @__PURE__ */ e(
|
|
@@ -5156,7 +5161,7 @@ function Rl() {
|
|
|
5156
5161
|
var u, c;
|
|
5157
5162
|
return (c = (u = l.card) == null ? void 0 : u.preferences) == null ? void 0 : c.chartOptions;
|
|
5158
5163
|
}
|
|
5159
|
-
), s =
|
|
5164
|
+
), s = ka(n), { setChartGrid: i } = W();
|
|
5160
5165
|
function o() {
|
|
5161
5166
|
const l = ["xy", "none", "x", "y"], c = (l.indexOf(s) + 1) % l.length;
|
|
5162
5167
|
i(l[c]);
|
|
@@ -5200,7 +5205,7 @@ function ft() {
|
|
|
5200
5205
|
return (w = D.card.preferences) == null ? void 0 : w.chartOptions;
|
|
5201
5206
|
}
|
|
5202
5207
|
), c = f((D) => D.actions.setRunSql);
|
|
5203
|
-
|
|
5208
|
+
ka(u);
|
|
5204
5209
|
const {
|
|
5205
5210
|
setFrame: h,
|
|
5206
5211
|
setCard: d,
|
|
@@ -5300,14 +5305,14 @@ function ft() {
|
|
|
5300
5305
|
}
|
|
5301
5306
|
function $() {
|
|
5302
5307
|
return /* @__PURE__ */ r(
|
|
5303
|
-
|
|
5308
|
+
dn,
|
|
5304
5309
|
{
|
|
5305
5310
|
onValueChange: R,
|
|
5306
5311
|
value: t.activeCardId,
|
|
5307
5312
|
className: "flex grow flex-col",
|
|
5308
5313
|
children: [
|
|
5309
5314
|
t.cards.map((D) => /* @__PURE__ */ e(yt, { className: "mt-0 grow", value: D.id, children: I() }, D.id)),
|
|
5310
|
-
/* @__PURE__ */ e(
|
|
5315
|
+
/* @__PURE__ */ e(un, { className: "group mx-4 justify-between overflow-x-auto", children: /* @__PURE__ */ r("div", { className: "flex items-center", children: [
|
|
5311
5316
|
t.cards.map((D, w) => /* @__PURE__ */ e(
|
|
5312
5317
|
et,
|
|
5313
5318
|
{
|
|
@@ -5371,7 +5376,7 @@ function ft() {
|
|
|
5371
5376
|
card: a,
|
|
5372
5377
|
data: p == null ? void 0 : p.records
|
|
5373
5378
|
}
|
|
5374
|
-
) }) }) }) : /* @__PURE__ */ e(Lt, { FallbackComponent:
|
|
5379
|
+
) }) }) }) : /* @__PURE__ */ e(Lt, { FallbackComponent: xa, children: /* @__PURE__ */ e(cs, { className: "grow border-none shadow-none" }) });
|
|
5375
5380
|
}
|
|
5376
5381
|
function b() {
|
|
5377
5382
|
const D = JSON.stringify(p == null ? void 0 : p.records, null, 2), w = new Blob([D], { type: "application/json" }), L = URL.createObjectURL(w), E = document.createElement("a");
|
|
@@ -5500,7 +5505,7 @@ function Bl() {
|
|
|
5500
5505
|
return /* @__PURE__ */ r("div", { className: "flex items-center space-x-2", children: [
|
|
5501
5506
|
/* @__PURE__ */ e(U, { htmlFor: "visualize", children: "Chart" }),
|
|
5502
5507
|
/* @__PURE__ */ e(
|
|
5503
|
-
|
|
5508
|
+
Sa,
|
|
5504
5509
|
{
|
|
5505
5510
|
checked: t,
|
|
5506
5511
|
onCheckedChange: () => a(!t),
|
|
@@ -5514,7 +5519,7 @@ function Pl() {
|
|
|
5514
5519
|
var p, v;
|
|
5515
5520
|
const t = f(
|
|
5516
5521
|
(g) => g.card.customCardPreferences
|
|
5517
|
-
), { data: a } = us(), n = (a == null ? void 0 : a.plugins) || [], s = f((g) => g.card), i = f((g) => g.frame), o = (t == null ? void 0 : t.visualType) || "single", { setCustomCardPreferences: l } = W(), { components: u, manifest: c } =
|
|
5522
|
+
), { data: a } = us(), n = (a == null ? void 0 : a.plugins) || [], s = f((g) => g.card), i = f((g) => g.frame), o = (t == null ? void 0 : t.visualType) || "single", { setCustomCardPreferences: l } = W(), { components: u, manifest: c } = ya(
|
|
5518
5523
|
(t == null ? void 0 : t.url) || ""
|
|
5519
5524
|
), h = (p = c == null ? void 0 : c.visuals) == null ? void 0 : p.find(
|
|
5520
5525
|
(g) => g.name === (t == null ? void 0 : t.componentName)
|
|
@@ -5648,11 +5653,11 @@ function Pl() {
|
|
|
5648
5653
|
}
|
|
5649
5654
|
),
|
|
5650
5655
|
((t == null ? void 0 : t.type) === "component" || (t == null ? void 0 : t.type) === void 0) && /* @__PURE__ */ e(
|
|
5651
|
-
|
|
5656
|
+
dn,
|
|
5652
5657
|
{
|
|
5653
5658
|
value: o,
|
|
5654
5659
|
onValueChange: C,
|
|
5655
|
-
children: /* @__PURE__ */ r(
|
|
5660
|
+
children: /* @__PURE__ */ r(un, { className: "h-9 w-full", children: [
|
|
5656
5661
|
/* @__PURE__ */ e(tt, { className: "h-7 w-full", value: "single", children: "Single Visual" }),
|
|
5657
5662
|
/* @__PURE__ */ e(tt, { className: "h-7 w-full", value: "multiple", children: "Multi-Visual" })
|
|
5658
5663
|
] })
|
|
@@ -5773,7 +5778,7 @@ function Ye() {
|
|
|
5773
5778
|
children: /* @__PURE__ */ r("div", { className: "grow", children: [
|
|
5774
5779
|
/* @__PURE__ */ r("div", { className: "flex items-center space-x-2 py-2", children: [
|
|
5775
5780
|
/* @__PURE__ */ e(
|
|
5776
|
-
|
|
5781
|
+
hn,
|
|
5777
5782
|
{
|
|
5778
5783
|
checked: !!((y = n == null ? void 0 : n.onClickFilter) != null && y.find(
|
|
5779
5784
|
(m) => m.columnIndex === d
|
|
@@ -5791,7 +5796,7 @@ function Ye() {
|
|
|
5791
5796
|
/* @__PURE__ */ e("div", { className: "flex items-center gap-2", children: ((x = n == null ? void 0 : n.onClickFilter) == null ? void 0 : x.find(
|
|
5792
5797
|
(m) => m.columnIndex === d
|
|
5793
5798
|
)) && /* @__PURE__ */ e(
|
|
5794
|
-
|
|
5799
|
+
ta,
|
|
5795
5800
|
{
|
|
5796
5801
|
onClick: () => {
|
|
5797
5802
|
a((m) => {
|
|
@@ -6027,7 +6032,7 @@ function xs({
|
|
|
6027
6032
|
i || /* @__PURE__ */ e("p", { title: t, children: vs(t) }),
|
|
6028
6033
|
/* @__PURE__ */ r("div", { className: "flex gap-2", children: [
|
|
6029
6034
|
/* @__PURE__ */ e(
|
|
6030
|
-
|
|
6035
|
+
gn,
|
|
6031
6036
|
{
|
|
6032
6037
|
onClick: () => h("bar"),
|
|
6033
6038
|
className: G(
|
|
@@ -6037,7 +6042,7 @@ function xs({
|
|
|
6037
6042
|
}
|
|
6038
6043
|
),
|
|
6039
6044
|
/* @__PURE__ */ e(
|
|
6040
|
-
|
|
6045
|
+
yn,
|
|
6041
6046
|
{
|
|
6042
6047
|
onClick: () => h("line"),
|
|
6043
6048
|
className: G(
|
|
@@ -6076,7 +6081,7 @@ function Cs() {
|
|
|
6076
6081
|
const k = (R = h == null ? void 0 : h.find(
|
|
6077
6082
|
(j) => j.id === a
|
|
6078
6083
|
)) == null ? void 0 : R.name;
|
|
6079
|
-
a && a !== "none" && (z = `${
|
|
6084
|
+
a && a !== "none" && (z = `${Ln}.${k}.${p}`, S = `${Ln}.${k}`);
|
|
6080
6085
|
const O = o == null ? void 0 : o.find(
|
|
6081
6086
|
(j) => j.column === z && j.table === N && (j.database === v || j.database === n)
|
|
6082
6087
|
);
|
|
@@ -6137,7 +6142,7 @@ function ot() {
|
|
|
6137
6142
|
return /* @__PURE__ */ r("div", { className: "space-y-3", children: [
|
|
6138
6143
|
/* @__PURE__ */ e(U, { children: "Card Filter" }),
|
|
6139
6144
|
/* @__PURE__ */ e(Gl, { onSelect: o, columns: s }),
|
|
6140
|
-
l && /* @__PURE__ */ e(
|
|
6145
|
+
l && /* @__PURE__ */ e(Ma, { filter: l })
|
|
6141
6146
|
] });
|
|
6142
6147
|
}
|
|
6143
6148
|
function Gl({
|
|
@@ -6161,12 +6166,12 @@ function Gl({
|
|
|
6161
6166
|
]
|
|
6162
6167
|
}
|
|
6163
6168
|
) }),
|
|
6164
|
-
/* @__PURE__ */ e(It, { className: "w-[200px] p-0", children: /* @__PURE__ */ r(
|
|
6165
|
-
/* @__PURE__ */ e(
|
|
6166
|
-
/* @__PURE__ */ r(
|
|
6167
|
-
/* @__PURE__ */ e(
|
|
6168
|
-
/* @__PURE__ */ e(
|
|
6169
|
-
|
|
6169
|
+
/* @__PURE__ */ e(It, { className: "w-[200px] p-0", children: /* @__PURE__ */ r(na, { children: [
|
|
6170
|
+
/* @__PURE__ */ e(aa, { placeholder: "Search column", className: "h-9" }),
|
|
6171
|
+
/* @__PURE__ */ r(sa, { children: [
|
|
6172
|
+
/* @__PURE__ */ e(ra, { children: "No framework found." }),
|
|
6173
|
+
/* @__PURE__ */ e(ia, { children: t == null ? void 0 : t.map((u) => /* @__PURE__ */ r(
|
|
6174
|
+
la,
|
|
6170
6175
|
{
|
|
6171
6176
|
value: u.column_name,
|
|
6172
6177
|
onSelect: (c) => {
|
|
@@ -6234,7 +6239,7 @@ function Ul({
|
|
|
6234
6239
|
] })
|
|
6235
6240
|
] }) });
|
|
6236
6241
|
}
|
|
6237
|
-
function
|
|
6242
|
+
function Nn() {
|
|
6238
6243
|
var i, o, l;
|
|
6239
6244
|
const t = f((u) => u.card.type), a = f((u) => u.card.preferences), { setCardPreferences: n } = f((u) => u.actions);
|
|
6240
6245
|
function s(u) {
|
|
@@ -6316,7 +6321,7 @@ function $l({
|
|
|
6316
6321
|
] }),
|
|
6317
6322
|
/* @__PURE__ */ r(le, { value: "item-2", children: [
|
|
6318
6323
|
/* @__PURE__ */ e(oe, { children: "Settings" }),
|
|
6319
|
-
/* @__PURE__ */ e(ce, { className: "px-2", children: /* @__PURE__ */ e(
|
|
6324
|
+
/* @__PURE__ */ e(ce, { className: "px-2", children: /* @__PURE__ */ e(Nn, {}) })
|
|
6320
6325
|
] }),
|
|
6321
6326
|
/* @__PURE__ */ r(le, { value: "item-3", children: [
|
|
6322
6327
|
/* @__PURE__ */ e(oe, { children: "Filters" }),
|
|
@@ -6363,7 +6368,7 @@ function Jl() {
|
|
|
6363
6368
|
}
|
|
6364
6369
|
),
|
|
6365
6370
|
!["kpi"].includes(t) && /* @__PURE__ */ r("div", { className: "space-y-4", children: [
|
|
6366
|
-
/* @__PURE__ */ e(
|
|
6371
|
+
/* @__PURE__ */ e(Nn, {}),
|
|
6367
6372
|
/* @__PURE__ */ e(Ye, {}),
|
|
6368
6373
|
/* @__PURE__ */ e(ot, {})
|
|
6369
6374
|
] })
|
|
@@ -6504,7 +6509,7 @@ function Yl() {
|
|
|
6504
6509
|
return /* @__PURE__ */ r("div", { children: [
|
|
6505
6510
|
/* @__PURE__ */ r("div", { className: "mb-3 flex items-center gap-2", children: [
|
|
6506
6511
|
/* @__PURE__ */ e(
|
|
6507
|
-
|
|
6512
|
+
hn,
|
|
6508
6513
|
{
|
|
6509
6514
|
checked: !!((c = t == null ? void 0 : t.formatNumber) != null && c.enabled),
|
|
6510
6515
|
onCheckedChange: (m) => {
|
|
@@ -6788,7 +6793,7 @@ function no() {
|
|
|
6788
6793
|
var c, h, d, y, x, m, C, p, v, g, N, S, z, k, O, R, j, Y;
|
|
6789
6794
|
const t = f((M) => M.card), a = (h = (c = t == null ? void 0 : t.preferences) == null ? void 0 : c.mapVisualOptions) == null ? void 0 : h.topoJsonUrl, [n, s] = J(
|
|
6790
6795
|
((y = (d = t == null ? void 0 : t.preferences) == null ? void 0 : d.mapVisualOptions) == null ? void 0 : y.customTopoJsonUrl) || ""
|
|
6791
|
-
), { setCardPreferences: i } = W(), { data: o } =
|
|
6796
|
+
), { setCardPreferences: i } = W(), { data: o } = cn(t), l = Object.keys((o == null ? void 0 : o.objects) || {}).map((M) => ({
|
|
6792
6797
|
label: M,
|
|
6793
6798
|
value: M
|
|
6794
6799
|
})) || [];
|
|
@@ -7002,7 +7007,7 @@ function ao() {
|
|
|
7002
7007
|
});
|
|
7003
7008
|
}
|
|
7004
7009
|
return /* @__PURE__ */ r(
|
|
7005
|
-
|
|
7010
|
+
Na,
|
|
7006
7011
|
{
|
|
7007
7012
|
value: (s = t == null ? void 0 : t.textVisualOptions) != null && s.isDynamicText ? "dynamic" : "static",
|
|
7008
7013
|
onValueChange: n,
|
|
@@ -7054,7 +7059,7 @@ function gt({
|
|
|
7054
7059
|
/* @__PURE__ */ r(le, { value: "item-2", children: [
|
|
7055
7060
|
/* @__PURE__ */ e(oe, { children: "Settings" }),
|
|
7056
7061
|
/* @__PURE__ */ r(ce, { className: "space-y-4 px-2", children: [
|
|
7057
|
-
t !== "text" && /* @__PURE__ */ e(
|
|
7062
|
+
t !== "text" && /* @__PURE__ */ e(Nn, {}),
|
|
7058
7063
|
t === "text" && /* @__PURE__ */ e(ao, {})
|
|
7059
7064
|
] })
|
|
7060
7065
|
] }),
|
|
@@ -7165,7 +7170,7 @@ function ro({
|
|
|
7165
7170
|
] })
|
|
7166
7171
|
] }) }),
|
|
7167
7172
|
/* @__PURE__ */ r("div", { className: "flex items-center space-x-2", children: [
|
|
7168
|
-
/* @__PURE__ */ e(
|
|
7173
|
+
/* @__PURE__ */ e(hn, { onCheckedChange: (i) => {
|
|
7169
7174
|
n({
|
|
7170
7175
|
...a,
|
|
7171
7176
|
allowDownload: i
|
|
@@ -7336,7 +7341,7 @@ const uo = [
|
|
|
7336
7341
|
{
|
|
7337
7342
|
label: "Max",
|
|
7338
7343
|
value: "MAX",
|
|
7339
|
-
logo: /* @__PURE__ */ e(
|
|
7344
|
+
logo: /* @__PURE__ */ e(wa, { className: "size-3.5" })
|
|
7340
7345
|
}
|
|
7341
7346
|
];
|
|
7342
7347
|
function mo({ column: t }) {
|
|
@@ -7412,7 +7417,7 @@ function fo({
|
|
|
7412
7417
|
onChange: a,
|
|
7413
7418
|
droppableId: n
|
|
7414
7419
|
}) {
|
|
7415
|
-
const { columns: s } =
|
|
7420
|
+
const { columns: s } = xn(), i = Pe(() => {
|
|
7416
7421
|
let u = [];
|
|
7417
7422
|
(n === He || n === Ge || n === Ue) && (u = s);
|
|
7418
7423
|
const c = u == null ? void 0 : u.filter(
|
|
@@ -7431,7 +7436,7 @@ function fo({
|
|
|
7431
7436
|
c && a(c);
|
|
7432
7437
|
}
|
|
7433
7438
|
return i != null && i.length ? /* @__PURE__ */ e(
|
|
7434
|
-
|
|
7439
|
+
pn,
|
|
7435
7440
|
{
|
|
7436
7441
|
multiple: !1,
|
|
7437
7442
|
options: i,
|
|
@@ -7457,7 +7462,7 @@ function tn({
|
|
|
7457
7462
|
className: a,
|
|
7458
7463
|
delayDuration: n
|
|
7459
7464
|
}) {
|
|
7460
|
-
return /* @__PURE__ */ e(
|
|
7465
|
+
return /* @__PURE__ */ e(oa, { children: /* @__PURE__ */ r(Ot, { delayDuration: n, children: [
|
|
7461
7466
|
/* @__PURE__ */ e(rn, { asChild: !0, children: /* @__PURE__ */ e(
|
|
7462
7467
|
"span",
|
|
7463
7468
|
{
|
|
@@ -7530,7 +7535,7 @@ function yo({
|
|
|
7530
7535
|
transform: x,
|
|
7531
7536
|
transition: m,
|
|
7532
7537
|
isDragging: C
|
|
7533
|
-
} =
|
|
7538
|
+
} = Da({ id: t.id, data: { type: a } }), p = x ? {
|
|
7534
7539
|
opacity: C ? 0.5 : void 0,
|
|
7535
7540
|
transform: vt.Translate.toString(x),
|
|
7536
7541
|
transition: m
|
|
@@ -7690,7 +7695,7 @@ function Kt({
|
|
|
7690
7695
|
onRemoveColumn: o
|
|
7691
7696
|
}) {
|
|
7692
7697
|
var p, v;
|
|
7693
|
-
const { setNodeRef: l, isOver: u, over: c } =
|
|
7698
|
+
const { setNodeRef: l, isOver: u, over: c } = Ia({
|
|
7694
7699
|
id: t
|
|
7695
7700
|
}), h = Ee((g) => g.activeId), d = f((g) => {
|
|
7696
7701
|
var N;
|
|
@@ -7700,7 +7705,7 @@ function Kt({
|
|
|
7700
7705
|
if (!x || x.length === 0)
|
|
7701
7706
|
return /* @__PURE__ */ e("div", { className: "mr-5 flex h-8 grow items-center space-x-2 rounded-md border border-dashed border-muted-foreground/80 bg-background px-2 py-1 text-sm text-muted-foreground", children: /* @__PURE__ */ e("span", { className: "invisible text-muted-foreground/70 group-hover:visible", children: "Drag here" }) });
|
|
7702
7707
|
}
|
|
7703
|
-
return /* @__PURE__ */ e(
|
|
7708
|
+
return /* @__PURE__ */ e(fn, { items: n == null ? void 0 : n.map((g) => g.id), children: /* @__PURE__ */ r(
|
|
7704
7709
|
"div",
|
|
7705
7710
|
{
|
|
7706
7711
|
className: G(
|
|
@@ -7741,7 +7746,7 @@ function Ss({ children: t, id: a, type: n }) {
|
|
|
7741
7746
|
transform: l,
|
|
7742
7747
|
transition: u,
|
|
7743
7748
|
isDragging: c
|
|
7744
|
-
} =
|
|
7749
|
+
} = Da({ id: a, data: { type: n } }), h = l ? {
|
|
7745
7750
|
opacity: c ? 0.5 : void 0,
|
|
7746
7751
|
transform: vt.Translate.toString(l),
|
|
7747
7752
|
transition: u
|
|
@@ -7797,13 +7802,13 @@ function vo() {
|
|
|
7797
7802
|
N && i(N);
|
|
7798
7803
|
}
|
|
7799
7804
|
return /* @__PURE__ */ e(
|
|
7800
|
-
|
|
7805
|
+
fn,
|
|
7801
7806
|
{
|
|
7802
7807
|
items: t.map((g) => dt(g.columnId)),
|
|
7803
7808
|
children: /* @__PURE__ */ r("div", { className: "space-y-2 rounded-md p-4 text-sm", children: [
|
|
7804
7809
|
/* @__PURE__ */ e(U, { className: "text-sm", children: "Sort By" }),
|
|
7805
7810
|
y.length > 0 && /* @__PURE__ */ e("div", { className: "mr-5", children: /* @__PURE__ */ e(
|
|
7806
|
-
|
|
7811
|
+
pn,
|
|
7807
7812
|
{
|
|
7808
7813
|
multiple: !1,
|
|
7809
7814
|
options: y,
|
|
@@ -7821,7 +7826,7 @@ function vo() {
|
|
|
7821
7826
|
Ss,
|
|
7822
7827
|
{
|
|
7823
7828
|
id: dt(g.columnId),
|
|
7824
|
-
type:
|
|
7829
|
+
type: Cn,
|
|
7825
7830
|
children: /* @__PURE__ */ e(
|
|
7826
7831
|
"div",
|
|
7827
7832
|
{
|
|
@@ -7943,7 +7948,7 @@ function xo() {
|
|
|
7943
7948
|
] })
|
|
7944
7949
|
] });
|
|
7945
7950
|
}
|
|
7946
|
-
function
|
|
7951
|
+
function Sn({
|
|
7947
7952
|
children: t,
|
|
7948
7953
|
column: a,
|
|
7949
7954
|
id: n,
|
|
@@ -8030,7 +8035,7 @@ function Co({
|
|
|
8030
8035
|
connectionId: i,
|
|
8031
8036
|
// not needed
|
|
8032
8037
|
dataType: t.type
|
|
8033
|
-
}, { data: y, isLoading: x, isFetching: m, isError: C } =
|
|
8038
|
+
}, { data: y, isLoading: x, isFetching: m, isError: C } = Oa(d), p = Pe(() => {
|
|
8034
8039
|
var S;
|
|
8035
8040
|
return d.column ? (S = y == null ? void 0 : y.records) == null ? void 0 : S.map((z) => {
|
|
8036
8041
|
let k = d.column.split(".").slice(-1)[0].replace(/"/g, "");
|
|
@@ -8048,7 +8053,7 @@ function Co({
|
|
|
8048
8053
|
}
|
|
8049
8054
|
function g() {
|
|
8050
8055
|
return x || m ? /* @__PURE__ */ e(
|
|
8051
|
-
|
|
8056
|
+
ln,
|
|
8052
8057
|
{
|
|
8053
8058
|
style: {
|
|
8054
8059
|
borderRadius: n == null ? void 0 : n.controlInputRadius
|
|
@@ -8056,7 +8061,7 @@ function Co({
|
|
|
8056
8061
|
className: "h-8 min-w-60 bg-foreground/10"
|
|
8057
8062
|
}
|
|
8058
8063
|
) : C ? /* @__PURE__ */ e("div", { className: "flex h-8 min-w-60 items-center bg-muted px-2 text-sm", children: "Error" }) : /* @__PURE__ */ e(
|
|
8059
|
-
|
|
8064
|
+
pn,
|
|
8060
8065
|
{
|
|
8061
8066
|
options: p,
|
|
8062
8067
|
onChange: v,
|
|
@@ -8068,7 +8073,7 @@ function Co({
|
|
|
8068
8073
|
);
|
|
8069
8074
|
}
|
|
8070
8075
|
return /* @__PURE__ */ e(
|
|
8071
|
-
|
|
8076
|
+
Sn,
|
|
8072
8077
|
{
|
|
8073
8078
|
className: "w-60",
|
|
8074
8079
|
id: t.id,
|
|
@@ -8092,7 +8097,7 @@ function No({
|
|
|
8092
8097
|
title: "",
|
|
8093
8098
|
// not needed
|
|
8094
8099
|
dataType: t.type
|
|
8095
|
-
}, { isLoading: c, isFetching: h, isError: d, data: y } =
|
|
8100
|
+
}, { isLoading: c, isFetching: h, isError: d, data: y } = Oa(u), x = y == null ? void 0 : y.records, { dateRange: m, setDateRange: C, initialDateRange: p } = Lr(x), { updateEditorFilterValue: v } = W();
|
|
8096
8101
|
function g(z) {
|
|
8097
8102
|
var O, R;
|
|
8098
8103
|
const k = {
|
|
@@ -8105,7 +8110,7 @@ function No({
|
|
|
8105
8110
|
v(t.name, null, !0), C(p);
|
|
8106
8111
|
}
|
|
8107
8112
|
function S() {
|
|
8108
|
-
return c || h ? /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(
|
|
8113
|
+
return c || h ? /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(ln, { className: "h-8 w-72 bg-foreground/10" }) }) : d ? /* @__PURE__ */ e("div", { className: "h-8 w-72 bg-muted px-2", children: "Error" }) : x ? /* @__PURE__ */ e(
|
|
8109
8114
|
Er,
|
|
8110
8115
|
{
|
|
8111
8116
|
title: u.title,
|
|
@@ -8120,7 +8125,7 @@ function No({
|
|
|
8120
8125
|
) : /* @__PURE__ */ e(U, { className: "flex h-8 w-72 items-center bg-muted px-2", children: "No Data" });
|
|
8121
8126
|
}
|
|
8122
8127
|
return /* @__PURE__ */ e(
|
|
8123
|
-
|
|
8128
|
+
Sn,
|
|
8124
8129
|
{
|
|
8125
8130
|
className: "w-72",
|
|
8126
8131
|
id: t.id,
|
|
@@ -8138,7 +8143,7 @@ function So({
|
|
|
8138
8143
|
sortableType: i
|
|
8139
8144
|
}) {
|
|
8140
8145
|
var C, p;
|
|
8141
|
-
const { setNodeRef: o, isOver: l, over: u } =
|
|
8146
|
+
const { setNodeRef: o, isOver: l, over: u } = Ia({
|
|
8142
8147
|
id: t
|
|
8143
8148
|
}), c = Ee((v) => v.activeId), h = {
|
|
8144
8149
|
// borderColor: isOver ? 'green' : undefined,
|
|
@@ -8150,7 +8155,7 @@ function So({
|
|
|
8150
8155
|
function x(v) {
|
|
8151
8156
|
const g = we(v.type);
|
|
8152
8157
|
return v.id === Xa.id ? /* @__PURE__ */ e(
|
|
8153
|
-
|
|
8158
|
+
Sn,
|
|
8154
8159
|
{
|
|
8155
8160
|
id: v.id,
|
|
8156
8161
|
sortableType: i,
|
|
@@ -8177,7 +8182,7 @@ function So({
|
|
|
8177
8182
|
);
|
|
8178
8183
|
}
|
|
8179
8184
|
const m = c ? s : n;
|
|
8180
|
-
return /* @__PURE__ */ e(
|
|
8185
|
+
return /* @__PURE__ */ e(fn, { items: n == null ? void 0 : n.map((v) => v.id), children: /* @__PURE__ */ r(
|
|
8181
8186
|
"div",
|
|
8182
8187
|
{
|
|
8183
8188
|
className: G(
|
|
@@ -8337,7 +8342,7 @@ const Io = [
|
|
|
8337
8342
|
}
|
|
8338
8343
|
];
|
|
8339
8344
|
function Oo() {
|
|
8340
|
-
const t = at(null), a = at(null), [n, s] = J(!1), [i, o] = J(
|
|
8345
|
+
const t = at(null), a = at(null), [n, s] = J(!1), [i, o] = J(Xn), [l, u] = J(!1), c = f((F) => F.actions.setCardSql), h = f((F) => F.actions.setRunSql), d = f((F) => F.showAIDialog), { setShowAIDialog: y } = W(), {
|
|
8341
8346
|
messages: x,
|
|
8342
8347
|
setMessages: m,
|
|
8343
8348
|
reload: C,
|
|
@@ -8375,11 +8380,11 @@ function Oo() {
|
|
|
8375
8380
|
p(D);
|
|
8376
8381
|
}
|
|
8377
8382
|
function b() {
|
|
8378
|
-
return /* @__PURE__ */ r(
|
|
8379
|
-
/* @__PURE__ */ e(
|
|
8380
|
-
/* @__PURE__ */ r(
|
|
8381
|
-
/* @__PURE__ */ e(
|
|
8382
|
-
/* @__PURE__ */ e(
|
|
8383
|
+
return /* @__PURE__ */ r(Qn, { children: [
|
|
8384
|
+
/* @__PURE__ */ e(Kn, { asChild: !0, children: /* @__PURE__ */ e(ee, { className: "h-7 p-2", size: "sm", variant: "ghost", children: /* @__PURE__ */ e(Ra, { className: "size-3.5 text-muted-foreground/70 hover:text-muted-foreground" }) }) }),
|
|
8385
|
+
/* @__PURE__ */ r(Jn, { align: "end", children: [
|
|
8386
|
+
/* @__PURE__ */ e(Wn, { children: "Options" }),
|
|
8387
|
+
/* @__PURE__ */ e(Yn, {}),
|
|
8383
8388
|
/* @__PURE__ */ e(
|
|
8384
8389
|
jt,
|
|
8385
8390
|
{
|
|
@@ -8662,7 +8667,7 @@ function Ao() {
|
|
|
8662
8667
|
}
|
|
8663
8668
|
),
|
|
8664
8669
|
children: /* @__PURE__ */ r("div", { className: "flex items-center gap-2", children: [
|
|
8665
|
-
/* @__PURE__ */ e(
|
|
8670
|
+
/* @__PURE__ */ e(vn, { column: o }),
|
|
8666
8671
|
/* @__PURE__ */ e("span", { children: o.column_name })
|
|
8667
8672
|
] })
|
|
8668
8673
|
},
|
|
@@ -8717,8 +8722,8 @@ function Lo() {
|
|
|
8717
8722
|
{
|
|
8718
8723
|
className: "flex min-w-[250px] max-w-fit flex-col gap-1 p-2",
|
|
8719
8724
|
children: [
|
|
8720
|
-
/* @__PURE__ */ e(
|
|
8721
|
-
/* @__PURE__ */ e(
|
|
8725
|
+
/* @__PURE__ */ e(Ma, { filter: s }),
|
|
8726
|
+
/* @__PURE__ */ e(va, { filter: s })
|
|
8722
8727
|
]
|
|
8723
8728
|
},
|
|
8724
8729
|
s.id
|
|
@@ -8835,7 +8840,7 @@ export {
|
|
|
8835
8840
|
Qo as SemaphorQueryClient,
|
|
8836
8841
|
Bo as Surfboard,
|
|
8837
8842
|
Ki as cleanCard,
|
|
8838
|
-
|
|
8843
|
+
ma as createSqlGenConfig,
|
|
8839
8844
|
el as downloadPdf,
|
|
8840
8845
|
xe as fmt,
|
|
8841
8846
|
Ko as getColumnDataType,
|
|
@@ -8843,7 +8848,7 @@ export {
|
|
|
8843
8848
|
Jo as getFilterValueType,
|
|
8844
8849
|
xt as getFormattedTableNameForQuery,
|
|
8845
8850
|
Ir as getQualifiedTableName,
|
|
8846
|
-
|
|
8851
|
+
ha as getSql,
|
|
8847
8852
|
Wo as invalidateToken,
|
|
8848
8853
|
Ts as isBooleanDataType,
|
|
8849
8854
|
Yo as isColumnInSqlGen,
|