react-semaphor 0.1.593 → 0.1.595
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 +2 -2
- package/dist/chunks/{assistant-chat-D05uNAeO.js → assistant-chat-C8VXUHvX.js} +6 -6
- package/dist/chunks/{bookmark-impact-B0k90wq8.js → bookmark-impact-Dh-wiTs3.js} +2 -2
- package/dist/chunks/{card-filter-builder-CiafWE26.js → card-filter-builder-Dmh9R278.js} +351 -362
- package/dist/chunks/{comparison-window-caption-h8w3ySL6.js → comparison-window-caption-DmMFtNP5.js} +1 -1
- package/dist/chunks/{dashboard-briefing-launcher-CPh2B3Rf.js → dashboard-briefing-launcher-BFlkwqSg.js} +224 -224
- package/dist/chunks/{dashboard-controls-Cijc9c3G.js → dashboard-controls-C-MFtXUc.js} +8 -8
- package/dist/chunks/{dashboard-json-D3m7h4VL.js → dashboard-json-H8rjI8MK.js} +1 -1
- package/dist/chunks/{dashboard-T-gYKGTF.js → dashboard-wzORuqkj.js} +1 -1
- package/dist/chunks/{dates-Bb0sn54j.js → dates-B-bKEsiu.js} +5 -5
- package/dist/chunks/{edit-dashboard-visual-C0iSuX9t.js → edit-dashboard-visual-g78CyvZZ.js} +5170 -5302
- package/dist/chunks/{filter-line-CYT7KIXb.js → filter-line-BpdPq1D2.js} +3 -2
- package/dist/chunks/{filter-reach-copy-CifrEFxj.js → filter-reach-copy-DoXmRmk-.js} +4 -4
- package/dist/chunks/{filter-value-text-CHBm4IU7.js → filter-value-text-CDQCIREQ.js} +10 -10
- package/dist/chunks/{index-CzM2w1kY.js → index-C0jX5wlM.js} +2 -2
- package/dist/chunks/{pivot-result-contract-expectations-CaS0y823.js → pivot-result-contract-expectations-Dt0E1Wou.js} +1309 -1312
- package/dist/chunks/{report-preferences-dialog-GHvai50w.js → report-preferences-dialog-B2CoGxJu.js} +8 -8
- package/dist/chunks/{resolve-dashboard-input-context-BcQHmMlw.js → resolve-dashboard-input-context-DfJshnw8.js} +3621 -3556
- package/dist/chunks/{saved-dashboard-context-BHHEzmwM.js → saved-dashboard-context-DdhPU2Kq.js} +3 -3
- package/dist/chunks/{semaphor-ready-indicator-AOUJrUAJ.js → semaphor-ready-indicator-CLJFaXjd.js} +22645 -22574
- package/dist/chunks/{shelf-drop-preview-context-Cs62lWI1.js → shelf-drop-preview-context-BMUmDkqr.js} +2 -2
- package/dist/chunks/{stored-dashboard-Cmtl_Obh.js → stored-dashboard-D6FtWx_3.js} +930 -928
- package/dist/chunks/{table-export-sheet-Cd6z7SsG.js → table-export-sheet-DBlFMvE8.js} +1 -1
- package/dist/chunks/{variable-draft-CSK9Ps1o.js → variable-draft-CxdgKDCx.js} +2 -2
- package/dist/dashboard/index.js +1 -1
- package/dist/dashboard-authoring/index.js +1025 -1012
- package/dist/format-utils/index.js +211 -210
- package/dist/index.js +11 -11
- package/dist/surfboard/index.js +1 -1
- package/dist/types/lib/dashboard-inputs/prepare-loaded-dashboard.d.ts +3 -1
- package/dist/types/shared/dashboard-authoring/card-formats/detail-date-display.d.ts +43 -1
- package/dist/types/shared/dashboard-authoring/index.d.ts +1 -0
- package/dist/types/shared/dashboard-authoring/semantic-card-domain.d.ts +30 -0
- package/dist/types/shared/dashboard-authoring/temporal-bucket-authoring.d.ts +7 -1
- package/dist/types/shared/format-utils/temporal-bucket-format-policy.d.ts +27 -5
- package/package.json +1 -1
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
import { jsx as t, jsxs as r, Fragment as U } from "react/jsx-runtime";
|
|
2
2
|
import la, { useState as E, useEffect as Ee, useCallback as ie, useMemo as Y, useLayoutEffect as Ut, useRef as et, useContext as Va } from "react";
|
|
3
|
-
import { dN as it, bG as Le, bH as Ve, bJ as
|
|
4
|
-
import { c as Ae, B as L, X as Qe, s as
|
|
3
|
+
import { dN as it, bG as Le, bH as Ve, bJ as Pe, dO as Pa, b8 as $e, b5 as ot, dP as Ba, dQ as lt, dR as Ct, an as dt, ak as ve, u as w, dS as _a, dT as Oa, bF as z, dU as za, am as oe, b3 as Ra, ca as Ma, dV as Ua, dW as $a, bZ as da, b_ as be, cu as ca, bY as tt, w as ja, q as qa, dX as Wa, cx as wt, cy as St, cz as kt, cA as Dt, cB as At, cC as Ft, cD as Et, cE as ua, cH as It, dY as Qa, du as Ka, cm as pt, cj as je, ck as qe, dG as ha, cl as We, c6 as re, cv as Ga, cq as at, dZ as Ha, c3 as Ya, d_ as ma, bu as ct, bI as Tt, bK as ut, d$ as pa, bE as Xa, e0 as Za, bv as Ja, o as en, cN as tn, e1 as an, W as nn, P as fa, bp as rn, X as sn, G as on, e2 as ln, e3 as dn, e4 as ga, e5 as cn, e6 as un, e7 as Ce, e8 as hn, R as ba, e9 as mn, ea as pn, b0 as fn, eb as gn, ec as ge, ed as bn, aa as Lt, ee as xn, ef as ft, eg as vn, eh as $t, ei as yn, ej as Nn, ek as Cn, el as xa, cY as wn, em as Sn, en as kn, eo as Dn, dA as Vt, cI as va, ep as An, eq as jt, er as Fn, es as En, et as In, eu as Tn, b7 as Ln, bz as Vn, c9 as ya, ev as Pn, ew as Bn, ex as Xe, ey as _n, ez as On, eA as zn, A as Rn, aR as Mn, aS as Un, ax as $n, aw as jn, av as qn, au as Wn, ar as Qn, ap as Kn, eB as Gn, eC as Hn, eD as Yn, eE as Xn, eF as Zn, aP as Jn } from "./semaphor-ready-indicator-CLJFaXjd.js";
|
|
4
|
+
import { c as Ae, B as L, X as Qe, s as Me, x as xe, L as de, q as Pt, j as Bt, p as er, F as _t, e as Ie, a8 as Na, h as Te, f as nt, i as Ca, g as Nt, y as we, z as Se, A as ke, D as De, E as fe, a9 as tr } from "./style-sheet-parts-DM_Mw_sm.js";
|
|
5
5
|
import { L as Ue } from "./layout-grid-DoFIfQGd.js";
|
|
6
|
-
import { c as
|
|
6
|
+
import { c as Z } from "./pickers-DkqmtnTL.js";
|
|
7
7
|
import { U as ar } from "./validators-BlEWWX9O.js";
|
|
8
8
|
import "./matrix-operation-contract-CAanJeCj.js";
|
|
9
9
|
import "./analytics-base-schemas-8wz9vqn_.js";
|
|
10
10
|
import "../value-format-preferences/index.js";
|
|
11
|
-
import { s as
|
|
12
|
-
import {
|
|
11
|
+
import { s as Ze } from "./normalize-dashboard-for-dirty-check-XKgH3GFX.js";
|
|
12
|
+
import { bQ as qt, bm as Wt, fb as Qt, gL as nr, gM as rt, gK as Kt, gN as rr, t as Ke, gO as sr, u as ir, gP as or, gQ as lr, gR as dr, cT as cr, gS as ur, o as hr, g7 as mr, gT as pr, gU as fr, a as Ot, aV as gr, a7 as br, cx as xr, gV as vr, gW as yr, cI as Nr, gX as Cr, gY as Gt, gZ as wr } from "./resolve-dashboard-input-context-DfJshnw8.js";
|
|
13
13
|
import { S as wa } from "./save-C9CZAk6V.js";
|
|
14
|
-
import { V as Sr, L as kr, u as Sa, C as ka, F as Dr, a as Ar, A as Fr, b as Er } from "./card-filter-builder-
|
|
14
|
+
import { V as Sr, L as kr, u as Sa, C as ka, F as Dr, a as Ar, A as Fr, b as Er } from "./card-filter-builder-Dmh9R278.js";
|
|
15
15
|
import { createPortal as Ir } from "react-dom";
|
|
16
|
-
import {
|
|
17
|
-
import { aD as Lr, ar as Vr, F as
|
|
16
|
+
import { b4 as Ht, aC as Tr } from "./pivot-result-contract-expectations-Dt0E1Wou.js";
|
|
17
|
+
import { aD as Lr, ar as Vr, F as Pr, ac as st, T as Br } from "./bookmark-state-Be2W3s6t.js";
|
|
18
18
|
import "zod";
|
|
19
19
|
import "./schema-C9NPiIru.js";
|
|
20
20
|
import "./index-CV_Kzou0.js";
|
|
21
21
|
import "./context-CVXTFljo.js";
|
|
22
|
-
import { v as _r, G as Or } from "./filter-reach-copy-
|
|
23
|
-
import { a as Yt, d as Xt, c as zr, i as
|
|
24
|
-
import { g as pe, d as jr, a as qr } from "./index-
|
|
22
|
+
import { v as _r, G as Or } from "./filter-reach-copy-DoXmRmk-.js";
|
|
23
|
+
import { a as Yt, d as Xt, c as zr, i as Rr, b as Mr, e as Ur, v as Zt, f as Jt, g as $r } from "./variable-draft-CxdgKDCx.js";
|
|
24
|
+
import { g as pe, d as jr, a as qr } from "./index-C0jX5wlM.js";
|
|
25
25
|
/**
|
|
26
26
|
* @license lucide-react v0.453.0 - ISC
|
|
27
27
|
*
|
|
@@ -150,7 +150,7 @@ function Xr({
|
|
|
150
150
|
/* @__PURE__ */ r("div", { className: "flex min-w-0 items-center gap-2", children: [
|
|
151
151
|
/* @__PURE__ */ t(Ue, { className: "h-3.5 w-3.5 shrink-0 text-muted-foreground" }),
|
|
152
152
|
/* @__PURE__ */ r("div", { className: "flex min-w-0 items-baseline gap-2", children: [
|
|
153
|
-
/* @__PURE__ */ t(
|
|
153
|
+
/* @__PURE__ */ t(Pe, { className: "truncate text-[13px] font-medium leading-none tracking-normal", children: "New library visual" }),
|
|
154
154
|
/* @__PURE__ */ t("span", { className: "shrink-0 text-[10px] font-medium uppercase leading-none tracking-[0.08em] text-muted-foreground", children: "Visual" })
|
|
155
155
|
] })
|
|
156
156
|
] }),
|
|
@@ -170,7 +170,7 @@ function Xr({
|
|
|
170
170
|
/* @__PURE__ */ r("div", { className: "space-y-3 px-4 py-3", children: [
|
|
171
171
|
/* @__PURE__ */ t("p", { className: "text-[12px] text-muted-foreground", children: "Create a saved visual that can be reused across dashboards." }),
|
|
172
172
|
/* @__PURE__ */ r("div", { className: "space-y-1.5", children: [
|
|
173
|
-
/* @__PURE__ */ t(
|
|
173
|
+
/* @__PURE__ */ t(Me, { htmlFor: "visual-title", className: "text-[12px]", children: "Name" }),
|
|
174
174
|
/* @__PURE__ */ t(
|
|
175
175
|
xe,
|
|
176
176
|
{
|
|
@@ -187,7 +187,7 @@ function Xr({
|
|
|
187
187
|
)
|
|
188
188
|
] }),
|
|
189
189
|
/* @__PURE__ */ r("div", { className: "space-y-1.5", children: [
|
|
190
|
-
/* @__PURE__ */ t(
|
|
190
|
+
/* @__PURE__ */ t(Me, { htmlFor: "visual-description", className: "text-[12px]", children: "Description" }),
|
|
191
191
|
/* @__PURE__ */ t(
|
|
192
192
|
xe,
|
|
193
193
|
{
|
|
@@ -229,8 +229,8 @@ function Xr({
|
|
|
229
229
|
}
|
|
230
230
|
) });
|
|
231
231
|
}
|
|
232
|
-
function
|
|
233
|
-
const [a, s] = E(null), [n, i] = E(null), o =
|
|
232
|
+
function Zr(e) {
|
|
233
|
+
const [a, s] = E(null), [n, i] = E(null), o = Pa();
|
|
234
234
|
return Ee(() => {
|
|
235
235
|
if (!e || e.trim() === "") {
|
|
236
236
|
s(null), i(null);
|
|
@@ -268,7 +268,7 @@ function Jr(e) {
|
|
|
268
268
|
})();
|
|
269
269
|
}, [e, o]), a;
|
|
270
270
|
}
|
|
271
|
-
function
|
|
271
|
+
function Jr(e, a) {
|
|
272
272
|
if (e.length === 0)
|
|
273
273
|
return "";
|
|
274
274
|
const s = e.find(
|
|
@@ -354,10 +354,10 @@ function ts() {
|
|
|
354
354
|
var i;
|
|
355
355
|
return ((i = n.card.customCardPreferences) == null ? void 0 : i.url) || "";
|
|
356
356
|
}
|
|
357
|
-
), a =
|
|
357
|
+
), a = Zr(e);
|
|
358
358
|
return { getUpdatedFrame: ie(() => {
|
|
359
359
|
var N;
|
|
360
|
-
|
|
360
|
+
Ra();
|
|
361
361
|
const {
|
|
362
362
|
frame: n,
|
|
363
363
|
card: i,
|
|
@@ -387,12 +387,12 @@ function ts() {
|
|
|
387
387
|
return {
|
|
388
388
|
...n,
|
|
389
389
|
cards: y,
|
|
390
|
-
activeCardId:
|
|
390
|
+
activeCardId: Jr(y, n.activeCardId)
|
|
391
391
|
};
|
|
392
392
|
}, [a]) };
|
|
393
393
|
}
|
|
394
|
-
function
|
|
395
|
-
const { authToken: e, tokenProps: a } = $e(), s = ot(), n =
|
|
394
|
+
function Be() {
|
|
395
|
+
const { authToken: e, tokenProps: a } = $e(), s = ot(), n = Ba(), i = lt(), { selectVisual: o } = Ct(), {
|
|
396
396
|
setFrame: l,
|
|
397
397
|
loadCard: u,
|
|
398
398
|
setIsDevMode: c,
|
|
@@ -406,7 +406,7 @@ function Pe() {
|
|
|
406
406
|
setSelectedTableName: N,
|
|
407
407
|
setSelectedDatamodelId: k,
|
|
408
408
|
setInlineFilterValuesMap: V,
|
|
409
|
-
setApplyFilters:
|
|
409
|
+
setApplyFilters: P,
|
|
410
410
|
clearEditorContext: D
|
|
411
411
|
} = dt(), {
|
|
412
412
|
setIsDashboardEditing: O,
|
|
@@ -414,13 +414,13 @@ function Pe() {
|
|
|
414
414
|
clearSelectedFrameId: S
|
|
415
415
|
} = ve(), v = w((_) => _.selectedSheetId), T = w((_) => _.selectedFrameId), F = w((_) => _.dashboard), G = w(
|
|
416
416
|
(_) => _.inlineFilterValuesMap
|
|
417
|
-
),
|
|
417
|
+
), B = _a((i == null ? void 0 : i.id) || "", {
|
|
418
418
|
enabled: !!(i != null && i.id) && !!(e != null && e.accessToken)
|
|
419
419
|
}), Q = ie(
|
|
420
420
|
async (_) => {
|
|
421
421
|
try {
|
|
422
422
|
o(_), S(), D();
|
|
423
|
-
const { data: te, fromCache:
|
|
423
|
+
const { data: te, fromCache: J } = await aa(
|
|
424
424
|
a.apiServiceUrl,
|
|
425
425
|
(e == null ? void 0 : e.accessToken) || "",
|
|
426
426
|
_.id,
|
|
@@ -441,7 +441,7 @@ function Pe() {
|
|
|
441
441
|
setSelectedTableName: N,
|
|
442
442
|
setSelectedDatamodelId: k,
|
|
443
443
|
setInlineFilterValuesMap: V,
|
|
444
|
-
setApplyFilters:
|
|
444
|
+
setApplyFilters: P,
|
|
445
445
|
setIsDashboardEditing: O,
|
|
446
446
|
setIsVisualEditing: b,
|
|
447
447
|
dashboard: F,
|
|
@@ -450,7 +450,7 @@ function Pe() {
|
|
|
450
450
|
inlineFilterValuesMap: G
|
|
451
451
|
}))
|
|
452
452
|
throw new Error("Failed to setup editor with visual data");
|
|
453
|
-
return { success: !0, fromCache:
|
|
453
|
+
return { success: !0, fromCache: J };
|
|
454
454
|
} catch (te) {
|
|
455
455
|
return console.error("Error editing visual:", te), { success: !1, error: "Failed to load visual for editing" };
|
|
456
456
|
}
|
|
@@ -475,7 +475,7 @@ function Pe() {
|
|
|
475
475
|
N,
|
|
476
476
|
k,
|
|
477
477
|
V,
|
|
478
|
-
|
|
478
|
+
P,
|
|
479
479
|
D,
|
|
480
480
|
S,
|
|
481
481
|
F,
|
|
@@ -485,7 +485,7 @@ function Pe() {
|
|
|
485
485
|
]
|
|
486
486
|
), X = ie(
|
|
487
487
|
async (_) => {
|
|
488
|
-
var
|
|
488
|
+
var J;
|
|
489
489
|
const te = (H) => (z.error(H), { success: !1, error: H });
|
|
490
490
|
try {
|
|
491
491
|
if (o(_), !v)
|
|
@@ -496,18 +496,18 @@ function Pe() {
|
|
|
496
496
|
_.id,
|
|
497
497
|
s,
|
|
498
498
|
"Adding visual to dashboard..."
|
|
499
|
-
), ae = (H == null ? void 0 : H.frameObject) ?? ((
|
|
499
|
+
), ae = (H == null ? void 0 : H.frameObject) ?? ((J = H == null ? void 0 : H.visual) == null ? void 0 : J.frameObject);
|
|
500
500
|
if (!ae)
|
|
501
501
|
return te("Visual has no frame data");
|
|
502
502
|
const j = Da(ae);
|
|
503
503
|
if (!(j != null && j.cards) || j.cards.length === 0)
|
|
504
504
|
return te("Visual frame is malformed");
|
|
505
|
-
const
|
|
505
|
+
const R = {
|
|
506
506
|
...Oa(j),
|
|
507
507
|
visualId: _.id
|
|
508
508
|
// Link this frame to the library visual
|
|
509
509
|
};
|
|
510
|
-
return await n(v,
|
|
510
|
+
return await n(v, R), O(!0), { success: !0, fromCache: I };
|
|
511
511
|
} catch (H) {
|
|
512
512
|
return console.error("Error adding visual:", H), te(
|
|
513
513
|
H instanceof Error ? H.message : "Failed to add visual to dashboard"
|
|
@@ -525,14 +525,14 @@ function Pe() {
|
|
|
525
525
|
]
|
|
526
526
|
);
|
|
527
527
|
return {
|
|
528
|
-
visual:
|
|
529
|
-
isLoading:
|
|
530
|
-
isError:
|
|
531
|
-
error:
|
|
528
|
+
visual: B.data,
|
|
529
|
+
isLoading: B.isLoading,
|
|
530
|
+
isError: B.isError,
|
|
531
|
+
error: B.error,
|
|
532
532
|
handleEditLibraryVisual: Q,
|
|
533
533
|
handleAddLibraryVisual: X,
|
|
534
534
|
getUpdatedFrame: ts().getUpdatedFrame,
|
|
535
|
-
refetch:
|
|
535
|
+
refetch: B.refetch
|
|
536
536
|
};
|
|
537
537
|
}
|
|
538
538
|
function Aa(e) {
|
|
@@ -556,7 +556,7 @@ function as(e, a) {
|
|
|
556
556
|
}
|
|
557
557
|
function ns(e) {
|
|
558
558
|
const a = (e || "").toLowerCase();
|
|
559
|
-
return a.includes("table") ?
|
|
559
|
+
return a.includes("table") ? Pt : a.includes("pie") || a.includes("donut") ? Qa : a.includes("line") ? Ka : a.includes("bar") ? er : Ue;
|
|
560
560
|
}
|
|
561
561
|
function rs({ visual: e }) {
|
|
562
562
|
const a = e.ownership.status === "public" ? "Public" : e.ownership.status === "shared" || e.ownership.sharedCount > 0 ? "Shared" : "Private";
|
|
@@ -570,20 +570,20 @@ function ji({
|
|
|
570
570
|
null
|
|
571
571
|
), [p, m] = E(
|
|
572
572
|
null
|
|
573
|
-
), [f, g] = E(!1), [y, N] = E(null), [k, V] = E(null),
|
|
573
|
+
), [f, g] = E(!1), [y, N] = E(null), [k, V] = E(null), P = () => {
|
|
574
574
|
l(/* @__PURE__ */ new Set()), h(null), m(null), g(!1), N(null);
|
|
575
575
|
}, D = () => {
|
|
576
|
-
a(!1),
|
|
577
|
-
}, { selectVisual: O } = Ct(), { handleAddLibraryVisual: b, handleEditLibraryVisual: S } =
|
|
576
|
+
a(!1), P();
|
|
577
|
+
}, { selectVisual: O } = Ct(), { handleAddLibraryVisual: b, handleEditLibraryVisual: S } = Be(), { isConsoleMode: v } = Ma(), {
|
|
578
578
|
resources: T,
|
|
579
579
|
isLoading: F,
|
|
580
580
|
isError: G,
|
|
581
|
-
createResource:
|
|
581
|
+
createResource: B,
|
|
582
582
|
updateResource: Q,
|
|
583
583
|
deleteResourceAsync: X,
|
|
584
584
|
duplicateResource: _,
|
|
585
585
|
isCreating: te,
|
|
586
|
-
isDeleting:
|
|
586
|
+
isDeleting: J
|
|
587
587
|
} = Ua(
|
|
588
588
|
void 0,
|
|
589
589
|
(C) => {
|
|
@@ -593,7 +593,7 @@ function ji({
|
|
|
593
593
|
startUpdating: H,
|
|
594
594
|
stopUpdating: I,
|
|
595
595
|
isUpdating: ae
|
|
596
|
-
} = $a(), j = T,
|
|
596
|
+
} = $a(), j = T, R = Y(() => {
|
|
597
597
|
const C = n.trim().toLowerCase();
|
|
598
598
|
return C ? j.filter(
|
|
599
599
|
(q) => {
|
|
@@ -610,23 +610,23 @@ function ji({
|
|
|
610
610
|
(C) => C.permissions.canDelete
|
|
611
611
|
), he = ne.filter(
|
|
612
612
|
(C) => C.permissions.canShare
|
|
613
|
-
), ye =
|
|
613
|
+
), ye = R.length > 0 && R.every(
|
|
614
614
|
(C) => o.has(C.id)
|
|
615
|
-
), x =
|
|
615
|
+
), x = R.some(
|
|
616
616
|
(C) => o.has(C.id)
|
|
617
|
-
),
|
|
617
|
+
), M = (C) => {
|
|
618
618
|
const q = new Set(o);
|
|
619
619
|
C(q), l(q);
|
|
620
620
|
}, $ = (C) => {
|
|
621
|
-
|
|
621
|
+
M((q) => {
|
|
622
622
|
q.has(C) ? q.delete(C) : q.add(C);
|
|
623
623
|
});
|
|
624
624
|
}, K = () => {
|
|
625
625
|
l((C) => {
|
|
626
626
|
const q = new Set(C);
|
|
627
|
-
return ye ?
|
|
627
|
+
return ye ? R.forEach(
|
|
628
628
|
(ee) => q.delete(ee.id)
|
|
629
|
-
) :
|
|
629
|
+
) : R.forEach(
|
|
630
630
|
(ee) => q.add(ee.id)
|
|
631
631
|
), q;
|
|
632
632
|
});
|
|
@@ -704,8 +704,8 @@ function ji({
|
|
|
704
704
|
}
|
|
705
705
|
);
|
|
706
706
|
}, ce = (C) => {
|
|
707
|
-
a(C), C ||
|
|
708
|
-
},
|
|
707
|
+
a(C), C || P();
|
|
708
|
+
}, Re = y ? 1 : ue.length;
|
|
709
709
|
return /* @__PURE__ */ r(U, { children: [
|
|
710
710
|
/* @__PURE__ */ t(Le, { open: e, onOpenChange: ce, children: /* @__PURE__ */ r(
|
|
711
711
|
Ve,
|
|
@@ -716,9 +716,9 @@ function ji({
|
|
|
716
716
|
children: [
|
|
717
717
|
/* @__PURE__ */ r("div", { className: "flex h-10 shrink-0 items-center justify-between gap-2 border-b border-border/60 px-3", children: [
|
|
718
718
|
/* @__PURE__ */ r("div", { className: "flex min-w-0 items-center gap-2", children: [
|
|
719
|
-
/* @__PURE__ */ t(
|
|
719
|
+
/* @__PURE__ */ t(Pt, { className: "h-3.5 w-3.5 shrink-0 text-muted-foreground" }),
|
|
720
720
|
/* @__PURE__ */ r("div", { className: "flex min-w-0 items-baseline gap-2", children: [
|
|
721
|
-
/* @__PURE__ */ t(
|
|
721
|
+
/* @__PURE__ */ t(Pe, { className: "truncate text-[13px] font-medium leading-none tracking-normal", children: "Visuals library" }),
|
|
722
722
|
/* @__PURE__ */ t("span", { className: "shrink-0 text-[10px] font-medium uppercase leading-none tracking-[0.08em] text-muted-foreground", children: "Add to dashboard" })
|
|
723
723
|
] })
|
|
724
724
|
] }),
|
|
@@ -763,14 +763,14 @@ function ji({
|
|
|
763
763
|
}
|
|
764
764
|
)
|
|
765
765
|
] }),
|
|
766
|
-
/* @__PURE__ */ t("div", { className: "min-h-0 flex-1 overflow-auto", children: F ? /* @__PURE__ */ t("div", { className: "p-3", children: /* @__PURE__ */ t(Yr, {}) }) : G ? /* @__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" }) }) :
|
|
766
|
+
/* @__PURE__ */ t("div", { className: "min-h-0 flex-1 overflow-auto", children: F ? /* @__PURE__ */ t("div", { className: "p-3", children: /* @__PURE__ */ t(Yr, {}) }) : G ? /* @__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" }) }) : R.length === 0 ? /* @__PURE__ */ r("div", { className: "flex flex-col items-center gap-2 px-4 py-12 text-center", children: [
|
|
767
767
|
/* @__PURE__ */ t(Ue, { className: "h-5 w-5 text-muted-foreground/60" }),
|
|
768
768
|
/* @__PURE__ */ t("p", { className: "text-[13px] font-medium", children: n ? "No visuals found" : "No visuals yet" }),
|
|
769
769
|
/* @__PURE__ */ t("p", { className: "text-[12px] text-muted-foreground", children: n ? "Try a different search." : "Create a saved visual to add it here." })
|
|
770
770
|
] }) : /* @__PURE__ */ t(
|
|
771
771
|
ss,
|
|
772
772
|
{
|
|
773
|
-
visuals:
|
|
773
|
+
visuals: R,
|
|
774
774
|
selectedIds: o,
|
|
775
775
|
allFilteredSelected: ye,
|
|
776
776
|
someFilteredSelected: x,
|
|
@@ -785,7 +785,7 @@ function ji({
|
|
|
785
785
|
},
|
|
786
786
|
onDuplicateVisual: Fe,
|
|
787
787
|
duplicatingId: k,
|
|
788
|
-
isDeleting:
|
|
788
|
+
isDeleting: J,
|
|
789
789
|
isConsoleMode: v
|
|
790
790
|
}
|
|
791
791
|
) }),
|
|
@@ -851,7 +851,7 @@ function ji({
|
|
|
851
851
|
onClick: _e,
|
|
852
852
|
disabled: o.size === 0,
|
|
853
853
|
children: [
|
|
854
|
-
/* @__PURE__ */ t(
|
|
854
|
+
/* @__PURE__ */ t(Bt, { className: "h-3.5 w-3.5" }),
|
|
855
855
|
o.size === 0 ? "Add to dashboard" : `Add ${o.size} visual${o.size === 1 ? "" : "s"}`
|
|
856
856
|
]
|
|
857
857
|
}
|
|
@@ -866,7 +866,7 @@ function ji({
|
|
|
866
866
|
{
|
|
867
867
|
open: u,
|
|
868
868
|
onOpenChange: c,
|
|
869
|
-
onSubmit:
|
|
869
|
+
onSubmit: B,
|
|
870
870
|
isCreating: te
|
|
871
871
|
}
|
|
872
872
|
),
|
|
@@ -895,31 +895,31 @@ function ji({
|
|
|
895
895
|
{
|
|
896
896
|
open: f,
|
|
897
897
|
onOpenChange: (C) => {
|
|
898
|
-
!C &&
|
|
898
|
+
!C && J || (g(C), C || N(null));
|
|
899
899
|
},
|
|
900
900
|
children: /* @__PURE__ */ r(St, { children: [
|
|
901
901
|
/* @__PURE__ */ r(kt, { children: [
|
|
902
902
|
/* @__PURE__ */ r(Dt, { children: [
|
|
903
903
|
"Delete ",
|
|
904
|
-
|
|
904
|
+
Re,
|
|
905
905
|
" visual",
|
|
906
|
-
|
|
906
|
+
Re === 1 ? "" : "s",
|
|
907
907
|
"?"
|
|
908
908
|
] }),
|
|
909
909
|
/* @__PURE__ */ t(At, { children: "This cannot be undone. Visuals already added to dashboards may need to be removed from those dashboards separately." })
|
|
910
910
|
] }),
|
|
911
911
|
/* @__PURE__ */ r(Ft, { children: [
|
|
912
|
-
/* @__PURE__ */ t(Et, { disabled:
|
|
912
|
+
/* @__PURE__ */ t(Et, { disabled: J, children: "Cancel" }),
|
|
913
913
|
/* @__PURE__ */ r(
|
|
914
914
|
ua,
|
|
915
915
|
{
|
|
916
916
|
onClick: (C) => {
|
|
917
917
|
C.preventDefault(), mt();
|
|
918
918
|
},
|
|
919
|
-
disabled:
|
|
919
|
+
disabled: J || Re === 0,
|
|
920
920
|
children: [
|
|
921
|
-
|
|
922
|
-
|
|
921
|
+
J ? /* @__PURE__ */ t(de, { className: "h-3.5 w-3.5 animate-spin" }) : /* @__PURE__ */ t(tt, { className: "h-3.5 w-3.5" }),
|
|
922
|
+
J ? "Deleting..." : "Delete"
|
|
923
923
|
]
|
|
924
924
|
}
|
|
925
925
|
)
|
|
@@ -1004,7 +1004,7 @@ function is({
|
|
|
1004
1004
|
return /* @__PURE__ */ r(
|
|
1005
1005
|
"div",
|
|
1006
1006
|
{
|
|
1007
|
-
className:
|
|
1007
|
+
className: Z(
|
|
1008
1008
|
"group grid min-h-12 grid-cols-[2.5rem_minmax(14rem,1.8fr)_minmax(10rem,1fr)_8rem_7rem_5rem_5.5rem] items-center border-b border-border/50 px-3 text-[13px] hover:bg-muted/50",
|
|
1009
1009
|
a && "bg-muted/70"
|
|
1010
1010
|
),
|
|
@@ -1181,14 +1181,14 @@ function qi(e, a, s = !1) {
|
|
|
1181
1181
|
(d) => d.onDashboardLifecycleEvent
|
|
1182
1182
|
), l = ie(() => {
|
|
1183
1183
|
const d = w.getState().dashboard;
|
|
1184
|
-
return a || !e || !d || d.id !== e.id ? !1 :
|
|
1184
|
+
return a || !e || !d || d.id !== e.id ? !1 : Ze(d) !== Ze(e);
|
|
1185
1185
|
}, [e, a]);
|
|
1186
1186
|
Ut(() => (w.setState({ checkUnsavedDashboardChanges: l }), () => {
|
|
1187
1187
|
w.getState().checkUnsavedDashboardChanges === l && w.setState({ checkUnsavedDashboardChanges: null });
|
|
1188
1188
|
}), [l]);
|
|
1189
1189
|
const u = Y(() => !s || a || !n || i && (!e || n.id !== e.id) ? null : {
|
|
1190
1190
|
dashboardId: n.id,
|
|
1191
|
-
dirty: i && e ?
|
|
1191
|
+
dirty: i && e ? Ze(n) !== Ze(e) : !1
|
|
1192
1192
|
}, [
|
|
1193
1193
|
i,
|
|
1194
1194
|
a,
|
|
@@ -1213,7 +1213,7 @@ function qi(e, a, s = !1) {
|
|
|
1213
1213
|
}));
|
|
1214
1214
|
}, [u, o]), l;
|
|
1215
1215
|
}
|
|
1216
|
-
function
|
|
1216
|
+
function Rt(e) {
|
|
1217
1217
|
var a;
|
|
1218
1218
|
for (const s of e.cards)
|
|
1219
1219
|
if (s.type === "matrixTable" && !ar.safeParse((a = s.config) == null ? void 0 : a.matrix).success)
|
|
@@ -1224,10 +1224,10 @@ function gt({
|
|
|
1224
1224
|
className: e,
|
|
1225
1225
|
variant: a = "outline"
|
|
1226
1226
|
}) {
|
|
1227
|
-
const s = oe((o) => o.onSave), { getUpdatedFrame: n } =
|
|
1227
|
+
const s = oe((o) => o.onSave), { getUpdatedFrame: n } = Be();
|
|
1228
1228
|
function i() {
|
|
1229
1229
|
const o = n();
|
|
1230
|
-
|
|
1230
|
+
Rt(o) && (s == null || s(o));
|
|
1231
1231
|
}
|
|
1232
1232
|
return /* @__PURE__ */ r(
|
|
1233
1233
|
L,
|
|
@@ -1237,7 +1237,7 @@ function gt({
|
|
|
1237
1237
|
size: "xs",
|
|
1238
1238
|
variant: a,
|
|
1239
1239
|
children: [
|
|
1240
|
-
/* @__PURE__ */ t(
|
|
1240
|
+
/* @__PURE__ */ t(Bt, { className: "h-3.5 w-3.5" }),
|
|
1241
1241
|
"Done"
|
|
1242
1242
|
]
|
|
1243
1243
|
}
|
|
@@ -1247,13 +1247,13 @@ function ls({
|
|
|
1247
1247
|
className: e,
|
|
1248
1248
|
variant: a = "default"
|
|
1249
1249
|
}) {
|
|
1250
|
-
const s = ot(), [n, i] = E(!1), { setIsVisualEditing: o } = ve(), { getUpdatedFrame: l } =
|
|
1250
|
+
const s = ot(), [n, i] = E(!1), { setIsVisualEditing: o } = ve(), { getUpdatedFrame: l } = Be(), u = lt(), c = oe((p) => p.frame), d = ma();
|
|
1251
1251
|
return /* @__PURE__ */ t(
|
|
1252
1252
|
L,
|
|
1253
1253
|
{
|
|
1254
1254
|
onClick: () => {
|
|
1255
1255
|
const p = l();
|
|
1256
|
-
if (!
|
|
1256
|
+
if (!Rt(p))
|
|
1257
1257
|
return;
|
|
1258
1258
|
const m = (c == null ? void 0 : c.visualId) || (u == null ? void 0 : u.id);
|
|
1259
1259
|
if (!m) {
|
|
@@ -1296,7 +1296,7 @@ function ls({
|
|
|
1296
1296
|
function ds({
|
|
1297
1297
|
className: e
|
|
1298
1298
|
}) {
|
|
1299
|
-
const a = ot(), [s, n] = E(!1), i = lt(), o = oe((g) => g.frame), l = w((g) => g.selectedSheetId), u = w((g) => g.dashboard), { updateFrame: c, setIsVisualEditing: d } = ve(), { getUpdatedFrame: h } =
|
|
1299
|
+
const a = ot(), [s, n] = E(!1), i = lt(), o = oe((g) => g.frame), l = w((g) => g.selectedSheetId), u = w((g) => g.dashboard), { updateFrame: c, setIsVisualEditing: d } = ve(), { getUpdatedFrame: h } = Be(), p = ma(), m = ct();
|
|
1300
1300
|
return /* @__PURE__ */ t(
|
|
1301
1301
|
L,
|
|
1302
1302
|
{
|
|
@@ -1313,7 +1313,7 @@ function ds({
|
|
|
1313
1313
|
n(!0);
|
|
1314
1314
|
try {
|
|
1315
1315
|
const y = h();
|
|
1316
|
-
if (!
|
|
1316
|
+
if (!Rt(y)) {
|
|
1317
1317
|
n(!1);
|
|
1318
1318
|
return;
|
|
1319
1319
|
}
|
|
@@ -1424,7 +1424,7 @@ function cs({
|
|
|
1424
1424
|
};
|
|
1425
1425
|
return /* @__PURE__ */ t(Le, { open: e, onOpenChange: a, children: /* @__PURE__ */ r(Ve, { className: "sm:max-w-[500px]", children: [
|
|
1426
1426
|
/* @__PURE__ */ r(Tt, { children: [
|
|
1427
|
-
/* @__PURE__ */ r(
|
|
1427
|
+
/* @__PURE__ */ r(Pe, { className: "flex items-center gap-2", children: [
|
|
1428
1428
|
/* @__PURE__ */ t("span", { children: "Save Visual As" }),
|
|
1429
1429
|
m.badgeType !== "local" && /* @__PURE__ */ t(
|
|
1430
1430
|
Sr,
|
|
@@ -1439,7 +1439,7 @@ function cs({
|
|
|
1439
1439
|
] }),
|
|
1440
1440
|
/* @__PURE__ */ r("div", { className: "grid gap-4 py-4", children: [
|
|
1441
1441
|
/* @__PURE__ */ r("div", { className: "grid gap-2", children: [
|
|
1442
|
-
/* @__PURE__ */ t(
|
|
1442
|
+
/* @__PURE__ */ t(Me, { htmlFor: "name", children: "Name" }),
|
|
1443
1443
|
/* @__PURE__ */ t(
|
|
1444
1444
|
xe,
|
|
1445
1445
|
{
|
|
@@ -1452,7 +1452,7 @@ function cs({
|
|
|
1452
1452
|
)
|
|
1453
1453
|
] }),
|
|
1454
1454
|
/* @__PURE__ */ r("div", { className: "grid gap-2", children: [
|
|
1455
|
-
/* @__PURE__ */ t(
|
|
1455
|
+
/* @__PURE__ */ t(Me, { htmlFor: "description", children: "Description (optional)" }),
|
|
1456
1456
|
/* @__PURE__ */ t(
|
|
1457
1457
|
pa,
|
|
1458
1458
|
{
|
|
@@ -1484,10 +1484,10 @@ function cs({
|
|
|
1484
1484
|
] }) });
|
|
1485
1485
|
}
|
|
1486
1486
|
function us() {
|
|
1487
|
-
const [e, a] = E(!1), [s, n] = E(!1), [i, o] = E(null), [l, u] = E(null), c = oe((b) => b.frame), d = oe((b) => b.card), h = lt(), p = w((b) => b.selectedSheetId), m = w((b) => b.dashboard), { getUpdatedFrame: f } =
|
|
1487
|
+
const [e, a] = E(!1), [s, n] = E(!1), [i, o] = E(null), [l, u] = E(null), c = oe((b) => b.frame), d = oe((b) => b.card), h = lt(), p = w((b) => b.selectedSheetId), m = w((b) => b.dashboard), { getUpdatedFrame: f } = Be(), { selectVisual: g } = Ct(), { addFrame: y, setIsVisualEditing: N } = ve(), k = ct(), V = !!(c != null && c.visualId), P = (() => {
|
|
1488
1488
|
var b, S;
|
|
1489
1489
|
return ((b = c == null ? void 0 : c.cards) == null ? void 0 : b.length) === 1 && ((S = c.cards[0]) != null && S.title) ? c.cards[0].title : h != null && h.title ? h.title : (d == null ? void 0 : d.title) || "Untitled Visual";
|
|
1490
|
-
})(), D =
|
|
1490
|
+
})(), D = Za((b) => {
|
|
1491
1491
|
b != null && b.id && (g(b), s && i && l && p && (async () => {
|
|
1492
1492
|
try {
|
|
1493
1493
|
const S = {
|
|
@@ -1532,12 +1532,12 @@ function us() {
|
|
|
1532
1532
|
F = await k(T, {
|
|
1533
1533
|
previousFrame: rt(m, T.id)
|
|
1534
1534
|
});
|
|
1535
|
-
} catch (
|
|
1535
|
+
} catch (B) {
|
|
1536
1536
|
console.error(
|
|
1537
1537
|
"Failed to prepare semantic metadata before saving visual:",
|
|
1538
|
-
|
|
1538
|
+
B
|
|
1539
1539
|
), z.error(
|
|
1540
|
-
|
|
1540
|
+
B instanceof Error ? B.message : "Failed to prepare semantic metadata for the saved visual"
|
|
1541
1541
|
);
|
|
1542
1542
|
return;
|
|
1543
1543
|
}
|
|
@@ -1573,19 +1573,19 @@ function us() {
|
|
|
1573
1573
|
}
|
|
1574
1574
|
},
|
|
1575
1575
|
isLibraryVisual: V,
|
|
1576
|
-
currentVisualName:
|
|
1576
|
+
currentVisualName: P,
|
|
1577
1577
|
isSaving: D.isPending
|
|
1578
1578
|
};
|
|
1579
1579
|
}
|
|
1580
1580
|
function Wi(e = {}) {
|
|
1581
|
-
const { isInspectionMode: a } =
|
|
1582
|
-
saveAsDialogOpen:
|
|
1581
|
+
const { isInspectionMode: a } = Ja(), s = oe((B) => B.frame), n = oe((B) => B.editorContext), i = en((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] = E(!1), [m, f] = E("both"), g = ct(), y = (n == null ? void 0 : n.type) === "documentSection", N = !!(s != null && s.visualId || i != null && i.id), k = !!(s != null && s.visualId && o), V = N && !k, {
|
|
1582
|
+
saveAsDialogOpen: P,
|
|
1583
1583
|
setSaveAsDialogOpen: D,
|
|
1584
1584
|
handleSaveAs: O,
|
|
1585
1585
|
isLibraryVisual: b,
|
|
1586
1586
|
currentVisualName: S,
|
|
1587
1587
|
isSaving: v
|
|
1588
|
-
} = us(), { getUpdatedFrame: T } =
|
|
1588
|
+
} = us(), { getUpdatedFrame: T } = Be();
|
|
1589
1589
|
if (a)
|
|
1590
1590
|
return /* @__PURE__ */ r(U, { children: [
|
|
1591
1591
|
/* @__PURE__ */ t(
|
|
@@ -1629,8 +1629,8 @@ function Wi(e = {}) {
|
|
|
1629
1629
|
setTimeout(() => {
|
|
1630
1630
|
p(!1), z.success("Changes applied. Visual is now local to this dashboard"), c(!1);
|
|
1631
1631
|
}, 300);
|
|
1632
|
-
}, G = (
|
|
1633
|
-
f(
|
|
1632
|
+
}, G = (B) => {
|
|
1633
|
+
f(B), D(!0);
|
|
1634
1634
|
};
|
|
1635
1635
|
return /* @__PURE__ */ r(U, { children: [
|
|
1636
1636
|
/* @__PURE__ */ r("div", { className: "inline-flex items-center overflow-hidden rounded-control", children: [
|
|
@@ -1662,7 +1662,7 @@ function Wi(e = {}) {
|
|
|
1662
1662
|
onClick: F,
|
|
1663
1663
|
disabled: h,
|
|
1664
1664
|
children: [
|
|
1665
|
-
/* @__PURE__ */ t(
|
|
1665
|
+
/* @__PURE__ */ t(Bt, { className: "h-3.5 w-3.5" }),
|
|
1666
1666
|
h ? "Applying..." : "Apply Locally"
|
|
1667
1667
|
]
|
|
1668
1668
|
}
|
|
@@ -1711,9 +1711,9 @@ function Wi(e = {}) {
|
|
|
1711
1711
|
/* @__PURE__ */ t(
|
|
1712
1712
|
cs,
|
|
1713
1713
|
{
|
|
1714
|
-
open:
|
|
1715
|
-
onOpenChange: (
|
|
1716
|
-
v || D(
|
|
1714
|
+
open: P,
|
|
1715
|
+
onOpenChange: (B) => {
|
|
1716
|
+
v || D(B);
|
|
1717
1717
|
},
|
|
1718
1718
|
isLibraryVisual: b,
|
|
1719
1719
|
currentVisualName: S,
|
|
@@ -1736,7 +1736,7 @@ function Qi({ className: e }) {
|
|
|
1736
1736
|
"aria-label": d,
|
|
1737
1737
|
title: d,
|
|
1738
1738
|
onClick: () => i(!a),
|
|
1739
|
-
className:
|
|
1739
|
+
className: Z(
|
|
1740
1740
|
"inline-flex h-7 items-center gap-1.5 rounded-control border border-input bg-background px-2 text-[12px] font-medium text-foreground transition-colors hover:bg-muted/40 focus-visible:border-ring focus-visible:outline-none",
|
|
1741
1741
|
e
|
|
1742
1742
|
),
|
|
@@ -1916,7 +1916,7 @@ function Xi({
|
|
|
1916
1916
|
] })
|
|
1917
1917
|
] }) });
|
|
1918
1918
|
}
|
|
1919
|
-
async function
|
|
1919
|
+
async function Zi(e) {
|
|
1920
1920
|
var o, l;
|
|
1921
1921
|
const a = (l = (o = w.getState()) == null ? void 0 : o.authToken) == null ? void 0 : l.accessToken;
|
|
1922
1922
|
if (!a)
|
|
@@ -2063,7 +2063,7 @@ function Ea({
|
|
|
2063
2063
|
] })
|
|
2064
2064
|
] });
|
|
2065
2065
|
}
|
|
2066
|
-
function
|
|
2066
|
+
function Ji({ variant: e }) {
|
|
2067
2067
|
const { snapshot: a, markSeen: s } = Lt(), n = a.runningCount > 0 ? a.runningCount > 9 ? "9+" : String(a.runningCount) : a.hasUnseenFinished ? "" : null, i = fa("activity", "md", {
|
|
2068
2068
|
label: ge.title,
|
|
2069
2069
|
icon: /* @__PURE__ */ t(ea, { className: "h-3.5 w-3.5" }),
|
|
@@ -2233,7 +2233,7 @@ function fs({
|
|
|
2233
2233
|
), k = sr({
|
|
2234
2234
|
...m || {},
|
|
2235
2235
|
controls: []
|
|
2236
|
-
}), V = Nn(m),
|
|
2236
|
+
}), V = Nn(m), P = (v, T, F) => {
|
|
2237
2237
|
f(
|
|
2238
2238
|
v,
|
|
2239
2239
|
T,
|
|
@@ -2260,7 +2260,7 @@ function fs({
|
|
|
2260
2260
|
initialCreateFlow: i === "create",
|
|
2261
2261
|
onCreateFlowActiveChange: p,
|
|
2262
2262
|
onCreateFlowComplete: D,
|
|
2263
|
-
onChange:
|
|
2263
|
+
onChange: P,
|
|
2264
2264
|
emptyMessage: "No dashboard controls yet."
|
|
2265
2265
|
}
|
|
2266
2266
|
), b = c ? "Add dashboard control" : "Dashboard Controls", S = /* @__PURE__ */ r(U, { children: [
|
|
@@ -2297,7 +2297,7 @@ function fs({
|
|
|
2297
2297
|
{
|
|
2298
2298
|
className: c ? "space-y-0" : void 0,
|
|
2299
2299
|
children: [
|
|
2300
|
-
/* @__PURE__ */ t(
|
|
2300
|
+
/* @__PURE__ */ t(Pe, { className: "text-[15px]", children: b }),
|
|
2301
2301
|
/* @__PURE__ */ t(
|
|
2302
2302
|
ut,
|
|
2303
2303
|
{
|
|
@@ -2355,7 +2355,7 @@ function bs({
|
|
|
2355
2355
|
), V = Y(
|
|
2356
2356
|
() => vs(k),
|
|
2357
2357
|
[k]
|
|
2358
|
-
),
|
|
2358
|
+
), P = Y(
|
|
2359
2359
|
() => [
|
|
2360
2360
|
...xs(h),
|
|
2361
2361
|
...(h.variables ?? []).map((v) => v.name)
|
|
@@ -2396,7 +2396,7 @@ function bs({
|
|
|
2396
2396
|
onPointerDownOutside: u,
|
|
2397
2397
|
children: [
|
|
2398
2398
|
/* @__PURE__ */ r(Tt, { className: l ? "space-y-0" : void 0, children: [
|
|
2399
|
-
/* @__PURE__ */ t(
|
|
2399
|
+
/* @__PURE__ */ t(Pe, { className: "text-[15px]", children: l ? "Add document control" : "Document Controls" }),
|
|
2400
2400
|
/* @__PURE__ */ t(
|
|
2401
2401
|
ut,
|
|
2402
2402
|
{
|
|
@@ -2410,7 +2410,7 @@ function bs({
|
|
|
2410
2410
|
{
|
|
2411
2411
|
scope: "dashboard",
|
|
2412
2412
|
controls: k,
|
|
2413
|
-
reservedControlIds:
|
|
2413
|
+
reservedControlIds: P,
|
|
2414
2414
|
defaultValues: V,
|
|
2415
2415
|
usageByControlId: {},
|
|
2416
2416
|
availableFieldChoices: [],
|
|
@@ -2512,7 +2512,7 @@ function Cs({
|
|
|
2512
2512
|
return /* @__PURE__ */ r(
|
|
2513
2513
|
"div",
|
|
2514
2514
|
{
|
|
2515
|
-
className:
|
|
2515
|
+
className: Z(
|
|
2516
2516
|
// Height lives on the shell so the outer border is part of the
|
|
2517
2517
|
// h-7 box (matches regular `size="xs"` buttons). Inner triggers
|
|
2518
2518
|
// stretch to fill via `h-full`.
|
|
@@ -2527,7 +2527,7 @@ function Cs({
|
|
|
2527
2527
|
{
|
|
2528
2528
|
variant: "ghost",
|
|
2529
2529
|
size: "xs",
|
|
2530
|
-
className:
|
|
2530
|
+
className: Z(
|
|
2531
2531
|
"h-full rounded-none border-0 bg-transparent pl-2.5 pr-2 shadow-none hover:bg-accent/50 data-[state=open]:bg-accent/60",
|
|
2532
2532
|
l
|
|
2533
2533
|
),
|
|
@@ -2542,7 +2542,7 @@ function Cs({
|
|
|
2542
2542
|
{
|
|
2543
2543
|
align: "end",
|
|
2544
2544
|
sideOffset: 6,
|
|
2545
|
-
className:
|
|
2545
|
+
className: Z(
|
|
2546
2546
|
"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)]",
|
|
2547
2547
|
c
|
|
2548
2548
|
),
|
|
@@ -2557,7 +2557,7 @@ function Cs({
|
|
|
2557
2557
|
{
|
|
2558
2558
|
variant: "ghost",
|
|
2559
2559
|
size: "xs",
|
|
2560
|
-
className:
|
|
2560
|
+
className: Z(
|
|
2561
2561
|
"h-full w-7 rounded-none border-0 border-l border-border/60 bg-transparent px-0 shadow-none hover:bg-accent/50 data-[state=open]:bg-accent/60",
|
|
2562
2562
|
u
|
|
2563
2563
|
),
|
|
@@ -2570,7 +2570,7 @@ function Cs({
|
|
|
2570
2570
|
{
|
|
2571
2571
|
align: "end",
|
|
2572
2572
|
sideOffset: 6,
|
|
2573
|
-
className:
|
|
2573
|
+
className: Z(
|
|
2574
2574
|
"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)]",
|
|
2575
2575
|
d
|
|
2576
2576
|
),
|
|
@@ -2722,7 +2722,7 @@ function Ds({
|
|
|
2722
2722
|
return /* @__PURE__ */ r("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: [
|
|
2723
2723
|
/* @__PURE__ */ t(It, { id: e, checked: s, onCheckedChange: n }),
|
|
2724
2724
|
/* @__PURE__ */ t(
|
|
2725
|
-
|
|
2725
|
+
Me,
|
|
2726
2726
|
{
|
|
2727
2727
|
htmlFor: e,
|
|
2728
2728
|
className: "cursor-pointer text-[12px] font-normal leading-[1.3]",
|
|
@@ -2765,7 +2765,7 @@ function eo({
|
|
|
2765
2765
|
]
|
|
2766
2766
|
), V = ie(() => {
|
|
2767
2767
|
k(!0);
|
|
2768
|
-
}, [k]),
|
|
2768
|
+
}, [k]), P = ie(() => {
|
|
2769
2769
|
N("create");
|
|
2770
2770
|
}, [N]), D = ie(() => {
|
|
2771
2771
|
N("manage");
|
|
@@ -2781,7 +2781,7 @@ function eo({
|
|
|
2781
2781
|
ks,
|
|
2782
2782
|
{
|
|
2783
2783
|
onAddFilter: V,
|
|
2784
|
-
onAddControl:
|
|
2784
|
+
onAddControl: P,
|
|
2785
2785
|
onManageControls: D,
|
|
2786
2786
|
onDismiss: b
|
|
2787
2787
|
}
|
|
@@ -2902,10 +2902,10 @@ function ia({
|
|
|
2902
2902
|
className: "grid w-full grid-cols-[minmax(0,1fr)_132px] items-center gap-3 border-t border-border/60 px-4 py-2 text-left first:border-t-0 hover:bg-muted/50",
|
|
2903
2903
|
children: [
|
|
2904
2904
|
/* @__PURE__ */ r("span", { className: "min-w-0", children: [
|
|
2905
|
-
/* @__PURE__ */ t("span", { className:
|
|
2905
|
+
/* @__PURE__ */ t("span", { className: Z("block truncate text-[12px] font-medium text-foreground", !e.variable.label && "font-mono"), children: e.variable.label || e.variable.name }),
|
|
2906
2906
|
/* @__PURE__ */ t("span", { className: "mt-0.5 block truncate text-[11px] text-muted-foreground", children: e.question })
|
|
2907
2907
|
] }),
|
|
2908
|
-
/* @__PURE__ */ t("span", { className:
|
|
2908
|
+
/* @__PURE__ */ t("span", { className: Z("truncate text-right text-[11px]", n ? "text-muted-foreground/70" : "text-muted-foreground"), children: Fs(e, a) })
|
|
2909
2909
|
]
|
|
2910
2910
|
}
|
|
2911
2911
|
);
|
|
@@ -2952,7 +2952,7 @@ function Is(e, a) {
|
|
|
2952
2952
|
return new Set(
|
|
2953
2953
|
(e.sheets ?? []).map((i) => {
|
|
2954
2954
|
const o = { sheetId: i.id, cardId: a, sheetKind: Ke(i) ? "document" : "dashboard" };
|
|
2955
|
-
return s.filter((l) =>
|
|
2955
|
+
return s.filter((l) => Pr(l, o)).map((l) => l.runtimeScope === "shared" ? l.id : `${l.id}@${i.id}`).join(`
|
|
2956
2956
|
`);
|
|
2957
2957
|
})
|
|
2958
2958
|
).size > 1;
|
|
@@ -2979,7 +2979,7 @@ function Vs(e, a) {
|
|
|
2979
2979
|
})
|
|
2980
2980
|
).columns;
|
|
2981
2981
|
}
|
|
2982
|
-
function
|
|
2982
|
+
function Ps(e) {
|
|
2983
2983
|
const { tokenProps: a } = $e(), s = w((m) => m.authToken), { connections: n } = va(), i = e == null ? void 0 : e.connectionId, o = n.find((m) => m.id === i), l = Y(
|
|
2984
2984
|
() => ((e == null ? void 0 : e.selectedEntities) ?? []).filter(Ls),
|
|
2985
2985
|
[e == null ? void 0 : e.selectedEntities]
|
|
@@ -3041,7 +3041,7 @@ function Bs(e) {
|
|
|
3041
3041
|
});
|
|
3042
3042
|
return { fields: d, isLoading: h, error: p };
|
|
3043
3043
|
}
|
|
3044
|
-
function
|
|
3044
|
+
function Bs(e) {
|
|
3045
3045
|
var s;
|
|
3046
3046
|
const a = ((s = e.comparison) == null ? void 0 : s.mode) === "explicit" ? e.comparison.spec : void 0;
|
|
3047
3047
|
return a && a.kind !== "target" ? { mode: "period", spec: a } : { mode: "off" };
|
|
@@ -3049,7 +3049,7 @@ function Ps(e) {
|
|
|
3049
3049
|
function _s(e) {
|
|
3050
3050
|
return e.mode === "period" ? gr(e.spec) : void 0;
|
|
3051
3051
|
}
|
|
3052
|
-
const
|
|
3052
|
+
const Mt = "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", Os = {
|
|
3053
3053
|
connectionId: "",
|
|
3054
3054
|
connectionType: "",
|
|
3055
3055
|
mode: "semanticDomain",
|
|
@@ -3064,7 +3064,7 @@ function se({
|
|
|
3064
3064
|
}) {
|
|
3065
3065
|
return /* @__PURE__ */ r("div", { className: i, children: [
|
|
3066
3066
|
/* @__PURE__ */ r("div", { className: "mb-1 flex min-h-5 items-center justify-between gap-2", children: [
|
|
3067
|
-
/* @__PURE__ */ t("p", { className:
|
|
3067
|
+
/* @__PURE__ */ t("p", { className: Mt, children: e }),
|
|
3068
3068
|
s
|
|
3069
3069
|
] }),
|
|
3070
3070
|
n,
|
|
@@ -3083,7 +3083,7 @@ function yt({
|
|
|
3083
3083
|
type: "button",
|
|
3084
3084
|
onClick: a,
|
|
3085
3085
|
"aria-label": n,
|
|
3086
|
-
className:
|
|
3086
|
+
className: Z(
|
|
3087
3087
|
"flex h-7 w-full items-center gap-1.5 rounded-control border border-input bg-background px-2 text-left text-[12px] hover:bg-muted/50",
|
|
3088
3088
|
e ? "text-muted-foreground" : "text-foreground"
|
|
3089
3089
|
),
|
|
@@ -3097,39 +3097,39 @@ function zs(e) {
|
|
|
3097
3097
|
if (a)
|
|
3098
3098
|
return a.label || a.name;
|
|
3099
3099
|
}
|
|
3100
|
-
function
|
|
3100
|
+
function Rs(e) {
|
|
3101
3101
|
const a = Ot(e);
|
|
3102
3102
|
return a === "date" ? "date" : a === "string" ? "text" : a === "number" ? "number" : a === "boolean" ? "yes/no" : a;
|
|
3103
3103
|
}
|
|
3104
3104
|
const oa = "__new_calculated_field__";
|
|
3105
|
-
function
|
|
3105
|
+
function Ms({
|
|
3106
3106
|
draft: e,
|
|
3107
3107
|
onChange: a,
|
|
3108
3108
|
handle: s,
|
|
3109
3109
|
onCalculatedFieldOpenChange: n
|
|
3110
3110
|
}) {
|
|
3111
|
-
var _, te,
|
|
3111
|
+
var _, te, J, H, I, ae, j, R, ne, ue, he, ye;
|
|
3112
3112
|
const { tokenProps: i } = $e(), o = ((_ = i.config) == null ? void 0 : _.showAdvancedMode) !== !1, l = ((te = i.config) == null ? void 0 : te.showDirectSource) !== !1, { connections: u } = va(), [c, d] = E(!1), [h, p] = E(!1), [m, f] = E(!1), g = (x) => {
|
|
3113
3113
|
p(x), n == null || n(x);
|
|
3114
|
-
}, { fields: y, isLoading: N, error: k } =
|
|
3114
|
+
}, { fields: y, isLoading: N, error: k } = Ps(e.mode === "data" ? e.dataSource : void 0), V = [...e.calculatedFields ?? [], ...y], P = (x) => x && (V.find((M) => M.id === x.id) ?? V.find((M) => Us(M, x))), D = [
|
|
3115
3115
|
...V,
|
|
3116
3116
|
...[e.field, e.sortField].filter(
|
|
3117
|
-
(x) => !!x && !
|
|
3117
|
+
(x) => !!x && !P(x) && !V.some((M) => M.id === x.id)
|
|
3118
3118
|
)
|
|
3119
|
-
], O = ((
|
|
3120
|
-
connectionId: ((
|
|
3119
|
+
], O = ((J = P(e.field)) == null ? void 0 : J.id) ?? ((H = e.field) == null ? void 0 : H.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, F = "mt-1 inline-flex items-center gap-1 text-[11px] font-medium text-muted-foreground underline-offset-2 hover:text-foreground hover:underline", G = {
|
|
3120
|
+
connectionId: ((R = e.dataSource) == null ? void 0 : R.connectionId) || e.connectionId,
|
|
3121
3121
|
dataSource: e.dataSource,
|
|
3122
3122
|
config: e.conditions ? { filters: e.conditions } : {},
|
|
3123
3123
|
cardType: "text"
|
|
3124
|
-
},
|
|
3124
|
+
}, B = Yt(e.field), Q = (ne = B.find((x) => x.value === e.get)) == null ? void 0 : ne.hint, X = (x) => {
|
|
3125
3125
|
if (x === oa) {
|
|
3126
3126
|
g(!0);
|
|
3127
3127
|
return;
|
|
3128
3128
|
}
|
|
3129
|
-
const
|
|
3130
|
-
if (!
|
|
3131
|
-
const $ = Yt(
|
|
3132
|
-
S({ field:
|
|
3129
|
+
const M = D.find((K) => K.id === x);
|
|
3130
|
+
if (!M) return;
|
|
3131
|
+
const $ = Yt(M).some((K) => K.value === e.get) && e.field !== void 0;
|
|
3132
|
+
S({ field: M, get: $ ? e.get : Xt(M) });
|
|
3133
3133
|
};
|
|
3134
3134
|
return h ? /* @__PURE__ */ t(
|
|
3135
3135
|
Fn,
|
|
@@ -3141,11 +3141,11 @@ function Rs({
|
|
|
3141
3141
|
cardId: e.id,
|
|
3142
3142
|
source: G,
|
|
3143
3143
|
onSave: (x) => {
|
|
3144
|
-
const
|
|
3144
|
+
const M = { ...x, fieldScope: x.fieldScope ?? "card" };
|
|
3145
3145
|
S({
|
|
3146
|
-
calculatedFields: [...(e.calculatedFields ?? []).filter(($) => $.id !==
|
|
3147
|
-
field:
|
|
3148
|
-
get: Xt(
|
|
3146
|
+
calculatedFields: [...(e.calculatedFields ?? []).filter(($) => $.id !== M.id), M],
|
|
3147
|
+
field: M,
|
|
3148
|
+
get: Xt(M)
|
|
3149
3149
|
}), g(!1);
|
|
3150
3150
|
}
|
|
3151
3151
|
}
|
|
@@ -3242,9 +3242,9 @@ function Rs({
|
|
|
3242
3242
|
incomingSelectedEntities: ((he = e.dataSource) == null ? void 0 : he.selectedEntities) ?? [],
|
|
3243
3243
|
onDataSourceChange: (x) => {
|
|
3244
3244
|
var $;
|
|
3245
|
-
const
|
|
3245
|
+
const M = JSON.stringify(x.selectedEntities) === JSON.stringify(($ = e.dataSource) == null ? void 0 : $.selectedEntities);
|
|
3246
3246
|
S(
|
|
3247
|
-
|
|
3247
|
+
M ? { dataSource: x } : { dataSource: x, field: void 0, sortField: void 0, conditions: null, calculatedFields: void 0 }
|
|
3248
3248
|
);
|
|
3249
3249
|
}
|
|
3250
3250
|
}
|
|
@@ -3255,7 +3255,7 @@ function Rs({
|
|
|
3255
3255
|
/* @__PURE__ */ r(De, { children: [
|
|
3256
3256
|
D.map((x) => /* @__PURE__ */ t(fe, { value: x.id, children: /* @__PURE__ */ r("span", { className: "flex items-center gap-2", children: [
|
|
3257
3257
|
/* @__PURE__ */ t("span", { children: x.label || x.name }),
|
|
3258
|
-
/* @__PURE__ */ t("span", { className: "text-muted-foreground", children:
|
|
3258
|
+
/* @__PURE__ */ t("span", { className: "text-muted-foreground", children: Rs(x.dataType) })
|
|
3259
3259
|
] }) }, x.id)),
|
|
3260
3260
|
/* @__PURE__ */ t(tr, {}),
|
|
3261
3261
|
/* @__PURE__ */ t(fe, { value: oa, children: /* @__PURE__ */ r("span", { className: "flex items-center gap-1.5", children: [
|
|
@@ -3272,7 +3272,7 @@ function Rs({
|
|
|
3272
3272
|
disabled: !e.field,
|
|
3273
3273
|
children: [
|
|
3274
3274
|
/* @__PURE__ */ t(Se, { size: "xs", "aria-label": "Get", children: /* @__PURE__ */ t(ke, {}) }),
|
|
3275
|
-
/* @__PURE__ */ t(De, { children:
|
|
3275
|
+
/* @__PURE__ */ t(De, { children: B.map((x) => /* @__PURE__ */ t(fe, { value: x.value, children: x.label }, x.value)) })
|
|
3276
3276
|
]
|
|
3277
3277
|
}
|
|
3278
3278
|
) }),
|
|
@@ -3287,29 +3287,29 @@ function Rs({
|
|
|
3287
3287
|
En,
|
|
3288
3288
|
{
|
|
3289
3289
|
controlLabel: "Variable",
|
|
3290
|
-
selection:
|
|
3290
|
+
selection: Bs(e),
|
|
3291
3291
|
onChange: (x) => S({ comparison: _s(x) })
|
|
3292
3292
|
}
|
|
3293
3293
|
)
|
|
3294
3294
|
}
|
|
3295
3295
|
) : null,
|
|
3296
|
-
e.field && !
|
|
3296
|
+
e.field && !Rr(e.get) && e.get !== "only" ? /* @__PURE__ */ r("div", { className: Z("col-span-2 grid gap-3", e.get === "list" ? "grid-cols-3" : "grid-cols-2"), children: [
|
|
3297
3297
|
/* @__PURE__ */ t(se, { label: "Order by", children: /* @__PURE__ */ r(
|
|
3298
3298
|
we,
|
|
3299
3299
|
{
|
|
3300
3300
|
value: `${b}|${e.sortDirection}`,
|
|
3301
3301
|
onValueChange: (x) => {
|
|
3302
|
-
const
|
|
3302
|
+
const M = x.lastIndexOf("|"), $ = x.slice(0, M), K = x.slice(M + 1);
|
|
3303
3303
|
S({ sortField: D.find((le) => le.id === $), sortDirection: K });
|
|
3304
3304
|
},
|
|
3305
3305
|
children: [
|
|
3306
3306
|
/* @__PURE__ */ t(Se, { size: "xs", "aria-label": "Order by", children: /* @__PURE__ */ t(ke, {}) }),
|
|
3307
3307
|
/* @__PURE__ */ t(De, { children: D.flatMap(
|
|
3308
|
-
(x) => ["asc", "desc"].map((
|
|
3308
|
+
(x) => ["asc", "desc"].map((M) => /* @__PURE__ */ r(fe, { value: `${x.id}|${M}`, children: [
|
|
3309
3309
|
x.label || x.name,
|
|
3310
3310
|
", ",
|
|
3311
|
-
$s(x,
|
|
3312
|
-
] }, `${x.id}|${
|
|
3311
|
+
$s(x, M)
|
|
3312
|
+
] }, `${x.id}|${M}`))
|
|
3313
3313
|
) })
|
|
3314
3314
|
]
|
|
3315
3315
|
}
|
|
@@ -3325,8 +3325,8 @@ function Rs({
|
|
|
3325
3325
|
value: e.listLimit ?? "",
|
|
3326
3326
|
placeholder: "10",
|
|
3327
3327
|
onChange: (x) => {
|
|
3328
|
-
const
|
|
3329
|
-
S({ listLimit: Number.isFinite(
|
|
3328
|
+
const M = Number.parseInt(x.target.value, 10);
|
|
3329
|
+
S({ listLimit: Number.isFinite(M) && M > 0 ? Math.min(M, st) : void 0 });
|
|
3330
3330
|
},
|
|
3331
3331
|
"aria-label": "Show up to"
|
|
3332
3332
|
}
|
|
@@ -3420,47 +3420,47 @@ function Qs({
|
|
|
3420
3420
|
onClose: a,
|
|
3421
3421
|
onHoldEscape: s
|
|
3422
3422
|
}) {
|
|
3423
|
-
var
|
|
3423
|
+
var J, H;
|
|
3424
3424
|
const n = w((I) => I.dashboard), i = w((I) => I.selectedSheetId), o = w((I) => I.actions.saveVariableChange), [l, u] = E(
|
|
3425
|
-
() => e ?
|
|
3425
|
+
() => e ? Mr(e) : Ur()
|
|
3426
3426
|
), [c, d] = E("data"), [h, p] = E(!1), m = (I) => {
|
|
3427
3427
|
p(I), s == null || s(I);
|
|
3428
|
-
}, [f, g] = E([]), [y, N] = E(null), k = !e, V = Ws(l),
|
|
3429
|
-
() =>
|
|
3428
|
+
}, [f, g] = E([]), [y, N] = E(null), k = !e, V = Ws(l), P = Y(
|
|
3429
|
+
() => Zt({ ...JSON.parse(V), name: "" }, n),
|
|
3430
3430
|
[V, n]
|
|
3431
3431
|
), { name: D, label: O, presentation: b, emptyText: S } = l, v = Y(
|
|
3432
3432
|
() => ({
|
|
3433
|
-
...
|
|
3434
|
-
name:
|
|
3433
|
+
...P,
|
|
3434
|
+
name: Jt(n, { id: P.id, name: D, field: l.field, mode: l.mode, label: O }),
|
|
3435
3435
|
...O != null && O.trim() ? { label: O.trim() } : {},
|
|
3436
3436
|
...b ? { presentation: b } : {},
|
|
3437
3437
|
...S != null && S.trim() ? { emptyText: S } : {}
|
|
3438
3438
|
}),
|
|
3439
3439
|
// The field and mode are inside the query key already.
|
|
3440
|
-
[
|
|
3440
|
+
[P, n, D, O, b, S, l.field, l.mode]
|
|
3441
3441
|
), T = Y(
|
|
3442
3442
|
() => ({
|
|
3443
3443
|
...n,
|
|
3444
3444
|
variables: [...(n.variables ?? []).filter((I) => I.id !== v.id), v]
|
|
3445
3445
|
}),
|
|
3446
3446
|
[n, v]
|
|
3447
|
-
), F = $r(l), G = ct(),
|
|
3448
|
-
const I =
|
|
3447
|
+
), F = $r(l), G = ct(), B = w((I) => I.actions.mergeSemanticExecutionPayload), [Q, X] = E(!1), _ = async () => {
|
|
3448
|
+
const I = Zt(l, n);
|
|
3449
3449
|
X(!0);
|
|
3450
3450
|
let ae;
|
|
3451
3451
|
try {
|
|
3452
|
-
const
|
|
3453
|
-
if (!
|
|
3454
|
-
X(!1), g(
|
|
3452
|
+
const R = Nr(n, e ? { kind: "update", id: e.id, patch: I } : { kind: "add", variable: I });
|
|
3453
|
+
if (!R.ok) {
|
|
3454
|
+
X(!1), g(R.issues);
|
|
3455
3455
|
return;
|
|
3456
3456
|
}
|
|
3457
|
-
const [ne] =
|
|
3457
|
+
const [ne] = R.queryFrames;
|
|
3458
3458
|
ae = ne ? await G(ne, e ? { previousFrame: Cr(n, e) } : void 0) : { domainsById: {} };
|
|
3459
|
-
} catch (
|
|
3459
|
+
} catch (R) {
|
|
3460
3460
|
X(!1), g([
|
|
3461
3461
|
{
|
|
3462
3462
|
code: "queryMissing",
|
|
3463
|
-
message:
|
|
3463
|
+
message: R instanceof Error && R.message ? R.message : "The data source's details could not be loaded.",
|
|
3464
3464
|
fix: "Try again, or choose the source again."
|
|
3465
3465
|
}
|
|
3466
3466
|
]);
|
|
@@ -3473,12 +3473,12 @@ function Qs({
|
|
|
3473
3473
|
g(j.issues);
|
|
3474
3474
|
return;
|
|
3475
3475
|
}
|
|
3476
|
-
|
|
3476
|
+
B(ae), a();
|
|
3477
3477
|
}, te = (I) => {
|
|
3478
3478
|
if (!e) return;
|
|
3479
3479
|
const ae = o({ kind: "remove", id: e.id, confirmed: I });
|
|
3480
3480
|
if (!ae.ok) {
|
|
3481
|
-
const j = ae.issues.find((
|
|
3481
|
+
const j = ae.issues.find((R) => R.code === "inUse");
|
|
3482
3482
|
if (j && !I) {
|
|
3483
3483
|
N(j);
|
|
3484
3484
|
return;
|
|
@@ -3500,7 +3500,7 @@ function Qs({
|
|
|
3500
3500
|
/* @__PURE__ */ r("div", { className: "min-w-0", children: [
|
|
3501
3501
|
/* @__PURE__ */ r("p", { className: "flex items-center gap-2", children: [
|
|
3502
3502
|
/* @__PURE__ */ t("span", { className: "truncate text-[13px] font-medium text-foreground", children: k ? "New variable" : e.label || e.name }),
|
|
3503
|
-
/* @__PURE__ */ t("span", { className:
|
|
3503
|
+
/* @__PURE__ */ t("span", { className: Mt, children: "Variable from data" })
|
|
3504
3504
|
] }),
|
|
3505
3505
|
/* @__PURE__ */ t("p", { className: "mt-0.5 truncate text-[10px] leading-3 text-muted-foreground/70", children: "Available on every tab and Document of this dashboard" })
|
|
3506
3506
|
] })
|
|
@@ -3522,7 +3522,7 @@ function Qs({
|
|
|
3522
3522
|
role: "tab",
|
|
3523
3523
|
"aria-selected": c === I.id,
|
|
3524
3524
|
onClick: () => d(I.id),
|
|
3525
|
-
className:
|
|
3525
|
+
className: Z(
|
|
3526
3526
|
"relative -mb-px inline-flex items-center text-[13px] transition-colors focus-visible:outline-none",
|
|
3527
3527
|
c === I.id ? "font-medium text-foreground" : "text-muted-foreground hover:text-foreground"
|
|
3528
3528
|
),
|
|
@@ -3533,13 +3533,13 @@ function Qs({
|
|
|
3533
3533
|
},
|
|
3534
3534
|
I.id
|
|
3535
3535
|
)) }),
|
|
3536
|
-
/* @__PURE__ */ r("div", { className:
|
|
3536
|
+
/* @__PURE__ */ r("div", { className: Z("min-h-0 flex-1 overflow-y-auto", c === "filters" || h ? "" : "space-y-4 px-4 py-4"), children: [
|
|
3537
3537
|
c === "data" ? /* @__PURE__ */ t(
|
|
3538
|
-
|
|
3538
|
+
Ms,
|
|
3539
3539
|
{
|
|
3540
3540
|
draft: l,
|
|
3541
3541
|
onChange: u,
|
|
3542
|
-
handle:
|
|
3542
|
+
handle: Jt(n, l),
|
|
3543
3543
|
onCalculatedFieldOpenChange: m
|
|
3544
3544
|
}
|
|
3545
3545
|
) : null,
|
|
@@ -3548,7 +3548,7 @@ function Qs({
|
|
|
3548
3548
|
] }),
|
|
3549
3549
|
h ? null : /* @__PURE__ */ r(U, { children: [
|
|
3550
3550
|
/* @__PURE__ */ t(
|
|
3551
|
-
|
|
3551
|
+
Zs,
|
|
3552
3552
|
{
|
|
3553
3553
|
draft: l,
|
|
3554
3554
|
draftVariable: v,
|
|
@@ -3566,7 +3566,7 @@ function Qs({
|
|
|
3566
3566
|
/* @__PURE__ */ r("p", { children: [
|
|
3567
3567
|
y.message,
|
|
3568
3568
|
" Used in ",
|
|
3569
|
-
((
|
|
3569
|
+
((J = y.places) == null ? void 0 : J.length) ?? 0,
|
|
3570
3570
|
" ",
|
|
3571
3571
|
((H = y.places) == null ? void 0 : H.length) === 1 ? "place" : "places",
|
|
3572
3572
|
". Its chips then read as missing."
|
|
@@ -3621,7 +3621,7 @@ function Gs({ draft: e, draftDashboard: a }) {
|
|
|
3621
3621
|
/* @__PURE__ */ t("span", { className: "block truncate font-medium text-foreground", children: o.input.label || o.input.filter.title }),
|
|
3622
3622
|
/* @__PURE__ */ t("span", { className: "block truncate text-[11px] text-muted-foreground", children: Hs(o.input.scope) })
|
|
3623
3623
|
] }),
|
|
3624
|
-
/* @__PURE__ */ t("span", { className:
|
|
3624
|
+
/* @__PURE__ */ t("span", { className: Z("shrink-0 text-[11px]", u === "Don't apply" || u === "Not named in the SQL" ? "text-muted-foreground" : "text-foreground"), children: u })
|
|
3625
3625
|
] }, o.input.id);
|
|
3626
3626
|
})
|
|
3627
3627
|
] }) : /* @__PURE__ */ t("p", { className: "px-4 py-6 text-center text-[12px] text-muted-foreground", children: "No filter reaches this variable. A filter on the tabs or Documents where it is used reaches it; a variable used nowhere yet follows every tab's filters." });
|
|
@@ -3700,7 +3700,7 @@ function Xs({ draft: e, onChange: a }) {
|
|
|
3700
3700
|
)
|
|
3701
3701
|
] });
|
|
3702
3702
|
}
|
|
3703
|
-
function
|
|
3703
|
+
function Zs({
|
|
3704
3704
|
draft: e,
|
|
3705
3705
|
draftVariable: a,
|
|
3706
3706
|
draftDashboard: s,
|
|
@@ -3716,7 +3716,7 @@ function Js({
|
|
|
3716
3716
|
place: f ?? { kind: "sheet", sheetId: d ?? "" },
|
|
3717
3717
|
purpose: "preview",
|
|
3718
3718
|
variables: g
|
|
3719
|
-
}).byId.get(a.id), k = Ln(), V = Vn(),
|
|
3719
|
+
}).byId.get(a.id), k = Ln(), V = Vn(), P = Y(
|
|
3720
3720
|
() => yr({ preferences: k, calendar: V }),
|
|
3721
3721
|
[V, k]
|
|
3722
3722
|
);
|
|
@@ -3728,7 +3728,7 @@ function Js({
|
|
|
3728
3728
|
else if (!N || N.status === "loading")
|
|
3729
3729
|
D = /* @__PURE__ */ t("span", { className: "text-muted-foreground", children: "Loading…" });
|
|
3730
3730
|
else {
|
|
3731
|
-
const v =
|
|
3731
|
+
const v = Js(a, N, P);
|
|
3732
3732
|
if (D = v.body, O = v.meta, v.unavailable) {
|
|
3733
3733
|
const T = (h == null ? void 0 : h.title) || "this tab";
|
|
3734
3734
|
b = /* @__PURE__ */ r("p", { className: "mt-1.5 flex gap-1.5 text-[11px] leading-4 text-amber-700 dark:text-amber-400", children: [
|
|
@@ -3737,14 +3737,14 @@ function Js({
|
|
|
3737
3737
|
"No change on ",
|
|
3738
3738
|
T,
|
|
3739
3739
|
". ",
|
|
3740
|
-
|
|
3740
|
+
Pn(v.unavailable, "variable")
|
|
3741
3741
|
] })
|
|
3742
3742
|
] });
|
|
3743
3743
|
}
|
|
3744
3744
|
}
|
|
3745
3745
|
return /* @__PURE__ */ r("div", { className: "shrink-0 border-t border-border/60 bg-muted/30 px-4 py-2.5", "data-testid": "variable-preview", children: [
|
|
3746
3746
|
/* @__PURE__ */ r("div", { className: "flex items-center gap-3", children: [
|
|
3747
|
-
/* @__PURE__ */ t("span", { className:
|
|
3747
|
+
/* @__PURE__ */ t("span", { className: Mt, children: l ? "Preview on" : "Preview" }),
|
|
3748
3748
|
l ? /* @__PURE__ */ r(we, { value: d ?? "", onValueChange: c, disabled: !!n, children: [
|
|
3749
3749
|
/* @__PURE__ */ t(Se, { size: "xs", className: "h-6 w-auto gap-1.5 px-2 text-[12px]", "aria-label": "Preview place", children: /* @__PURE__ */ t(ke, {}) }),
|
|
3750
3750
|
/* @__PURE__ */ t(De, { children: o.map((v) => /* @__PURE__ */ t(fe, { value: v.id, children: v.title || v.id }, v.id)) })
|
|
@@ -3755,7 +3755,7 @@ function Js({
|
|
|
3755
3755
|
b
|
|
3756
3756
|
] });
|
|
3757
3757
|
}
|
|
3758
|
-
function
|
|
3758
|
+
function Js(e, a, s) {
|
|
3759
3759
|
const n = (h) => /* @__PURE__ */ t("span", { className: "font-medium text-foreground", children: h }), i = (h) => /* @__PURE__ */ r("span", { className: "inline-flex items-center gap-1.5 text-[12px] text-amber-700 dark:text-amber-400", children: [
|
|
3760
3760
|
/* @__PURE__ */ t(ya, { className: "h-3.5 w-3.5", "aria-hidden": !0 }),
|
|
3761
3761
|
" ",
|
|
@@ -3763,7 +3763,7 @@ function Zs(e, a, s) {
|
|
|
3763
3763
|
] }), 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` : ""}` : "";
|
|
3764
3764
|
switch (a.status) {
|
|
3765
3765
|
case "answered": {
|
|
3766
|
-
const h =
|
|
3766
|
+
const h = Br(e, Object.keys(a.parts))[0], p = h ? a.parts[h] : void 0, m = p && Gt(p, e.presentation, s) || "(empty)", f = `${o(a.matched)}${d}`.replace(/^ · /, ""), g = wr(e, a, s);
|
|
3767
3767
|
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 ? {
|
|
3768
3768
|
body: /* @__PURE__ */ r(U, { children: [
|
|
3769
3769
|
n(g.value),
|
|
@@ -3813,7 +3813,7 @@ function no() {
|
|
|
3813
3813
|
n.current ? l.preventDefault() : s();
|
|
3814
3814
|
},
|
|
3815
3815
|
children: [
|
|
3816
|
-
/* @__PURE__ */ t(
|
|
3816
|
+
/* @__PURE__ */ t(Pe, { className: "sr-only", children: "Variable from data" }),
|
|
3817
3817
|
/* @__PURE__ */ t(ut, { className: "sr-only", children: "Define a value from your data to show in text." }),
|
|
3818
3818
|
/* @__PURE__ */ t(
|
|
3819
3819
|
Qs,
|
|
@@ -3845,7 +3845,7 @@ function ei({
|
|
|
3845
3845
|
size: "xs",
|
|
3846
3846
|
variant: "outline",
|
|
3847
3847
|
disabled: e,
|
|
3848
|
-
className:
|
|
3848
|
+
className: Z("gap-1.5", s),
|
|
3849
3849
|
onClick: n,
|
|
3850
3850
|
"aria-label": "Reports & briefings",
|
|
3851
3851
|
children: [
|
|
@@ -3856,7 +3856,7 @@ function ei({
|
|
|
3856
3856
|
}
|
|
3857
3857
|
);
|
|
3858
3858
|
}
|
|
3859
|
-
const ti = "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", Ia = "inline-flex h-7 items-center gap-1.5 rounded-control px-2 text-[12px] text-muted-foreground hover:bg-muted hover:text-foreground disabled:opacity-50",
|
|
3859
|
+
const ti = "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", Ia = "inline-flex h-7 items-center gap-1.5 rounded-control px-2 text-[12px] text-muted-foreground hover:bg-muted hover:text-foreground disabled:opacity-50", Je = "inline-flex h-7 items-center gap-1.5 rounded-control bg-primary px-3 text-[12px] font-medium text-primary-foreground hover:bg-primary/90 disabled:opacity-50";
|
|
3860
3860
|
function ai(e) {
|
|
3861
3861
|
return e === "dashboard" ? "This dashboard" : "Project";
|
|
3862
3862
|
}
|
|
@@ -3912,7 +3912,7 @@ function oi({
|
|
|
3912
3912
|
role: "tab",
|
|
3913
3913
|
"aria-selected": n,
|
|
3914
3914
|
onClick: () => a(s),
|
|
3915
|
-
className:
|
|
3915
|
+
className: Z(
|
|
3916
3916
|
"h-6 rounded-[3px] px-2 text-[11px] transition-colors",
|
|
3917
3917
|
n ? "bg-background font-medium text-foreground shadow-sm" : "text-muted-foreground hover:text-foreground"
|
|
3918
3918
|
),
|
|
@@ -3944,7 +3944,7 @@ function li({
|
|
|
3944
3944
|
busyId: N,
|
|
3945
3945
|
manageBriefingsHref: k,
|
|
3946
3946
|
contentKind: V,
|
|
3947
|
-
hideHeader:
|
|
3947
|
+
hideHeader: P = !1
|
|
3948
3948
|
}) {
|
|
3949
3949
|
const D = e.length, O = e.filter((F) => F.status === "ACTIVE").length, b = V === "reports" ? D === 1 ? "report" : "reports" : V === "briefings" ? D === 1 ? "briefing" : "briefings" : D === 1 ? "item" : "items", S = e.find((F) => F.hasActiveRun) ?? null, v = V ?? "reports & briefings", T = s === "dashboard" ? a : `Project ${v}`;
|
|
3950
3950
|
return /* @__PURE__ */ r(
|
|
@@ -3953,7 +3953,7 @@ function li({
|
|
|
3953
3953
|
"aria-label": `Dashboard ${v.replace("&", "and")}`,
|
|
3954
3954
|
className: "flex h-full min-h-0 flex-col bg-background text-foreground",
|
|
3955
3955
|
children: [
|
|
3956
|
-
|
|
3956
|
+
P ? null : /* @__PURE__ */ r("header", { className: "flex items-start justify-between gap-3 border-b border-border px-4 py-3", children: [
|
|
3957
3957
|
/* @__PURE__ */ r("div", { className: "min-w-0", children: [
|
|
3958
3958
|
/* @__PURE__ */ t("div", { className: ti, children: v }),
|
|
3959
3959
|
/* @__PURE__ */ t("h2", { className: "mt-0.5 truncate text-[14px] font-semibold leading-5", children: T })
|
|
@@ -4008,7 +4008,7 @@ function li({
|
|
|
4008
4008
|
/* @__PURE__ */ t(de, { className: "h-3.5 w-3.5 animate-spin text-muted-foreground" })
|
|
4009
4009
|
) : null,
|
|
4010
4010
|
D > 0 && d ? p && h ? /* @__PURE__ */ r(je, { children: [
|
|
4011
|
-
/* @__PURE__ */ t(qe, { asChild: !0, children: /* @__PURE__ */ r("button", { className:
|
|
4011
|
+
/* @__PURE__ */ t(qe, { asChild: !0, children: /* @__PURE__ */ r("button", { className: Je, children: [
|
|
4012
4012
|
/* @__PURE__ */ t(be, { className: "h-3 w-3" }),
|
|
4013
4013
|
" New"
|
|
4014
4014
|
] }) }),
|
|
@@ -4026,7 +4026,7 @@ function li({
|
|
|
4026
4026
|
"button",
|
|
4027
4027
|
{
|
|
4028
4028
|
onClick: () => c("scheduled_report"),
|
|
4029
|
-
className:
|
|
4029
|
+
className: Je,
|
|
4030
4030
|
children: [
|
|
4031
4031
|
/* @__PURE__ */ t(be, { className: "h-3 w-3" }),
|
|
4032
4032
|
" Schedule report"
|
|
@@ -4036,7 +4036,7 @@ function li({
|
|
|
4036
4036
|
"button",
|
|
4037
4037
|
{
|
|
4038
4038
|
onClick: () => c("analytical_briefing"),
|
|
4039
|
-
className:
|
|
4039
|
+
className: Je,
|
|
4040
4040
|
children: [
|
|
4041
4041
|
/* @__PURE__ */ t(be, { className: "h-3 w-3" }),
|
|
4042
4042
|
" New briefing"
|
|
@@ -4081,7 +4081,7 @@ function li({
|
|
|
4081
4081
|
"a",
|
|
4082
4082
|
{
|
|
4083
4083
|
href: k,
|
|
4084
|
-
className:
|
|
4084
|
+
className: Z(Ia, "h-6 px-1 text-[11px]"),
|
|
4085
4085
|
children: [
|
|
4086
4086
|
"Manage all reports & briefings",
|
|
4087
4087
|
/* @__PURE__ */ t(Wr, { className: "h-3 w-3" })
|
|
@@ -4115,7 +4115,7 @@ function di({
|
|
|
4115
4115
|
"button",
|
|
4116
4116
|
{
|
|
4117
4117
|
onClick: () => e("scheduled_report"),
|
|
4118
|
-
className:
|
|
4118
|
+
className: Je,
|
|
4119
4119
|
children: [
|
|
4120
4120
|
/* @__PURE__ */ t(be, { className: "h-3 w-3" }),
|
|
4121
4121
|
" Schedule a report"
|
|
@@ -4323,7 +4323,7 @@ function ui({
|
|
|
4323
4323
|
return /* @__PURE__ */ r(
|
|
4324
4324
|
"div",
|
|
4325
4325
|
{
|
|
4326
|
-
className:
|
|
4326
|
+
className: Z(
|
|
4327
4327
|
"group relative border-b border-border/60 px-4 py-3 transition-colors hover:bg-muted/60",
|
|
4328
4328
|
u && "opacity-70"
|
|
4329
4329
|
),
|
|
@@ -4348,7 +4348,7 @@ function ui({
|
|
|
4348
4348
|
/* @__PURE__ */ t("span", { className: "text-border", children: "·" }),
|
|
4349
4349
|
/* @__PURE__ */ t("span", { children: ii(e) }),
|
|
4350
4350
|
/* @__PURE__ */ t("span", { className: "text-border", children: "·" }),
|
|
4351
|
-
/* @__PURE__ */ t(
|
|
4351
|
+
/* @__PURE__ */ t(Bn, { className: "h-3 w-3" }),
|
|
4352
4352
|
/* @__PURE__ */ t("span", { className: "truncate", children: ri(e) }),
|
|
4353
4353
|
e.lastRunAt ? /* @__PURE__ */ r(U, { children: [
|
|
4354
4354
|
/* @__PURE__ */ t("span", { className: "text-border", children: "·" }),
|
|
@@ -4362,7 +4362,7 @@ function ui({
|
|
|
4362
4362
|
c ? /* @__PURE__ */ t(de, { className: "h-3 w-3 shrink-0 animate-spin text-muted-foreground/70" }) : /* @__PURE__ */ t(
|
|
4363
4363
|
"span",
|
|
4364
4364
|
{
|
|
4365
|
-
className:
|
|
4365
|
+
className: Z(
|
|
4366
4366
|
"inline-block h-1.5 w-1.5 shrink-0 rounded-full",
|
|
4367
4367
|
f
|
|
4368
4368
|
)
|
|
@@ -4472,7 +4472,7 @@ const gi = {
|
|
|
4472
4472
|
runBriefingNow: $n
|
|
4473
4473
|
};
|
|
4474
4474
|
function ro(e) {
|
|
4475
|
-
return /* @__PURE__ */ t(
|
|
4475
|
+
return /* @__PURE__ */ t(Rn, { authToken: e.token ? { accessToken: e.token } : void 0, children: /* @__PURE__ */ t(Mn, { children: /* @__PURE__ */ t(bi, { ...e }) }) });
|
|
4476
4476
|
}
|
|
4477
4477
|
function bi({
|
|
4478
4478
|
dashboardId: e,
|
|
@@ -4489,22 +4489,22 @@ function bi({
|
|
|
4489
4489
|
openRun: p,
|
|
4490
4490
|
client: m
|
|
4491
4491
|
}) {
|
|
4492
|
-
const { authToken: f, tokenProps: g } = $e(), y = Un(), N = !h || y.canCreate && (h === "scheduled_report" || y.analyticalBriefingsEnabled), [k, V] = E(!1),
|
|
4492
|
+
const { authToken: f, tokenProps: g } = $e(), y = Un(), N = !h || y.canCreate && (h === "scheduled_report" || y.analyticalBriefingsEnabled), [k, V] = E(!1), P = u ?? k, D = (A) => {
|
|
4493
4493
|
u === void 0 && V(A), c == null || c(A);
|
|
4494
4494
|
}, [O, b] = E(
|
|
4495
4495
|
h ? "author" : "list"
|
|
4496
4496
|
), [S, v] = E(
|
|
4497
4497
|
h ?? "analytical_briefing"
|
|
4498
|
-
), [T, F] = E("dashboard"), [G,
|
|
4498
|
+
), [T, F] = E("dashboard"), [G, B] = E(
|
|
4499
4499
|
[]
|
|
4500
|
-
), [Q, X] = E(null), _ = h && !N && !Q ? "list" : O, [te,
|
|
4500
|
+
), [Q, X] = E(null), _ = h && !N && !Q ? "list" : O, [te, J] = E(!1), [H, I] = E(null), [ae, j] = E(null), [R, ne] = E(
|
|
4501
4501
|
null
|
|
4502
|
-
), [ue, he] = E(null), ye = et(null), x = et(
|
|
4502
|
+
), [ue, he] = E(null), ye = et(null), x = et(P);
|
|
4503
4503
|
Ee(() => {
|
|
4504
|
-
const A =
|
|
4505
|
-
x.current =
|
|
4506
|
-
}, [
|
|
4507
|
-
const
|
|
4504
|
+
const A = P && !x.current;
|
|
4505
|
+
x.current = P, !(!A || !h) && (X(null), F("dashboard"), v(h), b("author"), he(null));
|
|
4506
|
+
}, [P, h]);
|
|
4507
|
+
const M = Lt(), $ = s ?? (g == null ? void 0 : g.apiServiceUrl), K = n ?? (f == null ? void 0 : f.accessToken), le = Y(() => ({ ...gi, ...m }), [m]), [_e, ht] = E(null);
|
|
4508
4508
|
Ee(() => {
|
|
4509
4509
|
if (!p || !$ || !K) return;
|
|
4510
4510
|
let A = !0;
|
|
@@ -4542,9 +4542,9 @@ function bi({
|
|
|
4542
4542
|
scheduledReportAvailable: T === "dashboard"
|
|
4543
4543
|
}), ce = ie(async () => {
|
|
4544
4544
|
if (!(!$ || !K)) {
|
|
4545
|
-
|
|
4545
|
+
J(!0), he(null);
|
|
4546
4546
|
try {
|
|
4547
|
-
|
|
4547
|
+
B(
|
|
4548
4548
|
await fi({
|
|
4549
4549
|
apiClient: le,
|
|
4550
4550
|
apiServiceUrl: $,
|
|
@@ -4556,14 +4556,14 @@ function bi({
|
|
|
4556
4556
|
A instanceof Error ? A.message : "Could not load briefings."
|
|
4557
4557
|
);
|
|
4558
4558
|
} finally {
|
|
4559
|
-
|
|
4559
|
+
J(!1);
|
|
4560
4560
|
}
|
|
4561
4561
|
}
|
|
4562
4562
|
}, [le, $, K]);
|
|
4563
4563
|
Ee(() => {
|
|
4564
|
-
!
|
|
4565
|
-
}, [Oe, _, ce,
|
|
4566
|
-
const
|
|
4564
|
+
!P || _ !== "list" || !Oe || ce();
|
|
4565
|
+
}, [Oe, _, ce, P]);
|
|
4566
|
+
const Re = () => {
|
|
4567
4567
|
X(null), F("dashboard"), b("list"), D(!0);
|
|
4568
4568
|
}, C = (A) => {
|
|
4569
4569
|
X(null), v(A), b("author");
|
|
@@ -4595,7 +4595,7 @@ function bi({
|
|
|
4595
4595
|
A.id,
|
|
4596
4596
|
{ requestId: xi() }
|
|
4597
4597
|
);
|
|
4598
|
-
|
|
4598
|
+
M.track({ kind: "briefing", id: W.run.id, title: A.name, briefingId: A.id }), ce();
|
|
4599
4599
|
} catch (W) {
|
|
4600
4600
|
z.error(
|
|
4601
4601
|
W instanceof Error ? W.message : "Could not start the run."
|
|
@@ -4629,8 +4629,8 @@ function bi({
|
|
|
4629
4629
|
j(null);
|
|
4630
4630
|
}
|
|
4631
4631
|
}, Ne = async () => {
|
|
4632
|
-
if (!
|
|
4633
|
-
const A =
|
|
4632
|
+
if (!R || !$ || !K) return;
|
|
4633
|
+
const A = R;
|
|
4634
4634
|
j(A.id);
|
|
4635
4635
|
try {
|
|
4636
4636
|
await le.deleteBriefing(
|
|
@@ -4648,14 +4648,14 @@ function bi({
|
|
|
4648
4648
|
j(null);
|
|
4649
4649
|
}
|
|
4650
4650
|
}, La = Ge.length;
|
|
4651
|
-
return y.surfaceVisible ? /* @__PURE__ */ r(Gn, { open:
|
|
4651
|
+
return y.surfaceVisible ? /* @__PURE__ */ r(Gn, { open: P, onOpenChange: D, children: [
|
|
4652
4652
|
d ? null : /* @__PURE__ */ t(
|
|
4653
4653
|
ei,
|
|
4654
4654
|
{
|
|
4655
4655
|
disabled: i || !Oe,
|
|
4656
4656
|
briefingCount: La,
|
|
4657
4657
|
className: o,
|
|
4658
|
-
onClick:
|
|
4658
|
+
onClick: Re
|
|
4659
4659
|
}
|
|
4660
4660
|
),
|
|
4661
4661
|
/* @__PURE__ */ r(
|
|
@@ -4672,7 +4672,7 @@ function bi({
|
|
|
4672
4672
|
children: [
|
|
4673
4673
|
/* @__PURE__ */ r(Yn, { className: "sr-only", children: [
|
|
4674
4674
|
/* @__PURE__ */ t(Xn, { children: "Reports & briefings" }),
|
|
4675
|
-
/* @__PURE__ */ t(
|
|
4675
|
+
/* @__PURE__ */ t(Zn, { children: "Manage reports and briefings for this dashboard." })
|
|
4676
4676
|
] }),
|
|
4677
4677
|
h ? /* @__PURE__ */ r("div", { className: "flex shrink-0 items-start justify-between gap-3 border-b border-border pl-4 pr-3 pt-2", children: [
|
|
4678
4678
|
/* @__PURE__ */ r(
|
|
@@ -4689,7 +4689,7 @@ function bi({
|
|
|
4689
4689
|
role: "tab",
|
|
4690
4690
|
"aria-selected": _ === "author",
|
|
4691
4691
|
disabled: !N,
|
|
4692
|
-
className:
|
|
4692
|
+
className: Z(
|
|
4693
4693
|
"-mb-px border-b-2 px-0.5 pb-2 text-[12px] transition-colors",
|
|
4694
4694
|
_ === "author" ? "border-foreground font-medium text-foreground" : "border-transparent text-muted-foreground hover:text-foreground",
|
|
4695
4695
|
!N && "cursor-not-allowed opacity-50"
|
|
@@ -4706,7 +4706,7 @@ function bi({
|
|
|
4706
4706
|
type: "button",
|
|
4707
4707
|
role: "tab",
|
|
4708
4708
|
"aria-selected": _ === "list",
|
|
4709
|
-
className:
|
|
4709
|
+
className: Z(
|
|
4710
4710
|
"-mb-px border-b-2 px-0.5 pb-2 text-[12px] transition-colors",
|
|
4711
4711
|
_ === "list" ? "border-foreground font-medium text-foreground" : "border-transparent text-muted-foreground hover:text-foreground"
|
|
4712
4712
|
),
|
|
@@ -4763,7 +4763,7 @@ function bi({
|
|
|
4763
4763
|
hideHeader: !!h
|
|
4764
4764
|
}
|
|
4765
4765
|
) : /* @__PURE__ */ t(
|
|
4766
|
-
|
|
4766
|
+
Jn,
|
|
4767
4767
|
{
|
|
4768
4768
|
apiServiceUrl: $,
|
|
4769
4769
|
token: K,
|
|
@@ -4796,7 +4796,7 @@ function bi({
|
|
|
4796
4796
|
/* @__PURE__ */ t(
|
|
4797
4797
|
wt,
|
|
4798
4798
|
{
|
|
4799
|
-
open: !!
|
|
4799
|
+
open: !!R,
|
|
4800
4800
|
onOpenChange: (A) => {
|
|
4801
4801
|
A || ne(null);
|
|
4802
4802
|
},
|
|
@@ -4805,12 +4805,12 @@ function bi({
|
|
|
4805
4805
|
/* @__PURE__ */ r(Dt, { children: [
|
|
4806
4806
|
"Delete",
|
|
4807
4807
|
" ",
|
|
4808
|
-
|
|
4808
|
+
R ? pe(R).noun : "briefing",
|
|
4809
4809
|
"?"
|
|
4810
4810
|
] }),
|
|
4811
4811
|
/* @__PURE__ */ r(At, { children: [
|
|
4812
4812
|
"This permanently deletes ",
|
|
4813
|
-
/* @__PURE__ */ t("strong", { children:
|
|
4813
|
+
/* @__PURE__ */ t("strong", { children: R == null ? void 0 : R.name }),
|
|
4814
4814
|
". Recipients will stop receiving it."
|
|
4815
4815
|
] })
|
|
4816
4816
|
] }),
|
|
@@ -4824,7 +4824,7 @@ function bi({
|
|
|
4824
4824
|
children: [
|
|
4825
4825
|
"Delete",
|
|
4826
4826
|
" ",
|
|
4827
|
-
|
|
4827
|
+
R ? pe(R).noun : "briefing"
|
|
4828
4828
|
]
|
|
4829
4829
|
}
|
|
4830
4830
|
)
|
|
@@ -4847,12 +4847,12 @@ export {
|
|
|
4847
4847
|
Wi as a,
|
|
4848
4848
|
Ki as b,
|
|
4849
4849
|
Yi as c,
|
|
4850
|
-
|
|
4850
|
+
Ji as d,
|
|
4851
4851
|
fs as e,
|
|
4852
4852
|
bs as f,
|
|
4853
4853
|
Cs as g,
|
|
4854
4854
|
eo as h,
|
|
4855
|
-
|
|
4855
|
+
Zi as i,
|
|
4856
4856
|
ao as j,
|
|
4857
4857
|
to as k,
|
|
4858
4858
|
no as l,
|