react-semaphor 0.1.509 → 0.1.511
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/brand-studio/index.cjs +1 -1
- package/dist/brand-studio/index.js +1 -1
- package/dist/chunks/{dashboard-briefing-launcher-BoXFrqq0.cjs → dashboard-briefing-launcher-BQFNo0jl.cjs} +1 -1
- package/dist/chunks/{dashboard-briefing-launcher-B5AQu-Vb.js → dashboard-briefing-launcher-CKH7Tf1f.js} +103 -103
- package/dist/chunks/{dashboard-controls-gUVkQm8o.cjs → dashboard-controls-ClFLfxq2.cjs} +1 -1
- package/dist/chunks/{dashboard-controls-CKKkSXEX.js → dashboard-controls-DmjRr3rv.js} +130 -130
- package/dist/chunks/{dashboard-json-CAJJquVx.js → dashboard-json-75yKcetl.js} +2 -2
- package/dist/chunks/{dashboard-json-B7fSi6_b.cjs → dashboard-json-DfqjM_p3.cjs} +1 -1
- package/dist/chunks/edit-dashboard-visual-BRSB4-Gg.cjs +172 -0
- package/dist/chunks/{edit-dashboard-visual-DCnbqRRn.js → edit-dashboard-visual-D--Ctlyq.js} +5604 -5597
- package/dist/chunks/{editor-action-buttons-DDA5JGwO.js → editor-action-buttons-DFrdNdTp.js} +27 -27
- package/dist/chunks/{editor-action-buttons-CBQsVYdt.cjs → editor-action-buttons-DxV1NKMw.cjs} +1 -1
- package/dist/chunks/{index-DkEAikW8.cjs → index-Bym8NiEh.cjs} +237 -238
- package/dist/chunks/{index-CL2lvhwk.js → index-bH_soNi5.js} +40505 -40547
- package/dist/chunks/{report-preferences-dialog-Bv2VIOKc.js → report-preferences-dialog-BMkvjfq4.js} +7 -7
- package/dist/chunks/{report-preferences-dialog-Wg9g9fIj.cjs → report-preferences-dialog-BrrpSEMl.cjs} +1 -1
- package/dist/chunks/{switch-iC1x2dcE.cjs → switch-BkcJCTS7.cjs} +14 -14
- package/dist/chunks/{switch-CD4uGTZI.js → switch-CrstROAR.js} +169 -161
- package/dist/dashboard/index.cjs +1 -1
- package/dist/dashboard/index.js +1 -1
- package/dist/data-app-builder/index.cjs +1 -1
- package/dist/data-app-builder/index.js +50 -50
- package/dist/index.cjs +1 -1
- package/dist/index.js +216 -234
- package/dist/style.css +1 -1
- package/dist/surfboard/index.cjs +1 -1
- package/dist/surfboard/index.js +2 -2
- package/dist/types/components/dashboard/dashboard-visual-error-state.d.ts +7 -1
- package/dist/types/components/error-fallbacks/fallback.d.ts +23 -11
- package/dist/types/components/visual/data-table/hooks/use-data-table-logic.d.ts +5 -0
- package/dist/types/lib/dashboard/open-card-in-visual-editor.d.ts +15 -0
- package/dist/types/lib/dashboard-pagination/dashboard-card-pagination.d.ts +24 -0
- package/dist/types/lib/hooks/use-dashboard-card.d.ts +4 -0
- package/dist/types/lib/hooks/use-dashboard-frame-query.d.ts +3 -1
- package/dist/types/lib/query-context/build-dashboard-card-query-contract.d.ts +4 -1
- package/dist/types/lib/query-context/dashboard-card-query-key.d.ts +14 -2
- package/dist/types/lib/stores/dashboard-store.d.ts +4 -0
- package/dist/types/lib/utils/card-loading-state.d.ts +1 -0
- package/package.json +1 -1
- package/dist/chunks/edit-dashboard-visual-AZetLUv1.cjs +0 -172
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx as t, jsxs as r, Fragment as j } from "react/jsx-runtime";
|
|
2
|
-
import Nt, { useState as I, useEffect as Y, useMemo as
|
|
3
|
-
import { B as
|
|
4
|
-
import {
|
|
2
|
+
import Nt, { useState as I, useEffect as Y, useMemo as X, useCallback as H, useLayoutEffect as xt, useRef as ce, useContext as qt } from "react";
|
|
3
|
+
import { B as U, O as Se, Z as et, L as ae, M as St, d as Dt, a4 as O, c as K, K as Kt, u as L, D as me, z as be, aA as kt, az as tt, E as Et, P as Pe, a as Me, b as Oe, aL as Qt, aM as Yt, S as At, aN as Zt, aO as Xt, aP as Jt, aQ as er, aJ as tr } from "./switch-CrstROAR.js";
|
|
4
|
+
import { cl as rt, aG as De, aH as ke, aJ as Ee, ba as It, bY as rr, cm as ar, cn as nr, aY as ge, c9 as Ft, bl as _e, r as sr, n as or, co as ir, aO as at, aR as nt, aS as st, aT as ot, aU as it, aV as lt, aW as dt, aX as Lt, bj as ct, cp as lr, cq as dr, cr as Ye, ca as je, cb as We, cs as Bt, cc as He, bW as q, b0 as cr, bB as ze, ct as ur, bV as hr, aI as ut, aK as ht, cu as mr, aF as pr, b9 as fr, bw as Tt, cv as gr, bZ as br, u as xr, aL as vr, b2 as yr, az as Ge, N as he, aw as mt, as as Ut, at as $e, O as Vt, ar as Cr, ay as wr, R as Rt, cw as Nr, cx as Sr, au as vt, Q as Dr, cy as kr, cz as Er, cA as Ar, cB as Ir, cC as Fr, cD as Lr, cE as Pt, cF as Br, b3 as Tr, cG as Ur, cd as Mt, cH as Vr, cI as Rr, cJ as Ue, cK as Pr, cL as Mr, cM as Or, an as _r, ap as zr, a3 as $r, a2 as jr, a1 as Wr, a0 as Hr, Z as Gr, X as qr, cN as Kr, cO as Qr, cP as Yr, cQ as Zr, cR as Xr, al as Jr, cS as ea, cT as ta, a9 as ra, cU as aa, cV as na, cW as sa } from "./index-bH_soNi5.js";
|
|
5
5
|
import { L as pt } from "./layout-grid-CiubineE.js";
|
|
6
6
|
import { c as qe, X as Ke, C as Ot } from "./x-CXDkqdur.js";
|
|
7
|
-
import { u as ft, V as oa, E as
|
|
7
|
+
import { u as ft, V as oa, E as Ze, a as Xe, b as ia, c as la, L as da, d as ca, e as _t, C as zt, F as ua, f as ha } from "./editor-action-buttons-DFrdNdTp.js";
|
|
8
8
|
import { v as yt, s as ma } from "./card-config-utils-Bq1enstT.js";
|
|
9
9
|
import "./validators-BDYzZFgs.js";
|
|
10
10
|
import "./matrix-operation-contract-xL8IhFzp.js";
|
|
@@ -125,7 +125,7 @@ function Sa({
|
|
|
125
125
|
] })
|
|
126
126
|
] }),
|
|
127
127
|
/* @__PURE__ */ t(
|
|
128
|
-
|
|
128
|
+
U,
|
|
129
129
|
{
|
|
130
130
|
size: "xs",
|
|
131
131
|
variant: "ghost",
|
|
@@ -173,7 +173,7 @@ function Sa({
|
|
|
173
173
|
] }),
|
|
174
174
|
/* @__PURE__ */ r("div", { className: "flex shrink-0 justify-end gap-2 border-t border-border/60 px-4 py-2.5", children: [
|
|
175
175
|
/* @__PURE__ */ t(
|
|
176
|
-
|
|
176
|
+
U,
|
|
177
177
|
{
|
|
178
178
|
size: "xs",
|
|
179
179
|
variant: "outline",
|
|
@@ -183,7 +183,7 @@ function Sa({
|
|
|
183
183
|
}
|
|
184
184
|
),
|
|
185
185
|
/* @__PURE__ */ t(
|
|
186
|
-
|
|
186
|
+
U,
|
|
187
187
|
{
|
|
188
188
|
size: "xs",
|
|
189
189
|
onClick: u,
|
|
@@ -239,7 +239,7 @@ function Kn({
|
|
|
239
239
|
}, w = () => {
|
|
240
240
|
a(!1), C();
|
|
241
241
|
}, { selectVisual: E } = It(), { handleAddLibraryVisual: V, handleEditLibraryVisual: b } = ft(), { isConsoleMode: v } = rr(), {
|
|
242
|
-
resources:
|
|
242
|
+
resources: T,
|
|
243
243
|
isLoading: F,
|
|
244
244
|
isError: G,
|
|
245
245
|
createResource: A,
|
|
@@ -257,7 +257,7 @@ function Kn({
|
|
|
257
257
|
startUpdating: Ae,
|
|
258
258
|
stopUpdating: Ie,
|
|
259
259
|
isUpdating: ie
|
|
260
|
-
} = nr(), W =
|
|
260
|
+
} = nr(), W = T, J = X(() => {
|
|
261
261
|
const y = n.trim().toLowerCase();
|
|
262
262
|
return y ? W.filter(
|
|
263
263
|
(B) => {
|
|
@@ -265,7 +265,7 @@ function Kn({
|
|
|
265
265
|
return ((M = B.title) == null ? void 0 : M.toLowerCase().includes(y)) || ((re = B.description) == null ? void 0 : re.toLowerCase().includes(y)) || ((de = B.kind) == null ? void 0 : de.toLowerCase().includes(y));
|
|
266
266
|
}
|
|
267
267
|
) : W;
|
|
268
|
-
}, [n, W]), le =
|
|
268
|
+
}, [n, W]), le = X(
|
|
269
269
|
() => W.filter(
|
|
270
270
|
(y) => s.has(y.id)
|
|
271
271
|
),
|
|
@@ -281,7 +281,7 @@ function Kn({
|
|
|
281
281
|
), pe = (y) => {
|
|
282
282
|
const B = new Set(s);
|
|
283
283
|
y(B), c(B);
|
|
284
|
-
},
|
|
284
|
+
}, Z = (y) => {
|
|
285
285
|
pe((B) => {
|
|
286
286
|
B.has(y) ? B.delete(y) : B.add(y);
|
|
287
287
|
});
|
|
@@ -387,7 +387,7 @@ function Kn({
|
|
|
387
387
|
] })
|
|
388
388
|
] }),
|
|
389
389
|
/* @__PURE__ */ t(
|
|
390
|
-
|
|
390
|
+
U,
|
|
391
391
|
{
|
|
392
392
|
size: "xs",
|
|
393
393
|
variant: "ghost",
|
|
@@ -414,7 +414,7 @@ function Kn({
|
|
|
414
414
|
)
|
|
415
415
|
] }),
|
|
416
416
|
/* @__PURE__ */ r(
|
|
417
|
-
|
|
417
|
+
U,
|
|
418
418
|
{
|
|
419
419
|
size: "xs",
|
|
420
420
|
variant: "outline",
|
|
@@ -439,7 +439,7 @@ function Kn({
|
|
|
439
439
|
allFilteredSelected: ve,
|
|
440
440
|
someFilteredSelected: ue,
|
|
441
441
|
onSelectAll: ye,
|
|
442
|
-
onToggleSelection:
|
|
442
|
+
onToggleSelection: Z,
|
|
443
443
|
onAddVisual: _,
|
|
444
444
|
onOpenVisual: ne,
|
|
445
445
|
onEditDetails: h,
|
|
@@ -461,7 +461,7 @@ function Kn({
|
|
|
461
461
|
"selected"
|
|
462
462
|
] }),
|
|
463
463
|
/* @__PURE__ */ t(
|
|
464
|
-
|
|
464
|
+
U,
|
|
465
465
|
{
|
|
466
466
|
size: "xs",
|
|
467
467
|
variant: "ghost",
|
|
@@ -470,7 +470,7 @@ function Kn({
|
|
|
470
470
|
}
|
|
471
471
|
),
|
|
472
472
|
/* @__PURE__ */ r(
|
|
473
|
-
|
|
473
|
+
U,
|
|
474
474
|
{
|
|
475
475
|
size: "xs",
|
|
476
476
|
variant: "outline",
|
|
@@ -483,7 +483,7 @@ function Kn({
|
|
|
483
483
|
}
|
|
484
484
|
),
|
|
485
485
|
/* @__PURE__ */ r(
|
|
486
|
-
|
|
486
|
+
U,
|
|
487
487
|
{
|
|
488
488
|
size: "xs",
|
|
489
489
|
variant: "outline",
|
|
@@ -500,7 +500,7 @@ function Kn({
|
|
|
500
500
|
] }) }),
|
|
501
501
|
/* @__PURE__ */ r("div", { className: "flex items-center gap-2", children: [
|
|
502
502
|
/* @__PURE__ */ t(
|
|
503
|
-
|
|
503
|
+
U,
|
|
504
504
|
{
|
|
505
505
|
size: "xs",
|
|
506
506
|
variant: "outline",
|
|
@@ -509,7 +509,7 @@ function Kn({
|
|
|
509
509
|
}
|
|
510
510
|
),
|
|
511
511
|
/* @__PURE__ */ r(
|
|
512
|
-
|
|
512
|
+
U,
|
|
513
513
|
{
|
|
514
514
|
size: "xs",
|
|
515
515
|
onClick: z,
|
|
@@ -754,7 +754,7 @@ function Fa({
|
|
|
754
754
|
onClick: (u) => u.stopPropagation(),
|
|
755
755
|
children: [
|
|
756
756
|
/* @__PURE__ */ t(
|
|
757
|
-
|
|
757
|
+
U,
|
|
758
758
|
{
|
|
759
759
|
size: "xs",
|
|
760
760
|
variant: "ghost",
|
|
@@ -766,7 +766,7 @@ function Fa({
|
|
|
766
766
|
),
|
|
767
767
|
/* @__PURE__ */ r(je, { modal: !1, children: [
|
|
768
768
|
/* @__PURE__ */ t(We, { asChild: !0, children: /* @__PURE__ */ t(
|
|
769
|
-
|
|
769
|
+
U,
|
|
770
770
|
{
|
|
771
771
|
size: "xs",
|
|
772
772
|
variant: "ghost",
|
|
@@ -850,7 +850,7 @@ function Qn(e, a, o = !1) {
|
|
|
850
850
|
xt(() => (L.setState({ checkUnsavedDashboardChanges: c }), () => {
|
|
851
851
|
L.getState().checkUnsavedDashboardChanges === c && L.setState({ checkUnsavedDashboardChanges: null });
|
|
852
852
|
}), [c]);
|
|
853
|
-
const p =
|
|
853
|
+
const p = X(() => !o || a || !n || i && (!e || n.id !== e.id) ? null : {
|
|
854
854
|
dashboardId: n.id,
|
|
855
855
|
dirty: i && e ? Ve(n) !== Ve(e) : !1
|
|
856
856
|
}, [
|
|
@@ -966,7 +966,7 @@ function La({
|
|
|
966
966
|
] }),
|
|
967
967
|
/* @__PURE__ */ r(pr, { children: [
|
|
968
968
|
/* @__PURE__ */ t(
|
|
969
|
-
|
|
969
|
+
U,
|
|
970
970
|
{
|
|
971
971
|
variant: "outline",
|
|
972
972
|
onClick: () => a(!1),
|
|
@@ -974,7 +974,7 @@ function La({
|
|
|
974
974
|
children: "Cancel"
|
|
975
975
|
}
|
|
976
976
|
),
|
|
977
|
-
/* @__PURE__ */ r(
|
|
977
|
+
/* @__PURE__ */ r(U, { onClick: f, disabled: !m || i, children: [
|
|
978
978
|
i && /* @__PURE__ */ t(ae, { className: "mr-2 h-4 w-4 animate-spin" }),
|
|
979
979
|
h.actionLabel
|
|
980
980
|
] })
|
|
@@ -982,7 +982,7 @@ function La({
|
|
|
982
982
|
] }) });
|
|
983
983
|
}
|
|
984
984
|
function Ba() {
|
|
985
|
-
const [e, a] = I(!1), [o, n] = I(!1), [i, s] = I(null), [c, p] = I(null), l = me((b) => b.frame), u = me((b) => b.card), d = fr(), m = L((b) => b.selectedSheetId), h = L((b) => b.dashboard), { getUpdatedFrame: f } = ft(), { selectVisual: g } = It(), { addFrame: k, setSelectedFrameId: x, setIsVisualEditing: D } = be(), S =
|
|
985
|
+
const [e, a] = I(!1), [o, n] = I(!1), [i, s] = I(null), [c, p] = I(null), l = me((b) => b.frame), u = me((b) => b.card), d = fr(), m = L((b) => b.selectedSheetId), h = L((b) => b.dashboard), { getUpdatedFrame: f } = ft(), { selectVisual: g } = It(), { addFrame: k, setSelectedFrameId: x, setIsVisualEditing: D } = be(), S = Tt(), C = !!(l != null && l.visualId), w = (() => {
|
|
986
986
|
var b, v;
|
|
987
987
|
return ((b = l == null ? void 0 : l.cards) == null ? void 0 : b.length) === 1 && ((v = l.cards[0]) != null && v.title) ? l.cards[0].title : d != null && d.title ? d.title : (u == null ? void 0 : u.title) || "Untitled Visual";
|
|
988
988
|
})(), E = gr((b) => {
|
|
@@ -1016,9 +1016,9 @@ function Ba() {
|
|
|
1016
1016
|
O.error("No sheet selected");
|
|
1017
1017
|
return;
|
|
1018
1018
|
}
|
|
1019
|
-
const v = f(),
|
|
1020
|
-
if (
|
|
1021
|
-
O.error(
|
|
1019
|
+
const v = f(), T = kt(v);
|
|
1020
|
+
if (T) {
|
|
1021
|
+
O.error(T);
|
|
1022
1022
|
return;
|
|
1023
1023
|
}
|
|
1024
1024
|
const G = v.cards.length === 1 ? {
|
|
@@ -1083,29 +1083,29 @@ function Ba() {
|
|
|
1083
1083
|
};
|
|
1084
1084
|
}
|
|
1085
1085
|
function Yn(e = {}) {
|
|
1086
|
-
const { isInspectionMode: a } = br(), o = me((A) => A.frame), n = me((A) => A.editorContext), i = xr((A) => A.selectedVisual), s = L((A) => A.selectedFrameId), c = L((A) => A.selectedSheetId), p = L((A) => A.dashboard), { setIsVisualEditing: l, updateFrame: u } = be(), [d, m] = I(!1), [h, f] = I("both"), g =
|
|
1086
|
+
const { isInspectionMode: a } = br(), o = me((A) => A.frame), n = me((A) => A.editorContext), i = xr((A) => A.selectedVisual), s = L((A) => A.selectedFrameId), c = L((A) => A.selectedSheetId), p = L((A) => A.dashboard), { setIsVisualEditing: l, updateFrame: u } = be(), [d, m] = I(!1), [h, f] = I("both"), g = Tt(), k = (n == null ? void 0 : n.type) === "documentSection", x = !!(o != null && o.visualId || i != null && i.id), D = !!(o != null && o.visualId && s), S = x && !D, {
|
|
1087
1087
|
saveAsDialogOpen: C,
|
|
1088
1088
|
setSaveAsDialogOpen: w,
|
|
1089
1089
|
handleSaveAs: E,
|
|
1090
1090
|
isLibraryVisual: V,
|
|
1091
1091
|
currentVisualName: b,
|
|
1092
1092
|
isSaving: v
|
|
1093
|
-
} = Ba(), { getUpdatedFrame:
|
|
1093
|
+
} = Ba(), { getUpdatedFrame: T } = ft();
|
|
1094
1094
|
if (a)
|
|
1095
1095
|
return /* @__PURE__ */ r(j, { children: [
|
|
1096
1096
|
/* @__PURE__ */ t(
|
|
1097
|
-
|
|
1097
|
+
Ze,
|
|
1098
1098
|
{
|
|
1099
1099
|
className: "rounded-control",
|
|
1100
1100
|
variant: "default"
|
|
1101
1101
|
}
|
|
1102
1102
|
),
|
|
1103
|
-
/* @__PURE__ */ t(
|
|
1103
|
+
/* @__PURE__ */ t(Xe, {})
|
|
1104
1104
|
] });
|
|
1105
1105
|
if (k)
|
|
1106
1106
|
return /* @__PURE__ */ r(j, { children: [
|
|
1107
|
-
/* @__PURE__ */ t(
|
|
1108
|
-
/* @__PURE__ */ t(
|
|
1107
|
+
/* @__PURE__ */ t(Ze, { className: "rounded-control", variant: "default" }),
|
|
1108
|
+
/* @__PURE__ */ t(Xe, {})
|
|
1109
1109
|
] });
|
|
1110
1110
|
const F = async () => {
|
|
1111
1111
|
if (!c) {
|
|
@@ -1114,7 +1114,7 @@ function Yn(e = {}) {
|
|
|
1114
1114
|
}
|
|
1115
1115
|
if (d) return;
|
|
1116
1116
|
m(!0);
|
|
1117
|
-
const A =
|
|
1117
|
+
const A = T(), R = kt(A);
|
|
1118
1118
|
if (R) {
|
|
1119
1119
|
m(!1), O.error(R);
|
|
1120
1120
|
return;
|
|
@@ -1144,12 +1144,12 @@ function Yn(e = {}) {
|
|
|
1144
1144
|
};
|
|
1145
1145
|
return /* @__PURE__ */ r(j, { children: [
|
|
1146
1146
|
/* @__PURE__ */ r("div", { className: "inline-flex items-center overflow-hidden rounded-control", children: [
|
|
1147
|
-
!x && /* @__PURE__ */ t(
|
|
1147
|
+
!x && /* @__PURE__ */ t(Ze, { className: "!rounded-none", variant: "default" }),
|
|
1148
1148
|
x && S && /* @__PURE__ */ t(ia, { className: "!rounded-none", variant: "default" }),
|
|
1149
1149
|
x && D && /* @__PURE__ */ t(la, { className: "!rounded-none" }),
|
|
1150
1150
|
/* @__PURE__ */ r(je, { modal: !1, children: [
|
|
1151
1151
|
/* @__PURE__ */ t(We, { asChild: !0, children: /* @__PURE__ */ t(
|
|
1152
|
-
|
|
1152
|
+
U,
|
|
1153
1153
|
{
|
|
1154
1154
|
variant: "default",
|
|
1155
1155
|
size: "xs",
|
|
@@ -1217,7 +1217,7 @@ function Yn(e = {}) {
|
|
|
1217
1217
|
)
|
|
1218
1218
|
] })
|
|
1219
1219
|
] }),
|
|
1220
|
-
/* @__PURE__ */ t(
|
|
1220
|
+
/* @__PURE__ */ t(Xe, {}),
|
|
1221
1221
|
/* @__PURE__ */ t(
|
|
1222
1222
|
La,
|
|
1223
1223
|
{
|
|
@@ -1234,7 +1234,7 @@ function Yn(e = {}) {
|
|
|
1234
1234
|
)
|
|
1235
1235
|
] });
|
|
1236
1236
|
}
|
|
1237
|
-
function
|
|
1237
|
+
function Zn({ className: e }) {
|
|
1238
1238
|
const a = me((d) => d.isDevMode), o = me((d) => d.card.type), n = L((d) => d.isVisualEditing), { setIsDevMode: i } = Et(), { config: s } = qt(vr).tokenProps, c = (s == null ? void 0 : s.showAdvancedMode) !== !1;
|
|
1239
1239
|
if (!n || !c || !ma(o))
|
|
1240
1240
|
return null;
|
|
@@ -1257,7 +1257,7 @@ function Xn({ className: e }) {
|
|
|
1257
1257
|
}
|
|
1258
1258
|
);
|
|
1259
1259
|
}
|
|
1260
|
-
function
|
|
1260
|
+
function Xn({
|
|
1261
1261
|
open: e,
|
|
1262
1262
|
onOpenChange: a,
|
|
1263
1263
|
onSave: o,
|
|
@@ -1278,7 +1278,7 @@ function Zn({
|
|
|
1278
1278
|
] }),
|
|
1279
1279
|
/* @__PURE__ */ r(lt, { children: [
|
|
1280
1280
|
/* @__PURE__ */ t(
|
|
1281
|
-
|
|
1281
|
+
U,
|
|
1282
1282
|
{
|
|
1283
1283
|
type: "button",
|
|
1284
1284
|
size: "xs",
|
|
@@ -1290,7 +1290,7 @@ function Zn({
|
|
|
1290
1290
|
}
|
|
1291
1291
|
),
|
|
1292
1292
|
/* @__PURE__ */ t(dt, { disabled: i, children: p }),
|
|
1293
|
-
/* @__PURE__ */ t(
|
|
1293
|
+
/* @__PURE__ */ t(U, { type: "button", size: "xs", onClick: o, disabled: i, children: i ? /* @__PURE__ */ r(j, { children: [
|
|
1294
1294
|
/* @__PURE__ */ t(ae, { className: "mr-2 h-3.5 w-3.5 animate-spin" }),
|
|
1295
1295
|
"Saving..."
|
|
1296
1296
|
] }) : u })
|
|
@@ -1314,10 +1314,10 @@ function bt(e, a) {
|
|
|
1314
1314
|
downloadUrl: a
|
|
1315
1315
|
};
|
|
1316
1316
|
}
|
|
1317
|
-
const
|
|
1317
|
+
const Ta = 1e4, Ua = 15e3, Va = 3e4, Ra = 3e4, Pa = 12e4, Ct = 2 * 60 * 60 * 1e3;
|
|
1318
1318
|
function Ma(e) {
|
|
1319
1319
|
const a = Date.now() - e.getTime();
|
|
1320
|
-
return a < Ra ?
|
|
1320
|
+
return a < Ra ? Ta : a < Pa ? Ua : Va;
|
|
1321
1321
|
}
|
|
1322
1322
|
function Jn() {
|
|
1323
1323
|
const { authToken: e, tokenProps: a } = Ge(), o = he((h) => h.activeExports), [n, i] = I(
|
|
@@ -1369,7 +1369,7 @@ function Jn() {
|
|
|
1369
1369
|
const x = await Promise.allSettled(
|
|
1370
1370
|
k.map(async (C) => {
|
|
1371
1371
|
try {
|
|
1372
|
-
const w = await
|
|
1372
|
+
const w = await Ut(l, u, C.id);
|
|
1373
1373
|
let E;
|
|
1374
1374
|
if (w.status === "completed")
|
|
1375
1375
|
try {
|
|
@@ -1518,7 +1518,7 @@ function _a({
|
|
|
1518
1518
|
}
|
|
1519
1519
|
),
|
|
1520
1520
|
/* @__PURE__ */ t(
|
|
1521
|
-
|
|
1521
|
+
U,
|
|
1522
1522
|
{
|
|
1523
1523
|
variant: "ghost",
|
|
1524
1524
|
size: "xs",
|
|
@@ -1580,7 +1580,7 @@ function za() {
|
|
|
1580
1580
|
await Promise.all(
|
|
1581
1581
|
S.map(async (C) => {
|
|
1582
1582
|
try {
|
|
1583
|
-
const w = await
|
|
1583
|
+
const w = await Ut(x, D, C.id);
|
|
1584
1584
|
let E;
|
|
1585
1585
|
if (w.status === "completed")
|
|
1586
1586
|
try {
|
|
@@ -1669,7 +1669,7 @@ function za() {
|
|
|
1669
1669
|
/* @__PURE__ */ t("span", { className: "text-[10px] tabular-nums text-muted-foreground/70", children: d.length }),
|
|
1670
1670
|
/* @__PURE__ */ r("div", { className: "ml-auto flex items-center gap-0.5", children: [
|
|
1671
1671
|
m && /* @__PURE__ */ t(
|
|
1672
|
-
|
|
1672
|
+
U,
|
|
1673
1673
|
{
|
|
1674
1674
|
variant: "ghost",
|
|
1675
1675
|
size: "xs",
|
|
@@ -1680,7 +1680,7 @@ function za() {
|
|
|
1680
1680
|
}
|
|
1681
1681
|
),
|
|
1682
1682
|
/* @__PURE__ */ t(
|
|
1683
|
-
|
|
1683
|
+
U,
|
|
1684
1684
|
{
|
|
1685
1685
|
variant: "ghost",
|
|
1686
1686
|
size: "xs",
|
|
@@ -1719,7 +1719,7 @@ function ts({
|
|
|
1719
1719
|
), c = o > 0 ? o > 9 ? "9+" : String(o) : null;
|
|
1720
1720
|
return /* @__PURE__ */ r(Pe, { children: [
|
|
1721
1721
|
/* @__PURE__ */ t(Me, { asChild: !0, children: /* @__PURE__ */ r(
|
|
1722
|
-
|
|
1722
|
+
U,
|
|
1723
1723
|
{
|
|
1724
1724
|
variant: e ?? "ghost",
|
|
1725
1725
|
size: "xs",
|
|
@@ -1777,13 +1777,13 @@ function ja({
|
|
|
1777
1777
|
}), h = L((v) => v.dashboard), { setDashboardControlsModel: f } = be(), { participants: g } = Er(Qt(h)), k = Array.from(
|
|
1778
1778
|
new Map(
|
|
1779
1779
|
g.flatMap(
|
|
1780
|
-
(v) => v.fieldChoices.map((
|
|
1780
|
+
(v) => v.fieldChoices.map((T) => {
|
|
1781
1781
|
var F;
|
|
1782
1782
|
return [
|
|
1783
|
-
|
|
1783
|
+
T.value,
|
|
1784
1784
|
{
|
|
1785
|
-
option:
|
|
1786
|
-
target: (F = v.fieldTargetMap) == null ? void 0 : F[
|
|
1785
|
+
option: T,
|
|
1786
|
+
target: (F = v.fieldTargetMap) == null ? void 0 : F[T.value]
|
|
1787
1787
|
}
|
|
1788
1788
|
];
|
|
1789
1789
|
})
|
|
@@ -1792,13 +1792,13 @@ function ja({
|
|
|
1792
1792
|
), x = Array.from(
|
|
1793
1793
|
new Map(
|
|
1794
1794
|
g.flatMap(
|
|
1795
|
-
(v) => v.metricChoices.map((
|
|
1795
|
+
(v) => v.metricChoices.map((T) => {
|
|
1796
1796
|
var F;
|
|
1797
1797
|
return [
|
|
1798
|
-
|
|
1798
|
+
T.value,
|
|
1799
1799
|
{
|
|
1800
|
-
option:
|
|
1801
|
-
target: (F = v.metricTargetMap) == null ? void 0 : F[
|
|
1800
|
+
option: T,
|
|
1801
|
+
target: (F = v.metricTargetMap) == null ? void 0 : F[T.value]
|
|
1802
1802
|
}
|
|
1803
1803
|
];
|
|
1804
1804
|
})
|
|
@@ -1807,10 +1807,10 @@ function ja({
|
|
|
1807
1807
|
), D = Yt({
|
|
1808
1808
|
...h || {},
|
|
1809
1809
|
controls: []
|
|
1810
|
-
}), S = Ar(h), C = (v,
|
|
1810
|
+
}), S = Ar(h), C = (v, T, F) => {
|
|
1811
1811
|
f(
|
|
1812
1812
|
v,
|
|
1813
|
-
|
|
1813
|
+
T,
|
|
1814
1814
|
$a(F)
|
|
1815
1815
|
);
|
|
1816
1816
|
}, w = H(() => {
|
|
@@ -1845,7 +1845,7 @@ function ja({
|
|
|
1845
1845
|
E
|
|
1846
1846
|
] });
|
|
1847
1847
|
return n ? /* @__PURE__ */ r(Pe, { open: d, onOpenChange: p, children: [
|
|
1848
|
-
/* @__PURE__ */ t(Me, { asChild: !0, children: o || /* @__PURE__ */ r(
|
|
1848
|
+
/* @__PURE__ */ t(Me, { asChild: !0, children: o || /* @__PURE__ */ r(U, { variant: "outline", className: "h-7 px-2", size: "sm", children: [
|
|
1849
1849
|
/* @__PURE__ */ t(At, { className: "mr-2 h-4 w-4" }),
|
|
1850
1850
|
"Controls"
|
|
1851
1851
|
] }) }),
|
|
@@ -1915,21 +1915,21 @@ function Ha({
|
|
|
1915
1915
|
dismissMode: "explicit-only"
|
|
1916
1916
|
}), d = L((v) => v.dashboard), m = L((v) => v.selectedSheetId), { setDashboardInputs: h } = be(), f = (b = d.sheets) == null ? void 0 : b.find(
|
|
1917
1917
|
(v) => v.id === m
|
|
1918
|
-
), g = (f == null ? void 0 : f.kind) === "document" && !!f.document, k =
|
|
1918
|
+
), g = (f == null ? void 0 : f.kind) === "document" && !!f.document, k = X(
|
|
1919
1919
|
() => g && (f != null && f.document) ? Fr(d, f.id) : [],
|
|
1920
1920
|
[d, g, f == null ? void 0 : f.document, f == null ? void 0 : f.id]
|
|
1921
|
-
), x =
|
|
1921
|
+
), x = X(
|
|
1922
1922
|
() => k.filter(
|
|
1923
1923
|
(v) => v.kind === "control"
|
|
1924
1924
|
),
|
|
1925
1925
|
[k]
|
|
1926
|
-
), D =
|
|
1926
|
+
), D = X(
|
|
1927
1927
|
() => x.map((v) => v.control),
|
|
1928
1928
|
[x]
|
|
1929
|
-
), S =
|
|
1929
|
+
), S = X(
|
|
1930
1930
|
() => qa(D),
|
|
1931
1931
|
[D]
|
|
1932
|
-
), C =
|
|
1932
|
+
), C = X(
|
|
1933
1933
|
() => Ga(d),
|
|
1934
1934
|
[d]
|
|
1935
1935
|
), w = H(() => {
|
|
@@ -1939,14 +1939,14 @@ function Ha({
|
|
|
1939
1939
|
}
|
|
1940
1940
|
u(!1);
|
|
1941
1941
|
}, [n, i, u]), E = H(
|
|
1942
|
-
(v,
|
|
1942
|
+
(v, T, F) => {
|
|
1943
1943
|
!g || !(f != null && f.document) || h(
|
|
1944
1944
|
Qa({
|
|
1945
1945
|
allInputs: d.inputs || [],
|
|
1946
1946
|
documentSheetId: f.id,
|
|
1947
1947
|
currentDocumentInputs: k,
|
|
1948
1948
|
nextControls: v,
|
|
1949
|
-
nextDefaultValues:
|
|
1949
|
+
nextDefaultValues: T,
|
|
1950
1950
|
change: F
|
|
1951
1951
|
})
|
|
1952
1952
|
);
|
|
@@ -2038,7 +2038,7 @@ function Qa({
|
|
|
2038
2038
|
if (!f)
|
|
2039
2039
|
continue;
|
|
2040
2040
|
l.add(f.id);
|
|
2041
|
-
const g =
|
|
2041
|
+
const g = Zt(
|
|
2042
2042
|
f.id,
|
|
2043
2043
|
[...e, ...u].filter(
|
|
2044
2044
|
(x) => x.id !== h.id
|
|
@@ -2094,7 +2094,7 @@ function Ya({
|
|
|
2094
2094
|
children: [
|
|
2095
2095
|
/* @__PURE__ */ r(Pe, { open: e, onOpenChange: a, children: [
|
|
2096
2096
|
/* @__PURE__ */ t(Me, { asChild: !0, children: /* @__PURE__ */ r(
|
|
2097
|
-
|
|
2097
|
+
U,
|
|
2098
2098
|
{
|
|
2099
2099
|
variant: "ghost",
|
|
2100
2100
|
size: "xs",
|
|
@@ -2124,7 +2124,7 @@ function Ya({
|
|
|
2124
2124
|
] }),
|
|
2125
2125
|
/* @__PURE__ */ r(Pe, { open: m, onOpenChange: h, children: [
|
|
2126
2126
|
/* @__PURE__ */ t(Me, { asChild: !0, children: /* @__PURE__ */ t(
|
|
2127
|
-
|
|
2127
|
+
U,
|
|
2128
2128
|
{
|
|
2129
2129
|
variant: "ghost",
|
|
2130
2130
|
size: "xs",
|
|
@@ -2154,7 +2154,7 @@ function Ya({
|
|
|
2154
2154
|
}
|
|
2155
2155
|
);
|
|
2156
2156
|
}
|
|
2157
|
-
function
|
|
2157
|
+
function Za() {
|
|
2158
2158
|
ha();
|
|
2159
2159
|
const e = L((l) => l.selectedSheetId), a = L((l) => l.selectedFrameId), o = L((l) => l.dashboard), n = L((l) => l.actions.getSelectedFrame), { setSelectedFrameId: i } = be(), { setCard: s } = Et(), c = me((l) => l.card.dataSource);
|
|
2160
2160
|
return Y(() => {
|
|
@@ -2172,11 +2172,11 @@ function Xa() {
|
|
|
2172
2172
|
hasEntities: !!(c != null && c.selectedEntities && c.selectedEntities.length > 0)
|
|
2173
2173
|
};
|
|
2174
2174
|
}
|
|
2175
|
-
function
|
|
2175
|
+
function Xa() {
|
|
2176
2176
|
const e = L((l) => l.dashboard), a = L(
|
|
2177
2177
|
(l) => l.semanticExecutionPayload
|
|
2178
|
-
), o = L((l) => l.actions.addFilter), { hasEntities: n } =
|
|
2179
|
-
() =>
|
|
2178
|
+
), o = L((l) => l.actions.addFilter), { hasEntities: n } = Za(), { isLoading: i } = Br(), s = X(
|
|
2179
|
+
() => Xt(e, a),
|
|
2180
2180
|
[e, a]
|
|
2181
2181
|
), p = !Jt(e.filters) && s.hasEligibleCards && !i;
|
|
2182
2182
|
return /* @__PURE__ */ r("div", { className: "flex h-[520px] w-[400px] flex-col", children: [
|
|
@@ -2197,11 +2197,11 @@ function Za() {
|
|
|
2197
2197
|
}
|
|
2198
2198
|
) }),
|
|
2199
2199
|
!n && /* @__PURE__ */ r("div", { className: "flex flex-1 flex-col items-center justify-center px-6 py-8 text-center", children: [
|
|
2200
|
-
/* @__PURE__ */ t(
|
|
2200
|
+
/* @__PURE__ */ t(Tr, { className: "mb-3 h-10 w-10 text-muted-foreground/50" }),
|
|
2201
2201
|
/* @__PURE__ */ t("h3", { className: "mb-1 text-[13px] font-medium text-foreground", children: "No fields configured" }),
|
|
2202
2202
|
/* @__PURE__ */ t("p", { className: "text-[11px] text-muted-foreground", children: "Configure a data source for this card to enable filtering." })
|
|
2203
2203
|
] }),
|
|
2204
|
-
n && /* @__PURE__ */ t("div", { className: "flex flex-1 overflow-hidden", children: /* @__PURE__ */ t(
|
|
2204
|
+
n && /* @__PURE__ */ t("div", { className: "flex flex-1 overflow-hidden", children: /* @__PURE__ */ t(Ur, { context: "filter" }) })
|
|
2205
2205
|
] });
|
|
2206
2206
|
}
|
|
2207
2207
|
const wt = !1;
|
|
@@ -2345,7 +2345,7 @@ function rs({
|
|
|
2345
2345
|
{
|
|
2346
2346
|
showFilters: x ? !1 : d,
|
|
2347
2347
|
onShowFiltersChange: S,
|
|
2348
|
-
pickerContent: /* @__PURE__ */ t(
|
|
2348
|
+
pickerContent: /* @__PURE__ */ t(Xa, {}),
|
|
2349
2349
|
settingsContent: (b) => /* @__PURE__ */ t(
|
|
2350
2350
|
Ja,
|
|
2351
2351
|
{
|
|
@@ -2393,7 +2393,7 @@ function tn({
|
|
|
2393
2393
|
}) {
|
|
2394
2394
|
const i = typeof a == "number" && a > 0;
|
|
2395
2395
|
return /* @__PURE__ */ r(
|
|
2396
|
-
|
|
2396
|
+
U,
|
|
2397
2397
|
{
|
|
2398
2398
|
type: "button",
|
|
2399
2399
|
size: "xs",
|
|
@@ -2500,7 +2500,7 @@ function cn({
|
|
|
2500
2500
|
contentKind: S,
|
|
2501
2501
|
hideHeader: C = !1
|
|
2502
2502
|
}) {
|
|
2503
|
-
const w = e.length, E = e.filter((F) => F.status === "ACTIVE").length, V = S === "reports" ? w === 1 ? "report" : "reports" : S === "briefings" ? w === 1 ? "briefing" : "briefings" : w === 1 ? "item" : "items", b = e.find((F) => F.hasActiveRun) ?? null, v = S ?? "reports & briefings",
|
|
2503
|
+
const w = e.length, E = e.filter((F) => F.status === "ACTIVE").length, V = S === "reports" ? w === 1 ? "report" : "reports" : S === "briefings" ? w === 1 ? "briefing" : "briefings" : w === 1 ? "item" : "items", b = e.find((F) => F.hasActiveRun) ?? null, v = S ?? "reports & briefings", T = o === "dashboard" ? a : `Project ${v}`;
|
|
2504
2504
|
return /* @__PURE__ */ r(
|
|
2505
2505
|
"section",
|
|
2506
2506
|
{
|
|
@@ -2510,7 +2510,7 @@ function cn({
|
|
|
2510
2510
|
C ? null : /* @__PURE__ */ r("header", { className: "flex items-start justify-between gap-3 border-b border-border px-4 py-3", children: [
|
|
2511
2511
|
/* @__PURE__ */ r("div", { className: "min-w-0", children: [
|
|
2512
2512
|
/* @__PURE__ */ t("div", { className: rn, children: v }),
|
|
2513
|
-
/* @__PURE__ */ t("h2", { className: "mt-0.5 truncate text-[14px] font-semibold leading-5", children:
|
|
2513
|
+
/* @__PURE__ */ t("h2", { className: "mt-0.5 truncate text-[14px] font-semibold leading-5", children: T })
|
|
2514
2514
|
] }),
|
|
2515
2515
|
/* @__PURE__ */ t(
|
|
2516
2516
|
"button",
|
|
@@ -2873,7 +2873,7 @@ function mn({
|
|
|
2873
2873
|
onTogglePause: s,
|
|
2874
2874
|
onDelete: c
|
|
2875
2875
|
}) {
|
|
2876
|
-
const p = e.status === "PAUSED", l = e.hasActiveRun, u = on(e), d = nn(e.lastRunAt), m = e.lastRunStatus, h = se(e), f = m === "SUCCESS" ?
|
|
2876
|
+
const p = e.status === "PAUSED", l = e.hasActiveRun, u = on(e), d = nn(e.lastRunAt), m = e.lastRunStatus, h = se(e), f = m === "SUCCESS" ? Ue.success.dot : m === "FAILED" ? Ue.danger.dot : m ? Ue.warning.dot : Ue.neutral.dot;
|
|
2877
2877
|
return /* @__PURE__ */ r(
|
|
2878
2878
|
"div",
|
|
2879
2879
|
{
|
|
@@ -3082,18 +3082,18 @@ function wn({
|
|
|
3082
3082
|
d ? "author" : "list"
|
|
3083
3083
|
), [V, b] = I(
|
|
3084
3084
|
d ?? "analytical_briefing"
|
|
3085
|
-
), [v,
|
|
3085
|
+
), [v, T] = I("dashboard"), [F, G] = I(
|
|
3086
3086
|
[]
|
|
3087
3087
|
), [A, R] = I(null), $ = d && !k && !A ? "list" : w, [xe, te] = I(!1), [oe, Ae] = I(null), [Ie, ie] = I(null), [W, J] = I(
|
|
3088
3088
|
null
|
|
3089
3089
|
), [le, ee] = I(null), Fe = ce(null), ve = ce(S);
|
|
3090
3090
|
Y(() => {
|
|
3091
3091
|
const N = S && !ve.current;
|
|
3092
|
-
ve.current = S, !(!N || !d) && (R(null),
|
|
3092
|
+
ve.current = S, !(!N || !d) && (R(null), T("dashboard"), b(d), E("author"), ee(null));
|
|
3093
3093
|
}, [S, d]);
|
|
3094
3094
|
const [ue, pe] = I(
|
|
3095
3095
|
null
|
|
3096
|
-
), [
|
|
3096
|
+
), [Z, ye] = I(null), _ = o ?? (f == null ? void 0 : f.apiServiceUrl), z = n ?? (h == null ? void 0 : h.accessToken), ne = X(() => ({ ...yn, ...m }), [m]), fe = gn(a), Le = X(() => {
|
|
3097
3097
|
const N = xn(
|
|
3098
3098
|
F,
|
|
3099
3099
|
v,
|
|
@@ -3105,7 +3105,7 @@ function wn({
|
|
|
3105
3105
|
return N.filter(
|
|
3106
3106
|
(Be) => se(Be).noun === P
|
|
3107
3107
|
);
|
|
3108
|
-
}, [e, F, v, d]), Qe =
|
|
3108
|
+
}, [e, F, v, d]), Qe = X(() => v === "dashboard" ? {
|
|
3109
3109
|
source: { type: "dashboard", dashboardId: e },
|
|
3110
3110
|
label: fe,
|
|
3111
3111
|
detail: bn(fe)
|
|
@@ -3141,7 +3141,7 @@ function wn({
|
|
|
3141
3141
|
!S || $ !== "list" || !Ce || Q();
|
|
3142
3142
|
}, [Ce, $, Q, S]);
|
|
3143
3143
|
const Ne = () => {
|
|
3144
|
-
R(null),
|
|
3144
|
+
R(null), T("dashboard"), E("list"), C(!0);
|
|
3145
3145
|
}, y = (N) => {
|
|
3146
3146
|
R(null), b(N), E("author");
|
|
3147
3147
|
}, B = async (N) => {
|
|
@@ -3185,7 +3185,7 @@ function wn({
|
|
|
3185
3185
|
const { noun: P } = se(N), Be = P === "report" ? "Report" : "Briefing";
|
|
3186
3186
|
ie(N.id);
|
|
3187
3187
|
try {
|
|
3188
|
-
const
|
|
3188
|
+
const Te = N.status === "PAUSED" ? await ne.resumeBriefing(
|
|
3189
3189
|
_,
|
|
3190
3190
|
z,
|
|
3191
3191
|
N.id
|
|
@@ -3195,11 +3195,11 @@ function wn({
|
|
|
3195
3195
|
N.id
|
|
3196
3196
|
);
|
|
3197
3197
|
O.success(
|
|
3198
|
-
|
|
3198
|
+
Te.briefing.status === "PAUSED" ? `${Be} paused` : `${Be} resumed`
|
|
3199
3199
|
), Q();
|
|
3200
|
-
} catch (
|
|
3200
|
+
} catch (Te) {
|
|
3201
3201
|
O.error(
|
|
3202
|
-
|
|
3202
|
+
Te instanceof Error ? Te.message : `Could not update the ${P} status.`
|
|
3203
3203
|
);
|
|
3204
3204
|
} finally {
|
|
3205
3205
|
ie(null);
|
|
@@ -3247,8 +3247,8 @@ function wn({
|
|
|
3247
3247
|
},
|
|
3248
3248
|
children: [
|
|
3249
3249
|
/* @__PURE__ */ r(Yr, { className: "sr-only", children: [
|
|
3250
|
-
/* @__PURE__ */ t(
|
|
3251
|
-
/* @__PURE__ */ t(
|
|
3250
|
+
/* @__PURE__ */ t(Zr, { children: "Reports & briefings" }),
|
|
3251
|
+
/* @__PURE__ */ t(Xr, { children: "Manage reports and briefings for this dashboard." })
|
|
3252
3252
|
] }),
|
|
3253
3253
|
d ? /* @__PURE__ */ r("div", { className: "flex shrink-0 items-start justify-between gap-3 border-b border-border pl-4 pr-3 pt-2", children: [
|
|
3254
3254
|
/* @__PURE__ */ r(
|
|
@@ -3271,7 +3271,7 @@ function wn({
|
|
|
3271
3271
|
!k && "cursor-not-allowed opacity-50"
|
|
3272
3272
|
),
|
|
3273
3273
|
onClick: () => {
|
|
3274
|
-
k && (R(null), b(d),
|
|
3274
|
+
k && (R(null), b(d), T("dashboard"), E("author"));
|
|
3275
3275
|
},
|
|
3276
3276
|
children: A ? `Edit ${se(A).noun}` : d === "scheduled_report" ? "Schedule report" : "Create briefing"
|
|
3277
3277
|
}
|
|
@@ -3312,7 +3312,7 @@ function wn({
|
|
|
3312
3312
|
sourceView: v,
|
|
3313
3313
|
error: le,
|
|
3314
3314
|
loading: xe,
|
|
3315
|
-
onSourceViewChange:
|
|
3315
|
+
onSourceViewChange: T,
|
|
3316
3316
|
onClose: () => C(!1),
|
|
3317
3317
|
onEdit: (N) => {
|
|
3318
3318
|
B(N);
|
|
@@ -3389,19 +3389,19 @@ function wn({
|
|
|
3389
3389
|
}
|
|
3390
3390
|
}
|
|
3391
3391
|
) : null,
|
|
3392
|
-
|
|
3392
|
+
Z ? /* @__PURE__ */ t("div", { className: "fixed bottom-4 right-4 z-50 w-[360px]", children: /* @__PURE__ */ t(
|
|
3393
3393
|
ea,
|
|
3394
3394
|
{
|
|
3395
|
-
title:
|
|
3396
|
-
durationSeconds:
|
|
3395
|
+
title: Z.run.status === "SUCCESS" ? `${Z.briefing.name} is ready` : `${Z.briefing.name} run failed`,
|
|
3396
|
+
durationSeconds: Z.run.startedAt && Z.run.completedAt ? Math.max(
|
|
3397
3397
|
0,
|
|
3398
3398
|
Math.floor(
|
|
3399
|
-
(new Date(
|
|
3399
|
+
(new Date(Z.run.completedAt).getTime() - new Date(Z.run.startedAt).getTime()) / 1e3
|
|
3400
3400
|
)
|
|
3401
3401
|
) : null,
|
|
3402
|
-
status:
|
|
3402
|
+
status: Z.run.status === "SUCCESS" ? "success" : "failed",
|
|
3403
3403
|
onView: () => {
|
|
3404
|
-
R(
|
|
3404
|
+
R(Z.briefing), E("author"), ye(null), C(!0);
|
|
3405
3405
|
},
|
|
3406
3406
|
onDismiss: () => ye(null)
|
|
3407
3407
|
}
|
|
@@ -3451,11 +3451,11 @@ function Nn() {
|
|
|
3451
3451
|
return typeof crypto < "u" && typeof crypto.randomUUID == "function" ? crypto.randomUUID() : `briefing-run-now-${Date.now()}-${Math.random().toString(36).slice(2, 8)}`;
|
|
3452
3452
|
}
|
|
3453
3453
|
export {
|
|
3454
|
-
|
|
3454
|
+
Zn as A,
|
|
3455
3455
|
ja as D,
|
|
3456
3456
|
za as E,
|
|
3457
3457
|
ts as N,
|
|
3458
|
-
|
|
3458
|
+
Xn as U,
|
|
3459
3459
|
Kn as V,
|
|
3460
3460
|
tn as W,
|
|
3461
3461
|
Yn as a,
|