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