react-semaphor 0.1.173 → 0.1.174
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/{dashboard-controls-ByOgk4Je.js → dashboard-controls-BdFhbpoS.js} +6 -6
- package/dist/chunks/{dashboard-controls-B6WiXn_t.js → dashboard-controls-Bxjvkywu.js} +354 -352
- package/dist/chunks/{dashboard-json--V83knyP.js → dashboard-json-BCH4SQkg.js} +1 -1
- package/dist/chunks/{dashboard-json-BhyQb37-.js → dashboard-json-ClK3yCs7.js} +1 -1
- package/dist/chunks/{edit-dashboard-visual-Cvaa7yWQ.js → edit-dashboard-visual-BEAKONcQ.js} +7 -7
- package/dist/chunks/{edit-dashboard-visual-BBlXAIn6.js → edit-dashboard-visual-CSI-cZoT.js} +421 -420
- package/dist/chunks/{editor-action-buttons-FLYhmv28.js → editor-action-buttons-BaHzz3CT.js} +1 -1
- package/dist/chunks/{editor-action-buttons-CY7ioULi.js → editor-action-buttons-DIFwpB2w.js} +2 -2
- package/dist/chunks/{index-B9kLqSMl.js → index-BAb30JIE.js} +34 -34
- package/dist/chunks/{index-CkciFx-7.js → index-CtuIHKSY.js} +2188 -2178
- package/dist/chunks/{resource-management-panel-NzY4o_yO.js → resource-management-panel-Cs7tkTxZ.js} +1 -1
- package/dist/chunks/{resource-management-panel-DzIeyziH.js → resource-management-panel-DRMNQIkI.js} +3 -3
- package/dist/chunks/{schedule-dashboard-D6bnu51y.js → schedule-dashboard-Bj4mXU5g.js} +3 -3
- package/dist/chunks/{schedule-dashboard-CWqTX2_E.js → schedule-dashboard-CInkuI61.js} +1 -1
- package/dist/chunks/{use-role-aware-display-preferences-CHeIMGXz.js → use-role-aware-display-preferences-BGTLQ_rf.js} +1 -1
- package/dist/chunks/{use-role-aware-display-preferences-vNHoh1Xk.js → use-role-aware-display-preferences-DgSkQ7I0.js} +1 -1
- package/dist/chunks/{use-visual-utils-CK6cVt23.js → use-visual-utils-BmwT7aG_.js} +1 -1
- package/dist/chunks/{use-visual-utils-BswYPLMe.js → use-visual-utils-CeBDoiB8.js} +1 -1
- package/dist/dashboard/index.cjs +1 -1
- package/dist/dashboard/index.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +4 -4
- package/dist/surfboard/index.cjs +1 -1
- package/dist/surfboard/index.js +1 -1
- package/package.json +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsxs as a, jsx as e, Fragment as ce } from "react/jsx-runtime";
|
|
2
|
-
import { l as me, t as ut, m as ne, n as M,
|
|
2
|
+
import { l as me, t as ut, m as ne, n as M, cd as ca, aK as L, ce as H, cf as Y, cg as W, ch as Q, ci as B, cj as fe, B as K, bc as Ye, ck as Ta, cl as bs, cm as Ns, cn as vs, co as ys, cp as Aa, G as st, X as Ae, cq as cn, bh as dn, aF as St, aG as kt, aH as Tt, aI as At, aJ as jt, s as Fe, bv as je, br as $e, bs as Ie, bt as Me, cr as $n, cs as un, u as ye, aO as ba, ct as $t, bm as ta, c as Z, aN as Ue, cu as Cs, ba as ws, cv as Cl, cw as wl, cx as Sl, cy as sa, cz as kl, cA as Ss, cB as Tl, bF as Al, cC as El, cD as ks, cE as Dl, cF as mn, cG as Ol, cH as pt, cI as it, cJ as hn, p as Il, cK as Ml, cL as an, cM as Et, cN as Le, cO as Dt, L as qt, cP as Rl, cQ as Na, cR as va, cS as ya, cT as Ts, ca as Kt, aR as Ea, cU as da, cV as pn, cW as ua, bn as fn, cX as ft, R as Ll, cY as Fl, b1 as Pl, cZ as at, c_ as mt, c$ as Vl, d0 as ht, e as Bl, aX as gn, o as As, d1 as xn, d2 as zl, d3 as Es, d4 as Ds, d5 as Gt, c7 as qa, d6 as jl, d7 as $l, d8 as Os, d9 as ql, da as Kl, db as Gl, dc as Da, dd as Ul, de as _l, df as qn, dg as Jl, E as Oa, y as bn, dh as Hl, di as Nn, bH as Yl, K as Oe, dj as Wl, dk as Ql, bW as Ia, bX as Ma, bY as nt, bZ as ga, dl as Xl, bu as Zl, dm as Is, dn as er, dp as tr, bB as Ra, aL as ze, P as _e, A as Je, dq as ar, H as He, aS as vn, aT as yn, aV as Cn, bJ as Ms, bg as Bt, dr as ot, ds as Ot, dt as It, du as gt, dv as Ut, dw as nr, ag as sr, dx as lr, aQ as zt, dy as rr, dz as Rs, dA as ir, dB as or, dC as cr, dD as dr, dE as ur, dF as mr, dG as hr, dH as Ls, dI as wn, bI as ge, dJ as _t, dK as ra, dL as pr, dM as fr, dN as Jt, dO as xe, dP as be, dQ as Ne, dR as gr, dS as xr, dT as ct, dU as pa, dV as Kn, dW as br, cb as Fs, au as Ps, dX as Nr, dY as vr, dZ as yr, I as Ht, J as Yt, M as Wt, N as Qt, O as Xt, Q as Zt, d_ as Cr, d$ as wr, e0 as Gn, e1 as Sr, C as aa, e2 as Te, e3 as kr, e4 as Ka, e5 as Un, e6 as Ve, e7 as Tr, e8 as Ar, e9 as Er, ea as Dr, eb as ma, ec as Or, ed as Ga, ee as Vs, ef as Ir, eg as Mr, eh as Rr, ei as Ca, ej as Lr, ek as Fr, el as wt, bb as Sn, em as kn, en as Bs, eo as Pr, bz as zs, ep as Vr, eq as _n, aA as La, T as Br, er as zr, es as jr, et as $r, eu as qr, ev as Kr, aq as Jn, ew as Hn, ex as Gr, ey as Ur, ez as js, eA as _r, eB as $s, eC as Jr, eD as Hr, eE as Yr, eF as Wr, eG as Qr, eH as Xr, eI as Zr, eJ as ei, eK as ti, eL as ai, eM as qs, eN as ni, eO as si, eP as li, eQ as ri, eR as ii, eS as oi, eT as ci, eU as Ks, aU as di, eV as ui, eW as Yn, eX as Wn, aa as mi, eY as hi, eZ as pi, e_ as fi, e$ as gi, f0 as Gs, f1 as xi, bP as Us, f2 as Ee, aM as bi, ac as wa, f3 as Ni, bQ as vi, f4 as yi, f5 as Fa, f6 as _s, f7 as Pa, f8 as Ci, bC as wi, f9 as Qn, fa as Si, fb as ki, fc as Ti, fd as xa, fe as Ai, ff as Tn, fg as Ei, fh as Di, fi as Sa, fj as Oi, fk as Ii, fl as Mi, fm as ia, fn as dt, fo as nn, fp as sn, fq as oa, fr as Js, fs as ea, ft as Ri, fu as Ua, fv as _a, fw as Li, fx as Ja, fy as Fi, fz as Xn, fA as Pi, fB as Vi, fC as Bi, fD as zi, aW as Pe, fE as ji, fF as $i, fG as qi, fH as Ki, fI as Va, bj as Ba, fJ as Zn, fK as Hs, c3 as Ha, fL as Gi, fM as Ui, fN as _i, F as Ji } from "./index-CtuIHKSY.js";
|
|
3
3
|
import * as ln from "react";
|
|
4
4
|
import rn, { useState as q, useEffect as ue, useRef as We, useCallback as Ge, useContext as An, useMemo as Ce } from "react";
|
|
5
|
-
import { d as En } from "./editor-action-buttons-
|
|
5
|
+
import { d as En } from "./editor-action-buttons-DIFwpB2w.js";
|
|
6
6
|
import { createPortal as Hi } from "react-dom";
|
|
7
7
|
/**
|
|
8
8
|
* @license lucide-react v0.453.0 - ISC
|
|
@@ -479,7 +479,7 @@ function Co({
|
|
|
479
479
|
availableDataSources: s
|
|
480
480
|
}) {
|
|
481
481
|
const [n, r] = q(t), [i, d] = q(/* @__PURE__ */ new Set()), l = () => {
|
|
482
|
-
const T = n.joins.length > 0 ? Math.max(...n.joins.map((w) => w.sequence)) + 1 : 1,
|
|
482
|
+
const T = n.joins.length > 0 ? Math.max(...n.joins.map((w) => w.sequence)) + 1 : 1, y = {
|
|
483
483
|
id: `join-${Date.now()}`,
|
|
484
484
|
source: {
|
|
485
485
|
type: "table",
|
|
@@ -505,18 +505,18 @@ function Co({
|
|
|
505
505
|
};
|
|
506
506
|
r({
|
|
507
507
|
...n,
|
|
508
|
-
joins: [...n.joins,
|
|
509
|
-
}), d(/* @__PURE__ */ new Set([...i,
|
|
508
|
+
joins: [...n.joins, y]
|
|
509
|
+
}), d(/* @__PURE__ */ new Set([...i, y.id]));
|
|
510
510
|
}, c = (T) => {
|
|
511
511
|
r({
|
|
512
512
|
...n,
|
|
513
|
-
joins: n.joins.filter((
|
|
514
|
-
}), d(new Set([...i].filter((
|
|
515
|
-
}, o = (T,
|
|
513
|
+
joins: n.joins.filter((y) => y.id !== T)
|
|
514
|
+
}), d(new Set([...i].filter((y) => y !== T)));
|
|
515
|
+
}, o = (T, y) => {
|
|
516
516
|
var S, O, V, D, R;
|
|
517
517
|
const w = n.joins.find((A) => A.id === T);
|
|
518
518
|
if (!w) return;
|
|
519
|
-
const E = { ...w, ...
|
|
519
|
+
const E = { ...w, ...y };
|
|
520
520
|
if ((S = E.source) != null && S.name && ((O = E.target) != null && O.name) && E.source.name === E.target.name) {
|
|
521
521
|
ut.error("Self-joins are not yet supported", {
|
|
522
522
|
description: `Joining ${E.source.name} to itself is not currently supported. Please select a different target table.`
|
|
@@ -591,10 +591,10 @@ function Co({
|
|
|
591
591
|
removeJoin: c,
|
|
592
592
|
updateJoin: o,
|
|
593
593
|
moveJoinUp: (T) => {
|
|
594
|
-
const
|
|
595
|
-
if (
|
|
596
|
-
const w = [...n.joins], E = { ...w[
|
|
597
|
-
w[
|
|
594
|
+
const y = n.joins.findIndex((w) => w.id === T);
|
|
595
|
+
if (y > 0) {
|
|
596
|
+
const w = [...n.joins], E = { ...w[y] }, P = { ...w[y - 1] };
|
|
597
|
+
w[y] = P, w[y - 1] = E, w.forEach((S, O) => {
|
|
598
598
|
S.sequence = O + 1;
|
|
599
599
|
});
|
|
600
600
|
const N = {
|
|
@@ -605,10 +605,10 @@ function Co({
|
|
|
605
605
|
}
|
|
606
606
|
},
|
|
607
607
|
moveJoinDown: (T) => {
|
|
608
|
-
const
|
|
609
|
-
if (
|
|
610
|
-
const w = [...n.joins], E = { ...w[
|
|
611
|
-
w[
|
|
608
|
+
const y = n.joins.findIndex((w) => w.id === T);
|
|
609
|
+
if (y < n.joins.length - 1) {
|
|
610
|
+
const w = [...n.joins], E = { ...w[y] }, P = { ...w[y + 1] };
|
|
611
|
+
w[y] = P, w[y + 1] = E, w.forEach((S, O) => {
|
|
612
612
|
S.sequence = O + 1;
|
|
613
613
|
});
|
|
614
614
|
const N = {
|
|
@@ -619,29 +619,29 @@ function Co({
|
|
|
619
619
|
}
|
|
620
620
|
},
|
|
621
621
|
toggleJoinExpansion: (T) => {
|
|
622
|
-
const
|
|
623
|
-
|
|
622
|
+
const y = new Set(i);
|
|
623
|
+
y.has(T) ? y.delete(T) : y.add(T), d(y);
|
|
624
624
|
},
|
|
625
625
|
getAvailableSourceEntities: (T) => {
|
|
626
626
|
if (n.joins.length === 0) return s;
|
|
627
|
-
const
|
|
627
|
+
const y = n.joins.findIndex(
|
|
628
628
|
(E) => E.id === T
|
|
629
629
|
);
|
|
630
|
-
if (
|
|
630
|
+
if (y === 0)
|
|
631
631
|
return s.filter(
|
|
632
632
|
(E) => E.name === n.baseEntity.name
|
|
633
633
|
);
|
|
634
634
|
const w = /* @__PURE__ */ new Set();
|
|
635
|
-
return n.baseEntity.name && w.add(n.baseEntity.name), n.joins.slice(0,
|
|
635
|
+
return n.baseEntity.name && w.add(n.baseEntity.name), n.joins.slice(0, y).forEach((E) => {
|
|
636
636
|
w.add(E.source.name), w.add(E.target.name);
|
|
637
637
|
}), s.filter((E) => w.has(E.name));
|
|
638
638
|
},
|
|
639
|
-
getAvailableTargetEntities: (T) => s.filter((
|
|
639
|
+
getAvailableTargetEntities: (T) => s.filter((y) => y.name !== T),
|
|
640
640
|
addJoinKeyGroup: (T) => {
|
|
641
|
-
const
|
|
642
|
-
if (!
|
|
641
|
+
const y = n.joins.find((E) => E.id === T);
|
|
642
|
+
if (!y) return;
|
|
643
643
|
const w = [
|
|
644
|
-
...
|
|
644
|
+
...y.joinKeyGroups,
|
|
645
645
|
{
|
|
646
646
|
id: "group-" + Date.now() + "-" + Math.random().toString(36).substr(2, 9),
|
|
647
647
|
operator: "AND",
|
|
@@ -650,19 +650,19 @@ function Co({
|
|
|
650
650
|
];
|
|
651
651
|
o(T, { joinKeyGroups: w });
|
|
652
652
|
},
|
|
653
|
-
updateGroupOperator: (T,
|
|
653
|
+
updateGroupOperator: (T, y, w) => {
|
|
654
654
|
const E = n.joins.find((N) => N.id === T);
|
|
655
655
|
if (!E) return;
|
|
656
656
|
const P = [...E.joinKeyGroups];
|
|
657
|
-
P[
|
|
657
|
+
P[y] = { ...P[y], operator: w }, o(T, { joinKeyGroups: P });
|
|
658
658
|
},
|
|
659
|
-
removeJoinKeyGroup: (T,
|
|
659
|
+
removeJoinKeyGroup: (T, y) => {
|
|
660
660
|
const w = n.joins.find((P) => P.id === T);
|
|
661
661
|
if (!w) return;
|
|
662
662
|
const E = [...w.joinKeyGroups];
|
|
663
|
-
E.splice(
|
|
663
|
+
E.splice(y, 1), o(T, { joinKeyGroups: E });
|
|
664
664
|
},
|
|
665
|
-
addJoinKey: (T,
|
|
665
|
+
addJoinKey: (T, y) => {
|
|
666
666
|
const w = n.joins.find((O) => O.id === T);
|
|
667
667
|
if (!w) return;
|
|
668
668
|
const E = s.find(
|
|
@@ -693,50 +693,50 @@ function Co({
|
|
|
693
693
|
},
|
|
694
694
|
operator: "="
|
|
695
695
|
};
|
|
696
|
-
N[
|
|
697
|
-
...N[
|
|
698
|
-
keys: [...N[
|
|
696
|
+
N[y] = {
|
|
697
|
+
...N[y],
|
|
698
|
+
keys: [...N[y].keys, S]
|
|
699
699
|
}, o(T, { joinKeyGroups: N });
|
|
700
700
|
},
|
|
701
|
-
updateJoinKey: (T,
|
|
701
|
+
updateJoinKey: (T, y, w, E, P) => {
|
|
702
702
|
const N = n.joins.find((R) => R.id === T);
|
|
703
703
|
if (!N) return;
|
|
704
704
|
const S = s.find(
|
|
705
705
|
(R) => R.name === N.source.name
|
|
706
706
|
), O = s.find(
|
|
707
707
|
(R) => R.name === N.target.name
|
|
708
|
-
), V = [...N.joinKeyGroups], D = V[
|
|
709
|
-
E === "sourceColumnName" && S ? V[
|
|
708
|
+
), V = [...N.joinKeyGroups], D = V[y].keys[w];
|
|
709
|
+
E === "sourceColumnName" && S ? V[y].keys[w] = {
|
|
710
710
|
...D,
|
|
711
711
|
source: {
|
|
712
712
|
...D.source,
|
|
713
713
|
name: P
|
|
714
714
|
}
|
|
715
|
-
} : E === "targetColumnName" && O ? V[
|
|
715
|
+
} : E === "targetColumnName" && O ? V[y].keys[w] = {
|
|
716
716
|
...D,
|
|
717
717
|
target: {
|
|
718
718
|
...D.target,
|
|
719
719
|
name: P
|
|
720
720
|
}
|
|
721
|
-
} : E === "operator" && (V[
|
|
721
|
+
} : E === "operator" && (V[y].keys[w] = {
|
|
722
722
|
...D,
|
|
723
723
|
operator: P
|
|
724
724
|
}), o(T, { joinKeyGroups: V });
|
|
725
725
|
},
|
|
726
|
-
removeJoinKey: (T,
|
|
726
|
+
removeJoinKey: (T, y, w) => {
|
|
727
727
|
const E = n.joins.find((N) => N.id === T);
|
|
728
728
|
if (!E) return;
|
|
729
729
|
const P = [...E.joinKeyGroups];
|
|
730
|
-
P[
|
|
730
|
+
P[y].keys.splice(w, 1), o(T, { joinKeyGroups: P });
|
|
731
731
|
},
|
|
732
732
|
generateSQLPreview: () => {
|
|
733
733
|
const T = [...n.joins].sort(
|
|
734
734
|
(E, P) => E.sequence - P.sequence
|
|
735
|
-
),
|
|
736
|
-
if (!
|
|
735
|
+
), y = n.baseEntity;
|
|
736
|
+
if (!y.name)
|
|
737
737
|
return "SELECT * FROM table -- Please select a base entity";
|
|
738
738
|
let w = `SELECT *
|
|
739
|
-
FROM ${
|
|
739
|
+
FROM ${y.name}`;
|
|
740
740
|
return T.forEach((E) => {
|
|
741
741
|
const P = s.find(
|
|
742
742
|
(O) => O.name === E.target.name
|
|
@@ -795,9 +795,9 @@ function wo({
|
|
|
795
795
|
addJoinKeyGroup: v,
|
|
796
796
|
updateGroupOperator: F,
|
|
797
797
|
removeJoinKeyGroup: I,
|
|
798
|
-
addJoinKey:
|
|
798
|
+
addJoinKey: C,
|
|
799
799
|
updateJoinKey: T,
|
|
800
|
-
removeJoinKey:
|
|
800
|
+
removeJoinKey: y,
|
|
801
801
|
generateSQLPreview: w,
|
|
802
802
|
isValidConfiguration: E
|
|
803
803
|
} = Co({
|
|
@@ -1306,7 +1306,7 @@ function wo({
|
|
|
1306
1306
|
variant: "ghost",
|
|
1307
1307
|
size: "sm",
|
|
1308
1308
|
className: "self-center",
|
|
1309
|
-
onClick: () =>
|
|
1309
|
+
onClick: () => y(
|
|
1310
1310
|
N.id,
|
|
1311
1311
|
R,
|
|
1312
1312
|
z
|
|
@@ -1325,7 +1325,7 @@ function wo({
|
|
|
1325
1325
|
variant: "outline",
|
|
1326
1326
|
size: "sm",
|
|
1327
1327
|
className: "mt-2",
|
|
1328
|
-
onClick: () =>
|
|
1328
|
+
onClick: () => C(N.id, R),
|
|
1329
1329
|
children: [
|
|
1330
1330
|
/* @__PURE__ */ e(Ye, { className: "mr-1 h-3 w-3" }),
|
|
1331
1331
|
" Add Condition"
|
|
@@ -1520,18 +1520,18 @@ function ts({
|
|
|
1520
1520
|
h(!1);
|
|
1521
1521
|
}, f = () => {
|
|
1522
1522
|
const I = [...l.joins].sort(
|
|
1523
|
-
(
|
|
1524
|
-
),
|
|
1525
|
-
if (!
|
|
1523
|
+
(y, w) => y.sequence - w.sequence
|
|
1524
|
+
), C = l.baseEntity;
|
|
1525
|
+
if (!C.name)
|
|
1526
1526
|
return "SELECT * FROM table -- Please select a base entity";
|
|
1527
1527
|
let T = `SELECT *
|
|
1528
|
-
FROM ${
|
|
1529
|
-
return I.forEach((
|
|
1528
|
+
FROM ${C.name}`;
|
|
1529
|
+
return I.forEach((y) => {
|
|
1530
1530
|
const w = p.find(
|
|
1531
|
-
(N) => N.name ===
|
|
1531
|
+
(N) => N.name === y.target.name
|
|
1532
1532
|
);
|
|
1533
1533
|
if (!w) return;
|
|
1534
|
-
const E =
|
|
1534
|
+
const E = y.joinKeyGroups.filter((N) => N.keys && N.keys.length > 0).map((N) => {
|
|
1535
1535
|
const S = N.keys.filter(
|
|
1536
1536
|
(O) => {
|
|
1537
1537
|
var V, D, R, A;
|
|
@@ -1543,7 +1543,7 @@ FROM ${y.name}`;
|
|
|
1543
1543
|
return S.length > 1 ? `(${S.join(` ${N.operator} `)})` : S[0];
|
|
1544
1544
|
}).filter(Boolean), P = E.length > 1 ? E.join(" OR ") : E[0] || "condition_here";
|
|
1545
1545
|
T += `
|
|
1546
|
-
${
|
|
1546
|
+
${y.joinType} JOIN ${w.name}
|
|
1547
1547
|
ON ${P}`;
|
|
1548
1548
|
}), T;
|
|
1549
1549
|
};
|
|
@@ -2201,10 +2201,10 @@ function Do() {
|
|
|
2201
2201
|
updateCardInFrame: F
|
|
2202
2202
|
} = ne();
|
|
2203
2203
|
M(($) => $.onSave), M(($) => $.onClose), M(($) => $.actions.setSqlGen);
|
|
2204
|
-
const I = M(($) => $.runSql),
|
|
2204
|
+
const I = M(($) => $.runSql), C = M(($) => $.actions.setRunSql), T = M(
|
|
2205
2205
|
($) => $.actions.setIsSqlRunning
|
|
2206
2206
|
), {
|
|
2207
|
-
data:
|
|
2207
|
+
data: y,
|
|
2208
2208
|
isLoading: w,
|
|
2209
2209
|
isFetching: E,
|
|
2210
2210
|
isSuccess: P,
|
|
@@ -2216,19 +2216,19 @@ function Do() {
|
|
|
2216
2216
|
errorMessage: R
|
|
2217
2217
|
} = Fe(i);
|
|
2218
2218
|
ue(() => {
|
|
2219
|
-
if (
|
|
2219
|
+
if (y && (y.rowLimitExceeded && ut.error("Row limit (10,000) exceeded. Refine your query.", {
|
|
2220
2220
|
position: "top-center",
|
|
2221
2221
|
richColors: !0
|
|
2222
|
-
}), k((
|
|
2223
|
-
const { dimensionKeys: $ } = an(
|
|
2222
|
+
}), k((y == null ? void 0 : y.output) || ""), y.records.length > 0)) {
|
|
2223
|
+
const { dimensionKeys: $ } = an(y.records);
|
|
2224
2224
|
m($);
|
|
2225
2225
|
}
|
|
2226
|
-
}, [
|
|
2226
|
+
}, [y, m, k]), ue(() => {
|
|
2227
2227
|
(w || E) && T(!0), (N || P) && T(!1), N && (m([]), k(""));
|
|
2228
2228
|
}, [
|
|
2229
2229
|
w,
|
|
2230
2230
|
E,
|
|
2231
|
-
|
|
2231
|
+
y,
|
|
2232
2232
|
k,
|
|
2233
2233
|
N,
|
|
2234
2234
|
P,
|
|
@@ -2237,8 +2237,8 @@ function Do() {
|
|
|
2237
2237
|
// setQueryError,
|
|
2238
2238
|
S
|
|
2239
2239
|
]), ue(() => {
|
|
2240
|
-
I && (t.getQueryData(V) || D(),
|
|
2241
|
-
}, [I, D,
|
|
2240
|
+
I && (t.getQueryData(V) || D(), C(!1));
|
|
2241
|
+
}, [I, D, C, V, t]);
|
|
2242
2242
|
const A = We(D);
|
|
2243
2243
|
A.current = D, ue(() => {
|
|
2244
2244
|
if (o.current) {
|
|
@@ -2326,9 +2326,9 @@ function Do() {
|
|
|
2326
2326
|
]
|
|
2327
2327
|
}
|
|
2328
2328
|
),
|
|
2329
|
-
(
|
|
2329
|
+
(y == null ? void 0 : y.sql) && !R && /* @__PURE__ */ a(Na, { openDelay: 300, children: [
|
|
2330
2330
|
/* @__PURE__ */ e(va, { asChild: !0, children: /* @__PURE__ */ e(pt, { className: "h-4 w-4 shrink-0 cursor-pointer text-muted-foreground hover:text-foreground" }) }),
|
|
2331
|
-
/* @__PURE__ */ e(ya, { align: "start", className: "w-[500px]", children: /* @__PURE__ */ e(nl, { sql:
|
|
2331
|
+
/* @__PURE__ */ e(ya, { align: "start", className: "w-[500px]", children: /* @__PURE__ */ e(nl, { sql: y.sql }) })
|
|
2332
2332
|
] }),
|
|
2333
2333
|
/* @__PURE__ */ e(En, {}),
|
|
2334
2334
|
/* @__PURE__ */ a(
|
|
@@ -2400,7 +2400,7 @@ function Do() {
|
|
|
2400
2400
|
pageSize: le
|
|
2401
2401
|
}
|
|
2402
2402
|
};
|
|
2403
|
-
v(de), F(de), i.sql && ((we = (ie = i.preferences) == null ? void 0 : ie.tablePrefs) != null && we.enableDevModePagination) &&
|
|
2403
|
+
v(de), F(de), i.sql && ((we = (ie = i.preferences) == null ? void 0 : ie.tablePrefs) != null && we.enableDevModePagination) && C(!0);
|
|
2404
2404
|
},
|
|
2405
2405
|
children: [
|
|
2406
2406
|
/* @__PURE__ */ e(Y, { className: "h-8 w-20", children: /* @__PURE__ */ e(W, {}) }),
|
|
@@ -2714,10 +2714,10 @@ function ll({
|
|
|
2714
2714
|
...s
|
|
2715
2715
|
}) {
|
|
2716
2716
|
var $, _, X;
|
|
2717
|
-
const n = M((G) => G.card), r = (($ = n.customCardPreferences) == null ? void 0 : $.showCardHeader) ?? !0, i = ((X = (_ = n.preferences) == null ? void 0 : _.displayOptions) == null ? void 0 : X.showInlineFilterBar) ?? !0, d = M((G) => G.frame), l = ye((G) => G.dashboard.filters), c = ye((G) => G.selectedSheetId), [o, u] = q(!1), { currentUser: m } = Bl(), { tokenProps: h } = An(gn), p = M((G) => G.actions.setRunSql), { updateFilter: k } = As(), b = l == null ? void 0 : l.find((G) => G.id === d.filterId), { data: x, isLoading: f, isFetching: g, errorMessage: v, errorSql: F, pagination: I } = Fe(n), { handleOpenInEditor:
|
|
2717
|
+
const n = M((G) => G.card), r = (($ = n.customCardPreferences) == null ? void 0 : $.showCardHeader) ?? !0, i = ((X = (_ = n.preferences) == null ? void 0 : _.displayOptions) == null ? void 0 : X.showInlineFilterBar) ?? !0, d = M((G) => G.frame), l = ye((G) => G.dashboard.filters), c = ye((G) => G.selectedSheetId), [o, u] = q(!1), { currentUser: m } = Bl(), { tokenProps: h } = An(gn), p = M((G) => G.actions.setRunSql), { updateFilter: k } = As(), b = l == null ? void 0 : l.find((G) => G.id === d.filterId), { data: x, isLoading: f, isFetching: g, errorMessage: v, errorSql: F, pagination: I } = Fe(n), { handleOpenInEditor: C, handleDebugWithAssistant: T } = sl(
|
|
2718
2718
|
v,
|
|
2719
2719
|
F || n.sql || n.python
|
|
2720
|
-
),
|
|
2720
|
+
), y = Ce(() => (x == null ? void 0 : x.records) || [], [x == null ? void 0 : x.records]), { setCard: w, updateCardInFrame: E } = ne(), { data: P } = xn(n), N = Ce(() => {
|
|
2721
2721
|
var G;
|
|
2722
2722
|
return n.type !== "pivotTable" || !((G = x == null ? void 0 : x.records) != null && G.length) ? null : {
|
|
2723
2723
|
records: x.records,
|
|
@@ -2808,7 +2808,7 @@ function ll({
|
|
|
2808
2808
|
{
|
|
2809
2809
|
error: v,
|
|
2810
2810
|
errorSql: F || n.sql || n.python,
|
|
2811
|
-
onOpenInEditor:
|
|
2811
|
+
onOpenInEditor: C,
|
|
2812
2812
|
onDebugWithAssistant: T,
|
|
2813
2813
|
onSendFeedback: O,
|
|
2814
2814
|
showFeedbackButton: !0
|
|
@@ -2836,7 +2836,7 @@ function ll({
|
|
|
2836
2836
|
Da,
|
|
2837
2837
|
{
|
|
2838
2838
|
card: n,
|
|
2839
|
-
data:
|
|
2839
|
+
data: y,
|
|
2840
2840
|
paginationMetadata: I,
|
|
2841
2841
|
onPaginationChange: D,
|
|
2842
2842
|
onSortChange: R,
|
|
@@ -3067,14 +3067,14 @@ const Qa = ({
|
|
|
3067
3067
|
/* @__PURE__ */ e(K, { onClick: i, variant: "outline", children: "Close" })
|
|
3068
3068
|
] });
|
|
3069
3069
|
function Po() {
|
|
3070
|
-
const [t, s] = q(!1), [n, r] = q(""), [i, d] = q(""), [l, c] = q(""), [o, u] = q(""), m = M((
|
|
3071
|
-
var T,
|
|
3070
|
+
const [t, s] = q(!1), [n, r] = q(""), [i, d] = q(""), [l, c] = q(""), [o, u] = q(""), m = M((C) => C.card), h = M((C) => C.card.customCfg), p = h ? JSON.stringify(h, null, 2) : "", { data: k } = Fe(m), { data: b } = xn(m), { setCardCustomCfg: x, setCustomVisualCode: f } = ne(), g = (C) => {
|
|
3071
|
+
var T, y;
|
|
3072
3072
|
return JSON.stringify(
|
|
3073
3073
|
{
|
|
3074
|
-
...
|
|
3074
|
+
...C,
|
|
3075
3075
|
data: {
|
|
3076
|
-
...
|
|
3077
|
-
datasets: (
|
|
3076
|
+
...C.data,
|
|
3077
|
+
datasets: (y = (T = C.data) == null ? void 0 : T.datasets) == null ? void 0 : y.map((w) => ({
|
|
3078
3078
|
...w,
|
|
3079
3079
|
data: []
|
|
3080
3080
|
}))
|
|
@@ -3084,9 +3084,9 @@ function Po() {
|
|
|
3084
3084
|
2
|
|
3085
3085
|
);
|
|
3086
3086
|
}, v = () => {
|
|
3087
|
-
var T,
|
|
3087
|
+
var T, y;
|
|
3088
3088
|
if (!((T = k == null ? void 0 : k.records) != null && T.length)) return;
|
|
3089
|
-
const
|
|
3089
|
+
const C = Ds({
|
|
3090
3090
|
card: m,
|
|
3091
3091
|
data: k.records,
|
|
3092
3092
|
cardType: m.type,
|
|
@@ -3095,19 +3095,19 @@ function Po() {
|
|
|
3095
3095
|
preferences: m.preferences,
|
|
3096
3096
|
topoJson: b
|
|
3097
3097
|
});
|
|
3098
|
-
if (
|
|
3099
|
-
r(g(
|
|
3100
|
-
const w = Ql(
|
|
3098
|
+
if (C) {
|
|
3099
|
+
r(g(C)), c(((y = m.preferences) == null ? void 0 : y.customVisualCode) || "");
|
|
3100
|
+
const w = Ql(C, h);
|
|
3101
3101
|
d(g(w));
|
|
3102
3102
|
}
|
|
3103
3103
|
}, F = () => {
|
|
3104
3104
|
try {
|
|
3105
3105
|
if (l && f(l), i) {
|
|
3106
|
-
const
|
|
3106
|
+
const C = JSON.parse(
|
|
3107
3107
|
i
|
|
3108
3108
|
), T = Xl(
|
|
3109
3109
|
JSON.parse(n),
|
|
3110
|
-
|
|
3110
|
+
C
|
|
3111
3111
|
);
|
|
3112
3112
|
x(T), u("");
|
|
3113
3113
|
}
|
|
@@ -3135,8 +3135,8 @@ function Po() {
|
|
|
3135
3135
|
customCode: l,
|
|
3136
3136
|
cardCustomCfgString: p,
|
|
3137
3137
|
mergedConfig: i,
|
|
3138
|
-
onConfigChange: (
|
|
3139
|
-
onCodeChange: (
|
|
3138
|
+
onConfigChange: (C) => d(C ?? ""),
|
|
3139
|
+
onCodeChange: (C) => c(C ?? "")
|
|
3140
3140
|
}
|
|
3141
3141
|
)
|
|
3142
3142
|
] }),
|
|
@@ -3263,47 +3263,47 @@ const ss = [
|
|
|
3263
3263
|
];
|
|
3264
3264
|
function rl({ onChartSelect: t, onClose: s }) {
|
|
3265
3265
|
const [n, r] = q(""), { starredCharts: i, isStarred: d, toggleStar: l } = er(), { data: c = [], isLoading: o } = tr(), { setCardType: u, setCardPreferences: m, setIsDevMode: h } = M(
|
|
3266
|
-
(
|
|
3266
|
+
(C) => C.actions
|
|
3267
3267
|
), { setCardCustomCfg: p, setCustomCardPreferences: k, setQueryConfig: b } = ne(), x = Ce(() => {
|
|
3268
3268
|
if (!n) return ss;
|
|
3269
|
-
const
|
|
3269
|
+
const C = n.toLowerCase();
|
|
3270
3270
|
return ss.filter(
|
|
3271
|
-
(T) => T.name.toLowerCase().includes(
|
|
3271
|
+
(T) => T.name.toLowerCase().includes(C)
|
|
3272
3272
|
);
|
|
3273
3273
|
}, [n]), f = Ce(() => {
|
|
3274
|
-
const
|
|
3275
|
-
(
|
|
3274
|
+
const C = c.filter(
|
|
3275
|
+
(y) => y.componentType === "chart"
|
|
3276
3276
|
);
|
|
3277
|
-
if (!n) return
|
|
3277
|
+
if (!n) return C;
|
|
3278
3278
|
const T = n.toLowerCase();
|
|
3279
|
-
return
|
|
3280
|
-
(
|
|
3279
|
+
return C.filter(
|
|
3280
|
+
(y) => y.name.toLowerCase().includes(T)
|
|
3281
3281
|
);
|
|
3282
|
-
}, [c, n]), g = (
|
|
3283
|
-
p(null), m({}), u(
|
|
3284
|
-
}, v = (
|
|
3282
|
+
}, [c, n]), g = (C) => {
|
|
3283
|
+
p(null), m({}), u(C), ["custom", "text", "map"].includes(C) && (h(!0), b(void 0)), t == null || t(C), s == null || s();
|
|
3284
|
+
}, v = (C) => {
|
|
3285
3285
|
p(null), m({}), u("custom"), k({
|
|
3286
3286
|
type: "component",
|
|
3287
3287
|
visualType: "single",
|
|
3288
|
-
url:
|
|
3289
|
-
componentName:
|
|
3290
|
-
icon:
|
|
3291
|
-
pluginChartType:
|
|
3292
|
-
}), b(void 0), t == null || t("custom",
|
|
3293
|
-
}, F = (
|
|
3288
|
+
url: C.url,
|
|
3289
|
+
componentName: C.name,
|
|
3290
|
+
icon: C.icon,
|
|
3291
|
+
pluginChartType: C.chartType
|
|
3292
|
+
}), b(void 0), t == null || t("custom", C), s == null || s();
|
|
3293
|
+
}, F = (C) => {
|
|
3294
3294
|
const T = {
|
|
3295
3295
|
type: "default",
|
|
3296
|
-
id:
|
|
3297
|
-
name:
|
|
3296
|
+
id: C.id,
|
|
3297
|
+
name: C.name
|
|
3298
3298
|
};
|
|
3299
3299
|
l(T);
|
|
3300
|
-
}, I = (
|
|
3300
|
+
}, I = (C) => {
|
|
3301
3301
|
const T = {
|
|
3302
3302
|
type: "custom",
|
|
3303
|
-
id:
|
|
3304
|
-
url:
|
|
3305
|
-
icon:
|
|
3306
|
-
name:
|
|
3303
|
+
id: C.name,
|
|
3304
|
+
url: C.url,
|
|
3305
|
+
icon: C.icon,
|
|
3306
|
+
name: C.name
|
|
3307
3307
|
};
|
|
3308
3308
|
l(T);
|
|
3309
3309
|
};
|
|
@@ -3315,7 +3315,7 @@ function rl({ onChartSelect: t, onClose: s }) {
|
|
|
3315
3315
|
{
|
|
3316
3316
|
placeholder: "Search charts...",
|
|
3317
3317
|
value: n,
|
|
3318
|
-
onChange: (
|
|
3318
|
+
onChange: (C) => r(C.target.value),
|
|
3319
3319
|
className: "h-auto border-0 p-0 text-sm focus-visible:ring-0 focus-visible:ring-offset-0"
|
|
3320
3320
|
}
|
|
3321
3321
|
)
|
|
@@ -3323,34 +3323,34 @@ function rl({ onChartSelect: t, onClose: s }) {
|
|
|
3323
3323
|
/* @__PURE__ */ a("div", { className: "max-h-[400px] overflow-y-auto", children: [
|
|
3324
3324
|
x.length > 0 && /* @__PURE__ */ a("div", { className: "mb-3", children: [
|
|
3325
3325
|
/* @__PURE__ */ e("span", { className: "mb-2 block text-xs font-medium text-muted-foreground", children: "Default Charts" }),
|
|
3326
|
-
/* @__PURE__ */ e("div", { className: "grid grid-cols-3 gap-2", children: x.map((
|
|
3326
|
+
/* @__PURE__ */ e("div", { className: "grid grid-cols-3 gap-2", children: x.map((C) => /* @__PURE__ */ e(
|
|
3327
3327
|
ns,
|
|
3328
3328
|
{
|
|
3329
|
-
chartType:
|
|
3330
|
-
chartName:
|
|
3329
|
+
chartType: C.id,
|
|
3330
|
+
chartName: C.name,
|
|
3331
3331
|
isCustom: !1,
|
|
3332
|
-
isStarred: d("default",
|
|
3333
|
-
onSelect: () => g(
|
|
3334
|
-
onToggleStar: () => F(
|
|
3332
|
+
isStarred: d("default", C.id),
|
|
3333
|
+
onSelect: () => g(C.id),
|
|
3334
|
+
onToggleStar: () => F(C)
|
|
3335
3335
|
},
|
|
3336
|
-
|
|
3336
|
+
C.id
|
|
3337
3337
|
)) })
|
|
3338
3338
|
] }),
|
|
3339
3339
|
f.length > 0 && /* @__PURE__ */ a(ce, { children: [
|
|
3340
3340
|
/* @__PURE__ */ e($t, { className: "my-3" }),
|
|
3341
3341
|
/* @__PURE__ */ a("div", { children: [
|
|
3342
3342
|
/* @__PURE__ */ e("span", { className: "mb-2 block text-xs font-medium text-muted-foreground", children: "Custom Charts" }),
|
|
3343
|
-
/* @__PURE__ */ e("div", { className: "grid grid-cols-3 gap-2", children: f.map((
|
|
3343
|
+
/* @__PURE__ */ e("div", { className: "grid grid-cols-3 gap-2", children: f.map((C, T) => /* @__PURE__ */ e(
|
|
3344
3344
|
ns,
|
|
3345
3345
|
{
|
|
3346
|
-
chartName:
|
|
3346
|
+
chartName: C.name,
|
|
3347
3347
|
isCustom: !0,
|
|
3348
|
-
pluginName:
|
|
3349
|
-
isStarred: d("custom",
|
|
3350
|
-
onSelect: () => v(
|
|
3351
|
-
onToggleStar: () => I(
|
|
3348
|
+
pluginName: C.pluginName,
|
|
3349
|
+
isStarred: d("custom", C.name),
|
|
3350
|
+
onSelect: () => v(C),
|
|
3351
|
+
onToggleStar: () => I(C)
|
|
3352
3352
|
},
|
|
3353
|
-
`${
|
|
3353
|
+
`${C.url}-${C.name}-${T}`
|
|
3354
3354
|
)) })
|
|
3355
3355
|
] })
|
|
3356
3356
|
] }),
|
|
@@ -3443,14 +3443,14 @@ function Bo() {
|
|
|
3443
3443
|
function zo({
|
|
3444
3444
|
className: t
|
|
3445
3445
|
}) {
|
|
3446
|
-
var k, b, x, f, g, v, F, I,
|
|
3447
|
-
const s = M((
|
|
3446
|
+
var k, b, x, f, g, v, F, I, C, T;
|
|
3447
|
+
const s = M((y) => y.card), { setCardPreferences: n, updateCardInFrame: r, setCard: i } = ne(), [d, l] = q(!1), c = ((b = (k = s.preferences) == null ? void 0 : k.displayOptions) == null ? void 0 : b.showFilterInfo) ?? !0, o = ((f = (x = s.preferences) == null ? void 0 : x.displayOptions) == null ? void 0 : f.showCardToolbar) ?? !0, u = ((v = (g = s.preferences) == null ? void 0 : g.displayOptions) == null ? void 0 : v.showChrome) ?? !0, m = ((I = (F = s.preferences) == null ? void 0 : F.displayOptions) == null ? void 0 : I.allowScroll) ?? !0, h = ((T = (C = s.preferences) == null ? void 0 : C.displayOptions) == null ? void 0 : T.showInlineFilterBar) ?? !0, p = (y, w) => {
|
|
3448
3448
|
var N;
|
|
3449
3449
|
const E = {
|
|
3450
3450
|
...s.preferences,
|
|
3451
3451
|
displayOptions: {
|
|
3452
3452
|
...(N = s.preferences) == null ? void 0 : N.displayOptions,
|
|
3453
|
-
[
|
|
3453
|
+
[y]: w
|
|
3454
3454
|
}
|
|
3455
3455
|
};
|
|
3456
3456
|
n(E);
|
|
@@ -3474,10 +3474,10 @@ function zo({
|
|
|
3474
3474
|
ot,
|
|
3475
3475
|
{
|
|
3476
3476
|
checked: c,
|
|
3477
|
-
onCheckedChange: (
|
|
3478
|
-
p("showFilterInfo",
|
|
3477
|
+
onCheckedChange: (y) => {
|
|
3478
|
+
p("showFilterInfo", y);
|
|
3479
3479
|
},
|
|
3480
|
-
onSelect: (
|
|
3480
|
+
onSelect: (y) => y.preventDefault(),
|
|
3481
3481
|
className: "pr-2",
|
|
3482
3482
|
children: [
|
|
3483
3483
|
/* @__PURE__ */ e("span", { className: "flex-1", children: "Filter Info" }),
|
|
@@ -3489,10 +3489,10 @@ function zo({
|
|
|
3489
3489
|
ot,
|
|
3490
3490
|
{
|
|
3491
3491
|
checked: o,
|
|
3492
|
-
onCheckedChange: (
|
|
3493
|
-
p("showCardToolbar",
|
|
3492
|
+
onCheckedChange: (y) => {
|
|
3493
|
+
p("showCardToolbar", y);
|
|
3494
3494
|
},
|
|
3495
|
-
onSelect: (
|
|
3495
|
+
onSelect: (y) => y.preventDefault(),
|
|
3496
3496
|
className: "pr-2",
|
|
3497
3497
|
children: [
|
|
3498
3498
|
/* @__PURE__ */ e("span", { className: "flex-1", children: "Card Toolbar" }),
|
|
@@ -3504,10 +3504,10 @@ function zo({
|
|
|
3504
3504
|
ot,
|
|
3505
3505
|
{
|
|
3506
3506
|
checked: u,
|
|
3507
|
-
onCheckedChange: (
|
|
3508
|
-
p("showChrome",
|
|
3507
|
+
onCheckedChange: (y) => {
|
|
3508
|
+
p("showChrome", y);
|
|
3509
3509
|
},
|
|
3510
|
-
onSelect: (
|
|
3510
|
+
onSelect: (y) => y.preventDefault(),
|
|
3511
3511
|
className: "pr-2",
|
|
3512
3512
|
children: [
|
|
3513
3513
|
/* @__PURE__ */ e("span", { className: "flex-1", children: "Card Chrome" }),
|
|
@@ -3519,10 +3519,10 @@ function zo({
|
|
|
3519
3519
|
ot,
|
|
3520
3520
|
{
|
|
3521
3521
|
checked: m,
|
|
3522
|
-
onCheckedChange: (
|
|
3523
|
-
p("allowScroll",
|
|
3522
|
+
onCheckedChange: (y) => {
|
|
3523
|
+
p("allowScroll", y);
|
|
3524
3524
|
},
|
|
3525
|
-
onSelect: (
|
|
3525
|
+
onSelect: (y) => y.preventDefault(),
|
|
3526
3526
|
className: "pr-2",
|
|
3527
3527
|
children: [
|
|
3528
3528
|
/* @__PURE__ */ e("span", { className: "flex-1", children: "Allow Scroll" }),
|
|
@@ -3534,10 +3534,10 @@ function zo({
|
|
|
3534
3534
|
ot,
|
|
3535
3535
|
{
|
|
3536
3536
|
checked: h,
|
|
3537
|
-
onCheckedChange: (
|
|
3538
|
-
p("showInlineFilterBar",
|
|
3537
|
+
onCheckedChange: (y) => {
|
|
3538
|
+
p("showInlineFilterBar", y);
|
|
3539
3539
|
},
|
|
3540
|
-
onSelect: (
|
|
3540
|
+
onSelect: (y) => y.preventDefault(),
|
|
3541
3541
|
className: "pr-2",
|
|
3542
3542
|
children: [
|
|
3543
3543
|
/* @__PURE__ */ e("span", { className: "flex-1", children: "Inline Filter Bar" }),
|
|
@@ -3553,8 +3553,8 @@ function jo() {
|
|
|
3553
3553
|
(h) => h.actions.removeCardInlineFilterValue
|
|
3554
3554
|
), l = (n == null ? void 0 : n.inlineFilters) || [];
|
|
3555
3555
|
function c(h) {
|
|
3556
|
-
var F, I,
|
|
3557
|
-
const p = ((
|
|
3556
|
+
var F, I, C;
|
|
3557
|
+
const p = ((C = (I = (F = n == null ? void 0 : n.dataSource) == null ? void 0 : F.selectedEntities) == null ? void 0 : I[0]) == null ? void 0 : C.database) || "", k = h.qualifiedFieldName || h.name;
|
|
3558
3558
|
if (l.find(
|
|
3559
3559
|
(T) => T.column === k
|
|
3560
3560
|
))
|
|
@@ -3764,7 +3764,7 @@ function qo() {
|
|
|
3764
3764
|
F.splice(g, 0, I), n({ ...t, cards: F });
|
|
3765
3765
|
};
|
|
3766
3766
|
function h(f) {
|
|
3767
|
-
const g = t.cards.filter((
|
|
3767
|
+
const g = t.cards.filter((C) => C.id !== f), v = g[0], F = {
|
|
3768
3768
|
...t,
|
|
3769
3769
|
cards: g,
|
|
3770
3770
|
// update the active card to the first card in the frame
|
|
@@ -3910,8 +3910,8 @@ function on() {
|
|
|
3910
3910
|
activeCardId: g
|
|
3911
3911
|
};
|
|
3912
3912
|
r(I);
|
|
3913
|
-
const
|
|
3914
|
-
|
|
3913
|
+
const C = I.cards.find((T) => T.id === g);
|
|
3914
|
+
C.sql && l(!0), d(C);
|
|
3915
3915
|
}
|
|
3916
3916
|
function f() {
|
|
3917
3917
|
return s.type === "kpi" ? h || p ? /* @__PURE__ */ e("div", { className: "z-50 flex h-full items-center justify-center", children: /* @__PURE__ */ e(Gt, { size: "md", color: "muted", "aria-label": "Loading data" }) }) : /* @__PURE__ */ e("div", { className: "flex h-full items-center justify-center", children: /* @__PURE__ */ e("div", { className: "w-1/2 rounded-md border border-border", children: /* @__PURE__ */ e(
|
|
@@ -3956,7 +3956,7 @@ function ls({
|
|
|
3956
3956
|
mergeDraftsIntoCard: k,
|
|
3957
3957
|
clearModeDrafts: b,
|
|
3958
3958
|
initializeModeDrafts: x
|
|
3959
|
-
} = ne(), { data: f, isLoading: g, isFetching: v, errorMessage: F, errorSql: I, refetch:
|
|
3959
|
+
} = ne(), { data: f, isLoading: g, isFetching: v, errorMessage: F, errorSql: I, refetch: C, pagination: T } = Fe(n), { handleDebugWithAssistant: y } = sl(F, I), w = Ce(() => (f == null ? void 0 : f.records) || [], [f == null ? void 0 : f.records]), [E, P] = q(!1);
|
|
3960
3960
|
ue(() => {
|
|
3961
3961
|
v || P(!1);
|
|
3962
3962
|
}, [v]);
|
|
@@ -4067,7 +4067,7 @@ function ls({
|
|
|
4067
4067
|
tooltip: "Refresh",
|
|
4068
4068
|
disabled: g || v,
|
|
4069
4069
|
onClick: () => {
|
|
4070
|
-
P(!0),
|
|
4070
|
+
P(!0), C();
|
|
4071
4071
|
},
|
|
4072
4072
|
children: /* @__PURE__ */ e(
|
|
4073
4073
|
Ls,
|
|
@@ -4135,7 +4135,7 @@ function ls({
|
|
|
4135
4135
|
{
|
|
4136
4136
|
error: F,
|
|
4137
4137
|
errorSql: I || n.sql || n.python,
|
|
4138
|
-
onDebugWithAssistant:
|
|
4138
|
+
onDebugWithAssistant: y,
|
|
4139
4139
|
showFeedbackButton: !1
|
|
4140
4140
|
}
|
|
4141
4141
|
) })
|
|
@@ -4283,28 +4283,28 @@ function cl() {
|
|
|
4283
4283
|
}
|
|
4284
4284
|
function h(g) {
|
|
4285
4285
|
var F, I;
|
|
4286
|
-
const v = (F = i == null ? void 0 : i.cards) == null ? void 0 : F.filter((
|
|
4286
|
+
const v = (F = i == null ? void 0 : i.cards) == null ? void 0 : F.filter((C) => {
|
|
4287
4287
|
var T;
|
|
4288
|
-
return ((T =
|
|
4289
|
-
}).map((
|
|
4290
|
-
value:
|
|
4291
|
-
label:
|
|
4288
|
+
return ((T = C == null ? void 0 : C.customCardPreferences) == null ? void 0 : T.visualType) !== "multiple";
|
|
4289
|
+
}).map((C) => ({
|
|
4290
|
+
value: C.id,
|
|
4291
|
+
label: C.tabTitle || C.title
|
|
4292
4292
|
}));
|
|
4293
|
-
return /* @__PURE__ */ e("div", { className: "space-y-2", children: (I = g == null ? void 0 : g.dataInputs) == null ? void 0 : I.map((
|
|
4294
|
-
var
|
|
4293
|
+
return /* @__PURE__ */ e("div", { className: "space-y-2", children: (I = g == null ? void 0 : g.dataInputs) == null ? void 0 : I.map((C, T) => {
|
|
4294
|
+
var y, w;
|
|
4295
4295
|
return /* @__PURE__ */ a(
|
|
4296
4296
|
"div",
|
|
4297
4297
|
{
|
|
4298
4298
|
className: "grid grid-cols-10 gap-2",
|
|
4299
4299
|
children: [
|
|
4300
|
-
/* @__PURE__ */ e("div", { className: "col-span-4 flex items-center", children:
|
|
4300
|
+
/* @__PURE__ */ e("div", { className: "col-span-4 flex items-center", children: C }),
|
|
4301
4301
|
/* @__PURE__ */ e(
|
|
4302
4302
|
tt,
|
|
4303
4303
|
{
|
|
4304
4304
|
className: "col-span-6 h-8 w-full justify-between",
|
|
4305
4305
|
label: "",
|
|
4306
4306
|
options: v || [],
|
|
4307
|
-
value: ((w = (
|
|
4307
|
+
value: ((w = (y = t == null ? void 0 : t.dataInputCardIds) == null ? void 0 : y[T]) == null ? void 0 : w.cardId) || "",
|
|
4308
4308
|
onValueChange: (E) => m(T, E)
|
|
4309
4309
|
}
|
|
4310
4310
|
)
|
|
@@ -4315,20 +4315,20 @@ function cl() {
|
|
|
4315
4315
|
}) });
|
|
4316
4316
|
}
|
|
4317
4317
|
function p(g, v, F = [], I = "") {
|
|
4318
|
-
var
|
|
4318
|
+
var C, T;
|
|
4319
4319
|
return t ? g === "input" ? /* @__PURE__ */ e(
|
|
4320
4320
|
Re,
|
|
4321
4321
|
{
|
|
4322
4322
|
className: `h-8 w-full ${ct}`,
|
|
4323
4323
|
value: String(
|
|
4324
|
-
((
|
|
4324
|
+
((C = t == null ? void 0 : t.settings) == null ? void 0 : C[v]) ?? I ?? ""
|
|
4325
4325
|
),
|
|
4326
|
-
onCommit: (
|
|
4326
|
+
onCommit: (y) => {
|
|
4327
4327
|
l({
|
|
4328
4328
|
...t,
|
|
4329
4329
|
settings: {
|
|
4330
4330
|
...t == null ? void 0 : t.settings,
|
|
4331
|
-
[v]:
|
|
4331
|
+
[v]: y
|
|
4332
4332
|
}
|
|
4333
4333
|
});
|
|
4334
4334
|
}
|
|
@@ -4341,10 +4341,10 @@ function cl() {
|
|
|
4341
4341
|
label: "",
|
|
4342
4342
|
options: F,
|
|
4343
4343
|
value: ((T = t == null ? void 0 : t.settings) == null ? void 0 : T[v]) || I,
|
|
4344
|
-
onValueChange: (
|
|
4344
|
+
onValueChange: (y) => {
|
|
4345
4345
|
l({
|
|
4346
4346
|
...t,
|
|
4347
|
-
settings: { ...t == null ? void 0 : t.settings, [v]:
|
|
4347
|
+
settings: { ...t == null ? void 0 : t.settings, [v]: y }
|
|
4348
4348
|
});
|
|
4349
4349
|
}
|
|
4350
4350
|
}
|
|
@@ -4353,11 +4353,11 @@ function cl() {
|
|
|
4353
4353
|
function k(g) {
|
|
4354
4354
|
const v = Object.entries((g == null ? void 0 : g.settings) || {});
|
|
4355
4355
|
return /* @__PURE__ */ e("div", { className: "space-y-3", children: v.map(([F, I]) => {
|
|
4356
|
-
var
|
|
4356
|
+
var C;
|
|
4357
4357
|
return /* @__PURE__ */ a("div", { className: "space-y-2", children: [
|
|
4358
4358
|
/* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
|
|
4359
4359
|
/* @__PURE__ */ e(L, { children: I.title }),
|
|
4360
|
-
((
|
|
4360
|
+
((C = I.docs) == null ? void 0 : C.description) && /* @__PURE__ */ e($e, { delayDuration: 0, children: /* @__PURE__ */ a(Ie, { children: [
|
|
4361
4361
|
/* @__PURE__ */ e(Me, { asChild: !0, children: /* @__PURE__ */ e(pt, { className: "h-3.5 w-3.5 cursor-help text-muted-foreground" }) }),
|
|
4362
4362
|
/* @__PURE__ */ e(je, { side: "right", className: "max-w-xs", children: /* @__PURE__ */ e("p", { className: "text-xs", children: I.docs.description }) })
|
|
4363
4363
|
] }) })
|
|
@@ -5338,7 +5338,7 @@ const Xo = [
|
|
|
5338
5338
|
value: t
|
|
5339
5339
|
}));
|
|
5340
5340
|
function tc() {
|
|
5341
|
-
var o, u, m, h, p, k, b, x, f, g, v, F, I,
|
|
5341
|
+
var o, u, m, h, p, k, b, x, f, g, v, F, I, C, T, y, w, E;
|
|
5342
5342
|
const t = M((P) => P.card), s = (u = (o = t == null ? void 0 : t.preferences) == null ? void 0 : o.mapVisualOptions) == null ? void 0 : u.topoJsonUrl, [n, r] = q(
|
|
5343
5343
|
((h = (m = t == null ? void 0 : t.preferences) == null ? void 0 : m.mapVisualOptions) == null ? void 0 : h.customTopoJsonUrl) || ""
|
|
5344
5344
|
), { setCardPreferences: i } = ne(), { data: d } = xn(t), l = Object.keys((d == null ? void 0 : d.objects) || {}).map((P) => ({
|
|
@@ -5497,7 +5497,7 @@ function tc() {
|
|
|
5497
5497
|
className: `h-9 w-full ${ct}`,
|
|
5498
5498
|
type: "number",
|
|
5499
5499
|
step: 10,
|
|
5500
|
-
value: ((T = (
|
|
5500
|
+
value: ((T = (C = (I = t.preferences) == null ? void 0 : I.mapVisualOptions) == null ? void 0 : C.projectionOffset) == null ? void 0 : T[0]) || 0,
|
|
5501
5501
|
onChange: (P) => {
|
|
5502
5502
|
var N, S, O, V;
|
|
5503
5503
|
i({
|
|
@@ -5520,7 +5520,7 @@ function tc() {
|
|
|
5520
5520
|
className: `h-9 w-full ${ct}`,
|
|
5521
5521
|
type: "number",
|
|
5522
5522
|
step: 10,
|
|
5523
|
-
value: ((E = (w = (
|
|
5523
|
+
value: ((E = (w = (y = t.preferences) == null ? void 0 : y.mapVisualOptions) == null ? void 0 : w.projectionOffset) == null ? void 0 : E[1]) || 0,
|
|
5524
5524
|
onChange: (P) => {
|
|
5525
5525
|
var N, S, O, V;
|
|
5526
5526
|
i({
|
|
@@ -5697,8 +5697,8 @@ function ul({ color: t, onColorChange: s, onClose: n }) {
|
|
|
5697
5697
|
const h = (f) => {
|
|
5698
5698
|
i(f), k(f, d, c);
|
|
5699
5699
|
}, p = (f) => {
|
|
5700
|
-
const g = f.currentTarget.getBoundingClientRect(), v = Math.max(0, Math.min(1, (f.clientX - g.left) / g.width)), F = Math.max(0, Math.min(1, (f.clientY - g.top) / g.height)), I = v * 100,
|
|
5701
|
-
l(I), o(
|
|
5700
|
+
const g = f.currentTarget.getBoundingClientRect(), v = Math.max(0, Math.min(1, (f.clientX - g.left) / g.width)), F = Math.max(0, Math.min(1, (f.clientY - g.top) / g.height)), I = v * 100, C = (1 - F) * 100;
|
|
5701
|
+
l(I), o(C), k(r, I, C);
|
|
5702
5702
|
}, k = (f, g, v) => {
|
|
5703
5703
|
const F = oc(f, g, v), I = ic(F.r, F.g, F.b);
|
|
5704
5704
|
m(I);
|
|
@@ -5896,7 +5896,7 @@ const cc = [
|
|
|
5896
5896
|
// yellow-400
|
|
5897
5897
|
];
|
|
5898
5898
|
function dc() {
|
|
5899
|
-
var F, I,
|
|
5899
|
+
var F, I, C, T, y, w, E, P, N, S;
|
|
5900
5900
|
const t = M((O) => O.card), s = M((O) => {
|
|
5901
5901
|
var V;
|
|
5902
5902
|
return (V = O.card) == null ? void 0 : V.preferences;
|
|
@@ -5945,7 +5945,7 @@ function dc() {
|
|
|
5945
5945
|
i,
|
|
5946
5946
|
(F = t == null ? void 0 : t.config) == null ? void 0 : F.groupByColumns,
|
|
5947
5947
|
(I = t == null ? void 0 : t.config) == null ? void 0 : I.pivotByColumns,
|
|
5948
|
-
(
|
|
5948
|
+
(C = t == null ? void 0 : t.config) == null ? void 0 : C.metricColumns,
|
|
5949
5949
|
t == null ? void 0 : t.type
|
|
5950
5950
|
]), p = Ce(() => wr(), []);
|
|
5951
5951
|
ue(() => {
|
|
@@ -5994,7 +5994,7 @@ function dc() {
|
|
|
5994
5994
|
[O]: D
|
|
5995
5995
|
}));
|
|
5996
5996
|
};
|
|
5997
|
-
if (!h.length || !((t == null ? void 0 : t.type) === "stackedBar" || (t == null ? void 0 : t.type) === "stackedLine" ? ((
|
|
5997
|
+
if (!h.length || !((t == null ? void 0 : t.type) === "stackedBar" || (t == null ? void 0 : t.type) === "stackedLine" ? ((y = (T = t == null ? void 0 : t.config) == null ? void 0 : T.groupByColumns) == null ? void 0 : y.length) || ((E = (w = t == null ? void 0 : t.config) == null ? void 0 : w.pivotByColumns) == null ? void 0 : E.length) : (N = (P = t == null ? void 0 : t.config) == null ? void 0 : P.groupByColumns) == null ? void 0 : N.length) || ["table", "kpi", "text", "custom", "heatmap"].includes(t.type))
|
|
5998
5998
|
return null;
|
|
5999
5999
|
const g = () => {
|
|
6000
6000
|
const O = {
|
|
@@ -6452,7 +6452,7 @@ function Mn({
|
|
|
6452
6452
|
] });
|
|
6453
6453
|
}
|
|
6454
6454
|
function Xa({ axis: t, label: s, type: n, config: r, onChange: i, defaultTitle: d, hidePosition: l }) {
|
|
6455
|
-
var k, b, x, f, g, v, F, I,
|
|
6455
|
+
var k, b, x, f, g, v, F, I, C, T, y, w, E, P;
|
|
6456
6456
|
const c = (N, S) => {
|
|
6457
6457
|
i({
|
|
6458
6458
|
...r ?? {},
|
|
@@ -6630,7 +6630,7 @@ function Xa({ axis: t, label: s, type: n, config: r, onChange: i, defaultTitle:
|
|
|
6630
6630
|
{
|
|
6631
6631
|
type: "number",
|
|
6632
6632
|
placeholder: "auto",
|
|
6633
|
-
value: ((
|
|
6633
|
+
value: ((C = r == null ? void 0 : r.scale) == null ? void 0 : C.min) === "auto" || ((T = r == null ? void 0 : r.scale) == null ? void 0 : T.min) === void 0 ? "" : String(r.scale.min),
|
|
6634
6634
|
onSave: (N) => m("min", N),
|
|
6635
6635
|
className: ""
|
|
6636
6636
|
}
|
|
@@ -6643,7 +6643,7 @@ function Xa({ axis: t, label: s, type: n, config: r, onChange: i, defaultTitle:
|
|
|
6643
6643
|
{
|
|
6644
6644
|
type: "number",
|
|
6645
6645
|
placeholder: "auto",
|
|
6646
|
-
value: ((
|
|
6646
|
+
value: ((y = r == null ? void 0 : r.scale) == null ? void 0 : y.max) === "auto" || ((w = r == null ? void 0 : r.scale) == null ? void 0 : w.max) === void 0 ? "" : String(r.scale.max),
|
|
6647
6647
|
onSave: (N) => m("max", N),
|
|
6648
6648
|
className: ""
|
|
6649
6649
|
}
|
|
@@ -6903,18 +6903,18 @@ function xc() {
|
|
|
6903
6903
|
}, I = () => {
|
|
6904
6904
|
const j = t.type;
|
|
6905
6905
|
return j === "stackedBar" || j === "stackedLine" || j === "pie" || j === "doughnut" ? "center" : l ? "right" : "top";
|
|
6906
|
-
},
|
|
6906
|
+
}, C = t.type !== "treemap" && t.type !== "heatmap", T = t.type !== "treemap", y = I();
|
|
6907
6907
|
let w = [];
|
|
6908
|
-
if (
|
|
6908
|
+
if (C)
|
|
6909
6909
|
if (m)
|
|
6910
6910
|
w = ["bottom"];
|
|
6911
6911
|
else if (c || o)
|
|
6912
6912
|
w = ["center"];
|
|
6913
6913
|
else {
|
|
6914
6914
|
const j = l ? ["center", "left", "right"] : ["center", "top", "bottom"];
|
|
6915
|
-
w = ["auto", ...t.type === "bullet" ? j : j.filter((de) => de !==
|
|
6915
|
+
w = ["auto", ...t.type === "bullet" ? j : j.filter((de) => de !== y), "custom"];
|
|
6916
6916
|
}
|
|
6917
|
-
const E = () => Ve(
|
|
6917
|
+
const E = () => Ve(y), P = ["center", "start", "end"], N = ["center", "start", "end", "top", "bottom"], S = u ? ["auto", "number", "currency", "percent", "none"] : ["number", "currency", "percent", "none"], O = [
|
|
6918
6918
|
{ value: "USD", label: "USD - US Dollar" },
|
|
6919
6919
|
{ value: "EUR", label: "EUR - Euro" },
|
|
6920
6920
|
{ value: "GBP", label: "GBP - British Pound" },
|
|
@@ -6950,7 +6950,7 @@ function xc() {
|
|
|
6950
6950
|
)
|
|
6951
6951
|
] }),
|
|
6952
6952
|
f && /* @__PURE__ */ a(ce, { children: [
|
|
6953
|
-
|
|
6953
|
+
C && !c && !o && /* @__PURE__ */ a("div", { className: "space-y-2", children: [
|
|
6954
6954
|
/* @__PURE__ */ e(L, { className: "text-xs font-medium", children: "Position" }),
|
|
6955
6955
|
/* @__PURE__ */ a(
|
|
6956
6956
|
H,
|
|
@@ -7270,11 +7270,11 @@ Difference: Primary - Secondary`,
|
|
|
7270
7270
|
}
|
|
7271
7271
|
};
|
|
7272
7272
|
function Nc() {
|
|
7273
|
-
var p, k, b, x, f, g, v, F, I,
|
|
7274
|
-
const t = M((
|
|
7273
|
+
var p, k, b, x, f, g, v, F, I, C, T;
|
|
7274
|
+
const t = M((y) => y.card), { setCardPreferences: s } = ne(), n = ((p = t.config) == null ? void 0 : p.metricColumns) || [], r = ((k = t.config) == null ? void 0 : k.groupByColumns) || [], i = n.length === 2 && r.length === 0, d = n.length >= 1 && r.length > 0;
|
|
7275
7275
|
if (!(t.type === "kpi" && (i || d)))
|
|
7276
7276
|
return null;
|
|
7277
|
-
const c = ((x = (b = t.preferences) == null ? void 0 : b.kpiVisualOptions) == null ? void 0 : x.metricComparison) || {}, o = (
|
|
7277
|
+
const c = ((x = (b = t.preferences) == null ? void 0 : b.kpiVisualOptions) == null ? void 0 : x.metricComparison) || {}, o = (y) => {
|
|
7278
7278
|
var E;
|
|
7279
7279
|
const w = {
|
|
7280
7280
|
...t.preferences,
|
|
@@ -7282,7 +7282,7 @@ function Nc() {
|
|
|
7282
7282
|
...(E = t.preferences) == null ? void 0 : E.kpiVisualOptions,
|
|
7283
7283
|
metricComparison: {
|
|
7284
7284
|
...c,
|
|
7285
|
-
...
|
|
7285
|
+
...y
|
|
7286
7286
|
}
|
|
7287
7287
|
}
|
|
7288
7288
|
};
|
|
@@ -7301,10 +7301,10 @@ function Nc() {
|
|
|
7301
7301
|
{
|
|
7302
7302
|
id: "enable-comparison",
|
|
7303
7303
|
checked: c.enabled || !1,
|
|
7304
|
-
onCheckedChange: (
|
|
7305
|
-
enabled:
|
|
7304
|
+
onCheckedChange: (y) => o({
|
|
7305
|
+
enabled: y,
|
|
7306
7306
|
// Set default calculationType when enabling for the first time
|
|
7307
|
-
...
|
|
7307
|
+
...y && !c.calculationType ? { calculationType: "difference" } : {}
|
|
7308
7308
|
})
|
|
7309
7309
|
}
|
|
7310
7310
|
)
|
|
@@ -7323,7 +7323,7 @@ function Nc() {
|
|
|
7323
7323
|
/* @__PURE__ */ a(Ie, { children: [
|
|
7324
7324
|
/* @__PURE__ */ e(Me, { asChild: !0, children: /* @__PURE__ */ e(pt, { className: "h-3 w-3 cursor-help text-muted-foreground" }) }),
|
|
7325
7325
|
/* @__PURE__ */ e(je, { side: "right", className: "max-w-xs", children: (() => {
|
|
7326
|
-
const
|
|
7326
|
+
const y = c.calculationType || "difference", w = ds[y];
|
|
7327
7327
|
return /* @__PURE__ */ a("div", { className: "space-y-2 text-xs", children: [
|
|
7328
7328
|
/* @__PURE__ */ e("div", { className: "text-sm font-semibold", children: w == null ? void 0 : w.label }),
|
|
7329
7329
|
/* @__PURE__ */ e("p", { children: w == null ? void 0 : w.description }),
|
|
@@ -7345,12 +7345,12 @@ function Nc() {
|
|
|
7345
7345
|
H,
|
|
7346
7346
|
{
|
|
7347
7347
|
value: c.calculationType || "difference",
|
|
7348
|
-
onValueChange: (
|
|
7349
|
-
calculationType:
|
|
7348
|
+
onValueChange: (y) => o({
|
|
7349
|
+
calculationType: y
|
|
7350
7350
|
}),
|
|
7351
7351
|
children: [
|
|
7352
7352
|
/* @__PURE__ */ e(Y, { id: "calculation-type", className: "h-7 text-xs", children: /* @__PURE__ */ e(W, {}) }),
|
|
7353
|
-
/* @__PURE__ */ e(Q, { children: Object.entries(ds).map(([
|
|
7353
|
+
/* @__PURE__ */ e(Q, { children: Object.entries(ds).map(([y, w]) => /* @__PURE__ */ e(B, { value: y, className: "text-xs", children: w.label }, y)) })
|
|
7354
7354
|
]
|
|
7355
7355
|
}
|
|
7356
7356
|
)
|
|
@@ -7359,7 +7359,7 @@ function Nc() {
|
|
|
7359
7359
|
Mn,
|
|
7360
7360
|
{
|
|
7361
7361
|
formatOptions: c.formatOptions || {},
|
|
7362
|
-
onFormatOptionsChange: (
|
|
7362
|
+
onFormatOptionsChange: (y) => o({ formatOptions: y }),
|
|
7363
7363
|
showTitle: !0,
|
|
7364
7364
|
title: "COMPARISON FORMAT"
|
|
7365
7365
|
}
|
|
@@ -7372,8 +7372,8 @@ function Nc() {
|
|
|
7372
7372
|
H,
|
|
7373
7373
|
{
|
|
7374
7374
|
value: c.position || "right",
|
|
7375
|
-
onValueChange: (
|
|
7376
|
-
position:
|
|
7375
|
+
onValueChange: (y) => o({
|
|
7376
|
+
position: y
|
|
7377
7377
|
}),
|
|
7378
7378
|
children: [
|
|
7379
7379
|
/* @__PURE__ */ e(Y, { className: "h-7 w-20 text-xs", children: /* @__PURE__ */ e(W, {}) }),
|
|
@@ -7392,7 +7392,7 @@ function Nc() {
|
|
|
7392
7392
|
{
|
|
7393
7393
|
id: "show-arrow",
|
|
7394
7394
|
checked: c.showArrow !== !1,
|
|
7395
|
-
onCheckedChange: (
|
|
7395
|
+
onCheckedChange: (y) => o({ showArrow: y })
|
|
7396
7396
|
}
|
|
7397
7397
|
),
|
|
7398
7398
|
/* @__PURE__ */ e(
|
|
@@ -7410,7 +7410,7 @@ function Nc() {
|
|
|
7410
7410
|
{
|
|
7411
7411
|
id: "show-color",
|
|
7412
7412
|
checked: c.showColor !== !1,
|
|
7413
|
-
onCheckedChange: (
|
|
7413
|
+
onCheckedChange: (y) => o({ showColor: y })
|
|
7414
7414
|
}
|
|
7415
7415
|
),
|
|
7416
7416
|
/* @__PURE__ */ e(
|
|
@@ -7427,10 +7427,10 @@ function Nc() {
|
|
|
7427
7427
|
la,
|
|
7428
7428
|
{
|
|
7429
7429
|
value: ((g = c.colorConfig) == null ? void 0 : g.increase) || "green",
|
|
7430
|
-
onChange: (
|
|
7430
|
+
onChange: (y) => o({
|
|
7431
7431
|
colorConfig: {
|
|
7432
7432
|
...c.colorConfig,
|
|
7433
|
-
increase:
|
|
7433
|
+
increase: y
|
|
7434
7434
|
}
|
|
7435
7435
|
}),
|
|
7436
7436
|
label: "Primary > Secondary"
|
|
@@ -7440,10 +7440,10 @@ function Nc() {
|
|
|
7440
7440
|
la,
|
|
7441
7441
|
{
|
|
7442
7442
|
value: ((v = c.colorConfig) == null ? void 0 : v.decrease) || "red",
|
|
7443
|
-
onChange: (
|
|
7443
|
+
onChange: (y) => o({
|
|
7444
7444
|
colorConfig: {
|
|
7445
7445
|
...c.colorConfig,
|
|
7446
|
-
decrease:
|
|
7446
|
+
decrease: y
|
|
7447
7447
|
}
|
|
7448
7448
|
}),
|
|
7449
7449
|
label: "Primary < Secondary"
|
|
@@ -7453,10 +7453,10 @@ function Nc() {
|
|
|
7453
7453
|
la,
|
|
7454
7454
|
{
|
|
7455
7455
|
value: ((F = c.colorConfig) == null ? void 0 : F.noChange) || "neutral",
|
|
7456
|
-
onChange: (
|
|
7456
|
+
onChange: (y) => o({
|
|
7457
7457
|
colorConfig: {
|
|
7458
7458
|
...c.colorConfig,
|
|
7459
|
-
noChange:
|
|
7459
|
+
noChange: y
|
|
7460
7460
|
}
|
|
7461
7461
|
}),
|
|
7462
7462
|
label: "Primary = Secondary"
|
|
@@ -7472,8 +7472,8 @@ function Nc() {
|
|
|
7472
7472
|
{
|
|
7473
7473
|
id: "conditional-label",
|
|
7474
7474
|
checked: c.conditionalLabel || !1,
|
|
7475
|
-
onCheckedChange: (
|
|
7476
|
-
conditionalLabel:
|
|
7475
|
+
onCheckedChange: (y) => o({
|
|
7476
|
+
conditionalLabel: y
|
|
7477
7477
|
})
|
|
7478
7478
|
}
|
|
7479
7479
|
),
|
|
@@ -7508,10 +7508,10 @@ function Nc() {
|
|
|
7508
7508
|
id: "label-increase",
|
|
7509
7509
|
type: "text",
|
|
7510
7510
|
value: ((I = c.conditionalLabels) == null ? void 0 : I.increase) ?? "Increase",
|
|
7511
|
-
onChange: (
|
|
7511
|
+
onChange: (y) => o({
|
|
7512
7512
|
conditionalLabels: {
|
|
7513
7513
|
...c.conditionalLabels,
|
|
7514
|
-
increase:
|
|
7514
|
+
increase: y.target.value
|
|
7515
7515
|
}
|
|
7516
7516
|
}),
|
|
7517
7517
|
placeholder: "Increase",
|
|
@@ -7537,11 +7537,11 @@ function Nc() {
|
|
|
7537
7537
|
{
|
|
7538
7538
|
id: "label-decrease",
|
|
7539
7539
|
type: "text",
|
|
7540
|
-
value: ((
|
|
7541
|
-
onChange: (
|
|
7540
|
+
value: ((C = c.conditionalLabels) == null ? void 0 : C.decrease) ?? "Decrease",
|
|
7541
|
+
onChange: (y) => o({
|
|
7542
7542
|
conditionalLabels: {
|
|
7543
7543
|
...c.conditionalLabels,
|
|
7544
|
-
decrease:
|
|
7544
|
+
decrease: y.target.value
|
|
7545
7545
|
}
|
|
7546
7546
|
}),
|
|
7547
7547
|
placeholder: "Decrease",
|
|
@@ -7564,10 +7564,10 @@ function Nc() {
|
|
|
7564
7564
|
id: "label-no-change",
|
|
7565
7565
|
type: "text",
|
|
7566
7566
|
value: ((T = c.conditionalLabels) == null ? void 0 : T.noChange) ?? "No change",
|
|
7567
|
-
onChange: (
|
|
7567
|
+
onChange: (y) => o({
|
|
7568
7568
|
conditionalLabels: {
|
|
7569
7569
|
...c.conditionalLabels,
|
|
7570
|
-
noChange:
|
|
7570
|
+
noChange: y.target.value
|
|
7571
7571
|
}
|
|
7572
7572
|
}),
|
|
7573
7573
|
placeholder: "No change",
|
|
@@ -7593,7 +7593,7 @@ function Nc() {
|
|
|
7593
7593
|
id: "label-name",
|
|
7594
7594
|
type: "text",
|
|
7595
7595
|
value: c.labelName ?? "",
|
|
7596
|
-
onChange: (
|
|
7596
|
+
onChange: (y) => o({ labelName: y.target.value }),
|
|
7597
7597
|
placeholder: "e.g. Previous, Last Period",
|
|
7598
7598
|
className: "h-7 text-xs"
|
|
7599
7599
|
}
|
|
@@ -7923,7 +7923,7 @@ function Sc() {
|
|
|
7923
7923
|
g({
|
|
7924
7924
|
targetValue: Number.isNaN(R) ? void 0 : R
|
|
7925
7925
|
});
|
|
7926
|
-
},
|
|
7926
|
+
}, C = (D, R) => {
|
|
7927
7927
|
const A = R.trim(), z = {
|
|
7928
7928
|
...d.rangeLabels || {}
|
|
7929
7929
|
};
|
|
@@ -7932,7 +7932,7 @@ function Sc() {
|
|
|
7932
7932
|
});
|
|
7933
7933
|
}, T = (D) => {
|
|
7934
7934
|
u(D), g({ showRanges: D });
|
|
7935
|
-
},
|
|
7935
|
+
}, y = (D) => {
|
|
7936
7936
|
h(D), g({ rangesArePercentages: D });
|
|
7937
7937
|
}, w = d.orientation || (((V = t == null ? void 0 : t.chartOptions) == null ? void 0 : V.indexAxis) === "y" ? "horizontal" : "vertical"), E = (D) => {
|
|
7938
7938
|
g({ orientation: D }), i(D === "horizontal" ? "y" : "x");
|
|
@@ -8100,7 +8100,7 @@ function Sc() {
|
|
|
8100
8100
|
type: "checkbox",
|
|
8101
8101
|
checked: m,
|
|
8102
8102
|
disabled: !o,
|
|
8103
|
-
onChange: (D) =>
|
|
8103
|
+
onChange: (D) => y(D.target.checked),
|
|
8104
8104
|
className: "h-3.5 w-3.5 accent-primary disabled:opacity-50"
|
|
8105
8105
|
}
|
|
8106
8106
|
),
|
|
@@ -8124,7 +8124,7 @@ function Sc() {
|
|
|
8124
8124
|
{
|
|
8125
8125
|
placeholder: `Display label (${D})`,
|
|
8126
8126
|
value: ((R = d.rangeLabels) == null ? void 0 : R[D]) || "",
|
|
8127
|
-
onCommit: (_) =>
|
|
8127
|
+
onCommit: (_) => C(D, _),
|
|
8128
8128
|
className: "h-8 text-xs"
|
|
8129
8129
|
}
|
|
8130
8130
|
)
|
|
@@ -8202,7 +8202,7 @@ function hs(t) {
|
|
|
8202
8202
|
return s;
|
|
8203
8203
|
}
|
|
8204
8204
|
function kc() {
|
|
8205
|
-
var
|
|
8205
|
+
var C, T, y, w, E, P, N, S, O, V, D, R;
|
|
8206
8206
|
const t = M((A) => A.card.preferences), s = M((A) => A.card), n = M((A) => A.card.type), r = M((A) => A.isDevMode), { setCardPreferences: i, updateCardInFrame: d } = ne(), l = n === "bubble", c = n === "scatter", o = Ce(
|
|
8207
8207
|
() => (t == null ? void 0 : t.bubbleScatterConfig) || {},
|
|
8208
8208
|
[t == null ? void 0 : t.bubbleScatterConfig]
|
|
@@ -8212,7 +8212,7 @@ function kc() {
|
|
|
8212
8212
|
const $ = U.label || U.name || U.alias || "";
|
|
8213
8213
|
return { value: $, label: $ };
|
|
8214
8214
|
})) || [];
|
|
8215
|
-
}, [(
|
|
8215
|
+
}, [(C = s == null ? void 0 : s.config) == null ? void 0 : C.metricColumns]), p = Ce(() => {
|
|
8216
8216
|
var A, z;
|
|
8217
8217
|
return ((z = (A = s == null ? void 0 : s.config) == null ? void 0 : A.groupByColumns) == null ? void 0 : z.map((U) => {
|
|
8218
8218
|
const $ = U.label || U.name || U.alias || "";
|
|
@@ -8439,7 +8439,7 @@ function kc() {
|
|
|
8439
8439
|
className: "h-8 text-xs",
|
|
8440
8440
|
type: "number",
|
|
8441
8441
|
placeholder: "5",
|
|
8442
|
-
value: ((
|
|
8442
|
+
value: ((y = o.minRadius) == null ? void 0 : y.toString()) || "",
|
|
8443
8443
|
onCommit: (A) => v({ minRadius: A ? Number(A) : void 0 })
|
|
8444
8444
|
}
|
|
8445
8445
|
)
|
|
@@ -8752,27 +8752,27 @@ function $a({
|
|
|
8752
8752
|
showAppearance: d = !0
|
|
8753
8753
|
}) {
|
|
8754
8754
|
var b, x, f, g, v, F;
|
|
8755
|
-
const l = i ?? (n ? ["auto", "center", "left", "right", "custom"] : ["auto", "center", "top", "bottom", "custom"]), c = r ? ["auto", "number", "currency", "percent", "none"] : ["number", "currency", "percent", "none"], o = (I,
|
|
8755
|
+
const l = i ?? (n ? ["auto", "center", "left", "right", "custom"] : ["auto", "center", "top", "bottom", "custom"]), c = r ? ["auto", "number", "currency", "percent", "none"] : ["number", "currency", "percent", "none"], o = (I, C) => {
|
|
8756
8756
|
const T = {
|
|
8757
8757
|
...t,
|
|
8758
|
-
[I]:
|
|
8758
|
+
[I]: C
|
|
8759
8759
|
};
|
|
8760
8760
|
s(T);
|
|
8761
|
-
}, u = (I,
|
|
8761
|
+
}, u = (I, C) => {
|
|
8762
8762
|
const T = {
|
|
8763
8763
|
...t,
|
|
8764
8764
|
font: {
|
|
8765
8765
|
...(t == null ? void 0 : t.font) || {},
|
|
8766
|
-
[I]:
|
|
8766
|
+
[I]: C
|
|
8767
8767
|
}
|
|
8768
8768
|
};
|
|
8769
8769
|
s(T);
|
|
8770
|
-
}, m = (I,
|
|
8770
|
+
}, m = (I, C) => {
|
|
8771
8771
|
const T = {
|
|
8772
8772
|
...t,
|
|
8773
8773
|
formatOptions: {
|
|
8774
8774
|
...(t == null ? void 0 : t.formatOptions) || {},
|
|
8775
|
-
[I]:
|
|
8775
|
+
[I]: C
|
|
8776
8776
|
}
|
|
8777
8777
|
};
|
|
8778
8778
|
s(T);
|
|
@@ -9041,7 +9041,7 @@ function Bc({ metricKey: t, idx: s }) {
|
|
|
9041
9041
|
});
|
|
9042
9042
|
else {
|
|
9043
9043
|
const I = d == null ? void 0 : d.map(
|
|
9044
|
-
(
|
|
9044
|
+
(C) => C.idx === s ? { ...C, ...F } : C
|
|
9045
9045
|
);
|
|
9046
9046
|
c({
|
|
9047
9047
|
...i || {},
|
|
@@ -10179,11 +10179,11 @@ function hd(t) {
|
|
|
10179
10179
|
setQueryConfig: b
|
|
10180
10180
|
} = ne(), x = M((J) => J.currentAssitantScope) || [], f = M((J) => J.userInputForAI), g = M((J) => J.triggerAIRun), v = M((J) => J.card), F = M(
|
|
10181
10181
|
(J) => J.selectedDatabaseName
|
|
10182
|
-
), I = M((J) => J.selectedTableName),
|
|
10182
|
+
), I = M((J) => J.selectedTableName), C = M(
|
|
10183
10183
|
(J) => J.selectedConnectionId
|
|
10184
10184
|
), T = M(
|
|
10185
10185
|
(J) => J.selectedSchemaName
|
|
10186
|
-
),
|
|
10186
|
+
), y = ye(
|
|
10187
10187
|
(J) => J.dashboard.aiScopeTables
|
|
10188
10188
|
), {
|
|
10189
10189
|
errorMessage: w,
|
|
@@ -10350,7 +10350,7 @@ function hd(t) {
|
|
|
10350
10350
|
tableName: I || "",
|
|
10351
10351
|
datamodelId: R || "",
|
|
10352
10352
|
datamodelName: Jn(V),
|
|
10353
|
-
connectionId:
|
|
10353
|
+
connectionId: C || "",
|
|
10354
10354
|
connectionType: D || ""
|
|
10355
10355
|
}, he = Hn([...x, J]);
|
|
10356
10356
|
pe(he);
|
|
@@ -10361,16 +10361,16 @@ function hd(t) {
|
|
|
10361
10361
|
schemaName: T || "",
|
|
10362
10362
|
tableName: I || "",
|
|
10363
10363
|
datamodelName: Jn(V),
|
|
10364
|
-
connectionId:
|
|
10364
|
+
connectionId: C || "",
|
|
10365
10365
|
connectionType: D || "",
|
|
10366
10366
|
datamodelId: R || ""
|
|
10367
10367
|
};
|
|
10368
10368
|
if (!Gr(
|
|
10369
|
-
[...
|
|
10369
|
+
[...y || [], ...x],
|
|
10370
10370
|
J
|
|
10371
10371
|
) || x.length === 0) {
|
|
10372
10372
|
const Ke = Hn([
|
|
10373
|
-
...
|
|
10373
|
+
...y || [],
|
|
10374
10374
|
...x,
|
|
10375
10375
|
J
|
|
10376
10376
|
]).filter(
|
|
@@ -10415,7 +10415,7 @@ function ps({
|
|
|
10415
10415
|
onFullscreenChange: s,
|
|
10416
10416
|
fullscreenContainer: n
|
|
10417
10417
|
}) {
|
|
10418
|
-
const r = We(null), [i, d] = q(!1), [l, c] = q(js), [o, u] = q(!1), [m, h] = q(!1), [p, k] = q(!1), b = t ?? p, x = _r(), { setCurrentAIContext: f } = $s(), { clearQueue: g } = Jr(), { clearFileAttachments: v } = Hr(), F = Yr("editor"), I = ye((se) => se.dashboard.aiContext),
|
|
10418
|
+
const r = We(null), [i, d] = q(!1), [l, c] = q(js), [o, u] = q(!1), [m, h] = q(!1), [p, k] = q(!1), b = t ?? p, x = _r(), { setCurrentAIContext: f } = $s(), { clearQueue: g } = Jr(), { clearFileAttachments: v } = Hr(), F = Yr("editor"), I = ye((se) => se.dashboard.aiContext), C = M((se) => se.card.dataSource), T = M((se) => se.actions.setCardSql), y = M((se) => se.actions.setRunSql), w = M((se) => se.showAIDialog), E = ye(
|
|
10419
10419
|
(se) => se.handleOpenAssistantProfile
|
|
10420
10420
|
), { setShowAIDialog: P, setCardPython: N } = ne(), { setDataSource: S } = ne(), { assistantProfile: O } = Wr(), {
|
|
10421
10421
|
messages: V,
|
|
@@ -10474,9 +10474,9 @@ function ps({
|
|
|
10474
10474
|
ue(() => {
|
|
10475
10475
|
var se;
|
|
10476
10476
|
w && ((se = r.current) == null || se.focus(), f({
|
|
10477
|
-
selectedEntities: (
|
|
10477
|
+
selectedEntities: (C == null ? void 0 : C.selectedEntities) || []
|
|
10478
10478
|
}));
|
|
10479
|
-
}, [w,
|
|
10479
|
+
}, [w, C, f]), Zr({
|
|
10480
10480
|
assistantType: "editor",
|
|
10481
10481
|
status: U,
|
|
10482
10482
|
isLoading: A,
|
|
@@ -10518,7 +10518,7 @@ function ps({
|
|
|
10518
10518
|
Ze(!b);
|
|
10519
10519
|
}, [b, Ze]);
|
|
10520
10520
|
function Rt(se, Se) {
|
|
10521
|
-
Se === "sql" ? (T(se),
|
|
10521
|
+
Se === "sql" ? (T(se), y(!0)) : Se === "python" && (N(se), y(!0));
|
|
10522
10522
|
}
|
|
10523
10523
|
function lt() {
|
|
10524
10524
|
x.selectedEntities.length === 0 && f({
|
|
@@ -10765,10 +10765,10 @@ function ps({
|
|
|
10765
10765
|
/* @__PURE__ */ e(
|
|
10766
10766
|
Ss,
|
|
10767
10767
|
{
|
|
10768
|
-
incomingSelectedEntities: (
|
|
10768
|
+
incomingSelectedEntities: (C == null ? void 0 : C.selectedEntities) || [],
|
|
10769
10769
|
open: m,
|
|
10770
10770
|
onOpenChange: h,
|
|
10771
|
-
dataSource:
|
|
10771
|
+
dataSource: C || Ks,
|
|
10772
10772
|
dialogMode: "aiContext"
|
|
10773
10773
|
}
|
|
10774
10774
|
)
|
|
@@ -11568,19 +11568,19 @@ function hl({
|
|
|
11568
11568
|
id: (i == null ? void 0 : i.id) || zt(),
|
|
11569
11569
|
field: (i == null ? void 0 : i.field) || null,
|
|
11570
11570
|
selectedValues: i ? Array.isArray(i.value) ? i.value : [i.value] : []
|
|
11571
|
-
}), k = n.filter((
|
|
11572
|
-
var
|
|
11573
|
-
return l ? !1 : !((
|
|
11574
|
-
(w) => w.field.id ===
|
|
11575
|
-
)) &&
|
|
11576
|
-
}), b = (
|
|
11571
|
+
}), k = n.filter((C) => {
|
|
11572
|
+
var y;
|
|
11573
|
+
return l ? !1 : !((y = r == null ? void 0 : r.conditions) == null ? void 0 : y.some(
|
|
11574
|
+
(w) => w.field.id === C.id
|
|
11575
|
+
)) && C.label.toLowerCase().includes(u.toLowerCase());
|
|
11576
|
+
}), b = (C) => {
|
|
11577
11577
|
p({
|
|
11578
11578
|
...h,
|
|
11579
|
-
field:
|
|
11579
|
+
field: C
|
|
11580
11580
|
}), o("values");
|
|
11581
11581
|
}, x = () => {
|
|
11582
11582
|
if (h.field && h.selectedValues.length > 0) {
|
|
11583
|
-
const
|
|
11583
|
+
const C = {
|
|
11584
11584
|
id: h.id,
|
|
11585
11585
|
field: h.field,
|
|
11586
11586
|
operator: "in",
|
|
@@ -11588,20 +11588,20 @@ function hl({
|
|
|
11588
11588
|
};
|
|
11589
11589
|
let T;
|
|
11590
11590
|
if (l) {
|
|
11591
|
-
const
|
|
11592
|
-
(w) => w.id === i.id ?
|
|
11591
|
+
const y = ((r == null ? void 0 : r.conditions) || []).map(
|
|
11592
|
+
(w) => w.id === i.id ? C : w
|
|
11593
11593
|
);
|
|
11594
11594
|
T = {
|
|
11595
11595
|
...r,
|
|
11596
|
-
conditions:
|
|
11596
|
+
conditions: y
|
|
11597
11597
|
};
|
|
11598
11598
|
} else {
|
|
11599
|
-
const
|
|
11599
|
+
const y = (r == null ? void 0 : r.conditions) || [];
|
|
11600
11600
|
T = {
|
|
11601
11601
|
id: (r == null ? void 0 : r.id) || zt(),
|
|
11602
11602
|
logicalOperator: "AND",
|
|
11603
11603
|
negate: !1,
|
|
11604
|
-
conditions: [...
|
|
11604
|
+
conditions: [...y, C],
|
|
11605
11605
|
groups: []
|
|
11606
11606
|
};
|
|
11607
11607
|
}
|
|
@@ -11609,22 +11609,22 @@ function hl({
|
|
|
11609
11609
|
}
|
|
11610
11610
|
}, f = () => {
|
|
11611
11611
|
if (!l || !i) return;
|
|
11612
|
-
const
|
|
11612
|
+
const C = ((r == null ? void 0 : r.conditions) || []).filter(
|
|
11613
11613
|
(T) => T.id !== i.id
|
|
11614
11614
|
);
|
|
11615
|
-
if (
|
|
11615
|
+
if (C.length > 0) {
|
|
11616
11616
|
const T = {
|
|
11617
11617
|
...r,
|
|
11618
|
-
conditions:
|
|
11618
|
+
conditions: C
|
|
11619
11619
|
};
|
|
11620
11620
|
d(T);
|
|
11621
11621
|
} else
|
|
11622
11622
|
d(void 0);
|
|
11623
11623
|
s(!1);
|
|
11624
|
-
}, g = (
|
|
11624
|
+
}, g = (C) => {
|
|
11625
11625
|
p({
|
|
11626
11626
|
...h,
|
|
11627
|
-
selectedValues:
|
|
11627
|
+
selectedValues: C
|
|
11628
11628
|
});
|
|
11629
11629
|
}, v = () => {
|
|
11630
11630
|
l && i ? (p({
|
|
@@ -11644,19 +11644,19 @@ function hl({
|
|
|
11644
11644
|
/* @__PURE__ */ a("div", { className: "space-y-4", children: [
|
|
11645
11645
|
!l && (r == null ? void 0 : r.conditions) && r.conditions.length > 0 && c === "fields" && /* @__PURE__ */ a("div", { className: "space-y-2", children: [
|
|
11646
11646
|
/* @__PURE__ */ e(L, { className: "text-xs font-medium text-muted-foreground", children: "Current Filters:" }),
|
|
11647
|
-
/* @__PURE__ */ e("div", { className: "flex flex-wrap gap-2", children: r.conditions.map((
|
|
11647
|
+
/* @__PURE__ */ e("div", { className: "flex flex-wrap gap-2", children: r.conditions.map((C) => /* @__PURE__ */ a(
|
|
11648
11648
|
"div",
|
|
11649
11649
|
{
|
|
11650
11650
|
className: "flex items-center gap-1 px-2 py-1 bg-muted rounded-md text-xs",
|
|
11651
11651
|
children: [
|
|
11652
11652
|
/* @__PURE__ */ a("span", { className: "font-medium", children: [
|
|
11653
|
-
|
|
11653
|
+
C.field.label,
|
|
11654
11654
|
":"
|
|
11655
11655
|
] }),
|
|
11656
|
-
/* @__PURE__ */ e("span", { className: "text-muted-foreground", children: Array.isArray(
|
|
11656
|
+
/* @__PURE__ */ e("span", { className: "text-muted-foreground", children: Array.isArray(C.value) ? `${C.value.length} values` : String(C.value) })
|
|
11657
11657
|
]
|
|
11658
11658
|
},
|
|
11659
|
-
|
|
11659
|
+
C.id
|
|
11660
11660
|
)) })
|
|
11661
11661
|
] }),
|
|
11662
11662
|
c === "fields" && !l ? /* @__PURE__ */ a("div", { className: "space-y-4", children: [
|
|
@@ -11667,30 +11667,30 @@ function hl({
|
|
|
11667
11667
|
{
|
|
11668
11668
|
placeholder: "Search fields...",
|
|
11669
11669
|
value: u,
|
|
11670
|
-
onChange: (
|
|
11670
|
+
onChange: (C) => m(C.target.value),
|
|
11671
11671
|
className: "pl-10"
|
|
11672
11672
|
}
|
|
11673
11673
|
)
|
|
11674
11674
|
] }),
|
|
11675
|
-
/* @__PURE__ */ e("div", { className: "grid grid-cols-2 gap-2 max-h-[400px] overflow-y-auto", children: k.map((
|
|
11675
|
+
/* @__PURE__ */ e("div", { className: "grid grid-cols-2 gap-2 max-h-[400px] overflow-y-auto", children: k.map((C) => /* @__PURE__ */ a(
|
|
11676
11676
|
K,
|
|
11677
11677
|
{
|
|
11678
11678
|
variant: "outline",
|
|
11679
11679
|
className: "justify-start h-auto py-2 px-3",
|
|
11680
|
-
onClick: () => b(
|
|
11680
|
+
onClick: () => b(C),
|
|
11681
11681
|
children: [
|
|
11682
|
-
/* @__PURE__ */ e(Rn, { dataType: Ee(
|
|
11682
|
+
/* @__PURE__ */ e(Rn, { dataType: Ee(C.dataType) }),
|
|
11683
11683
|
/* @__PURE__ */ a("div", { className: "ml-2 text-left", children: [
|
|
11684
|
-
/* @__PURE__ */ e("div", { className: "text-sm font-medium", children:
|
|
11684
|
+
/* @__PURE__ */ e("div", { className: "text-sm font-medium", children: C.label }),
|
|
11685
11685
|
/* @__PURE__ */ a("div", { className: "text-xs text-muted-foreground", children: [
|
|
11686
|
-
|
|
11686
|
+
C.entityName,
|
|
11687
11687
|
".",
|
|
11688
|
-
|
|
11688
|
+
C.name
|
|
11689
11689
|
] })
|
|
11690
11690
|
] })
|
|
11691
11691
|
]
|
|
11692
11692
|
},
|
|
11693
|
-
|
|
11693
|
+
C.id
|
|
11694
11694
|
)) }),
|
|
11695
11695
|
k.length === 0 && u && /* @__PURE__ */ a("div", { className: "text-center py-4 text-sm text-muted-foreground", children: [
|
|
11696
11696
|
'No fields found matching "',
|
|
@@ -11813,7 +11813,7 @@ function pl({
|
|
|
11813
11813
|
const [l, c] = q(""), [o, u] = q("ratio"), [m, h] = q(null), [p, k] = q(null), [b, x] = q(1), [f, g] = q(""), [v, F] = q({
|
|
11814
11814
|
format: "number",
|
|
11815
11815
|
decimalPlaces: 2
|
|
11816
|
-
}), [I,
|
|
11816
|
+
}), [I, C] = q({}), T = ka.find((S) => S.id === o), y = n.find((S) => S.id === m), w = n.find((S) => S.id === p);
|
|
11817
11817
|
ue(() => {
|
|
11818
11818
|
if (r && t)
|
|
11819
11819
|
if (c(r.label), r.calculatedFormula)
|
|
@@ -11844,13 +11844,13 @@ function pl({
|
|
|
11844
11844
|
}, [r, t, n]);
|
|
11845
11845
|
const E = () => {
|
|
11846
11846
|
const S = {};
|
|
11847
|
-
return l.trim() || (S.name = "Name is required"), o === "custom" ? f.trim() || (S.customExpression = "Custom expression is required") : o === "scale" ? (m || (S.inputA = "Please select a metric for input A"), (isNaN(b) || b === 0) && (S.constantFactor = "Please enter a valid non-zero number"), r && m === r.id && (S.circular = "Cannot reference the field being edited")) : (m || (S.inputA = "Please select a metric for input A"), p || (S.inputB = "Please select a metric for input B"), m === p && (S.inputs = "Inputs A and B must be different metrics"), r && (m === r.id || p === r.id) && (S.circular = "Cannot reference the field being edited")),
|
|
11847
|
+
return l.trim() || (S.name = "Name is required"), o === "custom" ? f.trim() || (S.customExpression = "Custom expression is required") : o === "scale" ? (m || (S.inputA = "Please select a metric for input A"), (isNaN(b) || b === 0) && (S.constantFactor = "Please enter a valid non-zero number"), r && m === r.id && (S.circular = "Cannot reference the field being edited")) : (m || (S.inputA = "Please select a metric for input A"), p || (S.inputB = "Please select a metric for input B"), m === p && (S.inputs = "Inputs A and B must be different metrics"), r && (m === r.id || p === r.id) && (S.circular = "Cannot reference the field being edited")), C(S), Object.keys(S).length === 0;
|
|
11848
11848
|
}, P = () => {
|
|
11849
11849
|
if (!E()) return;
|
|
11850
11850
|
const S = xd(
|
|
11851
11851
|
l,
|
|
11852
11852
|
o,
|
|
11853
|
-
|
|
11853
|
+
y || null,
|
|
11854
11854
|
w || null,
|
|
11855
11855
|
v,
|
|
11856
11856
|
d,
|
|
@@ -11860,7 +11860,7 @@ function pl({
|
|
|
11860
11860
|
);
|
|
11861
11861
|
i(S), N();
|
|
11862
11862
|
}, N = () => {
|
|
11863
|
-
c(""), u("ratio"), h(null), k(null), x(1), g(""),
|
|
11863
|
+
c(""), u("ratio"), h(null), k(null), x(1), g(""), C({}), s(!1);
|
|
11864
11864
|
};
|
|
11865
11865
|
return /* @__PURE__ */ a(St, { modal: !1, open: t, onOpenChange: s, children: [
|
|
11866
11866
|
t && /* @__PURE__ */ e("div", { className: "pointer-events-none fixed inset-0 z-40 bg-background/80 backdrop-blur-sm" }),
|
|
@@ -11937,7 +11937,7 @@ function pl({
|
|
|
11937
11937
|
/* @__PURE__ */ e("p", { className: "text-xs text-muted-foreground", children: "Write a SQL expression using column names from your data source" })
|
|
11938
11938
|
] }) : /* @__PURE__ */ a("div", { className: "rounded-md bg-muted p-3 font-mono text-sm", children: [
|
|
11939
11939
|
"= ",
|
|
11940
|
-
m &&
|
|
11940
|
+
m && y ? y.label : "A",
|
|
11941
11941
|
" ",
|
|
11942
11942
|
T == null ? void 0 : T.symbol,
|
|
11943
11943
|
" ",
|
|
@@ -12069,9 +12069,9 @@ function Ad({
|
|
|
12069
12069
|
handleAliasTemplateChange: v,
|
|
12070
12070
|
handleValueAliasesChange: F,
|
|
12071
12071
|
removeField: I,
|
|
12072
|
-
handleKpiComparisonTypeChange:
|
|
12072
|
+
handleKpiComparisonTypeChange: C,
|
|
12073
12073
|
handleKpiShowTrendlineChange: T,
|
|
12074
|
-
handleKpiTrendlineWindowChange:
|
|
12074
|
+
handleKpiTrendlineWindowChange: y,
|
|
12075
12075
|
handleKpiTrendlineGranularityChange: w,
|
|
12076
12076
|
handleKpiTargetValueChange: E
|
|
12077
12077
|
} = _s(k), [P, N] = q(!1), [S, O] = q(!1), [V, D] = q(!1), [R, A] = q(null), [z, U] = q(
|
|
@@ -12219,7 +12219,7 @@ function Ad({
|
|
|
12219
12219
|
H,
|
|
12220
12220
|
{
|
|
12221
12221
|
value: ((oe = k.config) == null ? void 0 : oe.comparisonType) || "none",
|
|
12222
|
-
onValueChange:
|
|
12222
|
+
onValueChange: C,
|
|
12223
12223
|
children: [
|
|
12224
12224
|
/* @__PURE__ */ e(Y, { className: "h-8 w-full text-xs", children: /* @__PURE__ */ e(W, { placeholder: "Select comparison type..." }) }),
|
|
12225
12225
|
/* @__PURE__ */ a(Q, { children: [
|
|
@@ -12255,7 +12255,7 @@ function Ad({
|
|
|
12255
12255
|
value: ((na = k.config) == null ? void 0 : na.trendlineWindow) || 30,
|
|
12256
12256
|
onChange: (ha) => {
|
|
12257
12257
|
const yl = parseInt(ha.target.value) || 30;
|
|
12258
|
-
|
|
12258
|
+
y(yl);
|
|
12259
12259
|
},
|
|
12260
12260
|
className: "h-8 text-xs",
|
|
12261
12261
|
placeholder: "30"
|
|
@@ -13040,10 +13040,10 @@ function Id({
|
|
|
13040
13040
|
sortByFields: d,
|
|
13041
13041
|
activeField: l
|
|
13042
13042
|
}) {
|
|
13043
|
-
var
|
|
13043
|
+
var y, w;
|
|
13044
13044
|
const [c, o] = q(() => gs.getItem("chart-selector-expanded") === "true"), [u, m] = q(!1), h = M((E) => E.card), p = M(
|
|
13045
13045
|
(E) => E.actions.updateCardConfig
|
|
13046
|
-
), k = n.length > 0 || r.length > 0 || i.length > 0, { data: b, autoJoinMetadata: x } = Fe(h), f = ((
|
|
13046
|
+
), k = n.length > 0 || r.length > 0 || i.length > 0, { data: b, autoJoinMetadata: x } = Fe(h), f = ((y = h == null ? void 0 : h.config) == null ? void 0 : y.joinPlan) || (x != null && x.autoResolved ? x.resolvedJoinPlan : {
|
|
13047
13047
|
baseEntity: {
|
|
13048
13048
|
type: "table",
|
|
13049
13049
|
name: "",
|
|
@@ -13066,7 +13066,7 @@ function Id({
|
|
|
13066
13066
|
}), m(!1);
|
|
13067
13067
|
}, I = () => {
|
|
13068
13068
|
m(!1);
|
|
13069
|
-
},
|
|
13069
|
+
}, C = () => {
|
|
13070
13070
|
m(!0);
|
|
13071
13071
|
};
|
|
13072
13072
|
ue(() => {
|
|
@@ -13135,7 +13135,7 @@ function Id({
|
|
|
13135
13135
|
) }),
|
|
13136
13136
|
/* @__PURE__ */ a(ta, { className: "w-full flex-1 basis-0 px-6 pb-6", children: [
|
|
13137
13137
|
/* @__PURE__ */ a("div", { className: "space-y-4", children: [
|
|
13138
|
-
/* @__PURE__ */ e(Od, { onEditJoins:
|
|
13138
|
+
/* @__PURE__ */ e(Od, { onEditJoins: C }),
|
|
13139
13139
|
/* @__PURE__ */ e(
|
|
13140
13140
|
Dd,
|
|
13141
13141
|
{
|
|
@@ -13179,7 +13179,7 @@ function Md({
|
|
|
13179
13179
|
groups: []
|
|
13180
13180
|
}
|
|
13181
13181
|
);
|
|
13182
|
-
M((
|
|
13182
|
+
M((C) => C.card.dataSource);
|
|
13183
13183
|
const { columns: i, isLoading: d } = ca(), c = s || i || [], o = {
|
|
13184
13184
|
id: "default",
|
|
13185
13185
|
qualifiedFieldName: "default",
|
|
@@ -13189,14 +13189,14 @@ function Md({
|
|
|
13189
13189
|
entityId: "default",
|
|
13190
13190
|
entityName: "Default",
|
|
13191
13191
|
entityType: "table"
|
|
13192
|
-
}, u = (
|
|
13193
|
-
const T = (
|
|
13194
|
-
if (
|
|
13192
|
+
}, u = (C) => {
|
|
13193
|
+
const T = (y) => {
|
|
13194
|
+
if (y.id === C) {
|
|
13195
13195
|
const w = c[0] || o, E = Ee(w.dataType) === "date";
|
|
13196
13196
|
return {
|
|
13197
|
-
...
|
|
13197
|
+
...y,
|
|
13198
13198
|
conditions: [
|
|
13199
|
-
...
|
|
13199
|
+
...y.conditions,
|
|
13200
13200
|
{
|
|
13201
13201
|
id: `condition-${Date.now()}`,
|
|
13202
13202
|
field: w,
|
|
@@ -13207,19 +13207,19 @@ function Md({
|
|
|
13207
13207
|
};
|
|
13208
13208
|
}
|
|
13209
13209
|
return {
|
|
13210
|
-
...
|
|
13211
|
-
groups:
|
|
13210
|
+
...y,
|
|
13211
|
+
groups: y.groups.map(T)
|
|
13212
13212
|
};
|
|
13213
13213
|
};
|
|
13214
13214
|
r(T(n));
|
|
13215
|
-
}, m = (
|
|
13216
|
-
const T = (
|
|
13217
|
-
if (
|
|
13215
|
+
}, m = (C) => {
|
|
13216
|
+
const T = (y) => {
|
|
13217
|
+
if (y.id === C) {
|
|
13218
13218
|
const w = c[0] || o, E = Ee(w.dataType) === "date";
|
|
13219
13219
|
return {
|
|
13220
|
-
...
|
|
13220
|
+
...y,
|
|
13221
13221
|
groups: [
|
|
13222
|
-
...
|
|
13222
|
+
...y.groups,
|
|
13223
13223
|
{
|
|
13224
13224
|
id: `group-${Date.now()}`,
|
|
13225
13225
|
logicalOperator: "AND",
|
|
@@ -13238,92 +13238,92 @@ function Md({
|
|
|
13238
13238
|
};
|
|
13239
13239
|
}
|
|
13240
13240
|
return {
|
|
13241
|
-
...
|
|
13242
|
-
groups:
|
|
13241
|
+
...y,
|
|
13242
|
+
groups: y.groups.map(T)
|
|
13243
13243
|
};
|
|
13244
13244
|
};
|
|
13245
13245
|
r(T(n));
|
|
13246
|
-
}, h = (
|
|
13247
|
-
const
|
|
13246
|
+
}, h = (C, T) => {
|
|
13247
|
+
const y = (w) => w.id === C ? {
|
|
13248
13248
|
...w,
|
|
13249
13249
|
conditions: w.conditions.filter((E) => E.id !== T)
|
|
13250
13250
|
} : {
|
|
13251
13251
|
...w,
|
|
13252
|
-
groups: w.groups.map(
|
|
13252
|
+
groups: w.groups.map(y)
|
|
13253
13253
|
};
|
|
13254
|
-
r(
|
|
13255
|
-
}, p = (
|
|
13256
|
-
const
|
|
13254
|
+
r(y(n));
|
|
13255
|
+
}, p = (C, T) => {
|
|
13256
|
+
const y = (w) => w.id === C ? {
|
|
13257
13257
|
...w,
|
|
13258
13258
|
groups: w.groups.filter((E) => E.id !== T)
|
|
13259
13259
|
} : {
|
|
13260
13260
|
...w,
|
|
13261
|
-
groups: w.groups.map(
|
|
13261
|
+
groups: w.groups.map(y)
|
|
13262
13262
|
};
|
|
13263
|
-
r(
|
|
13264
|
-
}, k = (
|
|
13265
|
-
if (
|
|
13263
|
+
r(y(n));
|
|
13264
|
+
}, k = (C, T, y, w) => {
|
|
13265
|
+
if (y === "field")
|
|
13266
13266
|
throw new Error(
|
|
13267
13267
|
"Use a dedicated method to update the field property with a Field object"
|
|
13268
13268
|
);
|
|
13269
|
-
const E = (P) => P.id ===
|
|
13269
|
+
const E = (P) => P.id === C ? {
|
|
13270
13270
|
...P,
|
|
13271
13271
|
conditions: P.conditions.map((N) => N.id === T ? {
|
|
13272
13272
|
...N,
|
|
13273
|
-
[
|
|
13273
|
+
[y]: w
|
|
13274
13274
|
} : N)
|
|
13275
13275
|
} : {
|
|
13276
13276
|
...P,
|
|
13277
13277
|
groups: P.groups.map(E)
|
|
13278
13278
|
};
|
|
13279
13279
|
r(E(n));
|
|
13280
|
-
}, b = (
|
|
13281
|
-
const w = (E) => E.id ===
|
|
13280
|
+
}, b = (C, T, y) => {
|
|
13281
|
+
const w = (E) => E.id === C ? {
|
|
13282
13282
|
...E,
|
|
13283
|
-
conditions: E.conditions.map((P) => P.id === T ? { ...P, ...
|
|
13283
|
+
conditions: E.conditions.map((P) => P.id === T ? { ...P, ...y } : P)
|
|
13284
13284
|
} : {
|
|
13285
13285
|
...E,
|
|
13286
13286
|
groups: E.groups.map(w)
|
|
13287
13287
|
};
|
|
13288
13288
|
r(w(n));
|
|
13289
|
-
}, x = (
|
|
13290
|
-
const
|
|
13289
|
+
}, x = (C, T) => {
|
|
13290
|
+
const y = (w) => w.id === C ? {
|
|
13291
13291
|
...w,
|
|
13292
13292
|
logicalOperator: T
|
|
13293
13293
|
} : {
|
|
13294
13294
|
...w,
|
|
13295
|
-
groups: w.groups.map(
|
|
13295
|
+
groups: w.groups.map(y)
|
|
13296
13296
|
};
|
|
13297
|
-
r(
|
|
13298
|
-
}, f = (
|
|
13299
|
-
const
|
|
13297
|
+
r(y(n));
|
|
13298
|
+
}, f = (C, T) => {
|
|
13299
|
+
const y = (w) => w.id === C ? {
|
|
13300
13300
|
...w,
|
|
13301
13301
|
negate: T
|
|
13302
13302
|
} : {
|
|
13303
13303
|
...w,
|
|
13304
|
-
groups: w.groups.map(
|
|
13304
|
+
groups: w.groups.map(y)
|
|
13305
13305
|
};
|
|
13306
|
-
r(
|
|
13307
|
-
}, g = (
|
|
13308
|
-
const w = (E) => E.id ===
|
|
13306
|
+
r(y(n));
|
|
13307
|
+
}, g = (C, T, y) => {
|
|
13308
|
+
const w = (E) => E.id === C ? {
|
|
13309
13309
|
...E,
|
|
13310
|
-
conditions: Sa(E.conditions, T,
|
|
13310
|
+
conditions: Sa(E.conditions, T, y)
|
|
13311
13311
|
} : {
|
|
13312
13312
|
...E,
|
|
13313
13313
|
groups: E.groups.map(w)
|
|
13314
13314
|
};
|
|
13315
13315
|
r(w(n));
|
|
13316
|
-
}, v = (
|
|
13317
|
-
const w = (E) => E.id ===
|
|
13316
|
+
}, v = (C, T, y) => {
|
|
13317
|
+
const w = (E) => E.id === C ? {
|
|
13318
13318
|
...E,
|
|
13319
|
-
groups: Sa(E.groups, T,
|
|
13319
|
+
groups: Sa(E.groups, T, y)
|
|
13320
13320
|
} : {
|
|
13321
13321
|
...E,
|
|
13322
13322
|
groups: E.groups.map(w)
|
|
13323
13323
|
};
|
|
13324
13324
|
r(w(n));
|
|
13325
|
-
}, F = (
|
|
13326
|
-
if (!
|
|
13325
|
+
}, F = (C) => {
|
|
13326
|
+
if (!C || C.conditions.length === 0 && C.groups.length === 0)
|
|
13327
13327
|
return "-- No filters defined";
|
|
13328
13328
|
const T = (w) => {
|
|
13329
13329
|
let E = "";
|
|
@@ -13363,15 +13363,15 @@ function Md({
|
|
|
13363
13363
|
default:
|
|
13364
13364
|
return `${E} ${P} ${N}`;
|
|
13365
13365
|
}
|
|
13366
|
-
},
|
|
13366
|
+
}, y = (w) => {
|
|
13367
13367
|
const E = w.conditions.map(T), P = w.groups.map(
|
|
13368
|
-
(V) =>
|
|
13368
|
+
(V) => y(V)
|
|
13369
13369
|
), N = [...E, ...P].filter(Boolean);
|
|
13370
13370
|
if (N.length === 0) return "";
|
|
13371
13371
|
const S = N.join(` ${w.logicalOperator} `), O = N.length > 1 ? `(${S})` : S;
|
|
13372
13372
|
return w.negate ? `NOT ${O}` : O;
|
|
13373
13373
|
};
|
|
13374
|
-
return C
|
|
13374
|
+
return y(C);
|
|
13375
13375
|
}, I = n.conditions.length > 0 || n.groups.length > 0;
|
|
13376
13376
|
return {
|
|
13377
13377
|
currentFilters: n,
|
|
@@ -14010,11 +14010,11 @@ function _d({
|
|
|
14010
14010
|
setNodeRef: v,
|
|
14011
14011
|
transform: F,
|
|
14012
14012
|
transition: I,
|
|
14013
|
-
isDragging:
|
|
14013
|
+
isDragging: C
|
|
14014
14014
|
} = Fa({ id: t.id }), T = {
|
|
14015
14015
|
transform: Pa.Transform.toString(F),
|
|
14016
14016
|
transition: I
|
|
14017
|
-
},
|
|
14017
|
+
}, y = (E) => {
|
|
14018
14018
|
const { active: P, over: N } = E;
|
|
14019
14019
|
if (N && P.id !== N.id) {
|
|
14020
14020
|
const S = t.conditions.findIndex(
|
|
@@ -14036,7 +14036,7 @@ function _d({
|
|
|
14036
14036
|
{
|
|
14037
14037
|
ref: v,
|
|
14038
14038
|
style: T,
|
|
14039
|
-
className: `rounded-lg ${s > 0 ? "mt-2 border border-border" : ""} ${
|
|
14039
|
+
className: `rounded-lg ${s > 0 ? "mt-2 border border-border" : ""} ${C ? "z-50 opacity-50" : ""}`,
|
|
14040
14040
|
children: [
|
|
14041
14041
|
s > 0 && /* @__PURE__ */ a("div", { className: "flex items-center justify-between rounded-t-lg bg-muted p-2", children: [
|
|
14042
14042
|
/* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
|
|
@@ -14097,7 +14097,7 @@ function _d({
|
|
|
14097
14097
|
})
|
|
14098
14098
|
),
|
|
14099
14099
|
collisionDetection: It,
|
|
14100
|
-
onDragEnd:
|
|
14100
|
+
onDragEnd: y,
|
|
14101
14101
|
children: /* @__PURE__ */ e(
|
|
14102
14102
|
gt,
|
|
14103
14103
|
{
|
|
@@ -14206,12 +14206,12 @@ function Jd({
|
|
|
14206
14206
|
} = Md({
|
|
14207
14207
|
initialFilters: t,
|
|
14208
14208
|
availableFields: s
|
|
14209
|
-
}),
|
|
14209
|
+
}), C = ia(
|
|
14210
14210
|
dt(oa),
|
|
14211
14211
|
dt(sn, {
|
|
14212
14212
|
coordinateGetter: nn
|
|
14213
14213
|
})
|
|
14214
|
-
), [T,
|
|
14214
|
+
), [T, y] = q(!1), w = (N, S, O) => {
|
|
14215
14215
|
const V = (D) => D.id === N ? {
|
|
14216
14216
|
...D,
|
|
14217
14217
|
conditions: D.conditions.map((R) => R.id === S ? {
|
|
@@ -14228,7 +14228,7 @@ function Jd({
|
|
|
14228
14228
|
/* @__PURE__ */ e(
|
|
14229
14229
|
Ot,
|
|
14230
14230
|
{
|
|
14231
|
-
sensors:
|
|
14231
|
+
sensors: C,
|
|
14232
14232
|
collisionDetection: It,
|
|
14233
14233
|
onDragEnd: (V) => {
|
|
14234
14234
|
const { active: D, over: R } = V;
|
|
@@ -14269,7 +14269,7 @@ function Jd({
|
|
|
14269
14269
|
/* @__PURE__ */ e(
|
|
14270
14270
|
Ot,
|
|
14271
14271
|
{
|
|
14272
|
-
sensors:
|
|
14272
|
+
sensors: C,
|
|
14273
14273
|
collisionDetection: It,
|
|
14274
14274
|
onDragEnd: (V) => {
|
|
14275
14275
|
const { active: D, over: R } = V;
|
|
@@ -14356,7 +14356,7 @@ function Jd({
|
|
|
14356
14356
|
{
|
|
14357
14357
|
id: "advanced-mode",
|
|
14358
14358
|
checked: T,
|
|
14359
|
-
onCheckedChange: (N) =>
|
|
14359
|
+
onCheckedChange: (N) => y(N)
|
|
14360
14360
|
}
|
|
14361
14361
|
),
|
|
14362
14362
|
/* @__PURE__ */ e(
|
|
@@ -14457,10 +14457,10 @@ function Yd({
|
|
|
14457
14457
|
d(null);
|
|
14458
14458
|
return;
|
|
14459
14459
|
}
|
|
14460
|
-
const
|
|
14460
|
+
const C = F.id, T = I.id, y = p(C), w = p(T) || T;
|
|
14461
14461
|
if (w === "sortBy") {
|
|
14462
|
-
if (
|
|
14463
|
-
const P = s.find((S) => S.id ===
|
|
14462
|
+
if (y === "source") {
|
|
14463
|
+
const P = s.find((S) => S.id === C);
|
|
14464
14464
|
if (!P) {
|
|
14465
14465
|
d(null);
|
|
14466
14466
|
return;
|
|
@@ -14473,16 +14473,16 @@ function Yd({
|
|
|
14473
14473
|
d(null);
|
|
14474
14474
|
return;
|
|
14475
14475
|
}
|
|
14476
|
-
} else if (
|
|
14476
|
+
} else if (y === "pivotBy") {
|
|
14477
14477
|
d(null);
|
|
14478
14478
|
return;
|
|
14479
|
-
} else if (
|
|
14479
|
+
} else if (y !== "groupBy" && y !== "metrics" && y !== "sortBy") {
|
|
14480
14480
|
d(null);
|
|
14481
14481
|
return;
|
|
14482
14482
|
}
|
|
14483
14483
|
}
|
|
14484
|
-
if (
|
|
14485
|
-
const P = [...s].find((V) => V.id ===
|
|
14484
|
+
if (y === "source" && w === "sortBy") {
|
|
14485
|
+
const P = [...s].find((V) => V.id === C);
|
|
14486
14486
|
if (!P) {
|
|
14487
14487
|
d(null);
|
|
14488
14488
|
return;
|
|
@@ -14513,8 +14513,8 @@ function Yd({
|
|
|
14513
14513
|
d(null), r("sortBy", [...N, O]);
|
|
14514
14514
|
return;
|
|
14515
14515
|
}
|
|
14516
|
-
if (
|
|
14517
|
-
const P = [...s].find((R) => R.id ===
|
|
14516
|
+
if (y === "source" && w !== "source" && w !== "sortBy") {
|
|
14517
|
+
const P = [...s].find((R) => R.id === C);
|
|
14518
14518
|
if (!P) {
|
|
14519
14519
|
d(null);
|
|
14520
14520
|
return;
|
|
@@ -14590,8 +14590,8 @@ function Yd({
|
|
|
14590
14590
|
);
|
|
14591
14591
|
return;
|
|
14592
14592
|
}
|
|
14593
|
-
if (
|
|
14594
|
-
const P = n(
|
|
14593
|
+
if (y && w && y !== "source" && w !== "source" && y !== w) {
|
|
14594
|
+
const P = n(y), N = n(w), S = P.find((A) => A.id === C);
|
|
14595
14595
|
if (!S) {
|
|
14596
14596
|
d(null);
|
|
14597
14597
|
return;
|
|
@@ -14619,9 +14619,9 @@ function Yd({
|
|
|
14619
14619
|
return;
|
|
14620
14620
|
}
|
|
14621
14621
|
const D = P.filter(
|
|
14622
|
-
(A) => A.id !==
|
|
14622
|
+
(A) => A.id !== C
|
|
14623
14623
|
), R = [...N, V];
|
|
14624
|
-
r(
|
|
14624
|
+
r(y, D), r(w, R), w === "metrics" && t && Xn(
|
|
14625
14625
|
l.type,
|
|
14626
14626
|
l.config,
|
|
14627
14627
|
c,
|
|
@@ -14631,11 +14631,11 @@ function Yd({
|
|
|
14631
14631
|
);
|
|
14632
14632
|
return;
|
|
14633
14633
|
}
|
|
14634
|
-
if (
|
|
14635
|
-
const P = n(
|
|
14634
|
+
if (y && w && y === w && y !== "source") {
|
|
14635
|
+
const P = n(y), N = P.findIndex((O) => O.id === C), S = P.findIndex((O) => O.id === T);
|
|
14636
14636
|
if (N !== S) {
|
|
14637
14637
|
const O = Sa(P, N, S);
|
|
14638
|
-
r(
|
|
14638
|
+
r(y, O);
|
|
14639
14639
|
}
|
|
14640
14640
|
}
|
|
14641
14641
|
d(null);
|
|
@@ -14819,7 +14819,7 @@ function au({
|
|
|
14819
14819
|
var pe, ie, we;
|
|
14820
14820
|
const u = M((re) => re.card), m = ye((re) => re.filterValues), h = ye((re) => re.selectedSheetId), p = ye(
|
|
14821
14821
|
(re) => re.inlineFilterValuesMap[(d == null ? void 0 : d.id) || ""]
|
|
14822
|
-
), { updateCardConfig: k, setCard: b, updateCardInFrame: x, setShowAIDialog: f } = ne(), g = M((re) => re.showAIDialog), v = ye((re) => re.isVisualEditing), [F, I] = q(!1), [
|
|
14822
|
+
), { updateCardConfig: k, setCard: b, updateCardInFrame: x, setShowAIDialog: f } = ne(), g = M((re) => re.showAIDialog), v = ye((re) => re.isVisualEditing), [F, I] = q(!1), [C, T] = q(!1), [y, w] = q(
|
|
14823
14823
|
null
|
|
14824
14824
|
), { config: E } = An(gn).tokenProps, P = (E == null ? void 0 : E.showInfoTab) !== !1, [N, S] = tu();
|
|
14825
14825
|
M(
|
|
@@ -15066,12 +15066,12 @@ function au({
|
|
|
15066
15066
|
(O == null ? void 0 : O.sql) && /* @__PURE__ */ e(nl, { sql: O.sql, showCardDetails: !0 })
|
|
15067
15067
|
) }) })
|
|
15068
15068
|
] }),
|
|
15069
|
-
|
|
15069
|
+
y && /* @__PURE__ */ e(
|
|
15070
15070
|
Os,
|
|
15071
15071
|
{
|
|
15072
|
-
open:
|
|
15072
|
+
open: C,
|
|
15073
15073
|
onOpenChange: T,
|
|
15074
|
-
feedbackData:
|
|
15074
|
+
feedbackData: y
|
|
15075
15075
|
}
|
|
15076
15076
|
)
|
|
15077
15077
|
] })
|
|
@@ -15143,13 +15143,13 @@ function lu({ column: t, isSelected: s, onSelect: n, availableFields: r, width:
|
|
|
15143
15143
|
X ? m(l.id, X) : c(l.id, { filters: void 0 });
|
|
15144
15144
|
}, {
|
|
15145
15145
|
attributes: I,
|
|
15146
|
-
listeners:
|
|
15146
|
+
listeners: C,
|
|
15147
15147
|
setNodeRef: T,
|
|
15148
|
-
transform:
|
|
15148
|
+
transform: y,
|
|
15149
15149
|
transition: w,
|
|
15150
15150
|
isDragging: E
|
|
15151
15151
|
} = Fa({ id: t.id }), P = {
|
|
15152
|
-
transform: Pa.Transform.toString(
|
|
15152
|
+
transform: Pa.Transform.toString(y),
|
|
15153
15153
|
transition: w
|
|
15154
15154
|
}, N = Ee(t.dataType), S = ru(N), O = () => {
|
|
15155
15155
|
var ae;
|
|
@@ -15241,7 +15241,7 @@ function lu({ column: t, isSelected: s, onSelect: n, availableFields: r, width:
|
|
|
15241
15241
|
"button",
|
|
15242
15242
|
{
|
|
15243
15243
|
...I,
|
|
15244
|
-
...
|
|
15244
|
+
...C,
|
|
15245
15245
|
className: "cursor-grab p-1 text-muted-foreground opacity-0 transition-opacity hover:text-foreground group-hover:opacity-100 active:cursor-grabbing",
|
|
15246
15246
|
children: /* @__PURE__ */ e(ea, { className: "h-3 w-3" })
|
|
15247
15247
|
}
|
|
@@ -15413,7 +15413,7 @@ function iu({
|
|
|
15413
15413
|
})
|
|
15414
15414
|
), I = (S) => {
|
|
15415
15415
|
c(S.active.id);
|
|
15416
|
-
},
|
|
15416
|
+
}, C = (S) => {
|
|
15417
15417
|
const { active: O, over: V } = S;
|
|
15418
15418
|
if (c(null), !V || O.id === V.id) return;
|
|
15419
15419
|
const D = p.findIndex((A) => A.id === O.id), R = p.findIndex((A) => A.id === V.id);
|
|
@@ -15424,7 +15424,7 @@ function iu({
|
|
|
15424
15424
|
metricColumns: U
|
|
15425
15425
|
});
|
|
15426
15426
|
}
|
|
15427
|
-
}, T = l ? p.find((S) => S.id === l) : null,
|
|
15427
|
+
}, T = l ? p.find((S) => S.id === l) : null, y = (S) => {
|
|
15428
15428
|
let O = "";
|
|
15429
15429
|
for (; S >= 0; )
|
|
15430
15430
|
O = String.fromCharCode(S % 26 + 65) + O, S = Math.floor(S / 26) - 1;
|
|
@@ -15440,7 +15440,7 @@ function iu({
|
|
|
15440
15440
|
sensors: F,
|
|
15441
15441
|
collisionDetection: It,
|
|
15442
15442
|
onDragStart: I,
|
|
15443
|
-
onDragEnd:
|
|
15443
|
+
onDragEnd: C,
|
|
15444
15444
|
children: [
|
|
15445
15445
|
/* @__PURE__ */ a("table", { className: "w-full border-collapse", children: [
|
|
15446
15446
|
/* @__PURE__ */ a("thead", { children: [
|
|
@@ -15459,7 +15459,7 @@ function iu({
|
|
|
15459
15459
|
minWidth: o[S.id] ? `${o[S.id]}px` : "120px"
|
|
15460
15460
|
},
|
|
15461
15461
|
className: "border-r border-border bg-muted/30 px-2 py-1 text-center text-xs font-medium text-muted-foreground",
|
|
15462
|
-
children:
|
|
15462
|
+
children: y(O)
|
|
15463
15463
|
},
|
|
15464
15464
|
`letter-${S.id}`
|
|
15465
15465
|
))
|
|
@@ -15616,15 +15616,15 @@ function cu({
|
|
|
15616
15616
|
isLoading: s = !1
|
|
15617
15617
|
}) {
|
|
15618
15618
|
var F, I;
|
|
15619
|
-
const n = M((
|
|
15619
|
+
const n = M((C) => C.card), { updateCardConfig: r, removeGroupByColumn: i, removeMetricColumn: d } = ne(), [l, c] = q(!0), [o, u] = q(""), [m, h] = q(/* @__PURE__ */ new Set()), p = ((F = n == null ? void 0 : n.config) == null ? void 0 : F.groupByColumns) || [], k = ((I = n == null ? void 0 : n.config) == null ? void 0 : I.metricColumns) || [], b = (C) => {
|
|
15620
15620
|
const T = new Set(m);
|
|
15621
|
-
T.has(
|
|
15622
|
-
}, x = (
|
|
15621
|
+
T.has(C) ? T.delete(C) : T.add(C), h(T);
|
|
15622
|
+
}, x = (C) => p.some((T) => T.name === C.name && T.qualifiedEntityName === C.qualifiedEntityName) || k.some((T) => T.name === C.name && T.qualifiedEntityName === C.qualifiedEntityName), f = (C, T) => {
|
|
15623
15623
|
if (T)
|
|
15624
|
-
if (Ee(
|
|
15624
|
+
if (Ee(C.dataType) === "number") {
|
|
15625
15625
|
const w = {
|
|
15626
|
-
...
|
|
15627
|
-
id: `metric-${
|
|
15626
|
+
...C,
|
|
15627
|
+
id: `metric-${C.id}-${Date.now()}`,
|
|
15628
15628
|
role: "metric",
|
|
15629
15629
|
aggregate: "SUM"
|
|
15630
15630
|
};
|
|
@@ -15633,8 +15633,8 @@ function cu({
|
|
|
15633
15633
|
});
|
|
15634
15634
|
} else {
|
|
15635
15635
|
const w = {
|
|
15636
|
-
...
|
|
15637
|
-
id: `groupby-${
|
|
15636
|
+
...C,
|
|
15637
|
+
id: `groupby-${C.id}-${Date.now()}`,
|
|
15638
15638
|
role: "groupby"
|
|
15639
15639
|
};
|
|
15640
15640
|
r(n.id, {
|
|
@@ -15642,21 +15642,21 @@ function cu({
|
|
|
15642
15642
|
});
|
|
15643
15643
|
}
|
|
15644
15644
|
else {
|
|
15645
|
-
const
|
|
15646
|
-
(E) => E.name ===
|
|
15645
|
+
const y = p.findIndex(
|
|
15646
|
+
(E) => E.name === C.name && E.qualifiedEntityName === C.qualifiedEntityName
|
|
15647
15647
|
), w = k.findIndex(
|
|
15648
|
-
(E) => E.name ===
|
|
15648
|
+
(E) => E.name === C.name && E.qualifiedEntityName === C.qualifiedEntityName
|
|
15649
15649
|
);
|
|
15650
|
-
|
|
15650
|
+
y !== -1 && i(n.id, p[y].id), w !== -1 && d(n.id, k[w].id);
|
|
15651
15651
|
}
|
|
15652
|
-
}, g = (
|
|
15653
|
-
if (!o) return
|
|
15652
|
+
}, g = (C) => {
|
|
15653
|
+
if (!o) return C;
|
|
15654
15654
|
const T = o.toLowerCase();
|
|
15655
|
-
return
|
|
15656
|
-
(
|
|
15655
|
+
return C.filter(
|
|
15656
|
+
(y) => y.name.toLowerCase().includes(T) || y.label && y.label.toLowerCase().includes(T)
|
|
15657
15657
|
);
|
|
15658
|
-
}, v = (
|
|
15659
|
-
switch (Ee(
|
|
15658
|
+
}, v = (C) => {
|
|
15659
|
+
switch (Ee(C)) {
|
|
15660
15660
|
case "number":
|
|
15661
15661
|
return ma;
|
|
15662
15662
|
case "date":
|
|
@@ -15687,7 +15687,7 @@ function cu({
|
|
|
15687
15687
|
{
|
|
15688
15688
|
placeholder: "Search columns...",
|
|
15689
15689
|
value: o,
|
|
15690
|
-
onChange: (
|
|
15690
|
+
onChange: (C) => u(C.target.value),
|
|
15691
15691
|
className: "h-8 pl-8 text-sm"
|
|
15692
15692
|
}
|
|
15693
15693
|
)
|
|
@@ -15700,8 +15700,8 @@ function cu({
|
|
|
15700
15700
|
/* @__PURE__ */ e("span", { children: "Groupings" }),
|
|
15701
15701
|
/* @__PURE__ */ e("span", { className: "ml-auto text-xs text-muted-foreground", children: p.length })
|
|
15702
15702
|
] }),
|
|
15703
|
-
/* @__PURE__ */ e(ht, { children: /* @__PURE__ */ e("div", { className: "space-y-0.5 px-3 pb-2", children: p.map((
|
|
15704
|
-
const T = v(
|
|
15703
|
+
/* @__PURE__ */ e(ht, { children: /* @__PURE__ */ e("div", { className: "space-y-0.5 px-3 pb-2", children: p.map((C) => {
|
|
15704
|
+
const T = v(C.dataType);
|
|
15705
15705
|
return /* @__PURE__ */ a(
|
|
15706
15706
|
"div",
|
|
15707
15707
|
{
|
|
@@ -15709,20 +15709,20 @@ function cu({
|
|
|
15709
15709
|
children: [
|
|
15710
15710
|
/* @__PURE__ */ e(ea, { className: "h-3 w-3 cursor-grab text-muted-foreground opacity-0 transition-opacity group-hover:opacity-100" }),
|
|
15711
15711
|
/* @__PURE__ */ e(T, { className: "h-3.5 w-3.5 text-muted-foreground" }),
|
|
15712
|
-
/* @__PURE__ */ e("span", { className: "flex-1 truncate", children:
|
|
15712
|
+
/* @__PURE__ */ e("span", { className: "flex-1 truncate", children: C.label || C.name }),
|
|
15713
15713
|
/* @__PURE__ */ e(
|
|
15714
15714
|
K,
|
|
15715
15715
|
{
|
|
15716
15716
|
variant: "ghost",
|
|
15717
15717
|
size: "sm",
|
|
15718
15718
|
className: "h-5 w-5 p-0 opacity-0 transition-opacity group-hover:opacity-100",
|
|
15719
|
-
onClick: () => i(n.id,
|
|
15719
|
+
onClick: () => i(n.id, C.id),
|
|
15720
15720
|
children: /* @__PURE__ */ e(Ae, { className: "h-3 w-3" })
|
|
15721
15721
|
}
|
|
15722
15722
|
)
|
|
15723
15723
|
]
|
|
15724
15724
|
},
|
|
15725
|
-
|
|
15725
|
+
C.id
|
|
15726
15726
|
);
|
|
15727
15727
|
}) }) })
|
|
15728
15728
|
] }),
|
|
@@ -15733,8 +15733,8 @@ function cu({
|
|
|
15733
15733
|
/* @__PURE__ */ e("span", { children: "Metrics" }),
|
|
15734
15734
|
/* @__PURE__ */ e("span", { className: "ml-auto text-xs text-muted-foreground", children: k.length })
|
|
15735
15735
|
] }),
|
|
15736
|
-
/* @__PURE__ */ e(ht, { children: /* @__PURE__ */ e("div", { className: "space-y-0.5 px-3 pb-2", children: k.map((
|
|
15737
|
-
const T = v(
|
|
15736
|
+
/* @__PURE__ */ e(ht, { children: /* @__PURE__ */ e("div", { className: "space-y-0.5 px-3 pb-2", children: k.map((C) => {
|
|
15737
|
+
const T = v(C.dataType);
|
|
15738
15738
|
return /* @__PURE__ */ a(
|
|
15739
15739
|
"div",
|
|
15740
15740
|
{
|
|
@@ -15742,34 +15742,34 @@ function cu({
|
|
|
15742
15742
|
children: [
|
|
15743
15743
|
/* @__PURE__ */ e(ea, { className: "h-3 w-3 cursor-grab text-muted-foreground opacity-0 transition-opacity group-hover:opacity-100" }),
|
|
15744
15744
|
/* @__PURE__ */ e(T, { className: "h-3.5 w-3.5 text-muted-foreground" }),
|
|
15745
|
-
/* @__PURE__ */ e("span", { className: "flex-1 truncate", children:
|
|
15746
|
-
/* @__PURE__ */ e("span", { className: "text-xs text-muted-foreground", children:
|
|
15745
|
+
/* @__PURE__ */ e("span", { className: "flex-1 truncate", children: C.label || C.name }),
|
|
15746
|
+
/* @__PURE__ */ e("span", { className: "text-xs text-muted-foreground", children: C.aggregate }),
|
|
15747
15747
|
/* @__PURE__ */ e(
|
|
15748
15748
|
K,
|
|
15749
15749
|
{
|
|
15750
15750
|
variant: "ghost",
|
|
15751
15751
|
size: "sm",
|
|
15752
15752
|
className: "h-5 w-5 p-0 opacity-0 transition-opacity group-hover:opacity-100",
|
|
15753
|
-
onClick: () => d(n.id,
|
|
15753
|
+
onClick: () => d(n.id, C.id),
|
|
15754
15754
|
children: /* @__PURE__ */ e(Ae, { className: "h-3 w-3" })
|
|
15755
15755
|
}
|
|
15756
15756
|
)
|
|
15757
15757
|
]
|
|
15758
15758
|
},
|
|
15759
|
-
|
|
15759
|
+
C.id
|
|
15760
15760
|
);
|
|
15761
15761
|
}) }) })
|
|
15762
15762
|
] })
|
|
15763
15763
|
] }),
|
|
15764
|
-
/* @__PURE__ */ e(ta, { className: "flex-1", children: /* @__PURE__ */ e("div", { className: "p-2", children: s ? /* @__PURE__ */ e("div", { className: "flex items-center justify-center py-8", children: /* @__PURE__ */ e("div", { className: "h-6 w-6 animate-spin rounded-full border-2 border-muted-foreground border-t-transparent" }) }) : t.length === 0 ? /* @__PURE__ */ e("div", { className: "py-8 text-center text-sm text-muted-foreground", children: "No columns available" }) : t.map((
|
|
15765
|
-
const T = g(
|
|
15764
|
+
/* @__PURE__ */ e(ta, { className: "flex-1", children: /* @__PURE__ */ e("div", { className: "p-2", children: s ? /* @__PURE__ */ e("div", { className: "flex items-center justify-center py-8", children: /* @__PURE__ */ e("div", { className: "h-6 w-6 animate-spin rounded-full border-2 border-muted-foreground border-t-transparent" }) }) : t.length === 0 ? /* @__PURE__ */ e("div", { className: "py-8 text-center text-sm text-muted-foreground", children: "No columns available" }) : t.map((C) => {
|
|
15765
|
+
const T = g(C.columns);
|
|
15766
15766
|
if (T.length === 0) return null;
|
|
15767
|
-
const
|
|
15767
|
+
const y = m.has(C.entityId) || o.length > 0;
|
|
15768
15768
|
return /* @__PURE__ */ a(
|
|
15769
15769
|
at,
|
|
15770
15770
|
{
|
|
15771
|
-
open:
|
|
15772
|
-
onOpenChange: () => b(
|
|
15771
|
+
open: y,
|
|
15772
|
+
onOpenChange: () => b(C.entityId),
|
|
15773
15773
|
children: [
|
|
15774
15774
|
/* @__PURE__ */ a(mt, { className: "flex w-full items-center gap-2 rounded px-2 py-1.5 text-sm font-medium hover:bg-muted/50", children: [
|
|
15775
15775
|
/* @__PURE__ */ e(
|
|
@@ -15777,12 +15777,12 @@ function cu({
|
|
|
15777
15777
|
{
|
|
15778
15778
|
className: Z(
|
|
15779
15779
|
"h-3.5 w-3.5 transition-transform duration-200",
|
|
15780
|
-
|
|
15780
|
+
y && "rotate-90"
|
|
15781
15781
|
)
|
|
15782
15782
|
}
|
|
15783
15783
|
),
|
|
15784
15784
|
/* @__PURE__ */ e(pn, { className: "h-3.5 w-3.5 text-muted-foreground" }),
|
|
15785
|
-
/* @__PURE__ */ e("span", { className: "flex-1 truncate text-left", children:
|
|
15785
|
+
/* @__PURE__ */ e("span", { className: "flex-1 truncate text-left", children: C.label || C.entityName }),
|
|
15786
15786
|
/* @__PURE__ */ e("span", { className: "text-xs text-muted-foreground", children: T.length })
|
|
15787
15787
|
] }),
|
|
15788
15788
|
/* @__PURE__ */ e(ht, { children: /* @__PURE__ */ e("div", { className: "ml-4 space-y-0.5 border-l border-border pl-2", children: T.map((w) => {
|
|
@@ -15812,7 +15812,7 @@ function cu({
|
|
|
15812
15812
|
}) }) })
|
|
15813
15813
|
]
|
|
15814
15814
|
},
|
|
15815
|
-
|
|
15815
|
+
C.entityId
|
|
15816
15816
|
);
|
|
15817
15817
|
}) }) })
|
|
15818
15818
|
] }) : /* @__PURE__ */ e("div", { className: "flex h-full items-start border-l border-border bg-muted/30 p-2", children: /* @__PURE__ */ e(
|
|
@@ -16061,9 +16061,9 @@ function hu() {
|
|
|
16061
16061
|
);
|
|
16062
16062
|
const { addCard: x, removeCard: f, updateCard: g, setActiveCard: v, updateFilters: F } = ne(), {
|
|
16063
16063
|
columns: I = [],
|
|
16064
|
-
isLoading:
|
|
16064
|
+
isLoading: C,
|
|
16065
16065
|
error: T
|
|
16066
|
-
} = ca(),
|
|
16066
|
+
} = ca(), y = ia(
|
|
16067
16067
|
dt(oa, {
|
|
16068
16068
|
activationConstraint: {
|
|
16069
16069
|
distance: 8
|
|
@@ -16097,7 +16097,7 @@ function hu() {
|
|
|
16097
16097
|
return /* @__PURE__ */ a(
|
|
16098
16098
|
Ot,
|
|
16099
16099
|
{
|
|
16100
|
-
sensors:
|
|
16100
|
+
sensors: y,
|
|
16101
16101
|
collisionDetection: It,
|
|
16102
16102
|
onDragStart: S,
|
|
16103
16103
|
onDragEnd: O,
|
|
@@ -16136,7 +16136,7 @@ function hu() {
|
|
|
16136
16136
|
activeCard: w,
|
|
16137
16137
|
dataSourceState: b.dataSource || Ks,
|
|
16138
16138
|
columns: I,
|
|
16139
|
-
columnsLoading:
|
|
16139
|
+
columnsLoading: C,
|
|
16140
16140
|
columnsError: T,
|
|
16141
16141
|
getFieldsForContainer: E,
|
|
16142
16142
|
cards: k.cards,
|
|
@@ -16187,8 +16187,8 @@ function pu({ authToken: t, onSave: s, onClose: n }) {
|
|
|
16187
16187
|
}, [s, f, n, g]), ue(() => {
|
|
16188
16188
|
t && t.accessToken && b(t);
|
|
16189
16189
|
}, [t, b]), ue(() => {
|
|
16190
|
-
var T,
|
|
16191
|
-
i ? ((T = r.current) == null || T.resize(40), c("editor", !0), v("editor")) : ((
|
|
16190
|
+
var T, y;
|
|
16191
|
+
i ? ((T = r.current) == null || T.resize(40), c("editor", !0), v("editor")) : ((y = r.current) == null || y.resize(0), c("editor", !1), m === "editor" && l(null), v(null));
|
|
16192
16192
|
}, [
|
|
16193
16193
|
i,
|
|
16194
16194
|
c,
|
|
@@ -16197,7 +16197,8 @@ function pu({ authToken: t, onSave: s, onClose: n }) {
|
|
|
16197
16197
|
m
|
|
16198
16198
|
]);
|
|
16199
16199
|
function F(T) {
|
|
16200
|
-
|
|
16200
|
+
var y;
|
|
16201
|
+
T < 1 ? (x(!1), c("editor", !1), m === "editor" && l(null), v(null), (y = r.current) == null || y.resize(0)) : (i || (x(!0), v("editor")), u.isOpen || c("editor", !0));
|
|
16201
16202
|
}
|
|
16202
16203
|
function I() {
|
|
16203
16204
|
return /* @__PURE__ */ a(ce, { children: [
|
|
@@ -16215,7 +16216,7 @@ function pu({ authToken: t, onSave: s, onClose: n }) {
|
|
|
16215
16216
|
direction: "horizontal",
|
|
16216
16217
|
children: [
|
|
16217
16218
|
/* @__PURE__ */ e(Le, { className: "min-w-[510px] rounded-none", children: /* @__PURE__ */ e(md, {}) }),
|
|
16218
|
-
/* @__PURE__ */ e(Dt, {}),
|
|
16219
|
+
/* @__PURE__ */ e(Dt, { disabled: !i }),
|
|
16219
16220
|
/* @__PURE__ */ e(
|
|
16220
16221
|
Le,
|
|
16221
16222
|
{
|
|
@@ -16250,7 +16251,7 @@ function pu({ authToken: t, onSave: s, onClose: n }) {
|
|
|
16250
16251
|
] })
|
|
16251
16252
|
] });
|
|
16252
16253
|
}
|
|
16253
|
-
function
|
|
16254
|
+
function C() {
|
|
16254
16255
|
return /* @__PURE__ */ a("div", { className: "relative flex h-full grow", children: [
|
|
16255
16256
|
/* @__PURE__ */ a(
|
|
16256
16257
|
Et,
|
|
@@ -16263,7 +16264,7 @@ function pu({ authToken: t, onSave: s, onClose: n }) {
|
|
|
16263
16264
|
direction: "horizontal",
|
|
16264
16265
|
children: [
|
|
16265
16266
|
/* @__PURE__ */ e(Le, { className: "min-w-[510px] grow rounded-none", children: /* @__PURE__ */ e(hu, {}) }),
|
|
16266
|
-
/* @__PURE__ */ e(Dt, {}),
|
|
16267
|
+
/* @__PURE__ */ e(Dt, { disabled: !i }),
|
|
16267
16268
|
/* @__PURE__ */ e(
|
|
16268
16269
|
Le,
|
|
16269
16270
|
{
|
|
@@ -16304,7 +16305,7 @@ function pu({ authToken: t, onSave: s, onClose: n }) {
|
|
|
16304
16305
|
"data-content": "editor-panel",
|
|
16305
16306
|
children: I()
|
|
16306
16307
|
}
|
|
16307
|
-
) :
|
|
16308
|
+
) : C() });
|
|
16308
16309
|
}
|
|
16309
16310
|
function vu() {
|
|
16310
16311
|
ye((l) => l.selectedCardId);
|