react-semaphor 0.1.591 → 0.1.593
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/assistant-context/index.js +1 -1
- package/dist/briefings/index.js +2 -2
- package/dist/chunks/{assistant-chat-Cazikwyh.js → assistant-chat-D05uNAeO.js} +7 -7
- package/dist/chunks/bookmark-impact-B0k90wq8.js +76 -0
- package/dist/chunks/{bookmark-state-Bt_eQEqt.js → bookmark-state-Be2W3s6t.js} +174 -166
- package/dist/chunks/{card-filter-builder-DFR-6Jpm.js → card-filter-builder-CiafWE26.js} +73 -73
- package/dist/chunks/{comparison-window-caption-CFaw-kIV.js → comparison-window-caption-h8w3ySL6.js} +88 -89
- package/dist/chunks/{dashboard-DCh9hKnJ.js → dashboard-T-gYKGTF.js} +1 -1
- package/dist/chunks/{dashboard-briefing-launcher-ob8G1b58.js → dashboard-briefing-launcher-CPh2B3Rf.js} +84 -84
- package/dist/chunks/{dashboard-controls-Nszg0k1A.js → dashboard-controls-Cijc9c3G.js} +9 -9
- package/dist/chunks/{dashboard-json-BpwnG23b.js → dashboard-json-D3m7h4VL.js} +1 -1
- package/dist/chunks/{dates-BOLBSBpn.js → dates-Bb0sn54j.js} +6 -6
- package/dist/chunks/{edit-dashboard-visual-BvM7br5P.js → edit-dashboard-visual-C0iSuX9t.js} +374 -374
- package/dist/chunks/{filter-reach-copy-By3r7O3G.js → filter-reach-copy-CifrEFxj.js} +221 -221
- package/dist/chunks/{filter-value-text-CFiIZWJP.js → filter-value-text-CHBm4IU7.js} +10 -10
- package/dist/chunks/{index-CsQYlwhU.js → index-CzM2w1kY.js} +22 -22
- package/dist/chunks/{pivot-result-contract-expectations-BkMRCjzf.js → pivot-result-contract-expectations-CaS0y823.js} +588 -552
- package/dist/chunks/{report-preferences-dialog-ChXt8wCt.js → report-preferences-dialog-GHvai50w.js} +9 -9
- package/dist/chunks/{resolve-dashboard-input-context-BlyFX8He.js → resolve-dashboard-input-context-BcQHmMlw.js} +7585 -6490
- package/dist/chunks/{saved-dashboard-context-BPSdH2jW.js → saved-dashboard-context-BHHEzmwM.js} +16 -16
- package/dist/chunks/{semaphor-ready-indicator-BZUMCHRU.js → semaphor-ready-indicator-AOUJrUAJ.js} +21334 -21330
- package/dist/chunks/{shelf-drop-preview-context-yJheoeTC.js → shelf-drop-preview-context-Cs62lWI1.js} +2 -2
- package/dist/chunks/stored-dashboard-Cmtl_Obh.js +4029 -0
- package/dist/chunks/{table-export-sheet-h7wm5TwP.js → table-export-sheet-Cd6z7SsG.js} +1 -1
- package/dist/chunks/{variable-draft-OpYyaVCW.js → variable-draft-CSK9Ps1o.js} +2 -2
- package/dist/dashboard/index.js +2 -2
- package/dist/dashboard-authoring/index.js +1097 -1105
- package/dist/format-utils/index.js +215 -216
- package/dist/index.js +56 -56
- package/dist/surfboard/index.js +2 -2
- package/dist/types/components/visual/data-table/hooks/use-data-table-logic.d.ts +3 -3
- package/dist/types/components/visual/data-table/types/data-table.d.ts +24 -2
- package/dist/types/index.js +30 -29
- package/dist/types/lib/dashboard-viewer/table-view-edit.d.ts +27 -0
- package/dist/types/lib/dashboard-viewer/table-view.d.ts +37 -1
- package/dist/types/shared/dashboard-authoring/card-settings/card-kinds.d.ts +1 -1
- package/dist/types/shared/dashboard-authoring/card-settings/column-names.d.ts +3 -0
- package/dist/types/shared/dashboard-authoring/card-settings/inputs.d.ts +6 -0
- package/dist/types/shared/dashboard-authoring/card-settings/resolved.d.ts +11 -0
- package/dist/types/shared/dashboard-viewer/table-column-move.d.ts +56 -0
- package/dist/types/shared/dashboard-viewer/table-settings.d.ts +7 -0
- package/package.json +1 -1
- package/dist/chunks/bookmark-impact-rWjQgk8h.js +0 -75
- package/dist/chunks/pivot-header-presentation-gUxhdIdr.js +0 -42
- package/dist/chunks/stored-dashboard-CxQl9g0l.js +0 -4994
- package/dist/types/components/visual/shared/utils/table-column-order.d.ts +0 -53
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import { jsx as e, jsxs as a, Fragment as me } from "react/jsx-runtime";
|
|
2
2
|
import hl, { useState as G, useEffect as we, useMemo as se, useRef as je, useCallback as xt, useId as Ea, useContext as pr, Suspense as $i } from "react";
|
|
3
|
-
import { F as zi, P as Ui, a as Gi, b as pl, u as lt, S as Ss, c as ks, r as fl, E as Hi, T as Yi, A as Ji, d as Qi, e as Qa, f as Wi, g as Xi, h as Zi } from "./shelf-drop-preview-context-
|
|
3
|
+
import { F as zi, P as Ui, a as Gi, b as pl, u as lt, S as Ss, c as ks, r as fl, E as Hi, T as Yi, A as Ji, d as Qi, e as Qa, f as Wi, g as Xi, h as Zi } from "./shelf-drop-preview-context-Cs62lWI1.js";
|
|
4
4
|
import { c as Q } from "./pickers-DkqmtnTL.js";
|
|
5
5
|
import { a7 as gl, O as ec, x as Ts, m as Wa } from "./validators-BlEWWX9O.js";
|
|
6
6
|
import "./matrix-operation-contract-CAanJeCj.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 { cK as ac, eG as Fa, en as Da, cJ as xl, eq as Pa, eH as Ia, eI as nc, an as ye, eJ as rc, bG as qt, bH as $t, bI as Wt, bJ as zt, bK as Ut, bE as Aa, cM as gt, cH as Kt, cF as za, bF as ct, eK as bl, dB as Ua, b_ as It, c4 as _t, dA as vl, eL as xa, bY as ln, am as I, b4 as nt, eM as yl, eN as sc, eO as lc, eP as oc, c9 as fr, eQ as ic, dm as Nl, b8 as ea, dJ as Cl, ez as wl, eR as cc, cv as gr, 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 xr, u as xe, b2 as ta, eS as Sl, ch as Xa, eT as kl, b3 as In, bz as br, bc as Tl, eU as vr, bO as on, bV as vc, d$ as yc, eV as tr, cS as aa, cT as na, cU as ra, cX as Nc, e1 as yr, eW as Nr, eX as cn, eY as El, ds as Cr, dr as Fl, eZ as Cc, e_ as wc, e$ as Ot, f0 as Sc, f1 as kc, f2 as Tc, f3 as Ec, f4 as Dl, a4 as Il, M as Fc, eg as Dc, f5 as Ic, dy as Ac, f6 as wr, E as dn, e as Sr, f7 as Al, f8 as Mc, f9 as Es, fa as Pc, fb as Ml, fc as Rc, fd as Oc, bZ as Pl, fe as Lc, ff as _c, fg as
|
|
10
|
-
import { c as qe, B as ne, r as so, m as pn, s as O, y as W, z as X, A as Z, D as ee, E as q, F as
|
|
11
|
-
import { U as
|
|
12
|
-
import {
|
|
13
|
-
import { c as xh, A as bh, g as
|
|
9
|
+
import { cK as ac, eG as Fa, en as Da, cJ as xl, eq as Pa, eH as Ia, eI as nc, an as ye, eJ as rc, bG as qt, bH as $t, bI as Wt, bJ as zt, bK as Ut, bE as Aa, cM as gt, cH as Kt, cF as za, bF as ct, eK as bl, dB as Ua, b_ as It, c4 as _t, dA as vl, eL as xa, bY as ln, am as I, b4 as nt, eM as yl, eN as sc, eO as lc, eP as oc, c9 as fr, eQ as ic, dm as Nl, b8 as ea, dJ as Cl, ez as wl, eR as cc, cv as gr, 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 xr, u as xe, b2 as ta, eS as Sl, ch as Xa, eT as kl, b3 as In, bz as br, bc as Tl, eU as vr, bO as on, bV as vc, d$ as yc, eV as tr, cS as aa, cT as na, cU as ra, cX as Nc, e1 as yr, eW as Nr, eX as cn, eY as El, ds as Cr, dr as Fl, eZ as Cc, e_ as wc, e$ as Ot, f0 as Sc, f1 as kc, f2 as Tc, f3 as Ec, f4 as Dl, a4 as Il, M as Fc, eg as Dc, f5 as Ic, dy as Ac, f6 as wr, E as dn, e as Sr, f7 as Al, f8 as Mc, f9 as Es, fa as Pc, fb as Ml, fc as Rc, fd as Oc, bZ as Pl, fe as Lc, ff as _c, fg as Bc, fh as Vc, fi as Za, fj as Kc, fk as jc, fl as Rl, fm as Ol, fn as qc, fo as $c, dY as zc, fp as Uc, fq as Ll, fr as Gc, dv as Hc, du as un, fs as mn, cj as kr, ck as Tr, cl as Er, ft as Yc, fu as Jc, dg as _l, 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 Fs, fA as rd, fB as Bl, fC as Vl, b7 as Kl, 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 Ds, bh as pd, bi as fd, fI as jl, fJ as da, fK as ua, fL as ma, el as fa, co as ql, c6 as Ft, cq as Is, cr as As, cs as ar, fM as $l, fN as gd, fO as xd, fP as bd, fQ as vd, fR as hn, fS as Le, fT as _e, fU as Be, dE as yd, dF as Nd, fV as zl, fW as Ul, fX as Cd, fY as Fr, fZ as Dr, f_ as wd, f$ as Gl, g0 as Sd, g1 as kd, g2 as nr, g3 as Td, g4 as Ed, g5 as Fd, g6 as Dd, g7 as Id, g8 as Ad, g9 as Jt, ga as Na, gb as Ms, gc as Md, gd as An, ge as Ps, gf as Pd, gg as Rd, bA as Ir, bB as Ma, gh as Mn, gi as Hl, gj as Od, gk as Ld, gl as _d, gm as Bd, gn as Yl, go as Jl, gp as Vd, gq as Kd, gr as jd, gs as Ql, gt as qd, gu as $d, gv as Wl, dw as zd, dx as Ud, dG as Gd, dz as Hd, c8 as Yd, gw as Jd, gx as Qd, gy as Wd, d0 as Xd, cY as Xl, gz as Zl, gA as Zd, d5 as eu, gB as eo, gC as tu, gD as au, gE as nu, gF as ru, gG as su, gH as Ar, er as to, gI as ao, gJ as Ga, gK as no, gL as ro, gM as Rs, gN as lu, gO as ou, gP as iu, gQ as cu, dL as du, gR as uu, bj as mu, gS as Os, 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 Eu, g_ as Fu, de as Du, ak as Iu, dK as Au, F as Mu, g$ as Pu, bu as Ru } from "./semaphor-ready-indicator-AOUJrUAJ.js";
|
|
10
|
+
import { c as qe, B as ne, r as so, m as pn, s as O, y as W, z as X, A as Z, D as ee, E as q, F as Bt, X as st, w as ut, t as bt, u as mt, v as ht, e as At, f as Vt, h as Mt, x as Ie, a8 as Ou, L as Ra, C as Xt, T as Gt, k as Ht, l as at, n as wt, j as sa, I as Zt, aa as Lu, ab as _u, q as lo, i as en, ac as rr, ad as oo, d as ke, R as Ls, p as io, ae as Bu, S as _s } from "./style-sheet-parts-DM_Mw_sm.js";
|
|
11
|
+
import { U as Vu } from "./upload-CMTCg47S.js";
|
|
12
|
+
import { iw as Ku, dG as ju, ix as qu, iy as Mr, iz as ga, iA as $u, iB as Bs, iC as zu, iD as Uu, iE as Vs, U as la, cL as co, V as oa, X as Oa, Y as Lt, Z as ha, cr as Gu, bG as Pr, fb as Hu, ir as Yu, gQ as La, j as Ju, bl as Qu, gD as Rr, fY as uo, n as Wu, iF as Xu, iG as Zu, iH as em, iI as tm, gA as jt, hz as am, hy as nm, iJ as rm, iK as mo, ga as sm, d5 as lm, iL as ho, gE as om, dv as im, dt as Pn, iM as cm, iN as dm, iO as um, iP as mm, $ as hm, W as po, a0 as pm, iQ as sr, iR as fm, iS as gm, iT as xm, iU as Or, f_ as bm, eX as Lr, aB as vm, ab as lr, fm as ym, gX as Nm, c6 as fo, c9 as Cm, bq as wm, c8 as or, ca as Ha, b as go, iV as Sm, bp as km, by as Tm, iW as Em, iX as Fm, fp as Dm, iY as Im, fo as xo, iZ as Am, i_ as Mm, i$ as Pm, j0 as Ks, j1 as Rm, j2 as Om, j3 as Lm, gy as Ct, j4 as _m, j5 as Bm, j6 as Vm, j7 as Km, j8 as jm, j9 as qm, ja as js, jb as qs, jc as $m, a as bo, ao as zm, bZ as Um, bX as Gm, jd as Hm, je as Ym, jf as Jm, jg as Qm, eO as Wm, eR as Xm, aA as Zm, eN as Rn, eM as eh, eP as $s, eL as th, hO as ah, bi as nh, jh as rh, ji as zs, bg as sh, fy as lh, fE as oh, ad as ih, g$ as ch, jj as vo, hQ as dh, cb as uh, c1 as mh, jk as hh, fc as ph, jl as fh, jm as yo, jn as _r, e as tn, gC as gh } from "./resolve-dashboard-input-context-BcQHmMlw.js";
|
|
13
|
+
import { c as xh, A as bh, g as Br, i as vh, a as yh, F as Nh, V as No, I as rt, d as Ch, u as wh, C as Sh, b as kh } from "./card-filter-builder-CiafWE26.js";
|
|
14
14
|
import "zod";
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
15
|
+
import { aQ as Th, aP as fn, aM as Vr, j as Eh, W as Fh, aI as Co } from "./pivot-result-contract-expectations-CaS0y823.js";
|
|
16
|
+
import { aJ as Dh, aK as Ih, A as Ah } from "./bookmark-state-Be2W3s6t.js";
|
|
17
17
|
import "./schema-C9NPiIru.js";
|
|
18
18
|
import { i as wo } from "./index-CV_Kzou0.js";
|
|
19
19
|
import "./context-CVXTFljo.js";
|
|
20
|
-
import { N as Kr, a4 as Mh, a5 as So, a6 as ko, a7 as jr, a8 as qr, a3 as Ya, a9 as Ph, K as Rh, L as Oh, O as Lh } from "./filter-reach-copy-
|
|
21
|
-
import {
|
|
20
|
+
import { N as Kr, a4 as Mh, a5 as So, a6 as ko, a7 as jr, a8 as qr, a3 as Ya, a9 as Ph, K as Rh, L as Oh, O as Lh } from "./filter-reach-copy-CifrEFxj.js";
|
|
21
|
+
import { B as _h, T as Bh, e as Vh, U as Kh, O as To, V as jh, P as Eo, W as qh, M as $h, n as zh, X as Uh, Y as Gh, Z as Hh, y as Yh } from "./stored-dashboard-Cmtl_Obh.js";
|
|
22
22
|
import "react-dom";
|
|
23
23
|
import { L as Us } from "./list-filter-BeTQxjNy.js";
|
|
24
24
|
import { r as Jh } from "./export-file-format-C-tJsxsf.js";
|
|
@@ -26,7 +26,7 @@ import { u as Qh } from "./appearance-context-BwBp25ZG.js";
|
|
|
26
26
|
import { P as Wh } from "./paintbrush-KeaU1L1a.js";
|
|
27
27
|
import { D as Xh } from "./metric-comparison-BeKnUD08.js";
|
|
28
28
|
import { P as Zh } from "./palette-BcFJLeXB.js";
|
|
29
|
-
import { K as ep, r as tp, d as ap } from "./dates-
|
|
29
|
+
import { K as ep, r as tp, d as ap } from "./dates-Bb0sn54j.js";
|
|
30
30
|
import "./attribution-BvoKvhcj.js";
|
|
31
31
|
/**
|
|
32
32
|
* @license lucide-react v0.453.0 - ISC
|
|
@@ -344,7 +344,7 @@ function bp(t, n = {}) {
|
|
|
344
344
|
case "dataset":
|
|
345
345
|
return /* @__PURE__ */ e(Da, { className: s });
|
|
346
346
|
case "upload":
|
|
347
|
-
return /* @__PURE__ */ e(
|
|
347
|
+
return /* @__PURE__ */ e(Vu, { className: s });
|
|
348
348
|
case "url":
|
|
349
349
|
return /* @__PURE__ */ e(Fa, { className: s });
|
|
350
350
|
default:
|
|
@@ -482,7 +482,7 @@ function yp({
|
|
|
482
482
|
const [r, s] = G(
|
|
483
483
|
() => Ku(t, n)
|
|
484
484
|
), [l, c] = G(/* @__PURE__ */ new Set()), d = () => {
|
|
485
|
-
const A = r.joins.length > 0 ? Math.max(...r.joins.map((
|
|
485
|
+
const A = r.joins.length > 0 ? Math.max(...r.joins.map((B) => B.sequence)) + 1 : 1, M = {
|
|
486
486
|
autoResolved: !1,
|
|
487
487
|
id: `join-${Date.now()}`,
|
|
488
488
|
source: {
|
|
@@ -518,10 +518,10 @@ function yp({
|
|
|
518
518
|
}), c(new Set([...l].filter((M) => M !== A)));
|
|
519
519
|
}, i = (A, M) => {
|
|
520
520
|
var z, L, b, _, T;
|
|
521
|
-
const
|
|
522
|
-
if (!
|
|
521
|
+
const B = r.joins.find((F) => F.id === A);
|
|
522
|
+
if (!B) return;
|
|
523
523
|
const w = !!(M.source || M.target || M.joinKeyGroups), N = {
|
|
524
|
-
...
|
|
524
|
+
...B,
|
|
525
525
|
...w ? {
|
|
526
526
|
relationshipId: void 0,
|
|
527
527
|
relationshipName: void 0,
|
|
@@ -549,7 +549,7 @@ function yp({
|
|
|
549
549
|
});
|
|
550
550
|
return;
|
|
551
551
|
}
|
|
552
|
-
const
|
|
552
|
+
const V = r.joins.map(
|
|
553
553
|
(F) => F.id === A ? N : F
|
|
554
554
|
);
|
|
555
555
|
if ((_ = N.source) != null && _.name && ((T = N.target) != null && T.name) && N.joinKeyGroups[0].keys.length === 0) {
|
|
@@ -590,11 +590,11 @@ function yp({
|
|
|
590
590
|
K[0] = {
|
|
591
591
|
...K[0],
|
|
592
592
|
keys: [P]
|
|
593
|
-
}, N.joinKeyGroups = K,
|
|
593
|
+
}, N.joinKeyGroups = K, V[V.findIndex(($) => $.id === A)] = N;
|
|
594
594
|
}
|
|
595
595
|
s({
|
|
596
596
|
...r,
|
|
597
|
-
joins:
|
|
597
|
+
joins: V
|
|
598
598
|
});
|
|
599
599
|
};
|
|
600
600
|
return {
|
|
@@ -605,29 +605,29 @@ function yp({
|
|
|
605
605
|
removeJoin: o,
|
|
606
606
|
updateJoin: i,
|
|
607
607
|
moveJoinUp: (A) => {
|
|
608
|
-
const M = r.joins.findIndex((
|
|
608
|
+
const M = r.joins.findIndex((B) => B.id === A);
|
|
609
609
|
if (M > 0) {
|
|
610
|
-
const
|
|
611
|
-
|
|
612
|
-
|
|
610
|
+
const B = [...r.joins], w = { ...B[M] }, N = { ...B[M - 1] };
|
|
611
|
+
B[M] = N, B[M - 1] = w, B.forEach((V, z) => {
|
|
612
|
+
V.sequence = z + 1;
|
|
613
613
|
});
|
|
614
614
|
const R = {
|
|
615
615
|
...r,
|
|
616
|
-
joins:
|
|
616
|
+
joins: B
|
|
617
617
|
};
|
|
618
618
|
s(R);
|
|
619
619
|
}
|
|
620
620
|
},
|
|
621
621
|
moveJoinDown: (A) => {
|
|
622
|
-
const M = r.joins.findIndex((
|
|
622
|
+
const M = r.joins.findIndex((B) => B.id === A);
|
|
623
623
|
if (M < r.joins.length - 1) {
|
|
624
|
-
const
|
|
625
|
-
|
|
626
|
-
|
|
624
|
+
const B = [...r.joins], w = { ...B[M] }, N = { ...B[M + 1] };
|
|
625
|
+
B[M] = N, B[M + 1] = w, B.forEach((V, z) => {
|
|
626
|
+
V.sequence = z + 1;
|
|
627
627
|
});
|
|
628
628
|
const R = {
|
|
629
629
|
...r,
|
|
630
|
-
joins:
|
|
630
|
+
joins: B
|
|
631
631
|
};
|
|
632
632
|
s(R);
|
|
633
633
|
}
|
|
@@ -645,40 +645,40 @@ function yp({
|
|
|
645
645
|
return n.filter(
|
|
646
646
|
(w) => w.name === r.baseEntity.name
|
|
647
647
|
);
|
|
648
|
-
const
|
|
649
|
-
return r.baseEntity.name &&
|
|
650
|
-
|
|
651
|
-
}), n.filter((w) =>
|
|
648
|
+
const B = /* @__PURE__ */ new Set();
|
|
649
|
+
return r.baseEntity.name && B.add(r.baseEntity.name), r.joins.slice(0, M).forEach((w) => {
|
|
650
|
+
B.add(w.source.name), B.add(w.target.name);
|
|
651
|
+
}), n.filter((w) => B.has(w.name));
|
|
652
652
|
},
|
|
653
653
|
getAvailableTargetEntities: (A) => n.filter((M) => M.name !== A),
|
|
654
654
|
addJoinKeyGroup: (A) => {
|
|
655
655
|
const M = r.joins.find((w) => w.id === A);
|
|
656
656
|
if (!M) return;
|
|
657
|
-
const
|
|
658
|
-
i(A, { joinKeyGroups:
|
|
657
|
+
const B = [...M.joinKeyGroups, Gs()];
|
|
658
|
+
i(A, { joinKeyGroups: B });
|
|
659
659
|
},
|
|
660
|
-
updateGroupOperator: (A, M,
|
|
660
|
+
updateGroupOperator: (A, M, B) => {
|
|
661
661
|
const w = r.joins.find((R) => R.id === A);
|
|
662
662
|
if (!w) return;
|
|
663
663
|
const N = [...w.joinKeyGroups];
|
|
664
|
-
N[M] = { ...N[M], operator:
|
|
664
|
+
N[M] = { ...N[M], operator: B }, i(A, { joinKeyGroups: N });
|
|
665
665
|
},
|
|
666
666
|
removeJoinKeyGroup: (A, M) => {
|
|
667
|
-
const
|
|
668
|
-
if (!
|
|
669
|
-
const w = [...
|
|
667
|
+
const B = r.joins.find((N) => N.id === A);
|
|
668
|
+
if (!B) return;
|
|
669
|
+
const w = [...B.joinKeyGroups];
|
|
670
670
|
w.splice(M, 1), i(A, { joinKeyGroups: w });
|
|
671
671
|
},
|
|
672
672
|
addJoinKey: (A, M) => {
|
|
673
|
-
const
|
|
674
|
-
if (!
|
|
673
|
+
const B = r.joins.find((z) => z.id === A);
|
|
674
|
+
if (!B) return;
|
|
675
675
|
const w = n.find(
|
|
676
|
-
(z) => z.name ===
|
|
676
|
+
(z) => z.name === B.source.name
|
|
677
677
|
), N = n.find(
|
|
678
|
-
(z) => z.name ===
|
|
679
|
-
), R = [...
|
|
678
|
+
(z) => z.name === B.target.name
|
|
679
|
+
), R = [...B.joinKeyGroups];
|
|
680
680
|
R[M] || (R[M] = Gs());
|
|
681
|
-
const
|
|
681
|
+
const V = {
|
|
682
682
|
id: `key-${Date.now()}`,
|
|
683
683
|
source: {
|
|
684
684
|
id: `source-${Date.now()}`,
|
|
@@ -704,39 +704,39 @@ function yp({
|
|
|
704
704
|
};
|
|
705
705
|
R[M] = {
|
|
706
706
|
...R[M],
|
|
707
|
-
keys: [...R[M].keys,
|
|
707
|
+
keys: [...R[M].keys, V]
|
|
708
708
|
}, i(A, { joinKeyGroups: R });
|
|
709
709
|
},
|
|
710
|
-
updateJoinKey: (A, M,
|
|
710
|
+
updateJoinKey: (A, M, B, w, N) => {
|
|
711
711
|
const R = r.joins.find((_) => _.id === A);
|
|
712
712
|
if (!R) return;
|
|
713
|
-
const
|
|
713
|
+
const V = n.find(
|
|
714
714
|
(_) => _.name === R.source.name
|
|
715
715
|
), z = n.find(
|
|
716
716
|
(_) => _.name === R.target.name
|
|
717
|
-
), L = [...R.joinKeyGroups], b = L[M].keys[
|
|
718
|
-
w === "sourceColumnName" &&
|
|
717
|
+
), L = [...R.joinKeyGroups], b = L[M].keys[B];
|
|
718
|
+
w === "sourceColumnName" && V ? L[M].keys[B] = {
|
|
719
719
|
...b,
|
|
720
720
|
source: {
|
|
721
721
|
...b.source,
|
|
722
722
|
name: N
|
|
723
723
|
}
|
|
724
|
-
} : w === "targetColumnName" && z ? L[M].keys[
|
|
724
|
+
} : w === "targetColumnName" && z ? L[M].keys[B] = {
|
|
725
725
|
...b,
|
|
726
726
|
target: {
|
|
727
727
|
...b.target,
|
|
728
728
|
name: N
|
|
729
729
|
}
|
|
730
|
-
} : w === "operator" && (L[M].keys[
|
|
730
|
+
} : w === "operator" && (L[M].keys[B] = {
|
|
731
731
|
...b,
|
|
732
732
|
operator: N
|
|
733
733
|
}), i(A, { joinKeyGroups: L });
|
|
734
734
|
},
|
|
735
|
-
removeJoinKey: (A, M,
|
|
735
|
+
removeJoinKey: (A, M, B) => {
|
|
736
736
|
const w = r.joins.find((R) => R.id === A);
|
|
737
737
|
if (!w) return;
|
|
738
738
|
const N = [...w.joinKeyGroups];
|
|
739
|
-
N[M].keys.splice(
|
|
739
|
+
N[M].keys.splice(B, 1), i(A, { joinKeyGroups: N });
|
|
740
740
|
},
|
|
741
741
|
generateSQLPreview: () => {
|
|
742
742
|
const A = [...r.joins].sort(
|
|
@@ -744,7 +744,7 @@ function yp({
|
|
|
744
744
|
), M = r.baseEntity;
|
|
745
745
|
if (!M.name)
|
|
746
746
|
return "SELECT * FROM table -- Please select a base entity";
|
|
747
|
-
let
|
|
747
|
+
let B = `SELECT *
|
|
748
748
|
FROM ${M.name}`;
|
|
749
749
|
return A.forEach((w) => {
|
|
750
750
|
const N = n.find(
|
|
@@ -761,11 +761,11 @@ FROM ${M.name}`;
|
|
|
761
761
|
(b) => `${b.source.entityName}.${b.source.name} ${b.operator} ${b.target.entityName}.${b.target.name}`
|
|
762
762
|
);
|
|
763
763
|
return L.length > 1 ? `(${L.join(` ${z.operator} `)})` : L[0];
|
|
764
|
-
}).filter(Boolean),
|
|
765
|
-
|
|
764
|
+
}).filter(Boolean), V = R.length > 1 ? R.join(" OR ") : R[0] || "condition_here";
|
|
765
|
+
B += `
|
|
766
766
|
${w.joinType} JOIN ${N.name}
|
|
767
|
-
ON ${
|
|
768
|
-
}),
|
|
767
|
+
ON ${V}`;
|
|
768
|
+
}), B;
|
|
769
769
|
},
|
|
770
770
|
isValidConfiguration: () => !(!r.baseEntity.name || r.joins.some(
|
|
771
771
|
(w) => !w.source.name || !w.target.name
|
|
@@ -822,16 +822,16 @@ function kp({
|
|
|
822
822
|
removeJoinKeyGroup: D,
|
|
823
823
|
addJoinKey: A,
|
|
824
824
|
updateJoinKey: M,
|
|
825
|
-
removeJoinKey:
|
|
825
|
+
removeJoinKey: B,
|
|
826
826
|
generateSQLPreview: w,
|
|
827
827
|
isValidConfiguration: N
|
|
828
828
|
} = yp({
|
|
829
829
|
initialJoinPlan: t,
|
|
830
830
|
availableDataSources: n
|
|
831
|
-
}), [R,
|
|
831
|
+
}), [R, V] = G(/* @__PURE__ */ new Set()), [z, L] = G(!1), b = (E) => {
|
|
832
832
|
const P = o.find((K) => K.entityName === E);
|
|
833
833
|
return (P == null ? void 0 : P.columns) || [];
|
|
834
|
-
}, _ = (E) =>
|
|
834
|
+
}, _ = (E) => V((P) => {
|
|
835
835
|
const K = new Set(P);
|
|
836
836
|
return K.has(E) ? K.delete(E) : K.add(E), K;
|
|
837
837
|
}), T = [];
|
|
@@ -956,7 +956,7 @@ function kp({
|
|
|
956
956
|
onClick: () => x(E.id),
|
|
957
957
|
className: "flex min-w-0 flex-1 items-center gap-2 text-left",
|
|
958
958
|
children: [
|
|
959
|
-
$ ? /* @__PURE__ */ e(
|
|
959
|
+
$ ? /* @__PURE__ */ e(Bt, { className: "h-3.5 w-3.5 shrink-0 text-muted-foreground" }) : /* @__PURE__ */ e(_t, { className: "h-3.5 w-3.5 shrink-0 text-muted-foreground" }),
|
|
960
960
|
/* @__PURE__ */ a("span", { className: "flex min-w-0 items-center gap-1.5 text-[12.5px] font-medium text-foreground", children: [
|
|
961
961
|
/* @__PURE__ */ e("span", { className: "truncate", children: E.source.name || "source" }),
|
|
962
962
|
/* @__PURE__ */ e(Ua, { className: "h-3 w-3 shrink-0 text-muted-foreground" }),
|
|
@@ -1156,7 +1156,7 @@ function kp({
|
|
|
1156
1156
|
updateGroupOperator: g,
|
|
1157
1157
|
removeJoinKeyGroup: D,
|
|
1158
1158
|
updateJoinKey: M,
|
|
1159
|
-
removeJoinKey:
|
|
1159
|
+
removeJoinKey: B,
|
|
1160
1160
|
canCollapse: E.joinKeyGroups.length <= 1 && E.joinKeyGroups.every(
|
|
1161
1161
|
(U) => U.operator === "AND"
|
|
1162
1162
|
),
|
|
@@ -1174,7 +1174,7 @@ function kp({
|
|
|
1174
1174
|
conditionKey: U,
|
|
1175
1175
|
getColumnsForEntity: b,
|
|
1176
1176
|
updateJoinKey: M,
|
|
1177
|
-
removeJoinKey:
|
|
1177
|
+
removeJoinKey: B,
|
|
1178
1178
|
showRemove: E.joinKeyGroups[0].keys.length > 1
|
|
1179
1179
|
},
|
|
1180
1180
|
U.id || Y
|
|
@@ -1224,7 +1224,7 @@ function kp({
|
|
|
1224
1224
|
onClick: () => L((E) => !E),
|
|
1225
1225
|
className: "inline-flex items-center gap-1.5 text-[11px] font-medium text-muted-foreground hover:text-foreground",
|
|
1226
1226
|
children: [
|
|
1227
|
-
z ? /* @__PURE__ */ e(
|
|
1227
|
+
z ? /* @__PURE__ */ e(Bt, { className: "h-3 w-3" }) : /* @__PURE__ */ e(_t, { className: "h-3 w-3" }),
|
|
1228
1228
|
"View SQL"
|
|
1229
1229
|
]
|
|
1230
1230
|
}
|
|
@@ -1669,17 +1669,17 @@ FROM ${g.name}`;
|
|
|
1669
1669
|
(N) => N.name === A.target.name
|
|
1670
1670
|
);
|
|
1671
1671
|
if (!M) return;
|
|
1672
|
-
const
|
|
1672
|
+
const B = A.joinKeyGroups.filter((N) => N.keys && N.keys.length > 0).map((N) => {
|
|
1673
1673
|
const R = N.keys.filter(
|
|
1674
|
-
(
|
|
1674
|
+
(V) => {
|
|
1675
1675
|
var z, L, b, _;
|
|
1676
|
-
return ((z =
|
|
1676
|
+
return ((z = V.source) == null ? void 0 : z.name) && ((L = V.target) == null ? void 0 : L.name) && ((b = V.source) == null ? void 0 : b.entityName) && ((_ = V.target) == null ? void 0 : _.entityName);
|
|
1677
1677
|
}
|
|
1678
1678
|
).map(
|
|
1679
|
-
(
|
|
1679
|
+
(V) => `${V.source.entityName}.${V.source.name} ${V.operator} ${V.target.entityName}.${V.target.name}`
|
|
1680
1680
|
);
|
|
1681
1681
|
return R.length > 1 ? `(${R.join(` ${N.operator} `)})` : R[0];
|
|
1682
|
-
}).filter(Boolean), w =
|
|
1682
|
+
}).filter(Boolean), w = B.length > 1 ? B.join(" OR ") : B[0] || "condition_here";
|
|
1683
1683
|
D += `
|
|
1684
1684
|
${A.joinType} JOIN ${M.name}
|
|
1685
1685
|
ON ${w}`;
|
|
@@ -1776,16 +1776,16 @@ function Ap() {
|
|
|
1776
1776
|
dataSourceEntities: x
|
|
1777
1777
|
}),
|
|
1778
1778
|
[k, C, x]
|
|
1779
|
-
), D = y === 0 ? "Choose dataset" : y === 1 ? Mp(x[0], h) : `${y} datasets`, A = Mr(o), M = ((_ = A == null ? void 0 : A.joins) == null ? void 0 : _.length) ?? 0,
|
|
1779
|
+
), D = y === 0 ? "Choose dataset" : y === 1 ? Mp(x[0], h) : `${y} datasets`, A = Mr(o), M = ((_ = A == null ? void 0 : A.joins) == null ? void 0 : _.length) ?? 0, B = Bs(
|
|
1780
1780
|
A,
|
|
1781
1781
|
x
|
|
1782
|
-
), w =
|
|
1782
|
+
), w = B.length > 0, N = !i && (y > 1 || M > 0), R = !!(m != null && m.autoResolved);
|
|
1783
1783
|
((F = (T = m == null ? void 0 : m.resolvedJoinPlan) == null ? void 0 : T.joins) == null ? void 0 : F.length) ?? ((E = m == null ? void 0 : m.relationshipsUsed) == null || E.length);
|
|
1784
|
-
const
|
|
1784
|
+
const V = M > 0 ? `${M} join${M === 1 ? "" : "s"}` : y < 2 ? null : R ? "auto" : null, z = (P) => {
|
|
1785
1785
|
const K = x.filter(
|
|
1786
1786
|
($) => !za($, P)
|
|
1787
1787
|
);
|
|
1788
|
-
o &&
|
|
1788
|
+
o && Bs(A, K).length > 0 && f(o.id, ga(o, void 0)), u({
|
|
1789
1789
|
...S,
|
|
1790
1790
|
...S.mode === "semanticDomain" ? {
|
|
1791
1791
|
semanticDomainId: vh(K)
|
|
@@ -1799,13 +1799,13 @@ function Ap() {
|
|
|
1799
1799
|
...S,
|
|
1800
1800
|
selectedEntities: ic([
|
|
1801
1801
|
...x,
|
|
1802
|
-
...
|
|
1802
|
+
...B
|
|
1803
1803
|
])
|
|
1804
1804
|
});
|
|
1805
1805
|
};
|
|
1806
1806
|
return /* @__PURE__ */ a(me, { children: [
|
|
1807
1807
|
/* @__PURE__ */ a(At, { open: t, onOpenChange: n, children: [
|
|
1808
|
-
/* @__PURE__ */ e(
|
|
1808
|
+
/* @__PURE__ */ e(Vt, { asChild: !0, children: /* @__PURE__ */ a(
|
|
1809
1809
|
"button",
|
|
1810
1810
|
{
|
|
1811
1811
|
type: "button",
|
|
@@ -1819,12 +1819,12 @@ function Ap() {
|
|
|
1819
1819
|
}
|
|
1820
1820
|
),
|
|
1821
1821
|
/* @__PURE__ */ e("span", { className: "min-w-0 flex-1 truncate text-[13px] text-foreground", children: D }),
|
|
1822
|
-
|
|
1822
|
+
V && /* @__PURE__ */ a("span", { className: "shrink-0 text-[11px] text-muted-foreground", children: [
|
|
1823
1823
|
"· ",
|
|
1824
|
-
|
|
1824
|
+
V
|
|
1825
1825
|
] }),
|
|
1826
1826
|
/* @__PURE__ */ e(
|
|
1827
|
-
|
|
1827
|
+
Bt,
|
|
1828
1828
|
{
|
|
1829
1829
|
className: Q(
|
|
1830
1830
|
"h-3 w-3 shrink-0 text-muted-foreground transition-transform",
|
|
@@ -1917,7 +1917,7 @@ function Ap() {
|
|
|
1917
1917
|
" need attention"
|
|
1918
1918
|
] }),
|
|
1919
1919
|
/* @__PURE__ */ a("p", { className: "mt-0.5 leading-relaxed text-amber-900/80 dark:text-amber-100/80", children: [
|
|
1920
|
-
|
|
1920
|
+
B.map((P) => P.name).join(", "),
|
|
1921
1921
|
" ",
|
|
1922
1922
|
"is no longer selected, but the saved join still affects this card."
|
|
1923
1923
|
] })
|
|
@@ -1997,15 +1997,15 @@ function $r(t) {
|
|
|
1997
1997
|
return "label" in t && t.label ? t.label : t.name || "Dataset";
|
|
1998
1998
|
}
|
|
1999
1999
|
function Mp(t, n) {
|
|
2000
|
-
const r = $r(t), s =
|
|
2000
|
+
const r = $r(t), s = Br(t, n);
|
|
2001
2001
|
return s ? `${r} · ${s}` : r;
|
|
2002
2002
|
}
|
|
2003
2003
|
function Pp(t, n) {
|
|
2004
|
-
const r = $r(t), s =
|
|
2004
|
+
const r = $r(t), s = Br(t, n);
|
|
2005
2005
|
return s ? `${r} from ${s}` : r;
|
|
2006
2006
|
}
|
|
2007
2007
|
function Rp(t, n) {
|
|
2008
|
-
const r =
|
|
2008
|
+
const r = Br(t, n);
|
|
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(" · ");
|
|
@@ -2095,10 +2095,10 @@ const Sa = {
|
|
|
2095
2095
|
validation: null,
|
|
2096
2096
|
errorMessage: ""
|
|
2097
2097
|
};
|
|
2098
|
-
function
|
|
2098
|
+
function Bp(t, n) {
|
|
2099
2099
|
return t === dr && n > 0 ? `${dr} ${n}/${Op}` : t;
|
|
2100
2100
|
}
|
|
2101
|
-
async function
|
|
2101
|
+
async function Vp(t, n) {
|
|
2102
2102
|
try {
|
|
2103
2103
|
const r = await t.json();
|
|
2104
2104
|
if (typeof (r == null ? void 0 : r.error) == "string" && r.error.trim())
|
|
@@ -2144,18 +2144,18 @@ function jp({
|
|
|
2144
2144
|
var Se;
|
|
2145
2145
|
return oe.card.connectionId || ((Se = oe.card.dataSource) == null ? void 0 : Se.connectionId) || "";
|
|
2146
2146
|
}
|
|
2147
|
-
), [m, p] = G(""), [h, v] = G("draft"), [S, x] = G(!1), [y, k] = G(!1), [C, g] = G(Sa), [D, A] = G(f), M = je(null),
|
|
2148
|
-
function
|
|
2147
|
+
), [m, p] = G(""), [h, v] = G("draft"), [S, x] = G(!1), [y, k] = G(!1), [C, g] = G(Sa), [D, A] = G(f), M = je(null), B = je(0), w = je(null), N = (yt = i.apiServiceUrl) == null ? void 0 : yt.replace(/\/$/, ""), R = N ? `${N}/v1/sql/draft` : "/v1/sql/draft";
|
|
2148
|
+
function V() {
|
|
2149
2149
|
var oe;
|
|
2150
|
-
|
|
2150
|
+
B.current += 1, (oe = w.current) == null || oe.abort(), w.current = null;
|
|
2151
2151
|
}
|
|
2152
2152
|
we(() => () => {
|
|
2153
2153
|
var oe;
|
|
2154
|
-
|
|
2154
|
+
B.current += 1, (oe = w.current) == null || oe.abort(), w.current = null;
|
|
2155
2155
|
}, [f]), D !== f && (A(f), g((oe) => ({ ...Sa, runId: oe.runId })), p(""), x(!1));
|
|
2156
2156
|
const z = C.status === "running";
|
|
2157
2157
|
function L() {
|
|
2158
|
-
C.status === "running" && (
|
|
2158
|
+
C.status === "running" && (V(), g((oe) => ({
|
|
2159
2159
|
...oe,
|
|
2160
2160
|
status: "idle",
|
|
2161
2161
|
activeStep: "",
|
|
@@ -2168,7 +2168,7 @@ function jp({
|
|
|
2168
2168
|
}));
|
|
2169
2169
|
}
|
|
2170
2170
|
async function b(oe, Se, Ae) {
|
|
2171
|
-
const Fe = () =>
|
|
2171
|
+
const Fe = () => B.current === oe, Pe = (ge) => {
|
|
2172
2172
|
Fe() && g((Me) => Me.runId === oe ? ge(Me) : Me);
|
|
2173
2173
|
}, He = (ge) => Pe((Me) => ({
|
|
2174
2174
|
...Me,
|
|
@@ -2235,7 +2235,7 @@ function jp({
|
|
|
2235
2235
|
if (!Fe()) return;
|
|
2236
2236
|
if (!ge.ok) {
|
|
2237
2237
|
He(
|
|
2238
|
-
await
|
|
2238
|
+
await Vp(ge, Ca)
|
|
2239
2239
|
);
|
|
2240
2240
|
return;
|
|
2241
2241
|
}
|
|
@@ -2254,8 +2254,8 @@ function jp({
|
|
|
2254
2254
|
if (!Se)
|
|
2255
2255
|
return;
|
|
2256
2256
|
const Ae = oe === "refine" && _ ? "refine" : "draft", Fe = Ae === "refine" ? _ : "";
|
|
2257
|
-
|
|
2258
|
-
const Pe =
|
|
2257
|
+
V();
|
|
2258
|
+
const Pe = B.current;
|
|
2259
2259
|
if (x(!1), k(!0), !u) {
|
|
2260
2260
|
g({
|
|
2261
2261
|
...Sa,
|
|
@@ -2299,7 +2299,7 @@ function jp({
|
|
|
2299
2299
|
Se && (l(Se, oe), oe || k(!1));
|
|
2300
2300
|
}
|
|
2301
2301
|
const j = F.length > 0, le = ((ot = C.validation) == null ? void 0 : ot.status) === "invalid", te = j && E.length > 0 && E === m.trim(), de = _.length > 0, U = m.trim().length > 0, Y = !!d && !U && !j && !z, ae = te && P === "draft", ce = te && P === "refine" && K === _, ve = h === "refine" && !de ? "draft" : h, Ce = (ve === "refine" ? ce : ae) ? "Open composer preview" : "Generate composer SQL", Te = m.trim().length > 0 || E.trim().length > 0 || j || C.status !== "idle" || C.timelineSteps.length > 0;
|
|
2302
|
-
function
|
|
2302
|
+
function Ve(oe = "draft") {
|
|
2303
2303
|
if (z)
|
|
2304
2304
|
return;
|
|
2305
2305
|
if ((oe === "refine" ? ce : ae) && !y) {
|
|
@@ -2315,7 +2315,7 @@ function jp({
|
|
|
2315
2315
|
L(), p(oe);
|
|
2316
2316
|
}
|
|
2317
2317
|
function $e() {
|
|
2318
|
-
z || (
|
|
2318
|
+
z || (V(), p(""), v("draft"), x(!1), g({ ...Sa, runId: B.current }));
|
|
2319
2319
|
}
|
|
2320
2320
|
function Ke(oe) {
|
|
2321
2321
|
oe || L(), k(oe);
|
|
@@ -2350,7 +2350,7 @@ function jp({
|
|
|
2350
2350
|
onFocus: Ue,
|
|
2351
2351
|
onClick: Ue,
|
|
2352
2352
|
onKeyDown: (oe) => {
|
|
2353
|
-
oe.key === "Enter" ? (oe.preventDefault(),
|
|
2353
|
+
oe.key === "Enter" ? (oe.preventDefault(), Ve(ve)) : oe.key === "Escape" && Y && (d == null || d());
|
|
2354
2354
|
},
|
|
2355
2355
|
placeholder: "Describe the query you want, or a change to this one…",
|
|
2356
2356
|
"aria-label": "Describe a query",
|
|
@@ -2391,7 +2391,7 @@ function jp({
|
|
|
2391
2391
|
L();
|
|
2392
2392
|
return;
|
|
2393
2393
|
}
|
|
2394
|
-
|
|
2394
|
+
Ve(ve);
|
|
2395
2395
|
},
|
|
2396
2396
|
"aria-label": z ? "Stop AI generation" : Ce,
|
|
2397
2397
|
title: z ? "Stop AI generation" : Ce,
|
|
@@ -2476,7 +2476,7 @@ function jp({
|
|
|
2476
2476
|
"rounded-full border px-2 py-0.5 text-[11px]",
|
|
2477
2477
|
Ae ? "border-foreground/30 bg-foreground/10 text-foreground" : Fe ? "border-border/60 bg-muted/20 text-muted-foreground" : "border-border/50 bg-background text-muted-foreground/80"
|
|
2478
2478
|
].join(" "),
|
|
2479
|
-
children:
|
|
2479
|
+
children: Bp(oe, C.attempt)
|
|
2480
2480
|
},
|
|
2481
2481
|
`${oe}-${Se}`
|
|
2482
2482
|
);
|
|
@@ -2799,7 +2799,7 @@ function Up({
|
|
|
2799
2799
|
}) {
|
|
2800
2800
|
const { popoverProps: n, triggerProps: r, contentProps: s } = Oo();
|
|
2801
2801
|
return /* @__PURE__ */ a(At, { ...n, children: [
|
|
2802
|
-
/* @__PURE__ */ e(
|
|
2802
|
+
/* @__PURE__ */ e(Vt, { asChild: !0, children: /* @__PURE__ */ a(
|
|
2803
2803
|
ne,
|
|
2804
2804
|
{
|
|
2805
2805
|
type: "button",
|
|
@@ -2916,7 +2916,7 @@ function Hp({ value: t }) {
|
|
|
2916
2916
|
function Yp() {
|
|
2917
2917
|
const { popoverProps: t, triggerProps: n, contentProps: r } = Oo();
|
|
2918
2918
|
return /* @__PURE__ */ a(At, { ...t, children: [
|
|
2919
|
-
/* @__PURE__ */ e(
|
|
2919
|
+
/* @__PURE__ */ e(Vt, { asChild: !0, children: /* @__PURE__ */ a(
|
|
2920
2920
|
ne,
|
|
2921
2921
|
{
|
|
2922
2922
|
type: "button",
|
|
@@ -2957,12 +2957,12 @@ function Yp() {
|
|
|
2957
2957
|
/* @__PURE__ */ a("div", { className: "overflow-hidden rounded-[5px] border border-border/60", children: [
|
|
2958
2958
|
/* @__PURE__ */ a("div", { className: "flex items-center justify-between border-b border-border/60 bg-muted/30 px-2 py-0.5", children: [
|
|
2959
2959
|
/* @__PURE__ */ e("span", { className: "text-[11px] text-muted-foreground", children: "Example" }),
|
|
2960
|
-
/* @__PURE__ */ e(Hp, { value:
|
|
2960
|
+
/* @__PURE__ */ e(Hp, { value: Vs })
|
|
2961
2961
|
] }),
|
|
2962
2962
|
/* @__PURE__ */ e("div", { className: "max-h-40 overflow-auto", children: /* @__PURE__ */ e(
|
|
2963
2963
|
Xt,
|
|
2964
2964
|
{
|
|
2965
|
-
value:
|
|
2965
|
+
value: Vs,
|
|
2966
2966
|
language: "python",
|
|
2967
2967
|
readOnly: !0,
|
|
2968
2968
|
embedded: !0,
|
|
@@ -3030,19 +3030,19 @@ function Wp() {
|
|
|
3030
3030
|
setActiveTabCardId: y
|
|
3031
3031
|
} = ye();
|
|
3032
3032
|
function k() {
|
|
3033
|
-
var w, N, R,
|
|
3033
|
+
var w, N, R, V;
|
|
3034
3034
|
const C = n.getQueryData(d);
|
|
3035
3035
|
r != null && r.queryData || t({
|
|
3036
3036
|
queryKey: d,
|
|
3037
3037
|
queryData: C
|
|
3038
3038
|
}), n.setQueryData(d, null), n.removeQueries({ queryKey: d, exact: !0 }), o(""), i({}), p(), h(void 0), f(""), u(""), m({});
|
|
3039
|
-
const g = I.getState().frame, D = I.getState().card, A = la(g, D), M = ((w = A == null ? void 0 : A.customCardPreferences) == null ? void 0 : w.visualType) === "multiple" || !!((N = A == null ? void 0 : A.customCardPreferences) != null && N.dataInputCardIds) || (((R = A == null ? void 0 : A.customCardPreferences) == null ? void 0 : R.minInputs) || 0) > 1 || (((
|
|
3039
|
+
const g = I.getState().frame, D = I.getState().card, A = la(g, D), M = ((w = A == null ? void 0 : A.customCardPreferences) == null ? void 0 : w.visualType) === "multiple" || !!((N = A == null ? void 0 : A.customCardPreferences) != null && N.dataInputCardIds) || (((R = A == null ? void 0 : A.customCardPreferences) == null ? void 0 : R.minInputs) || 0) > 1 || (((V = A == null ? void 0 : A.customCardPreferences) == null ? void 0 : V.maxInputs) || 0) > 1, B = Qp(D, M);
|
|
3040
3040
|
S({
|
|
3041
3041
|
...g,
|
|
3042
3042
|
cards: g.cards.map(
|
|
3043
|
-
(z) => z.id ===
|
|
3043
|
+
(z) => z.id === B.id ? B : z
|
|
3044
3044
|
)
|
|
3045
|
-
}), y(
|
|
3045
|
+
}), y(B.id), x(B), M || v(Kr);
|
|
3046
3046
|
}
|
|
3047
3047
|
return k;
|
|
3048
3048
|
}
|
|
@@ -3070,7 +3070,7 @@ function Xp() {
|
|
|
3070
3070
|
);
|
|
3071
3071
|
const A = I(
|
|
3072
3072
|
(re) => re.selectedSchemaName
|
|
3073
|
-
), M = I((re) => re.selectedTableName),
|
|
3073
|
+
), M = I((re) => re.selectedTableName), B = xe(
|
|
3074
3074
|
(re) => re.dashboard ? co(re.dashboard).length : 0
|
|
3075
3075
|
), w = I(
|
|
3076
3076
|
(re) => re.inlineFilterValuesMap[(S == null ? void 0 : S.id) ?? ""]
|
|
@@ -3079,7 +3079,7 @@ function Xp() {
|
|
|
3079
3079
|
[v, S]
|
|
3080
3080
|
), { manifest: R } = ta(
|
|
3081
3081
|
((Me = N == null ? void 0 : N.customCardPreferences) == null ? void 0 : Me.url) || ""
|
|
3082
|
-
),
|
|
3082
|
+
), V = se(
|
|
3083
3083
|
() => {
|
|
3084
3084
|
var re;
|
|
3085
3085
|
return (re = R == null ? void 0 : R.visuals) == null ? void 0 : re.find(
|
|
@@ -3090,7 +3090,7 @@ function Xp() {
|
|
|
3090
3090
|
);
|
|
3091
3091
|
},
|
|
3092
3092
|
[R, (Qe = N == null ? void 0 : N.customCardPreferences) == null ? void 0 : Qe.componentName]
|
|
3093
|
-
), z = oa(N,
|
|
3093
|
+
), z = oa(N, V), L = se(
|
|
3094
3094
|
() => Oa({
|
|
3095
3095
|
frame: v,
|
|
3096
3096
|
configCard: N,
|
|
@@ -3105,8 +3105,8 @@ function Xp() {
|
|
|
3105
3105
|
}, [L, S]), _ = se(() => !N || z !== "multiple" || b < 0 ? S.type : ha(
|
|
3106
3106
|
S,
|
|
3107
3107
|
b,
|
|
3108
|
-
|
|
3109
|
-
) ?? S.type, [N, z, b, S,
|
|
3108
|
+
V == null ? void 0 : V.slots
|
|
3109
|
+
) ?? S.type, [N, z, b, S, V == null ? void 0 : V.slots]), T = se(() => _ !== S.type ? { ...S, type: _ } : S, [S, _]), F = se(() => B === 0 ? null : Gu(S == null ? void 0 : S.sql), [S == null ? void 0 : S.sql, B]), E = je(!0), {
|
|
3110
3110
|
setCardCustomCfg: P,
|
|
3111
3111
|
setQueryResultColumns: K,
|
|
3112
3112
|
setCardSql: $,
|
|
@@ -3125,7 +3125,7 @@ function Xp() {
|
|
|
3125
3125
|
data: ue,
|
|
3126
3126
|
isLoading: Ce,
|
|
3127
3127
|
isFetching: Te,
|
|
3128
|
-
isSuccess:
|
|
3128
|
+
isSuccess: Ve,
|
|
3129
3129
|
isError: Ue,
|
|
3130
3130
|
error: pe,
|
|
3131
3131
|
errorSql: $e,
|
|
@@ -3150,13 +3150,13 @@ function Xp() {
|
|
|
3150
3150
|
} else
|
|
3151
3151
|
K([]);
|
|
3152
3152
|
}, [S.type, ue, K, yt]), we(() => {
|
|
3153
|
-
(Ce || Te) && (ve(!0), K([])), (Ue ||
|
|
3153
|
+
(Ce || Te) && (ve(!0), K([])), (Ue || Ve) && ve(!1), Ue && K([]);
|
|
3154
3154
|
}, [
|
|
3155
3155
|
Ce,
|
|
3156
3156
|
Te,
|
|
3157
3157
|
ue,
|
|
3158
3158
|
Ue,
|
|
3159
|
-
|
|
3159
|
+
Ve,
|
|
3160
3160
|
ve,
|
|
3161
3161
|
K,
|
|
3162
3162
|
// setQueryError,
|
|
@@ -3445,12 +3445,12 @@ function zr() {
|
|
|
3445
3445
|
[t, n, r]
|
|
3446
3446
|
);
|
|
3447
3447
|
}
|
|
3448
|
-
const
|
|
3448
|
+
const Bn = [
|
|
3449
3449
|
{ value: "table", label: "Table" },
|
|
3450
3450
|
{ value: "detailTable", label: "Detail" }
|
|
3451
3451
|
];
|
|
3452
3452
|
function ef({ className: t }) {
|
|
3453
|
-
const n = I((h) => h.card), r = I((h) => h.frame), s = I((h) => h.editorContext), l = lt(), { setCard: c, updateCardInFrame: d } = ye(), o = (s == null ? void 0 : s.type) === "documentSection" && !!s.lockedKind, i = (s == null ? void 0 : s.type) === "documentSection" ?
|
|
3453
|
+
const n = I((h) => h.card), r = I((h) => h.frame), s = I((h) => h.editorContext), l = lt(), { setCard: c, updateCardInFrame: d } = ye(), o = (s == null ? void 0 : s.type) === "documentSection" && !!s.lockedKind, i = (s == null ? void 0 : s.type) === "documentSection" ? Bn.filter((h) => h.value === "table") : Bn, f = Bn.some(
|
|
3454
3454
|
(h) => h.value === l
|
|
3455
3455
|
), u = La(n.config, n.type), m = Ju(n, r.cards);
|
|
3456
3456
|
if (!f || !u || m || o || i.length < 2)
|
|
@@ -3527,7 +3527,7 @@ function _o({
|
|
|
3527
3527
|
}
|
|
3528
3528
|
);
|
|
3529
3529
|
}
|
|
3530
|
-
function
|
|
3530
|
+
function Bo({
|
|
3531
3531
|
children: t,
|
|
3532
3532
|
className: n
|
|
3533
3533
|
}) {
|
|
@@ -3570,7 +3570,7 @@ function nf(t) {
|
|
|
3570
3570
|
truncationMessage: `First ${qa} of ${n.length} records. Copy includes all.`
|
|
3571
3571
|
};
|
|
3572
3572
|
}
|
|
3573
|
-
function
|
|
3573
|
+
function Vo({
|
|
3574
3574
|
isOpen: t,
|
|
3575
3575
|
onClick: n
|
|
3576
3576
|
}) {
|
|
@@ -3642,7 +3642,7 @@ function Ko({
|
|
|
3642
3642
|
)
|
|
3643
3643
|
}
|
|
3644
3644
|
),
|
|
3645
|
-
/* @__PURE__ */ a(
|
|
3645
|
+
/* @__PURE__ */ a(Bo, { className: "gap-1 pb-1.5", children: [
|
|
3646
3646
|
(f == null ? void 0 : f.truncationMessage) && /* @__PURE__ */ e("span", { className: "mr-1 text-[11px] text-muted-foreground", children: f.truncationMessage }),
|
|
3647
3647
|
/* @__PURE__ */ e(
|
|
3648
3648
|
vr,
|
|
@@ -3853,7 +3853,7 @@ function $o({
|
|
|
3853
3853
|
children: n
|
|
3854
3854
|
}
|
|
3855
3855
|
),
|
|
3856
|
-
/* @__PURE__ */ a(
|
|
3856
|
+
/* @__PURE__ */ a(Bo, { children: [
|
|
3857
3857
|
l,
|
|
3858
3858
|
c
|
|
3859
3859
|
] })
|
|
@@ -3916,7 +3916,7 @@ function zo({
|
|
|
3916
3916
|
}
|
|
3917
3917
|
) : null,
|
|
3918
3918
|
y ? /* @__PURE__ */ e(
|
|
3919
|
-
|
|
3919
|
+
Vo,
|
|
3920
3920
|
{
|
|
3921
3921
|
isOpen: h,
|
|
3922
3922
|
onClick: () => v((M) => !M)
|
|
@@ -4097,7 +4097,7 @@ function Gr({
|
|
|
4097
4097
|
onSuccess: s,
|
|
4098
4098
|
showDebugInfo: l = !1
|
|
4099
4099
|
}) {
|
|
4100
|
-
var D, A, M,
|
|
4100
|
+
var D, A, M, B, w, N;
|
|
4101
4101
|
const [c, d] = G(""), [o, i] = G(!1), {
|
|
4102
4102
|
sendFeedback: f,
|
|
4103
4103
|
isLoading: u,
|
|
@@ -4124,7 +4124,7 @@ function Gr({
|
|
|
4124
4124
|
sql: (A = r.systemState) == null ? void 0 : A.generatedSql,
|
|
4125
4125
|
errorSql: (M = r.systemState) == null ? void 0 : M.errorSql
|
|
4126
4126
|
},
|
|
4127
|
-
cardConfig: (
|
|
4127
|
+
cardConfig: (B = r.systemState) == null ? void 0 : B.cardConfig,
|
|
4128
4128
|
dataSource: (w = r.systemState) == null ? void 0 : w.dataSource,
|
|
4129
4129
|
filters: (N = r.systemState) == null ? void 0 : N.dashboardFilters,
|
|
4130
4130
|
metadata: r.metadata
|
|
@@ -4199,7 +4199,7 @@ function Gr({
|
|
|
4199
4199
|
children: [
|
|
4200
4200
|
/* @__PURE__ */ e("span", { className: "text-[12px] font-medium", children: "View data to be sent" }),
|
|
4201
4201
|
o ? /* @__PURE__ */ e(
|
|
4202
|
-
|
|
4202
|
+
Bt,
|
|
4203
4203
|
{
|
|
4204
4204
|
"aria-hidden": "true",
|
|
4205
4205
|
className: "h-3.5 w-3.5"
|
|
@@ -4393,17 +4393,17 @@ function Ho({
|
|
|
4393
4393
|
) ?? s.type, [v, y, C, s, x == null ? void 0 : x.slots]), D = g ?? s.type, A = se(
|
|
4394
4394
|
() => D === s.type ? s : { ...s, type: D },
|
|
4395
4395
|
[s, D]
|
|
4396
|
-
), M = A.type === "table" || A.type === "matrixTable" || A.type === "detailTable",
|
|
4396
|
+
), M = A.type === "table" || A.type === "matrixTable" || A.type === "detailTable", B = se(() => g !== s.type ? { ...s, type: g } : s, [s, g]), { data: w, isLoading: N, isFetching: R, errorMessage: V, errorSql: z, pagination: L } = nt(B), b = cn(A, w), _ = !!V, { handleOpenInEditor: T } = Uo(
|
|
4397
4397
|
z || s.sql || s.python
|
|
4398
4398
|
), {
|
|
4399
4399
|
feedbackDialogOpen: F,
|
|
4400
4400
|
setFeedbackDialogOpen: E,
|
|
4401
4401
|
handleSendFeedback: P,
|
|
4402
4402
|
feedbackPayload: K
|
|
4403
|
-
} = Go(
|
|
4403
|
+
} = Go(V, z || s.sql || s.python), $ = se(() => (w == null ? void 0 : w.records) || [], [w == null ? void 0 : w.records]), { setCard: j, updateCardInFrame: le } = ye(), te = b.id, de = b.config, U = b.interactionConfig, Y = b.controls, ae = b.controlBindings, ce = b.customCfg, ve = b.preferences, ue = b.queryConfig, Ce = pf({
|
|
4404
4404
|
sql: b.sql,
|
|
4405
4405
|
python: b.python
|
|
4406
|
-
}), Te = Ce.sql,
|
|
4406
|
+
}), Te = Ce.sql, Ve = Ce.python, Ue = w == null ? void 0 : w.records, pe = se(
|
|
4407
4407
|
() => ({
|
|
4408
4408
|
id: te,
|
|
4409
4409
|
type: D,
|
|
@@ -4414,7 +4414,7 @@ function Ho({
|
|
|
4414
4414
|
controlBindings: ae,
|
|
4415
4415
|
// Chart config only needs execution-owner presence here, not raw drafts.
|
|
4416
4416
|
sql: Te,
|
|
4417
|
-
python:
|
|
4417
|
+
python: Ve
|
|
4418
4418
|
}),
|
|
4419
4419
|
[
|
|
4420
4420
|
te,
|
|
@@ -4425,7 +4425,7 @@ function Ho({
|
|
|
4425
4425
|
Y,
|
|
4426
4426
|
ae,
|
|
4427
4427
|
Te,
|
|
4428
|
-
|
|
4428
|
+
Ve
|
|
4429
4429
|
]
|
|
4430
4430
|
), $e = (he, ze) => {
|
|
4431
4431
|
var Me, Qe;
|
|
@@ -4495,10 +4495,10 @@ function Ho({
|
|
|
4495
4495
|
var he;
|
|
4496
4496
|
if (b.type === "matrixTable") return /* @__PURE__ */ e(Fc, { card: b, frame: i, mode: "editor" });
|
|
4497
4497
|
if (w != null && w.records && (w == null ? void 0 : w.records.length) === 0 && !N && !R)
|
|
4498
|
-
return
|
|
4498
|
+
return V ? /* @__PURE__ */ e("div", { className: "flex h-full flex-col items-start justify-start overflow-auto", children: /* @__PURE__ */ e(
|
|
4499
4499
|
Ur,
|
|
4500
4500
|
{
|
|
4501
|
-
error:
|
|
4501
|
+
error: V,
|
|
4502
4502
|
errorSql: z || s.sql || s.python,
|
|
4503
4503
|
onOpenInEditor: T,
|
|
4504
4504
|
onSendFeedback: P,
|
|
@@ -4666,7 +4666,7 @@ function Ws(t) {
|
|
|
4666
4666
|
2
|
|
4667
4667
|
);
|
|
4668
4668
|
}
|
|
4669
|
-
const
|
|
4669
|
+
const Vn = ({
|
|
4670
4670
|
language: t,
|
|
4671
4671
|
value: n,
|
|
4672
4672
|
onChange: r,
|
|
@@ -4714,7 +4714,7 @@ const Bn = ({
|
|
|
4714
4714
|
value: "final-config",
|
|
4715
4715
|
className: "mt-2 grow rounded border",
|
|
4716
4716
|
children: /* @__PURE__ */ e(
|
|
4717
|
-
|
|
4717
|
+
Vn,
|
|
4718
4718
|
{
|
|
4719
4719
|
language: "json",
|
|
4720
4720
|
value: r,
|
|
@@ -4729,7 +4729,7 @@ const Bn = ({
|
|
|
4729
4729
|
value: "custom-config",
|
|
4730
4730
|
className: "mt-2 grow rounded border",
|
|
4731
4731
|
children: /* @__PURE__ */ e(
|
|
4732
|
-
|
|
4732
|
+
Vn,
|
|
4733
4733
|
{
|
|
4734
4734
|
readonly: !0,
|
|
4735
4735
|
language: "json",
|
|
@@ -4746,7 +4746,7 @@ const Bn = ({
|
|
|
4746
4746
|
value: "custom-code",
|
|
4747
4747
|
className: "mt-2 grow rounded border",
|
|
4748
4748
|
children: /* @__PURE__ */ e(
|
|
4749
|
-
|
|
4749
|
+
Vn,
|
|
4750
4750
|
{
|
|
4751
4751
|
language: "javascript",
|
|
4752
4752
|
value: t,
|
|
@@ -4773,7 +4773,7 @@ function bf({
|
|
|
4773
4773
|
label: r = "Customize Visual"
|
|
4774
4774
|
} = {}) {
|
|
4775
4775
|
const [s, l] = G(!1), [c, d] = G(""), [o, i] = G(""), [f, u] = G(""), [m, p] = G(""), h = I((N) => N.card), v = lt(), S = I((N) => N.card.customCfg), x = S ? JSON.stringify(S, null, 2) : "", y = se(() => v !== h.type ? { ...h, type: v } : h, [h, v]), { data: k } = nt(y), C = El(cn(h, k), k == null ? void 0 : k.records), g = Cr(), { setCardCustomCfg: D, setCustomVisualCode: A } = ye(), M = () => {
|
|
4776
|
-
var R,
|
|
4776
|
+
var R, V, z;
|
|
4777
4777
|
if (!((R = k == null ? void 0 : k.records) != null && R.length)) return;
|
|
4778
4778
|
const N = Fl({
|
|
4779
4779
|
chartTheme: g,
|
|
@@ -4783,7 +4783,7 @@ function bf({
|
|
|
4783
4783
|
queryConfig: h.queryConfig,
|
|
4784
4784
|
//cfg: card.cfg,
|
|
4785
4785
|
preferences: h.preferences,
|
|
4786
|
-
comparisonMetadata: (
|
|
4786
|
+
comparisonMetadata: (V = k == null ? void 0 : k.metadata) == null ? void 0 : V.comparisonMetadata,
|
|
4787
4787
|
numericPresentation: C,
|
|
4788
4788
|
resultColumns: k == null ? void 0 : k.columns,
|
|
4789
4789
|
columnKeyMap: k == null ? void 0 : k.columnKeyMap
|
|
@@ -4793,12 +4793,12 @@ function bf({
|
|
|
4793
4793
|
const L = Pc(N, S);
|
|
4794
4794
|
i(Ws(L));
|
|
4795
4795
|
}
|
|
4796
|
-
},
|
|
4796
|
+
}, B = () => {
|
|
4797
4797
|
try {
|
|
4798
4798
|
if (f && A(f), o) {
|
|
4799
4799
|
const N = JSON.parse(
|
|
4800
4800
|
o
|
|
4801
|
-
), R =
|
|
4801
|
+
), R = Bh(
|
|
4802
4802
|
JSON.parse(c),
|
|
4803
4803
|
N
|
|
4804
4804
|
);
|
|
@@ -4859,7 +4859,7 @@ function bf({
|
|
|
4859
4859
|
onReset: () => {
|
|
4860
4860
|
i(c), D(null);
|
|
4861
4861
|
},
|
|
4862
|
-
onApply:
|
|
4862
|
+
onApply: B,
|
|
4863
4863
|
onClose: () => l(!1)
|
|
4864
4864
|
}
|
|
4865
4865
|
)
|
|
@@ -5021,7 +5021,7 @@ function Cf({
|
|
|
5021
5021
|
);
|
|
5022
5022
|
}, [i, s]), M = (T) => {
|
|
5023
5023
|
u(T).status !== "refused" && (n == null || n(T), r == null || r());
|
|
5024
|
-
},
|
|
5024
|
+
}, B = (T) => {
|
|
5025
5025
|
const F = Zu(T);
|
|
5026
5026
|
if (F === "multiple" && T.slots && T.slots.length > 0) {
|
|
5027
5027
|
x(null), m({}), y(void 0), C();
|
|
@@ -5066,8 +5066,8 @@ function Cf({
|
|
|
5066
5066
|
}, [D, A]), N = se(
|
|
5067
5067
|
() => w.flatMap((T) => T.entries),
|
|
5068
5068
|
[w]
|
|
5069
|
-
), R = Math.min(c, Math.max(N.length - 1, 0)),
|
|
5070
|
-
T.kind === "default" ? M(T.id) :
|
|
5069
|
+
), R = Math.min(c, Math.max(N.length - 1, 0)), V = (T) => {
|
|
5070
|
+
T.kind === "default" ? M(T.id) : B(T.visual);
|
|
5071
5071
|
}, z = (T) => {
|
|
5072
5072
|
var E, P;
|
|
5073
5073
|
const F = Math.max(0, Math.min(T, N.length - 1));
|
|
@@ -5080,7 +5080,7 @@ function Cf({
|
|
|
5080
5080
|
else if (T.key === "Enter") {
|
|
5081
5081
|
T.preventDefault();
|
|
5082
5082
|
const E = N[R];
|
|
5083
|
-
E &&
|
|
5083
|
+
E && V(E);
|
|
5084
5084
|
}
|
|
5085
5085
|
};
|
|
5086
5086
|
let b = 0;
|
|
@@ -5120,7 +5120,7 @@ function Cf({
|
|
|
5120
5120
|
chartName: F.name,
|
|
5121
5121
|
isSelected: v === F.id,
|
|
5122
5122
|
isActive: P,
|
|
5123
|
-
onSelect: () =>
|
|
5123
|
+
onSelect: () => V(F),
|
|
5124
5124
|
onHover: () => d(E)
|
|
5125
5125
|
}
|
|
5126
5126
|
) }, F.id);
|
|
@@ -5137,7 +5137,7 @@ function Cf({
|
|
|
5137
5137
|
pluginName: K.pluginName,
|
|
5138
5138
|
isSelected: S === K.name,
|
|
5139
5139
|
isActive: P,
|
|
5140
|
-
onSelect: () =>
|
|
5140
|
+
onSelect: () => V(F),
|
|
5141
5141
|
onHover: () => d(E)
|
|
5142
5142
|
}
|
|
5143
5143
|
)
|
|
@@ -5170,8 +5170,8 @@ const jn = {
|
|
|
5170
5170
|
funnel: jc,
|
|
5171
5171
|
tornado: Kc,
|
|
5172
5172
|
heatmap: Za,
|
|
5173
|
-
range:
|
|
5174
|
-
radar:
|
|
5173
|
+
range: Vc,
|
|
5174
|
+
radar: Bc,
|
|
5175
5175
|
polarArea: _c,
|
|
5176
5176
|
text: Lc
|
|
5177
5177
|
}, qn = {
|
|
@@ -5293,7 +5293,7 @@ function ur({
|
|
|
5293
5293
|
);
|
|
5294
5294
|
}),
|
|
5295
5295
|
/* @__PURE__ */ a(At, { open: l, onOpenChange: c, children: [
|
|
5296
|
-
/* @__PURE__ */ e(
|
|
5296
|
+
/* @__PURE__ */ e(Vt, { asChild: !0, children: /* @__PURE__ */ a(
|
|
5297
5297
|
"button",
|
|
5298
5298
|
{
|
|
5299
5299
|
type: "button",
|
|
@@ -5306,7 +5306,7 @@ function ur({
|
|
|
5306
5306
|
children: [
|
|
5307
5307
|
!r && /* @__PURE__ */ e("span", { className: "truncate", children: p }),
|
|
5308
5308
|
/* @__PURE__ */ e(
|
|
5309
|
-
|
|
5309
|
+
Bt,
|
|
5310
5310
|
{
|
|
5311
5311
|
className: Q(
|
|
5312
5312
|
"h-3 w-3 shrink-0 text-muted-foreground transition-transform",
|
|
@@ -5407,18 +5407,18 @@ function Yr({
|
|
|
5407
5407
|
triggerVariant: n = "icon",
|
|
5408
5408
|
label: r = "Display options"
|
|
5409
5409
|
}) {
|
|
5410
|
-
var x, y, k, C, g, D, A, M,
|
|
5411
|
-
const s = I((N) => N.card), { setCardPreferences: l, updateCardInFrame: c, setCard: d } = ye(), [o, i] = G(!1), f = ((y = (x = s.preferences) == null ? void 0 : x.displayOptions) == null ? void 0 : y.showFilterInfo) ?? !0, u = ((C = (k = s.preferences) == null ? void 0 : k.displayOptions) == null ? void 0 : C.showCardToolbar) ?? !0, m = ((D = (g = s.preferences) == null ? void 0 : g.displayOptions) == null ? void 0 : D.showChrome) ?? !0, p = ((M = (A = s.preferences) == null ? void 0 : A.displayOptions) == null ? void 0 : M.allowScroll) ?? !0, h = ((w = (
|
|
5410
|
+
var x, y, k, C, g, D, A, M, B, w;
|
|
5411
|
+
const s = I((N) => N.card), { setCardPreferences: l, updateCardInFrame: c, setCard: d } = ye(), [o, i] = G(!1), f = ((y = (x = s.preferences) == null ? void 0 : x.displayOptions) == null ? void 0 : y.showFilterInfo) ?? !0, u = ((C = (k = s.preferences) == null ? void 0 : k.displayOptions) == null ? void 0 : C.showCardToolbar) ?? !0, m = ((D = (g = s.preferences) == null ? void 0 : g.displayOptions) == null ? void 0 : D.showChrome) ?? !0, p = ((M = (A = s.preferences) == null ? void 0 : A.displayOptions) == null ? void 0 : M.allowScroll) ?? !0, h = ((w = (B = s.preferences) == null ? void 0 : B.displayOptions) == null ? void 0 : w.showInlineFilterBar) ?? !0, v = (N, R) => {
|
|
5412
5412
|
var L;
|
|
5413
|
-
const
|
|
5413
|
+
const V = {
|
|
5414
5414
|
...s.preferences,
|
|
5415
5415
|
displayOptions: {
|
|
5416
5416
|
...(L = s.preferences) == null ? void 0 : L.displayOptions,
|
|
5417
5417
|
[N]: R
|
|
5418
5418
|
}
|
|
5419
5419
|
};
|
|
5420
|
-
l(
|
|
5421
|
-
const z = { ...s, preferences:
|
|
5420
|
+
l(V);
|
|
5421
|
+
const z = { ...s, preferences: V };
|
|
5422
5422
|
d(z), c(z);
|
|
5423
5423
|
}, S = [
|
|
5424
5424
|
{
|
|
@@ -5499,7 +5499,7 @@ function Jr({
|
|
|
5499
5499
|
), h = Jc(), v = (c == null ? void 0 : c.inlineFilters) || [], S = br() ?? void 0;
|
|
5500
5500
|
function x(D) {
|
|
5501
5501
|
if (v.find(
|
|
5502
|
-
(
|
|
5502
|
+
(B) => tm(B, D)
|
|
5503
5503
|
))
|
|
5504
5504
|
return;
|
|
5505
5505
|
const M = {
|
|
@@ -5524,14 +5524,14 @@ function Jr({
|
|
|
5524
5524
|
}), h ? m(c.id, D) : f(c.id, D);
|
|
5525
5525
|
}
|
|
5526
5526
|
function k(D, A) {
|
|
5527
|
-
const M = v.find((R) => R.id === D),
|
|
5527
|
+
const M = v.find((R) => R.id === D), B = v.map(
|
|
5528
5528
|
(R) => R.id === D ? { ...R, ...A } : R
|
|
5529
5529
|
);
|
|
5530
5530
|
i({
|
|
5531
5531
|
...c,
|
|
5532
|
-
inlineFilters:
|
|
5532
|
+
inlineFilters: B
|
|
5533
5533
|
});
|
|
5534
|
-
const w =
|
|
5534
|
+
const w = B.find((R) => R.id === D);
|
|
5535
5535
|
if (!w || !am(M, w))
|
|
5536
5536
|
return;
|
|
5537
5537
|
const N = nm(
|
|
@@ -5568,7 +5568,7 @@ function Jr({
|
|
|
5568
5568
|
t
|
|
5569
5569
|
),
|
|
5570
5570
|
children: /* @__PURE__ */ a(At, { open: s, onOpenChange: l, children: [
|
|
5571
|
-
/* @__PURE__ */ e(
|
|
5571
|
+
/* @__PURE__ */ e(Vt, { asChild: !0, children: g ? /* @__PURE__ */ a(
|
|
5572
5572
|
ne,
|
|
5573
5573
|
{
|
|
5574
5574
|
variant: "ghost",
|
|
@@ -5740,7 +5740,7 @@ function Mf({
|
|
|
5740
5740
|
function m(w) {
|
|
5741
5741
|
return !i || !u ? [] : lm(i, w, x).map((N) => ({
|
|
5742
5742
|
id: N.id,
|
|
5743
|
-
label: N.kind === "measure" ? `${fn(N.measure, u)} (${N.measure.aggregate})` : `${N.axis === "rows" ? "Rows" : "Columns"}: ${
|
|
5743
|
+
label: N.kind === "measure" ? `${fn(N.measure, u)} (${N.measure.aggregate})` : `${N.axis === "rows" ? "Rows" : "Columns"}: ${Vr(N.level, u)}`
|
|
5744
5744
|
}));
|
|
5745
5745
|
}
|
|
5746
5746
|
const p = [
|
|
@@ -5748,7 +5748,7 @@ function Mf({
|
|
|
5748
5748
|
...t.controls || []
|
|
5749
5749
|
], [h, v] = G(
|
|
5750
5750
|
{}
|
|
5751
|
-
), S =
|
|
5751
|
+
), S = Vh({
|
|
5752
5752
|
sql: t.sql,
|
|
5753
5753
|
controlBindings: t.controlBindings
|
|
5754
5754
|
});
|
|
@@ -5767,14 +5767,14 @@ function Mf({
|
|
|
5767
5767
|
(N) => !k.has(nn(w.id, N.value))
|
|
5768
5768
|
)
|
|
5769
5769
|
), g = o ? 0 : r.reduce((w, N) => {
|
|
5770
|
-
const R = D(N.target),
|
|
5770
|
+
const R = D(N.target), V = Object.values(N.mapping).filter((z) => {
|
|
5771
5771
|
const L = N.target === "config_metric_selector" || N.target === "config_field_selector" ? typeof z == "string" ? z : z == null ? void 0 : z.id : typeof z == "string" ? z : void 0;
|
|
5772
5772
|
return typeof L == "string" && !R.some((b) => b.value === L);
|
|
5773
5773
|
}).length;
|
|
5774
|
-
return w +
|
|
5774
|
+
return w + V;
|
|
5775
5775
|
}, 0);
|
|
5776
5776
|
function D(w) {
|
|
5777
|
-
var N, R,
|
|
5777
|
+
var N, R, V, z;
|
|
5778
5778
|
switch (w) {
|
|
5779
5779
|
case "config_metric_selector":
|
|
5780
5780
|
return d ? d.filter((L) => !!L.target).map((L) => ({
|
|
@@ -5799,7 +5799,7 @@ function Mf({
|
|
|
5799
5799
|
value: L.id,
|
|
5800
5800
|
label: L.label,
|
|
5801
5801
|
target: { kind: "matrix_instance", id: L.id }
|
|
5802
|
-
})) : ((z = (
|
|
5802
|
+
})) : ((z = (V = t.config) == null ? void 0 : V.groupByColumns) == null ? void 0 : z.map((L) => ({
|
|
5803
5803
|
value: L.id,
|
|
5804
5804
|
label: L.label || L.id,
|
|
5805
5805
|
target: L
|
|
@@ -5820,24 +5820,24 @@ function Mf({
|
|
|
5820
5820
|
}
|
|
5821
5821
|
const A = (w, N) => {
|
|
5822
5822
|
s(
|
|
5823
|
-
r.map((R,
|
|
5823
|
+
r.map((R, V) => V !== w ? R : N(R))
|
|
5824
5824
|
);
|
|
5825
5825
|
}, M = (w) => {
|
|
5826
5826
|
s(r.filter((N, R) => R !== w));
|
|
5827
|
-
},
|
|
5827
|
+
}, B = () => {
|
|
5828
5828
|
const w = Af(t, p, r, i, x);
|
|
5829
5829
|
w && s([...r, w]);
|
|
5830
5830
|
};
|
|
5831
5831
|
if (typeof t.sql == "string" && t.sql.trim().length > 0) {
|
|
5832
5832
|
const w = S.map(
|
|
5833
5833
|
({ controlId: N, paramId: R }) => {
|
|
5834
|
-
const
|
|
5834
|
+
const V = p.find(
|
|
5835
5835
|
(z) => z.id === N
|
|
5836
5836
|
);
|
|
5837
|
-
return
|
|
5837
|
+
return V ? {
|
|
5838
5838
|
id: N,
|
|
5839
5839
|
paramId: R,
|
|
5840
|
-
label:
|
|
5840
|
+
label: V.label,
|
|
5841
5841
|
reference: `[[param.${R}]]`
|
|
5842
5842
|
} : {
|
|
5843
5843
|
id: N,
|
|
@@ -5882,9 +5882,9 @@ function Mf({
|
|
|
5882
5882
|
] })
|
|
5883
5883
|
] }) : null,
|
|
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, N) => {
|
|
5885
|
-
const R = y[w.target] || [],
|
|
5885
|
+
const R = y[w.target] || [], V = p.find(
|
|
5886
5886
|
(j) => j.id === w.controlId
|
|
5887
|
-
), z =
|
|
5887
|
+
), z = V ? sm(V) : null, L = (z == null ? void 0 : z.source.kind) === "manual" ? z.source.options : [], b = D(w.target), _ = m(w.target), T = w.matrixTargetId !== void 0 && !_.some((j) => j.id === w.matrixTargetId), F = Array.from(
|
|
5888
5888
|
/* @__PURE__ */ new Set([
|
|
5889
5889
|
...L.map((j) => j.value),
|
|
5890
5890
|
...Object.keys(w.mapping)
|
|
@@ -5895,7 +5895,7 @@ function Mf({
|
|
|
5895
5895
|
value: j,
|
|
5896
5896
|
label: (le == null ? void 0 : le.label) || j
|
|
5897
5897
|
};
|
|
5898
|
-
}), E = `${w.controlId}-${w.target}-${N}`, P = h[E] ?? N === 0, K = Object.keys(w.mapping).length, $ =
|
|
5898
|
+
}), E = `${w.controlId}-${w.target}-${N}`, P = h[E] ?? N === 0, K = Object.keys(w.mapping).length, $ = V != null && V.type ? Ff[V.type] || V.type : null;
|
|
5899
5899
|
return /* @__PURE__ */ a(
|
|
5900
5900
|
aa,
|
|
5901
5901
|
{
|
|
@@ -5913,10 +5913,10 @@ function Mf({
|
|
|
5913
5913
|
type: "button",
|
|
5914
5914
|
className: "flex min-w-0 flex-1 items-start gap-2 text-left",
|
|
5915
5915
|
children: [
|
|
5916
|
-
P ? /* @__PURE__ */ e(
|
|
5916
|
+
P ? /* @__PURE__ */ e(Bt, { className: "mt-0.5 h-4 w-4 shrink-0 text-muted-foreground" }) : /* @__PURE__ */ e(_t, { className: "mt-0.5 h-4 w-4 shrink-0 text-muted-foreground" }),
|
|
5917
5917
|
/* @__PURE__ */ a("div", { className: "min-w-0", children: [
|
|
5918
5918
|
/* @__PURE__ */ a("div", { className: "flex min-w-0 items-center gap-2", children: [
|
|
5919
|
-
/* @__PURE__ */ e("div", { className: "truncate text-sm font-medium", children: (
|
|
5919
|
+
/* @__PURE__ */ e("div", { className: "truncate text-sm font-medium", children: (V == null ? void 0 : V.label) || "Control" }),
|
|
5920
5920
|
$ ? /* @__PURE__ */ e(
|
|
5921
5921
|
gt,
|
|
5922
5922
|
{
|
|
@@ -6065,7 +6065,7 @@ function Mf({
|
|
|
6065
6065
|
E
|
|
6066
6066
|
);
|
|
6067
6067
|
}),
|
|
6068
|
-
C ? /* @__PURE__ */ a(ne, { type: "button", variant: "outline", size: "sm", onClick:
|
|
6068
|
+
C ? /* @__PURE__ */ a(ne, { type: "button", variant: "outline", size: "sm", onClick: B, children: [
|
|
6069
6069
|
/* @__PURE__ */ e(It, { className: "mr-2 h-4 w-4" }),
|
|
6070
6070
|
"Add another control response"
|
|
6071
6071
|
] }) : null
|
|
@@ -6223,7 +6223,7 @@ function Qr({
|
|
|
6223
6223
|
), g = ad(C), D = se(() => g.catalog.map(($) => ({
|
|
6224
6224
|
...$.field,
|
|
6225
6225
|
dataType: gl($.resolvedField.dataType)
|
|
6226
|
-
})), [g.catalog]), A = (y == null ? void 0 : y.controls) || [], M = y ? om(u, { excludeCardId: y.id }) : p.map(($) => $.id),
|
|
6226
|
+
})), [g.catalog]), A = (y == null ? void 0 : y.controls) || [], M = y ? om(u, { excludeCardId: y.id }) : p.map(($) => $.id), B = ((y == null ? void 0 : y.controlBindings) || []).filter(
|
|
6227
6227
|
im
|
|
6228
6228
|
), w = ((y == null ? void 0 : y.controlBindings) || []).filter(
|
|
6229
6229
|
Pn
|
|
@@ -6238,7 +6238,7 @@ function Qr({
|
|
|
6238
6238
|
$
|
|
6239
6239
|
])
|
|
6240
6240
|
)
|
|
6241
|
-
},
|
|
6241
|
+
}, V = {
|
|
6242
6242
|
choices: dm(y),
|
|
6243
6243
|
targetMap: Object.fromEntries(
|
|
6244
6244
|
(((K = y == null ? void 0 : y.config) == null ? void 0 : K.metricColumns) || []).map(($) => [
|
|
@@ -6249,9 +6249,9 @@ function Qr({
|
|
|
6249
6249
|
}, z = R.choices.map(($) => ({
|
|
6250
6250
|
option: $,
|
|
6251
6251
|
target: R.targetMap[$.value]
|
|
6252
|
-
})), L =
|
|
6252
|
+
})), L = V.choices.map(($) => ({
|
|
6253
6253
|
option: $,
|
|
6254
|
-
target:
|
|
6254
|
+
target: V.targetMap[$.value]
|
|
6255
6255
|
})), b = ($, j) => {
|
|
6256
6256
|
if (!y)
|
|
6257
6257
|
return;
|
|
@@ -6309,7 +6309,7 @@ function Qr({
|
|
|
6309
6309
|
t
|
|
6310
6310
|
),
|
|
6311
6311
|
children: /* @__PURE__ */ a(At, { modal: !0, open: c, onOpenChange: s, children: [
|
|
6312
|
-
/* @__PURE__ */ e(
|
|
6312
|
+
/* @__PURE__ */ e(Vt, { asChild: !0, children: F ? /* @__PURE__ */ a(
|
|
6313
6313
|
ne,
|
|
6314
6314
|
{
|
|
6315
6315
|
variant: "ghost",
|
|
@@ -6317,7 +6317,7 @@ function Qr({
|
|
|
6317
6317
|
children: [
|
|
6318
6318
|
/* @__PURE__ */ e(en, { className: "h-3.5 w-3.5 text-muted-foreground" }),
|
|
6319
6319
|
/* @__PURE__ */ e("span", { children: r }),
|
|
6320
|
-
A.length +
|
|
6320
|
+
A.length + B.length > 0 && /* @__PURE__ */ e("span", { className: "ml-auto text-[11px] tabular-nums text-muted-foreground", children: A.length + B.length })
|
|
6321
6321
|
]
|
|
6322
6322
|
}
|
|
6323
6323
|
) : /* @__PURE__ */ a(
|
|
@@ -6325,11 +6325,11 @@ function Qr({
|
|
|
6325
6325
|
{
|
|
6326
6326
|
tooltip: "Configure Controls",
|
|
6327
6327
|
className: Q("relative h-7 w-7 px-0", {
|
|
6328
|
-
"text-primary": A.length > 0 ||
|
|
6328
|
+
"text-primary": A.length > 0 || B.length > 0
|
|
6329
6329
|
}),
|
|
6330
6330
|
children: [
|
|
6331
6331
|
/* @__PURE__ */ e(en, { className: "h-3.5 w-3.5" }),
|
|
6332
|
-
A.length +
|
|
6332
|
+
A.length + B.length > 0 && /* @__PURE__ */ e("span", { className: "absolute -right-1 -top-1 inline-flex h-4 min-w-4 items-center justify-center rounded-full bg-primary px-1 text-[10px] font-medium text-primary-foreground", children: A.length + B.length })
|
|
6333
6333
|
]
|
|
6334
6334
|
}
|
|
6335
6335
|
) }),
|
|
@@ -6375,7 +6375,7 @@ function Qr({
|
|
|
6375
6375
|
{
|
|
6376
6376
|
card: y,
|
|
6377
6377
|
dashboardControls: p,
|
|
6378
|
-
bindings:
|
|
6378
|
+
bindings: B,
|
|
6379
6379
|
onChange: _,
|
|
6380
6380
|
availableFieldChoices: k ? void 0 : z,
|
|
6381
6381
|
availableMetricChoices: k ? void 0 : L,
|
|
@@ -6453,8 +6453,8 @@ function Qo({
|
|
|
6453
6453
|
className: "h-7 w-7 px-0",
|
|
6454
6454
|
children: [
|
|
6455
6455
|
(o === "xy" || !o) && /* @__PURE__ */ e(Za, { className: "h-3.5 w-3.5" }),
|
|
6456
|
-
o === "x" && /* @__PURE__ */ e(
|
|
6457
|
-
o === "y" && /* @__PURE__ */ e(
|
|
6456
|
+
o === "x" && /* @__PURE__ */ e(Bl, { className: "h-3.5 w-3.5" }),
|
|
6457
|
+
o === "y" && /* @__PURE__ */ e(Vl, { className: "h-3.5 w-3.5" }),
|
|
6458
6458
|
o === "none" && /* @__PURE__ */ e(Cl, { className: "h-3.5 w-3.5" })
|
|
6459
6459
|
]
|
|
6460
6460
|
}
|
|
@@ -6500,7 +6500,7 @@ function _f({
|
|
|
6500
6500
|
)
|
|
6501
6501
|
] });
|
|
6502
6502
|
}
|
|
6503
|
-
function
|
|
6503
|
+
function Bf({
|
|
6504
6504
|
isPreviewMode: t,
|
|
6505
6505
|
onPreviewToggle: n,
|
|
6506
6506
|
configCard: r
|
|
@@ -6528,7 +6528,7 @@ function Vf({
|
|
|
6528
6528
|
[s, r, S]
|
|
6529
6529
|
), C = S ? k.filter(Boolean).length : s.cards.length, g = d ? !1 : y ? C < y : !0, D = C > Math.max(x || 1, 1), A = !!((E = r == null ? void 0 : r.customCardPreferences) != null && E.dataInputCardIds), M = (P, K) => {
|
|
6530
6530
|
P.dataTransfer.setData("tabIndex", K.toString());
|
|
6531
|
-
},
|
|
6531
|
+
}, B = (P) => {
|
|
6532
6532
|
P.preventDefault();
|
|
6533
6533
|
}, w = (P, K) => {
|
|
6534
6534
|
const $ = P.dataTransfer.getData("tabIndex");
|
|
@@ -6551,7 +6551,7 @@ function Vf({
|
|
|
6551
6551
|
};
|
|
6552
6552
|
o($), i(K.id);
|
|
6553
6553
|
}
|
|
6554
|
-
function
|
|
6554
|
+
function V() {
|
|
6555
6555
|
if (d) return;
|
|
6556
6556
|
if (S && (r == null ? void 0 : r.id) === l.id) {
|
|
6557
6557
|
z(l);
|
|
@@ -6656,7 +6656,7 @@ function Vf({
|
|
|
6656
6656
|
{
|
|
6657
6657
|
draggable: !S && !d,
|
|
6658
6658
|
onDragStart: S || d ? void 0 : (Y) => M(Y, K),
|
|
6659
|
-
onDragOver: S || d ? void 0 :
|
|
6659
|
+
onDragOver: S || d ? void 0 : B,
|
|
6660
6660
|
onDrop: S || d ? void 0 : (Y) => w(Y, K),
|
|
6661
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",
|
|
@@ -6712,7 +6712,7 @@ function Vf({
|
|
|
6712
6712
|
{
|
|
6713
6713
|
className: "h-3 w-3 text-muted-foreground hover:text-foreground",
|
|
6714
6714
|
onClick: (Y) => {
|
|
6715
|
-
Y.stopPropagation(),
|
|
6715
|
+
Y.stopPropagation(), V();
|
|
6716
6716
|
}
|
|
6717
6717
|
}
|
|
6718
6718
|
),
|
|
@@ -6775,23 +6775,23 @@ function mr({
|
|
|
6775
6775
|
getCard: g,
|
|
6776
6776
|
manifest: D,
|
|
6777
6777
|
isLoading: A
|
|
6778
|
-
} = ta(((ge = o == null ? void 0 : o.customCardPreferences) == null ? void 0 : ge.url) || ""), M = (Me = o == null ? void 0 : o.customCardPreferences) == null ? void 0 : Me.componentName,
|
|
6778
|
+
} = ta(((ge = o == null ? void 0 : o.customCardPreferences) == null ? void 0 : ge.url) || ""), M = (Me = o == null ? void 0 : o.customCardPreferences) == null ? void 0 : Me.componentName, B = M ? g(M) : null, w = (Qe = D == null ? void 0 : D.visuals) == null ? void 0 : Qe.find(
|
|
6779
6779
|
(ie) => ie.name === M
|
|
6780
|
-
), N = oa(o, w), R = c && N === "multiple" && !!o,
|
|
6780
|
+
), N = oa(o, w), R = c && N === "multiple" && !!o, V = se(() => Oa({
|
|
6781
6781
|
frame: s,
|
|
6782
6782
|
configCard: o,
|
|
6783
6783
|
isMultiInputVisual: !0
|
|
6784
6784
|
}).map(
|
|
6785
6785
|
(De) => (De == null ? void 0 : De.id) === l.id ? l : De
|
|
6786
6786
|
), [s, o, l]), z = se(
|
|
6787
|
-
() => po(
|
|
6788
|
-
[
|
|
6787
|
+
() => po(V),
|
|
6788
|
+
[V]
|
|
6789
6789
|
), L = se(() => {
|
|
6790
|
-
const ie =
|
|
6790
|
+
const ie = V.findIndex(
|
|
6791
6791
|
(De) => (De == null ? void 0 : De.id) === l.id
|
|
6792
6792
|
);
|
|
6793
6793
|
return ie < 0 ? -1 : Lt(l, ie);
|
|
6794
|
-
}, [
|
|
6794
|
+
}, [V, l]), b = se(() => !o || N !== "multiple" || L < 0 ? l.type : ha(
|
|
6795
6795
|
l,
|
|
6796
6796
|
L,
|
|
6797
6797
|
w == null ? void 0 : w.slots
|
|
@@ -6849,7 +6849,7 @@ function mr({
|
|
|
6849
6849
|
})
|
|
6850
6850
|
),
|
|
6851
6851
|
[p, z, r]
|
|
6852
|
-
), Te = id(),
|
|
6852
|
+
), Te = id(), Ve = xe((ie) => ie.dashboard), Ue = xe(
|
|
6853
6853
|
(ie) => ie.dashboardInputValues
|
|
6854
6854
|
), pe = xe(
|
|
6855
6855
|
(ie) => ie.adHocFilterValues
|
|
@@ -6885,7 +6885,7 @@ function mr({
|
|
|
6885
6885
|
filterValues: Se
|
|
6886
6886
|
} = se(
|
|
6887
6887
|
() => o ? Tl({
|
|
6888
|
-
dashboard:
|
|
6888
|
+
dashboard: Ve,
|
|
6889
6889
|
card: o,
|
|
6890
6890
|
sheetId: Ke,
|
|
6891
6891
|
dashboardInputValues: Ue,
|
|
@@ -6898,7 +6898,7 @@ function mr({
|
|
|
6898
6898
|
o,
|
|
6899
6899
|
Ue,
|
|
6900
6900
|
$e,
|
|
6901
|
-
|
|
6901
|
+
Ve,
|
|
6902
6902
|
Ke,
|
|
6903
6903
|
Te
|
|
6904
6904
|
]
|
|
@@ -6907,8 +6907,8 @@ function mr({
|
|
|
6907
6907
|
f(ie);
|
|
6908
6908
|
}
|
|
6909
6909
|
function Fe() {
|
|
6910
|
-
return A ? /* @__PURE__ */ e("div", { className: "flex h-full items-center justify-center", children: /* @__PURE__ */ e(Ot, { size: "md", color: "muted", "aria-label": "Loading manifest" }) }) :
|
|
6911
|
-
|
|
6910
|
+
return A ? /* @__PURE__ */ e("div", { className: "flex h-full items-center justify-center", children: /* @__PURE__ */ e(Ot, { size: "md", color: "muted", "aria-label": "Loading manifest" }) }) : B ? /* @__PURE__ */ a("div", { className: "relative flex h-full flex-col pl-2 pr-4", children: [
|
|
6911
|
+
V.map((De, Yt) => {
|
|
6912
6912
|
if (!De) return null;
|
|
6913
6913
|
const St = Lt(De, Yt), bn = ha(
|
|
6914
6914
|
De,
|
|
@@ -6939,7 +6939,7 @@ function mr({
|
|
|
6939
6939
|
{
|
|
6940
6940
|
fallback: /* @__PURE__ */ e("div", { className: "flex h-full items-center justify-center", children: /* @__PURE__ */ e(Ot, { size: "md", color: "muted" }) }),
|
|
6941
6941
|
children: /* @__PURE__ */ e(
|
|
6942
|
-
|
|
6942
|
+
B,
|
|
6943
6943
|
{
|
|
6944
6944
|
editing: !0,
|
|
6945
6945
|
...fd({
|
|
@@ -7032,7 +7032,7 @@ function mr({
|
|
|
7032
7032
|
ie.id
|
|
7033
7033
|
)),
|
|
7034
7034
|
/* @__PURE__ */ e(
|
|
7035
|
-
|
|
7035
|
+
Bf,
|
|
7036
7036
|
{
|
|
7037
7037
|
isPreviewMode: R,
|
|
7038
7038
|
onPreviewToggle: d,
|
|
@@ -7080,7 +7080,7 @@ function Wo({
|
|
|
7080
7080
|
}
|
|
7081
7081
|
),
|
|
7082
7082
|
m && /* @__PURE__ */ e(
|
|
7083
|
-
|
|
7083
|
+
Vo,
|
|
7084
7084
|
{
|
|
7085
7085
|
isOpen: l,
|
|
7086
7086
|
onClick: () => c((v) => !v)
|
|
@@ -7131,11 +7131,11 @@ function $n({
|
|
|
7131
7131
|
errorMessage: D,
|
|
7132
7132
|
refetch: A,
|
|
7133
7133
|
queryKey: M,
|
|
7134
|
-
pagination:
|
|
7134
|
+
pagination: B,
|
|
7135
7135
|
isCurrentQueryResult: w
|
|
7136
7136
|
} = nt(y), N = je(M);
|
|
7137
7137
|
N.current = M;
|
|
7138
|
-
const R = se(() => (k == null ? void 0 : k.records) || [], [k == null ? void 0 : k.records]), { cardFilterValues:
|
|
7138
|
+
const R = se(() => (k == null ? void 0 : k.records) || [], [k == null ? void 0 : k.records]), { cardFilterValues: V } = Zp(
|
|
7139
7139
|
(c == null ? void 0 : c.id) ?? ""
|
|
7140
7140
|
), [z, L] = G(!1), b = jl(c), [_, T] = G();
|
|
7141
7141
|
we(() => {
|
|
@@ -7167,8 +7167,8 @@ function $n({
|
|
|
7167
7167
|
}
|
|
7168
7168
|
function $() {
|
|
7169
7169
|
if (!P) return;
|
|
7170
|
-
const ue = JSON.stringify(E, null, 2), Ce = new Blob([ue], { type: "application/json" }), Te = URL.createObjectURL(Ce),
|
|
7171
|
-
|
|
7170
|
+
const ue = JSON.stringify(E, null, 2), Ce = new Blob([ue], { type: "application/json" }), Te = URL.createObjectURL(Ce), Ve = document.createElement("a");
|
|
7171
|
+
Ve.href = Te, Ve.download = `${c.title}.json`, Ve.click();
|
|
7172
7172
|
}
|
|
7173
7173
|
function j() {
|
|
7174
7174
|
P && gd(
|
|
@@ -7223,7 +7223,7 @@ function $n({
|
|
|
7223
7223
|
]
|
|
7224
7224
|
}
|
|
7225
7225
|
)
|
|
7226
|
-
] }) : null, ce = (
|
|
7226
|
+
] }) : null, ce = (B == null ? void 0 : B.totalCount) ?? R.length, ve = de && !C && !g && !D && Array.isArray(k == null ? void 0 : k.records) ? /* @__PURE__ */ a("div", { className: "flex min-w-0 items-center gap-1.5 whitespace-nowrap text-[11px] tabular-nums text-muted-foreground", children: [
|
|
7227
7227
|
/* @__PURE__ */ a("span", { children: [
|
|
7228
7228
|
w ? null : "Last run: ",
|
|
7229
7229
|
ce.toLocaleString(),
|
|
@@ -7288,7 +7288,7 @@ function $n({
|
|
|
7288
7288
|
children: [
|
|
7289
7289
|
t,
|
|
7290
7290
|
de ? null : U,
|
|
7291
|
-
|
|
7291
|
+
V && V.length > 0 && /* @__PURE__ */ a(da, { openDelay: 200, children: [
|
|
7292
7292
|
/* @__PURE__ */ e(ua, { asChild: !0, children: /* @__PURE__ */ a(
|
|
7293
7293
|
ne,
|
|
7294
7294
|
{
|
|
@@ -7302,7 +7302,7 @@ function $n({
|
|
|
7302
7302
|
{
|
|
7303
7303
|
variant: "secondary",
|
|
7304
7304
|
className: "h-4 min-w-4 rounded-[4px] px-1 text-[10px] font-medium",
|
|
7305
|
-
children:
|
|
7305
|
+
children: V.length
|
|
7306
7306
|
}
|
|
7307
7307
|
)
|
|
7308
7308
|
]
|
|
@@ -7318,7 +7318,7 @@ function $n({
|
|
|
7318
7318
|
/* @__PURE__ */ e("div", { className: "min-h-0 flex-1 overflow-auto", children: /* @__PURE__ */ e(
|
|
7319
7319
|
Xt,
|
|
7320
7320
|
{
|
|
7321
|
-
value: JSON.stringify(
|
|
7321
|
+
value: JSON.stringify(V, null, 2),
|
|
7322
7322
|
onValueChange: () => {
|
|
7323
7323
|
},
|
|
7324
7324
|
language: "json",
|
|
@@ -7523,7 +7523,7 @@ function $n({
|
|
|
7523
7523
|
}
|
|
7524
7524
|
);
|
|
7525
7525
|
}
|
|
7526
|
-
function
|
|
7526
|
+
function Vf({ onToggleEditor: t, children: n }) {
|
|
7527
7527
|
return /* @__PURE__ */ a("div", { className: "relative isolate shrink-0 border-t border-border bg-muted/30 @container", children: [
|
|
7528
7528
|
/* @__PURE__ */ e(
|
|
7529
7529
|
pl,
|
|
@@ -7713,7 +7713,7 @@ const $f = {
|
|
|
7713
7713
|
pre: ({ children: t }) => /* @__PURE__ */ e(me, { children: t })
|
|
7714
7714
|
};
|
|
7715
7715
|
function Xo() {
|
|
7716
|
-
var
|
|
7716
|
+
var V, z, L;
|
|
7717
7717
|
const t = I(
|
|
7718
7718
|
(b) => b.card.customCardPreferences
|
|
7719
7719
|
), { data: n } = vd(), r = (n == null ? void 0 : n.plugins) || [], s = I((b) => b.card), l = I((b) => b.frame), { setCustomCardPreferences: c } = ye(), d = se(
|
|
@@ -7721,7 +7721,7 @@ function Xo() {
|
|
|
7721
7721
|
[l, s]
|
|
7722
7722
|
), o = d == null ? void 0 : d.customCardPreferences, { components: i, manifest: f } = ta(
|
|
7723
7723
|
(o == null ? void 0 : o.url) || (t == null ? void 0 : t.url) || ""
|
|
7724
|
-
), u = (
|
|
7724
|
+
), u = (V = f == null ? void 0 : f.visuals) == null ? void 0 : V.find(
|
|
7725
7725
|
(b) => b.name === ((o == null ? void 0 : o.componentName) || (t == null ? void 0 : t.componentName))
|
|
7726
7726
|
), p = oa(
|
|
7727
7727
|
d || s,
|
|
@@ -7778,7 +7778,7 @@ function Xo() {
|
|
|
7778
7778
|
return b ? (Array.isArray(b) ? b : [b]).join(", ") : null;
|
|
7779
7779
|
}
|
|
7780
7780
|
function M(b, _, T = [], F = "", E, P, K) {
|
|
7781
|
-
const $ =
|
|
7781
|
+
const $ = B({
|
|
7782
7782
|
key: _,
|
|
7783
7783
|
defaultValue: F,
|
|
7784
7784
|
settingsValue: P,
|
|
@@ -7823,7 +7823,7 @@ function Xo() {
|
|
|
7823
7823
|
}
|
|
7824
7824
|
) : null;
|
|
7825
7825
|
}
|
|
7826
|
-
function
|
|
7826
|
+
function B({
|
|
7827
7827
|
key: b,
|
|
7828
7828
|
defaultValue: _,
|
|
7829
7829
|
settingsValue: T,
|
|
@@ -7942,7 +7942,7 @@ function Xo() {
|
|
|
7942
7942
|
children: [
|
|
7943
7943
|
/* @__PURE__ */ a(Le, { value: "plugin-settings", children: [
|
|
7944
7944
|
/* @__PURE__ */ e(_e, { children: "Plugin" }),
|
|
7945
|
-
/* @__PURE__ */ e(
|
|
7945
|
+
/* @__PURE__ */ e(Be, { children: /* @__PURE__ */ a("div", { className: "space-y-4 text-sm", children: [
|
|
7946
7946
|
/* @__PURE__ */ e("div", { className: "space-y-2", children: /* @__PURE__ */ a("div", { className: "space-y-4", children: [
|
|
7947
7947
|
(!p || h) && /* @__PURE__ */ e(
|
|
7948
7948
|
Ja,
|
|
@@ -8048,7 +8048,7 @@ function Xo() {
|
|
|
8048
8048
|
)
|
|
8049
8049
|
] })
|
|
8050
8050
|
] }) }),
|
|
8051
|
-
/* @__PURE__ */ e(
|
|
8051
|
+
/* @__PURE__ */ e(Be, { children: R() })
|
|
8052
8052
|
] })
|
|
8053
8053
|
]
|
|
8054
8054
|
}
|
|
@@ -8262,7 +8262,7 @@ function _a({
|
|
|
8262
8262
|
}, M = (N) => c && i === "currency" ? zf(
|
|
8263
8263
|
f,
|
|
8264
8264
|
N
|
|
8265
|
-
) : ei(f, N),
|
|
8265
|
+
) : ei(f, N), B = ((w = tl.find(
|
|
8266
8266
|
(N) => N.value === (c == null ? void 0 : c.currency)
|
|
8267
8267
|
)) == null ? void 0 : w.label) ?? (c == null ? void 0 : c.currency);
|
|
8268
8268
|
return we(() => {
|
|
@@ -8370,7 +8370,7 @@ function _a({
|
|
|
8370
8370
|
className: "text-xs",
|
|
8371
8371
|
children: [
|
|
8372
8372
|
"Report default — ",
|
|
8373
|
-
|
|
8373
|
+
B
|
|
8374
8374
|
]
|
|
8375
8375
|
}
|
|
8376
8376
|
),
|
|
@@ -9650,7 +9650,7 @@ function cg({
|
|
|
9650
9650
|
],
|
|
9651
9651
|
onChange: (C) => o((g) => g.map((D) => {
|
|
9652
9652
|
if (D.id !== m.id) return D;
|
|
9653
|
-
const { tableParts: A, includeTotals: M, includeSubtotals:
|
|
9653
|
+
const { tableParts: A, includeTotals: M, includeSubtotals: B, ...w } = D.target;
|
|
9654
9654
|
return { ...D, target: {
|
|
9655
9655
|
...w,
|
|
9656
9656
|
rowRoles: C === "all" ? void 0 : [C]
|
|
@@ -9683,7 +9683,7 @@ function cg({
|
|
|
9683
9683
|
{ value: "all", label: "All levels" },
|
|
9684
9684
|
...n.spec[h.axis].map((C) => ({
|
|
9685
9685
|
value: C.id,
|
|
9686
|
-
label:
|
|
9686
|
+
label: Vr(C, n.presentation)
|
|
9687
9687
|
}))
|
|
9688
9688
|
],
|
|
9689
9689
|
onChange: (C) => y({
|
|
@@ -9753,7 +9753,7 @@ function dg({
|
|
|
9753
9753
|
}
|
|
9754
9754
|
x({ [C]: A });
|
|
9755
9755
|
}, k = (C, g) => {
|
|
9756
|
-
const D = r.presentation[g][C], A = d == null ? void 0 : d[g][C],
|
|
9756
|
+
const D = r.presentation[g][C], A = d == null ? void 0 : d[g][C], B = Sm(
|
|
9757
9757
|
{ type: "matrixTable", config: { matrix: r } },
|
|
9758
9758
|
g === "levelFormats" ? { kind: "matrixLevel", levelId: C } : { kind: "matrixMeasure", measureId: C }
|
|
9759
9759
|
);
|
|
@@ -9764,7 +9764,7 @@ function dg({
|
|
|
9764
9764
|
value: D,
|
|
9765
9765
|
onChange: (w) => y(g, C, w),
|
|
9766
9766
|
origin: D || A ? { custom: D !== void 0, modelFormat: A } : void 0,
|
|
9767
|
-
drawnTypes:
|
|
9767
|
+
drawnTypes: B
|
|
9768
9768
|
}
|
|
9769
9769
|
);
|
|
9770
9770
|
};
|
|
@@ -9792,12 +9792,12 @@ function dg({
|
|
|
9792
9792
|
children: [
|
|
9793
9793
|
(n == null ? void 0 : n.kind) !== "field" && /* @__PURE__ */ e("h2", { className: "text-xs font-semibold", children: C === "rows" ? "Rows" : "Columns" }),
|
|
9794
9794
|
r.spec[C].filter((g) => n.kind === "field" && g.id === n.id).map((g) => {
|
|
9795
|
-
const D =
|
|
9795
|
+
const D = Vr(g, r.presentation), A = (V) => S({
|
|
9796
9796
|
kind: "structure",
|
|
9797
9797
|
[C]: r.spec[C].map(
|
|
9798
|
-
(z) => z.id === g.id ?
|
|
9798
|
+
(z) => z.id === g.id ? V : z
|
|
9799
9799
|
)
|
|
9800
|
-
}), M = v(g.field),
|
|
9800
|
+
}), M = v(g.field), B = M === "date" || M === "datetime", w = r.presentation.levelFormats[g.id], N = (w == null ? void 0 : w.type) === "temporal_bucket" ? w : fo, R = g.grain ? Cm(N, g.grain) : void 0;
|
|
9801
9801
|
return /* @__PURE__ */ a("div", { className: (n == null ? void 0 : n.kind) === "field" ? "min-w-0" : "min-w-0 border-b pb-2", children: [
|
|
9802
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: D, children: D }) }),
|
|
9803
9803
|
/* @__PURE__ */ a("details", { open: (n == null ? void 0 : n.kind) === "field" ? !0 : void 0, children: [
|
|
@@ -9811,9 +9811,9 @@ function dg({
|
|
|
9811
9811
|
{
|
|
9812
9812
|
label: "Level label",
|
|
9813
9813
|
value: r.presentation.levelLabels[g.id] ?? "",
|
|
9814
|
-
onChange: (
|
|
9814
|
+
onChange: (V) => {
|
|
9815
9815
|
const z = { ...r.presentation.levelLabels };
|
|
9816
|
-
|
|
9816
|
+
V ? z[g.id] = V : delete z[g.id], x({ levelLabels: z });
|
|
9817
9817
|
}
|
|
9818
9818
|
}
|
|
9819
9819
|
),
|
|
@@ -9826,12 +9826,12 @@ function dg({
|
|
|
9826
9826
|
{ value: "rows", label: "Rows" },
|
|
9827
9827
|
{ value: "columns", label: "Columns" }
|
|
9828
9828
|
],
|
|
9829
|
-
onChange: (
|
|
9830
|
-
|
|
9829
|
+
onChange: (V) => {
|
|
9830
|
+
V !== C && S(wm(r.spec, g.id, V));
|
|
9831
9831
|
}
|
|
9832
9832
|
}
|
|
9833
9833
|
),
|
|
9834
|
-
|
|
9834
|
+
B && /* @__PURE__ */ e(
|
|
9835
9835
|
Je,
|
|
9836
9836
|
{
|
|
9837
9837
|
label: "Time grain",
|
|
@@ -9840,11 +9840,11 @@ function dg({
|
|
|
9840
9840
|
{ value: "none", label: "No grouping" },
|
|
9841
9841
|
...Gl(
|
|
9842
9842
|
M
|
|
9843
|
-
).map((
|
|
9843
|
+
).map((V) => ({ value: V, label: V }))
|
|
9844
9844
|
],
|
|
9845
|
-
onChange: (
|
|
9845
|
+
onChange: (V) => A({
|
|
9846
9846
|
...g,
|
|
9847
|
-
grain:
|
|
9847
|
+
grain: V === "none" ? void 0 : V
|
|
9848
9848
|
})
|
|
9849
9849
|
}
|
|
9850
9850
|
),
|
|
@@ -9858,12 +9858,12 @@ function dg({
|
|
|
9858
9858
|
g.grain,
|
|
9859
9859
|
N
|
|
9860
9860
|
),
|
|
9861
|
-
onChange: (
|
|
9861
|
+
onChange: (V) => y(
|
|
9862
9862
|
"levelFormats",
|
|
9863
9863
|
g.id,
|
|
9864
|
-
|
|
9864
|
+
V === "auto" ? void 0 : Ha(
|
|
9865
9865
|
g.grain,
|
|
9866
|
-
|
|
9866
|
+
V,
|
|
9867
9867
|
R.customPattern
|
|
9868
9868
|
)
|
|
9869
9869
|
)
|
|
@@ -9874,10 +9874,10 @@ function dg({
|
|
|
9874
9874
|
{
|
|
9875
9875
|
label: "Date pattern",
|
|
9876
9876
|
value: R.customPattern,
|
|
9877
|
-
onChange: (
|
|
9878
|
-
|
|
9877
|
+
onChange: (V) => {
|
|
9878
|
+
V.trim() && y("levelFormats", g.id, {
|
|
9879
9879
|
type: "temporal_bucket",
|
|
9880
|
-
presentation: { mode: "pattern", pattern:
|
|
9880
|
+
presentation: { mode: "pattern", pattern: V }
|
|
9881
9881
|
});
|
|
9882
9882
|
}
|
|
9883
9883
|
}
|
|
@@ -9888,14 +9888,14 @@ function dg({
|
|
|
9888
9888
|
{
|
|
9889
9889
|
label: "Subtotal",
|
|
9890
9890
|
value: r.presentation.totals[C].levels[g.id],
|
|
9891
|
-
onChange: (
|
|
9891
|
+
onChange: (V) => x({
|
|
9892
9892
|
totals: {
|
|
9893
9893
|
...r.presentation.totals,
|
|
9894
9894
|
[C]: {
|
|
9895
9895
|
...r.presentation.totals[C],
|
|
9896
9896
|
levels: {
|
|
9897
9897
|
...r.presentation.totals[C].levels,
|
|
9898
|
-
[g.id]:
|
|
9898
|
+
[g.id]: V
|
|
9899
9899
|
}
|
|
9900
9900
|
}
|
|
9901
9901
|
}
|
|
@@ -10328,7 +10328,7 @@ function hg() {
|
|
|
10328
10328
|
/* @__PURE__ */ e(ip, { className: "h-3.5 w-3.5 text-foreground/60" }),
|
|
10329
10329
|
/* @__PURE__ */ e("span", { children: "Comparison" })
|
|
10330
10330
|
] }) }),
|
|
10331
|
-
/* @__PURE__ */ a(
|
|
10331
|
+
/* @__PURE__ */ a(Be, { className: "space-y-4 pb-4 pt-2", children: [
|
|
10332
10332
|
/* @__PURE__ */ a("div", { className: "flex items-start justify-between gap-3", children: [
|
|
10333
10333
|
/* @__PURE__ */ a("div", { children: [
|
|
10334
10334
|
/* @__PURE__ */ e(O, { htmlFor: "inherit-global-date-comparison", className: "text-xs", children: "Inherit Global Date comparison" }),
|
|
@@ -10406,7 +10406,7 @@ function oi({
|
|
|
10406
10406
|
), x = Ed(
|
|
10407
10407
|
v,
|
|
10408
10408
|
h
|
|
10409
|
-
), y = p === "matrixTable" || Dd(p), k = p === "table", C = p === "table", g = p === "table" || p === "detailTable", D = C || g, A = ((de = S[0]) == null ? void 0 : de.value) || "", M = Fd(i),
|
|
10409
|
+
), y = p === "matrixTable" || Dd(p), k = p === "table", C = p === "table", g = p === "table" || p === "detailTable", D = C || g, A = ((de = S[0]) == null ? void 0 : de.value) || "", M = Fd(i), B = Am(v), w = Mm(v), [N, R] = G("style");
|
|
10410
10410
|
we(() => {
|
|
10411
10411
|
if (r === "style") {
|
|
10412
10412
|
R("style");
|
|
@@ -10423,7 +10423,7 @@ function oi({
|
|
|
10423
10423
|
s,
|
|
10424
10424
|
r
|
|
10425
10425
|
]);
|
|
10426
|
-
const
|
|
10426
|
+
const V = m.some(
|
|
10427
10427
|
(U) => {
|
|
10428
10428
|
var Y;
|
|
10429
10429
|
return ((Y = U.comparison) == null ? void 0 : Y.mode) === "explicit";
|
|
@@ -10487,7 +10487,7 @@ function oi({
|
|
|
10487
10487
|
stripedRows: Na.stripedRows,
|
|
10488
10488
|
wrapText: Na.wrapText,
|
|
10489
10489
|
totals: {
|
|
10490
|
-
enabled:
|
|
10490
|
+
enabled: B ? w : Jt.enabled,
|
|
10491
10491
|
backgroundColor: Jt.backgroundColor,
|
|
10492
10492
|
textColor: Jt.textColor,
|
|
10493
10493
|
fontWeight: Jt.fontWeight,
|
|
@@ -10500,7 +10500,7 @@ function oi({
|
|
|
10500
10500
|
}
|
|
10501
10501
|
}
|
|
10502
10502
|
});
|
|
10503
|
-
}, le =
|
|
10503
|
+
}, le = V ? /* @__PURE__ */ a("div", { className: "space-y-2", children: [
|
|
10504
10504
|
/* @__PURE__ */ e("div", { className: "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", children: "Comparison" }),
|
|
10505
10505
|
/* @__PURE__ */ a("div", { className: "flex items-center justify-between gap-3", children: [
|
|
10506
10506
|
/* @__PURE__ */ e(O, { htmlFor: "show-table-comparison", className: "text-xs", children: "Show comparison" }),
|
|
@@ -10550,7 +10550,7 @@ function oi({
|
|
|
10550
10550
|
onStyleChange: _,
|
|
10551
10551
|
showFullStyle: k,
|
|
10552
10552
|
showBorderStyle: !1,
|
|
10553
|
-
totals: k &&
|
|
10553
|
+
totals: k && B ? {
|
|
10554
10554
|
enabled: w,
|
|
10555
10555
|
onEnabledChange: E,
|
|
10556
10556
|
onStyleChange: T,
|
|
@@ -10860,7 +10860,7 @@ const yg = [
|
|
|
10860
10860
|
// yellow-400
|
|
10861
10861
|
];
|
|
10862
10862
|
function Ng() {
|
|
10863
|
-
var D, A, M,
|
|
10863
|
+
var D, A, M, B, w, N, R, V, z, L;
|
|
10864
10864
|
const t = I((b) => b.card), n = I((b) => {
|
|
10865
10865
|
var _;
|
|
10866
10866
|
return (_ = b.card) == null ? void 0 : _.preferences;
|
|
@@ -10964,7 +10964,7 @@ function Ng() {
|
|
|
10964
10964
|
[b]: T
|
|
10965
10965
|
}));
|
|
10966
10966
|
};
|
|
10967
|
-
if (!h.length || !((t == null ? void 0 : t.type) === "stackedBar" || (t == null ? void 0 : t.type) === "stackedLine" ? ((w = (
|
|
10967
|
+
if (!h.length || !((t == null ? void 0 : t.type) === "stackedBar" || (t == null ? void 0 : t.type) === "stackedLine" ? ((w = (B = t == null ? void 0 : t.config) == null ? void 0 : B.groupByColumns) == null ? void 0 : w.length) || ((R = (N = t == null ? void 0 : t.config) == null ? void 0 : N.pivotByColumns) == null ? void 0 : R.length) : (z = (V = t == null ? void 0 : t.config) == null ? void 0 : V.groupByColumns) == null ? void 0 : z.length) || ["table", "kpi", "text", "custom", "heatmap"].includes(r))
|
|
10968
10968
|
return null;
|
|
10969
10969
|
const C = () => {
|
|
10970
10970
|
const b = {
|
|
@@ -10989,7 +10989,7 @@ function Ng() {
|
|
|
10989
10989
|
/* @__PURE__ */ e(Zh, { className: "h-4 w-4 text-muted-foreground" }),
|
|
10990
10990
|
/* @__PURE__ */ e("span", { children: "Colors" })
|
|
10991
10991
|
] }) }),
|
|
10992
|
-
/* @__PURE__ */ e(
|
|
10992
|
+
/* @__PURE__ */ e(Be, { className: "", children: /* @__PURE__ */ a("div", { className: "space-y-3", children: [
|
|
10993
10993
|
/* @__PURE__ */ e("div", { className: "space-y-2", children: /* @__PURE__ */ e("div", { className: "flex items-center justify-between", children: g && /* @__PURE__ */ a(
|
|
10994
10994
|
"button",
|
|
10995
10995
|
{
|
|
@@ -11010,7 +11010,7 @@ function Ng() {
|
|
|
11010
11010
|
open: f === b,
|
|
11011
11011
|
onOpenChange: (E) => u(E ? b : null),
|
|
11012
11012
|
children: [
|
|
11013
|
-
/* @__PURE__ */ e(
|
|
11013
|
+
/* @__PURE__ */ e(Vt, { asChild: !0, children: /* @__PURE__ */ e(
|
|
11014
11014
|
"button",
|
|
11015
11015
|
{
|
|
11016
11016
|
className: "h-5 w-5 shrink-0 rounded border border-input shadow-sm transition-colors hover:border-gray-400 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",
|
|
@@ -11178,7 +11178,7 @@ function Nt({
|
|
|
11178
11178
|
] });
|
|
11179
11179
|
}
|
|
11180
11180
|
function Hn({ axis: t, label: n, type: r, config: s, onChange: l, defaultTitle: c, hidePosition: d }) {
|
|
11181
|
-
var x, y, k, C, g, D, A, M,
|
|
11181
|
+
var x, y, k, C, g, D, A, M, B, w, N, R, V, z;
|
|
11182
11182
|
const [o, i] = G(!!(s != null && s.valueFormat)), f = o || !!(s != null && s.valueFormat), u = (L, b) => {
|
|
11183
11183
|
l({
|
|
11184
11184
|
...s ?? {},
|
|
@@ -11188,7 +11188,7 @@ function Hn({ axis: t, label: n, type: r, config: s, onChange: l, defaultTitle:
|
|
|
11188
11188
|
var F;
|
|
11189
11189
|
const T = L === "enabled" && b === !0 && !((F = s == null ? void 0 : s.name) != null && F.text) && c;
|
|
11190
11190
|
l(
|
|
11191
|
-
|
|
11191
|
+
Bm(s, {
|
|
11192
11192
|
[L]: b,
|
|
11193
11193
|
...T ? { text: c } : {}
|
|
11194
11194
|
})
|
|
@@ -11203,7 +11203,7 @@ function Hn({ axis: t, label: n, type: r, config: s, onChange: l, defaultTitle:
|
|
|
11203
11203
|
}
|
|
11204
11204
|
});
|
|
11205
11205
|
}, h = (L, b) => {
|
|
11206
|
-
l(
|
|
11206
|
+
l(Vm(s, { [L]: b === "" ? null : Number(b) }));
|
|
11207
11207
|
}, v = t === "x" ? ["auto", "top", "bottom"] : ["auto", "left", "right"], S = ["auto", "0", "45", "90", "-45", "-90"];
|
|
11208
11208
|
return /* @__PURE__ */ a(Le, { value: `${t}-axis`, className: "border-b-0", children: [
|
|
11209
11209
|
/* @__PURE__ */ a("div", { className: "flex w-full items-center justify-between gap-2", children: [
|
|
@@ -11218,7 +11218,7 @@ function Hn({ axis: t, label: n, type: r, config: s, onChange: l, defaultTitle:
|
|
|
11218
11218
|
}
|
|
11219
11219
|
)
|
|
11220
11220
|
] }),
|
|
11221
|
-
/* @__PURE__ */ a(
|
|
11221
|
+
/* @__PURE__ */ a(Be, { className: "space-y-4 pt-2", children: [
|
|
11222
11222
|
/* @__PURE__ */ a("div", { className: "space-y-2", children: [
|
|
11223
11223
|
/* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
|
|
11224
11224
|
/* @__PURE__ */ e(
|
|
@@ -11368,7 +11368,7 @@ function Hn({ axis: t, label: n, type: r, config: s, onChange: l, defaultTitle:
|
|
|
11368
11368
|
{
|
|
11369
11369
|
type: "number",
|
|
11370
11370
|
placeholder: "auto",
|
|
11371
|
-
value: ((
|
|
11371
|
+
value: ((B = s == null ? void 0 : s.scale) == null ? void 0 : B.min) === "auto" || ((w = s == null ? void 0 : s.scale) == null ? void 0 : w.min) === void 0 ? "" : String(s.scale.min),
|
|
11372
11372
|
onSave: (L) => h("min", L),
|
|
11373
11373
|
className: ""
|
|
11374
11374
|
}
|
|
@@ -11394,7 +11394,7 @@ function Hn({ axis: t, label: n, type: r, config: s, onChange: l, defaultTitle:
|
|
|
11394
11394
|
{
|
|
11395
11395
|
type: "number",
|
|
11396
11396
|
placeholder: "auto",
|
|
11397
|
-
value: ((
|
|
11397
|
+
value: ((V = s == null ? void 0 : s.scale) == null ? void 0 : V.stepSize) === "auto" || ((z = s == null ? void 0 : s.scale) == null ? void 0 : z.stepSize) === void 0 ? "" : String(s.scale.stepSize),
|
|
11398
11398
|
onSave: (L) => h("stepSize", L),
|
|
11399
11399
|
className: ""
|
|
11400
11400
|
}
|
|
@@ -11457,7 +11457,7 @@ function Cg() {
|
|
|
11457
11457
|
/* @__PURE__ */ e(en, { className: "h-4 w-4 text-muted-foreground" }),
|
|
11458
11458
|
/* @__PURE__ */ e("span", { children: "Axes" })
|
|
11459
11459
|
] }) }),
|
|
11460
|
-
/* @__PURE__ */ e(
|
|
11460
|
+
/* @__PURE__ */ e(Be, { className: "pt-2", children: /* @__PURE__ */ a(hn, { type: "single", collapsible: !0, className: "w-full", children: [
|
|
11461
11461
|
c.hasXAxis && /* @__PURE__ */ e(
|
|
11462
11462
|
Hn,
|
|
11463
11463
|
{
|
|
@@ -11525,7 +11525,7 @@ function wg() {
|
|
|
11525
11525
|
/* @__PURE__ */ e(cp, { className: "h-4 w-4 text-muted-foreground" }),
|
|
11526
11526
|
/* @__PURE__ */ e("span", { children: "Legend" })
|
|
11527
11527
|
] }) }),
|
|
11528
|
-
/* @__PURE__ */ e(
|
|
11528
|
+
/* @__PURE__ */ e(Be, { className: "pt-2", children: /* @__PURE__ */ a("div", { className: "space-y-3", children: [
|
|
11529
11529
|
/* @__PURE__ */ a("div", { className: "flex items-center justify-between", children: [
|
|
11530
11530
|
/* @__PURE__ */ e(O, { className: "text-xs font-medium", children: "Display" }),
|
|
11531
11531
|
/* @__PURE__ */ e(
|
|
@@ -11633,7 +11633,7 @@ function Sg() {
|
|
|
11633
11633
|
const F = f ? ["center", "left", "right"] : ["center", "top", "bottom"];
|
|
11634
11634
|
M = ["auto", ...n === "bullet" ? F : F.filter((P) => P !== A), "custom"];
|
|
11635
11635
|
}
|
|
11636
|
-
const
|
|
11636
|
+
const B = () => Ct(A), w = ["center", "start", "end"], N = ["center", "start", "end", "top", "bottom"], R = d || !!(v != null && v.valueFormat), V = (F) => {
|
|
11637
11637
|
const E = js(
|
|
11638
11638
|
{ type: n, preferences: t.preferences },
|
|
11639
11639
|
{ format: F ?? null }
|
|
@@ -11645,7 +11645,7 @@ function Sg() {
|
|
|
11645
11645
|
/* @__PURE__ */ e(xp, { className: "h-4 w-4 text-muted-foreground" }),
|
|
11646
11646
|
/* @__PURE__ */ e("span", { children: "Data Labels" })
|
|
11647
11647
|
] }) }),
|
|
11648
|
-
/* @__PURE__ */ e(
|
|
11648
|
+
/* @__PURE__ */ e(Be, { className: "pt-2", children: /* @__PURE__ */ a("div", { className: "space-y-3", children: [
|
|
11649
11649
|
/* @__PURE__ */ a("div", { className: "flex items-center justify-between", children: [
|
|
11650
11650
|
/* @__PURE__ */ e(O, { className: "text-xs font-medium", children: "Display" }),
|
|
11651
11651
|
/* @__PURE__ */ e(
|
|
@@ -11667,7 +11667,7 @@ function Sg() {
|
|
|
11667
11667
|
onValueChange: (F) => y("position", F),
|
|
11668
11668
|
children: [
|
|
11669
11669
|
/* @__PURE__ */ e(X, { className: "h-8 text-xs", children: /* @__PURE__ */ e(Z, {}) }),
|
|
11670
|
-
/* @__PURE__ */ e(ee, { children: M.map((F) => /* @__PURE__ */ e(q, { value: F, className: "text-xs", children: F === "auto" ?
|
|
11670
|
+
/* @__PURE__ */ e(ee, { children: M.map((F) => /* @__PURE__ */ e(q, { value: F, className: "text-xs", children: F === "auto" ? B() : F === "custom" ? "Custom (Advanced)" : Ct(F) }, F)) })
|
|
11671
11671
|
]
|
|
11672
11672
|
}
|
|
11673
11673
|
)
|
|
@@ -11725,7 +11725,7 @@ function Sg() {
|
|
|
11725
11725
|
size: "sm",
|
|
11726
11726
|
checked: R,
|
|
11727
11727
|
onCheckedChange: (F) => {
|
|
11728
|
-
o(F), F ||
|
|
11728
|
+
o(F), F || V(void 0);
|
|
11729
11729
|
}
|
|
11730
11730
|
}
|
|
11731
11731
|
)
|
|
@@ -11734,7 +11734,7 @@ function Sg() {
|
|
|
11734
11734
|
_a,
|
|
11735
11735
|
{
|
|
11736
11736
|
formatOptions: jr(v == null ? void 0 : v.valueFormat) || {},
|
|
11737
|
-
onFormatOptionsChange: (F) =>
|
|
11737
|
+
onFormatOptionsChange: (F) => V(qr(F)),
|
|
11738
11738
|
showTitle: !1
|
|
11739
11739
|
}
|
|
11740
11740
|
)
|
|
@@ -11835,7 +11835,7 @@ function kg() {
|
|
|
11835
11835
|
/* @__PURE__ */ e(Ol, { className: "h-4 w-4 text-muted-foreground" }),
|
|
11836
11836
|
/* @__PURE__ */ e("span", { children: "Treemap Colors" })
|
|
11837
11837
|
] }) }),
|
|
11838
|
-
/* @__PURE__ */ e(
|
|
11838
|
+
/* @__PURE__ */ e(Be, { className: "space-y-4 border-t border-border bg-background/50 px-3 py-4 text-sm", children: /* @__PURE__ */ a(
|
|
11839
11839
|
Ir,
|
|
11840
11840
|
{
|
|
11841
11841
|
value: s,
|
|
@@ -11908,7 +11908,7 @@ function Eg() {
|
|
|
11908
11908
|
/* @__PURE__ */ e(Za, { className: "h-4 w-4 text-muted-foreground" }),
|
|
11909
11909
|
/* @__PURE__ */ e("span", { children: "Heatmap Settings" })
|
|
11910
11910
|
] }) }),
|
|
11911
|
-
/* @__PURE__ */ a(
|
|
11911
|
+
/* @__PURE__ */ a(Be, { className: "space-y-4 border-t border-border bg-background/50 px-3 py-4 text-sm", children: [
|
|
11912
11912
|
/* @__PURE__ */ a(
|
|
11913
11913
|
Ir,
|
|
11914
11914
|
{
|
|
@@ -12115,7 +12115,7 @@ function Fg() {
|
|
|
12115
12115
|
f(b), y({ showRanges: b });
|
|
12116
12116
|
}, M = (b) => {
|
|
12117
12117
|
m(b), y({ rangesArePercentages: b });
|
|
12118
|
-
},
|
|
12118
|
+
}, B = c.orientation || (((L = t == null ? void 0 : t.chartOptions) == null ? void 0 : L.indexAxis) === "y" ? "horizontal" : "vertical"), w = (b) => {
|
|
12119
12119
|
y({ orientation: b }), l(b === "horizontal" ? "y" : "x");
|
|
12120
12120
|
}, N = [
|
|
12121
12121
|
{ value: "__none", label: "None" },
|
|
@@ -12123,7 +12123,7 @@ function Fg() {
|
|
|
12123
12123
|
value: b.value,
|
|
12124
12124
|
label: b.label
|
|
12125
12125
|
}))
|
|
12126
|
-
], R = N,
|
|
12126
|
+
], R = N, V = (b) => {
|
|
12127
12127
|
if (v(b), !b) {
|
|
12128
12128
|
y({
|
|
12129
12129
|
comparativeMetricKey: void 0,
|
|
@@ -12152,14 +12152,14 @@ function Fg() {
|
|
|
12152
12152
|
/* @__PURE__ */ e(Rl, { className: "h-4 w-4 text-muted-foreground" }),
|
|
12153
12153
|
/* @__PURE__ */ e("span", { children: "Bullet Chart" })
|
|
12154
12154
|
] }) }),
|
|
12155
|
-
/* @__PURE__ */ a(
|
|
12155
|
+
/* @__PURE__ */ a(Be, { className: "space-y-6 border-t border-border/50 py-4", children: [
|
|
12156
12156
|
/* @__PURE__ */ a("section", { className: "space-y-4", children: [
|
|
12157
12157
|
/* @__PURE__ */ a("div", { className: "space-y-1.5", children: [
|
|
12158
12158
|
/* @__PURE__ */ e(O, { className: "text-xs font-medium", children: "ORIENTATION" }),
|
|
12159
12159
|
/* @__PURE__ */ a(
|
|
12160
12160
|
W,
|
|
12161
12161
|
{
|
|
12162
|
-
value:
|
|
12162
|
+
value: B,
|
|
12163
12163
|
onValueChange: (b) => w(b),
|
|
12164
12164
|
children: [
|
|
12165
12165
|
/* @__PURE__ */ e(X, { className: "h-8 text-xs", children: /* @__PURE__ */ e(Z, {}) }),
|
|
@@ -12229,7 +12229,7 @@ function Fg() {
|
|
|
12229
12229
|
{
|
|
12230
12230
|
size: "sm",
|
|
12231
12231
|
checked: h,
|
|
12232
|
-
onCheckedChange: (b) =>
|
|
12232
|
+
onCheckedChange: (b) => V(b)
|
|
12233
12233
|
}
|
|
12234
12234
|
)
|
|
12235
12235
|
] }),
|
|
@@ -12385,7 +12385,7 @@ function dl(t) {
|
|
|
12385
12385
|
return n;
|
|
12386
12386
|
}
|
|
12387
12387
|
function Dg() {
|
|
12388
|
-
var D, A, M,
|
|
12388
|
+
var D, A, M, B, w, N, R, V, z, L, b, _;
|
|
12389
12389
|
const t = I((T) => T.card.preferences), n = I((T) => T.card), r = lt(), s = I((T) => T.isDevMode), { setCardPreferences: l, updateCardInFrame: c } = ye(), d = r === "bubble", o = r === "scatter", i = se(
|
|
12390
12390
|
() => (t == null ? void 0 : t.bubbleScatterConfig) || {},
|
|
12391
12391
|
[t == null ? void 0 : t.bubbleScatterConfig]
|
|
@@ -12460,7 +12460,7 @@ function Dg() {
|
|
|
12460
12460
|
" Configuration"
|
|
12461
12461
|
] })
|
|
12462
12462
|
] }) }),
|
|
12463
|
-
/* @__PURE__ */ a(
|
|
12463
|
+
/* @__PURE__ */ a(Be, { className: "space-y-4 px-1 pb-4", children: [
|
|
12464
12464
|
/* @__PURE__ */ a("div", { className: "space-y-3", children: [
|
|
12465
12465
|
/* @__PURE__ */ a("div", { className: "flex items-center gap-1 text-xs font-medium text-muted-foreground", children: [
|
|
12466
12466
|
"Dimensions",
|
|
@@ -12636,7 +12636,7 @@ function Dg() {
|
|
|
12636
12636
|
className: "h-8 text-xs",
|
|
12637
12637
|
type: "number",
|
|
12638
12638
|
placeholder: "30",
|
|
12639
|
-
value: ((
|
|
12639
|
+
value: ((B = i.maxRadius) == null ? void 0 : B.toString()) || "",
|
|
12640
12640
|
onCommit: (T) => k({ maxRadius: T ? Number(T) : void 0 })
|
|
12641
12641
|
}
|
|
12642
12642
|
)
|
|
@@ -12712,7 +12712,7 @@ function Dg() {
|
|
|
12712
12712
|
}
|
|
12713
12713
|
)
|
|
12714
12714
|
] }),
|
|
12715
|
-
((
|
|
12715
|
+
((V = (R = t == null ? void 0 : t.xAxisConfig) == null ? void 0 : R.name) == null ? void 0 : V.enabled) && /* @__PURE__ */ a("div", { className: "grid grid-cols-2 gap-2", children: [
|
|
12716
12716
|
/* @__PURE__ */ a("div", { className: "space-y-1", children: [
|
|
12717
12717
|
/* @__PURE__ */ e(O, { className: "text-xs", children: "X Title" }),
|
|
12718
12718
|
/* @__PURE__ */ e(
|
|
@@ -12805,7 +12805,7 @@ function Ag() {
|
|
|
12805
12805
|
/* @__PURE__ */ e(fa, { className: "h-4 w-4 text-muted-foreground" }),
|
|
12806
12806
|
/* @__PURE__ */ e("span", { children: "Funnel Settings" })
|
|
12807
12807
|
] }) }),
|
|
12808
|
-
/* @__PURE__ */ a(
|
|
12808
|
+
/* @__PURE__ */ a(Be, { className: "space-y-4 border-t border-border bg-background/50 px-3 py-4 text-sm", children: [
|
|
12809
12809
|
/* @__PURE__ */ a("div", { className: "space-y-2", children: [
|
|
12810
12810
|
/* @__PURE__ */ e(O, { className: "text-xs font-medium", children: "PERCENTAGE MODE" }),
|
|
12811
12811
|
/* @__PURE__ */ e(
|
|
@@ -12894,7 +12894,7 @@ function gn() {
|
|
|
12894
12894
|
var d, o;
|
|
12895
12895
|
const t = I((i) => i.card), { data: n, comparisonMetadata: r } = nt(t), s = (n == null ? void 0 : n.records) || [], { keys: l } = Sl(s, r), c = l.slice(1).filter((i) => !$m.includes(i));
|
|
12896
12896
|
if (Ld(t.type)) {
|
|
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) ? _d(s, i.metricColumns || []) : s, u =
|
|
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) ? _d(s, i.metricColumns || []) : s, u = Bd({
|
|
12898
12898
|
card: t,
|
|
12899
12899
|
cardType: t.type,
|
|
12900
12900
|
records: f,
|
|
@@ -13174,7 +13174,7 @@ function xn({
|
|
|
13174
13174
|
const Lg = [
|
|
13175
13175
|
{ type: "bar", icon: mn, label: "Bar" },
|
|
13176
13176
|
{ type: "line", icon: un, label: "Line" }
|
|
13177
|
-
], _g = [0, 1, 2, 3, 4, 5, 6, 8, 10],
|
|
13177
|
+
], _g = [0, 1, 2, 3, 4, 5, 6, 8, 10], Bg = [
|
|
13178
13178
|
{ value: "circle", label: "Circle ●" },
|
|
13179
13179
|
{ value: "rect", label: "Square ■" },
|
|
13180
13180
|
{ value: "rectRounded", label: "Rounded ▢" },
|
|
@@ -13185,7 +13185,7 @@ const Lg = [
|
|
|
13185
13185
|
{ value: "star", label: "Star ★" },
|
|
13186
13186
|
{ value: "dash", label: "Dash —" },
|
|
13187
13187
|
{ value: "line", label: "Line │" }
|
|
13188
|
-
],
|
|
13188
|
+
], Vg = [
|
|
13189
13189
|
{ value: "solid", label: "Solid ───" },
|
|
13190
13190
|
{ value: "dashed", label: "Dashed - - -" },
|
|
13191
13191
|
{ value: "dotted", label: "Dotted ···" },
|
|
@@ -13200,7 +13200,7 @@ function Kg() {
|
|
|
13200
13200
|
/* @__PURE__ */ e(Pa, { className: "h-4 w-4 text-muted-foreground" }),
|
|
13201
13201
|
/* @__PURE__ */ e("span", { children: "Series" })
|
|
13202
13202
|
] }) }),
|
|
13203
|
-
/* @__PURE__ */ e(
|
|
13203
|
+
/* @__PURE__ */ e(Be, { className: "pt-2", children: /* @__PURE__ */ e(jg, {}) })
|
|
13204
13204
|
] });
|
|
13205
13205
|
}
|
|
13206
13206
|
function jg() {
|
|
@@ -13350,7 +13350,7 @@ function qg({ metricKey: t, idx: n }) {
|
|
|
13350
13350
|
onValueChange: (k) => p({ lineStyle: k }),
|
|
13351
13351
|
children: [
|
|
13352
13352
|
/* @__PURE__ */ e(X, { className: "h-8 w-full text-xs", children: /* @__PURE__ */ e(Z, {}) }),
|
|
13353
|
-
/* @__PURE__ */ e(ee, { children:
|
|
13353
|
+
/* @__PURE__ */ e(ee, { children: Vg.map(({ value: k, label: C }) => /* @__PURE__ */ e(
|
|
13354
13354
|
q,
|
|
13355
13355
|
{
|
|
13356
13356
|
value: k,
|
|
@@ -13394,7 +13394,7 @@ function qg({ metricKey: t, idx: n }) {
|
|
|
13394
13394
|
onValueChange: (k) => p({ pointStyle: k }),
|
|
13395
13395
|
children: [
|
|
13396
13396
|
/* @__PURE__ */ e(X, { className: "h-8 w-full text-xs", children: /* @__PURE__ */ e(Z, {}) }),
|
|
13397
|
-
/* @__PURE__ */ e(ee, { children:
|
|
13397
|
+
/* @__PURE__ */ e(ee, { children: Bg.map(({ value: k, label: C }) => /* @__PURE__ */ e(
|
|
13398
13398
|
q,
|
|
13399
13399
|
{
|
|
13400
13400
|
value: k,
|
|
@@ -13472,7 +13472,7 @@ function Hg() {
|
|
|
13472
13472
|
/* @__PURE__ */ e(Pa, { className: "h-4 w-4 text-muted-foreground" }),
|
|
13473
13473
|
/* @__PURE__ */ e("span", { children: "Series" })
|
|
13474
13474
|
] }) }),
|
|
13475
|
-
/* @__PURE__ */ e(
|
|
13475
|
+
/* @__PURE__ */ e(Be, { className: "pt-2", children: /* @__PURE__ */ e(Yg, {}) })
|
|
13476
13476
|
] });
|
|
13477
13477
|
}
|
|
13478
13478
|
function Yg() {
|
|
@@ -13702,7 +13702,7 @@ function Xg() {
|
|
|
13702
13702
|
/* @__PURE__ */ e(Pa, { className: "h-4 w-4 text-muted-foreground" }),
|
|
13703
13703
|
/* @__PURE__ */ e("span", { children: "Series" })
|
|
13704
13704
|
] }) }),
|
|
13705
|
-
/* @__PURE__ */ e(
|
|
13705
|
+
/* @__PURE__ */ e(Be, { className: "pt-2", children: /* @__PURE__ */ e(Zg, {}) })
|
|
13706
13706
|
] });
|
|
13707
13707
|
}
|
|
13708
13708
|
function Zg() {
|
|
@@ -13894,7 +13894,7 @@ function ax() {
|
|
|
13894
13894
|
/* @__PURE__ */ e(Pa, { className: "h-4 w-4 text-muted-foreground" }),
|
|
13895
13895
|
/* @__PURE__ */ e("span", { children: "Series" })
|
|
13896
13896
|
] }) }),
|
|
13897
|
-
/* @__PURE__ */ e(
|
|
13897
|
+
/* @__PURE__ */ e(Be, { className: "pt-2", children: /* @__PURE__ */ e(nx, {}) })
|
|
13898
13898
|
] });
|
|
13899
13899
|
}
|
|
13900
13900
|
function nx() {
|
|
@@ -14071,7 +14071,7 @@ function ix() {
|
|
|
14071
14071
|
/* @__PURE__ */ e(fp, { className: "h-4 w-4 text-muted-foreground" }),
|
|
14072
14072
|
/* @__PURE__ */ e("span", { children: "Line Style" })
|
|
14073
14073
|
] }) }),
|
|
14074
|
-
/* @__PURE__ */ e(
|
|
14074
|
+
/* @__PURE__ */ e(Be, { className: "pt-2", children: /* @__PURE__ */ a("div", { className: "space-y-3", children: [
|
|
14075
14075
|
/* @__PURE__ */ e("p", { className: "text-xs text-muted-foreground", children: "Default styles for all series. Override per-series in the Series section." }),
|
|
14076
14076
|
/* @__PURE__ */ a("div", { className: "space-y-1.5", children: [
|
|
14077
14077
|
/* @__PURE__ */ e(O, { className: "text-xs font-medium", children: "Line Pattern" }),
|
|
@@ -14163,7 +14163,7 @@ function mx() {
|
|
|
14163
14163
|
/* @__PURE__ */ e(io, { className: "h-4 w-4 text-muted-foreground" }),
|
|
14164
14164
|
/* @__PURE__ */ e("span", { children: "Bar Style" })
|
|
14165
14165
|
] }) }),
|
|
14166
|
-
/* @__PURE__ */ e(
|
|
14166
|
+
/* @__PURE__ */ e(Be, { className: "pt-2", children: /* @__PURE__ */ a("div", { className: "space-y-3", children: [
|
|
14167
14167
|
/* @__PURE__ */ e("p", { className: "text-xs text-muted-foreground", children: "Default styles for all bars. Override per-series in the Series section." }),
|
|
14168
14168
|
/* @__PURE__ */ a("div", { className: "space-y-1.5", children: [
|
|
14169
14169
|
/* @__PURE__ */ e(O, { className: "text-xs font-medium", children: "Corner Radius" }),
|
|
@@ -14230,7 +14230,7 @@ function hx() {
|
|
|
14230
14230
|
/* @__PURE__ */ e(Fo, { className: "h-3.5 w-3.5 text-foreground/60" }),
|
|
14231
14231
|
"Sort"
|
|
14232
14232
|
] }) }),
|
|
14233
|
-
/* @__PURE__ */ e(
|
|
14233
|
+
/* @__PURE__ */ e(Be, { className: "space-y-4 px-1", children: /* @__PURE__ */ a("div", { className: "space-y-2", children: [
|
|
14234
14234
|
/* @__PURE__ */ e(O, { children: "Sort Order" }),
|
|
14235
14235
|
/* @__PURE__ */ e(
|
|
14236
14236
|
Ja,
|
|
@@ -14292,12 +14292,12 @@ function xx() {
|
|
|
14292
14292
|
}, x = (g, D) => {
|
|
14293
14293
|
const A = Qt(g), M = p.filter(
|
|
14294
14294
|
(w) => v.has(Qt(w))
|
|
14295
|
-
),
|
|
14295
|
+
), B = D ? v.has(A) ? M : [...M, g].slice(0, Wn) : M.filter(
|
|
14296
14296
|
(w) => Qt(w) !== A
|
|
14297
14297
|
);
|
|
14298
14298
|
S({
|
|
14299
|
-
breakdownDimensions:
|
|
14300
|
-
...
|
|
14299
|
+
breakdownDimensions: B,
|
|
14300
|
+
...B.length > 0 ? { showOnCard: !0 } : {}
|
|
14301
14301
|
});
|
|
14302
14302
|
};
|
|
14303
14303
|
return /* @__PURE__ */ a(Le, { value: "summary", className: "border-none", children: [
|
|
@@ -14305,7 +14305,7 @@ function xx() {
|
|
|
14305
14305
|
/* @__PURE__ */ e(xl, { className: "h-3.5 w-3.5 text-foreground/60" }),
|
|
14306
14306
|
/* @__PURE__ */ e("span", { children: "Summary" })
|
|
14307
14307
|
] }) }),
|
|
14308
|
-
/* @__PURE__ */ a(
|
|
14308
|
+
/* @__PURE__ */ a(Be, { className: "space-y-3 pb-4 pt-2", children: [
|
|
14309
14309
|
/* @__PURE__ */ a("div", { className: "flex items-center justify-between", children: [
|
|
14310
14310
|
/* @__PURE__ */ e(O, { htmlFor: "summary-enabled", className: "text-xs", children: "Show summary" }),
|
|
14311
14311
|
/* @__PURE__ */ e(
|
|
@@ -14390,7 +14390,7 @@ function xx() {
|
|
|
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 D = Qt(g), A = v.has(D), M = v.size >= Wn,
|
|
14393
|
+
const D = Qt(g), A = v.has(D), M = v.size >= Wn, B = !u || !A && M;
|
|
14394
14394
|
return /* @__PURE__ */ a(
|
|
14395
14395
|
"li",
|
|
14396
14396
|
{
|
|
@@ -14401,7 +14401,7 @@ function xx() {
|
|
|
14401
14401
|
{
|
|
14402
14402
|
id: `summary-breakdown-${D}`,
|
|
14403
14403
|
checked: A,
|
|
14404
|
-
disabled:
|
|
14404
|
+
disabled: B,
|
|
14405
14405
|
onCheckedChange: (w) => x(g, w === !0)
|
|
14406
14406
|
}
|
|
14407
14407
|
),
|
|
@@ -14449,7 +14449,7 @@ function yx({ card: t }) {
|
|
|
14449
14449
|
/* @__PURE__ */ e(Io, { className: "h-3.5 w-3.5 text-foreground/60", "aria-hidden": !0 }),
|
|
14450
14450
|
/* @__PURE__ */ e("span", { children: "Trend" })
|
|
14451
14451
|
] }) }),
|
|
14452
|
-
/* @__PURE__ */ a(
|
|
14452
|
+
/* @__PURE__ */ a(Be, { className: "space-y-3 pb-4 pt-2", children: [
|
|
14453
14453
|
/* @__PURE__ */ a("div", { className: "flex items-center justify-between", children: [
|
|
14454
14454
|
/* @__PURE__ */ e(O, { htmlFor: "kpi-trend", className: "text-xs", children: "Show trend" }),
|
|
14455
14455
|
/* @__PURE__ */ e(ke, { id: "kpi-trend", size: "xs", checked: d, disabled: c && !d, onCheckedChange: u })
|
|
@@ -14459,7 +14459,7 @@ function yx({ card: t }) {
|
|
|
14459
14459
|
l ? /* @__PURE__ */ a("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
|
Xn(l.granularity),
|
|
14461
14461
|
" · from Trend By",
|
|
14462
|
-
/* @__PURE__ */ e(
|
|
14462
|
+
/* @__PURE__ */ e(Vd, { className: "h-3 w-3 text-muted-foreground", "aria-hidden": !0 })
|
|
14463
14463
|
] }) : /* @__PURE__ */ a(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__ */ a(ee, { children: [
|
|
@@ -14520,7 +14520,7 @@ function Cx() {
|
|
|
14520
14520
|
/* @__PURE__ */ e(Zt, { className: "h-3.5 w-3.5 text-foreground/60" }),
|
|
14521
14521
|
/* @__PURE__ */ e("span", { children: "Tooltip Format" })
|
|
14522
14522
|
] }) }),
|
|
14523
|
-
/* @__PURE__ */ a(
|
|
14523
|
+
/* @__PURE__ */ a(Be, { className: "space-y-4 pt-2", children: [
|
|
14524
14524
|
/* @__PURE__ */ a("div", { className: "flex items-center justify-between", children: [
|
|
14525
14525
|
/* @__PURE__ */ a("div", { className: "space-y-1", children: [
|
|
14526
14526
|
/* @__PURE__ */ e(O, { className: "text-xs font-medium text-muted-foreground", children: "Override metric format" }),
|
|
@@ -14614,7 +14614,7 @@ function Sx({
|
|
|
14614
14614
|
}
|
|
14615
14615
|
return /* @__PURE__ */ a(pn, { className: "h-full w-full text-sm", children: [
|
|
14616
14616
|
l(),
|
|
14617
|
-
/* @__PURE__ */ e(
|
|
14617
|
+
/* @__PURE__ */ e(Bu, { orientation: "horizontal" })
|
|
14618
14618
|
] });
|
|
14619
14619
|
}
|
|
14620
14620
|
const kx = 32;
|
|
@@ -14652,7 +14652,7 @@ function Tx() {
|
|
|
14652
14652
|
children: /* @__PURE__ */ e("div", { className: "flex min-h-0 min-w-0 flex-1 flex-col", children: /* @__PURE__ */ e(Xp, {}) })
|
|
14653
14653
|
}
|
|
14654
14654
|
),
|
|
14655
|
-
/* @__PURE__ */ e(
|
|
14655
|
+
/* @__PURE__ */ e(Vf, { onToggleEditor: f, children: /* @__PURE__ */ e(
|
|
14656
14656
|
$n,
|
|
14657
14657
|
{
|
|
14658
14658
|
mode: "toolbar",
|
|
@@ -14787,7 +14787,7 @@ function ci({
|
|
|
14787
14787
|
children: u === "asc" ? /* @__PURE__ */ e(zd, { className: "h-3 w-3" }) : /* @__PURE__ */ e(Ud, { className: "h-3 w-3" })
|
|
14788
14788
|
}
|
|
14789
14789
|
),
|
|
14790
|
-
h && /* @__PURE__ */ e(
|
|
14790
|
+
h && /* @__PURE__ */ e(Vt, { asChild: !0, children: /* @__PURE__ */ e(
|
|
14791
14791
|
"button",
|
|
14792
14792
|
{
|
|
14793
14793
|
type: "button",
|
|
@@ -15042,7 +15042,7 @@ function Dx({ idx: t }) {
|
|
|
15042
15042
|
}
|
|
15043
15043
|
}
|
|
15044
15044
|
return /* @__PURE__ */ a(At, { children: [
|
|
15045
|
-
/* @__PURE__ */ e(
|
|
15045
|
+
/* @__PURE__ */ e(Vt, { children: /* @__PURE__ */ e(Hd, { className: "size-4 rotate-[135deg] cursor-pointer text-muted-foreground hover:text-foreground" }) }),
|
|
15046
15046
|
/* @__PURE__ */ e(Mt, { className: "w-fit px-2 py-1", children: /* @__PURE__ */ a("div", { className: "flex gap-1", children: [
|
|
15047
15047
|
/* @__PURE__ */ e(
|
|
15048
15048
|
"button",
|
|
@@ -15599,7 +15599,7 @@ function _x({
|
|
|
15599
15599
|
] });
|
|
15600
15600
|
}
|
|
15601
15601
|
const Zn = "auto", $a = "block text-xs font-medium text-muted-foreground";
|
|
15602
|
-
function
|
|
15602
|
+
function Bx({
|
|
15603
15603
|
format: t,
|
|
15604
15604
|
column: n,
|
|
15605
15605
|
dateOnly: r,
|
|
@@ -15618,8 +15618,8 @@ function Vx({
|
|
|
15618
15618
|
}, k = y(t);
|
|
15619
15619
|
if (i !== null) {
|
|
15620
15620
|
const g = d.kind === "custom" ? d.dialect : void 0, D = d.kind === "custom" ? d.pattern : d.kind === "display" ? Rn(v).pattern ?? "" : "", A = () => {
|
|
15621
|
-
const M = $s(i, g),
|
|
15622
|
-
m(
|
|
15621
|
+
const M = $s(i, g), B = M.ok ? y(M.format) : M.reason;
|
|
15622
|
+
m(B), M.ok && !B && JSON.stringify(M.format) !== JSON.stringify(t) && c(M.format);
|
|
15623
15623
|
};
|
|
15624
15624
|
return /* @__PURE__ */ a("div", { className: "space-y-1", children: [
|
|
15625
15625
|
/* @__PURE__ */ e(O, { className: $a, children: "Custom pattern" }),
|
|
@@ -15633,9 +15633,9 @@ function Vx({
|
|
|
15633
15633
|
onClick: (M) => M.stopPropagation(),
|
|
15634
15634
|
onChange: (M) => {
|
|
15635
15635
|
M.stopPropagation();
|
|
15636
|
-
const
|
|
15637
|
-
f(
|
|
15638
|
-
const w = $s(
|
|
15636
|
+
const B = M.target.value;
|
|
15637
|
+
f(B);
|
|
15638
|
+
const w = $s(B, g);
|
|
15639
15639
|
m(w.ok ? y(w.format) : w.reason);
|
|
15640
15640
|
},
|
|
15641
15641
|
onBlur: A,
|
|
@@ -15740,7 +15740,7 @@ function Vx({
|
|
|
15740
15740
|
)
|
|
15741
15741
|
] });
|
|
15742
15742
|
}
|
|
15743
|
-
function
|
|
15743
|
+
function Vx(t, n) {
|
|
15744
15744
|
return t === "pivotBy" && n === "table";
|
|
15745
15745
|
}
|
|
15746
15746
|
const Kx = [], er = {
|
|
@@ -15774,9 +15774,9 @@ function jx({
|
|
|
15774
15774
|
isLoading: y,
|
|
15775
15775
|
hasError: k,
|
|
15776
15776
|
refetch: C
|
|
15777
|
-
} = Xl(), { userContext: g } = on(), { tokenProps: D } = ea(), A = Zl(g), M = br(),
|
|
15777
|
+
} = Xl(), { userContext: g } = on(), { tokenProps: D } = ea(), A = Zl(g), M = br(), B = Kl() ?? pa, w = Zd() ?? pa, N = eu(), {
|
|
15778
15778
|
updateLabel: R,
|
|
15779
|
-
handleAggregationChange:
|
|
15779
|
+
handleAggregationChange: V,
|
|
15780
15780
|
handleDetailDateFormatChange: z,
|
|
15781
15781
|
handleDimensionFormatChange: L,
|
|
15782
15782
|
handleTemporalBucketFormatChange: b,
|
|
@@ -15799,7 +15799,7 @@ function jx({
|
|
|
15799
15799
|
handleMetricPercentOfTotalScopeChange: ue,
|
|
15800
15800
|
handleMetricPercentOfTotalOutputChange: Ce,
|
|
15801
15801
|
handleMetricTargetValueChange: Te
|
|
15802
|
-
} = eo(o), [
|
|
15802
|
+
} = eo(o), [Ve, Ue] = G(!1), [pe, $e] = G(() => {
|
|
15803
15803
|
var H;
|
|
15804
15804
|
return !!((H = t.parameters) != null && H.windowTransform);
|
|
15805
15805
|
}), [Ke, Ge] = G(!1), [vt, Xe] = G(!1), [yt, ot] = G(null), oe = se(() => {
|
|
@@ -15862,7 +15862,7 @@ function jx({
|
|
|
15862
15862
|
const be = n === "groupBy" ? or(
|
|
15863
15863
|
fe,
|
|
15864
15864
|
ge.format,
|
|
15865
|
-
|
|
15865
|
+
B
|
|
15866
15866
|
).find(
|
|
15867
15867
|
(Ne) => Ne.value === "custom"
|
|
15868
15868
|
) : void 0, J = n === "groupBy" ? re || (((Ee = be == null ? void 0 : be.format) == null ? void 0 : Ee.presentation.mode) === "pattern" ? be.format.presentation.pattern : "") : re;
|
|
@@ -15918,7 +15918,7 @@ function jx({
|
|
|
15918
15918
|
field: t,
|
|
15919
15919
|
sheetFields: (i == null ? void 0 : i.calculatedFields) || [],
|
|
15920
15920
|
dashboardFields: v
|
|
15921
|
-
}) : void 0, es = Cn && (kt == null ? void 0 : kt.scope) === "sheet", ts = Cn && (kt == null ? void 0 : kt.scope) === "dashboard", ba = yn === "domain_calculated" || t.fieldScope === "domain", as = ba ? ru(t, S) : void 0, ia = ba ? "domain" : es ? "sheet" : ts ? "dashboard" : "card",
|
|
15921
|
+
}) : void 0, es = Cn && (kt == null ? void 0 : kt.scope) === "sheet", ts = Cn && (kt == null ? void 0 : kt.scope) === "dashboard", ba = yn === "domain_calculated" || t.fieldScope === "domain", as = ba ? ru(t, S) : void 0, ia = ba ? "domain" : es ? "sheet" : ts ? "dashboard" : "card", Ba = ba ? as || t : (es || ts) && (kt != null && kt.matchedField) ? kt.matchedField : t, xi = ba ? as ? "effective" : y ? "loading" : k ? "unavailable" : "unverified" : void 0, ns = (H) => {
|
|
15922
15922
|
var fe;
|
|
15923
15923
|
if (vn(H), n === "metrics") {
|
|
15924
15924
|
const Ee = {
|
|
@@ -15939,18 +15939,18 @@ function jx({
|
|
|
15939
15939
|
oe.dataType || t.dataType
|
|
15940
15940
|
), rs = wn === "date", Sn = d === "kpi", kn = n === "detailColumns", ss = (xs = o.config) == null ? void 0 : xs.metricColumns, ls = (bs = o.config) == null ? void 0 : bs.groupByColumns, os = su(o), is = xe((H) => H.dashboard), cs = xe(
|
|
15941
15941
|
(H) => H.semanticExecutionPayload
|
|
15942
|
-
),
|
|
15942
|
+
), Va = t.nativeDataType || t.dataType, vi = se(
|
|
15943
15943
|
() => n === "detailColumns" ? rh({
|
|
15944
15944
|
format: void 0,
|
|
15945
|
-
valueKind: zs(
|
|
15945
|
+
valueKind: zs(Va) ? "date" : "wall_datetime",
|
|
15946
15946
|
preferences: w,
|
|
15947
15947
|
calendarTimezone: N || "UTC"
|
|
15948
15948
|
}) : void 0,
|
|
15949
|
-
[
|
|
15949
|
+
[Va, N, w, n]
|
|
15950
15950
|
), Tn = n === "groupBy" && Fe ? or(
|
|
15951
15951
|
Fe,
|
|
15952
15952
|
ge.format,
|
|
15953
|
-
|
|
15953
|
+
B
|
|
15954
15954
|
) : [], yi = ie ? "custom" : !Fe && n === "groupBy" ? void 0 : Tn.some((H) => H.value === Me) ? Me : ((vs = Tn[0]) == null ? void 0 : vs.value) ?? "YYYY-MM-DD", pt = se(
|
|
15955
15955
|
() => tp(
|
|
15956
15956
|
o,
|
|
@@ -15977,7 +15977,7 @@ function jx({
|
|
|
15977
15977
|
we(() => {
|
|
15978
15978
|
va && $e(!0);
|
|
15979
15979
|
}, [va]);
|
|
15980
|
-
const Fi = n !== "pivotBy" && n !== "sortBy", Di =
|
|
15980
|
+
const Fi = n !== "pivotBy" && n !== "sortBy", Di = Vx(
|
|
15981
15981
|
n,
|
|
15982
15982
|
d
|
|
15983
15983
|
), Ii = t.memberOrder ?? "auto", Ai = rs && n === "groupBy", Mi = !Sn && rs && (n === "groupBy" || kn), Pi = n === "metrics", Ri = !Sn && wn === "number" && (n === "groupBy" || kn) && ch(d), ja = !!(dt && Object.values(dt.comparison).some((H) => H.offered)), Oi = () => {
|
|
@@ -16036,7 +16036,7 @@ function jx({
|
|
|
16036
16036
|
]
|
|
16037
16037
|
}
|
|
16038
16038
|
)
|
|
16039
|
-
] }),
|
|
16039
|
+
] }), Bi = () => Di ? /* @__PURE__ */ a("div", { className: "space-y-1", children: [
|
|
16040
16040
|
/* @__PURE__ */ e(O, { className: "text-xs font-medium text-muted-foreground", children: "Pivot column order" }),
|
|
16041
16041
|
/* @__PURE__ */ a(
|
|
16042
16042
|
W,
|
|
@@ -16075,14 +16075,14 @@ function jx({
|
|
|
16075
16075
|
),
|
|
16076
16076
|
Sn && /* @__PURE__ */ e("p", { className: "text-[11px] leading-4 text-muted-foreground", children: 'Sets where a "To date" comparison cuts the current period.' }),
|
|
16077
16077
|
ze && /* @__PURE__ */ e("p", { className: "text-[11px] leading-4 text-muted-foreground", children: "Follows the date range: by day for a week, by week for a quarter, by month for a year." })
|
|
16078
|
-
] }) : null,
|
|
16078
|
+
] }) : null, Vi = () => {
|
|
16079
16079
|
var H;
|
|
16080
16080
|
return Mi ? n === "detailColumns" ? /* @__PURE__ */ e(
|
|
16081
|
-
|
|
16081
|
+
Bx,
|
|
16082
16082
|
{
|
|
16083
16083
|
format: t.format,
|
|
16084
16084
|
column: t,
|
|
16085
|
-
dateOnly: zs(
|
|
16085
|
+
dateOnly: zs(Va),
|
|
16086
16086
|
connectionType: (H = o.dataSource) == null ? void 0 : H.connectionType,
|
|
16087
16087
|
automaticPreview: vi ?? "",
|
|
16088
16088
|
onChange: (fe) => z(r, fe)
|
|
@@ -16172,7 +16172,7 @@ function jx({
|
|
|
16172
16172
|
{
|
|
16173
16173
|
value: t.aggregate,
|
|
16174
16174
|
onValueChange: (J) => {
|
|
16175
|
-
|
|
16175
|
+
V(r, J);
|
|
16176
16176
|
},
|
|
16177
16177
|
disabled: H,
|
|
16178
16178
|
children: [
|
|
@@ -16210,7 +16210,7 @@ function jx({
|
|
|
16210
16210
|
/* @__PURE__ */ a("div", { className: "flex items-center text-[11px] text-muted-foreground", children: [
|
|
16211
16211
|
!pe && /* @__PURE__ */ e("span", { className: "mr-2", children: Pt ? er[Pt] : "None" }),
|
|
16212
16212
|
/* @__PURE__ */ e(
|
|
16213
|
-
|
|
16213
|
+
Bt,
|
|
16214
16214
|
{
|
|
16215
16215
|
className: Q(
|
|
16216
16216
|
"h-3 w-3 transition-transform",
|
|
@@ -16735,14 +16735,14 @@ function jx({
|
|
|
16735
16735
|
zone: n,
|
|
16736
16736
|
label: vo(t),
|
|
16737
16737
|
dataType: wn,
|
|
16738
|
-
nativeDataType:
|
|
16738
|
+
nativeDataType: Va,
|
|
16739
16739
|
calculated: Ar(t),
|
|
16740
|
-
open:
|
|
16740
|
+
open: Ve,
|
|
16741
16741
|
onOpenChange: Ue,
|
|
16742
16742
|
onRemove: bi,
|
|
16743
16743
|
sortDirection: s,
|
|
16744
16744
|
onSortDirectionChange: n === "sortBy" ? l : void 0,
|
|
16745
|
-
badge: /* @__PURE__ */ e(me, { children: n === "metrics" && ((ws = Ze == null ? void 0 : Ze.conditions) == null ? void 0 : ws.length) && !
|
|
16745
|
+
badge: /* @__PURE__ */ e(me, { children: n === "metrics" && ((ws = Ze == null ? void 0 : Ze.conditions) == null ? void 0 : ws.length) && !Ve && /* @__PURE__ */ e(bt, { children: /* @__PURE__ */ a(mt, { children: [
|
|
16746
16746
|
/* @__PURE__ */ e(ht, { asChild: !0, children: /* @__PURE__ */ a("div", { className: "flex shrink-0 items-center gap-1 rounded-[3px] bg-primary/10 px-1 text-[10px] tabular-nums text-primary/90", children: [
|
|
16747
16747
|
/* @__PURE__ */ e(fa, { className: "h-2.5 w-2.5" }),
|
|
16748
16748
|
/* @__PURE__ */ e("span", { children: Ze.conditions.length })
|
|
@@ -16757,10 +16757,10 @@ function jx({
|
|
|
16757
16757
|
children: qi && /* @__PURE__ */ a(me, { children: [
|
|
16758
16758
|
Oi(),
|
|
16759
16759
|
_i(),
|
|
16760
|
-
|
|
16760
|
+
Bi(),
|
|
16761
16761
|
Li(),
|
|
16762
16762
|
d === "kpi" && fs(),
|
|
16763
|
-
|
|
16763
|
+
Vi(),
|
|
16764
16764
|
Ki(),
|
|
16765
16765
|
ji()
|
|
16766
16766
|
] })
|
|
@@ -16802,7 +16802,7 @@ function jx({
|
|
|
16802
16802
|
open: vt,
|
|
16803
16803
|
onOpenChange: Xe,
|
|
16804
16804
|
availableFields: S,
|
|
16805
|
-
existingField:
|
|
16805
|
+
existingField: Ba,
|
|
16806
16806
|
existingFieldScope: ia,
|
|
16807
16807
|
domainDefinitionStatus: xi,
|
|
16808
16808
|
initialFieldType: "metric",
|
|
@@ -16822,7 +16822,7 @@ function jx({
|
|
|
16822
16822
|
storedFields: fe.calculatedFields || [],
|
|
16823
16823
|
sharedFields: J,
|
|
16824
16824
|
updatedField: H,
|
|
16825
|
-
editingField:
|
|
16825
|
+
editingField: Ba,
|
|
16826
16826
|
previousScope: ia
|
|
16827
16827
|
});
|
|
16828
16828
|
Object.keys(Ne).length && be.updateCardConfig(o.id, Ne), be.updateCard(o.id, {
|
|
@@ -16859,7 +16859,7 @@ function jx({
|
|
|
16859
16859
|
valueAliases: J.valueAliases,
|
|
16860
16860
|
parameters: J.parameters
|
|
16861
16861
|
},
|
|
16862
|
-
editingField:
|
|
16862
|
+
editingField: Ba,
|
|
16863
16863
|
previousScope: ia
|
|
16864
16864
|
});
|
|
16865
16865
|
Ga({
|
|
@@ -16896,7 +16896,7 @@ function jx({
|
|
|
16896
16896
|
valueAliases: J.valueAliases,
|
|
16897
16897
|
parameters: J.parameters
|
|
16898
16898
|
},
|
|
16899
|
-
editingField:
|
|
16899
|
+
editingField: Ba,
|
|
16900
16900
|
previousScope: ia
|
|
16901
16901
|
});
|
|
16902
16902
|
p(Rt), Et && Et !== Ne && Ga({
|
|
@@ -17043,8 +17043,8 @@ const ul = [
|
|
|
17043
17043
|
{ label: "Electronics", values: ["2,300", "1,800", "3,400"] },
|
|
17044
17044
|
{ label: "Clothing", values: ["1,300", "620", "480"] }
|
|
17045
17045
|
], Gx = {
|
|
17046
|
-
groupBy:
|
|
17047
|
-
pivotBy:
|
|
17046
|
+
groupBy: Vl,
|
|
17047
|
+
pivotBy: Bl,
|
|
17048
17048
|
metrics: pp,
|
|
17049
17049
|
detailColumns: lo,
|
|
17050
17050
|
sortBy: Fo
|
|
@@ -17068,7 +17068,7 @@ function Ta({
|
|
|
17068
17068
|
}), i = Wi(n), { updateSortByColumn: f } = ye(), u = I((g) => g.card), m = I((g) => g.card.type), p = r.length > 0, h = i !== null, v = (i == null ? void 0 : i.kind) !== "refused", S = (i == null ? void 0 : i.kind) === "refused" ? lu(i.notice, s) : null, x = xt((g, D) => {
|
|
17069
17069
|
var M;
|
|
17070
17070
|
!((M = u.config) != null && M.sortByColumns) || u.config.sortByColumns.findIndex(
|
|
17071
|
-
(
|
|
17071
|
+
(B) => B.id === g
|
|
17072
17072
|
) === -1 || f(u.id, g, { direction: D });
|
|
17073
17073
|
}, [u, f]), y = se(
|
|
17074
17074
|
() => /* @__PURE__ */ e("div", { className: "space-y-1", children: r.map((g, D) => {
|
|
@@ -17096,7 +17096,7 @@ function Ta({
|
|
|
17096
17096
|
zone: n,
|
|
17097
17097
|
index: D,
|
|
17098
17098
|
sortDirection: M,
|
|
17099
|
-
onSortDirectionChange: (
|
|
17099
|
+
onSortDirectionChange: (B) => x(g.id, B),
|
|
17100
17100
|
hasPivotColumns: d,
|
|
17101
17101
|
cardType: m
|
|
17102
17102
|
}
|
|
@@ -17270,7 +17270,7 @@ function Zx({
|
|
|
17270
17270
|
var ce;
|
|
17271
17271
|
return ae.visualEditPendingDashboardCalculatedFields ?? ((ce = ae.dashboard) == null ? void 0 : ce.calculatedFields);
|
|
17272
17272
|
}
|
|
17273
|
-
) ?? Xx, { scopedFields:
|
|
17273
|
+
) ?? Xx, { scopedFields: B } = Jl(), { userContext: w } = on(), N = v && (m == null ? void 0 : m.id) === f.id && S ? S : f == null ? void 0 : f.type, R = N === "detailTable", V = r.length > 0 || l.length > 0 || d.length > 0, z = !R && (N !== "kpi" || l.length <= 2), L = !R, b = !R && N !== "kpi", _ = N !== "kpi" && N !== "matrixTable" && V, T = R, F = "Drop sort fields here", E = Zl(w), P = [
|
|
17274
17274
|
"pie",
|
|
17275
17275
|
"doughnut",
|
|
17276
17276
|
"polar",
|
|
@@ -17365,7 +17365,7 @@ function Zx({
|
|
|
17365
17365
|
className: "sticky top-0 z-10 flex items-center justify-between bg-background px-4 py-2",
|
|
17366
17366
|
children: [
|
|
17367
17367
|
/* @__PURE__ */ e("span", { className: "text-[11px] font-semibold uppercase tracking-[0.08em] text-foreground/70", children: "Fields" }),
|
|
17368
|
-
|
|
17368
|
+
V && /* @__PURE__ */ e(
|
|
17369
17369
|
"button",
|
|
17370
17370
|
{
|
|
17371
17371
|
type: "button",
|
|
@@ -17384,7 +17384,7 @@ function Zx({
|
|
|
17384
17384
|
{
|
|
17385
17385
|
open: o,
|
|
17386
17386
|
onOpenChange: i,
|
|
17387
|
-
availableFields:
|
|
17387
|
+
availableFields: B,
|
|
17388
17388
|
initialFieldType: "metric",
|
|
17389
17389
|
allowedFieldTypes: ["metric"],
|
|
17390
17390
|
onSave: (ae) => {
|
|
@@ -17482,7 +17482,7 @@ function eb() {
|
|
|
17482
17482
|
/* @__PURE__ */ e("span", { className: "text-[11px] font-semibold uppercase tracking-[0.08em] text-foreground/70", children: x })
|
|
17483
17483
|
] }),
|
|
17484
17484
|
/* @__PURE__ */ e(
|
|
17485
|
-
|
|
17485
|
+
Bt,
|
|
17486
17486
|
{
|
|
17487
17487
|
className: Q(
|
|
17488
17488
|
"h-3 w-3 text-muted-foreground transition-transform",
|
|
@@ -17510,7 +17510,7 @@ function eb() {
|
|
|
17510
17510
|
/* @__PURE__ */ e("span", { className: "text-[11px] font-semibold uppercase tracking-[0.08em] text-foreground/70", children: "Component settings" })
|
|
17511
17511
|
] }),
|
|
17512
17512
|
/* @__PURE__ */ e(
|
|
17513
|
-
|
|
17513
|
+
Bt,
|
|
17514
17514
|
{
|
|
17515
17515
|
className: Q(
|
|
17516
17516
|
"h-3 w-3 text-muted-foreground transition-transform",
|
|
@@ -17634,7 +17634,7 @@ function ab({
|
|
|
17634
17634
|
sortByFields: f,
|
|
17635
17635
|
detailFields: u
|
|
17636
17636
|
}) {
|
|
17637
|
-
var
|
|
17637
|
+
var B;
|
|
17638
17638
|
const [m, p] = G(!1), h = I((w) => w.card), v = I((w) => w.editorContext), S = I(
|
|
17639
17639
|
(w) => w.actions.updateCardConfig
|
|
17640
17640
|
), x = (v == null ? void 0 : v.type) === "documentSection", { autoJoinMetadata: y } = nt(h), k = Mr(h) || (y != null && y.autoResolved ? y.resolvedJoinPlan : {
|
|
@@ -17648,7 +17648,7 @@ function ab({
|
|
|
17648
17648
|
dialect: "none"
|
|
17649
17649
|
},
|
|
17650
17650
|
joins: []
|
|
17651
|
-
}), C = ((
|
|
17651
|
+
}), C = ((B = h == null ? void 0 : h.dataSource) == null ? void 0 : B.selectedEntities) || [], g = (w) => {
|
|
17652
17652
|
S(h.id, ga(h, w)), p(!1);
|
|
17653
17653
|
}, D = () => {
|
|
17654
17654
|
S(h.id, ga(h, void 0)), p(!1);
|
|
@@ -18061,7 +18061,7 @@ function fb({
|
|
|
18061
18061
|
(pe) => pe.actions.removeCardInlineFilterValue
|
|
18062
18062
|
), o = xe((pe) => pe.selectedSheetId), { updateCardConfig: i, setCard: f, updateCardInFrame: u } = ye(), [m, p] = G(!1), [h, v] = G(!1), [S, x] = G(
|
|
18063
18063
|
null
|
|
18064
|
-
), { config: y } = pr(yr).tokenProps, k = (y == null ? void 0 : y.showInfoTab) !== !1, C = (y == null ? void 0 : y.showQueryDebugTools) !== !1, [g, D] = ub(), A = _r(l.type), M = k && yo(l.type),
|
|
18064
|
+
), { config: y } = pr(yr).tokenProps, k = (y == null ? void 0 : y.showInfoTab) !== !1, C = (y == null ? void 0 : y.showQueryDebugTools) !== !1, [g, D] = ub(), A = _r(l.type), M = k && yo(l.type), B = k && !M, w = t === "table" && (g || !A) || t === "info" && !M ? "chart" : t;
|
|
18065
18065
|
I(
|
|
18066
18066
|
(pe) => {
|
|
18067
18067
|
var $e;
|
|
@@ -18070,7 +18070,7 @@ function fb({
|
|
|
18070
18070
|
);
|
|
18071
18071
|
const N = lt(), {
|
|
18072
18072
|
data: R,
|
|
18073
|
-
errorMessage:
|
|
18073
|
+
errorMessage: V,
|
|
18074
18074
|
isLoading: z,
|
|
18075
18075
|
isFetching: L,
|
|
18076
18076
|
errorSql: b,
|
|
@@ -18094,7 +18094,7 @@ function fb({
|
|
|
18094
18094
|
sheetKind: "dashboard",
|
|
18095
18095
|
calendar: ((Ke = pe.reportContext) == null ? void 0 : Ke.calendar) ?? null
|
|
18096
18096
|
}),
|
|
18097
|
-
errorMessage:
|
|
18097
|
+
errorMessage: V,
|
|
18098
18098
|
errorSql: b,
|
|
18099
18099
|
generatedSql: R == null ? void 0 : R.sql
|
|
18100
18100
|
});
|
|
@@ -18138,7 +18138,7 @@ function fb({
|
|
|
18138
18138
|
}, Te = se(() => {
|
|
18139
18139
|
var pe;
|
|
18140
18140
|
return vu((pe = l.config) == null ? void 0 : pe.sortByColumns);
|
|
18141
|
-
}, [(Ue = l.config) == null ? void 0 : Ue.sortByColumns]),
|
|
18141
|
+
}, [(Ue = l.config) == null ? void 0 : Ue.sortByColumns]), Ve = yu(
|
|
18142
18142
|
tn(s) || null
|
|
18143
18143
|
);
|
|
18144
18144
|
return /* @__PURE__ */ e("div", { className: "relative flex w-0 grow flex-col", children: /* @__PURE__ */ a("div", { className: "group/visualization relative flex h-full max-w-full grow flex-col", children: [
|
|
@@ -18150,7 +18150,7 @@ function fb({
|
|
|
18150
18150
|
activeView: w,
|
|
18151
18151
|
onViewChange: n,
|
|
18152
18152
|
splitViewEnabled: g,
|
|
18153
|
-
hasQueryError: !!
|
|
18153
|
+
hasQueryError: !!V
|
|
18154
18154
|
}
|
|
18155
18155
|
) }),
|
|
18156
18156
|
N === "kpi" && /* @__PURE__ */ e(pb, { visible: !0, className: "self-center" }),
|
|
@@ -18168,7 +18168,7 @@ function fb({
|
|
|
18168
18168
|
{
|
|
18169
18169
|
cardId: s.id,
|
|
18170
18170
|
cardFilters: tn(s),
|
|
18171
|
-
cardFilterCount:
|
|
18171
|
+
cardFilterCount: Ve,
|
|
18172
18172
|
onFiltersClick: r,
|
|
18173
18173
|
inlineFilters: s.inlineFilters,
|
|
18174
18174
|
inlineFilterValues: c,
|
|
@@ -18226,7 +18226,7 @@ function fb({
|
|
|
18226
18226
|
/* @__PURE__ */ a(Ft, { onSelect: r, children: [
|
|
18227
18227
|
/* @__PURE__ */ e(fa, { className: "h-3.5 w-3.5 text-muted-foreground" }),
|
|
18228
18228
|
"Card filters",
|
|
18229
|
-
|
|
18229
|
+
Ve > 0 && /* @__PURE__ */ e("span", { className: "ml-auto text-[11px] tabular-nums text-muted-foreground", children: Ve })
|
|
18230
18230
|
] }),
|
|
18231
18231
|
/* @__PURE__ */ e(
|
|
18232
18232
|
Jr,
|
|
@@ -18271,10 +18271,10 @@ function fb({
|
|
|
18271
18271
|
] })
|
|
18272
18272
|
] }),
|
|
18273
18273
|
/* @__PURE__ */ a("div", { className: "flex min-h-0 grow flex-col", children: [
|
|
18274
|
-
w === "chart" ?
|
|
18274
|
+
w === "chart" ? V ? B ? /* @__PURE__ */ e("div", { className: "flex min-h-0 flex-1 flex-col px-1 pb-2", children: /* @__PURE__ */ e(
|
|
18275
18275
|
Qs,
|
|
18276
18276
|
{
|
|
18277
|
-
error:
|
|
18277
|
+
error: V,
|
|
18278
18278
|
errorSql: b,
|
|
18279
18279
|
onSendFeedback: $,
|
|
18280
18280
|
onOpenInEditor: Rr(l.type) ? j : void 0
|
|
@@ -18282,7 +18282,7 @@ function fb({
|
|
|
18282
18282
|
) }) : /* @__PURE__ */ e(
|
|
18283
18283
|
mb,
|
|
18284
18284
|
{
|
|
18285
|
-
error:
|
|
18285
|
+
error: V,
|
|
18286
18286
|
showInfoTab: M
|
|
18287
18287
|
}
|
|
18288
18288
|
) : /* @__PURE__ */ e("div", { className: "flex grow flex-col", children: /* @__PURE__ */ e(
|
|
@@ -18326,10 +18326,10 @@ function fb({
|
|
|
18326
18326
|
}
|
|
18327
18327
|
)
|
|
18328
18328
|
] }),
|
|
18329
|
-
w === "info" && M && /* @__PURE__ */ e("div", { className: "flex min-h-0 flex-1 flex-col pb-2", children: /* @__PURE__ */ e("div", { className: "flex min-h-0 flex-1 flex-col rounded-md bg-background px-1", children:
|
|
18329
|
+
w === "info" && M && /* @__PURE__ */ e("div", { className: "flex min-h-0 flex-1 flex-col pb-2", children: /* @__PURE__ */ e("div", { className: "flex min-h-0 flex-1 flex-col rounded-md bg-background px-1", children: V ? /* @__PURE__ */ e(
|
|
18330
18330
|
Qs,
|
|
18331
18331
|
{
|
|
18332
|
-
error:
|
|
18332
|
+
error: V,
|
|
18333
18333
|
errorSql: b,
|
|
18334
18334
|
defaultDetailsOpen: !0,
|
|
18335
18335
|
debugPayloads: le,
|
|
@@ -18436,11 +18436,11 @@ function vb() {
|
|
|
18436
18436
|
}
|
|
18437
18437
|
})
|
|
18438
18438
|
), M = h, {
|
|
18439
|
-
getFieldsForContainer:
|
|
18439
|
+
getFieldsForContainer: B,
|
|
18440
18440
|
placeField: w,
|
|
18441
18441
|
previewFieldPlacement: N,
|
|
18442
18442
|
removeField: R,
|
|
18443
|
-
resetFields:
|
|
18443
|
+
resetFields: V
|
|
18444
18444
|
} = eo(M, g), {
|
|
18445
18445
|
dropStore: z,
|
|
18446
18446
|
handleDragStart: L,
|
|
@@ -18488,14 +18488,14 @@ function vb() {
|
|
|
18488
18488
|
ab,
|
|
18489
18489
|
{
|
|
18490
18490
|
onRemoveField: R,
|
|
18491
|
-
onResetFields:
|
|
18491
|
+
onResetFields: V,
|
|
18492
18492
|
selectedChart: u,
|
|
18493
18493
|
onChartChange: m,
|
|
18494
|
-
groupByFields:
|
|
18495
|
-
pivotByFields:
|
|
18496
|
-
metricsFields:
|
|
18497
|
-
sortByFields:
|
|
18498
|
-
detailFields:
|
|
18494
|
+
groupByFields: B("groupBy"),
|
|
18495
|
+
pivotByFields: B("pivotBy"),
|
|
18496
|
+
metricsFields: B("metrics"),
|
|
18497
|
+
sortByFields: B("sortBy"),
|
|
18498
|
+
detailFields: B("detailColumns"),
|
|
18499
18499
|
isVisible: d,
|
|
18500
18500
|
onToggleVisibility: () => o(!d)
|
|
18501
18501
|
}
|
|
@@ -18509,7 +18509,7 @@ function vb() {
|
|
|
18509
18509
|
onFiltersClick: () => s(!0),
|
|
18510
18510
|
filterCount: le,
|
|
18511
18511
|
activeCard: M,
|
|
18512
|
-
getFieldsForContainer:
|
|
18512
|
+
getFieldsForContainer: B,
|
|
18513
18513
|
cards: p.cards,
|
|
18514
18514
|
activeCardId: p.activeCardId,
|
|
18515
18515
|
addCard: v,
|