react-semaphor 0.1.565 → 0.1.566
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/assistant-context/index.js +1 -1
- package/dist/briefings/index.js +50 -46
- package/dist/chunks/{assistant-chat-DNfb5fbF.js → assistant-chat-DNKAYSQL.js} +5 -5
- package/dist/chunks/{bookmark-impact-CHr7b1J2.js → bookmark-impact-BeUbq0jc.js} +1 -1
- package/dist/chunks/{card-filter-builder-CcEcfaYz.js → card-filter-builder-SXaRWbKr.js} +46 -46
- package/dist/chunks/{dashboard-CtIfxycc.js → dashboard-Cni7nGhg.js} +1 -1
- package/dist/chunks/{dashboard-briefing-launcher-D3mc6peE.js → dashboard-briefing-launcher-CXeXRTem.js} +202 -202
- package/dist/chunks/{dashboard-controls-BFv0zdws.js → dashboard-controls-CsqKybrf.js} +56 -56
- package/dist/chunks/{dashboard-json-CXn_3OYb.js → dashboard-json-WWmw3Piu.js} +1 -1
- package/dist/chunks/{dates-DcRxw17S.js → dates-DJRUS-he.js} +4 -4
- package/dist/chunks/{edit-dashboard-visual-Y6HatqBd.js → edit-dashboard-visual-BrIEaBhc.js} +213 -197
- package/dist/chunks/{filter-reach-copy-DbggA5B7.js → filter-reach-copy-D5LqgrUf.js} +852 -858
- package/dist/chunks/{index-DDa_rklN.js → index-Bq9UbCGk.js} +648 -574
- package/dist/chunks/{report-preferences-dialog-Db-b04B4.js → report-preferences-dialog-CeHioJwL.js} +7 -7
- package/dist/chunks/{resolve-dashboard-input-context-C18J-YZC.js → resolve-dashboard-input-context-CwS-2r-b.js} +3497 -3472
- package/dist/chunks/{saved-dashboard-context-DhC_EVus.js → saved-dashboard-context-c-MZZTx2.js} +2 -2
- package/dist/chunks/{semaphor-ready-indicator-T6TsiBMT.js → semaphor-ready-indicator-B2NpYRE-.js} +27601 -27648
- package/dist/chunks/{shelf-drop-preview-context-CNWL_b0S.js → shelf-drop-preview-context-DM7yypwC.js} +2 -2
- package/dist/chunks/{stored-dashboard-IdmtrNkA.js → stored-dashboard-DTWc2pzt.js} +204 -204
- package/dist/chunks/{variable-draft-3xseULxR.js → variable-draft-DFizFCJu.js} +2 -2
- package/dist/dashboard/index.js +1 -1
- package/dist/dashboard-authoring/index.js +1669 -1642
- package/dist/index.js +11 -11
- package/dist/style.css +1 -1
- package/dist/surfboard/index.js +1 -1
- package/dist/types/briefings/delivery-outcome.d.ts +37 -0
- package/dist/types/briefings/index.d.ts +2 -0
- package/dist/types/briefings/run-outcomes.d.ts +6 -0
- package/dist/types/components/briefings/briefing-author/run-model.d.ts +9 -0
- package/dist/types/lib/query-context/dashboard-filter-mapping-resolution.d.ts +15 -3
- package/dist/types/shared/dashboard-authoring/changes/diagnostics.d.ts +2 -0
- package/dist/types/shared/dashboard-authoring/dashboard-filter-sql-subscription.d.ts +24 -0
- package/dist/types/shared/dashboard-authoring/outline/outline-filters.d.ts +20 -4
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as t, jsxs as s, Fragment as U } from "react/jsx-runtime";
|
|
2
|
-
import la, { useState as A, useEffect as
|
|
3
|
-
import { da as it, bu as Le, bv as Ve, bx as Pe, db as Ba, aU as $e, aR as ot, dc as
|
|
4
|
-
import { c as we, B as L, X as Qe, n as Re, s as xe, L as de, l as Pt, e as Bt, k as Jn, z as
|
|
2
|
+
import la, { useState as A, useEffect as Ee, useCallback as ie, useMemo as Y, useLayoutEffect as Ut, useRef as et, useContext as da } from "react";
|
|
3
|
+
import { da as it, bu as Le, bv as Ve, bx as Pe, db as Ba, aU as $e, aR as ot, dc as Oa, dd as lt, de as Ct, a7 as dt, a4 as ve, u as w, df as _a, dg as Ma, bt as M, dh as za, a6 as oe, aP as Ra, bZ as Ua, di as $a, dj as ja, bn as ca, bN as be, ch as ua, bM as tt, o as qa, k as Wa, dk as Qa, ck as wt, cl as St, cm as kt, cn as Dt, co as At, cp as Ft, cq as Et, cr as ha, cu as It, dl as Ka, dm as Ha, c9 as pt, c6 as je, c7 as qe, dn as ma, c8 as We, bV as re, ci as Ga, cd as at, dp as Ya, bS as Xa, bw as Tt, by as ct, dq as pa, bs as Ja, dr as fa, be as ut, ds as Za, bf as en, i as tn, dt as an, b9 as nn, w as rn, t as sn, du as on, dv as ln, dw as ga, dx as dn, dy as cn, dz as Ce, dA as un, R as ba, dB as hn, dC as mn, aM as pn, dD as fn, dE as ge, dF as gn, W as Lt, dG as bn, dH as ft, dI as xn, dJ as $t, dK as vn, dL as yn, dM as Nn, dN as xa, cK as Cn, dO as wn, dP as Sn, dQ as Vt, cv as va, dR as kn, dS as jt, dT as Dn, dU as An, dV as Fn, dW as En, aT as In, bo as Tn, bY as ya, dX as Ln, dY as Vn, dZ as Xe, d_ as Pn, d$ as Bn, e0 as On, A as _n, aB as Mn, aC as zn, ah as Rn, ag as Un, af as $n, ae as jn, ab as qn, a9 as Wn, e1 as Qn, e2 as Kn, e3 as Hn, e4 as Gn, e5 as Yn, az as Xn } from "./semaphor-ready-indicator-B2NpYRE-.js";
|
|
4
|
+
import { c as we, B as L, X as Qe, n as Re, s as xe, L as de, l as Pt, e as Bt, k as Jn, z as Ot, P as Ie, a5 as Na, d as Te, a as nt, S as Ca, b as Nt, t as Se, u as ke, v as De, w as Ae, x as fe, a6 as Zn } from "./code-editor-DJNOsgJH.js";
|
|
5
5
|
import { L as Ue } from "./layout-grid-0hIlqEtk.js";
|
|
6
6
|
import "./index-CuHybtft.js";
|
|
7
7
|
import { o as er } from "./validators-wtjw0aw6.js";
|
|
@@ -11,18 +11,18 @@ import "zod";
|
|
|
11
11
|
import "../value-format-preferences/index.js";
|
|
12
12
|
import { c as J } from "./_commonjsHelpers-DimLPMtv.js";
|
|
13
13
|
import { s as Je } from "./normalize-dashboard-for-dirty-check-XKgH3GFX.js";
|
|
14
|
-
import { bv as qt, b6 as Wt,
|
|
15
|
-
import { createPortal as
|
|
16
|
-
import { aK as Gt, ar as
|
|
17
|
-
import { az as
|
|
14
|
+
import { bv as qt, b6 as Wt, ee as Qt, gB as tr, gC as rt, g4 as Kt, gD as ar, o as Ke, gE as nr, p as rr, g1 as sr, gF as ir, gG as or, cj as lr, gH as dr, l as cr, eZ as ur, gI as hr, gJ as mr, a as _t, aJ as pr, a2 as fr, bZ as gr, gK as br, gL as xr, c8 as vr, gM as yr, gN as Ht, gO as Nr } from "./resolve-dashboard-input-context-CwS-2r-b.js";
|
|
15
|
+
import { createPortal as Cr } from "react-dom";
|
|
16
|
+
import { aK as Gt, ar as wr } from "./temporal-input-presentation--2r9BLr0.js";
|
|
17
|
+
import { az as Sr, am as kr, A as Dr, a7 as st, Q as Ar } from "./bookmark-state-ByODVqee.js";
|
|
18
18
|
import "./index-RNaTnE3m.js";
|
|
19
19
|
import "./context-R31TSL5V.js";
|
|
20
20
|
import { S as wa } from "./save-D6pHmSSP.js";
|
|
21
|
-
import { V as
|
|
22
|
-
import { m as
|
|
23
|
-
import { v as
|
|
24
|
-
import { a as Yt, d as Xt, c as Mr, i as zr, b as Rr, e as Ur, v as Jt, f as Zt, g as $r } from "./variable-draft-
|
|
25
|
-
import { g as pe, d as jr, a as qr } from "./index-
|
|
21
|
+
import { V as Fr, L as Er, a as Ir, u as Sa, C as ka, F as Tr, b as Lr, A as Vr, c as Pr } from "./card-filter-builder-SXaRWbKr.js";
|
|
22
|
+
import { m as Br, k as Da, n as Aa } from "./report-preferences-dialog-CeHioJwL.js";
|
|
23
|
+
import { v as Or, E as _r } from "./filter-reach-copy-D5LqgrUf.js";
|
|
24
|
+
import { a as Yt, d as Xt, c as Mr, i as zr, b as Rr, e as Ur, v as Jt, f as Zt, g as $r } from "./variable-draft-DFizFCJu.js";
|
|
25
|
+
import { g as pe, d as jr, a as qr } from "./index-Bq9UbCGk.js";
|
|
26
26
|
/**
|
|
27
27
|
* @license lucide-react v0.453.0 - ISC
|
|
28
28
|
*
|
|
@@ -148,7 +148,7 @@ function Jr({
|
|
|
148
148
|
isCreating: n
|
|
149
149
|
}) {
|
|
150
150
|
const i = it("interactive"), [o, l] = A(""), [u, c] = A("");
|
|
151
|
-
|
|
151
|
+
Ee(() => {
|
|
152
152
|
e || (l(""), c(""));
|
|
153
153
|
}, [e]);
|
|
154
154
|
const d = () => {
|
|
@@ -248,7 +248,7 @@ function Jr({
|
|
|
248
248
|
}
|
|
249
249
|
function Zr(e) {
|
|
250
250
|
const [a, r] = A(null), [n, i] = A(null), o = Ba();
|
|
251
|
-
return
|
|
251
|
+
return Ee(() => {
|
|
252
252
|
if (!e || e.trim() === "") {
|
|
253
253
|
r(null), i(null);
|
|
254
254
|
return;
|
|
@@ -409,7 +409,7 @@ function as() {
|
|
|
409
409
|
}, [a]) };
|
|
410
410
|
}
|
|
411
411
|
function Be() {
|
|
412
|
-
const { authToken: e, tokenProps: a } = $e(), r = ot(), n =
|
|
412
|
+
const { authToken: e, tokenProps: a } = $e(), r = ot(), n = Oa(), i = lt(), { selectVisual: o } = Ct(), {
|
|
413
413
|
setFrame: l,
|
|
414
414
|
loadCard: u,
|
|
415
415
|
setIsDevMode: c,
|
|
@@ -426,21 +426,21 @@ function Be() {
|
|
|
426
426
|
setApplyFilters: P,
|
|
427
427
|
clearEditorContext: D
|
|
428
428
|
} = dt(), {
|
|
429
|
-
setIsDashboardEditing:
|
|
429
|
+
setIsDashboardEditing: _,
|
|
430
430
|
setIsVisualEditing: b,
|
|
431
431
|
clearSelectedFrameId: S
|
|
432
|
-
} = ve(), v = w((
|
|
433
|
-
(
|
|
434
|
-
), B =
|
|
432
|
+
} = ve(), v = w((O) => O.selectedSheetId), T = w((O) => O.selectedFrameId), E = w((O) => O.dashboard), H = w(
|
|
433
|
+
(O) => O.inlineFilterValuesMap
|
|
434
|
+
), B = _a((i == null ? void 0 : i.id) || "", {
|
|
435
435
|
enabled: !!(i != null && i.id) && !!(e != null && e.accessToken)
|
|
436
436
|
}), Q = ie(
|
|
437
|
-
async (
|
|
437
|
+
async (O) => {
|
|
438
438
|
try {
|
|
439
|
-
o(
|
|
439
|
+
o(O), S(), D();
|
|
440
440
|
const { data: te, fromCache: Z } = await aa(
|
|
441
441
|
a.apiServiceUrl,
|
|
442
442
|
(e == null ? void 0 : e.accessToken) || "",
|
|
443
|
-
|
|
443
|
+
O.id,
|
|
444
444
|
r,
|
|
445
445
|
"Opening library visual..."
|
|
446
446
|
);
|
|
@@ -459,9 +459,9 @@ function Be() {
|
|
|
459
459
|
setSelectedDatamodelId: k,
|
|
460
460
|
setInlineFilterValuesMap: V,
|
|
461
461
|
setApplyFilters: P,
|
|
462
|
-
setIsDashboardEditing:
|
|
462
|
+
setIsDashboardEditing: _,
|
|
463
463
|
setIsVisualEditing: b,
|
|
464
|
-
dashboard:
|
|
464
|
+
dashboard: E,
|
|
465
465
|
selectedSheetId: v,
|
|
466
466
|
selectedFrameId: T,
|
|
467
467
|
inlineFilterValuesMap: H
|
|
@@ -479,7 +479,7 @@ function Be() {
|
|
|
479
479
|
o,
|
|
480
480
|
l,
|
|
481
481
|
u,
|
|
482
|
-
|
|
482
|
+
_,
|
|
483
483
|
b,
|
|
484
484
|
c,
|
|
485
485
|
d,
|
|
@@ -495,22 +495,22 @@ function Be() {
|
|
|
495
495
|
P,
|
|
496
496
|
D,
|
|
497
497
|
S,
|
|
498
|
-
|
|
498
|
+
E,
|
|
499
499
|
v,
|
|
500
500
|
T,
|
|
501
501
|
H
|
|
502
502
|
]
|
|
503
503
|
), X = ie(
|
|
504
|
-
async (
|
|
504
|
+
async (O) => {
|
|
505
505
|
var Z;
|
|
506
506
|
const te = (G) => (M.error(G), { success: !1, error: G });
|
|
507
507
|
try {
|
|
508
|
-
if (o(
|
|
508
|
+
if (o(O), !v)
|
|
509
509
|
return te("No sheet selected. Please select a sheet first.");
|
|
510
|
-
const { data: G, fromCache:
|
|
510
|
+
const { data: G, fromCache: I } = await aa(
|
|
511
511
|
a.apiServiceUrl,
|
|
512
512
|
(e == null ? void 0 : e.accessToken) || "",
|
|
513
|
-
|
|
513
|
+
O.id,
|
|
514
514
|
r,
|
|
515
515
|
"Adding visual to dashboard..."
|
|
516
516
|
), ae = (G == null ? void 0 : G.frameObject) ?? ((Z = G == null ? void 0 : G.visual) == null ? void 0 : Z.frameObject);
|
|
@@ -521,10 +521,10 @@ function Be() {
|
|
|
521
521
|
return te("Visual frame is malformed");
|
|
522
522
|
const z = {
|
|
523
523
|
...Ma(j),
|
|
524
|
-
visualId:
|
|
524
|
+
visualId: O.id
|
|
525
525
|
// Link this frame to the library visual
|
|
526
526
|
};
|
|
527
|
-
return await n(v, z),
|
|
527
|
+
return await n(v, z), _(!0), { success: !0, fromCache: I };
|
|
528
528
|
} catch (G) {
|
|
529
529
|
return console.error("Error adding visual:", G), te(
|
|
530
530
|
G instanceof Error ? G.message : "Failed to add visual to dashboard"
|
|
@@ -537,7 +537,7 @@ function Be() {
|
|
|
537
537
|
r,
|
|
538
538
|
o,
|
|
539
539
|
v,
|
|
540
|
-
|
|
540
|
+
_,
|
|
541
541
|
n
|
|
542
542
|
]
|
|
543
543
|
);
|
|
@@ -552,21 +552,21 @@ function Be() {
|
|
|
552
552
|
refetch: B.refetch
|
|
553
553
|
};
|
|
554
554
|
}
|
|
555
|
-
function
|
|
555
|
+
function Ea(e) {
|
|
556
556
|
return e ? new Date(e).toLocaleDateString("en-US", {
|
|
557
557
|
month: "short",
|
|
558
558
|
day: "numeric",
|
|
559
559
|
year: "numeric"
|
|
560
560
|
}) : "Unknown";
|
|
561
561
|
}
|
|
562
|
-
function
|
|
562
|
+
function Ia(e, a) {
|
|
563
563
|
var n;
|
|
564
564
|
const r = (n = e.ownership.createdBy) == null ? void 0 : n.type;
|
|
565
565
|
return r === "tenant" || r === "organization" && a;
|
|
566
566
|
}
|
|
567
567
|
function Mt(e, a) {
|
|
568
568
|
var r, n;
|
|
569
|
-
return
|
|
569
|
+
return Ia(e, a) ? ((r = e.ownership.createdBy) == null ? void 0 : r.name) || ((n = e.createdByTenantUserRel) == null ? void 0 : n.name) || e.lastModifiedBy || "Unknown" : "Organization";
|
|
570
570
|
}
|
|
571
571
|
function ns(e, a) {
|
|
572
572
|
return Mt(e, a).split(/\s+/).filter(Boolean).slice(0, 2).map((n) => n.charAt(0).toUpperCase()).join("") || "?";
|
|
@@ -591,24 +591,24 @@ function Wi({
|
|
|
591
591
|
l(/* @__PURE__ */ new Set()), h(null), m(null), g(!1), N(null);
|
|
592
592
|
}, D = () => {
|
|
593
593
|
a(!1), P();
|
|
594
|
-
}, { selectVisual:
|
|
594
|
+
}, { selectVisual: _ } = Ct(), { handleAddLibraryVisual: b, handleEditLibraryVisual: S } = Be(), { isConsoleMode: v } = Ua(), {
|
|
595
595
|
resources: T,
|
|
596
|
-
isLoading:
|
|
596
|
+
isLoading: E,
|
|
597
597
|
isError: H,
|
|
598
598
|
createResource: B,
|
|
599
599
|
updateResource: Q,
|
|
600
600
|
deleteResourceAsync: X,
|
|
601
|
-
duplicateResource:
|
|
601
|
+
duplicateResource: O,
|
|
602
602
|
isCreating: te,
|
|
603
603
|
isDeleting: Z
|
|
604
604
|
} = $a(
|
|
605
605
|
void 0,
|
|
606
606
|
(C) => {
|
|
607
|
-
c(!1), C && (
|
|
607
|
+
c(!1), C && (_(C), S(C), D());
|
|
608
608
|
}
|
|
609
609
|
), {
|
|
610
610
|
startUpdating: G,
|
|
611
|
-
stopUpdating:
|
|
611
|
+
stopUpdating: I,
|
|
612
612
|
isUpdating: ae
|
|
613
613
|
} = ja(), j = T, z = Y(() => {
|
|
614
614
|
const C = n.trim().toLowerCase();
|
|
@@ -649,7 +649,7 @@ function Wi({
|
|
|
649
649
|
});
|
|
650
650
|
}, le = async (C) => {
|
|
651
651
|
(await b(C)).success && D();
|
|
652
|
-
},
|
|
652
|
+
}, Oe = async () => {
|
|
653
653
|
const C = ne;
|
|
654
654
|
if (C.length === 0) return;
|
|
655
655
|
let q = !1;
|
|
@@ -662,7 +662,7 @@ function Wi({
|
|
|
662
662
|
}, ht = (C) => {
|
|
663
663
|
S(C), D();
|
|
664
664
|
}, Fe = (C) => {
|
|
665
|
-
V(C),
|
|
665
|
+
V(C), O(C, {
|
|
666
666
|
onSettled: () => V(null)
|
|
667
667
|
});
|
|
668
668
|
}, He = () => {
|
|
@@ -684,7 +684,7 @@ function Wi({
|
|
|
684
684
|
}), g(!1), N(null);
|
|
685
685
|
} catch {
|
|
686
686
|
}
|
|
687
|
-
},
|
|
687
|
+
}, _e = () => {
|
|
688
688
|
if (ne.length !== 1) {
|
|
689
689
|
M.error("Select one visual to share");
|
|
690
690
|
return;
|
|
@@ -713,10 +713,10 @@ function Wi({
|
|
|
713
713
|
},
|
|
714
714
|
{
|
|
715
715
|
onSuccess: () => {
|
|
716
|
-
|
|
716
|
+
I(p.id, Ne), m(null);
|
|
717
717
|
},
|
|
718
718
|
onError: () => {
|
|
719
|
-
|
|
719
|
+
I(p.id, Ne);
|
|
720
720
|
}
|
|
721
721
|
}
|
|
722
722
|
);
|
|
@@ -780,7 +780,7 @@ function Wi({
|
|
|
780
780
|
}
|
|
781
781
|
)
|
|
782
782
|
] }),
|
|
783
|
-
/* @__PURE__ */ t("div", { className: "min-h-0 flex-1 overflow-auto", children:
|
|
783
|
+
/* @__PURE__ */ t("div", { className: "min-h-0 flex-1 overflow-auto", children: E ? /* @__PURE__ */ t("div", { className: "p-3", children: /* @__PURE__ */ t(Xr, {}) }) : H ? /* @__PURE__ */ t("div", { className: "flex flex-col items-center gap-2 px-4 py-12 text-center", children: /* @__PURE__ */ t("p", { className: "text-[13px] text-destructive", children: "Failed to load visuals" }) }) : z.length === 0 ? /* @__PURE__ */ s("div", { className: "flex flex-col items-center gap-2 px-4 py-12 text-center", children: [
|
|
784
784
|
/* @__PURE__ */ t(Ue, { className: "h-5 w-5 text-muted-foreground/60" }),
|
|
785
785
|
/* @__PURE__ */ t("p", { className: "text-[13px] font-medium", children: n ? "No visuals found" : "No visuals yet" }),
|
|
786
786
|
/* @__PURE__ */ t("p", { className: "text-[12px] text-muted-foreground", children: n ? "Try a different search." : "Create a saved visual to add it here." })
|
|
@@ -827,7 +827,7 @@ function Wi({
|
|
|
827
827
|
{
|
|
828
828
|
size: "xs",
|
|
829
829
|
variant: "outline",
|
|
830
|
-
onClick:
|
|
830
|
+
onClick: _e,
|
|
831
831
|
disabled: ne.length !== 1 || he.length !== 1,
|
|
832
832
|
children: [
|
|
833
833
|
/* @__PURE__ */ t(ua, { className: "h-3.5 w-3.5" }),
|
|
@@ -865,7 +865,7 @@ function Wi({
|
|
|
865
865
|
L,
|
|
866
866
|
{
|
|
867
867
|
size: "xs",
|
|
868
|
-
onClick:
|
|
868
|
+
onClick: Oe,
|
|
869
869
|
disabled: o.size === 0,
|
|
870
870
|
children: [
|
|
871
871
|
/* @__PURE__ */ t(Bt, { className: "h-3.5 w-3.5" }),
|
|
@@ -926,7 +926,7 @@ function Wi({
|
|
|
926
926
|
/* @__PURE__ */ t(At, { children: "This cannot be undone. Visuals already added to dashboards may need to be removed from those dashboards separately." })
|
|
927
927
|
] }),
|
|
928
928
|
/* @__PURE__ */ s(Ft, { children: [
|
|
929
|
-
/* @__PURE__ */ t(
|
|
929
|
+
/* @__PURE__ */ t(Et, { disabled: Z, children: "Cancel" }),
|
|
930
930
|
/* @__PURE__ */ s(
|
|
931
931
|
ha,
|
|
932
932
|
{
|
|
@@ -966,7 +966,7 @@ function is({
|
|
|
966
966
|
return /* @__PURE__ */ s("div", { className: "min-w-[48rem]", children: [
|
|
967
967
|
/* @__PURE__ */ s("div", { className: "grid h-9 grid-cols-[2.5rem_minmax(14rem,1.8fr)_minmax(10rem,1fr)_8rem_7rem_5rem_5.5rem] items-center border-b border-border/60 px-3 text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", children: [
|
|
968
968
|
/* @__PURE__ */ t(
|
|
969
|
-
|
|
969
|
+
It,
|
|
970
970
|
{
|
|
971
971
|
checked: r ? !0 : n ? "indeterminate" : !1,
|
|
972
972
|
onCheckedChange: i,
|
|
@@ -1027,7 +1027,7 @@ function os({
|
|
|
1027
1027
|
),
|
|
1028
1028
|
children: [
|
|
1029
1029
|
/* @__PURE__ */ t("div", { children: /* @__PURE__ */ t(
|
|
1030
|
-
|
|
1030
|
+
It,
|
|
1031
1031
|
{
|
|
1032
1032
|
checked: a,
|
|
1033
1033
|
onCheckedChange: () => r(e.id),
|
|
@@ -1068,7 +1068,7 @@ function os({
|
|
|
1068
1068
|
/* @__PURE__ */ t("div", { className: "flex h-5 w-5 shrink-0 items-center justify-center rounded-full bg-muted text-[9px] font-medium text-muted-foreground", children: ns(e, p) }),
|
|
1069
1069
|
/* @__PURE__ */ t("span", { className: "truncate text-muted-foreground", children: Mt(e, p) })
|
|
1070
1070
|
] }),
|
|
1071
|
-
/* @__PURE__ */ t("span", { className: "text-muted-foreground", children:
|
|
1071
|
+
/* @__PURE__ */ t("span", { className: "text-muted-foreground", children: Ea(e.updatedAt) }),
|
|
1072
1072
|
/* @__PURE__ */ t(ss, { visual: e }),
|
|
1073
1073
|
/* @__PURE__ */ t("span", { className: "text-right tabular-nums text-muted-foreground", children: e.ownership.sharedCount > 0 ? e.ownership.sharedCount : "—" }),
|
|
1074
1074
|
/* @__PURE__ */ t(
|
|
@@ -1174,13 +1174,13 @@ function ls({
|
|
|
1174
1174
|
] }),
|
|
1175
1175
|
/* @__PURE__ */ t(at, {}),
|
|
1176
1176
|
/* @__PURE__ */ s("div", { className: "space-y-1 px-2 py-1.5 text-[11px] text-muted-foreground", children: [
|
|
1177
|
-
|
|
1177
|
+
Ia(e, c) && /* @__PURE__ */ s("div", { className: "flex items-center gap-1.5", children: [
|
|
1178
1178
|
/* @__PURE__ */ t(Ya, { className: "h-3 w-3" }),
|
|
1179
1179
|
/* @__PURE__ */ t("span", { className: "truncate", children: Mt(e, c) })
|
|
1180
1180
|
] }),
|
|
1181
1181
|
/* @__PURE__ */ s("div", { className: "flex items-center gap-1.5", children: [
|
|
1182
1182
|
/* @__PURE__ */ t(Xa, { className: "h-3 w-3" }),
|
|
1183
|
-
/* @__PURE__ */ t("span", { children:
|
|
1183
|
+
/* @__PURE__ */ t("span", { children: Ea(e.updatedAt) })
|
|
1184
1184
|
] })
|
|
1185
1185
|
] })
|
|
1186
1186
|
]
|
|
@@ -1278,7 +1278,7 @@ function ds({
|
|
|
1278
1278
|
/* @__PURE__ */ s(Pe, { className: "flex items-center gap-2", children: [
|
|
1279
1279
|
/* @__PURE__ */ t("span", { children: "Save Visual As" }),
|
|
1280
1280
|
m.badgeType !== "local" && /* @__PURE__ */ t(
|
|
1281
|
-
|
|
1281
|
+
Fr,
|
|
1282
1282
|
{
|
|
1283
1283
|
type: m.badgeType,
|
|
1284
1284
|
showLabel: !0,
|
|
@@ -1536,17 +1536,17 @@ function hs() {
|
|
|
1536
1536
|
}
|
|
1537
1537
|
const S = f(), T = S.cards.length === 1 ? {
|
|
1538
1538
|
...S,
|
|
1539
|
-
cards: S.cards.map((
|
|
1540
|
-
...
|
|
1539
|
+
cards: S.cards.map((E) => ({
|
|
1540
|
+
...E,
|
|
1541
1541
|
title: b.name
|
|
1542
1542
|
// Use visual name as card title
|
|
1543
1543
|
}))
|
|
1544
1544
|
} : S;
|
|
1545
1545
|
if (b.saveToLibrary) {
|
|
1546
|
-
let
|
|
1546
|
+
let E = null;
|
|
1547
1547
|
if (b.saveToCurrentDashboard)
|
|
1548
1548
|
try {
|
|
1549
|
-
|
|
1549
|
+
E = await k(T, {
|
|
1550
1550
|
previousFrame: rt(m, T.id)
|
|
1551
1551
|
});
|
|
1552
1552
|
} catch (B) {
|
|
@@ -1558,7 +1558,7 @@ function hs() {
|
|
|
1558
1558
|
);
|
|
1559
1559
|
return;
|
|
1560
1560
|
}
|
|
1561
|
-
n(b.saveToCurrentDashboard), o(T), u(
|
|
1561
|
+
n(b.saveToCurrentDashboard), o(T), u(E);
|
|
1562
1562
|
const H = {
|
|
1563
1563
|
title: b.name,
|
|
1564
1564
|
description: b.description,
|
|
@@ -1568,7 +1568,7 @@ function hs() {
|
|
|
1568
1568
|
};
|
|
1569
1569
|
D.mutate(H);
|
|
1570
1570
|
} else if (b.saveToCurrentDashboard) {
|
|
1571
|
-
const
|
|
1571
|
+
const E = {
|
|
1572
1572
|
...T,
|
|
1573
1573
|
// Card title already synced
|
|
1574
1574
|
id: Kt(),
|
|
@@ -1579,7 +1579,7 @@ function hs() {
|
|
|
1579
1579
|
const H = await k(T, {
|
|
1580
1580
|
previousFrame: rt(m, T.id)
|
|
1581
1581
|
});
|
|
1582
|
-
y(p,
|
|
1582
|
+
y(p, E, {
|
|
1583
1583
|
semanticExecutionPayload: H
|
|
1584
1584
|
}), M.success("Visual saved to dashboard"), a(!1), N(!1);
|
|
1585
1585
|
} catch (H) {
|
|
@@ -1598,7 +1598,7 @@ function Ki(e = {}) {
|
|
|
1598
1598
|
const { isInspectionMode: a } = en(), r = oe((B) => B.frame), n = oe((B) => B.editorContext), i = tn((B) => B.selectedVisual), o = w((B) => B.selectedFrameId), l = w((B) => B.selectedSheetId), u = w((B) => B.dashboard), { setIsVisualEditing: c, updateFrame: d } = ve(), [h, p] = A(!1), [m, f] = A("both"), g = ut(), y = (n == null ? void 0 : n.type) === "documentSection", N = !!(r != null && r.visualId || i != null && i.id), k = !!(r != null && r.visualId && o), V = N && !k, {
|
|
1599
1599
|
saveAsDialogOpen: P,
|
|
1600
1600
|
setSaveAsDialogOpen: D,
|
|
1601
|
-
handleSaveAs:
|
|
1601
|
+
handleSaveAs: _,
|
|
1602
1602
|
isLibraryVisual: b,
|
|
1603
1603
|
currentVisualName: S,
|
|
1604
1604
|
isSaving: v
|
|
@@ -1619,7 +1619,7 @@ function Ki(e = {}) {
|
|
|
1619
1619
|
/* @__PURE__ */ t(gt, { className: "rounded-control", variant: "default" }),
|
|
1620
1620
|
/* @__PURE__ */ t(bt, {})
|
|
1621
1621
|
] });
|
|
1622
|
-
const
|
|
1622
|
+
const E = async () => {
|
|
1623
1623
|
if (!l) {
|
|
1624
1624
|
M.error("No sheet selected");
|
|
1625
1625
|
return;
|
|
@@ -1631,15 +1631,15 @@ function Ki(e = {}) {
|
|
|
1631
1631
|
visualId: void 0
|
|
1632
1632
|
}, X = rt(u, Q.id);
|
|
1633
1633
|
try {
|
|
1634
|
-
const
|
|
1634
|
+
const O = await g(Q, {
|
|
1635
1635
|
previousFrame: X
|
|
1636
1636
|
});
|
|
1637
1637
|
d(l, Q, {
|
|
1638
|
-
semanticExecutionPayload:
|
|
1638
|
+
semanticExecutionPayload: O
|
|
1639
1639
|
});
|
|
1640
|
-
} catch (
|
|
1641
|
-
console.error("Failed to apply local semantic metadata:",
|
|
1642
|
-
|
|
1640
|
+
} catch (O) {
|
|
1641
|
+
console.error("Failed to apply local semantic metadata:", O), p(!1), M.error(
|
|
1642
|
+
O instanceof Error ? O.message : "Failed to prepare semantic metadata for this visual"
|
|
1643
1643
|
);
|
|
1644
1644
|
return;
|
|
1645
1645
|
}
|
|
@@ -1663,7 +1663,7 @@ function Ki(e = {}) {
|
|
|
1663
1663
|
className: "w-7 !rounded-none border-l border-primary-foreground/20 px-0",
|
|
1664
1664
|
"aria-label": "Open visual save options",
|
|
1665
1665
|
disabled: v || h,
|
|
1666
|
-
children: /* @__PURE__ */ t(
|
|
1666
|
+
children: /* @__PURE__ */ t(Ot, { className: "h-3.5 w-3.5" })
|
|
1667
1667
|
}
|
|
1668
1668
|
) }),
|
|
1669
1669
|
/* @__PURE__ */ s(
|
|
@@ -1676,7 +1676,7 @@ function Ki(e = {}) {
|
|
|
1676
1676
|
/* @__PURE__ */ s(
|
|
1677
1677
|
re,
|
|
1678
1678
|
{
|
|
1679
|
-
onClick:
|
|
1679
|
+
onClick: E,
|
|
1680
1680
|
disabled: h,
|
|
1681
1681
|
children: [
|
|
1682
1682
|
/* @__PURE__ */ t(Bt, { className: "h-3.5 w-3.5" }),
|
|
@@ -1703,7 +1703,7 @@ function Ki(e = {}) {
|
|
|
1703
1703
|
onClick: () => H("library"),
|
|
1704
1704
|
disabled: v,
|
|
1705
1705
|
children: [
|
|
1706
|
-
/* @__PURE__ */ t(
|
|
1706
|
+
/* @__PURE__ */ t(Er, { className: "h-3.5 w-3.5" }),
|
|
1707
1707
|
"Save as Library Visual"
|
|
1708
1708
|
]
|
|
1709
1709
|
}
|
|
@@ -1736,7 +1736,7 @@ function Ki(e = {}) {
|
|
|
1736
1736
|
currentVisualName: S,
|
|
1737
1737
|
isSaving: v,
|
|
1738
1738
|
destinationMode: m,
|
|
1739
|
-
onConfirm:
|
|
1739
|
+
onConfirm: _
|
|
1740
1740
|
}
|
|
1741
1741
|
)
|
|
1742
1742
|
] });
|
|
@@ -1765,7 +1765,7 @@ function Hi({ className: e }) {
|
|
|
1765
1765
|
);
|
|
1766
1766
|
}
|
|
1767
1767
|
function Gi() {
|
|
1768
|
-
const e =
|
|
1768
|
+
const e = Br() === "sm", a = w((c) => c.isDashboardEditing), r = w((c) => c.isVisualEditing), n = w((c) => {
|
|
1769
1769
|
var h;
|
|
1770
1770
|
const d = ((h = c.dashboard) == null ? void 0 : h.sheets) ?? [];
|
|
1771
1771
|
return d.find((p) => p.id === c.selectedSheetId) ?? d[0];
|
|
@@ -1816,7 +1816,7 @@ function Gi() {
|
|
|
1816
1816
|
disabled: l,
|
|
1817
1817
|
className: "h-full w-7 rounded-none border-0 border-l border-border/60 px-0 shadow-none hover:bg-accent",
|
|
1818
1818
|
"aria-label": "Open arrange options",
|
|
1819
|
-
children: /* @__PURE__ */ t(
|
|
1819
|
+
children: /* @__PURE__ */ t(Ot, { className: "h-3.5 w-3.5" })
|
|
1820
1820
|
}
|
|
1821
1821
|
) }),
|
|
1822
1822
|
/* @__PURE__ */ t(We, { align: "end", className: "z-[60] w-48 rounded-[6px] border-border/60 p-1 shadow-sm", children: /* @__PURE__ */ s(re, { onClick: () => u(!0), children: [
|
|
@@ -1955,7 +1955,7 @@ function to({
|
|
|
1955
1955
|
children: c
|
|
1956
1956
|
}
|
|
1957
1957
|
),
|
|
1958
|
-
/* @__PURE__ */ t(
|
|
1958
|
+
/* @__PURE__ */ t(Et, { disabled: i, children: u }),
|
|
1959
1959
|
/* @__PURE__ */ t(L, { type: "button", size: "xs", onClick: r, disabled: i, children: i ? /* @__PURE__ */ s(U, { children: [
|
|
1960
1960
|
/* @__PURE__ */ t(de, { className: "mr-2 h-3.5 w-3.5 animate-spin" }),
|
|
1961
1961
|
"Saving..."
|
|
@@ -2119,14 +2119,14 @@ function no({ variant: e }) {
|
|
|
2119
2119
|
onOpen: r
|
|
2120
2120
|
});
|
|
2121
2121
|
return i.collapsed ? /* @__PURE__ */ s(
|
|
2122
|
-
|
|
2122
|
+
Ie,
|
|
2123
2123
|
{
|
|
2124
2124
|
open: i.popoverOpen,
|
|
2125
2125
|
onOpenChange: (o) => {
|
|
2126
2126
|
i.setPopoverOpen(o), o && r();
|
|
2127
2127
|
},
|
|
2128
2128
|
children: [
|
|
2129
|
-
i.anchorSlot &&
|
|
2129
|
+
i.anchorSlot && Cr(
|
|
2130
2130
|
/* @__PURE__ */ t(Na, { asChild: !0, children: /* @__PURE__ */ t("span", { className: "absolute right-0 top-0 h-7 w-px" }) }),
|
|
2131
2131
|
i.anchorSlot
|
|
2132
2132
|
),
|
|
@@ -2142,7 +2142,7 @@ function no({ variant: e }) {
|
|
|
2142
2142
|
)
|
|
2143
2143
|
]
|
|
2144
2144
|
}
|
|
2145
|
-
) : /* @__PURE__ */ s(
|
|
2145
|
+
) : /* @__PURE__ */ s(Ie, { onOpenChange: (o) => {
|
|
2146
2146
|
o && r();
|
|
2147
2147
|
}, children: [
|
|
2148
2148
|
/* @__PURE__ */ t(nt, { asChild: !0, children: /* @__PURE__ */ s(
|
|
@@ -2247,16 +2247,16 @@ function gs({
|
|
|
2247
2247
|
// create and make consumers use `forceClose()` from a dedicated
|
|
2248
2248
|
// button.
|
|
2249
2249
|
dismissMode: n ? "passive" : "explicit-only"
|
|
2250
|
-
}), m = w((v) => v.dashboard), { setDashboardControlsModel: f } = ve(), { participants: g } = vn(
|
|
2250
|
+
}), m = w((v) => v.dashboard), { setDashboardControlsModel: f } = ve(), { participants: g } = vn(Sr(m)), y = Array.from(
|
|
2251
2251
|
new Map(
|
|
2252
2252
|
g.flatMap(
|
|
2253
2253
|
(v) => v.fieldChoices.map((T) => {
|
|
2254
|
-
var
|
|
2254
|
+
var E;
|
|
2255
2255
|
return [
|
|
2256
2256
|
T.value,
|
|
2257
2257
|
{
|
|
2258
2258
|
option: T,
|
|
2259
|
-
target: (
|
|
2259
|
+
target: (E = v.fieldTargetMap) == null ? void 0 : E[T.value]
|
|
2260
2260
|
}
|
|
2261
2261
|
];
|
|
2262
2262
|
})
|
|
@@ -2266,12 +2266,12 @@ function gs({
|
|
|
2266
2266
|
new Map(
|
|
2267
2267
|
g.flatMap(
|
|
2268
2268
|
(v) => v.metricChoices.map((T) => {
|
|
2269
|
-
var
|
|
2269
|
+
var E;
|
|
2270
2270
|
return [
|
|
2271
2271
|
T.value,
|
|
2272
2272
|
{
|
|
2273
2273
|
option: T,
|
|
2274
|
-
target: (
|
|
2274
|
+
target: (E = v.metricTargetMap) == null ? void 0 : E[T.value]
|
|
2275
2275
|
}
|
|
2276
2276
|
];
|
|
2277
2277
|
})
|
|
@@ -2280,11 +2280,11 @@ function gs({
|
|
|
2280
2280
|
), k = nr({
|
|
2281
2281
|
...m || {},
|
|
2282
2282
|
controls: []
|
|
2283
|
-
}), V = yn(m), P = (v, T,
|
|
2283
|
+
}), V = yn(m), P = (v, T, E) => {
|
|
2284
2284
|
f(
|
|
2285
2285
|
v,
|
|
2286
2286
|
T,
|
|
2287
|
-
fs(
|
|
2287
|
+
fs(E)
|
|
2288
2288
|
);
|
|
2289
2289
|
}, D = ie(() => {
|
|
2290
2290
|
if (o) {
|
|
@@ -2292,7 +2292,7 @@ function gs({
|
|
|
2292
2292
|
return;
|
|
2293
2293
|
}
|
|
2294
2294
|
p(!1);
|
|
2295
|
-
}, [o, l, p]),
|
|
2295
|
+
}, [o, l, p]), _ = /* @__PURE__ */ t(
|
|
2296
2296
|
ka,
|
|
2297
2297
|
{
|
|
2298
2298
|
scope: "dashboard",
|
|
@@ -2315,9 +2315,9 @@ function gs({
|
|
|
2315
2315
|
/* @__PURE__ */ t("h4", { className: "text-sm font-medium", children: "Dashboard Controls" }),
|
|
2316
2316
|
/* @__PURE__ */ t("p", { className: "text-xs text-muted-foreground", children: "Add shared controls viewers can use across the dashboard. Each card can decide how to respond to the same control." })
|
|
2317
2317
|
] }),
|
|
2318
|
-
|
|
2318
|
+
_
|
|
2319
2319
|
] });
|
|
2320
|
-
return n ? /* @__PURE__ */ s(
|
|
2320
|
+
return n ? /* @__PURE__ */ s(Ie, { open: h, onOpenChange: u, children: [
|
|
2321
2321
|
/* @__PURE__ */ t(nt, { asChild: !0, children: r || /* @__PURE__ */ s(L, { variant: "outline", className: "h-7 px-2", size: "sm", children: [
|
|
2322
2322
|
/* @__PURE__ */ t(Ca, { className: "mr-2 h-4 w-4" }),
|
|
2323
2323
|
"Controls"
|
|
@@ -2355,7 +2355,7 @@ function gs({
|
|
|
2355
2355
|
]
|
|
2356
2356
|
}
|
|
2357
2357
|
),
|
|
2358
|
-
/* @__PURE__ */ t("div", { className: "min-h-0 overflow-y-auto pr-1", children:
|
|
2358
|
+
/* @__PURE__ */ t("div", { className: "min-h-0 overflow-y-auto pr-1", children: _ })
|
|
2359
2359
|
]
|
|
2360
2360
|
}
|
|
2361
2361
|
) });
|
|
@@ -2414,8 +2414,8 @@ function xs({
|
|
|
2414
2414
|
return;
|
|
2415
2415
|
}
|
|
2416
2416
|
d(!1);
|
|
2417
|
-
}, [n, i, d]),
|
|
2418
|
-
(v, T,
|
|
2417
|
+
}, [n, i, d]), _ = ie(
|
|
2418
|
+
(v, T, E) => {
|
|
2419
2419
|
!g || !(f != null && f.document) || m(
|
|
2420
2420
|
Cs({
|
|
2421
2421
|
dashboard: h,
|
|
@@ -2423,7 +2423,7 @@ function xs({
|
|
|
2423
2423
|
currentDocumentInputs: y,
|
|
2424
2424
|
nextControls: v,
|
|
2425
2425
|
nextDefaultValues: T,
|
|
2426
|
-
change:
|
|
2426
|
+
change: E
|
|
2427
2427
|
})
|
|
2428
2428
|
);
|
|
2429
2429
|
},
|
|
@@ -2468,7 +2468,7 @@ function xs({
|
|
|
2468
2468
|
initialCreateFlow: r === "create",
|
|
2469
2469
|
onCreateFlowActiveChange: d,
|
|
2470
2470
|
onCreateFlowComplete: D,
|
|
2471
|
-
onChange:
|
|
2471
|
+
onChange: _,
|
|
2472
2472
|
emptyMessage: "No document controls yet."
|
|
2473
2473
|
}
|
|
2474
2474
|
) })
|
|
@@ -2568,7 +2568,7 @@ function ws({
|
|
|
2568
2568
|
o
|
|
2569
2569
|
),
|
|
2570
2570
|
children: [
|
|
2571
|
-
/* @__PURE__ */ s(
|
|
2571
|
+
/* @__PURE__ */ s(Ie, { open: e, onOpenChange: a, children: [
|
|
2572
2572
|
/* @__PURE__ */ t(nt, { asChild: !0, children: /* @__PURE__ */ s(
|
|
2573
2573
|
L,
|
|
2574
2574
|
{
|
|
@@ -2579,7 +2579,7 @@ function ws({
|
|
|
2579
2579
|
l
|
|
2580
2580
|
),
|
|
2581
2581
|
children: [
|
|
2582
|
-
e ? /* @__PURE__ */ t(
|
|
2582
|
+
e ? /* @__PURE__ */ t(Tr, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ t(xa, { className: "h-3.5 w-3.5" }),
|
|
2583
2583
|
"Filter"
|
|
2584
2584
|
]
|
|
2585
2585
|
}
|
|
@@ -2598,7 +2598,7 @@ function ws({
|
|
|
2598
2598
|
}
|
|
2599
2599
|
)
|
|
2600
2600
|
] }),
|
|
2601
|
-
/* @__PURE__ */ s(
|
|
2601
|
+
/* @__PURE__ */ s(Ie, { open: p, onOpenChange: m, children: [
|
|
2602
2602
|
/* @__PURE__ */ t(nt, { asChild: !0, children: /* @__PURE__ */ t(
|
|
2603
2603
|
L,
|
|
2604
2604
|
{
|
|
@@ -2609,7 +2609,7 @@ function ws({
|
|
|
2609
2609
|
u
|
|
2610
2610
|
),
|
|
2611
2611
|
"aria-label": "Filter and control actions",
|
|
2612
|
-
children: /* @__PURE__ */ t(
|
|
2612
|
+
children: /* @__PURE__ */ t(Ot, { className: "h-3.5 w-3.5" })
|
|
2613
2613
|
}
|
|
2614
2614
|
) }),
|
|
2615
2615
|
/* @__PURE__ */ t(
|
|
@@ -2631,9 +2631,9 @@ function ws({
|
|
|
2631
2631
|
);
|
|
2632
2632
|
}
|
|
2633
2633
|
function Ss() {
|
|
2634
|
-
|
|
2634
|
+
Lr();
|
|
2635
2635
|
const e = w((c) => c.selectedSheetId), a = w((c) => c.selectedFrameId), r = w((c) => c.dashboard), n = w((c) => c.actions.getSelectedFrame), { setSelectedFrameId: i } = ve(), { setCard: o } = dt(), l = oe((c) => c.card.dataSource);
|
|
2636
|
-
return
|
|
2636
|
+
return Ee(() => {
|
|
2637
2637
|
var d, h;
|
|
2638
2638
|
let c = n();
|
|
2639
2639
|
if (!c) {
|
|
@@ -2767,7 +2767,7 @@ function As({
|
|
|
2767
2767
|
onCheckedChange: n
|
|
2768
2768
|
}) {
|
|
2769
2769
|
return /* @__PURE__ */ s("div", { className: "flex items-center gap-2 rounded-control px-1 py-1 transition-colors hover:bg-muted/40 focus-within:bg-muted/40", children: [
|
|
2770
|
-
/* @__PURE__ */ t(
|
|
2770
|
+
/* @__PURE__ */ t(It, { id: e, checked: r, onCheckedChange: n }),
|
|
2771
2771
|
/* @__PURE__ */ t(
|
|
2772
2772
|
Re,
|
|
2773
2773
|
{
|
|
@@ -2786,8 +2786,8 @@ function ro({
|
|
|
2786
2786
|
pickerContentClassName: i,
|
|
2787
2787
|
settingsContentClassName: o
|
|
2788
2788
|
}) {
|
|
2789
|
-
var
|
|
2790
|
-
const [l, u] = A(null), c = w((b) => b.dashboard), d = w((b) => b.selectedSheetId), h = w((b) => b.showFilters), p = w((b) => b.actions), { setDocumentPanelTarget: m, setShowFilters: f } = p, g = (
|
|
2789
|
+
var _;
|
|
2790
|
+
const [l, u] = A(null), c = w((b) => b.dashboard), d = w((b) => b.selectedSheetId), h = w((b) => b.showFilters), p = w((b) => b.actions), { setDocumentPanelTarget: m, setShowFilters: f } = p, g = (_ = c.sheets) == null ? void 0 : _.find(
|
|
2791
2791
|
(b) => b.id === d
|
|
2792
2792
|
), y = Ke(g), N = ie((b) => {
|
|
2793
2793
|
window.setTimeout(() => {
|
|
@@ -2865,20 +2865,20 @@ function ro({
|
|
|
2865
2865
|
}
|
|
2866
2866
|
function Fs(e, a) {
|
|
2867
2867
|
return (e.variables ?? []).map((r) => {
|
|
2868
|
-
const n =
|
|
2868
|
+
const n = kr(e, r.id);
|
|
2869
2869
|
return {
|
|
2870
2870
|
variable: r,
|
|
2871
|
-
question:
|
|
2871
|
+
question: Or(r),
|
|
2872
2872
|
places: n,
|
|
2873
2873
|
usedHere: !!a && n.some((i) => i.sheetId === a)
|
|
2874
2874
|
};
|
|
2875
2875
|
});
|
|
2876
2876
|
}
|
|
2877
|
-
function
|
|
2877
|
+
function Es(e, a) {
|
|
2878
2878
|
const r = a ? e.places.filter((i) => i.sheetId === a).length : 0, n = e.places.length - r;
|
|
2879
2879
|
return e.places.length ? r && n ? `Used here · ${n} elsewhere` : r ? "Used here" : `Used in ${n} ${n === 1 ? "place" : "places"}` : "Not used yet";
|
|
2880
2880
|
}
|
|
2881
|
-
function
|
|
2881
|
+
function Is({
|
|
2882
2882
|
dashboard: e,
|
|
2883
2883
|
sheetId: a,
|
|
2884
2884
|
sheetTitle: r,
|
|
@@ -2952,7 +2952,7 @@ function ia({
|
|
|
2952
2952
|
/* @__PURE__ */ t("span", { className: J("block truncate text-[12px] font-medium text-foreground", !e.variable.label && "font-mono"), children: e.variable.label || e.variable.name }),
|
|
2953
2953
|
/* @__PURE__ */ t("span", { className: "mt-0.5 block truncate text-[11px] text-muted-foreground", children: e.question })
|
|
2954
2954
|
] }),
|
|
2955
|
-
/* @__PURE__ */ t("span", { className: J("truncate text-right text-[11px]", n ? "text-muted-foreground/70" : "text-muted-foreground"), children:
|
|
2955
|
+
/* @__PURE__ */ t("span", { className: J("truncate text-right text-[11px]", n ? "text-muted-foreground/70" : "text-muted-foreground"), children: Es(e, a) })
|
|
2956
2956
|
]
|
|
2957
2957
|
}
|
|
2958
2958
|
);
|
|
@@ -2969,7 +2969,7 @@ function io() {
|
|
|
2969
2969
|
const e = w((d) => d.variablesListOpen), a = w((d) => d.actions.setVariablesListOpen), r = w((d) => d.dashboard), n = w((d) => d.selectedSheetId), i = w((d) => d.actions.openVariableEditor), o = it("interactive"), l = (c = r.sheets) == null ? void 0 : c.find((d) => d.id === n), u = (d) => {
|
|
2970
2970
|
a(!1), i(d);
|
|
2971
2971
|
};
|
|
2972
|
-
return /* @__PURE__ */ s(
|
|
2972
|
+
return /* @__PURE__ */ s(Ie, { open: e, onOpenChange: a, children: [
|
|
2973
2973
|
/* @__PURE__ */ t(Na, { asChild: !0, children: /* @__PURE__ */ t("span", { "aria-hidden": !0, className: "pointer-events-none inline-block h-7 w-0 self-center" }) }),
|
|
2974
2974
|
/* @__PURE__ */ t(
|
|
2975
2975
|
Te,
|
|
@@ -2981,7 +2981,7 @@ function io() {
|
|
|
2981
2981
|
className: "z-50 w-auto rounded-card border border-border/60 p-0 shadow-[0_10px_28px_rgba(0,0,0,0.14)] dark:shadow-[0_10px_28px_rgba(0,0,0,0.5)]",
|
|
2982
2982
|
style: o.contentStyle,
|
|
2983
2983
|
children: /* @__PURE__ */ t(
|
|
2984
|
-
|
|
2984
|
+
Is,
|
|
2985
2985
|
{
|
|
2986
2986
|
dashboard: r,
|
|
2987
2987
|
sheetId: n ?? void 0,
|
|
@@ -2999,7 +2999,7 @@ function Ts(e, a) {
|
|
|
2999
2999
|
return new Set(
|
|
3000
3000
|
(e.sheets ?? []).map((i) => {
|
|
3001
3001
|
const o = { sheetId: i.id, cardId: a, sheetKind: Ke(i) ? "document" : "dashboard" };
|
|
3002
|
-
return r.filter((l) =>
|
|
3002
|
+
return r.filter((l) => Dr(l, o)).map((l) => l.runtimeScope === "shared" ? l.id : `${l.id}@${i.id}`).join(`
|
|
3003
3003
|
`);
|
|
3004
3004
|
})
|
|
3005
3005
|
).size > 1;
|
|
@@ -3088,12 +3088,12 @@ function Bs(e) {
|
|
|
3088
3088
|
});
|
|
3089
3089
|
return { fields: d, isLoading: h, error: p };
|
|
3090
3090
|
}
|
|
3091
|
-
function
|
|
3091
|
+
function Os(e) {
|
|
3092
3092
|
var r;
|
|
3093
3093
|
const a = ((r = e.comparison) == null ? void 0 : r.mode) === "explicit" ? e.comparison.spec : void 0;
|
|
3094
3094
|
return a && a.kind !== "target" ? { mode: "period", spec: a } : { mode: "off" };
|
|
3095
3095
|
}
|
|
3096
|
-
function
|
|
3096
|
+
function _s(e) {
|
|
3097
3097
|
return e.mode === "period" ? pr(e.spec) : void 0;
|
|
3098
3098
|
}
|
|
3099
3099
|
const Rt = "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", Ms = {
|
|
@@ -3145,7 +3145,7 @@ function zs(e) {
|
|
|
3145
3145
|
return a.label || a.name;
|
|
3146
3146
|
}
|
|
3147
3147
|
function Rs(e) {
|
|
3148
|
-
const a =
|
|
3148
|
+
const a = _t(e);
|
|
3149
3149
|
return a === "date" ? "date" : a === "string" ? "text" : a === "number" ? "number" : a === "boolean" ? "yes/no" : a;
|
|
3150
3150
|
}
|
|
3151
3151
|
const oa = "__new_calculated_field__";
|
|
@@ -3155,15 +3155,15 @@ function Us({
|
|
|
3155
3155
|
handle: r,
|
|
3156
3156
|
onCalculatedFieldOpenChange: n
|
|
3157
3157
|
}) {
|
|
3158
|
-
var
|
|
3159
|
-
const { tokenProps: i } = $e(), o = ((
|
|
3158
|
+
var O, te, Z, G, I, ae, j, z, ne, ue, he, ye;
|
|
3159
|
+
const { tokenProps: i } = $e(), o = ((O = i.config) == null ? void 0 : O.showAdvancedMode) !== !1, l = ((te = i.config) == null ? void 0 : te.showDirectSource) !== !1, { connections: u } = va(), [c, d] = A(!1), [h, p] = A(!1), [m, f] = A(!1), g = (x) => {
|
|
3160
3160
|
p(x), n == null || n(x);
|
|
3161
3161
|
}, { fields: y, isLoading: N, error: k } = Bs(e.mode === "data" ? e.dataSource : void 0), V = [...e.calculatedFields ?? [], ...y], P = (x) => x && (V.find((R) => R.id === x.id) ?? V.find((R) => $s(R, x))), D = [
|
|
3162
3162
|
...V,
|
|
3163
3163
|
...[e.field, e.sortField].filter(
|
|
3164
3164
|
(x) => !!x && !P(x) && !V.some((R) => R.id === x.id)
|
|
3165
3165
|
)
|
|
3166
|
-
],
|
|
3166
|
+
], _ = ((Z = P(e.field)) == null ? void 0 : Z.id) ?? ((G = e.field) == null ? void 0 : G.id) ?? "", b = ((I = P(e.sortField ?? e.field)) == null ? void 0 : I.id) ?? ((ae = e.sortField ?? e.field) == null ? void 0 : ae.id) ?? "", S = (x) => a({ ...e, ...x }), v = zs(e.dataSource), T = ((j = e.dataSource) == null ? void 0 : j.mode) === "database" ? Pt : jt, E = "mt-1 inline-flex items-center gap-1 text-[11px] font-medium text-muted-foreground underline-offset-2 hover:text-foreground hover:underline", H = {
|
|
3167
3167
|
connectionId: ((z = e.dataSource) == null ? void 0 : z.connectionId) || e.connectionId,
|
|
3168
3168
|
dataSource: e.dataSource,
|
|
3169
3169
|
config: e.conditions ? { filters: e.conditions } : {},
|
|
@@ -3228,7 +3228,7 @@ function Us({
|
|
|
3228
3228
|
]
|
|
3229
3229
|
}
|
|
3230
3230
|
),
|
|
3231
|
-
/* @__PURE__ */ s("button", { type: "button", onClick: () => S({ mode: "data" }), className:
|
|
3231
|
+
/* @__PURE__ */ s("button", { type: "button", onClick: () => S({ mode: "data" }), className: E, children: [
|
|
3232
3232
|
/* @__PURE__ */ t(jt, { className: "h-3 w-3", "aria-hidden": !0 }),
|
|
3233
3233
|
" Use a dataset or table instead"
|
|
3234
3234
|
] })
|
|
@@ -3275,13 +3275,13 @@ function Us({
|
|
|
3275
3275
|
o ? /* @__PURE__ */ s("button", { type: "button", onClick: () => {
|
|
3276
3276
|
var x;
|
|
3277
3277
|
return S({ mode: "sql", connectionId: ((x = e.dataSource) == null ? void 0 : x.connectionId) || e.connectionId });
|
|
3278
|
-
}, className:
|
|
3278
|
+
}, className: E, children: [
|
|
3279
3279
|
/* @__PURE__ */ t(Yr, { className: "h-3 w-3", "aria-hidden": !0 }),
|
|
3280
3280
|
" Write SQL instead"
|
|
3281
3281
|
] }) : null
|
|
3282
3282
|
] }),
|
|
3283
3283
|
/* @__PURE__ */ t(
|
|
3284
|
-
|
|
3284
|
+
Vr,
|
|
3285
3285
|
{
|
|
3286
3286
|
open: c,
|
|
3287
3287
|
onOpenChange: d,
|
|
@@ -3297,7 +3297,7 @@ function Us({
|
|
|
3297
3297
|
}
|
|
3298
3298
|
),
|
|
3299
3299
|
/* @__PURE__ */ s("div", { className: "grid grid-cols-2 gap-3", children: [
|
|
3300
|
-
/* @__PURE__ */ t(se, { label: "Field", children: v ? /* @__PURE__ */ s(Se, { value:
|
|
3300
|
+
/* @__PURE__ */ t(se, { label: "Field", children: v ? /* @__PURE__ */ s(Se, { value: _, onValueChange: X, disabled: N && !D.length, children: [
|
|
3301
3301
|
/* @__PURE__ */ t(ke, { size: "xs", "aria-label": "Field", children: /* @__PURE__ */ t(De, { placeholder: N ? "Loading fields…" : k ? "Fields unavailable" : "Choose a field" }) }),
|
|
3302
3302
|
/* @__PURE__ */ s(Ae, { children: [
|
|
3303
3303
|
D.map((x) => /* @__PURE__ */ t(fe, { value: x.id, children: /* @__PURE__ */ s("span", { className: "flex items-center gap-2", children: [
|
|
@@ -3334,8 +3334,8 @@ function Us({
|
|
|
3334
3334
|
An,
|
|
3335
3335
|
{
|
|
3336
3336
|
controlLabel: "Variable",
|
|
3337
|
-
selection:
|
|
3338
|
-
onChange: (x) => S({ comparison:
|
|
3337
|
+
selection: Os(e),
|
|
3338
|
+
onChange: (x) => S({ comparison: _s(x) })
|
|
3339
3339
|
}
|
|
3340
3340
|
)
|
|
3341
3341
|
}
|
|
@@ -3396,7 +3396,7 @@ function Us({
|
|
|
3396
3396
|
// In place, not a dialog over the dialog: each edit is the draft's, and
|
|
3397
3397
|
// Cancel or Done here keeps or drops it. A new source starts a new list.
|
|
3398
3398
|
/* @__PURE__ */ t(
|
|
3399
|
-
|
|
3399
|
+
Pr,
|
|
3400
3400
|
{
|
|
3401
3401
|
filters: e.conditions ?? null,
|
|
3402
3402
|
availableFields: D,
|
|
@@ -3413,7 +3413,7 @@ function $s(e, a) {
|
|
|
3413
3413
|
return e.name === a.name && (e.qualifiedEntityName ?? e.entityName ?? "") === (a.qualifiedEntityName ?? a.entityName ?? "");
|
|
3414
3414
|
}
|
|
3415
3415
|
function js(e, a) {
|
|
3416
|
-
const r =
|
|
3416
|
+
const r = _t(e.dataType);
|
|
3417
3417
|
return r === "date" ? a === "asc" ? "earliest first" : "latest first" : r === "number" ? a === "asc" ? "lowest first" : "highest first" : a === "asc" ? "A to Z" : "Z to A";
|
|
3418
3418
|
}
|
|
3419
3419
|
function qs({
|
|
@@ -3468,41 +3468,41 @@ function Ks({
|
|
|
3468
3468
|
onHoldEscape: r
|
|
3469
3469
|
}) {
|
|
3470
3470
|
var Z, G;
|
|
3471
|
-
const n = w((
|
|
3471
|
+
const n = w((I) => I.dashboard), i = w((I) => I.selectedSheetId), o = w((I) => I.actions.saveVariableChange), [l, u] = A(
|
|
3472
3472
|
() => e ? Rr(e) : Ur()
|
|
3473
|
-
), [c, d] = A("data"), [h, p] = A(!1), m = (
|
|
3474
|
-
p(
|
|
3473
|
+
), [c, d] = A("data"), [h, p] = A(!1), m = (I) => {
|
|
3474
|
+
p(I), r == null || r(I);
|
|
3475
3475
|
}, [f, g] = A([]), [y, N] = A(null), k = !e, V = Qs(l), P = Y(
|
|
3476
3476
|
() => Jt({ ...JSON.parse(V), name: "" }, n),
|
|
3477
3477
|
[V, n]
|
|
3478
|
-
), { name: D, label:
|
|
3478
|
+
), { name: D, label: _, presentation: b, emptyText: S } = l, v = Y(
|
|
3479
3479
|
() => ({
|
|
3480
3480
|
...P,
|
|
3481
|
-
name: Zt(n, { id: P.id, name: D, field: l.field, mode: l.mode, label:
|
|
3482
|
-
...
|
|
3481
|
+
name: Zt(n, { id: P.id, name: D, field: l.field, mode: l.mode, label: _ }),
|
|
3482
|
+
..._ != null && _.trim() ? { label: _.trim() } : {},
|
|
3483
3483
|
...b ? { presentation: b } : {},
|
|
3484
3484
|
...S != null && S.trim() ? { emptyText: S } : {}
|
|
3485
3485
|
}),
|
|
3486
3486
|
// The field and mode are inside the query key already.
|
|
3487
|
-
[P, n, D,
|
|
3487
|
+
[P, n, D, _, b, S, l.field, l.mode]
|
|
3488
3488
|
), T = Y(
|
|
3489
3489
|
() => ({
|
|
3490
3490
|
...n,
|
|
3491
|
-
variables: [...(n.variables ?? []).filter((
|
|
3491
|
+
variables: [...(n.variables ?? []).filter((I) => I.id !== v.id), v]
|
|
3492
3492
|
}),
|
|
3493
3493
|
[n, v]
|
|
3494
|
-
),
|
|
3495
|
-
const
|
|
3494
|
+
), E = $r(l), H = ut(), B = w((I) => I.actions.mergeSemanticExecutionPayload), [Q, X] = A(!1), O = async () => {
|
|
3495
|
+
const I = Jt(l, n);
|
|
3496
3496
|
X(!0);
|
|
3497
3497
|
let ae;
|
|
3498
3498
|
try {
|
|
3499
|
-
const z =
|
|
3499
|
+
const z = vr(n, e ? { kind: "update", id: e.id, patch: I } : { kind: "add", variable: I });
|
|
3500
3500
|
if (!z.ok) {
|
|
3501
3501
|
X(!1), g(z.issues);
|
|
3502
3502
|
return;
|
|
3503
3503
|
}
|
|
3504
3504
|
const [ne] = z.queryFrames;
|
|
3505
|
-
ae = ne ? await H(ne, e ? { previousFrame:
|
|
3505
|
+
ae = ne ? await H(ne, e ? { previousFrame: yr(n, e) } : void 0) : { domainsById: {} };
|
|
3506
3506
|
} catch (z) {
|
|
3507
3507
|
X(!1), g([
|
|
3508
3508
|
{
|
|
@@ -3514,19 +3514,19 @@ function Ks({
|
|
|
3514
3514
|
return;
|
|
3515
3515
|
}
|
|
3516
3516
|
const j = o(
|
|
3517
|
-
k ? { kind: "add", variable:
|
|
3517
|
+
k ? { kind: "add", variable: I } : { kind: "update", id: I.id, patch: Hs(I) }
|
|
3518
3518
|
);
|
|
3519
3519
|
if (X(!1), !j.ok) {
|
|
3520
3520
|
g(j.issues);
|
|
3521
3521
|
return;
|
|
3522
3522
|
}
|
|
3523
3523
|
B(ae), a();
|
|
3524
|
-
}, te = (
|
|
3524
|
+
}, te = (I) => {
|
|
3525
3525
|
if (!e) return;
|
|
3526
|
-
const ae = o({ kind: "remove", id: e.id, confirmed:
|
|
3526
|
+
const ae = o({ kind: "remove", id: e.id, confirmed: I });
|
|
3527
3527
|
if (!ae.ok) {
|
|
3528
3528
|
const j = ae.issues.find((z) => z.code === "inUse");
|
|
3529
|
-
if (j && !
|
|
3529
|
+
if (j && !I) {
|
|
3530
3530
|
N(j);
|
|
3531
3531
|
return;
|
|
3532
3532
|
}
|
|
@@ -3563,22 +3563,22 @@ function Ks({
|
|
|
3563
3563
|
}
|
|
3564
3564
|
)
|
|
3565
3565
|
] }),
|
|
3566
|
-
h ? null : /* @__PURE__ */ t("nav", { role: "tablist", "aria-label": "Variable settings sections", className: "flex h-9 shrink-0 items-stretch gap-4 border-b border-border/60 px-4", children: Ws.map((
|
|
3566
|
+
h ? null : /* @__PURE__ */ t("nav", { role: "tablist", "aria-label": "Variable settings sections", className: "flex h-9 shrink-0 items-stretch gap-4 border-b border-border/60 px-4", children: Ws.map((I) => /* @__PURE__ */ s(
|
|
3567
3567
|
"button",
|
|
3568
3568
|
{
|
|
3569
3569
|
role: "tab",
|
|
3570
|
-
"aria-selected": c ===
|
|
3571
|
-
onClick: () => d(
|
|
3570
|
+
"aria-selected": c === I.id,
|
|
3571
|
+
onClick: () => d(I.id),
|
|
3572
3572
|
className: J(
|
|
3573
3573
|
"relative -mb-px inline-flex items-center text-[13px] transition-colors focus-visible:outline-none",
|
|
3574
|
-
c ===
|
|
3574
|
+
c === I.id ? "font-medium text-foreground" : "text-muted-foreground hover:text-foreground"
|
|
3575
3575
|
),
|
|
3576
3576
|
children: [
|
|
3577
|
-
|
|
3578
|
-
c ===
|
|
3577
|
+
I.label,
|
|
3578
|
+
c === I.id ? /* @__PURE__ */ t("span", { className: "absolute inset-x-0 -bottom-px h-[2px] bg-foreground" }) : null
|
|
3579
3579
|
]
|
|
3580
3580
|
},
|
|
3581
|
-
|
|
3581
|
+
I.id
|
|
3582
3582
|
)) }),
|
|
3583
3583
|
/* @__PURE__ */ s("div", { className: J("min-h-0 flex-1 overflow-y-auto", c === "filters" || h ? "" : "space-y-4 px-4 py-4"), children: [
|
|
3584
3584
|
c === "data" ? /* @__PURE__ */ t(
|
|
@@ -3600,15 +3600,15 @@ function Ks({
|
|
|
3600
3600
|
draft: l,
|
|
3601
3601
|
draftVariable: v,
|
|
3602
3602
|
draftDashboard: T,
|
|
3603
|
-
blocker:
|
|
3603
|
+
blocker: E,
|
|
3604
3604
|
selectedSheetId: i ?? void 0
|
|
3605
3605
|
}
|
|
3606
3606
|
),
|
|
3607
|
-
f.length ? /* @__PURE__ */ t("div", { className: "shrink-0 border-t border-border/60 bg-destructive/5 px-4 py-2 text-[11px] leading-4 text-destructive", role: "alert", children: f.map((
|
|
3608
|
-
|
|
3607
|
+
f.length ? /* @__PURE__ */ t("div", { className: "shrink-0 border-t border-border/60 bg-destructive/5 px-4 py-2 text-[11px] leading-4 text-destructive", role: "alert", children: f.map((I) => /* @__PURE__ */ s("p", { children: [
|
|
3608
|
+
I.message,
|
|
3609
3609
|
" ",
|
|
3610
|
-
|
|
3611
|
-
] }, `${
|
|
3610
|
+
I.fix
|
|
3611
|
+
] }, `${I.code}:${I.path ?? ""}`)) }) : null,
|
|
3612
3612
|
y ? /* @__PURE__ */ s("div", { className: "shrink-0 border-t border-border/60 bg-amber-500/10 px-4 py-2 text-[11px] leading-4 text-amber-800 dark:text-amber-300", role: "alertdialog", children: [
|
|
3613
3613
|
/* @__PURE__ */ s("p", { children: [
|
|
3614
3614
|
y.message,
|
|
@@ -3636,7 +3636,7 @@ function Ks({
|
|
|
3636
3636
|
),
|
|
3637
3637
|
/* @__PURE__ */ s("span", { className: "flex items-center gap-1.5", children: [
|
|
3638
3638
|
/* @__PURE__ */ t(L, { variant: "outline", size: "xs", onClick: a, children: "Cancel" }),
|
|
3639
|
-
/* @__PURE__ */ t(L, { size: "xs", disabled: !!
|
|
3639
|
+
/* @__PURE__ */ t(L, { size: "xs", disabled: !!E || Q, title: E, onClick: () => void O(), children: k ? "Create" : "Done" })
|
|
3640
3640
|
] })
|
|
3641
3641
|
] })
|
|
3642
3642
|
] })
|
|
@@ -3657,7 +3657,7 @@ function Hs(e) {
|
|
|
3657
3657
|
function Gs({ draft: e, draftDashboard: a }) {
|
|
3658
3658
|
const r = Y(() => fr(a), [a]), n = r.inputs.filter(
|
|
3659
3659
|
(o) => r.reachedVariables({ inputId: o.input.id }).some((l) => l.variableId === e.id)
|
|
3660
|
-
), i = e.mode === "sql" &&
|
|
3660
|
+
), i = e.mode === "sql" && gr(e.sql);
|
|
3661
3661
|
return n.length ? /* @__PURE__ */ s("div", { className: "divide-y divide-border/60", children: [
|
|
3662
3662
|
/* @__PURE__ */ t("p", { className: "px-4 py-2 text-[11px] leading-4 text-muted-foreground", children: "How each filter applies here. Change a mapping on the filter's Cards tab, under Variables." }),
|
|
3663
3663
|
n.map((o) => {
|
|
@@ -3694,7 +3694,7 @@ const Xs = [
|
|
|
3694
3694
|
];
|
|
3695
3695
|
function Js({ draft: e, onChange: a }) {
|
|
3696
3696
|
var u, c;
|
|
3697
|
-
const r = e.mode === "sql" ? "unknown" :
|
|
3697
|
+
const r = e.mode === "sql" ? "unknown" : _t((u = e.field) == null ? void 0 : u.dataType), n = (c = e.presentation) == null ? void 0 : c.temporal, i = n ? n.mode === "style" ? n.dateStyle : n.mode === "pattern" ? "pattern" : "auto" : "auto", o = (n == null ? void 0 : n.mode) === "pattern" ? wr(n.pattern) : null, l = (d) => a({ ...e, presentation: d && Object.keys(d).length ? d : void 0 });
|
|
3698
3698
|
return /* @__PURE__ */ s(U, { children: [
|
|
3699
3699
|
r === "date" || r === "unknown" ? /* @__PURE__ */ s(se, { label: "Dates read as", hint: "A chip can change this for itself.", children: [
|
|
3700
3700
|
/* @__PURE__ */ s("div", { className: "flex items-center gap-2", children: [
|
|
@@ -3736,7 +3736,7 @@ function Js({ draft: e, onChange: a }) {
|
|
|
3736
3736
|
{
|
|
3737
3737
|
size: "xs",
|
|
3738
3738
|
value: e.emptyText ?? "",
|
|
3739
|
-
maxLength:
|
|
3739
|
+
maxLength: br,
|
|
3740
3740
|
onChange: (d) => a({ ...e, emptyText: d.target.value || void 0 }),
|
|
3741
3741
|
placeholder: "Show nothing",
|
|
3742
3742
|
className: "w-72",
|
|
@@ -3758,16 +3758,16 @@ function Zs({
|
|
|
3758
3758
|
const o = r.sheets ?? [], l = Y(() => Ts(r, a.id), [r, a.id]), [u, c] = A(void 0), d = (l ? u : void 0) ?? i ?? ((S = o[0]) == null ? void 0 : S.id), h = o.find((v) => v.id === d), p = w((v) => d ? v.documentSectionRuntimeBySheetId[d] : void 0), m = !!(h && Ke(h)), f = Y(
|
|
3759
3759
|
() => d ? m ? p ? { kind: "document", sheetId: d, runtime: p } : void 0 : { kind: "sheet", sheetId: d } : void 0,
|
|
3760
3760
|
[m, p, d]
|
|
3761
|
-
), g = Y(() => n || !f ? [] : [a], [n, a, f]), N =
|
|
3761
|
+
), g = Y(() => n || !f ? [] : [a], [n, a, f]), N = En({
|
|
3762
3762
|
dashboard: r,
|
|
3763
3763
|
place: f ?? { kind: "sheet", sheetId: d ?? "" },
|
|
3764
3764
|
purpose: "preview",
|
|
3765
3765
|
variables: g
|
|
3766
|
-
}).byId.get(a.id), k =
|
|
3767
|
-
() =>
|
|
3766
|
+
}).byId.get(a.id), k = In(), V = Tn(), P = Y(
|
|
3767
|
+
() => xr({ preferences: k, calendar: V }),
|
|
3768
3768
|
[V, k]
|
|
3769
3769
|
);
|
|
3770
|
-
let D,
|
|
3770
|
+
let D, _ = "", b = null;
|
|
3771
3771
|
if (n)
|
|
3772
3772
|
D = /* @__PURE__ */ t("span", { className: "text-muted-foreground", children: e.mode === "sql" ? "Write the SQL to see a value." : "Choose a source and a field to see a value." });
|
|
3773
3773
|
else if (!f)
|
|
@@ -3776,7 +3776,7 @@ function Zs({
|
|
|
3776
3776
|
D = /* @__PURE__ */ t("span", { className: "text-muted-foreground", children: "Loading…" });
|
|
3777
3777
|
else {
|
|
3778
3778
|
const v = ei(a, N, P);
|
|
3779
|
-
if (D = v.body,
|
|
3779
|
+
if (D = v.body, _ = v.meta, v.unavailable) {
|
|
3780
3780
|
const T = (h == null ? void 0 : h.title) || "this tab";
|
|
3781
3781
|
b = /* @__PURE__ */ s("p", { className: "mt-1.5 flex gap-1.5 text-[11px] leading-4 text-amber-700 dark:text-amber-400", children: [
|
|
3782
3782
|
/* @__PURE__ */ t(ya, { className: "mt-px h-3 w-3 shrink-0", "aria-hidden": !0 }),
|
|
@@ -3798,7 +3798,7 @@ function Zs({
|
|
|
3798
3798
|
] }) : null,
|
|
3799
3799
|
/* @__PURE__ */ t("div", { className: "min-w-0 flex-1 truncate text-right text-[13px]", children: D })
|
|
3800
3800
|
] }),
|
|
3801
|
-
|
|
3801
|
+
_ ? /* @__PURE__ */ t("p", { className: "mt-1 text-[11px] leading-4 text-muted-foreground", children: _ }) : null,
|
|
3802
3802
|
b
|
|
3803
3803
|
] });
|
|
3804
3804
|
}
|
|
@@ -3810,7 +3810,7 @@ function ei(e, a, r) {
|
|
|
3810
3810
|
] }), o = (h) => h === void 0 ? "" : h === "beyondCap" ? `more than ${st} match` : `${h} ${h === 1 ? "match" : "matches"}`, l = "filterReach" in a ? a.filterReach : [], u = l.filter((h) => h.status === "applied").length, c = l.length - u, d = l.length ? ` · ${u} ${u === 1 ? "filter" : "filters"} applied${c ? `, ${c} skipped` : ""}` : "";
|
|
3811
3811
|
switch (a.status) {
|
|
3812
3812
|
case "answered": {
|
|
3813
|
-
const h =
|
|
3813
|
+
const h = Ar(e, Object.keys(a.parts))[0], p = h ? a.parts[h] : void 0, m = p && Ht(p, e.presentation, r) || "(empty)", f = `${o(a.matched)}${d}`.replace(/^ · /, ""), g = Nr(e, a, r);
|
|
3814
3814
|
return g && typeof g == "object" && "unavailable" in g ? { body: n(m), meta: f, unavailable: g.unavailable } : g === "noPrevious" ? { body: n(m), meta: `${f} · Nothing in the period before to compare with.`.replace(/^ · /, "") } : g ? {
|
|
3815
3815
|
body: /* @__PURE__ */ s(U, { children: [
|
|
3816
3816
|
n(g.value),
|
|
@@ -3993,7 +3993,7 @@ function di({
|
|
|
3993
3993
|
contentKind: V,
|
|
3994
3994
|
hideHeader: P = !1
|
|
3995
3995
|
}) {
|
|
3996
|
-
const D = e.length,
|
|
3996
|
+
const D = e.length, _ = e.filter((E) => E.status === "ACTIVE").length, b = V === "reports" ? D === 1 ? "report" : "reports" : V === "briefings" ? D === 1 ? "briefing" : "briefings" : D === 1 ? "item" : "items", S = e.find((E) => E.hasActiveRun) ?? null, v = V ?? "reports & briefings", T = r === "dashboard" ? a : `Project ${v}`;
|
|
3997
3997
|
return /* @__PURE__ */ s(
|
|
3998
3998
|
"section",
|
|
3999
3999
|
{
|
|
@@ -4041,7 +4041,7 @@ function di({
|
|
|
4041
4041
|
] }),
|
|
4042
4042
|
/* @__PURE__ */ t("span", { className: "text-border", children: "·" }),
|
|
4043
4043
|
/* @__PURE__ */ s("span", { children: [
|
|
4044
|
-
|
|
4044
|
+
_,
|
|
4045
4045
|
" active"
|
|
4046
4046
|
] })
|
|
4047
4047
|
] }) })
|
|
@@ -4110,18 +4110,18 @@ function di({
|
|
|
4110
4110
|
contentKind: V
|
|
4111
4111
|
}
|
|
4112
4112
|
) : null,
|
|
4113
|
-
e.map((
|
|
4113
|
+
e.map((E) => /* @__PURE__ */ t(
|
|
4114
4114
|
hi,
|
|
4115
4115
|
{
|
|
4116
|
-
briefing:
|
|
4117
|
-
isOpening: y ===
|
|
4118
|
-
isBusy: N ===
|
|
4119
|
-
onOpen: () => u(
|
|
4120
|
-
onRunNow: () => m(
|
|
4121
|
-
onTogglePause: () => f(
|
|
4122
|
-
onDelete: () => g(
|
|
4116
|
+
briefing: E,
|
|
4117
|
+
isOpening: y === E.id,
|
|
4118
|
+
isBusy: N === E.id,
|
|
4119
|
+
onOpen: () => u(E.id),
|
|
4120
|
+
onRunNow: () => m(E),
|
|
4121
|
+
onTogglePause: () => f(E),
|
|
4122
|
+
onDelete: () => g(E)
|
|
4123
4123
|
},
|
|
4124
|
-
|
|
4124
|
+
E.id
|
|
4125
4125
|
))
|
|
4126
4126
|
] }),
|
|
4127
4127
|
k ? /* @__PURE__ */ t("div", { className: "border-t border-border px-4 py-2.5", children: /* @__PURE__ */ s(
|
|
@@ -4459,7 +4459,7 @@ function hi({
|
|
|
4459
4459
|
/* @__PURE__ */ t(Bn, { className: "h-3.5 w-3.5" }),
|
|
4460
4460
|
"Resume"
|
|
4461
4461
|
] }) : /* @__PURE__ */ s(U, { children: [
|
|
4462
|
-
/* @__PURE__ */ t(
|
|
4462
|
+
/* @__PURE__ */ t(On, { className: "h-3.5 w-3.5" }),
|
|
4463
4463
|
"Pause"
|
|
4464
4464
|
] })
|
|
4465
4465
|
}
|
|
@@ -4519,7 +4519,7 @@ const bi = {
|
|
|
4519
4519
|
runBriefingNow: Rn
|
|
4520
4520
|
};
|
|
4521
4521
|
function lo(e) {
|
|
4522
|
-
return /* @__PURE__ */ t(
|
|
4522
|
+
return /* @__PURE__ */ t(_n, { authToken: e.token ? { accessToken: e.token } : void 0, children: /* @__PURE__ */ t(Mn, { children: /* @__PURE__ */ t(xi, { ...e }) }) });
|
|
4523
4523
|
}
|
|
4524
4524
|
function xi({
|
|
4525
4525
|
dashboardId: e,
|
|
@@ -4538,21 +4538,21 @@ function xi({
|
|
|
4538
4538
|
}) {
|
|
4539
4539
|
const { authToken: f, tokenProps: g } = $e(), y = zn(), N = !h || y.canCreate && (h === "scheduled_report" || y.analyticalBriefingsEnabled), [k, V] = A(!1), P = u ?? k, D = (F) => {
|
|
4540
4540
|
u === void 0 && V(F), c == null || c(F);
|
|
4541
|
-
}, [
|
|
4541
|
+
}, [_, b] = A(
|
|
4542
4542
|
h ? "author" : "list"
|
|
4543
4543
|
), [S, v] = A(
|
|
4544
4544
|
h ?? "analytical_briefing"
|
|
4545
|
-
), [T,
|
|
4545
|
+
), [T, E] = A("dashboard"), [H, B] = A(
|
|
4546
4546
|
[]
|
|
4547
|
-
), [Q, X] = A(null),
|
|
4547
|
+
), [Q, X] = A(null), O = h && !N && !Q ? "list" : _, [te, Z] = A(!1), [G, I] = A(null), [ae, j] = A(null), [z, ne] = A(
|
|
4548
4548
|
null
|
|
4549
4549
|
), [ue, he] = A(null), ye = et(null), x = et(P);
|
|
4550
|
-
|
|
4550
|
+
Ee(() => {
|
|
4551
4551
|
const F = P && !x.current;
|
|
4552
|
-
x.current = P, !(!F || !h) && (X(null),
|
|
4552
|
+
x.current = P, !(!F || !h) && (X(null), E("dashboard"), v(h), b("author"), he(null));
|
|
4553
4553
|
}, [P, h]);
|
|
4554
|
-
const R = Lt(), $ = r ?? (g == null ? void 0 : g.apiServiceUrl), K = n ?? (f == null ? void 0 : f.accessToken), le = Y(() => ({ ...bi, ...m }), [m]), [
|
|
4555
|
-
|
|
4554
|
+
const R = Lt(), $ = r ?? (g == null ? void 0 : g.apiServiceUrl), K = n ?? (f == null ? void 0 : f.accessToken), le = Y(() => ({ ...bi, ...m }), [m]), [Oe, ht] = A(null);
|
|
4555
|
+
Ee(() => {
|
|
4556
4556
|
if (!p || !$ || !K) return;
|
|
4557
4557
|
let F = !0;
|
|
4558
4558
|
return le.getBriefing($, K, p.briefingId).then(({ briefing: W }) => {
|
|
@@ -4583,7 +4583,7 @@ function xi({
|
|
|
4583
4583
|
source: { type: "project" },
|
|
4584
4584
|
label: "This project",
|
|
4585
4585
|
detail: "Use any data in this project."
|
|
4586
|
-
}, [e, Fe, T]),
|
|
4586
|
+
}, [e, Fe, T]), _e = !!($ && K), Me = qr({
|
|
4587
4587
|
canCreate: y.canCreate,
|
|
4588
4588
|
analyticalBriefingsEnabled: y.analyticalBriefingsEnabled,
|
|
4589
4589
|
scheduledReportAvailable: T === "dashboard"
|
|
@@ -4607,16 +4607,16 @@ function xi({
|
|
|
4607
4607
|
}
|
|
4608
4608
|
}
|
|
4609
4609
|
}, [le, $, K]);
|
|
4610
|
-
|
|
4611
|
-
!P ||
|
|
4612
|
-
}, [
|
|
4610
|
+
Ee(() => {
|
|
4611
|
+
!P || O !== "list" || !_e || ce();
|
|
4612
|
+
}, [_e, O, ce, P]);
|
|
4613
4613
|
const ze = () => {
|
|
4614
|
-
X(null),
|
|
4614
|
+
X(null), E("dashboard"), b("list"), D(!0);
|
|
4615
4615
|
}, C = (F) => {
|
|
4616
4616
|
X(null), v(F), b("author");
|
|
4617
4617
|
}, q = async (F) => {
|
|
4618
4618
|
if (!(!$ || !K)) {
|
|
4619
|
-
|
|
4619
|
+
I(F), he(null);
|
|
4620
4620
|
try {
|
|
4621
4621
|
const W = await le.getBriefing(
|
|
4622
4622
|
$,
|
|
@@ -4629,7 +4629,7 @@ function xi({
|
|
|
4629
4629
|
W instanceof Error ? W.message : "Could not open briefing."
|
|
4630
4630
|
);
|
|
4631
4631
|
} finally {
|
|
4632
|
-
|
|
4632
|
+
I(null);
|
|
4633
4633
|
}
|
|
4634
4634
|
}
|
|
4635
4635
|
}, ee = async (F) => {
|
|
@@ -4699,7 +4699,7 @@ function xi({
|
|
|
4699
4699
|
d ? null : /* @__PURE__ */ t(
|
|
4700
4700
|
ti,
|
|
4701
4701
|
{
|
|
4702
|
-
disabled: i || !
|
|
4702
|
+
disabled: i || !_e,
|
|
4703
4703
|
briefingCount: Pa,
|
|
4704
4704
|
className: o,
|
|
4705
4705
|
onClick: ze
|
|
@@ -4734,15 +4734,15 @@ function xi({
|
|
|
4734
4734
|
{
|
|
4735
4735
|
type: "button",
|
|
4736
4736
|
role: "tab",
|
|
4737
|
-
"aria-selected":
|
|
4737
|
+
"aria-selected": O === "author",
|
|
4738
4738
|
disabled: !N,
|
|
4739
4739
|
className: J(
|
|
4740
4740
|
"-mb-px border-b-2 px-0.5 pb-2 text-[12px] transition-colors",
|
|
4741
|
-
|
|
4741
|
+
O === "author" ? "border-foreground font-medium text-foreground" : "border-transparent text-muted-foreground hover:text-foreground",
|
|
4742
4742
|
!N && "cursor-not-allowed opacity-50"
|
|
4743
4743
|
),
|
|
4744
4744
|
onClick: () => {
|
|
4745
|
-
N && (X(null), v(h),
|
|
4745
|
+
N && (X(null), v(h), E("dashboard"), b("author"));
|
|
4746
4746
|
},
|
|
4747
4747
|
children: Q ? `Edit ${pe(Q).noun}` : h === "scheduled_report" ? "Schedule report" : "Create briefing"
|
|
4748
4748
|
}
|
|
@@ -4752,10 +4752,10 @@ function xi({
|
|
|
4752
4752
|
{
|
|
4753
4753
|
type: "button",
|
|
4754
4754
|
role: "tab",
|
|
4755
|
-
"aria-selected":
|
|
4755
|
+
"aria-selected": O === "list",
|
|
4756
4756
|
className: J(
|
|
4757
4757
|
"-mb-px border-b-2 px-0.5 pb-2 text-[12px] transition-colors",
|
|
4758
|
-
|
|
4758
|
+
O === "list" ? "border-foreground font-medium text-foreground" : "border-transparent text-muted-foreground hover:text-foreground"
|
|
4759
4759
|
),
|
|
4760
4760
|
onClick: () => b("list"),
|
|
4761
4761
|
children: h === "scheduled_report" ? "Manage reports" : "Manage briefings"
|
|
@@ -4775,7 +4775,7 @@ function xi({
|
|
|
4775
4775
|
}
|
|
4776
4776
|
)
|
|
4777
4777
|
] }) : null,
|
|
4778
|
-
|
|
4778
|
+
O === "list" ? /* @__PURE__ */ t(
|
|
4779
4779
|
di,
|
|
4780
4780
|
{
|
|
4781
4781
|
briefings: He,
|
|
@@ -4783,7 +4783,7 @@ function xi({
|
|
|
4783
4783
|
sourceView: T,
|
|
4784
4784
|
error: ue,
|
|
4785
4785
|
loading: te,
|
|
4786
|
-
onSourceViewChange:
|
|
4786
|
+
onSourceViewChange: E,
|
|
4787
4787
|
onClose: () => D(!1),
|
|
4788
4788
|
onEdit: (F) => {
|
|
4789
4789
|
q(F);
|
|
@@ -4815,7 +4815,7 @@ function xi({
|
|
|
4815
4815
|
apiServiceUrl: $,
|
|
4816
4816
|
token: K,
|
|
4817
4817
|
briefing: Q,
|
|
4818
|
-
initialRunId:
|
|
4818
|
+
initialRunId: Oe && (Q == null ? void 0 : Q.id) === Oe.briefingId ? Oe.runId : void 0,
|
|
4819
4819
|
intent: S,
|
|
4820
4820
|
sourceContext: Q ? void 0 : mt,
|
|
4821
4821
|
title: Q ? `Edit ${pe(Q).noun}` : S === "scheduled_report" ? "Schedule report" : "Create analytical briefing",
|
|
@@ -4862,7 +4862,7 @@ function xi({
|
|
|
4862
4862
|
] })
|
|
4863
4863
|
] }),
|
|
4864
4864
|
/* @__PURE__ */ s(Ft, { children: [
|
|
4865
|
-
/* @__PURE__ */ t(
|
|
4865
|
+
/* @__PURE__ */ t(Et, { children: "Cancel" }),
|
|
4866
4866
|
/* @__PURE__ */ s(
|
|
4867
4867
|
ha,
|
|
4868
4868
|
{
|