react-semaphor 0.1.289 → 0.1.290
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-Dsh15H8E.js → dashboard-controls-BSbG43wo.js} +1 -1
- package/dist/chunks/{dashboard-controls-BZpyFg-k.js → dashboard-controls-LtQ98rvL.js} +4 -4
- package/dist/chunks/{dashboard-filter-controls-button-CG5DgZpQ.js → dashboard-filter-controls-button-C4AMu723.js} +3 -3
- package/dist/chunks/{dashboard-filter-controls-button-DJvp8skg.js → dashboard-filter-controls-button-CgoIPOZZ.js} +1 -1
- package/dist/chunks/{dashboard-json-cootX4Nq.js → dashboard-json-BKs1UTLL.js} +1 -1
- package/dist/chunks/{dashboard-json-CPhdiaLF.js → dashboard-json-C13EJaTK.js} +1 -1
- package/dist/chunks/{dashboard-summary-settings-dialog-F6Dl15za.js → dashboard-summary-settings-dialog-T6aUgPAf.js} +1 -1
- package/dist/chunks/{dashboard-summary-settings-dialog-DOaMWikr.js → dashboard-summary-settings-dialog-fL9l0wUO.js} +1 -1
- package/dist/chunks/{edit-dashboard-visual-fAiZdiCV.js → edit-dashboard-visual-CKB34ird.js} +11 -11
- package/dist/chunks/{edit-dashboard-visual-DIpn7oJy.js → edit-dashboard-visual-CnVx0Xi7.js} +429 -428
- package/dist/chunks/{index-Cab2h5Fi.js → index-Cr9Smn6Q.js} +55698 -55631
- package/dist/chunks/index-Cwg2SRSi.js +1435 -0
- package/dist/chunks/{resource-management-panel-AZ46U35q.js → resource-management-panel-DJgYduN9.js} +2 -2
- package/dist/chunks/{resource-management-panel-gJirpIDQ.js → resource-management-panel-Dv18tosO.js} +1 -1
- package/dist/chunks/{use-create-flow-overlay-state-3oPHFeIs.js → use-create-flow-overlay-state-DnI1SSKD.js} +1 -1
- package/dist/chunks/{use-create-flow-overlay-state-B6yjr4UZ.js → use-create-flow-overlay-state-NGb4c5Ye.js} +2 -2
- package/dist/chunks/{use-visual-utils-CyzOMb7j.js → use-visual-utils-BbxYtbzK.js} +1 -1
- package/dist/chunks/{use-visual-utils-DmENJikx.js → use-visual-utils-ivCDI1cO.js} +1 -1
- package/dist/dashboard/index.cjs +1 -1
- package/dist/dashboard/index.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +5 -5
- package/dist/style.css +1 -1
- package/dist/surfboard/index.cjs +1 -1
- package/dist/surfboard/index.js +2 -2
- package/dist/types/dashboard.d.ts +13 -1
- package/dist/types/main.d.ts +2 -1
- package/dist/types/shared.d.ts +13 -1
- package/dist/types/surfboard.d.ts +13 -1
- package/dist/types/types.d.ts +13 -1
- package/package.json +1 -1
- package/dist/chunks/index-CnmC-NR5.js +0 -1435
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsxs as a, jsx as e, Fragment as Ne } from "react/jsx-runtime";
|
|
2
|
-
import { bM as _e, x as ut, M as xe, U as F, e7 as ni, e8 as Fo, L as z, y as te, z as ae, A as ne, E as se, F as j, ac as We, B as H, ct as St, e9 as Qn, ea as si, eb as ri, ec as li, ed as ii, ee as Jn, a6 as Et, X as nt, ef as Ys, ch as Yn, d as pa, e as fa, f as ga, g as xa, h as Ba, bZ as Nt, bW as gt, bT as yt, bU as mt, bV as ht, eg as cl, eh as Ro, ei as oi, v as _n, ej as za, cP as Ja, c as W, cc as wt, ek as ci, el as vs, cB as di, em as Lo, en as Po, eo as Vo, ep as un, eq as Bo, er as ui, es as zo, H as Wn, C as Xn, et as _o, eu as $o, u as Me, ev as qt, ew as Pa, cC as Ya, cD as Wa, ex as zs, cF as Xa, cG as dt, ey as _a, ez as qo, eA as _s, eB as Ln, b as wa, ag as mi, e6 as mn, eC as Ws, eD as jo, eE as Ko, eF as hi, eG as pi, eH as fi, dG as Xs, dE as Go, I as De, P as Tt, eI as Uo, l as kt, eJ as Ho, w as la, eK as Qo, eL as Jo, eM as Yo, bN as Za, bO as Sa, bP as Ta, bQ as xn, bR as Gt, bS as Va, eN as $s, eO as Ht, eP as ct, eQ as Qt, dm as ba, eR as gi, eS as $n, eT as qn, eU as jn, eV as Zs, eW as xi, eX as Wo, eY as Xo, eZ as Zo, k as bi, e_ as ec, e$ as tc, f0 as ac, f1 as nc, f2 as vi, f3 as sc, f4 as ys, f5 as rc, f6 as dl, f7 as lc, f8 as ul, f9 as er, fa as ic, fb as bn, fc as oc, R as vn, fd as Zn, fe as en, cQ as tr, ff as yi, i as ia, fg as cc, cn as Pt, co as _t, fh as dc, cp as $t, c$ as ar, db as nr, N as Ni, fi as sr, fj as uc, fk as Ci, fl as wi, fm as zt, d$ as Ns, fn as mc, fo as hc, fp as pc, fq as Si, ax as Ti, fr as ki, fs as fc, ft as gc, fu as xc, fv as hn, fw as bc, fx as vc, fy as ml, fz as yc, Z as es, a4 as rr, fA as Nc, fB as lr, dr as Cc, fC as hl, a7 as xt, fD as wc, dN as ir, dO as or, dP as ma, dQ as Pn, fE as Sc, e0 as Tc, fF as Ii, fG as kc, fH as Ic, d4 as ts, fI as Dc, fJ as Ac, fK as pl, fL as Ec, j as Ot, dc as va, ds as as, cK as Lt, fM as ea, fN as ya, fO as Na, fP as oa, fQ as $a, fR as Oc, fS as Mc, b2 as Fc, fT as Rc, fU as Lc, fV as Pc, fW as Vc, da as ha, fX as Bc, fY as Di, fZ as zc, f_ as _c, f$ as $c, g0 as Ai, dH as fl, c6 as qc, cd as Ut, dj as jc, g1 as Kc, g2 as Gc, g3 as Uc, g4 as gl, g5 as Hc, g6 as Qc, g7 as Jc, g8 as Yc, af as Wc, dp as Xc, g9 as Zc, ga as Ei, gb as ed, gc as td, gd as ad, ge as nd, gf as sd, gg as rd, gh as qs, gi as ld, gj as id, gk as od, gl as js, gm as cd, gn as dd, go as ud, gp as md, gq as xl, gr as hd, gs as bl, gt as vl, dd as Ks, cS as pd, gu as fd, cT as gd, cU as xd, cV as bd, cW as vd, cX as yd, cY as Nd, cZ as Cd, gv as tn, gw as wd, S as Ge, gx as Sd, gy as Td, gz as Oi, cE as cr, de as kd, cH as Id, gA as Dd, gB as Ad, gC as pn, gD as Kn, gE as Ed, gF as qa, gG as qe, gH as je, gI as Ke, gJ as Od, gK as Md, gL as Mi, gM as Fi, gN as aa, gO as On, gP as yl, gQ as Fd, dn as Ri, gR as Rd, gS as Ld, gT as Pd, gU as yn, gV as Vd, gW as Bd, gX as zd, m as ja, n as Ka, o as Ga, p as Ua, q as Ha, r as Qa, gY as _d, gZ as $d, g_ as Nl, g$ as qd, s as ka, h0 as jd, h1 as Cs, h2 as Cl, h3 as Kd, h4 as At, h5 as Gd, h6 as Ud, h7 as Hd, h8 as Qd, h9 as Jd, ha as ws, hb as Li, hc as Yd, hd as Wd, he as Xd, hf as Gn, hg as Zd, hh as eu, hi as dr, hj as ur, hk as Pi, hl as tu, d2 as Vi, hm as Bi, hn as zi, ho as au, e5 as nu, hp as Ze, hq as su, bg as ru, hr as Mn, hs as lu, ht as wl, hu as iu, hv as ou, bc as Sl, hw as Tl, hx as cu, hy as du, hz as uu, hA as mu, hB as hu, hC as pu, hD as fu, hE as gu, hF as xu, hG as bu, hH as vu, hI as yu, hJ as Nu, hK as Cu, hL as _i, hM as wu, hN as Su, hO as Tu, hP as ku, hQ as Iu, hR as Du, hS as Au, hT as Eu, hU as Ou, hV as Mu, hW as Fu, hX as $i, hY as Ru, hZ as mr, h_ as ns, h$ as qi, i0 as Lu, i1 as Pu, i2 as Vu, i3 as Bu, i4 as zu, i5 as _u, i6 as ss, i7 as Ss, i8 as $u, i9 as qu, ia as ju, ib as Ku, ic as Gu, id as kl, ie as Ca, ig as Uu, ih as ji, ii as Ki, ij as Gs, ik as Gi, il as Il, d6 as Dl, im as Hu, io as Qu, ip as Ju, iq as Vn, ir as Yu, is as hr, it as Wu, iu as Xu, iv as Un, iw as Zu, ix as em, iy as tm, iz as fn, iA as na, iB as Us, iC as Hs, iD as gn, iE as Ui, aY as am, iF as nm, iG as Ts, iH as ks, iI as sm, iJ as Is, iK as rm, iL as Al, iM as El, iN as lm, iO as im, iP as om, iQ as cm, iR as dm, iS as um, iT as rs, cM as ls, iU as is, iV as Ol, iW as Hi, dW as Ds, iX as mm, iY as hm, iZ as pm, _ as fm } from "./index-
|
|
2
|
+
import { bM as _e, x as ut, M as xe, U as F, e7 as ni, e8 as Fo, L as z, y as te, z as ae, A as ne, E as se, F as j, ac as We, B as H, ct as St, e9 as Qn, ea as si, eb as ri, ec as li, ed as ii, ee as Jn, a6 as Et, X as nt, ef as Ys, ch as Yn, d as pa, e as fa, f as ga, g as xa, h as Ba, bZ as Nt, bW as gt, bT as yt, bU as mt, bV as ht, eg as cl, eh as Ro, ei as oi, v as _n, ej as za, cP as Ja, c as W, cc as wt, ek as ci, el as vs, cB as di, em as Lo, en as Po, eo as Vo, ep as un, eq as Bo, er as ui, es as zo, H as Wn, C as Xn, et as _o, eu as $o, u as Me, ev as qt, ew as Pa, cC as Ya, cD as Wa, ex as zs, cF as Xa, cG as dt, ey as _a, ez as qo, eA as _s, eB as Ln, b as wa, ag as mi, e6 as mn, eC as Ws, eD as jo, eE as Ko, eF as hi, eG as pi, eH as fi, dG as Xs, dE as Go, I as De, P as Tt, eI as Uo, l as kt, eJ as Ho, w as la, eK as Qo, eL as Jo, eM as Yo, bN as Za, bO as Sa, bP as Ta, bQ as xn, bR as Gt, bS as Va, eN as $s, eO as Ht, eP as ct, eQ as Qt, dm as ba, eR as gi, eS as $n, eT as qn, eU as jn, eV as Zs, eW as xi, eX as Wo, eY as Xo, eZ as Zo, k as bi, e_ as ec, e$ as tc, f0 as ac, f1 as nc, f2 as vi, f3 as sc, f4 as ys, f5 as rc, f6 as dl, f7 as lc, f8 as ul, f9 as er, fa as ic, fb as bn, fc as oc, R as vn, fd as Zn, fe as en, cQ as tr, ff as yi, i as ia, fg as cc, cn as Pt, co as _t, fh as dc, cp as $t, c$ as ar, db as nr, N as Ni, fi as sr, fj as uc, fk as Ci, fl as wi, fm as zt, d$ as Ns, fn as mc, fo as hc, fp as pc, fq as Si, ax as Ti, fr as ki, fs as fc, ft as gc, fu as xc, fv as hn, fw as bc, fx as vc, fy as ml, fz as yc, Z as es, a4 as rr, fA as Nc, fB as lr, dr as Cc, fC as hl, a7 as xt, fD as wc, dN as ir, dO as or, dP as ma, dQ as Pn, fE as Sc, e0 as Tc, fF as Ii, fG as kc, fH as Ic, d4 as ts, fI as Dc, fJ as Ac, fK as pl, fL as Ec, j as Ot, dc as va, ds as as, cK as Lt, fM as ea, fN as ya, fO as Na, fP as oa, fQ as $a, fR as Oc, fS as Mc, b2 as Fc, fT as Rc, fU as Lc, fV as Pc, fW as Vc, da as ha, fX as Bc, fY as Di, fZ as zc, f_ as _c, f$ as $c, g0 as Ai, dH as fl, c6 as qc, cd as Ut, dj as jc, g1 as Kc, g2 as Gc, g3 as Uc, g4 as gl, g5 as Hc, g6 as Qc, g7 as Jc, g8 as Yc, af as Wc, dp as Xc, g9 as Zc, ga as Ei, gb as ed, gc as td, gd as ad, ge as nd, gf as sd, gg as rd, gh as qs, gi as ld, gj as id, gk as od, gl as js, gm as cd, gn as dd, go as ud, gp as md, gq as xl, gr as hd, gs as bl, gt as vl, dd as Ks, cS as pd, gu as fd, cT as gd, cU as xd, cV as bd, cW as vd, cX as yd, cY as Nd, cZ as Cd, gv as tn, gw as wd, S as Ge, gx as Sd, gy as Td, gz as Oi, cE as cr, de as kd, cH as Id, gA as Dd, gB as Ad, gC as pn, gD as Kn, gE as Ed, gF as qa, gG as qe, gH as je, gI as Ke, gJ as Od, gK as Md, gL as Mi, gM as Fi, gN as aa, gO as On, gP as yl, gQ as Fd, dn as Ri, gR as Rd, gS as Ld, gT as Pd, gU as yn, gV as Vd, gW as Bd, gX as zd, m as ja, n as Ka, o as Ga, p as Ua, q as Ha, r as Qa, gY as _d, gZ as $d, g_ as Nl, g$ as qd, s as ka, h0 as jd, h1 as Cs, h2 as Cl, h3 as Kd, h4 as At, h5 as Gd, h6 as Ud, h7 as Hd, h8 as Qd, h9 as Jd, ha as ws, hb as Li, hc as Yd, hd as Wd, he as Xd, hf as Gn, hg as Zd, hh as eu, hi as dr, hj as ur, hk as Pi, hl as tu, d2 as Vi, hm as Bi, hn as zi, ho as au, e5 as nu, hp as Ze, hq as su, bg as ru, hr as Mn, hs as lu, ht as wl, hu as iu, hv as ou, bc as Sl, hw as Tl, hx as cu, hy as du, hz as uu, hA as mu, hB as hu, hC as pu, hD as fu, hE as gu, hF as xu, hG as bu, hH as vu, hI as yu, hJ as Nu, hK as Cu, hL as _i, hM as wu, hN as Su, hO as Tu, hP as ku, hQ as Iu, hR as Du, hS as Au, hT as Eu, hU as Ou, hV as Mu, hW as Fu, hX as $i, hY as Ru, hZ as mr, h_ as ns, h$ as qi, i0 as Lu, i1 as Pu, i2 as Vu, i3 as Bu, i4 as zu, i5 as _u, i6 as ss, i7 as Ss, i8 as $u, i9 as qu, ia as ju, ib as Ku, ic as Gu, id as kl, ie as Ca, ig as Uu, ih as ji, ii as Ki, ij as Gs, ik as Gi, il as Il, d6 as Dl, im as Hu, io as Qu, ip as Ju, iq as Vn, ir as Yu, is as hr, it as Wu, iu as Xu, iv as Un, iw as Zu, ix as em, iy as tm, iz as fn, iA as na, iB as Us, iC as Hs, iD as gn, iE as Ui, aY as am, iF as nm, iG as Ts, iH as ks, iI as sm, iJ as Is, iK as rm, iL as Al, iM as El, iN as lm, iO as im, iP as om, iQ as cm, iR as dm, iS as um, iT as rs, cM as ls, iU as is, iV as Ol, iW as Hi, dW as Ds, iX as mm, iY as hm, iZ as pm, _ as fm } from "./index-Cr9Smn6Q.js";
|
|
3
3
|
import * as Bn from "react";
|
|
4
4
|
import ta, { useState as G, useRef as Ie, useCallback as ke, useEffect as Ce, useMemo as oe, useContext as pr, Suspense as gm } from "react";
|
|
5
|
-
import { r as Qi, f as Nn } from "./use-visual-utils-
|
|
6
|
-
import { f as bt, C as Ml, g as fr, V as Ji, u as xm, e as bm } from "./use-create-flow-overlay-state-
|
|
5
|
+
import { r as Qi, f as Nn } from "./use-visual-utils-BbxYtbzK.js";
|
|
6
|
+
import { f as bt, C as Ml, g as fr, V as Ji, u as xm, e as bm } from "./use-create-flow-overlay-state-NGb4c5Ye.js";
|
|
7
7
|
import { createPortal as vm } from "react-dom";
|
|
8
8
|
/**
|
|
9
9
|
* @license lucide-react v0.453.0 - ISC
|
|
@@ -522,41 +522,41 @@ function qm({
|
|
|
522
522
|
joins: n.joins.filter((D) => D.id !== S)
|
|
523
523
|
}), o(new Set([...c].filter((D) => D !== S)));
|
|
524
524
|
}, i = (S, D) => {
|
|
525
|
-
var N, M, R, g,
|
|
525
|
+
var N, M, R, g, A;
|
|
526
526
|
const I = n.joins.find((T) => T.id === S);
|
|
527
527
|
if (!I) return;
|
|
528
|
-
const
|
|
529
|
-
if ((N =
|
|
528
|
+
const E = { ...I, ...D };
|
|
529
|
+
if ((N = E.source) != null && N.name && ((M = E.target) != null && M.name) && E.source.name === E.target.name) {
|
|
530
530
|
ut.error("Self-joins are not yet supported", {
|
|
531
|
-
description: `Joining ${
|
|
531
|
+
description: `Joining ${E.source.name} to itself is not currently supported. Please select a different target table.`
|
|
532
532
|
});
|
|
533
533
|
return;
|
|
534
534
|
}
|
|
535
535
|
const b = n.joins.filter(
|
|
536
536
|
(T) => {
|
|
537
537
|
var _;
|
|
538
|
-
return T.id !== S && T.target.name === ((_ =
|
|
538
|
+
return T.id !== S && T.target.name === ((_ = E.target) == null ? void 0 : _.name);
|
|
539
539
|
}
|
|
540
540
|
);
|
|
541
|
-
if ((R =
|
|
541
|
+
if ((R = E.target) != null && R.name && b.length > 0) {
|
|
542
542
|
ut.error("Duplicate join targets are not supported", {
|
|
543
|
-
description: `The table ${
|
|
543
|
+
description: `The table ${E.target.name} is already used as a target in another join. Each table can only be joined once.`
|
|
544
544
|
});
|
|
545
545
|
return;
|
|
546
546
|
}
|
|
547
547
|
const L = n.joins.map(
|
|
548
|
-
(T) => T.id === S ?
|
|
548
|
+
(T) => T.id === S ? E : T
|
|
549
549
|
);
|
|
550
|
-
if ((g =
|
|
550
|
+
if ((g = E.source) != null && g.name && ((A = E.target) != null && A.name) && E.joinKeyGroups[0].keys.length === 0) {
|
|
551
551
|
const T = s.find(
|
|
552
552
|
(q) => {
|
|
553
553
|
var $;
|
|
554
|
-
return q.name === (($ =
|
|
554
|
+
return q.name === (($ = E.source) == null ? void 0 : $.name);
|
|
555
555
|
}
|
|
556
556
|
), _ = s.find(
|
|
557
557
|
(q) => {
|
|
558
558
|
var $;
|
|
559
|
-
return q.name === (($ =
|
|
559
|
+
return q.name === (($ = E.target) == null ? void 0 : $.name);
|
|
560
560
|
}
|
|
561
561
|
), P = {
|
|
562
562
|
id: `key-${Date.now()}`,
|
|
@@ -581,11 +581,11 @@ function qm({
|
|
|
581
581
|
entityType: (_ == null ? void 0 : _.type) || "table"
|
|
582
582
|
},
|
|
583
583
|
operator: "="
|
|
584
|
-
}, V = [...
|
|
584
|
+
}, V = [...E.joinKeyGroups];
|
|
585
585
|
V[0] = {
|
|
586
586
|
...V[0],
|
|
587
587
|
keys: [P]
|
|
588
|
-
},
|
|
588
|
+
}, E.joinKeyGroups = V, L[L.findIndex((q) => q.id === S)] = E;
|
|
589
589
|
}
|
|
590
590
|
r({
|
|
591
591
|
...n,
|
|
@@ -602,8 +602,8 @@ function qm({
|
|
|
602
602
|
moveJoinUp: (S) => {
|
|
603
603
|
const D = n.joins.findIndex((I) => I.id === S);
|
|
604
604
|
if (D > 0) {
|
|
605
|
-
const I = [...n.joins],
|
|
606
|
-
I[D] = b, I[D - 1] =
|
|
605
|
+
const I = [...n.joins], E = { ...I[D] }, b = { ...I[D - 1] };
|
|
606
|
+
I[D] = b, I[D - 1] = E, I.forEach((N, M) => {
|
|
607
607
|
N.sequence = M + 1;
|
|
608
608
|
});
|
|
609
609
|
const L = {
|
|
@@ -616,8 +616,8 @@ function qm({
|
|
|
616
616
|
moveJoinDown: (S) => {
|
|
617
617
|
const D = n.joins.findIndex((I) => I.id === S);
|
|
618
618
|
if (D < n.joins.length - 1) {
|
|
619
|
-
const I = [...n.joins],
|
|
620
|
-
I[D] = b, I[D + 1] =
|
|
619
|
+
const I = [...n.joins], E = { ...I[D] }, b = { ...I[D + 1] };
|
|
620
|
+
I[D] = b, I[D + 1] = E, I.forEach((N, M) => {
|
|
621
621
|
N.sequence = M + 1;
|
|
622
622
|
});
|
|
623
623
|
const L = {
|
|
@@ -634,20 +634,20 @@ function qm({
|
|
|
634
634
|
getAvailableSourceEntities: (S) => {
|
|
635
635
|
if (n.joins.length === 0) return s;
|
|
636
636
|
const D = n.joins.findIndex(
|
|
637
|
-
(
|
|
637
|
+
(E) => E.id === S
|
|
638
638
|
);
|
|
639
639
|
if (D === 0)
|
|
640
640
|
return s.filter(
|
|
641
|
-
(
|
|
641
|
+
(E) => E.name === n.baseEntity.name
|
|
642
642
|
);
|
|
643
643
|
const I = /* @__PURE__ */ new Set();
|
|
644
|
-
return n.baseEntity.name && I.add(n.baseEntity.name), n.joins.slice(0, D).forEach((
|
|
645
|
-
I.add(
|
|
646
|
-
}), s.filter((
|
|
644
|
+
return n.baseEntity.name && I.add(n.baseEntity.name), n.joins.slice(0, D).forEach((E) => {
|
|
645
|
+
I.add(E.source.name), I.add(E.target.name);
|
|
646
|
+
}), s.filter((E) => I.has(E.name));
|
|
647
647
|
},
|
|
648
648
|
getAvailableTargetEntities: (S) => s.filter((D) => D.name !== S),
|
|
649
649
|
addJoinKeyGroup: (S) => {
|
|
650
|
-
const D = n.joins.find((
|
|
650
|
+
const D = n.joins.find((E) => E.id === S);
|
|
651
651
|
if (!D) return;
|
|
652
652
|
const I = [
|
|
653
653
|
...D.joinKeyGroups,
|
|
@@ -660,21 +660,21 @@ function qm({
|
|
|
660
660
|
i(S, { joinKeyGroups: I });
|
|
661
661
|
},
|
|
662
662
|
updateGroupOperator: (S, D, I) => {
|
|
663
|
-
const
|
|
664
|
-
if (!
|
|
665
|
-
const b = [...
|
|
663
|
+
const E = n.joins.find((L) => L.id === S);
|
|
664
|
+
if (!E) return;
|
|
665
|
+
const b = [...E.joinKeyGroups];
|
|
666
666
|
b[D] = { ...b[D], operator: I }, i(S, { joinKeyGroups: b });
|
|
667
667
|
},
|
|
668
668
|
removeJoinKeyGroup: (S, D) => {
|
|
669
669
|
const I = n.joins.find((b) => b.id === S);
|
|
670
670
|
if (!I) return;
|
|
671
|
-
const
|
|
672
|
-
|
|
671
|
+
const E = [...I.joinKeyGroups];
|
|
672
|
+
E.splice(D, 1), i(S, { joinKeyGroups: E });
|
|
673
673
|
},
|
|
674
674
|
addJoinKey: (S, D) => {
|
|
675
675
|
const I = n.joins.find((M) => M.id === S);
|
|
676
676
|
if (!I) return;
|
|
677
|
-
const
|
|
677
|
+
const E = s.find(
|
|
678
678
|
(M) => M.name === I.source.name
|
|
679
679
|
), b = s.find(
|
|
680
680
|
(M) => M.name === I.target.name
|
|
@@ -686,9 +686,9 @@ function qm({
|
|
|
686
686
|
dataType: "",
|
|
687
687
|
label: "",
|
|
688
688
|
qualifiedFieldName: "",
|
|
689
|
-
entityId: (
|
|
690
|
-
entityName: (
|
|
691
|
-
entityType: (
|
|
689
|
+
entityId: (E == null ? void 0 : E.name) || "",
|
|
690
|
+
entityName: (E == null ? void 0 : E.name) || "",
|
|
691
|
+
entityType: (E == null ? void 0 : E.type) || "table"
|
|
692
692
|
},
|
|
693
693
|
target: {
|
|
694
694
|
id: `target-${Date.now()}`,
|
|
@@ -707,55 +707,55 @@ function qm({
|
|
|
707
707
|
keys: [...L[D].keys, N]
|
|
708
708
|
}, i(S, { joinKeyGroups: L });
|
|
709
709
|
},
|
|
710
|
-
updateJoinKey: (S, D, I,
|
|
711
|
-
const L = n.joins.find((
|
|
710
|
+
updateJoinKey: (S, D, I, E, b) => {
|
|
711
|
+
const L = n.joins.find((A) => A.id === S);
|
|
712
712
|
if (!L) return;
|
|
713
713
|
const N = s.find(
|
|
714
|
-
(
|
|
714
|
+
(A) => A.name === L.source.name
|
|
715
715
|
), M = s.find(
|
|
716
|
-
(
|
|
716
|
+
(A) => A.name === L.target.name
|
|
717
717
|
), R = [...L.joinKeyGroups], g = R[D].keys[I];
|
|
718
|
-
|
|
718
|
+
E === "sourceColumnName" && N ? R[D].keys[I] = {
|
|
719
719
|
...g,
|
|
720
720
|
source: {
|
|
721
721
|
...g.source,
|
|
722
722
|
name: b
|
|
723
723
|
}
|
|
724
|
-
} :
|
|
724
|
+
} : E === "targetColumnName" && M ? R[D].keys[I] = {
|
|
725
725
|
...g,
|
|
726
726
|
target: {
|
|
727
727
|
...g.target,
|
|
728
728
|
name: b
|
|
729
729
|
}
|
|
730
|
-
} :
|
|
730
|
+
} : E === "operator" && (R[D].keys[I] = {
|
|
731
731
|
...g,
|
|
732
732
|
operator: b
|
|
733
733
|
}), i(S, { joinKeyGroups: R });
|
|
734
734
|
},
|
|
735
735
|
removeJoinKey: (S, D, I) => {
|
|
736
|
-
const
|
|
737
|
-
if (!
|
|
738
|
-
const b = [...
|
|
736
|
+
const E = n.joins.find((L) => L.id === S);
|
|
737
|
+
if (!E) return;
|
|
738
|
+
const b = [...E.joinKeyGroups];
|
|
739
739
|
b[D].keys.splice(I, 1), i(S, { joinKeyGroups: b });
|
|
740
740
|
},
|
|
741
741
|
generateSQLPreview: () => {
|
|
742
742
|
const S = [...n.joins].sort(
|
|
743
|
-
(
|
|
743
|
+
(E, b) => E.sequence - b.sequence
|
|
744
744
|
), D = n.baseEntity;
|
|
745
745
|
if (!D.name)
|
|
746
746
|
return "SELECT * FROM table -- Please select a base entity";
|
|
747
747
|
let I = `SELECT *
|
|
748
748
|
FROM ${D.name}`;
|
|
749
|
-
return S.forEach((
|
|
749
|
+
return S.forEach((E) => {
|
|
750
750
|
const b = s.find(
|
|
751
|
-
(M) => M.name ===
|
|
751
|
+
(M) => M.name === E.target.name
|
|
752
752
|
);
|
|
753
753
|
if (!b) return;
|
|
754
|
-
const L =
|
|
754
|
+
const L = E.joinKeyGroups.filter((M) => M.keys && M.keys.length > 0).map((M) => {
|
|
755
755
|
const R = M.keys.filter(
|
|
756
756
|
(g) => {
|
|
757
|
-
var
|
|
758
|
-
return ((
|
|
757
|
+
var A, T, _, P;
|
|
758
|
+
return ((A = g.source) == null ? void 0 : A.name) && ((T = g.target) == null ? void 0 : T.name) && ((_ = g.source) == null ? void 0 : _.entityName) && ((P = g.target) == null ? void 0 : P.entityName);
|
|
759
759
|
}
|
|
760
760
|
).map(
|
|
761
761
|
(g) => `${g.source.entityName}.${g.source.name} ${g.operator} ${g.target.entityName}.${g.target.name}`
|
|
@@ -763,16 +763,16 @@ FROM ${D.name}`;
|
|
|
763
763
|
return R.length > 1 ? `(${R.join(` ${M.operator} `)})` : R[0];
|
|
764
764
|
}).filter(Boolean), N = L.length > 1 ? L.join(" OR ") : L[0] || "condition_here";
|
|
765
765
|
I += `
|
|
766
|
-
${
|
|
766
|
+
${E.joinType} JOIN ${b.name}
|
|
767
767
|
ON ${N}`;
|
|
768
768
|
}), I;
|
|
769
769
|
},
|
|
770
770
|
isValidConfiguration: () => !(!n.baseEntity.name || n.joins.some(
|
|
771
|
-
(
|
|
771
|
+
(E) => !E.source.name || !E.target.name
|
|
772
772
|
) || n.joins.some(
|
|
773
|
-
(
|
|
773
|
+
(E) => E.joinKeyGroups.some((b) => b.keys.length === 0)
|
|
774
774
|
) || n.joins.some(
|
|
775
|
-
(
|
|
775
|
+
(E) => E.joinKeyGroups.some(
|
|
776
776
|
(b) => b.keys.some(
|
|
777
777
|
(L) => !L.source.name || !L.target.name || !L.operator
|
|
778
778
|
)
|
|
@@ -809,7 +809,7 @@ function jm({
|
|
|
809
809
|
addJoinKey: S,
|
|
810
810
|
updateJoinKey: D,
|
|
811
811
|
removeJoinKey: I,
|
|
812
|
-
generateSQLPreview:
|
|
812
|
+
generateSQLPreview: E,
|
|
813
813
|
isValidConfiguration: b
|
|
814
814
|
} = qm({
|
|
815
815
|
initialJoinPlan: t,
|
|
@@ -863,7 +863,7 @@ function jm({
|
|
|
863
863
|
] }),
|
|
864
864
|
/* @__PURE__ */ a("div", { className: "rounded-md border p-3", children: [
|
|
865
865
|
/* @__PURE__ */ e("div", { className: "mb-2 text-xs font-medium text-muted-foreground", children: "Join SQL Preview" }),
|
|
866
|
-
/* @__PURE__ */ e("code", { className: "block whitespace-pre-wrap break-all text-xs", children:
|
|
866
|
+
/* @__PURE__ */ e("code", { className: "block whitespace-pre-wrap break-all text-xs", children: E() })
|
|
867
867
|
] }),
|
|
868
868
|
/* @__PURE__ */ a("div", { className: "space-y-4", children: [
|
|
869
869
|
/* @__PURE__ */ a("div", { className: "flex items-center justify-between", children: [
|
|
@@ -879,9 +879,9 @@ function jm({
|
|
|
879
879
|
] }),
|
|
880
880
|
i.joins.length === 0 ? /* @__PURE__ */ e("div", { className: "rounded-lg border border-dashed py-8 text-center text-muted-foreground", children: /* @__PURE__ */ e("p", { children: "No joins configured. Add a join to connect multiple data sources." }) }) : /* @__PURE__ */ e("div", { className: "max-h-[300px] space-y-4 overflow-y-auto", children: i.joins.map((N) => {
|
|
881
881
|
const M = s.find(
|
|
882
|
-
(
|
|
882
|
+
(A) => A.name === N.source.name
|
|
883
883
|
), R = s.find(
|
|
884
|
-
(
|
|
884
|
+
(A) => A.name === N.target.name
|
|
885
885
|
), g = u.has(N.id);
|
|
886
886
|
return /* @__PURE__ */ a(Qn, { className: "border", children: [
|
|
887
887
|
/* @__PURE__ */ e(si, { className: "pb-3", children: /* @__PURE__ */ a("div", { className: "flex items-center justify-between", children: [
|
|
@@ -948,16 +948,16 @@ function jm({
|
|
|
948
948
|
te,
|
|
949
949
|
{
|
|
950
950
|
value: N.source.name,
|
|
951
|
-
onValueChange: (
|
|
951
|
+
onValueChange: (A) => {
|
|
952
952
|
const T = s.find(
|
|
953
|
-
(_) => _.name ===
|
|
953
|
+
(_) => _.name === A
|
|
954
954
|
);
|
|
955
955
|
m(N.id, {
|
|
956
956
|
source: {
|
|
957
957
|
connectionId: (T == null ? void 0 : T.connectionId) || "",
|
|
958
958
|
connectionType: (T == null ? void 0 : T.connectionType) || "none",
|
|
959
959
|
type: (T == null ? void 0 : T.type) || "table",
|
|
960
|
-
name:
|
|
960
|
+
name: A,
|
|
961
961
|
database: T == null ? void 0 : T.database,
|
|
962
962
|
schema: T == null ? void 0 : T.schema
|
|
963
963
|
}
|
|
@@ -966,24 +966,24 @@ function jm({
|
|
|
966
966
|
children: [
|
|
967
967
|
/* @__PURE__ */ e(ae, { children: /* @__PURE__ */ e(ne, { placeholder: "Select source..." }) }),
|
|
968
968
|
/* @__PURE__ */ e(se, { children: C(N.id).map(
|
|
969
|
-
(
|
|
969
|
+
(A) => /* @__PURE__ */ e(
|
|
970
970
|
j,
|
|
971
971
|
{
|
|
972
972
|
className: "hover:bg-muted",
|
|
973
|
-
value:
|
|
973
|
+
value: A.name,
|
|
974
974
|
children: /* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
|
|
975
975
|
/* @__PURE__ */ e(
|
|
976
976
|
We,
|
|
977
977
|
{
|
|
978
978
|
variant: "outline",
|
|
979
979
|
className: "text-xs",
|
|
980
|
-
children:
|
|
980
|
+
children: A.type
|
|
981
981
|
}
|
|
982
982
|
),
|
|
983
|
-
|
|
983
|
+
A.name
|
|
984
984
|
] })
|
|
985
985
|
},
|
|
986
|
-
|
|
986
|
+
A.name
|
|
987
987
|
)
|
|
988
988
|
) })
|
|
989
989
|
]
|
|
@@ -996,8 +996,8 @@ function jm({
|
|
|
996
996
|
te,
|
|
997
997
|
{
|
|
998
998
|
value: N.joinType,
|
|
999
|
-
onValueChange: (
|
|
1000
|
-
joinType:
|
|
999
|
+
onValueChange: (A) => m(N.id, {
|
|
1000
|
+
joinType: A
|
|
1001
1001
|
}),
|
|
1002
1002
|
children: [
|
|
1003
1003
|
/* @__PURE__ */ e(ae, { children: /* @__PURE__ */ e(ne, {}) }),
|
|
@@ -1045,16 +1045,16 @@ function jm({
|
|
|
1045
1045
|
te,
|
|
1046
1046
|
{
|
|
1047
1047
|
value: N.target.name,
|
|
1048
|
-
onValueChange: (
|
|
1048
|
+
onValueChange: (A) => {
|
|
1049
1049
|
const T = s.find(
|
|
1050
|
-
(_) => _.name ===
|
|
1050
|
+
(_) => _.name === A
|
|
1051
1051
|
);
|
|
1052
1052
|
m(N.id, {
|
|
1053
1053
|
target: {
|
|
1054
1054
|
connectionId: (T == null ? void 0 : T.connectionId) || "",
|
|
1055
1055
|
connectionType: (T == null ? void 0 : T.connectionType) || "none",
|
|
1056
1056
|
type: (T == null ? void 0 : T.type) || "table",
|
|
1057
|
-
name:
|
|
1057
|
+
name: A,
|
|
1058
1058
|
database: T == null ? void 0 : T.database,
|
|
1059
1059
|
schema: T == null ? void 0 : T.schema
|
|
1060
1060
|
}
|
|
@@ -1065,22 +1065,22 @@ function jm({
|
|
|
1065
1065
|
/* @__PURE__ */ e(ae, { children: /* @__PURE__ */ e(ne, { placeholder: "Select target..." }) }),
|
|
1066
1066
|
/* @__PURE__ */ e(se, { children: N.source.name ? k(
|
|
1067
1067
|
N.source.name
|
|
1068
|
-
).map((
|
|
1068
|
+
).map((A) => /* @__PURE__ */ e(
|
|
1069
1069
|
j,
|
|
1070
1070
|
{
|
|
1071
1071
|
className: "hover:bg-muted",
|
|
1072
|
-
value:
|
|
1072
|
+
value: A.name,
|
|
1073
1073
|
children: /* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
|
|
1074
1074
|
/* @__PURE__ */ e(
|
|
1075
1075
|
We,
|
|
1076
1076
|
{
|
|
1077
1077
|
variant: "outline",
|
|
1078
1078
|
className: "text-xs",
|
|
1079
|
-
children:
|
|
1079
|
+
children: A.type
|
|
1080
1080
|
}
|
|
1081
1081
|
),
|
|
1082
|
-
|
|
1083
|
-
|
|
1082
|
+
A.name,
|
|
1083
|
+
A.name === N.source.name && /* @__PURE__ */ e(
|
|
1084
1084
|
We,
|
|
1085
1085
|
{
|
|
1086
1086
|
variant: "outline",
|
|
@@ -1090,7 +1090,7 @@ function jm({
|
|
|
1090
1090
|
)
|
|
1091
1091
|
] })
|
|
1092
1092
|
},
|
|
1093
|
-
|
|
1093
|
+
A.name
|
|
1094
1094
|
)) : [] })
|
|
1095
1095
|
]
|
|
1096
1096
|
}
|
|
@@ -1114,7 +1114,7 @@ function jm({
|
|
|
1114
1114
|
}
|
|
1115
1115
|
)
|
|
1116
1116
|
] }),
|
|
1117
|
-
N.joinKeyGroups.length === 0 ? /* @__PURE__ */ e("div", { className: "rounded-md border p-3 text-center text-sm text-gray-500", children: "No join conditions defined. Add condition groups to specify how data sources should be joined." }) : /* @__PURE__ */ e("div", { className: "space-y-4", children: N.joinKeyGroups.map((
|
|
1117
|
+
N.joinKeyGroups.length === 0 ? /* @__PURE__ */ e("div", { className: "rounded-md border p-3 text-center text-sm text-gray-500", children: "No join conditions defined. Add condition groups to specify how data sources should be joined." }) : /* @__PURE__ */ e("div", { className: "space-y-4", children: N.joinKeyGroups.map((A, T) => /* @__PURE__ */ a(
|
|
1118
1118
|
"div",
|
|
1119
1119
|
{
|
|
1120
1120
|
className: "space-y-3 rounded-md border p-3",
|
|
@@ -1134,7 +1134,7 @@ function jm({
|
|
|
1134
1134
|
/* @__PURE__ */ a(
|
|
1135
1135
|
te,
|
|
1136
1136
|
{
|
|
1137
|
-
value:
|
|
1137
|
+
value: A.operator,
|
|
1138
1138
|
onValueChange: (_) => w(
|
|
1139
1139
|
N.id,
|
|
1140
1140
|
T,
|
|
@@ -1172,12 +1172,12 @@ function jm({
|
|
|
1172
1172
|
] })
|
|
1173
1173
|
] }),
|
|
1174
1174
|
/* @__PURE__ */ a("div", { className: "space-y-2", children: [
|
|
1175
|
-
|
|
1175
|
+
A.keys.length === 0 ? /* @__PURE__ */ e("div", { className: "rounded-md border border-dashed p-3 text-center text-sm text-gray-500", children: "No conditions in this group. Add conditions to specify join criteria." }) : /* @__PURE__ */ e("div", { className: "space-y-2", children: A.keys.map((_, P) => /* @__PURE__ */ a(
|
|
1176
1176
|
"div",
|
|
1177
1177
|
{
|
|
1178
1178
|
className: "flex flex-col items-start gap-2 rounded-md border p-2 sm:flex-row sm:items-center",
|
|
1179
1179
|
children: [
|
|
1180
|
-
P > 0 && /* @__PURE__ */ e("div", { className: "self-center rounded-md bg-gray-100 px-2 py-1 text-xs font-medium", children:
|
|
1180
|
+
P > 0 && /* @__PURE__ */ e("div", { className: "self-center rounded-md bg-gray-100 px-2 py-1 text-xs font-medium", children: A.operator }),
|
|
1181
1181
|
/* @__PURE__ */ e("div", { className: "mb-2 w-full sm:mb-0 sm:flex-1", children: /* @__PURE__ */ a(
|
|
1182
1182
|
te,
|
|
1183
1183
|
{
|
|
@@ -1346,7 +1346,7 @@ function jm({
|
|
|
1346
1346
|
] })
|
|
1347
1347
|
]
|
|
1348
1348
|
},
|
|
1349
|
-
|
|
1349
|
+
A.id
|
|
1350
1350
|
)) })
|
|
1351
1351
|
] })
|
|
1352
1352
|
] })
|
|
@@ -1542,17 +1542,17 @@ FROM ${O.name}`;
|
|
|
1542
1542
|
(L) => L.name === D.target.name
|
|
1543
1543
|
);
|
|
1544
1544
|
if (!I) return;
|
|
1545
|
-
const
|
|
1545
|
+
const E = D.joinKeyGroups.filter((L) => L.keys && L.keys.length > 0).map((L) => {
|
|
1546
1546
|
const N = L.keys.filter(
|
|
1547
1547
|
(M) => {
|
|
1548
|
-
var R, g,
|
|
1549
|
-
return ((R = M.source) == null ? void 0 : R.name) && ((g = M.target) == null ? void 0 : g.name) && ((
|
|
1548
|
+
var R, g, A, T;
|
|
1549
|
+
return ((R = M.source) == null ? void 0 : R.name) && ((g = M.target) == null ? void 0 : g.name) && ((A = M.source) == null ? void 0 : A.entityName) && ((T = M.target) == null ? void 0 : T.entityName);
|
|
1550
1550
|
}
|
|
1551
1551
|
).map(
|
|
1552
1552
|
(M) => `${M.source.entityName}.${M.source.name} ${M.operator} ${M.target.entityName}.${M.target.name}`
|
|
1553
1553
|
);
|
|
1554
1554
|
return N.length > 1 ? `(${N.join(` ${L.operator} `)})` : N[0];
|
|
1555
|
-
}).filter(Boolean), b =
|
|
1555
|
+
}).filter(Boolean), b = E.length > 1 ? E.join(" OR ") : E[0] || "condition_here";
|
|
1556
1556
|
S += `
|
|
1557
1557
|
${D.joinType} JOIN ${I.name}
|
|
1558
1558
|
ON ${b}`;
|
|
@@ -2161,7 +2161,7 @@ function no({
|
|
|
2161
2161
|
} catch (M) {
|
|
2162
2162
|
return console.error("Failed to copy debug payload", M), ut.error(`Unable to copy ${La(b).toLowerCase()}`), !1;
|
|
2163
2163
|
}
|
|
2164
|
-
}, I = async () => O ? D(O.target) : !1,
|
|
2164
|
+
}, I = async () => O ? D(O.target) : !1, E = (b) => {
|
|
2165
2165
|
if (v[b] === void 0) {
|
|
2166
2166
|
ut.error(`No ${La(b).toLowerCase()} available`);
|
|
2167
2167
|
return;
|
|
@@ -2243,7 +2243,7 @@ function no({
|
|
|
2243
2243
|
dt,
|
|
2244
2244
|
{
|
|
2245
2245
|
disabled: !w(b.target),
|
|
2246
|
-
onSelect: () =>
|
|
2246
|
+
onSelect: () => E(b.target),
|
|
2247
2247
|
className: W(
|
|
2248
2248
|
l === b.target && "bg-accent"
|
|
2249
2249
|
),
|
|
@@ -2477,7 +2477,7 @@ function uh({
|
|
|
2477
2477
|
}
|
|
2478
2478
|
), m = mn(
|
|
2479
2479
|
(K) => K.currentAIContext.selectedEntities
|
|
2480
|
-
), x = m.length, { setCurrentAIContext: y } = Ws(), [v, C] = G(""), [k, B] = G(""), [w, O] = G(""), [S, D] = G("draft"), [I,
|
|
2480
|
+
), x = m.length, { setCurrentAIContext: y } = Ws(), [v, C] = G(""), [k, B] = G(""), [w, O] = G(""), [S, D] = G("draft"), [I, E] = G("draft"), [b, L] = G(""), [N, M] = G(!1), [R, g] = G({ status: "idle" }), [A, T] = G(
|
|
2481
2481
|
Os
|
|
2482
2482
|
), [_, P] = G(!1), [V, q] = G(
|
|
2483
2483
|
() => Rn("inline-query-session")
|
|
@@ -2550,12 +2550,12 @@ function uh({
|
|
|
2550
2550
|
runId: re,
|
|
2551
2551
|
attemptCount: typeof (Z == null ? void 0 : Z.attemptCount) == "number" ? Z.attemptCount : pe.current,
|
|
2552
2552
|
errorCode: Z == null ? void 0 : Z.errorCode,
|
|
2553
|
-
hasTools: typeof (Z == null ? void 0 : Z.hasTools) == "boolean" ? Z.hasTools :
|
|
2553
|
+
hasTools: typeof (Z == null ? void 0 : Z.hasTools) == "boolean" ? Z.hasTools : A.hasTools,
|
|
2554
2554
|
entityCount: x,
|
|
2555
|
-
finalOutcome: (Z == null ? void 0 : Z.finalOutcome) ||
|
|
2555
|
+
finalOutcome: (Z == null ? void 0 : Z.finalOutcome) || A.finalOutcome
|
|
2556
2556
|
});
|
|
2557
2557
|
},
|
|
2558
|
-
[x,
|
|
2558
|
+
[x, A.finalOutcome, A.hasTools]
|
|
2559
2559
|
), ge = ke(
|
|
2560
2560
|
(K, re) => {
|
|
2561
2561
|
const Z = le.current;
|
|
@@ -2627,7 +2627,7 @@ function uh({
|
|
|
2627
2627
|
}
|
|
2628
2628
|
const Ee = Bl(re);
|
|
2629
2629
|
U(Z, Ee, {
|
|
2630
|
-
phase:
|
|
2630
|
+
phase: A.phase === "self-healing" ? "self-healing" : "drafting",
|
|
2631
2631
|
hasTools: !0
|
|
2632
2632
|
}), X("inline_tool_step", Z, { hasTools: !0 });
|
|
2633
2633
|
const tt = ((Zt = K.input) == null ? void 0 : Zt.sql) ?? ((ft = K.args) == null ? void 0 : ft.sql);
|
|
@@ -2644,7 +2644,7 @@ function uh({
|
|
|
2644
2644
|
s,
|
|
2645
2645
|
t,
|
|
2646
2646
|
X,
|
|
2647
|
-
|
|
2647
|
+
A.phase,
|
|
2648
2648
|
Je,
|
|
2649
2649
|
we,
|
|
2650
2650
|
U
|
|
@@ -3011,7 +3011,7 @@ function uh({
|
|
|
3011
3011
|
[o, w]
|
|
3012
3012
|
), Wt = w.trim().length > 0, Sn = ["valid", "invalid", "error"].includes(
|
|
3013
3013
|
R.status
|
|
3014
|
-
), sn = Wt && Sn, ms = R.status === "invalid", Tn = R.status === "validating", Da = Wt && k.length > 0 && k === v.trim(), Aa = Ft.length > 0, Ea = v.length > 0, Oa = Da && S === "draft", It = Da && S === "refine" && b === Ft, Vt = I === "refine" && !Aa ? "draft" : I, Xt = (Vt === "refine" ? It : Oa) ? "Open composer preview" : "Generate composer SQL", kn = v.trim().length > 0 || k.trim().length > 0 || Wt || R.status !== "idle" ||
|
|
3014
|
+
), sn = Wt && Sn, ms = R.status === "invalid", Tn = R.status === "validating", Da = Wt && k.length > 0 && k === v.trim(), Aa = Ft.length > 0, Ea = v.length > 0, Oa = Da && S === "draft", It = Da && S === "refine" && b === Ft, Vt = I === "refine" && !Aa ? "draft" : I, Xt = (Vt === "refine" ? It : Oa) ? "Open composer preview" : "Generate composer SQL", kn = v.trim().length > 0 || k.trim().length > 0 || Wt || R.status !== "idle" || A.timelineSteps.length > 0, rn = ke((K = "draft") => {
|
|
3015
3015
|
if (Be)
|
|
3016
3016
|
return;
|
|
3017
3017
|
if ((K === "refine" ? It : Oa) && !_) {
|
|
@@ -3034,7 +3034,7 @@ function uh({
|
|
|
3034
3034
|
},
|
|
3035
3035
|
[He]
|
|
3036
3036
|
), fs = ke(() => {
|
|
3037
|
-
Be || (He("cancelled"), ie.current = !1, Q.current += 1, Te.current = "", pe.current = 0, C(""), B(""), O(""), D("draft"),
|
|
3037
|
+
Be || (He("cancelled"), ie.current = !1, Q.current += 1, Te.current = "", pe.current = 0, C(""), B(""), O(""), D("draft"), E("draft"), L(""), M(!1), g({ status: "idle" }), it(), ot([]), et((K) => ({
|
|
3038
3038
|
...Os,
|
|
3039
3039
|
runId: K.runId
|
|
3040
3040
|
})));
|
|
@@ -3049,9 +3049,9 @@ function uh({
|
|
|
3049
3049
|
K || He("cancelled"), P(K);
|
|
3050
3050
|
},
|
|
3051
3051
|
[He]
|
|
3052
|
-
), Dt =
|
|
3053
|
-
(K) => K ===
|
|
3054
|
-
), In =
|
|
3052
|
+
), Dt = A.timelineSteps.findIndex(
|
|
3053
|
+
(K) => K === A.activeStep
|
|
3054
|
+
), In = A.phase === "self-healing" ? "Fixing validation issue" : A.phase === "validating" ? "Validating SQL" : A.activeStep || "Drafting SQL", Fa = R.status === "valid" ? {
|
|
3055
3055
|
label: "Validation passed",
|
|
3056
3056
|
className: "border-emerald-500/30 bg-emerald-500/10 text-emerald-700",
|
|
3057
3057
|
detail: R.message
|
|
@@ -3158,7 +3158,7 @@ function uh({
|
|
|
3158
3158
|
Vt !== "draft" ? "text-muted-foreground hover:text-foreground" : ""
|
|
3159
3159
|
].join(" "),
|
|
3160
3160
|
onClick: () => {
|
|
3161
|
-
|
|
3161
|
+
E("draft"), M(!1);
|
|
3162
3162
|
},
|
|
3163
3163
|
children: "Draft New"
|
|
3164
3164
|
}
|
|
@@ -3173,7 +3173,7 @@ function uh({
|
|
|
3173
3173
|
"h-6 rounded-[6px] px-2 text-xs",
|
|
3174
3174
|
Vt !== "refine" ? "text-muted-foreground hover:text-foreground" : ""
|
|
3175
3175
|
].join(" "),
|
|
3176
|
-
onClick: () =>
|
|
3176
|
+
onClick: () => E("refine"),
|
|
3177
3177
|
disabled: !Aa,
|
|
3178
3178
|
children: "Refine Current"
|
|
3179
3179
|
}
|
|
@@ -3205,10 +3205,10 @@ function uh({
|
|
|
3205
3205
|
)
|
|
3206
3206
|
] })
|
|
3207
3207
|
] }),
|
|
3208
|
-
|
|
3209
|
-
|
|
3210
|
-
const Z = K ===
|
|
3211
|
-
|
|
3208
|
+
A.timelineSteps.length > 0 && /* @__PURE__ */ a("div", { className: "flex flex-wrap items-center gap-1", children: [
|
|
3209
|
+
A.timelineSteps.map((K, re) => {
|
|
3210
|
+
const Z = K === A.activeStep && ["drafting", "validating", "self-healing"].includes(
|
|
3211
|
+
A.phase
|
|
3212
3212
|
), ye = !Z && Dt >= 0 && re < Dt;
|
|
3213
3213
|
return /* @__PURE__ */ e(
|
|
3214
3214
|
"span",
|
|
@@ -3217,7 +3217,7 @@ function uh({
|
|
|
3217
3217
|
"rounded-full border px-2 py-0.5 text-[11px]",
|
|
3218
3218
|
Z ? "border-foreground/30 bg-foreground/10 text-foreground" : ye ? "border-border/60 bg-muted/20 text-muted-foreground" : "border-border/50 bg-background text-muted-foreground/80"
|
|
3219
3219
|
].join(" "),
|
|
3220
|
-
children: ch(K,
|
|
3220
|
+
children: ch(K, A.attempt)
|
|
3221
3221
|
},
|
|
3222
3222
|
`${K}-${re}`
|
|
3223
3223
|
);
|
|
@@ -3257,7 +3257,7 @@ function uh({
|
|
|
3257
3257
|
onSelectionChange: de
|
|
3258
3258
|
}
|
|
3259
3259
|
) }),
|
|
3260
|
-
(Be ||
|
|
3260
|
+
(Be || A.phase === "self-healing" || R.status === "validating") && /* @__PURE__ */ a("div", { className: "flex items-center gap-2 rounded-md border border-border/60 bg-muted/20 px-3 py-2 text-xs text-muted-foreground", children: [
|
|
3261
3261
|
/* @__PURE__ */ e(la, { className: "size-3.5 animate-spin" }),
|
|
3262
3262
|
In
|
|
3263
3263
|
] }),
|
|
@@ -3387,7 +3387,7 @@ function mh() {
|
|
|
3387
3387
|
setCardSql: D,
|
|
3388
3388
|
setTempQueryData: I,
|
|
3389
3389
|
// setQueryError,
|
|
3390
|
-
setPythonStdOut:
|
|
3390
|
+
setPythonStdOut: E,
|
|
3391
3391
|
setCardPreferences: b,
|
|
3392
3392
|
setCardType: L,
|
|
3393
3393
|
setCardPython: N,
|
|
@@ -3396,7 +3396,7 @@ function mh() {
|
|
|
3396
3396
|
updateCardInFrame: g
|
|
3397
3397
|
} = xe();
|
|
3398
3398
|
F((ie) => ie.onSave), F((ie) => ie.onClose), F((ie) => ie.actions.setSqlGen);
|
|
3399
|
-
const
|
|
3399
|
+
const A = F((ie) => ie.runSql), T = F((ie) => ie.actions.setRunSql), _ = F(
|
|
3400
3400
|
(ie) => ie.actions.setIsSqlRunning
|
|
3401
3401
|
), {
|
|
3402
3402
|
data: P,
|
|
@@ -3414,17 +3414,17 @@ function mh() {
|
|
|
3414
3414
|
if (P && (P.rowLimitExceeded && ut.error("Row limit (10,000) exceeded. Refine your query.", {
|
|
3415
3415
|
position: "top-center",
|
|
3416
3416
|
richColors: !0
|
|
3417
|
-
}),
|
|
3417
|
+
}), E((P == null ? void 0 : P.output) || ""), P.records.length > 0)) {
|
|
3418
3418
|
const { dimensionKeys: ie } = $s(P.records);
|
|
3419
3419
|
S(ie);
|
|
3420
3420
|
}
|
|
3421
|
-
}, [P, S,
|
|
3422
|
-
(V || q) && _(!0), (Y || $) && _(!1), Y && (S([]),
|
|
3421
|
+
}, [P, S, E]), Ce(() => {
|
|
3422
|
+
(V || q) && _(!0), (Y || $) && _(!1), Y && (S([]), E(""));
|
|
3423
3423
|
}, [
|
|
3424
3424
|
V,
|
|
3425
3425
|
q,
|
|
3426
3426
|
P,
|
|
3427
|
-
|
|
3427
|
+
E,
|
|
3428
3428
|
Y,
|
|
3429
3429
|
$,
|
|
3430
3430
|
_,
|
|
@@ -3432,8 +3432,8 @@ function mh() {
|
|
|
3432
3432
|
// setQueryError,
|
|
3433
3433
|
le
|
|
3434
3434
|
]), Ce(() => {
|
|
3435
|
-
|
|
3436
|
-
}, [
|
|
3435
|
+
A && (t.getQueryData(ce) || he(), T(!1));
|
|
3436
|
+
}, [A, he, T, ce, t]);
|
|
3437
3437
|
const me = Ie(he);
|
|
3438
3438
|
me.current = he, Ce(() => {
|
|
3439
3439
|
if (w.current) {
|
|
@@ -3655,8 +3655,8 @@ function fh({
|
|
|
3655
3655
|
onSortChange: o,
|
|
3656
3656
|
isLoading: l
|
|
3657
3657
|
}) {
|
|
3658
|
-
var I,
|
|
3659
|
-
const d = ta.useMemo(() => Object.keys(t[0] ?? {}), [t]), i = s.sql && !((
|
|
3658
|
+
var I, E, b, L, N, M;
|
|
3659
|
+
const d = ta.useMemo(() => Object.keys(t[0] ?? {}), [t]), i = s.sql && !((E = (I = s.preferences) == null ? void 0 : I.tablePrefs) != null && E.enableDevModePagination) ? (L = (b = s.preferences) == null ? void 0 : b.tablePrefs) == null ? void 0 : L.pageSize : void 0, u = ta.useMemo(
|
|
3660
3660
|
() => {
|
|
3661
3661
|
var R;
|
|
3662
3662
|
return xi((R = s.config) == null ? void 0 : R.sortByColumns);
|
|
@@ -3688,7 +3688,7 @@ function fh({
|
|
|
3688
3688
|
return R;
|
|
3689
3689
|
}, [d, t]), B = ta.useMemo(
|
|
3690
3690
|
() => d.map((R) => {
|
|
3691
|
-
const
|
|
3691
|
+
const A = k[R] === "number";
|
|
3692
3692
|
return {
|
|
3693
3693
|
accessorKey: R,
|
|
3694
3694
|
enableSorting: f,
|
|
@@ -3700,7 +3700,7 @@ function fh({
|
|
|
3700
3700
|
className: W(
|
|
3701
3701
|
"flex select-none items-center gap-1.5 transition-colors",
|
|
3702
3702
|
T.getCanSort() && "cursor-pointer hover:text-foreground",
|
|
3703
|
-
|
|
3703
|
+
A && "justify-end"
|
|
3704
3704
|
),
|
|
3705
3705
|
onClick: () => T.getCanSort() && T.toggleSorting(T.getIsSorted() === "asc"),
|
|
3706
3706
|
children: [
|
|
@@ -3717,7 +3717,7 @@ function fh({
|
|
|
3717
3717
|
{
|
|
3718
3718
|
className: W(
|
|
3719
3719
|
"whitespace-pre-wrap break-all",
|
|
3720
|
-
|
|
3720
|
+
A && "text-right tabular-nums",
|
|
3721
3721
|
_ === null && "text-muted-foreground/50 italic"
|
|
3722
3722
|
),
|
|
3723
3723
|
children: ph(_)
|
|
@@ -3779,8 +3779,8 @@ function fh({
|
|
|
3779
3779
|
g % 2 === 1 && "bg-muted/20"
|
|
3780
3780
|
),
|
|
3781
3781
|
"data-state": R.getIsSelected() && "selected",
|
|
3782
|
-
children: R.getVisibleCells().map((
|
|
3783
|
-
const _ = k[
|
|
3782
|
+
children: R.getVisibleCells().map((A) => {
|
|
3783
|
+
const _ = k[A.column.id] === "number";
|
|
3784
3784
|
return /* @__PURE__ */ e(
|
|
3785
3785
|
ul,
|
|
3786
3786
|
{
|
|
@@ -3789,11 +3789,11 @@ function fh({
|
|
|
3789
3789
|
_ && "text-right"
|
|
3790
3790
|
),
|
|
3791
3791
|
children: dl(
|
|
3792
|
-
|
|
3793
|
-
|
|
3792
|
+
A.column.columnDef.cell,
|
|
3793
|
+
A.getContext()
|
|
3794
3794
|
)
|
|
3795
3795
|
},
|
|
3796
|
-
|
|
3796
|
+
A.id
|
|
3797
3797
|
);
|
|
3798
3798
|
})
|
|
3799
3799
|
},
|
|
@@ -4171,13 +4171,13 @@ function ro({
|
|
|
4171
4171
|
n,
|
|
4172
4172
|
D,
|
|
4173
4173
|
w == null ? void 0 : w.slots
|
|
4174
|
-
) ?? n.type, [k, O, D, n, w == null ? void 0 : w.slots]),
|
|
4175
|
-
() =>
|
|
4176
|
-
[n,
|
|
4177
|
-
), L = oe(() => I !== n.type ? { ...n, type: I } : n, [n, I]), { data: N, isLoading: M, isFetching: R, errorMessage: g, errorSql:
|
|
4174
|
+
) ?? n.type, [k, O, D, n, w == null ? void 0 : w.slots]), E = I ?? n.type, b = oe(
|
|
4175
|
+
() => E === n.type ? n : { ...n, type: E },
|
|
4176
|
+
[n, E]
|
|
4177
|
+
), L = oe(() => I !== n.type ? { ...n, type: I } : n, [n, I]), { data: N, isLoading: M, isFetching: R, errorMessage: g, errorSql: A, pagination: T } = Nt(L), { handleOpenInEditor: _, handleDebugWithAssistant: P } = so(g, A || n.sql || n.python), V = oe(() => (N == null ? void 0 : N.records) || [], [N == null ? void 0 : N.records]), { setCard: q, updateCardInFrame: $ } = xe(), { data: Y } = sr(b), le = b.id, Q = b.config, ce = b.interactionConfig, he = b.customCfg, Oe = b.preferences, Fe = b.queryConfig, me = !!b.sql, pe = N == null ? void 0 : N.records, Te = oe(
|
|
4178
4178
|
() => ({
|
|
4179
4179
|
id: le,
|
|
4180
|
-
type:
|
|
4180
|
+
type: E,
|
|
4181
4181
|
config: Q,
|
|
4182
4182
|
interactionConfig: ce,
|
|
4183
4183
|
// Chart config only needs SQL-mode presence here, not the raw draft text.
|
|
@@ -4185,14 +4185,14 @@ function ro({
|
|
|
4185
4185
|
}),
|
|
4186
4186
|
[
|
|
4187
4187
|
le,
|
|
4188
|
-
|
|
4188
|
+
E,
|
|
4189
4189
|
Q,
|
|
4190
4190
|
ce,
|
|
4191
4191
|
me
|
|
4192
4192
|
]
|
|
4193
4193
|
), Pe = oe(() => {
|
|
4194
4194
|
var de;
|
|
4195
|
-
return
|
|
4195
|
+
return E !== "pivotTable" || !((de = N == null ? void 0 : N.records) != null && de.length) ? null : {
|
|
4196
4196
|
records: N.records,
|
|
4197
4197
|
columnSubtotalMeta: N.columnSubtotalMeta,
|
|
4198
4198
|
subtotalColumns: N.subtotalColumns || [],
|
|
@@ -4200,7 +4200,7 @@ function ro({
|
|
|
4200
4200
|
groupByColumns: N.groupByColumns
|
|
4201
4201
|
};
|
|
4202
4202
|
}, [
|
|
4203
|
-
|
|
4203
|
+
E,
|
|
4204
4204
|
N == null ? void 0 : N.records,
|
|
4205
4205
|
N == null ? void 0 : N.columnSubtotalMeta,
|
|
4206
4206
|
N == null ? void 0 : N.subtotalColumns,
|
|
@@ -4222,8 +4222,8 @@ function ro({
|
|
|
4222
4222
|
dataSource: n.dataSource,
|
|
4223
4223
|
dashboardFilters: d,
|
|
4224
4224
|
errorMessage: g || void 0,
|
|
4225
|
-
errorSql:
|
|
4226
|
-
generatedSql:
|
|
4225
|
+
errorSql: A || n.sql || n.python,
|
|
4226
|
+
generatedSql: A || n.sql
|
|
4227
4227
|
},
|
|
4228
4228
|
metadata: {
|
|
4229
4229
|
url: de,
|
|
@@ -4232,7 +4232,7 @@ function ro({
|
|
|
4232
4232
|
viewport: ge
|
|
4233
4233
|
}
|
|
4234
4234
|
};
|
|
4235
|
-
}, [h, p, n, d, g,
|
|
4235
|
+
}, [h, p, n, d, g, A]), ze = (de, X) => {
|
|
4236
4236
|
var we, $e;
|
|
4237
4237
|
const ge = {
|
|
4238
4238
|
...n,
|
|
@@ -4261,7 +4261,7 @@ function ro({
|
|
|
4261
4261
|
}, lt = oe(() => !le || !pe ? null : wi({
|
|
4262
4262
|
card: Te,
|
|
4263
4263
|
data: pe,
|
|
4264
|
-
cardType:
|
|
4264
|
+
cardType: E,
|
|
4265
4265
|
queryConfig: Fe,
|
|
4266
4266
|
// cfg: card.cfg,
|
|
4267
4267
|
customCfg: he,
|
|
@@ -4276,7 +4276,7 @@ function ro({
|
|
|
4276
4276
|
Oe,
|
|
4277
4277
|
Fe,
|
|
4278
4278
|
pe,
|
|
4279
|
-
|
|
4279
|
+
E,
|
|
4280
4280
|
Y
|
|
4281
4281
|
]);
|
|
4282
4282
|
function pt(de) {
|
|
@@ -4289,7 +4289,7 @@ function ro({
|
|
|
4289
4289
|
xr,
|
|
4290
4290
|
{
|
|
4291
4291
|
error: g,
|
|
4292
|
-
errorSql:
|
|
4292
|
+
errorSql: A || n.sql || n.python,
|
|
4293
4293
|
onOpenInEditor: _,
|
|
4294
4294
|
onDebugWithAssistant: P,
|
|
4295
4295
|
onSendFeedback: ue,
|
|
@@ -4300,9 +4300,9 @@ function ro({
|
|
|
4300
4300
|
/* @__PURE__ */ e("p", { className: "text-sm text-muted-foreground", children: "No results to display" })
|
|
4301
4301
|
] });
|
|
4302
4302
|
if ((M || R) && (!(N != null && N.records) || N.records.length === 0))
|
|
4303
|
-
return
|
|
4303
|
+
return E === "table" || E === "detailTable" ? /* @__PURE__ */ e("div", { className: "relative mb-2 flex h-full min-h-0 w-full flex-1 grow basis-0", children: /* @__PURE__ */ e(gc, {}) }) : /* @__PURE__ */ e("div", { className: "z-50 flex h-full items-center justify-center", children: /* @__PURE__ */ e(zt, { size: "md", color: "muted", "aria-label": "Loading data" }) });
|
|
4304
4304
|
if (!b.id) return null;
|
|
4305
|
-
if (
|
|
4305
|
+
if (E === "custom")
|
|
4306
4306
|
return pt(n);
|
|
4307
4307
|
if (![
|
|
4308
4308
|
"table",
|
|
@@ -4310,14 +4310,14 @@ function ro({
|
|
|
4310
4310
|
"aggregateTable",
|
|
4311
4311
|
"detailTable",
|
|
4312
4312
|
"custom"
|
|
4313
|
-
].includes(
|
|
4313
|
+
].includes(E) && lt)
|
|
4314
4314
|
return /* @__PURE__ */ e("div", { className: "relative h-full min-h-0 w-full flex-1 grow basis-0", children: M || R ? /* @__PURE__ */ e(Ne, {}) : /* @__PURE__ */ e(
|
|
4315
4315
|
xc,
|
|
4316
4316
|
{
|
|
4317
4317
|
cfg: lt
|
|
4318
4318
|
}
|
|
4319
4319
|
) });
|
|
4320
|
-
if (
|
|
4320
|
+
if (E === "table" || E === "detailTable")
|
|
4321
4321
|
return /* @__PURE__ */ e("div", { className: "relative mb-2 flex h-full min-h-0 w-full flex-1 grow basis-0", children: /* @__PURE__ */ e(
|
|
4322
4322
|
hn,
|
|
4323
4323
|
{
|
|
@@ -4330,7 +4330,7 @@ function ro({
|
|
|
4330
4330
|
isLoading: M || R
|
|
4331
4331
|
}
|
|
4332
4332
|
) });
|
|
4333
|
-
if (
|
|
4333
|
+
if (E === "pivotTable" && Re)
|
|
4334
4334
|
return /* @__PURE__ */ e("div", { className: "relative mb-2 flex h-full min-h-0 w-full flex-1 grow basis-0", children: /* @__PURE__ */ e(
|
|
4335
4335
|
bc,
|
|
4336
4336
|
{
|
|
@@ -4353,7 +4353,7 @@ function ro({
|
|
|
4353
4353
|
}
|
|
4354
4354
|
}
|
|
4355
4355
|
) });
|
|
4356
|
-
if (
|
|
4356
|
+
if (E === "aggregateTable")
|
|
4357
4357
|
return /* @__PURE__ */ e("div", { className: "relative mb-2 flex h-full min-h-0 w-full flex-1 grow basis-0", children: /* @__PURE__ */ e(
|
|
4358
4358
|
yc,
|
|
4359
4359
|
{
|
|
@@ -4625,7 +4625,7 @@ function Nh({
|
|
|
4625
4625
|
} catch {
|
|
4626
4626
|
p("Invalid JSON configuration");
|
|
4627
4627
|
}
|
|
4628
|
-
},
|
|
4628
|
+
}, E = Object.keys(y || {}).length === 0;
|
|
4629
4629
|
return /* @__PURE__ */ a(pa, { open: r, onOpenChange: c, children: [
|
|
4630
4630
|
/* @__PURE__ */ e(Cc, { asChild: !0, children: t === "menu" ? /* @__PURE__ */ a(
|
|
4631
4631
|
H,
|
|
@@ -4634,7 +4634,7 @@ function Nh({
|
|
|
4634
4634
|
onClick: D,
|
|
4635
4635
|
className: W(
|
|
4636
4636
|
"h-8 w-full justify-start gap-2 px-2 text-sm",
|
|
4637
|
-
|
|
4637
|
+
E ? "" : "text-green-600 hover:text-green-700",
|
|
4638
4638
|
s
|
|
4639
4639
|
),
|
|
4640
4640
|
children: [
|
|
@@ -4648,7 +4648,7 @@ function Nh({
|
|
|
4648
4648
|
tooltip: "Customize Visual",
|
|
4649
4649
|
onClick: D,
|
|
4650
4650
|
className: W(
|
|
4651
|
-
|
|
4651
|
+
E ? "" : "text-green-600 hover:text-green-700",
|
|
4652
4652
|
s
|
|
4653
4653
|
),
|
|
4654
4654
|
children: /* @__PURE__ */ e(hl, { className: "h-4 w-4" })
|
|
@@ -4849,7 +4849,7 @@ function wh({ onChartSelect: t, onClose: s }) {
|
|
|
4849
4849
|
name: b.name
|
|
4850
4850
|
};
|
|
4851
4851
|
l(L);
|
|
4852
|
-
},
|
|
4852
|
+
}, E = (b) => {
|
|
4853
4853
|
const L = {
|
|
4854
4854
|
type: "custom",
|
|
4855
4855
|
id: b.name,
|
|
@@ -4897,7 +4897,7 @@ function wh({ onChartSelect: t, onClose: s }) {
|
|
|
4897
4897
|
pluginName: b.pluginName,
|
|
4898
4898
|
isStarred: o("custom", b.name),
|
|
4899
4899
|
onSelect: () => D(b),
|
|
4900
|
-
onToggleStar: () =>
|
|
4900
|
+
onToggleStar: () => E(b)
|
|
4901
4901
|
},
|
|
4902
4902
|
`${b.url}-${b.name}-${L}`
|
|
4903
4903
|
)) })
|
|
@@ -4915,7 +4915,7 @@ function Sh({
|
|
|
4915
4915
|
selectedChart: t,
|
|
4916
4916
|
onChartChange: s
|
|
4917
4917
|
}) {
|
|
4918
|
-
var S, D, I,
|
|
4918
|
+
var S, D, I, E;
|
|
4919
4919
|
const n = F((b) => b.card), r = F((b) => b.frame), c = F((b) => b.isDevMode), {
|
|
4920
4920
|
replaceFrameCards: o,
|
|
4921
4921
|
clearModeDrafts: l,
|
|
@@ -4937,7 +4937,7 @@ function Sh({
|
|
|
4937
4937
|
);
|
|
4938
4938
|
},
|
|
4939
4939
|
[f, (D = u == null ? void 0 : u.customCardPreferences) == null ? void 0 : D.componentName]
|
|
4940
|
-
), p = Ta(u, h) === "multiple", m = bt(), x = p ? m : t ?? n.type, y = (I = n == null ? void 0 : n.customCardPreferences) == null ? void 0 : I.componentName, v = (
|
|
4940
|
+
), p = Ta(u, h) === "multiple", m = bt(), x = p ? m : t ?? n.type, y = (I = n == null ? void 0 : n.customCardPreferences) == null ? void 0 : I.componentName, v = (E = u == null ? void 0 : u.customCardPreferences) == null ? void 0 : E.componentName, C = p && !!v, k = oe(() => {
|
|
4941
4941
|
const b = pl.find((L) => L.id === x);
|
|
4942
4942
|
return b ? b.label : x === "custom" ? y || "Custom Visual" : "Select chart type";
|
|
4943
4943
|
}, [x, y]), B = oe(() => {
|
|
@@ -5111,13 +5111,13 @@ function vr({
|
|
|
5111
5111
|
label: n = "Display Options"
|
|
5112
5112
|
}) {
|
|
5113
5113
|
var y, v, C, k, B, w, O, S, D, I;
|
|
5114
|
-
const r = F((
|
|
5114
|
+
const r = F((E) => E.card), { setCardPreferences: c, updateCardInFrame: o, setCard: l } = xe(), [d, i] = G(!1), u = ((v = (y = r.preferences) == null ? void 0 : y.displayOptions) == null ? void 0 : v.showFilterInfo) ?? !0, f = ((k = (C = r.preferences) == null ? void 0 : C.displayOptions) == null ? void 0 : k.showCardToolbar) ?? !0, h = ((w = (B = r.preferences) == null ? void 0 : B.displayOptions) == null ? void 0 : w.showChrome) ?? !0, p = ((S = (O = r.preferences) == null ? void 0 : O.displayOptions) == null ? void 0 : S.allowScroll) ?? !0, m = ((I = (D = r.preferences) == null ? void 0 : D.displayOptions) == null ? void 0 : I.showInlineFilterBar) ?? !0, x = (E, b) => {
|
|
5115
5115
|
var M;
|
|
5116
5116
|
const L = {
|
|
5117
5117
|
...r.preferences,
|
|
5118
5118
|
displayOptions: {
|
|
5119
5119
|
...(M = r.preferences) == null ? void 0 : M.displayOptions,
|
|
5120
|
-
[
|
|
5120
|
+
[E]: b
|
|
5121
5121
|
}
|
|
5122
5122
|
};
|
|
5123
5123
|
c(L);
|
|
@@ -5151,10 +5151,10 @@ function vr({
|
|
|
5151
5151
|
ea,
|
|
5152
5152
|
{
|
|
5153
5153
|
checked: u,
|
|
5154
|
-
onCheckedChange: (
|
|
5155
|
-
x("showFilterInfo",
|
|
5154
|
+
onCheckedChange: (E) => {
|
|
5155
|
+
x("showFilterInfo", E);
|
|
5156
5156
|
},
|
|
5157
|
-
onSelect: (
|
|
5157
|
+
onSelect: (E) => E.preventDefault(),
|
|
5158
5158
|
className: "pr-2",
|
|
5159
5159
|
children: [
|
|
5160
5160
|
/* @__PURE__ */ e("span", { className: "flex-1", children: "Filter Info" }),
|
|
@@ -5166,10 +5166,10 @@ function vr({
|
|
|
5166
5166
|
ea,
|
|
5167
5167
|
{
|
|
5168
5168
|
checked: f,
|
|
5169
|
-
onCheckedChange: (
|
|
5170
|
-
x("showCardToolbar",
|
|
5169
|
+
onCheckedChange: (E) => {
|
|
5170
|
+
x("showCardToolbar", E);
|
|
5171
5171
|
},
|
|
5172
|
-
onSelect: (
|
|
5172
|
+
onSelect: (E) => E.preventDefault(),
|
|
5173
5173
|
className: "pr-2",
|
|
5174
5174
|
children: [
|
|
5175
5175
|
/* @__PURE__ */ e("span", { className: "flex-1", children: "Card Toolbar" }),
|
|
@@ -5181,10 +5181,10 @@ function vr({
|
|
|
5181
5181
|
ea,
|
|
5182
5182
|
{
|
|
5183
5183
|
checked: h,
|
|
5184
|
-
onCheckedChange: (
|
|
5185
|
-
x("showChrome",
|
|
5184
|
+
onCheckedChange: (E) => {
|
|
5185
|
+
x("showChrome", E);
|
|
5186
5186
|
},
|
|
5187
|
-
onSelect: (
|
|
5187
|
+
onSelect: (E) => E.preventDefault(),
|
|
5188
5188
|
className: "pr-2",
|
|
5189
5189
|
children: [
|
|
5190
5190
|
/* @__PURE__ */ e("span", { className: "flex-1", children: "Card Chrome" }),
|
|
@@ -5196,10 +5196,10 @@ function vr({
|
|
|
5196
5196
|
ea,
|
|
5197
5197
|
{
|
|
5198
5198
|
checked: p,
|
|
5199
|
-
onCheckedChange: (
|
|
5200
|
-
x("allowScroll",
|
|
5199
|
+
onCheckedChange: (E) => {
|
|
5200
|
+
x("allowScroll", E);
|
|
5201
5201
|
},
|
|
5202
|
-
onSelect: (
|
|
5202
|
+
onSelect: (E) => E.preventDefault(),
|
|
5203
5203
|
className: "pr-2",
|
|
5204
5204
|
children: [
|
|
5205
5205
|
/* @__PURE__ */ e("span", { className: "flex-1", children: "Allow Scroll" }),
|
|
@@ -5211,10 +5211,10 @@ function vr({
|
|
|
5211
5211
|
ea,
|
|
5212
5212
|
{
|
|
5213
5213
|
checked: m,
|
|
5214
|
-
onCheckedChange: (
|
|
5215
|
-
x("showInlineFilterBar",
|
|
5214
|
+
onCheckedChange: (E) => {
|
|
5215
|
+
x("showInlineFilterBar", E);
|
|
5216
5216
|
},
|
|
5217
|
-
onSelect: (
|
|
5217
|
+
onSelect: (E) => E.preventDefault(),
|
|
5218
5218
|
className: "pr-2",
|
|
5219
5219
|
children: [
|
|
5220
5220
|
/* @__PURE__ */ e("span", { className: "flex-1", children: "Inline Filter Bar" }),
|
|
@@ -5241,54 +5241,55 @@ function yr({
|
|
|
5241
5241
|
(I) => I.actions.setCardInlineFilterValue
|
|
5242
5242
|
), m = Me((I) => I.isVisualEditing), x = (o == null ? void 0 : o.inlineFilters) || [], y = ((S = (O = d == null ? void 0 : d.params) == null ? void 0 : O.calendarContext) == null ? void 0 : S.tz) || ((D = d == null ? void 0 : d.params) == null ? void 0 : D.timezone) || Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
5243
5243
|
function v(I) {
|
|
5244
|
-
var
|
|
5245
|
-
const
|
|
5244
|
+
var V, q, $, Y, le, Q, ce;
|
|
5245
|
+
const E = (($ = (q = (V = o == null ? void 0 : o.dataSource) == null ? void 0 : V.selectedEntities) == null ? void 0 : q[0]) == null ? void 0 : $.database) || "", b = I.qualifiedFieldName || I.name;
|
|
5246
5246
|
if (x.find(
|
|
5247
|
-
(
|
|
5247
|
+
(he) => Mc(he, I)
|
|
5248
5248
|
))
|
|
5249
5249
|
return;
|
|
5250
|
-
const N = I.qualifiedFieldName ? I.qualifiedFieldName.split(".").slice(0, -1).join(".") : I.qualifiedEntityName || I.entityName, R = Fc(I.name), g = Rc(I),
|
|
5251
|
-
connectionId: l || ((
|
|
5252
|
-
connectionType: (
|
|
5253
|
-
}), T = Pc(g), _ = {
|
|
5250
|
+
const N = I.qualifiedFieldName ? I.qualifiedFieldName.split(".").slice(0, -1).join(".") : I.qualifiedEntityName || I.entityName, R = Fc(I.name), g = Rc(I), A = Lc(o == null ? void 0 : o.dataSource, {
|
|
5251
|
+
connectionId: l || ((Y = o == null ? void 0 : o.dataSource) == null ? void 0 : Y.connectionId),
|
|
5252
|
+
connectionType: (le = o == null ? void 0 : o.dataSource) == null ? void 0 : le.connectionType
|
|
5253
|
+
}), T = Pc(g), _ = !!(((Q = o == null ? void 0 : o.dataSource) == null ? void 0 : Q.mode) === "semanticDomain" && ((ce = A == null ? void 0 : A.selectedEntities) != null && ce.length || A != null && A.semanticDomainId)), P = {
|
|
5254
5254
|
id: ha(),
|
|
5255
5255
|
column: b,
|
|
5256
5256
|
title: I.label || I.name,
|
|
5257
5257
|
dataType: I.dataType,
|
|
5258
5258
|
table: I.entityName || "",
|
|
5259
|
-
database:
|
|
5259
|
+
database: E,
|
|
5260
|
+
qualifiedTableName: N,
|
|
5260
5261
|
connectionId: l || "",
|
|
5261
5262
|
operation: "in",
|
|
5262
|
-
sql: T ? "" : Vc(
|
|
5263
|
+
sql: T || _ ? "" : Vc(
|
|
5263
5264
|
I.dataType,
|
|
5264
5265
|
N,
|
|
5265
5266
|
R
|
|
5266
5267
|
),
|
|
5267
5268
|
fieldMeta: g,
|
|
5268
|
-
semanticContext:
|
|
5269
|
+
semanticContext: A,
|
|
5269
5270
|
width: 250
|
|
5270
5271
|
// Default width for inline filters
|
|
5271
5272
|
};
|
|
5272
5273
|
i({
|
|
5273
5274
|
...o,
|
|
5274
|
-
inlineFilters: [...x,
|
|
5275
|
+
inlineFilters: [...x, P]
|
|
5275
5276
|
});
|
|
5276
5277
|
}
|
|
5277
5278
|
function C(I) {
|
|
5278
|
-
const
|
|
5279
|
+
const E = x.filter((b) => b.id !== I);
|
|
5279
5280
|
i({
|
|
5280
5281
|
...o,
|
|
5281
|
-
inlineFilters:
|
|
5282
|
+
inlineFilters: E
|
|
5282
5283
|
}), m ? h(o.id, I) : u(o.id, I);
|
|
5283
5284
|
}
|
|
5284
|
-
function k(I,
|
|
5285
|
+
function k(I, E) {
|
|
5285
5286
|
const b = x.map(
|
|
5286
|
-
(R) => R.id === I ? { ...R, ...
|
|
5287
|
+
(R) => R.id === I ? { ...R, ...E } : R
|
|
5287
5288
|
);
|
|
5288
5289
|
if (i({
|
|
5289
5290
|
...o,
|
|
5290
5291
|
inlineFilters: b
|
|
5291
|
-
}), !(Object.prototype.hasOwnProperty.call(
|
|
5292
|
+
}), !(Object.prototype.hasOwnProperty.call(E, "defaultValues") || Object.prototype.hasOwnProperty.call(E, "defaultDateFilter")))
|
|
5292
5293
|
return;
|
|
5293
5294
|
const N = b.find((R) => R.id === I);
|
|
5294
5295
|
if (!N)
|
|
@@ -5386,7 +5387,7 @@ function yr({
|
|
|
5386
5387
|
kh,
|
|
5387
5388
|
{
|
|
5388
5389
|
filter: I,
|
|
5389
|
-
onUpdate: (
|
|
5390
|
+
onUpdate: (E) => k(I.id, E),
|
|
5390
5391
|
onRemove: () => C(I.id)
|
|
5391
5392
|
},
|
|
5392
5393
|
I.id
|
|
@@ -5509,7 +5510,7 @@ function Oh({
|
|
|
5509
5510
|
), x = l ? 0 : n.reduce((B, w) => {
|
|
5510
5511
|
const O = y(w.target), S = Object.values(w.mapping).filter((D) => {
|
|
5511
5512
|
const I = w.target === "config_metric_selector" || w.target === "config_field_selector" ? typeof D == "string" ? D : D == null ? void 0 : D.id : typeof D == "string" ? D : void 0;
|
|
5512
|
-
return typeof I == "string" && !O.some((
|
|
5513
|
+
return typeof I == "string" && !O.some((E) => E.value === I);
|
|
5513
5514
|
}).length;
|
|
5514
5515
|
return B + S;
|
|
5515
5516
|
}, 0);
|
|
@@ -5616,24 +5617,24 @@ function Oh({
|
|
|
5616
5617
|
n.length === 0 ? /* @__PURE__ */ e("div", { className: "rounded-md border border-dashed p-3 text-sm text-muted-foreground", children: "This card is not using any controls yet." }) : n.map((B, w) => {
|
|
5617
5618
|
const O = h[B.target] || [], S = d.find(
|
|
5618
5619
|
(g) => g.id === B.controlId
|
|
5619
|
-
), D = S ? qc(S) : null, I = (D == null ? void 0 : D.source.kind) === "manual" ? D.source.options : [],
|
|
5620
|
+
), D = S ? qc(S) : null, I = (D == null ? void 0 : D.source.kind) === "manual" ? D.source.options : [], E = y(B.target), b = Array.from(
|
|
5620
5621
|
/* @__PURE__ */ new Set([
|
|
5621
5622
|
...I.map((g) => g.value),
|
|
5622
5623
|
...Object.keys(B.mapping)
|
|
5623
5624
|
])
|
|
5624
5625
|
).map((g) => {
|
|
5625
|
-
const
|
|
5626
|
+
const A = I.find((T) => T.value === g);
|
|
5626
5627
|
return {
|
|
5627
5628
|
value: g,
|
|
5628
|
-
label: (
|
|
5629
|
+
label: (A == null ? void 0 : A.label) || g
|
|
5629
5630
|
};
|
|
5630
5631
|
}), L = `${B.controlId}-${B.target}-${w}`, N = i[L] ?? w === 0, M = Object.keys(B.mapping).length, R = S != null && S.type ? Ih[S.type] || S.type : null;
|
|
5631
5632
|
return /* @__PURE__ */ a(
|
|
5632
5633
|
Pt,
|
|
5633
5634
|
{
|
|
5634
5635
|
open: N,
|
|
5635
|
-
onOpenChange: (g) => u((
|
|
5636
|
-
...
|
|
5636
|
+
onOpenChange: (g) => u((A) => ({
|
|
5637
|
+
...A,
|
|
5637
5638
|
[L]: g
|
|
5638
5639
|
})),
|
|
5639
5640
|
className: "rounded-md border",
|
|
@@ -5675,20 +5676,20 @@ function Oh({
|
|
|
5675
5676
|
}
|
|
5676
5677
|
)
|
|
5677
5678
|
] }),
|
|
5678
|
-
/* @__PURE__ */ e($t, { className: "space-y-3 border-t px-3 pb-3 pt-2", children: b.length === 0 ? /* @__PURE__ */ e("div", { className: "rounded-md border border-dashed p-3 text-sm text-muted-foreground", children: "Add choices to this control first so you can decide what each choice changes in the card." }) :
|
|
5679
|
+
/* @__PURE__ */ e($t, { className: "space-y-3 border-t px-3 pb-3 pt-2", children: b.length === 0 ? /* @__PURE__ */ e("div", { className: "rounded-md border border-dashed p-3 text-sm text-muted-foreground", children: "Add choices to this control first so you can decide what each choice changes in the card." }) : E.length === 0 ? /* @__PURE__ */ e("div", { className: "rounded-md border border-dashed p-3 text-sm text-muted-foreground", children: "No matching targets are available for this binding yet." }) : /* @__PURE__ */ a("div", { className: "space-y-2", children: [
|
|
5679
5680
|
/* @__PURE__ */ e(z, { className: "text-xs", children: "Map each choice" }),
|
|
5680
5681
|
/* @__PURE__ */ e("div", { className: "space-y-2", children: b.map((g) => {
|
|
5681
|
-
const
|
|
5682
|
-
|
|
5682
|
+
const A = B.mapping[g.value], T = B.target === "config_metric_selector" || B.target === "config_field_selector" ? typeof A == "string" ? A : A == null ? void 0 : A.id : typeof A == "string" ? A : void 0, _ = !l && typeof T == "string" && !E.some((q) => q.value === T), P = Dh(
|
|
5683
|
+
A,
|
|
5683
5684
|
T
|
|
5684
5685
|
), V = T && _ ? [
|
|
5685
|
-
...
|
|
5686
|
+
...E,
|
|
5686
5687
|
{
|
|
5687
5688
|
value: T,
|
|
5688
5689
|
label: "Needs remap",
|
|
5689
|
-
target:
|
|
5690
|
+
target: A
|
|
5690
5691
|
}
|
|
5691
|
-
] :
|
|
5692
|
+
] : E;
|
|
5692
5693
|
return /* @__PURE__ */ a(
|
|
5693
5694
|
"div",
|
|
5694
5695
|
{
|
|
@@ -5824,10 +5825,10 @@ function Fh({
|
|
|
5824
5825
|
})), I = S.choices.map((R) => ({
|
|
5825
5826
|
option: R,
|
|
5826
5827
|
target: S.targetMap[R.value]
|
|
5827
|
-
})),
|
|
5828
|
+
})), E = (R, g) => {
|
|
5828
5829
|
if (!v)
|
|
5829
5830
|
return;
|
|
5830
|
-
const
|
|
5831
|
+
const A = (g == null ? void 0 : g.type) === "rename" ? gl(v, {
|
|
5831
5832
|
type: "rename",
|
|
5832
5833
|
oldId: g.oldId,
|
|
5833
5834
|
newId: g.newId
|
|
@@ -5835,10 +5836,10 @@ function Fh({
|
|
|
5835
5836
|
type: "remove",
|
|
5836
5837
|
controlId: g.controlId
|
|
5837
5838
|
}) : v, T = {
|
|
5838
|
-
...
|
|
5839
|
+
...A,
|
|
5839
5840
|
controls: R,
|
|
5840
5841
|
controlBindings: Hc(
|
|
5841
|
-
|
|
5842
|
+
A.controlBindings,
|
|
5842
5843
|
R
|
|
5843
5844
|
)
|
|
5844
5845
|
};
|
|
@@ -5916,7 +5917,7 @@ function Fh({
|
|
|
5916
5917
|
availableFieldChoices: D,
|
|
5917
5918
|
availableMetricChoices: I,
|
|
5918
5919
|
onCreateFlowActiveChange: l,
|
|
5919
|
-
onChange: (R, g,
|
|
5920
|
+
onChange: (R, g, A) => E(R, A),
|
|
5920
5921
|
emptyMessage: "No card-scoped controls yet."
|
|
5921
5922
|
}
|
|
5922
5923
|
),
|
|
@@ -6011,7 +6012,7 @@ function Lh({
|
|
|
6011
6012
|
onPreviewToggle: s,
|
|
6012
6013
|
configCard: n
|
|
6013
6014
|
}) {
|
|
6014
|
-
var R, g,
|
|
6015
|
+
var R, g, A, T, _;
|
|
6015
6016
|
const r = F((P) => P.frame), c = F((P) => P.card), {
|
|
6016
6017
|
setFrame: o,
|
|
6017
6018
|
setActiveTabCardId: l,
|
|
@@ -6026,7 +6027,7 @@ function Lh({
|
|
|
6026
6027
|
var V;
|
|
6027
6028
|
return P.name === ((V = n == null ? void 0 : n.customCardPreferences) == null ? void 0 : V.componentName);
|
|
6028
6029
|
}
|
|
6029
|
-
), x = Ta(n, p) === "multiple", y = (p == null ? void 0 : p.minInputs) ?? ((
|
|
6030
|
+
), x = Ta(n, p) === "multiple", y = (p == null ? void 0 : p.minInputs) ?? ((A = n == null ? void 0 : n.customCardPreferences) == null ? void 0 : A.minInputs) ?? 1, v = (p == null ? void 0 : p.maxInputs) ?? ((T = n == null ? void 0 : n.customCardPreferences) == null ? void 0 : T.maxInputs), C = oe(
|
|
6030
6031
|
() => xn({
|
|
6031
6032
|
frame: r,
|
|
6032
6033
|
configCard: n,
|
|
@@ -6043,7 +6044,7 @@ function Lh({
|
|
|
6043
6044
|
const $ = Array.from(r.cards), [Y] = $.splice(parseInt(q), 1);
|
|
6044
6045
|
$.splice(V, 0, Y), o({ ...r, cards: $ });
|
|
6045
6046
|
};
|
|
6046
|
-
function
|
|
6047
|
+
function E(P) {
|
|
6047
6048
|
const V = (n == null ? void 0 : n.id) === P;
|
|
6048
6049
|
if (!(O && V ? r.cards.length > 1 : w)) return;
|
|
6049
6050
|
let $ = r.cards.filter((ce) => ce.id !== P);
|
|
@@ -6222,7 +6223,7 @@ function Lh({
|
|
|
6222
6223
|
nt,
|
|
6223
6224
|
{
|
|
6224
6225
|
className: "ml-2 size-3.5 text-muted-foreground hover:text-foreground",
|
|
6225
|
-
onClick: () =>
|
|
6226
|
+
onClick: () => E(P.id)
|
|
6226
6227
|
}
|
|
6227
6228
|
)
|
|
6228
6229
|
]
|
|
@@ -6281,25 +6282,25 @@ function ua({
|
|
|
6281
6282
|
colors: ((U = (Je = w == null ? void 0 : w.chart) == null ? void 0 : Je.dataset) == null ? void 0 : U.backgroundColor) || []
|
|
6282
6283
|
}, {
|
|
6283
6284
|
getCard: I,
|
|
6284
|
-
manifest:
|
|
6285
|
+
manifest: E,
|
|
6285
6286
|
isLoading: b
|
|
6286
|
-
} = Sa(((be = l == null ? void 0 : l.customCardPreferences) == null ? void 0 : be.url) || ""), L = (Le = l == null ? void 0 : l.customCardPreferences) == null ? void 0 : Le.componentName, N = L ? I(L) : null, M = (de =
|
|
6287
|
+
} = Sa(((be = l == null ? void 0 : l.customCardPreferences) == null ? void 0 : be.url) || ""), L = (Le = l == null ? void 0 : l.customCardPreferences) == null ? void 0 : Le.componentName, N = L ? I(L) : null, M = (de = E == null ? void 0 : E.visuals) == null ? void 0 : de.find(
|
|
6287
6288
|
(X) => X.name === L
|
|
6288
|
-
), R = Ta(l, M), g = c && R === "multiple" && !!l,
|
|
6289
|
+
), R = Ta(l, M), g = c && R === "multiple" && !!l, A = oe(() => xn({
|
|
6289
6290
|
frame: n,
|
|
6290
6291
|
configCard: l,
|
|
6291
6292
|
isMultiInputVisual: !0
|
|
6292
6293
|
}).map(
|
|
6293
6294
|
(ge) => (ge == null ? void 0 : ge.id) === r.id ? r : ge
|
|
6294
6295
|
), [n, l, r]), T = oe(
|
|
6295
|
-
() => Ei(
|
|
6296
|
-
[
|
|
6296
|
+
() => Ei(A),
|
|
6297
|
+
[A]
|
|
6297
6298
|
), _ = oe(() => {
|
|
6298
|
-
const X =
|
|
6299
|
+
const X = A.findIndex(
|
|
6299
6300
|
(ge) => (ge == null ? void 0 : ge.id) === r.id
|
|
6300
6301
|
);
|
|
6301
6302
|
return X < 0 ? -1 : Gt(r, X);
|
|
6302
|
-
}, [
|
|
6303
|
+
}, [A, r]), P = oe(() => !l || R !== "multiple" || _ < 0 ? r.type : Va(
|
|
6303
6304
|
r,
|
|
6304
6305
|
_,
|
|
6305
6306
|
M == null ? void 0 : M.slots
|
|
@@ -6399,7 +6400,7 @@ function ua({
|
|
|
6399
6400
|
)
|
|
6400
6401
|
);
|
|
6401
6402
|
return /* @__PURE__ */ a("div", { className: "relative flex h-full flex-col pl-2 pr-4", children: [
|
|
6402
|
-
|
|
6403
|
+
A.map((we, $e) => {
|
|
6403
6404
|
if (!we) return null;
|
|
6404
6405
|
const Ve = Gt(we, $e), st = Va(
|
|
6405
6406
|
we,
|
|
@@ -6576,7 +6577,7 @@ function io({
|
|
|
6576
6577
|
}
|
|
6577
6578
|
p(m), ut.success("Dynamic preview updated.");
|
|
6578
6579
|
}
|
|
6579
|
-
function
|
|
6580
|
+
function E() {
|
|
6580
6581
|
f(h);
|
|
6581
6582
|
}
|
|
6582
6583
|
function b() {
|
|
@@ -6703,7 +6704,7 @@ function io({
|
|
|
6703
6704
|
size: "sm",
|
|
6704
6705
|
variant: "outline",
|
|
6705
6706
|
className: "h-8 gap-1.5 px-2.5 text-xs",
|
|
6706
|
-
onClick:
|
|
6707
|
+
onClick: E,
|
|
6707
6708
|
disabled: !k,
|
|
6708
6709
|
children: [
|
|
6709
6710
|
/* @__PURE__ */ e(Qs, { className: "h-3.5 w-3.5 shrink-0" }),
|
|
@@ -6863,14 +6864,14 @@ function jl({
|
|
|
6863
6864
|
mergeDraftsIntoCard: S,
|
|
6864
6865
|
clearModeDrafts: D,
|
|
6865
6866
|
initializeModeDrafts: I,
|
|
6866
|
-
updatePageSize:
|
|
6867
|
+
updatePageSize: E
|
|
6867
6868
|
} = xe(), b = oe(() => m !== c.type ? { ...c, type: m } : c, [c, m]), {
|
|
6868
6869
|
data: L,
|
|
6869
6870
|
isLoading: N,
|
|
6870
6871
|
isFetching: M,
|
|
6871
6872
|
errorMessage: R,
|
|
6872
6873
|
errorSql: g,
|
|
6873
|
-
refetch:
|
|
6874
|
+
refetch: A,
|
|
6874
6875
|
queryKey: T,
|
|
6875
6876
|
pagination: _
|
|
6876
6877
|
} = Nt(b), P = Ie(T);
|
|
@@ -6994,7 +6995,7 @@ function jl({
|
|
|
6994
6995
|
}, 0);
|
|
6995
6996
|
return;
|
|
6996
6997
|
}
|
|
6997
|
-
|
|
6998
|
+
A();
|
|
6998
6999
|
},
|
|
6999
7000
|
children: /* @__PURE__ */ e(
|
|
7000
7001
|
Oi,
|
|
@@ -7157,7 +7158,7 @@ function jl({
|
|
|
7157
7158
|
card: b,
|
|
7158
7159
|
paginationMetadata: _,
|
|
7159
7160
|
onPaginationChange: le,
|
|
7160
|
-
onPageSizePreferenceChange:
|
|
7161
|
+
onPageSizePreferenceChange: E,
|
|
7161
7162
|
onSortChange: Q,
|
|
7162
7163
|
isLoading: N || M
|
|
7163
7164
|
}
|
|
@@ -7483,9 +7484,9 @@ function co() {
|
|
|
7483
7484
|
() => Ei(v),
|
|
7484
7485
|
[v]
|
|
7485
7486
|
), k = oe(
|
|
7486
|
-
() => C.map((g,
|
|
7487
|
+
() => C.map((g, A) => {
|
|
7487
7488
|
if (!g) return null;
|
|
7488
|
-
const T = Gt(g,
|
|
7489
|
+
const T = Gt(g, A), _ = Va(
|
|
7489
7490
|
g,
|
|
7490
7491
|
T,
|
|
7491
7492
|
f == null ? void 0 : f.slots
|
|
@@ -7505,16 +7506,16 @@ function co() {
|
|
|
7505
7506
|
[f == null ? void 0 : f.slots, k, x]
|
|
7506
7507
|
), w = oe(() => {
|
|
7507
7508
|
const g = v.findIndex(
|
|
7508
|
-
(
|
|
7509
|
+
(A) => (A == null ? void 0 : A.id) === r.id
|
|
7509
7510
|
);
|
|
7510
7511
|
return g < 0 ? -1 : Gt(r, g);
|
|
7511
7512
|
}, [v, r]);
|
|
7512
7513
|
function O(g) {
|
|
7513
7514
|
if (typeof g == "number")
|
|
7514
7515
|
return `Tab ${g + 1}`;
|
|
7515
|
-
const
|
|
7516
|
-
if (
|
|
7517
|
-
const [, _, P] =
|
|
7516
|
+
const A = g.match(/^(\d+)-(\d+)$/);
|
|
7517
|
+
if (A) {
|
|
7518
|
+
const [, _, P] = A;
|
|
7518
7519
|
return `Tabs ${Number(_) + 1}-${Number(P) + 1}`;
|
|
7519
7520
|
}
|
|
7520
7521
|
const T = g.match(/^(\d+)\+$/);
|
|
@@ -7523,9 +7524,9 @@ function co() {
|
|
|
7523
7524
|
function S(g) {
|
|
7524
7525
|
return g ? (Array.isArray(g) ? g : [g]).join(", ") : null;
|
|
7525
7526
|
}
|
|
7526
|
-
function D(g,
|
|
7527
|
+
function D(g, A, T = [], _ = "", P, V, q) {
|
|
7527
7528
|
const $ = I({
|
|
7528
|
-
key:
|
|
7529
|
+
key: A,
|
|
7529
7530
|
defaultValue: _,
|
|
7530
7531
|
settingsValue: V,
|
|
7531
7532
|
sourceCard: q
|
|
@@ -7538,8 +7539,8 @@ function co() {
|
|
|
7538
7539
|
$ ?? ""
|
|
7539
7540
|
),
|
|
7540
7541
|
onCommit: (Y) => {
|
|
7541
|
-
|
|
7542
|
-
key:
|
|
7542
|
+
E({
|
|
7543
|
+
key: A,
|
|
7543
7544
|
value: Y,
|
|
7544
7545
|
settingsField: P,
|
|
7545
7546
|
settingsValue: V,
|
|
@@ -7547,7 +7548,7 @@ function co() {
|
|
|
7547
7548
|
});
|
|
7548
7549
|
}
|
|
7549
7550
|
},
|
|
7550
|
-
|
|
7551
|
+
A
|
|
7551
7552
|
) : g === "select" ? /* @__PURE__ */ e(
|
|
7552
7553
|
sa,
|
|
7553
7554
|
{
|
|
@@ -7558,8 +7559,8 @@ function co() {
|
|
|
7558
7559
|
$ !== void 0 ? $ : _ ?? ""
|
|
7559
7560
|
),
|
|
7560
7561
|
onValueChange: (Y) => {
|
|
7561
|
-
|
|
7562
|
-
key:
|
|
7562
|
+
E({
|
|
7563
|
+
key: A,
|
|
7563
7564
|
value: Y,
|
|
7564
7565
|
settingsField: P,
|
|
7565
7566
|
settingsValue: V,
|
|
@@ -7571,29 +7572,29 @@ function co() {
|
|
|
7571
7572
|
}
|
|
7572
7573
|
function I({
|
|
7573
7574
|
key: g,
|
|
7574
|
-
defaultValue:
|
|
7575
|
+
defaultValue: A,
|
|
7575
7576
|
settingsValue: T,
|
|
7576
7577
|
sourceCard: _
|
|
7577
7578
|
}) {
|
|
7578
7579
|
const P = T == null ? void 0 : T[g];
|
|
7579
|
-
return P !== void 0 ? P : g === "title" && (_ == null ? void 0 : _.title) !== void 0 ? _.title : g === "description" && (_ == null ? void 0 : _.description) !== void 0 ? _.description :
|
|
7580
|
+
return P !== void 0 ? P : g === "title" && (_ == null ? void 0 : _.title) !== void 0 ? _.title : g === "description" && (_ == null ? void 0 : _.description) !== void 0 ? _.description : A;
|
|
7580
7581
|
}
|
|
7581
|
-
function
|
|
7582
|
+
function E({
|
|
7582
7583
|
key: g,
|
|
7583
|
-
value:
|
|
7584
|
+
value: A,
|
|
7584
7585
|
settingsField: T,
|
|
7585
7586
|
settingsValue: _,
|
|
7586
7587
|
sourceCard: P
|
|
7587
7588
|
}) {
|
|
7588
7589
|
const V = { ..._ || {} }, q = g === "title" && (P == null ? void 0 : P.title) !== void 0, $ = g === "description" && (P == null ? void 0 : P.description) !== void 0;
|
|
7589
|
-
q &&
|
|
7590
|
+
q && A === String((P == null ? void 0 : P.title) ?? "") || $ && A === String((P == null ? void 0 : P.description) ?? "") ? delete V[g] : V[g] = A, o({
|
|
7590
7591
|
...t || {},
|
|
7591
7592
|
[T]: V
|
|
7592
7593
|
});
|
|
7593
7594
|
}
|
|
7594
7595
|
function b({
|
|
7595
7596
|
settingsSchema: g,
|
|
7596
|
-
settingsField:
|
|
7597
|
+
settingsField: A,
|
|
7597
7598
|
settingsValue: T,
|
|
7598
7599
|
sourceCard: _,
|
|
7599
7600
|
headerLabel: P
|
|
@@ -7616,7 +7617,7 @@ function co() {
|
|
|
7616
7617
|
q,
|
|
7617
7618
|
$.options,
|
|
7618
7619
|
$.defaultValue,
|
|
7619
|
-
|
|
7620
|
+
A,
|
|
7620
7621
|
T,
|
|
7621
7622
|
_
|
|
7622
7623
|
)
|
|
@@ -7628,7 +7629,7 @@ function co() {
|
|
|
7628
7629
|
return /* @__PURE__ */ a(Ne, { children: [
|
|
7629
7630
|
p && /* @__PURE__ */ a("div", { className: "space-y-3", children: [
|
|
7630
7631
|
/* @__PURE__ */ e(z, { children: "Slot Guide" }),
|
|
7631
|
-
/* @__PURE__ */ e("div", { className: "space-y-3 rounded-md border border-border bg-muted/40 px-3 py-2 text-xs", children: f != null && f.slots && f.slots.length > 0 ? /* @__PURE__ */ e("div", { className: "space-y-3", children: f.slots.map((g,
|
|
7632
|
+
/* @__PURE__ */ e("div", { className: "space-y-3 rounded-md border border-border bg-muted/40 px-3 py-2 text-xs", children: f != null && f.slots && f.slots.length > 0 ? /* @__PURE__ */ e("div", { className: "space-y-3", children: f.slots.map((g, A) => /* @__PURE__ */ a("div", { className: "space-y-1", children: [
|
|
7632
7633
|
/* @__PURE__ */ a("div", { className: "flex items-center gap-2 text-foreground", children: [
|
|
7633
7634
|
/* @__PURE__ */ e("span", { className: "font-medium", children: O(g.position) }),
|
|
7634
7635
|
/* @__PURE__ */ e("span", { className: "text-muted-foreground", children: "•" }),
|
|
@@ -7642,7 +7643,7 @@ function co() {
|
|
|
7642
7643
|
] }),
|
|
7643
7644
|
g.required && /* @__PURE__ */ e("span", { children: "Required" })
|
|
7644
7645
|
] })
|
|
7645
|
-
] }, `${g.label}-${
|
|
7646
|
+
] }, `${g.label}-${A}`)) }) : /* @__PURE__ */ a("div", { className: "space-y-1 text-muted-foreground", children: [
|
|
7646
7647
|
/* @__PURE__ */ e("p", { children: "This visual renders all tabs in a flexible layout. Add as many tabs as needed." }),
|
|
7647
7648
|
(x || y) && /* @__PURE__ */ a("p", { children: [
|
|
7648
7649
|
x ? `Min ${x} tabs` : "",
|
|
@@ -7651,7 +7652,7 @@ function co() {
|
|
|
7651
7652
|
] })
|
|
7652
7653
|
] }) })
|
|
7653
7654
|
] }),
|
|
7654
|
-
p && B.length > 0 && /* @__PURE__ */ e(Mi, { className: "mt-3 border-yellow-500/40 bg-yellow-500/10 text-yellow-900 dark:text-yellow-100", children: /* @__PURE__ */ e(Fi, { children: /* @__PURE__ */ e("ul", { className: "list-disc space-y-1 pl-4 text-xs", children: B.map((g,
|
|
7655
|
+
p && B.length > 0 && /* @__PURE__ */ e(Mi, { className: "mt-3 border-yellow-500/40 bg-yellow-500/10 text-yellow-900 dark:text-yellow-100", children: /* @__PURE__ */ e(Fi, { children: /* @__PURE__ */ e("ul", { className: "list-disc space-y-1 pl-4 text-xs", children: B.map((g, A) => /* @__PURE__ */ e("li", { children: g.message }, `${g.type}-${A}`)) }) }) }),
|
|
7655
7656
|
f && !p && f.settings && /* @__PURE__ */ e("div", { className: "space-y-3", children: /* @__PURE__ */ e("div", { className: "px-2", children: b({
|
|
7656
7657
|
settingsSchema: f.settings,
|
|
7657
7658
|
settingsField: "settings",
|
|
@@ -7672,7 +7673,7 @@ function co() {
|
|
|
7672
7673
|
settingsValue: t == null ? void 0 : t.slotSettings,
|
|
7673
7674
|
sourceCard: r,
|
|
7674
7675
|
headerLabel: (() => {
|
|
7675
|
-
const g = r.tabTitle || r.title,
|
|
7676
|
+
const g = r.tabTitle || r.title, A = w >= 0 ? w : 0, T = m ? "Slot 0" : `Slot ${A}`;
|
|
7676
7677
|
return g ? `${T}: ${g} Settings` : `${T} Settings`;
|
|
7677
7678
|
})()
|
|
7678
7679
|
}) })
|
|
@@ -7722,7 +7723,7 @@ function co() {
|
|
|
7722
7723
|
value: t.componentName || "",
|
|
7723
7724
|
onValueChange: (g) => {
|
|
7724
7725
|
var _;
|
|
7725
|
-
const
|
|
7726
|
+
const A = (_ = u == null ? void 0 : u.visuals) == null ? void 0 : _.find(
|
|
7726
7727
|
(P) => P.name === g
|
|
7727
7728
|
), T = i == null ? void 0 : i.find(
|
|
7728
7729
|
(P) => P.name === g
|
|
@@ -7730,10 +7731,10 @@ function co() {
|
|
|
7730
7731
|
o({
|
|
7731
7732
|
...t,
|
|
7732
7733
|
componentName: g,
|
|
7733
|
-
visualType: (
|
|
7734
|
-
minInputs:
|
|
7735
|
-
maxInputs:
|
|
7736
|
-
pluginChartType:
|
|
7734
|
+
visualType: (A == null ? void 0 : A.visualType) || (T == null ? void 0 : T.type) || "single",
|
|
7735
|
+
minInputs: A == null ? void 0 : A.minInputs,
|
|
7736
|
+
maxInputs: A == null ? void 0 : A.maxInputs,
|
|
7737
|
+
pluginChartType: A == null ? void 0 : A.chartType
|
|
7737
7738
|
});
|
|
7738
7739
|
}
|
|
7739
7740
|
}
|
|
@@ -7772,8 +7773,8 @@ function co() {
|
|
|
7772
7773
|
) })
|
|
7773
7774
|
] }),
|
|
7774
7775
|
(() => {
|
|
7775
|
-
var
|
|
7776
|
-
const g = (
|
|
7776
|
+
var A;
|
|
7777
|
+
const g = (A = f.docs) == null ? void 0 : A.useCases;
|
|
7777
7778
|
return !g || g.length === 0 ? null : /* @__PURE__ */ a("div", { className: "space-y-2", children: [
|
|
7778
7779
|
/* @__PURE__ */ e("h4", { className: "text-xs font-semibold uppercase tracking-wide text-muted-foreground", children: "Use Cases" }),
|
|
7779
7780
|
/* @__PURE__ */ e("ul", { className: "space-y-1 text-sm", children: g.map((T, _) => /* @__PURE__ */ a(
|
|
@@ -8643,7 +8644,7 @@ const Yh = [
|
|
|
8643
8644
|
value: t
|
|
8644
8645
|
}));
|
|
8645
8646
|
function Zh() {
|
|
8646
|
-
var i, u, f, h, p, m, x, y, v, C, k, B, w, O, S, D, I,
|
|
8647
|
+
var i, u, f, h, p, m, x, y, v, C, k, B, w, O, S, D, I, E;
|
|
8647
8648
|
const t = F((b) => b.card), s = (u = (i = t == null ? void 0 : t.preferences) == null ? void 0 : i.mapVisualOptions) == null ? void 0 : u.topoJsonUrl, [n, r] = G(
|
|
8648
8649
|
((h = (f = t == null ? void 0 : t.preferences) == null ? void 0 : f.mapVisualOptions) == null ? void 0 : h.customTopoJsonUrl) || ""
|
|
8649
8650
|
), { setCardPreferences: c } = xe(), { data: o } = sr(t), l = Object.keys((o == null ? void 0 : o.objects) || {}).map((b) => ({
|
|
@@ -8825,7 +8826,7 @@ function Zh() {
|
|
|
8825
8826
|
className: `h-9 w-full ${aa}`,
|
|
8826
8827
|
type: "number",
|
|
8827
8828
|
step: 10,
|
|
8828
|
-
value: ((
|
|
8829
|
+
value: ((E = (I = (D = t.preferences) == null ? void 0 : D.mapVisualOptions) == null ? void 0 : I.projectionOffset) == null ? void 0 : E[1]) || 0,
|
|
8829
8830
|
onChange: (b) => {
|
|
8830
8831
|
var L, N, M, R;
|
|
8831
8832
|
c({
|
|
@@ -9862,17 +9863,17 @@ const pp = [
|
|
|
9862
9863
|
// yellow-400
|
|
9863
9864
|
];
|
|
9864
9865
|
function fp() {
|
|
9865
|
-
var O, S, D, I,
|
|
9866
|
+
var O, S, D, I, E, b, L, N, M, R;
|
|
9866
9867
|
const t = F((g) => g.card), s = F((g) => {
|
|
9867
|
-
var
|
|
9868
|
-
return (
|
|
9868
|
+
var A;
|
|
9869
|
+
return (A = g.card) == null ? void 0 : A.preferences;
|
|
9869
9870
|
}), n = bt(), { setCardPreferences: r, updateCardInFrame: c } = xe(), o = oe(() => n !== t.type ? { ...t, type: n } : t, [t, n]), { data: l } = Nt(o), [d, i] = G({}), [u, f] = G(
|
|
9870
9871
|
null
|
|
9871
9872
|
), [h, p] = G(null), m = oe(() => {
|
|
9872
9873
|
var _, P, V, q, $, Y, le;
|
|
9873
9874
|
if (!(l != null && l.records) || l.records.length === 0) return [];
|
|
9874
|
-
const g = n === "stackedBar" || n === "stackedLine",
|
|
9875
|
-
if ((g ||
|
|
9875
|
+
const g = n === "stackedBar" || n === "stackedLine", A = n === "bar" || n === "line" || n === "horizontalBar" || n === "bullet" || n === "combo" || n === "area" || n === "stackedArea", T = ((_ = t == null ? void 0 : t.config) == null ? void 0 : _.pivotByColumns) && t.config.pivotByColumns.length > 0;
|
|
9876
|
+
if ((g || A) && T) {
|
|
9876
9877
|
if (l.pivotSchema && Array.isArray(l.pivotSchema)) {
|
|
9877
9878
|
const Q = /* @__PURE__ */ new Set();
|
|
9878
9879
|
return l.pivotSchema.forEach((ce) => {
|
|
@@ -9895,7 +9896,7 @@ function fp() {
|
|
|
9895
9896
|
);
|
|
9896
9897
|
}
|
|
9897
9898
|
}
|
|
9898
|
-
if ((
|
|
9899
|
+
if ((A || g) && !T && (($ = (q = t == null ? void 0 : t.config) == null ? void 0 : q.metricColumns) != null && $.length))
|
|
9899
9900
|
return t.config.metricColumns.map(
|
|
9900
9901
|
(Q) => Q.alias || Q.label || Q.name
|
|
9901
9902
|
);
|
|
@@ -9916,18 +9917,18 @@ function fp() {
|
|
|
9916
9917
|
]), x = oe(() => $d(), []);
|
|
9917
9918
|
Ce(() => {
|
|
9918
9919
|
const g = {};
|
|
9919
|
-
m.forEach((
|
|
9920
|
-
g[
|
|
9921
|
-
|
|
9920
|
+
m.forEach((A, T) => {
|
|
9921
|
+
g[A] = Nl(
|
|
9922
|
+
A,
|
|
9922
9923
|
T,
|
|
9923
9924
|
s == null ? void 0 : s.colorConfig
|
|
9924
9925
|
);
|
|
9925
9926
|
}), i(g);
|
|
9926
9927
|
}, [m, s == null ? void 0 : s.colorConfig, x]);
|
|
9927
|
-
const y = (g,
|
|
9928
|
+
const y = (g, A) => {
|
|
9928
9929
|
const T = {
|
|
9929
9930
|
...d,
|
|
9930
|
-
[g]:
|
|
9931
|
+
[g]: A
|
|
9931
9932
|
};
|
|
9932
9933
|
i(T);
|
|
9933
9934
|
const _ = {
|
|
@@ -9942,9 +9943,9 @@ function fp() {
|
|
|
9942
9943
|
preferences: _
|
|
9943
9944
|
};
|
|
9944
9945
|
c(P);
|
|
9945
|
-
}, v = (g,
|
|
9946
|
+
}, v = (g, A) => {
|
|
9946
9947
|
var $;
|
|
9947
|
-
const T = x[
|
|
9948
|
+
const T = x[A % x.length], { [g]: _, ...P } = (($ = s == null ? void 0 : s.colorConfig) == null ? void 0 : $.segments) || {}, V = {
|
|
9948
9949
|
...s || {},
|
|
9949
9950
|
colorConfig: {
|
|
9950
9951
|
segments: P
|
|
@@ -9960,7 +9961,7 @@ function fp() {
|
|
|
9960
9961
|
[g]: T
|
|
9961
9962
|
}));
|
|
9962
9963
|
};
|
|
9963
|
-
if (!m.length || !((t == null ? void 0 : t.type) === "stackedBar" || (t == null ? void 0 : t.type) === "stackedLine" ? ((
|
|
9964
|
+
if (!m.length || !((t == null ? void 0 : t.type) === "stackedBar" || (t == null ? void 0 : t.type) === "stackedLine" ? ((E = (I = t == null ? void 0 : t.config) == null ? void 0 : I.groupByColumns) == null ? void 0 : E.length) || ((L = (b = t == null ? void 0 : t.config) == null ? void 0 : b.pivotByColumns) == null ? void 0 : L.length) : (M = (N = t == null ? void 0 : t.config) == null ? void 0 : N.groupByColumns) == null ? void 0 : M.length) || ["table", "kpi", "text", "custom", "heatmap"].includes(n))
|
|
9964
9965
|
return null;
|
|
9965
9966
|
const B = () => {
|
|
9966
9967
|
const g = {
|
|
@@ -9970,11 +9971,11 @@ function fp() {
|
|
|
9970
9971
|
}
|
|
9971
9972
|
};
|
|
9972
9973
|
r(g);
|
|
9973
|
-
const
|
|
9974
|
+
const A = {
|
|
9974
9975
|
...t,
|
|
9975
9976
|
preferences: g
|
|
9976
9977
|
};
|
|
9977
|
-
c(
|
|
9978
|
+
c(A);
|
|
9978
9979
|
const T = {};
|
|
9979
9980
|
m.forEach((_, P) => {
|
|
9980
9981
|
T[_] = Nl(_, P, void 0);
|
|
@@ -9997,8 +9998,8 @@ function fp() {
|
|
|
9997
9998
|
]
|
|
9998
9999
|
}
|
|
9999
10000
|
) }) }),
|
|
10000
|
-
/* @__PURE__ */ e("div", { className: "max-h-[200px] space-y-2 overflow-y-auto pr-1", children: m.map((g,
|
|
10001
|
-
const T = qd(d[g],
|
|
10001
|
+
/* @__PURE__ */ e("div", { className: "max-h-[200px] space-y-2 overflow-y-auto pr-1", children: m.map((g, A) => {
|
|
10002
|
+
const T = qd(d[g], A), _ = !T;
|
|
10002
10003
|
return /* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
|
|
10003
10004
|
/* @__PURE__ */ a(
|
|
10004
10005
|
Tt,
|
|
@@ -10028,7 +10029,7 @@ function fp() {
|
|
|
10028
10029
|
y(g, P), f(null);
|
|
10029
10030
|
},
|
|
10030
10031
|
children: [
|
|
10031
|
-
V ===
|
|
10032
|
+
V === A % x.length && /* @__PURE__ */ e("div", { className: "absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ e("div", { className: "rounded-full bg-white/90 px-0.5 text-[8px] font-bold text-gray-900 shadow-sm", children: "D" }) }),
|
|
10032
10033
|
/* @__PURE__ */ e("span", { className: "sr-only", children: P })
|
|
10033
10034
|
]
|
|
10034
10035
|
},
|
|
@@ -10072,7 +10073,7 @@ function fp() {
|
|
|
10072
10073
|
{
|
|
10073
10074
|
className: "flex items-center gap-1 text-sm text-muted-foreground hover:text-foreground",
|
|
10074
10075
|
onClick: () => {
|
|
10075
|
-
v(g,
|
|
10076
|
+
v(g, A), f(null);
|
|
10076
10077
|
},
|
|
10077
10078
|
children: [
|
|
10078
10079
|
/* @__PURE__ */ e(Qs, { className: "h-3 w-3" }),
|
|
@@ -10174,7 +10175,7 @@ function Rt({
|
|
|
10174
10175
|
] });
|
|
10175
10176
|
}
|
|
10176
10177
|
function Rs({ axis: t, label: s, type: n, config: r, onChange: c, defaultTitle: o, hidePosition: l }) {
|
|
10177
|
-
var x, y, v, C, k, B, w, O, S, D, I,
|
|
10178
|
+
var x, y, v, C, k, B, w, O, S, D, I, E, b, L;
|
|
10178
10179
|
const d = Kd({
|
|
10179
10180
|
formatMode: r == null ? void 0 : r.formatMode,
|
|
10180
10181
|
formatOptions: r == null ? void 0 : r.formatOptions
|
|
@@ -10185,13 +10186,13 @@ function Rs({ axis: t, label: s, type: n, config: r, onChange: c, defaultTitle:
|
|
|
10185
10186
|
});
|
|
10186
10187
|
}, u = (N, M) => {
|
|
10187
10188
|
var T, _, P, V;
|
|
10188
|
-
const R = N === "enabled" && M === !0, g = (T = r == null ? void 0 : r.name) == null ? void 0 : T.text,
|
|
10189
|
+
const R = N === "enabled" && M === !0, g = (T = r == null ? void 0 : r.name) == null ? void 0 : T.text, A = R && !g && o;
|
|
10189
10190
|
c({
|
|
10190
10191
|
...r ?? {},
|
|
10191
10192
|
name: {
|
|
10192
10193
|
...r == null ? void 0 : r.name,
|
|
10193
10194
|
enabled: N === "enabled" ? M : ((_ = r == null ? void 0 : r.name) == null ? void 0 : _.enabled) ?? !1,
|
|
10194
|
-
text: N === "text" ? M :
|
|
10195
|
+
text: N === "text" ? M : A ? o : g,
|
|
10195
10196
|
fontSize: N === "fontSize" ? M : (P = r == null ? void 0 : r.name) == null ? void 0 : P.fontSize,
|
|
10196
10197
|
fontWeight: N === "fontWeight" ? M : (V = r == null ? void 0 : r.name) == null ? void 0 : V.fontWeight
|
|
10197
10198
|
}
|
|
@@ -10389,7 +10390,7 @@ function Rs({ axis: t, label: s, type: n, config: r, onChange: c, defaultTitle:
|
|
|
10389
10390
|
{
|
|
10390
10391
|
type: "number",
|
|
10391
10392
|
placeholder: "auto",
|
|
10392
|
-
value: ((I = r == null ? void 0 : r.scale) == null ? void 0 : I.max) === "auto" || ((
|
|
10393
|
+
value: ((I = r == null ? void 0 : r.scale) == null ? void 0 : I.max) === "auto" || ((E = r == null ? void 0 : r.scale) == null ? void 0 : E.max) === void 0 ? "" : String(r.scale.max),
|
|
10393
10394
|
onSave: (N) => h("max", N),
|
|
10394
10395
|
className: ""
|
|
10395
10396
|
}
|
|
@@ -10582,7 +10583,7 @@ function xp() {
|
|
|
10582
10583
|
] });
|
|
10583
10584
|
}
|
|
10584
10585
|
function bp() {
|
|
10585
|
-
var M, R, g,
|
|
10586
|
+
var M, R, g, A, T, _, P;
|
|
10586
10587
|
const t = F((V) => V.card), s = bt(), n = F(
|
|
10587
10588
|
(V) => {
|
|
10588
10589
|
var q, $;
|
|
@@ -10594,7 +10595,7 @@ function bp() {
|
|
|
10594
10595
|
}), { setCardPreferences: c, updateCardInFrame: o } = xe();
|
|
10595
10596
|
if (!t || !Hd(s))
|
|
10596
10597
|
return null;
|
|
10597
|
-
const l = s === "bullet" ? ((M = r == null ? void 0 : r.bulletConfig) == null ? void 0 : M.orientation) ?? (((R = r == null ? void 0 : r.chartOptions) == null ? void 0 : R.indexAxis) === "x" ? "vertical" : "horizontal") : void 0, d = l != null ? l === "horizontal" : ((g = r == null ? void 0 : r.chartOptions) == null ? void 0 : g.indexAxis) === "y", i = s === "stackedBar" || s === "stackedLine", u = s === "pie" || s === "doughnut" || s === "polarArea" || s === "funnel", f = s === "bubble" || s === "scatter", h = (T = (
|
|
10598
|
+
const l = s === "bullet" ? ((M = r == null ? void 0 : r.bulletConfig) == null ? void 0 : M.orientation) ?? (((R = r == null ? void 0 : r.chartOptions) == null ? void 0 : R.indexAxis) === "x" ? "vertical" : "horizontal") : void 0, d = l != null ? l === "horizontal" : ((g = r == null ? void 0 : r.chartOptions) == null ? void 0 : g.indexAxis) === "y", i = s === "stackedBar" || s === "stackedLine", u = s === "pie" || s === "doughnut" || s === "polarArea" || s === "funnel", f = s === "bubble" || s === "scatter", h = (T = (A = r == null ? void 0 : r.chartOptions) == null ? void 0 : A.plugins) == null ? void 0 : T.datalabels, p = (h == null ? void 0 : h.display) !== !1 && ((h == null ? void 0 : h.anchor) || (h == null ? void 0 : h.align)), m = Qd(
|
|
10598
10599
|
s,
|
|
10599
10600
|
t.preferences
|
|
10600
10601
|
), x = n ?? m, y = (m == null ? void 0 : m.enabled) ?? p ?? !1, v = (n == null ? void 0 : n.enabled) !== void 0 ? n.enabled : y, C = (V, q) => {
|
|
@@ -10646,7 +10647,7 @@ function bp() {
|
|
|
10646
10647
|
const V = d ? ["center", "left", "right"] : ["center", "top", "bottom"];
|
|
10647
10648
|
D = ["auto", ...s === "bullet" ? V : V.filter(($) => $ !== S), "custom"];
|
|
10648
10649
|
}
|
|
10649
|
-
const I = () => At(S),
|
|
10650
|
+
const I = () => At(S), E = ["center", "start", "end"], b = ["center", "start", "end", "top", "bottom"], L = (x == null ? void 0 : x.formatMode) || (x != null && x.format && !["auto"].includes(x.format) ? "override" : "inherit"), N = (x == null ? void 0 : x.format) === "none";
|
|
10650
10651
|
return /* @__PURE__ */ a(qe, { value: "data-labels", className: "border-b-0", children: [
|
|
10651
10652
|
/* @__PURE__ */ e(je, { className: "flex w-full items-center gap-2 py-2 text-sm font-medium hover:no-underline", children: /* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
|
|
10652
10653
|
/* @__PURE__ */ e(_m, { className: "h-4 w-4 text-muted-foreground" }),
|
|
@@ -10700,7 +10701,7 @@ function bp() {
|
|
|
10700
10701
|
onValueChange: (V) => C("anchor", V),
|
|
10701
10702
|
children: [
|
|
10702
10703
|
/* @__PURE__ */ e(ae, { className: "h-8 text-xs flex-1", children: /* @__PURE__ */ e(ne, {}) }),
|
|
10703
|
-
/* @__PURE__ */ e(se, { children:
|
|
10704
|
+
/* @__PURE__ */ e(se, { children: E.map((V) => /* @__PURE__ */ e(j, { value: V, className: "text-xs", children: At(V) }, V)) })
|
|
10704
10705
|
]
|
|
10705
10706
|
}
|
|
10706
10707
|
)
|
|
@@ -11446,8 +11447,8 @@ function wp() {
|
|
|
11446
11447
|
d
|
|
11447
11448
|
]);
|
|
11448
11449
|
const v = oe(() => {
|
|
11449
|
-
var g,
|
|
11450
|
-
return ((
|
|
11450
|
+
var g, A;
|
|
11451
|
+
return ((A = (g = s == null ? void 0 : s.config) == null ? void 0 : g.metricColumns) == null ? void 0 : A.map((T) => {
|
|
11451
11452
|
const _ = T.label || T.name || T.alias || "";
|
|
11452
11453
|
return {
|
|
11453
11454
|
value: _,
|
|
@@ -11460,18 +11461,18 @@ function wp() {
|
|
|
11460
11461
|
if (!t || v.length === 0)
|
|
11461
11462
|
return;
|
|
11462
11463
|
const g = {};
|
|
11463
|
-
let
|
|
11464
|
+
let A = !1;
|
|
11464
11465
|
const T = ($ = v[1]) == null ? void 0 : $.value;
|
|
11465
|
-
!o.targetMetricKey && T && (g.targetMetricKey = T,
|
|
11466
|
+
!o.targetMetricKey && T && (g.targetMetricKey = T, A = !0);
|
|
11466
11467
|
const _ = (Y = v[2]) == null ? void 0 : Y.value;
|
|
11467
|
-
!o.comparativeMetricKey && !o.disableAutoComparative && _ && (g.comparativeMetricKey = _,
|
|
11468
|
+
!o.comparativeMetricKey && !o.disableAutoComparative && _ && (g.comparativeMetricKey = _, A = !0);
|
|
11468
11469
|
const P = v.slice(3), V = {
|
|
11469
11470
|
...o.rangeKeys || {}
|
|
11470
11471
|
};
|
|
11471
11472
|
let q = !1;
|
|
11472
11473
|
if (Yl.forEach((le, Q) => {
|
|
11473
11474
|
!V[le] && P[Q] && (V[le] = P[Q].value, q = !0);
|
|
11474
|
-
}), q && (g.rangeKeys = V,
|
|
11475
|
+
}), q && (g.rangeKeys = V, A = !0, o.showRanges === void 0 && (g.showRanges = !0)), A) {
|
|
11475
11476
|
const le = Wl({
|
|
11476
11477
|
...o,
|
|
11477
11478
|
...g
|
|
@@ -11483,24 +11484,24 @@ function wp() {
|
|
|
11483
11484
|
}
|
|
11484
11485
|
}, [v, o, t, r]);
|
|
11485
11486
|
const C = (g) => {
|
|
11486
|
-
const
|
|
11487
|
+
const A = Wl({
|
|
11487
11488
|
...o,
|
|
11488
11489
|
...g
|
|
11489
11490
|
});
|
|
11490
11491
|
r({
|
|
11491
11492
|
...t,
|
|
11492
|
-
bulletConfig:
|
|
11493
|
+
bulletConfig: A
|
|
11493
11494
|
});
|
|
11494
|
-
}, k = (g,
|
|
11495
|
+
}, k = (g, A) => {
|
|
11495
11496
|
const T = {
|
|
11496
11497
|
...o.rangeKeys || {},
|
|
11497
|
-
[g]:
|
|
11498
|
+
[g]: A.trim()
|
|
11498
11499
|
};
|
|
11499
|
-
|
|
11500
|
+
A.trim() || delete T[g], C({
|
|
11500
11501
|
rangeKeys: Object.keys(T).length > 0 ? T : void 0
|
|
11501
11502
|
});
|
|
11502
|
-
}, B = (g,
|
|
11503
|
-
const T =
|
|
11503
|
+
}, B = (g, A) => {
|
|
11504
|
+
const T = A === "" ? void 0 : Number(A), _ = {
|
|
11504
11505
|
...o.ranges || {}
|
|
11505
11506
|
};
|
|
11506
11507
|
T === void 0 || Number.isNaN(T) ? delete _[g] : _[g] = T, C({
|
|
@@ -11511,12 +11512,12 @@ function wp() {
|
|
|
11511
11512
|
C({ targetValue: void 0 });
|
|
11512
11513
|
return;
|
|
11513
11514
|
}
|
|
11514
|
-
const
|
|
11515
|
+
const A = Number(g);
|
|
11515
11516
|
C({
|
|
11516
|
-
targetValue: Number.isNaN(
|
|
11517
|
+
targetValue: Number.isNaN(A) ? void 0 : A
|
|
11517
11518
|
});
|
|
11518
|
-
}, O = (g,
|
|
11519
|
-
const T =
|
|
11519
|
+
}, O = (g, A) => {
|
|
11520
|
+
const T = A.trim(), _ = {
|
|
11520
11521
|
...o.rangeLabels || {}
|
|
11521
11522
|
};
|
|
11522
11523
|
T ? _[g] = T : delete _[g], C({
|
|
@@ -11526,7 +11527,7 @@ function wp() {
|
|
|
11526
11527
|
u(g), C({ showRanges: g });
|
|
11527
11528
|
}, D = (g) => {
|
|
11528
11529
|
h(g), C({ rangesArePercentages: g });
|
|
11529
|
-
}, I = o.orientation || (((R = t == null ? void 0 : t.chartOptions) == null ? void 0 : R.indexAxis) === "y" ? "horizontal" : "vertical"),
|
|
11530
|
+
}, I = o.orientation || (((R = t == null ? void 0 : t.chartOptions) == null ? void 0 : R.indexAxis) === "y" ? "horizontal" : "vertical"), E = (g) => {
|
|
11530
11531
|
C({ orientation: g }), c(g === "horizontal" ? "y" : "x");
|
|
11531
11532
|
}, b = [
|
|
11532
11533
|
{ value: "__none", label: "None" },
|
|
@@ -11549,11 +11550,11 @@ function wp() {
|
|
|
11549
11550
|
if (o.comparativeMetricKey)
|
|
11550
11551
|
C({ disableAutoComparative: !1 });
|
|
11551
11552
|
else {
|
|
11552
|
-
const
|
|
11553
|
+
const A = v.find(
|
|
11553
11554
|
(T) => T.value !== o.targetMetricKey
|
|
11554
11555
|
);
|
|
11555
11556
|
C({
|
|
11556
|
-
comparativeMetricKey:
|
|
11557
|
+
comparativeMetricKey: A == null ? void 0 : A.value,
|
|
11557
11558
|
disableAutoComparative: !1
|
|
11558
11559
|
});
|
|
11559
11560
|
}
|
|
@@ -11571,7 +11572,7 @@ function wp() {
|
|
|
11571
11572
|
te,
|
|
11572
11573
|
{
|
|
11573
11574
|
value: I,
|
|
11574
|
-
onValueChange: (g) =>
|
|
11575
|
+
onValueChange: (g) => E(g),
|
|
11575
11576
|
children: [
|
|
11576
11577
|
/* @__PURE__ */ e(ae, { className: "h-8 text-xs", children: /* @__PURE__ */ e(ne, {}) }),
|
|
11577
11578
|
/* @__PURE__ */ a(se, { children: [
|
|
@@ -11702,7 +11703,7 @@ function wp() {
|
|
|
11702
11703
|
] })
|
|
11703
11704
|
] }),
|
|
11704
11705
|
i && /* @__PURE__ */ e("div", { className: "space-y-3", children: Yl.map((g) => {
|
|
11705
|
-
var
|
|
11706
|
+
var A, T, _, P, V;
|
|
11706
11707
|
return /* @__PURE__ */ a(
|
|
11707
11708
|
"div",
|
|
11708
11709
|
{
|
|
@@ -11717,7 +11718,7 @@ function wp() {
|
|
|
11717
11718
|
Ct,
|
|
11718
11719
|
{
|
|
11719
11720
|
placeholder: `Display label (${g})`,
|
|
11720
|
-
value: ((
|
|
11721
|
+
value: ((A = o.rangeLabels) == null ? void 0 : A[g]) || "",
|
|
11721
11722
|
onCommit: (q) => O(g, q),
|
|
11722
11723
|
className: "h-8 text-xs"
|
|
11723
11724
|
}
|
|
@@ -11796,7 +11797,7 @@ function Xl(t) {
|
|
|
11796
11797
|
return s;
|
|
11797
11798
|
}
|
|
11798
11799
|
function Sp() {
|
|
11799
|
-
var O, S, D, I,
|
|
11800
|
+
var O, S, D, I, E, b, L, N, M, R, g, A;
|
|
11800
11801
|
const t = F((T) => T.card.preferences), s = F((T) => T.card), n = bt(), r = F((T) => T.isDevMode), { setCardPreferences: c, updateCardInFrame: o } = xe(), l = n === "bubble", d = n === "scatter", i = oe(
|
|
11801
11802
|
() => (t == null ? void 0 : t.bubbleScatterConfig) || {},
|
|
11802
11803
|
[t == null ? void 0 : t.bubbleScatterConfig]
|
|
@@ -12098,7 +12099,7 @@ function Sp() {
|
|
|
12098
12099
|
Ge,
|
|
12099
12100
|
{
|
|
12100
12101
|
size: "sm",
|
|
12101
|
-
checked: ((b = (
|
|
12102
|
+
checked: ((b = (E = t == null ? void 0 : t.xAxisConfig) == null ? void 0 : E.name) == null ? void 0 : b.enabled) ?? !1,
|
|
12102
12103
|
onCheckedChange: (T) => {
|
|
12103
12104
|
var V, q, $, Y;
|
|
12104
12105
|
const _ = i.xMetricKey || "X Axis", P = i.yMetricKey || "Y Axis";
|
|
@@ -12156,7 +12157,7 @@ function Sp() {
|
|
|
12156
12157
|
{
|
|
12157
12158
|
className: "h-8 text-xs",
|
|
12158
12159
|
placeholder: i.yMetricKey || "Y Axis",
|
|
12159
|
-
value: ((
|
|
12160
|
+
value: ((A = (g = t == null ? void 0 : t.yAxisConfig) == null ? void 0 : g.name) == null ? void 0 : A.text) || "",
|
|
12160
12161
|
onCommit: (T) => {
|
|
12161
12162
|
var _;
|
|
12162
12163
|
C({
|
|
@@ -13702,9 +13703,9 @@ function hf() {
|
|
|
13702
13703
|
});
|
|
13703
13704
|
}, C = (w, O) => {
|
|
13704
13705
|
const S = da(w), D = m.filter(
|
|
13705
|
-
(
|
|
13706
|
+
(E) => y.has(da(E))
|
|
13706
13707
|
), I = O ? y.has(S) ? D : [...D, w].slice(0, Bs) : D.filter(
|
|
13707
|
-
(
|
|
13708
|
+
(E) => da(E) !== S
|
|
13708
13709
|
);
|
|
13709
13710
|
v({ breakdownDimensions: I });
|
|
13710
13711
|
};
|
|
@@ -13797,7 +13798,7 @@ function hf() {
|
|
|
13797
13798
|
id: `summary-breakdown-${O}`,
|
|
13798
13799
|
checked: S,
|
|
13799
13800
|
disabled: I,
|
|
13800
|
-
onCheckedChange: (
|
|
13801
|
+
onCheckedChange: (E) => C(w, E === !0)
|
|
13801
13802
|
}
|
|
13802
13803
|
),
|
|
13803
13804
|
/* @__PURE__ */ e(
|
|
@@ -14099,10 +14100,10 @@ function Nf(t) {
|
|
|
14099
14100
|
), I = Me(
|
|
14100
14101
|
(U) => U.dashboard.aiScopeTables
|
|
14101
14102
|
), {
|
|
14102
|
-
errorMessage:
|
|
14103
|
+
errorMessage: E,
|
|
14103
14104
|
refetch: b,
|
|
14104
14105
|
data: L
|
|
14105
|
-
} = Nt(B), { setTriggerAIRun: N, setCurrentAssitantScope: M, setCardConfig: R } = xe(), { selectedDatamodelName: g, connectionType:
|
|
14106
|
+
} = Nt(B), { setTriggerAIRun: N, setCurrentAssitantScope: M, setCardConfig: R } = xe(), { selectedDatamodelName: g, connectionType: A, selectedDatamodelId: T } = ru(), _ = (Je = mi().data) == null ? void 0 : Je.assistantProfileId, P = Ie(Mn()), V = Ie(null), q = Ie(d), $ = Ie(!1), Y = () => {
|
|
14106
14107
|
const U = V.current;
|
|
14107
14108
|
U && (V.current = null, P.current = Mn(), U === "clear" && Q([]));
|
|
14108
14109
|
}, {
|
|
@@ -14311,7 +14312,7 @@ function Nf(t) {
|
|
|
14311
14312
|
datamodelId: T || "",
|
|
14312
14313
|
datamodelName: Sl(g),
|
|
14313
14314
|
connectionId: S || "",
|
|
14314
|
-
connectionType:
|
|
14315
|
+
connectionType: A || ""
|
|
14315
14316
|
}, be = Tl([...v, U]);
|
|
14316
14317
|
Ue(be);
|
|
14317
14318
|
}
|
|
@@ -14322,7 +14323,7 @@ function Nf(t) {
|
|
|
14322
14323
|
tableName: O || "",
|
|
14323
14324
|
datamodelName: Sl(g),
|
|
14324
14325
|
connectionId: S || "",
|
|
14325
|
-
connectionType:
|
|
14326
|
+
connectionType: A || "",
|
|
14326
14327
|
datamodelId: T || ""
|
|
14327
14328
|
};
|
|
14328
14329
|
if (!cu(
|
|
@@ -14375,14 +14376,14 @@ function ei({
|
|
|
14375
14376
|
onFullscreenChange: s,
|
|
14376
14377
|
fullscreenContainer: n
|
|
14377
14378
|
}) {
|
|
14378
|
-
const r = Ie(null), c = Ie(!1), [o, l] = G(!1), [d, i] = G(uu), [u, f] = G(!1), [h, p] = G(!1), [m, x] = G(!1), y = t ?? m, v = mu(), { setCurrentAIContext: C, setHasEditorEntitySelectionOverride: k } = Ws(), { clearQueue: B } = hu(), { clearFileAttachments: w } = pu(), O = fu("editor"), { selectedEntities: S } = oi("editor"), D = F((fe) => fe.card.id), I = F((fe) => fe.card.dataSource),
|
|
14379
|
+
const r = Ie(null), c = Ie(!1), [o, l] = G(!1), [d, i] = G(uu), [u, f] = G(!1), [h, p] = G(!1), [m, x] = G(!1), y = t ?? m, v = mu(), { setCurrentAIContext: C, setHasEditorEntitySelectionOverride: k } = Ws(), { clearQueue: B } = hu(), { clearFileAttachments: w } = pu(), O = fu("editor"), { selectedEntities: S } = oi("editor"), D = F((fe) => fe.card.id), I = F((fe) => fe.card.dataSource), E = F(
|
|
14379
14380
|
(fe) => {
|
|
14380
14381
|
var Ye;
|
|
14381
14382
|
return (Ye = fe.card.dataSource) == null ? void 0 : Ye.selectedEntities;
|
|
14382
14383
|
}
|
|
14383
14384
|
), b = F((fe) => fe.actions.setCardSql), L = F((fe) => fe.actions.setRunSql), N = F((fe) => fe.showAIDialog), M = Me(
|
|
14384
14385
|
(fe) => fe.handleOpenAssistantProfile
|
|
14385
|
-
), { setShowAIDialog: R, setCardPython: g } = xe(), { setDataSource:
|
|
14386
|
+
), { setShowAIDialog: R, setCardPython: g } = xe(), { setDataSource: A } = xe(), { assistantProfile: T } = gu(), {
|
|
14386
14387
|
messages: _,
|
|
14387
14388
|
setMessages: P,
|
|
14388
14389
|
sendMessage: V,
|
|
@@ -14442,11 +14443,11 @@ function ei({
|
|
|
14442
14443
|
N && !c.current && ((fe = r.current) == null || fe.focus()), c.current = N;
|
|
14443
14444
|
}, [N]), Ce(() => {
|
|
14444
14445
|
N && (k(!1), C({
|
|
14445
|
-
selectedEntities:
|
|
14446
|
+
selectedEntities: E || []
|
|
14446
14447
|
}));
|
|
14447
14448
|
}, [
|
|
14448
14449
|
D,
|
|
14449
|
-
|
|
14450
|
+
E,
|
|
14450
14451
|
C,
|
|
14451
14452
|
k,
|
|
14452
14453
|
N
|
|
@@ -15630,14 +15631,14 @@ function Ff({
|
|
|
15630
15631
|
} = yn(), { userContext: O } = ar(), S = (O == null ? void 0 : O.type) === "organization", {
|
|
15631
15632
|
updateLabel: D,
|
|
15632
15633
|
handleAggregationChange: I,
|
|
15633
|
-
handleDateFormatChange:
|
|
15634
|
+
handleDateFormatChange: E,
|
|
15634
15635
|
handleGranularityChange: b,
|
|
15635
15636
|
handleAliasTemplateChange: L,
|
|
15636
15637
|
handleValueAliasesChange: N,
|
|
15637
15638
|
handleMetricFormatChange: M,
|
|
15638
15639
|
removeField: R,
|
|
15639
15640
|
handleMetricComparisonChange: g,
|
|
15640
|
-
handleMetricWindowTransformChange:
|
|
15641
|
+
handleMetricWindowTransformChange: A,
|
|
15641
15642
|
handleMetricWindowOrderByChange: T,
|
|
15642
15643
|
handleMetricWindowDirectionChange: _,
|
|
15643
15644
|
handleMetricWindowPartitionToggle: P,
|
|
@@ -15680,13 +15681,13 @@ function Ff({
|
|
|
15680
15681
|
), [we, $e] = G(
|
|
15681
15682
|
t.valueAliases || {}
|
|
15682
15683
|
), [Ve, st] = G((Ar = t.parameters) == null ? void 0 : Ar.filters), ot = (J) => {
|
|
15683
|
-
J === "custom" ? Le(!0) : (Le(!1), Qe(J), (s === "groupBy" || Ea) &&
|
|
15684
|
+
J === "custom" ? Le(!0) : (Le(!1), Qe(J), (s === "groupBy" || Ea) && E(n, J, "", s));
|
|
15684
15685
|
}, Jt = (J) => {
|
|
15685
|
-
U(J), (s === "groupBy" || Ea) &&
|
|
15686
|
+
U(J), (s === "groupBy" || Ea) && E(n, "custom", J, s);
|
|
15686
15687
|
}, jt = (J) => {
|
|
15687
15688
|
var ve;
|
|
15688
15689
|
const Se = (ve = Ss(J)[0]) == null ? void 0 : ve.value;
|
|
15689
|
-
Se && !be && (Qe(Se), s === "groupBy" &&
|
|
15690
|
+
Se && !be && (Qe(Se), s === "groupBy" && E(n, Se, "", s)), s === "groupBy" && b(n, J);
|
|
15690
15691
|
}, Kt = (J) => {
|
|
15691
15692
|
ge(J), s === "metrics" && L(n, J);
|
|
15692
15693
|
}, fe = (J) => {
|
|
@@ -15738,12 +15739,12 @@ function Ff({
|
|
|
15738
15739
|
const ee = "day";
|
|
15739
15740
|
if (b(n, ee), !be) {
|
|
15740
15741
|
const ve = (Se = Ss(ee)[0]) == null ? void 0 : Se.value;
|
|
15741
|
-
ve && (Qe(ve),
|
|
15742
|
+
ve && (Qe(ve), E(n, ve, "", s));
|
|
15742
15743
|
}
|
|
15743
15744
|
}, [
|
|
15744
15745
|
t.dataType,
|
|
15745
15746
|
t.id,
|
|
15746
|
-
|
|
15747
|
+
E,
|
|
15747
15748
|
b,
|
|
15748
15749
|
rn,
|
|
15749
15750
|
n,
|
|
@@ -16067,7 +16068,7 @@ function Ff({
|
|
|
16067
16068
|
te,
|
|
16068
16069
|
{
|
|
16069
16070
|
value: Z ? re : "none",
|
|
16070
|
-
onValueChange: (ee) =>
|
|
16071
|
+
onValueChange: (ee) => A(
|
|
16071
16072
|
n,
|
|
16072
16073
|
ee
|
|
16073
16074
|
),
|
|
@@ -16880,7 +16881,7 @@ function Pf({
|
|
|
16880
16881
|
);
|
|
16881
16882
|
const C = F((Q) => Q.actions.updateCard), k = F((Q) => Q.actions.updateFrame), B = Me((Q) => Q.isVisualEditing), w = Me((Q) => Q.selectedSheetId), O = Me(
|
|
16882
16883
|
(Q) => Q.actions.updateSheetCalculatedFields
|
|
16883
|
-
), { scopedFields: S } = zi(), { userContext: D } = ar(), I = x && (h == null ? void 0 : h.id) === u.id && v ? v : u == null ? void 0 : u.type,
|
|
16884
|
+
), { scopedFields: S } = zi(), { userContext: D } = ar(), I = x && (h == null ? void 0 : h.id) === u.id && v ? v : u == null ? void 0 : u.type, E = I === "detailTable", b = t.length > 0 || n.length > 0 || c.length > 0, L = !E && (I !== "kpi" || n.length <= 2), N = !E, M = !E && I !== "kpi", R = I !== "kpi" && b, g = E, A = "Drop sort fields here", T = (D == null ? void 0 : D.type) === "organization", _ = [
|
|
16884
16885
|
"pie",
|
|
16885
16886
|
"doughnut",
|
|
16886
16887
|
"polar",
|
|
@@ -16980,7 +16981,7 @@ function Pf({
|
|
|
16980
16981
|
zone: "sortBy",
|
|
16981
16982
|
fields: r,
|
|
16982
16983
|
label: "Sort By",
|
|
16983
|
-
placeholder:
|
|
16984
|
+
placeholder: A,
|
|
16984
16985
|
activeField: o
|
|
16985
16986
|
}
|
|
16986
16987
|
)
|
|
@@ -17190,10 +17191,10 @@ function Bf({
|
|
|
17190
17191
|
detailFields: l,
|
|
17191
17192
|
activeField: d
|
|
17192
17193
|
}) {
|
|
17193
|
-
var
|
|
17194
|
+
var E, b;
|
|
17194
17195
|
const [i, u] = G(() => ti.getItem("chart-selector-expanded") === "true"), [f, h] = G(!1), p = F((L) => L.card), m = F(
|
|
17195
17196
|
(L) => L.actions.updateCardConfig
|
|
17196
|
-
), x = n.length > 0 || r.length > 0 || c.length > 0 || l.length > 0, { data: y, autoJoinMetadata: v } = Nt(p), C = x || !!y, k = ((
|
|
17197
|
+
), x = n.length > 0 || r.length > 0 || c.length > 0 || l.length > 0, { data: y, autoJoinMetadata: v } = Nt(p), C = x || !!y, k = ((E = p == null ? void 0 : p.config) == null ? void 0 : E.joinPlan) || (v != null && v.autoResolved ? v.resolvedJoinPlan : {
|
|
17197
17198
|
baseEntity: {
|
|
17198
17199
|
type: "table",
|
|
17199
17200
|
name: "",
|
|
@@ -17420,21 +17421,21 @@ function zf({
|
|
|
17420
17421
|
throw new Error(
|
|
17421
17422
|
"Use a dedicated method to update the field property with a Field object"
|
|
17422
17423
|
);
|
|
17423
|
-
const I = (
|
|
17424
|
-
...
|
|
17425
|
-
conditions:
|
|
17424
|
+
const I = (E) => E.id === w ? {
|
|
17425
|
+
...E,
|
|
17426
|
+
conditions: E.conditions.map((b) => b.id === O ? {
|
|
17426
17427
|
...b,
|
|
17427
17428
|
[S]: D
|
|
17428
17429
|
} : b)
|
|
17429
17430
|
} : {
|
|
17430
|
-
...
|
|
17431
|
-
groups:
|
|
17431
|
+
...E,
|
|
17432
|
+
groups: E.groups.map(I)
|
|
17432
17433
|
};
|
|
17433
17434
|
r(I(n));
|
|
17434
17435
|
}, m = (w, O, S) => {
|
|
17435
17436
|
const D = (I) => I.id === w ? {
|
|
17436
17437
|
...I,
|
|
17437
|
-
conditions: I.conditions.map((
|
|
17438
|
+
conditions: I.conditions.map((E) => E.id === O ? { ...E, ...S } : E)
|
|
17438
17439
|
} : {
|
|
17439
17440
|
...I,
|
|
17440
17441
|
groups: I.groups.map(D)
|
|
@@ -17482,7 +17483,7 @@ function zf({
|
|
|
17482
17483
|
const O = (D) => {
|
|
17483
17484
|
let I = "";
|
|
17484
17485
|
typeof D.field == "object" ? I = D.field.entityName ? `${D.field.entityName}.${D.field.name}` : D.field.name : I = String(D.field);
|
|
17485
|
-
const
|
|
17486
|
+
const E = D.operator;
|
|
17486
17487
|
let b = D.value;
|
|
17487
17488
|
if (D.field.dataType === "string" && !["in", "not in"].includes(D.operator))
|
|
17488
17489
|
typeof b == "string" ? b = `'${b}'` : Array.isArray(b) && (b = `'${b.join(", ")}'`);
|
|
@@ -17492,7 +17493,7 @@ function zf({
|
|
|
17492
17493
|
return `${I} BETWEEN ${L} AND ${N}`;
|
|
17493
17494
|
} else if ((D.operator === "in" || D.operator === "not in") && Array.isArray(b)) {
|
|
17494
17495
|
const L = b.map((N) => N ? `'${N}'` : "NULL").join(", ");
|
|
17495
|
-
return `${I} ${
|
|
17496
|
+
return `${I} ${E} (${L})`;
|
|
17496
17497
|
} else typeof b == "string" || b instanceof Date ? b = `'${b}'` : Array.isArray(b) && b.length > 0 && (b = `'${b[0]}'`);
|
|
17497
17498
|
else if (["in", "not in"].includes(D.operator)) {
|
|
17498
17499
|
let L = [];
|
|
@@ -17503,7 +17504,7 @@ function zf({
|
|
|
17503
17504
|
return D.field.dataType === "string" ? `'${M}'` : M;
|
|
17504
17505
|
}) : typeof b == "number" && (L = [String(b)]), b = `(${L.join(", ")})`;
|
|
17505
17506
|
}
|
|
17506
|
-
switch (
|
|
17507
|
+
switch (E) {
|
|
17507
17508
|
case "contains":
|
|
17508
17509
|
return typeof b == "string" ? `${I} LIKE '%${b.replace(/'/g, "")}'` : `${I} LIKE '%${String(b)}'`;
|
|
17509
17510
|
case "startsWith":
|
|
@@ -17515,12 +17516,12 @@ function zf({
|
|
|
17515
17516
|
case "isNotNull":
|
|
17516
17517
|
return `${I} IS NOT NULL`;
|
|
17517
17518
|
default:
|
|
17518
|
-
return `${I} ${
|
|
17519
|
+
return `${I} ${E} ${b}`;
|
|
17519
17520
|
}
|
|
17520
17521
|
}, S = (D) => {
|
|
17521
|
-
const I = D.conditions.map(O),
|
|
17522
|
+
const I = D.conditions.map(O), E = D.groups.map(
|
|
17522
17523
|
(M) => S(M)
|
|
17523
|
-
), b = [...I, ...
|
|
17524
|
+
), b = [...I, ...E].filter(Boolean);
|
|
17524
17525
|
if (b.length === 0) return "";
|
|
17525
17526
|
const L = b.join(` ${D.logicalOperator} `), N = b.length > 1 ? `(${L})` : L;
|
|
17526
17527
|
return D.negate ? `NOT ${N}` : N;
|
|
@@ -18164,8 +18165,8 @@ function Zf({
|
|
|
18164
18165
|
} = ns({ id: t.id }), S = {
|
|
18165
18166
|
transform: ss.Transform.toString(B),
|
|
18166
18167
|
transition: w
|
|
18167
|
-
}, D = (
|
|
18168
|
-
const { active: b, over: L } =
|
|
18168
|
+
}, D = (E) => {
|
|
18169
|
+
const { active: b, over: L } = E;
|
|
18169
18170
|
if (L && b.id !== L.id) {
|
|
18170
18171
|
const N = t.conditions.findIndex(
|
|
18171
18172
|
(R) => R.id === b.id
|
|
@@ -18174,8 +18175,8 @@ function Zf({
|
|
|
18174
18175
|
);
|
|
18175
18176
|
N !== -1 && M !== -1 && u(t.id, N, M);
|
|
18176
18177
|
}
|
|
18177
|
-
}, I = (
|
|
18178
|
-
const { active: b, over: L } =
|
|
18178
|
+
}, I = (E) => {
|
|
18179
|
+
const { active: b, over: L } = E;
|
|
18179
18180
|
if (L && b.id !== L.id && n) {
|
|
18180
18181
|
const N = t.groups.findIndex((R) => R.id === b.id), M = t.groups.findIndex((R) => R.id === L.id);
|
|
18181
18182
|
N !== -1 && M !== -1 && f(n, N, M);
|
|
@@ -18213,7 +18214,7 @@ function Zf({
|
|
|
18213
18214
|
te,
|
|
18214
18215
|
{
|
|
18215
18216
|
value: t.logicalOperator,
|
|
18216
|
-
onValueChange: (
|
|
18217
|
+
onValueChange: (E) => r(t.id, E),
|
|
18217
18218
|
children: [
|
|
18218
18219
|
/* @__PURE__ */ e(ae, { className: "h-7 w-20", children: /* @__PURE__ */ e(ne, {}) }),
|
|
18219
18220
|
/* @__PURE__ */ a(se, { children: [
|
|
@@ -18251,12 +18252,12 @@ function Zf({
|
|
|
18251
18252
|
children: /* @__PURE__ */ e(
|
|
18252
18253
|
oa,
|
|
18253
18254
|
{
|
|
18254
|
-
items: t.conditions.map((
|
|
18255
|
+
items: t.conditions.map((E) => E.id),
|
|
18255
18256
|
strategy: $a,
|
|
18256
|
-
children: t.conditions.map((
|
|
18257
|
+
children: t.conditions.map((E, b) => /* @__PURE__ */ e(
|
|
18257
18258
|
go,
|
|
18258
18259
|
{
|
|
18259
|
-
condition:
|
|
18260
|
+
condition: E,
|
|
18260
18261
|
index: b,
|
|
18261
18262
|
groupId: t.id,
|
|
18262
18263
|
groupLogicalOperator: t.logicalOperator,
|
|
@@ -18267,7 +18268,7 @@ function Zf({
|
|
|
18267
18268
|
availableFields: m,
|
|
18268
18269
|
updateConditionFields: y
|
|
18269
18270
|
},
|
|
18270
|
-
|
|
18271
|
+
E.id
|
|
18271
18272
|
))
|
|
18272
18273
|
}
|
|
18273
18274
|
)
|
|
@@ -18287,10 +18288,10 @@ function Zf({
|
|
|
18287
18288
|
children: /* @__PURE__ */ e(
|
|
18288
18289
|
oa,
|
|
18289
18290
|
{
|
|
18290
|
-
items: t.groups.map((
|
|
18291
|
+
items: t.groups.map((E) => E.id),
|
|
18291
18292
|
strategy: $a,
|
|
18292
18293
|
children: t.groups.map(
|
|
18293
|
-
(
|
|
18294
|
+
(E) => x(E, s + 1, t.id)
|
|
18294
18295
|
)
|
|
18295
18296
|
}
|
|
18296
18297
|
)
|
|
@@ -18364,29 +18365,29 @@ function eg({
|
|
|
18364
18365
|
), [S, D] = G(!1), I = (L, N, M) => {
|
|
18365
18366
|
const R = (g) => g.id === L ? {
|
|
18366
18367
|
...g,
|
|
18367
|
-
conditions: g.conditions.map((
|
|
18368
|
-
...
|
|
18368
|
+
conditions: g.conditions.map((A) => A.id === N ? {
|
|
18369
|
+
...A,
|
|
18369
18370
|
field: M,
|
|
18370
18371
|
dataType: M.dataType
|
|
18371
|
-
} :
|
|
18372
|
+
} : A)
|
|
18372
18373
|
} : {
|
|
18373
18374
|
...g,
|
|
18374
18375
|
groups: g.groups.map(R)
|
|
18375
18376
|
};
|
|
18376
18377
|
w(R(o));
|
|
18377
|
-
},
|
|
18378
|
+
}, E = (L, N = 0, M) => N === 0 ? /* @__PURE__ */ e("div", { className: "rounded-lg", children: /* @__PURE__ */ a("div", { className: "p-3 px-0", children: [
|
|
18378
18379
|
/* @__PURE__ */ e(
|
|
18379
18380
|
ya,
|
|
18380
18381
|
{
|
|
18381
18382
|
sensors: O,
|
|
18382
18383
|
collisionDetection: Na,
|
|
18383
18384
|
onDragEnd: (R) => {
|
|
18384
|
-
const { active: g, over:
|
|
18385
|
-
if (
|
|
18385
|
+
const { active: g, over: A } = R;
|
|
18386
|
+
if (A && g.id !== A.id) {
|
|
18386
18387
|
const T = L.conditions.findIndex(
|
|
18387
18388
|
(P) => P.id === g.id
|
|
18388
18389
|
), _ = L.conditions.findIndex(
|
|
18389
|
-
(P) => P.id ===
|
|
18390
|
+
(P) => P.id === A.id
|
|
18390
18391
|
);
|
|
18391
18392
|
T !== -1 && _ !== -1 && v(L.id, T, _);
|
|
18392
18393
|
}
|
|
@@ -18422,12 +18423,12 @@ function eg({
|
|
|
18422
18423
|
sensors: O,
|
|
18423
18424
|
collisionDetection: Na,
|
|
18424
18425
|
onDragEnd: (R) => {
|
|
18425
|
-
const { active: g, over:
|
|
18426
|
-
if (
|
|
18426
|
+
const { active: g, over: A } = R;
|
|
18427
|
+
if (A && g.id !== A.id) {
|
|
18427
18428
|
const T = L.groups.findIndex(
|
|
18428
18429
|
(P) => P.id === g.id
|
|
18429
18430
|
), _ = L.groups.findIndex(
|
|
18430
|
-
(P) => P.id ===
|
|
18431
|
+
(P) => P.id === A.id
|
|
18431
18432
|
);
|
|
18432
18433
|
T !== -1 && _ !== -1 && C(L.id, T, _);
|
|
18433
18434
|
}
|
|
@@ -18438,7 +18439,7 @@ function eg({
|
|
|
18438
18439
|
items: L.groups.map((R) => R.id),
|
|
18439
18440
|
strategy: $a,
|
|
18440
18441
|
children: L.groups.map(
|
|
18441
|
-
(R) =>
|
|
18442
|
+
(R) => E(R, N + 1, L.id)
|
|
18442
18443
|
)
|
|
18443
18444
|
}
|
|
18444
18445
|
)
|
|
@@ -18489,7 +18490,7 @@ function eg({
|
|
|
18489
18490
|
onAddCondition: i,
|
|
18490
18491
|
onAddGroup: u,
|
|
18491
18492
|
availableFields: l,
|
|
18492
|
-
renderFilterGroup:
|
|
18493
|
+
renderFilterGroup: E,
|
|
18493
18494
|
updateConditionFields: m
|
|
18494
18495
|
},
|
|
18495
18496
|
L.id
|
|
@@ -18499,7 +18500,7 @@ function eg({
|
|
|
18499
18500
|
d ? /* @__PURE__ */ a("div", { className: "flex items-center justify-center p-4", children: [
|
|
18500
18501
|
/* @__PURE__ */ e("div", { className: "h-5 w-5 animate-spin rounded-full border-2 border-gray-300 border-t-gray-600" }),
|
|
18501
18502
|
/* @__PURE__ */ e("span", { className: "ml-2 text-sm text-gray-600", children: "Loading columns..." })
|
|
18502
|
-
] }) :
|
|
18503
|
+
] }) : E(o),
|
|
18503
18504
|
/* @__PURE__ */ e("div", { className: "mt-4 border-t border-border pt-4", children: /* @__PURE__ */ a("div", { className: "flex items-center space-x-2", children: [
|
|
18504
18505
|
/* @__PURE__ */ e(
|
|
18505
18506
|
Ge,
|
|
@@ -18614,9 +18615,9 @@ function ag({
|
|
|
18614
18615
|
o(null);
|
|
18615
18616
|
return;
|
|
18616
18617
|
}
|
|
18617
|
-
const D = O.id, I = S.id,
|
|
18618
|
+
const D = O.id, I = S.id, E = x(D), b = x(I) || I;
|
|
18618
18619
|
if (b === "sortBy") {
|
|
18619
|
-
if (
|
|
18620
|
+
if (E === "source") {
|
|
18620
18621
|
const N = s.find((R) => R.id === D);
|
|
18621
18622
|
if (!N) {
|
|
18622
18623
|
o(null);
|
|
@@ -18632,16 +18633,16 @@ function ag({
|
|
|
18632
18633
|
o(null);
|
|
18633
18634
|
return;
|
|
18634
18635
|
}
|
|
18635
|
-
} else if (
|
|
18636
|
+
} else if (E === "pivotBy") {
|
|
18636
18637
|
o(null);
|
|
18637
18638
|
return;
|
|
18638
|
-
} else if (
|
|
18639
|
+
} else if (E !== "groupBy" && E !== "metrics" && E !== "sortBy" && E !== "detailColumns") {
|
|
18639
18640
|
o(null);
|
|
18640
18641
|
return;
|
|
18641
18642
|
}
|
|
18642
18643
|
}
|
|
18643
|
-
if (
|
|
18644
|
-
const N = [...s].find((
|
|
18644
|
+
if (E === "source" && b === "sortBy") {
|
|
18645
|
+
const N = [...s].find((A) => A.id === D);
|
|
18645
18646
|
if (!N) {
|
|
18646
18647
|
o(null);
|
|
18647
18648
|
return;
|
|
@@ -18672,7 +18673,7 @@ function ag({
|
|
|
18672
18673
|
o(null), r("sortBy", [...M, g]);
|
|
18673
18674
|
return;
|
|
18674
18675
|
}
|
|
18675
|
-
if (
|
|
18676
|
+
if (E === "source" && b !== "source" && b !== "sortBy") {
|
|
18676
18677
|
const N = [...s].find((P) => P.id === D);
|
|
18677
18678
|
if (!N) {
|
|
18678
18679
|
o(null);
|
|
@@ -18724,14 +18725,14 @@ function ag({
|
|
|
18724
18725
|
o(null);
|
|
18725
18726
|
return;
|
|
18726
18727
|
}
|
|
18727
|
-
const
|
|
18728
|
+
const A = Vn(
|
|
18728
18729
|
N,
|
|
18729
18730
|
b,
|
|
18730
18731
|
l.type
|
|
18731
18732
|
);
|
|
18732
|
-
if (!
|
|
18733
|
+
if (!A.isValid) {
|
|
18733
18734
|
ut.error("Invalid Field Type", {
|
|
18734
|
-
description:
|
|
18735
|
+
description: A.reason,
|
|
18735
18736
|
position: "top-center",
|
|
18736
18737
|
duration: 3e3
|
|
18737
18738
|
}), o(null);
|
|
@@ -18759,8 +18760,8 @@ function ag({
|
|
|
18759
18760
|
}
|
|
18760
18761
|
return;
|
|
18761
18762
|
}
|
|
18762
|
-
if (
|
|
18763
|
-
const N = n(
|
|
18763
|
+
if (E && b && E !== "source" && b !== "source" && E !== b) {
|
|
18764
|
+
const N = n(E), M = n(b), R = N.find((P) => P.id === D);
|
|
18764
18765
|
if (!R) {
|
|
18765
18766
|
o(null);
|
|
18766
18767
|
return;
|
|
@@ -18778,22 +18779,22 @@ function ag({
|
|
|
18778
18779
|
}), o(null);
|
|
18779
18780
|
return;
|
|
18780
18781
|
}
|
|
18781
|
-
const
|
|
18782
|
+
const A = ks(
|
|
18782
18783
|
R,
|
|
18783
18784
|
b,
|
|
18784
18785
|
M
|
|
18785
18786
|
);
|
|
18786
18787
|
if (o(null), b === "sortBy") {
|
|
18787
|
-
Ts(R, M) || r(b, [...M,
|
|
18788
|
+
Ts(R, M) || r(b, [...M, A]);
|
|
18788
18789
|
return;
|
|
18789
18790
|
}
|
|
18790
18791
|
const T = N.filter(
|
|
18791
18792
|
(P) => P.id !== D
|
|
18792
|
-
), _ = [...M,
|
|
18793
|
-
if (r(
|
|
18793
|
+
), _ = [...M, A];
|
|
18794
|
+
if (r(E, T), r(b, _), b === "metrics" && t) {
|
|
18794
18795
|
const P = Al(
|
|
18795
18796
|
l,
|
|
18796
|
-
|
|
18797
|
+
A,
|
|
18797
18798
|
l.preferences
|
|
18798
18799
|
);
|
|
18799
18800
|
P && i(P), El(
|
|
@@ -18807,11 +18808,11 @@ function ag({
|
|
|
18807
18808
|
}
|
|
18808
18809
|
return;
|
|
18809
18810
|
}
|
|
18810
|
-
if (
|
|
18811
|
-
const N = n(
|
|
18811
|
+
if (E && b && E === b && E !== "source") {
|
|
18812
|
+
const N = n(E), M = N.findIndex((g) => g.id === D), R = N.findIndex((g) => g.id === I);
|
|
18812
18813
|
if (M !== R) {
|
|
18813
18814
|
const g = Un(N, M, R);
|
|
18814
|
-
r(
|
|
18815
|
+
r(E, g);
|
|
18815
18816
|
}
|
|
18816
18817
|
}
|
|
18817
18818
|
o(null);
|
|
@@ -19051,7 +19052,7 @@ function cg({
|
|
|
19051
19052
|
(ue) => ue.actions.removeCardInlineFilterValue
|
|
19052
19053
|
), i = Me((ue) => ue.filterValues), u = Me((ue) => ue.selectedSheetId), { updateCardConfig: f, setCard: h, updateCardInFrame: p, setShowAIDialog: m } = xe(), x = F((ue) => ue.showAIDialog), y = F((ue) => ue.isDevMode), v = Me((ue) => ue.isVisualEditing), [C, k] = G(!1), [B, w] = G(!1), [O, S] = G(!1), [D, I] = G(
|
|
19053
19054
|
null
|
|
19054
|
-
), { config:
|
|
19055
|
+
), { config: E } = pr(nr).tokenProps, b = (E == null ? void 0 : E.showInfoTab) !== !1, L = (E == null ? void 0 : E.showQueryDebugTools) !== !1, [N, M] = og();
|
|
19055
19056
|
F(
|
|
19056
19057
|
(ue) => {
|
|
19057
19058
|
var ie;
|
|
@@ -19059,7 +19060,7 @@ function cg({
|
|
|
19059
19060
|
}
|
|
19060
19061
|
);
|
|
19061
19062
|
const g = tn(o) === "dynamic", {
|
|
19062
|
-
data:
|
|
19063
|
+
data: A,
|
|
19063
19064
|
errorMessage: T,
|
|
19064
19065
|
isLoading: _,
|
|
19065
19066
|
isFetching: P,
|
|
@@ -19069,8 +19070,8 @@ function cg({
|
|
|
19069
19070
|
comparisonMetadata: Y,
|
|
19070
19071
|
queryRequestPayload: le
|
|
19071
19072
|
} = Nt(r), Q = oe(
|
|
19072
|
-
() => (
|
|
19073
|
-
[
|
|
19073
|
+
() => (A == null ? void 0 : A.records) || [],
|
|
19074
|
+
[A == null ? void 0 : A.records]
|
|
19074
19075
|
), [ce, he] = G(!1);
|
|
19075
19076
|
Ce(() => {
|
|
19076
19077
|
P || he(!1);
|
|
@@ -19233,7 +19234,7 @@ function cg({
|
|
|
19233
19234
|
lg,
|
|
19234
19235
|
{
|
|
19235
19236
|
card: r,
|
|
19236
|
-
queryData:
|
|
19237
|
+
queryData: A,
|
|
19237
19238
|
isLoading: _,
|
|
19238
19239
|
isFetching: P,
|
|
19239
19240
|
pagination: q,
|
|
@@ -19247,8 +19248,8 @@ function cg({
|
|
|
19247
19248
|
)
|
|
19248
19249
|
}
|
|
19249
19250
|
),
|
|
19250
|
-
t === "table" && (
|
|
19251
|
-
(_ || P) && (
|
|
19251
|
+
t === "table" && (A == null ? void 0 : A.records) && /* @__PURE__ */ a("div", { className: "relative flex h-full min-h-0 max-w-full flex-1 grow basis-0 py-4 pl-2 pr-4", children: [
|
|
19252
|
+
(_ || P) && (A == null ? void 0 : A.records) && /* @__PURE__ */ e("div", { className: "absolute inset-0 z-50 flex items-center justify-center bg-background/50", children: /* @__PURE__ */ e(
|
|
19252
19253
|
zt,
|
|
19253
19254
|
{
|
|
19254
19255
|
size: "md",
|
|
@@ -19284,7 +19285,7 @@ function cg({
|
|
|
19284
19285
|
dashboardFilters: i,
|
|
19285
19286
|
errorMessage: T,
|
|
19286
19287
|
errorSql: V,
|
|
19287
|
-
generatedSql:
|
|
19288
|
+
generatedSql: A == null ? void 0 : A.sql
|
|
19288
19289
|
}
|
|
19289
19290
|
);
|
|
19290
19291
|
I(ue), w(!0);
|
|
@@ -19300,14 +19301,14 @@ function cg({
|
|
|
19300
19301
|
}
|
|
19301
19302
|
) : (
|
|
19302
19303
|
/* Show normal SQL display when there's no error */
|
|
19303
|
-
(
|
|
19304
|
+
(A == null ? void 0 : A.sql) && /* @__PURE__ */ e(
|
|
19304
19305
|
no,
|
|
19305
19306
|
{
|
|
19306
|
-
sql:
|
|
19307
|
+
sql: A.sql,
|
|
19307
19308
|
showCardDetails: !0,
|
|
19308
19309
|
debugPayloads: L ? {
|
|
19309
19310
|
queryRequest: le,
|
|
19310
|
-
queryResponse:
|
|
19311
|
+
queryResponse: A,
|
|
19311
19312
|
columns: c,
|
|
19312
19313
|
dashboardFilters: i
|
|
19313
19314
|
} : void 0
|
|
@@ -19395,7 +19396,7 @@ function mg({ column: t, isSelected: s, onSelect: n, availableFields: r, width:
|
|
|
19395
19396
|
setNodeRef: S,
|
|
19396
19397
|
transform: D,
|
|
19397
19398
|
transition: I,
|
|
19398
|
-
isDragging:
|
|
19399
|
+
isDragging: E
|
|
19399
19400
|
} = ns({ id: t.id }), b = {
|
|
19400
19401
|
transform: ss.Transform.toString(D),
|
|
19401
19402
|
transition: I
|
|
@@ -19448,7 +19449,7 @@ function mg({ column: t, isSelected: s, onSelect: n, availableFields: r, width:
|
|
|
19448
19449
|
groupByColumns: [...$, Q]
|
|
19449
19450
|
});
|
|
19450
19451
|
}
|
|
19451
|
-
},
|
|
19452
|
+
}, A = ($) => {
|
|
19452
19453
|
var Q;
|
|
19453
19454
|
const Y = ((Q = l == null ? void 0 : l.config) == null ? void 0 : Q.metricColumns) || [];
|
|
19454
19455
|
if (!Y.some(
|
|
@@ -19479,7 +19480,7 @@ function mg({ column: t, isSelected: s, onSelect: n, availableFields: r, width:
|
|
|
19479
19480
|
style: _,
|
|
19480
19481
|
className: W(
|
|
19481
19482
|
"group relative border-r border-border bg-background px-1 py-0",
|
|
19482
|
-
|
|
19483
|
+
E && "opacity-50",
|
|
19483
19484
|
s && "bg-primary/10",
|
|
19484
19485
|
m && "select-none"
|
|
19485
19486
|
),
|
|
@@ -19539,12 +19540,12 @@ function mg({ column: t, isSelected: s, onSelect: n, availableFields: r, width:
|
|
|
19539
19540
|
"Summarize"
|
|
19540
19541
|
] }),
|
|
19541
19542
|
/* @__PURE__ */ a(um, { children: [
|
|
19542
|
-
/* @__PURE__ */ e(dt, { onClick: () =>
|
|
19543
|
-
/* @__PURE__ */ e(dt, { onClick: () =>
|
|
19544
|
-
/* @__PURE__ */ e(dt, { onClick: () =>
|
|
19545
|
-
/* @__PURE__ */ e(dt, { onClick: () =>
|
|
19546
|
-
/* @__PURE__ */ e(dt, { onClick: () =>
|
|
19547
|
-
/* @__PURE__ */ e(dt, { onClick: () =>
|
|
19543
|
+
/* @__PURE__ */ e(dt, { onClick: () => A("SUM"), children: "Sum" }),
|
|
19544
|
+
/* @__PURE__ */ e(dt, { onClick: () => A("AVG"), children: "Average" }),
|
|
19545
|
+
/* @__PURE__ */ e(dt, { onClick: () => A("COUNT"), children: "Count" }),
|
|
19546
|
+
/* @__PURE__ */ e(dt, { onClick: () => A("DISTINCT"), children: "Count Distinct" }),
|
|
19547
|
+
/* @__PURE__ */ e(dt, { onClick: () => A("MIN"), children: "Min" }),
|
|
19548
|
+
/* @__PURE__ */ e(dt, { onClick: () => A("MAX"), children: "Max" })
|
|
19548
19549
|
] })
|
|
19549
19550
|
] }),
|
|
19550
19551
|
/* @__PURE__ */ e(Lt, {}),
|
|
@@ -19620,19 +19621,19 @@ function pg({
|
|
|
19620
19621
|
sourceFields: r = [],
|
|
19621
19622
|
filterableFields: c = r
|
|
19622
19623
|
}) {
|
|
19623
|
-
var
|
|
19624
|
+
var E, b, L, N;
|
|
19624
19625
|
const o = F((M) => M.card), { updateCardConfig: l } = xe(), [d, i] = G(null), [u, f] = G({}), [h, p] = G(!1), m = oe(() => {
|
|
19625
|
-
var g,
|
|
19626
|
-
const M = ((g = o == null ? void 0 : o.config) == null ? void 0 : g.groupByColumns) || [], R = ((
|
|
19626
|
+
var g, A;
|
|
19627
|
+
const M = ((g = o == null ? void 0 : o.config) == null ? void 0 : g.groupByColumns) || [], R = ((A = o == null ? void 0 : o.config) == null ? void 0 : A.metricColumns) || [];
|
|
19627
19628
|
return [...M, ...R];
|
|
19628
|
-
}, [(
|
|
19629
|
+
}, [(E = o == null ? void 0 : o.config) == null ? void 0 : E.groupByColumns, (b = o == null ? void 0 : o.config) == null ? void 0 : b.metricColumns]), x = oe(() => {
|
|
19629
19630
|
const M = new Set(m.map((R) => `${R.qualifiedEntityName}.${R.name}`));
|
|
19630
19631
|
return r.filter((R) => !M.has(`${R.qualifiedEntityName}.${R.name}`));
|
|
19631
19632
|
}, [r, m]), { data: y, isLoading: v } = Nt(o), C = (y == null ? void 0 : y.records) || [], k = ke((M, R) => {
|
|
19632
19633
|
f((g) => ({ ...g, [M]: R }));
|
|
19633
19634
|
}, []), B = ke((M) => {
|
|
19634
19635
|
var T, _;
|
|
19635
|
-
const R = Ze(M.dataType), g = ((T = o == null ? void 0 : o.config) == null ? void 0 : T.groupByColumns) || [],
|
|
19636
|
+
const R = Ze(M.dataType), g = ((T = o == null ? void 0 : o.config) == null ? void 0 : T.groupByColumns) || [], A = ((_ = o == null ? void 0 : o.config) == null ? void 0 : _.metricColumns) || [];
|
|
19636
19637
|
if (R === "number") {
|
|
19637
19638
|
const P = {
|
|
19638
19639
|
...M,
|
|
@@ -19641,7 +19642,7 @@ function pg({
|
|
|
19641
19642
|
aggregate: "SUM"
|
|
19642
19643
|
};
|
|
19643
19644
|
l(o.id, {
|
|
19644
|
-
metricColumns: [...
|
|
19645
|
+
metricColumns: [...A, P]
|
|
19645
19646
|
});
|
|
19646
19647
|
} else {
|
|
19647
19648
|
const P = {
|
|
@@ -19665,9 +19666,9 @@ function pg({
|
|
|
19665
19666
|
}, S = (M) => {
|
|
19666
19667
|
const { active: R, over: g } = M;
|
|
19667
19668
|
if (i(null), !g || R.id === g.id) return;
|
|
19668
|
-
const
|
|
19669
|
-
if (
|
|
19670
|
-
const _ = Un(m,
|
|
19669
|
+
const A = m.findIndex((_) => _.id === R.id), T = m.findIndex((_) => _.id === g.id);
|
|
19670
|
+
if (A !== -1 && T !== -1) {
|
|
19671
|
+
const _ = Un(m, A, T), P = _.filter((q) => q.role === "groupby"), V = _.filter((q) => q.role === "metric");
|
|
19671
19672
|
l(o.id, {
|
|
19672
19673
|
groupByColumns: P,
|
|
19673
19674
|
metricColumns: V
|
|
@@ -19799,7 +19800,7 @@ function pg({
|
|
|
19799
19800
|
children: [
|
|
19800
19801
|
/* @__PURE__ */ e("td", { className: "sticky left-0 z-10 w-12 border-r border-border bg-muted/50 px-2 py-2 text-center text-xs font-medium text-muted-foreground", children: R + 1 }),
|
|
19801
19802
|
m.map((g) => {
|
|
19802
|
-
const
|
|
19803
|
+
const A = M[g.name] ?? M[g.label ?? ""];
|
|
19803
19804
|
return /* @__PURE__ */ e(
|
|
19804
19805
|
"td",
|
|
19805
19806
|
{
|
|
@@ -19811,7 +19812,7 @@ function pg({
|
|
|
19811
19812
|
"border-r border-border px-3 py-2 text-sm",
|
|
19812
19813
|
(t == null ? void 0 : t.id) === g.id && "bg-primary/5"
|
|
19813
19814
|
),
|
|
19814
|
-
children: /* @__PURE__ */ e("span", { className: "block truncate", children: fg(
|
|
19815
|
+
children: /* @__PURE__ */ e("span", { className: "block truncate", children: fg(A, g) })
|
|
19815
19816
|
},
|
|
19816
19817
|
`${R}-${g.id}`
|
|
19817
19818
|
);
|
|
@@ -19892,9 +19893,9 @@ function gg({
|
|
|
19892
19893
|
}
|
|
19893
19894
|
else {
|
|
19894
19895
|
const D = p.findIndex(
|
|
19895
|
-
(
|
|
19896
|
+
(E) => E.name === O.name && E.qualifiedEntityName === O.qualifiedEntityName
|
|
19896
19897
|
), I = m.findIndex(
|
|
19897
|
-
(
|
|
19898
|
+
(E) => E.name === O.name && E.qualifiedEntityName === O.qualifiedEntityName
|
|
19898
19899
|
);
|
|
19899
19900
|
D !== -1 && c(n.id, p[D].id), I !== -1 && o(n.id, m[I].id);
|
|
19900
19901
|
}
|
|
@@ -20035,7 +20036,7 @@ function gg({
|
|
|
20035
20036
|
/* @__PURE__ */ e("span", { className: "text-xs text-muted-foreground", children: S.length })
|
|
20036
20037
|
] }),
|
|
20037
20038
|
/* @__PURE__ */ e($t, { children: /* @__PURE__ */ e("div", { className: "ml-4 space-y-0.5 border-l border-border pl-2", children: S.map((I) => {
|
|
20038
|
-
const
|
|
20039
|
+
const E = k(I.dataType), b = y(I);
|
|
20039
20040
|
return /* @__PURE__ */ a(
|
|
20040
20041
|
"label",
|
|
20041
20042
|
{
|
|
@@ -20052,7 +20053,7 @@ function gg({
|
|
|
20052
20053
|
className: "h-3.5 w-3.5"
|
|
20053
20054
|
}
|
|
20054
20055
|
),
|
|
20055
|
-
/* @__PURE__ */ e(
|
|
20056
|
+
/* @__PURE__ */ e(E, { className: "h-3.5 w-3.5 text-muted-foreground" }),
|
|
20056
20057
|
/* @__PURE__ */ e("span", { className: "flex-1 truncate", children: I.label || I.name })
|
|
20057
20058
|
]
|
|
20058
20059
|
},
|
|
@@ -20322,7 +20323,7 @@ function yg() {
|
|
|
20322
20323
|
), S = p, {
|
|
20323
20324
|
getFieldsForContainer: D,
|
|
20324
20325
|
setFieldsForContainer: I
|
|
20325
|
-
} = qi(S), { activeField:
|
|
20326
|
+
} = qi(S), { activeField: E, handleDragStart: b, handleDragEnd: L } = ag({
|
|
20326
20327
|
activeCardId: h.activeCardId,
|
|
20327
20328
|
sourceFields: B,
|
|
20328
20329
|
getFieldsForContainer: D,
|
|
@@ -20343,7 +20344,7 @@ function yg() {
|
|
|
20343
20344
|
return P.groups.forEach((q) => {
|
|
20344
20345
|
V += g(q);
|
|
20345
20346
|
}), V;
|
|
20346
|
-
},
|
|
20347
|
+
}, A = g(((T = S == null ? void 0 : S.config) == null ? void 0 : T.filters) || null);
|
|
20347
20348
|
return /* @__PURE__ */ a(
|
|
20348
20349
|
ya,
|
|
20349
20350
|
{
|
|
@@ -20371,7 +20372,7 @@ function yg() {
|
|
|
20371
20372
|
metricsFields: D("metrics"),
|
|
20372
20373
|
sortByFields: D("sortBy"),
|
|
20373
20374
|
detailFields: D("detailColumns"),
|
|
20374
|
-
activeField:
|
|
20375
|
+
activeField: E
|
|
20375
20376
|
}
|
|
20376
20377
|
),
|
|
20377
20378
|
/* @__PURE__ */ e(
|
|
@@ -20381,7 +20382,7 @@ function yg() {
|
|
|
20381
20382
|
activeView: t,
|
|
20382
20383
|
onViewChange: s,
|
|
20383
20384
|
onFiltersClick: () => r(!0),
|
|
20384
|
-
filterCount:
|
|
20385
|
+
filterCount: A,
|
|
20385
20386
|
activeCard: S,
|
|
20386
20387
|
columns: k,
|
|
20387
20388
|
getFieldsForContainer: D,
|
|
@@ -20416,7 +20417,7 @@ function yg() {
|
|
|
20416
20417
|
onOpenChange: r
|
|
20417
20418
|
}
|
|
20418
20419
|
),
|
|
20419
|
-
/* @__PURE__ */ e(Hi, { dropAnimation: null, children: /* @__PURE__ */ e(dg, { activeField:
|
|
20420
|
+
/* @__PURE__ */ e(Hi, { dropAnimation: null, children: /* @__PURE__ */ e(dg, { activeField: E || null }) })
|
|
20420
20421
|
]
|
|
20421
20422
|
}
|
|
20422
20423
|
);
|