@burdenoff/microfe-export 2026.1124.1 → 2026.1125.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.
Files changed (38) hide show
  1. package/dist/export/ExportRoutes.js +62 -57
  2. package/dist/export/ExportRoutes.js.map +1 -1
  3. package/dist/export/components/ConfirmDestructiveDialog.js +18 -14
  4. package/dist/export/components/ConfirmDestructiveDialog.js.map +1 -1
  5. package/dist/export/components/DownloadStatus.js +14 -10
  6. package/dist/export/components/DownloadStatus.js.map +1 -1
  7. package/dist/export/components/ExportProgressBar.d.ts +3 -1
  8. package/dist/export/components/ExportProgressBar.js +23 -11
  9. package/dist/export/components/ExportProgressBar.js.map +1 -1
  10. package/dist/export/components/loadingSystem.d.ts +64 -0
  11. package/dist/export/components/loadingSystem.js +49 -0
  12. package/dist/export/components/loadingSystem.js.map +1 -0
  13. package/dist/export/hooks/exportBackgroundTask.d.ts +18 -0
  14. package/dist/export/hooks/exportBackgroundTask.js +46 -0
  15. package/dist/export/hooks/exportBackgroundTask.js.map +1 -0
  16. package/dist/export/hooks/useExportQueries.js +140 -124
  17. package/dist/export/hooks/useExportQueries.js.map +1 -1
  18. package/dist/export/pages/CreateExportPage.js +29 -27
  19. package/dist/export/pages/CreateExportPage.js.map +1 -1
  20. package/dist/export/pages/ExportDashboardPage.js +114 -113
  21. package/dist/export/pages/ExportDashboardPage.js.map +1 -1
  22. package/dist/export/pages/ExportDetailPage.js +104 -98
  23. package/dist/export/pages/ExportDetailPage.js.map +1 -1
  24. package/dist/export/pages/ExportHistoryPage.js +150 -149
  25. package/dist/export/pages/ExportHistoryPage.js.map +1 -1
  26. package/dist/export/pages/ExportTemplatesPage.js +156 -154
  27. package/dist/export/pages/ExportTemplatesPage.js.map +1 -1
  28. package/dist/export/pages/TemplateDetailPage.js +142 -136
  29. package/dist/export/pages/TemplateDetailPage.js.map +1 -1
  30. package/dist/export/pages/v2/DownloadDetailPage.js +108 -103
  31. package/dist/export/pages/v2/DownloadDetailPage.js.map +1 -1
  32. package/dist/export/pages/v2/DownloadsPage.js +153 -152
  33. package/dist/export/pages/v2/DownloadsPage.js.map +1 -1
  34. package/dist/export/pages/v2/NewDownloadPage.js +142 -138
  35. package/dist/export/pages/v2/NewDownloadPage.js.map +1 -1
  36. package/dist/export/workspace-v2/DownloadCells.js +32 -20
  37. package/dist/export/workspace-v2/DownloadCells.js.map +1 -1
  38. package/package.json +2 -2
@@ -1,20 +1,22 @@
1
1
  import { useExport as e } from "../../providers/ExportProvider.js";
2
- import { useAvailableEntities as t, useCreateExportJob as n, useExportTemplates as r, useOrganizationExportPermission as ee } from "../../hooks/useExportQueries.js";
3
- import { useTr as i } from "../../hooks/useTr.js";
4
- import { PageLayout as a } from "../../components/PageLayout.js";
5
- import { entityLabel as te, offeredGroups as ne } from "../../utils/entityLabels.js";
6
- import { isExportEntityDisabled as re, isForeignProductEntity as ie } from "../../utils/disabledModules.js";
7
- import { DEFAULT_NEW_DOWNLOAD_FORM as ae, SUPPORTED_FORMATS as oe, applySavedSetup as o, suggestedDownloadName as se, toCreateExportInput as s } from "../../utils/newDownloadForm.js";
8
- import { joinPath as c } from "../../utils/paths.js";
9
- import { openBilling as l } from "../../utils/billing.js";
10
- import { cn as u } from "../../utils/cn.js";
11
- import { useCallback as d, useEffect as f, useMemo as ce, useRef as p, useState as m } from "react";
12
- import { ArrowRight as le, Check as h, Download as g, Loader2 as ue, Minus as _ } from "lucide-react";
2
+ import { useAvailableEntities as t, useCreateExportJob as n, useExportTemplates as r, useOrganizationExportPermission as i } from "../../hooks/useExportQueries.js";
3
+ import { useTr as ee } from "../../hooks/useTr.js";
4
+ import { PageLayout as te } from "../../components/PageLayout.js";
5
+ import { entityLabel as ne, offeredGroups as a } from "../../utils/entityLabels.js";
6
+ import { isExportEntityDisabled as o, isForeignProductEntity as re } from "../../utils/disabledModules.js";
7
+ import { DEFAULT_NEW_DOWNLOAD_FORM as s, SUPPORTED_FORMATS as c, applySavedSetup as l, suggestedDownloadName as u, toCreateExportInput as ie } from "../../utils/newDownloadForm.js";
8
+ import { joinPath as d } from "../../utils/paths.js";
9
+ import { openBilling as ae } from "../../utils/billing.js";
10
+ import { cn as f } from "../../utils/cn.js";
11
+ import { SpinnerIcon as oe } from "../../components/loadingSystem.js";
12
+ import { useCallback as se, useEffect as ce, useMemo as le, useRef as p, useState as m } from "react";
13
+ import { ArrowRight as ue, Check as h, Download as g, Minus as _ } from "lucide-react";
13
14
  import { useAppShell as de, usePermission as fe } from "@burdenoff/fe-libs/shared/providers/shell";
14
15
  import { useSearchParams as pe } from "react-router";
15
16
  import { isQuotaExhaustedError as me } from "@burdenoff/fe-libs/shared/utils";
16
17
  import { Fragment as he, jsx as v, jsxs as y } from "react/jsx-runtime";
17
- import { AlertDialog as ge, AlertDialogAction as _e, AlertDialogCancel as ve, AlertDialogContent as ye, AlertDialogDescription as be, AlertDialogFooter as xe, AlertDialogHeader as Se, AlertDialogTitle as Ce, Button as b, IllustratedEmptyState as we, OptionalFields as Te, Stepper as x, ThemedSelect as S } from "@burdenoff/fe-libs/ui";
18
+ import { AlertDialog as ge, AlertDialogAction as _e, AlertDialogCancel as ve, AlertDialogContent as ye, AlertDialogDescription as be, AlertDialogFooter as xe, AlertDialogHeader as Se, AlertDialogTitle as Ce, Button as b, IllustratedEmptyState as we, OptionalFields as Te, Stepper as Ee, ThemedSelect as x } from "@burdenoff/fe-libs/ui";
19
+ import { useLoadingSystem as S } from "@burdenoff/fe-libs/ui/loading/LoadingSystemProvider";
18
20
  // src/export/pages/v2/NewDownloadPage.tsx
19
21
  var C = {
20
22
  INDIVIDUAL: {
@@ -45,10 +47,10 @@ function E({ checked: e, onToggle: t, title: n, description: r }) {
45
47
  role: "checkbox",
46
48
  "aria-checked": e,
47
49
  onClick: t,
48
- className: u("flex w-full items-start gap-3 rounded-xl border p-4 text-left transition-colors", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/40", e === !0 ? "border-primary bg-action-primary-bg/5" : "border-border-subtle hover:border-primary/40"),
50
+ className: f("flex w-full items-start gap-3 rounded-xl border p-4 text-left transition-colors", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/40", e === !0 ? "border-primary bg-action-primary-bg/5" : "border-border-subtle hover:border-primary/40"),
49
51
  children: [/* @__PURE__ */ y("span", {
50
52
  "aria-hidden": "true",
51
- className: u("mt-0.5 flex size-5 shrink-0 items-center justify-center rounded border", e ? "border-primary bg-action-primary-bg text-action-primary-text" : "border-border-default"),
53
+ className: f("mt-0.5 flex size-5 shrink-0 items-center justify-center rounded border", e ? "border-primary bg-action-primary-bg text-action-primary-text" : "border-border-default"),
52
54
  children: [e === !0 ? /* @__PURE__ */ v(h, { size: 14 }) : null, e === "mixed" ? /* @__PURE__ */ v(_, { size: 14 }) : null]
53
55
  }), /* @__PURE__ */ y("span", {
54
56
  className: "min-w-0",
@@ -63,98 +65,98 @@ function E({ checked: e, onToggle: t, title: n, description: r }) {
63
65
  });
64
66
  }
65
67
  function D() {
66
- let { basePath: h = "/", navigate: _, organizationId: D } = e(), O = i(), { createJob: Ee, isPending: k } = n(), { data: A } = t(), { data: j } = r(), [M] = pe(), { productSlug: N } = de(), De = fe("export:workspace_admin"), Oe = ee(D), P = [
68
+ let h = S(), { basePath: _ = "/", navigate: D, organizationId: O } = e(), k = ee(), { createJob: De, isPending: A } = n(), { data: j } = t(), { data: M } = r(), [N] = pe(), { productSlug: P } = de(), Oe = fe("export:workspace_admin"), ke = i(O), F = [
67
69
  "INDIVIDUAL",
68
- ...De ? ["WORKSPACE_ADMIN"] : [],
69
- ...Oe ? ["ORG_ADMIN"] : []
70
- ], F = d((e) => !re(e) && !ie(e, N), [N]), I = ce(() => A.filter((e) => e.enabled !== !1 && F(e.entityType)), [A, F]), L = ne(I.map((e) => e.entityType)), R = (e) => te(e, O, A), [z, B] = m(0), [V, H] = m(() => ({
71
- ...ae,
72
- templateId: M.get("templateId") ?? void 0
73
- })), U = p(!1), [W, ke] = m(!1), [G, K] = m(null), [Ae, q] = m(!1), J = p(null);
74
- f(() => {
75
- let e = M.get("templateId");
76
- if (!e || !j.length || J.current === e) return;
77
- let t = j.find((t) => t.id === e);
78
- t && (J.current = e, H((e) => o(e, t, F, !1)));
70
+ ...Oe ? ["WORKSPACE_ADMIN"] : [],
71
+ ...ke ? ["ORG_ADMIN"] : []
72
+ ], I = se((e) => !o(e) && !re(e, P), [P]), L = le(() => j.filter((e) => e.enabled !== !1 && I(e.entityType)), [j, I]), R = a(L.map((e) => e.entityType)), z = (e) => ne(e, k, j), [B, V] = m(0), [H, U] = m(() => ({
73
+ ...s,
74
+ templateId: N.get("templateId") ?? void 0
75
+ })), W = p(!1), [G, Ae] = m(!1), [K, q] = m(null), [je, J] = m(!1), Y = p(null);
76
+ ce(() => {
77
+ let e = N.get("templateId");
78
+ if (!e || !M.length || Y.current === e) return;
79
+ let t = M.find((t) => t.id === e);
80
+ t && (Y.current = e, U((e) => l(e, t, I, !1)));
79
81
  }, [
80
- F,
81
- M,
82
- j
82
+ I,
83
+ N,
84
+ M
83
85
  ]);
84
- let Y = new Set(V.entityTypes), X = (e) => H((t) => ({
86
+ let X = new Set(H.entityTypes), Z = (e) => U((t) => ({
85
87
  ...t,
86
88
  entityTypes: e
87
- })), je = (e) => X(Y.has(e) ? V.entityTypes.filter((t) => t !== e) : [...V.entityTypes, e]), Me = (e) => {
88
- let t = e.every((e) => Y.has(e)), n = new Set(e);
89
- X(t ? V.entityTypes.filter((e) => !n.has(e)) : [...V.entityTypes, ...e.filter((e) => !Y.has(e))]);
90
- }, Z = () => {
91
- let e = L.filter(({ entityTypes: e }) => e.every((e) => Y.has(e))), t = new Set(e.flatMap((e) => e.entityTypes)), n = V.entityTypes.filter((e) => !t.has(e)), r = e.length === 1 && n.length === 0 ? O(e[0].group.labelKey, e[0].group.label) : e.length === 0 && n.length === 1 ? R(n[0]) : O("export.create.name.myData", "My data");
92
- return se(r);
93
- }, Ne = () => {
94
- V.entityTypes.length === 0 ? K(O("export.create.errors.selectEntity", "Please select at least one entity type to export")) : (K(null), U.current || H((e) => ({
89
+ })), Me = (e) => Z(X.has(e) ? H.entityTypes.filter((t) => t !== e) : [...H.entityTypes, e]), Ne = (e) => {
90
+ let t = e.every((e) => X.has(e)), n = new Set(e);
91
+ Z(t ? H.entityTypes.filter((e) => !n.has(e)) : [...H.entityTypes, ...e.filter((e) => !X.has(e))]);
92
+ }, Pe = () => {
93
+ let e = R.filter(({ entityTypes: e }) => e.every((e) => X.has(e))), t = new Set(e.flatMap((e) => e.entityTypes)), n = H.entityTypes.filter((e) => !t.has(e)), r = e.length === 1 && n.length === 0 ? k(e[0].group.labelKey, e[0].group.label) : e.length === 0 && n.length === 1 ? z(n[0]) : k("export.create.name.myData", "My data");
94
+ return u(r);
95
+ }, Fe = () => {
96
+ H.entityTypes.length === 0 ? q(k("export.create.errors.selectEntity", "Please select at least one entity type to export")) : (q(null), W.current || U((e) => ({
95
97
  ...e,
96
- name: Z()
97
- })), B(1));
98
- }, Pe = async () => {
99
- if (!V.name.trim()) K(O("export.create.errors.exportNameRequired", "Please provide a name for this export"));
98
+ name: Pe()
99
+ })), V(1));
100
+ }, Ie = async () => {
101
+ if (!H.name.trim()) q(k("export.create.errors.exportNameRequired", "Please provide a name for this export"));
100
102
  else {
101
- K(null);
103
+ q(null);
102
104
  try {
103
- let e = await Ee(s(V, D));
104
- _?.(e?.id ? c(h, e.id) : h);
105
+ let e = await De(ie(H, O));
106
+ D?.(e?.id ? d(_, e.id) : _);
105
107
  } catch (e) {
106
108
  if (me(e)) {
107
- q(!0), K(O("export.create.errors.quotaReached", "You have reached your export limit for this month."));
109
+ J(!0), q(k("export.create.errors.quotaReached", "You have reached your export limit for this month."));
108
110
  return;
109
111
  }
110
- K(e instanceof Error ? e.message : O("export.create.errors.createFailed", "Failed to create export"));
112
+ q(e instanceof Error ? e.message : k("export.create.errors.createFailed", "Failed to create export"));
111
113
  }
112
114
  }
113
- }, Q = (e) => O(C[e].labelKey, C[e].label), $ = (e) => O(w[e][0], w[e][1]), Fe = V.entityTypes.map(R);
114
- return /* @__PURE__ */ y(a, {
115
- title: O("export.create.title", "New Export"),
115
+ }, Q = (e) => k(C[e].labelKey, C[e].label), $ = (e) => k(w[e][0], w[e][1]), Le = H.entityTypes.map(z);
116
+ return /* @__PURE__ */ y(te, {
117
+ title: k("export.create.title", "New Export"),
116
118
  icon: /* @__PURE__ */ v(g, { size: 24 }),
117
119
  maxWidth: "3xl",
118
120
  children: [
119
- /* @__PURE__ */ v(x, {
121
+ /* @__PURE__ */ v(Ee, {
120
122
  steps: [{
121
123
  key: "what",
122
- label: O("export.create.steps.what", "What do you want to download?")
124
+ label: k("export.create.steps.what", "What do you want to download?")
123
125
  }, {
124
126
  key: "review",
125
- label: O("export.create.steps.review", "Review")
127
+ label: k("export.create.steps.review", "Review")
126
128
  }],
127
- active: z,
129
+ active: B,
128
130
  onStepClick: (e) => {
129
- e === 0 && B(0);
131
+ e === 0 && V(0);
130
132
  }
131
133
  }),
132
- G && /* @__PURE__ */ v("p", {
134
+ K && /* @__PURE__ */ v("p", {
133
135
  role: "alert",
134
136
  className: "rounded-xl border border-border-default bg-status-error-bg-subtle p-4 text-sm text-status-error-text",
135
- children: G
137
+ children: K
136
138
  }),
137
- z === 0 && /* @__PURE__ */ y("section", {
139
+ B === 0 && /* @__PURE__ */ y("section", {
138
140
  "aria-labelledby": "new-download-what",
139
141
  className: "space-y-4",
140
142
  children: [/* @__PURE__ */ v("h2", {
141
143
  id: "new-download-what",
142
144
  className: "text-lg font-semibold",
143
- children: O("export.create.select.question", "What do you want to download?")
144
- }), I.length === 0 ? /* @__PURE__ */ v(we, {
145
+ children: k("export.create.select.question", "What do you want to download?")
146
+ }), L.length === 0 ? /* @__PURE__ */ v(we, {
145
147
  illustration: "empty-data",
146
- title: O("export.create.select.emptyTitle", "Nothing to export yet"),
147
- description: O("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."),
148
+ title: k("export.create.select.emptyTitle", "Nothing to export yet"),
149
+ description: k("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."),
148
150
  glassIllustration: "data-tables"
149
- }) : /* @__PURE__ */ y(he, { children: [L.length > 0 && /* @__PURE__ */ v("div", {
151
+ }) : /* @__PURE__ */ y(he, { children: [R.length > 0 && /* @__PURE__ */ v("div", {
150
152
  className: "grid grid-cols-1 gap-3 sm:grid-cols-2",
151
- children: L.map(({ group: e, entityTypes: t }) => {
152
- let n = t.filter((e) => Y.has(e)).length;
153
+ children: R.map(({ group: e, entityTypes: t }) => {
154
+ let n = t.filter((e) => X.has(e)).length;
153
155
  return /* @__PURE__ */ v(E, {
154
156
  checked: n === t.length || n > 0 && "mixed",
155
- onToggle: () => Me(t),
156
- title: O(e.labelKey, e.label),
157
- description: O(e.descriptionKey, e.description)
157
+ onToggle: () => Ne(t),
158
+ title: k(e.labelKey, e.label),
159
+ description: k(e.descriptionKey, e.description)
158
160
  }, e.id);
159
161
  })
160
162
  }), /* @__PURE__ */ y("div", {
@@ -163,31 +165,31 @@ function D() {
163
165
  type: "button",
164
166
  variant: "ghost",
165
167
  size: "sm",
166
- "aria-expanded": W || L.length === 0,
168
+ "aria-expanded": G || R.length === 0,
167
169
  "aria-controls": "new-download-all-types",
168
- onClick: () => ke(!W),
169
- hidden: L.length === 0,
170
- children: W ? O("export.create.select.hideAll", "Hide the full list") : O("export.create.select.showAll", "Show all data types")
170
+ onClick: () => Ae(!G),
171
+ hidden: R.length === 0,
172
+ children: G ? k("export.create.select.hideAll", "Hide the full list") : k("export.create.select.showAll", "Show all data types")
171
173
  }), /* @__PURE__ */ v("div", {
172
174
  id: "new-download-all-types",
173
- hidden: !W && L.length > 0,
175
+ hidden: !G && R.length > 0,
174
176
  className: "grid grid-cols-1 gap-2 sm:grid-cols-2 lg:grid-cols-3",
175
- children: I.map((e) => /* @__PURE__ */ v(E, {
176
- checked: Y.has(e.entityType),
177
- onToggle: () => je(e.entityType),
178
- title: R(e.entityType)
177
+ children: L.map((e) => /* @__PURE__ */ v(E, {
178
+ checked: X.has(e.entityType),
179
+ onToggle: () => Me(e.entityType),
180
+ title: z(e.entityType)
179
181
  }, e.entityType))
180
182
  })]
181
183
  })] })]
182
184
  }),
183
- z === 1 && /* @__PURE__ */ y("section", {
185
+ B === 1 && /* @__PURE__ */ y("section", {
184
186
  "aria-labelledby": "new-download-review",
185
187
  className: "space-y-4",
186
188
  children: [
187
189
  /* @__PURE__ */ v("h2", {
188
190
  id: "new-download-review",
189
191
  className: "sr-only",
190
- children: O("export.create.steps.review", "Review")
192
+ children: k("export.create.steps.review", "Review")
191
193
  }),
192
194
  /* @__PURE__ */ y("div", {
193
195
  className: "space-y-4 rounded-xl border border-border-subtle bg-bg-surface p-4 sm:p-6",
@@ -195,10 +197,10 @@ function D() {
195
197
  /* @__PURE__ */ v("p", {
196
198
  className: "text-sm text-text-primary",
197
199
  "data-testid": "new-download-summary",
198
- children: O("export.create.summary", "{{kinds}} · {{whose}} · {{format}}", {
199
- kinds: Fe.join(", "),
200
- whose: Q(V.scope),
201
- format: $(V.format)
200
+ children: k("export.create.summary", "{{kinds}} · {{whose}} · {{format}}", {
201
+ kinds: Le.join(", "),
202
+ whose: Q(H.scope),
203
+ format: $(H.format)
202
204
  })
203
205
  }),
204
206
  /* @__PURE__ */ y("div", {
@@ -207,7 +209,7 @@ function D() {
207
209
  htmlFor: "new-download-name",
208
210
  className: "block text-sm font-medium",
209
211
  children: [
210
- O("export.create.options.name", "Export Name"),
212
+ k("export.create.options.name", "Export Name"),
211
213
  " ",
212
214
  /* @__PURE__ */ v("span", {
213
215
  "aria-hidden": "true",
@@ -220,9 +222,9 @@ function D() {
220
222
  type: "text",
221
223
  required: !0,
222
224
  "aria-required": "true",
223
- value: V.name,
225
+ value: H.name,
224
226
  onChange: (e) => {
225
- U.current = !0, H((t) => ({
227
+ W.current = !0, U((t) => ({
226
228
  ...t,
227
229
  name: e.target.value
228
230
  }));
@@ -232,28 +234,28 @@ function D() {
232
234
  }),
233
235
  /* @__PURE__ */ v("p", {
234
236
  className: "text-sm text-text-secondary",
235
- children: O("export.create.zipNote", "You'll get a ZIP file.")
237
+ children: k("export.create.zipNote", "You'll get a ZIP file.")
236
238
  })
237
239
  ]
238
240
  }),
239
241
  /* @__PURE__ */ y(Te, {
240
242
  storageKey: "export.new.moreOptions",
241
243
  children: [
242
- P.length > 1 ? /* @__PURE__ */ y("fieldset", {
244
+ F.length > 1 ? /* @__PURE__ */ y("fieldset", {
243
245
  className: "space-y-2",
244
246
  children: [/* @__PURE__ */ v("legend", {
245
247
  className: "text-sm font-medium",
246
- children: O("export.create.options.scope", "Export Scope")
248
+ children: k("export.create.options.scope", "Export Scope")
247
249
  }), /* @__PURE__ */ v("div", {
248
250
  className: "grid grid-cols-1 gap-2 sm:grid-cols-3",
249
- children: P.map((e) => /* @__PURE__ */ y("label", {
250
- className: u("flex cursor-pointer items-start gap-2 rounded-lg border p-3 text-sm", V.scope === e ? "border-primary bg-action-primary-bg/5" : "border-border-subtle"),
251
+ children: F.map((e) => /* @__PURE__ */ y("label", {
252
+ className: f("flex cursor-pointer items-start gap-2 rounded-lg border p-3 text-sm", H.scope === e ? "border-primary bg-action-primary-bg/5" : "border-border-subtle"),
251
253
  children: [/* @__PURE__ */ v("input", {
252
254
  type: "radio",
253
255
  name: "new-download-scope",
254
256
  value: e,
255
- checked: V.scope === e,
256
- onChange: () => H((t) => ({
257
+ checked: H.scope === e,
258
+ onChange: () => U((t) => ({
257
259
  ...t,
258
260
  scope: e
259
261
  })),
@@ -263,7 +265,7 @@ function D() {
263
265
  children: Q(e)
264
266
  }), /* @__PURE__ */ v("span", {
265
267
  className: "block text-xs text-text-secondary",
266
- children: O(C[e].descKey, C[e].desc)
268
+ children: k(C[e].descKey, C[e].desc)
267
269
  })] })]
268
270
  }, e))
269
271
  })]
@@ -272,17 +274,17 @@ function D() {
272
274
  className: "space-y-2",
273
275
  children: [/* @__PURE__ */ v("legend", {
274
276
  className: "text-sm font-medium",
275
- children: O("export.create.options.outputFormat", "Output Format")
277
+ children: k("export.create.options.outputFormat", "Output Format")
276
278
  }), /* @__PURE__ */ v("div", {
277
279
  className: "grid grid-cols-1 gap-2 sm:grid-cols-2",
278
- children: oe.map((e) => /* @__PURE__ */ y("label", {
279
- className: u("flex cursor-pointer items-center gap-2 rounded-lg border p-3 text-sm", V.format === e ? "border-primary bg-action-primary-bg/5" : "border-border-subtle"),
280
+ children: c.map((e) => /* @__PURE__ */ y("label", {
281
+ className: f("flex cursor-pointer items-center gap-2 rounded-lg border p-3 text-sm", H.format === e ? "border-primary bg-action-primary-bg/5" : "border-border-subtle"),
280
282
  children: [/* @__PURE__ */ v("input", {
281
283
  type: "radio",
282
284
  name: "new-download-format",
283
285
  value: e,
284
- checked: V.format === e,
285
- onChange: () => H((t) => ({
286
+ checked: H.format === e,
287
+ onChange: () => U((t) => ({
286
288
  ...t,
287
289
  format: e
288
290
  }))
@@ -296,11 +298,11 @@ function D() {
296
298
  /* @__PURE__ */ y("legend", {
297
299
  className: "text-sm font-medium",
298
300
  children: [
299
- O("export.create.options.dateRange", "Date Range"),
301
+ k("export.create.options.dateRange", "Date Range"),
300
302
  " ",
301
303
  /* @__PURE__ */ v("span", {
302
304
  className: "font-normal text-text-secondary",
303
- children: O("export.create.shared.optional", "(optional)")
305
+ children: k("export.create.shared.optional", "(optional)")
304
306
  })
305
307
  ]
306
308
  }),
@@ -308,10 +310,10 @@ function D() {
308
310
  className: "grid grid-cols-1 gap-3 sm:grid-cols-2",
309
311
  children: [/* @__PURE__ */ y("label", {
310
312
  className: "space-y-1 text-xs text-text-secondary",
311
- children: [/* @__PURE__ */ v("span", { children: O("export.create.options.dateFrom", "From") }), /* @__PURE__ */ v("input", {
313
+ children: [/* @__PURE__ */ v("span", { children: k("export.create.options.dateFrom", "From") }), /* @__PURE__ */ v("input", {
312
314
  type: "date",
313
- value: V.dateFrom,
314
- onChange: (e) => H((t) => ({
315
+ value: H.dateFrom,
316
+ onChange: (e) => U((t) => ({
315
317
  ...t,
316
318
  dateFrom: e.target.value
317
319
  })),
@@ -319,11 +321,11 @@ function D() {
319
321
  })]
320
322
  }), /* @__PURE__ */ y("label", {
321
323
  className: "space-y-1 text-xs text-text-secondary",
322
- children: [/* @__PURE__ */ v("span", { children: O("export.create.options.dateTo", "To") }), /* @__PURE__ */ v("input", {
324
+ children: [/* @__PURE__ */ v("span", { children: k("export.create.options.dateTo", "To") }), /* @__PURE__ */ v("input", {
323
325
  type: "date",
324
- value: V.dateTo,
325
- min: V.dateFrom || void 0,
326
- onChange: (e) => H((t) => ({
326
+ value: H.dateTo,
327
+ min: H.dateFrom || void 0,
328
+ onChange: (e) => U((t) => ({
327
329
  ...t,
328
330
  dateTo: e.target.value
329
331
  })),
@@ -333,7 +335,7 @@ function D() {
333
335
  }),
334
336
  /* @__PURE__ */ v("p", {
335
337
  className: "text-xs text-text-secondary",
336
- children: O("export.create.options.dateRangeDescription", "Leave blank to export all data regardless of date.")
338
+ children: k("export.create.options.dateRangeDescription", "Leave blank to export all data regardless of date.")
337
339
  })
338
340
  ]
339
341
  }),
@@ -343,19 +345,19 @@ function D() {
343
345
  htmlFor: "new-download-setup",
344
346
  className: "block text-sm font-medium",
345
347
  children: [
346
- O("export.create.options.basedOnTemplate", "Based on Template"),
348
+ k("export.create.options.basedOnTemplate", "Based on Template"),
347
349
  " ",
348
350
  /* @__PURE__ */ v("span", {
349
351
  className: "font-normal text-text-secondary",
350
- children: O("export.create.shared.optional", "(optional)")
352
+ children: k("export.create.shared.optional", "(optional)")
351
353
  })
352
354
  ]
353
- }), j.length > 0 ? /* @__PURE__ */ y(S, {
355
+ }), M.length > 0 ? /* @__PURE__ */ y(x, {
354
356
  id: "new-download-setup",
355
- value: V.templateId ?? "",
357
+ value: H.templateId ?? "",
356
358
  onChange: (e) => {
357
- let t = j.find((t) => t.id === e.target.value);
358
- H((e) => t ? o(e, t, F, U.current) : {
359
+ let t = M.find((t) => t.id === e.target.value);
360
+ U((e) => t ? l(e, t, I, W.current) : {
359
361
  ...e,
360
362
  templateId: void 0
361
363
  });
@@ -363,24 +365,24 @@ function D() {
363
365
  className: T,
364
366
  children: [/* @__PURE__ */ v("option", {
365
367
  value: "",
366
- children: O("export.create.options.noTemplate", "No template")
367
- }), j.map((e) => /* @__PURE__ */ v("option", {
368
+ children: k("export.create.options.noTemplate", "No template")
369
+ }), M.map((e) => /* @__PURE__ */ v("option", {
368
370
  value: e.id,
369
371
  children: e.name
370
372
  }, e.id))]
371
373
  }) : /* @__PURE__ */ y("p", {
372
374
  className: "text-sm text-text-secondary",
373
375
  children: [
374
- O("export.create.options.noTemplates", "No templates yet."),
376
+ k("export.create.options.noTemplates", "No templates yet."),
375
377
  " ",
376
378
  /* @__PURE__ */ v("button", {
377
379
  type: "button",
378
- onClick: () => _?.(c(h, "templates")),
380
+ onClick: () => D?.(d(_, "templates")),
379
381
  className: "text-primary underline-offset-2 hover:underline",
380
- children: O("export.create.options.createTemplateLink", "Create one")
382
+ children: k("export.create.options.createTemplateLink", "Create one")
381
383
  }),
382
384
  " ",
383
- O("export.create.options.reuseTemplateHint", "to reuse export configurations.")
385
+ k("export.create.options.reuseTemplateHint", "to reuse export configurations.")
384
386
  ]
385
387
  })]
386
388
  })
@@ -394,43 +396,45 @@ function D() {
394
396
  /* @__PURE__ */ v(b, {
395
397
  type: "button",
396
398
  variant: "outline",
397
- onClick: () => _?.(h),
398
- children: O("export.create.actions.cancel", "Cancel")
399
+ onClick: () => D?.(_),
400
+ children: k("export.create.actions.cancel", "Cancel")
399
401
  }),
400
- z === 1 && /* @__PURE__ */ v(b, {
402
+ B === 1 && /* @__PURE__ */ v(b, {
401
403
  type: "button",
402
404
  variant: "outline",
403
- onClick: () => B(0),
404
- children: O("export.create.actions.back", "Back")
405
+ onClick: () => V(0),
406
+ children: k("export.create.actions.back", "Back")
405
407
  }),
406
- z === 0 ? /* @__PURE__ */ y(b, {
408
+ B === 0 ? /* @__PURE__ */ y(b, {
407
409
  type: "button",
408
- onClick: Ne,
409
- children: [O("export.create.actions.next", "Next"), /* @__PURE__ */ v(le, {
410
+ onClick: Fe,
411
+ children: [k("export.create.actions.next", "Next"), /* @__PURE__ */ v(ue, {
410
412
  size: 16,
411
413
  "aria-hidden": "true"
412
414
  })]
413
415
  }) : /* @__PURE__ */ y(b, {
416
+ busy: h && A,
414
417
  type: "button",
415
- onClick: () => void Pe(),
416
- disabled: k,
417
- children: [k ? /* @__PURE__ */ v(ue, {
418
+ onClick: () => void Ie(),
419
+ disabled: !h && A,
420
+ children: [!h && A ? /* @__PURE__ */ v(oe, {
421
+ tone: "current",
418
422
  size: 16,
419
423
  className: "animate-spin",
420
424
  "aria-hidden": "true"
421
425
  }) : /* @__PURE__ */ v(g, {
422
426
  size: 16,
423
427
  "aria-hidden": "true"
424
- }), O("export.create.actions.startExport", "Start Export")]
428
+ }), k("export.create.actions.startExport", "Start Export")]
425
429
  })
426
430
  ]
427
431
  }),
428
432
  /* @__PURE__ */ v(ge, {
429
- open: Ae,
430
- onOpenChange: q,
431
- children: /* @__PURE__ */ y(ye, { children: [/* @__PURE__ */ y(Se, { children: [/* @__PURE__ */ v(Ce, { children: O("export.create.quotaDialog.title", "Export Limit Reached") }), /* @__PURE__ */ v(be, { children: O("export.create.quotaDialog.description", "You have reached your export limit for this month.") })] }), /* @__PURE__ */ y(xe, { children: [/* @__PURE__ */ v(ve, { children: O("export.create.quotaDialog.dismiss", "Dismiss") }), /* @__PURE__ */ v(_e, {
432
- onClick: () => l(_),
433
- children: O("export.create.quotaDialog.viewBilling", "View Billing")
433
+ open: je,
434
+ onOpenChange: J,
435
+ children: /* @__PURE__ */ y(ye, { children: [/* @__PURE__ */ y(Se, { children: [/* @__PURE__ */ v(Ce, { children: k("export.create.quotaDialog.title", "Export Limit Reached") }), /* @__PURE__ */ v(be, { children: k("export.create.quotaDialog.description", "You have reached your export limit for this month.") })] }), /* @__PURE__ */ y(xe, { children: [/* @__PURE__ */ v(ve, { children: k("export.create.quotaDialog.dismiss", "Dismiss") }), /* @__PURE__ */ v(_e, {
436
+ onClick: () => ae(D),
437
+ children: k("export.create.quotaDialog.viewBilling", "View Billing")
434
438
  })] })] })
435
439
  })
436
440
  ]