react-semaphor 0.1.588 → 0.1.589
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/brand-studio/index.js +5 -5
- package/dist/chunks/{assistant-chat-BeM6joPc.js → assistant-chat-DBPa6sJU.js} +5 -5
- package/dist/chunks/{card-filter-builder-DmodrhyI.js → card-filter-builder-CGM7ROM0.js} +166 -166
- package/dist/chunks/{dashboard-Tu5wT0Cw.js → dashboard-UXH3E31V.js} +1 -1
- package/dist/chunks/{dashboard-briefing-launcher-D8jMxIJo.js → dashboard-briefing-launcher-CTFuSWH_.js} +154 -154
- package/dist/chunks/{dashboard-controls-uzeAIEkM.js → dashboard-controls-BcxWhOKw.js} +42 -42
- package/dist/chunks/{dashboard-json-i5rpFNCg.js → dashboard-json-C-oBcKKC.js} +2 -2
- package/dist/chunks/{edit-dashboard-visual-BpEK_Sls.js → edit-dashboard-visual-COjKc_Du.js} +718 -718
- package/dist/chunks/{layout-grid-XCYphks2.js → layout-grid-BG__sPkb.js} +1 -1
- package/dist/chunks/{list-filter-DGV3fqqv.js → list-filter-Cb8i7N8f.js} +1 -1
- package/dist/chunks/{paintbrush-DEEZXhDj.js → paintbrush-C310xSuR.js} +1 -1
- package/dist/chunks/{palette-Bgy0H-Nt.js → palette-Ci5P91Zb.js} +1 -1
- package/dist/chunks/report-preferences-dialog-DtuOcejh.js +1637 -0
- package/dist/chunks/{save-xnRCvMeA.js → save-BhhXfp4s.js} +1 -1
- package/dist/chunks/{semaphor-ready-indicator-zU9reNmX.js → semaphor-ready-indicator-HGEnCavj.js} +27084 -26516
- package/dist/chunks/{shelf-drop-preview-context-R9sf4oDX.js → shelf-drop-preview-context-DaCXCdMA.js} +108 -108
- package/dist/chunks/{style-sheet-parts-D7NbsFL0.js → style-sheet-parts-CmXmKqGw.js} +30 -30
- package/dist/chunks/{upload-BXGgYS4g.js → upload-DDYc1Qjj.js} +1 -1
- package/dist/dashboard/index.js +1 -1
- package/dist/index.js +208 -209
- package/dist/style.css +1 -1
- package/dist/surfboard/index.js +1 -1
- package/package.json +1 -1
- package/dist/chunks/report-preferences-dialog-CTM0xfd0.js +0 -2028
|
@@ -1,32 +1,32 @@
|
|
|
1
1
|
import { jsx as e, jsxs as n, Fragment as he } from "react/jsx-runtime";
|
|
2
2
|
import dl, { useState as U, useEffect as we, useMemo as se, useRef as Ke, useCallback as xt, useId as Ma, useContext as dr, Suspense as qi } from "react";
|
|
3
|
-
import { F as $i, P as zi, a as Hi, b as ul, u as lt, S as Cs, c as ws, r as ml, E as Ui, T as Gi, A as
|
|
4
|
-
import { c as
|
|
5
|
-
import { a5 as hl, M as ec, v as Ss, m as
|
|
3
|
+
import { F as $i, P as zi, a as Hi, b as ul, u as lt, S as Cs, c as ws, r as ml, E as Ui, T as Gi, A as Ji, d as Qi, e as Ga, f as Wi, g as Xi, h as Zi } from "./shelf-drop-preview-context-DaCXCdMA.js";
|
|
4
|
+
import { c as Q } from "./pickers-DkqmtnTL.js";
|
|
5
|
+
import { a5 as hl, M as ec, v as Ss, m as Ja } from "./validators-CrYXNnNE.js";
|
|
6
6
|
import "./matrix-operation-contract-JSmproo9.js";
|
|
7
7
|
import { z as tc } from "./analytics-base-schemas-8wz9vqn_.js";
|
|
8
8
|
import { DEFAULT_RESOLVED_VALUE_FORMAT_PREFERENCES as pa } from "../value-format-preferences/index.js";
|
|
9
|
-
import {
|
|
10
|
-
import { c as qe, B as ne, r as ao, m as mn, s as O, y as W, z as X, A as Z, D as ee, E as $, F as Vt, X as st, w as ut, t as bt, u as mt, v as ht, e as It, f as Bt, h as At, x as Ae,
|
|
11
|
-
import { U as Vu } from "./upload-
|
|
12
|
-
import { i9 as Bu, dx as Ku, ia as ju, ib as Dr, ic as ga, id as qu, ie as Os, ig as $u, ih as zu, ii as Ls, R as la, cF as lo, S as oa, U as Oa, V as Yt, W as ha, cl as Hu, bA as
|
|
13
|
-
import { c as hh, A as ph, g as Pr, i as fh, a as gh, F as xh, V as bo, I as rt, d as bh, u as vh, C as yh, b as Nh } from "./card-filter-builder-
|
|
9
|
+
import { cK as ac, eG as Da, en as Fa, cJ as pl, eq as Ra, eH as Ea, eI as nc, an as ve, eJ as rc, bG as qt, bH as $t, bI as Wt, bJ as zt, bK as Ht, bE as Ia, cM as gt, cH as Kt, cF as ja, bF as ct, eK as fl, dB as qa, b_ as Et, c4 as _t, dA as gl, eL as xa, bY as rn, am as E, b4 as nt, eM as xl, eN as sc, eO as lc, eP as oc, c9 as ur, eQ as ic, dm as bl, b8 as ea, dJ as vl, ez as yl, eR as cc, cv as mr, dH as dc, cx as uc, cy as mc, cz as hc, cA as pc, cB as fc, cC as gc, cD as xc, cE as bc, b5 as hr, u as ge, b2 as ta, eS as Nl, ch as Qa, eT as Cl, b3 as Dn, bz as pr, bc as wl, eU as fr, bO as sn, bV as vc, d$ as yc, eV as Wn, cS as aa, cT as na, cU as ra, cX as Nc, e1 as gr, eW as xr, eX as ln, eY as Sl, ds as br, dr as kl, eZ as Cc, e_ as wc, e$ as Lt, f0 as Sc, f1 as kc, f2 as Tc, f3 as Mc, f4 as Tl, a4 as Ml, M as Dc, eg as Fc, f5 as Ec, dy as Ic, f6 as vr, E as on, e as yr, f7 as Dl, f8 as Ac, f9 as ks, fa as Rc, fb as Fl, fc as Pc, fd as Oc, bZ as El, fe as Lc, ff as Yc, fg as _c, fh as Vc, fi as Wa, fj as Bc, fk as Kc, fl as Il, fm as Al, fn as jc, fo as qc, dY as $c, fp as zc, fq as Rl, fr as Hc, dv as Uc, du as cn, fs as dn, cj as Nr, ck as Cr, cl as wr, ft as Gc, fu as Jc, dg as Pl, dh as Qc, di as Wc, dj as Xc, b1 as Zc, fv as ed, fw as td, fx as ad, fy as nd, fz as Ts, fA as rd, fB as Ol, fC as Ll, b7 as Yl, b9 as sd, be as ld, bf as od, ba as id, bb as cd, fD as dd, fE as ud, fF as md, fG as hd, fH as Ms, bh as pd, bi as fd, fI as _l, fJ as da, fK as ua, fL as ma, el as fa, co as Vl, c6 as Dt, cq as Ds, cr as Fs, cs as Xn, fM as Bl, fN as gd, fO as xd, fP as bd, fQ as vd, fR as un, fS as Le, fT as Ye, fU as _e, dE as yd, dF as Nd, fV as Kl, fW as jl, fX as Cd, fY as Sr, fZ as kr, f_ as wd, f$ as ql, g0 as Sd, g1 as kd, g2 as Zn, g3 as Td, g4 as Md, g5 as Dd, g6 as Fd, g7 as Ed, g8 as Id, g9 as Jt, ga as Na, gb as Es, gc as Ad, gd as Fn, ge as Is, gf as Rd, gg as Pd, bA as Tr, bB as Aa, gh as En, gi as $l, gj as Od, gk as Ld, gl as Yd, gm as _d, gn as zl, go as Hl, gp as Vd, gq as Bd, gr as Kd, gs as Ul, gt as jd, gu as qd, gv as Gl, dw as $d, dx as zd, dG as Hd, dz as Ud, c8 as Gd, gw as Jd, gx as Qd, gy as Wd, d0 as Xd, cY as Jl, gz as Ql, gA as Zd, d5 as eu, gB as Wl, gC as tu, gD as au, gE as nu, gF as ru, gG as su, gH as Mr, er as Xl, gI as Zl, gJ as $a, gK as eo, gL as to, gM as As, gN as lu, gO as ou, gP as iu, gQ as cu, dL as du, gR as uu, bj as mu, gS as Rs, eB as hu, gT as pu, eC as fu, eE as gu, eF as xu, o as bu, gU as vu, df as yu, gV as Nu, gW as Cu, gX as wu, gY as Su, da as ku, db as Tu, gZ as Mu, g_ as Du, de as Fu, ak as Eu, dK as Iu, F as Au, g$ as Ru, bu as Pu } from "./semaphor-ready-indicator-HGEnCavj.js";
|
|
10
|
+
import { c as qe, B as ne, r as ao, m as mn, s as O, y as W, z as X, A as Z, D as ee, E as $, F as Vt, X as st, w as ut, t as bt, u as mt, v as ht, e as It, f as Bt, h as At, x as Ae, a8 as Ou, L as Pa, C as Xt, T as Ut, k as Gt, l as at, n as St, j as sa, I as Zt, aa as Lu, ab as Yu, q as no, i as Xa, ac as er, ad as ro, d as ke, R as Ps, p as so, ae as _u } from "./style-sheet-parts-CmXmKqGw.js";
|
|
11
|
+
import { U as Vu } from "./upload-DDYc1Qjj.js";
|
|
12
|
+
import { i9 as Bu, dx as Ku, ia as ju, ib as Dr, ic as ga, id as qu, ie as Os, ig as $u, ih as zu, ii as Ls, R as la, cF as lo, S as oa, U as Oa, V as Yt, W as ha, cl as Hu, bA as Fr, eX as Uu, i4 as Gu, gA as La, i as Ju, bf as Qu, gn as Er, fI as oo, n as Wu, ij as Xu, ik as Zu, il as em, im as tm, gk as jt, he as am, hd as nm, io as rm, ip as io, fW as sm, cY as lm, iq as co, go as om, dl as im, dj as In, ir as cm, is as dm, it as um, iu as mm, Y as hm, T as uo, Z as pm, iv as tr, iw as fm, ix as gm, iy as xm, iz as Ir, fK as bm, eH as Ar, aw as vm, a8 as ar, f6 as ym, gF as Nm, c0 as mo, c3 as Cm, bk as wm, c2 as nr, c4 as za, b as ho, iA as Sm, bj as km, bs as Tm, iB as Mm, iC as Dm, f9 as Fm, iD as Em, f8 as po, iE as Im, iF as Am, iG as Rm, iH as Ys, iI as Pm, iJ as Om, iK as Lm, gi as wt, iL as Ym, iM as _m, iN as Vm, iO as Bm, iP as Km, iQ as jm, iR as _s, iS as Vs, iT as qm, a as fo, ak as $m, bT as zm, bR as Hm, iU as Um, iV as Gm, iW as Jm, iX as Qm, ht as Wm, bc as Xm, iY as Bs, iZ as Zm, i_ as eh, ba as th, fi as ah, fo as nh, aa as rh, gJ as sh, i$ as go, hv as lh, c5 as oh, bX as ih, j0 as ch, eY as dh, j1 as uh, j2 as xo, j3 as Rr, e as Za, gm as mh } from "./resolve-dashboard-input-context-DFBIngUZ.js";
|
|
13
|
+
import { c as hh, A as ph, g as Pr, i as fh, a as gh, F as xh, V as bo, I as rt, d as bh, u as vh, C as yh, b as Nh } from "./card-filter-builder-CGM7ROM0.js";
|
|
14
14
|
import "zod";
|
|
15
15
|
import { aO as Ch, aN as hn, aK as Or, k as wh, X as Sh, aG as vo } from "./pivot-result-contract-expectations-DbBahmgc.js";
|
|
16
16
|
import { aK as kh, aE as Th, z as Mh } from "./bookmark-state-Bn7k3ttp.js";
|
|
17
17
|
import "./schema-C9NPiIru.js";
|
|
18
18
|
import { i as yo } from "./index-CV_Kzou0.js";
|
|
19
19
|
import "./context-CVXTFljo.js";
|
|
20
|
-
import { N as Lr, a4 as Dh, a5 as No, a6 as Co, a7 as Yr, a8 as _r, a3 as Ha, a9 as
|
|
20
|
+
import { N as Lr, a4 as Dh, a5 as No, a6 as Co, a7 as Yr, a8 as _r, a3 as Ha, a9 as Fh, K as Eh, L as Ih, O as Ah } from "./filter-reach-copy-D5AmDHda.js";
|
|
21
21
|
import { E as Rh, $ as Ph, e as Oh, a0 as Lh, U as wo, a1 as Yh, V as So, a2 as _h, R as Vh, s as Bh, a3 as Kh, a4 as jh, a5 as qh, B as $h } from "./stored-dashboard-CksluF2S.js";
|
|
22
22
|
import "react-dom";
|
|
23
|
-
import { L as Ks } from "./list-filter-
|
|
23
|
+
import { L as Ks } from "./list-filter-Cb8i7N8f.js";
|
|
24
24
|
import { r as zh } from "./export-file-format-C-tJsxsf.js";
|
|
25
25
|
import { u as Hh } from "./appearance-context-BwBp25ZG.js";
|
|
26
|
-
import { P as Uh } from "./paintbrush-
|
|
26
|
+
import { P as Uh } from "./paintbrush-C310xSuR.js";
|
|
27
27
|
import { D as Gh } from "./metric-comparison-xE_J6hkg.js";
|
|
28
|
-
import { P as
|
|
29
|
-
import { K as
|
|
28
|
+
import { P as Jh } from "./palette-Ci5P91Zb.js";
|
|
29
|
+
import { K as Qh, r as Wh, d as Xh } from "./dates-BunbHJH0.js";
|
|
30
30
|
import "./attribution-BvoKvhcj.js";
|
|
31
31
|
/**
|
|
32
32
|
* @license lucide-react v0.453.0 - ISC
|
|
@@ -334,7 +334,7 @@ function pp(t, a = {}) {
|
|
|
334
334
|
case "table":
|
|
335
335
|
return /* @__PURE__ */ e(nc, { className: s });
|
|
336
336
|
case "view":
|
|
337
|
-
return /* @__PURE__ */ e(
|
|
337
|
+
return /* @__PURE__ */ e(Ea, { className: s });
|
|
338
338
|
case "materialized view":
|
|
339
339
|
return /* @__PURE__ */ e(tp, { className: s });
|
|
340
340
|
case "model":
|
|
@@ -342,7 +342,7 @@ function pp(t, a = {}) {
|
|
|
342
342
|
case "file":
|
|
343
343
|
return /* @__PURE__ */ e(pl, { className: s });
|
|
344
344
|
case "dataset":
|
|
345
|
-
return /* @__PURE__ */ e(
|
|
345
|
+
return /* @__PURE__ */ e(Fa, { className: s });
|
|
346
346
|
case "upload":
|
|
347
347
|
return /* @__PURE__ */ e(Vu, { className: s });
|
|
348
348
|
case "url":
|
|
@@ -428,7 +428,7 @@ function fp({
|
|
|
428
428
|
/* @__PURE__ */ e(mn, { className: "h-64", children: /* @__PURE__ */ e("div", { className: "space-y-2", children: c.map((h, C) => /* @__PURE__ */ n(
|
|
429
429
|
"div",
|
|
430
430
|
{
|
|
431
|
-
className:
|
|
431
|
+
className: Q(
|
|
432
432
|
"flex items-center gap-3 rounded-lg border p-3 transition-colors hover:bg-muted/50",
|
|
433
433
|
p(h) && "border-primary bg-primary/5"
|
|
434
434
|
),
|
|
@@ -819,7 +819,7 @@ function Np({
|
|
|
819
819
|
getAvailableTargetEntities: k,
|
|
820
820
|
addJoinKeyGroup: N,
|
|
821
821
|
updateGroupOperator: g,
|
|
822
|
-
removeJoinKeyGroup:
|
|
822
|
+
removeJoinKeyGroup: F,
|
|
823
823
|
addJoinKey: I,
|
|
824
824
|
updateJoinKey: P,
|
|
825
825
|
removeJoinKey: _,
|
|
@@ -899,7 +899,7 @@ function Np({
|
|
|
899
899
|
{
|
|
900
900
|
className: `inline-flex max-w-[220px] items-center gap-1.5 rounded-[4px] border px-2 py-1 leading-none ${A === 0 ? "border-border bg-muted font-medium text-foreground" : "border-border/60 text-muted-foreground"}`,
|
|
901
901
|
children: [
|
|
902
|
-
/* @__PURE__ */ e(
|
|
902
|
+
/* @__PURE__ */ e(Fa, { className: "h-3 w-3 shrink-0 text-muted-foreground" }),
|
|
903
903
|
/* @__PURE__ */ e("span", { className: "min-w-0 truncate text-[11.5px] leading-none", children: M }),
|
|
904
904
|
A === 0 && /* @__PURE__ */ e("span", { className: "shrink-0 text-[9.5px] uppercase leading-none tracking-[0.06em] text-muted-foreground", children: "BASE" })
|
|
905
905
|
]
|
|
@@ -922,7 +922,7 @@ function Np({
|
|
|
922
922
|
className: "gap-1.5",
|
|
923
923
|
onClick: m,
|
|
924
924
|
children: [
|
|
925
|
-
/* @__PURE__ */ e(
|
|
925
|
+
/* @__PURE__ */ e(Et, { className: "h-3.5 w-3.5" }),
|
|
926
926
|
"Add join"
|
|
927
927
|
]
|
|
928
928
|
}
|
|
@@ -1154,7 +1154,7 @@ function Np({
|
|
|
1154
1154
|
addJoinKey: I,
|
|
1155
1155
|
addJoinKeyGroup: N,
|
|
1156
1156
|
updateGroupOperator: g,
|
|
1157
|
-
removeJoinKeyGroup:
|
|
1157
|
+
removeJoinKeyGroup: F,
|
|
1158
1158
|
updateJoinKey: P,
|
|
1159
1159
|
removeJoinKey: _,
|
|
1160
1160
|
canCollapse: M.joinKeyGroups.length <= 1 && M.joinKeyGroups.every(
|
|
@@ -1190,7 +1190,7 @@ function Np({
|
|
|
1190
1190
|
className: "gap-1.5",
|
|
1191
1191
|
onClick: () => I(M.id, 0),
|
|
1192
1192
|
children: [
|
|
1193
|
-
/* @__PURE__ */ e(
|
|
1193
|
+
/* @__PURE__ */ e(Et, { className: "h-3 w-3" }),
|
|
1194
1194
|
" Add condition"
|
|
1195
1195
|
]
|
|
1196
1196
|
}
|
|
@@ -1415,7 +1415,7 @@ function Sp({
|
|
|
1415
1415
|
className: "gap-1.5",
|
|
1416
1416
|
onClick: () => s(t.id),
|
|
1417
1417
|
children: [
|
|
1418
|
-
/* @__PURE__ */ e(
|
|
1418
|
+
/* @__PURE__ */ e(Et, { className: "h-3 w-3" }),
|
|
1419
1419
|
" Add OR group"
|
|
1420
1420
|
]
|
|
1421
1421
|
}
|
|
@@ -1498,7 +1498,7 @@ function Sp({
|
|
|
1498
1498
|
className: "gap-1.5",
|
|
1499
1499
|
onClick: () => r(t.id, m),
|
|
1500
1500
|
children: [
|
|
1501
|
-
/* @__PURE__ */ e(
|
|
1501
|
+
/* @__PURE__ */ e(Et, { className: "h-3 w-3" }),
|
|
1502
1502
|
" Add condition"
|
|
1503
1503
|
]
|
|
1504
1504
|
}
|
|
@@ -1509,7 +1509,7 @@ function Sp({
|
|
|
1509
1509
|
))
|
|
1510
1510
|
] });
|
|
1511
1511
|
}
|
|
1512
|
-
function
|
|
1512
|
+
function Fo({
|
|
1513
1513
|
children: t,
|
|
1514
1514
|
open: a,
|
|
1515
1515
|
onOpenChange: r,
|
|
@@ -1637,7 +1637,7 @@ function Tp({
|
|
|
1637
1637
|
variant: r = "button"
|
|
1638
1638
|
} = {}) {
|
|
1639
1639
|
var k;
|
|
1640
|
-
const s =
|
|
1640
|
+
const s = E((N) => N.card), { autoJoinMetadata: l } = nt(s), c = E(
|
|
1641
1641
|
(N) => N.actions.updateCardConfig
|
|
1642
1642
|
), d = Dr(s) || {
|
|
1643
1643
|
baseEntity: {
|
|
@@ -1662,7 +1662,7 @@ function Tp({
|
|
|
1662
1662
|
), g = d.baseEntity;
|
|
1663
1663
|
if (!g.name)
|
|
1664
1664
|
return "SELECT * FROM table -- Please select a base entity";
|
|
1665
|
-
let
|
|
1665
|
+
let F = `SELECT *
|
|
1666
1666
|
FROM ${g.name}`;
|
|
1667
1667
|
return N.forEach((I) => {
|
|
1668
1668
|
const P = p.find(
|
|
@@ -1680,10 +1680,10 @@ FROM ${g.name}`;
|
|
|
1680
1680
|
);
|
|
1681
1681
|
return R.length > 1 ? `(${R.join(` ${y.operator} `)})` : R[0];
|
|
1682
1682
|
}).filter(Boolean), w = _.length > 1 ? _.join(" OR ") : _[0] || "condition_here";
|
|
1683
|
-
|
|
1683
|
+
F += `
|
|
1684
1684
|
${I.joinType} JOIN ${P.name}
|
|
1685
1685
|
ON ${w}`;
|
|
1686
|
-
}),
|
|
1686
|
+
}), F;
|
|
1687
1687
|
};
|
|
1688
1688
|
if (p.length < 2)
|
|
1689
1689
|
return null;
|
|
@@ -1736,7 +1736,7 @@ ${I.joinType} JOIN ${P.name}
|
|
|
1736
1736
|
v
|
|
1737
1737
|
] }) }),
|
|
1738
1738
|
/* @__PURE__ */ e(
|
|
1739
|
-
|
|
1739
|
+
Fo,
|
|
1740
1740
|
{
|
|
1741
1741
|
open: u,
|
|
1742
1742
|
onOpenChange: m,
|
|
@@ -1752,7 +1752,7 @@ ${I.joinType} JOIN ${P.name}
|
|
|
1752
1752
|
}
|
|
1753
1753
|
function Mp() {
|
|
1754
1754
|
var Y, T, D, M;
|
|
1755
|
-
const [t, a] = U(!1), [r, s] = U(!1), [l, c] = U(!1), d =
|
|
1755
|
+
const [t, a] = U(!1), [r, s] = U(!1), [l, c] = U(!1), d = E((A) => A.card.dataSource), o = E((A) => A.card), i = E((A) => A.isDevMode), { updateCardConfig: f, updateDataSource: u } = ve(), { autoJoinMetadata: m } = nt(o), { semanticDomains: p } = hh(), h = se(
|
|
1756
1756
|
() => new Map(
|
|
1757
1757
|
p.map((A) => [
|
|
1758
1758
|
A.id,
|
|
@@ -1776,7 +1776,7 @@ function Mp() {
|
|
|
1776
1776
|
dataSourceEntities: x
|
|
1777
1777
|
}),
|
|
1778
1778
|
[k, N, x]
|
|
1779
|
-
),
|
|
1779
|
+
), F = v === 0 ? "Choose dataset" : v === 1 ? Dp(x[0], h) : `${v} datasets`, I = Dr(o), P = ((Y = I == null ? void 0 : I.joins) == null ? void 0 : Y.length) ?? 0, _ = Os(
|
|
1780
1780
|
I,
|
|
1781
1781
|
x
|
|
1782
1782
|
), w = _.length > 0, y = !i && (v > 1 || P > 0), R = !!(m != null && m.autoResolved);
|
|
@@ -1812,13 +1812,13 @@ function Mp() {
|
|
|
1812
1812
|
className: "flex h-7 w-full items-center gap-2 rounded-control border border-input bg-background px-2 text-left transition-colors hover:bg-muted focus:outline-none focus-visible:border-ring",
|
|
1813
1813
|
children: [
|
|
1814
1814
|
/* @__PURE__ */ e(
|
|
1815
|
-
|
|
1815
|
+
Fa,
|
|
1816
1816
|
{
|
|
1817
1817
|
className: "h-3 w-3 shrink-0 text-muted-foreground",
|
|
1818
1818
|
strokeWidth: 1.75
|
|
1819
1819
|
}
|
|
1820
1820
|
),
|
|
1821
|
-
/* @__PURE__ */ e("span", { className: "min-w-0 flex-1 truncate text-[13px] text-foreground", children:
|
|
1821
|
+
/* @__PURE__ */ e("span", { className: "min-w-0 flex-1 truncate text-[13px] text-foreground", children: F }),
|
|
1822
1822
|
V && /* @__PURE__ */ n("span", { className: "shrink-0 text-[11px] text-muted-foreground", children: [
|
|
1823
1823
|
"· ",
|
|
1824
1824
|
V
|
|
@@ -1826,7 +1826,7 @@ function Mp() {
|
|
|
1826
1826
|
/* @__PURE__ */ e(
|
|
1827
1827
|
Vt,
|
|
1828
1828
|
{
|
|
1829
|
-
className:
|
|
1829
|
+
className: Q(
|
|
1830
1830
|
"h-3 w-3 shrink-0 text-muted-foreground transition-transform",
|
|
1831
1831
|
t && "rotate-180"
|
|
1832
1832
|
)
|
|
@@ -1855,7 +1855,7 @@ function Mp() {
|
|
|
1855
1855
|
className: "flex items-start gap-2 px-3 py-1.5 hover:bg-muted/50",
|
|
1856
1856
|
children: [
|
|
1857
1857
|
/* @__PURE__ */ e(
|
|
1858
|
-
|
|
1858
|
+
Fa,
|
|
1859
1859
|
{
|
|
1860
1860
|
className: "mt-[3px] h-3 w-3 shrink-0 text-muted-foreground",
|
|
1861
1861
|
strokeWidth: 1.75
|
|
@@ -1863,7 +1863,7 @@ function Mp() {
|
|
|
1863
1863
|
),
|
|
1864
1864
|
/* @__PURE__ */ n("div", { className: "min-w-0 flex-1", children: [
|
|
1865
1865
|
/* @__PURE__ */ e("p", { className: "truncate text-[13px] text-foreground", children: Vr(A) }),
|
|
1866
|
-
/* @__PURE__ */ e("p", { className: "truncate text-[11px] text-muted-foreground", children:
|
|
1866
|
+
/* @__PURE__ */ e("p", { className: "truncate text-[11px] text-muted-foreground", children: Ep(A, h) }),
|
|
1867
1867
|
le && q && /* @__PURE__ */ e(
|
|
1868
1868
|
"p",
|
|
1869
1869
|
{
|
|
@@ -1878,7 +1878,7 @@ function Mp() {
|
|
|
1878
1878
|
{
|
|
1879
1879
|
type: "button",
|
|
1880
1880
|
onClick: () => j(A),
|
|
1881
|
-
"aria-label": `Remove ${
|
|
1881
|
+
"aria-label": `Remove ${Fp(A, h)}`,
|
|
1882
1882
|
className: "inline-flex h-5 w-5 shrink-0 items-center justify-center rounded-control text-muted-foreground transition-colors hover:bg-muted hover:text-foreground",
|
|
1883
1883
|
children: /* @__PURE__ */ e(st, { className: "h-3 w-3" })
|
|
1884
1884
|
}
|
|
@@ -1897,7 +1897,7 @@ function Mp() {
|
|
|
1897
1897
|
},
|
|
1898
1898
|
className: "flex w-full items-center gap-1.5 px-3 py-1.5 text-left text-[12px] text-muted-foreground transition-colors hover:bg-muted/50 hover:text-foreground",
|
|
1899
1899
|
children: [
|
|
1900
|
-
/* @__PURE__ */ e(
|
|
1900
|
+
/* @__PURE__ */ e(Et, { className: "h-3 w-3" }),
|
|
1901
1901
|
"Add dataset"
|
|
1902
1902
|
]
|
|
1903
1903
|
}
|
|
@@ -2000,23 +2000,23 @@ function Dp(t, a) {
|
|
|
2000
2000
|
const r = Vr(t), s = Pr(t, a);
|
|
2001
2001
|
return s ? `${r} · ${s}` : r;
|
|
2002
2002
|
}
|
|
2003
|
-
function
|
|
2003
|
+
function Fp(t, a) {
|
|
2004
2004
|
const r = Vr(t), s = Pr(t, a);
|
|
2005
2005
|
return s ? `${r} from ${s}` : r;
|
|
2006
2006
|
}
|
|
2007
|
-
function
|
|
2007
|
+
function Ep(t, a) {
|
|
2008
2008
|
const r = Pr(t, a);
|
|
2009
2009
|
if (r) return r;
|
|
2010
2010
|
const s = [];
|
|
2011
2011
|
return t.connectionType && s.push(String(t.connectionType)), t.database && s.push(t.database), t.schema && s.push(t.schema), s.join(" · ");
|
|
2012
2012
|
}
|
|
2013
|
-
function
|
|
2013
|
+
function Eo({ isVisible: t }) {
|
|
2014
2014
|
gh();
|
|
2015
2015
|
const [a, r] = U(!1);
|
|
2016
2016
|
return /* @__PURE__ */ n(
|
|
2017
2017
|
"div",
|
|
2018
2018
|
{
|
|
2019
|
-
className:
|
|
2019
|
+
className: Q(
|
|
2020
2020
|
"flex shrink-0 flex-col overflow-hidden border-r border-border bg-background transition-all duration-300 ease-in-out",
|
|
2021
2021
|
{
|
|
2022
2022
|
"w-[290px]": t,
|
|
@@ -2045,7 +2045,7 @@ const sr = ({
|
|
|
2045
2045
|
}) => /* @__PURE__ */ e(
|
|
2046
2046
|
Hi,
|
|
2047
2047
|
{
|
|
2048
|
-
className:
|
|
2048
|
+
className: Q(
|
|
2049
2049
|
"flex h-full w-full data-[panel-group-direction=vertical]:flex-col",
|
|
2050
2050
|
t
|
|
2051
2051
|
),
|
|
@@ -2058,7 +2058,7 @@ const sr = ({
|
|
|
2058
2058
|
}) => /* @__PURE__ */ e(
|
|
2059
2059
|
ul,
|
|
2060
2060
|
{
|
|
2061
|
-
className:
|
|
2061
|
+
className: Q(
|
|
2062
2062
|
"relative flex w-px items-center justify-center bg-border after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:-translate-y-1/2 data-[panel-group-direction=vertical]:after:translate-x-0 [&[data-panel-group-direction=vertical]>div]:rotate-90",
|
|
2063
2063
|
a
|
|
2064
2064
|
),
|
|
@@ -2139,12 +2139,12 @@ function Yp({
|
|
|
2139
2139
|
onDismiss: d
|
|
2140
2140
|
}) {
|
|
2141
2141
|
var yt, ot;
|
|
2142
|
-
const { authToken: o, tokenProps: i } = ea(), f =
|
|
2142
|
+
const { authToken: o, tokenProps: i } = ea(), f = E((oe) => oe.card.id), u = E(
|
|
2143
2143
|
(oe) => {
|
|
2144
2144
|
var Se;
|
|
2145
2145
|
return oe.card.connectionId || ((Se = oe.card.dataSource) == null ? void 0 : Se.connectionId) || "";
|
|
2146
2146
|
}
|
|
2147
|
-
), [m, p] = U(""), [h, C] = U("draft"), [S, x] = U(!1), [v, k] = U(!1), [N, g] = U(Sa), [
|
|
2147
|
+
), [m, p] = U(""), [h, C] = U("draft"), [S, x] = U(!1), [v, k] = U(!1), [N, g] = U(Sa), [F, I] = U(f), P = Ke(null), _ = Ke(0), w = Ke(null), y = (yt = i.apiServiceUrl) == null ? void 0 : yt.replace(/\/$/, ""), R = y ? `${y}/v1/sql/draft` : "/v1/sql/draft";
|
|
2148
2148
|
function V() {
|
|
2149
2149
|
var oe;
|
|
2150
2150
|
_.current += 1, (oe = w.current) == null || oe.abort(), w.current = null;
|
|
@@ -2152,7 +2152,7 @@ function Yp({
|
|
|
2152
2152
|
we(() => () => {
|
|
2153
2153
|
var oe;
|
|
2154
2154
|
_.current += 1, (oe = w.current) == null || oe.abort(), w.current = null;
|
|
2155
|
-
}, [f]),
|
|
2155
|
+
}, [f]), F !== f && (I(f), g((oe) => ({ ...Sa, runId: oe.runId })), p(""), x(!1));
|
|
2156
2156
|
const j = N.status === "running";
|
|
2157
2157
|
function L() {
|
|
2158
2158
|
N.status === "running" && (V(), g((oe) => ({
|
|
@@ -2169,9 +2169,9 @@ function Yp({
|
|
|
2169
2169
|
}
|
|
2170
2170
|
async function b(oe, Se, Ie) {
|
|
2171
2171
|
const Me = () => _.current === oe, Re = (fe) => {
|
|
2172
|
-
Me() && g((
|
|
2173
|
-
}, Ge = (fe) => Re((
|
|
2174
|
-
...
|
|
2172
|
+
Me() && g((Ee) => Ee.runId === oe ? fe(Ee) : Ee);
|
|
2173
|
+
}, Ge = (fe) => Re((Ee) => ({
|
|
2174
|
+
...Ee,
|
|
2175
2175
|
status: "failed",
|
|
2176
2176
|
activeStep: "",
|
|
2177
2177
|
errorMessage: fe
|
|
@@ -2199,8 +2199,8 @@ function Yp({
|
|
|
2199
2199
|
Ge(fe.message || Ca);
|
|
2200
2200
|
return;
|
|
2201
2201
|
}
|
|
2202
|
-
const
|
|
2203
|
-
if (!
|
|
2202
|
+
const Ee = ((je = fe.sql) == null ? void 0 : je.trim()) || "";
|
|
2203
|
+
if (!Ee) {
|
|
2204
2204
|
Ge(Ca);
|
|
2205
2205
|
return;
|
|
2206
2206
|
}
|
|
@@ -2208,7 +2208,7 @@ function Yp({
|
|
|
2208
2208
|
...re,
|
|
2209
2209
|
status: "done",
|
|
2210
2210
|
activeStep: "",
|
|
2211
|
-
sql:
|
|
2211
|
+
sql: Ee,
|
|
2212
2212
|
validation: fe.validation
|
|
2213
2213
|
})), fe.validation.status === "invalid" ? wa("inline_validation_failed", {
|
|
2214
2214
|
runId: oe,
|
|
@@ -2993,7 +2993,7 @@ function zp({
|
|
|
2993
2993
|
/* @__PURE__ */ e(
|
|
2994
2994
|
bc,
|
|
2995
2995
|
{
|
|
2996
|
-
className:
|
|
2996
|
+
className: Q(Lu({ variant: "destructive", size: "xs" })),
|
|
2997
2997
|
onClick: r,
|
|
2998
2998
|
children: "Clear"
|
|
2999
2999
|
}
|
|
@@ -3016,7 +3016,7 @@ function Hp(t, a) {
|
|
|
3016
3016
|
};
|
|
3017
3017
|
}
|
|
3018
3018
|
function Up() {
|
|
3019
|
-
const { setTempQueryData: t } = ve(), a = hr(), r =
|
|
3019
|
+
const { setTempQueryData: t } = ve(), a = hr(), r = E((N) => N.tempQueryData), s = E((N) => N.card), l = lt(), c = se(() => l !== s.type ? { ...s, type: l } : s, [s, l]), { queryKey: d } = nt(c), {
|
|
3020
3020
|
setCardSql: o,
|
|
3021
3021
|
setSqlGen: i,
|
|
3022
3022
|
setCardPython: f,
|
|
@@ -3036,7 +3036,7 @@ function Up() {
|
|
|
3036
3036
|
queryKey: d,
|
|
3037
3037
|
queryData: N
|
|
3038
3038
|
}), a.setQueryData(d, null), a.removeQueries({ queryKey: d, exact: !0 }), o(""), i({}), p(), h(void 0), f(""), u(""), m({});
|
|
3039
|
-
const g =
|
|
3039
|
+
const g = E.getState().frame, F = E.getState().card, I = la(g, F), P = ((w = I == null ? void 0 : I.customCardPreferences) == null ? void 0 : w.visualType) === "multiple" || !!((y = I == null ? void 0 : I.customCardPreferences) != null && y.dataInputCardIds) || (((R = I == null ? void 0 : I.customCardPreferences) == null ? void 0 : R.minInputs) || 0) > 1 || (((V = I == null ? void 0 : I.customCardPreferences) == null ? void 0 : V.maxInputs) || 0) > 1, _ = Hp(F, P);
|
|
3040
3040
|
S({
|
|
3041
3041
|
...g,
|
|
3042
3042
|
cards: g.cards.map(
|
|
@@ -3048,8 +3048,8 @@ function Up() {
|
|
|
3048
3048
|
}
|
|
3049
3049
|
const $s = "[&_.code-editor-pre]:!pb-14 [&_.code-editor-textarea]:!pb-14";
|
|
3050
3050
|
function Gp() {
|
|
3051
|
-
var ze, fe,
|
|
3052
|
-
const t = hr(), { tokenProps: a } = ea(), r = ((fe = (ze = a.config) == null ? void 0 : ze.projectFeatures) == null ? void 0 : fe.features.aiWritingHelpers) !== !1, [s, l] = U("sql"), [c, d] = U(!1), [o, i] = U(!1), f = Up(), [u, m] = U(!1), [p, h] = U(null), C =
|
|
3051
|
+
var ze, fe, Ee, je;
|
|
3052
|
+
const t = hr(), { tokenProps: a } = ea(), r = ((fe = (ze = a.config) == null ? void 0 : ze.projectFeatures) == null ? void 0 : fe.features.aiWritingHelpers) !== !1, [s, l] = U("sql"), [c, d] = U(!1), [o, i] = U(!1), f = Up(), [u, m] = U(!1), [p, h] = U(null), C = E((re) => re.frame), S = E((re) => re.card), {
|
|
3053
3053
|
inlineSqlEditorRef: x,
|
|
3054
3054
|
inlinePythonEditorRef: v,
|
|
3055
3055
|
expandedSqlEditorRef: k,
|
|
@@ -3059,26 +3059,26 @@ function Gp() {
|
|
|
3059
3059
|
cardId: S.id,
|
|
3060
3060
|
expandedEditor: p
|
|
3061
3061
|
});
|
|
3062
|
-
|
|
3062
|
+
E(
|
|
3063
3063
|
(re) => re.selectedConnectionId
|
|
3064
|
-
),
|
|
3065
|
-
const
|
|
3064
|
+
), E((re) => re.tempQueryData);
|
|
3065
|
+
const F = E(
|
|
3066
3066
|
(re) => re.selectedDatabaseName
|
|
3067
3067
|
);
|
|
3068
|
-
|
|
3068
|
+
E(
|
|
3069
3069
|
(re) => re.selectedDatamodelId
|
|
3070
3070
|
);
|
|
3071
|
-
const I =
|
|
3071
|
+
const I = E(
|
|
3072
3072
|
(re) => re.selectedSchemaName
|
|
3073
|
-
), P =
|
|
3073
|
+
), P = E((re) => re.selectedTableName), _ = ge(
|
|
3074
3074
|
(re) => re.dashboard ? lo(re.dashboard).length : 0
|
|
3075
|
-
), w =
|
|
3075
|
+
), w = E(
|
|
3076
3076
|
(re) => re.inlineFilterValuesMap[(S == null ? void 0 : S.id) ?? ""]
|
|
3077
3077
|
), y = se(
|
|
3078
3078
|
() => la(C, S),
|
|
3079
3079
|
[C, S]
|
|
3080
3080
|
), { manifest: R } = ta(
|
|
3081
|
-
((
|
|
3081
|
+
((Ee = y == null ? void 0 : y.customCardPreferences) == null ? void 0 : Ee.url) || ""
|
|
3082
3082
|
), V = se(
|
|
3083
3083
|
() => {
|
|
3084
3084
|
var re;
|
|
@@ -3118,8 +3118,8 @@ function Gp() {
|
|
|
3118
3118
|
setCard: z,
|
|
3119
3119
|
updateCardInFrame: G
|
|
3120
3120
|
} = ve();
|
|
3121
|
-
|
|
3122
|
-
const ae =
|
|
3121
|
+
E((re) => re.onSave), E((re) => re.onClose), E((re) => re.actions.setSqlGen);
|
|
3122
|
+
const ae = E((re) => re.runSql), ce = E((re) => re.actions.setRunSql), be = E(
|
|
3123
3123
|
(re) => re.actions.setIsSqlRunning
|
|
3124
3124
|
), {
|
|
3125
3125
|
data: ue,
|
|
@@ -3134,7 +3134,7 @@ function Gp() {
|
|
|
3134
3134
|
errorMessage: vt
|
|
3135
3135
|
} = nt(T), Xe = Ke(Be);
|
|
3136
3136
|
Xe.current = Be;
|
|
3137
|
-
const yt = S.type === "kpi" &&
|
|
3137
|
+
const yt = S.type === "kpi" && Fr(S);
|
|
3138
3138
|
we(() => {
|
|
3139
3139
|
if (ue)
|
|
3140
3140
|
if (ue.rowLimitExceeded && ct.error("Row limit (10,000) exceeded. Refine your query.", {
|
|
@@ -3206,8 +3206,8 @@ function Gp() {
|
|
|
3206
3206
|
children: [
|
|
3207
3207
|
/* @__PURE__ */ n("div", { className: "flex shrink-0 flex-col gap-1.5 px-4 pb-1 pt-3", children: [
|
|
3208
3208
|
/* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
|
|
3209
|
-
/* @__PURE__ */ e("div", { className:
|
|
3210
|
-
|
|
3209
|
+
/* @__PURE__ */ e("div", { className: Q("min-w-0", u && "flex-1"), children: /* @__PURE__ */ e(
|
|
3210
|
+
Qa,
|
|
3211
3211
|
{
|
|
3212
3212
|
value: S.title,
|
|
3213
3213
|
onSave: (re) => z({ ...S, title: re }),
|
|
@@ -3221,7 +3221,7 @@ function Gp() {
|
|
|
3221
3221
|
/* @__PURE__ */ e(Cl, { card: S })
|
|
3222
3222
|
] }),
|
|
3223
3223
|
/* @__PURE__ */ e(
|
|
3224
|
-
|
|
3224
|
+
Qa,
|
|
3225
3225
|
{
|
|
3226
3226
|
value: (S.description || "").trim(),
|
|
3227
3227
|
onSave: (re) => z({ ...S, description: re.trim() }),
|
|
@@ -3312,7 +3312,7 @@ function Gp() {
|
|
|
3312
3312
|
Yp,
|
|
3313
3313
|
{
|
|
3314
3314
|
currentSql: S == null ? void 0 : S.sql,
|
|
3315
|
-
selectedDatabaseName:
|
|
3315
|
+
selectedDatabaseName: F,
|
|
3316
3316
|
selectedSchemaName: I,
|
|
3317
3317
|
selectedTableName: P,
|
|
3318
3318
|
onApplySql: oe,
|
|
@@ -3400,12 +3400,12 @@ function Gp() {
|
|
|
3400
3400
|
)
|
|
3401
3401
|
);
|
|
3402
3402
|
}
|
|
3403
|
-
function
|
|
3403
|
+
function Jp(t) {
|
|
3404
3404
|
const a = ge((h) => h.dashboard), r = ge((h) => h.adHocFilterValues), s = ge((h) => h.selectedSheetId), l = ge(
|
|
3405
3405
|
(h) => h.dashboardInputValues
|
|
3406
3406
|
), c = ge(
|
|
3407
3407
|
(h) => h.actions.getCard(t)
|
|
3408
|
-
), d =
|
|
3408
|
+
), d = E((h) => h.editorContext), o = E((h) => h.card), i = pr(), u = (d == null ? void 0 : d.type) === "documentSection" && d.cardId === t ? d : void 0, m = u ? o : c;
|
|
3409
3409
|
if (Gu({
|
|
3410
3410
|
dashboard: a,
|
|
3411
3411
|
dashboardInputValues: l,
|
|
@@ -3436,7 +3436,7 @@ function Qp(t) {
|
|
|
3436
3436
|
};
|
|
3437
3437
|
}
|
|
3438
3438
|
function Br() {
|
|
3439
|
-
const t =
|
|
3439
|
+
const t = E((s) => s.actions.setCardType), { columns: a, isLoading: r } = fl();
|
|
3440
3440
|
return xt(
|
|
3441
3441
|
(s, l) => {
|
|
3442
3442
|
const c = t(s, { ...l, catalog: a, catalogLoading: r });
|
|
@@ -3449,23 +3449,23 @@ const On = [
|
|
|
3449
3449
|
{ value: "table", label: "Table" },
|
|
3450
3450
|
{ value: "detailTable", label: "Detail" }
|
|
3451
3451
|
];
|
|
3452
|
-
function
|
|
3453
|
-
const a =
|
|
3452
|
+
function Qp({ className: t }) {
|
|
3453
|
+
const a = E((h) => h.card), r = E((h) => h.frame), s = E((h) => h.editorContext), l = lt(), { setCard: c, updateCardInFrame: d } = ve(), o = (s == null ? void 0 : s.type) === "documentSection" && !!s.lockedKind, i = (s == null ? void 0 : s.type) === "documentSection" ? On.filter((h) => h.value === "table") : On, f = On.some(
|
|
3454
3454
|
(h) => h.value === l
|
|
3455
|
-
), u = La(a.config, a.type), m =
|
|
3455
|
+
), u = La(a.config, a.type), m = Ju(a, r.cards);
|
|
3456
3456
|
if (!f || !u || m || o || i.length < 2)
|
|
3457
3457
|
return /* @__PURE__ */ e(
|
|
3458
3458
|
"div",
|
|
3459
3459
|
{
|
|
3460
3460
|
"aria-hidden": "true",
|
|
3461
|
-
className:
|
|
3461
|
+
className: Q("invisible flex items-center gap-5", t),
|
|
3462
3462
|
children: /* @__PURE__ */ e("span", { className: "-mb-px flex h-9 items-center border-b-2 border-transparent text-[12px]", children: "Placeholder" })
|
|
3463
3463
|
}
|
|
3464
3464
|
);
|
|
3465
3465
|
const p = (h) => {
|
|
3466
3466
|
if (h === l || m)
|
|
3467
3467
|
return;
|
|
3468
|
-
const C = h, S = a.config ?? {}, x =
|
|
3468
|
+
const C = h, S = a.config ?? {}, x = Qu(
|
|
3469
3469
|
l,
|
|
3470
3470
|
C,
|
|
3471
3471
|
S
|
|
@@ -3476,7 +3476,7 @@ function Jp({ className: t }) {
|
|
|
3476
3476
|
};
|
|
3477
3477
|
c(v), d(v);
|
|
3478
3478
|
};
|
|
3479
|
-
return /* @__PURE__ */ e("div", { role: "tablist", className:
|
|
3479
|
+
return /* @__PURE__ */ e("div", { role: "tablist", className: Q("flex items-center gap-5", t), children: i.map((h) => {
|
|
3480
3480
|
const C = l === h.value;
|
|
3481
3481
|
return /* @__PURE__ */ e(
|
|
3482
3482
|
"button",
|
|
@@ -3485,7 +3485,7 @@ function Jp({ className: t }) {
|
|
|
3485
3485
|
role: "tab",
|
|
3486
3486
|
"aria-selected": C,
|
|
3487
3487
|
onClick: () => p(h.value),
|
|
3488
|
-
className:
|
|
3488
|
+
className: Q(
|
|
3489
3489
|
"-mb-px flex h-9 items-center border-b-2 text-[12px] transition-colors",
|
|
3490
3490
|
C ? "border-foreground font-medium text-foreground" : "border-transparent text-muted-foreground hover:text-foreground"
|
|
3491
3491
|
),
|
|
@@ -3507,7 +3507,7 @@ function Ro({
|
|
|
3507
3507
|
return /* @__PURE__ */ e(
|
|
3508
3508
|
"div",
|
|
3509
3509
|
{
|
|
3510
|
-
className:
|
|
3510
|
+
className: Q("flex max-h-full min-h-0 flex-1 flex-col pt-3", a),
|
|
3511
3511
|
children: t
|
|
3512
3512
|
}
|
|
3513
3513
|
);
|
|
@@ -3519,7 +3519,7 @@ function Po({
|
|
|
3519
3519
|
return /* @__PURE__ */ e(
|
|
3520
3520
|
"div",
|
|
3521
3521
|
{
|
|
3522
|
-
className:
|
|
3522
|
+
className: Q(
|
|
3523
3523
|
"flex min-h-7 shrink-0 flex-wrap items-center justify-between gap-x-3 gap-y-1 px-3",
|
|
3524
3524
|
a
|
|
3525
3525
|
),
|
|
@@ -3534,7 +3534,7 @@ function Oo({
|
|
|
3534
3534
|
return /* @__PURE__ */ e(
|
|
3535
3535
|
"div",
|
|
3536
3536
|
{
|
|
3537
|
-
className:
|
|
3537
|
+
className: Q(
|
|
3538
3538
|
"ml-auto flex min-w-0 flex-wrap items-center justify-end gap-1.5",
|
|
3539
3539
|
a
|
|
3540
3540
|
),
|
|
@@ -3580,10 +3580,10 @@ function Lo({
|
|
|
3580
3580
|
onClick: a,
|
|
3581
3581
|
variant: "outline",
|
|
3582
3582
|
size: "xs",
|
|
3583
|
-
className:
|
|
3583
|
+
className: Q(en, t && "bg-accent"),
|
|
3584
3584
|
"aria-pressed": t,
|
|
3585
3585
|
children: [
|
|
3586
|
-
/* @__PURE__ */ e(
|
|
3586
|
+
/* @__PURE__ */ e(Ea, {}),
|
|
3587
3587
|
"Inspect payload"
|
|
3588
3588
|
]
|
|
3589
3589
|
}
|
|
@@ -3612,7 +3612,7 @@ function Yo({
|
|
|
3612
3612
|
"section",
|
|
3613
3613
|
{
|
|
3614
3614
|
"aria-label": "Payload",
|
|
3615
|
-
className:
|
|
3615
|
+
className: Q("flex min-h-0 flex-col", r),
|
|
3616
3616
|
children: [
|
|
3617
3617
|
/* @__PURE__ */ n(Po, { className: "items-end border-b border-border/60", children: [
|
|
3618
3618
|
/* @__PURE__ */ e(
|
|
@@ -3729,7 +3729,7 @@ function _o({
|
|
|
3729
3729
|
}
|
|
3730
3730
|
}, C = (v) => {
|
|
3731
3731
|
c == null || c(v), !(v.defaultPrevented || tf(v)) && h();
|
|
3732
|
-
}, S =
|
|
3732
|
+
}, S = Q(
|
|
3733
3733
|
"group/copy-on-click relative block w-full cursor-pointer rounded-control text-left transition-[background-color,box-shadow] duration-150",
|
|
3734
3734
|
"hover:bg-muted/30 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring motion-reduce:transition-none",
|
|
3735
3735
|
l && "cursor-default opacity-60",
|
|
@@ -3788,7 +3788,7 @@ function Vo({
|
|
|
3788
3788
|
{
|
|
3789
3789
|
role: "alert",
|
|
3790
3790
|
"aria-labelledby": o,
|
|
3791
|
-
className:
|
|
3791
|
+
className: Q(
|
|
3792
3792
|
"flex shrink-0 flex-wrap items-center gap-x-2 gap-y-1 rounded-control bg-[hsl(38_92%_50%/0.1)] px-2.5 py-1.5 text-[12px] text-foreground",
|
|
3793
3793
|
d
|
|
3794
3794
|
),
|
|
@@ -3819,7 +3819,7 @@ function Vo({
|
|
|
3819
3819
|
text: r,
|
|
3820
3820
|
"aria-label": "Copy error message",
|
|
3821
3821
|
title: "Copy error message",
|
|
3822
|
-
className:
|
|
3822
|
+
className: Q("mt-1 max-h-60 overflow-auto", l),
|
|
3823
3823
|
children: /* @__PURE__ */ e("span", { className: "block whitespace-pre-wrap break-words text-left font-mono text-[11px] leading-[1.55]", children: r })
|
|
3824
3824
|
}
|
|
3825
3825
|
) : null
|
|
@@ -3844,12 +3844,12 @@ function Bo({
|
|
|
3844
3844
|
labelClassName: i,
|
|
3845
3845
|
bodyClassName: f
|
|
3846
3846
|
}) {
|
|
3847
|
-
return /* @__PURE__ */ n("div", { className:
|
|
3847
|
+
return /* @__PURE__ */ n("div", { className: Q("flex min-h-0 flex-col overflow-hidden", d), children: [
|
|
3848
3848
|
/* @__PURE__ */ n(Po, { className: o, children: [
|
|
3849
3849
|
/* @__PURE__ */ e(
|
|
3850
3850
|
"span",
|
|
3851
3851
|
{
|
|
3852
|
-
className:
|
|
3852
|
+
className: Q("text-[12px] text-muted-foreground", i),
|
|
3853
3853
|
children: a
|
|
3854
3854
|
}
|
|
3855
3855
|
),
|
|
@@ -3861,7 +3861,7 @@ function Bo({
|
|
|
3861
3861
|
/* @__PURE__ */ e(
|
|
3862
3862
|
"div",
|
|
3863
3863
|
{
|
|
3864
|
-
className:
|
|
3864
|
+
className: Q("min-h-[80px] overflow-auto px-1 py-1", f),
|
|
3865
3865
|
children: /* @__PURE__ */ e(
|
|
3866
3866
|
_o,
|
|
3867
3867
|
{
|
|
@@ -3904,7 +3904,7 @@ function Ko({
|
|
|
3904
3904
|
className: m,
|
|
3905
3905
|
embedded: p = !1
|
|
3906
3906
|
}) {
|
|
3907
|
-
const [h, C] = U(!1), S = p ? "px-3" : "px-0", x = !!(o && a), v = !!u, k = v && h, N = d && !k, g = !!(f && i),
|
|
3907
|
+
const [h, C] = U(!1), S = p ? "px-3" : "px-0", x = !!(o && a), v = !!u, k = v && h, N = d && !k, g = !!(f && i), F = x || v ? /* @__PURE__ */ n(he, { children: [
|
|
3908
3908
|
o && a ? /* @__PURE__ */ e(
|
|
3909
3909
|
ne,
|
|
3910
3910
|
{
|
|
@@ -3928,12 +3928,12 @@ function Ko({
|
|
|
3928
3928
|
type: "button",
|
|
3929
3929
|
variant: "ghost",
|
|
3930
3930
|
size: "xs",
|
|
3931
|
-
className:
|
|
3931
|
+
className: Q(en, "text-muted-foreground"),
|
|
3932
3932
|
onClick: i,
|
|
3933
3933
|
children: "Report issue"
|
|
3934
3934
|
}
|
|
3935
3935
|
) : null;
|
|
3936
|
-
return /* @__PURE__ */ n(Ro, { className:
|
|
3936
|
+
return /* @__PURE__ */ n(Ro, { className: Q("w-full", m), children: [
|
|
3937
3937
|
/* @__PURE__ */ e(
|
|
3938
3938
|
Vo,
|
|
3939
3939
|
{
|
|
@@ -3943,8 +3943,8 @@ function Ko({
|
|
|
3943
3943
|
defaultDetailsOpen: l,
|
|
3944
3944
|
detailClassName: c,
|
|
3945
3945
|
className: p ? "mx-3" : void 0,
|
|
3946
|
-
actions:
|
|
3947
|
-
|
|
3946
|
+
actions: F || I ? /* @__PURE__ */ n(he, { children: [
|
|
3947
|
+
F,
|
|
3948
3948
|
I
|
|
3949
3949
|
] }) : void 0
|
|
3950
3950
|
}
|
|
@@ -3957,8 +3957,8 @@ function Ko({
|
|
|
3957
3957
|
ariaLabel: "Failed SQL query",
|
|
3958
3958
|
copyAriaLabel: "Copy failed query",
|
|
3959
3959
|
headerClassName: S,
|
|
3960
|
-
className:
|
|
3961
|
-
bodyClassName:
|
|
3960
|
+
className: Q("mt-1", N && "min-h-7 flex-1"),
|
|
3961
|
+
bodyClassName: Q(
|
|
3962
3962
|
"max-h-80",
|
|
3963
3963
|
N && "min-h-0 max-h-none flex-1"
|
|
3964
3964
|
)
|
|
@@ -3975,7 +3975,7 @@ function Ko({
|
|
|
3975
3975
|
] });
|
|
3976
3976
|
}
|
|
3977
3977
|
function Kr({ className: t, ...a }) {
|
|
3978
|
-
return /* @__PURE__ */ e(Ko, { ...a, className:
|
|
3978
|
+
return /* @__PURE__ */ e(Ko, { ...a, className: Q("!pt-0", t) });
|
|
3979
3979
|
}
|
|
3980
3980
|
function Hs(t) {
|
|
3981
3981
|
const { className: a, ...r } = t;
|
|
@@ -3984,12 +3984,12 @@ function Hs(t) {
|
|
|
3984
3984
|
{
|
|
3985
3985
|
...r,
|
|
3986
3986
|
embedded: !0,
|
|
3987
|
-
className:
|
|
3987
|
+
className: Q("overflow-auto", a)
|
|
3988
3988
|
}
|
|
3989
3989
|
);
|
|
3990
3990
|
}
|
|
3991
3991
|
function jo(t) {
|
|
3992
|
-
const a =
|
|
3992
|
+
const a = E((d) => d.card), r = E((d) => d.isDevMode), { switchEditorMode: s, setRunSql: l } = ve(), c = () => {
|
|
3993
3993
|
const d = t || a.sql || a.python || "";
|
|
3994
3994
|
s("dev", { sqlToLoad: d }), setTimeout(() => {
|
|
3995
3995
|
l(!0);
|
|
@@ -3998,7 +3998,7 @@ function jo(t) {
|
|
|
3998
3998
|
return {
|
|
3999
3999
|
isDevMode: r,
|
|
4000
4000
|
// Handlers - only available when appropriate for the current mode
|
|
4001
|
-
handleOpenInEditor: !r &&
|
|
4001
|
+
handleOpenInEditor: !r && Er(a.type) ? c : void 0
|
|
4002
4002
|
};
|
|
4003
4003
|
}
|
|
4004
4004
|
function rf() {
|
|
@@ -4065,11 +4065,11 @@ function lf({
|
|
|
4065
4065
|
const c = se(() => Yu(t, a), [t, a]);
|
|
4066
4066
|
return (
|
|
4067
4067
|
// `.code-editor` scopes the token colors — see code-editor.css.
|
|
4068
|
-
/* @__PURE__ */ e("div", { className:
|
|
4068
|
+
/* @__PURE__ */ e("div", { className: Q("code-editor", s), children: /* @__PURE__ */ e(
|
|
4069
4069
|
"pre",
|
|
4070
4070
|
{
|
|
4071
4071
|
"aria-label": l,
|
|
4072
|
-
className:
|
|
4072
|
+
className: Q(
|
|
4073
4073
|
// Matches CodeEditor exactly (text-[12px] leading-[1.55]) so code
|
|
4074
4074
|
// reads at one size whether it's in an editor or the assistant.
|
|
4075
4075
|
"w-full min-w-0 max-w-full bg-transparent px-3 py-2.5 font-mono text-[12px] leading-[1.55] [font-variant-numeric:tabular-nums]",
|
|
@@ -4097,7 +4097,7 @@ function jr({
|
|
|
4097
4097
|
onSuccess: s,
|
|
4098
4098
|
showDebugInfo: l = !1
|
|
4099
4099
|
}) {
|
|
4100
|
-
var
|
|
4100
|
+
var F, I, P, _, w, y;
|
|
4101
4101
|
const [c, d] = U(""), [o, i] = U(!1), {
|
|
4102
4102
|
sendFeedback: f,
|
|
4103
4103
|
isLoading: u,
|
|
@@ -4120,7 +4120,7 @@ function jr({
|
|
|
4120
4120
|
}, g = {
|
|
4121
4121
|
category: r.category,
|
|
4122
4122
|
error: {
|
|
4123
|
-
message: (
|
|
4123
|
+
message: (F = r.systemState) == null ? void 0 : F.errorMessage,
|
|
4124
4124
|
sql: (I = r.systemState) == null ? void 0 : I.generatedSql,
|
|
4125
4125
|
errorSql: (P = r.systemState) == null ? void 0 : P.errorSql
|
|
4126
4126
|
},
|
|
@@ -4302,7 +4302,7 @@ function jr({
|
|
|
4302
4302
|
}
|
|
4303
4303
|
var qr = /* @__PURE__ */ ((t) => (t.QUERY_GENERATION = "query-generation", t))(qr || {});
|
|
4304
4304
|
function qo(t, a) {
|
|
4305
|
-
const [r, s] = U(!1), l =
|
|
4305
|
+
const [r, s] = U(!1), l = E((u) => u.card), c = ge(
|
|
4306
4306
|
(u) => lo(u.dashboard)
|
|
4307
4307
|
), { currentUser: d } = sn(), { tokenProps: o } = dr(gr), i = xt(() => {
|
|
4308
4308
|
s(!0);
|
|
@@ -4352,11 +4352,11 @@ function $o({
|
|
|
4352
4352
|
...r
|
|
4353
4353
|
}) {
|
|
4354
4354
|
var oe, Se, Ie, Me, Re, Ge;
|
|
4355
|
-
const s =
|
|
4355
|
+
const s = E((me) => me.card), l = xr(), d = E((me) => me.isDevMode) ? !1 : ((oe = s.customCardPreferences) == null ? void 0 : oe.showCardHeader) ?? !0, o = ((Ie = (Se = s.preferences) == null ? void 0 : Se.displayOptions) == null ? void 0 : Ie.showInlineFilterBar) ?? !0, i = E((me) => me.frame), f = E(
|
|
4356
4356
|
(me) => me.inlineFilterValuesMap[s.id]
|
|
4357
|
-
), u = ge((me) => me.selectedSheetId), m =
|
|
4357
|
+
), u = ge((me) => me.selectedSheetId), m = E((me) => me.actions.setRunSql), p = E(
|
|
4358
4358
|
(me) => me.actions.setCardInlineFilterValue
|
|
4359
|
-
), h =
|
|
4359
|
+
), h = E(
|
|
4360
4360
|
(me) => me.actions.removeCardInlineFilterValue
|
|
4361
4361
|
), C = se(
|
|
4362
4362
|
() => la(i, s),
|
|
@@ -4390,9 +4390,9 @@ function $o({
|
|
|
4390
4390
|
s,
|
|
4391
4391
|
N,
|
|
4392
4392
|
x == null ? void 0 : x.slots
|
|
4393
|
-
) ?? s.type, [C, v, N, s, x == null ? void 0 : x.slots]),
|
|
4394
|
-
() =>
|
|
4395
|
-
[s,
|
|
4393
|
+
) ?? s.type, [C, v, N, s, x == null ? void 0 : x.slots]), F = g ?? s.type, I = se(
|
|
4394
|
+
() => F === s.type ? s : { ...s, type: F },
|
|
4395
|
+
[s, F]
|
|
4396
4396
|
), P = I.type === "table" || I.type === "matrixTable" || I.type === "detailTable", _ = se(() => g !== s.type ? { ...s, type: g } : s, [s, g]), { data: w, isLoading: y, isFetching: R, errorMessage: V, errorSql: j, pagination: L } = nt(_), b = ln(I, w), Y = !!V, { handleOpenInEditor: T } = jo(
|
|
4397
4397
|
j || s.sql || s.python
|
|
4398
4398
|
), {
|
|
@@ -4406,7 +4406,7 @@ function $o({
|
|
|
4406
4406
|
}), Te = Ce.sql, Ve = Ce.python, He = w == null ? void 0 : w.records, pe = se(
|
|
4407
4407
|
() => ({
|
|
4408
4408
|
id: te,
|
|
4409
|
-
type:
|
|
4409
|
+
type: F,
|
|
4410
4410
|
config: de,
|
|
4411
4411
|
interactionConfig: z,
|
|
4412
4412
|
preferences: be,
|
|
@@ -4418,7 +4418,7 @@ function $o({
|
|
|
4418
4418
|
}),
|
|
4419
4419
|
[
|
|
4420
4420
|
te,
|
|
4421
|
-
|
|
4421
|
+
F,
|
|
4422
4422
|
de,
|
|
4423
4423
|
z,
|
|
4424
4424
|
be,
|
|
@@ -4428,7 +4428,7 @@ function $o({
|
|
|
4428
4428
|
Ve
|
|
4429
4429
|
]
|
|
4430
4430
|
), $e = (me, ze) => {
|
|
4431
|
-
var
|
|
4431
|
+
var Ee, je;
|
|
4432
4432
|
const fe = {
|
|
4433
4433
|
...s,
|
|
4434
4434
|
paginationConfig: {
|
|
@@ -4437,12 +4437,12 @@ function $o({
|
|
|
4437
4437
|
pageSize: ze
|
|
4438
4438
|
}
|
|
4439
4439
|
};
|
|
4440
|
-
K(fe), le(fe), s.sql && ((je = (
|
|
4440
|
+
K(fe), le(fe), s.sql && ((je = (Ee = s.preferences) == null ? void 0 : Ee.tablePrefs) != null && je.enableDevModePagination) && m(!0);
|
|
4441
4441
|
}, Be = (me) => {
|
|
4442
|
-
var
|
|
4442
|
+
var Ee, je, re, Pe, ie;
|
|
4443
4443
|
const ze = Dl(
|
|
4444
4444
|
me,
|
|
4445
|
-
(
|
|
4445
|
+
(Ee = s.config) == null ? void 0 : Ee.metricColumns,
|
|
4446
4446
|
(je = s.config) == null ? void 0 : je.groupByColumns,
|
|
4447
4447
|
(re = s.config) == null ? void 0 : re.detailColumns
|
|
4448
4448
|
), fe = {
|
|
@@ -4462,7 +4462,7 @@ function $o({
|
|
|
4462
4462
|
chartTheme: vt,
|
|
4463
4463
|
card: pe,
|
|
4464
4464
|
data: He,
|
|
4465
|
-
cardType:
|
|
4465
|
+
cardType: F,
|
|
4466
4466
|
queryConfig: ue,
|
|
4467
4467
|
// cfg: card.cfg,
|
|
4468
4468
|
customCfg: ce,
|
|
@@ -4485,7 +4485,7 @@ function $o({
|
|
|
4485
4485
|
w == null ? void 0 : w.columns,
|
|
4486
4486
|
w == null ? void 0 : w.columnKeyMap,
|
|
4487
4487
|
(Ge = w == null ? void 0 : w.metadata) == null ? void 0 : Ge.comparisonMetadata,
|
|
4488
|
-
|
|
4488
|
+
F,
|
|
4489
4489
|
Ue
|
|
4490
4490
|
]);
|
|
4491
4491
|
function yt(me) {
|
|
@@ -4505,16 +4505,16 @@ function $o({
|
|
|
4505
4505
|
showFeedbackButton: !0
|
|
4506
4506
|
}
|
|
4507
4507
|
) }) : /* @__PURE__ */ n("div", { className: "flex h-full flex-col items-center justify-center gap-2", children: [
|
|
4508
|
-
/* @__PURE__ */ e(
|
|
4508
|
+
/* @__PURE__ */ e(Fc, { className: "h-8 w-8 text-muted-foreground/40" }),
|
|
4509
4509
|
/* @__PURE__ */ e("p", { className: "text-[12px] text-muted-foreground", children: "No results to display" })
|
|
4510
4510
|
] });
|
|
4511
4511
|
if ((y || R) && (!(w != null && w.records) || w.records.length === 0))
|
|
4512
|
-
return
|
|
4512
|
+
return F === "table" || F === "detailTable" ? /* @__PURE__ */ e("div", { className: "relative mb-2 flex h-full min-h-0 w-full flex-1 grow basis-0", children: /* @__PURE__ */ e(Ec, {}) }) : /* @__PURE__ */ e("div", { className: "z-50 flex h-full items-center justify-center", children: /* @__PURE__ */ e(Lt, { size: "md", color: "muted", "aria-label": "Loading data" }) });
|
|
4513
4513
|
if (!b.id) return null;
|
|
4514
|
-
if (
|
|
4514
|
+
if (F === "custom")
|
|
4515
4515
|
return yt(s);
|
|
4516
4516
|
if (!["table", "matrixTable", "detailTable", "custom"].includes(
|
|
4517
|
-
|
|
4517
|
+
F
|
|
4518
4518
|
) && Xe)
|
|
4519
4519
|
return /* @__PURE__ */ e("div", { className: "relative h-full min-h-0 w-full flex-1 grow basis-0", children: y || R ? /* @__PURE__ */ e(he, {}) : /* @__PURE__ */ e(
|
|
4520
4520
|
Ic,
|
|
@@ -4522,7 +4522,7 @@ function $o({
|
|
|
4522
4522
|
cfg: Xe
|
|
4523
4523
|
}
|
|
4524
4524
|
) });
|
|
4525
|
-
if (
|
|
4525
|
+
if (F === "table" || F === "detailTable")
|
|
4526
4526
|
return /* @__PURE__ */ e("div", { className: "relative mb-2 flex h-full min-h-0 w-full flex-1 grow basis-0", children: /* @__PURE__ */ e(
|
|
4527
4527
|
vr,
|
|
4528
4528
|
{
|
|
@@ -4544,7 +4544,7 @@ function $o({
|
|
|
4544
4544
|
Cc,
|
|
4545
4545
|
{
|
|
4546
4546
|
role: "editor-visual-card",
|
|
4547
|
-
className:
|
|
4547
|
+
className: Q(
|
|
4548
4548
|
"relative flex h-full flex-col rounded-none bg-card text-card-foreground",
|
|
4549
4549
|
t
|
|
4550
4550
|
),
|
|
@@ -4554,18 +4554,18 @@ function $o({
|
|
|
4554
4554
|
},
|
|
4555
4555
|
...r,
|
|
4556
4556
|
children: [
|
|
4557
|
-
(y || R) && !wc({ type:
|
|
4557
|
+
(y || R) && !wc({ type: F }) && (w == null ? void 0 : w.records) && w.records.length > 0 && /* @__PURE__ */ e("div", { className: "absolute inset-0 z-50 flex items-center justify-center bg-background/50", children: /* @__PURE__ */ e(Lt, { size: "md", color: "muted", "aria-label": "Loading data" }) }),
|
|
4558
4558
|
d && /* @__PURE__ */ e(
|
|
4559
4559
|
Sc,
|
|
4560
4560
|
{
|
|
4561
|
-
className:
|
|
4561
|
+
className: Q(
|
|
4562
4562
|
"flex flex-row items-start justify-between gap-4 px-4 pb-3 pt-3"
|
|
4563
4563
|
),
|
|
4564
4564
|
style: l.cardGutterStyle,
|
|
4565
4565
|
children: /* @__PURE__ */ n("div", { className: "min-w-0 flex-1 space-y-1", children: [
|
|
4566
4566
|
/* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
|
|
4567
4567
|
/* @__PURE__ */ e(kc, { className: "min-w-0 text-[17px] font-semibold leading-tight tracking-[-0.005em]", children: /* @__PURE__ */ e(
|
|
4568
|
-
|
|
4568
|
+
Qa,
|
|
4569
4569
|
{
|
|
4570
4570
|
value: s.title,
|
|
4571
4571
|
onSave: (me) => K({ ...s, title: me }),
|
|
@@ -4577,10 +4577,10 @@ function $o({
|
|
|
4577
4577
|
) }),
|
|
4578
4578
|
/* @__PURE__ */ e(Cl, { card: s }),
|
|
4579
4579
|
/* @__PURE__ */ e(bo, {}),
|
|
4580
|
-
/* @__PURE__ */ e("div", { className: "ml-auto", children: /* @__PURE__ */ e(
|
|
4580
|
+
/* @__PURE__ */ e("div", { className: "ml-auto", children: /* @__PURE__ */ e(Qp, {}) })
|
|
4581
4581
|
] }),
|
|
4582
4582
|
/* @__PURE__ */ e("div", { className: "min-w-0", children: /* @__PURE__ */ e(
|
|
4583
|
-
|
|
4583
|
+
Qa,
|
|
4584
4584
|
{
|
|
4585
4585
|
value: (s.description || "").trim(),
|
|
4586
4586
|
onSave: (me) => K({ ...s, description: me.trim() }),
|
|
@@ -4613,14 +4613,14 @@ function $o({
|
|
|
4613
4613
|
/* @__PURE__ */ n(
|
|
4614
4614
|
Mc,
|
|
4615
4615
|
{
|
|
4616
|
-
className:
|
|
4616
|
+
className: Q(
|
|
4617
4617
|
"flex min-h-0 grow flex-col",
|
|
4618
4618
|
P ? Y ? "px-4 pb-0 pt-2" : "p-0 [&_.data-table-scroll-container]:border-0 [&_.data-table-scroll-container]:bg-transparent" : Y ? "px-4 py-0" : "px-4"
|
|
4619
4619
|
),
|
|
4620
4620
|
style: P && !Y ? void 0 : l.cardGutterStyle,
|
|
4621
4621
|
children: [
|
|
4622
4622
|
/* @__PURE__ */ e("div", { className: "min-h-0 flex-1 grow basis-0", children: ot() }),
|
|
4623
|
-
Tl(b) && /* @__PURE__ */ e("div", { className:
|
|
4623
|
+
Tl(b) && /* @__PURE__ */ e("div", { className: Q("pt-3", P && "px-4"), children: /* @__PURE__ */ e(
|
|
4624
4624
|
Ml,
|
|
4625
4625
|
{
|
|
4626
4626
|
card: b,
|
|
@@ -4772,7 +4772,7 @@ function pf({
|
|
|
4772
4772
|
className: a,
|
|
4773
4773
|
label: r = "Customize Visual"
|
|
4774
4774
|
} = {}) {
|
|
4775
|
-
const [s, l] = U(!1), [c, d] = U(""), [o, i] = U(""), [f, u] = U(""), [m, p] = U(""), h =
|
|
4775
|
+
const [s, l] = U(!1), [c, d] = U(""), [o, i] = U(""), [f, u] = U(""), [m, p] = U(""), h = E((y) => y.card), C = lt(), S = E((y) => y.card.customCfg), x = S ? JSON.stringify(S, null, 2) : "", v = se(() => C !== h.type ? { ...h, type: C } : h, [h, C]), { data: k } = nt(v), N = Sl(ln(h, k), k == null ? void 0 : k.records), g = br(), { setCardCustomCfg: F, setCustomVisualCode: I } = ve(), P = () => {
|
|
4776
4776
|
var R, V, j;
|
|
4777
4777
|
if (!((R = k == null ? void 0 : k.records) != null && R.length)) return;
|
|
4778
4778
|
const y = kl({
|
|
@@ -4802,7 +4802,7 @@ function pf({
|
|
|
4802
4802
|
JSON.parse(c),
|
|
4803
4803
|
y
|
|
4804
4804
|
);
|
|
4805
|
-
|
|
4805
|
+
F(R), p("");
|
|
4806
4806
|
}
|
|
4807
4807
|
} catch {
|
|
4808
4808
|
p("Invalid JSON configuration");
|
|
@@ -4814,7 +4814,7 @@ function pf({
|
|
|
4814
4814
|
{
|
|
4815
4815
|
variant: "ghost",
|
|
4816
4816
|
onClick: P,
|
|
4817
|
-
className:
|
|
4817
|
+
className: Q(
|
|
4818
4818
|
"h-7 w-full justify-start gap-2 px-2 text-[13px] font-normal",
|
|
4819
4819
|
w ? "" : "text-green-600 hover:text-green-700",
|
|
4820
4820
|
a
|
|
@@ -4829,7 +4829,7 @@ function pf({
|
|
|
4829
4829
|
{
|
|
4830
4830
|
tooltip: "Customize Visual",
|
|
4831
4831
|
onClick: P,
|
|
4832
|
-
className:
|
|
4832
|
+
className: Q(
|
|
4833
4833
|
w ? "" : "text-green-600 hover:text-green-700",
|
|
4834
4834
|
a
|
|
4835
4835
|
),
|
|
@@ -4857,7 +4857,7 @@ function pf({
|
|
|
4857
4857
|
error: m,
|
|
4858
4858
|
hasCardCustomConfig: !!S,
|
|
4859
4859
|
onReset: () => {
|
|
4860
|
-
i(c),
|
|
4860
|
+
i(c), F(null);
|
|
4861
4861
|
},
|
|
4862
4862
|
onApply: _,
|
|
4863
4863
|
onClose: () => l(!1)
|
|
@@ -4883,7 +4883,7 @@ function zo({
|
|
|
4883
4883
|
className: s = "h-6 w-6"
|
|
4884
4884
|
}) {
|
|
4885
4885
|
if (!r && t)
|
|
4886
|
-
return
|
|
4886
|
+
return Fl(t, s);
|
|
4887
4887
|
const l = Pc(a);
|
|
4888
4888
|
if (l)
|
|
4889
4889
|
return dl.cloneElement(l, { className: s });
|
|
@@ -4891,7 +4891,7 @@ function zo({
|
|
|
4891
4891
|
return /* @__PURE__ */ e(
|
|
4892
4892
|
"div",
|
|
4893
4893
|
{
|
|
4894
|
-
className:
|
|
4894
|
+
className: Q(
|
|
4895
4895
|
"flex items-center justify-center rounded text-white font-semibold text-xs",
|
|
4896
4896
|
s
|
|
4897
4897
|
),
|
|
@@ -4918,7 +4918,7 @@ function Gs({
|
|
|
4918
4918
|
onMouseMove: o,
|
|
4919
4919
|
"aria-pressed": l,
|
|
4920
4920
|
title: s ? `${a} · ${s}` : a,
|
|
4921
|
-
className:
|
|
4921
|
+
className: Q(
|
|
4922
4922
|
"flex h-7 w-full min-w-0 items-center gap-2 rounded-[4px] px-2 text-left text-[12px] transition-colors",
|
|
4923
4923
|
c && "bg-muted"
|
|
4924
4924
|
),
|
|
@@ -4929,7 +4929,7 @@ function Gs({
|
|
|
4929
4929
|
chartType: t,
|
|
4930
4930
|
chartName: a,
|
|
4931
4931
|
isCustom: r,
|
|
4932
|
-
className:
|
|
4932
|
+
className: Q(
|
|
4933
4933
|
"h-3.5 w-3.5 shrink-0",
|
|
4934
4934
|
// Custom charts may fall back to colored initials in white text,
|
|
4935
4935
|
// so they get a size only; a text color here would override it.
|
|
@@ -4940,7 +4940,7 @@ function Gs({
|
|
|
4940
4940
|
/* @__PURE__ */ e(
|
|
4941
4941
|
"span",
|
|
4942
4942
|
{
|
|
4943
|
-
className:
|
|
4943
|
+
className: Q(
|
|
4944
4944
|
"truncate",
|
|
4945
4945
|
l ? "font-medium text-foreground" : "text-foreground/80"
|
|
4946
4946
|
),
|
|
@@ -4952,7 +4952,7 @@ function Gs({
|
|
|
4952
4952
|
}
|
|
4953
4953
|
);
|
|
4954
4954
|
}
|
|
4955
|
-
const
|
|
4955
|
+
const Js = [
|
|
4956
4956
|
{ id: "tables", label: "Tables" },
|
|
4957
4957
|
{ id: "other", label: "Single value and text" },
|
|
4958
4958
|
{ id: "comparison", label: "Comparison" },
|
|
@@ -4995,17 +4995,17 @@ function bf({
|
|
|
4995
4995
|
onClose: r
|
|
4996
4996
|
}) {
|
|
4997
4997
|
var Y;
|
|
4998
|
-
const [s, l] = U(""), [c, d] = U(0), o = Ke(null), { data: i = [], isLoading: f } = Oc(), u = Br(), { setCardPreferences: m } =
|
|
4998
|
+
const [s, l] = U(""), [c, d] = U(0), o = Ke(null), { data: i = [], isLoading: f } = Oc(), u = Br(), { setCardPreferences: m } = E((T) => T.actions), p = E((T) => T.card), h = E((T) => T.isDevMode), C = t ?? p.type, S = C === "custom" ? (Y = p.customCardPreferences) == null ? void 0 : Y.componentName : void 0, {
|
|
4999
4999
|
setCardCustomCfg: x,
|
|
5000
5000
|
setQueryConfig: v,
|
|
5001
5001
|
replaceFrameCards: k,
|
|
5002
5002
|
clearModeDrafts: N,
|
|
5003
5003
|
initializeModeDrafts: g
|
|
5004
|
-
} = ve(),
|
|
5004
|
+
} = ve(), F = se(() => {
|
|
5005
5005
|
const T = Ho({ isDevMode: h });
|
|
5006
5006
|
if (!s) return T;
|
|
5007
5007
|
const D = s.toLowerCase(), M = new Set(
|
|
5008
|
-
|
|
5008
|
+
Js.filter((A) => A.label.toLowerCase().includes(D)).map((A) => A.id)
|
|
5009
5009
|
);
|
|
5010
5010
|
return T.filter(
|
|
5011
5011
|
(A) => A.name.toLowerCase().includes(D) || M.has(A.group)
|
|
@@ -5042,10 +5042,10 @@ function bf({
|
|
|
5042
5042
|
}).status === "refused") return;
|
|
5043
5043
|
a == null || a("custom", T), r == null || r();
|
|
5044
5044
|
}, w = se(() => {
|
|
5045
|
-
const T =
|
|
5045
|
+
const T = Js.map((D) => ({
|
|
5046
5046
|
key: D.id,
|
|
5047
5047
|
label: D.label,
|
|
5048
|
-
entries:
|
|
5048
|
+
entries: F.filter((M) => M.group === D.id).map(
|
|
5049
5049
|
(M) => ({
|
|
5050
5050
|
kind: "default",
|
|
5051
5051
|
id: M.id,
|
|
@@ -5063,7 +5063,7 @@ function bf({
|
|
|
5063
5063
|
)
|
|
5064
5064
|
}
|
|
5065
5065
|
];
|
|
5066
|
-
}, [
|
|
5066
|
+
}, [F, I]), y = se(
|
|
5067
5067
|
() => w.flatMap((T) => T.entries),
|
|
5068
5068
|
[w]
|
|
5069
5069
|
), R = Math.min(c, Math.max(y.length - 1, 0)), V = (T) => {
|
|
@@ -5086,7 +5086,7 @@ function bf({
|
|
|
5086
5086
|
let b = 0;
|
|
5087
5087
|
return /* @__PURE__ */ n("div", { className: "flex flex-col", children: [
|
|
5088
5088
|
/* @__PURE__ */ n("div", { className: "flex h-9 items-center gap-2 border-b border-border px-3", children: [
|
|
5089
|
-
/* @__PURE__ */ e(
|
|
5089
|
+
/* @__PURE__ */ e(El, { className: "h-3.5 w-3.5 shrink-0 text-muted-foreground" }),
|
|
5090
5090
|
/* @__PURE__ */ e(
|
|
5091
5091
|
"input",
|
|
5092
5092
|
{
|
|
@@ -5225,7 +5225,7 @@ function or({
|
|
|
5225
5225
|
compactMore: r = !1,
|
|
5226
5226
|
responsiveCompact: s = !1
|
|
5227
5227
|
}) {
|
|
5228
|
-
const [l, c] = U(!1), d =
|
|
5228
|
+
const [l, c] = U(!1), d = E((h) => h.isDevMode), o = E(
|
|
5229
5229
|
(h) => {
|
|
5230
5230
|
var C, S;
|
|
5231
5231
|
return ((S = (C = h.card) == null ? void 0 : C.customCardPreferences) == null ? void 0 : S.componentName) ?? null;
|
|
@@ -5268,7 +5268,7 @@ function or({
|
|
|
5268
5268
|
onClick: () => u(h),
|
|
5269
5269
|
"aria-label": h.label,
|
|
5270
5270
|
"aria-pressed": !!S,
|
|
5271
|
-
className:
|
|
5271
|
+
className: Q(
|
|
5272
5272
|
"flex h-full w-7 items-center justify-center text-foreground/65 transition-colors hover:bg-muted/50 hover:text-foreground",
|
|
5273
5273
|
s && !S && "hidden @[800px]:flex",
|
|
5274
5274
|
S && "bg-foreground/[0.08] font-medium text-foreground"
|
|
@@ -5298,7 +5298,7 @@ function or({
|
|
|
5298
5298
|
{
|
|
5299
5299
|
type: "button",
|
|
5300
5300
|
"aria-label": r ? "More chart types" : p,
|
|
5301
|
-
className:
|
|
5301
|
+
className: Q(
|
|
5302
5302
|
"inline-flex h-full items-center gap-1 border-l border-input transition-colors hover:bg-muted/50",
|
|
5303
5303
|
r ? "w-7 justify-center" : "px-2 text-[12px]",
|
|
5304
5304
|
!r && (m ? "text-muted-foreground" : "text-foreground")
|
|
@@ -5308,7 +5308,7 @@ function or({
|
|
|
5308
5308
|
/* @__PURE__ */ e(
|
|
5309
5309
|
Vt,
|
|
5310
5310
|
{
|
|
5311
|
-
className:
|
|
5311
|
+
className: Q(
|
|
5312
5312
|
"h-3 w-3 shrink-0 text-muted-foreground transition-transform",
|
|
5313
5313
|
l && "rotate-180"
|
|
5314
5314
|
),
|
|
@@ -5340,17 +5340,17 @@ function or({
|
|
|
5340
5340
|
] }) });
|
|
5341
5341
|
}
|
|
5342
5342
|
function Cf() {
|
|
5343
|
-
const t =
|
|
5343
|
+
const t = E(
|
|
5344
5344
|
(i) => {
|
|
5345
5345
|
var f, u;
|
|
5346
5346
|
return (u = (f = i.card.preferences) == null ? void 0 : f.chartOptions) == null ? void 0 : u.indexAxis;
|
|
5347
5347
|
}
|
|
5348
|
-
), a =
|
|
5348
|
+
), a = E((i) => i.card.type), { setChartOrientation: r, setCardPreferences: s } = E(
|
|
5349
5349
|
(i) => i.actions
|
|
5350
5350
|
), l = (i) => {
|
|
5351
5351
|
if (r(i), a !== "bullet")
|
|
5352
5352
|
return;
|
|
5353
|
-
const f = i === "y" ? "horizontal" : "vertical", u =
|
|
5353
|
+
const f = i === "y" ? "horizontal" : "vertical", u = E.getState().card.preferences, m = {
|
|
5354
5354
|
...u || {},
|
|
5355
5355
|
bulletConfig: {
|
|
5356
5356
|
...(u == null ? void 0 : u.bulletConfig) || {},
|
|
@@ -5407,8 +5407,8 @@ function $r({
|
|
|
5407
5407
|
triggerVariant: a = "icon",
|
|
5408
5408
|
label: r = "Display options"
|
|
5409
5409
|
}) {
|
|
5410
|
-
var x, v, k, N, g,
|
|
5411
|
-
const s =
|
|
5410
|
+
var x, v, k, N, g, F, I, P, _, w;
|
|
5411
|
+
const s = E((y) => y.card), { setCardPreferences: l, updateCardInFrame: c, setCard: d } = ve(), [o, i] = U(!1), f = ((v = (x = s.preferences) == null ? void 0 : x.displayOptions) == null ? void 0 : v.showFilterInfo) ?? !0, u = ((N = (k = s.preferences) == null ? void 0 : k.displayOptions) == null ? void 0 : N.showCardToolbar) ?? !0, m = ((F = (g = s.preferences) == null ? void 0 : g.displayOptions) == null ? void 0 : F.showChrome) ?? !0, p = ((P = (I = s.preferences) == null ? void 0 : I.displayOptions) == null ? void 0 : P.allowScroll) ?? !0, h = ((w = (_ = s.preferences) == null ? void 0 : _.displayOptions) == null ? void 0 : w.showInlineFilterBar) ?? !0, C = (y, R) => {
|
|
5412
5412
|
var L;
|
|
5413
5413
|
const V = {
|
|
5414
5414
|
...s.preferences,
|
|
@@ -5452,14 +5452,14 @@ function $r({
|
|
|
5452
5452
|
checked: h
|
|
5453
5453
|
}
|
|
5454
5454
|
];
|
|
5455
|
-
return /* @__PURE__ */ e("div", { className:
|
|
5455
|
+
return /* @__PURE__ */ e("div", { className: Q("flex items-center", t), children: /* @__PURE__ */ n(Nr, { modal: !1, open: o, onOpenChange: i, children: [
|
|
5456
5456
|
/* @__PURE__ */ e(Cr, { asChild: !0, children: a === "menu" ? /* @__PURE__ */ n(
|
|
5457
5457
|
ne,
|
|
5458
5458
|
{
|
|
5459
5459
|
variant: "ghost",
|
|
5460
5460
|
className: "h-auto w-full justify-start gap-2 rounded-sm px-2 py-1.5 text-[13px] font-normal",
|
|
5461
5461
|
children: [
|
|
5462
|
-
/* @__PURE__ */ e(
|
|
5462
|
+
/* @__PURE__ */ e(Ea, { className: "h-3.5 w-3.5 text-muted-foreground" }),
|
|
5463
5463
|
/* @__PURE__ */ e("span", { children: r })
|
|
5464
5464
|
]
|
|
5465
5465
|
}
|
|
@@ -5488,23 +5488,23 @@ function zr({
|
|
|
5488
5488
|
triggerVariant: a = "icon",
|
|
5489
5489
|
label: r = "Inline filters"
|
|
5490
5490
|
}) {
|
|
5491
|
-
const [s, l] = U(!1), c =
|
|
5492
|
-
(
|
|
5491
|
+
const [s, l] = U(!1), c = E((F) => F.card), d = E((F) => F.selectedConnectionId), { tokenProps: o } = ea(), { setCard: i } = ve(), f = ge(
|
|
5492
|
+
(F) => F.actions.removeCardInlineFilterValue
|
|
5493
5493
|
), u = ge(
|
|
5494
|
-
(
|
|
5495
|
-
), m =
|
|
5496
|
-
(
|
|
5497
|
-
), p =
|
|
5498
|
-
(
|
|
5499
|
-
), h =
|
|
5500
|
-
function x(
|
|
5494
|
+
(F) => F.actions.setCardInlineFilterValue
|
|
5495
|
+
), m = E(
|
|
5496
|
+
(F) => F.actions.removeCardInlineFilterValue
|
|
5497
|
+
), p = E(
|
|
5498
|
+
(F) => F.actions.setCardInlineFilterValue
|
|
5499
|
+
), h = Jc(), C = (c == null ? void 0 : c.inlineFilters) || [], S = pr() ?? void 0;
|
|
5500
|
+
function x(F) {
|
|
5501
5501
|
if (C.find(
|
|
5502
|
-
(_) => tm(_,
|
|
5502
|
+
(_) => tm(_, F)
|
|
5503
5503
|
))
|
|
5504
5504
|
return;
|
|
5505
5505
|
const P = {
|
|
5506
5506
|
id: jt(),
|
|
5507
|
-
...bh(
|
|
5507
|
+
...bh(F, {
|
|
5508
5508
|
dataSource: c == null ? void 0 : c.dataSource,
|
|
5509
5509
|
connectionId: d
|
|
5510
5510
|
}),
|
|
@@ -5516,29 +5516,29 @@ function zr({
|
|
|
5516
5516
|
inlineFilters: [...C, P]
|
|
5517
5517
|
});
|
|
5518
5518
|
}
|
|
5519
|
-
function v(
|
|
5520
|
-
const I = C.filter((P) => P.id !==
|
|
5519
|
+
function v(F) {
|
|
5520
|
+
const I = C.filter((P) => P.id !== F);
|
|
5521
5521
|
i({
|
|
5522
5522
|
...c,
|
|
5523
5523
|
inlineFilters: I
|
|
5524
|
-
}), h ? m(c.id,
|
|
5524
|
+
}), h ? m(c.id, F) : f(c.id, F);
|
|
5525
5525
|
}
|
|
5526
|
-
function k(
|
|
5527
|
-
const P = C.find((R) => R.id ===
|
|
5528
|
-
(R) => R.id ===
|
|
5526
|
+
function k(F, I) {
|
|
5527
|
+
const P = C.find((R) => R.id === F), _ = C.map(
|
|
5528
|
+
(R) => R.id === F ? { ...R, ...I } : R
|
|
5529
5529
|
);
|
|
5530
5530
|
i({
|
|
5531
5531
|
...c,
|
|
5532
5532
|
inlineFilters: _
|
|
5533
5533
|
});
|
|
5534
|
-
const w = _.find((R) => R.id ===
|
|
5534
|
+
const w = _.find((R) => R.id === F);
|
|
5535
5535
|
if (!w || !am(P, w))
|
|
5536
5536
|
return;
|
|
5537
5537
|
const y = nm(
|
|
5538
5538
|
w,
|
|
5539
5539
|
S
|
|
5540
5540
|
);
|
|
5541
|
-
y ? h ? p(c.id, y) : u(c.id, y) : h ? m(c.id,
|
|
5541
|
+
y ? h ? p(c.id, y) : u(c.id, y) : h ? m(c.id, F) : f(c.id, F);
|
|
5542
5542
|
}
|
|
5543
5543
|
if (![
|
|
5544
5544
|
"bar",
|
|
@@ -5562,7 +5562,7 @@ function zr({
|
|
|
5562
5562
|
return /* @__PURE__ */ e(
|
|
5563
5563
|
"div",
|
|
5564
5564
|
{
|
|
5565
|
-
className:
|
|
5565
|
+
className: Q(
|
|
5566
5566
|
"flex items-center gap-1",
|
|
5567
5567
|
g && "w-full",
|
|
5568
5568
|
t
|
|
@@ -5583,7 +5583,7 @@ function zr({
|
|
|
5583
5583
|
rt,
|
|
5584
5584
|
{
|
|
5585
5585
|
tooltip: "Add Inline Filter",
|
|
5586
|
-
className:
|
|
5586
|
+
className: Q("relative h-7 w-7 px-0", {
|
|
5587
5587
|
"text-primary": C.length > 0
|
|
5588
5588
|
}),
|
|
5589
5589
|
children: [
|
|
@@ -5596,13 +5596,13 @@ function zr({
|
|
|
5596
5596
|
At,
|
|
5597
5597
|
{
|
|
5598
5598
|
align: "end",
|
|
5599
|
-
className:
|
|
5599
|
+
className: Q("w-80 p-0", g && "z-[60]"),
|
|
5600
5600
|
children: /* @__PURE__ */ n("div", { className: "flex flex-col", children: [
|
|
5601
5601
|
/* @__PURE__ */ n("div", { className: "border-b px-4 py-3", children: [
|
|
5602
5602
|
/* @__PURE__ */ e("h4", { className: "text-sm font-medium", children: "Inline Filters" }),
|
|
5603
5603
|
/* @__PURE__ */ e("p", { className: "text-xs text-muted-foreground", children: "On-card filters for fast, focused exploration." })
|
|
5604
5604
|
] }),
|
|
5605
|
-
/* @__PURE__ */ e("div", { className: "flex h-[320px] min-h-0 flex-col overflow-hidden", children: /* @__PURE__ */ e(Pl, { collisionDetection:
|
|
5605
|
+
/* @__PURE__ */ e("div", { className: "flex h-[320px] min-h-0 flex-col overflow-hidden", children: /* @__PURE__ */ e(Pl, { collisionDetection: Qc, children: /* @__PURE__ */ e(
|
|
5606
5606
|
Wc,
|
|
5607
5607
|
{
|
|
5608
5608
|
items: [],
|
|
@@ -5619,14 +5619,14 @@ function zr({
|
|
|
5619
5619
|
) }) }),
|
|
5620
5620
|
C.length > 0 && /* @__PURE__ */ n("div", { className: "border-t px-4 py-3", children: [
|
|
5621
5621
|
/* @__PURE__ */ e("p", { className: "mb-2 text-xs font-medium text-muted-foreground", children: "Active Filters" }),
|
|
5622
|
-
/* @__PURE__ */ e("div", { className: "space-y-1", children: C.map((
|
|
5622
|
+
/* @__PURE__ */ e("div", { className: "space-y-1", children: C.map((F) => /* @__PURE__ */ e(
|
|
5623
5623
|
wf,
|
|
5624
5624
|
{
|
|
5625
|
-
filter:
|
|
5626
|
-
onUpdate: (I) => k(
|
|
5627
|
-
onRemove: () => v(
|
|
5625
|
+
filter: F,
|
|
5626
|
+
onUpdate: (I) => k(F.id, I),
|
|
5627
|
+
onRemove: () => v(F.id)
|
|
5628
5628
|
},
|
|
5629
|
-
|
|
5629
|
+
F.id
|
|
5630
5630
|
)) })
|
|
5631
5631
|
] })
|
|
5632
5632
|
] })
|
|
@@ -5767,13 +5767,13 @@ function Df({
|
|
|
5767
5767
|
(y) => !k.has(tn(w.id, y.value))
|
|
5768
5768
|
)
|
|
5769
5769
|
), g = o ? 0 : r.reduce((w, y) => {
|
|
5770
|
-
const R =
|
|
5770
|
+
const R = F(y.target), V = Object.values(y.mapping).filter((j) => {
|
|
5771
5771
|
const L = y.target === "config_metric_selector" || y.target === "config_field_selector" ? typeof j == "string" ? j : j == null ? void 0 : j.id : typeof j == "string" ? j : void 0;
|
|
5772
5772
|
return typeof L == "string" && !R.some((b) => b.value === L);
|
|
5773
5773
|
}).length;
|
|
5774
5774
|
return w + V;
|
|
5775
5775
|
}, 0);
|
|
5776
|
-
function
|
|
5776
|
+
function F(w) {
|
|
5777
5777
|
var y, R, V, j;
|
|
5778
5778
|
switch (w) {
|
|
5779
5779
|
case "config_metric_selector":
|
|
@@ -5884,7 +5884,7 @@ function Df({
|
|
|
5884
5884
|
r.length === 0 ? /* @__PURE__ */ e("div", { className: "rounded-md border border-dashed p-3 text-sm text-muted-foreground", children: "This card is not using any controls yet." }) : r.map((w, y) => {
|
|
5885
5885
|
const R = v[w.target] || [], V = p.find(
|
|
5886
5886
|
(K) => K.id === w.controlId
|
|
5887
|
-
), j = V ? sm(V) : null, L = (j == null ? void 0 : j.source.kind) === "manual" ? j.source.options : [], b =
|
|
5887
|
+
), j = V ? sm(V) : null, L = (j == null ? void 0 : j.source.kind) === "manual" ? j.source.options : [], b = F(w.target), Y = m(w.target), T = w.matrixTargetId !== void 0 && !Y.some((K) => K.id === w.matrixTargetId), D = Array.from(
|
|
5888
5888
|
/* @__PURE__ */ new Set([
|
|
5889
5889
|
...L.map((K) => K.value),
|
|
5890
5890
|
...Object.keys(w.mapping)
|
|
@@ -6066,12 +6066,12 @@ function Df({
|
|
|
6066
6066
|
);
|
|
6067
6067
|
}),
|
|
6068
6068
|
N ? /* @__PURE__ */ n(ne, { type: "button", variant: "outline", size: "sm", onClick: _, children: [
|
|
6069
|
-
/* @__PURE__ */ e(
|
|
6069
|
+
/* @__PURE__ */ e(Et, { className: "mr-2 h-4 w-4" }),
|
|
6070
6070
|
"Add another control response"
|
|
6071
6071
|
] }) : null
|
|
6072
6072
|
] });
|
|
6073
6073
|
}
|
|
6074
|
-
function
|
|
6074
|
+
function Ff(t, a, r) {
|
|
6075
6075
|
const { eligibleTargets: s } = wo(
|
|
6076
6076
|
t,
|
|
6077
6077
|
a,
|
|
@@ -6093,7 +6093,7 @@ function Ef(t, a, r) {
|
|
|
6093
6093
|
};
|
|
6094
6094
|
});
|
|
6095
6095
|
}
|
|
6096
|
-
function
|
|
6096
|
+
function Ef(t) {
|
|
6097
6097
|
return t ? t.kind === "metric" ? t.metricId : t.kind === "column" ? t.columnKey : t.measureId : "invalid target";
|
|
6098
6098
|
}
|
|
6099
6099
|
function If({
|
|
@@ -6105,7 +6105,7 @@ function If({
|
|
|
6105
6105
|
onChange: c
|
|
6106
6106
|
}) {
|
|
6107
6107
|
const d = [...r, ...a.controls || []], o = d.filter(Lh), i = se(
|
|
6108
|
-
() =>
|
|
6108
|
+
() => Ff(a, s, t),
|
|
6109
6109
|
[a, s, t]
|
|
6110
6110
|
), f = se(
|
|
6111
6111
|
() => wo(a, s, t),
|
|
@@ -6119,7 +6119,7 @@ function If({
|
|
|
6119
6119
|
), N = (g) => {
|
|
6120
6120
|
if (!m)
|
|
6121
6121
|
return;
|
|
6122
|
-
const
|
|
6122
|
+
const F = Dh({
|
|
6123
6123
|
card: a,
|
|
6124
6124
|
target: g,
|
|
6125
6125
|
resultColumnKeys: s,
|
|
@@ -6127,15 +6127,15 @@ function If({
|
|
|
6127
6127
|
boundCurrency: p(g),
|
|
6128
6128
|
matrixCatalog: t
|
|
6129
6129
|
});
|
|
6130
|
-
if (
|
|
6131
|
-
return wh(1e3,
|
|
6130
|
+
if (F)
|
|
6131
|
+
return wh(1e3, F);
|
|
6132
6132
|
};
|
|
6133
6133
|
return o.length === 0 && l.length === 0 ? /* @__PURE__ */ e("p", { className: "text-xs text-muted-foreground", children: "Add a manual enum whose options are ISO currency codes to enable presentation currency bindings." }) : /* @__PURE__ */ n("div", { className: "space-y-3", children: [
|
|
6134
6134
|
/* @__PURE__ */ n("div", { className: "space-y-1", children: [
|
|
6135
6135
|
/* @__PURE__ */ e("h5", { className: "text-xs font-medium", children: "Currency presentation" }),
|
|
6136
6136
|
/* @__PURE__ */ e("p", { className: "text-xs text-muted-foreground", children: "Change only the display currency for an explicit metric or column." })
|
|
6137
6137
|
] }),
|
|
6138
|
-
l.map((g,
|
|
6138
|
+
l.map((g, F) => /* @__PURE__ */ n(
|
|
6139
6139
|
"div",
|
|
6140
6140
|
{
|
|
6141
6141
|
className: "flex items-center gap-2 rounded-control border border-border/60 px-2 py-1.5 text-xs",
|
|
@@ -6144,7 +6144,7 @@ function If({
|
|
|
6144
6144
|
g.controlId,
|
|
6145
6145
|
" →",
|
|
6146
6146
|
" ",
|
|
6147
|
-
|
|
6147
|
+
Ef(g.presentationTarget),
|
|
6148
6148
|
g.presentationTarget ? ` · ${N(g.presentationTarget) ?? "unavailable"}` : null
|
|
6149
6149
|
] }),
|
|
6150
6150
|
/* @__PURE__ */ e(
|
|
@@ -6152,7 +6152,7 @@ function If({
|
|
|
6152
6152
|
{
|
|
6153
6153
|
variant: "ghost",
|
|
6154
6154
|
size: "xs",
|
|
6155
|
-
onClick: () => c(l.filter((I, P) => P !==
|
|
6155
|
+
onClick: () => c(l.filter((I, P) => P !== F)),
|
|
6156
6156
|
children: /* @__PURE__ */ e(rn, { className: "h-3.5 w-3.5" })
|
|
6157
6157
|
}
|
|
6158
6158
|
)
|
|
@@ -6160,10 +6160,10 @@ function If({
|
|
|
6160
6160
|
},
|
|
6161
6161
|
`${g.controlId}:${JSON.stringify(g.presentationTarget)}`
|
|
6162
6162
|
)),
|
|
6163
|
-
u.length > 0 ? /* @__PURE__ */ e("div", { className: "space-y-1 text-xs text-destructive", children: u.map((g,
|
|
6163
|
+
u.length > 0 ? /* @__PURE__ */ e("div", { className: "space-y-1 text-xs text-destructive", children: u.map((g, F) => /* @__PURE__ */ n("p", { children: [
|
|
6164
6164
|
g.controlId ? `${g.controlId}: ` : "",
|
|
6165
6165
|
g.code.split("_").join(" ")
|
|
6166
|
-
] }, `${g.controlId || "binding"}:${g.code}:${
|
|
6166
|
+
] }, `${g.controlId || "binding"}:${g.code}:${F}`)) }) : null,
|
|
6167
6167
|
/* @__PURE__ */ n("div", { className: "grid grid-cols-[1fr_1fr_auto] gap-2", children: [
|
|
6168
6168
|
/* @__PURE__ */ n(W, { value: h, onValueChange: C, children: [
|
|
6169
6169
|
/* @__PURE__ */ e(X, { size: "xs", children: /* @__PURE__ */ e(Z, { placeholder: "Currency control" }) }),
|
|
@@ -6189,7 +6189,7 @@ function If({
|
|
|
6189
6189
|
}
|
|
6190
6190
|
]), x(""));
|
|
6191
6191
|
},
|
|
6192
|
-
children: /* @__PURE__ */ e(
|
|
6192
|
+
children: /* @__PURE__ */ e(Et, { className: "h-3.5 w-3.5" })
|
|
6193
6193
|
}
|
|
6194
6194
|
)
|
|
6195
6195
|
] })
|
|
@@ -6207,7 +6207,7 @@ function Hr({
|
|
|
6207
6207
|
preventPassiveDismissDuringCreate: l,
|
|
6208
6208
|
resolvedOpen: c,
|
|
6209
6209
|
setIsCreateFlowActive: d
|
|
6210
|
-
} = vh({}), o =
|
|
6210
|
+
} = vh({}), o = E((q) => q.card), i = E((q) => q.frame), f = E(
|
|
6211
6211
|
(q) => q.queryResultColumns
|
|
6212
6212
|
), u = ge((q) => q.dashboard), p = ge(
|
|
6213
6213
|
(q) => q.dashboard.controls
|
|
@@ -6220,7 +6220,7 @@ function Hr({
|
|
|
6220
6220
|
const v = se(() => S ? (i == null ? void 0 : i.cards.find((q) => q.id === S)) || ((o == null ? void 0 : o.id) === S ? o : void 0) : o, [o, i == null ? void 0 : i.cards, S]), k = (v == null ? void 0 : v.type) === "matrixTable" ? (M = v.config) == null ? void 0 : M.matrix : void 0, N = se(
|
|
6221
6221
|
() => c && k ? Bh(k.spec, v == null ? void 0 : v.controlBindings) : [],
|
|
6222
6222
|
[c, k, v == null ? void 0 : v.controlBindings]
|
|
6223
|
-
), g = ad(N),
|
|
6223
|
+
), g = ad(N), F = se(() => g.catalog.map((q) => ({
|
|
6224
6224
|
...q.field,
|
|
6225
6225
|
dataType: hl(q.resolvedField.dataType)
|
|
6226
6226
|
})), [g.catalog]), I = (v == null ? void 0 : v.controls) || [], P = v ? om(u, { excludeCardId: v.id }) : p.map((q) => q.id), _ = ((v == null ? void 0 : v.controlBindings) || []).filter(
|
|
@@ -6303,7 +6303,7 @@ function Hr({
|
|
|
6303
6303
|
return /* @__PURE__ */ e(
|
|
6304
6304
|
"div",
|
|
6305
6305
|
{
|
|
6306
|
-
className:
|
|
6306
|
+
className: Q(
|
|
6307
6307
|
"flex items-center gap-1",
|
|
6308
6308
|
D && "w-full",
|
|
6309
6309
|
t
|
|
@@ -6324,7 +6324,7 @@ function Hr({
|
|
|
6324
6324
|
rt,
|
|
6325
6325
|
{
|
|
6326
6326
|
tooltip: "Configure Controls",
|
|
6327
|
-
className:
|
|
6327
|
+
className: Q("relative h-7 w-7 px-0", {
|
|
6328
6328
|
"text-primary": I.length > 0 || _.length > 0
|
|
6329
6329
|
}),
|
|
6330
6330
|
children: [
|
|
@@ -6336,7 +6336,7 @@ function Hr({
|
|
|
6336
6336
|
/* @__PURE__ */ n(
|
|
6337
6337
|
At,
|
|
6338
6338
|
{
|
|
6339
|
-
className:
|
|
6339
|
+
className: Q(
|
|
6340
6340
|
"flex max-h-[85vh] w-[560px] max-w-[95vw] flex-col",
|
|
6341
6341
|
D && "z-[60]"
|
|
6342
6342
|
),
|
|
@@ -6381,7 +6381,7 @@ function Hr({
|
|
|
6381
6381
|
availableMetricChoices: k ? void 0 : L,
|
|
6382
6382
|
matrixSpec: k == null ? void 0 : k.spec,
|
|
6383
6383
|
matrixPresentation: k == null ? void 0 : k.presentation,
|
|
6384
|
-
matrixFieldCatalog:
|
|
6384
|
+
matrixFieldCatalog: F,
|
|
6385
6385
|
suppressTransientStaleState: !!(k && g.pending)
|
|
6386
6386
|
}
|
|
6387
6387
|
),
|
|
@@ -6412,7 +6412,7 @@ function Uo({
|
|
|
6412
6412
|
showControls: s = !0,
|
|
6413
6413
|
showDisplayOptions: l = !0
|
|
6414
6414
|
} = {}) {
|
|
6415
|
-
const c =
|
|
6415
|
+
const c = E((h) => h.card), d = E(
|
|
6416
6416
|
(h) => {
|
|
6417
6417
|
var C, S;
|
|
6418
6418
|
return (S = (C = h.card) == null ? void 0 : C.preferences) == null ? void 0 : S.chartOptions;
|
|
@@ -6506,7 +6506,7 @@ function Pf({
|
|
|
6506
6506
|
configCard: r
|
|
6507
6507
|
}) {
|
|
6508
6508
|
var b, Y, T, D, M;
|
|
6509
|
-
const s =
|
|
6509
|
+
const s = E((A) => A.frame), l = E((A) => A.card), c = E((A) => A.editorContext), d = (c == null ? void 0 : c.type) === "documentSection", {
|
|
6510
6510
|
setFrame: o,
|
|
6511
6511
|
setActiveTabCardId: i,
|
|
6512
6512
|
setCard: f,
|
|
@@ -6526,7 +6526,7 @@ function Pf({
|
|
|
6526
6526
|
isMultiInputVisual: S
|
|
6527
6527
|
}),
|
|
6528
6528
|
[s, r, S]
|
|
6529
|
-
), N = S ? k.filter(Boolean).length : s.cards.length, g = d ? !1 : v ? N < v : !0,
|
|
6529
|
+
), N = S ? k.filter(Boolean).length : s.cards.length, g = d ? !1 : v ? N < v : !0, F = N > Math.max(x || 1, 1), I = !!((M = r == null ? void 0 : r.customCardPreferences) != null && M.dataInputCardIds), P = (A, B) => {
|
|
6530
6530
|
A.dataTransfer.setData("tabIndex", B.toString());
|
|
6531
6531
|
}, _ = (A) => {
|
|
6532
6532
|
A.preventDefault();
|
|
@@ -6538,7 +6538,7 @@ function Pf({
|
|
|
6538
6538
|
};
|
|
6539
6539
|
function y(A) {
|
|
6540
6540
|
const B = (r == null ? void 0 : r.id) === A;
|
|
6541
|
-
(I && B ? s.cards.length > 1 :
|
|
6541
|
+
(I && B ? s.cards.length > 1 : F) && m(A, {
|
|
6542
6542
|
renumber: S && !I ? fm : void 0
|
|
6543
6543
|
});
|
|
6544
6544
|
}
|
|
@@ -6636,7 +6636,7 @@ function Pf({
|
|
|
6636
6636
|
displayTab: q
|
|
6637
6637
|
});
|
|
6638
6638
|
},
|
|
6639
|
-
children: B.displayTab === !0 || B.displayTab === void 0 ? /* @__PURE__ */ e(
|
|
6639
|
+
children: B.displayTab === !0 || B.displayTab === void 0 ? /* @__PURE__ */ e(Ea, { className: "h-3 w-3 text-muted-foreground hover:text-foreground" }) : /* @__PURE__ */ e(Ms, { className: "h-3 w-3 text-muted-foreground hover:text-foreground" })
|
|
6640
6640
|
}
|
|
6641
6641
|
);
|
|
6642
6642
|
}
|
|
@@ -6658,7 +6658,7 @@ function Pf({
|
|
|
6658
6658
|
onDragStart: S || d ? void 0 : (G) => P(G, B),
|
|
6659
6659
|
onDragOver: S || d ? void 0 : _,
|
|
6660
6660
|
onDrop: S || d ? void 0 : (G) => w(G, B),
|
|
6661
|
-
className:
|
|
6661
|
+
className: Q(
|
|
6662
6662
|
"inline-flex h-6 shrink-0 items-center gap-1.5 rounded-[5px] border px-2 text-[12px] font-normal text-muted-foreground transition-colors",
|
|
6663
6663
|
"mb-0 border-transparent pb-0",
|
|
6664
6664
|
"hover:bg-muted/40 hover:text-foreground",
|
|
@@ -6670,7 +6670,7 @@ function Pf({
|
|
|
6670
6670
|
// Multi-input visual: Icon + Slot Label (non-editable, no eye icon)
|
|
6671
6671
|
/* @__PURE__ */ e(bt, { delayDuration: 0, children: /* @__PURE__ */ n(mt, { children: [
|
|
6672
6672
|
/* @__PURE__ */ e(ht, { asChild: !0, children: /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
|
|
6673
|
-
/* @__PURE__ */ e("span", { className: "text-muted-foreground", children:
|
|
6673
|
+
/* @__PURE__ */ e("span", { className: "text-muted-foreground", children: Fl(le, "size-3.5") }),
|
|
6674
6674
|
/* @__PURE__ */ e("span", { children: K.label || `Tab ${q + 1}` })
|
|
6675
6675
|
] }) }),
|
|
6676
6676
|
/* @__PURE__ */ e(
|
|
@@ -6716,7 +6716,7 @@ function Pf({
|
|
|
6716
6716
|
}
|
|
6717
6717
|
}
|
|
6718
6718
|
),
|
|
6719
|
-
!d && s.activeCardId === A.id && (I && (r == null ? void 0 : r.id) === A.id ? s.cards.length > 1 :
|
|
6719
|
+
!d && s.activeCardId === A.id && (I && (r == null ? void 0 : r.id) === A.id ? s.cards.length > 1 : F) && /* @__PURE__ */ e(
|
|
6720
6720
|
st,
|
|
6721
6721
|
{
|
|
6722
6722
|
className: "h-3 w-3 text-muted-foreground hover:text-foreground",
|
|
@@ -6735,7 +6735,7 @@ function Pf({
|
|
|
6735
6735
|
className: "h-6 w-6 rounded-[5px] p-0 text-muted-foreground hover:bg-muted hover:text-foreground",
|
|
6736
6736
|
onClick: () => j(l),
|
|
6737
6737
|
disabled: !g,
|
|
6738
|
-
children: /* @__PURE__ */ e(
|
|
6738
|
+
children: /* @__PURE__ */ e(Et, { className: "h-3 w-3" })
|
|
6739
6739
|
}
|
|
6740
6740
|
),
|
|
6741
6741
|
S && /* @__PURE__ */ n(
|
|
@@ -6747,7 +6747,7 @@ function Pf({
|
|
|
6747
6747
|
className: "ml-1 h-6 gap-1 rounded-[5px] px-2 text-[11px] data-[state=on]:bg-muted data-[state=on]:text-foreground",
|
|
6748
6748
|
"aria-label": "Toggle preview",
|
|
6749
6749
|
children: [
|
|
6750
|
-
t ? /* @__PURE__ */ e(Ms, { className: "h-3 w-3" }) : /* @__PURE__ */ e(
|
|
6750
|
+
t ? /* @__PURE__ */ e(Ms, { className: "h-3 w-3" }) : /* @__PURE__ */ e(Ea, { className: "h-3 w-3" }),
|
|
6751
6751
|
/* @__PURE__ */ e("span", { children: "Preview" })
|
|
6752
6752
|
]
|
|
6753
6753
|
}
|
|
@@ -6760,12 +6760,12 @@ function ir({
|
|
|
6760
6760
|
renderCardOverride: t,
|
|
6761
6761
|
alwaysRenderOverride: a = !1
|
|
6762
6762
|
} = {}) {
|
|
6763
|
-
var Ge, me, ze, fe,
|
|
6764
|
-
const r = Yl(), s =
|
|
6763
|
+
var Ge, me, ze, fe, Ee, je, re, Pe;
|
|
6764
|
+
const r = Yl(), s = E((ie) => ie.frame), l = E((ie) => ie.card), [c, d] = U(!1), o = se(
|
|
6765
6765
|
() => la(s, l),
|
|
6766
6766
|
[s, l]
|
|
6767
|
-
), i =
|
|
6768
|
-
|
|
6767
|
+
), i = E((ie) => ie.isSqlRunning);
|
|
6768
|
+
E((ie) => ie.isDevMode);
|
|
6769
6769
|
const { switchCardTab: f, resetAllColumnSettings: u } = ve(), m = Object.keys(((me = (Ge = l.preferences) == null ? void 0 : Ge.tablePrefs) == null ? void 0 : me.columnSettingsMap) ?? {}).length > 0 || Object.keys(((ze = l.preferences) == null ? void 0 : ze.sqlColumns) ?? {}).length > 0, [p, h] = U({}), [C, S] = U(
|
|
6770
6770
|
() => /* @__PURE__ */ new Set()
|
|
6771
6771
|
), { authToken: x } = ea(), v = hm(x == null ? void 0 : x.accessToken), { compiledAppearance: k } = Hh(), N = se(
|
|
@@ -6773,9 +6773,9 @@ function ir({
|
|
|
6773
6773
|
[k]
|
|
6774
6774
|
), {
|
|
6775
6775
|
getCard: g,
|
|
6776
|
-
manifest:
|
|
6776
|
+
manifest: F,
|
|
6777
6777
|
isLoading: I
|
|
6778
|
-
} = ta(((fe = o == null ? void 0 : o.customCardPreferences) == null ? void 0 : fe.url) || ""), P = (
|
|
6778
|
+
} = ta(((fe = o == null ? void 0 : o.customCardPreferences) == null ? void 0 : fe.url) || ""), P = (Ee = o == null ? void 0 : o.customCardPreferences) == null ? void 0 : Ee.componentName, _ = P ? g(P) : null, w = (je = F == null ? void 0 : F.visuals) == null ? void 0 : je.find(
|
|
6779
6779
|
(ie) => ie.name === P
|
|
6780
6780
|
), y = oa(o, w), R = c && y === "multiple" && !!o, V = se(() => Oa({
|
|
6781
6781
|
frame: s,
|
|
@@ -6858,11 +6858,11 @@ function ir({
|
|
|
6858
6858
|
var De;
|
|
6859
6859
|
return ((De = ie.reportContext) == null ? void 0 : De.calendar) ?? null;
|
|
6860
6860
|
}
|
|
6861
|
-
), Be = ge((ie) => ie.selectedSheetId), Ue =
|
|
6861
|
+
), Be = ge((ie) => ie.selectedSheetId), Ue = E(
|
|
6862
6862
|
(ie) => ie.inlineFilterValuesMap[(o == null ? void 0 : o.id) || ""]
|
|
6863
|
-
), vt =
|
|
6863
|
+
), vt = E(
|
|
6864
6864
|
(ie) => ie.actions.setCardInlineFilterValue
|
|
6865
|
-
), Xe =
|
|
6865
|
+
), Xe = E(
|
|
6866
6866
|
(ie) => ie.actions.removeCardInlineFilterValue
|
|
6867
6867
|
), yt = se(
|
|
6868
6868
|
() => o ? cd({
|
|
@@ -6930,7 +6930,7 @@ function ir({
|
|
|
6930
6930
|
/* @__PURE__ */ e(
|
|
6931
6931
|
"div",
|
|
6932
6932
|
{
|
|
6933
|
-
className:
|
|
6933
|
+
className: Q(
|
|
6934
6934
|
"flex h-full min-h-0 flex-1 flex-col gap-2",
|
|
6935
6935
|
be && "opacity-50"
|
|
6936
6936
|
),
|
|
@@ -7049,7 +7049,7 @@ function Go({
|
|
|
7049
7049
|
variant: r = "panel",
|
|
7050
7050
|
className: s
|
|
7051
7051
|
}) {
|
|
7052
|
-
const [l, c] = U(!1), d = r === "popover", o =
|
|
7052
|
+
const [l, c] = U(!1), d = r === "popover", o = E((C) => C.isDevMode), i = E((C) => C.card.type), { switchEditorMode: f, setRunSql: u } = ve(), m = !d && !o && !!a, p = m && l, h = () => {
|
|
7053
7053
|
f("dev", { sqlToLoad: t }), setTimeout(() => {
|
|
7054
7054
|
u(!0);
|
|
7055
7055
|
}, 100);
|
|
@@ -7057,7 +7057,7 @@ function Go({
|
|
|
7057
7057
|
return /* @__PURE__ */ n(
|
|
7058
7058
|
Ro,
|
|
7059
7059
|
{
|
|
7060
|
-
className:
|
|
7060
|
+
className: Q("overflow-hidden", d && "pt-0", s),
|
|
7061
7061
|
children: [
|
|
7062
7062
|
/* @__PURE__ */ e(
|
|
7063
7063
|
Bo,
|
|
@@ -7069,7 +7069,7 @@ function Go({
|
|
|
7069
7069
|
ariaLabel: "Executed SQL",
|
|
7070
7070
|
copyAriaLabel: "Copy governed query",
|
|
7071
7071
|
headerActions: o ? void 0 : /* @__PURE__ */ n(he, { children: [
|
|
7072
|
-
|
|
7072
|
+
Er(i) && /* @__PURE__ */ e(
|
|
7073
7073
|
ne,
|
|
7074
7074
|
{
|
|
7075
7075
|
onClick: h,
|
|
@@ -7087,7 +7087,7 @@ function Go({
|
|
|
7087
7087
|
}
|
|
7088
7088
|
)
|
|
7089
7089
|
] }),
|
|
7090
|
-
className:
|
|
7090
|
+
className: Q(
|
|
7091
7091
|
"min-h-0",
|
|
7092
7092
|
!d && (p ? "max-h-[40%] shrink-0" : "flex-1")
|
|
7093
7093
|
),
|
|
@@ -7119,23 +7119,23 @@ function Bn({
|
|
|
7119
7119
|
visualAsideControl: a,
|
|
7120
7120
|
mode: r = "both"
|
|
7121
7121
|
}) {
|
|
7122
|
-
const s = hr(), l =
|
|
7122
|
+
const s = hr(), l = E((ue) => ue.frame), c = E((ue) => ue.card), d = E((ue) => ue.isDevMode), o = E((ue) => ue.editorContext), i = (o == null ? void 0 : o.type) === "documentSection", f = ge((ue) => ue.isVisualEditing), u = ge(
|
|
7123
7123
|
(ue) => {
|
|
7124
7124
|
var Ce, Te;
|
|
7125
7125
|
return (Te = (Ce = ue.dashboard) == null ? void 0 : Ce.exportDefaults) == null ? void 0 : Te.csvEncoding;
|
|
7126
7126
|
}
|
|
7127
|
-
), m =
|
|
7127
|
+
), m = E((ue) => ue.actions.setRunSql), p = lt(), h = p === "table" || p === "detailTable" || p === "matrixTable", S = Ir(p) && !!(a != null && a.onOpen), x = Br(), v = se(() => p !== c.type ? { ...c, type: p } : c, [c, p]), {
|
|
7128
7128
|
data: k,
|
|
7129
7129
|
isLoading: N,
|
|
7130
7130
|
isFetching: g,
|
|
7131
|
-
errorMessage:
|
|
7131
|
+
errorMessage: F,
|
|
7132
7132
|
refetch: I,
|
|
7133
7133
|
queryKey: P,
|
|
7134
7134
|
pagination: _,
|
|
7135
7135
|
isCurrentQueryResult: w
|
|
7136
7136
|
} = nt(v), y = Ke(P);
|
|
7137
7137
|
y.current = P;
|
|
7138
|
-
const R = se(() => (k == null ? void 0 : k.records) || [], [k == null ? void 0 : k.records]), { cardFilterValues: V } =
|
|
7138
|
+
const R = se(() => (k == null ? void 0 : k.records) || [], [k == null ? void 0 : k.records]), { cardFilterValues: V } = Jp(
|
|
7139
7139
|
(c == null ? void 0 : c.id) ?? ""
|
|
7140
7140
|
), [j, L] = U(!1), b = _l(c), [Y, T] = U();
|
|
7141
7141
|
we(() => {
|
|
@@ -7184,7 +7184,7 @@ function Bn({
|
|
|
7184
7184
|
);
|
|
7185
7185
|
}
|
|
7186
7186
|
if (!c) return /* @__PURE__ */ e(he, { children: "No Active Card" });
|
|
7187
|
-
const le = r === "both" || r === "toolbar", te = r === "both" || r === "canvas", de = r === "toolbar", z = !N && !g && !
|
|
7187
|
+
const le = r === "both" || r === "toolbar", te = r === "both" || r === "canvas", de = r === "toolbar", z = !N && !g && !F && (k != null && k.sql) ? /* @__PURE__ */ e("div", { className: "inline-flex shrink-0 items-center text-[11px] text-muted-foreground", children: /* @__PURE__ */ n(da, { openDelay: 200, children: [
|
|
7188
7188
|
/* @__PURE__ */ e(ua, { asChild: !0, children: /* @__PURE__ */ e(
|
|
7189
7189
|
"button",
|
|
7190
7190
|
{
|
|
@@ -7202,7 +7202,7 @@ function Bn({
|
|
|
7202
7202
|
children: /* @__PURE__ */ e(Go, { sql: k.sql, variant: "popover" })
|
|
7203
7203
|
}
|
|
7204
7204
|
)
|
|
7205
|
-
] }) }) : null, G = typeof (k == null ? void 0 : k.output) == "string" ? k.output.trim() : "", ae = de && !N && !g && !
|
|
7205
|
+
] }) }) : null, G = typeof (k == null ? void 0 : k.output) == "string" ? k.output.trim() : "", ae = de && !N && !g && !F && G ? /* @__PURE__ */ n(da, { openDelay: 200, children: [
|
|
7206
7206
|
/* @__PURE__ */ e(ua, { asChild: !0, children: /* @__PURE__ */ e(
|
|
7207
7207
|
"button",
|
|
7208
7208
|
{
|
|
@@ -7223,7 +7223,7 @@ function Bn({
|
|
|
7223
7223
|
]
|
|
7224
7224
|
}
|
|
7225
7225
|
)
|
|
7226
|
-
] }) : null, ce = (_ == null ? void 0 : _.totalCount) ?? R.length, be = de && !N && !g && !
|
|
7226
|
+
] }) : null, ce = (_ == null ? void 0 : _.totalCount) ?? R.length, be = de && !N && !g && !F && Array.isArray(k == null ? void 0 : k.records) ? /* @__PURE__ */ n("div", { className: "flex min-w-0 items-center gap-1.5 whitespace-nowrap text-[11px] tabular-nums text-muted-foreground", children: [
|
|
7227
7227
|
/* @__PURE__ */ n("span", { children: [
|
|
7228
7228
|
w ? null : "Last run: ",
|
|
7229
7229
|
ce.toLocaleString(),
|
|
@@ -7242,15 +7242,15 @@ function Bn({
|
|
|
7242
7242
|
return /* @__PURE__ */ n(
|
|
7243
7243
|
"div",
|
|
7244
7244
|
{
|
|
7245
|
-
className:
|
|
7245
|
+
className: Q(
|
|
7246
7246
|
"relative isolate flex flex-col",
|
|
7247
|
-
de ? "pointer-events-none w-full min-w-0" :
|
|
7247
|
+
de ? "pointer-events-none w-full min-w-0" : Q("h-full", !h && "pt-2")
|
|
7248
7248
|
),
|
|
7249
7249
|
children: [
|
|
7250
7250
|
le && /* @__PURE__ */ n(
|
|
7251
7251
|
"div",
|
|
7252
7252
|
{
|
|
7253
|
-
className:
|
|
7253
|
+
className: Q(
|
|
7254
7254
|
"z-10 mb-0 flex items-center",
|
|
7255
7255
|
de ? "pointer-events-none relative h-10 min-w-0 gap-3 px-4" : "min-h-10 gap-2 px-4"
|
|
7256
7256
|
),
|
|
@@ -7281,7 +7281,7 @@ function Bn({
|
|
|
7281
7281
|
/* @__PURE__ */ n(
|
|
7282
7282
|
"div",
|
|
7283
7283
|
{
|
|
7284
|
-
className:
|
|
7284
|
+
className: Q(
|
|
7285
7285
|
"flex items-center text-muted-foreground",
|
|
7286
7286
|
de ? "pointer-events-auto ml-auto gap-1.5" : "gap-2"
|
|
7287
7287
|
),
|
|
@@ -7350,7 +7350,7 @@ function Bn({
|
|
|
7350
7350
|
size: "xs",
|
|
7351
7351
|
"aria-pressed": a.isOpen,
|
|
7352
7352
|
onClick: a.onToggle,
|
|
7353
|
-
className:
|
|
7353
|
+
className: Q(
|
|
7354
7354
|
"h-7 shrink-0 gap-1.5 text-[12px]",
|
|
7355
7355
|
de ? "w-7 px-0 @[760px]:w-auto @[760px]:px-2" : "px-2",
|
|
7356
7356
|
a.isOpen && "bg-accent text-accent-foreground"
|
|
@@ -7371,7 +7371,7 @@ function Bn({
|
|
|
7371
7371
|
children: /* @__PURE__ */ e(
|
|
7372
7372
|
rr,
|
|
7373
7373
|
{
|
|
7374
|
-
className:
|
|
7374
|
+
className: Q("h-3.5 w-3.5", {
|
|
7375
7375
|
"animate-spin": (b == null ? void 0 : b.isFetching) ?? j
|
|
7376
7376
|
})
|
|
7377
7377
|
}
|
|
@@ -7409,7 +7409,7 @@ function Bn({
|
|
|
7409
7409
|
),
|
|
7410
7410
|
/* @__PURE__ */ e(Ds, {})
|
|
7411
7411
|
] }),
|
|
7412
|
-
/* @__PURE__ */ e(
|
|
7412
|
+
/* @__PURE__ */ e(Fs, { children: "Export" }),
|
|
7413
7413
|
b ? /* @__PURE__ */ n(
|
|
7414
7414
|
Dt,
|
|
7415
7415
|
{
|
|
@@ -7461,7 +7461,7 @@ function Bn({
|
|
|
7461
7461
|
)
|
|
7462
7462
|
] }),
|
|
7463
7463
|
/* @__PURE__ */ e(Ds, {}),
|
|
7464
|
-
/* @__PURE__ */ e(
|
|
7464
|
+
/* @__PURE__ */ e(Fs, { children: "Customize" }),
|
|
7465
7465
|
!["table", "detailTable", "custom"].includes(c.type) && f && /* @__PURE__ */ e(
|
|
7466
7466
|
pf,
|
|
7467
7467
|
{
|
|
@@ -7598,7 +7598,7 @@ function Ua({
|
|
|
7598
7598
|
/* @__PURE__ */ e(
|
|
7599
7599
|
X,
|
|
7600
7600
|
{
|
|
7601
|
-
className:
|
|
7601
|
+
className: Q("w-full focus:ring-0 focus:ring-offset-0", c),
|
|
7602
7602
|
children: /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
|
|
7603
7603
|
d && /* @__PURE__ */ e("span", { children: d }),
|
|
7604
7604
|
o && /* @__PURE__ */ e(Z, { placeholder: a })
|
|
@@ -7712,11 +7712,11 @@ const Vf = {
|
|
|
7712
7712
|
code: ({ children: t, className: a }) => (a == null ? void 0 : a.includes("language-")) ? /* @__PURE__ */ e("pre", { className: "my-3 overflow-x-auto rounded-md bg-muted p-3 text-xs", children: /* @__PURE__ */ e("code", { children: t }) }) : /* @__PURE__ */ e("code", { className: "rounded bg-muted px-1 py-0.5 text-xs", children: t }),
|
|
7713
7713
|
pre: ({ children: t }) => /* @__PURE__ */ e(he, { children: t })
|
|
7714
7714
|
};
|
|
7715
|
-
function
|
|
7715
|
+
function Jo() {
|
|
7716
7716
|
var V, j, L;
|
|
7717
|
-
const t =
|
|
7717
|
+
const t = E(
|
|
7718
7718
|
(b) => b.card.customCardPreferences
|
|
7719
|
-
), { data: a } = vd(), r = (a == null ? void 0 : a.plugins) || [], s =
|
|
7719
|
+
), { data: a } = vd(), r = (a == null ? void 0 : a.plugins) || [], s = E((b) => b.card), l = E((b) => b.frame), { setCustomCardPreferences: c } = ve(), d = se(
|
|
7720
7720
|
() => la(l, s),
|
|
7721
7721
|
[l, s]
|
|
7722
7722
|
), o = d == null ? void 0 : d.customCardPreferences, { components: i, manifest: f } = ta(
|
|
@@ -7763,7 +7763,7 @@ function Qo() {
|
|
|
7763
7763
|
);
|
|
7764
7764
|
return b < 0 ? -1 : Yt(s, b);
|
|
7765
7765
|
}, [x, s]);
|
|
7766
|
-
function
|
|
7766
|
+
function F(b) {
|
|
7767
7767
|
if (typeof b == "number")
|
|
7768
7768
|
return `Tab ${b + 1}`;
|
|
7769
7769
|
const Y = b.match(/^(\d+)-(\d+)$/);
|
|
@@ -7884,7 +7884,7 @@ function Qo() {
|
|
|
7884
7884
|
/* @__PURE__ */ e(O, { children: "Slot Guide" }),
|
|
7885
7885
|
/* @__PURE__ */ e("div", { className: "space-y-3 rounded-md border border-border bg-muted/40 px-3 py-2 text-xs", children: u != null && u.slots && u.slots.length > 0 ? /* @__PURE__ */ e("div", { className: "space-y-3", children: u.slots.map((b, Y) => /* @__PURE__ */ n("div", { className: "space-y-1", children: [
|
|
7886
7886
|
/* @__PURE__ */ n("div", { className: "flex items-center gap-2 text-foreground", children: [
|
|
7887
|
-
/* @__PURE__ */ e("span", { className: "font-medium", children:
|
|
7887
|
+
/* @__PURE__ */ e("span", { className: "font-medium", children: F(b.position) }),
|
|
7888
7888
|
/* @__PURE__ */ e("span", { className: "text-muted-foreground", children: "•" }),
|
|
7889
7889
|
/* @__PURE__ */ e("span", { className: "font-medium", children: b.label })
|
|
7890
7890
|
] }),
|
|
@@ -7905,7 +7905,7 @@ function Qo() {
|
|
|
7905
7905
|
] })
|
|
7906
7906
|
] }) })
|
|
7907
7907
|
] }),
|
|
7908
|
-
p && N.length > 0 && /* @__PURE__ */ e(
|
|
7908
|
+
p && N.length > 0 && /* @__PURE__ */ e(Ji, { className: "mt-3 border-yellow-500/40 bg-yellow-500/10 text-yellow-900 dark:text-yellow-100", children: /* @__PURE__ */ e(Qi, { children: /* @__PURE__ */ e("ul", { className: "list-disc space-y-1 pl-4 text-xs", children: N.map((b, Y) => /* @__PURE__ */ e("li", { children: b.message }, `${b.type}-${Y}`)) }) }) }),
|
|
7909
7909
|
u && !p && u.settings && /* @__PURE__ */ e("div", { className: "space-y-3", children: /* @__PURE__ */ e("div", { className: "px-2", children: y({
|
|
7910
7910
|
settingsSchema: u.settings,
|
|
7911
7911
|
settingsField: "settings",
|
|
@@ -8057,7 +8057,7 @@ function Qo() {
|
|
|
8057
8057
|
function an(t) {
|
|
8058
8058
|
return t === "currency" ? 2 : t === "percent" ? 1 : t === "scientific" ? 2 : 0;
|
|
8059
8059
|
}
|
|
8060
|
-
function
|
|
8060
|
+
function Qo(t, a, r) {
|
|
8061
8061
|
if (!a || a === "auto")
|
|
8062
8062
|
return {
|
|
8063
8063
|
type: "auto"
|
|
@@ -8099,7 +8099,7 @@ function Bf(t, a) {
|
|
|
8099
8099
|
maximumFractionDigits: a
|
|
8100
8100
|
};
|
|
8101
8101
|
}
|
|
8102
|
-
function
|
|
8102
|
+
function Qs(t) {
|
|
8103
8103
|
const a = t.decimalPlaces;
|
|
8104
8104
|
return {
|
|
8105
8105
|
...t,
|
|
@@ -8121,7 +8121,7 @@ function Kf(t, a) {
|
|
|
8121
8121
|
durationLargestUnit: t.durationLargestUnit || "day",
|
|
8122
8122
|
durationSmallestUnit: t.durationSmallestUnit || "second",
|
|
8123
8123
|
durationMaxUnits: t.durationMaxUnits
|
|
8124
|
-
} :
|
|
8124
|
+
} : Qo(
|
|
8125
8125
|
t,
|
|
8126
8126
|
r,
|
|
8127
8127
|
a
|
|
@@ -8246,10 +8246,10 @@ function Ya({
|
|
|
8246
8246
|
h
|
|
8247
8247
|
) : void 0, x = p ?? S ?? an(i), v = i === "currency" && f.decimalPlaces === void 0 && f.minimumFractionDigits === void 0 && f.maximumFractionDigits === void 0, [k, N] = U(
|
|
8248
8248
|
() => String(x)
|
|
8249
|
-
), [g,
|
|
8249
|
+
), [g, F] = U(
|
|
8250
8250
|
() => f.multiplyBy !== void 0 ? String(f.multiplyBy) : ""
|
|
8251
8251
|
), I = (y) => {
|
|
8252
|
-
const R =
|
|
8252
|
+
const R = Qo(
|
|
8253
8253
|
t,
|
|
8254
8254
|
y,
|
|
8255
8255
|
{
|
|
@@ -8257,7 +8257,7 @@ function Ya({
|
|
|
8257
8257
|
}
|
|
8258
8258
|
);
|
|
8259
8259
|
a(
|
|
8260
|
-
c && y === "currency" && t.type !== "currency" ?
|
|
8260
|
+
c && y === "currency" && t.type !== "currency" ? Qs(R) : R
|
|
8261
8261
|
);
|
|
8262
8262
|
}, P = (y) => c && i === "currency" ? Bf(
|
|
8263
8263
|
f,
|
|
@@ -8268,7 +8268,7 @@ function Ya({
|
|
|
8268
8268
|
return we(() => {
|
|
8269
8269
|
N(String(x));
|
|
8270
8270
|
}, [x]), we(() => {
|
|
8271
|
-
|
|
8271
|
+
F(
|
|
8272
8272
|
f.multiplyBy !== void 0 ? String(f.multiplyBy) : ""
|
|
8273
8273
|
);
|
|
8274
8274
|
}, [f.multiplyBy]), /* @__PURE__ */ n(he, { children: [
|
|
@@ -8345,7 +8345,7 @@ function Ya({
|
|
|
8345
8345
|
onValueChange: (y) => {
|
|
8346
8346
|
if (y === jn) {
|
|
8347
8347
|
a(
|
|
8348
|
-
|
|
8348
|
+
Qs(f)
|
|
8349
8349
|
);
|
|
8350
8350
|
return;
|
|
8351
8351
|
}
|
|
@@ -8456,7 +8456,7 @@ function Ya({
|
|
|
8456
8456
|
onKeyDown: u,
|
|
8457
8457
|
onChange: (y) => {
|
|
8458
8458
|
const R = y.target.value.replace(/[^0-9.]/g, "");
|
|
8459
|
-
|
|
8459
|
+
F(R), m(
|
|
8460
8460
|
"multiplyBy",
|
|
8461
8461
|
R ? parseFloat(R) : void 0
|
|
8462
8462
|
);
|
|
@@ -8623,7 +8623,7 @@ function Ya({
|
|
|
8623
8623
|
] });
|
|
8624
8624
|
}
|
|
8625
8625
|
function Ur({ cardId: t }) {
|
|
8626
|
-
const a =
|
|
8626
|
+
const a = E((s) => s.droppedConditionalRules);
|
|
8627
8627
|
if (!a || a.cardId !== t || !a.rules.length) return null;
|
|
8628
8628
|
const r = a.rules.map((s) => s.name || "An unnamed rule");
|
|
8629
8629
|
return /* @__PURE__ */ n("p", { role: "status", className: "text-xs text-muted-foreground", children: [
|
|
@@ -8649,13 +8649,13 @@ function Xs(t, a) {
|
|
|
8649
8649
|
}
|
|
8650
8650
|
function Gf() {
|
|
8651
8651
|
var f, u;
|
|
8652
|
-
const t =
|
|
8652
|
+
const t = E((m) => m.card), a = E(
|
|
8653
8653
|
(m) => m.actions.setCardPreferences
|
|
8654
8654
|
), r = Kl() ?? pa.locale, s = jl() ?? pa.defaultCurrency, l = Cd(t) === "config", c = Uf(t.preferences), d = !!((u = (f = t.preferences) == null ? void 0 : f.sqlKpiValue) != null && u.format), o = (m) => {
|
|
8655
|
-
const p =
|
|
8655
|
+
const p = E.getState().card.preferences ?? {};
|
|
8656
8656
|
a(Xs(p, m));
|
|
8657
8657
|
}, i = (m) => {
|
|
8658
|
-
const p =
|
|
8658
|
+
const p = E.getState().card.preferences ?? {};
|
|
8659
8659
|
a(
|
|
8660
8660
|
Xs(p, m ? c : void 0)
|
|
8661
8661
|
);
|
|
@@ -8692,7 +8692,7 @@ function Gf() {
|
|
|
8692
8692
|
] });
|
|
8693
8693
|
}
|
|
8694
8694
|
function Zs({ card: t }) {
|
|
8695
|
-
const a =
|
|
8695
|
+
const a = E(
|
|
8696
8696
|
(i) => i.actions.updateConditionalRules
|
|
8697
8697
|
), { rules: r, onChange: s } = Sr(
|
|
8698
8698
|
t.id,
|
|
@@ -8713,7 +8713,7 @@ function Zs({ card: t }) {
|
|
|
8713
8713
|
)
|
|
8714
8714
|
] }) : null;
|
|
8715
8715
|
}
|
|
8716
|
-
const
|
|
8716
|
+
const Jf = {
|
|
8717
8717
|
combo: {
|
|
8718
8718
|
label: "Combo Chart",
|
|
8719
8719
|
query: "SELECT x-axis, metric-1, metric-2, ... FROM table",
|
|
@@ -8969,9 +8969,9 @@ const Qf = {
|
|
|
8969
8969
|
}
|
|
8970
8970
|
};
|
|
8971
8971
|
function Zo(t) {
|
|
8972
|
-
return
|
|
8972
|
+
return Jf[t];
|
|
8973
8973
|
}
|
|
8974
|
-
function
|
|
8974
|
+
function Qf({
|
|
8975
8975
|
chartType: t,
|
|
8976
8976
|
showDocsLink: a = !0
|
|
8977
8977
|
}) {
|
|
@@ -9042,7 +9042,7 @@ function Wf({
|
|
|
9042
9042
|
side: "left",
|
|
9043
9043
|
align: "start",
|
|
9044
9044
|
sideOffset: 8,
|
|
9045
|
-
children: /* @__PURE__ */ e(
|
|
9045
|
+
children: /* @__PURE__ */ e(Qf, { chartType: t })
|
|
9046
9046
|
}
|
|
9047
9047
|
)
|
|
9048
9048
|
] }) : null;
|
|
@@ -9057,17 +9057,17 @@ function ei({
|
|
|
9057
9057
|
] });
|
|
9058
9058
|
}
|
|
9059
9059
|
function Xf() {
|
|
9060
|
-
const t =
|
|
9060
|
+
const t = E(
|
|
9061
9061
|
(l) => !La(l.card.config)
|
|
9062
|
-
), a =
|
|
9062
|
+
), a = E(
|
|
9063
9063
|
(l) => {
|
|
9064
9064
|
var c, d;
|
|
9065
9065
|
return ((d = (c = l.card.preferences) == null ? void 0 : c.sqlKpiValue) == null ? void 0 : d.comparisonPolarity) ?? Gh;
|
|
9066
9066
|
}
|
|
9067
|
-
), r =
|
|
9067
|
+
), r = E(
|
|
9068
9068
|
(l) => l.actions.setCardPreferences
|
|
9069
9069
|
), s = (l) => {
|
|
9070
|
-
const c =
|
|
9070
|
+
const c = E.getState().card;
|
|
9071
9071
|
r(
|
|
9072
9072
|
ym(c, { kind: "sqlKpiValue" }, l).preferences ?? {}
|
|
9073
9073
|
);
|
|
@@ -9105,7 +9105,7 @@ function Xf() {
|
|
|
9105
9105
|
] })
|
|
9106
9106
|
] });
|
|
9107
9107
|
}
|
|
9108
|
-
function
|
|
9108
|
+
function Qe({
|
|
9109
9109
|
label: t,
|
|
9110
9110
|
value: a,
|
|
9111
9111
|
options: r,
|
|
@@ -9137,7 +9137,7 @@ function Je({
|
|
|
9137
9137
|
] })
|
|
9138
9138
|
] });
|
|
9139
9139
|
}
|
|
9140
|
-
function
|
|
9140
|
+
function Ft({
|
|
9141
9141
|
label: t,
|
|
9142
9142
|
value: a,
|
|
9143
9143
|
onChange: r,
|
|
@@ -9214,7 +9214,7 @@ function el({
|
|
|
9214
9214
|
}
|
|
9215
9215
|
),
|
|
9216
9216
|
/* @__PURE__ */ e(
|
|
9217
|
-
|
|
9217
|
+
Qe,
|
|
9218
9218
|
{
|
|
9219
9219
|
label: `${t} position`,
|
|
9220
9220
|
value: a.position,
|
|
@@ -9229,7 +9229,7 @@ function el({
|
|
|
9229
9229
|
}
|
|
9230
9230
|
),
|
|
9231
9231
|
/* @__PURE__ */ e(
|
|
9232
|
-
|
|
9232
|
+
Ft,
|
|
9233
9233
|
{
|
|
9234
9234
|
label: `${t} label`,
|
|
9235
9235
|
value: a.label ?? "",
|
|
@@ -9278,7 +9278,7 @@ function tl({
|
|
|
9278
9278
|
...a
|
|
9279
9279
|
}) {
|
|
9280
9280
|
var c, d;
|
|
9281
|
-
const r =
|
|
9281
|
+
const r = E((o) => o.card), s = (d = (c = nt(r).data) == null ? void 0 : c.modelFormats) == null ? void 0 : d[t.id], l = t.formatOrigin === "override";
|
|
9282
9282
|
return /* @__PURE__ */ e(
|
|
9283
9283
|
ti,
|
|
9284
9284
|
{
|
|
@@ -9294,8 +9294,8 @@ function ai(t, a, r) {
|
|
|
9294
9294
|
return ((d = t[c]) == null ? void 0 : d.id) === l.levelId && l.member.kind === "value";
|
|
9295
9295
|
});
|
|
9296
9296
|
return new Map([
|
|
9297
|
-
...a != null && a.length ? [[
|
|
9298
|
-
...s ? [[
|
|
9297
|
+
...a != null && a.length ? [[Ja(a), a]] : [],
|
|
9298
|
+
...s ? [[Ja(r), r]] : []
|
|
9299
9299
|
]);
|
|
9300
9300
|
}
|
|
9301
9301
|
const eg = [
|
|
@@ -9325,9 +9325,9 @@ function ag({
|
|
|
9325
9325
|
m.some((p) => p === void 0) || (r ? m[0] <= m[1] && a([m[0], m[1]]) : a(m[0]));
|
|
9326
9326
|
};
|
|
9327
9327
|
return r ? /* @__PURE__ */ n(he, { children: [
|
|
9328
|
-
/* @__PURE__ */ e(
|
|
9328
|
+
/* @__PURE__ */ e(Ft, { label: "From", type: "number", value: s[0], onChange: (i) => o(0, i) }),
|
|
9329
9329
|
/* @__PURE__ */ e(
|
|
9330
|
-
|
|
9330
|
+
Ft,
|
|
9331
9331
|
{
|
|
9332
9332
|
label: "To",
|
|
9333
9333
|
type: "number",
|
|
@@ -9337,7 +9337,7 @@ function ag({
|
|
|
9337
9337
|
}
|
|
9338
9338
|
)
|
|
9339
9339
|
] }) : /* @__PURE__ */ e(
|
|
9340
|
-
|
|
9340
|
+
Ft,
|
|
9341
9341
|
{
|
|
9342
9342
|
label: "Value",
|
|
9343
9343
|
type: "number",
|
|
@@ -9435,7 +9435,7 @@ function ng({
|
|
|
9435
9435
|
}, C = o && Array.isArray(o.value) ? o.value : void 0;
|
|
9436
9436
|
return /* @__PURE__ */ n("div", { className: "space-y-2 border-t pt-2", children: [
|
|
9437
9437
|
/* @__PURE__ */ e(
|
|
9438
|
-
|
|
9438
|
+
Qe,
|
|
9439
9439
|
{
|
|
9440
9440
|
label: "Sort by",
|
|
9441
9441
|
value: c ? c.target.kind === "member" ? "member" : c.target.measureId : "default",
|
|
@@ -9457,7 +9457,7 @@ function ng({
|
|
|
9457
9457
|
),
|
|
9458
9458
|
c && /* @__PURE__ */ n(he, { children: [
|
|
9459
9459
|
/* @__PURE__ */ e(
|
|
9460
|
-
|
|
9460
|
+
Qe,
|
|
9461
9461
|
{
|
|
9462
9462
|
label: "Sort direction",
|
|
9463
9463
|
value: c.direction,
|
|
@@ -9469,7 +9469,7 @@ function ng({
|
|
|
9469
9469
|
}
|
|
9470
9470
|
),
|
|
9471
9471
|
/* @__PURE__ */ e(
|
|
9472
|
-
|
|
9472
|
+
Qe,
|
|
9473
9473
|
{
|
|
9474
9474
|
label: "Null order",
|
|
9475
9475
|
value: c.nulls,
|
|
@@ -9482,7 +9482,7 @@ function ng({
|
|
|
9482
9482
|
)
|
|
9483
9483
|
] }),
|
|
9484
9484
|
/* @__PURE__ */ e(
|
|
9485
|
-
|
|
9485
|
+
Qe,
|
|
9486
9486
|
{
|
|
9487
9487
|
label: "Ranking",
|
|
9488
9488
|
disabled: !r.spec.measures.length,
|
|
@@ -9499,7 +9499,7 @@ function ng({
|
|
|
9499
9499
|
),
|
|
9500
9500
|
d && /* @__PURE__ */ n(he, { children: [
|
|
9501
9501
|
/* @__PURE__ */ e(
|
|
9502
|
-
|
|
9502
|
+
Ft,
|
|
9503
9503
|
{
|
|
9504
9504
|
label: "Ranking count",
|
|
9505
9505
|
type: "number",
|
|
@@ -9511,7 +9511,7 @@ function ng({
|
|
|
9511
9511
|
}
|
|
9512
9512
|
),
|
|
9513
9513
|
/* @__PURE__ */ e(
|
|
9514
|
-
|
|
9514
|
+
Qe,
|
|
9515
9515
|
{
|
|
9516
9516
|
label: "Rank by measure",
|
|
9517
9517
|
value: d.measureId,
|
|
@@ -9528,10 +9528,10 @@ function ng({
|
|
|
9528
9528
|
}
|
|
9529
9529
|
),
|
|
9530
9530
|
/* @__PURE__ */ e(
|
|
9531
|
-
|
|
9531
|
+
Qe,
|
|
9532
9532
|
{
|
|
9533
9533
|
label: "Ranking context",
|
|
9534
|
-
value: d.oppositePath.length ?
|
|
9534
|
+
value: d.oppositePath.length ? Ja(d.oppositePath) : "total",
|
|
9535
9535
|
options: [
|
|
9536
9536
|
{ value: "total", label: "Grand total" },
|
|
9537
9537
|
...[...f].map(([x, v]) => ({
|
|
@@ -9544,7 +9544,7 @@ function ng({
|
|
|
9544
9544
|
)
|
|
9545
9545
|
] }),
|
|
9546
9546
|
/* @__PURE__ */ e(
|
|
9547
|
-
|
|
9547
|
+
Qe,
|
|
9548
9548
|
{
|
|
9549
9549
|
label: "Measure filter",
|
|
9550
9550
|
disabled: !r.spec.measures.length,
|
|
@@ -9555,7 +9555,7 @@ function ng({
|
|
|
9555
9555
|
),
|
|
9556
9556
|
o && /* @__PURE__ */ n(he, { children: [
|
|
9557
9557
|
/* @__PURE__ */ e(
|
|
9558
|
-
|
|
9558
|
+
Qe,
|
|
9559
9559
|
{
|
|
9560
9560
|
label: "Condition",
|
|
9561
9561
|
value: o.operator,
|
|
@@ -9628,7 +9628,7 @@ function sg({
|
|
|
9628
9628
|
var k;
|
|
9629
9629
|
const h = m.target.matrix, C = (h == null ? void 0 : h.axis) === "columns" ? "rows" : "columns", S = C === "rows" ? r == null ? void 0 : r.rowPath : r == null ? void 0 : r.columnPath, x = ai(a.spec[C], h == null ? void 0 : h.oppositePath, S), v = (N) => o(
|
|
9630
9630
|
(g) => g.map(
|
|
9631
|
-
(
|
|
9631
|
+
(F) => F.id === m.id ? { ...F, target: { ...F.target, matrix: N } } : F
|
|
9632
9632
|
)
|
|
9633
9633
|
);
|
|
9634
9634
|
return /* @__PURE__ */ n("fieldset", { className: "min-w-0 space-y-2 border-t pt-2", children: [
|
|
@@ -9637,7 +9637,7 @@ function sg({
|
|
|
9637
9637
|
" scope"
|
|
9638
9638
|
] }),
|
|
9639
9639
|
/* @__PURE__ */ e(
|
|
9640
|
-
|
|
9640
|
+
Qe,
|
|
9641
9641
|
{
|
|
9642
9642
|
label: "Cell role",
|
|
9643
9643
|
value: ((k = m.target.rowRoles) == null ? void 0 : k.length) === 1 ? m.target.rowRoles[0] : "all",
|
|
@@ -9648,10 +9648,10 @@ function sg({
|
|
|
9648
9648
|
{ value: "grand_total", label: "Grand total" },
|
|
9649
9649
|
{ value: "others", label: "Others" }
|
|
9650
9650
|
],
|
|
9651
|
-
onChange: (N) => o((g) => g.map((
|
|
9652
|
-
if (
|
|
9653
|
-
const { tableParts: I, includeTotals: P, includeSubtotals: _, ...w } =
|
|
9654
|
-
return { ...
|
|
9651
|
+
onChange: (N) => o((g) => g.map((F) => {
|
|
9652
|
+
if (F.id !== m.id) return F;
|
|
9653
|
+
const { tableParts: I, includeTotals: P, includeSubtotals: _, ...w } = F.target;
|
|
9654
|
+
return { ...F, target: {
|
|
9655
9655
|
...w,
|
|
9656
9656
|
rowRoles: N === "all" ? void 0 : [N]
|
|
9657
9657
|
} };
|
|
@@ -9659,7 +9659,7 @@ function sg({
|
|
|
9659
9659
|
}
|
|
9660
9660
|
),
|
|
9661
9661
|
/* @__PURE__ */ e(
|
|
9662
|
-
|
|
9662
|
+
Qe,
|
|
9663
9663
|
{
|
|
9664
9664
|
label: "Rule axis",
|
|
9665
9665
|
value: (h == null ? void 0 : h.axis) ?? "all",
|
|
@@ -9675,7 +9675,7 @@ function sg({
|
|
|
9675
9675
|
),
|
|
9676
9676
|
h && /* @__PURE__ */ n(he, { children: [
|
|
9677
9677
|
/* @__PURE__ */ e(
|
|
9678
|
-
|
|
9678
|
+
Qe,
|
|
9679
9679
|
{
|
|
9680
9680
|
label: "Rule level",
|
|
9681
9681
|
value: h.levelId ?? "all",
|
|
@@ -9693,16 +9693,16 @@ function sg({
|
|
|
9693
9693
|
}
|
|
9694
9694
|
),
|
|
9695
9695
|
/* @__PURE__ */ e(
|
|
9696
|
-
|
|
9696
|
+
Qe,
|
|
9697
9697
|
{
|
|
9698
9698
|
label: "Opposite members",
|
|
9699
|
-
value: h.oppositePath === void 0 ? "all" : h.oppositePath.length ?
|
|
9699
|
+
value: h.oppositePath === void 0 ? "all" : h.oppositePath.length ? Ja(h.oppositePath) : "total",
|
|
9700
9700
|
options: [
|
|
9701
9701
|
{ value: "all", label: "All members" },
|
|
9702
9702
|
{ value: "total", label: "Grand total" },
|
|
9703
9703
|
...[...x].map(([N, g]) => ({
|
|
9704
9704
|
value: N,
|
|
9705
|
-
label: g.map((
|
|
9705
|
+
label: g.map((F, I) => vo(g.slice(0, I + 1))).join(" / ")
|
|
9706
9706
|
}))
|
|
9707
9707
|
],
|
|
9708
9708
|
onChange: (N) => v({
|
|
@@ -9740,11 +9740,11 @@ function lg({
|
|
|
9740
9740
|
}, x = (N) => S({
|
|
9741
9741
|
kind: "presentation",
|
|
9742
9742
|
presentation: { ...r.presentation, ...N }
|
|
9743
|
-
}), v = (N, g,
|
|
9743
|
+
}), v = (N, g, F) => {
|
|
9744
9744
|
const I = { ...r.presentation[N] };
|
|
9745
|
-
if (
|
|
9745
|
+
if (F === void 0) delete I[g];
|
|
9746
9746
|
else {
|
|
9747
|
-
const P = tc.safeParse(
|
|
9747
|
+
const P = tc.safeParse(F);
|
|
9748
9748
|
if (!P.success) {
|
|
9749
9749
|
h(P.error.message);
|
|
9750
9750
|
return;
|
|
@@ -9753,7 +9753,7 @@ function lg({
|
|
|
9753
9753
|
}
|
|
9754
9754
|
x({ [N]: I });
|
|
9755
9755
|
}, k = (N, g) => {
|
|
9756
|
-
const
|
|
9756
|
+
const F = r.presentation[g][N], I = d == null ? void 0 : d[g][N], _ = Sm(
|
|
9757
9757
|
{ type: "matrixTable", config: { matrix: r } },
|
|
9758
9758
|
g === "levelFormats" ? { kind: "matrixLevel", levelId: N } : { kind: "matrixMeasure", measureId: N }
|
|
9759
9759
|
);
|
|
@@ -9761,9 +9761,9 @@ function lg({
|
|
|
9761
9761
|
ti,
|
|
9762
9762
|
{
|
|
9763
9763
|
cardType: "matrixTable",
|
|
9764
|
-
value:
|
|
9764
|
+
value: F,
|
|
9765
9765
|
onChange: (w) => v(g, N, w),
|
|
9766
|
-
origin:
|
|
9766
|
+
origin: F || I ? { custom: F !== void 0, modelFormat: I } : void 0,
|
|
9767
9767
|
drawnTypes: _
|
|
9768
9768
|
}
|
|
9769
9769
|
);
|
|
@@ -9792,22 +9792,22 @@ function lg({
|
|
|
9792
9792
|
children: [
|
|
9793
9793
|
(a == null ? void 0 : a.kind) !== "field" && /* @__PURE__ */ e("h2", { className: "text-xs font-semibold", children: N === "rows" ? "Rows" : "Columns" }),
|
|
9794
9794
|
r.spec[N].filter((g) => a.kind === "field" && g.id === a.id).map((g) => {
|
|
9795
|
-
const
|
|
9795
|
+
const F = Or(g, r.presentation), I = (V) => S({
|
|
9796
9796
|
kind: "structure",
|
|
9797
9797
|
[N]: r.spec[N].map(
|
|
9798
9798
|
(j) => j.id === g.id ? V : j
|
|
9799
9799
|
)
|
|
9800
9800
|
}), P = C(g.field), _ = P === "date" || P === "datetime", w = r.presentation.levelFormats[g.id], y = (w == null ? void 0 : w.type) === "temporal_bucket" ? w : mo, R = g.grain ? Cm(y, g.grain) : void 0;
|
|
9801
9801
|
return /* @__PURE__ */ n("div", { className: (a == null ? void 0 : a.kind) === "field" ? "min-w-0" : "min-w-0 border-b pb-2", children: [
|
|
9802
|
-
/* @__PURE__ */ e("div", { className: "flex min-w-0 items-center justify-between gap-1", children: /* @__PURE__ */ e("span", { className: "truncate text-xs font-medium", title:
|
|
9802
|
+
/* @__PURE__ */ e("div", { className: "flex min-w-0 items-center justify-between gap-1", children: /* @__PURE__ */ e("span", { className: "truncate text-xs font-medium", title: F, children: F }) }),
|
|
9803
9803
|
/* @__PURE__ */ n("details", { open: (a == null ? void 0 : a.kind) === "field" ? !0 : void 0, children: [
|
|
9804
9804
|
/* @__PURE__ */ n("summary", { className: `cursor-pointer py-1 text-xs text-muted-foreground ${(a == null ? void 0 : a.kind) === "field" ? "hidden" : ""}`, children: [
|
|
9805
|
-
|
|
9805
|
+
F,
|
|
9806
9806
|
" settings"
|
|
9807
9807
|
] }),
|
|
9808
9808
|
/* @__PURE__ */ n("div", { className: (a == null ? void 0 : a.kind) === "field" ? "space-y-2 pt-2" : "space-y-2 py-2", children: [
|
|
9809
9809
|
/* @__PURE__ */ e(
|
|
9810
|
-
|
|
9810
|
+
Ft,
|
|
9811
9811
|
{
|
|
9812
9812
|
label: "Level label",
|
|
9813
9813
|
value: r.presentation.levelLabels[g.id] ?? "",
|
|
@@ -9818,7 +9818,7 @@ function lg({
|
|
|
9818
9818
|
}
|
|
9819
9819
|
),
|
|
9820
9820
|
/* @__PURE__ */ e(
|
|
9821
|
-
|
|
9821
|
+
Qe,
|
|
9822
9822
|
{
|
|
9823
9823
|
label: "Axis",
|
|
9824
9824
|
value: N,
|
|
@@ -9832,7 +9832,7 @@ function lg({
|
|
|
9832
9832
|
}
|
|
9833
9833
|
),
|
|
9834
9834
|
_ && /* @__PURE__ */ e(
|
|
9835
|
-
|
|
9835
|
+
Qe,
|
|
9836
9836
|
{
|
|
9837
9837
|
label: "Time grain",
|
|
9838
9838
|
value: g.grain ?? "none",
|
|
@@ -9850,7 +9850,7 @@ function lg({
|
|
|
9850
9850
|
),
|
|
9851
9851
|
g.grain ? /* @__PURE__ */ n(he, { children: [
|
|
9852
9852
|
/* @__PURE__ */ e(
|
|
9853
|
-
|
|
9853
|
+
Qe,
|
|
9854
9854
|
{
|
|
9855
9855
|
label: "Date format",
|
|
9856
9856
|
value: R.value,
|
|
@@ -9870,7 +9870,7 @@ function lg({
|
|
|
9870
9870
|
}
|
|
9871
9871
|
),
|
|
9872
9872
|
R.value === "custom" && /* @__PURE__ */ e(
|
|
9873
|
-
|
|
9873
|
+
Ft,
|
|
9874
9874
|
{
|
|
9875
9875
|
label: "Date pattern",
|
|
9876
9876
|
value: R.customPattern,
|
|
@@ -9929,7 +9929,7 @@ function lg({
|
|
|
9929
9929
|
checked: r.presentation.totals[N].skipRedundant === !0,
|
|
9930
9930
|
onChange: (g) => {
|
|
9931
9931
|
const {
|
|
9932
|
-
skipRedundant:
|
|
9932
|
+
skipRedundant: F,
|
|
9933
9933
|
...I
|
|
9934
9934
|
} = r.presentation.totals[N];
|
|
9935
9935
|
x({
|
|
@@ -9956,7 +9956,7 @@ function lg({
|
|
|
9956
9956
|
}
|
|
9957
9957
|
),
|
|
9958
9958
|
/* @__PURE__ */ e(
|
|
9959
|
-
|
|
9959
|
+
Qe,
|
|
9960
9960
|
{
|
|
9961
9961
|
label: "Default expanded levels",
|
|
9962
9962
|
value: String(
|
|
@@ -9967,9 +9967,9 @@ function lg({
|
|
|
9967
9967
|
),
|
|
9968
9968
|
options: Array.from(
|
|
9969
9969
|
{ length: Math.max(1, r.spec[N].length) },
|
|
9970
|
-
(g,
|
|
9971
|
-
value: String(
|
|
9972
|
-
label:
|
|
9970
|
+
(g, F) => ({
|
|
9971
|
+
value: String(F),
|
|
9972
|
+
label: F === 0 ? "Collapsed" : String(F)
|
|
9973
9973
|
})
|
|
9974
9974
|
),
|
|
9975
9975
|
onChange: (g) => S({
|
|
@@ -10001,28 +10001,28 @@ function lg({
|
|
|
10001
10001
|
] }),
|
|
10002
10002
|
/* @__PURE__ */ n("div", { className: (a == null ? void 0 : a.kind) === "field" ? "space-y-2 pt-2" : "space-y-2 py-2", children: [
|
|
10003
10003
|
/* @__PURE__ */ e(
|
|
10004
|
-
|
|
10004
|
+
Ft,
|
|
10005
10005
|
{
|
|
10006
10006
|
label: "Measure label",
|
|
10007
10007
|
value: r.presentation.measureLabels[N.id] ?? "",
|
|
10008
|
-
onChange: (
|
|
10008
|
+
onChange: (F) => {
|
|
10009
10009
|
const I = { ...r.presentation.measureLabels };
|
|
10010
|
-
|
|
10010
|
+
F ? I[N.id] = F : delete I[N.id], x({ measureLabels: I });
|
|
10011
10011
|
}
|
|
10012
10012
|
}
|
|
10013
10013
|
),
|
|
10014
10014
|
N.kind === "aggregate" && /* @__PURE__ */ e(
|
|
10015
|
-
|
|
10015
|
+
Qe,
|
|
10016
10016
|
{
|
|
10017
10017
|
label: "Aggregation",
|
|
10018
10018
|
value: N.aggregate,
|
|
10019
|
-
options: ho(C(N.field)).filter((
|
|
10020
|
-
onChange: (
|
|
10019
|
+
options: ho(C(N.field)).filter((F) => Ss.safeParse(F.value).success).map(({ value: F }) => ({ value: F, label: F })),
|
|
10020
|
+
onChange: (F) => S({
|
|
10021
10021
|
kind: "structure",
|
|
10022
10022
|
measures: r.spec.measures.map(
|
|
10023
10023
|
(I) => I.id === N.id ? {
|
|
10024
10024
|
...N,
|
|
10025
|
-
aggregate: Ss.parse(
|
|
10025
|
+
aggregate: Ss.parse(F)
|
|
10026
10026
|
} : I
|
|
10027
10027
|
)
|
|
10028
10028
|
})
|
|
@@ -10036,7 +10036,7 @@ function lg({
|
|
|
10036
10036
|
a.kind === "table" && /* @__PURE__ */ n("section", { "aria-label": "Presentation", className: "space-y-2 border-b p-3", children: [
|
|
10037
10037
|
/* @__PURE__ */ e("h2", { className: "text-xs font-semibold", children: "Presentation" }),
|
|
10038
10038
|
/* @__PURE__ */ e(
|
|
10039
|
-
|
|
10039
|
+
Qe,
|
|
10040
10040
|
{
|
|
10041
10041
|
label: "Row layout",
|
|
10042
10042
|
value: r.presentation.layout.kind,
|
|
@@ -10058,7 +10058,7 @@ function lg({
|
|
|
10058
10058
|
}
|
|
10059
10059
|
),
|
|
10060
10060
|
/* @__PURE__ */ e(
|
|
10061
|
-
|
|
10061
|
+
Ft,
|
|
10062
10062
|
{
|
|
10063
10063
|
label: "Empty cell text",
|
|
10064
10064
|
value: r.presentation.absence.emptyText,
|
|
@@ -10068,7 +10068,7 @@ function lg({
|
|
|
10068
10068
|
}
|
|
10069
10069
|
),
|
|
10070
10070
|
/* @__PURE__ */ e(
|
|
10071
|
-
|
|
10071
|
+
Ft,
|
|
10072
10072
|
{
|
|
10073
10073
|
label: "Null cell text",
|
|
10074
10074
|
value: r.presentation.absence.nullText,
|
|
@@ -10101,7 +10101,7 @@ function lg({
|
|
|
10101
10101
|
] });
|
|
10102
10102
|
}
|
|
10103
10103
|
function cr({ fieldId: t, section: a = "table" }) {
|
|
10104
|
-
const r =
|
|
10104
|
+
const r = E((i) => i.card), s = E((i) => i.actions.updateCard), l = E((i) => i.actions.updateConditionalRules), c = E((i) => i.matrixSelection), d = kd(r), o = Mm(r);
|
|
10105
10105
|
return o.status === "invalid" ? /* @__PURE__ */ e("div", { role: "alert", className: "p-3 text-xs text-destructive", children: "Invalid Matrix configuration. Repair or reset the card definition." }) : o.status === "absent" ? /* @__PURE__ */ e("div", { className: "p-3 text-xs text-muted-foreground", children: "No fields selected" }) : /* @__PURE__ */ n(he, { children: [
|
|
10106
10106
|
a === "conditional-formatting" && !t && /* @__PURE__ */ e("div", { className: "px-3 pt-3", children: /* @__PURE__ */ e(Ur, { cardId: r.id }) }),
|
|
10107
10107
|
/* @__PURE__ */ e(
|
|
@@ -10312,13 +10312,13 @@ function ni({
|
|
|
10312
10312
|
}
|
|
10313
10313
|
function cg() {
|
|
10314
10314
|
var m, p, h, C, S;
|
|
10315
|
-
const t =
|
|
10315
|
+
const t = E((x) => x.card), { setCardPreferences: a } = ve(), r = lt(), s = ((m = t.config) == null ? void 0 : m.metricColumns) || [], l = s.length === 2 && (((p = t.config) == null ? void 0 : p.groupByColumns) || []).length === 0, c = s.some(
|
|
10316
10316
|
(x) => {
|
|
10317
10317
|
var v;
|
|
10318
10318
|
return ((v = x.comparison) == null ? void 0 : v.mode) === "explicit";
|
|
10319
10319
|
}
|
|
10320
10320
|
);
|
|
10321
|
-
if (!
|
|
10321
|
+
if (!Em.includes(r))
|
|
10322
10322
|
return null;
|
|
10323
10323
|
const o = ((h = t.preferences) == null ? void 0 : h.comparisonPresentation) || {}, i = (x) => a(
|
|
10324
10324
|
po(t.preferences, x)
|
|
@@ -10341,7 +10341,7 @@ function cg() {
|
|
|
10341
10341
|
size: "xs",
|
|
10342
10342
|
checked: ((S = t.preferences) == null ? void 0 : S.inheritGlobalComparison) !== !1,
|
|
10343
10343
|
onCheckedChange: (x) => a(
|
|
10344
|
-
|
|
10344
|
+
Fm(t.preferences, x)
|
|
10345
10345
|
)
|
|
10346
10346
|
}
|
|
10347
10347
|
)
|
|
@@ -10391,14 +10391,14 @@ function ri({
|
|
|
10391
10391
|
focusRequestId: s
|
|
10392
10392
|
}) {
|
|
10393
10393
|
var te, de;
|
|
10394
|
-
const l =
|
|
10394
|
+
const l = E((z) => z.card), c = E(
|
|
10395
10395
|
(z) => z.queryResultColumns
|
|
10396
|
-
), d =
|
|
10396
|
+
), d = E((z) => z.queryResultColumnKeyMap), o = E((z) => {
|
|
10397
10397
|
var G;
|
|
10398
10398
|
return (G = z.card) == null ? void 0 : G.preferences;
|
|
10399
|
-
}), i = o == null ? void 0 : o.tablePrefs, f =
|
|
10399
|
+
}), i = o == null ? void 0 : o.tablePrefs, f = E(
|
|
10400
10400
|
(z) => z.actions.setCardPreferences
|
|
10401
|
-
), u =
|
|
10401
|
+
), u = E((z) => z.queryResultColumnMeta), m = ((te = l.config) == null ? void 0 : te.metricColumns) || [], p = t ?? l.type, h = a ?? c, C = l.type === p ? l : { ...l, type: p }, S = Td(
|
|
10402
10402
|
C,
|
|
10403
10403
|
h,
|
|
10404
10404
|
d,
|
|
@@ -10406,19 +10406,19 @@ function ri({
|
|
|
10406
10406
|
), x = Md(
|
|
10407
10407
|
C,
|
|
10408
10408
|
h
|
|
10409
|
-
), v = p === "matrixTable" ||
|
|
10409
|
+
), v = p === "matrixTable" || Fd(p), k = p === "table", N = p === "table", g = p === "table" || p === "detailTable", F = N || g, I = ((de = S[0]) == null ? void 0 : de.value) || "", P = Dd(i), _ = Im(C), w = Am(C), [y, R] = U("style");
|
|
10410
10410
|
we(() => {
|
|
10411
10411
|
if (r === "style") {
|
|
10412
10412
|
R("style");
|
|
10413
10413
|
return;
|
|
10414
10414
|
}
|
|
10415
|
-
if (r === "columns" &&
|
|
10415
|
+
if (r === "columns" && F) {
|
|
10416
10416
|
R("columns");
|
|
10417
10417
|
return;
|
|
10418
10418
|
}
|
|
10419
10419
|
r === "conditional-formatting" && v && R("conditional-formatting");
|
|
10420
10420
|
}, [
|
|
10421
|
-
|
|
10421
|
+
F,
|
|
10422
10422
|
v,
|
|
10423
10423
|
s,
|
|
10424
10424
|
r
|
|
@@ -10487,13 +10487,13 @@ function ri({
|
|
|
10487
10487
|
stripedRows: Na.stripedRows,
|
|
10488
10488
|
wrapText: Na.wrapText,
|
|
10489
10489
|
totals: {
|
|
10490
|
-
enabled: _ ? w :
|
|
10491
|
-
backgroundColor:
|
|
10492
|
-
textColor:
|
|
10493
|
-
fontWeight:
|
|
10494
|
-
borderTop:
|
|
10495
|
-
borderTopStyle:
|
|
10496
|
-
borderTopColor:
|
|
10490
|
+
enabled: _ ? w : Jt.enabled,
|
|
10491
|
+
backgroundColor: Jt.backgroundColor,
|
|
10492
|
+
textColor: Jt.textColor,
|
|
10493
|
+
fontWeight: Jt.fontWeight,
|
|
10494
|
+
borderTop: Jt.borderTop,
|
|
10495
|
+
borderTopStyle: Jt.borderTopStyle,
|
|
10496
|
+
borderTopColor: Jt.borderTopColor,
|
|
10497
10497
|
// Reset restores the look; each measure's total is a setting, not style (OT-D2).
|
|
10498
10498
|
...Lm((z = i == null ? void 0 : i.tableStyle) == null ? void 0 : z.totals)
|
|
10499
10499
|
}
|
|
@@ -10531,7 +10531,7 @@ function ri({
|
|
|
10531
10531
|
children: [
|
|
10532
10532
|
/* @__PURE__ */ n(Gt, { variant: "underline", children: [
|
|
10533
10533
|
/* @__PURE__ */ e(at, { value: "style", children: "Appearance" }),
|
|
10534
|
-
|
|
10534
|
+
F ? /* @__PURE__ */ e(at, { value: "columns", children: "Columns" }) : null,
|
|
10535
10535
|
/* @__PURE__ */ e(
|
|
10536
10536
|
at,
|
|
10537
10537
|
{
|
|
@@ -10543,7 +10543,7 @@ function ri({
|
|
|
10543
10543
|
] }),
|
|
10544
10544
|
/* @__PURE__ */ n(St, { value: "style", className: "mt-0", children: [
|
|
10545
10545
|
/* @__PURE__ */ e(
|
|
10546
|
-
|
|
10546
|
+
Ed,
|
|
10547
10547
|
{
|
|
10548
10548
|
style: P,
|
|
10549
10549
|
onDensityChange: b,
|
|
@@ -10604,7 +10604,7 @@ function dg({
|
|
|
10604
10604
|
columnId: t,
|
|
10605
10605
|
availableColumns: a
|
|
10606
10606
|
}) {
|
|
10607
|
-
const r =
|
|
10607
|
+
const r = E((d) => d.card), s = E(
|
|
10608
10608
|
(d) => d.actions.updateConditionalRules
|
|
10609
10609
|
), { rules: l, onChange: c } = Sr(
|
|
10610
10610
|
r.id,
|
|
@@ -10627,7 +10627,7 @@ function dg({
|
|
|
10627
10627
|
}
|
|
10628
10628
|
function ug() {
|
|
10629
10629
|
var l;
|
|
10630
|
-
const t =
|
|
10630
|
+
const t = E((c) => c.card.preferences), { setCardPreferences: a } = E((c) => c.actions), r = (l = t == null ? void 0 : t.textVisualOptions) != null && l.isDynamicText ? "dynamic" : "static";
|
|
10631
10631
|
function s(c) {
|
|
10632
10632
|
a({
|
|
10633
10633
|
...t,
|
|
@@ -10661,8 +10661,8 @@ function hg({ color: t, onColorChange: a, onClose: r }) {
|
|
|
10661
10661
|
const m = (x) => {
|
|
10662
10662
|
l(x), h(x, c, o);
|
|
10663
10663
|
}, p = (x) => {
|
|
10664
|
-
const v = x.currentTarget.getBoundingClientRect(), k = Math.max(0, Math.min(1, (x.clientX - v.left) / v.width)), N = Math.max(0, Math.min(1, (x.clientY - v.top) / v.height)), g = k * 100,
|
|
10665
|
-
d(g), i(
|
|
10664
|
+
const v = x.currentTarget.getBoundingClientRect(), k = Math.max(0, Math.min(1, (x.clientX - v.left) / v.width)), N = Math.max(0, Math.min(1, (x.clientY - v.top) / v.height)), g = k * 100, F = (1 - N) * 100;
|
|
10665
|
+
d(g), i(F), h(s, g, F);
|
|
10666
10666
|
}, h = (x, v, k) => {
|
|
10667
10667
|
const N = fg(x, v, k), g = pg(N.r, N.g, N.b);
|
|
10668
10668
|
u(g);
|
|
@@ -10860,8 +10860,8 @@ const gg = [
|
|
|
10860
10860
|
// yellow-400
|
|
10861
10861
|
];
|
|
10862
10862
|
function xg() {
|
|
10863
|
-
var
|
|
10864
|
-
const t =
|
|
10863
|
+
var F, I, P, _, w, y, R, V, j, L;
|
|
10864
|
+
const t = E((b) => b.card), a = E((b) => {
|
|
10865
10865
|
var Y;
|
|
10866
10866
|
return (Y = b.card) == null ? void 0 : Y.preferences;
|
|
10867
10867
|
}), r = lt(), { setCardPreferences: s, updateCardInFrame: l } = ve(), c = se(() => r !== t.type ? { ...t, type: r } : t, [t, r]), { data: d } = nt(c), [o, i] = U({}), [f, u] = U(
|
|
@@ -10907,7 +10907,7 @@ function xg() {
|
|
|
10907
10907
|
return [];
|
|
10908
10908
|
}, [
|
|
10909
10909
|
d,
|
|
10910
|
-
(
|
|
10910
|
+
(F = t == null ? void 0 : t.config) == null ? void 0 : F.groupByColumns,
|
|
10911
10911
|
(I = t == null ? void 0 : t.config) == null ? void 0 : I.pivotByColumns,
|
|
10912
10912
|
(P = t == null ? void 0 : t.config) == null ? void 0 : P.metricColumns,
|
|
10913
10913
|
r
|
|
@@ -10915,7 +10915,7 @@ function xg() {
|
|
|
10915
10915
|
we(() => {
|
|
10916
10916
|
const b = {};
|
|
10917
10917
|
h.forEach((Y, T) => {
|
|
10918
|
-
b[Y] =
|
|
10918
|
+
b[Y] = Es(
|
|
10919
10919
|
Y,
|
|
10920
10920
|
T,
|
|
10921
10921
|
C,
|
|
@@ -10981,12 +10981,12 @@ function xg() {
|
|
|
10981
10981
|
l(Y);
|
|
10982
10982
|
const T = {};
|
|
10983
10983
|
h.forEach((D, M) => {
|
|
10984
|
-
T[D] =
|
|
10984
|
+
T[D] = Es(D, M, C);
|
|
10985
10985
|
}), i(T);
|
|
10986
10986
|
}, g = Object.keys(((L = a == null ? void 0 : a.colorConfig) == null ? void 0 : L.segments) || {}).length > 0;
|
|
10987
10987
|
return /* @__PURE__ */ n(Le, { value: "colors", className: "border-b-0", children: [
|
|
10988
10988
|
/* @__PURE__ */ e(Ye, { className: "flex w-full items-center gap-2 py-2 text-[12px] font-medium hover:no-underline", children: /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
|
|
10989
|
-
/* @__PURE__ */ e(
|
|
10989
|
+
/* @__PURE__ */ e(Jh, { className: "h-4 w-4 text-muted-foreground" }),
|
|
10990
10990
|
/* @__PURE__ */ e("span", { children: "Colors" })
|
|
10991
10991
|
] }) }),
|
|
10992
10992
|
/* @__PURE__ */ e(_e, { className: "", children: /* @__PURE__ */ n("div", { className: "space-y-3", children: [
|
|
@@ -11023,7 +11023,7 @@ function xg() {
|
|
|
11023
11023
|
/* @__PURE__ */ e("div", { className: "grid grid-cols-5 gap-1.5", children: C.slice(0, 10).map((M, A) => /* @__PURE__ */ n(
|
|
11024
11024
|
"button",
|
|
11025
11025
|
{
|
|
11026
|
-
className:
|
|
11026
|
+
className: Q(
|
|
11027
11027
|
"relative h-5 w-5 rounded border-2 transition-all hover:scale-110",
|
|
11028
11028
|
o[b] === M ? "border-gray-900" : "border-transparent"
|
|
11029
11029
|
),
|
|
@@ -11044,7 +11044,7 @@ function xg() {
|
|
|
11044
11044
|
/* @__PURE__ */ e("div", { className: "grid grid-cols-5 gap-1.5", children: gg.map((M, A) => /* @__PURE__ */ e(
|
|
11045
11045
|
"button",
|
|
11046
11046
|
{
|
|
11047
|
-
className:
|
|
11047
|
+
className: Q(
|
|
11048
11048
|
"h-5 w-5 rounded border transition-all hover:scale-110",
|
|
11049
11049
|
o[b] === M ? "border-2 border-gray-900" : M === "#ffffff" ? "border border-gray-300" : "border border-transparent"
|
|
11050
11050
|
),
|
|
@@ -11178,7 +11178,7 @@ function Ct({
|
|
|
11178
11178
|
] });
|
|
11179
11179
|
}
|
|
11180
11180
|
function $n({ axis: t, label: a, type: r, config: s, onChange: l, defaultTitle: c, hidePosition: d }) {
|
|
11181
|
-
var x, v, k, N, g,
|
|
11181
|
+
var x, v, k, N, g, F, I, P, _, w, y, R, V, j;
|
|
11182
11182
|
const [o, i] = U(!!(s != null && s.valueFormat)), f = o || !!(s != null && s.valueFormat), u = (L, b) => {
|
|
11183
11183
|
l({
|
|
11184
11184
|
...s ?? {},
|
|
@@ -11303,7 +11303,7 @@ function $n({ axis: t, label: a, type: r, config: s, onChange: l, defaultTitle:
|
|
|
11303
11303
|
ke,
|
|
11304
11304
|
{
|
|
11305
11305
|
size: "sm",
|
|
11306
|
-
checked: ((
|
|
11306
|
+
checked: ((F = s == null ? void 0 : s.labels) == null ? void 0 : F.enabled) !== !1,
|
|
11307
11307
|
onCheckedChange: (L) => p("enabled", L)
|
|
11308
11308
|
}
|
|
11309
11309
|
)
|
|
@@ -11429,7 +11429,7 @@ function zn(t, a, r) {
|
|
|
11429
11429
|
return "";
|
|
11430
11430
|
}
|
|
11431
11431
|
function bg() {
|
|
11432
|
-
const t =
|
|
11432
|
+
const t = E((i) => i.card), a = E((i) => {
|
|
11433
11433
|
var f;
|
|
11434
11434
|
return (f = i.card) == null ? void 0 : f.preferences;
|
|
11435
11435
|
}), { setCardPreferences: r, updateCardInFrame: s } = ve(), l = lt();
|
|
@@ -11464,7 +11464,7 @@ function bg() {
|
|
|
11464
11464
|
axis: "x",
|
|
11465
11465
|
label: "X-Axis",
|
|
11466
11466
|
type: c.xAxisType,
|
|
11467
|
-
config:
|
|
11467
|
+
config: Fn(
|
|
11468
11468
|
Is(l, "x"),
|
|
11469
11469
|
a == null ? void 0 : a.xAxisConfig
|
|
11470
11470
|
),
|
|
@@ -11478,7 +11478,7 @@ function bg() {
|
|
|
11478
11478
|
axis: "y",
|
|
11479
11479
|
label: o ? "Y-Axis (Left)" : "Y-Axis",
|
|
11480
11480
|
type: c.yAxisType,
|
|
11481
|
-
config:
|
|
11481
|
+
config: Fn(
|
|
11482
11482
|
Is(l, "y"),
|
|
11483
11483
|
a == null ? void 0 : a.yAxisConfig
|
|
11484
11484
|
),
|
|
@@ -11492,7 +11492,7 @@ function bg() {
|
|
|
11492
11492
|
axis: "y2",
|
|
11493
11493
|
label: "Y2-Axis (Right)",
|
|
11494
11494
|
type: "value",
|
|
11495
|
-
config:
|
|
11495
|
+
config: Fn(
|
|
11496
11496
|
{ enabled: !0, position: "right" },
|
|
11497
11497
|
a == null ? void 0 : a.secondaryYAxisConfig
|
|
11498
11498
|
),
|
|
@@ -11505,7 +11505,7 @@ function bg() {
|
|
|
11505
11505
|
] });
|
|
11506
11506
|
}
|
|
11507
11507
|
function vg() {
|
|
11508
|
-
const t =
|
|
11508
|
+
const t = E((m) => m.card), a = lt(), r = E(
|
|
11509
11509
|
(m) => {
|
|
11510
11510
|
var p, h, C, S;
|
|
11511
11511
|
return (S = (C = (h = (p = m.card) == null ? void 0 : p.preferences) == null ? void 0 : h.chartOptions) == null ? void 0 : C.plugins) == null ? void 0 : S.legend;
|
|
@@ -11572,12 +11572,12 @@ function vg() {
|
|
|
11572
11572
|
}
|
|
11573
11573
|
function yg() {
|
|
11574
11574
|
var j, L, b, Y, T;
|
|
11575
|
-
const t =
|
|
11575
|
+
const t = E((D) => D.card), a = lt(), r = E(
|
|
11576
11576
|
(D) => {
|
|
11577
11577
|
var M, A;
|
|
11578
11578
|
return (A = (M = D.card) == null ? void 0 : M.preferences) == null ? void 0 : A.dataLabelsConfig;
|
|
11579
11579
|
}
|
|
11580
|
-
), s =
|
|
11580
|
+
), s = E((D) => {
|
|
11581
11581
|
var M;
|
|
11582
11582
|
return (M = D.card) == null ? void 0 : M.preferences;
|
|
11583
11583
|
}), { setCardPreferences: l, updateCardInFrame: c } = ve(), [d, o] = U(!!(r != null && r.valueFormat));
|
|
@@ -11622,7 +11622,7 @@ function yg() {
|
|
|
11622
11622
|
}, N = () => {
|
|
11623
11623
|
const D = a;
|
|
11624
11624
|
return D === "stackedBar" || D === "stackedLine" || D === "pie" || D === "doughnut" ? "center" : f ? "right" : "top";
|
|
11625
|
-
}, g = a !== "treemap" && a !== "heatmap",
|
|
11625
|
+
}, g = a !== "treemap" && a !== "heatmap", F = a !== "treemap", I = N();
|
|
11626
11626
|
let P = [];
|
|
11627
11627
|
if (g)
|
|
11628
11628
|
if (p)
|
|
@@ -11739,7 +11739,7 @@ function yg() {
|
|
|
11739
11739
|
}
|
|
11740
11740
|
)
|
|
11741
11741
|
] }),
|
|
11742
|
-
|
|
11742
|
+
F && /* @__PURE__ */ n("div", { className: "space-y-2", children: [
|
|
11743
11743
|
/* @__PURE__ */ e(O, { className: "text-xs font-medium", children: "Appearance" }),
|
|
11744
11744
|
/* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
|
|
11745
11745
|
/* @__PURE__ */ e(O, { className: "text-xs text-muted-foreground w-20", children: "Size" }),
|
|
@@ -11811,10 +11811,10 @@ function yg() {
|
|
|
11811
11811
|
}
|
|
11812
11812
|
function Ng() {
|
|
11813
11813
|
var c;
|
|
11814
|
-
const t =
|
|
11814
|
+
const t = E((d) => {
|
|
11815
11815
|
var o;
|
|
11816
11816
|
return (o = d.card) == null ? void 0 : o.type;
|
|
11817
|
-
}), a =
|
|
11817
|
+
}), a = E((d) => {
|
|
11818
11818
|
var o;
|
|
11819
11819
|
return (o = d.card) == null ? void 0 : o.preferences;
|
|
11820
11820
|
}), { setCardPreferences: r } = ve();
|
|
@@ -11877,22 +11877,22 @@ function Ng() {
|
|
|
11877
11877
|
}
|
|
11878
11878
|
const Cg = Object.keys($l);
|
|
11879
11879
|
function wg() {
|
|
11880
|
-
const t =
|
|
11880
|
+
const t = E((p) => p.card), a = E((p) => {
|
|
11881
11881
|
var h;
|
|
11882
11882
|
return (h = p.card) == null ? void 0 : h.preferences;
|
|
11883
|
-
}), { setCardPreferences: r } = ve(), s = (t == null ? void 0 : t.type) === "heatmap", l = (a == null ? void 0 : a.heatmapConfig) || {}, c = l.colorPalette ?? "green", d = l.legendPosition ?? "bottom", o = se(() => l.colorRange && l.colorRange[0] && l.colorRange[1] ? [l.colorRange[0], l.colorRange[1]] : [...
|
|
11883
|
+
}), { setCardPreferences: r } = ve(), s = (t == null ? void 0 : t.type) === "heatmap", l = (a == null ? void 0 : a.heatmapConfig) || {}, c = l.colorPalette ?? "green", d = l.legendPosition ?? "bottom", o = se(() => l.colorRange && l.colorRange[0] && l.colorRange[1] ? [l.colorRange[0], l.colorRange[1]] : [...En], [l.colorRange]), i = (p) => {
|
|
11884
11884
|
const h = {
|
|
11885
11885
|
...l,
|
|
11886
11886
|
...p
|
|
11887
11887
|
};
|
|
11888
|
-
h.colorPalette !== "custom" ? delete h.colorRange : (!h.colorRange || !h.colorRange[0] || !h.colorRange[1]) && (h.colorRange = [...
|
|
11888
|
+
h.colorPalette !== "custom" ? delete h.colorRange : (!h.colorRange || !h.colorRange[0] || !h.colorRange[1]) && (h.colorRange = [...En]), r({
|
|
11889
11889
|
...a || {},
|
|
11890
11890
|
heatmapConfig: h
|
|
11891
11891
|
});
|
|
11892
11892
|
}, f = (p) => {
|
|
11893
11893
|
i({
|
|
11894
11894
|
colorPalette: p,
|
|
11895
|
-
colorRange: p === "custom" ? l.colorRange ?? [...
|
|
11895
|
+
colorRange: p === "custom" ? l.colorRange ?? [...En] : void 0
|
|
11896
11896
|
});
|
|
11897
11897
|
}, u = (p, h) => {
|
|
11898
11898
|
const C = [...o];
|
|
@@ -12010,7 +12010,7 @@ function sl(t) {
|
|
|
12010
12010
|
}
|
|
12011
12011
|
function Sg() {
|
|
12012
12012
|
var j, L;
|
|
12013
|
-
const t =
|
|
12013
|
+
const t = E((b) => b.card.preferences), a = E((b) => b.card), r = E((b) => b.isDevMode), { setCardPreferences: s, setChartOrientation: l } = ve(), c = se(
|
|
12014
12014
|
() => (t == null ? void 0 : t.bulletConfig) || {},
|
|
12015
12015
|
[t == null ? void 0 : t.bulletConfig]
|
|
12016
12016
|
), o = La(a == null ? void 0 : a.config) && !r, [i, f] = U(
|
|
@@ -12104,7 +12104,7 @@ function Sg() {
|
|
|
12104
12104
|
v({
|
|
12105
12105
|
targetValue: Number.isNaN(Y) ? void 0 : Y
|
|
12106
12106
|
});
|
|
12107
|
-
},
|
|
12107
|
+
}, F = (b, Y) => {
|
|
12108
12108
|
const T = Y.trim(), D = {
|
|
12109
12109
|
...c.rangeLabels || {}
|
|
12110
12110
|
};
|
|
@@ -12307,7 +12307,7 @@ function Sg() {
|
|
|
12307
12307
|
{
|
|
12308
12308
|
placeholder: `Display label (${b})`,
|
|
12309
12309
|
value: ((Y = c.rangeLabels) == null ? void 0 : Y[b]) || "",
|
|
12310
|
-
onCommit: (B) =>
|
|
12310
|
+
onCommit: (B) => F(b, B),
|
|
12311
12311
|
className: "h-8 text-xs"
|
|
12312
12312
|
}
|
|
12313
12313
|
)
|
|
@@ -12385,8 +12385,8 @@ function ll(t) {
|
|
|
12385
12385
|
return a;
|
|
12386
12386
|
}
|
|
12387
12387
|
function kg() {
|
|
12388
|
-
var
|
|
12389
|
-
const t =
|
|
12388
|
+
var F, I, P, _, w, y, R, V, j, L, b, Y;
|
|
12389
|
+
const t = E((T) => T.card.preferences), a = E((T) => T.card), r = lt(), s = E((T) => T.isDevMode), { setCardPreferences: l, updateCardInFrame: c } = ve(), d = r === "bubble", o = r === "scatter", i = se(
|
|
12390
12390
|
() => (t == null ? void 0 : t.bubbleScatterConfig) || {},
|
|
12391
12391
|
[t == null ? void 0 : t.bubbleScatterConfig]
|
|
12392
12392
|
), u = La(a == null ? void 0 : a.config) && !s, m = se(() => {
|
|
@@ -12395,7 +12395,7 @@ function kg() {
|
|
|
12395
12395
|
const A = M.label || M.name || M.alias || "";
|
|
12396
12396
|
return { value: A, label: A };
|
|
12397
12397
|
})) || [];
|
|
12398
|
-
}, [(
|
|
12398
|
+
}, [(F = a == null ? void 0 : a.config) == null ? void 0 : F.metricColumns]), p = se(() => {
|
|
12399
12399
|
var T, D;
|
|
12400
12400
|
return ((D = (T = a == null ? void 0 : a.config) == null ? void 0 : T.groupByColumns) == null ? void 0 : D.map((M) => {
|
|
12401
12401
|
const A = M.label || M.name || M.alias || "";
|
|
@@ -12781,7 +12781,7 @@ const Tg = [
|
|
|
12781
12781
|
}
|
|
12782
12782
|
];
|
|
12783
12783
|
function Mg() {
|
|
12784
|
-
const t =
|
|
12784
|
+
const t = E((p) => p.card), a = E((p) => {
|
|
12785
12785
|
var h;
|
|
12786
12786
|
return (h = p.card) == null ? void 0 : h.preferences;
|
|
12787
12787
|
}), { setCardPreferences: r } = ve(), s = (t == null ? void 0 : t.type) === "funnel", l = (a == null ? void 0 : a.funnelConfig) || {}, c = l.percentMode ?? "percentOfTotal", d = l.shrinkFraction ?? 1, o = l.labelThreshold ?? 0, i = (p) => {
|
|
@@ -12892,7 +12892,7 @@ function Mg() {
|
|
|
12892
12892
|
}
|
|
12893
12893
|
function pn() {
|
|
12894
12894
|
var d, o;
|
|
12895
|
-
const t =
|
|
12895
|
+
const t = E((i) => i.card), { data: a, comparisonMetadata: r } = nt(t), s = (a == null ? void 0 : a.records) || [], { keys: l } = Nl(s, r), c = l.slice(1).filter((i) => !qm.includes(i));
|
|
12896
12896
|
if (Ld(t.type)) {
|
|
12897
12897
|
const i = t.config, f = (d = i == null ? void 0 : i.pivotByColumns) != null && d.length && ((o = i == null ? void 0 : i.groupByColumns) != null && o.length) ? Yd(s, i.metricColumns || []) : s, u = _d({
|
|
12898
12898
|
card: t,
|
|
@@ -12924,7 +12924,7 @@ const Dg = [
|
|
|
12924
12924
|
{ value: "INR", label: "INR - Indian Rupee" },
|
|
12925
12925
|
{ value: "CAD", label: "CAD - Canadian Dollar" },
|
|
12926
12926
|
{ value: "AUD", label: "AUD - Australian Dollar" }
|
|
12927
|
-
],
|
|
12927
|
+
], Fg = [
|
|
12928
12928
|
{ value: "en-US", label: "English (US)" },
|
|
12929
12929
|
{ value: "en-GB", label: "English (UK)" },
|
|
12930
12930
|
{ value: "de-DE", label: "German" },
|
|
@@ -12933,7 +12933,7 @@ const Dg = [
|
|
|
12933
12933
|
{ value: "it-IT", label: "Italian" },
|
|
12934
12934
|
{ value: "pt-BR", label: "Portuguese (Brazil)" },
|
|
12935
12935
|
{ value: "zh-CN", label: "Chinese (Simplified)" }
|
|
12936
|
-
],
|
|
12936
|
+
], Eg = ["center", "start", "end"], Ig = ["center", "start", "end", "top", "bottom"];
|
|
12937
12937
|
function fn({
|
|
12938
12938
|
config: t,
|
|
12939
12939
|
onChange: a,
|
|
@@ -12943,27 +12943,27 @@ function fn({
|
|
|
12943
12943
|
showAppearance: c = !0
|
|
12944
12944
|
}) {
|
|
12945
12945
|
var C, S, x, v, k, N;
|
|
12946
|
-
const d = l ?? (r ? ["auto", "center", "left", "right", "custom"] : ["auto", "center", "top", "bottom", "custom"]), o = s ? ["auto", "number", "currency", "percent", "none"] : ["number", "currency", "percent", "none"], i = (g,
|
|
12946
|
+
const d = l ?? (r ? ["auto", "center", "left", "right", "custom"] : ["auto", "center", "top", "bottom", "custom"]), o = s ? ["auto", "number", "currency", "percent", "none"] : ["number", "currency", "percent", "none"], i = (g, F) => {
|
|
12947
12947
|
const I = {
|
|
12948
12948
|
...t,
|
|
12949
|
-
[g]:
|
|
12949
|
+
[g]: F
|
|
12950
12950
|
};
|
|
12951
12951
|
a(I);
|
|
12952
|
-
}, f = (g,
|
|
12952
|
+
}, f = (g, F) => {
|
|
12953
12953
|
const I = {
|
|
12954
12954
|
...t,
|
|
12955
12955
|
font: {
|
|
12956
12956
|
...(t == null ? void 0 : t.font) || {},
|
|
12957
|
-
[g]:
|
|
12957
|
+
[g]: F
|
|
12958
12958
|
}
|
|
12959
12959
|
};
|
|
12960
12960
|
a(I);
|
|
12961
|
-
}, u = (g,
|
|
12961
|
+
}, u = (g, F) => {
|
|
12962
12962
|
const I = {
|
|
12963
12963
|
...t,
|
|
12964
12964
|
formatOptions: {
|
|
12965
12965
|
...(t == null ? void 0 : t.formatOptions) || {},
|
|
12966
|
-
[g]:
|
|
12966
|
+
[g]: F
|
|
12967
12967
|
}
|
|
12968
12968
|
};
|
|
12969
12969
|
a(I);
|
|
@@ -12993,7 +12993,7 @@ function fn({
|
|
|
12993
12993
|
onValueChange: (g) => i("anchor", g),
|
|
12994
12994
|
children: [
|
|
12995
12995
|
/* @__PURE__ */ e(X, { className: "h-7 w-24 text-xs", children: /* @__PURE__ */ e(Z, {}) }),
|
|
12996
|
-
/* @__PURE__ */ e(ee, { children:
|
|
12996
|
+
/* @__PURE__ */ e(ee, { children: Eg.map((g) => /* @__PURE__ */ e($, { value: g, className: "text-xs", children: wt(g) }, g)) })
|
|
12997
12997
|
]
|
|
12998
12998
|
}
|
|
12999
12999
|
)
|
|
@@ -13085,7 +13085,7 @@ function fn({
|
|
|
13085
13085
|
onValueChange: (g) => u("locale", g),
|
|
13086
13086
|
children: [
|
|
13087
13087
|
/* @__PURE__ */ e(X, { className: "h-7 w-28 text-xs", children: /* @__PURE__ */ e(Z, {}) }),
|
|
13088
|
-
/* @__PURE__ */ e(ee, { children:
|
|
13088
|
+
/* @__PURE__ */ e(ee, { children: Fg.map((g) => /* @__PURE__ */ e(
|
|
13089
13089
|
$,
|
|
13090
13090
|
{
|
|
13091
13091
|
value: g.value,
|
|
@@ -13192,7 +13192,7 @@ const Ag = [
|
|
|
13192
13192
|
{ value: "dash-dot", label: "Dash-Dot -·-·" }
|
|
13193
13193
|
];
|
|
13194
13194
|
function Lg() {
|
|
13195
|
-
return
|
|
13195
|
+
return E((a) => {
|
|
13196
13196
|
var r;
|
|
13197
13197
|
return (r = a.card) == null ? void 0 : r.type;
|
|
13198
13198
|
}) !== "combo" ? null : /* @__PURE__ */ n(Le, { value: "combo-series", className: "border-b-0", children: [
|
|
@@ -13209,15 +13209,15 @@ function Yg() {
|
|
|
13209
13209
|
}
|
|
13210
13210
|
function _g({ metricKey: t, idx: a }) {
|
|
13211
13211
|
var v;
|
|
13212
|
-
const [r, s] = U(!1), l =
|
|
13212
|
+
const [r, s] = U(!1), l = E((k) => {
|
|
13213
13213
|
var N;
|
|
13214
13214
|
return (N = k.card) == null ? void 0 : N.preferences;
|
|
13215
|
-
}), c =
|
|
13215
|
+
}), c = E(
|
|
13216
13216
|
(k) => {
|
|
13217
13217
|
var N, g;
|
|
13218
13218
|
return (g = (N = k.card) == null ? void 0 : N.preferences) == null ? void 0 : g.datasetOptions;
|
|
13219
13219
|
}
|
|
13220
|
-
), d = c == null ? void 0 : c.find((k) => k.idx === a), { setCardPreferences: o } =
|
|
13220
|
+
), d = c == null ? void 0 : c.find((k) => k.idx === a), { setCardPreferences: o } = E((k) => k.actions), i = (d == null ? void 0 : d.type) || "bar", f = (d == null ? void 0 : d.yAxisId) || "y", u = ((v = d == null ? void 0 : d.dataLabels) == null ? void 0 : v.enabled) ?? !1, m = i === "line" ? cn : dn;
|
|
13221
13221
|
function p(k) {
|
|
13222
13222
|
const N = {
|
|
13223
13223
|
idx: a,
|
|
@@ -13233,7 +13233,7 @@ function _g({ metricKey: t, idx: a }) {
|
|
|
13233
13233
|
});
|
|
13234
13234
|
else {
|
|
13235
13235
|
const g = c == null ? void 0 : c.map(
|
|
13236
|
-
(
|
|
13236
|
+
(F) => F.idx === a ? { ...F, ...N } : F
|
|
13237
13237
|
);
|
|
13238
13238
|
o({
|
|
13239
13239
|
...l || {},
|
|
@@ -13266,7 +13266,7 @@ function _g({ metricKey: t, idx: a }) {
|
|
|
13266
13266
|
/* @__PURE__ */ e(
|
|
13267
13267
|
_t,
|
|
13268
13268
|
{
|
|
13269
|
-
className:
|
|
13269
|
+
className: Q(
|
|
13270
13270
|
"h-4 w-4 shrink-0 text-muted-foreground transition-transform",
|
|
13271
13271
|
r && "rotate-90"
|
|
13272
13272
|
)
|
|
@@ -13278,7 +13278,7 @@ function _g({ metricKey: t, idx: a }) {
|
|
|
13278
13278
|
/* @__PURE__ */ n(
|
|
13279
13279
|
"span",
|
|
13280
13280
|
{
|
|
13281
|
-
className:
|
|
13281
|
+
className: Q(
|
|
13282
13282
|
"flex items-center gap-1 rounded px-1.5 py-0.5 text-xs",
|
|
13283
13283
|
"border border-border bg-background text-muted-foreground"
|
|
13284
13284
|
),
|
|
@@ -13291,7 +13291,7 @@ function _g({ metricKey: t, idx: a }) {
|
|
|
13291
13291
|
/* @__PURE__ */ e(
|
|
13292
13292
|
"span",
|
|
13293
13293
|
{
|
|
13294
|
-
className:
|
|
13294
|
+
className: Q(
|
|
13295
13295
|
"rounded px-1.5 py-0.5 text-xs",
|
|
13296
13296
|
"border border-border bg-background text-muted-foreground"
|
|
13297
13297
|
),
|
|
@@ -13308,7 +13308,7 @@ function _g({ metricKey: t, idx: a }) {
|
|
|
13308
13308
|
"button",
|
|
13309
13309
|
{
|
|
13310
13310
|
onClick: () => h(k),
|
|
13311
|
-
className:
|
|
13311
|
+
className: Q(
|
|
13312
13312
|
"flex items-center gap-2 rounded-md border px-3 py-1.5 text-xs transition-colors",
|
|
13313
13313
|
i === k ? "border-primary bg-primary/10 text-primary" : "border-border bg-background text-muted-foreground hover:bg-muted"
|
|
13314
13314
|
),
|
|
@@ -13463,7 +13463,7 @@ function jg(t) {
|
|
|
13463
13463
|
return t == null ? "origin" : t === !1 ? "false" : t;
|
|
13464
13464
|
}
|
|
13465
13465
|
function qg() {
|
|
13466
|
-
const t =
|
|
13466
|
+
const t = E((a) => {
|
|
13467
13467
|
var r;
|
|
13468
13468
|
return (r = a.card) == null ? void 0 : r.type;
|
|
13469
13469
|
});
|
|
@@ -13481,15 +13481,15 @@ function $g() {
|
|
|
13481
13481
|
}
|
|
13482
13482
|
function zg({ metricKey: t, idx: a }) {
|
|
13483
13483
|
var S;
|
|
13484
|
-
const [r, s] = U(!1), l =
|
|
13484
|
+
const [r, s] = U(!1), l = E((x) => {
|
|
13485
13485
|
var v;
|
|
13486
13486
|
return (v = x.card) == null ? void 0 : v.preferences;
|
|
13487
|
-
}), c =
|
|
13487
|
+
}), c = E(
|
|
13488
13488
|
(x) => {
|
|
13489
13489
|
var v, k;
|
|
13490
13490
|
return (k = (v = x.card) == null ? void 0 : v.preferences) == null ? void 0 : k.datasetOptions;
|
|
13491
13491
|
}
|
|
13492
|
-
), d = c == null ? void 0 : c.find((x) => x.idx === a), { setCardPreferences: o } =
|
|
13492
|
+
), d = c == null ? void 0 : c.find((x) => x.idx === a), { setCardPreferences: o } = E((x) => x.actions), i = jg(d == null ? void 0 : d.fill), f = ((S = d == null ? void 0 : d.dataLabels) == null ? void 0 : S.enabled) ?? !1, u = Hn.find((x) => x.value === i) || Hn[0];
|
|
13493
13493
|
function m(x) {
|
|
13494
13494
|
const v = {
|
|
13495
13495
|
idx: a,
|
|
@@ -13534,7 +13534,7 @@ function zg({ metricKey: t, idx: a }) {
|
|
|
13534
13534
|
/* @__PURE__ */ e(
|
|
13535
13535
|
_t,
|
|
13536
13536
|
{
|
|
13537
|
-
className:
|
|
13537
|
+
className: Q(
|
|
13538
13538
|
"h-4 w-4 shrink-0 text-muted-foreground transition-transform",
|
|
13539
13539
|
r && "rotate-90"
|
|
13540
13540
|
)
|
|
@@ -13545,7 +13545,7 @@ function zg({ metricKey: t, idx: a }) {
|
|
|
13545
13545
|
/* @__PURE__ */ e("div", { className: "flex shrink-0 items-center gap-1.5", children: /* @__PURE__ */ n(
|
|
13546
13546
|
"span",
|
|
13547
13547
|
{
|
|
13548
|
-
className:
|
|
13548
|
+
className: Q(
|
|
13549
13549
|
"flex items-center gap-1 rounded px-1.5 py-0.5 text-xs",
|
|
13550
13550
|
"border border-border bg-background text-muted-foreground"
|
|
13551
13551
|
),
|
|
@@ -13694,7 +13694,7 @@ const Hg = [0, 1, 2, 3, 4, 5, 6, 8, 10], Ug = [
|
|
|
13694
13694
|
{ value: "dash-dot", label: "Dash-Dot -·-·" }
|
|
13695
13695
|
];
|
|
13696
13696
|
function Gg() {
|
|
13697
|
-
return
|
|
13697
|
+
return E((a) => {
|
|
13698
13698
|
var r;
|
|
13699
13699
|
return (r = a.card) == null ? void 0 : r.type;
|
|
13700
13700
|
}) !== "line" ? null : /* @__PURE__ */ n(Le, { value: "line-series", className: "border-b-0", children: [
|
|
@@ -13702,24 +13702,24 @@ function Gg() {
|
|
|
13702
13702
|
/* @__PURE__ */ e(Ra, { className: "h-4 w-4 text-muted-foreground" }),
|
|
13703
13703
|
/* @__PURE__ */ e("span", { children: "Series" })
|
|
13704
13704
|
] }) }),
|
|
13705
|
-
/* @__PURE__ */ e(_e, { className: "pt-2", children: /* @__PURE__ */ e(
|
|
13705
|
+
/* @__PURE__ */ e(_e, { className: "pt-2", children: /* @__PURE__ */ e(Jg, {}) })
|
|
13706
13706
|
] });
|
|
13707
13707
|
}
|
|
13708
|
-
function
|
|
13708
|
+
function Jg() {
|
|
13709
13709
|
const { transformedMetricKeys: t } = pn();
|
|
13710
|
-
return t.length === 0 ? /* @__PURE__ */ e("div", { className: "rounded-lg border border-dashed border-border p-4 text-center text-xs text-muted-foreground", children: "Add metrics to configure series" }) : /* @__PURE__ */ e("div", { className: "space-y-3", children: t.map((a, r) => /* @__PURE__ */ e(
|
|
13710
|
+
return t.length === 0 ? /* @__PURE__ */ e("div", { className: "rounded-lg border border-dashed border-border p-4 text-center text-xs text-muted-foreground", children: "Add metrics to configure series" }) : /* @__PURE__ */ e("div", { className: "space-y-3", children: t.map((a, r) => /* @__PURE__ */ e(Qg, { metricKey: a, idx: r }, a)) });
|
|
13711
13711
|
}
|
|
13712
|
-
function
|
|
13712
|
+
function Qg({ metricKey: t, idx: a }) {
|
|
13713
13713
|
var x;
|
|
13714
|
-
const [r, s] = U(!1), l =
|
|
13714
|
+
const [r, s] = U(!1), l = E((v) => {
|
|
13715
13715
|
var k;
|
|
13716
13716
|
return (k = v.card) == null ? void 0 : k.preferences;
|
|
13717
|
-
}), c =
|
|
13717
|
+
}), c = E(
|
|
13718
13718
|
(v) => {
|
|
13719
13719
|
var k, N;
|
|
13720
13720
|
return (N = (k = v.card) == null ? void 0 : k.preferences) == null ? void 0 : N.datasetOptions;
|
|
13721
13721
|
}
|
|
13722
|
-
), d = c == null ? void 0 : c.find((v) => v.idx === a), { setCardPreferences: o } =
|
|
13722
|
+
), d = c == null ? void 0 : c.find((v) => v.idx === a), { setCardPreferences: o } = E((v) => v.actions), i = (d == null ? void 0 : d.lineStyle) || "solid", f = (d == null ? void 0 : d.pointRadius) ?? 3, u = (d == null ? void 0 : d.pointStyle) || "circle", m = ((x = d == null ? void 0 : d.dataLabels) == null ? void 0 : x.enabled) ?? !1, p = Un.find((v) => v.value === i) || Un[0];
|
|
13723
13723
|
function h(v) {
|
|
13724
13724
|
const k = {
|
|
13725
13725
|
idx: a,
|
|
@@ -13763,7 +13763,7 @@ function Jg({ metricKey: t, idx: a }) {
|
|
|
13763
13763
|
/* @__PURE__ */ e(
|
|
13764
13764
|
_t,
|
|
13765
13765
|
{
|
|
13766
|
-
className:
|
|
13766
|
+
className: Q(
|
|
13767
13767
|
"h-4 w-4 shrink-0 text-muted-foreground transition-transform",
|
|
13768
13768
|
r && "rotate-90"
|
|
13769
13769
|
)
|
|
@@ -13774,7 +13774,7 @@ function Jg({ metricKey: t, idx: a }) {
|
|
|
13774
13774
|
/* @__PURE__ */ e("div", { className: "flex shrink-0 items-center gap-1.5", children: /* @__PURE__ */ n(
|
|
13775
13775
|
"span",
|
|
13776
13776
|
{
|
|
13777
|
-
className:
|
|
13777
|
+
className: Q(
|
|
13778
13778
|
"flex items-center gap-1 rounded px-1.5 py-0.5 text-xs",
|
|
13779
13779
|
"border border-border bg-background text-muted-foreground"
|
|
13780
13780
|
),
|
|
@@ -13885,7 +13885,7 @@ function Jg({ metricKey: t, idx: a }) {
|
|
|
13885
13885
|
}
|
|
13886
13886
|
const Wg = [0, 2, 4, 6, 8, 10, 12, 16, 20];
|
|
13887
13887
|
function Xg() {
|
|
13888
|
-
const t =
|
|
13888
|
+
const t = E((a) => {
|
|
13889
13889
|
var r;
|
|
13890
13890
|
return (r = a.card) == null ? void 0 : r.type;
|
|
13891
13891
|
});
|
|
@@ -13903,18 +13903,18 @@ function Zg() {
|
|
|
13903
13903
|
}
|
|
13904
13904
|
function ex({ metricKey: t, idx: a }) {
|
|
13905
13905
|
var C;
|
|
13906
|
-
const [r, s] = U(!1), l =
|
|
13906
|
+
const [r, s] = U(!1), l = E((S) => {
|
|
13907
13907
|
var x;
|
|
13908
13908
|
return (x = S.card) == null ? void 0 : x.type;
|
|
13909
|
-
}), c =
|
|
13909
|
+
}), c = E((S) => {
|
|
13910
13910
|
var x;
|
|
13911
13911
|
return (x = S.card) == null ? void 0 : x.preferences;
|
|
13912
|
-
}), d =
|
|
13912
|
+
}), d = E(
|
|
13913
13913
|
(S) => {
|
|
13914
13914
|
var x, v;
|
|
13915
13915
|
return (v = (x = S.card) == null ? void 0 : x.preferences) == null ? void 0 : v.datasetOptions;
|
|
13916
13916
|
}
|
|
13917
|
-
), o = d == null ? void 0 : d.find((S) => S.idx === a), { setCardPreferences: i } =
|
|
13917
|
+
), o = d == null ? void 0 : d.find((S) => S.idx === a), { setCardPreferences: i } = E((S) => S.actions), f = (o == null ? void 0 : o.borderRadius) ?? 0, u = ((C = o == null ? void 0 : o.dataLabels) == null ? void 0 : C.enabled) ?? !1;
|
|
13918
13918
|
function m(S) {
|
|
13919
13919
|
const x = {
|
|
13920
13920
|
idx: a,
|
|
@@ -13957,7 +13957,7 @@ function ex({ metricKey: t, idx: a }) {
|
|
|
13957
13957
|
/* @__PURE__ */ e(
|
|
13958
13958
|
_t,
|
|
13959
13959
|
{
|
|
13960
|
-
className:
|
|
13960
|
+
className: Q(
|
|
13961
13961
|
"h-4 w-4 shrink-0 text-muted-foreground transition-transform",
|
|
13962
13962
|
r && "rotate-90"
|
|
13963
13963
|
)
|
|
@@ -13968,7 +13968,7 @@ function ex({ metricKey: t, idx: a }) {
|
|
|
13968
13968
|
/* @__PURE__ */ e("div", { className: "flex shrink-0 items-center gap-1.5", children: f > 0 && /* @__PURE__ */ n(
|
|
13969
13969
|
"span",
|
|
13970
13970
|
{
|
|
13971
|
-
className:
|
|
13971
|
+
className: Q(
|
|
13972
13972
|
"flex items-center gap-1 rounded px-1.5 py-0.5 text-xs",
|
|
13973
13973
|
"border border-border bg-background text-muted-foreground"
|
|
13974
13974
|
),
|
|
@@ -14050,7 +14050,7 @@ const tx = [0, 1, 2, 3, 4, 5, 6, 8, 10], ax = [
|
|
|
14050
14050
|
{ value: "dash-dot", label: "Dash-Dot -·-·" }
|
|
14051
14051
|
];
|
|
14052
14052
|
function rx() {
|
|
14053
|
-
const t =
|
|
14053
|
+
const t = E((o) => o.card), a = E((o) => {
|
|
14054
14054
|
var i;
|
|
14055
14055
|
return (i = o.card) == null ? void 0 : i.preferences;
|
|
14056
14056
|
}), r = lt(), s = a == null ? void 0 : a.lineStyleConfig, { setCardPreferences: l, updateCardInFrame: c } = ve();
|
|
@@ -14142,7 +14142,7 @@ const sx = [0, 2, 4, 6, 8, 10, 12, 16, 20], lx = [
|
|
|
14142
14142
|
{ value: "1", label: "100%" }
|
|
14143
14143
|
];
|
|
14144
14144
|
function ix() {
|
|
14145
|
-
const t =
|
|
14145
|
+
const t = E((o) => o.card), a = E((o) => {
|
|
14146
14146
|
var i;
|
|
14147
14147
|
return (i = o.card) == null ? void 0 : i.preferences;
|
|
14148
14148
|
}), r = lt(), s = a == null ? void 0 : a.barStyleConfig, { setCardPreferences: l, updateCardInFrame: c } = ve();
|
|
@@ -14219,7 +14219,7 @@ function ix() {
|
|
|
14219
14219
|
] });
|
|
14220
14220
|
}
|
|
14221
14221
|
function cx() {
|
|
14222
|
-
const t =
|
|
14222
|
+
const t = E(
|
|
14223
14223
|
(r) => {
|
|
14224
14224
|
var s, l;
|
|
14225
14225
|
return (l = (s = r == null ? void 0 : r.card) == null ? void 0 : s.preferences) == null ? void 0 : l.sortChart;
|
|
@@ -14252,7 +14252,7 @@ function cx() {
|
|
|
14252
14252
|
] });
|
|
14253
14253
|
}
|
|
14254
14254
|
const dx = ["kpi"], Gn = 2;
|
|
14255
|
-
function
|
|
14255
|
+
function Qt(t) {
|
|
14256
14256
|
return typeof t == "string" ? t.trim().toLowerCase() : ((t == null ? void 0 : t.id) || (t == null ? void 0 : t.qualifiedFieldName) || (t == null ? void 0 : t.name) || (t == null ? void 0 : t.label) || "").trim().toLowerCase();
|
|
14257
14257
|
}
|
|
14258
14258
|
function ux(t) {
|
|
@@ -14269,16 +14269,16 @@ function mx(t) {
|
|
|
14269
14269
|
}
|
|
14270
14270
|
function hx() {
|
|
14271
14271
|
var k, N;
|
|
14272
|
-
const t =
|
|
14272
|
+
const t = E((g) => g.card), a = E(
|
|
14273
14273
|
(g) => g.actions.updateCardConfig
|
|
14274
14274
|
), r = lt(), { scopedFields: s } = Hl(), l = ((k = t.config) == null ? void 0 : k.metricColumns) || [], c = ((N = t.config) == null ? void 0 : N.summary) || {}, d = c.breakdownDimensions || [], o = d.length > 0, i = dx.includes(r), f = l.length > 0, u = c.enabled === !0, m = i && f, p = Array.from(
|
|
14275
14275
|
new Map(
|
|
14276
|
-
s.filter(ux).map((g) => [
|
|
14276
|
+
s.filter(ux).map((g) => [Qt(g), mx(g)])
|
|
14277
14277
|
).values()
|
|
14278
14278
|
), h = new Set(
|
|
14279
|
-
p.map((g) =>
|
|
14279
|
+
p.map((g) => Qt(g))
|
|
14280
14280
|
), C = new Set(
|
|
14281
|
-
d.map((g) =>
|
|
14281
|
+
d.map((g) => Qt(g)).filter((g) => g && h.has(g))
|
|
14282
14282
|
);
|
|
14283
14283
|
if (!i)
|
|
14284
14284
|
return null;
|
|
@@ -14289,11 +14289,11 @@ function hx() {
|
|
|
14289
14289
|
...g
|
|
14290
14290
|
}
|
|
14291
14291
|
});
|
|
14292
|
-
}, x = (g,
|
|
14293
|
-
const I =
|
|
14294
|
-
(w) => C.has(
|
|
14295
|
-
), _ =
|
|
14296
|
-
(w) =>
|
|
14292
|
+
}, x = (g, F) => {
|
|
14293
|
+
const I = Qt(g), P = p.filter(
|
|
14294
|
+
(w) => C.has(Qt(w))
|
|
14295
|
+
), _ = F ? C.has(I) ? P : [...P, g].slice(0, Gn) : P.filter(
|
|
14296
|
+
(w) => Qt(w) !== I
|
|
14297
14297
|
);
|
|
14298
14298
|
S({
|
|
14299
14299
|
breakdownDimensions: _,
|
|
@@ -14336,7 +14336,7 @@ function hx() {
|
|
|
14336
14336
|
/* @__PURE__ */ n(
|
|
14337
14337
|
"div",
|
|
14338
14338
|
{
|
|
14339
|
-
className:
|
|
14339
|
+
className: Q(
|
|
14340
14340
|
"space-y-3 transition-opacity",
|
|
14341
14341
|
!u && "opacity-60"
|
|
14342
14342
|
),
|
|
@@ -14390,7 +14390,7 @@ function hx() {
|
|
|
14390
14390
|
] })
|
|
14391
14391
|
] }),
|
|
14392
14392
|
p.length === 0 ? /* @__PURE__ */ e("p", { className: "text-[11px] text-muted-foreground", children: "No dimension fields available for breakdown." }) : /* @__PURE__ */ e("ul", { className: "max-h-40 space-y-1 overflow-y-auto", children: p.map((g) => {
|
|
14393
|
-
const
|
|
14393
|
+
const F = Qt(g), I = C.has(F), P = C.size >= Gn, _ = !u || !I && P;
|
|
14394
14394
|
return /* @__PURE__ */ n(
|
|
14395
14395
|
"li",
|
|
14396
14396
|
{
|
|
@@ -14399,7 +14399,7 @@ function hx() {
|
|
|
14399
14399
|
/* @__PURE__ */ e(
|
|
14400
14400
|
Kt,
|
|
14401
14401
|
{
|
|
14402
|
-
id: `summary-breakdown-${
|
|
14402
|
+
id: `summary-breakdown-${F}`,
|
|
14403
14403
|
checked: I,
|
|
14404
14404
|
disabled: _,
|
|
14405
14405
|
onCheckedChange: (w) => x(g, w === !0)
|
|
@@ -14408,14 +14408,14 @@ function hx() {
|
|
|
14408
14408
|
/* @__PURE__ */ e(
|
|
14409
14409
|
O,
|
|
14410
14410
|
{
|
|
14411
|
-
htmlFor: `summary-breakdown-${
|
|
14411
|
+
htmlFor: `summary-breakdown-${F}`,
|
|
14412
14412
|
className: "cursor-pointer text-xs",
|
|
14413
14413
|
children: g.label || g.name
|
|
14414
14414
|
}
|
|
14415
14415
|
)
|
|
14416
14416
|
]
|
|
14417
14417
|
},
|
|
14418
|
-
|
|
14418
|
+
F
|
|
14419
14419
|
);
|
|
14420
14420
|
}) })
|
|
14421
14421
|
] })
|
|
@@ -14434,10 +14434,10 @@ const px = {
|
|
|
14434
14434
|
month: "Month",
|
|
14435
14435
|
quarter: "Quarter",
|
|
14436
14436
|
year: "Year"
|
|
14437
|
-
},
|
|
14437
|
+
}, Jn = (t) => px[t ?? "day"] ?? "Day";
|
|
14438
14438
|
function fx() {
|
|
14439
|
-
const t =
|
|
14440
|
-
return !t || t.type !== "kpi" ||
|
|
14439
|
+
const t = E((a) => a.card);
|
|
14440
|
+
return !t || t.type !== "kpi" || Fr(t) ? null : /* @__PURE__ */ e(gx, { card: t });
|
|
14441
14441
|
}
|
|
14442
14442
|
function gx({ card: t }) {
|
|
14443
14443
|
var h, C, S, x, v;
|
|
@@ -14457,17 +14457,17 @@ function gx({ card: t }) {
|
|
|
14457
14457
|
d && !c && /* @__PURE__ */ n("div", { className: "space-y-2", "data-role": "kpi-trend-grain", children: [
|
|
14458
14458
|
/* @__PURE__ */ e(O, { htmlFor: "kpi-trend-grain", className: "text-xs", children: "Grain" }),
|
|
14459
14459
|
l ? /* @__PURE__ */ n("div", { className: "flex h-8 items-center justify-between rounded-control border border-border bg-muted/30 px-2.5 text-xs text-foreground/80", children: [
|
|
14460
|
-
|
|
14460
|
+
Jn(l.granularity),
|
|
14461
14461
|
" · from Trend By",
|
|
14462
14462
|
/* @__PURE__ */ e(Vd, { className: "h-3 w-3 text-muted-foreground", "aria-hidden": !0 })
|
|
14463
14463
|
] }) : /* @__PURE__ */ n(W, { value: o, onValueChange: m, children: [
|
|
14464
14464
|
/* @__PURE__ */ e(X, { id: "kpi-trend-grain", className: "h-8 text-xs", children: /* @__PURE__ */ e(Z, {}) }),
|
|
14465
14465
|
/* @__PURE__ */ n(ee, { children: [
|
|
14466
|
-
/* @__PURE__ */ e($, { value: "automatic", className: "text-xs", children: f ? `Automatic · ${
|
|
14467
|
-
|
|
14466
|
+
/* @__PURE__ */ e($, { value: "automatic", className: "text-xs", children: f ? `Automatic · ${Jn(f)}` : "Automatic" }),
|
|
14467
|
+
Qh.map((k) => {
|
|
14468
14468
|
const N = i ? zm(i, k) > Hm : !1;
|
|
14469
14469
|
return /* @__PURE__ */ n($, { value: k, className: "text-xs", disabled: N && k !== o, children: [
|
|
14470
|
-
|
|
14470
|
+
Jn(k),
|
|
14471
14471
|
N ? " · too many points" : ""
|
|
14472
14472
|
] }, k);
|
|
14473
14473
|
})
|
|
@@ -14499,7 +14499,7 @@ const xx = /* @__PURE__ */ new Set([
|
|
|
14499
14499
|
"tornado"
|
|
14500
14500
|
]);
|
|
14501
14501
|
function bx() {
|
|
14502
|
-
const t =
|
|
14502
|
+
const t = E((u) => u.card), a = E((u) => {
|
|
14503
14503
|
var m;
|
|
14504
14504
|
return (m = u.card) == null ? void 0 : m.preferences;
|
|
14505
14505
|
}), r = lt(), { setCardPreferences: s, updateCardInFrame: l } = ve(), c = a == null ? void 0 : a.tooltipConfig, [d, o] = U(!!(c != null && c.valueFormat));
|
|
@@ -14552,7 +14552,7 @@ function bx() {
|
|
|
14552
14552
|
] });
|
|
14553
14553
|
}
|
|
14554
14554
|
function si({ mode: t }) {
|
|
14555
|
-
const a =
|
|
14555
|
+
const a = E((r) => {
|
|
14556
14556
|
var s;
|
|
14557
14557
|
return (s = r.card) == null ? void 0 : s.type;
|
|
14558
14558
|
});
|
|
@@ -14580,7 +14580,7 @@ function si({ mode: t }) {
|
|
|
14580
14580
|
] });
|
|
14581
14581
|
}
|
|
14582
14582
|
function vx() {
|
|
14583
|
-
const t =
|
|
14583
|
+
const t = E((r) => r.card), a = t == null ? void 0 : t.type;
|
|
14584
14584
|
return a ? /* @__PURE__ */ n("div", { className: "space-y-4 px-6 py-4", children: [
|
|
14585
14585
|
/* @__PURE__ */ e(ei, { chartType: a }),
|
|
14586
14586
|
/* @__PURE__ */ e(un, { type: "single", collapsible: !0, className: "w-full px-2", children: /* @__PURE__ */ e(si, { mode: "dev" }) })
|
|
@@ -14590,7 +14590,7 @@ function yx({
|
|
|
14590
14590
|
focusSection: t,
|
|
14591
14591
|
focusRequestId: a
|
|
14592
14592
|
}) {
|
|
14593
|
-
const s =
|
|
14593
|
+
const s = E((c) => c.card).type;
|
|
14594
14594
|
function l() {
|
|
14595
14595
|
if (Ir(s))
|
|
14596
14596
|
return /* @__PURE__ */ e(
|
|
@@ -14605,7 +14605,7 @@ function yx({
|
|
|
14605
14605
|
case "kpi":
|
|
14606
14606
|
return /* @__PURE__ */ e(Xf, {});
|
|
14607
14607
|
case "custom":
|
|
14608
|
-
return /* @__PURE__ */ e("div", { className: "px-6 py-2", children: /* @__PURE__ */ e(
|
|
14608
|
+
return /* @__PURE__ */ e("div", { className: "px-6 py-2", children: /* @__PURE__ */ e(Jo, {}) });
|
|
14609
14609
|
case "text":
|
|
14610
14610
|
return /* @__PURE__ */ e(mg, {});
|
|
14611
14611
|
default:
|
|
@@ -14619,7 +14619,7 @@ function yx({
|
|
|
14619
14619
|
}
|
|
14620
14620
|
const Nx = 32;
|
|
14621
14621
|
function Cx() {
|
|
14622
|
-
const t = Ke(null), a =
|
|
14622
|
+
const t = Ke(null), a = E((m) => m.isDevMode), [r, s] = U(!1), [l, c] = U({ section: null, id: 0 }), d = !a || r, o = () => s((m) => !m), i = (m) => {
|
|
14623
14623
|
m && c((p) => ({
|
|
14624
14624
|
section: m,
|
|
14625
14625
|
id: p.id + 1
|
|
@@ -14703,7 +14703,7 @@ function Gr({
|
|
|
14703
14703
|
/* @__PURE__ */ e(ht, { asChild: !0, children: /* @__PURE__ */ e(
|
|
14704
14704
|
"span",
|
|
14705
14705
|
{
|
|
14706
|
-
className:
|
|
14706
|
+
className: Q(
|
|
14707
14707
|
"overflow-hidden text-ellipsis whitespace-nowrap",
|
|
14708
14708
|
a
|
|
14709
14709
|
),
|
|
@@ -14750,7 +14750,7 @@ function li({
|
|
|
14750
14750
|
"div",
|
|
14751
14751
|
{
|
|
14752
14752
|
ref: k,
|
|
14753
|
-
className:
|
|
14753
|
+
className: Q(
|
|
14754
14754
|
"group flex h-7 w-full items-center gap-1.5 rounded-control border bg-background px-1.5 transition-colors",
|
|
14755
14755
|
d ? "border-foreground/30 bg-muted/40" : "border-border hover:bg-muted/40",
|
|
14756
14756
|
x && "z-50 scale-95 opacity-50"
|
|
@@ -14763,7 +14763,7 @@ function li({
|
|
|
14763
14763
|
...h,
|
|
14764
14764
|
...C,
|
|
14765
14765
|
"aria-label": `Drag ${s}`,
|
|
14766
|
-
className:
|
|
14766
|
+
className: Q(
|
|
14767
14767
|
qd,
|
|
14768
14768
|
"text-muted-foreground hover:text-foreground"
|
|
14769
14769
|
),
|
|
@@ -14940,7 +14940,7 @@ function wx({
|
|
|
14940
14940
|
onAliasTemplateChange: a
|
|
14941
14941
|
}) {
|
|
14942
14942
|
var i;
|
|
14943
|
-
const [r, s] = U(t), [l, c] = U(!1), d = (i =
|
|
14943
|
+
const [r, s] = U(t), [l, c] = U(!1), d = (i = E((f) => {
|
|
14944
14944
|
var u;
|
|
14945
14945
|
return (u = f.card.config) == null ? void 0 : u.pivotByColumns;
|
|
14946
14946
|
})) == null ? void 0 : i[0], o = d ? `e.g. Min Sales in {{${d.name}}}` : "e.g. Min Sales in {{region}}";
|
|
@@ -15109,7 +15109,7 @@ function Sx({
|
|
|
15109
15109
|
className: "mt-1 h-8 text-xs",
|
|
15110
15110
|
onClick: i,
|
|
15111
15111
|
children: [
|
|
15112
|
-
/* @__PURE__ */ e(
|
|
15112
|
+
/* @__PURE__ */ e(Et, { className: "mr-1 h-3 w-3" }),
|
|
15113
15113
|
" Add Value Alias"
|
|
15114
15114
|
]
|
|
15115
15115
|
}
|
|
@@ -15119,19 +15119,19 @@ function Sx({
|
|
|
15119
15119
|
}
|
|
15120
15120
|
function kx({ idx: t }) {
|
|
15121
15121
|
var o;
|
|
15122
|
-
const a =
|
|
15122
|
+
const a = E((i) => {
|
|
15123
15123
|
var f;
|
|
15124
15124
|
return (f = i.card) == null ? void 0 : f.preferences;
|
|
15125
|
-
}), r =
|
|
15125
|
+
}), r = E(
|
|
15126
15126
|
(i) => {
|
|
15127
15127
|
var f;
|
|
15128
15128
|
return (f = i.card.preferences) == null ? void 0 : f.datasetOptions;
|
|
15129
15129
|
}
|
|
15130
|
-
), s =
|
|
15130
|
+
), s = E(
|
|
15131
15131
|
(i) => i.actions.setCardPreferences
|
|
15132
15132
|
), l = (o = a == null ? void 0 : a.chartOptions) == null ? void 0 : o.indexAxis, c = r == null ? void 0 : r.find((i) => i.idx === t);
|
|
15133
15133
|
function d(i, f) {
|
|
15134
|
-
(i === "end" || i === "start") && Qm(
|
|
15134
|
+
(i === "end" || i === "start") && Jm(Qm());
|
|
15135
15135
|
const u = {
|
|
15136
15136
|
display: i !== "none",
|
|
15137
15137
|
align: i,
|
|
@@ -15180,7 +15180,7 @@ function kx({ idx: t }) {
|
|
|
15180
15180
|
children: /* @__PURE__ */ e(
|
|
15181
15181
|
lp,
|
|
15182
15182
|
{
|
|
15183
|
-
className:
|
|
15183
|
+
className: Q("h-4 w-4", {
|
|
15184
15184
|
"rotate-90": l === "y"
|
|
15185
15185
|
})
|
|
15186
15186
|
}
|
|
@@ -15195,7 +15195,7 @@ function kx({ idx: t }) {
|
|
|
15195
15195
|
children: /* @__PURE__ */ e(
|
|
15196
15196
|
ip,
|
|
15197
15197
|
{
|
|
15198
|
-
className:
|
|
15198
|
+
className: Q("h-4 w-4", {
|
|
15199
15199
|
"rotate-90": l === "y"
|
|
15200
15200
|
})
|
|
15201
15201
|
}
|
|
@@ -15210,7 +15210,7 @@ function kx({ idx: t }) {
|
|
|
15210
15210
|
children: /* @__PURE__ */ e(
|
|
15211
15211
|
op,
|
|
15212
15212
|
{
|
|
15213
|
-
className:
|
|
15213
|
+
className: Q("h-4 w-4", {
|
|
15214
15214
|
"rotate-90": l === "y"
|
|
15215
15215
|
})
|
|
15216
15216
|
}
|
|
@@ -15230,15 +15230,15 @@ function Mx({
|
|
|
15230
15230
|
iconClassName: s,
|
|
15231
15231
|
children: l
|
|
15232
15232
|
}) {
|
|
15233
|
-
const c =
|
|
15233
|
+
const c = E((u) => {
|
|
15234
15234
|
var m;
|
|
15235
15235
|
return (m = u.card) == null ? void 0 : m.preferences;
|
|
15236
|
-
}), d =
|
|
15236
|
+
}), d = E(
|
|
15237
15237
|
(u) => {
|
|
15238
15238
|
var m, p;
|
|
15239
15239
|
return (p = (m = u.card) == null ? void 0 : m.preferences) == null ? void 0 : p.datasetOptions;
|
|
15240
15240
|
}
|
|
15241
|
-
), o = d == null ? void 0 : d.find((u) => u.idx === a), { setCardPreferences: i } =
|
|
15241
|
+
), o = d == null ? void 0 : d.find((u) => u.idx === a), { setCardPreferences: i } = E((u) => u.actions);
|
|
15242
15242
|
function f(u) {
|
|
15243
15243
|
if (!o)
|
|
15244
15244
|
i({
|
|
@@ -15267,7 +15267,7 @@ function Mx({
|
|
|
15267
15267
|
return /* @__PURE__ */ n(
|
|
15268
15268
|
"div",
|
|
15269
15269
|
{
|
|
15270
|
-
className:
|
|
15270
|
+
className: Q(
|
|
15271
15271
|
"group flex items-center justify-between gap-2 rounded-md",
|
|
15272
15272
|
r
|
|
15273
15273
|
),
|
|
@@ -15278,7 +15278,7 @@ function Mx({
|
|
|
15278
15278
|
dn,
|
|
15279
15279
|
{
|
|
15280
15280
|
onClick: () => f("bar"),
|
|
15281
|
-
className:
|
|
15281
|
+
className: Q(
|
|
15282
15282
|
"size-4 cursor-pointer text-muted-foreground hover:text-foreground",
|
|
15283
15283
|
s
|
|
15284
15284
|
)
|
|
@@ -15288,7 +15288,7 @@ function Mx({
|
|
|
15288
15288
|
cn,
|
|
15289
15289
|
{
|
|
15290
15290
|
onClick: () => f("line"),
|
|
15291
|
-
className:
|
|
15291
|
+
className: Q(
|
|
15292
15292
|
"size-4 cursor-pointer text-muted-foreground hover:text-foreground",
|
|
15293
15293
|
s
|
|
15294
15294
|
)
|
|
@@ -15298,7 +15298,7 @@ function Mx({
|
|
|
15298
15298
|
zl,
|
|
15299
15299
|
{
|
|
15300
15300
|
onClick: () => f("area"),
|
|
15301
|
-
className:
|
|
15301
|
+
className: Q(
|
|
15302
15302
|
"size-4 cursor-pointer text-muted-foreground hover:text-foreground",
|
|
15303
15303
|
s
|
|
15304
15304
|
)
|
|
@@ -15311,7 +15311,7 @@ function Mx({
|
|
|
15311
15311
|
);
|
|
15312
15312
|
}
|
|
15313
15313
|
function Dx() {
|
|
15314
|
-
const t =
|
|
15314
|
+
const t = E((o) => o.card.type), a = E((o) => o.isDevMode), r = E((o) => o.card.preferences), { setCardPreferences: s } = E((o) => o.actions);
|
|
15315
15315
|
function l(o) {
|
|
15316
15316
|
var u;
|
|
15317
15317
|
const i = {
|
|
@@ -15379,10 +15379,10 @@ function Dx() {
|
|
|
15379
15379
|
}
|
|
15380
15380
|
return /* @__PURE__ */ e(he, { children: a ? c() : d() });
|
|
15381
15381
|
}
|
|
15382
|
-
function
|
|
15382
|
+
function Fx({
|
|
15383
15383
|
column: t
|
|
15384
15384
|
}) {
|
|
15385
|
-
const a =
|
|
15385
|
+
const a = E((i) => i.card.type), r = E(
|
|
15386
15386
|
(i) => {
|
|
15387
15387
|
var f, u;
|
|
15388
15388
|
return (u = (f = i.card) == null ? void 0 : f.config) == null ? void 0 : u.metricColumns;
|
|
@@ -15404,7 +15404,7 @@ function Ex({
|
|
|
15404
15404
|
["pie", "doughnut"].includes(a) && o()
|
|
15405
15405
|
] });
|
|
15406
15406
|
}
|
|
15407
|
-
function
|
|
15407
|
+
function Ex({
|
|
15408
15408
|
field: t,
|
|
15409
15409
|
searchQuery: a = "",
|
|
15410
15410
|
limit: r = 500
|
|
@@ -15414,7 +15414,7 @@ function Fx({
|
|
|
15414
15414
|
var m;
|
|
15415
15415
|
return ((m = u.reportContext) == null ? void 0 : m.calendar) ?? null;
|
|
15416
15416
|
}
|
|
15417
|
-
), d =
|
|
15417
|
+
), d = E((u) => u.card), o = d == null ? void 0 : d.dataSource, i = [
|
|
15418
15418
|
"attribute-values",
|
|
15419
15419
|
t.entityName,
|
|
15420
15420
|
t.name,
|
|
@@ -15455,14 +15455,14 @@ function Fx({
|
|
|
15455
15455
|
connection_id: o.connectionId,
|
|
15456
15456
|
cardConfig: u,
|
|
15457
15457
|
cardDataSource: o,
|
|
15458
|
-
cache_config:
|
|
15458
|
+
cache_config: Jd({ card: d }),
|
|
15459
15459
|
calendarContext: c
|
|
15460
15460
|
};
|
|
15461
15461
|
console.log("requestBody", m);
|
|
15462
15462
|
const p = await oo(
|
|
15463
15463
|
`${l.apiServiceUrl}/v1/query`,
|
|
15464
15464
|
(s == null ? void 0 : s.accessToken) || "",
|
|
15465
|
-
|
|
15465
|
+
Qd(m, Wd())
|
|
15466
15466
|
);
|
|
15467
15467
|
if (p != null && p.error)
|
|
15468
15468
|
return console.error("Error fetching attribute values:", p.error), [];
|
|
@@ -15510,8 +15510,8 @@ function Ax({
|
|
|
15510
15510
|
field: (l == null ? void 0 : l.field) || null,
|
|
15511
15511
|
selectedValues: l ? Array.isArray(l.value) ? l.value : [l.value] : []
|
|
15512
15512
|
}), h = r.filter((N) => {
|
|
15513
|
-
var
|
|
15514
|
-
return d ? !1 : !((
|
|
15513
|
+
var F;
|
|
15514
|
+
return d ? !1 : !((F = s == null ? void 0 : s.conditions) == null ? void 0 : F.some(
|
|
15515
15515
|
(I) => I.field.id === N.id
|
|
15516
15516
|
));
|
|
15517
15517
|
}), C = (N) => {
|
|
@@ -15529,20 +15529,20 @@ function Ax({
|
|
|
15529
15529
|
};
|
|
15530
15530
|
let g;
|
|
15531
15531
|
if (d) {
|
|
15532
|
-
const
|
|
15532
|
+
const F = ((s == null ? void 0 : s.conditions) || []).map(
|
|
15533
15533
|
(I) => I.id === l.id ? N : I
|
|
15534
15534
|
);
|
|
15535
15535
|
g = {
|
|
15536
15536
|
...s,
|
|
15537
|
-
conditions:
|
|
15537
|
+
conditions: F
|
|
15538
15538
|
};
|
|
15539
15539
|
} else {
|
|
15540
|
-
const
|
|
15540
|
+
const F = (s == null ? void 0 : s.conditions) || [];
|
|
15541
15541
|
g = {
|
|
15542
15542
|
id: (s == null ? void 0 : s.id) || jt(),
|
|
15543
15543
|
logicalOperator: "AND",
|
|
15544
15544
|
negate: !1,
|
|
15545
|
-
conditions: [...
|
|
15545
|
+
conditions: [...F, N],
|
|
15546
15546
|
groups: []
|
|
15547
15547
|
};
|
|
15548
15548
|
}
|
|
@@ -15650,7 +15650,7 @@ function Rx({
|
|
|
15650
15650
|
values: d,
|
|
15651
15651
|
isLoading: o,
|
|
15652
15652
|
isFetching: i
|
|
15653
|
-
} =
|
|
15653
|
+
} = Ex({
|
|
15654
15654
|
field: t,
|
|
15655
15655
|
searchQuery: l,
|
|
15656
15656
|
limit: 500
|
|
@@ -15671,7 +15671,7 @@ function Rx({
|
|
|
15671
15671
|
] })
|
|
15672
15672
|
] }),
|
|
15673
15673
|
/* @__PURE__ */ n("div", { className: "relative", children: [
|
|
15674
|
-
/* @__PURE__ */ e(
|
|
15674
|
+
/* @__PURE__ */ e(El, { className: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground" }),
|
|
15675
15675
|
/* @__PURE__ */ e(
|
|
15676
15676
|
Ae,
|
|
15677
15677
|
{
|
|
@@ -15721,7 +15721,7 @@ function Rx({
|
|
|
15721
15721
|
function Px(t, a) {
|
|
15722
15722
|
return t === "pivotBy" && a === "table";
|
|
15723
15723
|
}
|
|
15724
|
-
const Ox = [],
|
|
15724
|
+
const Ox = [], Qn = {
|
|
15725
15725
|
running_total: "Running Total",
|
|
15726
15726
|
moving_average: "Moving Average",
|
|
15727
15727
|
difference_from_previous: "Difference from previous",
|
|
@@ -15737,7 +15737,7 @@ function Lx({
|
|
|
15737
15737
|
cardType: d
|
|
15738
15738
|
}) {
|
|
15739
15739
|
var hs, ps, fs, gs, xs, bs, vs, ys, Ns;
|
|
15740
|
-
const o =
|
|
15740
|
+
const o = E((H) => H.card), i = E((H) => H.frame), f = ge((H) => H.isVisualEditing), u = ge((H) => H.selectedSheetId), m = ge(
|
|
15741
15741
|
(H) => H.actions.updateSheetCalculatedFields
|
|
15742
15742
|
), p = ge(
|
|
15743
15743
|
(H) => H.actions.updateDashboardCalculatedFields
|
|
@@ -15752,7 +15752,7 @@ function Lx({
|
|
|
15752
15752
|
isLoading: v,
|
|
15753
15753
|
hasError: k,
|
|
15754
15754
|
refetch: N
|
|
15755
|
-
} =
|
|
15755
|
+
} = Jl(), { userContext: g } = sn(), { tokenProps: F } = ea(), I = Ql(g), P = pr(), _ = Yl() ?? pa, w = Zd() ?? pa, y = eu(), {
|
|
15756
15756
|
updateLabel: R,
|
|
15757
15757
|
handleAggregationChange: V,
|
|
15758
15758
|
handleDetailDateFormatChange: j,
|
|
@@ -15781,15 +15781,15 @@ function Lx({
|
|
|
15781
15781
|
var H;
|
|
15782
15782
|
return !!((H = t.parameters) != null && H.windowTransform);
|
|
15783
15783
|
}), [Be, Ue] = U(!1), [vt, Xe] = U(!1), [yt, ot] = U(null), oe = se(() => {
|
|
15784
|
-
const H = (xe) => xe != null && xe.startsWith("card-source-") ? xe.replace("card-source-", "") : xe, Ne = H(t.id),
|
|
15784
|
+
const H = (xe) => xe != null && xe.startsWith("card-source-") ? xe.replace("card-source-", "") : xe, Ne = H(t.id), Fe = S.find((xe) => {
|
|
15785
15785
|
if (t.qualifiedFieldName && xe.qualifiedFieldName && xe.qualifiedFieldName === t.qualifiedFieldName || t.qualifiedEntityName && xe.qualifiedEntityName && xe.qualifiedEntityName === t.qualifiedEntityName && xe.name === t.name)
|
|
15786
15786
|
return !0;
|
|
15787
|
-
const
|
|
15788
|
-
return !!(Ne &&
|
|
15787
|
+
const J = H(xe.id);
|
|
15788
|
+
return !!(Ne && J && Ne === J);
|
|
15789
15789
|
});
|
|
15790
15790
|
return {
|
|
15791
|
-
dataType: (
|
|
15792
|
-
resolvedFromScopedField: !!
|
|
15791
|
+
dataType: (Fe == null ? void 0 : Fe.dataType) || t.dataType,
|
|
15792
|
+
resolvedFromScopedField: !!Fe
|
|
15793
15793
|
};
|
|
15794
15794
|
}, [
|
|
15795
15795
|
t.dataType,
|
|
@@ -15824,10 +15824,10 @@ function Lx({
|
|
|
15824
15824
|
value: "auto",
|
|
15825
15825
|
customPattern: "",
|
|
15826
15826
|
format: mo
|
|
15827
|
-
},
|
|
15827
|
+
}, Ee = a === "detailColumns" && ((hs = t.format) == null ? void 0 : hs.type) === "date" ? t.format : void 0, je = Ee == null ? void 0 : Ee.pattern, re = je !== void 0 && ol(Me ?? "day").some(
|
|
15828
15828
|
(H) => H.value === je
|
|
15829
15829
|
), [Pe, ie] = U(
|
|
15830
|
-
a === "groupBy" ? fe.value : je === void 0 ?
|
|
15830
|
+
a === "groupBy" ? fe.value : je === void 0 ? Ee ? "" : Bs : re ? je : "custom"
|
|
15831
15831
|
), [De, Rt] = U(
|
|
15832
15832
|
a === "groupBy" ? fe.customPattern : je !== void 0 && !re ? je : ""
|
|
15833
15833
|
), Nt = Pe === "custom", [gn, oi] = U(
|
|
@@ -15835,7 +15835,7 @@ function Lx({
|
|
|
15835
15835
|
), [ii, ci] = U(
|
|
15836
15836
|
t.valueAliases || {}
|
|
15837
15837
|
), [Ze, xn] = U((ps = t.parameters) == null ? void 0 : ps.filters), di = (H) => {
|
|
15838
|
-
var
|
|
15838
|
+
var Fe;
|
|
15839
15839
|
if (a === "groupBy" && !Me) return;
|
|
15840
15840
|
const Ne = Me ?? "day";
|
|
15841
15841
|
if (H === "custom") {
|
|
@@ -15845,13 +15845,13 @@ function Lx({
|
|
|
15845
15845
|
_
|
|
15846
15846
|
).find(
|
|
15847
15847
|
(ye) => ye.value === "custom"
|
|
15848
|
-
) : void 0,
|
|
15849
|
-
ie(H), Rt(
|
|
15848
|
+
) : void 0, J = a === "groupBy" ? De || (((Fe = xe == null ? void 0 : xe.format) == null ? void 0 : Fe.presentation.mode) === "pattern" ? xe.format.presentation.pattern : "") : De;
|
|
15849
|
+
ie(H), Rt(J), a === "groupBy" && b(
|
|
15850
15850
|
r,
|
|
15851
15851
|
za(
|
|
15852
15852
|
Ne,
|
|
15853
15853
|
H,
|
|
15854
|
-
|
|
15854
|
+
J
|
|
15855
15855
|
)
|
|
15856
15856
|
);
|
|
15857
15857
|
} else
|
|
@@ -15876,14 +15876,14 @@ function Lx({
|
|
|
15876
15876
|
) : a === "detailColumns" && j(r, "custom", H);
|
|
15877
15877
|
}, mi = (H) => {
|
|
15878
15878
|
if (a === "groupBy") {
|
|
15879
|
-
const Ne = H === "automatic" ? ih : H,
|
|
15879
|
+
const Ne = H === "automatic" ? ih : H, Fe = oh(
|
|
15880
15880
|
fe.format,
|
|
15881
15881
|
Ne
|
|
15882
15882
|
), xe = ch({
|
|
15883
15883
|
fieldId: t.id,
|
|
15884
15884
|
dataType: t.dataType,
|
|
15885
15885
|
granularity: Ne,
|
|
15886
|
-
format:
|
|
15886
|
+
format: Fe,
|
|
15887
15887
|
semanticTemporalPresentation: t.semanticTemporalPresentation
|
|
15888
15888
|
});
|
|
15889
15889
|
ie(xe.value), Rt(xe.customPattern), Y(r, H);
|
|
@@ -15898,21 +15898,21 @@ function Lx({
|
|
|
15898
15898
|
R(a, r, H);
|
|
15899
15899
|
}, bn = tu(t);
|
|
15900
15900
|
au(t);
|
|
15901
|
-
const
|
|
15901
|
+
const Jr = nu(t), vn = t.role === "metric" && Jr, yn = Jr && (bn === "user_calculated" || bn === "inline_expression" && t.fieldScope !== "domain"), kt = yn ? Fh({
|
|
15902
15902
|
field: t,
|
|
15903
15903
|
sheetFields: (i == null ? void 0 : i.calculatedFields) || [],
|
|
15904
15904
|
dashboardFields: C
|
|
15905
|
-
}) : void 0,
|
|
15905
|
+
}) : void 0, Qr = yn && (kt == null ? void 0 : kt.scope) === "sheet", Wr = yn && (kt == null ? void 0 : kt.scope) === "dashboard", ba = bn === "domain_calculated" || t.fieldScope === "domain", Xr = ba ? ru(t, S) : void 0, ia = ba ? "domain" : Qr ? "sheet" : Wr ? "dashboard" : "card", _a = ba ? Xr || t : (Qr || Wr) && (kt != null && kt.matchedField) ? kt.matchedField : t, xi = ba ? Xr ? "effective" : v ? "loading" : k ? "unavailable" : "unverified" : void 0, Zr = (H) => {
|
|
15906
15906
|
var Ne;
|
|
15907
15907
|
if (xn(H), a === "metrics") {
|
|
15908
|
-
const
|
|
15908
|
+
const Fe = {
|
|
15909
15909
|
...t,
|
|
15910
15910
|
parameters: {
|
|
15911
15911
|
...t.parameters,
|
|
15912
15912
|
filters: H
|
|
15913
15913
|
}
|
|
15914
15914
|
}, xe = [...((Ne = o.config) == null ? void 0 : Ne.metricColumns) || []];
|
|
15915
|
-
xe[r] =
|
|
15915
|
+
xe[r] = Fe, E.getState().actions.updateCardConfig(o.id, {
|
|
15916
15916
|
metricColumns: xe
|
|
15917
15917
|
});
|
|
15918
15918
|
}
|
|
@@ -15967,18 +15967,18 @@ function Lx({
|
|
|
15967
15967
|
we(() => {
|
|
15968
15968
|
va && $e(!0);
|
|
15969
15969
|
}, [va]);
|
|
15970
|
-
const Di = a !== "pivotBy" && a !== "sortBy",
|
|
15970
|
+
const Di = a !== "pivotBy" && a !== "sortBy", Fi = Px(
|
|
15971
15971
|
a,
|
|
15972
15972
|
d
|
|
15973
|
-
),
|
|
15973
|
+
), Ei = t.memberOrder ?? "auto", Ii = es && a === "groupBy", Ai = !Cn && es && (a === "groupBy" || wn), Ri = a === "metrics", Pi = !Cn && Nn === "number" && (a === "groupBy" || wn) && sh(d), Ba = !!(dt && Object.values(dt.comparison).some((H) => H.offered)), Oi = () => {
|
|
15974
15974
|
const H = t, Ne = a === "metrics" && vn;
|
|
15975
15975
|
return /* @__PURE__ */ n("div", { className: "space-y-1", children: [
|
|
15976
15976
|
!Ne && /* @__PURE__ */ e(
|
|
15977
15977
|
"div",
|
|
15978
15978
|
{
|
|
15979
15979
|
title: `${t.entityName}.${t.name}`,
|
|
15980
|
-
onPointerDown: (
|
|
15981
|
-
|
|
15980
|
+
onPointerDown: (Fe) => {
|
|
15981
|
+
Fe.stopPropagation();
|
|
15982
15982
|
},
|
|
15983
15983
|
className: "max-w-[270px] cursor-default overflow-hidden text-ellipsis whitespace-nowrap px-0.5 text-xs text-muted-foreground/80",
|
|
15984
15984
|
children: `${t.entityName}.${t.name}`
|
|
@@ -15988,8 +15988,8 @@ function Lx({
|
|
|
15988
15988
|
"div",
|
|
15989
15989
|
{
|
|
15990
15990
|
title: As(H.calculatedFormula),
|
|
15991
|
-
onPointerDown: (
|
|
15992
|
-
|
|
15991
|
+
onPointerDown: (Fe) => {
|
|
15992
|
+
Fe.stopPropagation();
|
|
15993
15993
|
},
|
|
15994
15994
|
className: "max-w-[270px] cursor-default overflow-hidden text-ellipsis whitespace-nowrap rounded bg-muted/50 px-1.5 py-0.5 font-mono text-xs text-primary",
|
|
15995
15995
|
children: [
|
|
@@ -16026,12 +16026,12 @@ function Lx({
|
|
|
16026
16026
|
]
|
|
16027
16027
|
}
|
|
16028
16028
|
)
|
|
16029
|
-
] }), _i = () =>
|
|
16029
|
+
] }), _i = () => Fi ? /* @__PURE__ */ n("div", { className: "space-y-1", children: [
|
|
16030
16030
|
/* @__PURE__ */ e(O, { className: "text-xs font-medium text-muted-foreground", children: "Pivot column order" }),
|
|
16031
16031
|
/* @__PURE__ */ n(
|
|
16032
16032
|
W,
|
|
16033
16033
|
{
|
|
16034
|
-
value:
|
|
16034
|
+
value: Ei,
|
|
16035
16035
|
onValueChange: (H) => pi(H),
|
|
16036
16036
|
children: [
|
|
16037
16037
|
/* @__PURE__ */ e(X, { className: "h-8 w-full text-xs", children: /* @__PURE__ */ e(Z, {}) }),
|
|
@@ -16121,7 +16121,7 @@ function Lx({
|
|
|
16121
16121
|
}
|
|
16122
16122
|
)
|
|
16123
16123
|
] }) : null, Ki = () => {
|
|
16124
|
-
var Ne,
|
|
16124
|
+
var Ne, Fe, xe;
|
|
16125
16125
|
if (!Ri) return null;
|
|
16126
16126
|
const H = vn;
|
|
16127
16127
|
return /* @__PURE__ */ n(he, { children: [
|
|
@@ -16147,13 +16147,13 @@ function Lx({
|
|
|
16147
16147
|
W,
|
|
16148
16148
|
{
|
|
16149
16149
|
value: t.aggregate,
|
|
16150
|
-
onValueChange: (
|
|
16151
|
-
V(r,
|
|
16150
|
+
onValueChange: (J) => {
|
|
16151
|
+
V(r, J);
|
|
16152
16152
|
},
|
|
16153
16153
|
disabled: H,
|
|
16154
16154
|
children: [
|
|
16155
16155
|
/* @__PURE__ */ e(X, { className: "h-8 w-full text-xs", children: /* @__PURE__ */ e(Z, { placeholder: "Select function..." }) }),
|
|
16156
|
-
/* @__PURE__ */ e(ee, { children: ho(t.dataType).map((
|
|
16156
|
+
/* @__PURE__ */ e(ee, { children: ho(t.dataType).map((J) => /* @__PURE__ */ e($, { className: "text-xs", value: J.value, children: J.label }, J.value)) })
|
|
16157
16157
|
]
|
|
16158
16158
|
}
|
|
16159
16159
|
)
|
|
@@ -16164,7 +16164,7 @@ function Lx({
|
|
|
16164
16164
|
tl,
|
|
16165
16165
|
{
|
|
16166
16166
|
field: We,
|
|
16167
|
-
onChange: (
|
|
16167
|
+
onChange: (J) => A(r, J),
|
|
16168
16168
|
cardType: d,
|
|
16169
16169
|
showTitle: !1
|
|
16170
16170
|
}
|
|
@@ -16184,11 +16184,11 @@ function Lx({
|
|
|
16184
16184
|
children: [
|
|
16185
16185
|
/* @__PURE__ */ e("div", { className: "text-xs font-medium text-foreground", children: "Metric Transform" }),
|
|
16186
16186
|
/* @__PURE__ */ n("div", { className: "flex items-center text-[11px] text-muted-foreground", children: [
|
|
16187
|
-
!pe && /* @__PURE__ */ e("span", { className: "mr-2", children: Pt ?
|
|
16187
|
+
!pe && /* @__PURE__ */ e("span", { className: "mr-2", children: Pt ? Qn[Pt] : "None" }),
|
|
16188
16188
|
/* @__PURE__ */ e(
|
|
16189
16189
|
Vt,
|
|
16190
16190
|
{
|
|
16191
|
-
className:
|
|
16191
|
+
className: Q(
|
|
16192
16192
|
"h-3 w-3 transition-transform",
|
|
16193
16193
|
pe ? "rotate-180" : ""
|
|
16194
16194
|
)
|
|
@@ -16205,26 +16205,26 @@ function Lx({
|
|
|
16205
16205
|
W,
|
|
16206
16206
|
{
|
|
16207
16207
|
value: Pt ?? "none",
|
|
16208
|
-
onValueChange: (
|
|
16208
|
+
onValueChange: (J) => te(
|
|
16209
16209
|
r,
|
|
16210
|
-
|
|
16210
|
+
J
|
|
16211
16211
|
),
|
|
16212
16212
|
disabled: !Tn.length && !va,
|
|
16213
16213
|
children: [
|
|
16214
16214
|
/* @__PURE__ */ e(X, { className: "h-8 w-full text-xs", children: /* @__PURE__ */ e(Z, { placeholder: "Select transform..." }) }),
|
|
16215
16215
|
/* @__PURE__ */ n(ee, { children: [
|
|
16216
16216
|
/* @__PURE__ */ e($, { value: "none", children: "None" }),
|
|
16217
|
-
Object.keys(
|
|
16218
|
-
const ye = Tt == null ? void 0 : Tt.kinds[
|
|
16217
|
+
Object.keys(Qn).map((J) => {
|
|
16218
|
+
const ye = Tt == null ? void 0 : Tt.kinds[J];
|
|
16219
16219
|
return /* @__PURE__ */ e(
|
|
16220
16220
|
$,
|
|
16221
16221
|
{
|
|
16222
|
-
value:
|
|
16222
|
+
value: J,
|
|
16223
16223
|
disabled: ye ? !ye.offered : !1,
|
|
16224
16224
|
title: ye && !ye.offered ? ye.reason : void 0,
|
|
16225
|
-
children:
|
|
16225
|
+
children: Qn[J]
|
|
16226
16226
|
},
|
|
16227
|
-
|
|
16227
|
+
J
|
|
16228
16228
|
);
|
|
16229
16229
|
})
|
|
16230
16230
|
] })
|
|
@@ -16242,17 +16242,17 @@ function Lx({
|
|
|
16242
16242
|
W,
|
|
16243
16243
|
{
|
|
16244
16244
|
value: ya,
|
|
16245
|
-
onValueChange: (
|
|
16245
|
+
onValueChange: (J) => de(r, J),
|
|
16246
16246
|
children: [
|
|
16247
16247
|
/* @__PURE__ */ e(X, { className: "h-8 w-full text-xs", children: /* @__PURE__ */ e(Z, { placeholder: "Select order field..." }) }),
|
|
16248
|
-
/* @__PURE__ */ e(ee, { children: os.filter((
|
|
16248
|
+
/* @__PURE__ */ e(ee, { children: os.filter((J) => !!J.id).map((J) => /* @__PURE__ */ e(
|
|
16249
16249
|
$,
|
|
16250
16250
|
{
|
|
16251
|
-
value:
|
|
16251
|
+
value: J.id,
|
|
16252
16252
|
className: "text-xs",
|
|
16253
|
-
children:
|
|
16253
|
+
children: J.label || J.name
|
|
16254
16254
|
},
|
|
16255
|
-
|
|
16255
|
+
J.id
|
|
16256
16256
|
)) })
|
|
16257
16257
|
]
|
|
16258
16258
|
}
|
|
@@ -16266,9 +16266,9 @@ function Lx({
|
|
|
16266
16266
|
W,
|
|
16267
16267
|
{
|
|
16268
16268
|
value: Ci,
|
|
16269
|
-
onValueChange: (
|
|
16269
|
+
onValueChange: (J) => z(
|
|
16270
16270
|
r,
|
|
16271
|
-
|
|
16271
|
+
J
|
|
16272
16272
|
),
|
|
16273
16273
|
disabled: !ya,
|
|
16274
16274
|
children: [
|
|
@@ -16291,9 +16291,9 @@ function Lx({
|
|
|
16291
16291
|
min: 1,
|
|
16292
16292
|
className: "h-8 text-xs",
|
|
16293
16293
|
value: ds,
|
|
16294
|
-
onChange: (
|
|
16294
|
+
onChange: (J) => ae(
|
|
16295
16295
|
r,
|
|
16296
|
-
Number(
|
|
16296
|
+
Number(J.target.value)
|
|
16297
16297
|
)
|
|
16298
16298
|
}
|
|
16299
16299
|
),
|
|
@@ -16306,9 +16306,9 @@ function Lx({
|
|
|
16306
16306
|
max: ds,
|
|
16307
16307
|
className: "h-8 text-xs",
|
|
16308
16308
|
value: ki,
|
|
16309
|
-
onChange: (
|
|
16309
|
+
onChange: (J) => ce(
|
|
16310
16310
|
r,
|
|
16311
|
-
Number(
|
|
16311
|
+
Number(J.target.value)
|
|
16312
16312
|
)
|
|
16313
16313
|
}
|
|
16314
16314
|
)
|
|
@@ -16319,9 +16319,9 @@ function Lx({
|
|
|
16319
16319
|
W,
|
|
16320
16320
|
{
|
|
16321
16321
|
value: Ti,
|
|
16322
|
-
onValueChange: (
|
|
16322
|
+
onValueChange: (J) => be(
|
|
16323
16323
|
r,
|
|
16324
|
-
|
|
16324
|
+
J
|
|
16325
16325
|
),
|
|
16326
16326
|
children: [
|
|
16327
16327
|
/* @__PURE__ */ e(X, { className: "h-8 w-full text-xs", children: /* @__PURE__ */ e(Z, { placeholder: "Select output..." }) }),
|
|
@@ -16340,9 +16340,9 @@ function Lx({
|
|
|
16340
16340
|
W,
|
|
16341
16341
|
{
|
|
16342
16342
|
value: us,
|
|
16343
|
-
onValueChange: (
|
|
16343
|
+
onValueChange: (J) => ue(
|
|
16344
16344
|
r,
|
|
16345
|
-
|
|
16345
|
+
J
|
|
16346
16346
|
),
|
|
16347
16347
|
children: [
|
|
16348
16348
|
/* @__PURE__ */ e(X, { className: "h-8 w-full text-xs", children: /* @__PURE__ */ e(Z, { placeholder: "Select scope..." }) }),
|
|
@@ -16360,9 +16360,9 @@ function Lx({
|
|
|
16360
16360
|
W,
|
|
16361
16361
|
{
|
|
16362
16362
|
value: Mi,
|
|
16363
|
-
onValueChange: (
|
|
16363
|
+
onValueChange: (J) => Ce(
|
|
16364
16364
|
r,
|
|
16365
|
-
|
|
16365
|
+
J
|
|
16366
16366
|
),
|
|
16367
16367
|
children: [
|
|
16368
16368
|
/* @__PURE__ */ e(X, { className: "h-8 w-full text-xs", children: /* @__PURE__ */ e(Z, { placeholder: "Select output..." }) }),
|
|
@@ -16378,26 +16378,26 @@ function Lx({
|
|
|
16378
16378
|
(Va || Pt === "percent_of_total" && us === "partition_total") && cs.length > 0 && /* @__PURE__ */ n("div", { className: "space-y-1", children: [
|
|
16379
16379
|
/* @__PURE__ */ e(O, { className: "text-xs font-medium text-muted-foreground", children: "Reset By" }),
|
|
16380
16380
|
/* @__PURE__ */ e("div", { className: "space-y-1", children: cs.map(
|
|
16381
|
-
(
|
|
16382
|
-
const ye = !!
|
|
16381
|
+
(J) => {
|
|
16382
|
+
const ye = !!J.id && Si.has(J.id);
|
|
16383
16383
|
return /* @__PURE__ */ n(
|
|
16384
16384
|
"button",
|
|
16385
16385
|
{
|
|
16386
16386
|
type: "button",
|
|
16387
|
-
onClick: () =>
|
|
16387
|
+
onClick: () => J.id && G(
|
|
16388
16388
|
r,
|
|
16389
|
-
|
|
16389
|
+
J.id
|
|
16390
16390
|
),
|
|
16391
|
-
className:
|
|
16391
|
+
className: Q(
|
|
16392
16392
|
"flex h-7 w-full items-center justify-between rounded border px-2 text-xs",
|
|
16393
16393
|
ye ? "border-primary bg-primary/5 text-primary" : "border-border text-muted-foreground"
|
|
16394
16394
|
),
|
|
16395
16395
|
children: [
|
|
16396
|
-
/* @__PURE__ */ e("span", { children:
|
|
16396
|
+
/* @__PURE__ */ e("span", { children: J.label || J.name }),
|
|
16397
16397
|
ye ? /* @__PURE__ */ e(sa, { className: "h-3 w-3" }) : null
|
|
16398
16398
|
]
|
|
16399
16399
|
},
|
|
16400
|
-
|
|
16400
|
+
J.id
|
|
16401
16401
|
);
|
|
16402
16402
|
}
|
|
16403
16403
|
) })
|
|
@@ -16413,9 +16413,9 @@ function Lx({
|
|
|
16413
16413
|
W,
|
|
16414
16414
|
{
|
|
16415
16415
|
value: We.comparison ? We.comparison.mode === "off" ? "off" : We.comparison.spec.kind : "inherit",
|
|
16416
|
-
onValueChange: (
|
|
16416
|
+
onValueChange: (J) => q(
|
|
16417
16417
|
r,
|
|
16418
|
-
|
|
16418
|
+
J,
|
|
16419
16419
|
pt
|
|
16420
16420
|
),
|
|
16421
16421
|
children: [
|
|
@@ -16426,20 +16426,20 @@ function Lx({
|
|
|
16426
16426
|
[
|
|
16427
16427
|
["previous_period", "Previous Period"],
|
|
16428
16428
|
["previous_year", "Previous Year"]
|
|
16429
|
-
].map(([
|
|
16430
|
-
const
|
|
16429
|
+
].map(([J, ye]) => {
|
|
16430
|
+
const Je = dt == null ? void 0 : dt.comparison[J], tt = Je && !Je.offered ? Je.reason : void 0;
|
|
16431
16431
|
return /* @__PURE__ */ e(bt, { children: /* @__PURE__ */ n(mt, { children: [
|
|
16432
16432
|
/* @__PURE__ */ e(ht, { asChild: !0, children: /* @__PURE__ */ e(
|
|
16433
16433
|
$,
|
|
16434
16434
|
{
|
|
16435
|
-
value:
|
|
16435
|
+
value: J,
|
|
16436
16436
|
disabled: !!tt,
|
|
16437
16437
|
title: tt,
|
|
16438
16438
|
children: ye
|
|
16439
16439
|
}
|
|
16440
16440
|
) }),
|
|
16441
16441
|
tt && /* @__PURE__ */ e(ut, { side: "right", children: tt })
|
|
16442
|
-
] }) },
|
|
16442
|
+
] }) }, J);
|
|
16443
16443
|
}),
|
|
16444
16444
|
(dt == null ? void 0 : dt.comparison.target.offered) && /* @__PURE__ */ e($, { value: "target", children: "Target" })
|
|
16445
16445
|
] })
|
|
@@ -16447,7 +16447,7 @@ function Lx({
|
|
|
16447
16447
|
}
|
|
16448
16448
|
),
|
|
16449
16449
|
dt && Object.values(dt.comparison).some(
|
|
16450
|
-
(
|
|
16450
|
+
(J) => J.offered && J.replaces === "transform"
|
|
16451
16451
|
) && /* @__PURE__ */ e("p", { className: "text-[11px] leading-4 text-muted-foreground", children: "A comparison replaces this metric's transform." }),
|
|
16452
16452
|
et && et.kind !== "target" && pt.dateWindow === "none" && /* @__PURE__ */ n("p", { className: "text-[11px] leading-4 text-muted-foreground", children: [
|
|
16453
16453
|
"Shows only while a date range applies to",
|
|
@@ -16467,8 +16467,8 @@ function Lx({
|
|
|
16467
16467
|
min: 1,
|
|
16468
16468
|
step: 1,
|
|
16469
16469
|
value: et.kind === "previous_year" ? et.offsetYears || 1 : et.offsetPeriods || 1,
|
|
16470
|
-
onChange: (
|
|
16471
|
-
const ye = Number(
|
|
16470
|
+
onChange: (J) => {
|
|
16471
|
+
const ye = Number(J.target.value);
|
|
16472
16472
|
!Number.isSafeInteger(ye) || ye <= 0 || (et.kind === "previous_year" ? K(
|
|
16473
16473
|
r,
|
|
16474
16474
|
{
|
|
@@ -16495,11 +16495,11 @@ function Lx({
|
|
|
16495
16495
|
W,
|
|
16496
16496
|
{
|
|
16497
16497
|
value: et.alignment || "calendar",
|
|
16498
|
-
onValueChange: (
|
|
16498
|
+
onValueChange: (J) => K(
|
|
16499
16499
|
r,
|
|
16500
16500
|
{
|
|
16501
16501
|
...et,
|
|
16502
|
-
alignment:
|
|
16502
|
+
alignment: J === "calendar" ? void 0 : J
|
|
16503
16503
|
},
|
|
16504
16504
|
pt
|
|
16505
16505
|
),
|
|
@@ -16523,11 +16523,11 @@ function Lx({
|
|
|
16523
16523
|
{
|
|
16524
16524
|
size: "xs",
|
|
16525
16525
|
checked: et.toDate === !0,
|
|
16526
|
-
onCheckedChange: (
|
|
16526
|
+
onCheckedChange: (J) => K(
|
|
16527
16527
|
r,
|
|
16528
16528
|
{
|
|
16529
16529
|
...et,
|
|
16530
|
-
toDate:
|
|
16530
|
+
toDate: J ? !0 : void 0
|
|
16531
16531
|
},
|
|
16532
16532
|
pt
|
|
16533
16533
|
)
|
|
@@ -16537,7 +16537,7 @@ function Lx({
|
|
|
16537
16537
|
/* @__PURE__ */ n("p", { className: "text-[11px] leading-4 text-muted-foreground", children: [
|
|
16538
16538
|
"Anchored to",
|
|
16539
16539
|
" ",
|
|
16540
|
-
/* @__PURE__ */ e("span", { className: "text-foreground", children: (
|
|
16540
|
+
/* @__PURE__ */ e("span", { className: "text-foreground", children: (Fe = pt.comparisonDate) == null ? void 0 : Fe.label }),
|
|
16541
16541
|
". The resolved comparison dates appear after the card runs."
|
|
16542
16542
|
] })
|
|
16543
16543
|
] }),
|
|
@@ -16548,9 +16548,9 @@ function Lx({
|
|
|
16548
16548
|
{
|
|
16549
16549
|
value: kh(We),
|
|
16550
16550
|
disabled: !!We.semanticComparisonPolarity,
|
|
16551
|
-
onValueChange: (
|
|
16551
|
+
onValueChange: (J) => le(
|
|
16552
16552
|
r,
|
|
16553
|
-
|
|
16553
|
+
J
|
|
16554
16554
|
),
|
|
16555
16555
|
children: [
|
|
16556
16556
|
/* @__PURE__ */ e(X, { className: "h-8 w-full text-xs", children: /* @__PURE__ */ e(Z, {}) }),
|
|
@@ -16571,8 +16571,8 @@ function Lx({
|
|
|
16571
16571
|
{
|
|
16572
16572
|
type: "number",
|
|
16573
16573
|
value: We.comparison.spec.targetValue !== void 0 && We.comparison.spec.targetValue !== null ? String(We.comparison.spec.targetValue) : "",
|
|
16574
|
-
onChange: (
|
|
16575
|
-
const ye =
|
|
16574
|
+
onChange: (J) => {
|
|
16575
|
+
const ye = J.target.value;
|
|
16576
16576
|
if (ye === "") {
|
|
16577
16577
|
Te(
|
|
16578
16578
|
r,
|
|
@@ -16581,10 +16581,10 @@ function Lx({
|
|
|
16581
16581
|
);
|
|
16582
16582
|
return;
|
|
16583
16583
|
}
|
|
16584
|
-
const
|
|
16584
|
+
const Je = Number(ye);
|
|
16585
16585
|
Te(
|
|
16586
16586
|
r,
|
|
16587
|
-
Number.isFinite(
|
|
16587
|
+
Number.isFinite(Je) ? Je : void 0,
|
|
16588
16588
|
pt
|
|
16589
16589
|
);
|
|
16590
16590
|
},
|
|
@@ -16595,21 +16595,21 @@ function Lx({
|
|
|
16595
16595
|
] }),
|
|
16596
16596
|
/* @__PURE__ */ n("div", { className: "space-y-1", children: [
|
|
16597
16597
|
/* @__PURE__ */ e(O, { className: "text-xs font-medium text-muted-foreground", children: "Attribute Filters" }),
|
|
16598
|
-
(Ze == null ? void 0 : Ze.conditions) && Ze.conditions.length > 0 && /* @__PURE__ */ e("div", { className: "mb-2 space-y-1", children: Ze.conditions.map((
|
|
16598
|
+
(Ze == null ? void 0 : Ze.conditions) && Ze.conditions.length > 0 && /* @__PURE__ */ e("div", { className: "mb-2 space-y-1", children: Ze.conditions.map((J) => /* @__PURE__ */ n(
|
|
16599
16599
|
"div",
|
|
16600
16600
|
{
|
|
16601
16601
|
className: "flex cursor-pointer items-center gap-2 rounded bg-muted/50 p-2 text-xs transition-colors hover:bg-muted/70",
|
|
16602
16602
|
onClick: () => {
|
|
16603
|
-
ot(
|
|
16603
|
+
ot(J), Ue(!0);
|
|
16604
16604
|
},
|
|
16605
16605
|
children: [
|
|
16606
16606
|
/* @__PURE__ */ n("span", { className: "font-medium", children: [
|
|
16607
|
-
|
|
16607
|
+
J.field.label,
|
|
16608
16608
|
":"
|
|
16609
16609
|
] }),
|
|
16610
16610
|
/* @__PURE__ */ e(bt, { children: /* @__PURE__ */ n(mt, { children: [
|
|
16611
|
-
/* @__PURE__ */ e(ht, { asChild: !0, children: /* @__PURE__ */ e("span", { className: "cursor-help text-muted-foreground", children: Array.isArray(
|
|
16612
|
-
Array.isArray(
|
|
16611
|
+
/* @__PURE__ */ e(ht, { asChild: !0, children: /* @__PURE__ */ e("span", { className: "cursor-help text-muted-foreground", children: Array.isArray(J.value) ? J.value.length === 1 ? String(J.value[0]) : J.value.length <= 2 ? J.value.join(", ") : `${J.value.slice(0, 2).join(", ")} +${J.value.length - 2}` : String(J.value) }) }),
|
|
16612
|
+
Array.isArray(J.value) && J.value.length > 1 && /* @__PURE__ */ e(
|
|
16613
16613
|
ut,
|
|
16614
16614
|
{
|
|
16615
16615
|
side: "top",
|
|
@@ -16617,10 +16617,10 @@ function Lx({
|
|
|
16617
16617
|
children: /* @__PURE__ */ n("div", { className: "text-xs", children: [
|
|
16618
16618
|
/* @__PURE__ */ n("div", { className: "mb-1 font-medium", children: [
|
|
16619
16619
|
"Selected values (",
|
|
16620
|
-
|
|
16620
|
+
J.value.length,
|
|
16621
16621
|
"):"
|
|
16622
16622
|
] }),
|
|
16623
|
-
/* @__PURE__ */ e("div", { className: "max-h-[200px] overflow-y-auto", children:
|
|
16623
|
+
/* @__PURE__ */ e("div", { className: "max-h-[200px] overflow-y-auto", children: J.value.map((ye, Je) => /* @__PURE__ */ e("div", { children: String(ye) }, Je)) })
|
|
16624
16624
|
] })
|
|
16625
16625
|
}
|
|
16626
16626
|
)
|
|
@@ -16634,13 +16634,13 @@ function Lx({
|
|
|
16634
16634
|
onClick: (ye) => {
|
|
16635
16635
|
var tt;
|
|
16636
16636
|
ye.stopPropagation();
|
|
16637
|
-
const
|
|
16638
|
-
(Ot) => Ot.id !==
|
|
16637
|
+
const Je = Ze.conditions.filter(
|
|
16638
|
+
(Ot) => Ot.id !== J.id
|
|
16639
16639
|
);
|
|
16640
|
-
if (
|
|
16640
|
+
if (Je.length > 0) {
|
|
16641
16641
|
const Ot = {
|
|
16642
16642
|
...Ze,
|
|
16643
|
-
conditions:
|
|
16643
|
+
conditions: Je
|
|
16644
16644
|
};
|
|
16645
16645
|
Zr(Ot);
|
|
16646
16646
|
} else if (xn(void 0), a === "metrics") {
|
|
@@ -16653,7 +16653,7 @@ function Lx({
|
|
|
16653
16653
|
}, Mt = [
|
|
16654
16654
|
...((tt = o.config) == null ? void 0 : tt.metricColumns) || []
|
|
16655
16655
|
];
|
|
16656
|
-
Mt[r] = Ot,
|
|
16656
|
+
Mt[r] = Ot, E.getState().actions.updateCardConfig(o.id, {
|
|
16657
16657
|
metricColumns: Mt
|
|
16658
16658
|
});
|
|
16659
16659
|
}
|
|
@@ -16663,7 +16663,7 @@ function Lx({
|
|
|
16663
16663
|
)
|
|
16664
16664
|
]
|
|
16665
16665
|
},
|
|
16666
|
-
|
|
16666
|
+
J.id
|
|
16667
16667
|
)) }),
|
|
16668
16668
|
/* @__PURE__ */ n(
|
|
16669
16669
|
ne,
|
|
@@ -16681,7 +16681,7 @@ function Lx({
|
|
|
16681
16681
|
}
|
|
16682
16682
|
)
|
|
16683
16683
|
] }),
|
|
16684
|
-
/* @__PURE__ */ e(
|
|
16684
|
+
/* @__PURE__ */ e(Fx, { column: t }),
|
|
16685
16685
|
c && /* @__PURE__ */ n(he, { children: [
|
|
16686
16686
|
/* @__PURE__ */ e(
|
|
16687
16687
|
wx,
|
|
@@ -16756,14 +16756,14 @@ function Lx({
|
|
|
16756
16756
|
if (H)
|
|
16757
16757
|
Zr(H);
|
|
16758
16758
|
else if (xn(void 0), a === "metrics") {
|
|
16759
|
-
const
|
|
16759
|
+
const Fe = {
|
|
16760
16760
|
...t,
|
|
16761
16761
|
parameters: {
|
|
16762
16762
|
...t.parameters,
|
|
16763
16763
|
filters: void 0
|
|
16764
16764
|
}
|
|
16765
16765
|
}, xe = [...((Ne = o.config) == null ? void 0 : Ne.metricColumns) || []];
|
|
16766
|
-
xe[r] =
|
|
16766
|
+
xe[r] = Fe, E.getState().actions.updateCardConfig(o.id, {
|
|
16767
16767
|
metricColumns: xe
|
|
16768
16768
|
});
|
|
16769
16769
|
}
|
|
@@ -16786,25 +16786,25 @@ function Lx({
|
|
|
16786
16786
|
if (H.role !== "metric") return;
|
|
16787
16787
|
const {
|
|
16788
16788
|
card: Ne,
|
|
16789
|
-
frame:
|
|
16789
|
+
frame: Fe,
|
|
16790
16790
|
actions: xe
|
|
16791
|
-
} =
|
|
16791
|
+
} = E.getState(), J = ia === "dashboard" ? C : Fe.calculatedFields || [], {
|
|
16792
16792
|
cardConfigPatch: ye,
|
|
16793
|
-
nextStoredFields:
|
|
16793
|
+
nextStoredFields: Je,
|
|
16794
16794
|
nextSharedFields: tt
|
|
16795
16795
|
} = to({
|
|
16796
16796
|
cardConfig: Ne.config,
|
|
16797
16797
|
storedFields: Ne.calculatedFields || [],
|
|
16798
|
-
sharedFields:
|
|
16798
|
+
sharedFields: J,
|
|
16799
16799
|
updatedField: H,
|
|
16800
16800
|
editingField: _a,
|
|
16801
16801
|
previousScope: ia
|
|
16802
16802
|
});
|
|
16803
16803
|
Object.keys(ye).length && xe.updateCardConfig(o.id, ye), xe.updateCard(o.id, {
|
|
16804
|
-
calculatedFields:
|
|
16805
|
-
}), ia === "dashboard" && tt !==
|
|
16804
|
+
calculatedFields: Je
|
|
16805
|
+
}), ia === "dashboard" && tt !== J ? p(tt) : tt !== J && $a({
|
|
16806
16806
|
nextSharedFields: tt,
|
|
16807
|
-
currentSharedFields:
|
|
16807
|
+
currentSharedFields: J,
|
|
16808
16808
|
isVisualEditing: f,
|
|
16809
16809
|
selectedSheetId: u,
|
|
16810
16810
|
updateFrame: xe.updateFrame,
|
|
@@ -16815,10 +16815,10 @@ function Lx({
|
|
|
16815
16815
|
if (H.role !== "metric") return;
|
|
16816
16816
|
const {
|
|
16817
16817
|
card: Ne,
|
|
16818
|
-
frame:
|
|
16818
|
+
frame: Fe,
|
|
16819
16819
|
actions: xe
|
|
16820
|
-
} =
|
|
16821
|
-
cardConfigPatch:
|
|
16820
|
+
} = E.getState(), J = t, ye = Fe.calculatedFields || [], {
|
|
16821
|
+
cardConfigPatch: Je,
|
|
16822
16822
|
nextStoredFields: tt,
|
|
16823
16823
|
nextSheetFields: Ot,
|
|
16824
16824
|
nextDashboardFields: Mt
|
|
@@ -16829,10 +16829,10 @@ function Lx({
|
|
|
16829
16829
|
dashboardFields: C,
|
|
16830
16830
|
updatedField: {
|
|
16831
16831
|
...H,
|
|
16832
|
-
id:
|
|
16833
|
-
aliasTemplate:
|
|
16834
|
-
valueAliases:
|
|
16835
|
-
parameters:
|
|
16832
|
+
id: J.id,
|
|
16833
|
+
aliasTemplate: J.aliasTemplate,
|
|
16834
|
+
valueAliases: J.valueAliases,
|
|
16835
|
+
parameters: J.parameters
|
|
16836
16836
|
},
|
|
16837
16837
|
editingField: _a,
|
|
16838
16838
|
previousScope: ia
|
|
@@ -16844,7 +16844,7 @@ function Lx({
|
|
|
16844
16844
|
selectedSheetId: u,
|
|
16845
16845
|
updateFrame: xe.updateFrame,
|
|
16846
16846
|
updateSheetCalculatedFields: m
|
|
16847
|
-
}), Mt && Mt !== C && p(Mt), Object.keys(
|
|
16847
|
+
}), Mt && Mt !== C && p(Mt), Object.keys(Je).length && xe.updateCardConfig(o.id, Je), xe.updateCard(o.id, {
|
|
16848
16848
|
calculatedFields: tt
|
|
16849
16849
|
});
|
|
16850
16850
|
},
|
|
@@ -16852,10 +16852,10 @@ function Lx({
|
|
|
16852
16852
|
if (H.role !== "metric") return;
|
|
16853
16853
|
const {
|
|
16854
16854
|
card: Ne,
|
|
16855
|
-
frame:
|
|
16855
|
+
frame: Fe,
|
|
16856
16856
|
actions: xe
|
|
16857
|
-
} =
|
|
16858
|
-
cardConfigPatch:
|
|
16857
|
+
} = E.getState(), J = t, ye = Fe.calculatedFields || [], {
|
|
16858
|
+
cardConfigPatch: Je,
|
|
16859
16859
|
nextStoredFields: tt,
|
|
16860
16860
|
nextSharedFields: Ot,
|
|
16861
16861
|
nextSheetFields: Mt
|
|
@@ -16866,10 +16866,10 @@ function Lx({
|
|
|
16866
16866
|
sheetFields: ye,
|
|
16867
16867
|
updatedField: {
|
|
16868
16868
|
...H,
|
|
16869
|
-
id:
|
|
16870
|
-
aliasTemplate:
|
|
16871
|
-
valueAliases:
|
|
16872
|
-
parameters:
|
|
16869
|
+
id: J.id,
|
|
16870
|
+
aliasTemplate: J.aliasTemplate,
|
|
16871
|
+
valueAliases: J.valueAliases,
|
|
16872
|
+
parameters: J.parameters
|
|
16873
16873
|
},
|
|
16874
16874
|
editingField: _a,
|
|
16875
16875
|
previousScope: ia
|
|
@@ -16881,7 +16881,7 @@ function Lx({
|
|
|
16881
16881
|
selectedSheetId: u,
|
|
16882
16882
|
updateFrame: xe.updateFrame,
|
|
16883
16883
|
updateSheetCalculatedFields: m
|
|
16884
|
-
}), Object.keys(
|
|
16884
|
+
}), Object.keys(Je).length && xe.updateCardConfig(o.id, Je), xe.updateCard(o.id, {
|
|
16885
16885
|
calculatedFields: tt
|
|
16886
16886
|
});
|
|
16887
16887
|
},
|
|
@@ -16970,7 +16970,7 @@ function Bx({
|
|
|
16970
16970
|
["North", "South", "East"].map((c) => /* @__PURE__ */ e(
|
|
16971
16971
|
"th",
|
|
16972
16972
|
{
|
|
16973
|
-
className:
|
|
16973
|
+
className: Q(
|
|
16974
16974
|
"px-1.5 py-1 text-center font-normal text-muted-foreground",
|
|
16975
16975
|
a && l
|
|
16976
16976
|
),
|
|
@@ -16982,14 +16982,14 @@ function Bx({
|
|
|
16982
16982
|
/* @__PURE__ */ e("tbody", { children: il.map((c, d) => /* @__PURE__ */ n(
|
|
16983
16983
|
"tr",
|
|
16984
16984
|
{
|
|
16985
|
-
className:
|
|
16985
|
+
className: Q(
|
|
16986
16986
|
d !== il.length - 1 && "border-b border-border/60"
|
|
16987
16987
|
),
|
|
16988
16988
|
children: [
|
|
16989
16989
|
/* @__PURE__ */ e(
|
|
16990
16990
|
"td",
|
|
16991
16991
|
{
|
|
16992
|
-
className:
|
|
16992
|
+
className: Q(
|
|
16993
16993
|
"px-1.5 py-1 text-left text-muted-foreground",
|
|
16994
16994
|
r && l
|
|
16995
16995
|
),
|
|
@@ -16999,7 +16999,7 @@ function Bx({
|
|
|
16999
16999
|
c.values.map((o, i) => /* @__PURE__ */ e(
|
|
17000
17000
|
"td",
|
|
17001
17001
|
{
|
|
17002
|
-
className:
|
|
17002
|
+
className: Q(
|
|
17003
17003
|
"px-1.5 py-1 text-right font-mono tabular-nums text-muted-foreground",
|
|
17004
17004
|
s && l
|
|
17005
17005
|
),
|
|
@@ -17039,13 +17039,13 @@ function Ta({
|
|
|
17039
17039
|
zone: a,
|
|
17040
17040
|
pillIds: r.map((g) => g.id)
|
|
17041
17041
|
}
|
|
17042
|
-
}), i = Wi(a), { updateSortByColumn: f } = ve(), u =
|
|
17042
|
+
}), i = Wi(a), { updateSortByColumn: f } = ve(), u = E((g) => g.card), m = E((g) => g.card.type), p = r.length > 0, h = i !== null, C = (i == null ? void 0 : i.kind) !== "refused", S = (i == null ? void 0 : i.kind) === "refused" ? lu(i.notice, s) : null, x = xt((g, F) => {
|
|
17043
17043
|
var P;
|
|
17044
17044
|
!((P = u.config) != null && P.sortByColumns) || u.config.sortByColumns.findIndex(
|
|
17045
17045
|
(_) => _.id === g
|
|
17046
|
-
) === -1 || f(u.id, g, { direction:
|
|
17046
|
+
) === -1 || f(u.id, g, { direction: F });
|
|
17047
17047
|
}, [u, f]), v = se(
|
|
17048
|
-
() => /* @__PURE__ */ e("div", { className: "space-y-1", children: r.map((g,
|
|
17048
|
+
() => /* @__PURE__ */ e("div", { className: "space-y-1", children: r.map((g, F) => {
|
|
17049
17049
|
const P = g.direction;
|
|
17050
17050
|
return /* @__PURE__ */ n("div", { className: "relative", children: [
|
|
17051
17051
|
/* @__PURE__ */ e(
|
|
@@ -17053,7 +17053,7 @@ function Ta({
|
|
|
17053
17053
|
{
|
|
17054
17054
|
zone: a,
|
|
17055
17055
|
pillId: g.id,
|
|
17056
|
-
isLast:
|
|
17056
|
+
isLast: F === r.length - 1
|
|
17057
17057
|
}
|
|
17058
17058
|
),
|
|
17059
17059
|
m === "matrixTable" ? /* @__PURE__ */ e(
|
|
@@ -17061,14 +17061,14 @@ function Ta({
|
|
|
17061
17061
|
{
|
|
17062
17062
|
field: g,
|
|
17063
17063
|
zone: a,
|
|
17064
|
-
onRemove: () => t(a,
|
|
17064
|
+
onRemove: () => t(a, F)
|
|
17065
17065
|
}
|
|
17066
17066
|
) : /* @__PURE__ */ e(
|
|
17067
17067
|
Lx,
|
|
17068
17068
|
{
|
|
17069
17069
|
field: g,
|
|
17070
17070
|
zone: a,
|
|
17071
|
-
index:
|
|
17071
|
+
index: F,
|
|
17072
17072
|
sortDirection: P,
|
|
17073
17073
|
onSortDirectionChange: (_) => x(g.id, _),
|
|
17074
17074
|
hasPivotColumns: d,
|
|
@@ -17081,7 +17081,7 @@ function Ta({
|
|
|
17081
17081
|
);
|
|
17082
17082
|
if (a === "sortBy" && c === !1)
|
|
17083
17083
|
return null;
|
|
17084
|
-
const k = a !== "sortBy" && m !== "kpi", N = Kx[a] ||
|
|
17084
|
+
const k = a !== "sortBy" && m !== "kpi", N = Kx[a] || Et;
|
|
17085
17085
|
return /* @__PURE__ */ n("div", { ref: o, className: "w-full", role: "group", "aria-label": s, children: [
|
|
17086
17086
|
/* @__PURE__ */ n("div", { className: "mb-1 flex min-w-0 items-center justify-between gap-2", children: [
|
|
17087
17087
|
/* @__PURE__ */ e(O, { className: "block shrink-0 text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", children: s }),
|
|
@@ -17090,7 +17090,7 @@ function Ta({
|
|
|
17090
17090
|
/* @__PURE__ */ e(
|
|
17091
17091
|
"div",
|
|
17092
17092
|
{
|
|
17093
|
-
className:
|
|
17093
|
+
className: Q(
|
|
17094
17094
|
"rounded-control transition-colors",
|
|
17095
17095
|
// While drop-active we use border/bg feedback; otherwise the
|
|
17096
17096
|
// empty state borrows hairline + dashed and the populated
|
|
@@ -17124,7 +17124,7 @@ function jx({
|
|
|
17124
17124
|
{
|
|
17125
17125
|
"aria-hidden": !0,
|
|
17126
17126
|
"data-shelf-insertion-line": s,
|
|
17127
|
-
className:
|
|
17127
|
+
className: Q(
|
|
17128
17128
|
"pointer-events-none absolute inset-x-0 z-10 flex h-1.5 items-center",
|
|
17129
17129
|
s === "top" ? "-top-[5px]" : "-bottom-[5px]"
|
|
17130
17130
|
),
|
|
@@ -17142,7 +17142,7 @@ function $x({
|
|
|
17142
17142
|
children: r
|
|
17143
17143
|
}) {
|
|
17144
17144
|
var f, u;
|
|
17145
|
-
const { data: s } = nt(t), l = s == null ? void 0 : s.metadata, c =
|
|
17145
|
+
const { data: s } = nt(t), l = s == null ? void 0 : s.metadata, c = Eh(
|
|
17146
17146
|
l == null ? void 0 : l.dateContext,
|
|
17147
17147
|
a ? Th(l == null ? void 0 : l.comparisonMetadata, a) : void 0
|
|
17148
17148
|
), d = s == null ? void 0 : s.records, o = ((f = dh({ renderCard: t, records: d, metadata: l }).trend) == null ? void 0 : f.points.length) ?? 0, i = ((u = t.config) == null ? void 0 : u.kpiBand) === "trend" ? Xh(l == null ? void 0 : l.trend, o) : void 0;
|
|
@@ -17168,8 +17168,8 @@ function Hx({ words: t, trend: a }) {
|
|
|
17168
17168
|
/* @__PURE__ */ e("div", { className: "text-[11px] text-muted-foreground", children: t.field.from })
|
|
17169
17169
|
] }) : /* @__PURE__ */ e("div", { className: "text-muted-foreground", children: "No date" })
|
|
17170
17170
|
] }),
|
|
17171
|
-
t.windows.length > 0 && /* @__PURE__ */ e("div", { className: "space-y-2 border-b border-border/70 px-2.5 py-2", children: t.windows.map((r) => /* @__PURE__ */ n("div", { className:
|
|
17172
|
-
/* @__PURE__ */ e("div", { className:
|
|
17171
|
+
t.windows.length > 0 && /* @__PURE__ */ e("div", { className: "space-y-2 border-b border-border/70 px-2.5 py-2", children: t.windows.map((r) => /* @__PURE__ */ n("div", { className: Q(!r.applied && "opacity-50"), children: [
|
|
17172
|
+
/* @__PURE__ */ e("div", { className: Q("leading-tight", !r.applied && "line-through"), children: r.text }),
|
|
17173
17173
|
/* @__PURE__ */ e("div", { className: "text-[11px] leading-tight text-muted-foreground", children: r.from })
|
|
17174
17174
|
] }, `${r.text}|${r.from}`)) }),
|
|
17175
17175
|
/* @__PURE__ */ n("div", { className: "space-y-2 px-2.5 py-2", children: [
|
|
@@ -17191,7 +17191,7 @@ function Hx({ words: t, trend: a }) {
|
|
|
17191
17191
|
"div",
|
|
17192
17192
|
{
|
|
17193
17193
|
"data-role": "kpi-date-note",
|
|
17194
|
-
className:
|
|
17194
|
+
className: Q(
|
|
17195
17195
|
"flex gap-1.5 border-t px-2.5 py-2 text-[11.5px] leading-snug",
|
|
17196
17196
|
t.note.tone === "warn" ? "border-amber-200 bg-amber-50 text-amber-900 dark:border-amber-900/50 dark:bg-amber-950/30 dark:text-amber-200" : "border-border/70 text-muted-foreground"
|
|
17197
17197
|
),
|
|
@@ -17216,13 +17216,13 @@ function Gx({
|
|
|
17216
17216
|
}) {
|
|
17217
17217
|
var de, z, G;
|
|
17218
17218
|
const [o, i] = U(!1);
|
|
17219
|
-
|
|
17219
|
+
E(
|
|
17220
17220
|
(ae) => {
|
|
17221
17221
|
var ce;
|
|
17222
17222
|
return !!((ce = ae.card.customCardPreferences) != null && ce.url);
|
|
17223
17223
|
}
|
|
17224
17224
|
);
|
|
17225
|
-
const f =
|
|
17225
|
+
const f = E((ae) => ae.card), u = E((ae) => ae.frame), m = la(u, f), { manifest: p } = ta(
|
|
17226
17226
|
((de = m == null ? void 0 : m.customCardPreferences) == null ? void 0 : de.url) || ""
|
|
17227
17227
|
), h = (z = p == null ? void 0 : p.visuals) == null ? void 0 : z.find(
|
|
17228
17228
|
(ae) => {
|
|
@@ -17232,26 +17232,26 @@ function Gx({
|
|
|
17232
17232
|
), C = oa(m, h) === "multiple";
|
|
17233
17233
|
C && ((G = m == null ? void 0 : m.customCardPreferences) != null && G.url);
|
|
17234
17234
|
const S = uh(h == null ? void 0 : h.slots);
|
|
17235
|
-
|
|
17235
|
+
E(
|
|
17236
17236
|
(ae) => ae.actions.updateCardConfig
|
|
17237
17237
|
);
|
|
17238
|
-
const x =
|
|
17238
|
+
const x = E((ae) => ae.actions.updateCard), v = E((ae) => ae.actions.updateFrame), k = ge((ae) => ae.isVisualEditing), N = ge((ae) => ae.selectedSheetId), g = ge(
|
|
17239
17239
|
(ae) => ae.actions.updateSheetCalculatedFields
|
|
17240
|
-
),
|
|
17240
|
+
), F = ge(
|
|
17241
17241
|
(ae) => ae.actions.updateDashboardCalculatedFields
|
|
17242
17242
|
), P = ge(
|
|
17243
17243
|
(ae) => {
|
|
17244
17244
|
var ce;
|
|
17245
17245
|
return ae.visualEditPendingDashboardCalculatedFields ?? ((ce = ae.dashboard) == null ? void 0 : ce.calculatedFields);
|
|
17246
17246
|
}
|
|
17247
|
-
) ?? Ux, { scopedFields: _ } = Hl(), { userContext: w } = sn(), y = C && (m == null ? void 0 : m.id) === f.id && S ? S : f == null ? void 0 : f.type, R = y === "detailTable", V = r.length > 0 || l.length > 0 || d.length > 0, j = !R && (y !== "kpi" || l.length <= 2), L = !R, b = !R && y !== "kpi", Y = y !== "kpi" && y !== "matrixTable" && V, T = R, D = "Drop sort fields here", M =
|
|
17247
|
+
) ?? Ux, { scopedFields: _ } = Hl(), { userContext: w } = sn(), y = C && (m == null ? void 0 : m.id) === f.id && S ? S : f == null ? void 0 : f.type, R = y === "detailTable", V = r.length > 0 || l.length > 0 || d.length > 0, j = !R && (y !== "kpi" || l.length <= 2), L = !R, b = !R && y !== "kpi", Y = y !== "kpi" && y !== "matrixTable" && V, T = R, D = "Drop sort fields here", M = Ql(w), A = [
|
|
17248
17248
|
"pie",
|
|
17249
17249
|
"doughnut",
|
|
17250
17250
|
"polar",
|
|
17251
17251
|
"funnel",
|
|
17252
17252
|
"bubble",
|
|
17253
17253
|
"scatter"
|
|
17254
|
-
].includes(y), B = b && !A, q = y === "kpi" && f.type === "kpi" && !C && !
|
|
17254
|
+
].includes(y), B = b && !A, q = y === "kpi" && f.type === "kpi" && !C && !Fr(f), K = (ae) => y === "kpi" ? {
|
|
17255
17255
|
label: "Trend By",
|
|
17256
17256
|
// The date the KPI counts on while nothing is on Trend By (KD-D6).
|
|
17257
17257
|
placeholder: Ah(ae) ?? "Drop trend field here"
|
|
@@ -17398,29 +17398,29 @@ function Gx({
|
|
|
17398
17398
|
updatedField: ae,
|
|
17399
17399
|
previousScope: "dashboard"
|
|
17400
17400
|
});
|
|
17401
|
-
|
|
17401
|
+
F(ce);
|
|
17402
17402
|
},
|
|
17403
17403
|
cardId: f.id
|
|
17404
17404
|
}
|
|
17405
17405
|
)
|
|
17406
17406
|
] });
|
|
17407
17407
|
}
|
|
17408
|
-
function
|
|
17408
|
+
function Jx() {
|
|
17409
17409
|
var k, N, g;
|
|
17410
|
-
const t =
|
|
17410
|
+
const t = E((F) => {
|
|
17411
17411
|
var I;
|
|
17412
|
-
return (I =
|
|
17413
|
-
}), a = t === "kpi", [r, s] = U(a), [l, c] = U(!1), d =
|
|
17414
|
-
(
|
|
17412
|
+
return (I = F.card) == null ? void 0 : I.type;
|
|
17413
|
+
}), a = t === "kpi", [r, s] = U(a), [l, c] = U(!1), d = E(
|
|
17414
|
+
(F) => {
|
|
17415
17415
|
var I;
|
|
17416
|
-
return !!((I =
|
|
17416
|
+
return !!((I = F.card.customCardPreferences) != null && I.url);
|
|
17417
17417
|
}
|
|
17418
|
-
), o =
|
|
17418
|
+
), o = E((F) => F.card), i = E((F) => F.frame), f = la(i, o), { manifest: u } = ta(
|
|
17419
17419
|
((k = f == null ? void 0 : f.customCardPreferences) == null ? void 0 : k.url) || ""
|
|
17420
17420
|
), m = (N = u == null ? void 0 : u.visuals) == null ? void 0 : N.find(
|
|
17421
|
-
(
|
|
17421
|
+
(F) => {
|
|
17422
17422
|
var I;
|
|
17423
|
-
return
|
|
17423
|
+
return F.name === ((I = f == null ? void 0 : f.customCardPreferences) == null ? void 0 : I.componentName);
|
|
17424
17424
|
}
|
|
17425
17425
|
), h = oa(f, m) === "multiple" && !!((g = f == null ? void 0 : f.customCardPreferences) != null && g.url), C = !d || h, S = d || h, x = a ? "KPI Settings" : "Chart Settings", v = C && !yo(t);
|
|
17426
17426
|
return we(() => {
|
|
@@ -17429,7 +17429,7 @@ function Qx() {
|
|
|
17429
17429
|
v && r && /* @__PURE__ */ e(
|
|
17430
17430
|
"div",
|
|
17431
17431
|
{
|
|
17432
|
-
className:
|
|
17432
|
+
className: Q(
|
|
17433
17433
|
"overflow-y-auto border-b border-border px-4",
|
|
17434
17434
|
a ? "max-h-[72vh]" : "max-h-[50vh]"
|
|
17435
17435
|
),
|
|
@@ -17448,7 +17448,7 @@ function Qx() {
|
|
|
17448
17448
|
"button",
|
|
17449
17449
|
{
|
|
17450
17450
|
type: "button",
|
|
17451
|
-
onClick: () => s((
|
|
17451
|
+
onClick: () => s((F) => !F),
|
|
17452
17452
|
className: "flex w-full items-center justify-between px-4 py-2.5 text-left transition-colors hover:bg-muted/50",
|
|
17453
17453
|
children: [
|
|
17454
17454
|
/* @__PURE__ */ n("span", { className: "inline-flex items-center gap-2", children: [
|
|
@@ -17458,7 +17458,7 @@ function Qx() {
|
|
|
17458
17458
|
/* @__PURE__ */ e(
|
|
17459
17459
|
Vt,
|
|
17460
17460
|
{
|
|
17461
|
-
className:
|
|
17461
|
+
className: Q(
|
|
17462
17462
|
"h-3 w-3 text-muted-foreground transition-transform",
|
|
17463
17463
|
r && "rotate-180"
|
|
17464
17464
|
),
|
|
@@ -17468,13 +17468,13 @@ function Qx() {
|
|
|
17468
17468
|
]
|
|
17469
17469
|
}
|
|
17470
17470
|
),
|
|
17471
|
-
S && l && /* @__PURE__ */ e("div", { className: "max-h-[40vh] overflow-y-auto border-b border-t border-border px-4", children: /* @__PURE__ */ e(
|
|
17471
|
+
S && l && /* @__PURE__ */ e("div", { className: "max-h-[40vh] overflow-y-auto border-b border-t border-border px-4", children: /* @__PURE__ */ e(Jo, {}) }),
|
|
17472
17472
|
S && /* @__PURE__ */ n(
|
|
17473
17473
|
"button",
|
|
17474
17474
|
{
|
|
17475
17475
|
type: "button",
|
|
17476
|
-
onClick: () => c((
|
|
17477
|
-
className:
|
|
17476
|
+
onClick: () => c((F) => !F),
|
|
17477
|
+
className: Q(
|
|
17478
17478
|
"flex w-full items-center justify-between px-4 py-2.5 text-left transition-colors hover:bg-muted/50",
|
|
17479
17479
|
v && "border-t border-border"
|
|
17480
17480
|
),
|
|
@@ -17486,7 +17486,7 @@ function Qx() {
|
|
|
17486
17486
|
/* @__PURE__ */ e(
|
|
17487
17487
|
Vt,
|
|
17488
17488
|
{
|
|
17489
|
-
className:
|
|
17489
|
+
className: Q(
|
|
17490
17490
|
"h-3 w-3 text-muted-foreground transition-transform",
|
|
17491
17491
|
l && "rotate-180"
|
|
17492
17492
|
),
|
|
@@ -17498,8 +17498,8 @@ function Qx() {
|
|
|
17498
17498
|
)
|
|
17499
17499
|
] });
|
|
17500
17500
|
}
|
|
17501
|
-
function
|
|
17502
|
-
const a =
|
|
17501
|
+
function Qx({ onEditJoins: t }) {
|
|
17502
|
+
const a = E((i) => i.card), { autoJoinMetadata: r } = nt(a);
|
|
17503
17503
|
if (!(r != null && r.autoResolved))
|
|
17504
17504
|
return null;
|
|
17505
17505
|
const { resolvedJoinPlan: s } = r, l = (s == null ? void 0 : s.joins) || [];
|
|
@@ -17609,7 +17609,7 @@ function Wx({
|
|
|
17609
17609
|
detailFields: u
|
|
17610
17610
|
}) {
|
|
17611
17611
|
var _;
|
|
17612
|
-
const [m, p] = U(!1), h =
|
|
17612
|
+
const [m, p] = U(!1), h = E((w) => w.card), C = E((w) => w.editorContext), S = E(
|
|
17613
17613
|
(w) => w.actions.updateCardConfig
|
|
17614
17614
|
), x = (C == null ? void 0 : C.type) === "documentSection", { autoJoinMetadata: v } = nt(h), k = Dr(h) || (v != null && v.autoResolved ? v.resolvedJoinPlan : {
|
|
17615
17615
|
baseEntity: {
|
|
@@ -17624,7 +17624,7 @@ function Wx({
|
|
|
17624
17624
|
joins: []
|
|
17625
17625
|
}), N = ((_ = h == null ? void 0 : h.dataSource) == null ? void 0 : _.selectedEntities) || [], g = (w) => {
|
|
17626
17626
|
S(h.id, ga(h, w)), p(!1);
|
|
17627
|
-
},
|
|
17627
|
+
}, F = () => {
|
|
17628
17628
|
S(h.id, ga(h, void 0)), p(!1);
|
|
17629
17629
|
}, I = () => {
|
|
17630
17630
|
p(!1);
|
|
@@ -17657,7 +17657,7 @@ function Wx({
|
|
|
17657
17657
|
) })
|
|
17658
17658
|
] }),
|
|
17659
17659
|
/* @__PURE__ */ n(mn, { className: "min-h-0 w-full flex-1 basis-0 border-t border-border [&>[data-radix-scroll-area-viewport]]:overscroll-none [&>[data-radix-scroll-area-viewport]>div]:!block [&>[data-radix-scroll-area-viewport]>div]:w-full", children: [
|
|
17660
|
-
/* @__PURE__ */ e("div", { className: "px-4 pt-4 empty:hidden", children: /* @__PURE__ */ e(
|
|
17660
|
+
/* @__PURE__ */ e("div", { className: "px-4 pt-4 empty:hidden", children: /* @__PURE__ */ e(Qx, { onEditJoins: P }) }),
|
|
17661
17661
|
/* @__PURE__ */ e(
|
|
17662
17662
|
Gx,
|
|
17663
17663
|
{
|
|
@@ -17671,9 +17671,9 @@ function Wx({
|
|
|
17671
17671
|
}
|
|
17672
17672
|
)
|
|
17673
17673
|
] }),
|
|
17674
|
-
/* @__PURE__ */ e(
|
|
17674
|
+
/* @__PURE__ */ e(Jx, {}),
|
|
17675
17675
|
/* @__PURE__ */ e(
|
|
17676
|
-
|
|
17676
|
+
Fo,
|
|
17677
17677
|
{
|
|
17678
17678
|
open: m,
|
|
17679
17679
|
onOpenChange: p,
|
|
@@ -17681,7 +17681,7 @@ function Wx({
|
|
|
17681
17681
|
availableDataSources: N,
|
|
17682
17682
|
onSave: g,
|
|
17683
17683
|
onCancel: I,
|
|
17684
|
-
onRemove:
|
|
17684
|
+
onRemove: F,
|
|
17685
17685
|
children: /* @__PURE__ */ e("div", {})
|
|
17686
17686
|
}
|
|
17687
17687
|
)
|
|
@@ -17804,7 +17804,7 @@ function eb({
|
|
|
17804
17804
|
splitViewEnabled: r,
|
|
17805
17805
|
hasQueryError: s = !1
|
|
17806
17806
|
}) {
|
|
17807
|
-
const l =
|
|
17807
|
+
const l = E((f) => f.card), { config: c } = dr(gr).tokenProps, d = (c == null ? void 0 : c.showInfoTab) !== !1 && xo(l.type), o = !r && Rr(l.type), i = [
|
|
17808
17808
|
{ id: "chart", label: "Visual" }
|
|
17809
17809
|
];
|
|
17810
17810
|
return o && i.push({ id: "table", label: "Results" }), d && i.push({
|
|
@@ -17820,7 +17820,7 @@ function eb({
|
|
|
17820
17820
|
at,
|
|
17821
17821
|
{
|
|
17822
17822
|
value: f.id,
|
|
17823
|
-
className:
|
|
17823
|
+
className: Q(
|
|
17824
17824
|
"px-0 text-[13px]",
|
|
17825
17825
|
// Override the underline variant's muted/foreground ramp on
|
|
17826
17826
|
// every axis, so the tint holds whether the tab is at rest,
|
|
@@ -17845,7 +17845,7 @@ const tb = [
|
|
|
17845
17845
|
];
|
|
17846
17846
|
function ab() {
|
|
17847
17847
|
var r, s;
|
|
17848
|
-
const t =
|
|
17848
|
+
const t = E((l) => l.card), { updateRowLimit: a } = ve();
|
|
17849
17849
|
return /* @__PURE__ */ n(
|
|
17850
17850
|
W,
|
|
17851
17851
|
{
|
|
@@ -18007,8 +18007,8 @@ function cb({
|
|
|
18007
18007
|
className: t,
|
|
18008
18008
|
visible: a
|
|
18009
18009
|
}) {
|
|
18010
|
-
const r = ge((o) => o.selectedFrameId), s = bu((o) => o.selectedVisual), l =
|
|
18011
|
-
return !a || d ? null : /* @__PURE__ */ e("div", { className:
|
|
18010
|
+
const r = ge((o) => o.selectedFrameId), s = bu((o) => o.selectedVisual), l = E((o) => o.frame), d = !!!(l != null && l.visualId || s != null && s.id) && !!r;
|
|
18011
|
+
return !a || d ? null : /* @__PURE__ */ e("div", { className: Q("flex", t), children: /* @__PURE__ */ e(
|
|
18012
18012
|
bo,
|
|
18013
18013
|
{
|
|
18014
18014
|
showLabel: !0,
|
|
@@ -18029,14 +18029,14 @@ function db({
|
|
|
18029
18029
|
// setActiveCard,
|
|
18030
18030
|
}) {
|
|
18031
18031
|
var He;
|
|
18032
|
-
const l =
|
|
18032
|
+
const l = E((pe) => pe.card), c = E(
|
|
18033
18033
|
(pe) => pe.inlineFilterValuesMap[(s == null ? void 0 : s.id) || ""]
|
|
18034
|
-
), d =
|
|
18034
|
+
), d = E(
|
|
18035
18035
|
(pe) => pe.actions.removeCardInlineFilterValue
|
|
18036
18036
|
), o = ge((pe) => pe.selectedSheetId), { updateCardConfig: i, setCard: f, updateCardInFrame: u } = ve(), [m, p] = U(!1), [h, C] = U(!1), [S, x] = U(
|
|
18037
18037
|
null
|
|
18038
|
-
), { config: v } = dr(gr).tokenProps, k = (v == null ? void 0 : v.showInfoTab) !== !1, N = (v == null ? void 0 : v.showQueryDebugTools) !== !1, [g,
|
|
18039
|
-
|
|
18038
|
+
), { config: v } = dr(gr).tokenProps, k = (v == null ? void 0 : v.showInfoTab) !== !1, N = (v == null ? void 0 : v.showQueryDebugTools) !== !1, [g, F] = lb(), I = Rr(l.type), P = k && xo(l.type), _ = k && !P, w = t === "table" && (g || !I) || t === "info" && !P ? "chart" : t;
|
|
18039
|
+
E(
|
|
18040
18040
|
(pe) => {
|
|
18041
18041
|
var $e;
|
|
18042
18042
|
return !!(($e = pe.card.customCardPreferences) != null && $e.url);
|
|
@@ -18074,7 +18074,7 @@ function db({
|
|
|
18074
18074
|
});
|
|
18075
18075
|
x($e), C(!0);
|
|
18076
18076
|
}, K = () => {
|
|
18077
|
-
const pe =
|
|
18077
|
+
const pe = E.getState().actions;
|
|
18078
18078
|
pe.setIsDevMode(!0), pe.setCardSql(b || ""), setTimeout(() => {
|
|
18079
18079
|
pe.setRunSql(!0);
|
|
18080
18080
|
}, 100);
|
|
@@ -18084,9 +18084,9 @@ function db({
|
|
|
18084
18084
|
), de = se(
|
|
18085
18085
|
() => !L && te.length > 0 ? Object.keys(te[0]) : [],
|
|
18086
18086
|
[L, te]
|
|
18087
|
-
), z = _l(s), G =
|
|
18087
|
+
), z = _l(s), G = E((pe) => pe.frame), [ae, ce] = U(), be = () => {
|
|
18088
18088
|
const pe = !g;
|
|
18089
|
-
pe && w === "table" && a("chart"),
|
|
18089
|
+
pe && w === "table" && a("chart"), F(pe);
|
|
18090
18090
|
}, ue = (pe, $e) => {
|
|
18091
18091
|
const Be = {
|
|
18092
18092
|
...s,
|
|
@@ -18251,7 +18251,7 @@ function db({
|
|
|
18251
18251
|
error: V,
|
|
18252
18252
|
errorSql: b,
|
|
18253
18253
|
onSendFeedback: q,
|
|
18254
|
-
onOpenInEditor:
|
|
18254
|
+
onOpenInEditor: Er(l.type) ? K : void 0
|
|
18255
18255
|
}
|
|
18256
18256
|
) }) : /* @__PURE__ */ e(
|
|
18257
18257
|
ob,
|
|
@@ -18392,19 +18392,19 @@ const hb = () => {
|
|
|
18392
18392
|
function pb() {
|
|
18393
18393
|
const [t, a] = U(
|
|
18394
18394
|
"chart"
|
|
18395
|
-
), [r, s] = U(!1), [l, c] = U(!0), [d, o] = U(!0), i = ge((te) => te.isVisualEditing), f = Br(), u =
|
|
18395
|
+
), [r, s] = U(!1), [l, c] = U(!0), [d, o] = U(!0), i = ge((te) => te.isVisualEditing), f = Br(), u = E((te) => te.card.type);
|
|
18396
18396
|
we(() => hb(), []);
|
|
18397
18397
|
const m = (te) => {
|
|
18398
18398
|
f(te);
|
|
18399
|
-
}, p =
|
|
18400
|
-
|
|
18399
|
+
}, p = E((te) => te.frame), h = E((te) => te.card);
|
|
18400
|
+
E((te) => te.activeTabCardId), E(
|
|
18401
18401
|
(te) => te.actions.getAvailableFields
|
|
18402
18402
|
);
|
|
18403
18403
|
const { addCard: C, removeCard: S, updateCard: x, setActiveCard: v, updateFilters: k, clearFilters: N } = ve(), {
|
|
18404
18404
|
scopedFields: g = [],
|
|
18405
|
-
filterableFields:
|
|
18406
|
-
} =
|
|
18407
|
-
Tu(
|
|
18405
|
+
filterableFields: F = []
|
|
18406
|
+
} = Jl(), I = ku(
|
|
18407
|
+
Tu(Fu, {
|
|
18408
18408
|
activationConstraint: {
|
|
18409
18409
|
distance: 8
|
|
18410
18410
|
}
|
|
@@ -18430,7 +18430,7 @@ function pb() {
|
|
|
18430
18430
|
de && k(te, de);
|
|
18431
18431
|
}, B = (te) => {
|
|
18432
18432
|
N(te);
|
|
18433
|
-
}, q =
|
|
18433
|
+
}, q = F, K = (te) => {
|
|
18434
18434
|
if (!te) return 0;
|
|
18435
18435
|
let de = te.conditions.length;
|
|
18436
18436
|
return te.groups.forEach((z) => {
|
|
@@ -18451,7 +18451,7 @@ function pb() {
|
|
|
18451
18451
|
/* @__PURE__ */ n(Zi.Provider, { value: j, children: [
|
|
18452
18452
|
/* @__PURE__ */ n("div", { className: "flex h-full grow", children: [
|
|
18453
18453
|
/* @__PURE__ */ e(
|
|
18454
|
-
|
|
18454
|
+
Eo,
|
|
18455
18455
|
{
|
|
18456
18456
|
isVisible: l,
|
|
18457
18457
|
onToggleVisibility: () => c(!l)
|
|
@@ -18499,7 +18499,7 @@ function pb() {
|
|
|
18499
18499
|
className: "h-10 w-10 rounded-full border-border bg-background p-0 shadow-lg hover:bg-muted",
|
|
18500
18500
|
onClick: () => c(!0),
|
|
18501
18501
|
title: "Show Data Source Panel",
|
|
18502
|
-
children: /* @__PURE__ */ e(
|
|
18502
|
+
children: /* @__PURE__ */ e(Fa, { className: "h-4 w-4" })
|
|
18503
18503
|
}
|
|
18504
18504
|
) })
|
|
18505
18505
|
] }),
|
|
@@ -18522,7 +18522,7 @@ function pb() {
|
|
|
18522
18522
|
);
|
|
18523
18523
|
}
|
|
18524
18524
|
function fb({ authToken: t, onSave: a, onClose: r }) {
|
|
18525
|
-
const s =
|
|
18525
|
+
const s = E((u) => u.isDevMode), l = xr(), { setAuthToken: c } = Eu(), { setOnSave: d, setOnClose: o } = ve();
|
|
18526
18526
|
we(() => {
|
|
18527
18527
|
a && d(a), r && o(r);
|
|
18528
18528
|
}, [a, d, r, o]), we(() => {
|
|
@@ -18530,7 +18530,7 @@ function fb({ authToken: t, onSave: a, onClose: r }) {
|
|
|
18530
18530
|
}, [t, c]);
|
|
18531
18531
|
function i() {
|
|
18532
18532
|
return /* @__PURE__ */ n(he, { children: [
|
|
18533
|
-
/* @__PURE__ */ e(
|
|
18533
|
+
/* @__PURE__ */ e(Eo, { isVisible: !0, onToggleVisibility: () => {
|
|
18534
18534
|
} }),
|
|
18535
18535
|
/* @__PURE__ */ e("div", { className: "relative flex grow", children: /* @__PURE__ */ e(
|
|
18536
18536
|
"div",
|
|
@@ -18577,7 +18577,7 @@ function Hb() {
|
|
|
18577
18577
|
ge((h) => h.selectedCardId);
|
|
18578
18578
|
const t = ge((h) => h.selectedSheetId), a = ge((h) => h.dashboard), { setIsVisualEditing: r, setSelectedSheetId: s } = ge(
|
|
18579
18579
|
(h) => h.actions
|
|
18580
|
-
), l =
|
|
18580
|
+
), l = E((h) => h.editorContext), { clearEditorContext: c } = E((h) => h.actions), d = Ru(), o = xr(), i = ge((h) => h.isVisualEditing), f = ge((h) => h.actions.updateFrame), u = Pu();
|
|
18581
18581
|
async function m(h) {
|
|
18582
18582
|
var k, N, g;
|
|
18583
18583
|
if ((l == null ? void 0 : l.type) === "documentSection") {
|
|
@@ -18585,28 +18585,28 @@ function Hb() {
|
|
|
18585
18585
|
return;
|
|
18586
18586
|
}
|
|
18587
18587
|
const C = t ? (k = a == null ? void 0 : a.sheets) == null ? void 0 : k.some(
|
|
18588
|
-
(
|
|
18588
|
+
(F) => {
|
|
18589
18589
|
var I;
|
|
18590
|
-
return
|
|
18590
|
+
return F.id === t && ((I = F.frames) == null ? void 0 : I.some((P) => P.id === h.id));
|
|
18591
18591
|
}
|
|
18592
18592
|
) : !1, S = (g = (N = a == null ? void 0 : a.sheets) == null ? void 0 : N.find(
|
|
18593
|
-
(
|
|
18593
|
+
(F) => {
|
|
18594
18594
|
var I;
|
|
18595
|
-
return (I =
|
|
18595
|
+
return (I = F.frames) == null ? void 0 : I.some((P) => P.id === h.id);
|
|
18596
18596
|
}
|
|
18597
18597
|
)) == null ? void 0 : g.id, x = C ? t : S || null;
|
|
18598
18598
|
if (!x) return;
|
|
18599
18599
|
const v = mh(a, h.id);
|
|
18600
18600
|
try {
|
|
18601
|
-
const
|
|
18601
|
+
const F = await u(h, {
|
|
18602
18602
|
previousFrame: v
|
|
18603
18603
|
});
|
|
18604
18604
|
f(x, h, {
|
|
18605
|
-
semanticExecutionPayload:
|
|
18605
|
+
semanticExecutionPayload: F
|
|
18606
18606
|
}), t !== x && s(x), r(!1);
|
|
18607
|
-
} catch (
|
|
18608
|
-
console.error("Failed to resolve semantic metadata on save:",
|
|
18609
|
-
|
|
18607
|
+
} catch (F) {
|
|
18608
|
+
console.error("Failed to resolve semantic metadata on save:", F), ct.error(
|
|
18609
|
+
F instanceof Error ? F.message : "Failed to resolve semantic metadata for this visual"
|
|
18610
18610
|
);
|
|
18611
18611
|
}
|
|
18612
18612
|
}
|
|
@@ -18621,7 +18621,7 @@ function Hb() {
|
|
|
18621
18621
|
"div",
|
|
18622
18622
|
{
|
|
18623
18623
|
role: "editor-container",
|
|
18624
|
-
className:
|
|
18624
|
+
className: Q("flex-1 grow basis-0 overflow-auto", {
|
|
18625
18625
|
"max-h-0 overflow-hidden": !i
|
|
18626
18626
|
}),
|
|
18627
18627
|
style: o.dashboardContainerStyle,
|