react-semaphor 0.1.438 → 0.1.439
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/{dashboard-H2ONqclF.js → dashboard-DXTiQI-G.js} +14850 -14755
- package/dist/chunks/{dashboard-Cm4D_4sW.js → dashboard-DuS8HC11.js} +201 -201
- package/dist/chunks/{dashboard-briefing-launcher-B2ktS4sN.js → dashboard-briefing-launcher-DD8lR1Au.js} +2 -2
- package/dist/chunks/{dashboard-briefing-launcher-BevUTBG_.js → dashboard-briefing-launcher-FFtLgrV4.js} +1 -1
- package/dist/chunks/{dashboard-controls-8G5EZjyA.js → dashboard-controls-Jd2pIzDA.js} +1 -1
- package/dist/chunks/{dashboard-controls-BMy5GxU5.js → dashboard-controls-dlVDuUIE.js} +3 -3
- package/dist/chunks/{dashboard-json-BLxeyDM2.js → dashboard-json--vVimEkU.js} +1 -1
- package/dist/chunks/{dashboard-json-DWF407Fp.js → dashboard-json-BV47cQM5.js} +1 -1
- package/dist/chunks/{edit-dashboard-visual-DCx9r7g2.js → edit-dashboard-visual-BJ2q0svk.js} +453 -467
- package/dist/chunks/{edit-dashboard-visual-C0-7PJ0V.js → edit-dashboard-visual-BpPTfU9y.js} +2 -2
- package/dist/chunks/{report-preferences-dialog-D98RpVTB.js → report-preferences-dialog-Dpu8q4pi.js} +1 -1
- package/dist/chunks/{report-preferences-dialog-Sl3VZLDC.js → report-preferences-dialog-Oe6nmu2r.js} +1 -1
- package/dist/chunks/{use-create-flow-overlay-state-D2y57BqL.js → use-create-flow-overlay-state-CqKpuL7v.js} +1 -1
- package/dist/chunks/{use-create-flow-overlay-state-B7nbDg72.js → use-create-flow-overlay-state-CsWhd5aC.js} +1 -1
- package/dist/dashboard/index.cjs +1 -1
- package/dist/dashboard/index.js +1 -1
- package/dist/data-app-builder/index.cjs +1 -1
- package/dist/data-app-builder/index.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +4 -4
- package/dist/style.css +1 -1
- package/dist/surfboard/index.cjs +1 -1
- package/dist/surfboard/index.js +2 -2
- package/package.json +1 -1
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { jsx as e, jsxs as n, Fragment as Se } from "react/jsx-runtime";
|
|
2
2
|
import * as zc from "react";
|
|
3
|
-
import tn, { useState as K, useEffect as Ce, useRef as Ee, useCallback as Ie, useMemo as ce, useContext as ws, Suspense as $c
|
|
4
|
-
import { d1 as
|
|
3
|
+
import tn, { useState as K, useEffect as Ce, useRef as Ee, useCallback as Ie, useMemo as ce, useContext as ws, Suspense as $c } from "react";
|
|
4
|
+
import { d1 as Ri, aH as Fn, aI as Rn, aJ as Pn, aK as Ln, aL as Xn, aF as mr, bm as Et, bq as jt, d2 as Pi, d3 as ir, aG as et, d4 as Li, d5 as or, b4 as Ia, aZ as bt, cj as Ss, b2 as ta, br as na, bn as wt, d6 as hr, d7 as Ts, d8 as Vi, d9 as Bi, da as qc, db as jc, dc as Kc, dd as Uc, b8 as vr, de as Gc, df as Hc, dg as cs, dh as cr, az as zn, an as _i, di as Qc, dj as Wc, dk as zi, dl as $i, dm as Jc, dn as Yc, dp as Xc, dq as Zc, bg as $n, bh as Nn, bi as Cn, bj as ja, bk as nn, bl as Yn, dr as ds, ds as ed, cb as wa, dt as qi, aN as rn, aO as ft, du as td, dv as ji, cK as gn, cR as Ki, dw as ks, dx as nd, dy as Ui, dz as ad, dA as Gi, dB as rd, dC as sd, dD as ld, aD as Hi, dE as id, dF as od, dG as cd, dH as dd, dI as ud, dJ as md, dK as zr, dL as hd, dM as zl, dN as pd, dO as $l, dP as fd, dQ as gd, cg as aa, ch as ra, ci as sa, b$ as mt, dR as Da, b5 as Qi, bv as Wt, bx as Jt, dS as Is, bM as Ds, aM as Es, dT as xd, dU as bd, dV as As, dW as yd, dX as Wi, dY as Ji, dZ as Yi, d_ as Xi, d$ as Ht, e0 as vd, e1 as Nd, e2 as Cd, e3 as wd, e4 as Zi, e5 as eo, r as to, e6 as no, e7 as Sd, e8 as Td, e9 as kd, ea as Ea, M as Id, eb as Dd, ec as Ed, ed as ql, ee as Ad, E as Nr, e as Os, ef as Od, eg as Ms, bE as Md, eh as jl, I as gt, ei as Fd, ej as Rd, ek as ao, el as ro, em as Pd, en as Fs, eo as Rs, ep as so, eq as lo, er as Kl, es as Ka, et as Ld, eu as Vd, ev as Bd, ew as _d, ex as zd, ey as pr, ez as $d, eA as qd, eB as io, eC as oo, eD as jd, eE as Kd, cu as Ud, eF as Gd, eG as co, eH as Hd, eI as Qd, cv as Cr, eJ as wr, bF as Aa, bG as Qt, eK as mn, eL as Ps, eM as Vn, eN as Bn, eO as xn, eP as Zn, eQ as Wd, eR as Jd, eS as Yd, eT as Xd, eU as Zd, eV as eu, eW as Ul, bw as an, eX as tu, eY as uo, eZ as nu, e_ as au, e$ as mo, f0 as ru, f1 as su, f2 as lu, f3 as iu, f4 as $r, f5 as ou, f6 as cu, f7 as Sr, f8 as du, f9 as uu, fa as ho, fb as mu, fc as hu, fd as pu, fe as fu, ff as gu, fg as us, fh as xu, fi as bu, fj as ms, fk as yu, fl as vu, fm as Nu, fn as Cu, fo as Gl, b3 as hs, a$ as bn, aP as wu, aQ as Su, aS as Tu, aT as ku, aU as Iu, aV as Du, aW as Eu, aX as Au, aY as Ou, c1 as Mu, fp as Oa, fq as Ma, fr as Fa, cl as Ls, cm as Fu, b1 as Ru, fs as Pu, ft as Lu, fu as Vu, fv as Tr, fw as it, fx as ot, fy as ct, fz as Bu, fA as _u, fB as po, fC as fo, fD as go, fE as zu, fF as $u, fG as ps, fH as qu, fI as ju, fJ as Ku, fK as Uu, fL as Gu, fM as Hu, fN as Qu, fO as Wu, fP as Ju, fQ as Yu, fR as Xu, fS as Zu, fT as Dn, fU as va, fV as em, fW as Hl, fX as tm, fY as nm, fZ as qr, f_ as Ql, f$ as am, g0 as rm, g1 as sm, g2 as lm, g3 as im, aB as Vs, aC as Ra, g4 as jr, g5 as xo, b6 as om, g6 as fr, g7 as cm, g8 as bo, g9 as yo, ga as dm, gb as um, ar as mm, gc as ar, gd as hm, ge as Wl, gf as pm, gg as fm, gh as Jl, gi as gm, gj as xm, gk as bm, gl as ym, gm as vm, aR as vo, gn as Nm, go as Cm, gp as wm, gq as Sm, gr as Tm, gs as km, gt as Im, gu as Dm, gv as No, gw as Em, gx as Am, gy as kr, cL as Ir, gz as Co, gA as Om, gB as Mm, gC as wo, gD as Fm, gE as Rm, gF as Dr, gG as Kr, gH as Pm, gI as Lm, gJ as Vm, gK as Bm, gL as ea, gM as Yl, gN as So, gO as _m, cx as zm, gP as To, gQ as ko, gR as dr, gS as Io, gT as Do, gU as $m, gV as Xl, gW as qm, gX as jm, gY as ur, gZ as Km, g_ as Bs, g$ as Um, h0 as gr, h as Pa, i as La, k as Va, j as Ba, l as _a, m as za, h1 as Gm, h2 as $a, h3 as hn, h4 as fs, h5 as gs, h6 as qa, h7 as Eo, h8 as Hm, h9 as Ur, ha as Gr, hb as Qm, hc as Hr, hd as Wm, he as Zl, hf as ei, hg as Jm, cT as Ym, hh as Xm, cU as Zm, cW as eh, cX as th, av as nh, hi as ah, hj as rh, hk as sh, cn as lh, co as ih, cp as oh, b_ as Er, hl as Ar, hm as ti, hn as Ao, cN as Qr, ho as ch, hp as dh, hq as uh, F as mh, bp as hh, hr as ph, hs as fh } from "./dashboard-DXTiQI-G.js";
|
|
5
5
|
import { c as Ue, C as Ft, X as tt } from "./index-xHCrHprY.js";
|
|
6
|
-
import { D as Ne, B as ee, N as xr, H as Ua, c as W, aN as gh, O as $, _ as ne, $ as ae, a0 as re, a1 as se, a2 as j, E as P, Y as At, Q as Bt, V as Ot, W as Mt, P as Rt, a as Lt, b as Pt, C as yn, aO as xh, aG as Sa, aP as _s, aQ as
|
|
6
|
+
import { D as Ne, B as ee, N as xr, H as Ua, c as W, aN as gh, O as $, _ as ne, $ as ae, a0 as re, a1 as se, a2 as j, E as P, Y as At, Q as Bt, V as Ot, W as Mt, P as Rt, a as Lt, b as Pt, C as yn, aO as xh, aG as Sa, aP as _s, aQ as Oo, aD as zs, aB as bh, Z as Pe, aR as yh, L as vn, u as ye, d as wn, aS as $s, X as sn, A as Mo, T as Ga, F as Ha, G as Yt, I as On, M as Or, S as _n, aH as Mn, aT as vh, aU as Nh, aV as Fo, af as Ch, aJ as wh, aW as Sh, aX as Th, aY as ni, aZ as kh, a_ as Ih, a$ as Dh, b0 as Eh, b1 as Ah, b2 as Oh, b3 as ai, b4 as Mh, b5 as ri, R as xs, b6 as la, b7 as Fh, a3 as Ke, b8 as Rh, b9 as qs, ba as bs, bb as Ro, bc as pn, bd as rr, be as Po, bf as Ph, bg as Lo, bh as Lh, bi as Vh, bj as Vt, bk as Bh, K as Vo, bl as ht, bm as Bo, w as si, bn as _h, bo as zh, bp as $h, bq as qh, br as jh, bs as Kh, bt as Uh, bu as Gh, bv as Hh, bw as Qh, bx as Wh, by as Jh, bz as Yh, bA as li, bB as Xh, bC as Zh, bD as ep, bE as tp, J as Mr, a6 as np } from "./code-editor-25d16KDV.js";
|
|
7
7
|
import "./analyze-result-contract-CfOBEwaC.js";
|
|
8
8
|
import { DEFAULT_RESOLVED_VALUE_FORMAT_PREFERENCES as ys } from "../value-format-preferences/index.js";
|
|
9
9
|
import { C as Kt, E as vs, S as Fr, M as ap, a as rp } from "./search-DHZCro8B.js";
|
|
10
|
-
import { f as sp, g as yt, r as _o, h as Qa, i as zo, V as $o, e as lp, C as ip } from "./use-create-flow-overlay-state-
|
|
10
|
+
import { f as sp, g as yt, r as _o, h as Qa, i as zo, V as $o, e as lp, C as ip } from "./use-create-flow-overlay-state-CqKpuL7v.js";
|
|
11
11
|
import { h as ia } from "./card-config-utils-BYZ5MJOh.js";
|
|
12
12
|
import { createPortal as op } from "react-dom";
|
|
13
13
|
import "./index-If0wlXGi.js";
|
|
14
14
|
import "./comparison-document-migration-Dj6xZMCb.js";
|
|
15
15
|
import "../briefings/index.js";
|
|
16
16
|
import { a as cp, r as dp } from "./numeric-presentation-BJs5lSar.js";
|
|
17
|
-
import { D as
|
|
17
|
+
import { D as ii } from "./metric-comparison-CPoDx56y.js";
|
|
18
18
|
import { P as up } from "./palette-jqaAcwiQ.js";
|
|
19
19
|
import { a as mp } from "./common-types-ClkOI-3O.js";
|
|
20
20
|
/**
|
|
@@ -77,7 +77,7 @@ const jo = Ue("Blocks", [
|
|
|
77
77
|
* This source code is licensed under the ISC license.
|
|
78
78
|
* See the LICENSE file in the root directory of this source tree.
|
|
79
79
|
*/
|
|
80
|
-
const
|
|
80
|
+
const js = Ue("Columns3", [
|
|
81
81
|
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
|
|
82
82
|
["path", { d: "M9 3v18", key: "fh3hqa" }],
|
|
83
83
|
["path", { d: "M15 3v18", key: "14nvp0" }]
|
|
@@ -225,7 +225,7 @@ const Np = Ue("ListEnd", [
|
|
|
225
225
|
* This source code is licensed under the ISC license.
|
|
226
226
|
* See the LICENSE file in the root directory of this source tree.
|
|
227
227
|
*/
|
|
228
|
-
const
|
|
228
|
+
const oi = Ue("ListFilter", [
|
|
229
229
|
["path", { d: "M3 6h18", key: "d0wm0j" }],
|
|
230
230
|
["path", { d: "M7 12h10", key: "b7w52i" }],
|
|
231
231
|
["path", { d: "M10 18h4", key: "1ulq68" }]
|
|
@@ -448,7 +448,7 @@ function Pp({
|
|
|
448
448
|
}) {
|
|
449
449
|
const [r, s] = K(
|
|
450
450
|
[]
|
|
451
|
-
), { updateDataSource: c } = Ne(), { selectedEntities: i } =
|
|
451
|
+
), { updateDataSource: c } = Ne(), { selectedEntities: i } = Ri("dashboard");
|
|
452
452
|
Ce(() => {
|
|
453
453
|
t && s([]);
|
|
454
454
|
}, [t]);
|
|
@@ -531,7 +531,7 @@ function Pp({
|
|
|
531
531
|
onCheckedChange: () => l(h)
|
|
532
532
|
}
|
|
533
533
|
),
|
|
534
|
-
/* @__PURE__ */ e("div", { className: "flex items-center gap-2 text-muted-foreground", children:
|
|
534
|
+
/* @__PURE__ */ e("div", { className: "flex items-center gap-2 text-muted-foreground", children: Pi(h.type) }),
|
|
535
535
|
/* @__PURE__ */ n("div", { className: "min-w-0 flex-1", children: [
|
|
536
536
|
/* @__PURE__ */ e("div", { className: "truncate font-medium", children: u(h) }),
|
|
537
537
|
/* @__PURE__ */ e("div", { className: "truncate text-sm text-muted-foreground", children: f(h) })
|
|
@@ -650,7 +650,7 @@ function Bp(t, a) {
|
|
|
650
650
|
}))
|
|
651
651
|
};
|
|
652
652
|
}
|
|
653
|
-
function
|
|
653
|
+
function ci(t, a) {
|
|
654
654
|
if (!(t != null && t.joins.length))
|
|
655
655
|
return [];
|
|
656
656
|
const r = [
|
|
@@ -661,7 +661,7 @@ function di(t, a) {
|
|
|
661
661
|
!Cs(a, c) && !Cs(s, c) && s.push(c);
|
|
662
662
|
}), s;
|
|
663
663
|
}
|
|
664
|
-
function
|
|
664
|
+
function di() {
|
|
665
665
|
return {
|
|
666
666
|
id: "group-" + Date.now() + "-" + Math.random().toString(36).substr(2, 9),
|
|
667
667
|
operator: "AND",
|
|
@@ -836,7 +836,7 @@ function _p({
|
|
|
836
836
|
addJoinKeyGroup: (E) => {
|
|
837
837
|
const I = r.joins.find((w) => w.id === E);
|
|
838
838
|
if (!I) return;
|
|
839
|
-
const F = [...I.joinKeyGroups,
|
|
839
|
+
const F = [...I.joinKeyGroups, di()];
|
|
840
840
|
d(E, { joinKeyGroups: F });
|
|
841
841
|
},
|
|
842
842
|
updateGroupOperator: (E, I, F) => {
|
|
@@ -859,7 +859,7 @@ function _p({
|
|
|
859
859
|
), M = a.find(
|
|
860
860
|
(L) => L.name === F.target.name
|
|
861
861
|
), A = [...F.joinKeyGroups];
|
|
862
|
-
A[I] || (A[I] =
|
|
862
|
+
A[I] || (A[I] = di());
|
|
863
863
|
const C = {
|
|
864
864
|
id: `key-${Date.now()}`,
|
|
865
865
|
source: {
|
|
@@ -985,7 +985,7 @@ function Kp({
|
|
|
985
985
|
onRemove: s,
|
|
986
986
|
onCancel: c
|
|
987
987
|
}) {
|
|
988
|
-
const { columnGroups: i } =
|
|
988
|
+
const { columnGroups: i } = Li(), l = i.filter(
|
|
989
989
|
(O) => O.entityName !== gh
|
|
990
990
|
), {
|
|
991
991
|
joinPlan: o,
|
|
@@ -1937,7 +1937,7 @@ function Jp() {
|
|
|
1937
1937
|
},
|
|
1938
1938
|
...l,
|
|
1939
1939
|
selectedEntities: (l == null ? void 0 : l.selectedEntities) || []
|
|
1940
|
-
}, x =
|
|
1940
|
+
}, x = qc(h.selectedEntities), T = x.length, v = T === 0 ? "Choose dataset" : T === 1 ? Xr(x[0]) : `${T} datasets`, g = ((C = (A = (M = o == null ? void 0 : o.config) == null ? void 0 : M.joinPlan) == null ? void 0 : A.joins) == null ? void 0 : C.length) ?? 0, k = ci(
|
|
1941
1941
|
(L = o == null ? void 0 : o.config) == null ? void 0 : L.joinPlan,
|
|
1942
1942
|
x
|
|
1943
1943
|
), R = k.length > 0, N = !d && (T > 1 || g > 0), y = !!(f != null && f.autoResolved);
|
|
@@ -1947,13 +1947,13 @@ function Jp() {
|
|
|
1947
1947
|
const O = x.filter(
|
|
1948
1948
|
(z) => !ir(z, D)
|
|
1949
1949
|
);
|
|
1950
|
-
o &&
|
|
1950
|
+
o && ci((B = o.config) == null ? void 0 : B.joinPlan, O).length > 0 && m(o.id, {
|
|
1951
1951
|
...o.config,
|
|
1952
1952
|
joinPlan: void 0
|
|
1953
1953
|
}), u({
|
|
1954
1954
|
...h,
|
|
1955
1955
|
...h.mode === "semanticDomain" ? {
|
|
1956
|
-
semanticDomainId:
|
|
1956
|
+
semanticDomainId: jc(O)
|
|
1957
1957
|
} : {},
|
|
1958
1958
|
selectedEntities: O
|
|
1959
1959
|
});
|
|
@@ -1965,7 +1965,7 @@ function Jp() {
|
|
|
1965
1965
|
}, w = () => {
|
|
1966
1966
|
u({
|
|
1967
1967
|
...h,
|
|
1968
|
-
selectedEntities:
|
|
1968
|
+
selectedEntities: Kc([
|
|
1969
1969
|
...x,
|
|
1970
1970
|
...k
|
|
1971
1971
|
])
|
|
@@ -2064,7 +2064,7 @@ function Jp() {
|
|
|
2064
2064
|
/* @__PURE__ */ e("div", { className: "mb-1.5 flex items-center justify-between", children: /* @__PURE__ */ e("p", { className: "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", children: "Join" }) }),
|
|
2065
2065
|
R ? /* @__PURE__ */ n("div", { className: "space-y-2 rounded-control border border-amber-300/70 bg-amber-50/70 p-2.5 text-[11px] text-amber-950 dark:border-amber-700/70 dark:bg-amber-950/20 dark:text-amber-100", children: [
|
|
2066
2066
|
/* @__PURE__ */ n("div", { className: "flex gap-2", children: [
|
|
2067
|
-
/* @__PURE__ */ e(
|
|
2067
|
+
/* @__PURE__ */ e(Vi, { className: "mt-0.5 h-3.5 w-3.5 shrink-0" }),
|
|
2068
2068
|
/* @__PURE__ */ n("div", { className: "min-w-0", children: [
|
|
2069
2069
|
/* @__PURE__ */ n("p", { className: "font-medium", children: [
|
|
2070
2070
|
g,
|
|
@@ -2137,7 +2137,7 @@ function Jp() {
|
|
|
2137
2137
|
)
|
|
2138
2138
|
] }),
|
|
2139
2139
|
/* @__PURE__ */ e(
|
|
2140
|
-
|
|
2140
|
+
Bi,
|
|
2141
2141
|
{
|
|
2142
2142
|
incomingSelectedEntities: (l == null ? void 0 : l.selectedEntities) || [],
|
|
2143
2143
|
dialogMode: "dataSource",
|
|
@@ -2173,7 +2173,7 @@ function Wo({ isVisible: t }) {
|
|
|
2173
2173
|
),
|
|
2174
2174
|
children: [
|
|
2175
2175
|
/* @__PURE__ */ e("div", { className: "px-4 pt-4", children: /* @__PURE__ */ e(Jp, {}) }),
|
|
2176
|
-
/* @__PURE__ */ e("div", { className: "min-h-0 flex-1", children: /* @__PURE__ */ e(
|
|
2176
|
+
/* @__PURE__ */ e("div", { className: "min-h-0 flex-1", children: /* @__PURE__ */ e(Uc, {}) }),
|
|
2177
2177
|
/* @__PURE__ */ e(
|
|
2178
2178
|
Pp,
|
|
2179
2179
|
{
|
|
@@ -2270,7 +2270,7 @@ function tf() {
|
|
|
2270
2270
|
d.current = l;
|
|
2271
2271
|
const { value: m, onChange: u, flush: f } = Jo({
|
|
2272
2272
|
storeValue: t,
|
|
2273
|
-
defaultValue:
|
|
2273
|
+
defaultValue: Gc,
|
|
2274
2274
|
onStoreUpdate: s,
|
|
2275
2275
|
delay: ef
|
|
2276
2276
|
});
|
|
@@ -2319,7 +2319,7 @@ function of(t) {
|
|
|
2319
2319
|
].filter(Boolean);
|
|
2320
2320
|
return [
|
|
2321
2321
|
"You are an expert SQL writing assistant embedded in a query editor.",
|
|
2322
|
-
`Write SQL only. You may call only read-only tools when needed: ${
|
|
2322
|
+
`Write SQL only. You may call only read-only tools when needed: ${Hc}.`,
|
|
2323
2323
|
"Do not call mutation tools or chart-creation tools; those require Full Assistant.",
|
|
2324
2324
|
"Return exactly one SQL statement inside a single ```sql fenced block.",
|
|
2325
2325
|
"After the code block, optionally include one short sentence.",
|
|
@@ -2394,13 +2394,13 @@ function uf(t) {
|
|
|
2394
2394
|
if (typeof t == "string" && (t === "SQL_EMPTY" || t === "SQL_PARSE_ERROR" || t === "SQL_MULTI_STATEMENT" || t === "SQL_READ_ONLY_VIOLATION" || t === "SQL_EXPLAIN_ERROR" || t === "SQL_CONNECTION_ERROR"))
|
|
2395
2395
|
return t;
|
|
2396
2396
|
}
|
|
2397
|
-
function
|
|
2397
|
+
function ui(t) {
|
|
2398
2398
|
let a = 0;
|
|
2399
2399
|
for (let r = 0; r < t.length; r += 1)
|
|
2400
2400
|
a = (a << 5) - a + t.charCodeAt(r), a |= 0;
|
|
2401
2401
|
return String(a);
|
|
2402
2402
|
}
|
|
2403
|
-
function
|
|
2403
|
+
function mi(t) {
|
|
2404
2404
|
return t === "getTableColumns" ? "Discovering columns" : t === "getDomainRelationships" ? "Resolving relationships" : t === "getChartSQLSyntax" ? "Reviewing SQL syntax" : t === "getUserSql" ? "Inspecting current query" : "Analyzing context";
|
|
2405
2405
|
}
|
|
2406
2406
|
function mf(t, a) {
|
|
@@ -2409,7 +2409,7 @@ function mf(t, a) {
|
|
|
2409
2409
|
function sr(t) {
|
|
2410
2410
|
return typeof crypto < "u" && typeof crypto.randomUUID == "function" ? `${t}-${crypto.randomUUID()}` : `${t}-${Date.now()}-${Math.random().toString(36).slice(2, 10)}`;
|
|
2411
2411
|
}
|
|
2412
|
-
function
|
|
2412
|
+
function hi(t) {
|
|
2413
2413
|
var a;
|
|
2414
2414
|
for (let r = t.length - 1; r >= 0; r -= 1) {
|
|
2415
2415
|
const s = t[r];
|
|
@@ -2428,7 +2428,7 @@ function hf(t) {
|
|
|
2428
2428
|
const s = t.match(/```[\w-]*\s*([\s\S]*?)```/i);
|
|
2429
2429
|
return s != null && s[1] ? s[1].trim() : /^(select|with|insert|update|delete)\b/i.test(a) ? a : "";
|
|
2430
2430
|
}
|
|
2431
|
-
function
|
|
2431
|
+
function pi(t) {
|
|
2432
2432
|
for (let a = t.length - 1; a >= 0; a -= 1) {
|
|
2433
2433
|
const r = t[a];
|
|
2434
2434
|
if (!(r.role !== "assistant" || !Array.isArray(r.parts)))
|
|
@@ -2453,7 +2453,7 @@ function pf({
|
|
|
2453
2453
|
onOpenFullAssistant: l
|
|
2454
2454
|
}) {
|
|
2455
2455
|
var fa, dn;
|
|
2456
|
-
const { authToken: o, tokenProps: d } = zn(), m = (fa =
|
|
2456
|
+
const { authToken: o, tokenProps: d } = zn(), m = (fa = _i().data) == null ? void 0 : fa.assistantProfileId, u = P((X) => X.isDevMode), f = P(
|
|
2457
2457
|
(X) => X.selectedConnectionId
|
|
2458
2458
|
), p = P(
|
|
2459
2459
|
(X) => {
|
|
@@ -2585,7 +2585,7 @@ function pf({
|
|
|
2585
2585
|
return;
|
|
2586
2586
|
}
|
|
2587
2587
|
if (oe === "getUserSql") {
|
|
2588
|
-
G(le,
|
|
2588
|
+
G(le, mi(oe), {
|
|
2589
2589
|
hasTools: !0
|
|
2590
2590
|
}), be("inline_tool_step", le, { hasTools: !0 }), (Je = Q.current) == null || Je.call(Q, {
|
|
2591
2591
|
tool: oe,
|
|
@@ -2598,7 +2598,7 @@ function pf({
|
|
|
2598
2598
|
});
|
|
2599
2599
|
return;
|
|
2600
2600
|
}
|
|
2601
|
-
const Fe =
|
|
2601
|
+
const Fe = Qc.has(oe), Re = Wc.has(oe);
|
|
2602
2602
|
if (Fe || !Re) {
|
|
2603
2603
|
(Kn = Q.current) == null || Kn.call(Q, {
|
|
2604
2604
|
tool: oe,
|
|
@@ -2610,7 +2610,7 @@ function pf({
|
|
|
2610
2610
|
});
|
|
2611
2611
|
return;
|
|
2612
2612
|
}
|
|
2613
|
-
const Be =
|
|
2613
|
+
const Be = mi(oe);
|
|
2614
2614
|
G(le, Be, {
|
|
2615
2615
|
phase: S.phase === "self-healing" ? "self-healing" : "drafting",
|
|
2616
2616
|
hasTools: !0
|
|
@@ -2638,13 +2638,13 @@ function pf({
|
|
|
2638
2638
|
({ message: X, messages: oe }) => {
|
|
2639
2639
|
if (Ye !== ue.current)
|
|
2640
2640
|
return;
|
|
2641
|
-
const le =
|
|
2641
|
+
const le = hi(oe);
|
|
2642
2642
|
if (!le || le !== Y.current)
|
|
2643
2643
|
return;
|
|
2644
2644
|
const Fe = Z.current;
|
|
2645
2645
|
if (!xe(Fe))
|
|
2646
2646
|
return;
|
|
2647
|
-
const Re =
|
|
2647
|
+
const Re = pi([X]) || pi(oe);
|
|
2648
2648
|
if (Re) {
|
|
2649
2649
|
we.current = !1, y(Re.trim());
|
|
2650
2650
|
return;
|
|
@@ -2668,9 +2668,9 @@ function pf({
|
|
|
2668
2668
|
stop: fe,
|
|
2669
2669
|
error: ke,
|
|
2670
2670
|
clearError: $e
|
|
2671
|
-
} =
|
|
2671
|
+
} = zi({
|
|
2672
2672
|
id: z,
|
|
2673
|
-
transport: new
|
|
2673
|
+
transport: new $i({
|
|
2674
2674
|
api: `${d.apiServiceUrl}/v1/assistant`,
|
|
2675
2675
|
headers: () => ({
|
|
2676
2676
|
Authorization: `Bearer ${o == null ? void 0 : o.accessToken}`
|
|
@@ -2692,14 +2692,14 @@ function pf({
|
|
|
2692
2692
|
body: oe,
|
|
2693
2693
|
requestMetadata: le
|
|
2694
2694
|
}) => {
|
|
2695
|
-
const Fe = le == null ? void 0 : le.inlineRunToken, Re =
|
|
2695
|
+
const Fe = le == null ? void 0 : le.inlineRunToken, Re = hi(
|
|
2696
2696
|
X
|
|
2697
2697
|
);
|
|
2698
2698
|
return {
|
|
2699
2699
|
body: {
|
|
2700
2700
|
...oe,
|
|
2701
2701
|
inlineRunToken: Fe || Re,
|
|
2702
|
-
messages:
|
|
2702
|
+
messages: Oo(X)
|
|
2703
2703
|
}
|
|
2704
2704
|
};
|
|
2705
2705
|
}
|
|
@@ -2707,7 +2707,7 @@ function pf({
|
|
|
2707
2707
|
onToolCall: St,
|
|
2708
2708
|
onFinish: me,
|
|
2709
2709
|
onError: ze,
|
|
2710
|
-
sendAutomaticallyWhen:
|
|
2710
|
+
sendAutomaticallyWhen: Xc
|
|
2711
2711
|
});
|
|
2712
2712
|
Q.current = Tt, J.current = lt;
|
|
2713
2713
|
const Oe = !["ready", "error"].includes(
|
|
@@ -2887,7 +2887,7 @@ function pf({
|
|
|
2887
2887
|
}
|
|
2888
2888
|
if (!xe(oe) || Oe)
|
|
2889
2889
|
return;
|
|
2890
|
-
const le = `${oe}:${Me.current}:${
|
|
2890
|
+
const le = `${oe}:${Me.current}:${ui(X)}`;
|
|
2891
2891
|
if (Le.current === le)
|
|
2892
2892
|
return;
|
|
2893
2893
|
Le.current = le;
|
|
@@ -2896,11 +2896,11 @@ function pf({
|
|
|
2896
2896
|
const Be = await Sn(X, oe);
|
|
2897
2897
|
if (!Be || Fe || !xe(oe) || Be.status !== "invalid")
|
|
2898
2898
|
return;
|
|
2899
|
-
if (!
|
|
2899
|
+
if (!Zc.has(Be.errorCode)) {
|
|
2900
2900
|
Xt(oe, "terminal", Be.error, Be.errorCode);
|
|
2901
2901
|
return;
|
|
2902
2902
|
}
|
|
2903
|
-
const dt = `${
|
|
2903
|
+
const dt = `${ui(X)}::${Be.errorCode}`, ut = (Ae.current.get(dt) || 0) + 1;
|
|
2904
2904
|
if (Ae.current.set(dt, ut), ut >= 2) {
|
|
2905
2905
|
Xt(oe, "duplicate", Be.error, Be.errorCode);
|
|
2906
2906
|
return;
|
|
@@ -3111,7 +3111,7 @@ function pf({
|
|
|
3111
3111
|
disabled: Oe,
|
|
3112
3112
|
"aria-label": ua,
|
|
3113
3113
|
title: ua,
|
|
3114
|
-
children: /* @__PURE__ */ e(
|
|
3114
|
+
children: /* @__PURE__ */ e(Jc, { className: "size-3.5" })
|
|
3115
3115
|
}
|
|
3116
3116
|
)
|
|
3117
3117
|
] }),
|
|
@@ -3166,7 +3166,7 @@ function pf({
|
|
|
3166
3166
|
)
|
|
3167
3167
|
] }),
|
|
3168
3168
|
/* @__PURE__ */ e(
|
|
3169
|
-
|
|
3169
|
+
Yc,
|
|
3170
3170
|
{
|
|
3171
3171
|
mode: "full",
|
|
3172
3172
|
compact: !0,
|
|
@@ -3425,7 +3425,7 @@ function ff() {
|
|
|
3425
3425
|
}), F((O == null ? void 0 : O.output) || ""), O.records.length > 0) {
|
|
3426
3426
|
const { keys: ie } = ds(O.records);
|
|
3427
3427
|
y(
|
|
3428
|
-
c.type === "kpi" ?
|
|
3428
|
+
c.type === "kpi" ? ed(O.records).slice(0, 1) : ie
|
|
3429
3429
|
);
|
|
3430
3430
|
} else
|
|
3431
3431
|
y([]);
|
|
@@ -3485,10 +3485,10 @@ function ff() {
|
|
|
3485
3485
|
}
|
|
3486
3486
|
),
|
|
3487
3487
|
a && /* @__PURE__ */ n(Se, { children: [
|
|
3488
|
-
/* @__PURE__ */ n(
|
|
3488
|
+
/* @__PURE__ */ n(td, { className: "group/divider relative my-1 flex h-6 w-full shrink-0 cursor-row-resize items-center gap-3 px-1 outline-none", children: [
|
|
3489
3489
|
/* @__PURE__ */ e("span", { className: "h-px flex-1 bg-border transition-colors group-hover/divider:bg-foreground/30" }),
|
|
3490
3490
|
/* @__PURE__ */ n("span", { className: "inline-flex items-center gap-1.5 text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", children: [
|
|
3491
|
-
/* @__PURE__ */ e(
|
|
3491
|
+
/* @__PURE__ */ e(ji, { className: "h-3 w-3", strokeWidth: 1.75 }),
|
|
3492
3492
|
"Post-process with Python"
|
|
3493
3493
|
] }),
|
|
3494
3494
|
/* @__PURE__ */ e("span", { className: "h-px flex-1 bg-border transition-colors group-hover/divider:bg-foreground/30" }),
|
|
@@ -3595,7 +3595,7 @@ function ff() {
|
|
|
3595
3595
|
className: "shrink-0",
|
|
3596
3596
|
size: "xs",
|
|
3597
3597
|
children: [
|
|
3598
|
-
B || z ? /* @__PURE__ */ e(vn, { className: "h-3.5 w-3.5 animate-spin" }) : /* @__PURE__ */ e(
|
|
3598
|
+
B || z ? /* @__PURE__ */ e(vn, { className: "h-3.5 w-3.5 animate-spin" }) : /* @__PURE__ */ e(Ki, { className: "h-3.5 w-3.5" }),
|
|
3599
3599
|
"Run"
|
|
3600
3600
|
]
|
|
3601
3601
|
}
|
|
@@ -3661,7 +3661,7 @@ function ff() {
|
|
|
3661
3661
|
inputClassName: "text-[17px] font-semibold leading-tight tracking-[-0.005em]"
|
|
3662
3662
|
}
|
|
3663
3663
|
) }),
|
|
3664
|
-
/* @__PURE__ */ e(
|
|
3664
|
+
/* @__PURE__ */ e(qi, { card: c })
|
|
3665
3665
|
] }),
|
|
3666
3666
|
/* @__PURE__ */ e(
|
|
3667
3667
|
wa,
|
|
@@ -3692,11 +3692,11 @@ function gf(t) {
|
|
|
3692
3692
|
), m = ye(
|
|
3693
3693
|
(v) => v.actions.getCard(t)
|
|
3694
3694
|
), u = P((v) => v.editorContext), f = P((v) => v.card), h = (u == null ? void 0 : u.type) === "documentSection" && u.cardId === t ? u : void 0, x = h ? f : m;
|
|
3695
|
-
if (
|
|
3695
|
+
if (nd({
|
|
3696
3696
|
dashboard: a,
|
|
3697
3697
|
dashboardInputValues: i
|
|
3698
3698
|
}) && x) {
|
|
3699
|
-
const v =
|
|
3699
|
+
const v = Ui({
|
|
3700
3700
|
dashboard: a,
|
|
3701
3701
|
sheetId: h ? h.sheetId : c,
|
|
3702
3702
|
sheetKind: h ? "document" : void 0,
|
|
@@ -3725,7 +3725,7 @@ function gf(t) {
|
|
|
3725
3725
|
return h ? {
|
|
3726
3726
|
cardFilters: [],
|
|
3727
3727
|
cardFilterValues: h.documentFilterValues || []
|
|
3728
|
-
} :
|
|
3728
|
+
} : ad(
|
|
3729
3729
|
r,
|
|
3730
3730
|
s,
|
|
3731
3731
|
c,
|
|
@@ -3781,7 +3781,7 @@ function vf({
|
|
|
3781
3781
|
const o = tn.useMemo(() => Object.keys(t[0] ?? {}), [t]), d = a.sql && !((M = (w = a.preferences) == null ? void 0 : w.tablePrefs) != null && M.enableDevModePagination) ? (C = (A = a.preferences) == null ? void 0 : A.tablePrefs) == null ? void 0 : C.pageSize : void 0, m = tn.useMemo(
|
|
3782
3782
|
() => {
|
|
3783
3783
|
var b;
|
|
3784
|
-
return
|
|
3784
|
+
return Gi((b = a.config) == null ? void 0 : b.sortByColumns);
|
|
3785
3785
|
},
|
|
3786
3786
|
[(L = a.config) == null ? void 0 : L.sortByColumns]
|
|
3787
3787
|
), {
|
|
@@ -3792,7 +3792,7 @@ function vf({
|
|
|
3792
3792
|
pagination: x,
|
|
3793
3793
|
paginationMode: T,
|
|
3794
3794
|
sorting: v
|
|
3795
|
-
} =
|
|
3795
|
+
} = rd({
|
|
3796
3796
|
card: a,
|
|
3797
3797
|
dataLength: t.length,
|
|
3798
3798
|
onPaginationChange: s,
|
|
@@ -3827,7 +3827,7 @@ function vf({
|
|
|
3827
3827
|
onClick: () => O.getCanSort() && O.toggleSorting(O.getIsSorted() === "asc"),
|
|
3828
3828
|
children: [
|
|
3829
3829
|
/* @__PURE__ */ e("span", { className: "min-w-0 truncate", title: b, children: b }),
|
|
3830
|
-
B === "asc" ? /* @__PURE__ */ e(
|
|
3830
|
+
B === "asc" ? /* @__PURE__ */ e(sd, { className: "h-3.5 w-3.5 shrink-0 text-foreground" }) : B === "desc" ? /* @__PURE__ */ e(ld, { className: "h-3.5 w-3.5 shrink-0 text-foreground" }) : O.getCanSort() ? /* @__PURE__ */ e(Hi, { className: "h-3 w-3 shrink-0 opacity-0 transition-opacity group-hover/header:opacity-50" }) : null
|
|
3831
3831
|
]
|
|
3832
3832
|
}
|
|
3833
3833
|
);
|
|
@@ -3849,13 +3849,13 @@ function vf({
|
|
|
3849
3849
|
};
|
|
3850
3850
|
}),
|
|
3851
3851
|
[u, k, o]
|
|
3852
|
-
), N = Math.max(R.length, 1), y =
|
|
3852
|
+
), N = Math.max(R.length, 1), y = id({
|
|
3853
3853
|
data: t,
|
|
3854
3854
|
columns: R,
|
|
3855
|
-
getCoreRowModel:
|
|
3856
|
-
getPaginationRowModel: T === "client" ?
|
|
3855
|
+
getCoreRowModel: dd(),
|
|
3856
|
+
getPaginationRowModel: T === "client" ? cd() : void 0,
|
|
3857
3857
|
onSortingChange: h,
|
|
3858
|
-
getSortedRowModel: f ?
|
|
3858
|
+
getSortedRowModel: f ? od() : void 0,
|
|
3859
3859
|
onPaginationChange: T === "disabled" ? void 0 : p,
|
|
3860
3860
|
manualPagination: T === "server" || T === "disabled",
|
|
3861
3861
|
manualSorting: !f,
|
|
@@ -3867,27 +3867,27 @@ function vf({
|
|
|
3867
3867
|
}), E = T === "server" && r ? r.totalCount : t.length, I = T !== "disabled" && (T === "server" || E > 10), F = o.length > 0 ? `${o.length * 144}px` : "100%";
|
|
3868
3868
|
return /* @__PURE__ */ n("div", { className: "relative flex h-full min-h-0 w-full flex-col", children: [
|
|
3869
3869
|
l && /* @__PURE__ */ e("div", { className: "absolute inset-0 z-20 flex items-center justify-center bg-background/50", children: /* @__PURE__ */ e(vn, { className: "h-5 w-5 animate-spin text-muted-foreground" }) }),
|
|
3870
|
-
/* @__PURE__ */ n(
|
|
3870
|
+
/* @__PURE__ */ n(ud, { className: "relative min-h-0 w-full grow overflow-auto rounded-none border-0 bg-transparent text-foreground", children: [
|
|
3871
3871
|
/* @__PURE__ */ n(
|
|
3872
3872
|
"table",
|
|
3873
3873
|
{
|
|
3874
3874
|
className: "w-full text-sm [border-spacing:0]",
|
|
3875
3875
|
style: { minWidth: F },
|
|
3876
3876
|
children: [
|
|
3877
|
-
/* @__PURE__ */ e(
|
|
3877
|
+
/* @__PURE__ */ e(md, { className: "sticky top-0 z-10 bg-muted [&_tr]:border-b-0", children: y.getHeaderGroups().map((b) => /* @__PURE__ */ e(
|
|
3878
3878
|
zr,
|
|
3879
3879
|
{
|
|
3880
3880
|
className: "border-b-0 hover:bg-transparent",
|
|
3881
3881
|
children: b.headers.map((S) => {
|
|
3882
3882
|
const O = k[S.id] === "number";
|
|
3883
3883
|
return /* @__PURE__ */ e(
|
|
3884
|
-
|
|
3884
|
+
hd,
|
|
3885
3885
|
{
|
|
3886
3886
|
className: W(
|
|
3887
3887
|
"group/header relative h-auto border-b border-transparent bg-muted/95 px-4 py-2 align-middle text-[10px] font-medium tracking-[0.08em] text-muted-foreground after:absolute after:bottom-0 after:left-0 after:right-0 after:h-px after:bg-border/60",
|
|
3888
3888
|
O && "text-right"
|
|
3889
3889
|
),
|
|
3890
|
-
children: S.isPlaceholder ? null :
|
|
3890
|
+
children: S.isPlaceholder ? null : zl(
|
|
3891
3891
|
S.column.columnDef.header,
|
|
3892
3892
|
S.getContext()
|
|
3893
3893
|
)
|
|
@@ -3898,7 +3898,7 @@ function vf({
|
|
|
3898
3898
|
},
|
|
3899
3899
|
b.id
|
|
3900
3900
|
)) }),
|
|
3901
|
-
/* @__PURE__ */ e(
|
|
3901
|
+
/* @__PURE__ */ e(pd, { children: (V = y.getRowModel().rows) != null && V.length ? y.getRowModel().rows.map((b) => /* @__PURE__ */ e(
|
|
3902
3902
|
zr,
|
|
3903
3903
|
{
|
|
3904
3904
|
className: "border-b border-border/40 transition-colors",
|
|
@@ -3906,13 +3906,13 @@ function vf({
|
|
|
3906
3906
|
children: b.getVisibleCells().map((S) => {
|
|
3907
3907
|
const O = k[S.column.id] === "number";
|
|
3908
3908
|
return /* @__PURE__ */ e(
|
|
3909
|
-
|
|
3909
|
+
$l,
|
|
3910
3910
|
{
|
|
3911
3911
|
className: W(
|
|
3912
3912
|
"overflow-hidden px-4 py-2 text-[13px] text-foreground/90",
|
|
3913
3913
|
O && "text-right"
|
|
3914
3914
|
),
|
|
3915
|
-
children:
|
|
3915
|
+
children: zl(
|
|
3916
3916
|
S.column.columnDef.cell,
|
|
3917
3917
|
S.getContext()
|
|
3918
3918
|
)
|
|
@@ -3923,7 +3923,7 @@ function vf({
|
|
|
3923
3923
|
},
|
|
3924
3924
|
b.id
|
|
3925
3925
|
)) : /* @__PURE__ */ e(zr, { children: /* @__PURE__ */ e(
|
|
3926
|
-
|
|
3926
|
+
$l,
|
|
3927
3927
|
{
|
|
3928
3928
|
colSpan: N,
|
|
3929
3929
|
className: "h-auto py-12 text-center text-[13px] text-muted-foreground",
|
|
@@ -3936,7 +3936,7 @@ function vf({
|
|
|
3936
3936
|
/* @__PURE__ */ e($s, { orientation: "horizontal" })
|
|
3937
3937
|
] }),
|
|
3938
3938
|
/* @__PURE__ */ e("div", { className: "shrink-0 border-t border-border/60 bg-background text-[13px]", children: I ? /* @__PURE__ */ e(
|
|
3939
|
-
|
|
3939
|
+
fd,
|
|
3940
3940
|
{
|
|
3941
3941
|
totalColumns: o.length,
|
|
3942
3942
|
pageCount: T === "server" && r ? r.pageCount : y.getPageCount(),
|
|
@@ -3976,21 +3976,21 @@ function vf({
|
|
|
3976
3976
|
] }) })
|
|
3977
3977
|
] });
|
|
3978
3978
|
}
|
|
3979
|
-
const
|
|
3979
|
+
const fi = [
|
|
3980
3980
|
{ value: "table", label: "Table" },
|
|
3981
3981
|
{ value: "aggregateTable", label: "Aggregate" },
|
|
3982
3982
|
{ value: "pivotTable", label: "Pivot" },
|
|
3983
3983
|
{ value: "detailTable", label: "Detail" }
|
|
3984
3984
|
];
|
|
3985
3985
|
function Nf({ className: t }) {
|
|
3986
|
-
const a = P((h) => h.card), r = P((h) => h.frame), s = P((h) => h.editorContext), c = yt(), { setCard: i, updateCardInFrame: l } = Ne(), o = (s == null ? void 0 : s.type) === "documentSection" ?
|
|
3986
|
+
const a = P((h) => h.card), r = P((h) => h.frame), s = P((h) => h.editorContext), c = yt(), { setCard: i, updateCardInFrame: l } = Ne(), o = (s == null ? void 0 : s.type) === "documentSection" ? fi.filter(
|
|
3987
3987
|
(h) => ["table", "pivotTable"].includes(h.value)
|
|
3988
|
-
) :
|
|
3988
|
+
) : fi, d = [
|
|
3989
3989
|
"table",
|
|
3990
3990
|
"aggregateTable",
|
|
3991
3991
|
"pivotTable",
|
|
3992
3992
|
"detailTable"
|
|
3993
|
-
].includes(c), m = ia(a.config), u =
|
|
3993
|
+
].includes(c), m = ia(a.config), u = gd(a, r.cards);
|
|
3994
3994
|
if (!d || !m || u)
|
|
3995
3995
|
return /* @__PURE__ */ e(
|
|
3996
3996
|
"div",
|
|
@@ -4164,7 +4164,7 @@ function Cf({
|
|
|
4164
4164
|
}
|
|
4165
4165
|
);
|
|
4166
4166
|
}
|
|
4167
|
-
const
|
|
4167
|
+
const gi = {
|
|
4168
4168
|
async writeTextToClipboard(t) {
|
|
4169
4169
|
return typeof navigator > "u" || !navigator.clipboard ? !1 : (await navigator.clipboard.writeText(t), !0);
|
|
4170
4170
|
}
|
|
@@ -4181,7 +4181,7 @@ const Sf = [
|
|
|
4181
4181
|
{ target: "dashboardFilters", label: "Dashboard filters" },
|
|
4182
4182
|
{ target: "cardMetadata", label: "Card metadata" }
|
|
4183
4183
|
];
|
|
4184
|
-
function
|
|
4184
|
+
function xi(t) {
|
|
4185
4185
|
try {
|
|
4186
4186
|
return JSON.stringify(t, null, 2);
|
|
4187
4187
|
} catch (a) {
|
|
@@ -4291,7 +4291,7 @@ function Xo({
|
|
|
4291
4291
|
const R = m[r];
|
|
4292
4292
|
if (R === void 0)
|
|
4293
4293
|
return null;
|
|
4294
|
-
const N = r === "queryResponse" ? Tf(R) : { value: R }, y =
|
|
4294
|
+
const N = r === "queryResponse" ? Tf(R) : { value: R }, y = xi(N.value);
|
|
4295
4295
|
return y ? {
|
|
4296
4296
|
target: r,
|
|
4297
4297
|
title: Qn(r),
|
|
@@ -4302,11 +4302,11 @@ function Xo({
|
|
|
4302
4302
|
const N = m[R];
|
|
4303
4303
|
if (N === void 0)
|
|
4304
4304
|
return et.error(`No ${Qn(R).toLowerCase()} available`), !1;
|
|
4305
|
-
const y =
|
|
4305
|
+
const y = xi(N);
|
|
4306
4306
|
if (!y)
|
|
4307
4307
|
return et.error(`Unable to serialize ${Qn(R).toLowerCase()}`), !1;
|
|
4308
4308
|
try {
|
|
4309
|
-
return await
|
|
4309
|
+
return await gi.writeTextToClipboard(y) ? (et.success(`${Qn(R)} copied`), !0) : (et.error("Clipboard is not available"), !1);
|
|
4310
4310
|
} catch (E) {
|
|
4311
4311
|
return console.error("Failed to copy debug payload", E), et.error(`Unable to copy ${Qn(R).toLowerCase()}`), !1;
|
|
4312
4312
|
}
|
|
@@ -4314,7 +4314,7 @@ function Xo({
|
|
|
4314
4314
|
if (!R.value)
|
|
4315
4315
|
return !1;
|
|
4316
4316
|
try {
|
|
4317
|
-
return await
|
|
4317
|
+
return await gi.writeTextToClipboard(R.value) ? !0 : (et.error("Clipboard is not available"), !1);
|
|
4318
4318
|
} catch (N) {
|
|
4319
4319
|
return console.error("Failed to copy card detail", N), et.error(`Unable to copy ${R.label}`), !1;
|
|
4320
4320
|
}
|
|
@@ -4404,14 +4404,14 @@ function Xo({
|
|
|
4404
4404
|
] })
|
|
4405
4405
|
] }),
|
|
4406
4406
|
h.truncationMessage && /* @__PURE__ */ e("p", { className: "text-[12px] leading-5 text-muted-foreground", children: h.truncationMessage }),
|
|
4407
|
-
/* @__PURE__ */ e("div", { className: "max-h-80 overflow-auto rounded-[5px] border border-border/60 bg-background p-2", children: /* @__PURE__ */ e(
|
|
4407
|
+
/* @__PURE__ */ e("div", { className: "max-h-80 overflow-auto rounded-[5px] border border-border/60 bg-background p-2", children: /* @__PURE__ */ e(Qi, { code: h.json, language: "json" }) })
|
|
4408
4408
|
] })
|
|
4409
4409
|
] })
|
|
4410
4410
|
]
|
|
4411
4411
|
}
|
|
4412
4412
|
);
|
|
4413
4413
|
}
|
|
4414
|
-
const
|
|
4414
|
+
const bi = "text-[11px] text-muted-foreground underline-offset-2 hover:text-foreground hover:underline";
|
|
4415
4415
|
function Rr({
|
|
4416
4416
|
error: t,
|
|
4417
4417
|
errorSql: a,
|
|
@@ -4435,7 +4435,7 @@ function Rr({
|
|
|
4435
4435
|
children: [
|
|
4436
4436
|
/* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
|
|
4437
4437
|
/* @__PURE__ */ e(
|
|
4438
|
-
|
|
4438
|
+
Vi,
|
|
4439
4439
|
{
|
|
4440
4440
|
"aria-hidden": !0,
|
|
4441
4441
|
className: "h-3.5 w-3.5 shrink-0 text-amber-600 dark:text-amber-500"
|
|
@@ -4483,7 +4483,7 @@ function Rr({
|
|
|
4483
4483
|
{
|
|
4484
4484
|
type: "button",
|
|
4485
4485
|
onClick: () => f((g) => !g),
|
|
4486
|
-
className:
|
|
4486
|
+
className: bi,
|
|
4487
4487
|
children: u ? "Hide query details" : "Show query details"
|
|
4488
4488
|
}
|
|
4489
4489
|
),
|
|
@@ -4492,7 +4492,7 @@ function Rr({
|
|
|
4492
4492
|
{
|
|
4493
4493
|
type: "button",
|
|
4494
4494
|
onClick: i,
|
|
4495
|
-
className:
|
|
4495
|
+
className: bi,
|
|
4496
4496
|
children: "Report this issue"
|
|
4497
4497
|
}
|
|
4498
4498
|
)
|
|
@@ -4502,13 +4502,13 @@ function Rr({
|
|
|
4502
4502
|
/* @__PURE__ */ e("span", { className: "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", children: "Query" }),
|
|
4503
4503
|
/* @__PURE__ */ e(Da, { text: a, className: "h-6 w-6" })
|
|
4504
4504
|
] }),
|
|
4505
|
-
/* @__PURE__ */ e("div", { className: "max-h-80 overflow-auto rounded-[5px] border border-border/60 bg-background p-2", children: /* @__PURE__ */ e(
|
|
4505
|
+
/* @__PURE__ */ e("div", { className: "max-h-80 overflow-auto rounded-[5px] border border-border/60 bg-background p-2", children: /* @__PURE__ */ e(Qi, { code: a, language: "sql" }) })
|
|
4506
4506
|
] }) })
|
|
4507
4507
|
]
|
|
4508
4508
|
}
|
|
4509
4509
|
);
|
|
4510
4510
|
}
|
|
4511
|
-
function
|
|
4511
|
+
function Ks(t, a) {
|
|
4512
4512
|
const r = P((m) => m.card), s = P((m) => m.isDevMode), { switchEditorMode: c, setRunSql: i, runAssistant: l } = Ne();
|
|
4513
4513
|
return {
|
|
4514
4514
|
isDevMode: s,
|
|
@@ -4549,7 +4549,7 @@ function Zo({
|
|
|
4549
4549
|
(fe) => fe.actions.setCardInlineFilterValue
|
|
4550
4550
|
), k = P(
|
|
4551
4551
|
(fe) => fe.actions.removeCardInlineFilterValue
|
|
4552
|
-
), { updateFilter: R } =
|
|
4552
|
+
), { updateFilter: R } = Mo(), N = u == null ? void 0 : u.find((fe) => fe.id === d.filterId), y = ce(
|
|
4553
4553
|
() => $n(d, s),
|
|
4554
4554
|
[d, s]
|
|
4555
4555
|
), { manifest: E } = Nn(
|
|
@@ -4584,11 +4584,11 @@ function Zo({
|
|
|
4584
4584
|
) ?? s.type, [y, F, M, s, I == null ? void 0 : I.slots]), C = A ?? s.type, L = ce(
|
|
4585
4585
|
() => C === s.type ? s : { ...s, type: C },
|
|
4586
4586
|
[s, C]
|
|
4587
|
-
), V = L.type === "table" || L.type === "matrixTable" || L.type === "pivotTable" || L.type === "aggregateTable" || L.type === "detailTable", b = ce(() => A !== s.type ? { ...s, type: A } : s, [s, A]), { data: S, isLoading: D, isFetching: O, errorMessage: B, errorSql: z, pagination: _ } = wt(b), q = C === "matrixTable" &&
|
|
4587
|
+
), V = L.type === "table" || L.type === "matrixTable" || L.type === "pivotTable" || L.type === "aggregateTable" || L.type === "detailTable", b = ce(() => A !== s.type ? { ...s, type: A } : s, [s, A]), { data: S, isLoading: D, isFetching: O, errorMessage: B, errorSql: z, pagination: _ } = wt(b), q = C === "matrixTable" && xd(S), Q = bd({
|
|
4588
4588
|
data: S,
|
|
4589
4589
|
isLoading: D,
|
|
4590
4590
|
isFetching: O
|
|
4591
|
-
}), { handleOpenInEditor: J, handleDebugWithAssistant: U } =
|
|
4591
|
+
}), { handleOpenInEditor: J, handleDebugWithAssistant: U } = Ks(B, z || s.sql || s.python), Z = ce(() => (S == null ? void 0 : S.records) || [], [S == null ? void 0 : S.records]), { setCard: Y, updateCardInFrame: ue } = Ne(), { data: ve } = As(L), Ae = L.id, Me = L.config, Le = L.interactionConfig, nt = L.controls, at = L.controlBindings, ie = L.customCfg, we = L.preferences, We = L.queryConfig, Ze = !!L.sql, st = S == null ? void 0 : S.records, ge = ce(
|
|
4592
4592
|
() => ({
|
|
4593
4593
|
id: Ae,
|
|
4594
4594
|
type: C,
|
|
@@ -4626,7 +4626,7 @@ function Zo({
|
|
|
4626
4626
|
S == null ? void 0 : S.subtotalColumns,
|
|
4627
4627
|
S == null ? void 0 : S.pivotSchema,
|
|
4628
4628
|
S == null ? void 0 : S.groupByColumns
|
|
4629
|
-
]), je =
|
|
4629
|
+
]), je = yd(
|
|
4630
4630
|
L,
|
|
4631
4631
|
Ge,
|
|
4632
4632
|
(Tt = S == null ? void 0 : S.metadata) == null ? void 0 : Tt.comparisonMetadata
|
|
@@ -4635,7 +4635,7 @@ function Zo({
|
|
|
4635
4635
|
}, G = ce(() => {
|
|
4636
4636
|
const fe = typeof window < "u" ? window.location.href : "", ke = typeof navigator < "u" ? navigator.userAgent : "", $e = typeof window < "u" ? `${window.innerWidth}x${window.innerHeight}` : "";
|
|
4637
4637
|
return {
|
|
4638
|
-
category:
|
|
4638
|
+
category: Wi.QUERY_GENERATION,
|
|
4639
4639
|
user: x,
|
|
4640
4640
|
tokenContext: T,
|
|
4641
4641
|
systemState: {
|
|
@@ -4679,12 +4679,12 @@ function Zo({
|
|
|
4679
4679
|
}
|
|
4680
4680
|
};
|
|
4681
4681
|
Y($e), ue($e), s.sql && ((Xt = (Sn = s.preferences) == null ? void 0 : Sn.tablePrefs) != null && Xt.enableDevModePagination) && v(!0);
|
|
4682
|
-
}, de =
|
|
4682
|
+
}, de = Ji(
|
|
4683
4683
|
ge,
|
|
4684
4684
|
st || void 0
|
|
4685
4685
|
), be = ce(() => {
|
|
4686
4686
|
var fe;
|
|
4687
|
-
return !Ae || !st ? null :
|
|
4687
|
+
return !Ae || !st ? null : Yi({
|
|
4688
4688
|
card: ge,
|
|
4689
4689
|
data: st,
|
|
4690
4690
|
cardType: C,
|
|
@@ -4711,7 +4711,7 @@ function Zo({
|
|
|
4711
4711
|
ve
|
|
4712
4712
|
]);
|
|
4713
4713
|
function He(fe) {
|
|
4714
|
-
return /* @__PURE__ */ e(Nr, { FallbackComponent: Os, children: /* @__PURE__ */ e(
|
|
4714
|
+
return /* @__PURE__ */ e(Nr, { FallbackComponent: Os, children: /* @__PURE__ */ e(Od, { card: fe }) });
|
|
4715
4715
|
}
|
|
4716
4716
|
function Ye() {
|
|
4717
4717
|
var fe;
|
|
@@ -4727,11 +4727,11 @@ function Zo({
|
|
|
4727
4727
|
showFeedbackButton: !0
|
|
4728
4728
|
}
|
|
4729
4729
|
) }) : /* @__PURE__ */ n("div", { className: "flex h-full flex-col items-center justify-center gap-2", children: [
|
|
4730
|
-
/* @__PURE__ */ e(
|
|
4730
|
+
/* @__PURE__ */ e(Sd, { className: "size-8 text-muted-foreground" }),
|
|
4731
4731
|
/* @__PURE__ */ e("p", { className: "text-sm text-muted-foreground", children: "No results to display" })
|
|
4732
4732
|
] });
|
|
4733
4733
|
if ((D || O) && (!(S != null && S.records) || S.records.length === 0) && !q)
|
|
4734
|
-
return C === "table" || C === "detailTable" ? /* @__PURE__ */ e("div", { className: "relative mb-2 flex h-full min-h-0 w-full flex-1 grow basis-0", children: /* @__PURE__ */ e(
|
|
4734
|
+
return C === "table" || C === "detailTable" ? /* @__PURE__ */ e("div", { className: "relative mb-2 flex h-full min-h-0 w-full flex-1 grow basis-0", children: /* @__PURE__ */ e(Td, {}) }) : /* @__PURE__ */ e("div", { className: "z-50 flex h-full items-center justify-center", children: /* @__PURE__ */ e(Ht, { size: "md", color: "muted", "aria-label": "Loading data" }) });
|
|
4735
4735
|
if (!L.id) return null;
|
|
4736
4736
|
if (C === "custom")
|
|
4737
4737
|
return He(s);
|
|
@@ -4744,7 +4744,7 @@ function Zo({
|
|
|
4744
4744
|
"custom"
|
|
4745
4745
|
].includes(C) && be)
|
|
4746
4746
|
return /* @__PURE__ */ e("div", { className: "relative h-full min-h-0 w-full flex-1 grow basis-0", children: D || O ? /* @__PURE__ */ e(Se, {}) : /* @__PURE__ */ e(
|
|
4747
|
-
|
|
4747
|
+
kd,
|
|
4748
4748
|
{
|
|
4749
4749
|
cfg: be
|
|
4750
4750
|
}
|
|
@@ -4765,7 +4765,7 @@ function Zo({
|
|
|
4765
4765
|
) });
|
|
4766
4766
|
if (C === "matrixTable")
|
|
4767
4767
|
return /* @__PURE__ */ e("div", { className: "relative mb-2 flex h-full min-h-0 w-full flex-1 grow basis-0", children: /* @__PURE__ */ e(
|
|
4768
|
-
|
|
4768
|
+
Id,
|
|
4769
4769
|
{
|
|
4770
4770
|
card: L,
|
|
4771
4771
|
result: S == null ? void 0 : S.matrixResult,
|
|
@@ -4774,20 +4774,20 @@ function Zo({
|
|
|
4774
4774
|
) });
|
|
4775
4775
|
if (C === "pivotTable" && je)
|
|
4776
4776
|
return /* @__PURE__ */ e("div", { className: "relative mb-2 flex h-full min-h-0 w-full flex-1 grow basis-0", children: /* @__PURE__ */ e(
|
|
4777
|
-
|
|
4777
|
+
Dd,
|
|
4778
4778
|
{
|
|
4779
4779
|
card: L,
|
|
4780
4780
|
data: je.data,
|
|
4781
4781
|
options: je.options,
|
|
4782
4782
|
onAggregationChange: (ke) => {
|
|
4783
|
-
const $e =
|
|
4783
|
+
const $e = ql(
|
|
4784
4784
|
ke,
|
|
4785
4785
|
s.config
|
|
4786
4786
|
), Oe = { ...s, config: $e };
|
|
4787
4787
|
Y(Oe), ue(Oe);
|
|
4788
4788
|
},
|
|
4789
4789
|
onAggregationLabelChange: (ke) => {
|
|
4790
|
-
const $e =
|
|
4790
|
+
const $e = Ed(
|
|
4791
4791
|
ke,
|
|
4792
4792
|
s.config
|
|
4793
4793
|
), Oe = { ...s, config: $e };
|
|
@@ -4797,7 +4797,7 @@ function Zo({
|
|
|
4797
4797
|
) });
|
|
4798
4798
|
if (C === "aggregateTable")
|
|
4799
4799
|
return /* @__PURE__ */ e("div", { className: "relative mb-2 flex h-full min-h-0 w-full flex-1 grow basis-0", children: /* @__PURE__ */ e(
|
|
4800
|
-
|
|
4800
|
+
Ad,
|
|
4801
4801
|
{
|
|
4802
4802
|
card: L,
|
|
4803
4803
|
data: (S == null ? void 0 : S.records) || [],
|
|
@@ -4806,7 +4806,7 @@ function Zo({
|
|
|
4806
4806
|
paginationMetadata: _,
|
|
4807
4807
|
onPaginationChange: pe,
|
|
4808
4808
|
onAggregationChange: (ke) => {
|
|
4809
|
-
const $e =
|
|
4809
|
+
const $e = ql(
|
|
4810
4810
|
ke,
|
|
4811
4811
|
s.config
|
|
4812
4812
|
), Oe = { ...s, config: $e };
|
|
@@ -4817,7 +4817,7 @@ function Zo({
|
|
|
4817
4817
|
) });
|
|
4818
4818
|
}
|
|
4819
4819
|
return /* @__PURE__ */ n(
|
|
4820
|
-
|
|
4820
|
+
Xi,
|
|
4821
4821
|
{
|
|
4822
4822
|
role: "editor-visual-card",
|
|
4823
4823
|
className: W(
|
|
@@ -4832,7 +4832,7 @@ function Zo({
|
|
|
4832
4832
|
children: [
|
|
4833
4833
|
(D || O) && (S == null ? void 0 : S.records) && S.records.length > 0 && /* @__PURE__ */ e("div", { className: "absolute inset-0 z-50 flex items-center justify-center bg-background/50", children: /* @__PURE__ */ e(Ht, { size: "md", color: "muted", "aria-label": "Loading data" }) }),
|
|
4834
4834
|
l && /* @__PURE__ */ n(
|
|
4835
|
-
|
|
4835
|
+
vd,
|
|
4836
4836
|
{
|
|
4837
4837
|
className: W(
|
|
4838
4838
|
"flex flex-row items-start justify-between gap-4 px-4 pb-3 pt-3"
|
|
@@ -4841,7 +4841,7 @@ function Zo({
|
|
|
4841
4841
|
children: [
|
|
4842
4842
|
/* @__PURE__ */ n("div", { className: "min-w-0 flex-1 space-y-1", children: [
|
|
4843
4843
|
/* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
|
|
4844
|
-
/* @__PURE__ */ e(
|
|
4844
|
+
/* @__PURE__ */ e(Nd, { className: "min-w-0 text-[17px] font-semibold leading-tight tracking-[-0.005em]", children: /* @__PURE__ */ e(
|
|
4845
4845
|
wa,
|
|
4846
4846
|
{
|
|
4847
4847
|
value: s.title,
|
|
@@ -4852,7 +4852,7 @@ function Zo({
|
|
|
4852
4852
|
inputClassName: "text-[17px] font-semibold leading-tight tracking-[-0.005em]"
|
|
4853
4853
|
}
|
|
4854
4854
|
) }),
|
|
4855
|
-
/* @__PURE__ */ e(
|
|
4855
|
+
/* @__PURE__ */ e(qi, { card: s }),
|
|
4856
4856
|
/* @__PURE__ */ e($o, {}),
|
|
4857
4857
|
/* @__PURE__ */ e("div", { className: "ml-auto", children: /* @__PURE__ */ e(Nf, {}) })
|
|
4858
4858
|
] }),
|
|
@@ -4880,7 +4880,7 @@ function Zo({
|
|
|
4880
4880
|
inputClassName: "text-sm"
|
|
4881
4881
|
}
|
|
4882
4882
|
) }),
|
|
4883
|
-
/* @__PURE__ */ e(
|
|
4883
|
+
/* @__PURE__ */ e(Cd, { filter: N })
|
|
4884
4884
|
] })
|
|
4885
4885
|
]
|
|
4886
4886
|
}
|
|
@@ -4891,7 +4891,7 @@ function Zo({
|
|
|
4891
4891
|
className: "px-4 pb-2",
|
|
4892
4892
|
style: c.cardGutterStyle,
|
|
4893
4893
|
children: /* @__PURE__ */ e(
|
|
4894
|
-
|
|
4894
|
+
wd,
|
|
4895
4895
|
{
|
|
4896
4896
|
card: s,
|
|
4897
4897
|
sheetId: f || "",
|
|
@@ -4903,7 +4903,7 @@ function Zo({
|
|
|
4903
4903
|
}
|
|
4904
4904
|
),
|
|
4905
4905
|
/* @__PURE__ */ n(
|
|
4906
|
-
|
|
4906
|
+
Zi,
|
|
4907
4907
|
{
|
|
4908
4908
|
className: W(
|
|
4909
4909
|
"flex min-h-0 grow flex-col",
|
|
@@ -4912,8 +4912,8 @@ function Zo({
|
|
|
4912
4912
|
style: V ? void 0 : c.cardGutterStyle,
|
|
4913
4913
|
children: [
|
|
4914
4914
|
/* @__PURE__ */ e("div", { className: "min-h-0 flex-1 grow basis-0", children: Ye() }),
|
|
4915
|
-
|
|
4916
|
-
|
|
4915
|
+
eo(L) && /* @__PURE__ */ e("div", { className: W("pt-3", V && "px-4"), children: /* @__PURE__ */ e(
|
|
4916
|
+
to,
|
|
4917
4917
|
{
|
|
4918
4918
|
card: L,
|
|
4919
4919
|
mode: "editor",
|
|
@@ -4924,7 +4924,7 @@ function Zo({
|
|
|
4924
4924
|
}
|
|
4925
4925
|
),
|
|
4926
4926
|
/* @__PURE__ */ e(
|
|
4927
|
-
|
|
4927
|
+
no,
|
|
4928
4928
|
{
|
|
4929
4929
|
open: p,
|
|
4930
4930
|
onOpenChange: h,
|
|
@@ -5042,7 +5042,7 @@ function Ef({
|
|
|
5042
5042
|
className: a,
|
|
5043
5043
|
label: r = "Customize Visual"
|
|
5044
5044
|
} = {}) {
|
|
5045
|
-
const [s, c] = K(!1), [i, l] = K(""), [o, d] = K(""), [m, u] = K(""), [f, p] = K(""), h = P((A) => A.card), x = yt(), T = P((A) => A.card.customCfg), v = T ? JSON.stringify(T, null, 2) : "", g = ce(() => x !== h.type ? { ...h, type: x } : h, [h, x]), { data: k } = wt(g), { data: R } = As(h), N =
|
|
5045
|
+
const [s, c] = K(!1), [i, l] = K(""), [o, d] = K(""), [m, u] = K(""), [f, p] = K(""), h = P((A) => A.card), x = yt(), T = P((A) => A.card.customCfg), v = T ? JSON.stringify(T, null, 2) : "", g = ce(() => x !== h.type ? { ...h, type: x } : h, [h, x]), { data: k } = wt(g), { data: R } = As(h), N = Ji(h, k == null ? void 0 : k.records), { setCardCustomCfg: y, setCustomVisualCode: E } = Ne(), I = (A) => {
|
|
5046
5046
|
var C, L;
|
|
5047
5047
|
return JSON.stringify(
|
|
5048
5048
|
{
|
|
@@ -5061,7 +5061,7 @@ function Ef({
|
|
|
5061
5061
|
}, F = () => {
|
|
5062
5062
|
var C, L, V;
|
|
5063
5063
|
if (!((C = k == null ? void 0 : k.records) != null && C.length)) return;
|
|
5064
|
-
const A =
|
|
5064
|
+
const A = Yi({
|
|
5065
5065
|
card: h,
|
|
5066
5066
|
data: k.records,
|
|
5067
5067
|
cardType: h.type,
|
|
@@ -5074,7 +5074,7 @@ function Ef({
|
|
|
5074
5074
|
});
|
|
5075
5075
|
if (A) {
|
|
5076
5076
|
l(I(A)), u(((V = h.preferences) == null ? void 0 : V.customVisualCode) || "");
|
|
5077
|
-
const b =
|
|
5077
|
+
const b = Fd(A, T);
|
|
5078
5078
|
d(I(b));
|
|
5079
5079
|
}
|
|
5080
5080
|
}, w = () => {
|
|
@@ -5082,7 +5082,7 @@ function Ef({
|
|
|
5082
5082
|
if (m && E(m), o) {
|
|
5083
5083
|
const A = JSON.parse(
|
|
5084
5084
|
o
|
|
5085
|
-
), C =
|
|
5085
|
+
), C = Rd(
|
|
5086
5086
|
JSON.parse(i),
|
|
5087
5087
|
A
|
|
5088
5088
|
);
|
|
@@ -5093,7 +5093,7 @@ function Ef({
|
|
|
5093
5093
|
}
|
|
5094
5094
|
}, M = Object.keys(T || {}).length === 0;
|
|
5095
5095
|
return /* @__PURE__ */ n(Fn, { open: s, onOpenChange: c, children: [
|
|
5096
|
-
/* @__PURE__ */ e(
|
|
5096
|
+
/* @__PURE__ */ e(Md, { asChild: !0, children: t === "menu" ? /* @__PURE__ */ n(
|
|
5097
5097
|
ee,
|
|
5098
5098
|
{
|
|
5099
5099
|
variant: "ghost",
|
|
@@ -5104,7 +5104,7 @@ function Ef({
|
|
|
5104
5104
|
a
|
|
5105
5105
|
),
|
|
5106
5106
|
children: [
|
|
5107
|
-
/* @__PURE__ */ e(
|
|
5107
|
+
/* @__PURE__ */ e(jl, { className: "h-3.5 w-3.5" }),
|
|
5108
5108
|
/* @__PURE__ */ e("span", { children: r })
|
|
5109
5109
|
]
|
|
5110
5110
|
}
|
|
@@ -5117,7 +5117,7 @@ function Ef({
|
|
|
5117
5117
|
M ? "" : "text-green-600 hover:text-green-700",
|
|
5118
5118
|
a
|
|
5119
5119
|
),
|
|
5120
|
-
children: /* @__PURE__ */ e(
|
|
5120
|
+
children: /* @__PURE__ */ e(jl, { className: "h-4 w-4" })
|
|
5121
5121
|
}
|
|
5122
5122
|
) }),
|
|
5123
5123
|
/* @__PURE__ */ n(Rn, { className: "flex h-[600px] grow flex-col overflow-auto sm:min-w-[900px] lg:min-w-[1200px]", children: [
|
|
@@ -5160,15 +5160,15 @@ function Of(t) {
|
|
|
5160
5160
|
const a = t.trim().split(/\s+/);
|
|
5161
5161
|
return a.length > 1 ? (a[0][0] + a[1][0]).toUpperCase() : t.slice(0, 2).toUpperCase();
|
|
5162
5162
|
}
|
|
5163
|
-
function
|
|
5163
|
+
function Us({
|
|
5164
5164
|
chartType: t,
|
|
5165
5165
|
chartName: a,
|
|
5166
5166
|
isCustom: r = !1,
|
|
5167
5167
|
className: s = "h-6 w-6"
|
|
5168
5168
|
}) {
|
|
5169
5169
|
if (!r && t)
|
|
5170
|
-
return
|
|
5171
|
-
const c =
|
|
5170
|
+
return ao(t, s);
|
|
5171
|
+
const c = ro(a);
|
|
5172
5172
|
if (c)
|
|
5173
5173
|
return tn.cloneElement(c, { className: s });
|
|
5174
5174
|
const i = Of(a), l = Af(a);
|
|
@@ -5199,7 +5199,7 @@ function Mf({ isStarred: t, onClick: a, className: r }) {
|
|
|
5199
5199
|
),
|
|
5200
5200
|
"aria-label": t ? "Remove from favorites" : "Add to favorites",
|
|
5201
5201
|
children: /* @__PURE__ */ e(
|
|
5202
|
-
|
|
5202
|
+
Pd,
|
|
5203
5203
|
{
|
|
5204
5204
|
className: W(
|
|
5205
5205
|
"h-3.5 w-3.5 transition-colors",
|
|
@@ -5210,7 +5210,7 @@ function Mf({ isStarred: t, onClick: a, className: r }) {
|
|
|
5210
5210
|
}
|
|
5211
5211
|
);
|
|
5212
5212
|
}
|
|
5213
|
-
function
|
|
5213
|
+
function yi({
|
|
5214
5214
|
chartType: t,
|
|
5215
5215
|
chartName: a,
|
|
5216
5216
|
isCustom: r = !1,
|
|
@@ -5249,7 +5249,7 @@ function vi({
|
|
|
5249
5249
|
),
|
|
5250
5250
|
children: [
|
|
5251
5251
|
/* @__PURE__ */ e(
|
|
5252
|
-
|
|
5252
|
+
Us,
|
|
5253
5253
|
{
|
|
5254
5254
|
chartType: t,
|
|
5255
5255
|
chartName: a,
|
|
@@ -5339,10 +5339,10 @@ function tc({ onChartSelect: t, onClose: a }) {
|
|
|
5339
5339
|
x(null), u({}), v("builtin"), m(A), ["custom", "text", "map"].includes(A) && (f(!0), g(void 0)), t == null || t(A), a == null || a();
|
|
5340
5340
|
}, F = (A) => {
|
|
5341
5341
|
x(null), u({}), v("builtin"), g(void 0);
|
|
5342
|
-
const C =
|
|
5342
|
+
const C = so(A);
|
|
5343
5343
|
if (C === "multiple" && A.slots && A.slots.length > 0) {
|
|
5344
5344
|
R();
|
|
5345
|
-
const V =
|
|
5345
|
+
const V = lo(A.slots, A, p);
|
|
5346
5346
|
k(V), V[0] && N(V[0]), a == null || a();
|
|
5347
5347
|
return;
|
|
5348
5348
|
} else
|
|
@@ -5390,7 +5390,7 @@ function tc({ onChartSelect: t, onClose: a }) {
|
|
|
5390
5390
|
] }),
|
|
5391
5391
|
/* @__PURE__ */ n("div", { className: "max-h-[360px] overflow-y-auto pr-1", children: [
|
|
5392
5392
|
y.length > 0 && /* @__PURE__ */ e("div", { className: "grid grid-cols-3 gap-1.5", children: y.map((A) => /* @__PURE__ */ e(
|
|
5393
|
-
|
|
5393
|
+
yi,
|
|
5394
5394
|
{
|
|
5395
5395
|
chartType: A.id,
|
|
5396
5396
|
chartName: A.name,
|
|
@@ -5407,7 +5407,7 @@ function tc({ onChartSelect: t, onClose: a }) {
|
|
|
5407
5407
|
/* @__PURE__ */ e("span", { className: "font-mono text-[10px] tabular-nums text-muted-foreground/70", children: E.length })
|
|
5408
5408
|
] }),
|
|
5409
5409
|
/* @__PURE__ */ e("div", { className: "grid grid-cols-3 gap-1.5", children: E.map((A, C) => /* @__PURE__ */ e(
|
|
5410
|
-
|
|
5410
|
+
yi,
|
|
5411
5411
|
{
|
|
5412
5412
|
chartName: A.name,
|
|
5413
5413
|
isCustom: !0,
|
|
@@ -5451,18 +5451,18 @@ function Pf({
|
|
|
5451
5451
|
},
|
|
5452
5452
|
[u, (I = m == null ? void 0 : m.customCardPreferences) == null ? void 0 : I.componentName]
|
|
5453
5453
|
), p = Cn(m, f) === "multiple", h = yt(), x = p ? h : t ?? r.type, T = (F = r == null ? void 0 : r.customCardPreferences) == null ? void 0 : F.componentName, v = (w = m == null ? void 0 : m.customCardPreferences) == null ? void 0 : w.componentName, g = p && !!v, k = ce(() => {
|
|
5454
|
-
const M =
|
|
5454
|
+
const M = Kl.find((A) => A.id === x);
|
|
5455
5455
|
return M ? M.label : x === "custom" ? T || "Custom Visual" : "Select chart type";
|
|
5456
5456
|
}, [x, T]), R = ce(() => {
|
|
5457
|
-
const M =
|
|
5457
|
+
const M = Kl.find((A) => A.id === x);
|
|
5458
5458
|
if (M) {
|
|
5459
5459
|
const A = M.icon;
|
|
5460
5460
|
return /* @__PURE__ */ e(A, { className: "h-4 w-4" });
|
|
5461
5461
|
}
|
|
5462
5462
|
if (x === "custom" && T) {
|
|
5463
|
-
const A =
|
|
5463
|
+
const A = ro(T);
|
|
5464
5464
|
return A || /* @__PURE__ */ e(
|
|
5465
|
-
|
|
5465
|
+
Us,
|
|
5466
5466
|
{
|
|
5467
5467
|
chartName: T,
|
|
5468
5468
|
isCustom: !0,
|
|
@@ -5607,23 +5607,23 @@ const Jn = {
|
|
|
5607
5607
|
matrixTable: pr,
|
|
5608
5608
|
bar: wr,
|
|
5609
5609
|
line: Cr,
|
|
5610
|
-
stackedBar:
|
|
5611
|
-
stackedLine:
|
|
5612
|
-
scatter:
|
|
5613
|
-
bubble:
|
|
5614
|
-
pie:
|
|
5615
|
-
doughnut:
|
|
5616
|
-
kpi:
|
|
5617
|
-
treemap:
|
|
5618
|
-
bullet:
|
|
5619
|
-
funnel:
|
|
5620
|
-
tornado:
|
|
5610
|
+
stackedBar: Qd,
|
|
5611
|
+
stackedLine: Hd,
|
|
5612
|
+
scatter: co,
|
|
5613
|
+
bubble: Gd,
|
|
5614
|
+
pie: Ud,
|
|
5615
|
+
doughnut: Kd,
|
|
5616
|
+
kpi: jd,
|
|
5617
|
+
treemap: oo,
|
|
5618
|
+
bullet: io,
|
|
5619
|
+
funnel: qd,
|
|
5620
|
+
tornado: $d,
|
|
5621
5621
|
heatmap: pr,
|
|
5622
|
-
range:
|
|
5623
|
-
radar:
|
|
5624
|
-
polarArea:
|
|
5625
|
-
text:
|
|
5626
|
-
map:
|
|
5622
|
+
range: zd,
|
|
5623
|
+
radar: _d,
|
|
5624
|
+
polarArea: Bd,
|
|
5625
|
+
text: Vd,
|
|
5626
|
+
map: Ld
|
|
5627
5627
|
}, ka = {
|
|
5628
5628
|
table: "Table",
|
|
5629
5629
|
matrixTable: "Matrix Table",
|
|
@@ -5774,10 +5774,10 @@ function rc({
|
|
|
5774
5774
|
const M = T.find((L) => L.name === w.id);
|
|
5775
5775
|
if (!M) return;
|
|
5776
5776
|
d(null), o({}), u(void 0);
|
|
5777
|
-
const A =
|
|
5777
|
+
const A = so(M);
|
|
5778
5778
|
if (A === "multiple" && M.slots && M.slots.length > 0) {
|
|
5779
5779
|
p();
|
|
5780
|
-
const L =
|
|
5780
|
+
const L = lo(
|
|
5781
5781
|
M.slots,
|
|
5782
5782
|
M,
|
|
5783
5783
|
i
|
|
@@ -5825,7 +5825,7 @@ function rc({
|
|
|
5825
5825
|
),
|
|
5826
5826
|
children: [
|
|
5827
5827
|
M ? /* @__PURE__ */ e(M, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ e(
|
|
5828
|
-
|
|
5828
|
+
Us,
|
|
5829
5829
|
{
|
|
5830
5830
|
chartName: w.label,
|
|
5831
5831
|
isCustom: !0,
|
|
@@ -5951,7 +5951,7 @@ function Bf() {
|
|
|
5951
5951
|
}
|
|
5952
5952
|
return /* @__PURE__ */ e(Se, { children: a === "funnel" ? l() : a === "bullet" ? o() : i() });
|
|
5953
5953
|
}
|
|
5954
|
-
function
|
|
5954
|
+
function Gs({
|
|
5955
5955
|
className: t,
|
|
5956
5956
|
triggerVariant: a = "icon",
|
|
5957
5957
|
label: r = "Display Options"
|
|
@@ -6071,7 +6071,7 @@ function Hs({
|
|
|
6071
6071
|
] })
|
|
6072
6072
|
] }) });
|
|
6073
6073
|
}
|
|
6074
|
-
function
|
|
6074
|
+
function Hs({
|
|
6075
6075
|
className: t,
|
|
6076
6076
|
triggerVariant: a = "icon",
|
|
6077
6077
|
label: r = "Inline Filters"
|
|
@@ -6089,10 +6089,10 @@ function Qs({
|
|
|
6089
6089
|
var L, V, b, S, D;
|
|
6090
6090
|
const E = ((b = (V = (L = i == null ? void 0 : i.dataSource) == null ? void 0 : L.selectedEntities) == null ? void 0 : V[0]) == null ? void 0 : b.database) || "", I = y.qualifiedFieldName || y.name;
|
|
6091
6091
|
if (x.find(
|
|
6092
|
-
(O) =>
|
|
6092
|
+
(O) => Jd(O, y)
|
|
6093
6093
|
))
|
|
6094
6094
|
return;
|
|
6095
|
-
const w = y.qualifiedFieldName ? y.qualifiedFieldName.split(".").slice(0, -1).join(".") : y.qualifiedEntityName || y.entityName, M =
|
|
6095
|
+
const w = y.qualifiedFieldName ? y.qualifiedFieldName.split(".").slice(0, -1).join(".") : y.qualifiedEntityName || y.entityName, M = Yd(y), A = Xd(i == null ? void 0 : i.dataSource, {
|
|
6096
6096
|
connectionId: l || ((S = i == null ? void 0 : i.dataSource) == null ? void 0 : S.connectionId),
|
|
6097
6097
|
connectionType: (D = i == null ? void 0 : i.dataSource) == null ? void 0 : D.connectionType
|
|
6098
6098
|
}), C = {
|
|
@@ -6179,7 +6179,7 @@ function Qs({
|
|
|
6179
6179
|
x.length > 0 && "text-primary"
|
|
6180
6180
|
),
|
|
6181
6181
|
children: [
|
|
6182
|
-
/* @__PURE__ */ e(
|
|
6182
|
+
/* @__PURE__ */ e(oi, { className: "h-3.5 w-3.5" }),
|
|
6183
6183
|
/* @__PURE__ */ e("span", { children: r }),
|
|
6184
6184
|
x.length > 0 && /* @__PURE__ */ e("span", { className: "ml-auto inline-flex h-4 w-4 shrink-0 items-center justify-center rounded-[4px] bg-primary text-[10px] font-medium leading-none text-primary-foreground", children: x.length })
|
|
6185
6185
|
]
|
|
@@ -6192,7 +6192,7 @@ function Qs({
|
|
|
6192
6192
|
"text-primary": x.length > 0
|
|
6193
6193
|
}),
|
|
6194
6194
|
children: [
|
|
6195
|
-
/* @__PURE__ */ e(
|
|
6195
|
+
/* @__PURE__ */ e(oi, { className: "h-3.5 w-3.5" }),
|
|
6196
6196
|
x.length > 0 && /* @__PURE__ */ e("span", { className: "absolute -right-1 -top-1 flex h-4 w-4 items-center justify-center rounded-full bg-primary text-[10px] font-medium text-primary-foreground", children: x.length })
|
|
6197
6197
|
]
|
|
6198
6198
|
}
|
|
@@ -6213,7 +6213,7 @@ function Qs({
|
|
|
6213
6213
|
items: [],
|
|
6214
6214
|
strategy: Zn,
|
|
6215
6215
|
children: /* @__PURE__ */ e(
|
|
6216
|
-
|
|
6216
|
+
Wd,
|
|
6217
6217
|
{
|
|
6218
6218
|
context: "inline-filter",
|
|
6219
6219
|
onFieldSelect: v,
|
|
@@ -6250,7 +6250,7 @@ function _f({
|
|
|
6250
6250
|
/* @__PURE__ */ e("span", { className: "truncate", title: t.column, children: t.title }),
|
|
6251
6251
|
/* @__PURE__ */ n("div", { className: "flex items-center gap-0.5", children: [
|
|
6252
6252
|
/* @__PURE__ */ e(
|
|
6253
|
-
|
|
6253
|
+
Zd,
|
|
6254
6254
|
{
|
|
6255
6255
|
filter: t,
|
|
6256
6256
|
variant: "inline",
|
|
@@ -6304,7 +6304,7 @@ function jf(t, a, r) {
|
|
|
6304
6304
|
(i) => i.target !== "sql_param" && i.target !== "presentation_currency"
|
|
6305
6305
|
).map((i) => br(i.controlId, i.target))
|
|
6306
6306
|
), c = a.map((i) => {
|
|
6307
|
-
const l =
|
|
6307
|
+
const l = Fo({
|
|
6308
6308
|
card: t,
|
|
6309
6309
|
control: i
|
|
6310
6310
|
}).map((u) => u.value), o = qf[i.type], m = [
|
|
@@ -6338,13 +6338,13 @@ function Kf({
|
|
|
6338
6338
|
...t.controls || []
|
|
6339
6339
|
], [d, m] = K(
|
|
6340
6340
|
{}
|
|
6341
|
-
), u =
|
|
6341
|
+
), u = eu({
|
|
6342
6342
|
sql: t.sql,
|
|
6343
6343
|
controlBindings: t.controlBindings
|
|
6344
6344
|
}), f = Nh(t), p = new Set(
|
|
6345
6345
|
r.map((R) => br(R.controlId, R.target))
|
|
6346
6346
|
), h = o.some(
|
|
6347
|
-
(R) =>
|
|
6347
|
+
(R) => Fo({
|
|
6348
6348
|
card: t,
|
|
6349
6349
|
control: R
|
|
6350
6350
|
}).some(
|
|
@@ -6449,7 +6449,7 @@ function Kf({
|
|
|
6449
6449
|
}
|
|
6450
6450
|
return /* @__PURE__ */ n("div", { className: "space-y-4", children: [
|
|
6451
6451
|
x > 0 ? /* @__PURE__ */ n("div", { className: "flex items-start gap-2 rounded-md border border-amber-200 bg-amber-50 px-3 py-2 text-xs text-amber-950", children: [
|
|
6452
|
-
/* @__PURE__ */ e(
|
|
6452
|
+
/* @__PURE__ */ e(Ul, { className: "mt-0.5 h-3.5 w-3.5 shrink-0" }),
|
|
6453
6453
|
/* @__PURE__ */ n("span", { children: [
|
|
6454
6454
|
x,
|
|
6455
6455
|
" ",
|
|
@@ -6595,7 +6595,7 @@ function Kf({
|
|
|
6595
6595
|
}
|
|
6596
6596
|
),
|
|
6597
6597
|
O ? /* @__PURE__ */ n("div", { className: "flex items-center gap-1.5 text-[11px] text-amber-700", children: [
|
|
6598
|
-
/* @__PURE__ */ e(
|
|
6598
|
+
/* @__PURE__ */ e(Ul, { className: "h-3 w-3 shrink-0" }),
|
|
6599
6599
|
/* @__PURE__ */ n("span", { children: [
|
|
6600
6600
|
"Needs remap",
|
|
6601
6601
|
B ? ` · Previously: ${B}` : ""
|
|
@@ -6624,13 +6624,13 @@ function Kf({
|
|
|
6624
6624
|
] });
|
|
6625
6625
|
}
|
|
6626
6626
|
function Uf(t, a) {
|
|
6627
|
-
const { eligibleTargets: r } =
|
|
6627
|
+
const { eligibleTargets: r } = uo(
|
|
6628
6628
|
t,
|
|
6629
6629
|
a
|
|
6630
|
-
), s =
|
|
6630
|
+
), s = ru(t), c = new Map(
|
|
6631
6631
|
s.map((l) => [l.id, l])
|
|
6632
6632
|
), i = new Map(
|
|
6633
|
-
|
|
6633
|
+
su(t).map((l) => {
|
|
6634
6634
|
var o, d, m;
|
|
6635
6635
|
return [
|
|
6636
6636
|
l.measureId,
|
|
@@ -6641,7 +6641,7 @@ function Uf(t, a) {
|
|
|
6641
6641
|
return r.map((l) => {
|
|
6642
6642
|
var o;
|
|
6643
6643
|
return {
|
|
6644
|
-
key:
|
|
6644
|
+
key: mo(l),
|
|
6645
6645
|
label: l.kind === "metric" ? ((o = c.get(l.metricId)) == null ? void 0 : o.label) || l.metricId : l.kind === "column" ? l.columnKey : i.get(l.measureId) || l.measureId,
|
|
6646
6646
|
target: l
|
|
6647
6647
|
};
|
|
@@ -6657,22 +6657,22 @@ function Hf({
|
|
|
6657
6657
|
bindings: s,
|
|
6658
6658
|
onChange: c
|
|
6659
6659
|
}) {
|
|
6660
|
-
const i = [...a, ...t.controls || []], l = i.filter(
|
|
6660
|
+
const i = [...a, ...t.controls || []], l = i.filter(tu), o = ce(
|
|
6661
6661
|
() => Uf(t, r),
|
|
6662
6662
|
[t, r]
|
|
6663
6663
|
), d = ce(
|
|
6664
|
-
() =>
|
|
6664
|
+
() => uo(t, r),
|
|
6665
6665
|
[t, r]
|
|
6666
|
-
), m =
|
|
6666
|
+
), m = nu({
|
|
6667
6667
|
bindings: s,
|
|
6668
6668
|
controls: i,
|
|
6669
6669
|
...d
|
|
6670
|
-
}), { preferences: u, resolveBoundCurrency: f } =
|
|
6671
|
-
(R) => R.presentationTarget && v &&
|
|
6670
|
+
}), { preferences: u, resolveBoundCurrency: f } = au(t, r), [p, h] = K(""), [x, T] = K(""), v = o.find((R) => R.key === x), g = !!(p && v) && !s.some(
|
|
6671
|
+
(R) => R.presentationTarget && v && mo(R.presentationTarget) === v.key
|
|
6672
6672
|
), k = (R) => {
|
|
6673
6673
|
if (!u)
|
|
6674
6674
|
return;
|
|
6675
|
-
const N =
|
|
6675
|
+
const N = lu({
|
|
6676
6676
|
card: t,
|
|
6677
6677
|
target: R,
|
|
6678
6678
|
resultColumnKeys: r,
|
|
@@ -6748,7 +6748,7 @@ function Hf({
|
|
|
6748
6748
|
] });
|
|
6749
6749
|
}
|
|
6750
6750
|
const Qf = [];
|
|
6751
|
-
function
|
|
6751
|
+
function Qs({
|
|
6752
6752
|
className: t,
|
|
6753
6753
|
triggerVariant: a = "icon",
|
|
6754
6754
|
label: r = "Controls"
|
|
@@ -6770,10 +6770,10 @@ function Ws({
|
|
|
6770
6770
|
!i && T !== null && v(null);
|
|
6771
6771
|
}, [i, T]);
|
|
6772
6772
|
const g = ce(() => T ? (d == null ? void 0 : d.cards.find((D) => D.id === T)) || ((o == null ? void 0 : o.id) === T ? o : void 0) : o, [o, d == null ? void 0 : d.cards, T]), k = (g == null ? void 0 : g.controls) || [], R = g ? wh(u, { excludeCardId: g.id }) : p.map((D) => D.id), N = ((g == null ? void 0 : g.controlBindings) || []).filter(
|
|
6773
|
-
|
|
6773
|
+
iu
|
|
6774
6774
|
), y = ((g == null ? void 0 : g.controlBindings) || []).filter(
|
|
6775
6775
|
$r
|
|
6776
|
-
), E =
|
|
6776
|
+
), E = ou({
|
|
6777
6777
|
card: g,
|
|
6778
6778
|
controls: k
|
|
6779
6779
|
}), I = {
|
|
@@ -6801,11 +6801,11 @@ function Ws({
|
|
|
6801
6801
|
})), A = (D, O) => {
|
|
6802
6802
|
if (!g)
|
|
6803
6803
|
return;
|
|
6804
|
-
const B = (O == null ? void 0 : O.type) === "rename" ?
|
|
6804
|
+
const B = (O == null ? void 0 : O.type) === "rename" ? ni(g, {
|
|
6805
6805
|
type: "rename",
|
|
6806
6806
|
oldId: O.oldId,
|
|
6807
6807
|
newId: O.newId
|
|
6808
|
-
}) : (O == null ? void 0 : O.type) === "remove" ?
|
|
6808
|
+
}) : (O == null ? void 0 : O.type) === "remove" ? ni(g, {
|
|
6809
6809
|
type: "remove",
|
|
6810
6810
|
controlId: O.controlId
|
|
6811
6811
|
}) : g, z = {
|
|
@@ -6961,7 +6961,7 @@ function sc({
|
|
|
6961
6961
|
var x, T;
|
|
6962
6962
|
return (T = (x = h.card) == null ? void 0 : x.preferences) == null ? void 0 : T.chartOptions;
|
|
6963
6963
|
}
|
|
6964
|
-
), o =
|
|
6964
|
+
), o = cu(l), { setChartGrid: d } = Ne();
|
|
6965
6965
|
function m() {
|
|
6966
6966
|
const h = ["xy", "none", "x", "y"], T = (h.indexOf(o) + 1) % h.length;
|
|
6967
6967
|
d(h[T]);
|
|
@@ -6997,15 +6997,15 @@ function sc({
|
|
|
6997
6997
|
className: "h-7 w-7 px-0",
|
|
6998
6998
|
children: [
|
|
6999
6999
|
(o === "xy" || !o) && /* @__PURE__ */ e(pr, { className: "h-3.5 w-3.5" }),
|
|
7000
|
-
o === "x" && /* @__PURE__ */ e(
|
|
7000
|
+
o === "x" && /* @__PURE__ */ e(js, { className: "h-3.5 w-3.5" }),
|
|
7001
7001
|
o === "y" && /* @__PURE__ */ e(Sr, { className: "h-3.5 w-3.5" }),
|
|
7002
|
-
o === "none" && /* @__PURE__ */ e(
|
|
7002
|
+
o === "none" && /* @__PURE__ */ e(du, { className: "h-3.5 w-3.5" })
|
|
7003
7003
|
]
|
|
7004
7004
|
}
|
|
7005
7005
|
),
|
|
7006
|
-
r && /* @__PURE__ */ e(
|
|
7007
|
-
s && /* @__PURE__ */ e(
|
|
7008
|
-
c && /* @__PURE__ */ e(
|
|
7006
|
+
r && /* @__PURE__ */ e(Hs, {}),
|
|
7007
|
+
s && /* @__PURE__ */ e(Qs, {}),
|
|
7008
|
+
c && /* @__PURE__ */ e(Gs, {})
|
|
7009
7009
|
] }) : null;
|
|
7010
7010
|
}
|
|
7011
7011
|
function Wf({
|
|
@@ -7049,7 +7049,7 @@ function Wf({
|
|
|
7049
7049
|
const q = (r == null ? void 0 : r.id) === _;
|
|
7050
7050
|
if (!(I && q ? s.cards.length > 1 : E)) return;
|
|
7051
7051
|
let J = s.cards.filter((ue) => ue.id !== _);
|
|
7052
|
-
v && !I && (J =
|
|
7052
|
+
v && !I && (J = Nu(J));
|
|
7053
7053
|
const U = J[0], Z = {
|
|
7054
7054
|
...s,
|
|
7055
7055
|
cards: J,
|
|
@@ -7106,7 +7106,7 @@ function Wf({
|
|
|
7106
7106
|
x.slots,
|
|
7107
7107
|
U
|
|
7108
7108
|
);
|
|
7109
|
-
ue && (q =
|
|
7109
|
+
ue && (q = Cu(ue), Q = ue.label || `Tab ${U + 1}`, J = ue.description || "");
|
|
7110
7110
|
}
|
|
7111
7111
|
const Z = {
|
|
7112
7112
|
dataSource: _.dataSource,
|
|
@@ -7190,7 +7190,7 @@ function Wf({
|
|
|
7190
7190
|
// Multi-input visual: Icon + Slot Label (non-editable, no eye icon)
|
|
7191
7191
|
/* @__PURE__ */ e(Bt, { delayDuration: 0, children: /* @__PURE__ */ n(Ot, { children: [
|
|
7192
7192
|
/* @__PURE__ */ e(Mt, { asChild: !0, children: /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
|
|
7193
|
-
/* @__PURE__ */ e("span", { className: "text-muted-foreground", children:
|
|
7193
|
+
/* @__PURE__ */ e("span", { className: "text-muted-foreground", children: ao(U, "size-3.5") }),
|
|
7194
7194
|
/* @__PURE__ */ e("span", { children: J.label || `Tab ${Q + 1}` })
|
|
7195
7195
|
] }) }),
|
|
7196
7196
|
/* @__PURE__ */ e(
|
|
@@ -7214,7 +7214,7 @@ function Wf({
|
|
|
7214
7214
|
/* @__PURE__ */ n(Se, { children: [
|
|
7215
7215
|
b(s, _),
|
|
7216
7216
|
/* @__PURE__ */ e(
|
|
7217
|
-
|
|
7217
|
+
xu,
|
|
7218
7218
|
{
|
|
7219
7219
|
enabled: s.activeCardId === _.id,
|
|
7220
7220
|
text: _.tabTitle || _.title,
|
|
@@ -7228,7 +7228,7 @@ function Wf({
|
|
|
7228
7228
|
] })
|
|
7229
7229
|
),
|
|
7230
7230
|
!l && s.activeCardId === _.id && !Z && /* @__PURE__ */ e(
|
|
7231
|
-
|
|
7231
|
+
bu,
|
|
7232
7232
|
{
|
|
7233
7233
|
className: "h-3 w-3 text-muted-foreground hover:text-foreground",
|
|
7234
7234
|
onClick: (ve) => {
|
|
@@ -7297,7 +7297,7 @@ function An({
|
|
|
7297
7297
|
} = Ne(), [T, v] = K({}), [g, k] = K(
|
|
7298
7298
|
() => /* @__PURE__ */ new Set()
|
|
7299
7299
|
), { authToken: R } = zn(), N = Dh(R == null ? void 0 : R.accessToken), { compiledAppearance: y } = Eh(), E = ce(
|
|
7300
|
-
() =>
|
|
7300
|
+
() => uu(y),
|
|
7301
7301
|
[y]
|
|
7302
7302
|
), {
|
|
7303
7303
|
getCard: I,
|
|
@@ -7312,7 +7312,7 @@ function An({
|
|
|
7312
7312
|
}).map(
|
|
7313
7313
|
(ze) => (ze == null ? void 0 : ze.id) === s.id ? s : ze
|
|
7314
7314
|
), [r, l, s]), S = ce(
|
|
7315
|
-
() =>
|
|
7315
|
+
() => ho(b),
|
|
7316
7316
|
[b]
|
|
7317
7317
|
), D = ce(() => {
|
|
7318
7318
|
const me = b.findIndex(
|
|
@@ -7331,9 +7331,9 @@ function An({
|
|
|
7331
7331
|
python: "",
|
|
7332
7332
|
config: void 0,
|
|
7333
7333
|
queryConfig: void 0
|
|
7334
|
-
} : O !== s.type ? { ...s, type: O } : s, [s, O, V]), { data: z, isLoading: _, isFetching: q, isError: Q, errorMessage: J, errorSql: U } = wt(B), { handleOpenInEditor: Z, handleDebugWithAssistant: Y } =
|
|
7334
|
+
} : O !== s.type ? { ...s, type: O } : s, [s, O, V]), { data: z, isLoading: _, isFetching: q, isError: Q, errorMessage: J, errorSql: U } = wt(B), { handleOpenInEditor: Z, handleDebugWithAssistant: Y } = Ks(J, U || s.sql || s.python), ue = s.type === "text" && ((St = (Ye = s.preferences) == null ? void 0 : Ye.textVisualOptions) == null ? void 0 : St.isDynamicText) === !0 && !!J, ve = Ie(
|
|
7335
7335
|
(me, ze) => {
|
|
7336
|
-
const Ve =
|
|
7336
|
+
const Ve = pu(ze);
|
|
7337
7337
|
v((lt) => ({
|
|
7338
7338
|
...lt,
|
|
7339
7339
|
[me]: Ve
|
|
@@ -7360,7 +7360,7 @@ function An({
|
|
|
7360
7360
|
), st = P(
|
|
7361
7361
|
(me) => me.actions.removeCardInlineFilterValue
|
|
7362
7362
|
), ge = ce(
|
|
7363
|
-
() => l ?
|
|
7363
|
+
() => l ? mu({
|
|
7364
7364
|
card: l,
|
|
7365
7365
|
sheetId: we || "",
|
|
7366
7366
|
inlineFilterValues: We,
|
|
@@ -7375,7 +7375,7 @@ function An({
|
|
|
7375
7375
|
st
|
|
7376
7376
|
]
|
|
7377
7377
|
), { cardFilters: Ge, cardFilterValues: je } = ce(
|
|
7378
|
-
() => l ?
|
|
7378
|
+
() => l ? hu({
|
|
7379
7379
|
card: l,
|
|
7380
7380
|
interactionStates: Le,
|
|
7381
7381
|
currentDashboardId: nt,
|
|
@@ -7427,7 +7427,7 @@ function An({
|
|
|
7427
7427
|
C == null ? void 0 : C.slots
|
|
7428
7428
|
);
|
|
7429
7429
|
return /* @__PURE__ */ e(
|
|
7430
|
-
|
|
7430
|
+
yu,
|
|
7431
7431
|
{
|
|
7432
7432
|
onLoadingStatus: Ae,
|
|
7433
7433
|
onDataChange: ve,
|
|
@@ -7453,7 +7453,7 @@ function An({
|
|
|
7453
7453
|
A,
|
|
7454
7454
|
{
|
|
7455
7455
|
editing: !0,
|
|
7456
|
-
...
|
|
7456
|
+
...vu({
|
|
7457
7457
|
configCard: l,
|
|
7458
7458
|
slotOrderedCards: S,
|
|
7459
7459
|
slotTypes: ze,
|
|
@@ -7485,7 +7485,7 @@ function An({
|
|
|
7485
7485
|
isError: Q
|
|
7486
7486
|
}) : s.type === "kpi" ? _ || q ? /* @__PURE__ */ e("div", { className: "z-50 flex h-full items-center justify-center", children: /* @__PURE__ */ e(Ht, { size: "md", color: "muted", "aria-label": "Loading data" }) }) : /* @__PURE__ */ e("div", { className: "flex h-full items-center justify-center", children: /* @__PURE__ */ n("div", { className: "w-1/2 space-y-3", children: [
|
|
7487
7487
|
/* @__PURE__ */ e("div", { className: "rounded-md border border-border", children: /* @__PURE__ */ e(
|
|
7488
|
-
|
|
7488
|
+
fu,
|
|
7489
7489
|
{
|
|
7490
7490
|
card: s,
|
|
7491
7491
|
data: z == null ? void 0 : z.records,
|
|
@@ -7494,8 +7494,8 @@ function An({
|
|
|
7494
7494
|
comparisonMetadata: (me = z == null ? void 0 : z.metadata) == null ? void 0 : me.comparisonMetadata
|
|
7495
7495
|
}
|
|
7496
7496
|
) }),
|
|
7497
|
-
|
|
7498
|
-
|
|
7497
|
+
eo(s) && /* @__PURE__ */ e(
|
|
7498
|
+
to,
|
|
7499
7499
|
{
|
|
7500
7500
|
card: s,
|
|
7501
7501
|
mode: "editor",
|
|
@@ -7512,7 +7512,7 @@ function An({
|
|
|
7512
7512
|
showFeedbackButton: !1
|
|
7513
7513
|
}
|
|
7514
7514
|
) }) : /* @__PURE__ */ e("div", { className: "flex h-full min-h-0 flex-col px-4 py-4", children: /* @__PURE__ */ e(
|
|
7515
|
-
|
|
7515
|
+
gu,
|
|
7516
7516
|
{
|
|
7517
7517
|
isLoading: o,
|
|
7518
7518
|
card: s,
|
|
@@ -7577,14 +7577,14 @@ function lc({
|
|
|
7577
7577
|
var L;
|
|
7578
7578
|
const i = P((V) => V.card), l = P((V) => V.actions.setCard), o = P(
|
|
7579
7579
|
(V) => V.actions.updateCardInFrame
|
|
7580
|
-
), d =
|
|
7580
|
+
), d = ai(
|
|
7581
7581
|
(L = i.dynamicCardPreferences) == null ? void 0 : L.rendererCode
|
|
7582
7582
|
), [m, u] = K(d), [f, p] = K(d);
|
|
7583
7583
|
Ce(() => {
|
|
7584
7584
|
u(d), p(d);
|
|
7585
7585
|
}, [d, i.id]);
|
|
7586
7586
|
const h = ce(
|
|
7587
|
-
() =>
|
|
7587
|
+
() => ai(m),
|
|
7588
7588
|
[m]
|
|
7589
7589
|
), x = ce(
|
|
7590
7590
|
() => Mh(h),
|
|
@@ -7592,7 +7592,7 @@ function lc({
|
|
|
7592
7592
|
), T = !!d, v = ce(
|
|
7593
7593
|
() => {
|
|
7594
7594
|
var V;
|
|
7595
|
-
return
|
|
7595
|
+
return ri(
|
|
7596
7596
|
i,
|
|
7597
7597
|
f ? "dynamic" : "builtin",
|
|
7598
7598
|
{
|
|
@@ -7616,7 +7616,7 @@ function lc({
|
|
|
7616
7616
|
}
|
|
7617
7617
|
function M() {
|
|
7618
7618
|
var b;
|
|
7619
|
-
const V =
|
|
7619
|
+
const V = ri(
|
|
7620
7620
|
i,
|
|
7621
7621
|
f ? "dynamic" : "builtin",
|
|
7622
7622
|
{
|
|
@@ -7637,7 +7637,7 @@ function lc({
|
|
|
7637
7637
|
}
|
|
7638
7638
|
return /* @__PURE__ */ n("div", { className: "flex h-full min-h-0 flex-col", children: [
|
|
7639
7639
|
/* @__PURE__ */ e("div", { className: "min-h-0 flex-1 bg-background px-2", children: T ? /* @__PURE__ */ e(
|
|
7640
|
-
|
|
7640
|
+
Gl,
|
|
7641
7641
|
{
|
|
7642
7642
|
card: i,
|
|
7643
7643
|
records: a,
|
|
@@ -7680,7 +7680,7 @@ function lc({
|
|
|
7680
7680
|
] }) }),
|
|
7681
7681
|
/* @__PURE__ */ e("div", { className: "min-h-0 flex-1", children: /* @__PURE__ */ n(rn, { direction: "horizontal", children: [
|
|
7682
7682
|
/* @__PURE__ */ e(ft, { defaultSize: 54, minSize: 38, children: /* @__PURE__ */ e("div", { className: "flex h-full min-h-0 flex-col", children: /* @__PURE__ */ e("div", { className: "min-h-0 flex-1 bg-background p-4", children: g ? /* @__PURE__ */ e(
|
|
7683
|
-
|
|
7683
|
+
Gl,
|
|
7684
7684
|
{
|
|
7685
7685
|
card: v,
|
|
7686
7686
|
records: a,
|
|
@@ -7698,8 +7698,8 @@ function lc({
|
|
|
7698
7698
|
"Visual Code"
|
|
7699
7699
|
] }),
|
|
7700
7700
|
/* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
|
|
7701
|
-
/* @__PURE__ */ n(
|
|
7702
|
-
/* @__PURE__ */ e(
|
|
7701
|
+
/* @__PURE__ */ n(wu, { children: [
|
|
7702
|
+
/* @__PURE__ */ e(Su, { asChild: !0, children: /* @__PURE__ */ n(
|
|
7703
7703
|
ee,
|
|
7704
7704
|
{
|
|
7705
7705
|
type: "button",
|
|
@@ -7713,15 +7713,15 @@ function lc({
|
|
|
7713
7713
|
]
|
|
7714
7714
|
}
|
|
7715
7715
|
) }),
|
|
7716
|
-
/* @__PURE__ */ n(
|
|
7717
|
-
/* @__PURE__ */ n(
|
|
7718
|
-
/* @__PURE__ */ e(
|
|
7719
|
-
/* @__PURE__ */ e(
|
|
7716
|
+
/* @__PURE__ */ n(Tu, { children: [
|
|
7717
|
+
/* @__PURE__ */ n(ku, { children: [
|
|
7718
|
+
/* @__PURE__ */ e(Iu, { children: "Clear dynamic visual?" }),
|
|
7719
|
+
/* @__PURE__ */ e(Du, { children: "This removes the saved dynamic renderer and switches the card back to built-in mode. The underlying query and built-in chart type will remain." })
|
|
7720
7720
|
] }),
|
|
7721
|
-
/* @__PURE__ */ n(
|
|
7722
|
-
/* @__PURE__ */ e(
|
|
7721
|
+
/* @__PURE__ */ n(Eu, { children: [
|
|
7722
|
+
/* @__PURE__ */ e(Au, { children: "Cancel" }),
|
|
7723
7723
|
/* @__PURE__ */ e(
|
|
7724
|
-
|
|
7724
|
+
Ou,
|
|
7725
7725
|
{
|
|
7726
7726
|
className: "bg-foreground text-background hover:bg-foreground/90",
|
|
7727
7727
|
onClick: C,
|
|
@@ -7755,7 +7755,7 @@ function lc({
|
|
|
7755
7755
|
onClick: F,
|
|
7756
7756
|
disabled: !k || !x.valid,
|
|
7757
7757
|
children: [
|
|
7758
|
-
/* @__PURE__ */ e(
|
|
7758
|
+
/* @__PURE__ */ e(Ki, { className: "h-3.5 w-3.5 shrink-0" }),
|
|
7759
7759
|
"Apply to Preview"
|
|
7760
7760
|
]
|
|
7761
7761
|
}
|
|
@@ -7961,7 +7961,7 @@ function ts({
|
|
|
7961
7961
|
var je;
|
|
7962
7962
|
const i = vr(), l = P((xe) => xe.frame), o = P((xe) => xe.card), d = P((xe) => xe.isDevMode), m = P((xe) => xe.editorContext), u = (m == null ? void 0 : m.type) === "documentSection", f = P((xe) => xe.isShowingVisual), p = P(
|
|
7963
7963
|
(xe) => xe.actions.setIsShowingVisual
|
|
7964
|
-
), h = ye((xe) => xe.isVisualEditing), { isConsoleMode: x } =
|
|
7964
|
+
), h = ye((xe) => xe.isVisualEditing), { isConsoleMode: x } = Mu(), T = P((xe) => xe.pythonStdOut), v = P((xe) => xe.actions.setRunSql), g = yt(), k = g === "table" || g === "detailTable" || g === "matrixTable", N = qs(g) && !!(a != null && a.onOpen), E = la(o) === "dynamic", [I, F] = K(!1), w = s ?? I, M = c ?? F, {
|
|
7965
7965
|
setFrame: A,
|
|
7966
7966
|
setCard: C,
|
|
7967
7967
|
setActiveTabCardId: L,
|
|
@@ -7983,7 +7983,7 @@ function ts({
|
|
|
7983
7983
|
pagination: ue
|
|
7984
7984
|
} = wt(z), ve = Ee(Y);
|
|
7985
7985
|
ve.current = Y;
|
|
7986
|
-
const { handleDebugWithAssistant: Ae } =
|
|
7986
|
+
const { handleDebugWithAssistant: Ae } = Ks(
|
|
7987
7987
|
J,
|
|
7988
7988
|
U
|
|
7989
7989
|
), Me = ce(() => (_ == null ? void 0 : _.records) || [], [_ == null ? void 0 : _.records]), { cardFilterValues: Le } = gf(
|
|
@@ -8229,15 +8229,15 @@ function ts({
|
|
|
8229
8229
|
}
|
|
8230
8230
|
),
|
|
8231
8231
|
/* @__PURE__ */ e(
|
|
8232
|
-
|
|
8232
|
+
Hs,
|
|
8233
8233
|
{
|
|
8234
8234
|
triggerVariant: "menu",
|
|
8235
8235
|
className: "w-full"
|
|
8236
8236
|
}
|
|
8237
8237
|
),
|
|
8238
|
-
/* @__PURE__ */ e(
|
|
8238
|
+
/* @__PURE__ */ e(Qs, { triggerVariant: "menu", className: "w-full" }),
|
|
8239
8239
|
/* @__PURE__ */ e(
|
|
8240
|
-
|
|
8240
|
+
Gs,
|
|
8241
8241
|
{
|
|
8242
8242
|
triggerVariant: "menu",
|
|
8243
8243
|
className: "w-full"
|
|
@@ -8271,7 +8271,7 @@ function ts({
|
|
|
8271
8271
|
onSelect: st,
|
|
8272
8272
|
className: "gap-2 text-[13px]",
|
|
8273
8273
|
children: [
|
|
8274
|
-
/* @__PURE__ */ e(
|
|
8274
|
+
/* @__PURE__ */ e(Fu, { className: "h-3.5 w-3.5" }),
|
|
8275
8275
|
"Download CSV"
|
|
8276
8276
|
]
|
|
8277
8277
|
}
|
|
@@ -8293,7 +8293,7 @@ function ts({
|
|
|
8293
8293
|
onSelect: We,
|
|
8294
8294
|
className: "gap-2 text-[13px]",
|
|
8295
8295
|
children: [
|
|
8296
|
-
/* @__PURE__ */ e(
|
|
8296
|
+
/* @__PURE__ */ e(Ru, { className: "h-3.5 w-3.5" }),
|
|
8297
8297
|
"Copy JSON"
|
|
8298
8298
|
]
|
|
8299
8299
|
}
|
|
@@ -8416,10 +8416,10 @@ function Xf() {
|
|
|
8416
8416
|
), i = ce(
|
|
8417
8417
|
() => {
|
|
8418
8418
|
var T, v;
|
|
8419
|
-
return
|
|
8419
|
+
return Pu((v = (T = t.preferences) == null ? void 0 : T.tablePrefs) == null ? void 0 : v.pageSize);
|
|
8420
8420
|
},
|
|
8421
8421
|
[(d = (o = t.preferences) == null ? void 0 : o.tablePrefs) == null ? void 0 : d.pageSize]
|
|
8422
|
-
), l =
|
|
8422
|
+
), l = Lu(
|
|
8423
8423
|
(u = (m = t.preferences) == null ? void 0 : m.tablePrefs) == null ? void 0 : u.pageSize
|
|
8424
8424
|
);
|
|
8425
8425
|
return t.type !== "table" && t.type !== "detailTable" ? null : /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
|
|
@@ -8556,7 +8556,7 @@ function fn({
|
|
|
8556
8556
|
}
|
|
8557
8557
|
),
|
|
8558
8558
|
/* @__PURE__ */ e(se, { children: /* @__PURE__ */ n(bs, { children: [
|
|
8559
|
-
/* @__PURE__ */ e(
|
|
8559
|
+
/* @__PURE__ */ e(Ro, { children: a }),
|
|
8560
8560
|
r.map((d) => /* @__PURE__ */ e(j, { value: d.value, children: d.label }, d.value))
|
|
8561
8561
|
] }) })
|
|
8562
8562
|
]
|
|
@@ -8666,7 +8666,7 @@ function cc() {
|
|
|
8666
8666
|
var C, L, V;
|
|
8667
8667
|
const t = P(
|
|
8668
8668
|
(b) => b.card.customCardPreferences
|
|
8669
|
-
), { data: a } =
|
|
8669
|
+
), { data: a } = Vu(), r = (a == null ? void 0 : a.plugins) || [], s = P((b) => b.card), c = P((b) => b.frame), { setCustomCardPreferences: i } = Ne(), l = ce(
|
|
8670
8670
|
() => $n(c, s),
|
|
8671
8671
|
[c, s]
|
|
8672
8672
|
), o = l == null ? void 0 : l.customCardPreferences, { components: d, manifest: m } = Nn(
|
|
@@ -8684,7 +8684,7 @@ function cc() {
|
|
|
8684
8684
|
}),
|
|
8685
8685
|
[c, l, s, p]
|
|
8686
8686
|
), g = ce(
|
|
8687
|
-
() =>
|
|
8687
|
+
() => ho(v),
|
|
8688
8688
|
[v]
|
|
8689
8689
|
), k = ce(
|
|
8690
8690
|
() => g.map((b, S) => {
|
|
@@ -8855,7 +8855,7 @@ function cc() {
|
|
|
8855
8855
|
] })
|
|
8856
8856
|
] }) })
|
|
8857
8857
|
] }),
|
|
8858
|
-
p && R.length > 0 && /* @__PURE__ */ e(
|
|
8858
|
+
p && R.length > 0 && /* @__PURE__ */ e(po, { className: "mt-3 border-yellow-500/40 bg-yellow-500/10 text-yellow-900 dark:text-yellow-100", children: /* @__PURE__ */ e(fo, { children: /* @__PURE__ */ e("ul", { className: "list-disc space-y-1 pl-4 text-xs", children: R.map((b, S) => /* @__PURE__ */ e("li", { children: b.message }, `${b.type}-${S}`)) }) }) }),
|
|
8859
8859
|
u && !p && u.settings && /* @__PURE__ */ e("div", { className: "space-y-3", children: /* @__PURE__ */ e("div", { className: "px-2", children: M({
|
|
8860
8860
|
settingsSchema: u.settings,
|
|
8861
8861
|
settingsField: "settings",
|
|
@@ -8967,9 +8967,9 @@ function cc() {
|
|
|
8967
8967
|
u.docs.dataSchema && /* @__PURE__ */ n("div", { className: "space-y-2", children: [
|
|
8968
8968
|
/* @__PURE__ */ e("h4", { className: "text-xs font-semibold uppercase tracking-wide text-muted-foreground", children: "Data Schema" }),
|
|
8969
8969
|
/* @__PURE__ */ e("div", { className: "prose prose-sm dark:prose-invert prose-pre:bg-muted prose-pre:text-xs max-w-none", children: /* @__PURE__ */ e(
|
|
8970
|
-
|
|
8970
|
+
Bu,
|
|
8971
8971
|
{
|
|
8972
|
-
remarkPlugins: [
|
|
8972
|
+
remarkPlugins: [_u],
|
|
8973
8973
|
components: ag,
|
|
8974
8974
|
children: u.docs.dataSchema
|
|
8975
8975
|
}
|
|
@@ -9047,7 +9047,7 @@ function rg(t, a) {
|
|
|
9047
9047
|
maximumFractionDigits: a
|
|
9048
9048
|
};
|
|
9049
9049
|
}
|
|
9050
|
-
function
|
|
9050
|
+
function vi(t) {
|
|
9051
9051
|
const a = t.decimalPlaces;
|
|
9052
9052
|
return {
|
|
9053
9053
|
...t,
|
|
@@ -9091,7 +9091,7 @@ const Wn = "__report_default__", lg = [
|
|
|
9091
9091
|
"scientific",
|
|
9092
9092
|
"date",
|
|
9093
9093
|
"duration"
|
|
9094
|
-
],
|
|
9094
|
+
], Ni = [
|
|
9095
9095
|
// 🌐 Global Reserve & Major Currencies
|
|
9096
9096
|
{ value: "USD", label: "USD - US Dollar" },
|
|
9097
9097
|
{ value: "EUR", label: "EUR - Euro" },
|
|
@@ -9144,7 +9144,7 @@ const Wn = "__report_default__", lg = [
|
|
|
9144
9144
|
{ value: "VND", label: "VND - Vietnamese Dong" },
|
|
9145
9145
|
{ value: "TWD", label: "TWD - New Taiwan Dollar" },
|
|
9146
9146
|
{ value: "ILS", label: "ILS - Israeli New Shekel" }
|
|
9147
|
-
],
|
|
9147
|
+
], Ci = [
|
|
9148
9148
|
{ value: "en-US", label: "English (US)" },
|
|
9149
9149
|
{ value: "en-GB", label: "English (UK)" },
|
|
9150
9150
|
{ value: "en-IN", label: "English (India)" },
|
|
@@ -9217,14 +9217,14 @@ function Wa({
|
|
|
9217
9217
|
}
|
|
9218
9218
|
);
|
|
9219
9219
|
a(
|
|
9220
|
-
i && C === "currency" && t.type !== "currency" ?
|
|
9220
|
+
i && C === "currency" && t.type !== "currency" ? vi(L) : L
|
|
9221
9221
|
);
|
|
9222
9222
|
}, E = (C) => i && o === "currency" ? rg(
|
|
9223
9223
|
d,
|
|
9224
9224
|
C
|
|
9225
|
-
) : uc(d, C), I = ((M =
|
|
9225
|
+
) : uc(d, C), I = ((M = Ni.find(
|
|
9226
9226
|
(C) => C.value === (i == null ? void 0 : i.currency)
|
|
9227
|
-
)) == null ? void 0 : M.label) ?? (i == null ? void 0 : i.currency), F = ((A =
|
|
9227
|
+
)) == null ? void 0 : M.label) ?? (i == null ? void 0 : i.currency), F = ((A = Ci.find((C) => C.value === (i == null ? void 0 : i.locale))) == null ? void 0 : A.label) ?? (i == null ? void 0 : i.locale), w = o === "number" || o === "currency" || o === "percent" || o === "scientific";
|
|
9228
9228
|
return Ce(() => {
|
|
9229
9229
|
k(String(T));
|
|
9230
9230
|
}, [T]), Ce(() => {
|
|
@@ -9305,7 +9305,7 @@ function Wa({
|
|
|
9305
9305
|
onValueChange: (C) => {
|
|
9306
9306
|
if (C === Wn) {
|
|
9307
9307
|
a(
|
|
9308
|
-
|
|
9308
|
+
vi(d)
|
|
9309
9309
|
);
|
|
9310
9310
|
return;
|
|
9311
9311
|
}
|
|
@@ -9334,7 +9334,7 @@ function Wa({
|
|
|
9334
9334
|
]
|
|
9335
9335
|
}
|
|
9336
9336
|
),
|
|
9337
|
-
|
|
9337
|
+
Ni.map((C) => /* @__PURE__ */ e(
|
|
9338
9338
|
j,
|
|
9339
9339
|
{
|
|
9340
9340
|
value: C.value,
|
|
@@ -9393,7 +9393,7 @@ function Wa({
|
|
|
9393
9393
|
]
|
|
9394
9394
|
}
|
|
9395
9395
|
),
|
|
9396
|
-
|
|
9396
|
+
Ci.map((C) => /* @__PURE__ */ e(
|
|
9397
9397
|
j,
|
|
9398
9398
|
{
|
|
9399
9399
|
value: C.value,
|
|
@@ -9629,7 +9629,7 @@ function Wa({
|
|
|
9629
9629
|
] })
|
|
9630
9630
|
] });
|
|
9631
9631
|
}
|
|
9632
|
-
function
|
|
9632
|
+
function wi({
|
|
9633
9633
|
colorRanges: t,
|
|
9634
9634
|
setColorRanges: a
|
|
9635
9635
|
}) {
|
|
@@ -9717,16 +9717,16 @@ function ug(t) {
|
|
|
9717
9717
|
}
|
|
9718
9718
|
function mg(t) {
|
|
9719
9719
|
var r;
|
|
9720
|
-
const a =
|
|
9720
|
+
const a = Po(
|
|
9721
9721
|
(r = t == null ? void 0 : t.kpiVisualOptions) == null ? void 0 : r.formatOptions
|
|
9722
9722
|
) || (t != null && t.formatNumber ? Ph(t == null ? void 0 : t.formatNumber) : void 0);
|
|
9723
|
-
return
|
|
9723
|
+
return Lo(a, { preserveOmittedProperties: !0 }) || {
|
|
9724
9724
|
type: "number",
|
|
9725
9725
|
minimumFractionDigits: 0,
|
|
9726
9726
|
maximumFractionDigits: 0
|
|
9727
9727
|
};
|
|
9728
9728
|
}
|
|
9729
|
-
function
|
|
9729
|
+
function Si(t) {
|
|
9730
9730
|
return {
|
|
9731
9731
|
enabled: !0,
|
|
9732
9732
|
colorRanges: t == null ? void 0 : t.colorRanges
|
|
@@ -9743,13 +9743,13 @@ function hg() {
|
|
|
9743
9743
|
}
|
|
9744
9744
|
), s = P(
|
|
9745
9745
|
(T) => T.actions.setColorRanges
|
|
9746
|
-
), c =
|
|
9746
|
+
), c = go() ?? ys, i = !zu(t) && ia(t.config), l = mg(t.preferences), o = !!Po(
|
|
9747
9747
|
(p = (f = t.preferences) == null ? void 0 : f.kpiVisualOptions) == null ? void 0 : p.formatOptions
|
|
9748
9748
|
), d = !ug((h = t.preferences) == null ? void 0 : h.formatNumber) && (o || !!((x = t.preferences) != null && x.formatNumber)), m = (T) => {
|
|
9749
9749
|
const v = P.getState().card.preferences ?? {};
|
|
9750
9750
|
a({
|
|
9751
9751
|
...v,
|
|
9752
|
-
formatNumber:
|
|
9752
|
+
formatNumber: Si(v.formatNumber),
|
|
9753
9753
|
kpiVisualOptions: {
|
|
9754
9754
|
...v.kpiVisualOptions,
|
|
9755
9755
|
formatOptions: T
|
|
@@ -9760,7 +9760,7 @@ function hg() {
|
|
|
9760
9760
|
if (T) {
|
|
9761
9761
|
a({
|
|
9762
9762
|
...v,
|
|
9763
|
-
formatNumber:
|
|
9763
|
+
formatNumber: Si(v.formatNumber),
|
|
9764
9764
|
kpiVisualOptions: {
|
|
9765
9765
|
...v.kpiVisualOptions,
|
|
9766
9766
|
formatOptions: l
|
|
@@ -9777,7 +9777,7 @@ function hg() {
|
|
|
9777
9777
|
});
|
|
9778
9778
|
};
|
|
9779
9779
|
return i ? /* @__PURE__ */ e(
|
|
9780
|
-
|
|
9780
|
+
wi,
|
|
9781
9781
|
{
|
|
9782
9782
|
colorRanges: r,
|
|
9783
9783
|
setColorRanges: s
|
|
@@ -9810,7 +9810,7 @@ function hg() {
|
|
|
9810
9810
|
),
|
|
9811
9811
|
/* @__PURE__ */ e(xr, { className: "my-3" }),
|
|
9812
9812
|
/* @__PURE__ */ e(
|
|
9813
|
-
|
|
9813
|
+
wi,
|
|
9814
9814
|
{
|
|
9815
9815
|
colorRanges: r,
|
|
9816
9816
|
setColorRanges: s
|
|
@@ -10133,7 +10133,7 @@ function fg({
|
|
|
10133
10133
|
className: "inline-flex items-center gap-1.5 text-xs font-medium text-primary hover:underline",
|
|
10134
10134
|
children: [
|
|
10135
10135
|
"View documentation",
|
|
10136
|
-
/* @__PURE__ */ e(
|
|
10136
|
+
/* @__PURE__ */ e($u, { className: "h-3 w-3" })
|
|
10137
10137
|
]
|
|
10138
10138
|
}
|
|
10139
10139
|
)
|
|
@@ -10163,7 +10163,7 @@ function gg({
|
|
|
10163
10163
|
)
|
|
10164
10164
|
] }) : null;
|
|
10165
10165
|
}
|
|
10166
|
-
function
|
|
10166
|
+
function Ws({
|
|
10167
10167
|
chartType: t,
|
|
10168
10168
|
suffix: a = "Configuration"
|
|
10169
10169
|
}) {
|
|
@@ -10178,14 +10178,14 @@ function xg() {
|
|
|
10178
10178
|
), a = P(
|
|
10179
10179
|
(c) => {
|
|
10180
10180
|
var i, l;
|
|
10181
|
-
return ((l = (i = c.card.preferences) == null ? void 0 : i.kpiVisualOptions) == null ? void 0 : l.queryComparisonPolarity) ??
|
|
10181
|
+
return ((l = (i = c.card.preferences) == null ? void 0 : i.kpiVisualOptions) == null ? void 0 : l.queryComparisonPolarity) ?? ii;
|
|
10182
10182
|
}
|
|
10183
10183
|
), r = P(
|
|
10184
10184
|
(c) => c.actions.setCardPreferences
|
|
10185
10185
|
), s = (c) => {
|
|
10186
10186
|
const i = P.getState().card.preferences ?? {}, l = {
|
|
10187
10187
|
...i.kpiVisualOptions,
|
|
10188
|
-
queryComparisonPolarity: c ===
|
|
10188
|
+
queryComparisonPolarity: c === ii ? void 0 : c
|
|
10189
10189
|
};
|
|
10190
10190
|
r({
|
|
10191
10191
|
...i,
|
|
@@ -10193,7 +10193,7 @@ function xg() {
|
|
|
10193
10193
|
});
|
|
10194
10194
|
};
|
|
10195
10195
|
return /* @__PURE__ */ n("div", { className: "space-y-6 px-6 py-4", children: [
|
|
10196
|
-
/* @__PURE__ */ e(
|
|
10196
|
+
/* @__PURE__ */ e(Ws, { chartType: "kpi" }),
|
|
10197
10197
|
/* @__PURE__ */ e("section", { children: /* @__PURE__ */ e(hg, {}) }),
|
|
10198
10198
|
t && /* @__PURE__ */ n("section", { className: "space-y-1.5", children: [
|
|
10199
10199
|
/* @__PURE__ */ e($, { htmlFor: "query-kpi-favorable-direction", className: "text-xs", children: "Favorable direction" }),
|
|
@@ -10225,7 +10225,7 @@ function xg() {
|
|
|
10225
10225
|
] })
|
|
10226
10226
|
] });
|
|
10227
10227
|
}
|
|
10228
|
-
function
|
|
10228
|
+
function Ti({
|
|
10229
10229
|
children: t,
|
|
10230
10230
|
summary: a,
|
|
10231
10231
|
open: r,
|
|
@@ -10469,8 +10469,8 @@ function Cg() {
|
|
|
10469
10469
|
value: M
|
|
10470
10470
|
})) || [];
|
|
10471
10471
|
return /* @__PURE__ */ n("div", { className: "space-y-4 px-6 py-4", children: [
|
|
10472
|
-
/* @__PURE__ */ e(
|
|
10473
|
-
/* @__PURE__ */ e(
|
|
10472
|
+
/* @__PURE__ */ e(Ws, { chartType: "map" }),
|
|
10473
|
+
/* @__PURE__ */ e(Ti, { open: !0, summary: "Settings", children: /* @__PURE__ */ n("div", { className: "space-y-3 px-2", children: [
|
|
10474
10474
|
/* @__PURE__ */ e(
|
|
10475
10475
|
fn,
|
|
10476
10476
|
{
|
|
@@ -10593,7 +10593,7 @@ function Cg() {
|
|
|
10593
10593
|
] })
|
|
10594
10594
|
] }) }),
|
|
10595
10595
|
/* @__PURE__ */ e(xr, { className: "my-4" }),
|
|
10596
|
-
/* @__PURE__ */ e(
|
|
10596
|
+
/* @__PURE__ */ e(Ti, { className: "", summary: "Scale Options", children: /* @__PURE__ */ n("div", { className: "flex items-center gap-3", children: [
|
|
10597
10597
|
/* @__PURE__ */ e(
|
|
10598
10598
|
Pe,
|
|
10599
10599
|
{
|
|
@@ -10936,15 +10936,15 @@ function pc({
|
|
|
10936
10936
|
(U) => U.actions.setCardPreferences
|
|
10937
10937
|
), m = P(
|
|
10938
10938
|
(U) => U.actions.updateTableConditionalFormatting
|
|
10939
|
-
), u = ((q = c.config) == null ? void 0 : q.metricColumns) || [], f = t ?? c.type, p = a ?? i, h = c.type === f ? c : { ...c, type: f }, x =
|
|
10939
|
+
), u = ((q = c.config) == null ? void 0 : q.metricColumns) || [], f = t ?? c.type, p = a ?? i, h = c.type === f ? c : { ...c, type: f }, x = qu(
|
|
10940
10940
|
h,
|
|
10941
10941
|
p
|
|
10942
|
-
), T =
|
|
10942
|
+
), T = ju(
|
|
10943
10943
|
h,
|
|
10944
10944
|
p
|
|
10945
|
-
), v =
|
|
10945
|
+
), v = Yu(f), g = f === "table", k = f === "table", R = ((Q = x[0]) == null ? void 0 : Q.value) || "", N = Ku(
|
|
10946
10946
|
(J = l == null ? void 0 : l.tablePrefs) == null ? void 0 : J.conditionalFormatting
|
|
10947
|
-
), y =
|
|
10947
|
+
), y = Uu(o), E = Gu(h), I = Hu(h), [F, w] = K("style");
|
|
10948
10948
|
Ce(() => {
|
|
10949
10949
|
if (r === "style") {
|
|
10950
10950
|
w("style");
|
|
@@ -11026,7 +11026,7 @@ function pc({
|
|
|
11026
11026
|
...l,
|
|
11027
11027
|
tablePrefs: {
|
|
11028
11028
|
...o,
|
|
11029
|
-
columnVisibility:
|
|
11029
|
+
columnVisibility: Xu(
|
|
11030
11030
|
o == null ? void 0 : o.columnVisibility,
|
|
11031
11031
|
U,
|
|
11032
11032
|
Z
|
|
@@ -11038,7 +11038,7 @@ function pc({
|
|
|
11038
11038
|
...l,
|
|
11039
11039
|
tablePrefs: {
|
|
11040
11040
|
...o,
|
|
11041
|
-
columnVisibility:
|
|
11041
|
+
columnVisibility: Zu()
|
|
11042
11042
|
}
|
|
11043
11043
|
});
|
|
11044
11044
|
}, z = () => {
|
|
@@ -11106,7 +11106,7 @@ function pc({
|
|
|
11106
11106
|
)
|
|
11107
11107
|
] }),
|
|
11108
11108
|
/* @__PURE__ */ e(On, { value: "style", className: "mt-0", children: /* @__PURE__ */ e(
|
|
11109
|
-
|
|
11109
|
+
Qu,
|
|
11110
11110
|
{
|
|
11111
11111
|
style: y,
|
|
11112
11112
|
onDensityChange: V,
|
|
@@ -11123,7 +11123,7 @@ function pc({
|
|
|
11123
11123
|
}
|
|
11124
11124
|
) }),
|
|
11125
11125
|
/* @__PURE__ */ e(On, { value: "columns", className: "mt-0", children: k ? /* @__PURE__ */ e(
|
|
11126
|
-
|
|
11126
|
+
Wu,
|
|
11127
11127
|
{
|
|
11128
11128
|
columns: T,
|
|
11129
11129
|
columnVisibility: o == null ? void 0 : o.columnVisibility,
|
|
@@ -11132,7 +11132,7 @@ function pc({
|
|
|
11132
11132
|
}
|
|
11133
11133
|
) : /* @__PURE__ */ e("p", { className: "py-6 text-center text-[12px] text-muted-foreground", children: "Column visibility is available for table cards." }) }),
|
|
11134
11134
|
/* @__PURE__ */ e(On, { value: "conditional-formatting", className: "mt-0", children: v ? R ? /* @__PURE__ */ e(
|
|
11135
|
-
|
|
11135
|
+
Ju,
|
|
11136
11136
|
{
|
|
11137
11137
|
columnId: R,
|
|
11138
11138
|
availableColumns: x,
|
|
@@ -11172,9 +11172,9 @@ function Ig() {
|
|
|
11172
11172
|
function Dg({ color: t, onColorChange: a, onClose: r }) {
|
|
11173
11173
|
const [s, c] = K(0), [i, l] = K(100), [o, d] = K(50), [m, u] = K(t);
|
|
11174
11174
|
Ce(() => {
|
|
11175
|
-
const v =
|
|
11175
|
+
const v = ki(t);
|
|
11176
11176
|
if (v) {
|
|
11177
|
-
const g =
|
|
11177
|
+
const g = Ii(v.r, v.g, v.b);
|
|
11178
11178
|
c(g.h), l(g.s), d(g.l), u(t);
|
|
11179
11179
|
}
|
|
11180
11180
|
}, [t]);
|
|
@@ -11188,9 +11188,9 @@ function Dg({ color: t, onColorChange: a, onClose: r }) {
|
|
|
11188
11188
|
u(N);
|
|
11189
11189
|
}, x = (v) => {
|
|
11190
11190
|
if (u(v), /^#[0-9A-Fa-f]{6}$/.test(v)) {
|
|
11191
|
-
const g =
|
|
11191
|
+
const g = ki(v);
|
|
11192
11192
|
if (g) {
|
|
11193
|
-
const k =
|
|
11193
|
+
const k = Ii(g.r, g.g, g.b);
|
|
11194
11194
|
c(k.h), l(k.s), d(k.l);
|
|
11195
11195
|
}
|
|
11196
11196
|
}
|
|
@@ -11296,7 +11296,7 @@ function Dg({ color: t, onColorChange: a, onClose: r }) {
|
|
|
11296
11296
|
] })
|
|
11297
11297
|
] });
|
|
11298
11298
|
}
|
|
11299
|
-
function
|
|
11299
|
+
function ki(t) {
|
|
11300
11300
|
const a = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);
|
|
11301
11301
|
return a ? {
|
|
11302
11302
|
r: parseInt(a[1], 16),
|
|
@@ -11307,7 +11307,7 @@ function Ii(t) {
|
|
|
11307
11307
|
function Eg(t, a, r) {
|
|
11308
11308
|
return "#" + ((1 << 24) + (t << 16) + (a << 8) + r).toString(16).slice(1);
|
|
11309
11309
|
}
|
|
11310
|
-
function
|
|
11310
|
+
function Ii(t, a, r) {
|
|
11311
11311
|
t /= 255, a /= 255, r /= 255;
|
|
11312
11312
|
const s = Math.max(t, a, r), c = Math.min(t, a, r);
|
|
11313
11313
|
let i = 0, l = 0;
|
|
@@ -11431,11 +11431,11 @@ function Mg() {
|
|
|
11431
11431
|
(E = t == null ? void 0 : t.config) == null ? void 0 : E.pivotByColumns,
|
|
11432
11432
|
(I = t == null ? void 0 : t.config) == null ? void 0 : I.metricColumns,
|
|
11433
11433
|
r
|
|
11434
|
-
]), x = ce(() =>
|
|
11434
|
+
]), x = ce(() => em(), []);
|
|
11435
11435
|
Ce(() => {
|
|
11436
11436
|
const b = {};
|
|
11437
11437
|
h.forEach((S, D) => {
|
|
11438
|
-
b[S] =
|
|
11438
|
+
b[S] = Hl(
|
|
11439
11439
|
S,
|
|
11440
11440
|
D,
|
|
11441
11441
|
a == null ? void 0 : a.colorConfig
|
|
@@ -11495,7 +11495,7 @@ function Mg() {
|
|
|
11495
11495
|
c(S);
|
|
11496
11496
|
const D = {};
|
|
11497
11497
|
h.forEach((O, B) => {
|
|
11498
|
-
D[O] =
|
|
11498
|
+
D[O] = Hl(O, B, void 0);
|
|
11499
11499
|
}), d(D);
|
|
11500
11500
|
}, N = Object.keys(((V = a == null ? void 0 : a.colorConfig) == null ? void 0 : V.segments) || {}).length > 0;
|
|
11501
11501
|
return /* @__PURE__ */ n(it, { value: "colors", className: "border-b-0", children: [
|
|
@@ -11516,7 +11516,7 @@ function Mg() {
|
|
|
11516
11516
|
}
|
|
11517
11517
|
) }) }),
|
|
11518
11518
|
/* @__PURE__ */ e("div", { className: "max-h-[200px] space-y-2 overflow-y-auto pr-1", children: h.map((b, S) => {
|
|
11519
|
-
const D =
|
|
11519
|
+
const D = tm(o[b], S), O = !D;
|
|
11520
11520
|
return /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
|
|
11521
11521
|
/* @__PURE__ */ n(
|
|
11522
11522
|
Rt,
|
|
@@ -11693,7 +11693,7 @@ function qt({
|
|
|
11693
11693
|
}
|
|
11694
11694
|
function rs({ axis: t, label: a, type: r, config: s, onChange: c, defaultTitle: i, hidePosition: l }) {
|
|
11695
11695
|
var x, T, v, g, k, R, N, y, E, I, F, w, M, A;
|
|
11696
|
-
const o =
|
|
11696
|
+
const o = am({
|
|
11697
11697
|
formatMode: s == null ? void 0 : s.formatMode,
|
|
11698
11698
|
formatOptions: s == null ? void 0 : s.formatOptions
|
|
11699
11699
|
}), d = (C, L) => {
|
|
@@ -11961,7 +11961,7 @@ function Fg() {
|
|
|
11961
11961
|
}), { setCardPreferences: r, updateCardInFrame: s } = Ne(), c = yt();
|
|
11962
11962
|
if (!t || ["tornado", "pyramid", "kpi", "treemap"].includes(c))
|
|
11963
11963
|
return null;
|
|
11964
|
-
const i =
|
|
11964
|
+
const i = nm.getAxisInfo(
|
|
11965
11965
|
c,
|
|
11966
11966
|
a
|
|
11967
11967
|
);
|
|
@@ -11994,7 +11994,7 @@ function Fg() {
|
|
|
11994
11994
|
label: "X-Axis",
|
|
11995
11995
|
type: i.xAxisType,
|
|
11996
11996
|
config: qr(
|
|
11997
|
-
|
|
11997
|
+
Ql(c, "x"),
|
|
11998
11998
|
a == null ? void 0 : a.xAxisConfig
|
|
11999
11999
|
),
|
|
12000
12000
|
onChange: (d) => l("x", d),
|
|
@@ -12008,7 +12008,7 @@ function Fg() {
|
|
|
12008
12008
|
label: o ? "Y-Axis (Left)" : "Y-Axis",
|
|
12009
12009
|
type: i.yAxisType,
|
|
12010
12010
|
config: qr(
|
|
12011
|
-
|
|
12011
|
+
Ql(c, "y"),
|
|
12012
12012
|
a == null ? void 0 : a.yAxisConfig
|
|
12013
12013
|
),
|
|
12014
12014
|
onChange: (d) => l("y", d),
|
|
@@ -12040,9 +12040,9 @@ function Rg() {
|
|
|
12040
12040
|
return (T = (x = (h = (p = f.card) == null ? void 0 : p.preferences) == null ? void 0 : h.chartOptions) == null ? void 0 : x.plugins) == null ? void 0 : T.legend;
|
|
12041
12041
|
}
|
|
12042
12042
|
), { setLegendOptions: s } = Ne();
|
|
12043
|
-
if (!t || !
|
|
12043
|
+
if (!t || !rm(a))
|
|
12044
12044
|
return null;
|
|
12045
|
-
const c =
|
|
12045
|
+
const c = sm(a), i = (c == null ? void 0 : c.display) ?? !0, l = (c == null ? void 0 : c.position) ?? "top", o = (c == null ? void 0 : c.align) ?? "center", d = (f, p) => {
|
|
12046
12046
|
const h = {
|
|
12047
12047
|
...r,
|
|
12048
12048
|
[f]: p
|
|
@@ -12110,9 +12110,9 @@ function Pg() {
|
|
|
12110
12110
|
var _;
|
|
12111
12111
|
return (_ = z.card) == null ? void 0 : _.preferences;
|
|
12112
12112
|
}), { setCardPreferences: c, updateCardInFrame: i } = Ne();
|
|
12113
|
-
if (!t || !
|
|
12113
|
+
if (!t || !lm(a))
|
|
12114
12114
|
return null;
|
|
12115
|
-
const l = a === "bullet" ? ((L = s == null ? void 0 : s.bulletConfig) == null ? void 0 : L.orientation) ?? (((V = s == null ? void 0 : s.chartOptions) == null ? void 0 : V.indexAxis) === "x" ? "vertical" : "horizontal") : void 0, o = l != null ? l === "horizontal" : ((b = s == null ? void 0 : s.chartOptions) == null ? void 0 : b.indexAxis) === "y", d = a === "stackedBar" || a === "stackedLine", m = a === "pie" || a === "doughnut" || a === "polarArea" || a === "funnel", u = a === "bubble" || a === "scatter", f = (D = (S = s == null ? void 0 : s.chartOptions) == null ? void 0 : S.plugins) == null ? void 0 : D.datalabels, p = (f == null ? void 0 : f.display) !== !1 && ((f == null ? void 0 : f.anchor) || (f == null ? void 0 : f.align)), h =
|
|
12115
|
+
const l = a === "bullet" ? ((L = s == null ? void 0 : s.bulletConfig) == null ? void 0 : L.orientation) ?? (((V = s == null ? void 0 : s.chartOptions) == null ? void 0 : V.indexAxis) === "x" ? "vertical" : "horizontal") : void 0, o = l != null ? l === "horizontal" : ((b = s == null ? void 0 : s.chartOptions) == null ? void 0 : b.indexAxis) === "y", d = a === "stackedBar" || a === "stackedLine", m = a === "pie" || a === "doughnut" || a === "polarArea" || a === "funnel", u = a === "bubble" || a === "scatter", f = (D = (S = s == null ? void 0 : s.chartOptions) == null ? void 0 : S.plugins) == null ? void 0 : D.datalabels, p = (f == null ? void 0 : f.display) !== !1 && ((f == null ? void 0 : f.anchor) || (f == null ? void 0 : f.align)), h = im(
|
|
12116
12116
|
a,
|
|
12117
12117
|
t.preferences
|
|
12118
12118
|
), x = r ?? h, T = (h == null ? void 0 : h.enabled) ?? p ?? !1, v = (r == null ? void 0 : r.enabled) !== void 0 ? r.enabled : T, g = (z, _) => {
|
|
@@ -12401,7 +12401,7 @@ function Lg() {
|
|
|
12401
12401
|
};
|
|
12402
12402
|
return /* @__PURE__ */ n(it, { value: "treemap-color-mode", className: "border-none", children: [
|
|
12403
12403
|
/* @__PURE__ */ e(ot, { className: "flex w-full items-center gap-2 py-3 text-[12px] font-medium hover:no-underline", children: /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
|
|
12404
|
-
/* @__PURE__ */ e(
|
|
12404
|
+
/* @__PURE__ */ e(oo, { className: "h-4 w-4 text-muted-foreground" }),
|
|
12405
12405
|
/* @__PURE__ */ e("span", { children: "Treemap Colors" })
|
|
12406
12406
|
] }) }),
|
|
12407
12407
|
/* @__PURE__ */ e(ct, { className: "space-y-4 border-t border-border bg-background/50 px-3 py-4 text-sm", children: /* @__PURE__ */ n(
|
|
@@ -12444,7 +12444,7 @@ function Lg() {
|
|
|
12444
12444
|
) })
|
|
12445
12445
|
] });
|
|
12446
12446
|
}
|
|
12447
|
-
const Vg = Object.keys(
|
|
12447
|
+
const Vg = Object.keys(xo);
|
|
12448
12448
|
function Bg() {
|
|
12449
12449
|
const t = P((p) => p.card), a = P((p) => {
|
|
12450
12450
|
var h;
|
|
@@ -12486,7 +12486,7 @@ function Bg() {
|
|
|
12486
12486
|
className: "space-y-3",
|
|
12487
12487
|
children: [
|
|
12488
12488
|
Vg.map((p) => {
|
|
12489
|
-
const h =
|
|
12489
|
+
const h = xo[p];
|
|
12490
12490
|
return /* @__PURE__ */ n(
|
|
12491
12491
|
"div",
|
|
12492
12492
|
{
|
|
@@ -12571,8 +12571,8 @@ function Bg() {
|
|
|
12571
12571
|
] })
|
|
12572
12572
|
] }) : null;
|
|
12573
12573
|
}
|
|
12574
|
-
const
|
|
12575
|
-
function
|
|
12574
|
+
const Di = ["poor", "satisfactory", "good"];
|
|
12575
|
+
function Ei(t) {
|
|
12576
12576
|
if (!t) return;
|
|
12577
12577
|
const a = { ...t };
|
|
12578
12578
|
return a.targetMetricKey || delete a.targetMetricKey, a.comparativeMetricKey || delete a.comparativeMetricKey, !a.targetValue && a.targetValue !== 0 && delete a.targetValue, (!a.rangeKeys || Object.keys(a.rangeKeys).length === 0) && delete a.rangeKeys, (!a.ranges || Object.keys(a.ranges).length === 0) && delete a.ranges, (!a.rangeLabels || Object.keys(a.rangeLabels).length === 0) && delete a.rangeLabels, a;
|
|
@@ -12627,10 +12627,10 @@ function _g() {
|
|
|
12627
12627
|
...i.rangeKeys || {}
|
|
12628
12628
|
};
|
|
12629
12629
|
let _ = !1;
|
|
12630
|
-
if (
|
|
12630
|
+
if (Di.forEach((J, U) => {
|
|
12631
12631
|
!z[J] && B[U] && (z[J] = B[U].value, _ = !0);
|
|
12632
12632
|
}), _ && (b.rangeKeys = z, S = !0, i.showRanges === void 0 && (b.showRanges = !0)), S) {
|
|
12633
|
-
const J =
|
|
12633
|
+
const J = Ei({
|
|
12634
12634
|
...i,
|
|
12635
12635
|
...b
|
|
12636
12636
|
});
|
|
@@ -12641,7 +12641,7 @@ function _g() {
|
|
|
12641
12641
|
}
|
|
12642
12642
|
}, [v, i, t, s]);
|
|
12643
12643
|
const g = (b) => {
|
|
12644
|
-
const S =
|
|
12644
|
+
const S = Ei({
|
|
12645
12645
|
...i,
|
|
12646
12646
|
...b
|
|
12647
12647
|
});
|
|
@@ -12718,7 +12718,7 @@ function _g() {
|
|
|
12718
12718
|
};
|
|
12719
12719
|
return /* @__PURE__ */ n(it, { value: "bullet-config", className: "border-b-0", children: [
|
|
12720
12720
|
/* @__PURE__ */ e(ot, { className: "flex w-full items-center gap-2 py-2 text-[12px] font-medium hover:no-underline", children: /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
|
|
12721
|
-
/* @__PURE__ */ e(
|
|
12721
|
+
/* @__PURE__ */ e(io, { className: "h-4 w-4 text-muted-foreground" }),
|
|
12722
12722
|
/* @__PURE__ */ e("span", { children: "Bullet Chart" })
|
|
12723
12723
|
] }) }),
|
|
12724
12724
|
/* @__PURE__ */ n(ct, { className: "space-y-6 border-t border-border/50 py-4", children: [
|
|
@@ -12859,7 +12859,7 @@ function _g() {
|
|
|
12859
12859
|
/* @__PURE__ */ e("span", { children: "Use % of value" })
|
|
12860
12860
|
] })
|
|
12861
12861
|
] }),
|
|
12862
|
-
d && /* @__PURE__ */ e("div", { className: "space-y-3", children:
|
|
12862
|
+
d && /* @__PURE__ */ e("div", { className: "space-y-3", children: Di.map((b) => {
|
|
12863
12863
|
var S, D, O, B, z;
|
|
12864
12864
|
return /* @__PURE__ */ n(
|
|
12865
12865
|
"div",
|
|
@@ -12947,7 +12947,7 @@ function _g() {
|
|
|
12947
12947
|
] })
|
|
12948
12948
|
] });
|
|
12949
12949
|
}
|
|
12950
|
-
function
|
|
12950
|
+
function Ai(t) {
|
|
12951
12951
|
if (!t) return;
|
|
12952
12952
|
const a = { ...t };
|
|
12953
12953
|
if (a.xMetricKey || delete a.xMetricKey, a.yMetricKey || delete a.yMetricKey, a.radiusMetricKey || delete a.radiusMetricKey, a.labelKey || delete a.labelKey, a.groupKey || delete a.groupKey, a.enableGrouping === void 0 && delete a.enableGrouping, a.radiusScale || delete a.radiusScale, a.fixedRadius === void 0 && delete a.fixedRadius, a.minRadius === void 0 && delete a.minRadius, a.maxRadius === void 0 && delete a.maxRadius, Object.keys(a).length !== 0)
|
|
@@ -12994,7 +12994,7 @@ function zg() {
|
|
|
12994
12994
|
const D = {};
|
|
12995
12995
|
let O = !1;
|
|
12996
12996
|
if (!d.xMetricKey && f[0] && (D.xMetricKey = f[0].value, O = !0), !d.yMetricKey && f[1] && (D.yMetricKey = f[1].value, O = !0), l && !d.radiusMetricKey && f[2] && (D.radiusMetricKey = f[2].value, O = !0), !d.labelKey && p[0] && (D.labelKey = p[0].value, O = !0), h && !d.groupKey && p[1] && (D.groupKey = p[1].value, D.enableGrouping = !0, O = !0), O) {
|
|
12997
|
-
const B =
|
|
12997
|
+
const B = Ai({
|
|
12998
12998
|
...d,
|
|
12999
12999
|
...D
|
|
13000
13000
|
});
|
|
@@ -13010,7 +13010,7 @@ function zg() {
|
|
|
13010
13010
|
h
|
|
13011
13011
|
]);
|
|
13012
13012
|
const k = (D) => {
|
|
13013
|
-
const O =
|
|
13013
|
+
const O = Ai({
|
|
13014
13014
|
...d,
|
|
13015
13015
|
...D
|
|
13016
13016
|
});
|
|
@@ -13023,7 +13023,7 @@ function zg() {
|
|
|
13023
13023
|
};
|
|
13024
13024
|
return !l && !o ? null : /* @__PURE__ */ n(it, { value: "bubble-scatter-config", children: [
|
|
13025
13025
|
/* @__PURE__ */ e(ot, { className: "flex w-full items-center gap-2 py-2 text-[12px] font-medium hover:no-underline", children: /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
|
|
13026
|
-
/* @__PURE__ */ e(l ?
|
|
13026
|
+
/* @__PURE__ */ e(l ? om : co, { className: "h-3.5 w-3.5 text-foreground/60" }),
|
|
13027
13027
|
/* @__PURE__ */ n("span", { children: [
|
|
13028
13028
|
l ? "Bubble" : "Scatter",
|
|
13029
13029
|
" Configuration"
|
|
@@ -13463,7 +13463,7 @@ function Pr() {
|
|
|
13463
13463
|
const t = P((l) => l.card), { data: a, comparisonMetadata: r } = wt(t), { keys: s } = ds((a == null ? void 0 : a.records) || [], r), c = s.slice(1).filter((l) => !Bh.includes(l));
|
|
13464
13464
|
let i = c;
|
|
13465
13465
|
if (["stackedBar", "stackedLine"].includes(t.type)) {
|
|
13466
|
-
const l =
|
|
13466
|
+
const l = cm({
|
|
13467
13467
|
dataArray: (a == null ? void 0 : a.records) || [],
|
|
13468
13468
|
groupKey: s[0],
|
|
13469
13469
|
pivotKey: s[1],
|
|
@@ -14113,7 +14113,7 @@ function lx({ metricKey: t, idx: a }) {
|
|
|
14113
14113
|
"border border-border bg-background text-muted-foreground"
|
|
14114
14114
|
),
|
|
14115
14115
|
children: [
|
|
14116
|
-
/* @__PURE__ */ e(
|
|
14116
|
+
/* @__PURE__ */ e(bo, { className: "h-3 w-3" }),
|
|
14117
14117
|
u.label.split(" ")[0]
|
|
14118
14118
|
]
|
|
14119
14119
|
}
|
|
@@ -14536,7 +14536,7 @@ function fx({ metricKey: t, idx: a }) {
|
|
|
14536
14536
|
"border border-border bg-background text-muted-foreground"
|
|
14537
14537
|
),
|
|
14538
14538
|
children: [
|
|
14539
|
-
/* @__PURE__ */ e(
|
|
14539
|
+
/* @__PURE__ */ e(Vo, { className: "h-3 w-3" }),
|
|
14540
14540
|
"r:",
|
|
14541
14541
|
m
|
|
14542
14542
|
]
|
|
@@ -14723,7 +14723,7 @@ function wx() {
|
|
|
14723
14723
|
};
|
|
14724
14724
|
return /* @__PURE__ */ n(it, { value: "bar-style", className: "border-b-0", children: [
|
|
14725
14725
|
/* @__PURE__ */ e(ot, { className: "flex w-full items-center gap-2 py-2 text-[12px] font-medium hover:no-underline", children: /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
|
|
14726
|
-
/* @__PURE__ */ e(
|
|
14726
|
+
/* @__PURE__ */ e(Vo, { className: "h-4 w-4 text-muted-foreground" }),
|
|
14727
14727
|
/* @__PURE__ */ e("span", { children: "Bar Style" })
|
|
14728
14728
|
] }) }),
|
|
14729
14729
|
/* @__PURE__ */ e(ct, { className: "pt-2", children: /* @__PURE__ */ n("div", { className: "space-y-3", children: [
|
|
@@ -14834,7 +14834,7 @@ function Dx() {
|
|
|
14834
14834
|
var k, R;
|
|
14835
14835
|
const t = P((N) => N.card), a = P(
|
|
14836
14836
|
(N) => N.actions.updateCardConfig
|
|
14837
|
-
), r = yt(), { scopedFields: s } =
|
|
14837
|
+
), r = yt(), { scopedFields: s } = yo(), c = ((k = t.config) == null ? void 0 : k.metricColumns) || [], i = ((R = t.config) == null ? void 0 : R.summary) || {}, l = i.breakdownDimensions || [], o = l.length > 0, d = Tx.includes(r), m = c.length > 0, u = i.enabled === !0, f = d && m, p = Array.from(
|
|
14838
14838
|
new Map(
|
|
14839
14839
|
s.filter(kx).map((N) => [En(N), Ix(N)])
|
|
14840
14840
|
).values()
|
|
@@ -14866,7 +14866,7 @@ function Dx() {
|
|
|
14866
14866
|
return /* @__PURE__ */ n(it, { value: "summary", className: "border-none", children: [
|
|
14867
14867
|
/* @__PURE__ */ n(ot, { className: "flex items-center gap-2 py-2 text-[12px] hover:no-underline [&>svg]:h-3 [&>svg]:w-3 [&>svg]:text-muted-foreground", children: [
|
|
14868
14868
|
/* @__PURE__ */ n("div", { className: "flex flex-1 items-center gap-2", children: [
|
|
14869
|
-
/* @__PURE__ */ e(
|
|
14869
|
+
/* @__PURE__ */ e(dm, { className: "h-3.5 w-3.5 text-foreground/60" }),
|
|
14870
14870
|
/* @__PURE__ */ e("span", { children: "Summary" })
|
|
14871
14871
|
] }),
|
|
14872
14872
|
/* @__PURE__ */ e(
|
|
@@ -15094,7 +15094,7 @@ function fc({ mode: t }) {
|
|
|
15094
15094
|
function Ox() {
|
|
15095
15095
|
const t = P((r) => r.card), a = t == null ? void 0 : t.type;
|
|
15096
15096
|
return a ? /* @__PURE__ */ n("div", { className: "space-y-4 px-6 py-4", children: [
|
|
15097
|
-
/* @__PURE__ */ e(
|
|
15097
|
+
/* @__PURE__ */ e(Ws, { chartType: a }),
|
|
15098
15098
|
/* @__PURE__ */ e(Tr, { type: "single", collapsible: !0, className: "w-full px-2", children: /* @__PURE__ */ e(fc, { mode: "dev" }) })
|
|
15099
15099
|
] }) : null;
|
|
15100
15100
|
}
|
|
@@ -15104,10 +15104,10 @@ function Mx({
|
|
|
15104
15104
|
}) {
|
|
15105
15105
|
const r = P((l) => l.card), s = r.type;
|
|
15106
15106
|
if (la(r) === "dynamic")
|
|
15107
|
-
return /* @__PURE__ */ e("div", { className: "p-6", children: /* @__PURE__ */ n(
|
|
15107
|
+
return /* @__PURE__ */ e("div", { className: "p-6", children: /* @__PURE__ */ n(po, { children: [
|
|
15108
15108
|
/* @__PURE__ */ e(sn, { className: "h-4 w-4" }),
|
|
15109
|
-
/* @__PURE__ */ e(
|
|
15110
|
-
/* @__PURE__ */ e(
|
|
15109
|
+
/* @__PURE__ */ e(um, { children: "Dynamic mode manages presentation" }),
|
|
15110
|
+
/* @__PURE__ */ e(fo, { children: "Built-in chart settings are hidden while this card is in dynamic mode. Query and data edits still apply, and the dynamic visual editor in the main panel controls the rendered output." })
|
|
15111
15111
|
] }) });
|
|
15112
15112
|
function i() {
|
|
15113
15113
|
if (qs(s))
|
|
@@ -15251,7 +15251,7 @@ function Rx(t) {
|
|
|
15251
15251
|
errorMessage: w,
|
|
15252
15252
|
refetch: M,
|
|
15253
15253
|
data: A
|
|
15254
|
-
} = wt(R), { setTriggerAIRun: C, setCurrentAssitantScope: L, setCardConfig: V } = Ne(), { selectedDatamodelName: b, connectionType: S, selectedDatamodelId: D } =
|
|
15254
|
+
} = wt(R), { setTriggerAIRun: C, setCurrentAssitantScope: L, setCardConfig: V } = Ne(), { selectedDatamodelName: b, connectionType: S, selectedDatamodelId: D } = mm(), O = (xe = _i().data) == null ? void 0 : xe.assistantProfileId, B = Ee(ar()), z = Ee(null), _ = Ee(o), q = Ee(!1), Q = () => {
|
|
15255
15255
|
const G = z.current;
|
|
15256
15256
|
G && (z.current = null, B.current = ar(), G === "clear" && U([]));
|
|
15257
15257
|
}, {
|
|
@@ -15264,8 +15264,8 @@ function Rx(t) {
|
|
|
15264
15264
|
addToolResult: Ae,
|
|
15265
15265
|
stop: Me,
|
|
15266
15266
|
clearError: Le
|
|
15267
|
-
} =
|
|
15268
|
-
transport: new
|
|
15267
|
+
} = zi({
|
|
15268
|
+
transport: new $i({
|
|
15269
15269
|
api: `${l.apiServiceUrl}/v1/assistant`,
|
|
15270
15270
|
headers: () => ({
|
|
15271
15271
|
Authorization: `Bearer ${i == null ? void 0 : i.accessToken}`
|
|
@@ -15277,7 +15277,7 @@ function Rx(t) {
|
|
|
15277
15277
|
assistantId: "editor-assistant",
|
|
15278
15278
|
assistantProfileId: O,
|
|
15279
15279
|
conversationId: B.current,
|
|
15280
|
-
assistantRequestId:
|
|
15280
|
+
assistantRequestId: hm(),
|
|
15281
15281
|
isDevMode: m,
|
|
15282
15282
|
aiContext: G.currentAIContext,
|
|
15283
15283
|
reasoningEffort: G.reasoningEffort,
|
|
@@ -15290,7 +15290,7 @@ function Rx(t) {
|
|
|
15290
15290
|
prepareSendMessagesRequest: ({ messages: G, body: pe }) => ({
|
|
15291
15291
|
body: {
|
|
15292
15292
|
...pe,
|
|
15293
|
-
messages:
|
|
15293
|
+
messages: Oo(G)
|
|
15294
15294
|
}
|
|
15295
15295
|
})
|
|
15296
15296
|
}),
|
|
@@ -15311,7 +15311,7 @@ function Rx(t) {
|
|
|
15311
15311
|
q.current = !0;
|
|
15312
15312
|
try {
|
|
15313
15313
|
const pe = ue(G);
|
|
15314
|
-
return
|
|
15314
|
+
return Wl(pe) ? pe.catch((Te) => {
|
|
15315
15315
|
throw q.current = !1, Te;
|
|
15316
15316
|
}) : pe;
|
|
15317
15317
|
} catch (pe) {
|
|
@@ -15323,7 +15323,7 @@ function Rx(t) {
|
|
|
15323
15323
|
q.current = !0;
|
|
15324
15324
|
try {
|
|
15325
15325
|
const G = Z();
|
|
15326
|
-
return
|
|
15326
|
+
return Wl(G) ? G.catch((pe) => {
|
|
15327
15327
|
throw q.current = !1, pe;
|
|
15328
15328
|
}) : G;
|
|
15329
15329
|
} catch (G) {
|
|
@@ -15431,11 +15431,11 @@ function Rx(t) {
|
|
|
15431
15431
|
r("Analyzing...");
|
|
15432
15432
|
}
|
|
15433
15433
|
function We(G) {
|
|
15434
|
-
const pe =
|
|
15434
|
+
const pe = fm(v, G);
|
|
15435
15435
|
Ze(pe);
|
|
15436
15436
|
}
|
|
15437
15437
|
function Ze(G) {
|
|
15438
|
-
const pe =
|
|
15438
|
+
const pe = xm(G);
|
|
15439
15439
|
L(pe), U((Te) => [
|
|
15440
15440
|
...Te,
|
|
15441
15441
|
{
|
|
@@ -15458,10 +15458,10 @@ function Rx(t) {
|
|
|
15458
15458
|
schemaName: I || "",
|
|
15459
15459
|
tableName: y || "",
|
|
15460
15460
|
datamodelId: D || "",
|
|
15461
|
-
datamodelName:
|
|
15461
|
+
datamodelName: si(b),
|
|
15462
15462
|
connectionId: E || "",
|
|
15463
15463
|
connectionType: S || ""
|
|
15464
|
-
}, pe =
|
|
15464
|
+
}, pe = Jl([...v, G]);
|
|
15465
15465
|
Ze(pe);
|
|
15466
15466
|
}
|
|
15467
15467
|
function ge() {
|
|
@@ -15469,16 +15469,16 @@ function Rx(t) {
|
|
|
15469
15469
|
databaseName: N || "",
|
|
15470
15470
|
schemaName: I || "",
|
|
15471
15471
|
tableName: y || "",
|
|
15472
|
-
datamodelName:
|
|
15472
|
+
datamodelName: si(b),
|
|
15473
15473
|
connectionId: E || "",
|
|
15474
15474
|
connectionType: S || "",
|
|
15475
15475
|
datamodelId: D || ""
|
|
15476
15476
|
};
|
|
15477
|
-
if (!
|
|
15477
|
+
if (!gm(
|
|
15478
15478
|
[...F || [], ...v],
|
|
15479
15479
|
G
|
|
15480
15480
|
) || v.length === 0) {
|
|
15481
|
-
const Te =
|
|
15481
|
+
const Te = Jl([
|
|
15482
15482
|
...F || [],
|
|
15483
15483
|
...v,
|
|
15484
15484
|
G
|
|
@@ -15488,7 +15488,7 @@ function Rx(t) {
|
|
|
15488
15488
|
Ze(Te);
|
|
15489
15489
|
}
|
|
15490
15490
|
}
|
|
15491
|
-
const Ge = !["ready", "error"].includes(ve), je =
|
|
15491
|
+
const Ge = !["ready", "error"].includes(ve), je = pm(Y);
|
|
15492
15492
|
return {
|
|
15493
15493
|
messages: J,
|
|
15494
15494
|
setMessages: ie,
|
|
@@ -15519,19 +15519,19 @@ const Px = [
|
|
|
15519
15519
|
subtitle: "sales by category"
|
|
15520
15520
|
}
|
|
15521
15521
|
];
|
|
15522
|
-
function
|
|
15522
|
+
function Oi({
|
|
15523
15523
|
isFullscreen: t,
|
|
15524
15524
|
onFullscreenChange: a,
|
|
15525
15525
|
fullscreenContainer: r
|
|
15526
15526
|
}) {
|
|
15527
|
-
const s = Ee(null), c = Ee(!1), [i, l] = K(!1), [o, d] = K(_h), [m, u] = K(!1), [f, p] = K(!1), [h, x] = K(!1), [T, v] = K(0), g = t ?? h, k = zh(), { setCurrentAIContext: R, setHasEditorEntitySelectionOverride: N } = _s(), { clearQueue: y } = $h(), { clearFileAttachments: E } = qh(), I = jh("editor"), { selectedEntities: F } =
|
|
15527
|
+
const s = Ee(null), c = Ee(!1), [i, l] = K(!1), [o, d] = K(_h), [m, u] = K(!1), [f, p] = K(!1), [h, x] = K(!1), [T, v] = K(0), g = t ?? h, k = zh(), { setCurrentAIContext: R, setHasEditorEntitySelectionOverride: N } = _s(), { clearQueue: y } = $h(), { clearFileAttachments: E } = qh(), I = jh("editor"), { selectedEntities: F } = Ri("editor"), w = P((de) => de.card.id), M = P((de) => de.card.dataSource), A = P(
|
|
15528
15528
|
(de) => {
|
|
15529
15529
|
var be;
|
|
15530
15530
|
return (be = de.card.dataSource) == null ? void 0 : be.selectedEntities;
|
|
15531
15531
|
}
|
|
15532
15532
|
), C = P((de) => de.actions.setCardSql), L = P((de) => de.actions.setRunSql), V = P((de) => de.showAIDialog), b = ye(
|
|
15533
15533
|
(de) => de.handleOpenAssistantProfile
|
|
15534
|
-
), { setShowAIDialog: S, setCardPython: D } = Ne(), { assistantProfile: O } =
|
|
15534
|
+
), { setShowAIDialog: S, setCardPython: D } = Ne(), { assistantProfile: O } = bm(), {
|
|
15535
15535
|
messages: B,
|
|
15536
15536
|
setMessages: z,
|
|
15537
15537
|
sendMessage: _,
|
|
@@ -15573,13 +15573,13 @@ function Mi({
|
|
|
15573
15573
|
R,
|
|
15574
15574
|
N,
|
|
15575
15575
|
V
|
|
15576
|
-
]),
|
|
15576
|
+
]), ym({
|
|
15577
15577
|
assistantType: "editor",
|
|
15578
15578
|
status: J,
|
|
15579
15579
|
isLoading: q,
|
|
15580
15580
|
sendMessage: _
|
|
15581
15581
|
});
|
|
15582
|
-
const { hasActiveTools: nt, activeToolText: at } =
|
|
15582
|
+
const { hasActiveTools: nt, activeToolText: at } = vm(B), ie = Ie(
|
|
15583
15583
|
(de) => {
|
|
15584
15584
|
a == null || a(de), t === void 0 && x(de);
|
|
15585
15585
|
},
|
|
@@ -15737,7 +15737,7 @@ function Mi({
|
|
|
15737
15737
|
onClick: () => {
|
|
15738
15738
|
z([]), y("editor"), Y();
|
|
15739
15739
|
},
|
|
15740
|
-
children: /* @__PURE__ */ e(
|
|
15740
|
+
children: /* @__PURE__ */ e(vo, { className: "size-4" })
|
|
15741
15741
|
}
|
|
15742
15742
|
),
|
|
15743
15743
|
/* @__PURE__ */ e(
|
|
@@ -15757,7 +15757,7 @@ function Mi({
|
|
|
15757
15757
|
}
|
|
15758
15758
|
),
|
|
15759
15759
|
/* @__PURE__ */ e(
|
|
15760
|
-
|
|
15760
|
+
Nm,
|
|
15761
15761
|
{
|
|
15762
15762
|
messages: B,
|
|
15763
15763
|
showTools: o,
|
|
@@ -15776,23 +15776,23 @@ function Mi({
|
|
|
15776
15776
|
/* @__PURE__ */ n("div", { className: "space-y-3", children: [
|
|
15777
15777
|
/* @__PURE__ */ n("div", { children: [
|
|
15778
15778
|
pe && !O && /* @__PURE__ */ e(
|
|
15779
|
-
|
|
15779
|
+
Cm,
|
|
15780
15780
|
{
|
|
15781
15781
|
onClick: Ge,
|
|
15782
15782
|
placeholders: Px
|
|
15783
15783
|
}
|
|
15784
15784
|
),
|
|
15785
15785
|
/* @__PURE__ */ e("div", { children: pe && O && /* @__PURE__ */ e(
|
|
15786
|
-
|
|
15786
|
+
wm,
|
|
15787
15787
|
{
|
|
15788
15788
|
seedQuestions: O.seedQuestions || [],
|
|
15789
15789
|
handleSeedQuestionClick: je
|
|
15790
15790
|
}
|
|
15791
15791
|
) })
|
|
15792
15792
|
] }),
|
|
15793
|
-
/* @__PURE__ */ e(
|
|
15793
|
+
/* @__PURE__ */ e(Sm, { assistantType: "editor", className: "mb-3" }),
|
|
15794
15794
|
/* @__PURE__ */ e(
|
|
15795
|
-
|
|
15795
|
+
Tm,
|
|
15796
15796
|
{
|
|
15797
15797
|
ref: s,
|
|
15798
15798
|
setInput: ve,
|
|
@@ -15821,12 +15821,12 @@ function Mi({
|
|
|
15821
15821
|
" total tokens"
|
|
15822
15822
|
] }) }),
|
|
15823
15823
|
/* @__PURE__ */ e(
|
|
15824
|
-
|
|
15824
|
+
Bi,
|
|
15825
15825
|
{
|
|
15826
15826
|
incomingSelectedEntities: F,
|
|
15827
15827
|
open: f,
|
|
15828
15828
|
onOpenChange: p,
|
|
15829
|
-
dataSource: M ||
|
|
15829
|
+
dataSource: M || km,
|
|
15830
15830
|
dialogMode: "aiContext",
|
|
15831
15831
|
onSaveSelectedEntities: (de) => {
|
|
15832
15832
|
N(!0), R({
|
|
@@ -15840,7 +15840,7 @@ function Mi({
|
|
|
15840
15840
|
}
|
|
15841
15841
|
);
|
|
15842
15842
|
return g && r ? op(
|
|
15843
|
-
/* @__PURE__ */ e(
|
|
15843
|
+
/* @__PURE__ */ e(Im, { className: "pointer-events-auto absolute inset-0 z-50 flex bg-background px-6 pb-6 pt-[calc(var(--app-header-height,15px)+1rem)]", children: /* @__PURE__ */ e("div", { className: "flex h-full w-full", children: Te }) }),
|
|
15844
15844
|
r
|
|
15845
15845
|
) : Te;
|
|
15846
15846
|
}
|
|
@@ -15849,7 +15849,7 @@ function gc(t, a, r) {
|
|
|
15849
15849
|
const s = a.qualifiedFieldName, c = a.qualifiedEntityName, i = c && a.name ? `${c}.${a.name}` : s;
|
|
15850
15850
|
return t.some((l) => {
|
|
15851
15851
|
if (!(ht(l.dataType || "") === "date")) return !1;
|
|
15852
|
-
const d =
|
|
15852
|
+
const d = Dm(l, r), m = d.split("."), u = m[m.length - 1] || d, f = m.length > 1 ? m.slice(0, -1).join(".") : void 0, p = l.qualifiedTableName || f, h = p ? `${p}.${u}` : void 0;
|
|
15853
15853
|
return s ? h ? h === i || h.endsWith(`.${s}`) : u === a.name : h ? h === i : u === a.name;
|
|
15854
15854
|
});
|
|
15855
15855
|
}
|
|
@@ -15875,7 +15875,7 @@ function Lx({
|
|
|
15875
15875
|
filters: [],
|
|
15876
15876
|
controls: []
|
|
15877
15877
|
};
|
|
15878
|
-
return
|
|
15878
|
+
return Ui({
|
|
15879
15879
|
dashboard: o,
|
|
15880
15880
|
sheetId: s,
|
|
15881
15881
|
card: c,
|
|
@@ -16176,7 +16176,7 @@ function _x({ idx: t }) {
|
|
|
16176
16176
|
] }) })
|
|
16177
16177
|
] });
|
|
16178
16178
|
}
|
|
16179
|
-
function
|
|
16179
|
+
function Js({
|
|
16180
16180
|
children: t,
|
|
16181
16181
|
className: a,
|
|
16182
16182
|
delayDuration: r
|
|
@@ -16247,7 +16247,7 @@ function $x({
|
|
|
16247
16247
|
r
|
|
16248
16248
|
),
|
|
16249
16249
|
children: [
|
|
16250
|
-
c || /* @__PURE__ */ e(
|
|
16250
|
+
c || /* @__PURE__ */ e(Js, { className: "max-w-[100px]", title: t, children: zx(t) }),
|
|
16251
16251
|
/* @__PURE__ */ n("div", { className: "flex gap-2", children: [
|
|
16252
16252
|
/* @__PURE__ */ e(
|
|
16253
16253
|
wr,
|
|
@@ -16270,7 +16270,7 @@ function $x({
|
|
|
16270
16270
|
}
|
|
16271
16271
|
),
|
|
16272
16272
|
/* @__PURE__ */ e(
|
|
16273
|
-
|
|
16273
|
+
bo,
|
|
16274
16274
|
{
|
|
16275
16275
|
onClick: () => m("area"),
|
|
16276
16276
|
className: W(
|
|
@@ -16321,7 +16321,7 @@ function qx() {
|
|
|
16321
16321
|
children: [
|
|
16322
16322
|
/* @__PURE__ */ e(ae, { className: "h-8 w-full focus:ring-1 focus:ring-offset-0", children: /* @__PURE__ */ e(re, { placeholder: "Select position" }) }),
|
|
16323
16323
|
/* @__PURE__ */ e(se, { children: /* @__PURE__ */ n(bs, { children: [
|
|
16324
|
-
/* @__PURE__ */ e(
|
|
16324
|
+
/* @__PURE__ */ e(Ro, { children: "Data Labels" }),
|
|
16325
16325
|
/* @__PURE__ */ e(j, { value: "none", children: "None" }),
|
|
16326
16326
|
!["pyramid", "funnel"].includes(t) && /* @__PURE__ */ e(j, { value: "start", children: "Start" }),
|
|
16327
16327
|
/* @__PURE__ */ e(j, { value: "center", children: "Center" }),
|
|
@@ -16396,7 +16396,7 @@ function Kx({
|
|
|
16396
16396
|
a,
|
|
16397
16397
|
r,
|
|
16398
16398
|
i
|
|
16399
|
-
], m =
|
|
16399
|
+
], m = No({
|
|
16400
16400
|
queryKey: d,
|
|
16401
16401
|
queryFn: async () => {
|
|
16402
16402
|
if (!(o != null && o.connectionId))
|
|
@@ -16606,7 +16606,7 @@ function xc({
|
|
|
16606
16606
|
onClick: () => x(y),
|
|
16607
16607
|
className: "group flex items-center gap-2 rounded-[5px] border border-border px-2 py-1.5 text-left transition-colors hover:bg-muted focus-visible:border-ring focus-visible:outline-none",
|
|
16608
16608
|
children: [
|
|
16609
|
-
/* @__PURE__ */ e(
|
|
16609
|
+
/* @__PURE__ */ e(Em, { dataType: ht(y.dataType) }),
|
|
16610
16610
|
/* @__PURE__ */ n("div", { className: "min-w-0 flex-1", children: [
|
|
16611
16611
|
/* @__PURE__ */ e("div", { className: "truncate text-[13px] text-foreground", children: y.label }),
|
|
16612
16612
|
/* @__PURE__ */ n("div", { className: "truncate font-mono text-[10px] text-muted-foreground", children: [
|
|
@@ -16721,7 +16721,7 @@ function Ux({
|
|
|
16721
16721
|
onCheckedChange: () => u(p.value)
|
|
16722
16722
|
}
|
|
16723
16723
|
),
|
|
16724
|
-
/* @__PURE__ */ e(
|
|
16724
|
+
/* @__PURE__ */ e(Js, { className: "text-sm", children: p.label })
|
|
16725
16725
|
]
|
|
16726
16726
|
},
|
|
16727
16727
|
p.id
|
|
@@ -16736,7 +16736,7 @@ function Gx({
|
|
|
16736
16736
|
showTitle: s = !0,
|
|
16737
16737
|
title: c = "NUMBER FORMAT"
|
|
16738
16738
|
}) {
|
|
16739
|
-
const i =
|
|
16739
|
+
const i = Am(r), l = go(), o = Lo(
|
|
16740
16740
|
Hh(t, { preserveOmittedProperties: !0 }),
|
|
16741
16741
|
{ preserveOmittedProperties: !0 }
|
|
16742
16742
|
) || {};
|
|
@@ -16770,7 +16770,7 @@ function Qx({
|
|
|
16770
16770
|
hasPivotColumns: i = !1,
|
|
16771
16771
|
cardType: l
|
|
16772
16772
|
}) {
|
|
16773
|
-
var il, ol, cl, dl, ul, ml, hl, pl, fl, gl, xl, bl, yl, vl, Nl, Cl, wl, Sl, Tl, kl, Il, Dl, El, Al, Ol, Ml, Fl, Rl, Pl, Ll, Vl, Bl, _l
|
|
16773
|
+
var ll, il, ol, cl, dl, ul, ml, hl, pl, fl, gl, xl, bl, yl, vl, Nl, Cl, wl, Sl, Tl, kl, Il, Dl, El, Al, Ol, Ml, Fl, Rl, Pl, Ll, Vl, Bl, _l;
|
|
16774
16774
|
const {
|
|
16775
16775
|
attributes: o,
|
|
16776
16776
|
listeners: d,
|
|
@@ -16816,7 +16816,7 @@ function Qx({
|
|
|
16816
16816
|
handleKpiTrendlineWindowChange: nt,
|
|
16817
16817
|
handleKpiTrendlineGranularityChange: at,
|
|
16818
16818
|
handleMetricTargetValueChange: ie
|
|
16819
|
-
} =
|
|
16819
|
+
} = Co(h), [we, We] = K(!1), [Ze, st] = K(() => {
|
|
16820
16820
|
var H;
|
|
16821
16821
|
return !!((H = t.parameters) != null && H.windowTransform);
|
|
16822
16822
|
}), [ge, Ge] = K(!1), [je, xe] = K(!1), [G, pe] = K(null), Te = ce(() => {
|
|
@@ -16837,7 +16837,7 @@ function Qx({
|
|
|
16837
16837
|
t.qualifiedEntityName,
|
|
16838
16838
|
t.qualifiedFieldName,
|
|
16839
16839
|
y
|
|
16840
|
-
]), de =
|
|
16840
|
+
]), de = Om(
|
|
16841
16841
|
Te.dataType
|
|
16842
16842
|
), [be, He] = K(
|
|
16843
16843
|
t.dateFormat || "YYYY-MM-DD"
|
|
@@ -16845,7 +16845,7 @@ function Qx({
|
|
|
16845
16845
|
t.aliasTemplate || ""
|
|
16846
16846
|
), [vt, fe] = K(
|
|
16847
16847
|
t.valueAliases || {}
|
|
16848
|
-
), [ke, $e] = K((
|
|
16848
|
+
), [ke, $e] = K((ll = t.parameters) == null ? void 0 : ll.filters), Oe = (H) => {
|
|
16849
16849
|
H === "custom" ? ze(!0) : (ze(!1), He(H), (a === "groupBy" || jn) && V(r, H, "", a));
|
|
16850
16850
|
}, Nt = (H) => {
|
|
16851
16851
|
St(H), (a === "groupBy" || jn) && V(r, "custom", H, a);
|
|
@@ -16859,11 +16859,11 @@ function Qx({
|
|
|
16859
16859
|
fe(H), a === "metrics" && D(r, H);
|
|
16860
16860
|
}, Vr = (H) => {
|
|
16861
16861
|
C(a, r, H);
|
|
16862
|
-
}, Ut =
|
|
16862
|
+
}, Ut = Mm(t), Ja = wo(t), oa = Fm(t), ln = t.role === "metric" && oa, ca = oa && (Ut === "user_calculated" || Ut === "inline_expression" && t.fieldScope !== "domain"), kt = ca ? Wh({
|
|
16863
16863
|
field: t,
|
|
16864
16864
|
sheetFields: (x == null ? void 0 : x.calculatedFields) || [],
|
|
16865
16865
|
dashboardFields: N
|
|
16866
|
-
}) : void 0, Ya = ca && (kt == null ? void 0 : kt.scope) === "sheet", Xa = ca && (kt == null ? void 0 : kt.scope) === "dashboard", Tn = Ut === "domain_calculated" || t.fieldScope === "domain", da = Tn ?
|
|
16866
|
+
}) : void 0, Ya = ca && (kt == null ? void 0 : kt.scope) === "sheet", Xa = ca && (kt == null ? void 0 : kt.scope) === "dashboard", Tn = Ut === "domain_calculated" || t.fieldScope === "domain", da = Tn ? Rm(t, y) : void 0, Zt = Tn ? "domain" : Ya ? "sheet" : Xa ? "dashboard" : "card", on = Tn ? da || t : (Ya || Xa) && (kt != null && kt.matchedField) ? kt.matchedField : t, qn = (H) => {
|
|
16867
16867
|
var De;
|
|
16868
16868
|
if ($e(H), a === "metrics") {
|
|
16869
16869
|
const te = {
|
|
@@ -16880,12 +16880,12 @@ function Qx({
|
|
|
16880
16880
|
Ge(!1);
|
|
16881
16881
|
}, kn = () => {
|
|
16882
16882
|
B(a, r);
|
|
16883
|
-
},
|
|
16883
|
+
}, Zs = {
|
|
16884
16884
|
transform: Dr.Transform.toString(u),
|
|
16885
16885
|
transition: f
|
|
16886
16886
|
}, ua = ht(
|
|
16887
16887
|
Te.dataType || t.dataType
|
|
16888
|
-
), ma = ua === "date", ha = l === "kpi", jn = a === "detailColumns", Za = (
|
|
16888
|
+
), ma = ua === "date", ha = l === "kpi", jn = a === "detailColumns", Za = (il = h.config) == null ? void 0 : il.metricColumns, cn = (ol = h.config) == null ? void 0 : ol.groupByColumns, er = ye((H) => H.dashboard), pa = ye(
|
|
16889
16889
|
(H) => {
|
|
16890
16890
|
var De;
|
|
16891
16891
|
return (De = H.dashboard) == null ? void 0 : De.filters;
|
|
@@ -16898,7 +16898,7 @@ function Qx({
|
|
|
16898
16898
|
(H) => H.semanticExecutionPayload
|
|
16899
16899
|
), dn = t.granularity || "day", X = de.includes(
|
|
16900
16900
|
dn
|
|
16901
|
-
) ? dn : "day", oe = a === "groupBy" && !de.includes(dn), le = Kr(X), Fe = me ? "custom" : le.some((H) => H.value === be) ? be : ((
|
|
16901
|
+
) ? dn : "day", oe = a === "groupBy" && !de.includes(dn), le = Kr(X), Fe = me ? "custom" : le.some((H) => H.value === be) ? be : ((cl = le[0]) == null ? void 0 : cl.value) ?? "YYYY-MM-DD";
|
|
16902
16902
|
Ce(() => {
|
|
16903
16903
|
var te;
|
|
16904
16904
|
if (I || !oe) {
|
|
@@ -16956,7 +16956,7 @@ function Qx({
|
|
|
16956
16956
|
return pt ? Je.id && pt.id === Je.id || Je.qualifiedFieldName && pt.qualifiedFieldName === Je.qualifiedFieldName ? !0 : pt.name === Je.name : !1;
|
|
16957
16957
|
}, te = (_e) => _e.conditions.some((rt) => ht(rt.field.dataType || "") === "date" && De(rt)) ? !0 : _e.groups.some((rt) => te(rt));
|
|
16958
16958
|
return te(H);
|
|
16959
|
-
}, [(
|
|
16959
|
+
}, [(dl = h.config) == null ? void 0 : dl.filters, Je]), Un = ce(
|
|
16960
16960
|
() => gc(
|
|
16961
16961
|
pa || [],
|
|
16962
16962
|
Je,
|
|
@@ -16979,30 +16979,30 @@ function Qx({
|
|
|
16979
16979
|
v,
|
|
16980
16980
|
A
|
|
16981
16981
|
]
|
|
16982
|
-
), xt = Kn || Un, qe = t, Ct = ((
|
|
16982
|
+
), xt = Kn || Un, qe = t, Ct = ((ul = qe.comparison) == null ? void 0 : ul.mode) === "explicit" ? qe.comparison.spec : void 0, ga = ((hl = (ml = qe.parameters) == null ? void 0 : ml.windowTransform) == null ? void 0 : hl.function) || "none", _t = Pm(qe), zt = _t ? ga : null, Br = Lm({
|
|
16983
16983
|
cardType: l || "table",
|
|
16984
16984
|
cardConfig: h.config || {},
|
|
16985
16985
|
metric: qe,
|
|
16986
16986
|
transformMode: zt || "running_total"
|
|
16987
|
-
}), xa = ((
|
|
16987
|
+
}), xa = ((pl = qe.comparison) == null ? void 0 : pl.mode) === "explicit", el = $m(
|
|
16988
16988
|
cn || []
|
|
16989
|
-
), Gn = ((
|
|
16989
|
+
), Gn = ((xl = (gl = (fl = qe.parameters) == null ? void 0 : fl.windowTransform) == null ? void 0 : gl.orderBy) == null ? void 0 : xl.fieldId) || "", yc = ((vl = (yl = (bl = qe.parameters) == null ? void 0 : bl.windowTransform) == null ? void 0 : yl.orderBy) == null ? void 0 : vl.direction) || "asc", tl = el.find(
|
|
16990
16990
|
(H) => H.id === Gn
|
|
16991
|
-
), _r = zt === "running_total" || zt === "moving_average" || zt === "previous_period_delta", vc = _t && _r && !!
|
|
16991
|
+
), _r = zt === "running_total" || zt === "moving_average" || zt === "previous_period_delta", vc = _t && _r && !!tl && ht(tl.dataType || "") !== "date", Nc = Vm({
|
|
16992
16992
|
cardType: l || "table",
|
|
16993
16993
|
cardConfig: h.config || {},
|
|
16994
16994
|
orderByFieldId: Gn || void 0
|
|
16995
16995
|
}), Cc = new Set(
|
|
16996
|
-
((
|
|
16997
|
-
), wc = l === "pivotTable" ||
|
|
16996
|
+
((Cl = (Nl = qe.parameters) == null ? void 0 : Nl.windowTransform) == null ? void 0 : Cl.partitionByFieldIds) || Nc
|
|
16997
|
+
), wc = l === "pivotTable" || Bm(
|
|
16998
16998
|
l || "table",
|
|
16999
16999
|
h.config || {}
|
|
17000
|
-
),
|
|
17000
|
+
), nl = [
|
|
17001
17001
|
...(cn || []).filter(
|
|
17002
17002
|
(H) => H.id && (!_r || H.id !== Gn)
|
|
17003
17003
|
),
|
|
17004
|
-
...wc ? (((
|
|
17005
|
-
],
|
|
17004
|
+
...wc ? (((wl = h.config) == null ? void 0 : wl.pivotByColumns) || []).filter((H) => H.id) : []
|
|
17005
|
+
], al = ((kl = (Tl = (Sl = qe.parameters) == null ? void 0 : Sl.windowTransform) == null ? void 0 : Tl.movingAverage) == null ? void 0 : kl.windowSize) || 7, Sc = ((El = (Dl = (Il = qe.parameters) == null ? void 0 : Il.windowTransform) == null ? void 0 : Dl.movingAverage) == null ? void 0 : El.minPeriods) || 1, Tc = ((Ml = (Ol = (Al = qe.parameters) == null ? void 0 : Al.windowTransform) == null ? void 0 : Ol.previousPeriodDelta) == null ? void 0 : Ml.mode) || "absolute", rl = ((Pl = (Rl = (Fl = qe.parameters) == null ? void 0 : Fl.windowTransform) == null ? void 0 : Rl.percentOfTotal) == null ? void 0 : Pl.scope) || "grand_total", kc = ((Bl = (Vl = (Ll = qe.parameters) == null ? void 0 : Ll.windowTransform) == null ? void 0 : Vl.percentOfTotal) == null ? void 0 : Bl.output) || "percent", Ic = ce(
|
|
17006
17006
|
() => (Za || []).some(
|
|
17007
17007
|
() => !1
|
|
17008
17008
|
),
|
|
@@ -17028,14 +17028,14 @@ function Qx({
|
|
|
17028
17028
|
De && H.calculatedFormula && /* @__PURE__ */ n(
|
|
17029
17029
|
"div",
|
|
17030
17030
|
{
|
|
17031
|
-
title:
|
|
17031
|
+
title: Xl(H.calculatedFormula),
|
|
17032
17032
|
onPointerDown: (te) => {
|
|
17033
17033
|
te.stopPropagation();
|
|
17034
17034
|
},
|
|
17035
17035
|
className: "max-w-[270px] cursor-default overflow-hidden text-ellipsis whitespace-nowrap rounded bg-muted/50 px-1.5 py-0.5 font-mono text-xs text-primary",
|
|
17036
17036
|
children: [
|
|
17037
17037
|
"= ",
|
|
17038
|
-
|
|
17038
|
+
Xl(H.calculatedFormula)
|
|
17039
17039
|
]
|
|
17040
17040
|
}
|
|
17041
17041
|
)
|
|
@@ -17067,7 +17067,7 @@ function Qx({
|
|
|
17067
17067
|
]
|
|
17068
17068
|
}
|
|
17069
17069
|
)
|
|
17070
|
-
] }),
|
|
17070
|
+
] }), sl = () => Ec ? /* @__PURE__ */ n("div", { className: "space-y-1", children: [
|
|
17071
17071
|
/* @__PURE__ */ e($, { className: "text-xs font-medium text-muted-foreground", children: "Granularity" }),
|
|
17072
17072
|
/* @__PURE__ */ n(
|
|
17073
17073
|
ne,
|
|
@@ -17076,12 +17076,12 @@ function Qx({
|
|
|
17076
17076
|
onValueChange: Qe,
|
|
17077
17077
|
children: [
|
|
17078
17078
|
/* @__PURE__ */ e(ae, { className: "h-8 w-full text-xs", children: /* @__PURE__ */ e(re, { placeholder: "Select granularity..." }) }),
|
|
17079
|
-
/* @__PURE__ */ e(se, { children: de.map((H) => /* @__PURE__ */ e(j, { className: "text-xs", value: H, children:
|
|
17079
|
+
/* @__PURE__ */ e(se, { children: de.map((H) => /* @__PURE__ */ e(j, { className: "text-xs", value: H, children: li(H) }, H)) })
|
|
17080
17080
|
]
|
|
17081
17081
|
}
|
|
17082
17082
|
)
|
|
17083
17083
|
] }) : null, Lc = () => Ac ? /* @__PURE__ */ n(Se, { children: [
|
|
17084
|
-
|
|
17084
|
+
sl(),
|
|
17085
17085
|
/* @__PURE__ */ n("div", { className: "space-y-1", children: [
|
|
17086
17086
|
/* @__PURE__ */ e($, { className: "text-xs font-medium text-muted-foreground", children: "Date Format" }),
|
|
17087
17087
|
/* @__PURE__ */ n(
|
|
@@ -17247,7 +17247,7 @@ function Qx({
|
|
|
17247
17247
|
children: [
|
|
17248
17248
|
/* @__PURE__ */ e("div", { className: "text-xs font-medium text-foreground", children: "Metric Transform" }),
|
|
17249
17249
|
/* @__PURE__ */ n("div", { className: "flex items-center text-[11px] text-muted-foreground", children: [
|
|
17250
|
-
!Ze && /* @__PURE__ */ e("span", { className: "mr-2", children: _t ?
|
|
17250
|
+
!Ze && /* @__PURE__ */ e("span", { className: "mr-2", children: _t ? li(ga.replace(/_/g, " ")) : "None" }),
|
|
17251
17251
|
/* @__PURE__ */ e(
|
|
17252
17252
|
Ft,
|
|
17253
17253
|
{
|
|
@@ -17327,7 +17327,7 @@ function Qx({
|
|
|
17327
17327
|
onValueChange: (te) => J(r, te),
|
|
17328
17328
|
children: [
|
|
17329
17329
|
/* @__PURE__ */ e(ae, { className: "h-8 w-full text-xs", children: /* @__PURE__ */ e(re, { placeholder: "Select order field..." }) }),
|
|
17330
|
-
/* @__PURE__ */ e(se, { children:
|
|
17330
|
+
/* @__PURE__ */ e(se, { children: el.filter((te) => !!te.id).map((te) => /* @__PURE__ */ e(
|
|
17331
17331
|
j,
|
|
17332
17332
|
{
|
|
17333
17333
|
value: te.id,
|
|
@@ -17372,7 +17372,7 @@ function Qx({
|
|
|
17372
17372
|
type: "number",
|
|
17373
17373
|
min: 1,
|
|
17374
17374
|
className: "h-8 text-xs",
|
|
17375
|
-
value:
|
|
17375
|
+
value: al,
|
|
17376
17376
|
onChange: (te) => Y(
|
|
17377
17377
|
r,
|
|
17378
17378
|
Number(te.target.value)
|
|
@@ -17385,7 +17385,7 @@ function Qx({
|
|
|
17385
17385
|
{
|
|
17386
17386
|
type: "number",
|
|
17387
17387
|
min: 1,
|
|
17388
|
-
max:
|
|
17388
|
+
max: al,
|
|
17389
17389
|
className: "h-8 text-xs",
|
|
17390
17390
|
value: Sc,
|
|
17391
17391
|
onChange: (te) => ue(
|
|
@@ -17421,7 +17421,7 @@ function Qx({
|
|
|
17421
17421
|
/* @__PURE__ */ n(
|
|
17422
17422
|
ne,
|
|
17423
17423
|
{
|
|
17424
|
-
value:
|
|
17424
|
+
value: rl,
|
|
17425
17425
|
onValueChange: (te) => Ae(
|
|
17426
17426
|
r,
|
|
17427
17427
|
te
|
|
@@ -17457,9 +17457,9 @@ function Qx({
|
|
|
17457
17457
|
)
|
|
17458
17458
|
] })
|
|
17459
17459
|
] }),
|
|
17460
|
-
(zt === "running_total" || zt === "moving_average" || zt === "previous_period_delta" || zt === "percent_of_total" &&
|
|
17460
|
+
(zt === "running_total" || zt === "moving_average" || zt === "previous_period_delta" || zt === "percent_of_total" && rl === "partition_total") && nl.length > 0 && /* @__PURE__ */ n("div", { className: "space-y-1", children: [
|
|
17461
17461
|
/* @__PURE__ */ e($, { className: "text-xs font-medium text-muted-foreground", children: "Reset By" }),
|
|
17462
|
-
/* @__PURE__ */ e("div", { className: "space-y-1", children:
|
|
17462
|
+
/* @__PURE__ */ e("div", { className: "space-y-1", children: nl.map(
|
|
17463
17463
|
(te) => {
|
|
17464
17464
|
const he = !!te.id && Cc.has(te.id);
|
|
17465
17465
|
return /* @__PURE__ */ n(
|
|
@@ -17763,7 +17763,7 @@ function Qx({
|
|
|
17763
17763
|
"div",
|
|
17764
17764
|
{
|
|
17765
17765
|
ref: m,
|
|
17766
|
-
style:
|
|
17766
|
+
style: Zs,
|
|
17767
17767
|
className: W(
|
|
17768
17768
|
"group flex h-7 w-full items-center gap-1.5 rounded-control border bg-background px-1.5 transition-colors",
|
|
17769
17769
|
we ? "border-foreground/30 bg-muted/40" : "border-border hover:bg-muted/40",
|
|
@@ -17777,7 +17777,7 @@ function Qx({
|
|
|
17777
17777
|
...o,
|
|
17778
17778
|
...d,
|
|
17779
17779
|
className: "inline-flex shrink-0 cursor-grab items-center text-muted-foreground transition-colors hover:text-foreground active:cursor-grabbing",
|
|
17780
|
-
"aria-label": `Drag ${
|
|
17780
|
+
"aria-label": `Drag ${Yl(t)}`,
|
|
17781
17781
|
onClick: (H) => {
|
|
17782
17782
|
H.stopPropagation();
|
|
17783
17783
|
},
|
|
@@ -17785,14 +17785,14 @@ function Qx({
|
|
|
17785
17785
|
}
|
|
17786
17786
|
),
|
|
17787
17787
|
/* @__PURE__ */ e(
|
|
17788
|
-
|
|
17788
|
+
So,
|
|
17789
17789
|
{
|
|
17790
17790
|
dataType: ua,
|
|
17791
17791
|
calculated: !!Ja
|
|
17792
17792
|
}
|
|
17793
17793
|
),
|
|
17794
|
-
/* @__PURE__ */ e(
|
|
17795
|
-
a === "metrics" && ((
|
|
17794
|
+
/* @__PURE__ */ e(Js, { className: "block w-0 min-w-0 flex-1 text-[12px] text-foreground", children: Yl(t) }),
|
|
17795
|
+
a === "metrics" && ((_l = ke == null ? void 0 : ke.conditions) == null ? void 0 : _l.length) && !we && /* @__PURE__ */ e(Bt, { children: /* @__PURE__ */ n(Ot, { children: [
|
|
17796
17796
|
/* @__PURE__ */ e(Mt, { asChild: !0, children: /* @__PURE__ */ n("div", { className: "flex shrink-0 items-center gap-1 rounded-[3px] bg-primary/10 px-1 text-[10px] tabular-nums text-primary/90", children: [
|
|
17797
17797
|
/* @__PURE__ */ e(gn, { className: "h-2.5 w-2.5" }),
|
|
17798
17798
|
/* @__PURE__ */ e("span", { children: ke.conditions.length })
|
|
@@ -17813,7 +17813,7 @@ function Qx({
|
|
|
17813
17813
|
onClick: (H) => {
|
|
17814
17814
|
H.stopPropagation(), c(s === "asc" ? "desc" : "asc");
|
|
17815
17815
|
},
|
|
17816
|
-
children: s === "asc" ? /* @__PURE__ */ e(
|
|
17816
|
+
children: s === "asc" ? /* @__PURE__ */ e(_m, { className: "h-3 w-3" }) : /* @__PURE__ */ e(ji, { className: "h-3 w-3" })
|
|
17817
17817
|
}
|
|
17818
17818
|
),
|
|
17819
17819
|
_c && /* @__PURE__ */ e(Lt, { asChild: !0, children: /* @__PURE__ */ e(
|
|
@@ -17823,7 +17823,7 @@ function Qx({
|
|
|
17823
17823
|
"aria-label": "Field configuration",
|
|
17824
17824
|
className: "inline-flex h-5 w-5 shrink-0 items-center justify-center rounded-[3px] text-muted-foreground transition-colors hover:bg-muted hover:text-foreground data-[state=open]:bg-muted data-[state=open]:text-foreground",
|
|
17825
17825
|
onClick: (H) => H.stopPropagation(),
|
|
17826
|
-
children: /* @__PURE__ */ e(
|
|
17826
|
+
children: /* @__PURE__ */ e(zm, { className: "h-3 w-3" })
|
|
17827
17827
|
}
|
|
17828
17828
|
) }),
|
|
17829
17829
|
/* @__PURE__ */ e(
|
|
@@ -17845,7 +17845,7 @@ function Qx({
|
|
|
17845
17845
|
Fc(),
|
|
17846
17846
|
Pc(),
|
|
17847
17847
|
Rc(),
|
|
17848
|
-
l === "kpi" &&
|
|
17848
|
+
l === "kpi" && sl(),
|
|
17849
17849
|
Lc(),
|
|
17850
17850
|
Vc(),
|
|
17851
17851
|
Bc()
|
|
@@ -17882,7 +17882,7 @@ function Qx({
|
|
|
17882
17882
|
}
|
|
17883
17883
|
),
|
|
17884
17884
|
je && a === "metrics" && ln && /* @__PURE__ */ e(
|
|
17885
|
-
|
|
17885
|
+
To,
|
|
17886
17886
|
{
|
|
17887
17887
|
open: je,
|
|
17888
17888
|
onOpenChange: xe,
|
|
@@ -17903,7 +17903,7 @@ function Qx({
|
|
|
17903
17903
|
nextSortByFields: $t,
|
|
17904
17904
|
nextStoredFields: en,
|
|
17905
17905
|
nextSharedFields: un
|
|
17906
|
-
} =
|
|
17906
|
+
} = Do({
|
|
17907
17907
|
activeFields: _e,
|
|
17908
17908
|
sortByFields: pt,
|
|
17909
17909
|
storedFields: De.calculatedFields || [],
|
|
@@ -17939,7 +17939,7 @@ function Qx({
|
|
|
17939
17939
|
nextStoredFields: un,
|
|
17940
17940
|
nextSheetFields: Hn,
|
|
17941
17941
|
nextDashboardFields: Gt
|
|
17942
|
-
} =
|
|
17942
|
+
} = Io({
|
|
17943
17943
|
activeFields: pt,
|
|
17944
17944
|
sortByFields: rt,
|
|
17945
17945
|
storedFields: De.calculatedFields || [],
|
|
@@ -17983,7 +17983,7 @@ function Qx({
|
|
|
17983
17983
|
nextStoredFields: un,
|
|
17984
17984
|
nextSharedFields: Hn,
|
|
17985
17985
|
nextSheetFields: Gt
|
|
17986
|
-
} =
|
|
17986
|
+
} = ko({
|
|
17987
17987
|
activeFields: pt,
|
|
17988
17988
|
sortByFields: rt,
|
|
17989
17989
|
storedFields: De.calculatedFields || [],
|
|
@@ -18028,7 +18028,7 @@ function Wx({ concept: t }) {
|
|
|
18028
18028
|
type: "button",
|
|
18029
18029
|
"aria-label": `What does ${a} mean?`,
|
|
18030
18030
|
className: "inline-flex h-3 w-3 shrink-0 items-center justify-center text-muted-foreground/70 transition-colors hover:text-foreground",
|
|
18031
|
-
children: /* @__PURE__ */ e(
|
|
18031
|
+
children: /* @__PURE__ */ e(qm, { className: "h-3 w-3" })
|
|
18032
18032
|
}
|
|
18033
18033
|
) }),
|
|
18034
18034
|
/* @__PURE__ */ n(
|
|
@@ -18086,11 +18086,11 @@ function Yx({
|
|
|
18086
18086
|
i
|
|
18087
18087
|
))
|
|
18088
18088
|
] }) }),
|
|
18089
|
-
/* @__PURE__ */ e("tbody", { children:
|
|
18089
|
+
/* @__PURE__ */ e("tbody", { children: Mi.map((i, l) => /* @__PURE__ */ n(
|
|
18090
18090
|
"tr",
|
|
18091
18091
|
{
|
|
18092
18092
|
className: W(
|
|
18093
|
-
l !==
|
|
18093
|
+
l !== Mi.length - 1 && "border-b border-border/60"
|
|
18094
18094
|
),
|
|
18095
18095
|
children: [
|
|
18096
18096
|
/* @__PURE__ */ e(
|
|
@@ -18120,12 +18120,12 @@ function Yx({
|
|
|
18120
18120
|
)) })
|
|
18121
18121
|
] }) });
|
|
18122
18122
|
}
|
|
18123
|
-
const
|
|
18123
|
+
const Mi = [
|
|
18124
18124
|
{ label: "Electronics", values: ["2,300", "1,800", "3,400"] },
|
|
18125
18125
|
{ label: "Clothing", values: ["1,300", "620", "480"] }
|
|
18126
18126
|
], Xx = {
|
|
18127
18127
|
groupBy: Sr,
|
|
18128
|
-
pivotBy:
|
|
18128
|
+
pivotBy: js,
|
|
18129
18129
|
metrics: Dp,
|
|
18130
18130
|
detailColumns: Or,
|
|
18131
18131
|
sortBy: qo
|
|
@@ -18139,7 +18139,7 @@ function Ca({
|
|
|
18139
18139
|
hasPivotColumns: i = !1,
|
|
18140
18140
|
activeField: l = null
|
|
18141
18141
|
}) {
|
|
18142
|
-
const { isOver: o, setNodeRef: d } =
|
|
18142
|
+
const { isOver: o, setNodeRef: d } = jm({
|
|
18143
18143
|
id: t
|
|
18144
18144
|
}), { updateSortByColumn: m } = Ne(), u = P((g) => g.card), f = P((g) => g.card.type), p = a.length > 0, h = ce(() => !l || !o ? !0 : ur(
|
|
18145
18145
|
l,
|
|
@@ -18232,7 +18232,7 @@ function eb({
|
|
|
18232
18232
|
}
|
|
18233
18233
|
), h = Cn(u, p) === "multiple";
|
|
18234
18234
|
h && ((Z = u == null ? void 0 : u.customCardPreferences) != null && Z.url);
|
|
18235
|
-
const x =
|
|
18235
|
+
const x = Km(p == null ? void 0 : p.slots), T = P(
|
|
18236
18236
|
(Y) => Y.actions.updateCardConfig
|
|
18237
18237
|
), v = P((Y) => Y.actions.updateCard), g = P((Y) => Y.actions.updateFrame), k = ye((Y) => Y.isVisualEditing), R = ye((Y) => Y.selectedSheetId), N = ye(
|
|
18238
18238
|
(Y) => Y.actions.updateSheetCalculatedFields
|
|
@@ -18243,7 +18243,7 @@ function eb({
|
|
|
18243
18243
|
var ue;
|
|
18244
18244
|
return Y.visualEditPendingDashboardCalculatedFields ?? ((ue = Y.dashboard) == null ? void 0 : ue.calculatedFields);
|
|
18245
18245
|
}
|
|
18246
|
-
) ?? Zx, { scopedFields: F } =
|
|
18246
|
+
) ?? Zx, { scopedFields: F } = yo(), { userContext: w } = Ds(), M = h && (u == null ? void 0 : u.id) === d.id && x ? x : d == null ? void 0 : d.type, A = M === "detailTable", C = t.length > 0 || r.length > 0 || c.length > 0, L = !A && (M !== "kpi" || r.length <= 2), V = !A, b = !A && M !== "kpi", S = M !== "kpi" && C, D = A, O = "Drop sort fields here", B = (w == null ? void 0 : w.type) === "organization", z = [
|
|
18247
18247
|
"pie",
|
|
18248
18248
|
"doughnut",
|
|
18249
18249
|
"polar",
|
|
@@ -18352,7 +18352,7 @@ function eb({
|
|
|
18352
18352
|
)
|
|
18353
18353
|
] }),
|
|
18354
18354
|
/* @__PURE__ */ e(
|
|
18355
|
-
|
|
18355
|
+
To,
|
|
18356
18356
|
{
|
|
18357
18357
|
open: l,
|
|
18358
18358
|
onOpenChange: o,
|
|
@@ -18361,7 +18361,7 @@ function eb({
|
|
|
18361
18361
|
allowedFieldTypes: ["metric"],
|
|
18362
18362
|
onSave: (Y) => {
|
|
18363
18363
|
if (Y.role !== "metric") return;
|
|
18364
|
-
const { nextStoredFields: ue } =
|
|
18364
|
+
const { nextStoredFields: ue } = Do({
|
|
18365
18365
|
activeFields: r,
|
|
18366
18366
|
storedFields: d.calculatedFields || [],
|
|
18367
18367
|
sharedFields: m.calculatedFields || [],
|
|
@@ -18374,7 +18374,7 @@ function eb({
|
|
|
18374
18374
|
},
|
|
18375
18375
|
onSaveToSheet: (Y) => {
|
|
18376
18376
|
if (Y.role !== "metric") return;
|
|
18377
|
-
const ue = m.calculatedFields || [], { nextSheetFields: ve } =
|
|
18377
|
+
const ue = m.calculatedFields || [], { nextSheetFields: ve } = Io({
|
|
18378
18378
|
activeFields: r,
|
|
18379
18379
|
storedFields: d.calculatedFields || [],
|
|
18380
18380
|
sheetFields: ue,
|
|
@@ -18392,7 +18392,7 @@ function eb({
|
|
|
18392
18392
|
},
|
|
18393
18393
|
onSaveToDashboard: (Y) => {
|
|
18394
18394
|
if (Y.role !== "metric") return;
|
|
18395
|
-
const { nextSharedFields: ue } =
|
|
18395
|
+
const { nextSharedFields: ue } = ko({
|
|
18396
18396
|
activeFields: r,
|
|
18397
18397
|
storedFields: d.calculatedFields || [],
|
|
18398
18398
|
sharedFields: I,
|
|
@@ -18591,7 +18591,7 @@ function nb({ onEditJoins: t }) {
|
|
|
18591
18591
|
onClick: t,
|
|
18592
18592
|
className: "inline-flex h-5 w-5 shrink-0 items-center justify-center rounded-control text-muted-foreground transition-colors hover:bg-muted hover:text-foreground focus:outline-none focus-visible:border-ring",
|
|
18593
18593
|
"aria-label": "Edit resolved joins",
|
|
18594
|
-
children: /* @__PURE__ */ e(
|
|
18594
|
+
children: /* @__PURE__ */ e(vo, { className: "h-3 w-3", strokeWidth: 1.75 })
|
|
18595
18595
|
}
|
|
18596
18596
|
)
|
|
18597
18597
|
] });
|
|
@@ -18658,7 +18658,7 @@ function ab({
|
|
|
18658
18658
|
"aria-label": "Hide chart configuration",
|
|
18659
18659
|
onClick: s,
|
|
18660
18660
|
className: "h-7 w-7 rounded-[5px] p-0 text-muted-foreground hover:text-foreground",
|
|
18661
|
-
children: /* @__PURE__ */ e(
|
|
18661
|
+
children: /* @__PURE__ */ e(Um, { className: "h-4 w-4", strokeWidth: 1.75 })
|
|
18662
18662
|
}
|
|
18663
18663
|
) })
|
|
18664
18664
|
] }),
|
|
@@ -18994,7 +18994,7 @@ function ib({
|
|
|
18994
18994
|
".",
|
|
18995
18995
|
t.name
|
|
18996
18996
|
] }) }) : s,
|
|
18997
|
-
/* @__PURE__ */ e(
|
|
18997
|
+
/* @__PURE__ */ e(Hi, { className: "ml-2 h-4 w-4 shrink-0 opacity-50" })
|
|
18998
18998
|
]
|
|
18999
18999
|
}
|
|
19000
19000
|
) }),
|
|
@@ -19010,7 +19010,7 @@ function ib({
|
|
|
19010
19010
|
] }),
|
|
19011
19011
|
children: Object.entries(m).map(([u, f]) => /* @__PURE__ */ n("div", { children: [
|
|
19012
19012
|
/* @__PURE__ */ n("div", { className: "flex items-center gap-2 bg-gray-50/50 px-2 py-1 text-xs font-medium text-gray-600", children: [
|
|
19013
|
-
|
|
19013
|
+
Pi(f[0].entityType, { size: "h-3 w-3" }),
|
|
19014
19014
|
/* @__PURE__ */ e("span", { children: f[0].entityName })
|
|
19015
19015
|
] }),
|
|
19016
19016
|
f.map((p, h) => /* @__PURE__ */ n(
|
|
@@ -19046,7 +19046,7 @@ function ib({
|
|
|
19046
19046
|
] }) })
|
|
19047
19047
|
] });
|
|
19048
19048
|
}
|
|
19049
|
-
function
|
|
19049
|
+
function Ys(t) {
|
|
19050
19050
|
var v;
|
|
19051
19051
|
const a = P((g) => g.card), { authToken: r, tokenProps: s } = zn(), c = ye(
|
|
19052
19052
|
(g) => {
|
|
@@ -19074,7 +19074,7 @@ function Xs(t) {
|
|
|
19074
19074
|
groupByColumns: [o],
|
|
19075
19075
|
metricColumns: [d],
|
|
19076
19076
|
sortByColumns: [m]
|
|
19077
|
-
}, f = ((v = a.dataSource) == null ? void 0 : v.connectionId) || a.connectionId, { data: p, isPending: h, error: x } =
|
|
19077
|
+
}, f = ((v = a.dataSource) == null ? void 0 : v.connectionId) || a.connectionId, { data: p, isPending: h, error: x } = No({
|
|
19078
19078
|
queryKey: [
|
|
19079
19079
|
"filterValues",
|
|
19080
19080
|
t.entityId,
|
|
@@ -19119,7 +19119,7 @@ function ob({
|
|
|
19119
19119
|
}) {
|
|
19120
19120
|
const [i, l] = zc.useState(!1), {
|
|
19121
19121
|
filterValues: o
|
|
19122
|
-
} =
|
|
19122
|
+
} = Ys(t), d = (u) => {
|
|
19123
19123
|
r(a.filter((f) => f !== u));
|
|
19124
19124
|
}, m = (u) => {
|
|
19125
19125
|
a.includes(u) ? r(a.filter((f) => f !== u)) : r([...a, u]);
|
|
@@ -19196,7 +19196,7 @@ function cb({
|
|
|
19196
19196
|
placeholder: s = "Select value...",
|
|
19197
19197
|
className: c
|
|
19198
19198
|
}) {
|
|
19199
|
-
const { filterValues: i, isPending: l, error: o } =
|
|
19199
|
+
const { filterValues: i, isPending: l, error: o } = Ys(t);
|
|
19200
19200
|
return l ? /* @__PURE__ */ n("div", { className: "flex flex-1 items-center justify-center p-2 text-xs text-gray-500", children: [
|
|
19201
19201
|
/* @__PURE__ */ e(vn, { className: "mr-2 size-3.5 animate-spin" }),
|
|
19202
19202
|
" Loading values..."
|
|
@@ -19234,7 +19234,7 @@ function db({
|
|
|
19234
19234
|
return p;
|
|
19235
19235
|
}, [t, i]), d = (f) => a === "<=" || a === ">" ? ep(f, c) : tp(f, c);
|
|
19236
19236
|
return /* @__PURE__ */ e(
|
|
19237
|
-
|
|
19237
|
+
Gm,
|
|
19238
19238
|
{
|
|
19239
19239
|
value: i ? l : void 0,
|
|
19240
19240
|
selectionMode: i ? "range" : "single",
|
|
@@ -19265,7 +19265,7 @@ function db({
|
|
|
19265
19265
|
}
|
|
19266
19266
|
);
|
|
19267
19267
|
}
|
|
19268
|
-
const
|
|
19268
|
+
const Xs = [
|
|
19269
19269
|
"contains",
|
|
19270
19270
|
"startsWith",
|
|
19271
19271
|
"endsWith",
|
|
@@ -19278,7 +19278,7 @@ const Zs = [
|
|
|
19278
19278
|
">=",
|
|
19279
19279
|
"<",
|
|
19280
19280
|
"<=",
|
|
19281
|
-
...
|
|
19281
|
+
...Xs,
|
|
19282
19282
|
"in",
|
|
19283
19283
|
"not in",
|
|
19284
19284
|
"isNull",
|
|
@@ -19286,7 +19286,7 @@ const Zs = [
|
|
|
19286
19286
|
], mb = [
|
|
19287
19287
|
"=",
|
|
19288
19288
|
"!=",
|
|
19289
|
-
...
|
|
19289
|
+
...Xs,
|
|
19290
19290
|
"in",
|
|
19291
19291
|
"not in",
|
|
19292
19292
|
"isNull",
|
|
@@ -19332,7 +19332,7 @@ const Zs = [
|
|
|
19332
19332
|
isNotNull: "Is Not Null",
|
|
19333
19333
|
"not between": "Not Between"
|
|
19334
19334
|
};
|
|
19335
|
-
function
|
|
19335
|
+
function Fi(t) {
|
|
19336
19336
|
return gb[t] || Vt(t);
|
|
19337
19337
|
}
|
|
19338
19338
|
function xb(t) {
|
|
@@ -19367,7 +19367,7 @@ function bc({
|
|
|
19367
19367
|
transform: p,
|
|
19368
19368
|
transition: h,
|
|
19369
19369
|
isDragging: x
|
|
19370
|
-
} = kr({ id: t.id }), { isPending: T, error: v } =
|
|
19370
|
+
} = kr({ id: t.id }), { isPending: T, error: v } = Ys(
|
|
19371
19371
|
t.field
|
|
19372
19372
|
), g = {
|
|
19373
19373
|
transform: Dr.Transform.toString(p),
|
|
@@ -19442,9 +19442,9 @@ function bc({
|
|
|
19442
19442
|
});
|
|
19443
19443
|
},
|
|
19444
19444
|
children: [
|
|
19445
|
-
/* @__PURE__ */ e(ae, { className: "w-32", children: /* @__PURE__ */ e(re, { children: t.operator ?
|
|
19445
|
+
/* @__PURE__ */ e(ae, { className: "w-32", children: /* @__PURE__ */ e(re, { children: t.operator ? Fi(t.operator) : "" }) }),
|
|
19446
19446
|
/* @__PURE__ */ e(se, { children: xb(ht(t.field.dataType)).map(
|
|
19447
|
-
(k) => /* @__PURE__ */ e(j, { className: "hover:bg-muted", value: k, children:
|
|
19447
|
+
(k) => /* @__PURE__ */ e(j, { className: "hover:bg-muted", value: k, children: Fi(k) }, k)
|
|
19448
19448
|
) })
|
|
19449
19449
|
]
|
|
19450
19450
|
}
|
|
@@ -19463,7 +19463,7 @@ function bc({
|
|
|
19463
19463
|
placeholder: `Select values for ${t.operator}...`,
|
|
19464
19464
|
className: "flex-1"
|
|
19465
19465
|
}
|
|
19466
|
-
) :
|
|
19466
|
+
) : Xs.includes(t.operator) ? /* @__PURE__ */ e(
|
|
19467
19467
|
Pe,
|
|
19468
19468
|
{
|
|
19469
19469
|
value: typeof t.value == "string" ? t.value : "",
|
|
@@ -19891,9 +19891,9 @@ function yb({
|
|
|
19891
19891
|
updateConditionFields: h
|
|
19892
19892
|
},
|
|
19893
19893
|
A.id
|
|
19894
|
-
), M =
|
|
19894
|
+
), M = Eo(t);
|
|
19895
19895
|
return /* @__PURE__ */ n("div", { className: "space-y-4", children: [
|
|
19896
|
-
/* @__PURE__ */ e(
|
|
19896
|
+
/* @__PURE__ */ e(Xi, { children: /* @__PURE__ */ e(Zi, { className: "p-4", children: /* @__PURE__ */ n("div", { className: "space-y-4", children: [
|
|
19897
19897
|
o ? /* @__PURE__ */ n("div", { className: "flex items-center justify-center p-4", children: [
|
|
19898
19898
|
/* @__PURE__ */ e("div", { className: "h-5 w-5 animate-spin rounded-full border-2 border-gray-300 border-t-gray-600" }),
|
|
19899
19899
|
/* @__PURE__ */ e("span", { className: "ml-2 text-sm text-gray-600", children: "Loading columns..." })
|
|
@@ -19992,7 +19992,7 @@ function Nb({
|
|
|
19992
19992
|
), m = (k = l == null ? void 0 : l.config) == null ? void 0 : k.joinPlan, u = Ie(
|
|
19993
19993
|
(N) => N.entityName === mp || N.entityName === "calculated_fields" || N.qualifiedEntityName === "calculated_fields",
|
|
19994
19994
|
[]
|
|
19995
|
-
), f = (R = l == null ? void 0 : l.dataSource) == null ? void 0 : R.semanticDomainId, { data: p } =
|
|
19995
|
+
), f = (R = l == null ? void 0 : l.dataSource) == null ? void 0 : R.semanticDomainId, { data: p } = Hm(f), h = [
|
|
19996
19996
|
...a,
|
|
19997
19997
|
...r("groupBy"),
|
|
19998
19998
|
...r("pivotBy"),
|
|
@@ -20093,7 +20093,7 @@ function Nb({
|
|
|
20093
20093
|
}
|
|
20094
20094
|
if (B !== C.qualifiedEntityName && !u(C) && C.qualifiedEntityName)
|
|
20095
20095
|
if (f && (p != null && p.joinabilityMap)) {
|
|
20096
|
-
if (
|
|
20096
|
+
if (Qm(C, {
|
|
20097
20097
|
joinabilityMap: p.joinabilityMap,
|
|
20098
20098
|
selectedFields: L,
|
|
20099
20099
|
baseEntityName: (A = m == null ? void 0 : m.baseEntity) == null ? void 0 : A.name,
|
|
@@ -20108,7 +20108,7 @@ function Nb({
|
|
|
20108
20108
|
Hr(), i(null);
|
|
20109
20109
|
return;
|
|
20110
20110
|
}
|
|
20111
|
-
if (!
|
|
20111
|
+
if (!Wm(
|
|
20112
20112
|
B,
|
|
20113
20113
|
C.qualifiedEntityName,
|
|
20114
20114
|
m
|
|
@@ -20142,12 +20142,12 @@ function Nb({
|
|
|
20142
20142
|
b
|
|
20143
20143
|
), O = [...b, D];
|
|
20144
20144
|
if (i(null), s(M, O), M === "metrics" && t) {
|
|
20145
|
-
const B =
|
|
20145
|
+
const B = Zl(
|
|
20146
20146
|
l,
|
|
20147
20147
|
D,
|
|
20148
20148
|
l.preferences
|
|
20149
20149
|
);
|
|
20150
|
-
B && d(B),
|
|
20150
|
+
B && d(B), ei(
|
|
20151
20151
|
l.type,
|
|
20152
20152
|
l.config,
|
|
20153
20153
|
o,
|
|
@@ -20190,12 +20190,12 @@ function Nb({
|
|
|
20190
20190
|
(B) => B.id !== I
|
|
20191
20191
|
), O = [...L, S];
|
|
20192
20192
|
if (s(w, D), s(M, O), M === "metrics" && t) {
|
|
20193
|
-
const B =
|
|
20193
|
+
const B = Zl(
|
|
20194
20194
|
l,
|
|
20195
20195
|
S,
|
|
20196
20196
|
l.preferences
|
|
20197
20197
|
);
|
|
20198
|
-
B && d(B),
|
|
20198
|
+
B && d(B), ei(
|
|
20199
20199
|
l.type,
|
|
20200
20200
|
l.config,
|
|
20201
20201
|
o,
|
|
@@ -20438,25 +20438,11 @@ function Db() {
|
|
|
20438
20438
|
function Eb({
|
|
20439
20439
|
showInfoTab: t
|
|
20440
20440
|
}) {
|
|
20441
|
-
const a = qc();
|
|
20442
20441
|
return /* @__PURE__ */ e(
|
|
20443
|
-
|
|
20442
|
+
Jm,
|
|
20444
20443
|
{
|
|
20445
|
-
"
|
|
20446
|
-
|
|
20447
|
-
role: "alert",
|
|
20448
|
-
children: /* @__PURE__ */ n("div", { className: "flex max-w-[360px] flex-col items-center", children: [
|
|
20449
|
-
/* @__PURE__ */ e(
|
|
20450
|
-
js,
|
|
20451
|
-
{
|
|
20452
|
-
"aria-hidden": "true",
|
|
20453
|
-
className: "mb-3 size-5 text-muted-foreground",
|
|
20454
|
-
strokeWidth: 1.75
|
|
20455
|
-
}
|
|
20456
|
-
),
|
|
20457
|
-
/* @__PURE__ */ e("h2", { id: a, className: "text-[14px] font-medium text-foreground", children: "This visual can’t be loaded" }),
|
|
20458
|
-
/* @__PURE__ */ e("p", { className: "mt-1 text-[12px] leading-5 text-muted-foreground", children: t ? "See the Info tab for error details and troubleshooting options." : "Contact your administrator for help resolving this issue." })
|
|
20459
|
-
] })
|
|
20444
|
+
className: "min-h-[240px]",
|
|
20445
|
+
description: t ? "See the Info tab for error details and troubleshooting options." : "Contact your administrator for help resolving this issue."
|
|
20460
20446
|
}
|
|
20461
20447
|
);
|
|
20462
20448
|
}
|
|
@@ -20595,7 +20581,7 @@ function Mb({
|
|
|
20595
20581
|
});
|
|
20596
20582
|
}, we = ce(() => {
|
|
20597
20583
|
var ge;
|
|
20598
|
-
return
|
|
20584
|
+
return Gi((ge = i.config) == null ? void 0 : ge.sortByColumns);
|
|
20599
20585
|
}, [(We = i.config) == null ? void 0 : We.sortByColumns]);
|
|
20600
20586
|
return /* @__PURE__ */ e(
|
|
20601
20587
|
"div",
|
|
@@ -20645,7 +20631,7 @@ function Mb({
|
|
|
20645
20631
|
{
|
|
20646
20632
|
cardId: s.id,
|
|
20647
20633
|
cardFilters: (Ze = s.config) == null ? void 0 : Ze.filters,
|
|
20648
|
-
cardFilterCount:
|
|
20634
|
+
cardFilterCount: Eo(
|
|
20649
20635
|
((st = s.config) == null ? void 0 : st.filters) || null
|
|
20650
20636
|
),
|
|
20651
20637
|
onFiltersClick: r,
|
|
@@ -20711,21 +20697,21 @@ function Mb({
|
|
|
20711
20697
|
/* @__PURE__ */ e(Qt, {}),
|
|
20712
20698
|
/* @__PURE__ */ n("div", { className: "px-1 py-1", children: [
|
|
20713
20699
|
/* @__PURE__ */ e(
|
|
20714
|
-
|
|
20700
|
+
Hs,
|
|
20715
20701
|
{
|
|
20716
20702
|
triggerVariant: "menu",
|
|
20717
20703
|
className: "w-full"
|
|
20718
20704
|
}
|
|
20719
20705
|
),
|
|
20720
20706
|
/* @__PURE__ */ e(
|
|
20721
|
-
|
|
20707
|
+
Qs,
|
|
20722
20708
|
{
|
|
20723
20709
|
triggerVariant: "menu",
|
|
20724
20710
|
className: "w-full"
|
|
20725
20711
|
}
|
|
20726
20712
|
),
|
|
20727
20713
|
/* @__PURE__ */ e(
|
|
20728
|
-
|
|
20714
|
+
Gs,
|
|
20729
20715
|
{
|
|
20730
20716
|
triggerVariant: "menu",
|
|
20731
20717
|
className: "w-full"
|
|
@@ -20797,7 +20783,7 @@ function Mb({
|
|
|
20797
20783
|
} : void 0,
|
|
20798
20784
|
onSendFeedback: () => {
|
|
20799
20785
|
const ge = sh(
|
|
20800
|
-
|
|
20786
|
+
Wi.QUERY_GENERATION,
|
|
20801
20787
|
{
|
|
20802
20788
|
cardConfig: i.config,
|
|
20803
20789
|
dataSource: s.dataSource,
|
|
@@ -20836,7 +20822,7 @@ function Mb({
|
|
|
20836
20822
|
) }) })
|
|
20837
20823
|
] }),
|
|
20838
20824
|
F && /* @__PURE__ */ e(
|
|
20839
|
-
|
|
20825
|
+
no,
|
|
20840
20826
|
{
|
|
20841
20827
|
open: N,
|
|
20842
20828
|
onOpenChange: y,
|
|
@@ -20852,13 +20838,13 @@ function Fb({ activeField: t }) {
|
|
|
20852
20838
|
if (Ce(() => {
|
|
20853
20839
|
t && r(!0);
|
|
20854
20840
|
}, [t]), !t) return null;
|
|
20855
|
-
const s = !!
|
|
20841
|
+
const s = !!wo(t);
|
|
20856
20842
|
return /* @__PURE__ */ n(
|
|
20857
20843
|
"div",
|
|
20858
20844
|
{
|
|
20859
20845
|
className: `flex h-7 max-w-[300px] items-center gap-2 rounded-[5px] border border-border bg-popover px-3 text-[13px] text-foreground/90 shadow-[0_4px_12px_rgba(0,0,0,0.08)] transition-all duration-150 ${a ? "scale-100 opacity-100" : "scale-95 opacity-0"}`,
|
|
20860
20846
|
children: [
|
|
20861
|
-
/* @__PURE__ */ e(
|
|
20847
|
+
/* @__PURE__ */ e(So, { dataType: t.dataType, calculated: s }),
|
|
20862
20848
|
/* @__PURE__ */ e("span", { className: "overflow-hidden text-ellipsis whitespace-nowrap", children: t.label || t.name })
|
|
20863
20849
|
]
|
|
20864
20850
|
}
|
|
@@ -21074,7 +21060,7 @@ function Pb({ column: t, isSelected: a, onSelect: r, availableFields: s, width:
|
|
|
21074
21060
|
"Group by this column"
|
|
21075
21061
|
] }),
|
|
21076
21062
|
/* @__PURE__ */ n(mt, { disabled: !0, children: [
|
|
21077
|
-
/* @__PURE__ */ e(
|
|
21063
|
+
/* @__PURE__ */ e(js, { className: "mr-2 h-4 w-4" }),
|
|
21078
21064
|
"Pivot by this column"
|
|
21079
21065
|
] }),
|
|
21080
21066
|
/* @__PURE__ */ e(Qt, {}),
|
|
@@ -21220,7 +21206,7 @@ function Vb({
|
|
|
21220
21206
|
xn,
|
|
21221
21207
|
{
|
|
21222
21208
|
items: h.map((L) => L.id),
|
|
21223
|
-
strategy:
|
|
21209
|
+
strategy: ti,
|
|
21224
21210
|
children: h.map((L, V) => /* @__PURE__ */ e(
|
|
21225
21211
|
"th",
|
|
21226
21212
|
{
|
|
@@ -21243,7 +21229,7 @@ function Vb({
|
|
|
21243
21229
|
xn,
|
|
21244
21230
|
{
|
|
21245
21231
|
items: h.map((L) => L.id),
|
|
21246
|
-
strategy:
|
|
21232
|
+
strategy: ti,
|
|
21247
21233
|
children: h.map((L) => /* @__PURE__ */ e(
|
|
21248
21234
|
Pb,
|
|
21249
21235
|
{
|
|
@@ -21343,7 +21329,7 @@ function Vb({
|
|
|
21343
21329
|
V
|
|
21344
21330
|
)) })
|
|
21345
21331
|
] }),
|
|
21346
|
-
/* @__PURE__ */ e(
|
|
21332
|
+
/* @__PURE__ */ e(Ao, { children: I && /* @__PURE__ */ e("div", { className: "rounded border border-primary bg-background px-3 py-2 text-sm font-medium shadow-lg", children: I.label || I.name }) })
|
|
21347
21333
|
]
|
|
21348
21334
|
}
|
|
21349
21335
|
) }),
|
|
@@ -21776,7 +21762,7 @@ function qb({ className: t }) {
|
|
|
21776
21762
|
columns: l = [],
|
|
21777
21763
|
columnGroups: o = [],
|
|
21778
21764
|
isLoading: d
|
|
21779
|
-
} =
|
|
21765
|
+
} = Li(), { valuePickFilterableFields: m = [] } = Ir();
|
|
21780
21766
|
(h = a == null ? void 0 : a.config) != null && h.groupByColumns, (x = a == null ? void 0 : a.config) != null && x.metricColumns, (T = a == null ? void 0 : a.config) != null && T.groupByColumns, (v = a == null ? void 0 : a.config) != null && v.pivotByColumns;
|
|
21781
21767
|
const u = (g) => {
|
|
21782
21768
|
s(g), i(g ? `[${g.label || g.name}]` : "");
|
|
@@ -21843,7 +21829,7 @@ function jb() {
|
|
|
21843
21829
|
), F = x, {
|
|
21844
21830
|
getFieldsForContainer: w,
|
|
21845
21831
|
setFieldsForContainer: M
|
|
21846
|
-
} =
|
|
21832
|
+
} = Co(F), { activeField: A, handleDragStart: C, handleDragEnd: L } = Nb({
|
|
21847
21833
|
activeCardId: h.activeCardId,
|
|
21848
21834
|
sourceFields: y,
|
|
21849
21835
|
getFieldsForContainer: w,
|
|
@@ -21939,7 +21925,7 @@ function jb() {
|
|
|
21939
21925
|
onOpenChange: s
|
|
21940
21926
|
}
|
|
21941
21927
|
),
|
|
21942
|
-
/* @__PURE__ */ e(
|
|
21928
|
+
/* @__PURE__ */ e(Ao, { dropAnimation: null, children: /* @__PURE__ */ e(Fb, { activeField: A || null }) })
|
|
21943
21929
|
]
|
|
21944
21930
|
}
|
|
21945
21931
|
);
|
|
@@ -21950,7 +21936,7 @@ function Kb({ authToken: t, onSave: a, onClose: r }) {
|
|
|
21950
21936
|
d("editor", I);
|
|
21951
21937
|
},
|
|
21952
21938
|
[d]
|
|
21953
|
-
), { setAuthToken: T } =
|
|
21939
|
+
), { setAuthToken: T } = Mo(), { setShowAIDialog: v, setOnSave: g, setOnClose: k } = Ne(), { setActiveAssistantType: R } = _s();
|
|
21954
21940
|
Ce(() => {
|
|
21955
21941
|
a && g(a), r && k(r);
|
|
21956
21942
|
}, [a, g, r, k]), Ce(() => {
|
|
@@ -21995,7 +21981,7 @@ function Kb({ authToken: t, onSave: a, onClose: r }) {
|
|
|
21995
21981
|
defaultSize: m.isOpen ? 40 : 0,
|
|
21996
21982
|
className: "flex",
|
|
21997
21983
|
children: /* @__PURE__ */ e("div", { className: "grow overflow-y-auto", children: /* @__PURE__ */ e(
|
|
21998
|
-
|
|
21984
|
+
Oi,
|
|
21999
21985
|
{
|
|
22000
21986
|
isFullscreen: p,
|
|
22001
21987
|
onFullscreenChange: (I) => l(I ? "editor" : null),
|
|
@@ -22043,7 +22029,7 @@ function Kb({ authToken: t, onSave: a, onClose: r }) {
|
|
|
22043
22029
|
defaultSize: m.isOpen ? 40 : 0,
|
|
22044
22030
|
className: "flex",
|
|
22045
22031
|
children: /* @__PURE__ */ e("div", { className: "grow overflow-y-auto", children: /* @__PURE__ */ e(
|
|
22046
|
-
|
|
22032
|
+
Oi,
|
|
22047
22033
|
{
|
|
22048
22034
|
isFullscreen: p,
|
|
22049
22035
|
onFullscreenChange: (I) => l(I ? "editor" : null),
|