@burdenoff/microfe-export 2026.626.2 → 2026.715.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/dev/main.d.ts +2 -0
- package/dist/dev/main.d.ts.map +1 -0
- package/dist/export/ExportRoot.d.ts +31 -0
- package/dist/export/ExportRoot.d.ts.map +1 -0
- package/dist/export/ExportRoutes.d.ts +14 -0
- package/dist/export/ExportRoutes.d.ts.map +1 -0
- package/dist/export/components/ExportProgressBar.d.ts +12 -0
- package/dist/export/components/ExportProgressBar.d.ts.map +1 -0
- package/dist/export/components/ExportStatusBadge.d.ts +12 -0
- package/dist/export/components/ExportStatusBadge.d.ts.map +1 -0
- package/dist/export/components/PageLayout.d.ts +57 -0
- package/dist/export/components/PageLayout.d.ts.map +1 -0
- package/dist/export/components/PageLayout.js.map +1 -1
- package/dist/export/constants/enums.d.ts +19 -0
- package/dist/export/constants/enums.d.ts.map +1 -0
- package/dist/export/constants/index.d.ts +7 -0
- package/dist/export/constants/index.d.ts.map +1 -0
- package/dist/export/hooks/useExportQueries.d.ts +209 -0
- package/dist/export/hooks/useExportQueries.d.ts.map +1 -0
- package/dist/export/index.d.ts +29 -0
- package/dist/export/index.d.ts.map +1 -0
- package/dist/export/pages/CreateExportPage.d.ts +2 -0
- package/dist/export/pages/CreateExportPage.d.ts.map +1 -0
- package/dist/export/pages/CreateExportPage.js +125 -112
- package/dist/export/pages/CreateExportPage.js.map +1 -1
- package/dist/export/pages/ExportDashboardPage.d.ts +6 -0
- package/dist/export/pages/ExportDashboardPage.d.ts.map +1 -0
- package/dist/export/pages/ExportDashboardPage.js.map +1 -1
- package/dist/export/pages/ExportDetailPage.d.ts +7 -0
- package/dist/export/pages/ExportDetailPage.d.ts.map +1 -0
- package/dist/export/pages/ExportHistoryPage.d.ts +6 -0
- package/dist/export/pages/ExportHistoryPage.d.ts.map +1 -0
- package/dist/export/pages/ExportHistoryPage.js.map +1 -1
- package/dist/export/pages/ExportLandingPage.d.ts +9 -0
- package/dist/export/pages/ExportLandingPage.d.ts.map +1 -0
- package/dist/export/pages/ExportTemplatesPage.d.ts +6 -0
- package/dist/export/pages/ExportTemplatesPage.d.ts.map +1 -0
- package/dist/export/pages/ExportTemplatesPage.js.map +1 -1
- package/dist/export/pages/TemplateDetailPage.d.ts +7 -0
- package/dist/export/pages/TemplateDetailPage.d.ts.map +1 -0
- package/dist/export/pages/TemplateDetailPage.js.map +1 -1
- package/dist/export/providers/ExportProvider.d.ts +13 -0
- package/dist/export/providers/ExportProvider.d.ts.map +1 -0
- package/dist/export/store/exportStore.d.ts +17 -0
- package/dist/export/store/exportStore.d.ts.map +1 -0
- package/dist/export/types/index.d.ts +230 -0
- package/dist/export/types/index.d.ts.map +1 -0
- package/dist/export/utils/cn.d.ts +8 -0
- package/dist/export/utils/cn.d.ts.map +1 -0
- package/dist/export/utils/disabledModules.d.ts +28 -0
- package/dist/export/utils/disabledModules.d.ts.map +1 -0
- package/dist/export/utils/events.d.ts +7 -0
- package/dist/export/utils/events.d.ts.map +1 -0
- package/dist/export/utils/i18n.d.ts +6 -0
- package/dist/export/utils/i18n.d.ts.map +1 -0
- package/dist/generated/global-operations.d.ts +2 -0
- package/dist/generated/global-operations.d.ts.map +1 -0
- package/dist/generated/global-types.d.ts +23527 -0
- package/dist/generated/global-types.d.ts.map +1 -0
- package/dist/generated/wspace-operations.d.ts +773 -0
- package/dist/generated/wspace-operations.d.ts.map +1 -0
- package/dist/generated/wspace-types.d.ts +57851 -0
- package/dist/generated/wspace-types.d.ts.map +1 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/utils/nativeBridge.d.ts +3 -0
- package/dist/utils/nativeBridge.d.ts.map +1 -0
- package/package.json +2 -2
|
@@ -3,20 +3,21 @@ import { useAvailableEntities as t, useCreateExportJob as n, useExportTemplates
|
|
|
3
3
|
import { cn as i } from "../utils/cn.js";
|
|
4
4
|
import { getFormatDisplayName as a } from "../constants/enums.js";
|
|
5
5
|
import { tWithFallback as ee } from "../utils/i18n.js";
|
|
6
|
-
import { PageLayout as
|
|
7
|
-
import { isExportEntityDisabled as
|
|
8
|
-
import { useEffect as
|
|
9
|
-
import { ArrowLeft as
|
|
6
|
+
import { PageLayout as o } from "../components/PageLayout.js";
|
|
7
|
+
import { isExportEntityDisabled as s } from "../utils/disabledModules.js";
|
|
8
|
+
import { useEffect as te, useRef as ne, useState as c } from "react";
|
|
9
|
+
import { ArrowLeft as re, ArrowRight as l, Building2 as u, CalendarRange as ie, CheckCircle2 as d, Download as f, FileJson as p, FileSpreadsheet as m, Loader2 as ae, Lock as h, Package as g, User as _, Users as v } from "lucide-react";
|
|
10
10
|
import { usePermission as y } from "@burdenoff/fe-libs/shared/providers/shell";
|
|
11
11
|
import { useSearchParams as oe } from "react-router-dom";
|
|
12
|
+
import { isQuotaExhaustedError as se } from "@burdenoff/fe-libs/shared/utils";
|
|
12
13
|
import { jsx as b, jsxs as x } from "react/jsx-runtime";
|
|
13
|
-
import { useI18n as
|
|
14
|
-
import { EmphasisPanel as
|
|
14
|
+
import { useI18n as ce } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
15
|
+
import { AlertDialog as le, AlertDialogAction as ue, AlertDialogCancel as de, AlertDialogContent as fe, AlertDialogDescription as pe, AlertDialogFooter as me, AlertDialogHeader as he, AlertDialogTitle as ge, EmphasisPanel as _e, IllustratedEmptyState as ve, PagePurpose as ye, ShowMore as be } from "@burdenoff/fe-libs/ui";
|
|
15
16
|
//#region src/export/pages/CreateExportPage.tsx
|
|
16
|
-
var
|
|
17
|
-
CSV:
|
|
18
|
-
JSON:
|
|
19
|
-
},
|
|
17
|
+
var S = ["CSV", "JSON"], xe = {
|
|
18
|
+
CSV: m,
|
|
19
|
+
JSON: p
|
|
20
|
+
}, Se = [
|
|
20
21
|
{
|
|
21
22
|
value: "INDIVIDUAL",
|
|
22
23
|
label: "My Data Only",
|
|
@@ -33,53 +34,57 @@ var w = ["CSV", "JSON"], T = {
|
|
|
33
34
|
value: "ORG_ADMIN",
|
|
34
35
|
label: "All Organization Data",
|
|
35
36
|
description: "Export data from every workspace in your organization. Requires org-admin access.",
|
|
36
|
-
Icon:
|
|
37
|
+
Icon: u
|
|
37
38
|
}
|
|
38
39
|
];
|
|
39
|
-
function
|
|
40
|
-
let { basePath:
|
|
41
|
-
|
|
42
|
-
let e =
|
|
43
|
-
if (!e || !
|
|
44
|
-
let t =
|
|
40
|
+
function C() {
|
|
41
|
+
let { basePath: u = "/", navigate: p, organizationId: m } = e(), { t: _ } = ce(), v = (e, t, n) => ee(_, e, t, n), { createJob: C, isPending: w } = n(), { data: T } = t(), { data: E } = r(), [D] = oe(), O = y("export:workspace:admin"), k = y("export:org:admin"), [A, j] = c("entities"), [M, N] = c([]), [P, F] = c(""), [I, L] = c("CSV"), [R, Ce] = c("INDIVIDUAL"), [z, B] = c(D.get("templateId") ?? void 0), [V, we] = c(""), [H, Te] = c(""), [U, W] = c(null), [Ee, G] = c(!1), K = ne(null);
|
|
42
|
+
te(() => {
|
|
43
|
+
let e = D.get("templateId");
|
|
44
|
+
if (!e || !E?.length || K.current === e) return;
|
|
45
|
+
let t = E.find((t) => t.id === e);
|
|
45
46
|
if (!t) return;
|
|
46
|
-
|
|
47
|
+
K.current = e, B(t.id), N((t.entityTypes ?? []).filter((e) => !s(e)));
|
|
47
48
|
let n = t.format?.toUpperCase();
|
|
48
|
-
n &&
|
|
49
|
-
}, [
|
|
50
|
-
let
|
|
51
|
-
|
|
52
|
-
},
|
|
53
|
-
if (
|
|
54
|
-
if (
|
|
55
|
-
|
|
49
|
+
n && S.includes(n) && L(n), t.name && F(t.name);
|
|
50
|
+
}, [D, E]);
|
|
51
|
+
let De = () => {
|
|
52
|
+
A === "options" ? j("entities") : A === "review" ? j("options") : p?.(u);
|
|
53
|
+
}, Oe = () => {
|
|
54
|
+
if (A === "entities") {
|
|
55
|
+
if (M.length === 0) {
|
|
56
|
+
W(v("export.create.errors.selectEntity", "Please select at least one entity type to export"));
|
|
56
57
|
return;
|
|
57
58
|
}
|
|
58
|
-
|
|
59
|
-
} else if (
|
|
60
|
-
if (!
|
|
61
|
-
|
|
59
|
+
W(null), j("options");
|
|
60
|
+
} else if (A === "options") {
|
|
61
|
+
if (!P.trim()) {
|
|
62
|
+
W(v("export.create.errors.exportNameRequired", "Please provide a name for this export"));
|
|
62
63
|
return;
|
|
63
64
|
}
|
|
64
|
-
|
|
65
|
+
W(null), j("review");
|
|
65
66
|
}
|
|
66
|
-
},
|
|
67
|
+
}, ke = async () => {
|
|
67
68
|
try {
|
|
68
|
-
|
|
69
|
-
name:
|
|
70
|
-
entityTypes:
|
|
71
|
-
format:
|
|
72
|
-
exportScope:
|
|
73
|
-
organizationId:
|
|
74
|
-
templateId:
|
|
75
|
-
dateRangeStart:
|
|
76
|
-
dateRangeEnd:
|
|
77
|
-
}),
|
|
69
|
+
W(null), await C({
|
|
70
|
+
name: P,
|
|
71
|
+
entityTypes: M,
|
|
72
|
+
format: I,
|
|
73
|
+
exportScope: R,
|
|
74
|
+
organizationId: R === "ORG_ADMIN" ? m : void 0,
|
|
75
|
+
templateId: z,
|
|
76
|
+
dateRangeStart: V ? new Date(V).toISOString() : null,
|
|
77
|
+
dateRangeEnd: H ? new Date(H).toISOString() : null
|
|
78
|
+
}), p?.(u);
|
|
78
79
|
} catch (e) {
|
|
79
|
-
|
|
80
|
+
if (se(e)) {
|
|
81
|
+
G(!0), W(v("export.create.errors.quotaReached", "You have reached your export limit for this month."));
|
|
82
|
+
return;
|
|
83
|
+
}
|
|
84
|
+
W(e instanceof Error ? e.message : v("export.create.errors.createFailed", "Failed to create export"));
|
|
80
85
|
}
|
|
81
|
-
},
|
|
82
|
-
|
|
86
|
+
}, q = (e) => {
|
|
87
|
+
s(e) || N((t) => t.includes(e) ? t.filter((t) => t !== e) : [...t, e]);
|
|
83
88
|
}, J = (e) => {
|
|
84
89
|
switch (e) {
|
|
85
90
|
case "INDIVIDUAL": return v("export.create.scope.individual.label", "My Data Only");
|
|
@@ -87,7 +92,7 @@ function D() {
|
|
|
87
92
|
case "ORG_ADMIN": return v("export.create.scope.orgAdmin.label", "All Organization Data");
|
|
88
93
|
default: return e;
|
|
89
94
|
}
|
|
90
|
-
},
|
|
95
|
+
}, Ae = (e) => {
|
|
91
96
|
switch (e) {
|
|
92
97
|
case "INDIVIDUAL": return v("export.create.scope.individual.description", "Export data you personally created across selected modules.");
|
|
93
98
|
case "WORKSPACE_ADMIN": return v("export.create.scope.workspaceAdmin.description", "Export all data in this workspace regardless of who created it. Requires workspace admin access.");
|
|
@@ -127,11 +132,11 @@ function D() {
|
|
|
127
132
|
label: v("export.create.entities.calendar.label", "Calendar Events"),
|
|
128
133
|
description: v("export.create.entities.calendar.description", "Events and bookings")
|
|
129
134
|
}
|
|
130
|
-
}, X =
|
|
131
|
-
let n = !t &&
|
|
135
|
+
}, X = T.filter((e) => e.enabled !== !1), Z = X.filter((e) => !s(e.entityType)), Q = X.filter((e) => s(e.entityType)), $ = (e, t) => {
|
|
136
|
+
let n = !t && M.includes(e.entityType);
|
|
132
137
|
return /* @__PURE__ */ x("button", {
|
|
133
138
|
type: "button",
|
|
134
|
-
onClick: () =>
|
|
139
|
+
onClick: () => q(e.entityType),
|
|
135
140
|
disabled: t,
|
|
136
141
|
"aria-disabled": t,
|
|
137
142
|
title: t ? v("export.create.select.unavailableHint", "Export for this product isn't available yet") : void 0,
|
|
@@ -145,7 +150,7 @@ function D() {
|
|
|
145
150
|
}), t ? /* @__PURE__ */ b("span", {
|
|
146
151
|
className: "shrink-0 text-xs font-medium px-2 py-0.5 rounded-full bg-bg-sunken text-text-secondary",
|
|
147
152
|
children: v("export.create.select.unavailable", "Unavailable")
|
|
148
|
-
}) : n && /* @__PURE__ */ b(
|
|
153
|
+
}) : n && /* @__PURE__ */ b(d, {
|
|
149
154
|
size: 18,
|
|
150
155
|
className: "text-primary"
|
|
151
156
|
})]
|
|
@@ -161,7 +166,7 @@ function D() {
|
|
|
161
166
|
]
|
|
162
167
|
}, e.entityType);
|
|
163
168
|
};
|
|
164
|
-
return /* @__PURE__ */ x(
|
|
169
|
+
return /* @__PURE__ */ x(o, {
|
|
165
170
|
showHeader: !1,
|
|
166
171
|
children: [
|
|
167
172
|
/* @__PURE__ */ b("div", {
|
|
@@ -170,15 +175,15 @@ function D() {
|
|
|
170
175
|
className: "relative z-10 flex items-center gap-4",
|
|
171
176
|
children: [/* @__PURE__ */ b("button", {
|
|
172
177
|
type: "button",
|
|
173
|
-
onClick: () =>
|
|
178
|
+
onClick: () => p?.(u),
|
|
174
179
|
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",
|
|
175
180
|
"aria-label": v("export.create.actions.backToDashboard", "Back to export dashboard"),
|
|
176
|
-
children: /* @__PURE__ */ b(
|
|
181
|
+
children: /* @__PURE__ */ b(re, { size: 20 })
|
|
177
182
|
}), /* @__PURE__ */ x("div", {
|
|
178
183
|
className: "flex items-center gap-3",
|
|
179
184
|
children: [/* @__PURE__ */ b("div", {
|
|
180
185
|
className: "p-2.5 rounded-lg bg-action-primary-bg/10 backdrop-blur-sm",
|
|
181
|
-
children: /* @__PURE__ */ b(
|
|
186
|
+
children: /* @__PURE__ */ b(f, {
|
|
182
187
|
size: 24,
|
|
183
188
|
className: "text-primary"
|
|
184
189
|
})
|
|
@@ -189,8 +194,8 @@ function D() {
|
|
|
189
194
|
})]
|
|
190
195
|
})
|
|
191
196
|
}),
|
|
192
|
-
/* @__PURE__ */ b(
|
|
193
|
-
icon: /* @__PURE__ */ b(
|
|
197
|
+
/* @__PURE__ */ b(ye, {
|
|
198
|
+
icon: /* @__PURE__ */ b(f, { size: 16 }),
|
|
194
199
|
children: v("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.")
|
|
195
200
|
}),
|
|
196
201
|
/* @__PURE__ */ b("div", {
|
|
@@ -201,11 +206,11 @@ function D() {
|
|
|
201
206
|
"review"
|
|
202
207
|
].map((e, t) => /* @__PURE__ */ x("div", {
|
|
203
208
|
className: "flex items-center gap-2",
|
|
204
|
-
children: [t > 0 && /* @__PURE__ */ b(
|
|
209
|
+
children: [t > 0 && /* @__PURE__ */ b(l, {
|
|
205
210
|
size: 18,
|
|
206
211
|
className: "text-text-secondary"
|
|
207
212
|
}), /* @__PURE__ */ x("div", {
|
|
208
|
-
className: i("flex items-center gap-2 px-4 py-2.5 rounded-lg text-sm font-medium border-2 transition-all duration-200",
|
|
213
|
+
className: i("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"),
|
|
209
214
|
children: [/* @__PURE__ */ b("div", {
|
|
210
215
|
className: "flex items-center justify-center size-6 rounded-full bg-bg-surface/20 font-bold",
|
|
211
216
|
children: t + 1
|
|
@@ -216,11 +221,11 @@ function D() {
|
|
|
216
221
|
})]
|
|
217
222
|
}, e))
|
|
218
223
|
}),
|
|
219
|
-
|
|
224
|
+
U && /* @__PURE__ */ b("div", {
|
|
220
225
|
className: "border-2 border-border-default rounded-xl bg-status-error-bg-subtle p-4 text-status-error-text text-sm",
|
|
221
|
-
children:
|
|
226
|
+
children: U
|
|
222
227
|
}),
|
|
223
|
-
|
|
228
|
+
A === "entities" && /* @__PURE__ */ x("div", {
|
|
224
229
|
className: "space-y-4",
|
|
225
230
|
children: [
|
|
226
231
|
/* @__PURE__ */ b("h2", {
|
|
@@ -231,7 +236,7 @@ function D() {
|
|
|
231
236
|
className: "text-sm text-text-secondary",
|
|
232
237
|
children: v("export.create.select.description", "Choose which entity types to include in your export.")
|
|
233
238
|
}),
|
|
234
|
-
X.length === 0 ? /* @__PURE__ */ b(
|
|
239
|
+
X.length === 0 ? /* @__PURE__ */ b(ve, {
|
|
235
240
|
illustration: "empty-data",
|
|
236
241
|
title: v("export.create.select.emptyTitle", "Nothing to export yet"),
|
|
237
242
|
description: v("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.")
|
|
@@ -260,7 +265,7 @@ function D() {
|
|
|
260
265
|
})
|
|
261
266
|
]
|
|
262
267
|
}),
|
|
263
|
-
|
|
268
|
+
A === "options" && /* @__PURE__ */ b("div", {
|
|
264
269
|
className: "space-y-6",
|
|
265
270
|
children: /* @__PURE__ */ x("div", {
|
|
266
271
|
className: "border border-border-seam rounded-xl p-6 space-y-5 bg-bg-surface",
|
|
@@ -274,13 +279,13 @@ function D() {
|
|
|
274
279
|
children: v("export.create.options.scope", "Export Scope")
|
|
275
280
|
}), /* @__PURE__ */ b("div", {
|
|
276
281
|
className: "grid grid-cols-1 sm:grid-cols-3 gap-3",
|
|
277
|
-
children:
|
|
278
|
-
let n = e === "WORKSPACE_ADMIN" && !
|
|
282
|
+
children: Se.map(({ value: e, Icon: t }) => {
|
|
283
|
+
let n = e === "WORKSPACE_ADMIN" && !O || e === "ORG_ADMIN" && !k;
|
|
279
284
|
return /* @__PURE__ */ x("button", {
|
|
280
285
|
type: "button",
|
|
281
|
-
onClick: () => !n &&
|
|
286
|
+
onClick: () => !n && Ce(e),
|
|
282
287
|
disabled: n,
|
|
283
|
-
className: i("text-left border-2 rounded-xl p-4 transition-all duration-200",
|
|
288
|
+
className: i("text-left border-2 rounded-xl p-4 transition-all duration-200", R === e ? "border-primary bg-action-primary-bg/5 shadow-md" : n ? "border-border-subtle/30 opacity-50 cursor-not-allowed" : "border-border-subtle/50 hover:border-primary/30 hover:shadow-sm"),
|
|
284
289
|
title: n ? e === "WORKSPACE_ADMIN" ? "Workspace admin access required" : "Organization admin access required" : void 0,
|
|
285
290
|
children: [
|
|
286
291
|
/* @__PURE__ */ x("div", {
|
|
@@ -288,13 +293,13 @@ function D() {
|
|
|
288
293
|
children: [
|
|
289
294
|
/* @__PURE__ */ b(t, {
|
|
290
295
|
size: 18,
|
|
291
|
-
className:
|
|
296
|
+
className: R === e ? "text-primary" : n ? "text-text-secondary/50" : "text-text-secondary"
|
|
292
297
|
}),
|
|
293
|
-
|
|
298
|
+
R === e && /* @__PURE__ */ b(d, {
|
|
294
299
|
size: 16,
|
|
295
300
|
className: "text-primary"
|
|
296
301
|
}),
|
|
297
|
-
n && /* @__PURE__ */ b(
|
|
302
|
+
n && /* @__PURE__ */ b(h, {
|
|
298
303
|
size: 14,
|
|
299
304
|
className: "text-text-secondary/50"
|
|
300
305
|
})
|
|
@@ -306,7 +311,7 @@ function D() {
|
|
|
306
311
|
}),
|
|
307
312
|
/* @__PURE__ */ b("p", {
|
|
308
313
|
className: "text-xs text-text-secondary mt-1",
|
|
309
|
-
children:
|
|
314
|
+
children: Ae(e)
|
|
310
315
|
})
|
|
311
316
|
]
|
|
312
317
|
}, e);
|
|
@@ -327,8 +332,8 @@ function D() {
|
|
|
327
332
|
type: "text",
|
|
328
333
|
id: "exportName",
|
|
329
334
|
"aria-label": v("export.create.options.name", "Export Name"),
|
|
330
|
-
value:
|
|
331
|
-
onChange: (e) =>
|
|
335
|
+
value: P,
|
|
336
|
+
onChange: (e) => F(e.target.value),
|
|
332
337
|
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",
|
|
333
338
|
placeholder: v("export.create.options.namePlaceholder", "e.g., Monthly User Export")
|
|
334
339
|
})] }),
|
|
@@ -337,15 +342,15 @@ function D() {
|
|
|
337
342
|
children: v("export.create.options.outputFormat", "Output Format")
|
|
338
343
|
}), /* @__PURE__ */ b("div", {
|
|
339
344
|
className: "grid grid-cols-2 gap-3",
|
|
340
|
-
children:
|
|
341
|
-
let t =
|
|
345
|
+
children: S.map((e) => {
|
|
346
|
+
let t = xe[e];
|
|
342
347
|
return /* @__PURE__ */ x("button", {
|
|
343
348
|
type: "button",
|
|
344
|
-
onClick: () =>
|
|
345
|
-
className: i("flex items-center gap-3 border-2 rounded-lg p-3 transition-all duration-200",
|
|
349
|
+
onClick: () => L(e),
|
|
350
|
+
className: i("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"),
|
|
346
351
|
children: [/* @__PURE__ */ b(t, {
|
|
347
352
|
size: 18,
|
|
348
|
-
className:
|
|
353
|
+
className: I === e ? "text-primary" : "text-text-secondary"
|
|
349
354
|
}), /* @__PURE__ */ b("span", {
|
|
350
355
|
className: "font-medium text-sm",
|
|
351
356
|
children: a(e)
|
|
@@ -362,7 +367,7 @@ function D() {
|
|
|
362
367
|
className: "flex gap-3",
|
|
363
368
|
children: /* @__PURE__ */ x("div", {
|
|
364
369
|
className: i("flex items-center gap-2 border-2 rounded-lg px-4 py-2 border-primary bg-action-primary-bg/5"),
|
|
365
|
-
children: [/* @__PURE__ */ b(
|
|
370
|
+
children: [/* @__PURE__ */ b(g, {
|
|
366
371
|
size: 16,
|
|
367
372
|
className: "text-primary"
|
|
368
373
|
}), /* @__PURE__ */ b("span", {
|
|
@@ -376,7 +381,7 @@ function D() {
|
|
|
376
381
|
children: v("export.create.options.archiveDescription", "Exports are packaged as ZIP archives.")
|
|
377
382
|
})
|
|
378
383
|
] }),
|
|
379
|
-
/* @__PURE__ */ b(
|
|
384
|
+
/* @__PURE__ */ b(be, {
|
|
380
385
|
collapsedHeight: 0,
|
|
381
386
|
label: v("export.create.options.advancedToggle", "Date range & template"),
|
|
382
387
|
children: /* @__PURE__ */ x("div", {
|
|
@@ -387,7 +392,7 @@ function D() {
|
|
|
387
392
|
children: /* @__PURE__ */ x("span", {
|
|
388
393
|
className: "inline-flex items-center gap-1.5",
|
|
389
394
|
children: [
|
|
390
|
-
/* @__PURE__ */ b(
|
|
395
|
+
/* @__PURE__ */ b(ie, { size: 15 }),
|
|
391
396
|
v("export.create.options.dateRange", "Date Range"),
|
|
392
397
|
" ",
|
|
393
398
|
/* @__PURE__ */ b("span", {
|
|
@@ -407,8 +412,8 @@ function D() {
|
|
|
407
412
|
type: "date",
|
|
408
413
|
id: "dateFrom",
|
|
409
414
|
"aria-label": v("export.create.options.dateFrom", "From"),
|
|
410
|
-
value:
|
|
411
|
-
onChange: (e) =>
|
|
415
|
+
value: V,
|
|
416
|
+
onChange: (e) => we(e.target.value),
|
|
412
417
|
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"
|
|
413
418
|
})] }), /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("label", {
|
|
414
419
|
htmlFor: "dateTo",
|
|
@@ -418,9 +423,9 @@ function D() {
|
|
|
418
423
|
type: "date",
|
|
419
424
|
id: "dateTo",
|
|
420
425
|
"aria-label": v("export.create.options.dateTo", "To"),
|
|
421
|
-
value:
|
|
422
|
-
min:
|
|
423
|
-
onChange: (e) =>
|
|
426
|
+
value: H,
|
|
427
|
+
min: V,
|
|
428
|
+
onChange: (e) => Te(e.target.value),
|
|
424
429
|
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"
|
|
425
430
|
})] })]
|
|
426
431
|
}),
|
|
@@ -438,14 +443,14 @@ function D() {
|
|
|
438
443
|
children: v("export.create.shared.optional", "(optional)")
|
|
439
444
|
})
|
|
440
445
|
]
|
|
441
|
-
}),
|
|
442
|
-
value:
|
|
443
|
-
onChange: (e) =>
|
|
446
|
+
}), E.length > 0 ? /* @__PURE__ */ x("select", {
|
|
447
|
+
value: z ?? "",
|
|
448
|
+
onChange: (e) => B(e.target.value || void 0),
|
|
444
449
|
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",
|
|
445
450
|
children: [/* @__PURE__ */ b("option", {
|
|
446
451
|
value: "",
|
|
447
452
|
children: v("export.create.options.noTemplate", "No template")
|
|
448
|
-
}),
|
|
453
|
+
}), E.map((e) => /* @__PURE__ */ b("option", {
|
|
449
454
|
value: e.id,
|
|
450
455
|
children: e.name
|
|
451
456
|
}, e.id))]
|
|
@@ -456,7 +461,7 @@ function D() {
|
|
|
456
461
|
" ",
|
|
457
462
|
/* @__PURE__ */ b("button", {
|
|
458
463
|
type: "button",
|
|
459
|
-
onClick: () =>
|
|
464
|
+
onClick: () => p?.(u + "/templates"),
|
|
460
465
|
className: "text-primary underline-offset-2 hover:underline",
|
|
461
466
|
children: v("export.create.options.createTemplateLink", "Create one")
|
|
462
467
|
}),
|
|
@@ -469,13 +474,13 @@ function D() {
|
|
|
469
474
|
]
|
|
470
475
|
})
|
|
471
476
|
}),
|
|
472
|
-
|
|
477
|
+
A === "review" && /* @__PURE__ */ b("div", {
|
|
473
478
|
className: "space-y-6",
|
|
474
|
-
children: /* @__PURE__ */ x(
|
|
479
|
+
children: /* @__PURE__ */ x(_e, {
|
|
475
480
|
className: "p-6 space-y-4",
|
|
476
481
|
children: [/* @__PURE__ */ x("h2", {
|
|
477
482
|
className: "text-lg font-bold flex items-center gap-2",
|
|
478
|
-
children: [/* @__PURE__ */ b(
|
|
483
|
+
children: [/* @__PURE__ */ b(d, {
|
|
479
484
|
size: 20,
|
|
480
485
|
className: "text-primary"
|
|
481
486
|
}), v("export.create.review.title", "Review Export")]
|
|
@@ -484,31 +489,31 @@ function D() {
|
|
|
484
489
|
children: [
|
|
485
490
|
{
|
|
486
491
|
label: v("export.create.review.fields.name", "Name"),
|
|
487
|
-
value:
|
|
492
|
+
value: P
|
|
488
493
|
},
|
|
489
494
|
{
|
|
490
495
|
label: v("export.create.review.fields.scope", "Scope"),
|
|
491
|
-
value: J(
|
|
496
|
+
value: J(R)
|
|
492
497
|
},
|
|
493
498
|
{
|
|
494
499
|
label: v("export.create.review.fields.entityTypes", "Entity Types"),
|
|
495
|
-
value:
|
|
500
|
+
value: M.join(", ")
|
|
496
501
|
},
|
|
497
502
|
{
|
|
498
503
|
label: v("export.create.review.fields.format", "Format"),
|
|
499
|
-
value: a(
|
|
504
|
+
value: a(I)
|
|
500
505
|
},
|
|
501
506
|
{
|
|
502
507
|
label: v("export.create.review.fields.archive", "Archive"),
|
|
503
508
|
value: "ZIP"
|
|
504
509
|
},
|
|
505
|
-
...
|
|
510
|
+
...V || H ? [{
|
|
506
511
|
label: v("export.create.review.fields.dateRange", "Date Range"),
|
|
507
|
-
value: [
|
|
512
|
+
value: [V || "—", H || "—"].join(" → ")
|
|
508
513
|
}] : [],
|
|
509
|
-
...
|
|
514
|
+
...z ? [{
|
|
510
515
|
label: v("export.create.review.fields.template", "Template"),
|
|
511
|
-
value:
|
|
516
|
+
value: E.find((e) => e.id === z)?.name ?? z
|
|
512
517
|
}] : []
|
|
513
518
|
].map(({ label: e, value: t }) => /* @__PURE__ */ x("div", {
|
|
514
519
|
className: "flex flex-col sm:flex-row sm:justify-between gap-1",
|
|
@@ -527,29 +532,37 @@ function D() {
|
|
|
527
532
|
className: "flex flex-col sm:flex-row gap-3 pt-2",
|
|
528
533
|
children: [/* @__PURE__ */ b("button", {
|
|
529
534
|
type: "button",
|
|
530
|
-
onClick:
|
|
535
|
+
onClick: De,
|
|
531
536
|
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",
|
|
532
|
-
children:
|
|
533
|
-
}),
|
|
537
|
+
children: A === "entities" ? v("export.create.actions.cancel", "Cancel") : v("export.create.actions.back", "Back")
|
|
538
|
+
}), A === "review" ? /* @__PURE__ */ x("button", {
|
|
534
539
|
type: "button",
|
|
535
|
-
onClick:
|
|
536
|
-
disabled:
|
|
540
|
+
onClick: ke,
|
|
541
|
+
disabled: w,
|
|
537
542
|
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",
|
|
538
|
-
children: [
|
|
543
|
+
children: [w ? /* @__PURE__ */ b(ae, {
|
|
539
544
|
size: 18,
|
|
540
545
|
className: "animate-spin"
|
|
541
|
-
}) : /* @__PURE__ */ b(
|
|
546
|
+
}) : /* @__PURE__ */ b(f, { size: 18 }), v("export.create.actions.startExport", "Start Export")]
|
|
542
547
|
}) : /* @__PURE__ */ x("button", {
|
|
543
548
|
type: "button",
|
|
544
|
-
onClick:
|
|
549
|
+
onClick: Oe,
|
|
545
550
|
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",
|
|
546
|
-
children: [v("export.create.actions.next", "Next"), /* @__PURE__ */ b(
|
|
551
|
+
children: [v("export.create.actions.next", "Next"), /* @__PURE__ */ b(l, { size: 18 })]
|
|
547
552
|
})]
|
|
553
|
+
}),
|
|
554
|
+
/* @__PURE__ */ b(le, {
|
|
555
|
+
open: Ee,
|
|
556
|
+
onOpenChange: G,
|
|
557
|
+
children: /* @__PURE__ */ x(fe, { children: [/* @__PURE__ */ x(he, { children: [/* @__PURE__ */ b(ge, { children: v("export.create.quotaDialog.title", "Export Limit Reached") }), /* @__PURE__ */ b(pe, { children: v("export.create.quotaDialog.description", "You have reached your export limit for this month.") })] }), /* @__PURE__ */ x(me, { children: [/* @__PURE__ */ b(de, { children: v("export.create.quotaDialog.dismiss", "Dismiss") }), /* @__PURE__ */ b(ue, {
|
|
558
|
+
onClick: () => window.location.assign("/billing"),
|
|
559
|
+
children: v("export.create.quotaDialog.viewBilling", "View Billing")
|
|
560
|
+
})] })] })
|
|
548
561
|
})
|
|
549
562
|
]
|
|
550
563
|
});
|
|
551
564
|
}
|
|
552
565
|
//#endregion
|
|
553
|
-
export {
|
|
566
|
+
export { C as CreateExportPage };
|
|
554
567
|
|
|
555
568
|
//# sourceMappingURL=CreateExportPage.js.map
|