@burdenoff/microfe-export 2026.1108.1 → 2026.1113.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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 +7 -1
  22. package/dist/export/hooks/useExportQueries.js +40 -36
  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
@@ -1,344 +1,376 @@
1
1
  import { useExport as e } from "../providers/ExportProvider.js";
2
- import { useAvailableEntities as t, useCreateExportTemplate as n, useDeleteExportTemplate as r, useExportTemplates as i } from "../hooks/useExportQueries.js";
3
- import { PageLayout as a } from "../components/PageLayout.js";
4
- import { getFormatDisplayName as o } from "../constants/enums.js";
5
- import { useTr as s } from "../hooks/useTr.js";
6
- import { cn as c } from "../utils/cn.js";
7
- import { nativeImpact as ee, nativeNotify as l } from "../../utils/nativeBridge.js";
8
- import { useMemo as u, useState as d } from "react";
9
- import { ChevronRight as te, FileBox as f, Loader2 as p, Plus as m, Search as h, Sparkles as g, X as _ } from "lucide-react";
10
- import { jsx as v, jsxs as y } from "react/jsx-runtime";
11
- import { CTAOverflowMenu as b, IllustratedEmptyState as x, PagePurpose as S } from "@burdenoff/fe-libs/ui";
2
+ import { useAvailableEntities as t, useCreateExportTemplate as ee, useDeleteExportTemplate as te, useExportTemplates as ne } from "../hooks/useExportQueries.js";
3
+ import { PageLayout as re } from "../components/PageLayout.js";
4
+ import { DownloadsTabs as n } from "../components/DownloadsTabs.js";
5
+ import { ConfirmDestructiveDialog as ie } from "../components/ConfirmDestructiveDialog.js";
6
+ import { useNavigationV2 as r } from "../navigation-v2/NavigationV2.js";
7
+ import { useEntityLabel as ae } from "../hooks/useEntityLabel.js";
8
+ import { isExportEntityDisabled as oe, isForeignProductEntity as se } from "../utils/disabledModules.js";
9
+ import { getFormatDisplayName as ce } from "../constants/enums.js";
10
+ import { useTr as i } from "../hooks/useTr.js";
11
+ import { cn as a } from "../utils/cn.js";
12
+ import { nativeImpact as o, nativeNotify as s } from "../../utils/nativeBridge.js";
13
+ import { useMemo as c, useState as l } from "react";
14
+ import { ChevronRight as le, FileBox as u, Loader2 as ue, Plus as d, Search as de, Sparkles as fe, X as f } from "lucide-react";
15
+ import { useAppShell as p } from "@burdenoff/fe-libs/shared/providers/shell";
16
+ import { jsx as m, jsxs as h } from "react/jsx-runtime";
17
+ import { CTAOverflowMenu as pe, IllustratedEmptyState as me, PagePurpose as g } from "@burdenoff/fe-libs/ui";
12
18
  // src/export/pages/ExportTemplatesPage.tsx
13
- var C = (e, t) => (e.endsWith("/") ? e.slice(0, -1) : e) + (t.startsWith("/") ? t : `/${t}`);
14
- function w() {
15
- let { basePath: w = "/", navigate: T } = e(), E = s(), { data: D, isLoading: O } = i(), { deleteTemplate: k } = r(), { createTemplate: A, isPending: j } = n(), { data: M } = t(), [N, P] = d(""), [F, I] = d(!1), [L, R] = d(""), [z, B] = d(""), [V, H] = d([]), [U, W] = d("CSV"), [G, K] = d(null), [q, J] = d(null), Y = () => {
16
- R(""), B(""), H([]), W("CSV"), K(null), I(!0);
17
- }, X = async () => {
18
- if (!L.trim()) K(E("export.templates.form.errors.nameRequired", "Template name is required."));
19
- else if (V.length === 0) K(E("export.templates.form.errors.entityRequired", "Select at least one entity type."));
19
+ var _ = (e, t) => (e.endsWith("/") ? e.slice(0, -1) : e) + (t.startsWith("/") ? t : `/${t}`);
20
+ function v() {
21
+ let { basePath: v = "/", navigate: y } = e(), b = i(), { data: x, isLoading: S } = ne(), { deleteTemplate: he } = te(), { createTemplate: ge, isPending: C } = ee(), { data: _e } = t(), w = r(), T = ae(w), { productSlug: E } = p(), D = _e.filter((e) => e.enabled !== !1 && !oe(e.entityType) && !se(e.entityType, E)), [O, k] = l(null), [A, j] = l(!1), [M, N] = l(""), [P, F] = l(!1), [I, L] = l(""), [R, z] = l(""), [B, V] = l([]), [H, U] = l("CSV"), [W, G] = l(null), [K, q] = l(null), J = () => {
22
+ L(""), z(""), V([]), U("CSV"), G(null), F(!0);
23
+ }, Y = async () => {
24
+ if (!I.trim()) G(b("export.templates.form.errors.nameRequired", "Template name is required."));
25
+ else if (B.length === 0) G(b("export.templates.form.errors.entityRequired", "Select at least one entity type."));
20
26
  else {
21
- K(null);
27
+ G(null);
22
28
  try {
23
- await A({
24
- name: L.trim(),
25
- description: z.trim() || void 0,
26
- entityTypes: V,
27
- format: U
28
- }), I(!1);
29
+ await ge({
30
+ name: I.trim(),
31
+ description: R.trim() || void 0,
32
+ entityTypes: B,
33
+ format: H
34
+ }), F(!1);
29
35
  } catch (e) {
30
- K(e instanceof Error ? e.message : E("export.templates.form.errors.createFailed", "Failed to create template."));
36
+ G(e instanceof Error ? e.message : b("export.templates.form.errors.createFailed", "Failed to create template."));
31
37
  }
32
38
  }
33
- }, Z = (e) => {
34
- H((t) => t.includes(e) ? t.filter((t) => t !== e) : [...t, e]);
35
- }, Q = u(() => {
36
- if (!N) return D;
37
- let e = N.toLowerCase();
38
- return D.filter((t) => t.name.toLowerCase().includes(e) || t.entityTypes.some((t) => t.toLowerCase().includes(e)));
39
- }, [D, N]), $ = (e) => {
40
- T?.(C(w, `templates/${e}`));
41
- }, ne = async (e, t) => {
42
- e.stopPropagation(), ee("medium"), J(t);
43
- }, re = async () => {
44
- if (q) {
39
+ }, ve = (e) => {
40
+ V((t) => t.includes(e) ? t.filter((t) => t !== e) : [...t, e]);
41
+ }, X = c(() => {
42
+ if (!M) return x;
43
+ let e = M.toLowerCase();
44
+ return x.filter((t) => t.name.toLowerCase().includes(e) || t.entityTypes.some((t) => t.toLowerCase().includes(e) || T(t).toLowerCase().includes(e)));
45
+ }, [
46
+ x,
47
+ M,
48
+ T
49
+ ]), Z = (e) => {
50
+ y?.(_(v, `templates/${e}`));
51
+ }, ye = async (e, t) => {
52
+ e.stopPropagation(), o("medium"), q(t);
53
+ }, Q = () => {
54
+ q(null), k(null);
55
+ }, $ = async () => {
56
+ if (K) {
57
+ k(null), j(!0);
45
58
  try {
46
- await k(q), l("success");
47
- } catch {
48
- l("error");
59
+ await he(K), s("success"), q(null);
60
+ } catch (e) {
61
+ s("error"), k(e instanceof Error && e.message ? e.message : b("export.templates.delete.failed", "Couldn't delete this template. Try again."));
62
+ } finally {
63
+ j(!1);
49
64
  }
50
- J(null);
51
65
  }
52
- };
53
- return /* @__PURE__ */ y(a, {
54
- title: E("export.templates.title", "Export Templates"),
55
- subtitle: E("export.templates.subtitle", "Reusable export configurations for common data exports"),
56
- icon: /* @__PURE__ */ v(f, { size: 24 }),
57
- headerActions: /* @__PURE__ */ v(b, {
66
+ }, be = x.find((e) => e.id === K)?.name ?? "";
67
+ return /* @__PURE__ */ h(re, {
68
+ title: b("export.templates.title", "Export Templates"),
69
+ subtitle: b("export.templates.subtitle", "Reusable export configurations for common data exports"),
70
+ icon: /* @__PURE__ */ m(u, { size: 24 }),
71
+ headerActions: /* @__PURE__ */ m(pe, {
58
72
  primary: {
59
- label: E("export.templates.actions.newTemplate", "New Template"),
60
- icon: /* @__PURE__ */ v(m, { size: 16 }),
61
- onSelect: Y
73
+ label: b("export.templates.actions.newTemplate", "New Template"),
74
+ icon: /* @__PURE__ */ m(d, { size: 16 }),
75
+ onSelect: J
62
76
  },
63
77
  actions: [{
64
- label: E("export.templates.actions.newExport", "New Export"),
65
- icon: /* @__PURE__ */ v(m, { size: 16 }),
66
- onSelect: () => T?.(C(w, "new"))
78
+ label: b("export.templates.actions.newExport", "New Export"),
79
+ icon: /* @__PURE__ */ m(d, { size: 16 }),
80
+ onSelect: () => y?.(_(v, "new"))
67
81
  }]
68
82
  }),
69
- headerContent: /* @__PURE__ */ y("span", {
83
+ headerContent: /* @__PURE__ */ h("span", {
70
84
  className: "inline-flex items-center gap-1.5 px-2.5 py-0.5 rounded-full text-xs font-medium bg-bg-sunken text-text-secondary",
71
- children: [/* @__PURE__ */ v(g, { size: 12 }), E("export.templates.summary.available", "{{count}} template{{suffix}} available", {
72
- count: Q.length,
73
- suffix: Q.length === 1 ? "" : "s"
85
+ children: [/* @__PURE__ */ m(fe, { size: 12 }), w ? X.length === 1 ? b("export.templates.summary.one", "1 setup") : b("export.templates.summary.other", "{{count}} setups", { count: X.length }) : b("export.templates.summary.available", "{{count}} template{{suffix}} available", {
86
+ count: X.length,
87
+ suffix: X.length === 1 ? "" : "s"
74
88
  })]
75
89
  }),
76
90
  children: [
77
- /* @__PURE__ */ v(S, {
78
- icon: /* @__PURE__ */ v(f, { size: 16 }),
79
- children: E("export.templates.purpose", "Templates save an export setup — the entity types and format you regularly need — so you don't rebuild it each time. Create one here, then start a new export from it in a single click. Handy for recurring backups, periodic audits, or any export you run more than once.")
91
+ w && /* @__PURE__ */ m(n, {}),
92
+ /* @__PURE__ */ m(g, {
93
+ icon: /* @__PURE__ */ m(u, { size: 16 }),
94
+ children: b("export.templates.purpose", "Templates save an export setup — the entity types and format you regularly need — so you don't rebuild it each time. Create one here, then start a new export from it in a single click. Handy for recurring backups, periodic audits, or any export you run more than once.")
80
95
  }),
81
- F && /* @__PURE__ */ y("div", {
96
+ P && /* @__PURE__ */ h("div", {
82
97
  className: "border border-primary/30 rounded-xl p-6 bg-accent-wash space-y-4",
83
98
  children: [
84
- /* @__PURE__ */ y("div", {
99
+ /* @__PURE__ */ h("div", {
85
100
  className: "flex items-center justify-between",
86
- children: [/* @__PURE__ */ v("h3", {
101
+ children: [/* @__PURE__ */ m("h3", {
87
102
  className: "font-semibold text-lg",
88
- children: E("export.templates.form.title", "New Template")
89
- }), /* @__PURE__ */ v("button", {
103
+ children: b("export.templates.form.title", "New Template")
104
+ }), /* @__PURE__ */ m("button", {
90
105
  type: "button",
91
- onClick: () => I(!1),
106
+ onClick: () => F(!1),
92
107
  className: "p-1.5 rounded-md hover:bg-accent",
93
- children: /* @__PURE__ */ v(_, { size: 16 })
108
+ children: /* @__PURE__ */ m(f, { size: 16 })
94
109
  })]
95
110
  }),
96
- G && /* @__PURE__ */ v("p", {
111
+ W && /* @__PURE__ */ m("p", {
97
112
  className: "text-sm text-status-error-text bg-status-error-bg/10 rounded-lg px-3 py-2",
98
- children: G
113
+ children: W
99
114
  }),
100
- /* @__PURE__ */ y("div", {
115
+ /* @__PURE__ */ h("div", {
101
116
  className: "grid grid-cols-1 sm:grid-cols-2 gap-4",
102
- children: [/* @__PURE__ */ y("div", {
117
+ children: [/* @__PURE__ */ h("div", {
103
118
  className: "space-y-1",
104
- children: [/* @__PURE__ */ y("label", {
119
+ children: [/* @__PURE__ */ h("label", {
105
120
  className: "text-sm font-medium",
106
- children: [E("export.templates.form.fields.name", "Name"), " *"]
107
- }), /* @__PURE__ */ v("input", {
121
+ children: [b("export.templates.form.fields.name", "Name"), " *"]
122
+ }), /* @__PURE__ */ m("input", {
108
123
  type: "text",
109
- "aria-label": E("export.templates.form.fields.name", "Name"),
110
- placeholder: E("export.templates.form.fields.namePlaceholder", "e.g. Weekly Tags Export"),
111
- value: L,
112
- onChange: (e) => R(e.target.value),
124
+ "aria-label": b("export.templates.form.fields.name", "Name"),
125
+ placeholder: b("export.templates.form.fields.namePlaceholder", "e.g. Weekly Tags Export"),
126
+ value: I,
127
+ onChange: (e) => L(e.target.value),
113
128
  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 transition-all"
114
129
  })]
115
- }), /* @__PURE__ */ y("div", {
130
+ }), /* @__PURE__ */ h("div", {
116
131
  className: "space-y-1",
117
- children: [/* @__PURE__ */ y("label", {
132
+ children: [/* @__PURE__ */ h("label", {
118
133
  className: "text-sm font-medium",
119
- children: [E("export.templates.form.fields.format", "Format"), " *"]
120
- }), /* @__PURE__ */ y("select", {
121
- value: U,
122
- onChange: (e) => W(e.target.value),
134
+ children: [b("export.templates.form.fields.format", "Format"), " *"]
135
+ }), /* @__PURE__ */ h("select", {
136
+ value: H,
137
+ onChange: (e) => U(e.target.value),
123
138
  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 transition-all scheme-normal dark:scheme-dark [&_option]:bg-bg-surface [&_option]:text-text-primary",
124
- children: [/* @__PURE__ */ v("option", {
139
+ children: [/* @__PURE__ */ m("option", {
125
140
  value: "CSV",
126
- children: E("export.format.csv", "CSV")
127
- }), /* @__PURE__ */ v("option", {
141
+ children: b("export.format.csv", "CSV")
142
+ }), /* @__PURE__ */ m("option", {
128
143
  value: "JSON",
129
- children: E("export.format.json", "JSON")
144
+ children: b("export.format.json", "JSON")
130
145
  })]
131
146
  })]
132
147
  })]
133
148
  }),
134
- /* @__PURE__ */ y("div", {
149
+ /* @__PURE__ */ h("div", {
135
150
  className: "space-y-1",
136
- children: [/* @__PURE__ */ v("label", {
151
+ children: [/* @__PURE__ */ m("label", {
137
152
  className: "text-sm font-medium",
138
- children: E("export.templates.form.fields.description", "Description")
139
- }), /* @__PURE__ */ v("input", {
153
+ children: b("export.templates.form.fields.description", "Description")
154
+ }), /* @__PURE__ */ m("input", {
140
155
  type: "text",
141
- "aria-label": E("export.templates.form.fields.description", "Description"),
142
- placeholder: E("export.templates.form.fields.descriptionPlaceholder", "Optional description"),
143
- value: z,
144
- onChange: (e) => B(e.target.value),
156
+ "aria-label": b("export.templates.form.fields.description", "Description"),
157
+ placeholder: b("export.templates.form.fields.descriptionPlaceholder", "Optional description"),
158
+ value: R,
159
+ onChange: (e) => z(e.target.value),
145
160
  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 transition-all"
146
161
  })]
147
162
  }),
148
- /* @__PURE__ */ y("div", {
163
+ /* @__PURE__ */ h("div", {
149
164
  className: "space-y-2",
150
- children: [/* @__PURE__ */ y("label", {
165
+ children: [/* @__PURE__ */ h("label", {
151
166
  className: "text-sm font-medium",
152
167
  children: [
153
- E("export.templates.form.fields.entityTypes", "Entity Types"),
168
+ b("export.templates.form.fields.entityTypes", "Entity Types"),
154
169
  " *",
155
170
  " ",
156
- /* @__PURE__ */ v("span", {
171
+ /* @__PURE__ */ m("span", {
157
172
  className: "text-text-secondary font-normal",
158
- children: E("export.templates.form.fields.entityTypesHint", "(select at least one)")
173
+ children: b("export.templates.form.fields.entityTypesHint", "(select at least one)")
159
174
  })
160
175
  ]
161
- }), /* @__PURE__ */ v("div", {
176
+ }), /* @__PURE__ */ m("div", {
162
177
  className: "flex flex-wrap gap-2",
163
- children: M.map((e) => /* @__PURE__ */ v("button", {
178
+ children: D.map((e) => /* @__PURE__ */ m("button", {
164
179
  type: "button",
165
- onClick: () => Z(e.entityType),
166
- className: c("px-3 py-1.5 rounded-lg text-sm font-medium border-2 transition-all", V.includes(e.entityType) ? "border-primary bg-action-primary-bg/10 text-primary" : "border-border-subtle bg-bg-surface hover:border-primary/50"),
167
- children: e.displayName
180
+ onClick: () => ve(e.entityType),
181
+ className: a("px-3 py-1.5 rounded-lg text-sm font-medium border-2 transition-all", B.includes(e.entityType) ? "border-primary bg-action-primary-bg/10 text-primary" : "border-border-subtle bg-bg-surface hover:border-primary/50"),
182
+ children: w ? T(e.entityType) : e.displayName
168
183
  }, e.entityType))
169
184
  })]
170
185
  }),
171
- /* @__PURE__ */ y("div", {
186
+ /* @__PURE__ */ h("div", {
172
187
  className: "flex gap-3 pt-2",
173
- children: [/* @__PURE__ */ y("button", {
188
+ children: [/* @__PURE__ */ h("button", {
174
189
  type: "button",
175
- onClick: X,
176
- disabled: j,
190
+ onClick: Y,
191
+ disabled: C,
177
192
  className: "inline-flex items-center gap-2 px-5 py-2.5 bg-action-primary-bg text-action-primary-text rounded-lg hover:bg-action-primary-bg/90 transition-colors font-medium disabled:opacity-50",
178
- children: [j ? /* @__PURE__ */ v(p, {
193
+ children: [C ? /* @__PURE__ */ m(ue, {
179
194
  size: 16,
180
195
  className: "animate-spin"
181
- }) : /* @__PURE__ */ v(m, { size: 16 }), E("export.templates.form.actions.create", "Create Template")]
182
- }), /* @__PURE__ */ v("button", {
196
+ }) : /* @__PURE__ */ m(d, { size: 16 }), b("export.templates.form.actions.create", "Create Template")]
197
+ }), /* @__PURE__ */ m("button", {
183
198
  type: "button",
184
- onClick: () => I(!1),
199
+ onClick: () => F(!1),
185
200
  className: "px-5 py-2.5 border-2 border-border-subtle rounded-lg hover:bg-accent transition-colors font-medium",
186
- children: E("export.templates.form.actions.cancel", "Cancel")
201
+ children: b("export.templates.form.actions.cancel", "Cancel")
187
202
  })]
188
203
  })
189
204
  ]
190
205
  }),
191
- /* @__PURE__ */ y("div", {
206
+ /* @__PURE__ */ h("div", {
192
207
  className: "relative group",
193
208
  children: [
194
- /* @__PURE__ */ v(h, {
209
+ /* @__PURE__ */ m(de, {
195
210
  size: 18,
196
211
  className: "absolute left-3 top-1/2 -translate-y-1/2 text-text-secondary group-focus-within:text-primary transition-colors"
197
212
  }),
198
- /* @__PURE__ */ v("input", {
213
+ /* @__PURE__ */ m("input", {
199
214
  type: "text",
200
- "aria-label": E("export.templates.search.placeholder", "Search templates"),
201
- placeholder: E("export.templates.search.placeholder", "Search templates..."),
202
- value: N,
203
- onChange: (e) => P(e.target.value),
215
+ "aria-label": b("export.templates.search.placeholder", "Search templates"),
216
+ placeholder: b("export.templates.search.placeholder", "Search templates..."),
217
+ value: M,
218
+ onChange: (e) => N(e.target.value),
204
219
  className: "w-full pl-[3.25rem] pr-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"
205
220
  }),
206
- N && /* @__PURE__ */ v("button", {
221
+ M && /* @__PURE__ */ m("button", {
207
222
  type: "button",
208
- onClick: () => P(""),
223
+ onClick: () => N(""),
209
224
  className: "absolute right-3 top-1/2 -translate-y-1/2 p-1 rounded-md text-text-secondary hover:text-text-primary hover:bg-accent",
210
- children: /* @__PURE__ */ v(_, { size: 16 })
225
+ children: /* @__PURE__ */ m(f, { size: 16 })
211
226
  })
212
227
  ]
213
228
  }),
214
- O && /* @__PURE__ */ v("div", {
229
+ S && /* @__PURE__ */ m("div", {
215
230
  className: "grid grid-cols-1 lg:grid-cols-2 gap-4",
216
231
  children: [...[
217
232
  ,
218
233
  ,
219
234
  ,
220
235
  ,
221
- ]].map((e, t) => /* @__PURE__ */ y("div", {
236
+ ]].map((e, t) => /* @__PURE__ */ h("div", {
222
237
  className: "border border-border-seam rounded-xl p-5",
223
238
  children: [
224
- /* @__PURE__ */ v("div", { className: "h-5 w-40 bg-bg-sunken rounded mb-3 animate-vc-shimmer" }),
225
- /* @__PURE__ */ v("div", { className: "h-3 w-full bg-bg-sunken rounded mb-2 animate-vc-shimmer" }),
226
- /* @__PURE__ */ y("div", {
239
+ /* @__PURE__ */ m("div", { className: "h-5 w-40 bg-bg-sunken rounded mb-3 animate-vc-shimmer" }),
240
+ /* @__PURE__ */ m("div", { className: "h-3 w-full bg-bg-sunken rounded mb-2 animate-vc-shimmer" }),
241
+ /* @__PURE__ */ h("div", {
227
242
  className: "flex gap-2 mt-4",
228
- children: [/* @__PURE__ */ v("div", { className: "h-5 w-16 bg-bg-sunken rounded-full animate-vc-shimmer" }), /* @__PURE__ */ v("div", { className: "h-5 w-16 bg-bg-sunken rounded-full animate-vc-shimmer" })]
243
+ children: [/* @__PURE__ */ m("div", { className: "h-5 w-16 bg-bg-sunken rounded-full animate-vc-shimmer" }), /* @__PURE__ */ m("div", { className: "h-5 w-16 bg-bg-sunken rounded-full animate-vc-shimmer" })]
229
244
  })
230
245
  ]
231
246
  }, t))
232
247
  }),
233
- O ? null : Q.length > 0 ? /* @__PURE__ */ v("div", {
248
+ S ? null : X.length > 0 ? /* @__PURE__ */ m("div", {
234
249
  className: "grid grid-cols-1 lg:grid-cols-2 gap-4",
235
- children: Q.map((e, t) => /* @__PURE__ */ y("div", {
250
+ children: X.map((e, t) => /* @__PURE__ */ h("div", {
236
251
  role: "button",
237
252
  tabIndex: 0,
238
- onClick: () => $(e.id),
253
+ onClick: () => Z(e.id),
239
254
  onKeyDown: (t) => {
240
- (t.key === "Enter" || t.key === " ") && (t.preventDefault(), $(e.id));
255
+ (t.key === "Enter" || t.key === " ") && (t.preventDefault(), Z(e.id));
241
256
  },
242
- className: c("text-left group cursor-pointer border border-border-seam rounded-xl overflow-hidden bg-bg-surface", "hover:border-primary/40 shadow-[var(--shadow-pop)] transition-colors duration-200", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/40", "animate-in fade-in-0"),
257
+ className: a("text-left group cursor-pointer border border-border-seam rounded-xl overflow-hidden bg-bg-surface", "hover:border-primary/40 shadow-[var(--shadow-pop)] transition-colors duration-200", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/40", "animate-in fade-in-0"),
243
258
  style: { animationDelay: `${t * 50}ms` },
244
- children: [/* @__PURE__ */ v("div", {
259
+ children: [/* @__PURE__ */ m("div", {
245
260
  className: "p-4 border-b bg-bg-sunken/30",
246
- children: /* @__PURE__ */ y("div", {
261
+ children: /* @__PURE__ */ h("div", {
247
262
  className: "flex items-start justify-between",
248
- children: [/* @__PURE__ */ y("div", {
263
+ children: [/* @__PURE__ */ h("div", {
249
264
  className: "flex items-center gap-3",
250
- children: [/* @__PURE__ */ v("div", {
265
+ children: [/* @__PURE__ */ m("div", {
251
266
  className: "p-2 rounded-lg bg-action-primary-bg/10",
252
- children: /* @__PURE__ */ v(f, {
267
+ children: /* @__PURE__ */ m(u, {
253
268
  size: 20,
254
269
  className: "text-primary"
255
270
  })
256
- }), /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("h3", {
271
+ }), /* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("h3", {
257
272
  className: "font-semibold",
258
273
  children: e.name
259
- }), /* @__PURE__ */ y("p", {
274
+ }), /* @__PURE__ */ h("p", {
260
275
  className: "text-xs text-text-secondary",
261
- children: [o(e.format), e.isDefault && /* @__PURE__ */ v("span", {
276
+ children: [ce(e.format), e.isDefault && /* @__PURE__ */ m("span", {
262
277
  className: "ml-1.5 inline-flex items-center px-1.5 py-0.5 rounded text-xs bg-action-primary-bg/10 text-primary font-medium",
263
- children: E("export.templates.card.default", "Default")
278
+ children: b("export.templates.card.default", "Default")
264
279
  })]
265
280
  })] })]
266
- }), /* @__PURE__ */ y("div", {
281
+ }), /* @__PURE__ */ h("div", {
267
282
  className: "flex items-center gap-2",
268
- children: [/* @__PURE__ */ v("button", {
283
+ children: [/* @__PURE__ */ m("button", {
269
284
  type: "button",
270
- onClick: (t) => ne(t, e.id),
285
+ onClick: (t) => ye(t, e.id),
271
286
  className: "p-1.5 rounded-md text-text-secondary hover:text-status-error-text hover:bg-status-error-bg/10 transition-colors",
272
- "aria-label": E("export.templates.card.deleteAriaLabel", "Delete {{name}}", { name: e.name }),
273
- children: /* @__PURE__ */ v(_, { size: 14 })
274
- }), /* @__PURE__ */ v(te, {
287
+ "aria-label": b("export.templates.card.deleteAriaLabel", "Delete {{name}}", { name: e.name }),
288
+ children: /* @__PURE__ */ m(f, { size: 14 })
289
+ }), /* @__PURE__ */ m(le, {
275
290
  size: 18,
276
291
  className: "text-text-secondary group-hover:text-primary transition-colors mt-1"
277
292
  })]
278
293
  })]
279
294
  })
280
- }), /* @__PURE__ */ y("div", {
295
+ }), /* @__PURE__ */ h("div", {
281
296
  className: "p-4",
282
- children: [e.description && /* @__PURE__ */ v("p", {
297
+ children: [e.description && /* @__PURE__ */ m("p", {
283
298
  className: "text-sm text-text-secondary mb-3 line-clamp-2",
284
299
  children: e.description
285
- }), /* @__PURE__ */ y("div", {
300
+ }), /* @__PURE__ */ h("div", {
286
301
  className: "flex flex-wrap gap-1.5 overflow-hidden",
287
- children: [e.entityTypes.slice(0, 6).map((e) => /* @__PURE__ */ v("span", {
302
+ children: [e.entityTypes.slice(0, 6).map((e) => /* @__PURE__ */ m("span", {
288
303
  className: "inline-flex px-2 py-0.5 rounded text-xs font-medium bg-bg-sunken text-text-secondary max-w-full truncate",
289
- children: e
290
- }, e)), e.entityTypes.length > 6 && /* @__PURE__ */ v("span", {
304
+ children: T(e)
305
+ }, e)), e.entityTypes.length > 6 && /* @__PURE__ */ m("span", {
291
306
  className: "inline-flex px-2 py-0.5 rounded text-xs font-medium bg-bg-sunken text-text-secondary",
292
- children: E("export.templates.card.moreEntities", "+{{count}} more", { count: e.entityTypes.length - 6 })
307
+ children: b("export.templates.card.moreEntities", "+{{count}} more", { count: e.entityTypes.length - 6 })
293
308
  })]
294
309
  })]
295
310
  })]
296
311
  }, e.id))
297
- }) : /* @__PURE__ */ v(x, {
298
- illustration: N ? "empty-search" : "empty-data",
299
- title: N ? E("export.templates.empty.filtered.title", "No matching templates") : E("export.templates.empty.title", "No templates yet"),
300
- description: N ? E("export.templates.empty.filtered.description", "Try adjusting your search to find what you are looking for.") : E("export.templates.empty.description", "Create a template to save reusable export configurations."),
301
- action: N ? /* @__PURE__ */ y("button", {
312
+ }) : /* @__PURE__ */ m(me, {
313
+ illustration: M ? "empty-search" : "empty-data",
314
+ title: M ? b("export.templates.empty.filtered.title", "No matching templates") : b("export.templates.empty.title", "No templates yet"),
315
+ description: M ? b("export.templates.empty.filtered.description", "Try adjusting your search to find what you are looking for.") : b("export.templates.empty.description", "Create a template to save reusable export configurations."),
316
+ action: M ? /* @__PURE__ */ h("button", {
302
317
  type: "button",
303
- onClick: () => P(""),
318
+ onClick: () => N(""),
304
319
  className: "inline-flex items-center gap-2 px-4 py-2 border-2 border-border-subtle rounded-lg hover:bg-accent transition-colors font-medium",
305
- children: [/* @__PURE__ */ v(_, { size: 16 }), E("export.templates.empty.filtered.actions.clear", "Clear Search")]
306
- }) : /* @__PURE__ */ y("button", {
320
+ children: [/* @__PURE__ */ m(f, { size: 16 }), b("export.templates.empty.filtered.actions.clear", "Clear Search")]
321
+ }) : /* @__PURE__ */ h("button", {
307
322
  type: "button",
308
- onClick: Y,
323
+ onClick: J,
309
324
  className: "inline-flex items-center gap-2 px-4 py-2 bg-action-primary-bg text-action-primary-text rounded-lg hover:bg-action-primary-bg/90 transition-colors font-medium",
310
- children: [/* @__PURE__ */ v(m, { size: 16 }), E("export.templates.empty.actions.newTemplate", "New Template")]
325
+ children: [/* @__PURE__ */ m(d, { size: 16 }), b("export.templates.empty.actions.newTemplate", "New Template")]
311
326
  })
312
327
  }),
313
- q && /* @__PURE__ */ v("div", {
328
+ w ? /* @__PURE__ */ m(ie, {
329
+ open: K !== null,
330
+ onOpenChange: (e) => {
331
+ e || Q();
332
+ },
333
+ title: b("export.templates.delete.named", "Delete “{{name}}”?", { name: be }),
334
+ description: b("export.templates.delete.description", "This removes the saved export configuration. Existing export jobs are not deleted."),
335
+ confirmLabel: b("export.templates.delete.confirmAction", "Delete Template"),
336
+ keepLabel: b("export.templates.delete.cancel", "Keep Template"),
337
+ busy: A,
338
+ error: O,
339
+ onConfirm: () => void $()
340
+ }) : K && /* @__PURE__ */ m("div", {
314
341
  role: "dialog",
315
342
  "aria-modal": "true",
316
343
  "aria-labelledby": "template-list-delete-title",
317
344
  className: "fixed inset-0 z-50 flex items-center justify-center bg-bg-surface/80 backdrop-blur-sm p-4",
318
- children: /* @__PURE__ */ y("div", {
345
+ children: /* @__PURE__ */ h("div", {
319
346
  className: "w-full max-w-md rounded-xl border-2 border-border-subtle bg-bg-surface p-6 shadow-xl",
320
347
  children: [
321
- /* @__PURE__ */ v("h2", {
348
+ /* @__PURE__ */ m("h2", {
322
349
  id: "template-list-delete-title",
323
350
  className: "text-lg font-bold",
324
- children: E("export.templates.delete.title", "Delete template?")
351
+ children: b("export.templates.delete.title", "Delete template?")
325
352
  }),
326
- /* @__PURE__ */ v("p", {
353
+ /* @__PURE__ */ m("p", {
327
354
  className: "mt-2 text-sm text-text-secondary",
328
- children: E("export.templates.delete.description", "This removes the saved export configuration. Existing export jobs are not deleted.")
355
+ children: b("export.templates.delete.description", "This removes the saved export configuration. Existing export jobs are not deleted.")
356
+ }),
357
+ O && /* @__PURE__ */ m("p", {
358
+ role: "alert",
359
+ className: "mt-3 rounded-lg bg-status-error-bg-subtle px-3 py-2 text-sm text-status-error-text",
360
+ children: O
329
361
  }),
330
- /* @__PURE__ */ y("div", {
362
+ /* @__PURE__ */ h("div", {
331
363
  className: "mt-6 flex flex-col-reverse sm:flex-row sm:justify-end gap-3",
332
- children: [/* @__PURE__ */ v("button", {
364
+ children: [/* @__PURE__ */ m("button", {
333
365
  type: "button",
334
- onClick: () => J(null),
366
+ onClick: Q,
335
367
  className: "px-4 py-2 rounded-lg border-2 border-border-subtle hover:bg-accent transition-colors font-medium",
336
- children: E("export.templates.delete.cancel", "Keep Template")
337
- }), /* @__PURE__ */ v("button", {
368
+ children: b("export.templates.delete.cancel", "Keep Template")
369
+ }), /* @__PURE__ */ m("button", {
338
370
  type: "button",
339
- onClick: re,
371
+ onClick: $,
340
372
  className: "px-4 py-2 rounded-lg bg-status-error-bg text-status-error-text hover:bg-status-error-bg/90 transition-colors font-medium",
341
- children: E("export.templates.delete.confirmAction", "Delete Template")
373
+ children: b("export.templates.delete.confirmAction", "Delete Template")
342
374
  })]
343
375
  })
344
376
  ]
@@ -347,6 +379,6 @@ function w() {
347
379
  ]
348
380
  });
349
381
  }
350
- export { w as ExportTemplatesPage };
382
+ export { v as ExportTemplatesPage };
351
383
 
352
384
  //# sourceMappingURL=ExportTemplatesPage.js.map