react-semaphor 0.1.282 → 0.1.283
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/chunks/{dashboard-controls-B_F5f_BF.js → dashboard-controls-DN8jYCON.js} +102 -102
- package/dist/chunks/{dashboard-controls-XX9__V-e.js → dashboard-controls-wfMo3T6T.js} +1 -1
- package/dist/chunks/{dashboard-filter-controls-button-DZpvfXwU.js → dashboard-filter-controls-button-DKc_6T_O.js} +2 -2
- package/dist/chunks/{dashboard-filter-controls-button-DVLBLHga.js → dashboard-filter-controls-button-zeiatmo1.js} +108 -96
- package/dist/chunks/{dashboard-json-Dd9Q2bZm.js → dashboard-json-DK_hQ4vs.js} +1 -1
- package/dist/chunks/{dashboard-json-CexNQg-E.js → dashboard-json-DyJBSpIU.js} +1 -1
- package/dist/chunks/{dashboard-summary-settings-dialog-BjdrHb1l.js → dashboard-summary-settings-dialog-BPyawgMV.js} +1 -1
- package/dist/chunks/{dashboard-summary-settings-dialog-zdacBYZZ.js → dashboard-summary-settings-dialog-CWtlFDFP.js} +1 -1
- package/dist/chunks/{edit-dashboard-visual-Bi9pQx6G.js → edit-dashboard-visual-0lBlwTCM.js} +1 -1
- package/dist/chunks/{edit-dashboard-visual-DQts3aun.js → edit-dashboard-visual-4nQV1U_c.js} +319 -319
- package/dist/chunks/{index-Bgn4zTsp.js → index-B7kUtCgG.js} +12111 -12123
- package/dist/chunks/{index-BY0YEY92.js → index-BHWWNpG6.js} +119 -119
- package/dist/chunks/{resource-management-panel-w7afzaPB.js → resource-management-panel-D8xvqypt.js} +1 -1
- package/dist/chunks/{resource-management-panel--xIMLPdz.js → resource-management-panel-Dpin6Ffw.js} +2 -2
- package/dist/chunks/use-create-flow-overlay-state-VwKDgVAy.js +1597 -0
- package/dist/chunks/use-create-flow-overlay-state-XkHgf9f3.js +21 -0
- package/dist/chunks/{use-visual-utils-CI-7TNJI.js → use-visual-utils-C8YSTPfX.js} +1 -1
- package/dist/chunks/{use-visual-utils-BCWNcaWk.js → use-visual-utils-CBocWNV1.js} +1 -1
- package/dist/dashboard/index.cjs +1 -1
- package/dist/dashboard/index.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +5 -5
- package/dist/style.css +1 -1
- package/dist/surfboard/index.cjs +1 -1
- package/dist/surfboard/index.js +2 -2
- package/package.json +1 -1
- package/dist/chunks/use-create-flow-overlay-state-AsQy4tbh.js +0 -21
- package/dist/chunks/use-create-flow-overlay-state-COsIHnQp.js +0 -1523
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import ge, { useState as F, useRef as z, useCallback as V, useEffect as T, useContext as be } from "react";
|
|
2
|
-
import { bM as
|
|
2
|
+
import { bM as Z, b as $, aC as U, bJ as _, bF as ee, bG as H, aD as te, bE as Ce, e as ae, f as se, g as re, h as oe, i as ne, L as G, I as we, d8 as ye, v as xe, B as I, w as j, U as R, J as Ne, u as B, K as De, N as X, d9 as Ae, da as K, x as P, b_ as ie, af as Se, c as L, cC as le, cD as de, a6 as ce, cF as ue, cG as M, s as Ee, cK as Ie, ct as Le, M as Fe, db as Te, dc as ke, dd as Ue, cS as Me, cT as Ve, cU as Pe, cV as Be, cW as Oe, cX as ze, cY as Re, as as $e, bL as _e, X as He, de as je, df as Xe, cz as Ge, bH as W, a8 as Ke, aF as We, P as he, k as me, dg as qe, l as pe, dh as Je, di as Ye, dj as Qe, dk as Ze, dl as et, dm as fe, dn as q, dp as tt } from "./index-B7kUtCgG.js";
|
|
3
3
|
import { jsx as t, jsxs as s, Fragment as O } from "react/jsx-runtime";
|
|
4
|
-
import { V as at, E as st, a as rt, b as ot, L as nt, c as it, d as lt, C as dt, u as ct, e as ut } from "./use-create-flow-overlay-state-
|
|
5
|
-
import { u as ve } from "./use-visual-utils-
|
|
4
|
+
import { V as at, E as st, a as rt, b as ot, L as nt, c as it, d as lt, C as dt, u as ct, e as ut } from "./use-create-flow-overlay-state-VwKDgVAy.js";
|
|
5
|
+
import { u as ve } from "./use-visual-utils-CBocWNV1.js";
|
|
6
6
|
import { k as J } from "./date-formatter-vkCj9Ct-.js";
|
|
7
7
|
/**
|
|
8
8
|
* @license lucide-react v0.453.0 - ISC
|
|
@@ -10,7 +10,7 @@ import { k as J } from "./date-formatter-vkCj9Ct-.js";
|
|
|
10
10
|
* This source code is licensed under the ISC license.
|
|
11
11
|
* See the LICENSE file in the root directory of this source tree.
|
|
12
12
|
*/
|
|
13
|
-
const Y =
|
|
13
|
+
const Y = Z("FileDown", [
|
|
14
14
|
["path", { d: "M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z", key: "1rqfz7" }],
|
|
15
15
|
["path", { d: "M14 2v4a2 2 0 0 0 2 2h4", key: "tnqrlb" }],
|
|
16
16
|
["path", { d: "M12 18v-6", key: "17g6i2" }],
|
|
@@ -22,28 +22,28 @@ const Y = Q("FileDown", [
|
|
|
22
22
|
* This source code is licensed under the ISC license.
|
|
23
23
|
* See the LICENSE file in the root directory of this source tree.
|
|
24
24
|
*/
|
|
25
|
-
const ht =
|
|
25
|
+
const ht = Z("FilterX", [
|
|
26
26
|
["path", { d: "M13.013 3H2l8 9.46V19l4 2v-8.54l.9-1.055", key: "1fi1da" }],
|
|
27
27
|
["path", { d: "m22 3-5 5", key: "12jva0" }],
|
|
28
28
|
["path", { d: "m17 3 5 5", key: "k36vhe" }]
|
|
29
|
-
]), mt = 1e4, pt = 15e3, ft = 3e4, vt = 3e4, gt = 12e4,
|
|
29
|
+
]), mt = 1e4, pt = 15e3, ft = 3e4, vt = 3e4, gt = 12e4, Q = 2 * 60 * 60 * 1e3;
|
|
30
30
|
function bt(e) {
|
|
31
31
|
const a = Date.now() - e.getTime();
|
|
32
32
|
return a < vt ? mt : a < gt ? pt : ft;
|
|
33
33
|
}
|
|
34
34
|
function Tt() {
|
|
35
|
-
const { authToken: e, tokenProps: a } =
|
|
35
|
+
const { authToken: e, tokenProps: a } = $(), p = U((m) => m.activeExports), [d, c] = F(
|
|
36
36
|
typeof document < "u" ? !document.hidden : !0
|
|
37
37
|
), u = z(null), n = z(!1), l = z(void 0), h = a == null ? void 0 : a.apiServiceUrl, o = e == null ? void 0 : e.accessToken, v = V(() => {
|
|
38
38
|
const m = U.getState().activeExports;
|
|
39
39
|
return Array.from(m.values()).filter(
|
|
40
|
-
(C) =>
|
|
40
|
+
(C) => _(C.status)
|
|
41
41
|
);
|
|
42
42
|
}, []);
|
|
43
43
|
T(() => {
|
|
44
44
|
if (typeof document > "u") return;
|
|
45
45
|
const m = () => {
|
|
46
|
-
|
|
46
|
+
c(!document.hidden);
|
|
47
47
|
};
|
|
48
48
|
return document.addEventListener("visibilitychange", m), () => {
|
|
49
49
|
document.removeEventListener("visibilitychange", m);
|
|
@@ -60,7 +60,7 @@ function Tt() {
|
|
|
60
60
|
return;
|
|
61
61
|
}
|
|
62
62
|
const C = Date.now(), N = m.filter(
|
|
63
|
-
(r) => C - r.startedAt.getTime() >
|
|
63
|
+
(r) => C - r.startedAt.getTime() > Q
|
|
64
64
|
);
|
|
65
65
|
if (N.length > 0) {
|
|
66
66
|
const { updateExport: r } = U.getState().actions;
|
|
@@ -72,7 +72,7 @@ function Tt() {
|
|
|
72
72
|
});
|
|
73
73
|
}
|
|
74
74
|
const f = m.filter(
|
|
75
|
-
(r) => C - r.startedAt.getTime() <=
|
|
75
|
+
(r) => C - r.startedAt.getTime() <= Q
|
|
76
76
|
);
|
|
77
77
|
if (f.length === 0) {
|
|
78
78
|
n.current = !1;
|
|
@@ -130,25 +130,25 @@ function Tt() {
|
|
|
130
130
|
l.current = b;
|
|
131
131
|
}, [b]), T(() => {
|
|
132
132
|
var C;
|
|
133
|
-
v().length > 0 &&
|
|
134
|
-
}, [p,
|
|
133
|
+
v().length > 0 && d && !n.current && (n.current = !0, (C = l.current) == null || C.call(l));
|
|
134
|
+
}, [p, d, v]), T(() => {
|
|
135
135
|
var C;
|
|
136
136
|
const m = v();
|
|
137
|
-
|
|
138
|
-
}, [
|
|
139
|
-
!
|
|
140
|
-
}, [
|
|
137
|
+
d && m.length > 0 && !n.current && (n.current = !0, (C = l.current) == null || C.call(l));
|
|
138
|
+
}, [d, v]), T(() => {
|
|
139
|
+
!d && u.current && (clearTimeout(u.current), u.current = null, n.current = !1);
|
|
140
|
+
}, [d]), T(() => () => {
|
|
141
141
|
u.current && (clearTimeout(u.current), u.current = null);
|
|
142
142
|
}, []), {
|
|
143
143
|
isPolling: n.current,
|
|
144
|
-
isTabVisible:
|
|
144
|
+
isTabVisible: d,
|
|
145
145
|
inProgressCount: v().length
|
|
146
146
|
};
|
|
147
147
|
}
|
|
148
148
|
function kt() {
|
|
149
|
-
const { authToken: e, tokenProps: a } =
|
|
149
|
+
const { authToken: e, tokenProps: a } = $(), p = U((l) => l.activeExports), { addExport: d } = te(), c = z(!1), u = a == null ? void 0 : a.apiServiceUrl, n = e == null ? void 0 : e.accessToken;
|
|
150
150
|
T(() => {
|
|
151
|
-
if (
|
|
151
|
+
if (c.current || !u || !n) return;
|
|
152
152
|
(async () => {
|
|
153
153
|
try {
|
|
154
154
|
const { exports: h } = await Ce(u, n, {
|
|
@@ -185,17 +185,17 @@ function kt() {
|
|
|
185
185
|
expiresAt: new Date(o.expiresAt),
|
|
186
186
|
downloadUrl: b
|
|
187
187
|
};
|
|
188
|
-
|
|
188
|
+
d(m);
|
|
189
189
|
}
|
|
190
|
-
|
|
190
|
+
c.current = !0;
|
|
191
191
|
} catch (h) {
|
|
192
|
-
console.error("[useExportRecovery] Failed to recover exports:", h),
|
|
192
|
+
console.error("[useExportRecovery] Failed to recover exports:", h), c.current = !0;
|
|
193
193
|
}
|
|
194
194
|
})();
|
|
195
|
-
}, [u, n,
|
|
195
|
+
}, [u, n, d, p]);
|
|
196
196
|
}
|
|
197
197
|
function Ct(e) {
|
|
198
|
-
return e.title ? e.title :
|
|
198
|
+
return e.title ? e.title : _(
|
|
199
199
|
e.status
|
|
200
200
|
) ? "Export in progress..." : e.status === "completed" ? "Export completed" : e.status === "failed" ? "Export failed" : "Export";
|
|
201
201
|
}
|
|
@@ -203,19 +203,19 @@ function wt({
|
|
|
203
203
|
open: e,
|
|
204
204
|
onOpenChange: a,
|
|
205
205
|
isLibraryVisual: p,
|
|
206
|
-
currentVisualName:
|
|
207
|
-
isSaving:
|
|
206
|
+
currentVisualName: d,
|
|
207
|
+
isSaving: c = !1,
|
|
208
208
|
destinationMode: u = "both",
|
|
209
209
|
onConfirm: n
|
|
210
210
|
}) {
|
|
211
211
|
const [l, h] = F(
|
|
212
|
-
p &&
|
|
212
|
+
p && d ? `Copy of ${d}` : d || ""
|
|
213
213
|
), [o, v] = F("");
|
|
214
214
|
ge.useEffect(() => {
|
|
215
215
|
e && (h(
|
|
216
|
-
p &&
|
|
216
|
+
p && d ? `Copy of ${d}` : d || ""
|
|
217
217
|
), v(""));
|
|
218
|
-
}, [e, p,
|
|
218
|
+
}, [e, p, d]);
|
|
219
219
|
const b = !!l.trim(), m = u === "local" ? {
|
|
220
220
|
saveToLibrary: !1,
|
|
221
221
|
saveToCurrentDashboard: !0,
|
|
@@ -235,7 +235,7 @@ function wt({
|
|
|
235
235
|
description: "Creates a new library visual and adds a linked copy to this dashboard.",
|
|
236
236
|
actionLabel: "Save Copy as Linked Visual"
|
|
237
237
|
}, C = () => {
|
|
238
|
-
!b ||
|
|
238
|
+
!b || c || n({
|
|
239
239
|
name: l.trim(),
|
|
240
240
|
description: o.trim() || void 0,
|
|
241
241
|
saveToLibrary: m.saveToLibrary,
|
|
@@ -267,7 +267,7 @@ function wt({
|
|
|
267
267
|
value: l,
|
|
268
268
|
onChange: (N) => h(N.target.value),
|
|
269
269
|
placeholder: "Enter visual name",
|
|
270
|
-
disabled:
|
|
270
|
+
disabled: c
|
|
271
271
|
}
|
|
272
272
|
)
|
|
273
273
|
] }),
|
|
@@ -281,7 +281,7 @@ function wt({
|
|
|
281
281
|
onChange: (N) => v(N.target.value),
|
|
282
282
|
placeholder: "Enter visual description",
|
|
283
283
|
rows: 3,
|
|
284
|
-
disabled:
|
|
284
|
+
disabled: c
|
|
285
285
|
}
|
|
286
286
|
)
|
|
287
287
|
] })
|
|
@@ -292,33 +292,33 @@ function wt({
|
|
|
292
292
|
{
|
|
293
293
|
variant: "outline",
|
|
294
294
|
onClick: () => a(!1),
|
|
295
|
-
disabled:
|
|
295
|
+
disabled: c,
|
|
296
296
|
children: "Cancel"
|
|
297
297
|
}
|
|
298
298
|
),
|
|
299
|
-
/* @__PURE__ */ s(I, { onClick: C, disabled: !b ||
|
|
300
|
-
|
|
299
|
+
/* @__PURE__ */ s(I, { onClick: C, disabled: !b || c, children: [
|
|
300
|
+
c && /* @__PURE__ */ t(j, { className: "mr-2 h-4 w-4 animate-spin" }),
|
|
301
301
|
m.actionLabel
|
|
302
302
|
] })
|
|
303
303
|
] })
|
|
304
304
|
] }) });
|
|
305
305
|
}
|
|
306
306
|
function yt() {
|
|
307
|
-
const [e, a] = F(!1), [p,
|
|
307
|
+
const [e, a] = F(!1), [p, d] = F(!1), [c, u] = F(null), n = R((i) => i.frame), l = R((i) => i.card), h = Ne(), o = B((i) => i.selectedSheetId), v = B(
|
|
308
308
|
(i) => i.actions.setIsDashboardPanelOpen
|
|
309
309
|
), { getUpdatedFrame: b } = ve(), { selectVisual: m } = De(), { addFrame: C, setSelectedFrameId: N, setIsVisualEditing: f } = X(), y = !!(n != null && n.visualId), S = (() => {
|
|
310
310
|
var i, g;
|
|
311
311
|
return ((i = n == null ? void 0 : n.cards) == null ? void 0 : i.length) === 1 && ((g = n.cards[0]) != null && g.title) ? n.cards[0].title : h != null && h.title ? h.title : (l == null ? void 0 : l.title) || "Untitled Visual";
|
|
312
312
|
})(), w = Ae((i) => {
|
|
313
313
|
if (i != null && i.id) {
|
|
314
|
-
if (m(i), p &&
|
|
314
|
+
if (m(i), p && c && o) {
|
|
315
315
|
const g = {
|
|
316
|
-
...
|
|
317
|
-
id:
|
|
316
|
+
...c,
|
|
317
|
+
id: K(),
|
|
318
318
|
visualId: i.id
|
|
319
319
|
// Link to the newly created library visual
|
|
320
320
|
};
|
|
321
|
-
C(o, g, "end"), N(g.id),
|
|
321
|
+
C(o, g, "end"), N(g.id), d(!1), u(null), f(!1);
|
|
322
322
|
}
|
|
323
323
|
v(!0), a(!1);
|
|
324
324
|
}
|
|
@@ -345,7 +345,7 @@ function yt() {
|
|
|
345
345
|
}))
|
|
346
346
|
} : g;
|
|
347
347
|
if (i.saveToLibrary) {
|
|
348
|
-
|
|
348
|
+
d(i.saveToCurrentDashboard), u(A);
|
|
349
349
|
const x = {
|
|
350
350
|
title: i.name,
|
|
351
351
|
description: i.description,
|
|
@@ -358,7 +358,7 @@ function yt() {
|
|
|
358
358
|
const x = {
|
|
359
359
|
...A,
|
|
360
360
|
// Card title already synced
|
|
361
|
-
id:
|
|
361
|
+
id: K(),
|
|
362
362
|
visualId: void 0
|
|
363
363
|
// Explicitly no visualId for local visuals
|
|
364
364
|
};
|
|
@@ -373,7 +373,7 @@ function yt() {
|
|
|
373
373
|
function Ut({
|
|
374
374
|
className: e
|
|
375
375
|
}) {
|
|
376
|
-
const a = R((D) => D.frame), p = Se((D) => D.selectedVisual),
|
|
376
|
+
const a = R((D) => D.frame), p = Se((D) => D.selectedVisual), d = B((D) => D.selectedFrameId), c = B((D) => D.selectedSheetId), { setIsVisualEditing: u, updateFrame: n } = X(), [l, h] = F(!1), [o, v] = F("both"), b = !!(a != null && a.visualId || p != null && p.id), m = !!(a != null && a.visualId && d), C = b && !m, {
|
|
377
377
|
saveAsDialogOpen: N,
|
|
378
378
|
setSaveAsDialogOpen: f,
|
|
379
379
|
handleSaveAs: y,
|
|
@@ -381,7 +381,7 @@ function Ut({
|
|
|
381
381
|
currentVisualName: w,
|
|
382
382
|
isSaving: r
|
|
383
383
|
} = yt(), { getUpdatedFrame: i } = ve(), g = () => {
|
|
384
|
-
if (!
|
|
384
|
+
if (!c) {
|
|
385
385
|
P.error("No sheet selected");
|
|
386
386
|
return;
|
|
387
387
|
}
|
|
@@ -396,7 +396,7 @@ function Ut({
|
|
|
396
396
|
...D,
|
|
397
397
|
visualId: void 0
|
|
398
398
|
};
|
|
399
|
-
n(
|
|
399
|
+
n(c, x), setTimeout(() => {
|
|
400
400
|
h(!1), P.success("Changes applied. Visual is now local to this dashboard"), u(!1);
|
|
401
401
|
}, 300);
|
|
402
402
|
}, E = (D) => {
|
|
@@ -512,14 +512,14 @@ function Mt({
|
|
|
512
512
|
//labelClassName,
|
|
513
513
|
switchClassName: a
|
|
514
514
|
}) {
|
|
515
|
-
const p = R((l) => l.isDevMode),
|
|
516
|
-
return !
|
|
515
|
+
const p = R((l) => l.isDevMode), d = B((l) => l.isVisualEditing), { setIsDevMode: c } = Fe(), { config: u } = be(Te).tokenProps, n = (u == null ? void 0 : u.showAdvancedMode) !== !1;
|
|
516
|
+
return !d || !n ? null : /* @__PURE__ */ s("div", { className: L("flex items-center space-x-2", e), children: [
|
|
517
517
|
/* @__PURE__ */ t(
|
|
518
518
|
ke,
|
|
519
519
|
{
|
|
520
520
|
className: L("", a),
|
|
521
521
|
checked: p,
|
|
522
|
-
onCheckedChange: () =>
|
|
522
|
+
onCheckedChange: () => c(!p),
|
|
523
523
|
id: "advanced-mode",
|
|
524
524
|
icon: /* @__PURE__ */ t(Ue, { className: "h-4 w-4" }),
|
|
525
525
|
tooltip: "Advanced Mode"
|
|
@@ -532,8 +532,8 @@ function Vt({
|
|
|
532
532
|
open: e,
|
|
533
533
|
onOpenChange: a,
|
|
534
534
|
onSave: p,
|
|
535
|
-
onDiscard:
|
|
536
|
-
isSaving:
|
|
535
|
+
onDiscard: d,
|
|
536
|
+
isSaving: c,
|
|
537
537
|
title: u = "Unsaved changes",
|
|
538
538
|
description: n = "You have unsaved changes to this dashboard. What would you like to do?",
|
|
539
539
|
cancelLabel: l = "Cancel",
|
|
@@ -541,36 +541,36 @@ function Vt({
|
|
|
541
541
|
saveLabel: o = "Save"
|
|
542
542
|
}) {
|
|
543
543
|
return /* @__PURE__ */ t(Me, { open: e, onOpenChange: (b) => {
|
|
544
|
-
!b &&
|
|
544
|
+
!b && c || a(b);
|
|
545
545
|
}, children: /* @__PURE__ */ s(Ve, { children: [
|
|
546
546
|
/* @__PURE__ */ s(Pe, { children: [
|
|
547
547
|
/* @__PURE__ */ t(Be, { children: u }),
|
|
548
548
|
/* @__PURE__ */ t(Oe, { children: n })
|
|
549
549
|
] }),
|
|
550
550
|
/* @__PURE__ */ s(ze, { children: [
|
|
551
|
-
/* @__PURE__ */ t(Re, { disabled:
|
|
551
|
+
/* @__PURE__ */ t(Re, { disabled: c, children: l }),
|
|
552
552
|
/* @__PURE__ */ t(
|
|
553
553
|
I,
|
|
554
554
|
{
|
|
555
555
|
type: "button",
|
|
556
|
-
onClick:
|
|
557
|
-
disabled:
|
|
556
|
+
onClick: d,
|
|
557
|
+
disabled: c,
|
|
558
558
|
variant: "destructive",
|
|
559
559
|
className: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
|
|
560
560
|
children: h
|
|
561
561
|
}
|
|
562
562
|
),
|
|
563
|
-
/* @__PURE__ */ t(I, { type: "button", onClick: p, disabled:
|
|
563
|
+
/* @__PURE__ */ t(I, { type: "button", onClick: p, disabled: c, children: c ? /* @__PURE__ */ s(O, { children: [
|
|
564
564
|
/* @__PURE__ */ t(j, { className: "mr-2 h-4 w-4 animate-spin" }),
|
|
565
565
|
"Saving..."
|
|
566
566
|
] }) : o })
|
|
567
567
|
] })
|
|
568
568
|
] }) });
|
|
569
569
|
}
|
|
570
|
-
function Pt(e, a, p,
|
|
570
|
+
function Pt(e, a, p, d) {
|
|
571
571
|
T(() => {
|
|
572
|
-
e && !p && a &&
|
|
573
|
-
}, [e, p, a,
|
|
572
|
+
e && !p && a && d($e(a));
|
|
573
|
+
}, [e, p, a, d]);
|
|
574
574
|
}
|
|
575
575
|
function xt({
|
|
576
576
|
export: e,
|
|
@@ -578,9 +578,9 @@ function xt({
|
|
|
578
578
|
}) {
|
|
579
579
|
const p = () => {
|
|
580
580
|
e.downloadUrl && window.open(e.downloadUrl, "_blank");
|
|
581
|
-
},
|
|
581
|
+
}, d = (l) => {
|
|
582
582
|
l.stopPropagation(), a == null || a(e.id);
|
|
583
|
-
},
|
|
583
|
+
}, c = () => {
|
|
584
584
|
switch (e.status) {
|
|
585
585
|
case "completed":
|
|
586
586
|
return /* @__PURE__ */ t(Ge, { className: "mt-0.5 h-5 w-5 shrink-0 text-green-600" });
|
|
@@ -589,7 +589,7 @@ function xt({
|
|
|
589
589
|
default:
|
|
590
590
|
return /* @__PURE__ */ t(j, { className: "text-foreground-muted mt-0.5 h-5 w-5 shrink-0 animate-spin" });
|
|
591
591
|
}
|
|
592
|
-
}, u =
|
|
592
|
+
}, u = _(e.status), n = (() => {
|
|
593
593
|
switch (e.status) {
|
|
594
594
|
case "pending":
|
|
595
595
|
return "Queued...";
|
|
@@ -606,7 +606,7 @@ function xt({
|
|
|
606
606
|
return /* @__PURE__ */ s("div", { className: "group p-4 transition-colors hover:bg-muted/50", children: [
|
|
607
607
|
/* @__PURE__ */ s("div", { className: "mb-2 flex items-start justify-between gap-3", children: [
|
|
608
608
|
/* @__PURE__ */ s("div", { className: "flex min-w-0 flex-1 items-start gap-3", children: [
|
|
609
|
-
|
|
609
|
+
c(),
|
|
610
610
|
/* @__PURE__ */ s("div", { className: "min-w-0 flex-1", children: [
|
|
611
611
|
/* @__PURE__ */ t("h4", { className: "mb-1 truncate text-sm font-medium", children: e.title }),
|
|
612
612
|
e.status === "completed" && /* @__PURE__ */ s("div", { className: "flex items-center gap-2 text-xs text-muted-foreground", children: [
|
|
@@ -616,7 +616,7 @@ function xt({
|
|
|
616
616
|
] }),
|
|
617
617
|
e.fileSize && /* @__PURE__ */ s(O, { children: [
|
|
618
618
|
/* @__PURE__ */ t("span", { children: "•" }),
|
|
619
|
-
/* @__PURE__ */ t("span", { children:
|
|
619
|
+
/* @__PURE__ */ t("span", { children: _e(e.fileSize) })
|
|
620
620
|
] })
|
|
621
621
|
] }),
|
|
622
622
|
u && /* @__PURE__ */ t("div", { className: "text-xs text-muted-foreground", children: n }),
|
|
@@ -629,7 +629,7 @@ function xt({
|
|
|
629
629
|
variant: "ghost",
|
|
630
630
|
size: "icon",
|
|
631
631
|
className: "h-6 w-6 shrink-0 opacity-0 transition-opacity group-hover:opacity-100",
|
|
632
|
-
onClick:
|
|
632
|
+
onClick: d,
|
|
633
633
|
"aria-label": "Remove notification",
|
|
634
634
|
children: /* @__PURE__ */ t(He, { className: "h-4 w-4" })
|
|
635
635
|
}
|
|
@@ -664,7 +664,7 @@ function xt({
|
|
|
664
664
|
] });
|
|
665
665
|
}
|
|
666
666
|
function Nt() {
|
|
667
|
-
const { authToken: e, tokenProps: a } =
|
|
667
|
+
const { authToken: e, tokenProps: a } = $(), p = U((f) => f.activeExports), { clearCompleted: d, removeExport: c, updateExport: u } = te(), [n, l] = F(!1), [h, o] = F(!1), v = Array.from(p.values()).sort(
|
|
668
668
|
(f, y) => y.startedAt.getTime() - f.startedAt.getTime()
|
|
669
669
|
), b = v.some(
|
|
670
670
|
(f) => f.status === "completed" || f.status === "failed"
|
|
@@ -716,7 +716,7 @@ function Nt() {
|
|
|
716
716
|
]), C = V(async () => {
|
|
717
717
|
const f = a == null ? void 0 : a.apiServiceUrl, y = e == null ? void 0 : e.accessToken;
|
|
718
718
|
if (!f || !y) {
|
|
719
|
-
|
|
719
|
+
d();
|
|
720
720
|
return;
|
|
721
721
|
}
|
|
722
722
|
o(!0);
|
|
@@ -724,10 +724,10 @@ function Nt() {
|
|
|
724
724
|
const S = v.filter(
|
|
725
725
|
(r) => r.status === "completed" || r.status === "failed"
|
|
726
726
|
), w = await Promise.allSettled(
|
|
727
|
-
S.map(async (r) => (await
|
|
727
|
+
S.map(async (r) => (await W(f, y, r.id), r.id))
|
|
728
728
|
);
|
|
729
729
|
for (const r of w)
|
|
730
|
-
r.status === "fulfilled" ?
|
|
730
|
+
r.status === "fulfilled" ? c(r.value) : console.error("Failed to delete export:", r.reason);
|
|
731
731
|
} finally {
|
|
732
732
|
o(!1);
|
|
733
733
|
}
|
|
@@ -735,21 +735,21 @@ function Nt() {
|
|
|
735
735
|
v,
|
|
736
736
|
a == null ? void 0 : a.apiServiceUrl,
|
|
737
737
|
e == null ? void 0 : e.accessToken,
|
|
738
|
-
|
|
739
|
-
|
|
738
|
+
d,
|
|
739
|
+
c
|
|
740
740
|
]), N = V(
|
|
741
741
|
async (f) => {
|
|
742
742
|
const y = a == null ? void 0 : a.apiServiceUrl, S = e == null ? void 0 : e.accessToken;
|
|
743
743
|
if (y && S)
|
|
744
744
|
try {
|
|
745
|
-
await
|
|
745
|
+
await W(y, S, f), c(f);
|
|
746
746
|
return;
|
|
747
747
|
} catch (w) {
|
|
748
748
|
console.error(`Failed to cancel export ${f}:`, w);
|
|
749
749
|
}
|
|
750
|
-
|
|
750
|
+
c(f);
|
|
751
751
|
},
|
|
752
|
-
[a == null ? void 0 : a.apiServiceUrl, e == null ? void 0 : e.accessToken,
|
|
752
|
+
[a == null ? void 0 : a.apiServiceUrl, e == null ? void 0 : e.accessToken, c]
|
|
753
753
|
);
|
|
754
754
|
return v.length === 0 ? /* @__PURE__ */ s("div", { className: "p-6 text-center", children: [
|
|
755
755
|
/* @__PURE__ */ t(Y, { className: "mx-auto mb-2 h-8 w-8 text-muted-foreground" }),
|
|
@@ -772,7 +772,7 @@ function Nt() {
|
|
|
772
772
|
disabled: n,
|
|
773
773
|
title: "Refresh status",
|
|
774
774
|
children: /* @__PURE__ */ t(
|
|
775
|
-
|
|
775
|
+
Ke,
|
|
776
776
|
{
|
|
777
777
|
className: `h-4 w-4 ${n ? "animate-spin" : ""}`
|
|
778
778
|
}
|
|
@@ -805,7 +805,7 @@ function Nt() {
|
|
|
805
805
|
function Bt({
|
|
806
806
|
variant: e
|
|
807
807
|
}) {
|
|
808
|
-
const a = U((h) => h.activeExports), p =
|
|
808
|
+
const a = U((h) => h.activeExports), p = We(), d = a.size > 0, c = Array.from(a.values()).some(
|
|
809
809
|
(h) => h.status === "completed" || h.status === "failed"
|
|
810
810
|
), n = p > 0 ? p > 9 ? "9+" : String(p) : null;
|
|
811
811
|
return /* @__PURE__ */ s(he, { children: [
|
|
@@ -817,8 +817,8 @@ function Bt({
|
|
|
817
817
|
className: "relative h-8 w-8",
|
|
818
818
|
"aria-label": "Export notifications",
|
|
819
819
|
children: [
|
|
820
|
-
/* @__PURE__ */ t(
|
|
821
|
-
|
|
820
|
+
/* @__PURE__ */ t(qe, { className: "h-4 w-4" }),
|
|
821
|
+
d && /* @__PURE__ */ t(
|
|
822
822
|
"span",
|
|
823
823
|
{
|
|
824
824
|
className: `absolute flex items-center justify-center rounded-full bg-primary text-primary-foreground ${n ? "-right-0.5 -top-0.5 h-4 min-w-4 px-0.5 text-[10px] font-semibold" : "right-0.5 top-0.5 h-2 w-2"}`,
|
|
@@ -844,10 +844,10 @@ function Ot({
|
|
|
844
844
|
open: e,
|
|
845
845
|
onOpenChange: a,
|
|
846
846
|
trigger: p,
|
|
847
|
-
showTrigger:
|
|
848
|
-
initialMode:
|
|
847
|
+
showTrigger: d = !0,
|
|
848
|
+
initialMode: c = "manage"
|
|
849
849
|
}) {
|
|
850
|
-
const u =
|
|
850
|
+
const u = c === "create", {
|
|
851
851
|
forceClose: n,
|
|
852
852
|
handleOpenChange: l,
|
|
853
853
|
isCreateFlowActive: h,
|
|
@@ -857,7 +857,14 @@ function Ot({
|
|
|
857
857
|
} = ct({
|
|
858
858
|
open: e,
|
|
859
859
|
onOpenChange: a,
|
|
860
|
-
initialCreateFlowActive:
|
|
860
|
+
initialCreateFlowActive: c === "create",
|
|
861
|
+
// Dialog mode renders a built-in X close button — allow explicit
|
|
862
|
+
// closes through `handleOpenChange`. Popover mode has no X; its
|
|
863
|
+
// only close-via-trigger path is a re-click that would silently
|
|
864
|
+
// wipe the in-progress create flow, so block everything during
|
|
865
|
+
// create and make consumers use `forceClose()` from a dedicated
|
|
866
|
+
// button.
|
|
867
|
+
dismissMode: d ? "passive" : "explicit-only"
|
|
861
868
|
}), m = B((A) => A.dashboard), { setDashboardControlsModel: C } = X(), { participants: N } = Je(Ye(m)), f = Array.from(
|
|
862
869
|
new Map(
|
|
863
870
|
N.flatMap(
|
|
@@ -888,10 +895,10 @@ function Ot({
|
|
|
888
895
|
})
|
|
889
896
|
)
|
|
890
897
|
).values()
|
|
891
|
-
), S =
|
|
898
|
+
), S = Qe({
|
|
892
899
|
...m || {},
|
|
893
900
|
controls: []
|
|
894
|
-
}), w =
|
|
901
|
+
}), w = Ze(m), r = (A, x, k) => {
|
|
895
902
|
C(
|
|
896
903
|
A,
|
|
897
904
|
x,
|
|
@@ -915,7 +922,7 @@ function Ot({
|
|
|
915
922
|
availableMetricChoices: y,
|
|
916
923
|
structuralParticipants: N,
|
|
917
924
|
structuralParticipantIdsByControlId: w,
|
|
918
|
-
initialCreateFlow:
|
|
925
|
+
initialCreateFlow: c === "create",
|
|
919
926
|
onCreateFlowActiveChange: b,
|
|
920
927
|
onCreateFlowComplete: i,
|
|
921
928
|
onChange: r,
|
|
@@ -928,7 +935,7 @@ function Ot({
|
|
|
928
935
|
] }),
|
|
929
936
|
g
|
|
930
937
|
] });
|
|
931
|
-
return
|
|
938
|
+
return d ? /* @__PURE__ */ s(he, { open: v, onOpenChange: l, children: [
|
|
932
939
|
/* @__PURE__ */ t(me, { asChild: !0, children: p || /* @__PURE__ */ s(I, { variant: "outline", className: "h-7 px-2", size: "sm", children: [
|
|
933
940
|
/* @__PURE__ */ t(fe, { className: "mr-2 h-4 w-4" }),
|
|
934
941
|
"Controls"
|
|
@@ -946,8 +953,7 @@ function Ot({
|
|
|
946
953
|
] }) : /* @__PURE__ */ t(ae, { open: v, onOpenChange: l, children: /* @__PURE__ */ s(
|
|
947
954
|
se,
|
|
948
955
|
{
|
|
949
|
-
className: "flex max-h-[88vh]
|
|
950
|
-
showCloseButton: !h,
|
|
956
|
+
className: "flex max-h-[88vh] flex-col overflow-hidden sm:max-w-[600px]",
|
|
951
957
|
onEscapeKeyDown: o,
|
|
952
958
|
onPointerDownOutside: o,
|
|
953
959
|
children: [
|
|
@@ -956,8 +962,14 @@ function Ot({
|
|
|
956
962
|
{
|
|
957
963
|
className: h ? "space-y-0" : void 0,
|
|
958
964
|
children: [
|
|
959
|
-
/* @__PURE__ */ t(oe, { children: E }),
|
|
960
|
-
/* @__PURE__ */ t(
|
|
965
|
+
/* @__PURE__ */ t(oe, { className: "text-[15px]", children: E }),
|
|
966
|
+
/* @__PURE__ */ t(
|
|
967
|
+
ne,
|
|
968
|
+
{
|
|
969
|
+
className: h ? "sr-only" : "text-[13px]",
|
|
970
|
+
children: h ? "Configure and add a shared dashboard control." : "Add shared controls viewers can use across the dashboard. Each card can decide how to respond to the same control."
|
|
971
|
+
}
|
|
972
|
+
)
|
|
961
973
|
]
|
|
962
974
|
}
|
|
963
975
|
),
|
|
@@ -970,8 +982,8 @@ function zt({
|
|
|
970
982
|
showFilters: e,
|
|
971
983
|
onToggleFilters: a,
|
|
972
984
|
onAddFilter: p,
|
|
973
|
-
onAddControl:
|
|
974
|
-
onManageControls:
|
|
985
|
+
onAddControl: d,
|
|
986
|
+
onManageControls: c,
|
|
975
987
|
size: u = "default",
|
|
976
988
|
className: n,
|
|
977
989
|
primaryButtonClassName: l,
|
|
@@ -999,7 +1011,7 @@ function zt({
|
|
|
999
1011
|
onClick: a,
|
|
1000
1012
|
size: "sm",
|
|
1001
1013
|
children: [
|
|
1002
|
-
e ? /* @__PURE__ */ t(ht, { className: "mr-2 h-4 w-4" }) : /* @__PURE__ */ t(
|
|
1014
|
+
e ? /* @__PURE__ */ t(ht, { className: "mr-2 h-4 w-4" }) : /* @__PURE__ */ t(q, { className: "mr-2 h-4 w-4" }),
|
|
1003
1015
|
"Filter"
|
|
1004
1016
|
]
|
|
1005
1017
|
}
|
|
@@ -1026,14 +1038,14 @@ function zt({
|
|
|
1026
1038
|
className: L("rounded-xl border border-border/60 p-1 shadow-sm", o),
|
|
1027
1039
|
children: [
|
|
1028
1040
|
/* @__PURE__ */ s(M, { onSelect: p, children: [
|
|
1029
|
-
/* @__PURE__ */ t(
|
|
1041
|
+
/* @__PURE__ */ t(q, { className: "mr-2 h-4 w-4" }),
|
|
1030
1042
|
"Add filter"
|
|
1031
1043
|
] }),
|
|
1032
|
-
/* @__PURE__ */ s(M, { onSelect:
|
|
1044
|
+
/* @__PURE__ */ s(M, { onSelect: d, children: [
|
|
1033
1045
|
/* @__PURE__ */ t(fe, { className: "mr-2 h-4 w-4" }),
|
|
1034
1046
|
"Add control"
|
|
1035
1047
|
] }),
|
|
1036
|
-
/* @__PURE__ */ s(M, { onSelect:
|
|
1048
|
+
/* @__PURE__ */ s(M, { onSelect: c, children: [
|
|
1037
1049
|
/* @__PURE__ */ t(tt, { className: "mr-2 h-4 w-4" }),
|
|
1038
1050
|
"Manage controls"
|
|
1039
1051
|
] })
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsxs as o, jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import { u as s, c as l, B as h, X as d, d as c } from "./index-
|
|
2
|
+
import { u as s, c as l, B as h, X as d, d as c } from "./index-B7kUtCgG.js";
|
|
3
3
|
import "react";
|
|
4
4
|
import "react-dom";
|
|
5
5
|
function N() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),a=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),a=require("./index-BHWWNpG6.js");require("react");require("react-dom");function i(){const o=a.useDashboardStore(e=>e.dashboard),r=a.useDashboardStore(e=>e.actions.setDashboard),t=a.useDashboardStore(e=>e.showDashboardJSON),n=a.useDashboardStore(e=>e.actions.setShowDashboardJSON);return s.jsxs("div",{className:a.cn("relative p-2",{hidden:!t}),children:[s.jsxs(a.Button,{variant:"secondary",size:"sm",className:"absolute right-2 top-2 z-10 h-8",onClick:()=>n(!1),children:[s.jsx(a.X,{className:"mr-2 h-4 w-4"}),"Close"]}),s.jsx(a.de,{onChange:e=>{if(e)try{JSON.parse(e),r(JSON.parse(e))}catch{}},defaultLanguage:"json",className:"h-[550px] overflow-y-auto",value:JSON.stringify(o,null,2),options:{minimap:{enabled:!1},glyphMargin:!1,wordWrap:"on",scrollbar:{verticalScrollbarSize:0,horizontalScrollbarSize:0},fontSize:12,renderLineHighlight:"none"}})]})}exports.default=i;
|