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