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