react-semaphor 0.1.132 → 0.1.133
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/{dashboard-controls-DQMFJcPB.js → dashboard-controls-C1rIPoLI.js} +1 -1
- package/dist/chunks/{dashboard-controls-CWG6EatR.js → dashboard-controls-YCOwB4c7.js} +207 -207
- package/dist/chunks/{dashboard-export-dialog-DofqNYdv.js → dashboard-export-dialog-BpjTGwvL.js} +31 -31
- package/dist/chunks/{dashboard-export-dialog-CYRUEIF0.js → dashboard-export-dialog-CsU5-_Nc.js} +1 -1
- package/dist/chunks/{dashboard-json-CfXtWYQo.js → dashboard-json-BwJ6kZV2.js} +1 -1
- package/dist/chunks/{dashboard-json-D5b7lskH.js → dashboard-json-DDxHEaDO.js} +1 -1
- package/dist/chunks/{edit-dashboard-visual-C4ur0h-P.js → edit-dashboard-visual-BoV4X2or.js} +1 -1
- package/dist/chunks/{edit-dashboard-visual-CSfaO06L.js → edit-dashboard-visual-DdK_bxBz.js} +191 -191
- package/dist/chunks/{editor-action-buttons-7cxzFlCm.js → editor-action-buttons-CK2siDBM.js} +2 -2
- package/dist/chunks/{editor-action-buttons-DWHiK2yJ.js → editor-action-buttons-CmA0eoCZ.js} +1 -1
- package/dist/chunks/{index-B6RYfqnr.js → index-BCmbfOd2.js} +4 -4
- package/dist/chunks/{index-CRA38qes.js → index-DilTtW4W.js} +184 -178
- package/dist/chunks/{resource-management-panel-DnKFfVOc.js → resource-management-panel-Bt1zi1Yb.js} +116 -116
- package/dist/chunks/{resource-management-panel-CC_r1yro.js → resource-management-panel-Fs9hg3pC.js} +1 -1
- package/dist/chunks/{use-visual-utils-B41g03Pc.js → use-visual-utils-Cjv_OnmO.js} +1 -1
- package/dist/chunks/{use-visual-utils-CZNuwJRU.js → use-visual-utils-CzQAEa-2.js} +1 -1
- package/dist/dashboard/index.cjs +1 -1
- package/dist/dashboard/index.js +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.js +30 -29
- package/dist/surfboard/index.cjs +1 -1
- package/dist/surfboard/index.js +1 -1
- package/dist/types/main.d.ts +11 -0
- package/package.json +1 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsxs as a, jsx as e, Fragment as re } from "react/jsx-runtime";
|
|
2
|
-
import { b as pe, l as dt, e as ne, f as I, c7 as ca,
|
|
2
|
+
import { b as pe, l as dt, e as ne, f as I, c7 as ca, ax as P, c8 as W, c9 as X, ca as Z, cb as ee, cc as K, cd as ve, B as q, b8 as Ge, ce as Da, cf as Ts, cg as Es, ch as Ds, ci as Ms, cj as da, r as Ye, X as Ae, ck as mn, bd as hn, as as Nt, at as Ct, au as wt, av as St, aw as Kt, k as De, bs as Re, bo as Ke, bp as Te, bq as Ee, cl as Qn, cm as pn, u as ke, aB as Sa, a$ as ut, bj as Yt, c as Q, aA as Ue, cn as Is, b6 as Os, co as Gl, cp as Ul, cq as _l, cr as ta, cs as Jl, ct as Rs, bN as Fs, cu as et, cv as aa, cw as ya, cx as Hl, cy as Na, cz as fn, cA as Ls, cB as Ps, cC as Ot, cD as Vs, cE as Ql, bD as Yl, cF as Wl, cG as Bs, cH as Xl, cI as gn, cJ as Zl, h as er, cK as tr, cL as nn, cM as kt, cN as Le, cO as At, L as qt, cP as ar, cQ as zs, c4 as Gt, aF as Ma, aZ as ua, cR as Wt, cS as nr, bk as Ia, a_ as mt, aE as sr, cT as sn, bh as lr, aL as xn, g as $s, cU as bn, cV as rr, cW as js, cX as Ks, cY as ka, c2 as Ua, cZ as ir, c_ as qs, c$ as or, d0 as cr, d1 as dr, d2 as Oa, d3 as ur, d4 as mr, d5 as Yn, d6 as hr, E as Ra, o as vn, d7 as pr, d8 as yn, bF as fr, I as Ie, d9 as gr, da as xr, bR as Fa, bS as La, bT as nt, bU as Ca, db as br, an as ma, dc as Nn, dd as vr, de as yr, df as Nr, dg as Gs, dh as ha, di as Cn, dj as wn, dk as Sn, dl as kn, dm as pa, dn as Pa, dp as Us, dq as ln, dr as An, ds as Tn, dt as _s, du as En, dv as Js, dw as Dn, b7 as Va, dx as Ba, dy as Cr, P as _e, q as Je, s as He, bz as za, ay as Be, aG as Mn, aH as In, aJ as On, bG as Hs, bc as jt, dz as yt, dA as wr, dB as Sr, dC as kr, dD as Ar, dE as Tr, b3 as Er, aD as na, dF as Dr, dG as Qs, dH as Rn, dI as Ut, dJ as la, dK as Ys, dL as qe, dM as ue, dN as me, dO as he, b1 as be, dP as ot, c5 as Ws, dQ as Mr, dR as Ir, dS as Or, dT as Rr, dU as Fr, dV as Lr, ah as Xs, dW as Pr, dX as Vr, dY as Br, t as Tt, v as Et, w as Dt, x as Mt, y as st, z as ht, dZ as zr, d_ as je, d$ as xa, e0 as Wn, e1 as $r, e2 as Xn, e3 as jr, C as Xt, e4 as Oe, e5 as Kr, e6 as Zn, e7 as es, e8 as qr, e9 as Gr, ea as Ur, eb as _r, ec as _a, ed as Zs, ee as Jr, ef as ts, eg as as, A as Hr, eh as Qr, ei as Yr, ej as Wr, ek as Xr, el as Zr, ad as ns, em as ss, en as ei, eo as ti, ep as el, eq as ai, er as tl, es as ni, et as si, eu as li, ev as ri, ew as ii, ex as oi, ey as ci, ez as di, eA as ui, eB as mi, eC as al, eD as hi, eE as pi, eF as fi, eG as gi, eH as xi, eI as bi, eJ as vi, eK as nl, aI as yi, eL as ls, eM as Ja, eN as Fn, Z as Ni, eO as Ci, eP as wi, bM as sl, eQ as Me, az as Si, $ as Aa, eR as ki, eS as Ai, eT as $a, eU as ll, eV as ja, eW as Ti, bA as Ei, eX as rs, eY as Di, eZ as Mi, e_ as Ii, e$ as wa, f0 as It, f1 as ra, f2 as fa, f3 as Oi, f4 as Ln, f5 as rl, f6 as Ri, f7 as Ta, f8 as Fi, f9 as Li, fa as ia, fb as ct, fc as rn, fd as on, fe as oa, ff as il, fg as _t, fh as Jt, fi as Ht, fj as Pi, fk as Ha, fl as Qa, fm as Vi, fn as Ya, fo as Bi, fp as is, fq as zi, fr as $i, fs as ji, ft as Ki, aK as Pe, fu as qi, fv as Gi, fw as Ui, b2 as _i, bf as Ka, fx as os, fy as ol, fz as Wa, fA as Xa, fB as Ji, fC as Hi, fD as Qi, F as Yi } from "./index-DilTtW4W.js";
|
|
3
3
|
import * as cn from "react";
|
|
4
|
-
import dn, { useState as
|
|
5
|
-
import { d as Vn } from "./editor-action-buttons-
|
|
4
|
+
import dn, { useState as j, useEffect as fe, useRef as Qe, useCallback as ze, useContext as Pn, useMemo as Ne, Suspense as Wi } from "react";
|
|
5
|
+
import { d as Vn } from "./editor-action-buttons-CK2siDBM.js";
|
|
6
6
|
import { createPortal as Xi } from "react-dom";
|
|
7
|
-
import { u as Zi } from "./use-visual-utils-
|
|
7
|
+
import { u as Zi } from "./use-visual-utils-CzQAEa-2.js";
|
|
8
8
|
import { u as eo } from "./use-click-outside-CMeO_QFI.js";
|
|
9
9
|
/**
|
|
10
10
|
* @license lucide-react v0.453.0 - ISC
|
|
@@ -485,7 +485,7 @@ function To({
|
|
|
485
485
|
initialJoinPlan: t,
|
|
486
486
|
availableDataSources: n
|
|
487
487
|
}) {
|
|
488
|
-
const [s, l] =
|
|
488
|
+
const [s, l] = j(t), [i, d] = j(/* @__PURE__ */ new Set()), c = () => {
|
|
489
489
|
const w = s.joins.length > 0 ? Math.max(...s.joins.map((x) => x.sequence)) + 1 : 1, g = {
|
|
490
490
|
id: `join-${Date.now()}`,
|
|
491
491
|
source: {
|
|
@@ -1506,7 +1506,7 @@ function ds({
|
|
|
1506
1506
|
dialect: "none"
|
|
1507
1507
|
},
|
|
1508
1508
|
joins: []
|
|
1509
|
-
}, [o, r] =
|
|
1509
|
+
}, [o, r] = j(!1), u = t !== void 0, m = u ? t : o, p = u ? n : r, f = ((V = l == null ? void 0 : l.dataSource) == null ? void 0 : V.selectedEntities) || [], b = (L) => {
|
|
1510
1510
|
d(l.id, {
|
|
1511
1511
|
...l == null ? void 0 : l.config,
|
|
1512
1512
|
joinPlan: L
|
|
@@ -1625,7 +1625,7 @@ function Mo({
|
|
|
1625
1625
|
open: t,
|
|
1626
1626
|
onOpenChange: n
|
|
1627
1627
|
}) {
|
|
1628
|
-
const [s, l] =
|
|
1628
|
+
const [s, l] = j(
|
|
1629
1629
|
[]
|
|
1630
1630
|
), { updateDataSource: i } = ne(), d = ke((h) => h.dashboard.aiContext), c = (d == null ? void 0 : d.selectedEntities) || [];
|
|
1631
1631
|
fe(() => {
|
|
@@ -1787,7 +1787,7 @@ function us({
|
|
|
1787
1787
|
] }) });
|
|
1788
1788
|
}
|
|
1789
1789
|
function qa(t, n) {
|
|
1790
|
-
const [s, l] =
|
|
1790
|
+
const [s, l] = j(() => {
|
|
1791
1791
|
const i = localStorage.getItem(t);
|
|
1792
1792
|
return i ? JSON.parse(i) : n;
|
|
1793
1793
|
});
|
|
@@ -1802,7 +1802,7 @@ function pl({
|
|
|
1802
1802
|
var y, N;
|
|
1803
1803
|
const n = I((k) => k.isDevMode);
|
|
1804
1804
|
_l();
|
|
1805
|
-
const [s, l] =
|
|
1805
|
+
const [s, l] = j(!1), [i, d] = j(!1), [c, o] = qa("semaphor:data-source-collapsed", !1), r = I((k) => k.card.dataSource), u = I((k) => {
|
|
1806
1806
|
var D, V;
|
|
1807
1807
|
return (V = (D = k.card) == null ? void 0 : D.config) == null ? void 0 : V.joinPlan;
|
|
1808
1808
|
}), { updateDataSource: m } = ne(), p = ((y = r == null ? void 0 : r.selectedEntities) == null ? void 0 : y.length) || 0, f = ((N = u == null ? void 0 : u.joins) == null ? void 0 : N.length) || 0, h = {
|
|
@@ -1962,7 +1962,7 @@ function zn({
|
|
|
1962
1962
|
showFeedbackButton: d = !0,
|
|
1963
1963
|
errorTitle: c = "Query Error"
|
|
1964
1964
|
}) {
|
|
1965
|
-
const [o, r] =
|
|
1965
|
+
const [o, r] = j(!1);
|
|
1966
1966
|
return /* @__PURE__ */ e(
|
|
1967
1967
|
"div",
|
|
1968
1968
|
{
|
|
@@ -2054,7 +2054,7 @@ function fl({
|
|
|
2054
2054
|
errorSql: s,
|
|
2055
2055
|
onDebugWithAssistant: l
|
|
2056
2056
|
}) {
|
|
2057
|
-
const i = I((y) => y.isDevMode), { setIsDevMode: d, setCardSql: c, setRunSql: o } = ne(), [r, u] =
|
|
2057
|
+
const i = I((y) => y.isDevMode), { setIsDevMode: d, setCardSql: c, setRunSql: o } = ne(), [r, u] = j(!1), m = I((y) => y.card), p = I((y) => y.frame), f = ke((y) => y.selectedSheetId), b = ke((y) => {
|
|
2058
2058
|
var N;
|
|
2059
2059
|
return (N = y.dashboard) == null ? void 0 : N.id;
|
|
2060
2060
|
});
|
|
@@ -2309,7 +2309,7 @@ function Fo() {
|
|
|
2309
2309
|
);
|
|
2310
2310
|
}
|
|
2311
2311
|
function Lo() {
|
|
2312
|
-
const t = er(), { isConsoleMode: n } = Os(), [s, l] =
|
|
2312
|
+
const t = er(), { isConsoleMode: n } = Os(), [s, l] = j(!1);
|
|
2313
2313
|
I((B) => B.frame);
|
|
2314
2314
|
const i = I((B) => B.card);
|
|
2315
2315
|
I((B) => B.isShowingVisual), I(
|
|
@@ -2461,7 +2461,7 @@ ${o}` : ""}
|
|
|
2461
2461
|
);
|
|
2462
2462
|
}
|
|
2463
2463
|
function U() {
|
|
2464
|
-
var B, G, Y, te, ae,
|
|
2464
|
+
var B, G, Y, te, ae, $;
|
|
2465
2465
|
return /* @__PURE__ */ e(
|
|
2466
2466
|
"div",
|
|
2467
2467
|
{
|
|
@@ -2545,7 +2545,7 @@ ${o}` : ""}
|
|
|
2545
2545
|
((te = (Y = i.preferences) == null ? void 0 : Y.tablePrefs) == null ? void 0 : te.enableDevModePagination) && /* @__PURE__ */ a(
|
|
2546
2546
|
W,
|
|
2547
2547
|
{
|
|
2548
|
-
value: String(((
|
|
2548
|
+
value: String((($ = (ae = i.preferences) == null ? void 0 : ae.tablePrefs) == null ? void 0 : $.pageSize) || 50),
|
|
2549
2549
|
onValueChange: (ce) => {
|
|
2550
2550
|
var ie, se, we;
|
|
2551
2551
|
const de = Number(ce), xe = {
|
|
@@ -2749,7 +2749,7 @@ function xl({
|
|
|
2749
2749
|
...n
|
|
2750
2750
|
}) {
|
|
2751
2751
|
var J;
|
|
2752
|
-
const s = I((U) => U.card), l = ((J = s.customCardPreferences) == null ? void 0 : J.showCardHeader) ?? !0, i = I((U) => U.frame), d = ke((U) => U.dashboard.filters), [c, o] =
|
|
2752
|
+
const s = I((U) => U.card), l = ((J = s.customCardPreferences) == null ? void 0 : J.showCardHeader) ?? !0, i = I((U) => U.frame), d = ke((U) => U.dashboard.filters), [c, o] = j(!1), { currentUser: r } = lr(), { tokenProps: u } = Pn(xn), m = I((U) => U.actions.setRunSql), { updateFilter: p } = $s(), f = d == null ? void 0 : d.find((U) => U.id === i.filterId), { data: b, isLoading: h, isFetching: y, errorMessage: N, errorSql: k, pagination: D } = De(s), V = Ne(() => (b == null ? void 0 : b.records) || [], [b == null ? void 0 : b.records]), { setCard: L, updateCardInFrame: E, setIsDevMode: w, setCardSql: g } = ne(), { data: x } = bn(s), S = Ne(() => {
|
|
2753
2753
|
var U;
|
|
2754
2754
|
return s.type !== "pivotTable" || !((U = b == null ? void 0 : b.records) != null && U.length) ? null : {
|
|
2755
2755
|
records: b.records,
|
|
@@ -2774,7 +2774,7 @@ function xl({
|
|
|
2774
2774
|
}, M = Ne(() => {
|
|
2775
2775
|
const U = typeof window < "u" ? window.location.href : "", B = typeof navigator < "u" ? navigator.userAgent : "", G = typeof window < "u" ? `${window.innerWidth}x${window.innerHeight}` : "";
|
|
2776
2776
|
return {
|
|
2777
|
-
category:
|
|
2777
|
+
category: js.QUERY_GENERATION,
|
|
2778
2778
|
user: r,
|
|
2779
2779
|
tokenContext: u,
|
|
2780
2780
|
systemState: {
|
|
@@ -2804,7 +2804,7 @@ function xl({
|
|
|
2804
2804
|
};
|
|
2805
2805
|
L(G), E(G), s.sql && ((te = (Y = s.preferences) == null ? void 0 : Y.tablePrefs) != null && te.enableDevModePagination) && m(!0);
|
|
2806
2806
|
}, T = (U) => {
|
|
2807
|
-
var Y, te, ae,
|
|
2807
|
+
var Y, te, ae, $;
|
|
2808
2808
|
const B = yn(
|
|
2809
2809
|
U,
|
|
2810
2810
|
(Y = s.config) == null ? void 0 : Y.metricColumns,
|
|
@@ -2816,7 +2816,7 @@ function xl({
|
|
|
2816
2816
|
sortByColumns: B
|
|
2817
2817
|
}
|
|
2818
2818
|
};
|
|
2819
|
-
L(G), E(G), s.sql && ((
|
|
2819
|
+
L(G), E(G), s.sql && (($ = (ae = s.preferences) == null ? void 0 : ae.tablePrefs) != null && $.enableDevModePagination) && m(!0);
|
|
2820
2820
|
}, R = Ne(() => !s.id || !(b != null && b.records) ? null : Ks({
|
|
2821
2821
|
card: s,
|
|
2822
2822
|
data: b == null ? void 0 : b.records,
|
|
@@ -3029,7 +3029,7 @@ const tn = ({
|
|
|
3029
3029
|
}
|
|
3030
3030
|
)
|
|
3031
3031
|
] })
|
|
3032
|
-
] }),
|
|
3032
|
+
] }), $o = ({
|
|
3033
3033
|
// defaultConfig,
|
|
3034
3034
|
customCode: t,
|
|
3035
3035
|
cardCustomCfgString: n,
|
|
@@ -3089,7 +3089,7 @@ const tn = ({
|
|
|
3089
3089
|
)
|
|
3090
3090
|
}
|
|
3091
3091
|
)
|
|
3092
|
-
] }),
|
|
3092
|
+
] }), jo = ({
|
|
3093
3093
|
error: t,
|
|
3094
3094
|
hasCardCustomConfig: n,
|
|
3095
3095
|
onReset: s,
|
|
@@ -3102,7 +3102,7 @@ const tn = ({
|
|
|
3102
3102
|
/* @__PURE__ */ e(q, { onClick: i, variant: "outline", children: "Close" })
|
|
3103
3103
|
] });
|
|
3104
3104
|
function Ko() {
|
|
3105
|
-
const [t, n] =
|
|
3105
|
+
const [t, n] = j(!1), [s, l] = j(""), [i, d] = j(""), [c, o] = j(""), [r, u] = j(""), m = I((E) => E.card), p = I((E) => E.card.customCfg), f = p ? JSON.stringify(p, null, 2) : "", { data: b } = De(m), { data: h } = bn(m), { setCardCustomCfg: y, setCustomVisualCode: N } = ne(), k = (E) => {
|
|
3106
3106
|
var w, g;
|
|
3107
3107
|
return JSON.stringify(
|
|
3108
3108
|
{
|
|
@@ -3165,7 +3165,7 @@ function Ko() {
|
|
|
3165
3165
|
/* @__PURE__ */ a("div", { className: "flex grow gap-2", children: [
|
|
3166
3166
|
/* @__PURE__ */ e(Ra, { FallbackComponent: vn, children: /* @__PURE__ */ e(xl, { className: "w-1/2 rounded shadow-none" }) }),
|
|
3167
3167
|
/* @__PURE__ */ e(
|
|
3168
|
-
|
|
3168
|
+
$o,
|
|
3169
3169
|
{
|
|
3170
3170
|
customCode: c,
|
|
3171
3171
|
cardCustomCfgString: f,
|
|
@@ -3176,7 +3176,7 @@ function Ko() {
|
|
|
3176
3176
|
)
|
|
3177
3177
|
] }),
|
|
3178
3178
|
/* @__PURE__ */ e(
|
|
3179
|
-
|
|
3179
|
+
jo,
|
|
3180
3180
|
{
|
|
3181
3181
|
error: r,
|
|
3182
3182
|
hasCardCustomConfig: !!p,
|
|
@@ -3191,7 +3191,7 @@ function Ko() {
|
|
|
3191
3191
|
] });
|
|
3192
3192
|
}
|
|
3193
3193
|
function Ga(t) {
|
|
3194
|
-
const [n, s] =
|
|
3194
|
+
const [n, s] = j(null);
|
|
3195
3195
|
return n;
|
|
3196
3196
|
}
|
|
3197
3197
|
function bl() {
|
|
@@ -3418,7 +3418,7 @@ function yl({
|
|
|
3418
3418
|
variant: t = "ghost"
|
|
3419
3419
|
}) {
|
|
3420
3420
|
var o, r;
|
|
3421
|
-
const [n, s] =
|
|
3421
|
+
const [n, s] = j(!1), [l, i] = j(""), d = I((u) => u.card), c = d.type;
|
|
3422
3422
|
return /* @__PURE__ */ a(
|
|
3423
3423
|
_e,
|
|
3424
3424
|
{
|
|
@@ -3489,7 +3489,7 @@ function Jo({
|
|
|
3489
3489
|
textClassName: s = "",
|
|
3490
3490
|
copyButtonClassName: l = ""
|
|
3491
3491
|
}) {
|
|
3492
|
-
const [i, d] =
|
|
3492
|
+
const [i, d] = j(!1), c = Qe(null), o = Qe(!1);
|
|
3493
3493
|
function r() {
|
|
3494
3494
|
t && !o.current && navigator.clipboard.writeText(t);
|
|
3495
3495
|
}
|
|
@@ -3585,7 +3585,7 @@ function Qo({
|
|
|
3585
3585
|
className: t
|
|
3586
3586
|
}) {
|
|
3587
3587
|
var f, b, h, y, N, k, D, V;
|
|
3588
|
-
const n = I((L) => L.card), { setCardPreferences: s, updateCardInFrame: l, setCard: i } = ne(), [d, c] =
|
|
3588
|
+
const n = I((L) => L.card), { setCardPreferences: s, updateCardInFrame: l, setCard: i } = ne(), [d, c] = j(!1), o = ((b = (f = n.preferences) == null ? void 0 : f.displayOptions) == null ? void 0 : b.showFilterInfo) ?? !0, r = ((y = (h = n.preferences) == null ? void 0 : h.displayOptions) == null ? void 0 : y.showCardToolbar) ?? !0, u = ((k = (N = n.preferences) == null ? void 0 : N.displayOptions) == null ? void 0 : k.showChrome) ?? !0, m = ((V = (D = n.preferences) == null ? void 0 : D.displayOptions) == null ? void 0 : V.allowScroll) ?? !0, p = (L, E) => {
|
|
3589
3589
|
var x;
|
|
3590
3590
|
const w = {
|
|
3591
3591
|
...n.preferences,
|
|
@@ -3609,7 +3609,7 @@ function Qo({
|
|
|
3609
3609
|
) }),
|
|
3610
3610
|
/* @__PURE__ */ a(On, { align: "end", className: "w-64", children: [
|
|
3611
3611
|
/* @__PURE__ */ e(Hs, { children: "Display Options" }),
|
|
3612
|
-
/* @__PURE__ */ e(
|
|
3612
|
+
/* @__PURE__ */ e(jt, {}),
|
|
3613
3613
|
/* @__PURE__ */ e("div", { className: "px-2 py-1.5", children: /* @__PURE__ */ e("p", { className: "mb-2 text-xs text-muted-foreground", children: "Changes apply to dashboard view only" }) }),
|
|
3614
3614
|
/* @__PURE__ */ a(
|
|
3615
3615
|
yt,
|
|
@@ -3917,7 +3917,7 @@ function ms({
|
|
|
3917
3917
|
runAssistant: p,
|
|
3918
3918
|
setIsDevMode: f,
|
|
3919
3919
|
setCardPreferences: b
|
|
3920
|
-
} = ne(), { data: h, isLoading: y, isFetching: N, errorMessage: k, refetch: D, pagination: V } = De(s), L = Ne(() => (h == null ? void 0 : h.records) || [], [h == null ? void 0 : h.records]), [E, w] =
|
|
3920
|
+
} = ne(), { data: h, isLoading: y, isFetching: N, errorMessage: k, refetch: D, pagination: V } = De(s), L = Ne(() => (h == null ? void 0 : h.records) || [], [h == null ? void 0 : h.records]), [E, w] = j(!1);
|
|
3921
3921
|
fe(() => {
|
|
3922
3922
|
N || w(!1);
|
|
3923
3923
|
}, [N]);
|
|
@@ -4353,7 +4353,7 @@ function Zo() {
|
|
|
4353
4353
|
);
|
|
4354
4354
|
}
|
|
4355
4355
|
function Rt() {
|
|
4356
|
-
const [t, n] =
|
|
4356
|
+
const [t, n] = j([]), s = I((u) => u.card.preferences), { setFilterOnClickColumnIndex: l, setCardPreferences: i } = I(
|
|
4357
4357
|
(u) => u.actions
|
|
4358
4358
|
), d = I(
|
|
4359
4359
|
(u) => u.queryResultColumns
|
|
@@ -4588,7 +4588,7 @@ function tc() {
|
|
|
4588
4588
|
defaultMetricKeys: l
|
|
4589
4589
|
};
|
|
4590
4590
|
}
|
|
4591
|
-
function
|
|
4591
|
+
function $n({
|
|
4592
4592
|
children: t,
|
|
4593
4593
|
className: n,
|
|
4594
4594
|
delayDuration: s
|
|
@@ -4694,7 +4694,7 @@ function Sl({
|
|
|
4694
4694
|
s
|
|
4695
4695
|
),
|
|
4696
4696
|
children: [
|
|
4697
|
-
i || /* @__PURE__ */ e(
|
|
4697
|
+
i || /* @__PURE__ */ e($n, { className: "max-w-[100px]", title: t, children: wl(t) }),
|
|
4698
4698
|
/* @__PURE__ */ a("div", { className: "flex gap-2", children: [
|
|
4699
4699
|
/* @__PURE__ */ e(
|
|
4700
4700
|
Ba,
|
|
@@ -4804,7 +4804,7 @@ function nc({
|
|
|
4804
4804
|
}) {
|
|
4805
4805
|
return /* @__PURE__ */ e("div", { className: "space-y-6 px-6 py-2", children: /* @__PURE__ */ a(qe, { defaultValue: ["item-2"], type: "multiple", children: [
|
|
4806
4806
|
/* @__PURE__ */ a(ue, { value: "item-1", children: [
|
|
4807
|
-
/* @__PURE__ */ e(me, { children: `${
|
|
4807
|
+
/* @__PURE__ */ e(me, { children: `${je(t)} Chart` }),
|
|
4808
4808
|
/* @__PURE__ */ a(he, { className: "space-y-4 font-mono text-xs", children: [
|
|
4809
4809
|
/* @__PURE__ */ e("div", { className: "rounded bg-muted px-2 py-1 text-xs", children: "SELECT x-axis, y-axis-1, y-axis-2,... FROM table" }),
|
|
4810
4810
|
/* @__PURE__ */ a("ul", { className: "ml-6 list-disc text-xs [&>li]:mt-2", children: [
|
|
@@ -4872,7 +4872,7 @@ function sc({
|
|
|
4872
4872
|
}
|
|
4873
4873
|
return /* @__PURE__ */ e("div", { className: "space-y-6 px-6 py-2", children: /* @__PURE__ */ a(qe, { defaultValue: ["item-2"], type: "multiple", children: [
|
|
4874
4874
|
/* @__PURE__ */ a(ue, { value: "item-1", children: [
|
|
4875
|
-
/* @__PURE__ */ e(me, { children: `${
|
|
4875
|
+
/* @__PURE__ */ e(me, { children: `${je(t)} Chart` }),
|
|
4876
4876
|
/* @__PURE__ */ e(he, { className: "space-y-4 font-mono text-xs", children: n(t) })
|
|
4877
4877
|
] }),
|
|
4878
4878
|
/* @__PURE__ */ a(ue, { value: "item-3", children: [
|
|
@@ -5494,7 +5494,7 @@ const mc = [
|
|
|
5494
5494
|
}));
|
|
5495
5495
|
function fc() {
|
|
5496
5496
|
var r, u, m, p, f, b, h, y, N, k, D, V, L, E, w, g, x, S;
|
|
5497
|
-
const t = I((O) => O.card), n = (u = (r = t == null ? void 0 : t.preferences) == null ? void 0 : r.mapVisualOptions) == null ? void 0 : u.topoJsonUrl, [s, l] =
|
|
5497
|
+
const t = I((O) => O.card), n = (u = (r = t == null ? void 0 : t.preferences) == null ? void 0 : r.mapVisualOptions) == null ? void 0 : u.topoJsonUrl, [s, l] = j(
|
|
5498
5498
|
((p = (m = t == null ? void 0 : t.preferences) == null ? void 0 : m.mapVisualOptions) == null ? void 0 : p.customTopoJsonUrl) || ""
|
|
5499
5499
|
), { setCardPreferences: i } = ne(), { data: d } = bn(t), c = Object.keys((d == null ? void 0 : d.objects) || {}).map((O) => ({
|
|
5500
5500
|
label: O,
|
|
@@ -5737,7 +5737,7 @@ function ba({
|
|
|
5737
5737
|
let l = "pie-donut-polar";
|
|
5738
5738
|
return t === "funnel" && (l = "funnel"), /* @__PURE__ */ e("div", { className: "space-y-6 px-6 py-2", children: /* @__PURE__ */ a(qe, { defaultValue: ["item-2"], type: "multiple", children: [
|
|
5739
5739
|
/* @__PURE__ */ a(ue, { value: "item-1", children: [
|
|
5740
|
-
/* @__PURE__ */ e(me, { children: `${
|
|
5740
|
+
/* @__PURE__ */ e(me, { children: `${je(t)} ${s}` }),
|
|
5741
5741
|
/* @__PURE__ */ e(he, { children: n || /* @__PURE__ */ a("div", { className: "space-y-4 font-mono text-xs", children: [
|
|
5742
5742
|
/* @__PURE__ */ e("div", { className: "rounded bg-muted px-2 py-1 text-xs", children: "SELECT label, measure FROM table" }),
|
|
5743
5743
|
/* @__PURE__ */ a("ul", { className: "ml-6 list-disc text-xs [&>li]:mt-2", children: [
|
|
@@ -5889,7 +5889,7 @@ function bc({
|
|
|
5889
5889
|
] });
|
|
5890
5890
|
}
|
|
5891
5891
|
function Al({ color: t, onColorChange: n, onClose: s }) {
|
|
5892
|
-
const [l, i] =
|
|
5892
|
+
const [l, i] = j(0), [d, c] = j(100), [o, r] = j(50), [u, m] = j(t);
|
|
5893
5893
|
fe(() => {
|
|
5894
5894
|
const N = hs(t);
|
|
5895
5895
|
if (N) {
|
|
@@ -6103,9 +6103,9 @@ function Tl() {
|
|
|
6103
6103
|
const t = I((M) => M.card), n = I((M) => {
|
|
6104
6104
|
var F;
|
|
6105
6105
|
return (F = M.card) == null ? void 0 : F.preferences;
|
|
6106
|
-
}), { setCardPreferences: s, updateCardInFrame: l } = ne(), { data: i } = De(t), [d, c] =
|
|
6106
|
+
}), { setCardPreferences: s, updateCardInFrame: l } = ne(), { data: i } = De(t), [d, c] = j({}), [o, r] = j(
|
|
6107
6107
|
null
|
|
6108
|
-
), [u, m] =
|
|
6108
|
+
), [u, m] = j(null), p = Ne(() => {
|
|
6109
6109
|
var R, A, z, J, U, B, G;
|
|
6110
6110
|
if (!(i != null && i.records) || i.records.length === 0) return [];
|
|
6111
6111
|
const M = (t == null ? void 0 : t.type) === "stackedBar" || (t == null ? void 0 : t.type) === "stackedLine", F = (t == null ? void 0 : t.type) === "bar" || (t == null ? void 0 : t.type) === "line" || (t == null ? void 0 : t.type) === "horizontalBar" || (t == null ? void 0 : t.type) === "bullet", T = ((R = t == null ? void 0 : t.config) == null ? void 0 : R.pivotByColumns) && t.config.pivotByColumns.length > 0;
|
|
@@ -6121,14 +6121,14 @@ function Tl() {
|
|
|
6121
6121
|
(A = t == null ? void 0 : t.config) != null && A.groupByColumns && t.config.groupByColumns.forEach((de) => {
|
|
6122
6122
|
ae.add(de.label || de.name), ae.add(de.alias || de.name);
|
|
6123
6123
|
});
|
|
6124
|
-
const
|
|
6124
|
+
const $ = /* @__PURE__ */ new Set();
|
|
6125
6125
|
return (z = t == null ? void 0 : t.config) != null && z.metricColumns && t.config.metricColumns.forEach((de) => {
|
|
6126
6126
|
const xe = de.alias || de.name;
|
|
6127
|
-
|
|
6127
|
+
$.add(xe), $.add(`${xe}_count`), $.add(`${xe}_sum`), $.add(`${xe}_avg`), $.add(`${xe}_min`), $.add(`${xe}_max`);
|
|
6128
6128
|
const ie = de.entityName || de.qualifiedEntityName;
|
|
6129
|
-
ie && (
|
|
6129
|
+
ie && ($.add(`${ie}_${xe}`), $.add(`${ie}_${xe}_count`));
|
|
6130
6130
|
}), te.filter(
|
|
6131
|
-
(de) => !ae.has(de) &&
|
|
6131
|
+
(de) => !ae.has(de) && !$.has(de)
|
|
6132
6132
|
);
|
|
6133
6133
|
}
|
|
6134
6134
|
}
|
|
@@ -6138,8 +6138,8 @@ function Tl() {
|
|
|
6138
6138
|
);
|
|
6139
6139
|
if ((G = (B = t == null ? void 0 : t.config) == null ? void 0 : B.groupByColumns) != null && G.length) {
|
|
6140
6140
|
const Y = t.config.groupByColumns[0], te = Y.label || Y.name, ae = /* @__PURE__ */ new Set();
|
|
6141
|
-
return i.records.forEach((
|
|
6142
|
-
const ce =
|
|
6141
|
+
return i.records.forEach(($) => {
|
|
6142
|
+
const ce = $[te];
|
|
6143
6143
|
ce != null && ae.add(String(ce));
|
|
6144
6144
|
}), Array.from(ae);
|
|
6145
6145
|
}
|
|
@@ -6150,7 +6150,7 @@ function Tl() {
|
|
|
6150
6150
|
(L = t == null ? void 0 : t.config) == null ? void 0 : L.pivotByColumns,
|
|
6151
6151
|
(E = t == null ? void 0 : t.config) == null ? void 0 : E.metricColumns,
|
|
6152
6152
|
t == null ? void 0 : t.type
|
|
6153
|
-
]), f = Ne(() =>
|
|
6153
|
+
]), f = Ne(() => $r(), []);
|
|
6154
6154
|
fe(() => {
|
|
6155
6155
|
const M = {};
|
|
6156
6156
|
p.forEach((F, T) => {
|
|
@@ -6235,7 +6235,7 @@ function Tl() {
|
|
|
6235
6235
|
}
|
|
6236
6236
|
) }) }),
|
|
6237
6237
|
/* @__PURE__ */ e("div", { className: "max-h-[200px] space-y-2 overflow-y-auto pr-1", children: p.map((M, F) => {
|
|
6238
|
-
const T =
|
|
6238
|
+
const T = jr(d[M], F), R = !T;
|
|
6239
6239
|
return /* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
|
|
6240
6240
|
/* @__PURE__ */ a(
|
|
6241
6241
|
_e,
|
|
@@ -6355,7 +6355,7 @@ function at({
|
|
|
6355
6355
|
type: l = "text",
|
|
6356
6356
|
className: i = ""
|
|
6357
6357
|
}) {
|
|
6358
|
-
const [d, c] =
|
|
6358
|
+
const [d, c] = j(t ?? ""), [o, r] = j(!1);
|
|
6359
6359
|
dn.useEffect(() => {
|
|
6360
6360
|
c(t ?? "");
|
|
6361
6361
|
}, [t]);
|
|
@@ -6488,7 +6488,7 @@ const Cc = [
|
|
|
6488
6488
|
{ value: "nl-NL", label: "Dutch" },
|
|
6489
6489
|
{ value: "sv-SE", label: "Swedish" }
|
|
6490
6490
|
], kc = (t) => t.charAt(0).toUpperCase() + t.slice(1);
|
|
6491
|
-
function
|
|
6491
|
+
function jn({
|
|
6492
6492
|
formatOptions: t = {},
|
|
6493
6493
|
onFormatOptionsChange: n,
|
|
6494
6494
|
showTitle: s = !0,
|
|
@@ -6731,7 +6731,7 @@ function fs({ axis: t, label: n, type: s, config: l, onChange: i }) {
|
|
|
6731
6731
|
onValueChange: (g) => d("position", g),
|
|
6732
6732
|
children: [
|
|
6733
6733
|
/* @__PURE__ */ e(X, { className: "h-8 text-xs", children: /* @__PURE__ */ e(Z, {}) }),
|
|
6734
|
-
/* @__PURE__ */ e(ee, { children: u.map((g) => /* @__PURE__ */ e(K, { value: g, className: "text-xs", children: g === "auto" ? "Auto (Default)" :
|
|
6734
|
+
/* @__PURE__ */ e(ee, { children: u.map((g) => /* @__PURE__ */ e(K, { value: g, className: "text-xs", children: g === "auto" ? "Auto (Default)" : je(g) }, g)) })
|
|
6735
6735
|
]
|
|
6736
6736
|
}
|
|
6737
6737
|
)
|
|
@@ -6766,7 +6766,7 @@ function fs({ axis: t, label: n, type: s, config: l, onChange: i }) {
|
|
|
6766
6766
|
] })
|
|
6767
6767
|
] }),
|
|
6768
6768
|
s === "value" && /* @__PURE__ */ e(
|
|
6769
|
-
|
|
6769
|
+
jn,
|
|
6770
6770
|
{
|
|
6771
6771
|
formatOptions: (l == null ? void 0 : l.formatOptions) || {},
|
|
6772
6772
|
onFormatOptionsChange: (g) => i({
|
|
@@ -6923,7 +6923,7 @@ function Dl() {
|
|
|
6923
6923
|
onValueChange: (m) => o("position", m),
|
|
6924
6924
|
children: [
|
|
6925
6925
|
/* @__PURE__ */ e(X, { className: "h-8 text-xs", children: /* @__PURE__ */ e(Z, {}) }),
|
|
6926
|
-
/* @__PURE__ */ e(ee, { children: r.map((m) => /* @__PURE__ */ e(K, { value: m, className: "text-xs", children:
|
|
6926
|
+
/* @__PURE__ */ e(ee, { children: r.map((m) => /* @__PURE__ */ e(K, { value: m, className: "text-xs", children: je(m) }, m)) })
|
|
6927
6927
|
]
|
|
6928
6928
|
}
|
|
6929
6929
|
)
|
|
@@ -6937,7 +6937,7 @@ function Dl() {
|
|
|
6937
6937
|
onValueChange: (m) => o("align", m),
|
|
6938
6938
|
children: [
|
|
6939
6939
|
/* @__PURE__ */ e(X, { className: "h-8 text-xs", children: /* @__PURE__ */ e(Z, {}) }),
|
|
6940
|
-
/* @__PURE__ */ e(ee, { children: u.map((m) => /* @__PURE__ */ e(K, { value: m, className: "text-xs", children:
|
|
6940
|
+
/* @__PURE__ */ e(ee, { children: u.map((m) => /* @__PURE__ */ e(K, { value: m, className: "text-xs", children: je(m) }, m)) })
|
|
6941
6941
|
]
|
|
6942
6942
|
}
|
|
6943
6943
|
)
|
|
@@ -6948,27 +6948,27 @@ function Dl() {
|
|
|
6948
6948
|
}
|
|
6949
6949
|
function Ml() {
|
|
6950
6950
|
var T, R, A, z, J, U, B, G, Y, te, ae;
|
|
6951
|
-
const t = I((
|
|
6952
|
-
(
|
|
6951
|
+
const t = I(($) => $.card), n = I(
|
|
6952
|
+
($) => {
|
|
6953
6953
|
var ce, de;
|
|
6954
|
-
return (de = (ce =
|
|
6954
|
+
return (de = (ce = $.card) == null ? void 0 : ce.preferences) == null ? void 0 : de.dataLabelsConfig;
|
|
6955
6955
|
}
|
|
6956
|
-
), s = I((
|
|
6956
|
+
), s = I(($) => {
|
|
6957
6957
|
var ce;
|
|
6958
|
-
return (ce =
|
|
6958
|
+
return (ce = $.card) == null ? void 0 : ce.preferences;
|
|
6959
6959
|
}), { setCardPreferences: l, updateCardInFrame: i } = ne();
|
|
6960
6960
|
if (!t || !Ur(t.type))
|
|
6961
6961
|
return null;
|
|
6962
6962
|
const d = t.type === "bullet" ? ((T = s == null ? void 0 : s.bulletConfig) == null ? void 0 : T.orientation) ?? (((R = s == null ? void 0 : s.chartOptions) == null ? void 0 : R.indexAxis) === "x" ? "vertical" : "horizontal") : void 0, c = d != null ? d === "horizontal" : ((A = s == null ? void 0 : s.chartOptions) == null ? void 0 : A.indexAxis) === "y", o = t.type === "stackedBar" || t.type === "stackedLine", r = t.type === "pie" || t.type === "doughnut" || t.type === "polarArea" || t.type === "funnel", u = !r, m = t.type === "bubble" || t.type === "scatter", p = (J = (z = s == null ? void 0 : s.chartOptions) == null ? void 0 : z.plugins) == null ? void 0 : J.datalabels, f = (p == null ? void 0 : p.display) !== !1 && ((p == null ? void 0 : p.anchor) || (p == null ? void 0 : p.align)), b = _r(
|
|
6963
6963
|
t.type,
|
|
6964
6964
|
t.preferences
|
|
6965
|
-
), h = n ?? b, y = (b == null ? void 0 : b.enabled) ?? f ?? !1, N = (n == null ? void 0 : n.enabled) !== void 0 ? n.enabled : y, k = (
|
|
6965
|
+
), h = n ?? b, y = (b == null ? void 0 : b.enabled) ?? f ?? !1, N = (n == null ? void 0 : n.enabled) !== void 0 ? n.enabled : y, k = ($, ce) => {
|
|
6966
6966
|
const ie = {
|
|
6967
6967
|
...b ?? {},
|
|
6968
6968
|
...n ?? {},
|
|
6969
|
-
[
|
|
6969
|
+
[$]: ce
|
|
6970
6970
|
};
|
|
6971
|
-
|
|
6971
|
+
$ === "enabled" && (ie.display = ce, ce && m && !ie.position && (ie.position = "bottom")), $ === "position" && m && (ie.position = "bottom");
|
|
6972
6972
|
const se = {
|
|
6973
6973
|
...t.preferences || {},
|
|
6974
6974
|
dataLabelsConfig: ie
|
|
@@ -6979,13 +6979,13 @@ function Ml() {
|
|
|
6979
6979
|
preferences: se
|
|
6980
6980
|
};
|
|
6981
6981
|
i(we);
|
|
6982
|
-
}, D = (
|
|
6982
|
+
}, D = ($, ce) => {
|
|
6983
6983
|
const de = n ?? {}, ie = {
|
|
6984
6984
|
...b ?? {},
|
|
6985
6985
|
...de,
|
|
6986
6986
|
font: {
|
|
6987
6987
|
...de.font || {},
|
|
6988
|
-
[
|
|
6988
|
+
[$]: ce
|
|
6989
6989
|
}
|
|
6990
6990
|
}, se = {
|
|
6991
6991
|
...t.preferences || {},
|
|
@@ -6997,13 +6997,13 @@ function Ml() {
|
|
|
6997
6997
|
preferences: se
|
|
6998
6998
|
};
|
|
6999
6999
|
i(we);
|
|
7000
|
-
}, V = (
|
|
7000
|
+
}, V = ($, ce) => {
|
|
7001
7001
|
const de = n ?? {}, ie = {
|
|
7002
7002
|
...b ?? {},
|
|
7003
7003
|
...de,
|
|
7004
7004
|
formatOptions: {
|
|
7005
7005
|
...de.formatOptions || {},
|
|
7006
|
-
[
|
|
7006
|
+
[$]: ce
|
|
7007
7007
|
}
|
|
7008
7008
|
}, se = {
|
|
7009
7009
|
...t.preferences || {},
|
|
@@ -7016,8 +7016,8 @@ function Ml() {
|
|
|
7016
7016
|
};
|
|
7017
7017
|
i(we);
|
|
7018
7018
|
}, L = () => {
|
|
7019
|
-
const
|
|
7020
|
-
return
|
|
7019
|
+
const $ = t.type;
|
|
7020
|
+
return $ === "stackedBar" || $ === "stackedLine" || $ === "pie" || $ === "doughnut" ? "center" : c ? "right" : "top";
|
|
7021
7021
|
}, E = t.type !== "treemap" && t.type !== "heatmap", w = t.type !== "treemap", g = L();
|
|
7022
7022
|
let x = [];
|
|
7023
7023
|
if (E)
|
|
@@ -7026,10 +7026,10 @@ function Ml() {
|
|
|
7026
7026
|
else if (o || r)
|
|
7027
7027
|
x = ["center"];
|
|
7028
7028
|
else {
|
|
7029
|
-
const
|
|
7030
|
-
x = ["auto", ...t.type === "bullet" ?
|
|
7029
|
+
const $ = c ? ["center", "left", "right"] : ["center", "top", "bottom"];
|
|
7030
|
+
x = ["auto", ...t.type === "bullet" ? $ : $.filter((de) => de !== g), "custom"];
|
|
7031
7031
|
}
|
|
7032
|
-
const S = () =>
|
|
7032
|
+
const S = () => je(g), O = ["center", "start", "end"], C = ["center", "start", "end", "top", "bottom"], v = u ? ["auto", "number", "currency", "percent", "none"] : ["number", "currency", "percent", "none"], M = [
|
|
7033
7033
|
{ value: "USD", label: "USD - US Dollar" },
|
|
7034
7034
|
{ value: "EUR", label: "EUR - Euro" },
|
|
7035
7035
|
{ value: "GBP", label: "GBP - British Pound" },
|
|
@@ -7060,7 +7060,7 @@ function Ml() {
|
|
|
7060
7060
|
Oe,
|
|
7061
7061
|
{
|
|
7062
7062
|
checked: N,
|
|
7063
|
-
onCheckedChange: (
|
|
7063
|
+
onCheckedChange: ($) => k("enabled", $)
|
|
7064
7064
|
}
|
|
7065
7065
|
)
|
|
7066
7066
|
] }),
|
|
@@ -7071,10 +7071,10 @@ function Ml() {
|
|
|
7071
7071
|
W,
|
|
7072
7072
|
{
|
|
7073
7073
|
value: m ? (h == null ? void 0 : h.position) || "bottom" : (h == null ? void 0 : h.position) || "auto",
|
|
7074
|
-
onValueChange: (
|
|
7074
|
+
onValueChange: ($) => k("position", $),
|
|
7075
7075
|
children: [
|
|
7076
7076
|
/* @__PURE__ */ e(X, { className: "h-8 text-xs", children: /* @__PURE__ */ e(Z, {}) }),
|
|
7077
|
-
/* @__PURE__ */ e(ee, { children: x.map((
|
|
7077
|
+
/* @__PURE__ */ e(ee, { children: x.map(($) => /* @__PURE__ */ e(K, { value: $, className: "text-xs", children: $ === "auto" ? S() : $ === "custom" ? "Custom (Advanced)" : je($) }, $)) })
|
|
7078
7078
|
]
|
|
7079
7079
|
}
|
|
7080
7080
|
)
|
|
@@ -7085,7 +7085,7 @@ function Ml() {
|
|
|
7085
7085
|
Oe,
|
|
7086
7086
|
{
|
|
7087
7087
|
checked: (n == null ? void 0 : n.showTotal) ?? !1,
|
|
7088
|
-
onCheckedChange: (
|
|
7088
|
+
onCheckedChange: ($) => k("showTotal", $)
|
|
7089
7089
|
}
|
|
7090
7090
|
)
|
|
7091
7091
|
] }),
|
|
@@ -7096,10 +7096,10 @@ function Ml() {
|
|
|
7096
7096
|
W,
|
|
7097
7097
|
{
|
|
7098
7098
|
value: (h == null ? void 0 : h.anchor) || "center",
|
|
7099
|
-
onValueChange: (
|
|
7099
|
+
onValueChange: ($) => k("anchor", $),
|
|
7100
7100
|
children: [
|
|
7101
7101
|
/* @__PURE__ */ e(X, { className: "h-8 text-xs flex-1", children: /* @__PURE__ */ e(Z, {}) }),
|
|
7102
|
-
/* @__PURE__ */ e(ee, { children: O.map((
|
|
7102
|
+
/* @__PURE__ */ e(ee, { children: O.map(($) => /* @__PURE__ */ e(K, { value: $, className: "text-xs", children: je($) }, $)) })
|
|
7103
7103
|
]
|
|
7104
7104
|
}
|
|
7105
7105
|
)
|
|
@@ -7110,10 +7110,10 @@ function Ml() {
|
|
|
7110
7110
|
W,
|
|
7111
7111
|
{
|
|
7112
7112
|
value: String((h == null ? void 0 : h.align) || "center"),
|
|
7113
|
-
onValueChange: (
|
|
7113
|
+
onValueChange: ($) => k("align", $),
|
|
7114
7114
|
children: [
|
|
7115
7115
|
/* @__PURE__ */ e(X, { className: "h-8 text-xs flex-1", children: /* @__PURE__ */ e(Z, {}) }),
|
|
7116
|
-
/* @__PURE__ */ e(ee, { children: C.map((
|
|
7116
|
+
/* @__PURE__ */ e(ee, { children: C.map(($) => /* @__PURE__ */ e(K, { value: $, className: "text-xs", children: je($) }, $)) })
|
|
7117
7117
|
]
|
|
7118
7118
|
}
|
|
7119
7119
|
)
|
|
@@ -7125,10 +7125,10 @@ function Ml() {
|
|
|
7125
7125
|
W,
|
|
7126
7126
|
{
|
|
7127
7127
|
value: (h == null ? void 0 : h.format) || (u ? "auto" : "none"),
|
|
7128
|
-
onValueChange: (
|
|
7128
|
+
onValueChange: ($) => k("format", $),
|
|
7129
7129
|
children: [
|
|
7130
7130
|
/* @__PURE__ */ e(X, { className: "h-8 text-xs", children: /* @__PURE__ */ e(Z, {}) }),
|
|
7131
|
-
/* @__PURE__ */ e(ee, { children: v.map((
|
|
7131
|
+
/* @__PURE__ */ e(ee, { children: v.map(($) => /* @__PURE__ */ e(K, { value: $, className: "text-xs", children: $ === "auto" && u ? "Auto (Use Axis)" : $ === "none" ? "None (Raw Value)" : je($) }, $)) })
|
|
7132
7132
|
]
|
|
7133
7133
|
}
|
|
7134
7134
|
)
|
|
@@ -7146,7 +7146,7 @@ function Ml() {
|
|
|
7146
7146
|
value: String(
|
|
7147
7147
|
((U = h == null ? void 0 : h.formatOptions) == null ? void 0 : U.decimalPlaces) ?? (h.format === "currency" ? 2 : h.format === "percent" ? 1 : 0)
|
|
7148
7148
|
),
|
|
7149
|
-
onSave: (
|
|
7149
|
+
onSave: ($) => V("decimalPlaces", Number($)),
|
|
7150
7150
|
className: ""
|
|
7151
7151
|
}
|
|
7152
7152
|
) })
|
|
@@ -7157,10 +7157,10 @@ function Ml() {
|
|
|
7157
7157
|
W,
|
|
7158
7158
|
{
|
|
7159
7159
|
value: ((B = h == null ? void 0 : h.formatOptions) == null ? void 0 : B.currency) || "USD",
|
|
7160
|
-
onValueChange: (
|
|
7160
|
+
onValueChange: ($) => V("currency", $),
|
|
7161
7161
|
children: [
|
|
7162
7162
|
/* @__PURE__ */ e(X, { className: "h-8 text-xs flex-1", children: /* @__PURE__ */ e(Z, {}) }),
|
|
7163
|
-
/* @__PURE__ */ e(ee, { children: M.map((
|
|
7163
|
+
/* @__PURE__ */ e(ee, { children: M.map(($) => /* @__PURE__ */ e(K, { value: $.value, className: "text-xs", children: $.label }, $.value)) })
|
|
7164
7164
|
]
|
|
7165
7165
|
}
|
|
7166
7166
|
)
|
|
@@ -7173,7 +7173,7 @@ function Ml() {
|
|
|
7173
7173
|
Oe,
|
|
7174
7174
|
{
|
|
7175
7175
|
checked: ((G = h == null ? void 0 : h.formatOptions) == null ? void 0 : G.useSuffix) ?? !1,
|
|
7176
|
-
onCheckedChange: (
|
|
7176
|
+
onCheckedChange: ($) => V("useSuffix", $)
|
|
7177
7177
|
}
|
|
7178
7178
|
)
|
|
7179
7179
|
] }),
|
|
@@ -7183,10 +7183,10 @@ function Ml() {
|
|
|
7183
7183
|
W,
|
|
7184
7184
|
{
|
|
7185
7185
|
value: ((Y = h == null ? void 0 : h.formatOptions) == null ? void 0 : Y.locale) || "en-US",
|
|
7186
|
-
onValueChange: (
|
|
7186
|
+
onValueChange: ($) => V("locale", $),
|
|
7187
7187
|
children: [
|
|
7188
7188
|
/* @__PURE__ */ e(X, { className: "h-8 text-xs flex-1", children: /* @__PURE__ */ e(Z, {}) }),
|
|
7189
|
-
/* @__PURE__ */ e(ee, { children: F.map((
|
|
7189
|
+
/* @__PURE__ */ e(ee, { children: F.map(($) => /* @__PURE__ */ e(K, { value: $.value, className: "text-xs", children: $.label }, $.value)) })
|
|
7190
7190
|
]
|
|
7191
7191
|
}
|
|
7192
7192
|
)
|
|
@@ -7202,7 +7202,7 @@ function Ml() {
|
|
|
7202
7202
|
type: "number",
|
|
7203
7203
|
placeholder: "12",
|
|
7204
7204
|
value: String(((te = h == null ? void 0 : h.font) == null ? void 0 : te.size) || 12),
|
|
7205
|
-
onSave: (
|
|
7205
|
+
onSave: ($) => D("size", Number($)),
|
|
7206
7206
|
className: ""
|
|
7207
7207
|
}
|
|
7208
7208
|
) })
|
|
@@ -7213,7 +7213,7 @@ function Ml() {
|
|
|
7213
7213
|
W,
|
|
7214
7214
|
{
|
|
7215
7215
|
value: ((ae = h == null ? void 0 : h.font) == null ? void 0 : ae.weight) || "normal",
|
|
7216
|
-
onValueChange: (
|
|
7216
|
+
onValueChange: ($) => D("weight", $),
|
|
7217
7217
|
children: [
|
|
7218
7218
|
/* @__PURE__ */ e(X, { className: "h-8 text-xs flex-1", children: /* @__PURE__ */ e(Z, {}) }),
|
|
7219
7219
|
/* @__PURE__ */ a(ee, { children: [
|
|
@@ -7230,8 +7230,8 @@ function Ml() {
|
|
|
7230
7230
|
W,
|
|
7231
7231
|
{
|
|
7232
7232
|
value: (h == null ? void 0 : h.color) === "auto" || !(h != null && h.color) ? "auto" : "custom",
|
|
7233
|
-
onValueChange: (
|
|
7234
|
-
|
|
7233
|
+
onValueChange: ($) => {
|
|
7234
|
+
$ === "auto" && k("color", "auto");
|
|
7235
7235
|
},
|
|
7236
7236
|
children: [
|
|
7237
7237
|
/* @__PURE__ */ e(X, { className: "h-8 text-xs flex-1", children: /* @__PURE__ */ e(Z, {}) }),
|
|
@@ -7251,7 +7251,7 @@ function Ml() {
|
|
|
7251
7251
|
type: "number",
|
|
7252
7252
|
placeholder: "0",
|
|
7253
7253
|
value: String((h == null ? void 0 : h.rotation) || 0),
|
|
7254
|
-
onSave: (
|
|
7254
|
+
onSave: ($) => k("rotation", Number($)),
|
|
7255
7255
|
className: ""
|
|
7256
7256
|
}
|
|
7257
7257
|
) }),
|
|
@@ -7269,7 +7269,7 @@ function Ve({
|
|
|
7269
7269
|
placeholder: l,
|
|
7270
7270
|
className: i
|
|
7271
7271
|
}) {
|
|
7272
|
-
const [d, c] =
|
|
7272
|
+
const [d, c] = j(t), o = Qe(!1);
|
|
7273
7273
|
return fe(() => {
|
|
7274
7274
|
c(t);
|
|
7275
7275
|
}, [t]), /* @__PURE__ */ e(
|
|
@@ -7308,11 +7308,11 @@ function Il() {
|
|
|
7308
7308
|
const t = I((T) => T.card.preferences), n = I((T) => T.card), s = I((T) => T.isDevMode), { setCardPreferences: l, setChartOrientation: i } = ne(), d = Ne(
|
|
7309
7309
|
() => (t == null ? void 0 : t.bulletConfig) || {},
|
|
7310
7310
|
[t == null ? void 0 : t.bulletConfig]
|
|
7311
|
-
), o = Ma(n == null ? void 0 : n.config) && !s, [r, u] =
|
|
7311
|
+
), o = Ma(n == null ? void 0 : n.config) && !s, [r, u] = j(
|
|
7312
7312
|
d.showRanges ?? !1
|
|
7313
|
-
), [m, p] =
|
|
7313
|
+
), [m, p] = j(
|
|
7314
7314
|
d.rangesArePercentages ?? !1
|
|
7315
|
-
), f = d.disableAutoComparative ? !1 : d.comparativeMetricKey !== void 0 || !o, [b, h] =
|
|
7315
|
+
), f = d.disableAutoComparative ? !1 : d.comparativeMetricKey !== void 0 || !o, [b, h] = j(
|
|
7316
7316
|
f
|
|
7317
7317
|
);
|
|
7318
7318
|
fe(() => {
|
|
@@ -7700,7 +7700,7 @@ function sa({
|
|
|
7700
7700
|
onChange: n,
|
|
7701
7701
|
label: s
|
|
7702
7702
|
}) {
|
|
7703
|
-
const [l, i] =
|
|
7703
|
+
const [l, i] = j(!1), [d, c] = j(!1), o = () => {
|
|
7704
7704
|
const r = bs.find((u) => u.value === t);
|
|
7705
7705
|
return r ? r.color : t.startsWith("#") ? t : bs[2].color;
|
|
7706
7706
|
};
|
|
@@ -7908,7 +7908,7 @@ function Rl() {
|
|
|
7908
7908
|
const U = J.label || J.name || J.alias || "";
|
|
7909
7909
|
return { value: U, label: U };
|
|
7910
7910
|
})) || [];
|
|
7911
|
-
}, [(w = n == null ? void 0 : n.config) == null ? void 0 : w.groupByColumns]), b = Ne(() => r.enableGrouping !== void 0 ? r.enableGrouping : !l && f.length >= 2, [r.enableGrouping, l, f.length]), [h, y] =
|
|
7911
|
+
}, [(w = n == null ? void 0 : n.config) == null ? void 0 : w.groupByColumns]), b = Ne(() => r.enableGrouping !== void 0 ? r.enableGrouping : !l && f.length >= 2, [r.enableGrouping, l, f.length]), [h, y] = j(b);
|
|
7912
7912
|
fe(() => {
|
|
7913
7913
|
y(b);
|
|
7914
7914
|
}, [b]);
|
|
@@ -8538,7 +8538,7 @@ function Lc(t) {
|
|
|
8538
8538
|
as(
|
|
8539
8539
|
(_) => _.currentAIContext
|
|
8540
8540
|
);
|
|
8541
|
-
const [n, s] =
|
|
8541
|
+
const [n, s] = j(""), [l, i] = j(null), { authToken: d, tokenProps: c } = ma(), o = I((_) => {
|
|
8542
8542
|
var ge;
|
|
8543
8543
|
return (ge = _ == null ? void 0 : _.card) == null ? void 0 : ge.sql;
|
|
8544
8544
|
}), r = I((_) => _.isDevMode), u = I((_) => {
|
|
@@ -8571,7 +8571,7 @@ function Lc(t) {
|
|
|
8571
8571
|
status: Y,
|
|
8572
8572
|
addToolResult: te,
|
|
8573
8573
|
stop: ae,
|
|
8574
|
-
clearError:
|
|
8574
|
+
clearError: $
|
|
8575
8575
|
} = Qr({
|
|
8576
8576
|
transport: new Yr({
|
|
8577
8577
|
api: `${c.apiServiceUrl}/v1/assistant`,
|
|
@@ -8609,8 +8609,8 @@ function Lc(t) {
|
|
|
8609
8609
|
console.error("[Editor Assistant] Stream error:", _);
|
|
8610
8610
|
},
|
|
8611
8611
|
onToolCall: ce,
|
|
8612
|
-
onFinish({ isAbort: _, isDisconnect: ge, isError:
|
|
8613
|
-
s(""), console.log(_ ? "[Editor Assistant] Stream aborted by user" : ge ? "[Editor Assistant] Stream disconnected (network error)" :
|
|
8612
|
+
onFinish({ isAbort: _, isDisconnect: ge, isError: $e }) {
|
|
8613
|
+
s(""), console.log(_ ? "[Editor Assistant] Stream aborted by user" : ge ? "[Editor Assistant] Stream disconnected (network error)" : $e ? "[Editor Assistant] Stream error occurred" : "[Editor Assistant] Stream completed successfully");
|
|
8614
8614
|
}
|
|
8615
8615
|
});
|
|
8616
8616
|
fe(() => {
|
|
@@ -8620,9 +8620,9 @@ function Lc(t) {
|
|
|
8620
8620
|
}), C(!1));
|
|
8621
8621
|
}, [k, N, G, C]);
|
|
8622
8622
|
async function ce({ toolCall: _ }) {
|
|
8623
|
-
var ge,
|
|
8623
|
+
var ge, $e, We, Lt, Xe, pt, Ze, ft, Pt, rt, Vt, Bt, zt, $t, gt, xt;
|
|
8624
8624
|
if (["createChartFromSql", "createForecast"].includes(_.toolName)) {
|
|
8625
|
-
const le = ((ge = _.input) == null ? void 0 : ge.sql) ?? ((
|
|
8625
|
+
const le = ((ge = _.input) == null ? void 0 : ge.sql) ?? (($e = _.args) == null ? void 0 : $e.sql), Ce = ((We = _.input) == null ? void 0 : We.python) ?? ((Lt = _.args) == null ? void 0 : Lt.python), Se = ((Xe = _.input) == null ? void 0 : Xe.chartType) ?? ((pt = _.args) == null ? void 0 : pt.chartType);
|
|
8626
8626
|
b(Se), p(le), m(Ce), f(!0), te({
|
|
8627
8627
|
tool: _.toolName,
|
|
8628
8628
|
toolCallId: _.toolCallId,
|
|
@@ -8664,7 +8664,7 @@ function Lc(t) {
|
|
|
8664
8664
|
output: {
|
|
8665
8665
|
status: "error",
|
|
8666
8666
|
queryConfig: Ce,
|
|
8667
|
-
message: (
|
|
8667
|
+
message: ($t = Se == null ? void 0 : Se.data) == null ? void 0 : $t.error.message
|
|
8668
8668
|
}
|
|
8669
8669
|
});
|
|
8670
8670
|
return;
|
|
@@ -8700,8 +8700,8 @@ function Lc(t) {
|
|
|
8700
8700
|
}
|
|
8701
8701
|
function xe(_) {
|
|
8702
8702
|
const ge = ti(_);
|
|
8703
|
-
v(ge), J((
|
|
8704
|
-
|
|
8703
|
+
v(ge), J(($e) => [
|
|
8704
|
+
...$e,
|
|
8705
8705
|
{
|
|
8706
8706
|
id: crypto.randomUUID(),
|
|
8707
8707
|
role: "system",
|
|
@@ -8742,14 +8742,14 @@ function Lc(t) {
|
|
|
8742
8742
|
[...g || [], ...y],
|
|
8743
8743
|
_
|
|
8744
8744
|
) || y.length === 0) {
|
|
8745
|
-
const
|
|
8745
|
+
const $e = ss([
|
|
8746
8746
|
...g || [],
|
|
8747
8747
|
...y,
|
|
8748
8748
|
_
|
|
8749
8749
|
]).filter(
|
|
8750
8750
|
(We) => We.connectionId === _.connectionId
|
|
8751
8751
|
);
|
|
8752
|
-
xe(
|
|
8752
|
+
xe($e);
|
|
8753
8753
|
}
|
|
8754
8754
|
}
|
|
8755
8755
|
const we = !["ready", "error"].includes(Y), lt = Xr(B);
|
|
@@ -8770,7 +8770,7 @@ function Lc(t) {
|
|
|
8770
8770
|
llmUsage: l,
|
|
8771
8771
|
onFinish: t,
|
|
8772
8772
|
errorMessage: lt,
|
|
8773
|
-
clearError:
|
|
8773
|
+
clearError: $
|
|
8774
8774
|
};
|
|
8775
8775
|
}
|
|
8776
8776
|
const Pc = [
|
|
@@ -8788,7 +8788,7 @@ function ys({
|
|
|
8788
8788
|
onFullscreenChange: n,
|
|
8789
8789
|
fullscreenContainer: s
|
|
8790
8790
|
}) {
|
|
8791
|
-
const l = Qe(null), [i, d] =
|
|
8791
|
+
const l = Qe(null), [i, d] = j(!1), [c, o] = j(el), [r, u] = j(!1), [m, p] = j(!1), [f, b] = j(!1), h = t ?? f, y = ai(), { setCurrentAIContext: N } = tl(), { clearQueue: k } = ni(), { clearFileAttachments: D } = si(), V = li("editor"), L = ke((le) => le.dashboard.aiContext), E = I((le) => le.card.dataSource), w = I((le) => le.actions.setCardSql), g = I((le) => le.actions.setRunSql), x = I((le) => le.showAIDialog), S = ke(
|
|
8792
8792
|
(le) => le.handleOpenAssistantProfile
|
|
8793
8793
|
), { setShowAIDialog: O, setCardPython: C } = ne(), { setDataSource: v } = ne(), { assistantProfile: M } = ri(), {
|
|
8794
8794
|
messages: F,
|
|
@@ -8800,9 +8800,9 @@ function ys({
|
|
|
8800
8800
|
llmUsage: U,
|
|
8801
8801
|
errorMessage: B,
|
|
8802
8802
|
clearError: G
|
|
8803
|
-
} = Lc(), [Y, te] =
|
|
8803
|
+
} = Lc(), [Y, te] = j(""), ae = (le) => {
|
|
8804
8804
|
te(le.target.value);
|
|
8805
|
-
},
|
|
8805
|
+
}, $ = (le) => {
|
|
8806
8806
|
le.preventDefault();
|
|
8807
8807
|
const Ce = Y.trim();
|
|
8808
8808
|
if (!Ce && V.length === 0) return;
|
|
@@ -8835,7 +8835,7 @@ function ys({
|
|
|
8835
8835
|
hasNewMessages: Ft,
|
|
8836
8836
|
newMessageCount: _,
|
|
8837
8837
|
scrollToBottom: ge,
|
|
8838
|
-
handleScroll:
|
|
8838
|
+
handleScroll: $e,
|
|
8839
8839
|
resetNewMessageCount: We
|
|
8840
8840
|
} = oi(ce, {
|
|
8841
8841
|
threshold: 50,
|
|
@@ -8927,7 +8927,7 @@ function ys({
|
|
|
8927
8927
|
) }),
|
|
8928
8928
|
/* @__PURE__ */ a(On, { align: "end", children: [
|
|
8929
8929
|
/* @__PURE__ */ e(Hs, { children: "Options" }),
|
|
8930
|
-
/* @__PURE__ */ e(
|
|
8930
|
+
/* @__PURE__ */ e(jt, {}),
|
|
8931
8931
|
/* @__PURE__ */ e(
|
|
8932
8932
|
yt,
|
|
8933
8933
|
{
|
|
@@ -8955,7 +8955,7 @@ function ys({
|
|
|
8955
8955
|
] })
|
|
8956
8956
|
] });
|
|
8957
8957
|
}
|
|
8958
|
-
function
|
|
8958
|
+
function $t() {
|
|
8959
8959
|
return /* @__PURE__ */ e("div", { "data-role": "header", children: /* @__PURE__ */ e("div", { className: "text-lg font-semibold", children: "Assistant" }) });
|
|
8960
8960
|
}
|
|
8961
8961
|
const gt = (Y == null ? void 0 : Y.length) === 0 && (F == null ? void 0 : F.filter((le) => le.role === "user").length) === 0, xt = /* @__PURE__ */ a(
|
|
@@ -8973,7 +8973,7 @@ function ys({
|
|
|
8973
8973
|
"data-role": "header-section",
|
|
8974
8974
|
className: "flex items-start justify-between gap-2",
|
|
8975
8975
|
children: [
|
|
8976
|
-
|
|
8976
|
+
$t(),
|
|
8977
8977
|
S && /* @__PURE__ */ e(
|
|
8978
8978
|
q,
|
|
8979
8979
|
{
|
|
@@ -9037,7 +9037,7 @@ function ys({
|
|
|
9037
9037
|
{
|
|
9038
9038
|
ref: we,
|
|
9039
9039
|
className: "mt-2 flex w-full grow basis-0",
|
|
9040
|
-
onScroll:
|
|
9040
|
+
onScroll: $e,
|
|
9041
9041
|
children: /* @__PURE__ */ a("div", { className: "space-y-4 py-2 pr-3", "data-role": "messages", children: [
|
|
9042
9042
|
de && /* @__PURE__ */ e("div", { className: "flex justify-center py-2", children: /* @__PURE__ */ a(
|
|
9043
9043
|
q,
|
|
@@ -9115,7 +9115,7 @@ function ys({
|
|
|
9115
9115
|
input: Y,
|
|
9116
9116
|
handleInputChange: ae,
|
|
9117
9117
|
handleSubmit: (le) => {
|
|
9118
|
-
rt(),
|
|
9118
|
+
rt(), $(le), ge({ force: !0 });
|
|
9119
9119
|
},
|
|
9120
9120
|
isLoading: A,
|
|
9121
9121
|
status: J,
|
|
@@ -9203,7 +9203,7 @@ function zc({
|
|
|
9203
9203
|
onChartChange: n
|
|
9204
9204
|
}) {
|
|
9205
9205
|
var E;
|
|
9206
|
-
const [s, l] =
|
|
9206
|
+
const [s, l] = j(!1), { data: i } = vl();
|
|
9207
9207
|
Bc();
|
|
9208
9208
|
const c = ((E = I((w) => w.card).customCardPreferences) == null ? void 0 : E.url) || "";
|
|
9209
9209
|
Zi(c);
|
|
@@ -9262,7 +9262,7 @@ function zc({
|
|
|
9262
9262
|
if (t === "custom") {
|
|
9263
9263
|
const S = I.getState().card, O = (g = S == null ? void 0 : S.customCardPreferences) == null ? void 0 : g.icon, C = (x = S == null ? void 0 : S.customCardPreferences) == null ? void 0 : x.componentName;
|
|
9264
9264
|
if (O && C)
|
|
9265
|
-
return /* @__PURE__ */ e(
|
|
9265
|
+
return /* @__PURE__ */ e($c, { icon: O, componentName: C });
|
|
9266
9266
|
if (C) {
|
|
9267
9267
|
const v = Fn(C);
|
|
9268
9268
|
if (v)
|
|
@@ -9415,13 +9415,13 @@ function zc({
|
|
|
9415
9415
|
] }) })
|
|
9416
9416
|
] }) });
|
|
9417
9417
|
}
|
|
9418
|
-
const
|
|
9418
|
+
const $c = ({
|
|
9419
9419
|
icon: t,
|
|
9420
9420
|
componentName: n
|
|
9421
9421
|
}) => {
|
|
9422
9422
|
const s = Ga(), l = Fn(n);
|
|
9423
9423
|
return s ? /* @__PURE__ */ e(s, { className: "h-4 w-4" }) : l || /* @__PURE__ */ e(Qt, { className: "h-4 w-4" });
|
|
9424
|
-
},
|
|
9424
|
+
}, jc = [
|
|
9425
9425
|
{ id: "table", icon: Wt, label: "Table" },
|
|
9426
9426
|
{ id: "bar", icon: Ba, label: "Bar Chart" },
|
|
9427
9427
|
{ id: "line", icon: Va, label: "Line Chart" },
|
|
@@ -9448,7 +9448,7 @@ function Kc({
|
|
|
9448
9448
|
onToggleDropdown: l
|
|
9449
9449
|
}) {
|
|
9450
9450
|
var o;
|
|
9451
|
-
const i = I((r) => r.card), d = ((o = i == null ? void 0 : i.config) == null ? void 0 : o.pivotByColumns) && i.config.pivotByColumns.length > 0, c =
|
|
9451
|
+
const i = I((r) => r.card), d = ((o = i == null ? void 0 : i.config) == null ? void 0 : o.pivotByColumns) && i.config.pivotByColumns.length > 0, c = jc.filter(
|
|
9452
9452
|
(r) => !(r.requiresPivot && !d)
|
|
9453
9453
|
);
|
|
9454
9454
|
return /* @__PURE__ */ a("div", { className: "grid grid-cols-7 gap-2", children: [
|
|
@@ -9649,7 +9649,7 @@ function Uc({
|
|
|
9649
9649
|
onAliasTemplateChange: n
|
|
9650
9650
|
}) {
|
|
9651
9651
|
var r;
|
|
9652
|
-
const [s, l] =
|
|
9652
|
+
const [s, l] = j(t), [i, d] = j(!1), c = (r = I((u) => {
|
|
9653
9653
|
var m;
|
|
9654
9654
|
return (m = u.card.config) == null ? void 0 : m.pivotByColumns;
|
|
9655
9655
|
})) == null ? void 0 : r[0], o = c ? `e.g. Min Sales in {{${c.name}}}` : "e.g. Min Sales in {{region}}";
|
|
@@ -9708,7 +9708,7 @@ function _c({
|
|
|
9708
9708
|
valueAliases: t,
|
|
9709
9709
|
onValueAliasesChange: n
|
|
9710
9710
|
}) {
|
|
9711
|
-
const [s, l] =
|
|
9711
|
+
const [s, l] = j(null), [i, d] = j(""), [c, o] = j(""), r = () => {
|
|
9712
9712
|
n({ ...t, "": "" });
|
|
9713
9713
|
}, u = (p) => {
|
|
9714
9714
|
const f = { ...t };
|
|
@@ -9945,7 +9945,7 @@ function Ll({
|
|
|
9945
9945
|
onSave: d
|
|
9946
9946
|
}) {
|
|
9947
9947
|
var V, L;
|
|
9948
|
-
const c = !!i, [o, r] =
|
|
9948
|
+
const c = !!i, [o, r] = j(c ? "values" : "fields"), [u, m] = j(""), [p, f] = j({
|
|
9949
9949
|
id: (i == null ? void 0 : i.id) || na(),
|
|
9950
9950
|
field: (i == null ? void 0 : i.field) || null,
|
|
9951
9951
|
selectedValues: i ? Array.isArray(i.value) ? i.value : [i.value] : []
|
|
@@ -10111,7 +10111,7 @@ function Qc({
|
|
|
10111
10111
|
onValuesChange: s,
|
|
10112
10112
|
onBack: l
|
|
10113
10113
|
}) {
|
|
10114
|
-
const [i, d] =
|
|
10114
|
+
const [i, d] = j(""), {
|
|
10115
10115
|
values: c,
|
|
10116
10116
|
isLoading: o,
|
|
10117
10117
|
isFetching: r
|
|
@@ -10175,7 +10175,7 @@ function Qc({
|
|
|
10175
10175
|
onCheckedChange: () => m(f.value)
|
|
10176
10176
|
}
|
|
10177
10177
|
),
|
|
10178
|
-
/* @__PURE__ */ e(
|
|
10178
|
+
/* @__PURE__ */ e($n, { className: "text-sm", children: f.label })
|
|
10179
10179
|
]
|
|
10180
10180
|
},
|
|
10181
10181
|
f.id
|
|
@@ -10191,10 +10191,10 @@ function Pl({
|
|
|
10191
10191
|
onSave: i,
|
|
10192
10192
|
cardId: d
|
|
10193
10193
|
}) {
|
|
10194
|
-
const [c, o] =
|
|
10194
|
+
const [c, o] = j(""), [r, u] = j("ratio"), [m, p] = j(null), [f, b] = j(null), [h, y] = j(1), [N, k] = j(""), [D, V] = j({
|
|
10195
10195
|
format: "number",
|
|
10196
10196
|
decimalPlaces: 2
|
|
10197
|
-
}), [L, E] =
|
|
10197
|
+
}), [L, E] = j({}), w = Ea.find((v) => v.id === r), g = s.find((v) => v.id === m), x = s.find((v) => v.id === f);
|
|
10198
10198
|
fe(() => {
|
|
10199
10199
|
if (l && t)
|
|
10200
10200
|
if (o(l.label), l.calculatedFormula)
|
|
@@ -10442,7 +10442,7 @@ function Yc({
|
|
|
10442
10442
|
transform: m,
|
|
10443
10443
|
transition: p,
|
|
10444
10444
|
isDragging: f
|
|
10445
|
-
} =
|
|
10445
|
+
} = $a({ id: t.id }), b = I((H) => H.card), {
|
|
10446
10446
|
updateLabel: h,
|
|
10447
10447
|
handleAggregationChange: y,
|
|
10448
10448
|
handleDateFormatChange: N,
|
|
@@ -10455,15 +10455,15 @@ function Yc({
|
|
|
10455
10455
|
handleKpiTrendlineWindowChange: g,
|
|
10456
10456
|
handleKpiTrendlineGranularityChange: x,
|
|
10457
10457
|
handleKpiTargetValueChange: S
|
|
10458
|
-
} = ll(b), [O, C] =
|
|
10458
|
+
} = ll(b), [O, C] = j(!1), [v, M] = j(!1), [F, T] = j(!1), [R, A] = j(null), [z, J] = j(
|
|
10459
10459
|
t.dateFormat || "YYYY-MM-DD"
|
|
10460
|
-
), [U, B] =
|
|
10460
|
+
), [U, B] = j(t.customFormat || ""), [G, Y] = j(!!t.customFormat), [te, ae] = j(
|
|
10461
10461
|
t.granularity || "day"
|
|
10462
|
-
), [
|
|
10462
|
+
), [$, ce] = j(
|
|
10463
10463
|
t.aliasTemplate || ""
|
|
10464
|
-
), [de, xe] =
|
|
10464
|
+
), [de, xe] = j(
|
|
10465
10465
|
t.valueAliases || {}
|
|
10466
|
-
), [ie, se] =
|
|
10466
|
+
), [ie, se] = j((Gn = t.parameters) == null ? void 0 : Gn.filters), we = (H) => {
|
|
10467
10467
|
H === "custom" ? Y(!0) : (Y(!1), J(H), n === "groupBy" && N(s, H, ""));
|
|
10468
10468
|
}, lt = (H) => {
|
|
10469
10469
|
B(H), n === "groupBy" && N(s, "custom", H);
|
|
@@ -10476,7 +10476,7 @@ function Yc({
|
|
|
10476
10476
|
ce(H), n === "metrics" && D(s, H);
|
|
10477
10477
|
}, ge = (H) => {
|
|
10478
10478
|
xe(H), n === "metrics" && V(s, H);
|
|
10479
|
-
},
|
|
10479
|
+
}, $e = (H) => {
|
|
10480
10480
|
h(n, s, H);
|
|
10481
10481
|
}, We = (H) => {
|
|
10482
10482
|
var ye;
|
|
@@ -10496,9 +10496,9 @@ function Yc({
|
|
|
10496
10496
|
}, Lt = () => {
|
|
10497
10497
|
L(n, s);
|
|
10498
10498
|
}, Xe = {
|
|
10499
|
-
transform:
|
|
10499
|
+
transform: ja.Transform.toString(m),
|
|
10500
10500
|
transition: p
|
|
10501
|
-
}, pt = Me(t.dataType), Ze = pt === "date", ft = c === "kpi", Pt = rs(te), rt = n !== "pivotBy", Vt = Ze && n === "groupBy" && (!ft || ((Un = b.config) == null ? void 0 : Un.comparisonType) === "start_vs_end"), Bt = !ft && Ze && n === "groupBy", zt = c && Di.includes(c) && Ze && n === "groupBy",
|
|
10501
|
+
}, pt = Me(t.dataType), Ze = pt === "date", ft = c === "kpi", Pt = rs(te), rt = n !== "pivotBy", Vt = Ze && n === "groupBy" && (!ft || ((Un = b.config) == null ? void 0 : Un.comparisonType) === "start_vs_end"), Bt = !ft && Ze && n === "groupBy", zt = c && Di.includes(c) && Ze && n === "groupBy", $t = c === "kpi" && Ze && n === "groupBy", gt = c && c !== "pivotTable" && n === "metrics" && ((_n = b.config) == null ? void 0 : _n.comparisonType) === "target", xt = n === "metrics", le = () => {
|
|
10502
10502
|
const H = t, ye = n === "metrics" && Aa(H);
|
|
10503
10503
|
return /* @__PURE__ */ a("div", { className: "space-y-1", children: [
|
|
10504
10504
|
!ye && /* @__PURE__ */ e(
|
|
@@ -10533,7 +10533,7 @@ function Yc({
|
|
|
10533
10533
|
at,
|
|
10534
10534
|
{
|
|
10535
10535
|
value: t.label ?? "",
|
|
10536
|
-
onSave:
|
|
10536
|
+
onSave: $e,
|
|
10537
10537
|
placeholder: "Display label...",
|
|
10538
10538
|
type: "text"
|
|
10539
10539
|
}
|
|
@@ -10592,7 +10592,7 @@ function Yc({
|
|
|
10592
10592
|
] })
|
|
10593
10593
|
] }) : null, Bl = () => {
|
|
10594
10594
|
var oe, Fe, vt, ea, it;
|
|
10595
|
-
const H = zt, ye =
|
|
10595
|
+
const H = zt, ye = $t;
|
|
10596
10596
|
return !H && !ye ? null : /* @__PURE__ */ a(re, { children: [
|
|
10597
10597
|
H && /* @__PURE__ */ a("div", { className: "space-y-1", children: [
|
|
10598
10598
|
/* @__PURE__ */ e(P, { className: "text-xs font-medium text-muted-foreground", children: "Comparison Type" }),
|
|
@@ -10680,7 +10680,7 @@ function Yc({
|
|
|
10680
10680
|
}
|
|
10681
10681
|
)
|
|
10682
10682
|
] }) : null;
|
|
10683
|
-
},
|
|
10683
|
+
}, $l = () => {
|
|
10684
10684
|
if (!xt) return null;
|
|
10685
10685
|
const ye = Aa(t);
|
|
10686
10686
|
return /* @__PURE__ */ a(re, { children: [
|
|
@@ -10820,7 +10820,7 @@ function Yc({
|
|
|
10820
10820
|
/* @__PURE__ */ e(
|
|
10821
10821
|
Uc,
|
|
10822
10822
|
{
|
|
10823
|
-
aliasTemplate:
|
|
10823
|
+
aliasTemplate: $,
|
|
10824
10824
|
onAliasTemplateChange: _
|
|
10825
10825
|
}
|
|
10826
10826
|
),
|
|
@@ -10833,7 +10833,7 @@ function Yc({
|
|
|
10833
10833
|
)
|
|
10834
10834
|
] })
|
|
10835
10835
|
] });
|
|
10836
|
-
}, { columns:
|
|
10836
|
+
}, { columns: jl = [] } = ca(), Kl = (ie == null ? void 0 : ie.conditions) && ie.conditions.length > 0;
|
|
10837
10837
|
return /* @__PURE__ */ a(re, { children: [
|
|
10838
10838
|
/* @__PURE__ */ a(
|
|
10839
10839
|
"div",
|
|
@@ -10847,7 +10847,7 @@ function Yc({
|
|
|
10847
10847
|
/* @__PURE__ */ a("div", { className: "flex grow items-center gap-2", children: [
|
|
10848
10848
|
/* @__PURE__ */ e(Kn, { dataType: pt }),
|
|
10849
10849
|
/* @__PURE__ */ e(
|
|
10850
|
-
|
|
10850
|
+
$n,
|
|
10851
10851
|
{
|
|
10852
10852
|
className: Q(
|
|
10853
10853
|
"w-[140px] flex-1 text-sm",
|
|
@@ -10925,7 +10925,7 @@ function Yc({
|
|
|
10925
10925
|
bt(),
|
|
10926
10926
|
Bl(),
|
|
10927
10927
|
zl(),
|
|
10928
|
-
|
|
10928
|
+
$l()
|
|
10929
10929
|
] })
|
|
10930
10930
|
]
|
|
10931
10931
|
}
|
|
@@ -10937,7 +10937,7 @@ function Yc({
|
|
|
10937
10937
|
onOpenChange: (H) => {
|
|
10938
10938
|
M(H), H || A(null);
|
|
10939
10939
|
},
|
|
10940
|
-
availableFields:
|
|
10940
|
+
availableFields: jl,
|
|
10941
10941
|
existingFilters: ie,
|
|
10942
10942
|
editingCondition: R,
|
|
10943
10943
|
onSave: (H) => {
|
|
@@ -11270,7 +11270,7 @@ function Xc() {
|
|
|
11270
11270
|
)
|
|
11271
11271
|
] }),
|
|
11272
11272
|
/* @__PURE__ */ e(
|
|
11273
|
-
|
|
11273
|
+
jn,
|
|
11274
11274
|
{
|
|
11275
11275
|
formatOptions: o.formatOptions || {},
|
|
11276
11276
|
onFormatOptionsChange: (g) => r({ formatOptions: g }),
|
|
@@ -11531,7 +11531,7 @@ function Zc() {
|
|
|
11531
11531
|
/* @__PURE__ */ e("span", { children: "Number Format" })
|
|
11532
11532
|
] }) }),
|
|
11533
11533
|
/* @__PURE__ */ e(he, { className: "space-y-4 pb-4 pt-2", children: /* @__PURE__ */ e(
|
|
11534
|
-
|
|
11534
|
+
jn,
|
|
11535
11535
|
{
|
|
11536
11536
|
formatOptions: s,
|
|
11537
11537
|
onFormatOptionsChange: (c) => {
|
|
@@ -11623,7 +11623,7 @@ function td({
|
|
|
11623
11623
|
sortByFields: l,
|
|
11624
11624
|
activeField: i
|
|
11625
11625
|
}) {
|
|
11626
|
-
const [d, c] =
|
|
11626
|
+
const [d, c] = j(!1), o = I(
|
|
11627
11627
|
(V) => {
|
|
11628
11628
|
var L;
|
|
11629
11629
|
return ((L = V.card.customCardPreferences) == null ? void 0 : L.url) && V.card.type === "custom";
|
|
@@ -11887,7 +11887,7 @@ function nd({
|
|
|
11887
11887
|
activeField: c
|
|
11888
11888
|
}) {
|
|
11889
11889
|
var g, x;
|
|
11890
|
-
const [o, r] =
|
|
11890
|
+
const [o, r] = j(() => ks.getItem("chart-selector-expanded") === "true"), [u, m] = j(!1), p = I((S) => S.card), f = I(
|
|
11891
11891
|
(S) => S.actions.updateCardConfig
|
|
11892
11892
|
), b = s.length > 0 || l.length > 0 || i.length > 0, { data: h, autoJoinMetadata: y } = De(p), N = ((g = p == null ? void 0 : p.config) == null ? void 0 : g.joinPlan) || (y != null && y.autoResolved ? y.resolvedJoinPlan : {
|
|
11893
11893
|
baseEntity: {
|
|
@@ -12016,7 +12016,7 @@ function sd({
|
|
|
12016
12016
|
initialFilters: t,
|
|
12017
12017
|
availableFields: n
|
|
12018
12018
|
} = {}) {
|
|
12019
|
-
const [s, l] =
|
|
12019
|
+
const [s, l] = j(
|
|
12020
12020
|
t || {
|
|
12021
12021
|
id: `group-${Date.now()}`,
|
|
12022
12022
|
logicalOperator: "AND",
|
|
@@ -12632,7 +12632,7 @@ const ud = [
|
|
|
12632
12632
|
"not between": "Not Between"
|
|
12633
12633
|
};
|
|
12634
12634
|
function As(t) {
|
|
12635
|
-
return gd[t] ||
|
|
12635
|
+
return gd[t] || je(t);
|
|
12636
12636
|
}
|
|
12637
12637
|
function xd(t) {
|
|
12638
12638
|
switch (t) {
|
|
@@ -12666,10 +12666,10 @@ function Vl({
|
|
|
12666
12666
|
transform: f,
|
|
12667
12667
|
transition: b,
|
|
12668
12668
|
isDragging: h
|
|
12669
|
-
} =
|
|
12669
|
+
} = $a({ id: t.id }), { isPending: y, error: N } = qn(
|
|
12670
12670
|
t.field
|
|
12671
12671
|
), k = {
|
|
12672
|
-
transform:
|
|
12672
|
+
transform: ja.Transform.toString(f),
|
|
12673
12673
|
transition: b
|
|
12674
12674
|
};
|
|
12675
12675
|
return /* @__PURE__ */ a(
|
|
@@ -12857,8 +12857,8 @@ function bd({
|
|
|
12857
12857
|
transform: V,
|
|
12858
12858
|
transition: L,
|
|
12859
12859
|
isDragging: E
|
|
12860
|
-
} =
|
|
12861
|
-
transform:
|
|
12860
|
+
} = $a({ id: t.id }), w = {
|
|
12861
|
+
transform: ja.Transform.toString(V),
|
|
12862
12862
|
transition: L
|
|
12863
12863
|
}, g = (S) => {
|
|
12864
12864
|
const { active: O, over: C } = S;
|
|
@@ -13057,7 +13057,7 @@ function vd({
|
|
|
13057
13057
|
ct(on, {
|
|
13058
13058
|
coordinateGetter: rn
|
|
13059
13059
|
})
|
|
13060
|
-
), [w, g] =
|
|
13060
|
+
), [w, g] = j(!1), x = (C, v, M) => {
|
|
13061
13061
|
const F = (T) => T.id === C ? {
|
|
13062
13062
|
...T,
|
|
13063
13063
|
conditions: T.conditions.map((R) => R.id === v ? {
|
|
@@ -13282,7 +13282,7 @@ function Nd({
|
|
|
13282
13282
|
setFieldsForContainer: l
|
|
13283
13283
|
}) {
|
|
13284
13284
|
var N, k;
|
|
13285
|
-
const [i, d] =
|
|
13285
|
+
const [i, d] = j(null), c = I((D) => D.card), o = I(
|
|
13286
13286
|
(D) => D.actions.updateCardConfig
|
|
13287
13287
|
), r = (N = c == null ? void 0 : c.config) == null ? void 0 : N.joinPlan, u = (k = c == null ? void 0 : c.dataSource) == null ? void 0 : k.semanticDomainId, { data: m } = Pi(u), p = [
|
|
13288
13288
|
...n,
|
|
@@ -13562,7 +13562,7 @@ const wd = [
|
|
|
13562
13562
|
];
|
|
13563
13563
|
function Sd() {
|
|
13564
13564
|
var r, u;
|
|
13565
|
-
const t = I((m) => m.card), { updateRowLimit: n } = ne(), [s, l] =
|
|
13565
|
+
const t = I((m) => m.card), { updateRowLimit: n } = ne(), [s, l] = j(!1), [i, d] = j(""), c = (m) => {
|
|
13566
13566
|
if (m === "custom") {
|
|
13567
13567
|
l(!0);
|
|
13568
13568
|
return;
|
|
@@ -13722,7 +13722,7 @@ function Dd({
|
|
|
13722
13722
|
// setActiveCard,
|
|
13723
13723
|
}) {
|
|
13724
13724
|
var de, xe, ie;
|
|
13725
|
-
const u = I((se) => se.card), m = ke((se) => se.filterValues), { updateCardConfig: p, setCard: f, updateCardInFrame: b, setShowAIDialog: h } = ne(), y = I((se) => se.showAIDialog), N = ke((se) => se.isVisualEditing), [k, D] =
|
|
13725
|
+
const u = I((se) => se.card), m = ke((se) => se.filterValues), { updateCardConfig: p, setCard: f, updateCardInFrame: b, setShowAIDialog: h } = ne(), y = I((se) => se.showAIDialog), N = ke((se) => se.isVisualEditing), [k, D] = j(!1), [V, L] = j(!1), [E, w] = j(
|
|
13726
13726
|
null
|
|
13727
13727
|
), { config: g } = Pn(xn).tokenProps, x = (g == null ? void 0 : g.showInfoTab) !== !1, [S, O] = Td(), C = I(
|
|
13728
13728
|
(se) => {
|
|
@@ -13738,7 +13738,7 @@ function Dd({
|
|
|
13738
13738
|
pagination: A,
|
|
13739
13739
|
refetch: z,
|
|
13740
13740
|
comparisonMetadata: J
|
|
13741
|
-
} = De(d), U = Ne(() => (v == null ? void 0 : v.records) || [], [v == null ? void 0 : v.records]), [B, G] =
|
|
13741
|
+
} = De(d), U = Ne(() => (v == null ? void 0 : v.records) || [], [v == null ? void 0 : v.records]), [B, G] = j(!1);
|
|
13742
13742
|
fe(() => {
|
|
13743
13743
|
T || G(!1);
|
|
13744
13744
|
}, [T]);
|
|
@@ -13791,7 +13791,7 @@ function Dd({
|
|
|
13791
13791
|
] })
|
|
13792
13792
|
] });
|
|
13793
13793
|
}
|
|
13794
|
-
const
|
|
13794
|
+
const $ = (se) => {
|
|
13795
13795
|
if (!u.config) return;
|
|
13796
13796
|
const we = yn(
|
|
13797
13797
|
se,
|
|
@@ -13827,7 +13827,7 @@ function Dd({
|
|
|
13827
13827
|
}
|
|
13828
13828
|
),
|
|
13829
13829
|
/* @__PURE__ */ e(
|
|
13830
|
-
|
|
13830
|
+
$i,
|
|
13831
13831
|
{
|
|
13832
13832
|
cardId: d.id,
|
|
13833
13833
|
cardFilters: (xe = d.config) == null ? void 0 : xe.filters,
|
|
@@ -13838,7 +13838,7 @@ function Dd({
|
|
|
13838
13838
|
}
|
|
13839
13839
|
),
|
|
13840
13840
|
J && /* @__PURE__ */ e(
|
|
13841
|
-
|
|
13841
|
+
ji,
|
|
13842
13842
|
{
|
|
13843
13843
|
metadata: J,
|
|
13844
13844
|
variant: "compact"
|
|
@@ -13916,7 +13916,7 @@ function Dd({
|
|
|
13916
13916
|
isFetching: T,
|
|
13917
13917
|
pagination: A,
|
|
13918
13918
|
onPaginationChange: te,
|
|
13919
|
-
onSortChange:
|
|
13919
|
+
onSortChange: $,
|
|
13920
13920
|
sortState: ce,
|
|
13921
13921
|
splitViewEnabled: S
|
|
13922
13922
|
}
|
|
@@ -13931,7 +13931,7 @@ function Dd({
|
|
|
13931
13931
|
paginationMetadata: A,
|
|
13932
13932
|
onPaginationChange: te,
|
|
13933
13933
|
isLoading: F || T,
|
|
13934
|
-
onSortChange:
|
|
13934
|
+
onSortChange: $,
|
|
13935
13935
|
sortState: ce
|
|
13936
13936
|
}
|
|
13937
13937
|
) }),
|
|
@@ -13942,7 +13942,7 @@ function Dd({
|
|
|
13942
13942
|
errorSql: R,
|
|
13943
13943
|
onSendFeedback: () => {
|
|
13944
13944
|
const se = Ki(
|
|
13945
|
-
|
|
13945
|
+
js.QUERY_GENERATION,
|
|
13946
13946
|
{
|
|
13947
13947
|
cardConfig: u.config,
|
|
13948
13948
|
dataSource: d.dataSource,
|
|
@@ -13996,7 +13996,7 @@ function Dd({
|
|
|
13996
13996
|
);
|
|
13997
13997
|
}
|
|
13998
13998
|
function Md({ activeField: t }) {
|
|
13999
|
-
const [n, s] =
|
|
13999
|
+
const [n, s] = j(!0);
|
|
14000
14000
|
return fe(() => {
|
|
14001
14001
|
t && s(!0);
|
|
14002
14002
|
}, [t]), t ? /* @__PURE__ */ a(
|
|
@@ -14040,14 +14040,14 @@ const Id = () => {
|
|
|
14040
14040
|
};
|
|
14041
14041
|
function Od({ column: t, isSelected: n, onSelect: s, availableFields: l, width: i, onWidthChange: d }) {
|
|
14042
14042
|
var J, U, B;
|
|
14043
|
-
const c = I((G) => G.card), { updateCardConfig: o, removeGroupByColumn: r, removeMetricColumn: u, updateFilters: m } = ne(), [p, f] =
|
|
14043
|
+
const c = I((G) => G.card), { updateCardConfig: o, removeGroupByColumn: r, removeMetricColumn: u, updateFilters: m } = ne(), [p, f] = j(!1), [b, h] = j(!1), y = Qe(null), N = ze((G) => {
|
|
14044
14044
|
G.preventDefault(), G.stopPropagation(), h(!0), y.current = {
|
|
14045
14045
|
startX: G.clientX,
|
|
14046
14046
|
startWidth: i || 150
|
|
14047
14047
|
};
|
|
14048
14048
|
const Y = (ae) => {
|
|
14049
14049
|
if (!y.current) return;
|
|
14050
|
-
const
|
|
14050
|
+
const $ = ae.clientX - y.current.startX, ce = Math.max(80, y.current.startWidth + $);
|
|
14051
14051
|
d == null || d(t.id, ce);
|
|
14052
14052
|
}, te = () => {
|
|
14053
14053
|
h(!1), y.current = null, document.removeEventListener("mousemove", Y), document.removeEventListener("mouseup", te);
|
|
@@ -14064,8 +14064,8 @@ function Od({ column: t, isSelected: n, onSelect: s, availableFields: l, width:
|
|
|
14064
14064
|
transform: g,
|
|
14065
14065
|
transition: x,
|
|
14066
14066
|
isDragging: S
|
|
14067
|
-
} =
|
|
14068
|
-
transform:
|
|
14067
|
+
} = $a({ id: t.id }), O = {
|
|
14068
|
+
transform: ja.Transform.toString(g),
|
|
14069
14069
|
transition: x
|
|
14070
14070
|
}, C = Me(t.dataType), v = Rd(C), M = () => {
|
|
14071
14071
|
var te;
|
|
@@ -14120,9 +14120,9 @@ function Od({ column: t, isSelected: n, onSelect: s, availableFields: l, width:
|
|
|
14120
14120
|
var ae;
|
|
14121
14121
|
const Y = ((ae = c == null ? void 0 : c.config) == null ? void 0 : ae.metricColumns) || [];
|
|
14122
14122
|
if (!Y.some(
|
|
14123
|
-
(
|
|
14123
|
+
($) => $.name === t.name && $.aggregate === G
|
|
14124
14124
|
)) {
|
|
14125
|
-
const
|
|
14125
|
+
const $ = {
|
|
14126
14126
|
...t,
|
|
14127
14127
|
id: `metric-${t.id}-${G}-${Date.now()}`,
|
|
14128
14128
|
label: `${G} of ${t.label || t.name}`,
|
|
@@ -14130,7 +14130,7 @@ function Od({ column: t, isSelected: n, onSelect: s, availableFields: l, width:
|
|
|
14130
14130
|
aggregate: G
|
|
14131
14131
|
};
|
|
14132
14132
|
o(c.id, {
|
|
14133
|
-
metricColumns: [...Y,
|
|
14133
|
+
metricColumns: [...Y, $]
|
|
14134
14134
|
});
|
|
14135
14135
|
}
|
|
14136
14136
|
}, A = () => {
|
|
@@ -14191,7 +14191,7 @@ function Od({ column: t, isSelected: n, onSelect: s, availableFields: l, width:
|
|
|
14191
14191
|
/* @__PURE__ */ e(Gt, { className: Q("mr-2 h-4 w-4", D && "text-primary") }),
|
|
14192
14192
|
D ? "Edit Filter" : "Filter"
|
|
14193
14193
|
] }),
|
|
14194
|
-
/* @__PURE__ */ e(
|
|
14194
|
+
/* @__PURE__ */ e(jt, {}),
|
|
14195
14195
|
/* @__PURE__ */ a(Pe, { onClick: M, children: [
|
|
14196
14196
|
/* @__PURE__ */ e(ao, { className: "mr-2 h-4 w-4" }),
|
|
14197
14197
|
"Sort A → Z"
|
|
@@ -14200,7 +14200,7 @@ function Od({ column: t, isSelected: n, onSelect: s, availableFields: l, width:
|
|
|
14200
14200
|
/* @__PURE__ */ e(to, { className: "mr-2 h-4 w-4" }),
|
|
14201
14201
|
"Sort Z → A"
|
|
14202
14202
|
] }),
|
|
14203
|
-
/* @__PURE__ */ e(
|
|
14203
|
+
/* @__PURE__ */ e(jt, {}),
|
|
14204
14204
|
/* @__PURE__ */ a(qi, { children: [
|
|
14205
14205
|
/* @__PURE__ */ a(Gi, { children: [
|
|
14206
14206
|
/* @__PURE__ */ e(Ln, { className: "mr-2 h-4 w-4" }),
|
|
@@ -14215,7 +14215,7 @@ function Od({ column: t, isSelected: n, onSelect: s, availableFields: l, width:
|
|
|
14215
14215
|
/* @__PURE__ */ e(Pe, { onClick: () => R("MAX"), children: "Max" })
|
|
14216
14216
|
] })
|
|
14217
14217
|
] }),
|
|
14218
|
-
/* @__PURE__ */ e(
|
|
14218
|
+
/* @__PURE__ */ e(jt, {}),
|
|
14219
14219
|
/* @__PURE__ */ a(Pe, { onClick: T, children: [
|
|
14220
14220
|
/* @__PURE__ */ e(Bn, { className: "mr-2 h-4 w-4" }),
|
|
14221
14221
|
"Group by this column"
|
|
@@ -14224,7 +14224,7 @@ function Od({ column: t, isSelected: n, onSelect: s, availableFields: l, width:
|
|
|
14224
14224
|
/* @__PURE__ */ e(dl, { className: "mr-2 h-4 w-4" }),
|
|
14225
14225
|
"Pivot by this column"
|
|
14226
14226
|
] }),
|
|
14227
|
-
/* @__PURE__ */ e(
|
|
14227
|
+
/* @__PURE__ */ e(jt, {}),
|
|
14228
14228
|
/* @__PURE__ */ a(Pe, { disabled: !0, children: [
|
|
14229
14229
|
/* @__PURE__ */ e(_i, { className: "mr-2 h-4 w-4" }),
|
|
14230
14230
|
"Hide column"
|
|
@@ -14288,7 +14288,7 @@ function Fd({
|
|
|
14288
14288
|
sourceFields: l = []
|
|
14289
14289
|
}) {
|
|
14290
14290
|
var x, S, O, C;
|
|
14291
|
-
const i = I((v) => v.card), { updateCardConfig: d } = ne(), [c, o] =
|
|
14291
|
+
const i = I((v) => v.card), { updateCardConfig: d } = ne(), [c, o] = j(null), [r, u] = j({}), [m, p] = j(!1), f = Ne(() => {
|
|
14292
14292
|
var F, T;
|
|
14293
14293
|
const v = ((F = i == null ? void 0 : i.config) == null ? void 0 : F.groupByColumns) || [], M = ((T = i == null ? void 0 : i.config) == null ? void 0 : T.metricColumns) || [];
|
|
14294
14294
|
return [...v, ...M];
|
|
@@ -14532,7 +14532,7 @@ function Pd({
|
|
|
14532
14532
|
isLoading: n = !1
|
|
14533
14533
|
}) {
|
|
14534
14534
|
var V, L;
|
|
14535
|
-
const s = I((E) => E.card), { updateCardConfig: l, removeGroupByColumn: i, removeMetricColumn: d } = ne(), [c, o] =
|
|
14535
|
+
const s = I((E) => E.card), { updateCardConfig: l, removeGroupByColumn: i, removeMetricColumn: d } = ne(), [c, o] = j(!0), [r, u] = j(""), [m, p] = j(/* @__PURE__ */ new Set()), f = ((V = s == null ? void 0 : s.config) == null ? void 0 : V.groupByColumns) || [], b = ((L = s == null ? void 0 : s.config) == null ? void 0 : L.metricColumns) || [], h = (E) => {
|
|
14536
14536
|
const w = new Set(m);
|
|
14537
14537
|
w.has(E) ? w.delete(E) : w.add(E), p(w);
|
|
14538
14538
|
}, y = (E) => f.some((w) => w.name === E.name && w.qualifiedEntityName === E.qualifiedEntityName) || b.some((w) => w.name === E.name && w.qualifiedEntityName === E.qualifiedEntityName), N = (E, w) => {
|
|
@@ -14768,7 +14768,7 @@ function Bd({
|
|
|
14768
14768
|
selectedColumn: i,
|
|
14769
14769
|
availableColumns: d
|
|
14770
14770
|
}) {
|
|
14771
|
-
const [c, o] =
|
|
14771
|
+
const [c, o] = j(!1), [r, u] = j("column"), m = Qe(null);
|
|
14772
14772
|
fe(() => {
|
|
14773
14773
|
const h = (y) => {
|
|
14774
14774
|
y.key === "Escape" && t ? l() : y.key === "Enter" && t && !c && s(t);
|
|
@@ -14918,7 +14918,7 @@ function Bd({
|
|
|
14918
14918
|
}
|
|
14919
14919
|
function zd({ className: t }) {
|
|
14920
14920
|
var f, b, h, y;
|
|
14921
|
-
const n = I((N) => N.card), [s, l] =
|
|
14921
|
+
const n = I((N) => N.card), [s, l] = j(null), [i, d] = j(""), {
|
|
14922
14922
|
columns: c = [],
|
|
14923
14923
|
columnGroups: o = [],
|
|
14924
14924
|
isLoading: r
|
|
@@ -14963,11 +14963,11 @@ function zd({ className: t }) {
|
|
|
14963
14963
|
] })
|
|
14964
14964
|
] });
|
|
14965
14965
|
}
|
|
14966
|
-
function
|
|
14966
|
+
function $d() {
|
|
14967
14967
|
var J, U;
|
|
14968
|
-
const [t, n] =
|
|
14968
|
+
const [t, n] = j(
|
|
14969
14969
|
"chart"
|
|
14970
|
-
), [s, l] =
|
|
14970
|
+
), [s, l] = j(!1), [i, d] = j(!1), [c, o] = j(!0), r = I((B) => B.showAIDialog), u = ke((B) => B.isVisualEditing), { setCardType: m } = ne(), p = I((B) => B.card.type);
|
|
14971
14971
|
fe(() => Id(), []);
|
|
14972
14972
|
const f = (B) => {
|
|
14973
14973
|
m(B);
|
|
@@ -15091,13 +15091,13 @@ function jd() {
|
|
|
15091
15091
|
}
|
|
15092
15092
|
);
|
|
15093
15093
|
}
|
|
15094
|
-
function
|
|
15094
|
+
function jd({ authToken: t, onSave: n, onClose: s }) {
|
|
15095
15095
|
const l = Qe(null), i = I((w) => w.showAIDialog), d = I((w) => w.isDevMode), c = Xa((w) => w.setFullscreen), o = Xa((w) => w.setPanelOpen), r = Xa((w) => w.setContainer), u = Ji("editor"), m = Hi(), p = Qi("editor"), f = m === "editor", b = ze(
|
|
15096
15096
|
(w) => {
|
|
15097
15097
|
r("editor", w);
|
|
15098
15098
|
},
|
|
15099
15099
|
[r]
|
|
15100
|
-
), { setAuthToken: h } =
|
|
15100
|
+
), { setAuthToken: h } = $s(), { setShowAIDialog: y, setOnSave: N, setOnClose: k } = ne(), { setActiveAssistantType: D } = tl();
|
|
15101
15101
|
fe(() => {
|
|
15102
15102
|
n && N(n), s && k(s);
|
|
15103
15103
|
}, [n, N, s, k]), fe(() => {
|
|
@@ -15178,7 +15178,7 @@ function $d({ authToken: t, onSave: n, onClose: s }) {
|
|
|
15178
15178
|
),
|
|
15179
15179
|
direction: "horizontal",
|
|
15180
15180
|
children: [
|
|
15181
|
-
/* @__PURE__ */ e(Le, { className: "min-w-[510px] grow rounded-none", children: /* @__PURE__ */ e(
|
|
15181
|
+
/* @__PURE__ */ e(Le, { className: "min-w-[510px] grow rounded-none", children: /* @__PURE__ */ e($d, {}) }),
|
|
15182
15182
|
/* @__PURE__ */ e(At, {}),
|
|
15183
15183
|
/* @__PURE__ */ e(
|
|
15184
15184
|
Le,
|
|
@@ -15238,7 +15238,7 @@ function Qd() {
|
|
|
15238
15238
|
className: Q("flex-1 grow basis-0 overflow-auto", {
|
|
15239
15239
|
"max-h-0 overflow-hidden": !s
|
|
15240
15240
|
}),
|
|
15241
|
-
children: /* @__PURE__ */ e(
|
|
15241
|
+
children: /* @__PURE__ */ e(jd, { onSave: i, onClose: d })
|
|
15242
15242
|
}
|
|
15243
15243
|
);
|
|
15244
15244
|
}
|