@burdenoff/microfe-export 2026.1108.1 → 2026.1113.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/ExportRoot.js +45 -40
- package/dist/export/ExportRoot.js.map +1 -1
- package/dist/export/ExportRoutes.d.ts +7 -0
- package/dist/export/ExportRoutes.js +70 -51
- package/dist/export/ExportRoutes.js.map +1 -1
- package/dist/export/components/ConfirmDestructiveDialog.d.ts +21 -0
- package/dist/export/components/ConfirmDestructiveDialog.js +37 -0
- package/dist/export/components/ConfirmDestructiveDialog.js.map +1 -0
- package/dist/export/components/DownloadSections.d.ts +10 -0
- package/dist/export/components/DownloadSections.js +161 -0
- package/dist/export/components/DownloadSections.js.map +1 -0
- package/dist/export/components/DownloadStatus.d.ts +13 -0
- package/dist/export/components/DownloadStatus.js +36 -0
- package/dist/export/components/DownloadStatus.js.map +1 -0
- package/dist/export/components/DownloadsTabs.d.ts +5 -0
- package/dist/export/components/DownloadsTabs.js +25 -0
- package/dist/export/components/DownloadsTabs.js.map +1 -0
- package/dist/export/hooks/useEntityLabel.d.ts +7 -0
- package/dist/export/hooks/useEntityLabel.js +16 -0
- package/dist/export/hooks/useEntityLabel.js.map +1 -0
- package/dist/export/hooks/useExportQueries.d.ts +7 -1
- package/dist/export/hooks/useExportQueries.js +40 -36
- package/dist/export/hooks/useExportQueries.js.map +1 -1
- package/dist/export/navigation-v2/NavigationV2.d.ts +7 -0
- package/dist/export/navigation-v2/NavigationV2.js +16 -0
- package/dist/export/navigation-v2/NavigationV2.js.map +1 -0
- package/dist/export/pages/CreateExportPage.js +123 -121
- package/dist/export/pages/CreateExportPage.js.map +1 -1
- package/dist/export/pages/ExportDetailPage.js +131 -124
- package/dist/export/pages/ExportDetailPage.js.map +1 -1
- package/dist/export/pages/ExportHistoryPage.js +61 -57
- package/dist/export/pages/ExportHistoryPage.js.map +1 -1
- package/dist/export/pages/ExportTemplatesPage.js +214 -182
- package/dist/export/pages/ExportTemplatesPage.js.map +1 -1
- package/dist/export/pages/TemplateDetailPage.js +141 -119
- package/dist/export/pages/TemplateDetailPage.js.map +1 -1
- package/dist/export/pages/v2/DownloadDetailPage.d.ts +8 -0
- package/dist/export/pages/v2/DownloadDetailPage.js +176 -0
- package/dist/export/pages/v2/DownloadDetailPage.js.map +1 -0
- package/dist/export/pages/v2/DownloadsPage.d.ts +10 -0
- package/dist/export/pages/v2/DownloadsPage.js +401 -0
- package/dist/export/pages/v2/DownloadsPage.js.map +1 -0
- package/dist/export/pages/v2/NewDownloadPage.d.ts +8 -0
- package/dist/export/pages/v2/NewDownloadPage.js +440 -0
- package/dist/export/pages/v2/NewDownloadPage.js.map +1 -0
- package/dist/export/types/index.d.ts +7 -0
- package/dist/export/utils/billing.d.ts +6 -0
- package/dist/export/utils/billing.js +7 -0
- package/dist/export/utils/billing.js.map +1 -0
- package/dist/export/utils/downloadStatus.d.ts +15 -0
- package/dist/export/utils/downloadStatus.js +48 -0
- package/dist/export/utils/downloadStatus.js.map +1 -0
- package/dist/export/utils/entityLabels.d.ts +47 -0
- package/dist/export/utils/entityLabels.js +150 -0
- package/dist/export/utils/entityLabels.js.map +1 -0
- package/dist/export/utils/formatBytes.d.ts +2 -0
- package/dist/export/utils/formatBytes.js +15 -0
- package/dist/export/utils/formatBytes.js.map +1 -0
- package/dist/export/utils/newDownloadForm.d.ts +32 -0
- package/dist/export/utils/newDownloadForm.js +42 -0
- package/dist/export/utils/newDownloadForm.js.map +1 -0
- package/dist/export/utils/paths.d.ts +2 -0
- package/dist/export/utils/paths.js +7 -0
- package/dist/export/utils/paths.js.map +1 -0
- package/package.json +2 -2
|
@@ -4,75 +4,77 @@ import { getFormatDisplayName as a } from "../constants/enums.js";
|
|
|
4
4
|
import { PageLayout as ee } from "../components/PageLayout.js";
|
|
5
5
|
import { useTr as te } from "../hooks/useTr.js";
|
|
6
6
|
import { cn as o } from "../utils/cn.js";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
7
|
+
import { openBilling as ne } from "../utils/billing.js";
|
|
8
|
+
import { LEGACY_ENTITY_COPY_KEY as s } from "../utils/entityLabels.js";
|
|
9
|
+
import { isExportEntityDisabled as c, isForeignProductEntity as l } from "../utils/disabledModules.js";
|
|
10
|
+
import { useCallback as u, useEffect as d, useRef as re, useState as f } from "react";
|
|
11
|
+
import { ArrowLeft as ie, ArrowRight as p, Building2 as m, CalendarRange as ae, CheckCircle2 as h, Download as g, FileJson as _, FileSpreadsheet as v, Loader2 as oe, Lock as se, Package as ce, User as y, Users as b } from "lucide-react";
|
|
12
|
+
import { useAppShell as le, usePermission as ue } from "@burdenoff/fe-libs/shared/providers/shell";
|
|
13
|
+
import { useSearchParams as de } from "react-router";
|
|
14
|
+
import { isQuotaExhaustedError as fe } from "@burdenoff/fe-libs/shared/utils";
|
|
13
15
|
import { jsx as x, jsxs as S } from "react/jsx-runtime";
|
|
14
|
-
import { AlertDialog as
|
|
16
|
+
import { AlertDialog as pe, AlertDialogAction as me, AlertDialogCancel as he, AlertDialogContent as ge, AlertDialogDescription as _e, AlertDialogFooter as ve, AlertDialogHeader as ye, AlertDialogTitle as be, EmphasisPanel as xe, IllustratedEmptyState as Se, PagePurpose as Ce, ShowMore as we } from "@burdenoff/fe-libs/ui";
|
|
15
17
|
// src/export/pages/CreateExportPage.tsx
|
|
16
|
-
var C = ["CSV", "JSON"],
|
|
17
|
-
CSV:
|
|
18
|
-
JSON:
|
|
19
|
-
},
|
|
18
|
+
var C = ["CSV", "JSON"], Te = {
|
|
19
|
+
CSV: v,
|
|
20
|
+
JSON: _
|
|
21
|
+
}, Ee = {
|
|
20
22
|
INDIVIDUAL: y,
|
|
21
23
|
WORKSPACE_ADMIN: b,
|
|
22
|
-
ORG_ADMIN:
|
|
24
|
+
ORG_ADMIN: m
|
|
23
25
|
};
|
|
24
|
-
function
|
|
25
|
-
let { basePath:
|
|
26
|
-
|
|
27
|
-
let e =
|
|
28
|
-
if (!e || !
|
|
29
|
-
let t =
|
|
26
|
+
function w() {
|
|
27
|
+
let { basePath: m = "/", navigate: _, organizationId: v } = e(), y = te(), { createJob: b, isPending: w } = n(), { data: T } = t(), { data: E } = r(), [D] = de(), { productSlug: O } = le(), k = u((e) => !c(e) && !l(e, O), [O]), De = ue("export:workspace_admin"), Oe = i(v), [A, j] = f("entities"), [M, N] = f([]), [P, F] = f(""), [I, L] = f("CSV"), [R, ke] = f("INDIVIDUAL"), [z, B] = f(D.get("templateId") ?? void 0), [V, Ae] = f(""), [H, je] = f(""), [U, W] = f(null), [Me, G] = f(!1), K = re(null);
|
|
28
|
+
d(() => {
|
|
29
|
+
let e = D.get("templateId");
|
|
30
|
+
if (!e || !E?.length || K.current === e) return;
|
|
31
|
+
let t = E.find((t) => t.id === e);
|
|
30
32
|
if (!t) return;
|
|
31
|
-
|
|
33
|
+
K.current = e, B(t.id), N((t.entityTypes ?? []).filter(k));
|
|
32
34
|
let n = t.format?.toUpperCase();
|
|
33
|
-
n && C.includes(n) &&
|
|
35
|
+
n && C.includes(n) && L(n), t.name && F(t.name);
|
|
34
36
|
}, [
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
37
|
+
k,
|
|
38
|
+
D,
|
|
39
|
+
E
|
|
38
40
|
]);
|
|
39
|
-
let
|
|
40
|
-
|
|
41
|
-
},
|
|
42
|
-
if (
|
|
43
|
-
if (
|
|
44
|
-
|
|
41
|
+
let Ne = () => {
|
|
42
|
+
A === "options" ? j("entities") : A === "review" ? j("options") : _?.(m);
|
|
43
|
+
}, q = () => {
|
|
44
|
+
if (A === "entities") {
|
|
45
|
+
if (M.length === 0) {
|
|
46
|
+
W(y("export.create.errors.selectEntity", "Please select at least one entity type to export"));
|
|
45
47
|
return;
|
|
46
48
|
}
|
|
47
|
-
|
|
48
|
-
} else if (
|
|
49
|
-
if (!
|
|
50
|
-
|
|
49
|
+
W(null), j("options");
|
|
50
|
+
} else if (A === "options") {
|
|
51
|
+
if (!P.trim()) {
|
|
52
|
+
W(y("export.create.errors.exportNameRequired", "Please provide a name for this export"));
|
|
51
53
|
return;
|
|
52
54
|
}
|
|
53
|
-
|
|
55
|
+
W(null), j("review");
|
|
54
56
|
}
|
|
55
|
-
},
|
|
57
|
+
}, Pe = async () => {
|
|
56
58
|
try {
|
|
57
|
-
|
|
58
|
-
name:
|
|
59
|
-
entityTypes:
|
|
60
|
-
format:
|
|
61
|
-
exportScope:
|
|
62
|
-
organizationId:
|
|
63
|
-
templateId:
|
|
64
|
-
dateRangeStart:
|
|
65
|
-
dateRangeEnd:
|
|
66
|
-
}),
|
|
59
|
+
W(null), await b({
|
|
60
|
+
name: P,
|
|
61
|
+
entityTypes: M,
|
|
62
|
+
format: I,
|
|
63
|
+
exportScope: R,
|
|
64
|
+
organizationId: R === "ORG_ADMIN" ? v : void 0,
|
|
65
|
+
templateId: z,
|
|
66
|
+
dateRangeStart: V ? new Date(V).toISOString() : null,
|
|
67
|
+
dateRangeEnd: H ? new Date(H).toISOString() : null
|
|
68
|
+
}), _?.(m);
|
|
67
69
|
} catch (e) {
|
|
68
|
-
if (
|
|
69
|
-
|
|
70
|
+
if (fe(e)) {
|
|
71
|
+
G(!0), W(y("export.create.errors.quotaReached", "You have reached your export limit for this month."));
|
|
70
72
|
return;
|
|
71
73
|
}
|
|
72
|
-
|
|
74
|
+
W(e instanceof Error ? e.message : y("export.create.errors.createFailed", "Failed to create export"));
|
|
73
75
|
}
|
|
74
|
-
},
|
|
75
|
-
|
|
76
|
+
}, Fe = (e) => {
|
|
77
|
+
k(e) && N((t) => t.includes(e) ? t.filter((t) => t !== e) : [...t, e]);
|
|
76
78
|
}, J = (e) => {
|
|
77
79
|
switch (e) {
|
|
78
80
|
case "INDIVIDUAL": return y("export.create.scope.individual.label", "My Data Only");
|
|
@@ -80,7 +82,7 @@ function T() {
|
|
|
80
82
|
case "ORG_ADMIN": return y("export.create.scope.orgAdmin.label", "All Organization Data");
|
|
81
83
|
default: return e;
|
|
82
84
|
}
|
|
83
|
-
},
|
|
85
|
+
}, Ie = (e) => {
|
|
84
86
|
switch (e) {
|
|
85
87
|
case "INDIVIDUAL": return y("export.create.scope.individual.description", "Export data you personally created across selected modules.");
|
|
86
88
|
case "WORKSPACE_ADMIN": return y("export.create.scope.workspaceAdmin.description", "Export all data in this workspace regardless of who created it. Requires workspace admin access.");
|
|
@@ -120,11 +122,11 @@ function T() {
|
|
|
120
122
|
label: y("export.create.entities.calendar.label", "Calendar Events"),
|
|
121
123
|
description: y("export.create.entities.calendar.description", "Events and bookings")
|
|
122
124
|
}
|
|
123
|
-
}, X =
|
|
124
|
-
let n = !t &&
|
|
125
|
+
}, X = T.filter((e) => e.enabled !== !1 && !l(e.entityType, O)), Z = X.filter((e) => !c(e.entityType)), Q = X.filter((e) => c(e.entityType)), $ = (e, t) => {
|
|
126
|
+
let n = !t && M.includes(e.entityType);
|
|
125
127
|
return /* @__PURE__ */ S("button", {
|
|
126
128
|
type: "button",
|
|
127
|
-
onClick: () =>
|
|
129
|
+
onClick: () => Fe(e.entityType),
|
|
128
130
|
disabled: t,
|
|
129
131
|
"aria-disabled": t,
|
|
130
132
|
title: t ? y("export.create.select.unavailableHint", "Export for this product isn't available yet") : void 0,
|
|
@@ -134,18 +136,18 @@ function T() {
|
|
|
134
136
|
className: "flex items-center justify-between mb-2 gap-2",
|
|
135
137
|
children: [/* @__PURE__ */ x("h3", {
|
|
136
138
|
className: "font-semibold",
|
|
137
|
-
children: Y[e.entityType]?.label ?? e.displayName
|
|
139
|
+
children: Y[s[e.entityType] ?? e.entityType]?.label ?? e.displayName
|
|
138
140
|
}), t ? /* @__PURE__ */ x("span", {
|
|
139
141
|
className: "shrink-0 text-xs font-medium px-2 py-0.5 rounded-full bg-bg-sunken text-text-secondary",
|
|
140
142
|
children: y("export.create.select.unavailable", "Unavailable")
|
|
141
|
-
}) : n && /* @__PURE__ */ x(
|
|
143
|
+
}) : n && /* @__PURE__ */ x(h, {
|
|
142
144
|
size: 18,
|
|
143
145
|
className: "text-primary"
|
|
144
146
|
})]
|
|
145
147
|
}),
|
|
146
148
|
/* @__PURE__ */ x("p", {
|
|
147
149
|
className: "text-sm text-text-secondary",
|
|
148
|
-
children: Y[e.entityType]?.description ?? e.description
|
|
150
|
+
children: Y[s[e.entityType] ?? e.entityType]?.description ?? e.description
|
|
149
151
|
}),
|
|
150
152
|
e.estimatedSize && /* @__PURE__ */ S("p", {
|
|
151
153
|
className: "text-xs text-text-secondary mt-2",
|
|
@@ -163,15 +165,15 @@ function T() {
|
|
|
163
165
|
className: "relative z-10 flex items-center gap-4",
|
|
164
166
|
children: [/* @__PURE__ */ x("button", {
|
|
165
167
|
type: "button",
|
|
166
|
-
onClick: () =>
|
|
168
|
+
onClick: () => _?.(m),
|
|
167
169
|
className: "p-2.5 hover:bg-accent rounded-lg transition-colors duration-200 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/40",
|
|
168
170
|
"aria-label": y("export.create.actions.backToDashboard", "Back to export dashboard"),
|
|
169
|
-
children: /* @__PURE__ */ x(
|
|
171
|
+
children: /* @__PURE__ */ x(ie, { size: 20 })
|
|
170
172
|
}), /* @__PURE__ */ S("div", {
|
|
171
173
|
className: "flex items-center gap-3",
|
|
172
174
|
children: [/* @__PURE__ */ x("div", {
|
|
173
175
|
className: "p-2.5 rounded-lg bg-action-primary-bg/10 backdrop-blur-sm",
|
|
174
|
-
children: /* @__PURE__ */ x(
|
|
176
|
+
children: /* @__PURE__ */ x(g, {
|
|
175
177
|
size: 24,
|
|
176
178
|
className: "text-primary"
|
|
177
179
|
})
|
|
@@ -182,8 +184,8 @@ function T() {
|
|
|
182
184
|
})]
|
|
183
185
|
})
|
|
184
186
|
}),
|
|
185
|
-
/* @__PURE__ */ x(
|
|
186
|
-
icon: /* @__PURE__ */ x(
|
|
187
|
+
/* @__PURE__ */ x(Ce, {
|
|
188
|
+
icon: /* @__PURE__ */ x(g, { size: 16 }),
|
|
187
189
|
children: y("export.create.purpose", "Build a one-off export in three steps: pick which data to include, choose a format and scope, then review and start it. The export runs in the background and produces a downloadable ZIP you can grab from History when it finishes.")
|
|
188
190
|
}),
|
|
189
191
|
/* @__PURE__ */ x("div", {
|
|
@@ -194,11 +196,11 @@ function T() {
|
|
|
194
196
|
"review"
|
|
195
197
|
].map((e, t) => /* @__PURE__ */ S("div", {
|
|
196
198
|
className: "flex items-center gap-2",
|
|
197
|
-
children: [t > 0 && /* @__PURE__ */ x(
|
|
199
|
+
children: [t > 0 && /* @__PURE__ */ x(p, {
|
|
198
200
|
size: 18,
|
|
199
201
|
className: "text-text-secondary"
|
|
200
202
|
}), /* @__PURE__ */ S("div", {
|
|
201
|
-
className: o("flex items-center gap-2 px-4 py-2.5 rounded-lg text-sm font-medium border-2 transition-all duration-200",
|
|
203
|
+
className: o("flex items-center gap-2 px-4 py-2.5 rounded-lg text-sm font-medium border-2 transition-all duration-200", A === e ? "bg-action-primary-bg text-action-primary-text border-primary shadow-[var(--shadow-pop)]" : "bg-bg-sunken/50 text-text-secondary border-border-seam"),
|
|
202
204
|
children: [/* @__PURE__ */ x("div", {
|
|
203
205
|
className: "flex items-center justify-center size-6 rounded-full bg-bg-surface/20 font-bold",
|
|
204
206
|
children: t + 1
|
|
@@ -209,11 +211,11 @@ function T() {
|
|
|
209
211
|
})]
|
|
210
212
|
}, e))
|
|
211
213
|
}),
|
|
212
|
-
|
|
214
|
+
U && /* @__PURE__ */ x("div", {
|
|
213
215
|
className: "border-2 border-border-default rounded-xl bg-status-error-bg-subtle p-4 text-status-error-text text-sm",
|
|
214
|
-
children:
|
|
216
|
+
children: U
|
|
215
217
|
}),
|
|
216
|
-
|
|
218
|
+
A === "entities" && /* @__PURE__ */ S("div", {
|
|
217
219
|
className: "space-y-4",
|
|
218
220
|
children: [
|
|
219
221
|
/* @__PURE__ */ x("h2", {
|
|
@@ -224,7 +226,7 @@ function T() {
|
|
|
224
226
|
className: "text-sm text-text-secondary",
|
|
225
227
|
children: y("export.create.select.description", "Choose which entity types to include in your export.")
|
|
226
228
|
}),
|
|
227
|
-
X.length === 0 ? /* @__PURE__ */ x(
|
|
229
|
+
X.length === 0 ? /* @__PURE__ */ x(Se, {
|
|
228
230
|
illustration: "empty-data",
|
|
229
231
|
title: y("export.create.select.emptyTitle", "Nothing to export yet"),
|
|
230
232
|
description: y("export.create.select.empty", "No exportable entity types are configured for this workspace yet. Once your workspace has data in supported modules, they'll show up here to select.")
|
|
@@ -253,7 +255,7 @@ function T() {
|
|
|
253
255
|
})
|
|
254
256
|
]
|
|
255
257
|
}),
|
|
256
|
-
|
|
258
|
+
A === "options" && /* @__PURE__ */ x("div", {
|
|
257
259
|
className: "space-y-6",
|
|
258
260
|
children: /* @__PURE__ */ S("div", {
|
|
259
261
|
className: "border border-border-seam rounded-xl p-6 space-y-5 bg-bg-surface",
|
|
@@ -272,12 +274,12 @@ function T() {
|
|
|
272
274
|
"WORKSPACE_ADMIN",
|
|
273
275
|
"ORG_ADMIN"
|
|
274
276
|
].map((e) => {
|
|
275
|
-
let t = e === "WORKSPACE_ADMIN" && !
|
|
277
|
+
let t = e === "WORKSPACE_ADMIN" && !De || e === "ORG_ADMIN" && !Oe, n = Ee[e], r = e === "WORKSPACE_ADMIN" ? y("export.create.scope.workspaceAdmin.required", "Workspace admin access required") : y("export.create.scope.orgAdmin.required", "Organization admin access required");
|
|
276
278
|
return /* @__PURE__ */ S("button", {
|
|
277
279
|
type: "button",
|
|
278
|
-
onClick: () => !t &&
|
|
280
|
+
onClick: () => !t && ke(e),
|
|
279
281
|
disabled: t,
|
|
280
|
-
className: o("text-left border-2 rounded-xl p-4 transition-all duration-200",
|
|
282
|
+
className: o("text-left border-2 rounded-xl p-4 transition-all duration-200", R === e ? "border-primary bg-action-primary-bg/5 shadow-md" : t ? "border-border-subtle/30 opacity-50 cursor-not-allowed" : "border-border-subtle/50 hover:border-primary/30 hover:shadow-sm"),
|
|
281
283
|
title: t ? r : void 0,
|
|
282
284
|
children: [
|
|
283
285
|
/* @__PURE__ */ S("div", {
|
|
@@ -285,13 +287,13 @@ function T() {
|
|
|
285
287
|
children: [
|
|
286
288
|
/* @__PURE__ */ x(n, {
|
|
287
289
|
size: 18,
|
|
288
|
-
className:
|
|
290
|
+
className: R === e ? "text-primary" : t ? "text-text-secondary/50" : "text-text-secondary"
|
|
289
291
|
}),
|
|
290
|
-
|
|
292
|
+
R === e && /* @__PURE__ */ x(h, {
|
|
291
293
|
size: 16,
|
|
292
294
|
className: "text-primary"
|
|
293
295
|
}),
|
|
294
|
-
t && /* @__PURE__ */ x(
|
|
296
|
+
t && /* @__PURE__ */ x(se, {
|
|
295
297
|
size: 14,
|
|
296
298
|
className: "text-text-secondary/50"
|
|
297
299
|
})
|
|
@@ -303,7 +305,7 @@ function T() {
|
|
|
303
305
|
}),
|
|
304
306
|
/* @__PURE__ */ x("p", {
|
|
305
307
|
className: "text-xs text-text-secondary mt-1",
|
|
306
|
-
children:
|
|
308
|
+
children: Ie(e)
|
|
307
309
|
})
|
|
308
310
|
]
|
|
309
311
|
}, e);
|
|
@@ -324,8 +326,8 @@ function T() {
|
|
|
324
326
|
type: "text",
|
|
325
327
|
id: "exportName",
|
|
326
328
|
"aria-label": y("export.create.options.name", "Export Name"),
|
|
327
|
-
value:
|
|
328
|
-
onChange: (e) =>
|
|
329
|
+
value: P,
|
|
330
|
+
onChange: (e) => F(e.target.value),
|
|
329
331
|
className: "w-full px-4 py-2.5 border-2 border-border-subtle rounded-lg bg-bg-surface focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary transition-all duration-200",
|
|
330
332
|
placeholder: y("export.create.options.namePlaceholder", "e.g., Monthly User Export")
|
|
331
333
|
})] }),
|
|
@@ -335,14 +337,14 @@ function T() {
|
|
|
335
337
|
}), /* @__PURE__ */ x("div", {
|
|
336
338
|
className: "grid grid-cols-2 gap-3",
|
|
337
339
|
children: C.map((e) => {
|
|
338
|
-
let t =
|
|
340
|
+
let t = Te[e];
|
|
339
341
|
return /* @__PURE__ */ S("button", {
|
|
340
342
|
type: "button",
|
|
341
|
-
onClick: () =>
|
|
342
|
-
className: o("flex items-center gap-3 border-2 rounded-lg p-3 transition-all duration-200",
|
|
343
|
+
onClick: () => L(e),
|
|
344
|
+
className: o("flex items-center gap-3 border-2 rounded-lg p-3 transition-all duration-200", I === e ? "border-primary bg-action-primary-bg/5" : "border-border-subtle/50 hover:border-primary/30"),
|
|
343
345
|
children: [/* @__PURE__ */ x(t, {
|
|
344
346
|
size: 18,
|
|
345
|
-
className:
|
|
347
|
+
className: I === e ? "text-primary" : "text-text-secondary"
|
|
346
348
|
}), /* @__PURE__ */ x("span", {
|
|
347
349
|
className: "font-medium text-sm",
|
|
348
350
|
children: a(e)
|
|
@@ -359,7 +361,7 @@ function T() {
|
|
|
359
361
|
className: "flex gap-3",
|
|
360
362
|
children: /* @__PURE__ */ S("div", {
|
|
361
363
|
className: o("flex items-center gap-2 border-2 rounded-lg px-4 py-2 border-primary bg-action-primary-bg/5"),
|
|
362
|
-
children: [/* @__PURE__ */ x(
|
|
364
|
+
children: [/* @__PURE__ */ x(ce, {
|
|
363
365
|
size: 16,
|
|
364
366
|
className: "text-primary"
|
|
365
367
|
}), /* @__PURE__ */ x("span", {
|
|
@@ -373,7 +375,7 @@ function T() {
|
|
|
373
375
|
children: y("export.create.options.archiveDescription", "Exports are packaged as ZIP archives.")
|
|
374
376
|
})
|
|
375
377
|
] }),
|
|
376
|
-
/* @__PURE__ */ x(
|
|
378
|
+
/* @__PURE__ */ x(we, {
|
|
377
379
|
collapsedHeight: 0,
|
|
378
380
|
label: y("export.create.options.advancedToggle", "Date range & template"),
|
|
379
381
|
children: /* @__PURE__ */ S("div", {
|
|
@@ -384,7 +386,7 @@ function T() {
|
|
|
384
386
|
children: /* @__PURE__ */ S("span", {
|
|
385
387
|
className: "inline-flex items-center gap-1.5",
|
|
386
388
|
children: [
|
|
387
|
-
/* @__PURE__ */ x(
|
|
389
|
+
/* @__PURE__ */ x(ae, { size: 15 }),
|
|
388
390
|
y("export.create.options.dateRange", "Date Range"),
|
|
389
391
|
" ",
|
|
390
392
|
/* @__PURE__ */ x("span", {
|
|
@@ -404,8 +406,8 @@ function T() {
|
|
|
404
406
|
type: "date",
|
|
405
407
|
id: "dateFrom",
|
|
406
408
|
"aria-label": y("export.create.options.dateFrom", "From"),
|
|
407
|
-
value:
|
|
408
|
-
onChange: (e) =>
|
|
409
|
+
value: V,
|
|
410
|
+
onChange: (e) => Ae(e.target.value),
|
|
409
411
|
className: "w-full px-3 py-2 border-2 border-border-subtle rounded-lg bg-bg-surface focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary text-sm"
|
|
410
412
|
})] }), /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("label", {
|
|
411
413
|
htmlFor: "dateTo",
|
|
@@ -415,9 +417,9 @@ function T() {
|
|
|
415
417
|
type: "date",
|
|
416
418
|
id: "dateTo",
|
|
417
419
|
"aria-label": y("export.create.options.dateTo", "To"),
|
|
418
|
-
value:
|
|
419
|
-
min:
|
|
420
|
-
onChange: (e) =>
|
|
420
|
+
value: H,
|
|
421
|
+
min: V,
|
|
422
|
+
onChange: (e) => je(e.target.value),
|
|
421
423
|
className: "w-full px-3 py-2 border-2 border-border-subtle rounded-lg bg-bg-surface focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary text-sm"
|
|
422
424
|
})] })]
|
|
423
425
|
}),
|
|
@@ -435,14 +437,14 @@ function T() {
|
|
|
435
437
|
children: y("export.create.shared.optional", "(optional)")
|
|
436
438
|
})
|
|
437
439
|
]
|
|
438
|
-
}),
|
|
439
|
-
value:
|
|
440
|
-
onChange: (e) =>
|
|
440
|
+
}), E.length > 0 ? /* @__PURE__ */ S("select", {
|
|
441
|
+
value: z ?? "",
|
|
442
|
+
onChange: (e) => B(e.target.value || void 0),
|
|
441
443
|
className: "w-full px-3 py-2 border-2 border-border-subtle rounded-lg bg-bg-surface focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary scheme-normal dark:scheme-dark [&_option]:bg-bg-surface [&_option]:text-text-primary",
|
|
442
444
|
children: [/* @__PURE__ */ x("option", {
|
|
443
445
|
value: "",
|
|
444
446
|
children: y("export.create.options.noTemplate", "No template")
|
|
445
|
-
}),
|
|
447
|
+
}), E.map((e) => /* @__PURE__ */ x("option", {
|
|
446
448
|
value: e.id,
|
|
447
449
|
children: e.name
|
|
448
450
|
}, e.id))]
|
|
@@ -453,7 +455,7 @@ function T() {
|
|
|
453
455
|
" ",
|
|
454
456
|
/* @__PURE__ */ x("button", {
|
|
455
457
|
type: "button",
|
|
456
|
-
onClick: () =>
|
|
458
|
+
onClick: () => _?.(m + "/templates"),
|
|
457
459
|
className: "text-primary underline-offset-2 hover:underline",
|
|
458
460
|
children: y("export.create.options.createTemplateLink", "Create one")
|
|
459
461
|
}),
|
|
@@ -466,13 +468,13 @@ function T() {
|
|
|
466
468
|
]
|
|
467
469
|
})
|
|
468
470
|
}),
|
|
469
|
-
|
|
471
|
+
A === "review" && /* @__PURE__ */ x("div", {
|
|
470
472
|
className: "space-y-6",
|
|
471
|
-
children: /* @__PURE__ */ S(
|
|
473
|
+
children: /* @__PURE__ */ S(xe, {
|
|
472
474
|
className: "p-6 space-y-4",
|
|
473
475
|
children: [/* @__PURE__ */ S("h2", {
|
|
474
476
|
className: "text-lg font-bold flex items-center gap-2",
|
|
475
|
-
children: [/* @__PURE__ */ x(
|
|
477
|
+
children: [/* @__PURE__ */ x(h, {
|
|
476
478
|
size: 20,
|
|
477
479
|
className: "text-primary"
|
|
478
480
|
}), y("export.create.review.title", "Review Export")]
|
|
@@ -481,31 +483,31 @@ function T() {
|
|
|
481
483
|
children: [
|
|
482
484
|
{
|
|
483
485
|
label: y("export.create.review.fields.name", "Name"),
|
|
484
|
-
value:
|
|
486
|
+
value: P
|
|
485
487
|
},
|
|
486
488
|
{
|
|
487
489
|
label: y("export.create.review.fields.scope", "Scope"),
|
|
488
|
-
value: J(
|
|
490
|
+
value: J(R)
|
|
489
491
|
},
|
|
490
492
|
{
|
|
491
493
|
label: y("export.create.review.fields.entityTypes", "Entity Types"),
|
|
492
|
-
value:
|
|
494
|
+
value: M.join(", ")
|
|
493
495
|
},
|
|
494
496
|
{
|
|
495
497
|
label: y("export.create.review.fields.format", "Format"),
|
|
496
|
-
value: a(
|
|
498
|
+
value: a(I)
|
|
497
499
|
},
|
|
498
500
|
{
|
|
499
501
|
label: y("export.create.review.fields.archive", "Archive"),
|
|
500
502
|
value: y("export.archive.zip", "ZIP")
|
|
501
503
|
},
|
|
502
|
-
...
|
|
504
|
+
...V || H ? [{
|
|
503
505
|
label: y("export.create.review.fields.dateRange", "Date Range"),
|
|
504
|
-
value: [
|
|
506
|
+
value: [V || "—", H || "—"].join(" → ")
|
|
505
507
|
}] : [],
|
|
506
|
-
...
|
|
508
|
+
...z ? [{
|
|
507
509
|
label: y("export.create.review.fields.template", "Template"),
|
|
508
|
-
value:
|
|
510
|
+
value: E.find((e) => e.id === z)?.name ?? z
|
|
509
511
|
}] : []
|
|
510
512
|
].map(({ label: e, value: t }) => /* @__PURE__ */ S("div", {
|
|
511
513
|
className: "flex flex-col sm:flex-row sm:justify-between gap-1",
|
|
@@ -524,36 +526,36 @@ function T() {
|
|
|
524
526
|
className: "flex flex-col sm:flex-row gap-3 pt-2",
|
|
525
527
|
children: [/* @__PURE__ */ x("button", {
|
|
526
528
|
type: "button",
|
|
527
|
-
onClick:
|
|
529
|
+
onClick: Ne,
|
|
528
530
|
className: "px-6 py-3 border-2 border-border-subtle/50 rounded-lg hover:bg-accent hover:border-primary/30 transition-all duration-200 font-medium",
|
|
529
|
-
children:
|
|
530
|
-
}),
|
|
531
|
+
children: A === "entities" ? y("export.create.actions.cancel", "Cancel") : y("export.create.actions.back", "Back")
|
|
532
|
+
}), A === "review" ? /* @__PURE__ */ S("button", {
|
|
531
533
|
type: "button",
|
|
532
|
-
onClick:
|
|
533
|
-
disabled:
|
|
534
|
+
onClick: Pe,
|
|
535
|
+
disabled: w,
|
|
534
536
|
className: "flex-1 inline-flex items-center justify-center gap-2 px-6 py-3 bg-action-primary-bg text-action-primary-text rounded-lg hover:bg-action-primary-bg/90 transition-all duration-200 font-bold shadow-lg disabled:opacity-50 disabled:cursor-not-allowed",
|
|
535
|
-
children: [
|
|
537
|
+
children: [w ? /* @__PURE__ */ x(oe, {
|
|
536
538
|
size: 18,
|
|
537
539
|
className: "animate-spin"
|
|
538
|
-
}) : /* @__PURE__ */ x(
|
|
540
|
+
}) : /* @__PURE__ */ x(g, { size: 18 }), y("export.create.actions.startExport", "Start Export")]
|
|
539
541
|
}) : /* @__PURE__ */ S("button", {
|
|
540
542
|
type: "button",
|
|
541
|
-
onClick:
|
|
543
|
+
onClick: q,
|
|
542
544
|
className: "flex-1 inline-flex items-center justify-center gap-2 px-6 py-3 bg-action-primary-bg text-action-primary-text rounded-lg hover:bg-action-primary-bg/90 transition-all duration-200 font-bold shadow-lg",
|
|
543
|
-
children: [y("export.create.actions.next", "Next"), /* @__PURE__ */ x(
|
|
545
|
+
children: [y("export.create.actions.next", "Next"), /* @__PURE__ */ x(p, { size: 18 })]
|
|
544
546
|
})]
|
|
545
547
|
}),
|
|
546
|
-
/* @__PURE__ */ x(
|
|
547
|
-
open:
|
|
548
|
-
onOpenChange:
|
|
549
|
-
children: /* @__PURE__ */ S(
|
|
550
|
-
onClick: () =>
|
|
548
|
+
/* @__PURE__ */ x(pe, {
|
|
549
|
+
open: Me,
|
|
550
|
+
onOpenChange: G,
|
|
551
|
+
children: /* @__PURE__ */ S(ge, { children: [/* @__PURE__ */ S(ye, { children: [/* @__PURE__ */ x(be, { children: y("export.create.quotaDialog.title", "Export Limit Reached") }), /* @__PURE__ */ x(_e, { children: y("export.create.quotaDialog.description", "You have reached your export limit for this month.") })] }), /* @__PURE__ */ S(ve, { children: [/* @__PURE__ */ x(he, { children: y("export.create.quotaDialog.dismiss", "Dismiss") }), /* @__PURE__ */ x(me, {
|
|
552
|
+
onClick: () => ne(_),
|
|
551
553
|
children: y("export.create.quotaDialog.viewBilling", "View Billing")
|
|
552
554
|
})] })] })
|
|
553
555
|
})
|
|
554
556
|
]
|
|
555
557
|
});
|
|
556
558
|
}
|
|
557
|
-
export {
|
|
559
|
+
export { w as CreateExportPage };
|
|
558
560
|
|
|
559
561
|
//# sourceMappingURL=CreateExportPage.js.map
|