@burdenoff/microfe-export 2026.1124.2 → 2026.1125.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/ExportRoutes.js +62 -57
- package/dist/export/ExportRoutes.js.map +1 -1
- package/dist/export/components/ConfirmDestructiveDialog.js +18 -14
- package/dist/export/components/ConfirmDestructiveDialog.js.map +1 -1
- package/dist/export/components/DownloadStatus.js +14 -10
- package/dist/export/components/DownloadStatus.js.map +1 -1
- package/dist/export/components/ExportProgressBar.d.ts +3 -1
- package/dist/export/components/ExportProgressBar.js +23 -11
- package/dist/export/components/ExportProgressBar.js.map +1 -1
- package/dist/export/components/loadingSystem.d.ts +64 -0
- package/dist/export/components/loadingSystem.js +49 -0
- package/dist/export/components/loadingSystem.js.map +1 -0
- package/dist/export/hooks/exportBackgroundTask.d.ts +18 -0
- package/dist/export/hooks/exportBackgroundTask.js +46 -0
- package/dist/export/hooks/exportBackgroundTask.js.map +1 -0
- package/dist/export/hooks/useExportQueries.d.ts +12 -12
- package/dist/export/hooks/useExportQueries.js +166 -156
- package/dist/export/hooks/useExportQueries.js.map +1 -1
- package/dist/export/pages/CreateExportPage.js +29 -27
- package/dist/export/pages/CreateExportPage.js.map +1 -1
- package/dist/export/pages/ExportDashboardPage.js +114 -113
- package/dist/export/pages/ExportDashboardPage.js.map +1 -1
- package/dist/export/pages/ExportDetailPage.js +104 -98
- package/dist/export/pages/ExportDetailPage.js.map +1 -1
- package/dist/export/pages/ExportHistoryPage.js +150 -149
- package/dist/export/pages/ExportHistoryPage.js.map +1 -1
- package/dist/export/pages/ExportTemplatesPage.js +156 -154
- package/dist/export/pages/ExportTemplatesPage.js.map +1 -1
- package/dist/export/pages/TemplateDetailPage.js +142 -136
- package/dist/export/pages/TemplateDetailPage.js.map +1 -1
- package/dist/export/pages/v2/DownloadDetailPage.js +108 -103
- package/dist/export/pages/v2/DownloadDetailPage.js.map +1 -1
- package/dist/export/pages/v2/DownloadsPage.js +153 -152
- package/dist/export/pages/v2/DownloadsPage.js.map +1 -1
- package/dist/export/pages/v2/NewDownloadPage.js +142 -138
- package/dist/export/pages/v2/NewDownloadPage.js.map +1 -1
- package/dist/export/workspace-v2/DownloadCells.js +32 -20
- package/dist/export/workspace-v2/DownloadCells.js.map +1 -1
- package/dist/export/workspace-v2/NewDownloadDialog.js +1 -1
- package/dist/export/workspace-v2/NewDownloadDialog.js.map +1 -1
- package/dist/export/workspace-v2/useExportAccess.d.ts +2 -2
- package/dist/export/workspace-v2/useExportAccess.js.map +1 -1
- package/dist/generated/wspace-operations.d.ts +0 -42
- package/dist/generated/wspace-operations.js +6 -16
- package/dist/generated/wspace-operations.js.map +1 -1
- package/package.json +2 -2
|
@@ -1,20 +1,22 @@
|
|
|
1
1
|
import { useExport as e } from "../../providers/ExportProvider.js";
|
|
2
|
-
import { useAvailableEntities as t, useCreateExportJob as n, useExportTemplates as r, useOrganizationExportPermission as
|
|
3
|
-
import { useTr as
|
|
4
|
-
import { PageLayout as
|
|
5
|
-
import { entityLabel as
|
|
6
|
-
import { isExportEntityDisabled as
|
|
7
|
-
import { DEFAULT_NEW_DOWNLOAD_FORM as
|
|
8
|
-
import { joinPath as
|
|
9
|
-
import { openBilling as
|
|
10
|
-
import { cn as
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
2
|
+
import { useAvailableEntities as t, useCreateExportJob as n, useExportTemplates as r, useOrganizationExportPermission as i } from "../../hooks/useExportQueries.js";
|
|
3
|
+
import { useTr as ee } from "../../hooks/useTr.js";
|
|
4
|
+
import { PageLayout as te } from "../../components/PageLayout.js";
|
|
5
|
+
import { entityLabel as ne, offeredGroups as a } from "../../utils/entityLabels.js";
|
|
6
|
+
import { isExportEntityDisabled as o, isForeignProductEntity as re } from "../../utils/disabledModules.js";
|
|
7
|
+
import { DEFAULT_NEW_DOWNLOAD_FORM as s, SUPPORTED_FORMATS as c, applySavedSetup as l, suggestedDownloadName as u, toCreateExportInput as ie } from "../../utils/newDownloadForm.js";
|
|
8
|
+
import { joinPath as d } from "../../utils/paths.js";
|
|
9
|
+
import { openBilling as ae } from "../../utils/billing.js";
|
|
10
|
+
import { cn as f } from "../../utils/cn.js";
|
|
11
|
+
import { SpinnerIcon as oe } from "../../components/loadingSystem.js";
|
|
12
|
+
import { useCallback as se, useEffect as ce, useMemo as le, useRef as p, useState as m } from "react";
|
|
13
|
+
import { ArrowRight as ue, Check as h, Download as g, Minus as _ } from "lucide-react";
|
|
13
14
|
import { useAppShell as de, usePermission as fe } from "@burdenoff/fe-libs/shared/providers/shell";
|
|
14
15
|
import { useSearchParams as pe } from "react-router";
|
|
15
16
|
import { isQuotaExhaustedError as me } from "@burdenoff/fe-libs/shared/utils";
|
|
16
17
|
import { Fragment as he, jsx as v, jsxs as y } from "react/jsx-runtime";
|
|
17
|
-
import { AlertDialog as ge, AlertDialogAction as _e, AlertDialogCancel as ve, AlertDialogContent as ye, AlertDialogDescription as be, AlertDialogFooter as xe, AlertDialogHeader as Se, AlertDialogTitle as Ce, Button as b, IllustratedEmptyState as we, OptionalFields as Te, Stepper as
|
|
18
|
+
import { AlertDialog as ge, AlertDialogAction as _e, AlertDialogCancel as ve, AlertDialogContent as ye, AlertDialogDescription as be, AlertDialogFooter as xe, AlertDialogHeader as Se, AlertDialogTitle as Ce, Button as b, IllustratedEmptyState as we, OptionalFields as Te, Stepper as Ee, ThemedSelect as x } from "@burdenoff/fe-libs/ui";
|
|
19
|
+
import { useLoadingSystem as S } from "@burdenoff/fe-libs/ui/loading/LoadingSystemProvider";
|
|
18
20
|
// src/export/pages/v2/NewDownloadPage.tsx
|
|
19
21
|
var C = {
|
|
20
22
|
INDIVIDUAL: {
|
|
@@ -45,10 +47,10 @@ function E({ checked: e, onToggle: t, title: n, description: r }) {
|
|
|
45
47
|
role: "checkbox",
|
|
46
48
|
"aria-checked": e,
|
|
47
49
|
onClick: t,
|
|
48
|
-
className:
|
|
50
|
+
className: f("flex w-full items-start gap-3 rounded-xl border p-4 text-left transition-colors", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/40", e === !0 ? "border-primary bg-action-primary-bg/5" : "border-border-subtle hover:border-primary/40"),
|
|
49
51
|
children: [/* @__PURE__ */ y("span", {
|
|
50
52
|
"aria-hidden": "true",
|
|
51
|
-
className:
|
|
53
|
+
className: f("mt-0.5 flex size-5 shrink-0 items-center justify-center rounded border", e ? "border-primary bg-action-primary-bg text-action-primary-text" : "border-border-default"),
|
|
52
54
|
children: [e === !0 ? /* @__PURE__ */ v(h, { size: 14 }) : null, e === "mixed" ? /* @__PURE__ */ v(_, { size: 14 }) : null]
|
|
53
55
|
}), /* @__PURE__ */ y("span", {
|
|
54
56
|
className: "min-w-0",
|
|
@@ -63,98 +65,98 @@ function E({ checked: e, onToggle: t, title: n, description: r }) {
|
|
|
63
65
|
});
|
|
64
66
|
}
|
|
65
67
|
function D() {
|
|
66
|
-
let { basePath:
|
|
68
|
+
let h = S(), { basePath: _ = "/", navigate: D, organizationId: O } = e(), k = ee(), { createJob: De, isPending: A } = n(), { data: j } = t(), { data: M } = r(), [N] = pe(), { productSlug: P } = de(), Oe = fe("export:workspace_admin"), ke = i(O), F = [
|
|
67
69
|
"INDIVIDUAL",
|
|
68
|
-
...
|
|
69
|
-
...
|
|
70
|
-
],
|
|
71
|
-
...
|
|
72
|
-
templateId:
|
|
73
|
-
})),
|
|
74
|
-
|
|
75
|
-
let e =
|
|
76
|
-
if (!e || !
|
|
77
|
-
let t =
|
|
78
|
-
t && (
|
|
70
|
+
...Oe ? ["WORKSPACE_ADMIN"] : [],
|
|
71
|
+
...ke ? ["ORG_ADMIN"] : []
|
|
72
|
+
], I = se((e) => !o(e) && !re(e, P), [P]), L = le(() => j.filter((e) => e.enabled !== !1 && I(e.entityType)), [j, I]), R = a(L.map((e) => e.entityType)), z = (e) => ne(e, k, j), [B, V] = m(0), [H, U] = m(() => ({
|
|
73
|
+
...s,
|
|
74
|
+
templateId: N.get("templateId") ?? void 0
|
|
75
|
+
})), W = p(!1), [G, Ae] = m(!1), [K, q] = m(null), [je, J] = m(!1), Y = p(null);
|
|
76
|
+
ce(() => {
|
|
77
|
+
let e = N.get("templateId");
|
|
78
|
+
if (!e || !M.length || Y.current === e) return;
|
|
79
|
+
let t = M.find((t) => t.id === e);
|
|
80
|
+
t && (Y.current = e, U((e) => l(e, t, I, !1)));
|
|
79
81
|
}, [
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
82
|
+
I,
|
|
83
|
+
N,
|
|
84
|
+
M
|
|
83
85
|
]);
|
|
84
|
-
let
|
|
86
|
+
let X = new Set(H.entityTypes), Z = (e) => U((t) => ({
|
|
85
87
|
...t,
|
|
86
88
|
entityTypes: e
|
|
87
|
-
})),
|
|
88
|
-
let t = e.every((e) =>
|
|
89
|
-
|
|
90
|
-
},
|
|
91
|
-
let e =
|
|
92
|
-
return
|
|
93
|
-
},
|
|
94
|
-
|
|
89
|
+
})), Me = (e) => Z(X.has(e) ? H.entityTypes.filter((t) => t !== e) : [...H.entityTypes, e]), Ne = (e) => {
|
|
90
|
+
let t = e.every((e) => X.has(e)), n = new Set(e);
|
|
91
|
+
Z(t ? H.entityTypes.filter((e) => !n.has(e)) : [...H.entityTypes, ...e.filter((e) => !X.has(e))]);
|
|
92
|
+
}, Pe = () => {
|
|
93
|
+
let e = R.filter(({ entityTypes: e }) => e.every((e) => X.has(e))), t = new Set(e.flatMap((e) => e.entityTypes)), n = H.entityTypes.filter((e) => !t.has(e)), r = e.length === 1 && n.length === 0 ? k(e[0].group.labelKey, e[0].group.label) : e.length === 0 && n.length === 1 ? z(n[0]) : k("export.create.name.myData", "My data");
|
|
94
|
+
return u(r);
|
|
95
|
+
}, Fe = () => {
|
|
96
|
+
H.entityTypes.length === 0 ? q(k("export.create.errors.selectEntity", "Please select at least one entity type to export")) : (q(null), W.current || U((e) => ({
|
|
95
97
|
...e,
|
|
96
|
-
name:
|
|
97
|
-
})),
|
|
98
|
-
},
|
|
99
|
-
if (!
|
|
98
|
+
name: Pe()
|
|
99
|
+
})), V(1));
|
|
100
|
+
}, Ie = async () => {
|
|
101
|
+
if (!H.name.trim()) q(k("export.create.errors.exportNameRequired", "Please provide a name for this export"));
|
|
100
102
|
else {
|
|
101
|
-
|
|
103
|
+
q(null);
|
|
102
104
|
try {
|
|
103
|
-
let e = await
|
|
104
|
-
|
|
105
|
+
let e = await De(ie(H, O));
|
|
106
|
+
D?.(e?.id ? d(_, e.id) : _);
|
|
105
107
|
} catch (e) {
|
|
106
108
|
if (me(e)) {
|
|
107
|
-
|
|
109
|
+
J(!0), q(k("export.create.errors.quotaReached", "You have reached your export limit for this month."));
|
|
108
110
|
return;
|
|
109
111
|
}
|
|
110
|
-
|
|
112
|
+
q(e instanceof Error ? e.message : k("export.create.errors.createFailed", "Failed to create export"));
|
|
111
113
|
}
|
|
112
114
|
}
|
|
113
|
-
}, Q = (e) =>
|
|
114
|
-
return /* @__PURE__ */ y(
|
|
115
|
-
title:
|
|
115
|
+
}, Q = (e) => k(C[e].labelKey, C[e].label), $ = (e) => k(w[e][0], w[e][1]), Le = H.entityTypes.map(z);
|
|
116
|
+
return /* @__PURE__ */ y(te, {
|
|
117
|
+
title: k("export.create.title", "New Export"),
|
|
116
118
|
icon: /* @__PURE__ */ v(g, { size: 24 }),
|
|
117
119
|
maxWidth: "3xl",
|
|
118
120
|
children: [
|
|
119
|
-
/* @__PURE__ */ v(
|
|
121
|
+
/* @__PURE__ */ v(Ee, {
|
|
120
122
|
steps: [{
|
|
121
123
|
key: "what",
|
|
122
|
-
label:
|
|
124
|
+
label: k("export.create.steps.what", "What do you want to download?")
|
|
123
125
|
}, {
|
|
124
126
|
key: "review",
|
|
125
|
-
label:
|
|
127
|
+
label: k("export.create.steps.review", "Review")
|
|
126
128
|
}],
|
|
127
|
-
active:
|
|
129
|
+
active: B,
|
|
128
130
|
onStepClick: (e) => {
|
|
129
|
-
e === 0 &&
|
|
131
|
+
e === 0 && V(0);
|
|
130
132
|
}
|
|
131
133
|
}),
|
|
132
|
-
|
|
134
|
+
K && /* @__PURE__ */ v("p", {
|
|
133
135
|
role: "alert",
|
|
134
136
|
className: "rounded-xl border border-border-default bg-status-error-bg-subtle p-4 text-sm text-status-error-text",
|
|
135
|
-
children:
|
|
137
|
+
children: K
|
|
136
138
|
}),
|
|
137
|
-
|
|
139
|
+
B === 0 && /* @__PURE__ */ y("section", {
|
|
138
140
|
"aria-labelledby": "new-download-what",
|
|
139
141
|
className: "space-y-4",
|
|
140
142
|
children: [/* @__PURE__ */ v("h2", {
|
|
141
143
|
id: "new-download-what",
|
|
142
144
|
className: "text-lg font-semibold",
|
|
143
|
-
children:
|
|
144
|
-
}),
|
|
145
|
+
children: k("export.create.select.question", "What do you want to download?")
|
|
146
|
+
}), L.length === 0 ? /* @__PURE__ */ v(we, {
|
|
145
147
|
illustration: "empty-data",
|
|
146
|
-
title:
|
|
147
|
-
description:
|
|
148
|
+
title: k("export.create.select.emptyTitle", "Nothing to export yet"),
|
|
149
|
+
description: k("export.create.select.empty", "No exportable entity types are configured for this workspace yet. Once your workspace has data in supported modules, they'll show up here to select."),
|
|
148
150
|
glassIllustration: "data-tables"
|
|
149
|
-
}) : /* @__PURE__ */ y(he, { children: [
|
|
151
|
+
}) : /* @__PURE__ */ y(he, { children: [R.length > 0 && /* @__PURE__ */ v("div", {
|
|
150
152
|
className: "grid grid-cols-1 gap-3 sm:grid-cols-2",
|
|
151
|
-
children:
|
|
152
|
-
let n = t.filter((e) =>
|
|
153
|
+
children: R.map(({ group: e, entityTypes: t }) => {
|
|
154
|
+
let n = t.filter((e) => X.has(e)).length;
|
|
153
155
|
return /* @__PURE__ */ v(E, {
|
|
154
156
|
checked: n === t.length || n > 0 && "mixed",
|
|
155
|
-
onToggle: () =>
|
|
156
|
-
title:
|
|
157
|
-
description:
|
|
157
|
+
onToggle: () => Ne(t),
|
|
158
|
+
title: k(e.labelKey, e.label),
|
|
159
|
+
description: k(e.descriptionKey, e.description)
|
|
158
160
|
}, e.id);
|
|
159
161
|
})
|
|
160
162
|
}), /* @__PURE__ */ y("div", {
|
|
@@ -163,31 +165,31 @@ function D() {
|
|
|
163
165
|
type: "button",
|
|
164
166
|
variant: "ghost",
|
|
165
167
|
size: "sm",
|
|
166
|
-
"aria-expanded":
|
|
168
|
+
"aria-expanded": G || R.length === 0,
|
|
167
169
|
"aria-controls": "new-download-all-types",
|
|
168
|
-
onClick: () =>
|
|
169
|
-
hidden:
|
|
170
|
-
children:
|
|
170
|
+
onClick: () => Ae(!G),
|
|
171
|
+
hidden: R.length === 0,
|
|
172
|
+
children: G ? k("export.create.select.hideAll", "Hide the full list") : k("export.create.select.showAll", "Show all data types")
|
|
171
173
|
}), /* @__PURE__ */ v("div", {
|
|
172
174
|
id: "new-download-all-types",
|
|
173
|
-
hidden: !
|
|
175
|
+
hidden: !G && R.length > 0,
|
|
174
176
|
className: "grid grid-cols-1 gap-2 sm:grid-cols-2 lg:grid-cols-3",
|
|
175
|
-
children:
|
|
176
|
-
checked:
|
|
177
|
-
onToggle: () =>
|
|
178
|
-
title:
|
|
177
|
+
children: L.map((e) => /* @__PURE__ */ v(E, {
|
|
178
|
+
checked: X.has(e.entityType),
|
|
179
|
+
onToggle: () => Me(e.entityType),
|
|
180
|
+
title: z(e.entityType)
|
|
179
181
|
}, e.entityType))
|
|
180
182
|
})]
|
|
181
183
|
})] })]
|
|
182
184
|
}),
|
|
183
|
-
|
|
185
|
+
B === 1 && /* @__PURE__ */ y("section", {
|
|
184
186
|
"aria-labelledby": "new-download-review",
|
|
185
187
|
className: "space-y-4",
|
|
186
188
|
children: [
|
|
187
189
|
/* @__PURE__ */ v("h2", {
|
|
188
190
|
id: "new-download-review",
|
|
189
191
|
className: "sr-only",
|
|
190
|
-
children:
|
|
192
|
+
children: k("export.create.steps.review", "Review")
|
|
191
193
|
}),
|
|
192
194
|
/* @__PURE__ */ y("div", {
|
|
193
195
|
className: "space-y-4 rounded-xl border border-border-subtle bg-bg-surface p-4 sm:p-6",
|
|
@@ -195,10 +197,10 @@ function D() {
|
|
|
195
197
|
/* @__PURE__ */ v("p", {
|
|
196
198
|
className: "text-sm text-text-primary",
|
|
197
199
|
"data-testid": "new-download-summary",
|
|
198
|
-
children:
|
|
199
|
-
kinds:
|
|
200
|
-
whose: Q(
|
|
201
|
-
format: $(
|
|
200
|
+
children: k("export.create.summary", "{{kinds}} · {{whose}} · {{format}}", {
|
|
201
|
+
kinds: Le.join(", "),
|
|
202
|
+
whose: Q(H.scope),
|
|
203
|
+
format: $(H.format)
|
|
202
204
|
})
|
|
203
205
|
}),
|
|
204
206
|
/* @__PURE__ */ y("div", {
|
|
@@ -207,7 +209,7 @@ function D() {
|
|
|
207
209
|
htmlFor: "new-download-name",
|
|
208
210
|
className: "block text-sm font-medium",
|
|
209
211
|
children: [
|
|
210
|
-
|
|
212
|
+
k("export.create.options.name", "Export Name"),
|
|
211
213
|
" ",
|
|
212
214
|
/* @__PURE__ */ v("span", {
|
|
213
215
|
"aria-hidden": "true",
|
|
@@ -220,9 +222,9 @@ function D() {
|
|
|
220
222
|
type: "text",
|
|
221
223
|
required: !0,
|
|
222
224
|
"aria-required": "true",
|
|
223
|
-
value:
|
|
225
|
+
value: H.name,
|
|
224
226
|
onChange: (e) => {
|
|
225
|
-
|
|
227
|
+
W.current = !0, U((t) => ({
|
|
226
228
|
...t,
|
|
227
229
|
name: e.target.value
|
|
228
230
|
}));
|
|
@@ -232,28 +234,28 @@ function D() {
|
|
|
232
234
|
}),
|
|
233
235
|
/* @__PURE__ */ v("p", {
|
|
234
236
|
className: "text-sm text-text-secondary",
|
|
235
|
-
children:
|
|
237
|
+
children: k("export.create.zipNote", "You'll get a ZIP file.")
|
|
236
238
|
})
|
|
237
239
|
]
|
|
238
240
|
}),
|
|
239
241
|
/* @__PURE__ */ y(Te, {
|
|
240
242
|
storageKey: "export.new.moreOptions",
|
|
241
243
|
children: [
|
|
242
|
-
|
|
244
|
+
F.length > 1 ? /* @__PURE__ */ y("fieldset", {
|
|
243
245
|
className: "space-y-2",
|
|
244
246
|
children: [/* @__PURE__ */ v("legend", {
|
|
245
247
|
className: "text-sm font-medium",
|
|
246
|
-
children:
|
|
248
|
+
children: k("export.create.options.scope", "Export Scope")
|
|
247
249
|
}), /* @__PURE__ */ v("div", {
|
|
248
250
|
className: "grid grid-cols-1 gap-2 sm:grid-cols-3",
|
|
249
|
-
children:
|
|
250
|
-
className:
|
|
251
|
+
children: F.map((e) => /* @__PURE__ */ y("label", {
|
|
252
|
+
className: f("flex cursor-pointer items-start gap-2 rounded-lg border p-3 text-sm", H.scope === e ? "border-primary bg-action-primary-bg/5" : "border-border-subtle"),
|
|
251
253
|
children: [/* @__PURE__ */ v("input", {
|
|
252
254
|
type: "radio",
|
|
253
255
|
name: "new-download-scope",
|
|
254
256
|
value: e,
|
|
255
|
-
checked:
|
|
256
|
-
onChange: () =>
|
|
257
|
+
checked: H.scope === e,
|
|
258
|
+
onChange: () => U((t) => ({
|
|
257
259
|
...t,
|
|
258
260
|
scope: e
|
|
259
261
|
})),
|
|
@@ -263,7 +265,7 @@ function D() {
|
|
|
263
265
|
children: Q(e)
|
|
264
266
|
}), /* @__PURE__ */ v("span", {
|
|
265
267
|
className: "block text-xs text-text-secondary",
|
|
266
|
-
children:
|
|
268
|
+
children: k(C[e].descKey, C[e].desc)
|
|
267
269
|
})] })]
|
|
268
270
|
}, e))
|
|
269
271
|
})]
|
|
@@ -272,17 +274,17 @@ function D() {
|
|
|
272
274
|
className: "space-y-2",
|
|
273
275
|
children: [/* @__PURE__ */ v("legend", {
|
|
274
276
|
className: "text-sm font-medium",
|
|
275
|
-
children:
|
|
277
|
+
children: k("export.create.options.outputFormat", "Output Format")
|
|
276
278
|
}), /* @__PURE__ */ v("div", {
|
|
277
279
|
className: "grid grid-cols-1 gap-2 sm:grid-cols-2",
|
|
278
|
-
children:
|
|
279
|
-
className:
|
|
280
|
+
children: c.map((e) => /* @__PURE__ */ y("label", {
|
|
281
|
+
className: f("flex cursor-pointer items-center gap-2 rounded-lg border p-3 text-sm", H.format === e ? "border-primary bg-action-primary-bg/5" : "border-border-subtle"),
|
|
280
282
|
children: [/* @__PURE__ */ v("input", {
|
|
281
283
|
type: "radio",
|
|
282
284
|
name: "new-download-format",
|
|
283
285
|
value: e,
|
|
284
|
-
checked:
|
|
285
|
-
onChange: () =>
|
|
286
|
+
checked: H.format === e,
|
|
287
|
+
onChange: () => U((t) => ({
|
|
286
288
|
...t,
|
|
287
289
|
format: e
|
|
288
290
|
}))
|
|
@@ -296,11 +298,11 @@ function D() {
|
|
|
296
298
|
/* @__PURE__ */ y("legend", {
|
|
297
299
|
className: "text-sm font-medium",
|
|
298
300
|
children: [
|
|
299
|
-
|
|
301
|
+
k("export.create.options.dateRange", "Date Range"),
|
|
300
302
|
" ",
|
|
301
303
|
/* @__PURE__ */ v("span", {
|
|
302
304
|
className: "font-normal text-text-secondary",
|
|
303
|
-
children:
|
|
305
|
+
children: k("export.create.shared.optional", "(optional)")
|
|
304
306
|
})
|
|
305
307
|
]
|
|
306
308
|
}),
|
|
@@ -308,10 +310,10 @@ function D() {
|
|
|
308
310
|
className: "grid grid-cols-1 gap-3 sm:grid-cols-2",
|
|
309
311
|
children: [/* @__PURE__ */ y("label", {
|
|
310
312
|
className: "space-y-1 text-xs text-text-secondary",
|
|
311
|
-
children: [/* @__PURE__ */ v("span", { children:
|
|
313
|
+
children: [/* @__PURE__ */ v("span", { children: k("export.create.options.dateFrom", "From") }), /* @__PURE__ */ v("input", {
|
|
312
314
|
type: "date",
|
|
313
|
-
value:
|
|
314
|
-
onChange: (e) =>
|
|
315
|
+
value: H.dateFrom,
|
|
316
|
+
onChange: (e) => U((t) => ({
|
|
315
317
|
...t,
|
|
316
318
|
dateFrom: e.target.value
|
|
317
319
|
})),
|
|
@@ -319,11 +321,11 @@ function D() {
|
|
|
319
321
|
})]
|
|
320
322
|
}), /* @__PURE__ */ y("label", {
|
|
321
323
|
className: "space-y-1 text-xs text-text-secondary",
|
|
322
|
-
children: [/* @__PURE__ */ v("span", { children:
|
|
324
|
+
children: [/* @__PURE__ */ v("span", { children: k("export.create.options.dateTo", "To") }), /* @__PURE__ */ v("input", {
|
|
323
325
|
type: "date",
|
|
324
|
-
value:
|
|
325
|
-
min:
|
|
326
|
-
onChange: (e) =>
|
|
326
|
+
value: H.dateTo,
|
|
327
|
+
min: H.dateFrom || void 0,
|
|
328
|
+
onChange: (e) => U((t) => ({
|
|
327
329
|
...t,
|
|
328
330
|
dateTo: e.target.value
|
|
329
331
|
})),
|
|
@@ -333,7 +335,7 @@ function D() {
|
|
|
333
335
|
}),
|
|
334
336
|
/* @__PURE__ */ v("p", {
|
|
335
337
|
className: "text-xs text-text-secondary",
|
|
336
|
-
children:
|
|
338
|
+
children: k("export.create.options.dateRangeDescription", "Leave blank to export all data regardless of date.")
|
|
337
339
|
})
|
|
338
340
|
]
|
|
339
341
|
}),
|
|
@@ -343,19 +345,19 @@ function D() {
|
|
|
343
345
|
htmlFor: "new-download-setup",
|
|
344
346
|
className: "block text-sm font-medium",
|
|
345
347
|
children: [
|
|
346
|
-
|
|
348
|
+
k("export.create.options.basedOnTemplate", "Based on Template"),
|
|
347
349
|
" ",
|
|
348
350
|
/* @__PURE__ */ v("span", {
|
|
349
351
|
className: "font-normal text-text-secondary",
|
|
350
|
-
children:
|
|
352
|
+
children: k("export.create.shared.optional", "(optional)")
|
|
351
353
|
})
|
|
352
354
|
]
|
|
353
|
-
}),
|
|
355
|
+
}), M.length > 0 ? /* @__PURE__ */ y(x, {
|
|
354
356
|
id: "new-download-setup",
|
|
355
|
-
value:
|
|
357
|
+
value: H.templateId ?? "",
|
|
356
358
|
onChange: (e) => {
|
|
357
|
-
let t =
|
|
358
|
-
|
|
359
|
+
let t = M.find((t) => t.id === e.target.value);
|
|
360
|
+
U((e) => t ? l(e, t, I, W.current) : {
|
|
359
361
|
...e,
|
|
360
362
|
templateId: void 0
|
|
361
363
|
});
|
|
@@ -363,24 +365,24 @@ function D() {
|
|
|
363
365
|
className: T,
|
|
364
366
|
children: [/* @__PURE__ */ v("option", {
|
|
365
367
|
value: "",
|
|
366
|
-
children:
|
|
367
|
-
}),
|
|
368
|
+
children: k("export.create.options.noTemplate", "No template")
|
|
369
|
+
}), M.map((e) => /* @__PURE__ */ v("option", {
|
|
368
370
|
value: e.id,
|
|
369
371
|
children: e.name
|
|
370
372
|
}, e.id))]
|
|
371
373
|
}) : /* @__PURE__ */ y("p", {
|
|
372
374
|
className: "text-sm text-text-secondary",
|
|
373
375
|
children: [
|
|
374
|
-
|
|
376
|
+
k("export.create.options.noTemplates", "No templates yet."),
|
|
375
377
|
" ",
|
|
376
378
|
/* @__PURE__ */ v("button", {
|
|
377
379
|
type: "button",
|
|
378
|
-
onClick: () =>
|
|
380
|
+
onClick: () => D?.(d(_, "templates")),
|
|
379
381
|
className: "text-primary underline-offset-2 hover:underline",
|
|
380
|
-
children:
|
|
382
|
+
children: k("export.create.options.createTemplateLink", "Create one")
|
|
381
383
|
}),
|
|
382
384
|
" ",
|
|
383
|
-
|
|
385
|
+
k("export.create.options.reuseTemplateHint", "to reuse export configurations.")
|
|
384
386
|
]
|
|
385
387
|
})]
|
|
386
388
|
})
|
|
@@ -394,43 +396,45 @@ function D() {
|
|
|
394
396
|
/* @__PURE__ */ v(b, {
|
|
395
397
|
type: "button",
|
|
396
398
|
variant: "outline",
|
|
397
|
-
onClick: () =>
|
|
398
|
-
children:
|
|
399
|
+
onClick: () => D?.(_),
|
|
400
|
+
children: k("export.create.actions.cancel", "Cancel")
|
|
399
401
|
}),
|
|
400
|
-
|
|
402
|
+
B === 1 && /* @__PURE__ */ v(b, {
|
|
401
403
|
type: "button",
|
|
402
404
|
variant: "outline",
|
|
403
|
-
onClick: () =>
|
|
404
|
-
children:
|
|
405
|
+
onClick: () => V(0),
|
|
406
|
+
children: k("export.create.actions.back", "Back")
|
|
405
407
|
}),
|
|
406
|
-
|
|
408
|
+
B === 0 ? /* @__PURE__ */ y(b, {
|
|
407
409
|
type: "button",
|
|
408
|
-
onClick:
|
|
409
|
-
children: [
|
|
410
|
+
onClick: Fe,
|
|
411
|
+
children: [k("export.create.actions.next", "Next"), /* @__PURE__ */ v(ue, {
|
|
410
412
|
size: 16,
|
|
411
413
|
"aria-hidden": "true"
|
|
412
414
|
})]
|
|
413
415
|
}) : /* @__PURE__ */ y(b, {
|
|
416
|
+
busy: h && A,
|
|
414
417
|
type: "button",
|
|
415
|
-
onClick: () => void
|
|
416
|
-
disabled:
|
|
417
|
-
children: [
|
|
418
|
+
onClick: () => void Ie(),
|
|
419
|
+
disabled: !h && A,
|
|
420
|
+
children: [!h && A ? /* @__PURE__ */ v(oe, {
|
|
421
|
+
tone: "current",
|
|
418
422
|
size: 16,
|
|
419
423
|
className: "animate-spin",
|
|
420
424
|
"aria-hidden": "true"
|
|
421
425
|
}) : /* @__PURE__ */ v(g, {
|
|
422
426
|
size: 16,
|
|
423
427
|
"aria-hidden": "true"
|
|
424
|
-
}),
|
|
428
|
+
}), k("export.create.actions.startExport", "Start Export")]
|
|
425
429
|
})
|
|
426
430
|
]
|
|
427
431
|
}),
|
|
428
432
|
/* @__PURE__ */ v(ge, {
|
|
429
|
-
open:
|
|
430
|
-
onOpenChange:
|
|
431
|
-
children: /* @__PURE__ */ y(ye, { children: [/* @__PURE__ */ y(Se, { children: [/* @__PURE__ */ v(Ce, { children:
|
|
432
|
-
onClick: () =>
|
|
433
|
-
children:
|
|
433
|
+
open: je,
|
|
434
|
+
onOpenChange: J,
|
|
435
|
+
children: /* @__PURE__ */ y(ye, { children: [/* @__PURE__ */ y(Se, { children: [/* @__PURE__ */ v(Ce, { children: k("export.create.quotaDialog.title", "Export Limit Reached") }), /* @__PURE__ */ v(be, { children: k("export.create.quotaDialog.description", "You have reached your export limit for this month.") })] }), /* @__PURE__ */ y(xe, { children: [/* @__PURE__ */ v(ve, { children: k("export.create.quotaDialog.dismiss", "Dismiss") }), /* @__PURE__ */ v(_e, {
|
|
436
|
+
onClick: () => ae(D),
|
|
437
|
+
children: k("export.create.quotaDialog.viewBilling", "View Billing")
|
|
434
438
|
})] })] })
|
|
435
439
|
})
|
|
436
440
|
]
|