@burdenoff/microfe-export 2026.1108.1 → 2026.1113.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 (65) hide show
  1. package/dist/export/ExportRoot.js +45 -40
  2. package/dist/export/ExportRoot.js.map +1 -1
  3. package/dist/export/ExportRoutes.d.ts +7 -0
  4. package/dist/export/ExportRoutes.js +70 -51
  5. package/dist/export/ExportRoutes.js.map +1 -1
  6. package/dist/export/components/ConfirmDestructiveDialog.d.ts +21 -0
  7. package/dist/export/components/ConfirmDestructiveDialog.js +37 -0
  8. package/dist/export/components/ConfirmDestructiveDialog.js.map +1 -0
  9. package/dist/export/components/DownloadSections.d.ts +10 -0
  10. package/dist/export/components/DownloadSections.js +161 -0
  11. package/dist/export/components/DownloadSections.js.map +1 -0
  12. package/dist/export/components/DownloadStatus.d.ts +13 -0
  13. package/dist/export/components/DownloadStatus.js +36 -0
  14. package/dist/export/components/DownloadStatus.js.map +1 -0
  15. package/dist/export/components/DownloadsTabs.d.ts +5 -0
  16. package/dist/export/components/DownloadsTabs.js +25 -0
  17. package/dist/export/components/DownloadsTabs.js.map +1 -0
  18. package/dist/export/hooks/useEntityLabel.d.ts +7 -0
  19. package/dist/export/hooks/useEntityLabel.js +16 -0
  20. package/dist/export/hooks/useEntityLabel.js.map +1 -0
  21. package/dist/export/hooks/useExportQueries.d.ts +3 -1
  22. package/dist/export/hooks/useExportQueries.js +23 -23
  23. package/dist/export/hooks/useExportQueries.js.map +1 -1
  24. package/dist/export/navigation-v2/NavigationV2.d.ts +7 -0
  25. package/dist/export/navigation-v2/NavigationV2.js +16 -0
  26. package/dist/export/navigation-v2/NavigationV2.js.map +1 -0
  27. package/dist/export/pages/CreateExportPage.js +123 -121
  28. package/dist/export/pages/CreateExportPage.js.map +1 -1
  29. package/dist/export/pages/ExportDetailPage.js +131 -124
  30. package/dist/export/pages/ExportDetailPage.js.map +1 -1
  31. package/dist/export/pages/ExportHistoryPage.js +61 -57
  32. package/dist/export/pages/ExportHistoryPage.js.map +1 -1
  33. package/dist/export/pages/ExportTemplatesPage.js +214 -182
  34. package/dist/export/pages/ExportTemplatesPage.js.map +1 -1
  35. package/dist/export/pages/TemplateDetailPage.js +141 -119
  36. package/dist/export/pages/TemplateDetailPage.js.map +1 -1
  37. package/dist/export/pages/v2/DownloadDetailPage.d.ts +8 -0
  38. package/dist/export/pages/v2/DownloadDetailPage.js +176 -0
  39. package/dist/export/pages/v2/DownloadDetailPage.js.map +1 -0
  40. package/dist/export/pages/v2/DownloadsPage.d.ts +10 -0
  41. package/dist/export/pages/v2/DownloadsPage.js +401 -0
  42. package/dist/export/pages/v2/DownloadsPage.js.map +1 -0
  43. package/dist/export/pages/v2/NewDownloadPage.d.ts +8 -0
  44. package/dist/export/pages/v2/NewDownloadPage.js +440 -0
  45. package/dist/export/pages/v2/NewDownloadPage.js.map +1 -0
  46. package/dist/export/types/index.d.ts +7 -0
  47. package/dist/export/utils/billing.d.ts +6 -0
  48. package/dist/export/utils/billing.js +7 -0
  49. package/dist/export/utils/billing.js.map +1 -0
  50. package/dist/export/utils/downloadStatus.d.ts +15 -0
  51. package/dist/export/utils/downloadStatus.js +48 -0
  52. package/dist/export/utils/downloadStatus.js.map +1 -0
  53. package/dist/export/utils/entityLabels.d.ts +47 -0
  54. package/dist/export/utils/entityLabels.js +150 -0
  55. package/dist/export/utils/entityLabels.js.map +1 -0
  56. package/dist/export/utils/formatBytes.d.ts +2 -0
  57. package/dist/export/utils/formatBytes.js +15 -0
  58. package/dist/export/utils/formatBytes.js.map +1 -0
  59. package/dist/export/utils/newDownloadForm.d.ts +32 -0
  60. package/dist/export/utils/newDownloadForm.js +42 -0
  61. package/dist/export/utils/newDownloadForm.js.map +1 -0
  62. package/dist/export/utils/paths.d.ts +2 -0
  63. package/dist/export/utils/paths.js +7 -0
  64. package/dist/export/utils/paths.js.map +1 -0
  65. package/package.json +2 -2
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NavigationV2.js","names":["NavigationV2Context","createContext","NavigationV2Provider","enabled","useNavigationV2","useContext"],"sources":["../../../src/export/navigation-v2/NavigationV2.tsx"],"sourcesContent":["import { createContext, useContext, type ReactNode } from \"react\";\n\n/**\n * FluidGrids' Navigation v2 variant of the export module (BOFF-11870).\n *\n * `@burdenoff/microfe-export` is mounted by many Burdenoff apps. Only\n * fluidgrids-app passes `navigationV2` on `ExportRoot`; every other app keeps\n * the module exactly as it was. Pages read the switch with\n * {@link useNavigationV2}.\n */\nconst NavigationV2Context = createContext(false);\n\nexport function NavigationV2Provider({\n enabled,\n children,\n}: {\n enabled: boolean;\n children: ReactNode;\n}) {\n return (\n <NavigationV2Context.Provider value={enabled}>\n {children}\n </NavigationV2Context.Provider>\n );\n}\n\n/** True only inside an app that opted in with `navigationV2`. */\nexport function useNavigationV2(): boolean {\n return useContext(NavigationV2Context);\n}\n"],"mappings":";;;AAUA,IAAMA,IAAsBC,EAAc,EAAK;AAE/C,SAAgBC,EAAqB,EACnC,YACA,eAIC;CACD,OACE,kBAACF,EAAoB,UAArB;EAA8B,OAAOG;EAClC;CAC2B,CAAA;AAElC;AAGA,SAAgBC,IAA2B;CACzC,OAAOC,EAAWL,CAAmB;AACvC"}
@@ -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 { isExportEntityDisabled as s, isForeignProductEntity as c } from "../utils/disabledModules.js";
8
- import { useCallback as ne, useEffect as re, useRef as ie, useState as l } from "react";
9
- import { ArrowLeft as ae, ArrowRight as u, Building2 as d, CalendarRange as oe, CheckCircle2 as f, Download as p, FileJson as m, FileSpreadsheet as h, Loader2 as g, Lock as _, Package as v, User as y, Users as b } from "lucide-react";
10
- import { useAppShell as se, usePermission as ce } from "@burdenoff/fe-libs/shared/providers/shell";
11
- import { useSearchParams as le } from "react-router";
12
- import { isQuotaExhaustedError as ue } from "@burdenoff/fe-libs/shared/utils";
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 de, AlertDialogAction as fe, AlertDialogCancel as pe, AlertDialogContent as me, AlertDialogDescription as he, AlertDialogFooter as ge, AlertDialogHeader as _e, AlertDialogTitle as ve, EmphasisPanel as ye, IllustratedEmptyState as be, PagePurpose as xe, ShowMore as Se } from "@burdenoff/fe-libs/ui";
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"], Ce = {
17
- CSV: h,
18
- JSON: m
19
- }, w = {
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: d
24
+ ORG_ADMIN: m
23
25
  };
24
- function T() {
25
- let { basePath: d = "/", navigate: m, organizationId: h } = e(), y = te(), { createJob: b, isPending: T } = n(), { data: E } = t(), { data: D } = r(), [O] = le(), { productSlug: k } = se(), A = ne((e) => !s(e) && !c(e, k), [k]), we = ce("export:workspace_admin"), Te = i(h), [j, M] = l("entities"), [N, P] = l([]), [F, I] = l(""), [L, R] = l("CSV"), [z, Ee] = l("INDIVIDUAL"), [B, V] = l(O.get("templateId") ?? void 0), [H, De] = l(""), [U, Oe] = l(""), [W, G] = l(null), [ke, K] = l(!1), q = ie(null);
26
- re(() => {
27
- let e = O.get("templateId");
28
- if (!e || !D?.length || q.current === e) return;
29
- let t = D.find((t) => t.id === e);
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
- q.current = e, V(t.id), P((t.entityTypes ?? []).filter(A));
33
+ K.current = e, B(t.id), N((t.entityTypes ?? []).filter(k));
32
34
  let n = t.format?.toUpperCase();
33
- n && C.includes(n) && R(n), t.name && I(t.name);
35
+ n && C.includes(n) && L(n), t.name && F(t.name);
34
36
  }, [
35
- A,
36
- O,
37
- D
37
+ k,
38
+ D,
39
+ E
38
40
  ]);
39
- let Ae = () => {
40
- j === "options" ? M("entities") : j === "review" ? M("options") : m?.(d);
41
- }, je = () => {
42
- if (j === "entities") {
43
- if (N.length === 0) {
44
- G(y("export.create.errors.selectEntity", "Please select at least one entity type to export"));
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
- G(null), M("options");
48
- } else if (j === "options") {
49
- if (!F.trim()) {
50
- G(y("export.create.errors.exportNameRequired", "Please provide a name for this export"));
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
- G(null), M("review");
55
+ W(null), j("review");
54
56
  }
55
- }, Me = async () => {
57
+ }, Pe = async () => {
56
58
  try {
57
- G(null), await b({
58
- name: F,
59
- entityTypes: N,
60
- format: L,
61
- exportScope: z,
62
- organizationId: z === "ORG_ADMIN" ? h : void 0,
63
- templateId: B,
64
- dateRangeStart: H ? new Date(H).toISOString() : null,
65
- dateRangeEnd: U ? new Date(U).toISOString() : null
66
- }), m?.(d);
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 (ue(e)) {
69
- K(!0), G(y("export.create.errors.quotaReached", "You have reached your export limit for this month."));
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
- G(e instanceof Error ? e.message : y("export.create.errors.createFailed", "Failed to create export"));
74
+ W(e instanceof Error ? e.message : y("export.create.errors.createFailed", "Failed to create export"));
73
75
  }
74
- }, Ne = (e) => {
75
- A(e) && P((t) => t.includes(e) ? t.filter((t) => t !== e) : [...t, e]);
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
- }, Pe = (e) => {
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 = E.filter((e) => e.enabled !== !1 && !c(e.entityType, k)), Z = X.filter((e) => !s(e.entityType)), Q = X.filter((e) => s(e.entityType)), $ = (e, t) => {
124
- let n = !t && N.includes(e.entityType);
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: () => Ne(e.entityType),
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(f, {
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: () => m?.(d),
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(ae, { size: 20 })
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(p, {
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(xe, {
186
- icon: /* @__PURE__ */ x(p, { size: 16 }),
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(u, {
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", j === 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"),
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
- W && /* @__PURE__ */ x("div", {
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: W
216
+ children: U
215
217
  }),
216
- j === "entities" && /* @__PURE__ */ S("div", {
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(be, {
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
- j === "options" && /* @__PURE__ */ x("div", {
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" && !we || e === "ORG_ADMIN" && !Te, n = w[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");
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 && Ee(e),
280
+ onClick: () => !t && ke(e),
279
281
  disabled: t,
280
- className: o("text-left border-2 rounded-xl p-4 transition-all duration-200", z === 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"),
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: z === e ? "text-primary" : t ? "text-text-secondary/50" : "text-text-secondary"
290
+ className: R === e ? "text-primary" : t ? "text-text-secondary/50" : "text-text-secondary"
289
291
  }),
290
- z === e && /* @__PURE__ */ x(f, {
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: Pe(e)
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: F,
328
- onChange: (e) => I(e.target.value),
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 = Ce[e];
340
+ let t = Te[e];
339
341
  return /* @__PURE__ */ S("button", {
340
342
  type: "button",
341
- onClick: () => R(e),
342
- className: o("flex items-center gap-3 border-2 rounded-lg p-3 transition-all duration-200", L === e ? "border-primary bg-action-primary-bg/5" : "border-border-subtle/50 hover:border-primary/30"),
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: L === e ? "text-primary" : "text-text-secondary"
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(v, {
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(Se, {
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(oe, { size: 15 }),
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: H,
408
- onChange: (e) => De(e.target.value),
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: U,
419
- min: H,
420
- onChange: (e) => Oe(e.target.value),
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
- }), D.length > 0 ? /* @__PURE__ */ S("select", {
439
- value: B ?? "",
440
- onChange: (e) => V(e.target.value || void 0),
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
- }), D.map((e) => /* @__PURE__ */ x("option", {
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: () => m?.(d + "/templates"),
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
- j === "review" && /* @__PURE__ */ x("div", {
471
+ A === "review" && /* @__PURE__ */ x("div", {
470
472
  className: "space-y-6",
471
- children: /* @__PURE__ */ S(ye, {
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(f, {
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: F
486
+ value: P
485
487
  },
486
488
  {
487
489
  label: y("export.create.review.fields.scope", "Scope"),
488
- value: J(z)
490
+ value: J(R)
489
491
  },
490
492
  {
491
493
  label: y("export.create.review.fields.entityTypes", "Entity Types"),
492
- value: N.join(", ")
494
+ value: M.join(", ")
493
495
  },
494
496
  {
495
497
  label: y("export.create.review.fields.format", "Format"),
496
- value: a(L)
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
- ...H || U ? [{
504
+ ...V || H ? [{
503
505
  label: y("export.create.review.fields.dateRange", "Date Range"),
504
- value: [H || "—", U || "—"].join(" → ")
506
+ value: [V || "—", H || "—"].join(" → ")
505
507
  }] : [],
506
- ...B ? [{
508
+ ...z ? [{
507
509
  label: y("export.create.review.fields.template", "Template"),
508
- value: D.find((e) => e.id === B)?.name ?? B
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: Ae,
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: j === "entities" ? y("export.create.actions.cancel", "Cancel") : y("export.create.actions.back", "Back")
530
- }), j === "review" ? /* @__PURE__ */ S("button", {
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: Me,
533
- disabled: T,
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: [T ? /* @__PURE__ */ x(g, {
537
+ children: [w ? /* @__PURE__ */ x(oe, {
536
538
  size: 18,
537
539
  className: "animate-spin"
538
- }) : /* @__PURE__ */ x(p, { size: 18 }), y("export.create.actions.startExport", "Start Export")]
540
+ }) : /* @__PURE__ */ x(g, { size: 18 }), y("export.create.actions.startExport", "Start Export")]
539
541
  }) : /* @__PURE__ */ S("button", {
540
542
  type: "button",
541
- onClick: je,
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(u, { size: 18 })]
545
+ children: [y("export.create.actions.next", "Next"), /* @__PURE__ */ x(p, { size: 18 })]
544
546
  })]
545
547
  }),
546
- /* @__PURE__ */ x(de, {
547
- open: ke,
548
- onOpenChange: K,
549
- children: /* @__PURE__ */ S(me, { children: [/* @__PURE__ */ S(_e, { children: [/* @__PURE__ */ x(ve, { children: y("export.create.quotaDialog.title", "Export Limit Reached") }), /* @__PURE__ */ x(he, { children: y("export.create.quotaDialog.description", "You have reached your export limit for this month.") })] }), /* @__PURE__ */ S(ge, { children: [/* @__PURE__ */ x(pe, { children: y("export.create.quotaDialog.dismiss", "Dismiss") }), /* @__PURE__ */ x(fe, {
550
- onClick: () => window.location.assign("/billing"),
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 { T as CreateExportPage };
559
+ export { w as CreateExportPage };
558
560
 
559
561
  //# sourceMappingURL=CreateExportPage.js.map