react-semaphor 0.1.531 → 0.1.533
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/brand-studio/index.js +1 -1
- package/dist/chunks/{dashboard-BHMHze_t.js → dashboard-DUCg1mNJ.js} +1 -1
- package/dist/chunks/{dashboard-briefing-launcher-nHbT_XPG.js → dashboard-briefing-launcher-B0PuQUiR.js} +1401 -1383
- package/dist/chunks/{dashboard-controls-Chv8n1oV.js → dashboard-controls-Cl3fLg9W.js} +39 -39
- package/dist/chunks/{dashboard-json-XgY8U_hG.js → dashboard-json-BSOgXGwr.js} +1 -1
- package/dist/chunks/{edit-dashboard-visual-CcxZN7C6.js → edit-dashboard-visual-CQDyMxM7.js} +516 -516
- package/dist/chunks/{editor-action-buttons-CCzvDROJ.js → editor-action-buttons-BKVrZnRQ.js} +2 -2
- package/dist/chunks/{matrix-formatter-DDjECnMd.js → matrix-formatter-DY1y9odV.js} +2 -1
- package/dist/chunks/{pivot-header-presentation-BTOXdU6S.js → pivot-header-presentation-Bb6b3Ch2.js} +232 -210
- package/dist/chunks/{report-preferences-dialog-D2Tz_5WT.js → report-preferences-dialog-WDM7qWxV.js} +16 -16
- package/dist/chunks/{semaphor-ready-indicator-CpbyewzC.js → semaphor-ready-indicator-yZ0JtL4D.js} +36174 -36148
- package/dist/chunks/{slider-p0D5yTI_.js → slider-0mB67Lls.js} +3 -3
- package/dist/chunks/{switch-JmX27lNB.js → switch-D95vek6N.js} +1690 -1683
- package/dist/dashboard/index.js +1 -1
- package/dist/data-app-sdk/index.js +1 -1
- package/dist/format-utils/index.js +90 -89
- package/dist/index.js +120 -119
- package/dist/surfboard/index.js +1 -1
- package/dist/types/components/surfboard/filter/date-range-filter-v2.d.ts +2 -2
- package/dist/types/components/surfboard/filter/types.d.ts +9 -0
- package/dist/types/components/ui-custom/date-range-picker.d.ts +18 -6
- package/dist/types/lib/api/exports-api.d.ts +30 -3
- package/dist/types/lib/csv-download.d.ts +4 -2
- package/dist/types/lib/export-messages.d.ts +47 -0
- package/dist/types/lib/exports/bounded-request.d.ts +12 -0
- package/dist/types/lib/exports/export-status.d.ts +2 -0
- package/dist/types/lib/hooks/use-date-filter.d.ts +3 -3
- package/dist/types/lib/hooks/use-export-polling.d.ts +9 -1
- package/dist/types/lib/matrix-table/submit-matrix-delivery.d.ts +14 -2
- package/dist/types/lib/matrix-table/use-matrix.d.ts +4 -0
- package/dist/types/lib/stores/export-store.d.ts +11 -0
- package/dist/types/lib/temporal-filter/temporal-filter-utils.d.ts +9 -0
- package/dist/types/shared/format-utils/formatters/matrix-formatter.d.ts +6 -0
- package/dist/types/shared/format-utils/matrix-export-presentation.d.ts +28 -4
- package/package.json +1 -1
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { jsx as e, jsxs as n, Fragment as Ce } from "react/jsx-runtime";
|
|
2
2
|
import * as zn from "react";
|
|
3
|
-
import Qt, { useState as U, useEffect as Me, useMemo as de, useRef as
|
|
4
|
-
import { F as Xc, I as Zc, S as Ur, M as Vn, a as ed, b as td, R as ad, P as wl, c as Sl, T as Co, E as nd, d as Un } from "./slider-
|
|
3
|
+
import Qt, { useState as U, useEffect as Me, useMemo as de, useRef as Ie, useCallback as Re, useId as Ya, useContext as ls, Suspense as Wc } from "react";
|
|
4
|
+
import { F as Xc, I as Zc, S as Ur, M as Vn, a as ed, b as td, R as ad, P as wl, c as Sl, T as Co, E as nd, d as Un } from "./slider-0mB67Lls.js";
|
|
5
5
|
import { c as tt, C as Tt, X as ut } from "./x-CXDkqdur.js";
|
|
6
|
-
import { a3 as De, B as se, l as Gn, g as lr, c as H, aj as pt, m as q, s as le, t as oe, v as ie, w as ce, x as K, a2 as R, q as Ct, n as
|
|
6
|
+
import { a3 as De, B as se, l as Gn, g as lr, c as H, aj as pt, m as q, s as le, t as oe, v as ie, w as ce, x as K, a2 as R, q as Ct, n as Et, o as wt, p as St, b0 as rd, P as It, a as Vt, b as At, aV as dn, b1 as os, b2 as wo, aT as So, aR as sd, r as _e, b3 as ld, L as Ha, C as _a, T as Qa, e as Ja, f as Lt, h as Wt, d as Sa, u as we, R as Hn, b4 as od, b5 as id, b6 as is, a0 as To, k as ko, S as Qn, b7 as cd, b8 as dd, b9 as ud, ba as md, bb as hd, bc as pd, bd as Mo, at as fd, aX as gd, be as xd, bf as bd, bg as Tl, bh as vd, bi as yd, a9 as Nd, bj as Cd, bk as Gr, bl as Do, I as mn, bm as ra, y as Ke, bn as Eo, bo as wd, bp as Io, bq as Sd, br as Td, bs as Pt, j as Ao, bt as zt, V as kl, bu as kd, bv as Md, bw as Dd, bx as Ed, by as Id, bz as Ad, bA as Fd, bB as Od, bC as Rd, bD as Pd, bE as Ld, bF as Ml, bG as Vd, bH as Nr, bI as Yd, bJ as _d, bK as Bd, aN as $d } from "./switch-D95vek6N.js";
|
|
7
7
|
import { F as Fo, ac as qd, a0 as Dl, bm as jd, B as Jn, bo as Cr, ba as Oo } from "./validators-BS521dum.js";
|
|
8
8
|
import "./matrix-operation-contract-BotZ-6zT.js";
|
|
9
9
|
import "zod";
|
|
10
10
|
import { DEFAULT_RESOLVED_VALUE_FORMAT_PREFERENCES as hn } from "../value-format-preferences/index.js";
|
|
11
|
-
import {
|
|
11
|
+
import { cY as Ro, aZ as va, a_ as ya, a$ as Ba, b0 as Na, b1 as $a, aY as Hr, bb as Rt, bc as Xt, cZ as Kd, c_ as Yn, c$ as zd, d0 as _n, cG as Wn, bn as kt, b$ as cs, d1 as Wa, be as vn, az as Ft, d2 as Xn, d3 as Po, d4 as Ud, d5 as Gd, d6 as Lo, d7 as Hd, d8 as Qd, d9 as Jd, da as Wd, db as Vo, dc as ds, dd as Xd, de as Zd, aC as Xa, l as Yo, df as _o, dg as Bo, dh as $o, di as eu, dj as tu, dk as au, cM as qo, c7 as jo, aA as Ko, aE as la, dl as zo, dm as nu, aQ as un, dn as Uo, dp as Ca, dq as Nt, dr as ru, ds as Go, bJ as Bt, dt as su, du as Ho, dv as lu, dw as ou, dx as iu, aW as Qo, dy as cu, dz as du, dA as uu, dB as mu, dC as hu, dD as pu, dE as fu, dF as wr, dG as gu, dH as El, dI as xu, dJ as Il, dK as bu, bY as yn, bZ as Nn, b_ as Cn, dL as Jo, bt as us, cs as ms, dM as Wo, dN as hs, dO as ps, dP as vu, dQ as yu, dR as Xo, dS as Zo, dT as Nu, dU as Cu, dV as Jt, dW as wu, dX as Su, aS as Tu, dY as ku, dZ as Mu, d_ as ei, A as ti, d$ as fs, M as Du, e0 as Eu, e1 as Iu, e2 as Au, e3 as or, e4 as Fu, e5 as Ou, e6 as Al, e7 as Ru, E as ir, d as gs, e8 as xs, e9 as Pu, ea as Fl, I as dt, eb as Lu, ec as ai, ed as ni, ee as Vu, ef as Ol, eg as wn, eh as Yu, ei as _u, ej as Bu, ek as $u, el as qu, em as Zn, en as ju, eo as Ku, ep as ri, eq as si, er as zu, es as Uu, cl as Gu, et as Hu, eu as li, ev as Qu, ew as Ju, cm as cr, ex as dr, ey as Oa, ez as Ra, eA as Wu, aT as oi, eB as qa, eC as ja, eD as Ka, eE as za, ay as Xu, aR as Zu, cw as Rl, bi as Za, bj as en, bk as tn, eF as em, eG as ii, eH as tm, eI as am, eJ as ci, eK as nm, eL as rm, eM as sm, eN as lm, eO as om, eP as Sr, eQ as im, eR as cm, eS as di, aB as ui, aD as dm, aJ as um, aK as mm, aF as hm, aG as pm, aH as fm, eT as gm, eU as xm, eV as bm, eW as vm, eX as Pl, aM as ym, aN as Nm, aO as Cm, eY as bs, eZ as mi, e_ as pn, e$ as fn, f0 as gn, cE as wa, c2 as vs, c6 as Bn, c3 as $n, c4 as Qr, f1 as hi, f2 as Ua, f3 as wm, f4 as Sm, f5 as Tm, f6 as ur, f7 as rt, f8 as st, f9 as lt, fa as km, fb as Mm, fc as Dm, fd as Em, fe as pi, ff as fi, fg as Im, fh as Am, fi as Fm, fj as gi, fk as Ll, fl as xi, fm as Om, fn as Rm, fo as Jr, fp as Pm, fq as Lm, fr as Vm, fs as Ym, ft as _m, fu as Bm, fv as $m, fw as qm, fx as jm, fy as Km, fz as zm, fA as Um, fB as Gm, fC as Hm, fD as pa, fE as ln, fF as Qm, fG as Vl, fH as Jm, fI as Wm, fJ as Tr, fK as Yl, fL as Xm, fM as Zm, fN as eh, fO as th, fP as ah, aU as ys, aV as xn, fQ as kr, fR as bi, fS as nh, fT as rh, fU as sh, fV as lh, fW as vi, fX as yi, fY as oh, fZ as Ni, Q as ih, f_ as On, f$ as ch, g0 as _l, g1 as dh, g2 as uh, g3 as Bl, g4 as mh, g5 as hh, g6 as ph, g7 as fh, g8 as gh, g9 as Ci, ga as xh, gb as bh, gc as vh, gd as yh, ge as Nh, gf as Ch, gg as wh, gh as Ns, gi as Cs, gj as ws, gk as Sh, gl as wi, gm as Th, co as kh, gn as Mh, go as Dh, gp as Eh, gq as Si, cF as Ss, gr as Ti, gs as ki, gt as Mi, gu as Ih, gv as Ah, gw as Fh, gx as Oh, gy as Rh, gz as Ph, gA as Lh, gB as Vh, gC as Yh, gD as _h, gE as Bh, gF as $h, gG as Ts, gH as Di, gI as Ei, gJ as Ii, gK as qn, gL as Ai, gM as Fi, gN as qh, gO as $l, gP as jh, gQ as Kh, gR as zh, gS as Uh, gT as jn, gU as Gh, gV as Hh, gW as Wr, gX as Oi, gY as Qh, gZ as Jh, g_ as Wh, g$ as Pa, h0 as Ri, h1 as Xh, h2 as Zh, h3 as ep, h4 as tp, h5 as ap, h6 as er, h7 as xa, h8 as Xr, h9 as Zr, ha as tr, hb as Pi, hc as Mr, hd as Dr, he as np, hf as rp, hg as ql, hh as jl, V as sp, cO as lp, hi as op, cP as ip, cR as cp, cS as dp, u as up, hj as mp, hk as hp, hl as pp, hm as fp, hn as gp, cI as Er, ho as xp, hp as bp, hq as vp, hr as yp, F as Np, hs as Cp, bq as wp } from "./semaphor-ready-indicator-yZ0JtL4D.js";
|
|
12
12
|
import { C as Sp, E as Kl, A as Li, b as Tp, g as es, d as Kn, B as Vi, e as kp } from "./field-aggregations-BCDRRYMo.js";
|
|
13
|
-
import { C as Mp, g as ks, w as Ga, h as an, s as Yi, v as ba, m as _i, c as Rn, d as Dp, M as
|
|
13
|
+
import { C as Mp, g as ks, w as Ga, h as an, s as Yi, v as ba, m as _i, c as Rn, d as Dp, M as Ep, e as Ip, f as Ap, j as Fp, k as bn } from "./card-config-utils-DqyASiD_.js";
|
|
14
14
|
import { C as ea, a as Bi, M as $i, E as ar, S as qi } from "./selection-reducer-DQok8gsC.js";
|
|
15
|
-
import { h as Op, F as Rp, i as Pp, f as Fa, u as vt, V as ji, g as Lp, C as Vp, j as Yp } from "./editor-action-buttons-
|
|
15
|
+
import { h as Op, F as Rp, i as Pp, f as Fa, u as vt, V as ji, g as Lp, C as Vp, j as Yp } from "./editor-action-buttons-BKVrZnRQ.js";
|
|
16
16
|
import { g as _p, L as Bp, M as $p, u as qp, v as jp, y as Kp, w as zp } from "./calculated-field-identity-Q1aCudPD.js";
|
|
17
17
|
import { f as Ta, r as oa, g as Sn, a as Zt, b as La, i as Up, j as Gp, k as Hp, l as Qp, c as Ki, n as Jp, m as ts, o as Wp, p as Xp, q as Zp } from "./index-BpAM7UE0.js";
|
|
18
18
|
import { createPortal as ef } from "react-dom";
|
|
@@ -23,7 +23,7 @@ import { m as rf } from "./matrix-control-sources-fD0Ns_9n.js";
|
|
|
23
23
|
import { r as sf } from "./pivot-result-lifecycle-BxmATSFJ.js";
|
|
24
24
|
import { u as lf } from "./appearance-context-DEYtWinQ.js";
|
|
25
25
|
import { D as zl } from "./metric-comparison-QEkk6hqL.js";
|
|
26
|
-
import { m as zi } from "./matrix-formatter-
|
|
26
|
+
import { m as zi } from "./matrix-formatter-DY1y9odV.js";
|
|
27
27
|
import { f as of } from "./semantic-format-ByNkXJpY.js";
|
|
28
28
|
import { P as cf } from "./palette-Cp1hqZtm.js";
|
|
29
29
|
/**
|
|
@@ -228,7 +228,7 @@ const bf = tt("ListX", [
|
|
|
228
228
|
* This source code is licensed under the ISC license.
|
|
229
229
|
* See the LICENSE file in the root directory of this source tree.
|
|
230
230
|
*/
|
|
231
|
-
const
|
|
231
|
+
const Ir = tt("MoveHorizontal", [
|
|
232
232
|
["path", { d: "m18 8 4 4-4 4", key: "1ak13k" }],
|
|
233
233
|
["path", { d: "M2 12h20", key: "9i4pu4" }],
|
|
234
234
|
["path", { d: "m6 8-4 4 4 4", key: "15zrgr" }]
|
|
@@ -491,7 +491,7 @@ function Mf({
|
|
|
491
491
|
const [r, s] = U(
|
|
492
492
|
() => Sp(t, a)
|
|
493
493
|
), [o, d] = U(/* @__PURE__ */ new Set()), i = () => {
|
|
494
|
-
const
|
|
494
|
+
const I = r.joins.length > 0 ? Math.max(...r.joins.map((k) => k.sequence)) + 1 : 1, E = {
|
|
495
495
|
autoResolved: !1,
|
|
496
496
|
id: `join-${Date.now()}`,
|
|
497
497
|
source: {
|
|
@@ -507,7 +507,7 @@ function Mf({
|
|
|
507
507
|
schema: ""
|
|
508
508
|
},
|
|
509
509
|
joinType: "INNER",
|
|
510
|
-
sequence:
|
|
510
|
+
sequence: I,
|
|
511
511
|
joinKeyGroups: [
|
|
512
512
|
{
|
|
513
513
|
id: "group-" + Date.now() + "-" + Math.random().toString(36).substr(2, 9),
|
|
@@ -518,18 +518,18 @@ function Mf({
|
|
|
518
518
|
};
|
|
519
519
|
s({
|
|
520
520
|
...r,
|
|
521
|
-
joins: [...r.joins,
|
|
522
|
-
}), d(/* @__PURE__ */ new Set([...o,
|
|
523
|
-
}, l = (
|
|
521
|
+
joins: [...r.joins, E]
|
|
522
|
+
}), d(/* @__PURE__ */ new Set([...o, E.id]));
|
|
523
|
+
}, l = (I) => {
|
|
524
524
|
s({
|
|
525
525
|
...r,
|
|
526
|
-
joins: r.joins.filter((
|
|
527
|
-
}), d(new Set([...o].filter((
|
|
528
|
-
}, c = (
|
|
526
|
+
joins: r.joins.filter((E) => E.id !== I)
|
|
527
|
+
}), d(new Set([...o].filter((E) => E !== I)));
|
|
528
|
+
}, c = (I, E) => {
|
|
529
529
|
var D, _, v, V, Y;
|
|
530
|
-
const k = r.joins.find((F) => F.id ===
|
|
530
|
+
const k = r.joins.find((F) => F.id === I);
|
|
531
531
|
if (!k) return;
|
|
532
|
-
const C = !!(
|
|
532
|
+
const C = !!(E.source || E.target || E.joinKeyGroups), y = {
|
|
533
533
|
...k,
|
|
534
534
|
...C ? {
|
|
535
535
|
relationshipId: void 0,
|
|
@@ -537,7 +537,7 @@ function Mf({
|
|
|
537
537
|
relationshipCardinality: void 0,
|
|
538
538
|
relationshipTraversalDirection: void 0
|
|
539
539
|
} : {},
|
|
540
|
-
...
|
|
540
|
+
...E,
|
|
541
541
|
autoResolved: !1
|
|
542
542
|
};
|
|
543
543
|
if ((D = y.source) != null && D.name && ((_ = y.target) != null && _.name) && y.source.name === y.target.name) {
|
|
@@ -549,7 +549,7 @@ function Mf({
|
|
|
549
549
|
const L = r.joins.filter(
|
|
550
550
|
(F) => {
|
|
551
551
|
var A;
|
|
552
|
-
return F.id !==
|
|
552
|
+
return F.id !== I && F.target.name === ((A = y.target) == null ? void 0 : A.name);
|
|
553
553
|
}
|
|
554
554
|
);
|
|
555
555
|
if ((v = y.target) != null && v.name && L.length > 0) {
|
|
@@ -559,7 +559,7 @@ function Mf({
|
|
|
559
559
|
return;
|
|
560
560
|
}
|
|
561
561
|
const w = r.joins.map(
|
|
562
|
-
(F) => F.id ===
|
|
562
|
+
(F) => F.id === I ? y : F
|
|
563
563
|
);
|
|
564
564
|
if ((V = y.source) != null && V.name && ((Y = y.target) != null && Y.name) && y.joinKeyGroups[0].keys.length === 0) {
|
|
565
565
|
const F = a.find(
|
|
@@ -599,7 +599,7 @@ function Mf({
|
|
|
599
599
|
j[0] = {
|
|
600
600
|
...j[0],
|
|
601
601
|
keys: [P]
|
|
602
|
-
}, y.joinKeyGroups = j, w[w.findIndex((B) => B.id ===
|
|
602
|
+
}, y.joinKeyGroups = j, w[w.findIndex((B) => B.id === I)] = y;
|
|
603
603
|
}
|
|
604
604
|
s({
|
|
605
605
|
...r,
|
|
@@ -613,11 +613,11 @@ function Mf({
|
|
|
613
613
|
addJoin: i,
|
|
614
614
|
removeJoin: l,
|
|
615
615
|
updateJoin: c,
|
|
616
|
-
moveJoinUp: (
|
|
617
|
-
const
|
|
618
|
-
if (
|
|
619
|
-
const k = [...r.joins], C = { ...k[
|
|
620
|
-
k[
|
|
616
|
+
moveJoinUp: (I) => {
|
|
617
|
+
const E = r.joins.findIndex((k) => k.id === I);
|
|
618
|
+
if (E > 0) {
|
|
619
|
+
const k = [...r.joins], C = { ...k[E] }, y = { ...k[E - 1] };
|
|
620
|
+
k[E] = y, k[E - 1] = C, k.forEach((w, D) => {
|
|
621
621
|
w.sequence = D + 1;
|
|
622
622
|
});
|
|
623
623
|
const L = {
|
|
@@ -627,11 +627,11 @@ function Mf({
|
|
|
627
627
|
s(L);
|
|
628
628
|
}
|
|
629
629
|
},
|
|
630
|
-
moveJoinDown: (
|
|
631
|
-
const
|
|
632
|
-
if (
|
|
633
|
-
const k = [...r.joins], C = { ...k[
|
|
634
|
-
k[
|
|
630
|
+
moveJoinDown: (I) => {
|
|
631
|
+
const E = r.joins.findIndex((k) => k.id === I);
|
|
632
|
+
if (E < r.joins.length - 1) {
|
|
633
|
+
const k = [...r.joins], C = { ...k[E] }, y = { ...k[E + 1] };
|
|
634
|
+
k[E] = y, k[E + 1] = C, k.forEach((w, D) => {
|
|
635
635
|
w.sequence = D + 1;
|
|
636
636
|
});
|
|
637
637
|
const L = {
|
|
@@ -641,52 +641,52 @@ function Mf({
|
|
|
641
641
|
s(L);
|
|
642
642
|
}
|
|
643
643
|
},
|
|
644
|
-
toggleJoinExpansion: (
|
|
645
|
-
const
|
|
646
|
-
|
|
644
|
+
toggleJoinExpansion: (I) => {
|
|
645
|
+
const E = new Set(o);
|
|
646
|
+
E.has(I) ? E.delete(I) : E.add(I), d(E);
|
|
647
647
|
},
|
|
648
|
-
getAvailableSourceEntities: (
|
|
648
|
+
getAvailableSourceEntities: (I) => {
|
|
649
649
|
if (r.joins.length === 0) return a;
|
|
650
|
-
const
|
|
651
|
-
(C) => C.id ===
|
|
650
|
+
const E = r.joins.findIndex(
|
|
651
|
+
(C) => C.id === I
|
|
652
652
|
);
|
|
653
|
-
if (
|
|
653
|
+
if (E === 0)
|
|
654
654
|
return a.filter(
|
|
655
655
|
(C) => C.name === r.baseEntity.name
|
|
656
656
|
);
|
|
657
657
|
const k = /* @__PURE__ */ new Set();
|
|
658
|
-
return r.baseEntity.name && k.add(r.baseEntity.name), r.joins.slice(0,
|
|
658
|
+
return r.baseEntity.name && k.add(r.baseEntity.name), r.joins.slice(0, E).forEach((C) => {
|
|
659
659
|
k.add(C.source.name), k.add(C.target.name);
|
|
660
660
|
}), a.filter((C) => k.has(C.name));
|
|
661
661
|
},
|
|
662
|
-
getAvailableTargetEntities: (
|
|
663
|
-
addJoinKeyGroup: (
|
|
664
|
-
const
|
|
665
|
-
if (!
|
|
666
|
-
const k = [...
|
|
667
|
-
c(
|
|
662
|
+
getAvailableTargetEntities: (I) => a.filter((E) => E.name !== I),
|
|
663
|
+
addJoinKeyGroup: (I) => {
|
|
664
|
+
const E = r.joins.find((C) => C.id === I);
|
|
665
|
+
if (!E) return;
|
|
666
|
+
const k = [...E.joinKeyGroups, Gl()];
|
|
667
|
+
c(I, { joinKeyGroups: k });
|
|
668
668
|
},
|
|
669
|
-
updateGroupOperator: (
|
|
670
|
-
const C = r.joins.find((L) => L.id ===
|
|
669
|
+
updateGroupOperator: (I, E, k) => {
|
|
670
|
+
const C = r.joins.find((L) => L.id === I);
|
|
671
671
|
if (!C) return;
|
|
672
672
|
const y = [...C.joinKeyGroups];
|
|
673
|
-
y[
|
|
673
|
+
y[E] = { ...y[E], operator: k }, c(I, { joinKeyGroups: y });
|
|
674
674
|
},
|
|
675
|
-
removeJoinKeyGroup: (
|
|
676
|
-
const k = r.joins.find((y) => y.id ===
|
|
675
|
+
removeJoinKeyGroup: (I, E) => {
|
|
676
|
+
const k = r.joins.find((y) => y.id === I);
|
|
677
677
|
if (!k) return;
|
|
678
678
|
const C = [...k.joinKeyGroups];
|
|
679
|
-
C.splice(
|
|
679
|
+
C.splice(E, 1), c(I, { joinKeyGroups: C });
|
|
680
680
|
},
|
|
681
|
-
addJoinKey: (
|
|
682
|
-
const k = r.joins.find((D) => D.id ===
|
|
681
|
+
addJoinKey: (I, E) => {
|
|
682
|
+
const k = r.joins.find((D) => D.id === I);
|
|
683
683
|
if (!k) return;
|
|
684
684
|
const C = a.find(
|
|
685
685
|
(D) => D.name === k.source.name
|
|
686
686
|
), y = a.find(
|
|
687
687
|
(D) => D.name === k.target.name
|
|
688
688
|
), L = [...k.joinKeyGroups];
|
|
689
|
-
L[
|
|
689
|
+
L[E] || (L[E] = Gl());
|
|
690
690
|
const w = {
|
|
691
691
|
id: `key-${Date.now()}`,
|
|
692
692
|
source: {
|
|
@@ -711,51 +711,51 @@ function Mf({
|
|
|
711
711
|
},
|
|
712
712
|
operator: "="
|
|
713
713
|
};
|
|
714
|
-
L[
|
|
715
|
-
...L[
|
|
716
|
-
keys: [...L[
|
|
717
|
-
}, c(
|
|
714
|
+
L[E] = {
|
|
715
|
+
...L[E],
|
|
716
|
+
keys: [...L[E].keys, w]
|
|
717
|
+
}, c(I, { joinKeyGroups: L });
|
|
718
718
|
},
|
|
719
|
-
updateJoinKey: (
|
|
720
|
-
const L = r.joins.find((V) => V.id ===
|
|
719
|
+
updateJoinKey: (I, E, k, C, y) => {
|
|
720
|
+
const L = r.joins.find((V) => V.id === I);
|
|
721
721
|
if (!L) return;
|
|
722
722
|
const w = a.find(
|
|
723
723
|
(V) => V.name === L.source.name
|
|
724
724
|
), D = a.find(
|
|
725
725
|
(V) => V.name === L.target.name
|
|
726
|
-
), _ = [...L.joinKeyGroups], v = _[
|
|
727
|
-
C === "sourceColumnName" && w ? _[
|
|
726
|
+
), _ = [...L.joinKeyGroups], v = _[E].keys[k];
|
|
727
|
+
C === "sourceColumnName" && w ? _[E].keys[k] = {
|
|
728
728
|
...v,
|
|
729
729
|
source: {
|
|
730
730
|
...v.source,
|
|
731
731
|
name: y
|
|
732
732
|
}
|
|
733
|
-
} : C === "targetColumnName" && D ? _[
|
|
733
|
+
} : C === "targetColumnName" && D ? _[E].keys[k] = {
|
|
734
734
|
...v,
|
|
735
735
|
target: {
|
|
736
736
|
...v.target,
|
|
737
737
|
name: y
|
|
738
738
|
}
|
|
739
|
-
} : C === "operator" && (_[
|
|
739
|
+
} : C === "operator" && (_[E].keys[k] = {
|
|
740
740
|
...v,
|
|
741
741
|
operator: y
|
|
742
|
-
}), c(
|
|
742
|
+
}), c(I, { joinKeyGroups: _ });
|
|
743
743
|
},
|
|
744
|
-
removeJoinKey: (
|
|
745
|
-
const C = r.joins.find((L) => L.id ===
|
|
744
|
+
removeJoinKey: (I, E, k) => {
|
|
745
|
+
const C = r.joins.find((L) => L.id === I);
|
|
746
746
|
if (!C) return;
|
|
747
747
|
const y = [...C.joinKeyGroups];
|
|
748
|
-
y[
|
|
748
|
+
y[E].keys.splice(k, 1), c(I, { joinKeyGroups: y });
|
|
749
749
|
},
|
|
750
750
|
generateSQLPreview: () => {
|
|
751
|
-
const
|
|
751
|
+
const I = [...r.joins].sort(
|
|
752
752
|
(C, y) => C.sequence - y.sequence
|
|
753
|
-
),
|
|
754
|
-
if (!
|
|
753
|
+
), E = r.baseEntity;
|
|
754
|
+
if (!E.name)
|
|
755
755
|
return "SELECT * FROM table -- Please select a base entity";
|
|
756
756
|
let k = `SELECT *
|
|
757
|
-
FROM ${
|
|
758
|
-
return
|
|
757
|
+
FROM ${E.name}`;
|
|
758
|
+
return I.forEach((C) => {
|
|
759
759
|
const y = a.find(
|
|
760
760
|
(D) => D.name === C.target.name
|
|
761
761
|
);
|
|
@@ -794,12 +794,12 @@ const Df = [
|
|
|
794
794
|
{ value: "INNER", label: "Only matching rows" },
|
|
795
795
|
{ value: "RIGHT", label: "Keep all target rows" },
|
|
796
796
|
{ value: "FULL", label: "Keep all rows" }
|
|
797
|
-
],
|
|
797
|
+
], Ef = {
|
|
798
798
|
one_to_one: "One to one",
|
|
799
799
|
one_to_many: "One to many",
|
|
800
800
|
many_to_one: "Many to one",
|
|
801
801
|
many_to_many: "Many to many"
|
|
802
|
-
},
|
|
802
|
+
}, If = {
|
|
803
803
|
one_to_one: "1 : 1",
|
|
804
804
|
one_to_many: "1 : N",
|
|
805
805
|
many_to_one: "N : 1",
|
|
@@ -830,8 +830,8 @@ function Ff({
|
|
|
830
830
|
updateGroupOperator: T,
|
|
831
831
|
removeJoinKeyGroup: M,
|
|
832
832
|
addJoinKey: O,
|
|
833
|
-
updateJoinKey:
|
|
834
|
-
removeJoinKey:
|
|
833
|
+
updateJoinKey: I,
|
|
834
|
+
removeJoinKey: E,
|
|
835
835
|
generateSQLPreview: k,
|
|
836
836
|
isValidConfiguration: C
|
|
837
837
|
} = Mf({
|
|
@@ -1140,10 +1140,10 @@ function Ff({
|
|
|
1140
1140
|
/* @__PURE__ */ e(oe, { "aria-label": `Matches per row: ${F.source.name || "source"} to ${F.target.name || "target"}`, className: "h-8 text-[12px]", children: /* @__PURE__ */ e(ie, {}) }),
|
|
1141
1141
|
/* @__PURE__ */ n(ce, { children: [
|
|
1142
1142
|
/* @__PURE__ */ e(K, { value: "unknown", children: "Detect automatically when possible" }),
|
|
1143
|
-
Object.entries(
|
|
1143
|
+
Object.entries(Ef).map(([z, X]) => /* @__PURE__ */ n(K, { value: z, children: [
|
|
1144
1144
|
X,
|
|
1145
1145
|
" (",
|
|
1146
|
-
|
|
1146
|
+
If[z],
|
|
1147
1147
|
")"
|
|
1148
1148
|
] }, z))
|
|
1149
1149
|
] })
|
|
@@ -1164,8 +1164,8 @@ function Ff({
|
|
|
1164
1164
|
addJoinKeyGroup: S,
|
|
1165
1165
|
updateGroupOperator: T,
|
|
1166
1166
|
removeJoinKeyGroup: M,
|
|
1167
|
-
updateJoinKey:
|
|
1168
|
-
removeJoinKey:
|
|
1167
|
+
updateJoinKey: I,
|
|
1168
|
+
removeJoinKey: E,
|
|
1169
1169
|
canCollapse: F.joinKeyGroups.length <= 1 && F.joinKeyGroups.every(
|
|
1170
1170
|
(z) => z.operator === "AND"
|
|
1171
1171
|
),
|
|
@@ -1182,8 +1182,8 @@ function Ff({
|
|
|
1182
1182
|
keyIndex: X,
|
|
1183
1183
|
conditionKey: z,
|
|
1184
1184
|
getColumnsForEntity: _,
|
|
1185
|
-
updateJoinKey:
|
|
1186
|
-
removeJoinKey:
|
|
1185
|
+
updateJoinKey: I,
|
|
1186
|
+
removeJoinKey: E,
|
|
1187
1187
|
showRemove: F.joinKeyGroups[0].keys.length > 1
|
|
1188
1188
|
},
|
|
1189
1189
|
z.id || X
|
|
@@ -1667,18 +1667,18 @@ function Vf({
|
|
|
1667
1667
|
x(!1);
|
|
1668
1668
|
}, p = () => {
|
|
1669
1669
|
const T = [...i.joins].sort(
|
|
1670
|
-
(
|
|
1670
|
+
(I, E) => I.sequence - E.sequence
|
|
1671
1671
|
), M = i.baseEntity;
|
|
1672
1672
|
if (!M.name)
|
|
1673
1673
|
return "SELECT * FROM table -- Please select a base entity";
|
|
1674
1674
|
let O = `SELECT *
|
|
1675
1675
|
FROM ${M.name}`;
|
|
1676
|
-
return T.forEach((
|
|
1677
|
-
const
|
|
1678
|
-
(y) => y.name ===
|
|
1676
|
+
return T.forEach((I) => {
|
|
1677
|
+
const E = h.find(
|
|
1678
|
+
(y) => y.name === I.target.name
|
|
1679
1679
|
);
|
|
1680
|
-
if (!
|
|
1681
|
-
const k =
|
|
1680
|
+
if (!E) return;
|
|
1681
|
+
const k = I.joinKeyGroups.filter((y) => y.keys && y.keys.length > 0).map((y) => {
|
|
1682
1682
|
const L = y.keys.filter(
|
|
1683
1683
|
(w) => {
|
|
1684
1684
|
var D, _, v, V;
|
|
@@ -1690,7 +1690,7 @@ FROM ${M.name}`;
|
|
|
1690
1690
|
return L.length > 1 ? `(${L.join(` ${y.operator} `)})` : L[0];
|
|
1691
1691
|
}).filter(Boolean), C = k.length > 1 ? k.join(" OR ") : k[0] || "condition_here";
|
|
1692
1692
|
O += `
|
|
1693
|
-
${
|
|
1693
|
+
${I.joinType} JOIN ${E.name}
|
|
1694
1694
|
ON ${C}`;
|
|
1695
1695
|
}), O;
|
|
1696
1696
|
};
|
|
@@ -1706,7 +1706,7 @@ ${E.joinType} JOIN ${I.name}
|
|
|
1706
1706
|
}
|
|
1707
1707
|
) });
|
|
1708
1708
|
return /* @__PURE__ */ n(Ce, { children: [
|
|
1709
|
-
/* @__PURE__ */ e(
|
|
1709
|
+
/* @__PURE__ */ e(Et, { children: /* @__PURE__ */ n(wt, { children: [
|
|
1710
1710
|
/* @__PURE__ */ e(St, { asChild: !0, children: r === "badge" ? /* @__PURE__ */ n(
|
|
1711
1711
|
Rt,
|
|
1712
1712
|
{
|
|
@@ -1785,16 +1785,16 @@ function Yf() {
|
|
|
1785
1785
|
dataSourceEntities: p
|
|
1786
1786
|
}),
|
|
1787
1787
|
[S, T, p]
|
|
1788
|
-
), O = g === 0 ? "Choose dataset" : g === 1 ? _f(p[0], f) : `${g} datasets`,
|
|
1789
|
-
|
|
1788
|
+
), O = g === 0 ? "Choose dataset" : g === 1 ? _f(p[0], f) : `${g} datasets`, I = ks(l), E = ((V = I == null ? void 0 : I.joins) == null ? void 0 : V.length) ?? 0, k = Kl(
|
|
1789
|
+
I,
|
|
1790
1790
|
p
|
|
1791
|
-
), C = k.length > 0, y = !c && (g > 1 ||
|
|
1791
|
+
), C = k.length > 0, y = !c && (g > 1 || E > 0), L = !!(x != null && x.autoResolved);
|
|
1792
1792
|
((F = (Y = x == null ? void 0 : x.resolvedJoinPlan) == null ? void 0 : Y.joins) == null ? void 0 : F.length) ?? ((A = x == null ? void 0 : x.relationshipsUsed) == null || A.length);
|
|
1793
|
-
const w =
|
|
1793
|
+
const w = E > 0 ? `${E} join${E === 1 ? "" : "s"}` : g < 2 ? null : L ? "auto" : null, D = (P) => {
|
|
1794
1794
|
const j = p.filter(
|
|
1795
1795
|
(B) => !Yn(B, P)
|
|
1796
1796
|
);
|
|
1797
|
-
l && Kl(
|
|
1797
|
+
l && Kl(I, j).length > 0 && m(l.id, Ga(l, void 0)), u({
|
|
1798
1798
|
...N,
|
|
1799
1799
|
...N.mode === "semanticDomain" ? {
|
|
1800
1800
|
semanticDomainId: Xd(j)
|
|
@@ -1813,7 +1813,7 @@ function Yf() {
|
|
|
1813
1813
|
});
|
|
1814
1814
|
};
|
|
1815
1815
|
return /* @__PURE__ */ n(Ce, { children: [
|
|
1816
|
-
/* @__PURE__ */ n(
|
|
1816
|
+
/* @__PURE__ */ n(It, { open: t, onOpenChange: a, children: [
|
|
1817
1817
|
/* @__PURE__ */ e(Vt, { asChild: !0, children: /* @__PURE__ */ n(
|
|
1818
1818
|
"button",
|
|
1819
1819
|
{
|
|
@@ -1919,10 +1919,10 @@ function Yf() {
|
|
|
1919
1919
|
/* @__PURE__ */ e(Wd, { className: "mt-0.5 h-3.5 w-3.5 shrink-0" }),
|
|
1920
1920
|
/* @__PURE__ */ n("div", { className: "min-w-0", children: [
|
|
1921
1921
|
/* @__PURE__ */ n("p", { className: "font-medium", children: [
|
|
1922
|
-
|
|
1922
|
+
E,
|
|
1923
1923
|
" saved",
|
|
1924
1924
|
" ",
|
|
1925
|
-
|
|
1925
|
+
E === 1 ? "join" : "joins",
|
|
1926
1926
|
" need attention"
|
|
1927
1927
|
] }),
|
|
1928
1928
|
/* @__PURE__ */ n("p", { className: "mt-0.5 leading-relaxed text-amber-900/80 dark:text-amber-100/80", children: [
|
|
@@ -1968,8 +1968,8 @@ function Yf() {
|
|
|
1968
1968
|
strokeWidth: 1.75
|
|
1969
1969
|
}
|
|
1970
1970
|
),
|
|
1971
|
-
/* @__PURE__ */ e("span", { className: "min-w-0 flex-1 truncate text-[13px] text-foreground", children:
|
|
1972
|
-
L &&
|
|
1971
|
+
/* @__PURE__ */ e("span", { className: "min-w-0 flex-1 truncate text-[13px] text-foreground", children: E > 0 ? `${E} ${E === 1 ? "join" : "joins"}` : "Configure joins" }),
|
|
1972
|
+
L && E === 0 && /* @__PURE__ */ n("span", { className: "inline-flex items-center gap-1 text-[11px] text-muted-foreground", children: [
|
|
1973
1973
|
/* @__PURE__ */ e(Po, { className: "h-3 w-3", strokeWidth: 1.75 }),
|
|
1974
1974
|
"Auto"
|
|
1975
1975
|
] })
|
|
@@ -2207,13 +2207,13 @@ function Hf({
|
|
|
2207
2207
|
}
|
|
2208
2208
|
), f = dn(
|
|
2209
2209
|
(W) => W.currentAIContext.selectedEntities
|
|
2210
|
-
), b = f.length, { setCurrentAIContext: N } = os(), [p, g] = U(""), [S, T] = U(""), [M, O] = U(""), [
|
|
2210
|
+
), b = f.length, { setCurrentAIContext: N } = os(), [p, g] = U(""), [S, T] = U(""), [M, O] = U(""), [I, E] = U("draft"), [k, C] = U("draft"), [y, L] = U(""), [w, D] = U(!1), [_, v] = U({ status: "idle" }), [V, Y] = U(
|
|
2211
2211
|
Fr
|
|
2212
2212
|
), [F, A] = U(!1), [P, j] = U(
|
|
2213
2213
|
() => Pn("inline-query-session")
|
|
2214
|
-
), B =
|
|
2214
|
+
), B = Ie(null), $ = Ie(null), Q = Ie(null), re = Ie(0), z = Ie(0), X = Ie(
|
|
2215
2215
|
Pn("inline-run-token")
|
|
2216
|
-
), Z =
|
|
2216
|
+
), Z = Ie(P), te = Ie(/* @__PURE__ */ new Set()), fe = Ie(/* @__PURE__ */ new Map()), Te = Ie(0), ke = Ie(""), Ve = Ie(!1), Je = Ie(!1), ze = Ie(Fr), Ye = Ie(!1), Be = Ie(null), et = Ie(() => {
|
|
2217
2217
|
}), xe = (ht = c.apiServiceUrl) == null ? void 0 : ht.replace(/\/$/, ""), je = xe ? `${xe}/v1/sql/validate` : "/v1/sql/validate", Ue = Re(
|
|
2218
2218
|
(W) => {
|
|
2219
2219
|
Y((he) => {
|
|
@@ -2461,7 +2461,7 @@ function Hf({
|
|
|
2461
2461
|
$.current = Qe, Q.current = Ot;
|
|
2462
2462
|
const me = !["ready", "error"].includes(
|
|
2463
2463
|
ve
|
|
2464
|
-
),
|
|
2464
|
+
), Ee = (Xe == null ? void 0 : Xe.message) || "Unable to generate a SQL draft right now. Try again.", Ae = Re(
|
|
2465
2465
|
(W) => {
|
|
2466
2466
|
const he = z.current, ue = ze.current.phase;
|
|
2467
2467
|
if (!(ue === "drafting" || ue === "self-healing" || ue === "validating")) {
|
|
@@ -2731,7 +2731,7 @@ function Hf({
|
|
|
2731
2731
|
attemptCount: 0,
|
|
2732
2732
|
hasTools: !1,
|
|
2733
2733
|
finalOutcome: "drafting"
|
|
2734
|
-
}), Ne(), qe(), T(he), O(""),
|
|
2734
|
+
}), Ne(), qe(), T(he), O(""), E(ue), L(Oe), D(!1), v({ status: "idle" }), re.current += 1, at([]), A(!0);
|
|
2735
2735
|
const ct = qf({
|
|
2736
2736
|
request: he,
|
|
2737
2737
|
mode: ue,
|
|
@@ -2767,7 +2767,7 @@ function Hf({
|
|
|
2767
2767
|
[d, M]
|
|
2768
2768
|
), ia = M.trim().length > 0, kn = ["valid", "invalid", "error"].includes(
|
|
2769
2769
|
_.status
|
|
2770
|
-
), Gt = ia && kn, Mn = _.status === "invalid", ta = _.status === "validating", ca = ia && S.length > 0 && S === p.trim(), nn = qt.length > 0, Ma = p.trim().length > 0, rn = ca &&
|
|
2770
|
+
), Gt = ia && kn, Mn = _.status === "invalid", ta = _.status === "validating", ca = ia && S.length > 0 && S === p.trim(), nn = qt.length > 0, Ma = p.trim().length > 0, rn = ca && I === "draft", da = ca && I === "refine" && y === qt, aa = k === "refine" && !nn ? "draft" : k, Da = (aa === "refine" ? da : rn) ? "Open composer preview" : "Generate composer SQL", En = p.trim().length > 0 || S.trim().length > 0 || ia || _.status !== "idle" || V.timelineSteps.length > 0, Ht = Re(
|
|
2771
2771
|
(W = "draft") => {
|
|
2772
2772
|
if (me)
|
|
2773
2773
|
return;
|
|
@@ -2787,13 +2787,13 @@ function Hf({
|
|
|
2787
2787
|
]
|
|
2788
2788
|
), ua = Re(() => {
|
|
2789
2789
|
Ne(), A(!0);
|
|
2790
|
-
}, [Ne]),
|
|
2790
|
+
}, [Ne]), Ea = Re(
|
|
2791
2791
|
(W) => {
|
|
2792
2792
|
Ae("cancelled"), g(W);
|
|
2793
2793
|
},
|
|
2794
2794
|
[Ae]
|
|
2795
2795
|
), sn = Re(() => {
|
|
2796
|
-
me || (Ae("cancelled"), Ye.current = !1, re.current += 1, ke.current = "", Te.current = 0, g(""), T(""), O(""),
|
|
2796
|
+
me || (Ae("cancelled"), Ye.current = !1, re.current += 1, ke.current = "", Te.current = 0, g(""), T(""), O(""), E("draft"), C("draft"), L(""), D(!1), v({ status: "idle" }), qe(), at([]), Ue((W) => ({
|
|
2797
2797
|
...Fr,
|
|
2798
2798
|
runId: W.runId
|
|
2799
2799
|
})));
|
|
@@ -2808,7 +2808,7 @@ function Hf({
|
|
|
2808
2808
|
W || Ae("cancelled"), A(W);
|
|
2809
2809
|
},
|
|
2810
2810
|
[Ae]
|
|
2811
|
-
),
|
|
2811
|
+
), In = V.timelineSteps.findIndex(
|
|
2812
2812
|
(W) => W === V.activeStep
|
|
2813
2813
|
), xr = V.phase === "self-healing" ? "Fixing validation issue" : V.phase === "validating" ? "Validating SQL" : V.activeStep || "Drafting SQL", ma = _.status === "valid" ? {
|
|
2814
2814
|
label: "Validation passed",
|
|
@@ -2833,7 +2833,7 @@ function Hf({
|
|
|
2833
2833
|
_e,
|
|
2834
2834
|
{
|
|
2835
2835
|
value: p,
|
|
2836
|
-
onChange: (W) =>
|
|
2836
|
+
onChange: (W) => Ea(W.target.value),
|
|
2837
2837
|
onFocus: ua,
|
|
2838
2838
|
onClick: ua,
|
|
2839
2839
|
onKeyDown: (W) => {
|
|
@@ -2847,7 +2847,7 @@ function Hf({
|
|
|
2847
2847
|
].join(" ")
|
|
2848
2848
|
}
|
|
2849
2849
|
),
|
|
2850
|
-
/* @__PURE__ */ n(
|
|
2850
|
+
/* @__PURE__ */ n(It, { open: F, onOpenChange: gr, children: [
|
|
2851
2851
|
/* @__PURE__ */ e(ld, { asChild: !0, children: /* @__PURE__ */ e("div", { className: "pointer-events-none absolute inset-0" }) }),
|
|
2852
2852
|
/* @__PURE__ */ n("div", { className: "absolute right-1 flex items-center gap-1", children: [
|
|
2853
2853
|
Ma && /* @__PURE__ */ e(
|
|
@@ -2968,7 +2968,7 @@ function Hf({
|
|
|
2968
2968
|
variant: "ghost",
|
|
2969
2969
|
size: "xs",
|
|
2970
2970
|
onClick: sn,
|
|
2971
|
-
disabled: !
|
|
2971
|
+
disabled: !En,
|
|
2972
2972
|
children: "Clear"
|
|
2973
2973
|
}
|
|
2974
2974
|
)
|
|
@@ -2978,7 +2978,7 @@ function Hf({
|
|
|
2978
2978
|
V.timelineSteps.map((W, he) => {
|
|
2979
2979
|
const ue = W === V.activeStep && ["drafting", "validating", "self-healing"].includes(
|
|
2980
2980
|
V.phase
|
|
2981
|
-
), Oe = !ue &&
|
|
2981
|
+
), Oe = !ue && In >= 0 && he < In;
|
|
2982
2982
|
return /* @__PURE__ */ e(
|
|
2983
2983
|
"span",
|
|
2984
2984
|
{
|
|
@@ -2991,7 +2991,7 @@ function Hf({
|
|
|
2991
2991
|
`${W}-${he}`
|
|
2992
2992
|
);
|
|
2993
2993
|
}),
|
|
2994
|
-
ma && /* @__PURE__ */ e(
|
|
2994
|
+
ma && /* @__PURE__ */ e(Et, { delayDuration: 150, children: /* @__PURE__ */ n(wt, { children: [
|
|
2995
2995
|
/* @__PURE__ */ e(St, { asChild: !0, children: /* @__PURE__ */ e(
|
|
2996
2996
|
"span",
|
|
2997
2997
|
{
|
|
@@ -3017,8 +3017,8 @@ function Hf({
|
|
|
3017
3017
|
/* @__PURE__ */ e(Ha, { className: "size-3.5 animate-spin" }),
|
|
3018
3018
|
xr
|
|
3019
3019
|
] }),
|
|
3020
|
-
Xe && /* @__PURE__ */ e("div", { className: "rounded-md border border-destructive/40 bg-destructive/5 px-3 py-2 text-xs text-destructive", children:
|
|
3021
|
-
|
|
3020
|
+
Xe && /* @__PURE__ */ e("div", { className: "rounded-md border border-destructive/40 bg-destructive/5 px-3 py-2 text-xs text-destructive", children: Ee }),
|
|
3021
|
+
I === "refine" && y && /* @__PURE__ */ n("div", { className: "space-y-1", children: [
|
|
3022
3022
|
/* @__PURE__ */ n("div", { className: "flex items-center justify-between rounded-[5px] border border-border/60 bg-muted/20 px-2.5 py-1.5 text-[11px]", children: [
|
|
3023
3023
|
/* @__PURE__ */ e("span", { className: "text-muted-foreground", children: "Refining editor SQL" }),
|
|
3024
3024
|
/* @__PURE__ */ e(
|
|
@@ -3049,7 +3049,7 @@ function Hf({
|
|
|
3049
3049
|
) })
|
|
3050
3050
|
] }),
|
|
3051
3051
|
Gt ? /* @__PURE__ */ n("div", { className: "space-y-1", children: [
|
|
3052
|
-
|
|
3052
|
+
I === "refine" && /* @__PURE__ */ e("p", { className: "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", children: "Refined SQL" }),
|
|
3053
3053
|
/* @__PURE__ */ e("div", { className: "max-h-[200px] overflow-auto rounded-[5px] border border-border/60", children: /* @__PURE__ */ e(
|
|
3054
3054
|
_a,
|
|
3055
3055
|
{
|
|
@@ -3191,7 +3191,7 @@ function Jf({
|
|
|
3191
3191
|
expandedEditor: a,
|
|
3192
3192
|
showPythonEditor: r
|
|
3193
3193
|
}) {
|
|
3194
|
-
const s =
|
|
3194
|
+
const s = Ie(null), o = Ie(null), d = Ie(null), i = Ie(null), l = Ie({
|
|
3195
3195
|
cardId: t,
|
|
3196
3196
|
snapshots: {}
|
|
3197
3197
|
}), c = Re(
|
|
@@ -3215,7 +3215,7 @@ function Jf({
|
|
|
3215
3215
|
};
|
|
3216
3216
|
}
|
|
3217
3217
|
function Wf({ value: t }) {
|
|
3218
|
-
const [a, r] = U(!1), s =
|
|
3218
|
+
const [a, r] = U(!1), s = Ie(null);
|
|
3219
3219
|
Me(() => () => {
|
|
3220
3220
|
s.current && clearTimeout(s.current);
|
|
3221
3221
|
}, []);
|
|
@@ -3261,7 +3261,7 @@ function Wf({ value: t }) {
|
|
|
3261
3261
|
function Xf({
|
|
3262
3262
|
hint: t
|
|
3263
3263
|
}) {
|
|
3264
|
-
const [a, r] = U(!1), s =
|
|
3264
|
+
const [a, r] = U(!1), s = Ie(null), o = Ie(null), d = () => {
|
|
3265
3265
|
s.current && (clearTimeout(s.current), s.current = null);
|
|
3266
3266
|
}, i = () => {
|
|
3267
3267
|
o.current && (clearTimeout(o.current), o.current = null);
|
|
@@ -3274,7 +3274,7 @@ function Xf({
|
|
|
3274
3274
|
}, c = (m) => {
|
|
3275
3275
|
m.pointerType !== "touch" && (d(), i(), o.current = setTimeout(() => r(!1), 150));
|
|
3276
3276
|
};
|
|
3277
|
-
return /* @__PURE__ */ n(
|
|
3277
|
+
return /* @__PURE__ */ n(It, { open: a, onOpenChange: r, children: [
|
|
3278
3278
|
/* @__PURE__ */ e(Vt, { asChild: !0, children: /* @__PURE__ */ n(
|
|
3279
3279
|
se,
|
|
3280
3280
|
{
|
|
@@ -3364,20 +3364,20 @@ function Zf({
|
|
|
3364
3364
|
), O = de(
|
|
3365
3365
|
() => Ta(m, u),
|
|
3366
3366
|
[m, u]
|
|
3367
|
-
), { manifest:
|
|
3367
|
+
), { manifest: I } = la(
|
|
3368
3368
|
((ye = O == null ? void 0 : O.customCardPreferences) == null ? void 0 : ye.url) || ""
|
|
3369
|
-
),
|
|
3369
|
+
), E = de(
|
|
3370
3370
|
() => {
|
|
3371
3371
|
var ae;
|
|
3372
|
-
return (ae =
|
|
3372
|
+
return (ae = I == null ? void 0 : I.visuals) == null ? void 0 : ae.find(
|
|
3373
3373
|
($e) => {
|
|
3374
3374
|
var it;
|
|
3375
3375
|
return $e.name === ((it = O == null ? void 0 : O.customCardPreferences) == null ? void 0 : it.componentName);
|
|
3376
3376
|
}
|
|
3377
3377
|
);
|
|
3378
3378
|
},
|
|
3379
|
-
[
|
|
3380
|
-
), k = oa(O,
|
|
3379
|
+
[I, (He = O == null ? void 0 : O.customCardPreferences) == null ? void 0 : He.componentName]
|
|
3380
|
+
), k = oa(O, E), C = de(
|
|
3381
3381
|
() => Sn({
|
|
3382
3382
|
frame: m,
|
|
3383
3383
|
configCard: O,
|
|
@@ -3392,8 +3392,8 @@ function Zf({
|
|
|
3392
3392
|
}, [C, u]), L = de(() => !O || k !== "multiple" || y < 0 ? u.type : La(
|
|
3393
3393
|
u,
|
|
3394
3394
|
y,
|
|
3395
|
-
|
|
3396
|
-
) ?? u.type, [O, k, y, u,
|
|
3395
|
+
E == null ? void 0 : E.slots
|
|
3396
|
+
) ?? u.type, [O, k, y, u, E == null ? void 0 : E.slots]), w = de(() => L !== u.type ? { ...u, type: L } : u, [u, L]), D = de(() => T === 0 ? null : _p(u == null ? void 0 : u.sql), [u == null ? void 0 : u.sql, T]), _ = Ie(!0), {
|
|
3397
3397
|
setCardCustomCfg: v,
|
|
3398
3398
|
setQueryResultColumns: V,
|
|
3399
3399
|
setCardSql: Y,
|
|
@@ -3421,7 +3421,7 @@ function Zf({
|
|
|
3421
3421
|
queryKey: Ye,
|
|
3422
3422
|
refetch: Be,
|
|
3423
3423
|
errorMessage: et
|
|
3424
|
-
} = Ft(w), xe =
|
|
3424
|
+
} = Ft(w), xe = Ie(Ye);
|
|
3425
3425
|
xe.current = Ye, Me(() => {
|
|
3426
3426
|
if (te)
|
|
3427
3427
|
if (te.rowLimitExceeded && pt.error("Row limit (10,000) exceeded. Refine your query.", {
|
|
@@ -3451,7 +3451,7 @@ function Zf({
|
|
|
3451
3451
|
]), Me(() => {
|
|
3452
3452
|
z && (a.getQueryData(Ye) || Be(), X(!1));
|
|
3453
3453
|
}, [z, Be, X, Ye, a]);
|
|
3454
|
-
const je =
|
|
3454
|
+
const je = Ie(Be);
|
|
3455
3455
|
je.current = Be, Me(() => {
|
|
3456
3456
|
if (_.current) {
|
|
3457
3457
|
_.current = !1;
|
|
@@ -3906,7 +3906,7 @@ function rg({
|
|
|
3906
3906
|
};
|
|
3907
3907
|
}),
|
|
3908
3908
|
[h, M, m]
|
|
3909
|
-
),
|
|
3909
|
+
), I = Math.max(O.length, 1), E = cu({
|
|
3910
3910
|
data: t,
|
|
3911
3911
|
columns: O,
|
|
3912
3912
|
getCoreRowModel: mu(),
|
|
@@ -3931,7 +3931,7 @@ function rg({
|
|
|
3931
3931
|
className: "w-full text-sm [border-spacing:0]",
|
|
3932
3932
|
style: { minWidth: w },
|
|
3933
3933
|
children: [
|
|
3934
|
-
/* @__PURE__ */ e(fu, { className: "sticky top-0 z-10 bg-muted [&_tr]:border-b-0", children:
|
|
3934
|
+
/* @__PURE__ */ e(fu, { className: "sticky top-0 z-10 bg-muted [&_tr]:border-b-0", children: E.getHeaderGroups().map((A) => /* @__PURE__ */ e(
|
|
3935
3935
|
wr,
|
|
3936
3936
|
{
|
|
3937
3937
|
className: "border-b-0 hover:bg-transparent",
|
|
@@ -3944,7 +3944,7 @@ function rg({
|
|
|
3944
3944
|
"group/header relative h-auto border-b border-transparent bg-muted/95 px-4 py-2 align-middle text-[10px] font-medium tracking-[0.08em] text-muted-foreground after:absolute after:bottom-0 after:left-0 after:right-0 after:h-px after:bg-border/60",
|
|
3945
3945
|
B && "text-right"
|
|
3946
3946
|
),
|
|
3947
|
-
children: P.isPlaceholder ? null :
|
|
3947
|
+
children: P.isPlaceholder ? null : El(
|
|
3948
3948
|
P.column.columnDef.header,
|
|
3949
3949
|
P.getContext()
|
|
3950
3950
|
)
|
|
@@ -3955,7 +3955,7 @@ function rg({
|
|
|
3955
3955
|
},
|
|
3956
3956
|
A.id
|
|
3957
3957
|
)) }),
|
|
3958
|
-
/* @__PURE__ */ e(xu, { children: (F =
|
|
3958
|
+
/* @__PURE__ */ e(xu, { children: (F = E.getRowModel().rows) != null && F.length ? E.getRowModel().rows.map((A) => /* @__PURE__ */ e(
|
|
3959
3959
|
wr,
|
|
3960
3960
|
{
|
|
3961
3961
|
className: "border-b border-border/40 transition-colors",
|
|
@@ -3963,13 +3963,13 @@ function rg({
|
|
|
3963
3963
|
children: A.getVisibleCells().map((P) => {
|
|
3964
3964
|
const B = M[P.column.id] === "number";
|
|
3965
3965
|
return /* @__PURE__ */ e(
|
|
3966
|
-
|
|
3966
|
+
Il,
|
|
3967
3967
|
{
|
|
3968
3968
|
className: H(
|
|
3969
3969
|
"overflow-hidden px-4 py-2 text-[13px] text-foreground/90",
|
|
3970
3970
|
B && "text-right"
|
|
3971
3971
|
),
|
|
3972
|
-
children:
|
|
3972
|
+
children: El(
|
|
3973
3973
|
P.column.columnDef.cell,
|
|
3974
3974
|
P.getContext()
|
|
3975
3975
|
)
|
|
@@ -3980,9 +3980,9 @@ function rg({
|
|
|
3980
3980
|
},
|
|
3981
3981
|
A.id
|
|
3982
3982
|
)) : /* @__PURE__ */ e(wr, { children: /* @__PURE__ */ e(
|
|
3983
|
-
|
|
3983
|
+
Il,
|
|
3984
3984
|
{
|
|
3985
|
-
colSpan:
|
|
3985
|
+
colSpan: I,
|
|
3986
3986
|
className: "h-auto py-12 text-center text-[13px] text-muted-foreground",
|
|
3987
3987
|
children: "No results."
|
|
3988
3988
|
}
|
|
@@ -3996,24 +3996,24 @@ function rg({
|
|
|
3996
3996
|
bu,
|
|
3997
3997
|
{
|
|
3998
3998
|
totalColumns: m.length,
|
|
3999
|
-
pageCount: g === "server" && r ? r.pageCount :
|
|
4000
|
-
pageIndex:
|
|
4001
|
-
pageSize:
|
|
3999
|
+
pageCount: g === "server" && r ? r.pageCount : E.getPageCount(),
|
|
4000
|
+
pageIndex: E.getState().pagination.pageIndex,
|
|
4001
|
+
pageSize: E.getState().pagination.pageSize,
|
|
4002
4002
|
rowCount: k,
|
|
4003
4003
|
selectedRowCount: 0,
|
|
4004
|
-
setPageIndex:
|
|
4005
|
-
setPageSize:
|
|
4006
|
-
canPreviousPage: g === "server" && r ? r.hasPrevPage :
|
|
4007
|
-
canNextPage: g === "server" && r ? r.hasNextPage :
|
|
4008
|
-
previousPage:
|
|
4009
|
-
nextPage:
|
|
4004
|
+
setPageIndex: E.setPageIndex,
|
|
4005
|
+
setPageSize: E.setPageSize,
|
|
4006
|
+
canPreviousPage: g === "server" && r ? r.hasPrevPage : E.getCanPreviousPage(),
|
|
4007
|
+
canNextPage: g === "server" && r ? r.hasNextPage : E.getCanNextPage(),
|
|
4008
|
+
previousPage: E.previousPage,
|
|
4009
|
+
nextPage: E.nextPage,
|
|
4010
4010
|
onPageSizePreferenceChange: o,
|
|
4011
4011
|
onClearSelection: () => {
|
|
4012
4012
|
},
|
|
4013
4013
|
paginationMode: g,
|
|
4014
4014
|
showPaginationControls: L,
|
|
4015
4015
|
onPaginationModeChange: C ? (A) => {
|
|
4016
|
-
|
|
4016
|
+
E.setPageIndex(0), l(A === "server"), c(!0);
|
|
4017
4017
|
} : void 0,
|
|
4018
4018
|
showExport: !1
|
|
4019
4019
|
}
|
|
@@ -4084,11 +4084,11 @@ function lg({ className: t }) {
|
|
|
4084
4084
|
if (b === N)
|
|
4085
4085
|
return p;
|
|
4086
4086
|
if (N === "detailTable") {
|
|
4087
|
-
const T = (
|
|
4087
|
+
const T = (E) => E == null ? void 0 : E.toLowerCase().replace(/\s+/g, "").trim(), M = (E, k) => {
|
|
4088
4088
|
const C = [
|
|
4089
|
-
T(
|
|
4090
|
-
T(
|
|
4091
|
-
T(
|
|
4089
|
+
T(E.label),
|
|
4090
|
+
T(E.qualifiedFieldName),
|
|
4091
|
+
T(E.name)
|
|
4092
4092
|
].filter(Boolean), y = [
|
|
4093
4093
|
T(k.label),
|
|
4094
4094
|
T(k.qualifiedFieldName),
|
|
@@ -4098,13 +4098,13 @@ function lg({ className: t }) {
|
|
|
4098
4098
|
(L) => y.includes(L)
|
|
4099
4099
|
);
|
|
4100
4100
|
}, O = (p.groupByColumns || []).map(
|
|
4101
|
-
(
|
|
4102
|
-
...
|
|
4101
|
+
(E) => ({
|
|
4102
|
+
...E,
|
|
4103
4103
|
role: "detail"
|
|
4104
4104
|
})
|
|
4105
|
-
),
|
|
4106
|
-
(
|
|
4107
|
-
(k) => M(
|
|
4105
|
+
), I = ((S = p.sortByColumns) == null ? void 0 : S.filter(
|
|
4106
|
+
(E) => O.some(
|
|
4107
|
+
(k) => M(E, k)
|
|
4108
4108
|
)
|
|
4109
4109
|
)) ?? [];
|
|
4110
4110
|
return {
|
|
@@ -4121,7 +4121,7 @@ function lg({ className: t }) {
|
|
|
4121
4121
|
groupByColumns: [],
|
|
4122
4122
|
metricColumns: [],
|
|
4123
4123
|
pivotByColumns: [],
|
|
4124
|
-
sortByColumns:
|
|
4124
|
+
sortByColumns: I,
|
|
4125
4125
|
rowAggregates: [],
|
|
4126
4126
|
columnAggregates: []
|
|
4127
4127
|
};
|
|
@@ -4181,7 +4181,7 @@ function ig(t) {
|
|
|
4181
4181
|
const r = (s = t.currentTarget.ownerDocument.defaultView) == null ? void 0 : s.getSelection();
|
|
4182
4182
|
return !!(r && !r.isCollapsed);
|
|
4183
4183
|
}
|
|
4184
|
-
function
|
|
4184
|
+
function Es({
|
|
4185
4185
|
text: t,
|
|
4186
4186
|
children: a,
|
|
4187
4187
|
className: r,
|
|
@@ -4191,7 +4191,7 @@ function Is({
|
|
|
4191
4191
|
onCopy: i,
|
|
4192
4192
|
...l
|
|
4193
4193
|
}) {
|
|
4194
|
-
const [c, m] = U(!1), u =
|
|
4194
|
+
const [c, m] = U(!1), u = Ie(void 0);
|
|
4195
4195
|
Me(
|
|
4196
4196
|
() => () => {
|
|
4197
4197
|
u.current && clearTimeout(u.current);
|
|
@@ -4242,7 +4242,7 @@ function Is({
|
|
|
4242
4242
|
children: a
|
|
4243
4243
|
}
|
|
4244
4244
|
);
|
|
4245
|
-
return /* @__PURE__ */ e(
|
|
4245
|
+
return /* @__PURE__ */ e(Et, { delayDuration: 0, children: /* @__PURE__ */ n(
|
|
4246
4246
|
wt,
|
|
4247
4247
|
{
|
|
4248
4248
|
open: c,
|
|
@@ -4323,7 +4323,7 @@ function to(t) {
|
|
|
4323
4323
|
return console.error("Unable to stringify debug payload", a), null;
|
|
4324
4324
|
}
|
|
4325
4325
|
}
|
|
4326
|
-
function
|
|
4326
|
+
function Ia(t) {
|
|
4327
4327
|
switch (t) {
|
|
4328
4328
|
case "queryRequest":
|
|
4329
4329
|
return "Query request";
|
|
@@ -4435,23 +4435,23 @@ function ac({
|
|
|
4435
4435
|
const M = r === "queryResponse" ? ug(T) : { value: T }, O = to(M.value);
|
|
4436
4436
|
return O ? {
|
|
4437
4437
|
target: r,
|
|
4438
|
-
title:
|
|
4438
|
+
title: Ia(r),
|
|
4439
4439
|
json: O,
|
|
4440
4440
|
truncationMessage: M.truncationMessage
|
|
4441
4441
|
} : null;
|
|
4442
4442
|
}, [r, m]), b = f ? f.title : "Inspect payload", N = async (T) => {
|
|
4443
4443
|
const M = m[T];
|
|
4444
4444
|
if (M === void 0)
|
|
4445
|
-
return pt.error(`No ${
|
|
4445
|
+
return pt.error(`No ${Ia(T).toLowerCase()} available`), !1;
|
|
4446
4446
|
const O = to(M);
|
|
4447
4447
|
if (!O)
|
|
4448
4448
|
return pt.error(
|
|
4449
|
-
`Unable to serialize ${
|
|
4449
|
+
`Unable to serialize ${Ia(T).toLowerCase()}`
|
|
4450
4450
|
), !1;
|
|
4451
4451
|
try {
|
|
4452
|
-
return await eo.writeTextToClipboard(O) ? (pt.success(`${
|
|
4453
|
-
} catch (
|
|
4454
|
-
return console.error("Failed to copy debug payload",
|
|
4452
|
+
return await eo.writeTextToClipboard(O) ? (pt.success(`${Ia(T)} copied`), !0) : (pt.error("Clipboard is not available"), !1);
|
|
4453
|
+
} catch (I) {
|
|
4454
|
+
return console.error("Failed to copy debug payload", I), pt.error(`Unable to copy ${Ia(T).toLowerCase()}`), !1;
|
|
4455
4455
|
}
|
|
4456
4456
|
}, p = async () => f ? N(f.target) : !1, g = async (T) => {
|
|
4457
4457
|
if (!T.value)
|
|
@@ -4463,14 +4463,14 @@ function ac({
|
|
|
4463
4463
|
}
|
|
4464
4464
|
}, S = (T) => {
|
|
4465
4465
|
if (m[T] === void 0) {
|
|
4466
|
-
pt.error(`No ${
|
|
4466
|
+
pt.error(`No ${Ia(T).toLowerCase()} available`);
|
|
4467
4467
|
return;
|
|
4468
4468
|
}
|
|
4469
4469
|
s(T);
|
|
4470
4470
|
};
|
|
4471
4471
|
return /* @__PURE__ */ n("div", { className: H("mb-2 min-w-0 px-3", a), children: [
|
|
4472
4472
|
/* @__PURE__ */ e("div", { className: "grid grid-cols-1 gap-x-6 gap-y-1 md:grid-cols-2", children: x.map((T) => /* @__PURE__ */ n(
|
|
4473
|
-
|
|
4473
|
+
Es,
|
|
4474
4474
|
{
|
|
4475
4475
|
text: T.value,
|
|
4476
4476
|
"aria-label": cg(T.label),
|
|
@@ -4620,7 +4620,7 @@ function nc({
|
|
|
4620
4620
|
children: [
|
|
4621
4621
|
c,
|
|
4622
4622
|
/* @__PURE__ */ e(
|
|
4623
|
-
|
|
4623
|
+
Es,
|
|
4624
4624
|
{
|
|
4625
4625
|
as: "div",
|
|
4626
4626
|
text: t,
|
|
@@ -4664,7 +4664,7 @@ function rc({
|
|
|
4664
4664
|
className: h,
|
|
4665
4665
|
embedded: f = !1
|
|
4666
4666
|
}) {
|
|
4667
|
-
const b = Ya(), [N, p] = U(!1), g = f ? "px-3" : "px-0", S = !!i, T = !!(d && a), M = m, O = !!(c && l),
|
|
4667
|
+
const b = Ya(), [N, p] = U(!1), g = f ? "px-3" : "px-0", S = !!i, T = !!(d && a), M = m, O = !!(c && l), I = S || T || M ? /* @__PURE__ */ n(Ce, { children: [
|
|
4668
4668
|
i ? /* @__PURE__ */ e(
|
|
4669
4669
|
se,
|
|
4670
4670
|
{
|
|
@@ -4692,7 +4692,7 @@ function rc({
|
|
|
4692
4692
|
onClick: () => p((k) => !k)
|
|
4693
4693
|
}
|
|
4694
4694
|
) : null
|
|
4695
|
-
] }) : null,
|
|
4695
|
+
] }) : null, E = O ? /* @__PURE__ */ e(
|
|
4696
4696
|
se,
|
|
4697
4697
|
{
|
|
4698
4698
|
type: "button",
|
|
@@ -4713,13 +4713,13 @@ function rc({
|
|
|
4713
4713
|
children: r
|
|
4714
4714
|
}
|
|
4715
4715
|
),
|
|
4716
|
-
|
|
4717
|
-
|
|
4718
|
-
|
|
4716
|
+
I || E ? /* @__PURE__ */ n(ec, { children: [
|
|
4717
|
+
I,
|
|
4718
|
+
E
|
|
4719
4719
|
] }) : null
|
|
4720
4720
|
] }),
|
|
4721
4721
|
/* @__PURE__ */ e(
|
|
4722
|
-
|
|
4722
|
+
Es,
|
|
4723
4723
|
{
|
|
4724
4724
|
text: t,
|
|
4725
4725
|
"aria-label": "Copy error message",
|
|
@@ -4766,7 +4766,7 @@ function hg(t) {
|
|
|
4766
4766
|
}
|
|
4767
4767
|
);
|
|
4768
4768
|
}
|
|
4769
|
-
function
|
|
4769
|
+
function Is(t, a) {
|
|
4770
4770
|
const r = R((m) => m.card), s = R((m) => m.isDevMode), { switchEditorMode: o, setRunSql: d, runAssistant: i } = De(), l = () => {
|
|
4771
4771
|
const m = a || r.sql || r.python || "";
|
|
4772
4772
|
o("dev", { sqlToLoad: m }), setTimeout(() => {
|
|
@@ -4871,19 +4871,19 @@ function lc({
|
|
|
4871
4871
|
isMultiInputVisual: M === "multiple"
|
|
4872
4872
|
}),
|
|
4873
4873
|
[c, g, M]
|
|
4874
|
-
),
|
|
4874
|
+
), I = de(() => {
|
|
4875
4875
|
const ve = O.findIndex(
|
|
4876
4876
|
(We) => (We == null ? void 0 : We.id) === (s == null ? void 0 : s.id)
|
|
4877
4877
|
);
|
|
4878
4878
|
return ve < 0 ? -1 : Zt(s, ve);
|
|
4879
|
-
}, [O, s]),
|
|
4879
|
+
}, [O, s]), E = de(() => !g || M !== "multiple" || I < 0 ? s.type : La(
|
|
4880
4880
|
s,
|
|
4881
|
-
|
|
4881
|
+
I,
|
|
4882
4882
|
T == null ? void 0 : T.slots
|
|
4883
|
-
) ?? s.type, [g, M,
|
|
4883
|
+
) ?? s.type, [g, M, I, s, T == null ? void 0 : T.slots]), k = E ?? s.type, C = de(
|
|
4884
4884
|
() => k === s.type ? s : { ...s, type: k },
|
|
4885
4885
|
[s, k]
|
|
4886
|
-
), y = C.type === "table" || C.type === "matrixTable" || C.type === "pivotTable" || C.type === "aggregateTable" || C.type === "detailTable", L = de(() =>
|
|
4886
|
+
), y = C.type === "table" || C.type === "matrixTable" || C.type === "pivotTable" || C.type === "aggregateTable" || C.type === "detailTable", L = de(() => E !== s.type ? { ...s, type: E } : s, [s, E]), { data: w, isLoading: D, isFetching: _, errorMessage: v, errorSql: V, pagination: Y } = Ft(L), F = !!v, { handleOpenInEditor: A, handleDebugWithAssistant: P } = Is(v, V || s.sql || s.python), {
|
|
4887
4887
|
feedbackDialogOpen: j,
|
|
4888
4888
|
setFeedbackDialogOpen: B,
|
|
4889
4889
|
handleSendFeedback: $,
|
|
@@ -4938,12 +4938,12 @@ function lc({
|
|
|
4938
4938
|
};
|
|
4939
4939
|
z(Xe), X(Xe), s.sql && ((me = (qe = s.preferences) == null ? void 0 : qe.tablePrefs) != null && me.enableDevModePagination) && h(!0);
|
|
4940
4940
|
}, ne = (ve) => {
|
|
4941
|
-
var qe, me,
|
|
4941
|
+
var qe, me, Ee, Ae, mt;
|
|
4942
4942
|
const We = xs(
|
|
4943
4943
|
ve,
|
|
4944
4944
|
(qe = s.config) == null ? void 0 : qe.metricColumns,
|
|
4945
4945
|
(me = s.config) == null ? void 0 : me.groupByColumns,
|
|
4946
|
-
(
|
|
4946
|
+
(Ee = s.config) == null ? void 0 : Ee.detailColumns
|
|
4947
4947
|
), Xe = {
|
|
4948
4948
|
...s,
|
|
4949
4949
|
config: {
|
|
@@ -5005,11 +5005,11 @@ function lc({
|
|
|
5005
5005
|
showFeedbackButton: !0
|
|
5006
5006
|
}
|
|
5007
5007
|
) }) : /* @__PURE__ */ n("div", { className: "flex h-full flex-col items-center justify-center gap-2", children: [
|
|
5008
|
-
/* @__PURE__ */ e(
|
|
5008
|
+
/* @__PURE__ */ e(Eu, { className: "h-8 w-8 text-muted-foreground/40" }),
|
|
5009
5009
|
/* @__PURE__ */ e("p", { className: "text-[12px] text-muted-foreground", children: "No results to display" })
|
|
5010
5010
|
] });
|
|
5011
5011
|
if ((D || _) && (!(w != null && w.records) || w.records.length === 0))
|
|
5012
|
-
return k === "table" || k === "detailTable" ? /* @__PURE__ */ e("div", { className: "relative mb-2 flex h-full min-h-0 w-full flex-1 grow basis-0", children: /* @__PURE__ */ e(
|
|
5012
|
+
return k === "table" || k === "detailTable" ? /* @__PURE__ */ e("div", { className: "relative mb-2 flex h-full min-h-0 w-full flex-1 grow basis-0", children: /* @__PURE__ */ e(Iu, {}) }) : /* @__PURE__ */ e("div", { className: "z-50 flex h-full items-center justify-center", children: /* @__PURE__ */ e(Jt, { size: "md", color: "muted", "aria-label": "Loading data" }) });
|
|
5013
5013
|
if (!C.id) return null;
|
|
5014
5014
|
if (k === "custom")
|
|
5015
5015
|
return ye(s);
|
|
@@ -5337,7 +5337,7 @@ function yg({
|
|
|
5337
5337
|
className: a,
|
|
5338
5338
|
label: r = "Customize Visual"
|
|
5339
5339
|
} = {}) {
|
|
5340
|
-
const [s, o] = U(!1), [d, i] = U(""), [l, c] = U(""), [m, u] = U(""), [x, h] = U(""), f = R((y) => y.card), b = vt(), N = R((y) => y.card.customCfg), p = N ? JSON.stringify(N, null, 2) : "", g = de(() => b !== f.type ? { ...f, type: b } : f, [f, b]), { data: S } = Ft(g), { data: T } = ps(f), M = Xo(f, S == null ? void 0 : S.records), { setCardCustomCfg: O, setCustomVisualCode:
|
|
5340
|
+
const [s, o] = U(!1), [d, i] = U(""), [l, c] = U(""), [m, u] = U(""), [x, h] = U(""), f = R((y) => y.card), b = vt(), N = R((y) => y.card.customCfg), p = N ? JSON.stringify(N, null, 2) : "", g = de(() => b !== f.type ? { ...f, type: b } : f, [f, b]), { data: S } = Ft(g), { data: T } = ps(f), M = Xo(f, S == null ? void 0 : S.records), { setCardCustomCfg: O, setCustomVisualCode: I } = De(), E = () => {
|
|
5341
5341
|
var L, w, D;
|
|
5342
5342
|
if (!((L = S == null ? void 0 : S.records) != null && L.length)) return;
|
|
5343
5343
|
const y = Zo({
|
|
@@ -5360,7 +5360,7 @@ function yg({
|
|
|
5360
5360
|
}
|
|
5361
5361
|
}, k = () => {
|
|
5362
5362
|
try {
|
|
5363
|
-
if (m &&
|
|
5363
|
+
if (m && I(m), l) {
|
|
5364
5364
|
const y = JSON.parse(
|
|
5365
5365
|
l
|
|
5366
5366
|
), L = Bp(
|
|
@@ -5378,7 +5378,7 @@ function yg({
|
|
|
5378
5378
|
se,
|
|
5379
5379
|
{
|
|
5380
5380
|
variant: "ghost",
|
|
5381
|
-
onClick:
|
|
5381
|
+
onClick: E,
|
|
5382
5382
|
className: H(
|
|
5383
5383
|
"h-7 w-full justify-start gap-2 px-2 text-[13px] font-normal",
|
|
5384
5384
|
C ? "" : "text-green-600 hover:text-green-700",
|
|
@@ -5393,7 +5393,7 @@ function yg({
|
|
|
5393
5393
|
dt,
|
|
5394
5394
|
{
|
|
5395
5395
|
tooltip: "Customize Visual",
|
|
5396
|
-
onClick:
|
|
5396
|
+
onClick: E,
|
|
5397
5397
|
className: H(
|
|
5398
5398
|
C ? "" : "text-green-600 hover:text-green-700",
|
|
5399
5399
|
a
|
|
@@ -5570,7 +5570,7 @@ function ic({
|
|
|
5570
5570
|
onClose: r
|
|
5571
5571
|
}) {
|
|
5572
5572
|
var F;
|
|
5573
|
-
const [s, o] = U(""), [d, i] = U(0), l =
|
|
5573
|
+
const [s, o] = U(""), [d, i] = U(0), l = Ie(null), { data: c = [], isLoading: m } = Vu(), { setCardType: u, setCardPreferences: x, setIsDevMode: h } = R(
|
|
5574
5574
|
(A) => A.actions
|
|
5575
5575
|
), f = R((A) => A.card), b = R((A) => A.isDevMode), N = t ?? f.type, p = N === "custom" ? (F = f.customCardPreferences) == null ? void 0 : F.componentName : void 0, {
|
|
5576
5576
|
setCardCustomCfg: g,
|
|
@@ -5578,8 +5578,8 @@ function ic({
|
|
|
5578
5578
|
setQueryConfig: T,
|
|
5579
5579
|
replaceFrameCards: M,
|
|
5580
5580
|
clearModeDrafts: O,
|
|
5581
|
-
initializeModeDrafts:
|
|
5582
|
-
} = De(),
|
|
5581
|
+
initializeModeDrafts: I
|
|
5582
|
+
} = De(), E = de(() => {
|
|
5583
5583
|
const A = Tg({ isDevMode: b });
|
|
5584
5584
|
if (!s) return A;
|
|
5585
5585
|
const P = s.toLowerCase(), j = new Set(
|
|
@@ -5605,7 +5605,7 @@ function ic({
|
|
|
5605
5605
|
if (P === "multiple" && A.slots && A.slots.length > 0) {
|
|
5606
5606
|
O();
|
|
5607
5607
|
const B = Qp(A.slots, A, f);
|
|
5608
|
-
M(B), B[0] &&
|
|
5608
|
+
M(B), B[0] && I(B[0]), r == null || r();
|
|
5609
5609
|
return;
|
|
5610
5610
|
} else
|
|
5611
5611
|
u("custom"), S({
|
|
@@ -5623,7 +5623,7 @@ function ic({
|
|
|
5623
5623
|
const A = so.map((P) => ({
|
|
5624
5624
|
key: P.id,
|
|
5625
5625
|
label: P.label,
|
|
5626
|
-
entries:
|
|
5626
|
+
entries: E.filter((j) => j.group === P.id).map(
|
|
5627
5627
|
(j) => ({
|
|
5628
5628
|
kind: "default",
|
|
5629
5629
|
id: j.id,
|
|
@@ -5641,7 +5641,7 @@ function ic({
|
|
|
5641
5641
|
)
|
|
5642
5642
|
}
|
|
5643
5643
|
];
|
|
5644
|
-
}, [
|
|
5644
|
+
}, [E, k]), w = de(
|
|
5645
5645
|
() => L.flatMap((A) => A.entries),
|
|
5646
5646
|
[L]
|
|
5647
5647
|
), D = Math.min(d, Math.max(w.length - 1, 0)), _ = (A) => {
|
|
@@ -5735,7 +5735,7 @@ function kg({
|
|
|
5735
5735
|
selectedChart: t,
|
|
5736
5736
|
onChartChange: a
|
|
5737
5737
|
}) {
|
|
5738
|
-
var
|
|
5738
|
+
var I, E, k, C;
|
|
5739
5739
|
const r = R((y) => y.card), s = R((y) => y.frame), o = R((y) => y.isDevMode), {
|
|
5740
5740
|
replaceFrameCards: d,
|
|
5741
5741
|
clearModeDrafts: i,
|
|
@@ -5745,7 +5745,7 @@ function kg({
|
|
|
5745
5745
|
() => Ta(s, r),
|
|
5746
5746
|
[s, r]
|
|
5747
5747
|
), { manifest: u } = la(
|
|
5748
|
-
((
|
|
5748
|
+
((I = m == null ? void 0 : m.customCardPreferences) == null ? void 0 : I.url) || ""
|
|
5749
5749
|
), x = de(
|
|
5750
5750
|
() => {
|
|
5751
5751
|
var y;
|
|
@@ -5756,7 +5756,7 @@ function kg({
|
|
|
5756
5756
|
}
|
|
5757
5757
|
);
|
|
5758
5758
|
},
|
|
5759
|
-
[u, (
|
|
5759
|
+
[u, (E = m == null ? void 0 : m.customCardPreferences) == null ? void 0 : E.componentName]
|
|
5760
5760
|
), h = oa(m, x) === "multiple", f = vt(), b = h ? f : t ?? r.type, N = (k = r == null ? void 0 : r.customCardPreferences) == null ? void 0 : k.componentName, p = (C = m == null ? void 0 : m.customCardPreferences) == null ? void 0 : C.componentName, g = h && !!p, S = de(() => {
|
|
5761
5761
|
const y = Ol.find((L) => L.id === b);
|
|
5762
5762
|
return y ? y.label : b === "custom" ? N || "Custom Visual" : "Select chart type";
|
|
@@ -5825,7 +5825,7 @@ function Mg({
|
|
|
5825
5825
|
handleClearCustomVisual: x
|
|
5826
5826
|
} = kg({ selectedChart: t, onChartChange: a }), h = r === "header";
|
|
5827
5827
|
return /* @__PURE__ */ n("div", { className: H("relative w-full", s), children: [
|
|
5828
|
-
/* @__PURE__ */ n(
|
|
5828
|
+
/* @__PURE__ */ n(It, { open: o, onOpenChange: d, children: [
|
|
5829
5829
|
/* @__PURE__ */ e(Vt, { asChild: !0, children: h ? /* @__PURE__ */ n(
|
|
5830
5830
|
"button",
|
|
5831
5831
|
{
|
|
@@ -5961,8 +5961,8 @@ const Pr = {
|
|
|
5961
5961
|
{ id: "pie" },
|
|
5962
5962
|
{ id: "kpi" },
|
|
5963
5963
|
{ id: "matrixTable" }
|
|
5964
|
-
],
|
|
5965
|
-
function
|
|
5964
|
+
], Eg = 6;
|
|
5965
|
+
function Ig({
|
|
5966
5966
|
selectedChart: t,
|
|
5967
5967
|
onChartChange: a
|
|
5968
5968
|
}) {
|
|
@@ -6007,7 +6007,7 @@ function cc({
|
|
|
6007
6007
|
label: Lr[t] ?? t,
|
|
6008
6008
|
icon: Pr[t],
|
|
6009
6009
|
isCustom: !1
|
|
6010
|
-
}), f.slice(0,
|
|
6010
|
+
}), f.slice(0, Eg);
|
|
6011
6011
|
}, [t, l, i]), m = (f) => f.isCustom ? t === "custom" && l === f.id : t === f.id, u = (f) => {
|
|
6012
6012
|
f.isCustom || a(f.id);
|
|
6013
6013
|
}, x = c.some(m), h = x ? "More" : t === "custom" ? l || "Custom" : Lr[t] || "More";
|
|
@@ -6049,7 +6049,7 @@ function cc({
|
|
|
6049
6049
|
`${f.isCustom ? "custom" : "default"}-${f.id}`
|
|
6050
6050
|
);
|
|
6051
6051
|
}),
|
|
6052
|
-
/* @__PURE__ */ n(
|
|
6052
|
+
/* @__PURE__ */ n(It, { open: o, onOpenChange: d, children: [
|
|
6053
6053
|
/* @__PURE__ */ e(Vt, { asChild: !0, children: /* @__PURE__ */ n(
|
|
6054
6054
|
"button",
|
|
6055
6055
|
{
|
|
@@ -6126,7 +6126,7 @@ function Ag() {
|
|
|
6126
6126
|
},
|
|
6127
6127
|
tooltip: "Chart Orientation",
|
|
6128
6128
|
className: "h-7 w-7 px-0",
|
|
6129
|
-
children: c === "x" ? /* @__PURE__ */ e(Ar, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ e(
|
|
6129
|
+
children: c === "x" ? /* @__PURE__ */ e(Ar, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ e(Ir, { className: "h-3.5 w-3.5" })
|
|
6130
6130
|
}
|
|
6131
6131
|
);
|
|
6132
6132
|
}
|
|
@@ -6139,7 +6139,7 @@ function Ag() {
|
|
|
6139
6139
|
},
|
|
6140
6140
|
tooltip: "Chart Orientation",
|
|
6141
6141
|
className: "h-7 w-7 px-0",
|
|
6142
|
-
children: t === "y" || t === void 0 ? /* @__PURE__ */ e(Ar, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ e(
|
|
6142
|
+
children: t === "y" || t === void 0 ? /* @__PURE__ */ e(Ar, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ e(Ir, { className: "h-3.5 w-3.5" })
|
|
6143
6143
|
}
|
|
6144
6144
|
);
|
|
6145
6145
|
}
|
|
@@ -6153,7 +6153,7 @@ function Ag() {
|
|
|
6153
6153
|
},
|
|
6154
6154
|
tooltip: "Chart Orientation",
|
|
6155
6155
|
className: "h-7 w-7 px-0",
|
|
6156
|
-
children: c === "y" ? /* @__PURE__ */ e(
|
|
6156
|
+
children: c === "y" ? /* @__PURE__ */ e(Ir, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ e(Ar, { className: "h-3.5 w-3.5" })
|
|
6157
6157
|
}
|
|
6158
6158
|
);
|
|
6159
6159
|
}
|
|
@@ -6164,8 +6164,8 @@ function Fs({
|
|
|
6164
6164
|
triggerVariant: a = "icon",
|
|
6165
6165
|
label: r = "Display options"
|
|
6166
6166
|
}) {
|
|
6167
|
-
var p, g, S, T, M, O,
|
|
6168
|
-
const s = R((y) => y.card), { setCardPreferences: o, updateCardInFrame: d, setCard: i } = De(), [l, c] = U(!1), m = ((g = (p = s.preferences) == null ? void 0 : p.displayOptions) == null ? void 0 : g.showFilterInfo) ?? !0, u = ((T = (S = s.preferences) == null ? void 0 : S.displayOptions) == null ? void 0 : T.showCardToolbar) ?? !0, x = ((O = (M = s.preferences) == null ? void 0 : M.displayOptions) == null ? void 0 : O.showChrome) ?? !0, h = ((
|
|
6167
|
+
var p, g, S, T, M, O, I, E, k, C;
|
|
6168
|
+
const s = R((y) => y.card), { setCardPreferences: o, updateCardInFrame: d, setCard: i } = De(), [l, c] = U(!1), m = ((g = (p = s.preferences) == null ? void 0 : p.displayOptions) == null ? void 0 : g.showFilterInfo) ?? !0, u = ((T = (S = s.preferences) == null ? void 0 : S.displayOptions) == null ? void 0 : T.showCardToolbar) ?? !0, x = ((O = (M = s.preferences) == null ? void 0 : M.displayOptions) == null ? void 0 : O.showChrome) ?? !0, h = ((E = (I = s.preferences) == null ? void 0 : I.displayOptions) == null ? void 0 : E.allowScroll) ?? !0, f = ((C = (k = s.preferences) == null ? void 0 : k.displayOptions) == null ? void 0 : C.showInlineFilterBar) ?? !0, b = (y, L) => {
|
|
6169
6169
|
var _;
|
|
6170
6170
|
const w = {
|
|
6171
6171
|
...s.preferences,
|
|
@@ -6284,7 +6284,7 @@ function Os({
|
|
|
6284
6284
|
(k) => md(k, O)
|
|
6285
6285
|
))
|
|
6286
6286
|
return;
|
|
6287
|
-
const
|
|
6287
|
+
const E = {
|
|
6288
6288
|
id: ba(),
|
|
6289
6289
|
...dc(O, {
|
|
6290
6290
|
dataSource: d == null ? void 0 : d.dataSource,
|
|
@@ -6295,26 +6295,26 @@ function Os({
|
|
|
6295
6295
|
};
|
|
6296
6296
|
c({
|
|
6297
6297
|
...d,
|
|
6298
|
-
inlineFilters: [...b,
|
|
6298
|
+
inlineFilters: [...b, E]
|
|
6299
6299
|
});
|
|
6300
6300
|
}
|
|
6301
6301
|
function g(O) {
|
|
6302
|
-
const
|
|
6302
|
+
const I = b.filter((E) => E.id !== O);
|
|
6303
6303
|
c({
|
|
6304
6304
|
...d,
|
|
6305
|
-
inlineFilters:
|
|
6305
|
+
inlineFilters: I
|
|
6306
6306
|
}), f ? x(d.id, O) : m(d.id, O);
|
|
6307
6307
|
}
|
|
6308
|
-
function S(O,
|
|
6309
|
-
const
|
|
6310
|
-
(L) => L.id === O ? { ...L, ...
|
|
6308
|
+
function S(O, I) {
|
|
6309
|
+
const E = b.map(
|
|
6310
|
+
(L) => L.id === O ? { ...L, ...I } : L
|
|
6311
6311
|
);
|
|
6312
6312
|
if (c({
|
|
6313
6313
|
...d,
|
|
6314
|
-
inlineFilters:
|
|
6315
|
-
}), !(Object.prototype.hasOwnProperty.call(
|
|
6314
|
+
inlineFilters: E
|
|
6315
|
+
}), !(Object.prototype.hasOwnProperty.call(I, "defaultValues") || Object.prototype.hasOwnProperty.call(I, "defaultDateFilter")))
|
|
6316
6316
|
return;
|
|
6317
|
-
const C =
|
|
6317
|
+
const C = E.find((L) => L.id === O);
|
|
6318
6318
|
if (!C)
|
|
6319
6319
|
return;
|
|
6320
6320
|
const y = hd(
|
|
@@ -6351,7 +6351,7 @@ function Os({
|
|
|
6351
6351
|
M && "w-full",
|
|
6352
6352
|
t
|
|
6353
6353
|
),
|
|
6354
|
-
children: /* @__PURE__ */ n(
|
|
6354
|
+
children: /* @__PURE__ */ n(It, { open: s, onOpenChange: o, children: [
|
|
6355
6355
|
/* @__PURE__ */ e(Vt, { asChild: !0, children: M ? /* @__PURE__ */ n(
|
|
6356
6356
|
se,
|
|
6357
6357
|
{
|
|
@@ -6407,7 +6407,7 @@ function Os({
|
|
|
6407
6407
|
Fg,
|
|
6408
6408
|
{
|
|
6409
6409
|
filter: O,
|
|
6410
|
-
onUpdate: (
|
|
6410
|
+
onUpdate: (I) => S(O.id, I),
|
|
6411
6411
|
onRemove: () => g(O.id)
|
|
6412
6412
|
},
|
|
6413
6413
|
O.id
|
|
@@ -6602,11 +6602,11 @@ function Vg({
|
|
|
6602
6602
|
return [];
|
|
6603
6603
|
}
|
|
6604
6604
|
}
|
|
6605
|
-
const
|
|
6605
|
+
const I = (C, y) => {
|
|
6606
6606
|
s(
|
|
6607
6607
|
r.map((L, w) => w !== C ? L : y(L))
|
|
6608
6608
|
);
|
|
6609
|
-
},
|
|
6609
|
+
}, E = (C) => {
|
|
6610
6610
|
s(r.filter((y, L) => L !== C));
|
|
6611
6611
|
}, k = () => {
|
|
6612
6612
|
const C = Lg(t, h, r, c, p);
|
|
@@ -6722,7 +6722,7 @@ function Vg({
|
|
|
6722
6722
|
variant: "ghost",
|
|
6723
6723
|
size: "icon",
|
|
6724
6724
|
className: "h-8 w-8",
|
|
6725
|
-
onClick: () =>
|
|
6725
|
+
onClick: () => E(y),
|
|
6726
6726
|
children: /* @__PURE__ */ e(vn, { className: "h-4 w-4" })
|
|
6727
6727
|
}
|
|
6728
6728
|
)
|
|
@@ -6734,7 +6734,7 @@ function Vg({
|
|
|
6734
6734
|
le,
|
|
6735
6735
|
{
|
|
6736
6736
|
value: C.matrixTargetId ?? "__none__",
|
|
6737
|
-
onValueChange: ($) =>
|
|
6737
|
+
onValueChange: ($) => I(y, (Q) => {
|
|
6738
6738
|
const { matrixTargetId: re, ...z } = Q;
|
|
6739
6739
|
return $ === "__none__" ? z : { ...z, matrixTargetId: $ };
|
|
6740
6740
|
}),
|
|
@@ -6779,7 +6779,7 @@ function Vg({
|
|
|
6779
6779
|
le,
|
|
6780
6780
|
{
|
|
6781
6781
|
value: re || "__none__",
|
|
6782
|
-
onValueChange: (te) =>
|
|
6782
|
+
onValueChange: (te) => I(y, (fe) => {
|
|
6783
6783
|
if (fe.target === "config_metric_selector") {
|
|
6784
6784
|
const ke = { ...fe.mapping };
|
|
6785
6785
|
if (te === "__none__")
|
|
@@ -6936,7 +6936,7 @@ function Bg({
|
|
|
6936
6936
|
{
|
|
6937
6937
|
variant: "ghost",
|
|
6938
6938
|
size: "xs",
|
|
6939
|
-
onClick: () => d(o.filter((
|
|
6939
|
+
onClick: () => d(o.filter((I, E) => E !== O)),
|
|
6940
6940
|
children: /* @__PURE__ */ e(vn, { className: "h-3.5 w-3.5" })
|
|
6941
6941
|
}
|
|
6942
6942
|
)
|
|
@@ -7007,13 +7007,13 @@ function Rs({
|
|
|
7007
7007
|
), M = lm(T), O = de(() => M.catalog.map((B) => ({
|
|
7008
7008
|
...B.field,
|
|
7009
7009
|
dataType: Fo(B.resolvedField.dataType)
|
|
7010
|
-
})), [M.catalog]),
|
|
7010
|
+
})), [M.catalog]), I = (g == null ? void 0 : g.controls) || [], E = g ? gd(u, { excludeCardId: g.id }) : h.map((B) => B.id), k = ((g == null ? void 0 : g.controlBindings) || []).filter(
|
|
7011
7011
|
om
|
|
7012
7012
|
), C = ((g == null ? void 0 : g.controlBindings) || []).filter(
|
|
7013
7013
|
Sr
|
|
7014
7014
|
), y = im({
|
|
7015
7015
|
card: g,
|
|
7016
|
-
controls:
|
|
7016
|
+
controls: I
|
|
7017
7017
|
}), L = {
|
|
7018
7018
|
choices: xd(g),
|
|
7019
7019
|
targetMap: Object.fromEntries(
|
|
@@ -7092,7 +7092,7 @@ function Rs({
|
|
|
7092
7092
|
F && "w-full",
|
|
7093
7093
|
t
|
|
7094
7094
|
),
|
|
7095
|
-
children: /* @__PURE__ */ n(
|
|
7095
|
+
children: /* @__PURE__ */ n(It, { modal: !0, open: d, onOpenChange: s, children: [
|
|
7096
7096
|
/* @__PURE__ */ e(Vt, { asChild: !0, children: F ? /* @__PURE__ */ n(
|
|
7097
7097
|
se,
|
|
7098
7098
|
{
|
|
@@ -7101,7 +7101,7 @@ function Rs({
|
|
|
7101
7101
|
children: [
|
|
7102
7102
|
/* @__PURE__ */ e(Qn, { className: "h-3.5 w-3.5 text-muted-foreground" }),
|
|
7103
7103
|
/* @__PURE__ */ e("span", { children: r }),
|
|
7104
|
-
|
|
7104
|
+
I.length + k.length > 0 && /* @__PURE__ */ e("span", { className: "ml-auto text-[11px] tabular-nums text-muted-foreground", children: I.length + k.length })
|
|
7105
7105
|
]
|
|
7106
7106
|
}
|
|
7107
7107
|
) : /* @__PURE__ */ n(
|
|
@@ -7109,11 +7109,11 @@ function Rs({
|
|
|
7109
7109
|
{
|
|
7110
7110
|
tooltip: "Configure Controls",
|
|
7111
7111
|
className: H("relative h-7 w-7 px-0", {
|
|
7112
|
-
"text-primary":
|
|
7112
|
+
"text-primary": I.length > 0 || k.length > 0
|
|
7113
7113
|
}),
|
|
7114
7114
|
children: [
|
|
7115
7115
|
/* @__PURE__ */ e(Qn, { className: "h-3.5 w-3.5" }),
|
|
7116
|
-
|
|
7116
|
+
I.length + k.length > 0 && /* @__PURE__ */ e("span", { className: "absolute -right-1 -top-1 inline-flex h-4 min-w-4 items-center justify-center rounded-full bg-primary px-1 text-[10px] font-medium text-primary-foreground", children: I.length + k.length })
|
|
7117
7117
|
]
|
|
7118
7118
|
}
|
|
7119
7119
|
) }),
|
|
@@ -7139,8 +7139,8 @@ function Rs({
|
|
|
7139
7139
|
{
|
|
7140
7140
|
scope: "card",
|
|
7141
7141
|
card: g,
|
|
7142
|
-
controls:
|
|
7143
|
-
reservedControlIds:
|
|
7142
|
+
controls: I,
|
|
7143
|
+
reservedControlIds: E,
|
|
7144
7144
|
usageByControlId: y,
|
|
7145
7145
|
availableFieldChoices: D,
|
|
7146
7146
|
availableMetricChoices: _,
|
|
@@ -7316,7 +7316,7 @@ function jg({
|
|
|
7316
7316
|
isMultiInputVisual: p
|
|
7317
7317
|
}),
|
|
7318
7318
|
[s, r, p]
|
|
7319
|
-
), M = p ? T.filter(Boolean).length : s.cards.length, O = i ? !1 : S ? M < S : !0,
|
|
7319
|
+
), M = p ? T.filter(Boolean).length : s.cards.length, O = i ? !1 : S ? M < S : !0, I = M > Math.max(g || 1, 1), E = !!((P = r == null ? void 0 : r.customCardPreferences) != null && P.dataInputCardIds), k = (j, B) => {
|
|
7320
7320
|
j.dataTransfer.setData("tabIndex", B.toString());
|
|
7321
7321
|
}, C = (j) => {
|
|
7322
7322
|
j.preventDefault();
|
|
@@ -7328,9 +7328,9 @@ function jg({
|
|
|
7328
7328
|
};
|
|
7329
7329
|
function L(j) {
|
|
7330
7330
|
const B = (r == null ? void 0 : r.id) === j;
|
|
7331
|
-
if (!(
|
|
7331
|
+
if (!(E && B ? s.cards.length > 1 : I)) return;
|
|
7332
7332
|
let Q = s.cards.filter((Z) => Z.id !== j);
|
|
7333
|
-
p && !
|
|
7333
|
+
p && !E && (Q = Wp(Q));
|
|
7334
7334
|
const re = Q[0], z = {
|
|
7335
7335
|
...s,
|
|
7336
7336
|
cards: Q,
|
|
@@ -7469,7 +7469,7 @@ function jg({
|
|
|
7469
7469
|
children: [
|
|
7470
7470
|
p && Q ? (
|
|
7471
7471
|
// Multi-input visual: Icon + Slot Label (non-editable, no eye icon)
|
|
7472
|
-
/* @__PURE__ */ e(
|
|
7472
|
+
/* @__PURE__ */ e(Et, { delayDuration: 0, children: /* @__PURE__ */ n(wt, { children: [
|
|
7473
7473
|
/* @__PURE__ */ e(St, { asChild: !0, children: /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
|
|
7474
7474
|
/* @__PURE__ */ e("span", { className: "text-muted-foreground", children: ai(re, "size-3.5") }),
|
|
7475
7475
|
/* @__PURE__ */ e("span", { children: Q.label || `Tab ${$ + 1}` })
|
|
@@ -7517,7 +7517,7 @@ function jg({
|
|
|
7517
7517
|
}
|
|
7518
7518
|
}
|
|
7519
7519
|
),
|
|
7520
|
-
!i && s.activeCardId === j.id && (
|
|
7520
|
+
!i && s.activeCardId === j.id && (E && (r == null ? void 0 : r.id) === j.id ? s.cards.length > 1 : I) && /* @__PURE__ */ e(
|
|
7521
7521
|
ut,
|
|
7522
7522
|
{
|
|
7523
7523
|
className: "h-3 w-3 text-muted-foreground hover:text-foreground",
|
|
@@ -7578,7 +7578,7 @@ function ns({
|
|
|
7578
7578
|
updateColumnSettingsMap: p
|
|
7579
7579
|
} = De(), g = Object.keys(((Ot = (at = o.preferences) == null ? void 0 : at.tablePrefs) == null ? void 0 : Ot.columnSettingsMap) ?? {}).length > 0, [S, T] = U({}), [M, O] = U(
|
|
7580
7580
|
() => /* @__PURE__ */ new Set()
|
|
7581
|
-
), { authToken:
|
|
7581
|
+
), { authToken: I } = Xa(), E = Nd(I == null ? void 0 : I.accessToken), { compiledAppearance: k } = lf(), C = de(
|
|
7582
7582
|
() => dm(k),
|
|
7583
7583
|
[k]
|
|
7584
7584
|
), {
|
|
@@ -7592,13 +7592,13 @@ function ns({
|
|
|
7592
7592
|
configCard: l,
|
|
7593
7593
|
isMultiInputVisual: !0
|
|
7594
7594
|
}).map(
|
|
7595
|
-
(
|
|
7595
|
+
(Ee) => (Ee == null ? void 0 : Ee.id) === o.id ? o : Ee
|
|
7596
7596
|
), [s, l, o]), A = de(
|
|
7597
7597
|
() => Ki(F),
|
|
7598
7598
|
[F]
|
|
7599
7599
|
), P = de(() => {
|
|
7600
7600
|
const me = F.findIndex(
|
|
7601
|
-
(
|
|
7601
|
+
(Ee) => (Ee == null ? void 0 : Ee.id) === o.id
|
|
7602
7602
|
);
|
|
7603
7603
|
return me < 0 ? -1 : Zt(o, me);
|
|
7604
7604
|
}, [F, o]), j = de(() => !l || V !== "multiple" || P < 0 ? o.type : La(
|
|
@@ -7622,9 +7622,9 @@ function ns({
|
|
|
7622
7622
|
errorMessage: Z,
|
|
7623
7623
|
errorSql: te,
|
|
7624
7624
|
queryKey: fe
|
|
7625
|
-
} = Ft(B), Te = JSON.stringify(fe), { handleOpenInEditor: ke, handleDebugWithAssistant: Ve } =
|
|
7626
|
-
(me,
|
|
7627
|
-
const Ae = Jp(
|
|
7625
|
+
} = Ft(B), Te = JSON.stringify(fe), { handleOpenInEditor: ke, handleDebugWithAssistant: Ve } = Is(Z, te || o.sql || o.python), Je = o.type === "text" && ((qe = (Xe = o.preferences) == null ? void 0 : Xe.textVisualOptions) == null ? void 0 : qe.isDynamicText) === !0 && !!Z, ze = Re(
|
|
7626
|
+
(me, Ee) => {
|
|
7627
|
+
const Ae = Jp(Ee);
|
|
7628
7628
|
T((mt) => ({
|
|
7629
7629
|
...mt,
|
|
7630
7630
|
[me]: Ae
|
|
@@ -7632,18 +7632,18 @@ function ns({
|
|
|
7632
7632
|
},
|
|
7633
7633
|
[]
|
|
7634
7634
|
), Ye = Re(
|
|
7635
|
-
(me,
|
|
7635
|
+
(me, Ee) => {
|
|
7636
7636
|
O((Ae) => {
|
|
7637
7637
|
const mt = new Set(Ae);
|
|
7638
|
-
return
|
|
7638
|
+
return Ee ? mt.add(me) : mt.delete(me), mt;
|
|
7639
7639
|
});
|
|
7640
7640
|
},
|
|
7641
7641
|
[]
|
|
7642
7642
|
), Be = M.size > 0, et = de(
|
|
7643
7643
|
() => A.map(
|
|
7644
|
-
(me,
|
|
7644
|
+
(me, Ee) => La(
|
|
7645
7645
|
me,
|
|
7646
|
-
|
|
7646
|
+
Ee,
|
|
7647
7647
|
v == null ? void 0 : v.slots
|
|
7648
7648
|
)
|
|
7649
7649
|
),
|
|
@@ -7695,13 +7695,13 @@ function ns({
|
|
|
7695
7695
|
]
|
|
7696
7696
|
);
|
|
7697
7697
|
function ae(me) {
|
|
7698
|
-
const
|
|
7699
|
-
|
|
7698
|
+
const Ee = s.cards.find((Ae) => Ae.id === me);
|
|
7699
|
+
Ee && (Fa(), f(), $e(me), u(me), b(), N(Ee));
|
|
7700
7700
|
}
|
|
7701
7701
|
function $e(me) {
|
|
7702
|
-
const
|
|
7702
|
+
const Ee = R.getState().card, Ae = R.getState().frame, mt = {
|
|
7703
7703
|
...Ae,
|
|
7704
|
-
cards: Ae.cards.map((Ut) => Ut.id ===
|
|
7704
|
+
cards: Ae.cards.map((Ut) => Ut.id === Ee.id ? Ee : Ut),
|
|
7705
7705
|
activeCardId: me
|
|
7706
7706
|
};
|
|
7707
7707
|
m(mt);
|
|
@@ -7710,10 +7710,10 @@ function ns({
|
|
|
7710
7710
|
}
|
|
7711
7711
|
function it() {
|
|
7712
7712
|
return w ? /* @__PURE__ */ e("div", { className: "flex h-full items-center justify-center", children: /* @__PURE__ */ e(Jt, { size: "md", color: "muted", "aria-label": "Loading manifest" }) }) : _ ? /* @__PURE__ */ n("div", { className: "relative flex h-full flex-col pl-2 pr-4", children: [
|
|
7713
|
-
F.map((
|
|
7714
|
-
if (!
|
|
7715
|
-
const mt = Zt(
|
|
7716
|
-
|
|
7713
|
+
F.map((Ee, Ae) => {
|
|
7714
|
+
if (!Ee) return null;
|
|
7715
|
+
const mt = Zt(Ee, Ae), Mt = La(
|
|
7716
|
+
Ee,
|
|
7717
7717
|
mt,
|
|
7718
7718
|
v == null ? void 0 : v.slots
|
|
7719
7719
|
);
|
|
@@ -7722,10 +7722,10 @@ function ns({
|
|
|
7722
7722
|
{
|
|
7723
7723
|
onLoadingStatus: Ye,
|
|
7724
7724
|
onDataChange: ze,
|
|
7725
|
-
card:
|
|
7725
|
+
card: Ee,
|
|
7726
7726
|
effectiveCardType: Mt
|
|
7727
7727
|
},
|
|
7728
|
-
`${
|
|
7728
|
+
`${Ee.id}-${mt}`
|
|
7729
7729
|
);
|
|
7730
7730
|
}),
|
|
7731
7731
|
Be && /* @__PURE__ */ e("div", { className: "absolute inset-0 z-10 flex items-center justify-center bg-background/50", children: /* @__PURE__ */ e(Jt, { size: "md", color: "muted", "aria-label": "Loading preview" }) }),
|
|
@@ -7749,7 +7749,7 @@ function ns({
|
|
|
7749
7749
|
slotOrderedCards: A,
|
|
7750
7750
|
slotTypes: et,
|
|
7751
7751
|
multiInputData: S,
|
|
7752
|
-
params:
|
|
7752
|
+
params: E,
|
|
7753
7753
|
theme: C,
|
|
7754
7754
|
filters: ye,
|
|
7755
7755
|
filterValues: [
|
|
@@ -7807,10 +7807,10 @@ function ns({
|
|
|
7807
7807
|
) }) : /* @__PURE__ */ e("div", { className: "flex h-full min-h-0 flex-col px-4 py-4", children: /* @__PURE__ */ e(xm, { isLoading: c, card: o, data: $ == null ? void 0 : $.records }) }) : /* @__PURE__ */ e(
|
|
7808
7808
|
ir,
|
|
7809
7809
|
{
|
|
7810
|
-
fallbackRender: (
|
|
7810
|
+
fallbackRender: (Ee) => /* @__PURE__ */ e(
|
|
7811
7811
|
gs,
|
|
7812
7812
|
{
|
|
7813
|
-
...
|
|
7813
|
+
...Ee,
|
|
7814
7814
|
onResetColumnSettings: g ? () => p({}) : void 0
|
|
7815
7815
|
}
|
|
7816
7816
|
),
|
|
@@ -7906,8 +7906,8 @@ function Vr({
|
|
|
7906
7906
|
return (pe = (Ne = ne.dashboard) == null ? void 0 : Ne.exportDefaults) == null ? void 0 : pe.csvEncoding;
|
|
7907
7907
|
}
|
|
7908
7908
|
), { isConsoleMode: N } = Cm(), p = R((ne) => ne.pythonStdOut), g = R((ne) => ne.actions.setRunSql), S = vt(), T = S === "table" || S === "detailTable" || S === "matrixTable", O = bs(S) && !!(a != null && a.onOpen), {
|
|
7909
|
-
setFrame:
|
|
7910
|
-
setCard:
|
|
7909
|
+
setFrame: I,
|
|
7910
|
+
setCard: E,
|
|
7911
7911
|
setActiveTabCardId: k,
|
|
7912
7912
|
// runAssistant,
|
|
7913
7913
|
mergeDraftsIntoCard: C,
|
|
@@ -7925,9 +7925,9 @@ function Vr({
|
|
|
7925
7925
|
refetch: j,
|
|
7926
7926
|
queryKey: B,
|
|
7927
7927
|
pagination: $
|
|
7928
|
-
} = Ft(v), Q =
|
|
7928
|
+
} = Ft(v), Q = Ie(B);
|
|
7929
7929
|
Q.current = B;
|
|
7930
|
-
const { handleDebugWithAssistant: re } =
|
|
7930
|
+
const { handleDebugWithAssistant: re } = Is(
|
|
7931
7931
|
A,
|
|
7932
7932
|
P
|
|
7933
7933
|
), z = de(() => (V == null ? void 0 : V.records) || [], [V == null ? void 0 : V.records]), { cardFilterValues: X } = eg(
|
|
@@ -7972,12 +7972,12 @@ function Vr({
|
|
|
7972
7972
|
pageSize: Ne
|
|
7973
7973
|
}
|
|
7974
7974
|
};
|
|
7975
|
-
|
|
7975
|
+
E(pe);
|
|
7976
7976
|
const ye = {
|
|
7977
7977
|
...i,
|
|
7978
7978
|
cards: i.cards.map(($e) => $e.id === l.id ? pe : $e)
|
|
7979
7979
|
};
|
|
7980
|
-
|
|
7980
|
+
I(ye), l.sql && ((ae = (He = l.preferences) == null ? void 0 : He.tablePrefs) != null && ae.enableDevModePagination) && g(!0);
|
|
7981
7981
|
}
|
|
7982
7982
|
function ze(ne) {
|
|
7983
7983
|
var He, ae, $e, it, bt;
|
|
@@ -7993,12 +7993,12 @@ function Vr({
|
|
|
7993
7993
|
sortByColumns: Ne
|
|
7994
7994
|
}
|
|
7995
7995
|
};
|
|
7996
|
-
|
|
7996
|
+
E(pe);
|
|
7997
7997
|
const ye = {
|
|
7998
7998
|
...i,
|
|
7999
7999
|
cards: i.cards.map((at) => at.id === l.id ? pe : at)
|
|
8000
8000
|
};
|
|
8001
|
-
|
|
8001
|
+
I(ye), l.sql && ((bt = (it = l.preferences) == null ? void 0 : it.tablePrefs) != null && bt.enableDevModePagination) && g(!0);
|
|
8002
8002
|
}
|
|
8003
8003
|
const Ye = Array.isArray(V == null ? void 0 : V.records) ? V.records : [], Be = Ye.length > 0;
|
|
8004
8004
|
function et() {
|
|
@@ -8476,7 +8476,7 @@ function yt({
|
|
|
8476
8476
|
placeholder: s,
|
|
8477
8477
|
className: o
|
|
8478
8478
|
}) {
|
|
8479
|
-
const [d, i] = U(t), l =
|
|
8479
|
+
const [d, i] = U(t), l = Ie(!1);
|
|
8480
8480
|
return Me(() => {
|
|
8481
8481
|
i(t);
|
|
8482
8482
|
}, [t]), /* @__PURE__ */ e(
|
|
@@ -8700,10 +8700,10 @@ function hc() {
|
|
|
8700
8700
|
const Y = v.match(/^(\d+)\+$/);
|
|
8701
8701
|
return Y ? `Tabs ${Number(Y[1]) + 1}+` : `Tab ${v}`;
|
|
8702
8702
|
}
|
|
8703
|
-
function
|
|
8703
|
+
function I(v) {
|
|
8704
8704
|
return v ? (Array.isArray(v) ? v : [v]).join(", ") : null;
|
|
8705
8705
|
}
|
|
8706
|
-
function
|
|
8706
|
+
function E(v, V, Y = [], F = "", A, P, j) {
|
|
8707
8707
|
const B = k({
|
|
8708
8708
|
key: V,
|
|
8709
8709
|
defaultValue: F,
|
|
@@ -8786,12 +8786,12 @@ function hc() {
|
|
|
8786
8786
|
return /* @__PURE__ */ n("div", { className: "space-y-2", children: [
|
|
8787
8787
|
/* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
|
|
8788
8788
|
/* @__PURE__ */ e(q, { children: B.title }),
|
|
8789
|
-
(($ = B.docs) == null ? void 0 : $.description) && /* @__PURE__ */ e(
|
|
8789
|
+
(($ = B.docs) == null ? void 0 : $.description) && /* @__PURE__ */ e(Et, { delayDuration: 0, children: /* @__PURE__ */ n(wt, { children: [
|
|
8790
8790
|
/* @__PURE__ */ e(St, { asChild: !0, children: /* @__PURE__ */ e(mn, { className: "h-3.5 w-3.5 cursor-help text-muted-foreground" }) }),
|
|
8791
8791
|
/* @__PURE__ */ e(Ct, { side: "right", className: "max-w-xs", children: /* @__PURE__ */ e("p", { className: "text-xs", children: B.docs.description }) })
|
|
8792
8792
|
] }) })
|
|
8793
8793
|
] }),
|
|
8794
|
-
|
|
8794
|
+
E(
|
|
8795
8795
|
B.ui,
|
|
8796
8796
|
j,
|
|
8797
8797
|
B.options,
|
|
@@ -8816,9 +8816,9 @@ function hc() {
|
|
|
8816
8816
|
] }),
|
|
8817
8817
|
v.description && /* @__PURE__ */ e("p", { className: "text-muted-foreground", children: v.description }),
|
|
8818
8818
|
/* @__PURE__ */ n("div", { className: "flex flex-wrap gap-2 text-muted-foreground", children: [
|
|
8819
|
-
|
|
8819
|
+
I(v.expectedType) && /* @__PURE__ */ n("span", { children: [
|
|
8820
8820
|
"Expected: ",
|
|
8821
|
-
|
|
8821
|
+
I(v.expectedType)
|
|
8822
8822
|
] }),
|
|
8823
8823
|
v.required && /* @__PURE__ */ e("span", { children: "Required" })
|
|
8824
8824
|
] })
|
|
@@ -8831,7 +8831,7 @@ function hc() {
|
|
|
8831
8831
|
] })
|
|
8832
8832
|
] }) })
|
|
8833
8833
|
] }),
|
|
8834
|
-
h && T.length > 0 && /* @__PURE__ */ e(Dm, { className: "mt-3 border-yellow-500/40 bg-yellow-500/10 text-yellow-900 dark:text-yellow-100", children: /* @__PURE__ */ e(
|
|
8834
|
+
h && T.length > 0 && /* @__PURE__ */ e(Dm, { className: "mt-3 border-yellow-500/40 bg-yellow-500/10 text-yellow-900 dark:text-yellow-100", children: /* @__PURE__ */ e(Em, { children: /* @__PURE__ */ e("ul", { className: "list-disc space-y-1 pl-4 text-xs", children: T.map((v, V) => /* @__PURE__ */ e("li", { children: v.message }, `${v.type}-${V}`)) }) }) }),
|
|
8835
8835
|
u && !h && u.settings && /* @__PURE__ */ e("div", { className: "space-y-3", children: /* @__PURE__ */ e("div", { className: "px-2", children: y({
|
|
8836
8836
|
settingsSchema: u.settings,
|
|
8837
8837
|
settingsField: "settings",
|
|
@@ -9185,7 +9185,7 @@ function Tn({
|
|
|
9185
9185
|
() => String(p)
|
|
9186
9186
|
), [M, O] = U(
|
|
9187
9187
|
() => m.multiplyBy !== void 0 ? String(m.multiplyBy) : ""
|
|
9188
|
-
),
|
|
9188
|
+
), I = (D) => {
|
|
9189
9189
|
const _ = pc(
|
|
9190
9190
|
t,
|
|
9191
9191
|
D,
|
|
@@ -9196,7 +9196,7 @@ function Tn({
|
|
|
9196
9196
|
a(
|
|
9197
9197
|
d && D === "currency" && t.type !== "currency" ? lo(_) : _
|
|
9198
9198
|
);
|
|
9199
|
-
},
|
|
9199
|
+
}, E = (D) => d && c === "currency" ? Qg(
|
|
9200
9200
|
m,
|
|
9201
9201
|
D
|
|
9202
9202
|
) : fc(m, D), k = ((L = oo.find(
|
|
@@ -9215,7 +9215,7 @@ function Tn({
|
|
|
9215
9215
|
le,
|
|
9216
9216
|
{
|
|
9217
9217
|
value: c,
|
|
9218
|
-
onValueChange: (D) =>
|
|
9218
|
+
onValueChange: (D) => I(D),
|
|
9219
9219
|
children: [
|
|
9220
9220
|
/* @__PURE__ */ e(
|
|
9221
9221
|
oe,
|
|
@@ -9251,7 +9251,7 @@ function Tn({
|
|
|
9251
9251
|
onChange: (D) => {
|
|
9252
9252
|
const _ = D.target.value.replace(/[^\d]/g, "");
|
|
9253
9253
|
T(_), _ !== "" && a(
|
|
9254
|
-
|
|
9254
|
+
E(
|
|
9255
9255
|
Math.max(
|
|
9256
9256
|
0,
|
|
9257
9257
|
Math.min(o, parseInt(_, 10))
|
|
@@ -9264,7 +9264,7 @@ function Tn({
|
|
|
9264
9264
|
return;
|
|
9265
9265
|
const D = p;
|
|
9266
9266
|
T(String(D)), a(
|
|
9267
|
-
|
|
9267
|
+
E(D)
|
|
9268
9268
|
);
|
|
9269
9269
|
},
|
|
9270
9270
|
className: "h-8 text-xs"
|
|
@@ -9694,10 +9694,10 @@ function ax(t) {
|
|
|
9694
9694
|
}
|
|
9695
9695
|
function nx(t) {
|
|
9696
9696
|
var r;
|
|
9697
|
-
const a =
|
|
9697
|
+
const a = Eo(
|
|
9698
9698
|
(r = t == null ? void 0 : t.kpiVisualOptions) == null ? void 0 : r.formatOptions
|
|
9699
9699
|
) || (t != null && t.formatNumber ? wd(t == null ? void 0 : t.formatNumber) : void 0);
|
|
9700
|
-
return
|
|
9700
|
+
return Io(a, { preserveOmittedProperties: !0 }) || {
|
|
9701
9701
|
type: "number",
|
|
9702
9702
|
minimumFractionDigits: 0,
|
|
9703
9703
|
maximumFractionDigits: 0
|
|
@@ -9720,7 +9720,7 @@ function rx() {
|
|
|
9720
9720
|
}
|
|
9721
9721
|
), s = R(
|
|
9722
9722
|
(p) => p.actions.setColorRanges
|
|
9723
|
-
), o = pi() ?? hn.locale, d = fi() ?? hn.defaultCurrency, i = !
|
|
9723
|
+
), o = pi() ?? hn.locale, d = fi() ?? hn.defaultCurrency, i = !Im(t) && an(t.config), l = nx(t.preferences), c = !!Eo(
|
|
9724
9724
|
(f = (h = t.preferences) == null ? void 0 : h.kpiVisualOptions) == null ? void 0 : f.formatOptions
|
|
9725
9725
|
), m = !ax((b = t.preferences) == null ? void 0 : b.formatNumber) && (c || !!((N = t.preferences) != null && N.formatNumber)), u = (p) => {
|
|
9726
9726
|
const g = R.getState().card.preferences ?? {};
|
|
@@ -10432,7 +10432,7 @@ const dx = [
|
|
|
10432
10432
|
value: t
|
|
10433
10433
|
}));
|
|
10434
10434
|
function hx() {
|
|
10435
|
-
var c, m, u, x, h, f, b, N, p, g, S, T, M, O,
|
|
10435
|
+
var c, m, u, x, h, f, b, N, p, g, S, T, M, O, I, E, k, C;
|
|
10436
10436
|
const t = R((y) => y.card), a = (m = (c = t == null ? void 0 : t.preferences) == null ? void 0 : c.mapVisualOptions) == null ? void 0 : m.topoJsonUrl, [r, s] = U(
|
|
10437
10437
|
((x = (u = t == null ? void 0 : t.preferences) == null ? void 0 : u.mapVisualOptions) == null ? void 0 : x.customTopoJsonUrl) || ""
|
|
10438
10438
|
), { setCardPreferences: o } = De(), { data: d } = ps(t), i = Object.keys((d == null ? void 0 : d.objects) || {}).map((y) => ({
|
|
@@ -10591,7 +10591,7 @@ function hx() {
|
|
|
10591
10591
|
className: `h-9 w-full ${ra}`,
|
|
10592
10592
|
type: "number",
|
|
10593
10593
|
step: 10,
|
|
10594
|
-
value: ((
|
|
10594
|
+
value: ((I = (O = (M = t.preferences) == null ? void 0 : M.mapVisualOptions) == null ? void 0 : O.projectionOffset) == null ? void 0 : I[0]) || 0,
|
|
10595
10595
|
onChange: (y) => {
|
|
10596
10596
|
var L, w, D, _;
|
|
10597
10597
|
o({
|
|
@@ -10614,7 +10614,7 @@ function hx() {
|
|
|
10614
10614
|
className: `h-9 w-full ${ra}`,
|
|
10615
10615
|
type: "number",
|
|
10616
10616
|
step: 10,
|
|
10617
|
-
value: ((C = (k = (
|
|
10617
|
+
value: ((C = (k = (E = t.preferences) == null ? void 0 : E.mapVisualOptions) == null ? void 0 : k.projectionOffset) == null ? void 0 : C[1]) || 0,
|
|
10618
10618
|
onChange: (y) => {
|
|
10619
10619
|
var L, w, D, _;
|
|
10620
10620
|
o({
|
|
@@ -10778,7 +10778,7 @@ function rs({
|
|
|
10778
10778
|
title: o = "NUMBER FORMAT",
|
|
10779
10779
|
showLocaleOverride: d = !0
|
|
10780
10780
|
}) {
|
|
10781
|
-
const i = Fm(r), l = pi(), c = fi(), m =
|
|
10781
|
+
const i = Fm(r), l = pi(), c = fi(), m = Io(
|
|
10782
10782
|
of(t, { preserveOmittedProperties: !0 }),
|
|
10783
10783
|
{ preserveOmittedProperties: !0 }
|
|
10784
10784
|
) || {};
|
|
@@ -11015,7 +11015,7 @@ function xx({
|
|
|
11015
11015
|
var p, g, S;
|
|
11016
11016
|
const [s, o] = U(
|
|
11017
11017
|
((p = t.presentation.conditionalFormatting) == null ? void 0 : p.rules) ?? []
|
|
11018
|
-
), [d, i] = U(t.spec), [l, c] = U(""), m = JSON.stringify(t.presentation.conditionalFormatting ?? { version: 1, rules: [] }), u =
|
|
11018
|
+
), [d, i] = U(t.spec), [l, c] = U(""), m = JSON.stringify(t.presentation.conditionalFormatting ?? { version: 1, rules: [] }), u = Ie(m);
|
|
11019
11019
|
m !== u.current && (u.current = m, JSON.stringify(Cr.safeParse({ version: 1, rules: s }).data ?? null) !== m && o(((g = t.presentation.conditionalFormatting) == null ? void 0 : g.rules) ?? []));
|
|
11020
11020
|
const x = s.filter(Ll);
|
|
11021
11021
|
Me(() => {
|
|
@@ -11064,7 +11064,7 @@ function xx({
|
|
|
11064
11064
|
),
|
|
11065
11065
|
s.map((T, M) => {
|
|
11066
11066
|
var y;
|
|
11067
|
-
const O = T.target.matrix,
|
|
11067
|
+
const O = T.target.matrix, I = (O == null ? void 0 : O.axis) === "columns" ? "rows" : "columns", E = I === "rows" ? r == null ? void 0 : r.rowPath : r == null ? void 0 : r.columnPath, k = xc(t.spec[I], O == null ? void 0 : O.oppositePath, E), C = (L) => o(
|
|
11068
11068
|
(w) => w.map(
|
|
11069
11069
|
(D) => D.id === T.id ? { ...D, target: { ...D.target, matrix: L } } : D
|
|
11070
11070
|
)
|
|
@@ -11227,7 +11227,7 @@ function bx({
|
|
|
11227
11227
|
[N]: a.spec[N].map(
|
|
11228
11228
|
(C) => C.id === p.id ? k : C
|
|
11229
11229
|
)
|
|
11230
|
-
}), T = u(p.field), M = T === "date" || T === "datetime", O = a.presentation.levelFormats[p.id],
|
|
11230
|
+
}), T = u(p.field), M = T === "date" || T === "datetime", O = a.presentation.levelFormats[p.id], I = (O == null ? void 0 : O.type) === "temporal_bucket" ? O : Li, E = p.grain ? Tp(I, p.grain) : void 0;
|
|
11231
11231
|
return /* @__PURE__ */ n("div", { className: (t == null ? void 0 : t.kind) === "field" ? "min-w-0" : "min-w-0 border-b pb-2", children: [
|
|
11232
11232
|
/* @__PURE__ */ e("div", { className: "flex min-w-0 items-center justify-between gap-1", children: /* @__PURE__ */ e("span", { className: "truncate text-xs font-medium", title: g, children: g }) }),
|
|
11233
11233
|
/* @__PURE__ */ n("details", { open: (t == null ? void 0 : t.kind) === "field" ? !0 : void 0, children: [
|
|
@@ -11283,10 +11283,10 @@ function bx({
|
|
|
11283
11283
|
gt,
|
|
11284
11284
|
{
|
|
11285
11285
|
label: "Date format",
|
|
11286
|
-
value:
|
|
11286
|
+
value: E.value,
|
|
11287
11287
|
options: es(
|
|
11288
11288
|
p.grain,
|
|
11289
|
-
|
|
11289
|
+
I
|
|
11290
11290
|
),
|
|
11291
11291
|
onChange: (k) => f(
|
|
11292
11292
|
"levelFormats",
|
|
@@ -11294,16 +11294,16 @@ function bx({
|
|
|
11294
11294
|
k === "auto" ? void 0 : Kn(
|
|
11295
11295
|
p.grain,
|
|
11296
11296
|
k,
|
|
11297
|
-
|
|
11297
|
+
E.customPattern
|
|
11298
11298
|
)
|
|
11299
11299
|
)
|
|
11300
11300
|
}
|
|
11301
11301
|
),
|
|
11302
|
-
|
|
11302
|
+
E.value === "custom" && /* @__PURE__ */ e(
|
|
11303
11303
|
ga,
|
|
11304
11304
|
{
|
|
11305
11305
|
label: "Date pattern",
|
|
11306
|
-
value:
|
|
11306
|
+
value: E.customPattern,
|
|
11307
11307
|
onChange: (k) => {
|
|
11308
11308
|
k.trim() && f("levelFormats", p.id, {
|
|
11309
11309
|
type: "temporal_bucket",
|
|
@@ -11838,7 +11838,7 @@ function vc({
|
|
|
11838
11838
|
f,
|
|
11839
11839
|
i
|
|
11840
11840
|
)
|
|
11841
|
-
),
|
|
11841
|
+
), I = $m(c), E = qm(b), k = jm(b), [C, y] = U("style");
|
|
11842
11842
|
Me(() => {
|
|
11843
11843
|
if (r === "style") {
|
|
11844
11844
|
y("style");
|
|
@@ -11947,7 +11947,7 @@ function vc({
|
|
|
11947
11947
|
stripedRows: ln.stripedRows,
|
|
11948
11948
|
wrapText: ln.wrapText,
|
|
11949
11949
|
totals: {
|
|
11950
|
-
enabled:
|
|
11950
|
+
enabled: E ? k : pa.enabled,
|
|
11951
11951
|
backgroundColor: pa.backgroundColor,
|
|
11952
11952
|
textColor: pa.textColor,
|
|
11953
11953
|
fontWeight: pa.fontWeight,
|
|
@@ -12003,12 +12003,12 @@ function vc({
|
|
|
12003
12003
|
/* @__PURE__ */ e(
|
|
12004
12004
|
zm,
|
|
12005
12005
|
{
|
|
12006
|
-
style:
|
|
12006
|
+
style: I,
|
|
12007
12007
|
onDensityChange: v,
|
|
12008
12008
|
onStyleChange: V,
|
|
12009
12009
|
showFullStyle: S,
|
|
12010
12010
|
showBorderStyle: !1,
|
|
12011
|
-
totals: S &&
|
|
12011
|
+
totals: S && E ? {
|
|
12012
12012
|
enabled: k,
|
|
12013
12013
|
onEnabledChange: F,
|
|
12014
12014
|
onStyleChange: Y
|
|
@@ -12277,7 +12277,7 @@ const Mx = [
|
|
|
12277
12277
|
// yellow-400
|
|
12278
12278
|
];
|
|
12279
12279
|
function Dx() {
|
|
12280
|
-
var O,
|
|
12280
|
+
var O, I, E, k, C, y, L, w, D, _;
|
|
12281
12281
|
const t = R((v) => v.card), a = R((v) => {
|
|
12282
12282
|
var V;
|
|
12283
12283
|
return (V = v.card) == null ? void 0 : V.preferences;
|
|
@@ -12325,8 +12325,8 @@ function Dx() {
|
|
|
12325
12325
|
}, [
|
|
12326
12326
|
i,
|
|
12327
12327
|
(O = t == null ? void 0 : t.config) == null ? void 0 : O.groupByColumns,
|
|
12328
|
-
(
|
|
12329
|
-
(
|
|
12328
|
+
(I = t == null ? void 0 : t.config) == null ? void 0 : I.pivotByColumns,
|
|
12329
|
+
(E = t == null ? void 0 : t.config) == null ? void 0 : E.metricColumns,
|
|
12330
12330
|
r
|
|
12331
12331
|
]), b = de(() => Qm(), []);
|
|
12332
12332
|
Me(() => {
|
|
@@ -12416,7 +12416,7 @@ function Dx() {
|
|
|
12416
12416
|
const Y = Jm(l[v], V), F = !Y;
|
|
12417
12417
|
return /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
|
|
12418
12418
|
/* @__PURE__ */ n(
|
|
12419
|
-
|
|
12419
|
+
It,
|
|
12420
12420
|
{
|
|
12421
12421
|
open: m === v,
|
|
12422
12422
|
onOpenChange: (A) => u(A ? v : null),
|
|
@@ -12589,7 +12589,7 @@ function $t({
|
|
|
12589
12589
|
] });
|
|
12590
12590
|
}
|
|
12591
12591
|
function Br({ axis: t, label: a, type: r, config: s, onChange: o, defaultTitle: d, hidePosition: i }) {
|
|
12592
|
-
var b, N, p, g, S, T, M, O,
|
|
12592
|
+
var b, N, p, g, S, T, M, O, I, E, k, C, y, L;
|
|
12593
12593
|
const l = Xm({
|
|
12594
12594
|
formatMode: s == null ? void 0 : s.formatMode,
|
|
12595
12595
|
formatOptions: s == null ? void 0 : s.formatOptions
|
|
@@ -12791,7 +12791,7 @@ function Br({ axis: t, label: a, type: r, config: s, onChange: o, defaultTitle:
|
|
|
12791
12791
|
{
|
|
12792
12792
|
type: "number",
|
|
12793
12793
|
placeholder: "auto",
|
|
12794
|
-
value: ((
|
|
12794
|
+
value: ((I = s == null ? void 0 : s.scale) == null ? void 0 : I.min) === "auto" || ((E = s == null ? void 0 : s.scale) == null ? void 0 : E.min) === void 0 ? "" : String(s.scale.min),
|
|
12795
12795
|
onSave: (w) => x("min", w),
|
|
12796
12796
|
className: ""
|
|
12797
12797
|
}
|
|
@@ -12851,7 +12851,7 @@ function $r(t, a, r) {
|
|
|
12851
12851
|
}
|
|
12852
12852
|
return "";
|
|
12853
12853
|
}
|
|
12854
|
-
function
|
|
12854
|
+
function Ex() {
|
|
12855
12855
|
const t = R((c) => c.card), a = R((c) => {
|
|
12856
12856
|
var m;
|
|
12857
12857
|
return (m = c.card) == null ? void 0 : m.preferences;
|
|
@@ -12930,7 +12930,7 @@ function Ix() {
|
|
|
12930
12930
|
] }) })
|
|
12931
12931
|
] });
|
|
12932
12932
|
}
|
|
12933
|
-
function
|
|
12933
|
+
function Ix() {
|
|
12934
12934
|
const t = R((x) => x.card), a = vt(), r = R(
|
|
12935
12935
|
(x) => {
|
|
12936
12936
|
var h, f, b, N;
|
|
@@ -13050,18 +13050,18 @@ function Ax() {
|
|
|
13050
13050
|
}, T = () => {
|
|
13051
13051
|
const P = a;
|
|
13052
13052
|
return P === "stackedBar" || P === "stackedLine" || P === "pie" || P === "doughnut" ? "center" : l ? "right" : "top";
|
|
13053
|
-
}, M = a !== "treemap" && a !== "heatmap", O = a !== "treemap",
|
|
13054
|
-
let
|
|
13053
|
+
}, M = a !== "treemap" && a !== "heatmap", O = a !== "treemap", I = T();
|
|
13054
|
+
let E = [];
|
|
13055
13055
|
if (M)
|
|
13056
13056
|
if (u)
|
|
13057
|
-
|
|
13057
|
+
E = ["bottom"];
|
|
13058
13058
|
else if (c || m)
|
|
13059
|
-
|
|
13059
|
+
E = ["center"];
|
|
13060
13060
|
else {
|
|
13061
13061
|
const P = l ? ["center", "left", "right"] : ["center", "top", "bottom"];
|
|
13062
|
-
|
|
13062
|
+
E = ["auto", ...a === "bullet" ? P : P.filter((B) => B !== I), "custom"];
|
|
13063
13063
|
}
|
|
13064
|
-
const k = () => Pt(
|
|
13064
|
+
const k = () => Pt(I), C = ["center", "start", "end"], y = ["center", "start", "end", "top", "bottom"], L = (b == null ? void 0 : b.formatMode) || (b != null && b.format && !["auto"].includes(b.format) ? "override" : "inherit"), w = (b == null ? void 0 : b.format) === "none";
|
|
13065
13065
|
return /* @__PURE__ */ n(rt, { value: "data-labels", className: "border-b-0", children: [
|
|
13066
13066
|
/* @__PURE__ */ e(st, { className: "flex w-full items-center gap-2 py-2 text-[12px] font-medium hover:no-underline", children: /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
|
|
13067
13067
|
/* @__PURE__ */ e(Sf, { className: "h-4 w-4 text-muted-foreground" }),
|
|
@@ -13089,7 +13089,7 @@ function Ax() {
|
|
|
13089
13089
|
onValueChange: (P) => g("position", P),
|
|
13090
13090
|
children: [
|
|
13091
13091
|
/* @__PURE__ */ e(oe, { className: "h-8 text-xs", children: /* @__PURE__ */ e(ie, {}) }),
|
|
13092
|
-
/* @__PURE__ */ e(ce, { children:
|
|
13092
|
+
/* @__PURE__ */ e(ce, { children: E.map((P) => /* @__PURE__ */ e(K, { value: P, className: "text-xs", children: P === "auto" ? k() : P === "custom" ? "Custom (Advanced)" : Pt(P) }, P)) })
|
|
13093
13093
|
]
|
|
13094
13094
|
}
|
|
13095
13095
|
)
|
|
@@ -13577,9 +13577,9 @@ function Px() {
|
|
|
13577
13577
|
Y ? F[v] = Y : delete F[v], g({
|
|
13578
13578
|
rangeLabels: Object.keys(F).length > 0 ? F : void 0
|
|
13579
13579
|
});
|
|
13580
|
-
}, E = (v) => {
|
|
13581
|
-
m(v), g({ showRanges: v });
|
|
13582
13580
|
}, I = (v) => {
|
|
13581
|
+
m(v), g({ showRanges: v });
|
|
13582
|
+
}, E = (v) => {
|
|
13583
13583
|
x(v), g({ rangesArePercentages: v });
|
|
13584
13584
|
}, k = d.orientation || (((_ = t == null ? void 0 : t.chartOptions) == null ? void 0 : _.indexAxis) === "y" ? "horizontal" : "vertical"), C = (v) => {
|
|
13585
13585
|
g({ orientation: v }), o(v === "horizontal" ? "y" : "x");
|
|
@@ -13721,7 +13721,7 @@ function Px() {
|
|
|
13721
13721
|
/* @__PURE__ */ n("div", { className: "flex items-center justify-between gap-2", children: [
|
|
13722
13722
|
/* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
|
|
13723
13723
|
/* @__PURE__ */ e(q, { className: "text-xs font-medium", children: "QUALITATIVE RANGES" }),
|
|
13724
|
-
/* @__PURE__ */ e(
|
|
13724
|
+
/* @__PURE__ */ e(Et, { children: /* @__PURE__ */ n(wt, { delayDuration: 200, children: [
|
|
13725
13725
|
/* @__PURE__ */ e(St, { asChild: !0, children: /* @__PURE__ */ e(
|
|
13726
13726
|
"button",
|
|
13727
13727
|
{
|
|
@@ -13738,7 +13738,7 @@ function Px() {
|
|
|
13738
13738
|
{
|
|
13739
13739
|
size: "sm",
|
|
13740
13740
|
checked: c,
|
|
13741
|
-
onCheckedChange:
|
|
13741
|
+
onCheckedChange: I
|
|
13742
13742
|
}
|
|
13743
13743
|
) })
|
|
13744
13744
|
] }),
|
|
@@ -13749,7 +13749,7 @@ function Px() {
|
|
|
13749
13749
|
type: "checkbox",
|
|
13750
13750
|
checked: u,
|
|
13751
13751
|
disabled: !c,
|
|
13752
|
-
onChange: (v) =>
|
|
13752
|
+
onChange: (v) => E(v.target.checked),
|
|
13753
13753
|
className: "h-3.5 w-3.5 accent-primary disabled:opacity-50"
|
|
13754
13754
|
}
|
|
13755
13755
|
),
|
|
@@ -13851,7 +13851,7 @@ function bo(t) {
|
|
|
13851
13851
|
return a;
|
|
13852
13852
|
}
|
|
13853
13853
|
function Lx() {
|
|
13854
|
-
var O,
|
|
13854
|
+
var O, I, E, k, C, y, L, w, D, _, v, V;
|
|
13855
13855
|
const t = R((Y) => Y.card.preferences), a = R((Y) => Y.card), r = vt(), s = R((Y) => Y.isDevMode), { setCardPreferences: o, updateCardInFrame: d } = De(), i = r === "bubble", l = r === "scatter", c = de(
|
|
13856
13856
|
() => (t == null ? void 0 : t.bubbleScatterConfig) || {},
|
|
13857
13857
|
[t == null ? void 0 : t.bubbleScatterConfig]
|
|
@@ -13867,7 +13867,7 @@ function Lx() {
|
|
|
13867
13867
|
const P = A.label || A.name || A.alias || "";
|
|
13868
13868
|
return { value: P, label: P };
|
|
13869
13869
|
})) || [];
|
|
13870
|
-
}, [(
|
|
13870
|
+
}, [(I = a == null ? void 0 : a.config) == null ? void 0 : I.groupByColumns]), f = de(() => c.enableGrouping !== void 0 ? c.enableGrouping : !s && h.length >= 2, [c.enableGrouping, s, h.length]), [b, N] = U(f);
|
|
13871
13871
|
Me(() => {
|
|
13872
13872
|
N(f);
|
|
13873
13873
|
}, [f]);
|
|
@@ -13930,7 +13930,7 @@ function Lx() {
|
|
|
13930
13930
|
/* @__PURE__ */ n("div", { className: "space-y-3", children: [
|
|
13931
13931
|
/* @__PURE__ */ n("div", { className: "flex items-center gap-1 text-xs font-medium text-muted-foreground", children: [
|
|
13932
13932
|
"Dimensions",
|
|
13933
|
-
/* @__PURE__ */ e(
|
|
13933
|
+
/* @__PURE__ */ e(Et, { children: /* @__PURE__ */ n(wt, { children: [
|
|
13934
13934
|
/* @__PURE__ */ e(St, { children: /* @__PURE__ */ e(mn, { className: "h-3 w-3" }) }),
|
|
13935
13935
|
/* @__PURE__ */ e(Ct, { side: "right", className: "max-w-xs", children: /* @__PURE__ */ e("p", { children: "Label identifies each point. Group creates separate series in the legend." }) })
|
|
13936
13936
|
] }) })
|
|
@@ -14089,7 +14089,7 @@ function Lx() {
|
|
|
14089
14089
|
className: "h-8 text-xs",
|
|
14090
14090
|
type: "number",
|
|
14091
14091
|
placeholder: "5",
|
|
14092
|
-
value: ((
|
|
14092
|
+
value: ((E = c.minRadius) == null ? void 0 : E.toString()) || "",
|
|
14093
14093
|
onCommit: (Y) => S({ minRadius: Y ? Number(Y) : void 0 })
|
|
14094
14094
|
}
|
|
14095
14095
|
)
|
|
@@ -14358,7 +14358,7 @@ function Yx() {
|
|
|
14358
14358
|
}
|
|
14359
14359
|
function pr() {
|
|
14360
14360
|
var i, l;
|
|
14361
|
-
const t = R((c) => c.card), { data: a, comparisonMetadata: r } = Ft(t), s = (a == null ? void 0 : a.records) || [], { keys: o } = zo(s, r), d = o.slice(1).filter((c) => !
|
|
14361
|
+
const t = R((c) => c.card), { data: a, comparisonMetadata: r } = Ft(t), s = (a == null ? void 0 : a.records) || [], { keys: o } = zo(s, r), d = o.slice(1).filter((c) => !Ep.includes(c));
|
|
14362
14362
|
if (rh(t.type)) {
|
|
14363
14363
|
const c = t.config, m = (i = c == null ? void 0 : c.pivotByColumns) != null && i.length && ((l = c == null ? void 0 : c.groupByColumns) != null && l.length) ? sh(s, c.metricColumns || []) : s, u = lh({
|
|
14364
14364
|
card: t,
|
|
@@ -14410,29 +14410,29 @@ function fr({
|
|
|
14410
14410
|
}) {
|
|
14411
14411
|
var b, N, p, g, S, T;
|
|
14412
14412
|
const i = o ?? (r ? ["auto", "center", "left", "right", "custom"] : ["auto", "center", "top", "bottom", "custom"]), l = s ? ["auto", "number", "currency", "percent", "none"] : ["number", "currency", "percent", "none"], c = (M, O) => {
|
|
14413
|
-
const
|
|
14413
|
+
const I = {
|
|
14414
14414
|
...t,
|
|
14415
14415
|
[M]: O
|
|
14416
14416
|
};
|
|
14417
|
-
a(
|
|
14417
|
+
a(I);
|
|
14418
14418
|
}, m = (M, O) => {
|
|
14419
|
-
const
|
|
14419
|
+
const I = {
|
|
14420
14420
|
...t,
|
|
14421
14421
|
font: {
|
|
14422
14422
|
...(t == null ? void 0 : t.font) || {},
|
|
14423
14423
|
[M]: O
|
|
14424
14424
|
}
|
|
14425
14425
|
};
|
|
14426
|
-
a(
|
|
14426
|
+
a(I);
|
|
14427
14427
|
}, u = (M, O) => {
|
|
14428
|
-
const
|
|
14428
|
+
const I = {
|
|
14429
14429
|
...t,
|
|
14430
14430
|
formatOptions: {
|
|
14431
14431
|
...(t == null ? void 0 : t.formatOptions) || {},
|
|
14432
14432
|
[M]: O
|
|
14433
14433
|
}
|
|
14434
14434
|
};
|
|
14435
|
-
a(
|
|
14435
|
+
a(I);
|
|
14436
14436
|
}, x = () => r ? "Right" : "Top", h = t || {}, f = h.format || (s ? "auto" : "number");
|
|
14437
14437
|
return /* @__PURE__ */ n("div", { className: "space-y-3", children: [
|
|
14438
14438
|
/* @__PURE__ */ n("div", { className: "space-y-1.5", children: [
|
|
@@ -15756,10 +15756,10 @@ function Sb() {
|
|
|
15756
15756
|
}
|
|
15757
15757
|
});
|
|
15758
15758
|
}, p = (M, O) => {
|
|
15759
|
-
const
|
|
15759
|
+
const I = fa(M), E = h.filter(
|
|
15760
15760
|
(C) => b.has(fa(C))
|
|
15761
|
-
), k = O ? b.has(
|
|
15762
|
-
(C) => fa(C) !==
|
|
15761
|
+
), k = O ? b.has(I) ? E : [...E, M].slice(0, Kr) : E.filter(
|
|
15762
|
+
(C) => fa(C) !== I
|
|
15763
15763
|
);
|
|
15764
15764
|
N({
|
|
15765
15765
|
breakdownDimensions: k,
|
|
@@ -15856,7 +15856,7 @@ function Sb() {
|
|
|
15856
15856
|
] })
|
|
15857
15857
|
] }),
|
|
15858
15858
|
h.length === 0 ? /* @__PURE__ */ e("p", { className: "text-[11px] text-muted-foreground", children: "No dimension fields available for breakdown." }) : /* @__PURE__ */ e("ul", { className: "max-h-40 space-y-1 overflow-y-auto", children: h.map((M) => {
|
|
15859
|
-
const O = fa(M),
|
|
15859
|
+
const O = fa(M), I = b.has(O), E = b.size >= Kr, k = !u || !I && E;
|
|
15860
15860
|
return /* @__PURE__ */ n(
|
|
15861
15861
|
"li",
|
|
15862
15862
|
{
|
|
@@ -15866,7 +15866,7 @@ function Sb() {
|
|
|
15866
15866
|
Xt,
|
|
15867
15867
|
{
|
|
15868
15868
|
id: `summary-breakdown-${O}`,
|
|
15869
|
-
checked:
|
|
15869
|
+
checked: I,
|
|
15870
15870
|
disabled: k,
|
|
15871
15871
|
onCheckedChange: (C) => p(M, C === !0)
|
|
15872
15872
|
}
|
|
@@ -15988,8 +15988,8 @@ function yc({ mode: t }) {
|
|
|
15988
15988
|
(a === "bubble" || a === "scatter") && /* @__PURE__ */ e(Lx, {}),
|
|
15989
15989
|
(a === "stackedBar" || a === "stackedLine") && /* @__PURE__ */ e(yb, {}),
|
|
15990
15990
|
/* @__PURE__ */ e(Dx, {}),
|
|
15991
|
-
/* @__PURE__ */ e(Ix, {}),
|
|
15992
15991
|
/* @__PURE__ */ e(Ex, {}),
|
|
15992
|
+
/* @__PURE__ */ e(Ix, {}),
|
|
15993
15993
|
/* @__PURE__ */ e(Ax, {}),
|
|
15994
15994
|
/* @__PURE__ */ e(kb, {})
|
|
15995
15995
|
] });
|
|
@@ -16035,8 +16035,8 @@ function Db({
|
|
|
16035
16035
|
] });
|
|
16036
16036
|
}
|
|
16037
16037
|
const vo = 32;
|
|
16038
|
-
function
|
|
16039
|
-
const t =
|
|
16038
|
+
function Eb() {
|
|
16039
|
+
const t = Ie(null), a = Ie(null), r = R((N) => N.isShowingVisual), s = R((N) => N.isDevMode), o = R((N) => N.showAIDialog), [d, i] = U(!1), [l, c] = U({ section: null, id: 0 }), m = r && !o, u = m && (!s || d), x = s && m, h = () => i((N) => !N), f = (N) => {
|
|
16040
16040
|
N && c((p) => ({
|
|
16041
16041
|
section: N,
|
|
16042
16042
|
id: p.id + 1
|
|
@@ -16118,7 +16118,7 @@ function Ib() {
|
|
|
16118
16118
|
}
|
|
16119
16119
|
);
|
|
16120
16120
|
}
|
|
16121
|
-
function
|
|
16121
|
+
function Ib(t) {
|
|
16122
16122
|
var Pe;
|
|
16123
16123
|
dn(
|
|
16124
16124
|
(G) => G.currentAIContext
|
|
@@ -16137,9 +16137,9 @@ function Eb(t) {
|
|
|
16137
16137
|
setQueryConfig: N
|
|
16138
16138
|
} = De(), p = R((G) => G.currentAssitantScope) || [], g = R((G) => G.userInputForAI), S = R((G) => G.triggerAIRun), T = R((G) => G.card), M = R(
|
|
16139
16139
|
(G) => G.selectedDatabaseName
|
|
16140
|
-
), O = R((G) => G.selectedTableName),
|
|
16140
|
+
), O = R((G) => G.selectedTableName), I = R(
|
|
16141
16141
|
(G) => G.selectedConnectionId
|
|
16142
|
-
),
|
|
16142
|
+
), E = R(
|
|
16143
16143
|
(G) => G.selectedSchemaName
|
|
16144
16144
|
), k = we(
|
|
16145
16145
|
(G) => G.dashboard.aiScopeTables
|
|
@@ -16147,7 +16147,7 @@ function Eb(t) {
|
|
|
16147
16147
|
errorMessage: C,
|
|
16148
16148
|
refetch: y,
|
|
16149
16149
|
data: L
|
|
16150
|
-
} = Ft(T), { setTriggerAIRun: w, setCurrentAssitantScope: D, setCardConfig: _ } = De(), { selectedDatamodelName: v, connectionType: V, selectedDatamodelId: Y } = ih(), F = (Pe = Yo().data) == null ? void 0 : Pe.assistantProfileId, A =
|
|
16150
|
+
} = Ft(T), { setTriggerAIRun: w, setCurrentAssitantScope: D, setCardConfig: _ } = De(), { selectedDatamodelName: v, connectionType: V, selectedDatamodelId: Y } = ih(), F = (Pe = Yo().data) == null ? void 0 : Pe.assistantProfileId, A = Ie(On()), P = Ie(null), j = Ie(l), B = Ie(!1), $ = () => {
|
|
16151
16151
|
const G = P.current;
|
|
16152
16152
|
G && (P.current = null, A.current = On(), G === "clear" && re([]));
|
|
16153
16153
|
}, {
|
|
@@ -16254,8 +16254,8 @@ function Eb(t) {
|
|
|
16254
16254
|
async function Ye({ toolCall: G }) {
|
|
16255
16255
|
var ne, Ne, pe, ye, He, ae, $e, it, bt, at, Ot, Qe, ve, We, Xe, qe;
|
|
16256
16256
|
if (["createChartFromSql", "createForecast"].includes(G.toolName)) {
|
|
16257
|
-
const me = ((ne = G.input) == null ? void 0 : ne.sql) ?? ((Ne = G.args) == null ? void 0 : Ne.sql),
|
|
16258
|
-
b(Ae), h(me), x(
|
|
16257
|
+
const me = ((ne = G.input) == null ? void 0 : ne.sql) ?? ((Ne = G.args) == null ? void 0 : Ne.sql), Ee = ((pe = G.input) == null ? void 0 : pe.python) ?? ((ye = G.args) == null ? void 0 : ye.python), Ae = ((He = G.input) == null ? void 0 : He.chartType) ?? ((ae = G.args) == null ? void 0 : ae.chartType);
|
|
16258
|
+
b(Ae), h(me), x(Ee), f(!0), fe({
|
|
16259
16259
|
tool: G.toolName,
|
|
16260
16260
|
toolCallId: G.toolCallId,
|
|
16261
16261
|
output: {
|
|
@@ -16286,8 +16286,8 @@ function Eb(t) {
|
|
|
16286
16286
|
});
|
|
16287
16287
|
} else if (G.toolName === "generateQueryConfig") {
|
|
16288
16288
|
r("Generating query config...");
|
|
16289
|
-
const me = (($e = G.input) == null ? void 0 : $e.chartType) ?? ((it = G.args) == null ? void 0 : it.chartType),
|
|
16290
|
-
((Ot = G.input) == null ? void 0 : Ot.cardConfig) ?? ((Qe = G.args) == null || Qe.cardConfig), b(me), _(
|
|
16289
|
+
const me = (($e = G.input) == null ? void 0 : $e.chartType) ?? ((it = G.args) == null ? void 0 : it.chartType), Ee = ((bt = G.input) == null ? void 0 : bt.queryConfig) ?? ((at = G.args) == null ? void 0 : at.queryConfig);
|
|
16290
|
+
((Ot = G.input) == null ? void 0 : Ot.cardConfig) ?? ((Qe = G.args) == null || Qe.cardConfig), b(me), _(Ee), h(void 0), x(void 0);
|
|
16291
16291
|
const Ae = await y();
|
|
16292
16292
|
if ((ve = Ae == null ? void 0 : Ae.data) != null && ve.error) {
|
|
16293
16293
|
fe({
|
|
@@ -16295,7 +16295,7 @@ function Eb(t) {
|
|
|
16295
16295
|
toolCallId: G.toolCallId,
|
|
16296
16296
|
output: {
|
|
16297
16297
|
status: "error",
|
|
16298
|
-
queryConfig:
|
|
16298
|
+
queryConfig: Ee,
|
|
16299
16299
|
message: (We = Ae == null ? void 0 : Ae.data) == null ? void 0 : We.error.message
|
|
16300
16300
|
}
|
|
16301
16301
|
});
|
|
@@ -16307,7 +16307,7 @@ function Eb(t) {
|
|
|
16307
16307
|
toolCallId: G.toolCallId,
|
|
16308
16308
|
output: {
|
|
16309
16309
|
status: "success",
|
|
16310
|
-
queryConfig:
|
|
16310
|
+
queryConfig: Ee,
|
|
16311
16311
|
message: "The data has been visualized"
|
|
16312
16312
|
}
|
|
16313
16313
|
});
|
|
@@ -16318,7 +16318,7 @@ function Eb(t) {
|
|
|
16318
16318
|
toolCallId: G.toolCallId,
|
|
16319
16319
|
output: {
|
|
16320
16320
|
status: "success",
|
|
16321
|
-
queryConfig:
|
|
16321
|
+
queryConfig: Ee,
|
|
16322
16322
|
message: "The data has been visualized",
|
|
16323
16323
|
records: (qe = Ae == null ? void 0 : Ae.data) == null ? void 0 : qe.records
|
|
16324
16324
|
}
|
|
@@ -16351,11 +16351,11 @@ function Eb(t) {
|
|
|
16351
16351
|
function xe() {
|
|
16352
16352
|
const G = {
|
|
16353
16353
|
databaseName: M || "",
|
|
16354
|
-
schemaName:
|
|
16354
|
+
schemaName: E || "",
|
|
16355
16355
|
tableName: O || "",
|
|
16356
16356
|
datamodelId: Y || "",
|
|
16357
16357
|
datamodelName: kl(v),
|
|
16358
|
-
connectionId:
|
|
16358
|
+
connectionId: I || "",
|
|
16359
16359
|
connectionType: V || ""
|
|
16360
16360
|
}, ne = Bl([...p, G]);
|
|
16361
16361
|
et(ne);
|
|
@@ -16363,10 +16363,10 @@ function Eb(t) {
|
|
|
16363
16363
|
function je() {
|
|
16364
16364
|
const G = {
|
|
16365
16365
|
databaseName: M || "",
|
|
16366
|
-
schemaName:
|
|
16366
|
+
schemaName: E || "",
|
|
16367
16367
|
tableName: O || "",
|
|
16368
16368
|
datamodelName: kl(v),
|
|
16369
|
-
connectionId:
|
|
16369
|
+
connectionId: I || "",
|
|
16370
16370
|
connectionType: V || "",
|
|
16371
16371
|
datamodelId: Y || ""
|
|
16372
16372
|
};
|
|
@@ -16420,7 +16420,7 @@ function yo({
|
|
|
16420
16420
|
onFullscreenChange: a,
|
|
16421
16421
|
fullscreenContainer: r
|
|
16422
16422
|
}) {
|
|
16423
|
-
const s =
|
|
16423
|
+
const s = Ie(null), o = Ie(!1), [d, i] = U(!1), [l, c] = U(Ip), [m, u] = U(!1), [x, h] = U(!1), [f, b] = U(!1), [N, p] = U(0), g = t ?? f, S = kd(), { setCurrentAIContext: T, setHasEditorEntitySelectionOverride: M } = os(), { clearQueue: O } = Md(), { clearFileAttachments: I } = Dd(), E = Ed("editor"), { selectedEntities: k } = Ro("editor"), C = R((pe) => pe.card.id), y = R((pe) => pe.card.dataSource), L = R(
|
|
16424
16424
|
(pe) => {
|
|
16425
16425
|
var ye;
|
|
16426
16426
|
return (ye = pe.card.dataSource) == null ? void 0 : ye.selectedEntities;
|
|
@@ -16437,14 +16437,14 @@ function yo({
|
|
|
16437
16437
|
llmUsage: re,
|
|
16438
16438
|
errorMessage: z,
|
|
16439
16439
|
clearError: X
|
|
16440
|
-
} =
|
|
16440
|
+
} = Ib(), [Z, te] = U(""), fe = (pe) => {
|
|
16441
16441
|
te(pe.target.value);
|
|
16442
16442
|
}, Te = (pe) => {
|
|
16443
16443
|
pe.preventDefault();
|
|
16444
16444
|
const ye = Z.trim();
|
|
16445
|
-
if (!ye &&
|
|
16445
|
+
if (!ye && E.length === 0) return;
|
|
16446
16446
|
const He = [];
|
|
16447
|
-
ye && He.push({ type: "text", text: ye }),
|
|
16447
|
+
ye && He.push({ type: "text", text: ye }), E.forEach((ae) => {
|
|
16448
16448
|
ae.data && He.push({
|
|
16449
16449
|
type: "file",
|
|
16450
16450
|
mediaType: ae.type,
|
|
@@ -16452,7 +16452,7 @@ function yo({
|
|
|
16452
16452
|
// Convert base64 to data URL for the file content
|
|
16453
16453
|
url: `data:${ae.type};base64,${ae.data}`
|
|
16454
16454
|
});
|
|
16455
|
-
}), j({ role: "user", parts: He }), te(""),
|
|
16455
|
+
}), j({ role: "user", parts: He }), te(""), I("editor"), ke();
|
|
16456
16456
|
}, ke = Re(() => {
|
|
16457
16457
|
p((pe) => pe + 1);
|
|
16458
16458
|
}, []);
|
|
@@ -16752,7 +16752,7 @@ function Ls({
|
|
|
16752
16752
|
className: a,
|
|
16753
16753
|
delayDuration: r
|
|
16754
16754
|
}) {
|
|
16755
|
-
return /* @__PURE__ */ e(
|
|
16755
|
+
return /* @__PURE__ */ e(Et, { children: /* @__PURE__ */ n(wt, { delayDuration: r, children: [
|
|
16756
16756
|
/* @__PURE__ */ e(St, { asChild: !0, children: /* @__PURE__ */ e(
|
|
16757
16757
|
"span",
|
|
16758
16758
|
{
|
|
@@ -16787,7 +16787,7 @@ function Nc({
|
|
|
16787
16787
|
transition: N,
|
|
16788
16788
|
isDragging: p
|
|
16789
16789
|
} = Ns({ id: t });
|
|
16790
|
-
return /* @__PURE__ */ n(
|
|
16790
|
+
return /* @__PURE__ */ n(It, { modal: !0, open: o, onOpenChange: d, children: [
|
|
16791
16791
|
/* @__PURE__ */ n(
|
|
16792
16792
|
"div",
|
|
16793
16793
|
{
|
|
@@ -16869,7 +16869,7 @@ function Fb(t, a) {
|
|
|
16869
16869
|
const d = a.queryFilterDefinitions.find(
|
|
16870
16870
|
(c) => c.id === o.filterId
|
|
16871
16871
|
);
|
|
16872
|
-
if (!
|
|
16872
|
+
if (!Id(o)) return !1;
|
|
16873
16873
|
if (!(r.has(o.filterId) || (d == null ? void 0 : d.kind) === "global-date"))
|
|
16874
16874
|
return !!(d && Ob(
|
|
16875
16875
|
[d],
|
|
@@ -17242,7 +17242,7 @@ function Vb({ idx: t }) {
|
|
|
17242
17242
|
});
|
|
17243
17243
|
}
|
|
17244
17244
|
}
|
|
17245
|
-
return /* @__PURE__ */ n(
|
|
17245
|
+
return /* @__PURE__ */ n(It, { children: [
|
|
17246
17246
|
/* @__PURE__ */ e(Vt, { children: /* @__PURE__ */ e(Dh, { className: "size-4 rotate-[135deg] cursor-pointer text-muted-foreground hover:text-foreground" }) }),
|
|
17247
17247
|
/* @__PURE__ */ e(At, { className: "w-fit px-2 py-1", children: /* @__PURE__ */ n("div", { className: "flex gap-1", children: [
|
|
17248
17248
|
/* @__PURE__ */ e(
|
|
@@ -17502,7 +17502,7 @@ function qb({
|
|
|
17502
17502
|
a,
|
|
17503
17503
|
r,
|
|
17504
17504
|
d
|
|
17505
|
-
], m =
|
|
17505
|
+
], m = Eh({
|
|
17506
17506
|
queryKey: c,
|
|
17507
17507
|
queryFn: async () => {
|
|
17508
17508
|
if (!(l != null && l.connectionId))
|
|
@@ -17593,7 +17593,7 @@ function Kb({
|
|
|
17593
17593
|
}), f = r.filter((T) => {
|
|
17594
17594
|
var O;
|
|
17595
17595
|
return i ? !1 : !((O = s == null ? void 0 : s.conditions) == null ? void 0 : O.some(
|
|
17596
|
-
(
|
|
17596
|
+
(I) => I.field.id === T.id
|
|
17597
17597
|
));
|
|
17598
17598
|
}), b = (T) => {
|
|
17599
17599
|
h({
|
|
@@ -17611,7 +17611,7 @@ function Kb({
|
|
|
17611
17611
|
let M;
|
|
17612
17612
|
if (i) {
|
|
17613
17613
|
const O = ((s == null ? void 0 : s.conditions) || []).map(
|
|
17614
|
-
(
|
|
17614
|
+
(I) => I.id === o.id ? T : I
|
|
17615
17615
|
);
|
|
17616
17616
|
M = {
|
|
17617
17617
|
...s,
|
|
@@ -17827,7 +17827,7 @@ function Hb({
|
|
|
17827
17827
|
valuePickFilterableFields: p,
|
|
17828
17828
|
isLoading: g,
|
|
17829
17829
|
hasError: S
|
|
17830
|
-
} = Ss(), { userContext: T } = us(), { tokenProps: M } = Xa(), O = Ti(T),
|
|
17830
|
+
} = Ss(), { userContext: T } = us(), { tokenProps: M } = Xa(), O = Ti(T), I = ki() ?? void 0, E = ui() ?? hn, {
|
|
17831
17831
|
updateLabel: k,
|
|
17832
17832
|
handleAggregationChange: C,
|
|
17833
17833
|
handleDetailDateFormatChange: y,
|
|
@@ -17914,7 +17914,7 @@ function Hb({
|
|
|
17914
17914
|
const be = a === "groupBy" ? es(
|
|
17915
17915
|
Le,
|
|
17916
17916
|
Ne.format,
|
|
17917
|
-
|
|
17917
|
+
E
|
|
17918
17918
|
).find(
|
|
17919
17919
|
(ot) => ot.value === "custom"
|
|
17920
17920
|
) : void 0, Fe = a === "groupBy" ? He || (((ee = be == null ? void 0 : be.format) == null ? void 0 : ee.presentation.mode) === "pattern" ? be.format.presentation.pattern : "") : He;
|
|
@@ -17958,13 +17958,13 @@ function Hb({
|
|
|
17958
17958
|
}
|
|
17959
17959
|
}, me = (J) => {
|
|
17960
17960
|
bt(J), a === "metrics" && _(r, J);
|
|
17961
|
-
},
|
|
17961
|
+
}, Ee = (J) => {
|
|
17962
17962
|
a === "pivotBy" && v(r, J);
|
|
17963
17963
|
}, Ae = (J) => {
|
|
17964
17964
|
Ot(J), a === "metrics" && V(r, J);
|
|
17965
17965
|
}, mt = (J) => {
|
|
17966
17966
|
k(a, r, J);
|
|
17967
|
-
}, Mt =
|
|
17967
|
+
}, Mt = Ih(t);
|
|
17968
17968
|
Ah(t);
|
|
17969
17969
|
const Ut = Fh(t), qt = t.role === "metric" && Ut, ka = Ut && (Mt === "user_calculated" || Mt === "inline_expression" && t.fieldScope !== "domain"), Dt = ka ? Pd({
|
|
17970
17970
|
field: t,
|
|
@@ -17989,22 +17989,22 @@ function Hb({
|
|
|
17989
17989
|
F(a, r);
|
|
17990
17990
|
}, da = zt(
|
|
17991
17991
|
Ge.dataType || t.dataType
|
|
17992
|
-
), aa = da === "date", Dn = i === "kpi", Da = a === "detailColumns",
|
|
17992
|
+
), aa = da === "date", Dn = i === "kpi", Da = a === "detailColumns", En = (zs = l.config) == null ? void 0 : zs.metricColumns, Ht = (Us = l.config) == null ? void 0 : Us.groupByColumns, ua = Rh(l), Ea = we(
|
|
17993
17993
|
(J) => J.semanticExecutionPayload
|
|
17994
17994
|
), sn = a === "groupBy" && ne ? es(
|
|
17995
17995
|
ne,
|
|
17996
17996
|
Ne.format,
|
|
17997
|
-
|
|
17998
|
-
) : a === "detailColumns" ? Rb(ne ?? "day") : [], gr = $e ? "custom" : !ne && a === "groupBy" ? void 0 : sn.some((J) => J.value === pe) ? pe : ((Gs = sn[0]) == null ? void 0 : Gs.value) ?? "YYYY-MM-DD",
|
|
17997
|
+
E
|
|
17998
|
+
) : a === "detailColumns" ? Rb(ne ?? "day") : [], gr = $e ? "custom" : !ne && a === "groupBy" ? void 0 : sn.some((J) => J.value === pe) ? pe : ((Gs = sn[0]) == null ? void 0 : Gs.value) ?? "YYYY-MM-DD", In = !!i && qh.includes(i), xr = !!i && jh.includes(i), ma = de(
|
|
17999
17999
|
() => Ht == null ? void 0 : Ht.find((J) => zt(J.dataType || "") === "date"),
|
|
18000
18000
|
[Ht]
|
|
18001
18001
|
), jt = de(
|
|
18002
18002
|
() => Ld({
|
|
18003
18003
|
card: l,
|
|
18004
18004
|
cardConfig: l.config || {},
|
|
18005
|
-
semanticExecutionPayload:
|
|
18005
|
+
semanticExecutionPayload: Ea
|
|
18006
18006
|
}),
|
|
18007
|
-
[l,
|
|
18007
|
+
[l, Ea]
|
|
18008
18008
|
), ht = de(
|
|
18009
18009
|
() => ma || (jt ? {
|
|
18010
18010
|
...jt,
|
|
@@ -18029,10 +18029,10 @@ function Hb({
|
|
|
18029
18029
|
cardConfig: ua.queryRelevantConfig,
|
|
18030
18030
|
input: ua.filterCompilationInput,
|
|
18031
18031
|
resolvedFields: ua.resolvedDateFields,
|
|
18032
|
-
semanticExecutionPayload:
|
|
18033
|
-
timezone:
|
|
18032
|
+
semanticExecutionPayload: Ea,
|
|
18033
|
+
timezone: I
|
|
18034
18034
|
})),
|
|
18035
|
-
[l, ua,
|
|
18035
|
+
[l, ua, Ea, I]
|
|
18036
18036
|
), Oe = he || ue, ge = t, Se = ((Hs = ge.comparison) == null ? void 0 : Hs.mode) === "explicit" ? ge.comparison.spec : void 0, nt = ((Js = (Qs = ge.parameters) == null ? void 0 : Qs.windowTransform) == null ? void 0 : Js.function) || "none", Ze = Lh(ge), ct = Ze ? nt : null, na = Vh({
|
|
18037
18037
|
cardType: i || "table",
|
|
18038
18038
|
cardConfig: l.config || {},
|
|
@@ -18042,12 +18042,12 @@ function Hb({
|
|
|
18042
18042
|
Ht || []
|
|
18043
18043
|
), Yt = ((el = (Zs = (Xs = ge.parameters) == null ? void 0 : Xs.windowTransform) == null ? void 0 : Zs.orderBy) == null ? void 0 : el.fieldId) || "", br = ((nl = (al = (tl = ge.parameters) == null ? void 0 : tl.windowTransform) == null ? void 0 : al.orderBy) == null ? void 0 : nl.direction) || "asc", An = ft.find(
|
|
18044
18044
|
(J) => J.id === Yt
|
|
18045
|
-
), vr = ct === "running_total" || ct === "moving_average" || ct === "previous_period_delta", Dc = Ze && vr && !!An && zt(An.dataType || "") !== "date",
|
|
18045
|
+
), vr = ct === "running_total" || ct === "moving_average" || ct === "previous_period_delta", Dc = Ze && vr && !!An && zt(An.dataType || "") !== "date", Ec = _h({
|
|
18046
18046
|
cardType: i || "table",
|
|
18047
18047
|
cardConfig: l.config || {},
|
|
18048
18048
|
orderByFieldId: Yt || void 0
|
|
18049
|
-
}),
|
|
18050
|
-
((sl = (rl = ge.parameters) == null ? void 0 : rl.windowTransform) == null ? void 0 : sl.partitionByFieldIds) ||
|
|
18049
|
+
}), Ic = new Set(
|
|
18050
|
+
((sl = (rl = ge.parameters) == null ? void 0 : rl.windowTransform) == null ? void 0 : sl.partitionByFieldIds) || Ec
|
|
18051
18051
|
), Ac = i === "pivotTable" || Bh(
|
|
18052
18052
|
i || "table",
|
|
18053
18053
|
l.config || {}
|
|
@@ -18057,8 +18057,8 @@ function Hb({
|
|
|
18057
18057
|
),
|
|
18058
18058
|
...Ac ? (((ll = l.config) == null ? void 0 : ll.pivotByColumns) || []).filter((J) => J.id) : []
|
|
18059
18059
|
], $s = ((cl = (il = (ol = ge.parameters) == null ? void 0 : ol.windowTransform) == null ? void 0 : il.movingAverage) == null ? void 0 : cl.windowSize) || 7, Fc = ((ml = (ul = (dl = ge.parameters) == null ? void 0 : dl.windowTransform) == null ? void 0 : ul.movingAverage) == null ? void 0 : ml.minPeriods) || 1, Oc = ((fl = (pl = (hl = ge.parameters) == null ? void 0 : hl.windowTransform) == null ? void 0 : pl.previousPeriodDelta) == null ? void 0 : fl.mode) || "absolute", qs = ((bl = (xl = (gl = ge.parameters) == null ? void 0 : gl.windowTransform) == null ? void 0 : xl.percentOfTotal) == null ? void 0 : bl.scope) || "grand_total", Rc = ((Nl = (yl = (vl = ge.parameters) == null ? void 0 : vl.windowTransform) == null ? void 0 : yl.percentOfTotal) == null ? void 0 : Nl.output) || "percent", Pc = de(
|
|
18060
|
-
() => (
|
|
18061
|
-
[
|
|
18060
|
+
() => (En || []).some(() => !1),
|
|
18061
|
+
[En]
|
|
18062
18062
|
);
|
|
18063
18063
|
Me(() => {
|
|
18064
18064
|
Ze && ze(!0);
|
|
@@ -18066,7 +18066,7 @@ function Hb({
|
|
|
18066
18066
|
const Lc = a !== "pivotBy" && a !== "sortBy", Vc = Ub(
|
|
18067
18067
|
a,
|
|
18068
18068
|
i
|
|
18069
|
-
), Yc = t.memberOrder ?? "auto", _c = aa && a === "groupBy" && (!Dn || Pc), Bc = !Dn && aa && (a === "groupBy" || Da), $c = a === "metrics", qc = !Dn && da === "number" && (a === "groupBy" || Da) && $h(i), Fn =
|
|
18069
|
+
), Yc = t.memberOrder ?? "auto", _c = aa && a === "groupBy" && (!Dn || Pc), Bc = !Dn && aa && (a === "groupBy" || Da), $c = a === "metrics", qc = !Dn && da === "number" && (a === "groupBy" || Da) && $h(i), Fn = In && !l.sql && !l.python && a === "metrics", jc = () => {
|
|
18070
18070
|
const J = t, Le = a === "metrics" && qt;
|
|
18071
18071
|
return /* @__PURE__ */ n("div", { className: "space-y-1", children: [
|
|
18072
18072
|
!Le && /* @__PURE__ */ e(
|
|
@@ -18128,7 +18128,7 @@ function Hb({
|
|
|
18128
18128
|
le,
|
|
18129
18129
|
{
|
|
18130
18130
|
value: Yc,
|
|
18131
|
-
onValueChange: (J) =>
|
|
18131
|
+
onValueChange: (J) => Ee(J),
|
|
18132
18132
|
children: [
|
|
18133
18133
|
/* @__PURE__ */ e(oe, { className: "h-8 w-full text-xs", children: /* @__PURE__ */ e(ie, {}) }),
|
|
18134
18134
|
/* @__PURE__ */ n(ce, { children: [
|
|
@@ -18485,7 +18485,7 @@ function Hb({
|
|
|
18485
18485
|
/* @__PURE__ */ e(q, { className: "text-xs font-medium text-muted-foreground", children: "Reset By" }),
|
|
18486
18486
|
/* @__PURE__ */ e("div", { className: "space-y-1", children: Bs.map(
|
|
18487
18487
|
(ee) => {
|
|
18488
|
-
const be = !!ee.id &&
|
|
18488
|
+
const be = !!ee.id && Ic.has(ee.id);
|
|
18489
18489
|
return /* @__PURE__ */ n(
|
|
18490
18490
|
"button",
|
|
18491
18491
|
{
|
|
@@ -18530,7 +18530,7 @@ function Hb({
|
|
|
18530
18530
|
/* @__PURE__ */ e(K, { value: "inherit", children: "Inherit dashboard comparison (default)" }),
|
|
18531
18531
|
/* @__PURE__ */ e(K, { value: "off", children: "Off" }),
|
|
18532
18532
|
(() => {
|
|
18533
|
-
const ee = !ht || !Oe, be = ht ? Oe ? void 0 : "Add a date filter to enable" : "Configure a semantic primary date or add a date axis", Fe = (ot, xt) => /* @__PURE__ */ e(
|
|
18533
|
+
const ee = !ht || !Oe, be = ht ? Oe ? void 0 : "Add a date filter to enable" : "Configure a semantic primary date or add a date axis", Fe = (ot, xt) => /* @__PURE__ */ e(Et, { children: /* @__PURE__ */ n(wt, { children: [
|
|
18534
18534
|
/* @__PURE__ */ e(St, { asChild: !0, children: /* @__PURE__ */ e(
|
|
18535
18535
|
K,
|
|
18536
18536
|
{
|
|
@@ -18683,7 +18683,7 @@ function Hb({
|
|
|
18683
18683
|
ee.field.label,
|
|
18684
18684
|
":"
|
|
18685
18685
|
] }),
|
|
18686
|
-
/* @__PURE__ */ e(
|
|
18686
|
+
/* @__PURE__ */ e(Et, { children: /* @__PURE__ */ n(wt, { children: [
|
|
18687
18687
|
/* @__PURE__ */ e(St, { asChild: !0, children: /* @__PURE__ */ e("span", { className: "cursor-help text-muted-foreground", children: Array.isArray(ee.value) ? ee.value.length === 1 ? String(ee.value[0]) : ee.value.length <= 2 ? ee.value.join(", ") : `${ee.value.slice(0, 2).join(", ")} +${ee.value.length - 2}` : String(ee.value) }) }),
|
|
18688
18688
|
Array.isArray(ee.value) && ee.value.length > 1 && /* @__PURE__ */ e(
|
|
18689
18689
|
Ct,
|
|
@@ -18791,7 +18791,7 @@ function Hb({
|
|
|
18791
18791
|
onRemove: rn,
|
|
18792
18792
|
sortDirection: s,
|
|
18793
18793
|
onSortDirectionChange: a === "sortBy" ? o : void 0,
|
|
18794
|
-
badge: /* @__PURE__ */ e(Ce, { children: a === "metrics" && ((Cl = Qe == null ? void 0 : Qe.conditions) == null ? void 0 : Cl.length) && !ke && /* @__PURE__ */ e(
|
|
18794
|
+
badge: /* @__PURE__ */ e(Ce, { children: a === "metrics" && ((Cl = Qe == null ? void 0 : Qe.conditions) == null ? void 0 : Cl.length) && !ke && /* @__PURE__ */ e(Et, { children: /* @__PURE__ */ n(wt, { children: [
|
|
18795
18795
|
/* @__PURE__ */ e(St, { asChild: !0, children: /* @__PURE__ */ n("div", { className: "flex shrink-0 items-center gap-1 rounded-[3px] bg-primary/10 px-1 text-[10px] tabular-nums text-primary/90", children: [
|
|
18796
18796
|
/* @__PURE__ */ e(wa, { className: "h-2.5 w-2.5" }),
|
|
18797
18797
|
/* @__PURE__ */ e("span", { children: Qe.conditions.length })
|
|
@@ -18846,7 +18846,7 @@ function Hb({
|
|
|
18846
18846
|
}
|
|
18847
18847
|
),
|
|
18848
18848
|
et && a === "metrics" && qt && /* @__PURE__ */ e(
|
|
18849
|
-
|
|
18849
|
+
Ei,
|
|
18850
18850
|
{
|
|
18851
18851
|
open: et,
|
|
18852
18852
|
onOpenChange: xe,
|
|
@@ -18934,7 +18934,7 @@ function Hb({
|
|
|
18934
18934
|
nextStoredFields: _t,
|
|
18935
18935
|
nextSharedFields: yr,
|
|
18936
18936
|
nextSheetFields: ha
|
|
18937
|
-
} =
|
|
18937
|
+
} = Ii({
|
|
18938
18938
|
cardConfig: Le.config,
|
|
18939
18939
|
storedFields: Le.calculatedFields || [],
|
|
18940
18940
|
sharedFields: b,
|
|
@@ -19115,7 +19115,7 @@ function cn({
|
|
|
19115
19115
|
).isValid, [l, c, a, h]), N = (S, T) => {
|
|
19116
19116
|
var O;
|
|
19117
19117
|
!((O = x.config) != null && O.sortByColumns) || x.config.sortByColumns.findIndex(
|
|
19118
|
-
(
|
|
19118
|
+
(I) => I.id === S
|
|
19119
19119
|
) === -1 || u(x.id, S, { direction: T });
|
|
19120
19120
|
};
|
|
19121
19121
|
if (a === "sortBy" && d === !1)
|
|
@@ -19160,7 +19160,7 @@ function cn({
|
|
|
19160
19160
|
zone: a,
|
|
19161
19161
|
index: T,
|
|
19162
19162
|
sortDirection: O,
|
|
19163
|
-
onSortDirectionChange: (
|
|
19163
|
+
onSortDirectionChange: (I) => N(S.id, I),
|
|
19164
19164
|
hasPivotColumns: i,
|
|
19165
19165
|
cardType: h
|
|
19166
19166
|
},
|
|
@@ -19207,7 +19207,7 @@ function tv({
|
|
|
19207
19207
|
);
|
|
19208
19208
|
const g = R((Z) => Z.actions.updateCard), S = R((Z) => Z.actions.updateFrame), T = we((Z) => Z.isVisualEditing), M = we((Z) => Z.selectedSheetId), O = we(
|
|
19209
19209
|
(Z) => Z.actions.updateSheetCalculatedFields
|
|
19210
|
-
),
|
|
19210
|
+
), I = we(
|
|
19211
19211
|
(Z) => Z.actions.updateDashboardCalculatedFields
|
|
19212
19212
|
), k = we(
|
|
19213
19213
|
(Z) => {
|
|
@@ -19320,7 +19320,7 @@ function tv({
|
|
|
19320
19320
|
)
|
|
19321
19321
|
] }),
|
|
19322
19322
|
/* @__PURE__ */ e(
|
|
19323
|
-
|
|
19323
|
+
Ei,
|
|
19324
19324
|
{
|
|
19325
19325
|
open: c,
|
|
19326
19326
|
onOpenChange: m,
|
|
@@ -19358,13 +19358,13 @@ function tv({
|
|
|
19358
19358
|
},
|
|
19359
19359
|
onSaveToDashboard: (Z) => {
|
|
19360
19360
|
if (Z.role !== "metric") return;
|
|
19361
|
-
const { nextSharedFields: te } =
|
|
19361
|
+
const { nextSharedFields: te } = Ii({
|
|
19362
19362
|
storedFields: u.calculatedFields || [],
|
|
19363
19363
|
sharedFields: k,
|
|
19364
19364
|
updatedField: Z,
|
|
19365
19365
|
previousScope: "dashboard"
|
|
19366
19366
|
});
|
|
19367
|
-
|
|
19367
|
+
I(te);
|
|
19368
19368
|
},
|
|
19369
19369
|
cardId: u.id
|
|
19370
19370
|
}
|
|
@@ -19374,19 +19374,19 @@ function tv({
|
|
|
19374
19374
|
function av() {
|
|
19375
19375
|
var S, T, M;
|
|
19376
19376
|
const t = R((O) => {
|
|
19377
|
-
var
|
|
19378
|
-
return (
|
|
19377
|
+
var I;
|
|
19378
|
+
return (I = O.card) == null ? void 0 : I.type;
|
|
19379
19379
|
}), a = t === "kpi", [r, s] = U(a), [o, d] = U(!1), i = R(
|
|
19380
19380
|
(O) => {
|
|
19381
|
-
var
|
|
19382
|
-
return !!((
|
|
19381
|
+
var I;
|
|
19382
|
+
return !!((I = O.card.customCardPreferences) != null && I.url);
|
|
19383
19383
|
}
|
|
19384
19384
|
), l = R((O) => O.card), c = R((O) => O.frame), m = Ta(c, l), { manifest: u } = la(
|
|
19385
19385
|
((S = m == null ? void 0 : m.customCardPreferences) == null ? void 0 : S.url) || ""
|
|
19386
19386
|
), x = (T = u == null ? void 0 : u.visuals) == null ? void 0 : T.find(
|
|
19387
19387
|
(O) => {
|
|
19388
|
-
var
|
|
19389
|
-
return O.name === ((
|
|
19388
|
+
var I;
|
|
19389
|
+
return O.name === ((I = m == null ? void 0 : m.customCardPreferences) == null ? void 0 : I.componentName);
|
|
19390
19390
|
}
|
|
19391
19391
|
), f = oa(m, x) === "multiple" && !!((M = m == null ? void 0 : m.customCardPreferences) != null && M.url), b = !i || f, N = i || f, p = a ? "KPI Settings" : "Chart Settings", g = b && !Ni(t);
|
|
19392
19392
|
return Me(() => {
|
|
@@ -19479,7 +19479,7 @@ function nv({ onEditJoins: t }) {
|
|
|
19479
19479
|
id: u,
|
|
19480
19480
|
operator: m.operator,
|
|
19481
19481
|
condition: d(m.keys)
|
|
19482
|
-
})), l = /* @__PURE__ */ e(
|
|
19482
|
+
})), l = /* @__PURE__ */ e(Et, { children: /* @__PURE__ */ n(wt, { children: [
|
|
19483
19483
|
/* @__PURE__ */ e(St, { asChild: !0, children: /* @__PURE__ */ e(
|
|
19484
19484
|
"button",
|
|
19485
19485
|
{
|
|
@@ -19591,9 +19591,9 @@ function rv({
|
|
|
19591
19591
|
joins: []
|
|
19592
19592
|
}), M = ((C = b == null ? void 0 : b.dataSource) == null ? void 0 : C.selectedEntities) || [], O = (y) => {
|
|
19593
19593
|
p(b.id, Ga(b, y)), f(!1);
|
|
19594
|
-
}, E = () => {
|
|
19595
|
-
p(b.id, Ga(b, void 0)), f(!1);
|
|
19596
19594
|
}, I = () => {
|
|
19595
|
+
p(b.id, Ga(b, void 0)), f(!1);
|
|
19596
|
+
}, E = () => {
|
|
19597
19597
|
f(!1);
|
|
19598
19598
|
}, k = () => {
|
|
19599
19599
|
f(!0);
|
|
@@ -19606,7 +19606,7 @@ function rv({
|
|
|
19606
19606
|
children: [
|
|
19607
19607
|
!g && /* @__PURE__ */ n("div", { className: "flex items-start", children: [
|
|
19608
19608
|
/* @__PURE__ */ e("div", { className: "min-w-0 flex-1", children: /* @__PURE__ */ e(
|
|
19609
|
-
|
|
19609
|
+
Ig,
|
|
19610
19610
|
{
|
|
19611
19611
|
selectedChart: r,
|
|
19612
19612
|
onChartChange: s
|
|
@@ -19648,8 +19648,8 @@ function rv({
|
|
|
19648
19648
|
joinPlan: T,
|
|
19649
19649
|
availableDataSources: M,
|
|
19650
19650
|
onSave: O,
|
|
19651
|
-
onCancel:
|
|
19652
|
-
onRemove:
|
|
19651
|
+
onCancel: E,
|
|
19652
|
+
onRemove: I,
|
|
19653
19653
|
children: /* @__PURE__ */ e("div", {})
|
|
19654
19654
|
}
|
|
19655
19655
|
)
|
|
@@ -19709,7 +19709,7 @@ function ov({
|
|
|
19709
19709
|
groups: []
|
|
19710
19710
|
}
|
|
19711
19711
|
);
|
|
19712
|
-
R((
|
|
19712
|
+
R((I) => I.card.dataSource);
|
|
19713
19713
|
const { filterableFields: o, isLoading: d } = Ss(), i = a || o || [], l = {
|
|
19714
19714
|
id: "default",
|
|
19715
19715
|
qualifiedFieldName: "default",
|
|
@@ -19719,9 +19719,9 @@ function ov({
|
|
|
19719
19719
|
entityId: "default",
|
|
19720
19720
|
entityName: "Default",
|
|
19721
19721
|
entityType: "table"
|
|
19722
|
-
}, c = (
|
|
19723
|
-
const
|
|
19724
|
-
if (k.id ===
|
|
19722
|
+
}, c = (I) => {
|
|
19723
|
+
const E = (k) => {
|
|
19724
|
+
if (k.id === I) {
|
|
19725
19725
|
const C = i[0] || l, y = zt(C.dataType) === "date";
|
|
19726
19726
|
return {
|
|
19727
19727
|
...k,
|
|
@@ -19738,13 +19738,13 @@ function ov({
|
|
|
19738
19738
|
}
|
|
19739
19739
|
return {
|
|
19740
19740
|
...k,
|
|
19741
|
-
groups: k.groups.map(
|
|
19741
|
+
groups: k.groups.map(E)
|
|
19742
19742
|
};
|
|
19743
19743
|
};
|
|
19744
|
-
s(
|
|
19745
|
-
}, m = (
|
|
19746
|
-
const
|
|
19747
|
-
if (k.id ===
|
|
19744
|
+
s(E(r));
|
|
19745
|
+
}, m = (I) => {
|
|
19746
|
+
const E = (k) => {
|
|
19747
|
+
if (k.id === I) {
|
|
19748
19748
|
const C = i[0] || l, y = zt(C.dataType) === "date";
|
|
19749
19749
|
return {
|
|
19750
19750
|
...k,
|
|
@@ -19769,82 +19769,82 @@ function ov({
|
|
|
19769
19769
|
}
|
|
19770
19770
|
return {
|
|
19771
19771
|
...k,
|
|
19772
|
-
groups: k.groups.map(
|
|
19772
|
+
groups: k.groups.map(E)
|
|
19773
19773
|
};
|
|
19774
19774
|
};
|
|
19775
|
-
s(
|
|
19776
|
-
}, u = (
|
|
19777
|
-
const k = (C) => C.id ===
|
|
19775
|
+
s(E(r));
|
|
19776
|
+
}, u = (I, E) => {
|
|
19777
|
+
const k = (C) => C.id === I ? {
|
|
19778
19778
|
...C,
|
|
19779
|
-
conditions: C.conditions.filter((y) => y.id !==
|
|
19779
|
+
conditions: C.conditions.filter((y) => y.id !== E)
|
|
19780
19780
|
} : {
|
|
19781
19781
|
...C,
|
|
19782
19782
|
groups: C.groups.map(k)
|
|
19783
19783
|
};
|
|
19784
19784
|
s(k(r));
|
|
19785
|
-
}, x = (
|
|
19786
|
-
const k = (C) => C.id ===
|
|
19785
|
+
}, x = (I, E) => {
|
|
19786
|
+
const k = (C) => C.id === I ? {
|
|
19787
19787
|
...C,
|
|
19788
|
-
groups: C.groups.filter((y) => y.id !==
|
|
19788
|
+
groups: C.groups.filter((y) => y.id !== E)
|
|
19789
19789
|
} : {
|
|
19790
19790
|
...C,
|
|
19791
19791
|
groups: C.groups.map(k)
|
|
19792
19792
|
};
|
|
19793
19793
|
s(k(r));
|
|
19794
|
-
}, h = (
|
|
19795
|
-
const C = (y) => y.id ===
|
|
19794
|
+
}, h = (I, E, k) => {
|
|
19795
|
+
const C = (y) => y.id === I ? {
|
|
19796
19796
|
...y,
|
|
19797
19797
|
conditions: y.conditions.map(
|
|
19798
|
-
(L) => L.id ===
|
|
19798
|
+
(L) => L.id === E ? k(L) : L
|
|
19799
19799
|
)
|
|
19800
19800
|
} : {
|
|
19801
19801
|
...y,
|
|
19802
19802
|
groups: y.groups.map(C)
|
|
19803
19803
|
};
|
|
19804
19804
|
s(C(r));
|
|
19805
|
-
}, f = (
|
|
19805
|
+
}, f = (I, E, k) => h(I, E, (C) => ({
|
|
19806
19806
|
..."value" in k || "operator" in k || "field" in k ? Cc(C) : C,
|
|
19807
19807
|
...k
|
|
19808
|
-
})), b = (
|
|
19809
|
-
const k = (C) => C.id ===
|
|
19808
|
+
})), b = (I, E, k) => h(I, E, () => k), N = oi(), p = (I, E) => {
|
|
19809
|
+
const k = (C) => C.id === I ? {
|
|
19810
19810
|
...C,
|
|
19811
|
-
logicalOperator:
|
|
19811
|
+
logicalOperator: E
|
|
19812
19812
|
} : {
|
|
19813
19813
|
...C,
|
|
19814
19814
|
groups: C.groups.map(k)
|
|
19815
19815
|
};
|
|
19816
19816
|
s(k(r));
|
|
19817
|
-
}, g = (
|
|
19818
|
-
const k = (C) => C.id ===
|
|
19817
|
+
}, g = (I, E) => {
|
|
19818
|
+
const k = (C) => C.id === I ? {
|
|
19819
19819
|
...C,
|
|
19820
|
-
negate:
|
|
19820
|
+
negate: E
|
|
19821
19821
|
} : {
|
|
19822
19822
|
...C,
|
|
19823
19823
|
groups: C.groups.map(k)
|
|
19824
19824
|
};
|
|
19825
19825
|
s(k(r));
|
|
19826
|
-
}, S = (
|
|
19827
|
-
const C = (y) => y.id ===
|
|
19826
|
+
}, S = (I, E, k) => {
|
|
19827
|
+
const C = (y) => y.id === I ? {
|
|
19828
19828
|
...y,
|
|
19829
|
-
conditions: Wr(y.conditions,
|
|
19829
|
+
conditions: Wr(y.conditions, E, k)
|
|
19830
19830
|
} : {
|
|
19831
19831
|
...y,
|
|
19832
19832
|
groups: y.groups.map(C)
|
|
19833
19833
|
};
|
|
19834
19834
|
s(C(r));
|
|
19835
|
-
}, T = (
|
|
19836
|
-
const C = (y) => y.id ===
|
|
19835
|
+
}, T = (I, E, k) => {
|
|
19836
|
+
const C = (y) => y.id === I ? {
|
|
19837
19837
|
...y,
|
|
19838
|
-
groups: Wr(y.groups,
|
|
19838
|
+
groups: Wr(y.groups, E, k)
|
|
19839
19839
|
} : {
|
|
19840
19840
|
...y,
|
|
19841
19841
|
groups: y.groups.map(C)
|
|
19842
19842
|
};
|
|
19843
19843
|
s(C(r));
|
|
19844
|
-
}, M = (
|
|
19845
|
-
if (!
|
|
19844
|
+
}, M = (I) => {
|
|
19845
|
+
if (!I || I.conditions.length === 0 && I.groups.length === 0)
|
|
19846
19846
|
return "-- No filters defined";
|
|
19847
|
-
const
|
|
19847
|
+
const E = (C) => {
|
|
19848
19848
|
let y = "";
|
|
19849
19849
|
typeof C.field == "object" ? y = C.field.entityName ? `${C.field.entityName}.${C.field.name}` : C.field.name : y = String(C.field);
|
|
19850
19850
|
const L = C.operator;
|
|
@@ -19893,14 +19893,14 @@ function ov({
|
|
|
19893
19893
|
return `${y} ${L} ${w}`;
|
|
19894
19894
|
}
|
|
19895
19895
|
}, k = (C) => {
|
|
19896
|
-
const y = C.conditions.map(
|
|
19896
|
+
const y = C.conditions.map(E), L = C.groups.map(
|
|
19897
19897
|
(v) => k(v)
|
|
19898
19898
|
), w = [...y, ...L].filter(Boolean);
|
|
19899
19899
|
if (w.length === 0) return "";
|
|
19900
19900
|
const D = w.join(` ${C.logicalOperator} `), _ = w.length > 1 ? `(${D})` : D;
|
|
19901
19901
|
return C.negate ? `NOT ${_}` : _;
|
|
19902
19902
|
};
|
|
19903
|
-
return k(
|
|
19903
|
+
return k(I);
|
|
19904
19904
|
}, O = r.conditions.length > 0 || r.groups.length > 0;
|
|
19905
19905
|
return {
|
|
19906
19906
|
currentFilters: r,
|
|
@@ -19926,7 +19926,7 @@ function iv({
|
|
|
19926
19926
|
className: a,
|
|
19927
19927
|
delayDuration: r
|
|
19928
19928
|
}) {
|
|
19929
|
-
return /* @__PURE__ */ e(
|
|
19929
|
+
return /* @__PURE__ */ e(Et, { children: /* @__PURE__ */ n(wt, { delayDuration: r, children: [
|
|
19930
19930
|
/* @__PURE__ */ e(St, { asChild: !0, children: /* @__PURE__ */ e(
|
|
19931
19931
|
"div",
|
|
19932
19932
|
{
|
|
@@ -19951,7 +19951,7 @@ function cv({
|
|
|
19951
19951
|
() => new Set(t ? [t.id] : []),
|
|
19952
19952
|
[t]
|
|
19953
19953
|
), c = t ? Ra(t) : null;
|
|
19954
|
-
return /* @__PURE__ */ n(
|
|
19954
|
+
return /* @__PURE__ */ n(It, { modal: !0, open: d, onOpenChange: i, children: [
|
|
19955
19955
|
/* @__PURE__ */ e(Vt, { asChild: !0, children: /* @__PURE__ */ n(
|
|
19956
19956
|
se,
|
|
19957
19957
|
{
|
|
@@ -20038,7 +20038,7 @@ function dv({
|
|
|
20038
20038
|
}, x = (h) => {
|
|
20039
20039
|
i(h), !h && l.query && l.setQuery("");
|
|
20040
20040
|
};
|
|
20041
|
-
return /* @__PURE__ */ e("div", { className: H("w-full", o), children: /* @__PURE__ */ n(
|
|
20041
|
+
return /* @__PURE__ */ e("div", { className: H("w-full", o), children: /* @__PURE__ */ n(It, { open: d, onOpenChange: x, modal: !0, children: [
|
|
20042
20042
|
/* @__PURE__ */ e(Vt, { asChild: !0, children: /* @__PURE__ */ n(
|
|
20043
20043
|
se,
|
|
20044
20044
|
{
|
|
@@ -20133,7 +20133,7 @@ function uv({
|
|
|
20133
20133
|
)) == null ? void 0 : x.label) == null ? void 0 : h.toString()) ?? a : "", u = (f) => {
|
|
20134
20134
|
i(f), !f && l.query && l.setQuery("");
|
|
20135
20135
|
};
|
|
20136
|
-
return /* @__PURE__ */ n(
|
|
20136
|
+
return /* @__PURE__ */ n(It, { open: d, onOpenChange: u, modal: !0, children: [
|
|
20137
20137
|
/* @__PURE__ */ e(Vt, { asChild: !0, children: /* @__PURE__ */ n(
|
|
20138
20138
|
se,
|
|
20139
20139
|
{
|
|
@@ -20623,7 +20623,7 @@ function yv({
|
|
|
20623
20623
|
} = Ns({ id: t.id }), O = {
|
|
20624
20624
|
transform: Cs.Transform.toString(S),
|
|
20625
20625
|
transition: T
|
|
20626
|
-
},
|
|
20626
|
+
}, I = (k) => {
|
|
20627
20627
|
const { active: C, over: y } = k;
|
|
20628
20628
|
if (y && C.id !== y.id) {
|
|
20629
20629
|
const L = t.conditions.findIndex(
|
|
@@ -20633,7 +20633,7 @@ function yv({
|
|
|
20633
20633
|
);
|
|
20634
20634
|
L !== -1 && w !== -1 && l(t.id, L, w);
|
|
20635
20635
|
}
|
|
20636
|
-
},
|
|
20636
|
+
}, E = (k) => {
|
|
20637
20637
|
const { active: C, over: y } = k;
|
|
20638
20638
|
if (y && C.id !== y.id && r) {
|
|
20639
20639
|
const L = t.groups.findIndex((D) => D.id === C.id), w = t.groups.findIndex((D) => D.id === y.id);
|
|
@@ -20709,7 +20709,7 @@ function yv({
|
|
|
20709
20709
|
})
|
|
20710
20710
|
),
|
|
20711
20711
|
collisionDetection: ja,
|
|
20712
|
-
onDragEnd:
|
|
20712
|
+
onDragEnd: I,
|
|
20713
20713
|
children: /* @__PURE__ */ e(
|
|
20714
20714
|
Ka,
|
|
20715
20715
|
{
|
|
@@ -20744,7 +20744,7 @@ function yv({
|
|
|
20744
20744
|
})
|
|
20745
20745
|
),
|
|
20746
20746
|
collisionDetection: ja,
|
|
20747
|
-
onDragEnd:
|
|
20747
|
+
onDragEnd: E,
|
|
20748
20748
|
children: /* @__PURE__ */ e(
|
|
20749
20749
|
Ka,
|
|
20750
20750
|
{
|
|
@@ -20801,7 +20801,7 @@ function Nv({
|
|
|
20801
20801
|
xa(Zr, {
|
|
20802
20802
|
coordinateGetter: Xr
|
|
20803
20803
|
})
|
|
20804
|
-
), [O,
|
|
20804
|
+
), [O, I] = U(!1), E = (C, y = 0, L) => {
|
|
20805
20805
|
if (y === 0) {
|
|
20806
20806
|
const w = C.conditions.length === 0 && C.groups.length === 0;
|
|
20807
20807
|
return /* @__PURE__ */ n("div", { children: [
|
|
@@ -20867,7 +20867,7 @@ function Nv({
|
|
|
20867
20867
|
items: C.groups.map((D) => D.id),
|
|
20868
20868
|
strategy: za,
|
|
20869
20869
|
children: C.groups.map(
|
|
20870
|
-
(D) =>
|
|
20870
|
+
(D) => E(D, y + 1, C.id)
|
|
20871
20871
|
)
|
|
20872
20872
|
}
|
|
20873
20873
|
)
|
|
@@ -20898,7 +20898,7 @@ function Nv({
|
|
|
20898
20898
|
onAddCondition: c,
|
|
20899
20899
|
onAddGroup: m,
|
|
20900
20900
|
availableFields: i,
|
|
20901
|
-
renderFilterGroup:
|
|
20901
|
+
renderFilterGroup: E,
|
|
20902
20902
|
updateConditionFields: h,
|
|
20903
20903
|
replaceCondition: f
|
|
20904
20904
|
},
|
|
@@ -20910,7 +20910,7 @@ function Nv({
|
|
|
20910
20910
|
l ? /* @__PURE__ */ n("div", { className: "flex items-center justify-center gap-2 py-6 text-[12px] text-muted-foreground", children: [
|
|
20911
20911
|
/* @__PURE__ */ e(Ha, { className: "h-3.5 w-3.5 animate-spin" }),
|
|
20912
20912
|
"Loading columns…"
|
|
20913
|
-
] }) :
|
|
20913
|
+
] }) : E(d),
|
|
20914
20914
|
/* @__PURE__ */ n("div", { className: "mt-3 flex items-center gap-2 border-t border-border/60 pt-3", children: [
|
|
20915
20915
|
/* @__PURE__ */ e(
|
|
20916
20916
|
Ke,
|
|
@@ -20918,7 +20918,7 @@ function Nv({
|
|
|
20918
20918
|
size: "xs",
|
|
20919
20919
|
id: "advanced-mode",
|
|
20920
20920
|
checked: O,
|
|
20921
|
-
onCheckedChange: (C) =>
|
|
20921
|
+
onCheckedChange: (C) => I(C)
|
|
20922
20922
|
}
|
|
20923
20923
|
),
|
|
20924
20924
|
/* @__PURE__ */ e(
|
|
@@ -21034,22 +21034,22 @@ function wv({
|
|
|
21034
21034
|
i(null);
|
|
21035
21035
|
return;
|
|
21036
21036
|
}
|
|
21037
|
-
const T = g.id, M = S.id, O = h(T),
|
|
21037
|
+
const T = g.id, M = S.id, O = h(T), I = h(M) || M;
|
|
21038
21038
|
if (T === M) {
|
|
21039
21039
|
i(null);
|
|
21040
21040
|
return;
|
|
21041
21041
|
}
|
|
21042
|
-
const
|
|
21043
|
-
if (
|
|
21044
|
-
field:
|
|
21042
|
+
const E = O === "source" ? a.find((k) => k.id === T) : O ? r(O).find((k) => k.id === T) : void 0;
|
|
21043
|
+
if (E && O && (o != null && o({
|
|
21044
|
+
field: E,
|
|
21045
21045
|
from: O,
|
|
21046
|
-
to:
|
|
21047
|
-
...M !==
|
|
21046
|
+
to: I,
|
|
21047
|
+
...M !== I ? { beforeId: M } : {}
|
|
21048
21048
|
}))) {
|
|
21049
21049
|
i(null);
|
|
21050
21050
|
return;
|
|
21051
21051
|
}
|
|
21052
|
-
if (
|
|
21052
|
+
if (I === "sortBy") {
|
|
21053
21053
|
if (O === "source") {
|
|
21054
21054
|
const k = a.find((y) => y.id === T);
|
|
21055
21055
|
if (!k) {
|
|
@@ -21074,7 +21074,7 @@ function wv({
|
|
|
21074
21074
|
return;
|
|
21075
21075
|
}
|
|
21076
21076
|
}
|
|
21077
|
-
if (O === "source" &&
|
|
21077
|
+
if (O === "source" && I === "sortBy") {
|
|
21078
21078
|
const k = [...a].find((w) => w.id === T);
|
|
21079
21079
|
if (!k) {
|
|
21080
21080
|
i(null);
|
|
@@ -21106,7 +21106,7 @@ function wv({
|
|
|
21106
21106
|
i(null), s("sortBy", [...C, L]);
|
|
21107
21107
|
return;
|
|
21108
21108
|
}
|
|
21109
|
-
if (O === "source" &&
|
|
21109
|
+
if (O === "source" && I !== "source" && I !== "sortBy") {
|
|
21110
21110
|
const k = [...a].find((v) => v.id === T);
|
|
21111
21111
|
if (!k) {
|
|
21112
21112
|
i(null);
|
|
@@ -21127,14 +21127,14 @@ function wv({
|
|
|
21127
21127
|
y.showError && rp(y.fieldState), i(null);
|
|
21128
21128
|
return;
|
|
21129
21129
|
}
|
|
21130
|
-
const L = r(
|
|
21130
|
+
const L = r(I);
|
|
21131
21131
|
if (Mr(k, L)) {
|
|
21132
21132
|
i(null);
|
|
21133
21133
|
return;
|
|
21134
21134
|
}
|
|
21135
21135
|
const w = jn(
|
|
21136
21136
|
k,
|
|
21137
|
-
|
|
21137
|
+
I,
|
|
21138
21138
|
l.type
|
|
21139
21139
|
);
|
|
21140
21140
|
if (!w.isValid) {
|
|
@@ -21147,10 +21147,10 @@ function wv({
|
|
|
21147
21147
|
}
|
|
21148
21148
|
const D = Dr(
|
|
21149
21149
|
k,
|
|
21150
|
-
|
|
21150
|
+
I,
|
|
21151
21151
|
L
|
|
21152
21152
|
), _ = [...L, D];
|
|
21153
|
-
if (i(null), s(
|
|
21153
|
+
if (i(null), s(I, _), I === "metrics" && t) {
|
|
21154
21154
|
const v = ql(
|
|
21155
21155
|
l,
|
|
21156
21156
|
D,
|
|
@@ -21167,15 +21167,15 @@ function wv({
|
|
|
21167
21167
|
}
|
|
21168
21168
|
return;
|
|
21169
21169
|
}
|
|
21170
|
-
if (O &&
|
|
21171
|
-
const k = r(O), C = r(
|
|
21170
|
+
if (O && I && O !== "source" && I !== "source" && O !== I) {
|
|
21171
|
+
const k = r(O), C = r(I), y = k.find((v) => v.id === T);
|
|
21172
21172
|
if (!y) {
|
|
21173
21173
|
i(null);
|
|
21174
21174
|
return;
|
|
21175
21175
|
}
|
|
21176
21176
|
const L = jn(
|
|
21177
21177
|
y,
|
|
21178
|
-
|
|
21178
|
+
I,
|
|
21179
21179
|
l.type
|
|
21180
21180
|
);
|
|
21181
21181
|
if (!L.isValid) {
|
|
@@ -21188,17 +21188,17 @@ function wv({
|
|
|
21188
21188
|
}
|
|
21189
21189
|
const w = Dr(
|
|
21190
21190
|
y,
|
|
21191
|
-
|
|
21191
|
+
I,
|
|
21192
21192
|
C
|
|
21193
21193
|
);
|
|
21194
|
-
if (i(null),
|
|
21195
|
-
Mr(y, C) || s(
|
|
21194
|
+
if (i(null), I === "sortBy") {
|
|
21195
|
+
Mr(y, C) || s(I, [...C, w]);
|
|
21196
21196
|
return;
|
|
21197
21197
|
}
|
|
21198
21198
|
const D = k.filter(
|
|
21199
21199
|
(v) => v.id !== T
|
|
21200
21200
|
), _ = [...C, w];
|
|
21201
|
-
if (s(O, D), s(
|
|
21201
|
+
if (s(O, D), s(I, _), I === "metrics" && t) {
|
|
21202
21202
|
const v = ql(
|
|
21203
21203
|
l,
|
|
21204
21204
|
w,
|
|
@@ -21215,7 +21215,7 @@ function wv({
|
|
|
21215
21215
|
}
|
|
21216
21216
|
return;
|
|
21217
21217
|
}
|
|
21218
|
-
if (O &&
|
|
21218
|
+
if (O && I && O === I && O !== "source") {
|
|
21219
21219
|
const k = r(O), C = k.findIndex((L) => L.id === T), y = k.findIndex((L) => L.id === M);
|
|
21220
21220
|
if (C !== y) {
|
|
21221
21221
|
const L = Wr(k, C, y);
|
|
@@ -21393,9 +21393,9 @@ function Dv(t, a) {
|
|
|
21393
21393
|
localStorage.setItem(t, JSON.stringify(r));
|
|
21394
21394
|
}, [r, t]), [r, s];
|
|
21395
21395
|
}
|
|
21396
|
-
const
|
|
21397
|
-
function
|
|
21398
|
-
return Dv(
|
|
21396
|
+
const Ev = "semaphor-split-view-enabled";
|
|
21397
|
+
function Iv() {
|
|
21398
|
+
return Dv(Ev, !0);
|
|
21399
21399
|
}
|
|
21400
21400
|
function Av({
|
|
21401
21401
|
showInfoTab: t
|
|
@@ -21483,9 +21483,9 @@ function Rv({
|
|
|
21483
21483
|
(xe) => xe.inlineFilterValuesMap[(s == null ? void 0 : s.id) || ""]
|
|
21484
21484
|
), c = R(
|
|
21485
21485
|
(xe) => xe.actions.removeCardInlineFilterValue
|
|
21486
|
-
), m = we((xe) => xe.filterValues), u = we((xe) => xe.selectedSheetId), { updateCardConfig: x, setCard: h, updateCardInFrame: f, setShowAIDialog: b } = De(), N = R((xe) => xe.showAIDialog), p = R((xe) => xe.isDevMode), g = we((xe) => xe.isVisualEditing), [S, T] = U(!1), [M, O] = U(!1), [
|
|
21486
|
+
), m = we((xe) => xe.filterValues), u = we((xe) => xe.selectedSheetId), { updateCardConfig: x, setCard: h, updateCardInFrame: f, setShowAIDialog: b } = De(), N = R((xe) => xe.showAIDialog), p = R((xe) => xe.isDevMode), g = we((xe) => xe.isVisualEditing), [S, T] = U(!1), [M, O] = U(!1), [I, E] = U(
|
|
21487
21487
|
null
|
|
21488
|
-
), { config: k } = ls(ms).tokenProps, C = (k == null ? void 0 : k.showInfoTab) !== !1, y = (k == null ? void 0 : k.showQueryDebugTools) !== !1, [L, w] =
|
|
21488
|
+
), { config: k } = ls(ms).tokenProps, C = (k == null ? void 0 : k.showInfoTab) !== !1, y = (k == null ? void 0 : k.showQueryDebugTools) !== !1, [L, w] = Iv();
|
|
21489
21489
|
R(
|
|
21490
21490
|
(xe) => {
|
|
21491
21491
|
var je;
|
|
@@ -21753,7 +21753,7 @@ function Rv({
|
|
|
21753
21753
|
generatedSql: v == null ? void 0 : v.sql
|
|
21754
21754
|
}
|
|
21755
21755
|
);
|
|
21756
|
-
|
|
21756
|
+
E(xe), O(!0);
|
|
21757
21757
|
},
|
|
21758
21758
|
onOpenInEditor: () => {
|
|
21759
21759
|
b(!0), setTimeout(() => {
|
|
@@ -21791,12 +21791,12 @@ function Rv({
|
|
|
21791
21791
|
matrix: Te
|
|
21792
21792
|
}
|
|
21793
21793
|
),
|
|
21794
|
-
|
|
21794
|
+
I && /* @__PURE__ */ e(
|
|
21795
21795
|
fs,
|
|
21796
21796
|
{
|
|
21797
21797
|
open: M,
|
|
21798
21798
|
onOpenChange: O,
|
|
21799
|
-
feedbackData:
|
|
21799
|
+
feedbackData: I
|
|
21800
21800
|
}
|
|
21801
21801
|
)
|
|
21802
21802
|
] })
|
|
@@ -21860,8 +21860,8 @@ function Vv() {
|
|
|
21860
21860
|
);
|
|
21861
21861
|
const { addCard: N, removeCard: p, updateCard: g, setActiveCard: S, updateFilters: T, clearFilters: M } = De(), {
|
|
21862
21862
|
columnFields: O = [],
|
|
21863
|
-
scopedFields:
|
|
21864
|
-
filterableFields:
|
|
21863
|
+
scopedFields: I = [],
|
|
21864
|
+
filterableFields: E = []
|
|
21865
21865
|
} = Ss(), k = er(
|
|
21866
21866
|
xa(tr, {
|
|
21867
21867
|
activationConstraint: {
|
|
@@ -21874,9 +21874,9 @@ function Vv() {
|
|
|
21874
21874
|
moveField: w,
|
|
21875
21875
|
removeField: D,
|
|
21876
21876
|
resetFields: _
|
|
21877
|
-
} = Mi(C,
|
|
21877
|
+
} = Mi(C, I), { activeField: v, handleDragStart: V, handleDragEnd: Y } = wv({
|
|
21878
21878
|
activeCardId: f.activeCardId,
|
|
21879
|
-
sourceFields:
|
|
21879
|
+
sourceFields: I,
|
|
21880
21880
|
getFieldsForContainer: y,
|
|
21881
21881
|
setFieldsForContainer: L,
|
|
21882
21882
|
moveField: w
|
|
@@ -21884,7 +21884,7 @@ function Vv() {
|
|
|
21884
21884
|
Q && T($, Q);
|
|
21885
21885
|
}, A = ($) => {
|
|
21886
21886
|
M($);
|
|
21887
|
-
}, P =
|
|
21887
|
+
}, P = E, j = ($) => {
|
|
21888
21888
|
if (!$) return 0;
|
|
21889
21889
|
let Q = $.conditions.length;
|
|
21890
21890
|
return $.groups.forEach((re) => {
|
|
@@ -21973,9 +21973,9 @@ function Vv() {
|
|
|
21973
21973
|
);
|
|
21974
21974
|
}
|
|
21975
21975
|
function Yv({ authToken: t, onSave: a, onClose: r }) {
|
|
21976
|
-
const s =
|
|
21977
|
-
(
|
|
21978
|
-
c("editor",
|
|
21976
|
+
const s = Ie(null), o = R((E) => E.showAIDialog), d = R((E) => E.isDevMode), i = Er((E) => E.setFullscreen), l = Er((E) => E.setPanelOpen), c = Er((E) => E.setContainer), m = xp("editor"), u = bp(), x = vp("editor"), h = u === "editor", f = hs(), b = Re(
|
|
21977
|
+
(E) => {
|
|
21978
|
+
c("editor", E);
|
|
21979
21979
|
},
|
|
21980
21980
|
[c]
|
|
21981
21981
|
), { setAuthToken: N } = To(), { setShowAIDialog: p, setOnSave: g, setOnClose: S } = De(), { setActiveAssistantType: T } = os();
|
|
@@ -21984,8 +21984,8 @@ function Yv({ authToken: t, onSave: a, onClose: r }) {
|
|
|
21984
21984
|
}, [a, g, r, S]), Me(() => {
|
|
21985
21985
|
t && t.accessToken && N(t);
|
|
21986
21986
|
}, [t, N]), Me(() => {
|
|
21987
|
-
var
|
|
21988
|
-
o ? ((
|
|
21987
|
+
var E, k;
|
|
21988
|
+
o ? ((E = s.current) == null || E.resize(40), l("editor", !0), T("editor")) : ((k = s.current) == null || k.resize(0), l("editor", !1), u === "editor" && i(null), T(null));
|
|
21989
21989
|
}, [
|
|
21990
21990
|
o,
|
|
21991
21991
|
l,
|
|
@@ -21993,9 +21993,9 @@ function Yv({ authToken: t, onSave: a, onClose: r }) {
|
|
|
21993
21993
|
i,
|
|
21994
21994
|
u
|
|
21995
21995
|
]);
|
|
21996
|
-
function M(
|
|
21996
|
+
function M(E) {
|
|
21997
21997
|
var k;
|
|
21998
|
-
|
|
21998
|
+
E < 1 ? (p(!1), l("editor", !1), u === "editor" && i(null), T(null), (k = s.current) == null || k.resize(0)) : (o || (p(!0), T("editor")), m.isOpen || l("editor", !0));
|
|
21999
21999
|
}
|
|
22000
22000
|
function O() {
|
|
22001
22001
|
return /* @__PURE__ */ n(Ce, { children: [
|
|
@@ -22012,7 +22012,7 @@ function Yv({ authToken: t, onSave: a, onClose: r }) {
|
|
|
22012
22012
|
),
|
|
22013
22013
|
direction: "horizontal",
|
|
22014
22014
|
children: [
|
|
22015
|
-
/* @__PURE__ */ e(Nt, { className: "min-w-[510px] rounded-none", children: /* @__PURE__ */ e(
|
|
22015
|
+
/* @__PURE__ */ e(Nt, { className: "min-w-[510px] rounded-none", children: /* @__PURE__ */ e(Eb, {}) }),
|
|
22016
22016
|
/* @__PURE__ */ e(Ua, { disabled: !o }),
|
|
22017
22017
|
/* @__PURE__ */ e(
|
|
22018
22018
|
Nt,
|
|
@@ -22026,7 +22026,7 @@ function Yv({ authToken: t, onSave: a, onClose: r }) {
|
|
|
22026
22026
|
yo,
|
|
22027
22027
|
{
|
|
22028
22028
|
isFullscreen: h,
|
|
22029
|
-
onFullscreenChange: (
|
|
22029
|
+
onFullscreenChange: (E) => i(E ? "editor" : null),
|
|
22030
22030
|
fullscreenContainer: x
|
|
22031
22031
|
}
|
|
22032
22032
|
) })
|
|
@@ -22048,7 +22048,7 @@ function Yv({ authToken: t, onSave: a, onClose: r }) {
|
|
|
22048
22048
|
] })
|
|
22049
22049
|
] });
|
|
22050
22050
|
}
|
|
22051
|
-
function
|
|
22051
|
+
function I() {
|
|
22052
22052
|
return /* @__PURE__ */ n("div", { className: "relative flex h-full grow", children: [
|
|
22053
22053
|
/* @__PURE__ */ n(
|
|
22054
22054
|
Ca,
|
|
@@ -22074,7 +22074,7 @@ function Yv({ authToken: t, onSave: a, onClose: r }) {
|
|
|
22074
22074
|
yo,
|
|
22075
22075
|
{
|
|
22076
22076
|
isFullscreen: h,
|
|
22077
|
-
onFullscreenChange: (
|
|
22077
|
+
onFullscreenChange: (E) => i(E ? "editor" : null),
|
|
22078
22078
|
fullscreenContainer: x
|
|
22079
22079
|
}
|
|
22080
22080
|
) })
|
|
@@ -22111,7 +22111,7 @@ function Yv({ authToken: t, onSave: a, onClose: r }) {
|
|
|
22111
22111
|
className: "isolate flex h-full grow",
|
|
22112
22112
|
"data-content": "editor-panel",
|
|
22113
22113
|
style: f.dashboardContainerStyle,
|
|
22114
|
-
children:
|
|
22114
|
+
children: I()
|
|
22115
22115
|
}
|
|
22116
22116
|
) }) })
|
|
22117
22117
|
);
|
|
@@ -22129,13 +22129,13 @@ function my() {
|
|
|
22129
22129
|
}
|
|
22130
22130
|
const b = t ? (S = a == null ? void 0 : a.sheets) == null ? void 0 : S.some(
|
|
22131
22131
|
(O) => {
|
|
22132
|
-
var
|
|
22133
|
-
return O.id === t && ((
|
|
22132
|
+
var I;
|
|
22133
|
+
return O.id === t && ((I = O.frames) == null ? void 0 : I.some((E) => E.id === f.id));
|
|
22134
22134
|
}
|
|
22135
22135
|
) : !1, N = (M = (T = a == null ? void 0 : a.sheets) == null ? void 0 : T.find(
|
|
22136
22136
|
(O) => {
|
|
22137
|
-
var
|
|
22138
|
-
return (
|
|
22137
|
+
var I;
|
|
22138
|
+
return (I = O.frames) == null ? void 0 : I.some((E) => E.id === f.id);
|
|
22139
22139
|
}
|
|
22140
22140
|
)) == null ? void 0 : M.id, p = b ? t : N || null;
|
|
22141
22141
|
if (!p) return;
|