react-semaphor 0.1.567 → 0.1.569
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/README.md +0 -7
- package/dist/analytics-protocol/index.js +434 -454
- package/dist/assistant-context/index.js +1 -1
- package/dist/brand-studio/index.js +10 -12
- package/dist/briefings/index.js +4 -4
- package/dist/chunks/{_commonjsHelpers-DimLPMtv.js → _commonjsHelpers-Bid1ZNYj.js} +271 -222
- package/dist/chunks/{assistant-chat-D-IuHHwh.js → assistant-chat-Dzf2Mbph.js} +107 -109
- package/dist/chunks/{bookmark-impact-B0estCHn.js → bookmark-impact-Czg6FGt5.js} +2 -2
- package/dist/chunks/{bookmark-state-Du3s13_V.js → bookmark-state-CflS88gq.js} +251 -250
- package/dist/chunks/{card-filter-builder-DbSmzvem.js → card-filter-builder-BS982X7x.js} +1001 -1000
- package/dist/chunks/{code-editor-DJNOsgJH.js → code-editor-BsxHzm9u.js} +43 -45
- package/dist/chunks/{comparison-window-caption-CMLb3mut.js → comparison-window-caption-lLTgzOkM.js} +252 -253
- package/dist/chunks/{dashboard-f8J9DHh5.js → dashboard-BiYSbxZv.js} +1 -1
- package/dist/chunks/{dashboard-briefing-launcher-DunvZYsU.js → dashboard-briefing-launcher-Bdj7luOr.js} +119 -120
- package/dist/chunks/{dashboard-controls-B09cN2Dz.js → dashboard-controls-TViDsnb8.js} +17 -19
- package/dist/chunks/dashboard-json-Dg9dQd9U.js +66 -0
- package/dist/chunks/{dates-BsJcyoC_.js → dates-BsPrWZIP.js} +8 -8
- package/dist/chunks/{edit-dashboard-visual-Cwzbpty8.js → edit-dashboard-visual-C6hoIeEJ.js} +20 -21
- package/dist/chunks/{filter-reach-copy-P-kDwUpY.js → filter-reach-copy-hcQ4os0u.js} +862 -852
- package/dist/chunks/filter-value-text-CVxEEDVl.js +146 -0
- package/dist/chunks/{index-BcXw0CpM.js → index-G4q89J6O.js} +74 -76
- package/dist/chunks/{layout-grid-0hIlqEtk.js → layout-grid-BIcoFfdS.js} +1 -1
- package/dist/chunks/{list-filter-DkgoCeBm.js → list-filter-C6tYkHyv.js} +1 -1
- package/dist/chunks/matrix-analytical-definition-dkS8szLM.js +1253 -0
- package/dist/chunks/matrix-member-presentation-DRa-9e6Q.js +169 -0
- package/dist/chunks/{matrix-operation-contract-Eb6elidS.js → matrix-operation-contract-DCVinw1o.js} +122 -122
- package/dist/chunks/{metric-comparison-ChXUFaZu.js → metric-comparison-n9NsIa-2.js} +175 -128
- package/dist/chunks/{palette-4vf2BEEg.js → palette-NjHOE_6B.js} +1 -1
- package/dist/chunks/pivot-result-contract-expectations-DkmueDTW.js +55 -0
- package/dist/chunks/{pivot-result-identity-BlbLrqaC.js → pivot-result-identity-B89X5xjb.js} +1 -1
- package/dist/chunks/raw-temporal-value-DdT0s47W.js +159 -0
- package/dist/chunks/{report-preferences-dialog-CbgmdWeZ.js → report-preferences-dialog-Xc8_GFju.js} +26 -28
- package/dist/chunks/{report-runtime-context-DnA_PiKo.js → report-runtime-context-BhPzLTbS.js} +1 -1
- package/dist/chunks/{resolve-dashboard-input-context-DPKSF3qj.js → resolve-dashboard-input-context-KqvcLcTM.js} +5956 -5880
- package/dist/chunks/{save-D6pHmSSP.js → save-C6VmEJTA.js} +1 -1
- package/dist/chunks/{saved-dashboard-context-CNudmm9U.js → saved-dashboard-context-BeXXyoD4.js} +6 -6
- package/dist/chunks/{semaphor-ready-indicator-CQd-PCCZ.js → semaphor-ready-indicator-BNkaANsG.js} +31011 -30850
- package/dist/chunks/{shelf-drop-preview-context-CWS3e20y.js → shelf-drop-preview-context-C_issPBA.js} +18 -20
- package/dist/chunks/{stored-dashboard-CrQFT27O.js → stored-dashboard-B6_StAty.js} +232 -234
- package/dist/chunks/{table-export-sheet--DUKWk6o.js → table-export-sheet-BWP2joD1.js} +1 -1
- package/dist/chunks/{temporal-input-presentation--2r9BLr0.js → temporal-input-presentation-scSWQXAB.js} +4 -4
- package/dist/chunks/{token-types-C8JymO8s.js → token-types-iKMplaBL.js} +1 -1
- package/dist/chunks/{upload-Cf3wXZT8.js → upload-BRW4Mwrd.js} +1 -1
- package/dist/chunks/validators-B8fpdinG.js +3651 -0
- package/dist/chunks/{variable-draft-BDxlD0dM.js → variable-draft-BQ3OMjvy.js} +4 -4
- package/dist/dashboard/index.js +2 -2
- package/dist/dashboard-authoring/index.js +1778 -1741
- package/dist/format-utils/index.js +230 -231
- package/dist/index.js +236 -237
- package/dist/report-runtime-context/index.js +1 -1
- package/dist/style.css +1 -1
- package/dist/surfboard/index.js +2 -2
- package/dist/types/components/surfboard/filter/types.d.ts +5 -4
- package/dist/types/components/ui-custom/date-range-presets.d.ts +1 -17
- package/dist/types/index.js +9 -9
- package/dist/types/lib/document/document-edits.d.ts +8 -3
- package/dist/types/lib/document/document-text-style.d.ts +54 -0
- package/dist/types/lib/hooks/use-date-filter.d.ts +3 -3
- package/dist/types/lib/matrix-table/matrix-card-adapter.d.ts +1 -1
- package/dist/types/lib/types/explorer-types.d.ts +2 -2
- package/dist/types/lib/types/index.d.ts +1 -1
- package/dist/types/lib/utils/card-definition.d.ts +7 -7
- package/dist/types/shared/analytics-protocol/agent-time-window.d.ts +84 -0
- package/dist/types/shared/analytics-protocol/applied-constraints.d.ts +2 -2
- package/dist/types/shared/analytics-protocol/contracts.d.ts +8 -17
- package/dist/types/shared/analytics-protocol/fixtures.d.ts +3 -2
- package/dist/types/shared/analytics-protocol/index.d.ts +2 -4
- package/dist/types/shared/analytics-protocol/matrix-definition-contract.d.ts +4 -4
- package/dist/types/shared/analytics-protocol/relative-date/describe.d.ts +18 -0
- package/dist/types/shared/analytics-protocol/relative-date/index.d.ts +7 -0
- package/dist/types/shared/analytics-protocol/relative-date/limits.d.ts +3 -0
- package/dist/types/shared/analytics-protocol/relative-date/presets.d.ts +11 -0
- package/dist/types/shared/analytics-protocol/relative-date/resolve.d.ts +49 -0
- package/dist/types/shared/analytics-protocol/relative-date/schemas.d.ts +76 -0
- package/dist/types/shared/analytics-protocol/relative-date/traits.d.ts +51 -0
- package/dist/types/shared/analytics-protocol/relative-date/window.d.ts +111 -0
- package/dist/types/shared/analytics-protocol/selection-contract.d.ts +1 -1
- package/dist/types/shared/assistant-protocol/context.d.ts +12 -12
- package/dist/types/shared/dashboard-authoring/changes/card-query-part.d.ts +0 -2
- package/dist/types/shared/dashboard-authoring/changes/dashboard-change.d.ts +176 -1756
- package/dist/types/shared/dashboard-authoring/changes/read-card-query.d.ts +8 -4
- package/dist/types/shared/dashboard-authoring/conditional-formatting/schema.d.ts +74 -74
- package/dist/types/shared/dashboard-authoring/control-execution-contract.d.ts +20 -20
- package/dist/types/shared/dashboard-authoring/outline/outline-dashboard.d.ts +8 -2
- package/dist/types/shared/dashboard-authoring/outline/outline-filters.d.ts +10 -2
- package/dist/types/shared/format-utils/filter-detail.d.ts +2 -8
- package/dist/types/shared/format-utils/filter-line.d.ts +2 -2
- package/dist/types/shared/format-utils/matrix-continuation.d.ts +3 -3
- package/dist/types/shared/temporal/index.d.ts +0 -2
- package/dist/types/shared/temporal/temporal-parity-fixtures.d.ts +2 -2
- package/package.json +2 -24
- package/DATA_APP_SDK.md +0 -339
- package/dist/chunks/dashboard-json-BNNCaKEc.js +0 -68
- package/dist/chunks/filter-value-text-7zhmth1S.js +0 -163
- package/dist/chunks/index-CuHybtft.js +0 -51
- package/dist/chunks/matrix-analytical-definition-C9xB_T84.js +0 -717
- package/dist/chunks/matrix-card-BSUeSXpD.js +0 -42
- package/dist/chunks/matrix-member-presentation-DZNgQpUq.js +0 -105
- package/dist/chunks/operators-B3zZoskU.js +0 -66
- package/dist/chunks/pivot-result-contract-expectations-Ddh1rNz5.js +0 -56
- package/dist/chunks/raw-temporal-value-Bqz8wc7L.js +0 -242
- package/dist/chunks/selection-reducer-OaJ-N5uN.js +0 -46
- package/dist/chunks/source-entity-resolution-DF6GulDn.js +0 -607
- package/dist/chunks/validators-wtjw0aw6.js +0 -3332
- package/dist/data-app-sdk/index.js +0 -1412
- package/dist/data-app-sdk-adapters/index.js +0 -361
- package/dist/data-app-sdk-validation/index.js +0 -1031
- package/dist/types/data-app-sdk/adapters.d.ts +0 -35
- package/dist/types/data-app-sdk/builders.d.ts +0 -62
- package/dist/types/data-app-sdk/contracts.d.ts +0 -419
- package/dist/types/data-app-sdk/executor.d.ts +0 -5
- package/dist/types/data-app-sdk/field-catalog-validation.d.ts +0 -29
- package/dist/types/data-app-sdk/hooks.d.ts +0 -11
- package/dist/types/data-app-sdk/index.d.ts +0 -9
- package/dist/types/data-app-sdk/provider.d.ts +0 -8
- package/dist/types/data-app-sdk/relationship-aware-field-policy.d.ts +0 -21
- package/dist/types/data-app-sdk/selection.d.ts +0 -2
- package/dist/types/data-app-sdk/validation.d.ts +0 -58
- package/dist/types/data-app-sdk-adapters.d.ts +0 -2
- package/dist/types/data-app-sdk-validation.d.ts +0 -2
- package/dist/types/data-app-sdk.d.ts +0 -2
- package/dist/types/shared/analytics-protocol/relative-date-filter.d.ts +0 -68
- package/dist/types/shared/analytics-protocol/relative-date-label.d.ts +0 -20
- package/dist/types/shared/analytics-protocol/time-window-schema.d.ts +0 -314
- package/dist/types/shared/analytics-protocol/time-window.d.ts +0 -52
- package/dist/types/shared/temporal/relative-date.d.ts +0 -21
- package/dist/types/shared/temporal/time-window-periods.d.ts +0 -21
- package/src/data-app-sdk/README.md +0 -402
|
@@ -1,28 +1,27 @@
|
|
|
1
1
|
import { jsx as t, jsxs as s, Fragment as U } from "react/jsx-runtime";
|
|
2
2
|
import la, { useState as A, useEffect as Ee, useCallback as ie, useMemo as Y, useLayoutEffect as Ut, useRef as et, useContext as da } from "react";
|
|
3
|
-
import {
|
|
4
|
-
import { c as we, B as L, X as
|
|
5
|
-
import { L as Ue } from "./layout-grid-
|
|
6
|
-
import "./
|
|
7
|
-
import {
|
|
8
|
-
import "./matrix-operation-contract-
|
|
3
|
+
import { d9 as it, bu as Le, bv as Ve, bx as Pe, da as Ba, aU as $e, aR as ot, db as Oa, dc as lt, dd as Ct, a7 as dt, a4 as ve, u as w, de as _a, df as Ma, bt as M, dg as Ra, a6 as oe, aP as za, bZ as Ua, dh as $a, di as ja, bn as ca, bN as be, ch as ua, bM as tt, o as qa, k as Wa, dj as Qa, ck as wt, cl as St, cm as kt, cn as Dt, co as At, cp as Ft, cq as Et, cr as ha, cu as It, dk as Ka, dl as Ha, c9 as pt, c6 as je, c7 as qe, dm as ma, c8 as We, bV as re, ci as Ga, cd as at, dn as Ya, bS as Xa, bw as Tt, by as ct, dp as pa, bs as Ja, dq as fa, be as ut, dr as Za, bf as en, i as tn, ds as an, b9 as nn, w as rn, t as sn, dt as on, du as ln, dv as ga, dw as dn, dx as cn, dy as Ce, dz as un, R as ba, dA as hn, dB as mn, aM as pn, dC as fn, dD as ge, dE as gn, W as Lt, dF as bn, dG as ft, dH as xn, dI as $t, dJ as vn, dK as yn, dL as Nn, dM as xa, cK as Cn, dN as wn, dO as Sn, dP as Vt, cv as va, dQ as kn, dR as jt, dS as Dn, dT as An, dU as Fn, dV as En, aT as In, bo as Tn, bY as ya, dW as Ln, dX as Vn, dY as Xe, dZ as Pn, d_ as Bn, d$ as On, A as _n, aB as Mn, aC as Rn, ah as zn, ag as Un, af as $n, ae as jn, ab as qn, a9 as Wn, e0 as Qn, e1 as Kn, e2 as Hn, e3 as Gn, e4 as Yn, az as Xn } from "./semaphor-ready-indicator-BNkaANsG.js";
|
|
4
|
+
import { c as we, B as L, X as Qe, n as ze, s as xe, L as de, l as Pt, e as Bt, k as Jn, z as Ot, P as Ie, a5 as Na, d as Te, a as nt, S as Ca, b as Nt, t as Se, u as ke, v as De, w as Ae, x as fe, a6 as Zn } from "./code-editor-BsxHzm9u.js";
|
|
5
|
+
import { L as Ue } from "./layout-grid-BIcoFfdS.js";
|
|
6
|
+
import { c as J } from "./_commonjsHelpers-Bid1ZNYj.js";
|
|
7
|
+
import { S as er } from "./validators-B8fpdinG.js";
|
|
8
|
+
import "./matrix-operation-contract-DCVinw1o.js";
|
|
9
9
|
import "./analytics-base-schemas-BaIQrEzX.js";
|
|
10
|
-
import "zod";
|
|
11
10
|
import "../value-format-preferences/index.js";
|
|
12
|
-
import { c as J } from "./_commonjsHelpers-DimLPMtv.js";
|
|
13
11
|
import { s as Je } from "./normalize-dashboard-for-dirty-check-XKgH3GFX.js";
|
|
14
|
-
import {
|
|
12
|
+
import { bE as qt, ba as Wt, el as Qt, gI as tr, gJ as rt, gb as Kt, gK as ar, o as Ke, gL as nr, p as rr, g8 as sr, gM as ir, gN as or, cs as lr, gO as dr, l as cr, f4 as ur, gP as hr, gQ as mr, a as _t, aM as pr, a4 as fr, c6 as gr, gR as br, gS as xr, ch as vr, gT as yr, gU as Ht, gV as Nr } from "./resolve-dashboard-input-context-KqvcLcTM.js";
|
|
15
13
|
import { createPortal as Cr } from "react-dom";
|
|
16
|
-
import
|
|
17
|
-
import {
|
|
14
|
+
import "zod";
|
|
15
|
+
import { aK as Gt, ar as wr } from "./temporal-input-presentation-scSWQXAB.js";
|
|
16
|
+
import { aA as Sr, an as kr, D as Dr, a8 as st, R as Ar } from "./bookmark-state-CflS88gq.js";
|
|
18
17
|
import "./index-RNaTnE3m.js";
|
|
19
18
|
import "./context-R31TSL5V.js";
|
|
20
|
-
import { S as wa } from "./save-
|
|
21
|
-
import { V as Fr, L as Er, a as Ir, u as Sa, C as ka, F as Tr, b as Lr, A as Vr, c as Pr } from "./card-filter-builder-
|
|
22
|
-
import { m as Br, k as Da, n as Aa } from "./report-preferences-dialog-
|
|
23
|
-
import { v as Or, E as _r } from "./filter-reach-copy-
|
|
24
|
-
import { a as Yt, d as Xt, c as Mr, i as Rr, b as zr, e as Ur, v as Jt, f as Zt, g as $r } from "./variable-draft-
|
|
25
|
-
import { g as pe, d as jr, a as qr } from "./index-
|
|
19
|
+
import { S as wa } from "./save-C6VmEJTA.js";
|
|
20
|
+
import { V as Fr, L as Er, a as Ir, u as Sa, C as ka, F as Tr, b as Lr, A as Vr, c as Pr } from "./card-filter-builder-BS982X7x.js";
|
|
21
|
+
import { m as Br, k as Da, n as Aa } from "./report-preferences-dialog-Xc8_GFju.js";
|
|
22
|
+
import { v as Or, E as _r } from "./filter-reach-copy-hcQ4os0u.js";
|
|
23
|
+
import { a as Yt, d as Xt, c as Mr, i as Rr, b as zr, e as Ur, v as Jt, f as Zt, g as $r } from "./variable-draft-BQ3OMjvy.js";
|
|
24
|
+
import { g as pe, d as jr, a as qr } from "./index-G4q89J6O.js";
|
|
26
25
|
/**
|
|
27
26
|
* @license lucide-react v0.453.0 - ISC
|
|
28
27
|
*
|
|
@@ -49,7 +48,7 @@ const ea = we("Bell", [
|
|
|
49
48
|
* This source code is licensed under the ISC license.
|
|
50
49
|
* See the LICENSE file in the root directory of this source tree.
|
|
51
50
|
*/
|
|
52
|
-
const
|
|
51
|
+
const Qr = we("CalendarRange", [
|
|
53
52
|
["rect", { width: "18", height: "18", x: "3", y: "4", rx: "2", key: "1hopcy" }],
|
|
54
53
|
["path", { d: "M16 2v4", key: "4m81vk" }],
|
|
55
54
|
["path", { d: "M3 10h18", key: "8toen8" }],
|
|
@@ -65,7 +64,7 @@ const Kr = we("CalendarRange", [
|
|
|
65
64
|
* This source code is licensed under the ISC license.
|
|
66
65
|
* See the LICENSE file in the root directory of this source tree.
|
|
67
66
|
*/
|
|
68
|
-
const
|
|
67
|
+
const Kr = we("CodeXml", [
|
|
69
68
|
["path", { d: "m18 16 4-4-4-4", key: "1inbqp" }],
|
|
70
69
|
["path", { d: "m6 8-4 4 4 4", key: "15zrgr" }],
|
|
71
70
|
["path", { d: "m14.5 4-5 16", key: "e7oirm" }]
|
|
@@ -180,7 +179,7 @@ function Jr({
|
|
|
180
179
|
onClick: () => h(!1),
|
|
181
180
|
"aria-label": "Close",
|
|
182
181
|
disabled: n,
|
|
183
|
-
children: /* @__PURE__ */ t(
|
|
182
|
+
children: /* @__PURE__ */ t(Qe, { className: "h-3.5 w-3.5" })
|
|
184
183
|
}
|
|
185
184
|
)
|
|
186
185
|
] }),
|
|
@@ -393,9 +392,9 @@ function as() {
|
|
|
393
392
|
remoteChartSettings: p,
|
|
394
393
|
stripConfig: Wt
|
|
395
394
|
}), f = n.cards.map((k) => {
|
|
396
|
-
if (k.id === i.id) return
|
|
395
|
+
if (k.id === i.id) return Qt({ before: i, after: m });
|
|
397
396
|
const V = tr(k) ? qt(k, { isDevMode: !0, cardSql: k.sql, stripConfig: Wt }) : k;
|
|
398
|
-
return
|
|
397
|
+
return Qt({ before: k, after: V });
|
|
399
398
|
}), g = f.flatMap((k) => k.dropped);
|
|
400
399
|
g.length && M.info("Some conditional formatting rules were removed", {
|
|
401
400
|
description: `Their column isn't in the saved visual: ${g.map((k) => k.name || "an unnamed rule").join(", ")}.`
|
|
@@ -433,7 +432,7 @@ function Be() {
|
|
|
433
432
|
(O) => O.inlineFilterValuesMap
|
|
434
433
|
), B = _a((i == null ? void 0 : i.id) || "", {
|
|
435
434
|
enabled: !!(i != null && i.id) && !!(e != null && e.accessToken)
|
|
436
|
-
}),
|
|
435
|
+
}), Q = ie(
|
|
437
436
|
async (O) => {
|
|
438
437
|
try {
|
|
439
438
|
o(O), S(), D();
|
|
@@ -546,7 +545,7 @@ function Be() {
|
|
|
546
545
|
isLoading: B.isLoading,
|
|
547
546
|
isError: B.isError,
|
|
548
547
|
error: B.error,
|
|
549
|
-
handleEditLibraryVisual:
|
|
548
|
+
handleEditLibraryVisual: Q,
|
|
550
549
|
handleAddLibraryVisual: X,
|
|
551
550
|
getUpdatedFrame: as().getUpdatedFrame,
|
|
552
551
|
refetch: B.refetch
|
|
@@ -573,13 +572,13 @@ function ns(e, a) {
|
|
|
573
572
|
}
|
|
574
573
|
function rs(e) {
|
|
575
574
|
const a = (e || "").toLowerCase();
|
|
576
|
-
return a.includes("table") ? Pt : a.includes("pie") || a.includes("donut") ?
|
|
575
|
+
return a.includes("table") ? Pt : a.includes("pie") || a.includes("donut") ? Ka : a.includes("line") ? Ha : a.includes("bar") ? Jn : Ue;
|
|
577
576
|
}
|
|
578
577
|
function ss({ visual: e }) {
|
|
579
578
|
const a = e.ownership.status === "public" ? "Public" : e.ownership.status === "shared" || e.ownership.sharedCount > 0 ? "Shared" : "Private";
|
|
580
579
|
return /* @__PURE__ */ t("span", { className: "inline-flex items-center rounded-[4px] border border-border/60 px-1.5 py-px text-[11px] text-muted-foreground", children: a });
|
|
581
580
|
}
|
|
582
|
-
function
|
|
581
|
+
function qi({
|
|
583
582
|
open: e,
|
|
584
583
|
onOpenChange: a
|
|
585
584
|
}) {
|
|
@@ -596,7 +595,7 @@ function Wi({
|
|
|
596
595
|
isLoading: E,
|
|
597
596
|
isError: H,
|
|
598
597
|
createResource: B,
|
|
599
|
-
updateResource:
|
|
598
|
+
updateResource: Q,
|
|
600
599
|
deleteResourceAsync: X,
|
|
601
600
|
duplicateResource: O,
|
|
602
601
|
isCreating: te,
|
|
@@ -638,7 +637,7 @@ function Wi({
|
|
|
638
637
|
z((q) => {
|
|
639
638
|
q.has(C) ? q.delete(C) : q.add(C);
|
|
640
639
|
});
|
|
641
|
-
},
|
|
640
|
+
}, K = () => {
|
|
642
641
|
l((C) => {
|
|
643
642
|
const q = new Set(C);
|
|
644
643
|
return ye ? R.forEach(
|
|
@@ -706,7 +705,7 @@ function Wi({
|
|
|
706
705
|
return;
|
|
707
706
|
}
|
|
708
707
|
const me = Object.keys(ee), Ne = me.length === 1 ? me[0] : void 0;
|
|
709
|
-
G(p.id, Ne),
|
|
708
|
+
G(p.id, Ne), Q(
|
|
710
709
|
{
|
|
711
710
|
resourceId: p.id,
|
|
712
711
|
data: ee
|
|
@@ -791,7 +790,7 @@ function Wi({
|
|
|
791
790
|
selectedIds: o,
|
|
792
791
|
allFilteredSelected: ye,
|
|
793
792
|
someFilteredSelected: x,
|
|
794
|
-
onSelectAll:
|
|
793
|
+
onSelectAll: K,
|
|
795
794
|
onToggleSelection: $,
|
|
796
795
|
onAddVisual: le,
|
|
797
796
|
onOpenVisual: ht,
|
|
@@ -896,7 +895,7 @@ function Wi({
|
|
|
896
895
|
}
|
|
897
896
|
),
|
|
898
897
|
p && /* @__PURE__ */ t(
|
|
899
|
-
|
|
898
|
+
Qa,
|
|
900
899
|
{
|
|
901
900
|
open: !!p,
|
|
902
901
|
resourceLabel: "Visual",
|
|
@@ -1191,7 +1190,7 @@ function ls({
|
|
|
1191
1190
|
}
|
|
1192
1191
|
);
|
|
1193
1192
|
}
|
|
1194
|
-
function
|
|
1193
|
+
function Wi(e, a, r = !1) {
|
|
1195
1194
|
const n = w((d) => d.dashboard), i = w(
|
|
1196
1195
|
(d) => d.isDashboardEditing
|
|
1197
1196
|
), o = w(
|
|
@@ -1494,7 +1493,7 @@ function bt({ className: e }) {
|
|
|
1494
1493
|
size: "xs",
|
|
1495
1494
|
variant: "outline",
|
|
1496
1495
|
children: [
|
|
1497
|
-
/* @__PURE__ */ t(
|
|
1496
|
+
/* @__PURE__ */ t(Qe, { className: "h-3.5 w-3.5" }),
|
|
1498
1497
|
"Close"
|
|
1499
1498
|
]
|
|
1500
1499
|
}
|
|
@@ -1509,7 +1508,7 @@ function hs() {
|
|
|
1509
1508
|
try {
|
|
1510
1509
|
const S = {
|
|
1511
1510
|
...i,
|
|
1512
|
-
id:
|
|
1511
|
+
id: Kt(),
|
|
1513
1512
|
visualId: b.id
|
|
1514
1513
|
// Link to the newly created library visual
|
|
1515
1514
|
};
|
|
@@ -1571,7 +1570,7 @@ function hs() {
|
|
|
1571
1570
|
const E = {
|
|
1572
1571
|
...T,
|
|
1573
1572
|
// Card title already synced
|
|
1574
|
-
id:
|
|
1573
|
+
id: Kt(),
|
|
1575
1574
|
visualId: void 0
|
|
1576
1575
|
// Explicitly no visualId for local visuals
|
|
1577
1576
|
};
|
|
@@ -1626,15 +1625,15 @@ function Qi(e = {}) {
|
|
|
1626
1625
|
}
|
|
1627
1626
|
if (h) return;
|
|
1628
1627
|
p(!0);
|
|
1629
|
-
const
|
|
1628
|
+
const Q = {
|
|
1630
1629
|
...T(),
|
|
1631
1630
|
visualId: void 0
|
|
1632
|
-
}, X = rt(u,
|
|
1631
|
+
}, X = rt(u, Q.id);
|
|
1633
1632
|
try {
|
|
1634
|
-
const O = await g(
|
|
1633
|
+
const O = await g(Q, {
|
|
1635
1634
|
previousFrame: X
|
|
1636
1635
|
});
|
|
1637
|
-
d(l,
|
|
1636
|
+
d(l, Q, {
|
|
1638
1637
|
semanticExecutionPayload: O
|
|
1639
1638
|
});
|
|
1640
1639
|
} catch (O) {
|
|
@@ -1741,11 +1740,11 @@ function Qi(e = {}) {
|
|
|
1741
1740
|
)
|
|
1742
1741
|
] });
|
|
1743
1742
|
}
|
|
1744
|
-
function
|
|
1743
|
+
function Ki({ className: e }) {
|
|
1745
1744
|
const a = oe((h) => h.isDevMode), r = oe((h) => h.card.type), n = w((h) => h.isVisualEditing), { setIsDevMode: i } = dt(), { config: o } = da(an).tokenProps, l = (o == null ? void 0 : o.showAdvancedMode) !== !1;
|
|
1746
1745
|
if (!n || !l || !ar(r))
|
|
1747
1746
|
return null;
|
|
1748
|
-
const u = a ? Hr :
|
|
1747
|
+
const u = a ? Hr : Kr, c = a ? "Visual editor" : "SQL editor", d = a ? "Switch to visual editor" : "Switch to SQL editor";
|
|
1749
1748
|
return /* @__PURE__ */ s(
|
|
1750
1749
|
"button",
|
|
1751
1750
|
{
|
|
@@ -1764,13 +1763,13 @@ function Hi({ className: e }) {
|
|
|
1764
1763
|
}
|
|
1765
1764
|
);
|
|
1766
1765
|
}
|
|
1767
|
-
function
|
|
1766
|
+
function Hi() {
|
|
1768
1767
|
const e = Br() === "sm", a = w((c) => c.isDashboardEditing), r = w((c) => c.isVisualEditing), n = w((c) => {
|
|
1769
1768
|
var h;
|
|
1770
1769
|
const d = ((h = c.dashboard) == null ? void 0 : h.sheets) ?? [];
|
|
1771
1770
|
return d.find((p) => p.id === c.selectedSheetId) ?? d[0];
|
|
1772
1771
|
}), i = w((c) => c.actions.arrangeSheet), o = w((c) => c.actions.undoArrange);
|
|
1773
|
-
if (!a || r || !n ||
|
|
1772
|
+
if (!a || r || !n || Ke(n)) return null;
|
|
1774
1773
|
const l = !(n.frames ?? []).length, u = (c) => {
|
|
1775
1774
|
const d = i(n.id, { keepOrder: c });
|
|
1776
1775
|
if (!d.ok) {
|
|
@@ -1826,11 +1825,11 @@ function Gi() {
|
|
|
1826
1825
|
] })
|
|
1827
1826
|
] });
|
|
1828
1827
|
}
|
|
1829
|
-
function
|
|
1828
|
+
function Gi() {
|
|
1830
1829
|
const e = w((i) => i.screenSizesOpen), a = w((i) => {
|
|
1831
1830
|
var u, c;
|
|
1832
1831
|
const o = ((u = i.dashboard) == null ? void 0 : u.sheets) ?? [], l = o.find((d) => d.id === i.selectedSheetId) ?? o[0];
|
|
1833
|
-
return !!l && !
|
|
1832
|
+
return !!l && !Ke(l) && !!((c = l.frames) != null && c.length);
|
|
1834
1833
|
}), r = w((i) => i.actions.setScreenSizesOpen), n = Da(
|
|
1835
1834
|
"screen-sizes",
|
|
1836
1835
|
"lg",
|
|
@@ -1857,7 +1856,7 @@ function Yi() {
|
|
|
1857
1856
|
}
|
|
1858
1857
|
);
|
|
1859
1858
|
}
|
|
1860
|
-
function
|
|
1859
|
+
function Yi({ dashboardId: e }) {
|
|
1861
1860
|
const { openDashboardId: a, access: r, printMode: n, serverIsFavorite: i, fetchedAt: o } = w(
|
|
1862
1861
|
nn((c) => {
|
|
1863
1862
|
var d;
|
|
@@ -1881,7 +1880,7 @@ function Xi({ dashboardId: e }) {
|
|
|
1881
1880
|
}
|
|
1882
1881
|
);
|
|
1883
1882
|
}
|
|
1884
|
-
function
|
|
1883
|
+
function Xi({
|
|
1885
1884
|
width: e,
|
|
1886
1885
|
hasOverflowMenu: a = !0,
|
|
1887
1886
|
children: r
|
|
@@ -1907,11 +1906,11 @@ function Ji({
|
|
|
1907
1906
|
);
|
|
1908
1907
|
return /* @__PURE__ */ t(Aa.Provider, { value: h, children: r });
|
|
1909
1908
|
}
|
|
1910
|
-
function
|
|
1909
|
+
function Ji() {
|
|
1911
1910
|
const { setAnchorSlot: e } = da(Aa);
|
|
1912
1911
|
return /* @__PURE__ */ t("span", { ref: e, "aria-hidden": !0, className: "relative -mr-1.5 block h-7 w-0" });
|
|
1913
1912
|
}
|
|
1914
|
-
function
|
|
1913
|
+
function Zi(e) {
|
|
1915
1914
|
var c;
|
|
1916
1915
|
const { authToken: a, tokenProps: r } = $e(), { data: n } = on(), { mutate: i, isPending: o } = ln(), l = !!e && ((c = n == null ? void 0 : n.preference) == null ? void 0 : c.defaultDashboardId) === e, u = !n || o;
|
|
1917
1916
|
return {
|
|
@@ -1923,7 +1922,7 @@ function eo(e) {
|
|
|
1923
1922
|
}
|
|
1924
1923
|
};
|
|
1925
1924
|
}
|
|
1926
|
-
function
|
|
1925
|
+
function eo({
|
|
1927
1926
|
open: e,
|
|
1928
1927
|
onOpenChange: a,
|
|
1929
1928
|
onSave: r,
|
|
@@ -1963,7 +1962,7 @@ function to({
|
|
|
1963
1962
|
] })
|
|
1964
1963
|
] }) });
|
|
1965
1964
|
}
|
|
1966
|
-
async function
|
|
1965
|
+
async function to(e) {
|
|
1967
1966
|
var o, l;
|
|
1968
1967
|
const a = (l = (o = w.getState()) == null ? void 0 : o.authToken) == null ? void 0 : l.accessToken;
|
|
1969
1968
|
if (!a)
|
|
@@ -2110,7 +2109,7 @@ function Ta({
|
|
|
2110
2109
|
] })
|
|
2111
2110
|
] });
|
|
2112
2111
|
}
|
|
2113
|
-
function
|
|
2112
|
+
function ao({ variant: e }) {
|
|
2114
2113
|
const { snapshot: a, markSeen: r } = Lt(), n = a.runningCount > 0 ? a.runningCount > 9 ? "9+" : String(a.runningCount) : a.hasUnseenFinished ? "" : null, i = Da("activity", "md", {
|
|
2115
2114
|
label: ge.title,
|
|
2116
2115
|
icon: /* @__PURE__ */ t(ea, { className: "h-3.5 w-3.5" }),
|
|
@@ -2669,7 +2668,7 @@ function ks() {
|
|
|
2669
2668
|
title: `Applies to ${o.eligibleCardCount} of ${o.totalCardCount} date-aware cards`,
|
|
2670
2669
|
className: "flex w-full items-start gap-2 rounded-control px-2 py-1.5 text-left outline-none transition-colors hover:bg-muted/40 focus-visible:bg-muted/40 focus-visible:ring-1 focus-visible:ring-inset focus-visible:ring-border",
|
|
2671
2670
|
children: [
|
|
2672
|
-
/* @__PURE__ */ t(
|
|
2671
|
+
/* @__PURE__ */ t(Qr, { className: "mt-0.5 h-3.5 w-3.5 shrink-0 text-muted-foreground" }),
|
|
2673
2672
|
/* @__PURE__ */ s("span", { className: "flex min-w-0 flex-col", children: [
|
|
2674
2673
|
/* @__PURE__ */ t("span", { className: "text-[12px] font-medium text-foreground", children: "Add global date filter" }),
|
|
2675
2674
|
/* @__PURE__ */ t("span", { className: "text-[11px] leading-[1.4] text-muted-foreground", children: "One date range across all date-aware cards." })
|
|
@@ -2778,7 +2777,7 @@ function As({
|
|
|
2778
2777
|
)
|
|
2779
2778
|
] });
|
|
2780
2779
|
}
|
|
2781
|
-
function
|
|
2780
|
+
function no({
|
|
2782
2781
|
size: e,
|
|
2783
2782
|
className: a,
|
|
2784
2783
|
primaryButtonClassName: r,
|
|
@@ -2789,7 +2788,7 @@ function ro({
|
|
|
2789
2788
|
var _;
|
|
2790
2789
|
const [l, u] = A(null), c = w((b) => b.dashboard), d = w((b) => b.selectedSheetId), h = w((b) => b.showFilters), p = w((b) => b.actions), { setDocumentPanelTarget: m, setShowFilters: f } = p, g = (_ = c.sheets) == null ? void 0 : _.find(
|
|
2791
2790
|
(b) => b.id === d
|
|
2792
|
-
), y =
|
|
2791
|
+
), y = Ke(g), N = ie((b) => {
|
|
2793
2792
|
window.setTimeout(() => {
|
|
2794
2793
|
u(b);
|
|
2795
2794
|
}, 0);
|
|
@@ -2957,14 +2956,14 @@ function ia({
|
|
|
2957
2956
|
}
|
|
2958
2957
|
);
|
|
2959
2958
|
}
|
|
2960
|
-
function
|
|
2959
|
+
function ro() {
|
|
2961
2960
|
const e = w((r) => {
|
|
2962
2961
|
var n;
|
|
2963
2962
|
return ((n = r.dashboard.variables) == null ? void 0 : n.length) ?? 0;
|
|
2964
2963
|
}), a = w((r) => r.actions.setVariablesListOpen);
|
|
2965
2964
|
return { label: "Data variables", count: e, open: () => a(!0) };
|
|
2966
2965
|
}
|
|
2967
|
-
function
|
|
2966
|
+
function so() {
|
|
2968
2967
|
var c;
|
|
2969
2968
|
const e = w((d) => d.variablesListOpen), a = w((d) => d.actions.setVariablesListOpen), r = w((d) => d.dashboard), n = w((d) => d.selectedSheetId), i = w((d) => d.actions.openVariableEditor), o = it("interactive"), l = (c = r.sheets) == null ? void 0 : c.find((d) => d.id === n), u = (d) => {
|
|
2970
2969
|
a(!1), i(d);
|
|
@@ -2998,7 +2997,7 @@ function Ts(e, a) {
|
|
|
2998
2997
|
const r = cr(e);
|
|
2999
2998
|
return new Set(
|
|
3000
2999
|
(e.sheets ?? []).map((i) => {
|
|
3001
|
-
const o = { sheetId: i.id, cardId: a, sheetKind:
|
|
3000
|
+
const o = { sheetId: i.id, cardId: a, sheetKind: Ke(i) ? "document" : "dashboard" };
|
|
3002
3001
|
return r.filter((l) => Dr(l, o)).map((l) => l.runtimeScope === "shared" ? l.id : `${l.id}@${i.id}`).join(`
|
|
3003
3002
|
`);
|
|
3004
3003
|
})
|
|
@@ -3168,14 +3167,14 @@ function Us({
|
|
|
3168
3167
|
dataSource: e.dataSource,
|
|
3169
3168
|
config: e.conditions ? { filters: e.conditions } : {},
|
|
3170
3169
|
cardType: "text"
|
|
3171
|
-
}, B = Yt(e.field),
|
|
3170
|
+
}, B = Yt(e.field), Q = (ne = B.find((x) => x.value === e.get)) == null ? void 0 : ne.hint, X = (x) => {
|
|
3172
3171
|
if (x === oa) {
|
|
3173
3172
|
g(!0);
|
|
3174
3173
|
return;
|
|
3175
3174
|
}
|
|
3176
|
-
const z = D.find((
|
|
3175
|
+
const z = D.find((K) => K.id === x);
|
|
3177
3176
|
if (!z) return;
|
|
3178
|
-
const $ = Yt(z).some((
|
|
3177
|
+
const $ = Yt(z).some((K) => K.value === e.get) && e.field !== void 0;
|
|
3179
3178
|
S({ field: z, get: $ ? e.get : Xt(z) });
|
|
3180
3179
|
};
|
|
3181
3180
|
return h ? /* @__PURE__ */ t(
|
|
@@ -3323,7 +3322,7 @@ function Us({
|
|
|
3323
3322
|
]
|
|
3324
3323
|
}
|
|
3325
3324
|
) }),
|
|
3326
|
-
e.field &&
|
|
3325
|
+
e.field && Q ? /* @__PURE__ */ t("p", { className: "col-span-2 -mt-1.5 text-[11px] leading-4 text-muted-foreground", children: Q }) : null,
|
|
3327
3326
|
k ? /* @__PURE__ */ t("p", { className: "col-span-2 -mt-1.5 text-[11px] leading-4 text-destructive", children: k }) : null,
|
|
3328
3327
|
Mr(e) ? /* @__PURE__ */ t(
|
|
3329
3328
|
se,
|
|
@@ -3346,8 +3345,8 @@ function Us({
|
|
|
3346
3345
|
{
|
|
3347
3346
|
value: `${b}|${e.sortDirection}`,
|
|
3348
3347
|
onValueChange: (x) => {
|
|
3349
|
-
const z = x.lastIndexOf("|"), $ = x.slice(0, z),
|
|
3350
|
-
S({ sortField: D.find((le) => le.id === $), sortDirection:
|
|
3348
|
+
const z = x.lastIndexOf("|"), $ = x.slice(0, z), K = x.slice(z + 1);
|
|
3349
|
+
S({ sortField: D.find((le) => le.id === $), sortDirection: K });
|
|
3351
3350
|
},
|
|
3352
3351
|
children: [
|
|
3353
3352
|
/* @__PURE__ */ t(ke, { size: "xs", "aria-label": "Order by", children: /* @__PURE__ */ t(De, {}) }),
|
|
@@ -3458,11 +3457,11 @@ const Ws = [
|
|
|
3458
3457
|
{ id: "filters", label: "Dashboard filters" },
|
|
3459
3458
|
{ id: "display", label: "Display" }
|
|
3460
3459
|
];
|
|
3461
|
-
function
|
|
3460
|
+
function Qs(e) {
|
|
3462
3461
|
const { name: a, label: r, presentation: n, emptyText: i, ...o } = e;
|
|
3463
3462
|
return JSON.stringify(o);
|
|
3464
3463
|
}
|
|
3465
|
-
function
|
|
3464
|
+
function Ks({
|
|
3466
3465
|
variable: e,
|
|
3467
3466
|
onClose: a,
|
|
3468
3467
|
onHoldEscape: r
|
|
@@ -3472,7 +3471,7 @@ function Qs({
|
|
|
3472
3471
|
() => e ? zr(e) : Ur()
|
|
3473
3472
|
), [c, d] = A("data"), [h, p] = A(!1), m = (I) => {
|
|
3474
3473
|
p(I), r == null || r(I);
|
|
3475
|
-
}, [f, g] = A([]), [y, N] = A(null), k = !e, V =
|
|
3474
|
+
}, [f, g] = A([]), [y, N] = A(null), k = !e, V = Qs(l), P = Y(
|
|
3476
3475
|
() => Jt({ ...JSON.parse(V), name: "" }, n),
|
|
3477
3476
|
[V, n]
|
|
3478
3477
|
), { name: D, label: _, presentation: b, emptyText: S } = l, v = Y(
|
|
@@ -3491,7 +3490,7 @@ function Qs({
|
|
|
3491
3490
|
variables: [...(n.variables ?? []).filter((I) => I.id !== v.id), v]
|
|
3492
3491
|
}),
|
|
3493
3492
|
[n, v]
|
|
3494
|
-
), E = $r(l), H = ut(), B = w((I) => I.actions.mergeSemanticExecutionPayload), [
|
|
3493
|
+
), E = $r(l), H = ut(), B = w((I) => I.actions.mergeSemanticExecutionPayload), [Q, X] = A(!1), O = async () => {
|
|
3495
3494
|
const I = Jt(l, n);
|
|
3496
3495
|
X(!0);
|
|
3497
3496
|
let ae;
|
|
@@ -3559,7 +3558,7 @@ function Qs({
|
|
|
3559
3558
|
onClick: a,
|
|
3560
3559
|
"aria-label": "Close",
|
|
3561
3560
|
className: "flex h-6 w-6 shrink-0 items-center justify-center rounded-control text-muted-foreground hover:bg-muted hover:text-foreground",
|
|
3562
|
-
children: /* @__PURE__ */ t(
|
|
3561
|
+
children: /* @__PURE__ */ t(Qe, { className: "h-3.5 w-3.5", "aria-hidden": !0 })
|
|
3563
3562
|
}
|
|
3564
3563
|
)
|
|
3565
3564
|
] }),
|
|
@@ -3636,7 +3635,7 @@ function Qs({
|
|
|
3636
3635
|
),
|
|
3637
3636
|
/* @__PURE__ */ s("span", { className: "flex items-center gap-1.5", children: [
|
|
3638
3637
|
/* @__PURE__ */ t(L, { variant: "outline", size: "xs", onClick: a, children: "Cancel" }),
|
|
3639
|
-
/* @__PURE__ */ t(L, { size: "xs", disabled: !!E ||
|
|
3638
|
+
/* @__PURE__ */ t(L, { size: "xs", disabled: !!E || Q, title: E, onClick: () => void O(), children: k ? "Create" : "Done" })
|
|
3640
3639
|
] })
|
|
3641
3640
|
] })
|
|
3642
3641
|
] })
|
|
@@ -3755,7 +3754,7 @@ function Zs({
|
|
|
3755
3754
|
selectedSheetId: i
|
|
3756
3755
|
}) {
|
|
3757
3756
|
var S;
|
|
3758
|
-
const o = r.sheets ?? [], l = Y(() => Ts(r, a.id), [r, a.id]), [u, c] = A(void 0), d = (l ? u : void 0) ?? i ?? ((S = o[0]) == null ? void 0 : S.id), h = o.find((v) => v.id === d), p = w((v) => d ? v.documentSectionRuntimeBySheetId[d] : void 0), m = !!(h &&
|
|
3757
|
+
const o = r.sheets ?? [], l = Y(() => Ts(r, a.id), [r, a.id]), [u, c] = A(void 0), d = (l ? u : void 0) ?? i ?? ((S = o[0]) == null ? void 0 : S.id), h = o.find((v) => v.id === d), p = w((v) => d ? v.documentSectionRuntimeBySheetId[d] : void 0), m = !!(h && Ke(h)), f = Y(
|
|
3759
3758
|
() => d ? m ? p ? { kind: "document", sheetId: d, runtime: p } : void 0 : { kind: "sheet", sheetId: d } : void 0,
|
|
3760
3759
|
[m, p, d]
|
|
3761
3760
|
), g = Y(() => n || !f ? [] : [a], [n, a, f]), N = En({
|
|
@@ -3847,7 +3846,7 @@ function ei(e, a, r) {
|
|
|
3847
3846
|
return { body: null, meta: "" };
|
|
3848
3847
|
}
|
|
3849
3848
|
}
|
|
3850
|
-
function
|
|
3849
|
+
function io() {
|
|
3851
3850
|
const e = w((l) => l.variableEditor), a = w((l) => l.dashboard.variables), r = w((l) => l.actions.closeVariableEditor), n = et(!1), i = (e == null ? void 0 : e.kind) === "edit" ? a == null ? void 0 : a.find((l) => l.id === e.variableId) : void 0;
|
|
3852
3851
|
return !(e && (e.kind === "new" || i)) ? null : /* @__PURE__ */ s(Le, { modal: !1, open: !0, onOpenChange: (l) => !l && r(), children: [
|
|
3853
3852
|
/* @__PURE__ */ t("div", { className: "pointer-events-none fixed inset-0 z-40 bg-zinc-950/40 backdrop-blur-sm" }),
|
|
@@ -3863,7 +3862,7 @@ function oo() {
|
|
|
3863
3862
|
/* @__PURE__ */ t(Pe, { className: "sr-only", children: "Variable from data" }),
|
|
3864
3863
|
/* @__PURE__ */ t(ct, { className: "sr-only", children: "Define a value from your data to show in text." }),
|
|
3865
3864
|
/* @__PURE__ */ t(
|
|
3866
|
-
|
|
3865
|
+
Ks,
|
|
3867
3866
|
{
|
|
3868
3867
|
variable: i,
|
|
3869
3868
|
onClose: r,
|
|
@@ -4012,7 +4011,7 @@ function di({
|
|
|
4012
4011
|
onClick: l,
|
|
4013
4012
|
className: "rounded-control p-1 text-muted-foreground hover:bg-muted hover:text-foreground",
|
|
4014
4013
|
"aria-label": `Close ${v.replace("&", "and")} panel`,
|
|
4015
|
-
children: /* @__PURE__ */ t(
|
|
4014
|
+
children: /* @__PURE__ */ t(Qe, { className: "h-3.5 w-3.5" })
|
|
4016
4015
|
}
|
|
4017
4016
|
)
|
|
4018
4017
|
] }),
|
|
@@ -4518,7 +4517,7 @@ const bi = {
|
|
|
4518
4517
|
deleteBriefing: Un,
|
|
4519
4518
|
runBriefingNow: zn
|
|
4520
4519
|
};
|
|
4521
|
-
function
|
|
4520
|
+
function oo(e) {
|
|
4522
4521
|
return /* @__PURE__ */ t(_n, { authToken: e.token ? { accessToken: e.token } : void 0, children: /* @__PURE__ */ t(Mn, { children: /* @__PURE__ */ t(xi, { ...e }) }) });
|
|
4523
4522
|
}
|
|
4524
4523
|
function xi({
|
|
@@ -4544,25 +4543,25 @@ function xi({
|
|
|
4544
4543
|
h ?? "analytical_briefing"
|
|
4545
4544
|
), [T, E] = A("dashboard"), [H, B] = A(
|
|
4546
4545
|
[]
|
|
4547
|
-
), [
|
|
4546
|
+
), [Q, X] = A(null), O = h && !N && !Q ? "list" : _, [te, Z] = A(!1), [G, I] = A(null), [ae, j] = A(null), [R, ne] = A(
|
|
4548
4547
|
null
|
|
4549
4548
|
), [ue, he] = A(null), ye = et(null), x = et(P);
|
|
4550
4549
|
Ee(() => {
|
|
4551
4550
|
const F = P && !x.current;
|
|
4552
4551
|
x.current = P, !(!F || !h) && (X(null), E("dashboard"), v(h), b("author"), he(null));
|
|
4553
4552
|
}, [P, h]);
|
|
4554
|
-
const z = Lt(), $ = r ?? (g == null ? void 0 : g.apiServiceUrl),
|
|
4553
|
+
const z = Lt(), $ = r ?? (g == null ? void 0 : g.apiServiceUrl), K = n ?? (f == null ? void 0 : f.accessToken), le = Y(() => ({ ...bi, ...m }), [m]), [Oe, ht] = A(null);
|
|
4555
4554
|
Ee(() => {
|
|
4556
|
-
if (!p || !$ || !
|
|
4555
|
+
if (!p || !$ || !K) return;
|
|
4557
4556
|
let F = !0;
|
|
4558
|
-
return le.getBriefing($,
|
|
4557
|
+
return le.getBriefing($, K, p.briefingId).then(({ briefing: W }) => {
|
|
4559
4558
|
F && (X(W), ht(p), b("author"));
|
|
4560
4559
|
}, (W) => {
|
|
4561
4560
|
F && M.error(W instanceof Error ? W.message : "Could not open the run.");
|
|
4562
4561
|
}), () => {
|
|
4563
4562
|
F = !1;
|
|
4564
4563
|
};
|
|
4565
|
-
}, [p, $,
|
|
4564
|
+
}, [p, $, K, le]);
|
|
4566
4565
|
const Fe = mi(a), He = Y(() => {
|
|
4567
4566
|
const F = fi(
|
|
4568
4567
|
H,
|
|
@@ -4583,19 +4582,19 @@ function xi({
|
|
|
4583
4582
|
source: { type: "project" },
|
|
4584
4583
|
label: "This project",
|
|
4585
4584
|
detail: "Use any data in this project."
|
|
4586
|
-
}, [e, Fe, T]), _e = !!($ &&
|
|
4585
|
+
}, [e, Fe, T]), _e = !!($ && K), Me = qr({
|
|
4587
4586
|
canCreate: y.canCreate,
|
|
4588
4587
|
analyticalBriefingsEnabled: y.analyticalBriefingsEnabled,
|
|
4589
4588
|
scheduledReportAvailable: T === "dashboard"
|
|
4590
4589
|
}), ce = ie(async () => {
|
|
4591
|
-
if (!(!$ || !
|
|
4590
|
+
if (!(!$ || !K)) {
|
|
4592
4591
|
Z(!0), he(null);
|
|
4593
4592
|
try {
|
|
4594
4593
|
B(
|
|
4595
4594
|
await gi({
|
|
4596
4595
|
apiClient: le,
|
|
4597
4596
|
apiServiceUrl: $,
|
|
4598
|
-
token:
|
|
4597
|
+
token: K
|
|
4599
4598
|
})
|
|
4600
4599
|
);
|
|
4601
4600
|
} catch (F) {
|
|
@@ -4606,7 +4605,7 @@ function xi({
|
|
|
4606
4605
|
Z(!1);
|
|
4607
4606
|
}
|
|
4608
4607
|
}
|
|
4609
|
-
}, [le, $,
|
|
4608
|
+
}, [le, $, K]);
|
|
4610
4609
|
Ee(() => {
|
|
4611
4610
|
!P || O !== "list" || !_e || ce();
|
|
4612
4611
|
}, [_e, O, ce, P]);
|
|
@@ -4615,12 +4614,12 @@ function xi({
|
|
|
4615
4614
|
}, C = (F) => {
|
|
4616
4615
|
X(null), v(F), b("author");
|
|
4617
4616
|
}, q = async (F) => {
|
|
4618
|
-
if (!(!$ || !
|
|
4617
|
+
if (!(!$ || !K)) {
|
|
4619
4618
|
I(F), he(null);
|
|
4620
4619
|
try {
|
|
4621
4620
|
const W = await le.getBriefing(
|
|
4622
4621
|
$,
|
|
4623
|
-
|
|
4622
|
+
K,
|
|
4624
4623
|
F
|
|
4625
4624
|
);
|
|
4626
4625
|
X(W.briefing), b("author");
|
|
@@ -4633,12 +4632,12 @@ function xi({
|
|
|
4633
4632
|
}
|
|
4634
4633
|
}
|
|
4635
4634
|
}, ee = async (F) => {
|
|
4636
|
-
if (!(!$ || !
|
|
4635
|
+
if (!(!$ || !K)) {
|
|
4637
4636
|
j(F.id);
|
|
4638
4637
|
try {
|
|
4639
4638
|
const W = await le.runBriefingNow(
|
|
4640
4639
|
$,
|
|
4641
|
-
|
|
4640
|
+
K,
|
|
4642
4641
|
F.id,
|
|
4643
4642
|
{ requestId: vi() }
|
|
4644
4643
|
);
|
|
@@ -4652,17 +4651,17 @@ function xi({
|
|
|
4652
4651
|
}
|
|
4653
4652
|
}
|
|
4654
4653
|
}, me = async (F) => {
|
|
4655
|
-
if (!$ || !
|
|
4654
|
+
if (!$ || !K) return;
|
|
4656
4655
|
const { noun: W } = pe(F), Ge = W === "report" ? "Report" : "Briefing";
|
|
4657
4656
|
j(F.id);
|
|
4658
4657
|
try {
|
|
4659
4658
|
const Ye = F.status === "PAUSED" ? await le.resumeBriefing(
|
|
4660
4659
|
$,
|
|
4661
|
-
|
|
4660
|
+
K,
|
|
4662
4661
|
F.id
|
|
4663
4662
|
) : await le.pauseBriefing(
|
|
4664
4663
|
$,
|
|
4665
|
-
|
|
4664
|
+
K,
|
|
4666
4665
|
F.id
|
|
4667
4666
|
);
|
|
4668
4667
|
M.success(
|
|
@@ -4676,13 +4675,13 @@ function xi({
|
|
|
4676
4675
|
j(null);
|
|
4677
4676
|
}
|
|
4678
4677
|
}, Ne = async () => {
|
|
4679
|
-
if (!R || !$ || !
|
|
4678
|
+
if (!R || !$ || !K) return;
|
|
4680
4679
|
const F = R;
|
|
4681
4680
|
j(F.id);
|
|
4682
4681
|
try {
|
|
4683
4682
|
await le.deleteBriefing(
|
|
4684
4683
|
$,
|
|
4685
|
-
|
|
4684
|
+
K,
|
|
4686
4685
|
F.id
|
|
4687
4686
|
);
|
|
4688
4687
|
const { noun: W } = pe(F);
|
|
@@ -4695,7 +4694,7 @@ function xi({
|
|
|
4695
4694
|
j(null);
|
|
4696
4695
|
}
|
|
4697
4696
|
}, Pa = He.length;
|
|
4698
|
-
return y.surfaceVisible ? /* @__PURE__ */ s(
|
|
4697
|
+
return y.surfaceVisible ? /* @__PURE__ */ s(Qn, { open: P, onOpenChange: D, children: [
|
|
4699
4698
|
d ? null : /* @__PURE__ */ t(
|
|
4700
4699
|
ti,
|
|
4701
4700
|
{
|
|
@@ -4706,7 +4705,7 @@ function xi({
|
|
|
4706
4705
|
}
|
|
4707
4706
|
),
|
|
4708
4707
|
/* @__PURE__ */ s(
|
|
4709
|
-
|
|
4708
|
+
Kn,
|
|
4710
4709
|
{
|
|
4711
4710
|
ref: ye,
|
|
4712
4711
|
side: "right",
|
|
@@ -4744,7 +4743,7 @@ function xi({
|
|
|
4744
4743
|
onClick: () => {
|
|
4745
4744
|
N && (X(null), v(h), E("dashboard"), b("author"));
|
|
4746
4745
|
},
|
|
4747
|
-
children:
|
|
4746
|
+
children: Q ? `Edit ${pe(Q).noun}` : h === "scheduled_report" ? "Schedule report" : "Create briefing"
|
|
4748
4747
|
}
|
|
4749
4748
|
),
|
|
4750
4749
|
/* @__PURE__ */ t(
|
|
@@ -4771,7 +4770,7 @@ function xi({
|
|
|
4771
4770
|
onClick: () => D(!1),
|
|
4772
4771
|
className: "rounded-control p-1 text-muted-foreground hover:bg-muted hover:text-foreground",
|
|
4773
4772
|
"aria-label": h === "scheduled_report" ? "Close email report workflow" : "Close analytical briefing workflow",
|
|
4774
|
-
children: /* @__PURE__ */ t(
|
|
4773
|
+
children: /* @__PURE__ */ t(Qe, { className: "h-3.5 w-3.5" })
|
|
4775
4774
|
}
|
|
4776
4775
|
)
|
|
4777
4776
|
] }) : null,
|
|
@@ -4813,18 +4812,18 @@ function xi({
|
|
|
4813
4812
|
Xn,
|
|
4814
4813
|
{
|
|
4815
4814
|
apiServiceUrl: $,
|
|
4816
|
-
token:
|
|
4817
|
-
briefing:
|
|
4818
|
-
initialRunId: Oe && (
|
|
4815
|
+
token: K,
|
|
4816
|
+
briefing: Q,
|
|
4817
|
+
initialRunId: Oe && (Q == null ? void 0 : Q.id) === Oe.briefingId ? Oe.runId : void 0,
|
|
4819
4818
|
intent: S,
|
|
4820
|
-
sourceContext:
|
|
4821
|
-
title:
|
|
4819
|
+
sourceContext: Q ? void 0 : mt,
|
|
4820
|
+
title: Q ? `Edit ${pe(Q).noun}` : S === "scheduled_report" ? "Schedule report" : "Create analytical briefing",
|
|
4822
4821
|
hideHeader: !!h,
|
|
4823
4822
|
className: "h-full min-h-0 max-w-none border-0 shadow-none",
|
|
4824
4823
|
onBack: h ? void 0 : () => b("list"),
|
|
4825
4824
|
onCancel: () => D(!1),
|
|
4826
4825
|
onDeleted: () => {
|
|
4827
|
-
const F =
|
|
4826
|
+
const F = Q ? pe(Q).noun : "briefing";
|
|
4828
4827
|
M.success(`${F === "report" ? "Report" : "Briefing"} deleted`), X(null), b("list"), ce();
|
|
4829
4828
|
},
|
|
4830
4829
|
onRunStarted: () => {
|
|
@@ -4885,26 +4884,26 @@ function vi() {
|
|
|
4885
4884
|
return typeof crypto < "u" && typeof crypto.randomUUID == "function" ? crypto.randomUUID() : `briefing-run-now-${Date.now()}-${Math.random().toString(36).slice(2, 8)}`;
|
|
4886
4885
|
}
|
|
4887
4886
|
export {
|
|
4888
|
-
|
|
4889
|
-
|
|
4890
|
-
|
|
4891
|
-
|
|
4892
|
-
|
|
4893
|
-
|
|
4887
|
+
Ki as A,
|
|
4888
|
+
Yi as D,
|
|
4889
|
+
Gi as S,
|
|
4890
|
+
Ji as T,
|
|
4891
|
+
eo as U,
|
|
4892
|
+
qi as V,
|
|
4894
4893
|
ti as W,
|
|
4895
4894
|
Qi as a,
|
|
4896
|
-
|
|
4897
|
-
|
|
4898
|
-
|
|
4899
|
-
|
|
4895
|
+
Hi as b,
|
|
4896
|
+
Xi as c,
|
|
4897
|
+
Zi as d,
|
|
4898
|
+
ao as e,
|
|
4900
4899
|
gs as f,
|
|
4901
4900
|
xs as g,
|
|
4902
4901
|
ws as h,
|
|
4903
|
-
|
|
4904
|
-
|
|
4905
|
-
|
|
4906
|
-
|
|
4907
|
-
|
|
4908
|
-
|
|
4909
|
-
|
|
4902
|
+
to as i,
|
|
4903
|
+
no as j,
|
|
4904
|
+
so as k,
|
|
4905
|
+
ro as l,
|
|
4906
|
+
io as m,
|
|
4907
|
+
oo as n,
|
|
4908
|
+
Wi as u
|
|
4910
4909
|
};
|