react-semaphor 0.1.127 → 0.1.129
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/dashboard-controls-CdYJPicU.js +1539 -0
- package/dist/chunks/dashboard-controls-D9rqbD5g.js +26 -0
- package/dist/chunks/dashboard-export-dialog-BjqND5hL.js +6 -0
- package/dist/chunks/dashboard-export-dialog-DNF_PQZb.js +601 -0
- package/dist/chunks/{dashboard-json-Bqddgxcf.js → dashboard-json-Dtshd-QS.js} +1 -1
- package/dist/chunks/{dashboard-json-CZrxKZBn.js → dashboard-json-xVrkPU1h.js} +1 -1
- package/dist/chunks/{edit-dashboard-visual-Du3rYBkf.js → edit-dashboard-visual-VEw_9V-L.js} +187 -187
- package/dist/chunks/{edit-dashboard-visual-Kg8h34hs.js → edit-dashboard-visual-YSsXOgAP.js} +1 -1
- package/dist/chunks/{editor-action-buttons-BMeOcqc2.js → editor-action-buttons-BFF_pszh.js} +2 -2
- package/dist/chunks/{editor-action-buttons-DHk1Cdb6.js → editor-action-buttons-C3KskLE0.js} +1 -1
- package/dist/chunks/{index-DJmpV5Lg.js → index-Df1tIEqs.js} +219 -219
- package/dist/chunks/{index-DLxVadBx.js → index-vRQsO2Ki.js} +20503 -20317
- package/dist/chunks/{resource-management-panel-D6gqCHWr.js → resource-management-panel-C2Ee-LoN.js} +1 -1
- package/dist/chunks/{resource-management-panel-VT7LYPp8.js → resource-management-panel-DBZxxjm6.js} +88 -88
- package/dist/chunks/{use-visual-utils-DpxMI5Pe.js → use-visual-utils-BMr6v4np.js} +8 -8
- package/dist/chunks/{use-visual-utils-O1QcxL8l.js → use-visual-utils-Cdg5yE9F.js} +1 -1
- package/dist/dashboard/index.cjs +1 -1
- package/dist/dashboard/index.js +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.js +88 -87
- package/dist/style.css +1 -1
- package/dist/surfboard/index.cjs +1 -1
- package/dist/surfboard/index.js +1 -1
- package/dist/types/dashboard.d.ts +9 -0
- package/dist/types/main.d.ts +27 -42
- package/dist/types/surfboard.d.ts +9 -0
- package/dist/types/types.d.ts +9 -0
- package/package.json +1 -1
- package/dist/chunks/dashboard-controls-BFo8ClGD.js +0 -1473
- package/dist/chunks/dashboard-controls-CpNsaWbB.js +0 -26
- package/dist/chunks/dashboard-export-dialog-CKGJIz95.js +0 -6
- package/dist/chunks/dashboard-export-dialog-CKr9o8DW.js +0 -600
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsxs as a, jsx as e, Fragment as re } from "react/jsx-runtime";
|
|
2
|
-
import { b as pe, l as dt, e as le, f as I,
|
|
2
|
+
import { b as pe, l as dt, e as le, f as I, c7 as ca, aw as P, c8 as W, c9 as X, ca as Z, cb as ee, cc as K, cd as ve, B as q, b7 as Ge, ce as Ea, cf as Ts, cg as Es, ch as Ds, ci as Ms, cj as da, r as Ye, X as Ae, ck as mn, bc as hn, ar as yt, as as Nt, at as Ct, au as wt, av as Kt, k as De, br as Re, bn as Ke, bo as Te, bp as Ee, cl as Qn, cm as pn, u as ke, aA as wa, a_ as ut, bi as Qt, c as Q, az as Ue, cn as Is, b5 as Os, co as ql, cp as Gl, cq as Ul, cr as ea, cs as _l, ct as Rs, bM as Fs, cu as et, cv as ta, cw as va, cx as Jl, cy as ya, cz as fn, cA as Ls, cB as Ps, cC as Ot, cD as Vs, cE as Hl, bC as Ql, cF as Yl, cG as Bs, cH as Wl, cI as gn, cJ as Xl, h as Zl, cK as er, cL as nn, cM as St, cN as Le, cO as kt, L as qt, cP as tr, cQ as zs, c4 as sa, aE as Da, aY as Ma, cR as Yt, cS as ar, bj as Ia, aZ as At, aD as nr, cT as sn, bg as sr, aK as xn, g as js, cU as bn, cV as lr, cW as $s, cX as Ks, cY as Sa, c2 as Ua, cZ as rr, c_ as qs, c$ as ir, d0 as or, d1 as cr, d2 as Oa, d3 as dr, d4 as ur, d5 as Yn, d6 as mr, E as Ra, o as vn, d7 as hr, d8 as yn, bE as pr, I as Ie, d9 as fr, da as gr, bQ as Fa, bR as La, bS as nt, bT as Na, db as xr, am as ua, dc as Nn, dd as br, de as vr, df as yr, dg as Gs, dh as ma, di as Cn, dj as wn, dk as Sn, dl as kn, dm as ha, dn as Pa, dp as Us, dq as ln, dr as An, ds as Tn, dt as _s, du as En, dv as Js, dw as Dn, b6 as Va, dx as Ba, dy as Nr, P as _e, q as Je, s as He, by as za, ax as Be, aF as Mn, aG as In, aI as On, bF as Hs, bb as $t, dz as vt, dA as Cr, dB as wr, dC as Sr, dD as kr, dE as Ar, b2 as Tr, aC as aa, dF as Er, dG as Qs, dH as Rn, dI as Gt, dJ as la, dK as Ys, dL as qe, dM as ue, dN as me, dO as he, b0 as be, dP as ot, c5 as Ws, dQ as Dr, dR as Mr, dS as Ir, dT as Or, dU as Rr, dV as Fr, ag as Xs, dW as Lr, dX as Pr, dY as Vr, t as Tt, v as Et, w as Dt, x as Mt, y as st, z as mt, dZ as Br, d_ as $e, d$ as ga, e0 as Wn, e1 as zr, e2 as Xn, e3 as jr, C as Wt, e4 as Oe, e5 as $r, e6 as Zn, e7 as es, e8 as Kr, e9 as qr, ea as Gr, eb as Ur, ec as _a, ed as Zs, ee as _r, ef as ts, eg as as, bZ as Jr, eh as Hr, ei as Qr, ej as Yr, ek as Wr, el as Xr, ac as ns, em as ss, en as Zr, eo as ei, ep as el, eq as ti, er as tl, es as ai, et as ni, eu as si, ev as li, ew as ri, ex as ii, ey as oi, ez as ci, eA as di, eB as ui, eC as al, eD as mi, eE as hi, eF as pi, eG as fi, eH as gi, eI as xi, eJ as bi, eK as nl, aH as vi, eL as ls, eM as Ja, eN as Fn, Y as yi, eO as Ni, eP as Ci, bL as sl, eQ as Me, ay as wi, _ as ka, eR as Si, eS as ki, eT as ja, eU as ll, eV as $a, eW as Ai, bz as Ti, eX as rs, eY as Ei, eZ as Di, e_ as Mi, e$ as Ca, f0 as It, f1 as ra, f2 as pa, f3 as Ii, f4 as Ln, f5 as rl, f6 as Oi, f7 as Aa, f8 as Ri, f9 as Fi, fa as ia, fb as ct, fc as rn, fd as on, fe as oa, ff as il, fg as Ut, fh as _t, fi as Jt, fj as Li, fk as Ha, fl as Qa, fm as Pi, fn as Ya, fo as Vi, fp as is, fq as Bi, fr as zi, fs as ji, ft as $i, aJ as Pe, fu as Ki, fv as qi, fw as Gi, b1 as Ui, be as Ka, fx as os, fy as ol, fz as Wa, fA as Xa, fB as _i, fC as Ji, fD as Hi, F as Qi } from "./index-vRQsO2Ki.js";
|
|
3
3
|
import * as cn from "react";
|
|
4
4
|
import dn, { useState as $, useEffect as fe, useRef as Qe, useCallback as ze, useContext as Pn, useMemo as Ne, Suspense as Yi } from "react";
|
|
5
|
-
import { d as Vn } from "./editor-action-buttons-
|
|
5
|
+
import { d as Vn } from "./editor-action-buttons-BFF_pszh.js";
|
|
6
6
|
import { createPortal as Wi } from "react-dom";
|
|
7
|
-
import { u as Xi } from "./use-visual-utils-
|
|
7
|
+
import { u as Xi } from "./use-visual-utils-BMr6v4np.js";
|
|
8
8
|
import { u as Zi } from "./use-click-outside-CMeO_QFI.js";
|
|
9
9
|
/**
|
|
10
10
|
* @license lucide-react v0.453.0 - ISC
|
|
@@ -556,7 +556,7 @@ function Ao({
|
|
|
556
556
|
var G;
|
|
557
557
|
return B.name === ((G = S.target) == null ? void 0 : G.name);
|
|
558
558
|
}
|
|
559
|
-
),
|
|
559
|
+
), J = {
|
|
560
560
|
id: `key-${Date.now()}`,
|
|
561
561
|
source: {
|
|
562
562
|
id: `source-${Date.now()}`,
|
|
@@ -582,7 +582,7 @@ function Ao({
|
|
|
582
582
|
}, U = [...S.joinKeyGroups];
|
|
583
583
|
U[0] = {
|
|
584
584
|
...U[0],
|
|
585
|
-
keys: [
|
|
585
|
+
keys: [J]
|
|
586
586
|
}, S.joinKeyGroups = U, C[C.findIndex((B) => B.id === w)] = S;
|
|
587
587
|
}
|
|
588
588
|
l({
|
|
@@ -752,8 +752,8 @@ FROM ${g.name}`;
|
|
|
752
752
|
const C = S.joinKeyGroups.filter((M) => M.keys && M.keys.length > 0).map((M) => {
|
|
753
753
|
const F = M.keys.filter(
|
|
754
754
|
(T) => {
|
|
755
|
-
var R, A, z,
|
|
756
|
-
return ((R = T.source) == null ? void 0 : R.name) && ((A = T.target) == null ? void 0 : A.name) && ((z = T.source) == null ? void 0 : z.entityName) && ((
|
|
755
|
+
var R, A, z, J;
|
|
756
|
+
return ((R = T.source) == null ? void 0 : R.name) && ((A = T.target) == null ? void 0 : A.name) && ((z = T.source) == null ? void 0 : z.entityName) && ((J = T.target) == null ? void 0 : J.entityName);
|
|
757
757
|
}
|
|
758
758
|
).map(
|
|
759
759
|
(T) => `${T.source.entityName}.${T.source.name} ${T.operator} ${T.target.entityName}.${T.target.name}`
|
|
@@ -1178,35 +1178,35 @@ function To({
|
|
|
1178
1178
|
W,
|
|
1179
1179
|
{
|
|
1180
1180
|
value: A.source.name,
|
|
1181
|
-
onValueChange: (
|
|
1181
|
+
onValueChange: (J) => w(
|
|
1182
1182
|
C.id,
|
|
1183
1183
|
R,
|
|
1184
1184
|
z,
|
|
1185
1185
|
"sourceColumnName",
|
|
1186
|
-
|
|
1186
|
+
J
|
|
1187
1187
|
),
|
|
1188
1188
|
children: [
|
|
1189
1189
|
/* @__PURE__ */ e(X, { children: /* @__PURE__ */ e(Z, { placeholder: "Source column" }) }),
|
|
1190
1190
|
/* @__PURE__ */ e(ee, { children: O(
|
|
1191
1191
|
C.source.name
|
|
1192
|
-
).map((
|
|
1192
|
+
).map((J) => /* @__PURE__ */ e(
|
|
1193
1193
|
K,
|
|
1194
1194
|
{
|
|
1195
1195
|
className: "hover:bg-muted",
|
|
1196
|
-
value:
|
|
1196
|
+
value: J.name,
|
|
1197
1197
|
children: /* @__PURE__ */ a("div", { className: "flex w-full items-center justify-between", children: [
|
|
1198
|
-
/* @__PURE__ */ e("span", { children:
|
|
1198
|
+
/* @__PURE__ */ e("span", { children: J.name }),
|
|
1199
1199
|
/* @__PURE__ */ e(
|
|
1200
1200
|
ve,
|
|
1201
1201
|
{
|
|
1202
1202
|
variant: "outline",
|
|
1203
1203
|
className: "ml-2 text-xs",
|
|
1204
|
-
children:
|
|
1204
|
+
children: J.dataType
|
|
1205
1205
|
}
|
|
1206
1206
|
)
|
|
1207
1207
|
] })
|
|
1208
1208
|
},
|
|
1209
|
-
|
|
1209
|
+
J.name
|
|
1210
1210
|
)) })
|
|
1211
1211
|
]
|
|
1212
1212
|
}
|
|
@@ -1215,12 +1215,12 @@ function To({
|
|
|
1215
1215
|
W,
|
|
1216
1216
|
{
|
|
1217
1217
|
value: A.operator,
|
|
1218
|
-
onValueChange: (
|
|
1218
|
+
onValueChange: (J) => w(
|
|
1219
1219
|
C.id,
|
|
1220
1220
|
R,
|
|
1221
1221
|
z,
|
|
1222
1222
|
"operator",
|
|
1223
|
-
|
|
1223
|
+
J
|
|
1224
1224
|
),
|
|
1225
1225
|
children: [
|
|
1226
1226
|
/* @__PURE__ */ e(X, { children: /* @__PURE__ */ e(Z, {}) }),
|
|
@@ -1273,35 +1273,35 @@ function To({
|
|
|
1273
1273
|
W,
|
|
1274
1274
|
{
|
|
1275
1275
|
value: A.target.name,
|
|
1276
|
-
onValueChange: (
|
|
1276
|
+
onValueChange: (J) => w(
|
|
1277
1277
|
C.id,
|
|
1278
1278
|
R,
|
|
1279
1279
|
z,
|
|
1280
1280
|
"targetColumnName",
|
|
1281
|
-
|
|
1281
|
+
J
|
|
1282
1282
|
),
|
|
1283
1283
|
children: [
|
|
1284
1284
|
/* @__PURE__ */ e(X, { children: /* @__PURE__ */ e(Z, { placeholder: "Target column" }) }),
|
|
1285
1285
|
/* @__PURE__ */ e(ee, { children: O(
|
|
1286
1286
|
C.target.name
|
|
1287
|
-
).map((
|
|
1287
|
+
).map((J) => /* @__PURE__ */ e(
|
|
1288
1288
|
K,
|
|
1289
1289
|
{
|
|
1290
1290
|
className: "hover:bg-muted",
|
|
1291
|
-
value:
|
|
1291
|
+
value: J.name,
|
|
1292
1292
|
children: /* @__PURE__ */ a("div", { className: "flex w-full items-center justify-between hover:bg-muted", children: [
|
|
1293
|
-
/* @__PURE__ */ e("span", { children:
|
|
1293
|
+
/* @__PURE__ */ e("span", { children: J.name }),
|
|
1294
1294
|
/* @__PURE__ */ e(
|
|
1295
1295
|
ve,
|
|
1296
1296
|
{
|
|
1297
1297
|
variant: "outline",
|
|
1298
1298
|
className: "ml-2 text-xs",
|
|
1299
|
-
children:
|
|
1299
|
+
children: J.dataType
|
|
1300
1300
|
}
|
|
1301
1301
|
)
|
|
1302
1302
|
] })
|
|
1303
1303
|
},
|
|
1304
|
-
|
|
1304
|
+
J.name
|
|
1305
1305
|
)) })
|
|
1306
1306
|
]
|
|
1307
1307
|
}
|
|
@@ -1931,7 +1931,7 @@ function pl({
|
|
|
1931
1931
|
}
|
|
1932
1932
|
)
|
|
1933
1933
|
] }),
|
|
1934
|
-
/* @__PURE__ */ e(
|
|
1934
|
+
/* @__PURE__ */ e(_l, {}),
|
|
1935
1935
|
/* @__PURE__ */ e(
|
|
1936
1936
|
Rs,
|
|
1937
1937
|
{
|
|
@@ -2030,7 +2030,7 @@ function zn({
|
|
|
2030
2030
|
className: "h-8",
|
|
2031
2031
|
onClick: s,
|
|
2032
2032
|
children: [
|
|
2033
|
-
/* @__PURE__ */ e(
|
|
2033
|
+
/* @__PURE__ */ e(Jl, { className: "mr-1.5 h-3.5 w-3.5" }),
|
|
2034
2034
|
"Send Feedback"
|
|
2035
2035
|
]
|
|
2036
2036
|
}
|
|
@@ -2405,7 +2405,7 @@ ${o}` : ""}
|
|
|
2405
2405
|
`;
|
|
2406
2406
|
k(B);
|
|
2407
2407
|
}
|
|
2408
|
-
function
|
|
2408
|
+
function J() {
|
|
2409
2409
|
return /* @__PURE__ */ a(
|
|
2410
2410
|
St,
|
|
2411
2411
|
{
|
|
@@ -2608,7 +2608,7 @@ ${o}` : ""}
|
|
|
2608
2608
|
role: "editor-section",
|
|
2609
2609
|
className: "flex grow flex-col justify-end",
|
|
2610
2610
|
children: [
|
|
2611
|
-
/* @__PURE__ */ e("div", { className: "relative flex grow overflow-y-scroll", children:
|
|
2611
|
+
/* @__PURE__ */ e("div", { className: "relative flex grow overflow-y-scroll", children: J() }),
|
|
2612
2612
|
U()
|
|
2613
2613
|
]
|
|
2614
2614
|
}
|
|
@@ -2748,8 +2748,8 @@ function xl({
|
|
|
2748
2748
|
className: t,
|
|
2749
2749
|
...n
|
|
2750
2750
|
}) {
|
|
2751
|
-
var
|
|
2752
|
-
const s = I((U) => U.card), l = ((
|
|
2751
|
+
var J;
|
|
2752
|
+
const s = I((U) => U.card), l = ((J = s.customCardPreferences) == null ? void 0 : J.showCardHeader) ?? !0, r = I((U) => U.frame), d = ke((U) => U.dashboard.filters), [c, o] = $(!1), { currentUser: i } = sr(), { tokenProps: u } = Pn(xn), m = I((U) => U.actions.setRunSql), { updateFilter: p } = js(), f = d == null ? void 0 : d.find((U) => U.id === r.filterId), { data: b, isLoading: h, isFetching: y, errorMessage: N, errorSql: k, pagination: D } = De(s), V = Ne(() => (b == null ? void 0 : b.records) || [], [b == null ? void 0 : b.records]), { setCard: L, updateCardInFrame: E, setIsDevMode: w, setCardSql: g } = le(), { data: x } = bn(s), S = Ne(() => {
|
|
2753
2753
|
var U;
|
|
2754
2754
|
return s.type !== "pivotTable" || !((U = b == null ? void 0 : b.records) != null && U.length) ? null : {
|
|
2755
2755
|
records: b.records,
|
|
@@ -3330,11 +3330,11 @@ function Go({
|
|
|
3330
3330
|
{ type: "stackedBar", name: "Stacked Bar", icon: An },
|
|
3331
3331
|
{ type: "stackedLine", name: "Stacked Line", icon: ln },
|
|
3332
3332
|
{ type: "scatter", name: "Scatter", icon: En },
|
|
3333
|
-
{ type: "bubble", name: "Bubble", icon:
|
|
3333
|
+
{ type: "bubble", name: "Bubble", icon: _s },
|
|
3334
3334
|
{ type: "pie", name: "Pie Chart", icon: Dn },
|
|
3335
3335
|
{ type: "doughnut", name: "Doughnut", icon: Tn },
|
|
3336
3336
|
{ type: "funnel", name: "Funnel", icon: kn },
|
|
3337
|
-
{ type: "radar", name: "Radar", icon:
|
|
3337
|
+
{ type: "radar", name: "Radar", icon: Js },
|
|
3338
3338
|
{ type: "polarArea", name: "Polar Area", icon: Us },
|
|
3339
3339
|
{ type: "tornado", name: "Tornado", icon: Sn },
|
|
3340
3340
|
{ type: "range", name: "Range", icon: wn },
|
|
@@ -3378,11 +3378,11 @@ function Uo({
|
|
|
3378
3378
|
case "pie":
|
|
3379
3379
|
return /* @__PURE__ */ e(Dn, { className: n });
|
|
3380
3380
|
case "radar":
|
|
3381
|
-
return /* @__PURE__ */ e(
|
|
3381
|
+
return /* @__PURE__ */ e(Js, { className: n });
|
|
3382
3382
|
case "scatter":
|
|
3383
3383
|
return /* @__PURE__ */ e(En, { className: n });
|
|
3384
3384
|
case "bubble":
|
|
3385
|
-
return /* @__PURE__ */ e(
|
|
3385
|
+
return /* @__PURE__ */ e(_s, { className: n });
|
|
3386
3386
|
case "doughnut":
|
|
3387
3387
|
return /* @__PURE__ */ e(Tn, { className: n });
|
|
3388
3388
|
case "stackedBar":
|
|
@@ -3420,14 +3420,14 @@ function yl({
|
|
|
3420
3420
|
var o, i;
|
|
3421
3421
|
const [n, s] = $(!1), [l, r] = $(""), d = I((u) => u.card), c = d.type;
|
|
3422
3422
|
return /* @__PURE__ */ a(
|
|
3423
|
-
|
|
3423
|
+
_e,
|
|
3424
3424
|
{
|
|
3425
3425
|
open: n,
|
|
3426
3426
|
onOpenChange: (u) => {
|
|
3427
3427
|
s(u), u || r("");
|
|
3428
3428
|
},
|
|
3429
3429
|
children: [
|
|
3430
|
-
/* @__PURE__ */ e(
|
|
3430
|
+
/* @__PURE__ */ e(Je, { asChild: !0, children: /* @__PURE__ */ e(
|
|
3431
3431
|
q,
|
|
3432
3432
|
{
|
|
3433
3433
|
size: "sm",
|
|
@@ -3483,7 +3483,7 @@ function yl({
|
|
|
3483
3483
|
}
|
|
3484
3484
|
);
|
|
3485
3485
|
}
|
|
3486
|
-
function
|
|
3486
|
+
function _o({
|
|
3487
3487
|
error: t,
|
|
3488
3488
|
className: n = "",
|
|
3489
3489
|
textClassName: s = "",
|
|
@@ -3542,7 +3542,7 @@ function Jo({
|
|
|
3542
3542
|
}
|
|
3543
3543
|
);
|
|
3544
3544
|
}
|
|
3545
|
-
function
|
|
3545
|
+
function Jo() {
|
|
3546
3546
|
const t = I(
|
|
3547
3547
|
(i) => {
|
|
3548
3548
|
var u, m;
|
|
@@ -3695,7 +3695,7 @@ function Nl() {
|
|
|
3695
3695
|
"horizontalBar",
|
|
3696
3696
|
"funnel",
|
|
3697
3697
|
"bullet"
|
|
3698
|
-
].includes(t.type) && /* @__PURE__ */ e(re, { children: /* @__PURE__ */ e(
|
|
3698
|
+
].includes(t.type) && /* @__PURE__ */ e(re, { children: /* @__PURE__ */ e(Jo, {}) }),
|
|
3699
3699
|
!["kpi", "text", "custom", "table"].includes(t.type) && /* @__PURE__ */ e(re, {}),
|
|
3700
3700
|
![
|
|
3701
3701
|
"pie",
|
|
@@ -3939,7 +3939,7 @@ function ms({
|
|
|
3939
3939
|
i(T), s.sql && ((A = (R = s.preferences) == null ? void 0 : R.tablePrefs) != null && A.enableDevModePagination) && o(!0);
|
|
3940
3940
|
}
|
|
3941
3941
|
function x(v) {
|
|
3942
|
-
var R, A, z,
|
|
3942
|
+
var R, A, z, J;
|
|
3943
3943
|
const M = yn(
|
|
3944
3944
|
v,
|
|
3945
3945
|
(R = s.config) == null ? void 0 : R.metricColumns,
|
|
@@ -3956,7 +3956,7 @@ function ms({
|
|
|
3956
3956
|
...n,
|
|
3957
3957
|
cards: n.cards.map((U) => U.id === s.id ? F : U)
|
|
3958
3958
|
};
|
|
3959
|
-
i(T), s.sql && ((
|
|
3959
|
+
i(T), s.sql && ((J = (z = s.preferences) == null ? void 0 : z.tablePrefs) != null && J.enableDevModePagination) && o(!0);
|
|
3960
3960
|
}
|
|
3961
3961
|
function S() {
|
|
3962
3962
|
const v = JSON.stringify(h == null ? void 0 : h.records, null, 2), M = new Blob([v], { type: "application/json" }), F = URL.createObjectURL(M), T = document.createElement("a");
|
|
@@ -4091,7 +4091,7 @@ function ms({
|
|
|
4091
4091
|
isLoading: y || N
|
|
4092
4092
|
}
|
|
4093
4093
|
),
|
|
4094
|
-
k && /* @__PURE__ */ e(
|
|
4094
|
+
k && /* @__PURE__ */ e(_o, { error: k })
|
|
4095
4095
|
]
|
|
4096
4096
|
}
|
|
4097
4097
|
)
|
|
@@ -4510,8 +4510,8 @@ function Zo({ idx: t }) {
|
|
|
4510
4510
|
});
|
|
4511
4511
|
}
|
|
4512
4512
|
}
|
|
4513
|
-
return /* @__PURE__ */ a(
|
|
4514
|
-
/* @__PURE__ */ e(
|
|
4513
|
+
return /* @__PURE__ */ a(_e, { children: [
|
|
4514
|
+
/* @__PURE__ */ e(Je, { children: /* @__PURE__ */ e(Dr, { className: "size-4 rotate-[135deg] cursor-pointer text-muted-foreground hover:text-foreground" }) }),
|
|
4515
4515
|
/* @__PURE__ */ e(He, { className: "w-fit px-2 py-1", children: /* @__PURE__ */ a("div", { className: "flex gap-1", children: [
|
|
4516
4516
|
/* @__PURE__ */ e(
|
|
4517
4517
|
"button",
|
|
@@ -4753,8 +4753,8 @@ function tc({
|
|
|
4753
4753
|
}) {
|
|
4754
4754
|
var c;
|
|
4755
4755
|
const [s, l] = cn.useState(!1), [r, d] = cn.useState("");
|
|
4756
|
-
return /* @__PURE__ */ a(
|
|
4757
|
-
/* @__PURE__ */ e(
|
|
4756
|
+
return /* @__PURE__ */ a(_e, { open: s, onOpenChange: l, children: [
|
|
4757
|
+
/* @__PURE__ */ e(Je, { asChild: !0, children: /* @__PURE__ */ a(
|
|
4758
4758
|
q,
|
|
4759
4759
|
{
|
|
4760
4760
|
size: "sm",
|
|
@@ -6106,7 +6106,7 @@ function Tl() {
|
|
|
6106
6106
|
}), { setCardPreferences: s, updateCardInFrame: l } = le(), { data: r } = De(t), [d, c] = $({}), [o, i] = $(
|
|
6107
6107
|
null
|
|
6108
6108
|
), [u, m] = $(null), p = Ne(() => {
|
|
6109
|
-
var R, A, z,
|
|
6109
|
+
var R, A, z, J, U, B, G;
|
|
6110
6110
|
if (!(r != null && r.records) || r.records.length === 0) return [];
|
|
6111
6111
|
const M = (t == null ? void 0 : t.type) === "stackedBar" || (t == null ? void 0 : t.type) === "stackedLine", F = (t == null ? void 0 : t.type) === "bar" || (t == null ? void 0 : t.type) === "line" || (t == null ? void 0 : t.type) === "horizontalBar" || (t == null ? void 0 : t.type) === "bullet", T = ((R = t == null ? void 0 : t.config) == null ? void 0 : R.pivotByColumns) && t.config.pivotByColumns.length > 0;
|
|
6112
6112
|
if ((M || F) && T) {
|
|
@@ -6132,7 +6132,7 @@ function Tl() {
|
|
|
6132
6132
|
);
|
|
6133
6133
|
}
|
|
6134
6134
|
}
|
|
6135
|
-
if ((F || M) && !T && ((U = (
|
|
6135
|
+
if ((F || M) && !T && ((U = (J = t == null ? void 0 : t.config) == null ? void 0 : J.metricColumns) != null && U.length))
|
|
6136
6136
|
return t.config.metricColumns.map(
|
|
6137
6137
|
(Y) => Y.alias || Y.label || Y.name
|
|
6138
6138
|
);
|
|
@@ -6188,11 +6188,11 @@ function Tl() {
|
|
|
6188
6188
|
}
|
|
6189
6189
|
};
|
|
6190
6190
|
s(z);
|
|
6191
|
-
const
|
|
6191
|
+
const J = {
|
|
6192
6192
|
...t,
|
|
6193
6193
|
preferences: z
|
|
6194
6194
|
};
|
|
6195
|
-
l(
|
|
6195
|
+
l(J), c((B) => ({
|
|
6196
6196
|
...B,
|
|
6197
6197
|
[M]: T
|
|
6198
6198
|
}));
|
|
@@ -6238,12 +6238,12 @@ function Tl() {
|
|
|
6238
6238
|
const T = jr(d[M], F), R = !T;
|
|
6239
6239
|
return /* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
|
|
6240
6240
|
/* @__PURE__ */ a(
|
|
6241
|
-
|
|
6241
|
+
_e,
|
|
6242
6242
|
{
|
|
6243
6243
|
open: o === M,
|
|
6244
6244
|
onOpenChange: (A) => i(A ? M : null),
|
|
6245
6245
|
children: [
|
|
6246
|
-
/* @__PURE__ */ e(
|
|
6246
|
+
/* @__PURE__ */ e(Je, { asChild: !0, children: /* @__PURE__ */ e(
|
|
6247
6247
|
"button",
|
|
6248
6248
|
{
|
|
6249
6249
|
className: "h-5 w-5 shrink-0 rounded border border-input shadow-sm transition-colors hover:border-gray-400 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",
|
|
@@ -6947,7 +6947,7 @@ function Dl() {
|
|
|
6947
6947
|
] });
|
|
6948
6948
|
}
|
|
6949
6949
|
function Ml() {
|
|
6950
|
-
var T, R, A, z,
|
|
6950
|
+
var T, R, A, z, J, U, B, G, Y, te, ae;
|
|
6951
6951
|
const t = I((j) => j.card), n = I(
|
|
6952
6952
|
(j) => {
|
|
6953
6953
|
var ce, de;
|
|
@@ -6959,7 +6959,7 @@ function Ml() {
|
|
|
6959
6959
|
}), { setCardPreferences: l, updateCardInFrame: r } = le();
|
|
6960
6960
|
if (!t || !Gr(t.type))
|
|
6961
6961
|
return null;
|
|
6962
|
-
const d = t.type === "bullet" ? ((T = s == null ? void 0 : s.bulletConfig) == null ? void 0 : T.orientation) ?? (((R = s == null ? void 0 : s.chartOptions) == null ? void 0 : R.indexAxis) === "x" ? "vertical" : "horizontal") : void 0, c = d != null ? d === "horizontal" : ((A = s == null ? void 0 : s.chartOptions) == null ? void 0 : A.indexAxis) === "y", o = t.type === "stackedBar" || t.type === "stackedLine", i = t.type === "pie" || t.type === "doughnut" || t.type === "polarArea" || t.type === "funnel", u = !i, m = t.type === "bubble" || t.type === "scatter", p = (
|
|
6962
|
+
const d = t.type === "bullet" ? ((T = s == null ? void 0 : s.bulletConfig) == null ? void 0 : T.orientation) ?? (((R = s == null ? void 0 : s.chartOptions) == null ? void 0 : R.indexAxis) === "x" ? "vertical" : "horizontal") : void 0, c = d != null ? d === "horizontal" : ((A = s == null ? void 0 : s.chartOptions) == null ? void 0 : A.indexAxis) === "y", o = t.type === "stackedBar" || t.type === "stackedLine", i = t.type === "pie" || t.type === "doughnut" || t.type === "polarArea" || t.type === "funnel", u = !i, m = t.type === "bubble" || t.type === "scatter", p = (J = (z = s == null ? void 0 : s.chartOptions) == null ? void 0 : z.plugins) == null ? void 0 : J.datalabels, f = (p == null ? void 0 : p.display) !== !1 && ((p == null ? void 0 : p.anchor) || (p == null ? void 0 : p.align)), b = Ur(
|
|
6963
6963
|
t.type,
|
|
6964
6964
|
t.preferences
|
|
6965
6965
|
), h = n ?? b, y = (b == null ? void 0 : b.enabled) ?? f ?? !1, N = (n == null ? void 0 : n.enabled) !== void 0 ? n.enabled : y, k = (j, ce) => {
|
|
@@ -7349,12 +7349,12 @@ function Il() {
|
|
|
7349
7349
|
!d.targetMetricKey && A && (T.targetMetricKey = A, R = !0);
|
|
7350
7350
|
const z = (Y = N[2]) == null ? void 0 : Y.value;
|
|
7351
7351
|
!d.comparativeMetricKey && !d.disableAutoComparative && z && (T.comparativeMetricKey = z, R = !0);
|
|
7352
|
-
const
|
|
7352
|
+
const J = N.slice(3), U = {
|
|
7353
7353
|
...d.rangeKeys || {}
|
|
7354
7354
|
};
|
|
7355
7355
|
let B = !1;
|
|
7356
7356
|
if (gs.forEach((te, ae) => {
|
|
7357
|
-
!U[te] &&
|
|
7357
|
+
!U[te] && J[ae] && (U[te] = J[ae].value, B = !0);
|
|
7358
7358
|
}), B && (T.rangeKeys = U, R = !0, d.showRanges === void 0 && (T.showRanges = !0)), R) {
|
|
7359
7359
|
const te = xs({
|
|
7360
7360
|
...d,
|
|
@@ -7584,7 +7584,7 @@ function Il() {
|
|
|
7584
7584
|
] })
|
|
7585
7585
|
] }),
|
|
7586
7586
|
i && /* @__PURE__ */ e("div", { className: "space-y-3", children: gs.map((T) => {
|
|
7587
|
-
var R, A, z,
|
|
7587
|
+
var R, A, z, J, U;
|
|
7588
7588
|
return /* @__PURE__ */ a(
|
|
7589
7589
|
"div",
|
|
7590
7590
|
{
|
|
@@ -7656,7 +7656,7 @@ function Il() {
|
|
|
7656
7656
|
{
|
|
7657
7657
|
type: "number",
|
|
7658
7658
|
placeholder: m ? "0.80" : "Static value",
|
|
7659
|
-
value: ((
|
|
7659
|
+
value: ((J = d.ranges) == null ? void 0 : J[T]) === void 0 ? "" : String((U = d.ranges) == null ? void 0 : U[T]),
|
|
7660
7660
|
onCommit: (B) => V(T, B),
|
|
7661
7661
|
className: "h-8 text-xs"
|
|
7662
7662
|
}
|
|
@@ -7706,8 +7706,8 @@ function na({
|
|
|
7706
7706
|
};
|
|
7707
7707
|
return /* @__PURE__ */ a(re, { children: [
|
|
7708
7708
|
/* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
|
|
7709
|
-
/* @__PURE__ */ a(
|
|
7710
|
-
/* @__PURE__ */ e(
|
|
7709
|
+
/* @__PURE__ */ a(_e, { open: l, onOpenChange: r, children: [
|
|
7710
|
+
/* @__PURE__ */ e(Je, { asChild: !0, children: /* @__PURE__ */ e(
|
|
7711
7711
|
"button",
|
|
7712
7712
|
{
|
|
7713
7713
|
className: "size-5 rounded border-2 border-input shadow-sm transition-all hover:scale-110 hover:border-gray-400",
|
|
@@ -7771,19 +7771,19 @@ function Ol() {
|
|
|
7771
7771
|
const t = I((f) => f.card), n = I((f) => {
|
|
7772
7772
|
var b;
|
|
7773
7773
|
return (b = f.card) == null ? void 0 : b.preferences;
|
|
7774
|
-
}), { setCardPreferences: s } = le(), l = (t == null ? void 0 : t.type) === "heatmap", r = (n == null ? void 0 : n.heatmapConfig) || {}, d = r.colorPalette ?? "green", c = r.legendPosition ?? "bottom", o = Ne(() => r.colorRange && r.colorRange[0] && r.colorRange[1] ? [r.colorRange[0], r.colorRange[1]] : [...
|
|
7774
|
+
}), { setCardPreferences: s } = le(), l = (t == null ? void 0 : t.type) === "heatmap", r = (n == null ? void 0 : n.heatmapConfig) || {}, d = r.colorPalette ?? "green", c = r.legendPosition ?? "bottom", o = Ne(() => r.colorRange && r.colorRange[0] && r.colorRange[1] ? [r.colorRange[0], r.colorRange[1]] : [..._a], [r.colorRange]), i = (f) => {
|
|
7775
7775
|
const b = {
|
|
7776
7776
|
...r,
|
|
7777
7777
|
...f
|
|
7778
7778
|
};
|
|
7779
|
-
b.colorPalette !== "custom" ? delete b.colorRange : (!b.colorRange || !b.colorRange[0] || !b.colorRange[1]) && (b.colorRange = [...
|
|
7779
|
+
b.colorPalette !== "custom" ? delete b.colorRange : (!b.colorRange || !b.colorRange[0] || !b.colorRange[1]) && (b.colorRange = [..._a]), s({
|
|
7780
7780
|
...n || {},
|
|
7781
7781
|
heatmapConfig: b
|
|
7782
7782
|
});
|
|
7783
7783
|
}, u = (f) => {
|
|
7784
7784
|
i({
|
|
7785
7785
|
colorPalette: f,
|
|
7786
|
-
colorRange: f === "custom" ? r.colorRange ?? [...
|
|
7786
|
+
colorRange: f === "custom" ? r.colorRange ?? [..._a] : void 0
|
|
7787
7787
|
});
|
|
7788
7788
|
}, m = (f, b) => {
|
|
7789
7789
|
const h = [...o];
|
|
@@ -7898,14 +7898,14 @@ function Rl() {
|
|
|
7898
7898
|
[t == null ? void 0 : t.bubbleScatterConfig]
|
|
7899
7899
|
), m = Da(n == null ? void 0 : n.config) && !l, p = Ne(() => {
|
|
7900
7900
|
var A, z;
|
|
7901
|
-
return ((z = (A = n == null ? void 0 : n.config) == null ? void 0 : A.metricColumns) == null ? void 0 : z.map((
|
|
7902
|
-
const U =
|
|
7901
|
+
return ((z = (A = n == null ? void 0 : n.config) == null ? void 0 : A.metricColumns) == null ? void 0 : z.map((J) => {
|
|
7902
|
+
const U = J.label || J.name || J.alias || "";
|
|
7903
7903
|
return { value: U, label: U };
|
|
7904
7904
|
})) || [];
|
|
7905
7905
|
}, [(E = n == null ? void 0 : n.config) == null ? void 0 : E.metricColumns]), f = Ne(() => {
|
|
7906
7906
|
var A, z;
|
|
7907
|
-
return ((z = (A = n == null ? void 0 : n.config) == null ? void 0 : A.groupByColumns) == null ? void 0 : z.map((
|
|
7908
|
-
const U =
|
|
7907
|
+
return ((z = (A = n == null ? void 0 : n.config) == null ? void 0 : A.groupByColumns) == null ? void 0 : z.map((J) => {
|
|
7908
|
+
const U = J.label || J.name || J.alias || "";
|
|
7909
7909
|
return { value: U, label: U };
|
|
7910
7910
|
})) || [];
|
|
7911
7911
|
}, [(w = n == null ? void 0 : n.config) == null ? void 0 : w.groupByColumns]), b = Ne(() => i.enableGrouping !== void 0 ? i.enableGrouping : !l && f.length >= 2, [i.enableGrouping, l, f.length]), [h, y] = $(b);
|
|
@@ -7932,11 +7932,11 @@ function Rl() {
|
|
|
7932
7932
|
const A = {};
|
|
7933
7933
|
let z = !1;
|
|
7934
7934
|
if (!i.xMetricKey && p[0] && (A.xMetricKey = p[0].value, z = !0), !i.yMetricKey && p[1] && (A.yMetricKey = p[1].value, z = !0), c && !i.radiusMetricKey && p[2] && (A.radiusMetricKey = p[2].value, z = !0), !i.labelKey && f[0] && (A.labelKey = f[0].value, z = !0), b && !i.groupKey && f[1] && (A.groupKey = f[1].value, A.enableGrouping = !0, z = !0), z) {
|
|
7935
|
-
const
|
|
7935
|
+
const J = vs({
|
|
7936
7936
|
...i,
|
|
7937
7937
|
...A
|
|
7938
7938
|
});
|
|
7939
|
-
N(
|
|
7939
|
+
N(J);
|
|
7940
7940
|
}
|
|
7941
7941
|
}, [
|
|
7942
7942
|
p,
|
|
@@ -7961,7 +7961,7 @@ function Rl() {
|
|
|
7961
7961
|
};
|
|
7962
7962
|
return !c && !o ? null : /* @__PURE__ */ a(ue, { value: "bubble-scatter-config", children: [
|
|
7963
7963
|
/* @__PURE__ */ e(me, { className: "py-2 text-sm", children: /* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
|
|
7964
|
-
/* @__PURE__ */ e(c ?
|
|
7964
|
+
/* @__PURE__ */ e(c ? _r : En, { className: "h-4 w-4" }),
|
|
7965
7965
|
/* @__PURE__ */ a("span", { children: [
|
|
7966
7966
|
c ? "Bubble" : "Scatter",
|
|
7967
7967
|
" Configuration"
|
|
@@ -8195,7 +8195,7 @@ function Rl() {
|
|
|
8195
8195
|
checked: ((O = (S = t == null ? void 0 : t.xAxisConfig) == null ? void 0 : S.name) == null ? void 0 : O.enabled) ?? !1,
|
|
8196
8196
|
onCheckedChange: (A) => {
|
|
8197
8197
|
var U, B, G, Y;
|
|
8198
|
-
const z = i.xMetricKey || "X Axis",
|
|
8198
|
+
const z = i.xMetricKey || "X Axis", J = i.yMetricKey || "Y Axis";
|
|
8199
8199
|
k({
|
|
8200
8200
|
...t ?? {},
|
|
8201
8201
|
xAxisConfig: {
|
|
@@ -8209,7 +8209,7 @@ function Rl() {
|
|
|
8209
8209
|
...t == null ? void 0 : t.yAxisConfig,
|
|
8210
8210
|
name: {
|
|
8211
8211
|
enabled: A,
|
|
8212
|
-
text: ((Y = (G = t == null ? void 0 : t.yAxisConfig) == null ? void 0 : G.name) == null ? void 0 : Y.text) ||
|
|
8212
|
+
text: ((Y = (G = t == null ? void 0 : t.yAxisConfig) == null ? void 0 : G.name) == null ? void 0 : Y.text) || J
|
|
8213
8213
|
}
|
|
8214
8214
|
}
|
|
8215
8215
|
});
|
|
@@ -8461,35 +8461,35 @@ function Oc() {
|
|
|
8461
8461
|
function Rc(t) {
|
|
8462
8462
|
var Ft;
|
|
8463
8463
|
as(
|
|
8464
|
-
(
|
|
8464
|
+
(_) => _.currentAIContext
|
|
8465
8465
|
);
|
|
8466
|
-
const [n, s] = $(""), [l, r] = $(null), { authToken: d, tokenProps: c } = ua(), o = I((
|
|
8466
|
+
const [n, s] = $(""), [l, r] = $(null), { authToken: d, tokenProps: c } = ua(), o = I((_) => {
|
|
8467
8467
|
var ge;
|
|
8468
|
-
return (ge =
|
|
8469
|
-
}), i = I((
|
|
8468
|
+
return (ge = _ == null ? void 0 : _.card) == null ? void 0 : ge.sql;
|
|
8469
|
+
}), i = I((_) => _.isDevMode), u = I((_) => {
|
|
8470
8470
|
var ge;
|
|
8471
|
-
return (ge =
|
|
8471
|
+
return (ge = _ == null ? void 0 : _.card) == null ? void 0 : ge.python;
|
|
8472
8472
|
}), {
|
|
8473
8473
|
setCardPython: m,
|
|
8474
8474
|
setCardSql: p,
|
|
8475
8475
|
setRunSql: f,
|
|
8476
8476
|
switchCardType: b,
|
|
8477
8477
|
setQueryConfig: h
|
|
8478
|
-
} = le(), y = I((
|
|
8479
|
-
(
|
|
8480
|
-
), L = I((
|
|
8481
|
-
(
|
|
8478
|
+
} = le(), y = I((_) => _.currentAssitantScope) || [], N = I((_) => _.userInputForAI), k = I((_) => _.triggerAIRun), D = I((_) => _.card), V = I(
|
|
8479
|
+
(_) => _.selectedDatabaseName
|
|
8480
|
+
), L = I((_) => _.selectedTableName), E = I(
|
|
8481
|
+
(_) => _.selectedConnectionId
|
|
8482
8482
|
), w = I(
|
|
8483
|
-
(
|
|
8483
|
+
(_) => _.selectedSchemaName
|
|
8484
8484
|
), g = ke(
|
|
8485
|
-
(
|
|
8485
|
+
(_) => _.dashboard.aiScopeTables
|
|
8486
8486
|
), {
|
|
8487
8487
|
errorMessage: x,
|
|
8488
8488
|
refetch: S,
|
|
8489
8489
|
data: O
|
|
8490
|
-
} = De(D), { setTriggerAIRun: C, setCurrentAssitantScope: v, setCardConfig: M } = le(), { selectedDatamodelName: F, connectionType: T, selectedDatamodelId: R } = Xs(), A = (Ft =
|
|
8490
|
+
} = De(D), { setTriggerAIRun: C, setCurrentAssitantScope: v, setCardConfig: M } = le(), { selectedDatamodelName: F, connectionType: T, selectedDatamodelId: R } = Xs(), A = (Ft = Jr().data) == null ? void 0 : Ft.assistantProfileId, {
|
|
8491
8491
|
messages: z,
|
|
8492
|
-
setMessages:
|
|
8492
|
+
setMessages: J,
|
|
8493
8493
|
regenerate: U,
|
|
8494
8494
|
error: B,
|
|
8495
8495
|
sendMessage: G,
|
|
@@ -8504,38 +8504,38 @@ function Rc(t) {
|
|
|
8504
8504
|
Authorization: `Bearer ${d == null ? void 0 : d.accessToken}`
|
|
8505
8505
|
}),
|
|
8506
8506
|
body: () => {
|
|
8507
|
-
const
|
|
8507
|
+
const _ = as.getState();
|
|
8508
8508
|
return {
|
|
8509
8509
|
random: Math.random(),
|
|
8510
8510
|
assistantId: "editor-assistant",
|
|
8511
8511
|
assistantProfileId: A,
|
|
8512
8512
|
isDevMode: i,
|
|
8513
|
-
aiContext:
|
|
8514
|
-
reasoningEffort:
|
|
8515
|
-
showReasoning:
|
|
8513
|
+
aiContext: _.currentAIContext,
|
|
8514
|
+
reasoningEffort: _.reasoningEffort,
|
|
8515
|
+
showReasoning: _.showReasoning
|
|
8516
8516
|
};
|
|
8517
8517
|
},
|
|
8518
8518
|
// Keep omit to avoid CORS issue with wildcard ACAO
|
|
8519
8519
|
credentials: "omit",
|
|
8520
8520
|
// Ensure we never send incomplete tool-input parts after a stopped stream
|
|
8521
|
-
prepareSendMessagesRequest: ({ messages:
|
|
8521
|
+
prepareSendMessagesRequest: ({ messages: _, body: ge }) => ({
|
|
8522
8522
|
body: {
|
|
8523
8523
|
...ge,
|
|
8524
|
-
messages: Yr(
|
|
8524
|
+
messages: Yr(_)
|
|
8525
8525
|
}
|
|
8526
8526
|
})
|
|
8527
8527
|
}),
|
|
8528
|
-
onError: (
|
|
8528
|
+
onError: (_) => {
|
|
8529
8529
|
var ge;
|
|
8530
|
-
if (
|
|
8530
|
+
if (_.name === "AbortError" || (ge = _.message) != null && ge.includes("aborted")) {
|
|
8531
8531
|
console.log("[Editor Assistant] Stream aborted (expected)");
|
|
8532
8532
|
return;
|
|
8533
8533
|
}
|
|
8534
|
-
console.error("[Editor Assistant] Stream error:",
|
|
8534
|
+
console.error("[Editor Assistant] Stream error:", _);
|
|
8535
8535
|
},
|
|
8536
8536
|
onToolCall: ce,
|
|
8537
|
-
onFinish({ isAbort:
|
|
8538
|
-
s(""), console.log(
|
|
8537
|
+
onFinish({ isAbort: _, isDisconnect: ge, isError: je }) {
|
|
8538
|
+
s(""), console.log(_ ? "[Editor Assistant] Stream aborted by user" : ge ? "[Editor Assistant] Stream disconnected (network error)" : je ? "[Editor Assistant] Stream error occurred" : "[Editor Assistant] Stream completed successfully");
|
|
8539
8539
|
}
|
|
8540
8540
|
});
|
|
8541
8541
|
fe(() => {
|
|
@@ -8544,23 +8544,23 @@ function Rc(t) {
|
|
|
8544
8544
|
parts: [{ type: "text", text: N }]
|
|
8545
8545
|
}), C(!1));
|
|
8546
8546
|
}, [k, N, G, C]);
|
|
8547
|
-
async function ce({ toolCall:
|
|
8547
|
+
async function ce({ toolCall: _ }) {
|
|
8548
8548
|
var ge, je, We, Lt, Xe, ht, Ze, pt, Pt, rt, Vt, Bt, zt, jt, ft, gt;
|
|
8549
|
-
if (["createChartFromSql", "createForecast"].includes(
|
|
8550
|
-
const se = ((ge =
|
|
8549
|
+
if (["createChartFromSql", "createForecast"].includes(_.toolName)) {
|
|
8550
|
+
const se = ((ge = _.input) == null ? void 0 : ge.sql) ?? ((je = _.args) == null ? void 0 : je.sql), Ce = ((We = _.input) == null ? void 0 : We.python) ?? ((Lt = _.args) == null ? void 0 : Lt.python), Se = ((Xe = _.input) == null ? void 0 : Xe.chartType) ?? ((ht = _.args) == null ? void 0 : ht.chartType);
|
|
8551
8551
|
b(Se), p(se), m(Ce), f(!0), te({
|
|
8552
|
-
tool:
|
|
8553
|
-
toolCallId:
|
|
8552
|
+
tool: _.toolName,
|
|
8553
|
+
toolCallId: _.toolCallId,
|
|
8554
8554
|
output: {
|
|
8555
8555
|
status: "success",
|
|
8556
8556
|
message: "Let the user know that chart is created"
|
|
8557
8557
|
}
|
|
8558
8558
|
});
|
|
8559
|
-
} else if (
|
|
8559
|
+
} else if (_.toolName === "getUserSql") {
|
|
8560
8560
|
if (!o) {
|
|
8561
8561
|
te({
|
|
8562
|
-
tool:
|
|
8563
|
-
toolCallId:
|
|
8562
|
+
tool: _.toolName,
|
|
8563
|
+
toolCallId: _.toolCallId,
|
|
8564
8564
|
output: {
|
|
8565
8565
|
status: "error",
|
|
8566
8566
|
message: "No SQL found"
|
|
@@ -8569,23 +8569,23 @@ function Rc(t) {
|
|
|
8569
8569
|
return;
|
|
8570
8570
|
}
|
|
8571
8571
|
te({
|
|
8572
|
-
tool:
|
|
8573
|
-
toolCallId:
|
|
8572
|
+
tool: _.toolName,
|
|
8573
|
+
toolCallId: _.toolCallId,
|
|
8574
8574
|
output: {
|
|
8575
8575
|
status: "success",
|
|
8576
8576
|
sql: o,
|
|
8577
8577
|
python: u || ""
|
|
8578
8578
|
}
|
|
8579
8579
|
});
|
|
8580
|
-
} else if (
|
|
8580
|
+
} else if (_.toolName === "generateQueryConfig") {
|
|
8581
8581
|
s("Generating query config...");
|
|
8582
|
-
const se = ((Ze =
|
|
8583
|
-
((Vt =
|
|
8582
|
+
const se = ((Ze = _.input) == null ? void 0 : Ze.chartType) ?? ((pt = _.args) == null ? void 0 : pt.chartType), Ce = ((Pt = _.input) == null ? void 0 : Pt.queryConfig) ?? ((rt = _.args) == null ? void 0 : rt.queryConfig);
|
|
8583
|
+
((Vt = _.input) == null ? void 0 : Vt.cardConfig) ?? ((Bt = _.args) == null || Bt.cardConfig), b(se), M(Ce), p(void 0), m(void 0);
|
|
8584
8584
|
const Se = await S();
|
|
8585
8585
|
if ((zt = Se == null ? void 0 : Se.data) != null && zt.error) {
|
|
8586
8586
|
te({
|
|
8587
|
-
tool:
|
|
8588
|
-
toolCallId:
|
|
8587
|
+
tool: _.toolName,
|
|
8588
|
+
toolCallId: _.toolCallId,
|
|
8589
8589
|
output: {
|
|
8590
8590
|
status: "error",
|
|
8591
8591
|
queryConfig: Ce,
|
|
@@ -8596,8 +8596,8 @@ function Rc(t) {
|
|
|
8596
8596
|
}
|
|
8597
8597
|
if ((ft = Se == null ? void 0 : Se.data) != null && ft.records) {
|
|
8598
8598
|
te({
|
|
8599
|
-
tool:
|
|
8600
|
-
toolCallId:
|
|
8599
|
+
tool: _.toolName,
|
|
8600
|
+
toolCallId: _.toolCallId,
|
|
8601
8601
|
output: {
|
|
8602
8602
|
status: "success",
|
|
8603
8603
|
queryConfig: Ce,
|
|
@@ -8607,8 +8607,8 @@ function Rc(t) {
|
|
|
8607
8607
|
return;
|
|
8608
8608
|
}
|
|
8609
8609
|
te({
|
|
8610
|
-
tool:
|
|
8611
|
-
toolCallId:
|
|
8610
|
+
tool: _.toolName,
|
|
8611
|
+
toolCallId: _.toolCallId,
|
|
8612
8612
|
output: {
|
|
8613
8613
|
status: "success",
|
|
8614
8614
|
queryConfig: Ce,
|
|
@@ -8619,13 +8619,13 @@ function Rc(t) {
|
|
|
8619
8619
|
} else
|
|
8620
8620
|
s("Analyzing...");
|
|
8621
8621
|
}
|
|
8622
|
-
function de(
|
|
8623
|
-
const ge = Xr(y,
|
|
8622
|
+
function de(_) {
|
|
8623
|
+
const ge = Xr(y, _);
|
|
8624
8624
|
xe(ge);
|
|
8625
8625
|
}
|
|
8626
|
-
function xe(
|
|
8627
|
-
const ge = ei(
|
|
8628
|
-
v(ge),
|
|
8626
|
+
function xe(_) {
|
|
8627
|
+
const ge = ei(_);
|
|
8628
|
+
v(ge), J((je) => [
|
|
8629
8629
|
...je,
|
|
8630
8630
|
{
|
|
8631
8631
|
id: crypto.randomUUID(),
|
|
@@ -8642,7 +8642,7 @@ function Rc(t) {
|
|
|
8642
8642
|
]);
|
|
8643
8643
|
}
|
|
8644
8644
|
function ie() {
|
|
8645
|
-
const
|
|
8645
|
+
const _ = {
|
|
8646
8646
|
databaseName: V || "",
|
|
8647
8647
|
schemaName: w || "",
|
|
8648
8648
|
tableName: L || "",
|
|
@@ -8650,11 +8650,11 @@ function Rc(t) {
|
|
|
8650
8650
|
datamodelName: ns(F),
|
|
8651
8651
|
connectionId: E || "",
|
|
8652
8652
|
connectionType: T || ""
|
|
8653
|
-
}, ge = ss([...y,
|
|
8653
|
+
}, ge = ss([...y, _]);
|
|
8654
8654
|
xe(ge);
|
|
8655
8655
|
}
|
|
8656
8656
|
function ne() {
|
|
8657
|
-
const
|
|
8657
|
+
const _ = {
|
|
8658
8658
|
databaseName: V || "",
|
|
8659
8659
|
schemaName: w || "",
|
|
8660
8660
|
tableName: L || "",
|
|
@@ -8665,14 +8665,14 @@ function Rc(t) {
|
|
|
8665
8665
|
};
|
|
8666
8666
|
if (!Zr(
|
|
8667
8667
|
[...g || [], ...y],
|
|
8668
|
-
|
|
8668
|
+
_
|
|
8669
8669
|
) || y.length === 0) {
|
|
8670
8670
|
const je = ss([
|
|
8671
8671
|
...g || [],
|
|
8672
8672
|
...y,
|
|
8673
|
-
|
|
8673
|
+
_
|
|
8674
8674
|
]).filter(
|
|
8675
|
-
(We) => We.connectionId ===
|
|
8675
|
+
(We) => We.connectionId === _.connectionId
|
|
8676
8676
|
);
|
|
8677
8677
|
xe(je);
|
|
8678
8678
|
}
|
|
@@ -8680,7 +8680,7 @@ function Rc(t) {
|
|
|
8680
8680
|
const we = !["ready", "error"].includes(Y), lt = Wr(B);
|
|
8681
8681
|
return {
|
|
8682
8682
|
messages: z,
|
|
8683
|
-
setMessages:
|
|
8683
|
+
setMessages: J,
|
|
8684
8684
|
sendMessage: G,
|
|
8685
8685
|
regenerate: U,
|
|
8686
8686
|
isLoading: we,
|
|
@@ -8721,7 +8721,7 @@ function ys({
|
|
|
8721
8721
|
sendMessage: R,
|
|
8722
8722
|
isLoading: A,
|
|
8723
8723
|
stop: z,
|
|
8724
|
-
status:
|
|
8724
|
+
status: J,
|
|
8725
8725
|
llmUsage: U,
|
|
8726
8726
|
errorMessage: B,
|
|
8727
8727
|
clearError: G
|
|
@@ -8758,7 +8758,7 @@ function ys({
|
|
|
8758
8758
|
scrollRef: we,
|
|
8759
8759
|
isAtBottom: lt,
|
|
8760
8760
|
hasNewMessages: Ft,
|
|
8761
|
-
newMessageCount:
|
|
8761
|
+
newMessageCount: _,
|
|
8762
8762
|
scrollToBottom: ge,
|
|
8763
8763
|
handleScroll: je,
|
|
8764
8764
|
resetNewMessageCount: We
|
|
@@ -8776,7 +8776,7 @@ function ys({
|
|
|
8776
8776
|
}));
|
|
8777
8777
|
}, [x, E, N]), oi({
|
|
8778
8778
|
assistantType: "editor",
|
|
8779
|
-
status:
|
|
8779
|
+
status: J,
|
|
8780
8780
|
isLoading: A,
|
|
8781
8781
|
sendMessage: R
|
|
8782
8782
|
});
|
|
@@ -8993,7 +8993,7 @@ function ys({
|
|
|
8993
8993
|
disableQuickReplies: A
|
|
8994
8994
|
}
|
|
8995
8995
|
),
|
|
8996
|
-
!Lt && /* @__PURE__ */ e(pi, { status:
|
|
8996
|
+
!Lt && /* @__PURE__ */ e(pi, { status: J, errorMessage: B })
|
|
8997
8997
|
] })
|
|
8998
8998
|
}
|
|
8999
8999
|
),
|
|
@@ -9009,7 +9009,7 @@ function ys({
|
|
|
9009
9009
|
"aria-label": "Scroll to bottom",
|
|
9010
9010
|
children: [
|
|
9011
9011
|
/* @__PURE__ */ e(Ye, { className: "h-4 w-4" }),
|
|
9012
|
-
Ft &&
|
|
9012
|
+
Ft && _ > 0 && /* @__PURE__ */ e("span", { className: "ml-1.5 flex h-5 w-5 items-center justify-center rounded-full bg-primary text-xs text-primary-foreground", children: _ > 9 ? "9+" : _ })
|
|
9013
9013
|
]
|
|
9014
9014
|
}
|
|
9015
9015
|
) }),
|
|
@@ -9043,7 +9043,7 @@ function ys({
|
|
|
9043
9043
|
rt(), j(se), ge({ force: !0 });
|
|
9044
9044
|
},
|
|
9045
9045
|
isLoading: A,
|
|
9046
|
-
status:
|
|
9046
|
+
status: J,
|
|
9047
9047
|
assistantType: "editor",
|
|
9048
9048
|
onFocus: () => {
|
|
9049
9049
|
}
|
|
@@ -9172,8 +9172,8 @@ function Vc({
|
|
|
9172
9172
|
);
|
|
9173
9173
|
return (w == null ? void 0 : w.label) || "Select chart type";
|
|
9174
9174
|
};
|
|
9175
|
-
return /* @__PURE__ */ e("div", { className: "", children: /* @__PURE__ */ a(
|
|
9176
|
-
/* @__PURE__ */ e(
|
|
9175
|
+
return /* @__PURE__ */ e("div", { className: "", children: /* @__PURE__ */ a(_e, { open: s, onOpenChange: l, children: [
|
|
9176
|
+
/* @__PURE__ */ e(Je, { asChild: !0, children: /* @__PURE__ */ a(
|
|
9177
9177
|
q,
|
|
9178
9178
|
{
|
|
9179
9179
|
variant: "outline",
|
|
@@ -9227,7 +9227,7 @@ function Vc({
|
|
|
9227
9227
|
/* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
|
|
9228
9228
|
/* @__PURE__ */ e("span", { className: "text-xs text-muted-foreground opacity-0 transition-opacity group-hover:opacity-100", children: "Show on top" }),
|
|
9229
9229
|
/* @__PURE__ */ e(
|
|
9230
|
-
|
|
9230
|
+
Ja,
|
|
9231
9231
|
{
|
|
9232
9232
|
checked: b === "default",
|
|
9233
9233
|
onCheckedChange: (g) => h(g ? "default" : null),
|
|
@@ -9268,7 +9268,7 @@ function Vc({
|
|
|
9268
9268
|
/* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
|
|
9269
9269
|
/* @__PURE__ */ e("span", { className: "text-xs text-muted-foreground opacity-0 transition-opacity group-hover:opacity-100", children: "Show on top" }),
|
|
9270
9270
|
/* @__PURE__ */ e(
|
|
9271
|
-
|
|
9271
|
+
Ja,
|
|
9272
9272
|
{
|
|
9273
9273
|
checked: b === "standardPlugin",
|
|
9274
9274
|
onCheckedChange: (x) => h(
|
|
@@ -9311,7 +9311,7 @@ function Vc({
|
|
|
9311
9311
|
/* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
|
|
9312
9312
|
/* @__PURE__ */ e("span", { className: "text-xs text-muted-foreground opacity-0 transition-opacity group-hover:opacity-100", children: "Show on top" }),
|
|
9313
9313
|
/* @__PURE__ */ e(
|
|
9314
|
-
|
|
9314
|
+
Ja,
|
|
9315
9315
|
{
|
|
9316
9316
|
checked: b === "customPlugin",
|
|
9317
9317
|
onCheckedChange: (x) => h(x ? "customPlugin" : null),
|
|
@@ -9776,7 +9776,7 @@ function Uc({
|
|
|
9776
9776
|
["pie", "doughnut"].includes(n) && o()
|
|
9777
9777
|
] });
|
|
9778
9778
|
}
|
|
9779
|
-
function
|
|
9779
|
+
function _c({
|
|
9780
9780
|
field: t,
|
|
9781
9781
|
searchQuery: n = "",
|
|
9782
9782
|
limit: s = 500
|
|
@@ -10005,7 +10005,7 @@ function Fl({
|
|
|
10005
10005
|
] }),
|
|
10006
10006
|
b.length === 0 && !u && s.length > 0 && /* @__PURE__ */ e("div", { className: "text-center py-4 text-sm text-muted-foreground", children: "All available fields are already filtered" })
|
|
10007
10007
|
] }) : /* @__PURE__ */ e(
|
|
10008
|
-
|
|
10008
|
+
Jc,
|
|
10009
10009
|
{
|
|
10010
10010
|
field: p.field,
|
|
10011
10011
|
selectedValues: p.selectedValues,
|
|
@@ -10030,7 +10030,7 @@ function Fl({
|
|
|
10030
10030
|
] })
|
|
10031
10031
|
] }) });
|
|
10032
10032
|
}
|
|
10033
|
-
function
|
|
10033
|
+
function Jc({
|
|
10034
10034
|
field: t,
|
|
10035
10035
|
selectedValues: n,
|
|
10036
10036
|
onValuesChange: s,
|
|
@@ -10040,7 +10040,7 @@ function _c({
|
|
|
10040
10040
|
values: c,
|
|
10041
10041
|
isLoading: o,
|
|
10042
10042
|
isFetching: i
|
|
10043
|
-
} =
|
|
10043
|
+
} = _c({
|
|
10044
10044
|
field: t,
|
|
10045
10045
|
searchQuery: r,
|
|
10046
10046
|
limit: 500
|
|
@@ -10359,7 +10359,7 @@ function Hc({
|
|
|
10359
10359
|
hasPivotColumns: d = !1,
|
|
10360
10360
|
cardType: c
|
|
10361
10361
|
}) {
|
|
10362
|
-
var Gn, Un,
|
|
10362
|
+
var Gn, Un, _n, Jn, Hn;
|
|
10363
10363
|
const {
|
|
10364
10364
|
attributes: o,
|
|
10365
10365
|
listeners: i,
|
|
@@ -10380,7 +10380,7 @@ function Hc({
|
|
|
10380
10380
|
handleKpiTrendlineWindowChange: g,
|
|
10381
10381
|
handleKpiTrendlineGranularityChange: x,
|
|
10382
10382
|
handleKpiTargetValueChange: S
|
|
10383
|
-
} = ll(b), [O, C] = $(!1), [v, M] = $(!1), [F, T] = $(!1), [R, A] = $(null), [z,
|
|
10383
|
+
} = ll(b), [O, C] = $(!1), [v, M] = $(!1), [F, T] = $(!1), [R, A] = $(null), [z, J] = $(
|
|
10384
10384
|
t.dateFormat || "YYYY-MM-DD"
|
|
10385
10385
|
), [U, B] = $(t.customFormat || ""), [G, Y] = $(!!t.customFormat), [te, ae] = $(
|
|
10386
10386
|
t.granularity || "day"
|
|
@@ -10389,15 +10389,15 @@ function Hc({
|
|
|
10389
10389
|
), [de, xe] = $(
|
|
10390
10390
|
t.valueAliases || {}
|
|
10391
10391
|
), [ie, ne] = $((Gn = t.parameters) == null ? void 0 : Gn.filters), we = (H) => {
|
|
10392
|
-
H === "custom" ? Y(!0) : (Y(!1),
|
|
10392
|
+
H === "custom" ? Y(!0) : (Y(!1), J(H), n === "groupBy" && N(s, H, ""));
|
|
10393
10393
|
}, lt = (H) => {
|
|
10394
10394
|
B(H), n === "groupBy" && N(s, "custom", H);
|
|
10395
10395
|
}, Ft = (H) => {
|
|
10396
10396
|
var Fe;
|
|
10397
10397
|
ae(H);
|
|
10398
10398
|
const oe = (Fe = rs(H)[0]) == null ? void 0 : Fe.value;
|
|
10399
|
-
oe && !G && (
|
|
10400
|
-
},
|
|
10399
|
+
oe && !G && (J(oe), n === "groupBy" && N(s, oe, "")), n === "groupBy" && k(s, H);
|
|
10400
|
+
}, _ = (H) => {
|
|
10401
10401
|
ce(H), n === "metrics" && D(s, H);
|
|
10402
10402
|
}, ge = (H) => {
|
|
10403
10403
|
xe(H), n === "metrics" && V(s, H);
|
|
@@ -10423,7 +10423,7 @@ function Hc({
|
|
|
10423
10423
|
}, Xe = {
|
|
10424
10424
|
transform: $a.Transform.toString(m),
|
|
10425
10425
|
transition: p
|
|
10426
|
-
}, ht = Me(t.dataType), Ze = ht === "date", pt = c === "kpi", Pt = rs(te), rt = n !== "pivotBy", Vt = Ze && n === "groupBy" && (!pt || ((Un = b.config) == null ? void 0 : Un.comparisonType) === "start_vs_end"), Bt = !pt && Ze && n === "groupBy", zt = c && Ei.includes(c) && Ze && n === "groupBy", jt = c === "kpi" && Ze && n === "groupBy", ft = c && c !== "pivotTable" && n === "metrics" && ((
|
|
10426
|
+
}, ht = Me(t.dataType), Ze = ht === "date", pt = c === "kpi", Pt = rs(te), rt = n !== "pivotBy", Vt = Ze && n === "groupBy" && (!pt || ((Un = b.config) == null ? void 0 : Un.comparisonType) === "start_vs_end"), Bt = !pt && Ze && n === "groupBy", zt = c && Ei.includes(c) && Ze && n === "groupBy", jt = c === "kpi" && Ze && n === "groupBy", ft = c && c !== "pivotTable" && n === "metrics" && ((_n = b.config) == null ? void 0 : _n.comparisonType) === "target", gt = n === "metrics", se = () => {
|
|
10427
10427
|
const H = t, ye = n === "metrics" && ka(H);
|
|
10428
10428
|
return /* @__PURE__ */ a("div", { className: "space-y-1", children: [
|
|
10429
10429
|
!ye && /* @__PURE__ */ e(
|
|
@@ -10746,7 +10746,7 @@ function Hc({
|
|
|
10746
10746
|
qc,
|
|
10747
10747
|
{
|
|
10748
10748
|
aliasTemplate: j,
|
|
10749
|
-
onAliasTemplateChange:
|
|
10749
|
+
onAliasTemplateChange: _
|
|
10750
10750
|
}
|
|
10751
10751
|
),
|
|
10752
10752
|
/* @__PURE__ */ e(
|
|
@@ -10781,7 +10781,7 @@ function Hc({
|
|
|
10781
10781
|
children: Ai(t)
|
|
10782
10782
|
}
|
|
10783
10783
|
),
|
|
10784
|
-
n === "metrics" && ((
|
|
10784
|
+
n === "metrics" && ((Jn = ie == null ? void 0 : ie.conditions) == null ? void 0 : Jn.length) && !O && /* @__PURE__ */ e(Ke, { children: /* @__PURE__ */ a(Te, { children: [
|
|
10785
10785
|
/* @__PURE__ */ e(Ee, { asChild: !0, children: /* @__PURE__ */ a("div", { className: "flex items-center gap-1 rounded bg-primary/10 px-1.5 py-0.5 text-xs", children: [
|
|
10786
10786
|
/* @__PURE__ */ e(sa, { className: "h-3 w-3" }),
|
|
10787
10787
|
/* @__PURE__ */ e("span", { children: ie.conditions.length })
|
|
@@ -12202,8 +12202,8 @@ function ld({
|
|
|
12202
12202
|
i[m] || (i[m] = {}), i[m][u.entityId] || (i[m][u.entityId] = []), i[m][u.entityId].push(u);
|
|
12203
12203
|
}), i;
|
|
12204
12204
|
}, [s]);
|
|
12205
|
-
return /* @__PURE__ */ a(
|
|
12206
|
-
/* @__PURE__ */ e(
|
|
12205
|
+
return /* @__PURE__ */ a(_e, { modal: !0, open: d, onOpenChange: c, children: [
|
|
12206
|
+
/* @__PURE__ */ e(Je, { asChild: !0, children: /* @__PURE__ */ a(
|
|
12207
12207
|
q,
|
|
12208
12208
|
{
|
|
12209
12209
|
variant: "outline",
|
|
@@ -12343,8 +12343,8 @@ function rd({
|
|
|
12343
12343
|
}, u = (m) => {
|
|
12344
12344
|
n.includes(m) ? s(n.filter((p) => p !== m)) : s([...n, m]);
|
|
12345
12345
|
};
|
|
12346
|
-
return /* @__PURE__ */ e("div", { className: Q("w-full", r), children: /* @__PURE__ */ a(
|
|
12347
|
-
/* @__PURE__ */ e(
|
|
12346
|
+
return /* @__PURE__ */ e("div", { className: Q("w-full", r), children: /* @__PURE__ */ a(_e, { open: d, onOpenChange: c, modal: !0, children: [
|
|
12347
|
+
/* @__PURE__ */ e(Je, { asChild: !0, children: /* @__PURE__ */ a(
|
|
12348
12348
|
q,
|
|
12349
12349
|
{
|
|
12350
12350
|
variant: "outline",
|
|
@@ -12609,7 +12609,7 @@ function Pl({
|
|
|
12609
12609
|
...u,
|
|
12610
12610
|
...m,
|
|
12611
12611
|
className: "cursor-grab active:cursor-grabbing",
|
|
12612
|
-
children: /* @__PURE__ */ e(
|
|
12612
|
+
children: /* @__PURE__ */ e(Jt, { className: "h-4 w-4 flex-shrink-0 text-gray-400" })
|
|
12613
12613
|
}
|
|
12614
12614
|
),
|
|
12615
12615
|
n > 0 && /* @__PURE__ */ a(
|
|
@@ -12816,7 +12816,7 @@ function gd({
|
|
|
12816
12816
|
...N,
|
|
12817
12817
|
...k,
|
|
12818
12818
|
className: "cursor-grab active:cursor-grabbing",
|
|
12819
|
-
children: /* @__PURE__ */ e(
|
|
12819
|
+
children: /* @__PURE__ */ e(Jt, { className: "h-4 w-4 text-muted-foreground" })
|
|
12820
12820
|
}
|
|
12821
12821
|
),
|
|
12822
12822
|
/* @__PURE__ */ e(
|
|
@@ -12866,7 +12866,7 @@ function gd({
|
|
|
12866
12866
|
coordinateGetter: rn
|
|
12867
12867
|
})
|
|
12868
12868
|
),
|
|
12869
|
-
collisionDetection:
|
|
12869
|
+
collisionDetection: _t,
|
|
12870
12870
|
onDragEnd: g,
|
|
12871
12871
|
children: /* @__PURE__ */ e(
|
|
12872
12872
|
It,
|
|
@@ -12902,7 +12902,7 @@ function gd({
|
|
|
12902
12902
|
coordinateGetter: rn
|
|
12903
12903
|
})
|
|
12904
12904
|
),
|
|
12905
|
-
collisionDetection:
|
|
12905
|
+
collisionDetection: _t,
|
|
12906
12906
|
onDragEnd: x,
|
|
12907
12907
|
children: /* @__PURE__ */ e(
|
|
12908
12908
|
It,
|
|
@@ -12999,14 +12999,14 @@ function xd({
|
|
|
12999
12999
|
Ut,
|
|
13000
13000
|
{
|
|
13001
13001
|
sensors: E,
|
|
13002
|
-
collisionDetection:
|
|
13002
|
+
collisionDetection: _t,
|
|
13003
13003
|
onDragEnd: (F) => {
|
|
13004
13004
|
const { active: T, over: R } = F;
|
|
13005
13005
|
if (R && T.id !== R.id) {
|
|
13006
13006
|
const A = C.conditions.findIndex(
|
|
13007
|
-
(
|
|
13007
|
+
(J) => J.id === T.id
|
|
13008
13008
|
), z = C.conditions.findIndex(
|
|
13009
|
-
(
|
|
13009
|
+
(J) => J.id === R.id
|
|
13010
13010
|
);
|
|
13011
13011
|
A !== -1 && z !== -1 && N(C.id, A, z);
|
|
13012
13012
|
}
|
|
@@ -13040,14 +13040,14 @@ function xd({
|
|
|
13040
13040
|
Ut,
|
|
13041
13041
|
{
|
|
13042
13042
|
sensors: E,
|
|
13043
|
-
collisionDetection:
|
|
13043
|
+
collisionDetection: _t,
|
|
13044
13044
|
onDragEnd: (F) => {
|
|
13045
13045
|
const { active: T, over: R } = F;
|
|
13046
13046
|
if (R && T.id !== R.id) {
|
|
13047
13047
|
const A = C.groups.findIndex(
|
|
13048
|
-
(
|
|
13048
|
+
(J) => J.id === T.id
|
|
13049
13049
|
), z = C.groups.findIndex(
|
|
13050
|
-
(
|
|
13050
|
+
(J) => J.id === R.id
|
|
13051
13051
|
);
|
|
13052
13052
|
A !== -1 && z !== -1 && k(C.id, A, z);
|
|
13053
13053
|
}
|
|
@@ -13661,7 +13661,7 @@ function Td({
|
|
|
13661
13661
|
errorSql: R,
|
|
13662
13662
|
pagination: A,
|
|
13663
13663
|
refetch: z,
|
|
13664
|
-
comparisonMetadata:
|
|
13664
|
+
comparisonMetadata: J
|
|
13665
13665
|
} = De(d), U = Ne(() => (v == null ? void 0 : v.records) || [], [v == null ? void 0 : v.records]), [B, G] = $(!1);
|
|
13666
13666
|
fe(() => {
|
|
13667
13667
|
T || G(!1);
|
|
@@ -13761,10 +13761,10 @@ function Td({
|
|
|
13761
13761
|
onFiltersClick: r
|
|
13762
13762
|
}
|
|
13763
13763
|
),
|
|
13764
|
-
|
|
13764
|
+
J && /* @__PURE__ */ e(
|
|
13765
13765
|
ji,
|
|
13766
13766
|
{
|
|
13767
|
-
metadata:
|
|
13767
|
+
metadata: J,
|
|
13768
13768
|
variant: "compact"
|
|
13769
13769
|
}
|
|
13770
13770
|
),
|
|
@@ -13928,7 +13928,7 @@ function Ed({ activeField: t }) {
|
|
|
13928
13928
|
{
|
|
13929
13929
|
className: `flex max-w-[300px] items-center gap-2 rounded-lg border border-blue-500 bg-background p-2 shadow-lg transition-all duration-200 ${n ? "scale-100 opacity-100" : "scale-95 opacity-0"}`,
|
|
13930
13930
|
children: [
|
|
13931
|
-
/* @__PURE__ */ e(
|
|
13931
|
+
/* @__PURE__ */ e(Jt, { className: "h-3 w-3 shrink-0 text-muted-foreground" }),
|
|
13932
13932
|
/* @__PURE__ */ e(Kn, { dataType: t.dataType }),
|
|
13933
13933
|
/* @__PURE__ */ e("span", { className: "overflow-hidden text-ellipsis whitespace-nowrap text-sm dark:text-muted-foreground", children: t.label || t.name })
|
|
13934
13934
|
]
|
|
@@ -13963,7 +13963,7 @@ const Dd = () => {
|
|
|
13963
13963
|
};
|
|
13964
13964
|
};
|
|
13965
13965
|
function Md({ column: t, isSelected: n, onSelect: s, availableFields: l, width: r, onWidthChange: d }) {
|
|
13966
|
-
var
|
|
13966
|
+
var J, U, B;
|
|
13967
13967
|
const c = I((G) => G.card), { updateCardConfig: o, removeGroupByColumn: i, removeMetricColumn: u, updateFilters: m } = le(), [p, f] = $(!1), [b, h] = $(!1), y = Qe(null), N = ze((G) => {
|
|
13968
13968
|
G.preventDefault(), G.stopPropagation(), h(!0), y.current = {
|
|
13969
13969
|
startX: G.clientX,
|
|
@@ -13977,7 +13977,7 @@ function Md({ column: t, isSelected: n, onSelect: s, availableFields: l, width:
|
|
|
13977
13977
|
h(!1), y.current = null, document.removeEventListener("mousemove", Y), document.removeEventListener("mouseup", te);
|
|
13978
13978
|
};
|
|
13979
13979
|
document.addEventListener("mousemove", Y), document.addEventListener("mouseup", te);
|
|
13980
|
-
}, [r, t.id, d]), k = (
|
|
13980
|
+
}, [r, t.id, d]), k = (J = c == null ? void 0 : c.config) == null ? void 0 : J.filters, D = (U = k == null ? void 0 : k.conditions) == null ? void 0 : U.some(
|
|
13981
13981
|
(G) => G.field.name === t.name && G.field.qualifiedEntityName === t.qualifiedEntityName
|
|
13982
13982
|
), V = (G) => {
|
|
13983
13983
|
G ? m(c.id, G) : o(c.id, { filters: void 0 });
|
|
@@ -14083,7 +14083,7 @@ function Md({ column: t, isSelected: n, onSelect: s, availableFields: l, width:
|
|
|
14083
14083
|
...L,
|
|
14084
14084
|
...E,
|
|
14085
14085
|
className: "cursor-grab p-1 text-muted-foreground opacity-0 transition-opacity hover:text-foreground group-hover:opacity-100 active:cursor-grabbing",
|
|
14086
|
-
children: /* @__PURE__ */ e(
|
|
14086
|
+
children: /* @__PURE__ */ e(Jt, { className: "h-3 w-3" })
|
|
14087
14087
|
}
|
|
14088
14088
|
),
|
|
14089
14089
|
/* @__PURE__ */ a(Mn, { children: [
|
|
@@ -14258,10 +14258,10 @@ function Od({
|
|
|
14258
14258
|
if (o(null), !F || M.id === F.id) return;
|
|
14259
14259
|
const T = f.findIndex((A) => A.id === M.id), R = f.findIndex((A) => A.id === F.id);
|
|
14260
14260
|
if (T !== -1 && R !== -1) {
|
|
14261
|
-
const A = Aa(f, T, R), z = A.filter((U) => U.role === "groupby"),
|
|
14261
|
+
const A = Aa(f, T, R), z = A.filter((U) => U.role === "groupby"), J = A.filter((U) => U.role === "metric");
|
|
14262
14262
|
d(r.id, {
|
|
14263
14263
|
groupByColumns: z,
|
|
14264
|
-
metricColumns:
|
|
14264
|
+
metricColumns: J
|
|
14265
14265
|
});
|
|
14266
14266
|
}
|
|
14267
14267
|
}, w = c ? f.find((v) => v.id === c) : null, g = (v) => {
|
|
@@ -14278,7 +14278,7 @@ function Od({
|
|
|
14278
14278
|
Ut,
|
|
14279
14279
|
{
|
|
14280
14280
|
sensors: V,
|
|
14281
|
-
collisionDetection:
|
|
14281
|
+
collisionDetection: _t,
|
|
14282
14282
|
onDragStart: L,
|
|
14283
14283
|
onDragEnd: E,
|
|
14284
14284
|
children: [
|
|
@@ -14328,8 +14328,8 @@ function Od({
|
|
|
14328
14328
|
))
|
|
14329
14329
|
}
|
|
14330
14330
|
),
|
|
14331
|
-
/* @__PURE__ */ e("th", { className: "w-10 border-r border-border bg-background px-1 py-2", children: /* @__PURE__ */ a(
|
|
14332
|
-
/* @__PURE__ */ e(
|
|
14331
|
+
/* @__PURE__ */ e("th", { className: "w-10 border-r border-border bg-background px-1 py-2", children: /* @__PURE__ */ a(_e, { open: m, onOpenChange: p, children: [
|
|
14332
|
+
/* @__PURE__ */ e(Je, { asChild: !0, children: /* @__PURE__ */ e(
|
|
14333
14333
|
q,
|
|
14334
14334
|
{
|
|
14335
14335
|
variant: "ghost",
|
|
@@ -14547,7 +14547,7 @@ function Fd({
|
|
|
14547
14547
|
{
|
|
14548
14548
|
className: "group flex items-center gap-2 rounded px-2 py-1.5 text-sm hover:bg-muted/50",
|
|
14549
14549
|
children: [
|
|
14550
|
-
/* @__PURE__ */ e(
|
|
14550
|
+
/* @__PURE__ */ e(Jt, { className: "h-3 w-3 cursor-grab text-muted-foreground opacity-0 transition-opacity group-hover:opacity-100" }),
|
|
14551
14551
|
/* @__PURE__ */ e(w, { className: "h-3.5 w-3.5 text-muted-foreground" }),
|
|
14552
14552
|
/* @__PURE__ */ e("span", { className: "flex-1 truncate", children: E.label || E.name }),
|
|
14553
14553
|
/* @__PURE__ */ e(
|
|
@@ -14580,7 +14580,7 @@ function Fd({
|
|
|
14580
14580
|
{
|
|
14581
14581
|
className: "group flex items-center gap-2 rounded px-2 py-1.5 text-sm hover:bg-muted/50",
|
|
14582
14582
|
children: [
|
|
14583
|
-
/* @__PURE__ */ e(
|
|
14583
|
+
/* @__PURE__ */ e(Jt, { className: "h-3 w-3 cursor-grab text-muted-foreground opacity-0 transition-opacity group-hover:opacity-100" }),
|
|
14584
14584
|
/* @__PURE__ */ e(w, { className: "h-3.5 w-3.5 text-muted-foreground" }),
|
|
14585
14585
|
/* @__PURE__ */ e("span", { className: "flex-1 truncate", children: E.label || E.name }),
|
|
14586
14586
|
/* @__PURE__ */ e("span", { className: "text-xs text-muted-foreground", children: E.aggregate }),
|
|
@@ -14731,10 +14731,10 @@ function Pd({
|
|
|
14731
14731
|
};
|
|
14732
14732
|
return /* @__PURE__ */ a("div", { className: "flex items-center gap-2 border-b border-border bg-muted/30 px-3 py-1.5", children: [
|
|
14733
14733
|
/* @__PURE__ */ e("div", { className: "flex min-w-[100px] items-center justify-center rounded border border-border bg-background px-2 py-1 text-xs font-medium text-muted-foreground", children: r ? /* @__PURE__ */ e("span", { className: "truncate", children: r.label || r.name }) : /* @__PURE__ */ e("span", { children: "—" }) }),
|
|
14734
|
-
/* @__PURE__ */ a(
|
|
14734
|
+
/* @__PURE__ */ a(_e, { open: c && i === "function", onOpenChange: (h) => {
|
|
14735
14735
|
o(h), h && u("function");
|
|
14736
14736
|
}, children: [
|
|
14737
|
-
/* @__PURE__ */ e(
|
|
14737
|
+
/* @__PURE__ */ e(Je, { asChild: !0, children: /* @__PURE__ */ e(
|
|
14738
14738
|
q,
|
|
14739
14739
|
{
|
|
14740
14740
|
variant: "ghost",
|
|
@@ -14766,10 +14766,10 @@ function Pd({
|
|
|
14766
14766
|
] })
|
|
14767
14767
|
] }) })
|
|
14768
14768
|
] }),
|
|
14769
|
-
/* @__PURE__ */ a(
|
|
14769
|
+
/* @__PURE__ */ a(_e, { open: c && i === "column", onOpenChange: (h) => {
|
|
14770
14770
|
o(h), h && u("column");
|
|
14771
14771
|
}, children: [
|
|
14772
|
-
/* @__PURE__ */ e(
|
|
14772
|
+
/* @__PURE__ */ e(Je, { asChild: !0, children: /* @__PURE__ */ a(
|
|
14773
14773
|
q,
|
|
14774
14774
|
{
|
|
14775
14775
|
variant: "ghost",
|
|
@@ -14888,7 +14888,7 @@ function Vd({ className: t }) {
|
|
|
14888
14888
|
] });
|
|
14889
14889
|
}
|
|
14890
14890
|
function Bd() {
|
|
14891
|
-
var
|
|
14891
|
+
var J, U;
|
|
14892
14892
|
const [t, n] = $(
|
|
14893
14893
|
"chart"
|
|
14894
14894
|
), [s, l] = $(!1), [r, d] = $(!1), [c, o] = $(!0), i = I((B) => B.showAIDialog), u = ke((B) => B.isVisualEditing), { setCardType: m } = le(), p = I((B) => B.card.type);
|
|
@@ -14933,12 +14933,12 @@ function Bd() {
|
|
|
14933
14933
|
return B.groups.forEach((Y) => {
|
|
14934
14934
|
G += A(Y);
|
|
14935
14935
|
}), G;
|
|
14936
|
-
}, z = A(((
|
|
14936
|
+
}, z = A(((J = x == null ? void 0 : x.config) == null ? void 0 : J.filters) || null);
|
|
14937
14937
|
return /* @__PURE__ */ a(
|
|
14938
14938
|
Ut,
|
|
14939
14939
|
{
|
|
14940
14940
|
sensors: g,
|
|
14941
|
-
collisionDetection:
|
|
14941
|
+
collisionDetection: _t,
|
|
14942
14942
|
onDragStart: v,
|
|
14943
14943
|
onDragEnd: M,
|
|
14944
14944
|
children: [
|
|
@@ -15016,7 +15016,7 @@ function Bd() {
|
|
|
15016
15016
|
);
|
|
15017
15017
|
}
|
|
15018
15018
|
function zd({ authToken: t, onSave: n, onClose: s }) {
|
|
15019
|
-
const l = Qe(null), r = I((w) => w.showAIDialog), d = I((w) => w.isDevMode), c = Xa((w) => w.setFullscreen), o = Xa((w) => w.setPanelOpen), i = Xa((w) => w.setContainer), u =
|
|
15019
|
+
const l = Qe(null), r = I((w) => w.showAIDialog), d = I((w) => w.isDevMode), c = Xa((w) => w.setFullscreen), o = Xa((w) => w.setPanelOpen), i = Xa((w) => w.setContainer), u = _i("editor"), m = Ji(), p = Hi("editor"), f = m === "editor", b = ze(
|
|
15020
15020
|
(w) => {
|
|
15021
15021
|
i("editor", w);
|
|
15022
15022
|
},
|
|
@@ -15146,7 +15146,7 @@ function zd({ authToken: t, onSave: n, onClose: s }) {
|
|
|
15146
15146
|
}
|
|
15147
15147
|
) : E() });
|
|
15148
15148
|
}
|
|
15149
|
-
function
|
|
15149
|
+
function Jd() {
|
|
15150
15150
|
ke((c) => c.selectedCardId);
|
|
15151
15151
|
const t = ke((c) => c.selectedSheetId), { setIsVisualEditing: n } = ke((c) => c.actions), s = ke((c) => c.isVisualEditing), l = ke((c) => c.actions.updateFrame);
|
|
15152
15152
|
function r(c) {
|
|
@@ -15167,5 +15167,5 @@ function _d() {
|
|
|
15167
15167
|
);
|
|
15168
15168
|
}
|
|
15169
15169
|
export {
|
|
15170
|
-
|
|
15170
|
+
Jd as default
|
|
15171
15171
|
};
|