react-semaphor 0.1.602 → 0.1.603
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/analytics-protocol/index.js +415 -375
- package/dist/assistant-context/index.js +1 -1
- package/dist/assistant-protocol/index.js +5 -5
- package/dist/brand-studio/index.js +8 -8
- package/dist/briefings/index.js +5 -5
- package/dist/chunks/{add-to-dashboard-ClhEIFst.js → add-to-dashboard-CFF-wFU-.js} +1 -1
- package/dist/chunks/{analytics-base-schemas-DevrgqQb.js → analytics-base-schemas-DsUh5Q3C.js} +14 -12
- package/dist/chunks/{assistant-chat-BWF3GYip.js → assistant-chat-B6hNQI1t.js} +146 -146
- package/dist/chunks/{bookmark-impact-BF3iRx5a.js → bookmark-impact-Ba2PLcGp.js} +3 -3
- package/dist/chunks/{bookmark-state-CBSTdW6q.js → bookmark-state-n7AaNzR_.js} +517 -516
- package/dist/chunks/{card-filter-builder-B8XHwMY6.js → card-filter-builder-Y22HizVx.js} +104 -104
- package/dist/chunks/{comparison-window-caption-W83qB4V5.js → comparison-window-caption-Ck2TIbnR.js} +69 -69
- package/dist/chunks/{context-BJoEFgNl.js → context-UCQ7sere.js} +1 -1
- package/dist/chunks/{dashboard-DG5EIYYB.js → dashboard-BghI99oY.js} +1 -1
- package/dist/chunks/{dashboard-briefing-launcher-CBSrhyWZ.js → dashboard-briefing-launcher-DtBAnGiH.js} +103 -103
- package/dist/chunks/{dashboard-controls-D6ECO4N1.js → dashboard-controls-CtFXlyjV.js} +53 -53
- package/dist/chunks/{dashboard-json-DrJftBSL.js → dashboard-json-DfGBUtCd.js} +5 -5
- package/dist/chunks/dates-BnrXF4bb.js +185 -0
- package/dist/chunks/{edit-dashboard-visual-BDYAJIbb.js → edit-dashboard-visual-oxt3x1wb.js} +7976 -8184
- package/dist/chunks/{filter-line-BXT6y303.js → filter-line-Cy5YYqRL.js} +27 -27
- package/dist/chunks/{filter-reach-copy-BukhZmzm.js → filter-reach-copy-CE_ZX147.js} +1590 -1729
- package/dist/chunks/{filter-value-text-D3-bf3_b.js → filter-value-text-fWvSDwkl.js} +11 -11
- package/dist/chunks/{index-BW0yozjs.js → index-D5rxbtS4.js} +24 -24
- package/dist/chunks/{layout-grid-Ds0diMeY.js → layout-grid-9LndRoLa.js} +1 -1
- package/dist/chunks/{matrix-analytical-definition-CgQgVeeI.js → matrix-analytical-definition-CCp48UCw.js} +496 -425
- package/dist/chunks/matrix-member-presentation-zNehruXR.js +391 -0
- package/dist/chunks/{matrix-operation-contract--DkNCOzd.js → matrix-operation-contract-DPBj69D8.js} +3 -2
- package/dist/chunks/{metric-comparison-zMylnIkc.js → metric-comparison-B0FR-Q8I.js} +184 -125
- package/dist/chunks/{paintbrush-CX8pao1j.js → paintbrush-58FQYY-y.js} +1 -1
- package/dist/chunks/{palette-CuA0HlzF.js → palette-Be62Tkoa.js} +1 -1
- package/dist/chunks/{pivot-result-contract-expectations-C8KL7hPx.js → pivot-result-contract-expectations-BYqAmG9n.js} +1236 -1190
- package/dist/chunks/{pivot-result-identity-C1AOH1PS.js → pivot-result-identity-CAP4--iq.js} +1 -1
- package/dist/chunks/raw-temporal-value-Dg_MTFF7.js +3778 -0
- package/dist/chunks/{report-preferences-dialog-CbuVNDGi.js → report-preferences-dialog-uJp9GBTM.js} +219 -205
- package/dist/chunks/{report-runtime-context-E7USjN7E.js → report-runtime-context-c77_KF9v.js} +2 -2
- package/dist/chunks/{resolve-dashboard-input-context-CULCE_hM.js → resolve-dashboard-input-context-Rtl1ffmE.js} +7115 -6963
- package/dist/chunks/{save-BKHlDONy.js → save-C5A0JnEV.js} +1 -1
- package/dist/chunks/{saved-dashboard-context-C1WlOx5z.js → saved-dashboard-context-tcyTU8jm.js} +193 -207
- package/dist/chunks/selection-filter-compiler-DNijjI5y.js +150 -0
- package/dist/chunks/{semaphor-ready-indicator-CBIRcDWs.js → semaphor-ready-indicator-FBvunj6S.js} +35550 -35273
- package/dist/chunks/{shelf-drop-preview-context-xR69SMA8.js → shelf-drop-preview-context-QKStrcK9.js} +6 -6
- package/dist/chunks/{stored-dashboard-BuM8vnWf.js → stored-dashboard-CHozcAY9.js} +621 -616
- package/dist/chunks/{style-sheet-parts-Bt9ZNre8.js → style-sheet-parts-CDCG-8Ej.js} +258 -251
- package/dist/chunks/{table-export-sheet-DVljtHkG.js → table-export-sheet-ZFIvs6Sj.js} +1 -1
- package/dist/chunks/{token-types-D_xKgyVS.js → token-types-XbM6QByy.js} +1 -1
- package/dist/chunks/{upload-Dll_M7XQ.js → upload-H15d7uHK.js} +1 -1
- package/dist/chunks/{validators-ClWHpYql.js → validators-Baf3VIf5.js} +3 -3
- package/dist/chunks/{variable-draft-CDGGl53R.js → variable-draft-C2y8Jp6Z.js} +3 -3
- package/dist/dashboard/index.js +2 -2
- package/dist/dashboard-authoring/index.js +2466 -2343
- package/dist/format-utils/index.js +205 -204
- package/dist/index.js +20 -20
- package/dist/report-runtime-context/index.js +2 -2
- package/dist/style.css +1 -1
- package/dist/surfboard/index.js +2 -2
- package/dist/types/components/ui-custom/date-range-presets.d.ts +8 -0
- package/dist/types/index.js +5 -5
- package/dist/types/lib/document/document-edits.d.ts +0 -4
- package/dist/types/lib/stores/dashboard-store.d.ts +0 -1
- package/dist/types/lib/types/common-types.d.ts +0 -2
- package/dist/types/lib/types/explorer-types.d.ts +1 -1
- package/dist/types/shared/analytics-protocol/analytics-base-schemas.d.ts +18 -0
- package/dist/types/shared/analytics-protocol/analyze-result-types.d.ts +3 -0
- package/dist/types/shared/analytics-protocol/comparison-choices.d.ts +92 -0
- package/dist/types/shared/analytics-protocol/comparison-placement.d.ts +30 -0
- package/dist/types/shared/analytics-protocol/contracts.d.ts +11 -5
- package/dist/types/shared/analytics-protocol/date-window.d.ts +105 -0
- package/dist/types/shared/analytics-protocol/filter-field-ownership.d.ts +27 -0
- package/dist/types/shared/analytics-protocol/fixtures.d.ts +4 -2
- package/dist/types/shared/analytics-protocol/index.d.ts +3 -0
- package/dist/types/shared/analytics-protocol/metric-comparison.d.ts +93 -11
- package/dist/types/shared/assistant-protocol/context.d.ts +16 -16
- package/dist/types/shared/dashboard-authoring/calculations/calculated-column.d.ts +1 -1
- package/dist/types/shared/dashboard-authoring/card-settings/card-display-write.d.ts +8 -0
- package/dist/types/shared/dashboard-authoring/card-settings/card-kinds.d.ts +1 -1
- package/dist/types/shared/dashboard-authoring/card-settings/inputs.d.ts +2 -1
- package/dist/types/shared/dashboard-authoring/card-settings/resolved.d.ts +0 -3
- package/dist/types/shared/dashboard-authoring/changes/dashboard-change.d.ts +21 -358
- package/dist/types/shared/dashboard-authoring/changes/diagnostics.d.ts +2 -0
- package/dist/types/shared/dashboard-authoring/conditional-formatting/schema.d.ts +10 -10
- package/dist/types/shared/dashboard-authoring/dashboard-variable-card.d.ts +2 -4
- package/dist/types/shared/dashboard-authoring/kpi-date-context.d.ts +2 -0
- package/dist/types/shared/dashboard-authoring/kpi-figure.d.ts +18 -0
- package/dist/types/shared/dashboard-authoring/measure-calculations/comparison.d.ts +8 -7
- package/dist/types/shared/dashboard-authoring/measure-calculations/dates.d.ts +11 -1
- package/dist/types/shared/dashboard-authoring/measure-calculations/index.d.ts +2 -2
- package/dist/types/shared/dashboard-authoring/measure-calculations/options.d.ts +4 -0
- package/dist/types/shared/dashboard-authoring/measure-calculations/read.d.ts +18 -1
- package/dist/types/shared/dashboard-authoring/measure-calculations/resolve.d.ts +2 -0
- package/dist/types/shared/dashboard-authoring/measure-calculations/schemas.d.ts +46 -88
- package/dist/types/shared/dashboard-authoring/operations/calculated-field-operations.d.ts +33 -8
- package/dist/types/shared/dashboard-authoring/operations/operation-types.d.ts +0 -2
- package/dist/types/shared/dashboard-authoring/outline/outline-filters.d.ts +3 -0
- package/dist/types/shared/format-utils/comparison-detail.d.ts +34 -0
- package/dist/types/shared/format-utils/index.d.ts +1 -0
- package/dist/types/shared/format-utils/partial-period.d.ts +4 -2
- package/dist/types/shared/temporal/calendar-periods.d.ts +11 -0
- package/dist/types/shared/temporal/index.d.ts +2 -0
- package/dist/types/shared/temporal/temporal-text.d.ts +33 -0
- package/dist/types/shared/temporal/temporal.d.ts +27 -0
- package/dist/types/shared/temporal/zoned-wall-clock.d.ts +4 -3
- package/dist/usage-events/index.js +1 -1
- package/package.json +3 -2
- package/dist/chunks/dates-Bz-qM5px.js +0 -164
- package/dist/chunks/matrix-member-presentation-DSBIIudt.js +0 -258
- package/dist/chunks/raw-temporal-value-E416F-0L.js +0 -454
- package/dist/chunks/selection-filter-compiler-ifT8JCXS.js +0 -131
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
import { jsx as t, jsxs as s, Fragment as $ } from "react/jsx-runtime";
|
|
2
2
|
import la, { useState as E, useEffect as Ee, useCallback as ie, useMemo as Y, useLayoutEffect as $t, useRef as et, useContext as Va } from "react";
|
|
3
|
-
import {
|
|
4
|
-
import { c as Ae, B as L, X as Qe, s as Me, x as xe, L as de, q as
|
|
5
|
-
import { L as Ue } from "./layout-grid-
|
|
3
|
+
import { dP as it, bH as Le, bI as Ve, bK as Be, dQ as Ba, b8 as $e, b5 as ot, dR as Pa, dS as lt, dT as wt, an as dt, ak as ve, u as C, dU as _a, dV as Oa, bG as z, dW as za, am as oe, b3 as Ra, cV as Ma, dX as Ua, dY as $a, bV as da, bT as be, dd as ca, b_ as tt, w as ja, q as qa, dZ as Wa, dg as St, dh as kt, di as Dt, dj as At, dk as Ft, dl as Et, dm as It, dn as ua, bQ as Tt, d_ as Qa, dv as Ha, d5 as pt, d2 as je, d3 as qe, dI as ha, d4 as We, cS as re, de as Ka, d9 as at, d$ as Ga, cQ as Ya, e0 as ma, bu as ct, bJ as Lt, bL as ut, e1 as pa, bF as Xa, e2 as Ja, bv as Za, o as en, bY as tn, e3 as an, W as nn, P as fa, bp as rn, X as sn, G as on, e4 as ln, e5 as dn, e6 as cn, e7 as ga, e8 as un, e9 as hn, ea as Ne, eb as mn, R as ba, ec as pn, ed as fn, b0 as gn, ee as bn, ef as ge, eg as xn, aa as Vt, eh as vn, ei as ft, ej as yn, ek as jt, el as Cn, em as Nn, en as wn, eo as xa, c8 as Sn, ep as kn, eq as Dn, er as An, dC as Bt, bR as va, es as Fn, et as qt, eu as En, ev as In, ew as Tn, ex as Ln, b7 as Vn, bA as Bn, cU as ya, ey as Pn, ez as _n, eA as Xe, eB as On, eC as zn, eD as Rn, A as Mn, aR as Un, aS as $n, ax as jn, aw as qn, av as Wn, au as Qn, ar as Hn, ap as Kn, eE as Gn, eF as Yn, eG as Xn, eH as Jn, eI as Zn, aP as er } from "./semaphor-ready-indicator-FBvunj6S.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 _t, p as tr, F as Ot, e as Ie, a8 as Ca, h as Te, f as nt, i as Na, g as Nt, y as we, z as Se, A as ke, D as De, E as fe, a9 as ar } from "./style-sheet-parts-CDCG-8Ej.js";
|
|
5
|
+
import { L as Ue } from "./layout-grid-9LndRoLa.js";
|
|
6
6
|
import { c as J } from "./pickers-DkqmtnTL.js";
|
|
7
|
-
import { T as nr } from "./validators-
|
|
8
|
-
import "./matrix-operation-contract
|
|
9
|
-
import "./analytics-base-schemas-
|
|
7
|
+
import { T as nr } from "./validators-Baf3VIf5.js";
|
|
8
|
+
import "./matrix-operation-contract-DPBj69D8.js";
|
|
9
|
+
import "./analytics-base-schemas-DsUh5Q3C.js";
|
|
10
10
|
import "../value-format-preferences/index.js";
|
|
11
11
|
import { s as Je } from "./normalize-dashboard-for-dirty-check-XKgH3GFX.js";
|
|
12
|
-
import {
|
|
13
|
-
import { S as wa } from "./save-
|
|
14
|
-
import { V as kr, L as Dr, u as Sa, C as ka, F as Ar, a as Fr, A as Er, b as Ir } from "./card-filter-builder-
|
|
12
|
+
import { cd as Wt, bM as Qt, fX as Ht, ic as rr, id as rt, ib as gt, ie as sr, q as He, ig as ir, B as or, ih as lr, ii as dr, ij as cr, di as ur, ik as hr, y as mr, hx as pr, il as fr, im as gr, e as zt, b9 as br, a8 as xr, cX as vr, io as yr, ip as Cr, d7 as Nr, iq as wr, ir as Kt, is as Sr } from "./resolve-dashboard-input-context-Rtl1ffmE.js";
|
|
13
|
+
import { S as wa } from "./save-C5A0JnEV.js";
|
|
14
|
+
import { V as kr, L as Dr, u as Sa, C as ka, F as Ar, a as Fr, A as Er, b as Ir } from "./card-filter-builder-Y22HizVx.js";
|
|
15
15
|
import { createPortal as Tr } from "react-dom";
|
|
16
|
-
import {
|
|
17
|
-
import { aD as Vr,
|
|
16
|
+
import { b7 as Gt, aD as Lr } from "./pivot-result-contract-expectations-BYqAmG9n.js";
|
|
17
|
+
import { aD as Vr, as as Br, H as Pr, ad as st, U as _r } from "./bookmark-state-n7AaNzR_.js";
|
|
18
18
|
import "zod";
|
|
19
19
|
import "./schema-C9NPiIru.js";
|
|
20
20
|
import "./index-CV_Kzou0.js";
|
|
21
|
-
import "./context-
|
|
22
|
-
import { v as Or, J as zr } from "./filter-reach-copy-
|
|
23
|
-
import { a as Yt, d as Xt, c as Rr, i as Mr, b as Ur, e as $r, v as Jt, f as Zt, g as jr } from "./variable-draft-
|
|
24
|
-
import { g as pe, d as qr, a as Wr } from "./index-
|
|
21
|
+
import "./context-UCQ7sere.js";
|
|
22
|
+
import { v as Or, J as zr } from "./filter-reach-copy-CE_ZX147.js";
|
|
23
|
+
import { a as Yt, d as Xt, c as Rr, i as Mr, b as Ur, e as $r, v as Jt, f as Zt, g as jr } from "./variable-draft-C2y8Jp6Z.js";
|
|
24
|
+
import { g as pe, d as qr, a as Wr } from "./index-D5rxbtS4.js";
|
|
25
25
|
/**
|
|
26
26
|
* @license lucide-react v0.453.0 - ISC
|
|
27
27
|
*
|
|
@@ -150,7 +150,7 @@ function Jr({
|
|
|
150
150
|
/* @__PURE__ */ s("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__ */ s("div", { className: "flex min-w-0 items-baseline gap-2", children: [
|
|
153
|
-
/* @__PURE__ */ t(
|
|
153
|
+
/* @__PURE__ */ t(Be, { 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
|
] }),
|
|
@@ -230,7 +230,7 @@ function Jr({
|
|
|
230
230
|
) });
|
|
231
231
|
}
|
|
232
232
|
function Zr(e) {
|
|
233
|
-
const [a, r] = E(null), [n, i] = E(null), o =
|
|
233
|
+
const [a, r] = E(null), [n, i] = E(null), o = Ba();
|
|
234
234
|
return Ee(() => {
|
|
235
235
|
if (!e || e.trim() === "") {
|
|
236
236
|
r(null), i(null);
|
|
@@ -391,8 +391,8 @@ function as() {
|
|
|
391
391
|
};
|
|
392
392
|
}, [a]) };
|
|
393
393
|
}
|
|
394
|
-
function
|
|
395
|
-
const { authToken: e, tokenProps: a } = $e(), r = ot(), n =
|
|
394
|
+
function Pe() {
|
|
395
|
+
const { authToken: e, tokenProps: a } = $e(), r = ot(), n = Pa(), i = lt(), { selectVisual: o } = wt(), {
|
|
396
396
|
setFrame: l,
|
|
397
397
|
loadCard: h,
|
|
398
398
|
setIsDevMode: d,
|
|
@@ -406,10 +406,10 @@ function Be() {
|
|
|
406
406
|
setSelectedTableName: w,
|
|
407
407
|
setSelectedDatamodelId: S,
|
|
408
408
|
setInlineFilterValuesMap: V,
|
|
409
|
-
setApplyFilters:
|
|
409
|
+
setApplyFilters: P,
|
|
410
410
|
clearEditorContext: D
|
|
411
411
|
} = dt(), {
|
|
412
|
-
setIsDashboardEditing:
|
|
412
|
+
setIsDashboardEditing: B,
|
|
413
413
|
setIsVisualEditing: k,
|
|
414
414
|
clearSelectedFrameId: v
|
|
415
415
|
} = ve(), b = C((O) => O.selectedSheetId), _ = C((O) => O.selectedFrameId), A = C((O) => O.dashboard), G = C(
|
|
@@ -441,8 +441,8 @@ function Be() {
|
|
|
441
441
|
setSelectedTableName: w,
|
|
442
442
|
setSelectedDatamodelId: S,
|
|
443
443
|
setInlineFilterValuesMap: V,
|
|
444
|
-
setApplyFilters:
|
|
445
|
-
setIsDashboardEditing:
|
|
444
|
+
setApplyFilters: P,
|
|
445
|
+
setIsDashboardEditing: B,
|
|
446
446
|
setIsVisualEditing: k,
|
|
447
447
|
dashboard: A,
|
|
448
448
|
selectedSheetId: b,
|
|
@@ -462,7 +462,7 @@ function Be() {
|
|
|
462
462
|
o,
|
|
463
463
|
l,
|
|
464
464
|
h,
|
|
465
|
-
|
|
465
|
+
B,
|
|
466
466
|
k,
|
|
467
467
|
d,
|
|
468
468
|
c,
|
|
@@ -475,7 +475,7 @@ function Be() {
|
|
|
475
475
|
w,
|
|
476
476
|
S,
|
|
477
477
|
V,
|
|
478
|
-
|
|
478
|
+
P,
|
|
479
479
|
D,
|
|
480
480
|
v,
|
|
481
481
|
A,
|
|
@@ -507,7 +507,7 @@ function Be() {
|
|
|
507
507
|
visualId: O.id
|
|
508
508
|
// Link this frame to the library visual
|
|
509
509
|
};
|
|
510
|
-
return await n(b, R),
|
|
510
|
+
return await n(b, R), B(!0), { success: !0, fromCache: I };
|
|
511
511
|
} catch (K) {
|
|
512
512
|
return console.error("Error adding visual:", K), te(
|
|
513
513
|
K instanceof Error ? K.message : "Failed to add visual to dashboard"
|
|
@@ -520,7 +520,7 @@ function Be() {
|
|
|
520
520
|
r,
|
|
521
521
|
o,
|
|
522
522
|
b,
|
|
523
|
-
|
|
523
|
+
B,
|
|
524
524
|
n
|
|
525
525
|
]
|
|
526
526
|
);
|
|
@@ -556,7 +556,7 @@ function ns(e, a) {
|
|
|
556
556
|
}
|
|
557
557
|
function rs(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") ? Ha : a.includes("bar") ? tr : Ue;
|
|
560
560
|
}
|
|
561
561
|
function ss({ visual: e }) {
|
|
562
562
|
const a = e.ownership.status === "public" ? "Public" : e.ownership.status === "shared" || e.ownership.sharedCount > 0 ? "Shared" : "Private";
|
|
@@ -570,11 +570,11 @@ function qi({
|
|
|
570
570
|
null
|
|
571
571
|
), [p, m] = E(
|
|
572
572
|
null
|
|
573
|
-
), [f, g] = E(!1), [y, w] = E(null), [S, V] = E(null),
|
|
573
|
+
), [f, g] = E(!1), [y, w] = E(null), [S, V] = E(null), P = () => {
|
|
574
574
|
l(/* @__PURE__ */ new Set()), u(null), m(null), g(!1), w(null);
|
|
575
575
|
}, D = () => {
|
|
576
|
-
a(!1),
|
|
577
|
-
}, { selectVisual:
|
|
576
|
+
a(!1), P();
|
|
577
|
+
}, { selectVisual: B } = wt(), { handleAddLibraryVisual: k, handleEditLibraryVisual: v } = Pe(), { isConsoleMode: b } = Ma(), {
|
|
578
578
|
resources: _,
|
|
579
579
|
isLoading: A,
|
|
580
580
|
isError: G,
|
|
@@ -587,7 +587,7 @@ function qi({
|
|
|
587
587
|
} = Ua(
|
|
588
588
|
void 0,
|
|
589
589
|
(N) => {
|
|
590
|
-
d(!1), N && (
|
|
590
|
+
d(!1), N && (B(N), v(N), D());
|
|
591
591
|
}
|
|
592
592
|
), {
|
|
593
593
|
startUpdating: K,
|
|
@@ -704,7 +704,7 @@ function qi({
|
|
|
704
704
|
}
|
|
705
705
|
);
|
|
706
706
|
}, ce = (N) => {
|
|
707
|
-
a(N), N ||
|
|
707
|
+
a(N), N || P();
|
|
708
708
|
}, Re = y ? 1 : ue.length;
|
|
709
709
|
return /* @__PURE__ */ s($, { children: [
|
|
710
710
|
/* @__PURE__ */ t(Le, { open: e, onOpenChange: ce, children: /* @__PURE__ */ s(
|
|
@@ -716,9 +716,9 @@ function qi({
|
|
|
716
716
|
children: [
|
|
717
717
|
/* @__PURE__ */ s("div", { className: "flex h-10 shrink-0 items-center justify-between gap-2 border-b border-border/60 px-3", children: [
|
|
718
718
|
/* @__PURE__ */ s("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__ */ s("div", { className: "flex min-w-0 items-baseline gap-2", children: [
|
|
721
|
-
/* @__PURE__ */ t(
|
|
721
|
+
/* @__PURE__ */ t(Be, { 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
|
] }),
|
|
@@ -1225,7 +1225,7 @@ function bt({
|
|
|
1225
1225
|
className: e,
|
|
1226
1226
|
variant: a = "outline"
|
|
1227
1227
|
}) {
|
|
1228
|
-
const r = oe((o) => o.onSave), { getUpdatedFrame: n } =
|
|
1228
|
+
const r = oe((o) => o.onSave), { getUpdatedFrame: n } = Pe();
|
|
1229
1229
|
function i() {
|
|
1230
1230
|
const o = n();
|
|
1231
1231
|
Mt(o) && (r == null || r(o));
|
|
@@ -1248,7 +1248,7 @@ function ds({
|
|
|
1248
1248
|
className: e,
|
|
1249
1249
|
variant: a = "default"
|
|
1250
1250
|
}) {
|
|
1251
|
-
const r = ot(), [n, i] = E(!1), { setIsVisualEditing: o } = ve(), { getUpdatedFrame: l } =
|
|
1251
|
+
const r = ot(), [n, i] = E(!1), { setIsVisualEditing: o } = ve(), { getUpdatedFrame: l } = Pe(), h = lt(), d = oe((p) => p.frame), c = ma();
|
|
1252
1252
|
return /* @__PURE__ */ t(
|
|
1253
1253
|
L,
|
|
1254
1254
|
{
|
|
@@ -1297,7 +1297,7 @@ function ds({
|
|
|
1297
1297
|
function cs({
|
|
1298
1298
|
className: e
|
|
1299
1299
|
}) {
|
|
1300
|
-
const a = ot(), [r, n] = E(!1), i = lt(), o = oe((g) => g.frame), l = C((g) => g.selectedSheetId), h = C((g) => g.dashboard), { updateFrame: d, setIsVisualEditing: c } = ve(), { getUpdatedFrame: u } =
|
|
1300
|
+
const a = ot(), [r, n] = E(!1), i = lt(), o = oe((g) => g.frame), l = C((g) => g.selectedSheetId), h = C((g) => g.dashboard), { updateFrame: d, setIsVisualEditing: c } = ve(), { getUpdatedFrame: u } = Pe(), p = ma(), m = ct();
|
|
1301
1301
|
return /* @__PURE__ */ t(
|
|
1302
1302
|
L,
|
|
1303
1303
|
{
|
|
@@ -1425,7 +1425,7 @@ function us({
|
|
|
1425
1425
|
};
|
|
1426
1426
|
return /* @__PURE__ */ t(Le, { open: e, onOpenChange: a, children: /* @__PURE__ */ s(Ve, { className: "sm:max-w-[500px]", children: [
|
|
1427
1427
|
/* @__PURE__ */ s(Lt, { children: [
|
|
1428
|
-
/* @__PURE__ */ s(
|
|
1428
|
+
/* @__PURE__ */ s(Be, { className: "flex items-center gap-2", children: [
|
|
1429
1429
|
/* @__PURE__ */ t("span", { children: "Save Visual As" }),
|
|
1430
1430
|
m.badgeType !== "local" && /* @__PURE__ */ t(
|
|
1431
1431
|
kr,
|
|
@@ -1485,10 +1485,10 @@ function us({
|
|
|
1485
1485
|
] }) });
|
|
1486
1486
|
}
|
|
1487
1487
|
function hs() {
|
|
1488
|
-
const [e, a] = E(!1), [r, n] = E(!1), [i, o] = E(null), [l, h] = E(null), d = oe((v) => v.frame), c = oe((v) => v.card), u = lt(), p = C((v) => v.selectedSheetId), m = C((v) => v.dashboard), { getUpdatedFrame: f } =
|
|
1488
|
+
const [e, a] = E(!1), [r, n] = E(!1), [i, o] = E(null), [l, h] = E(null), d = oe((v) => v.frame), c = oe((v) => v.card), u = lt(), p = C((v) => v.selectedSheetId), m = C((v) => v.dashboard), { getUpdatedFrame: f } = Pe(), { selectVisual: g } = wt(), { addFrame: y, checkAddFrame: w, setIsVisualEditing: S } = ve(), V = ct(), P = !!(d != null && d.visualId), D = (() => {
|
|
1489
1489
|
var v, b;
|
|
1490
1490
|
return ((v = d == null ? void 0 : d.cards) == null ? void 0 : v.length) === 1 && ((b = d.cards[0]) != null && b.title) ? d.cards[0].title : u != null && u.title ? u.title : (c == null ? void 0 : c.title) || "Untitled Visual";
|
|
1491
|
-
})(),
|
|
1491
|
+
})(), B = Ja((v) => {
|
|
1492
1492
|
v != null && v.id && (g(v), r && i && l && p && (async () => {
|
|
1493
1493
|
try {
|
|
1494
1494
|
const b = {
|
|
@@ -1558,7 +1558,7 @@ function hs() {
|
|
|
1558
1558
|
// Card title synced for single-card frames
|
|
1559
1559
|
isPrivate: !1
|
|
1560
1560
|
};
|
|
1561
|
-
|
|
1561
|
+
B.mutate(T);
|
|
1562
1562
|
} else if (v.saveToCurrentDashboard) {
|
|
1563
1563
|
const G = {
|
|
1564
1564
|
...A,
|
|
@@ -1582,20 +1582,20 @@ function hs() {
|
|
|
1582
1582
|
}
|
|
1583
1583
|
}
|
|
1584
1584
|
},
|
|
1585
|
-
isLibraryVisual:
|
|
1585
|
+
isLibraryVisual: P,
|
|
1586
1586
|
currentVisualName: D,
|
|
1587
|
-
isSaving:
|
|
1587
|
+
isSaving: B.isPending
|
|
1588
1588
|
};
|
|
1589
1589
|
}
|
|
1590
1590
|
function Qi(e = {}) {
|
|
1591
1591
|
const { isInspectionMode: a } = Za(), r = oe((T) => T.frame), n = oe((T) => T.editorContext), i = en((T) => T.selectedVisual), o = C((T) => T.selectedFrameId), l = C((T) => T.selectedSheetId), h = C((T) => T.dashboard), { setIsVisualEditing: d, updateFrame: c } = ve(), [u, p] = E(!1), [m, f] = E("both"), g = ct(), y = (n == null ? void 0 : n.type) === "documentSection", w = !!(r != null && r.visualId || i != null && i.id), S = !!(r != null && r.visualId && o), V = w && !S, {
|
|
1592
|
-
saveAsDialogOpen:
|
|
1592
|
+
saveAsDialogOpen: P,
|
|
1593
1593
|
setSaveAsDialogOpen: D,
|
|
1594
|
-
handleSaveAs:
|
|
1594
|
+
handleSaveAs: B,
|
|
1595
1595
|
isLibraryVisual: k,
|
|
1596
1596
|
currentVisualName: v,
|
|
1597
1597
|
isSaving: b
|
|
1598
|
-
} = hs(), { getUpdatedFrame: _ } =
|
|
1598
|
+
} = hs(), { getUpdatedFrame: _ } = Pe();
|
|
1599
1599
|
if (a)
|
|
1600
1600
|
return /* @__PURE__ */ s($, { children: [
|
|
1601
1601
|
/* @__PURE__ */ t(
|
|
@@ -1721,7 +1721,7 @@ function Qi(e = {}) {
|
|
|
1721
1721
|
/* @__PURE__ */ t(
|
|
1722
1722
|
us,
|
|
1723
1723
|
{
|
|
1724
|
-
open:
|
|
1724
|
+
open: P,
|
|
1725
1725
|
onOpenChange: (T) => {
|
|
1726
1726
|
b || D(T);
|
|
1727
1727
|
},
|
|
@@ -1729,7 +1729,7 @@ function Qi(e = {}) {
|
|
|
1729
1729
|
currentVisualName: v,
|
|
1730
1730
|
isSaving: b,
|
|
1731
1731
|
destinationMode: m,
|
|
1732
|
-
onConfirm:
|
|
1732
|
+
onConfirm: B
|
|
1733
1733
|
}
|
|
1734
1734
|
)
|
|
1735
1735
|
] });
|
|
@@ -2247,7 +2247,7 @@ function gs({
|
|
|
2247
2247
|
), S = ir({
|
|
2248
2248
|
...m || {},
|
|
2249
2249
|
controls: []
|
|
2250
|
-
}), V = Nn(m),
|
|
2250
|
+
}), V = Nn(m), P = (b, _, A) => {
|
|
2251
2251
|
f(
|
|
2252
2252
|
b,
|
|
2253
2253
|
_,
|
|
@@ -2259,7 +2259,7 @@ function gs({
|
|
|
2259
2259
|
return;
|
|
2260
2260
|
}
|
|
2261
2261
|
p(!1);
|
|
2262
|
-
}, [o, l, p]),
|
|
2262
|
+
}, [o, l, p]), B = /* @__PURE__ */ t(
|
|
2263
2263
|
ka,
|
|
2264
2264
|
{
|
|
2265
2265
|
scope: "dashboard",
|
|
@@ -2274,7 +2274,7 @@ function gs({
|
|
|
2274
2274
|
initialCreateFlow: i === "create",
|
|
2275
2275
|
onCreateFlowActiveChange: p,
|
|
2276
2276
|
onCreateFlowComplete: D,
|
|
2277
|
-
onChange:
|
|
2277
|
+
onChange: P,
|
|
2278
2278
|
emptyMessage: "No dashboard controls yet."
|
|
2279
2279
|
}
|
|
2280
2280
|
), k = d ? "Add dashboard control" : "Dashboard Controls", v = /* @__PURE__ */ s($, { children: [
|
|
@@ -2282,7 +2282,7 @@ function gs({
|
|
|
2282
2282
|
/* @__PURE__ */ t("h4", { className: "text-sm font-medium", children: "Dashboard Controls" }),
|
|
2283
2283
|
/* @__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." })
|
|
2284
2284
|
] }),
|
|
2285
|
-
|
|
2285
|
+
B
|
|
2286
2286
|
] });
|
|
2287
2287
|
return n ? /* @__PURE__ */ s(Ie, { open: u, onOpenChange: h, children: [
|
|
2288
2288
|
/* @__PURE__ */ t(nt, { asChild: !0, children: r || /* @__PURE__ */ s(L, { variant: "outline", className: "h-7 px-2", size: "sm", children: [
|
|
@@ -2311,7 +2311,7 @@ function gs({
|
|
|
2311
2311
|
{
|
|
2312
2312
|
className: d ? "space-y-0" : void 0,
|
|
2313
2313
|
children: [
|
|
2314
|
-
/* @__PURE__ */ t(
|
|
2314
|
+
/* @__PURE__ */ t(Be, { className: "text-[15px]", children: k }),
|
|
2315
2315
|
/* @__PURE__ */ t(
|
|
2316
2316
|
ut,
|
|
2317
2317
|
{
|
|
@@ -2322,7 +2322,7 @@ function gs({
|
|
|
2322
2322
|
]
|
|
2323
2323
|
}
|
|
2324
2324
|
),
|
|
2325
|
-
/* @__PURE__ */ t("div", { className: "min-h-0 overflow-y-auto pr-1", children:
|
|
2325
|
+
/* @__PURE__ */ t("div", { className: "min-h-0 overflow-y-auto pr-1", children: B })
|
|
2326
2326
|
]
|
|
2327
2327
|
}
|
|
2328
2328
|
) });
|
|
@@ -2369,7 +2369,7 @@ function xs({
|
|
|
2369
2369
|
), V = Y(
|
|
2370
2370
|
() => ys(S),
|
|
2371
2371
|
[S]
|
|
2372
|
-
),
|
|
2372
|
+
), P = Y(
|
|
2373
2373
|
() => [
|
|
2374
2374
|
...vs(u),
|
|
2375
2375
|
...(u.variables ?? []).map((b) => b.name)
|
|
@@ -2381,7 +2381,7 @@ function xs({
|
|
|
2381
2381
|
return;
|
|
2382
2382
|
}
|
|
2383
2383
|
c(!1);
|
|
2384
|
-
}, [n, i, c]),
|
|
2384
|
+
}, [n, i, c]), B = ie(
|
|
2385
2385
|
(b, _, A) => {
|
|
2386
2386
|
!g || !(f != null && f.document) || m(
|
|
2387
2387
|
Ns({
|
|
@@ -2410,7 +2410,7 @@ function xs({
|
|
|
2410
2410
|
onPointerDownOutside: h,
|
|
2411
2411
|
children: [
|
|
2412
2412
|
/* @__PURE__ */ s(Lt, { className: l ? "space-y-0" : void 0, children: [
|
|
2413
|
-
/* @__PURE__ */ t(
|
|
2413
|
+
/* @__PURE__ */ t(Be, { className: "text-[15px]", children: l ? "Add document control" : "Document Controls" }),
|
|
2414
2414
|
/* @__PURE__ */ t(
|
|
2415
2415
|
ut,
|
|
2416
2416
|
{
|
|
@@ -2424,7 +2424,7 @@ function xs({
|
|
|
2424
2424
|
{
|
|
2425
2425
|
scope: "dashboard",
|
|
2426
2426
|
controls: S,
|
|
2427
|
-
reservedControlIds:
|
|
2427
|
+
reservedControlIds: P,
|
|
2428
2428
|
defaultValues: V,
|
|
2429
2429
|
usageByControlId: {},
|
|
2430
2430
|
availableFieldChoices: [],
|
|
@@ -2435,7 +2435,7 @@ function xs({
|
|
|
2435
2435
|
initialCreateFlow: r === "create",
|
|
2436
2436
|
onCreateFlowActiveChange: c,
|
|
2437
2437
|
onCreateFlowComplete: D,
|
|
2438
|
-
onChange:
|
|
2438
|
+
onChange: B,
|
|
2439
2439
|
emptyMessage: "No document controls yet."
|
|
2440
2440
|
}
|
|
2441
2441
|
) })
|
|
@@ -2686,7 +2686,7 @@ function Ds({
|
|
|
2686
2686
|
/* @__PURE__ */ t(
|
|
2687
2687
|
vt,
|
|
2688
2688
|
{
|
|
2689
|
-
icon:
|
|
2689
|
+
icon: Bt,
|
|
2690
2690
|
label: "Manage controls",
|
|
2691
2691
|
onClick: () => {
|
|
2692
2692
|
r(), n();
|
|
@@ -2753,8 +2753,8 @@ function to({
|
|
|
2753
2753
|
pickerContentClassName: i,
|
|
2754
2754
|
settingsContentClassName: o
|
|
2755
2755
|
}) {
|
|
2756
|
-
var
|
|
2757
|
-
const [l, h] = E(null), d = C((k) => k.dashboard), c = C((k) => k.selectedSheetId), u = C((k) => k.showFilters), p = C((k) => k.actions), { setDocumentPanelTarget: m, setShowFilters: f } = p, g = (
|
|
2756
|
+
var B;
|
|
2757
|
+
const [l, h] = E(null), d = C((k) => k.dashboard), c = C((k) => k.selectedSheetId), u = C((k) => k.showFilters), p = C((k) => k.actions), { setDocumentPanelTarget: m, setShowFilters: f } = p, g = (B = d.sheets) == null ? void 0 : B.find(
|
|
2758
2758
|
(k) => k.id === c
|
|
2759
2759
|
), y = He(g), w = ie((k) => {
|
|
2760
2760
|
window.setTimeout(() => {
|
|
@@ -2779,7 +2779,7 @@ function to({
|
|
|
2779
2779
|
]
|
|
2780
2780
|
), V = ie(() => {
|
|
2781
2781
|
S(!0);
|
|
2782
|
-
}, [S]),
|
|
2782
|
+
}, [S]), P = ie(() => {
|
|
2783
2783
|
w("create");
|
|
2784
2784
|
}, [w]), D = ie(() => {
|
|
2785
2785
|
w("manage");
|
|
@@ -2795,7 +2795,7 @@ function to({
|
|
|
2795
2795
|
Ds,
|
|
2796
2796
|
{
|
|
2797
2797
|
onAddFilter: V,
|
|
2798
|
-
onAddControl:
|
|
2798
|
+
onAddControl: P,
|
|
2799
2799
|
onManageControls: D,
|
|
2800
2800
|
onDismiss: k
|
|
2801
2801
|
}
|
|
@@ -2832,7 +2832,7 @@ function to({
|
|
|
2832
2832
|
}
|
|
2833
2833
|
function Fs(e, a) {
|
|
2834
2834
|
return (e.variables ?? []).map((r) => {
|
|
2835
|
-
const n =
|
|
2835
|
+
const n = Br(e, r.id);
|
|
2836
2836
|
return {
|
|
2837
2837
|
variable: r,
|
|
2838
2838
|
question: Or(r),
|
|
@@ -2966,7 +2966,7 @@ function Ts(e, a) {
|
|
|
2966
2966
|
return new Set(
|
|
2967
2967
|
(e.sheets ?? []).map((i) => {
|
|
2968
2968
|
const o = { sheetId: i.id, cardId: a, sheetKind: He(i) ? "document" : "dashboard" };
|
|
2969
|
-
return r.filter((l) =>
|
|
2969
|
+
return r.filter((l) => Pr(l, o)).map((l) => l.runtimeScope === "shared" ? l.id : `${l.id}@${i.id}`).join(`
|
|
2970
2970
|
`);
|
|
2971
2971
|
})
|
|
2972
2972
|
).size > 1;
|
|
@@ -2981,7 +2981,7 @@ function Vs(e) {
|
|
|
2981
2981
|
const a = e == null ? void 0 : e.type;
|
|
2982
2982
|
return a === "dataset" || a === "model" || fr.includes(a);
|
|
2983
2983
|
}
|
|
2984
|
-
function
|
|
2984
|
+
function Bs(e, a) {
|
|
2985
2985
|
return zr(
|
|
2986
2986
|
e.map((r, n) => {
|
|
2987
2987
|
var i, o;
|
|
@@ -2993,7 +2993,7 @@ function Ps(e, a) {
|
|
|
2993
2993
|
})
|
|
2994
2994
|
).columns;
|
|
2995
2995
|
}
|
|
2996
|
-
function
|
|
2996
|
+
function Ps(e) {
|
|
2997
2997
|
const { tokenProps: a } = $e(), r = C((m) => m.authToken), { connections: n } = va(), i = e == null ? void 0 : e.connectionId, o = n.find((m) => m.id === i), l = Y(
|
|
2998
2998
|
() => ((e == null ? void 0 : e.selectedEntities) ?? []).filter(Vs),
|
|
2999
2999
|
[e == null ? void 0 : e.selectedEntities]
|
|
@@ -3010,7 +3010,7 @@ function Bs(e) {
|
|
|
3010
3010
|
}, d = ie(
|
|
3011
3011
|
(m) => {
|
|
3012
3012
|
var g, y;
|
|
3013
|
-
const f =
|
|
3013
|
+
const f = Bs(
|
|
3014
3014
|
l,
|
|
3015
3015
|
m.map((w) => w.data)
|
|
3016
3016
|
);
|
|
@@ -3125,12 +3125,12 @@ function Us({
|
|
|
3125
3125
|
var O, te, Z, K, I, ae, q, R, ne, ue, he, ye;
|
|
3126
3126
|
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: h } = va(), [d, c] = E(!1), [u, p] = E(!1), [m, f] = E(!1), g = (x) => {
|
|
3127
3127
|
p(x), n == null || n(x);
|
|
3128
|
-
}, { fields: y, isLoading: w, error: S } =
|
|
3128
|
+
}, { fields: y, isLoading: w, error: S } = Ps(e.mode === "data" ? e.dataSource : void 0), V = [...e.calculatedFields ?? [], ...y], P = (x) => x && (V.find((U) => U.id === x.id) ?? V.find((U) => $s(U, x))), D = [
|
|
3129
3129
|
...V,
|
|
3130
3130
|
...[e.field, e.sortField].filter(
|
|
3131
|
-
(x) => !!x && !
|
|
3131
|
+
(x) => !!x && !P(x) && !V.some((U) => U.id === x.id)
|
|
3132
3132
|
)
|
|
3133
|
-
],
|
|
3133
|
+
], B = ((Z = P(e.field)) == null ? void 0 : Z.id) ?? ((K = e.field) == null ? void 0 : K.id) ?? "", k = ((I = P(e.sortField ?? e.field)) == null ? void 0 : I.id) ?? ((ae = e.sortField ?? e.field) == null ? void 0 : ae.id) ?? "", v = (x) => a({ ...e, ...x }), b = Rs(e.dataSource), _ = ((q = e.dataSource) == null ? void 0 : q.mode) === "database" ? Pt : qt, A = "mt-1 inline-flex items-center gap-1 text-[11px] font-medium text-muted-foreground underline-offset-2 hover:text-foreground hover:underline", G = {
|
|
3134
3134
|
connectionId: ((R = e.dataSource) == null ? void 0 : R.connectionId) || e.connectionId,
|
|
3135
3135
|
dataSource: e.dataSource,
|
|
3136
3136
|
config: e.conditions ? { filters: e.conditions } : {},
|
|
@@ -3264,7 +3264,7 @@ function Us({
|
|
|
3264
3264
|
}
|
|
3265
3265
|
),
|
|
3266
3266
|
/* @__PURE__ */ s("div", { className: "grid grid-cols-2 gap-3", children: [
|
|
3267
|
-
/* @__PURE__ */ t(se, { label: "Field", children: b ? /* @__PURE__ */ s(we, { value:
|
|
3267
|
+
/* @__PURE__ */ t(se, { label: "Field", children: b ? /* @__PURE__ */ s(we, { value: B, onValueChange: X, disabled: w && !D.length, children: [
|
|
3268
3268
|
/* @__PURE__ */ t(Se, { size: "xs", "aria-label": "Field", children: /* @__PURE__ */ t(ke, { placeholder: w ? "Loading fields…" : S ? "Fields unavailable" : "Choose a field" }) }),
|
|
3269
3269
|
/* @__PURE__ */ s(De, { children: [
|
|
3270
3270
|
D.map((x) => /* @__PURE__ */ t(fe, { value: x.id, children: /* @__PURE__ */ s("span", { className: "flex items-center gap-2", children: [
|
|
@@ -3415,7 +3415,7 @@ function qs({
|
|
|
3415
3415
|
className: "inline-flex h-5 items-center gap-1 rounded-[4px] px-1 font-mono text-[11px] text-muted-foreground transition-colors hover:bg-muted hover:text-foreground",
|
|
3416
3416
|
children: [
|
|
3417
3417
|
`{{${e.trim() || a}}}`,
|
|
3418
|
-
/* @__PURE__ */ t(
|
|
3418
|
+
/* @__PURE__ */ t(Bt, { className: "h-3 w-3", "aria-hidden": !0 })
|
|
3419
3419
|
]
|
|
3420
3420
|
}
|
|
3421
3421
|
);
|
|
@@ -3439,19 +3439,19 @@ function Hs({
|
|
|
3439
3439
|
() => e ? Ur(e) : $r()
|
|
3440
3440
|
), [d, c] = E("data"), [u, p] = E(!1), m = (I) => {
|
|
3441
3441
|
p(I), r == null || r(I);
|
|
3442
|
-
}, [f, g] = E([]), [y, w] = E(null), S = !e, V = Qs(l),
|
|
3442
|
+
}, [f, g] = E([]), [y, w] = E(null), S = !e, V = Qs(l), P = Y(
|
|
3443
3443
|
() => Jt({ ...JSON.parse(V), name: "" }, n),
|
|
3444
3444
|
[V, n]
|
|
3445
|
-
), { name: D, label:
|
|
3445
|
+
), { name: D, label: B, presentation: k, emptyText: v } = l, b = Y(
|
|
3446
3446
|
() => ({
|
|
3447
|
-
...
|
|
3448
|
-
name: Zt(n, { id:
|
|
3449
|
-
...
|
|
3447
|
+
...P,
|
|
3448
|
+
name: Zt(n, { id: P.id, name: D, field: l.field, mode: l.mode, label: B }),
|
|
3449
|
+
...B != null && B.trim() ? { label: B.trim() } : {},
|
|
3450
3450
|
...k ? { presentation: k } : {},
|
|
3451
3451
|
...v != null && v.trim() ? { emptyText: v } : {}
|
|
3452
3452
|
}),
|
|
3453
3453
|
// The field and mode are inside the query key already.
|
|
3454
|
-
[
|
|
3454
|
+
[P, n, D, B, k, v, l.field, l.mode]
|
|
3455
3455
|
), _ = Y(
|
|
3456
3456
|
() => ({
|
|
3457
3457
|
...n,
|
|
@@ -3730,11 +3730,11 @@ function Zs({
|
|
|
3730
3730
|
place: f ?? { kind: "sheet", sheetId: c ?? "" },
|
|
3731
3731
|
purpose: "preview",
|
|
3732
3732
|
variables: g
|
|
3733
|
-
}).byId.get(a.id), S = Vn(), V =
|
|
3733
|
+
}).byId.get(a.id), S = Vn(), V = Bn(), P = Y(
|
|
3734
3734
|
() => Cr({ preferences: S, calendar: V }),
|
|
3735
3735
|
[V, S]
|
|
3736
3736
|
);
|
|
3737
|
-
let D,
|
|
3737
|
+
let D, B = "", k = null;
|
|
3738
3738
|
if (n)
|
|
3739
3739
|
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." });
|
|
3740
3740
|
else if (!f)
|
|
@@ -3742,8 +3742,8 @@ function Zs({
|
|
|
3742
3742
|
else if (!w || w.status === "loading")
|
|
3743
3743
|
D = /* @__PURE__ */ t("span", { className: "text-muted-foreground", children: "Loading…" });
|
|
3744
3744
|
else {
|
|
3745
|
-
const b = ei(a, w,
|
|
3746
|
-
if (D = b.body,
|
|
3745
|
+
const b = ei(a, w, P);
|
|
3746
|
+
if (D = b.body, B = b.meta, b.unavailable) {
|
|
3747
3747
|
const _ = (u == null ? void 0 : u.title) || "this tab";
|
|
3748
3748
|
k = /* @__PURE__ */ s("p", { className: "mt-1.5 flex gap-1.5 text-[11px] leading-4 text-amber-700 dark:text-amber-400", children: [
|
|
3749
3749
|
/* @__PURE__ */ t(ya, { className: "mt-px h-3 w-3 shrink-0", "aria-hidden": !0 }),
|
|
@@ -3751,7 +3751,7 @@ function Zs({
|
|
|
3751
3751
|
"No change on ",
|
|
3752
3752
|
_,
|
|
3753
3753
|
". ",
|
|
3754
|
-
|
|
3754
|
+
Pn(b.unavailable, "variable")
|
|
3755
3755
|
] })
|
|
3756
3756
|
] });
|
|
3757
3757
|
}
|
|
@@ -3765,7 +3765,7 @@ function Zs({
|
|
|
3765
3765
|
] }) : null,
|
|
3766
3766
|
/* @__PURE__ */ t("div", { className: "min-w-0 flex-1 truncate text-right text-[13px]", children: D })
|
|
3767
3767
|
] }),
|
|
3768
|
-
|
|
3768
|
+
B ? /* @__PURE__ */ t("p", { className: "mt-1 text-[11px] leading-4 text-muted-foreground", children: B }) : null,
|
|
3769
3769
|
k
|
|
3770
3770
|
] });
|
|
3771
3771
|
}
|
|
@@ -3827,7 +3827,7 @@ function ro() {
|
|
|
3827
3827
|
n.current ? l.preventDefault() : r();
|
|
3828
3828
|
},
|
|
3829
3829
|
children: [
|
|
3830
|
-
/* @__PURE__ */ t(
|
|
3830
|
+
/* @__PURE__ */ t(Be, { className: "sr-only", children: "Variable from data" }),
|
|
3831
3831
|
/* @__PURE__ */ t(ut, { className: "sr-only", children: "Define a value from your data to show in text." }),
|
|
3832
3832
|
/* @__PURE__ */ t(
|
|
3833
3833
|
Hs,
|
|
@@ -3958,16 +3958,16 @@ function di({
|
|
|
3958
3958
|
busyId: w,
|
|
3959
3959
|
manageBriefingsHref: S,
|
|
3960
3960
|
contentKind: V,
|
|
3961
|
-
hideHeader:
|
|
3961
|
+
hideHeader: P = !1
|
|
3962
3962
|
}) {
|
|
3963
|
-
const D = e.length,
|
|
3963
|
+
const D = e.length, B = e.filter((A) => A.status === "ACTIVE").length, k = V === "reports" ? D === 1 ? "report" : "reports" : V === "briefings" ? D === 1 ? "briefing" : "briefings" : D === 1 ? "item" : "items", v = e.find((A) => A.hasActiveRun) ?? null, b = V ?? "reports & briefings", _ = r === "dashboard" ? a : `Project ${b}`;
|
|
3964
3964
|
return /* @__PURE__ */ s(
|
|
3965
3965
|
"section",
|
|
3966
3966
|
{
|
|
3967
3967
|
"aria-label": `Dashboard ${b.replace("&", "and")}`,
|
|
3968
3968
|
className: "flex h-full min-h-0 flex-col bg-background text-foreground",
|
|
3969
3969
|
children: [
|
|
3970
|
-
|
|
3970
|
+
P ? null : /* @__PURE__ */ s("header", { className: "flex items-start justify-between gap-3 border-b border-border px-4 py-3", children: [
|
|
3971
3971
|
/* @__PURE__ */ s("div", { className: "min-w-0", children: [
|
|
3972
3972
|
/* @__PURE__ */ t("div", { className: ai, children: b }),
|
|
3973
3973
|
/* @__PURE__ */ t("h2", { className: "mt-0.5 truncate text-[14px] font-semibold leading-5", children: _ })
|
|
@@ -4008,7 +4008,7 @@ function di({
|
|
|
4008
4008
|
] }),
|
|
4009
4009
|
/* @__PURE__ */ t("span", { className: "text-border", children: "·" }),
|
|
4010
4010
|
/* @__PURE__ */ s("span", { children: [
|
|
4011
|
-
|
|
4011
|
+
B,
|
|
4012
4012
|
" active"
|
|
4013
4013
|
] })
|
|
4014
4014
|
] }) })
|
|
@@ -4400,7 +4400,7 @@ function hi({
|
|
|
4400
4400
|
) }),
|
|
4401
4401
|
/* @__PURE__ */ s(We, { align: "end", className: "w-44", children: [
|
|
4402
4402
|
/* @__PURE__ */ s(re, { onClick: n, children: [
|
|
4403
|
-
/* @__PURE__ */ t(
|
|
4403
|
+
/* @__PURE__ */ t(Bt, { className: "h-3.5 w-3.5" }),
|
|
4404
4404
|
"Edit ",
|
|
4405
4405
|
m.noun
|
|
4406
4406
|
] }),
|
|
@@ -4503,21 +4503,21 @@ function xi({
|
|
|
4503
4503
|
openRun: p,
|
|
4504
4504
|
client: m
|
|
4505
4505
|
}) {
|
|
4506
|
-
const { authToken: f, tokenProps: g } = $e(), y = $n(), w = !u || y.canCreate && (u === "scheduled_report" || y.analyticalBriefingsEnabled), [S, V] = E(!1),
|
|
4506
|
+
const { authToken: f, tokenProps: g } = $e(), y = $n(), w = !u || y.canCreate && (u === "scheduled_report" || y.analyticalBriefingsEnabled), [S, V] = E(!1), P = h ?? S, D = (F) => {
|
|
4507
4507
|
h === void 0 && V(F), d == null || d(F);
|
|
4508
|
-
}, [
|
|
4508
|
+
}, [B, k] = E(
|
|
4509
4509
|
u ? "author" : "list"
|
|
4510
4510
|
), [v, b] = E(
|
|
4511
4511
|
u ?? "analytical_briefing"
|
|
4512
4512
|
), [_, A] = E("dashboard"), [G, T] = E(
|
|
4513
4513
|
[]
|
|
4514
|
-
), [M, X] = E(null), O = u && !w && !M ? "list" :
|
|
4514
|
+
), [M, X] = E(null), O = u && !w && !M ? "list" : B, [te, Z] = E(!1), [K, I] = E(null), [ae, q] = E(null), [R, ne] = E(
|
|
4515
4515
|
null
|
|
4516
|
-
), [ue, he] = E(null), ye = et(null), x = et(
|
|
4516
|
+
), [ue, he] = E(null), ye = et(null), x = et(P);
|
|
4517
4517
|
Ee(() => {
|
|
4518
|
-
const F =
|
|
4519
|
-
x.current =
|
|
4520
|
-
}, [
|
|
4518
|
+
const F = P && !x.current;
|
|
4519
|
+
x.current = P, !(!F || !u) && (X(null), A("dashboard"), b(u), k("author"), he(null));
|
|
4520
|
+
}, [P, u]);
|
|
4521
4521
|
const U = Vt(), j = r ?? (g == null ? void 0 : g.apiServiceUrl), H = n ?? (f == null ? void 0 : f.accessToken), le = Y(() => ({ ...bi, ...m }), [m]), [_e, ht] = E(null);
|
|
4522
4522
|
Ee(() => {
|
|
4523
4523
|
if (!p || !j || !H) return;
|
|
@@ -4575,8 +4575,8 @@ function xi({
|
|
|
4575
4575
|
}
|
|
4576
4576
|
}, [le, j, H]);
|
|
4577
4577
|
Ee(() => {
|
|
4578
|
-
!
|
|
4579
|
-
}, [Oe, O, ce,
|
|
4578
|
+
!P || O !== "list" || !Oe || ce();
|
|
4579
|
+
}, [Oe, O, ce, P]);
|
|
4580
4580
|
const Re = () => {
|
|
4581
4581
|
X(null), A("dashboard"), k("list"), D(!0);
|
|
4582
4582
|
}, N = (F) => {
|
|
@@ -4662,7 +4662,7 @@ function xi({
|
|
|
4662
4662
|
q(null);
|
|
4663
4663
|
}
|
|
4664
4664
|
}, La = Ke.length;
|
|
4665
|
-
return y.surfaceVisible ? /* @__PURE__ */ s(Gn, { open:
|
|
4665
|
+
return y.surfaceVisible ? /* @__PURE__ */ s(Gn, { open: P, onOpenChange: D, children: [
|
|
4666
4666
|
c ? null : /* @__PURE__ */ t(
|
|
4667
4667
|
ti,
|
|
4668
4668
|
{
|