react-semaphor 0.1.259 → 0.1.261
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-0hbftZxY.js +42 -0
- package/dist/chunks/dashboard-controls-BYi_r2lH.js +1971 -0
- package/dist/chunks/dashboard-filter-controls-button-BPCw1GMh.js +1066 -0
- package/dist/chunks/dashboard-filter-controls-button-f4pDkDUL.js +11 -0
- package/dist/chunks/{dashboard-json-B43n1l6C.js → dashboard-json-2NJCXsDD.js} +1 -1
- package/dist/chunks/{dashboard-json-D0oSxmLa.js → dashboard-json-Dpy-zKf2.js} +1 -1
- package/dist/chunks/{dashboard-summary-settings-dialog-CxZAMb8B.js → dashboard-summary-settings-dialog-B9zRCvc-.js} +1 -1
- package/dist/chunks/{dashboard-summary-settings-dialog-DMWYgbwB.js → dashboard-summary-settings-dialog-Be3JilRI.js} +1 -1
- package/dist/chunks/edit-dashboard-visual-Bon08erH.js +188 -0
- package/dist/chunks/{edit-dashboard-visual-CCoz1oGX.js → edit-dashboard-visual-CqTlmuYL.js} +5970 -5492
- package/dist/chunks/index-BoJEr_9F.js +1114 -0
- package/dist/chunks/{index-DpSxZvI0.js → index-C2c-_lPE.js} +48682 -45193
- package/dist/chunks/{normalize-dashboard-for-dirty-check-Bn27S0PN.js → normalize-dashboard-for-dirty-check-5KpZN8xr.js} +20 -19
- package/dist/chunks/normalize-dashboard-for-dirty-check-BXRUMVb2.js +1 -0
- package/dist/chunks/{resource-management-panel-L51m1i4h.js → resource-management-panel-BtLPW2b4.js} +1 -1
- package/dist/chunks/{resource-management-panel-B_bDGuq_.js → resource-management-panel-Bva2_0OU.js} +70 -70
- package/dist/chunks/use-create-flow-overlay-state-9X7GyUzl.js +21 -0
- package/dist/chunks/use-create-flow-overlay-state-Vyd5mSnf.js +1445 -0
- package/dist/chunks/{use-visual-utils-V6paZich.js → use-visual-utils-Jv4hWSLm.js} +1 -1
- package/dist/chunks/{use-visual-utils-Cp5KVbr6.js → use-visual-utils-OPk_1t4I.js} +1 -1
- package/dist/dashboard/index.cjs +1 -1
- package/dist/dashboard/index.js +5 -4
- package/dist/index.cjs +1 -1
- package/dist/index.js +102 -99
- package/dist/shared/index.cjs +1 -1
- package/dist/shared/index.js +1 -1
- package/dist/style.css +1 -1
- package/dist/surfboard/index.cjs +1 -1
- package/dist/surfboard/index.js +5 -4
- package/dist/types/dashboard.d.ts +105 -0
- package/dist/types/index.cjs +1 -1
- package/dist/types/index.js +4 -3
- package/dist/types/main.d.ts +175 -1
- package/dist/types/shared.d.ts +89 -0
- package/dist/types/surfboard.d.ts +105 -0
- package/dist/types/types.d.ts +113 -0
- package/package.json +1 -1
- package/dist/chunks/dashboard-controls-51P6aUVB.js +0 -1847
- package/dist/chunks/dashboard-controls-BC3hDGwD.js +0 -47
- package/dist/chunks/edit-dashboard-visual-D1mwhPGF.js +0 -193
- package/dist/chunks/editor-action-buttons-B6ElCCo2.js +0 -412
- package/dist/chunks/editor-action-buttons-Dbs6eczj.js +0 -21
- package/dist/chunks/index-DAhkssOV.js +0 -1109
- package/dist/chunks/normalize-dashboard-for-dirty-check-B7NQDI1H.js +0 -1
- package/dist/chunks/notification-bell-DoIAAZqX.js +0 -6
- package/dist/chunks/notification-bell-cYCkxEbp.js +0 -839
|
@@ -1,839 +0,0 @@
|
|
|
1
|
-
import Z, { useState as D, useRef as M, useCallback as U, useEffect as L, useContext as ee } from "react";
|
|
2
|
-
import { bL as te, b as B, aB as T, bI as O, bE as J, bF as $, aC as W, bD 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 I, 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, ae as pe, c as k, c0 as fe, c1 as ge, a5 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 Ie, ck as Te, cl as ke, cm as Ue, cn as Fe, co as Ve, ar as Me, bK as Pe, X as Re, cH as ze, cI as Be, cJ as Oe, bG as G, a7 as $e, aE as je, P as _e, k as He, cK as Ge, l as Xe } from "./index-DpSxZvI0.js";
|
|
3
|
-
import { jsx as t, jsxs as n, Fragment as z } from "react/jsx-runtime";
|
|
4
|
-
import { V as Ke, E as qe, a as Je, b as We, L as Qe, c as Ye, d as Ze, C as et } from "./editor-action-buttons-B6ElCCo2.js";
|
|
5
|
-
import { a as Y } from "./use-visual-utils-Cp5KVbr6.js";
|
|
6
|
-
import { k as X } from "./date-formatter-vkCj9Ct-.js";
|
|
7
|
-
/**
|
|
8
|
-
* @license lucide-react v0.453.0 - ISC
|
|
9
|
-
*
|
|
10
|
-
* This source code is licensed under the ISC license.
|
|
11
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
12
|
-
*/
|
|
13
|
-
const K = te("FileDown", [
|
|
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
|
-
["path", { d: "M14 2v4a2 2 0 0 0 2 2h4", key: "tnqrlb" }],
|
|
16
|
-
["path", { d: "M12 18v-6", key: "17g6i2" }],
|
|
17
|
-
["path", { d: "m9 15 3 3 3-3", key: "1npd3o" }]
|
|
18
|
-
]), tt = 1e4, at = 15e3, st = 3e4, rt = 3e4, nt = 12e4, q = 2 * 60 * 60 * 1e3;
|
|
19
|
-
function ot(e) {
|
|
20
|
-
const a = Date.now() - e.getTime();
|
|
21
|
-
return a < rt ? tt : a < nt ? at : st;
|
|
22
|
-
}
|
|
23
|
-
function bt() {
|
|
24
|
-
const { authToken: e, tokenProps: a } = B(), m = T((h) => h.activeExports), [c, d] = D(
|
|
25
|
-
typeof document < "u" ? !document.hidden : !0
|
|
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 = U(() => {
|
|
27
|
-
const h = T.getState().activeExports;
|
|
28
|
-
return Array.from(h.values()).filter(
|
|
29
|
-
(b) => O(b.status)
|
|
30
|
-
);
|
|
31
|
-
}, []);
|
|
32
|
-
L(() => {
|
|
33
|
-
if (typeof document > "u") return;
|
|
34
|
-
const h = () => {
|
|
35
|
-
d(!document.hidden);
|
|
36
|
-
};
|
|
37
|
-
return document.addEventListener("visibilitychange", h), () => {
|
|
38
|
-
document.removeEventListener("visibilitychange", h);
|
|
39
|
-
};
|
|
40
|
-
}, []);
|
|
41
|
-
const x = U(async () => {
|
|
42
|
-
if (!f || !i) {
|
|
43
|
-
o.current = !1;
|
|
44
|
-
return;
|
|
45
|
-
}
|
|
46
|
-
const h = g();
|
|
47
|
-
if (h.length === 0) {
|
|
48
|
-
o.current = !1;
|
|
49
|
-
return;
|
|
50
|
-
}
|
|
51
|
-
const b = Date.now(), N = h.filter(
|
|
52
|
-
(s) => b - s.startedAt.getTime() > q
|
|
53
|
-
);
|
|
54
|
-
if (N.length > 0) {
|
|
55
|
-
const { updateExport: s } = T.getState().actions;
|
|
56
|
-
for (const r of N)
|
|
57
|
-
s(r.id, {
|
|
58
|
-
status: "failed",
|
|
59
|
-
error: "Export timed out. Please try again or contact support.",
|
|
60
|
-
lastUpdatedAt: /* @__PURE__ */ new Date()
|
|
61
|
-
});
|
|
62
|
-
}
|
|
63
|
-
const p = h.filter(
|
|
64
|
-
(s) => b - s.startedAt.getTime() <= q
|
|
65
|
-
);
|
|
66
|
-
if (p.length === 0) {
|
|
67
|
-
o.current = !1;
|
|
68
|
-
return;
|
|
69
|
-
}
|
|
70
|
-
const y = await Promise.allSettled(
|
|
71
|
-
p.map(async (s) => {
|
|
72
|
-
try {
|
|
73
|
-
const r = await J(f, i, s.id);
|
|
74
|
-
let v;
|
|
75
|
-
if (r.status === "completed")
|
|
76
|
-
try {
|
|
77
|
-
v = await $(f, i, s.id);
|
|
78
|
-
} catch (E) {
|
|
79
|
-
console.error(
|
|
80
|
-
`[useExportPolling] Failed to get download URL for ${s.id}:`,
|
|
81
|
-
E
|
|
82
|
-
);
|
|
83
|
-
}
|
|
84
|
-
return {
|
|
85
|
-
id: s.id,
|
|
86
|
-
status: r.status,
|
|
87
|
-
progress: r.progress,
|
|
88
|
-
completedChunks: r.completedChunks,
|
|
89
|
-
completedAt: r.completedAt ? new Date(r.completedAt) : void 0,
|
|
90
|
-
lastUpdatedAt: /* @__PURE__ */ new Date(),
|
|
91
|
-
fileSize: r.fileSize,
|
|
92
|
-
error: r.error,
|
|
93
|
-
downloadUrl: v
|
|
94
|
-
};
|
|
95
|
-
} catch (r) {
|
|
96
|
-
return console.error(
|
|
97
|
-
`[useExportPolling] Failed to poll export ${s.id}:`,
|
|
98
|
-
r
|
|
99
|
-
), null;
|
|
100
|
-
}
|
|
101
|
-
})
|
|
102
|
-
), { updateExport: A } = T.getState().actions;
|
|
103
|
-
for (const s of y)
|
|
104
|
-
s.status === "fulfilled" && s.value && A(s.value.id, s.value);
|
|
105
|
-
const w = g();
|
|
106
|
-
if (w.length > 0 && !document.hidden) {
|
|
107
|
-
const s = w.reduce(
|
|
108
|
-
(v, E) => E.startedAt < v ? E.startedAt : v,
|
|
109
|
-
w[0].startedAt
|
|
110
|
-
), r = ot(s);
|
|
111
|
-
u.current && clearTimeout(u.current), u.current = setTimeout(() => {
|
|
112
|
-
var v;
|
|
113
|
-
(v = l.current) == null || v.call(l);
|
|
114
|
-
}, r);
|
|
115
|
-
} else
|
|
116
|
-
o.current = !1;
|
|
117
|
-
}, [f, i, g]);
|
|
118
|
-
return L(() => {
|
|
119
|
-
l.current = x;
|
|
120
|
-
}, [x]), L(() => {
|
|
121
|
-
var b;
|
|
122
|
-
g().length > 0 && c && !o.current && (o.current = !0, (b = l.current) == null || b.call(l));
|
|
123
|
-
}, [m, c, g]), L(() => {
|
|
124
|
-
var b;
|
|
125
|
-
const h = g();
|
|
126
|
-
c && h.length > 0 && !o.current && (o.current = !0, (b = l.current) == null || b.call(l));
|
|
127
|
-
}, [c, g]), L(() => {
|
|
128
|
-
!c && u.current && (clearTimeout(u.current), u.current = null, o.current = !1);
|
|
129
|
-
}, [c]), L(() => () => {
|
|
130
|
-
u.current && (clearTimeout(u.current), u.current = null);
|
|
131
|
-
}, []), {
|
|
132
|
-
isPolling: o.current,
|
|
133
|
-
isTabVisible: c,
|
|
134
|
-
inProgressCount: g().length
|
|
135
|
-
};
|
|
136
|
-
}
|
|
137
|
-
function xt() {
|
|
138
|
-
const { authToken: e, tokenProps: a } = B(), m = T((l) => l.activeExports), { addExport: c } = W(), d = M(!1), u = a == null ? void 0 : a.apiServiceUrl, o = e == null ? void 0 : e.accessToken;
|
|
139
|
-
L(() => {
|
|
140
|
-
if (d.current || !u || !o) return;
|
|
141
|
-
(async () => {
|
|
142
|
-
try {
|
|
143
|
-
const { exports: f } = await ae(u, o, {
|
|
144
|
-
status: ["pending", "processing", "chunking", "compacting", "completed", "failed"],
|
|
145
|
-
limit: 20
|
|
146
|
-
// Limit to recent exports
|
|
147
|
-
});
|
|
148
|
-
for (const i of f) {
|
|
149
|
-
if (m.has(i.id)) continue;
|
|
150
|
-
const g = i.totalChunks ? Math.round(i.completedChunks / i.totalChunks * 100) : 0;
|
|
151
|
-
let x;
|
|
152
|
-
if (i.status === "completed")
|
|
153
|
-
try {
|
|
154
|
-
x = await $(u, o, i.id);
|
|
155
|
-
} catch (b) {
|
|
156
|
-
console.error(
|
|
157
|
-
`[useExportRecovery] Failed to get download URL for ${i.id}:`,
|
|
158
|
-
b
|
|
159
|
-
);
|
|
160
|
-
}
|
|
161
|
-
const h = {
|
|
162
|
-
id: i.id,
|
|
163
|
-
status: i.status,
|
|
164
|
-
progress: g,
|
|
165
|
-
title: it(i),
|
|
166
|
-
totalRows: i.totalRows,
|
|
167
|
-
totalChunks: i.totalChunks,
|
|
168
|
-
completedChunks: i.completedChunks,
|
|
169
|
-
startedAt: new Date(i.createdAt),
|
|
170
|
-
lastUpdatedAt: /* @__PURE__ */ new Date(),
|
|
171
|
-
completedAt: i.completedAt ? new Date(i.completedAt) : void 0,
|
|
172
|
-
fileSize: i.fileSize,
|
|
173
|
-
error: i.error,
|
|
174
|
-
expiresAt: new Date(i.expiresAt),
|
|
175
|
-
downloadUrl: x
|
|
176
|
-
};
|
|
177
|
-
c(h);
|
|
178
|
-
}
|
|
179
|
-
d.current = !0;
|
|
180
|
-
} catch (f) {
|
|
181
|
-
console.error("[useExportRecovery] Failed to recover exports:", f), d.current = !0;
|
|
182
|
-
}
|
|
183
|
-
})();
|
|
184
|
-
}, [u, o, c, m]);
|
|
185
|
-
}
|
|
186
|
-
function it(e) {
|
|
187
|
-
return e.title ? e.title : O(
|
|
188
|
-
e.status
|
|
189
|
-
) ? "Export in progress..." : e.status === "completed" ? "Export completed" : e.status === "failed" ? "Export failed" : "Export";
|
|
190
|
-
}
|
|
191
|
-
function lt({
|
|
192
|
-
open: e,
|
|
193
|
-
onOpenChange: a,
|
|
194
|
-
isLibraryVisual: m,
|
|
195
|
-
currentVisualName: c,
|
|
196
|
-
isSaving: d = !1,
|
|
197
|
-
destinationMode: u = "both",
|
|
198
|
-
onConfirm: o
|
|
199
|
-
}) {
|
|
200
|
-
const [l, f] = D(
|
|
201
|
-
m && c ? `Copy of ${c}` : c || ""
|
|
202
|
-
), [i, g] = D("");
|
|
203
|
-
Z.useEffect(() => {
|
|
204
|
-
e && (f(
|
|
205
|
-
m && c ? `Copy of ${c}` : c || ""
|
|
206
|
-
), g(""));
|
|
207
|
-
}, [e, m, c]);
|
|
208
|
-
const x = !!l.trim(), h = u === "local" ? {
|
|
209
|
-
saveToLibrary: !1,
|
|
210
|
-
saveToCurrentDashboard: !0,
|
|
211
|
-
badgeType: "local",
|
|
212
|
-
description: "Creates a local copy on the current dashboard.",
|
|
213
|
-
actionLabel: "Add to Dashboard (Local)"
|
|
214
|
-
} : u === "library" ? {
|
|
215
|
-
saveToLibrary: !0,
|
|
216
|
-
saveToCurrentDashboard: !1,
|
|
217
|
-
badgeType: "library",
|
|
218
|
-
description: "Creates a reusable visual in Visual Library.",
|
|
219
|
-
actionLabel: "Save as Library Visual"
|
|
220
|
-
} : {
|
|
221
|
-
saveToLibrary: !0,
|
|
222
|
-
saveToCurrentDashboard: !0,
|
|
223
|
-
badgeType: "linked",
|
|
224
|
-
description: "Creates a new library visual and adds a linked copy to this dashboard.",
|
|
225
|
-
actionLabel: "Save Copy as Linked Visual"
|
|
226
|
-
}, b = () => {
|
|
227
|
-
!x || d || o({
|
|
228
|
-
name: l.trim(),
|
|
229
|
-
description: i.trim() || void 0,
|
|
230
|
-
saveToLibrary: h.saveToLibrary,
|
|
231
|
-
saveToCurrentDashboard: h.saveToCurrentDashboard
|
|
232
|
-
});
|
|
233
|
-
};
|
|
234
|
-
return /* @__PURE__ */ t(se, { open: e, onOpenChange: a, children: /* @__PURE__ */ n(re, { className: "sm:max-w-[500px]", children: [
|
|
235
|
-
/* @__PURE__ */ n(ne, { children: [
|
|
236
|
-
/* @__PURE__ */ n(oe, { className: "flex items-center gap-2", children: [
|
|
237
|
-
/* @__PURE__ */ t("span", { children: "Save Visual As" }),
|
|
238
|
-
h.badgeType !== "local" && /* @__PURE__ */ t(
|
|
239
|
-
Ke,
|
|
240
|
-
{
|
|
241
|
-
type: h.badgeType,
|
|
242
|
-
showLabel: !0,
|
|
243
|
-
className: "px-2 py-0.5"
|
|
244
|
-
}
|
|
245
|
-
)
|
|
246
|
-
] }),
|
|
247
|
-
/* @__PURE__ */ t(ie, { children: h.description })
|
|
248
|
-
] }),
|
|
249
|
-
/* @__PURE__ */ n("div", { className: "grid gap-4 py-4", children: [
|
|
250
|
-
/* @__PURE__ */ n("div", { className: "grid gap-2", children: [
|
|
251
|
-
/* @__PURE__ */ t(_, { htmlFor: "name", children: "Name" }),
|
|
252
|
-
/* @__PURE__ */ t(
|
|
253
|
-
le,
|
|
254
|
-
{
|
|
255
|
-
id: "name",
|
|
256
|
-
value: l,
|
|
257
|
-
onChange: (N) => f(N.target.value),
|
|
258
|
-
placeholder: "Enter visual name",
|
|
259
|
-
disabled: d
|
|
260
|
-
}
|
|
261
|
-
)
|
|
262
|
-
] }),
|
|
263
|
-
/* @__PURE__ */ n("div", { className: "grid gap-2", children: [
|
|
264
|
-
/* @__PURE__ */ t(_, { htmlFor: "description", children: "Description (optional)" }),
|
|
265
|
-
/* @__PURE__ */ t(
|
|
266
|
-
ce,
|
|
267
|
-
{
|
|
268
|
-
id: "description",
|
|
269
|
-
value: i,
|
|
270
|
-
onChange: (N) => g(N.target.value),
|
|
271
|
-
placeholder: "Enter visual description",
|
|
272
|
-
rows: 3,
|
|
273
|
-
disabled: d
|
|
274
|
-
}
|
|
275
|
-
)
|
|
276
|
-
] })
|
|
277
|
-
] }),
|
|
278
|
-
/* @__PURE__ */ n(de, { children: [
|
|
279
|
-
/* @__PURE__ */ t(
|
|
280
|
-
I,
|
|
281
|
-
{
|
|
282
|
-
variant: "outline",
|
|
283
|
-
onClick: () => a(!1),
|
|
284
|
-
disabled: d,
|
|
285
|
-
children: "Cancel"
|
|
286
|
-
}
|
|
287
|
-
),
|
|
288
|
-
/* @__PURE__ */ n(I, { onClick: b, disabled: !x || d, children: [
|
|
289
|
-
d && /* @__PURE__ */ t(j, { className: "mr-2 h-4 w-4 animate-spin" }),
|
|
290
|
-
h.actionLabel
|
|
291
|
-
] })
|
|
292
|
-
] })
|
|
293
|
-
] }) });
|
|
294
|
-
}
|
|
295
|
-
function ct() {
|
|
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
|
-
(r) => r.actions.setIsDashboardPanelOpen
|
|
298
|
-
), { getUpdatedFrame: x } = Y(), { selectVisual: h } = me(), { addFrame: b, setSelectedFrameId: N, setIsVisualEditing: p } = Q(), y = !!(o != null && o.visualId), A = (() => {
|
|
299
|
-
var r, v;
|
|
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
|
-
})(), w = he((r) => {
|
|
302
|
-
if (r != null && r.id) {
|
|
303
|
-
if (h(r), m && d && i) {
|
|
304
|
-
const v = {
|
|
305
|
-
...d,
|
|
306
|
-
id: H(),
|
|
307
|
-
visualId: r.id
|
|
308
|
-
// Link to the newly created library visual
|
|
309
|
-
};
|
|
310
|
-
b(i, v, "end"), N(v.id), c(!1), u(null), p(!1);
|
|
311
|
-
}
|
|
312
|
-
g(!0), a(!1);
|
|
313
|
-
}
|
|
314
|
-
});
|
|
315
|
-
return {
|
|
316
|
-
saveAsDialogOpen: e,
|
|
317
|
-
setSaveAsDialogOpen: a,
|
|
318
|
-
handleSaveAs: async (r) => {
|
|
319
|
-
if (!i) {
|
|
320
|
-
R.error("No sheet selected");
|
|
321
|
-
return;
|
|
322
|
-
}
|
|
323
|
-
const v = x(), C = v.cards.length === 1 ? {
|
|
324
|
-
...v,
|
|
325
|
-
cards: v.cards.map((S) => ({
|
|
326
|
-
...S,
|
|
327
|
-
title: r.name
|
|
328
|
-
// Use visual name as card title
|
|
329
|
-
}))
|
|
330
|
-
} : v;
|
|
331
|
-
if (r.saveToLibrary) {
|
|
332
|
-
c(r.saveToCurrentDashboard), u(C);
|
|
333
|
-
const S = {
|
|
334
|
-
title: r.name,
|
|
335
|
-
description: r.description,
|
|
336
|
-
frameObject: C,
|
|
337
|
-
// Card title synced for single-card frames
|
|
338
|
-
isPrivate: !1
|
|
339
|
-
};
|
|
340
|
-
w.mutate(S);
|
|
341
|
-
} else if (r.saveToCurrentDashboard) {
|
|
342
|
-
const S = {
|
|
343
|
-
...C,
|
|
344
|
-
// Card title already synced
|
|
345
|
-
id: H(),
|
|
346
|
-
visualId: void 0
|
|
347
|
-
// Explicitly no visualId for local visuals
|
|
348
|
-
};
|
|
349
|
-
b(i, S, "end"), N(S.id), R.success("Visual saved to dashboard"), a(!1), p(!1);
|
|
350
|
-
}
|
|
351
|
-
},
|
|
352
|
-
isLibraryVisual: y,
|
|
353
|
-
currentVisualName: A,
|
|
354
|
-
isSaving: w.isPending
|
|
355
|
-
};
|
|
356
|
-
}
|
|
357
|
-
function wt({
|
|
358
|
-
className: e
|
|
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 } = 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
|
-
saveAsDialogOpen: N,
|
|
362
|
-
setSaveAsDialogOpen: p,
|
|
363
|
-
handleSaveAs: y,
|
|
364
|
-
isLibraryVisual: A,
|
|
365
|
-
currentVisualName: w,
|
|
366
|
-
isSaving: s
|
|
367
|
-
} = ct(), { getUpdatedFrame: r } = Y(), v = () => {
|
|
368
|
-
if (!d) {
|
|
369
|
-
R.error("No sheet selected");
|
|
370
|
-
return;
|
|
371
|
-
}
|
|
372
|
-
if (l) return;
|
|
373
|
-
f(!0);
|
|
374
|
-
const S = {
|
|
375
|
-
...r(),
|
|
376
|
-
visualId: void 0
|
|
377
|
-
};
|
|
378
|
-
o(d, S), setTimeout(() => {
|
|
379
|
-
f(!1), R.success("Changes applied. Visual is now local to this dashboard"), u(!1);
|
|
380
|
-
}, 300);
|
|
381
|
-
}, E = (C) => {
|
|
382
|
-
g(C), p(!0);
|
|
383
|
-
};
|
|
384
|
-
return /* @__PURE__ */ n(z, { children: [
|
|
385
|
-
/* @__PURE__ */ n("div", { className: "inline-flex items-center overflow-hidden rounded-md border border-input", children: [
|
|
386
|
-
!x && /* @__PURE__ */ t(
|
|
387
|
-
qe,
|
|
388
|
-
{
|
|
389
|
-
className: k(e, "rounded-none border-0"),
|
|
390
|
-
variant: "default"
|
|
391
|
-
}
|
|
392
|
-
),
|
|
393
|
-
x && b && /* @__PURE__ */ t(
|
|
394
|
-
Je,
|
|
395
|
-
{
|
|
396
|
-
className: k(e, "rounded-none border-0"),
|
|
397
|
-
variant: "default"
|
|
398
|
-
}
|
|
399
|
-
),
|
|
400
|
-
x && h && /* @__PURE__ */ t(
|
|
401
|
-
We,
|
|
402
|
-
{
|
|
403
|
-
className: k(e, "rounded-none border-0")
|
|
404
|
-
}
|
|
405
|
-
),
|
|
406
|
-
/* @__PURE__ */ n(fe, { modal: !1, children: [
|
|
407
|
-
/* @__PURE__ */ t(ge, { className: "h-8", asChild: !0, children: /* @__PURE__ */ t(
|
|
408
|
-
I,
|
|
409
|
-
{
|
|
410
|
-
variant: "default",
|
|
411
|
-
size: "sm",
|
|
412
|
-
className: k(
|
|
413
|
-
e,
|
|
414
|
-
"w-8 rounded-none border-0 border-l border-primary-foreground/30 px-2"
|
|
415
|
-
),
|
|
416
|
-
"aria-label": "Open visual save options",
|
|
417
|
-
disabled: s || l,
|
|
418
|
-
children: /* @__PURE__ */ t(ve, { className: "h-4 w-4" })
|
|
419
|
-
}
|
|
420
|
-
) }),
|
|
421
|
-
/* @__PURE__ */ n(be, { align: "end", children: [
|
|
422
|
-
h && /* @__PURE__ */ n(z, { children: [
|
|
423
|
-
/* @__PURE__ */ n(
|
|
424
|
-
V,
|
|
425
|
-
{
|
|
426
|
-
onClick: v,
|
|
427
|
-
disabled: l,
|
|
428
|
-
children: [
|
|
429
|
-
/* @__PURE__ */ t(xe, { className: "mr-2 h-4 w-4" }),
|
|
430
|
-
l ? "Applying..." : "Apply Locally"
|
|
431
|
-
]
|
|
432
|
-
}
|
|
433
|
-
),
|
|
434
|
-
/* @__PURE__ */ t(we, {})
|
|
435
|
-
] }),
|
|
436
|
-
/* @__PURE__ */ n(
|
|
437
|
-
V,
|
|
438
|
-
{
|
|
439
|
-
onClick: () => E("local"),
|
|
440
|
-
disabled: s,
|
|
441
|
-
children: [
|
|
442
|
-
/* @__PURE__ */ t(ye, { className: "mr-2 h-4 w-4" }),
|
|
443
|
-
"Add to Dashboard (Local)"
|
|
444
|
-
]
|
|
445
|
-
}
|
|
446
|
-
),
|
|
447
|
-
/* @__PURE__ */ n(
|
|
448
|
-
V,
|
|
449
|
-
{
|
|
450
|
-
onClick: () => E("library"),
|
|
451
|
-
disabled: s,
|
|
452
|
-
children: [
|
|
453
|
-
/* @__PURE__ */ t(Qe, { className: "mr-2 h-4 w-4" }),
|
|
454
|
-
"Save as Library Visual"
|
|
455
|
-
]
|
|
456
|
-
}
|
|
457
|
-
),
|
|
458
|
-
/* @__PURE__ */ n(
|
|
459
|
-
V,
|
|
460
|
-
{
|
|
461
|
-
onClick: () => E("both"),
|
|
462
|
-
disabled: s,
|
|
463
|
-
children: [
|
|
464
|
-
/* @__PURE__ */ t(Ye, { className: "mr-2 h-4 w-4" }),
|
|
465
|
-
"Save Copy as Linked Visual"
|
|
466
|
-
]
|
|
467
|
-
}
|
|
468
|
-
)
|
|
469
|
-
] })
|
|
470
|
-
] })
|
|
471
|
-
] }),
|
|
472
|
-
/* @__PURE__ */ t(Ze, { className: e }),
|
|
473
|
-
/* @__PURE__ */ t(
|
|
474
|
-
lt,
|
|
475
|
-
{
|
|
476
|
-
open: N,
|
|
477
|
-
onOpenChange: (C) => {
|
|
478
|
-
s || p(C);
|
|
479
|
-
},
|
|
480
|
-
isLibraryVisual: A,
|
|
481
|
-
currentVisualName: w,
|
|
482
|
-
isSaving: s,
|
|
483
|
-
destinationMode: i,
|
|
484
|
-
onConfirm: y
|
|
485
|
-
}
|
|
486
|
-
)
|
|
487
|
-
] });
|
|
488
|
-
}
|
|
489
|
-
function yt({
|
|
490
|
-
className: e,
|
|
491
|
-
//labelClassName,
|
|
492
|
-
switchClassName: a
|
|
493
|
-
}) {
|
|
494
|
-
const m = P((l) => l.isDevMode), c = F((l) => l.isVisualEditing), { setIsDevMode: d } = Ce(), { config: u } = ee(Ne).tokenProps, o = (u == null ? void 0 : u.showAdvancedMode) !== !1;
|
|
495
|
-
return !c || !o ? null : /* @__PURE__ */ n("div", { className: k("flex items-center space-x-2", e), children: [
|
|
496
|
-
/* @__PURE__ */ t(
|
|
497
|
-
Ae,
|
|
498
|
-
{
|
|
499
|
-
className: k("", a),
|
|
500
|
-
checked: m,
|
|
501
|
-
onCheckedChange: () => d(!m),
|
|
502
|
-
id: "advanced-mode",
|
|
503
|
-
icon: /* @__PURE__ */ t(De, { className: "h-4 w-4" }),
|
|
504
|
-
tooltip: "Advanced Mode"
|
|
505
|
-
}
|
|
506
|
-
),
|
|
507
|
-
/* @__PURE__ */ t("label", { htmlFor: "advanced-mode", className: "sr-only", children: "Advanced Mode" })
|
|
508
|
-
] });
|
|
509
|
-
}
|
|
510
|
-
function Ct({
|
|
511
|
-
open: e,
|
|
512
|
-
onOpenChange: a,
|
|
513
|
-
onSave: m,
|
|
514
|
-
onDiscard: c,
|
|
515
|
-
isSaving: d,
|
|
516
|
-
title: u = "Unsaved Changes",
|
|
517
|
-
description: o = "You have unsaved changes to this dashboard. What would you like to do?",
|
|
518
|
-
cancelLabel: l = "Cancel",
|
|
519
|
-
discardLabel: f = "Discard",
|
|
520
|
-
saveLabel: i = "Save & Close"
|
|
521
|
-
}) {
|
|
522
|
-
return /* @__PURE__ */ t(Ee, { open: e, onOpenChange: (x) => {
|
|
523
|
-
!x && d || a(x);
|
|
524
|
-
}, children: /* @__PURE__ */ n(Se, { className: "max-w-[520px] border-border/70 p-6", children: [
|
|
525
|
-
/* @__PURE__ */ n(Le, { className: "space-y-3", children: [
|
|
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(Ie, { className: "h-[18px] w-[18px] text-amber-600" }) }),
|
|
528
|
-
/* @__PURE__ */ t(Te, { className: "text-lg font-semibold tracking-tight", children: u })
|
|
529
|
-
] }),
|
|
530
|
-
/* @__PURE__ */ t(ke, { className: "text-sm leading-6 text-muted-foreground", children: o })
|
|
531
|
-
] }),
|
|
532
|
-
/* @__PURE__ */ n(Ue, { className: "mt-2 flex-col gap-1.5 sm:flex-row sm:justify-end", children: [
|
|
533
|
-
/* @__PURE__ */ t(
|
|
534
|
-
Fe,
|
|
535
|
-
{
|
|
536
|
-
disabled: d,
|
|
537
|
-
className: "order-1 m-0 h-auto min-h-9 whitespace-normal border-border/60 px-4 py-2 text-center leading-5 sm:order-1",
|
|
538
|
-
children: l
|
|
539
|
-
}
|
|
540
|
-
),
|
|
541
|
-
/* @__PURE__ */ t(
|
|
542
|
-
"button",
|
|
543
|
-
{
|
|
544
|
-
onClick: c,
|
|
545
|
-
disabled: d,
|
|
546
|
-
className: "order-2 h-auto min-h-9 whitespace-normal rounded-md border border-destructive/30 bg-destructive/10 px-4 py-2 text-center text-sm font-medium leading-5 text-destructive transition-colors hover:bg-destructive/20 disabled:pointer-events-none disabled:opacity-50 sm:order-2",
|
|
547
|
-
children: f
|
|
548
|
-
}
|
|
549
|
-
),
|
|
550
|
-
/* @__PURE__ */ t(
|
|
551
|
-
Ve,
|
|
552
|
-
{
|
|
553
|
-
onClick: m,
|
|
554
|
-
disabled: d,
|
|
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(z, { children: [
|
|
557
|
-
/* @__PURE__ */ t(j, { className: "mr-2 h-4 w-4 animate-spin" }),
|
|
558
|
-
"Saving..."
|
|
559
|
-
] }) : i
|
|
560
|
-
}
|
|
561
|
-
)
|
|
562
|
-
] })
|
|
563
|
-
] }) });
|
|
564
|
-
}
|
|
565
|
-
function Nt(e, a, m, c) {
|
|
566
|
-
L(() => {
|
|
567
|
-
e && !m && a && c(Me(a));
|
|
568
|
-
}, [e, m, a, c]);
|
|
569
|
-
}
|
|
570
|
-
function dt({
|
|
571
|
-
export: e,
|
|
572
|
-
onRemove: a
|
|
573
|
-
}) {
|
|
574
|
-
const m = () => {
|
|
575
|
-
e.downloadUrl && window.open(e.downloadUrl, "_blank");
|
|
576
|
-
}, c = (l) => {
|
|
577
|
-
l.stopPropagation(), a == null || a(e.id);
|
|
578
|
-
}, d = () => {
|
|
579
|
-
switch (e.status) {
|
|
580
|
-
case "completed":
|
|
581
|
-
return /* @__PURE__ */ t(Oe, { className: "mt-0.5 h-5 w-5 shrink-0 text-green-600" });
|
|
582
|
-
case "failed":
|
|
583
|
-
return /* @__PURE__ */ t(et, { className: "mt-0.5 h-5 w-5 shrink-0 text-destructive" });
|
|
584
|
-
default:
|
|
585
|
-
return /* @__PURE__ */ t(j, { className: "text-foreground-muted mt-0.5 h-5 w-5 shrink-0 animate-spin" });
|
|
586
|
-
}
|
|
587
|
-
}, u = O(e.status), o = (() => {
|
|
588
|
-
switch (e.status) {
|
|
589
|
-
case "pending":
|
|
590
|
-
return "Queued...";
|
|
591
|
-
case "processing":
|
|
592
|
-
return "Processing...";
|
|
593
|
-
case "chunking":
|
|
594
|
-
return "Processing...";
|
|
595
|
-
case "compacting":
|
|
596
|
-
return "Finalizing...";
|
|
597
|
-
default:
|
|
598
|
-
return "Processing...";
|
|
599
|
-
}
|
|
600
|
-
})();
|
|
601
|
-
return /* @__PURE__ */ n("div", { className: "group p-4 transition-colors hover:bg-muted/50", children: [
|
|
602
|
-
/* @__PURE__ */ n("div", { className: "mb-2 flex items-start justify-between gap-3", children: [
|
|
603
|
-
/* @__PURE__ */ n("div", { className: "flex min-w-0 flex-1 items-start gap-3", children: [
|
|
604
|
-
d(),
|
|
605
|
-
/* @__PURE__ */ n("div", { className: "min-w-0 flex-1", children: [
|
|
606
|
-
/* @__PURE__ */ t("h4", { className: "mb-1 truncate text-sm font-medium", children: e.title }),
|
|
607
|
-
e.status === "completed" && /* @__PURE__ */ n("div", { className: "flex items-center gap-2 text-xs text-muted-foreground", children: [
|
|
608
|
-
/* @__PURE__ */ n("span", { children: [
|
|
609
|
-
e.totalRows.toLocaleString(),
|
|
610
|
-
" rows"
|
|
611
|
-
] }),
|
|
612
|
-
e.fileSize && /* @__PURE__ */ n(z, { children: [
|
|
613
|
-
/* @__PURE__ */ t("span", { children: "•" }),
|
|
614
|
-
/* @__PURE__ */ t("span", { children: Pe(e.fileSize) })
|
|
615
|
-
] })
|
|
616
|
-
] }),
|
|
617
|
-
u && /* @__PURE__ */ t("div", { className: "text-xs text-muted-foreground", children: o }),
|
|
618
|
-
e.status === "failed" && /* @__PURE__ */ t("div", { className: "line-clamp-2 text-xs text-destructive", children: e.error || "Export failed" })
|
|
619
|
-
] })
|
|
620
|
-
] }),
|
|
621
|
-
/* @__PURE__ */ t(
|
|
622
|
-
I,
|
|
623
|
-
{
|
|
624
|
-
variant: "ghost",
|
|
625
|
-
size: "icon",
|
|
626
|
-
className: "h-6 w-6 shrink-0 opacity-0 transition-opacity group-hover:opacity-100",
|
|
627
|
-
onClick: c,
|
|
628
|
-
"aria-label": "Remove notification",
|
|
629
|
-
children: /* @__PURE__ */ t(Re, { className: "h-4 w-4" })
|
|
630
|
-
}
|
|
631
|
-
)
|
|
632
|
-
] }),
|
|
633
|
-
/* @__PURE__ */ n("div", { className: "ml-8", children: [
|
|
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: X(e.startedAt, { addSuffix: !0 }) }),
|
|
636
|
-
e.downloadUrl && /* @__PURE__ */ n(
|
|
637
|
-
I,
|
|
638
|
-
{
|
|
639
|
-
size: "sm",
|
|
640
|
-
variant: "outline",
|
|
641
|
-
className: "h-8 bg-transparent",
|
|
642
|
-
onClick: m,
|
|
643
|
-
children: [
|
|
644
|
-
/* @__PURE__ */ t(ze, { className: "mr-1.5 h-3.5 w-3.5" }),
|
|
645
|
-
"Download"
|
|
646
|
-
]
|
|
647
|
-
}
|
|
648
|
-
)
|
|
649
|
-
] }),
|
|
650
|
-
u && /* @__PURE__ */ n("div", { children: [
|
|
651
|
-
/* @__PURE__ */ t(Be, { value: e.progress, className: "h-1.5" }),
|
|
652
|
-
/* @__PURE__ */ n("span", { className: "mt-1 block text-xs text-muted-foreground", children: [
|
|
653
|
-
e.progress,
|
|
654
|
-
"% complete"
|
|
655
|
-
] })
|
|
656
|
-
] }),
|
|
657
|
-
e.status === "failed" && /* @__PURE__ */ t("span", { className: "text-xs text-muted-foreground", children: X(e.startedAt, { addSuffix: !0 }) })
|
|
658
|
-
] })
|
|
659
|
-
] });
|
|
660
|
-
}
|
|
661
|
-
function ut() {
|
|
662
|
-
const { authToken: e, tokenProps: a } = B(), m = T((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
|
-
(p, y) => y.startedAt.getTime() - p.startedAt.getTime()
|
|
664
|
-
), x = g.some(
|
|
665
|
-
(p) => p.status === "completed" || p.status === "failed"
|
|
666
|
-
), h = U(async () => {
|
|
667
|
-
const p = a == null ? void 0 : a.apiServiceUrl, y = e == null ? void 0 : e.accessToken;
|
|
668
|
-
if (!(!p || !y)) {
|
|
669
|
-
l(!0);
|
|
670
|
-
try {
|
|
671
|
-
const A = Array.from(m.values());
|
|
672
|
-
await Promise.all(
|
|
673
|
-
A.map(async (w) => {
|
|
674
|
-
try {
|
|
675
|
-
const s = await J(p, y, w.id);
|
|
676
|
-
let r;
|
|
677
|
-
if (s.status === "completed")
|
|
678
|
-
try {
|
|
679
|
-
r = await $(
|
|
680
|
-
p,
|
|
681
|
-
y,
|
|
682
|
-
w.id
|
|
683
|
-
);
|
|
684
|
-
} catch (v) {
|
|
685
|
-
console.error(`Failed to get download URL for ${w.id}:`, v);
|
|
686
|
-
}
|
|
687
|
-
u(w.id, {
|
|
688
|
-
status: s.status,
|
|
689
|
-
progress: s.progress,
|
|
690
|
-
completedChunks: s.completedChunks,
|
|
691
|
-
completedAt: s.completedAt ? new Date(s.completedAt) : void 0,
|
|
692
|
-
lastUpdatedAt: /* @__PURE__ */ new Date(),
|
|
693
|
-
fileSize: s.fileSize,
|
|
694
|
-
error: s.error,
|
|
695
|
-
downloadUrl: r
|
|
696
|
-
});
|
|
697
|
-
} catch (s) {
|
|
698
|
-
console.error(`Failed to refresh export ${w.id}:`, s);
|
|
699
|
-
}
|
|
700
|
-
})
|
|
701
|
-
);
|
|
702
|
-
} finally {
|
|
703
|
-
l(!1);
|
|
704
|
-
}
|
|
705
|
-
}
|
|
706
|
-
}, [
|
|
707
|
-
m,
|
|
708
|
-
e == null ? void 0 : e.accessToken,
|
|
709
|
-
a == null ? void 0 : a.apiServiceUrl,
|
|
710
|
-
u
|
|
711
|
-
]), b = U(async () => {
|
|
712
|
-
const p = a == null ? void 0 : a.apiServiceUrl, y = e == null ? void 0 : e.accessToken;
|
|
713
|
-
if (!p || !y) {
|
|
714
|
-
c();
|
|
715
|
-
return;
|
|
716
|
-
}
|
|
717
|
-
i(!0);
|
|
718
|
-
try {
|
|
719
|
-
const A = g.filter(
|
|
720
|
-
(s) => s.status === "completed" || s.status === "failed"
|
|
721
|
-
), w = await Promise.allSettled(
|
|
722
|
-
A.map(async (s) => (await G(p, y, s.id), s.id))
|
|
723
|
-
);
|
|
724
|
-
for (const s of w)
|
|
725
|
-
s.status === "fulfilled" ? d(s.value) : console.error("Failed to delete export:", s.reason);
|
|
726
|
-
} finally {
|
|
727
|
-
i(!1);
|
|
728
|
-
}
|
|
729
|
-
}, [
|
|
730
|
-
g,
|
|
731
|
-
a == null ? void 0 : a.apiServiceUrl,
|
|
732
|
-
e == null ? void 0 : e.accessToken,
|
|
733
|
-
c,
|
|
734
|
-
d
|
|
735
|
-
]), N = U(
|
|
736
|
-
async (p) => {
|
|
737
|
-
const y = a == null ? void 0 : a.apiServiceUrl, A = e == null ? void 0 : e.accessToken;
|
|
738
|
-
if (y && A)
|
|
739
|
-
try {
|
|
740
|
-
await G(y, A, p), d(p);
|
|
741
|
-
return;
|
|
742
|
-
} catch (w) {
|
|
743
|
-
console.error(`Failed to cancel export ${p}:`, w);
|
|
744
|
-
}
|
|
745
|
-
d(p);
|
|
746
|
-
},
|
|
747
|
-
[a == null ? void 0 : a.apiServiceUrl, e == null ? void 0 : e.accessToken, d]
|
|
748
|
-
);
|
|
749
|
-
return g.length === 0 ? /* @__PURE__ */ n("div", { className: "p-6 text-center", children: [
|
|
750
|
-
/* @__PURE__ */ t(K, { className: "mx-auto mb-2 h-8 w-8 text-muted-foreground" }),
|
|
751
|
-
/* @__PURE__ */ t("p", { className: "text-sm text-muted-foreground", children: "No active exports" }),
|
|
752
|
-
/* @__PURE__ */ t("p", { className: "mt-1 text-xs text-muted-foreground", children: "Large exports will appear here" })
|
|
753
|
-
] }) : /* @__PURE__ */ n("div", { className: "flex flex-col", children: [
|
|
754
|
-
/* @__PURE__ */ n("div", { className: "flex items-center justify-between border-b px-4 py-3", children: [
|
|
755
|
-
/* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
|
|
756
|
-
/* @__PURE__ */ t(K, { className: "h-5 w-5 text-muted-foreground" }),
|
|
757
|
-
/* @__PURE__ */ t("h4", { className: "font-semibold", children: "Exports" })
|
|
758
|
-
] }),
|
|
759
|
-
/* @__PURE__ */ n("div", { className: "flex items-center gap-1", children: [
|
|
760
|
-
/* @__PURE__ */ t(
|
|
761
|
-
I,
|
|
762
|
-
{
|
|
763
|
-
variant: "ghost",
|
|
764
|
-
size: "sm",
|
|
765
|
-
className: "h-7 w-7 p-0",
|
|
766
|
-
onClick: h,
|
|
767
|
-
disabled: o,
|
|
768
|
-
title: "Refresh status",
|
|
769
|
-
children: /* @__PURE__ */ t(
|
|
770
|
-
$e,
|
|
771
|
-
{
|
|
772
|
-
className: `h-4 w-4 ${o ? "animate-spin" : ""}`
|
|
773
|
-
}
|
|
774
|
-
)
|
|
775
|
-
}
|
|
776
|
-
),
|
|
777
|
-
x && /* @__PURE__ */ t(
|
|
778
|
-
I,
|
|
779
|
-
{
|
|
780
|
-
variant: "ghost",
|
|
781
|
-
size: "sm",
|
|
782
|
-
className: "h-7 px-2 text-sm",
|
|
783
|
-
onClick: b,
|
|
784
|
-
disabled: f,
|
|
785
|
-
children: f ? "Clearing..." : "Clear all"
|
|
786
|
-
}
|
|
787
|
-
)
|
|
788
|
-
] })
|
|
789
|
-
] }),
|
|
790
|
-
/* @__PURE__ */ t("div", { className: "max-h-[350px] overflow-y-auto", children: /* @__PURE__ */ t("div", { className: "divide-y", children: g.map((p) => /* @__PURE__ */ t(
|
|
791
|
-
dt,
|
|
792
|
-
{
|
|
793
|
-
export: p,
|
|
794
|
-
onRemove: N
|
|
795
|
-
},
|
|
796
|
-
p.id
|
|
797
|
-
)) }) })
|
|
798
|
-
] });
|
|
799
|
-
}
|
|
800
|
-
function At({
|
|
801
|
-
variant: e
|
|
802
|
-
}) {
|
|
803
|
-
const a = T((f) => f.activeExports), m = je(), c = a.size > 0, d = Array.from(a.values()).some(
|
|
804
|
-
(f) => f.status === "completed" || f.status === "failed"
|
|
805
|
-
), o = m > 0 ? m > 9 ? "9+" : String(m) : null;
|
|
806
|
-
return /* @__PURE__ */ n(_e, { children: [
|
|
807
|
-
/* @__PURE__ */ t(He, { asChild: !0, children: /* @__PURE__ */ n(
|
|
808
|
-
I,
|
|
809
|
-
{
|
|
810
|
-
variant: e ?? "ghost",
|
|
811
|
-
size: "icon",
|
|
812
|
-
className: "relative h-8 w-8",
|
|
813
|
-
"aria-label": "Export notifications",
|
|
814
|
-
children: [
|
|
815
|
-
/* @__PURE__ */ t(Ge, { className: "h-4 w-4" }),
|
|
816
|
-
c && /* @__PURE__ */ t(
|
|
817
|
-
"span",
|
|
818
|
-
{
|
|
819
|
-
className: `absolute flex items-center justify-center rounded-full bg-primary text-primary-foreground ${o ? "-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"}`,
|
|
820
|
-
children: o
|
|
821
|
-
}
|
|
822
|
-
)
|
|
823
|
-
]
|
|
824
|
-
}
|
|
825
|
-
) }),
|
|
826
|
-
/* @__PURE__ */ t(Xe, { className: "w-80 p-0", align: "end", sideOffset: 8, children: /* @__PURE__ */ t(ut, {}) })
|
|
827
|
-
] });
|
|
828
|
-
}
|
|
829
|
-
export {
|
|
830
|
-
yt as A,
|
|
831
|
-
ut as E,
|
|
832
|
-
At as N,
|
|
833
|
-
Ct as U,
|
|
834
|
-
wt as V,
|
|
835
|
-
dt as a,
|
|
836
|
-
xt as b,
|
|
837
|
-
Nt as c,
|
|
838
|
-
bt as u
|
|
839
|
-
};
|