@burdenoff/microfe-export 2026.624.1 → 2026.625.2
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/components/ExportStatusBadge.js +1 -1
- package/dist/export/components/ExportStatusBadge.js.map +1 -1
- package/dist/export/components/PageLayout.js +7 -18
- package/dist/export/components/PageLayout.js.map +1 -1
- package/dist/export/pages/CreateExportPage.js +256 -249
- package/dist/export/pages/CreateExportPage.js.map +1 -1
- package/dist/export/pages/ExportDashboardPage.js +119 -53
- package/dist/export/pages/ExportDashboardPage.js.map +1 -1
- package/dist/export/pages/ExportDetailPage.js +214 -198
- package/dist/export/pages/ExportDetailPage.js.map +1 -1
- package/dist/export/pages/ExportHistoryPage.js +28 -27
- package/dist/export/pages/ExportHistoryPage.js.map +1 -1
- package/dist/export/pages/ExportTemplatesPage.js +122 -123
- package/dist/export/pages/ExportTemplatesPage.js.map +1 -1
- package/dist/export/pages/TemplateDetailPage.js +127 -116
- package/dist/export/pages/TemplateDetailPage.js.map +1 -1
- package/package.json +2 -2
|
@@ -4,14 +4,15 @@ import { cn as o } from "../utils/cn.js";
|
|
|
4
4
|
import { getArchiveFormatDisplayName as s, getFormatDisplayName as c } from "../constants/enums.js";
|
|
5
5
|
import { ExportStatusBadge as l } from "../components/ExportStatusBadge.js";
|
|
6
6
|
import { ExportProgressBar as u } from "../components/ExportProgressBar.js";
|
|
7
|
-
import { PageLayout as d, PageSection as
|
|
8
|
-
import { nativeImpact as
|
|
9
|
-
import { useState as
|
|
10
|
-
import { AlertCircle as
|
|
11
|
-
import { useNavigate as
|
|
12
|
-
import { jsx as
|
|
7
|
+
import { PageLayout as d, PageSection as ee } from "../components/PageLayout.js";
|
|
8
|
+
import { nativeImpact as te, nativeNotify as f } from "../../utils/nativeBridge.js";
|
|
9
|
+
import { useState as p } from "react";
|
|
10
|
+
import { AlertCircle as m, ArrowLeft as h, CheckCircle2 as g, Clock as _, Download as v, FileDown as y, FileText as b, HardDrive as x, Loader2 as S, RotateCcw as C, Trash2 as w, XCircle as ne } from "lucide-react";
|
|
11
|
+
import { useNavigate as re, useParams as ie } from "react-router-dom";
|
|
12
|
+
import { jsx as T, jsxs as E } from "react/jsx-runtime";
|
|
13
|
+
import { CTAOverflowMenu as D, GlassCard as O } from "@burdenoff/fe-libs/ui";
|
|
13
14
|
//#region src/export/pages/ExportDetailPage.tsx
|
|
14
|
-
function
|
|
15
|
+
function k(e) {
|
|
15
16
|
if (e === 0) return "0 B";
|
|
16
17
|
let t = 1024, n = [
|
|
17
18
|
"B",
|
|
@@ -22,312 +23,327 @@ function M(e) {
|
|
|
22
23
|
], r = Math.floor(Math.log(e) / Math.log(t));
|
|
23
24
|
return `${parseFloat((e / t ** +r).toFixed(2))} ${n[r]}`;
|
|
24
25
|
}
|
|
25
|
-
var
|
|
26
|
-
function
|
|
27
|
-
let { jobId:
|
|
28
|
-
window.history.length > 1 ?
|
|
29
|
-
}, { data:
|
|
30
|
-
|
|
26
|
+
var A = (e, t) => (e.endsWith("/") ? e.slice(0, -1) : e) + (t.startsWith("/") ? t : `/${t}`);
|
|
27
|
+
function j() {
|
|
28
|
+
let { jobId: j } = ie(), { basePath: M = "/", navigate: N } = e(), P = re(), F = () => {
|
|
29
|
+
window.history.length > 1 ? P(-1) : N?.(M);
|
|
30
|
+
}, { data: I, isLoading: L } = r(j), { data: R } = i(j), [z, B] = p(null), { cancelJob: V, isPending: H } = t(), { deleteJob: U, isPending: W } = n(), { retryJob: G, isPending: K } = a(), q = R ?? I ?? null, J = q?.status === "CREATED" || q?.status === "QUEUED" || q?.status === "RUNNING", ae = q?.status === "COMPLETED", oe = q?.status === "FAILED", Y = q?.status === "FAILED" || q?.status === "CANCELLED" || q?.status === "EXPIRED", se = async () => {
|
|
31
|
+
j && B("cancel");
|
|
32
|
+
}, ce = async () => {
|
|
33
|
+
j && (te("medium"), B("delete"));
|
|
34
|
+
}, le = async () => {
|
|
35
|
+
if (!(!j || !z)) {
|
|
36
|
+
try {
|
|
37
|
+
z === "cancel" ? await V(j) : (await U(j), N?.(M)), f("success");
|
|
38
|
+
} catch {
|
|
39
|
+
f("error");
|
|
40
|
+
}
|
|
41
|
+
B(null);
|
|
42
|
+
}
|
|
43
|
+
}, X = async () => {
|
|
44
|
+
if (!j) return;
|
|
45
|
+
let e = await G(j);
|
|
46
|
+
e?.id && N?.(A(M, e.id));
|
|
47
|
+
}, Z = q?.parts.find((e) => e.downloadUrl);
|
|
48
|
+
if (L) return /* @__PURE__ */ E("div", {
|
|
31
49
|
className: "flex flex-col items-center justify-center py-20",
|
|
32
|
-
children: [/* @__PURE__ */
|
|
50
|
+
children: [/* @__PURE__ */ T(S, {
|
|
33
51
|
size: 48,
|
|
34
52
|
className: "animate-spin text-primary"
|
|
35
|
-
}), /* @__PURE__ */
|
|
53
|
+
}), /* @__PURE__ */ T("span", {
|
|
36
54
|
className: "mt-6 text-sm font-medium text-text-secondary",
|
|
37
55
|
children: "Loading export details…"
|
|
38
56
|
})]
|
|
39
|
-
})
|
|
57
|
+
});
|
|
58
|
+
if (!q) return /* @__PURE__ */ E(d, {
|
|
59
|
+
showHeader: !1,
|
|
60
|
+
children: [/* @__PURE__ */ E("div", {
|
|
61
|
+
className: "flex items-center gap-3 mb-6",
|
|
62
|
+
children: [/* @__PURE__ */ T("button", {
|
|
63
|
+
type: "button",
|
|
64
|
+
onClick: F,
|
|
65
|
+
className: "p-2.5 hover:bg-accent rounded-lg transition-all duration-200",
|
|
66
|
+
children: /* @__PURE__ */ T(h, { size: 20 })
|
|
67
|
+
}), /* @__PURE__ */ T("h1", {
|
|
68
|
+
className: "text-xl font-bold",
|
|
69
|
+
children: "Export Not Found"
|
|
70
|
+
})]
|
|
71
|
+
}), /* @__PURE__ */ E("div", {
|
|
72
|
+
className: "border-2 border-border-default rounded-xl bg-status-error-bg-subtle p-12 text-center",
|
|
73
|
+
children: [
|
|
74
|
+
/* @__PURE__ */ T(m, {
|
|
75
|
+
size: 48,
|
|
76
|
+
className: "text-status-error-text mx-auto mb-4"
|
|
77
|
+
}),
|
|
78
|
+
/* @__PURE__ */ T("h3", {
|
|
79
|
+
className: "text-lg font-bold text-status-error-text mb-2",
|
|
80
|
+
children: "Export Not Found"
|
|
81
|
+
}),
|
|
82
|
+
/* @__PURE__ */ T("p", {
|
|
83
|
+
className: "text-status-error-text mb-6",
|
|
84
|
+
children: "The export job you are looking for does not exist or has been deleted."
|
|
85
|
+
}),
|
|
86
|
+
/* @__PURE__ */ E("button", {
|
|
87
|
+
type: "button",
|
|
88
|
+
onClick: F,
|
|
89
|
+
className: "inline-flex items-center gap-2 px-6 py-3 bg-action-primary-bg text-action-primary-text rounded-lg hover:bg-action-primary-bg/90 transition-colors font-medium",
|
|
90
|
+
children: [/* @__PURE__ */ T(h, { size: 18 }), "Back to Dashboard"]
|
|
91
|
+
})
|
|
92
|
+
]
|
|
93
|
+
})]
|
|
94
|
+
});
|
|
95
|
+
let Q = Z ? {
|
|
96
|
+
label: "Download",
|
|
97
|
+
icon: /* @__PURE__ */ T(v, { size: 16 }),
|
|
98
|
+
onSelect: () => {
|
|
99
|
+
Z.downloadUrl && window.location.assign(Z.downloadUrl);
|
|
100
|
+
}
|
|
101
|
+
} : Y ? {
|
|
102
|
+
label: "Retry Export",
|
|
103
|
+
icon: /* @__PURE__ */ T(C, { size: 16 }),
|
|
104
|
+
disabled: K,
|
|
105
|
+
onSelect: () => {
|
|
106
|
+
X();
|
|
107
|
+
}
|
|
108
|
+
} : void 0, $ = [];
|
|
109
|
+
return Y && Z && $.push({
|
|
110
|
+
label: "Retry Export",
|
|
111
|
+
icon: /* @__PURE__ */ T(C, { size: 16 }),
|
|
112
|
+
disabled: K,
|
|
113
|
+
onSelect: () => {
|
|
114
|
+
X();
|
|
115
|
+
}
|
|
116
|
+
}), J && $.push({
|
|
117
|
+
label: "Cancel Export",
|
|
118
|
+
icon: /* @__PURE__ */ T(ne, { size: 16 }),
|
|
119
|
+
disabled: H,
|
|
120
|
+
onSelect: () => {
|
|
121
|
+
se();
|
|
122
|
+
}
|
|
123
|
+
}), J || $.push({
|
|
124
|
+
label: "Delete Export",
|
|
125
|
+
icon: /* @__PURE__ */ T(w, { size: 16 }),
|
|
126
|
+
intent: "destructive",
|
|
127
|
+
disabled: W,
|
|
128
|
+
onSelect: () => {
|
|
129
|
+
ce();
|
|
130
|
+
}
|
|
131
|
+
}), /* @__PURE__ */ E(d, {
|
|
40
132
|
showHeader: !1,
|
|
41
133
|
children: [
|
|
42
|
-
/* @__PURE__ */
|
|
43
|
-
className: "relative overflow-hidden rounded-xl bg-
|
|
44
|
-
children: /* @__PURE__ */
|
|
45
|
-
className: "relative z-10 flex items-center gap-4",
|
|
46
|
-
children: [
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
className: "
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
134
|
+
/* @__PURE__ */ T("div", {
|
|
135
|
+
className: "relative overflow-hidden rounded-xl bg-accent-wash border border-border-seam p-6 shadow-[var(--shadow-pop)]",
|
|
136
|
+
children: /* @__PURE__ */ E("div", {
|
|
137
|
+
className: "relative z-10 flex flex-col sm:flex-row sm:items-center gap-4",
|
|
138
|
+
children: [
|
|
139
|
+
/* @__PURE__ */ T("button", {
|
|
140
|
+
type: "button",
|
|
141
|
+
onClick: F,
|
|
142
|
+
"aria-label": "Go back",
|
|
143
|
+
className: "p-2.5 hover:bg-accent rounded-lg transition-colors duration-200 self-start focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/40",
|
|
144
|
+
children: /* @__PURE__ */ T(h, { size: 20 })
|
|
145
|
+
}),
|
|
146
|
+
/* @__PURE__ */ E("div", {
|
|
147
|
+
className: "flex items-center gap-3 flex-1 min-w-0",
|
|
148
|
+
children: [
|
|
149
|
+
/* @__PURE__ */ T("div", {
|
|
150
|
+
className: "p-2.5 rounded-lg bg-action-primary-bg/10",
|
|
151
|
+
children: /* @__PURE__ */ T(v, {
|
|
152
|
+
size: 24,
|
|
153
|
+
className: "text-primary"
|
|
154
|
+
})
|
|
155
|
+
}),
|
|
156
|
+
/* @__PURE__ */ E("div", {
|
|
157
|
+
className: "flex-1 min-w-0",
|
|
158
|
+
children: [/* @__PURE__ */ T("h1", {
|
|
159
|
+
className: "text-xl sm:text-2xl font-bold truncate",
|
|
160
|
+
children: q.name
|
|
161
|
+
}), /* @__PURE__ */ T("p", {
|
|
162
|
+
className: "text-sm text-text-secondary mt-1",
|
|
163
|
+
children: q.entityTypes.join(", ")
|
|
164
|
+
})]
|
|
165
|
+
}),
|
|
166
|
+
/* @__PURE__ */ T(l, { status: q.status })
|
|
167
|
+
]
|
|
168
|
+
}),
|
|
169
|
+
(Q || $.length > 0) && /* @__PURE__ */ T("div", {
|
|
170
|
+
className: "flex-shrink-0",
|
|
171
|
+
children: /* @__PURE__ */ T(D, {
|
|
172
|
+
primary: Q,
|
|
173
|
+
actions: $
|
|
174
|
+
})
|
|
175
|
+
})
|
|
176
|
+
]
|
|
74
177
|
})
|
|
75
178
|
}),
|
|
76
|
-
(
|
|
77
|
-
className: "border
|
|
78
|
-
children: [/* @__PURE__ */
|
|
79
|
-
progress:
|
|
179
|
+
(q.status === "RUNNING" || q.status === "QUEUED") && /* @__PURE__ */ E("div", {
|
|
180
|
+
className: "border border-border-seam rounded-xl bg-status-info-bg-subtle p-6",
|
|
181
|
+
children: [/* @__PURE__ */ T(u, {
|
|
182
|
+
progress: q.progress,
|
|
80
183
|
size: "lg"
|
|
81
|
-
}),
|
|
184
|
+
}), q.processedEntities != null && q.totalEntities != null && /* @__PURE__ */ E("p", {
|
|
82
185
|
className: "text-sm text-text-secondary mt-2",
|
|
83
186
|
children: [
|
|
84
|
-
|
|
187
|
+
q.processedEntities.toLocaleString(),
|
|
85
188
|
" /",
|
|
86
189
|
" ",
|
|
87
|
-
|
|
190
|
+
q.totalEntities.toLocaleString(),
|
|
88
191
|
" entities processed"
|
|
89
192
|
]
|
|
90
193
|
})]
|
|
91
194
|
}),
|
|
92
|
-
|
|
195
|
+
oe && q.errorMessage && /* @__PURE__ */ E("div", {
|
|
93
196
|
className: "border-2 border-border-default rounded-xl bg-status-error-bg-subtle p-6 flex items-start gap-4",
|
|
94
|
-
children: [/* @__PURE__ */
|
|
197
|
+
children: [/* @__PURE__ */ T(m, {
|
|
95
198
|
size: 24,
|
|
96
199
|
className: "text-status-error-text flex-shrink-0 mt-0.5"
|
|
97
|
-
}), /* @__PURE__ */
|
|
200
|
+
}), /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("h3", {
|
|
98
201
|
className: "font-semibold text-status-error-text mb-1",
|
|
99
202
|
children: "Export Failed"
|
|
100
|
-
}), /* @__PURE__ */
|
|
203
|
+
}), /* @__PURE__ */ T("p", {
|
|
101
204
|
className: "text-sm text-status-error-text",
|
|
102
|
-
children:
|
|
205
|
+
children: q.errorMessage
|
|
103
206
|
})] })]
|
|
104
207
|
}),
|
|
105
|
-
/* @__PURE__ */
|
|
208
|
+
/* @__PURE__ */ T("div", {
|
|
106
209
|
className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4",
|
|
107
210
|
children: [
|
|
108
211
|
{
|
|
109
|
-
icon: /* @__PURE__ */
|
|
212
|
+
icon: /* @__PURE__ */ T(b, { size: 18 }),
|
|
110
213
|
label: "Format",
|
|
111
|
-
value: c(
|
|
214
|
+
value: c(q.format)
|
|
112
215
|
},
|
|
113
216
|
{
|
|
114
|
-
icon: /* @__PURE__ */
|
|
217
|
+
icon: /* @__PURE__ */ T(x, { size: 18 }),
|
|
115
218
|
label: "Archive",
|
|
116
|
-
value: s(
|
|
219
|
+
value: s(q.archiveFormat)
|
|
117
220
|
},
|
|
118
221
|
{
|
|
119
|
-
icon: /* @__PURE__ */
|
|
222
|
+
icon: /* @__PURE__ */ T(v, { size: 18 }),
|
|
120
223
|
label: "Total Size",
|
|
121
|
-
value:
|
|
224
|
+
value: q.totalSizeBytes == null ? "-" : k(q.totalSizeBytes)
|
|
122
225
|
},
|
|
123
226
|
{
|
|
124
|
-
icon: /* @__PURE__ */
|
|
227
|
+
icon: /* @__PURE__ */ T(_, { size: 18 }),
|
|
125
228
|
label: "Created",
|
|
126
|
-
value: new Date(
|
|
229
|
+
value: new Date(q.createdAt).toLocaleDateString()
|
|
127
230
|
}
|
|
128
|
-
].map((e) => /* @__PURE__ */
|
|
129
|
-
|
|
130
|
-
|
|
231
|
+
].map((e) => /* @__PURE__ */ E(O, {
|
|
232
|
+
treatment: "metric",
|
|
233
|
+
className: "p-4 border-border-seam",
|
|
234
|
+
children: [/* @__PURE__ */ E("div", {
|
|
131
235
|
className: "flex items-center gap-2 text-text-secondary mb-1",
|
|
132
|
-
children: [e.icon, /* @__PURE__ */
|
|
236
|
+
children: [e.icon, /* @__PURE__ */ T("span", {
|
|
133
237
|
className: "text-xs font-medium",
|
|
134
238
|
children: e.label
|
|
135
239
|
})]
|
|
136
|
-
}), /* @__PURE__ */
|
|
137
|
-
className: "font-bold text-lg",
|
|
240
|
+
}), /* @__PURE__ */ T("p", {
|
|
241
|
+
className: "font-bold text-lg tabular-nums",
|
|
138
242
|
children: e.value
|
|
139
243
|
})]
|
|
140
244
|
}, e.label))
|
|
141
245
|
}),
|
|
142
|
-
|
|
246
|
+
q.parts.length > 0 && /* @__PURE__ */ T(ee, {
|
|
143
247
|
title: "Export Parts",
|
|
144
|
-
description: `${
|
|
145
|
-
children: /* @__PURE__ */
|
|
248
|
+
description: `${q.parts.length} file(s) generated`,
|
|
249
|
+
children: /* @__PURE__ */ T("div", {
|
|
146
250
|
className: "space-y-2",
|
|
147
|
-
children:
|
|
148
|
-
className: o("border
|
|
149
|
-
children: [/* @__PURE__ */
|
|
251
|
+
children: q.parts.map((e) => /* @__PURE__ */ E("div", {
|
|
252
|
+
className: o("border border-border-seam rounded-xl p-4 flex flex-col sm:flex-row sm:items-center sm:justify-between gap-3 bg-bg-surface", "hover:border-primary/40 transition-colors duration-200"),
|
|
253
|
+
children: [/* @__PURE__ */ E("div", {
|
|
150
254
|
className: "flex items-center gap-3 min-w-0",
|
|
151
|
-
children: [/* @__PURE__ */
|
|
255
|
+
children: [/* @__PURE__ */ T(y, {
|
|
152
256
|
size: 20,
|
|
153
257
|
className: "text-primary flex-shrink-0"
|
|
154
|
-
}), /* @__PURE__ */
|
|
258
|
+
}), /* @__PURE__ */ E("div", {
|
|
155
259
|
className: "min-w-0",
|
|
156
|
-
children: [/* @__PURE__ */
|
|
260
|
+
children: [/* @__PURE__ */ T("p", {
|
|
157
261
|
className: "font-medium truncate",
|
|
158
262
|
children: e.fileName
|
|
159
|
-
}), /* @__PURE__ */
|
|
263
|
+
}), /* @__PURE__ */ E("p", {
|
|
160
264
|
className: "text-sm text-text-secondary",
|
|
161
265
|
children: [
|
|
162
266
|
e.entityTypes.join(", "),
|
|
163
267
|
" ·",
|
|
164
268
|
" ",
|
|
165
|
-
|
|
269
|
+
k(e.sizeBytes),
|
|
166
270
|
e.downloadExpiresAt && ` · expires ${new Date(e.downloadExpiresAt).toLocaleDateString()}`
|
|
167
271
|
]
|
|
168
272
|
})]
|
|
169
273
|
})]
|
|
170
|
-
}), /* @__PURE__ */
|
|
274
|
+
}), /* @__PURE__ */ T("div", {
|
|
171
275
|
className: "flex items-center gap-2 flex-shrink-0",
|
|
172
|
-
children: e.downloadUrl ? /* @__PURE__ */
|
|
276
|
+
children: e.downloadUrl ? /* @__PURE__ */ E("a", {
|
|
173
277
|
href: e.downloadUrl,
|
|
174
278
|
className: "inline-flex items-center gap-2 px-3 py-1.5 bg-action-primary-bg text-action-primary-text rounded-lg hover:bg-action-primary-bg/90 transition-colors text-sm font-medium",
|
|
175
|
-
children: [/* @__PURE__ */
|
|
176
|
-
}) : /* @__PURE__ */
|
|
279
|
+
children: [/* @__PURE__ */ T(v, { size: 14 }), "Download"]
|
|
280
|
+
}) : /* @__PURE__ */ E("span", {
|
|
177
281
|
className: "inline-flex items-center gap-1.5 text-sm text-text-secondary",
|
|
178
|
-
children: [/* @__PURE__ */
|
|
282
|
+
children: [/* @__PURE__ */ T(_, { size: 14 }), "Pending"]
|
|
179
283
|
})
|
|
180
284
|
})]
|
|
181
285
|
}, e.id))
|
|
182
286
|
})
|
|
183
287
|
}),
|
|
184
|
-
|
|
288
|
+
ae && q.parts.length === 0 && /* @__PURE__ */ E("div", {
|
|
185
289
|
className: "border-2 border-border-default rounded-xl bg-status-success-bg-subtle p-6 text-center",
|
|
186
290
|
children: [
|
|
187
|
-
/* @__PURE__ */
|
|
291
|
+
/* @__PURE__ */ T(g, {
|
|
188
292
|
size: 48,
|
|
189
293
|
className: "text-status-success-text mx-auto mb-3"
|
|
190
294
|
}),
|
|
191
|
-
/* @__PURE__ */
|
|
295
|
+
/* @__PURE__ */ T("h3", {
|
|
192
296
|
className: "text-lg font-bold text-status-success-text mb-1",
|
|
193
297
|
children: "Export Complete"
|
|
194
298
|
}),
|
|
195
|
-
/* @__PURE__ */
|
|
299
|
+
/* @__PURE__ */ T("p", {
|
|
196
300
|
className: "text-sm text-status-success-text",
|
|
197
301
|
children: "Your export has completed but no download parts are available yet."
|
|
198
302
|
})
|
|
199
303
|
]
|
|
200
304
|
}),
|
|
201
|
-
/* @__PURE__ */
|
|
202
|
-
className: "flex flex-col sm:flex-row gap-3 pt-2",
|
|
203
|
-
children: [
|
|
204
|
-
Z && /* @__PURE__ */ j("button", {
|
|
205
|
-
type: "button",
|
|
206
|
-
onClick: async () => {
|
|
207
|
-
P && U("cancel");
|
|
208
|
-
},
|
|
209
|
-
disabled: G,
|
|
210
|
-
className: "inline-flex items-center justify-center gap-2 px-6 py-3 border-2 border-status-warning-bg/50 text-status-warning-text rounded-lg hover:bg-status-warning-bg-subtle transition-all duration-200 font-medium disabled:opacity-50",
|
|
211
|
-
children: [G ? /* @__PURE__ */ A(w, {
|
|
212
|
-
size: 18,
|
|
213
|
-
className: "animate-spin"
|
|
214
|
-
}) : /* @__PURE__ */ A(D, { size: 18 }), "Cancel Export"]
|
|
215
|
-
}),
|
|
216
|
-
ee && /* @__PURE__ */ j("button", {
|
|
217
|
-
type: "button",
|
|
218
|
-
onClick: async () => {
|
|
219
|
-
if (!P) return;
|
|
220
|
-
let e = await J(P);
|
|
221
|
-
e?.id && I?.(N(F, e.id));
|
|
222
|
-
},
|
|
223
|
-
disabled: Y,
|
|
224
|
-
className: "inline-flex items-center justify-center gap-2 px-6 py-3 border-2 border-primary/50 text-primary rounded-lg hover:bg-action-primary-bg/5 transition-all duration-200 font-medium disabled:opacity-50",
|
|
225
|
-
children: [Y ? /* @__PURE__ */ A(w, {
|
|
226
|
-
size: 18,
|
|
227
|
-
className: "animate-spin"
|
|
228
|
-
}) : /* @__PURE__ */ A(T, { size: 18 }), "Retry Export"]
|
|
229
|
-
}),
|
|
230
|
-
!Z && /* @__PURE__ */ j("button", {
|
|
231
|
-
type: "button",
|
|
232
|
-
onClick: async () => {
|
|
233
|
-
P && (p("medium"), U("delete"));
|
|
234
|
-
},
|
|
235
|
-
disabled: q,
|
|
236
|
-
className: "inline-flex items-center justify-center gap-2 px-6 py-3 border-2 border-status-error-bg/50 text-status-error-text rounded-lg hover:bg-status-error-bg-subtle transition-all duration-200 font-medium disabled:opacity-50",
|
|
237
|
-
children: [q ? /* @__PURE__ */ A(w, {
|
|
238
|
-
size: 18,
|
|
239
|
-
className: "animate-spin"
|
|
240
|
-
}) : /* @__PURE__ */ A(E, { size: 18 }), "Delete Export"]
|
|
241
|
-
})
|
|
242
|
-
]
|
|
243
|
-
}),
|
|
244
|
-
H && /* @__PURE__ */ A("div", {
|
|
305
|
+
z && /* @__PURE__ */ T("div", {
|
|
245
306
|
role: "dialog",
|
|
246
307
|
"aria-modal": "true",
|
|
247
308
|
"aria-labelledby": "export-confirm-title",
|
|
248
309
|
className: "fixed inset-0 z-50 flex items-center justify-center bg-bg-surface/80 backdrop-blur-sm p-4",
|
|
249
|
-
children: /* @__PURE__ */
|
|
310
|
+
children: /* @__PURE__ */ E("div", {
|
|
250
311
|
className: "w-full max-w-md rounded-xl border-2 border-border-subtle bg-bg-surface p-6 shadow-xl",
|
|
251
312
|
children: [
|
|
252
|
-
/* @__PURE__ */
|
|
313
|
+
/* @__PURE__ */ T("h2", {
|
|
253
314
|
id: "export-confirm-title",
|
|
254
315
|
className: "text-lg font-bold",
|
|
255
|
-
children:
|
|
316
|
+
children: z === "cancel" ? "Cancel export?" : "Delete export?"
|
|
256
317
|
}),
|
|
257
|
-
/* @__PURE__ */
|
|
318
|
+
/* @__PURE__ */ T("p", {
|
|
258
319
|
className: "mt-2 text-sm text-text-secondary",
|
|
259
|
-
children:
|
|
320
|
+
children: z === "cancel" ? "This stops the running export job. You can retry it later if needed." : "This removes the export job from history. This action cannot be undone."
|
|
260
321
|
}),
|
|
261
|
-
/* @__PURE__ */
|
|
322
|
+
/* @__PURE__ */ E("div", {
|
|
262
323
|
className: "mt-6 flex flex-col-reverse sm:flex-row sm:justify-end gap-3",
|
|
263
|
-
children: [/* @__PURE__ */
|
|
324
|
+
children: [/* @__PURE__ */ T("button", {
|
|
264
325
|
type: "button",
|
|
265
|
-
onClick: () =>
|
|
326
|
+
onClick: () => B(null),
|
|
266
327
|
className: "px-4 py-2 rounded-lg border-2 border-border-subtle hover:bg-accent transition-colors font-medium",
|
|
267
328
|
children: "Keep Export"
|
|
268
|
-
}), /* @__PURE__ */
|
|
329
|
+
}), /* @__PURE__ */ E("button", {
|
|
269
330
|
type: "button",
|
|
270
|
-
onClick:
|
|
271
|
-
|
|
272
|
-
try {
|
|
273
|
-
H === "cancel" ? await W(P) : (await K(P), I?.(F)), m("success");
|
|
274
|
-
} catch {
|
|
275
|
-
m("error");
|
|
276
|
-
}
|
|
277
|
-
U(null);
|
|
278
|
-
}
|
|
279
|
-
},
|
|
280
|
-
disabled: G || q,
|
|
331
|
+
onClick: le,
|
|
332
|
+
disabled: H || W,
|
|
281
333
|
className: "inline-flex items-center justify-center gap-2 px-4 py-2 rounded-lg bg-status-error-bg text-status-error-text hover:bg-status-error-bg/90 transition-colors font-medium disabled:opacity-50",
|
|
282
|
-
children: [
|
|
334
|
+
children: [H || W ? /* @__PURE__ */ T(S, {
|
|
283
335
|
size: 16,
|
|
284
336
|
className: "animate-spin"
|
|
285
|
-
}) : null,
|
|
337
|
+
}) : null, z === "cancel" ? "Cancel Export" : "Delete Export"]
|
|
286
338
|
})]
|
|
287
339
|
})
|
|
288
340
|
]
|
|
289
341
|
})
|
|
290
342
|
})
|
|
291
343
|
]
|
|
292
|
-
}) : /* @__PURE__ */ j(d, {
|
|
293
|
-
showHeader: !1,
|
|
294
|
-
children: [/* @__PURE__ */ j("div", {
|
|
295
|
-
className: "flex items-center gap-3 mb-6",
|
|
296
|
-
children: [/* @__PURE__ */ A("button", {
|
|
297
|
-
type: "button",
|
|
298
|
-
onClick: R,
|
|
299
|
-
className: "p-2.5 hover:bg-accent rounded-lg transition-all duration-200",
|
|
300
|
-
children: /* @__PURE__ */ A(_, { size: 20 })
|
|
301
|
-
}), /* @__PURE__ */ A("h1", {
|
|
302
|
-
className: "text-xl font-bold",
|
|
303
|
-
children: "Export Not Found"
|
|
304
|
-
})]
|
|
305
|
-
}), /* @__PURE__ */ j("div", {
|
|
306
|
-
className: "border-2 border-border-default rounded-xl bg-status-error-bg-subtle p-12 text-center",
|
|
307
|
-
children: [
|
|
308
|
-
/* @__PURE__ */ A(g, {
|
|
309
|
-
size: 48,
|
|
310
|
-
className: "text-status-error-text mx-auto mb-4"
|
|
311
|
-
}),
|
|
312
|
-
/* @__PURE__ */ A("h3", {
|
|
313
|
-
className: "text-lg font-bold text-status-error-text mb-2",
|
|
314
|
-
children: "Export Not Found"
|
|
315
|
-
}),
|
|
316
|
-
/* @__PURE__ */ A("p", {
|
|
317
|
-
className: "text-status-error-text mb-6",
|
|
318
|
-
children: "The export job you are looking for does not exist or has been deleted."
|
|
319
|
-
}),
|
|
320
|
-
/* @__PURE__ */ j("button", {
|
|
321
|
-
type: "button",
|
|
322
|
-
onClick: R,
|
|
323
|
-
className: "inline-flex items-center gap-2 px-6 py-3 bg-action-primary-bg text-action-primary-text rounded-lg hover:bg-action-primary-bg/90 transition-colors font-medium",
|
|
324
|
-
children: [/* @__PURE__ */ A(_, { size: 18 }), "Back to Dashboard"]
|
|
325
|
-
})
|
|
326
|
-
]
|
|
327
|
-
})]
|
|
328
344
|
});
|
|
329
345
|
}
|
|
330
346
|
//#endregion
|
|
331
|
-
export {
|
|
347
|
+
export { j as ExportDetailPage };
|
|
332
348
|
|
|
333
349
|
//# sourceMappingURL=ExportDetailPage.js.map
|