react-semaphor 0.1.428 → 0.1.430
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.cjs +1 -1
- package/dist/analytics-protocol/index.js +72 -71
- package/dist/brand-studio/index.cjs +1 -1
- package/dist/brand-studio/index.js +5 -4
- package/dist/briefings/index.cjs +1 -1
- package/dist/briefings/index.js +1031 -622
- package/dist/chunks/analyze-result-contract-BswhsmWT.js +1 -0
- package/dist/chunks/{analyze-result-contract-DnfF8kBb.js → analyze-result-contract-CfOBEwaC.js} +681 -759
- package/dist/chunks/{code-editor-CojfM3qp.js → code-editor-C65eEYyU.js} +2980 -2960
- package/dist/chunks/code-editor-DOh3aYEh.js +138 -0
- package/dist/chunks/{comparison-document-migration-b6c3xiWh.js → comparison-document-migration-DbU_BTxR.js} +1 -1
- package/dist/chunks/{comparison-document-migration-BJH1idOd.js → comparison-document-migration-Dj6xZMCb.js} +2 -2
- package/dist/chunks/csv-utils-Co0WxHke.js +4 -0
- package/dist/chunks/csv-utils-suxSkJGj.js +376 -0
- package/dist/chunks/{dashboard-509sbC4_.js → dashboard-0Tpj3XFq.js} +49934 -47167
- package/dist/chunks/dashboard-CVDy3fbO.js +1402 -0
- package/dist/chunks/{dashboard-briefing-launcher-B-ZTWJwo.js → dashboard-briefing-launcher-DLQqwXMF.js} +1 -1
- package/dist/chunks/{dashboard-briefing-launcher-DIdYHNTq.js → dashboard-briefing-launcher-pkNPk_4j.js} +100 -99
- package/dist/chunks/{dashboard-controls-CbRzWo1N.js → dashboard-controls-CIN4biYx.js} +114 -113
- package/dist/chunks/{dashboard-controls-CWprw-Pb.js → dashboard-controls-DbW9Jt_P.js} +2 -2
- package/dist/chunks/dashboard-json-BDKT0Z-m.js +1 -0
- package/dist/chunks/{dashboard-json-jO4GQfZk.js → dashboard-json-DBfR770k.js} +18 -17
- package/dist/chunks/edit-dashboard-visual-BjAp_UpK.js +182 -0
- package/dist/chunks/{edit-dashboard-visual-KgQTjqWp.js → edit-dashboard-visual-qkvRHS8Q.js} +8721 -8481
- package/dist/chunks/{metric-comparison-CWweq9RG.js → metric-comparison-CPoDx56y.js} +1 -1
- package/dist/chunks/{metric-comparison-BKgkMy9r.js → metric-comparison-DVy3fll_.js} +1 -1
- package/dist/chunks/numeric-presentation-CGTcqocU.js +517 -0
- package/dist/chunks/numeric-presentation-Dlb-Dk4c.js +1 -0
- package/dist/chunks/report-preferences-dialog-Bx8uzG8K.js +690 -0
- package/dist/chunks/report-preferences-dialog-LCHeqh7t.js +1 -0
- package/dist/chunks/source-identity-5OPV4gvg.js +92 -0
- package/dist/chunks/source-identity-Cbo2LOHQ.js +1 -0
- package/dist/chunks/{update-policy-CY2k-pJP.js → update-policy-De2NswtM.js} +1 -1
- package/dist/chunks/{update-policy-BgONreNd.js → update-policy-DnF_74zC.js} +1 -1
- package/dist/chunks/{use-create-flow-overlay-state-BiMYdjZP.js → use-create-flow-overlay-state-C-CxrQ48.js} +1 -1
- package/dist/chunks/{use-create-flow-overlay-state-CGsLzp9A.js → use-create-flow-overlay-state-C-j8E5IZ.js} +97 -96
- package/dist/chunks/validators-B2vUAqTf.js +1 -0
- package/dist/chunks/{validators-Cz-XuORM.js → validators-Bce_J7Vd.js} +19 -13
- package/dist/dashboard/index.cjs +1 -1
- package/dist/dashboard/index.js +1 -1
- package/dist/dashboard-authoring/index.cjs +3 -3
- package/dist/dashboard-authoring/index.js +20 -19
- package/dist/data-app-builder/index.cjs +1 -1
- package/dist/data-app-builder/index.js +50 -50
- package/dist/data-app-codegen/index.cjs +1 -1
- package/dist/data-app-codegen/index.js +2 -2
- package/dist/data-app-codegen-node/index.cjs +1 -1
- package/dist/data-app-codegen-node/index.js +3 -3
- package/dist/data-app-sdk/index.cjs +2 -2
- package/dist/data-app-sdk/index.js +27 -26
- package/dist/data-app-sdk-adapters/index.cjs +1 -1
- package/dist/data-app-sdk-adapters/index.js +25 -24
- package/dist/data-app-sdk-validation/index.cjs +1 -1
- package/dist/data-app-sdk-validation/index.js +57 -55
- package/dist/format-utils/index.cjs +2 -5
- package/dist/format-utils/index.js +136 -161
- package/dist/index.cjs +1 -1
- package/dist/index.js +158 -155
- package/dist/report-runtime-context/index.cjs +1 -0
- package/dist/report-runtime-context/index.js +394 -0
- package/dist/style.css +1 -1
- package/dist/surfboard/index.cjs +1 -1
- package/dist/surfboard/index.js +7 -6
- package/dist/types/analytics-protocol.d.ts +0 -4
- package/dist/types/briefings.d.ts +216 -19
- package/dist/types/dashboard-assistant.d.ts +0 -2
- package/dist/types/dashboard-authoring.d.ts +34 -9
- package/dist/types/dashboard.d.ts +93 -9
- package/dist/types/data-app-builder.d.ts +0 -1
- package/dist/types/data-app-codegen-node.d.ts +6 -28
- package/dist/types/data-app-codegen.d.ts +6 -28
- package/dist/types/data-app-sdk-adapters.d.ts +6 -28
- package/dist/types/data-app-sdk-validation.d.ts +6 -29
- package/dist/types/data-app-sdk.d.ts +6 -31
- package/dist/types/format-utils.d.ts +128 -4
- package/dist/types/index.cjs +1 -1
- package/dist/types/index.js +10 -13
- package/dist/types/main.d.ts +249 -89
- package/dist/types/report-runtime-context.d.ts +99 -0
- package/dist/types/shared.d.ts +34 -9
- package/dist/types/surfboard.d.ts +119 -16
- package/dist/types/types.d.ts +156 -73
- package/dist/types/value-format-preferences.d.ts +126 -0
- package/dist/value-format-preferences/index.cjs +1 -0
- package/dist/value-format-preferences/index.js +635 -0
- package/package.json +11 -1
- package/dist/chunks/analyze-result-contract-ege_u6Nl.js +0 -1
- package/dist/chunks/calendar-preferences-dialog-BF9bNAF_.js +0 -457
- package/dist/chunks/calendar-preferences-dialog-_L9eBQfj.js +0 -1
- package/dist/chunks/code-editor-BoowcKU0.js +0 -138
- package/dist/chunks/dashboard-CMDXBLnG.js +0 -1402
- package/dist/chunks/dashboard-json-BEZrxx_k.js +0 -1
- package/dist/chunks/date-formatter-BTTYdAik.js +0 -1
- package/dist/chunks/date-formatter-D-89jTjG.js +0 -514
- package/dist/chunks/edit-dashboard-visual-D3uhqgm3.js +0 -182
- package/dist/chunks/validators-B4VMLX3_.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const e=require("react/jsx-runtime"),x=require("react"),s=require("./dashboard-
|
|
1
|
+
"use strict";const e=require("react/jsx-runtime"),x=require("react"),s=require("./dashboard-CVDy3fbO.js"),n=require("./code-editor-DOh3aYEh.js"),je=require("./layout-grid-B08pP7v6.js"),G=require("./index-jSrCwPQz.js"),_=require("./use-create-flow-overlay-state-C-CxrQ48.js");require("./analyze-result-contract-BswhsmWT.js");require("../value-format-preferences/index.cjs");const Re=require("./search-Dcud9ajy.js"),ye=require("./csv-utils-Co0WxHke.js");require("./index-Dpm_VET4.js");require("./comparison-document-migration-DbU_BTxR.js");require("react-dom");const X=require("../briefings/index.cjs");/**
|
|
2
2
|
* @license lucide-react v0.453.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import { jsx as e, jsxs as r, Fragment as G } from "react/jsx-runtime";
|
|
2
|
-
import jt, { useState as A, useEffect as
|
|
3
|
-
import {
|
|
4
|
-
import { B,
|
|
2
|
+
import jt, { useState as A, useEffect as Q, useMemo as J, useContext as Wt, useRef as me, useCallback as q } from "react";
|
|
3
|
+
import { aH as De, aI as ke, aK as Ae, bb as Ct, c1 as Ht, cq as Gt, cr as qt, aZ as ge, ce as wt, br as Ve, y as Kt, w as Xt, cs as Yt, aP as Ze, aS as Qe, aT as Je, aU as et, aV as tt, aW as rt, aX as at, aY as Nt, bq as nt, aG as z, ct as Zt, cu as Qt, cv as qe, cf as Oe, cg as ze, cw as St, ch as _e, b$ as H, b1 as Jt, bG as Re, cx as er, b_ as tr, aJ as st, aL as ot, cy as rr, aF as ar, ba as nr, bp as Dt, cz as sr, av as or, aM as ir, b3 as lr, az as $e, at as he, a6 as it, a3 as kt, a2 as lt, as as At, a4 as cr, Y as dr, cl as ur, cA as hr, bB as mr, N as mt, R as pr, au as fr, cB as gr, cC as br, cD as xr, cE as vr, cF as yr, cG as Cr, cH as wr, cI as Nr, cJ as Et, cK as Sr, b4 as Dr, cL as kr, ci as It, cM as Ar, cN as Er, cO as Be, cP as Ir, cQ as Fr, cR as Lr, o as Br, aj as Tr, ae as Vr, T as Rr, ad as Ur, aa as Pr, Z as Mr, a9 as Or, cS as zr, cT as _r, cU as $r, cV as jr, cW as Wr, B as Hr, cX as Gr, cY as qr, a1 as Kr, cZ as Xr, c_ as Yr, c$ as Zr } from "./dashboard-0Tpj3XFq.js";
|
|
4
|
+
import { B, O as Se, Z as Xe, L as ee, M as Ft, d as Lt, c as K, K as Qr, E as be, u as M, A as xe, aH as pt, a7 as Bt, a6 as Ye, D as Tt, S as ct, P as Ue, a as Pe, b as Me, aI as Jr, aJ as ea, aK as ta, aL as ra, aM as aa, aF as na } from "./code-editor-C65eEYyU.js";
|
|
5
5
|
import { L as dt } from "./layout-grid-D5tYJg1-.js";
|
|
6
6
|
import { c as ve, X as je, C as Vt } from "./index-xHCrHprY.js";
|
|
7
|
-
import { u as ut, V as sa, E as ft, a as gt, b as oa, c as ia, L as la, d as ca, e as Rt, C as Ut, f as da } from "./use-create-flow-overlay-state-
|
|
8
|
-
import "./analyze-result-contract-
|
|
7
|
+
import { u as ut, V as sa, E as ft, a as gt, b as oa, c as ia, L as la, d as ca, e as Rt, C as Ut, f as da } from "./use-create-flow-overlay-state-C-j8E5IZ.js";
|
|
8
|
+
import "./analyze-result-contract-CfOBEwaC.js";
|
|
9
|
+
import "../value-format-preferences/index.js";
|
|
9
10
|
import { S as ua } from "./search-DHZCro8B.js";
|
|
10
|
-
import {
|
|
11
|
+
import { j as bt } from "./csv-utils-suxSkJGj.js";
|
|
11
12
|
import "./index-If0wlXGi.js";
|
|
12
|
-
import "./comparison-document-migration-
|
|
13
|
+
import "./comparison-document-migration-Dj6xZMCb.js";
|
|
13
14
|
import "react-dom";
|
|
14
15
|
import { getBriefingPresentation as oe, describeBriefingSchedule as ha, getBriefingCreationIntents as ma } from "../briefings/index.js";
|
|
15
16
|
/**
|
|
@@ -113,7 +114,7 @@ function ya({
|
|
|
113
114
|
isCreating: s
|
|
114
115
|
}) {
|
|
115
116
|
const [n, c] = A(""), [u, m] = A("");
|
|
116
|
-
|
|
117
|
+
Q(() => {
|
|
117
118
|
t || (c(""), m(""));
|
|
118
119
|
}, [t]);
|
|
119
120
|
const l = () => {
|
|
@@ -153,7 +154,7 @@ function ya({
|
|
|
153
154
|
/* @__PURE__ */ r("div", { className: "space-y-1.5", children: [
|
|
154
155
|
/* @__PURE__ */ e(Se, { htmlFor: "visual-title", className: "text-[12px]", children: "Name" }),
|
|
155
156
|
/* @__PURE__ */ e(
|
|
156
|
-
|
|
157
|
+
Xe,
|
|
157
158
|
{
|
|
158
159
|
id: "visual-title",
|
|
159
160
|
size: "sm",
|
|
@@ -170,7 +171,7 @@ function ya({
|
|
|
170
171
|
/* @__PURE__ */ r("div", { className: "space-y-1.5", children: [
|
|
171
172
|
/* @__PURE__ */ e(Se, { htmlFor: "visual-description", className: "text-[12px]", children: "Description" }),
|
|
172
173
|
/* @__PURE__ */ e(
|
|
173
|
-
|
|
174
|
+
Xe,
|
|
174
175
|
{
|
|
175
176
|
id: "visual-description",
|
|
176
177
|
size: "sm",
|
|
@@ -231,13 +232,13 @@ function Ca(t, a) {
|
|
|
231
232
|
}
|
|
232
233
|
function wa(t) {
|
|
233
234
|
const a = (t || "").toLowerCase();
|
|
234
|
-
return a.includes("table") ? Ft : a.includes("pie") || a.includes("donut") ?
|
|
235
|
+
return a.includes("table") ? Ft : a.includes("pie") || a.includes("donut") ? Zt : a.includes("line") ? Qt : a.includes("bar") ? Qr : dt;
|
|
235
236
|
}
|
|
236
237
|
function Na({ visual: t }) {
|
|
237
238
|
const a = t.ownership.status === "public" ? "Public" : t.ownership.status === "shared" || t.ownership.sharedCount > 0 ? "Shared" : "Private";
|
|
238
239
|
return /* @__PURE__ */ e("span", { className: "inline-flex items-center rounded-[4px] border border-border/60 px-1.5 py-px text-[11px] text-muted-foreground", children: a });
|
|
239
240
|
}
|
|
240
|
-
function
|
|
241
|
+
function Rn({
|
|
241
242
|
open: t,
|
|
242
243
|
onOpenChange: a
|
|
243
244
|
}) {
|
|
@@ -268,19 +269,19 @@ function Vn({
|
|
|
268
269
|
startUpdating: We,
|
|
269
270
|
stopUpdating: ye,
|
|
270
271
|
isUpdating: He
|
|
271
|
-
} = qt(),
|
|
272
|
+
} = qt(), Y = C, _ = J(() => {
|
|
272
273
|
const v = i.trim().toLowerCase();
|
|
273
|
-
return v ?
|
|
274
|
+
return v ? Y.filter(
|
|
274
275
|
(L) => {
|
|
275
276
|
var O, re, ie;
|
|
276
277
|
return ((O = L.title) == null ? void 0 : O.toLowerCase().includes(v)) || ((re = L.description) == null ? void 0 : re.toLowerCase().includes(v)) || ((ie = L.kind) == null ? void 0 : ie.toLowerCase().includes(v));
|
|
277
278
|
}
|
|
278
|
-
) :
|
|
279
|
-
}, [i,
|
|
280
|
-
() =>
|
|
279
|
+
) : Y;
|
|
280
|
+
}, [i, Y]), te = J(
|
|
281
|
+
() => Y.filter(
|
|
281
282
|
(v) => n.has(v.id)
|
|
282
283
|
),
|
|
283
|
-
[n,
|
|
284
|
+
[n, Y]
|
|
284
285
|
), le = te.filter(
|
|
285
286
|
(v) => v.permissions.canDelete
|
|
286
287
|
), ce = te.filter(
|
|
@@ -296,7 +297,7 @@ function Vn({
|
|
|
296
297
|
de((L) => {
|
|
297
298
|
L.has(v) ? L.delete(v) : L.add(v);
|
|
298
299
|
});
|
|
299
|
-
},
|
|
300
|
+
}, Z = () => {
|
|
300
301
|
c((v) => {
|
|
301
302
|
const L = new Set(v);
|
|
302
303
|
return Ce ? _.forEach(
|
|
@@ -380,7 +381,7 @@ function Vn({
|
|
|
380
381
|
);
|
|
381
382
|
}, ue = (v) => {
|
|
382
383
|
a(v), v || N();
|
|
383
|
-
},
|
|
384
|
+
}, X = y ? 1 : le.length;
|
|
384
385
|
return /* @__PURE__ */ r(G, { children: [
|
|
385
386
|
/* @__PURE__ */ e(De, { open: t, onOpenChange: ue, children: /* @__PURE__ */ r(
|
|
386
387
|
ke,
|
|
@@ -448,7 +449,7 @@ function Vn({
|
|
|
448
449
|
selectedIds: n,
|
|
449
450
|
allFilteredSelected: Ce,
|
|
450
451
|
someFilteredSelected: Ee,
|
|
451
|
-
onSelectAll:
|
|
452
|
+
onSelectAll: Z,
|
|
452
453
|
onToggleSelection: pe,
|
|
453
454
|
onAddVisual: we,
|
|
454
455
|
onOpenVisual: j,
|
|
@@ -548,12 +549,12 @@ function Vn({
|
|
|
548
549
|
Kt,
|
|
549
550
|
{
|
|
550
551
|
resource: l,
|
|
551
|
-
resourceType:
|
|
552
|
+
resourceType: Xt.VISUAL,
|
|
552
553
|
onClose: () => d(null)
|
|
553
554
|
}
|
|
554
555
|
),
|
|
555
556
|
o && /* @__PURE__ */ e(
|
|
556
|
-
|
|
557
|
+
Yt,
|
|
557
558
|
{
|
|
558
559
|
open: !!o,
|
|
559
560
|
resourceLabel: "Visual",
|
|
@@ -565,19 +566,19 @@ function Vn({
|
|
|
565
566
|
}
|
|
566
567
|
),
|
|
567
568
|
/* @__PURE__ */ e(
|
|
568
|
-
|
|
569
|
+
Ze,
|
|
569
570
|
{
|
|
570
571
|
open: h,
|
|
571
572
|
onOpenChange: (v) => {
|
|
572
573
|
!v && ne || (p(v), v || x(null));
|
|
573
574
|
},
|
|
574
|
-
children: /* @__PURE__ */ r(
|
|
575
|
+
children: /* @__PURE__ */ r(Qe, { children: [
|
|
575
576
|
/* @__PURE__ */ r(Je, { children: [
|
|
576
577
|
/* @__PURE__ */ r(et, { children: [
|
|
577
578
|
"Delete ",
|
|
578
|
-
|
|
579
|
+
X,
|
|
579
580
|
" visual",
|
|
580
|
-
|
|
581
|
+
X === 1 ? "" : "s",
|
|
581
582
|
"?"
|
|
582
583
|
] }),
|
|
583
584
|
/* @__PURE__ */ e(tt, { children: "This cannot be undone. Visuals already added to dashboards may need to be removed from those dashboards separately." })
|
|
@@ -590,7 +591,7 @@ function Vn({
|
|
|
590
591
|
onClick: (v) => {
|
|
591
592
|
v.preventDefault(), Ie();
|
|
592
593
|
},
|
|
593
|
-
disabled: ne ||
|
|
594
|
+
disabled: ne || X === 0,
|
|
594
595
|
children: [
|
|
595
596
|
ne ? /* @__PURE__ */ e(ee, { className: "h-3.5 w-3.5 animate-spin" }) : /* @__PURE__ */ e(Ve, { className: "h-3.5 w-3.5" }),
|
|
596
597
|
ne ? "Deleting..." : "Delete"
|
|
@@ -910,7 +911,7 @@ function Aa({
|
|
|
910
911
|
/* @__PURE__ */ r("div", { className: "grid gap-2", children: [
|
|
911
912
|
/* @__PURE__ */ e(Se, { htmlFor: "name", children: "Name" }),
|
|
912
913
|
/* @__PURE__ */ e(
|
|
913
|
-
|
|
914
|
+
Xe,
|
|
914
915
|
{
|
|
915
916
|
id: "name",
|
|
916
917
|
value: m,
|
|
@@ -1005,7 +1006,7 @@ function Ea() {
|
|
|
1005
1006
|
if (f.saveToCurrentDashboard)
|
|
1006
1007
|
try {
|
|
1007
1008
|
R = await N(F, {
|
|
1008
|
-
previousFrame:
|
|
1009
|
+
previousFrame: Ye(h, F.id)
|
|
1009
1010
|
});
|
|
1010
1011
|
} catch (W) {
|
|
1011
1012
|
console.error(
|
|
@@ -1035,7 +1036,7 @@ function Ea() {
|
|
|
1035
1036
|
};
|
|
1036
1037
|
try {
|
|
1037
1038
|
const V = await N(F, {
|
|
1038
|
-
previousFrame:
|
|
1039
|
+
previousFrame: Ye(h, F.id)
|
|
1039
1040
|
});
|
|
1040
1041
|
x(g, R, {
|
|
1041
1042
|
position: "end",
|
|
@@ -1053,7 +1054,7 @@ function Ea() {
|
|
|
1053
1054
|
isSaving: k.isPending
|
|
1054
1055
|
};
|
|
1055
1056
|
}
|
|
1056
|
-
function
|
|
1057
|
+
function Un(t = {}) {
|
|
1057
1058
|
const a = be((F) => F.frame), i = be((F) => F.editorContext), s = or((F) => F.selectedVisual), n = M((F) => F.selectedFrameId), c = M((F) => F.selectedSheetId), u = M((F) => F.dashboard), { setIsVisualEditing: m, updateFrame: l } = xe(), [d, o] = A(!1), [g, h] = A("both"), p = Dt(), y = (i == null ? void 0 : i.type) === "documentSection", x = !!(a != null && a.visualId || s != null && s.id), D = !!(a != null && a.visualId && n), E = x && !D, {
|
|
1058
1059
|
saveAsDialogOpen: N,
|
|
1059
1060
|
setSaveAsDialogOpen: b,
|
|
@@ -1082,7 +1083,7 @@ function Rn(t = {}) {
|
|
|
1082
1083
|
const V = {
|
|
1083
1084
|
...F,
|
|
1084
1085
|
visualId: void 0
|
|
1085
|
-
}, W =
|
|
1086
|
+
}, W = Ye(u, V.id);
|
|
1086
1087
|
try {
|
|
1087
1088
|
const ae = await p(V, {
|
|
1088
1089
|
previousFrame: W
|
|
@@ -1194,7 +1195,7 @@ function Rn(t = {}) {
|
|
|
1194
1195
|
)
|
|
1195
1196
|
] });
|
|
1196
1197
|
}
|
|
1197
|
-
function
|
|
1198
|
+
function Pn({ className: t }) {
|
|
1198
1199
|
const a = be((d) => d.isDevMode), i = M((d) => d.isVisualEditing), { setIsDevMode: s } = Tt(), { config: n } = Wt(ir).tokenProps, c = (n == null ? void 0 : n.showAdvancedMode) !== !1;
|
|
1199
1200
|
if (!i || !c)
|
|
1200
1201
|
return null;
|
|
@@ -1217,7 +1218,7 @@ function Un({ className: t }) {
|
|
|
1217
1218
|
}
|
|
1218
1219
|
);
|
|
1219
1220
|
}
|
|
1220
|
-
function
|
|
1221
|
+
function Mn({
|
|
1221
1222
|
open: t,
|
|
1222
1223
|
onOpenChange: a,
|
|
1223
1224
|
onSave: i,
|
|
@@ -1229,9 +1230,9 @@ function Pn({
|
|
|
1229
1230
|
discardLabel: l = "Discard",
|
|
1230
1231
|
saveLabel: d = "Save"
|
|
1231
1232
|
}) {
|
|
1232
|
-
return /* @__PURE__ */ e(
|
|
1233
|
+
return /* @__PURE__ */ e(Ze, { open: t, onOpenChange: (g) => {
|
|
1233
1234
|
!g && n || a(g);
|
|
1234
|
-
}, children: /* @__PURE__ */ r(
|
|
1235
|
+
}, children: /* @__PURE__ */ r(Qe, { children: [
|
|
1235
1236
|
/* @__PURE__ */ r(Je, { children: [
|
|
1236
1237
|
/* @__PURE__ */ e(et, { children: c }),
|
|
1237
1238
|
/* @__PURE__ */ e(tt, { children: u })
|
|
@@ -1262,7 +1263,7 @@ function Va(t) {
|
|
|
1262
1263
|
const a = Date.now() - t.getTime();
|
|
1263
1264
|
return a < Ba ? Ia : a < Ta ? Fa : La;
|
|
1264
1265
|
}
|
|
1265
|
-
function
|
|
1266
|
+
function On() {
|
|
1266
1267
|
const { authToken: t, tokenProps: a } = $e(), i = he((h) => h.activeExports), [s, n] = A(
|
|
1267
1268
|
typeof document < "u" ? !document.hidden : !0
|
|
1268
1269
|
), c = me(null), u = me(!1), m = me(void 0), l = a == null ? void 0 : a.apiServiceUrl, d = t == null ? void 0 : t.accessToken, o = q(() => {
|
|
@@ -1271,7 +1272,7 @@ function Mn() {
|
|
|
1271
1272
|
(p) => it(p.status)
|
|
1272
1273
|
);
|
|
1273
1274
|
}, []);
|
|
1274
|
-
|
|
1275
|
+
Q(() => {
|
|
1275
1276
|
if (typeof document > "u") return;
|
|
1276
1277
|
const h = () => {
|
|
1277
1278
|
n(!document.hidden);
|
|
@@ -1357,18 +1358,18 @@ function Mn() {
|
|
|
1357
1358
|
} else
|
|
1358
1359
|
u.current = !1;
|
|
1359
1360
|
}, [l, d, o]);
|
|
1360
|
-
return
|
|
1361
|
+
return Q(() => {
|
|
1361
1362
|
m.current = g;
|
|
1362
|
-
}, [g]),
|
|
1363
|
+
}, [g]), Q(() => {
|
|
1363
1364
|
var p;
|
|
1364
1365
|
o().length > 0 && s && !u.current && (u.current = !0, (p = m.current) == null || p.call(m));
|
|
1365
|
-
}, [i, s, o]),
|
|
1366
|
+
}, [i, s, o]), Q(() => {
|
|
1366
1367
|
var p;
|
|
1367
1368
|
const h = o();
|
|
1368
1369
|
s && h.length > 0 && !u.current && (u.current = !0, (p = m.current) == null || p.call(m));
|
|
1369
|
-
}, [s, o]),
|
|
1370
|
+
}, [s, o]), Q(() => {
|
|
1370
1371
|
!s && c.current && (clearTimeout(c.current), c.current = null, u.current = !1);
|
|
1371
|
-
}, [s]),
|
|
1372
|
+
}, [s]), Q(() => () => {
|
|
1372
1373
|
c.current && (clearTimeout(c.current), c.current = null);
|
|
1373
1374
|
}, []), {
|
|
1374
1375
|
isPolling: u.current,
|
|
@@ -1376,9 +1377,9 @@ function Mn() {
|
|
|
1376
1377
|
inProgressCount: o().length
|
|
1377
1378
|
};
|
|
1378
1379
|
}
|
|
1379
|
-
function
|
|
1380
|
+
function zn() {
|
|
1380
1381
|
const { authToken: t, tokenProps: a } = $e(), i = he((m) => m.activeExports), { addExport: s } = At(), n = me(!1), c = a == null ? void 0 : a.apiServiceUrl, u = t == null ? void 0 : t.accessToken;
|
|
1381
|
-
|
|
1382
|
+
Q(() => {
|
|
1382
1383
|
if (n.current || !c || !u) return;
|
|
1383
1384
|
(async () => {
|
|
1384
1385
|
try {
|
|
@@ -1660,7 +1661,7 @@ function Pa() {
|
|
|
1660
1661
|
)) }) })
|
|
1661
1662
|
] });
|
|
1662
1663
|
}
|
|
1663
|
-
function
|
|
1664
|
+
function _n({
|
|
1664
1665
|
variant: t
|
|
1665
1666
|
}) {
|
|
1666
1667
|
const a = he((l) => l.activeExports), i = fr(), s = a.size > 0, n = Array.from(a.values()).some(
|
|
@@ -2106,7 +2107,7 @@ function Ga({
|
|
|
2106
2107
|
function qa() {
|
|
2107
2108
|
da();
|
|
2108
2109
|
const t = M((l) => l.selectedSheetId), a = M((l) => l.selectedFrameId), i = M((l) => l.dashboard), s = M((l) => l.actions.getSelectedFrame), { setSelectedFrameId: n } = xe(), { setCard: c } = Tt(), u = be((l) => l.card.dataSource);
|
|
2109
|
-
return
|
|
2110
|
+
return Q(() => {
|
|
2110
2111
|
var d, o;
|
|
2111
2112
|
let l = s();
|
|
2112
2113
|
if (!l) {
|
|
@@ -2154,7 +2155,7 @@ function Ka() {
|
|
|
2154
2155
|
] });
|
|
2155
2156
|
}
|
|
2156
2157
|
const yt = !1;
|
|
2157
|
-
function
|
|
2158
|
+
function Xa({
|
|
2158
2159
|
onAddFilter: t,
|
|
2159
2160
|
onAddControl: a,
|
|
2160
2161
|
onManageControls: i,
|
|
@@ -2203,7 +2204,7 @@ function Qa({
|
|
|
2203
2204
|
/* @__PURE__ */ e("p", { className: "px-1 text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", children: "Display" }),
|
|
2204
2205
|
yt,
|
|
2205
2206
|
/* @__PURE__ */ e(
|
|
2206
|
-
|
|
2207
|
+
Ya,
|
|
2207
2208
|
{
|
|
2208
2209
|
id: "filter-display-wrap",
|
|
2209
2210
|
label: "Wrap to multiple lines",
|
|
@@ -2233,7 +2234,7 @@ function Ke({
|
|
|
2233
2234
|
}
|
|
2234
2235
|
);
|
|
2235
2236
|
}
|
|
2236
|
-
function
|
|
2237
|
+
function Ya({
|
|
2237
2238
|
id: t,
|
|
2238
2239
|
label: a,
|
|
2239
2240
|
checked: i,
|
|
@@ -2251,7 +2252,7 @@ function Xa({
|
|
|
2251
2252
|
)
|
|
2252
2253
|
] });
|
|
2253
2254
|
}
|
|
2254
|
-
function
|
|
2255
|
+
function $n({
|
|
2255
2256
|
size: t,
|
|
2256
2257
|
className: a,
|
|
2257
2258
|
primaryButtonClassName: i,
|
|
@@ -2296,7 +2297,7 @@ function _n({
|
|
|
2296
2297
|
onShowFiltersChange: N,
|
|
2297
2298
|
pickerContent: /* @__PURE__ */ e(Ka, {}),
|
|
2298
2299
|
settingsContent: (f) => /* @__PURE__ */ e(
|
|
2299
|
-
|
|
2300
|
+
Xa,
|
|
2300
2301
|
{
|
|
2301
2302
|
onAddFilter: b,
|
|
2302
2303
|
onAddControl: S,
|
|
@@ -2334,7 +2335,7 @@ function _n({
|
|
|
2334
2335
|
) : null
|
|
2335
2336
|
] });
|
|
2336
2337
|
}
|
|
2337
|
-
function
|
|
2338
|
+
function Za({
|
|
2338
2339
|
disabled: t,
|
|
2339
2340
|
briefingCount: a,
|
|
2340
2341
|
className: i,
|
|
@@ -2359,7 +2360,7 @@ function Ya({
|
|
|
2359
2360
|
}
|
|
2360
2361
|
);
|
|
2361
2362
|
}
|
|
2362
|
-
const
|
|
2363
|
+
const Qa = "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", Ot = "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", Te = "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";
|
|
2363
2364
|
function Ja(t) {
|
|
2364
2365
|
return t === "dashboard" ? "This dashboard" : "Project";
|
|
2365
2366
|
}
|
|
@@ -2458,7 +2459,7 @@ function sn({
|
|
|
2458
2459
|
children: [
|
|
2459
2460
|
b ? null : /* @__PURE__ */ r("header", { className: "flex items-start justify-between gap-3 border-b border-border px-4 py-3", children: [
|
|
2460
2461
|
/* @__PURE__ */ r("div", { className: "min-w-0", children: [
|
|
2461
|
-
/* @__PURE__ */ e("div", { className:
|
|
2462
|
+
/* @__PURE__ */ e("div", { className: Qa, children: C }),
|
|
2462
2463
|
/* @__PURE__ */ e("h2", { className: "mt-0.5 truncate text-[14px] font-semibold leading-5", children: T })
|
|
2463
2464
|
] }),
|
|
2464
2465
|
/* @__PURE__ */ e(
|
|
@@ -3004,11 +3005,11 @@ function bn({
|
|
|
3004
3005
|
c();
|
|
3005
3006
|
}
|
|
3006
3007
|
}), o = me(!1);
|
|
3007
|
-
return
|
|
3008
|
-
o.current || (o.current = !0,
|
|
3009
|
-
}, [a, n, d]), /* @__PURE__ */ e(
|
|
3008
|
+
return Q(() => {
|
|
3009
|
+
o.current || (o.current = !0, Xr(a.status) ? d(a) : Yr(a.status) && n(a));
|
|
3010
|
+
}, [a, n, d]), /* @__PURE__ */ e(Zr, { run: m, onExpand: u });
|
|
3010
3011
|
}
|
|
3011
|
-
function
|
|
3012
|
+
function jn(t) {
|
|
3012
3013
|
return /* @__PURE__ */ e(Br, { children: /* @__PURE__ */ e(xn, { ...t }) });
|
|
3013
3014
|
}
|
|
3014
3015
|
function xn({
|
|
@@ -3033,16 +3034,16 @@ function xn({
|
|
|
3033
3034
|
o ?? "analytical_briefing"
|
|
3034
3035
|
), [C, T] = A("dashboard"), [I, F] = A(
|
|
3035
3036
|
[]
|
|
3036
|
-
), [R, V] = A(null), W = o && !x && !R ? "list" : S, [ae, ne] = A(!1), [We, ye] = A(null), [He,
|
|
3037
|
+
), [R, V] = A(null), W = o && !x && !R ? "list" : S, [ae, ne] = A(!1), [We, ye] = A(null), [He, Y] = A(null), [_, te] = A(
|
|
3037
3038
|
null
|
|
3038
3039
|
), [le, ce] = A(null), Ce = me(null), Ee = me(N);
|
|
3039
|
-
|
|
3040
|
+
Q(() => {
|
|
3040
3041
|
const w = N && !Ee.current;
|
|
3041
3042
|
Ee.current = N, !(!w || !o) && (V(null), T("dashboard"), f(o), k("author"), ce(null));
|
|
3042
3043
|
}, [N, o]);
|
|
3043
3044
|
const [de, pe] = A(
|
|
3044
3045
|
null
|
|
3045
|
-
), [
|
|
3046
|
+
), [Z, we] = A(null), $ = i ?? (p == null ? void 0 : p.apiServiceUrl), j = s ?? (h == null ? void 0 : h.accessToken), se = J(() => ({ ...gn, ...g }), [g]), fe = hn(a), Ie = J(() => {
|
|
3046
3047
|
const w = pn(
|
|
3047
3048
|
I,
|
|
3048
3049
|
C,
|
|
@@ -3066,7 +3067,7 @@ function xn({
|
|
|
3066
3067
|
canCreate: y.canCreate,
|
|
3067
3068
|
analyticalBriefingsEnabled: y.analyticalBriefingsEnabled,
|
|
3068
3069
|
scheduledReportAvailable: C === "dashboard"
|
|
3069
|
-
}),
|
|
3070
|
+
}), X = q(async () => {
|
|
3070
3071
|
if (!(!$ || !j)) {
|
|
3071
3072
|
ne(!0), ce(null);
|
|
3072
3073
|
try {
|
|
@@ -3086,9 +3087,9 @@ function xn({
|
|
|
3086
3087
|
}
|
|
3087
3088
|
}
|
|
3088
3089
|
}, [se, $, j]);
|
|
3089
|
-
|
|
3090
|
-
!N || W !== "list" || !Ne ||
|
|
3091
|
-
}, [Ne, W,
|
|
3090
|
+
Q(() => {
|
|
3091
|
+
!N || W !== "list" || !Ne || X();
|
|
3092
|
+
}, [Ne, W, X, N]);
|
|
3092
3093
|
const v = () => {
|
|
3093
3094
|
V(null), T("dashboard"), k("list"), b(!0);
|
|
3094
3095
|
}, L = (w) => {
|
|
@@ -3113,26 +3114,26 @@ function xn({
|
|
|
3113
3114
|
}
|
|
3114
3115
|
}, re = async (w) => {
|
|
3115
3116
|
if (!(!$ || !j)) {
|
|
3116
|
-
|
|
3117
|
+
Y(w.id);
|
|
3117
3118
|
try {
|
|
3118
3119
|
await se.runBriefingNow(
|
|
3119
3120
|
$,
|
|
3120
3121
|
j,
|
|
3121
3122
|
w.id,
|
|
3122
3123
|
{ requestId: vn() }
|
|
3123
|
-
),
|
|
3124
|
+
), X();
|
|
3124
3125
|
} catch (U) {
|
|
3125
3126
|
z.error(
|
|
3126
3127
|
U instanceof Error ? U.message : "Could not start the run."
|
|
3127
3128
|
);
|
|
3128
3129
|
} finally {
|
|
3129
|
-
|
|
3130
|
+
Y(null);
|
|
3130
3131
|
}
|
|
3131
3132
|
}
|
|
3132
3133
|
}, ie = async (w) => {
|
|
3133
3134
|
if (!$ || !j) return;
|
|
3134
3135
|
const { noun: U } = oe(w), Fe = U === "report" ? "Report" : "Briefing";
|
|
3135
|
-
|
|
3136
|
+
Y(w.id);
|
|
3136
3137
|
try {
|
|
3137
3138
|
const Le = w.status === "PAUSED" ? await se.resumeBriefing(
|
|
3138
3139
|
$,
|
|
@@ -3145,18 +3146,18 @@ function xn({
|
|
|
3145
3146
|
);
|
|
3146
3147
|
z.success(
|
|
3147
3148
|
Le.briefing.status === "PAUSED" ? `${Fe} paused` : `${Fe} resumed`
|
|
3148
|
-
),
|
|
3149
|
+
), X();
|
|
3149
3150
|
} catch (Le) {
|
|
3150
3151
|
z.error(
|
|
3151
3152
|
Le instanceof Error ? Le.message : `Could not update the ${U} status.`
|
|
3152
3153
|
);
|
|
3153
3154
|
} finally {
|
|
3154
|
-
|
|
3155
|
+
Y(null);
|
|
3155
3156
|
}
|
|
3156
3157
|
}, _t = async () => {
|
|
3157
3158
|
if (!_ || !$ || !j) return;
|
|
3158
3159
|
const w = _;
|
|
3159
|
-
|
|
3160
|
+
Y(w.id);
|
|
3160
3161
|
try {
|
|
3161
3162
|
await se.deleteBriefing(
|
|
3162
3163
|
$,
|
|
@@ -3164,18 +3165,18 @@ function xn({
|
|
|
3164
3165
|
w.id
|
|
3165
3166
|
);
|
|
3166
3167
|
const { noun: U } = oe(w);
|
|
3167
|
-
z.success(`${U === "report" ? "Report" : "Briefing"} deleted`), te(null),
|
|
3168
|
+
z.success(`${U === "report" ? "Report" : "Briefing"} deleted`), te(null), X();
|
|
3168
3169
|
} catch (U) {
|
|
3169
3170
|
z.error(
|
|
3170
3171
|
U instanceof Error ? U.message : "Could not delete the briefing."
|
|
3171
3172
|
);
|
|
3172
3173
|
} finally {
|
|
3173
|
-
|
|
3174
|
+
Y(null);
|
|
3174
3175
|
}
|
|
3175
3176
|
}, $t = Ie.length;
|
|
3176
3177
|
return y.surfaceVisible ? /* @__PURE__ */ r(zr, { open: N, onOpenChange: b, children: [
|
|
3177
3178
|
d ? null : /* @__PURE__ */ e(
|
|
3178
|
-
|
|
3179
|
+
Za,
|
|
3179
3180
|
{
|
|
3180
3181
|
disabled: n || !Ne,
|
|
3181
3182
|
briefingCount: $t,
|
|
@@ -3302,12 +3303,12 @@ function xn({
|
|
|
3302
3303
|
onCancel: () => b(!1),
|
|
3303
3304
|
onDeleted: () => {
|
|
3304
3305
|
const w = R ? oe(R).noun : "briefing";
|
|
3305
|
-
z.success(`${w === "report" ? "Report" : "Briefing"} deleted`), V(null), k("list"),
|
|
3306
|
+
z.success(`${w === "report" ? "Report" : "Briefing"} deleted`), V(null), k("list"), X();
|
|
3306
3307
|
},
|
|
3307
3308
|
onRunStarted: () => {
|
|
3308
3309
|
},
|
|
3309
3310
|
onSaved: (w) => {
|
|
3310
|
-
V(w),
|
|
3311
|
+
V(w), X();
|
|
3311
3312
|
},
|
|
3312
3313
|
onMinimizeRun: ({ briefing: w, run: U }) => {
|
|
3313
3314
|
pe({ briefing: w, run: U }), b(!1);
|
|
@@ -3328,41 +3329,41 @@ function xn({
|
|
|
3328
3329
|
we({
|
|
3329
3330
|
briefing: de.briefing,
|
|
3330
3331
|
run: w
|
|
3331
|
-
}), pe(null),
|
|
3332
|
+
}), pe(null), X();
|
|
3332
3333
|
},
|
|
3333
3334
|
onTimeout: () => {
|
|
3334
|
-
pe(null),
|
|
3335
|
+
pe(null), X();
|
|
3335
3336
|
},
|
|
3336
3337
|
onExpand: () => {
|
|
3337
3338
|
V(de.briefing), k("author"), pe(null), b(!0);
|
|
3338
3339
|
}
|
|
3339
3340
|
}
|
|
3340
3341
|
) : null,
|
|
3341
|
-
|
|
3342
|
+
Z ? /* @__PURE__ */ e("div", { className: "fixed bottom-4 right-4 z-50 w-[360px]", children: /* @__PURE__ */ e(
|
|
3342
3343
|
Gr,
|
|
3343
3344
|
{
|
|
3344
|
-
title:
|
|
3345
|
-
durationSeconds:
|
|
3345
|
+
title: Z.run.status === "SUCCESS" ? `${Z.briefing.name} is ready` : `${Z.briefing.name} run failed`,
|
|
3346
|
+
durationSeconds: Z.run.startedAt && Z.run.completedAt ? Math.max(
|
|
3346
3347
|
0,
|
|
3347
3348
|
Math.floor(
|
|
3348
|
-
(new Date(
|
|
3349
|
+
(new Date(Z.run.completedAt).getTime() - new Date(Z.run.startedAt).getTime()) / 1e3
|
|
3349
3350
|
)
|
|
3350
3351
|
) : null,
|
|
3351
|
-
status:
|
|
3352
|
+
status: Z.run.status === "SUCCESS" ? "success" : "failed",
|
|
3352
3353
|
onView: () => {
|
|
3353
|
-
V(
|
|
3354
|
+
V(Z.briefing), k("author"), we(null), b(!0);
|
|
3354
3355
|
},
|
|
3355
3356
|
onDismiss: () => we(null)
|
|
3356
3357
|
}
|
|
3357
3358
|
) }) : null,
|
|
3358
3359
|
/* @__PURE__ */ e(
|
|
3359
|
-
|
|
3360
|
+
Ze,
|
|
3360
3361
|
{
|
|
3361
3362
|
open: !!_,
|
|
3362
3363
|
onOpenChange: (w) => {
|
|
3363
3364
|
w || te(null);
|
|
3364
3365
|
},
|
|
3365
|
-
children: /* @__PURE__ */ r(
|
|
3366
|
+
children: /* @__PURE__ */ r(Qe, { children: [
|
|
3366
3367
|
/* @__PURE__ */ r(Je, { children: [
|
|
3367
3368
|
/* @__PURE__ */ r(et, { children: [
|
|
3368
3369
|
"Delete",
|
|
@@ -3400,19 +3401,19 @@ function vn() {
|
|
|
3400
3401
|
return typeof crypto < "u" && typeof crypto.randomUUID == "function" ? crypto.randomUUID() : `briefing-run-now-${Date.now()}-${Math.random().toString(36).slice(2, 8)}`;
|
|
3401
3402
|
}
|
|
3402
3403
|
export {
|
|
3403
|
-
|
|
3404
|
-
|
|
3404
|
+
Pn as A,
|
|
3405
|
+
jn as D,
|
|
3405
3406
|
Ua as E,
|
|
3406
|
-
|
|
3407
|
-
|
|
3408
|
-
|
|
3409
|
-
|
|
3407
|
+
_n as N,
|
|
3408
|
+
Mn as U,
|
|
3409
|
+
Un as V,
|
|
3410
|
+
Za as W,
|
|
3410
3411
|
Oa as a,
|
|
3411
3412
|
Ga as b,
|
|
3412
|
-
|
|
3413
|
+
$n as c,
|
|
3413
3414
|
_a as d,
|
|
3414
3415
|
Pa as e,
|
|
3415
|
-
|
|
3416
|
-
|
|
3417
|
-
|
|
3416
|
+
Rn as f,
|
|
3417
|
+
zn as g,
|
|
3418
|
+
On as u
|
|
3418
3419
|
};
|