react-semaphor 0.0.331 → 0.0.332
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/B4MFY5CR-D6VLDens.js +1200 -0
- package/dist/chunks/B4MFY5CR-DSyPShbg.js +9104 -0
- package/dist/chunks/HO4MOOFI-PCPf0V7Q.js +33 -0
- package/dist/chunks/HO4MOOFI-XrF2yHxb.js +1 -0
- package/dist/chunks/HUY7CZI3-BZLAkw5U.js +1 -0
- package/dist/chunks/HUY7CZI3-DT2fc5Um.js +42 -0
- package/dist/chunks/index-B0j1CW59.js +392 -0
- package/dist/chunks/{index-Balo3fZW.js → index-BGmqxQsB.js} +364 -364
- package/dist/chunks/index-BrrtYt6g.js +240 -0
- package/dist/chunks/{index-C2PdR3St.js → index-HSAFthpc.js} +17549 -15266
- package/dist/chunks/{lucide-react-B-QrWK14.js → lucide-react-DWPc-x9m.js} +3 -3
- package/dist/chunks/{lucide-react-3Uze18Bl.js → lucide-react-Dwcz19Mq.js} +1 -1
- package/dist/dashboard/index.cjs +1 -1
- package/dist/dashboard/index.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +19 -19
- 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-CIKx2XGC.js +0 -240
- package/dist/chunks/index-DBTi9K8K.js +0 -392
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { X as q, ao as Os, ap as z, aq as Is, ar as Oe, as as e, at as Fs, au as Ds, av as O, ae as Ls, aw as Ms, ax as Ts, ay as Es, az as As, aA as _, aB as re, aC as la, aD as ra, aE as ia, aF as oa, aG as st, aH as at, aI as tt, aJ as Ks, aK as K, aL as Je, a5 as nt, aM as m, aN as lt, ac as ca, a6 as da, aO as Ke, aP as We, aQ as ua, aR as rt, aS as ma, aT as me, aU as he, aV as xe, aW as pe, aX as Se, aY as fe, aZ as Y, aj as Vs, a_ as qs, a$ as Rs, b0 as _s, b1 as ha, b2 as xa, b3 as de, b4 as it, b5 as ot, b6 as pa, b7 as ct, Z as dt, b8 as ut, b9 as fa, Y as mt, ba as ze, bb as ht, bc as Ye, bd as ga, be as Ns, bf as Ce, bg as De, bh as we, bi as ja, bj as xt, bk as pt, bl as ft, bm as gt, a9 as jt, bn as bt, bo as yt, bp as vt, bq as Re, br as Ss, bs as Ct, _ as Nt, bt as Ge, bu as cs, bv as Ne, bw as ds, bx as St, by as wt, bz as kt, bA as zt, bB as Ot, bC as Cs, bD as It, bE as Ws, bF as Ft, bG as Ys, bH as Dt, bI as Lt, bJ as Mt, bK as Tt, bL as ba, bM as ie, bN as Et, bO as Hs, bP as ya, bQ as At, bR as Vt, bS as rs, bT as qt, bU as Rt, bV as _t, bW as Ht, ak as $t, bX as Pt, bY as Bt, ai as Ut, bZ as xs, b_ as va, b$ as Ca, c0 as Na, c1 as is, c2 as Sa, c3 as os, c4 as Xs, c5 as Gt, c6 as Qt, c7 as ps, c8 as fs, c9 as gs, ca as Jt, am as wa, cb as Kt, cc as Wt, cd as Yt, ce as js, cf as Le, a3 as Xt, cg as Ue, ch as $s, ci as ka, cj as Zt, ck as en, cl as us, cm as sn, cn as an, co as tn, cp as Zs, cq as nn, cr as ln, cs as rn, ct as on, cu as cn, cv as dn, cw as un, cx as mn, cy as Me, cz as G, cA as Q, cB as Ps, cC as J, cD as hn, cE as za, cF as xn, cG as pn, cH as fn, cI as gn, cJ as jn, cK as bn, cL as yn, cM as vn, cN as Cn } from "./index-HSAFthpc.js";
|
|
2
2
|
import * as ea from "react";
|
|
3
3
|
import ke, { useState as V, useMemo as ws, useEffect as se, useRef as ks, useCallback as Nn, Suspense as Sn } from "react";
|
|
4
4
|
import "react-dom";
|
|
@@ -179,7 +179,7 @@ const Dn = q("EyeClosed", [
|
|
|
179
179
|
* This source code is licensed under the ISC license.
|
|
180
180
|
* See the LICENSE file in the root directory of this source tree.
|
|
181
181
|
*/
|
|
182
|
-
const
|
|
182
|
+
const Ln = q("Eye", [
|
|
183
183
|
[
|
|
184
184
|
"path",
|
|
185
185
|
{
|
|
@@ -195,7 +195,7 @@ const Tn = q("Eye", [
|
|
|
195
195
|
* This source code is licensed under the ISC license.
|
|
196
196
|
* See the LICENSE file in the root directory of this source tree.
|
|
197
197
|
*/
|
|
198
|
-
const
|
|
198
|
+
const Mn = q("Glasses", [
|
|
199
199
|
["circle", { cx: "6", cy: "15", r: "4", key: "vux9w4" }],
|
|
200
200
|
["circle", { cx: "18", cy: "15", r: "4", key: "18o8ve" }],
|
|
201
201
|
["path", { d: "M14 15a2 2 0 0 0-2-2 2 2 0 0 0-2 2", key: "1ag4bs" }],
|
|
@@ -208,7 +208,7 @@ const Ln = q("Glasses", [
|
|
|
208
208
|
* This source code is licensed under the ISC license.
|
|
209
209
|
* See the LICENSE file in the root directory of this source tree.
|
|
210
210
|
*/
|
|
211
|
-
const
|
|
211
|
+
const Tn = q("Hammer", [
|
|
212
212
|
["path", { d: "m15 12-8.373 8.373a1 1 0 1 1-3-3L12 9", key: "eefl8a" }],
|
|
213
213
|
["path", { d: "m18 15 4-4", key: "16gjal" }],
|
|
214
214
|
[
|
|
@@ -314,7 +314,7 @@ const qe = q("LoaderCircle", [
|
|
|
314
314
|
* This source code is licensed under the ISC license.
|
|
315
315
|
* See the LICENSE file in the root directory of this source tree.
|
|
316
316
|
*/
|
|
317
|
-
const
|
|
317
|
+
const La = q("Map", [
|
|
318
318
|
[
|
|
319
319
|
"path",
|
|
320
320
|
{
|
|
@@ -395,7 +395,7 @@ const Un = q("Save", [
|
|
|
395
395
|
* This source code is licensed under the ISC license.
|
|
396
396
|
* See the LICENSE file in the root directory of this source tree.
|
|
397
397
|
*/
|
|
398
|
-
const
|
|
398
|
+
const Ma = q("Shapes", [
|
|
399
399
|
[
|
|
400
400
|
"path",
|
|
401
401
|
{
|
|
@@ -503,7 +503,7 @@ const Yn = q("User", [
|
|
|
503
503
|
["path", { d: "M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2", key: "975kel" }],
|
|
504
504
|
["circle", { cx: "12", cy: "7", r: "4", key: "17ys0d" }]
|
|
505
505
|
]);
|
|
506
|
-
function
|
|
506
|
+
function Ta(s) {
|
|
507
507
|
var t;
|
|
508
508
|
return {
|
|
509
509
|
...s,
|
|
@@ -587,16 +587,16 @@ async function sl(s, t) {
|
|
|
587
587
|
}) : null;
|
|
588
588
|
}
|
|
589
589
|
function al() {
|
|
590
|
-
const [s, t] = V(""), [a, n] = V(!1), l = z((C) => C.lenses), { setLenses: d, setSelectedLensId: i } = Is(), [o, c] = V(!1), [p, u] = V(!1), b = z((C) => C.dashboard), g = z((C) => C.filterValues), { authToken:
|
|
590
|
+
const [s, t] = V(""), [a, n] = V(!1), l = z((C) => C.lenses), { setLenses: d, setSelectedLensId: i } = Is(), [o, c] = V(!1), [p, u] = V(!1), b = z((C) => C.dashboard), g = z((C) => C.filterValues), { authToken: h } = Oe();
|
|
591
591
|
async function j() {
|
|
592
592
|
c(!0);
|
|
593
|
-
const C =
|
|
593
|
+
const C = Ta(
|
|
594
594
|
b
|
|
595
595
|
), I = await el(
|
|
596
596
|
s,
|
|
597
597
|
C,
|
|
598
598
|
g,
|
|
599
|
-
|
|
599
|
+
h == null ? void 0 : h.accessToken
|
|
600
600
|
);
|
|
601
601
|
I && (d([...l || [], I]), i(I.id), u(!1)), c(!1);
|
|
602
602
|
}
|
|
@@ -608,13 +608,13 @@ function al() {
|
|
|
608
608
|
className: "h-7 p-2",
|
|
609
609
|
size: "sm",
|
|
610
610
|
children: [
|
|
611
|
-
/* @__PURE__ */ e.jsx(
|
|
611
|
+
/* @__PURE__ */ e.jsx(Ls, { className: "mr-2 h-4 w-4", strokeWidth: 1.5 }),
|
|
612
612
|
"Lens"
|
|
613
613
|
]
|
|
614
614
|
}
|
|
615
615
|
) }),
|
|
616
|
-
/* @__PURE__ */ e.jsxs(
|
|
617
|
-
/* @__PURE__ */ e.jsxs(
|
|
616
|
+
/* @__PURE__ */ e.jsxs(Ms, { className: "sm:max-w-[425px]", children: [
|
|
617
|
+
/* @__PURE__ */ e.jsxs(Ts, { children: [
|
|
618
618
|
/* @__PURE__ */ e.jsx(Es, { children: "Create Lens" }),
|
|
619
619
|
/* @__PURE__ */ e.jsx(As, { children: "Lenses are private by default and are only visible to you." })
|
|
620
620
|
] }),
|
|
@@ -654,7 +654,7 @@ function tl() {
|
|
|
654
654
|
}
|
|
655
655
|
async function c(u) {
|
|
656
656
|
if (await sl(u, i == null ? void 0 : i.accessToken)) {
|
|
657
|
-
const g = a == null ? void 0 : a.filter((
|
|
657
|
+
const g = a == null ? void 0 : a.filter((h) => h.id !== u);
|
|
658
658
|
l(g || []), d("original");
|
|
659
659
|
}
|
|
660
660
|
}
|
|
@@ -672,17 +672,17 @@ function tl() {
|
|
|
672
672
|
isDefault: !u.isDefault
|
|
673
673
|
};
|
|
674
674
|
await zs(g, i == null ? void 0 : i.accessToken);
|
|
675
|
-
const
|
|
676
|
-
if (
|
|
675
|
+
const h = a == null ? void 0 : a.find((j) => j.isDefault);
|
|
676
|
+
if (h && h.id !== u.id) {
|
|
677
677
|
const j = {
|
|
678
|
-
...
|
|
678
|
+
...h,
|
|
679
679
|
isDefault: !1
|
|
680
680
|
};
|
|
681
681
|
await zs(j, i == null ? void 0 : i.accessToken);
|
|
682
682
|
}
|
|
683
683
|
}
|
|
684
684
|
return /* @__PURE__ */ e.jsxs(ra, { open: s, onOpenChange: t, children: [
|
|
685
|
-
/* @__PURE__ */ e.jsx(ia, { asChild: !0, children: /* @__PURE__ */ e.jsx(O, { variant: "ghost", className: "h-7 p-2", children: /* @__PURE__ */ e.jsx(
|
|
685
|
+
/* @__PURE__ */ e.jsx(ia, { asChild: !0, children: /* @__PURE__ */ e.jsx(O, { variant: "ghost", className: "h-7 p-2", children: /* @__PURE__ */ e.jsx(Mn, { className: "h-4 w-4", strokeWidth: 1.5 }) }) }),
|
|
686
686
|
/* @__PURE__ */ e.jsxs(oa, { align: "end", className: "w-60", children: [
|
|
687
687
|
/* @__PURE__ */ e.jsx(st, { className: "px-3", children: "Lenses" }),
|
|
688
688
|
/* @__PURE__ */ e.jsx(at, {}),
|
|
@@ -781,17 +781,17 @@ function ll() {
|
|
|
781
781
|
z((f) => f.selectedSheetId);
|
|
782
782
|
const d = z(
|
|
783
783
|
(f) => f.isDashboardEditing
|
|
784
|
-
), i =
|
|
784
|
+
), i = m(
|
|
785
785
|
(f) => f.selectedConnectionId
|
|
786
786
|
), [o, c] = V(!1), p = z((f) => f.filterValues), u = z((f) => f.isVisualEditing), b = z((f) => f.showFilters);
|
|
787
787
|
z(
|
|
788
788
|
(f) => f.showDashboardJSON
|
|
789
789
|
);
|
|
790
|
-
const g = z((f) => f.onSaveFunction),
|
|
790
|
+
const g = z((f) => f.onSaveFunction), h = z(
|
|
791
791
|
(f) => f.actions.setShowFilters
|
|
792
792
|
), { addFrame: j, setSelectedFrameId: C } = z(
|
|
793
793
|
(f) => f.actions
|
|
794
|
-
), { getSelectedSheet: I, setIsDashboardEditing: y, setShowDashboardJSON:
|
|
794
|
+
), { getSelectedSheet: I, setIsDashboardEditing: y, setShowDashboardJSON: M } = z((f) => f.actions), F = I(), { tenantId: A, endUserId: N } = ws(
|
|
795
795
|
() => lt(s == null ? void 0 : s.accessToken),
|
|
796
796
|
[s == null ? void 0 : s.accessToken]
|
|
797
797
|
), D = ws(() => A || N, [A, N]), E = () => {
|
|
@@ -823,7 +823,7 @@ function ll() {
|
|
|
823
823
|
};
|
|
824
824
|
async function v() {
|
|
825
825
|
if (c(!0), !a || !n) return;
|
|
826
|
-
const f =
|
|
826
|
+
const f = Ta(
|
|
827
827
|
l
|
|
828
828
|
), k = JSON.stringify(f), S = {
|
|
829
829
|
...n,
|
|
@@ -852,7 +852,7 @@ function ll() {
|
|
|
852
852
|
disabled: !d,
|
|
853
853
|
onClick: E,
|
|
854
854
|
children: [
|
|
855
|
-
/* @__PURE__ */ e.jsx(
|
|
855
|
+
/* @__PURE__ */ e.jsx(Ls, { className: "mr-2 h-4 w-4", strokeWidth: 1.5 }),
|
|
856
856
|
"Frame"
|
|
857
857
|
]
|
|
858
858
|
}
|
|
@@ -874,7 +874,7 @@ function ll() {
|
|
|
874
874
|
role: "close",
|
|
875
875
|
className: "h-7 p-2",
|
|
876
876
|
onClick: () => {
|
|
877
|
-
y(!1),
|
|
877
|
+
y(!1), M(!1);
|
|
878
878
|
},
|
|
879
879
|
size: "sm",
|
|
880
880
|
children: /* @__PURE__ */ e.jsx(Je, { className: "h-4 w-4", strokeWidth: 1.5 })
|
|
@@ -896,7 +896,7 @@ function ll() {
|
|
|
896
896
|
{
|
|
897
897
|
className: "h-7 p-2",
|
|
898
898
|
variant: "ghost",
|
|
899
|
-
onClick: () =>
|
|
899
|
+
onClick: () => h(!0),
|
|
900
900
|
size: "sm",
|
|
901
901
|
children: /* @__PURE__ */ e.jsx(da, { className: "h-4 w-4", strokeWidth: 1.5 })
|
|
902
902
|
}
|
|
@@ -937,11 +937,11 @@ function Be({
|
|
|
937
937
|
return /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
938
938
|
p && /* @__PURE__ */ e.jsx("div", { className: "shrink-0", children: d ? /* @__PURE__ */ e.jsxs(ua, { children: [
|
|
939
939
|
/* @__PURE__ */ e.jsx(rt, { children: g() }),
|
|
940
|
-
/* @__PURE__ */ e.jsx(
|
|
940
|
+
/* @__PURE__ */ e.jsx(ma, { className: "text-xs", align: "start", children: d })
|
|
941
941
|
] }) : g() }),
|
|
942
|
-
/* @__PURE__ */ e.jsxs(
|
|
942
|
+
/* @__PURE__ */ e.jsxs(me, { disabled: u, value: b, onValueChange: i, children: [
|
|
943
943
|
/* @__PURE__ */ e.jsx(
|
|
944
|
-
|
|
944
|
+
he,
|
|
945
945
|
{
|
|
946
946
|
className: K(
|
|
947
947
|
"h-9 w-full focus:ring-1 focus:ring-offset-0",
|
|
@@ -959,7 +959,7 @@ function Be({
|
|
|
959
959
|
n ? /* @__PURE__ */ e.jsx(fe, { children: "Loading..." }) : /* @__PURE__ */ e.jsx(fe, { children: s }),
|
|
960
960
|
/* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
961
961
|
o && /* @__PURE__ */ e.jsx(Y, { value: "none", children: "None" }, "none"),
|
|
962
|
-
t && t.map((
|
|
962
|
+
t && t.map((h, j) => /* @__PURE__ */ e.jsx(Y, { value: h.id, children: h.name }, j))
|
|
963
963
|
] }),
|
|
964
964
|
(n || l) && /* @__PURE__ */ e.jsx(Y, { value: b, children: b })
|
|
965
965
|
] }) })
|
|
@@ -967,16 +967,16 @@ function Be({
|
|
|
967
967
|
] });
|
|
968
968
|
}
|
|
969
969
|
function rl({ column: s }) {
|
|
970
|
-
const [t, a] = V(!1), n =
|
|
971
|
-
(
|
|
972
|
-
), d =
|
|
973
|
-
(
|
|
974
|
-
), i =
|
|
975
|
-
function b(
|
|
976
|
-
var
|
|
977
|
-
const C =
|
|
970
|
+
const [t, a] = V(!1), n = m((h) => h.selectedTableName), l = m(
|
|
971
|
+
(h) => h.selectedSchemaName
|
|
972
|
+
), d = m(
|
|
973
|
+
(h) => h.selectedDatamodelId
|
|
974
|
+
), i = 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);
|
|
975
|
+
function b(h, j) {
|
|
976
|
+
var M;
|
|
977
|
+
const C = ha(h, i, j), I = (M = o == null ? void 0 : o.find(
|
|
978
978
|
(F) => F.id === d
|
|
979
|
-
)) == null ? void 0 :
|
|
979
|
+
)) == null ? void 0 : M.name;
|
|
980
980
|
c(C);
|
|
981
981
|
const y = xa(
|
|
982
982
|
C,
|
|
@@ -1051,7 +1051,7 @@ function Ea({ column: s }) {
|
|
|
1051
1051
|
//
|
|
1052
1052
|
/* @__PURE__ */ e.jsx(En, { className: "size-3" })
|
|
1053
1053
|
) : ct.includes(s.data_type.toLowerCase()) ? /* @__PURE__ */ e.jsx(dt, { className: "size-3" }) : ut.includes(s.data_type.toLowerCase()) ? /* @__PURE__ */ e.jsx(Wn, { className: "size-3" }) : /* @__PURE__ */ e.jsx(Gn, { className: "size-3" }) }),
|
|
1054
|
-
/* @__PURE__ */ e.jsx(
|
|
1054
|
+
/* @__PURE__ */ e.jsx(ma, { children: /* @__PURE__ */ e.jsx("p", { className: "font-mono text-xs", children: s.data_type }) })
|
|
1055
1055
|
] });
|
|
1056
1056
|
}
|
|
1057
1057
|
function il({
|
|
@@ -1060,23 +1060,23 @@ function il({
|
|
|
1060
1060
|
columns: a,
|
|
1061
1061
|
status: n
|
|
1062
1062
|
}) {
|
|
1063
|
-
const l =
|
|
1063
|
+
const l = m((x) => x.sqlGen), d = m(
|
|
1064
1064
|
(x) => x.selectedConnectionId
|
|
1065
|
-
), i =
|
|
1065
|
+
), i = m(
|
|
1066
1066
|
(x) => x.selectedDatabaseName
|
|
1067
|
-
), o =
|
|
1067
|
+
), o = m(
|
|
1068
1068
|
(x) => x.selectedSchemaName
|
|
1069
|
-
), c =
|
|
1069
|
+
), c = m((x) => x.selectedTableName), p = m(
|
|
1070
1070
|
(x) => x.selectedDatamodelId
|
|
1071
1071
|
), u = z(
|
|
1072
1072
|
(x) => x.dashboard.aiScopeTables
|
|
1073
|
-
), { setAIScopeTables: b } = z((x) => x.actions), g =
|
|
1073
|
+
), { setAIScopeTables: b } = z((x) => x.actions), g = m((x) => x.actions.setRunSql), h = m((x) => x.actions.setSqlGen), j = m(
|
|
1074
1074
|
(x) => x.actions.setIsShowingVisual
|
|
1075
|
-
), C =
|
|
1076
|
-
function
|
|
1075
|
+
), C = m((x) => x.actions.setCardSql), { connectionType: I, modelItems: y } = _e();
|
|
1076
|
+
function M(x) {
|
|
1077
1077
|
var S;
|
|
1078
|
-
const v =
|
|
1079
|
-
|
|
1078
|
+
const v = ha(x, l);
|
|
1079
|
+
h(v);
|
|
1080
1080
|
const f = (S = y == null ? void 0 : y.find(
|
|
1081
1081
|
(R) => R.id === p
|
|
1082
1082
|
)) == null ? void 0 : S.name, k = xa(v, de(s), de(t), f);
|
|
@@ -1147,7 +1147,7 @@ function il({
|
|
|
1147
1147
|
variant: "outline",
|
|
1148
1148
|
className: "h-9 px-2",
|
|
1149
1149
|
children: /* @__PURE__ */ e.jsx(
|
|
1150
|
-
|
|
1150
|
+
mt,
|
|
1151
1151
|
{
|
|
1152
1152
|
className: K("size-4", {
|
|
1153
1153
|
"text-primary": F(),
|
|
@@ -1194,11 +1194,11 @@ function il({
|
|
|
1194
1194
|
a == null ? void 0 : a.map((x) => /* @__PURE__ */ e.jsxs(
|
|
1195
1195
|
"div",
|
|
1196
1196
|
{
|
|
1197
|
-
onClick: () =>
|
|
1197
|
+
onClick: () => M(x),
|
|
1198
1198
|
className: K(
|
|
1199
1199
|
"group mx-3 flex cursor-pointer items-center justify-between rounded px-2 py-[6px] text-sm transition-colors hover:bg-muted/50",
|
|
1200
1200
|
{
|
|
1201
|
-
"bg-muted":
|
|
1201
|
+
"bg-muted": ht(x, l)
|
|
1202
1202
|
}
|
|
1203
1203
|
),
|
|
1204
1204
|
children: [
|
|
@@ -1228,34 +1228,34 @@ function il({
|
|
|
1228
1228
|
function _e(s, t) {
|
|
1229
1229
|
var Ze, es, ss, as, ts;
|
|
1230
1230
|
let a = ws(() => [], []);
|
|
1231
|
-
const n = Oe().authToken || s, l =
|
|
1231
|
+
const n = Oe().authToken || s, l = m(
|
|
1232
1232
|
(r) => r.selectedConnectionId
|
|
1233
|
-
), d =
|
|
1233
|
+
), d = m(
|
|
1234
1234
|
(r) => r.selectedDatamodelId
|
|
1235
|
-
), i =
|
|
1235
|
+
), i = m(
|
|
1236
1236
|
(r) => r.selectedDatabaseName
|
|
1237
|
-
), o =
|
|
1237
|
+
), o = m(
|
|
1238
1238
|
(r) => r.selectedSchemaName
|
|
1239
|
-
), c =
|
|
1239
|
+
), c = m((r) => r.selectedTableName), p = m(
|
|
1240
1240
|
(r) => r.actions.setCurrentColumns
|
|
1241
|
-
), u =
|
|
1241
|
+
), u = m(
|
|
1242
1242
|
(r) => r.actions.setSelectedConnectionId
|
|
1243
|
-
), b =
|
|
1243
|
+
), b = m(
|
|
1244
1244
|
(r) => r.actions.setSelectedDatamodelId
|
|
1245
|
-
), g =
|
|
1245
|
+
), g = m(
|
|
1246
1246
|
(r) => r.actions.setSelectedDatabaseName
|
|
1247
|
-
),
|
|
1247
|
+
), h = m(
|
|
1248
1248
|
(r) => r.actions.setSelectedSchemaName
|
|
1249
|
-
), j =
|
|
1249
|
+
), j = m(
|
|
1250
1250
|
(r) => r.actions.setSelectedTableName
|
|
1251
|
-
), C =
|
|
1251
|
+
), C = m((r) => r.actions.setCardSql);
|
|
1252
1252
|
function I(r) {
|
|
1253
1253
|
return l && i && o && i !== "NA" ? !0 : l && r === "API" ? !1 : !!(l && r === "S3");
|
|
1254
1254
|
}
|
|
1255
1255
|
function y(r) {
|
|
1256
1256
|
return !!(l && i && i !== "NA" && o && c || l && (r === "S3" || r === "API") || d && d);
|
|
1257
1257
|
}
|
|
1258
|
-
function
|
|
1258
|
+
function M(r) {
|
|
1259
1259
|
return l && r ? !(r === "API" || r === "S3") : !1;
|
|
1260
1260
|
}
|
|
1261
1261
|
const {
|
|
@@ -1302,7 +1302,7 @@ function _e(s, t) {
|
|
|
1302
1302
|
connection_id: l
|
|
1303
1303
|
}
|
|
1304
1304
|
),
|
|
1305
|
-
enabled:
|
|
1305
|
+
enabled: M(f)
|
|
1306
1306
|
// !!selectedConnectionId && !isNonDbConnection, //currentConnection?.type !== 'API', // Only fetch if connectionId is present
|
|
1307
1307
|
}), {
|
|
1308
1308
|
data: B,
|
|
@@ -1323,8 +1323,8 @@ function _e(s, t) {
|
|
|
1323
1323
|
enabled: !!l && !!i && !k && i !== "NA"
|
|
1324
1324
|
//currentConnection?.type !== 'API', // Only fetch if connectionId and database is present
|
|
1325
1325
|
}), {
|
|
1326
|
-
data:
|
|
1327
|
-
isLoading:
|
|
1326
|
+
data: T,
|
|
1327
|
+
isLoading: L,
|
|
1328
1328
|
isFetching: te,
|
|
1329
1329
|
isError: P,
|
|
1330
1330
|
refetch: ee
|
|
@@ -1387,16 +1387,16 @@ function _e(s, t) {
|
|
|
1387
1387
|
k,
|
|
1388
1388
|
C,
|
|
1389
1389
|
j,
|
|
1390
|
-
|
|
1390
|
+
h,
|
|
1391
1391
|
g,
|
|
1392
1392
|
v
|
|
1393
1393
|
]);
|
|
1394
1394
|
const be = (v == null ? void 0 : v.type) === "API" ? (Ze = v == null ? void 0 : v.type) == null ? void 0 : Ze.toLowerCase() : c || "", W = k ? "" : o || "";
|
|
1395
1395
|
function oe(r) {
|
|
1396
|
-
|
|
1396
|
+
h(r), j("");
|
|
1397
1397
|
}
|
|
1398
1398
|
function ce(r) {
|
|
1399
|
-
g(r === "none" ? "" : r),
|
|
1399
|
+
g(r === "none" ? "" : r), h(""), j(""), r !== "none" && r !== "" && b("");
|
|
1400
1400
|
}
|
|
1401
1401
|
function Fe(r) {
|
|
1402
1402
|
u(r);
|
|
@@ -1423,7 +1423,7 @@ function _e(s, t) {
|
|
|
1423
1423
|
})), ys = B == null ? void 0 : B.schemas.map((r) => ({
|
|
1424
1424
|
id: r.schema_name,
|
|
1425
1425
|
name: r.schema_name
|
|
1426
|
-
})), Xe =
|
|
1426
|
+
})), Xe = T == null ? void 0 : T.tables.map((r) => ({
|
|
1427
1427
|
id: r.table_name,
|
|
1428
1428
|
name: r.table_name
|
|
1429
1429
|
}));
|
|
@@ -1441,7 +1441,7 @@ function _e(s, t) {
|
|
|
1441
1441
|
isSchemaLoadingOrFetching: X || w,
|
|
1442
1442
|
isSchemaError: H,
|
|
1443
1443
|
tableItems: Xe,
|
|
1444
|
-
isTableLoadingOrFetching:
|
|
1444
|
+
isTableLoadingOrFetching: L || te,
|
|
1445
1445
|
isTableError: P,
|
|
1446
1446
|
columns: a,
|
|
1447
1447
|
isColumnsLoadingOrFetching: Ee || Ie,
|
|
@@ -1460,15 +1460,15 @@ function Aa({
|
|
|
1460
1460
|
ColumnsComponent: s
|
|
1461
1461
|
}) {
|
|
1462
1462
|
var te;
|
|
1463
|
-
const t =
|
|
1463
|
+
const t = m(
|
|
1464
1464
|
(P) => P.selectedConnectionId
|
|
1465
|
-
), a =
|
|
1465
|
+
), a = m(
|
|
1466
1466
|
(P) => P.selectedDatamodelId
|
|
1467
|
-
), n =
|
|
1467
|
+
), n = m(
|
|
1468
1468
|
(P) => P.selectedDatabaseName
|
|
1469
|
-
), l =
|
|
1469
|
+
), l = m(
|
|
1470
1470
|
(P) => P.selectedSchemaName
|
|
1471
|
-
), d =
|
|
1471
|
+
), d = m((P) => P.selectedTableName), i = m(
|
|
1472
1472
|
(P) => P.actions.setSelectedTableName
|
|
1473
1473
|
), {
|
|
1474
1474
|
connectionItems: o,
|
|
@@ -1477,12 +1477,12 @@ function Aa({
|
|
|
1477
1477
|
databaseItems: u,
|
|
1478
1478
|
tableItems: b,
|
|
1479
1479
|
columns: g,
|
|
1480
|
-
isConnectionsLoading:
|
|
1480
|
+
isConnectionsLoading: h,
|
|
1481
1481
|
isModelsLoading: j,
|
|
1482
1482
|
isConnectionsError: C,
|
|
1483
1483
|
isModelsError: I,
|
|
1484
1484
|
isDatabasesLoadingOrFetching: y,
|
|
1485
|
-
isDatabaseError:
|
|
1485
|
+
isDatabaseError: M,
|
|
1486
1486
|
isSchemaLoadingOrFetching: F,
|
|
1487
1487
|
isSchemaError: A,
|
|
1488
1488
|
isColumnsError: N,
|
|
@@ -1520,7 +1520,7 @@ function Aa({
|
|
|
1520
1520
|
{
|
|
1521
1521
|
showNone: !0,
|
|
1522
1522
|
onChange: S,
|
|
1523
|
-
isError:
|
|
1523
|
+
isError: M,
|
|
1524
1524
|
isLoading: y,
|
|
1525
1525
|
items: u,
|
|
1526
1526
|
value: n || "",
|
|
@@ -1552,7 +1552,7 @@ function Aa({
|
|
|
1552
1552
|
}
|
|
1553
1553
|
);
|
|
1554
1554
|
}
|
|
1555
|
-
function
|
|
1555
|
+
function T() {
|
|
1556
1556
|
return !t || v === "S3" || v === "API" || !n || n === "none" ? null : /* @__PURE__ */ e.jsx(
|
|
1557
1557
|
Be,
|
|
1558
1558
|
{
|
|
@@ -1565,7 +1565,7 @@ function Aa({
|
|
|
1565
1565
|
}
|
|
1566
1566
|
);
|
|
1567
1567
|
}
|
|
1568
|
-
function
|
|
1568
|
+
function L() {
|
|
1569
1569
|
function P() {
|
|
1570
1570
|
let ee = !1;
|
|
1571
1571
|
return v === "API" ? (ee = !1, ee) : ((v === "S3" || t && n && n !== "none" && l) && (ee = !0), ee);
|
|
@@ -1591,7 +1591,7 @@ function Aa({
|
|
|
1591
1591
|
title: "Connection",
|
|
1592
1592
|
value: t || "",
|
|
1593
1593
|
onChange: k,
|
|
1594
|
-
isLoading:
|
|
1594
|
+
isLoading: h,
|
|
1595
1595
|
isError: C,
|
|
1596
1596
|
connectionTooltip: ((te = o == null ? void 0 : o.find(
|
|
1597
1597
|
(P) => P.id === t
|
|
@@ -1601,8 +1601,8 @@ function Aa({
|
|
|
1601
1601
|
ae(),
|
|
1602
1602
|
H(),
|
|
1603
1603
|
w(),
|
|
1604
|
-
|
|
1605
|
-
|
|
1604
|
+
T(),
|
|
1605
|
+
L()
|
|
1606
1606
|
] }),
|
|
1607
1607
|
B(),
|
|
1608
1608
|
/* @__PURE__ */ e.jsx("div", { className: "flex items-end justify-center gap-2 px-6 py-4", children: /* @__PURE__ */ e.jsxs(
|
|
@@ -1660,7 +1660,7 @@ function cl({
|
|
|
1660
1660
|
size: "sm",
|
|
1661
1661
|
variant: "outline",
|
|
1662
1662
|
children: [
|
|
1663
|
-
/* @__PURE__ */ e.jsx(
|
|
1663
|
+
/* @__PURE__ */ e.jsx(Tn, { className: "mr-2 h-4 w-4" }),
|
|
1664
1664
|
"Debug with AI"
|
|
1665
1665
|
]
|
|
1666
1666
|
}
|
|
@@ -1725,13 +1725,13 @@ function ul({
|
|
|
1725
1725
|
triggerAIRun: l,
|
|
1726
1726
|
setTriggerAIRun: d
|
|
1727
1727
|
}) {
|
|
1728
|
-
const i = ks(null), o = ks(null), { authToken: c } = Oe(), [p, u] = V(!1), b =
|
|
1728
|
+
const i = ks(null), o = ks(null), { authToken: c } = Oe(), [p, u] = V(!1), b = m((w) => w.actions.setCardSql), g = z((w) => w.dashboard.baseQueries), h = m((w) => w.actions.setRunSql), j = m((w) => w.actions.setCardType), [C, I] = V([]), y = m((w) => w.currentColumns), M = m((w) => w.card.sql), F = m((w) => w.selectedTableName), A = `
|
|
1729
1729
|
${a}
|
|
1730
1730
|
|
|
1731
1731
|
Database Query Dialect: ${F === "api" || F === "s3" ? "DuckDb" : ""}
|
|
1732
1732
|
Table Name: ${F}
|
|
1733
1733
|
Table Columns: ${y == null ? void 0 : y.map((w) => `${w.column_name} | ${w.data_type}`).join(", ")}
|
|
1734
|
-
User SQL: ${
|
|
1734
|
+
User SQL: ${M}
|
|
1735
1735
|
${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.
|
|
1736
1736
|
Visual Query Syntax: ${dl}`, { data: D, isLoading: E, isFetching: x, isError: v, refetch: f } = Ce({
|
|
1737
1737
|
queryKey: ["ai-query"],
|
|
@@ -1821,8 +1821,8 @@ function ul({
|
|
|
1821
1821
|
O,
|
|
1822
1822
|
{
|
|
1823
1823
|
onClick: (ae) => {
|
|
1824
|
-
const
|
|
1825
|
-
|
|
1824
|
+
const T = B(ae);
|
|
1825
|
+
T && (t(!1), b(T), h(!0));
|
|
1826
1826
|
},
|
|
1827
1827
|
size: "sm",
|
|
1828
1828
|
variant: "outline",
|
|
@@ -1838,7 +1838,7 @@ function ul({
|
|
|
1838
1838
|
const H = w.currentTarget.closest("pre");
|
|
1839
1839
|
if (!H) return;
|
|
1840
1840
|
const ae = H.textContent || H.innerText;
|
|
1841
|
-
return navigator.clipboard.writeText(ae).then(() => console.log("Text copied to clipboard")).catch((
|
|
1841
|
+
return navigator.clipboard.writeText(ae).then(() => console.log("Text copied to clipboard")).catch((T) => console.error("Error in copying text: ", T)), ae;
|
|
1842
1842
|
}
|
|
1843
1843
|
function X() {
|
|
1844
1844
|
return C == null ? void 0 : C.map((w, H) => w.role === "user" ? /* @__PURE__ */ e.jsxs(
|
|
@@ -1872,11 +1872,11 @@ function ul({
|
|
|
1872
1872
|
}
|
|
1873
1873
|
) }),
|
|
1874
1874
|
/* @__PURE__ */ e.jsxs(
|
|
1875
|
-
|
|
1875
|
+
Ms,
|
|
1876
1876
|
{
|
|
1877
1877
|
className: "flex flex-col justify-between overflow-auto sm:max-w-[425px] md:max-h-[625px] md:min-w-[625px]",
|
|
1878
1878
|
children: [
|
|
1879
|
-
/* @__PURE__ */ e.jsxs(
|
|
1879
|
+
/* @__PURE__ */ e.jsxs(Ts, { children: [
|
|
1880
1880
|
/* @__PURE__ */ e.jsx(Es, { children: "Assistant" }),
|
|
1881
1881
|
/* @__PURE__ */ e.jsx(As, { children: "What can I help you with?" })
|
|
1882
1882
|
] }),
|
|
@@ -1938,8 +1938,8 @@ var Va = {
|
|
|
1938
1938
|
className: void 0,
|
|
1939
1939
|
style: void 0,
|
|
1940
1940
|
attr: void 0
|
|
1941
|
-
}, sa = ke.createContext && /* @__PURE__ */ ke.createContext(Va),
|
|
1942
|
-
function
|
|
1941
|
+
}, sa = ke.createContext && /* @__PURE__ */ ke.createContext(Va), ml = ["attr", "size", "title"];
|
|
1942
|
+
function hl(s, t) {
|
|
1943
1943
|
if (s == null) return {};
|
|
1944
1944
|
var a = xl(s, t), n, l;
|
|
1945
1945
|
if (Object.getOwnPropertySymbols) {
|
|
@@ -1959,15 +1959,15 @@ function xl(s, t) {
|
|
|
1959
1959
|
}
|
|
1960
1960
|
return a;
|
|
1961
1961
|
}
|
|
1962
|
-
function
|
|
1963
|
-
return
|
|
1962
|
+
function ms() {
|
|
1963
|
+
return ms = Object.assign ? Object.assign.bind() : function(s) {
|
|
1964
1964
|
for (var t = 1; t < arguments.length; t++) {
|
|
1965
1965
|
var a = arguments[t];
|
|
1966
1966
|
for (var n in a)
|
|
1967
1967
|
Object.prototype.hasOwnProperty.call(a, n) && (s[n] = a[n]);
|
|
1968
1968
|
}
|
|
1969
1969
|
return s;
|
|
1970
|
-
},
|
|
1970
|
+
}, ms.apply(this, arguments);
|
|
1971
1971
|
}
|
|
1972
1972
|
function aa(s, t) {
|
|
1973
1973
|
var a = Object.keys(s);
|
|
@@ -1979,7 +1979,7 @@ function aa(s, t) {
|
|
|
1979
1979
|
}
|
|
1980
1980
|
return a;
|
|
1981
1981
|
}
|
|
1982
|
-
function
|
|
1982
|
+
function hs(s) {
|
|
1983
1983
|
for (var t = 1; t < arguments.length; t++) {
|
|
1984
1984
|
var a = arguments[t] != null ? arguments[t] : {};
|
|
1985
1985
|
t % 2 ? aa(Object(a), !0).forEach(function(n) {
|
|
@@ -2008,13 +2008,13 @@ function gl(s, t) {
|
|
|
2008
2008
|
return (t === "string" ? String : Number)(s);
|
|
2009
2009
|
}
|
|
2010
2010
|
function qa(s) {
|
|
2011
|
-
return s && s.map((t, a) => /* @__PURE__ */ ke.createElement(t.tag,
|
|
2011
|
+
return s && s.map((t, a) => /* @__PURE__ */ ke.createElement(t.tag, hs({
|
|
2012
2012
|
key: a
|
|
2013
2013
|
}, t.attr), qa(t.child)));
|
|
2014
2014
|
}
|
|
2015
2015
|
function ge(s) {
|
|
2016
|
-
return (t) => /* @__PURE__ */ ke.createElement(jl,
|
|
2017
|
-
attr:
|
|
2016
|
+
return (t) => /* @__PURE__ */ ke.createElement(jl, ms({
|
|
2017
|
+
attr: hs({}, s.attr)
|
|
2018
2018
|
}, t), qa(s.child));
|
|
2019
2019
|
}
|
|
2020
2020
|
function jl(s) {
|
|
@@ -2023,14 +2023,14 @@ function jl(s) {
|
|
|
2023
2023
|
attr: n,
|
|
2024
2024
|
size: l,
|
|
2025
2025
|
title: d
|
|
2026
|
-
} = s, i =
|
|
2027
|
-
return a.className && (c = a.className), s.className && (c = (c ? c + " " : "") + s.className), /* @__PURE__ */ ke.createElement("svg",
|
|
2026
|
+
} = s, i = hl(s, ml), o = l || a.size || "1em", c;
|
|
2027
|
+
return a.className && (c = a.className), s.className && (c = (c ? c + " " : "") + s.className), /* @__PURE__ */ ke.createElement("svg", ms({
|
|
2028
2028
|
stroke: "currentColor",
|
|
2029
2029
|
fill: "currentColor",
|
|
2030
2030
|
strokeWidth: "0"
|
|
2031
2031
|
}, a.attr, n, i, {
|
|
2032
2032
|
className: c,
|
|
2033
|
-
style:
|
|
2033
|
+
style: hs(hs({
|
|
2034
2034
|
color: s.color || a.color
|
|
2035
2035
|
}, a.style), s.style),
|
|
2036
2036
|
height: o,
|
|
@@ -2063,43 +2063,43 @@ function vl() {
|
|
|
2063
2063
|
const [s, t] = V({
|
|
2064
2064
|
queryKey: [],
|
|
2065
2065
|
queryData: null
|
|
2066
|
-
}), { theme: a } = bt(), n = yt(), l = ks(), d = vt(), [i, o] = V(!1), [c, p] = V(!1), [u, b] = V(!1), [g,
|
|
2066
|
+
}), { theme: a } = bt(), n = yt(), l = ks(), d = vt(), [i, o] = V(!1), [c, p] = V(!1), [u, b] = V(!1), [g, h] = V(""), [j, C] = V(!1), I = z((r) => r.selectedSheetId);
|
|
2067
2067
|
z((r) => r.dashboard.baseQueries);
|
|
2068
|
-
const y =
|
|
2068
|
+
const y = m((r) => r.card), M = z((r) => r.theme), F = m((r) => r.isShowingVisual);
|
|
2069
2069
|
z((r) => r.onAcceptChanges);
|
|
2070
|
-
const A =
|
|
2070
|
+
const A = m(
|
|
2071
2071
|
(r) => r.selectedConnectionId
|
|
2072
|
-
), N =
|
|
2072
|
+
), N = m(
|
|
2073
2073
|
(r) => r.selectedDatabaseName
|
|
2074
|
-
), D =
|
|
2074
|
+
), D = m(
|
|
2075
2075
|
(r) => r.selectedDatamodelId
|
|
2076
|
-
), E =
|
|
2076
|
+
), E = m(
|
|
2077
2077
|
(r) => r.selectedSchemaName
|
|
2078
2078
|
);
|
|
2079
2079
|
z(
|
|
2080
2080
|
(r) => r.actions.updateFrameCard
|
|
2081
2081
|
);
|
|
2082
|
-
const x =
|
|
2082
|
+
const x = m((r) => r.selectedTableName), v = m((r) => r.card.sql), f = m((r) => r.card.python), k = m((r) => r.frame), S = z((r) => r.dashboard.filters), R = z((r) => r.filterValues), $ = S == null ? void 0 : S.filter(
|
|
2083
2083
|
(r) => r.sheetId === I || !r.sheetId
|
|
2084
2084
|
), U = R == null ? void 0 : R.filter(
|
|
2085
2085
|
(r) => ($ == null ? void 0 : $.some((le) => le.id === r.filterId)) || r.filterId.endsWith(I)
|
|
2086
|
-
), Z =
|
|
2086
|
+
), Z = m((r) => r.applyFilters), {
|
|
2087
2087
|
setCardCustomCfg: B,
|
|
2088
2088
|
setQueryResultColumns: X,
|
|
2089
2089
|
setFilterValues: w,
|
|
2090
2090
|
setCardSql: H,
|
|
2091
2091
|
setCard: ae,
|
|
2092
|
-
setCardPython:
|
|
2093
|
-
setQueryError:
|
|
2092
|
+
setCardPython: T,
|
|
2093
|
+
setQueryError: L,
|
|
2094
2094
|
setPythonStdOut: te,
|
|
2095
2095
|
setCardPreferences: P
|
|
2096
|
-
} =
|
|
2097
|
-
|
|
2096
|
+
} = m((r) => r.actions), ee = m((r) => r.onSave);
|
|
2097
|
+
m(
|
|
2098
2098
|
(r) => r.actions.setApplyFilters
|
|
2099
2099
|
);
|
|
2100
|
-
const ne =
|
|
2101
|
-
|
|
2102
|
-
const be =
|
|
2100
|
+
const ne = m((r) => r.onClose), Ee = m((r) => r.actions.setSqlGen), Ie = m((r) => r.runSql), je = m((r) => r.actions.setRunSql);
|
|
2101
|
+
m((r) => r.actions.setCardCfg);
|
|
2102
|
+
const be = m(
|
|
2103
2103
|
(r) => r.actions.setIsSqlRunning
|
|
2104
2104
|
), {
|
|
2105
2105
|
data: W,
|
|
@@ -2125,7 +2125,7 @@ function vl() {
|
|
|
2125
2125
|
X,
|
|
2126
2126
|
te
|
|
2127
2127
|
]), se(() => {
|
|
2128
|
-
(oe || ce) && be(!0), (Ae || Fe) && be(!1), Ae ? (
|
|
2128
|
+
(oe || ce) && be(!0), (Ae || Fe) && be(!1), Ae ? (L($e.message), X([]), te("")) : L("");
|
|
2129
2129
|
}, [
|
|
2130
2130
|
oe,
|
|
2131
2131
|
ce,
|
|
@@ -2135,7 +2135,7 @@ function vl() {
|
|
|
2135
2135
|
Fe,
|
|
2136
2136
|
be,
|
|
2137
2137
|
X,
|
|
2138
|
-
|
|
2138
|
+
L,
|
|
2139
2139
|
$e
|
|
2140
2140
|
]), se(() => {
|
|
2141
2141
|
Ie && (Ve(), je(!1));
|
|
@@ -2198,7 +2198,7 @@ function vl() {
|
|
|
2198
2198
|
}
|
|
2199
2199
|
se(() => {
|
|
2200
2200
|
if (!d) return;
|
|
2201
|
-
const r = l.current, le = window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light", ye =
|
|
2201
|
+
const r = l.current, le = window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light", ye = M === "system" ? le : M;
|
|
2202
2202
|
return d.editor.defineTheme("default", {
|
|
2203
2203
|
// base: theme === 'light' ? 'hc-light' : 'vs-dark',
|
|
2204
2204
|
base: ye === "light" ? "vs" : "vs-dark",
|
|
@@ -2218,7 +2218,7 @@ function vl() {
|
|
|
2218
2218
|
}
|
|
2219
2219
|
), () => {
|
|
2220
2220
|
};
|
|
2221
|
-
}, [a,
|
|
2221
|
+
}, [a, M, d]);
|
|
2222
2222
|
function as() {
|
|
2223
2223
|
return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
2224
2224
|
c && /* @__PURE__ */ e.jsx(
|
|
@@ -2267,7 +2267,7 @@ function vl() {
|
|
|
2267
2267
|
renderLineHighlight: "none"
|
|
2268
2268
|
}
|
|
2269
2269
|
},
|
|
2270
|
-
|
|
2270
|
+
M
|
|
2271
2271
|
)
|
|
2272
2272
|
] })
|
|
2273
2273
|
}
|
|
@@ -2359,7 +2359,7 @@ function vl() {
|
|
|
2359
2359
|
className: "pt-3",
|
|
2360
2360
|
theme: "default",
|
|
2361
2361
|
onChange: (r) => {
|
|
2362
|
-
|
|
2362
|
+
T(r && r.trim() || "");
|
|
2363
2363
|
},
|
|
2364
2364
|
value: f || St,
|
|
2365
2365
|
options: {
|
|
@@ -2438,7 +2438,7 @@ function vl() {
|
|
|
2438
2438
|
error: $e.message,
|
|
2439
2439
|
setShowAIDialog: b,
|
|
2440
2440
|
setTriggerAIRun: C,
|
|
2441
|
-
setUserInputforAI:
|
|
2441
|
+
setUserInputforAI: h
|
|
2442
2442
|
}
|
|
2443
2443
|
),
|
|
2444
2444
|
/* @__PURE__ */ e.jsxs(
|
|
@@ -2473,7 +2473,7 @@ function vl() {
|
|
|
2473
2473
|
userInput: g,
|
|
2474
2474
|
triggerAIRun: j,
|
|
2475
2475
|
setTriggerAIRun: C,
|
|
2476
|
-
setUserInput: (r) =>
|
|
2476
|
+
setUserInput: (r) => h(r)
|
|
2477
2477
|
}
|
|
2478
2478
|
)
|
|
2479
2479
|
] }),
|
|
@@ -2536,9 +2536,9 @@ function Cl({ data: s }) {
|
|
|
2536
2536
|
data: s,
|
|
2537
2537
|
columns: l,
|
|
2538
2538
|
getCoreRowModel: Dt(),
|
|
2539
|
-
getPaginationRowModel:
|
|
2539
|
+
getPaginationRowModel: Lt(),
|
|
2540
2540
|
onSortingChange: a,
|
|
2541
|
-
getSortedRowModel:
|
|
2541
|
+
getSortedRowModel: Mt(),
|
|
2542
2542
|
manualPagination: !0,
|
|
2543
2543
|
state: {
|
|
2544
2544
|
sorting: t
|
|
@@ -2568,16 +2568,16 @@ function Cl({ data: s }) {
|
|
|
2568
2568
|
] }) });
|
|
2569
2569
|
}
|
|
2570
2570
|
function Nl({ card: s }) {
|
|
2571
|
-
var y,
|
|
2571
|
+
var y, M, F, A, N, D, E, x, v, f, k;
|
|
2572
2572
|
const [t, a] = V(!1), [n, l] = V(
|
|
2573
2573
|
[]
|
|
2574
|
-
), { authToken: d } = Oe(), i =
|
|
2575
|
-
colors: ((
|
|
2574
|
+
), { authToken: d } = Oe(), i = Tt(d == null ? void 0 : d.accessToken), o = z((S) => S.themeStyle), c = {
|
|
2575
|
+
colors: ((M = (y = o == null ? void 0 : o.chart) == null ? void 0 : y.dataset) == null ? void 0 : M.backgroundColor) || []
|
|
2576
2576
|
};
|
|
2577
2577
|
(F = s.customCardPreferences) != null && F.inputData;
|
|
2578
|
-
const { getCard: p } = ba(((A = s.customCardPreferences) == null ? void 0 : A.url) || ""), u = ((N = s.customCardPreferences) == null ? void 0 : N.visualType) || "single", b =
|
|
2578
|
+
const { getCard: p } = ba(((A = s.customCardPreferences) == null ? void 0 : A.url) || ""), u = ((N = s.customCardPreferences) == null ? void 0 : N.visualType) || "single", b = m((S) => S.frame);
|
|
2579
2579
|
ie();
|
|
2580
|
-
const { data: g } = Re(s),
|
|
2580
|
+
const { data: g } = Re(s), h = Nn((S, R) => {
|
|
2581
2581
|
l(($) => ({
|
|
2582
2582
|
...$,
|
|
2583
2583
|
[S]: R
|
|
@@ -2609,7 +2609,7 @@ function Nl({ card: s }) {
|
|
|
2609
2609
|
params: i,
|
|
2610
2610
|
theme: c,
|
|
2611
2611
|
settings: (v = s.customCardPreferences) == null ? void 0 : v.settings,
|
|
2612
|
-
onDataChange:
|
|
2612
|
+
onDataChange: h,
|
|
2613
2613
|
data: (g == null ? void 0 : g.records) || []
|
|
2614
2614
|
}
|
|
2615
2615
|
),
|
|
@@ -2626,7 +2626,7 @@ function Nl({ card: s }) {
|
|
|
2626
2626
|
Et,
|
|
2627
2627
|
{
|
|
2628
2628
|
onLoadingStatus: C,
|
|
2629
|
-
onDataChange:
|
|
2629
|
+
onDataChange: h,
|
|
2630
2630
|
dataInputIndex: S,
|
|
2631
2631
|
card: $
|
|
2632
2632
|
},
|
|
@@ -2637,7 +2637,7 @@ function Nl({ card: s }) {
|
|
|
2637
2637
|
j,
|
|
2638
2638
|
{
|
|
2639
2639
|
theme: c,
|
|
2640
|
-
onDataChange:
|
|
2640
|
+
onDataChange: h,
|
|
2641
2641
|
settings: I.map(
|
|
2642
2642
|
(S) => {
|
|
2643
2643
|
var R;
|
|
@@ -2660,12 +2660,12 @@ function Ra({
|
|
|
2660
2660
|
...t
|
|
2661
2661
|
}) {
|
|
2662
2662
|
var I;
|
|
2663
|
-
const a =
|
|
2664
|
-
|
|
2663
|
+
const a = m((y) => y.card), n = ((I = a.customCardPreferences) == null ? void 0 : I.showCardHeader) ?? !0, l = m((y) => y.frame), d = z((y) => y.dashboard.filters);
|
|
2664
|
+
m((y) => y.actions.setRunSql);
|
|
2665
2665
|
const { updateFilter: i } = Is(), o = d == null ? void 0 : d.find((y) => y.id === l.filterId), { data: c, isLoading: p, isFetching: u } = Re(a), { setCard: b } = ie(), { data: g } = Hs(a);
|
|
2666
2666
|
if (!a.id) return null;
|
|
2667
|
-
let
|
|
2668
|
-
c != null && c.records && (c == null ? void 0 : c.records.length) > 0 && (
|
|
2667
|
+
let h;
|
|
2668
|
+
c != null && c.records && (c == null ? void 0 : c.records.length) > 0 && (h = ya({
|
|
2669
2669
|
data: c == null ? void 0 : c.records,
|
|
2670
2670
|
cardType: a.type,
|
|
2671
2671
|
cfg: a.cfg,
|
|
@@ -2685,16 +2685,16 @@ function Ra({
|
|
|
2685
2685
|
] });
|
|
2686
2686
|
if (a.type === "custom")
|
|
2687
2687
|
return j(a);
|
|
2688
|
-
if (!["table", "custom"].includes(a.type) &&
|
|
2688
|
+
if (!["table", "custom"].includes(a.type) && h)
|
|
2689
2689
|
return /* @__PURE__ */ e.jsx(
|
|
2690
2690
|
Pt,
|
|
2691
2691
|
{
|
|
2692
|
-
cfg:
|
|
2692
|
+
cfg: h
|
|
2693
2693
|
},
|
|
2694
|
-
JSON.stringify(
|
|
2694
|
+
JSON.stringify(h) + JSON.stringify(a.preferences) + ((y = a == null ? void 0 : a.preferences) == null ? void 0 : y.customVisualCode)
|
|
2695
2695
|
);
|
|
2696
2696
|
if (a.type === "table" && (c != null && c.records) && (c == null ? void 0 : c.records.length) > 0)
|
|
2697
|
-
return /* @__PURE__ */ e.jsxs(ze, { className: "relative flex h-full min-h-0 w-full flex-1 grow basis-0", children: [
|
|
2697
|
+
return /* @__PURE__ */ e.jsxs(ze, { className: "relative mb-2 flex h-full min-h-0 w-full flex-1 grow basis-0", children: [
|
|
2698
2698
|
/* @__PURE__ */ e.jsx(Bt, { card: a, data: c == null ? void 0 : c.records }),
|
|
2699
2699
|
/* @__PURE__ */ e.jsx(Ye, { orientation: "horizontal" })
|
|
2700
2700
|
] });
|
|
@@ -2746,9 +2746,9 @@ function Ra({
|
|
|
2746
2746
|
);
|
|
2747
2747
|
}
|
|
2748
2748
|
function Sl() {
|
|
2749
|
-
const [s, t] = V(!1), [a, n] = V(""), [l, d] = V(""), [i, o] = V(""), [c, p] = V(""), u =
|
|
2749
|
+
const [s, t] = V(!1), [a, n] = V(""), [l, d] = V(""), [i, o] = V(""), [c, p] = V(""), u = m((N) => N.card), b = m(
|
|
2750
2750
|
(N) => N.card.customCfg
|
|
2751
|
-
), { data: g } = Re(u), { data:
|
|
2751
|
+
), { data: g } = Re(u), { data: h } = Hs(u), { setCardCustomCfg: j, setCustomVisualCode: C } = ie();
|
|
2752
2752
|
function I(N) {
|
|
2753
2753
|
var x, v;
|
|
2754
2754
|
const D = {
|
|
@@ -2771,11 +2771,11 @@ function Sl() {
|
|
|
2771
2771
|
cardType: u.type,
|
|
2772
2772
|
cfg: u.cfg,
|
|
2773
2773
|
preferences: u.preferences,
|
|
2774
|
-
topoJson:
|
|
2774
|
+
topoJson: h
|
|
2775
2775
|
});
|
|
2776
2776
|
N && (n(JSON.stringify(N, null, 1)), (D = u == null ? void 0 : u.preferences) != null && D.customVisualCode && o((E = u == null ? void 0 : u.preferences) == null ? void 0 : E.customVisualCode), b && d(JSON.stringify(b, null, 1)));
|
|
2777
2777
|
}
|
|
2778
|
-
function
|
|
2778
|
+
function M() {
|
|
2779
2779
|
if (i && C(i), !!l)
|
|
2780
2780
|
try {
|
|
2781
2781
|
const N = JSON.parse(l);
|
|
@@ -2807,11 +2807,11 @@ function Sl() {
|
|
|
2807
2807
|
}
|
|
2808
2808
|
) }),
|
|
2809
2809
|
/* @__PURE__ */ e.jsxs(
|
|
2810
|
-
|
|
2810
|
+
Ms,
|
|
2811
2811
|
{
|
|
2812
2812
|
className: "max-h-[70vh] min-h-[70vh] overflow-auto sm:min-w-[900px] lg:min-w-[1200px]",
|
|
2813
2813
|
children: [
|
|
2814
|
-
/* @__PURE__ */ e.jsxs(
|
|
2814
|
+
/* @__PURE__ */ e.jsxs(Ts, { className: "", children: [
|
|
2815
2815
|
/* @__PURE__ */ e.jsx("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ e.jsx(Es, { children: "Customize Card" }) }),
|
|
2816
2816
|
/* @__PURE__ */ e.jsxs(As, { children: [
|
|
2817
2817
|
"See the configuration options and documentation",
|
|
@@ -2923,7 +2923,7 @@ function Sl() {
|
|
|
2923
2923
|
children: "Reset"
|
|
2924
2924
|
}
|
|
2925
2925
|
),
|
|
2926
|
-
/* @__PURE__ */ e.jsx(O, { onClick:
|
|
2926
|
+
/* @__PURE__ */ e.jsx(O, { onClick: M, variant: "outline", children: "Apply" }),
|
|
2927
2927
|
/* @__PURE__ */ e.jsx(O, { onClick: () => t(!1), variant: "outline", children: "Close" })
|
|
2928
2928
|
] })
|
|
2929
2929
|
]
|
|
@@ -2959,7 +2959,7 @@ function Ja(s) {
|
|
|
2959
2959
|
const [t, a] = V(null);
|
|
2960
2960
|
return se(() => {
|
|
2961
2961
|
s && (async () => {
|
|
2962
|
-
const d = (await import("./lucide-react-
|
|
2962
|
+
const d = (await import("./lucide-react-DWPc-x9m.js"))[s];
|
|
2963
2963
|
a(d);
|
|
2964
2964
|
})();
|
|
2965
2965
|
}, [s]), t;
|
|
@@ -3013,14 +3013,14 @@ const kl = ({
|
|
|
3013
3013
|
};
|
|
3014
3014
|
function zl() {
|
|
3015
3015
|
var u, b;
|
|
3016
|
-
const [s, t] = V(!1), a =
|
|
3017
|
-
function p(g,
|
|
3018
|
-
o(null), d({}), l(g),
|
|
3016
|
+
const [s, t] = V(!1), a = m((g) => g.card), n = a.type, { setCardType: l, setCardPreferences: d, setChartOrientation: i } = m((g) => g.actions), { setCardCustomCfg: o, setCustomCardPreferences: c } = ie();
|
|
3017
|
+
function p(g, h) {
|
|
3018
|
+
o(null), d({}), l(g), h && c({
|
|
3019
3019
|
type: "component",
|
|
3020
3020
|
visualType: "single",
|
|
3021
|
-
url:
|
|
3022
|
-
componentName:
|
|
3023
|
-
icon:
|
|
3021
|
+
url: h.url,
|
|
3022
|
+
componentName: h.name,
|
|
3023
|
+
icon: h.icon
|
|
3024
3024
|
}), t(!1);
|
|
3025
3025
|
}
|
|
3026
3026
|
return /* @__PURE__ */ e.jsxs(ps, { open: s, onOpenChange: t, children: [
|
|
@@ -3167,7 +3167,7 @@ function zl() {
|
|
|
3167
3167
|
{
|
|
3168
3168
|
onClick: () => p("map"),
|
|
3169
3169
|
variant: "ghost",
|
|
3170
|
-
children: /* @__PURE__ */ e.jsx(
|
|
3170
|
+
children: /* @__PURE__ */ e.jsx(La, { className: "size-4" })
|
|
3171
3171
|
}
|
|
3172
3172
|
),
|
|
3173
3173
|
/* @__PURE__ */ e.jsx(
|
|
@@ -3175,7 +3175,7 @@ function zl() {
|
|
|
3175
3175
|
{
|
|
3176
3176
|
onClick: () => p("custom"),
|
|
3177
3177
|
variant: "ghost",
|
|
3178
|
-
children: /* @__PURE__ */ e.jsx(
|
|
3178
|
+
children: /* @__PURE__ */ e.jsx(Ma, { className: "size-4" })
|
|
3179
3179
|
}
|
|
3180
3180
|
)
|
|
3181
3181
|
] }),
|
|
@@ -3220,16 +3220,16 @@ function Ol({
|
|
|
3220
3220
|
case "text":
|
|
3221
3221
|
return /* @__PURE__ */ e.jsx(Gs, { className: t });
|
|
3222
3222
|
case "map":
|
|
3223
|
-
return /* @__PURE__ */ e.jsx(
|
|
3223
|
+
return /* @__PURE__ */ e.jsx(La, { className: t });
|
|
3224
3224
|
case "custom":
|
|
3225
|
-
return a && l ? /* @__PURE__ */ e.jsx(l, { className: t }) : n ? n == null ? void 0 : n.charAt(0).toUpperCase() : /* @__PURE__ */ e.jsx(
|
|
3225
|
+
return a && l ? /* @__PURE__ */ e.jsx(l, { className: t }) : n ? n == null ? void 0 : n.charAt(0).toUpperCase() : /* @__PURE__ */ e.jsx(Ma, { className: t });
|
|
3226
3226
|
default:
|
|
3227
3227
|
return /* @__PURE__ */ e.jsx(Vs, { className: t });
|
|
3228
3228
|
}
|
|
3229
3229
|
}
|
|
3230
3230
|
function Il() {
|
|
3231
3231
|
var t;
|
|
3232
|
-
const s =
|
|
3232
|
+
const s = m((a) => a.card);
|
|
3233
3233
|
return (t = s.customCardPreferences) == null || t.showCardHeader, ie(), /* @__PURE__ */ e.jsxs(ra, { children: [
|
|
3234
3234
|
/* @__PURE__ */ e.jsx(ia, { asChild: !0, children: /* @__PURE__ */ e.jsx(Da, { className: "size-4 cursor-pointer text-muted-foreground/70 transition-colors hover:text-muted-foreground" }) }),
|
|
3235
3235
|
/* @__PURE__ */ e.jsx(oa, { align: "start", className: "w-40 text-muted-foreground", children: /* @__PURE__ */ e.jsxs(
|
|
@@ -3248,11 +3248,11 @@ function Il() {
|
|
|
3248
3248
|
] });
|
|
3249
3249
|
}
|
|
3250
3250
|
function ta() {
|
|
3251
|
-
const s =
|
|
3252
|
-
|
|
3251
|
+
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), i = m((x) => x.actions.setRunSql);
|
|
3252
|
+
m((x) => x.onSave), m((x) => x.onClose), m((x) => x.actions.setCardSql), m((x) => x.actions.setCardType), m((x) => x.actions.setSqlGen);
|
|
3253
3253
|
const { setFrame: o, setCard: c, updateCardInFrame: p } = ie(), { data: u, isLoading: b, isFetching: g } = Re(t);
|
|
3254
3254
|
if (!t) return /* @__PURE__ */ e.jsx(e.Fragment, { children: "No Active Card" });
|
|
3255
|
-
function
|
|
3255
|
+
function h() {
|
|
3256
3256
|
const x = {
|
|
3257
3257
|
connectionId: t.connectionId,
|
|
3258
3258
|
id: Ke(),
|
|
@@ -3308,7 +3308,7 @@ function ta() {
|
|
|
3308
3308
|
const f = v.cards.find((k) => k.id === x);
|
|
3309
3309
|
f.sql && i(!0), c(f);
|
|
3310
3310
|
}
|
|
3311
|
-
const
|
|
3311
|
+
const M = (x, v) => {
|
|
3312
3312
|
console.log("handleDragStart", v), x.dataTransfer.setData("tabIndex", v.toString());
|
|
3313
3313
|
}, F = (x) => {
|
|
3314
3314
|
x.preventDefault();
|
|
@@ -3329,7 +3329,7 @@ function ta() {
|
|
|
3329
3329
|
displayTab: f
|
|
3330
3330
|
});
|
|
3331
3331
|
},
|
|
3332
|
-
children: v.displayTab === !0 || v.displayTab === void 0 ? /* @__PURE__ */ e.jsx(
|
|
3332
|
+
children: v.displayTab === !0 || v.displayTab === void 0 ? /* @__PURE__ */ e.jsx(Ln, { className: "mr-2 size-3.5 text-muted-foreground hover:text-foreground" }) : /* @__PURE__ */ e.jsx(Dn, { className: "mr-2 size-3.5 text-muted-foreground hover:text-foreground" })
|
|
3333
3333
|
}
|
|
3334
3334
|
);
|
|
3335
3335
|
}
|
|
@@ -3354,7 +3354,7 @@ function ta() {
|
|
|
3354
3354
|
is,
|
|
3355
3355
|
{
|
|
3356
3356
|
draggable: !0,
|
|
3357
|
-
onDragStart: (f) =>
|
|
3357
|
+
onDragStart: (f) => M(f, v),
|
|
3358
3358
|
onDragOver: F,
|
|
3359
3359
|
onDrop: (f) => A(f, v),
|
|
3360
3360
|
className: "",
|
|
@@ -3380,8 +3380,8 @@ function ta() {
|
|
|
3380
3380
|
{
|
|
3381
3381
|
className: "ml-1 h-8 px-2 hover:bg-muted-foreground/50",
|
|
3382
3382
|
variant: "outline",
|
|
3383
|
-
onClick:
|
|
3384
|
-
children: /* @__PURE__ */ e.jsx(
|
|
3383
|
+
onClick: h,
|
|
3384
|
+
children: /* @__PURE__ */ e.jsx(Ls, { className: "h-4 w-4" })
|
|
3385
3385
|
}
|
|
3386
3386
|
),
|
|
3387
3387
|
/* @__PURE__ */ e.jsx(
|
|
@@ -3458,7 +3458,7 @@ function ta() {
|
|
|
3458
3458
|
] });
|
|
3459
3459
|
}
|
|
3460
3460
|
function Fl() {
|
|
3461
|
-
const s =
|
|
3461
|
+
const s = m((a) => a.pythonStdOut);
|
|
3462
3462
|
if (!s) return null;
|
|
3463
3463
|
const t = s.replace(/\n/g, "<br>");
|
|
3464
3464
|
return /* @__PURE__ */ e.jsxs("div", { className: "relative flex w-full flex-col border-r", children: [
|
|
@@ -3470,7 +3470,7 @@ function Fl() {
|
|
|
3470
3470
|
] });
|
|
3471
3471
|
}
|
|
3472
3472
|
function Dl() {
|
|
3473
|
-
const s =
|
|
3473
|
+
const s = m((a) => a.isShowingVisual), t = m(
|
|
3474
3474
|
(a) => a.actions.setIsShowingVisual
|
|
3475
3475
|
);
|
|
3476
3476
|
return /* @__PURE__ */ e.jsxs("div", { className: "flex items-center space-x-2", children: [
|
|
@@ -3486,7 +3486,7 @@ function Dl() {
|
|
|
3486
3486
|
)
|
|
3487
3487
|
] });
|
|
3488
3488
|
}
|
|
3489
|
-
function
|
|
3489
|
+
function Ll({
|
|
3490
3490
|
options: s,
|
|
3491
3491
|
value: t,
|
|
3492
3492
|
onValueChange: a
|
|
@@ -3499,7 +3499,7 @@ function Tl({
|
|
|
3499
3499
|
className: "flex gap-4",
|
|
3500
3500
|
defaultValue: s[0].value,
|
|
3501
3501
|
children: s.map((n) => /* @__PURE__ */ e.jsxs("div", { className: "flex items-center space-x-2", children: [
|
|
3502
|
-
/* @__PURE__ */ e.jsx(
|
|
3502
|
+
/* @__PURE__ */ e.jsx(Le, { value: n.value, id: n.value }),
|
|
3503
3503
|
/* @__PURE__ */ e.jsx("label", { className: "text-sm", htmlFor: n.value, children: n.label })
|
|
3504
3504
|
] }, n.value))
|
|
3505
3505
|
}
|
|
@@ -3512,9 +3512,9 @@ function ue({
|
|
|
3512
3512
|
onValueChange: n,
|
|
3513
3513
|
className: l
|
|
3514
3514
|
}) {
|
|
3515
|
-
return /* @__PURE__ */ e.jsxs(
|
|
3515
|
+
return /* @__PURE__ */ e.jsxs(me, { value: a, onValueChange: n, children: [
|
|
3516
3516
|
/* @__PURE__ */ e.jsx(
|
|
3517
|
-
|
|
3517
|
+
he,
|
|
3518
3518
|
{
|
|
3519
3519
|
className: K("w-full focus:ring-0 focus:ring-offset-0", l),
|
|
3520
3520
|
children: /* @__PURE__ */ e.jsx(xe, { placeholder: s })
|
|
@@ -3547,21 +3547,21 @@ function Qe({
|
|
|
3547
3547
|
}
|
|
3548
3548
|
);
|
|
3549
3549
|
}
|
|
3550
|
-
function
|
|
3550
|
+
function Ml() {
|
|
3551
3551
|
var C, I;
|
|
3552
|
-
const s =
|
|
3552
|
+
const s = m(
|
|
3553
3553
|
(y) => y.card.customCardPreferences
|
|
3554
|
-
), { data: t } = Ka(), a = (t == null ? void 0 : t.plugins) || [], n =
|
|
3554
|
+
), { data: t } = Ka(), a = (t == null ? void 0 : t.plugins) || [], n = m((y) => y.card), l = m((y) => y.frame), d = (s == null ? void 0 : s.visualType) || "single", { setCustomCardPreferences: i } = ie(), { components: o, manifest: c } = ba(
|
|
3555
3555
|
(s == null ? void 0 : s.url) || ""
|
|
3556
3556
|
), p = (C = c == null ? void 0 : c.visuals) == null ? void 0 : C.find(
|
|
3557
3557
|
(y) => y.name === (s == null ? void 0 : s.componentName)
|
|
3558
3558
|
);
|
|
3559
|
-
function u(y,
|
|
3559
|
+
function u(y, M) {
|
|
3560
3560
|
if (!s) return;
|
|
3561
3561
|
const A = {
|
|
3562
3562
|
...(s == null ? void 0 : s.dataInputCardIds) || {},
|
|
3563
3563
|
[y]: {
|
|
3564
|
-
cardId:
|
|
3564
|
+
cardId: M,
|
|
3565
3565
|
hookRef: null
|
|
3566
3566
|
}
|
|
3567
3567
|
};
|
|
@@ -3572,7 +3572,7 @@ function Ll() {
|
|
|
3572
3572
|
}
|
|
3573
3573
|
function b(y) {
|
|
3574
3574
|
var F, A;
|
|
3575
|
-
const
|
|
3575
|
+
const M = (F = l == null ? void 0 : l.cards) == null ? void 0 : F.filter((N) => {
|
|
3576
3576
|
var D;
|
|
3577
3577
|
return ((D = N == null ? void 0 : N.customCardPreferences) == null ? void 0 : D.visualType) !== "multiple";
|
|
3578
3578
|
}).map((N) => ({
|
|
@@ -3592,7 +3592,7 @@ function Ll() {
|
|
|
3592
3592
|
{
|
|
3593
3593
|
className: "col-span-6 h-8 w-full justify-between",
|
|
3594
3594
|
label: "",
|
|
3595
|
-
options:
|
|
3595
|
+
options: M || [],
|
|
3596
3596
|
value: ((x = (E = s == null ? void 0 : s.dataInputCardIds) == null ? void 0 : E[D]) == null ? void 0 : x.cardId) || "",
|
|
3597
3597
|
onValueChange: (v) => u(D, v)
|
|
3598
3598
|
}
|
|
@@ -3603,43 +3603,43 @@ function Ll() {
|
|
|
3603
3603
|
);
|
|
3604
3604
|
}) });
|
|
3605
3605
|
}
|
|
3606
|
-
function g(y,
|
|
3606
|
+
function g(y, M, F = []) {
|
|
3607
3607
|
var A, N;
|
|
3608
3608
|
return s ? y === "input" ? /* @__PURE__ */ e.jsx(
|
|
3609
3609
|
re,
|
|
3610
3610
|
{
|
|
3611
3611
|
className: `h-8 w-full ${Ue}`,
|
|
3612
|
-
value: ((A = s == null ? void 0 : s.settings) == null ? void 0 : A[
|
|
3612
|
+
value: ((A = s == null ? void 0 : s.settings) == null ? void 0 : A[M]) || "",
|
|
3613
3613
|
onChange: (D) => {
|
|
3614
3614
|
i({
|
|
3615
3615
|
...s,
|
|
3616
3616
|
settings: {
|
|
3617
3617
|
...s == null ? void 0 : s.settings,
|
|
3618
|
-
[
|
|
3618
|
+
[M]: D.target.value
|
|
3619
3619
|
}
|
|
3620
3620
|
});
|
|
3621
3621
|
}
|
|
3622
3622
|
},
|
|
3623
|
-
|
|
3623
|
+
M
|
|
3624
3624
|
) : y === "select" ? /* @__PURE__ */ e.jsx(
|
|
3625
3625
|
ue,
|
|
3626
3626
|
{
|
|
3627
3627
|
className: "h-8 w-full",
|
|
3628
3628
|
label: "",
|
|
3629
3629
|
options: F,
|
|
3630
|
-
value: ((N = s == null ? void 0 : s.settings) == null ? void 0 : N[
|
|
3630
|
+
value: ((N = s == null ? void 0 : s.settings) == null ? void 0 : N[M]) || "",
|
|
3631
3631
|
onValueChange: (D) => {
|
|
3632
3632
|
i({
|
|
3633
3633
|
...s,
|
|
3634
|
-
settings: { ...s == null ? void 0 : s.settings, [
|
|
3634
|
+
settings: { ...s == null ? void 0 : s.settings, [M]: D }
|
|
3635
3635
|
});
|
|
3636
3636
|
}
|
|
3637
3637
|
}
|
|
3638
3638
|
) : null : null;
|
|
3639
3639
|
}
|
|
3640
|
-
function
|
|
3641
|
-
const
|
|
3642
|
-
return /* @__PURE__ */ e.jsx("div", { className: "space-y-3", children:
|
|
3640
|
+
function h(y) {
|
|
3641
|
+
const M = Object.entries((y == null ? void 0 : y.settings) || {});
|
|
3642
|
+
return /* @__PURE__ */ e.jsx("div", { className: "space-y-3", children: M.map(([F, A]) => /* @__PURE__ */ e.jsxs("div", { className: "space-y-2", children: [
|
|
3643
3643
|
/* @__PURE__ */ e.jsx(_, { children: A.title }),
|
|
3644
3644
|
g(
|
|
3645
3645
|
A.ui,
|
|
@@ -3678,7 +3678,7 @@ function Ll() {
|
|
|
3678
3678
|
}
|
|
3679
3679
|
) }) }),
|
|
3680
3680
|
((s == null ? void 0 : s.type) === "component" || (s == null ? void 0 : s.type) === void 0) && /* @__PURE__ */ e.jsx(
|
|
3681
|
-
|
|
3681
|
+
Ll,
|
|
3682
3682
|
{
|
|
3683
3683
|
options: [
|
|
3684
3684
|
{ value: "single", label: "Single Visual" },
|
|
@@ -3718,21 +3718,21 @@ function Ll() {
|
|
|
3718
3718
|
/* @__PURE__ */ e.jsx(_, { children: "Input Mapping" }),
|
|
3719
3719
|
/* @__PURE__ */ e.jsx("div", { className: "px-2", children: b(p) })
|
|
3720
3720
|
] }),
|
|
3721
|
-
p && p.settings && /* @__PURE__ */ e.jsx("div", { className: "space-y-3", children: /* @__PURE__ */ e.jsx("div", { className: "px-2", children:
|
|
3721
|
+
p && p.settings && /* @__PURE__ */ e.jsx("div", { className: "space-y-3", children: /* @__PURE__ */ e.jsx("div", { className: "px-2", children: h(p) }) })
|
|
3722
3722
|
] })
|
|
3723
3723
|
]
|
|
3724
3724
|
}
|
|
3725
3725
|
);
|
|
3726
3726
|
}
|
|
3727
|
-
function
|
|
3727
|
+
function Te() {
|
|
3728
3728
|
const [s, t] = V([]);
|
|
3729
|
-
|
|
3729
|
+
m(
|
|
3730
3730
|
(u) => u.card.cfg
|
|
3731
3731
|
);
|
|
3732
|
-
const a =
|
|
3732
|
+
const a = m((u) => u.card.preferences), { setCardCfg: n, setFilterOnClickColumnIndex: l, setCardPreferences: d } = m((u) => u.actions), i = m(
|
|
3733
3733
|
(u) => u.queryResultColumns
|
|
3734
3734
|
);
|
|
3735
|
-
|
|
3735
|
+
m(
|
|
3736
3736
|
(u) => {
|
|
3737
3737
|
var b;
|
|
3738
3738
|
return (b = u.card.preferences) == null ? void 0 : b.filterOnClickColumnIndex;
|
|
@@ -3741,7 +3741,7 @@ function Me() {
|
|
|
3741
3741
|
i && t(new Array(i.length).fill(!1));
|
|
3742
3742
|
}, [i]);
|
|
3743
3743
|
function o(u, b) {
|
|
3744
|
-
var g,
|
|
3744
|
+
var g, h;
|
|
3745
3745
|
b ? a != null && a.onClickFilter && ((g = a == null ? void 0 : a.onClickFilter) == null ? void 0 : g.length) > 0 ? d({
|
|
3746
3746
|
...a,
|
|
3747
3747
|
onClickFilter: [
|
|
@@ -3761,7 +3761,7 @@ function Me() {
|
|
|
3761
3761
|
]
|
|
3762
3762
|
}) : (d({
|
|
3763
3763
|
...a,
|
|
3764
|
-
onClickFilter: (
|
|
3764
|
+
onClickFilter: (h = a == null ? void 0 : a.onClickFilter) == null ? void 0 : h.filter(
|
|
3765
3765
|
(j) => j.columnIndex !== u
|
|
3766
3766
|
)
|
|
3767
3767
|
}), t((j) => {
|
|
@@ -3770,8 +3770,8 @@ function Me() {
|
|
|
3770
3770
|
}));
|
|
3771
3771
|
}
|
|
3772
3772
|
function c(u, b) {
|
|
3773
|
-
var
|
|
3774
|
-
const g = (
|
|
3773
|
+
var h;
|
|
3774
|
+
const g = (h = a == null ? void 0 : a.onClickFilter) == null ? void 0 : h.map((j) => j.columnIndex === u ? {
|
|
3775
3775
|
...j,
|
|
3776
3776
|
expression: b.target.value
|
|
3777
3777
|
} : j);
|
|
@@ -3781,12 +3781,12 @@ function Me() {
|
|
|
3781
3781
|
});
|
|
3782
3782
|
}
|
|
3783
3783
|
function p(u) {
|
|
3784
|
-
var b, g,
|
|
3784
|
+
var b, g, h, j;
|
|
3785
3785
|
if (s != null && s[u] || (g = (b = a == null ? void 0 : a.onClickFilter) == null ? void 0 : b.find((C) => C.columnIndex === u)) != null && g.expression)
|
|
3786
3786
|
return /* @__PURE__ */ e.jsx(
|
|
3787
3787
|
re,
|
|
3788
3788
|
{
|
|
3789
|
-
value: (j = (
|
|
3789
|
+
value: (j = (h = a == null ? void 0 : a.onClickFilter) == null ? void 0 : h.find((C) => C.columnIndex === u)) == null ? void 0 : j.expression,
|
|
3790
3790
|
onChange: (C) => c(u, C),
|
|
3791
3791
|
type: "text",
|
|
3792
3792
|
className: "h-9 w-full font-mono text-xs focus-visible:ring-0 focus-visible:ring-ring focus-visible:ring-offset-0",
|
|
@@ -3797,7 +3797,7 @@ function Me() {
|
|
|
3797
3797
|
return /* @__PURE__ */ e.jsxs("div", { className: "space-y-2", children: [
|
|
3798
3798
|
/* @__PURE__ */ e.jsx(_, { children: "On Click" }),
|
|
3799
3799
|
i == null ? void 0 : i.map((u, b) => {
|
|
3800
|
-
var g,
|
|
3800
|
+
var g, h;
|
|
3801
3801
|
return /* @__PURE__ */ e.jsx(
|
|
3802
3802
|
"div",
|
|
3803
3803
|
{
|
|
@@ -3820,7 +3820,7 @@ function Me() {
|
|
|
3820
3820
|
children: u
|
|
3821
3821
|
}
|
|
3822
3822
|
),
|
|
3823
|
-
/* @__PURE__ */ e.jsx("div", { className: "flex items-center gap-2", children: ((
|
|
3823
|
+
/* @__PURE__ */ e.jsx("div", { className: "flex items-center gap-2", children: ((h = a == null ? void 0 : a.onClickFilter) == null ? void 0 : h.find(
|
|
3824
3824
|
(j) => j.columnIndex === b
|
|
3825
3825
|
)) && /* @__PURE__ */ e.jsx(
|
|
3826
3826
|
ca,
|
|
@@ -3845,9 +3845,9 @@ function Me() {
|
|
|
3845
3845
|
}
|
|
3846
3846
|
function bs() {
|
|
3847
3847
|
var i, o, c;
|
|
3848
|
-
const s =
|
|
3848
|
+
const s = m((p) => p.card.preferences), t = m(
|
|
3849
3849
|
(p) => p.card.cfg
|
|
3850
|
-
), { setCardCfg: a, setCardPreferences: n, setChartOrientation: l } =
|
|
3850
|
+
), { setCardCfg: a, setCardPreferences: n, setChartOrientation: l } = m((p) => p.actions);
|
|
3851
3851
|
(i = t == null ? void 0 : t.options) != null && i.indexAxis;
|
|
3852
3852
|
function d(p) {
|
|
3853
3853
|
l(p);
|
|
@@ -3861,11 +3861,11 @@ function bs() {
|
|
|
3861
3861
|
defaultValue: "x",
|
|
3862
3862
|
children: [
|
|
3863
3863
|
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center space-x-2", children: [
|
|
3864
|
-
/* @__PURE__ */ e.jsx(
|
|
3864
|
+
/* @__PURE__ */ e.jsx(Le, { value: "x", id: "r1" }),
|
|
3865
3865
|
/* @__PURE__ */ e.jsx("label", { className: "text-sm", htmlFor: "r1", children: "Vertical" })
|
|
3866
3866
|
] }),
|
|
3867
3867
|
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center space-x-2", children: [
|
|
3868
|
-
/* @__PURE__ */ e.jsx(
|
|
3868
|
+
/* @__PURE__ */ e.jsx(Le, { value: "y", id: "r2" }),
|
|
3869
3869
|
/* @__PURE__ */ e.jsx("label", { className: "text-sm", htmlFor: "r2", children: "Horizontal" })
|
|
3870
3870
|
] })
|
|
3871
3871
|
]
|
|
@@ -3880,38 +3880,38 @@ function na(s, t) {
|
|
|
3880
3880
|
}
|
|
3881
3881
|
function Wa() {
|
|
3882
3882
|
var Z, B, X, w, H, ae;
|
|
3883
|
-
const [s, t] = V(!1), a =
|
|
3884
|
-
var
|
|
3885
|
-
return (
|
|
3886
|
-
}), n =
|
|
3887
|
-
var
|
|
3888
|
-
return (
|
|
3883
|
+
const [s, t] = V(!1), a = m((T) => {
|
|
3884
|
+
var L;
|
|
3885
|
+
return (L = T.card) == null ? void 0 : L.preferences;
|
|
3886
|
+
}), n = m((T) => {
|
|
3887
|
+
var L;
|
|
3888
|
+
return (L = T.card) == null ? void 0 : L.cfg;
|
|
3889
3889
|
}), l = ka(a, n), [d, i] = V(
|
|
3890
3890
|
na(a)
|
|
3891
3891
|
), [o, c] = V(
|
|
3892
3892
|
((X = (B = (Z = a == null ? void 0 : a.chartOptions) == null ? void 0 : Z.scales) == null ? void 0 : B[l]) == null ? void 0 : X.min) || ""
|
|
3893
3893
|
), [p, u] = V(
|
|
3894
3894
|
((ae = (H = (w = a == null ? void 0 : a.chartOptions) == null ? void 0 : w.scales) == null ? void 0 : H[l]) == null ? void 0 : ae.max) || ""
|
|
3895
|
-
), [b, g] = V(o || p ? "custom" : "auto"), [
|
|
3896
|
-
(
|
|
3897
|
-
), { updateCardInFrame: x } = ie(), v =
|
|
3898
|
-
var
|
|
3899
|
-
return (
|
|
3895
|
+
), [b, g] = V(o || p ? "custom" : "auto"), [h, j] = V(""), [C, I] = V(0), [y, M] = V(""), [F, A] = V(""), [N, D] = V(""), E = m(
|
|
3896
|
+
(T) => T.actions.setCardPreferences
|
|
3897
|
+
), { updateCardInFrame: x } = ie(), v = m((T) => T.card), f = m((T) => {
|
|
3898
|
+
var L;
|
|
3899
|
+
return (L = T.card) == null ? void 0 : L.type;
|
|
3900
3900
|
}), k = ["pie", "doughnut", "polarArea"].includes(f);
|
|
3901
3901
|
se(() => {
|
|
3902
|
-
var
|
|
3902
|
+
var T, L, te, P, ee, ne, Ee, Ie, je, be, W, oe, ce, Fe;
|
|
3903
3903
|
i(na(a)), c(
|
|
3904
|
-
((te = (
|
|
3904
|
+
((te = (L = (T = a == null ? void 0 : a.chartOptions) == null ? void 0 : T.scales) == null ? void 0 : L[l]) == null ? void 0 : te.min) === 0 ? 0 : ""
|
|
3905
3905
|
), u(((ne = (ee = (P = a == null ? void 0 : a.chartOptions) == null ? void 0 : P.scales) == null ? void 0 : ee[l]) == null ? void 0 : ne.max) || ""), j(
|
|
3906
3906
|
((be = (je = (Ie = (Ee = a == null ? void 0 : a.chartOptions) == null ? void 0 : Ee.scales) == null ? void 0 : Ie[l]) == null ? void 0 : je.ticks) == null ? void 0 : be.stepSize) || ""
|
|
3907
|
-
), I(((W = a == null ? void 0 : a.numberAxisFormat) == null ? void 0 : W.decimalPlaces) || 0),
|
|
3907
|
+
), I(((W = a == null ? void 0 : a.numberAxisFormat) == null ? void 0 : W.decimalPlaces) || 0), M(((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) || ""), D(((Fe = a == null ? void 0 : a.numberAxisFormat) == null ? void 0 : Fe.locale) || "");
|
|
3908
3908
|
}, [s, a, l]);
|
|
3909
|
-
function S(
|
|
3910
|
-
return
|
|
3909
|
+
function S(T, L) {
|
|
3910
|
+
return L === "" || /^[0-9\b]+$/.test(L) ? Number(L) : Number(T);
|
|
3911
3911
|
}
|
|
3912
3912
|
function R() {
|
|
3913
|
-
const
|
|
3914
|
-
...new Set(us.map((
|
|
3913
|
+
const T = [
|
|
3914
|
+
...new Set(us.map((L) => L.currency))
|
|
3915
3915
|
];
|
|
3916
3916
|
return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
3917
3917
|
/* @__PURE__ */ e.jsxs("div", { className: "grid grid-cols-6 items-center gap-2", children: [
|
|
@@ -3931,23 +3931,23 @@ function Wa() {
|
|
|
3931
3931
|
}
|
|
3932
3932
|
),
|
|
3933
3933
|
/* @__PURE__ */ e.jsxs(
|
|
3934
|
-
|
|
3934
|
+
me,
|
|
3935
3935
|
{
|
|
3936
3936
|
value: F || "none",
|
|
3937
|
-
onValueChange: (
|
|
3937
|
+
onValueChange: (L) => A(L === "none" ? "" : L),
|
|
3938
3938
|
children: [
|
|
3939
|
-
/* @__PURE__ */ e.jsx(
|
|
3939
|
+
/* @__PURE__ */ e.jsx(he, { className: "col-span-2 h-8 w-full focus:ring-1 focus:ring-offset-0", children: /* @__PURE__ */ e.jsx(xe, {}) }),
|
|
3940
3940
|
/* @__PURE__ */ e.jsx(pe, { children: /* @__PURE__ */ e.jsxs(Se, { children: [
|
|
3941
3941
|
/* @__PURE__ */ e.jsx(fe, { children: "Currency" }),
|
|
3942
3942
|
/* @__PURE__ */ e.jsx(Y, { value: "none", children: "None" }),
|
|
3943
|
-
|
|
3943
|
+
T.map((L) => /* @__PURE__ */ e.jsx(Y, { value: L, children: L }, L))
|
|
3944
3944
|
] }) })
|
|
3945
3945
|
]
|
|
3946
3946
|
}
|
|
3947
3947
|
),
|
|
3948
|
-
/* @__PURE__ */ e.jsxs(
|
|
3948
|
+
/* @__PURE__ */ e.jsxs(me, { value: N, onValueChange: (L) => D(L), children: [
|
|
3949
3949
|
/* @__PURE__ */ e.jsx(
|
|
3950
|
-
|
|
3950
|
+
he,
|
|
3951
3951
|
{
|
|
3952
3952
|
className: "col-span-2 h-8 w-full focus:ring-1 focus:ring-offset-0",
|
|
3953
3953
|
children: /* @__PURE__ */ e.jsx(xe, {})
|
|
@@ -3955,7 +3955,7 @@ function Wa() {
|
|
|
3955
3955
|
),
|
|
3956
3956
|
/* @__PURE__ */ e.jsx(pe, { children: /* @__PURE__ */ e.jsxs(Se, { children: [
|
|
3957
3957
|
/* @__PURE__ */ e.jsx(fe, { children: "Locale" }),
|
|
3958
|
-
us.map((
|
|
3958
|
+
us.map((L) => /* @__PURE__ */ e.jsx(Y, { value: L.locale, children: L.locale }, L.locale))
|
|
3959
3959
|
] }) })
|
|
3960
3960
|
] })
|
|
3961
3961
|
] }),
|
|
@@ -3965,7 +3965,7 @@ function Wa() {
|
|
|
3965
3965
|
re,
|
|
3966
3966
|
{
|
|
3967
3967
|
value: C,
|
|
3968
|
-
onChange: (
|
|
3968
|
+
onChange: (L) => I(Number(L.target.value)),
|
|
3969
3969
|
id: "format",
|
|
3970
3970
|
className: `col-span-6 h-8 w-full tracking-wide ${ns}`
|
|
3971
3971
|
}
|
|
@@ -3982,7 +3982,7 @@ function Wa() {
|
|
|
3982
3982
|
{
|
|
3983
3983
|
id: "min",
|
|
3984
3984
|
value: o,
|
|
3985
|
-
onChange: (
|
|
3985
|
+
onChange: (T) => c((L) => S(L, T.target.value)),
|
|
3986
3986
|
className: `col-span-1 h-8 w-full ${ns}`
|
|
3987
3987
|
}
|
|
3988
3988
|
),
|
|
@@ -3990,7 +3990,7 @@ function Wa() {
|
|
|
3990
3990
|
re,
|
|
3991
3991
|
{
|
|
3992
3992
|
value: p,
|
|
3993
|
-
onChange: (
|
|
3993
|
+
onChange: (T) => u((L) => S(L, T.target.value)),
|
|
3994
3994
|
id: "max",
|
|
3995
3995
|
className: `col-span-1 h-8 w-full ${ns}`
|
|
3996
3996
|
}
|
|
@@ -4001,8 +4001,8 @@ function Wa() {
|
|
|
4001
4001
|
/* @__PURE__ */ e.jsx(
|
|
4002
4002
|
re,
|
|
4003
4003
|
{
|
|
4004
|
-
value:
|
|
4005
|
-
onChange: (
|
|
4004
|
+
value: h,
|
|
4005
|
+
onChange: (T) => j((L) => S(L, T.target.value)),
|
|
4006
4006
|
id: "step-size",
|
|
4007
4007
|
className: `col-span-1 h-8 w-full ${ns}`
|
|
4008
4008
|
}
|
|
@@ -4012,15 +4012,15 @@ function Wa() {
|
|
|
4012
4012
|
}
|
|
4013
4013
|
function U() {
|
|
4014
4014
|
var P;
|
|
4015
|
-
let
|
|
4016
|
-
b === "custom" && (
|
|
4015
|
+
let T = {};
|
|
4016
|
+
b === "custom" && (T = {
|
|
4017
4017
|
min: o,
|
|
4018
4018
|
max: p,
|
|
4019
4019
|
ticks: {
|
|
4020
|
-
stepSize:
|
|
4020
|
+
stepSize: h
|
|
4021
4021
|
}
|
|
4022
4022
|
});
|
|
4023
|
-
const
|
|
4023
|
+
const L = {
|
|
4024
4024
|
...a || {},
|
|
4025
4025
|
chartOptions: {
|
|
4026
4026
|
...a == null ? void 0 : a.chartOptions,
|
|
@@ -4029,7 +4029,7 @@ function Wa() {
|
|
|
4029
4029
|
[l]: {
|
|
4030
4030
|
// ...cardPreferences?.chartOptions?.scales?.[axis],
|
|
4031
4031
|
type: d,
|
|
4032
|
-
...d === "linear" ?
|
|
4032
|
+
...d === "linear" ? T : {}
|
|
4033
4033
|
}
|
|
4034
4034
|
}
|
|
4035
4035
|
},
|
|
@@ -4040,14 +4040,14 @@ function Wa() {
|
|
|
4040
4040
|
locale: N
|
|
4041
4041
|
}
|
|
4042
4042
|
};
|
|
4043
|
-
console.log(
|
|
4043
|
+
console.log(L), E(L);
|
|
4044
4044
|
const te = {
|
|
4045
4045
|
...v,
|
|
4046
|
-
preferences:
|
|
4046
|
+
preferences: L
|
|
4047
4047
|
};
|
|
4048
4048
|
x(te);
|
|
4049
4049
|
}
|
|
4050
|
-
return /* @__PURE__ */ e.jsxs(ps, { onOpenChange: (
|
|
4050
|
+
return /* @__PURE__ */ e.jsxs(ps, { onOpenChange: (T) => t(T), children: [
|
|
4051
4051
|
/* @__PURE__ */ e.jsx(fs, { asChild: !0, children: /* @__PURE__ */ e.jsx(Zt, { className: "size-4 cursor-pointer text-muted-foreground hover:text-foreground" }) }),
|
|
4052
4052
|
/* @__PURE__ */ e.jsx(gs, { align: "center", className: "max-w-65", children: /* @__PURE__ */ e.jsxs("div", { className: "grid gap-4", children: [
|
|
4053
4053
|
/* @__PURE__ */ e.jsxs("div", { className: "space-y-2", children: [
|
|
@@ -4058,13 +4058,13 @@ function Wa() {
|
|
|
4058
4058
|
/* @__PURE__ */ e.jsxs("div", { className: "grid grid-cols-3 items-center gap-2", children: [
|
|
4059
4059
|
/* @__PURE__ */ e.jsx(_, { htmlFor: "scale", children: "Type" }),
|
|
4060
4060
|
/* @__PURE__ */ e.jsxs(
|
|
4061
|
-
|
|
4061
|
+
me,
|
|
4062
4062
|
{
|
|
4063
4063
|
disabled: k,
|
|
4064
4064
|
value: d,
|
|
4065
|
-
onValueChange: (
|
|
4065
|
+
onValueChange: (T) => i(T),
|
|
4066
4066
|
children: [
|
|
4067
|
-
/* @__PURE__ */ e.jsx(
|
|
4067
|
+
/* @__PURE__ */ e.jsx(he, { className: "col-span-2 h-8 w-full focus:ring-1 focus:ring-offset-0", children: /* @__PURE__ */ e.jsx(xe, {}) }),
|
|
4068
4068
|
/* @__PURE__ */ e.jsx(pe, { id: "type", children: /* @__PURE__ */ e.jsxs(Se, { children: [
|
|
4069
4069
|
/* @__PURE__ */ e.jsx(fe, { children: "Option" }),
|
|
4070
4070
|
/* @__PURE__ */ e.jsx(Y, { value: "linear", children: "Linear" }),
|
|
@@ -4082,16 +4082,16 @@ function Wa() {
|
|
|
4082
4082
|
disabled: k,
|
|
4083
4083
|
id: "scale-option",
|
|
4084
4084
|
value: b,
|
|
4085
|
-
onValueChange: (
|
|
4085
|
+
onValueChange: (T) => g(T),
|
|
4086
4086
|
className: "col-span-2 flex gap-3",
|
|
4087
4087
|
defaultValue: "x",
|
|
4088
4088
|
children: [
|
|
4089
4089
|
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center space-x-2", children: [
|
|
4090
|
-
/* @__PURE__ */ e.jsx(
|
|
4090
|
+
/* @__PURE__ */ e.jsx(Le, { value: "auto", id: "r1" }),
|
|
4091
4091
|
/* @__PURE__ */ e.jsx("label", { className: "text-sm", htmlFor: "r1", children: "Auto" })
|
|
4092
4092
|
] }),
|
|
4093
4093
|
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center space-x-2", children: [
|
|
4094
|
-
/* @__PURE__ */ e.jsx(
|
|
4094
|
+
/* @__PURE__ */ e.jsx(Le, { value: "custom", id: "r2" }),
|
|
4095
4095
|
/* @__PURE__ */ e.jsx("label", { className: "text-sm", htmlFor: "r2", children: "Custom" })
|
|
4096
4096
|
] })
|
|
4097
4097
|
]
|
|
@@ -4114,17 +4114,17 @@ function Wa() {
|
|
|
4114
4114
|
] }) })
|
|
4115
4115
|
] });
|
|
4116
4116
|
}
|
|
4117
|
-
function
|
|
4117
|
+
function Tl({ idx: s }) {
|
|
4118
4118
|
var o;
|
|
4119
|
-
const t =
|
|
4119
|
+
const t = m((c) => {
|
|
4120
4120
|
var p;
|
|
4121
4121
|
return (p = c.card) == null ? void 0 : p.preferences;
|
|
4122
|
-
}), a =
|
|
4122
|
+
}), a = m(
|
|
4123
4123
|
(c) => {
|
|
4124
4124
|
var p;
|
|
4125
4125
|
return (p = c.card.preferences) == null ? void 0 : p.datasetOptions;
|
|
4126
4126
|
}
|
|
4127
|
-
), n =
|
|
4127
|
+
), n = m(
|
|
4128
4128
|
(c) => c.actions.setCardPreferences
|
|
4129
4129
|
), l = (o = t == null ? void 0 : t.chartOptions) == null ? void 0 : o.indexAxis, d = a == null ? void 0 : a.find((c) => c.idx === s);
|
|
4130
4130
|
function i(c, p) {
|
|
@@ -4150,7 +4150,7 @@ function Ml({ idx: s }) {
|
|
|
4150
4150
|
const b = { ...d };
|
|
4151
4151
|
b.datalabels = u;
|
|
4152
4152
|
const g = a == null ? void 0 : a.map(
|
|
4153
|
-
(
|
|
4153
|
+
(h) => h.idx === p ? b : h
|
|
4154
4154
|
);
|
|
4155
4155
|
n({
|
|
4156
4156
|
...t,
|
|
@@ -4226,7 +4226,7 @@ function Ml({ idx: s }) {
|
|
|
4226
4226
|
] });
|
|
4227
4227
|
}
|
|
4228
4228
|
function Ya() {
|
|
4229
|
-
const s =
|
|
4229
|
+
const s = m((p) => p.card), t = m(
|
|
4230
4230
|
(p) => {
|
|
4231
4231
|
var u, b, g;
|
|
4232
4232
|
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;
|
|
@@ -4261,15 +4261,15 @@ function Ya() {
|
|
|
4261
4261
|
] });
|
|
4262
4262
|
}
|
|
4263
4263
|
function El({ col: s, idx: t }) {
|
|
4264
|
-
const a =
|
|
4264
|
+
const a = m((o) => {
|
|
4265
4265
|
var c;
|
|
4266
4266
|
return (c = o.card) == null ? void 0 : c.preferences;
|
|
4267
|
-
}), n =
|
|
4267
|
+
}), n = m(
|
|
4268
4268
|
(o) => {
|
|
4269
4269
|
var c;
|
|
4270
4270
|
return (c = o.card.preferences) == null ? void 0 : c.datasetOptions;
|
|
4271
4271
|
}
|
|
4272
|
-
), l = n == null ? void 0 : n.find((o) => o.idx === t), { setCardPreferences: d } =
|
|
4272
|
+
), l = n == null ? void 0 : n.find((o) => o.idx === t), { setCardPreferences: d } = m((o) => o.actions);
|
|
4273
4273
|
function i(o) {
|
|
4274
4274
|
if (!l)
|
|
4275
4275
|
d({
|
|
@@ -4319,25 +4319,25 @@ function El({ col: s, idx: t }) {
|
|
|
4319
4319
|
className: "invisible size-4 cursor-pointer text-muted-foreground hover:text-foreground group-hover:visible"
|
|
4320
4320
|
}
|
|
4321
4321
|
),
|
|
4322
|
-
/* @__PURE__ */ e.jsx(
|
|
4322
|
+
/* @__PURE__ */ e.jsx(Tl, { idx: t })
|
|
4323
4323
|
] })
|
|
4324
4324
|
] });
|
|
4325
4325
|
}
|
|
4326
4326
|
function Xa() {
|
|
4327
|
-
const s =
|
|
4327
|
+
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) || [], i = z((g) => g.actions.addFilter), o = z((g) => g.actions.removeFilter), c = z(
|
|
4328
4328
|
(g) => g.actions.removeFilterValue
|
|
4329
4329
|
), { modelItems: p, tableName: u } = _e();
|
|
4330
|
-
function b(g,
|
|
4330
|
+
function b(g, h = "dashboard") {
|
|
4331
4331
|
var D;
|
|
4332
4332
|
const j = de(g.column_name), C = de(a || ""), I = de(n || ""), y = de(u);
|
|
4333
|
-
let
|
|
4333
|
+
let M = ga(
|
|
4334
4334
|
I,
|
|
4335
4335
|
y
|
|
4336
|
-
), F = `${
|
|
4336
|
+
), F = `${M}.${j}`;
|
|
4337
4337
|
const A = (D = p == null ? void 0 : p.find(
|
|
4338
4338
|
(E) => E.id === t
|
|
4339
4339
|
)) == null ? void 0 : D.name;
|
|
4340
|
-
t && t !== "none" && (F = `${Ns}.${A}.${j}`,
|
|
4340
|
+
t && t !== "none" && (F = `${Ns}.${A}.${j}`, M = `${Ns}.${A}`);
|
|
4341
4341
|
const N = d == null ? void 0 : d.find(
|
|
4342
4342
|
(E) => E.column === F && E.table === y && (E.database === C || E.database === a)
|
|
4343
4343
|
);
|
|
@@ -4346,7 +4346,7 @@ function Xa() {
|
|
|
4346
4346
|
else {
|
|
4347
4347
|
const E = Ke();
|
|
4348
4348
|
return u === "api" && s ? (i({
|
|
4349
|
-
location:
|
|
4349
|
+
location: h,
|
|
4350
4350
|
id: E,
|
|
4351
4351
|
//uuidv4(),
|
|
4352
4352
|
column: F,
|
|
@@ -4359,14 +4359,14 @@ function Xa() {
|
|
|
4359
4359
|
operation: "in",
|
|
4360
4360
|
sql: Zs(
|
|
4361
4361
|
g.data_type,
|
|
4362
|
-
|
|
4362
|
+
M,
|
|
4363
4363
|
j
|
|
4364
4364
|
)
|
|
4365
4365
|
//DATE_DATA_TYPES.includes(column.data_type) ? dateSql : sql,
|
|
4366
4366
|
}), E) : (i({
|
|
4367
4367
|
id: E,
|
|
4368
4368
|
//uuidv4(),
|
|
4369
|
-
location:
|
|
4369
|
+
location: h,
|
|
4370
4370
|
column: F,
|
|
4371
4371
|
//columnName, //`${qualifiedTableName}.${formattedColumnName}`,
|
|
4372
4372
|
title: g.column_name,
|
|
@@ -4377,7 +4377,7 @@ function Xa() {
|
|
|
4377
4377
|
operation: "in",
|
|
4378
4378
|
sql: Zs(
|
|
4379
4379
|
g.data_type,
|
|
4380
|
-
|
|
4380
|
+
M,
|
|
4381
4381
|
j
|
|
4382
4382
|
)
|
|
4383
4383
|
//DATE_DATA_TYPES.includes(column.data_type) ? dateSql : sql,
|
|
@@ -4389,7 +4389,7 @@ function Xa() {
|
|
|
4389
4389
|
function He() {
|
|
4390
4390
|
const s = z(
|
|
4391
4391
|
(o) => o.dashboard.filters
|
|
4392
|
-
), t =
|
|
4392
|
+
), t = m((o) => o.frame), { setFrame: a } = ie(), { columns: n } = _e(), { assignFilter: l } = Xa();
|
|
4393
4393
|
function d(o) {
|
|
4394
4394
|
const c = l(o, "frame");
|
|
4395
4395
|
a({ ...t, filterId: c });
|
|
@@ -4427,7 +4427,7 @@ function Al({
|
|
|
4427
4427
|
/* @__PURE__ */ e.jsxs(cn, { children: [
|
|
4428
4428
|
/* @__PURE__ */ e.jsx(dn, { children: "No framework found." }),
|
|
4429
4429
|
/* @__PURE__ */ e.jsx(un, { children: s.map((o) => /* @__PURE__ */ e.jsxs(
|
|
4430
|
-
|
|
4430
|
+
mn,
|
|
4431
4431
|
{
|
|
4432
4432
|
value: o.column_name,
|
|
4433
4433
|
onSelect: (c) => {
|
|
@@ -4456,7 +4456,7 @@ function Al({
|
|
|
4456
4456
|
function Vl({
|
|
4457
4457
|
cardType: s
|
|
4458
4458
|
}) {
|
|
4459
|
-
return /* @__PURE__ */ e.jsx("div", { className: "space-y-6 px-6 py-2", children: /* @__PURE__ */ e.jsxs(
|
|
4459
|
+
return /* @__PURE__ */ e.jsx("div", { className: "space-y-6 px-6 py-2", children: /* @__PURE__ */ e.jsxs(Me, { defaultValue: ["item-2"], type: "multiple", children: [
|
|
4460
4460
|
/* @__PURE__ */ e.jsxs(G, { value: "item-1", children: [
|
|
4461
4461
|
/* @__PURE__ */ e.jsx(Q, { children: `${Ps(s)} Chart` }),
|
|
4462
4462
|
/* @__PURE__ */ e.jsxs(J, { className: "space-y-4 font-mono text-xs", children: [
|
|
@@ -4492,7 +4492,7 @@ function Vl({
|
|
|
4492
4492
|
/* @__PURE__ */ e.jsxs(G, { value: "item-3", children: [
|
|
4493
4493
|
/* @__PURE__ */ e.jsx(Q, { children: "Filters" }),
|
|
4494
4494
|
/* @__PURE__ */ e.jsxs(J, { className: "space-y-4 px-2", children: [
|
|
4495
|
-
/* @__PURE__ */ e.jsx(
|
|
4495
|
+
/* @__PURE__ */ e.jsx(Te, {}),
|
|
4496
4496
|
/* @__PURE__ */ e.jsx(He, {})
|
|
4497
4497
|
] })
|
|
4498
4498
|
] })
|
|
@@ -4500,9 +4500,9 @@ function Vl({
|
|
|
4500
4500
|
}
|
|
4501
4501
|
function Qs() {
|
|
4502
4502
|
var l, d, i;
|
|
4503
|
-
const s =
|
|
4503
|
+
const s = m(
|
|
4504
4504
|
(o) => o.card.cfg
|
|
4505
|
-
), t =
|
|
4505
|
+
), t = m((o) => o.actions.setCardCfg), a = m((o) => o.card.type);
|
|
4506
4506
|
function n(o) {
|
|
4507
4507
|
var u;
|
|
4508
4508
|
const c = {
|
|
@@ -4530,13 +4530,13 @@ function Qs() {
|
|
|
4530
4530
|
!["pyramid"].includes(a) && /* @__PURE__ */ e.jsx(Wa, {})
|
|
4531
4531
|
] }),
|
|
4532
4532
|
/* @__PURE__ */ e.jsxs(
|
|
4533
|
-
|
|
4533
|
+
me,
|
|
4534
4534
|
{
|
|
4535
4535
|
value: (i = (d = (l = s == null ? void 0 : s.options) == null ? void 0 : l.plugins) == null ? void 0 : d.datalabels) == null ? void 0 : i.anchor,
|
|
4536
4536
|
onValueChange: n,
|
|
4537
4537
|
defaultValue: "none",
|
|
4538
4538
|
children: [
|
|
4539
|
-
/* @__PURE__ */ e.jsx(
|
|
4539
|
+
/* @__PURE__ */ e.jsx(he, { className: "h-8 w-full focus:ring-1 focus:ring-offset-0", children: /* @__PURE__ */ e.jsx(xe, { placeholder: "Select position" }) }),
|
|
4540
4540
|
/* @__PURE__ */ e.jsx(pe, { children: /* @__PURE__ */ e.jsxs(Se, { children: [
|
|
4541
4541
|
/* @__PURE__ */ e.jsx(fe, { children: "Data Labels" }),
|
|
4542
4542
|
/* @__PURE__ */ e.jsx(Y, { value: "none", children: "None" }),
|
|
@@ -4578,7 +4578,7 @@ function ql({
|
|
|
4578
4578
|
] })
|
|
4579
4579
|
] });
|
|
4580
4580
|
}
|
|
4581
|
-
return /* @__PURE__ */ e.jsx("div", { className: "space-y-6 px-6 py-2", children: /* @__PURE__ */ e.jsxs(
|
|
4581
|
+
return /* @__PURE__ */ e.jsx("div", { className: "space-y-6 px-6 py-2", children: /* @__PURE__ */ e.jsxs(Me, { defaultValue: ["item-2"], type: "multiple", children: [
|
|
4582
4582
|
/* @__PURE__ */ e.jsxs(G, { value: "item-1", children: [
|
|
4583
4583
|
/* @__PURE__ */ e.jsx(Q, { children: `${Ps(s)} Chart` }),
|
|
4584
4584
|
/* @__PURE__ */ e.jsx(J, { className: "space-y-4 font-mono text-xs", children: t(s) })
|
|
@@ -4590,7 +4590,7 @@ function ql({
|
|
|
4590
4590
|
/* @__PURE__ */ e.jsxs(G, { value: "item-3", children: [
|
|
4591
4591
|
/* @__PURE__ */ e.jsx(Q, { children: "Filters" }),
|
|
4592
4592
|
/* @__PURE__ */ e.jsxs(J, { className: "space-y-4 px-2", children: [
|
|
4593
|
-
/* @__PURE__ */ e.jsx(
|
|
4593
|
+
/* @__PURE__ */ e.jsx(Te, {}),
|
|
4594
4594
|
/* @__PURE__ */ e.jsx(He, {})
|
|
4595
4595
|
] })
|
|
4596
4596
|
] })
|
|
@@ -4620,10 +4620,10 @@ const Rl = {
|
|
|
4620
4620
|
]
|
|
4621
4621
|
};
|
|
4622
4622
|
function Hl() {
|
|
4623
|
-
const s =
|
|
4623
|
+
const s = m((t) => t.card.type);
|
|
4624
4624
|
return /* @__PURE__ */ e.jsxs("div", { className: "space-y-6 p-6", children: [
|
|
4625
4625
|
/* @__PURE__ */ e.jsx(
|
|
4626
|
-
|
|
4626
|
+
Me,
|
|
4627
4627
|
{
|
|
4628
4628
|
className: " ",
|
|
4629
4629
|
type: "single",
|
|
@@ -4634,7 +4634,7 @@ function Hl() {
|
|
|
4634
4634
|
/* @__PURE__ */ e.jsx("section", { className: "", children: ["line", "bar"].includes(s) && /* @__PURE__ */ e.jsx(bs, {}) }),
|
|
4635
4635
|
!["kpi"].includes(s) && /* @__PURE__ */ e.jsxs("div", { className: "space-y-4", children: [
|
|
4636
4636
|
/* @__PURE__ */ e.jsx(Qs, {}),
|
|
4637
|
-
/* @__PURE__ */ e.jsx(
|
|
4637
|
+
/* @__PURE__ */ e.jsx(Te, {}),
|
|
4638
4638
|
/* @__PURE__ */ e.jsx(He, {})
|
|
4639
4639
|
] })
|
|
4640
4640
|
] });
|
|
@@ -4738,51 +4738,51 @@ function $l(s) {
|
|
|
4738
4738
|
}
|
|
4739
4739
|
function Pl() {
|
|
4740
4740
|
var c, p, u, b, g;
|
|
4741
|
-
const s =
|
|
4742
|
-
(
|
|
4743
|
-
), a =
|
|
4744
|
-
(
|
|
4741
|
+
const s = m((h) => h.card.preferences), t = m(
|
|
4742
|
+
(h) => h.actions.setCardPreferences
|
|
4743
|
+
), a = m(
|
|
4744
|
+
(h) => h.actions.setNumberFormat
|
|
4745
4745
|
);
|
|
4746
|
-
|
|
4747
|
-
(
|
|
4746
|
+
m(
|
|
4747
|
+
(h) => {
|
|
4748
4748
|
var j, C;
|
|
4749
|
-
return (C = (j =
|
|
4749
|
+
return (C = (j = h.card.preferences) == null ? void 0 : j.formatNumber) == null ? void 0 : C.decimalPlaces;
|
|
4750
4750
|
}
|
|
4751
4751
|
);
|
|
4752
|
-
const n =
|
|
4753
|
-
(
|
|
4752
|
+
const n = m(
|
|
4753
|
+
(h) => {
|
|
4754
4754
|
var j, C;
|
|
4755
|
-
return (C = (j =
|
|
4755
|
+
return (C = (j = h.card.preferences) == null ? void 0 : j.formatNumber) == null ? void 0 : C.locale;
|
|
4756
4756
|
}
|
|
4757
|
-
), l =
|
|
4758
|
-
(
|
|
4757
|
+
), l = m(
|
|
4758
|
+
(h) => {
|
|
4759
4759
|
var j, C;
|
|
4760
|
-
return (C = (j =
|
|
4760
|
+
return (C = (j = h.card.preferences) == null ? void 0 : j.formatNumber) == null ? void 0 : C.currency;
|
|
4761
4761
|
}
|
|
4762
4762
|
);
|
|
4763
|
-
|
|
4764
|
-
(
|
|
4763
|
+
m(
|
|
4764
|
+
(h) => h.actions.setFilterOnClickField
|
|
4765
4765
|
);
|
|
4766
|
-
const d =
|
|
4767
|
-
(
|
|
4766
|
+
const d = m(
|
|
4767
|
+
(h) => {
|
|
4768
4768
|
var j, C;
|
|
4769
|
-
return (C = (j =
|
|
4769
|
+
return (C = (j = h.card.preferences) == null ? void 0 : j.formatNumber) == null ? void 0 : C.colorRanges;
|
|
4770
4770
|
}
|
|
4771
|
-
) || [], i =
|
|
4772
|
-
(
|
|
4773
|
-
), o = [...new Set(us.map((
|
|
4771
|
+
) || [], i = m(
|
|
4772
|
+
(h) => h.actions.setColorRanges
|
|
4773
|
+
), o = [...new Set(us.map((h) => h.currency))];
|
|
4774
4774
|
return /* @__PURE__ */ e.jsxs("div", { children: [
|
|
4775
4775
|
/* @__PURE__ */ e.jsxs("div", { className: "mb-3 flex items-center gap-2", children: [
|
|
4776
4776
|
/* @__PURE__ */ e.jsx(
|
|
4777
4777
|
$s,
|
|
4778
4778
|
{
|
|
4779
4779
|
checked: !!((c = s == null ? void 0 : s.formatNumber) != null && c.enabled),
|
|
4780
|
-
onCheckedChange: (
|
|
4780
|
+
onCheckedChange: (h) => {
|
|
4781
4781
|
t({
|
|
4782
4782
|
...s,
|
|
4783
4783
|
formatNumber: {
|
|
4784
4784
|
...s == null ? void 0 : s.formatNumber,
|
|
4785
|
-
enabled:
|
|
4785
|
+
enabled: h
|
|
4786
4786
|
}
|
|
4787
4787
|
});
|
|
4788
4788
|
}
|
|
@@ -4796,24 +4796,24 @@ function Pl() {
|
|
|
4796
4796
|
/* @__PURE__ */ e.jsxs("div", { className: "w-full space-y-1", children: [
|
|
4797
4797
|
/* @__PURE__ */ e.jsx(_, { children: "Locale" }),
|
|
4798
4798
|
/* @__PURE__ */ e.jsxs(
|
|
4799
|
-
|
|
4799
|
+
me,
|
|
4800
4800
|
{
|
|
4801
4801
|
value: n || "none",
|
|
4802
|
-
onValueChange: (
|
|
4802
|
+
onValueChange: (h) => {
|
|
4803
4803
|
var j, C, I;
|
|
4804
4804
|
return a(
|
|
4805
4805
|
((j = s == null ? void 0 : s.formatNumber) == null ? void 0 : j.decimalPlaces) || 0,
|
|
4806
4806
|
((C = s == null ? void 0 : s.formatNumber) == null ? void 0 : C.currency) || "",
|
|
4807
|
-
|
|
4807
|
+
h,
|
|
4808
4808
|
((I = s == null ? void 0 : s.formatNumber) == null ? void 0 : I.suffix) || ""
|
|
4809
4809
|
);
|
|
4810
4810
|
},
|
|
4811
4811
|
children: [
|
|
4812
|
-
/* @__PURE__ */ e.jsx(
|
|
4812
|
+
/* @__PURE__ */ e.jsx(he, { className: "col-span-6 h-8 w-full focus:ring-1 focus:ring-offset-0", children: /* @__PURE__ */ e.jsx(xe, {}) }),
|
|
4813
4813
|
/* @__PURE__ */ e.jsx(pe, { children: /* @__PURE__ */ e.jsxs(Se, { children: [
|
|
4814
4814
|
/* @__PURE__ */ e.jsx(fe, { children: "Format" }),
|
|
4815
4815
|
/* @__PURE__ */ e.jsx(Y, { value: "none", children: "None" }, "none"),
|
|
4816
|
-
us.map((
|
|
4816
|
+
us.map((h) => /* @__PURE__ */ e.jsx(Y, { value: h.locale, children: h.locale }, h.locale))
|
|
4817
4817
|
] }) })
|
|
4818
4818
|
]
|
|
4819
4819
|
}
|
|
@@ -4822,24 +4822,24 @@ function Pl() {
|
|
|
4822
4822
|
/* @__PURE__ */ e.jsxs("div", { className: "w-full space-y-1", children: [
|
|
4823
4823
|
/* @__PURE__ */ e.jsx(_, { children: "Currency" }),
|
|
4824
4824
|
/* @__PURE__ */ e.jsxs(
|
|
4825
|
-
|
|
4825
|
+
me,
|
|
4826
4826
|
{
|
|
4827
4827
|
value: l || "none",
|
|
4828
|
-
onValueChange: (
|
|
4828
|
+
onValueChange: (h) => {
|
|
4829
4829
|
var j, C, I;
|
|
4830
|
-
console.log("currency",
|
|
4830
|
+
console.log("currency", h), a(
|
|
4831
4831
|
((j = s == null ? void 0 : s.formatNumber) == null ? void 0 : j.decimalPlaces) || 0,
|
|
4832
|
-
|
|
4832
|
+
h === "none" ? "" : h,
|
|
4833
4833
|
((C = s == null ? void 0 : s.formatNumber) == null ? void 0 : C.locale) || "",
|
|
4834
4834
|
((I = s == null ? void 0 : s.formatNumber) == null ? void 0 : I.suffix) || ""
|
|
4835
4835
|
);
|
|
4836
4836
|
},
|
|
4837
4837
|
children: [
|
|
4838
|
-
/* @__PURE__ */ e.jsx(
|
|
4838
|
+
/* @__PURE__ */ e.jsx(he, { className: "col-span-6 h-8 w-full focus:ring-1 focus:ring-offset-0", children: /* @__PURE__ */ e.jsx(xe, {}) }),
|
|
4839
4839
|
/* @__PURE__ */ e.jsx(pe, { children: /* @__PURE__ */ e.jsxs(Se, { children: [
|
|
4840
4840
|
/* @__PURE__ */ e.jsx(fe, { children: "Currency" }),
|
|
4841
4841
|
/* @__PURE__ */ e.jsx(Y, { value: "none", children: "None" }, "none"),
|
|
4842
|
-
o.map((
|
|
4842
|
+
o.map((h) => /* @__PURE__ */ e.jsx(Y, { value: h, children: h }, h))
|
|
4843
4843
|
] }) })
|
|
4844
4844
|
]
|
|
4845
4845
|
}
|
|
@@ -4850,21 +4850,21 @@ function Pl() {
|
|
|
4850
4850
|
/* @__PURE__ */ e.jsxs("div", { className: "w-full space-y-1", children: [
|
|
4851
4851
|
/* @__PURE__ */ e.jsx(_, { children: "Decimals" }),
|
|
4852
4852
|
/* @__PURE__ */ e.jsxs(
|
|
4853
|
-
|
|
4853
|
+
me,
|
|
4854
4854
|
{
|
|
4855
4855
|
value: ((b = (u = s == null ? void 0 : s.formatNumber) == null ? void 0 : u.decimalPlaces) == null ? void 0 : b.toString()) || "0",
|
|
4856
|
-
onValueChange: (
|
|
4856
|
+
onValueChange: (h) => {
|
|
4857
4857
|
var j, C, I;
|
|
4858
4858
|
return a(
|
|
4859
|
-
Number(
|
|
4859
|
+
Number(h),
|
|
4860
4860
|
((j = s == null ? void 0 : s.formatNumber) == null ? void 0 : j.currency) || "",
|
|
4861
4861
|
((C = s == null ? void 0 : s.formatNumber) == null ? void 0 : C.locale) || "",
|
|
4862
4862
|
((I = s == null ? void 0 : s.formatNumber) == null ? void 0 : I.suffix) || ""
|
|
4863
4863
|
);
|
|
4864
4864
|
},
|
|
4865
4865
|
children: [
|
|
4866
|
-
/* @__PURE__ */ e.jsx(
|
|
4867
|
-
/* @__PURE__ */ e.jsx(pe, { children: ["0", "1", "2", "3", "4"].map((
|
|
4866
|
+
/* @__PURE__ */ e.jsx(he, { className: "col-span-3 h-8 w-full focus:ring-1 focus:ring-offset-0", children: /* @__PURE__ */ e.jsx(xe, {}) }),
|
|
4867
|
+
/* @__PURE__ */ e.jsx(pe, { children: ["0", "1", "2", "3", "4"].map((h) => /* @__PURE__ */ e.jsx(Y, { value: h, children: h }, h)) })
|
|
4868
4868
|
]
|
|
4869
4869
|
}
|
|
4870
4870
|
)
|
|
@@ -4877,13 +4877,13 @@ function Pl() {
|
|
|
4877
4877
|
value: ((g = s == null ? void 0 : s.formatNumber) == null ? void 0 : g.suffix) || "",
|
|
4878
4878
|
className: "h-8 font-mono text-xs focus-visible:ring-0 focus-visible:ring-ring focus-visible:ring-offset-0",
|
|
4879
4879
|
placeholder: "K, M, B, %",
|
|
4880
|
-
onChange: (
|
|
4880
|
+
onChange: (h) => {
|
|
4881
4881
|
var j, C, I;
|
|
4882
4882
|
return a(
|
|
4883
4883
|
((j = s == null ? void 0 : s.formatNumber) == null ? void 0 : j.decimalPlaces) || 0,
|
|
4884
4884
|
((C = s == null ? void 0 : s.formatNumber) == null ? void 0 : C.currency) || "",
|
|
4885
4885
|
((I = s == null ? void 0 : s.formatNumber) == null ? void 0 : I.locale) || "",
|
|
4886
|
-
|
|
4886
|
+
h.target.value
|
|
4887
4887
|
);
|
|
4888
4888
|
}
|
|
4889
4889
|
}
|
|
@@ -4893,7 +4893,7 @@ function Pl() {
|
|
|
4893
4893
|
] }) }),
|
|
4894
4894
|
/* @__PURE__ */ e.jsx(we, { className: "my-3" }),
|
|
4895
4895
|
/* @__PURE__ */ e.jsx(
|
|
4896
|
-
|
|
4896
|
+
hn,
|
|
4897
4897
|
{
|
|
4898
4898
|
colorRanges: d,
|
|
4899
4899
|
setColorRanges: i
|
|
@@ -4904,7 +4904,7 @@ function Pl() {
|
|
|
4904
4904
|
}
|
|
4905
4905
|
function Bl() {
|
|
4906
4906
|
return /* @__PURE__ */ e.jsxs("div", { className: "space-y-6 px-6 py-2", children: [
|
|
4907
|
-
/* @__PURE__ */ e.jsx(
|
|
4907
|
+
/* @__PURE__ */ e.jsx(Me, { type: "single", collapsible: !0, children: /* @__PURE__ */ e.jsxs(G, { value: "item-1", children: [
|
|
4908
4908
|
/* @__PURE__ */ e.jsx(Q, { className: "", children: "KPI Query" }),
|
|
4909
4909
|
/* @__PURE__ */ e.jsxs(J, { className: "font-mono", children: [
|
|
4910
4910
|
/* @__PURE__ */ e.jsx("div", { className: "rounded bg-muted px-2 py-1 font-mono text-xs", children: "SELECT current, previous FROM table" }),
|
|
@@ -5034,8 +5034,8 @@ const Ul = [
|
|
|
5034
5034
|
value: s
|
|
5035
5035
|
}));
|
|
5036
5036
|
function Jl() {
|
|
5037
|
-
var c, p, u, b, g,
|
|
5038
|
-
const s =
|
|
5037
|
+
var c, p, u, b, g, h, j, C, I, y, M, F, A, N, D, E, x, v;
|
|
5038
|
+
const s = m((f) => f.card), t = (p = (c = s == null ? void 0 : s.preferences) == null ? void 0 : c.mapVisualOptions) == null ? void 0 : p.topoJsonUrl, [a, n] = V(
|
|
5039
5039
|
((b = (u = s == null ? void 0 : s.preferences) == null ? void 0 : u.mapVisualOptions) == null ? void 0 : b.customTopoJsonUrl) || ""
|
|
5040
5040
|
), { setCardPreferences: l } = ie(), { data: d } = Hs(s), i = Object.keys((d == null ? void 0 : d.objects) || {}).map((f) => ({
|
|
5041
5041
|
label: f,
|
|
@@ -5105,7 +5105,7 @@ function Jl() {
|
|
|
5105
5105
|
{
|
|
5106
5106
|
className: "h-9",
|
|
5107
5107
|
options: i,
|
|
5108
|
-
value: ((
|
|
5108
|
+
value: ((h = (g = s.preferences) == null ? void 0 : g.mapVisualOptions) == null ? void 0 : h.objectKey) || "",
|
|
5109
5109
|
label: "Map Object",
|
|
5110
5110
|
onValueChange: (f) => {
|
|
5111
5111
|
var k;
|
|
@@ -5174,7 +5174,7 @@ function Jl() {
|
|
|
5174
5174
|
className: `h-9 w-full ${Ue}`,
|
|
5175
5175
|
type: "number",
|
|
5176
5176
|
step: 0.1,
|
|
5177
|
-
value: ((F = (
|
|
5177
|
+
value: ((F = (M = s.preferences) == null ? void 0 : M.mapVisualOptions) == null ? void 0 : F.projectionScale) || 1,
|
|
5178
5178
|
onChange: (f) => {
|
|
5179
5179
|
var k;
|
|
5180
5180
|
l({
|
|
@@ -5235,12 +5235,12 @@ function Jl() {
|
|
|
5235
5235
|
)
|
|
5236
5236
|
] }) }),
|
|
5237
5237
|
/* @__PURE__ */ e.jsx(we, { className: "my-4" }),
|
|
5238
|
-
/* @__PURE__ */ e.jsx(
|
|
5238
|
+
/* @__PURE__ */ e.jsx(Te, {})
|
|
5239
5239
|
] });
|
|
5240
5240
|
}
|
|
5241
5241
|
function Kl() {
|
|
5242
5242
|
var n;
|
|
5243
|
-
const s =
|
|
5243
|
+
const s = m((l) => l.card.preferences), { setCardPreferences: t } = m((l) => l.actions);
|
|
5244
5244
|
function a(l) {
|
|
5245
5245
|
t({
|
|
5246
5246
|
...s,
|
|
@@ -5259,11 +5259,11 @@ function Kl() {
|
|
|
5259
5259
|
defaultValue: "x",
|
|
5260
5260
|
children: [
|
|
5261
5261
|
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center space-x-2", children: [
|
|
5262
|
-
/* @__PURE__ */ e.jsx(
|
|
5262
|
+
/* @__PURE__ */ e.jsx(Le, { value: "static", id: "r1" }),
|
|
5263
5263
|
/* @__PURE__ */ e.jsx("label", { className: "text-sm", htmlFor: "r1", children: "Static" })
|
|
5264
5264
|
] }),
|
|
5265
5265
|
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center space-x-2", children: [
|
|
5266
|
-
/* @__PURE__ */ e.jsx(
|
|
5266
|
+
/* @__PURE__ */ e.jsx(Le, { value: "dynamic", id: "r2" }),
|
|
5267
5267
|
/* @__PURE__ */ e.jsx("label", { className: "text-sm", htmlFor: "r2", children: "Dynamic" })
|
|
5268
5268
|
] })
|
|
5269
5269
|
]
|
|
@@ -5276,7 +5276,7 @@ function ls({
|
|
|
5276
5276
|
suffix: a = "Chart"
|
|
5277
5277
|
}) {
|
|
5278
5278
|
let n = "pie-chart";
|
|
5279
|
-
return s === "radar" && (n = "radar-chart"), /* @__PURE__ */ e.jsx("div", { className: "space-y-6 px-6 py-2", children: /* @__PURE__ */ e.jsxs(
|
|
5279
|
+
return s === "radar" && (n = "radar-chart"), /* @__PURE__ */ e.jsx("div", { className: "space-y-6 px-6 py-2", children: /* @__PURE__ */ e.jsxs(Me, { defaultValue: ["item-2"], type: "multiple", children: [
|
|
5280
5280
|
/* @__PURE__ */ e.jsxs(G, { value: "item-1", children: [
|
|
5281
5281
|
/* @__PURE__ */ e.jsx(Q, { children: `${Ps(s)} ${a}` }),
|
|
5282
5282
|
/* @__PURE__ */ e.jsx(J, { children: t || /* @__PURE__ */ e.jsxs("div", { className: "space-y-4 font-mono text-xs", children: [
|
|
@@ -5312,14 +5312,14 @@ function ls({
|
|
|
5312
5312
|
!["range", "text"].includes(s) && /* @__PURE__ */ e.jsxs(G, { value: "item-3", children: [
|
|
5313
5313
|
/* @__PURE__ */ e.jsx(Q, { children: "Filters" }),
|
|
5314
5314
|
/* @__PURE__ */ e.jsxs(J, { className: "space-y-4 px-2", children: [
|
|
5315
|
-
/* @__PURE__ */ e.jsx(
|
|
5315
|
+
/* @__PURE__ */ e.jsx(Te, {}),
|
|
5316
5316
|
/* @__PURE__ */ e.jsx(He, {})
|
|
5317
5317
|
] })
|
|
5318
5318
|
] })
|
|
5319
5319
|
] }) });
|
|
5320
5320
|
}
|
|
5321
5321
|
function Wl() {
|
|
5322
|
-
const s =
|
|
5322
|
+
const s = m(
|
|
5323
5323
|
(n) => {
|
|
5324
5324
|
var l, d;
|
|
5325
5325
|
return (d = (l = n == null ? void 0 : n.card) == null ? void 0 : l.preferences) == null ? void 0 : d.sortChart;
|
|
@@ -5355,7 +5355,7 @@ function Wl() {
|
|
|
5355
5355
|
)
|
|
5356
5356
|
] });
|
|
5357
5357
|
}
|
|
5358
|
-
return /* @__PURE__ */ e.jsx("div", { className: "space-y-6 px-6 py-2", children: /* @__PURE__ */ e.jsxs(
|
|
5358
|
+
return /* @__PURE__ */ e.jsx("div", { className: "space-y-6 px-6 py-2", children: /* @__PURE__ */ e.jsxs(Me, { defaultValue: ["item-2"], type: "multiple", children: [
|
|
5359
5359
|
/* @__PURE__ */ e.jsxs(G, { value: "item-1", children: [
|
|
5360
5360
|
/* @__PURE__ */ e.jsx(Q, { children: "Stacked Chart" }),
|
|
5361
5361
|
/* @__PURE__ */ e.jsxs(J, { className: "space-y-4 font-mono text-xs", children: [
|
|
@@ -5392,17 +5392,17 @@ function Wl() {
|
|
|
5392
5392
|
/* @__PURE__ */ e.jsxs(G, { value: "item-3", children: [
|
|
5393
5393
|
/* @__PURE__ */ e.jsx(Q, { children: "Filters" }),
|
|
5394
5394
|
/* @__PURE__ */ e.jsxs(J, { className: "space-y-4 px-2", children: [
|
|
5395
|
-
/* @__PURE__ */ e.jsx(
|
|
5395
|
+
/* @__PURE__ */ e.jsx(Te, {}),
|
|
5396
5396
|
/* @__PURE__ */ e.jsx(He, {})
|
|
5397
5397
|
] })
|
|
5398
5398
|
] })
|
|
5399
5399
|
] }) });
|
|
5400
5400
|
}
|
|
5401
5401
|
function Yl({}) {
|
|
5402
|
-
const s =
|
|
5402
|
+
const s = m((n) => {
|
|
5403
5403
|
var l;
|
|
5404
5404
|
return (l = n.card) == null ? void 0 : l.preferences;
|
|
5405
|
-
}), t =
|
|
5405
|
+
}), t = m(
|
|
5406
5406
|
(n) => n.actions.setCardPreferences
|
|
5407
5407
|
), a = (n) => {
|
|
5408
5408
|
t({
|
|
@@ -5411,10 +5411,10 @@ function Yl({}) {
|
|
|
5411
5411
|
});
|
|
5412
5412
|
};
|
|
5413
5413
|
return /* @__PURE__ */ e.jsxs("div", { className: "space-y-6 px-6 py-2", children: [
|
|
5414
|
-
/* @__PURE__ */ e.jsx(
|
|
5414
|
+
/* @__PURE__ */ e.jsx(Me, { defaultValue: ["item-3"], type: "multiple", children: /* @__PURE__ */ e.jsxs(G, { value: "item-3", children: [
|
|
5415
5415
|
/* @__PURE__ */ e.jsx(Q, { children: "Filters" }),
|
|
5416
5416
|
/* @__PURE__ */ e.jsxs(J, { className: "space-y-4 px-2", children: [
|
|
5417
|
-
/* @__PURE__ */ e.jsx(
|
|
5417
|
+
/* @__PURE__ */ e.jsx(Te, {}),
|
|
5418
5418
|
/* @__PURE__ */ e.jsx(He, {})
|
|
5419
5419
|
] })
|
|
5420
5420
|
] }) }),
|
|
@@ -5481,7 +5481,7 @@ const Xl = /* @__PURE__ */ e.jsxs("div", { className: "space-y-4 font-mono text-
|
|
|
5481
5481
|
] })
|
|
5482
5482
|
] });
|
|
5483
5483
|
function sr() {
|
|
5484
|
-
const s =
|
|
5484
|
+
const s = m((a) => a.card.type);
|
|
5485
5485
|
function t(a) {
|
|
5486
5486
|
switch (a) {
|
|
5487
5487
|
case "stackedBar":
|
|
@@ -5518,7 +5518,7 @@ function sr() {
|
|
|
5518
5518
|
case "map":
|
|
5519
5519
|
return /* @__PURE__ */ e.jsx(Jl, {});
|
|
5520
5520
|
case "custom":
|
|
5521
|
-
return /* @__PURE__ */ e.jsx(
|
|
5521
|
+
return /* @__PURE__ */ e.jsx(Ml, {});
|
|
5522
5522
|
default:
|
|
5523
5523
|
return /* @__PURE__ */ e.jsx(Hl, {});
|
|
5524
5524
|
}
|
|
@@ -5526,7 +5526,7 @@ function sr() {
|
|
|
5526
5526
|
return /* @__PURE__ */ e.jsx(ze, { className: "h-full w-full text-sm", children: t(s) });
|
|
5527
5527
|
}
|
|
5528
5528
|
function ar() {
|
|
5529
|
-
const s =
|
|
5529
|
+
const s = m((t) => t.isShowingVisual);
|
|
5530
5530
|
return /* @__PURE__ */ e.jsxs(
|
|
5531
5531
|
cs,
|
|
5532
5532
|
{
|
|
@@ -5573,7 +5573,7 @@ function ar() {
|
|
|
5573
5573
|
}
|
|
5574
5574
|
function tr({ authToken: s, onSave: t, onClose: a }) {
|
|
5575
5575
|
z((i) => i.themeStyle);
|
|
5576
|
-
const n =
|
|
5576
|
+
const n = m((i) => i.actions.setOnSave), l = m((i) => i.actions.setOnClose), d = z((i) => i.actions.setAuthToken);
|
|
5577
5577
|
return se(() => {
|
|
5578
5578
|
t && n(t), a && l(a);
|
|
5579
5579
|
}, [t, n, a, l]), se(() => {
|
|
@@ -5615,10 +5615,10 @@ function nr() {
|
|
|
5615
5615
|
);
|
|
5616
5616
|
}
|
|
5617
5617
|
function lr() {
|
|
5618
|
-
|
|
5619
|
-
const s =
|
|
5620
|
-
|
|
5621
|
-
const t =
|
|
5618
|
+
m((i) => i.selectedConnectionId), m((i) => i.selectedDatamodelId);
|
|
5619
|
+
const s = m((i) => i.selectedDatabaseName);
|
|
5620
|
+
m((i) => i.selectedSchemaName);
|
|
5621
|
+
const t = m((i) => i.selectedTableName), a = z((i) => i.dashboard.filters) || [];
|
|
5622
5622
|
z((i) => i.actions.addFilter), z((i) => i.actions.removeFilter), z(
|
|
5623
5623
|
(i) => i.actions.removeFilterValue
|
|
5624
5624
|
);
|
|
@@ -5739,7 +5739,7 @@ function or() {
|
|
|
5739
5739
|
}
|
|
5740
5740
|
);
|
|
5741
5741
|
}
|
|
5742
|
-
function
|
|
5742
|
+
function mr({
|
|
5743
5743
|
showControls: s = !1,
|
|
5744
5744
|
showFooter: t = !0,
|
|
5745
5745
|
...a
|
|
@@ -5757,17 +5757,17 @@ function hr({
|
|
|
5757
5757
|
] }) });
|
|
5758
5758
|
}
|
|
5759
5759
|
export {
|
|
5760
|
-
|
|
5760
|
+
Ta as A,
|
|
5761
5761
|
wn as B,
|
|
5762
5762
|
kn as C,
|
|
5763
|
-
|
|
5763
|
+
mr as D,
|
|
5764
5764
|
Da as E,
|
|
5765
5765
|
Xn as F,
|
|
5766
|
-
|
|
5767
|
-
|
|
5766
|
+
Mn as G,
|
|
5767
|
+
Tn as H,
|
|
5768
5768
|
Vn as I,
|
|
5769
5769
|
qn as L,
|
|
5770
|
-
|
|
5770
|
+
La as M,
|
|
5771
5771
|
$n as N,
|
|
5772
5772
|
Pn as P,
|
|
5773
5773
|
Un as S,
|
|
@@ -5782,7 +5782,7 @@ export {
|
|
|
5782
5782
|
On as g,
|
|
5783
5783
|
In as h,
|
|
5784
5784
|
Fn as i,
|
|
5785
|
-
|
|
5785
|
+
Ln as j,
|
|
5786
5786
|
Dn as k,
|
|
5787
5787
|
En as l,
|
|
5788
5788
|
An as m,
|
|
@@ -5791,7 +5791,7 @@ export {
|
|
|
5791
5791
|
qe as p,
|
|
5792
5792
|
Hn as q,
|
|
5793
5793
|
Bn as r,
|
|
5794
|
-
|
|
5794
|
+
Ma as s,
|
|
5795
5795
|
Gn as t,
|
|
5796
5796
|
Qn as u,
|
|
5797
5797
|
Jn as v,
|