@burdenoff/microfe-export 2026.513.1 → 2026.513.3
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.d.ts.map +1 -1
- package/dist/export/ExportRoutes.js +85 -50
- package/dist/export/ExportRoutes.js.map +1 -1
- package/dist/export/pages/CreateExportPage.d.ts.map +1 -1
- package/dist/export/pages/CreateExportPage.js +223 -210
- package/dist/export/pages/CreateExportPage.js.map +1 -1
- package/dist/generated/wspace-types.d.ts +681 -145
- package/dist/generated/wspace-types.d.ts.map +1 -1
- package/dist/generated/wspace-types.js.map +1 -1
- package/package.json +1 -1
|
@@ -3,219 +3,220 @@ import { useAvailableEntities as t, useCreateExportJob as n, useExportTemplates
|
|
|
3
3
|
import { cn as i } from "../utils/cn.js";
|
|
4
4
|
import { getFormatDisplayName as a } from "../constants/enums.js";
|
|
5
5
|
import { tWithFallback as o } from "../utils/i18n.js";
|
|
6
|
-
import { PageLayout as
|
|
7
|
-
import { useEffect as
|
|
8
|
-
import { ArrowLeft as
|
|
9
|
-
import { useSearchParams as
|
|
10
|
-
import { jsx as
|
|
11
|
-
import { useI18n as
|
|
6
|
+
import { PageLayout as ee } from "../components/PageLayout.js";
|
|
7
|
+
import { useEffect as s, useRef as te, useState as c } from "react";
|
|
8
|
+
import { ArrowLeft as l, ArrowRight as u, Building2 as d, CalendarRange as ne, CheckCircle2 as f, Download as p, FileJson as m, FileSpreadsheet as h, Loader2 as g, Lock as _, Package as re, User as v, Users as y } from "lucide-react";
|
|
9
|
+
import { useSearchParams as b } from "react-router-dom";
|
|
10
|
+
import { jsx as x, jsxs as S } from "react/jsx-runtime";
|
|
11
|
+
import { useI18n as C } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
12
|
+
import { usePermission as w } from "@burdenoff/fe-libs/shared/providers/shell";
|
|
12
13
|
//#region src/export/pages/CreateExportPage.tsx
|
|
13
|
-
var
|
|
14
|
-
CSV:
|
|
15
|
-
JSON:
|
|
16
|
-
},
|
|
14
|
+
var T = ["CSV", "JSON"], ie = {
|
|
15
|
+
CSV: h,
|
|
16
|
+
JSON: m
|
|
17
|
+
}, ae = [
|
|
17
18
|
{
|
|
18
19
|
value: "INDIVIDUAL",
|
|
19
20
|
label: "My Data Only",
|
|
20
21
|
description: "Export data you personally created across selected modules.",
|
|
21
|
-
Icon:
|
|
22
|
+
Icon: v
|
|
22
23
|
},
|
|
23
24
|
{
|
|
24
25
|
value: "WORKSPACE_ADMIN",
|
|
25
26
|
label: "All Workspace Data",
|
|
26
27
|
description: "Export all data in this workspace regardless of who created it. Requires workspace admin access.",
|
|
27
|
-
Icon:
|
|
28
|
+
Icon: y
|
|
28
29
|
},
|
|
29
30
|
{
|
|
30
31
|
value: "ORG_ADMIN",
|
|
31
32
|
label: "All Organization Data",
|
|
32
33
|
description: "Export data from every workspace in your organization. Requires org-admin access.",
|
|
33
|
-
Icon:
|
|
34
|
+
Icon: d
|
|
34
35
|
}
|
|
35
36
|
];
|
|
36
|
-
function
|
|
37
|
-
let { basePath:
|
|
38
|
-
|
|
39
|
-
let e =
|
|
40
|
-
if (!e || !
|
|
41
|
-
let t =
|
|
37
|
+
function E() {
|
|
38
|
+
let { basePath: d = "/", navigate: m, organizationId: h } = e(), { t: v } = C(), y = (e, t, n) => o(v, e, t, n), { createJob: E, isPending: D } = n(), { data: O } = t(), { data: k } = r(), [A] = b(), j = w("export:workspace:admin"), oe = w("export:org:admin"), [M, N] = c("entities"), [P, F] = c([]), [I, L] = c(""), [R, z] = c("CSV"), [B, V] = c("INDIVIDUAL"), [H, U] = c(A.get("templateId") ?? void 0), [W, G] = c(""), [K, se] = c(""), [q, J] = c(null), Y = te(null);
|
|
39
|
+
s(() => {
|
|
40
|
+
let e = A.get("templateId");
|
|
41
|
+
if (!e || !k?.length || Y.current === e) return;
|
|
42
|
+
let t = k.find((t) => t.id === e);
|
|
42
43
|
if (!t) return;
|
|
43
|
-
|
|
44
|
+
Y.current = e, U(t.id), F(t.entityTypes ?? []);
|
|
44
45
|
let n = t.format?.toUpperCase();
|
|
45
|
-
n &&
|
|
46
|
-
}, [
|
|
47
|
-
let
|
|
48
|
-
M === "options" ? N("entities") : M === "review" ? N("options") :
|
|
49
|
-
},
|
|
46
|
+
n && T.includes(n) && z(n), t.name && L(t.name);
|
|
47
|
+
}, [A, k]);
|
|
48
|
+
let ce = () => {
|
|
49
|
+
M === "options" ? N("entities") : M === "review" ? N("options") : m?.(d);
|
|
50
|
+
}, X = () => {
|
|
50
51
|
if (M === "entities") {
|
|
51
52
|
if (P.length === 0) {
|
|
52
|
-
|
|
53
|
+
J(y("export.create.errors.selectEntity", "Please select at least one entity type to export"));
|
|
53
54
|
return;
|
|
54
55
|
}
|
|
55
|
-
|
|
56
|
+
J(null), N("options");
|
|
56
57
|
} else if (M === "options") {
|
|
57
58
|
if (!I.trim()) {
|
|
58
|
-
|
|
59
|
+
J(y("export.create.errors.exportNameRequired", "Please provide a name for this export"));
|
|
59
60
|
return;
|
|
60
61
|
}
|
|
61
|
-
|
|
62
|
+
J(null), N("review");
|
|
62
63
|
}
|
|
63
|
-
},
|
|
64
|
+
}, le = async () => {
|
|
64
65
|
try {
|
|
65
|
-
|
|
66
|
+
J(null), await E({
|
|
66
67
|
name: I,
|
|
67
68
|
entityTypes: P,
|
|
68
69
|
format: R,
|
|
69
70
|
exportScope: B,
|
|
70
|
-
organizationId: B === "ORG_ADMIN" ?
|
|
71
|
+
organizationId: B === "ORG_ADMIN" ? h : void 0,
|
|
71
72
|
templateId: H,
|
|
72
73
|
dateRangeStart: W ? new Date(W).toISOString() : null,
|
|
73
74
|
dateRangeEnd: K ? new Date(K).toISOString() : null
|
|
74
|
-
}),
|
|
75
|
+
}), m?.(d);
|
|
75
76
|
} catch (e) {
|
|
76
|
-
|
|
77
|
+
J(e instanceof Error ? e.message : y("export.create.errors.createFailed", "Failed to create export"));
|
|
77
78
|
}
|
|
78
|
-
},
|
|
79
|
+
}, ue = (e) => {
|
|
79
80
|
F((t) => t.includes(e) ? t.filter((t) => t !== e) : [...t, e]);
|
|
80
81
|
}, Z = (e) => {
|
|
81
82
|
switch (e) {
|
|
82
|
-
case "INDIVIDUAL": return
|
|
83
|
-
case "WORKSPACE_ADMIN": return
|
|
84
|
-
case "ORG_ADMIN": return
|
|
83
|
+
case "INDIVIDUAL": return y("export.create.scope.individual.label", "My Data Only");
|
|
84
|
+
case "WORKSPACE_ADMIN": return y("export.create.scope.workspaceAdmin.label", "All Workspace Data");
|
|
85
|
+
case "ORG_ADMIN": return y("export.create.scope.orgAdmin.label", "All Organization Data");
|
|
85
86
|
default: return e;
|
|
86
87
|
}
|
|
87
|
-
},
|
|
88
|
+
}, de = (e) => {
|
|
88
89
|
switch (e) {
|
|
89
|
-
case "INDIVIDUAL": return
|
|
90
|
-
case "WORKSPACE_ADMIN": return
|
|
91
|
-
case "ORG_ADMIN": return
|
|
90
|
+
case "INDIVIDUAL": return y("export.create.scope.individual.description", "Export data you personally created across selected modules.");
|
|
91
|
+
case "WORKSPACE_ADMIN": return y("export.create.scope.workspaceAdmin.description", "Export all data in this workspace regardless of who created it. Requires workspace admin access.");
|
|
92
|
+
case "ORG_ADMIN": return y("export.create.scope.orgAdmin.description", "Export data from every workspace in your organization. Requires org-admin access.");
|
|
92
93
|
default: return "";
|
|
93
94
|
}
|
|
94
95
|
}, Q = {
|
|
95
96
|
users: {
|
|
96
|
-
label:
|
|
97
|
-
description:
|
|
97
|
+
label: y("export.create.entities.users.label", "Users"),
|
|
98
|
+
description: y("export.create.entities.users.description", "Workspace members and profiles")
|
|
98
99
|
},
|
|
99
100
|
projects: {
|
|
100
|
-
label:
|
|
101
|
-
description:
|
|
101
|
+
label: y("export.create.entities.projects.label", "Projects"),
|
|
102
|
+
description: y("export.create.entities.projects.description", "Projects and their metadata")
|
|
102
103
|
},
|
|
103
104
|
tasks: {
|
|
104
|
-
label:
|
|
105
|
-
description:
|
|
105
|
+
label: y("export.create.entities.tasks.label", "Tasks"),
|
|
106
|
+
description: y("export.create.entities.tasks.description", "Task items and assignments")
|
|
106
107
|
},
|
|
107
108
|
files: {
|
|
108
|
-
label:
|
|
109
|
-
description:
|
|
109
|
+
label: y("export.create.entities.files.label", "Files"),
|
|
110
|
+
description: y("export.create.entities.files.description", "File metadata and references")
|
|
110
111
|
},
|
|
111
112
|
conversations: {
|
|
112
|
-
label:
|
|
113
|
-
description:
|
|
113
|
+
label: y("export.create.entities.conversations.label", "Conversations"),
|
|
114
|
+
description: y("export.create.entities.conversations.description", "Chat messages and threads")
|
|
114
115
|
},
|
|
115
116
|
tags: {
|
|
116
|
-
label:
|
|
117
|
-
description:
|
|
117
|
+
label: y("export.create.entities.tags.label", "Tags"),
|
|
118
|
+
description: y("export.create.entities.tags.description", "Tags and vocabularies")
|
|
118
119
|
},
|
|
119
120
|
activity: {
|
|
120
|
-
label:
|
|
121
|
-
description:
|
|
121
|
+
label: y("export.create.entities.activity.label", "Activity Logs"),
|
|
122
|
+
description: y("export.create.entities.activity.description", "Audit trail and activity history")
|
|
122
123
|
},
|
|
123
124
|
calendar: {
|
|
124
|
-
label:
|
|
125
|
-
description:
|
|
125
|
+
label: y("export.create.entities.calendar.label", "Calendar Events"),
|
|
126
|
+
description: y("export.create.entities.calendar.description", "Events and bookings")
|
|
126
127
|
}
|
|
127
|
-
}, $ =
|
|
128
|
-
return /* @__PURE__ */
|
|
128
|
+
}, $ = O.filter((e) => e.enabled !== !1);
|
|
129
|
+
return /* @__PURE__ */ S(ee, {
|
|
129
130
|
showHeader: !1,
|
|
130
131
|
children: [
|
|
131
|
-
/* @__PURE__ */
|
|
132
|
+
/* @__PURE__ */ x("div", {
|
|
132
133
|
className: "relative overflow-hidden rounded-xl bg-gradient-to-br from-primary/5 via-primary/3 to-background border border-border/50 p-6 shadow-sm",
|
|
133
|
-
children: /* @__PURE__ */
|
|
134
|
+
children: /* @__PURE__ */ S("div", {
|
|
134
135
|
className: "relative z-10 flex items-center gap-4",
|
|
135
|
-
children: [/* @__PURE__ */
|
|
136
|
-
onClick: () =>
|
|
136
|
+
children: [/* @__PURE__ */ x("button", {
|
|
137
|
+
onClick: () => m?.(d),
|
|
137
138
|
className: "p-2.5 hover:bg-accent rounded-lg transition-all duration-200 hover:scale-110",
|
|
138
|
-
"aria-label":
|
|
139
|
-
children: /* @__PURE__ */
|
|
140
|
-
}), /* @__PURE__ */
|
|
139
|
+
"aria-label": y("export.create.actions.backToDashboard", "Back to export dashboard"),
|
|
140
|
+
children: /* @__PURE__ */ x(l, { size: 20 })
|
|
141
|
+
}), /* @__PURE__ */ S("div", {
|
|
141
142
|
className: "flex items-center gap-3",
|
|
142
|
-
children: [/* @__PURE__ */
|
|
143
|
+
children: [/* @__PURE__ */ x("div", {
|
|
143
144
|
className: "p-2.5 rounded-lg bg-primary/10 backdrop-blur-sm",
|
|
144
|
-
children: /* @__PURE__ */
|
|
145
|
+
children: /* @__PURE__ */ x(p, {
|
|
145
146
|
size: 24,
|
|
146
147
|
className: "text-primary"
|
|
147
148
|
})
|
|
148
|
-
}), /* @__PURE__ */
|
|
149
|
+
}), /* @__PURE__ */ x("h1", {
|
|
149
150
|
className: "text-2xl sm:text-3xl font-bold",
|
|
150
|
-
children:
|
|
151
|
+
children: y("export.create.title", "New Export")
|
|
151
152
|
})]
|
|
152
153
|
})]
|
|
153
154
|
})
|
|
154
155
|
}),
|
|
155
|
-
/* @__PURE__ */
|
|
156
|
+
/* @__PURE__ */ x("div", {
|
|
156
157
|
className: "flex items-center gap-2 justify-center flex-wrap",
|
|
157
158
|
children: [
|
|
158
159
|
"entities",
|
|
159
160
|
"options",
|
|
160
161
|
"review"
|
|
161
|
-
].map((e, t) => /* @__PURE__ */
|
|
162
|
+
].map((e, t) => /* @__PURE__ */ S("div", {
|
|
162
163
|
className: "flex items-center gap-2",
|
|
163
|
-
children: [t > 0 && /* @__PURE__ */
|
|
164
|
+
children: [t > 0 && /* @__PURE__ */ x(u, {
|
|
164
165
|
size: 18,
|
|
165
166
|
className: "text-muted-foreground"
|
|
166
|
-
}), /* @__PURE__ */
|
|
167
|
+
}), /* @__PURE__ */ S("div", {
|
|
167
168
|
className: i("flex items-center gap-2 px-4 py-2.5 rounded-lg text-sm font-medium border-2 transition-all duration-200", M === e ? "bg-primary text-primary-foreground border-primary shadow-md scale-105" : "bg-muted/50 text-muted-foreground border-border/50"),
|
|
168
|
-
children: [/* @__PURE__ */
|
|
169
|
+
children: [/* @__PURE__ */ x("div", {
|
|
169
170
|
className: "flex items-center justify-center w-6 h-6 rounded-full bg-background/20 font-bold",
|
|
170
171
|
children: t + 1
|
|
171
|
-
}), /* @__PURE__ */
|
|
172
|
+
}), /* @__PURE__ */ x("span", {
|
|
172
173
|
className: "hidden sm:inline capitalize",
|
|
173
|
-
children: e === "entities" ?
|
|
174
|
+
children: e === "entities" ? y("export.create.steps.entities", "Select Data") : e === "options" ? y("export.create.steps.options", "Options") : y("export.create.steps.review", "Review")
|
|
174
175
|
})]
|
|
175
176
|
})]
|
|
176
177
|
}, e))
|
|
177
178
|
}),
|
|
178
|
-
|
|
179
|
+
q && /* @__PURE__ */ x("div", {
|
|
179
180
|
className: "border-2 border-border-default rounded-xl bg-status-error-bg-subtle p-4 text-status-error-text text-sm",
|
|
180
|
-
children:
|
|
181
|
+
children: q
|
|
181
182
|
}),
|
|
182
|
-
M === "entities" && /* @__PURE__ */
|
|
183
|
+
M === "entities" && /* @__PURE__ */ S("div", {
|
|
183
184
|
className: "space-y-4",
|
|
184
185
|
children: [
|
|
185
|
-
/* @__PURE__ */
|
|
186
|
+
/* @__PURE__ */ x("h2", {
|
|
186
187
|
className: "text-lg font-bold",
|
|
187
|
-
children:
|
|
188
|
+
children: y("export.create.select.title", "Select data to export")
|
|
188
189
|
}),
|
|
189
|
-
/* @__PURE__ */
|
|
190
|
+
/* @__PURE__ */ x("p", {
|
|
190
191
|
className: "text-sm text-muted-foreground",
|
|
191
|
-
children:
|
|
192
|
+
children: y("export.create.select.description", "Choose which entity types to include in your export.")
|
|
192
193
|
}),
|
|
193
|
-
$.length === 0 ? /* @__PURE__ */
|
|
194
|
+
$.length === 0 ? /* @__PURE__ */ x("div", {
|
|
194
195
|
className: "border-2 border-border rounded-xl bg-muted/30 p-6 text-sm text-muted-foreground",
|
|
195
|
-
children:
|
|
196
|
-
}) : /* @__PURE__ */
|
|
196
|
+
children: y("export.create.select.empty", "No exportable entity types are configured for this workspace yet.")
|
|
197
|
+
}) : /* @__PURE__ */ x("div", {
|
|
197
198
|
className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-3",
|
|
198
199
|
children: $.map((e) => {
|
|
199
200
|
let t = P.includes(e.entityType);
|
|
200
|
-
return /* @__PURE__ */
|
|
201
|
-
onClick: () =>
|
|
201
|
+
return /* @__PURE__ */ S("button", {
|
|
202
|
+
onClick: () => ue(e.entityType),
|
|
202
203
|
className: i("text-left border-2 rounded-xl p-4 transition-all duration-200", t ? "border-primary bg-primary/5 shadow-md" : "border-border/50 hover:border-primary/30 hover:shadow-sm"),
|
|
203
204
|
children: [
|
|
204
|
-
/* @__PURE__ */
|
|
205
|
+
/* @__PURE__ */ S("div", {
|
|
205
206
|
className: "flex items-center justify-between mb-2",
|
|
206
|
-
children: [/* @__PURE__ */
|
|
207
|
+
children: [/* @__PURE__ */ x("h3", {
|
|
207
208
|
className: "font-semibold",
|
|
208
209
|
children: Q[e.entityType]?.label ?? e.displayName
|
|
209
|
-
}), t && /* @__PURE__ */
|
|
210
|
+
}), t && /* @__PURE__ */ x(f, {
|
|
210
211
|
size: 18,
|
|
211
212
|
className: "text-primary"
|
|
212
213
|
})]
|
|
213
214
|
}),
|
|
214
|
-
/* @__PURE__ */
|
|
215
|
+
/* @__PURE__ */ x("p", {
|
|
215
216
|
className: "text-sm text-muted-foreground",
|
|
216
217
|
children: Q[e.entityType]?.description ?? e.description
|
|
217
218
|
}),
|
|
218
|
-
e.estimatedSize && /* @__PURE__ */
|
|
219
|
+
e.estimatedSize && /* @__PURE__ */ S("p", {
|
|
219
220
|
className: "text-xs text-muted-foreground mt-2",
|
|
220
221
|
children: ["~", e.estimatedSize]
|
|
221
222
|
})
|
|
@@ -225,240 +226,252 @@ function D() {
|
|
|
225
226
|
})
|
|
226
227
|
]
|
|
227
228
|
}),
|
|
228
|
-
M === "options" && /* @__PURE__ */
|
|
229
|
+
M === "options" && /* @__PURE__ */ x("div", {
|
|
229
230
|
className: "space-y-6",
|
|
230
|
-
children: /* @__PURE__ */
|
|
231
|
+
children: /* @__PURE__ */ S("div", {
|
|
231
232
|
className: "border-2 border-border/50 rounded-xl p-6 space-y-5",
|
|
232
233
|
children: [
|
|
233
|
-
/* @__PURE__ */
|
|
234
|
+
/* @__PURE__ */ x("h2", {
|
|
234
235
|
className: "text-lg font-bold",
|
|
235
|
-
children:
|
|
236
|
+
children: y("export.create.options.title", "Export Options")
|
|
236
237
|
}),
|
|
237
|
-
/* @__PURE__ */
|
|
238
|
+
/* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("label", {
|
|
238
239
|
className: "block text-sm font-semibold mb-2",
|
|
239
|
-
children:
|
|
240
|
-
}), /* @__PURE__ */
|
|
240
|
+
children: y("export.create.options.scope", "Export Scope")
|
|
241
|
+
}), /* @__PURE__ */ x("div", {
|
|
241
242
|
className: "grid grid-cols-1 sm:grid-cols-3 gap-3",
|
|
242
|
-
children:
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
243
|
+
children: ae.map(({ value: e, Icon: t }) => {
|
|
244
|
+
let n = e === "WORKSPACE_ADMIN" && !j || e === "ORG_ADMIN" && !oe;
|
|
245
|
+
return /* @__PURE__ */ S("button", {
|
|
246
|
+
type: "button",
|
|
247
|
+
onClick: () => !n && V(e),
|
|
248
|
+
disabled: n,
|
|
249
|
+
className: i("text-left border-2 rounded-xl p-4 transition-all duration-200", B === e ? "border-primary bg-primary/5 shadow-md" : n ? "border-border/30 opacity-50 cursor-not-allowed" : "border-border/50 hover:border-primary/30 hover:shadow-sm"),
|
|
250
|
+
title: n ? e === "WORKSPACE_ADMIN" ? "Workspace admin access required" : "Organization admin access required" : void 0,
|
|
251
|
+
children: [
|
|
252
|
+
/* @__PURE__ */ S("div", {
|
|
253
|
+
className: "flex items-center justify-between mb-2",
|
|
254
|
+
children: [
|
|
255
|
+
/* @__PURE__ */ x(t, {
|
|
256
|
+
size: 18,
|
|
257
|
+
className: B === e ? "text-primary" : n ? "text-muted-foreground/50" : "text-muted-foreground"
|
|
258
|
+
}),
|
|
259
|
+
B === e && /* @__PURE__ */ x(f, {
|
|
260
|
+
size: 16,
|
|
261
|
+
className: "text-primary"
|
|
262
|
+
}),
|
|
263
|
+
n && /* @__PURE__ */ x(_, {
|
|
264
|
+
size: 14,
|
|
265
|
+
className: "text-muted-foreground/50"
|
|
266
|
+
})
|
|
267
|
+
]
|
|
268
|
+
}),
|
|
269
|
+
/* @__PURE__ */ x("p", {
|
|
270
|
+
className: "font-semibold text-sm",
|
|
271
|
+
children: Z(e)
|
|
272
|
+
}),
|
|
273
|
+
/* @__PURE__ */ x("p", {
|
|
274
|
+
className: "text-xs text-muted-foreground mt-1",
|
|
275
|
+
children: de(e)
|
|
276
|
+
})
|
|
277
|
+
]
|
|
278
|
+
}, e);
|
|
279
|
+
})
|
|
267
280
|
})] }),
|
|
268
|
-
/* @__PURE__ */
|
|
281
|
+
/* @__PURE__ */ S("div", { children: [/* @__PURE__ */ S("label", {
|
|
269
282
|
htmlFor: "exportName",
|
|
270
283
|
className: "block text-sm font-semibold mb-2",
|
|
271
284
|
children: [
|
|
272
|
-
|
|
285
|
+
y("export.create.options.name", "Export Name"),
|
|
273
286
|
" ",
|
|
274
|
-
/* @__PURE__ */
|
|
287
|
+
/* @__PURE__ */ x("span", {
|
|
275
288
|
className: "text-status-error-text",
|
|
276
289
|
children: "*"
|
|
277
290
|
})
|
|
278
291
|
]
|
|
279
|
-
}), /* @__PURE__ */
|
|
292
|
+
}), /* @__PURE__ */ x("input", {
|
|
280
293
|
type: "text",
|
|
281
294
|
id: "exportName",
|
|
282
295
|
value: I,
|
|
283
296
|
onChange: (e) => L(e.target.value),
|
|
284
297
|
className: "w-full px-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",
|
|
285
|
-
placeholder:
|
|
298
|
+
placeholder: y("export.create.options.namePlaceholder", "e.g., Monthly User Export")
|
|
286
299
|
})] }),
|
|
287
|
-
/* @__PURE__ */
|
|
300
|
+
/* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("label", {
|
|
288
301
|
className: "block text-sm font-semibold mb-2",
|
|
289
|
-
children:
|
|
290
|
-
}), /* @__PURE__ */
|
|
302
|
+
children: y("export.create.options.outputFormat", "Output Format")
|
|
303
|
+
}), /* @__PURE__ */ x("div", {
|
|
291
304
|
className: "grid grid-cols-2 gap-3",
|
|
292
|
-
children:
|
|
293
|
-
let t =
|
|
294
|
-
return /* @__PURE__ */
|
|
305
|
+
children: T.map((e) => {
|
|
306
|
+
let t = ie[e];
|
|
307
|
+
return /* @__PURE__ */ S("button", {
|
|
295
308
|
onClick: () => z(e),
|
|
296
309
|
className: i("flex items-center gap-3 border-2 rounded-lg p-3 transition-all duration-200", R === e ? "border-primary bg-primary/5" : "border-border/50 hover:border-primary/30"),
|
|
297
|
-
children: [/* @__PURE__ */
|
|
310
|
+
children: [/* @__PURE__ */ x(t, {
|
|
298
311
|
size: 18,
|
|
299
312
|
className: R === e ? "text-primary" : "text-muted-foreground"
|
|
300
|
-
}), /* @__PURE__ */
|
|
313
|
+
}), /* @__PURE__ */ x("span", {
|
|
301
314
|
className: "font-medium text-sm",
|
|
302
315
|
children: a(e)
|
|
303
316
|
})]
|
|
304
317
|
}, e);
|
|
305
318
|
})
|
|
306
319
|
})] }),
|
|
307
|
-
/* @__PURE__ */
|
|
308
|
-
/* @__PURE__ */
|
|
320
|
+
/* @__PURE__ */ S("div", { children: [
|
|
321
|
+
/* @__PURE__ */ x("label", {
|
|
309
322
|
className: "block text-sm font-semibold mb-2",
|
|
310
|
-
children:
|
|
323
|
+
children: y("export.create.options.archiveFormat", "Archive Format")
|
|
311
324
|
}),
|
|
312
|
-
/* @__PURE__ */
|
|
325
|
+
/* @__PURE__ */ x("div", {
|
|
313
326
|
className: "flex gap-3",
|
|
314
|
-
children: /* @__PURE__ */
|
|
327
|
+
children: /* @__PURE__ */ S("div", {
|
|
315
328
|
className: i("flex items-center gap-2 border-2 rounded-lg px-4 py-2 border-primary bg-primary/5"),
|
|
316
|
-
children: [/* @__PURE__ */
|
|
329
|
+
children: [/* @__PURE__ */ x(re, {
|
|
317
330
|
size: 16,
|
|
318
331
|
className: "text-primary"
|
|
319
|
-
}), /* @__PURE__ */
|
|
332
|
+
}), /* @__PURE__ */ x("span", {
|
|
320
333
|
className: "font-medium text-sm",
|
|
321
334
|
children: "ZIP"
|
|
322
335
|
})]
|
|
323
336
|
})
|
|
324
337
|
}),
|
|
325
|
-
/* @__PURE__ */
|
|
338
|
+
/* @__PURE__ */ x("p", {
|
|
326
339
|
className: "text-xs text-muted-foreground mt-1.5",
|
|
327
|
-
children:
|
|
340
|
+
children: y("export.create.options.archiveDescription", "Exports are packaged as ZIP archives.")
|
|
328
341
|
})
|
|
329
342
|
] }),
|
|
330
|
-
/* @__PURE__ */
|
|
331
|
-
/* @__PURE__ */
|
|
343
|
+
/* @__PURE__ */ S("div", { children: [
|
|
344
|
+
/* @__PURE__ */ x("label", {
|
|
332
345
|
className: "block text-sm font-semibold mb-2",
|
|
333
|
-
children: /* @__PURE__ */
|
|
346
|
+
children: /* @__PURE__ */ S("span", {
|
|
334
347
|
className: "inline-flex items-center gap-1.5",
|
|
335
348
|
children: [
|
|
336
|
-
/* @__PURE__ */
|
|
337
|
-
|
|
349
|
+
/* @__PURE__ */ x(ne, { size: 15 }),
|
|
350
|
+
y("export.create.options.dateRange", "Date Range"),
|
|
338
351
|
" ",
|
|
339
|
-
/* @__PURE__ */
|
|
352
|
+
/* @__PURE__ */ x("span", {
|
|
340
353
|
className: "font-normal text-muted-foreground",
|
|
341
|
-
children:
|
|
354
|
+
children: y("export.create.shared.optional", "(optional)")
|
|
342
355
|
})
|
|
343
356
|
]
|
|
344
357
|
})
|
|
345
358
|
}),
|
|
346
|
-
/* @__PURE__ */
|
|
359
|
+
/* @__PURE__ */ S("div", {
|
|
347
360
|
className: "grid grid-cols-1 sm:grid-cols-2 gap-3",
|
|
348
|
-
children: [/* @__PURE__ */
|
|
361
|
+
children: [/* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("label", {
|
|
349
362
|
htmlFor: "dateFrom",
|
|
350
363
|
className: "block text-xs text-muted-foreground mb-1",
|
|
351
|
-
children:
|
|
352
|
-
}), /* @__PURE__ */
|
|
364
|
+
children: y("export.create.options.dateFrom", "From")
|
|
365
|
+
}), /* @__PURE__ */ x("input", {
|
|
353
366
|
type: "date",
|
|
354
367
|
id: "dateFrom",
|
|
355
368
|
value: W,
|
|
356
369
|
onChange: (e) => G(e.target.value),
|
|
357
370
|
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 text-sm"
|
|
358
|
-
})] }), /* @__PURE__ */
|
|
371
|
+
})] }), /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("label", {
|
|
359
372
|
htmlFor: "dateTo",
|
|
360
373
|
className: "block text-xs text-muted-foreground mb-1",
|
|
361
|
-
children:
|
|
362
|
-
}), /* @__PURE__ */
|
|
374
|
+
children: y("export.create.options.dateTo", "To")
|
|
375
|
+
}), /* @__PURE__ */ x("input", {
|
|
363
376
|
type: "date",
|
|
364
377
|
id: "dateTo",
|
|
365
378
|
value: K,
|
|
366
379
|
min: W,
|
|
367
|
-
onChange: (e) =>
|
|
380
|
+
onChange: (e) => se(e.target.value),
|
|
368
381
|
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 text-sm"
|
|
369
382
|
})] })]
|
|
370
383
|
}),
|
|
371
|
-
/* @__PURE__ */
|
|
384
|
+
/* @__PURE__ */ x("p", {
|
|
372
385
|
className: "text-xs text-muted-foreground mt-1.5",
|
|
373
|
-
children:
|
|
386
|
+
children: y("export.create.options.dateRangeDescription", "Leave blank to export all data regardless of date.")
|
|
374
387
|
})
|
|
375
388
|
] }),
|
|
376
|
-
/* @__PURE__ */
|
|
389
|
+
/* @__PURE__ */ S("div", { children: [/* @__PURE__ */ S("label", {
|
|
377
390
|
className: "block text-sm font-semibold mb-2",
|
|
378
391
|
children: [
|
|
379
|
-
|
|
392
|
+
y("export.create.options.basedOnTemplate", "Based on Template"),
|
|
380
393
|
" ",
|
|
381
|
-
/* @__PURE__ */
|
|
394
|
+
/* @__PURE__ */ x("span", {
|
|
382
395
|
className: "font-normal text-muted-foreground",
|
|
383
|
-
children:
|
|
396
|
+
children: y("export.create.shared.optional", "(optional)")
|
|
384
397
|
})
|
|
385
398
|
]
|
|
386
|
-
}),
|
|
399
|
+
}), k.length > 0 ? /* @__PURE__ */ S("select", {
|
|
387
400
|
value: H ?? "",
|
|
388
401
|
onChange: (e) => U(e.target.value || void 0),
|
|
389
402
|
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",
|
|
390
|
-
children: [/* @__PURE__ */
|
|
403
|
+
children: [/* @__PURE__ */ x("option", {
|
|
391
404
|
value: "",
|
|
392
|
-
children:
|
|
393
|
-
}),
|
|
405
|
+
children: y("export.create.options.noTemplate", "No template")
|
|
406
|
+
}), k.map((e) => /* @__PURE__ */ x("option", {
|
|
394
407
|
value: e.id,
|
|
395
408
|
children: e.name
|
|
396
409
|
}, e.id))]
|
|
397
|
-
}) : /* @__PURE__ */
|
|
410
|
+
}) : /* @__PURE__ */ S("p", {
|
|
398
411
|
className: "text-sm text-muted-foreground",
|
|
399
412
|
children: [
|
|
400
|
-
|
|
413
|
+
y("export.create.options.noTemplates", "No templates yet."),
|
|
401
414
|
" ",
|
|
402
|
-
/* @__PURE__ */
|
|
415
|
+
/* @__PURE__ */ x("button", {
|
|
403
416
|
type: "button",
|
|
404
|
-
onClick: () =>
|
|
417
|
+
onClick: () => m?.(d + "/templates"),
|
|
405
418
|
className: "text-primary underline-offset-2 hover:underline",
|
|
406
|
-
children:
|
|
419
|
+
children: y("export.create.options.createTemplateLink", "Create one")
|
|
407
420
|
}),
|
|
408
421
|
" ",
|
|
409
|
-
|
|
422
|
+
y("export.create.options.reuseTemplateHint", "to reuse export configurations.")
|
|
410
423
|
]
|
|
411
424
|
})] })
|
|
412
425
|
]
|
|
413
426
|
})
|
|
414
427
|
}),
|
|
415
|
-
M === "review" && /* @__PURE__ */
|
|
428
|
+
M === "review" && /* @__PURE__ */ x("div", {
|
|
416
429
|
className: "space-y-6",
|
|
417
|
-
children: /* @__PURE__ */
|
|
430
|
+
children: /* @__PURE__ */ S("div", {
|
|
418
431
|
className: "border-2 border-primary/50 rounded-xl bg-primary/5 p-6 space-y-4",
|
|
419
|
-
children: [/* @__PURE__ */
|
|
432
|
+
children: [/* @__PURE__ */ S("h2", {
|
|
420
433
|
className: "text-lg font-bold flex items-center gap-2",
|
|
421
|
-
children: [/* @__PURE__ */
|
|
434
|
+
children: [/* @__PURE__ */ x(f, {
|
|
422
435
|
size: 20,
|
|
423
436
|
className: "text-primary"
|
|
424
|
-
}),
|
|
425
|
-
}), /* @__PURE__ */
|
|
437
|
+
}), y("export.create.review.title", "Review Export")]
|
|
438
|
+
}), /* @__PURE__ */ x("dl", {
|
|
426
439
|
className: "space-y-3 text-sm",
|
|
427
440
|
children: [
|
|
428
441
|
{
|
|
429
|
-
label:
|
|
442
|
+
label: y("export.create.review.fields.name", "Name"),
|
|
430
443
|
value: I
|
|
431
444
|
},
|
|
432
445
|
{
|
|
433
|
-
label:
|
|
446
|
+
label: y("export.create.review.fields.scope", "Scope"),
|
|
434
447
|
value: Z(B)
|
|
435
448
|
},
|
|
436
449
|
{
|
|
437
|
-
label:
|
|
450
|
+
label: y("export.create.review.fields.entityTypes", "Entity Types"),
|
|
438
451
|
value: P.join(", ")
|
|
439
452
|
},
|
|
440
453
|
{
|
|
441
|
-
label:
|
|
454
|
+
label: y("export.create.review.fields.format", "Format"),
|
|
442
455
|
value: a(R)
|
|
443
456
|
},
|
|
444
457
|
{
|
|
445
|
-
label:
|
|
458
|
+
label: y("export.create.review.fields.archive", "Archive"),
|
|
446
459
|
value: "ZIP"
|
|
447
460
|
},
|
|
448
461
|
...W || K ? [{
|
|
449
|
-
label:
|
|
462
|
+
label: y("export.create.review.fields.dateRange", "Date Range"),
|
|
450
463
|
value: [W || "—", K || "—"].join(" → ")
|
|
451
464
|
}] : [],
|
|
452
465
|
...H ? [{
|
|
453
|
-
label:
|
|
454
|
-
value:
|
|
466
|
+
label: y("export.create.review.fields.template", "Template"),
|
|
467
|
+
value: k.find((e) => e.id === H)?.name ?? H
|
|
455
468
|
}] : []
|
|
456
|
-
].map(({ label: e, value: t }) => /* @__PURE__ */
|
|
469
|
+
].map(({ label: e, value: t }) => /* @__PURE__ */ S("div", {
|
|
457
470
|
className: "flex flex-col sm:flex-row sm:justify-between gap-1",
|
|
458
|
-
children: [/* @__PURE__ */
|
|
471
|
+
children: [/* @__PURE__ */ x("dt", {
|
|
459
472
|
className: "text-muted-foreground",
|
|
460
473
|
children: e
|
|
461
|
-
}), /* @__PURE__ */
|
|
474
|
+
}), /* @__PURE__ */ x("dd", {
|
|
462
475
|
className: "font-semibold sm:text-right break-words",
|
|
463
476
|
children: t
|
|
464
477
|
})]
|
|
@@ -466,30 +479,30 @@ function D() {
|
|
|
466
479
|
})]
|
|
467
480
|
})
|
|
468
481
|
}),
|
|
469
|
-
/* @__PURE__ */
|
|
482
|
+
/* @__PURE__ */ S("div", {
|
|
470
483
|
className: "flex flex-col sm:flex-row gap-3 pt-2",
|
|
471
|
-
children: [/* @__PURE__ */
|
|
472
|
-
onClick:
|
|
484
|
+
children: [/* @__PURE__ */ x("button", {
|
|
485
|
+
onClick: ce,
|
|
473
486
|
className: "px-6 py-3 border-2 border-border/50 rounded-lg hover:bg-accent hover:border-primary/30 transition-all duration-200 font-medium",
|
|
474
|
-
children: M === "entities" ?
|
|
475
|
-
}), M === "review" ? /* @__PURE__ */
|
|
476
|
-
onClick:
|
|
477
|
-
disabled:
|
|
487
|
+
children: M === "entities" ? y("export.create.actions.cancel", "Cancel") : y("export.create.actions.back", "Back")
|
|
488
|
+
}), M === "review" ? /* @__PURE__ */ S("button", {
|
|
489
|
+
onClick: le,
|
|
490
|
+
disabled: D,
|
|
478
491
|
className: "flex-1 inline-flex items-center justify-center gap-2 px-6 py-3 bg-primary text-primary-foreground rounded-lg hover:bg-primary/90 transition-all duration-200 hover:scale-105 font-bold shadow-lg disabled:opacity-50 disabled:cursor-not-allowed",
|
|
479
|
-
children: [
|
|
492
|
+
children: [D ? /* @__PURE__ */ x(g, {
|
|
480
493
|
size: 18,
|
|
481
494
|
className: "animate-spin"
|
|
482
|
-
}) : /* @__PURE__ */
|
|
483
|
-
}) : /* @__PURE__ */
|
|
484
|
-
onClick:
|
|
495
|
+
}) : /* @__PURE__ */ x(p, { size: 18 }), y("export.create.actions.startExport", "Start Export")]
|
|
496
|
+
}) : /* @__PURE__ */ S("button", {
|
|
497
|
+
onClick: X,
|
|
485
498
|
className: "flex-1 inline-flex items-center justify-center gap-2 px-6 py-3 bg-primary text-primary-foreground rounded-lg hover:bg-primary/90 transition-all duration-200 hover:scale-105 font-bold shadow-lg",
|
|
486
|
-
children: [
|
|
499
|
+
children: [y("export.create.actions.next", "Next"), /* @__PURE__ */ x(u, { size: 18 })]
|
|
487
500
|
})]
|
|
488
501
|
})
|
|
489
502
|
]
|
|
490
503
|
});
|
|
491
504
|
}
|
|
492
505
|
//#endregion
|
|
493
|
-
export {
|
|
506
|
+
export { E as CreateExportPage };
|
|
494
507
|
|
|
495
508
|
//# sourceMappingURL=CreateExportPage.js.map
|