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