react-semaphor 0.1.375 → 0.1.376
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 +2 -7
- package/dist/brand-studio/index.js +94 -106
- package/dist/chunks/{calendar-preferences-dialog-DXgi7q5u.js → calendar-preferences-dialog-B6fsethx.js} +3 -3
- package/dist/chunks/{calendar-preferences-dialog-CsRzDpDs.js → calendar-preferences-dialog-Dh1b0ytN.js} +1 -1
- package/dist/chunks/{chevrons-up-down-CnCSGY02.js → chevrons-up-down-D2fZD4N_.js} +1 -1
- package/dist/chunks/{chevrons-up-down-DSvLu4Ye.js → chevrons-up-down-lahj6tQy.js} +1 -1
- package/dist/chunks/{dashboard-briefing-launcher-Jwbmrcl_.js → dashboard-briefing-launcher-BKCRO7Qw.js} +597 -589
- package/dist/chunks/{dashboard-briefing-launcher-C-G6vQTL.js → dashboard-briefing-launcher-Gv1cwT0I.js} +13 -8
- package/dist/chunks/dashboard-controls-BDJZarV7.js +52 -0
- package/dist/chunks/dashboard-controls-CchLBVDv.js +3037 -0
- package/dist/chunks/{dashboard-json-Cl1O3uh0.js → dashboard-json-QT0T2ad_.js} +2 -2
- package/dist/chunks/{dashboard-json-CvPhMpbM.js → dashboard-json-ZhIEMXN0.js} +1 -1
- package/dist/chunks/edit-dashboard-visual-DNzPgXMh.js +178 -0
- package/dist/chunks/{edit-dashboard-visual-B_0sbc43.js → edit-dashboard-visual-kNoMQRmH.js} +4413 -4330
- package/dist/chunks/{index-BIks0ktd.js → index-CPpqPJba.js} +186 -181
- package/dist/chunks/{index-BSkBy5cH.js → index-DX_0OcRv.js} +22824 -22664
- package/dist/chunks/layout-grid-BOTLt36V.js +36 -0
- package/dist/chunks/layout-grid-CS6BSCJF.js +11 -0
- package/dist/chunks/{palette-D-f4-82S.js → palette-2HWSR5wb.js} +1 -1
- package/dist/chunks/{palette-DUGktM-M.js → palette-BcHHAmOU.js} +1 -1
- package/dist/chunks/{save-kkBEBeLg.js → save-B-YfAPhu.js} +1 -1
- package/dist/chunks/{save-D3YYinDz.js → save-MoF1T13_.js} +1 -1
- package/dist/chunks/switch-CmHP5dT7.js +168 -0
- package/dist/chunks/{switch-Dkx2qEOr.js → switch-DmE_MY3L.js} +2001 -1982
- package/dist/chunks/use-create-flow-overlay-state-BLPQgGuz.js +21 -0
- package/dist/chunks/use-create-flow-overlay-state-D_Ntx-_C.js +1967 -0
- package/dist/dashboard/index.cjs +1 -1
- package/dist/dashboard/index.js +1 -1
- package/dist/data-app-builder/index.cjs +18 -13
- package/dist/data-app-builder/index.js +141 -131
- package/dist/index.cjs +1 -1
- package/dist/index.js +61 -63
- package/dist/style.css +1 -1
- package/dist/surfboard/index.cjs +1 -1
- package/dist/surfboard/index.js +2 -2
- package/dist/types/main.d.ts +1 -12
- package/package.json +1 -1
- package/dist/chunks/braces-C3-w6xDL.js +0 -6
- package/dist/chunks/braces-C8QqW4wu.js +0 -23
- package/dist/chunks/dashboard-controls-DzGGNQxv.js +0 -2269
- package/dist/chunks/dashboard-controls-p7VKzWSb.js +0 -57
- package/dist/chunks/edit-dashboard-visual-CSrdS10O.js +0 -178
- package/dist/chunks/resource-management-panel-IHbUOh2g.js +0 -6
- package/dist/chunks/resource-management-panel-tFjbtgPw.js +0 -1018
- package/dist/chunks/switch-fIkmwzUt.js +0 -168
- package/dist/chunks/use-create-flow-overlay-state-D-yGZTR3.js +0 -1647
- package/dist/chunks/use-create-flow-overlay-state-DbaUD5xc.js +0 -26
- package/dist/chunks/use-visual-utils-B5hwU_av.js +0 -1
- package/dist/chunks/use-visual-utils-Dj82r7DA.js +0 -340
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { jsx as t, jsxs as s, Fragment as se } from "react/jsx-runtime";
|
|
2
|
-
import { c as
|
|
3
|
-
import { b as ut, c as mt, d as ht, e as pt, f as ft,
|
|
4
|
-
import { V as Ci, E as Or, a as Vr, b as ki, c as Si, L as Ai, d as Ei,
|
|
5
|
-
import
|
|
6
|
-
import { u as Ha } from "./use-visual-utils-Dj82r7DA.js";
|
|
2
|
+
import { c as ke, L as wn, a0 as io, B as ge, f as ne, G as ct, u as H, E as bt, aI as Fr, a9 as ba, g as ze, e as qe, H as xa, a as v, S as Fn, X as Ce, P as Re, b as tt, d as nt, aJ as lo, aK as co, aG as ya, aL as va, a1 as Qe, a2 as Ye, a3 as Xe, a4 as Ze, a5 as he, O as uo, aM as Na, aN as wa, _ as et, T as mo, I as ho, J as Pr, aO as po } from "./switch-DmE_MY3L.js";
|
|
3
|
+
import { b as ut, c as mt, d as ht, e as pt, f as ft, bX as fo, n as Ca, aM as go, aN as bo, aU as ka, bY as xo, o as fe, aV as Cn, x as yo, bB as Pn, bC as Mn, bE as Bn, bF as je, b9 as Sa, aq as qt, ad as vo, aw as No, ag as On, aj as Vn, ak as $n, al as Un, am as _n, an as jn, ao as zn, u as It, $ as ot, aa as qn, a6 as Aa, a7 as Hn, a0 as Ea, a5 as wo, ac as Co, bS as ko, bZ as So, b5 as Ao, a8 as Mr, w as Vt, a2 as Eo, b_ as Io, b$ as Do, c0 as To, c1 as Lo, c2 as Ro, c3 as Fo, c4 as Po, c5 as Mo, c6 as Ia, c7 as Bo, c8 as Oo, c9 as Vo, ca as $o, cb as Uo, ay as gt, cc as _o, bQ as Da, aW as Ta, cd as jo, ce as zo, cf as qo, cg as Ho, ch as Ko, ci as Wo, cj as Go, ck as La, cl as Jo, cm as Qo, cn as Ra, co as Fa, cp as Pa, cq as Yo, cr as Xo, bf as Ma, bq as Zo, bn as ei, cs as ti, bG as ni, av as Ba, ct as ri, cu as ai, bs as Br, cv as si, cw as oi, cx as kn, cy as ii, cz as li, cA as Oa, cB as Kn, cC as di, cD as ci, cE as ui, cF as Va, cG as Dt, bD as $a, aX as Sn, ap as Ua, cH as mi, cI as hi, ax as An, cJ as pi, cK as _a, ar as fi, cL as gi, cM as bi, cN as xi, cO as yi, cP as vi, cQ as Ni, cR as wi } from "./index-DX_0OcRv.js";
|
|
4
|
+
import { V as Ci, u as ja, E as Or, a as Vr, b as ki, c as Si, L as Ai, d as Ei, e as za, C as qa, f as Ii, R as Di, S as Ti } from "./use-create-flow-overlay-state-D_Ntx-_C.js";
|
|
5
|
+
import Li, { useState as E, useContext as Ri, useRef as Ie, useCallback as pe, useEffect as ue, useMemo as O } from "react";
|
|
7
6
|
import "./index-CuHybtft.js";
|
|
8
7
|
import { l as $r } from "./date-formatter-CzcPZx39.js";
|
|
9
8
|
import "./index-CJdxSyQq.js";
|
|
@@ -14,7 +13,7 @@ import "react-dom";
|
|
|
14
13
|
* This source code is licensed under the ISC license.
|
|
15
14
|
* See the LICENSE file in the root directory of this source tree.
|
|
16
15
|
*/
|
|
17
|
-
const
|
|
16
|
+
const Fi = ke("ArrowUpRight", [
|
|
18
17
|
["path", { d: "M7 7h10v10", key: "1tivn9" }],
|
|
19
18
|
["path", { d: "M7 17 17 7", key: "1vkiza" }]
|
|
20
19
|
]);
|
|
@@ -24,7 +23,18 @@ const Pi = Ie("ArrowUpRight", [
|
|
|
24
23
|
* This source code is licensed under the ISC license.
|
|
25
24
|
* See the LICENSE file in the root directory of this source tree.
|
|
26
25
|
*/
|
|
27
|
-
const
|
|
26
|
+
const Pi = ke("CircleX", [
|
|
27
|
+
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
28
|
+
["path", { d: "m15 9-6 6", key: "1uzhvr" }],
|
|
29
|
+
["path", { d: "m9 9 6 6", key: "z0biqf" }]
|
|
30
|
+
]);
|
|
31
|
+
/**
|
|
32
|
+
* @license lucide-react v0.453.0 - ISC
|
|
33
|
+
*
|
|
34
|
+
* This source code is licensed under the ISC license.
|
|
35
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
36
|
+
*/
|
|
37
|
+
const Ur = ke("FileDown", [
|
|
28
38
|
["path", { d: "M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z", key: "1rqfz7" }],
|
|
29
39
|
["path", { d: "M14 2v4a2 2 0 0 0 2 2h4", key: "tnqrlb" }],
|
|
30
40
|
["path", { d: "M12 18v-6", key: "17g6i2" }],
|
|
@@ -36,7 +46,7 @@ const Ur = Ie("FileDown", [
|
|
|
36
46
|
* This source code is licensed under the ISC license.
|
|
37
47
|
* See the LICENSE file in the root directory of this source tree.
|
|
38
48
|
*/
|
|
39
|
-
const Mi =
|
|
49
|
+
const Mi = ke("FilterX", [
|
|
40
50
|
["path", { d: "M13.013 3H2l8 9.46V19l4 2v-8.54l.9-1.055", key: "1fi1da" }],
|
|
41
51
|
["path", { d: "m22 3-5 5", key: "12jva0" }],
|
|
42
52
|
["path", { d: "m17 3 5 5", key: "k36vhe" }]
|
|
@@ -47,7 +57,7 @@ const Mi = Ie("FilterX", [
|
|
|
47
57
|
* This source code is licensed under the ISC license.
|
|
48
58
|
* See the LICENSE file in the root directory of this source tree.
|
|
49
59
|
*/
|
|
50
|
-
const Bi =
|
|
60
|
+
const Bi = ke("ListChecks", [
|
|
51
61
|
["path", { d: "m3 17 2 2 4-4", key: "1jhpwq" }],
|
|
52
62
|
["path", { d: "m3 7 2 2 4-4", key: "1obspn" }],
|
|
53
63
|
["path", { d: "M13 6h8", key: "15sg57" }],
|
|
@@ -60,7 +70,7 @@ const Bi = Ie("ListChecks", [
|
|
|
60
70
|
* This source code is licensed under the ISC license.
|
|
61
71
|
* See the LICENSE file in the root directory of this source tree.
|
|
62
72
|
*/
|
|
63
|
-
const
|
|
73
|
+
const Ha = ke("Mail", [
|
|
64
74
|
["rect", { width: "20", height: "16", x: "2", y: "4", rx: "2", key: "18n3k1" }],
|
|
65
75
|
["path", { d: "m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7", key: "1ocrg3" }]
|
|
66
76
|
]);
|
|
@@ -70,7 +80,7 @@ const Ka = Ie("Mail", [
|
|
|
70
80
|
* This source code is licensed under the ISC license.
|
|
71
81
|
* See the LICENSE file in the root directory of this source tree.
|
|
72
82
|
*/
|
|
73
|
-
const En =
|
|
83
|
+
const En = ke("MessageSquare", [
|
|
74
84
|
["path", { d: "M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z", key: "1lielz" }]
|
|
75
85
|
]);
|
|
76
86
|
/**
|
|
@@ -79,7 +89,7 @@ const En = Ie("MessageSquare", [
|
|
|
79
89
|
* This source code is licensed under the ISC license.
|
|
80
90
|
* See the LICENSE file in the root directory of this source tree.
|
|
81
91
|
*/
|
|
82
|
-
const Oi =
|
|
92
|
+
const Oi = ke("Newspaper", [
|
|
83
93
|
[
|
|
84
94
|
"path",
|
|
85
95
|
{
|
|
@@ -97,7 +107,7 @@ const Oi = Ie("Newspaper", [
|
|
|
97
107
|
* This source code is licensed under the ISC license.
|
|
98
108
|
* See the LICENSE file in the root directory of this source tree.
|
|
99
109
|
*/
|
|
100
|
-
const
|
|
110
|
+
const Ka = ke("Pause", [
|
|
101
111
|
["rect", { x: "14", y: "4", width: "4", height: "16", rx: "1", key: "zuxfzm" }],
|
|
102
112
|
["rect", { x: "6", y: "4", width: "4", height: "16", rx: "1", key: "1okwgv" }]
|
|
103
113
|
]);
|
|
@@ -107,7 +117,7 @@ const qa = Ie("Pause", [
|
|
|
107
117
|
* This source code is licensed under the ISC license.
|
|
108
118
|
* See the LICENSE file in the root directory of this source tree.
|
|
109
119
|
*/
|
|
110
|
-
const Vi =
|
|
120
|
+
const Vi = ke("Undo2", [
|
|
111
121
|
["path", { d: "M9 14 4 9l5-5", key: "102s5s" }],
|
|
112
122
|
["path", { d: "M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11", key: "f3b9sd" }]
|
|
113
123
|
]);
|
|
@@ -117,7 +127,7 @@ const Vi = Ie("Undo2", [
|
|
|
117
127
|
* This source code is licensed under the ISC license.
|
|
118
128
|
* See the LICENSE file in the root directory of this source tree.
|
|
119
129
|
*/
|
|
120
|
-
const Wa =
|
|
130
|
+
const Wa = ke("UsersRound", [
|
|
121
131
|
["path", { d: "M18 21a8 8 0 0 0-16 0", key: "3ypg7q" }],
|
|
122
132
|
["circle", { cx: "10", cy: "8", r: "5", key: "o932ke" }],
|
|
123
133
|
["path", { d: "M22 20c0-3.37-2-6.5-4-8a5 5 0 0 0-.45-8.3", key: "10s06x" }]
|
|
@@ -128,7 +138,7 @@ const Wa = Ie("UsersRound", [
|
|
|
128
138
|
* This source code is licensed under the ISC license.
|
|
129
139
|
* See the LICENSE file in the root directory of this source tree.
|
|
130
140
|
*/
|
|
131
|
-
const In =
|
|
141
|
+
const In = ke("Zap", [
|
|
132
142
|
[
|
|
133
143
|
"path",
|
|
134
144
|
{
|
|
@@ -146,10 +156,10 @@ function $i({
|
|
|
146
156
|
destinationMode: i = "both",
|
|
147
157
|
onConfirm: l
|
|
148
158
|
}) {
|
|
149
|
-
const [c, d] =
|
|
159
|
+
const [c, d] = E(
|
|
150
160
|
r && a ? `Copy of ${a}` : a || ""
|
|
151
|
-
), [u, p] =
|
|
152
|
-
|
|
161
|
+
), [u, p] = E("");
|
|
162
|
+
Li.useEffect(() => {
|
|
153
163
|
e && (d(
|
|
154
164
|
r && a ? `Copy of ${a}` : a || ""
|
|
155
165
|
), p(""));
|
|
@@ -242,162 +252,160 @@ function $i({
|
|
|
242
252
|
] }) });
|
|
243
253
|
}
|
|
244
254
|
function Ui() {
|
|
245
|
-
const [e, n] =
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
})(), V = xo((I) => {
|
|
251
|
-
I != null && I.id && (S(I), r && o && l && f && (async () => {
|
|
255
|
+
const [e, n] = E(!1), [r, a] = E(!1), [o, i] = E(null), [l, c] = E(null), d = ct((S) => S.frame), u = ct((S) => S.card), p = go(), f = H((S) => S.selectedSheetId), h = H((S) => S.dashboard), { getUpdatedFrame: g } = ja(), { selectVisual: D } = bo(), { addFrame: A, setSelectedFrameId: N, setIsVisualEditing: b } = bt(), C = ka(), x = !!(d != null && d.visualId), w = (() => {
|
|
256
|
+
var S, R;
|
|
257
|
+
return ((S = d == null ? void 0 : d.cards) == null ? void 0 : S.length) === 1 && ((R = d.cards[0]) != null && R.title) ? d.cards[0].title : p != null && p.title ? p.title : (u == null ? void 0 : u.title) || "Untitled Visual";
|
|
258
|
+
})(), T = xo((S) => {
|
|
259
|
+
S != null && S.id && (D(S), r && o && l && f && (async () => {
|
|
252
260
|
try {
|
|
253
|
-
const
|
|
261
|
+
const R = {
|
|
254
262
|
...o,
|
|
255
263
|
id: Fr(),
|
|
256
|
-
visualId:
|
|
264
|
+
visualId: S.id
|
|
257
265
|
// Link to the newly created library visual
|
|
258
266
|
};
|
|
259
|
-
|
|
267
|
+
A(f, R, {
|
|
260
268
|
position: "end",
|
|
261
269
|
semanticExecutionPayload: l
|
|
262
|
-
}),
|
|
263
|
-
} catch (
|
|
270
|
+
}), N(R.id), a(!1), i(null), c(null), b(!1);
|
|
271
|
+
} catch (R) {
|
|
264
272
|
console.error(
|
|
265
273
|
"Failed to promote semantic metadata for saved visual:",
|
|
266
|
-
|
|
274
|
+
R
|
|
267
275
|
), fe.error(
|
|
268
|
-
|
|
276
|
+
R instanceof Error ? R.message : "Failed to prepare semantic metadata for the saved visual"
|
|
269
277
|
);
|
|
270
278
|
}
|
|
271
|
-
})(),
|
|
279
|
+
})(), n(!1));
|
|
272
280
|
});
|
|
273
281
|
return {
|
|
274
282
|
saveAsDialogOpen: e,
|
|
275
283
|
setSaveAsDialogOpen: n,
|
|
276
|
-
handleSaveAs: async (
|
|
284
|
+
handleSaveAs: async (S) => {
|
|
277
285
|
if (!f) {
|
|
278
286
|
fe.error("No sheet selected");
|
|
279
287
|
return;
|
|
280
288
|
}
|
|
281
|
-
const
|
|
282
|
-
if (
|
|
283
|
-
fe.error(
|
|
289
|
+
const R = g(), U = ba(R);
|
|
290
|
+
if (U) {
|
|
291
|
+
fe.error(U);
|
|
284
292
|
return;
|
|
285
293
|
}
|
|
286
|
-
const
|
|
287
|
-
...
|
|
288
|
-
cards:
|
|
289
|
-
...
|
|
290
|
-
title:
|
|
294
|
+
const B = R.cards.length === 1 ? {
|
|
295
|
+
...R,
|
|
296
|
+
cards: R.cards.map((j) => ({
|
|
297
|
+
...j,
|
|
298
|
+
title: S.name
|
|
291
299
|
// Use visual name as card title
|
|
292
300
|
}))
|
|
293
|
-
} :
|
|
294
|
-
if (
|
|
295
|
-
let
|
|
296
|
-
if (
|
|
301
|
+
} : R;
|
|
302
|
+
if (S.saveToLibrary) {
|
|
303
|
+
let j = null;
|
|
304
|
+
if (S.saveToCurrentDashboard)
|
|
297
305
|
try {
|
|
298
|
-
|
|
299
|
-
previousFrame: Cn(h,
|
|
306
|
+
j = await C(B, {
|
|
307
|
+
previousFrame: Cn(h, B.id)
|
|
300
308
|
});
|
|
301
|
-
} catch (
|
|
309
|
+
} catch (M) {
|
|
302
310
|
console.error(
|
|
303
311
|
"Failed to prepare semantic metadata before saving visual:",
|
|
304
|
-
|
|
312
|
+
M
|
|
305
313
|
), fe.error(
|
|
306
|
-
|
|
314
|
+
M instanceof Error ? M.message : "Failed to prepare semantic metadata for the saved visual"
|
|
307
315
|
);
|
|
308
316
|
return;
|
|
309
317
|
}
|
|
310
|
-
a(
|
|
311
|
-
const
|
|
312
|
-
title:
|
|
313
|
-
description:
|
|
314
|
-
frameObject:
|
|
318
|
+
a(S.saveToCurrentDashboard), i(B), c(j);
|
|
319
|
+
const _ = {
|
|
320
|
+
title: S.name,
|
|
321
|
+
description: S.description,
|
|
322
|
+
frameObject: B,
|
|
315
323
|
// Card title synced for single-card frames
|
|
316
324
|
isPrivate: !1
|
|
317
325
|
};
|
|
318
|
-
|
|
319
|
-
} else if (
|
|
320
|
-
const
|
|
321
|
-
...
|
|
326
|
+
T.mutate(_);
|
|
327
|
+
} else if (S.saveToCurrentDashboard) {
|
|
328
|
+
const j = {
|
|
329
|
+
...B,
|
|
322
330
|
// Card title already synced
|
|
323
331
|
id: Fr(),
|
|
324
332
|
visualId: void 0
|
|
325
333
|
// Explicitly no visualId for local visuals
|
|
326
334
|
};
|
|
327
335
|
try {
|
|
328
|
-
const
|
|
329
|
-
previousFrame: Cn(h,
|
|
336
|
+
const _ = await C(B, {
|
|
337
|
+
previousFrame: Cn(h, B.id)
|
|
330
338
|
});
|
|
331
|
-
|
|
339
|
+
A(f, j, {
|
|
332
340
|
position: "end",
|
|
333
|
-
semanticExecutionPayload:
|
|
334
|
-
}),
|
|
335
|
-
} catch (
|
|
336
|
-
console.error("Failed to save visual to dashboard:",
|
|
337
|
-
|
|
341
|
+
semanticExecutionPayload: _
|
|
342
|
+
}), N(j.id), fe.success("Visual saved to dashboard"), n(!1), b(!1);
|
|
343
|
+
} catch (_) {
|
|
344
|
+
console.error("Failed to save visual to dashboard:", _), fe.error(
|
|
345
|
+
_ instanceof Error ? _.message : "Failed to prepare semantic metadata for the visual"
|
|
338
346
|
);
|
|
339
347
|
}
|
|
340
348
|
}
|
|
341
349
|
},
|
|
342
|
-
isLibraryVisual:
|
|
343
|
-
currentVisualName:
|
|
344
|
-
isSaving:
|
|
350
|
+
isLibraryVisual: x,
|
|
351
|
+
currentVisualName: w,
|
|
352
|
+
isSaving: T.isPending
|
|
345
353
|
};
|
|
346
354
|
}
|
|
347
|
-
function
|
|
348
|
-
const n = ct((
|
|
355
|
+
function Lc(e = {}) {
|
|
356
|
+
const n = ct((B) => B.frame), r = ct((B) => B.editorContext), a = yo((B) => B.selectedVisual), o = H((B) => B.selectedFrameId), i = H((B) => B.selectedSheetId), l = H((B) => B.dashboard), { setIsVisualEditing: c, updateFrame: d } = bt(), [u, p] = E(!1), [f, h] = E("both"), g = ka(), D = (r == null ? void 0 : r.type) === "documentSection", A = !!(n != null && n.visualId || a != null && a.id), N = !!(n != null && n.visualId && o), b = A && !N, {
|
|
349
357
|
saveAsDialogOpen: C,
|
|
350
358
|
setSaveAsDialogOpen: x,
|
|
351
359
|
handleSaveAs: w,
|
|
352
360
|
isLibraryVisual: T,
|
|
353
|
-
currentVisualName:
|
|
354
|
-
isSaving:
|
|
355
|
-
} = Ui(), { getUpdatedFrame:
|
|
361
|
+
currentVisualName: $,
|
|
362
|
+
isSaving: S
|
|
363
|
+
} = Ui(), { getUpdatedFrame: R } = ja();
|
|
356
364
|
if (D)
|
|
357
365
|
return /* @__PURE__ */ s(se, { children: [
|
|
358
366
|
/* @__PURE__ */ t(Or, { className: "rounded-control", variant: "default" }),
|
|
359
367
|
/* @__PURE__ */ t(Vr, {})
|
|
360
368
|
] });
|
|
361
|
-
const
|
|
369
|
+
const U = async () => {
|
|
362
370
|
if (!i) {
|
|
363
371
|
fe.error("No sheet selected");
|
|
364
372
|
return;
|
|
365
373
|
}
|
|
366
374
|
if (u) return;
|
|
367
375
|
p(!0);
|
|
368
|
-
const
|
|
369
|
-
if (
|
|
370
|
-
p(!1), fe.error(
|
|
376
|
+
const B = R(), j = ba(B);
|
|
377
|
+
if (j) {
|
|
378
|
+
p(!1), fe.error(j);
|
|
371
379
|
return;
|
|
372
380
|
}
|
|
373
|
-
const
|
|
374
|
-
...
|
|
381
|
+
const _ = {
|
|
382
|
+
...B,
|
|
375
383
|
visualId: void 0
|
|
376
|
-
}, M = Cn(l,
|
|
384
|
+
}, M = Cn(l, _.id);
|
|
377
385
|
try {
|
|
378
|
-
const
|
|
386
|
+
const W = await g(_, {
|
|
379
387
|
previousFrame: M
|
|
380
388
|
});
|
|
381
|
-
d(i,
|
|
382
|
-
semanticExecutionPayload:
|
|
389
|
+
d(i, _, {
|
|
390
|
+
semanticExecutionPayload: W
|
|
383
391
|
});
|
|
384
|
-
} catch (
|
|
385
|
-
console.error("Failed to apply local semantic metadata:",
|
|
386
|
-
|
|
392
|
+
} catch (W) {
|
|
393
|
+
console.error("Failed to apply local semantic metadata:", W), p(!1), fe.error(
|
|
394
|
+
W instanceof Error ? W.message : "Failed to prepare semantic metadata for this visual"
|
|
387
395
|
);
|
|
388
396
|
return;
|
|
389
397
|
}
|
|
390
398
|
setTimeout(() => {
|
|
391
399
|
p(!1), fe.success("Changes applied. Visual is now local to this dashboard"), c(!1);
|
|
392
400
|
}, 300);
|
|
393
|
-
},
|
|
394
|
-
h(
|
|
401
|
+
}, z = (B) => {
|
|
402
|
+
h(B), x(!0);
|
|
395
403
|
};
|
|
396
404
|
return /* @__PURE__ */ s(se, { children: [
|
|
397
405
|
/* @__PURE__ */ s("div", { className: "inline-flex items-center overflow-hidden rounded-control", children: [
|
|
398
|
-
!
|
|
399
|
-
|
|
400
|
-
|
|
406
|
+
!A && /* @__PURE__ */ t(Or, { className: "!rounded-none", variant: "default" }),
|
|
407
|
+
A && b && /* @__PURE__ */ t(ki, { className: "!rounded-none", variant: "default" }),
|
|
408
|
+
A && N && /* @__PURE__ */ t(Si, { className: "!rounded-none" }),
|
|
401
409
|
/* @__PURE__ */ s(Pn, { modal: !1, children: [
|
|
402
410
|
/* @__PURE__ */ t(Mn, { asChild: !0, children: /* @__PURE__ */ t(
|
|
403
411
|
ge,
|
|
@@ -406,7 +414,7 @@ function Rc(e = {}) {
|
|
|
406
414
|
size: "xs",
|
|
407
415
|
className: "w-7 !rounded-none border-l border-primary-foreground/20 px-0",
|
|
408
416
|
"aria-label": "Open visual save options",
|
|
409
|
-
disabled:
|
|
417
|
+
disabled: S || u,
|
|
410
418
|
children: /* @__PURE__ */ t(ze, { className: "h-3.5 w-3.5" })
|
|
411
419
|
}
|
|
412
420
|
) }),
|
|
@@ -420,10 +428,10 @@ function Rc(e = {}) {
|
|
|
420
428
|
/* @__PURE__ */ s(
|
|
421
429
|
je,
|
|
422
430
|
{
|
|
423
|
-
onClick:
|
|
431
|
+
onClick: U,
|
|
424
432
|
disabled: u,
|
|
425
433
|
children: [
|
|
426
|
-
/* @__PURE__ */ t(
|
|
434
|
+
/* @__PURE__ */ t(qe, { className: "h-3.5 w-3.5" }),
|
|
427
435
|
u ? "Applying..." : "Apply Locally"
|
|
428
436
|
]
|
|
429
437
|
}
|
|
@@ -433,10 +441,10 @@ function Rc(e = {}) {
|
|
|
433
441
|
/* @__PURE__ */ s(
|
|
434
442
|
je,
|
|
435
443
|
{
|
|
436
|
-
onClick: () =>
|
|
437
|
-
disabled:
|
|
444
|
+
onClick: () => z("local"),
|
|
445
|
+
disabled: S,
|
|
438
446
|
children: [
|
|
439
|
-
/* @__PURE__ */ t(
|
|
447
|
+
/* @__PURE__ */ t(qt, { className: "h-3.5 w-3.5" }),
|
|
440
448
|
"Add to Dashboard (Local)"
|
|
441
449
|
]
|
|
442
450
|
}
|
|
@@ -444,8 +452,8 @@ function Rc(e = {}) {
|
|
|
444
452
|
/* @__PURE__ */ s(
|
|
445
453
|
je,
|
|
446
454
|
{
|
|
447
|
-
onClick: () =>
|
|
448
|
-
disabled:
|
|
455
|
+
onClick: () => z("library"),
|
|
456
|
+
disabled: S,
|
|
449
457
|
children: [
|
|
450
458
|
/* @__PURE__ */ t(Ai, { className: "h-3.5 w-3.5" }),
|
|
451
459
|
"Save as Library Visual"
|
|
@@ -455,8 +463,8 @@ function Rc(e = {}) {
|
|
|
455
463
|
/* @__PURE__ */ s(
|
|
456
464
|
je,
|
|
457
465
|
{
|
|
458
|
-
onClick: () =>
|
|
459
|
-
disabled:
|
|
466
|
+
onClick: () => z("both"),
|
|
467
|
+
disabled: S,
|
|
460
468
|
children: [
|
|
461
469
|
/* @__PURE__ */ t(Ei, { className: "h-3.5 w-3.5" }),
|
|
462
470
|
"Save Copy as Linked Visual"
|
|
@@ -473,20 +481,20 @@ function Rc(e = {}) {
|
|
|
473
481
|
$i,
|
|
474
482
|
{
|
|
475
483
|
open: C,
|
|
476
|
-
onOpenChange: (
|
|
477
|
-
|
|
484
|
+
onOpenChange: (B) => {
|
|
485
|
+
S || x(B);
|
|
478
486
|
},
|
|
479
487
|
isLibraryVisual: T,
|
|
480
|
-
currentVisualName:
|
|
481
|
-
isSaving:
|
|
488
|
+
currentVisualName: $,
|
|
489
|
+
isSaving: S,
|
|
482
490
|
destinationMode: f,
|
|
483
491
|
onConfirm: w
|
|
484
492
|
}
|
|
485
493
|
)
|
|
486
494
|
] });
|
|
487
495
|
}
|
|
488
|
-
function
|
|
489
|
-
const n = ct((u) => u.isDevMode), r =
|
|
496
|
+
function Rc({ className: e }) {
|
|
497
|
+
const n = ct((u) => u.isDevMode), r = H((u) => u.isVisualEditing), { setIsDevMode: a } = xa(), { config: o } = Ri(vo).tokenProps, i = (o == null ? void 0 : o.showAdvancedMode) !== !1;
|
|
490
498
|
if (!r || !i)
|
|
491
499
|
return null;
|
|
492
500
|
const l = n ? Fn : No, c = n ? "Drag & drop" : "SQL", d = n ? "Switch to drag-and-drop mode" : "Switch to SQL mode";
|
|
@@ -508,7 +516,7 @@ function Fc({ className: e }) {
|
|
|
508
516
|
}
|
|
509
517
|
);
|
|
510
518
|
}
|
|
511
|
-
function
|
|
519
|
+
function Fc({
|
|
512
520
|
open: e,
|
|
513
521
|
onOpenChange: n,
|
|
514
522
|
onSave: r,
|
|
@@ -548,18 +556,18 @@ function Pc({
|
|
|
548
556
|
] })
|
|
549
557
|
] }) });
|
|
550
558
|
}
|
|
551
|
-
const _i = 1e4, ji = 15e3, zi = 3e4,
|
|
552
|
-
function
|
|
559
|
+
const _i = 1e4, ji = 15e3, zi = 3e4, qi = 3e4, Hi = 12e4, _r = 2 * 60 * 60 * 1e3;
|
|
560
|
+
function Ki(e) {
|
|
553
561
|
const n = Date.now() - e.getTime();
|
|
554
|
-
return n <
|
|
562
|
+
return n < qi ? _i : n < Hi ? ji : zi;
|
|
555
563
|
}
|
|
556
|
-
function
|
|
557
|
-
const { authToken: e, tokenProps: n } = It(), r = ot((h) => h.activeExports), [a, o] =
|
|
564
|
+
function Pc() {
|
|
565
|
+
const { authToken: e, tokenProps: n } = It(), r = ot((h) => h.activeExports), [a, o] = E(
|
|
558
566
|
typeof document < "u" ? !document.hidden : !0
|
|
559
|
-
), i =
|
|
567
|
+
), i = Ie(null), l = Ie(!1), c = Ie(void 0), d = n == null ? void 0 : n.apiServiceUrl, u = e == null ? void 0 : e.accessToken, p = pe(() => {
|
|
560
568
|
const h = ot.getState().activeExports;
|
|
561
569
|
return Array.from(h.values()).filter(
|
|
562
|
-
(g) =>
|
|
570
|
+
(g) => qn(g.status)
|
|
563
571
|
);
|
|
564
572
|
}, []);
|
|
565
573
|
ue(() => {
|
|
@@ -593,25 +601,25 @@ function Mc() {
|
|
|
593
601
|
lastUpdatedAt: /* @__PURE__ */ new Date()
|
|
594
602
|
});
|
|
595
603
|
}
|
|
596
|
-
const
|
|
604
|
+
const A = h.filter(
|
|
597
605
|
(x) => g - x.startedAt.getTime() <= _r
|
|
598
606
|
);
|
|
599
|
-
if (
|
|
607
|
+
if (A.length === 0) {
|
|
600
608
|
l.current = !1;
|
|
601
609
|
return;
|
|
602
610
|
}
|
|
603
611
|
const N = await Promise.allSettled(
|
|
604
|
-
|
|
612
|
+
A.map(async (x) => {
|
|
605
613
|
try {
|
|
606
614
|
const w = await Aa(d, u, x.id);
|
|
607
615
|
let T;
|
|
608
616
|
if (w.status === "completed")
|
|
609
617
|
try {
|
|
610
|
-
T = await
|
|
611
|
-
} catch (
|
|
618
|
+
T = await Hn(d, u, x.id);
|
|
619
|
+
} catch ($) {
|
|
612
620
|
console.error(
|
|
613
621
|
`[useExportPolling] Failed to get download URL for ${x.id}:`,
|
|
614
|
-
|
|
622
|
+
$
|
|
615
623
|
);
|
|
616
624
|
}
|
|
617
625
|
return {
|
|
@@ -638,9 +646,9 @@ function Mc() {
|
|
|
638
646
|
const C = p();
|
|
639
647
|
if (C.length > 0 && !document.hidden) {
|
|
640
648
|
const x = C.reduce(
|
|
641
|
-
(T,
|
|
649
|
+
(T, $) => $.startedAt < T ? $.startedAt : T,
|
|
642
650
|
C[0].startedAt
|
|
643
|
-
), w =
|
|
651
|
+
), w = Ki(x);
|
|
644
652
|
i.current && clearTimeout(i.current), i.current = setTimeout(() => {
|
|
645
653
|
var T;
|
|
646
654
|
(T = c.current) == null || T.call(c);
|
|
@@ -667,8 +675,8 @@ function Mc() {
|
|
|
667
675
|
inProgressCount: p().length
|
|
668
676
|
};
|
|
669
677
|
}
|
|
670
|
-
function
|
|
671
|
-
const { authToken: e, tokenProps: n } = It(), r = ot((c) => c.activeExports), { addExport: a } = Ea(), o =
|
|
678
|
+
function Mc() {
|
|
679
|
+
const { authToken: e, tokenProps: n } = It(), r = ot((c) => c.activeExports), { addExport: a } = Ea(), o = Ie(!1), i = n == null ? void 0 : n.apiServiceUrl, l = e == null ? void 0 : e.accessToken;
|
|
672
680
|
ue(() => {
|
|
673
681
|
if (o.current || !i || !l) return;
|
|
674
682
|
(async () => {
|
|
@@ -684,7 +692,7 @@ function Bc() {
|
|
|
684
692
|
let f;
|
|
685
693
|
if (u.status === "completed")
|
|
686
694
|
try {
|
|
687
|
-
f = await
|
|
695
|
+
f = await Hn(i, l, u.id);
|
|
688
696
|
} catch (g) {
|
|
689
697
|
console.error(
|
|
690
698
|
`[useExportRecovery] Failed to get download URL for ${u.id}:`,
|
|
@@ -717,7 +725,7 @@ function Bc() {
|
|
|
717
725
|
}, [i, l, a, r]);
|
|
718
726
|
}
|
|
719
727
|
function Wi(e) {
|
|
720
|
-
return e.title ? e.title :
|
|
728
|
+
return e.title ? e.title : qn(
|
|
721
729
|
e.status
|
|
722
730
|
) ? "Export in progress..." : e.status === "completed" ? "Export completed" : e.status === "failed" ? "Export failed" : "Export";
|
|
723
731
|
}
|
|
@@ -734,11 +742,11 @@ function Gi({
|
|
|
734
742
|
case "completed":
|
|
735
743
|
return /* @__PURE__ */ t(Ao, { className: "mt-0.5 h-5 w-5 shrink-0 text-green-600" });
|
|
736
744
|
case "failed":
|
|
737
|
-
return /* @__PURE__ */ t(
|
|
745
|
+
return /* @__PURE__ */ t(Pi, { className: "mt-0.5 h-5 w-5 shrink-0 text-destructive" });
|
|
738
746
|
default:
|
|
739
747
|
return /* @__PURE__ */ t(ne, { className: "text-foreground-muted mt-0.5 h-5 w-5 shrink-0 animate-spin" });
|
|
740
748
|
}
|
|
741
|
-
}, i =
|
|
749
|
+
}, i = qn(e.status), l = (() => {
|
|
742
750
|
switch (e.status) {
|
|
743
751
|
case "pending":
|
|
744
752
|
return "Queued...";
|
|
@@ -813,25 +821,25 @@ function Gi({
|
|
|
813
821
|
] });
|
|
814
822
|
}
|
|
815
823
|
function Ji() {
|
|
816
|
-
const { authToken: e, tokenProps: n } = It(), r = ot((
|
|
817
|
-
(
|
|
824
|
+
const { authToken: e, tokenProps: n } = It(), r = ot((A) => A.activeExports), { clearCompleted: a, removeExport: o, updateExport: i } = Ea(), [l, c] = E(!1), [d, u] = E(!1), p = Array.from(r.values()).sort(
|
|
825
|
+
(A, N) => N.startedAt.getTime() - A.startedAt.getTime()
|
|
818
826
|
), f = p.some(
|
|
819
|
-
(
|
|
827
|
+
(A) => A.status === "completed" || A.status === "failed"
|
|
820
828
|
), h = pe(async () => {
|
|
821
|
-
const
|
|
822
|
-
if (!(!
|
|
829
|
+
const A = n == null ? void 0 : n.apiServiceUrl, N = e == null ? void 0 : e.accessToken;
|
|
830
|
+
if (!(!A || !N)) {
|
|
823
831
|
c(!0);
|
|
824
832
|
try {
|
|
825
833
|
const b = Array.from(r.values());
|
|
826
834
|
await Promise.all(
|
|
827
835
|
b.map(async (C) => {
|
|
828
836
|
try {
|
|
829
|
-
const x = await Aa(
|
|
837
|
+
const x = await Aa(A, N, C.id);
|
|
830
838
|
let w;
|
|
831
839
|
if (x.status === "completed")
|
|
832
840
|
try {
|
|
833
|
-
w = await
|
|
834
|
-
|
|
841
|
+
w = await Hn(
|
|
842
|
+
A,
|
|
835
843
|
N,
|
|
836
844
|
C.id
|
|
837
845
|
);
|
|
@@ -863,8 +871,8 @@ function Ji() {
|
|
|
863
871
|
n == null ? void 0 : n.apiServiceUrl,
|
|
864
872
|
i
|
|
865
873
|
]), g = pe(async () => {
|
|
866
|
-
const
|
|
867
|
-
if (!
|
|
874
|
+
const A = n == null ? void 0 : n.apiServiceUrl, N = e == null ? void 0 : e.accessToken;
|
|
875
|
+
if (!A || !N) {
|
|
868
876
|
a();
|
|
869
877
|
return;
|
|
870
878
|
}
|
|
@@ -873,7 +881,7 @@ function Ji() {
|
|
|
873
881
|
const b = p.filter(
|
|
874
882
|
(x) => x.status === "completed" || x.status === "failed"
|
|
875
883
|
), C = await Promise.allSettled(
|
|
876
|
-
b.map(async (x) => (await Mr(
|
|
884
|
+
b.map(async (x) => (await Mr(A, N, x.id), x.id))
|
|
877
885
|
);
|
|
878
886
|
for (const x of C)
|
|
879
887
|
x.status === "fulfilled" ? o(x.value) : console.error("Failed to delete export:", x.reason);
|
|
@@ -887,16 +895,16 @@ function Ji() {
|
|
|
887
895
|
a,
|
|
888
896
|
o
|
|
889
897
|
]), D = pe(
|
|
890
|
-
async (
|
|
898
|
+
async (A) => {
|
|
891
899
|
const N = n == null ? void 0 : n.apiServiceUrl, b = e == null ? void 0 : e.accessToken;
|
|
892
900
|
if (N && b)
|
|
893
901
|
try {
|
|
894
|
-
await Mr(N, b,
|
|
902
|
+
await Mr(N, b, A), o(A);
|
|
895
903
|
return;
|
|
896
904
|
} catch (C) {
|
|
897
|
-
console.error(`Failed to cancel export ${
|
|
905
|
+
console.error(`Failed to cancel export ${A}:`, C);
|
|
898
906
|
}
|
|
899
|
-
o(
|
|
907
|
+
o(A);
|
|
900
908
|
},
|
|
901
909
|
[n == null ? void 0 : n.apiServiceUrl, e == null ? void 0 : e.accessToken, o]
|
|
902
910
|
);
|
|
@@ -941,17 +949,17 @@ function Ji() {
|
|
|
941
949
|
)
|
|
942
950
|
] })
|
|
943
951
|
] }),
|
|
944
|
-
/* @__PURE__ */ t("div", { className: "max-h-[350px] overflow-y-auto", children: /* @__PURE__ */ t("div", { className: "divide-y", children: p.map((
|
|
952
|
+
/* @__PURE__ */ t("div", { className: "max-h-[350px] overflow-y-auto", children: /* @__PURE__ */ t("div", { className: "divide-y", children: p.map((A) => /* @__PURE__ */ t(
|
|
945
953
|
Gi,
|
|
946
954
|
{
|
|
947
|
-
export:
|
|
955
|
+
export: A,
|
|
948
956
|
onRemove: D
|
|
949
957
|
},
|
|
950
|
-
|
|
958
|
+
A.id
|
|
951
959
|
)) }) })
|
|
952
960
|
] });
|
|
953
961
|
}
|
|
954
|
-
function
|
|
962
|
+
function Bc({
|
|
955
963
|
variant: e
|
|
956
964
|
}) {
|
|
957
965
|
const n = ot((d) => d.activeExports), r = Eo(), a = n.size > 0, o = Array.from(n.values()).some(
|
|
@@ -1003,7 +1011,7 @@ function Yi({
|
|
|
1003
1011
|
preventPassiveDismissDuringCreate: u,
|
|
1004
1012
|
resolvedOpen: p,
|
|
1005
1013
|
setIsCreateFlowActive: f
|
|
1006
|
-
} =
|
|
1014
|
+
} = za({
|
|
1007
1015
|
open: e,
|
|
1008
1016
|
onOpenChange: n,
|
|
1009
1017
|
initialCreateFlowActive: o === "create",
|
|
@@ -1014,16 +1022,16 @@ function Yi({
|
|
|
1014
1022
|
// create and make consumers use `forceClose()` from a dedicated
|
|
1015
1023
|
// button.
|
|
1016
1024
|
dismissMode: a ? "passive" : "explicit-only"
|
|
1017
|
-
}), h =
|
|
1025
|
+
}), h = H((R) => R.dashboard), { setDashboardControlsModel: g } = bt(), { participants: D } = Do(lo(h)), A = Array.from(
|
|
1018
1026
|
new Map(
|
|
1019
1027
|
D.flatMap(
|
|
1020
|
-
(
|
|
1021
|
-
var
|
|
1028
|
+
(R) => R.fieldChoices.map((U) => {
|
|
1029
|
+
var z;
|
|
1022
1030
|
return [
|
|
1023
|
-
|
|
1031
|
+
U.value,
|
|
1024
1032
|
{
|
|
1025
|
-
option:
|
|
1026
|
-
target: (
|
|
1033
|
+
option: U,
|
|
1034
|
+
target: (z = R.fieldTargetMap) == null ? void 0 : z[U.value]
|
|
1027
1035
|
}
|
|
1028
1036
|
];
|
|
1029
1037
|
})
|
|
@@ -1032,13 +1040,13 @@ function Yi({
|
|
|
1032
1040
|
), N = Array.from(
|
|
1033
1041
|
new Map(
|
|
1034
1042
|
D.flatMap(
|
|
1035
|
-
(
|
|
1036
|
-
var
|
|
1043
|
+
(R) => R.metricChoices.map((U) => {
|
|
1044
|
+
var z;
|
|
1037
1045
|
return [
|
|
1038
|
-
|
|
1046
|
+
U.value,
|
|
1039
1047
|
{
|
|
1040
|
-
option:
|
|
1041
|
-
target: (
|
|
1048
|
+
option: U,
|
|
1049
|
+
target: (z = R.metricTargetMap) == null ? void 0 : z[U.value]
|
|
1042
1050
|
}
|
|
1043
1051
|
];
|
|
1044
1052
|
})
|
|
@@ -1047,11 +1055,11 @@ function Yi({
|
|
|
1047
1055
|
), b = co({
|
|
1048
1056
|
...h || {},
|
|
1049
1057
|
controls: []
|
|
1050
|
-
}), C = To(h), x = (
|
|
1058
|
+
}), C = To(h), x = (R, U, z) => {
|
|
1051
1059
|
g(
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
Qi(
|
|
1060
|
+
R,
|
|
1061
|
+
U,
|
|
1062
|
+
Qi(z)
|
|
1055
1063
|
);
|
|
1056
1064
|
}, w = pe(() => {
|
|
1057
1065
|
if (i) {
|
|
@@ -1060,14 +1068,14 @@ function Yi({
|
|
|
1060
1068
|
}
|
|
1061
1069
|
f(!1);
|
|
1062
1070
|
}, [i, l, f]), T = /* @__PURE__ */ t(
|
|
1063
|
-
|
|
1071
|
+
qa,
|
|
1064
1072
|
{
|
|
1065
1073
|
scope: "dashboard",
|
|
1066
1074
|
controls: h.controls || [],
|
|
1067
1075
|
reservedControlIds: b,
|
|
1068
1076
|
defaultValues: h.defaultControlValues || {},
|
|
1069
1077
|
usageByControlId: Lo(h),
|
|
1070
|
-
availableFieldChoices:
|
|
1078
|
+
availableFieldChoices: A,
|
|
1071
1079
|
availableMetricChoices: N,
|
|
1072
1080
|
structuralParticipants: D,
|
|
1073
1081
|
structuralParticipantIdsByControlId: C,
|
|
@@ -1077,7 +1085,7 @@ function Yi({
|
|
|
1077
1085
|
onChange: x,
|
|
1078
1086
|
emptyMessage: "No dashboard controls yet."
|
|
1079
1087
|
}
|
|
1080
|
-
),
|
|
1088
|
+
), $ = d ? "Add dashboard control" : "Dashboard Controls", S = /* @__PURE__ */ s(se, { children: [
|
|
1081
1089
|
/* @__PURE__ */ s("div", { className: "space-y-1", children: [
|
|
1082
1090
|
/* @__PURE__ */ t("h4", { className: "text-sm font-medium", children: "Dashboard Controls" }),
|
|
1083
1091
|
/* @__PURE__ */ t("p", { className: "text-xs text-muted-foreground", children: "Add shared controls viewers can use across the dashboard. Each card can decide how to respond to the same control." })
|
|
@@ -1096,7 +1104,7 @@ function Yi({
|
|
|
1096
1104
|
align: "end",
|
|
1097
1105
|
onEscapeKeyDown: u,
|
|
1098
1106
|
onPointerDownOutside: u,
|
|
1099
|
-
children:
|
|
1107
|
+
children: S
|
|
1100
1108
|
}
|
|
1101
1109
|
)
|
|
1102
1110
|
] }) : /* @__PURE__ */ t(ut, { open: p, onOpenChange: c, children: /* @__PURE__ */ s(
|
|
@@ -1111,7 +1119,7 @@ function Yi({
|
|
|
1111
1119
|
{
|
|
1112
1120
|
className: d ? "space-y-0" : void 0,
|
|
1113
1121
|
children: [
|
|
1114
|
-
/* @__PURE__ */ t(pt, { className: "text-[15px]", children:
|
|
1122
|
+
/* @__PURE__ */ t(pt, { className: "text-[15px]", children: $ }),
|
|
1115
1123
|
/* @__PURE__ */ t(
|
|
1116
1124
|
ft,
|
|
1117
1125
|
{
|
|
@@ -1140,7 +1148,7 @@ function Zi({
|
|
|
1140
1148
|
onOpenChange: n,
|
|
1141
1149
|
initialMode: r = "manage"
|
|
1142
1150
|
}) {
|
|
1143
|
-
var
|
|
1151
|
+
var S;
|
|
1144
1152
|
const a = r === "create", {
|
|
1145
1153
|
forceClose: o,
|
|
1146
1154
|
handleOpenChange: i,
|
|
@@ -1148,23 +1156,23 @@ function Zi({
|
|
|
1148
1156
|
preventPassiveDismissDuringCreate: c,
|
|
1149
1157
|
resolvedOpen: d,
|
|
1150
1158
|
setIsCreateFlowActive: u
|
|
1151
|
-
} =
|
|
1159
|
+
} = za({
|
|
1152
1160
|
open: e,
|
|
1153
1161
|
onOpenChange: n,
|
|
1154
1162
|
initialCreateFlowActive: r === "create",
|
|
1155
1163
|
dismissMode: "explicit-only"
|
|
1156
|
-
}), p =
|
|
1157
|
-
(
|
|
1158
|
-
), D = (g == null ? void 0 : g.kind) === "document" && !!g.document,
|
|
1164
|
+
}), p = H((R) => R.dashboard), f = H((R) => R.selectedSheetId), { setDashboardInputs: h } = bt(), g = (S = p.sheets) == null ? void 0 : S.find(
|
|
1165
|
+
(R) => R.id === f
|
|
1166
|
+
), D = (g == null ? void 0 : g.kind) === "document" && !!g.document, A = O(
|
|
1159
1167
|
() => D && (g != null && g.document) ? Ro(p, g.id) : [],
|
|
1160
1168
|
[p, D, g == null ? void 0 : g.document, g == null ? void 0 : g.id]
|
|
1161
1169
|
), N = O(
|
|
1162
|
-
() =>
|
|
1163
|
-
(
|
|
1170
|
+
() => A.filter(
|
|
1171
|
+
(R) => R.kind === "control"
|
|
1164
1172
|
),
|
|
1165
|
-
[
|
|
1173
|
+
[A]
|
|
1166
1174
|
), b = O(
|
|
1167
|
-
() => N.map((
|
|
1175
|
+
() => N.map((R) => R.control),
|
|
1168
1176
|
[N]
|
|
1169
1177
|
), C = O(
|
|
1170
1178
|
() => tl(b),
|
|
@@ -1179,21 +1187,21 @@ function Zi({
|
|
|
1179
1187
|
}
|
|
1180
1188
|
u(!1);
|
|
1181
1189
|
}, [a, o, u]), T = pe(
|
|
1182
|
-
(
|
|
1190
|
+
(R, U, z) => {
|
|
1183
1191
|
!D || !(g != null && g.document) || h(
|
|
1184
1192
|
rl({
|
|
1185
1193
|
allInputs: p.inputs || [],
|
|
1186
1194
|
documentSheetId: g.id,
|
|
1187
|
-
currentDocumentInputs:
|
|
1188
|
-
nextControls:
|
|
1189
|
-
nextDefaultValues:
|
|
1190
|
-
change:
|
|
1195
|
+
currentDocumentInputs: A,
|
|
1196
|
+
nextControls: R,
|
|
1197
|
+
nextDefaultValues: U,
|
|
1198
|
+
change: z
|
|
1191
1199
|
})
|
|
1192
1200
|
);
|
|
1193
1201
|
},
|
|
1194
1202
|
[
|
|
1195
1203
|
p.inputs,
|
|
1196
|
-
|
|
1204
|
+
A,
|
|
1197
1205
|
D,
|
|
1198
1206
|
g,
|
|
1199
1207
|
h
|
|
@@ -1217,7 +1225,7 @@ function Zi({
|
|
|
1217
1225
|
)
|
|
1218
1226
|
] }),
|
|
1219
1227
|
/* @__PURE__ */ t("div", { className: "min-h-0 overflow-y-auto pr-1", children: /* @__PURE__ */ t(
|
|
1220
|
-
|
|
1228
|
+
qa,
|
|
1221
1229
|
{
|
|
1222
1230
|
scope: "dashboard",
|
|
1223
1231
|
controls: b,
|
|
@@ -1283,13 +1291,13 @@ function rl({
|
|
|
1283
1291
|
[...e, ...u].filter(
|
|
1284
1292
|
(N) => N.id !== h.id
|
|
1285
1293
|
)
|
|
1286
|
-
),
|
|
1294
|
+
), A = g.id === D ? g : { ...g, id: D };
|
|
1287
1295
|
u.push({
|
|
1288
1296
|
...h,
|
|
1289
|
-
label:
|
|
1297
|
+
label: A.label,
|
|
1290
1298
|
variableName: D,
|
|
1291
|
-
requiredAtExecution:
|
|
1292
|
-
control:
|
|
1299
|
+
requiredAtExecution: A.requiredAtExecution,
|
|
1300
|
+
control: A
|
|
1293
1301
|
});
|
|
1294
1302
|
}
|
|
1295
1303
|
for (const h of l.values())
|
|
@@ -1319,7 +1327,7 @@ function al({
|
|
|
1319
1327
|
pickerContentClassName: d,
|
|
1320
1328
|
settingsContentClassName: u
|
|
1321
1329
|
}) {
|
|
1322
|
-
const p = o === "toolbar", [f, h] =
|
|
1330
|
+
const p = o === "toolbar", [f, h] = E(!1), g = Mo("interactive");
|
|
1323
1331
|
return /* @__PURE__ */ s(
|
|
1324
1332
|
"div",
|
|
1325
1333
|
{
|
|
@@ -1395,8 +1403,8 @@ function al({
|
|
|
1395
1403
|
);
|
|
1396
1404
|
}
|
|
1397
1405
|
function sl() {
|
|
1398
|
-
|
|
1399
|
-
const e =
|
|
1406
|
+
Ii();
|
|
1407
|
+
const e = H((d) => d.selectedSheetId), n = H((d) => d.selectedFrameId), r = H((d) => d.dashboard), a = H((d) => d.actions.getSelectedFrame), { setSelectedFrameId: o } = bt(), { setCard: i } = xa(), l = ct((d) => d.card.dataSource);
|
|
1400
1408
|
return ue(() => {
|
|
1401
1409
|
var u, p;
|
|
1402
1410
|
let d = a();
|
|
@@ -1413,9 +1421,9 @@ function sl() {
|
|
|
1413
1421
|
};
|
|
1414
1422
|
}
|
|
1415
1423
|
function ol() {
|
|
1416
|
-
const e =
|
|
1424
|
+
const e = H((d) => d.dashboard), n = H(
|
|
1417
1425
|
(d) => d.semanticExecutionPayload
|
|
1418
|
-
), r =
|
|
1426
|
+
), r = H((d) => d.actions.addFilter), { hasEntities: a } = sl(), { isLoading: o } = Bo(), i = O(
|
|
1419
1427
|
() => Oo(e, n),
|
|
1420
1428
|
[e, n]
|
|
1421
1429
|
), c = !Vo(e.filters) && i.hasEligibleCards && !o;
|
|
@@ -1451,7 +1459,7 @@ function il({
|
|
|
1451
1459
|
onManageControls: r,
|
|
1452
1460
|
onDismiss: a
|
|
1453
1461
|
}) {
|
|
1454
|
-
const o =
|
|
1462
|
+
const o = H(
|
|
1455
1463
|
(c) => c.dashboard.filterLayout
|
|
1456
1464
|
), { setFilterLayout: i } = bt();
|
|
1457
1465
|
o != null && o.displayMode;
|
|
@@ -1542,7 +1550,7 @@ function ll({
|
|
|
1542
1550
|
)
|
|
1543
1551
|
] });
|
|
1544
1552
|
}
|
|
1545
|
-
function
|
|
1553
|
+
function Oc({
|
|
1546
1554
|
size: e,
|
|
1547
1555
|
className: n,
|
|
1548
1556
|
primaryButtonClassName: r,
|
|
@@ -1550,20 +1558,20 @@ function Vc({
|
|
|
1550
1558
|
pickerContentClassName: o,
|
|
1551
1559
|
settingsContentClassName: i
|
|
1552
1560
|
}) {
|
|
1553
|
-
var
|
|
1554
|
-
const [l, c] =
|
|
1555
|
-
(
|
|
1556
|
-
), N = ya(
|
|
1561
|
+
var $;
|
|
1562
|
+
const [l, c] = E(null), d = H((S) => S.dashboard), u = H((S) => S.selectedSheetId), p = H((S) => S.showFilters), f = jo((S) => S.setPanelOpen), h = H((S) => S.actions), { setDocumentInspectorTab: g, setShowFilters: D } = h, A = ($ = d.sheets) == null ? void 0 : $.find(
|
|
1563
|
+
(S) => S.id === u
|
|
1564
|
+
), N = ya(A), b = pe((S) => {
|
|
1557
1565
|
window.setTimeout(() => {
|
|
1558
|
-
c(
|
|
1566
|
+
c(S);
|
|
1559
1567
|
}, 0);
|
|
1560
1568
|
}, []), C = pe(
|
|
1561
|
-
(
|
|
1569
|
+
(S) => {
|
|
1562
1570
|
if (N && u) {
|
|
1563
|
-
|
|
1571
|
+
S && g(u, "inputs");
|
|
1564
1572
|
return;
|
|
1565
1573
|
}
|
|
1566
|
-
|
|
1574
|
+
S && f("dashboard", !1), D(S);
|
|
1567
1575
|
},
|
|
1568
1576
|
[
|
|
1569
1577
|
N,
|
|
@@ -1586,13 +1594,13 @@ function Vc({
|
|
|
1586
1594
|
showFilters: N ? !1 : p,
|
|
1587
1595
|
onShowFiltersChange: C,
|
|
1588
1596
|
pickerContent: /* @__PURE__ */ t(ol, {}),
|
|
1589
|
-
settingsContent: (
|
|
1597
|
+
settingsContent: (S) => /* @__PURE__ */ t(
|
|
1590
1598
|
il,
|
|
1591
1599
|
{
|
|
1592
1600
|
onAddFilter: x,
|
|
1593
1601
|
onAddControl: w,
|
|
1594
1602
|
onManageControls: T,
|
|
1595
|
-
onDismiss:
|
|
1603
|
+
onDismiss: S
|
|
1596
1604
|
}
|
|
1597
1605
|
),
|
|
1598
1606
|
size: e,
|
|
@@ -1607,8 +1615,8 @@ function Vc({
|
|
|
1607
1615
|
Zi,
|
|
1608
1616
|
{
|
|
1609
1617
|
open: !0,
|
|
1610
|
-
onOpenChange: (
|
|
1611
|
-
|
|
1618
|
+
onOpenChange: (S) => {
|
|
1619
|
+
S || c(null);
|
|
1612
1620
|
},
|
|
1613
1621
|
initialMode: l
|
|
1614
1622
|
}
|
|
@@ -1616,8 +1624,8 @@ function Vc({
|
|
|
1616
1624
|
Yi,
|
|
1617
1625
|
{
|
|
1618
1626
|
open: !0,
|
|
1619
|
-
onOpenChange: (
|
|
1620
|
-
|
|
1627
|
+
onOpenChange: (S) => {
|
|
1628
|
+
S || c(null);
|
|
1621
1629
|
},
|
|
1622
1630
|
showTrigger: !1,
|
|
1623
1631
|
initialMode: l
|
|
@@ -1636,7 +1644,7 @@ function Ga(e, n) {
|
|
|
1636
1644
|
function be(e) {
|
|
1637
1645
|
return encodeURIComponent(e);
|
|
1638
1646
|
}
|
|
1639
|
-
function
|
|
1647
|
+
function Ht(e) {
|
|
1640
1648
|
const n = new URLSearchParams();
|
|
1641
1649
|
Object.entries(e).forEach(([a, o]) => {
|
|
1642
1650
|
o !== void 0 && o !== "" && n.set(a, String(o));
|
|
@@ -1705,7 +1713,7 @@ async function ul(e, n, r) {
|
|
|
1705
1713
|
return ye(
|
|
1706
1714
|
e,
|
|
1707
1715
|
n,
|
|
1708
|
-
`/v1/briefings${
|
|
1716
|
+
`/v1/briefings${Ht({
|
|
1709
1717
|
scope: r == null ? void 0 : r.scope,
|
|
1710
1718
|
tenantId: r == null ? void 0 : r.tenantId,
|
|
1711
1719
|
tenantUserId: r == null ? void 0 : r.tenantUserId,
|
|
@@ -1716,11 +1724,11 @@ async function ul(e, n, r) {
|
|
|
1716
1724
|
})}`
|
|
1717
1725
|
);
|
|
1718
1726
|
}
|
|
1719
|
-
async function
|
|
1727
|
+
async function Vc(e, n, r) {
|
|
1720
1728
|
return ye(
|
|
1721
1729
|
e,
|
|
1722
1730
|
n,
|
|
1723
|
-
`/v1/briefings/tenant-summaries${
|
|
1731
|
+
`/v1/briefings/tenant-summaries${Ht({
|
|
1724
1732
|
status: r == null ? void 0 : r.status
|
|
1725
1733
|
})}`
|
|
1726
1734
|
);
|
|
@@ -1780,11 +1788,11 @@ async function fl(e, n, r) {
|
|
|
1780
1788
|
`/v1/briefings/preview-runs/${be(r)}`
|
|
1781
1789
|
)).previewRun;
|
|
1782
1790
|
}
|
|
1783
|
-
async function
|
|
1791
|
+
async function $c(e, n, r, a) {
|
|
1784
1792
|
return ye(
|
|
1785
1793
|
e,
|
|
1786
1794
|
n,
|
|
1787
|
-
`/v1/briefings/${be(r)}/runs${
|
|
1795
|
+
`/v1/briefings/${be(r)}/runs${Ht({
|
|
1788
1796
|
status: a == null ? void 0 : a.status,
|
|
1789
1797
|
cursor: a == null ? void 0 : a.cursor,
|
|
1790
1798
|
limit: a == null ? void 0 : a.limit
|
|
@@ -1819,15 +1827,15 @@ async function bl(e, n, r, a) {
|
|
|
1819
1827
|
}
|
|
1820
1828
|
);
|
|
1821
1829
|
}
|
|
1822
|
-
async function
|
|
1830
|
+
async function Uc(e, n, r, a, o) {
|
|
1823
1831
|
return Qa(
|
|
1824
1832
|
e,
|
|
1825
1833
|
n,
|
|
1826
|
-
`/v1/briefings/${be(r)}/runs/${be(a)}/artifact${
|
|
1834
|
+
`/v1/briefings/${be(r)}/runs/${be(a)}/artifact${Ht({ kind: o })}`,
|
|
1827
1835
|
o
|
|
1828
1836
|
);
|
|
1829
1837
|
}
|
|
1830
|
-
async function
|
|
1838
|
+
async function _c(e, n, r, a) {
|
|
1831
1839
|
return Qa(
|
|
1832
1840
|
e,
|
|
1833
1841
|
n,
|
|
@@ -2049,7 +2057,7 @@ function Dn(e) {
|
|
|
2049
2057
|
};
|
|
2050
2058
|
}
|
|
2051
2059
|
}
|
|
2052
|
-
function
|
|
2060
|
+
function qr(e) {
|
|
2053
2061
|
const n = as(e), r = n.find((i) => i.kind === "dashboard_sheet"), o = n.find((i) => i.kind === "dashboard") ?? r;
|
|
2054
2062
|
return o ? [Dn({ option: o, runtime: e.runtime })] : [];
|
|
2055
2063
|
}
|
|
@@ -2067,7 +2075,7 @@ function Sl(e) {
|
|
|
2067
2075
|
Al({ settings: n, option: r, runtime: a });
|
|
2068
2076
|
return;
|
|
2069
2077
|
}
|
|
2070
|
-
const o = r.kind === "dashboard" ? "all" : "current", i = r.kind === "dashboard" ? a.selectedSheetId : r.sheetId, l =
|
|
2078
|
+
const o = r.kind === "dashboard" ? "all" : "current", i = r.kind === "dashboard" ? a.selectedSheetId : r.sheetId, l = Ho({
|
|
2071
2079
|
dashboard: a.dashboard || void 0,
|
|
2072
2080
|
filterValues: a.filterValues,
|
|
2073
2081
|
selectedSheetId: i,
|
|
@@ -2225,13 +2233,13 @@ function Tl(e) {
|
|
|
2225
2233
|
const n = e.filter(
|
|
2226
2234
|
(r) => !!r && typeof r == "object" && typeof r.name == "string"
|
|
2227
2235
|
);
|
|
2228
|
-
return
|
|
2236
|
+
return Ko(n);
|
|
2229
2237
|
}
|
|
2230
2238
|
function os(e, n) {
|
|
2231
2239
|
return n === "csv" ? { ...vl, ...e } : { ...yl, ...e };
|
|
2232
2240
|
}
|
|
2233
2241
|
function is(e) {
|
|
2234
|
-
return e ?
|
|
2242
|
+
return e ? qo(e).filter(
|
|
2235
2243
|
(n) => n !== "png"
|
|
2236
2244
|
) : ["pdf"];
|
|
2237
2245
|
}
|
|
@@ -2444,7 +2452,7 @@ function St(e) {
|
|
|
2444
2452
|
limits: e.limits ? { ...e.limits } : {}
|
|
2445
2453
|
};
|
|
2446
2454
|
}
|
|
2447
|
-
function
|
|
2455
|
+
function Hr(e) {
|
|
2448
2456
|
return {
|
|
2449
2457
|
name: e.name.trim(),
|
|
2450
2458
|
description: cs(e.description) ?? null,
|
|
@@ -2474,7 +2482,7 @@ function Ul(e) {
|
|
|
2474
2482
|
deliveryConfig: fs(e.delivery)
|
|
2475
2483
|
};
|
|
2476
2484
|
}
|
|
2477
|
-
function
|
|
2485
|
+
function Kr(e) {
|
|
2478
2486
|
var a, o, i, l, c;
|
|
2479
2487
|
const n = [];
|
|
2480
2488
|
e.name.trim() || n.push({ field: "name", message: "Name is required" });
|
|
@@ -2701,7 +2709,7 @@ function $t({
|
|
|
2701
2709
|
/* @__PURE__ */ t("span", { children: e })
|
|
2702
2710
|
] });
|
|
2703
2711
|
}
|
|
2704
|
-
function
|
|
2712
|
+
function ql({
|
|
2705
2713
|
attachments: e,
|
|
2706
2714
|
onChange: n,
|
|
2707
2715
|
onAdd: r,
|
|
@@ -2724,7 +2732,7 @@ function Hl({
|
|
|
2724
2732
|
}
|
|
2725
2733
|
),
|
|
2726
2734
|
e.map((i, l) => /* @__PURE__ */ t(
|
|
2727
|
-
|
|
2735
|
+
Hl,
|
|
2728
2736
|
{
|
|
2729
2737
|
attachment: i,
|
|
2730
2738
|
disabled: a,
|
|
@@ -2744,20 +2752,20 @@ function Hl({
|
|
|
2744
2752
|
onClick: r,
|
|
2745
2753
|
className: "inline-flex h-6 items-center gap-1 rounded-control px-1.5 text-[11px] text-muted-foreground hover:bg-muted hover:text-foreground disabled:opacity-50",
|
|
2746
2754
|
children: [
|
|
2747
|
-
/* @__PURE__ */ t(
|
|
2755
|
+
/* @__PURE__ */ t(qt, { className: "h-3 w-3" }),
|
|
2748
2756
|
"Add"
|
|
2749
2757
|
]
|
|
2750
2758
|
}
|
|
2751
2759
|
)
|
|
2752
2760
|
] });
|
|
2753
2761
|
}
|
|
2754
|
-
function
|
|
2762
|
+
function Hl({
|
|
2755
2763
|
attachment: e,
|
|
2756
2764
|
disabled: n,
|
|
2757
2765
|
onUpdate: r,
|
|
2758
2766
|
onRemove: a
|
|
2759
2767
|
}) {
|
|
2760
|
-
const [o, i] =
|
|
2768
|
+
const [o, i] = E(!1), l = Jn(e), c = Nl(e), d = e.format.toUpperCase();
|
|
2761
2769
|
return /* @__PURE__ */ s(
|
|
2762
2770
|
"span",
|
|
2763
2771
|
{
|
|
@@ -2782,7 +2790,7 @@ function Kl({
|
|
|
2782
2790
|
className: "inline-flex max-w-[180px] items-center gap-1 disabled:opacity-50",
|
|
2783
2791
|
children: [
|
|
2784
2792
|
/* @__PURE__ */ t(
|
|
2785
|
-
|
|
2793
|
+
Kl,
|
|
2786
2794
|
{
|
|
2787
2795
|
format: e.format,
|
|
2788
2796
|
className: "h-3 w-3 shrink-0 text-muted-foreground/70"
|
|
@@ -2810,7 +2818,7 @@ function Kl({
|
|
|
2810
2818
|
}
|
|
2811
2819
|
);
|
|
2812
2820
|
}
|
|
2813
|
-
function
|
|
2821
|
+
function Kl({
|
|
2814
2822
|
format: e,
|
|
2815
2823
|
className: n
|
|
2816
2824
|
}) {
|
|
@@ -2830,24 +2838,24 @@ function Gl({
|
|
|
2830
2838
|
const d = O(
|
|
2831
2839
|
() => as({ source: r, dashboard: a, selectedSheetId: o }),
|
|
2832
2840
|
[r, a, o]
|
|
2833
|
-
), [u, p] =
|
|
2841
|
+
), [u, p] = E([]);
|
|
2834
2842
|
ue(() => {
|
|
2835
2843
|
if (!e) return;
|
|
2836
2844
|
const T = [];
|
|
2837
|
-
for (const
|
|
2838
|
-
const
|
|
2839
|
-
(
|
|
2840
|
-
const
|
|
2841
|
-
option:
|
|
2842
|
-
format:
|
|
2845
|
+
for (const $ of l) {
|
|
2846
|
+
const S = zr($), R = d.find(
|
|
2847
|
+
(U) => U.formats.some((z) => {
|
|
2848
|
+
const B = Dn({
|
|
2849
|
+
option: U,
|
|
2850
|
+
format: z,
|
|
2843
2851
|
runtime: i
|
|
2844
2852
|
});
|
|
2845
|
-
return zr(
|
|
2853
|
+
return zr(B) === S;
|
|
2846
2854
|
})
|
|
2847
2855
|
);
|
|
2848
|
-
|
|
2849
|
-
optionKey:
|
|
2850
|
-
format:
|
|
2856
|
+
R && T.push({
|
|
2857
|
+
optionKey: R.key,
|
|
2858
|
+
format: $.format ?? R.defaultFormat
|
|
2851
2859
|
});
|
|
2852
2860
|
}
|
|
2853
2861
|
p(T);
|
|
@@ -2857,23 +2865,23 @@ function Gl({
|
|
|
2857
2865
|
[u]
|
|
2858
2866
|
), h = O(() => {
|
|
2859
2867
|
const T = {};
|
|
2860
|
-
for (const
|
|
2861
|
-
T[
|
|
2868
|
+
for (const $ of u)
|
|
2869
|
+
T[$.optionKey] = $.format;
|
|
2862
2870
|
return T;
|
|
2863
|
-
}, [u]), g = (T,
|
|
2864
|
-
p((
|
|
2865
|
-
}, D = (T,
|
|
2871
|
+
}, [u]), g = (T, $) => {
|
|
2872
|
+
p((S) => S.some((U) => U.optionKey === T) ? S.filter((U) => U.optionKey !== T) : [...S, { optionKey: T, format: $ }]);
|
|
2873
|
+
}, D = (T, $) => {
|
|
2866
2874
|
p(
|
|
2867
|
-
(
|
|
2875
|
+
(S) => S.map((R) => R.optionKey === T ? { ...R, format: $ } : R)
|
|
2868
2876
|
);
|
|
2869
|
-
},
|
|
2877
|
+
}, A = () => {
|
|
2870
2878
|
const T = [];
|
|
2871
|
-
for (const
|
|
2872
|
-
const
|
|
2873
|
-
|
|
2879
|
+
for (const $ of u) {
|
|
2880
|
+
const S = d.find((R) => R.key === $.optionKey);
|
|
2881
|
+
S && T.push(
|
|
2874
2882
|
Dn({
|
|
2875
|
-
option:
|
|
2876
|
-
format:
|
|
2883
|
+
option: S,
|
|
2884
|
+
format: $.format,
|
|
2877
2885
|
runtime: i
|
|
2878
2886
|
})
|
|
2879
2887
|
);
|
|
@@ -2947,7 +2955,7 @@ function Gl({
|
|
|
2947
2955
|
{
|
|
2948
2956
|
type: "button",
|
|
2949
2957
|
size: "xs",
|
|
2950
|
-
onClick:
|
|
2958
|
+
onClick: A,
|
|
2951
2959
|
disabled: r.type !== "dashboard",
|
|
2952
2960
|
children: w > 0 ? `Add ${w} ${w === 1 ? "attachment" : "attachments"}` : "Done"
|
|
2953
2961
|
}
|
|
@@ -3040,7 +3048,7 @@ function Jl({ selected: e }) {
|
|
|
3040
3048
|
"mt-0.5 flex h-3.5 w-3.5 shrink-0 items-center justify-center rounded-control border transition-colors",
|
|
3041
3049
|
e ? "border-primary bg-primary" : "border-border "
|
|
3042
3050
|
),
|
|
3043
|
-
children: e ? /* @__PURE__ */ t(
|
|
3051
|
+
children: e ? /* @__PURE__ */ t(qe, { className: "h-2.5 w-2.5 text-primary-foreground", strokeWidth: 3 }) : null
|
|
3044
3052
|
}
|
|
3045
3053
|
);
|
|
3046
3054
|
}
|
|
@@ -3050,7 +3058,7 @@ function Ql({
|
|
|
3050
3058
|
cardType: r,
|
|
3051
3059
|
className: a
|
|
3052
3060
|
}) {
|
|
3053
|
-
return /* @__PURE__ */ t(n === "csv" ? Fa : e === "dashboard" ? Yo : e === "card" ? r === "table" || r === "aggregateTable" || r === "pivotTable" || r === "detailTable" ?
|
|
3061
|
+
return /* @__PURE__ */ t(n === "csv" ? Fa : e === "dashboard" ? Yo : e === "card" ? r === "table" || r === "aggregateTable" || r === "pivotTable" || r === "detailTable" ? Di : uo : Pa, { className: a });
|
|
3054
3062
|
}
|
|
3055
3063
|
const Yl = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Xl = 250;
|
|
3056
3064
|
function Ct(e) {
|
|
@@ -3101,86 +3109,86 @@ function Jr({
|
|
|
3101
3109
|
prefix: o,
|
|
3102
3110
|
placeholder: i
|
|
3103
3111
|
}) {
|
|
3104
|
-
const l =
|
|
3112
|
+
const l = Ie(null), [c, d] = E(!1), [u, p] = E(""), [f, h] = E(0), [g, D] = E(
|
|
3105
3113
|
() => /* @__PURE__ */ new Map()
|
|
3106
|
-
), [
|
|
3114
|
+
), [A, N] = E(
|
|
3107
3115
|
() => /* @__PURE__ */ new Map()
|
|
3108
|
-
), [b, C] =
|
|
3116
|
+
), [b, C] = E("people"), x = Xo(u, Xl), { currentUser: w } = Ma(), T = (w == null ? void 0 : w.type) === "tenant", { users: $, isLoading: S } = Zo({
|
|
3109
3117
|
search: x,
|
|
3110
3118
|
active: !0,
|
|
3111
3119
|
type: T ? "tenant" : "all",
|
|
3112
3120
|
tenantId: T ? w.tenantId : void 0,
|
|
3113
3121
|
limit: 25
|
|
3114
|
-
}), { groups:
|
|
3122
|
+
}), { groups: R, isLoading: U } = ei({
|
|
3115
3123
|
search: x,
|
|
3116
3124
|
type: T ? "TENANT_GROUP" : "all",
|
|
3117
3125
|
tenantId: T ? w.tenantId : void 0,
|
|
3118
3126
|
limit: 25
|
|
3119
|
-
}),
|
|
3127
|
+
}), z = O(
|
|
3120
3128
|
() => new Set(e.map(Ct)),
|
|
3121
3129
|
[e]
|
|
3122
|
-
),
|
|
3130
|
+
), B = O(
|
|
3123
3131
|
() => new Set(
|
|
3124
|
-
e.map(Zl).filter((
|
|
3132
|
+
e.map(Zl).filter((I) => !!I)
|
|
3125
3133
|
),
|
|
3126
3134
|
[e]
|
|
3127
|
-
),
|
|
3135
|
+
), j = O(
|
|
3128
3136
|
() => new Set(
|
|
3129
|
-
e.map(ed).filter((
|
|
3137
|
+
e.map(ed).filter((I) => !!I)
|
|
3130
3138
|
),
|
|
3131
3139
|
[e]
|
|
3132
|
-
),
|
|
3133
|
-
const
|
|
3134
|
-
return
|
|
3135
|
-
|
|
3136
|
-
}), w != null && w.id &&
|
|
3140
|
+
), _ = O(() => {
|
|
3141
|
+
const I = new Map(g);
|
|
3142
|
+
return $.forEach((P) => {
|
|
3143
|
+
I.set(P.id, Wr(P));
|
|
3144
|
+
}), w != null && w.id && I.set(w.id, {
|
|
3137
3145
|
kind: "user",
|
|
3138
3146
|
id: w.id,
|
|
3139
3147
|
name: w.name || w.email || "User",
|
|
3140
3148
|
email: w.email || "",
|
|
3141
3149
|
type: w.type
|
|
3142
|
-
}),
|
|
3143
|
-
}, [g,
|
|
3144
|
-
const
|
|
3145
|
-
return e.forEach((
|
|
3146
|
-
var
|
|
3147
|
-
if (
|
|
3148
|
-
const We = kt(
|
|
3149
|
-
We &&
|
|
3150
|
+
}), I;
|
|
3151
|
+
}, [g, $, w]), M = O(() => {
|
|
3152
|
+
const I = /* @__PURE__ */ new Set();
|
|
3153
|
+
return e.forEach((P) => {
|
|
3154
|
+
var Ke;
|
|
3155
|
+
if (P.type === "email") {
|
|
3156
|
+
const We = kt(P.address);
|
|
3157
|
+
We && I.add(We);
|
|
3150
3158
|
return;
|
|
3151
3159
|
}
|
|
3152
|
-
if (
|
|
3160
|
+
if (P.type === "group")
|
|
3153
3161
|
return;
|
|
3154
|
-
const
|
|
3155
|
-
X &&
|
|
3156
|
-
}),
|
|
3157
|
-
}, [
|
|
3158
|
-
const
|
|
3159
|
-
return
|
|
3160
|
-
|
|
3161
|
-
}),
|
|
3162
|
-
}, [
|
|
3163
|
-
() =>
|
|
3164
|
-
if (
|
|
3165
|
-
const
|
|
3166
|
-
return
|
|
3162
|
+
const Ae = P.type === "tenant_user" ? P.tenantUserId : P.userId, X = kt((Ke = _.get(Ae)) == null ? void 0 : Ke.email);
|
|
3163
|
+
X && I.add(X);
|
|
3164
|
+
}), I;
|
|
3165
|
+
}, [_, e]), W = O(() => {
|
|
3166
|
+
const I = new Map(A);
|
|
3167
|
+
return R.forEach((P) => {
|
|
3168
|
+
I.set(P.id, Gr(P));
|
|
3169
|
+
}), I;
|
|
3170
|
+
}, [A, R]), le = O(
|
|
3171
|
+
() => $.filter((I) => {
|
|
3172
|
+
if (B.has(I.id)) return !1;
|
|
3173
|
+
const P = kt(I.email);
|
|
3174
|
+
return P && M.has(P) ? !1 : T ? I.type === "tenant" && I.tenantId === (w == null ? void 0 : w.tenantId) : !0;
|
|
3167
3175
|
}).map(Wr),
|
|
3168
3176
|
[
|
|
3169
|
-
|
|
3170
|
-
|
|
3177
|
+
$,
|
|
3178
|
+
B,
|
|
3171
3179
|
M,
|
|
3172
3180
|
T,
|
|
3173
3181
|
w == null ? void 0 : w.tenantId
|
|
3174
3182
|
]
|
|
3175
3183
|
), L = O(
|
|
3176
|
-
() => le.filter((
|
|
3184
|
+
() => le.filter((I) => I.type === "organization"),
|
|
3177
3185
|
[le]
|
|
3178
3186
|
), G = O(
|
|
3179
|
-
() => le.filter((
|
|
3187
|
+
() => le.filter((I) => I.type === "tenant"),
|
|
3180
3188
|
[le]
|
|
3181
3189
|
), k = O(
|
|
3182
|
-
() =>
|
|
3183
|
-
[
|
|
3190
|
+
() => R.filter((I) => j.has(I.id) ? !1 : (w == null ? void 0 : w.type) === "tenant" ? I.type === "TENANT_GROUP" && I.tenantId === w.tenantId : !0).map(Gr),
|
|
3191
|
+
[R, j, w == null ? void 0 : w.type, w == null ? void 0 : w.tenantId]
|
|
3184
3192
|
), xe = O(
|
|
3185
3193
|
() => T ? [
|
|
3186
3194
|
{
|
|
@@ -3224,79 +3232,79 @@ function Jr({
|
|
|
3224
3232
|
]), re = O(
|
|
3225
3233
|
() => b === "groups" ? k : [],
|
|
3226
3234
|
[b, k]
|
|
3227
|
-
),
|
|
3235
|
+
), Se = O(
|
|
3228
3236
|
() => [...de, ...re],
|
|
3229
3237
|
[de, re]
|
|
3230
|
-
), De =
|
|
3231
|
-
|
|
3232
|
-
},
|
|
3233
|
-
n(e.filter((
|
|
3238
|
+
), De = Se.length === 0 ? 0 : Math.min(f, Se.length - 1), me = u.trim(), q = Yl.test(me), lt = kt(me), Te = lt ? M.has(lt) : !1, He = S || U, Pe = (I) => {
|
|
3239
|
+
z.has(Ct(I)) || (n([...e, I]), p(""), h(0));
|
|
3240
|
+
}, K = (I) => {
|
|
3241
|
+
n(e.filter((P) => Ct(P) !== I));
|
|
3234
3242
|
}, Me = () => {
|
|
3235
3243
|
!q || Te || Pe({ type: "email", address: me });
|
|
3236
|
-
},
|
|
3237
|
-
const
|
|
3238
|
-
|
|
3239
|
-
const X = new Map(
|
|
3240
|
-
return X.set(
|
|
3244
|
+
}, V = (I) => {
|
|
3245
|
+
const P = kt(I.email);
|
|
3246
|
+
P && M.has(P) || (D((Ae) => {
|
|
3247
|
+
const X = new Map(Ae);
|
|
3248
|
+
return X.set(I.id, I), X;
|
|
3241
3249
|
}), Pe(
|
|
3242
|
-
|
|
3250
|
+
I.type === "tenant" ? { type: "tenant_user", tenantUserId: I.id } : { type: "user", userId: I.id }
|
|
3243
3251
|
));
|
|
3244
|
-
}, ee = (
|
|
3245
|
-
N((
|
|
3246
|
-
const
|
|
3247
|
-
return
|
|
3248
|
-
}), Pe({ type: "group", groupId:
|
|
3249
|
-
}, Tt = (
|
|
3250
|
-
if (
|
|
3251
|
-
if (
|
|
3252
|
+
}, ee = (I) => {
|
|
3253
|
+
N((P) => {
|
|
3254
|
+
const Ae = new Map(P);
|
|
3255
|
+
return Ae.set(I.id, I), Ae;
|
|
3256
|
+
}), Pe({ type: "group", groupId: I.id });
|
|
3257
|
+
}, Tt = (I) => {
|
|
3258
|
+
if (I.key === "Enter") {
|
|
3259
|
+
if (I.preventDefault(), q && !Te) {
|
|
3252
3260
|
Me();
|
|
3253
3261
|
return;
|
|
3254
3262
|
}
|
|
3255
|
-
const
|
|
3256
|
-
if ((
|
|
3257
|
-
|
|
3263
|
+
const P = Se[De];
|
|
3264
|
+
if ((P == null ? void 0 : P.kind) === "user") {
|
|
3265
|
+
V(P);
|
|
3258
3266
|
return;
|
|
3259
3267
|
}
|
|
3260
|
-
if ((
|
|
3261
|
-
ee(
|
|
3268
|
+
if ((P == null ? void 0 : P.kind) === "group") {
|
|
3269
|
+
ee(P);
|
|
3262
3270
|
return;
|
|
3263
3271
|
}
|
|
3264
|
-
} else if (
|
|
3265
|
-
|
|
3266
|
-
(
|
|
3272
|
+
} else if (I.key === "ArrowDown")
|
|
3273
|
+
I.preventDefault(), h(
|
|
3274
|
+
(P) => Math.min(P + 1, Math.max(Se.length - 1, 0))
|
|
3267
3275
|
);
|
|
3268
|
-
else if (
|
|
3269
|
-
|
|
3270
|
-
else if (
|
|
3276
|
+
else if (I.key === "ArrowUp")
|
|
3277
|
+
I.preventDefault(), h((P) => Math.max(P - 1, 0));
|
|
3278
|
+
else if (I.key === "Escape")
|
|
3271
3279
|
d(!1);
|
|
3272
|
-
else if (
|
|
3273
|
-
const
|
|
3274
|
-
|
|
3280
|
+
else if (I.key === "Backspace" && u.length === 0) {
|
|
3281
|
+
const P = e[e.length - 1];
|
|
3282
|
+
P && K(Ct(P));
|
|
3275
3283
|
}
|
|
3276
|
-
}, xt = e.map((
|
|
3277
|
-
const
|
|
3278
|
-
if (
|
|
3284
|
+
}, xt = e.map((I) => {
|
|
3285
|
+
const P = Ct(I);
|
|
3286
|
+
if (I.type === "email")
|
|
3279
3287
|
return {
|
|
3280
|
-
key:
|
|
3281
|
-
label:
|
|
3288
|
+
key: P,
|
|
3289
|
+
label: I.name || I.address,
|
|
3282
3290
|
icon: /* @__PURE__ */ t(ti, { className: "h-3 w-3" }),
|
|
3283
|
-
onRemove: () =>
|
|
3291
|
+
onRemove: () => K(P)
|
|
3284
3292
|
};
|
|
3285
|
-
if (
|
|
3286
|
-
const
|
|
3293
|
+
if (I.type === "group") {
|
|
3294
|
+
const Ke = W.get(I.groupId);
|
|
3287
3295
|
return {
|
|
3288
|
-
key:
|
|
3289
|
-
label: (
|
|
3296
|
+
key: P,
|
|
3297
|
+
label: (Ke == null ? void 0 : Ke.name) || "Group",
|
|
3290
3298
|
icon: /* @__PURE__ */ t(Wa, { className: "h-3 w-3" }),
|
|
3291
|
-
onRemove: () =>
|
|
3299
|
+
onRemove: () => K(P)
|
|
3292
3300
|
};
|
|
3293
3301
|
}
|
|
3294
|
-
const
|
|
3302
|
+
const Ae = I.type === "tenant_user" ? I.tenantUserId : I.userId, X = _.get(Ae);
|
|
3295
3303
|
return {
|
|
3296
|
-
key:
|
|
3304
|
+
key: P,
|
|
3297
3305
|
label: (X == null ? void 0 : X.name) || (X == null ? void 0 : X.email) || "User",
|
|
3298
3306
|
icon: /* @__PURE__ */ t(ni, { className: "h-3 w-3" }),
|
|
3299
|
-
onRemove: () =>
|
|
3307
|
+
onRemove: () => K(P)
|
|
3300
3308
|
};
|
|
3301
3309
|
});
|
|
3302
3310
|
return /* @__PURE__ */ t("div", { className: v("relative", r), children: /* @__PURE__ */ s(Re, { open: c && !a, onOpenChange: d, children: [
|
|
@@ -3309,19 +3317,19 @@ function Jr({
|
|
|
3309
3317
|
a && "cursor-not-allowed opacity-60"
|
|
3310
3318
|
),
|
|
3311
3319
|
onClick: () => {
|
|
3312
|
-
var
|
|
3313
|
-
a || ((
|
|
3320
|
+
var I;
|
|
3321
|
+
a || ((I = l.current) == null || I.focus(), d(!0));
|
|
3314
3322
|
},
|
|
3315
3323
|
children: [
|
|
3316
3324
|
o ? /* @__PURE__ */ t("span", { className: "inline-flex shrink-0 items-center text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", children: o }) : null,
|
|
3317
|
-
xt.map((
|
|
3325
|
+
xt.map((I) => /* @__PURE__ */ t(
|
|
3318
3326
|
td,
|
|
3319
3327
|
{
|
|
3320
|
-
icon:
|
|
3321
|
-
label:
|
|
3322
|
-
onRemove:
|
|
3328
|
+
icon: I.icon,
|
|
3329
|
+
label: I.label,
|
|
3330
|
+
onRemove: I.onRemove
|
|
3323
3331
|
},
|
|
3324
|
-
|
|
3332
|
+
I.key
|
|
3325
3333
|
)),
|
|
3326
3334
|
/* @__PURE__ */ t(
|
|
3327
3335
|
"input",
|
|
@@ -3331,8 +3339,8 @@ function Jr({
|
|
|
3331
3339
|
value: u,
|
|
3332
3340
|
disabled: a,
|
|
3333
3341
|
placeholder: i ?? (e.length > 0 ? "Add more..." : "Add people, emails, or groups"),
|
|
3334
|
-
onChange: (
|
|
3335
|
-
p(
|
|
3342
|
+
onChange: (I) => {
|
|
3343
|
+
p(I.target.value), h(0), d(!0);
|
|
3336
3344
|
},
|
|
3337
3345
|
onFocus: () => d(!0),
|
|
3338
3346
|
onKeyDown: Tt
|
|
@@ -3346,7 +3354,7 @@ function Jr({
|
|
|
3346
3354
|
{
|
|
3347
3355
|
align: "start",
|
|
3348
3356
|
sideOffset: 8,
|
|
3349
|
-
onOpenAutoFocus: (
|
|
3357
|
+
onOpenAutoFocus: (I) => I.preventDefault(),
|
|
3350
3358
|
className: v(
|
|
3351
3359
|
"z-[60] w-[var(--radix-popover-trigger-width)] min-w-[360px] rounded-card border border-border bg-background p-0 text-foreground shadow-md outline-none",
|
|
3352
3360
|
"max-h-[min(320px,var(--radix-popover-content-available-height))] overflow-y-auto"
|
|
@@ -3359,14 +3367,14 @@ function Jr({
|
|
|
3359
3367
|
emailAlreadyAdded: Te,
|
|
3360
3368
|
filters: xe,
|
|
3361
3369
|
groupSuggestions: re,
|
|
3362
|
-
loading:
|
|
3370
|
+
loading: He,
|
|
3363
3371
|
onAddEmail: Me,
|
|
3364
|
-
onFilterChange: (
|
|
3365
|
-
C(
|
|
3372
|
+
onFilterChange: (I) => {
|
|
3373
|
+
C(I), h(0);
|
|
3366
3374
|
},
|
|
3367
3375
|
onGroupClick: ee,
|
|
3368
|
-
onUserClick:
|
|
3369
|
-
orderedSuggestions:
|
|
3376
|
+
onUserClick: V,
|
|
3377
|
+
orderedSuggestions: Se,
|
|
3370
3378
|
query: me,
|
|
3371
3379
|
queryIsEmail: q,
|
|
3372
3380
|
userSuggestions: de,
|
|
@@ -3416,7 +3424,7 @@ function nd({
|
|
|
3416
3424
|
userSuggestions: g,
|
|
3417
3425
|
viewerType: D
|
|
3418
3426
|
}) {
|
|
3419
|
-
const
|
|
3427
|
+
const A = !i && p.length === 0 && !(h && !r);
|
|
3420
3428
|
return /* @__PURE__ */ s("div", { className: "py-1 text-[13px]", children: [
|
|
3421
3429
|
/* @__PURE__ */ t("div", { className: "flex items-center gap-1 border-b border-border/60 px-2 pb-1", children: a.map((N) => /* @__PURE__ */ s(
|
|
3422
3430
|
"button",
|
|
@@ -3487,7 +3495,7 @@ function nd({
|
|
|
3487
3495
|
onClick: l,
|
|
3488
3496
|
className: "flex w-full items-center gap-2 rounded-control px-2 py-1.5 text-left hover:bg-muted",
|
|
3489
3497
|
children: [
|
|
3490
|
-
/* @__PURE__ */ t(
|
|
3498
|
+
/* @__PURE__ */ t(Ha, { className: "h-3.5 w-3.5 shrink-0 text-muted-foreground" }),
|
|
3491
3499
|
/* @__PURE__ */ s("div", { className: "min-w-0", children: [
|
|
3492
3500
|
/* @__PURE__ */ s("div", { className: "text-[13px] text-foreground", children: [
|
|
3493
3501
|
"Send to ",
|
|
@@ -3499,7 +3507,7 @@ function nd({
|
|
|
3499
3507
|
]
|
|
3500
3508
|
}
|
|
3501
3509
|
) }) : null,
|
|
3502
|
-
|
|
3510
|
+
A ? /* @__PURE__ */ t("div", { className: "px-2.5 py-6 text-center text-[12px] text-muted-foreground", children: f ? "No people or groups match. Enter a valid email to add an external recipient." : "Pick a category above or type to search people, groups, or external emails." }) : null
|
|
3503
3511
|
] });
|
|
3504
3512
|
}
|
|
3505
3513
|
function Qr({
|
|
@@ -3557,7 +3565,7 @@ function Ln({
|
|
|
3557
3565
|
onError: c,
|
|
3558
3566
|
onTimeout: d
|
|
3559
3567
|
}) {
|
|
3560
|
-
const [u, p] =
|
|
3568
|
+
const [u, p] = E(null), [f, h] = E("idle"), g = Ie(null), D = Ie({
|
|
3561
3569
|
fetchRun: o,
|
|
3562
3570
|
onRun: i,
|
|
3563
3571
|
onTerminalRun: l,
|
|
@@ -3573,7 +3581,7 @@ function Ln({
|
|
|
3573
3581
|
onTimeout: d
|
|
3574
3582
|
};
|
|
3575
3583
|
}, [o, c, i, l, d]);
|
|
3576
|
-
const
|
|
3584
|
+
const A = pe(() => {
|
|
3577
3585
|
p(null), h("idle");
|
|
3578
3586
|
}, []), N = pe(() => {
|
|
3579
3587
|
g.current = null;
|
|
@@ -3599,11 +3607,11 @@ function Ln({
|
|
|
3599
3607
|
return;
|
|
3600
3608
|
}
|
|
3601
3609
|
let x = !1, w = !1, T = null;
|
|
3602
|
-
const
|
|
3603
|
-
var
|
|
3610
|
+
const $ = Date.now(), S = async () => {
|
|
3611
|
+
var R, U, z, B, j, _;
|
|
3604
3612
|
if (!(x || w)) {
|
|
3605
|
-
if (Date.now() -
|
|
3606
|
-
p((M) => M === u ? null : M), h("timed_out"), (
|
|
3613
|
+
if (Date.now() - $ > a) {
|
|
3614
|
+
p((M) => M === u ? null : M), h("timed_out"), (U = (R = D.current).onTimeout) == null || U.call(R, u);
|
|
3607
3615
|
return;
|
|
3608
3616
|
}
|
|
3609
3617
|
w = !0;
|
|
@@ -3616,22 +3624,22 @@ function Ln({
|
|
|
3616
3624
|
if (x)
|
|
3617
3625
|
return;
|
|
3618
3626
|
if (D.current.onRun(M), Ut(M.status)) {
|
|
3619
|
-
g.current = M.id, p((
|
|
3627
|
+
g.current = M.id, p((W) => W === M.id ? null : W), h("terminal"), (B = (z = D.current).onTerminalRun) == null || B.call(z, M);
|
|
3620
3628
|
return;
|
|
3621
3629
|
}
|
|
3622
3630
|
if (!_t(M.status)) {
|
|
3623
|
-
p((
|
|
3631
|
+
p((W) => W === M.id ? null : W), h("idle");
|
|
3624
3632
|
return;
|
|
3625
3633
|
}
|
|
3626
|
-
T = window.setTimeout(
|
|
3634
|
+
T = window.setTimeout(S, r);
|
|
3627
3635
|
} catch (M) {
|
|
3628
|
-
x || (h("error"), (
|
|
3636
|
+
x || (h("error"), (_ = (j = D.current).onError) == null || _.call(j, M));
|
|
3629
3637
|
} finally {
|
|
3630
3638
|
w = !1;
|
|
3631
3639
|
}
|
|
3632
3640
|
}
|
|
3633
3641
|
};
|
|
3634
|
-
return h("polling"),
|
|
3642
|
+
return h("polling"), S(), () => {
|
|
3635
3643
|
x = !0, T && window.clearTimeout(T);
|
|
3636
3644
|
};
|
|
3637
3645
|
}, [u, e, r, a, n]), {
|
|
@@ -3641,7 +3649,7 @@ function Ln({
|
|
|
3641
3649
|
startRun: b,
|
|
3642
3650
|
startRunId: C,
|
|
3643
3651
|
status: f,
|
|
3644
|
-
stop:
|
|
3652
|
+
stop: A
|
|
3645
3653
|
};
|
|
3646
3654
|
}
|
|
3647
3655
|
function Xr({
|
|
@@ -3777,7 +3785,7 @@ function xn({
|
|
|
3777
3785
|
r ? "border-primary bg-primary" : "border-border"
|
|
3778
3786
|
),
|
|
3779
3787
|
children: r ? /* @__PURE__ */ t(
|
|
3780
|
-
|
|
3788
|
+
qe,
|
|
3781
3789
|
{
|
|
3782
3790
|
className: "h-2 w-2 text-primary-foreground",
|
|
3783
3791
|
strokeWidth: 3.5
|
|
@@ -3941,12 +3949,12 @@ function sd({
|
|
|
3941
3949
|
timezone: n,
|
|
3942
3950
|
onScheduleChange: r
|
|
3943
3951
|
}) {
|
|
3944
|
-
const a = O(() => ri(e), [e]), [o, i] =
|
|
3952
|
+
const a = O(() => ri(e), [e]), [o, i] = E(() => jt()), [l, c] = E(null), d = ai(
|
|
3945
3953
|
a,
|
|
3946
3954
|
n,
|
|
3947
3955
|
aa(o),
|
|
3948
3956
|
l ? sa(l) : null
|
|
3949
|
-
), [u, p] =
|
|
3957
|
+
), [u, p] = E(!1), f = (b) => {
|
|
3950
3958
|
r({
|
|
3951
3959
|
scheduleExpr: kn(b),
|
|
3952
3960
|
timezone: n
|
|
@@ -3958,7 +3966,7 @@ function sd({
|
|
|
3958
3966
|
f({ ...a, hour: b, minute: C });
|
|
3959
3967
|
}, D = (b) => {
|
|
3960
3968
|
f({ ...a, weekdays: b });
|
|
3961
|
-
},
|
|
3969
|
+
}, A = `${String(a.hour).padStart(2, "0")}:${String(a.minute).padStart(2, "0")}`, N = O(() => od(), []);
|
|
3962
3970
|
return /* @__PURE__ */ s("div", { className: "space-y-2", children: [
|
|
3963
3971
|
/* @__PURE__ */ s("div", { className: "flex items-center justify-between gap-3", children: [
|
|
3964
3972
|
/* @__PURE__ */ t("span", { className: Z, children: "When" }),
|
|
@@ -3989,7 +3997,7 @@ function sd({
|
|
|
3989
3997
|
/* @__PURE__ */ s(
|
|
3990
3998
|
Qe,
|
|
3991
3999
|
{
|
|
3992
|
-
value:
|
|
4000
|
+
value: A,
|
|
3993
4001
|
onValueChange: (b) => {
|
|
3994
4002
|
const [C, x] = b.split(":").map((w) => parseInt(w, 10));
|
|
3995
4003
|
g(C, x);
|
|
@@ -4189,7 +4197,7 @@ function oa({
|
|
|
4189
4197
|
onChange: l,
|
|
4190
4198
|
renderLabel: c
|
|
4191
4199
|
}) {
|
|
4192
|
-
const [d, u] =
|
|
4200
|
+
const [d, u] = E(!1), p = c(e), f = !e;
|
|
4193
4201
|
return /* @__PURE__ */ s(Re, { open: d, onOpenChange: u, children: [
|
|
4194
4202
|
/* @__PURE__ */ t(tt, { asChild: !0, children: /* @__PURE__ */ s(
|
|
4195
4203
|
"button",
|
|
@@ -4255,7 +4263,7 @@ function dd({
|
|
|
4255
4263
|
sourceDetail: r,
|
|
4256
4264
|
onChange: a
|
|
4257
4265
|
}) {
|
|
4258
|
-
const [o, i] =
|
|
4266
|
+
const [o, i] = E(!1), l = Ie(null), c = n.source.type === "dashboard" ? n.source : null, d = c !== null;
|
|
4259
4267
|
ue(() => {
|
|
4260
4268
|
if (!o) return;
|
|
4261
4269
|
const N = (b) => {
|
|
@@ -4264,7 +4272,7 @@ function dd({
|
|
|
4264
4272
|
};
|
|
4265
4273
|
return document.addEventListener("mousedown", N), () => document.removeEventListener("mousedown", N);
|
|
4266
4274
|
}, [o]);
|
|
4267
|
-
const u = e.type === "project", p = n.source.type === "dashboard" ? n.label ?? "This dashboard" : "This dashboard", f = n.source.type === "dashboard" ? n.detail ?? r ?? null : r, h = "This project", g = "Use any data in this project.", D = u ? h : p,
|
|
4275
|
+
const u = e.type === "project", p = n.source.type === "dashboard" ? n.label ?? "This dashboard" : "This dashboard", f = n.source.type === "dashboard" ? n.detail ?? r ?? null : r, h = "This project", g = "Use any data in this project.", D = u ? h : p, A = u ? g : f;
|
|
4268
4276
|
return d ? /* @__PURE__ */ s("div", { className: "relative", children: [
|
|
4269
4277
|
/* @__PURE__ */ s(
|
|
4270
4278
|
"button",
|
|
@@ -4278,9 +4286,9 @@ function dd({
|
|
|
4278
4286
|
/* @__PURE__ */ s("div", { className: "flex min-w-0 items-center gap-2 text-[12px]", children: [
|
|
4279
4287
|
/* @__PURE__ */ t(gt, { className: "h-3 w-3 shrink-0 text-muted-foreground/70" }),
|
|
4280
4288
|
/* @__PURE__ */ t("span", { className: "text-foreground", children: D }),
|
|
4281
|
-
|
|
4289
|
+
A ? /* @__PURE__ */ s(se, { children: [
|
|
4282
4290
|
/* @__PURE__ */ t("span", { className: "text-muted-foreground/70", "aria-hidden": !0, children: "·" }),
|
|
4283
|
-
/* @__PURE__ */ t("span", { className: "truncate text-muted-foreground/70", children:
|
|
4291
|
+
/* @__PURE__ */ t("span", { className: "truncate text-muted-foreground/70", children: A })
|
|
4284
4292
|
] }) : null
|
|
4285
4293
|
] }),
|
|
4286
4294
|
/* @__PURE__ */ s("span", { className: "inline-flex shrink-0 items-center gap-1 text-[11px] text-muted-foreground group-hover:text-foreground", children: [
|
|
@@ -4338,7 +4346,7 @@ function dd({
|
|
|
4338
4346
|
/* @__PURE__ */ t(gt, { className: "h-3 w-3 text-muted-foreground/70" }),
|
|
4339
4347
|
/* @__PURE__ */ t("span", { className: "text-foreground", children: D })
|
|
4340
4348
|
] }),
|
|
4341
|
-
|
|
4349
|
+
A ? /* @__PURE__ */ t("div", { className: "mt-0.5 pl-5 text-[11px] text-muted-foreground", children: A }) : null
|
|
4342
4350
|
] });
|
|
4343
4351
|
}
|
|
4344
4352
|
function ia({
|
|
@@ -4395,13 +4403,13 @@ function cd({
|
|
|
4395
4403
|
disabled: l,
|
|
4396
4404
|
className: c
|
|
4397
4405
|
}) {
|
|
4398
|
-
const d =
|
|
4406
|
+
const d = Ie(null), [u, p] = E(!1), [f, h] = E(""), g = O(
|
|
4399
4407
|
() => e.find((b) => b.id === n) ?? null,
|
|
4400
4408
|
[e, n]
|
|
4401
4409
|
), D = O(() => {
|
|
4402
4410
|
const b = f.trim().toLowerCase();
|
|
4403
4411
|
return b ? e.filter((C) => C.name.toLowerCase().includes(b)) : e;
|
|
4404
|
-
}, [e, f]),
|
|
4412
|
+
}, [e, f]), A = a === "dm", N = l || A;
|
|
4405
4413
|
return /* @__PURE__ */ t("div", { className: v("relative", c), children: /* @__PURE__ */ s(Re, { open: u && !N, onOpenChange: p, children: [
|
|
4406
4414
|
/* @__PURE__ */ t(Na, { asChild: !0, children: /* @__PURE__ */ s(
|
|
4407
4415
|
"div",
|
|
@@ -4468,7 +4476,7 @@ function cd({
|
|
|
4468
4476
|
className: "h-6 min-w-[140px] flex-1 bg-transparent text-[12px] text-foreground outline-none placeholder:text-muted-foreground/70 disabled:cursor-not-allowed",
|
|
4469
4477
|
value: f,
|
|
4470
4478
|
disabled: N,
|
|
4471
|
-
placeholder:
|
|
4479
|
+
placeholder: A ? "DM delivery coming in V2" : g ? "Change channel…" : i ? "Loading channels…" : "Search channels…",
|
|
4472
4480
|
onChange: (b) => {
|
|
4473
4481
|
h(b.target.value), p(!0);
|
|
4474
4482
|
},
|
|
@@ -4502,7 +4510,7 @@ function cd({
|
|
|
4502
4510
|
C ? "bg-muted text-foreground" : "text-foreground/85 hover:bg-muted/60"
|
|
4503
4511
|
),
|
|
4504
4512
|
children: [
|
|
4505
|
-
b.isPrivate ? /* @__PURE__ */ t(Oa, { className: "h-3 w-3 shrink-0 text-muted-foreground" }) : /* @__PURE__ */ t(
|
|
4513
|
+
b.isPrivate ? /* @__PURE__ */ t(Oa, { className: "h-3 w-3 shrink-0 text-muted-foreground" }) : /* @__PURE__ */ t(Kn, { className: "h-3 w-3 shrink-0 text-muted-foreground" }),
|
|
4506
4514
|
/* @__PURE__ */ t("span", { className: "truncate", children: b.name }),
|
|
4507
4515
|
typeof b.memberCount == "number" ? /* @__PURE__ */ s("span", { className: "ml-auto text-[11px] text-muted-foreground", children: [
|
|
4508
4516
|
b.memberCount,
|
|
@@ -4521,7 +4529,7 @@ function ud({
|
|
|
4521
4529
|
onRemove: n
|
|
4522
4530
|
}) {
|
|
4523
4531
|
return /* @__PURE__ */ s("span", { className: "inline-flex h-6 max-w-full items-center gap-1.5 rounded-control border border-border bg-muted pl-1.5 pr-1 text-[12px]", children: [
|
|
4524
|
-
/* @__PURE__ */ t("span", { className: "shrink-0 text-muted-foreground", children: e.isPrivate ? /* @__PURE__ */ t(Oa, { className: "h-3 w-3" }) : /* @__PURE__ */ t(
|
|
4532
|
+
/* @__PURE__ */ t("span", { className: "shrink-0 text-muted-foreground", children: e.isPrivate ? /* @__PURE__ */ t(Oa, { className: "h-3 w-3" }) : /* @__PURE__ */ t(Kn, { className: "h-3 w-3" }) }),
|
|
4525
4533
|
/* @__PURE__ */ t("span", { className: "min-w-0 truncate text-foreground", children: e.name }),
|
|
4526
4534
|
typeof e.memberCount == "number" ? /* @__PURE__ */ s("span", { className: "shrink-0 text-muted-foreground", children: [
|
|
4527
4535
|
"· ",
|
|
@@ -4559,7 +4567,7 @@ function bs(e) {
|
|
|
4559
4567
|
const n = O(
|
|
4560
4568
|
() => e ? new Date(e).getTime() : null,
|
|
4561
4569
|
[e]
|
|
4562
|
-
), [r, a] =
|
|
4570
|
+
), [r, a] = E(() => Date.now());
|
|
4563
4571
|
return ue(() => {
|
|
4564
4572
|
if (n === null) return;
|
|
4565
4573
|
a(Date.now());
|
|
@@ -4818,7 +4826,7 @@ function xd(e) {
|
|
|
4818
4826
|
return e.status === "SENT" ? Y.success.surface : e.status === "FAILED" || e.status === "PARTIAL" ? Y.danger.surface : Y.warning.surface;
|
|
4819
4827
|
}
|
|
4820
4828
|
function vs(e) {
|
|
4821
|
-
return e.status === "SUCCESS" ? /* @__PURE__ */ t(
|
|
4829
|
+
return e.status === "SUCCESS" ? /* @__PURE__ */ t(qe, { className: v("h-3 w-3", Y.success.icon) }) : e.status === "FAILED" ? /* @__PURE__ */ t(Ce, { className: v("h-3 w-3", Y.danger.icon) }) : e.status === "RUNNING" ? /* @__PURE__ */ t(ne, { className: "h-3 w-3 animate-spin text-muted-foreground" }) : /* @__PURE__ */ t("span", { className: "inline-block h-1.5 w-1.5 rounded-full bg-muted-foreground/70" });
|
|
4822
4830
|
}
|
|
4823
4831
|
const yd = [
|
|
4824
4832
|
{ pattern: /^plan preview/i, label: "Plan preview" },
|
|
@@ -4988,7 +4996,7 @@ function Ns({
|
|
|
4988
4996
|
{
|
|
4989
4997
|
className: "flex items-start gap-2 text-[11px] leading-[1.45] text-muted-foreground",
|
|
4990
4998
|
children: [
|
|
4991
|
-
/* @__PURE__ */ t(
|
|
4999
|
+
/* @__PURE__ */ t(qe, { className: "mt-0.5 h-3 w-3 shrink-0 text-border" }),
|
|
4992
5000
|
/* @__PURE__ */ t("span", { children: ks(d.label) })
|
|
4993
5001
|
]
|
|
4994
5002
|
},
|
|
@@ -5008,7 +5016,7 @@ function ws({
|
|
|
5008
5016
|
onDeleteRun: o,
|
|
5009
5017
|
deletePending: i
|
|
5010
5018
|
}) {
|
|
5011
|
-
const [l, c] =
|
|
5019
|
+
const [l, c] = E(!1), [d, u] = E(!1), p = Cs(
|
|
5012
5020
|
e.completedAt ?? e.startedAt ?? e.scheduledFor
|
|
5013
5021
|
), h = (e.error ? /cancel/i.test(e.error) : !1) ? "Run cancelled" : "Run failed";
|
|
5014
5022
|
return /* @__PURE__ */ s(
|
|
@@ -5134,7 +5142,7 @@ function Cd({ run: e }) {
|
|
|
5134
5142
|
"aria-label": "Email delivery status",
|
|
5135
5143
|
children: [
|
|
5136
5144
|
/* @__PURE__ */ s("div", { className: "flex items-center gap-2 font-medium", children: [
|
|
5137
|
-
/* @__PURE__ */ t(
|
|
5145
|
+
/* @__PURE__ */ t(Ti, { className: "h-3.5 w-3.5 shrink-0" }),
|
|
5138
5146
|
/* @__PURE__ */ t("span", { children: bd(n) })
|
|
5139
5147
|
] }),
|
|
5140
5148
|
n.message ? /* @__PURE__ */ t("p", { className: "mt-1 text-[11px] leading-[1.5] opacity-80", children: n.message }) : null,
|
|
@@ -5255,7 +5263,7 @@ function ma({ run: e }) {
|
|
|
5255
5263
|
{
|
|
5256
5264
|
className: "flex items-start gap-2 text-[11px] leading-[1.45] text-muted-foreground",
|
|
5257
5265
|
children: l ? /* @__PURE__ */ s(se, { children: [
|
|
5258
|
-
/* @__PURE__ */ t(
|
|
5266
|
+
/* @__PURE__ */ t(qe, { className: "mt-0.5 h-3 w-3 shrink-0 text-border" }),
|
|
5259
5267
|
/* @__PURE__ */ t("span", { children: ks(l.label) })
|
|
5260
5268
|
] }) : /* @__PURE__ */ s(se, { children: [
|
|
5261
5269
|
/* @__PURE__ */ t("span", { className: "mt-1.5 inline-block h-px w-3 shrink-0 bg-border" }),
|
|
@@ -5363,7 +5371,7 @@ function Dd({
|
|
|
5363
5371
|
i ? Y.success.iconBg : Y.danger.iconBg
|
|
5364
5372
|
),
|
|
5365
5373
|
children: i ? /* @__PURE__ */ t(
|
|
5366
|
-
|
|
5374
|
+
qe,
|
|
5367
5375
|
{
|
|
5368
5376
|
className: v(
|
|
5369
5377
|
"h-3 w-3",
|
|
@@ -5424,10 +5432,10 @@ function Ld({
|
|
|
5424
5432
|
onMinimizeRun: i,
|
|
5425
5433
|
detailsVisible: l
|
|
5426
5434
|
}) {
|
|
5427
|
-
var
|
|
5435
|
+
var A, N, b, C;
|
|
5428
5436
|
const c = n && it(n.status) ? n : null, d = r;
|
|
5429
5437
|
let u = null, p = null, f = !1;
|
|
5430
|
-
if (e === "plan" ? (u = "Reviewing your brief", p = "Reading the brief and planning the analysis…") : e === "preview" ? (u = "Starting preview run", p = "Starting the preview…") : e === "run" ? (u = "Starting briefing run", p = "Preparing the run…") : c ? (u = (
|
|
5438
|
+
if (e === "plan" ? (u = "Reviewing your brief", p = "Reading the brief and planning the analysis…") : e === "preview" ? (u = "Starting preview run", p = "Starting the preview…") : e === "run" ? (u = "Starting briefing run", p = "Preparing the run…") : c ? (u = (A = c.progress) != null && A.label ? zt(c.progress.label) : "Running preview", p = ((N = c.progress) == null ? void 0 : N.detail) ?? null, f = !!c.progress) : d && (u = (b = d.progress) != null && b.label ? zt(d.progress.label) : "Running", p = ((C = d.progress) == null ? void 0 : C.detail) ?? null, f = !!d.progress), !u)
|
|
5431
5439
|
return null;
|
|
5432
5440
|
const h = !l && p, g = d ?? c, D = !!(d && i) && e !== "cancelRun";
|
|
5433
5441
|
return /* @__PURE__ */ t(
|
|
@@ -5524,7 +5532,7 @@ function As({
|
|
|
5524
5532
|
function Fd({
|
|
5525
5533
|
recipient: e
|
|
5526
5534
|
}) {
|
|
5527
|
-
const [n, r] =
|
|
5535
|
+
const [n, r] = E(!1), a = e.previewMembers ?? [];
|
|
5528
5536
|
return e.type === "group" && a.length > 0 ? /* @__PURE__ */ s("div", { className: "relative inline-flex", children: [
|
|
5529
5537
|
/* @__PURE__ */ s(
|
|
5530
5538
|
"button",
|
|
@@ -5626,7 +5634,7 @@ function Zn({
|
|
|
5626
5634
|
onExpand: n
|
|
5627
5635
|
}) {
|
|
5628
5636
|
var i;
|
|
5629
|
-
const [r, a] =
|
|
5637
|
+
const [r, a] = E("rendered"), o = !!((i = e.bodyHtml) != null && i.trim());
|
|
5630
5638
|
return /* @__PURE__ */ s("article", { className: "overflow-hidden rounded-card border border-border bg-background", children: [
|
|
5631
5639
|
/* @__PURE__ */ s("header", { className: "flex items-start justify-between gap-3 border-b border-border/60 px-4 py-3", children: [
|
|
5632
5640
|
/* @__PURE__ */ s("div", { className: "min-w-0 flex-1", children: [
|
|
@@ -5748,7 +5756,7 @@ function vn({ size: e = 6 }) {
|
|
|
5748
5756
|
function Od({ channel: e }) {
|
|
5749
5757
|
const r = /^[CDG][A-Z0-9]{6,}$/.test(e) ? e : e.startsWith("#") ? e.slice(1) : e;
|
|
5750
5758
|
return /* @__PURE__ */ s("span", { className: "inline-flex items-center gap-1 text-[11px] text-muted-foreground", children: [
|
|
5751
|
-
/* @__PURE__ */ t(
|
|
5759
|
+
/* @__PURE__ */ t(Kn, { className: "h-3 w-3" }),
|
|
5752
5760
|
/* @__PURE__ */ t("span", { className: "truncate", children: r })
|
|
5753
5761
|
] });
|
|
5754
5762
|
}
|
|
@@ -5758,7 +5766,7 @@ function Vd({
|
|
|
5758
5766
|
trustLine: r,
|
|
5759
5767
|
reactions: a
|
|
5760
5768
|
}) {
|
|
5761
|
-
const o = Bd(e.blocks), i = o.header ? dt(o.header.text) : null, l = o.context ? Pd(o.context) : null, c = o.sections.map((f) => dt(f.text)).filter((f) => !!f), d = o.actions ? Md([o.actions]) : [], [u, p] =
|
|
5769
|
+
const o = Bd(e.blocks), i = o.header ? dt(o.header.text) : null, l = o.context ? Pd(o.context) : null, c = o.sections.map((f) => dt(f.text)).filter((f) => !!f), d = o.actions ? Md([o.actions]) : [], [u, p] = E(!0);
|
|
5762
5770
|
return /* @__PURE__ */ s("article", { className: "overflow-hidden rounded-card border border-border bg-background", children: [
|
|
5763
5771
|
/* @__PURE__ */ s("header", { className: "flex items-center justify-between gap-3 border-b border-border/60 px-4 py-3", children: [
|
|
5764
5772
|
/* @__PURE__ */ s("div", { className: "flex min-w-0 items-center gap-2", children: [
|
|
@@ -5893,7 +5901,7 @@ function Ud({
|
|
|
5893
5901
|
detail: r,
|
|
5894
5902
|
optional: a
|
|
5895
5903
|
}) {
|
|
5896
|
-
const [o, i] =
|
|
5904
|
+
const [o, i] = E(!1);
|
|
5897
5905
|
return /* @__PURE__ */ s("li", { className: "flex items-start gap-3", children: [
|
|
5898
5906
|
/* @__PURE__ */ t(
|
|
5899
5907
|
"span",
|
|
@@ -6073,7 +6081,7 @@ function _d({
|
|
|
6073
6081
|
return /* @__PURE__ */ t("div", { className: v("rounded-card border px-3 py-2", Y.success.surface), children: /* @__PURE__ */ s("div", { className: "flex items-start justify-between gap-3", children: [
|
|
6074
6082
|
/* @__PURE__ */ s("div", { className: "min-w-0", children: [
|
|
6075
6083
|
/* @__PURE__ */ s("div", { className: v("flex items-center gap-1.5 text-[11px] font-medium", Y.success.label), children: [
|
|
6076
|
-
/* @__PURE__ */ t(
|
|
6084
|
+
/* @__PURE__ */ t(qe, { className: "h-3 w-3 shrink-0" }),
|
|
6077
6085
|
/* @__PURE__ */ t("span", { children: "Preview output available" })
|
|
6078
6086
|
] }),
|
|
6079
6087
|
/* @__PURE__ */ t("div", { className: "mt-1 truncate text-[12px] text-foreground/80", children: a }),
|
|
@@ -6115,11 +6123,11 @@ const zd = {
|
|
|
6115
6123
|
runBriefingPreview: pl,
|
|
6116
6124
|
getBriefingPreviewRun: fl,
|
|
6117
6125
|
polishBriefingText: xl
|
|
6118
|
-
}, fa = 2e3,
|
|
6119
|
-
function
|
|
6126
|
+
}, fa = 2e3, qd = 10 * 6e4, Hd = 20 * 6e4;
|
|
6127
|
+
function Kd() {
|
|
6120
6128
|
return typeof crypto < "u" && typeof crypto.randomUUID == "function" ? crypto.randomUUID() : `briefing-run-${Date.now()}-${Math.random().toString(36).slice(2, 8)}`;
|
|
6121
6129
|
}
|
|
6122
|
-
function
|
|
6130
|
+
function Ee(e) {
|
|
6123
6131
|
return e instanceof Error && e.message ? e.message : "Something went wrong. Please try again.";
|
|
6124
6132
|
}
|
|
6125
6133
|
function Wd(e, n) {
|
|
@@ -6187,7 +6195,7 @@ function Qd({
|
|
|
6187
6195
|
title: o = "Briefing",
|
|
6188
6196
|
className: i,
|
|
6189
6197
|
client: l,
|
|
6190
|
-
generateRequestId: c =
|
|
6198
|
+
generateRequestId: c = Kd,
|
|
6191
6199
|
onSaved: d,
|
|
6192
6200
|
onDeleted: u,
|
|
6193
6201
|
onRunStarted: p,
|
|
@@ -6196,48 +6204,48 @@ function Qd({
|
|
|
6196
6204
|
onMinimizeRun: g
|
|
6197
6205
|
}) {
|
|
6198
6206
|
var Cr, kr, Sr, Ar, Er, Ir, Dr, Tr, Lr;
|
|
6199
|
-
const { authToken: D, tokenProps:
|
|
6207
|
+
const { authToken: D, tokenProps: A } = It(), N = ((kr = (Cr = A.config) == null ? void 0 : Cr.projectFeatures) == null ? void 0 : kr.features.aiWritingHelpers) !== !1, { currentUser: b } = Ma(), C = H((m) => m.dashboard), x = H((m) => m.theme), w = H((m) => m.selectedSheetId), T = H((m) => m.filterValues), $ = H((m) => m.controlValues), S = H(
|
|
6200
6208
|
(m) => m.semanticExecutionPayload
|
|
6201
|
-
),
|
|
6209
|
+
), R = H(
|
|
6202
6210
|
(m) => m.cardControlValuesMap
|
|
6203
|
-
),
|
|
6211
|
+
), U = H(
|
|
6204
6212
|
(m) => m.inlineFilterValuesMap
|
|
6205
|
-
),
|
|
6213
|
+
), z = H(
|
|
6206
6214
|
(m) => m.dashboardInputValues
|
|
6207
|
-
),
|
|
6215
|
+
), B = po((m) => m.interactionStates), j = e ?? (A == null ? void 0 : A.apiServiceUrl), _ = n ?? (D == null ? void 0 : D.accessToken), M = O(() => ({ ...zd, ...l }), [l]), W = O(
|
|
6208
6216
|
() => Is(r, a),
|
|
6209
6217
|
[r, a]
|
|
6210
6218
|
), le = O(
|
|
6211
6219
|
() => md(b),
|
|
6212
6220
|
[b]
|
|
6213
|
-
), [L, G] =
|
|
6221
|
+
), [L, G] = E(
|
|
6214
6222
|
r ?? null
|
|
6215
|
-
), [k, xe] =
|
|
6223
|
+
), [k, xe] = E(
|
|
6216
6224
|
() => ga({
|
|
6217
6225
|
briefing: r,
|
|
6218
|
-
sourceContext:
|
|
6226
|
+
sourceContext: W,
|
|
6219
6227
|
defaultRecipient: le
|
|
6220
6228
|
})
|
|
6221
|
-
), [de, re] =
|
|
6229
|
+
), [de, re] = E(null), [Se, De] = E([]), [me, q] = E(null), [lt, Te] = E(null), [He, Pe] = E(
|
|
6222
6230
|
null
|
|
6223
|
-
), [
|
|
6231
|
+
), [K, Me] = E(null), [V, ee] = E(0), [Tt, xt] = E(null), [I, P] = E(!1), [Ae, X] = E("edit"), [Ke, We] = E(0), [Kt, Ls] = E(!1), [Rs, Wt] = E("EMAIL"), [Fs, Gt] = E(!1), [er, Jt] = E(null), [Ps, Qt] = E(!1), [ce, Ms] = E(
|
|
6224
6232
|
null
|
|
6225
|
-
), [Yt, tr] =
|
|
6233
|
+
), [Yt, tr] = E([]), [Lt, nr] = E(!1), [rr, ar] = E(null), [Bs, Os] = E(0), [rt, Rt] = E(null), [Vs, Xt] = E(!1), [Zt, sr] = E(!1), [or, ir] = E(null), [yt, en] = E(null);
|
|
6226
6234
|
ue(() => {
|
|
6227
6235
|
if (!yt) return;
|
|
6228
6236
|
const m = window.setTimeout(() => en(null), 12e3);
|
|
6229
6237
|
return () => window.clearTimeout(m);
|
|
6230
6238
|
}, [yt]);
|
|
6231
|
-
const lr =
|
|
6239
|
+
const lr = Ie(void 0), {
|
|
6232
6240
|
activeRunId: $s,
|
|
6233
6241
|
resetTerminalRun: dr,
|
|
6234
6242
|
startRun: tn,
|
|
6235
6243
|
stop: nn
|
|
6236
6244
|
} = Ln({
|
|
6237
|
-
apiServiceUrl:
|
|
6238
|
-
token:
|
|
6245
|
+
apiServiceUrl: j,
|
|
6246
|
+
token: _,
|
|
6239
6247
|
intervalMs: fa,
|
|
6240
|
-
timeoutMs:
|
|
6248
|
+
timeoutMs: Hd,
|
|
6241
6249
|
fetchRun: ({ apiServiceUrl: m, token: y, runId: F }) => {
|
|
6242
6250
|
if (!(L != null && L.id))
|
|
6243
6251
|
throw new Error("Missing saved Briefing id for run polling.");
|
|
@@ -6255,7 +6263,7 @@ function Qd({
|
|
|
6255
6263
|
X("result"), q(null);
|
|
6256
6264
|
},
|
|
6257
6265
|
onError: (m) => {
|
|
6258
|
-
q(`Unable to refresh briefing run status: ${
|
|
6266
|
+
q(`Unable to refresh briefing run status: ${Ee(m)}`);
|
|
6259
6267
|
},
|
|
6260
6268
|
onTimeout: () => {
|
|
6261
6269
|
q(
|
|
@@ -6267,23 +6275,23 @@ function Qd({
|
|
|
6267
6275
|
startRun: _s,
|
|
6268
6276
|
stop: cr
|
|
6269
6277
|
} = Ln({
|
|
6270
|
-
apiServiceUrl:
|
|
6271
|
-
token:
|
|
6278
|
+
apiServiceUrl: j,
|
|
6279
|
+
token: _,
|
|
6272
6280
|
intervalMs: fa,
|
|
6273
|
-
timeoutMs:
|
|
6281
|
+
timeoutMs: qd,
|
|
6274
6282
|
fetchRun: ({ apiServiceUrl: m, token: y, runId: F }) => M.getBriefingPreviewRun(
|
|
6275
6283
|
m,
|
|
6276
6284
|
y,
|
|
6277
6285
|
F
|
|
6278
6286
|
),
|
|
6279
6287
|
onRun: (m) => {
|
|
6280
|
-
Me(m), m.status === "SUCCESS" && xt((y) => y ??
|
|
6288
|
+
Me(m), m.status === "SUCCESS" && xt((y) => y ?? V);
|
|
6281
6289
|
},
|
|
6282
6290
|
onTerminalRun: (m) => {
|
|
6283
6291
|
m.status === "FAILED" ? q(m.error || "Briefing preview failed.") : (q(null), X("result"));
|
|
6284
6292
|
},
|
|
6285
6293
|
onError: (m) => {
|
|
6286
|
-
q(`Unable to refresh briefing preview status: ${
|
|
6294
|
+
q(`Unable to refresh briefing preview status: ${Ee(m)}`);
|
|
6287
6295
|
},
|
|
6288
6296
|
onTimeout: (m) => {
|
|
6289
6297
|
Me(
|
|
@@ -6295,35 +6303,35 @@ function Qd({
|
|
|
6295
6303
|
} : y
|
|
6296
6304
|
), q("Briefing preview status refresh timed out.");
|
|
6297
6305
|
}
|
|
6298
|
-
}), oe = !!(L != null && L.id), rn = (L == null ? void 0 : L.status) === "PAUSED" || k.schedule.status === "PAUSED", js = oe && !!(L != null && L.scheduleExpr || k.schedule.enabled), at = lt ?? (L == null ? void 0 : L.latestRun) ?? null, ve = at && it(at.status) && $s === at.id ? at : null, we = at && gs(at.status) ? at : null, Ne =
|
|
6306
|
+
}), oe = !!(L != null && L.id), rn = (L == null ? void 0 : L.status) === "PAUSED" || k.schedule.status === "PAUSED", js = oe && !!(L != null && L.scheduleExpr || k.schedule.enabled), at = lt ?? (L == null ? void 0 : L.latestRun) ?? null, ve = at && it(at.status) && $s === at.id ? at : null, we = at && gs(at.status) ? at : null, Ne = Ae === "result" && ((K == null ? void 0 : K.status) === "SUCCESS" || we) ? "result" : Ae === "plan" && He ? "plan" : "edit", zs = W.detail ?? (k.source.type === "dashboard" ? (
|
|
6299
6307
|
// Prefer the dashboard's actual title from the store; never expose
|
|
6300
6308
|
// the raw ID to end users.
|
|
6301
6309
|
(C == null ? void 0 : C.title) ?? null
|
|
6302
|
-
) : "All project data available to this token"), ur = (L == null ? void 0 : L.status) ?? k.schedule.status, an =
|
|
6310
|
+
) : "All project data available to this token"), ur = (L == null ? void 0 : L.status) ?? k.schedule.status, an = K !== null && it(K.status) && Us === K.id || ve !== null, Ge = de !== null || an, qs = Ne === "edit" && we !== null && !an, sn = (K == null ? void 0 : K.status) === "SUCCESS" && K.result ? K : null, Hs = sn !== null && Tt !== null && Tt !== V, vt = er === "preview" ? K : null, Be = er === "saved" ? we : null, Nt = Be ? xs(Be) : null, Ks = ((Sr = vt == null ? void 0 : vt.result) == null ? void 0 : Sr.title) ?? (Nt == null ? void 0 : Nt.subject) ?? (ie(Be == null ? void 0 : Be.result) && typeof Be.result.title == "string" ? Be.result.title : null) ?? (L == null ? void 0 : L.name) ?? "Briefing preview", Ft = O(
|
|
6303
6311
|
() => ({
|
|
6304
6312
|
dashboard: C,
|
|
6305
6313
|
theme: x || "light",
|
|
6306
6314
|
filters: C == null ? void 0 : C.filters,
|
|
6307
6315
|
selectedSheetId: w,
|
|
6308
6316
|
filterValues: T,
|
|
6309
|
-
inlineFilterValuesMap:
|
|
6310
|
-
controlValues:
|
|
6317
|
+
inlineFilterValuesMap: U,
|
|
6318
|
+
controlValues: $,
|
|
6311
6319
|
controlDefinitions: (C == null ? void 0 : C.controls) || [],
|
|
6312
6320
|
dashboardControls: (C == null ? void 0 : C.controls) || [],
|
|
6313
|
-
cardControlValuesMap:
|
|
6314
|
-
dashboardInputValues:
|
|
6315
|
-
semanticExecutionPayload:
|
|
6316
|
-
interactionStates:
|
|
6321
|
+
cardControlValuesMap: R,
|
|
6322
|
+
dashboardInputValues: z,
|
|
6323
|
+
semanticExecutionPayload: S,
|
|
6324
|
+
interactionStates: B
|
|
6317
6325
|
}),
|
|
6318
6326
|
[
|
|
6319
|
-
|
|
6320
|
-
|
|
6327
|
+
R,
|
|
6328
|
+
$,
|
|
6321
6329
|
C,
|
|
6322
|
-
|
|
6330
|
+
z,
|
|
6323
6331
|
T,
|
|
6324
|
-
|
|
6325
|
-
|
|
6326
|
-
|
|
6332
|
+
B,
|
|
6333
|
+
U,
|
|
6334
|
+
S,
|
|
6327
6335
|
w,
|
|
6328
6336
|
x
|
|
6329
6337
|
]
|
|
@@ -6335,7 +6343,7 @@ function Qd({
|
|
|
6335
6343
|
lr.current = m, dr(), nn(), cr(), G(r ?? null);
|
|
6336
6344
|
let y = ga({
|
|
6337
6345
|
briefing: r,
|
|
6338
|
-
sourceContext:
|
|
6346
|
+
sourceContext: W,
|
|
6339
6347
|
defaultRecipient: le
|
|
6340
6348
|
}), F = null;
|
|
6341
6349
|
if (!r) {
|
|
@@ -6349,7 +6357,7 @@ function Qd({
|
|
|
6349
6357
|
y = Tn(
|
|
6350
6358
|
y,
|
|
6351
6359
|
Ue.draft(y.source, {
|
|
6352
|
-
attachments: Ue.seedsDashboardAttachment ?
|
|
6360
|
+
attachments: Ue.seedsDashboardAttachment ? qr({
|
|
6353
6361
|
source: y.source,
|
|
6354
6362
|
dashboard: C,
|
|
6355
6363
|
selectedSheetId: w,
|
|
@@ -6368,7 +6376,7 @@ function Qd({
|
|
|
6368
6376
|
C,
|
|
6369
6377
|
le,
|
|
6370
6378
|
dr,
|
|
6371
|
-
|
|
6379
|
+
W,
|
|
6372
6380
|
w,
|
|
6373
6381
|
tn,
|
|
6374
6382
|
cr,
|
|
@@ -6380,18 +6388,18 @@ function Qd({
|
|
|
6380
6388
|
recipients: Mt
|
|
6381
6389
|
}), ln = Oe && !on ? "SLACK" : on && !Oe ? "EMAIL" : Rs, dn = ln === "EMAIL" ? "SLACK" : "EMAIL";
|
|
6382
6390
|
ue(() => {
|
|
6383
|
-
if (!
|
|
6391
|
+
if (!j || !_ || !Oe)
|
|
6384
6392
|
return;
|
|
6385
6393
|
let m = !1;
|
|
6386
6394
|
return nr(!0), ar(null), Promise.all([
|
|
6387
6395
|
Nn(
|
|
6388
|
-
|
|
6389
|
-
|
|
6396
|
+
j,
|
|
6397
|
+
_,
|
|
6390
6398
|
"/v1/integrations/SLACK/status"
|
|
6391
6399
|
),
|
|
6392
6400
|
Nn(
|
|
6393
|
-
|
|
6394
|
-
|
|
6401
|
+
j,
|
|
6402
|
+
_,
|
|
6395
6403
|
"/v1/integrations/slack/channels"
|
|
6396
6404
|
).catch((y) => {
|
|
6397
6405
|
if (y instanceof Error && /not configured/i.test(y.message))
|
|
@@ -6401,7 +6409,7 @@ function Qd({
|
|
|
6401
6409
|
]).then(([y, F]) => {
|
|
6402
6410
|
m || (Ms(y), tr(F.channels));
|
|
6403
6411
|
}).catch((y) => {
|
|
6404
|
-
m || (ar(
|
|
6412
|
+
m || (ar(Ee(y)), tr([]));
|
|
6405
6413
|
}).finally(() => {
|
|
6406
6414
|
m || nr(!1);
|
|
6407
6415
|
}), () => {
|
|
@@ -6409,11 +6417,11 @@ function Qd({
|
|
|
6409
6417
|
};
|
|
6410
6418
|
}, [
|
|
6411
6419
|
Oe,
|
|
6412
|
-
|
|
6413
|
-
|
|
6420
|
+
j,
|
|
6421
|
+
_,
|
|
6414
6422
|
Bs
|
|
6415
6423
|
]), ue(() => {
|
|
6416
|
-
if (!
|
|
6424
|
+
if (!j || !_ || !Oe) {
|
|
6417
6425
|
Rt(null);
|
|
6418
6426
|
return;
|
|
6419
6427
|
}
|
|
@@ -6423,8 +6431,8 @@ function Qd({
|
|
|
6423
6431
|
}
|
|
6424
6432
|
let m = !1;
|
|
6425
6433
|
return Nn(
|
|
6426
|
-
|
|
6427
|
-
|
|
6434
|
+
j,
|
|
6435
|
+
_,
|
|
6428
6436
|
"/v1/integrations/slack/mention-status",
|
|
6429
6437
|
{
|
|
6430
6438
|
method: "POST",
|
|
@@ -6441,15 +6449,15 @@ function Qd({
|
|
|
6441
6449
|
}, [
|
|
6442
6450
|
Oe,
|
|
6443
6451
|
hr,
|
|
6444
|
-
|
|
6445
|
-
|
|
6452
|
+
j,
|
|
6453
|
+
_,
|
|
6446
6454
|
ce == null ? void 0 : ce.installed,
|
|
6447
6455
|
pr
|
|
6448
6456
|
]);
|
|
6449
6457
|
const ae = (m) => {
|
|
6450
6458
|
xe((y) => Tn(y, m)), De([]), q(null), L != null && L.id || (Pe(null), ee((y) => y + 1), X("edit"));
|
|
6451
|
-
}, $e = () => !
|
|
6452
|
-
const y =
|
|
6459
|
+
}, $e = () => !j || !_ ? (q("Missing Semaphor API credentials."), null) : { apiServiceUrl: j, token: _ }, Ws = async (m) => {
|
|
6460
|
+
const y = Kr(k);
|
|
6453
6461
|
if (De(y.issues), q(null), !y.valid)
|
|
6454
6462
|
return null;
|
|
6455
6463
|
const F = $e();
|
|
@@ -6465,17 +6473,17 @@ function Qd({
|
|
|
6465
6473
|
) : await M.createBriefing(
|
|
6466
6474
|
F.apiServiceUrl,
|
|
6467
6475
|
F.token,
|
|
6468
|
-
|
|
6476
|
+
Hr(k)
|
|
6469
6477
|
);
|
|
6470
6478
|
return G(Q.briefing), xe(St(Q.briefing)), d == null || d(Q.briefing), Q.briefing;
|
|
6471
6479
|
} catch (Q) {
|
|
6472
|
-
return q(
|
|
6480
|
+
return q(Ee(Q)), null;
|
|
6473
6481
|
} finally {
|
|
6474
6482
|
m != null && m.pendingAction && re(null);
|
|
6475
6483
|
}
|
|
6476
6484
|
}, Gs = async () => Ws({ pendingAction: "save" }), fr = () => {
|
|
6477
|
-
const m =
|
|
6478
|
-
return De(m.issues), q(null), m.valid ?
|
|
6485
|
+
const m = Kr(k);
|
|
6486
|
+
return De(m.issues), q(null), m.valid ? Hr(k) : null;
|
|
6479
6487
|
}, gr = async (m) => {
|
|
6480
6488
|
const y = $e();
|
|
6481
6489
|
if (!y)
|
|
@@ -6492,7 +6500,7 @@ function Qd({
|
|
|
6492
6500
|
);
|
|
6493
6501
|
return Pe(Q.plan), m != null && m.silent || X("plan"), Q.plan;
|
|
6494
6502
|
} catch (Q) {
|
|
6495
|
-
return q(
|
|
6503
|
+
return q(Ee(Q)), null;
|
|
6496
6504
|
} finally {
|
|
6497
6505
|
re(null);
|
|
6498
6506
|
}
|
|
@@ -6503,7 +6511,7 @@ function Qd({
|
|
|
6503
6511
|
const y = fr();
|
|
6504
6512
|
if (y)
|
|
6505
6513
|
try {
|
|
6506
|
-
const F =
|
|
6514
|
+
const F = He ?? await gr({ silent: !0 });
|
|
6507
6515
|
if (!F)
|
|
6508
6516
|
return;
|
|
6509
6517
|
re("preview");
|
|
@@ -6516,9 +6524,9 @@ function Qd({
|
|
|
6516
6524
|
requestId: c()
|
|
6517
6525
|
}
|
|
6518
6526
|
);
|
|
6519
|
-
xt(
|
|
6527
|
+
xt(V), _s(Q.previewRun);
|
|
6520
6528
|
} catch (F) {
|
|
6521
|
-
q(
|
|
6529
|
+
q(Ee(F));
|
|
6522
6530
|
} finally {
|
|
6523
6531
|
re(null);
|
|
6524
6532
|
}
|
|
@@ -6543,7 +6551,7 @@ function Qd({
|
|
|
6543
6551
|
);
|
|
6544
6552
|
tn(y.run), p == null || p(y);
|
|
6545
6553
|
} catch (y) {
|
|
6546
|
-
q(
|
|
6554
|
+
q(Ee(y));
|
|
6547
6555
|
} finally {
|
|
6548
6556
|
re(null);
|
|
6549
6557
|
}
|
|
@@ -6575,7 +6583,7 @@ function Qd({
|
|
|
6575
6583
|
);
|
|
6576
6584
|
nn(), Te(y.run), X("result"), await br().catch(() => null);
|
|
6577
6585
|
} catch (y) {
|
|
6578
|
-
q(
|
|
6586
|
+
q(Ee(y));
|
|
6579
6587
|
} finally {
|
|
6580
6588
|
re(null);
|
|
6581
6589
|
}
|
|
@@ -6599,7 +6607,7 @@ function Qd({
|
|
|
6599
6607
|
), Q = k.instruction;
|
|
6600
6608
|
ae({ instruction: F }), en({ previousText: Q });
|
|
6601
6609
|
} catch (F) {
|
|
6602
|
-
ir(
|
|
6610
|
+
ir(Ee(F));
|
|
6603
6611
|
} finally {
|
|
6604
6612
|
sr(!1);
|
|
6605
6613
|
}
|
|
@@ -6622,7 +6630,7 @@ function Qd({
|
|
|
6622
6630
|
const F = await br().catch(() => null), Q = (F == null ? void 0 : F.latestRun) ?? null;
|
|
6623
6631
|
Te(Q), Q || X("edit");
|
|
6624
6632
|
} catch (F) {
|
|
6625
|
-
q(
|
|
6633
|
+
q(Ee(F));
|
|
6626
6634
|
} finally {
|
|
6627
6635
|
re(null);
|
|
6628
6636
|
}
|
|
@@ -6645,7 +6653,7 @@ function Qd({
|
|
|
6645
6653
|
);
|
|
6646
6654
|
G(F.briefing), xe(St(F.briefing)), d == null || d(F.briefing);
|
|
6647
6655
|
} catch (F) {
|
|
6648
|
-
q(
|
|
6656
|
+
q(Ee(F));
|
|
6649
6657
|
} finally {
|
|
6650
6658
|
re(null);
|
|
6651
6659
|
}
|
|
@@ -6827,15 +6835,15 @@ function Qd({
|
|
|
6827
6835
|
Ld,
|
|
6828
6836
|
{
|
|
6829
6837
|
pendingAction: de,
|
|
6830
|
-
previewRun:
|
|
6838
|
+
previewRun: K,
|
|
6831
6839
|
savedActiveRun: ve,
|
|
6832
|
-
detailsVisible:
|
|
6840
|
+
detailsVisible: Kt,
|
|
6833
6841
|
onShowDetails: () => Ls((m) => !m),
|
|
6834
6842
|
onCancelSavedRun: ve ? Qs : void 0,
|
|
6835
6843
|
onMinimizeRun: ve && g ? Ys : void 0
|
|
6836
6844
|
}
|
|
6837
6845
|
),
|
|
6838
|
-
|
|
6846
|
+
Kt && K && it(K.status) ? /* @__PURE__ */ t(ma, { run: K }) : Kt && ve ? /* @__PURE__ */ t(ma, { run: ve }) : null,
|
|
6839
6847
|
/* @__PURE__ */ t("div", { className: "flex-1 space-y-5 overflow-y-auto px-4 py-4", children: Ne === "edit" ? /* @__PURE__ */ s(se, { children: [
|
|
6840
6848
|
oe ? null : /* @__PURE__ */ s("div", { children: [
|
|
6841
6849
|
/* @__PURE__ */ t("div", { className: v(Z, "mb-2"), children: "Start from" }),
|
|
@@ -6846,7 +6854,7 @@ function Qd({
|
|
|
6846
6854
|
onClick: () => {
|
|
6847
6855
|
We(y), ae(
|
|
6848
6856
|
m.draft(k.source, {
|
|
6849
|
-
attachments: m.seedsDashboardAttachment ?
|
|
6857
|
+
attachments: m.seedsDashboardAttachment ? qr({
|
|
6850
6858
|
source: k.source,
|
|
6851
6859
|
dashboard: C,
|
|
6852
6860
|
selectedSheetId: w,
|
|
@@ -6857,7 +6865,7 @@ function Qd({
|
|
|
6857
6865
|
},
|
|
6858
6866
|
className: v(
|
|
6859
6867
|
"inline-flex h-6 items-center rounded-control border px-2 text-[11px] transition-colors",
|
|
6860
|
-
|
|
6868
|
+
Ke === y ? "border-primary bg-primary text-primary-foreground" : "border-border bg-background text-muted-foreground hover:bg-muted hover:text-foreground"
|
|
6861
6869
|
),
|
|
6862
6870
|
"aria-label": `${m.label} preset — ${m.description}`,
|
|
6863
6871
|
children: m.label
|
|
@@ -6869,11 +6877,11 @@ function Qd({
|
|
|
6869
6877
|
_d,
|
|
6870
6878
|
{
|
|
6871
6879
|
previewRun: sn,
|
|
6872
|
-
isStale:
|
|
6880
|
+
isStale: Hs,
|
|
6873
6881
|
onViewOutput: () => X("result")
|
|
6874
6882
|
}
|
|
6875
6883
|
) : null,
|
|
6876
|
-
|
|
6884
|
+
qs && we ? /* @__PURE__ */ t(
|
|
6877
6885
|
Sd,
|
|
6878
6886
|
{
|
|
6879
6887
|
run: we,
|
|
@@ -7024,7 +7032,7 @@ function Qd({
|
|
|
7024
7032
|
{
|
|
7025
7033
|
type: "button",
|
|
7026
7034
|
onClick: Xs,
|
|
7027
|
-
disabled: Zt || !k.instruction.trim() || !
|
|
7035
|
+
disabled: Zt || !k.instruction.trim() || !j || !_,
|
|
7028
7036
|
title: "Fix typos, grammar, and minor wording without changing your meaning",
|
|
7029
7037
|
className: _e,
|
|
7030
7038
|
children: [
|
|
@@ -7048,7 +7056,7 @@ function Qd({
|
|
|
7048
7056
|
),
|
|
7049
7057
|
k.source.type === "dashboard" ? /* @__PURE__ */ s("div", { children: [
|
|
7050
7058
|
k.attachments.length > 0 ? /* @__PURE__ */ t(
|
|
7051
|
-
|
|
7059
|
+
ql,
|
|
7052
7060
|
{
|
|
7053
7061
|
attachments: k.attachments,
|
|
7054
7062
|
disabled: Ge,
|
|
@@ -7127,7 +7135,7 @@ function Qd({
|
|
|
7127
7135
|
ln === m && y && "ring-1 ring-foreground/20"
|
|
7128
7136
|
),
|
|
7129
7137
|
children: [
|
|
7130
|
-
m === "EMAIL" ? /* @__PURE__ */ t(
|
|
7138
|
+
m === "EMAIL" ? /* @__PURE__ */ t(Ha, { className: "h-3 w-3" }) : /* @__PURE__ */ t(En, { className: "h-3 w-3" }),
|
|
7131
7139
|
m === "EMAIL" ? "Email" : "Slack"
|
|
7132
7140
|
]
|
|
7133
7141
|
},
|
|
@@ -7242,7 +7250,7 @@ function Qd({
|
|
|
7242
7250
|
"a",
|
|
7243
7251
|
{
|
|
7244
7252
|
href: Gd(
|
|
7245
|
-
|
|
7253
|
+
j,
|
|
7246
7254
|
"/admin/integrations/slack"
|
|
7247
7255
|
),
|
|
7248
7256
|
target: "_blank",
|
|
@@ -7275,23 +7283,23 @@ function Qd({
|
|
|
7275
7283
|
dd,
|
|
7276
7284
|
{
|
|
7277
7285
|
source: k.source,
|
|
7278
|
-
resolvedSourceContext:
|
|
7286
|
+
resolvedSourceContext: W,
|
|
7279
7287
|
sourceDetail: zs,
|
|
7280
7288
|
onChange: (m) => ae({ source: m })
|
|
7281
7289
|
}
|
|
7282
7290
|
)
|
|
7283
7291
|
] })
|
|
7284
|
-
] }) : Ne === "plan" &&
|
|
7292
|
+
] }) : Ne === "plan" && He ? /* @__PURE__ */ t(
|
|
7285
7293
|
Nd,
|
|
7286
7294
|
{
|
|
7287
|
-
previewPlan:
|
|
7288
|
-
previewRun:
|
|
7289
|
-
scopeLabel:
|
|
7295
|
+
previewPlan: He,
|
|
7296
|
+
previewRun: K && K.status !== "SUCCESS" ? K : null,
|
|
7297
|
+
scopeLabel: W.source.type === "dashboard" ? (C == null ? void 0 : C.title) ?? W.label : W.label
|
|
7290
7298
|
}
|
|
7291
|
-
) : Ne === "result" &&
|
|
7299
|
+
) : Ne === "result" && K ? /* @__PURE__ */ t(
|
|
7292
7300
|
ha,
|
|
7293
7301
|
{
|
|
7294
|
-
previewRun:
|
|
7302
|
+
previewRun: K,
|
|
7295
7303
|
onExpand: () => {
|
|
7296
7304
|
Jt("preview"), Gt(!0);
|
|
7297
7305
|
}
|
|
@@ -7312,8 +7320,8 @@ function Qd({
|
|
|
7312
7320
|
deletePending: de === "deleteRun"
|
|
7313
7321
|
}
|
|
7314
7322
|
) : null }),
|
|
7315
|
-
|
|
7316
|
-
|
|
7323
|
+
Se.length > 0 || me ? /* @__PURE__ */ s("div", { className: "shrink-0 space-y-2 border-t border-destructive/30 bg-destructive/10 px-4 py-2.5", children: [
|
|
7324
|
+
Se.length > 0 ? /* @__PURE__ */ s(
|
|
7317
7325
|
"div",
|
|
7318
7326
|
{
|
|
7319
7327
|
role: "alert",
|
|
@@ -7323,7 +7331,7 @@ function Qd({
|
|
|
7323
7331
|
/* @__PURE__ */ t(et, { className: "h-3 w-3" }),
|
|
7324
7332
|
"Fix these before saving:"
|
|
7325
7333
|
] }),
|
|
7326
|
-
/* @__PURE__ */ t("ul", { className: "space-y-0.5 pl-4", children:
|
|
7334
|
+
/* @__PURE__ */ t("ul", { className: "space-y-0.5 pl-4", children: Se.map((m) => /* @__PURE__ */ t(
|
|
7327
7335
|
"li",
|
|
7328
7336
|
{
|
|
7329
7337
|
className: "list-disc marker:text-destructive/60",
|
|
@@ -7355,7 +7363,7 @@ function Qd({
|
|
|
7355
7363
|
disabled: Ge,
|
|
7356
7364
|
onClick: () => eo(rn ? "ACTIVE" : "PAUSED"),
|
|
7357
7365
|
children: [
|
|
7358
|
-
de === "pause" || de === "resume" ? /* @__PURE__ */ t(ne, { className: "h-3 w-3 animate-spin" }) : rn ? /* @__PURE__ */ t(_a, { className: "h-3 w-3" }) : /* @__PURE__ */ t(
|
|
7366
|
+
de === "pause" || de === "resume" ? /* @__PURE__ */ t(ne, { className: "h-3 w-3 animate-spin" }) : rn ? /* @__PURE__ */ t(_a, { className: "h-3 w-3" }) : /* @__PURE__ */ t(Ka, { className: "h-3 w-3" }),
|
|
7359
7367
|
rn ? "Resume" : "Pause"
|
|
7360
7368
|
]
|
|
7361
7369
|
}
|
|
@@ -7409,7 +7417,7 @@ function Qd({
|
|
|
7409
7417
|
disabled: Ge,
|
|
7410
7418
|
onClick: Gs,
|
|
7411
7419
|
children: [
|
|
7412
|
-
de === "save" ? /* @__PURE__ */ t(ne, { className: "h-3 w-3 animate-spin" }) : /* @__PURE__ */ t(
|
|
7420
|
+
de === "save" ? /* @__PURE__ */ t(ne, { className: "h-3 w-3 animate-spin" }) : /* @__PURE__ */ t(qe, { className: "h-3 w-3" }),
|
|
7413
7421
|
oe ? "Save changes" : "Create briefing"
|
|
7414
7422
|
]
|
|
7415
7423
|
}
|
|
@@ -7425,7 +7433,7 @@ function Qd({
|
|
|
7425
7433
|
},
|
|
7426
7434
|
children: /* @__PURE__ */ s(mt, { className: "flex max-h-[90vh] w-[min(960px,calc(100vw-32px))] max-w-none flex-col gap-0 overflow-hidden p-0", children: [
|
|
7427
7435
|
/* @__PURE__ */ s(ht, { className: "border-b border-border px-6 py-3 text-left", children: [
|
|
7428
|
-
/* @__PURE__ */ t(pt, { className: "truncate text-[14px] font-semibold leading-5", children:
|
|
7436
|
+
/* @__PURE__ */ t(pt, { className: "truncate text-[14px] font-semibold leading-5", children: Ks }),
|
|
7429
7437
|
/* @__PURE__ */ t(ft, { className: "text-[12px] text-muted-foreground", children: "Full briefing render" })
|
|
7430
7438
|
] }),
|
|
7431
7439
|
/* @__PURE__ */ t("div", { className: "flex-1 overflow-y-auto px-6 py-5", children: vt ? /* @__PURE__ */ t(ha, { previewRun: vt, fullWidth: !0 }) : Nt ? /* @__PURE__ */ t(Zn, { preview: Nt }) : Be ? /* @__PURE__ */ t(pa, { run: Be }) : null })
|
|
@@ -7583,7 +7591,7 @@ function mc({
|
|
|
7583
7591
|
busyId: g,
|
|
7584
7592
|
manageBriefingsHref: D
|
|
7585
7593
|
}) {
|
|
7586
|
-
const
|
|
7594
|
+
const A = e.length, N = e.filter((x) => x.status === "ACTIVE").length, b = e.find((x) => x.hasActiveRun) ?? null;
|
|
7587
7595
|
return /* @__PURE__ */ s(
|
|
7588
7596
|
"section",
|
|
7589
7597
|
{
|
|
@@ -7615,9 +7623,9 @@ function mc({
|
|
|
7615
7623
|
onChange: i
|
|
7616
7624
|
}
|
|
7617
7625
|
),
|
|
7618
|
-
/* @__PURE__ */ t("div", { className: "flex min-w-0 items-center gap-1.5 text-[11px] text-muted-foreground", children: o &&
|
|
7626
|
+
/* @__PURE__ */ t("div", { className: "flex min-w-0 items-center gap-1.5 text-[11px] text-muted-foreground", children: o && A === 0 ? /* @__PURE__ */ t("span", { children: "Loading briefings…" }) : A === 0 ? /* @__PURE__ */ t("span", { children: "No briefings yet" }) : /* @__PURE__ */ s(se, { children: [
|
|
7619
7627
|
/* @__PURE__ */ s("span", { className: "font-medium text-foreground/80", children: [
|
|
7620
|
-
|
|
7628
|
+
A,
|
|
7621
7629
|
" watching"
|
|
7622
7630
|
] }),
|
|
7623
7631
|
/* @__PURE__ */ t("span", { className: "text-border", children: "·" }),
|
|
@@ -7635,8 +7643,8 @@ function mc({
|
|
|
7635
7643
|
// case without crowding the toolbar.
|
|
7636
7644
|
/* @__PURE__ */ t(ne, { className: "h-3.5 w-3.5 animate-spin text-muted-foreground" })
|
|
7637
7645
|
) : null,
|
|
7638
|
-
|
|
7639
|
-
/* @__PURE__ */ t(
|
|
7646
|
+
A > 0 ? /* @__PURE__ */ s("button", { onClick: d, className: Ds, children: [
|
|
7647
|
+
/* @__PURE__ */ t(qt, { className: "h-3 w-3" }),
|
|
7640
7648
|
"New briefing"
|
|
7641
7649
|
] }) : null
|
|
7642
7650
|
] })
|
|
@@ -7671,7 +7679,7 @@ function mc({
|
|
|
7671
7679
|
className: v(ec, "h-6 px-1 text-[11px]"),
|
|
7672
7680
|
children: [
|
|
7673
7681
|
"Manage all briefings",
|
|
7674
|
-
/* @__PURE__ */ t(
|
|
7682
|
+
/* @__PURE__ */ t(Fi, { className: "h-3 w-3" })
|
|
7675
7683
|
]
|
|
7676
7684
|
}
|
|
7677
7685
|
) }) : null
|
|
@@ -7685,7 +7693,7 @@ function hc({ onNew: e }) {
|
|
|
7685
7693
|
/* @__PURE__ */ t("div", { className: "text-[13px] font-medium text-foreground", children: "Have an analyst brief your team" }),
|
|
7686
7694
|
/* @__PURE__ */ t("p", { className: "mt-1.5 max-w-[320px] text-[12px] leading-5 text-muted-foreground", children: "Describe what to watch. An analyst digs into this dashboard and the data behind it, then briefs your team on the cadence you choose." }),
|
|
7687
7695
|
/* @__PURE__ */ s("button", { onClick: e, className: v(Ds, "mt-4"), children: [
|
|
7688
|
-
/* @__PURE__ */ t(
|
|
7696
|
+
/* @__PURE__ */ t(qt, { className: "h-3 w-3" }),
|
|
7689
7697
|
"New briefing"
|
|
7690
7698
|
] })
|
|
7691
7699
|
] });
|
|
@@ -7966,7 +7974,7 @@ function fc({
|
|
|
7966
7974
|
/* @__PURE__ */ t(_a, { className: "h-3.5 w-3.5" }),
|
|
7967
7975
|
"Resume"
|
|
7968
7976
|
] }) : /* @__PURE__ */ s(se, { children: [
|
|
7969
|
-
/* @__PURE__ */ t(
|
|
7977
|
+
/* @__PURE__ */ t(Ka, { className: "h-3.5 w-3.5" }),
|
|
7970
7978
|
"Pause"
|
|
7971
7979
|
] })
|
|
7972
7980
|
}
|
|
@@ -8001,7 +8009,7 @@ function xc({
|
|
|
8001
8009
|
onTimeout: i,
|
|
8002
8010
|
onExpand: l
|
|
8003
8011
|
}) {
|
|
8004
|
-
const [c, d] =
|
|
8012
|
+
const [c, d] = E(n), { startRun: u } = Ln({
|
|
8005
8013
|
apiServiceUrl: r,
|
|
8006
8014
|
token: a,
|
|
8007
8015
|
intervalMs: gc,
|
|
@@ -8020,12 +8028,12 @@ function xc({
|
|
|
8020
8028
|
onTimeout: () => {
|
|
8021
8029
|
i();
|
|
8022
8030
|
}
|
|
8023
|
-
}), p =
|
|
8031
|
+
}), p = Ie(!1);
|
|
8024
8032
|
return ue(() => {
|
|
8025
8033
|
p.current || (p.current = !0, _t(n.status) ? u(n) : Ut(n.status) && o(n));
|
|
8026
8034
|
}, [n, o, u]), /* @__PURE__ */ t(Id, { run: c, onExpand: l });
|
|
8027
8035
|
}
|
|
8028
|
-
function
|
|
8036
|
+
function jc({
|
|
8029
8037
|
dashboardId: e,
|
|
8030
8038
|
dashboardTitle: n,
|
|
8031
8039
|
apiServiceUrl: r,
|
|
@@ -8035,16 +8043,16 @@ function zc({
|
|
|
8035
8043
|
manageBriefingsHref: l,
|
|
8036
8044
|
client: c
|
|
8037
8045
|
}) {
|
|
8038
|
-
const { authToken: d, tokenProps: u } = It(), [p, f] =
|
|
8046
|
+
const { authToken: d, tokenProps: u } = It(), [p, f] = E(!1), [h, g] = E("list"), [D, A] = E("dashboard"), [N, b] = E(
|
|
8039
8047
|
[]
|
|
8040
|
-
), [C, x] =
|
|
8048
|
+
), [C, x] = E(null), [w, T] = E(!1), [$, S] = E(null), [R, U] = E(null), [z, B] = E(
|
|
8041
8049
|
null
|
|
8042
|
-
), [
|
|
8050
|
+
), [j, _] = E(null), [M, W] = E(
|
|
8043
8051
|
null
|
|
8044
|
-
), [le, L] =
|
|
8052
|
+
), [le, L] = E(null), G = r ?? (u == null ? void 0 : u.apiServiceUrl), k = a ?? (d == null ? void 0 : d.accessToken), xe = O(() => ({ ...Xd, ...c }), [c]), de = tc(n), re = O(
|
|
8045
8053
|
() => sc(N, D, e),
|
|
8046
8054
|
[e, N, D]
|
|
8047
|
-
),
|
|
8055
|
+
), Se = O(() => D === "dashboard" ? {
|
|
8048
8056
|
source: { type: "dashboard", dashboardId: e },
|
|
8049
8057
|
label: de,
|
|
8050
8058
|
detail: nc(de)
|
|
@@ -8054,7 +8062,7 @@ function zc({
|
|
|
8054
8062
|
detail: "Use any data in this project."
|
|
8055
8063
|
}, [e, de, D]), De = !!(G && k), me = pe(async () => {
|
|
8056
8064
|
if (!(!G || !k)) {
|
|
8057
|
-
T(!0),
|
|
8065
|
+
T(!0), _(null);
|
|
8058
8066
|
try {
|
|
8059
8067
|
b(
|
|
8060
8068
|
await oc({
|
|
@@ -8063,9 +8071,9 @@ function zc({
|
|
|
8063
8071
|
token: k
|
|
8064
8072
|
})
|
|
8065
8073
|
);
|
|
8066
|
-
} catch (
|
|
8067
|
-
|
|
8068
|
-
|
|
8074
|
+
} catch (V) {
|
|
8075
|
+
_(
|
|
8076
|
+
V instanceof Error ? V.message : "Could not load briefings."
|
|
8069
8077
|
);
|
|
8070
8078
|
} finally {
|
|
8071
8079
|
T(!1);
|
|
@@ -8076,35 +8084,35 @@ function zc({
|
|
|
8076
8084
|
!p || h !== "list" || !De || me();
|
|
8077
8085
|
}, [De, me, p, h]);
|
|
8078
8086
|
const q = () => {
|
|
8079
|
-
x(null),
|
|
8087
|
+
x(null), A("dashboard"), g("list"), f(!0);
|
|
8080
8088
|
}, lt = () => {
|
|
8081
8089
|
x(null), g("author");
|
|
8082
|
-
}, Te = async (
|
|
8090
|
+
}, Te = async (V) => {
|
|
8083
8091
|
if (!(!G || !k)) {
|
|
8084
|
-
|
|
8092
|
+
S(V), _(null);
|
|
8085
8093
|
try {
|
|
8086
8094
|
const ee = await xe.getBriefing(
|
|
8087
8095
|
G,
|
|
8088
8096
|
k,
|
|
8089
|
-
|
|
8097
|
+
V
|
|
8090
8098
|
);
|
|
8091
8099
|
x(ee.briefing), g("author");
|
|
8092
8100
|
} catch (ee) {
|
|
8093
|
-
|
|
8101
|
+
_(
|
|
8094
8102
|
ee instanceof Error ? ee.message : "Could not open briefing."
|
|
8095
8103
|
);
|
|
8096
8104
|
} finally {
|
|
8097
|
-
|
|
8105
|
+
S(null);
|
|
8098
8106
|
}
|
|
8099
8107
|
}
|
|
8100
|
-
},
|
|
8108
|
+
}, He = async (V) => {
|
|
8101
8109
|
if (!(!G || !k)) {
|
|
8102
|
-
|
|
8110
|
+
U(V.id);
|
|
8103
8111
|
try {
|
|
8104
8112
|
await xe.runBriefingNow(
|
|
8105
8113
|
G,
|
|
8106
8114
|
k,
|
|
8107
|
-
|
|
8115
|
+
V.id,
|
|
8108
8116
|
{ requestId: yc() }
|
|
8109
8117
|
), me();
|
|
8110
8118
|
} catch (ee) {
|
|
@@ -8112,21 +8120,21 @@ function zc({
|
|
|
8112
8120
|
ee instanceof Error ? ee.message : "Could not start the run."
|
|
8113
8121
|
);
|
|
8114
8122
|
} finally {
|
|
8115
|
-
|
|
8123
|
+
U(null);
|
|
8116
8124
|
}
|
|
8117
8125
|
}
|
|
8118
|
-
}, Pe = async (
|
|
8126
|
+
}, Pe = async (V) => {
|
|
8119
8127
|
if (!(!G || !k)) {
|
|
8120
|
-
|
|
8128
|
+
U(V.id);
|
|
8121
8129
|
try {
|
|
8122
|
-
const ee =
|
|
8130
|
+
const ee = V.status === "PAUSED" ? await xe.resumeBriefing(
|
|
8123
8131
|
G,
|
|
8124
8132
|
k,
|
|
8125
|
-
|
|
8133
|
+
V.id
|
|
8126
8134
|
) : await xe.pauseBriefing(
|
|
8127
8135
|
G,
|
|
8128
8136
|
k,
|
|
8129
|
-
|
|
8137
|
+
V.id
|
|
8130
8138
|
);
|
|
8131
8139
|
fe.success(
|
|
8132
8140
|
ee.briefing.status === "PAUSED" ? "Briefing paused" : "Briefing resumed"
|
|
@@ -8136,25 +8144,25 @@ function zc({
|
|
|
8136
8144
|
ee instanceof Error ? ee.message : "Could not update the briefing status."
|
|
8137
8145
|
);
|
|
8138
8146
|
} finally {
|
|
8139
|
-
|
|
8147
|
+
U(null);
|
|
8140
8148
|
}
|
|
8141
8149
|
}
|
|
8142
|
-
},
|
|
8143
|
-
if (!
|
|
8144
|
-
const
|
|
8145
|
-
|
|
8150
|
+
}, K = async () => {
|
|
8151
|
+
if (!z || !G || !k) return;
|
|
8152
|
+
const V = z;
|
|
8153
|
+
U(V.id);
|
|
8146
8154
|
try {
|
|
8147
8155
|
await xe.deleteBriefing(
|
|
8148
8156
|
G,
|
|
8149
8157
|
k,
|
|
8150
|
-
|
|
8151
|
-
), fe.success("Briefing deleted"),
|
|
8158
|
+
V.id
|
|
8159
|
+
), fe.success("Briefing deleted"), B(null), me();
|
|
8152
8160
|
} catch (ee) {
|
|
8153
8161
|
fe.error(
|
|
8154
8162
|
ee instanceof Error ? ee.message : "Could not delete the briefing."
|
|
8155
8163
|
);
|
|
8156
8164
|
} finally {
|
|
8157
|
-
|
|
8165
|
+
U(null);
|
|
8158
8166
|
}
|
|
8159
8167
|
}, Me = re.length;
|
|
8160
8168
|
return /* @__PURE__ */ s(bi, { open: p, onOpenChange: f, children: [
|
|
@@ -8184,23 +8192,23 @@ function zc({
|
|
|
8184
8192
|
briefings: re,
|
|
8185
8193
|
dashboardLabel: de,
|
|
8186
8194
|
sourceView: D,
|
|
8187
|
-
error:
|
|
8195
|
+
error: j,
|
|
8188
8196
|
loading: w,
|
|
8189
|
-
onSourceViewChange:
|
|
8197
|
+
onSourceViewChange: A,
|
|
8190
8198
|
onClose: () => f(!1),
|
|
8191
|
-
onEdit: (
|
|
8192
|
-
Te(
|
|
8199
|
+
onEdit: (V) => {
|
|
8200
|
+
Te(V);
|
|
8193
8201
|
},
|
|
8194
8202
|
onNew: lt,
|
|
8195
|
-
onRunNow: (
|
|
8196
|
-
|
|
8203
|
+
onRunNow: (V) => {
|
|
8204
|
+
He(V);
|
|
8197
8205
|
},
|
|
8198
|
-
onTogglePause: (
|
|
8199
|
-
Pe(
|
|
8206
|
+
onTogglePause: (V) => {
|
|
8207
|
+
Pe(V);
|
|
8200
8208
|
},
|
|
8201
|
-
onDelete: (
|
|
8202
|
-
selectingId:
|
|
8203
|
-
busyId:
|
|
8209
|
+
onDelete: (V) => B(V),
|
|
8210
|
+
selectingId: $,
|
|
8211
|
+
busyId: R,
|
|
8204
8212
|
manageBriefingsHref: l
|
|
8205
8213
|
}
|
|
8206
8214
|
) : /* @__PURE__ */ t(
|
|
@@ -8209,7 +8217,7 @@ function zc({
|
|
|
8209
8217
|
apiServiceUrl: G,
|
|
8210
8218
|
token: k,
|
|
8211
8219
|
briefing: C,
|
|
8212
|
-
sourceContext: C ? void 0 :
|
|
8220
|
+
sourceContext: C ? void 0 : Se,
|
|
8213
8221
|
title: C ? "Edit briefing" : "Create briefing",
|
|
8214
8222
|
className: "h-full min-h-0 max-w-none border-0 shadow-none",
|
|
8215
8223
|
onBack: () => g("list"),
|
|
@@ -8219,11 +8227,11 @@ function zc({
|
|
|
8219
8227
|
},
|
|
8220
8228
|
onRunStarted: () => {
|
|
8221
8229
|
},
|
|
8222
|
-
onSaved: (
|
|
8223
|
-
x(
|
|
8230
|
+
onSaved: (V) => {
|
|
8231
|
+
x(V), me();
|
|
8224
8232
|
},
|
|
8225
|
-
onMinimizeRun: ({ briefing:
|
|
8226
|
-
|
|
8233
|
+
onMinimizeRun: ({ briefing: V, run: ee }) => {
|
|
8234
|
+
W({ briefing: V, run: ee }), f(!1);
|
|
8227
8235
|
}
|
|
8228
8236
|
}
|
|
8229
8237
|
)
|
|
@@ -8237,17 +8245,17 @@ function zc({
|
|
|
8237
8245
|
initialRun: M.run,
|
|
8238
8246
|
apiServiceUrl: G,
|
|
8239
8247
|
token: k,
|
|
8240
|
-
onTerminal: (
|
|
8248
|
+
onTerminal: (V) => {
|
|
8241
8249
|
L({
|
|
8242
8250
|
briefing: M.briefing,
|
|
8243
|
-
run:
|
|
8244
|
-
}),
|
|
8251
|
+
run: V
|
|
8252
|
+
}), W(null), me();
|
|
8245
8253
|
},
|
|
8246
8254
|
onTimeout: () => {
|
|
8247
|
-
|
|
8255
|
+
W(null), me();
|
|
8248
8256
|
},
|
|
8249
8257
|
onExpand: () => {
|
|
8250
|
-
x(M.briefing), g("author"),
|
|
8258
|
+
x(M.briefing), g("author"), W(null), f(!0);
|
|
8251
8259
|
}
|
|
8252
8260
|
}
|
|
8253
8261
|
) : null,
|
|
@@ -8271,16 +8279,16 @@ function zc({
|
|
|
8271
8279
|
/* @__PURE__ */ t(
|
|
8272
8280
|
On,
|
|
8273
8281
|
{
|
|
8274
|
-
open: !!
|
|
8275
|
-
onOpenChange: (
|
|
8276
|
-
|
|
8282
|
+
open: !!z,
|
|
8283
|
+
onOpenChange: (V) => {
|
|
8284
|
+
V || B(null);
|
|
8277
8285
|
},
|
|
8278
8286
|
children: /* @__PURE__ */ s(Vn, { children: [
|
|
8279
8287
|
/* @__PURE__ */ s($n, { children: [
|
|
8280
8288
|
/* @__PURE__ */ t(Un, { children: "Delete briefing?" }),
|
|
8281
8289
|
/* @__PURE__ */ s(_n, { children: [
|
|
8282
8290
|
"This permanently deletes ",
|
|
8283
|
-
/* @__PURE__ */ t("strong", { children:
|
|
8291
|
+
/* @__PURE__ */ t("strong", { children: z == null ? void 0 : z.name }),
|
|
8284
8292
|
". Recipients will stop receiving it."
|
|
8285
8293
|
] })
|
|
8286
8294
|
] }),
|
|
@@ -8290,7 +8298,7 @@ function zc({
|
|
|
8290
8298
|
Ua,
|
|
8291
8299
|
{
|
|
8292
8300
|
className: "bg-destructive/90 hover:bg-destructive",
|
|
8293
|
-
onClick:
|
|
8301
|
+
onClick: K,
|
|
8294
8302
|
children: "Delete briefing"
|
|
8295
8303
|
}
|
|
8296
8304
|
)
|
|
@@ -8304,29 +8312,29 @@ function yc() {
|
|
|
8304
8312
|
return typeof crypto < "u" && typeof crypto.randomUUID == "function" ? crypto.randomUUID() : `briefing-run-now-${Date.now()}-${Math.random().toString(36).slice(2, 8)}`;
|
|
8305
8313
|
}
|
|
8306
8314
|
export {
|
|
8307
|
-
|
|
8315
|
+
Rc as A,
|
|
8308
8316
|
Wn as B,
|
|
8309
8317
|
Tn as C,
|
|
8310
8318
|
Yi as D,
|
|
8311
8319
|
Ji as E,
|
|
8312
8320
|
St as F,
|
|
8313
|
-
|
|
8321
|
+
Hr as G,
|
|
8314
8322
|
Ul as H,
|
|
8315
|
-
|
|
8323
|
+
Kr as I,
|
|
8316
8324
|
Qd as J,
|
|
8317
|
-
|
|
8325
|
+
jc as K,
|
|
8318
8326
|
Wa as L,
|
|
8319
8327
|
Vi as M,
|
|
8320
|
-
|
|
8321
|
-
|
|
8322
|
-
|
|
8328
|
+
Bc as N,
|
|
8329
|
+
Fc as U,
|
|
8330
|
+
Lc as V,
|
|
8323
8331
|
Yd as W,
|
|
8324
8332
|
Gi as a,
|
|
8325
|
-
|
|
8333
|
+
Mc as b,
|
|
8326
8334
|
Zi as c,
|
|
8327
8335
|
al as d,
|
|
8328
|
-
|
|
8329
|
-
|
|
8336
|
+
Oc as e,
|
|
8337
|
+
Vc as f,
|
|
8330
8338
|
Ya as g,
|
|
8331
8339
|
ml as h,
|
|
8332
8340
|
Gn as i,
|
|
@@ -8337,14 +8345,14 @@ export {
|
|
|
8337
8345
|
pl as n,
|
|
8338
8346
|
fl as o,
|
|
8339
8347
|
Xa as p,
|
|
8340
|
-
|
|
8348
|
+
$c as q,
|
|
8341
8349
|
Za as r,
|
|
8342
8350
|
ns as s,
|
|
8343
8351
|
gl as t,
|
|
8344
|
-
|
|
8352
|
+
Pc as u,
|
|
8345
8353
|
bl as v,
|
|
8346
|
-
|
|
8347
|
-
|
|
8354
|
+
Uc as w,
|
|
8355
|
+
_c as x,
|
|
8348
8356
|
xl as y,
|
|
8349
8357
|
$l as z
|
|
8350
8358
|
};
|