react-semaphor 0.0.326 → 0.0.327
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-DhrEMJA7.js → index-D8ydfAi3.js} +87 -82
- package/dist/chunks/{index-BDqPrh8h.js → index-D9w7Qyp6.js} +3663 -3623
- package/dist/chunks/{index-DBlG6tXU.js → index-DZ7m-wYr.js} +155 -155
- package/dist/chunks/index-je4kAbD5.js +245 -0
- package/dist/chunks/{lucide-react-ihYr7LJ1.js → lucide-react-B32xDJUJ.js} +7549 -7570
- package/dist/chunks/{lucide-react-C4xsvjey.js → lucide-react-D-GpmvM-.js} +1289 -1294
- package/dist/dashboard/index.cjs +1 -1
- package/dist/dashboard/index.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +12 -12
- package/dist/style.css +1 -1
- package/dist/surfboard/index.cjs +1 -1
- package/dist/surfboard/index.js +1 -1
- package/package.json +1 -1
- package/dist/chunks/index--M3YafQu.js +0 -245
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as V,
|
|
1
|
+
import { c as V, q as zs, u as z, r as Os, s as ke, t as e, v as Fs, w as Is, x as O, k as Ds, y as Ts, z as Ls, A as Ms, E as Es, H as R, J as le, K as la, M as ra, N as ia, O as oa, Q as st, R as at, V as tt, W as Js, Y as Q, Z as Je, h as nt, _ as m, $ as lt, F as ca, a0 as Ke, a1 as We, a2 as da, a3 as rt, a4 as ua, a5 as me, a6 as he, a7 as xe, a8 as pe, a9 as Ne, aa as fe, ab as K, T as As, ac as Vs, ad as qs, ae as Rs, af as ma, ag as ha, ah as de, ai as it, aj as ot, ak as xa, al as ct, C as dt, am as ut, an as pa, B as mt, ao as qe, ap as ht, aq as Ks, ar as fa, as as ys, at as Ce, au as Fe, av as Se, aw as ga, ax as xt, ay as pt, az as ft, aA as gt, I as jt, aB as bt, aC as yt, aD as vt, aE as Re, aF as vs, aG as Ct, a as Nt, aH as Ge, aI as Cs, aJ as Ae, aK as Ns, aL as St, aM as wt, aN as kt, aO as zt, aP as Ot, aQ as Ft, aR as bs, aS as It, aT as Ws, aU as Dt, aV as Ys, aW as Tt, aX as Lt, aY as Mt, aZ as Et, a_ as ja, a$ as re, b0 as _s, b1 as ba, b2 as At, b3 as Vt, b4 as ls, b5 as qt, b6 as Rt, b7 as _t, b8 as Ht, o as $t, b9 as Pt, ba as Bt, bb as Ut, n as Gt, bc as us, bd as ya, be as va, bf as Ca, bg as rs, bh as Na, bi as is, bj as Xs, bk as Qt, bl as Jt, bm as ms, bn as hs, bo as xs, bp as Kt, X as Sa, bq as Wt, br as Yt, bs as Xt, bt as ps, bu as Ie, f as Zt, bv as Ue, bw as Hs, bx as wa, by as en, bz as sn, bA as os, bB as an, bC as tn, bD as nn, bE as Zs, bF as ln, bG as rn, bH as on, bI as cn, bJ as dn, bK as un, bL as mn, bM as hn, bN as De, bO as B, bP as U, bQ as $s, bR as G, bS as xn, bT as ka, bU as pn, bV as fn, bW as gn, bX as jn, bY as bn, bZ as yn, b_ as vn, b$ as Cn, c0 as Nn } from "./index-D9w7Qyp6.js";
|
|
2
2
|
import * as ea from "react";
|
|
3
3
|
import we, { useState as q, useMemo as Ss, useEffect as Z, useRef as ws, Suspense as Sn } from "react";
|
|
4
4
|
import "react-dom";
|
|
@@ -734,7 +734,7 @@ function tl() {
|
|
|
734
734
|
}
|
|
735
735
|
),
|
|
736
736
|
/* @__PURE__ */ e.jsx(
|
|
737
|
-
|
|
737
|
+
Je,
|
|
738
738
|
{
|
|
739
739
|
onClick: (b) => {
|
|
740
740
|
b.preventDefault(), c(u.id);
|
|
@@ -814,7 +814,7 @@ function ll() {
|
|
|
814
814
|
if (!d || !I) return;
|
|
815
815
|
const f = {
|
|
816
816
|
connectionId: r,
|
|
817
|
-
id:
|
|
817
|
+
id: Ke(),
|
|
818
818
|
title: "Title",
|
|
819
819
|
description: "Description",
|
|
820
820
|
preferences: {
|
|
@@ -829,7 +829,7 @@ function ll() {
|
|
|
829
829
|
sql: "select COUNT(*) from YOUR_TABLE",
|
|
830
830
|
data: []
|
|
831
831
|
}, k = {
|
|
832
|
-
id:
|
|
832
|
+
id: Ke(),
|
|
833
833
|
cards: [f],
|
|
834
834
|
activeCardId: f.id
|
|
835
835
|
};
|
|
@@ -846,7 +846,7 @@ function ll() {
|
|
|
846
846
|
template: k,
|
|
847
847
|
filterValues: p
|
|
848
848
|
};
|
|
849
|
-
await ks(M, s == null ? void 0 : s.accessToken),
|
|
849
|
+
await ks(M, s == null ? void 0 : s.accessToken), We.success("Lens saved"), g == null || g(f), c(!1);
|
|
850
850
|
}
|
|
851
851
|
return u ? null : /* @__PURE__ */ e.jsxs(
|
|
852
852
|
"div",
|
|
@@ -893,7 +893,7 @@ function ll() {
|
|
|
893
893
|
y(!1), T(!1);
|
|
894
894
|
},
|
|
895
895
|
size: "sm",
|
|
896
|
-
children: /* @__PURE__ */ e.jsx(
|
|
896
|
+
children: /* @__PURE__ */ e.jsx(Je, { className: "h-4 w-4", strokeWidth: 1.5 })
|
|
897
897
|
}
|
|
898
898
|
),
|
|
899
899
|
d && !u && S && /* @__PURE__ */ e.jsx(
|
|
@@ -924,7 +924,7 @@ function ll() {
|
|
|
924
924
|
}
|
|
925
925
|
);
|
|
926
926
|
}
|
|
927
|
-
function
|
|
927
|
+
function Be({
|
|
928
928
|
title: s,
|
|
929
929
|
items: t,
|
|
930
930
|
value: a,
|
|
@@ -971,7 +971,7 @@ function Pe({
|
|
|
971
971
|
)
|
|
972
972
|
}
|
|
973
973
|
),
|
|
974
|
-
/* @__PURE__ */ e.jsx(pe, { children: /* @__PURE__ */ e.jsxs(
|
|
974
|
+
/* @__PURE__ */ e.jsx(pe, { children: /* @__PURE__ */ e.jsxs(Ne, { children: [
|
|
975
975
|
n ? /* @__PURE__ */ e.jsx(fe, { children: "Loading..." }) : /* @__PURE__ */ e.jsx(fe, { children: s }),
|
|
976
976
|
/* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
977
977
|
o && /* @__PURE__ */ e.jsx(K, { value: "none", children: "None" }, "none"),
|
|
@@ -987,7 +987,7 @@ function rl({ column: s }) {
|
|
|
987
987
|
(h) => h.selectedSchemaName
|
|
988
988
|
), d = m(
|
|
989
989
|
(h) => h.selectedDatamodelId
|
|
990
|
-
), r = m((h) => h.sqlGen), { modelItems: o } =
|
|
990
|
+
), r = m((h) => h.sqlGen), { modelItems: o } = _e(), c = m((h) => h.actions.setSqlGen), p = m((h) => h.actions.setCardSql), u = m((h) => h.actions.setRunSql);
|
|
991
991
|
function b(h, j) {
|
|
992
992
|
var T;
|
|
993
993
|
const C = ma(h, r, j), F = (T = o == null ? void 0 : o.find(
|
|
@@ -1088,7 +1088,7 @@ function il({
|
|
|
1088
1088
|
(x) => x.dashboard.aiScopeTables
|
|
1089
1089
|
), { setAIScopeTables: b } = z((x) => x.actions), g = m((x) => x.actions.setRunSql), h = m((x) => x.actions.setSqlGen), j = m(
|
|
1090
1090
|
(x) => x.actions.setIsShowingVisual
|
|
1091
|
-
), C = m((x) => x.actions.setCardSql), { connectionType: F, modelItems: y } =
|
|
1091
|
+
), C = m((x) => x.actions.setCardSql), { connectionType: F, modelItems: y } = _e();
|
|
1092
1092
|
function T(x) {
|
|
1093
1093
|
var M;
|
|
1094
1094
|
const v = ma(x, l);
|
|
@@ -1116,7 +1116,7 @@ function il({
|
|
|
1116
1116
|
(Y) => Y.connectinonId === M.connectinonId && Y.tableName === M.tableName
|
|
1117
1117
|
) === H
|
|
1118
1118
|
);
|
|
1119
|
-
b(k),
|
|
1119
|
+
b(k), We.success(`Added '${c}' to AI Scope`, {
|
|
1120
1120
|
position: "top-right",
|
|
1121
1121
|
duration: 2500,
|
|
1122
1122
|
richColors: !0
|
|
@@ -1125,7 +1125,7 @@ function il({
|
|
|
1125
1125
|
const v = (u || []).filter(
|
|
1126
1126
|
(f) => f.connectinonId !== d && f.tableName !== c
|
|
1127
1127
|
);
|
|
1128
|
-
b(v),
|
|
1128
|
+
b(v), We(`Removed '${c}' from AI Scope`, {
|
|
1129
1129
|
position: "top-right",
|
|
1130
1130
|
duration: 2e3,
|
|
1131
1131
|
richColors: !0
|
|
@@ -1203,7 +1203,7 @@ function il({
|
|
|
1203
1203
|
)
|
|
1204
1204
|
] }),
|
|
1205
1205
|
/* @__PURE__ */ e.jsxs(
|
|
1206
|
-
|
|
1206
|
+
qe,
|
|
1207
1207
|
{
|
|
1208
1208
|
className: "flex-1 basis-0 overflow-y-auto border-b border-t border-muted py-3",
|
|
1209
1209
|
children: [
|
|
@@ -1241,7 +1241,7 @@ function il({
|
|
|
1241
1241
|
)
|
|
1242
1242
|
] });
|
|
1243
1243
|
}
|
|
1244
|
-
function
|
|
1244
|
+
function _e(s, t) {
|
|
1245
1245
|
var Xe, Ze, es, ss, as;
|
|
1246
1246
|
let a = Ss(() => [], []);
|
|
1247
1247
|
const n = ke().authToken || s, l = m(
|
|
@@ -1278,7 +1278,7 @@ function Re(s, t) {
|
|
|
1278
1278
|
data: I,
|
|
1279
1279
|
isLoading: A,
|
|
1280
1280
|
isError: N
|
|
1281
|
-
} =
|
|
1281
|
+
} = Ce({
|
|
1282
1282
|
queryKey: ["connections"],
|
|
1283
1283
|
queryFn: () => Fe(
|
|
1284
1284
|
"https://semaphor.cloud/api/v1/connections",
|
|
@@ -1290,7 +1290,7 @@ function Re(s, t) {
|
|
|
1290
1290
|
data: S,
|
|
1291
1291
|
isLoading: L,
|
|
1292
1292
|
isError: x
|
|
1293
|
-
} =
|
|
1293
|
+
} = Ce({
|
|
1294
1294
|
queryKey: ["models", l],
|
|
1295
1295
|
queryFn: () => Fe(
|
|
1296
1296
|
"https://semaphor.cloud/api/v1/datamodels",
|
|
@@ -1309,7 +1309,7 @@ function Re(s, t) {
|
|
|
1309
1309
|
isFetching: P,
|
|
1310
1310
|
isError: Y,
|
|
1311
1311
|
refetch: ie
|
|
1312
|
-
} =
|
|
1312
|
+
} = Ce({
|
|
1313
1313
|
queryKey: ["databases", l],
|
|
1314
1314
|
queryFn: () => Fe(
|
|
1315
1315
|
"https://semaphor.cloud/api/v1/databases",
|
|
@@ -1326,7 +1326,7 @@ function Re(s, t) {
|
|
|
1326
1326
|
isFetching: w,
|
|
1327
1327
|
isError: _,
|
|
1328
1328
|
refetch: ee
|
|
1329
|
-
} =
|
|
1329
|
+
} = Ce({
|
|
1330
1330
|
queryKey: ["schemas", l, r],
|
|
1331
1331
|
queryFn: () => Fe(
|
|
1332
1332
|
"https://semaphor.cloud/api/v1/schemas",
|
|
@@ -1344,7 +1344,7 @@ function Re(s, t) {
|
|
|
1344
1344
|
isFetching: se,
|
|
1345
1345
|
isError: $,
|
|
1346
1346
|
refetch: X
|
|
1347
|
-
} =
|
|
1347
|
+
} = Ce({
|
|
1348
1348
|
queryKey: [
|
|
1349
1349
|
"tables",
|
|
1350
1350
|
l,
|
|
@@ -1365,8 +1365,8 @@ function Re(s, t) {
|
|
|
1365
1365
|
data: te,
|
|
1366
1366
|
isLoading: Le,
|
|
1367
1367
|
isFetching: ze,
|
|
1368
|
-
isError:
|
|
1369
|
-
} =
|
|
1368
|
+
isError: je
|
|
1369
|
+
} = Ce({
|
|
1370
1370
|
queryKey: [
|
|
1371
1371
|
"columns",
|
|
1372
1372
|
l,
|
|
@@ -1407,7 +1407,7 @@ function Re(s, t) {
|
|
|
1407
1407
|
g,
|
|
1408
1408
|
v
|
|
1409
1409
|
]);
|
|
1410
|
-
const
|
|
1410
|
+
const be = (v == null ? void 0 : v.type) === "API" ? (Xe = v == null ? void 0 : v.type) == null ? void 0 : Xe.toLowerCase() : c || "", J = k ? "" : o || "";
|
|
1411
1411
|
function oe(i) {
|
|
1412
1412
|
h(i), j("");
|
|
1413
1413
|
}
|
|
@@ -1423,14 +1423,14 @@ function Re(s, t) {
|
|
|
1423
1423
|
M && ((Ze = M == null ? void 0 : M.databases) == null ? void 0 : Ze.length) > 0, W && ((es = W == null ? void 0 : W.schemas) == null ? void 0 : es.length) > 0, te && ((ss = te == null ? void 0 : te.columns) == null ? void 0 : ss.length) > 0 && (a = te.columns.map((i) => ({
|
|
1424
1424
|
...i,
|
|
1425
1425
|
data_type: i.data_type.toLowerCase()
|
|
1426
|
-
}))), Y && (a = []), (
|
|
1427
|
-
const
|
|
1426
|
+
}))), Y && (a = []), (je || N) && (a = []);
|
|
1427
|
+
const $e = I == null ? void 0 : I.connections.map(
|
|
1428
1428
|
(i) => ({
|
|
1429
1429
|
id: i.id,
|
|
1430
1430
|
name: i.name,
|
|
1431
1431
|
type: i.type
|
|
1432
1432
|
})
|
|
1433
|
-
),
|
|
1433
|
+
), Pe = (as = S == null ? void 0 : S.datamodels) == null ? void 0 : as.map((i) => ({
|
|
1434
1434
|
id: i.id,
|
|
1435
1435
|
name: i.name
|
|
1436
1436
|
})), Ee = M == null ? void 0 : M.databases.map((i) => ({
|
|
@@ -1444,10 +1444,10 @@ function Re(s, t) {
|
|
|
1444
1444
|
name: i.table_name
|
|
1445
1445
|
}));
|
|
1446
1446
|
return {
|
|
1447
|
-
connectionItems:
|
|
1447
|
+
connectionItems: $e,
|
|
1448
1448
|
isConnectionsLoading: A,
|
|
1449
1449
|
isConnectionsError: N,
|
|
1450
|
-
modelItems:
|
|
1450
|
+
modelItems: Pe,
|
|
1451
1451
|
isModelsLoading: L,
|
|
1452
1452
|
isModelsError: x,
|
|
1453
1453
|
databaseItems: Ee,
|
|
@@ -1461,10 +1461,10 @@ function Re(s, t) {
|
|
|
1461
1461
|
isTableError: $,
|
|
1462
1462
|
columns: a,
|
|
1463
1463
|
isColumnsLoadingOrFetching: Le || ze,
|
|
1464
|
-
isColumnsError:
|
|
1464
|
+
isColumnsError: je,
|
|
1465
1465
|
isNonDbConnection: k,
|
|
1466
1466
|
connectionType: f,
|
|
1467
|
-
tableName:
|
|
1467
|
+
tableName: be,
|
|
1468
1468
|
schemaName: J,
|
|
1469
1469
|
handleConnectionChange: Oe,
|
|
1470
1470
|
handleDatamodelChange: Me,
|
|
@@ -1513,7 +1513,7 @@ function Aa({
|
|
|
1513
1513
|
handleDatamodelChange: P,
|
|
1514
1514
|
tableName: Y,
|
|
1515
1515
|
schemaName: ie
|
|
1516
|
-
} =
|
|
1516
|
+
} = _e();
|
|
1517
1517
|
function W() {
|
|
1518
1518
|
return s ? s(ie, Y, g) : /* @__PURE__ */ e.jsx(
|
|
1519
1519
|
il,
|
|
@@ -1532,7 +1532,7 @@ function Aa({
|
|
|
1532
1532
|
if (!t || v === "S3" || v === "API") return null;
|
|
1533
1533
|
if (!a || a === "none")
|
|
1534
1534
|
return /* @__PURE__ */ e.jsx(
|
|
1535
|
-
|
|
1535
|
+
Be,
|
|
1536
1536
|
{
|
|
1537
1537
|
showNone: !0,
|
|
1538
1538
|
onChange: M,
|
|
@@ -1547,16 +1547,16 @@ function Aa({
|
|
|
1547
1547
|
function _() {
|
|
1548
1548
|
if (t && !f && (!n || n === "none") && (!a || a === "none"))
|
|
1549
1549
|
return /* @__PURE__ */ e.jsxs("div", { className: "grid grid-cols-3", children: [
|
|
1550
|
-
/* @__PURE__ */ e.jsx("div", { className: "col-span-1 grid place-items-center", children: /* @__PURE__ */ e.jsx(
|
|
1550
|
+
/* @__PURE__ */ e.jsx("div", { className: "col-span-1 grid place-items-center", children: /* @__PURE__ */ e.jsx(Se, {}) }),
|
|
1551
1551
|
/* @__PURE__ */ e.jsx("div", { className: "col-span-1 grid place-items-center", children: /* @__PURE__ */ e.jsx(R, { children: "OR" }) }),
|
|
1552
|
-
/* @__PURE__ */ e.jsx("div", { className: "col-span-1 grid place-items-center", children: /* @__PURE__ */ e.jsx(
|
|
1552
|
+
/* @__PURE__ */ e.jsx("div", { className: "col-span-1 grid place-items-center", children: /* @__PURE__ */ e.jsx(Se, {}) })
|
|
1553
1553
|
] });
|
|
1554
1554
|
}
|
|
1555
1555
|
function ee() {
|
|
1556
1556
|
if (!t || v === "S3" || v === "API") return null;
|
|
1557
1557
|
if (!n || n === "none")
|
|
1558
1558
|
return /* @__PURE__ */ e.jsx(
|
|
1559
|
-
|
|
1559
|
+
Be,
|
|
1560
1560
|
{
|
|
1561
1561
|
showNone: !0,
|
|
1562
1562
|
onChange: P,
|
|
@@ -1570,7 +1570,7 @@ function Aa({
|
|
|
1570
1570
|
}
|
|
1571
1571
|
function E() {
|
|
1572
1572
|
return !t || v === "S3" || v === "API" || !n || n === "none" ? null : /* @__PURE__ */ e.jsx(
|
|
1573
|
-
|
|
1573
|
+
Be,
|
|
1574
1574
|
{
|
|
1575
1575
|
onChange: H,
|
|
1576
1576
|
isError: A,
|
|
@@ -1587,7 +1587,7 @@ function Aa({
|
|
|
1587
1587
|
return v === "API" ? (X = !1, X) : ((v === "S3" || t && n && n !== "none" && l) && (X = !0), X);
|
|
1588
1588
|
}
|
|
1589
1589
|
return $() ? /* @__PURE__ */ e.jsx(
|
|
1590
|
-
|
|
1590
|
+
Be,
|
|
1591
1591
|
{
|
|
1592
1592
|
onChange: r,
|
|
1593
1593
|
isError: x,
|
|
@@ -1601,7 +1601,7 @@ function Aa({
|
|
|
1601
1601
|
return /* @__PURE__ */ e.jsxs("aside", { className: "xbg-red-100 flex grow flex-col justify-between", children: [
|
|
1602
1602
|
/* @__PURE__ */ e.jsxs("section", { className: "space-y-3 px-6 py-4", children: [
|
|
1603
1603
|
/* @__PURE__ */ e.jsx(
|
|
1604
|
-
|
|
1604
|
+
Be,
|
|
1605
1605
|
{
|
|
1606
1606
|
items: o,
|
|
1607
1607
|
title: "Connection",
|
|
@@ -1666,7 +1666,7 @@ function cl({
|
|
|
1666
1666
|
align: "start",
|
|
1667
1667
|
className: "w-full min-w-fit max-w-[700px]",
|
|
1668
1668
|
children: /* @__PURE__ */ e.jsx("div", { className: "flex justify-between space-x-4", children: /* @__PURE__ */ e.jsxs("div", { className: "flex grow flex-col space-y-2", children: [
|
|
1669
|
-
/* @__PURE__ */ e.jsx(
|
|
1669
|
+
/* @__PURE__ */ e.jsx(qe, { className: "max-h-[250px] min-h-0 overflow-scroll", children: /* @__PURE__ */ e.jsx("p", { className: "overflow-auto rounded-md bg-muted p-2 text-xs leading-relaxed", children: s }) }),
|
|
1670
1670
|
/* @__PURE__ */ e.jsxs(
|
|
1671
1671
|
O,
|
|
1672
1672
|
{
|
|
@@ -1749,7 +1749,7 @@ function ul({
|
|
|
1749
1749
|
Table Columns: ${y == null ? void 0 : y.map((w) => `${w.column_name} | ${w.data_type}`).join(", ")}
|
|
1750
1750
|
User SQL: ${T}
|
|
1751
1751
|
${g && `Base Queries: ${JSON.stringify(g)} `}`, N = ` When the user asks for a specific chart please use the following query structure to generate the chart query. Do not make up the column names. Use only the table columns provided above for the query. Replace x-axis, y-axis, and lables with the appropriate column names.
|
|
1752
|
-
Visual Query Syntax: ${dl}`, { data: S, isLoading: L, isFetching: x, isError: v, refetch: f } =
|
|
1752
|
+
Visual Query Syntax: ${dl}`, { data: S, isLoading: L, isFetching: x, isError: v, refetch: f } = Ce({
|
|
1753
1753
|
queryKey: ["ai-query"],
|
|
1754
1754
|
queryFn: () => Fe(
|
|
1755
1755
|
"https://semaphor.cloud/api/v1/ai",
|
|
@@ -2028,7 +2028,7 @@ function qa(s) {
|
|
|
2028
2028
|
key: a
|
|
2029
2029
|
}, t.attr), qa(t.child)));
|
|
2030
2030
|
}
|
|
2031
|
-
function
|
|
2031
|
+
function ge(s) {
|
|
2032
2032
|
return (t) => /* @__PURE__ */ we.createElement(jl, cs({
|
|
2033
2033
|
attr: ds({}, s.attr)
|
|
2034
2034
|
}, t), qa(s.child));
|
|
@@ -2057,7 +2057,7 @@ function jl(s) {
|
|
|
2057
2057
|
return sa !== void 0 ? /* @__PURE__ */ we.createElement(sa.Consumer, null, (a) => t(a)) : t(Va);
|
|
2058
2058
|
}
|
|
2059
2059
|
function bl(s) {
|
|
2060
|
-
return
|
|
2060
|
+
return ge({ tag: "svg", 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: [] }] })(s);
|
|
2061
2061
|
}
|
|
2062
2062
|
function yl({ sql: s }) {
|
|
2063
2063
|
return /* @__PURE__ */ e.jsxs(Vs, { children: [
|
|
@@ -2069,7 +2069,7 @@ function yl({ sql: s }) {
|
|
|
2069
2069
|
className: "w-full min-w-fit max-w-[700px] p-3 pt-2",
|
|
2070
2070
|
children: /* @__PURE__ */ e.jsxs("div", { className: "space-y-2", children: [
|
|
2071
2071
|
/* @__PURE__ */ e.jsx(R, { className: "text-xs font-semibold", children: "Resolved Query" }),
|
|
2072
|
-
/* @__PURE__ */ e.jsx("div", { className: "flex grow flex-col space-y-2", children: /* @__PURE__ */ e.jsx(
|
|
2072
|
+
/* @__PURE__ */ e.jsx("div", { className: "flex grow flex-col space-y-2", children: /* @__PURE__ */ e.jsx(qe, { className: "max-h-[250px] min-h-0 overflow-scroll", children: /* @__PURE__ */ e.jsx("p", { className: "overflow-auto rounded-md bg-muted p-2 font-mono text-xs leading-relaxed", children: s }) }) })
|
|
2073
2073
|
] })
|
|
2074
2074
|
}
|
|
2075
2075
|
)
|
|
@@ -2113,9 +2113,9 @@ function vl() {
|
|
|
2113
2113
|
m(
|
|
2114
2114
|
(i) => i.actions.setApplyFilters
|
|
2115
2115
|
);
|
|
2116
|
-
const te = m((i) => i.onClose), Le = m((i) => i.actions.setSqlGen), ze = m((i) => i.runSql),
|
|
2116
|
+
const te = m((i) => i.onClose), Le = m((i) => i.actions.setSqlGen), ze = m((i) => i.runSql), je = m((i) => i.actions.setRunSql);
|
|
2117
2117
|
m((i) => i.actions.setCardCfg);
|
|
2118
|
-
const
|
|
2118
|
+
const be = m(
|
|
2119
2119
|
(i) => i.actions.setIsSqlRunning
|
|
2120
2120
|
), {
|
|
2121
2121
|
data: J,
|
|
@@ -2123,12 +2123,12 @@ function vl() {
|
|
|
2123
2123
|
isFetching: ce,
|
|
2124
2124
|
isSuccess: Oe,
|
|
2125
2125
|
isError: Me,
|
|
2126
|
-
error:
|
|
2127
|
-
queryKey:
|
|
2126
|
+
error: $e,
|
|
2127
|
+
queryKey: Pe,
|
|
2128
2128
|
refetch: Ee
|
|
2129
|
-
} =
|
|
2129
|
+
} = Re(y);
|
|
2130
2130
|
Z(() => {
|
|
2131
|
-
if (J && (J.rowLimitExceeded &&
|
|
2131
|
+
if (J && (J.rowLimitExceeded && We.error("Row limit (10,000) exceeded. Refine your query.", {
|
|
2132
2132
|
position: "top-center",
|
|
2133
2133
|
richColors: !0
|
|
2134
2134
|
}), se((J == null ? void 0 : J.output) || ""), J.records.length > 0)) {
|
|
@@ -2141,7 +2141,7 @@ function vl() {
|
|
|
2141
2141
|
ae,
|
|
2142
2142
|
se
|
|
2143
2143
|
]), Z(() => {
|
|
2144
|
-
(oe || ce) &&
|
|
2144
|
+
(oe || ce) && be(!0), (Me || Oe) && be(!1), Me ? (D($e.message), ae([]), se("")) : D("");
|
|
2145
2145
|
}, [
|
|
2146
2146
|
oe,
|
|
2147
2147
|
ce,
|
|
@@ -2149,19 +2149,19 @@ function vl() {
|
|
|
2149
2149
|
se,
|
|
2150
2150
|
Me,
|
|
2151
2151
|
Oe,
|
|
2152
|
-
|
|
2152
|
+
be,
|
|
2153
2153
|
ae,
|
|
2154
2154
|
D,
|
|
2155
|
-
|
|
2155
|
+
$e
|
|
2156
2156
|
]), Z(() => {
|
|
2157
|
-
ze && (Ee(),
|
|
2158
|
-
}, [ze, Ee,
|
|
2157
|
+
ze && (Ee(), je(!1));
|
|
2158
|
+
}, [ze, Ee, je]);
|
|
2159
2159
|
function gs() {
|
|
2160
|
-
const i = n.getQueryData(
|
|
2160
|
+
const i = n.getQueryData(Pe);
|
|
2161
2161
|
s.queryData || t({
|
|
2162
|
-
queryKey:
|
|
2162
|
+
queryKey: Pe,
|
|
2163
2163
|
queryData: i
|
|
2164
|
-
}), n.setQueryData(
|
|
2164
|
+
}), n.setQueryData(Pe, null), _(""), Le({}), W(""), $({});
|
|
2165
2165
|
}
|
|
2166
2166
|
const Ye = (i) => {
|
|
2167
2167
|
l.current = i;
|
|
@@ -2170,13 +2170,13 @@ function vl() {
|
|
|
2170
2170
|
if (i.length === 0)
|
|
2171
2171
|
return "";
|
|
2172
2172
|
if (ne) {
|
|
2173
|
-
const
|
|
2174
|
-
if (
|
|
2175
|
-
const
|
|
2176
|
-
if (
|
|
2173
|
+
const ye = i.find((ve) => ve.id === ne);
|
|
2174
|
+
if (ye) {
|
|
2175
|
+
const ve = ye.tabTitle;
|
|
2176
|
+
if (ve == "All__Header")
|
|
2177
2177
|
return i[0].id;
|
|
2178
|
-
if (
|
|
2179
|
-
const Za =
|
|
2178
|
+
if (ve && ve.endsWith("__Header")) {
|
|
2179
|
+
const Za = ve.split("__")[0], Qs = i.find(
|
|
2180
2180
|
(et) => et.tabTitle === Za
|
|
2181
2181
|
);
|
|
2182
2182
|
return Qs ? Qs.id : i[0].id;
|
|
@@ -2199,14 +2199,14 @@ function vl() {
|
|
|
2199
2199
|
type: I ? y.type : "table",
|
|
2200
2200
|
sql: i,
|
|
2201
2201
|
customCfg: I ? y.customCfg : null
|
|
2202
|
-
},
|
|
2202
|
+
}, ye = k.cards.map(
|
|
2203
2203
|
(js) => js.id === y.id ? ne : js
|
|
2204
|
-
),
|
|
2204
|
+
), ve = {
|
|
2205
2205
|
...k,
|
|
2206
|
-
cards:
|
|
2207
|
-
activeCardId: Xe(
|
|
2206
|
+
cards: ye,
|
|
2207
|
+
activeCardId: Xe(ye, k.activeCardId)
|
|
2208
2208
|
};
|
|
2209
|
-
X == null || X(
|
|
2209
|
+
X == null || X(ve);
|
|
2210
2210
|
}
|
|
2211
2211
|
function es() {
|
|
2212
2212
|
const { queryKey: i, queryData: ne } = s;
|
|
@@ -2214,14 +2214,14 @@ function vl() {
|
|
|
2214
2214
|
}
|
|
2215
2215
|
Z(() => {
|
|
2216
2216
|
if (!d) return;
|
|
2217
|
-
const i = l.current, ne = window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light",
|
|
2217
|
+
const i = l.current, ne = window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light", ye = T === "system" ? ne : T;
|
|
2218
2218
|
return d.editor.defineTheme("default", {
|
|
2219
2219
|
// base: theme === 'light' ? 'hc-light' : 'vs-dark',
|
|
2220
|
-
base:
|
|
2220
|
+
base: ye === "light" ? "vs" : "vs-dark",
|
|
2221
2221
|
inherit: !0,
|
|
2222
2222
|
rules: [],
|
|
2223
2223
|
colors: {
|
|
2224
|
-
"editor.background":
|
|
2224
|
+
"editor.background": ye === "light" ? "#ffffff" : Ct("240 10% 10%")
|
|
2225
2225
|
// 'editor.background':
|
|
2226
2226
|
// activeTheme === 'light'
|
|
2227
2227
|
// ? '#ffffff'
|
|
@@ -2246,7 +2246,7 @@ function vl() {
|
|
|
2246
2246
|
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2 pt-3", children: [
|
|
2247
2247
|
/* @__PURE__ */ e.jsx(R, { className: "ml-6 text-xs font-semibold", children: "Filters" }),
|
|
2248
2248
|
Y && c && /* @__PURE__ */ e.jsx(
|
|
2249
|
-
|
|
2249
|
+
Je,
|
|
2250
2250
|
{
|
|
2251
2251
|
onClick: () => p(!1),
|
|
2252
2252
|
className: "bg-background/50 text-foreground/50 hover:cursor-pointer hover:text-foreground"
|
|
@@ -2254,7 +2254,7 @@ function vl() {
|
|
|
2254
2254
|
)
|
|
2255
2255
|
] }),
|
|
2256
2256
|
/* @__PURE__ */ e.jsx(
|
|
2257
|
-
|
|
2257
|
+
Ge,
|
|
2258
2258
|
{
|
|
2259
2259
|
theme: "default",
|
|
2260
2260
|
onChange: (i) => {
|
|
@@ -2324,7 +2324,7 @@ function vl() {
|
|
|
2324
2324
|
role: "sql-container",
|
|
2325
2325
|
className: "relative flex w-[99%]",
|
|
2326
2326
|
children: /* @__PURE__ */ e.jsx(
|
|
2327
|
-
|
|
2327
|
+
Ge,
|
|
2328
2328
|
{
|
|
2329
2329
|
theme: "default",
|
|
2330
2330
|
className: "pt-3",
|
|
@@ -2370,7 +2370,7 @@ function vl() {
|
|
|
2370
2370
|
role: "python-container",
|
|
2371
2371
|
className: "relative flex w-[99%] pt-0",
|
|
2372
2372
|
children: /* @__PURE__ */ e.jsx(
|
|
2373
|
-
|
|
2373
|
+
Ge,
|
|
2374
2374
|
{
|
|
2375
2375
|
className: "pt-3",
|
|
2376
2376
|
theme: "default",
|
|
@@ -2451,7 +2451,7 @@ function vl() {
|
|
|
2451
2451
|
Me && /* @__PURE__ */ e.jsx(
|
|
2452
2452
|
cl,
|
|
2453
2453
|
{
|
|
2454
|
-
error:
|
|
2454
|
+
error: $e.message,
|
|
2455
2455
|
setShowAIDialog: b,
|
|
2456
2456
|
setTriggerAIRun: C,
|
|
2457
2457
|
setUserInputforAI: h
|
|
@@ -2503,7 +2503,7 @@ function vl() {
|
|
|
2503
2503
|
size: "sm",
|
|
2504
2504
|
variant: "outline",
|
|
2505
2505
|
children: [
|
|
2506
|
-
/* @__PURE__ */ e.jsx(
|
|
2506
|
+
/* @__PURE__ */ e.jsx(Je, { className: "mr-2 size-4" }),
|
|
2507
2507
|
"Close"
|
|
2508
2508
|
]
|
|
2509
2509
|
}
|
|
@@ -2560,17 +2560,24 @@ function Cl({ data: s }) {
|
|
|
2560
2560
|
sorting: t
|
|
2561
2561
|
}
|
|
2562
2562
|
});
|
|
2563
|
-
return /* @__PURE__ */ e.jsxs(Ot, { children: [
|
|
2564
|
-
/* @__PURE__ */ e.jsx(Ft, { children: d.getHeaderGroups().map((o) => /* @__PURE__ */ e.jsx(bs, { children: o.headers.map((c) => /* @__PURE__ */ e.jsx(
|
|
2565
|
-
|
|
2566
|
-
|
|
2567
|
-
|
|
2563
|
+
return /* @__PURE__ */ e.jsxs(Ot, { className: "font-mono text-xs text-foreground/95", children: [
|
|
2564
|
+
/* @__PURE__ */ e.jsx(Ft, { children: d.getHeaderGroups().map((o) => /* @__PURE__ */ e.jsx(bs, { children: o.headers.map((c) => /* @__PURE__ */ e.jsx(
|
|
2565
|
+
It,
|
|
2566
|
+
{
|
|
2567
|
+
className: "sticky top-0 h-11 bg-muted font-semibold",
|
|
2568
|
+
children: c.isPlaceholder ? null : Ws(
|
|
2569
|
+
c.column.columnDef.header,
|
|
2570
|
+
c.getContext()
|
|
2571
|
+
)
|
|
2572
|
+
},
|
|
2573
|
+
c.id
|
|
2574
|
+
)) }, o.id)) }),
|
|
2568
2575
|
/* @__PURE__ */ e.jsx(Dt, { children: (r = d.getRowModel().rows) != null && r.length ? d.getRowModel().rows.map((o) => /* @__PURE__ */ e.jsx(
|
|
2569
2576
|
bs,
|
|
2570
2577
|
{
|
|
2571
2578
|
className: "whitespace-nowrap py-2",
|
|
2572
2579
|
"data-state": o.getIsSelected() && "selected",
|
|
2573
|
-
children: o.getVisibleCells().map((c) => /* @__PURE__ */ e.jsx(Ys, { children: Ws(c.column.columnDef.cell, c.getContext()) }, c.id))
|
|
2580
|
+
children: o.getVisibleCells().map((c) => /* @__PURE__ */ e.jsx(Ys, { className: "py-3", children: Ws(c.column.columnDef.cell, c.getContext()) }, c.id))
|
|
2574
2581
|
},
|
|
2575
2582
|
o.id
|
|
2576
2583
|
)) : /* @__PURE__ */ e.jsx(bs, { children: /* @__PURE__ */ e.jsx(Ys, { colSpan: l.length, className: "h-24 text-center", children: "No results." }) }) })
|
|
@@ -2584,7 +2591,7 @@ function Nl({ card: s }) {
|
|
|
2584
2591
|
(j = s.customCardPreferences) != null && j.inputData;
|
|
2585
2592
|
const { getCard: d } = ja(((C = s.customCardPreferences) == null ? void 0 : C.url) || ""), r = ((F = s.customCardPreferences) == null ? void 0 : F.visualType) || "single", o = m((S) => S.frame);
|
|
2586
2593
|
re();
|
|
2587
|
-
const { data: c } =
|
|
2594
|
+
const { data: c } = Re(s);
|
|
2588
2595
|
if (!((y = s.customCardPreferences) != null && y.componentName))
|
|
2589
2596
|
return null;
|
|
2590
2597
|
const p = d(
|
|
@@ -2641,7 +2648,7 @@ function Ra({
|
|
|
2641
2648
|
var F;
|
|
2642
2649
|
const a = m((y) => y.card), n = ((F = a.customCardPreferences) == null ? void 0 : F.showCardHeader) ?? !0, l = m((y) => y.frame), d = z((y) => y.dashboard.filters);
|
|
2643
2650
|
m((y) => y.actions.setRunSql);
|
|
2644
|
-
const { updateFilter: r } = Os(), o = d == null ? void 0 : d.find((y) => y.id === l.filterId), { data: c, isLoading: p, isFetching: u } =
|
|
2651
|
+
const { updateFilter: r } = Os(), o = d == null ? void 0 : d.find((y) => y.id === l.filterId), { data: c, isLoading: p, isFetching: u } = Re(a), { setCard: b } = re(), { data: g } = _s(a);
|
|
2645
2652
|
if (!a.id) return null;
|
|
2646
2653
|
let h;
|
|
2647
2654
|
c != null && c.records && (c == null ? void 0 : c.records.length) > 0 && (h = ba({
|
|
@@ -2724,7 +2731,7 @@ function Ra({
|
|
|
2724
2731
|
function Sl() {
|
|
2725
2732
|
const [s, t] = q(!1), [a, n] = q(""), [l, d] = q(""), [r, o] = q(""), [c, p] = q(""), u = m((N) => N.card), b = m(
|
|
2726
2733
|
(N) => N.card.customCfg
|
|
2727
|
-
), { data: g } =
|
|
2734
|
+
), { data: g } = Re(u), { data: h } = _s(u), { setCardCustomCfg: j, setCustomVisualCode: C } = re();
|
|
2728
2735
|
function F(N) {
|
|
2729
2736
|
var x, v;
|
|
2730
2737
|
const S = {
|
|
@@ -2834,7 +2841,7 @@ function Sl() {
|
|
|
2834
2841
|
className: "mt-0 grow rounded-b border border-t-0",
|
|
2835
2842
|
value: "custom-config",
|
|
2836
2843
|
children: /* @__PURE__ */ e.jsx(
|
|
2837
|
-
|
|
2844
|
+
Ge,
|
|
2838
2845
|
{
|
|
2839
2846
|
className: "h-full w-full overflow-hidden",
|
|
2840
2847
|
theme: "default",
|
|
@@ -2863,7 +2870,7 @@ function Sl() {
|
|
|
2863
2870
|
className: "mt-0 grow rounded-b border border-t-0",
|
|
2864
2871
|
value: "custom-code",
|
|
2865
2872
|
children: /* @__PURE__ */ e.jsx(
|
|
2866
|
-
|
|
2873
|
+
Ge,
|
|
2867
2874
|
{
|
|
2868
2875
|
className: "h-full w-full overflow-hidden",
|
|
2869
2876
|
theme: "default",
|
|
@@ -2908,40 +2915,40 @@ function Sl() {
|
|
|
2908
2915
|
] });
|
|
2909
2916
|
}
|
|
2910
2917
|
function _a(s) {
|
|
2911
|
-
return
|
|
2918
|
+
return ge({ tag: "svg", attr: { viewBox: "0 0 1024 1024" }, child: [{ tag: "path", attr: { d: "M926.8 397.1l-396-288a31.81 31.81 0 0 0-37.6 0l-396 288a31.99 31.99 0 0 0-11.6 35.8l151.3 466a32 32 0 0 0 30.4 22.1h489.5c13.9 0 26.1-8.9 30.4-22.1l151.3-466c4.2-13.2-.5-27.6-11.7-35.8zM838.6 417l-98.5 32-200-144.7V199.9L838.6 417zM466 567.2l-89.1 122.3-55.2-169.2L466 567.2zm-116.3-96.8L484 373.3v140.8l-134.3-43.7zM512 599.2l93.9 128.9H418.1L512 599.2zm28.1-225.9l134.2 97.1L540.1 514V373.3zM558 567.2l144.3-46.9-55.2 169.2L558 567.2zm-74-367.3v104.4L283.9 449l-98.5-32L484 199.9zM169.3 470.8l86.5 28.1 80.4 246.4-53.8 73.9-113.1-348.4zM327.1 853l50.3-69h269.3l50.3 69H327.1zm414.5-33.8l-53.8-73.9 80.4-246.4 86.5-28.1-113.1 348.4z" }, child: [] }] })(s);
|
|
2912
2919
|
}
|
|
2913
2920
|
function Ha(s) {
|
|
2914
|
-
return
|
|
2921
|
+
return ge({ tag: "svg", attr: { viewBox: "0 0 256 256", fill: "currentColor" }, child: [{ tag: "path", attr: { d: "M128,24a8,8,0,0,0-8,8V88a8,8,0,0,0,8,8,32,32,0,1,1-27.72,16,8,8,0,0,0-2.93-10.93l-48.5-28A8,8,0,0,0,37.92,76,104,104,0,1,0,128,24ZM48.09,91.1,83,111.26A48.09,48.09,0,0,0,80,128c0,1.53.08,3,.22,4.52L41.28,143A88.16,88.16,0,0,1,48.09,91.1Zm-2.67,67.31,39-10.44A48.1,48.1,0,0,0,120,175.32v40.31A88.2,88.2,0,0,1,45.42,158.41ZM136,215.63V175.32a48,48,0,0,0,0-94.65V40.36a88,88,0,0,1,0,175.27Z" }, child: [] }] })(s);
|
|
2915
2922
|
}
|
|
2916
2923
|
function $a(s) {
|
|
2917
|
-
return
|
|
2924
|
+
return ge({ tag: "svg", 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: [] }] })(s);
|
|
2918
2925
|
}
|
|
2919
2926
|
function Pa(s) {
|
|
2920
|
-
return
|
|
2927
|
+
return ge({ tag: "svg", 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: [] }] })(s);
|
|
2921
2928
|
}
|
|
2922
2929
|
function Ba(s) {
|
|
2923
|
-
return
|
|
2930
|
+
return ge({ tag: "svg", 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: [] }] })(s);
|
|
2924
2931
|
}
|
|
2925
2932
|
function Ua(s) {
|
|
2926
|
-
return
|
|
2933
|
+
return ge({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { fill: "none", d: "M0 0h24v24H0z" }, child: [] }, { tag: "path", attr: { d: "M4 9h4v11H4zM4 4h4v4H4zM10 7h4v4h-4zM16 10h4v4h-4zM16 15h4v5h-4zM10 12h4v8h-4z" }, child: [] }] })(s);
|
|
2927
2934
|
}
|
|
2928
2935
|
function Ga(s) {
|
|
2929
|
-
return
|
|
2936
|
+
return ge({ tag: "svg", 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: [] }] })(s);
|
|
2930
2937
|
}
|
|
2931
2938
|
function Qa(s) {
|
|
2932
|
-
return
|
|
2939
|
+
return ge({ tag: "svg", attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { d: "M217 25v14h78V25h-78zm0 32v46h14V71h50v32h14V57h-78zm32 32v14h14V89h-14zm-64 32v46h30v-46h-30zm48 0v14h46v-14h-46zm64 0v46h30v-46h-30zm-64 32v14h46v-14h-46zm-80 32v46h62v-46h-62zm80 0v14h46v-14h-46zm64 0v46h62v-46h-62zm-64 32v14h46v-14h-46zm-112 32v46h94v-46h-94zm112 0v14h46v-14h-46zm64 0v46h94v-46h-94zm-64 32v14h46v-14h-46zM89 313v46h126v-46H89zm144 0v14h46v-14h-46zm64 0v46h126v-46H297zm-64 32v14h46v-14h-46zM57 377v46h158v-46H57zm176 0v14h46v-14h-46zm64 0v46h158v-46H297zm-64 32v14h46v-14h-46zM25 441v46h190v-46H25zm208 0v14h46v-14h-46zm64 0v46h190v-46H297zm-64 32v14h46v-14h-46z" }, child: [] }] })(s);
|
|
2933
2940
|
}
|
|
2934
2941
|
function Ja(s) {
|
|
2935
2942
|
const [t, a] = q(null);
|
|
2936
2943
|
return Z(() => {
|
|
2937
2944
|
s && (async () => {
|
|
2938
|
-
const d = (await import("./lucide-react-
|
|
2945
|
+
const d = (await import("./lucide-react-B32xDJUJ.js"))[s];
|
|
2939
2946
|
a(d);
|
|
2940
2947
|
})();
|
|
2941
2948
|
}, [s]), t;
|
|
2942
2949
|
}
|
|
2943
2950
|
function Ka() {
|
|
2944
|
-
const { authToken: s } = ke(), { data: t, isLoading: a, isFetching: n, isError: l } =
|
|
2951
|
+
const { authToken: s } = ke(), { data: t, isLoading: a, isFetching: n, isError: l } = Ce({
|
|
2945
2952
|
queryKey: ["plugins", s == null ? void 0 : s.accessToken],
|
|
2946
2953
|
queryFn: () => Qt(s == null ? void 0 : s.accessToken)
|
|
2947
2954
|
// staleTime: Infinity,
|
|
@@ -2967,7 +2974,7 @@ function wl({
|
|
|
2967
2974
|
}
|
|
2968
2975
|
})();
|
|
2969
2976
|
}, [n]), t.length === 0 ? null : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
2970
|
-
/* @__PURE__ */ e.jsx(
|
|
2977
|
+
/* @__PURE__ */ e.jsx(Se, { className: "my-2" }),
|
|
2971
2978
|
/* @__PURE__ */ e.jsx("div", { className: "grid grid-cols-4 place-items-center", children: t.map((l, d) => /* @__PURE__ */ e.jsx(
|
|
2972
2979
|
kl,
|
|
2973
2980
|
{
|
|
@@ -3212,7 +3219,7 @@ function Fl() {
|
|
|
3212
3219
|
Kt,
|
|
3213
3220
|
{
|
|
3214
3221
|
onClick: () => {
|
|
3215
|
-
navigator.clipboard.writeText(s.id),
|
|
3222
|
+
navigator.clipboard.writeText(s.id), We.success("Card ID copied to clipboard");
|
|
3216
3223
|
},
|
|
3217
3224
|
className: "cursor-pointer space-x-2",
|
|
3218
3225
|
children: [
|
|
@@ -3226,12 +3233,12 @@ function Fl() {
|
|
|
3226
3233
|
function ta() {
|
|
3227
3234
|
const s = m((x) => x.frame), t = m((x) => x.card), a = m((x) => x.isShowingVisual), n = m((x) => x.isSqlRunning), l = m((x) => x.queryError), d = m((x) => x.pythonStdOut), r = m((x) => x.actions.setRunSql);
|
|
3228
3235
|
m((x) => x.onSave), m((x) => x.onClose), m((x) => x.actions.setCardSql), m((x) => x.actions.setCardType), m((x) => x.actions.setSqlGen);
|
|
3229
|
-
const { setFrame: o, setCard: c, updateCardInFrame: p } = re(), { data: u, isLoading: b, isFetching: g } =
|
|
3236
|
+
const { setFrame: o, setCard: c, updateCardInFrame: p } = re(), { data: u, isLoading: b, isFetching: g } = Re(t);
|
|
3230
3237
|
if (!t) return /* @__PURE__ */ e.jsx(e.Fragment, { children: "No Active Card" });
|
|
3231
3238
|
function h() {
|
|
3232
3239
|
const x = {
|
|
3233
3240
|
connectionId: t.connectionId,
|
|
3234
|
-
id:
|
|
3241
|
+
id: Ke(),
|
|
3235
3242
|
title: "Title",
|
|
3236
3243
|
description: "Description",
|
|
3237
3244
|
preferences: {
|
|
@@ -3259,7 +3266,7 @@ function ta() {
|
|
|
3259
3266
|
function C() {
|
|
3260
3267
|
const x = {
|
|
3261
3268
|
...t,
|
|
3262
|
-
id:
|
|
3269
|
+
id: Ke(),
|
|
3263
3270
|
title: `${t.title} Copy`,
|
|
3264
3271
|
tabTitle: `${t.tabTitle || t.title} Copy`
|
|
3265
3272
|
};
|
|
@@ -3375,7 +3382,7 @@ function ta() {
|
|
|
3375
3382
|
);
|
|
3376
3383
|
}
|
|
3377
3384
|
function L() {
|
|
3378
|
-
return t.type === "kpi" ? /* @__PURE__ */ e.jsx("div", { className: "flex h-full items-center justify-center", children: /* @__PURE__ */ e.jsx("div", { className: "w-1/2 rounded-md border", children: /* @__PURE__ */ e.jsx(Wt, { card: t, data: u == null ? void 0 : u.records }) }) }) : t.type === "text" ? /* @__PURE__ */ e.jsx("div", { className: "flex h-full items-center justify-center", children: /* @__PURE__ */ e.jsx("div", { className: "w-1/2 rounded-md border", children: /* @__PURE__ */ e.jsx(
|
|
3385
|
+
return t.type === "kpi" ? /* @__PURE__ */ e.jsx("div", { className: "flex h-full items-center justify-center", children: /* @__PURE__ */ e.jsx("div", { className: "w-1/2 rounded-md border", children: /* @__PURE__ */ e.jsx(Wt, { card: t, data: u == null ? void 0 : u.records }) }) }) : t.type === "text" ? /* @__PURE__ */ e.jsx("div", { className: "flex h-full items-center justify-center", children: /* @__PURE__ */ e.jsx("div", { className: "w-1/2 rounded-md border", children: /* @__PURE__ */ e.jsx(qe, { className: "mx-3 my-6 h-[300px] overflow-y-auto break-words px-3", children: /* @__PURE__ */ e.jsx(
|
|
3379
3386
|
Yt,
|
|
3380
3387
|
{
|
|
3381
3388
|
isLoading: n,
|
|
@@ -3397,7 +3404,7 @@ function ta() {
|
|
|
3397
3404
|
a ? S() : /* @__PURE__ */ e.jsxs("div", { className: "flex min-h-0 w-full flex-1 grow basis-0 px-6", children: [
|
|
3398
3405
|
d && /* @__PURE__ */ e.jsx(Il, {}),
|
|
3399
3406
|
(u == null ? void 0 : u.records) && (u == null ? void 0 : u.records.length) > 0 && /* @__PURE__ */ e.jsx(Cl, { data: (u == null ? void 0 : u.records) || [] }),
|
|
3400
|
-
l && /* @__PURE__ */ e.jsx("span", { className: "font-mono text-
|
|
3407
|
+
l && /* @__PURE__ */ e.jsx("span", { className: "font-mono text-xs", children: l })
|
|
3401
3408
|
] })
|
|
3402
3409
|
] });
|
|
3403
3410
|
}
|
|
@@ -3405,16 +3412,9 @@ function Il() {
|
|
|
3405
3412
|
const s = m((a) => a.pythonStdOut);
|
|
3406
3413
|
if (!s) return null;
|
|
3407
3414
|
const t = s.replace(/\n/g, "<br>");
|
|
3408
|
-
return /* @__PURE__ */ e.jsxs(
|
|
3409
|
-
/* @__PURE__ */ e.jsx("
|
|
3410
|
-
/* @__PURE__ */ e.jsx(
|
|
3411
|
-
"div",
|
|
3412
|
-
{
|
|
3413
|
-
dangerouslySetInnerHTML: { __html: t },
|
|
3414
|
-
className: "bg-muted p-2 font-mono text-sm"
|
|
3415
|
-
}
|
|
3416
|
-
),
|
|
3417
|
-
/* @__PURE__ */ e.jsx(ge, { className: "mb-2" })
|
|
3415
|
+
return /* @__PURE__ */ e.jsxs("div", { className: "relative flex w-full flex-col border-r", children: [
|
|
3416
|
+
/* @__PURE__ */ e.jsx("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", children: "Python Output" }),
|
|
3417
|
+
/* @__PURE__ */ e.jsx(qe, { className: "overflow-y-auto px-2 pt-1 font-mono text-xs text-foreground/90", children: /* @__PURE__ */ e.jsx("div", { dangerouslySetInnerHTML: { __html: t } }) })
|
|
3418
3418
|
] });
|
|
3419
3419
|
}
|
|
3420
3420
|
function Dl() {
|
|
@@ -3468,13 +3468,13 @@ function ue({
|
|
|
3468
3468
|
children: /* @__PURE__ */ e.jsx(xe, { placeholder: s })
|
|
3469
3469
|
}
|
|
3470
3470
|
),
|
|
3471
|
-
/* @__PURE__ */ e.jsx(pe, { children: /* @__PURE__ */ e.jsxs(
|
|
3471
|
+
/* @__PURE__ */ e.jsx(pe, { children: /* @__PURE__ */ e.jsxs(Ne, { children: [
|
|
3472
3472
|
/* @__PURE__ */ e.jsx(fe, { children: s }),
|
|
3473
3473
|
t.map((d) => /* @__PURE__ */ e.jsx(K, { value: d.value, children: d.label }, d.value))
|
|
3474
3474
|
] }) })
|
|
3475
3475
|
] });
|
|
3476
3476
|
}
|
|
3477
|
-
function
|
|
3477
|
+
function Qe({
|
|
3478
3478
|
children: s,
|
|
3479
3479
|
summary: t,
|
|
3480
3480
|
open: a,
|
|
@@ -3556,7 +3556,7 @@ function Ll() {
|
|
|
3556
3556
|
return s ? y === "input" ? /* @__PURE__ */ e.jsx(
|
|
3557
3557
|
le,
|
|
3558
3558
|
{
|
|
3559
|
-
className: `h-8 w-full ${
|
|
3559
|
+
className: `h-8 w-full ${Ue}`,
|
|
3560
3560
|
value: ((A = s == null ? void 0 : s.settings) == null ? void 0 : A[T]) || "",
|
|
3561
3561
|
onChange: (S) => {
|
|
3562
3562
|
r({
|
|
@@ -3608,7 +3608,7 @@ function Ll() {
|
|
|
3608
3608
|
{
|
|
3609
3609
|
className: "p-6",
|
|
3610
3610
|
children: [
|
|
3611
|
-
/* @__PURE__ */ e.jsx(
|
|
3611
|
+
/* @__PURE__ */ e.jsx(Qe, { summary: "Plugin Settings", children: /* @__PURE__ */ e.jsx("div", { className: "space-y-4 text-sm", children: /* @__PURE__ */ e.jsxs("div", { className: "space-y-4 text-sm", children: [
|
|
3612
3612
|
/* @__PURE__ */ e.jsx("div", { className: "space-y-2", children: /* @__PURE__ */ e.jsx("div", { className: "px-2", children: /* @__PURE__ */ e.jsx(
|
|
3613
3613
|
ue,
|
|
3614
3614
|
{
|
|
@@ -3660,8 +3660,8 @@ function Ll() {
|
|
|
3660
3660
|
) })
|
|
3661
3661
|
] }) })
|
|
3662
3662
|
] }) }) }),
|
|
3663
|
-
/* @__PURE__ */ e.jsx(
|
|
3664
|
-
((F = n == null ? void 0 : n.customCardPreferences) == null ? void 0 : F.componentName) && /* @__PURE__ */ e.jsxs(
|
|
3663
|
+
/* @__PURE__ */ e.jsx(Se, { className: "my-4" }),
|
|
3664
|
+
((F = n == null ? void 0 : n.customCardPreferences) == null ? void 0 : F.componentName) && /* @__PURE__ */ e.jsxs(Qe, { summary: "Component Settings", children: [
|
|
3665
3665
|
p && p.dataInputs && /* @__PURE__ */ e.jsxs("div", { className: "space-y-3", children: [
|
|
3666
3666
|
/* @__PURE__ */ e.jsx(R, { children: "Input Mapping" }),
|
|
3667
3667
|
/* @__PURE__ */ e.jsx("div", { className: "px-2", children: b(p) })
|
|
@@ -3847,11 +3847,11 @@ function Wa() {
|
|
|
3847
3847
|
return (D = E.card) == null ? void 0 : D.type;
|
|
3848
3848
|
}), k = ["pie", "doughnut", "polarArea"].includes(f);
|
|
3849
3849
|
Z(() => {
|
|
3850
|
-
var E, D, se, $, X, te, Le, ze,
|
|
3850
|
+
var E, D, se, $, X, te, Le, ze, je, be, J, oe, ce, Oe;
|
|
3851
3851
|
r(na(a)), c(
|
|
3852
3852
|
((se = (D = (E = a == null ? void 0 : a.chartOptions) == null ? void 0 : E.scales) == null ? void 0 : D[l]) == null ? void 0 : se.min) === 0 ? 0 : ""
|
|
3853
3853
|
), u(((te = (X = ($ = a == null ? void 0 : a.chartOptions) == null ? void 0 : $.scales) == null ? void 0 : X[l]) == null ? void 0 : te.max) || ""), j(
|
|
3854
|
-
((
|
|
3854
|
+
((be = (je = (ze = (Le = a == null ? void 0 : a.chartOptions) == null ? void 0 : Le.scales) == null ? void 0 : ze[l]) == null ? void 0 : je.ticks) == null ? void 0 : be.stepSize) || ""
|
|
3855
3855
|
), F(((J = a == null ? void 0 : a.numberAxisFormat) == null ? void 0 : J.decimalPlaces) || 0), T(((oe = a == null ? void 0 : a.numberAxisFormat) == null ? void 0 : oe.suffix) || ""), A(((ce = a == null ? void 0 : a.numberAxisFormat) == null ? void 0 : ce.currency) || ""), S(((Oe = a == null ? void 0 : a.numberAxisFormat) == null ? void 0 : Oe.locale) || "");
|
|
3856
3856
|
}, [s, a, l]);
|
|
3857
3857
|
function M(E, D) {
|
|
@@ -3885,7 +3885,7 @@ function Wa() {
|
|
|
3885
3885
|
onValueChange: (D) => A(D === "none" ? "" : D),
|
|
3886
3886
|
children: [
|
|
3887
3887
|
/* @__PURE__ */ e.jsx(he, { className: "col-span-2 h-8 w-full focus:ring-1 focus:ring-offset-0", children: /* @__PURE__ */ e.jsx(xe, {}) }),
|
|
3888
|
-
/* @__PURE__ */ e.jsx(pe, { children: /* @__PURE__ */ e.jsxs(
|
|
3888
|
+
/* @__PURE__ */ e.jsx(pe, { children: /* @__PURE__ */ e.jsxs(Ne, { children: [
|
|
3889
3889
|
/* @__PURE__ */ e.jsx(fe, { children: "Currency" }),
|
|
3890
3890
|
/* @__PURE__ */ e.jsx(K, { value: "none", children: "None" }),
|
|
3891
3891
|
E.map((D) => /* @__PURE__ */ e.jsx(K, { value: D, children: D }, D))
|
|
@@ -3901,7 +3901,7 @@ function Wa() {
|
|
|
3901
3901
|
children: /* @__PURE__ */ e.jsx(xe, {})
|
|
3902
3902
|
}
|
|
3903
3903
|
),
|
|
3904
|
-
/* @__PURE__ */ e.jsx(pe, { children: /* @__PURE__ */ e.jsxs(
|
|
3904
|
+
/* @__PURE__ */ e.jsx(pe, { children: /* @__PURE__ */ e.jsxs(Ne, { children: [
|
|
3905
3905
|
/* @__PURE__ */ e.jsx(fe, { children: "Locale" }),
|
|
3906
3906
|
os.map((D) => /* @__PURE__ */ e.jsx(K, { value: D.locale, children: D.locale }, D.locale))
|
|
3907
3907
|
] }) })
|
|
@@ -4013,7 +4013,7 @@ function Wa() {
|
|
|
4013
4013
|
onValueChange: (E) => r(E),
|
|
4014
4014
|
children: [
|
|
4015
4015
|
/* @__PURE__ */ e.jsx(he, { className: "col-span-2 h-8 w-full focus:ring-1 focus:ring-offset-0", children: /* @__PURE__ */ e.jsx(xe, {}) }),
|
|
4016
|
-
/* @__PURE__ */ e.jsx(pe, { id: "type", children: /* @__PURE__ */ e.jsxs(
|
|
4016
|
+
/* @__PURE__ */ e.jsx(pe, { id: "type", children: /* @__PURE__ */ e.jsxs(Ne, { children: [
|
|
4017
4017
|
/* @__PURE__ */ e.jsx(fe, { children: "Option" }),
|
|
4018
4018
|
/* @__PURE__ */ e.jsx(K, { value: "linear", children: "Linear" }),
|
|
4019
4019
|
/* @__PURE__ */ e.jsx(K, { value: "logarithmic", children: "Logarithmic" })
|
|
@@ -4179,7 +4179,7 @@ function Ya() {
|
|
|
4179
4179
|
var u, b, g;
|
|
4180
4180
|
return (g = (b = (u = p == null ? void 0 : p.card) == null ? void 0 : u.preferences) == null ? void 0 : b.chartOptions) == null ? void 0 : g.indexAxis;
|
|
4181
4181
|
}
|
|
4182
|
-
), { data: a } =
|
|
4182
|
+
), { data: a } = Re(s), n = t === "y" ? "Y axis" : "X axis", l = t === "y" ? "X axis" : "Y axis", {
|
|
4183
4183
|
keys: d,
|
|
4184
4184
|
metricKeys: r,
|
|
4185
4185
|
dimensionKeys: o
|
|
@@ -4274,7 +4274,7 @@ function El({ col: s, idx: t }) {
|
|
|
4274
4274
|
function Xa() {
|
|
4275
4275
|
const s = m((g) => g.selectedConnectionId), t = m((g) => g.selectedDatamodelId), a = m((g) => g.selectedDatabaseName), n = m((g) => g.selectedSchemaName), l = m((g) => g.selectedTableName), d = z((g) => g.dashboard.filters) || [], r = z((g) => g.actions.addFilter), o = z((g) => g.actions.removeFilter), c = z(
|
|
4276
4276
|
(g) => g.actions.removeFilterValue
|
|
4277
|
-
), { modelItems: p, tableName: u } =
|
|
4277
|
+
), { modelItems: p, tableName: u } = _e();
|
|
4278
4278
|
function b(g, h = "dashboard") {
|
|
4279
4279
|
var S;
|
|
4280
4280
|
const j = de(g.column_name), C = de(a || ""), F = de(n || ""), y = de(u);
|
|
@@ -4292,7 +4292,7 @@ function Xa() {
|
|
|
4292
4292
|
if (N)
|
|
4293
4293
|
c(N.id), o(N.id);
|
|
4294
4294
|
else {
|
|
4295
|
-
const L =
|
|
4295
|
+
const L = Ke();
|
|
4296
4296
|
return u === "api" && s ? (r({
|
|
4297
4297
|
location: h,
|
|
4298
4298
|
id: L,
|
|
@@ -4334,10 +4334,10 @@ function Xa() {
|
|
|
4334
4334
|
}
|
|
4335
4335
|
return { assignFilter: b };
|
|
4336
4336
|
}
|
|
4337
|
-
function
|
|
4337
|
+
function He() {
|
|
4338
4338
|
const s = z(
|
|
4339
4339
|
(o) => o.dashboard.filters
|
|
4340
|
-
), t = m((o) => o.frame), { setFrame: a } = re(), { columns: n } =
|
|
4340
|
+
), t = m((o) => o.frame), { setFrame: a } = re(), { columns: n } = _e(), { assignFilter: l } = Xa();
|
|
4341
4341
|
function d(o) {
|
|
4342
4342
|
const c = l(o, "frame");
|
|
4343
4343
|
a({ ...t, filterId: c });
|
|
@@ -4441,7 +4441,7 @@ function Vl({
|
|
|
4441
4441
|
/* @__PURE__ */ e.jsx(U, { children: "Filters" }),
|
|
4442
4442
|
/* @__PURE__ */ e.jsxs(G, { className: "space-y-4 px-2", children: [
|
|
4443
4443
|
/* @__PURE__ */ e.jsx(Te, {}),
|
|
4444
|
-
/* @__PURE__ */ e.jsx(
|
|
4444
|
+
/* @__PURE__ */ e.jsx(He, {})
|
|
4445
4445
|
] })
|
|
4446
4446
|
] })
|
|
4447
4447
|
] }) });
|
|
@@ -4485,7 +4485,7 @@ function Gs() {
|
|
|
4485
4485
|
defaultValue: "none",
|
|
4486
4486
|
children: [
|
|
4487
4487
|
/* @__PURE__ */ e.jsx(he, { className: "h-8 w-full focus:ring-1 focus:ring-offset-0", children: /* @__PURE__ */ e.jsx(xe, { placeholder: "Select position" }) }),
|
|
4488
|
-
/* @__PURE__ */ e.jsx(pe, { children: /* @__PURE__ */ e.jsxs(
|
|
4488
|
+
/* @__PURE__ */ e.jsx(pe, { children: /* @__PURE__ */ e.jsxs(Ne, { children: [
|
|
4489
4489
|
/* @__PURE__ */ e.jsx(fe, { children: "Data Labels" }),
|
|
4490
4490
|
/* @__PURE__ */ e.jsx(K, { value: "none", children: "None" }),
|
|
4491
4491
|
a !== "pyramid" && /* @__PURE__ */ e.jsx(K, { value: "start", children: "Start" }),
|
|
@@ -4539,7 +4539,7 @@ function ql({
|
|
|
4539
4539
|
/* @__PURE__ */ e.jsx(U, { children: "Filters" }),
|
|
4540
4540
|
/* @__PURE__ */ e.jsxs(G, { className: "space-y-4 px-2", children: [
|
|
4541
4541
|
/* @__PURE__ */ e.jsx(Te, {}),
|
|
4542
|
-
/* @__PURE__ */ e.jsx(
|
|
4542
|
+
/* @__PURE__ */ e.jsx(He, {})
|
|
4543
4543
|
] })
|
|
4544
4544
|
] })
|
|
4545
4545
|
] }) });
|
|
@@ -4583,7 +4583,7 @@ function Hl() {
|
|
|
4583
4583
|
!["kpi"].includes(s) && /* @__PURE__ */ e.jsxs("div", { className: "space-y-4", children: [
|
|
4584
4584
|
/* @__PURE__ */ e.jsx(Gs, {}),
|
|
4585
4585
|
/* @__PURE__ */ e.jsx(Te, {}),
|
|
4586
|
-
/* @__PURE__ */ e.jsx(
|
|
4586
|
+
/* @__PURE__ */ e.jsx(He, {})
|
|
4587
4587
|
] })
|
|
4588
4588
|
] });
|
|
4589
4589
|
}
|
|
@@ -4758,7 +4758,7 @@ function Pl() {
|
|
|
4758
4758
|
},
|
|
4759
4759
|
children: [
|
|
4760
4760
|
/* @__PURE__ */ e.jsx(he, { className: "col-span-6 h-8 w-full focus:ring-1 focus:ring-offset-0", children: /* @__PURE__ */ e.jsx(xe, {}) }),
|
|
4761
|
-
/* @__PURE__ */ e.jsx(pe, { children: /* @__PURE__ */ e.jsxs(
|
|
4761
|
+
/* @__PURE__ */ e.jsx(pe, { children: /* @__PURE__ */ e.jsxs(Ne, { children: [
|
|
4762
4762
|
/* @__PURE__ */ e.jsx(fe, { children: "Format" }),
|
|
4763
4763
|
/* @__PURE__ */ e.jsx(K, { value: "none", children: "None" }, "none"),
|
|
4764
4764
|
os.map((h) => /* @__PURE__ */ e.jsx(K, { value: h.locale, children: h.locale }, h.locale))
|
|
@@ -4784,7 +4784,7 @@ function Pl() {
|
|
|
4784
4784
|
},
|
|
4785
4785
|
children: [
|
|
4786
4786
|
/* @__PURE__ */ e.jsx(he, { className: "col-span-6 h-8 w-full focus:ring-1 focus:ring-offset-0", children: /* @__PURE__ */ e.jsx(xe, {}) }),
|
|
4787
|
-
/* @__PURE__ */ e.jsx(pe, { children: /* @__PURE__ */ e.jsxs(
|
|
4787
|
+
/* @__PURE__ */ e.jsx(pe, { children: /* @__PURE__ */ e.jsxs(Ne, { children: [
|
|
4788
4788
|
/* @__PURE__ */ e.jsx(fe, { children: "Currency" }),
|
|
4789
4789
|
/* @__PURE__ */ e.jsx(K, { value: "none", children: "None" }, "none"),
|
|
4790
4790
|
o.map((h) => /* @__PURE__ */ e.jsx(K, { value: h, children: h }, h))
|
|
@@ -4839,7 +4839,7 @@ function Pl() {
|
|
|
4839
4839
|
] })
|
|
4840
4840
|
] })
|
|
4841
4841
|
] }) }),
|
|
4842
|
-
/* @__PURE__ */ e.jsx(
|
|
4842
|
+
/* @__PURE__ */ e.jsx(Se, { className: "my-3" }),
|
|
4843
4843
|
/* @__PURE__ */ e.jsx(
|
|
4844
4844
|
xn,
|
|
4845
4845
|
{
|
|
@@ -5003,9 +5003,9 @@ function Jl() {
|
|
|
5003
5003
|
}
|
|
5004
5004
|
];
|
|
5005
5005
|
return /* @__PURE__ */ e.jsxs("div", { className: "p-6", children: [
|
|
5006
|
-
/* @__PURE__ */ e.jsx(
|
|
5007
|
-
/* @__PURE__ */ e.jsx(
|
|
5008
|
-
/* @__PURE__ */ e.jsx(
|
|
5006
|
+
/* @__PURE__ */ e.jsx(Qe, { summary: "Map Query", children: /* @__PURE__ */ e.jsx("p", { className: "rounded-md bg-muted p-2 font-mono text-xs", children: "SELECT country, value FROM table" }) }),
|
|
5007
|
+
/* @__PURE__ */ e.jsx(Se, { className: "my-4" }),
|
|
5008
|
+
/* @__PURE__ */ e.jsx(Qe, { open: !0, summary: "Settings", children: /* @__PURE__ */ e.jsxs("div", { className: "space-y-3 px-2", children: [
|
|
5009
5009
|
/* @__PURE__ */ e.jsx(
|
|
5010
5010
|
ue,
|
|
5011
5011
|
{
|
|
@@ -5041,7 +5041,7 @@ function Jl() {
|
|
|
5041
5041
|
});
|
|
5042
5042
|
},
|
|
5043
5043
|
value: a,
|
|
5044
|
-
className: `h-9 w-full ${
|
|
5044
|
+
className: `h-9 w-full ${Ue}`,
|
|
5045
5045
|
placeholder: "Custom URL"
|
|
5046
5046
|
}
|
|
5047
5047
|
),
|
|
@@ -5114,12 +5114,12 @@ function Jl() {
|
|
|
5114
5114
|
] })
|
|
5115
5115
|
] })
|
|
5116
5116
|
] }) }),
|
|
5117
|
-
/* @__PURE__ */ e.jsx(
|
|
5118
|
-
/* @__PURE__ */ e.jsx(
|
|
5117
|
+
/* @__PURE__ */ e.jsx(Se, { className: "my-4" }),
|
|
5118
|
+
/* @__PURE__ */ e.jsx(Qe, { className: "", summary: "Scale Options", children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-3", children: [
|
|
5119
5119
|
/* @__PURE__ */ e.jsx(
|
|
5120
5120
|
le,
|
|
5121
5121
|
{
|
|
5122
|
-
className: `h-9 w-full ${
|
|
5122
|
+
className: `h-9 w-full ${Ue}`,
|
|
5123
5123
|
type: "number",
|
|
5124
5124
|
step: 0.1,
|
|
5125
5125
|
value: ((I = (T = s.preferences) == null ? void 0 : T.mapVisualOptions) == null ? void 0 : I.projectionScale) || 1,
|
|
@@ -5139,7 +5139,7 @@ function Jl() {
|
|
|
5139
5139
|
/* @__PURE__ */ e.jsx(
|
|
5140
5140
|
le,
|
|
5141
5141
|
{
|
|
5142
|
-
className: `h-9 w-full ${
|
|
5142
|
+
className: `h-9 w-full ${Ue}`,
|
|
5143
5143
|
type: "number",
|
|
5144
5144
|
step: 10,
|
|
5145
5145
|
value: ((S = (N = (A = s.preferences) == null ? void 0 : A.mapVisualOptions) == null ? void 0 : N.projectionOffset) == null ? void 0 : S[0]) || 0,
|
|
@@ -5162,7 +5162,7 @@ function Jl() {
|
|
|
5162
5162
|
/* @__PURE__ */ e.jsx(
|
|
5163
5163
|
le,
|
|
5164
5164
|
{
|
|
5165
|
-
className: `h-9 w-full ${
|
|
5165
|
+
className: `h-9 w-full ${Ue}`,
|
|
5166
5166
|
type: "number",
|
|
5167
5167
|
step: 10,
|
|
5168
5168
|
value: ((v = (x = (L = s.preferences) == null ? void 0 : L.mapVisualOptions) == null ? void 0 : x.projectionOffset) == null ? void 0 : v[1]) || 0,
|
|
@@ -5182,7 +5182,7 @@ function Jl() {
|
|
|
5182
5182
|
}
|
|
5183
5183
|
)
|
|
5184
5184
|
] }) }),
|
|
5185
|
-
/* @__PURE__ */ e.jsx(
|
|
5185
|
+
/* @__PURE__ */ e.jsx(Se, { className: "my-4" }),
|
|
5186
5186
|
/* @__PURE__ */ e.jsx(Te, {})
|
|
5187
5187
|
] });
|
|
5188
5188
|
}
|
|
@@ -5261,7 +5261,7 @@ function ns({
|
|
|
5261
5261
|
/* @__PURE__ */ e.jsx(U, { children: "Filters" }),
|
|
5262
5262
|
/* @__PURE__ */ e.jsxs(G, { className: "space-y-4 px-2", children: [
|
|
5263
5263
|
/* @__PURE__ */ e.jsx(Te, {}),
|
|
5264
|
-
/* @__PURE__ */ e.jsx(
|
|
5264
|
+
/* @__PURE__ */ e.jsx(He, {})
|
|
5265
5265
|
] })
|
|
5266
5266
|
] })
|
|
5267
5267
|
] }) });
|
|
@@ -5341,7 +5341,7 @@ function Wl() {
|
|
|
5341
5341
|
/* @__PURE__ */ e.jsx(U, { children: "Filters" }),
|
|
5342
5342
|
/* @__PURE__ */ e.jsxs(G, { className: "space-y-4 px-2", children: [
|
|
5343
5343
|
/* @__PURE__ */ e.jsx(Te, {}),
|
|
5344
|
-
/* @__PURE__ */ e.jsx(
|
|
5344
|
+
/* @__PURE__ */ e.jsx(He, {})
|
|
5345
5345
|
] })
|
|
5346
5346
|
] })
|
|
5347
5347
|
] }) });
|
|
@@ -5363,7 +5363,7 @@ function Yl({}) {
|
|
|
5363
5363
|
/* @__PURE__ */ e.jsx(U, { children: "Filters" }),
|
|
5364
5364
|
/* @__PURE__ */ e.jsxs(G, { className: "space-y-4 px-2", children: [
|
|
5365
5365
|
/* @__PURE__ */ e.jsx(Te, {}),
|
|
5366
|
-
/* @__PURE__ */ e.jsx(
|
|
5366
|
+
/* @__PURE__ */ e.jsx(He, {})
|
|
5367
5367
|
] })
|
|
5368
5368
|
] }) }),
|
|
5369
5369
|
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center space-x-2", children: [
|
|
@@ -5471,7 +5471,7 @@ function sr() {
|
|
|
5471
5471
|
return /* @__PURE__ */ e.jsx(Hl, {});
|
|
5472
5472
|
}
|
|
5473
5473
|
}
|
|
5474
|
-
return /* @__PURE__ */ e.jsx(
|
|
5474
|
+
return /* @__PURE__ */ e.jsx(qe, { className: "h-full w-full text-sm", children: t(s) });
|
|
5475
5475
|
}
|
|
5476
5476
|
function ar() {
|
|
5477
5477
|
const s = m((t) => t.isShowingVisual);
|
|
@@ -5570,7 +5570,7 @@ function lr() {
|
|
|
5570
5570
|
z((r) => r.actions.addFilter), z((r) => r.actions.removeFilter), z(
|
|
5571
5571
|
(r) => r.actions.removeFilterValue
|
|
5572
5572
|
);
|
|
5573
|
-
const { modelItems: n, columns: l } =
|
|
5573
|
+
const { modelItems: n, columns: l } = _e(), { assignFilter: d } = Xa();
|
|
5574
5574
|
return /* @__PURE__ */ e.jsx("div", { className: "xbg-red-100 flex-1 basis-0 flex-col overflow-scroll px-3", children: l == null ? void 0 : l.map((r) => {
|
|
5575
5575
|
const o = a == null ? void 0 : a.find(
|
|
5576
5576
|
(c) => c.column === de(r.column_name) && c.table === t && c.database === s
|
|
@@ -5608,7 +5608,7 @@ function rr() {
|
|
|
5608
5608
|
onClick: () => s(!1),
|
|
5609
5609
|
className: "h-7 w-7 p-0",
|
|
5610
5610
|
variant: "ghost",
|
|
5611
|
-
children: /* @__PURE__ */ e.jsx(
|
|
5611
|
+
children: /* @__PURE__ */ e.jsx(Je, {})
|
|
5612
5612
|
}
|
|
5613
5613
|
)
|
|
5614
5614
|
] }),
|
|
@@ -5705,7 +5705,7 @@ function mr({
|
|
|
5705
5705
|
] }) });
|
|
5706
5706
|
}
|
|
5707
5707
|
export {
|
|
5708
|
-
|
|
5708
|
+
Be as A,
|
|
5709
5709
|
wn as B,
|
|
5710
5710
|
kn as C,
|
|
5711
5711
|
mr as D,
|
|
@@ -5747,5 +5747,5 @@ export {
|
|
|
5747
5747
|
Jn as w,
|
|
5748
5748
|
Wn as x,
|
|
5749
5749
|
Us as y,
|
|
5750
|
-
|
|
5750
|
+
_e as z
|
|
5751
5751
|
};
|