@burdenoff/microfe-export 2026.1114.1 → 2026.1119.1
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/export/pages/CreateExportPage.js +269 -269
- package/dist/export/pages/CreateExportPage.js.map +1 -1
- package/dist/export/pages/ExportHistoryPage.js +93 -93
- package/dist/export/pages/ExportHistoryPage.js.map +1 -1
- package/dist/export/pages/ExportTemplatesPage.js +137 -137
- package/dist/export/pages/ExportTemplatesPage.js.map +1 -1
- package/dist/export/pages/v2/DownloadsPage.js +151 -151
- package/dist/export/pages/v2/DownloadsPage.js.map +1 -1
- package/dist/export/pages/v2/NewDownloadPage.js +71 -71
- package/dist/export/pages/v2/NewDownloadPage.js.map +1 -1
- package/package.json +9 -9
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
import { useExport as e } from "../../providers/ExportProvider.js";
|
|
2
2
|
import { useExportJobs as t, useRetryExportJob as ee } from "../../hooks/useExportQueries.js";
|
|
3
|
-
import { useEntityLabel as
|
|
4
|
-
import { useExportStore as
|
|
5
|
-
import { useTr as
|
|
6
|
-
import { PageLayout as
|
|
7
|
-
import { DownloadsTabs as
|
|
8
|
-
import { DownloadStatus as
|
|
9
|
-
import { ExportProgressBar as
|
|
10
|
-
import { exportArchiveDownload as
|
|
11
|
-
import { canTryAgain as
|
|
12
|
-
import { getAllStatuses as
|
|
13
|
-
import { joinPath as
|
|
14
|
-
import { cn as
|
|
15
|
-
import { useEffect as
|
|
16
|
-
import { AlertCircle as
|
|
3
|
+
import { useEntityLabel as te } from "../../hooks/useEntityLabel.js";
|
|
4
|
+
import { useExportStore as ne } from "../../store/exportStore.js";
|
|
5
|
+
import { useTr as re } from "../../hooks/useTr.js";
|
|
6
|
+
import { PageLayout as n } from "../../components/PageLayout.js";
|
|
7
|
+
import { DownloadsTabs as ie } from "../../components/DownloadsTabs.js";
|
|
8
|
+
import { DownloadStatus as r } from "../../components/DownloadStatus.js";
|
|
9
|
+
import { ExportProgressBar as ae } from "../../components/ExportProgressBar.js";
|
|
10
|
+
import { exportArchiveDownload as oe } from "../../utils/exportAuthority.js";
|
|
11
|
+
import { canTryAgain as se, isInProgress as i } from "../../utils/downloadStatus.js";
|
|
12
|
+
import { getAllStatuses as a } from "../../constants/enums.js";
|
|
13
|
+
import { joinPath as ce } from "../../utils/paths.js";
|
|
14
|
+
import { cn as le } from "../../utils/cn.js";
|
|
15
|
+
import { useEffect as ue, useMemo as de, useRef as fe, useState as o } from "react";
|
|
16
|
+
import { AlertCircle as s, ChevronLeft as c, ChevronRight as l, Download as u, FileArchive as pe, Filter as me, Plus as d, RefreshCw as he, RotateCcw as ge, Search as _e, X as f } from "lucide-react";
|
|
17
17
|
import { useSearchParams as ve } from "react-router";
|
|
18
18
|
import { jsx as p, jsxs as m } from "react/jsx-runtime";
|
|
19
|
-
import { Button as h, CTAOverflowMenu as
|
|
20
|
-
var
|
|
19
|
+
import { Button as h, CTAOverflowMenu as ye, EmphasisPanel as be, GlassCard as xe, IllustratedEmptyState as Se, ThemedSelect as g, useRememberedOpen as _ } from "@burdenoff/fe-libs/ui";
|
|
20
|
+
var v = {
|
|
21
21
|
CREATED: ["export.downloads.filters.status.created", "Preparing: not started"],
|
|
22
22
|
QUEUED: ["export.downloads.filters.status.queued", "Preparing: waiting"],
|
|
23
23
|
RUNNING: ["export.downloads.filters.status.running", "Preparing: in progress"],
|
|
@@ -27,59 +27,59 @@ var y = {
|
|
|
27
27
|
EXPIRED: ["export.status.expired", "Link expired: start again"],
|
|
28
28
|
DELETED: ["export.status.deleted", "Deleted"]
|
|
29
29
|
};
|
|
30
|
-
function
|
|
31
|
-
let { basePath:
|
|
32
|
-
|
|
33
|
-
},
|
|
34
|
-
|
|
35
|
-
if (
|
|
36
|
-
|
|
37
|
-
let e =
|
|
38
|
-
e &&
|
|
39
|
-
}, [
|
|
40
|
-
let { data:
|
|
41
|
-
first:
|
|
42
|
-
after:
|
|
43
|
-
}), [
|
|
44
|
-
if (!
|
|
45
|
-
let e =
|
|
46
|
-
return
|
|
30
|
+
function y() {
|
|
31
|
+
let { basePath: y = "/", navigate: Ce } = e(), b = re(), x = te(), { jobFilter: S, updateFilter: C, resetFilter: we, pagination: w, setPagination: T } = ne(), [E] = ve(), { retryJob: D, isPending: O } = ee(), [k, A] = o(null), [j, M] = o([null]), [N, P] = o(0), F = () => {
|
|
32
|
+
M([null]), P(0);
|
|
33
|
+
}, I = fe(!1);
|
|
34
|
+
ue(() => {
|
|
35
|
+
if (I.current) return;
|
|
36
|
+
I.current = !0;
|
|
37
|
+
let e = E.get("status");
|
|
38
|
+
e && a().includes(e) && C({ status: e });
|
|
39
|
+
}, [E, C]);
|
|
40
|
+
let { data: L, totalCount: R, pageInfo: z, isLoading: B, error: V, refetch: Te } = t(S, {
|
|
41
|
+
first: w.pageSize,
|
|
42
|
+
after: j[N] ?? void 0
|
|
43
|
+
}), [H, Ee] = _("export.downloads.summary", !1), [U, De] = _("export.downloads.filters", !1), W = !!S.search || S.status !== "all" || S.format !== "all", Oe = R > 5 || W, G = de(() => {
|
|
44
|
+
if (!S.search) return L;
|
|
45
|
+
let e = S.search.toLowerCase();
|
|
46
|
+
return L.filter((t) => t.name.toLowerCase().includes(e) || t.entityTypes.some((t) => t.toLowerCase().includes(e) || x(t).toLowerCase().includes(e)));
|
|
47
47
|
}, [
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
]),
|
|
52
|
-
|
|
53
|
-
},
|
|
54
|
-
|
|
55
|
-
},
|
|
56
|
-
|
|
57
|
-
page:
|
|
58
|
-
cursor:
|
|
48
|
+
L,
|
|
49
|
+
S.search,
|
|
50
|
+
x
|
|
51
|
+
]), K = S.status === "all", q = K ? G.filter((e) => i(e.status)) : [], J = K ? G.filter((e) => !i(e.status)) : G, Y = (e) => {
|
|
52
|
+
C(e), ("status" in e || "format" in e) && F();
|
|
53
|
+
}, X = () => {
|
|
54
|
+
we(), F();
|
|
55
|
+
}, ke = () => {
|
|
56
|
+
z?.hasNextPage && z.endCursor && (M([...j.slice(0, N + 1), z.endCursor]), P(N + 1), T({
|
|
57
|
+
page: N + 2,
|
|
58
|
+
cursor: z.endCursor
|
|
59
59
|
}));
|
|
60
|
-
},
|
|
61
|
-
|
|
62
|
-
page:
|
|
63
|
-
cursor:
|
|
60
|
+
}, Ae = () => {
|
|
61
|
+
N !== 0 && (P(N - 1), T({
|
|
62
|
+
page: N,
|
|
63
|
+
cursor: j[N - 1] ?? null
|
|
64
64
|
}));
|
|
65
|
-
},
|
|
66
|
-
|
|
65
|
+
}, Z = (e) => Ce?.(ce(y, e)), je = async (e) => {
|
|
66
|
+
A(null);
|
|
67
67
|
try {
|
|
68
|
-
let t = await
|
|
69
|
-
t?.id &&
|
|
68
|
+
let t = await D(e.id);
|
|
69
|
+
t?.id && Z(t.id);
|
|
70
70
|
} catch (e) {
|
|
71
|
-
|
|
71
|
+
A(e instanceof Error && e.message ? e.message : b("export.downloads.errors.retryFailed", "Couldn't start it again. Try once more."));
|
|
72
72
|
}
|
|
73
|
-
},
|
|
74
|
-
let t = e.entityTypes.map(
|
|
75
|
-
return `${t.slice(0, 3).join(", ")}${t.length > 3 ? ` ${
|
|
76
|
-
},
|
|
77
|
-
let t =
|
|
73
|
+
}, Q = L.filter((e) => i(e.status)).length, Me = L.filter((e) => e.status === "COMPLETED").length, Ne = (e) => {
|
|
74
|
+
let t = e.entityTypes.map(x);
|
|
75
|
+
return `${t.slice(0, 3).join(", ")}${t.length > 3 ? ` ${b("export.downloads.row.more", "+{{count}} more", { count: t.length - 3 })}` : ""}${e.createdAt ? ` · ${new Date(e.createdAt).toLocaleDateString()}` : ""}`;
|
|
76
|
+
}, Pe = (e) => {
|
|
77
|
+
let t = oe(e);
|
|
78
78
|
return /* @__PURE__ */ m("li", {
|
|
79
79
|
className: "flex flex-col gap-3 border-b border-border-subtle p-4 last:border-b-0 sm:flex-row sm:items-center",
|
|
80
80
|
children: [/* @__PURE__ */ m("button", {
|
|
81
81
|
type: "button",
|
|
82
|
-
onClick: () =>
|
|
82
|
+
onClick: () => Z(e.id),
|
|
83
83
|
className: "flex min-w-0 flex-1 items-start gap-3 rounded-lg text-left focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/40",
|
|
84
84
|
children: [/* @__PURE__ */ p(pe, {
|
|
85
85
|
size: 20,
|
|
@@ -92,60 +92,60 @@ function b() {
|
|
|
92
92
|
children: e.name
|
|
93
93
|
}), /* @__PURE__ */ p("span", {
|
|
94
94
|
className: "block text-sm text-text-secondary line-clamp-2",
|
|
95
|
-
children:
|
|
95
|
+
children: Ne(e)
|
|
96
96
|
})]
|
|
97
97
|
})]
|
|
98
98
|
}), /* @__PURE__ */ m("div", {
|
|
99
99
|
className: "flex shrink-0 items-center gap-3 pl-8 sm:pl-0",
|
|
100
|
-
children: [/* @__PURE__ */ p(
|
|
100
|
+
children: [/* @__PURE__ */ p(r, { status: e.status }), t ? /* @__PURE__ */ m(h, {
|
|
101
101
|
type: "button",
|
|
102
102
|
variant: "outline",
|
|
103
103
|
size: "sm",
|
|
104
104
|
onClick: () => window.location.assign(t),
|
|
105
|
-
"aria-label":
|
|
105
|
+
"aria-label": b("export.downloads.row.downloadAria", "Download {{name}}", { name: e.name }),
|
|
106
106
|
children: [/* @__PURE__ */ p(u, {
|
|
107
107
|
size: 14,
|
|
108
108
|
"aria-hidden": "true"
|
|
109
|
-
}),
|
|
110
|
-
}) :
|
|
109
|
+
}), b("export.detail.parts.download", "Download")]
|
|
110
|
+
}) : se(e.status) ? /* @__PURE__ */ m(h, {
|
|
111
111
|
type: "button",
|
|
112
112
|
variant: "outline",
|
|
113
113
|
size: "sm",
|
|
114
|
-
disabled:
|
|
115
|
-
onClick: () => void
|
|
116
|
-
"aria-label":
|
|
114
|
+
disabled: O,
|
|
115
|
+
onClick: () => void je(e),
|
|
116
|
+
"aria-label": b("export.downloads.row.tryAgainAria", "Try {{name}} again", { name: e.name }),
|
|
117
117
|
children: [/* @__PURE__ */ p(ge, {
|
|
118
118
|
size: 14,
|
|
119
119
|
"aria-hidden": "true"
|
|
120
|
-
}),
|
|
120
|
+
}), b("export.detail.actions.retry", "Retry Export")]
|
|
121
121
|
}) : null]
|
|
122
122
|
})]
|
|
123
123
|
}, e.id);
|
|
124
124
|
}, $ = "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-primary/20 scheme-normal dark:scheme-dark [&_option]:bg-bg-surface [&_option]:text-text-primary";
|
|
125
|
-
return /* @__PURE__ */ m(
|
|
126
|
-
title:
|
|
127
|
-
subtitle:
|
|
125
|
+
return /* @__PURE__ */ m(n, {
|
|
126
|
+
title: b("export.dashboard.title", "Export"),
|
|
127
|
+
subtitle: b("export.downloads.subtitle", "Get a copy of your workspace data as a ZIP file."),
|
|
128
128
|
icon: /* @__PURE__ */ p(u, { size: 24 }),
|
|
129
|
-
headerActions: /* @__PURE__ */ p(
|
|
129
|
+
headerActions: /* @__PURE__ */ p(ye, {
|
|
130
130
|
primary: {
|
|
131
|
-
label:
|
|
131
|
+
label: b("export.history.actions.newExport", "New Export"),
|
|
132
132
|
icon: /* @__PURE__ */ p(d, { size: 16 }),
|
|
133
|
-
onSelect: () =>
|
|
133
|
+
onSelect: () => Z("new")
|
|
134
134
|
},
|
|
135
135
|
actions: [{
|
|
136
|
-
label:
|
|
137
|
-
onSelect: () =>
|
|
136
|
+
label: H ? b("export.downloads.summary.hide", "Hide summary") : b("export.downloads.summary.show", "Show summary"),
|
|
137
|
+
onSelect: () => Ee(!H)
|
|
138
138
|
}]
|
|
139
139
|
}),
|
|
140
140
|
children: [
|
|
141
|
-
/* @__PURE__ */ p(
|
|
142
|
-
|
|
141
|
+
/* @__PURE__ */ p(ie, {}),
|
|
142
|
+
H && /* @__PURE__ */ p("div", {
|
|
143
143
|
className: "grid grid-cols-1 gap-3 sm:grid-cols-3",
|
|
144
144
|
children: [
|
|
145
|
-
[
|
|
146
|
-
[
|
|
147
|
-
[
|
|
148
|
-
].map(([e, t]) => /* @__PURE__ */ m(
|
|
145
|
+
[b("export.dashboard.metrics.total", "Total Exports"), R],
|
|
146
|
+
[b("export.dashboard.metrics.active", "Active"), Q],
|
|
147
|
+
[b("export.dashboard.metrics.completed", "Completed"), Me]
|
|
148
|
+
].map(([e, t]) => /* @__PURE__ */ m(xe, {
|
|
149
149
|
treatment: "metric",
|
|
150
150
|
className: "border-border-seam p-4",
|
|
151
151
|
children: [/* @__PURE__ */ p("p", {
|
|
@@ -157,29 +157,29 @@ function b() {
|
|
|
157
157
|
})]
|
|
158
158
|
}, String(e)))
|
|
159
159
|
}),
|
|
160
|
-
|
|
160
|
+
Oe && /* @__PURE__ */ m("div", {
|
|
161
161
|
className: "space-y-3",
|
|
162
162
|
children: [/* @__PURE__ */ m(h, {
|
|
163
163
|
type: "button",
|
|
164
164
|
variant: "ghost",
|
|
165
165
|
size: "sm",
|
|
166
|
-
"aria-expanded":
|
|
166
|
+
"aria-expanded": U,
|
|
167
167
|
"aria-controls": "export-downloads-filters",
|
|
168
|
-
onClick: () =>
|
|
168
|
+
onClick: () => De(!U),
|
|
169
169
|
children: [
|
|
170
170
|
/* @__PURE__ */ p(me, {
|
|
171
171
|
size: 14,
|
|
172
172
|
"aria-hidden": "true"
|
|
173
173
|
}),
|
|
174
|
-
|
|
175
|
-
|
|
174
|
+
b("export.downloads.filters.toggle", "More filters"),
|
|
175
|
+
W ? /* @__PURE__ */ p("span", {
|
|
176
176
|
className: "rounded-full bg-bg-sunken px-1.5 text-xs",
|
|
177
|
-
children:
|
|
177
|
+
children: b("export.downloads.filters.on", "On")
|
|
178
178
|
}) : null
|
|
179
179
|
]
|
|
180
180
|
}), /* @__PURE__ */ m("div", {
|
|
181
181
|
id: "export-downloads-filters",
|
|
182
|
-
hidden: !
|
|
182
|
+
hidden: !U,
|
|
183
183
|
className: "space-y-3 rounded-xl border border-border-subtle p-4",
|
|
184
184
|
children: [
|
|
185
185
|
/* @__PURE__ */ m("div", {
|
|
@@ -190,10 +190,10 @@ function b() {
|
|
|
190
190
|
className: "absolute left-3 top-1/2 -translate-y-1/2 text-text-secondary"
|
|
191
191
|
}), /* @__PURE__ */ p("input", {
|
|
192
192
|
type: "search",
|
|
193
|
-
"aria-label":
|
|
194
|
-
placeholder:
|
|
195
|
-
value:
|
|
196
|
-
onChange: (e) =>
|
|
193
|
+
"aria-label": b("export.downloads.filters.search", "Search downloads"),
|
|
194
|
+
placeholder: b("export.downloads.filters.searchPlaceholder", "Search by name or kind of data"),
|
|
195
|
+
value: S.search,
|
|
196
|
+
onChange: (e) => Y({ search: e.target.value }),
|
|
197
197
|
className: "w-full rounded-lg border border-border-subtle bg-bg-surface py-2 pl-9 pr-3 text-sm focus:outline-none focus:ring-2 focus:ring-primary/20"
|
|
198
198
|
})]
|
|
199
199
|
}),
|
|
@@ -201,63 +201,63 @@ function b() {
|
|
|
201
201
|
className: "grid grid-cols-1 gap-3 sm:grid-cols-2",
|
|
202
202
|
children: [/* @__PURE__ */ m("label", {
|
|
203
203
|
className: "space-y-1 text-sm font-medium",
|
|
204
|
-
children: [/* @__PURE__ */ p("span", { children:
|
|
205
|
-
value:
|
|
206
|
-
onChange: (e) =>
|
|
204
|
+
children: [/* @__PURE__ */ p("span", { children: b("export.history.filters.status.label", "Status") }), /* @__PURE__ */ m(g, {
|
|
205
|
+
value: S.status,
|
|
206
|
+
onChange: (e) => Y({ status: e.target.value }),
|
|
207
207
|
className: $,
|
|
208
208
|
children: [/* @__PURE__ */ p("option", {
|
|
209
209
|
value: "all",
|
|
210
|
-
children:
|
|
211
|
-
}),
|
|
210
|
+
children: b("export.history.filters.status.all", "All Statuses")
|
|
211
|
+
}), a().map((e) => /* @__PURE__ */ p("option", {
|
|
212
212
|
value: e,
|
|
213
|
-
children:
|
|
213
|
+
children: b(v[e][0], v[e][1])
|
|
214
214
|
}, e))]
|
|
215
215
|
})]
|
|
216
216
|
}), /* @__PURE__ */ m("label", {
|
|
217
217
|
className: "space-y-1 text-sm font-medium",
|
|
218
|
-
children: [/* @__PURE__ */ p("span", { children:
|
|
219
|
-
value:
|
|
220
|
-
onChange: (e) =>
|
|
218
|
+
children: [/* @__PURE__ */ p("span", { children: b("export.history.filters.format.label", "Format") }), /* @__PURE__ */ m(g, {
|
|
219
|
+
value: S.format,
|
|
220
|
+
onChange: (e) => Y({ format: e.target.value }),
|
|
221
221
|
className: $,
|
|
222
222
|
children: [
|
|
223
223
|
/* @__PURE__ */ p("option", {
|
|
224
224
|
value: "all",
|
|
225
|
-
children:
|
|
225
|
+
children: b("export.history.filters.format.all", "All Formats")
|
|
226
226
|
}),
|
|
227
227
|
/* @__PURE__ */ p("option", {
|
|
228
228
|
value: "CSV",
|
|
229
|
-
children:
|
|
229
|
+
children: b("export.format.csv", "CSV")
|
|
230
230
|
}),
|
|
231
231
|
/* @__PURE__ */ p("option", {
|
|
232
232
|
value: "JSON",
|
|
233
|
-
children:
|
|
233
|
+
children: b("export.format.json", "JSON")
|
|
234
234
|
})
|
|
235
235
|
]
|
|
236
236
|
})]
|
|
237
237
|
})]
|
|
238
238
|
}),
|
|
239
|
-
|
|
239
|
+
W && /* @__PURE__ */ m(h, {
|
|
240
240
|
type: "button",
|
|
241
241
|
variant: "ghost",
|
|
242
242
|
size: "sm",
|
|
243
|
-
onClick:
|
|
243
|
+
onClick: X,
|
|
244
244
|
children: [/* @__PURE__ */ p(f, {
|
|
245
245
|
size: 14,
|
|
246
246
|
"aria-hidden": "true"
|
|
247
|
-
}),
|
|
247
|
+
}), b("export.history.filters.clearAll", "Clear All")]
|
|
248
248
|
})
|
|
249
249
|
]
|
|
250
250
|
})]
|
|
251
251
|
}),
|
|
252
|
-
|
|
252
|
+
k && /* @__PURE__ */ p("p", {
|
|
253
253
|
role: "alert",
|
|
254
254
|
className: "rounded-lg bg-status-error-bg-subtle px-3 py-2 text-sm text-status-error-text",
|
|
255
|
-
children:
|
|
255
|
+
children: k
|
|
256
256
|
}),
|
|
257
|
-
|
|
257
|
+
V && /* @__PURE__ */ m("div", {
|
|
258
258
|
role: "alert",
|
|
259
259
|
className: "flex items-start gap-3 rounded-xl border border-border-default bg-status-error-bg-subtle p-4",
|
|
260
|
-
children: [/* @__PURE__ */ p(
|
|
260
|
+
children: [/* @__PURE__ */ p(s, {
|
|
261
261
|
size: 20,
|
|
262
262
|
"aria-hidden": "true",
|
|
263
263
|
className: "shrink-0 text-status-error-text"
|
|
@@ -266,26 +266,26 @@ function b() {
|
|
|
266
266
|
children: [
|
|
267
267
|
/* @__PURE__ */ p("p", {
|
|
268
268
|
className: "font-medium text-status-error-text",
|
|
269
|
-
children:
|
|
269
|
+
children: b("export.history.error.title", "Error loading exports")
|
|
270
270
|
}),
|
|
271
271
|
/* @__PURE__ */ p("p", {
|
|
272
272
|
className: "text-sm text-status-error-text",
|
|
273
|
-
children:
|
|
273
|
+
children: V.message
|
|
274
274
|
}),
|
|
275
275
|
/* @__PURE__ */ m(h, {
|
|
276
276
|
type: "button",
|
|
277
277
|
variant: "outline",
|
|
278
278
|
size: "sm",
|
|
279
|
-
onClick: () => void
|
|
279
|
+
onClick: () => void Te(),
|
|
280
280
|
children: [/* @__PURE__ */ p(he, {
|
|
281
281
|
size: 14,
|
|
282
282
|
"aria-hidden": "true"
|
|
283
|
-
}),
|
|
283
|
+
}), b("export.history.error.retry", "Try Again")]
|
|
284
284
|
})
|
|
285
285
|
]
|
|
286
286
|
})]
|
|
287
287
|
}),
|
|
288
|
-
|
|
288
|
+
B && /* @__PURE__ */ p("div", {
|
|
289
289
|
className: "space-y-2",
|
|
290
290
|
"aria-hidden": "true",
|
|
291
291
|
children: [
|
|
@@ -294,24 +294,24 @@ function b() {
|
|
|
294
294
|
2
|
|
295
295
|
].map((e) => /* @__PURE__ */ p("div", { className: "h-16 rounded-xl bg-bg-sunken animate-vc-shimmer" }, e))
|
|
296
296
|
}),
|
|
297
|
-
!
|
|
297
|
+
!B && !V && q.length > 0 && /* @__PURE__ */ m(be, {
|
|
298
298
|
className: "p-4 sm:p-5",
|
|
299
299
|
children: [/* @__PURE__ */ p("h2", {
|
|
300
300
|
className: "mb-3 text-xs font-semibold uppercase tracking-wide text-text-secondary",
|
|
301
|
-
children:
|
|
301
|
+
children: b("export.downloads.inProgress", "In progress")
|
|
302
302
|
}), /* @__PURE__ */ p("ul", {
|
|
303
303
|
className: "space-y-3",
|
|
304
|
-
children:
|
|
304
|
+
children: q.map((e) => /* @__PURE__ */ p("li", { children: /* @__PURE__ */ m("button", {
|
|
305
305
|
type: "button",
|
|
306
|
-
onClick: () =>
|
|
306
|
+
onClick: () => Z(e.id),
|
|
307
307
|
className: "w-full space-y-2 rounded-lg text-left focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/40",
|
|
308
308
|
children: [/* @__PURE__ */ m("span", {
|
|
309
309
|
className: "flex flex-wrap items-center justify-between gap-2",
|
|
310
310
|
children: [/* @__PURE__ */ p("span", {
|
|
311
311
|
className: "font-medium text-text-primary",
|
|
312
312
|
children: e.name
|
|
313
|
-
}), /* @__PURE__ */ p(
|
|
314
|
-
}), /* @__PURE__ */ p(
|
|
313
|
+
}), /* @__PURE__ */ p(r, { status: e.status })]
|
|
314
|
+
}), /* @__PURE__ */ p(ae, {
|
|
315
315
|
progress: e.progress,
|
|
316
316
|
size: "sm",
|
|
317
317
|
showLabel: !1
|
|
@@ -319,47 +319,47 @@ function b() {
|
|
|
319
319
|
}) }, e.id))
|
|
320
320
|
})]
|
|
321
321
|
}),
|
|
322
|
-
!
|
|
322
|
+
!B && !V && J.length > 0 && /* @__PURE__ */ m("section", {
|
|
323
323
|
"aria-labelledby": "export-downloads-list",
|
|
324
324
|
children: [/* @__PURE__ */ p("h2", {
|
|
325
325
|
id: "export-downloads-list",
|
|
326
326
|
className: "mb-2 text-xs font-semibold uppercase tracking-wide text-text-secondary",
|
|
327
|
-
children:
|
|
327
|
+
children: b("export.downloads.list", "Your downloads")
|
|
328
328
|
}), /* @__PURE__ */ p("ul", {
|
|
329
329
|
className: "rounded-xl border border-border-subtle bg-bg-surface",
|
|
330
|
-
children:
|
|
330
|
+
children: J.map(Pe)
|
|
331
331
|
})]
|
|
332
332
|
}),
|
|
333
|
-
!
|
|
334
|
-
illustration:
|
|
335
|
-
title:
|
|
336
|
-
description:
|
|
337
|
-
action:
|
|
333
|
+
!B && !V && G.length === 0 && /* @__PURE__ */ p(Se, {
|
|
334
|
+
illustration: W ? "empty-search" : "empty-files",
|
|
335
|
+
title: W ? b("export.history.empty.filtered.title", "No matching exports") : b("export.dashboard.empty.title", "No exports yet"),
|
|
336
|
+
description: W ? b("export.history.empty.filtered.description", "Try adjusting your search or filters.") : b("export.downloads.empty.description", "Pick what you want and we'll package it as a ZIP file."),
|
|
337
|
+
action: W ? /* @__PURE__ */ m(h, {
|
|
338
338
|
type: "button",
|
|
339
339
|
variant: "outline",
|
|
340
|
-
onClick:
|
|
340
|
+
onClick: X,
|
|
341
341
|
children: [/* @__PURE__ */ p(f, {
|
|
342
342
|
size: 16,
|
|
343
343
|
"aria-hidden": "true"
|
|
344
|
-
}),
|
|
344
|
+
}), b("export.history.empty.filtered.actions.clear", "Clear Filters")]
|
|
345
345
|
}) : /* @__PURE__ */ m(h, {
|
|
346
346
|
type: "button",
|
|
347
|
-
onClick: () =>
|
|
347
|
+
onClick: () => Z("new"),
|
|
348
348
|
children: [/* @__PURE__ */ p(d, {
|
|
349
349
|
size: 16,
|
|
350
350
|
"aria-hidden": "true"
|
|
351
|
-
}),
|
|
351
|
+
}), b("export.history.actions.newExport", "New Export")]
|
|
352
352
|
})
|
|
353
353
|
}),
|
|
354
|
-
!
|
|
355
|
-
"aria-label":
|
|
354
|
+
!B && R > w.pageSize && /* @__PURE__ */ m("nav", {
|
|
355
|
+
"aria-label": b("export.downloads.pagination.label", "Pages"),
|
|
356
356
|
className: "flex flex-col items-center justify-between gap-3 sm:flex-row",
|
|
357
357
|
children: [/* @__PURE__ */ p("p", {
|
|
358
358
|
className: "text-sm text-text-secondary",
|
|
359
|
-
children:
|
|
360
|
-
start:
|
|
361
|
-
end: Math.min((
|
|
362
|
-
total:
|
|
359
|
+
children: b("export.history.pagination.showing", "Showing {{start}}-{{end}} of {{total}}", {
|
|
360
|
+
start: N * w.pageSize + 1,
|
|
361
|
+
end: Math.min((N + 1) * w.pageSize, R),
|
|
362
|
+
total: R
|
|
363
363
|
})
|
|
364
364
|
}), /* @__PURE__ */ m("div", {
|
|
365
365
|
className: "flex items-center gap-2",
|
|
@@ -368,24 +368,24 @@ function b() {
|
|
|
368
368
|
type: "button",
|
|
369
369
|
variant: "outline",
|
|
370
370
|
size: "sm",
|
|
371
|
-
onClick:
|
|
372
|
-
disabled:
|
|
373
|
-
children: [/* @__PURE__ */ p(
|
|
371
|
+
onClick: Ae,
|
|
372
|
+
disabled: N === 0,
|
|
373
|
+
children: [/* @__PURE__ */ p(c, {
|
|
374
374
|
size: 16,
|
|
375
375
|
"aria-hidden": "true"
|
|
376
|
-
}),
|
|
376
|
+
}), b("export.history.pagination.prev", "Prev")]
|
|
377
377
|
}),
|
|
378
378
|
/* @__PURE__ */ p("span", {
|
|
379
|
-
className:
|
|
380
|
-
children:
|
|
379
|
+
className: le("px-2 text-sm text-text-secondary"),
|
|
380
|
+
children: b("export.history.pagination.page", "Page {{page}}", { page: N + 1 })
|
|
381
381
|
}),
|
|
382
382
|
/* @__PURE__ */ m(h, {
|
|
383
383
|
type: "button",
|
|
384
384
|
variant: "outline",
|
|
385
385
|
size: "sm",
|
|
386
|
-
onClick:
|
|
387
|
-
disabled: !
|
|
388
|
-
children: [
|
|
386
|
+
onClick: ke,
|
|
387
|
+
disabled: !z?.hasNextPage,
|
|
388
|
+
children: [b("export.history.pagination.next", "Next"), /* @__PURE__ */ p(l, {
|
|
389
389
|
size: 16,
|
|
390
390
|
"aria-hidden": "true"
|
|
391
391
|
})]
|
|
@@ -396,6 +396,6 @@ function b() {
|
|
|
396
396
|
]
|
|
397
397
|
});
|
|
398
398
|
}
|
|
399
|
-
export {
|
|
399
|
+
export { y as DownloadsPage };
|
|
400
400
|
|
|
401
401
|
//# sourceMappingURL=DownloadsPage.js.map
|