react-semaphor 0.0.389 → 0.0.390
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/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c as R, p as Ot, u as T, a as Je, b as Te, d as Mt, e as It, B as L, P as We, f as Tt, g as Dt, h as zt, i as aa, L as $, I as
|
|
2
|
-
import { D as Qi, c5 as Zi, c3 as Xi, c3 as Yi, c7 as er, c6 as tr, c8 as ar, c4 as nr, c1 as sr, c2 as lr } from "./chunks/index-
|
|
1
|
+
import { c as R, p as Ot, u as T, a as Je, b as Te, d as Mt, e as It, B as L, P as We, f as Tt, g as Dt, h as zt, i as aa, L as $, I as he, j as na, k as sa, l as la, m as ia, n as ra, o as oa, q as un, r as Gt, s as se, C as ut, t as hn, v as h, w as mn, x as pn, y as ca, F as da, z as Be, A as nt, T as ua, E as fn, G as ha, S as me, H as pe, J as fe, K as ge, M as ke, N as Ce, O as Q, Q as ma, R as pa, U as fa, V as ga, W as ya, X as ve, Y as gn, Z as yn, _ as ba, $ as bn, a0 as xn, a1 as vn, a2 as xa, a3 as Ie, a4 as Nn, a5 as qe, a6 as st, a7 as vt, a8 as De, a9 as Ve, aa as Oe, ab as Cn, ac as ie, ad as Sn, ae as wn, af as Bt, ag as kn, ah as Ke, ai as On, aj as Mn, ak as In, al as Tn, am as Dn, an as bt, ao as zn, ap as Ln, aq as Le, ar as va, as as Fn, at as ht, au as An, av as En, aw as Vn, ax as Nt, ay as qn, az as jn, aA as lt, aB as we, aC as it, aD as Rn, aE as _n, aF as Hn, aG as Pn, aH as xt, aI as $n, aJ as Ut, aK as Gn, aL as Jt, aM as Bn, aN as Un, aO as Jn, aP as Wn, aQ as Na, aR as Kn, aS as Lt, aT as Ca, aU as Qn, aV as Zn, aW as at, aX as Xn, aY as Yn, aZ as Sa, a_ as es, a$ as ts, b0 as as, b1 as ns, b2 as rt, b3 as ss, b4 as mt, b5 as wa, b6 as ls, b7 as ka, b8 as Oa, b9 as Ct, ba as St, bb as is, bc as rs, bd as os, be as Qe, bf as Ze, bg as Xe, bh as Ma, bi as cs, bj as ds, bk as us, bl as hs, bm as ms, bn as ps, bo as fs, bp as pt, bq as ze, br as gs, bs as Pe, bt as Ft, bu as Ia, bv as ys, bw as bs, bx as ot, by as xs, bz as vs, bA as Ns, bB as Cs, bC as Wt, bD as Kt, bE as Ta, bF as Ss, bG as ws, bH as ks, bI as Os, bJ as Ms, bK as Is, bL as Ts, bM as Ds, bN as Fe, bO as ee, bP as te, bQ as At, bR as ae, bS as zs, bT as Da, bU as Ls, bV as Fs, bW as As, bX as Es, bY as Vs, bZ as qs, b_ as js, b$ as Rs, c0 as _s } from "./chunks/index-DN-9yvy5.js";
|
|
2
|
+
import { D as Qi, c5 as Zi, c3 as Xi, c3 as Yi, c7 as er, c6 as tr, c8 as ar, c4 as nr, c1 as sr, c2 as lr } from "./chunks/index-DN-9yvy5.js";
|
|
3
3
|
import { jsxs as n, jsx as e, Fragment as le } from "react/jsx-runtime";
|
|
4
4
|
import * as Qt from "react";
|
|
5
5
|
import Me, { useState as H, useMemo as wt, useEffect as de, useRef as $e, useCallback as za, Suspense as Hs } from "react";
|
|
@@ -475,7 +475,7 @@ const dl = R("MessageSquareMore", [
|
|
|
475
475
|
* This source code is licensed under the ISC license.
|
|
476
476
|
* See the LICENSE file in the root directory of this source tree.
|
|
477
477
|
*/
|
|
478
|
-
const
|
|
478
|
+
const ul = R("Network", [
|
|
479
479
|
["rect", { x: "16", y: "16", width: "6", height: "6", rx: "1", key: "4q2zg0" }],
|
|
480
480
|
["rect", { x: "2", y: "16", width: "6", height: "6", rx: "1", key: "8cvhb9" }],
|
|
481
481
|
["rect", { x: "9", y: "2", width: "6", height: "6", rx: "1", key: "1egb70" }],
|
|
@@ -488,7 +488,7 @@ const hl = R("Network", [
|
|
|
488
488
|
* This source code is licensed under the ISC license.
|
|
489
489
|
* See the LICENSE file in the root directory of this source tree.
|
|
490
490
|
*/
|
|
491
|
-
const
|
|
491
|
+
const hl = R("Plug2", [
|
|
492
492
|
["path", { d: "M9 2v6", key: "17ngun" }],
|
|
493
493
|
["path", { d: "M15 2v6", key: "s7yy2p" }],
|
|
494
494
|
["path", { d: "M12 17v5", key: "bb1du9" }],
|
|
@@ -772,9 +772,9 @@ async function Ol(t, s) {
|
|
|
772
772
|
}) : null;
|
|
773
773
|
}
|
|
774
774
|
function Ml() {
|
|
775
|
-
const [t, s] = H(""), [a, l] = H(!1), i = T((g) => g.lenses), { setLenses: c, setSelectedLensId: o } = Je(), [d,
|
|
775
|
+
const [t, s] = H(""), [a, l] = H(!1), i = T((g) => g.lenses), { setLenses: c, setSelectedLensId: o } = Je(), [d, u] = H(!1), [f, m] = H(!1), b = T((g) => g.dashboard), x = T((g) => g.filterValues), { authToken: r } = Te();
|
|
776
776
|
async function y() {
|
|
777
|
-
|
|
777
|
+
u(!0);
|
|
778
778
|
const g = $a(
|
|
779
779
|
b
|
|
780
780
|
), C = await kl(
|
|
@@ -783,7 +783,7 @@ function Ml() {
|
|
|
783
783
|
x,
|
|
784
784
|
r == null ? void 0 : r.accessToken
|
|
785
785
|
);
|
|
786
|
-
C && (c([...i || [], C]), o(C.id), m(!1)),
|
|
786
|
+
C && (c([...i || [], C]), o(C.id), m(!1)), u(!1);
|
|
787
787
|
}
|
|
788
788
|
return /* @__PURE__ */ n(Mt, { open: f, onOpenChange: m, children: [
|
|
789
789
|
/* @__PURE__ */ e(It, { asChild: !0, children: /* @__PURE__ */ n(
|
|
@@ -806,7 +806,7 @@ function Ml() {
|
|
|
806
806
|
/* @__PURE__ */ e("div", { className: "grid gap-4 py-4", children: /* @__PURE__ */ n("div", { className: "grid grid-cols-8 items-center gap-4", children: [
|
|
807
807
|
/* @__PURE__ */ e($, { className: "text-right", children: "Name" }),
|
|
808
808
|
/* @__PURE__ */ e(
|
|
809
|
-
|
|
809
|
+
he,
|
|
810
810
|
{
|
|
811
811
|
value: t,
|
|
812
812
|
onChange: (g) => {
|
|
@@ -837,7 +837,7 @@ function Il() {
|
|
|
837
837
|
async function d(m) {
|
|
838
838
|
c(m);
|
|
839
839
|
}
|
|
840
|
-
async function
|
|
840
|
+
async function u(m) {
|
|
841
841
|
if (await Ol(m, o == null ? void 0 : o.accessToken)) {
|
|
842
842
|
const x = a == null ? void 0 : a.filter((r) => r.id !== m);
|
|
843
843
|
i(x || []), c("original");
|
|
@@ -872,7 +872,7 @@ function Il() {
|
|
|
872
872
|
/* @__PURE__ */ e(ra, { className: "px-3", children: "Lenses" }),
|
|
873
873
|
/* @__PURE__ */ e(oa, {}),
|
|
874
874
|
/* @__PURE__ */ n(
|
|
875
|
-
|
|
875
|
+
un,
|
|
876
876
|
{
|
|
877
877
|
value: l,
|
|
878
878
|
onValueChange: d,
|
|
@@ -903,10 +903,10 @@ function Il() {
|
|
|
903
903
|
}
|
|
904
904
|
),
|
|
905
905
|
/* @__PURE__ */ e(
|
|
906
|
-
|
|
906
|
+
ut,
|
|
907
907
|
{
|
|
908
908
|
onClick: (b) => {
|
|
909
|
-
b.preventDefault(),
|
|
909
|
+
b.preventDefault(), u(m.id);
|
|
910
910
|
},
|
|
911
911
|
className: "invisible size-3.5 text-muted-foreground hover:cursor-pointer hover:text-foreground group-hover:visible",
|
|
912
912
|
strokeWidth: 1.5
|
|
@@ -962,7 +962,7 @@ function Dl({
|
|
|
962
962
|
size: "sm",
|
|
963
963
|
onClick: l,
|
|
964
964
|
children: a ? /* @__PURE__ */ e(Ue, { className: se("size-3.5 animate-spin", t) }) : /* @__PURE__ */ e(
|
|
965
|
-
|
|
965
|
+
hn,
|
|
966
966
|
{
|
|
967
967
|
className: se("size-3.5", t),
|
|
968
968
|
strokeWidth: 1.5
|
|
@@ -978,9 +978,9 @@ function zl() {
|
|
|
978
978
|
T((p) => p.selectedSheetId);
|
|
979
979
|
const c = T(
|
|
980
980
|
(p) => p.isDashboardEditing
|
|
981
|
-
), o =
|
|
981
|
+
), o = h(
|
|
982
982
|
(p) => p.selectedConnectionId
|
|
983
|
-
), [d,
|
|
983
|
+
), [d, u] = H(!1), f = T((p) => p.filterValues), m = T((p) => p.isVisualEditing), b = T((p) => p.showFilters);
|
|
984
984
|
T(
|
|
985
985
|
(p) => p.showDashboardJSON
|
|
986
986
|
);
|
|
@@ -1019,7 +1019,7 @@ function zl() {
|
|
|
1019
1019
|
v(!0);
|
|
1020
1020
|
};
|
|
1021
1021
|
async function B() {
|
|
1022
|
-
if (
|
|
1022
|
+
if (u(!0), !a || !l) return;
|
|
1023
1023
|
const p = $a(
|
|
1024
1024
|
i
|
|
1025
1025
|
), E = JSON.stringify(p), W = {
|
|
@@ -1027,7 +1027,7 @@ function zl() {
|
|
|
1027
1027
|
template: E,
|
|
1028
1028
|
filterValues: f
|
|
1029
1029
|
};
|
|
1030
|
-
await kt(W, t == null ? void 0 : t.accessToken), nt.success("Lens saved"), x == null || x(p),
|
|
1030
|
+
await kt(W, t == null ? void 0 : t.accessToken), nt.success("Lens saved"), x == null || x(p), u(!1);
|
|
1031
1031
|
}
|
|
1032
1032
|
return m ? null : /* @__PURE__ */ n(
|
|
1033
1033
|
"div",
|
|
@@ -1075,7 +1075,7 @@ function zl() {
|
|
|
1075
1075
|
v(!1), D(!1);
|
|
1076
1076
|
},
|
|
1077
1077
|
size: "sm",
|
|
1078
|
-
children: /* @__PURE__ */ e(
|
|
1078
|
+
children: /* @__PURE__ */ e(ut, { className: "h-4 w-4", strokeWidth: 1.5 })
|
|
1079
1079
|
}
|
|
1080
1080
|
),
|
|
1081
1081
|
c && !m && F && /* @__PURE__ */ e(
|
|
@@ -1115,7 +1115,7 @@ function He({
|
|
|
1115
1115
|
refetch: c,
|
|
1116
1116
|
connectionTooltip: o,
|
|
1117
1117
|
onChange: d,
|
|
1118
|
-
showNone:
|
|
1118
|
+
showNone: u = !1,
|
|
1119
1119
|
className: f,
|
|
1120
1120
|
showIcon: m = !0,
|
|
1121
1121
|
disabled: b = !1
|
|
@@ -1123,20 +1123,20 @@ function He({
|
|
|
1123
1123
|
const x = l ? "Loading..." : i ? "Error" : a;
|
|
1124
1124
|
function r() {
|
|
1125
1125
|
if (t === "Connection")
|
|
1126
|
-
return /* @__PURE__ */ e(
|
|
1126
|
+
return /* @__PURE__ */ e(hl, { className: "size-4 rotate-90" });
|
|
1127
1127
|
if (t === "Database")
|
|
1128
1128
|
return /* @__PURE__ */ e(Qs, { className: "size-4" });
|
|
1129
1129
|
if (t === "Schema")
|
|
1130
|
-
return /* @__PURE__ */ e(
|
|
1130
|
+
return /* @__PURE__ */ e(ul, { className: "size-4" });
|
|
1131
1131
|
if (t === "Table")
|
|
1132
1132
|
return /* @__PURE__ */ e(xl, { className: "size-4" });
|
|
1133
1133
|
if (t === "Model")
|
|
1134
1134
|
return /* @__PURE__ */ e(Gs, { className: "size-4" });
|
|
1135
1135
|
}
|
|
1136
1136
|
return /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
|
|
1137
|
-
m && /* @__PURE__ */ e("div", { className: "shrink-0", children: o ? /* @__PURE__ */ n(
|
|
1137
|
+
m && /* @__PURE__ */ e("div", { className: "shrink-0", children: o ? /* @__PURE__ */ n(ua, { children: [
|
|
1138
1138
|
/* @__PURE__ */ e(fn, { children: r() }),
|
|
1139
|
-
/* @__PURE__ */ e(
|
|
1139
|
+
/* @__PURE__ */ e(ha, { className: "text-xs", align: "start", children: o })
|
|
1140
1140
|
] }) : r() }),
|
|
1141
1141
|
/* @__PURE__ */ n(me, { disabled: b, value: x, onValueChange: d, children: [
|
|
1142
1142
|
/* @__PURE__ */ e(
|
|
@@ -1166,7 +1166,7 @@ function He({
|
|
|
1166
1166
|
)
|
|
1167
1167
|
] }),
|
|
1168
1168
|
/* @__PURE__ */ n(le, { children: [
|
|
1169
|
-
|
|
1169
|
+
u && /* @__PURE__ */ e(Q, { value: "none", children: "None" }, "none"),
|
|
1170
1170
|
s && s.map((y, g) => /* @__PURE__ */ e(Q, { value: y.id, children: y.name }, g))
|
|
1171
1171
|
] }),
|
|
1172
1172
|
(l || i) && /* @__PURE__ */ e(Q, { value: x, children: x })
|
|
@@ -1175,11 +1175,11 @@ function He({
|
|
|
1175
1175
|
] });
|
|
1176
1176
|
}
|
|
1177
1177
|
function Ll({ column: t }) {
|
|
1178
|
-
const [s, a] = H(!1), l =
|
|
1178
|
+
const [s, a] = H(!1), l = h((y) => y.selectedTableName), i = h(
|
|
1179
1179
|
(y) => y.selectedSchemaName
|
|
1180
|
-
), c =
|
|
1180
|
+
), c = h(
|
|
1181
1181
|
(y) => y.selectedDatamodelId
|
|
1182
|
-
), o =
|
|
1182
|
+
), o = h((y) => y.sqlGen), { modelItems: d, connectionType: u } = Ae(), f = h((y) => y.actions.setSqlGen), m = h((y) => y.actions.setCardSql), b = h((y) => y.actions.setRunSql);
|
|
1183
1183
|
function x(y, g) {
|
|
1184
1184
|
var S;
|
|
1185
1185
|
const C = ga(y, o, g), v = (S = d == null ? void 0 : d.find(
|
|
@@ -1191,7 +1191,7 @@ function Ll({ column: t }) {
|
|
|
1191
1191
|
ve(i || ""),
|
|
1192
1192
|
ve(l),
|
|
1193
1193
|
v,
|
|
1194
|
-
|
|
1194
|
+
u
|
|
1195
1195
|
);
|
|
1196
1196
|
D && (m(D), b(!0)), a(!1);
|
|
1197
1197
|
}
|
|
@@ -1252,9 +1252,9 @@ function Ll({ column: t }) {
|
|
|
1252
1252
|
] });
|
|
1253
1253
|
}
|
|
1254
1254
|
function Ga({ column: t }) {
|
|
1255
|
-
return /* @__PURE__ */ n(
|
|
1255
|
+
return /* @__PURE__ */ n(ua, { children: [
|
|
1256
1256
|
/* @__PURE__ */ e(gn, { asChild: !0, children: yn(t.data_type) ? /* @__PURE__ */ e(Pa, { className: "size-3" }) : ba(t.data_type) ? /* @__PURE__ */ e(nl, { className: "size-3" }) : bn(t.data_type) ? /* @__PURE__ */ e(xn, { className: "size-3" }) : vn(t.data_type) ? /* @__PURE__ */ e(Cl, { className: "size-3" }) : t.data_type.toLowerCase() === "json" ? /* @__PURE__ */ e(Bs, { className: "size-3" }) : /* @__PURE__ */ e(gl, { className: "size-3" }) }),
|
|
1257
|
-
/* @__PURE__ */ e(
|
|
1257
|
+
/* @__PURE__ */ e(ha, { children: /* @__PURE__ */ e("p", { className: "font-mono text-xs", children: t.data_type }) })
|
|
1258
1258
|
] });
|
|
1259
1259
|
}
|
|
1260
1260
|
function Fl({
|
|
@@ -1263,19 +1263,19 @@ function Fl({
|
|
|
1263
1263
|
columns: a,
|
|
1264
1264
|
status: l
|
|
1265
1265
|
}) {
|
|
1266
|
-
const i =
|
|
1266
|
+
const i = h((p) => p.sqlGen), c = h(
|
|
1267
1267
|
(p) => p.selectedConnectionId
|
|
1268
|
-
), o =
|
|
1268
|
+
), o = h(
|
|
1269
1269
|
(p) => p.selectedDatabaseName
|
|
1270
|
-
), d =
|
|
1270
|
+
), d = h(
|
|
1271
1271
|
(p) => p.selectedSchemaName
|
|
1272
|
-
),
|
|
1272
|
+
), u = h((p) => p.selectedTableName), f = h(
|
|
1273
1273
|
(p) => p.selectedDatamodelId
|
|
1274
1274
|
), m = T(
|
|
1275
1275
|
(p) => p.dashboard.aiScopeTables
|
|
1276
|
-
), { addToAIScope: b, removeFromAIScope: x } = Je(), { setAIScopeTables: r } = T((p) => p.actions), y =
|
|
1276
|
+
), { addToAIScope: b, removeFromAIScope: x } = Je(), { setAIScopeTables: r } = T((p) => p.actions), y = h((p) => p.actions.setRunSql), g = h((p) => p.actions.setSqlGen), C = h(
|
|
1277
1277
|
(p) => p.actions.setIsShowingVisual
|
|
1278
|
-
), v =
|
|
1278
|
+
), v = h((p) => p.actions.setCardSql), { connectionType: D, modelItems: S, selectedDatamodelName: O } = Ae();
|
|
1279
1279
|
function q(p) {
|
|
1280
1280
|
var U;
|
|
1281
1281
|
const E = ga(p, i);
|
|
@@ -1293,16 +1293,16 @@ function Fl({
|
|
|
1293
1293
|
}
|
|
1294
1294
|
function F() {
|
|
1295
1295
|
return (m == null ? void 0 : m.find(
|
|
1296
|
-
(p) => p.connectionId === c && (p.tableName ===
|
|
1296
|
+
(p) => p.connectionId === c && (p.tableName === u || p.datamodelName === O)
|
|
1297
1297
|
)) !== void 0;
|
|
1298
1298
|
}
|
|
1299
1299
|
function G(p) {
|
|
1300
|
-
p === !0 && (
|
|
1300
|
+
p === !0 && (u || O) && c ? (b({
|
|
1301
1301
|
connectionId: c,
|
|
1302
1302
|
connectionType: D === "S3" || D === "API" ? "DuckDb" : D,
|
|
1303
1303
|
databaseName: o || "",
|
|
1304
1304
|
schemaName: d || "",
|
|
1305
|
-
tableName:
|
|
1305
|
+
tableName: u || "",
|
|
1306
1306
|
datamodelName: st(O),
|
|
1307
1307
|
datamodelId: f || ""
|
|
1308
1308
|
}), nt.success("Added to Assistant Scope", {
|
|
@@ -1312,7 +1312,7 @@ function Fl({
|
|
|
1312
1312
|
})) : (x({
|
|
1313
1313
|
connectionId: c || "",
|
|
1314
1314
|
connectionType: D || "",
|
|
1315
|
-
tableName:
|
|
1315
|
+
tableName: u || "",
|
|
1316
1316
|
datamodelName: st(O),
|
|
1317
1317
|
datamodelId: f || "",
|
|
1318
1318
|
databaseName: o || "",
|
|
@@ -1440,33 +1440,33 @@ function Fl({
|
|
|
1440
1440
|
function Ae(t, s) {
|
|
1441
1441
|
var jt, Rt, _t, Ht, Pt, $t;
|
|
1442
1442
|
let a = wt(() => [], []);
|
|
1443
|
-
const l = Te().authToken || t, i =
|
|
1443
|
+
const l = Te().authToken || t, i = h(
|
|
1444
1444
|
(w) => w.selectedConnectionId
|
|
1445
|
-
), c =
|
|
1445
|
+
), c = h(
|
|
1446
1446
|
(w) => w.selectedDatamodelId
|
|
1447
|
-
), o =
|
|
1447
|
+
), o = h(
|
|
1448
1448
|
(w) => w.selectedDatabaseName
|
|
1449
|
-
), d =
|
|
1449
|
+
), d = h(
|
|
1450
1450
|
(w) => w.selectedSchemaName
|
|
1451
|
-
),
|
|
1451
|
+
), u = h((w) => w.selectedTableName), f = h(
|
|
1452
1452
|
(w) => w.actions.setCurrentColumns
|
|
1453
|
-
), m =
|
|
1453
|
+
), m = h(
|
|
1454
1454
|
(w) => w.actions.setSelectedConnectionId
|
|
1455
|
-
), b =
|
|
1455
|
+
), b = h(
|
|
1456
1456
|
(w) => w.actions.setSelectedDatamodelId
|
|
1457
|
-
), x =
|
|
1457
|
+
), x = h(
|
|
1458
1458
|
(w) => w.actions.setSelectedDatabaseName
|
|
1459
|
-
), r =
|
|
1459
|
+
), r = h(
|
|
1460
1460
|
(w) => w.actions.setSelectedSchemaName
|
|
1461
|
-
), y =
|
|
1461
|
+
), y = h(
|
|
1462
1462
|
(w) => w.actions.setSelectedTableName
|
|
1463
1463
|
);
|
|
1464
|
-
|
|
1464
|
+
h((w) => w.actions.setCardSql);
|
|
1465
1465
|
function g(w) {
|
|
1466
1466
|
return i && o && d && o !== "NA" ? !0 : i && w === "API" ? !1 : !!(i && w === "S3");
|
|
1467
1467
|
}
|
|
1468
1468
|
function C(w) {
|
|
1469
|
-
return !!(i && o && o !== "NA" && d &&
|
|
1469
|
+
return !!(i && o && o !== "NA" && d && u || i && (w === "S3" || w === "API") || c && c);
|
|
1470
1470
|
}
|
|
1471
1471
|
function v(w) {
|
|
1472
1472
|
return i && w ? !(w === "API" || w === "S3") : !1;
|
|
@@ -1539,7 +1539,7 @@ function Ae(t, s) {
|
|
|
1539
1539
|
//currentConnection?.type !== 'API', // Only fetch if connectionId and database is present
|
|
1540
1540
|
}), {
|
|
1541
1541
|
data: z,
|
|
1542
|
-
isLoading:
|
|
1542
|
+
isLoading: ue,
|
|
1543
1543
|
isFetching: k,
|
|
1544
1544
|
isError: J,
|
|
1545
1545
|
refetch: ne
|
|
@@ -1573,7 +1573,7 @@ function Ae(t, s) {
|
|
|
1573
1573
|
o,
|
|
1574
1574
|
c,
|
|
1575
1575
|
d,
|
|
1576
|
-
|
|
1576
|
+
u
|
|
1577
1577
|
],
|
|
1578
1578
|
queryFn: () => Ve(
|
|
1579
1579
|
"https://semaphor.cloud/api/v1/columns",
|
|
@@ -1584,7 +1584,7 @@ function Ae(t, s) {
|
|
|
1584
1584
|
// don't pass undefined. Pass empty string
|
|
1585
1585
|
database_name: o,
|
|
1586
1586
|
schema_name: d,
|
|
1587
|
-
table_name:
|
|
1587
|
+
table_name: u
|
|
1588
1588
|
}
|
|
1589
1589
|
),
|
|
1590
1590
|
enabled: C(E)
|
|
@@ -1607,7 +1607,7 @@ function Ae(t, s) {
|
|
|
1607
1607
|
r,
|
|
1608
1608
|
b
|
|
1609
1609
|
]);
|
|
1610
|
-
const I = (p == null ? void 0 : p.type) === "API" ? (jt = p == null ? void 0 : p.type) == null ? void 0 : jt.toLowerCase() :
|
|
1610
|
+
const I = (p == null ? void 0 : p.type) === "API" ? (jt = p == null ? void 0 : p.type) == null ? void 0 : jt.toLowerCase() : u || "", re = W ? "" : d || "";
|
|
1611
1611
|
function ye(w) {
|
|
1612
1612
|
r(w), y("");
|
|
1613
1613
|
}
|
|
@@ -1661,7 +1661,7 @@ function Ae(t, s) {
|
|
|
1661
1661
|
isSchemaLoadingOrFetching: P || Z,
|
|
1662
1662
|
isSchemaError: X,
|
|
1663
1663
|
tableItems: cn,
|
|
1664
|
-
isTableLoadingOrFetching:
|
|
1664
|
+
isTableLoadingOrFetching: ue || k,
|
|
1665
1665
|
isTableError: J,
|
|
1666
1666
|
columns: a,
|
|
1667
1667
|
isColumnsLoadingOrFetching: Se || xe,
|
|
@@ -1686,19 +1686,19 @@ function Ba({
|
|
|
1686
1686
|
ColumnsComponent: t
|
|
1687
1687
|
}) {
|
|
1688
1688
|
var xe;
|
|
1689
|
-
const s =
|
|
1689
|
+
const s = h(
|
|
1690
1690
|
(Y) => Y.selectedConnectionId
|
|
1691
|
-
), a =
|
|
1691
|
+
), a = h(
|
|
1692
1692
|
(Y) => Y.selectedDatamodelId
|
|
1693
|
-
), l =
|
|
1693
|
+
), l = h(
|
|
1694
1694
|
(Y) => Y.selectedDatabaseName
|
|
1695
|
-
), i =
|
|
1695
|
+
), i = h(
|
|
1696
1696
|
(Y) => Y.selectedSchemaName
|
|
1697
|
-
), c =
|
|
1697
|
+
), c = h((Y) => Y.selectedTableName), o = h(
|
|
1698
1698
|
(Y) => Y.actions.setSelectedTableName
|
|
1699
1699
|
), {
|
|
1700
1700
|
connectionItems: d,
|
|
1701
|
-
modelItems:
|
|
1701
|
+
modelItems: u,
|
|
1702
1702
|
schemaItems: f,
|
|
1703
1703
|
databaseItems: m,
|
|
1704
1704
|
tableItems: b,
|
|
@@ -1741,7 +1741,7 @@ function Ba({
|
|
|
1741
1741
|
}
|
|
1742
1742
|
);
|
|
1743
1743
|
}
|
|
1744
|
-
function
|
|
1744
|
+
function ue() {
|
|
1745
1745
|
window.location.href = "mailto:support@semaphor.cloud?subject=Help&body=I need help with...";
|
|
1746
1746
|
}
|
|
1747
1747
|
function k() {
|
|
@@ -1780,7 +1780,7 @@ function Ba({
|
|
|
1780
1780
|
onChange: Z,
|
|
1781
1781
|
isError: C,
|
|
1782
1782
|
isLoading: y,
|
|
1783
|
-
items:
|
|
1783
|
+
items: u,
|
|
1784
1784
|
value: a || "",
|
|
1785
1785
|
title: "Model"
|
|
1786
1786
|
}
|
|
@@ -1845,7 +1845,7 @@ function Ba({
|
|
|
1845
1845
|
/* @__PURE__ */ e("div", { className: "flex items-end justify-center gap-2 px-6 py-4", children: /* @__PURE__ */ n(
|
|
1846
1846
|
L,
|
|
1847
1847
|
{
|
|
1848
|
-
onClick:
|
|
1848
|
+
onClick: ue,
|
|
1849
1849
|
size: "sm",
|
|
1850
1850
|
variant: "secondary",
|
|
1851
1851
|
className: "w-full",
|
|
@@ -1899,19 +1899,19 @@ function El({ sql: t, error: s, onClick: a }) {
|
|
|
1899
1899
|
] });
|
|
1900
1900
|
}
|
|
1901
1901
|
function Vl() {
|
|
1902
|
-
const [t, s] = H([]), [a, l] = H(""), [i, c] = H(null), { authToken: o } = Te(), d =
|
|
1902
|
+
const [t, s] = H([]), [a, l] = H(""), [i, c] = H(null), { authToken: o } = Te(), d = h((k) => {
|
|
1903
1903
|
var J;
|
|
1904
1904
|
return (J = k == null ? void 0 : k.card) == null ? void 0 : J.sql;
|
|
1905
|
-
}),
|
|
1905
|
+
}), u = h((k) => {
|
|
1906
1906
|
var J;
|
|
1907
1907
|
return (J = k == null ? void 0 : k.card) == null ? void 0 : J.python;
|
|
1908
|
-
}), f =
|
|
1908
|
+
}), f = h((k) => k.actions.setCardSql), m = h((k) => k.actions.setRunSql), b = h(
|
|
1909
1909
|
(k) => k.actions.switchCardType
|
|
1910
|
-
), x =
|
|
1910
|
+
), x = h((k) => k.userInputForAI), r = h((k) => k.triggerAIRun), y = h(
|
|
1911
1911
|
(k) => k.selectedDatabaseName
|
|
1912
|
-
), g =
|
|
1912
|
+
), g = h((k) => k.selectedTableName), C = h(
|
|
1913
1913
|
(k) => k.selectedConnectionId
|
|
1914
|
-
), v =
|
|
1914
|
+
), v = h(
|
|
1915
1915
|
(k) => k.selectedSchemaName
|
|
1916
1916
|
), D = T(
|
|
1917
1917
|
(k) => k.dashboard.aiScopeTables
|
|
@@ -1972,7 +1972,7 @@ function Vl() {
|
|
|
1972
1972
|
return d ? {
|
|
1973
1973
|
status: "success",
|
|
1974
1974
|
sql: d,
|
|
1975
|
-
python:
|
|
1975
|
+
python: u || ""
|
|
1976
1976
|
} : {
|
|
1977
1977
|
status: "error",
|
|
1978
1978
|
message: "No SQL found"
|
|
@@ -2049,7 +2049,7 @@ function Vl() {
|
|
|
2049
2049
|
X(ne);
|
|
2050
2050
|
}
|
|
2051
2051
|
}
|
|
2052
|
-
const
|
|
2052
|
+
const ue = !["ready", "error"].includes(A);
|
|
2053
2053
|
return {
|
|
2054
2054
|
messages: G,
|
|
2055
2055
|
setMessages: _,
|
|
@@ -2057,7 +2057,7 @@ function Vl() {
|
|
|
2057
2057
|
append: p,
|
|
2058
2058
|
input: E,
|
|
2059
2059
|
setInput: W,
|
|
2060
|
-
isLoading:
|
|
2060
|
+
isLoading: ue,
|
|
2061
2061
|
handleSetAIScope: z,
|
|
2062
2062
|
handleAddCurrentTableToScope: j,
|
|
2063
2063
|
removeFromCurrentSelections: P,
|
|
@@ -2073,7 +2073,7 @@ function Vl() {
|
|
|
2073
2073
|
}
|
|
2074
2074
|
const ql = !1;
|
|
2075
2075
|
function jl() {
|
|
2076
|
-
const t =
|
|
2076
|
+
const t = h((V) => V.showAIDialog), s = $e(t), a = $e(null), l = $e(null), [i, c] = H(!1), [o, d] = H(ql), [u, f] = H(!1), m = h((V) => V.actions.setCardSql), b = h((V) => V.actions.setRunSql), { setShowAIDialog: x } = ie(), {
|
|
2077
2077
|
messages: r,
|
|
2078
2078
|
setMessages: y,
|
|
2079
2079
|
reload: g,
|
|
@@ -2132,7 +2132,7 @@ function jl() {
|
|
|
2132
2132
|
/* @__PURE__ */ e(
|
|
2133
2133
|
bt,
|
|
2134
2134
|
{
|
|
2135
|
-
checked:
|
|
2135
|
+
checked: u,
|
|
2136
2136
|
onCheckedChange: f,
|
|
2137
2137
|
children: "System Message"
|
|
2138
2138
|
}
|
|
@@ -2222,7 +2222,7 @@ function jl() {
|
|
|
2222
2222
|
messages: r,
|
|
2223
2223
|
showTools: o,
|
|
2224
2224
|
handleRun: U,
|
|
2225
|
-
showSystemMessage:
|
|
2225
|
+
showSystemMessage: u
|
|
2226
2226
|
}
|
|
2227
2227
|
),
|
|
2228
2228
|
/* @__PURE__ */ e(
|
|
@@ -2350,13 +2350,13 @@ function Bl(t) {
|
|
|
2350
2350
|
attr: l,
|
|
2351
2351
|
size: i,
|
|
2352
2352
|
title: c
|
|
2353
|
-
} = t, o = _l(t, Rl), d = i || a.size || "1em",
|
|
2354
|
-
return a.className && (
|
|
2353
|
+
} = t, o = _l(t, Rl), d = i || a.size || "1em", u;
|
|
2354
|
+
return a.className && (u = a.className), t.className && (u = (u ? u + " " : "") + t.className), /* @__PURE__ */ Me.createElement("svg", ct({
|
|
2355
2355
|
stroke: "currentColor",
|
|
2356
2356
|
fill: "currentColor",
|
|
2357
2357
|
strokeWidth: "0"
|
|
2358
2358
|
}, a.attr, l, o, {
|
|
2359
|
-
className:
|
|
2359
|
+
className: u,
|
|
2360
2360
|
style: dt(dt({
|
|
2361
2361
|
color: t.color || a.color
|
|
2362
2362
|
}, a.style), t.style),
|
|
@@ -2371,7 +2371,7 @@ function Ul(t) {
|
|
|
2371
2371
|
return je({ 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);
|
|
2372
2372
|
}
|
|
2373
2373
|
function Wa(t) {
|
|
2374
|
-
const { theme: s } = zn(), a = T((g) => g.theme), l =
|
|
2374
|
+
const { theme: s } = zn(), a = T((g) => g.theme), l = h((g) => g.frame), i = h((g) => g.card), c = h((g) => g.activeTabCardId), o = Ln(), { refetch: d } = Le(i), { updateCardTab: u, setRunSql: f } = ie(), m = $e(), b = $e({}), x = l.cards.find((g) => g.id === c), r = za(() => {
|
|
2375
2375
|
let g = "";
|
|
2376
2376
|
return t === "python" && (g = (x == null ? void 0 : x.python) || va), t === "sql" && (g = (x == null ? void 0 : x.sql) || ""), g;
|
|
2377
2377
|
}, [t, x]);
|
|
@@ -2387,12 +2387,12 @@ function Wa(t) {
|
|
|
2387
2387
|
}
|
|
2388
2388
|
m.current.setModel(C);
|
|
2389
2389
|
}
|
|
2390
|
-
|
|
2390
|
+
u(c, i), f(!0);
|
|
2391
2391
|
}
|
|
2392
2392
|
}, [
|
|
2393
2393
|
c,
|
|
2394
2394
|
i,
|
|
2395
|
-
|
|
2395
|
+
u,
|
|
2396
2396
|
o,
|
|
2397
2397
|
f,
|
|
2398
2398
|
t,
|
|
@@ -2432,12 +2432,12 @@ function Wa(t) {
|
|
|
2432
2432
|
return { handleEditorDidMount: y };
|
|
2433
2433
|
}
|
|
2434
2434
|
function Jl() {
|
|
2435
|
-
const t =
|
|
2435
|
+
const t = h((o) => o.card.sql), s = h((o) => o.sqlGen), { setCardSql: a, setSqlGen: l } = ie(), { handleEditorDidMount: i } = Wa("sql");
|
|
2436
2436
|
function c(o) {
|
|
2437
2437
|
a(o), An(s) || l({});
|
|
2438
2438
|
}
|
|
2439
2439
|
return /* @__PURE__ */ e(
|
|
2440
|
-
|
|
2440
|
+
ht,
|
|
2441
2441
|
{
|
|
2442
2442
|
theme: "default",
|
|
2443
2443
|
className: "pt-3",
|
|
@@ -2461,12 +2461,12 @@ function Jl() {
|
|
|
2461
2461
|
);
|
|
2462
2462
|
}
|
|
2463
2463
|
function Wl() {
|
|
2464
|
-
const t =
|
|
2464
|
+
const t = h((i) => i.card.python), { setCardPython: s } = ie(), { handleEditorDidMount: a } = Wa("python");
|
|
2465
2465
|
function l(i) {
|
|
2466
2466
|
s(i);
|
|
2467
2467
|
}
|
|
2468
2468
|
return /* @__PURE__ */ e(
|
|
2469
|
-
|
|
2469
|
+
ht,
|
|
2470
2470
|
{
|
|
2471
2471
|
className: "pt-3",
|
|
2472
2472
|
theme: "default",
|
|
@@ -2491,7 +2491,7 @@ function Wl() {
|
|
|
2491
2491
|
}
|
|
2492
2492
|
function Kl({ jsonString: t }) {
|
|
2493
2493
|
return /* @__PURE__ */ e(
|
|
2494
|
-
|
|
2494
|
+
ht,
|
|
2495
2495
|
{
|
|
2496
2496
|
theme: "default",
|
|
2497
2497
|
defaultLanguage: "json",
|
|
@@ -2520,15 +2520,15 @@ function Ql() {
|
|
|
2520
2520
|
const [t, s] = H({
|
|
2521
2521
|
queryKey: [],
|
|
2522
2522
|
queryData: null
|
|
2523
|
-
}), a = En(), [l, i] = H(!1), [c, o] = H(!1), d =
|
|
2523
|
+
}), a = En(), [l, i] = H(!1), [c, o] = H(!1), d = h((I) => I.frame), u = h((I) => I.card), f = h((I) => I.isShowingVisual), m = h(
|
|
2524
2524
|
(I) => I.selectedConnectionId
|
|
2525
|
-
), b =
|
|
2525
|
+
), b = h(
|
|
2526
2526
|
(I) => I.selectedDatabaseName
|
|
2527
|
-
), x =
|
|
2527
|
+
), x = h(
|
|
2528
2528
|
(I) => I.selectedDatamodelId
|
|
2529
|
-
), r =
|
|
2529
|
+
), r = h(
|
|
2530
2530
|
(I) => I.selectedSchemaName
|
|
2531
|
-
), y =
|
|
2531
|
+
), y = h((I) => I.selectedTableName), g = h((I) => {
|
|
2532
2532
|
var re;
|
|
2533
2533
|
return (re = I == null ? void 0 : I.card) == null ? void 0 : re.sql;
|
|
2534
2534
|
}), { sheetFilterValues: C } = Vn(), {
|
|
@@ -2541,7 +2541,7 @@ function Ql() {
|
|
|
2541
2541
|
setCardType: F,
|
|
2542
2542
|
setCardPython: G,
|
|
2543
2543
|
runAssistant: _
|
|
2544
|
-
} = ie(), B =
|
|
2544
|
+
} = ie(), B = h((I) => I.onSave), p = h((I) => I.onClose), E = h((I) => I.actions.setSqlGen), W = h((I) => I.runSql), A = h((I) => I.actions.setRunSql), U = h((I) => I.actions.setCardCfg), K = h(
|
|
2545
2545
|
(I) => I.actions.setIsSqlRunning
|
|
2546
2546
|
), {
|
|
2547
2547
|
data: V,
|
|
@@ -2552,7 +2552,7 @@ function Ql() {
|
|
|
2552
2552
|
error: X,
|
|
2553
2553
|
queryKey: j,
|
|
2554
2554
|
refetch: z
|
|
2555
|
-
} = Le(
|
|
2555
|
+
} = Le(u);
|
|
2556
2556
|
de(() => {
|
|
2557
2557
|
if (V && (V.rowLimitExceeded && nt.error("Row limit (10,000) exceeded. Refine your query.", {
|
|
2558
2558
|
position: "top-center",
|
|
@@ -2577,7 +2577,7 @@ function Ql() {
|
|
|
2577
2577
|
]), de(() => {
|
|
2578
2578
|
W && (a.getQueryData(j) || z(), A(!1));
|
|
2579
2579
|
}, [W, z, A, j, a]);
|
|
2580
|
-
function
|
|
2580
|
+
function ue() {
|
|
2581
2581
|
const I = a.getQueryData(j);
|
|
2582
2582
|
t.queryData || s({
|
|
2583
2583
|
queryKey: j,
|
|
@@ -2608,17 +2608,17 @@ function Ql() {
|
|
|
2608
2608
|
let I = g;
|
|
2609
2609
|
g && !g.includes("{{") && (I = Al(g), S(I));
|
|
2610
2610
|
const re = {
|
|
2611
|
-
...
|
|
2611
|
+
...u,
|
|
2612
2612
|
lastSelectedSchema: r,
|
|
2613
2613
|
lastSelectedDatamodelId: x,
|
|
2614
2614
|
lastSelectedDatabase: b,
|
|
2615
2615
|
lastSelectedTable: y,
|
|
2616
2616
|
connectionId: m,
|
|
2617
|
-
type: f ?
|
|
2617
|
+
type: f ? u.type : "table",
|
|
2618
2618
|
sql: I,
|
|
2619
|
-
customCfg: f ?
|
|
2619
|
+
customCfg: f ? u.customCfg : null
|
|
2620
2620
|
}, ye = d.cards.map(
|
|
2621
|
-
(_e) => _e.id ===
|
|
2621
|
+
(_e) => _e.id === u.id ? re : _e
|
|
2622
2622
|
), be = {
|
|
2623
2623
|
...d,
|
|
2624
2624
|
cards: ye,
|
|
@@ -2772,7 +2772,7 @@ function Ql() {
|
|
|
2772
2772
|
/* @__PURE__ */ n(
|
|
2773
2773
|
L,
|
|
2774
2774
|
{
|
|
2775
|
-
onClick:
|
|
2775
|
+
onClick: ue,
|
|
2776
2776
|
className: "",
|
|
2777
2777
|
size: "sm",
|
|
2778
2778
|
variant: "secondary",
|
|
@@ -2803,7 +2803,7 @@ function Ql() {
|
|
|
2803
2803
|
size: "sm",
|
|
2804
2804
|
variant: "secondary",
|
|
2805
2805
|
children: [
|
|
2806
|
-
/* @__PURE__ */ e(
|
|
2806
|
+
/* @__PURE__ */ e(ut, { className: "mr-2 size-4" }),
|
|
2807
2807
|
"Close"
|
|
2808
2808
|
]
|
|
2809
2809
|
}
|
|
@@ -2834,13 +2834,13 @@ function Zl({ data: t }) {
|
|
|
2834
2834
|
const [s, a] = Me.useState([]), i = Object.keys(t[0]).map((d) => ({
|
|
2835
2835
|
// header: key,
|
|
2836
2836
|
accessorKey: d,
|
|
2837
|
-
header: ({ column:
|
|
2838
|
-
const f =
|
|
2837
|
+
header: ({ column: u }) => {
|
|
2838
|
+
const f = u.getIsSorted();
|
|
2839
2839
|
return /* @__PURE__ */ e("div", { className: "flex gap-2", children: /* @__PURE__ */ n(
|
|
2840
2840
|
"div",
|
|
2841
2841
|
{
|
|
2842
2842
|
className: "flex cursor-pointer items-center",
|
|
2843
|
-
onClick: () =>
|
|
2843
|
+
onClick: () => u.toggleSorting(u.getIsSorted() === "asc"),
|
|
2844
2844
|
children: [
|
|
2845
2845
|
d,
|
|
2846
2846
|
f === "asc" ? /* @__PURE__ */ e(Rn, { className: "ml-2 h-5 w-5" }) : f === "desc" ? /* @__PURE__ */ e(_n, { className: "ml-2 h-5 w-5" }) : null
|
|
@@ -2861,23 +2861,23 @@ function Zl({ data: t }) {
|
|
|
2861
2861
|
}
|
|
2862
2862
|
});
|
|
2863
2863
|
return /* @__PURE__ */ e("div", { className: "font-mono text-xs text-foreground/95", children: /* @__PURE__ */ n("table", { className: "w-full", children: [
|
|
2864
|
-
/* @__PURE__ */ e(Pn, { children: c.getHeaderGroups().map((d) => /* @__PURE__ */ e(xt, { children: d.headers.map((
|
|
2864
|
+
/* @__PURE__ */ e(Pn, { children: c.getHeaderGroups().map((d) => /* @__PURE__ */ e(xt, { children: d.headers.map((u) => /* @__PURE__ */ e(
|
|
2865
2865
|
$n,
|
|
2866
2866
|
{
|
|
2867
2867
|
className: "sticky top-0 h-11 bg-muted font-semibold",
|
|
2868
|
-
children:
|
|
2869
|
-
|
|
2870
|
-
|
|
2868
|
+
children: u.isPlaceholder ? null : Ut(
|
|
2869
|
+
u.column.columnDef.header,
|
|
2870
|
+
u.getContext()
|
|
2871
2871
|
)
|
|
2872
2872
|
},
|
|
2873
|
-
|
|
2873
|
+
u.id
|
|
2874
2874
|
)) }, d.id)) }),
|
|
2875
2875
|
/* @__PURE__ */ e(Gn, { children: (o = c.getRowModel().rows) != null && o.length ? c.getRowModel().rows.map((d) => /* @__PURE__ */ e(
|
|
2876
2876
|
xt,
|
|
2877
2877
|
{
|
|
2878
2878
|
className: "whitespace-nowrap py-2",
|
|
2879
2879
|
"data-state": d.getIsSelected() && "selected",
|
|
2880
|
-
children: d.getVisibleCells().map((
|
|
2880
|
+
children: d.getVisibleCells().map((u) => /* @__PURE__ */ e(Jt, { className: "py-3", children: Ut(u.column.columnDef.cell, u.getContext()) }, u.id))
|
|
2881
2881
|
},
|
|
2882
2882
|
d.id
|
|
2883
2883
|
)) : /* @__PURE__ */ e(xt, { children: /* @__PURE__ */ e(Jt, { colSpan: i.length, className: "h-24 text-center", children: "No results." }) }) })
|
|
@@ -2887,11 +2887,11 @@ function Xl({ card: t }) {
|
|
|
2887
2887
|
var D, S, O, q, F, G, _, B, p, E, W;
|
|
2888
2888
|
const [s, a] = H(!1), [l, i] = H(
|
|
2889
2889
|
[]
|
|
2890
|
-
), { authToken: c } = Te(), o = Wn(c == null ? void 0 : c.accessToken), d = T((A) => A.themeStyle),
|
|
2890
|
+
), { authToken: c } = Te(), o = Wn(c == null ? void 0 : c.accessToken), d = T((A) => A.themeStyle), u = {
|
|
2891
2891
|
colors: ((S = (D = d == null ? void 0 : d.chart) == null ? void 0 : D.dataset) == null ? void 0 : S.backgroundColor) || []
|
|
2892
2892
|
};
|
|
2893
2893
|
(O = t.customCardPreferences) != null && O.inputData;
|
|
2894
|
-
const { getCard: f } = Na(((q = t.customCardPreferences) == null ? void 0 : q.url) || ""), m = ((F = t.customCardPreferences) == null ? void 0 : F.visualType) || "single", b =
|
|
2894
|
+
const { getCard: f } = Na(((q = t.customCardPreferences) == null ? void 0 : q.url) || ""), m = ((F = t.customCardPreferences) == null ? void 0 : F.visualType) || "single", b = h((A) => A.frame), { setCustomCardPreferences: x } = ie(), { data: r } = Le(t), y = za((A, U) => {
|
|
2895
2895
|
i((K) => ({
|
|
2896
2896
|
...K,
|
|
2897
2897
|
[A]: U
|
|
@@ -2921,7 +2921,7 @@ function Xl({ card: t }) {
|
|
|
2921
2921
|
g,
|
|
2922
2922
|
{
|
|
2923
2923
|
params: o,
|
|
2924
|
-
theme:
|
|
2924
|
+
theme: u,
|
|
2925
2925
|
settings: (p = t.customCardPreferences) == null ? void 0 : p.settings,
|
|
2926
2926
|
onDataChange: y,
|
|
2927
2927
|
data: (r == null ? void 0 : r.records) || []
|
|
@@ -2950,7 +2950,7 @@ function Xl({ card: t }) {
|
|
|
2950
2950
|
/* @__PURE__ */ e("div", { className: "flex flex-col gap-2", children: /* @__PURE__ */ e(
|
|
2951
2951
|
g,
|
|
2952
2952
|
{
|
|
2953
|
-
theme:
|
|
2953
|
+
theme: u,
|
|
2954
2954
|
onDataChange: y,
|
|
2955
2955
|
settings: v.map(
|
|
2956
2956
|
(A) => {
|
|
@@ -2974,13 +2974,13 @@ function Ka({
|
|
|
2974
2974
|
...s
|
|
2975
2975
|
}) {
|
|
2976
2976
|
var C;
|
|
2977
|
-
const a =
|
|
2978
|
-
|
|
2979
|
-
const { updateFilter: o } = Je(), d = c == null ? void 0 : c.find((v) => v.id === i.filterId), { data:
|
|
2977
|
+
const a = h((v) => v.card), l = ((C = a.customCardPreferences) == null ? void 0 : C.showCardHeader) ?? !0, i = h((v) => v.frame), c = T((v) => v.dashboard.filters);
|
|
2978
|
+
h((v) => v.actions.setRunSql);
|
|
2979
|
+
const { updateFilter: o } = Je(), d = c == null ? void 0 : c.find((v) => v.id === i.filterId), { data: u, isLoading: f, isFetching: m } = Le(a), { setCard: b } = ie(), { data: x } = Lt(a);
|
|
2980
2980
|
if (!a.id) return null;
|
|
2981
2981
|
let r;
|
|
2982
|
-
|
|
2983
|
-
data:
|
|
2982
|
+
u != null && u.records && (u == null ? void 0 : u.records.length) > 0 && (r = Ca({
|
|
2983
|
+
data: u == null ? void 0 : u.records,
|
|
2984
2984
|
cardType: a.type,
|
|
2985
2985
|
cfg: a.cfg,
|
|
2986
2986
|
customCfg: a.customCfg,
|
|
@@ -2992,7 +2992,7 @@ function Ka({
|
|
|
2992
2992
|
}
|
|
2993
2993
|
function g() {
|
|
2994
2994
|
var v;
|
|
2995
|
-
if (
|
|
2995
|
+
if (u != null && u.records && (u == null ? void 0 : u.records.length) === 0 && !f && !m)
|
|
2996
2996
|
return /* @__PURE__ */ n("div", { className: "flex h-full flex-col items-center justify-center gap-2", children: [
|
|
2997
2997
|
/* @__PURE__ */ e(ts, { className: "size-8 text-muted-foreground" }),
|
|
2998
2998
|
/* @__PURE__ */ e("p", { className: "text-sm text-muted-foreground", children: "No records to display" })
|
|
@@ -3007,9 +3007,9 @@ function Ka({
|
|
|
3007
3007
|
},
|
|
3008
3008
|
JSON.stringify(r) + JSON.stringify(a.preferences) + ((v = a == null ? void 0 : a.preferences) == null ? void 0 : v.customVisualCode)
|
|
3009
3009
|
);
|
|
3010
|
-
if (a.type === "table" && (
|
|
3010
|
+
if (a.type === "table" && (u != null && u.records) && (u == null ? void 0 : u.records.length) > 0)
|
|
3011
3011
|
return /* @__PURE__ */ n(Ie, { className: "relative mb-2 flex h-full min-h-0 w-full flex-1 grow basis-0", children: [
|
|
3012
|
-
/* @__PURE__ */ e(ns, { card: a, data:
|
|
3012
|
+
/* @__PURE__ */ e(ns, { card: a, data: u == null ? void 0 : u.records }),
|
|
3013
3013
|
/* @__PURE__ */ e(qe, { orientation: "horizontal" })
|
|
3014
3014
|
] });
|
|
3015
3015
|
}
|
|
@@ -3065,7 +3065,7 @@ const Yt = ({
|
|
|
3065
3065
|
onChange: a,
|
|
3066
3066
|
readonly: l
|
|
3067
3067
|
}) => /* @__PURE__ */ e(
|
|
3068
|
-
|
|
3068
|
+
ht,
|
|
3069
3069
|
{
|
|
3070
3070
|
className: "h-full w-full overflow-hidden text-xs",
|
|
3071
3071
|
theme: "default",
|
|
@@ -3153,7 +3153,7 @@ const Yt = ({
|
|
|
3153
3153
|
/* @__PURE__ */ e(L, { onClick: i, variant: "outline", children: "Close" })
|
|
3154
3154
|
] });
|
|
3155
3155
|
function ai() {
|
|
3156
|
-
const [t, s] = H(!1), [a, l] = H(""), [i, c] = H(""), [o, d] = H(""), [
|
|
3156
|
+
const [t, s] = H(!1), [a, l] = H(""), [i, c] = H(""), [o, d] = H(""), [u, f] = H(""), m = h((S) => S.card), b = h((S) => S.card.customCfg), { data: x } = Le(m), { data: r } = Lt(m), { setCardCustomCfg: y, setCustomVisualCode: g } = ie(), C = (S) => {
|
|
3157
3157
|
var O, q;
|
|
3158
3158
|
return JSON.stringify(
|
|
3159
3159
|
{
|
|
@@ -3212,7 +3212,7 @@ function ai() {
|
|
|
3212
3212
|
/* @__PURE__ */ e(
|
|
3213
3213
|
ti,
|
|
3214
3214
|
{
|
|
3215
|
-
error:
|
|
3215
|
+
error: u,
|
|
3216
3216
|
hasCustomConfig: !!b,
|
|
3217
3217
|
onReset: () => {
|
|
3218
3218
|
c(a), y(null);
|
|
@@ -3274,10 +3274,10 @@ function si({
|
|
|
3274
3274
|
var c;
|
|
3275
3275
|
if (l) {
|
|
3276
3276
|
const d = (await Promise.all(
|
|
3277
|
-
(c = l == null ? void 0 : l.plugins) == null ? void 0 : c.map(async (
|
|
3277
|
+
(c = l == null ? void 0 : l.plugins) == null ? void 0 : c.map(async (u) => (await os(u.value)).visuals.map((b) => ({
|
|
3278
3278
|
name: b.name,
|
|
3279
3279
|
icon: b.icon,
|
|
3280
|
-
url:
|
|
3280
|
+
url: u.value
|
|
3281
3281
|
})))
|
|
3282
3282
|
)).flat();
|
|
3283
3283
|
a(d);
|
|
@@ -3306,9 +3306,9 @@ const li = ({
|
|
|
3306
3306
|
};
|
|
3307
3307
|
function ii() {
|
|
3308
3308
|
var m, b;
|
|
3309
|
-
const [t, s] = H(!1), a =
|
|
3309
|
+
const [t, s] = H(!1), a = h((x) => x.card), l = a.type, { setCardType: i, setCardPreferences: c, setChartOrientation: o } = h((x) => x.actions), { setCardCustomCfg: d, setCustomCardPreferences: u } = ie();
|
|
3310
3310
|
function f(x, r) {
|
|
3311
|
-
d(null), c({}), i(x), r &&
|
|
3311
|
+
d(null), c({}), i(x), r && u({
|
|
3312
3312
|
type: "component",
|
|
3313
3313
|
visualType: "single",
|
|
3314
3314
|
url: r.url,
|
|
@@ -3515,20 +3515,20 @@ function ri({
|
|
|
3515
3515
|
}
|
|
3516
3516
|
}
|
|
3517
3517
|
function oi() {
|
|
3518
|
-
const t =
|
|
3518
|
+
const t = h(
|
|
3519
3519
|
(d) => {
|
|
3520
|
-
var
|
|
3521
|
-
return (b = (m = (f = (
|
|
3520
|
+
var u, f, m, b;
|
|
3521
|
+
return (b = (m = (f = (u = d.card.preferences) == null ? void 0 : u.chartOptions) == null ? void 0 : f.plugins) == null ? void 0 : m.legend) == null ? void 0 : b.position;
|
|
3522
3522
|
}
|
|
3523
|
-
), s =
|
|
3523
|
+
), s = h(
|
|
3524
3524
|
(d) => {
|
|
3525
|
-
var
|
|
3526
|
-
return (b = (m = (f = (
|
|
3525
|
+
var u, f, m, b;
|
|
3526
|
+
return (b = (m = (f = (u = d.card.preferences) == null ? void 0 : u.chartOptions) == null ? void 0 : f.plugins) == null ? void 0 : m.legend) == null ? void 0 : b.align;
|
|
3527
3527
|
}
|
|
3528
|
-
), a =
|
|
3528
|
+
), a = h(
|
|
3529
3529
|
(d) => {
|
|
3530
|
-
var
|
|
3531
|
-
return (b = (m = (f = (
|
|
3530
|
+
var u, f, m, b;
|
|
3531
|
+
return (b = (m = (f = (u = d.card.preferences) == null ? void 0 : u.chartOptions) == null ? void 0 : f.plugins) == null ? void 0 : m.legend) == null ? void 0 : b.display;
|
|
3532
3532
|
}
|
|
3533
3533
|
), { setLegendOptions: l } = ie();
|
|
3534
3534
|
return /* @__PURE__ */ n(Qe, { children: [
|
|
@@ -3544,6 +3544,7 @@ function oi() {
|
|
|
3544
3544
|
/* @__PURE__ */ e("div", { className: "col-span-2 flex h-8 items-center", children: /* @__PURE__ */ e(
|
|
3545
3545
|
cs,
|
|
3546
3546
|
{
|
|
3547
|
+
checked: a,
|
|
3547
3548
|
onCheckedChange: (d) => {
|
|
3548
3549
|
l({
|
|
3549
3550
|
display: d,
|
|
@@ -3558,7 +3559,7 @@ function oi() {
|
|
|
3558
3559
|
] }),
|
|
3559
3560
|
/* @__PURE__ */ n("div", { className: "grid grid-cols-3 items-center gap-4", children: [
|
|
3560
3561
|
/* @__PURE__ */ e($, { htmlFor: "position", children: "Position" }),
|
|
3561
|
-
/* @__PURE__ */ n(me, { onValueChange: (d) => {
|
|
3562
|
+
/* @__PURE__ */ n(me, { value: t, onValueChange: (d) => {
|
|
3562
3563
|
l({
|
|
3563
3564
|
display: a,
|
|
3564
3565
|
position: d,
|
|
@@ -3576,7 +3577,7 @@ function oi() {
|
|
|
3576
3577
|
] }),
|
|
3577
3578
|
/* @__PURE__ */ n("div", { className: "grid grid-cols-3 items-center gap-4", children: [
|
|
3578
3579
|
/* @__PURE__ */ e($, { htmlFor: "align", children: "Align" }),
|
|
3579
|
-
/* @__PURE__ */ n(me, { onValueChange: (d) => {
|
|
3580
|
+
/* @__PURE__ */ n(me, { value: s, onValueChange: (d) => {
|
|
3580
3581
|
l({
|
|
3581
3582
|
display: a,
|
|
3582
3583
|
position: t,
|
|
@@ -3597,16 +3598,16 @@ function oi() {
|
|
|
3597
3598
|
}
|
|
3598
3599
|
function ea() {
|
|
3599
3600
|
var V;
|
|
3600
|
-
const t =
|
|
3601
|
+
const t = h((N) => N.frame), s = h((N) => N.card), a = h((N) => N.isShowingVisual), l = h((N) => N.isSqlRunning), i = h((N) => N.pythonStdOut), c = h(
|
|
3601
3602
|
(N) => {
|
|
3602
3603
|
var M;
|
|
3603
3604
|
return (M = N.card.preferences) == null ? void 0 : M.chartOptions;
|
|
3604
3605
|
}
|
|
3605
3606
|
);
|
|
3606
|
-
|
|
3607
|
+
h((N) => N.actions.setRunSql);
|
|
3607
3608
|
const o = ds(c), {
|
|
3608
3609
|
setFrame: d,
|
|
3609
|
-
setCard:
|
|
3610
|
+
setCard: u,
|
|
3610
3611
|
updateCardInFrame: f,
|
|
3611
3612
|
setActiveTabCardId: m,
|
|
3612
3613
|
runAssistant: b,
|
|
@@ -3657,7 +3658,7 @@ function ea() {
|
|
|
3657
3658
|
// update the active card to the first card in the frame
|
|
3658
3659
|
activeCardId: P.id
|
|
3659
3660
|
};
|
|
3660
|
-
d(Z), m(P.id),
|
|
3661
|
+
d(Z), m(P.id), u(P);
|
|
3661
3662
|
}
|
|
3662
3663
|
function q(N) {
|
|
3663
3664
|
m(N);
|
|
@@ -3678,7 +3679,7 @@ function ea() {
|
|
|
3678
3679
|
{
|
|
3679
3680
|
onClick: () => {
|
|
3680
3681
|
const P = M.displayTab === void 0 ? !1 : !M.displayTab;
|
|
3681
|
-
|
|
3682
|
+
u({ ...M, displayTab: P }), f({
|
|
3682
3683
|
...M,
|
|
3683
3684
|
displayTab: P
|
|
3684
3685
|
});
|
|
@@ -3702,7 +3703,7 @@ function ea() {
|
|
|
3702
3703
|
{
|
|
3703
3704
|
text: N.tabTitle || N.title,
|
|
3704
3705
|
onSave: (P) => {
|
|
3705
|
-
|
|
3706
|
+
u({ ...s, tabTitle: P }), f({ ...s, tabTitle: P });
|
|
3706
3707
|
},
|
|
3707
3708
|
children: /* @__PURE__ */ n(
|
|
3708
3709
|
Ct,
|
|
@@ -3753,7 +3754,7 @@ function ea() {
|
|
|
3753
3754
|
);
|
|
3754
3755
|
}
|
|
3755
3756
|
function E() {
|
|
3756
|
-
return s.type === "kpi" ? /* @__PURE__ */ e("div", { className: "flex h-full items-center justify-center", children: /* @__PURE__ */ e("div", { className: "w-1/2 rounded-md border", children: /* @__PURE__ */ e(
|
|
3757
|
+
return s.type === "kpi" ? /* @__PURE__ */ e("div", { className: "flex h-full items-center justify-center", children: /* @__PURE__ */ e("div", { className: "w-1/2 rounded-md border", children: /* @__PURE__ */ e(hs, { card: s, data: r == null ? void 0 : r.records }) }) }) : s.type === "text" ? /* @__PURE__ */ e("div", { className: "flex h-full items-center justify-center", children: /* @__PURE__ */ e("div", { className: "w-1/2 rounded-md border", children: /* @__PURE__ */ e(Ie, { className: "mx-3 my-6 h-[300px] overflow-y-auto break-words px-3", children: /* @__PURE__ */ e(
|
|
3757
3758
|
ms,
|
|
3758
3759
|
{
|
|
3759
3760
|
isLoading: l,
|
|
@@ -3813,7 +3814,7 @@ function ea() {
|
|
|
3813
3814
|
}
|
|
3814
3815
|
),
|
|
3815
3816
|
/* @__PURE__ */ e(
|
|
3816
|
-
|
|
3817
|
+
us,
|
|
3817
3818
|
{
|
|
3818
3819
|
text: JSON.stringify(r == null ? void 0 : r.records, null, 2),
|
|
3819
3820
|
className: "h-7 w-fit px-1 font-mono text-xs text-muted-foreground/70"
|
|
@@ -3821,8 +3822,18 @@ function ea() {
|
|
|
3821
3822
|
)
|
|
3822
3823
|
] }),
|
|
3823
3824
|
a && /* @__PURE__ */ n("div", { className: "flex items-center", children: [
|
|
3824
|
-
/* @__PURE__ */ e(oi, {}),
|
|
3825
|
-
|
|
3825
|
+
!["kpi", "text", "custom", "table"].includes(s.type) && /* @__PURE__ */ e(oi, {}),
|
|
3826
|
+
![
|
|
3827
|
+
"pie",
|
|
3828
|
+
"doughnut",
|
|
3829
|
+
"radar",
|
|
3830
|
+
"polarArea",
|
|
3831
|
+
"table",
|
|
3832
|
+
"custom",
|
|
3833
|
+
"kpi",
|
|
3834
|
+
"text",
|
|
3835
|
+
"map"
|
|
3836
|
+
].includes(s.type) && /* @__PURE__ */ n(rt, { tooltip: "Grid Style", onClick: K, children: [
|
|
3826
3837
|
(o === "xy" || !o) && /* @__PURE__ */ e(tl, { className: "size-4" }),
|
|
3827
3838
|
o === "x" && /* @__PURE__ */ e(Ws, { className: "size-4" }),
|
|
3828
3839
|
o === "y" && /* @__PURE__ */ e(pl, { className: "size-4" }),
|
|
@@ -3871,7 +3882,7 @@ function ea() {
|
|
|
3871
3882
|
] });
|
|
3872
3883
|
}
|
|
3873
3884
|
function ci() {
|
|
3874
|
-
const t =
|
|
3885
|
+
const t = h((a) => a.pythonStdOut);
|
|
3875
3886
|
if (!t) return null;
|
|
3876
3887
|
const s = t.replace(/\n/g, "<br>");
|
|
3877
3888
|
return /* @__PURE__ */ n("div", { className: "relative flex w-full flex-col border-r", children: [
|
|
@@ -3883,7 +3894,7 @@ function ci() {
|
|
|
3883
3894
|
] });
|
|
3884
3895
|
}
|
|
3885
3896
|
function di() {
|
|
3886
|
-
const t =
|
|
3897
|
+
const t = h((a) => a.isShowingVisual), s = h(
|
|
3887
3898
|
(a) => a.actions.setIsShowingVisual
|
|
3888
3899
|
);
|
|
3889
3900
|
return /* @__PURE__ */ n("div", { className: "flex items-center space-x-2", children: [
|
|
@@ -3899,7 +3910,7 @@ function di() {
|
|
|
3899
3910
|
)
|
|
3900
3911
|
] });
|
|
3901
3912
|
}
|
|
3902
|
-
function
|
|
3913
|
+
function ui({
|
|
3903
3914
|
options: t,
|
|
3904
3915
|
value: s,
|
|
3905
3916
|
onValueChange: a
|
|
@@ -3960,13 +3971,13 @@ function Ge({
|
|
|
3960
3971
|
}
|
|
3961
3972
|
);
|
|
3962
3973
|
}
|
|
3963
|
-
function
|
|
3974
|
+
function hi() {
|
|
3964
3975
|
var g, C;
|
|
3965
|
-
const t =
|
|
3976
|
+
const t = h(
|
|
3966
3977
|
(v) => v.card.customCardPreferences
|
|
3967
|
-
), { data: s } = tn(), a = (s == null ? void 0 : s.plugins) || [], l =
|
|
3978
|
+
), { data: s } = tn(), a = (s == null ? void 0 : s.plugins) || [], l = h((v) => v.card), i = h((v) => v.frame), c = (t == null ? void 0 : t.visualType) || "single", { setCustomCardPreferences: o } = ie(), { components: d, manifest: u } = Na(
|
|
3968
3979
|
(t == null ? void 0 : t.url) || ""
|
|
3969
|
-
), f = (g =
|
|
3980
|
+
), f = (g = u == null ? void 0 : u.visuals) == null ? void 0 : g.find(
|
|
3970
3981
|
(v) => v.name === (t == null ? void 0 : t.componentName)
|
|
3971
3982
|
);
|
|
3972
3983
|
function m(v, D) {
|
|
@@ -4019,7 +4030,7 @@ function ui() {
|
|
|
4019
4030
|
function x(v, D, S = []) {
|
|
4020
4031
|
var O, q;
|
|
4021
4032
|
return t ? v === "input" ? /* @__PURE__ */ e(
|
|
4022
|
-
|
|
4033
|
+
he,
|
|
4023
4034
|
{
|
|
4024
4035
|
className: `h-8 w-full ${Pe}`,
|
|
4025
4036
|
value: ((O = t == null ? void 0 : t.settings) == null ? void 0 : O[D]) || "",
|
|
@@ -4091,7 +4102,7 @@ function ui() {
|
|
|
4091
4102
|
}
|
|
4092
4103
|
) }) }),
|
|
4093
4104
|
((t == null ? void 0 : t.type) === "component" || (t == null ? void 0 : t.type) === void 0) && /* @__PURE__ */ e(
|
|
4094
|
-
|
|
4105
|
+
ui,
|
|
4095
4106
|
{
|
|
4096
4107
|
options: [
|
|
4097
4108
|
{ value: "single", label: "Single Visual" },
|
|
@@ -4139,13 +4150,13 @@ function ui() {
|
|
|
4139
4150
|
}
|
|
4140
4151
|
function Ee() {
|
|
4141
4152
|
const [t, s] = H([]);
|
|
4142
|
-
|
|
4153
|
+
h(
|
|
4143
4154
|
(m) => m.card.cfg
|
|
4144
4155
|
);
|
|
4145
|
-
const a =
|
|
4156
|
+
const a = h((m) => m.card.preferences), { setCardCfg: l, setFilterOnClickColumnIndex: i, setCardPreferences: c } = h((m) => m.actions), o = h(
|
|
4146
4157
|
(m) => m.queryResultColumns
|
|
4147
4158
|
);
|
|
4148
|
-
|
|
4159
|
+
h(
|
|
4149
4160
|
(m) => {
|
|
4150
4161
|
var b;
|
|
4151
4162
|
return (b = m.card.preferences) == null ? void 0 : b.filterOnClickColumnIndex;
|
|
@@ -4182,7 +4193,7 @@ function Ee() {
|
|
|
4182
4193
|
return g[m] = !1, g;
|
|
4183
4194
|
}));
|
|
4184
4195
|
}
|
|
4185
|
-
function
|
|
4196
|
+
function u(m, b) {
|
|
4186
4197
|
var r;
|
|
4187
4198
|
const x = (r = a == null ? void 0 : a.onClickFilter) == null ? void 0 : r.map((y) => y.columnIndex === m ? {
|
|
4188
4199
|
...y,
|
|
@@ -4197,10 +4208,10 @@ function Ee() {
|
|
|
4197
4208
|
var b, x, r, y;
|
|
4198
4209
|
if (t != null && t[m] || (x = (b = a == null ? void 0 : a.onClickFilter) == null ? void 0 : b.find((g) => g.columnIndex === m)) != null && x.expression)
|
|
4199
4210
|
return /* @__PURE__ */ e(
|
|
4200
|
-
|
|
4211
|
+
he,
|
|
4201
4212
|
{
|
|
4202
4213
|
value: (y = (r = a == null ? void 0 : a.onClickFilter) == null ? void 0 : r.find((g) => g.columnIndex === m)) == null ? void 0 : y.expression,
|
|
4203
|
-
onChange: (g) =>
|
|
4214
|
+
onChange: (g) => u(m, g),
|
|
4204
4215
|
type: "text",
|
|
4205
4216
|
className: "h-9 w-full font-mono text-xs focus-visible:ring-0 focus-visible:ring-ring focus-visible:ring-offset-0",
|
|
4206
4217
|
placeholder: "Expression"
|
|
@@ -4257,10 +4268,10 @@ function Ee() {
|
|
|
4257
4268
|
] });
|
|
4258
4269
|
}
|
|
4259
4270
|
function ft() {
|
|
4260
|
-
var o, d,
|
|
4261
|
-
const t =
|
|
4271
|
+
var o, d, u;
|
|
4272
|
+
const t = h((f) => f.card.preferences), s = h(
|
|
4262
4273
|
(f) => f.card.cfg
|
|
4263
|
-
), { setCardCfg: a, setCardPreferences: l, setChartOrientation: i } =
|
|
4274
|
+
), { setCardCfg: a, setCardPreferences: l, setChartOrientation: i } = h((f) => f.actions);
|
|
4264
4275
|
(o = s == null ? void 0 : s.options) != null && o.indexAxis;
|
|
4265
4276
|
function c(f) {
|
|
4266
4277
|
i(f);
|
|
@@ -4268,7 +4279,7 @@ function ft() {
|
|
|
4268
4279
|
return /* @__PURE__ */ n(
|
|
4269
4280
|
pt,
|
|
4270
4281
|
{
|
|
4271
|
-
value: ((d = t == null ? void 0 : t.chartOptions) == null ? void 0 : d.indexAxis) || ((
|
|
4282
|
+
value: ((d = t == null ? void 0 : t.chartOptions) == null ? void 0 : d.indexAxis) || ((u = s == null ? void 0 : s.options) == null ? void 0 : u.indexAxis) || "x",
|
|
4272
4283
|
onValueChange: c,
|
|
4273
4284
|
className: "flex gap-3",
|
|
4274
4285
|
defaultValue: "x",
|
|
@@ -4293,28 +4304,28 @@ function ta(t, s) {
|
|
|
4293
4304
|
}
|
|
4294
4305
|
function an() {
|
|
4295
4306
|
var V, N, M, P, Z, X;
|
|
4296
|
-
const [t, s] = H(!1), a =
|
|
4307
|
+
const [t, s] = H(!1), a = h((j) => {
|
|
4297
4308
|
var z;
|
|
4298
4309
|
return (z = j.card) == null ? void 0 : z.preferences;
|
|
4299
|
-
}), l =
|
|
4310
|
+
}), l = h((j) => {
|
|
4300
4311
|
var z;
|
|
4301
4312
|
return (z = j.card) == null ? void 0 : z.cfg;
|
|
4302
4313
|
}), i = Ia(a, l), [c, o] = H(
|
|
4303
4314
|
ta(a)
|
|
4304
|
-
), [d,
|
|
4315
|
+
), [d, u] = H(
|
|
4305
4316
|
((M = (N = (V = a == null ? void 0 : a.chartOptions) == null ? void 0 : V.scales) == null ? void 0 : N[i]) == null ? void 0 : M.min) || ""
|
|
4306
4317
|
), [f, m] = H(
|
|
4307
4318
|
((X = (Z = (P = a == null ? void 0 : a.chartOptions) == null ? void 0 : P.scales) == null ? void 0 : Z[i]) == null ? void 0 : X.max) || ""
|
|
4308
|
-
), [b, x] = H(d || f ? "custom" : "auto"), [r, y] = H(""), [g, C] = H(0), [v, D] = H(""), [S, O] = H(""), [q, F] = H(""), G =
|
|
4319
|
+
), [b, x] = H(d || f ? "custom" : "auto"), [r, y] = H(""), [g, C] = H(0), [v, D] = H(""), [S, O] = H(""), [q, F] = H(""), G = h(
|
|
4309
4320
|
(j) => j.actions.setCardPreferences
|
|
4310
|
-
), { updateCardInFrame: _ } = ie(), B =
|
|
4321
|
+
), { updateCardInFrame: _ } = ie(), B = h((j) => j.card), p = h((j) => {
|
|
4311
4322
|
var z;
|
|
4312
4323
|
return (z = j.card) == null ? void 0 : z.type;
|
|
4313
4324
|
}), E = ["pie", "doughnut", "polarArea"].includes(p);
|
|
4314
4325
|
de(() => {
|
|
4315
|
-
var j, z,
|
|
4316
|
-
o(ta(a)),
|
|
4317
|
-
((
|
|
4326
|
+
var j, z, ue, k, J, ne, oe, Se, xe, Y, ce, I, re, ye;
|
|
4327
|
+
o(ta(a)), u(
|
|
4328
|
+
((ue = (z = (j = a == null ? void 0 : a.chartOptions) == null ? void 0 : j.scales) == null ? void 0 : z[i]) == null ? void 0 : ue.min) === 0 ? 0 : ""
|
|
4318
4329
|
), m(((ne = (J = (k = a == null ? void 0 : a.chartOptions) == null ? void 0 : k.scales) == null ? void 0 : J[i]) == null ? void 0 : ne.max) || ""), y(
|
|
4319
4330
|
((Y = (xe = (Se = (oe = a == null ? void 0 : a.chartOptions) == null ? void 0 : oe.scales) == null ? void 0 : Se[i]) == null ? void 0 : xe.ticks) == null ? void 0 : Y.stepSize) || ""
|
|
4320
4331
|
), C(((ce = a == null ? void 0 : a.numberAxisFormat) == null ? void 0 : ce.decimalPlaces) || 0), D(((I = a == null ? void 0 : a.numberAxisFormat) == null ? void 0 : I.suffix) || ""), O(((re = a == null ? void 0 : a.numberAxisFormat) == null ? void 0 : re.currency) || ""), F(((ye = a == null ? void 0 : a.numberAxisFormat) == null ? void 0 : ye.locale) || "");
|
|
@@ -4375,7 +4386,7 @@ function an() {
|
|
|
4375
4386
|
/* @__PURE__ */ n("div", { className: "grid grid-cols-9 items-center gap-2", children: [
|
|
4376
4387
|
/* @__PURE__ */ e($, { className: "col-span-3", htmlFor: "format", children: "Decimals" }),
|
|
4377
4388
|
/* @__PURE__ */ e(
|
|
4378
|
-
|
|
4389
|
+
he,
|
|
4379
4390
|
{
|
|
4380
4391
|
value: g,
|
|
4381
4392
|
onChange: (z) => C(Number(z.target.value)),
|
|
@@ -4391,16 +4402,16 @@ function an() {
|
|
|
4391
4402
|
/* @__PURE__ */ n("div", { className: "grid grid-cols-3 items-center gap-2", children: [
|
|
4392
4403
|
/* @__PURE__ */ e($, { htmlFor: "range", children: "Range" }),
|
|
4393
4404
|
/* @__PURE__ */ e(
|
|
4394
|
-
|
|
4405
|
+
he,
|
|
4395
4406
|
{
|
|
4396
4407
|
id: "min",
|
|
4397
4408
|
value: d,
|
|
4398
|
-
onChange: (j) =>
|
|
4409
|
+
onChange: (j) => u((z) => W(z, j.target.value)),
|
|
4399
4410
|
className: `col-span-1 h-8 w-full ${et}`
|
|
4400
4411
|
}
|
|
4401
4412
|
),
|
|
4402
4413
|
/* @__PURE__ */ e(
|
|
4403
|
-
|
|
4414
|
+
he,
|
|
4404
4415
|
{
|
|
4405
4416
|
value: f,
|
|
4406
4417
|
onChange: (j) => m((z) => W(z, j.target.value)),
|
|
@@ -4412,7 +4423,7 @@ function an() {
|
|
|
4412
4423
|
/* @__PURE__ */ n("div", { className: "grid grid-cols-3 items-center gap-2", children: [
|
|
4413
4424
|
/* @__PURE__ */ e($, { htmlFor: "step-size", children: "Step Size" }),
|
|
4414
4425
|
/* @__PURE__ */ e(
|
|
4415
|
-
|
|
4426
|
+
he,
|
|
4416
4427
|
{
|
|
4417
4428
|
value: r,
|
|
4418
4429
|
onChange: (j) => y((z) => W(z, j.target.value)),
|
|
@@ -4454,11 +4465,11 @@ function an() {
|
|
|
4454
4465
|
}
|
|
4455
4466
|
};
|
|
4456
4467
|
console.log(z), G(z);
|
|
4457
|
-
const
|
|
4468
|
+
const ue = {
|
|
4458
4469
|
...B,
|
|
4459
4470
|
preferences: z
|
|
4460
4471
|
};
|
|
4461
|
-
_(
|
|
4472
|
+
_(ue);
|
|
4462
4473
|
}
|
|
4463
4474
|
return /* @__PURE__ */ n(Qe, { onOpenChange: (j) => s(j), children: [
|
|
4464
4475
|
/* @__PURE__ */ e(Ze, { asChild: !0, children: /* @__PURE__ */ e(ys, { className: "size-4 cursor-pointer text-muted-foreground hover:text-foreground" }) }),
|
|
@@ -4529,23 +4540,23 @@ function an() {
|
|
|
4529
4540
|
}
|
|
4530
4541
|
function mi({ idx: t }) {
|
|
4531
4542
|
var d;
|
|
4532
|
-
const s =
|
|
4543
|
+
const s = h((u) => {
|
|
4533
4544
|
var f;
|
|
4534
|
-
return (f =
|
|
4535
|
-
}), a =
|
|
4536
|
-
(
|
|
4545
|
+
return (f = u.card) == null ? void 0 : f.preferences;
|
|
4546
|
+
}), a = h(
|
|
4547
|
+
(u) => {
|
|
4537
4548
|
var f;
|
|
4538
|
-
return (f =
|
|
4549
|
+
return (f = u.card.preferences) == null ? void 0 : f.datasetOptions;
|
|
4539
4550
|
}
|
|
4540
|
-
), l =
|
|
4541
|
-
(
|
|
4542
|
-
), i = (d = s == null ? void 0 : s.chartOptions) == null ? void 0 : d.indexAxis, c = a == null ? void 0 : a.find((
|
|
4543
|
-
function o(
|
|
4544
|
-
(
|
|
4551
|
+
), l = h(
|
|
4552
|
+
(u) => u.actions.setCardPreferences
|
|
4553
|
+
), i = (d = s == null ? void 0 : s.chartOptions) == null ? void 0 : d.indexAxis, c = a == null ? void 0 : a.find((u) => u.idx === t);
|
|
4554
|
+
function o(u, f) {
|
|
4555
|
+
(u === "end" || u === "start") && xs(vs());
|
|
4545
4556
|
const m = {
|
|
4546
|
-
display:
|
|
4547
|
-
align:
|
|
4548
|
-
anchor:
|
|
4557
|
+
display: u !== "none",
|
|
4558
|
+
align: u,
|
|
4559
|
+
anchor: u,
|
|
4549
4560
|
clamp: !0
|
|
4550
4561
|
};
|
|
4551
4562
|
if (!c)
|
|
@@ -4639,7 +4650,7 @@ function mi({ idx: t }) {
|
|
|
4639
4650
|
] });
|
|
4640
4651
|
}
|
|
4641
4652
|
function nn() {
|
|
4642
|
-
const t =
|
|
4653
|
+
const t = h((f) => f.card), s = h(
|
|
4643
4654
|
(f) => {
|
|
4644
4655
|
var m, b, x;
|
|
4645
4656
|
return (x = (b = (m = f == null ? void 0 : f.card) == null ? void 0 : m.preferences) == null ? void 0 : b.chartOptions) == null ? void 0 : x.indexAxis;
|
|
@@ -4649,15 +4660,15 @@ function nn() {
|
|
|
4649
4660
|
metricKeys: o,
|
|
4650
4661
|
dimensionKeys: d
|
|
4651
4662
|
} = Nt((a == null ? void 0 : a.records) || []);
|
|
4652
|
-
let
|
|
4663
|
+
let u = o;
|
|
4653
4664
|
if (["stackedBar", "stackedLine"].includes(t.type)) {
|
|
4654
4665
|
const f = Ns({
|
|
4655
4666
|
dataArray: (a == null ? void 0 : a.records) || [],
|
|
4656
4667
|
groupKey: d[0],
|
|
4657
4668
|
pivotKey: d[1],
|
|
4658
|
-
valueKey:
|
|
4669
|
+
valueKey: u[0]
|
|
4659
4670
|
}), { metricKeys: m } = Nt(f);
|
|
4660
|
-
|
|
4671
|
+
u = m;
|
|
4661
4672
|
}
|
|
4662
4673
|
return c.length === 0 ? null : /* @__PURE__ */ n("div", { className: "space-y-4", children: [
|
|
4663
4674
|
/* @__PURE__ */ n("div", { className: "space-y-2", children: [
|
|
@@ -4669,7 +4680,7 @@ function nn() {
|
|
|
4669
4680
|
/* @__PURE__ */ e($, { children: i }),
|
|
4670
4681
|
/* @__PURE__ */ e(an, {})
|
|
4671
4682
|
] }),
|
|
4672
|
-
/* @__PURE__ */ e("div", { className: "my-1 max-h-[125px] space-y-1 overflow-y-auto", children:
|
|
4683
|
+
/* @__PURE__ */ e("div", { className: "my-1 max-h-[125px] space-y-1 overflow-y-auto", children: u.map((f, m) => /* @__PURE__ */ e(pi, { col: f, idx: m }, f)) })
|
|
4673
4684
|
] })
|
|
4674
4685
|
] });
|
|
4675
4686
|
}
|
|
@@ -4677,15 +4688,15 @@ function sn(t, s = 30) {
|
|
|
4677
4688
|
return t.length > s ? t.slice(0, s) + "..." : t;
|
|
4678
4689
|
}
|
|
4679
4690
|
function pi({ col: t, idx: s }) {
|
|
4680
|
-
const a =
|
|
4681
|
-
var
|
|
4682
|
-
return (
|
|
4683
|
-
}), l =
|
|
4691
|
+
const a = h((d) => {
|
|
4692
|
+
var u;
|
|
4693
|
+
return (u = d.card) == null ? void 0 : u.preferences;
|
|
4694
|
+
}), l = h(
|
|
4684
4695
|
(d) => {
|
|
4685
|
-
var
|
|
4686
|
-
return (
|
|
4696
|
+
var u;
|
|
4697
|
+
return (u = d.card.preferences) == null ? void 0 : u.datasetOptions;
|
|
4687
4698
|
}
|
|
4688
|
-
), i = l == null ? void 0 : l.find((d) => d.idx === s), { setCardPreferences: c } =
|
|
4699
|
+
), i = l == null ? void 0 : l.find((d) => d.idx === s), { setCardPreferences: c } = h((d) => d.actions);
|
|
4689
4700
|
function o(d) {
|
|
4690
4701
|
if (!i)
|
|
4691
4702
|
c({
|
|
@@ -4700,10 +4711,10 @@ function pi({ col: t, idx: s }) {
|
|
|
4700
4711
|
]
|
|
4701
4712
|
});
|
|
4702
4713
|
else {
|
|
4703
|
-
const
|
|
4704
|
-
|
|
4714
|
+
const u = { ...i };
|
|
4715
|
+
u.type = d === "area" ? "line" : d, u.fill = d === "area" ? "origin" : "";
|
|
4705
4716
|
const f = l == null ? void 0 : l.map(
|
|
4706
|
-
(m) => m.idx === s ?
|
|
4717
|
+
(m) => m.idx === s ? u : m
|
|
4707
4718
|
);
|
|
4708
4719
|
c({
|
|
4709
4720
|
...a,
|
|
@@ -4740,7 +4751,7 @@ function pi({ col: t, idx: s }) {
|
|
|
4740
4751
|
] });
|
|
4741
4752
|
}
|
|
4742
4753
|
function ln() {
|
|
4743
|
-
const t =
|
|
4754
|
+
const t = h((r) => r.selectedConnectionId), s = h((r) => r.selectedDatamodelId), a = h((r) => r.selectedDatabaseName), l = h((r) => r.selectedSchemaName), i = h((r) => r.selectedTableName), c = T((r) => r.dashboard.filters) || [], o = T((r) => r.actions.addFilter), d = T((r) => r.actions.removeFilter), { removeFilterValues: u } = Je(), { modelItems: f, tableName: m, connectionType: b } = Ae();
|
|
4744
4755
|
function x(r, y = "dashboard") {
|
|
4745
4756
|
var G;
|
|
4746
4757
|
const g = ve(r.column_name), C = ve(a || ""), v = ve(l || ""), D = ve(m);
|
|
@@ -4757,7 +4768,7 @@ function ln() {
|
|
|
4757
4768
|
(_) => _.column === O && _.table === D && (_.database === C || _.database === a)
|
|
4758
4769
|
);
|
|
4759
4770
|
if (F)
|
|
4760
|
-
|
|
4771
|
+
u(F.id), d(F.id);
|
|
4761
4772
|
else {
|
|
4762
4773
|
const _ = Be();
|
|
4763
4774
|
return m === "api" && t ? (o({
|
|
@@ -4804,10 +4815,10 @@ function ln() {
|
|
|
4804
4815
|
function Re() {
|
|
4805
4816
|
const t = T(
|
|
4806
4817
|
(d) => d.dashboard.filters
|
|
4807
|
-
), s =
|
|
4818
|
+
), s = h((d) => d.frame), { setFrame: a } = ie(), { columns: l } = Ae(), { assignFilter: i } = ln();
|
|
4808
4819
|
function c(d) {
|
|
4809
|
-
const
|
|
4810
|
-
a({ ...s, filterId:
|
|
4820
|
+
const u = i(d, "frame");
|
|
4821
|
+
a({ ...s, filterId: u });
|
|
4811
4822
|
}
|
|
4812
4823
|
const o = t == null ? void 0 : t.find((d) => d.id === s.filterId);
|
|
4813
4824
|
return /* @__PURE__ */ n("div", { className: "space-y-3", children: [
|
|
@@ -4845,8 +4856,8 @@ function fi({
|
|
|
4845
4856
|
Ts,
|
|
4846
4857
|
{
|
|
4847
4858
|
value: d.column_name,
|
|
4848
|
-
onSelect: (
|
|
4849
|
-
const f =
|
|
4859
|
+
onSelect: (u) => {
|
|
4860
|
+
const f = u === i ? "" : u;
|
|
4850
4861
|
c(f), l(!1), f && s(d);
|
|
4851
4862
|
},
|
|
4852
4863
|
children: [
|
|
@@ -4915,12 +4926,12 @@ function gi({
|
|
|
4915
4926
|
}
|
|
4916
4927
|
function qt() {
|
|
4917
4928
|
var i, c, o;
|
|
4918
|
-
const t =
|
|
4929
|
+
const t = h(
|
|
4919
4930
|
(d) => d.card.cfg
|
|
4920
|
-
), s =
|
|
4931
|
+
), s = h((d) => d.actions.setCardCfg), a = h((d) => d.card.type);
|
|
4921
4932
|
function l(d) {
|
|
4922
4933
|
var m;
|
|
4923
|
-
const
|
|
4934
|
+
const u = {
|
|
4924
4935
|
datalabels: {
|
|
4925
4936
|
display: d !== "none",
|
|
4926
4937
|
align: d,
|
|
@@ -4933,7 +4944,7 @@ function qt() {
|
|
|
4933
4944
|
...t == null ? void 0 : t.options,
|
|
4934
4945
|
plugins: {
|
|
4935
4946
|
...(m = t == null ? void 0 : t.options) == null ? void 0 : m.plugins,
|
|
4936
|
-
...
|
|
4947
|
+
...u
|
|
4937
4948
|
}
|
|
4938
4949
|
}
|
|
4939
4950
|
};
|
|
@@ -5035,7 +5046,7 @@ const bi = {
|
|
|
5035
5046
|
]
|
|
5036
5047
|
};
|
|
5037
5048
|
function vi() {
|
|
5038
|
-
const t =
|
|
5049
|
+
const t = h((s) => s.card.type);
|
|
5039
5050
|
return /* @__PURE__ */ n("div", { className: "space-y-6 p-6", children: [
|
|
5040
5051
|
/* @__PURE__ */ e(
|
|
5041
5052
|
Fe,
|
|
@@ -5152,38 +5163,38 @@ function Ni(t) {
|
|
|
5152
5163
|
] }) });
|
|
5153
5164
|
}
|
|
5154
5165
|
function Ci() {
|
|
5155
|
-
var
|
|
5156
|
-
const t =
|
|
5166
|
+
var u, f, m, b, x;
|
|
5167
|
+
const t = h((r) => r.card.preferences), s = h(
|
|
5157
5168
|
(r) => r.actions.setCardPreferences
|
|
5158
|
-
), a =
|
|
5169
|
+
), a = h(
|
|
5159
5170
|
(r) => r.actions.setNumberFormat
|
|
5160
5171
|
);
|
|
5161
|
-
|
|
5172
|
+
h(
|
|
5162
5173
|
(r) => {
|
|
5163
5174
|
var y, g;
|
|
5164
5175
|
return (g = (y = r.card.preferences) == null ? void 0 : y.formatNumber) == null ? void 0 : g.decimalPlaces;
|
|
5165
5176
|
}
|
|
5166
5177
|
);
|
|
5167
|
-
const l =
|
|
5178
|
+
const l = h(
|
|
5168
5179
|
(r) => {
|
|
5169
5180
|
var y, g;
|
|
5170
5181
|
return (g = (y = r.card.preferences) == null ? void 0 : y.formatNumber) == null ? void 0 : g.locale;
|
|
5171
5182
|
}
|
|
5172
|
-
), i =
|
|
5183
|
+
), i = h(
|
|
5173
5184
|
(r) => {
|
|
5174
5185
|
var y, g;
|
|
5175
5186
|
return (g = (y = r.card.preferences) == null ? void 0 : y.formatNumber) == null ? void 0 : g.currency;
|
|
5176
5187
|
}
|
|
5177
5188
|
);
|
|
5178
|
-
|
|
5189
|
+
h(
|
|
5179
5190
|
(r) => r.actions.setFilterOnClickField
|
|
5180
5191
|
);
|
|
5181
|
-
const c =
|
|
5192
|
+
const c = h(
|
|
5182
5193
|
(r) => {
|
|
5183
5194
|
var y, g;
|
|
5184
5195
|
return (g = (y = r.card.preferences) == null ? void 0 : y.formatNumber) == null ? void 0 : g.colorRanges;
|
|
5185
5196
|
}
|
|
5186
|
-
) || [], o =
|
|
5197
|
+
) || [], o = h(
|
|
5187
5198
|
(r) => r.actions.setColorRanges
|
|
5188
5199
|
), d = [...new Set(ot.map((r) => r.currency))];
|
|
5189
5200
|
return /* @__PURE__ */ n("div", { children: [
|
|
@@ -5191,7 +5202,7 @@ function Ci() {
|
|
|
5191
5202
|
/* @__PURE__ */ e(
|
|
5192
5203
|
Ft,
|
|
5193
5204
|
{
|
|
5194
|
-
checked: !!((
|
|
5205
|
+
checked: !!((u = t == null ? void 0 : t.formatNumber) != null && u.enabled),
|
|
5195
5206
|
onCheckedChange: (r) => {
|
|
5196
5207
|
s({
|
|
5197
5208
|
...t,
|
|
@@ -5287,7 +5298,7 @@ function Ci() {
|
|
|
5287
5298
|
/* @__PURE__ */ n("div", { className: "w-full space-y-1", children: [
|
|
5288
5299
|
/* @__PURE__ */ e($, { children: "Suffix" }),
|
|
5289
5300
|
/* @__PURE__ */ e(
|
|
5290
|
-
|
|
5301
|
+
he,
|
|
5291
5302
|
{
|
|
5292
5303
|
value: ((x = t == null ? void 0 : t.formatNumber) == null ? void 0 : x.suffix) || "",
|
|
5293
5304
|
className: "h-8 font-mono text-xs focus-visible:ring-0 focus-visible:ring-ring focus-visible:ring-offset-0",
|
|
@@ -5449,8 +5460,8 @@ const wi = [
|
|
|
5449
5460
|
value: t
|
|
5450
5461
|
}));
|
|
5451
5462
|
function Mi() {
|
|
5452
|
-
var
|
|
5453
|
-
const t =
|
|
5463
|
+
var u, f, m, b, x, r, y, g, C, v, D, S, O, q, F, G, _, B;
|
|
5464
|
+
const t = h((p) => p.card), s = (f = (u = t == null ? void 0 : t.preferences) == null ? void 0 : u.mapVisualOptions) == null ? void 0 : f.topoJsonUrl, [a, l] = H(
|
|
5454
5465
|
((b = (m = t == null ? void 0 : t.preferences) == null ? void 0 : m.mapVisualOptions) == null ? void 0 : b.customTopoJsonUrl) || ""
|
|
5455
5466
|
), { setCardPreferences: i } = ie(), { data: c } = Lt(t), o = Object.keys((c == null ? void 0 : c.objects) || {}).map((p) => ({
|
|
5456
5467
|
label: p,
|
|
@@ -5492,7 +5503,7 @@ function Mi() {
|
|
|
5492
5503
|
}
|
|
5493
5504
|
),
|
|
5494
5505
|
s === "custom" && /* @__PURE__ */ e(
|
|
5495
|
-
|
|
5506
|
+
he,
|
|
5496
5507
|
{
|
|
5497
5508
|
onChange: (p) => {
|
|
5498
5509
|
l(p.target.value);
|
|
@@ -5584,7 +5595,7 @@ function Mi() {
|
|
|
5584
5595
|
/* @__PURE__ */ e(Oe, { className: "my-4" }),
|
|
5585
5596
|
/* @__PURE__ */ e(Ge, { className: "", summary: "Scale Options", children: /* @__PURE__ */ n("div", { className: "flex items-center gap-3", children: [
|
|
5586
5597
|
/* @__PURE__ */ e(
|
|
5587
|
-
|
|
5598
|
+
he,
|
|
5588
5599
|
{
|
|
5589
5600
|
className: `h-9 w-full ${Pe}`,
|
|
5590
5601
|
type: "number",
|
|
@@ -5604,7 +5615,7 @@ function Mi() {
|
|
|
5604
5615
|
),
|
|
5605
5616
|
/* @__PURE__ */ e($, { children: "X" }),
|
|
5606
5617
|
/* @__PURE__ */ e(
|
|
5607
|
-
|
|
5618
|
+
he,
|
|
5608
5619
|
{
|
|
5609
5620
|
className: `h-9 w-full ${Pe}`,
|
|
5610
5621
|
type: "number",
|
|
@@ -5627,7 +5638,7 @@ function Mi() {
|
|
|
5627
5638
|
),
|
|
5628
5639
|
/* @__PURE__ */ e($, { children: "Y" }),
|
|
5629
5640
|
/* @__PURE__ */ e(
|
|
5630
|
-
|
|
5641
|
+
he,
|
|
5631
5642
|
{
|
|
5632
5643
|
className: `h-9 w-full ${Pe}`,
|
|
5633
5644
|
type: "number",
|
|
@@ -5655,7 +5666,7 @@ function Mi() {
|
|
|
5655
5666
|
}
|
|
5656
5667
|
function Ii() {
|
|
5657
5668
|
var l;
|
|
5658
|
-
const t =
|
|
5669
|
+
const t = h((i) => i.card.preferences), { setCardPreferences: s } = h((i) => i.actions);
|
|
5659
5670
|
function a(i) {
|
|
5660
5671
|
s({
|
|
5661
5672
|
...t,
|
|
@@ -5733,7 +5744,7 @@ function tt({
|
|
|
5733
5744
|
] }) });
|
|
5734
5745
|
}
|
|
5735
5746
|
function Ti() {
|
|
5736
|
-
const t =
|
|
5747
|
+
const t = h(
|
|
5737
5748
|
(l) => {
|
|
5738
5749
|
var i, c;
|
|
5739
5750
|
return (c = (i = l == null ? void 0 : l.card) == null ? void 0 : i.preferences) == null ? void 0 : c.sortChart;
|
|
@@ -5816,10 +5827,10 @@ function Di({
|
|
|
5816
5827
|
cardType: t = "table"
|
|
5817
5828
|
}) {
|
|
5818
5829
|
console.log("cardType", t);
|
|
5819
|
-
const s =
|
|
5830
|
+
const s = h((i) => {
|
|
5820
5831
|
var c;
|
|
5821
5832
|
return (c = i.card) == null ? void 0 : c.preferences;
|
|
5822
|
-
}), a =
|
|
5833
|
+
}), a = h(
|
|
5823
5834
|
(i) => i.actions.setCardPreferences
|
|
5824
5835
|
);
|
|
5825
5836
|
return /* @__PURE__ */ n("div", { className: "space-y-6 px-6 py-2", children: [
|
|
@@ -5898,7 +5909,7 @@ const zi = /* @__PURE__ */ n("div", { className: "space-y-4 font-mono text-xs",
|
|
|
5898
5909
|
] })
|
|
5899
5910
|
] });
|
|
5900
5911
|
function Ai() {
|
|
5901
|
-
const t =
|
|
5912
|
+
const t = h((a) => a.card.type);
|
|
5902
5913
|
function s(a) {
|
|
5903
5914
|
switch (a) {
|
|
5904
5915
|
case "stackedBar":
|
|
@@ -5935,7 +5946,7 @@ function Ai() {
|
|
|
5935
5946
|
case "map":
|
|
5936
5947
|
return /* @__PURE__ */ e(Mi, {});
|
|
5937
5948
|
case "custom":
|
|
5938
|
-
return /* @__PURE__ */ e(
|
|
5949
|
+
return /* @__PURE__ */ e(hi, {});
|
|
5939
5950
|
default:
|
|
5940
5951
|
return /* @__PURE__ */ e(vi, {});
|
|
5941
5952
|
}
|
|
@@ -5946,7 +5957,7 @@ function Ai() {
|
|
|
5946
5957
|
] });
|
|
5947
5958
|
}
|
|
5948
5959
|
function Ei() {
|
|
5949
|
-
const t =
|
|
5960
|
+
const t = h((s) => s.isShowingVisual);
|
|
5950
5961
|
return /* @__PURE__ */ n(
|
|
5951
5962
|
lt,
|
|
5952
5963
|
{
|
|
@@ -5993,7 +6004,7 @@ function Ei() {
|
|
|
5993
6004
|
}
|
|
5994
6005
|
function Vi({ authToken: t, onSave: s, onClose: a }) {
|
|
5995
6006
|
T((o) => o.themeStyle);
|
|
5996
|
-
const l =
|
|
6007
|
+
const l = h((o) => o.actions.setOnSave), i = h((o) => o.actions.setOnClose), c = T((o) => o.actions.setAuthToken);
|
|
5997
6008
|
return de(() => {
|
|
5998
6009
|
s && l(s), a && i(a);
|
|
5999
6010
|
}, [s, l, a, i]), de(() => {
|
|
@@ -6035,7 +6046,7 @@ function qi() {
|
|
|
6035
6046
|
);
|
|
6036
6047
|
}
|
|
6037
6048
|
function ji() {
|
|
6038
|
-
const t =
|
|
6049
|
+
const t = h((c) => c.selectedDatabaseName), s = h((c) => c.selectedTableName), a = T((c) => c.dashboard.filters) || [], { columns: l } = Ae(), { assignFilter: i } = ln();
|
|
6039
6050
|
return /* @__PURE__ */ e(Ie, { className: "flex-1 basis-0 flex-col px-3", children: l == null ? void 0 : l.map((c) => {
|
|
6040
6051
|
const o = a == null ? void 0 : a.find(
|
|
6041
6052
|
(d) => d.column === ve(c.column_name) && d.table === s && d.database === t
|
|
@@ -6073,7 +6084,7 @@ function Ri() {
|
|
|
6073
6084
|
onClick: () => t(!1),
|
|
6074
6085
|
className: "h-7 w-7 p-0",
|
|
6075
6086
|
variant: "ghost",
|
|
6076
|
-
children: /* @__PURE__ */ e(
|
|
6087
|
+
children: /* @__PURE__ */ e(ut, {})
|
|
6077
6088
|
}
|
|
6078
6089
|
)
|
|
6079
6090
|
] }),
|
|
@@ -6245,6 +6256,6 @@ export {
|
|
|
6245
6256
|
sr as useDateFilterHook,
|
|
6246
6257
|
ie as useEditorActions,
|
|
6247
6258
|
Ae as useEditorAside,
|
|
6248
|
-
|
|
6259
|
+
h as useEditorStore,
|
|
6249
6260
|
lr as useTextFilterHook
|
|
6250
6261
|
};
|