react-semaphor 0.1.228 → 0.1.230
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-CIGGC81u.js +47 -0
- package/dist/chunks/dashboard-controls-uZZf2_Ms.js +1837 -0
- package/dist/chunks/{dashboard-json-CIXKhNAd.js → dashboard-json-BPOoq2o2.js} +1 -1
- package/dist/chunks/{dashboard-json-BIuKyo5Q.js → dashboard-json-BSpSg-pF.js} +1 -1
- package/dist/chunks/{dashboard-summary-settings-dialog-BN1SlS2f.js → dashboard-summary-settings-dialog-BBOnX1vh.js} +1 -1
- package/dist/chunks/{dashboard-summary-settings-dialog-eHzsX-Qu.js → dashboard-summary-settings-dialog-Dd-wAZsI.js} +23 -23
- package/dist/chunks/{edit-dashboard-visual-q2sqCojJ.js → edit-dashboard-visual-CmKLavr8.js} +2115 -2091
- package/dist/chunks/{edit-dashboard-visual-DYgod5dM.js → edit-dashboard-visual-D0myN7lC.js} +18 -18
- package/dist/chunks/{editor-action-buttons-C7BPnMbF.js → editor-action-buttons-DicV0M4e.js} +1 -1
- package/dist/chunks/{editor-action-buttons-iNXXLdep.js → editor-action-buttons-ujerALSP.js} +42 -42
- package/dist/chunks/{index-DAK3Chqv.js → index-BKtY-D8Y.js} +161 -161
- package/dist/chunks/{index-CCPiaTlA.js → index-SLQXKi01.js} +5658 -5645
- package/dist/chunks/{notification-bell-C1ds6KBh.js → notification-bell-BlKABlIE.js} +1 -1
- package/dist/chunks/{notification-bell-jUNpjlLi.js → notification-bell-D83sUTTI.js} +60 -60
- package/dist/chunks/resource-management-panel-CJXZMjqO.js +920 -0
- package/dist/chunks/resource-management-panel-TqjX5FH0.js +6 -0
- package/dist/chunks/{use-visual-utils-D-Z7L3fG.js → use-visual-utils-CjUf9Xns.js} +1 -1
- package/dist/chunks/{use-visual-utils-CmNSBat8.js → use-visual-utils-DNfxkGiH.js} +33 -33
- package/dist/dashboard/index.cjs +1 -1
- package/dist/dashboard/index.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +44 -44
- 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/dashboard-controls-DBYFd2CJ.js +0 -1764
- package/dist/chunks/dashboard-controls-nOlG4ZgU.js +0 -47
- package/dist/chunks/resource-management-panel-0zLiCZGO.js +0 -913
- package/dist/chunks/resource-management-panel-8lnUNPf1.js +0 -6
- package/dist/chunks/use-role-aware-display-preferences-CPLw3mxL.js +0 -1
- package/dist/chunks/use-role-aware-display-preferences-qy2jrDtd.js +0 -29
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const f=require("react"),t=require("./index-
|
|
1
|
+
"use strict";const f=require("react"),t=require("./index-BKtY-D8Y.js"),e=require("react/jsx-runtime"),A=require("./editor-action-buttons-DicV0M4e.js"),U=require("./use-visual-utils-CjUf9Xns.js"),I=require("./date-formatter-Sz6QDaM8.js");/**
|
|
2
2
|
* @license lucide-react v0.453.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import { jsx as t, jsxs as n, Fragment as
|
|
4
|
-
import { V as
|
|
5
|
-
import { a as
|
|
6
|
-
import { c as
|
|
1
|
+
import Z, { useState as D, useRef as M, useCallback as k, useEffect as L, useContext as ee } from "react";
|
|
2
|
+
import { bK as te, b as O, aw as I, bH as B, bD as q, bE as $, ax as W, bC as ae, e as se, f as re, g as ne, h as oe, i as ie, L as _, cu as le, cA as ce, v as de, B as T, w as j, U as P, J as ue, u as F, K as me, N as Q, cB as he, cC as H, x as R, a9 as pe, c as U, c0 as fe, c1 as ge, a3 as ve, c3 as be, c4 as V, s as xe, c8 as we, b$ as ye, M as Ce, cD as Ne, cE as Ae, cF as De, ch as Ee, ci as Se, cj as Le, cG as Te, ck as Ie, cl as Ue, cm as ke, cn as Fe, co as Ve, am as Me, bJ as Pe, X as Re, cH as ze, cI as Oe, cJ as Be, bF as G, a5 as $e, az as je, P as _e, k as He, cK as Ge, l as Xe } from "./index-SLQXKi01.js";
|
|
3
|
+
import { jsx as t, jsxs as n, Fragment as z } from "react/jsx-runtime";
|
|
4
|
+
import { V as Je, E as Ke, a as qe, b as We, L as Qe, c as Ye, d as Ze, C as et } from "./editor-action-buttons-ujerALSP.js";
|
|
5
|
+
import { a as Y } from "./use-visual-utils-DNfxkGiH.js";
|
|
6
|
+
import { c as X } from "./date-formatter-Y8Za1ib3.js";
|
|
7
7
|
/**
|
|
8
8
|
* @license lucide-react v0.453.0 - ISC
|
|
9
9
|
*
|
|
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
|
|
13
|
+
const J = te("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" }],
|
|
17
17
|
["path", { d: "m9 15 3 3 3-3", key: "1npd3o" }]
|
|
18
|
-
]), tt = 1e4, at = 15e3, st = 3e4, rt = 3e4, nt = 12e4,
|
|
18
|
+
]), tt = 1e4, at = 15e3, st = 3e4, rt = 3e4, nt = 12e4, K = 2 * 60 * 60 * 1e3;
|
|
19
19
|
function ot(e) {
|
|
20
20
|
const a = Date.now() - e.getTime();
|
|
21
21
|
return a < rt ? tt : a < nt ? at : st;
|
|
22
22
|
}
|
|
23
23
|
function bt() {
|
|
24
|
-
const { authToken: e, tokenProps: a } =
|
|
24
|
+
const { authToken: e, tokenProps: a } = O(), m = I((h) => h.activeExports), [c, d] = D(
|
|
25
25
|
typeof document < "u" ? !document.hidden : !0
|
|
26
26
|
), u = M(null), o = M(!1), l = M(void 0), f = a == null ? void 0 : a.apiServiceUrl, i = e == null ? void 0 : e.accessToken, g = k(() => {
|
|
27
|
-
const h =
|
|
27
|
+
const h = I.getState().activeExports;
|
|
28
28
|
return Array.from(h.values()).filter(
|
|
29
29
|
(b) => B(b.status)
|
|
30
30
|
);
|
|
@@ -49,10 +49,10 @@ function bt() {
|
|
|
49
49
|
return;
|
|
50
50
|
}
|
|
51
51
|
const b = Date.now(), N = h.filter(
|
|
52
|
-
(s) => b - s.startedAt.getTime() >
|
|
52
|
+
(s) => b - s.startedAt.getTime() > K
|
|
53
53
|
);
|
|
54
54
|
if (N.length > 0) {
|
|
55
|
-
const { updateExport: s } =
|
|
55
|
+
const { updateExport: s } = I.getState().actions;
|
|
56
56
|
for (const r of N)
|
|
57
57
|
s(r.id, {
|
|
58
58
|
status: "failed",
|
|
@@ -61,7 +61,7 @@ function bt() {
|
|
|
61
61
|
});
|
|
62
62
|
}
|
|
63
63
|
const p = h.filter(
|
|
64
|
-
(s) => b - s.startedAt.getTime() <=
|
|
64
|
+
(s) => b - s.startedAt.getTime() <= K
|
|
65
65
|
);
|
|
66
66
|
if (p.length === 0) {
|
|
67
67
|
o.current = !1;
|
|
@@ -70,7 +70,7 @@ function bt() {
|
|
|
70
70
|
const y = await Promise.allSettled(
|
|
71
71
|
p.map(async (s) => {
|
|
72
72
|
try {
|
|
73
|
-
const r = await
|
|
73
|
+
const r = await q(f, i, s.id);
|
|
74
74
|
let v;
|
|
75
75
|
if (r.status === "completed")
|
|
76
76
|
try {
|
|
@@ -99,7 +99,7 @@ function bt() {
|
|
|
99
99
|
), null;
|
|
100
100
|
}
|
|
101
101
|
})
|
|
102
|
-
), { updateExport: A } =
|
|
102
|
+
), { updateExport: A } = I.getState().actions;
|
|
103
103
|
for (const s of y)
|
|
104
104
|
s.status === "fulfilled" && s.value && A(s.value.id, s.value);
|
|
105
105
|
const w = g();
|
|
@@ -135,7 +135,7 @@ function bt() {
|
|
|
135
135
|
};
|
|
136
136
|
}
|
|
137
137
|
function xt() {
|
|
138
|
-
const { authToken: e, tokenProps: a } =
|
|
138
|
+
const { authToken: e, tokenProps: a } = O(), m = I((l) => l.activeExports), { addExport: c } = W(), d = M(!1), u = a == null ? void 0 : a.apiServiceUrl, o = e == null ? void 0 : e.accessToken;
|
|
139
139
|
L(() => {
|
|
140
140
|
if (d.current || !u || !o) return;
|
|
141
141
|
(async () => {
|
|
@@ -200,7 +200,7 @@ function lt({
|
|
|
200
200
|
const [l, f] = D(
|
|
201
201
|
m && c ? `Copy of ${c}` : c || ""
|
|
202
202
|
), [i, g] = D("");
|
|
203
|
-
|
|
203
|
+
Z.useEffect(() => {
|
|
204
204
|
e && (f(
|
|
205
205
|
m && c ? `Copy of ${c}` : c || ""
|
|
206
206
|
), g(""));
|
|
@@ -236,7 +236,7 @@ function lt({
|
|
|
236
236
|
/* @__PURE__ */ n(oe, { className: "flex items-center gap-2", children: [
|
|
237
237
|
/* @__PURE__ */ t("span", { children: "Save Visual As" }),
|
|
238
238
|
h.badgeType !== "local" && /* @__PURE__ */ t(
|
|
239
|
-
|
|
239
|
+
Je,
|
|
240
240
|
{
|
|
241
241
|
type: h.badgeType,
|
|
242
242
|
showLabel: !0,
|
|
@@ -277,7 +277,7 @@ function lt({
|
|
|
277
277
|
] }),
|
|
278
278
|
/* @__PURE__ */ n(de, { children: [
|
|
279
279
|
/* @__PURE__ */ t(
|
|
280
|
-
|
|
280
|
+
T,
|
|
281
281
|
{
|
|
282
282
|
variant: "outline",
|
|
283
283
|
onClick: () => a(!1),
|
|
@@ -285,8 +285,8 @@ function lt({
|
|
|
285
285
|
children: "Cancel"
|
|
286
286
|
}
|
|
287
287
|
),
|
|
288
|
-
/* @__PURE__ */ n(
|
|
289
|
-
d && /* @__PURE__ */ t(
|
|
288
|
+
/* @__PURE__ */ n(T, { onClick: b, disabled: !x || d, children: [
|
|
289
|
+
d && /* @__PURE__ */ t(j, { className: "mr-2 h-4 w-4 animate-spin" }),
|
|
290
290
|
h.actionLabel
|
|
291
291
|
] })
|
|
292
292
|
] })
|
|
@@ -295,7 +295,7 @@ function lt({
|
|
|
295
295
|
function ct() {
|
|
296
296
|
const [e, a] = D(!1), [m, c] = D(!1), [d, u] = D(null), o = P((r) => r.frame), l = P((r) => r.card), f = ue(), i = F((r) => r.selectedSheetId), g = F(
|
|
297
297
|
(r) => r.actions.setIsDashboardPanelOpen
|
|
298
|
-
), { getUpdatedFrame: x } =
|
|
298
|
+
), { getUpdatedFrame: x } = Y(), { selectVisual: h } = me(), { addFrame: b, setSelectedFrameId: N, setIsVisualEditing: p } = Q(), y = !!(o != null && o.visualId), A = (() => {
|
|
299
299
|
var r, v;
|
|
300
300
|
return ((r = o == null ? void 0 : o.cards) == null ? void 0 : r.length) === 1 && ((v = o.cards[0]) != null && v.title) ? o.cards[0].title : f != null && f.title ? f.title : (l == null ? void 0 : l.title) || "Untitled Visual";
|
|
301
301
|
})(), w = he((r) => {
|
|
@@ -303,7 +303,7 @@ function ct() {
|
|
|
303
303
|
if (h(r), m && d && i) {
|
|
304
304
|
const v = {
|
|
305
305
|
...d,
|
|
306
|
-
id:
|
|
306
|
+
id: H(),
|
|
307
307
|
visualId: r.id
|
|
308
308
|
// Link to the newly created library visual
|
|
309
309
|
};
|
|
@@ -342,7 +342,7 @@ function ct() {
|
|
|
342
342
|
const S = {
|
|
343
343
|
...C,
|
|
344
344
|
// Card title already synced
|
|
345
|
-
id:
|
|
345
|
+
id: H(),
|
|
346
346
|
visualId: void 0
|
|
347
347
|
// Explicitly no visualId for local visuals
|
|
348
348
|
};
|
|
@@ -357,14 +357,14 @@ function ct() {
|
|
|
357
357
|
function wt({
|
|
358
358
|
className: e
|
|
359
359
|
}) {
|
|
360
|
-
const a = P((C) => C.frame), m = pe((C) => C.selectedVisual), c = F((C) => C.selectedFrameId), d = F((C) => C.selectedSheetId), { setIsVisualEditing: u, updateFrame: o } =
|
|
360
|
+
const a = P((C) => C.frame), m = pe((C) => C.selectedVisual), c = F((C) => C.selectedFrameId), d = F((C) => C.selectedSheetId), { setIsVisualEditing: u, updateFrame: o } = Q(), [l, f] = D(!1), [i, g] = D("both"), x = !!(a != null && a.visualId || m != null && m.id), h = !!(a != null && a.visualId && c), b = x && !h, {
|
|
361
361
|
saveAsDialogOpen: N,
|
|
362
362
|
setSaveAsDialogOpen: p,
|
|
363
363
|
handleSaveAs: y,
|
|
364
364
|
isLibraryVisual: A,
|
|
365
365
|
currentVisualName: w,
|
|
366
366
|
isSaving: s
|
|
367
|
-
} = ct(), { getUpdatedFrame: r } =
|
|
367
|
+
} = ct(), { getUpdatedFrame: r } = Y(), v = () => {
|
|
368
368
|
if (!d) {
|
|
369
369
|
R.error("No sheet selected");
|
|
370
370
|
return;
|
|
@@ -381,31 +381,31 @@ function wt({
|
|
|
381
381
|
}, E = (C) => {
|
|
382
382
|
g(C), p(!0);
|
|
383
383
|
};
|
|
384
|
-
return /* @__PURE__ */ n(
|
|
384
|
+
return /* @__PURE__ */ n(z, { children: [
|
|
385
385
|
/* @__PURE__ */ n("div", { className: "inline-flex items-center overflow-hidden rounded-md border border-input", children: [
|
|
386
386
|
!x && /* @__PURE__ */ t(
|
|
387
|
-
|
|
387
|
+
Ke,
|
|
388
388
|
{
|
|
389
389
|
className: U(e, "rounded-none border-0"),
|
|
390
390
|
variant: "default"
|
|
391
391
|
}
|
|
392
392
|
),
|
|
393
393
|
x && b && /* @__PURE__ */ t(
|
|
394
|
-
|
|
394
|
+
qe,
|
|
395
395
|
{
|
|
396
396
|
className: U(e, "rounded-none border-0"),
|
|
397
397
|
variant: "default"
|
|
398
398
|
}
|
|
399
399
|
),
|
|
400
400
|
x && h && /* @__PURE__ */ t(
|
|
401
|
-
|
|
401
|
+
We,
|
|
402
402
|
{
|
|
403
403
|
className: U(e, "rounded-none border-0")
|
|
404
404
|
}
|
|
405
405
|
),
|
|
406
406
|
/* @__PURE__ */ n(fe, { modal: !1, children: [
|
|
407
407
|
/* @__PURE__ */ t(ge, { className: "h-8", asChild: !0, children: /* @__PURE__ */ t(
|
|
408
|
-
|
|
408
|
+
T,
|
|
409
409
|
{
|
|
410
410
|
variant: "default",
|
|
411
411
|
size: "sm",
|
|
@@ -419,7 +419,7 @@ function wt({
|
|
|
419
419
|
}
|
|
420
420
|
) }),
|
|
421
421
|
/* @__PURE__ */ n(be, { align: "end", children: [
|
|
422
|
-
h && /* @__PURE__ */ n(
|
|
422
|
+
h && /* @__PURE__ */ n(z, { children: [
|
|
423
423
|
/* @__PURE__ */ n(
|
|
424
424
|
V,
|
|
425
425
|
{
|
|
@@ -450,7 +450,7 @@ function wt({
|
|
|
450
450
|
onClick: () => E("library"),
|
|
451
451
|
disabled: s,
|
|
452
452
|
children: [
|
|
453
|
-
/* @__PURE__ */ t(
|
|
453
|
+
/* @__PURE__ */ t(Qe, { className: "mr-2 h-4 w-4" }),
|
|
454
454
|
"Save as Library Visual"
|
|
455
455
|
]
|
|
456
456
|
}
|
|
@@ -461,7 +461,7 @@ function wt({
|
|
|
461
461
|
onClick: () => E("both"),
|
|
462
462
|
disabled: s,
|
|
463
463
|
children: [
|
|
464
|
-
/* @__PURE__ */ t(
|
|
464
|
+
/* @__PURE__ */ t(Ye, { className: "mr-2 h-4 w-4" }),
|
|
465
465
|
"Save Copy as Linked Visual"
|
|
466
466
|
]
|
|
467
467
|
}
|
|
@@ -469,7 +469,7 @@ function wt({
|
|
|
469
469
|
] })
|
|
470
470
|
] })
|
|
471
471
|
] }),
|
|
472
|
-
/* @__PURE__ */ t(
|
|
472
|
+
/* @__PURE__ */ t(Ze, { className: e }),
|
|
473
473
|
/* @__PURE__ */ t(
|
|
474
474
|
lt,
|
|
475
475
|
{
|
|
@@ -524,8 +524,8 @@ function Ct({
|
|
|
524
524
|
}, children: /* @__PURE__ */ n(Se, { className: "max-w-[520px] border-border/70 p-6", children: [
|
|
525
525
|
/* @__PURE__ */ n(Le, { className: "space-y-3", children: [
|
|
526
526
|
/* @__PURE__ */ n("div", { className: "flex items-center gap-3", children: [
|
|
527
|
-
/* @__PURE__ */ t("div", { className: "flex h-9 w-9 items-center justify-center rounded-full bg-amber-50 ring-1 ring-amber-200/70", children: /* @__PURE__ */ t(
|
|
528
|
-
/* @__PURE__ */ t(
|
|
527
|
+
/* @__PURE__ */ t("div", { className: "flex h-9 w-9 items-center justify-center rounded-full bg-amber-50 ring-1 ring-amber-200/70", children: /* @__PURE__ */ t(Te, { className: "h-[18px] w-[18px] text-amber-600" }) }),
|
|
528
|
+
/* @__PURE__ */ t(Ie, { className: "text-lg font-semibold tracking-tight", children: u })
|
|
529
529
|
] }),
|
|
530
530
|
/* @__PURE__ */ t(Ue, { className: "text-sm leading-6 text-muted-foreground", children: o })
|
|
531
531
|
] }),
|
|
@@ -553,8 +553,8 @@ function Ct({
|
|
|
553
553
|
onClick: m,
|
|
554
554
|
disabled: d,
|
|
555
555
|
className: "order-3 m-0 h-auto min-h-9 whitespace-normal px-4 py-2 text-center leading-5 sm:order-3",
|
|
556
|
-
children: d ? /* @__PURE__ */ n(
|
|
557
|
-
/* @__PURE__ */ t(
|
|
556
|
+
children: d ? /* @__PURE__ */ n(z, { children: [
|
|
557
|
+
/* @__PURE__ */ t(j, { className: "mr-2 h-4 w-4 animate-spin" }),
|
|
558
558
|
"Saving..."
|
|
559
559
|
] }) : i
|
|
560
560
|
}
|
|
@@ -582,7 +582,7 @@ function dt({
|
|
|
582
582
|
case "failed":
|
|
583
583
|
return /* @__PURE__ */ t(et, { className: "mt-0.5 h-5 w-5 shrink-0 text-destructive" });
|
|
584
584
|
default:
|
|
585
|
-
return /* @__PURE__ */ t(
|
|
585
|
+
return /* @__PURE__ */ t(j, { className: "text-foreground-muted mt-0.5 h-5 w-5 shrink-0 animate-spin" });
|
|
586
586
|
}
|
|
587
587
|
}, u = B(e.status), o = (() => {
|
|
588
588
|
switch (e.status) {
|
|
@@ -609,7 +609,7 @@ function dt({
|
|
|
609
609
|
e.totalRows.toLocaleString(),
|
|
610
610
|
" rows"
|
|
611
611
|
] }),
|
|
612
|
-
e.fileSize && /* @__PURE__ */ n(
|
|
612
|
+
e.fileSize && /* @__PURE__ */ n(z, { children: [
|
|
613
613
|
/* @__PURE__ */ t("span", { children: "•" }),
|
|
614
614
|
/* @__PURE__ */ t("span", { children: Pe(e.fileSize) })
|
|
615
615
|
] })
|
|
@@ -619,7 +619,7 @@ function dt({
|
|
|
619
619
|
] })
|
|
620
620
|
] }),
|
|
621
621
|
/* @__PURE__ */ t(
|
|
622
|
-
|
|
622
|
+
T,
|
|
623
623
|
{
|
|
624
624
|
variant: "ghost",
|
|
625
625
|
size: "icon",
|
|
@@ -632,34 +632,34 @@ function dt({
|
|
|
632
632
|
] }),
|
|
633
633
|
/* @__PURE__ */ n("div", { className: "ml-8", children: [
|
|
634
634
|
e.status === "completed" && /* @__PURE__ */ n("div", { className: "flex items-center justify-between", children: [
|
|
635
|
-
/* @__PURE__ */ t("span", { className: "text-xs text-muted-foreground", children:
|
|
635
|
+
/* @__PURE__ */ t("span", { className: "text-xs text-muted-foreground", children: X(e.startedAt, { addSuffix: !0 }) }),
|
|
636
636
|
e.downloadUrl && /* @__PURE__ */ n(
|
|
637
|
-
|
|
637
|
+
T,
|
|
638
638
|
{
|
|
639
639
|
size: "sm",
|
|
640
640
|
variant: "outline",
|
|
641
641
|
className: "h-8 bg-transparent",
|
|
642
642
|
onClick: m,
|
|
643
643
|
children: [
|
|
644
|
-
/* @__PURE__ */ t(
|
|
644
|
+
/* @__PURE__ */ t(ze, { className: "mr-1.5 h-3.5 w-3.5" }),
|
|
645
645
|
"Download"
|
|
646
646
|
]
|
|
647
647
|
}
|
|
648
648
|
)
|
|
649
649
|
] }),
|
|
650
650
|
u && /* @__PURE__ */ n("div", { children: [
|
|
651
|
-
/* @__PURE__ */ t(
|
|
651
|
+
/* @__PURE__ */ t(Oe, { value: e.progress, className: "h-1.5" }),
|
|
652
652
|
/* @__PURE__ */ n("span", { className: "mt-1 block text-xs text-muted-foreground", children: [
|
|
653
653
|
e.progress,
|
|
654
654
|
"% complete"
|
|
655
655
|
] })
|
|
656
656
|
] }),
|
|
657
|
-
e.status === "failed" && /* @__PURE__ */ t("span", { className: "text-xs text-muted-foreground", children:
|
|
657
|
+
e.status === "failed" && /* @__PURE__ */ t("span", { className: "text-xs text-muted-foreground", children: X(e.startedAt, { addSuffix: !0 }) })
|
|
658
658
|
] })
|
|
659
659
|
] });
|
|
660
660
|
}
|
|
661
661
|
function ut() {
|
|
662
|
-
const { authToken: e, tokenProps: a } =
|
|
662
|
+
const { authToken: e, tokenProps: a } = O(), m = I((p) => p.activeExports), { clearCompleted: c, removeExport: d, updateExport: u } = W(), [o, l] = D(!1), [f, i] = D(!1), g = Array.from(m.values()).sort(
|
|
663
663
|
(p, y) => y.startedAt.getTime() - p.startedAt.getTime()
|
|
664
664
|
), x = g.some(
|
|
665
665
|
(p) => p.status === "completed" || p.status === "failed"
|
|
@@ -672,7 +672,7 @@ function ut() {
|
|
|
672
672
|
await Promise.all(
|
|
673
673
|
A.map(async (w) => {
|
|
674
674
|
try {
|
|
675
|
-
const s = await
|
|
675
|
+
const s = await q(p, y, w.id);
|
|
676
676
|
let r;
|
|
677
677
|
if (s.status === "completed")
|
|
678
678
|
try {
|
|
@@ -719,7 +719,7 @@ function ut() {
|
|
|
719
719
|
const A = g.filter(
|
|
720
720
|
(s) => s.status === "completed" || s.status === "failed"
|
|
721
721
|
), w = await Promise.allSettled(
|
|
722
|
-
A.map(async (s) => (await
|
|
722
|
+
A.map(async (s) => (await G(p, y, s.id), s.id))
|
|
723
723
|
);
|
|
724
724
|
for (const s of w)
|
|
725
725
|
s.status === "fulfilled" ? d(s.value) : console.error("Failed to delete export:", s.reason);
|
|
@@ -737,7 +737,7 @@ function ut() {
|
|
|
737
737
|
const y = a == null ? void 0 : a.apiServiceUrl, A = e == null ? void 0 : e.accessToken;
|
|
738
738
|
if (y && A)
|
|
739
739
|
try {
|
|
740
|
-
await
|
|
740
|
+
await G(y, A, p), d(p);
|
|
741
741
|
return;
|
|
742
742
|
} catch (w) {
|
|
743
743
|
console.error(`Failed to cancel export ${p}:`, w);
|
|
@@ -747,18 +747,18 @@ function ut() {
|
|
|
747
747
|
[a == null ? void 0 : a.apiServiceUrl, e == null ? void 0 : e.accessToken, d]
|
|
748
748
|
);
|
|
749
749
|
return g.length === 0 ? /* @__PURE__ */ n("div", { className: "p-6 text-center", children: [
|
|
750
|
-
/* @__PURE__ */ t(
|
|
750
|
+
/* @__PURE__ */ t(J, { className: "mx-auto mb-2 h-8 w-8 text-muted-foreground" }),
|
|
751
751
|
/* @__PURE__ */ t("p", { className: "text-sm text-muted-foreground", children: "No active exports" }),
|
|
752
752
|
/* @__PURE__ */ t("p", { className: "mt-1 text-xs text-muted-foreground", children: "Large exports will appear here" })
|
|
753
753
|
] }) : /* @__PURE__ */ n("div", { className: "flex flex-col", children: [
|
|
754
754
|
/* @__PURE__ */ n("div", { className: "flex items-center justify-between border-b px-4 py-3", children: [
|
|
755
755
|
/* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
|
|
756
|
-
/* @__PURE__ */ t(
|
|
756
|
+
/* @__PURE__ */ t(J, { className: "h-5 w-5 text-muted-foreground" }),
|
|
757
757
|
/* @__PURE__ */ t("h4", { className: "font-semibold", children: "Exports" })
|
|
758
758
|
] }),
|
|
759
759
|
/* @__PURE__ */ n("div", { className: "flex items-center gap-1", children: [
|
|
760
760
|
/* @__PURE__ */ t(
|
|
761
|
-
|
|
761
|
+
T,
|
|
762
762
|
{
|
|
763
763
|
variant: "ghost",
|
|
764
764
|
size: "sm",
|
|
@@ -775,7 +775,7 @@ function ut() {
|
|
|
775
775
|
}
|
|
776
776
|
),
|
|
777
777
|
x && /* @__PURE__ */ t(
|
|
778
|
-
|
|
778
|
+
T,
|
|
779
779
|
{
|
|
780
780
|
variant: "ghost",
|
|
781
781
|
size: "sm",
|
|
@@ -800,19 +800,19 @@ function ut() {
|
|
|
800
800
|
function At({
|
|
801
801
|
variant: e
|
|
802
802
|
}) {
|
|
803
|
-
const a =
|
|
803
|
+
const a = I((f) => f.activeExports), m = je(), c = a.size > 0, d = Array.from(a.values()).some(
|
|
804
804
|
(f) => f.status === "completed" || f.status === "failed"
|
|
805
805
|
), o = m > 0 ? m > 9 ? "9+" : String(m) : null;
|
|
806
806
|
return /* @__PURE__ */ n(_e, { children: [
|
|
807
|
-
/* @__PURE__ */ t(
|
|
808
|
-
|
|
807
|
+
/* @__PURE__ */ t(He, { asChild: !0, children: /* @__PURE__ */ n(
|
|
808
|
+
T,
|
|
809
809
|
{
|
|
810
810
|
variant: e ?? "ghost",
|
|
811
811
|
size: "icon",
|
|
812
812
|
className: "relative h-8 w-8",
|
|
813
813
|
"aria-label": "Export notifications",
|
|
814
814
|
children: [
|
|
815
|
-
/* @__PURE__ */ t(
|
|
815
|
+
/* @__PURE__ */ t(Ge, { className: "h-4 w-4" }),
|
|
816
816
|
c && /* @__PURE__ */ t(
|
|
817
817
|
"span",
|
|
818
818
|
{
|
|
@@ -823,7 +823,7 @@ function At({
|
|
|
823
823
|
]
|
|
824
824
|
}
|
|
825
825
|
) }),
|
|
826
|
-
/* @__PURE__ */ t(
|
|
826
|
+
/* @__PURE__ */ t(Xe, { className: "w-80 p-0", align: "end", sideOffset: 8, children: /* @__PURE__ */ t(ut, {}) })
|
|
827
827
|
] });
|
|
828
828
|
}
|
|
829
829
|
export {
|