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